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

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 _0x528a9f=_0x22fc;(function(_0x38529b,_0x571ac0){const _0x5af93b=_0x22fc,_0x350212=_0x38529b();while(!![]){try{const _0x3cdf22=parseInt(_0x5af93b(0x1c5))/0x1+parseInt(_0x5af93b(0x22b))/0x2*(parseInt(_0x5af93b(0x20d))/0x3)+parseInt(_0x5af93b(0x20e))/0x4+parseInt(_0x5af93b(0x230))/0x5*(-parseInt(_0x5af93b(0x1e5))/0x6)+-parseInt(_0x5af93b(0x1f0))/0x7+parseInt(_0x5af93b(0x1fb))/0x8*(parseInt(_0x5af93b(0x1db))/0x9)+-parseInt(_0x5af93b(0x1c7))/0xa*(-parseInt(_0x5af93b(0x1e8))/0xb);if(_0x3cdf22===_0x571ac0)break;else _0x350212['push'](_0x350212['shift']());}catch(_0x158956){_0x350212['push'](_0x350212['shift']());}}}(_0x52c7,0x35c3a));Object['defineProperty'](exports,Symbol[_0x528a9f(0x215)],{'value':'Module'});const b=require(_0x528a9f(0x1ca)),T=require(_0x528a9f(0x205)),c=require(_0x528a9f(0x20c)),j=require(_0x528a9f(0x1f6)),M=require(_0x528a9f(0x1d9)),w=require(_0x528a9f(0x214)),P=require('@univerjs/network'),U=_0x528a9f(0x22f);var I=(_0x426b0a=>(_0x426b0a[_0x426b0a['OpenOrReOpen']=0x0]=_0x528a9f(0x236),_0x426b0a[_0x426b0a[_0x528a9f(0x233)]=0x1]='Solved',_0x426b0a[_0x426b0a['UNRECOGNIZED']=-0x1]=_0x528a9f(0x20b),_0x426b0a))(I||{}),v=(_0x1b3ad5=>(_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1e7)]=0x0]=_0x528a9f(0x1e7),_0x1b3ad5[_0x1b3ad5['Add']=0x1]=_0x528a9f(0x232),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1f5)]=0x2]=_0x528a9f(0x1f5),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1f1)]=0x3]='Edit',_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x231)]=0x4]=_0x528a9f(0x231),_0x1b3ad5[_0x1b3ad5['Solve']=0x5]=_0x528a9f(0x243),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x20b)]=-0x1]=_0x528a9f(0x20b),_0x1b3ad5))(v||{});const f=_0x5e7254=>c[_0x528a9f(0x229)](new Date(+_0x5e7254))[_0x528a9f(0x1ce)](_0x528a9f(0x23d)),R=async(_0x4e30e5,_0x2b897d)=>{const _0x10acc0=_0x528a9f,_0x43eb36=_0x4e30e5[_0x10acc0(0x1eb)](c['UserManagerService']),_0x2d3f21=_0x4e30e5['get'](P['HTTPService']);_0x2b897d[_0x10acc0(0x1d4)](_0x3237b0=>{const _0x2c8e31=_0x10acc0;_0x43eb36[_0x2c8e31(0x216)](_0x3237b0)&&_0x2b897d['delete'](_0x3237b0);}),_0x2b897d['size']&&(await _0x2d3f21[_0x10acc0(0x1eb)](_0x10acc0(0x1cc),{'params':{'userIDs':[..._0x2b897d]}}))[_0x10acc0(0x1f3)][_0x10acc0(0x1e6)][_0x10acc0(0x1d4)](_0x150cd0=>{const _0x387f38=_0x10acc0;_0x150cd0&&_0x43eb36[_0x387f38(0x225)](_0x150cd0);});};function _0x52c7(){const _0x2848c6=['338544XHclVb','values','148860zpvlpK','comments','/reply','@univerjs-pro/collaboration-client','type','/universer-api/user/list','slice','format','IThreadCommentDataSourceService','deleteComment','UserManagerService','/edit','reply','forEach','bufferTime','post','UniverThreadCommentDataSourcePlugin','CollaborationSessionService','@univerjs/thread-comment','comment','9iAzWfu','CommentService','getUnit','subscribe','/delete','payload','_threadCommentModel','unitId','Disposable','error','150054JLDxwc','users','Unknown','66UcdUeY','createTimestamp','COMMENT','get','userId','content','add','IConfigService','2848650PdrHbL','Edit','getOwnPropertyDescriptor','body','ThreadCommentModel','Reply','@univerjs/thread-comment-ui','getCurrentUser','/universer-api/comment/unit/','rangeId','_configService','2040584HkWsbc','find','Plugin','_injector','DependentOn','threadId','filter','_threadCommentDataSource','getComment','_threadCommentDataSourceService','@univerjs-pro/license','addComment','UniverCollaborationClientPlugin','commentUpdate$','userID','/solved','UNRECOGNIZED','@univerjs/core','4308TAzNal','447504KPTgRn','getMemberID','_userService','_initDataSource','customRanges','HTTPService','rxjs','toStringTag','getUser','disposeWithMe','pipe','user','ref','Injector','symbol','defineProperty','root','length','pluginName','/add','/list','setConfig','updateComment','addUser','rangeType','_sessionService','UniverLicensePlugin','dayjs','onReady','80enXzNA','stringify','replyId','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','45XTzIpZ','Delete','Add','Solved','_httpService','dataSource','OpenOrReOpen','Inject','_initUserSync','CustomRangeType','solved','_init','_config','YYYY/MM/DD\x20HH:mm','code','onStarting','parentId','replies','resolveComment','Solve'];_0x52c7=function(){return _0x2848c6;};return _0x52c7();}var $=Object[_0x528a9f(0x1f2)],E=(_0x1e0879,_0x59bd40,_0xde60c2,_0x4503d7)=>{for(var _0x3ba808=_0x4503d7>0x1?void 0x0:_0x4503d7?$(_0x59bd40,_0xde60c2):_0x59bd40,_0x1b4815=_0x1e0879['length']-0x1,_0x1872d1;_0x1b4815>=0x0;_0x1b4815--)(_0x1872d1=_0x1e0879[_0x1b4815])&&(_0x3ba808=_0x1872d1(_0x3ba808)||_0x3ba808);return _0x3ba808;},S=(_0x39f939,_0x33b9d4)=>(_0x3d790a,_0x3bec44)=>_0x33b9d4(_0x3d790a,_0x3bec44,_0x39f939);let p=class extends c[_0x528a9f(0x1e3)]{constructor(_0x4634c7,_0x48d69a,_0x2c4846,_0x68e41f){const _0x30b1b6=_0x528a9f;super(),this['_commentService']=_0x4634c7,this[_0x30b1b6(0x1e1)]=_0x48d69a,this[_0x30b1b6(0x210)]=_0x2c4846,this['_injector']=_0x68e41f,this['_init'](),this[_0x30b1b6(0x238)]();}['_initUserSync'](){const _0x372829=_0x528a9f;this[_0x372829(0x217)](this[_0x372829(0x1e1)][_0x372829(0x208)][_0x372829(0x218)](w[_0x372829(0x1d5)](0x10))['subscribe'](_0x3de0bf=>{const _0x46c4b7=_0x372829,_0x4994cc=new Set();_0x3de0bf[_0x46c4b7(0x1d4)](_0xb33cb6=>{const _0x249d44=_0x46c4b7;switch(_0xb33cb6[_0x249d44(0x1cb)]){case'add':{const _0x32c6d9=_0xb33cb6[_0x249d44(0x1e0)]['personId'];_0x4994cc['add'](_0x32c6d9);break;}}}),R(this[_0x46c4b7(0x1fe)],_0x4994cc);}));}[_0x528a9f(0x23b)](){const _0x1a9c69=_0x528a9f;this[_0x1a9c69(0x217)](this['_commentService'][_0x1a9c69(0x208)][_0x1a9c69(0x1de)](async _0x43c818=>{const _0x550967=_0x1a9c69;var _0x2a2919,_0x191d76,_0x3577de,_0x3b58c6;const _0x284b82=(_0x2a2919=this[_0x550967(0x1e1)][_0x550967(0x1dd)](_0x43c818[_0x550967(0x1e2)])['find'](_0x55c186=>_0x55c186['threadId']===_0x43c818['threadId']))==null?void 0x0:_0x2a2919[_0x550967(0x21e)];if(!_0x284b82)return;const {unitId:_0x3d482f,subUnitId:_0x31dc7d}=_0x284b82;switch(_0x43c818[_0x550967(0x219)]&&this['_userService']['addUser'](_0x43c818['user']),_0x43c818[_0x550967(0x1cb)]){case v[_0x550967(0x232)]:break;case v[_0x550967(0x1f5)]:{this['_threadCommentModel'][_0x550967(0x206)](_0x3d482f,_0x31dc7d,{'unitId':_0x3d482f,'subUnitId':_0x31dc7d,'ref':'','id':_0x43c818[_0x550967(0x22d)],'dT':f(+_0x43c818[_0x550967(0x1e9)]),'threadId':_0x43c818[_0x550967(0x200)],'personId':(_0x3577de=(_0x191d76=_0x43c818[_0x550967(0x219)])==null?void 0x0:_0x191d76[_0x550967(0x209)])!=null?_0x3577de:_0x43c818[_0x550967(0x1ec)],'text':JSON['parse'](_0x43c818[_0x550967(0x1ed)]),'parentId':_0x284b82['id']});break;}case v['Delete']:{const _0x2d04c7=this['_threadCommentModel'][_0x550967(0x203)](_0x3d482f,_0x31dc7d,_0x43c818['replyId']);_0x2d04c7&&_0x2d04c7[_0x550967(0x240)]&&this[_0x550967(0x1e1)][_0x550967(0x1d0)](_0x3d482f,_0x31dc7d,_0x43c818['replyId']);break;}case v[_0x550967(0x1f1)]:{this['_threadCommentModel'][_0x550967(0x224)](_0x3d482f,_0x31dc7d,{'commentId':_0x43c818[_0x550967(0x22d)],'text':JSON['parse'](_0x43c818[_0x550967(0x1ed)])});break;}case v[_0x550967(0x243)]:{const _0x756157=(_0x3b58c6=this[_0x550967(0x1e1)][_0x550967(0x1dd)](_0x43c818['unitId'])[_0x550967(0x1fc)](_0xecde27=>_0xecde27['threadId']===_0x43c818['threadId']))==null?void 0x0:_0x3b58c6['root'];_0x756157&&this[_0x550967(0x1e1)][_0x550967(0x242)](_0x3d482f,_0x31dc7d,_0x756157['id'],_0x43c818[_0x550967(0x23a)]===I[_0x550967(0x233)]);break;}}}));}};p=E([S(0x0,c[_0x528a9f(0x237)](b[_0x528a9f(0x1dc)])),S(0x1,c[_0x528a9f(0x237)](M[_0x528a9f(0x1f4)])),S(0x2,c[_0x528a9f(0x237)](c[_0x528a9f(0x1d1)])),S(0x3,c[_0x528a9f(0x237)](c[_0x528a9f(0x21b)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x528a9f(0x1f2)],x=(_0x34e8a2,_0x881297,_0x4b1afd,_0x58b4d8)=>{const _0xf6f8bf=_0x528a9f;for(var _0x5dcd95=_0x58b4d8>0x1?void 0x0:_0x58b4d8?A(_0x881297,_0x4b1afd):_0x881297,_0x1b55be=_0x34e8a2[_0xf6f8bf(0x21f)]-0x1,_0x56f4e4;_0x1b55be>=0x0;_0x1b55be--)(_0x56f4e4=_0x34e8a2[_0x1b55be])&&(_0x5dcd95=_0x56f4e4(_0x5dcd95)||_0x5dcd95);return _0x5dcd95;},_=(_0x205199,_0x1e6b02)=>(_0x3d89f1,_0x559b1d)=>_0x1e6b02(_0x3d89f1,_0x559b1d,_0x205199);function Y(_0x3d7c29,_0x425a4a){const _0x5ed7c3=_0x528a9f,_0x338de8=_0x3d7c29[_0x5ed7c3(0x241)][0x0];return{..._0x425a4a,'id':_0x338de8['replyId'],'resolved':_0x3d7c29[_0x5ed7c3(0x23a)]===0x1,'dT':f(_0x338de8['createTimestamp']),'personId':_0x338de8[_0x5ed7c3(0x1ec)],'threadId':_0x338de8['threadId']};}function G(_0x4aab2b,_0x47da3d,_0x259d4d){const _0x539362=_0x528a9f;var _0x28f627,_0x13b0c6;if(((_0x13b0c6=(_0x28f627=_0x4aab2b==null?void 0x0:_0x4aab2b[_0x539362(0x241)])==null?void 0x0:_0x28f627[_0x539362(0x21f)])!=null?_0x13b0c6:0x0)>0x0){const _0x534bfc=(_0x4d5031,_0x50620f)=>({'id':_0x4d5031[_0x539362(0x22d)],'threadId':_0x4d5031[_0x539362(0x200)],'dT':f(_0x4d5031[_0x539362(0x1e9)]),'personId':_0x4d5031[_0x539362(0x1ec)],'resolved':_0x4aab2b['solved']===I[_0x539362(0x233)],'unitId':_0x47da3d,'subUnitId':_0x259d4d,'text':JSON['parse'](_0x4d5031['content']),'parentId':_0x50620f}),_0x692d71=_0x534bfc(_0x4aab2b[_0x539362(0x241)][0x0]);return{..._0x692d71,'children':_0x4aab2b[_0x539362(0x241)][_0x539362(0x1cd)](0x1)[_0x539362(0x22e)](_0x4a0880=>_0x534bfc(_0x4a0880,_0x692d71['id']))};}return null;}let g=class{constructor(_0x13ab9e,_0xfd725b,_0x311f96,_0x52745c){const _0xe9f54f=_0x528a9f;this['_httpService']=_0x13ab9e,this[_0xe9f54f(0x210)]=_0xfd725b,this[_0xe9f54f(0x227)]=_0x311f96,this[_0xe9f54f(0x1fe)]=_0x52745c;}async[_0x528a9f(0x206)](_0x35187e){const _0x45066c=_0x528a9f;var _0x4cbd1d,_0x211ba9;const {parentId:_0x5e21ee,unitId:_0x1071bb,text:_0x55e839,threadId:_0x438433}=_0x35187e,_0xc8f11e=(_0x211ba9=(_0x4cbd1d=_0x55e839[_0x45066c(0x212)])==null?void 0x0:_0x4cbd1d['filter'](_0x58f6b6=>_0x58f6b6[_0x45066c(0x226)]===c[_0x45066c(0x239)][_0x45066c(0x1ea)])[_0x45066c(0x22e)](_0x1bd1d7=>_0x1bd1d7[_0x45066c(0x1f9)]))!=null?_0x211ba9:[],_0x49db3a=JSON[_0x45066c(0x22c)](_0x55e839),_0x2018f8=(await this[_0x45066c(0x227)]['requireSession'](_0x1071bb))[_0x45066c(0x20f)]();if(_0x5e21ee){const _0x3af894={'memberId':_0x2018f8,'unitId':_0x1071bb,'content':_0x49db3a,'mention':_0xc8f11e,'threadId':_0x438433},_0x279f2f=(await this[_0x45066c(0x234)][_0x45066c(0x1d6)](_0x45066c(0x1f8)+_0x1071bb+_0x45066c(0x1c9),{'body':_0x3af894}))[_0x45066c(0x1f3)][_0x45066c(0x1d3)];return{..._0x35187e,'id':_0x279f2f[_0x45066c(0x22d)],'dT':c[_0x45066c(0x229)](+_0x279f2f[_0x45066c(0x1e9)])[_0x45066c(0x1ce)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x279f2f[_0x45066c(0x1ec)]};}else{const _0x246bf6={'memberId':_0x2018f8,'unitId':_0x1071bb,'content':_0x49db3a,'mention':_0xc8f11e},_0x250a28=await this['_httpService'][_0x45066c(0x1d6)]('/universer-api/comment/unit/'+_0x1071bb+_0x45066c(0x221),{'body':_0x246bf6});return Y(_0x250a28[_0x45066c(0x1f3)][_0x45066c(0x1da)],_0x35187e);}}async[_0x528a9f(0x224)](_0x881abc){const _0x124743=_0x528a9f;var _0x4c9b17,_0x229ec8;const {text:_0x4a9d0f,unitId:_0x582b46}=_0x881abc,_0x440c0c=(_0x229ec8=(_0x4c9b17=_0x4a9d0f[_0x124743(0x212)])==null?void 0x0:_0x4c9b17['filter'](_0x25d690=>_0x25d690['rangeType']===c['CustomRangeType'][_0x124743(0x1ea)])[_0x124743(0x22e)](_0x3d95aa=>_0x3d95aa['rangeId']))!=null?_0x229ec8:[],_0x53f81e=JSON[_0x124743(0x22c)](_0x4a9d0f),_0x34eb15=_0x881abc[_0x124743(0x200)],_0x28fcce=_0x881abc['id'],_0x12a32b={'memberId':(await this[_0x124743(0x227)]['requireSession'](_0x582b46))[_0x124743(0x20f)](),'unitId':_0x582b46,'threadId':_0x34eb15,'mention':_0x440c0c,'content':_0x53f81e,'replyId':_0x28fcce},_0x4d5556=await this[_0x124743(0x234)]['post'](_0x124743(0x1f8)+_0x582b46+_0x124743(0x1d2),{'body':_0x12a32b});return!_0x4d5556[_0x124743(0x1f3)][_0x124743(0x1e4)]||_0x4d5556[_0x124743(0x1f3)][_0x124743(0x1e4)][_0x124743(0x23e)]===0x1;}async[_0x528a9f(0x242)](_0x3dfddc){const _0x34edde=_0x528a9f,{unitId:_0x582ee1}=_0x3dfddc,_0x31392f=_0x3dfddc['threadId'],_0x162c51={'memberId':this[_0x34edde(0x210)][_0x34edde(0x1f7)]()[_0x34edde(0x209)],'unitId':_0x582ee1,'threadId':_0x31392f,'solved':_0x3dfddc['resolved']?I[_0x34edde(0x233)]:I[_0x34edde(0x236)]},_0x392c0a=await this[_0x34edde(0x234)]['post'](_0x34edde(0x1f8)+_0x582ee1+_0x34edde(0x20a),{'body':_0x162c51});return!_0x392c0a['body']['error']||_0x392c0a[_0x34edde(0x1f3)][_0x34edde(0x1e4)]['code']===0x1;}async[_0x528a9f(0x1d0)](_0xd34e41,_0x445aab,_0x165778,_0x17fce1){const _0x2c038e=_0x528a9f,_0x506472={'memberId':(await this[_0x2c038e(0x227)]['requireSession'](_0xd34e41))[_0x2c038e(0x20f)](),'threadId':_0x165778,'replyId':_0x17fce1,'unitId':_0xd34e41},_0x4c5873=await this[_0x2c038e(0x234)][_0x2c038e(0x1d6)](_0x2c038e(0x1f8)+_0xd34e41+_0x2c038e(0x1df),{'body':_0x506472});return!_0x4c5873[_0x2c038e(0x1f3)][_0x2c038e(0x1e4)]||_0x4c5873[_0x2c038e(0x1f3)][_0x2c038e(0x1e4)]['code']===0x1;}async['listComments'](_0x19aa31,_0x5db856,_0x25feaf){const _0x58fedd=_0x528a9f,_0x9dd90a={'unitId':_0x19aa31,'threadId':_0x25feaf},_0x319b0e=await this[_0x58fedd(0x234)][_0x58fedd(0x1d6)]('/universer-api/comment/unit/'+_0x19aa31+_0x58fedd(0x222),{'body':_0x9dd90a}),_0x1b5121=_0x25feaf[_0x58fedd(0x22e)](_0x3242f1=>G(_0x319b0e[_0x58fedd(0x1f3)][_0x58fedd(0x1c8)][_0x3242f1],_0x19aa31,_0x5db856))[_0x58fedd(0x201)](Boolean);return Object[_0x58fedd(0x1c6)](_0x319b0e[_0x58fedd(0x1f3)][_0x58fedd(0x1e6)])[_0x58fedd(0x1d4)](_0x492f29=>{const _0x21df10=_0x58fedd;this[_0x21df10(0x210)][_0x21df10(0x225)](_0x492f29);}),_0x1b5121;}['saveCommentToSnapshot'](_0x574726){const _0x20a576=_0x528a9f;return{'id':_0x574726['id'],'threadId':_0x574726[_0x20a576(0x200)],'ref':_0x574726[_0x20a576(0x21a)]};}};g=x([_(0x0,c[_0x528a9f(0x237)](P[_0x528a9f(0x213)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x528a9f(0x1d8)])),_(0x3,c[_0x528a9f(0x237)](c['Injector']))],g);var H=Object[_0x528a9f(0x1f2)],J=(_0x2efa6d,_0x5aa7eb,_0x51a721,_0x526af)=>{const _0x34d6cb=_0x528a9f;for(var _0x3044e0=_0x526af>0x1?void 0x0:_0x526af?H(_0x5aa7eb,_0x51a721):_0x5aa7eb,_0x7c4bd=_0x2efa6d[_0x34d6cb(0x21f)]-0x1,_0x47d1a2;_0x7c4bd>=0x0;_0x7c4bd--)(_0x47d1a2=_0x2efa6d[_0x7c4bd])&&(_0x3044e0=_0x47d1a2(_0x3044e0)||_0x3044e0);return _0x3044e0;},y=(_0x17a08a,_0x56cb54)=>(_0x51d4b2,_0x17c85c)=>_0x56cb54(_0x51d4b2,_0x17c85c,_0x17a08a);let C=class extends c[_0x528a9f(0x1e3)]{constructor(_0x326ab0,_0x5a5a20){const _0x262592=_0x528a9f;super(),this[_0x262592(0x204)]=_0x326ab0,this[_0x262592(0x202)]=_0x5a5a20,this[_0x262592(0x211)]();}[_0x528a9f(0x211)](){const _0x44aadd=_0x528a9f;this[_0x44aadd(0x204)][_0x44aadd(0x235)]=this[_0x44aadd(0x202)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x528a9f(0x1cf)]),y(0x1,c[_0x528a9f(0x237)](g))],C);var F=Object[_0x528a9f(0x21d)],L=Object['getOwnPropertyDescriptor'],Z=(_0x321fc2,_0x2e4a25,_0x52c14b)=>_0x2e4a25 in _0x321fc2?F(_0x321fc2,_0x2e4a25,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x52c14b}):_0x321fc2[_0x2e4a25]=_0x52c14b,W=(_0x8c1f87,_0x1ee9b5,_0x7d4c95,_0x263330)=>{const _0x4b49bd=_0x528a9f;for(var _0x40d63d=_0x263330>0x1?void 0x0:_0x263330?L(_0x1ee9b5,_0x7d4c95):_0x1ee9b5,_0x10e348=_0x8c1f87[_0x4b49bd(0x21f)]-0x1,_0x1e6e60;_0x10e348>=0x0;_0x10e348--)(_0x1e6e60=_0x8c1f87[_0x10e348])&&(_0x40d63d=_0x1e6e60(_0x40d63d)||_0x40d63d);return _0x40d63d;},O=(_0x16c76a,_0x39a1b3)=>(_0x32aed6,_0x573215)=>_0x39a1b3(_0x32aed6,_0x573215,_0x16c76a),N=(_0x501822,_0x25f780,_0xde2ecf)=>Z(_0x501822,typeof _0x25f780!=_0x528a9f(0x21c)?_0x25f780+'':_0x25f780,_0xde2ecf);function _0x22fc(_0x5ccc09,_0x3e818c){const _0x52c716=_0x52c7();return _0x22fc=function(_0x22fc16,_0x29e243){_0x22fc16=_0x22fc16-0x1c5;let _0x53435e=_0x52c716[_0x22fc16];return _0x53435e;},_0x22fc(_0x5ccc09,_0x3e818c);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x528a9f(0x1fd)]{constructor(_0x182f21=D,_0xf67d75,_0x27d8ff){const _0x1ee348=_0x528a9f;super(),this[_0x1ee348(0x23c)]=_0x182f21,this[_0x1ee348(0x1fe)]=_0xf67d75,this[_0x1ee348(0x1fa)]=_0x27d8ff;const {..._0x5d5d09}=c['merge']({},D,this[_0x1ee348(0x23c)]);this[_0x1ee348(0x1fa)][_0x1ee348(0x223)](q,_0x5d5d09);}[_0x528a9f(0x23f)](){const _0x20ffc3=_0x528a9f;[[g],[C],[p]][_0x20ffc3(0x1d4)](_0x4ca1d1=>{const _0x365cf7=_0x20ffc3;this['_injector'][_0x365cf7(0x1ee)](_0x4ca1d1);});}[_0x528a9f(0x22a)](){const _0x5e2dd8=_0x528a9f;this[_0x5e2dd8(0x1fe)][_0x5e2dd8(0x1eb)](C),this[_0x5e2dd8(0x1fe)][_0x5e2dd8(0x1eb)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x528a9f(0x220),U),N(exports[_0x528a9f(0x1d7)],_0x528a9f(0x1cb),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x528a9f(0x1ff)](j['UniverThreadCommentUIPlugin'],b[_0x528a9f(0x207)],T[_0x528a9f(0x228)]),O(0x1,c[_0x528a9f(0x237)](c['Injector'])),O(0x2,c[_0x528a9f(0x1ef)])],exports[_0x528a9f(0x1d7)]);
1
+ 'use strict';const _0x1f8df0=_0x9894;(function(_0x17a3e3,_0x336cba){const _0x3a3000=_0x9894,_0x988217=_0x17a3e3();while(!![]){try{const _0x2d5336=parseInt(_0x3a3000(0x218))/0x1+-parseInt(_0x3a3000(0x202))/0x2*(-parseInt(_0x3a3000(0x20e))/0x3)+parseInt(_0x3a3000(0x1ba))/0x4*(parseInt(_0x3a3000(0x1f9))/0x5)+parseInt(_0x3a3000(0x1c3))/0x6*(parseInt(_0x3a3000(0x1eb))/0x7)+parseInt(_0x3a3000(0x21a))/0x8*(parseInt(_0x3a3000(0x1cb))/0x9)+-parseInt(_0x3a3000(0x1d8))/0xa+-parseInt(_0x3a3000(0x1f0))/0xb;if(_0x2d5336===_0x336cba)break;else _0x988217['push'](_0x988217['shift']());}catch(_0x880a17){_0x988217['push'](_0x988217['shift']());}}}(_0x42a0,0x38173));Object[_0x1f8df0(0x1e6)](exports,Symbol[_0x1f8df0(0x214)],{'value':_0x1f8df0(0x1ea)});const b=require(_0x1f8df0(0x216)),T=require(_0x1f8df0(0x1ae)),c=require(_0x1f8df0(0x1ad)),j=require('@univerjs/thread-comment-ui'),M=require(_0x1f8df0(0x1bd)),w=require('rxjs'),P=require(_0x1f8df0(0x1c7)),U=_0x1f8df0(0x203);function _0x42a0(){const _0x19eeea=['/reply','delete','1174074BZSlrt','error','listComments','threadId','@univerjs/network','comment','_threadCommentDataSource','type','9IDAJmv','merge','_threadCommentDataSourceService','add','createTimestamp','_sessionService','solved','syncUpdateMutationToColla','_injector','stringify','Solve','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','930660dCatbG','Reply','_threadCommentModel','_httpService','/list','/add','slice','users','thread-comment-data-source.config','/delete','requireSession','CollaborationSessionService','_commentService','deleteComment','defineProperty','body','IConfigService','symbol','Module','7ulJayo','filter','DependentOn','_config','Plugin','9157236MmCRQC','_configService','saveCommentToSnapshot','/universer-api/user/list','resolveComment','post','userId','getUser','getCurrentUser','435ApFUvD','map','resolved','pluginName','get','userID','UniverLicensePlugin','addComment','/universer-api/comment/unit/','2qiMtQk','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','content','updateComment','getOwnPropertyDescriptor','setConfig','HTTPService','getMemberID','rangeType','_init','UniverThreadCommentDataSourcePlugin','457482RpUQFT','replies','CustomRangeType','Unknown','forEach','UniverThreadCommentUIPlugin','toStringTag','subscribe','@univerjs-pro/collaboration-client','payload','385986tQnten','_initUserSync','1891432nvzpxi','parentId','rangeId','length','size','customRanges','Delete','UNIVER_UNKNOWN','UNRECOGNIZED','onReady','disposeWithMe','Solved','root','Disposable','code','/solved','format','dayjs','@univerjs/core','@univerjs-pro/license','_initDataSource','UserManagerService','_userService','replyId','Add','ThreadCommentModel','UniverCollaborationClientPlugin','addUser','Edit','pipe','Injector','8492PdhMSL','UniverInstanceType','parse','@univerjs/thread-comment','reply','Inject','user'];_0x42a0=function(){return _0x19eeea;};return _0x42a0();}var I=(_0x14ea65=>(_0x14ea65[_0x14ea65[_0x1f8df0(0x1d6)]=0x0]=_0x1f8df0(0x1d6),_0x14ea65[_0x14ea65[_0x1f8df0(0x225)]=0x1]=_0x1f8df0(0x225),_0x14ea65[_0x14ea65[_0x1f8df0(0x222)]=-0x1]='UNRECOGNIZED',_0x14ea65))(I||{}),v=(_0x117dfa=>(_0x117dfa[_0x117dfa[_0x1f8df0(0x211)]=0x0]=_0x1f8df0(0x211),_0x117dfa[_0x117dfa[_0x1f8df0(0x1b3)]=0x1]=_0x1f8df0(0x1b3),_0x117dfa[_0x117dfa['Reply']=0x2]=_0x1f8df0(0x1d9),_0x117dfa[_0x117dfa[_0x1f8df0(0x1b7)]=0x3]=_0x1f8df0(0x1b7),_0x117dfa[_0x117dfa[_0x1f8df0(0x220)]=0x4]='Delete',_0x117dfa[_0x117dfa['Solve']=0x5]=_0x1f8df0(0x1d5),_0x117dfa[_0x117dfa[_0x1f8df0(0x222)]=-0x1]='UNRECOGNIZED',_0x117dfa))(v||{});const f=_0x117fe0=>c['dayjs'](new Date(+_0x117fe0))['format'](_0x1f8df0(0x1d7)),R=async(_0x5ba007,_0x230559)=>{const _0x4ebc34=_0x1f8df0,_0x5e51e2=_0x5ba007[_0x4ebc34(0x1fd)](c[_0x4ebc34(0x1b0)]),_0x341432=_0x5ba007[_0x4ebc34(0x1fd)](P[_0x4ebc34(0x209)]);_0x230559[_0x4ebc34(0x212)](_0x48a5c7=>{const _0x23230a=_0x4ebc34;_0x5e51e2[_0x23230a(0x1f7)](_0x48a5c7)&&_0x230559[_0x23230a(0x1c2)](_0x48a5c7);}),_0x230559[_0x4ebc34(0x21e)]&&(await _0x341432[_0x4ebc34(0x1fd)](_0x4ebc34(0x1f3),{'params':{'userIDs':[..._0x230559]}}))[_0x4ebc34(0x1e7)][_0x4ebc34(0x1df)][_0x4ebc34(0x212)](_0x48e0f0=>{_0x48e0f0&&_0x5e51e2['addUser'](_0x48e0f0);});};var $=Object[_0x1f8df0(0x207)],E=(_0x36574a,_0x580ab3,_0x5632fb,_0x1d3712)=>{const _0x5539ee=_0x1f8df0;for(var _0x3a0c8d=_0x1d3712>0x1?void 0x0:_0x1d3712?$(_0x580ab3,_0x5632fb):_0x580ab3,_0x4d2061=_0x36574a[_0x5539ee(0x21d)]-0x1,_0x4dcbed;_0x4d2061>=0x0;_0x4d2061--)(_0x4dcbed=_0x36574a[_0x4d2061])&&(_0x3a0c8d=_0x4dcbed(_0x3a0c8d)||_0x3a0c8d);return _0x3a0c8d;},S=(_0x55d8d1,_0x4024b6)=>(_0xa6cf8f,_0x5cd992)=>_0x4024b6(_0xa6cf8f,_0x5cd992,_0x55d8d1);let p=class extends c['Disposable']{constructor(_0x515735,_0x2203a6,_0x4db4ea,_0x2d257f){const _0x135c36=_0x1f8df0;super(),this['_commentService']=_0x515735,this[_0x135c36(0x1da)]=_0x2203a6,this['_userService']=_0x4db4ea,this[_0x135c36(0x1d3)]=_0x2d257f,this[_0x135c36(0x20c)](),this['_initUserSync']();}[_0x1f8df0(0x219)](){const _0x9c01a7=_0x1f8df0;this[_0x9c01a7(0x224)](this[_0x9c01a7(0x1da)]['commentUpdate$'][_0x9c01a7(0x1b8)](w['bufferTime'](0x10))[_0x9c01a7(0x215)](_0x4094b5=>{const _0x297b4d=_0x9c01a7,_0x229c17=new Set();_0x4094b5[_0x297b4d(0x212)](_0x1d1557=>{const _0xf22ce0=_0x297b4d;switch(_0x1d1557[_0xf22ce0(0x1ca)]){case'add':{const _0x1a1ba1=_0x1d1557[_0xf22ce0(0x217)]['personId'];_0x229c17['add'](_0x1a1ba1);break;}}}),R(this[_0x297b4d(0x1d3)],_0x229c17);}));}[_0x1f8df0(0x20c)](){const _0xf4ed58=_0x1f8df0;this[_0xf4ed58(0x224)](this[_0xf4ed58(0x1e4)]['commentUpdate$'][_0xf4ed58(0x215)](async _0x1b2093=>{const _0x351407=_0xf4ed58;var _0xcef5de,_0x158aa5,_0x283f85,_0x4865f0;const _0x21b15d=(_0xcef5de=this[_0x351407(0x1da)]['getUnit'](_0x1b2093[_0x351407(0x204)])['find'](_0x1d6732=>_0x1d6732[_0x351407(0x1c6)]===_0x1b2093[_0x351407(0x1c6)]))==null?void 0x0:_0xcef5de[_0x351407(0x226)];if(!_0x21b15d)return;const {unitId:_0x57d984,subUnitId:_0x42bb16}=_0x21b15d;switch(_0x1b2093['user']&&this[_0x351407(0x1b1)][_0x351407(0x1b6)](_0x1b2093[_0x351407(0x1c0)]),_0x1b2093[_0x351407(0x1ca)]){case v[_0x351407(0x1b3)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x57d984,_0x42bb16,{'unitId':_0x57d984,'subUnitId':_0x42bb16,'ref':'','id':_0x1b2093[_0x351407(0x1b2)],'dT':f(+_0x1b2093['createTimestamp']),'threadId':_0x1b2093[_0x351407(0x1c6)],'personId':(_0x283f85=(_0x158aa5=_0x1b2093['user'])==null?void 0x0:_0x158aa5[_0x351407(0x1fe)])!=null?_0x283f85:_0x1b2093[_0x351407(0x1f6)],'text':JSON['parse'](_0x1b2093[_0x351407(0x205)]),'parentId':_0x21b15d['id']});break;}case v[_0x351407(0x220)]:{const _0x1a4515=this[_0x351407(0x1da)]['getComment'](_0x57d984,_0x42bb16,_0x1b2093['replyId']);_0x1a4515&&_0x1a4515[_0x351407(0x21b)]&&this[_0x351407(0x1da)][_0x351407(0x1e5)](_0x57d984,_0x42bb16,_0x1b2093[_0x351407(0x1b2)]);break;}case v[_0x351407(0x1b7)]:{this[_0x351407(0x1da)]['updateComment'](_0x57d984,_0x42bb16,{'commentId':_0x1b2093['replyId'],'text':JSON[_0x351407(0x1bc)](_0x1b2093['content'])});break;}case v[_0x351407(0x1d5)]:{const _0x3b7cc5=(_0x4865f0=this['_threadCommentModel']['getUnit'](_0x1b2093[_0x351407(0x204)])['find'](_0x4896b3=>_0x4896b3['threadId']===_0x1b2093[_0x351407(0x1c6)]))==null?void 0x0:_0x4865f0[_0x351407(0x226)];_0x3b7cc5&&this[_0x351407(0x1da)][_0x351407(0x1f4)](_0x57d984,_0x42bb16,_0x3b7cc5['id'],_0x1b2093['solved']===I[_0x351407(0x225)]);break;}}}));}};p=E([S(0x0,c[_0x1f8df0(0x1bf)](b['CommentService'])),S(0x1,c['Inject'](M[_0x1f8df0(0x1b4)])),S(0x2,c[_0x1f8df0(0x1bf)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1f8df0(0x1b9)]))],p);const q=_0x1f8df0(0x1e0),D={};var A=Object[_0x1f8df0(0x207)],x=(_0x32f36e,_0x15cbb1,_0x656edc,_0x65fb66)=>{const _0x5bebb6=_0x1f8df0;for(var _0x57c54b=_0x65fb66>0x1?void 0x0:_0x65fb66?A(_0x15cbb1,_0x656edc):_0x15cbb1,_0x300e63=_0x32f36e[_0x5bebb6(0x21d)]-0x1,_0x52cec9;_0x300e63>=0x0;_0x300e63--)(_0x52cec9=_0x32f36e[_0x300e63])&&(_0x57c54b=_0x52cec9(_0x57c54b)||_0x57c54b);return _0x57c54b;},_=(_0x570656,_0x3b2880)=>(_0xb3ca5d,_0x3b126c)=>_0x3b2880(_0xb3ca5d,_0x3b126c,_0x570656);function Y(_0x436bde,_0x5edc66){const _0x2e8b95=_0x1f8df0,_0x2c28a0=_0x436bde[_0x2e8b95(0x20f)][0x0];return{..._0x5edc66,'id':_0x2c28a0[_0x2e8b95(0x1b2)],'resolved':_0x436bde[_0x2e8b95(0x1d1)]===0x1,'dT':f(_0x2c28a0['createTimestamp']),'personId':_0x2c28a0[_0x2e8b95(0x1f6)],'threadId':_0x2c28a0[_0x2e8b95(0x1c6)]};}function G(_0x5d1133,_0x19c04e,_0x150fc7){const _0x41ded9=_0x1f8df0;var _0x568e77,_0x1bbde8;if(((_0x1bbde8=(_0x568e77=_0x5d1133==null?void 0x0:_0x5d1133['replies'])==null?void 0x0:_0x568e77[_0x41ded9(0x21d)])!=null?_0x1bbde8:0x0)>0x0){const _0x2fe41d=(_0x5f01b9,_0x1d6117)=>({'id':_0x5f01b9[_0x41ded9(0x1b2)],'threadId':_0x5f01b9['threadId'],'dT':f(_0x5f01b9[_0x41ded9(0x1cf)]),'personId':_0x5f01b9['userId'],'resolved':_0x5d1133[_0x41ded9(0x1d1)]===I['Solved'],'unitId':_0x19c04e,'subUnitId':_0x150fc7,'text':JSON[_0x41ded9(0x1bc)](_0x5f01b9[_0x41ded9(0x205)]),'parentId':_0x1d6117}),_0x1299e9=_0x2fe41d(_0x5d1133[_0x41ded9(0x20f)][0x0]);return{..._0x1299e9,'children':_0x5d1133['replies'][_0x41ded9(0x1de)](0x1)[_0x41ded9(0x1fa)](_0x3bac1a=>_0x2fe41d(_0x3bac1a,_0x1299e9['id']))};}return null;}let g=class{constructor(_0x40d1e7,_0x33cf0d,_0x13de43,_0x574326){const _0x4572eb=_0x1f8df0;this[_0x4572eb(0x1db)]=_0x40d1e7,this[_0x4572eb(0x1b1)]=_0x33cf0d,this['_sessionService']=_0x13de43,this[_0x4572eb(0x1d3)]=_0x574326;}async[_0x1f8df0(0x200)](_0x13be57){const _0x48dc1e=_0x1f8df0;var _0x1722bf,_0x7c5b97;const {parentId:_0x5d1a06,unitId:_0x2af467,text:_0x5a6555,threadId:_0x2500ae}=_0x13be57,_0x89c717=(_0x7c5b97=(_0x1722bf=_0x5a6555[_0x48dc1e(0x21f)])==null?void 0x0:_0x1722bf[_0x48dc1e(0x1ec)](_0x6ca0e3=>_0x6ca0e3[_0x48dc1e(0x20b)]===c[_0x48dc1e(0x210)]['COMMENT'])[_0x48dc1e(0x1fa)](_0x17ec53=>_0x17ec53[_0x48dc1e(0x21c)]))!=null?_0x7c5b97:[],_0x3c6919=JSON[_0x48dc1e(0x1d4)](_0x5a6555),_0x4b2682=(await this['_sessionService'][_0x48dc1e(0x1e2)](_0x2af467))[_0x48dc1e(0x20a)]();if(_0x5d1a06){const _0x10ba79={'memberId':_0x4b2682,'unitId':_0x2af467,'content':_0x3c6919,'mention':_0x89c717,'threadId':_0x2500ae},_0x2c7258=(await this[_0x48dc1e(0x1db)]['post']('/universer-api/comment/unit/'+_0x2af467+_0x48dc1e(0x1c1),{'body':_0x10ba79}))[_0x48dc1e(0x1e7)][_0x48dc1e(0x1be)];return{..._0x13be57,'id':_0x2c7258[_0x48dc1e(0x1b2)],'dT':c[_0x48dc1e(0x1ac)](+_0x2c7258[_0x48dc1e(0x1cf)])[_0x48dc1e(0x1ab)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c7258[_0x48dc1e(0x1f6)]};}else{const _0x20d4ca={'memberId':_0x4b2682,'unitId':_0x2af467,'content':_0x3c6919,'mention':_0x89c717},_0x551e1d=await this[_0x48dc1e(0x1db)]['post'](_0x48dc1e(0x201)+_0x2af467+_0x48dc1e(0x1dd),{'body':_0x20d4ca});return Y(_0x551e1d[_0x48dc1e(0x1e7)][_0x48dc1e(0x1c8)],_0x13be57);}}async[_0x1f8df0(0x206)](_0x50230a){const _0x50ab92=_0x1f8df0;var _0x3130c0,_0xf1f640;const {text:_0x258986,unitId:_0x258188}=_0x50230a,_0x196fc5=(_0xf1f640=(_0x3130c0=_0x258986[_0x50ab92(0x21f)])==null?void 0x0:_0x3130c0[_0x50ab92(0x1ec)](_0x3cc207=>_0x3cc207[_0x50ab92(0x20b)]===c[_0x50ab92(0x210)]['COMMENT'])[_0x50ab92(0x1fa)](_0x6a17b3=>_0x6a17b3[_0x50ab92(0x21c)]))!=null?_0xf1f640:[],_0x4f03a0=JSON[_0x50ab92(0x1d4)](_0x258986),_0x5d4478=_0x50230a[_0x50ab92(0x1c6)],_0x5668ca=_0x50230a['id'],_0x1d9bfe={'memberId':(await this[_0x50ab92(0x1d0)][_0x50ab92(0x1e2)](_0x258188))['getMemberID'](),'unitId':_0x258188,'threadId':_0x5d4478,'mention':_0x196fc5,'content':_0x4f03a0,'replyId':_0x5668ca},_0x5bf25a=await this['_httpService'][_0x50ab92(0x1f5)](_0x50ab92(0x201)+_0x258188+'/edit',{'body':_0x1d9bfe});return!_0x5bf25a[_0x50ab92(0x1e7)]['error']||_0x5bf25a[_0x50ab92(0x1e7)][_0x50ab92(0x1c4)][_0x50ab92(0x1a9)]===0x1;}async['resolveComment'](_0x3b05bd){const _0x5b2a67=_0x1f8df0,{unitId:_0x270cd6}=_0x3b05bd,_0x94e1dc=_0x3b05bd[_0x5b2a67(0x1c6)],_0x37f5b4={'memberId':this[_0x5b2a67(0x1b1)][_0x5b2a67(0x1f8)]()[_0x5b2a67(0x1fe)],'unitId':_0x270cd6,'threadId':_0x94e1dc,'solved':_0x3b05bd[_0x5b2a67(0x1fb)]?I['Solved']:I[_0x5b2a67(0x1d6)]},_0x4f2033=await this[_0x5b2a67(0x1db)][_0x5b2a67(0x1f5)](_0x5b2a67(0x201)+_0x270cd6+_0x5b2a67(0x1aa),{'body':_0x37f5b4});return!_0x4f2033['body']['error']||_0x4f2033['body'][_0x5b2a67(0x1c4)][_0x5b2a67(0x1a9)]===0x1;}async[_0x1f8df0(0x1e5)](_0x18b054,_0x7965d6,_0x10571b,_0x288af8){const _0x3bf8f5=_0x1f8df0,_0x4a5233={'memberId':(await this[_0x3bf8f5(0x1d0)][_0x3bf8f5(0x1e2)](_0x18b054))['getMemberID'](),'threadId':_0x10571b,'replyId':_0x288af8,'unitId':_0x18b054},_0x1a794e=await this[_0x3bf8f5(0x1db)]['post']('/universer-api/comment/unit/'+_0x18b054+_0x3bf8f5(0x1e1),{'body':_0x4a5233});return!_0x1a794e[_0x3bf8f5(0x1e7)]['error']||_0x1a794e[_0x3bf8f5(0x1e7)][_0x3bf8f5(0x1c4)][_0x3bf8f5(0x1a9)]===0x1;}async[_0x1f8df0(0x1c5)](_0x2a1bc4,_0x276c2b,_0x31083e){const _0x3eaab5=_0x1f8df0,_0x2efc3d={'unitId':_0x2a1bc4,'threadId':_0x31083e},_0x95694c=await this[_0x3eaab5(0x1db)][_0x3eaab5(0x1f5)](_0x3eaab5(0x201)+_0x2a1bc4+_0x3eaab5(0x1dc),{'body':_0x2efc3d}),_0x262f99=_0x31083e['map'](_0x1b5e4f=>G(_0x95694c[_0x3eaab5(0x1e7)]['comments'][_0x1b5e4f],_0x2a1bc4,_0x276c2b))[_0x3eaab5(0x1ec)](Boolean);return Object['values'](_0x95694c[_0x3eaab5(0x1e7)][_0x3eaab5(0x1df)])[_0x3eaab5(0x212)](_0x3b6b25=>{const _0x414f30=_0x3eaab5;this[_0x414f30(0x1b1)]['addUser'](_0x3b6b25);}),_0x262f99;}[_0x1f8df0(0x1f2)](_0x505966){const _0x5612=_0x1f8df0;return{'id':_0x505966['id'],'threadId':_0x505966[_0x5612(0x1c6)],'ref':_0x505966['ref']};}};g=x([_(0x0,c[_0x1f8df0(0x1bf)](P[_0x1f8df0(0x209)])),_(0x1,c[_0x1f8df0(0x1bf)](c[_0x1f8df0(0x1b0)])),_(0x2,c['Inject'](b[_0x1f8df0(0x1e3)])),_(0x3,c[_0x1f8df0(0x1bf)](c[_0x1f8df0(0x1b9)]))],g);var H=Object[_0x1f8df0(0x207)],J=(_0x347c65,_0x19ef1d,_0x15b7ed,_0x1579d3)=>{for(var _0x33b8cc=_0x1579d3>0x1?void 0x0:_0x1579d3?H(_0x19ef1d,_0x15b7ed):_0x19ef1d,_0x317a4b=_0x347c65['length']-0x1,_0x481486;_0x317a4b>=0x0;_0x317a4b--)(_0x481486=_0x347c65[_0x317a4b])&&(_0x33b8cc=_0x481486(_0x33b8cc)||_0x33b8cc);return _0x33b8cc;},y=(_0x50e9a4,_0x43a352)=>(_0xebac86,_0x1bcece)=>_0x43a352(_0xebac86,_0x1bcece,_0x50e9a4);function _0x9894(_0x44ceac,_0x461ea3){const _0x42a094=_0x42a0();return _0x9894=function(_0x989471,_0x54545a){_0x989471=_0x989471-0x1a9;let _0x4d8170=_0x42a094[_0x989471];return _0x4d8170;},_0x9894(_0x44ceac,_0x461ea3);}let C=class extends c[_0x1f8df0(0x227)]{constructor(_0x5ad7cb,_0x35d25b){const _0xdad0bc=_0x1f8df0;super(),this[_0xdad0bc(0x1cd)]=_0x5ad7cb,this['_threadCommentDataSource']=_0x35d25b,this[_0xdad0bc(0x1af)]();}['_initDataSource'](){const _0x181b5e=_0x1f8df0;this[_0x181b5e(0x1cd)]['dataSource']=this[_0x181b5e(0x1c9)],this['_threadCommentDataSourceService'][_0x181b5e(0x1d2)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1f8df0(0x1bf)](g))],C);var F=Object['defineProperty'],L=Object[_0x1f8df0(0x207)],Z=(_0x194945,_0x5aff0e,_0xd2cf6)=>_0x5aff0e in _0x194945?F(_0x194945,_0x5aff0e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd2cf6}):_0x194945[_0x5aff0e]=_0xd2cf6,W=(_0x47855b,_0x54e761,_0x51a673,_0x80bf7d)=>{const _0x18437b=_0x1f8df0;for(var _0x3479d4=_0x80bf7d>0x1?void 0x0:_0x80bf7d?L(_0x54e761,_0x51a673):_0x54e761,_0x122081=_0x47855b[_0x18437b(0x21d)]-0x1,_0x4a8d8d;_0x122081>=0x0;_0x122081--)(_0x4a8d8d=_0x47855b[_0x122081])&&(_0x3479d4=_0x4a8d8d(_0x3479d4)||_0x3479d4);return _0x3479d4;},O=(_0x1b8ebe,_0x4b006e)=>(_0x2dddd2,_0x82c290)=>_0x4b006e(_0x2dddd2,_0x82c290,_0x1b8ebe),N=(_0x127207,_0x585ea0,_0x47bdba)=>Z(_0x127207,typeof _0x585ea0!=_0x1f8df0(0x1e9)?_0x585ea0+'':_0x585ea0,_0x47bdba);exports[_0x1f8df0(0x20d)]=class extends c[_0x1f8df0(0x1ef)]{constructor(_0x56af45=D,_0x1d6b42,_0xb263a7){const _0x2014fc=_0x1f8df0;super(),this[_0x2014fc(0x1ee)]=_0x56af45,this[_0x2014fc(0x1d3)]=_0x1d6b42,this['_configService']=_0xb263a7;const {..._0x3304a8}=c[_0x2014fc(0x1cc)]({},D,this['_config']);this[_0x2014fc(0x1f1)][_0x2014fc(0x208)](q,_0x3304a8);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x377ac7=>{const _0x2ef4ff=_0x9894;this[_0x2ef4ff(0x1d3)][_0x2ef4ff(0x1ce)](_0x377ac7);});}[_0x1f8df0(0x223)](){const _0x4965c1=_0x1f8df0;this['_injector'][_0x4965c1(0x1fd)](C),this['_injector'][_0x4965c1(0x1fd)](p);}},N(exports[_0x1f8df0(0x20d)],_0x1f8df0(0x1fc),U),N(exports[_0x1f8df0(0x20d)],'type',c[_0x1f8df0(0x1bb)][_0x1f8df0(0x221)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1f8df0(0x1ed)](j[_0x1f8df0(0x213)],b[_0x1f8df0(0x1b5)],T[_0x1f8df0(0x1ff)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x1f8df0(0x1e8)])],exports[_0x1f8df0(0x20d)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x32e807=_0x4476;(function(_0x196e4b,_0x53f5c8){const _0x14fb33=_0x4476,_0x203376=_0x196e4b();while(!![]){try{const _0x514d95=-parseInt(_0x14fb33(0x170))/0x1+-parseInt(_0x14fb33(0x163))/0x2+parseInt(_0x14fb33(0x186))/0x3*(parseInt(_0x14fb33(0x14d))/0x4)+parseInt(_0x14fb33(0x167))/0x5*(-parseInt(_0x14fb33(0x1a1))/0x6)+parseInt(_0x14fb33(0x19e))/0x7*(-parseInt(_0x14fb33(0x182))/0x8)+parseInt(_0x14fb33(0x141))/0x9+-parseInt(_0x14fb33(0x19b))/0xa*(-parseInt(_0x14fb33(0x196))/0xb);if(_0x514d95===_0x53f5c8)break;else _0x203376['push'](_0x203376['shift']());}catch(_0x3a5873){_0x203376['push'](_0x203376['shift']());}}}(_0x1bce,0x647c4));import{CommentService as _0x12f7f5,CollaborationSessionService as _0x307a0a,UniverCollaborationClientPlugin as _0x40e60c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcfd646}from'@univerjs-pro/license';import{dayjs as _0xa47b16,UserManagerService as _0x3a2f14,Inject as _0x2829ff,Injector as _0x2a4fc8,Disposable as _0x2e1c60,CustomRangeType as _0x5d6a87,UniverInstanceType as _0xd4c5e1,DependentOn as _0xe03605,IConfigService as _0x5c82ef,Plugin as _0x5d5f99,merge as _0x1eb38a}from'@univerjs/core';function _0x1bce(){const _0x2b93a9=['73636LCOYQF','userID','replyId','type','25uWlVaF','users','Solve','/reply','_threadCommentDataSourceService','setConfig','addUser','_initUserSync','_initDataSource','247326ttyqTa','format','add','forEach','/solved','syncUpdateMutationToColla','get','rangeType','stringify','find','/add','_config','resolveComment','_userService','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','defineProperty','641848dqYYHn','size','code','user','9pMggjU','_init','saveCommentToSnapshot','Solved','comment','unitId','userId','symbol','body','_httpService','getOwnPropertyDescriptor','comments','personId','Delete','createTimestamp','_sessionService','9097GZJPGv','addComment','Reply','onReady','commentUpdate$','5180XeWhLs','parse','/delete','7yTFnRh','solved','_threadCommentModel','85842lSwjTI','map','delete','_commentService','getUnit','/universer-api/user/list','570699YQiMKp','UNRECOGNIZED','reply','subscribe','_injector','requireSession','threadId','payload','/universer-api/comment/unit/','dataSource','YYYY/MM/DD\x20HH:mm','/edit','474268XPBGtP','length','rangeId','filter','deleteComment','OpenOrReOpen','customRanges','getMemberID','content','disposeWithMe','pluginName','COMMENT','Unknown','getUser','replies','error','values','listComments','Edit','Add','onStarting','post'];_0x1bce=function(){return _0x2b93a9;};return _0x1bce();}import{UniverThreadCommentUIPlugin as _0x2bfb63}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cc6a8,IThreadCommentDataSourceService as _0x3047aa}from'@univerjs/thread-comment';import{bufferTime as _0x314186}from'rxjs';import{HTTPService as _0x382c33}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a95a7=>(_0x3a95a7[_0x3a95a7[_0x32e807(0x152)]=0x0]='OpenOrReOpen',_0x3a95a7[_0x3a95a7[_0x32e807(0x189)]=0x1]=_0x32e807(0x189),_0x3a95a7[_0x3a95a7[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x3a95a7))(I||{}),v=(_0x5a05af=>(_0x5a05af[_0x5a05af[_0x32e807(0x159)]=0x0]=_0x32e807(0x159),_0x5a05af[_0x5a05af[_0x32e807(0x160)]=0x1]=_0x32e807(0x160),_0x5a05af[_0x5a05af[_0x32e807(0x198)]=0x2]='Reply',_0x5a05af[_0x5a05af['Edit']=0x3]='Edit',_0x5a05af[_0x5a05af[_0x32e807(0x193)]=0x4]=_0x32e807(0x193),_0x5a05af[_0x5a05af[_0x32e807(0x169)]=0x5]='Solve',_0x5a05af[_0x5a05af[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x5a05af))(v||{});const D=_0x91474b=>_0xa47b16(new Date(+_0x91474b))[_0x32e807(0x171)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c3f24,_0x219510)=>{const _0x483072=_0x32e807,_0x4f5f0d=_0x4c3f24[_0x483072(0x176)](_0x3a2f14),_0x53b718=_0x4c3f24['get'](_0x382c33);_0x219510[_0x483072(0x173)](_0x2137f8=>{const _0x15a67d=_0x483072;_0x4f5f0d[_0x15a67d(0x15a)](_0x2137f8)&&_0x219510[_0x15a67d(0x1a3)](_0x2137f8);}),_0x219510[_0x483072(0x183)]&&(await _0x53b718[_0x483072(0x176)](_0x483072(0x140),{'params':{'userIDs':[..._0x219510]}}))[_0x483072(0x18e)][_0x483072(0x168)]['forEach'](_0x242d2e=>{const _0x50326b=_0x483072;_0x242d2e&&_0x4f5f0d[_0x50326b(0x16d)](_0x242d2e);});};var K=Object[_0x32e807(0x190)],V=(_0x154698,_0x4459af,_0x288650,_0x323267)=>{const _0xf55b8f=_0x32e807;for(var _0x3d4b83=_0x323267>0x1?void 0x0:_0x323267?K(_0x4459af,_0x288650):_0x4459af,_0x567c79=_0x154698[_0xf55b8f(0x14e)]-0x1,_0x237049;_0x567c79>=0x0;_0x567c79--)(_0x237049=_0x154698[_0x567c79])&&(_0x3d4b83=_0x237049(_0x3d4b83)||_0x3d4b83);return _0x3d4b83;},p=(_0x33dad5,_0x139e2c)=>(_0x399b49,_0x248c7b)=>_0x139e2c(_0x399b49,_0x248c7b,_0x33dad5);let S=class extends _0x2e1c60{constructor(_0x2cd379,_0x28a325,_0x1860e8,_0x241e90){const _0x459d88=_0x32e807;super(),this[_0x459d88(0x1a4)]=_0x2cd379,this[_0x459d88(0x1a0)]=_0x28a325,this[_0x459d88(0x17d)]=_0x1860e8,this[_0x459d88(0x145)]=_0x241e90,this[_0x459d88(0x187)](),this['_initUserSync']();}[_0x32e807(0x16e)](){const _0x5f18f0=_0x32e807;this[_0x5f18f0(0x156)](this[_0x5f18f0(0x1a0)]['commentUpdate$']['pipe'](_0x314186(0x10))[_0x5f18f0(0x144)](_0x4a9db1=>{const _0x21681b=new Set();_0x4a9db1['forEach'](_0x4d98b0=>{const _0x49f3ed=_0x4476;switch(_0x4d98b0[_0x49f3ed(0x166)]){case _0x49f3ed(0x172):{const _0xa701b3=_0x4d98b0[_0x49f3ed(0x148)][_0x49f3ed(0x192)];_0x21681b[_0x49f3ed(0x172)](_0xa701b3);break;}}}),B(this['_injector'],_0x21681b);}));}[_0x32e807(0x187)](){const _0x221b32=_0x32e807;this[_0x221b32(0x156)](this['_commentService'][_0x221b32(0x19a)][_0x221b32(0x144)](async _0x1ed94b=>{const _0x1e4463=_0x221b32;var _0x2c37f5,_0x2f251b,_0x3ef3e4,_0x17c7ca;const _0xaafa6d=(_0x2c37f5=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b[_0x1e4463(0x18b)])[_0x1e4463(0x179)](_0x2ace29=>_0x2ace29['threadId']===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x2c37f5['root'];if(!_0xaafa6d)return;const {unitId:_0x4bce15,subUnitId:_0x5c9007}=_0xaafa6d;switch(_0x1ed94b[_0x1e4463(0x185)]&&this['_userService'][_0x1e4463(0x16d)](_0x1ed94b['user']),_0x1ed94b[_0x1e4463(0x166)]){case v[_0x1e4463(0x160)]:break;case v[_0x1e4463(0x198)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x197)](_0x4bce15,_0x5c9007,{'unitId':_0x4bce15,'subUnitId':_0x5c9007,'ref':'','id':_0x1ed94b[_0x1e4463(0x165)],'dT':D(+_0x1ed94b['createTimestamp']),'threadId':_0x1ed94b[_0x1e4463(0x147)],'personId':(_0x3ef3e4=(_0x2f251b=_0x1ed94b[_0x1e4463(0x185)])==null?void 0x0:_0x2f251b[_0x1e4463(0x164)])!=null?_0x3ef3e4:_0x1ed94b['userId'],'text':JSON['parse'](_0x1ed94b[_0x1e4463(0x155)]),'parentId':_0xaafa6d['id']});break;}case v['Delete']:{const _0x412077=this[_0x1e4463(0x1a0)]['getComment'](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);_0x412077&&_0x412077['parentId']&&this[_0x1e4463(0x1a0)][_0x1e4463(0x151)](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);break;}case v[_0x1e4463(0x15f)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x17f)](_0x4bce15,_0x5c9007,{'commentId':_0x1ed94b[_0x1e4463(0x165)],'text':JSON[_0x1e4463(0x19c)](_0x1ed94b[_0x1e4463(0x155)])});break;}case v['Solve']:{const _0x9d9a8f=(_0x17c7ca=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b['unitId'])[_0x1e4463(0x179)](_0x5e87b=>_0x5e87b[_0x1e4463(0x147)]===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x17c7ca['root'];_0x9d9a8f&&this[_0x1e4463(0x1a0)][_0x1e4463(0x17c)](_0x4bce15,_0x5c9007,_0x9d9a8f['id'],_0x1ed94b[_0x1e4463(0x19f)]===I[_0x1e4463(0x189)]);break;}}}));}};S=V([p(0x0,_0x2829ff(_0x12f7f5)),p(0x1,_0x2829ff(_0x3cc6a8)),p(0x2,_0x2829ff(_0x3a2f14)),p(0x3,_0x2829ff(_0x2a4fc8))],S);function _0x4476(_0x2d2148,_0x46df1f){const _0x1bcefa=_0x1bce();return _0x4476=function(_0x44764f,_0x1aecd0){_0x44764f=_0x44764f-0x13f;let _0x1a0903=_0x1bcefa[_0x44764f];return _0x1a0903;},_0x4476(_0x2d2148,_0x46df1f);}const z='thread-comment-data-source.config',M={};var k=Object[_0x32e807(0x190)],Q=(_0x185955,_0x1b8521,_0x1aefcf,_0x40c70b)=>{const _0x23888e=_0x32e807;for(var _0x4cbd4e=_0x40c70b>0x1?void 0x0:_0x40c70b?k(_0x1b8521,_0x1aefcf):_0x1b8521,_0x3f9b78=_0x185955[_0x23888e(0x14e)]-0x1,_0x5d33bd;_0x3f9b78>=0x0;_0x3f9b78--)(_0x5d33bd=_0x185955[_0x3f9b78])&&(_0x4cbd4e=_0x5d33bd(_0x4cbd4e)||_0x4cbd4e);return _0x4cbd4e;},_=(_0x2dc7ed,_0x507198)=>(_0x391d90,_0x394dd3)=>_0x507198(_0x391d90,_0x394dd3,_0x2dc7ed);function X(_0x1080f0,_0x19b150){const _0x3a20bf=_0x32e807,_0x14717a=_0x1080f0['replies'][0x0];return{..._0x19b150,'id':_0x14717a[_0x3a20bf(0x165)],'resolved':_0x1080f0[_0x3a20bf(0x19f)]===0x1,'dT':D(_0x14717a[_0x3a20bf(0x194)]),'personId':_0x14717a['userId'],'threadId':_0x14717a[_0x3a20bf(0x147)]};}function ee(_0x14a8f9,_0x51acfd,_0x5c98eb){const _0x44ba27=_0x32e807;var _0x5490de,_0x51ce0e;if(((_0x51ce0e=(_0x5490de=_0x14a8f9==null?void 0x0:_0x14a8f9[_0x44ba27(0x15b)])==null?void 0x0:_0x5490de[_0x44ba27(0x14e)])!=null?_0x51ce0e:0x0)>0x0){const _0x30de3c=(_0x182695,_0x4ed258)=>({'id':_0x182695['replyId'],'threadId':_0x182695[_0x44ba27(0x147)],'dT':D(_0x182695[_0x44ba27(0x194)]),'personId':_0x182695['userId'],'resolved':_0x14a8f9[_0x44ba27(0x19f)]===I[_0x44ba27(0x189)],'unitId':_0x51acfd,'subUnitId':_0x5c98eb,'text':JSON[_0x44ba27(0x19c)](_0x182695[_0x44ba27(0x155)]),'parentId':_0x4ed258}),_0x4f224e=_0x30de3c(_0x14a8f9[_0x44ba27(0x15b)][0x0]);return{..._0x4f224e,'children':_0x14a8f9[_0x44ba27(0x15b)]['slice'](0x1)[_0x44ba27(0x1a2)](_0x258445=>_0x30de3c(_0x258445,_0x4f224e['id']))};}return null;}let f=class{constructor(_0x21c918,_0x5d2f6e,_0x49539f,_0x455f1f){const _0xe8d59e=_0x32e807;this[_0xe8d59e(0x18f)]=_0x21c918,this[_0xe8d59e(0x17d)]=_0x5d2f6e,this[_0xe8d59e(0x195)]=_0x49539f,this['_injector']=_0x455f1f;}async[_0x32e807(0x197)](_0x92fc1){const _0x25cd56=_0x32e807;var _0x3b05de,_0x2406a8;const {parentId:_0x24040e,unitId:_0x4d11c1,text:_0x456396,threadId:_0x5b115f}=_0x92fc1,_0xdfff1d=(_0x2406a8=(_0x3b05de=_0x456396[_0x25cd56(0x153)])==null?void 0x0:_0x3b05de['filter'](_0x5c41ca=>_0x5c41ca[_0x25cd56(0x177)]===_0x5d6a87[_0x25cd56(0x158)])[_0x25cd56(0x1a2)](_0x4dd386=>_0x4dd386[_0x25cd56(0x14f)]))!=null?_0x2406a8:[],_0x34eb7c=JSON[_0x25cd56(0x178)](_0x456396),_0x3643dc=(await this[_0x25cd56(0x195)]['requireSession'](_0x4d11c1))[_0x25cd56(0x154)]();if(_0x24040e){const _0x5445ab={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d,'threadId':_0x5b115f},_0xf10b74=(await this[_0x25cd56(0x18f)][_0x25cd56(0x162)](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x16a),{'body':_0x5445ab}))[_0x25cd56(0x18e)][_0x25cd56(0x143)];return{..._0x92fc1,'id':_0xf10b74[_0x25cd56(0x165)],'dT':_0xa47b16(+_0xf10b74[_0x25cd56(0x194)])['format'](_0x25cd56(0x14b)),'personId':_0xf10b74[_0x25cd56(0x18c)]};}else{const _0x57ff6a={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d},_0x3a3072=await this[_0x25cd56(0x18f)]['post'](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x17a),{'body':_0x57ff6a});return X(_0x3a3072[_0x25cd56(0x18e)][_0x25cd56(0x18a)],_0x92fc1);}}async['updateComment'](_0x55c954){const _0x45ea3d=_0x32e807;var _0x2e9d1f,_0xf1f4e9;const {text:_0x512393,unitId:_0x482091}=_0x55c954,_0x2066f5=(_0xf1f4e9=(_0x2e9d1f=_0x512393[_0x45ea3d(0x153)])==null?void 0x0:_0x2e9d1f[_0x45ea3d(0x150)](_0x104c9a=>_0x104c9a[_0x45ea3d(0x177)]===_0x5d6a87['COMMENT'])[_0x45ea3d(0x1a2)](_0x2e7e89=>_0x2e7e89[_0x45ea3d(0x14f)]))!=null?_0xf1f4e9:[],_0x422c9e=JSON['stringify'](_0x512393),_0x575cd7=_0x55c954[_0x45ea3d(0x147)],_0x2d5f61=_0x55c954['id'],_0x5b5b08={'memberId':(await this[_0x45ea3d(0x195)]['requireSession'](_0x482091))[_0x45ea3d(0x154)](),'unitId':_0x482091,'threadId':_0x575cd7,'mention':_0x2066f5,'content':_0x422c9e,'replyId':_0x2d5f61},_0x4c6a88=await this[_0x45ea3d(0x18f)][_0x45ea3d(0x162)](_0x45ea3d(0x149)+_0x482091+_0x45ea3d(0x14c),{'body':_0x5b5b08});return!_0x4c6a88[_0x45ea3d(0x18e)][_0x45ea3d(0x15c)]||_0x4c6a88['body'][_0x45ea3d(0x15c)][_0x45ea3d(0x184)]===0x1;}async[_0x32e807(0x17c)](_0x2f7daf){const _0x89ad27=_0x32e807,{unitId:_0x40e601}=_0x2f7daf,_0xea795b=_0x2f7daf[_0x89ad27(0x147)],_0x31ffa6={'memberId':this[_0x89ad27(0x17d)]['getCurrentUser']()[_0x89ad27(0x164)],'unitId':_0x40e601,'threadId':_0xea795b,'solved':_0x2f7daf['resolved']?I['Solved']:I[_0x89ad27(0x152)]},_0x141238=await this[_0x89ad27(0x18f)][_0x89ad27(0x162)]('/universer-api/comment/unit/'+_0x40e601+_0x89ad27(0x174),{'body':_0x31ffa6});return!_0x141238['body']['error']||_0x141238['body'][_0x89ad27(0x15c)][_0x89ad27(0x184)]===0x1;}async[_0x32e807(0x151)](_0x4bd2ae,_0x1b2fb7,_0x46c209,_0x419a4b){const _0x53c921=_0x32e807,_0x90d404={'memberId':(await this['_sessionService'][_0x53c921(0x146)](_0x4bd2ae))['getMemberID'](),'threadId':_0x46c209,'replyId':_0x419a4b,'unitId':_0x4bd2ae},_0x3b8728=await this[_0x53c921(0x18f)][_0x53c921(0x162)]('/universer-api/comment/unit/'+_0x4bd2ae+_0x53c921(0x19d),{'body':_0x90d404});return!_0x3b8728[_0x53c921(0x18e)][_0x53c921(0x15c)]||_0x3b8728[_0x53c921(0x18e)]['error'][_0x53c921(0x184)]===0x1;}async[_0x32e807(0x15e)](_0x3e1ab3,_0x548a8c,_0x125fd7){const _0x82f234=_0x32e807,_0x1bc0b3={'unitId':_0x3e1ab3,'threadId':_0x125fd7},_0x19b85d=await this['_httpService'][_0x82f234(0x162)]('/universer-api/comment/unit/'+_0x3e1ab3+'/list',{'body':_0x1bc0b3}),_0x301a64=_0x125fd7[_0x82f234(0x1a2)](_0x5e6c98=>ee(_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x191)][_0x5e6c98],_0x3e1ab3,_0x548a8c))['filter'](Boolean);return Object[_0x82f234(0x15d)](_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x168)])[_0x82f234(0x173)](_0xdf3a61=>{this['_userService']['addUser'](_0xdf3a61);}),_0x301a64;}[_0x32e807(0x188)](_0x4e174e){const _0x37d5ce=_0x32e807;return{'id':_0x4e174e['id'],'threadId':_0x4e174e[_0x37d5ce(0x147)],'ref':_0x4e174e['ref']};}};f=Q([_(0x0,_0x2829ff(_0x382c33)),_(0x1,_0x2829ff(_0x3a2f14)),_(0x2,_0x2829ff(_0x307a0a)),_(0x3,_0x2829ff(_0x2a4fc8))],f);var re=Object[_0x32e807(0x190)],te=(_0x27fe5e,_0x2986c1,_0x43f4e4,_0x375d69)=>{const _0x335fc1=_0x32e807;for(var _0x2a480e=_0x375d69>0x1?void 0x0:_0x375d69?re(_0x2986c1,_0x43f4e4):_0x2986c1,_0x4c574e=_0x27fe5e[_0x335fc1(0x14e)]-0x1,_0x17ac10;_0x4c574e>=0x0;_0x4c574e--)(_0x17ac10=_0x27fe5e[_0x4c574e])&&(_0x2a480e=_0x17ac10(_0x2a480e)||_0x2a480e);return _0x2a480e;},N=(_0x3dd2ac,_0x5151d6)=>(_0x4b3fe7,_0x55bc28)=>_0x5151d6(_0x4b3fe7,_0x55bc28,_0x3dd2ac);let g=class extends _0x2e1c60{constructor(_0x2a7e7e,_0x32d749){const _0x4ec5c7=_0x32e807;super(),this[_0x4ec5c7(0x16b)]=_0x2a7e7e,this['_threadCommentDataSource']=_0x32d749,this[_0x4ec5c7(0x16f)]();}[_0x32e807(0x16f)](){const _0x519bab=_0x32e807;this[_0x519bab(0x16b)][_0x519bab(0x14a)]=this[_0x519bab(0x17e)],this[_0x519bab(0x16b)][_0x519bab(0x175)]=!0x1;}};g=te([N(0x0,_0x3047aa),N(0x1,_0x2829ff(f))],g);var se=Object[_0x32e807(0x181)],oe=Object[_0x32e807(0x190)],ne=(_0x4d954b,_0x5666fe,_0x1fec59)=>_0x5666fe in _0x4d954b?se(_0x4d954b,_0x5666fe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fec59}):_0x4d954b[_0x5666fe]=_0x1fec59,ie=(_0x55092d,_0x4d1819,_0x595d7d,_0x432597)=>{const _0x3255a7=_0x32e807;for(var _0x2b3eef=_0x432597>0x1?void 0x0:_0x432597?oe(_0x4d1819,_0x595d7d):_0x4d1819,_0x538402=_0x55092d[_0x3255a7(0x14e)]-0x1,_0x48f900;_0x538402>=0x0;_0x538402--)(_0x48f900=_0x55092d[_0x538402])&&(_0x2b3eef=_0x48f900(_0x2b3eef)||_0x2b3eef);return _0x2b3eef;},w=(_0x53b011,_0x2ecc64)=>(_0x5e7c5d,_0x2ee9b0)=>_0x2ecc64(_0x5e7c5d,_0x2ee9b0,_0x53b011),$=(_0x3411e5,_0x5b2c1f,_0x50df34)=>ne(_0x3411e5,typeof _0x5b2c1f!=_0x32e807(0x18d)?_0x5b2c1f+'':_0x5b2c1f,_0x50df34);let b=class extends _0x5d5f99{constructor(_0x5336b5=M,_0x136ddf,_0x57007d){const _0xb2cbb2=_0x32e807;super(),this['_config']=_0x5336b5,this[_0xb2cbb2(0x145)]=_0x136ddf,this['_configService']=_0x57007d;const {..._0x15e441}=_0x1eb38a({},M,this[_0xb2cbb2(0x17b)]);this['_configService'][_0xb2cbb2(0x16c)](z,_0x15e441);}[_0x32e807(0x161)](){const _0x59456f=_0x32e807;[[f],[g],[S]][_0x59456f(0x173)](_0x4667ce=>{const _0x5688b0=_0x59456f;this[_0x5688b0(0x145)][_0x5688b0(0x172)](_0x4667ce);});}[_0x32e807(0x199)](){const _0x59d14f=_0x32e807;this['_injector'][_0x59d14f(0x176)](g),this[_0x59d14f(0x145)][_0x59d14f(0x176)](S);}};$(b,_0x32e807(0x157),W),$(b,_0x32e807(0x166),_0xd4c5e1[_0x32e807(0x180)]),b=ie([_0xe03605(_0x2bfb63,_0x40e60c,_0xcfd646),w(0x1,_0x2829ff(_0x2a4fc8)),w(0x2,_0x5c82ef)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x14fe87=_0x550a;(function(_0x3e5fdc,_0xcfc828){const _0xe02125=_0x550a,_0x3f5691=_0x3e5fdc();while(!![]){try{const _0x291b23=-parseInt(_0xe02125(0x16b))/0x1*(parseInt(_0xe02125(0x12c))/0x2)+-parseInt(_0xe02125(0x13d))/0x3*(parseInt(_0xe02125(0x16e))/0x4)+parseInt(_0xe02125(0x14d))/0x5+-parseInt(_0xe02125(0x156))/0x6+-parseInt(_0xe02125(0x127))/0x7+-parseInt(_0xe02125(0x15c))/0x8+parseInt(_0xe02125(0x11c))/0x9;if(_0x291b23===_0xcfc828)break;else _0x3f5691['push'](_0x3f5691['shift']());}catch(_0x4e32f8){_0x3f5691['push'](_0x3f5691['shift']());}}}(_0x50e0,0x2875b));import{CommentService as _0x370e38,CollaborationSessionService as _0x20eae3,UniverCollaborationClientPlugin as _0x16f4be}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2329d3}from'@univerjs-pro/license';import{dayjs as _0x5451cd,UserManagerService as _0x13e1e2,Inject as _0x501b2f,Injector as _0x52d9c7,Disposable as _0x184ef4,CustomRangeType as _0x25e50d,UniverInstanceType as _0x23ecc4,DependentOn as _0xb7eb1d,IConfigService as _0x3cd729,Plugin as _0x2b45ac,merge as _0x378f6c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x373e94}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411ef0,IThreadCommentDataSourceService as _0x1e191d}from'@univerjs/thread-comment';import{bufferTime as _0x31be06}from'rxjs';import{HTTPService as _0x4c4d5}from'@univerjs/network';const W=_0x14fe87(0x151);function _0x50e0(){const _0x5331db=['saveCommentToSnapshot','231164qOjSWm','resolved','getUnit','filter','_init','parse','Edit','format','forEach','onReady','_initUserSync','dataSource','rangeType','threadId','comments','post','addUser','onStarting','_injector','add','find','addComment','requireSession','6826392nISkpA','_threadCommentModel','/universer-api/user/list','get','Solve','resolveComment','getUser','commentUpdate$','Delete','/edit','_config','1250501FYlmPQ','_configService','slice','solved','type','227622orWOyY','userId','delete','userID','users','parentId','getMemberID','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','listComments','reply','OpenOrReOpen','replies','Unknown','symbol','replyId','12EdKMaK','/universer-api/comment/unit/','/solved','ref','content','subscribe','body','_httpService','deleteComment','error','payload','customRanges','/reply','getComment','getCurrentUser','length','569850qUDlqy','rangeId','defineProperty','_initDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','UNRECOGNIZED','_userService','createTimestamp','406452zwvHAI','root','syncUpdateMutationToColla','_threadCommentDataSourceService','map','_threadCommentDataSource','12512kYyrfL','personId','COMMENT','unitId','YYYY/MM/DD\x20HH:mm','comment','updateComment','/delete','disposeWithMe','_commentService','/list','code','pluginName','Add','user','2vpsimn','_sessionService'];_0x50e0=function(){return _0x5331db;};return _0x50e0();}var I=(_0x7edf1b=>(_0x7edf1b[_0x7edf1b[_0x14fe87(0x138)]=0x0]='OpenOrReOpen',_0x7edf1b[_0x7edf1b[_0x14fe87(0x134)]=0x1]='Solved',_0x7edf1b[_0x7edf1b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x7edf1b))(I||{}),v=(_0x4169a2=>(_0x4169a2[_0x4169a2[_0x14fe87(0x13a)]=0x0]=_0x14fe87(0x13a),_0x4169a2[_0x4169a2['Add']=0x1]='Add',_0x4169a2[_0x4169a2[_0x14fe87(0x152)]=0x2]='Reply',_0x4169a2[_0x4169a2['Edit']=0x3]='Edit',_0x4169a2[_0x4169a2[_0x14fe87(0x124)]=0x4]='Delete',_0x4169a2[_0x4169a2[_0x14fe87(0x120)]=0x5]=_0x14fe87(0x120),_0x4169a2[_0x4169a2[_0x14fe87(0x153)]=-0x1]=_0x14fe87(0x153),_0x4169a2))(v||{});const D=_0x5e2c44=>_0x5451cd(new Date(+_0x5e2c44))[_0x14fe87(0x175)](_0x14fe87(0x160)),B=async(_0x4deeae,_0x29d8fc)=>{const _0x183f00=_0x14fe87,_0x56096c=_0x4deeae['get'](_0x13e1e2),_0x28498d=_0x4deeae[_0x183f00(0x11f)](_0x4c4d5);_0x29d8fc['forEach'](_0x2d815d=>{const _0x294422=_0x183f00;_0x56096c[_0x294422(0x122)](_0x2d815d)&&_0x29d8fc[_0x294422(0x12e)](_0x2d815d);}),_0x29d8fc['size']&&(await _0x28498d[_0x183f00(0x11f)](_0x183f00(0x11e),{'params':{'userIDs':[..._0x29d8fc]}}))[_0x183f00(0x143)][_0x183f00(0x130)][_0x183f00(0x176)](_0x12450b=>{const _0x41cc58=_0x183f00;_0x12450b&&_0x56096c[_0x41cc58(0x115)](_0x12450b);});};var K=Object[_0x14fe87(0x135)],V=(_0x14f770,_0x15498d,_0x4153aa,_0x2851b5)=>{for(var _0x36ce82=_0x2851b5>0x1?void 0x0:_0x2851b5?K(_0x15498d,_0x4153aa):_0x15498d,_0x2fea50=_0x14f770['length']-0x1,_0x32110b;_0x2fea50>=0x0;_0x2fea50--)(_0x32110b=_0x14f770[_0x2fea50])&&(_0x36ce82=_0x32110b(_0x36ce82)||_0x36ce82);return _0x36ce82;},p=(_0x3e349a,_0x29d1a1)=>(_0x228bdf,_0x59b440)=>_0x29d1a1(_0x228bdf,_0x59b440,_0x3e349a);let S=class extends _0x184ef4{constructor(_0x3b063f,_0x19eff5,_0x1ea584,_0xfb5006){const _0x43ee99=_0x14fe87;super(),this[_0x43ee99(0x165)]=_0x3b063f,this[_0x43ee99(0x11d)]=_0x19eff5,this[_0x43ee99(0x154)]=_0x1ea584,this[_0x43ee99(0x117)]=_0xfb5006,this['_init'](),this[_0x43ee99(0x10f)]();}[_0x14fe87(0x10f)](){const _0x2156ad=_0x14fe87;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x31be06(0x10))[_0x2156ad(0x142)](_0x35e8e2=>{const _0x14b0bc=_0x2156ad,_0x38ebfc=new Set();_0x35e8e2[_0x14b0bc(0x176)](_0x2dcffe=>{const _0x18ad29=_0x14b0bc;switch(_0x2dcffe[_0x18ad29(0x12b)]){case _0x18ad29(0x118):{const _0x5462c7=_0x2dcffe[_0x18ad29(0x147)][_0x18ad29(0x15d)];_0x38ebfc[_0x18ad29(0x118)](_0x5462c7);break;}}}),B(this[_0x14b0bc(0x117)],_0x38ebfc);}));}[_0x14fe87(0x172)](){const _0x1da4ec=_0x14fe87;this[_0x1da4ec(0x164)](this[_0x1da4ec(0x165)][_0x1da4ec(0x123)]['subscribe'](async _0x19f800=>{const _0x4e49fe=_0x1da4ec;var _0x431ddb,_0x2cf350,_0x2e3840,_0x217151;const _0x225910=(_0x431ddb=this[_0x4e49fe(0x11d)]['getUnit'](_0x19f800[_0x4e49fe(0x15f)])[_0x4e49fe(0x119)](_0x5d27e7=>_0x5d27e7[_0x4e49fe(0x112)]===_0x19f800[_0x4e49fe(0x112)]))==null?void 0x0:_0x431ddb[_0x4e49fe(0x157)];if(!_0x225910)return;const {unitId:_0x5d0ead,subUnitId:_0x4afa41}=_0x225910;switch(_0x19f800[_0x4e49fe(0x16a)]&&this[_0x4e49fe(0x154)][_0x4e49fe(0x115)](_0x19f800[_0x4e49fe(0x16a)]),_0x19f800['type']){case v[_0x4e49fe(0x169)]:break;case v['Reply']:{this[_0x4e49fe(0x11d)][_0x4e49fe(0x11a)](_0x5d0ead,_0x4afa41,{'unitId':_0x5d0ead,'subUnitId':_0x4afa41,'ref':'','id':_0x19f800[_0x4e49fe(0x13c)],'dT':D(+_0x19f800[_0x4e49fe(0x155)]),'threadId':_0x19f800[_0x4e49fe(0x112)],'personId':(_0x2e3840=(_0x2cf350=_0x19f800[_0x4e49fe(0x16a)])==null?void 0x0:_0x2cf350[_0x4e49fe(0x12f)])!=null?_0x2e3840:_0x19f800[_0x4e49fe(0x12d)],'text':JSON[_0x4e49fe(0x173)](_0x19f800['content']),'parentId':_0x225910['id']});break;}case v[_0x4e49fe(0x124)]:{const _0x426820=this[_0x4e49fe(0x11d)][_0x4e49fe(0x14a)](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);_0x426820&&_0x426820[_0x4e49fe(0x131)]&&this[_0x4e49fe(0x11d)]['deleteComment'](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);break;}case v[_0x4e49fe(0x174)]:{this['_threadCommentModel']['updateComment'](_0x5d0ead,_0x4afa41,{'commentId':_0x19f800[_0x4e49fe(0x13c)],'text':JSON['parse'](_0x19f800[_0x4e49fe(0x141)])});break;}case v[_0x4e49fe(0x120)]:{const _0x8d282d=(_0x217151=this['_threadCommentModel'][_0x4e49fe(0x170)](_0x19f800['unitId'])[_0x4e49fe(0x119)](_0x46a2d2=>_0x46a2d2['threadId']===_0x19f800['threadId']))==null?void 0x0:_0x217151[_0x4e49fe(0x157)];_0x8d282d&&this['_threadCommentModel'][_0x4e49fe(0x121)](_0x5d0ead,_0x4afa41,_0x8d282d['id'],_0x19f800['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x501b2f(_0x370e38)),p(0x1,_0x501b2f(_0x411ef0)),p(0x2,_0x501b2f(_0x13e1e2)),p(0x3,_0x501b2f(_0x52d9c7))],S);const z='thread-comment-data-source.config',M={};function _0x550a(_0x588913,_0x3e9637){const _0x50e00a=_0x50e0();return _0x550a=function(_0x550a5f,_0x58bb64){_0x550a5f=_0x550a5f-0x10e;let _0x1e0c82=_0x50e00a[_0x550a5f];return _0x1e0c82;},_0x550a(_0x588913,_0x3e9637);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x4ecbc7,_0x5b0204,_0x2f09f0,_0x26b6dd)=>{const _0x34e6ed=_0x14fe87;for(var _0x3480a0=_0x26b6dd>0x1?void 0x0:_0x26b6dd?k(_0x5b0204,_0x2f09f0):_0x5b0204,_0x59db60=_0x4ecbc7[_0x34e6ed(0x14c)]-0x1,_0x47eb12;_0x59db60>=0x0;_0x59db60--)(_0x47eb12=_0x4ecbc7[_0x59db60])&&(_0x3480a0=_0x47eb12(_0x3480a0)||_0x3480a0);return _0x3480a0;},_=(_0x3c2d54,_0x5952ad)=>(_0x427148,_0x1e1f5a)=>_0x5952ad(_0x427148,_0x1e1f5a,_0x3c2d54);function X(_0x1cebe6,_0x3a0305){const _0x39dd61=_0x14fe87,_0x332258=_0x1cebe6[_0x39dd61(0x139)][0x0];return{..._0x3a0305,'id':_0x332258[_0x39dd61(0x13c)],'resolved':_0x1cebe6[_0x39dd61(0x12a)]===0x1,'dT':D(_0x332258['createTimestamp']),'personId':_0x332258[_0x39dd61(0x12d)],'threadId':_0x332258[_0x39dd61(0x112)]};}function ee(_0x276c32,_0x1be564,_0x5315bc){const _0x2ba868=_0x14fe87;var _0x691c08,_0x501892;if(((_0x501892=(_0x691c08=_0x276c32==null?void 0x0:_0x276c32['replies'])==null?void 0x0:_0x691c08[_0x2ba868(0x14c)])!=null?_0x501892:0x0)>0x0){const _0x49342a=(_0x19ae3a,_0x3d4984)=>({'id':_0x19ae3a[_0x2ba868(0x13c)],'threadId':_0x19ae3a[_0x2ba868(0x112)],'dT':D(_0x19ae3a['createTimestamp']),'personId':_0x19ae3a[_0x2ba868(0x12d)],'resolved':_0x276c32[_0x2ba868(0x12a)]===I[_0x2ba868(0x134)],'unitId':_0x1be564,'subUnitId':_0x5315bc,'text':JSON[_0x2ba868(0x173)](_0x19ae3a[_0x2ba868(0x141)]),'parentId':_0x3d4984}),_0x47e9a3=_0x49342a(_0x276c32[_0x2ba868(0x139)][0x0]);return{..._0x47e9a3,'children':_0x276c32[_0x2ba868(0x139)][_0x2ba868(0x129)](0x1)['map'](_0x1ab738=>_0x49342a(_0x1ab738,_0x47e9a3['id']))};}return null;}let f=class{constructor(_0xd7c416,_0x8a2ce3,_0x2c5ddf,_0x4ef894){const _0x16b0c2=_0x14fe87;this[_0x16b0c2(0x144)]=_0xd7c416,this['_userService']=_0x8a2ce3,this[_0x16b0c2(0x16c)]=_0x2c5ddf,this[_0x16b0c2(0x117)]=_0x4ef894;}async['addComment'](_0x4abe44){const _0x2ff5b4=_0x14fe87;var _0xd235ae,_0x367437;const {parentId:_0x5203de,unitId:_0x4e41be,text:_0x3a45ba,threadId:_0xa9cda1}=_0x4abe44,_0x3f0477=(_0x367437=(_0xd235ae=_0x3a45ba['customRanges'])==null?void 0x0:_0xd235ae[_0x2ff5b4(0x171)](_0x3101fc=>_0x3101fc[_0x2ff5b4(0x111)]===_0x25e50d['COMMENT'])[_0x2ff5b4(0x15a)](_0x59212b=>_0x59212b[_0x2ff5b4(0x14e)]))!=null?_0x367437:[],_0xd76736=JSON['stringify'](_0x3a45ba),_0x3d21c5=(await this[_0x2ff5b4(0x16c)][_0x2ff5b4(0x11b)](_0x4e41be))[_0x2ff5b4(0x132)]();if(_0x5203de){const _0xe777ce={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477,'threadId':_0xa9cda1},_0x5eeeaa=(await this['_httpService'][_0x2ff5b4(0x114)]('/universer-api/comment/unit/'+_0x4e41be+_0x2ff5b4(0x149),{'body':_0xe777ce}))[_0x2ff5b4(0x143)][_0x2ff5b4(0x137)];return{..._0x4abe44,'id':_0x5eeeaa[_0x2ff5b4(0x13c)],'dT':_0x5451cd(+_0x5eeeaa[_0x2ff5b4(0x155)])[_0x2ff5b4(0x175)](_0x2ff5b4(0x160)),'personId':_0x5eeeaa[_0x2ff5b4(0x12d)]};}else{const _0x428945={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477},_0x380ffd=await this['_httpService'][_0x2ff5b4(0x114)](_0x2ff5b4(0x13e)+_0x4e41be+'/add',{'body':_0x428945});return X(_0x380ffd['body'][_0x2ff5b4(0x161)],_0x4abe44);}}async[_0x14fe87(0x162)](_0x12eed5){const _0x45351e=_0x14fe87;var _0x4155d,_0x7e10e5;const {text:_0x9d72a5,unitId:_0x22ff29}=_0x12eed5,_0x472046=(_0x7e10e5=(_0x4155d=_0x9d72a5[_0x45351e(0x148)])==null?void 0x0:_0x4155d['filter'](_0x49245d=>_0x49245d['rangeType']===_0x25e50d[_0x45351e(0x15e)])[_0x45351e(0x15a)](_0x35498f=>_0x35498f[_0x45351e(0x14e)]))!=null?_0x7e10e5:[],_0x426dd6=JSON['stringify'](_0x9d72a5),_0x20e637=_0x12eed5[_0x45351e(0x112)],_0x4c0f20=_0x12eed5['id'],_0x505ef2={'memberId':(await this['_sessionService'][_0x45351e(0x11b)](_0x22ff29))[_0x45351e(0x132)](),'unitId':_0x22ff29,'threadId':_0x20e637,'mention':_0x472046,'content':_0x426dd6,'replyId':_0x4c0f20},_0x47d444=await this[_0x45351e(0x144)][_0x45351e(0x114)](_0x45351e(0x13e)+_0x22ff29+_0x45351e(0x125),{'body':_0x505ef2});return!_0x47d444['body']['error']||_0x47d444[_0x45351e(0x143)][_0x45351e(0x146)][_0x45351e(0x167)]===0x1;}async['resolveComment'](_0x2c206b){const _0x5bcf3b=_0x14fe87,{unitId:_0x4f7161}=_0x2c206b,_0x24f266=_0x2c206b[_0x5bcf3b(0x112)],_0x3f39f5={'memberId':this[_0x5bcf3b(0x154)][_0x5bcf3b(0x14b)]()['userID'],'unitId':_0x4f7161,'threadId':_0x24f266,'solved':_0x2c206b[_0x5bcf3b(0x16f)]?I[_0x5bcf3b(0x134)]:I[_0x5bcf3b(0x138)]},_0x31e259=await this[_0x5bcf3b(0x144)][_0x5bcf3b(0x114)](_0x5bcf3b(0x13e)+_0x4f7161+_0x5bcf3b(0x13f),{'body':_0x3f39f5});return!_0x31e259[_0x5bcf3b(0x143)]['error']||_0x31e259['body'][_0x5bcf3b(0x146)][_0x5bcf3b(0x167)]===0x1;}async[_0x14fe87(0x145)](_0x24a092,_0x50d614,_0x506e1f,_0x35ac7c){const _0x48614a=_0x14fe87,_0x4e61bd={'memberId':(await this[_0x48614a(0x16c)][_0x48614a(0x11b)](_0x24a092))[_0x48614a(0x132)](),'threadId':_0x506e1f,'replyId':_0x35ac7c,'unitId':_0x24a092},_0x132653=await this[_0x48614a(0x144)][_0x48614a(0x114)]('/universer-api/comment/unit/'+_0x24a092+_0x48614a(0x163),{'body':_0x4e61bd});return!_0x132653[_0x48614a(0x143)]['error']||_0x132653[_0x48614a(0x143)][_0x48614a(0x146)][_0x48614a(0x167)]===0x1;}async[_0x14fe87(0x136)](_0x3f86e0,_0x504b53,_0x33ed90){const _0x55c5f5=_0x14fe87,_0x341737={'unitId':_0x3f86e0,'threadId':_0x33ed90},_0x4eff9c=await this[_0x55c5f5(0x144)][_0x55c5f5(0x114)]('/universer-api/comment/unit/'+_0x3f86e0+_0x55c5f5(0x166),{'body':_0x341737}),_0x208cdc=_0x33ed90['map'](_0x239b7d=>ee(_0x4eff9c['body'][_0x55c5f5(0x113)][_0x239b7d],_0x3f86e0,_0x504b53))['filter'](Boolean);return Object['values'](_0x4eff9c[_0x55c5f5(0x143)][_0x55c5f5(0x130)])[_0x55c5f5(0x176)](_0x4e6568=>{const _0x59b996=_0x55c5f5;this['_userService'][_0x59b996(0x115)](_0x4e6568);}),_0x208cdc;}[_0x14fe87(0x16d)](_0x198744){const _0x21218a=_0x14fe87;return{'id':_0x198744['id'],'threadId':_0x198744[_0x21218a(0x112)],'ref':_0x198744[_0x21218a(0x140)]};}};f=Q([_(0x0,_0x501b2f(_0x4c4d5)),_(0x1,_0x501b2f(_0x13e1e2)),_(0x2,_0x501b2f(_0x20eae3)),_(0x3,_0x501b2f(_0x52d9c7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x14fc53,_0x34c0e6,_0x1cb31f,_0x31bde9)=>{const _0x370b18=_0x14fe87;for(var _0x123cd7=_0x31bde9>0x1?void 0x0:_0x31bde9?re(_0x34c0e6,_0x1cb31f):_0x34c0e6,_0x4aa950=_0x14fc53[_0x370b18(0x14c)]-0x1,_0x535ef5;_0x4aa950>=0x0;_0x4aa950--)(_0x535ef5=_0x14fc53[_0x4aa950])&&(_0x123cd7=_0x535ef5(_0x123cd7)||_0x123cd7);return _0x123cd7;},N=(_0x4e876d,_0x62ab23)=>(_0x58b82f,_0x49a60f)=>_0x62ab23(_0x58b82f,_0x49a60f,_0x4e876d);let g=class extends _0x184ef4{constructor(_0x1aa92d,_0x4ffa6a){const _0x4e0a11=_0x14fe87;super(),this[_0x4e0a11(0x159)]=_0x1aa92d,this[_0x4e0a11(0x15b)]=_0x4ffa6a,this[_0x4e0a11(0x150)]();}[_0x14fe87(0x150)](){const _0x569b2b=_0x14fe87;this[_0x569b2b(0x159)][_0x569b2b(0x110)]=this['_threadCommentDataSource'],this[_0x569b2b(0x159)][_0x569b2b(0x158)]=!0x1;}};g=te([N(0x0,_0x1e191d),N(0x1,_0x501b2f(f))],g);var se=Object[_0x14fe87(0x14f)],oe=Object[_0x14fe87(0x135)],ne=(_0x95357b,_0x2d6151,_0x41f584)=>_0x2d6151 in _0x95357b?se(_0x95357b,_0x2d6151,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41f584}):_0x95357b[_0x2d6151]=_0x41f584,ie=(_0x5e5ebf,_0x2b0242,_0x50f175,_0x59f72f)=>{const _0x3cf60c=_0x14fe87;for(var _0x2effe0=_0x59f72f>0x1?void 0x0:_0x59f72f?oe(_0x2b0242,_0x50f175):_0x2b0242,_0x22a21d=_0x5e5ebf[_0x3cf60c(0x14c)]-0x1,_0x403070;_0x22a21d>=0x0;_0x22a21d--)(_0x403070=_0x5e5ebf[_0x22a21d])&&(_0x2effe0=_0x403070(_0x2effe0)||_0x2effe0);return _0x2effe0;},w=(_0x18445c,_0x350fd2)=>(_0x45a7b7,_0xebc472)=>_0x350fd2(_0x45a7b7,_0xebc472,_0x18445c),$=(_0x37f2ce,_0x857101,_0x51ccde)=>ne(_0x37f2ce,typeof _0x857101!=_0x14fe87(0x13b)?_0x857101+'':_0x857101,_0x51ccde);let b=class extends _0x2b45ac{constructor(_0x39b587=M,_0x3df0c6,_0x11d241){const _0x601996=_0x14fe87;super(),this[_0x601996(0x126)]=_0x39b587,this[_0x601996(0x117)]=_0x3df0c6,this[_0x601996(0x128)]=_0x11d241;const {..._0x4e1010}=_0x378f6c({},M,this[_0x601996(0x126)]);this[_0x601996(0x128)]['setConfig'](z,_0x4e1010);}[_0x14fe87(0x116)](){const _0x314d03=_0x14fe87;[[f],[g],[S]][_0x314d03(0x176)](_0xacdcfa=>{const _0x1283e2=_0x314d03;this[_0x1283e2(0x117)][_0x1283e2(0x118)](_0xacdcfa);});}[_0x14fe87(0x10e)](){const _0x5c4c46=_0x14fe87;this['_injector']['get'](g),this[_0x5c4c46(0x117)][_0x5c4c46(0x11f)](S);}};$(b,_0x14fe87(0x168),W),$(b,'type',_0x23ecc4[_0x14fe87(0x133)]),b=ie([_0xb7eb1d(_0x373e94,_0x16f4be,_0x2329d3),w(0x1,_0x501b2f(_0x52d9c7)),w(0x2,_0x3cd729)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x32e807=_0x4476;(function(_0x196e4b,_0x53f5c8){const _0x14fb33=_0x4476,_0x203376=_0x196e4b();while(!![]){try{const _0x514d95=-parseInt(_0x14fb33(0x170))/0x1+-parseInt(_0x14fb33(0x163))/0x2+parseInt(_0x14fb33(0x186))/0x3*(parseInt(_0x14fb33(0x14d))/0x4)+parseInt(_0x14fb33(0x167))/0x5*(-parseInt(_0x14fb33(0x1a1))/0x6)+parseInt(_0x14fb33(0x19e))/0x7*(-parseInt(_0x14fb33(0x182))/0x8)+parseInt(_0x14fb33(0x141))/0x9+-parseInt(_0x14fb33(0x19b))/0xa*(-parseInt(_0x14fb33(0x196))/0xb);if(_0x514d95===_0x53f5c8)break;else _0x203376['push'](_0x203376['shift']());}catch(_0x3a5873){_0x203376['push'](_0x203376['shift']());}}}(_0x1bce,0x647c4));import{CommentService as _0x12f7f5,CollaborationSessionService as _0x307a0a,UniverCollaborationClientPlugin as _0x40e60c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcfd646}from'@univerjs-pro/license';import{dayjs as _0xa47b16,UserManagerService as _0x3a2f14,Inject as _0x2829ff,Injector as _0x2a4fc8,Disposable as _0x2e1c60,CustomRangeType as _0x5d6a87,UniverInstanceType as _0xd4c5e1,DependentOn as _0xe03605,IConfigService as _0x5c82ef,Plugin as _0x5d5f99,merge as _0x1eb38a}from'@univerjs/core';function _0x1bce(){const _0x2b93a9=['73636LCOYQF','userID','replyId','type','25uWlVaF','users','Solve','/reply','_threadCommentDataSourceService','setConfig','addUser','_initUserSync','_initDataSource','247326ttyqTa','format','add','forEach','/solved','syncUpdateMutationToColla','get','rangeType','stringify','find','/add','_config','resolveComment','_userService','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','defineProperty','641848dqYYHn','size','code','user','9pMggjU','_init','saveCommentToSnapshot','Solved','comment','unitId','userId','symbol','body','_httpService','getOwnPropertyDescriptor','comments','personId','Delete','createTimestamp','_sessionService','9097GZJPGv','addComment','Reply','onReady','commentUpdate$','5180XeWhLs','parse','/delete','7yTFnRh','solved','_threadCommentModel','85842lSwjTI','map','delete','_commentService','getUnit','/universer-api/user/list','570699YQiMKp','UNRECOGNIZED','reply','subscribe','_injector','requireSession','threadId','payload','/universer-api/comment/unit/','dataSource','YYYY/MM/DD\x20HH:mm','/edit','474268XPBGtP','length','rangeId','filter','deleteComment','OpenOrReOpen','customRanges','getMemberID','content','disposeWithMe','pluginName','COMMENT','Unknown','getUser','replies','error','values','listComments','Edit','Add','onStarting','post'];_0x1bce=function(){return _0x2b93a9;};return _0x1bce();}import{UniverThreadCommentUIPlugin as _0x2bfb63}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cc6a8,IThreadCommentDataSourceService as _0x3047aa}from'@univerjs/thread-comment';import{bufferTime as _0x314186}from'rxjs';import{HTTPService as _0x382c33}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a95a7=>(_0x3a95a7[_0x3a95a7[_0x32e807(0x152)]=0x0]='OpenOrReOpen',_0x3a95a7[_0x3a95a7[_0x32e807(0x189)]=0x1]=_0x32e807(0x189),_0x3a95a7[_0x3a95a7[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x3a95a7))(I||{}),v=(_0x5a05af=>(_0x5a05af[_0x5a05af[_0x32e807(0x159)]=0x0]=_0x32e807(0x159),_0x5a05af[_0x5a05af[_0x32e807(0x160)]=0x1]=_0x32e807(0x160),_0x5a05af[_0x5a05af[_0x32e807(0x198)]=0x2]='Reply',_0x5a05af[_0x5a05af['Edit']=0x3]='Edit',_0x5a05af[_0x5a05af[_0x32e807(0x193)]=0x4]=_0x32e807(0x193),_0x5a05af[_0x5a05af[_0x32e807(0x169)]=0x5]='Solve',_0x5a05af[_0x5a05af[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x5a05af))(v||{});const D=_0x91474b=>_0xa47b16(new Date(+_0x91474b))[_0x32e807(0x171)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c3f24,_0x219510)=>{const _0x483072=_0x32e807,_0x4f5f0d=_0x4c3f24[_0x483072(0x176)](_0x3a2f14),_0x53b718=_0x4c3f24['get'](_0x382c33);_0x219510[_0x483072(0x173)](_0x2137f8=>{const _0x15a67d=_0x483072;_0x4f5f0d[_0x15a67d(0x15a)](_0x2137f8)&&_0x219510[_0x15a67d(0x1a3)](_0x2137f8);}),_0x219510[_0x483072(0x183)]&&(await _0x53b718[_0x483072(0x176)](_0x483072(0x140),{'params':{'userIDs':[..._0x219510]}}))[_0x483072(0x18e)][_0x483072(0x168)]['forEach'](_0x242d2e=>{const _0x50326b=_0x483072;_0x242d2e&&_0x4f5f0d[_0x50326b(0x16d)](_0x242d2e);});};var K=Object[_0x32e807(0x190)],V=(_0x154698,_0x4459af,_0x288650,_0x323267)=>{const _0xf55b8f=_0x32e807;for(var _0x3d4b83=_0x323267>0x1?void 0x0:_0x323267?K(_0x4459af,_0x288650):_0x4459af,_0x567c79=_0x154698[_0xf55b8f(0x14e)]-0x1,_0x237049;_0x567c79>=0x0;_0x567c79--)(_0x237049=_0x154698[_0x567c79])&&(_0x3d4b83=_0x237049(_0x3d4b83)||_0x3d4b83);return _0x3d4b83;},p=(_0x33dad5,_0x139e2c)=>(_0x399b49,_0x248c7b)=>_0x139e2c(_0x399b49,_0x248c7b,_0x33dad5);let S=class extends _0x2e1c60{constructor(_0x2cd379,_0x28a325,_0x1860e8,_0x241e90){const _0x459d88=_0x32e807;super(),this[_0x459d88(0x1a4)]=_0x2cd379,this[_0x459d88(0x1a0)]=_0x28a325,this[_0x459d88(0x17d)]=_0x1860e8,this[_0x459d88(0x145)]=_0x241e90,this[_0x459d88(0x187)](),this['_initUserSync']();}[_0x32e807(0x16e)](){const _0x5f18f0=_0x32e807;this[_0x5f18f0(0x156)](this[_0x5f18f0(0x1a0)]['commentUpdate$']['pipe'](_0x314186(0x10))[_0x5f18f0(0x144)](_0x4a9db1=>{const _0x21681b=new Set();_0x4a9db1['forEach'](_0x4d98b0=>{const _0x49f3ed=_0x4476;switch(_0x4d98b0[_0x49f3ed(0x166)]){case _0x49f3ed(0x172):{const _0xa701b3=_0x4d98b0[_0x49f3ed(0x148)][_0x49f3ed(0x192)];_0x21681b[_0x49f3ed(0x172)](_0xa701b3);break;}}}),B(this['_injector'],_0x21681b);}));}[_0x32e807(0x187)](){const _0x221b32=_0x32e807;this[_0x221b32(0x156)](this['_commentService'][_0x221b32(0x19a)][_0x221b32(0x144)](async _0x1ed94b=>{const _0x1e4463=_0x221b32;var _0x2c37f5,_0x2f251b,_0x3ef3e4,_0x17c7ca;const _0xaafa6d=(_0x2c37f5=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b[_0x1e4463(0x18b)])[_0x1e4463(0x179)](_0x2ace29=>_0x2ace29['threadId']===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x2c37f5['root'];if(!_0xaafa6d)return;const {unitId:_0x4bce15,subUnitId:_0x5c9007}=_0xaafa6d;switch(_0x1ed94b[_0x1e4463(0x185)]&&this['_userService'][_0x1e4463(0x16d)](_0x1ed94b['user']),_0x1ed94b[_0x1e4463(0x166)]){case v[_0x1e4463(0x160)]:break;case v[_0x1e4463(0x198)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x197)](_0x4bce15,_0x5c9007,{'unitId':_0x4bce15,'subUnitId':_0x5c9007,'ref':'','id':_0x1ed94b[_0x1e4463(0x165)],'dT':D(+_0x1ed94b['createTimestamp']),'threadId':_0x1ed94b[_0x1e4463(0x147)],'personId':(_0x3ef3e4=(_0x2f251b=_0x1ed94b[_0x1e4463(0x185)])==null?void 0x0:_0x2f251b[_0x1e4463(0x164)])!=null?_0x3ef3e4:_0x1ed94b['userId'],'text':JSON['parse'](_0x1ed94b[_0x1e4463(0x155)]),'parentId':_0xaafa6d['id']});break;}case v['Delete']:{const _0x412077=this[_0x1e4463(0x1a0)]['getComment'](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);_0x412077&&_0x412077['parentId']&&this[_0x1e4463(0x1a0)][_0x1e4463(0x151)](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);break;}case v[_0x1e4463(0x15f)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x17f)](_0x4bce15,_0x5c9007,{'commentId':_0x1ed94b[_0x1e4463(0x165)],'text':JSON[_0x1e4463(0x19c)](_0x1ed94b[_0x1e4463(0x155)])});break;}case v['Solve']:{const _0x9d9a8f=(_0x17c7ca=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b['unitId'])[_0x1e4463(0x179)](_0x5e87b=>_0x5e87b[_0x1e4463(0x147)]===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x17c7ca['root'];_0x9d9a8f&&this[_0x1e4463(0x1a0)][_0x1e4463(0x17c)](_0x4bce15,_0x5c9007,_0x9d9a8f['id'],_0x1ed94b[_0x1e4463(0x19f)]===I[_0x1e4463(0x189)]);break;}}}));}};S=V([p(0x0,_0x2829ff(_0x12f7f5)),p(0x1,_0x2829ff(_0x3cc6a8)),p(0x2,_0x2829ff(_0x3a2f14)),p(0x3,_0x2829ff(_0x2a4fc8))],S);function _0x4476(_0x2d2148,_0x46df1f){const _0x1bcefa=_0x1bce();return _0x4476=function(_0x44764f,_0x1aecd0){_0x44764f=_0x44764f-0x13f;let _0x1a0903=_0x1bcefa[_0x44764f];return _0x1a0903;},_0x4476(_0x2d2148,_0x46df1f);}const z='thread-comment-data-source.config',M={};var k=Object[_0x32e807(0x190)],Q=(_0x185955,_0x1b8521,_0x1aefcf,_0x40c70b)=>{const _0x23888e=_0x32e807;for(var _0x4cbd4e=_0x40c70b>0x1?void 0x0:_0x40c70b?k(_0x1b8521,_0x1aefcf):_0x1b8521,_0x3f9b78=_0x185955[_0x23888e(0x14e)]-0x1,_0x5d33bd;_0x3f9b78>=0x0;_0x3f9b78--)(_0x5d33bd=_0x185955[_0x3f9b78])&&(_0x4cbd4e=_0x5d33bd(_0x4cbd4e)||_0x4cbd4e);return _0x4cbd4e;},_=(_0x2dc7ed,_0x507198)=>(_0x391d90,_0x394dd3)=>_0x507198(_0x391d90,_0x394dd3,_0x2dc7ed);function X(_0x1080f0,_0x19b150){const _0x3a20bf=_0x32e807,_0x14717a=_0x1080f0['replies'][0x0];return{..._0x19b150,'id':_0x14717a[_0x3a20bf(0x165)],'resolved':_0x1080f0[_0x3a20bf(0x19f)]===0x1,'dT':D(_0x14717a[_0x3a20bf(0x194)]),'personId':_0x14717a['userId'],'threadId':_0x14717a[_0x3a20bf(0x147)]};}function ee(_0x14a8f9,_0x51acfd,_0x5c98eb){const _0x44ba27=_0x32e807;var _0x5490de,_0x51ce0e;if(((_0x51ce0e=(_0x5490de=_0x14a8f9==null?void 0x0:_0x14a8f9[_0x44ba27(0x15b)])==null?void 0x0:_0x5490de[_0x44ba27(0x14e)])!=null?_0x51ce0e:0x0)>0x0){const _0x30de3c=(_0x182695,_0x4ed258)=>({'id':_0x182695['replyId'],'threadId':_0x182695[_0x44ba27(0x147)],'dT':D(_0x182695[_0x44ba27(0x194)]),'personId':_0x182695['userId'],'resolved':_0x14a8f9[_0x44ba27(0x19f)]===I[_0x44ba27(0x189)],'unitId':_0x51acfd,'subUnitId':_0x5c98eb,'text':JSON[_0x44ba27(0x19c)](_0x182695[_0x44ba27(0x155)]),'parentId':_0x4ed258}),_0x4f224e=_0x30de3c(_0x14a8f9[_0x44ba27(0x15b)][0x0]);return{..._0x4f224e,'children':_0x14a8f9[_0x44ba27(0x15b)]['slice'](0x1)[_0x44ba27(0x1a2)](_0x258445=>_0x30de3c(_0x258445,_0x4f224e['id']))};}return null;}let f=class{constructor(_0x21c918,_0x5d2f6e,_0x49539f,_0x455f1f){const _0xe8d59e=_0x32e807;this[_0xe8d59e(0x18f)]=_0x21c918,this[_0xe8d59e(0x17d)]=_0x5d2f6e,this[_0xe8d59e(0x195)]=_0x49539f,this['_injector']=_0x455f1f;}async[_0x32e807(0x197)](_0x92fc1){const _0x25cd56=_0x32e807;var _0x3b05de,_0x2406a8;const {parentId:_0x24040e,unitId:_0x4d11c1,text:_0x456396,threadId:_0x5b115f}=_0x92fc1,_0xdfff1d=(_0x2406a8=(_0x3b05de=_0x456396[_0x25cd56(0x153)])==null?void 0x0:_0x3b05de['filter'](_0x5c41ca=>_0x5c41ca[_0x25cd56(0x177)]===_0x5d6a87[_0x25cd56(0x158)])[_0x25cd56(0x1a2)](_0x4dd386=>_0x4dd386[_0x25cd56(0x14f)]))!=null?_0x2406a8:[],_0x34eb7c=JSON[_0x25cd56(0x178)](_0x456396),_0x3643dc=(await this[_0x25cd56(0x195)]['requireSession'](_0x4d11c1))[_0x25cd56(0x154)]();if(_0x24040e){const _0x5445ab={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d,'threadId':_0x5b115f},_0xf10b74=(await this[_0x25cd56(0x18f)][_0x25cd56(0x162)](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x16a),{'body':_0x5445ab}))[_0x25cd56(0x18e)][_0x25cd56(0x143)];return{..._0x92fc1,'id':_0xf10b74[_0x25cd56(0x165)],'dT':_0xa47b16(+_0xf10b74[_0x25cd56(0x194)])['format'](_0x25cd56(0x14b)),'personId':_0xf10b74[_0x25cd56(0x18c)]};}else{const _0x57ff6a={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d},_0x3a3072=await this[_0x25cd56(0x18f)]['post'](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x17a),{'body':_0x57ff6a});return X(_0x3a3072[_0x25cd56(0x18e)][_0x25cd56(0x18a)],_0x92fc1);}}async['updateComment'](_0x55c954){const _0x45ea3d=_0x32e807;var _0x2e9d1f,_0xf1f4e9;const {text:_0x512393,unitId:_0x482091}=_0x55c954,_0x2066f5=(_0xf1f4e9=(_0x2e9d1f=_0x512393[_0x45ea3d(0x153)])==null?void 0x0:_0x2e9d1f[_0x45ea3d(0x150)](_0x104c9a=>_0x104c9a[_0x45ea3d(0x177)]===_0x5d6a87['COMMENT'])[_0x45ea3d(0x1a2)](_0x2e7e89=>_0x2e7e89[_0x45ea3d(0x14f)]))!=null?_0xf1f4e9:[],_0x422c9e=JSON['stringify'](_0x512393),_0x575cd7=_0x55c954[_0x45ea3d(0x147)],_0x2d5f61=_0x55c954['id'],_0x5b5b08={'memberId':(await this[_0x45ea3d(0x195)]['requireSession'](_0x482091))[_0x45ea3d(0x154)](),'unitId':_0x482091,'threadId':_0x575cd7,'mention':_0x2066f5,'content':_0x422c9e,'replyId':_0x2d5f61},_0x4c6a88=await this[_0x45ea3d(0x18f)][_0x45ea3d(0x162)](_0x45ea3d(0x149)+_0x482091+_0x45ea3d(0x14c),{'body':_0x5b5b08});return!_0x4c6a88[_0x45ea3d(0x18e)][_0x45ea3d(0x15c)]||_0x4c6a88['body'][_0x45ea3d(0x15c)][_0x45ea3d(0x184)]===0x1;}async[_0x32e807(0x17c)](_0x2f7daf){const _0x89ad27=_0x32e807,{unitId:_0x40e601}=_0x2f7daf,_0xea795b=_0x2f7daf[_0x89ad27(0x147)],_0x31ffa6={'memberId':this[_0x89ad27(0x17d)]['getCurrentUser']()[_0x89ad27(0x164)],'unitId':_0x40e601,'threadId':_0xea795b,'solved':_0x2f7daf['resolved']?I['Solved']:I[_0x89ad27(0x152)]},_0x141238=await this[_0x89ad27(0x18f)][_0x89ad27(0x162)]('/universer-api/comment/unit/'+_0x40e601+_0x89ad27(0x174),{'body':_0x31ffa6});return!_0x141238['body']['error']||_0x141238['body'][_0x89ad27(0x15c)][_0x89ad27(0x184)]===0x1;}async[_0x32e807(0x151)](_0x4bd2ae,_0x1b2fb7,_0x46c209,_0x419a4b){const _0x53c921=_0x32e807,_0x90d404={'memberId':(await this['_sessionService'][_0x53c921(0x146)](_0x4bd2ae))['getMemberID'](),'threadId':_0x46c209,'replyId':_0x419a4b,'unitId':_0x4bd2ae},_0x3b8728=await this[_0x53c921(0x18f)][_0x53c921(0x162)]('/universer-api/comment/unit/'+_0x4bd2ae+_0x53c921(0x19d),{'body':_0x90d404});return!_0x3b8728[_0x53c921(0x18e)][_0x53c921(0x15c)]||_0x3b8728[_0x53c921(0x18e)]['error'][_0x53c921(0x184)]===0x1;}async[_0x32e807(0x15e)](_0x3e1ab3,_0x548a8c,_0x125fd7){const _0x82f234=_0x32e807,_0x1bc0b3={'unitId':_0x3e1ab3,'threadId':_0x125fd7},_0x19b85d=await this['_httpService'][_0x82f234(0x162)]('/universer-api/comment/unit/'+_0x3e1ab3+'/list',{'body':_0x1bc0b3}),_0x301a64=_0x125fd7[_0x82f234(0x1a2)](_0x5e6c98=>ee(_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x191)][_0x5e6c98],_0x3e1ab3,_0x548a8c))['filter'](Boolean);return Object[_0x82f234(0x15d)](_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x168)])[_0x82f234(0x173)](_0xdf3a61=>{this['_userService']['addUser'](_0xdf3a61);}),_0x301a64;}[_0x32e807(0x188)](_0x4e174e){const _0x37d5ce=_0x32e807;return{'id':_0x4e174e['id'],'threadId':_0x4e174e[_0x37d5ce(0x147)],'ref':_0x4e174e['ref']};}};f=Q([_(0x0,_0x2829ff(_0x382c33)),_(0x1,_0x2829ff(_0x3a2f14)),_(0x2,_0x2829ff(_0x307a0a)),_(0x3,_0x2829ff(_0x2a4fc8))],f);var re=Object[_0x32e807(0x190)],te=(_0x27fe5e,_0x2986c1,_0x43f4e4,_0x375d69)=>{const _0x335fc1=_0x32e807;for(var _0x2a480e=_0x375d69>0x1?void 0x0:_0x375d69?re(_0x2986c1,_0x43f4e4):_0x2986c1,_0x4c574e=_0x27fe5e[_0x335fc1(0x14e)]-0x1,_0x17ac10;_0x4c574e>=0x0;_0x4c574e--)(_0x17ac10=_0x27fe5e[_0x4c574e])&&(_0x2a480e=_0x17ac10(_0x2a480e)||_0x2a480e);return _0x2a480e;},N=(_0x3dd2ac,_0x5151d6)=>(_0x4b3fe7,_0x55bc28)=>_0x5151d6(_0x4b3fe7,_0x55bc28,_0x3dd2ac);let g=class extends _0x2e1c60{constructor(_0x2a7e7e,_0x32d749){const _0x4ec5c7=_0x32e807;super(),this[_0x4ec5c7(0x16b)]=_0x2a7e7e,this['_threadCommentDataSource']=_0x32d749,this[_0x4ec5c7(0x16f)]();}[_0x32e807(0x16f)](){const _0x519bab=_0x32e807;this[_0x519bab(0x16b)][_0x519bab(0x14a)]=this[_0x519bab(0x17e)],this[_0x519bab(0x16b)][_0x519bab(0x175)]=!0x1;}};g=te([N(0x0,_0x3047aa),N(0x1,_0x2829ff(f))],g);var se=Object[_0x32e807(0x181)],oe=Object[_0x32e807(0x190)],ne=(_0x4d954b,_0x5666fe,_0x1fec59)=>_0x5666fe in _0x4d954b?se(_0x4d954b,_0x5666fe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fec59}):_0x4d954b[_0x5666fe]=_0x1fec59,ie=(_0x55092d,_0x4d1819,_0x595d7d,_0x432597)=>{const _0x3255a7=_0x32e807;for(var _0x2b3eef=_0x432597>0x1?void 0x0:_0x432597?oe(_0x4d1819,_0x595d7d):_0x4d1819,_0x538402=_0x55092d[_0x3255a7(0x14e)]-0x1,_0x48f900;_0x538402>=0x0;_0x538402--)(_0x48f900=_0x55092d[_0x538402])&&(_0x2b3eef=_0x48f900(_0x2b3eef)||_0x2b3eef);return _0x2b3eef;},w=(_0x53b011,_0x2ecc64)=>(_0x5e7c5d,_0x2ee9b0)=>_0x2ecc64(_0x5e7c5d,_0x2ee9b0,_0x53b011),$=(_0x3411e5,_0x5b2c1f,_0x50df34)=>ne(_0x3411e5,typeof _0x5b2c1f!=_0x32e807(0x18d)?_0x5b2c1f+'':_0x5b2c1f,_0x50df34);let b=class extends _0x5d5f99{constructor(_0x5336b5=M,_0x136ddf,_0x57007d){const _0xb2cbb2=_0x32e807;super(),this['_config']=_0x5336b5,this[_0xb2cbb2(0x145)]=_0x136ddf,this['_configService']=_0x57007d;const {..._0x15e441}=_0x1eb38a({},M,this[_0xb2cbb2(0x17b)]);this['_configService'][_0xb2cbb2(0x16c)](z,_0x15e441);}[_0x32e807(0x161)](){const _0x59456f=_0x32e807;[[f],[g],[S]][_0x59456f(0x173)](_0x4667ce=>{const _0x5688b0=_0x59456f;this[_0x5688b0(0x145)][_0x5688b0(0x172)](_0x4667ce);});}[_0x32e807(0x199)](){const _0x59d14f=_0x32e807;this['_injector'][_0x59d14f(0x176)](g),this[_0x59d14f(0x145)][_0x59d14f(0x176)](S);}};$(b,_0x32e807(0x157),W),$(b,_0x32e807(0x166),_0xd4c5e1[_0x32e807(0x180)]),b=ie([_0xe03605(_0x2bfb63,_0x40e60c,_0xcfd646),w(0x1,_0x2829ff(_0x2a4fc8)),w(0x2,_0x5c82ef)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x14fe87=_0x550a;(function(_0x3e5fdc,_0xcfc828){const _0xe02125=_0x550a,_0x3f5691=_0x3e5fdc();while(!![]){try{const _0x291b23=-parseInt(_0xe02125(0x16b))/0x1*(parseInt(_0xe02125(0x12c))/0x2)+-parseInt(_0xe02125(0x13d))/0x3*(parseInt(_0xe02125(0x16e))/0x4)+parseInt(_0xe02125(0x14d))/0x5+-parseInt(_0xe02125(0x156))/0x6+-parseInt(_0xe02125(0x127))/0x7+-parseInt(_0xe02125(0x15c))/0x8+parseInt(_0xe02125(0x11c))/0x9;if(_0x291b23===_0xcfc828)break;else _0x3f5691['push'](_0x3f5691['shift']());}catch(_0x4e32f8){_0x3f5691['push'](_0x3f5691['shift']());}}}(_0x50e0,0x2875b));import{CommentService as _0x370e38,CollaborationSessionService as _0x20eae3,UniverCollaborationClientPlugin as _0x16f4be}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2329d3}from'@univerjs-pro/license';import{dayjs as _0x5451cd,UserManagerService as _0x13e1e2,Inject as _0x501b2f,Injector as _0x52d9c7,Disposable as _0x184ef4,CustomRangeType as _0x25e50d,UniverInstanceType as _0x23ecc4,DependentOn as _0xb7eb1d,IConfigService as _0x3cd729,Plugin as _0x2b45ac,merge as _0x378f6c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x373e94}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411ef0,IThreadCommentDataSourceService as _0x1e191d}from'@univerjs/thread-comment';import{bufferTime as _0x31be06}from'rxjs';import{HTTPService as _0x4c4d5}from'@univerjs/network';const W=_0x14fe87(0x151);function _0x50e0(){const _0x5331db=['saveCommentToSnapshot','231164qOjSWm','resolved','getUnit','filter','_init','parse','Edit','format','forEach','onReady','_initUserSync','dataSource','rangeType','threadId','comments','post','addUser','onStarting','_injector','add','find','addComment','requireSession','6826392nISkpA','_threadCommentModel','/universer-api/user/list','get','Solve','resolveComment','getUser','commentUpdate$','Delete','/edit','_config','1250501FYlmPQ','_configService','slice','solved','type','227622orWOyY','userId','delete','userID','users','parentId','getMemberID','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','listComments','reply','OpenOrReOpen','replies','Unknown','symbol','replyId','12EdKMaK','/universer-api/comment/unit/','/solved','ref','content','subscribe','body','_httpService','deleteComment','error','payload','customRanges','/reply','getComment','getCurrentUser','length','569850qUDlqy','rangeId','defineProperty','_initDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','UNRECOGNIZED','_userService','createTimestamp','406452zwvHAI','root','syncUpdateMutationToColla','_threadCommentDataSourceService','map','_threadCommentDataSource','12512kYyrfL','personId','COMMENT','unitId','YYYY/MM/DD\x20HH:mm','comment','updateComment','/delete','disposeWithMe','_commentService','/list','code','pluginName','Add','user','2vpsimn','_sessionService'];_0x50e0=function(){return _0x5331db;};return _0x50e0();}var I=(_0x7edf1b=>(_0x7edf1b[_0x7edf1b[_0x14fe87(0x138)]=0x0]='OpenOrReOpen',_0x7edf1b[_0x7edf1b[_0x14fe87(0x134)]=0x1]='Solved',_0x7edf1b[_0x7edf1b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x7edf1b))(I||{}),v=(_0x4169a2=>(_0x4169a2[_0x4169a2[_0x14fe87(0x13a)]=0x0]=_0x14fe87(0x13a),_0x4169a2[_0x4169a2['Add']=0x1]='Add',_0x4169a2[_0x4169a2[_0x14fe87(0x152)]=0x2]='Reply',_0x4169a2[_0x4169a2['Edit']=0x3]='Edit',_0x4169a2[_0x4169a2[_0x14fe87(0x124)]=0x4]='Delete',_0x4169a2[_0x4169a2[_0x14fe87(0x120)]=0x5]=_0x14fe87(0x120),_0x4169a2[_0x4169a2[_0x14fe87(0x153)]=-0x1]=_0x14fe87(0x153),_0x4169a2))(v||{});const D=_0x5e2c44=>_0x5451cd(new Date(+_0x5e2c44))[_0x14fe87(0x175)](_0x14fe87(0x160)),B=async(_0x4deeae,_0x29d8fc)=>{const _0x183f00=_0x14fe87,_0x56096c=_0x4deeae['get'](_0x13e1e2),_0x28498d=_0x4deeae[_0x183f00(0x11f)](_0x4c4d5);_0x29d8fc['forEach'](_0x2d815d=>{const _0x294422=_0x183f00;_0x56096c[_0x294422(0x122)](_0x2d815d)&&_0x29d8fc[_0x294422(0x12e)](_0x2d815d);}),_0x29d8fc['size']&&(await _0x28498d[_0x183f00(0x11f)](_0x183f00(0x11e),{'params':{'userIDs':[..._0x29d8fc]}}))[_0x183f00(0x143)][_0x183f00(0x130)][_0x183f00(0x176)](_0x12450b=>{const _0x41cc58=_0x183f00;_0x12450b&&_0x56096c[_0x41cc58(0x115)](_0x12450b);});};var K=Object[_0x14fe87(0x135)],V=(_0x14f770,_0x15498d,_0x4153aa,_0x2851b5)=>{for(var _0x36ce82=_0x2851b5>0x1?void 0x0:_0x2851b5?K(_0x15498d,_0x4153aa):_0x15498d,_0x2fea50=_0x14f770['length']-0x1,_0x32110b;_0x2fea50>=0x0;_0x2fea50--)(_0x32110b=_0x14f770[_0x2fea50])&&(_0x36ce82=_0x32110b(_0x36ce82)||_0x36ce82);return _0x36ce82;},p=(_0x3e349a,_0x29d1a1)=>(_0x228bdf,_0x59b440)=>_0x29d1a1(_0x228bdf,_0x59b440,_0x3e349a);let S=class extends _0x184ef4{constructor(_0x3b063f,_0x19eff5,_0x1ea584,_0xfb5006){const _0x43ee99=_0x14fe87;super(),this[_0x43ee99(0x165)]=_0x3b063f,this[_0x43ee99(0x11d)]=_0x19eff5,this[_0x43ee99(0x154)]=_0x1ea584,this[_0x43ee99(0x117)]=_0xfb5006,this['_init'](),this[_0x43ee99(0x10f)]();}[_0x14fe87(0x10f)](){const _0x2156ad=_0x14fe87;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x31be06(0x10))[_0x2156ad(0x142)](_0x35e8e2=>{const _0x14b0bc=_0x2156ad,_0x38ebfc=new Set();_0x35e8e2[_0x14b0bc(0x176)](_0x2dcffe=>{const _0x18ad29=_0x14b0bc;switch(_0x2dcffe[_0x18ad29(0x12b)]){case _0x18ad29(0x118):{const _0x5462c7=_0x2dcffe[_0x18ad29(0x147)][_0x18ad29(0x15d)];_0x38ebfc[_0x18ad29(0x118)](_0x5462c7);break;}}}),B(this[_0x14b0bc(0x117)],_0x38ebfc);}));}[_0x14fe87(0x172)](){const _0x1da4ec=_0x14fe87;this[_0x1da4ec(0x164)](this[_0x1da4ec(0x165)][_0x1da4ec(0x123)]['subscribe'](async _0x19f800=>{const _0x4e49fe=_0x1da4ec;var _0x431ddb,_0x2cf350,_0x2e3840,_0x217151;const _0x225910=(_0x431ddb=this[_0x4e49fe(0x11d)]['getUnit'](_0x19f800[_0x4e49fe(0x15f)])[_0x4e49fe(0x119)](_0x5d27e7=>_0x5d27e7[_0x4e49fe(0x112)]===_0x19f800[_0x4e49fe(0x112)]))==null?void 0x0:_0x431ddb[_0x4e49fe(0x157)];if(!_0x225910)return;const {unitId:_0x5d0ead,subUnitId:_0x4afa41}=_0x225910;switch(_0x19f800[_0x4e49fe(0x16a)]&&this[_0x4e49fe(0x154)][_0x4e49fe(0x115)](_0x19f800[_0x4e49fe(0x16a)]),_0x19f800['type']){case v[_0x4e49fe(0x169)]:break;case v['Reply']:{this[_0x4e49fe(0x11d)][_0x4e49fe(0x11a)](_0x5d0ead,_0x4afa41,{'unitId':_0x5d0ead,'subUnitId':_0x4afa41,'ref':'','id':_0x19f800[_0x4e49fe(0x13c)],'dT':D(+_0x19f800[_0x4e49fe(0x155)]),'threadId':_0x19f800[_0x4e49fe(0x112)],'personId':(_0x2e3840=(_0x2cf350=_0x19f800[_0x4e49fe(0x16a)])==null?void 0x0:_0x2cf350[_0x4e49fe(0x12f)])!=null?_0x2e3840:_0x19f800[_0x4e49fe(0x12d)],'text':JSON[_0x4e49fe(0x173)](_0x19f800['content']),'parentId':_0x225910['id']});break;}case v[_0x4e49fe(0x124)]:{const _0x426820=this[_0x4e49fe(0x11d)][_0x4e49fe(0x14a)](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);_0x426820&&_0x426820[_0x4e49fe(0x131)]&&this[_0x4e49fe(0x11d)]['deleteComment'](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);break;}case v[_0x4e49fe(0x174)]:{this['_threadCommentModel']['updateComment'](_0x5d0ead,_0x4afa41,{'commentId':_0x19f800[_0x4e49fe(0x13c)],'text':JSON['parse'](_0x19f800[_0x4e49fe(0x141)])});break;}case v[_0x4e49fe(0x120)]:{const _0x8d282d=(_0x217151=this['_threadCommentModel'][_0x4e49fe(0x170)](_0x19f800['unitId'])[_0x4e49fe(0x119)](_0x46a2d2=>_0x46a2d2['threadId']===_0x19f800['threadId']))==null?void 0x0:_0x217151[_0x4e49fe(0x157)];_0x8d282d&&this['_threadCommentModel'][_0x4e49fe(0x121)](_0x5d0ead,_0x4afa41,_0x8d282d['id'],_0x19f800['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x501b2f(_0x370e38)),p(0x1,_0x501b2f(_0x411ef0)),p(0x2,_0x501b2f(_0x13e1e2)),p(0x3,_0x501b2f(_0x52d9c7))],S);const z='thread-comment-data-source.config',M={};function _0x550a(_0x588913,_0x3e9637){const _0x50e00a=_0x50e0();return _0x550a=function(_0x550a5f,_0x58bb64){_0x550a5f=_0x550a5f-0x10e;let _0x1e0c82=_0x50e00a[_0x550a5f];return _0x1e0c82;},_0x550a(_0x588913,_0x3e9637);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x4ecbc7,_0x5b0204,_0x2f09f0,_0x26b6dd)=>{const _0x34e6ed=_0x14fe87;for(var _0x3480a0=_0x26b6dd>0x1?void 0x0:_0x26b6dd?k(_0x5b0204,_0x2f09f0):_0x5b0204,_0x59db60=_0x4ecbc7[_0x34e6ed(0x14c)]-0x1,_0x47eb12;_0x59db60>=0x0;_0x59db60--)(_0x47eb12=_0x4ecbc7[_0x59db60])&&(_0x3480a0=_0x47eb12(_0x3480a0)||_0x3480a0);return _0x3480a0;},_=(_0x3c2d54,_0x5952ad)=>(_0x427148,_0x1e1f5a)=>_0x5952ad(_0x427148,_0x1e1f5a,_0x3c2d54);function X(_0x1cebe6,_0x3a0305){const _0x39dd61=_0x14fe87,_0x332258=_0x1cebe6[_0x39dd61(0x139)][0x0];return{..._0x3a0305,'id':_0x332258[_0x39dd61(0x13c)],'resolved':_0x1cebe6[_0x39dd61(0x12a)]===0x1,'dT':D(_0x332258['createTimestamp']),'personId':_0x332258[_0x39dd61(0x12d)],'threadId':_0x332258[_0x39dd61(0x112)]};}function ee(_0x276c32,_0x1be564,_0x5315bc){const _0x2ba868=_0x14fe87;var _0x691c08,_0x501892;if(((_0x501892=(_0x691c08=_0x276c32==null?void 0x0:_0x276c32['replies'])==null?void 0x0:_0x691c08[_0x2ba868(0x14c)])!=null?_0x501892:0x0)>0x0){const _0x49342a=(_0x19ae3a,_0x3d4984)=>({'id':_0x19ae3a[_0x2ba868(0x13c)],'threadId':_0x19ae3a[_0x2ba868(0x112)],'dT':D(_0x19ae3a['createTimestamp']),'personId':_0x19ae3a[_0x2ba868(0x12d)],'resolved':_0x276c32[_0x2ba868(0x12a)]===I[_0x2ba868(0x134)],'unitId':_0x1be564,'subUnitId':_0x5315bc,'text':JSON[_0x2ba868(0x173)](_0x19ae3a[_0x2ba868(0x141)]),'parentId':_0x3d4984}),_0x47e9a3=_0x49342a(_0x276c32[_0x2ba868(0x139)][0x0]);return{..._0x47e9a3,'children':_0x276c32[_0x2ba868(0x139)][_0x2ba868(0x129)](0x1)['map'](_0x1ab738=>_0x49342a(_0x1ab738,_0x47e9a3['id']))};}return null;}let f=class{constructor(_0xd7c416,_0x8a2ce3,_0x2c5ddf,_0x4ef894){const _0x16b0c2=_0x14fe87;this[_0x16b0c2(0x144)]=_0xd7c416,this['_userService']=_0x8a2ce3,this[_0x16b0c2(0x16c)]=_0x2c5ddf,this[_0x16b0c2(0x117)]=_0x4ef894;}async['addComment'](_0x4abe44){const _0x2ff5b4=_0x14fe87;var _0xd235ae,_0x367437;const {parentId:_0x5203de,unitId:_0x4e41be,text:_0x3a45ba,threadId:_0xa9cda1}=_0x4abe44,_0x3f0477=(_0x367437=(_0xd235ae=_0x3a45ba['customRanges'])==null?void 0x0:_0xd235ae[_0x2ff5b4(0x171)](_0x3101fc=>_0x3101fc[_0x2ff5b4(0x111)]===_0x25e50d['COMMENT'])[_0x2ff5b4(0x15a)](_0x59212b=>_0x59212b[_0x2ff5b4(0x14e)]))!=null?_0x367437:[],_0xd76736=JSON['stringify'](_0x3a45ba),_0x3d21c5=(await this[_0x2ff5b4(0x16c)][_0x2ff5b4(0x11b)](_0x4e41be))[_0x2ff5b4(0x132)]();if(_0x5203de){const _0xe777ce={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477,'threadId':_0xa9cda1},_0x5eeeaa=(await this['_httpService'][_0x2ff5b4(0x114)]('/universer-api/comment/unit/'+_0x4e41be+_0x2ff5b4(0x149),{'body':_0xe777ce}))[_0x2ff5b4(0x143)][_0x2ff5b4(0x137)];return{..._0x4abe44,'id':_0x5eeeaa[_0x2ff5b4(0x13c)],'dT':_0x5451cd(+_0x5eeeaa[_0x2ff5b4(0x155)])[_0x2ff5b4(0x175)](_0x2ff5b4(0x160)),'personId':_0x5eeeaa[_0x2ff5b4(0x12d)]};}else{const _0x428945={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477},_0x380ffd=await this['_httpService'][_0x2ff5b4(0x114)](_0x2ff5b4(0x13e)+_0x4e41be+'/add',{'body':_0x428945});return X(_0x380ffd['body'][_0x2ff5b4(0x161)],_0x4abe44);}}async[_0x14fe87(0x162)](_0x12eed5){const _0x45351e=_0x14fe87;var _0x4155d,_0x7e10e5;const {text:_0x9d72a5,unitId:_0x22ff29}=_0x12eed5,_0x472046=(_0x7e10e5=(_0x4155d=_0x9d72a5[_0x45351e(0x148)])==null?void 0x0:_0x4155d['filter'](_0x49245d=>_0x49245d['rangeType']===_0x25e50d[_0x45351e(0x15e)])[_0x45351e(0x15a)](_0x35498f=>_0x35498f[_0x45351e(0x14e)]))!=null?_0x7e10e5:[],_0x426dd6=JSON['stringify'](_0x9d72a5),_0x20e637=_0x12eed5[_0x45351e(0x112)],_0x4c0f20=_0x12eed5['id'],_0x505ef2={'memberId':(await this['_sessionService'][_0x45351e(0x11b)](_0x22ff29))[_0x45351e(0x132)](),'unitId':_0x22ff29,'threadId':_0x20e637,'mention':_0x472046,'content':_0x426dd6,'replyId':_0x4c0f20},_0x47d444=await this[_0x45351e(0x144)][_0x45351e(0x114)](_0x45351e(0x13e)+_0x22ff29+_0x45351e(0x125),{'body':_0x505ef2});return!_0x47d444['body']['error']||_0x47d444[_0x45351e(0x143)][_0x45351e(0x146)][_0x45351e(0x167)]===0x1;}async['resolveComment'](_0x2c206b){const _0x5bcf3b=_0x14fe87,{unitId:_0x4f7161}=_0x2c206b,_0x24f266=_0x2c206b[_0x5bcf3b(0x112)],_0x3f39f5={'memberId':this[_0x5bcf3b(0x154)][_0x5bcf3b(0x14b)]()['userID'],'unitId':_0x4f7161,'threadId':_0x24f266,'solved':_0x2c206b[_0x5bcf3b(0x16f)]?I[_0x5bcf3b(0x134)]:I[_0x5bcf3b(0x138)]},_0x31e259=await this[_0x5bcf3b(0x144)][_0x5bcf3b(0x114)](_0x5bcf3b(0x13e)+_0x4f7161+_0x5bcf3b(0x13f),{'body':_0x3f39f5});return!_0x31e259[_0x5bcf3b(0x143)]['error']||_0x31e259['body'][_0x5bcf3b(0x146)][_0x5bcf3b(0x167)]===0x1;}async[_0x14fe87(0x145)](_0x24a092,_0x50d614,_0x506e1f,_0x35ac7c){const _0x48614a=_0x14fe87,_0x4e61bd={'memberId':(await this[_0x48614a(0x16c)][_0x48614a(0x11b)](_0x24a092))[_0x48614a(0x132)](),'threadId':_0x506e1f,'replyId':_0x35ac7c,'unitId':_0x24a092},_0x132653=await this[_0x48614a(0x144)][_0x48614a(0x114)]('/universer-api/comment/unit/'+_0x24a092+_0x48614a(0x163),{'body':_0x4e61bd});return!_0x132653[_0x48614a(0x143)]['error']||_0x132653[_0x48614a(0x143)][_0x48614a(0x146)][_0x48614a(0x167)]===0x1;}async[_0x14fe87(0x136)](_0x3f86e0,_0x504b53,_0x33ed90){const _0x55c5f5=_0x14fe87,_0x341737={'unitId':_0x3f86e0,'threadId':_0x33ed90},_0x4eff9c=await this[_0x55c5f5(0x144)][_0x55c5f5(0x114)]('/universer-api/comment/unit/'+_0x3f86e0+_0x55c5f5(0x166),{'body':_0x341737}),_0x208cdc=_0x33ed90['map'](_0x239b7d=>ee(_0x4eff9c['body'][_0x55c5f5(0x113)][_0x239b7d],_0x3f86e0,_0x504b53))['filter'](Boolean);return Object['values'](_0x4eff9c[_0x55c5f5(0x143)][_0x55c5f5(0x130)])[_0x55c5f5(0x176)](_0x4e6568=>{const _0x59b996=_0x55c5f5;this['_userService'][_0x59b996(0x115)](_0x4e6568);}),_0x208cdc;}[_0x14fe87(0x16d)](_0x198744){const _0x21218a=_0x14fe87;return{'id':_0x198744['id'],'threadId':_0x198744[_0x21218a(0x112)],'ref':_0x198744[_0x21218a(0x140)]};}};f=Q([_(0x0,_0x501b2f(_0x4c4d5)),_(0x1,_0x501b2f(_0x13e1e2)),_(0x2,_0x501b2f(_0x20eae3)),_(0x3,_0x501b2f(_0x52d9c7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x14fc53,_0x34c0e6,_0x1cb31f,_0x31bde9)=>{const _0x370b18=_0x14fe87;for(var _0x123cd7=_0x31bde9>0x1?void 0x0:_0x31bde9?re(_0x34c0e6,_0x1cb31f):_0x34c0e6,_0x4aa950=_0x14fc53[_0x370b18(0x14c)]-0x1,_0x535ef5;_0x4aa950>=0x0;_0x4aa950--)(_0x535ef5=_0x14fc53[_0x4aa950])&&(_0x123cd7=_0x535ef5(_0x123cd7)||_0x123cd7);return _0x123cd7;},N=(_0x4e876d,_0x62ab23)=>(_0x58b82f,_0x49a60f)=>_0x62ab23(_0x58b82f,_0x49a60f,_0x4e876d);let g=class extends _0x184ef4{constructor(_0x1aa92d,_0x4ffa6a){const _0x4e0a11=_0x14fe87;super(),this[_0x4e0a11(0x159)]=_0x1aa92d,this[_0x4e0a11(0x15b)]=_0x4ffa6a,this[_0x4e0a11(0x150)]();}[_0x14fe87(0x150)](){const _0x569b2b=_0x14fe87;this[_0x569b2b(0x159)][_0x569b2b(0x110)]=this['_threadCommentDataSource'],this[_0x569b2b(0x159)][_0x569b2b(0x158)]=!0x1;}};g=te([N(0x0,_0x1e191d),N(0x1,_0x501b2f(f))],g);var se=Object[_0x14fe87(0x14f)],oe=Object[_0x14fe87(0x135)],ne=(_0x95357b,_0x2d6151,_0x41f584)=>_0x2d6151 in _0x95357b?se(_0x95357b,_0x2d6151,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41f584}):_0x95357b[_0x2d6151]=_0x41f584,ie=(_0x5e5ebf,_0x2b0242,_0x50f175,_0x59f72f)=>{const _0x3cf60c=_0x14fe87;for(var _0x2effe0=_0x59f72f>0x1?void 0x0:_0x59f72f?oe(_0x2b0242,_0x50f175):_0x2b0242,_0x22a21d=_0x5e5ebf[_0x3cf60c(0x14c)]-0x1,_0x403070;_0x22a21d>=0x0;_0x22a21d--)(_0x403070=_0x5e5ebf[_0x22a21d])&&(_0x2effe0=_0x403070(_0x2effe0)||_0x2effe0);return _0x2effe0;},w=(_0x18445c,_0x350fd2)=>(_0x45a7b7,_0xebc472)=>_0x350fd2(_0x45a7b7,_0xebc472,_0x18445c),$=(_0x37f2ce,_0x857101,_0x51ccde)=>ne(_0x37f2ce,typeof _0x857101!=_0x14fe87(0x13b)?_0x857101+'':_0x857101,_0x51ccde);let b=class extends _0x2b45ac{constructor(_0x39b587=M,_0x3df0c6,_0x11d241){const _0x601996=_0x14fe87;super(),this[_0x601996(0x126)]=_0x39b587,this[_0x601996(0x117)]=_0x3df0c6,this[_0x601996(0x128)]=_0x11d241;const {..._0x4e1010}=_0x378f6c({},M,this[_0x601996(0x126)]);this[_0x601996(0x128)]['setConfig'](z,_0x4e1010);}[_0x14fe87(0x116)](){const _0x314d03=_0x14fe87;[[f],[g],[S]][_0x314d03(0x176)](_0xacdcfa=>{const _0x1283e2=_0x314d03;this[_0x1283e2(0x117)][_0x1283e2(0x118)](_0xacdcfa);});}[_0x14fe87(0x10e)](){const _0x5c4c46=_0x14fe87;this['_injector']['get'](g),this[_0x5c4c46(0x117)][_0x5c4c46(0x11f)](S);}};$(b,_0x14fe87(0x168),W),$(b,'type',_0x23ecc4[_0x14fe87(0x133)]),b=ie([_0xb7eb1d(_0x373e94,_0x16f4be,_0x2329d3),w(0x1,_0x501b2f(_0x52d9c7)),w(0x2,_0x3cd729)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x23c6(){const _0xc1d6b9=['type','UniverProCollaborationClient','resolveComment','length','subscribe','Unknown','UniverProThreadCommentDatasource','IThreadCommentDataSourceService','forEach','rxjs','2518824CeNMHV','user','parentId','get','personId','ThreadCommentModel','UniverCollaborationClientPlugin','2185794uiHNpa','Disposable','_configService','Solve','UniverLicensePlugin','UniverInstanceType','delete','resolved','Edit','_httpService','UniverProLicense','requireSession','listComments','users','symbol','getComment','IConfigService','979PxONii','/universer-api/comment/unit/','CommentService','UniverThreadCommentDataSourcePlugin','threadId','format','size','getUser','body','add','/add','/list','comment','_config','syncUpdateMutationToColla','Add','pipe','commentUpdate$','merge','slice','updateComment','875244CMptyc','_threadCommentModel','4hnMbNM','127930YZJzOK','payload','814zUnoqe','setConfig','replies','amd','Reply','25063116sGGKKt','@univerjs-pro/license','getMemberID','_threadCommentDataSourceService','/solved','values','UniverNetwork','parse','@univerjs/core','deleteComment','/universer-api/user/list','_initDataSource','CollaborationSessionService','unitId','_threadCommentDataSource','reply','rangeType','7JhvkaE','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','replyId','post','_initUserSync','userId','@univerjs/thread-comment-ui','UNRECOGNIZED','find','addComment','_init','defineProperty','rangeId','/delete','getCurrentUser','createTimestamp','Module','disposeWithMe','Delete','684YLorFO','content','stringify','UniverCore','/reply','addUser','_commentService','getUnit','@univerjs/network','Inject','solved','code','Injector','toStringTag','onReady','Plugin','HTTPService','function','map','OpenOrReOpen','_userService','/edit','@univerjs/thread-comment','comments','object','customRanges','CustomRangeType','11AvXBTb','COMMENT','error','_sessionService','saveCommentToSnapshot','Solved','filter','dayjs','DependentOn','_injector','pluginName','thread-comment-data-source.config','UserManagerService','2697310ZoLcvA'];_0x23c6=function(){return _0xc1d6b9;};return _0x23c6();}function _0xcabc(_0x268a6d,_0x29f57f){const _0x23c6eb=_0x23c6();return _0xcabc=function(_0xcabce5,_0x2a9ea4){_0xcabce5=_0xcabce5-0xa9;let _0x318bb9=_0x23c6eb[_0xcabce5];return _0x318bb9;},_0xcabc(_0x268a6d,_0x29f57f);}(function(_0x3ca7fd,_0x1c5ec8){const _0x5e7c48=_0xcabc,_0x126a44=_0x3ca7fd();while(!![]){try{const _0x43eefa=-parseInt(_0x5e7c48(0x135))/0x1*(parseInt(_0x5e7c48(0xc0))/0x2)+parseInt(_0x5e7c48(0xbb))/0x3*(parseInt(_0x5e7c48(0xbd))/0x4)+-parseInt(_0x5e7c48(0x112))/0x5+parseInt(_0x5e7c48(0x124))/0x6+parseInt(_0x5e7c48(0xd6))/0x7*(-parseInt(_0x5e7c48(0x11d))/0x8)+parseInt(_0x5e7c48(0xea))/0x9*(-parseInt(_0x5e7c48(0xbe))/0xa)+parseInt(_0x5e7c48(0x105))/0xb*(parseInt(_0x5e7c48(0xc5))/0xc);if(_0x43eefa===_0x1c5ec8)break;else _0x126a44['push'](_0x126a44['shift']());}catch(_0x36c7b1){_0x126a44['push'](_0x126a44['shift']());}}}(_0x23c6,0x7edb4),function(_0x37ec81,_0x5d062c){const _0x5cf8a1=_0xcabc;typeof exports==_0x5cf8a1(0x102)&&typeof module<'u'?_0x5d062c(exports,require(_0x5cf8a1(0xd7)),require(_0x5cf8a1(0xc6)),require(_0x5cf8a1(0xcd)),require('@univerjs/thread-comment-ui'),require(_0x5cf8a1(0x100)),require(_0x5cf8a1(0x11c)),require(_0x5cf8a1(0xf2))):typeof define==_0x5cf8a1(0xfb)&&define[_0x5cf8a1(0xc3)]?define(['exports',_0x5cf8a1(0xd7),_0x5cf8a1(0xc6),_0x5cf8a1(0xcd),_0x5cf8a1(0xdd),_0x5cf8a1(0x100),'rxjs',_0x5cf8a1(0xf2)],_0x5d062c):(_0x37ec81=typeof globalThis<'u'?globalThis:_0x37ec81||self,_0x5d062c(_0x37ec81[_0x5cf8a1(0x119)]={},_0x37ec81[_0x5cf8a1(0x114)],_0x37ec81[_0x5cf8a1(0x12e)],_0x37ec81[_0x5cf8a1(0xed)],_0x37ec81['UniverThreadCommentUi'],_0x37ec81['UniverThreadComment'],_0x37ec81[_0x5cf8a1(0x11c)],_0x37ec81[_0x5cf8a1(0xcb)]));}(this,function(_0x436e08,_0x9d204b,_0x39e458,_0x3777e4,_0x24e3d7,_0xabdbc4,_0x3069ce,_0x47855e){'use strict';const _0x5dba39=_0xcabc;const _0x48cf41='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x583558=(_0x5c76b6=>(_0x5c76b6[_0x5c76b6[_0x5dba39(0xfd)]=0x0]=_0x5dba39(0xfd),_0x5c76b6[_0x5c76b6[_0x5dba39(0x10a)]=0x1]=_0x5dba39(0x10a),_0x5c76b6[_0x5c76b6[_0x5dba39(0xde)]=-0x1]='UNRECOGNIZED',_0x5c76b6))(_0x583558||{}),_0x329f22=(_0x4dd219=>(_0x4dd219[_0x4dd219[_0x5dba39(0x118)]=0x0]=_0x5dba39(0x118),_0x4dd219[_0x4dd219['Add']=0x1]=_0x5dba39(0xb5),_0x4dd219[_0x4dd219[_0x5dba39(0xc4)]=0x2]='Reply',_0x4dd219[_0x4dd219[_0x5dba39(0x12c)]=0x3]=_0x5dba39(0x12c),_0x4dd219[_0x4dd219[_0x5dba39(0xe9)]=0x4]=_0x5dba39(0xe9),_0x4dd219[_0x4dd219[_0x5dba39(0x127)]=0x5]=_0x5dba39(0x127),_0x4dd219[_0x4dd219[_0x5dba39(0xde)]=-0x1]=_0x5dba39(0xde),_0x4dd219))(_0x329f22||{});const _0x37df52=_0x1ccfd4=>_0x3777e4['dayjs'](new Date(+_0x1ccfd4))[_0x5dba39(0xab)]('YYYY/MM/DD\x20HH:mm'),_0xd96371=async(_0x1c3ac5,_0x36e96c)=>{const _0x2913d3=_0x5dba39,_0x29f621=_0x1c3ac5[_0x2913d3(0x120)](_0x3777e4[_0x2913d3(0x111)]),_0x49a08f=_0x1c3ac5[_0x2913d3(0x120)](_0x47855e['HTTPService']);_0x36e96c[_0x2913d3(0x11b)](_0x136568=>{const _0x4511d2=_0x2913d3;_0x29f621[_0x4511d2(0xad)](_0x136568)&&_0x36e96c[_0x4511d2(0x12a)](_0x136568);}),_0x36e96c[_0x2913d3(0xac)]&&(await _0x49a08f[_0x2913d3(0x120)](_0x2913d3(0xcf),{'params':{'userIDs':[..._0x36e96c]}}))[_0x2913d3(0xae)]['users'][_0x2913d3(0x11b)](_0x2f596e=>{const _0x3ae5a0=_0x2913d3;_0x2f596e&&_0x29f621[_0x3ae5a0(0xef)](_0x2f596e);});};var _0x38b556=Object['getOwnPropertyDescriptor'],_0x388c65=(_0x301c6d,_0x296be0,_0x431eae,_0x4a9911)=>{const _0x11af2b=_0x5dba39;for(var _0x3aa80d=_0x4a9911>0x1?void 0x0:_0x4a9911?_0x38b556(_0x296be0,_0x431eae):_0x296be0,_0x59b883=_0x301c6d[_0x11af2b(0x116)]-0x1,_0x17b0d0;_0x59b883>=0x0;_0x59b883--)(_0x17b0d0=_0x301c6d[_0x59b883])&&(_0x3aa80d=_0x17b0d0(_0x3aa80d)||_0x3aa80d);return _0x3aa80d;},_0xceaef5=(_0x40afa7,_0x2956d7)=>(_0xd8b5e3,_0x2b4ff8)=>_0x2956d7(_0xd8b5e3,_0x2b4ff8,_0x40afa7);let _0x31d783=class extends _0x3777e4['Disposable']{constructor(_0x4f7e64,_0x4a9109,_0x4628ac,_0x18509d){const _0x2ea4c2=_0x5dba39;super(),this[_0x2ea4c2(0xf0)]=_0x4f7e64,this[_0x2ea4c2(0xbc)]=_0x4a9109,this[_0x2ea4c2(0xfe)]=_0x4628ac,this[_0x2ea4c2(0x10e)]=_0x18509d,this[_0x2ea4c2(0xe1)](),this['_initUserSync']();}[_0x5dba39(0xdb)](){const _0x3eef96=_0x5dba39;this['disposeWithMe'](this['_threadCommentModel'][_0x3eef96(0xb7)][_0x3eef96(0xb6)](_0x3069ce['bufferTime'](0x10))[_0x3eef96(0x117)](_0x4a41ab=>{const _0x9a6dda=_0x3eef96,_0x2997ec=new Set();_0x4a41ab[_0x9a6dda(0x11b)](_0x37ff32=>{const _0x4482af=_0x9a6dda;switch(_0x37ff32[_0x4482af(0x113)]){case _0x4482af(0xaf):{const _0x349020=_0x37ff32[_0x4482af(0xbf)][_0x4482af(0x121)];_0x2997ec['add'](_0x349020);break;}}}),_0xd96371(this['_injector'],_0x2997ec);}));}[_0x5dba39(0xe1)](){const _0x383714=_0x5dba39;this[_0x383714(0xe8)](this[_0x383714(0xf0)][_0x383714(0xb7)][_0x383714(0x117)](async _0xad7a3a=>{const _0x1af3af=_0x383714;var _0x140ca6,_0x3e1ed4,_0x4b6f8c,_0x267a2b;const _0x2ab658=(_0x140ca6=this['_threadCommentModel'][_0x1af3af(0xf1)](_0xad7a3a[_0x1af3af(0xd2)])[_0x1af3af(0xdf)](_0x236fea=>_0x236fea[_0x1af3af(0xaa)]===_0xad7a3a[_0x1af3af(0xaa)]))==null?void 0x0:_0x140ca6['root'];if(!_0x2ab658)return;const {unitId:_0xb5eca0,subUnitId:_0x91e78e}=_0x2ab658;switch(_0xad7a3a[_0x1af3af(0x11e)]&&this[_0x1af3af(0xfe)][_0x1af3af(0xef)](_0xad7a3a[_0x1af3af(0x11e)]),_0xad7a3a[_0x1af3af(0x113)]){case _0x329f22[_0x1af3af(0xb5)]:break;case _0x329f22[_0x1af3af(0xc4)]:{this[_0x1af3af(0xbc)][_0x1af3af(0xe0)](_0xb5eca0,_0x91e78e,{'unitId':_0xb5eca0,'subUnitId':_0x91e78e,'ref':'','id':_0xad7a3a[_0x1af3af(0xd9)],'dT':_0x37df52(+_0xad7a3a[_0x1af3af(0xe6)]),'threadId':_0xad7a3a[_0x1af3af(0xaa)],'personId':(_0x4b6f8c=(_0x3e1ed4=_0xad7a3a[_0x1af3af(0x11e)])==null?void 0x0:_0x3e1ed4['userID'])!=null?_0x4b6f8c:_0xad7a3a['userId'],'text':JSON[_0x1af3af(0xcc)](_0xad7a3a[_0x1af3af(0xeb)]),'parentId':_0x2ab658['id']});break;}case _0x329f22['Delete']:{const _0x47ba93=this['_threadCommentModel'][_0x1af3af(0x133)](_0xb5eca0,_0x91e78e,_0xad7a3a[_0x1af3af(0xd9)]);_0x47ba93&&_0x47ba93[_0x1af3af(0x11f)]&&this[_0x1af3af(0xbc)][_0x1af3af(0xce)](_0xb5eca0,_0x91e78e,_0xad7a3a[_0x1af3af(0xd9)]);break;}case _0x329f22['Edit']:{this[_0x1af3af(0xbc)][_0x1af3af(0xba)](_0xb5eca0,_0x91e78e,{'commentId':_0xad7a3a[_0x1af3af(0xd9)],'text':JSON[_0x1af3af(0xcc)](_0xad7a3a['content'])});break;}case _0x329f22['Solve']:{const _0x34e30d=(_0x267a2b=this[_0x1af3af(0xbc)][_0x1af3af(0xf1)](_0xad7a3a[_0x1af3af(0xd2)])[_0x1af3af(0xdf)](_0x251efd=>_0x251efd[_0x1af3af(0xaa)]===_0xad7a3a[_0x1af3af(0xaa)]))==null?void 0x0:_0x267a2b['root'];_0x34e30d&&this[_0x1af3af(0xbc)][_0x1af3af(0x115)](_0xb5eca0,_0x91e78e,_0x34e30d['id'],_0xad7a3a[_0x1af3af(0xf4)]===_0x583558[_0x1af3af(0x10a)]);break;}}}));}};_0x31d783=_0x388c65([_0xceaef5(0x0,_0x3777e4[_0x5dba39(0xf3)](_0x9d204b[_0x5dba39(0x137)])),_0xceaef5(0x1,_0x3777e4[_0x5dba39(0xf3)](_0xabdbc4[_0x5dba39(0x122)])),_0xceaef5(0x2,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0x111)])),_0xceaef5(0x3,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4['Injector']))],_0x31d783);const _0x47e529=_0x5dba39(0x110),_0x490629={};var _0x498a30=Object[_0x5dba39(0xd8)],_0x1d2106=(_0x1b4979,_0x1b372f,_0x4645d4,_0x3f5429)=>{const _0xc397bb=_0x5dba39;for(var _0xc9509e=_0x3f5429>0x1?void 0x0:_0x3f5429?_0x498a30(_0x1b372f,_0x4645d4):_0x1b372f,_0x12904e=_0x1b4979[_0xc397bb(0x116)]-0x1,_0x383cce;_0x12904e>=0x0;_0x12904e--)(_0x383cce=_0x1b4979[_0x12904e])&&(_0xc9509e=_0x383cce(_0xc9509e)||_0xc9509e);return _0xc9509e;},_0x39f735=(_0x168817,_0x1a8b2e)=>(_0x2bc438,_0xb91fc8)=>_0x1a8b2e(_0x2bc438,_0xb91fc8,_0x168817);function _0x4d3383(_0x1db3d8,_0x53ba04){const _0x2a9e8a=_0x5dba39,_0x369912=_0x1db3d8['replies'][0x0];return{..._0x53ba04,'id':_0x369912['replyId'],'resolved':_0x1db3d8[_0x2a9e8a(0xf4)]===0x1,'dT':_0x37df52(_0x369912['createTimestamp']),'personId':_0x369912['userId'],'threadId':_0x369912['threadId']};}function _0x56e0d3(_0x13b697,_0x312a61,_0x3b3639){const _0x3e81c4=_0x5dba39;var _0xfa6b1c,_0x3d945a;if(((_0x3d945a=(_0xfa6b1c=_0x13b697==null?void 0x0:_0x13b697[_0x3e81c4(0xc2)])==null?void 0x0:_0xfa6b1c[_0x3e81c4(0x116)])!=null?_0x3d945a:0x0)>0x0){const _0x32bb42=(_0xf8a5a4,_0x251707)=>({'id':_0xf8a5a4[_0x3e81c4(0xd9)],'threadId':_0xf8a5a4[_0x3e81c4(0xaa)],'dT':_0x37df52(_0xf8a5a4[_0x3e81c4(0xe6)]),'personId':_0xf8a5a4[_0x3e81c4(0xdc)],'resolved':_0x13b697[_0x3e81c4(0xf4)]===_0x583558[_0x3e81c4(0x10a)],'unitId':_0x312a61,'subUnitId':_0x3b3639,'text':JSON['parse'](_0xf8a5a4[_0x3e81c4(0xeb)]),'parentId':_0x251707}),_0xc3fef2=_0x32bb42(_0x13b697[_0x3e81c4(0xc2)][0x0]);return{..._0xc3fef2,'children':_0x13b697[_0x3e81c4(0xc2)][_0x3e81c4(0xb9)](0x1)[_0x3e81c4(0xfc)](_0x5c7c5f=>_0x32bb42(_0x5c7c5f,_0xc3fef2['id']))};}return null;}let _0x3ad2c7=class{constructor(_0x1353f0,_0x13fbf4,_0x1e19cf,_0x20610d){const _0x26dd3f=_0x5dba39;this[_0x26dd3f(0x12d)]=_0x1353f0,this[_0x26dd3f(0xfe)]=_0x13fbf4,this[_0x26dd3f(0x108)]=_0x1e19cf,this[_0x26dd3f(0x10e)]=_0x20610d;}async[_0x5dba39(0xe0)](_0x1d3c32){const _0x43533e=_0x5dba39;var _0x2ac945,_0x7bb07e;const {parentId:_0x2ef3cf,unitId:_0x52b8bb,text:_0x268d2f,threadId:_0x407a74}=_0x1d3c32,_0x47fb2f=(_0x7bb07e=(_0x2ac945=_0x268d2f[_0x43533e(0x103)])==null?void 0x0:_0x2ac945[_0x43533e(0x10b)](_0x21f8ad=>_0x21f8ad[_0x43533e(0xd5)]===_0x3777e4[_0x43533e(0x104)]['COMMENT'])[_0x43533e(0xfc)](_0x18197f=>_0x18197f[_0x43533e(0xe3)]))!=null?_0x7bb07e:[],_0xb1a62c=JSON[_0x43533e(0xec)](_0x268d2f),_0x83a77d=(await this[_0x43533e(0x108)]['requireSession'](_0x52b8bb))[_0x43533e(0xc7)]();if(_0x2ef3cf){const _0x25327e={'memberId':_0x83a77d,'unitId':_0x52b8bb,'content':_0xb1a62c,'mention':_0x47fb2f,'threadId':_0x407a74},_0x3e96d7=(await this[_0x43533e(0x12d)][_0x43533e(0xda)]('/universer-api/comment/unit/'+_0x52b8bb+_0x43533e(0xee),{'body':_0x25327e}))[_0x43533e(0xae)][_0x43533e(0xd4)];return{..._0x1d3c32,'id':_0x3e96d7[_0x43533e(0xd9)],'dT':_0x3777e4[_0x43533e(0x10c)](+_0x3e96d7[_0x43533e(0xe6)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e96d7[_0x43533e(0xdc)]};}else{const _0x56f2f5={'memberId':_0x83a77d,'unitId':_0x52b8bb,'content':_0xb1a62c,'mention':_0x47fb2f},_0x1b000a=await this[_0x43533e(0x12d)][_0x43533e(0xda)](_0x43533e(0x136)+_0x52b8bb+_0x43533e(0xb0),{'body':_0x56f2f5});return _0x4d3383(_0x1b000a[_0x43533e(0xae)][_0x43533e(0xb2)],_0x1d3c32);}}async[_0x5dba39(0xba)](_0x4db649){const _0x2af52a=_0x5dba39;var _0x31c5e6,_0x48dd90;const {text:_0x515839,unitId:_0x23ccc2}=_0x4db649,_0x4e87f2=(_0x48dd90=(_0x31c5e6=_0x515839[_0x2af52a(0x103)])==null?void 0x0:_0x31c5e6[_0x2af52a(0x10b)](_0x43f33d=>_0x43f33d[_0x2af52a(0xd5)]===_0x3777e4[_0x2af52a(0x104)][_0x2af52a(0x106)])[_0x2af52a(0xfc)](_0x6c4557=>_0x6c4557[_0x2af52a(0xe3)]))!=null?_0x48dd90:[],_0x2b9dd8=JSON[_0x2af52a(0xec)](_0x515839),_0xf6948b=_0x4db649[_0x2af52a(0xaa)],_0x376e39=_0x4db649['id'],_0x3edb1a={'memberId':(await this[_0x2af52a(0x108)][_0x2af52a(0x12f)](_0x23ccc2))[_0x2af52a(0xc7)](),'unitId':_0x23ccc2,'threadId':_0xf6948b,'mention':_0x4e87f2,'content':_0x2b9dd8,'replyId':_0x376e39},_0x504745=await this['_httpService'][_0x2af52a(0xda)]('/universer-api/comment/unit/'+_0x23ccc2+_0x2af52a(0xff),{'body':_0x3edb1a});return!_0x504745[_0x2af52a(0xae)][_0x2af52a(0x107)]||_0x504745[_0x2af52a(0xae)][_0x2af52a(0x107)][_0x2af52a(0xf5)]===0x1;}async['resolveComment'](_0x3e6027){const _0x5d45d5=_0x5dba39,{unitId:_0x42ad83}=_0x3e6027,_0x843216=_0x3e6027[_0x5d45d5(0xaa)],_0x214581={'memberId':this[_0x5d45d5(0xfe)][_0x5d45d5(0xe5)]()['userID'],'unitId':_0x42ad83,'threadId':_0x843216,'solved':_0x3e6027[_0x5d45d5(0x12b)]?_0x583558['Solved']:_0x583558[_0x5d45d5(0xfd)]},_0x38ef32=await this[_0x5d45d5(0x12d)][_0x5d45d5(0xda)](_0x5d45d5(0x136)+_0x42ad83+_0x5d45d5(0xc9),{'body':_0x214581});return!_0x38ef32[_0x5d45d5(0xae)][_0x5d45d5(0x107)]||_0x38ef32['body'][_0x5d45d5(0x107)][_0x5d45d5(0xf5)]===0x1;}async[_0x5dba39(0xce)](_0x45941f,_0x189c9c,_0x4de7d1,_0x45e1de){const _0x1a5fd9=_0x5dba39,_0x5d0bbe={'memberId':(await this[_0x1a5fd9(0x108)][_0x1a5fd9(0x12f)](_0x45941f))[_0x1a5fd9(0xc7)](),'threadId':_0x4de7d1,'replyId':_0x45e1de,'unitId':_0x45941f},_0xaf361c=await this[_0x1a5fd9(0x12d)][_0x1a5fd9(0xda)](_0x1a5fd9(0x136)+_0x45941f+_0x1a5fd9(0xe4),{'body':_0x5d0bbe});return!_0xaf361c[_0x1a5fd9(0xae)][_0x1a5fd9(0x107)]||_0xaf361c[_0x1a5fd9(0xae)][_0x1a5fd9(0x107)][_0x1a5fd9(0xf5)]===0x1;}async[_0x5dba39(0x130)](_0x27b85e,_0x3f7e8f,_0x150fcf){const _0x35fbaa=_0x5dba39,_0x173497={'unitId':_0x27b85e,'threadId':_0x150fcf},_0x402ffe=await this[_0x35fbaa(0x12d)]['post'](_0x35fbaa(0x136)+_0x27b85e+_0x35fbaa(0xb1),{'body':_0x173497}),_0x49ceae=_0x150fcf[_0x35fbaa(0xfc)](_0x4202e1=>_0x56e0d3(_0x402ffe[_0x35fbaa(0xae)][_0x35fbaa(0x101)][_0x4202e1],_0x27b85e,_0x3f7e8f))['filter'](Boolean);return Object[_0x35fbaa(0xca)](_0x402ffe[_0x35fbaa(0xae)][_0x35fbaa(0x131)])[_0x35fbaa(0x11b)](_0x13b36e=>{const _0x3ac8ad=_0x35fbaa;this[_0x3ac8ad(0xfe)]['addUser'](_0x13b36e);}),_0x49ceae;}[_0x5dba39(0x109)](_0x45fd88){const _0x562672=_0x5dba39;return{'id':_0x45fd88['id'],'threadId':_0x45fd88[_0x562672(0xaa)],'ref':_0x45fd88['ref']};}};_0x3ad2c7=_0x1d2106([_0x39f735(0x0,_0x3777e4[_0x5dba39(0xf3)](_0x47855e[_0x5dba39(0xfa)])),_0x39f735(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0x111)])),_0x39f735(0x2,_0x3777e4['Inject'](_0x9d204b[_0x5dba39(0xd1)])),_0x39f735(0x3,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0xf6)]))],_0x3ad2c7);var _0x534494=Object[_0x5dba39(0xd8)],_0x16e760=(_0x5dc478,_0x199edf,_0x1a9220,_0x1882a2)=>{const _0x2cf8db=_0x5dba39;for(var _0x22cdde=_0x1882a2>0x1?void 0x0:_0x1882a2?_0x534494(_0x199edf,_0x1a9220):_0x199edf,_0x5f3c09=_0x5dc478[_0x2cf8db(0x116)]-0x1,_0x379d27;_0x5f3c09>=0x0;_0x5f3c09--)(_0x379d27=_0x5dc478[_0x5f3c09])&&(_0x22cdde=_0x379d27(_0x22cdde)||_0x22cdde);return _0x22cdde;},_0xb45429=(_0x197ff1,_0x3a566b)=>(_0x186d53,_0x5493cf)=>_0x3a566b(_0x186d53,_0x5493cf,_0x197ff1);let _0x1d0090=class extends _0x3777e4[_0x5dba39(0x125)]{constructor(_0x34acad,_0x5d4a6d){const _0x5df932=_0x5dba39;super(),this['_threadCommentDataSourceService']=_0x34acad,this[_0x5df932(0xd3)]=_0x5d4a6d,this[_0x5df932(0xd0)]();}[_0x5dba39(0xd0)](){const _0x22de98=_0x5dba39;this[_0x22de98(0xc8)]['dataSource']=this[_0x22de98(0xd3)],this[_0x22de98(0xc8)][_0x22de98(0xb4)]=!0x1;}};_0x1d0090=_0x16e760([_0xb45429(0x0,_0xabdbc4[_0x5dba39(0x11a)]),_0xb45429(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3ad2c7))],_0x1d0090);var _0x457362=Object[_0x5dba39(0xe2)],_0x33d040=Object[_0x5dba39(0xd8)],_0x361ec0=(_0x4930c6,_0x547a2e,_0x2170a3)=>_0x547a2e in _0x4930c6?_0x457362(_0x4930c6,_0x547a2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2170a3}):_0x4930c6[_0x547a2e]=_0x2170a3,_0x298e95=(_0xbd0ba1,_0x4c193b,_0x1ad22c,_0x4b0e74)=>{const _0x18ee6b=_0x5dba39;for(var _0x284529=_0x4b0e74>0x1?void 0x0:_0x4b0e74?_0x33d040(_0x4c193b,_0x1ad22c):_0x4c193b,_0x44e791=_0xbd0ba1[_0x18ee6b(0x116)]-0x1,_0x6ee4e4;_0x44e791>=0x0;_0x44e791--)(_0x6ee4e4=_0xbd0ba1[_0x44e791])&&(_0x284529=_0x6ee4e4(_0x284529)||_0x284529);return _0x284529;},_0x30c6c5=(_0x212244,_0x5c905b)=>(_0x1bff08,_0x331eeb)=>_0x5c905b(_0x1bff08,_0x331eeb,_0x212244),_0x1867ba=(_0x17e8c9,_0x70581f,_0x1f285c)=>_0x361ec0(_0x17e8c9,typeof _0x70581f!=_0x5dba39(0x132)?_0x70581f+'':_0x70581f,_0x1f285c);_0x436e08[_0x5dba39(0xa9)]=class extends _0x3777e4[_0x5dba39(0xf9)]{constructor(_0x2146fc=_0x490629,_0x31336a,_0x3d8d32){const _0xaa436c=_0x5dba39;super(),this[_0xaa436c(0xb3)]=_0x2146fc,this['_injector']=_0x31336a,this['_configService']=_0x3d8d32;const {..._0x583d54}=_0x3777e4[_0xaa436c(0xb8)]({},_0x490629,this['_config']);this[_0xaa436c(0x126)][_0xaa436c(0xc1)](_0x47e529,_0x583d54);}['onStarting'](){const _0x3bf3fc=_0x5dba39;[[_0x3ad2c7],[_0x1d0090],[_0x31d783]][_0x3bf3fc(0x11b)](_0x42b645=>{const _0x4bdb0f=_0x3bf3fc;this[_0x4bdb0f(0x10e)]['add'](_0x42b645);});}[_0x5dba39(0xf8)](){const _0x1d6870=_0x5dba39;this['_injector'][_0x1d6870(0x120)](_0x1d0090),this['_injector'][_0x1d6870(0x120)](_0x31d783);}},_0x1867ba(_0x436e08[_0x5dba39(0xa9)],_0x5dba39(0x10f),_0x48cf41),_0x1867ba(_0x436e08[_0x5dba39(0xa9)],_0x5dba39(0x113),_0x3777e4[_0x5dba39(0x129)]['UNIVER_UNKNOWN']),_0x436e08[_0x5dba39(0xa9)]=_0x298e95([_0x3777e4[_0x5dba39(0x10d)](_0x24e3d7['UniverThreadCommentUIPlugin'],_0x9d204b[_0x5dba39(0x123)],_0x39e458[_0x5dba39(0x128)]),_0x30c6c5(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0xf6)])),_0x30c6c5(0x2,_0x3777e4[_0x5dba39(0x134)])],_0x436e08[_0x5dba39(0xa9)]),Object[_0x5dba39(0xe2)](_0x436e08,Symbol[_0x5dba39(0xf7)],{'value':_0x5dba39(0xe7)});}));
1
+ function _0x23ea(_0x3f7e71,_0x12765f){const _0x412f22=_0x412f();return _0x23ea=function(_0x23ea0e,_0x55cf5d){_0x23ea0e=_0x23ea0e-0x9b;let _0x4295dd=_0x412f22[_0x23ea0e];return _0x4295dd;},_0x23ea(_0x3f7e71,_0x12765f);}(function(_0x5cf4e9,_0x4289fd){const _0x4f43d1=_0x23ea,_0x89a0a3=_0x5cf4e9();while(!![]){try{const _0x40b317=-parseInt(_0x4f43d1(0xdd))/0x1*(parseInt(_0x4f43d1(0xdc))/0x2)+-parseInt(_0x4f43d1(0x117))/0x3*(parseInt(_0x4f43d1(0x102))/0x4)+-parseInt(_0x4f43d1(0xa6))/0x5+parseInt(_0x4f43d1(0x10f))/0x6+parseInt(_0x4f43d1(0xb5))/0x7*(-parseInt(_0x4f43d1(0xbb))/0x8)+-parseInt(_0x4f43d1(0xc5))/0x9+parseInt(_0x4f43d1(0xe4))/0xa*(parseInt(_0x4f43d1(0xf5))/0xb);if(_0x40b317===_0x4289fd)break;else _0x89a0a3['push'](_0x89a0a3['shift']());}catch(_0x162eb0){_0x89a0a3['push'](_0x89a0a3['shift']());}}}(_0x412f,0xcf751),function(_0xd4bfb1,_0x318092){const _0x1d1210=_0x23ea;typeof exports=='object'&&typeof module<'u'?_0x318092(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x1d1210(0x104)),require(_0x1d1210(0x10c)),require(_0x1d1210(0xe5)),require('rxjs'),require(_0x1d1210(0xe7))):typeof define==_0x1d1210(0xcf)&&define[_0x1d1210(0x106)]?define([_0x1d1210(0xbd),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x1d1210(0x104),_0x1d1210(0x10c),_0x1d1210(0xe5),_0x1d1210(0xcb),_0x1d1210(0xe7)],_0x318092):(_0xd4bfb1=typeof globalThis<'u'?globalThis:_0xd4bfb1||self,_0x318092(_0xd4bfb1['UniverProThreadCommentDatasource']={},_0xd4bfb1[_0x1d1210(0xd3)],_0xd4bfb1[_0x1d1210(0xd6)],_0xd4bfb1[_0x1d1210(0xe1)],_0xd4bfb1['UniverThreadCommentUi'],_0xd4bfb1[_0x1d1210(0xc0)],_0xd4bfb1[_0x1d1210(0xcb)],_0xd4bfb1[_0x1d1210(0x111)]));}(this,function(_0x297b9b,_0x300b34,_0x327a90,_0x3cdc49,_0x7573fa,_0x22aef7,_0x1cb2e8,_0x30c585){'use strict';const _0x22ef2d=_0x23ea;const _0x2ea2d8='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4a6b33=(_0x510c6e=>(_0x510c6e[_0x510c6e[_0x22ef2d(0xe9)]=0x0]='OpenOrReOpen',_0x510c6e[_0x510c6e['Solved']=0x1]=_0x22ef2d(0xe2),_0x510c6e[_0x510c6e[_0x22ef2d(0x110)]=-0x1]=_0x22ef2d(0x110),_0x510c6e))(_0x4a6b33||{}),_0x55bcf1=(_0x37a5e2=>(_0x37a5e2[_0x37a5e2['Unknown']=0x0]=_0x22ef2d(0xcc),_0x37a5e2[_0x37a5e2[_0x22ef2d(0xb3)]=0x1]=_0x22ef2d(0xb3),_0x37a5e2[_0x37a5e2[_0x22ef2d(0xe0)]=0x2]='Reply',_0x37a5e2[_0x37a5e2[_0x22ef2d(0xf7)]=0x3]=_0x22ef2d(0xf7),_0x37a5e2[_0x37a5e2[_0x22ef2d(0x9f)]=0x4]=_0x22ef2d(0x9f),_0x37a5e2[_0x37a5e2[_0x22ef2d(0xda)]=0x5]='Solve',_0x37a5e2[_0x37a5e2[_0x22ef2d(0x110)]=-0x1]=_0x22ef2d(0x110),_0x37a5e2))(_0x55bcf1||{});const _0x145923=_0x1dba4d=>_0x3cdc49['dayjs'](new Date(+_0x1dba4d))[_0x22ef2d(0x120)](_0x22ef2d(0xa2)),_0x8705fb=async(_0xfc9a67,_0x5c7429)=>{const _0x126cbf=_0x22ef2d,_0x53c7d6=_0xfc9a67[_0x126cbf(0xe8)](_0x3cdc49['UserManagerService']),_0x2f1923=_0xfc9a67[_0x126cbf(0xe8)](_0x30c585[_0x126cbf(0x116)]);_0x5c7429['forEach'](_0x33a549=>{const _0x2fbbaa=_0x126cbf;_0x53c7d6['getUser'](_0x33a549)&&_0x5c7429[_0x2fbbaa(0xef)](_0x33a549);}),_0x5c7429[_0x126cbf(0xea)]&&(await _0x2f1923[_0x126cbf(0xe8)](_0x126cbf(0xd8),{'params':{'userIDs':[..._0x5c7429]}}))[_0x126cbf(0x114)][_0x126cbf(0x9c)][_0x126cbf(0xfa)](_0x16e5c1=>{const _0x21880a=_0x126cbf;_0x16e5c1&&_0x53c7d6[_0x21880a(0xa9)](_0x16e5c1);});};var _0x460156=Object[_0x22ef2d(0xfb)],_0x113d8f=(_0x2f31f4,_0x1581a7,_0x2cef0f,_0x657c9b)=>{const _0x425ca2=_0x22ef2d;for(var _0x484727=_0x657c9b>0x1?void 0x0:_0x657c9b?_0x460156(_0x1581a7,_0x2cef0f):_0x1581a7,_0x5586a4=_0x2f31f4[_0x425ca2(0xfd)]-0x1,_0x5b53f2;_0x5586a4>=0x0;_0x5586a4--)(_0x5b53f2=_0x2f31f4[_0x5586a4])&&(_0x484727=_0x5b53f2(_0x484727)||_0x484727);return _0x484727;},_0x19d97d=(_0x48e326,_0x48c6d2)=>(_0x1af696,_0x21a0a6)=>_0x48c6d2(_0x1af696,_0x21a0a6,_0x48e326);let _0x3b3e59=class extends _0x3cdc49[_0x22ef2d(0x112)]{constructor(_0x48fd5b,_0x2720e9,_0x4f5a09,_0x2d437d){const _0x324c79=_0x22ef2d;super(),this[_0x324c79(0x10a)]=_0x48fd5b,this['_threadCommentModel']=_0x2720e9,this[_0x324c79(0xf1)]=_0x4f5a09,this[_0x324c79(0xf6)]=_0x2d437d,this['_init'](),this[_0x324c79(0xba)]();}[_0x22ef2d(0xba)](){const _0x5bc9a3=_0x22ef2d;this[_0x5bc9a3(0xf9)](this[_0x5bc9a3(0xa1)][_0x5bc9a3(0xf2)][_0x5bc9a3(0xbf)](_0x1cb2e8['bufferTime'](0x10))[_0x5bc9a3(0xaa)](_0x140410=>{const _0x23b5d6=_0x5bc9a3,_0x345290=new Set();_0x140410[_0x23b5d6(0xfa)](_0x934ffc=>{const _0x31d466=_0x23b5d6;switch(_0x934ffc[_0x31d466(0xbe)]){case _0x31d466(0xd9):{const _0x3a6db1=_0x934ffc[_0x31d466(0xb7)][_0x31d466(0x118)];_0x345290['add'](_0x3a6db1);break;}}}),_0x8705fb(this[_0x23b5d6(0xf6)],_0x345290);}));}['_init'](){const _0x5b1168=_0x22ef2d;this['disposeWithMe'](this[_0x5b1168(0x10a)][_0x5b1168(0xf2)]['subscribe'](async _0x344b0b=>{const _0x442595=_0x5b1168;var _0x6e0714,_0x2f1c4b,_0x376062,_0xb5c9d0;const _0x4ea0d0=(_0x6e0714=this[_0x442595(0xa1)][_0x442595(0xc7)](_0x344b0b['unitId'])[_0x442595(0x11f)](_0x519681=>_0x519681[_0x442595(0xc1)]===_0x344b0b[_0x442595(0xc1)]))==null?void 0x0:_0x6e0714['root'];if(!_0x4ea0d0)return;const {unitId:_0x29f912,subUnitId:_0x468963}=_0x4ea0d0;switch(_0x344b0b[_0x442595(0x113)]&&this[_0x442595(0xf1)][_0x442595(0xa9)](_0x344b0b[_0x442595(0x113)]),_0x344b0b[_0x442595(0xbe)]){case _0x55bcf1[_0x442595(0xb3)]:break;case _0x55bcf1['Reply']:{this[_0x442595(0xa1)]['addComment'](_0x29f912,_0x468963,{'unitId':_0x29f912,'subUnitId':_0x468963,'ref':'','id':_0x344b0b['replyId'],'dT':_0x145923(+_0x344b0b[_0x442595(0x108)]),'threadId':_0x344b0b['threadId'],'personId':(_0x376062=(_0x2f1c4b=_0x344b0b[_0x442595(0x113)])==null?void 0x0:_0x2f1c4b['userID'])!=null?_0x376062:_0x344b0b[_0x442595(0xb9)],'text':JSON['parse'](_0x344b0b[_0x442595(0xbc)]),'parentId':_0x4ea0d0['id']});break;}case _0x55bcf1[_0x442595(0x9f)]:{const _0x221946=this[_0x442595(0xa1)][_0x442595(0xf0)](_0x29f912,_0x468963,_0x344b0b[_0x442595(0xff)]);_0x221946&&_0x221946[_0x442595(0xc9)]&&this['_threadCommentModel'][_0x442595(0xde)](_0x29f912,_0x468963,_0x344b0b[_0x442595(0xff)]);break;}case _0x55bcf1[_0x442595(0xf7)]:{this[_0x442595(0xa1)][_0x442595(0x107)](_0x29f912,_0x468963,{'commentId':_0x344b0b[_0x442595(0xff)],'text':JSON[_0x442595(0xdb)](_0x344b0b['content'])});break;}case _0x55bcf1[_0x442595(0xda)]:{const _0xb3fbc8=(_0xb5c9d0=this['_threadCommentModel'][_0x442595(0xc7)](_0x344b0b['unitId'])[_0x442595(0x11f)](_0x3f5c7a=>_0x3f5c7a[_0x442595(0xc1)]===_0x344b0b[_0x442595(0xc1)]))==null?void 0x0:_0xb5c9d0[_0x442595(0x119)];_0xb3fbc8&&this['_threadCommentModel'][_0x442595(0xeb)](_0x29f912,_0x468963,_0xb3fbc8['id'],_0x344b0b['solved']===_0x4a6b33[_0x442595(0xe2)]);break;}}}));}};_0x3b3e59=_0x113d8f([_0x19d97d(0x0,_0x3cdc49['Inject'](_0x300b34[_0x22ef2d(0xed)])),_0x19d97d(0x1,_0x3cdc49['Inject'](_0x22aef7[_0x22ef2d(0xce)])),_0x19d97d(0x2,_0x3cdc49['Inject'](_0x3cdc49['UserManagerService'])),_0x19d97d(0x3,_0x3cdc49['Inject'](_0x3cdc49[_0x22ef2d(0xf8)]))],_0x3b3e59);const _0x56ead5='thread-comment-data-source.config',_0x480c95={};var _0x4a7f83=Object[_0x22ef2d(0xfb)],_0x5b507c=(_0x476a31,_0x1cb2a0,_0x2944eb,_0x3a0698)=>{for(var _0x4a01eb=_0x3a0698>0x1?void 0x0:_0x3a0698?_0x4a7f83(_0x1cb2a0,_0x2944eb):_0x1cb2a0,_0x27fa5f=_0x476a31['length']-0x1,_0x45202a;_0x27fa5f>=0x0;_0x27fa5f--)(_0x45202a=_0x476a31[_0x27fa5f])&&(_0x4a01eb=_0x45202a(_0x4a01eb)||_0x4a01eb);return _0x4a01eb;},_0x415117=(_0x394c20,_0x401f5a)=>(_0x134c65,_0x39cc13)=>_0x401f5a(_0x134c65,_0x39cc13,_0x394c20);function _0x540b36(_0x235897,_0x2f4c2a){const _0x493d5b=_0x22ef2d,_0x3cd2f5=_0x235897[_0x493d5b(0x103)][0x0];return{..._0x2f4c2a,'id':_0x3cd2f5[_0x493d5b(0xff)],'resolved':_0x235897['solved']===0x1,'dT':_0x145923(_0x3cd2f5['createTimestamp']),'personId':_0x3cd2f5[_0x493d5b(0xb9)],'threadId':_0x3cd2f5['threadId']};}function _0x3e7c1c(_0x49b7bd,_0xf4ac9d,_0x3280f1){const _0x263277=_0x22ef2d;var _0x8936cd,_0x518bb0;if(((_0x518bb0=(_0x8936cd=_0x49b7bd==null?void 0x0:_0x49b7bd[_0x263277(0x103)])==null?void 0x0:_0x8936cd[_0x263277(0xfd)])!=null?_0x518bb0:0x0)>0x0){const _0x57aaf7=(_0x3015d5,_0x34c7ab)=>({'id':_0x3015d5[_0x263277(0xff)],'threadId':_0x3015d5['threadId'],'dT':_0x145923(_0x3015d5[_0x263277(0x108)]),'personId':_0x3015d5[_0x263277(0xb9)],'resolved':_0x49b7bd['solved']===_0x4a6b33[_0x263277(0xe2)],'unitId':_0xf4ac9d,'subUnitId':_0x3280f1,'text':JSON[_0x263277(0xdb)](_0x3015d5['content']),'parentId':_0x34c7ab}),_0x29e4fd=_0x57aaf7(_0x49b7bd[_0x263277(0x103)][0x0]);return{..._0x29e4fd,'children':_0x49b7bd[_0x263277(0x103)]['slice'](0x1)[_0x263277(0xb1)](_0x5470fc=>_0x57aaf7(_0x5470fc,_0x29e4fd['id']))};}return null;}let _0x10936e=class{constructor(_0x2f2b5e,_0x28148e,_0x2d145f,_0x16b7e0){const _0x52d19b=_0x22ef2d;this['_httpService']=_0x2f2b5e,this['_userService']=_0x28148e,this[_0x52d19b(0xc6)]=_0x2d145f,this[_0x52d19b(0xf6)]=_0x16b7e0;}async['addComment'](_0x33c17f){const _0x2003f0=_0x22ef2d;var _0x1f9bf0,_0x3f2494;const {parentId:_0x26c79c,unitId:_0xfb1d8c,text:_0x3eb456,threadId:_0x242918}=_0x33c17f,_0x45359b=(_0x3f2494=(_0x1f9bf0=_0x3eb456[_0x2003f0(0xd2)])==null?void 0x0:_0x1f9bf0['filter'](_0x2ab04c=>_0x2ab04c[_0x2003f0(0xe6)]===_0x3cdc49[_0x2003f0(0x100)][_0x2003f0(0xfe)])[_0x2003f0(0xb1)](_0x10610f=>_0x10610f[_0x2003f0(0xee)]))!=null?_0x3f2494:[],_0x3dee94=JSON[_0x2003f0(0xc4)](_0x3eb456),_0x4d61ed=(await this[_0x2003f0(0xc6)][_0x2003f0(0x11b)](_0xfb1d8c))['getMemberID']();if(_0x26c79c){const _0x198d3a={'memberId':_0x4d61ed,'unitId':_0xfb1d8c,'content':_0x3dee94,'mention':_0x45359b,'threadId':_0x242918},_0x3866d9=(await this[_0x2003f0(0xae)]['post'](_0x2003f0(0xb8)+_0xfb1d8c+_0x2003f0(0xb0),{'body':_0x198d3a}))[_0x2003f0(0x114)][_0x2003f0(0x11c)];return{..._0x33c17f,'id':_0x3866d9[_0x2003f0(0xff)],'dT':_0x3cdc49[_0x2003f0(0xd5)](+_0x3866d9[_0x2003f0(0x108)])[_0x2003f0(0x120)](_0x2003f0(0xa2)),'personId':_0x3866d9['userId']};}else{const _0x8bd2df={'memberId':_0x4d61ed,'unitId':_0xfb1d8c,'content':_0x3dee94,'mention':_0x45359b},_0xbc05a1=await this[_0x2003f0(0xae)][_0x2003f0(0x11d)](_0x2003f0(0xb8)+_0xfb1d8c+_0x2003f0(0xec),{'body':_0x8bd2df});return _0x540b36(_0xbc05a1[_0x2003f0(0x114)][_0x2003f0(0x105)],_0x33c17f);}}async['updateComment'](_0x216524){const _0x239d6f=_0x22ef2d;var _0x2a396c,_0x12658a;const {text:_0x8dff5a,unitId:_0x55de92}=_0x216524,_0xceefc2=(_0x12658a=(_0x2a396c=_0x8dff5a[_0x239d6f(0xd2)])==null?void 0x0:_0x2a396c[_0x239d6f(0x10b)](_0x29ccc8=>_0x29ccc8[_0x239d6f(0xe6)]===_0x3cdc49['CustomRangeType'][_0x239d6f(0xfe)])[_0x239d6f(0xb1)](_0xdd228b=>_0xdd228b[_0x239d6f(0xee)]))!=null?_0x12658a:[],_0x9334b9=JSON[_0x239d6f(0xc4)](_0x8dff5a),_0x189a93=_0x216524[_0x239d6f(0xc1)],_0x21f80e=_0x216524['id'],_0x1c007a={'memberId':(await this[_0x239d6f(0xc6)]['requireSession'](_0x55de92))[_0x239d6f(0x109)](),'unitId':_0x55de92,'threadId':_0x189a93,'mention':_0xceefc2,'content':_0x9334b9,'replyId':_0x21f80e},_0x4b64f5=await this[_0x239d6f(0xae)]['post'](_0x239d6f(0xb8)+_0x55de92+_0x239d6f(0xd4),{'body':_0x1c007a});return!_0x4b64f5[_0x239d6f(0x114)][_0x239d6f(0xad)]||_0x4b64f5[_0x239d6f(0x114)][_0x239d6f(0xad)]['code']===0x1;}async[_0x22ef2d(0xeb)](_0x25a369){const _0x12d060=_0x22ef2d,{unitId:_0x219fb0}=_0x25a369,_0x265b82=_0x25a369[_0x12d060(0xc1)],_0x1f8b91={'memberId':this[_0x12d060(0xf1)][_0x12d060(0xd0)]()[_0x12d060(0xc3)],'unitId':_0x219fb0,'threadId':_0x265b82,'solved':_0x25a369[_0x12d060(0xdf)]?_0x4a6b33[_0x12d060(0xe2)]:_0x4a6b33[_0x12d060(0xe9)]},_0x355142=await this[_0x12d060(0xae)][_0x12d060(0x11d)](_0x12d060(0xb8)+_0x219fb0+_0x12d060(0xa0),{'body':_0x1f8b91});return!_0x355142['body'][_0x12d060(0xad)]||_0x355142['body'][_0x12d060(0xad)][_0x12d060(0x101)]===0x1;}async[_0x22ef2d(0xde)](_0x41d9e2,_0x265769,_0x32386f,_0xb24310){const _0x3e075d=_0x22ef2d,_0x5af01d={'memberId':(await this[_0x3e075d(0xc6)]['requireSession'](_0x41d9e2))[_0x3e075d(0x109)](),'threadId':_0x32386f,'replyId':_0xb24310,'unitId':_0x41d9e2},_0x163f22=await this[_0x3e075d(0xae)][_0x3e075d(0x11d)](_0x3e075d(0xb8)+_0x41d9e2+_0x3e075d(0xa8),{'body':_0x5af01d});return!_0x163f22['body']['error']||_0x163f22['body']['error']['code']===0x1;}async[_0x22ef2d(0xa5)](_0xce25fb,_0x235761,_0x3cddf){const _0x4b77d6=_0x22ef2d,_0x22cb08={'unitId':_0xce25fb,'threadId':_0x3cddf},_0x1c44f8=await this[_0x4b77d6(0xae)][_0x4b77d6(0x11d)]('/universer-api/comment/unit/'+_0xce25fb+'/list',{'body':_0x22cb08}),_0x582ce4=_0x3cddf['map'](_0x4de7d9=>_0x3e7c1c(_0x1c44f8[_0x4b77d6(0x114)][_0x4b77d6(0xf4)][_0x4de7d9],_0xce25fb,_0x235761))[_0x4b77d6(0x10b)](Boolean);return Object[_0x4b77d6(0xcd)](_0x1c44f8[_0x4b77d6(0x114)]['users'])[_0x4b77d6(0xfa)](_0x5a1761=>{this['_userService']['addUser'](_0x5a1761);}),_0x582ce4;}[_0x22ef2d(0x11e)](_0xbb34df){const _0x1a5b49=_0x22ef2d;return{'id':_0xbb34df['id'],'threadId':_0xbb34df[_0x1a5b49(0xc1)],'ref':_0xbb34df[_0x1a5b49(0xc8)]};}};_0x10936e=_0x5b507c([_0x415117(0x0,_0x3cdc49[_0x22ef2d(0x9e)](_0x30c585['HTTPService'])),_0x415117(0x1,_0x3cdc49[_0x22ef2d(0x9e)](_0x3cdc49[_0x22ef2d(0x9d)])),_0x415117(0x2,_0x3cdc49[_0x22ef2d(0x9e)](_0x300b34['CollaborationSessionService'])),_0x415117(0x3,_0x3cdc49['Inject'](_0x3cdc49[_0x22ef2d(0xf8)]))],_0x10936e);var _0x55fcc8=Object['getOwnPropertyDescriptor'],_0x520408=(_0x80d64a,_0x45f05e,_0xe41360,_0xefa7f2)=>{const _0xdaa1f5=_0x22ef2d;for(var _0x133619=_0xefa7f2>0x1?void 0x0:_0xefa7f2?_0x55fcc8(_0x45f05e,_0xe41360):_0x45f05e,_0x39961a=_0x80d64a[_0xdaa1f5(0xfd)]-0x1,_0x379c4c;_0x39961a>=0x0;_0x39961a--)(_0x379c4c=_0x80d64a[_0x39961a])&&(_0x133619=_0x379c4c(_0x133619)||_0x133619);return _0x133619;},_0x1367ec=(_0x2798a7,_0x74167e)=>(_0x2bd1d1,_0x574771)=>_0x74167e(_0x2bd1d1,_0x574771,_0x2798a7);let _0x761c63=class extends _0x3cdc49[_0x22ef2d(0x112)]{constructor(_0x1f1502,_0x39f247){const _0x1cf805=_0x22ef2d;super(),this[_0x1cf805(0x10e)]=_0x1f1502,this[_0x1cf805(0xb4)]=_0x39f247,this[_0x1cf805(0x10d)]();}[_0x22ef2d(0x10d)](){const _0x4e030b=_0x22ef2d;this[_0x4e030b(0x10e)][_0x4e030b(0xaf)]=this['_threadCommentDataSource'],this[_0x4e030b(0x10e)][_0x4e030b(0xfc)]=!0x1;}};_0x761c63=_0x520408([_0x1367ec(0x0,_0x22aef7['IThreadCommentDataSourceService']),_0x1367ec(0x1,_0x3cdc49['Inject'](_0x10936e))],_0x761c63);var _0x4e0a22=Object[_0x22ef2d(0x11a)],_0x3f7441=Object[_0x22ef2d(0xfb)],_0x3b4347=(_0x5d81ec,_0xa8fb9f,_0x1085ed)=>_0xa8fb9f in _0x5d81ec?_0x4e0a22(_0x5d81ec,_0xa8fb9f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1085ed}):_0x5d81ec[_0xa8fb9f]=_0x1085ed,_0x139375=(_0x7aa0b7,_0x321c17,_0x43c7c3,_0x1cf78d)=>{const _0x368722=_0x22ef2d;for(var _0x214c35=_0x1cf78d>0x1?void 0x0:_0x1cf78d?_0x3f7441(_0x321c17,_0x43c7c3):_0x321c17,_0x258670=_0x7aa0b7[_0x368722(0xfd)]-0x1,_0x504bfd;_0x258670>=0x0;_0x258670--)(_0x504bfd=_0x7aa0b7[_0x258670])&&(_0x214c35=_0x504bfd(_0x214c35)||_0x214c35);return _0x214c35;},_0x30af06=(_0xf3bd76,_0x5e97df)=>(_0x57bb93,_0x54f0e2)=>_0x5e97df(_0x57bb93,_0x54f0e2,_0xf3bd76),_0x3c7821=(_0x27ec5d,_0xe4cdce,_0x5bb0fd)=>_0x3b4347(_0x27ec5d,typeof _0xe4cdce!=_0x22ef2d(0xd1)?_0xe4cdce+'':_0xe4cdce,_0x5bb0fd);_0x297b9b[_0x22ef2d(0xd7)]=class extends _0x3cdc49[_0x22ef2d(0x115)]{constructor(_0x2ec829=_0x480c95,_0xcf5c50,_0x2dd7eb){const _0x586287=_0x22ef2d;super(),this[_0x586287(0xe3)]=_0x2ec829,this[_0x586287(0xf6)]=_0xcf5c50,this[_0x586287(0xa3)]=_0x2dd7eb;const {..._0x3002b3}=_0x3cdc49[_0x586287(0xab)]({},_0x480c95,this[_0x586287(0xe3)]);this[_0x586287(0xa3)]['setConfig'](_0x56ead5,_0x3002b3);}[_0x22ef2d(0xf3)](){const _0x44c31a=_0x22ef2d;[[_0x10936e],[_0x761c63],[_0x3b3e59]][_0x44c31a(0xfa)](_0x48c95c=>{const _0x346dc9=_0x44c31a;this['_injector'][_0x346dc9(0xd9)](_0x48c95c);});}[_0x22ef2d(0x9b)](){const _0x319d03=_0x22ef2d;this['_injector'][_0x319d03(0xe8)](_0x761c63),this['_injector']['get'](_0x3b3e59);}},_0x3c7821(_0x297b9b[_0x22ef2d(0xd7)],_0x22ef2d(0xb6),_0x2ea2d8),_0x3c7821(_0x297b9b['UniverThreadCommentDataSourcePlugin'],_0x22ef2d(0xbe),_0x3cdc49[_0x22ef2d(0xb2)][_0x22ef2d(0xca)]),_0x297b9b[_0x22ef2d(0xd7)]=_0x139375([_0x3cdc49['DependentOn'](_0x7573fa[_0x22ef2d(0xa4)],_0x300b34[_0x22ef2d(0xa7)],_0x327a90[_0x22ef2d(0xc2)]),_0x30af06(0x1,_0x3cdc49[_0x22ef2d(0x9e)](_0x3cdc49[_0x22ef2d(0xf8)])),_0x30af06(0x2,_0x3cdc49['IConfigService'])],_0x297b9b[_0x22ef2d(0xd7)]),Object[_0x22ef2d(0x11a)](_0x297b9b,Symbol[_0x22ef2d(0xac)],{'value':'Module'});}));function _0x412f(){const _0x15da1b=['replies','@univerjs/core','comment','amd','updateComment','createTimestamp','getMemberID','_commentService','filter','@univerjs/thread-comment-ui','_initDataSource','_threadCommentDataSourceService','4598430sFhZkI','UNRECOGNIZED','UniverNetwork','Disposable','user','body','Plugin','HTTPService','4908QGpooa','personId','root','defineProperty','requireSession','reply','post','saveCommentToSnapshot','find','format','onReady','users','UserManagerService','Inject','Delete','/solved','_threadCommentModel','YYYY/MM/DD\x20HH:mm','_configService','UniverThreadCommentUIPlugin','listComments','3087440djdaBr','UniverCollaborationClientPlugin','/delete','addUser','subscribe','merge','toStringTag','error','_httpService','dataSource','/reply','map','UniverInstanceType','Add','_threadCommentDataSource','7WwnBsD','pluginName','payload','/universer-api/comment/unit/','userId','_initUserSync','10095376twFfXc','content','exports','type','pipe','UniverThreadComment','threadId','UniverLicensePlugin','userID','stringify','5047335CmzhBX','_sessionService','getUnit','ref','parentId','UNIVER_UNKNOWN','rxjs','Unknown','values','ThreadCommentModel','function','getCurrentUser','symbol','customRanges','UniverProCollaborationClient','/edit','dayjs','UniverProLicense','UniverThreadCommentDataSourcePlugin','/universer-api/user/list','add','Solve','parse','581530otCbmC','3mLjBdQ','deleteComment','resolved','Reply','UniverCore','Solved','_config','40mJBkyP','@univerjs/thread-comment','rangeType','@univerjs/network','get','OpenOrReOpen','size','resolveComment','/add','CommentService','rangeId','delete','getComment','_userService','commentUpdate$','onStarting','comments','9343114IyJhKn','_injector','Edit','Injector','disposeWithMe','forEach','getOwnPropertyDescriptor','syncUpdateMutationToColla','length','COMMENT','replyId','CustomRangeType','code','4rRVrFX'];_0x412f=function(){return _0x15da1b;};return _0x412f();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505171606",
3
+ "version": "0.7.0-nightly.202505181606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505171606",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505171606",
50
- "@univerjs/core": "0.7.0-nightly.202505171606",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505181606",
49
+ "@univerjs/core": "0.7.0-nightly.202505181606",
50
+ "@univerjs/network": "0.7.0-nightly.202505181606",
51
51
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505171606",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505171606",
54
- "@univerjs/network": "0.7.0-nightly.202505171606"
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505181606",
53
+ "@univerjs-pro/license": "0.7.0-nightly.202505181606",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505181606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",