@univerjs-pro/thread-comment-datasource 0.6.7-nightly.202504011606 → 0.6.8

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 _0x3dcb11=_0x59b2;(function(_0x1e9715,_0x1180a5){const _0x4ebcc8=_0x59b2,_0x43014f=_0x1e9715();while(!![]){try{const _0x423da8=-parseInt(_0x4ebcc8(0x13a))/0x1*(parseInt(_0x4ebcc8(0x139))/0x2)+parseInt(_0x4ebcc8(0x111))/0x3+parseInt(_0x4ebcc8(0xd0))/0x4*(-parseInt(_0x4ebcc8(0x11e))/0x5)+parseInt(_0x4ebcc8(0x121))/0x6+parseInt(_0x4ebcc8(0xef))/0x7+-parseInt(_0x4ebcc8(0x115))/0x8+parseInt(_0x4ebcc8(0x136))/0x9*(parseInt(_0x4ebcc8(0xd4))/0xa);if(_0x423da8===_0x1180a5)break;else _0x43014f['push'](_0x43014f['shift']());}catch(_0x2184b5){_0x43014f['push'](_0x43014f['shift']());}}}(_0x1a7b,0x657b0));Object[_0x3dcb11(0xd5)](exports,Symbol[_0x3dcb11(0x128)],{'value':_0x3dcb11(0xd6)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x3dcb11(0x12f)),M=require('@univerjs/thread-comment'),w=require(_0x3dcb11(0x10c)),P=require('@univerjs/network'),U=_0x3dcb11(0x11a);var I=(_0x248d05=>(_0x248d05[_0x248d05['OpenOrReOpen']=0x0]=_0x3dcb11(0x104),_0x248d05[_0x248d05[_0x3dcb11(0x134)]=0x1]=_0x3dcb11(0x134),_0x248d05[_0x248d05[_0x3dcb11(0x122)]=-0x1]=_0x3dcb11(0x122),_0x248d05))(I||{}),v=(_0x4cbf71=>(_0x4cbf71[_0x4cbf71['Unknown']=0x0]=_0x3dcb11(0xf1),_0x4cbf71[_0x4cbf71[_0x3dcb11(0x140)]=0x1]='Add',_0x4cbf71[_0x4cbf71[_0x3dcb11(0x101)]=0x2]=_0x3dcb11(0x101),_0x4cbf71[_0x4cbf71[_0x3dcb11(0x147)]=0x3]=_0x3dcb11(0x147),_0x4cbf71[_0x4cbf71[_0x3dcb11(0xfe)]=0x4]=_0x3dcb11(0xfe),_0x4cbf71[_0x4cbf71[_0x3dcb11(0x138)]=0x5]=_0x3dcb11(0x138),_0x4cbf71[_0x4cbf71['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4cbf71))(v||{});const f=_0x4c139d=>c['dayjs'](new Date(+_0x4c139d))['format'](_0x3dcb11(0x112)),R=async(_0x157bc4,_0x3d52c6)=>{const _0xaf0406=_0x3dcb11,_0x13dc60=_0x157bc4[_0xaf0406(0xed)](c['UserManagerService']),_0x4a408d=_0x157bc4[_0xaf0406(0xed)](P[_0xaf0406(0xe8)]);_0x3d52c6[_0xaf0406(0xfc)](_0xb37b6d=>{const _0x2bf29d=_0xaf0406;_0x13dc60[_0x2bf29d(0xf8)](_0xb37b6d)&&_0x3d52c6[_0x2bf29d(0x11f)](_0xb37b6d);}),_0x3d52c6[_0xaf0406(0xdc)]&&(await _0x4a408d[_0xaf0406(0xed)](_0xaf0406(0x13c),{'params':{'userIDs':[..._0x3d52c6]}}))[_0xaf0406(0x11b)]['users'][_0xaf0406(0xfc)](_0x26fd30=>{const _0x519436=_0xaf0406;_0x26fd30&&_0x13dc60[_0x519436(0xda)](_0x26fd30);});};var $=Object[_0x3dcb11(0x106)],E=(_0x5e6bdb,_0x1a12e8,_0x22f6e4,_0x423fd3)=>{const _0x20dcc6=_0x3dcb11;for(var _0xe41c9a=_0x423fd3>0x1?void 0x0:_0x423fd3?$(_0x1a12e8,_0x22f6e4):_0x1a12e8,_0x504a3c=_0x5e6bdb[_0x20dcc6(0x13f)]-0x1,_0x2c4a61;_0x504a3c>=0x0;_0x504a3c--)(_0x2c4a61=_0x5e6bdb[_0x504a3c])&&(_0xe41c9a=_0x2c4a61(_0xe41c9a)||_0xe41c9a);return _0xe41c9a;},S=(_0x139fd7,_0x29d9b9)=>(_0xe98ad4,_0x464853)=>_0x29d9b9(_0xe98ad4,_0x464853,_0x139fd7);function _0x1a7b(){const _0x22896c=['type','content','payload','DependentOn','_threadCommentDataSource','CollaborationSessionService','IThreadCommentDataSourceService','onReady','HTTPService','deleteComment','unitId','replies','bufferTime','get','dataSource','4172798EBKQfI','thread-comment-data-source.config','Unknown','_threadCommentDataSourceService','_injector','format','replyId','updateComment','customRanges','getUser','Plugin','UserManagerService','_configService','forEach','userId','Delete','filter','parentId','Reply','personId','CustomRangeType','OpenOrReOpen','Inject','getOwnPropertyDescriptor','user','subscribe','_sessionService','resolveComment','rangeType','rxjs','pipe','parse','_init','_userService','406428sMYpnz','YYYY/MM/DD\x20HH:mm','slice','listComments','599904LYKQqV','_initUserSync','stringify','UniverThreadCommentDataSourcePlugin','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','error','createTimestamp','5dsIDQS','delete','COMMENT','896340GHksYI','UNRECOGNIZED','/reply','Injector','ref','requireSession','/solved','toStringTag','_initDataSource','userID','root','post','find','addComment','@univerjs/thread-comment-ui','add','values','_threadCommentModel','/universer-api/comment/unit/','Solved','getUnit','9qJOcFR','ThreadCommentModel','Solve','6qAbPOs','42690ZuTKrq','setConfig','/universer-api/user/list','UniverThreadCommentUIPlugin','code','length','Add','commentUpdate$','UniverInstanceType','_commentService','rangeId','/add','saveCommentToSnapshot','Edit','threadId','disposeWithMe','/delete','getMemberID','/edit','3006196LLYJYy','_config','pluginName','Disposable','4892910JsphYW','defineProperty','Module','merge','/list','UniverLicensePlugin','addUser','resolved','size','_httpService','getCurrentUser','map'];_0x1a7b=function(){return _0x22896c;};return _0x1a7b();}let p=class extends c['Disposable']{constructor(_0x2a54e8,_0x18d0fd,_0x1b0ba0,_0x449fa7){const _0x4f4add=_0x3dcb11;super(),this[_0x4f4add(0x143)]=_0x2a54e8,this['_threadCommentModel']=_0x18d0fd,this[_0x4f4add(0x110)]=_0x1b0ba0,this[_0x4f4add(0xf3)]=_0x449fa7,this[_0x4f4add(0x10f)](),this[_0x4f4add(0x116)]();}[_0x3dcb11(0x116)](){const _0x43c810=_0x3dcb11;this[_0x43c810(0xcc)](this['_threadCommentModel'][_0x43c810(0x141)][_0x43c810(0x10d)](w[_0x43c810(0xec)](0x10))[_0x43c810(0x108)](_0x4234ca=>{const _0x2468c7=_0x43c810,_0x3489ba=new Set();_0x4234ca['forEach'](_0x1d1f24=>{const _0x11c734=_0x59b2;switch(_0x1d1f24['type']){case _0x11c734(0x130):{const _0x546147=_0x1d1f24[_0x11c734(0xe2)][_0x11c734(0x102)];_0x3489ba['add'](_0x546147);break;}}}),R(this[_0x2468c7(0xf3)],_0x3489ba);}));}['_init'](){const _0x2b6e86=_0x3dcb11;this[_0x2b6e86(0xcc)](this['_commentService'][_0x2b6e86(0x141)][_0x2b6e86(0x108)](async _0x3837ea=>{const _0x2767dd=_0x2b6e86;var _0x3005e9,_0x5a36cf,_0x5f12b5,_0x11ae9f;const _0x567c9b=(_0x3005e9=this['_threadCommentModel']['getUnit'](_0x3837ea['unitId'])[_0x2767dd(0x12d)](_0x4f4955=>_0x4f4955[_0x2767dd(0x148)]===_0x3837ea['threadId']))==null?void 0x0:_0x3005e9[_0x2767dd(0x12b)];if(!_0x567c9b)return;const {unitId:_0x4d7253,subUnitId:_0x104c38}=_0x567c9b;switch(_0x3837ea[_0x2767dd(0x107)]&&this['_userService'][_0x2767dd(0xda)](_0x3837ea[_0x2767dd(0x107)]),_0x3837ea[_0x2767dd(0xe0)]){case v[_0x2767dd(0x140)]:break;case v['Reply']:{this[_0x2767dd(0x132)]['addComment'](_0x4d7253,_0x104c38,{'unitId':_0x4d7253,'subUnitId':_0x104c38,'ref':'','id':_0x3837ea[_0x2767dd(0xf5)],'dT':f(+_0x3837ea['createTimestamp']),'threadId':_0x3837ea[_0x2767dd(0x148)],'personId':(_0x5f12b5=(_0x5a36cf=_0x3837ea[_0x2767dd(0x107)])==null?void 0x0:_0x5a36cf[_0x2767dd(0x12a)])!=null?_0x5f12b5:_0x3837ea['userId'],'text':JSON[_0x2767dd(0x10e)](_0x3837ea[_0x2767dd(0xe1)]),'parentId':_0x567c9b['id']});break;}case v['Delete']:{const _0x3c85d7=this[_0x2767dd(0x132)]['getComment'](_0x4d7253,_0x104c38,_0x3837ea[_0x2767dd(0xf5)]);_0x3c85d7&&_0x3c85d7[_0x2767dd(0x100)]&&this['_threadCommentModel'][_0x2767dd(0xe9)](_0x4d7253,_0x104c38,_0x3837ea[_0x2767dd(0xf5)]);break;}case v[_0x2767dd(0x147)]:{this[_0x2767dd(0x132)]['updateComment'](_0x4d7253,_0x104c38,{'commentId':_0x3837ea[_0x2767dd(0xf5)],'text':JSON[_0x2767dd(0x10e)](_0x3837ea['content'])});break;}case v[_0x2767dd(0x138)]:{const _0x38d723=(_0x11ae9f=this[_0x2767dd(0x132)][_0x2767dd(0x135)](_0x3837ea[_0x2767dd(0xea)])[_0x2767dd(0x12d)](_0x5cde3a=>_0x5cde3a[_0x2767dd(0x148)]===_0x3837ea[_0x2767dd(0x148)]))==null?void 0x0:_0x11ae9f[_0x2767dd(0x12b)];_0x38d723&&this['_threadCommentModel'][_0x2767dd(0x10a)](_0x4d7253,_0x104c38,_0x38d723['id'],_0x3837ea[_0x2767dd(0x119)]===I[_0x2767dd(0x134)]);break;}}}));}};p=E([S(0x0,c[_0x3dcb11(0x105)](b['CommentService'])),S(0x1,c[_0x3dcb11(0x105)](M[_0x3dcb11(0x137)])),S(0x2,c['Inject'](c[_0x3dcb11(0xfa)])),S(0x3,c[_0x3dcb11(0x105)](c[_0x3dcb11(0x124)]))],p);const q=_0x3dcb11(0xf0),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x90cf5d,_0x1ed1a1,_0x510cf8,_0x5b2300)=>{const _0x12a4fe=_0x3dcb11;for(var _0x4a3b32=_0x5b2300>0x1?void 0x0:_0x5b2300?A(_0x1ed1a1,_0x510cf8):_0x1ed1a1,_0x464ae4=_0x90cf5d[_0x12a4fe(0x13f)]-0x1,_0x465bee;_0x464ae4>=0x0;_0x464ae4--)(_0x465bee=_0x90cf5d[_0x464ae4])&&(_0x4a3b32=_0x465bee(_0x4a3b32)||_0x4a3b32);return _0x4a3b32;},_=(_0x23b0b9,_0x402ce3)=>(_0x4101dc,_0x3eafac)=>_0x402ce3(_0x4101dc,_0x3eafac,_0x23b0b9);function Y(_0x22f404,_0xeb542e){const _0xf859ab=_0x3dcb11,_0x4f8ff5=_0x22f404[_0xf859ab(0xeb)][0x0];return{..._0xeb542e,'id':_0x4f8ff5['replyId'],'resolved':_0x22f404[_0xf859ab(0x119)]===0x1,'dT':f(_0x4f8ff5[_0xf859ab(0x11d)]),'personId':_0x4f8ff5[_0xf859ab(0xfd)],'threadId':_0x4f8ff5[_0xf859ab(0x148)]};}function G(_0x4c1eed,_0x31a3fc,_0x57fbfd){const _0x31a4ee=_0x3dcb11;var _0x2dbacd,_0x3ffc2d;if(((_0x3ffc2d=(_0x2dbacd=_0x4c1eed==null?void 0x0:_0x4c1eed[_0x31a4ee(0xeb)])==null?void 0x0:_0x2dbacd[_0x31a4ee(0x13f)])!=null?_0x3ffc2d:0x0)>0x0){const _0x9bac7f=(_0x2df094,_0x79c901)=>({'id':_0x2df094['replyId'],'threadId':_0x2df094[_0x31a4ee(0x148)],'dT':f(_0x2df094[_0x31a4ee(0x11d)]),'personId':_0x2df094[_0x31a4ee(0xfd)],'resolved':_0x4c1eed['solved']===I['Solved'],'unitId':_0x31a3fc,'subUnitId':_0x57fbfd,'text':JSON['parse'](_0x2df094[_0x31a4ee(0xe1)]),'parentId':_0x79c901}),_0x442b19=_0x9bac7f(_0x4c1eed['replies'][0x0]);return{..._0x442b19,'children':_0x4c1eed['replies'][_0x31a4ee(0x113)](0x1)[_0x31a4ee(0xdf)](_0x47590b=>_0x9bac7f(_0x47590b,_0x442b19['id']))};}return null;}let g=class{constructor(_0x1485d6,_0x1f1074,_0x174298,_0x47832b){const _0x2ab9e4=_0x3dcb11;this['_httpService']=_0x1485d6,this[_0x2ab9e4(0x110)]=_0x1f1074,this['_sessionService']=_0x174298,this[_0x2ab9e4(0xf3)]=_0x47832b;}async[_0x3dcb11(0x12e)](_0x54a18a){const _0xbf09cf=_0x3dcb11;var _0x518592,_0x3582e7;const {parentId:_0x4cd967,unitId:_0x57a8f1,text:_0x169f75,threadId:_0x10251a}=_0x54a18a,_0x466339=(_0x3582e7=(_0x518592=_0x169f75[_0xbf09cf(0xf7)])==null?void 0x0:_0x518592['filter'](_0x2b7241=>_0x2b7241[_0xbf09cf(0x10b)]===c[_0xbf09cf(0x103)][_0xbf09cf(0x120)])['map'](_0x617c43=>_0x617c43['rangeId']))!=null?_0x3582e7:[],_0x564a3e=JSON['stringify'](_0x169f75),_0x6c491f=(await this[_0xbf09cf(0x109)][_0xbf09cf(0x126)](_0x57a8f1))['getMemberID']();if(_0x4cd967){const _0x1c00da={'memberId':_0x6c491f,'unitId':_0x57a8f1,'content':_0x564a3e,'mention':_0x466339,'threadId':_0x10251a},_0x2a5af4=(await this['_httpService']['post'](_0xbf09cf(0x133)+_0x57a8f1+_0xbf09cf(0x123),{'body':_0x1c00da}))[_0xbf09cf(0x11b)]['reply'];return{..._0x54a18a,'id':_0x2a5af4['replyId'],'dT':c['dayjs'](+_0x2a5af4[_0xbf09cf(0x11d)])[_0xbf09cf(0xf4)](_0xbf09cf(0x112)),'personId':_0x2a5af4['userId']};}else{const _0x47b6f0={'memberId':_0x6c491f,'unitId':_0x57a8f1,'content':_0x564a3e,'mention':_0x466339},_0x19875d=await this[_0xbf09cf(0xdd)][_0xbf09cf(0x12c)](_0xbf09cf(0x133)+_0x57a8f1+_0xbf09cf(0x145),{'body':_0x47b6f0});return Y(_0x19875d['body']['comment'],_0x54a18a);}}async[_0x3dcb11(0xf6)](_0xef9d57){const _0x3adb24=_0x3dcb11;var _0x203a21,_0xdc4244;const {text:_0x362f1b,unitId:_0x331956}=_0xef9d57,_0x5d6cac=(_0xdc4244=(_0x203a21=_0x362f1b[_0x3adb24(0xf7)])==null?void 0x0:_0x203a21[_0x3adb24(0xff)](_0x18e030=>_0x18e030[_0x3adb24(0x10b)]===c['CustomRangeType'][_0x3adb24(0x120)])[_0x3adb24(0xdf)](_0x49b435=>_0x49b435[_0x3adb24(0x144)]))!=null?_0xdc4244:[],_0x27550b=JSON[_0x3adb24(0x117)](_0x362f1b),_0x4363c1=_0xef9d57[_0x3adb24(0x148)],_0x234413=_0xef9d57['id'],_0x1e221a={'memberId':(await this[_0x3adb24(0x109)]['requireSession'](_0x331956))[_0x3adb24(0xce)](),'unitId':_0x331956,'threadId':_0x4363c1,'mention':_0x5d6cac,'content':_0x27550b,'replyId':_0x234413},_0x324b35=await this['_httpService'][_0x3adb24(0x12c)](_0x3adb24(0x133)+_0x331956+_0x3adb24(0xcf),{'body':_0x1e221a});return!_0x324b35[_0x3adb24(0x11b)][_0x3adb24(0x11c)]||_0x324b35['body'][_0x3adb24(0x11c)][_0x3adb24(0x13e)]===0x1;}async[_0x3dcb11(0x10a)](_0x34cc25){const _0x57ea94=_0x3dcb11,{unitId:_0x3ce1c5}=_0x34cc25,_0x3daa18=_0x34cc25[_0x57ea94(0x148)],_0x5ab3a3={'memberId':this[_0x57ea94(0x110)][_0x57ea94(0xde)]()['userID'],'unitId':_0x3ce1c5,'threadId':_0x3daa18,'solved':_0x34cc25[_0x57ea94(0xdb)]?I['Solved']:I[_0x57ea94(0x104)]},_0x3e30d4=await this['_httpService'][_0x57ea94(0x12c)]('/universer-api/comment/unit/'+_0x3ce1c5+_0x57ea94(0x127),{'body':_0x5ab3a3});return!_0x3e30d4['body'][_0x57ea94(0x11c)]||_0x3e30d4['body'][_0x57ea94(0x11c)][_0x57ea94(0x13e)]===0x1;}async[_0x3dcb11(0xe9)](_0x2af2ed,_0x32fec8,_0x574bd8,_0x208180){const _0xf4d5fd=_0x3dcb11,_0x4060e7={'memberId':(await this['_sessionService'][_0xf4d5fd(0x126)](_0x2af2ed))[_0xf4d5fd(0xce)](),'threadId':_0x574bd8,'replyId':_0x208180,'unitId':_0x2af2ed},_0x528e02=await this[_0xf4d5fd(0xdd)][_0xf4d5fd(0x12c)](_0xf4d5fd(0x133)+_0x2af2ed+_0xf4d5fd(0xcd),{'body':_0x4060e7});return!_0x528e02[_0xf4d5fd(0x11b)][_0xf4d5fd(0x11c)]||_0x528e02[_0xf4d5fd(0x11b)][_0xf4d5fd(0x11c)][_0xf4d5fd(0x13e)]===0x1;}async[_0x3dcb11(0x114)](_0xbb04cc,_0x58dbc3,_0x29728b){const _0x2c0a89=_0x3dcb11,_0x328ec8={'unitId':_0xbb04cc,'threadId':_0x29728b},_0x38c62f=await this[_0x2c0a89(0xdd)]['post'](_0x2c0a89(0x133)+_0xbb04cc+_0x2c0a89(0xd8),{'body':_0x328ec8}),_0x4b1e18=_0x29728b[_0x2c0a89(0xdf)](_0x47dfef=>G(_0x38c62f['body']['comments'][_0x47dfef],_0xbb04cc,_0x58dbc3))['filter'](Boolean);return Object[_0x2c0a89(0x131)](_0x38c62f[_0x2c0a89(0x11b)]['users'])['forEach'](_0x134852=>{const _0x19c06a=_0x2c0a89;this[_0x19c06a(0x110)]['addUser'](_0x134852);}),_0x4b1e18;}[_0x3dcb11(0x146)](_0x13b9b7){const _0x2dc085=_0x3dcb11;return{'id':_0x13b9b7['id'],'threadId':_0x13b9b7[_0x2dc085(0x148)],'ref':_0x13b9b7[_0x2dc085(0x125)]};}};g=x([_(0x0,c[_0x3dcb11(0x105)](P[_0x3dcb11(0xe8)])),_(0x1,c[_0x3dcb11(0x105)](c[_0x3dcb11(0xfa)])),_(0x2,c[_0x3dcb11(0x105)](b[_0x3dcb11(0xe5)])),_(0x3,c[_0x3dcb11(0x105)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x33b354,_0x119437,_0x551fa7,_0x1f5175)=>{for(var _0x10a948=_0x1f5175>0x1?void 0x0:_0x1f5175?H(_0x119437,_0x551fa7):_0x119437,_0xbd776b=_0x33b354['length']-0x1,_0x37bf0e;_0xbd776b>=0x0;_0xbd776b--)(_0x37bf0e=_0x33b354[_0xbd776b])&&(_0x10a948=_0x37bf0e(_0x10a948)||_0x10a948);return _0x10a948;},y=(_0x53319d,_0x172c60)=>(_0x30e23c,_0x1b334c)=>_0x172c60(_0x30e23c,_0x1b334c,_0x53319d);let C=class extends c[_0x3dcb11(0xd3)]{constructor(_0x4a4e2d,_0xfef82a){const _0x5ea737=_0x3dcb11;super(),this[_0x5ea737(0xf2)]=_0x4a4e2d,this[_0x5ea737(0xe4)]=_0xfef82a,this[_0x5ea737(0x129)]();}[_0x3dcb11(0x129)](){const _0x5c700e=_0x3dcb11;this[_0x5c700e(0xf2)][_0x5c700e(0xee)]=this[_0x5c700e(0xe4)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x3dcb11(0xe6)]),y(0x1,c[_0x3dcb11(0x105)](g))],C);function _0x59b2(_0x4ebee6,_0xa70394){const _0x1a7b68=_0x1a7b();return _0x59b2=function(_0x59b2c4,_0x26be73){_0x59b2c4=_0x59b2c4-0xcc;let _0xa5a8d=_0x1a7b68[_0x59b2c4];return _0xa5a8d;},_0x59b2(_0x4ebee6,_0xa70394);}var F=Object[_0x3dcb11(0xd5)],L=Object[_0x3dcb11(0x106)],Z=(_0x149cae,_0x57b009,_0x44b36e)=>_0x57b009 in _0x149cae?F(_0x149cae,_0x57b009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44b36e}):_0x149cae[_0x57b009]=_0x44b36e,W=(_0x7755de,_0x13961d,_0x33e352,_0xb31ec0)=>{const _0x323578=_0x3dcb11;for(var _0x2078ab=_0xb31ec0>0x1?void 0x0:_0xb31ec0?L(_0x13961d,_0x33e352):_0x13961d,_0x5c9eb9=_0x7755de[_0x323578(0x13f)]-0x1,_0x4ceb3b;_0x5c9eb9>=0x0;_0x5c9eb9--)(_0x4ceb3b=_0x7755de[_0x5c9eb9])&&(_0x2078ab=_0x4ceb3b(_0x2078ab)||_0x2078ab);return _0x2078ab;},O=(_0x11c475,_0x3f8857)=>(_0x17f6fd,_0x33566d)=>_0x3f8857(_0x17f6fd,_0x33566d,_0x11c475),N=(_0x2d9e6b,_0x59f948,_0x23506e)=>Z(_0x2d9e6b,typeof _0x59f948!='symbol'?_0x59f948+'':_0x59f948,_0x23506e);exports[_0x3dcb11(0x118)]=class extends c[_0x3dcb11(0xf9)]{constructor(_0x3d45f6=D,_0x32626a,_0x4534f6){const _0x21e275=_0x3dcb11;super(),this[_0x21e275(0xd1)]=_0x3d45f6,this[_0x21e275(0xf3)]=_0x32626a,this[_0x21e275(0xfb)]=_0x4534f6;const {..._0x5e2511}=c[_0x21e275(0xd7)]({},D,this['_config']);this[_0x21e275(0xfb)][_0x21e275(0x13b)](q,_0x5e2511);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x997c9b=>{const _0x32215d=_0x59b2;this[_0x32215d(0xf3)][_0x32215d(0x130)](_0x997c9b);});}[_0x3dcb11(0xe7)](){const _0x2a5ca0=_0x3dcb11;this['_injector']['get'](C),this[_0x2a5ca0(0xf3)][_0x2a5ca0(0xed)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3dcb11(0xd2),U),N(exports[_0x3dcb11(0x118)],_0x3dcb11(0xe0),c[_0x3dcb11(0x142)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3dcb11(0xe3)](j[_0x3dcb11(0x13d)],b['UniverCollaborationClientPlugin'],T[_0x3dcb11(0xd9)]),O(0x1,c[_0x3dcb11(0x105)](c[_0x3dcb11(0x124)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x5a3c69=_0x140b;(function(_0x9012e,_0x204477){const _0x36e73f=_0x140b,_0x507a66=_0x9012e();while(!![]){try{const _0x10dafb=-parseInt(_0x36e73f(0x146))/0x1*(-parseInt(_0x36e73f(0x15a))/0x2)+-parseInt(_0x36e73f(0x183))/0x3*(-parseInt(_0x36e73f(0x196))/0x4)+-parseInt(_0x36e73f(0x1b5))/0x5+-parseInt(_0x36e73f(0x16c))/0x6*(-parseInt(_0x36e73f(0x1ae))/0x7)+-parseInt(_0x36e73f(0x187))/0x8+parseInt(_0x36e73f(0x172))/0x9+parseInt(_0x36e73f(0x149))/0xa*(-parseInt(_0x36e73f(0x14e))/0xb);if(_0x10dafb===_0x204477)break;else _0x507a66['push'](_0x507a66['shift']());}catch(_0x41bf0f){_0x507a66['push'](_0x507a66['shift']());}}}(_0x44a1,0x4c4fb));Object[_0x5a3c69(0x142)](exports,Symbol['toStringTag'],{'value':_0x5a3c69(0x1b6)});const b=require(_0x5a3c69(0x152)),T=require(_0x5a3c69(0x164)),c=require(_0x5a3c69(0x1a1)),j=require(_0x5a3c69(0x169)),M=require(_0x5a3c69(0x16d)),w=require(_0x5a3c69(0x153)),P=require(_0x5a3c69(0x1a4)),U=_0x5a3c69(0x14c);var I=(_0x5613f4=>(_0x5613f4[_0x5613f4[_0x5a3c69(0x168)]=0x0]=_0x5a3c69(0x168),_0x5613f4[_0x5613f4[_0x5a3c69(0x1ac)]=0x1]=_0x5a3c69(0x1ac),_0x5613f4[_0x5613f4[_0x5a3c69(0x1a3)]=-0x1]=_0x5a3c69(0x1a3),_0x5613f4))(I||{}),v=(_0x25dc11=>(_0x25dc11[_0x25dc11[_0x5a3c69(0x16b)]=0x0]=_0x5a3c69(0x16b),_0x25dc11[_0x25dc11[_0x5a3c69(0x14f)]=0x1]=_0x5a3c69(0x14f),_0x25dc11[_0x25dc11[_0x5a3c69(0x148)]=0x2]='Reply',_0x25dc11[_0x25dc11[_0x5a3c69(0x18b)]=0x3]=_0x5a3c69(0x18b),_0x25dc11[_0x25dc11[_0x5a3c69(0x15b)]=0x4]=_0x5a3c69(0x15b),_0x25dc11[_0x25dc11[_0x5a3c69(0x190)]=0x5]=_0x5a3c69(0x190),_0x25dc11[_0x25dc11[_0x5a3c69(0x1a3)]=-0x1]=_0x5a3c69(0x1a3),_0x25dc11))(v||{});function _0x140b(_0x1bfa92,_0x4a4b39){const _0x44a1b6=_0x44a1();return _0x140b=function(_0x140baa,_0x344645){_0x140baa=_0x140baa-0x137;let _0x433faf=_0x44a1b6[_0x140baa];return _0x433faf;},_0x140b(_0x1bfa92,_0x4a4b39);}const f=_0x4e7c01=>c['dayjs'](new Date(+_0x4e7c01))[_0x5a3c69(0x155)](_0x5a3c69(0x1b4)),R=async(_0x2da711,_0x4818d1)=>{const _0x6bc081=_0x5a3c69,_0x5ed615=_0x2da711[_0x6bc081(0x178)](c[_0x6bc081(0x15f)]),_0x3bb68f=_0x2da711['get'](P[_0x6bc081(0x15d)]);_0x4818d1[_0x6bc081(0x199)](_0x3b299e=>{const _0x2f7cca=_0x6bc081;_0x5ed615[_0x2f7cca(0x19e)](_0x3b299e)&&_0x4818d1[_0x2f7cca(0x163)](_0x3b299e);}),_0x4818d1[_0x6bc081(0x197)]&&(await _0x3bb68f[_0x6bc081(0x178)](_0x6bc081(0x1b1),{'params':{'userIDs':[..._0x4818d1]}}))[_0x6bc081(0x175)][_0x6bc081(0x160)][_0x6bc081(0x199)](_0x612d55=>{_0x612d55&&_0x5ed615['addUser'](_0x612d55);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x35898e,_0x24bb16,_0x83c1d0,_0x3dd96c)=>{const _0x2cc4f0=_0x5a3c69;for(var _0x514db0=_0x3dd96c>0x1?void 0x0:_0x3dd96c?$(_0x24bb16,_0x83c1d0):_0x24bb16,_0x34e430=_0x35898e[_0x2cc4f0(0x1b9)]-0x1,_0x77ef43;_0x34e430>=0x0;_0x34e430--)(_0x77ef43=_0x35898e[_0x34e430])&&(_0x514db0=_0x77ef43(_0x514db0)||_0x514db0);return _0x514db0;},S=(_0x155c37,_0x22d6ac)=>(_0x51bdfd,_0x63127c)=>_0x22d6ac(_0x51bdfd,_0x63127c,_0x155c37);function _0x44a1(){const _0x17d45d=['1978587jKpDpD','getMemberID','pipe','body','comments','rangeId','get','replyId','addComment','dataSource','type','getComment','_injector','find','saveCommentToSnapshot','add','/reply','92310jdhjIF','CommentService','_commentService','CustomRangeType','4419120mYmKON','createTimestamp','resolveComment','symbol','Edit','dayjs','setConfig','_userService','personId','Solve','merge','/delete','rangeType','onReady','getOwnPropertyDescriptor','48KwYzEF','size','disposeWithMe','forEach','userId','subscribe','UniverThreadCommentDataSourcePlugin','solved','getUser','/add','replies','@univerjs/core','slice','UNRECOGNIZED','@univerjs/network','ThreadCommentModel','commentUpdate$','Plugin','onStarting','UniverInstanceType','_initUserSync','COMMENT','Solved','payload','2472428lAjaRM','_threadCommentDataSource','_configService','/universer-api/user/list','deleteComment','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','2229515NmAtYU','Module','userID','user','length','threadId','parse','Injector','addUser','IConfigService','UniverLicensePlugin','getUnit','UniverThreadCommentUIPlugin','comment','post','resolved','updateComment','defineProperty','/universer-api/comment/unit/','Inject','UNIVER_UNKNOWN','2158jToTEr','stringify','Reply','50QyCSHa','syncUpdateMutationToColla','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','228855iligto','Add','code','content','@univerjs-pro/collaboration-client','rxjs','values','format','error','_config','_threadCommentModel','map','438DTWEkZ','Delete','_init','HTTPService','/edit','UserManagerService','users','customRanges','CollaborationSessionService','delete','@univerjs-pro/license','unitId','_initDataSource','requireSession','OpenOrReOpen','@univerjs/thread-comment-ui','Disposable','Unknown','6WjsdTP','@univerjs/thread-comment','filter','_threadCommentDataSourceService','_httpService','/list'];_0x44a1=function(){return _0x17d45d;};return _0x44a1();}let p=class extends c[_0x5a3c69(0x16a)]{constructor(_0x230a78,_0x247e51,_0x107d1f,_0x59ad24){const _0x14c1c0=_0x5a3c69;super(),this['_commentService']=_0x230a78,this['_threadCommentModel']=_0x247e51,this[_0x14c1c0(0x18e)]=_0x107d1f,this['_injector']=_0x59ad24,this[_0x14c1c0(0x15c)](),this[_0x14c1c0(0x1aa)]();}[_0x5a3c69(0x1aa)](){const _0x45fab4=_0x5a3c69;this[_0x45fab4(0x198)](this[_0x45fab4(0x158)][_0x45fab4(0x1a6)][_0x45fab4(0x174)](w['bufferTime'](0x10))[_0x45fab4(0x19b)](_0x2ec14e=>{const _0x440dd1=_0x45fab4,_0x1ee88d=new Set();_0x2ec14e['forEach'](_0x50b414=>{const _0x4e94a4=_0x140b;switch(_0x50b414[_0x4e94a4(0x17c)]){case _0x4e94a4(0x181):{const _0x5a1663=_0x50b414[_0x4e94a4(0x1ad)][_0x4e94a4(0x18f)];_0x1ee88d[_0x4e94a4(0x181)](_0x5a1663);break;}}}),R(this[_0x440dd1(0x17e)],_0x1ee88d);}));}[_0x5a3c69(0x15c)](){const _0x12431d=_0x5a3c69;this[_0x12431d(0x198)](this[_0x12431d(0x185)][_0x12431d(0x1a6)][_0x12431d(0x19b)](async _0xb45c68=>{const _0x4a2d0c=_0x12431d;var _0x5daba8,_0x4b67a5,_0x3340ef,_0xf98eed;const _0x32b7c5=(_0x5daba8=this['_threadCommentModel'][_0x4a2d0c(0x13c)](_0xb45c68[_0x4a2d0c(0x165)])['find'](_0x10192e=>_0x10192e[_0x4a2d0c(0x1ba)]===_0xb45c68[_0x4a2d0c(0x1ba)]))==null?void 0x0:_0x5daba8['root'];if(!_0x32b7c5)return;const {unitId:_0x519560,subUnitId:_0x405374}=_0x32b7c5;switch(_0xb45c68[_0x4a2d0c(0x1b8)]&&this[_0x4a2d0c(0x18e)][_0x4a2d0c(0x139)](_0xb45c68[_0x4a2d0c(0x1b8)]),_0xb45c68[_0x4a2d0c(0x17c)]){case v['Add']:break;case v[_0x4a2d0c(0x148)]:{this[_0x4a2d0c(0x158)][_0x4a2d0c(0x17a)](_0x519560,_0x405374,{'unitId':_0x519560,'subUnitId':_0x405374,'ref':'','id':_0xb45c68[_0x4a2d0c(0x179)],'dT':f(+_0xb45c68[_0x4a2d0c(0x188)]),'threadId':_0xb45c68[_0x4a2d0c(0x1ba)],'personId':(_0x3340ef=(_0x4b67a5=_0xb45c68['user'])==null?void 0x0:_0x4b67a5[_0x4a2d0c(0x1b7)])!=null?_0x3340ef:_0xb45c68[_0x4a2d0c(0x19a)],'text':JSON[_0x4a2d0c(0x137)](_0xb45c68[_0x4a2d0c(0x151)]),'parentId':_0x32b7c5['id']});break;}case v[_0x4a2d0c(0x15b)]:{const _0x1a6c7e=this[_0x4a2d0c(0x158)][_0x4a2d0c(0x17d)](_0x519560,_0x405374,_0xb45c68[_0x4a2d0c(0x179)]);_0x1a6c7e&&_0x1a6c7e['parentId']&&this[_0x4a2d0c(0x158)][_0x4a2d0c(0x1b2)](_0x519560,_0x405374,_0xb45c68[_0x4a2d0c(0x179)]);break;}case v['Edit']:{this[_0x4a2d0c(0x158)]['updateComment'](_0x519560,_0x405374,{'commentId':_0xb45c68['replyId'],'text':JSON[_0x4a2d0c(0x137)](_0xb45c68[_0x4a2d0c(0x151)])});break;}case v['Solve']:{const _0x131cc2=(_0xf98eed=this[_0x4a2d0c(0x158)][_0x4a2d0c(0x13c)](_0xb45c68[_0x4a2d0c(0x165)])[_0x4a2d0c(0x17f)](_0x41c1f1=>_0x41c1f1[_0x4a2d0c(0x1ba)]===_0xb45c68[_0x4a2d0c(0x1ba)]))==null?void 0x0:_0xf98eed['root'];_0x131cc2&&this['_threadCommentModel'][_0x4a2d0c(0x189)](_0x519560,_0x405374,_0x131cc2['id'],_0xb45c68[_0x4a2d0c(0x19d)]===I[_0x4a2d0c(0x1ac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5a3c69(0x184)])),S(0x1,c[_0x5a3c69(0x144)](M[_0x5a3c69(0x1a5)])),S(0x2,c[_0x5a3c69(0x144)](c[_0x5a3c69(0x15f)])),S(0x3,c['Inject'](c[_0x5a3c69(0x138)]))],p);const q=_0x5a3c69(0x1b3),D={};var A=Object[_0x5a3c69(0x195)],x=(_0x1914ba,_0x355a4c,_0x4b1bf4,_0x2bd67e)=>{const _0x4ab245=_0x5a3c69;for(var _0x2df12e=_0x2bd67e>0x1?void 0x0:_0x2bd67e?A(_0x355a4c,_0x4b1bf4):_0x355a4c,_0x41d072=_0x1914ba[_0x4ab245(0x1b9)]-0x1,_0x135dee;_0x41d072>=0x0;_0x41d072--)(_0x135dee=_0x1914ba[_0x41d072])&&(_0x2df12e=_0x135dee(_0x2df12e)||_0x2df12e);return _0x2df12e;},_=(_0x35d003,_0x4b7c0f)=>(_0x227a18,_0x564a25)=>_0x4b7c0f(_0x227a18,_0x564a25,_0x35d003);function Y(_0x296a60,_0x64cd8e){const _0xb8db59=_0x5a3c69,_0x2ac498=_0x296a60['replies'][0x0];return{..._0x64cd8e,'id':_0x2ac498[_0xb8db59(0x179)],'resolved':_0x296a60['solved']===0x1,'dT':f(_0x2ac498[_0xb8db59(0x188)]),'personId':_0x2ac498['userId'],'threadId':_0x2ac498[_0xb8db59(0x1ba)]};}function G(_0x56f3c5,_0x3a4ce7,_0x379027){const _0x2902db=_0x5a3c69;var _0x25c30f,_0x274656;if(((_0x274656=(_0x25c30f=_0x56f3c5==null?void 0x0:_0x56f3c5[_0x2902db(0x1a0)])==null?void 0x0:_0x25c30f['length'])!=null?_0x274656:0x0)>0x0){const _0x21ecc1=(_0x5c7676,_0x4515b6)=>({'id':_0x5c7676[_0x2902db(0x179)],'threadId':_0x5c7676[_0x2902db(0x1ba)],'dT':f(_0x5c7676[_0x2902db(0x188)]),'personId':_0x5c7676['userId'],'resolved':_0x56f3c5[_0x2902db(0x19d)]===I['Solved'],'unitId':_0x3a4ce7,'subUnitId':_0x379027,'text':JSON['parse'](_0x5c7676[_0x2902db(0x151)]),'parentId':_0x4515b6}),_0x2ad800=_0x21ecc1(_0x56f3c5['replies'][0x0]);return{..._0x2ad800,'children':_0x56f3c5[_0x2902db(0x1a0)][_0x2902db(0x1a2)](0x1)[_0x2902db(0x159)](_0x33ecdc=>_0x21ecc1(_0x33ecdc,_0x2ad800['id']))};}return null;}let g=class{constructor(_0xdac1f,_0x53a2ed,_0x394c78,_0x4dc251){const _0x27e153=_0x5a3c69;this[_0x27e153(0x170)]=_0xdac1f,this['_userService']=_0x53a2ed,this['_sessionService']=_0x394c78,this[_0x27e153(0x17e)]=_0x4dc251;}async[_0x5a3c69(0x17a)](_0x41eac4){const _0x1a286f=_0x5a3c69;var _0x564753,_0x3a472d;const {parentId:_0x57d912,unitId:_0x42403f,text:_0x52ec1d,threadId:_0x2fc566}=_0x41eac4,_0x46083b=(_0x3a472d=(_0x564753=_0x52ec1d[_0x1a286f(0x161)])==null?void 0x0:_0x564753['filter'](_0x3f9187=>_0x3f9187[_0x1a286f(0x193)]===c[_0x1a286f(0x186)][_0x1a286f(0x1ab)])[_0x1a286f(0x159)](_0x271d42=>_0x271d42[_0x1a286f(0x177)]))!=null?_0x3a472d:[],_0x6129a7=JSON[_0x1a286f(0x147)](_0x52ec1d),_0x25a5c4=(await this[_0x1a286f(0x14b)]['requireSession'](_0x42403f))['getMemberID']();if(_0x57d912){const _0x590163={'memberId':_0x25a5c4,'unitId':_0x42403f,'content':_0x6129a7,'mention':_0x46083b,'threadId':_0x2fc566},_0x5c3823=(await this[_0x1a286f(0x170)]['post'](_0x1a286f(0x143)+_0x42403f+_0x1a286f(0x182),{'body':_0x590163}))[_0x1a286f(0x175)]['reply'];return{..._0x41eac4,'id':_0x5c3823[_0x1a286f(0x179)],'dT':c[_0x1a286f(0x18c)](+_0x5c3823[_0x1a286f(0x188)])[_0x1a286f(0x155)](_0x1a286f(0x1b4)),'personId':_0x5c3823[_0x1a286f(0x19a)]};}else{const _0x515097={'memberId':_0x25a5c4,'unitId':_0x42403f,'content':_0x6129a7,'mention':_0x46083b},_0x5b0cc3=await this[_0x1a286f(0x170)][_0x1a286f(0x13f)]('/universer-api/comment/unit/'+_0x42403f+_0x1a286f(0x19f),{'body':_0x515097});return Y(_0x5b0cc3[_0x1a286f(0x175)][_0x1a286f(0x13e)],_0x41eac4);}}async[_0x5a3c69(0x141)](_0x5f0576){const _0x3d44f4=_0x5a3c69;var _0x287cdb,_0x718189;const {text:_0xd1f03,unitId:_0x4ccb6c}=_0x5f0576,_0x5c0ab0=(_0x718189=(_0x287cdb=_0xd1f03[_0x3d44f4(0x161)])==null?void 0x0:_0x287cdb[_0x3d44f4(0x16e)](_0x39e58b=>_0x39e58b[_0x3d44f4(0x193)]===c[_0x3d44f4(0x186)][_0x3d44f4(0x1ab)])['map'](_0x1b3659=>_0x1b3659[_0x3d44f4(0x177)]))!=null?_0x718189:[],_0x12b1f3=JSON['stringify'](_0xd1f03),_0x24a8a4=_0x5f0576[_0x3d44f4(0x1ba)],_0x5e0d7d=_0x5f0576['id'],_0x64dfac={'memberId':(await this['_sessionService'][_0x3d44f4(0x167)](_0x4ccb6c))['getMemberID'](),'unitId':_0x4ccb6c,'threadId':_0x24a8a4,'mention':_0x5c0ab0,'content':_0x12b1f3,'replyId':_0x5e0d7d},_0x14dfc8=await this[_0x3d44f4(0x170)][_0x3d44f4(0x13f)](_0x3d44f4(0x143)+_0x4ccb6c+_0x3d44f4(0x15e),{'body':_0x64dfac});return!_0x14dfc8[_0x3d44f4(0x175)]['error']||_0x14dfc8[_0x3d44f4(0x175)][_0x3d44f4(0x156)]['code']===0x1;}async[_0x5a3c69(0x189)](_0x443223){const _0x7f5f4c=_0x5a3c69,{unitId:_0x53736a}=_0x443223,_0x342f13=_0x443223[_0x7f5f4c(0x1ba)],_0x43eb0c={'memberId':this[_0x7f5f4c(0x18e)][_0x7f5f4c(0x14d)]()[_0x7f5f4c(0x1b7)],'unitId':_0x53736a,'threadId':_0x342f13,'solved':_0x443223[_0x7f5f4c(0x140)]?I['Solved']:I[_0x7f5f4c(0x168)]},_0xe447d3=await this[_0x7f5f4c(0x170)]['post']('/universer-api/comment/unit/'+_0x53736a+'/solved',{'body':_0x43eb0c});return!_0xe447d3[_0x7f5f4c(0x175)][_0x7f5f4c(0x156)]||_0xe447d3[_0x7f5f4c(0x175)][_0x7f5f4c(0x156)][_0x7f5f4c(0x150)]===0x1;}async[_0x5a3c69(0x1b2)](_0x2cb015,_0x45d1cc,_0x599693,_0x2516e0){const _0x57d02e=_0x5a3c69,_0x25f0f7={'memberId':(await this[_0x57d02e(0x14b)]['requireSession'](_0x2cb015))[_0x57d02e(0x173)](),'threadId':_0x599693,'replyId':_0x2516e0,'unitId':_0x2cb015},_0x4ff191=await this[_0x57d02e(0x170)]['post'](_0x57d02e(0x143)+_0x2cb015+_0x57d02e(0x192),{'body':_0x25f0f7});return!_0x4ff191['body'][_0x57d02e(0x156)]||_0x4ff191[_0x57d02e(0x175)]['error'][_0x57d02e(0x150)]===0x1;}async['listComments'](_0x17bc2f,_0x5df002,_0x4eabc1){const _0x1afb95=_0x5a3c69,_0x540399={'unitId':_0x17bc2f,'threadId':_0x4eabc1},_0x47c451=await this[_0x1afb95(0x170)][_0x1afb95(0x13f)]('/universer-api/comment/unit/'+_0x17bc2f+_0x1afb95(0x171),{'body':_0x540399}),_0x33e5f3=_0x4eabc1[_0x1afb95(0x159)](_0x1b1db3=>G(_0x47c451['body'][_0x1afb95(0x176)][_0x1b1db3],_0x17bc2f,_0x5df002))[_0x1afb95(0x16e)](Boolean);return Object[_0x1afb95(0x154)](_0x47c451[_0x1afb95(0x175)][_0x1afb95(0x160)])['forEach'](_0x29a291=>{const _0x2b7c12=_0x1afb95;this[_0x2b7c12(0x18e)][_0x2b7c12(0x139)](_0x29a291);}),_0x33e5f3;}[_0x5a3c69(0x180)](_0x31caeb){return{'id':_0x31caeb['id'],'threadId':_0x31caeb['threadId'],'ref':_0x31caeb['ref']};}};g=x([_(0x0,c[_0x5a3c69(0x144)](P['HTTPService'])),_(0x1,c[_0x5a3c69(0x144)](c[_0x5a3c69(0x15f)])),_(0x2,c[_0x5a3c69(0x144)](b[_0x5a3c69(0x162)])),_(0x3,c['Inject'](c[_0x5a3c69(0x138)]))],g);var H=Object[_0x5a3c69(0x195)],J=(_0x40bbe8,_0x5521d0,_0x2042db,_0x531283)=>{const _0x33d6ee=_0x5a3c69;for(var _0x5140b1=_0x531283>0x1?void 0x0:_0x531283?H(_0x5521d0,_0x2042db):_0x5521d0,_0x530bf0=_0x40bbe8[_0x33d6ee(0x1b9)]-0x1,_0x3001c2;_0x530bf0>=0x0;_0x530bf0--)(_0x3001c2=_0x40bbe8[_0x530bf0])&&(_0x5140b1=_0x3001c2(_0x5140b1)||_0x5140b1);return _0x5140b1;},y=(_0x2dc495,_0x4f80cd)=>(_0x8c703b,_0xb9ded0)=>_0x4f80cd(_0x8c703b,_0xb9ded0,_0x2dc495);let C=class extends c[_0x5a3c69(0x16a)]{constructor(_0x195b02,_0x18d848){const _0x16baf0=_0x5a3c69;super(),this[_0x16baf0(0x16f)]=_0x195b02,this[_0x16baf0(0x1af)]=_0x18d848,this[_0x16baf0(0x166)]();}[_0x5a3c69(0x166)](){const _0x128821=_0x5a3c69;this[_0x128821(0x16f)][_0x128821(0x17b)]=this[_0x128821(0x1af)],this[_0x128821(0x16f)][_0x128821(0x14a)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x5a3c69(0x142)],L=Object[_0x5a3c69(0x195)],Z=(_0x14e2f7,_0x411723,_0x2c3e00)=>_0x411723 in _0x14e2f7?F(_0x14e2f7,_0x411723,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c3e00}):_0x14e2f7[_0x411723]=_0x2c3e00,W=(_0x443807,_0x5baa14,_0x61a9e,_0x538994)=>{for(var _0x58f92e=_0x538994>0x1?void 0x0:_0x538994?L(_0x5baa14,_0x61a9e):_0x5baa14,_0x1d45b2=_0x443807['length']-0x1,_0x19d1ee;_0x1d45b2>=0x0;_0x1d45b2--)(_0x19d1ee=_0x443807[_0x1d45b2])&&(_0x58f92e=_0x19d1ee(_0x58f92e)||_0x58f92e);return _0x58f92e;},O=(_0x29d310,_0x144710)=>(_0x3c5370,_0x36ddfe)=>_0x144710(_0x3c5370,_0x36ddfe,_0x29d310),N=(_0x195bf6,_0x145681,_0x31f596)=>Z(_0x195bf6,typeof _0x145681!=_0x5a3c69(0x18a)?_0x145681+'':_0x145681,_0x31f596);exports[_0x5a3c69(0x19c)]=class extends c[_0x5a3c69(0x1a7)]{constructor(_0x59b77f=D,_0x169bab,_0x40b0be){const _0x52de6c=_0x5a3c69;super(),this[_0x52de6c(0x157)]=_0x59b77f,this[_0x52de6c(0x17e)]=_0x169bab,this[_0x52de6c(0x1b0)]=_0x40b0be;const {..._0x466abc}=c[_0x52de6c(0x191)]({},D,this['_config']);this[_0x52de6c(0x1b0)][_0x52de6c(0x18d)](q,_0x466abc);}[_0x5a3c69(0x1a8)](){const _0x51507e=_0x5a3c69;[[g],[C],[p]][_0x51507e(0x199)](_0x38429e=>{const _0x142474=_0x51507e;this[_0x142474(0x17e)][_0x142474(0x181)](_0x38429e);});}[_0x5a3c69(0x194)](){const _0x15a9e3=_0x5a3c69;this[_0x15a9e3(0x17e)][_0x15a9e3(0x178)](C),this[_0x15a9e3(0x17e)][_0x15a9e3(0x178)](p);}},N(exports[_0x5a3c69(0x19c)],'pluginName',U),N(exports[_0x5a3c69(0x19c)],_0x5a3c69(0x17c),c[_0x5a3c69(0x1a9)][_0x5a3c69(0x145)]),exports[_0x5a3c69(0x19c)]=W([c['DependentOn'](j[_0x5a3c69(0x13d)],b['UniverCollaborationClientPlugin'],T[_0x5a3c69(0x13b)]),O(0x1,c[_0x5a3c69(0x144)](c['Injector'])),O(0x2,c[_0x5a3c69(0x13a)])],exports[_0x5a3c69(0x19c)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x35a9d0=_0x18a9;(function(_0x2f9fc7,_0x32c3b2){const _0x2b02fe=_0x18a9,_0x1eb092=_0x2f9fc7();while(!![]){try{const _0x1949b4=parseInt(_0x2b02fe(0xd9))/0x1+-parseInt(_0x2b02fe(0xea))/0x2*(parseInt(_0x2b02fe(0xba))/0x3)+parseInt(_0x2b02fe(0xdc))/0x4*(-parseInt(_0x2b02fe(0xc0))/0x5)+parseInt(_0x2b02fe(0xe7))/0x6*(-parseInt(_0x2b02fe(0xfb))/0x7)+parseInt(_0x2b02fe(0x9d))/0x8*(parseInt(_0x2b02fe(0xb7))/0x9)+parseInt(_0x2b02fe(0xd8))/0xa+-parseInt(_0x2b02fe(0xa2))/0xb*(-parseInt(_0x2b02fe(0xdb))/0xc);if(_0x1949b4===_0x32c3b2)break;else _0x1eb092['push'](_0x1eb092['shift']());}catch(_0x1bc0f2){_0x1eb092['push'](_0x1eb092['shift']());}}}(_0x13f7,0x866e3));function _0x13f7(){const _0x519ac7=['get','forEach','filter','/list','_userService','2514OgnqyL','type','find','8gNAnOJ','_injector','slice','listComments','/universer-api/user/list','parse','unitId','/delete','replies','Solved','Edit','replyId','UNRECOGNIZED','_threadCommentDataSourceService','rangeType','threadId','Solve','6398VbQrpr','defineProperty','requireSession','getOwnPropertyDescriptor','UNIVER_UNKNOWN','COMMENT','pipe','_sessionService','_initDataSource','updateComment','personId','getCurrentUser','userId','map','8KgoOcv','_init','getComment','user','solved','451oDFEnG','post','users','OpenOrReOpen','_httpService','delete','_initUserSync','setConfig','thread-comment-data-source.config','createTimestamp','onReady','Add','customRanges','payload','_config','root','Reply','getUnit','YYYY/MM/DD\x20HH:mm','_threadCommentModel','size','5901309rlIYvy','comment','dataSource','279771ZRKZIV','resolved','symbol','content','ref','_commentService','9345LHCzOU','syncUpdateMutationToColla','/add','userID','/reply','add','deleteComment','rangeId','getUser','code','format','subscribe','Delete','commentUpdate$','parentId','getMemberID','error','resolveComment','Unknown','body','onStarting','length','disposeWithMe','stringify','4783050ehZnzV','199311FYOhuF','/edit','2580PZKMOo','76swLjZn','comments','/solved','addUser','/universer-api/comment/unit/','_threadCommentDataSource'];_0x13f7=function(){return _0x519ac7;};return _0x13f7();}import{CommentService as _0x278907,CollaborationSessionService as _0xba6ff4,UniverCollaborationClientPlugin as _0xbc84fc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42a3ce}from'@univerjs-pro/license';import{dayjs as _0x4b3fc3,UserManagerService as _0x29941a,Inject as _0x45f7ff,Injector as _0x1f501e,Disposable as _0xfa304e,CustomRangeType as _0x66cff7,UniverInstanceType as _0xd39200,DependentOn as _0x1eb8c7,IConfigService as _0x24fb91,Plugin as _0x172dee,merge as _0xc29423}from'@univerjs/core';function _0x18a9(_0x4bfd9d,_0x519b1a){const _0x13f7e6=_0x13f7();return _0x18a9=function(_0x18a9da,_0xe24b01){_0x18a9da=_0x18a9da-0x9a;let _0x441a72=_0x13f7e6[_0x18a9da];return _0x441a72;},_0x18a9(_0x4bfd9d,_0x519b1a);}import{UniverThreadCommentUIPlugin as _0x138b23}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e14ce,IThreadCommentDataSourceService as _0x4091ea}from'@univerjs/thread-comment';import{bufferTime as _0x52d5ed}from'rxjs';import{HTTPService as _0x4dec66}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x46ee3a=>(_0x46ee3a[_0x46ee3a[_0x35a9d0(0xa5)]=0x0]='OpenOrReOpen',_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf3)]=0x1]=_0x35a9d0(0xf3),_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf6)]=-0x1]=_0x35a9d0(0xf6),_0x46ee3a))(I||{}),v=(_0x26e7d3=>(_0x26e7d3[_0x26e7d3[_0x35a9d0(0xd2)]=0x0]='Unknown',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xad)]=0x1]='Add',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xb2)]=0x2]=_0x35a9d0(0xb2),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf4)]=0x3]=_0x35a9d0(0xf4),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xcc)]=0x4]=_0x35a9d0(0xcc),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xfa)]=0x5]=_0x35a9d0(0xfa),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf6)]=-0x1]='UNRECOGNIZED',_0x26e7d3))(v||{});const D=_0x3644b5=>_0x4b3fc3(new Date(+_0x3644b5))[_0x35a9d0(0xca)](_0x35a9d0(0xb4)),B=async(_0x409953,_0x98eca7)=>{const _0x51eefa=_0x35a9d0,_0x2bb218=_0x409953[_0x51eefa(0xe2)](_0x29941a),_0x17377e=_0x409953[_0x51eefa(0xe2)](_0x4dec66);_0x98eca7['forEach'](_0x74117d=>{const _0x2db544=_0x51eefa;_0x2bb218[_0x2db544(0xc8)](_0x74117d)&&_0x98eca7[_0x2db544(0xa7)](_0x74117d);}),_0x98eca7[_0x51eefa(0xb6)]&&(await _0x17377e['get'](_0x51eefa(0xee),{'params':{'userIDs':[..._0x98eca7]}}))[_0x51eefa(0xd3)][_0x51eefa(0xa4)][_0x51eefa(0xe3)](_0x49d7c6=>{_0x49d7c6&&_0x2bb218['addUser'](_0x49d7c6);});};var K=Object[_0x35a9d0(0xfe)],V=(_0xe9e955,_0xc8ece8,_0x20a144,_0x4cef4e)=>{const _0x5cff45=_0x35a9d0;for(var _0x327e9e=_0x4cef4e>0x1?void 0x0:_0x4cef4e?K(_0xc8ece8,_0x20a144):_0xc8ece8,_0x283a3a=_0xe9e955[_0x5cff45(0xd5)]-0x1,_0x19cbe4;_0x283a3a>=0x0;_0x283a3a--)(_0x19cbe4=_0xe9e955[_0x283a3a])&&(_0x327e9e=_0x19cbe4(_0x327e9e)||_0x327e9e);return _0x327e9e;},p=(_0x282c8a,_0x36cfc5)=>(_0xe346f,_0x30445b)=>_0x36cfc5(_0xe346f,_0x30445b,_0x282c8a);let S=class extends _0xfa304e{constructor(_0x2d1366,_0x4dbebf,_0x1191ec,_0x2d7e97){const _0x2acdd5=_0x35a9d0;super(),this[_0x2acdd5(0xbf)]=_0x2d1366,this[_0x2acdd5(0xb5)]=_0x4dbebf,this['_userService']=_0x1191ec,this[_0x2acdd5(0xeb)]=_0x2d7e97,this[_0x2acdd5(0x9e)](),this[_0x2acdd5(0xa8)]();}['_initUserSync'](){const _0x1bd377=_0x35a9d0;this['disposeWithMe'](this[_0x1bd377(0xb5)][_0x1bd377(0xcd)][_0x1bd377(0x101)](_0x52d5ed(0x10))[_0x1bd377(0xcb)](_0xb4fe58=>{const _0x2b1384=_0x1bd377,_0x2bab93=new Set();_0xb4fe58[_0x2b1384(0xe3)](_0x5b3988=>{const _0x8a37c=_0x2b1384;switch(_0x5b3988[_0x8a37c(0xe8)]){case'add':{const _0x587eda=_0x5b3988[_0x8a37c(0xaf)][_0x8a37c(0x105)];_0x2bab93[_0x8a37c(0xc5)](_0x587eda);break;}}}),B(this[_0x2b1384(0xeb)],_0x2bab93);}));}[_0x35a9d0(0x9e)](){const _0x10f902=_0x35a9d0;this[_0x10f902(0xd6)](this[_0x10f902(0xbf)][_0x10f902(0xcd)][_0x10f902(0xcb)](async _0x1ceff0=>{const _0x223a70=_0x10f902;var _0x3265f3,_0x87c3ae,_0x534274,_0x18eed5;const _0x135f64=(_0x3265f3=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])['find'](_0x396d00=>_0x396d00[_0x223a70(0xf9)]===_0x1ceff0['threadId']))==null?void 0x0:_0x3265f3[_0x223a70(0xb1)];if(!_0x135f64)return;const {unitId:_0x241110,subUnitId:_0x4309e4}=_0x135f64;switch(_0x1ceff0[_0x223a70(0xa0)]&&this[_0x223a70(0xe6)][_0x223a70(0xdf)](_0x1ceff0[_0x223a70(0xa0)]),_0x1ceff0['type']){case v[_0x223a70(0xad)]:break;case v[_0x223a70(0xb2)]:{this[_0x223a70(0xb5)]['addComment'](_0x241110,_0x4309e4,{'unitId':_0x241110,'subUnitId':_0x4309e4,'ref':'','id':_0x1ceff0['replyId'],'dT':D(+_0x1ceff0['createTimestamp']),'threadId':_0x1ceff0['threadId'],'personId':(_0x534274=(_0x87c3ae=_0x1ceff0[_0x223a70(0xa0)])==null?void 0x0:_0x87c3ae[_0x223a70(0xc3)])!=null?_0x534274:_0x1ceff0[_0x223a70(0x9b)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)]),'parentId':_0x135f64['id']});break;}case v[_0x223a70(0xcc)]:{const _0x36bea3=this[_0x223a70(0xb5)][_0x223a70(0x9f)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);_0x36bea3&&_0x36bea3[_0x223a70(0xce)]&&this['_threadCommentModel'][_0x223a70(0xc6)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);break;}case v[_0x223a70(0xf4)]:{this[_0x223a70(0xb5)][_0x223a70(0x104)](_0x241110,_0x4309e4,{'commentId':_0x1ceff0[_0x223a70(0xf5)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)])});break;}case v[_0x223a70(0xfa)]:{const _0x181e4f=(_0x18eed5=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])[_0x223a70(0xe9)](_0x2ef9a2=>_0x2ef9a2['threadId']===_0x1ceff0[_0x223a70(0xf9)]))==null?void 0x0:_0x18eed5[_0x223a70(0xb1)];_0x181e4f&&this[_0x223a70(0xb5)][_0x223a70(0xd1)](_0x241110,_0x4309e4,_0x181e4f['id'],_0x1ceff0[_0x223a70(0xa1)]===I[_0x223a70(0xf3)]);break;}}}));}};S=V([p(0x0,_0x45f7ff(_0x278907)),p(0x1,_0x45f7ff(_0x2e14ce)),p(0x2,_0x45f7ff(_0x29941a)),p(0x3,_0x45f7ff(_0x1f501e))],S);const z=_0x35a9d0(0xaa),M={};var k=Object[_0x35a9d0(0xfe)],Q=(_0x100267,_0x1a54c6,_0x451415,_0x4b3058)=>{const _0x2691d2=_0x35a9d0;for(var _0x266e1f=_0x4b3058>0x1?void 0x0:_0x4b3058?k(_0x1a54c6,_0x451415):_0x1a54c6,_0x22c34d=_0x100267[_0x2691d2(0xd5)]-0x1,_0x359789;_0x22c34d>=0x0;_0x22c34d--)(_0x359789=_0x100267[_0x22c34d])&&(_0x266e1f=_0x359789(_0x266e1f)||_0x266e1f);return _0x266e1f;},_=(_0x3678f8,_0x142bd0)=>(_0x9641dc,_0xc8b486)=>_0x142bd0(_0x9641dc,_0xc8b486,_0x3678f8);function X(_0x61d84c,_0x193f6c){const _0x2e0147=_0x35a9d0,_0x12db8e=_0x61d84c[_0x2e0147(0xf2)][0x0];return{..._0x193f6c,'id':_0x12db8e[_0x2e0147(0xf5)],'resolved':_0x61d84c['solved']===0x1,'dT':D(_0x12db8e[_0x2e0147(0xab)]),'personId':_0x12db8e[_0x2e0147(0x9b)],'threadId':_0x12db8e['threadId']};}function ee(_0x30343b,_0x582cb9,_0x459565){const _0x4f53c0=_0x35a9d0;var _0x14a79e,_0x2fb51d;if(((_0x2fb51d=(_0x14a79e=_0x30343b==null?void 0x0:_0x30343b[_0x4f53c0(0xf2)])==null?void 0x0:_0x14a79e[_0x4f53c0(0xd5)])!=null?_0x2fb51d:0x0)>0x0){const _0x520285=(_0x4870f7,_0x33a204)=>({'id':_0x4870f7[_0x4f53c0(0xf5)],'threadId':_0x4870f7[_0x4f53c0(0xf9)],'dT':D(_0x4870f7[_0x4f53c0(0xab)]),'personId':_0x4870f7[_0x4f53c0(0x9b)],'resolved':_0x30343b[_0x4f53c0(0xa1)]===I[_0x4f53c0(0xf3)],'unitId':_0x582cb9,'subUnitId':_0x459565,'text':JSON[_0x4f53c0(0xef)](_0x4870f7[_0x4f53c0(0xbd)]),'parentId':_0x33a204}),_0x13a7c6=_0x520285(_0x30343b[_0x4f53c0(0xf2)][0x0]);return{..._0x13a7c6,'children':_0x30343b[_0x4f53c0(0xf2)][_0x4f53c0(0xec)](0x1)[_0x4f53c0(0x9c)](_0x58ddfb=>_0x520285(_0x58ddfb,_0x13a7c6['id']))};}return null;}let f=class{constructor(_0x2aadba,_0x279a18,_0xaea661,_0x31844e){const _0x5a89e3=_0x35a9d0;this[_0x5a89e3(0xa6)]=_0x2aadba,this[_0x5a89e3(0xe6)]=_0x279a18,this['_sessionService']=_0xaea661,this['_injector']=_0x31844e;}async['addComment'](_0x278065){const _0x16202c=_0x35a9d0;var _0x19f3da,_0x22488a;const {parentId:_0x77de2e,unitId:_0xad987d,text:_0x4aa0cd,threadId:_0x1ff31a}=_0x278065,_0x1bb8db=(_0x22488a=(_0x19f3da=_0x4aa0cd['customRanges'])==null?void 0x0:_0x19f3da['filter'](_0x5043b0=>_0x5043b0[_0x16202c(0xf8)]===_0x66cff7[_0x16202c(0x100)])[_0x16202c(0x9c)](_0x51df0e=>_0x51df0e[_0x16202c(0xc7)]))!=null?_0x22488a:[],_0x333b90=JSON[_0x16202c(0xd7)](_0x4aa0cd),_0x16c654=(await this[_0x16202c(0x102)][_0x16202c(0xfd)](_0xad987d))['getMemberID']();if(_0x77de2e){const _0x42ddcc={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db,'threadId':_0x1ff31a},_0x38084f=(await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc4),{'body':_0x42ddcc}))[_0x16202c(0xd3)]['reply'];return{..._0x278065,'id':_0x38084f[_0x16202c(0xf5)],'dT':_0x4b3fc3(+_0x38084f[_0x16202c(0xab)])['format'](_0x16202c(0xb4)),'personId':_0x38084f[_0x16202c(0x9b)]};}else{const _0x3f697d={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db},_0x3dab70=await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc2),{'body':_0x3f697d});return X(_0x3dab70['body'][_0x16202c(0xb8)],_0x278065);}}async[_0x35a9d0(0x104)](_0x506571){const _0x26839b=_0x35a9d0;var _0x4ddc13,_0x24b61d;const {text:_0x30aafa,unitId:_0x5e378e}=_0x506571,_0x41914c=(_0x24b61d=(_0x4ddc13=_0x30aafa[_0x26839b(0xae)])==null?void 0x0:_0x4ddc13[_0x26839b(0xe4)](_0x24fde8=>_0x24fde8[_0x26839b(0xf8)]===_0x66cff7[_0x26839b(0x100)])[_0x26839b(0x9c)](_0x599f89=>_0x599f89[_0x26839b(0xc7)]))!=null?_0x24b61d:[],_0x158e53=JSON[_0x26839b(0xd7)](_0x30aafa),_0x176521=_0x506571[_0x26839b(0xf9)],_0x508453=_0x506571['id'],_0x15f989={'memberId':(await this[_0x26839b(0x102)][_0x26839b(0xfd)](_0x5e378e))[_0x26839b(0xcf)](),'unitId':_0x5e378e,'threadId':_0x176521,'mention':_0x41914c,'content':_0x158e53,'replyId':_0x508453},_0x29aaad=await this[_0x26839b(0xa6)]['post']('/universer-api/comment/unit/'+_0x5e378e+_0x26839b(0xda),{'body':_0x15f989});return!_0x29aaad['body'][_0x26839b(0xd0)]||_0x29aaad[_0x26839b(0xd3)][_0x26839b(0xd0)]['code']===0x1;}async[_0x35a9d0(0xd1)](_0x1d05b1){const _0x2b71d7=_0x35a9d0,{unitId:_0x19bea6}=_0x1d05b1,_0x32bb81=_0x1d05b1['threadId'],_0x16cac8={'memberId':this[_0x2b71d7(0xe6)][_0x2b71d7(0x9a)]()[_0x2b71d7(0xc3)],'unitId':_0x19bea6,'threadId':_0x32bb81,'solved':_0x1d05b1[_0x2b71d7(0xbb)]?I[_0x2b71d7(0xf3)]:I[_0x2b71d7(0xa5)]},_0xd4a211=await this['_httpService'][_0x2b71d7(0xa3)](_0x2b71d7(0xe0)+_0x19bea6+_0x2b71d7(0xde),{'body':_0x16cac8});return!_0xd4a211[_0x2b71d7(0xd3)][_0x2b71d7(0xd0)]||_0xd4a211['body'][_0x2b71d7(0xd0)][_0x2b71d7(0xc9)]===0x1;}async['deleteComment'](_0x5e59e3,_0x10afcb,_0xdd6edc,_0x2a7881){const _0x480fdc=_0x35a9d0,_0x2aa2c5={'memberId':(await this[_0x480fdc(0x102)]['requireSession'](_0x5e59e3))[_0x480fdc(0xcf)](),'threadId':_0xdd6edc,'replyId':_0x2a7881,'unitId':_0x5e59e3},_0x56b878=await this[_0x480fdc(0xa6)][_0x480fdc(0xa3)](_0x480fdc(0xe0)+_0x5e59e3+_0x480fdc(0xf1),{'body':_0x2aa2c5});return!_0x56b878['body'][_0x480fdc(0xd0)]||_0x56b878['body'][_0x480fdc(0xd0)]['code']===0x1;}async[_0x35a9d0(0xed)](_0x409305,_0x6e141d,_0x525db2){const _0x5b9092=_0x35a9d0,_0x2f8fac={'unitId':_0x409305,'threadId':_0x525db2},_0x3d3ea0=await this[_0x5b9092(0xa6)][_0x5b9092(0xa3)](_0x5b9092(0xe0)+_0x409305+_0x5b9092(0xe5),{'body':_0x2f8fac}),_0x41a52a=_0x525db2[_0x5b9092(0x9c)](_0x576065=>ee(_0x3d3ea0['body'][_0x5b9092(0xdd)][_0x576065],_0x409305,_0x6e141d))['filter'](Boolean);return Object['values'](_0x3d3ea0['body'][_0x5b9092(0xa4)])[_0x5b9092(0xe3)](_0x253837=>{const _0x2a7363=_0x5b9092;this[_0x2a7363(0xe6)][_0x2a7363(0xdf)](_0x253837);}),_0x41a52a;}['saveCommentToSnapshot'](_0x3362a5){const _0x5c1661=_0x35a9d0;return{'id':_0x3362a5['id'],'threadId':_0x3362a5[_0x5c1661(0xf9)],'ref':_0x3362a5[_0x5c1661(0xbe)]};}};f=Q([_(0x0,_0x45f7ff(_0x4dec66)),_(0x1,_0x45f7ff(_0x29941a)),_(0x2,_0x45f7ff(_0xba6ff4)),_(0x3,_0x45f7ff(_0x1f501e))],f);var re=Object[_0x35a9d0(0xfe)],te=(_0x9ff555,_0x1b0a8c,_0x535ccf,_0x46c744)=>{const _0x524037=_0x35a9d0;for(var _0x4abfc9=_0x46c744>0x1?void 0x0:_0x46c744?re(_0x1b0a8c,_0x535ccf):_0x1b0a8c,_0x4aa95a=_0x9ff555[_0x524037(0xd5)]-0x1,_0x5171c9;_0x4aa95a>=0x0;_0x4aa95a--)(_0x5171c9=_0x9ff555[_0x4aa95a])&&(_0x4abfc9=_0x5171c9(_0x4abfc9)||_0x4abfc9);return _0x4abfc9;},N=(_0xb1c9dd,_0x10dfcb)=>(_0x44d0ab,_0x331e31)=>_0x10dfcb(_0x44d0ab,_0x331e31,_0xb1c9dd);let g=class extends _0xfa304e{constructor(_0x10e142,_0x5ad823){const _0x54cab2=_0x35a9d0;super(),this[_0x54cab2(0xf7)]=_0x10e142,this[_0x54cab2(0xe1)]=_0x5ad823,this[_0x54cab2(0x103)]();}[_0x35a9d0(0x103)](){const _0x3cd94d=_0x35a9d0;this[_0x3cd94d(0xf7)][_0x3cd94d(0xb9)]=this[_0x3cd94d(0xe1)],this[_0x3cd94d(0xf7)][_0x3cd94d(0xc1)]=!0x1;}};g=te([N(0x0,_0x4091ea),N(0x1,_0x45f7ff(f))],g);var se=Object[_0x35a9d0(0xfc)],oe=Object[_0x35a9d0(0xfe)],ne=(_0xe4b31e,_0x3b6f3e,_0xff0711)=>_0x3b6f3e in _0xe4b31e?se(_0xe4b31e,_0x3b6f3e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xff0711}):_0xe4b31e[_0x3b6f3e]=_0xff0711,ie=(_0x8c184a,_0x194765,_0x3f4fc2,_0x520208)=>{for(var _0x2a6198=_0x520208>0x1?void 0x0:_0x520208?oe(_0x194765,_0x3f4fc2):_0x194765,_0x2bdf48=_0x8c184a['length']-0x1,_0xfc2f26;_0x2bdf48>=0x0;_0x2bdf48--)(_0xfc2f26=_0x8c184a[_0x2bdf48])&&(_0x2a6198=_0xfc2f26(_0x2a6198)||_0x2a6198);return _0x2a6198;},w=(_0xebe466,_0x11f6dd)=>(_0x5b5d93,_0xf4f68e)=>_0x11f6dd(_0x5b5d93,_0xf4f68e,_0xebe466),$=(_0x2cc094,_0x1b8180,_0x5b453e)=>ne(_0x2cc094,typeof _0x1b8180!=_0x35a9d0(0xbc)?_0x1b8180+'':_0x1b8180,_0x5b453e);let b=class extends _0x172dee{constructor(_0x3247e3=M,_0x4d2233,_0x15128d){const _0x3a70fc=_0x35a9d0;super(),this[_0x3a70fc(0xb0)]=_0x3247e3,this['_injector']=_0x4d2233,this['_configService']=_0x15128d;const {..._0x1df743}=_0xc29423({},M,this[_0x3a70fc(0xb0)]);this['_configService'][_0x3a70fc(0xa9)](z,_0x1df743);}[_0x35a9d0(0xd4)](){[[f],[g],[S]]['forEach'](_0x173ce9=>{const _0x4c3418=_0x18a9;this[_0x4c3418(0xeb)][_0x4c3418(0xc5)](_0x173ce9);});}[_0x35a9d0(0xac)](){const _0x9bad90=_0x35a9d0;this[_0x9bad90(0xeb)]['get'](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,_0x35a9d0(0xe8),_0xd39200[_0x35a9d0(0xff)]),b=ie([_0x1eb8c7(_0x138b23,_0xbc84fc,_0x42a3ce),w(0x1,_0x45f7ff(_0x1f501e)),w(0x2,_0x24fb91)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5f5545=_0x1831;(function(_0x1eb6dc,_0x5de806){const _0x335203=_0x1831,_0x5086e1=_0x1eb6dc();while(!![]){try{const _0x22987a=-parseInt(_0x335203(0xc3))/0x1*(parseInt(_0x335203(0x91))/0x2)+-parseInt(_0x335203(0xb0))/0x3*(parseInt(_0x335203(0xa5))/0x4)+-parseInt(_0x335203(0xeb))/0x5+-parseInt(_0x335203(0xbd))/0x6+parseInt(_0x335203(0xcb))/0x7+parseInt(_0x335203(0xab))/0x8+parseInt(_0x335203(0xad))/0x9*(parseInt(_0x335203(0xf1))/0xa);if(_0x22987a===_0x5de806)break;else _0x5086e1['push'](_0x5086e1['shift']());}catch(_0x481641){_0x5086e1['push'](_0x5086e1['shift']());}}}(_0x4695,0x4d4f0));import{CommentService as _0x15a9b5,CollaborationSessionService as _0x500a18,UniverCollaborationClientPlugin as _0x2ffb99}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42875c}from'@univerjs-pro/license';import{dayjs as _0x48433f,UserManagerService as _0x25f664,Inject as _0x40680a,Injector as _0x57ef01,Disposable as _0x272377,CustomRangeType as _0x2b2672,UniverInstanceType as _0x408419,DependentOn as _0x2c6962,IConfigService as _0x3260d3,Plugin as _0x43489b,merge as _0x32f219}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3407d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5e5ade,IThreadCommentDataSourceService as _0xf97d9d}from'@univerjs/thread-comment';import{bufferTime as _0x2add9b}from'rxjs';import{HTTPService as _0x470e80}from'@univerjs/network';const W=_0x5f5545(0xae);function _0x1831(_0x481add,_0x451078){const _0x469514=_0x4695();return _0x1831=function(_0x183183,_0x4a9da1){_0x183183=_0x183183-0x8f;let _0xb00138=_0x469514[_0x183183];return _0xb00138;},_0x1831(_0x481add,_0x451078);}var I=(_0x2a67c7=>(_0x2a67c7[_0x2a67c7[_0x5f5545(0x9c)]=0x0]='OpenOrReOpen',_0x2a67c7[_0x2a67c7[_0x5f5545(0x9d)]=0x1]=_0x5f5545(0x9d),_0x2a67c7[_0x2a67c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a67c7))(I||{}),v=(_0x16f714=>(_0x16f714[_0x16f714[_0x5f5545(0xb6)]=0x0]=_0x5f5545(0xb6),_0x16f714[_0x16f714['Add']=0x1]='Add',_0x16f714[_0x16f714['Reply']=0x2]=_0x5f5545(0xd0),_0x16f714[_0x16f714[_0x5f5545(0x92)]=0x3]=_0x5f5545(0x92),_0x16f714[_0x16f714[_0x5f5545(0x94)]=0x4]=_0x5f5545(0x94),_0x16f714[_0x16f714[_0x5f5545(0xde)]=0x5]='Solve',_0x16f714[_0x16f714[_0x5f5545(0x8f)]=-0x1]=_0x5f5545(0x8f),_0x16f714))(v||{});const D=_0xc1d100=>_0x48433f(new Date(+_0xc1d100))[_0x5f5545(0xa6)](_0x5f5545(0xb1)),B=async(_0x2a49cb,_0x53c868)=>{const _0x16b647=_0x5f5545,_0x231d78=_0x2a49cb[_0x16b647(0xc5)](_0x25f664),_0x85d9e5=_0x2a49cb['get'](_0x470e80);_0x53c868[_0x16b647(0xef)](_0x385ef3=>{const _0x52ed65=_0x16b647;_0x231d78[_0x52ed65(0xe9)](_0x385ef3)&&_0x53c868[_0x52ed65(0xb2)](_0x385ef3);}),_0x53c868['size']&&(await _0x85d9e5['get'](_0x16b647(0xe6),{'params':{'userIDs':[..._0x53c868]}}))[_0x16b647(0xb3)]['users'][_0x16b647(0xef)](_0x1e90fd=>{const _0x19075c=_0x16b647;_0x1e90fd&&_0x231d78[_0x19075c(0xd9)](_0x1e90fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2c349b,_0x5887a2,_0x4fdd97,_0x2988da)=>{for(var _0x237d11=_0x2988da>0x1?void 0x0:_0x2988da?K(_0x5887a2,_0x4fdd97):_0x5887a2,_0x512315=_0x2c349b['length']-0x1,_0x44b818;_0x512315>=0x0;_0x512315--)(_0x44b818=_0x2c349b[_0x512315])&&(_0x237d11=_0x44b818(_0x237d11)||_0x237d11);return _0x237d11;},p=(_0x151ad7,_0xc5ce70)=>(_0x2a1fec,_0x1ee09f)=>_0xc5ce70(_0x2a1fec,_0x1ee09f,_0x151ad7);let S=class extends _0x272377{constructor(_0x69d3d5,_0x1884d3,_0x3b4d93,_0x4c6a7b){const _0x14e4b9=_0x5f5545;super(),this[_0x14e4b9(0xdb)]=_0x69d3d5,this['_threadCommentModel']=_0x1884d3,this[_0x14e4b9(0xe3)]=_0x3b4d93,this['_injector']=_0x4c6a7b,this[_0x14e4b9(0xbc)](),this[_0x14e4b9(0x96)]();}[_0x5f5545(0x96)](){const _0x516eed=_0x5f5545;this[_0x516eed(0xbb)](this['_threadCommentModel']['commentUpdate$'][_0x516eed(0xa4)](_0x2add9b(0x10))['subscribe'](_0x1d57ab=>{const _0x56d4e1=_0x516eed,_0x1d3825=new Set();_0x1d57ab[_0x56d4e1(0xef)](_0x238a85=>{const _0x17231d=_0x56d4e1;switch(_0x238a85[_0x17231d(0xa0)]){case _0x17231d(0xa8):{const _0x5dfb2b=_0x238a85[_0x17231d(0xb9)][_0x17231d(0xe7)];_0x1d3825[_0x17231d(0xa8)](_0x5dfb2b);break;}}}),B(this['_injector'],_0x1d3825);}));}[_0x5f5545(0xbc)](){const _0x569450=_0x5f5545;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x569450(0xb8)](async _0x3528fc=>{const _0xde0344=_0x569450;var _0x1b8409,_0x4e1602,_0x16706b,_0x3b6e32;const _0x2389f0=(_0x1b8409=this['_threadCommentModel']['getUnit'](_0x3528fc[_0xde0344(0xd1)])[_0xde0344(0xa7)](_0xd1a1bb=>_0xd1a1bb['threadId']===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x1b8409[_0xde0344(0x9b)];if(!_0x2389f0)return;const {unitId:_0x2b8a39,subUnitId:_0x3700b5}=_0x2389f0;switch(_0x3528fc[_0xde0344(0xdd)]&&this[_0xde0344(0xe3)][_0xde0344(0xd9)](_0x3528fc[_0xde0344(0xdd)]),_0x3528fc['type']){case v['Add']:break;case v['Reply']:{this[_0xde0344(0xdf)][_0xde0344(0xd6)](_0x2b8a39,_0x3700b5,{'unitId':_0x2b8a39,'subUnitId':_0x3700b5,'ref':'','id':_0x3528fc['replyId'],'dT':D(+_0x3528fc[_0xde0344(0xd4)]),'threadId':_0x3528fc['threadId'],'personId':(_0x16706b=(_0x4e1602=_0x3528fc[_0xde0344(0xdd)])==null?void 0x0:_0x4e1602['userID'])!=null?_0x16706b:_0x3528fc[_0xde0344(0xc8)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)]),'parentId':_0x2389f0['id']});break;}case v[_0xde0344(0x94)]:{const _0x3263d4=this[_0xde0344(0xdf)][_0xde0344(0xd8)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);_0x3263d4&&_0x3263d4['parentId']&&this[_0xde0344(0xdf)][_0xde0344(0x97)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);break;}case v[_0xde0344(0x92)]:{this['_threadCommentModel'][_0xde0344(0xcd)](_0x2b8a39,_0x3700b5,{'commentId':_0x3528fc[_0xde0344(0xac)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)])});break;}case v[_0xde0344(0xde)]:{const _0x2f3532=(_0x3b6e32=this[_0xde0344(0xdf)]['getUnit'](_0x3528fc['unitId'])[_0xde0344(0xa7)](_0x5d27b2=>_0x5d27b2[_0xde0344(0xba)]===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x3b6e32[_0xde0344(0x9b)];_0x2f3532&&this[_0xde0344(0xdf)]['resolveComment'](_0x2b8a39,_0x3700b5,_0x2f3532['id'],_0x3528fc['solved']===I[_0xde0344(0x9d)]);break;}}}));}};S=V([p(0x0,_0x40680a(_0x15a9b5)),p(0x1,_0x40680a(_0x5e5ade)),p(0x2,_0x40680a(_0x25f664)),p(0x3,_0x40680a(_0x57ef01))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5f5545(0xc1)],Q=(_0x34d57d,_0x36d811,_0x4fdc03,_0x241a19)=>{for(var _0x17ce6a=_0x241a19>0x1?void 0x0:_0x241a19?k(_0x36d811,_0x4fdc03):_0x36d811,_0x3a7411=_0x34d57d['length']-0x1,_0x181bfe;_0x3a7411>=0x0;_0x3a7411--)(_0x181bfe=_0x34d57d[_0x3a7411])&&(_0x17ce6a=_0x181bfe(_0x17ce6a)||_0x17ce6a);return _0x17ce6a;},_=(_0x55136f,_0x1a4648)=>(_0x194e55,_0x33710f)=>_0x1a4648(_0x194e55,_0x33710f,_0x55136f);function X(_0x3956ba,_0x8b482d){const _0x54c237=_0x5f5545,_0x5df23e=_0x3956ba[_0x54c237(0xc6)][0x0];return{..._0x8b482d,'id':_0x5df23e[_0x54c237(0xac)],'resolved':_0x3956ba[_0x54c237(0xb4)]===0x1,'dT':D(_0x5df23e[_0x54c237(0xd4)]),'personId':_0x5df23e[_0x54c237(0xc8)],'threadId':_0x5df23e[_0x54c237(0xba)]};}function ee(_0x369cf,_0x4b7f75,_0x6cea36){const _0x345c25=_0x5f5545;var _0x371ae6,_0x3c41ee;if(((_0x3c41ee=(_0x371ae6=_0x369cf==null?void 0x0:_0x369cf[_0x345c25(0xc6)])==null?void 0x0:_0x371ae6[_0x345c25(0x9f)])!=null?_0x3c41ee:0x0)>0x0){const _0x2d070e=(_0x8a14db,_0x16d296)=>({'id':_0x8a14db[_0x345c25(0xac)],'threadId':_0x8a14db['threadId'],'dT':D(_0x8a14db[_0x345c25(0xd4)]),'personId':_0x8a14db[_0x345c25(0xc8)],'resolved':_0x369cf[_0x345c25(0xb4)]===I[_0x345c25(0x9d)],'unitId':_0x4b7f75,'subUnitId':_0x6cea36,'text':JSON[_0x345c25(0x93)](_0x8a14db[_0x345c25(0xaa)]),'parentId':_0x16d296}),_0x2e7fc1=_0x2d070e(_0x369cf[_0x345c25(0xc6)][0x0]);return{..._0x2e7fc1,'children':_0x369cf[_0x345c25(0xc6)][_0x345c25(0xe4)](0x1)[_0x345c25(0xce)](_0x11a7c8=>_0x2d070e(_0x11a7c8,_0x2e7fc1['id']))};}return null;}let f=class{constructor(_0x4f6ac7,_0x5b5df2,_0x337650,_0x47dbad){const _0x55f29d=_0x5f5545;this[_0x55f29d(0x98)]=_0x4f6ac7,this[_0x55f29d(0xe3)]=_0x5b5df2,this[_0x55f29d(0xf0)]=_0x337650,this[_0x55f29d(0xe1)]=_0x47dbad;}async[_0x5f5545(0xd6)](_0x2c6d25){const _0x5a447d=_0x5f5545;var _0x26db16,_0xf3a1cf;const {parentId:_0x41dbd0,unitId:_0x3788a5,text:_0x2093c5,threadId:_0x13707a}=_0x2c6d25,_0x456d67=(_0xf3a1cf=(_0x26db16=_0x2093c5[_0x5a447d(0xa9)])==null?void 0x0:_0x26db16[_0x5a447d(0xc7)](_0x32fa4d=>_0x32fa4d[_0x5a447d(0xe0)]===_0x2b2672['COMMENT'])[_0x5a447d(0xce)](_0x7f2307=>_0x7f2307[_0x5a447d(0xcf)]))!=null?_0xf3a1cf:[],_0x394ffb=JSON[_0x5a447d(0xf2)](_0x2093c5),_0x55e8f6=(await this[_0x5a447d(0xf0)][_0x5a447d(0xb5)](_0x3788a5))[_0x5a447d(0xc0)]();if(_0x41dbd0){const _0x19970a={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67,'threadId':_0x13707a},_0x18c3ff=(await this[_0x5a447d(0x98)]['post'](_0x5a447d(0xec)+_0x3788a5+'/reply',{'body':_0x19970a}))[_0x5a447d(0xb3)][_0x5a447d(0x90)];return{..._0x2c6d25,'id':_0x18c3ff[_0x5a447d(0xac)],'dT':_0x48433f(+_0x18c3ff[_0x5a447d(0xd4)])[_0x5a447d(0xa6)](_0x5a447d(0xb1)),'personId':_0x18c3ff['userId']};}else{const _0x2d6d65={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67},_0x100e62=await this[_0x5a447d(0x98)]['post']('/universer-api/comment/unit/'+_0x3788a5+_0x5a447d(0xd5),{'body':_0x2d6d65});return X(_0x100e62[_0x5a447d(0xb3)][_0x5a447d(0xd3)],_0x2c6d25);}}async[_0x5f5545(0xcd)](_0x4ae5b4){const _0x372399=_0x5f5545;var _0x595a1b,_0x28b748;const {text:_0x4e05b3,unitId:_0x469f2c}=_0x4ae5b4,_0x3b5016=(_0x28b748=(_0x595a1b=_0x4e05b3[_0x372399(0xa9)])==null?void 0x0:_0x595a1b[_0x372399(0xc7)](_0x33a85a=>_0x33a85a[_0x372399(0xe0)]===_0x2b2672[_0x372399(0xa1)])[_0x372399(0xce)](_0x1186ee=>_0x1186ee[_0x372399(0xcf)]))!=null?_0x28b748:[],_0x5b9f30=JSON['stringify'](_0x4e05b3),_0x59e1c4=_0x4ae5b4[_0x372399(0xba)],_0xc72f0d=_0x4ae5b4['id'],_0x55d1d0={'memberId':(await this[_0x372399(0xf0)]['requireSession'](_0x469f2c))[_0x372399(0xc0)](),'unitId':_0x469f2c,'threadId':_0x59e1c4,'mention':_0x3b5016,'content':_0x5b9f30,'replyId':_0xc72f0d},_0x2dd45f=await this['_httpService'][_0x372399(0xd2)](_0x372399(0xec)+_0x469f2c+'/edit',{'body':_0x55d1d0});return!_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)]||_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)][_0x372399(0xb7)]===0x1;}async[_0x5f5545(0xdc)](_0x425b99){const _0x363dc4=_0x5f5545,{unitId:_0x47f27f}=_0x425b99,_0x5862e7=_0x425b99[_0x363dc4(0xba)],_0x323139={'memberId':this[_0x363dc4(0xe3)][_0x363dc4(0xee)]()['userID'],'unitId':_0x47f27f,'threadId':_0x5862e7,'solved':_0x425b99[_0x363dc4(0x95)]?I[_0x363dc4(0x9d)]:I[_0x363dc4(0x9c)]},_0x2b33e5=await this[_0x363dc4(0x98)][_0x363dc4(0xd2)](_0x363dc4(0xec)+_0x47f27f+_0x363dc4(0xbe),{'body':_0x323139});return!_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]||_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]['code']===0x1;}async[_0x5f5545(0x97)](_0x5883ba,_0x54c3bd,_0x22f0d3,_0x569f0d){const _0x48f910=_0x5f5545,_0x34b05a={'memberId':(await this['_sessionService']['requireSession'](_0x5883ba))[_0x48f910(0xc0)](),'threadId':_0x22f0d3,'replyId':_0x569f0d,'unitId':_0x5883ba},_0x591e34=await this[_0x48f910(0x98)][_0x48f910(0xd2)]('/universer-api/comment/unit/'+_0x5883ba+_0x48f910(0xe2),{'body':_0x34b05a});return!_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)]||_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)][_0x48f910(0xb7)]===0x1;}async['listComments'](_0x33333f,_0x545a05,_0x35d1f1){const _0x52d7e1=_0x5f5545,_0x39a092={'unitId':_0x33333f,'threadId':_0x35d1f1},_0x2d3a40=await this['_httpService'][_0x52d7e1(0xd2)](_0x52d7e1(0xec)+_0x33333f+_0x52d7e1(0xda),{'body':_0x39a092}),_0x239596=_0x35d1f1[_0x52d7e1(0xce)](_0x1920a0=>ee(_0x2d3a40['body']['comments'][_0x1920a0],_0x33333f,_0x545a05))[_0x52d7e1(0xc7)](Boolean);return Object[_0x52d7e1(0x99)](_0x2d3a40[_0x52d7e1(0xb3)][_0x52d7e1(0xc9)])[_0x52d7e1(0xef)](_0x2d69ff=>{const _0x2cc1ce=_0x52d7e1;this['_userService'][_0x2cc1ce(0xd9)](_0x2d69ff);}),_0x239596;}[_0x5f5545(0xca)](_0x2cdc3a){const _0x55e12a=_0x5f5545;return{'id':_0x2cdc3a['id'],'threadId':_0x2cdc3a['threadId'],'ref':_0x2cdc3a[_0x55e12a(0xa3)]};}};f=Q([_(0x0,_0x40680a(_0x470e80)),_(0x1,_0x40680a(_0x25f664)),_(0x2,_0x40680a(_0x500a18)),_(0x3,_0x40680a(_0x57ef01))],f);var re=Object[_0x5f5545(0xc1)],te=(_0x3cc6a9,_0x5bd1c1,_0xe8b522,_0x419de4)=>{const _0x2eee61=_0x5f5545;for(var _0x587ff7=_0x419de4>0x1?void 0x0:_0x419de4?re(_0x5bd1c1,_0xe8b522):_0x5bd1c1,_0x3128aa=_0x3cc6a9[_0x2eee61(0x9f)]-0x1,_0x3f195e;_0x3128aa>=0x0;_0x3128aa--)(_0x3f195e=_0x3cc6a9[_0x3128aa])&&(_0x587ff7=_0x3f195e(_0x587ff7)||_0x587ff7);return _0x587ff7;},N=(_0x27b4ca,_0x17e376)=>(_0x1d33e2,_0x2a1fe7)=>_0x17e376(_0x1d33e2,_0x2a1fe7,_0x27b4ca);let g=class extends _0x272377{constructor(_0xc98618,_0x24a201){const _0x55ea7f=_0x5f5545;super(),this[_0x55ea7f(0xc4)]=_0xc98618,this['_threadCommentDataSource']=_0x24a201,this[_0x55ea7f(0xe8)]();}[_0x5f5545(0xe8)](){const _0x4a5051=_0x5f5545;this[_0x4a5051(0xc4)][_0x4a5051(0xed)]=this[_0x4a5051(0xe5)],this['_threadCommentDataSourceService'][_0x4a5051(0x9a)]=!0x1;}};g=te([N(0x0,_0xf97d9d),N(0x1,_0x40680a(f))],g);var se=Object[_0x5f5545(0xcc)],oe=Object[_0x5f5545(0xc1)],ne=(_0x36d24d,_0x17dc88,_0x225aba)=>_0x17dc88 in _0x36d24d?se(_0x36d24d,_0x17dc88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x225aba}):_0x36d24d[_0x17dc88]=_0x225aba,ie=(_0x42ca3a,_0x15b84c,_0x3473d2,_0x16a8ae)=>{const _0x27f953=_0x5f5545;for(var _0x4aff39=_0x16a8ae>0x1?void 0x0:_0x16a8ae?oe(_0x15b84c,_0x3473d2):_0x15b84c,_0x4be5d5=_0x42ca3a[_0x27f953(0x9f)]-0x1,_0x2c9e73;_0x4be5d5>=0x0;_0x4be5d5--)(_0x2c9e73=_0x42ca3a[_0x4be5d5])&&(_0x4aff39=_0x2c9e73(_0x4aff39)||_0x4aff39);return _0x4aff39;},w=(_0x5a96ae,_0x191494)=>(_0x3bf13d,_0x5b50aa)=>_0x191494(_0x3bf13d,_0x5b50aa,_0x5a96ae),$=(_0x7b1bc6,_0x3a5f6b,_0x1445ae)=>ne(_0x7b1bc6,typeof _0x3a5f6b!=_0x5f5545(0xea)?_0x3a5f6b+'':_0x3a5f6b,_0x1445ae);let b=class extends _0x43489b{constructor(_0x7cb831=M,_0x427f97,_0x3ff48d){const _0x6107da=_0x5f5545;super(),this[_0x6107da(0xa2)]=_0x7cb831,this[_0x6107da(0xe1)]=_0x427f97,this['_configService']=_0x3ff48d;const {..._0x257046}=_0x32f219({},M,this[_0x6107da(0xa2)]);this[_0x6107da(0xbf)][_0x6107da(0xc2)](z,_0x257046);}[_0x5f5545(0xaf)](){[[f],[g],[S]]['forEach'](_0x20913b=>{this['_injector']['add'](_0x20913b);});}[_0x5f5545(0x9e)](){const _0x31ad69=_0x5f5545;this[_0x31ad69(0xe1)][_0x31ad69(0xc5)](g),this['_injector'][_0x31ad69(0xc5)](S);}};$(b,'pluginName',W),$(b,_0x5f5545(0xa0),_0x408419['UNIVER_UNKNOWN']),b=ie([_0x2c6962(_0x3407d6,_0x2ffb99,_0x42875c),w(0x1,_0x40680a(_0x57ef01)),w(0x2,_0x3260d3)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4695(){const _0x1cf8df=['dataSource','getCurrentUser','forEach','_sessionService','12130dWJNmV','stringify','UNRECOGNIZED','reply','458xeYoVm','Edit','parse','Delete','resolved','_initUserSync','deleteComment','_httpService','values','syncUpdateMutationToColla','root','OpenOrReOpen','Solved','onReady','length','type','COMMENT','_config','ref','pipe','1842664ykFBRW','format','find','add','customRanges','content','3166856DkSZqX','replyId','9423QbISLI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','3zevDcf','YYYY/MM/DD\x20HH:mm','delete','body','solved','requireSession','Unknown','code','subscribe','payload','threadId','disposeWithMe','_init','3397572YxxFUV','/solved','_configService','getMemberID','getOwnPropertyDescriptor','setConfig','379TrZnsL','_threadCommentDataSourceService','get','replies','filter','userId','users','saveCommentToSnapshot','2307676gmLsKV','defineProperty','updateComment','map','rangeId','Reply','unitId','post','comment','createTimestamp','/add','addComment','error','getComment','addUser','/list','_commentService','resolveComment','user','Solve','_threadCommentModel','rangeType','_injector','/delete','_userService','slice','_threadCommentDataSource','/universer-api/user/list','personId','_initDataSource','getUser','symbol','2825805beJAlX','/universer-api/comment/unit/'];_0x4695=function(){return _0x1cf8df;};return _0x4695();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x35a9d0=_0x18a9;(function(_0x2f9fc7,_0x32c3b2){const _0x2b02fe=_0x18a9,_0x1eb092=_0x2f9fc7();while(!![]){try{const _0x1949b4=parseInt(_0x2b02fe(0xd9))/0x1+-parseInt(_0x2b02fe(0xea))/0x2*(parseInt(_0x2b02fe(0xba))/0x3)+parseInt(_0x2b02fe(0xdc))/0x4*(-parseInt(_0x2b02fe(0xc0))/0x5)+parseInt(_0x2b02fe(0xe7))/0x6*(-parseInt(_0x2b02fe(0xfb))/0x7)+parseInt(_0x2b02fe(0x9d))/0x8*(parseInt(_0x2b02fe(0xb7))/0x9)+parseInt(_0x2b02fe(0xd8))/0xa+-parseInt(_0x2b02fe(0xa2))/0xb*(-parseInt(_0x2b02fe(0xdb))/0xc);if(_0x1949b4===_0x32c3b2)break;else _0x1eb092['push'](_0x1eb092['shift']());}catch(_0x1bc0f2){_0x1eb092['push'](_0x1eb092['shift']());}}}(_0x13f7,0x866e3));function _0x13f7(){const _0x519ac7=['get','forEach','filter','/list','_userService','2514OgnqyL','type','find','8gNAnOJ','_injector','slice','listComments','/universer-api/user/list','parse','unitId','/delete','replies','Solved','Edit','replyId','UNRECOGNIZED','_threadCommentDataSourceService','rangeType','threadId','Solve','6398VbQrpr','defineProperty','requireSession','getOwnPropertyDescriptor','UNIVER_UNKNOWN','COMMENT','pipe','_sessionService','_initDataSource','updateComment','personId','getCurrentUser','userId','map','8KgoOcv','_init','getComment','user','solved','451oDFEnG','post','users','OpenOrReOpen','_httpService','delete','_initUserSync','setConfig','thread-comment-data-source.config','createTimestamp','onReady','Add','customRanges','payload','_config','root','Reply','getUnit','YYYY/MM/DD\x20HH:mm','_threadCommentModel','size','5901309rlIYvy','comment','dataSource','279771ZRKZIV','resolved','symbol','content','ref','_commentService','9345LHCzOU','syncUpdateMutationToColla','/add','userID','/reply','add','deleteComment','rangeId','getUser','code','format','subscribe','Delete','commentUpdate$','parentId','getMemberID','error','resolveComment','Unknown','body','onStarting','length','disposeWithMe','stringify','4783050ehZnzV','199311FYOhuF','/edit','2580PZKMOo','76swLjZn','comments','/solved','addUser','/universer-api/comment/unit/','_threadCommentDataSource'];_0x13f7=function(){return _0x519ac7;};return _0x13f7();}import{CommentService as _0x278907,CollaborationSessionService as _0xba6ff4,UniverCollaborationClientPlugin as _0xbc84fc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42a3ce}from'@univerjs-pro/license';import{dayjs as _0x4b3fc3,UserManagerService as _0x29941a,Inject as _0x45f7ff,Injector as _0x1f501e,Disposable as _0xfa304e,CustomRangeType as _0x66cff7,UniverInstanceType as _0xd39200,DependentOn as _0x1eb8c7,IConfigService as _0x24fb91,Plugin as _0x172dee,merge as _0xc29423}from'@univerjs/core';function _0x18a9(_0x4bfd9d,_0x519b1a){const _0x13f7e6=_0x13f7();return _0x18a9=function(_0x18a9da,_0xe24b01){_0x18a9da=_0x18a9da-0x9a;let _0x441a72=_0x13f7e6[_0x18a9da];return _0x441a72;},_0x18a9(_0x4bfd9d,_0x519b1a);}import{UniverThreadCommentUIPlugin as _0x138b23}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e14ce,IThreadCommentDataSourceService as _0x4091ea}from'@univerjs/thread-comment';import{bufferTime as _0x52d5ed}from'rxjs';import{HTTPService as _0x4dec66}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x46ee3a=>(_0x46ee3a[_0x46ee3a[_0x35a9d0(0xa5)]=0x0]='OpenOrReOpen',_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf3)]=0x1]=_0x35a9d0(0xf3),_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf6)]=-0x1]=_0x35a9d0(0xf6),_0x46ee3a))(I||{}),v=(_0x26e7d3=>(_0x26e7d3[_0x26e7d3[_0x35a9d0(0xd2)]=0x0]='Unknown',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xad)]=0x1]='Add',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xb2)]=0x2]=_0x35a9d0(0xb2),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf4)]=0x3]=_0x35a9d0(0xf4),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xcc)]=0x4]=_0x35a9d0(0xcc),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xfa)]=0x5]=_0x35a9d0(0xfa),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf6)]=-0x1]='UNRECOGNIZED',_0x26e7d3))(v||{});const D=_0x3644b5=>_0x4b3fc3(new Date(+_0x3644b5))[_0x35a9d0(0xca)](_0x35a9d0(0xb4)),B=async(_0x409953,_0x98eca7)=>{const _0x51eefa=_0x35a9d0,_0x2bb218=_0x409953[_0x51eefa(0xe2)](_0x29941a),_0x17377e=_0x409953[_0x51eefa(0xe2)](_0x4dec66);_0x98eca7['forEach'](_0x74117d=>{const _0x2db544=_0x51eefa;_0x2bb218[_0x2db544(0xc8)](_0x74117d)&&_0x98eca7[_0x2db544(0xa7)](_0x74117d);}),_0x98eca7[_0x51eefa(0xb6)]&&(await _0x17377e['get'](_0x51eefa(0xee),{'params':{'userIDs':[..._0x98eca7]}}))[_0x51eefa(0xd3)][_0x51eefa(0xa4)][_0x51eefa(0xe3)](_0x49d7c6=>{_0x49d7c6&&_0x2bb218['addUser'](_0x49d7c6);});};var K=Object[_0x35a9d0(0xfe)],V=(_0xe9e955,_0xc8ece8,_0x20a144,_0x4cef4e)=>{const _0x5cff45=_0x35a9d0;for(var _0x327e9e=_0x4cef4e>0x1?void 0x0:_0x4cef4e?K(_0xc8ece8,_0x20a144):_0xc8ece8,_0x283a3a=_0xe9e955[_0x5cff45(0xd5)]-0x1,_0x19cbe4;_0x283a3a>=0x0;_0x283a3a--)(_0x19cbe4=_0xe9e955[_0x283a3a])&&(_0x327e9e=_0x19cbe4(_0x327e9e)||_0x327e9e);return _0x327e9e;},p=(_0x282c8a,_0x36cfc5)=>(_0xe346f,_0x30445b)=>_0x36cfc5(_0xe346f,_0x30445b,_0x282c8a);let S=class extends _0xfa304e{constructor(_0x2d1366,_0x4dbebf,_0x1191ec,_0x2d7e97){const _0x2acdd5=_0x35a9d0;super(),this[_0x2acdd5(0xbf)]=_0x2d1366,this[_0x2acdd5(0xb5)]=_0x4dbebf,this['_userService']=_0x1191ec,this[_0x2acdd5(0xeb)]=_0x2d7e97,this[_0x2acdd5(0x9e)](),this[_0x2acdd5(0xa8)]();}['_initUserSync'](){const _0x1bd377=_0x35a9d0;this['disposeWithMe'](this[_0x1bd377(0xb5)][_0x1bd377(0xcd)][_0x1bd377(0x101)](_0x52d5ed(0x10))[_0x1bd377(0xcb)](_0xb4fe58=>{const _0x2b1384=_0x1bd377,_0x2bab93=new Set();_0xb4fe58[_0x2b1384(0xe3)](_0x5b3988=>{const _0x8a37c=_0x2b1384;switch(_0x5b3988[_0x8a37c(0xe8)]){case'add':{const _0x587eda=_0x5b3988[_0x8a37c(0xaf)][_0x8a37c(0x105)];_0x2bab93[_0x8a37c(0xc5)](_0x587eda);break;}}}),B(this[_0x2b1384(0xeb)],_0x2bab93);}));}[_0x35a9d0(0x9e)](){const _0x10f902=_0x35a9d0;this[_0x10f902(0xd6)](this[_0x10f902(0xbf)][_0x10f902(0xcd)][_0x10f902(0xcb)](async _0x1ceff0=>{const _0x223a70=_0x10f902;var _0x3265f3,_0x87c3ae,_0x534274,_0x18eed5;const _0x135f64=(_0x3265f3=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])['find'](_0x396d00=>_0x396d00[_0x223a70(0xf9)]===_0x1ceff0['threadId']))==null?void 0x0:_0x3265f3[_0x223a70(0xb1)];if(!_0x135f64)return;const {unitId:_0x241110,subUnitId:_0x4309e4}=_0x135f64;switch(_0x1ceff0[_0x223a70(0xa0)]&&this[_0x223a70(0xe6)][_0x223a70(0xdf)](_0x1ceff0[_0x223a70(0xa0)]),_0x1ceff0['type']){case v[_0x223a70(0xad)]:break;case v[_0x223a70(0xb2)]:{this[_0x223a70(0xb5)]['addComment'](_0x241110,_0x4309e4,{'unitId':_0x241110,'subUnitId':_0x4309e4,'ref':'','id':_0x1ceff0['replyId'],'dT':D(+_0x1ceff0['createTimestamp']),'threadId':_0x1ceff0['threadId'],'personId':(_0x534274=(_0x87c3ae=_0x1ceff0[_0x223a70(0xa0)])==null?void 0x0:_0x87c3ae[_0x223a70(0xc3)])!=null?_0x534274:_0x1ceff0[_0x223a70(0x9b)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)]),'parentId':_0x135f64['id']});break;}case v[_0x223a70(0xcc)]:{const _0x36bea3=this[_0x223a70(0xb5)][_0x223a70(0x9f)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);_0x36bea3&&_0x36bea3[_0x223a70(0xce)]&&this['_threadCommentModel'][_0x223a70(0xc6)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);break;}case v[_0x223a70(0xf4)]:{this[_0x223a70(0xb5)][_0x223a70(0x104)](_0x241110,_0x4309e4,{'commentId':_0x1ceff0[_0x223a70(0xf5)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)])});break;}case v[_0x223a70(0xfa)]:{const _0x181e4f=(_0x18eed5=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])[_0x223a70(0xe9)](_0x2ef9a2=>_0x2ef9a2['threadId']===_0x1ceff0[_0x223a70(0xf9)]))==null?void 0x0:_0x18eed5[_0x223a70(0xb1)];_0x181e4f&&this[_0x223a70(0xb5)][_0x223a70(0xd1)](_0x241110,_0x4309e4,_0x181e4f['id'],_0x1ceff0[_0x223a70(0xa1)]===I[_0x223a70(0xf3)]);break;}}}));}};S=V([p(0x0,_0x45f7ff(_0x278907)),p(0x1,_0x45f7ff(_0x2e14ce)),p(0x2,_0x45f7ff(_0x29941a)),p(0x3,_0x45f7ff(_0x1f501e))],S);const z=_0x35a9d0(0xaa),M={};var k=Object[_0x35a9d0(0xfe)],Q=(_0x100267,_0x1a54c6,_0x451415,_0x4b3058)=>{const _0x2691d2=_0x35a9d0;for(var _0x266e1f=_0x4b3058>0x1?void 0x0:_0x4b3058?k(_0x1a54c6,_0x451415):_0x1a54c6,_0x22c34d=_0x100267[_0x2691d2(0xd5)]-0x1,_0x359789;_0x22c34d>=0x0;_0x22c34d--)(_0x359789=_0x100267[_0x22c34d])&&(_0x266e1f=_0x359789(_0x266e1f)||_0x266e1f);return _0x266e1f;},_=(_0x3678f8,_0x142bd0)=>(_0x9641dc,_0xc8b486)=>_0x142bd0(_0x9641dc,_0xc8b486,_0x3678f8);function X(_0x61d84c,_0x193f6c){const _0x2e0147=_0x35a9d0,_0x12db8e=_0x61d84c[_0x2e0147(0xf2)][0x0];return{..._0x193f6c,'id':_0x12db8e[_0x2e0147(0xf5)],'resolved':_0x61d84c['solved']===0x1,'dT':D(_0x12db8e[_0x2e0147(0xab)]),'personId':_0x12db8e[_0x2e0147(0x9b)],'threadId':_0x12db8e['threadId']};}function ee(_0x30343b,_0x582cb9,_0x459565){const _0x4f53c0=_0x35a9d0;var _0x14a79e,_0x2fb51d;if(((_0x2fb51d=(_0x14a79e=_0x30343b==null?void 0x0:_0x30343b[_0x4f53c0(0xf2)])==null?void 0x0:_0x14a79e[_0x4f53c0(0xd5)])!=null?_0x2fb51d:0x0)>0x0){const _0x520285=(_0x4870f7,_0x33a204)=>({'id':_0x4870f7[_0x4f53c0(0xf5)],'threadId':_0x4870f7[_0x4f53c0(0xf9)],'dT':D(_0x4870f7[_0x4f53c0(0xab)]),'personId':_0x4870f7[_0x4f53c0(0x9b)],'resolved':_0x30343b[_0x4f53c0(0xa1)]===I[_0x4f53c0(0xf3)],'unitId':_0x582cb9,'subUnitId':_0x459565,'text':JSON[_0x4f53c0(0xef)](_0x4870f7[_0x4f53c0(0xbd)]),'parentId':_0x33a204}),_0x13a7c6=_0x520285(_0x30343b[_0x4f53c0(0xf2)][0x0]);return{..._0x13a7c6,'children':_0x30343b[_0x4f53c0(0xf2)][_0x4f53c0(0xec)](0x1)[_0x4f53c0(0x9c)](_0x58ddfb=>_0x520285(_0x58ddfb,_0x13a7c6['id']))};}return null;}let f=class{constructor(_0x2aadba,_0x279a18,_0xaea661,_0x31844e){const _0x5a89e3=_0x35a9d0;this[_0x5a89e3(0xa6)]=_0x2aadba,this[_0x5a89e3(0xe6)]=_0x279a18,this['_sessionService']=_0xaea661,this['_injector']=_0x31844e;}async['addComment'](_0x278065){const _0x16202c=_0x35a9d0;var _0x19f3da,_0x22488a;const {parentId:_0x77de2e,unitId:_0xad987d,text:_0x4aa0cd,threadId:_0x1ff31a}=_0x278065,_0x1bb8db=(_0x22488a=(_0x19f3da=_0x4aa0cd['customRanges'])==null?void 0x0:_0x19f3da['filter'](_0x5043b0=>_0x5043b0[_0x16202c(0xf8)]===_0x66cff7[_0x16202c(0x100)])[_0x16202c(0x9c)](_0x51df0e=>_0x51df0e[_0x16202c(0xc7)]))!=null?_0x22488a:[],_0x333b90=JSON[_0x16202c(0xd7)](_0x4aa0cd),_0x16c654=(await this[_0x16202c(0x102)][_0x16202c(0xfd)](_0xad987d))['getMemberID']();if(_0x77de2e){const _0x42ddcc={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db,'threadId':_0x1ff31a},_0x38084f=(await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc4),{'body':_0x42ddcc}))[_0x16202c(0xd3)]['reply'];return{..._0x278065,'id':_0x38084f[_0x16202c(0xf5)],'dT':_0x4b3fc3(+_0x38084f[_0x16202c(0xab)])['format'](_0x16202c(0xb4)),'personId':_0x38084f[_0x16202c(0x9b)]};}else{const _0x3f697d={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db},_0x3dab70=await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc2),{'body':_0x3f697d});return X(_0x3dab70['body'][_0x16202c(0xb8)],_0x278065);}}async[_0x35a9d0(0x104)](_0x506571){const _0x26839b=_0x35a9d0;var _0x4ddc13,_0x24b61d;const {text:_0x30aafa,unitId:_0x5e378e}=_0x506571,_0x41914c=(_0x24b61d=(_0x4ddc13=_0x30aafa[_0x26839b(0xae)])==null?void 0x0:_0x4ddc13[_0x26839b(0xe4)](_0x24fde8=>_0x24fde8[_0x26839b(0xf8)]===_0x66cff7[_0x26839b(0x100)])[_0x26839b(0x9c)](_0x599f89=>_0x599f89[_0x26839b(0xc7)]))!=null?_0x24b61d:[],_0x158e53=JSON[_0x26839b(0xd7)](_0x30aafa),_0x176521=_0x506571[_0x26839b(0xf9)],_0x508453=_0x506571['id'],_0x15f989={'memberId':(await this[_0x26839b(0x102)][_0x26839b(0xfd)](_0x5e378e))[_0x26839b(0xcf)](),'unitId':_0x5e378e,'threadId':_0x176521,'mention':_0x41914c,'content':_0x158e53,'replyId':_0x508453},_0x29aaad=await this[_0x26839b(0xa6)]['post']('/universer-api/comment/unit/'+_0x5e378e+_0x26839b(0xda),{'body':_0x15f989});return!_0x29aaad['body'][_0x26839b(0xd0)]||_0x29aaad[_0x26839b(0xd3)][_0x26839b(0xd0)]['code']===0x1;}async[_0x35a9d0(0xd1)](_0x1d05b1){const _0x2b71d7=_0x35a9d0,{unitId:_0x19bea6}=_0x1d05b1,_0x32bb81=_0x1d05b1['threadId'],_0x16cac8={'memberId':this[_0x2b71d7(0xe6)][_0x2b71d7(0x9a)]()[_0x2b71d7(0xc3)],'unitId':_0x19bea6,'threadId':_0x32bb81,'solved':_0x1d05b1[_0x2b71d7(0xbb)]?I[_0x2b71d7(0xf3)]:I[_0x2b71d7(0xa5)]},_0xd4a211=await this['_httpService'][_0x2b71d7(0xa3)](_0x2b71d7(0xe0)+_0x19bea6+_0x2b71d7(0xde),{'body':_0x16cac8});return!_0xd4a211[_0x2b71d7(0xd3)][_0x2b71d7(0xd0)]||_0xd4a211['body'][_0x2b71d7(0xd0)][_0x2b71d7(0xc9)]===0x1;}async['deleteComment'](_0x5e59e3,_0x10afcb,_0xdd6edc,_0x2a7881){const _0x480fdc=_0x35a9d0,_0x2aa2c5={'memberId':(await this[_0x480fdc(0x102)]['requireSession'](_0x5e59e3))[_0x480fdc(0xcf)](),'threadId':_0xdd6edc,'replyId':_0x2a7881,'unitId':_0x5e59e3},_0x56b878=await this[_0x480fdc(0xa6)][_0x480fdc(0xa3)](_0x480fdc(0xe0)+_0x5e59e3+_0x480fdc(0xf1),{'body':_0x2aa2c5});return!_0x56b878['body'][_0x480fdc(0xd0)]||_0x56b878['body'][_0x480fdc(0xd0)]['code']===0x1;}async[_0x35a9d0(0xed)](_0x409305,_0x6e141d,_0x525db2){const _0x5b9092=_0x35a9d0,_0x2f8fac={'unitId':_0x409305,'threadId':_0x525db2},_0x3d3ea0=await this[_0x5b9092(0xa6)][_0x5b9092(0xa3)](_0x5b9092(0xe0)+_0x409305+_0x5b9092(0xe5),{'body':_0x2f8fac}),_0x41a52a=_0x525db2[_0x5b9092(0x9c)](_0x576065=>ee(_0x3d3ea0['body'][_0x5b9092(0xdd)][_0x576065],_0x409305,_0x6e141d))['filter'](Boolean);return Object['values'](_0x3d3ea0['body'][_0x5b9092(0xa4)])[_0x5b9092(0xe3)](_0x253837=>{const _0x2a7363=_0x5b9092;this[_0x2a7363(0xe6)][_0x2a7363(0xdf)](_0x253837);}),_0x41a52a;}['saveCommentToSnapshot'](_0x3362a5){const _0x5c1661=_0x35a9d0;return{'id':_0x3362a5['id'],'threadId':_0x3362a5[_0x5c1661(0xf9)],'ref':_0x3362a5[_0x5c1661(0xbe)]};}};f=Q([_(0x0,_0x45f7ff(_0x4dec66)),_(0x1,_0x45f7ff(_0x29941a)),_(0x2,_0x45f7ff(_0xba6ff4)),_(0x3,_0x45f7ff(_0x1f501e))],f);var re=Object[_0x35a9d0(0xfe)],te=(_0x9ff555,_0x1b0a8c,_0x535ccf,_0x46c744)=>{const _0x524037=_0x35a9d0;for(var _0x4abfc9=_0x46c744>0x1?void 0x0:_0x46c744?re(_0x1b0a8c,_0x535ccf):_0x1b0a8c,_0x4aa95a=_0x9ff555[_0x524037(0xd5)]-0x1,_0x5171c9;_0x4aa95a>=0x0;_0x4aa95a--)(_0x5171c9=_0x9ff555[_0x4aa95a])&&(_0x4abfc9=_0x5171c9(_0x4abfc9)||_0x4abfc9);return _0x4abfc9;},N=(_0xb1c9dd,_0x10dfcb)=>(_0x44d0ab,_0x331e31)=>_0x10dfcb(_0x44d0ab,_0x331e31,_0xb1c9dd);let g=class extends _0xfa304e{constructor(_0x10e142,_0x5ad823){const _0x54cab2=_0x35a9d0;super(),this[_0x54cab2(0xf7)]=_0x10e142,this[_0x54cab2(0xe1)]=_0x5ad823,this[_0x54cab2(0x103)]();}[_0x35a9d0(0x103)](){const _0x3cd94d=_0x35a9d0;this[_0x3cd94d(0xf7)][_0x3cd94d(0xb9)]=this[_0x3cd94d(0xe1)],this[_0x3cd94d(0xf7)][_0x3cd94d(0xc1)]=!0x1;}};g=te([N(0x0,_0x4091ea),N(0x1,_0x45f7ff(f))],g);var se=Object[_0x35a9d0(0xfc)],oe=Object[_0x35a9d0(0xfe)],ne=(_0xe4b31e,_0x3b6f3e,_0xff0711)=>_0x3b6f3e in _0xe4b31e?se(_0xe4b31e,_0x3b6f3e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xff0711}):_0xe4b31e[_0x3b6f3e]=_0xff0711,ie=(_0x8c184a,_0x194765,_0x3f4fc2,_0x520208)=>{for(var _0x2a6198=_0x520208>0x1?void 0x0:_0x520208?oe(_0x194765,_0x3f4fc2):_0x194765,_0x2bdf48=_0x8c184a['length']-0x1,_0xfc2f26;_0x2bdf48>=0x0;_0x2bdf48--)(_0xfc2f26=_0x8c184a[_0x2bdf48])&&(_0x2a6198=_0xfc2f26(_0x2a6198)||_0x2a6198);return _0x2a6198;},w=(_0xebe466,_0x11f6dd)=>(_0x5b5d93,_0xf4f68e)=>_0x11f6dd(_0x5b5d93,_0xf4f68e,_0xebe466),$=(_0x2cc094,_0x1b8180,_0x5b453e)=>ne(_0x2cc094,typeof _0x1b8180!=_0x35a9d0(0xbc)?_0x1b8180+'':_0x1b8180,_0x5b453e);let b=class extends _0x172dee{constructor(_0x3247e3=M,_0x4d2233,_0x15128d){const _0x3a70fc=_0x35a9d0;super(),this[_0x3a70fc(0xb0)]=_0x3247e3,this['_injector']=_0x4d2233,this['_configService']=_0x15128d;const {..._0x1df743}=_0xc29423({},M,this[_0x3a70fc(0xb0)]);this['_configService'][_0x3a70fc(0xa9)](z,_0x1df743);}[_0x35a9d0(0xd4)](){[[f],[g],[S]]['forEach'](_0x173ce9=>{const _0x4c3418=_0x18a9;this[_0x4c3418(0xeb)][_0x4c3418(0xc5)](_0x173ce9);});}[_0x35a9d0(0xac)](){const _0x9bad90=_0x35a9d0;this[_0x9bad90(0xeb)]['get'](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,_0x35a9d0(0xe8),_0xd39200[_0x35a9d0(0xff)]),b=ie([_0x1eb8c7(_0x138b23,_0xbc84fc,_0x42a3ce),w(0x1,_0x45f7ff(_0x1f501e)),w(0x2,_0x24fb91)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5f5545=_0x1831;(function(_0x1eb6dc,_0x5de806){const _0x335203=_0x1831,_0x5086e1=_0x1eb6dc();while(!![]){try{const _0x22987a=-parseInt(_0x335203(0xc3))/0x1*(parseInt(_0x335203(0x91))/0x2)+-parseInt(_0x335203(0xb0))/0x3*(parseInt(_0x335203(0xa5))/0x4)+-parseInt(_0x335203(0xeb))/0x5+-parseInt(_0x335203(0xbd))/0x6+parseInt(_0x335203(0xcb))/0x7+parseInt(_0x335203(0xab))/0x8+parseInt(_0x335203(0xad))/0x9*(parseInt(_0x335203(0xf1))/0xa);if(_0x22987a===_0x5de806)break;else _0x5086e1['push'](_0x5086e1['shift']());}catch(_0x481641){_0x5086e1['push'](_0x5086e1['shift']());}}}(_0x4695,0x4d4f0));import{CommentService as _0x15a9b5,CollaborationSessionService as _0x500a18,UniverCollaborationClientPlugin as _0x2ffb99}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42875c}from'@univerjs-pro/license';import{dayjs as _0x48433f,UserManagerService as _0x25f664,Inject as _0x40680a,Injector as _0x57ef01,Disposable as _0x272377,CustomRangeType as _0x2b2672,UniverInstanceType as _0x408419,DependentOn as _0x2c6962,IConfigService as _0x3260d3,Plugin as _0x43489b,merge as _0x32f219}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3407d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5e5ade,IThreadCommentDataSourceService as _0xf97d9d}from'@univerjs/thread-comment';import{bufferTime as _0x2add9b}from'rxjs';import{HTTPService as _0x470e80}from'@univerjs/network';const W=_0x5f5545(0xae);function _0x1831(_0x481add,_0x451078){const _0x469514=_0x4695();return _0x1831=function(_0x183183,_0x4a9da1){_0x183183=_0x183183-0x8f;let _0xb00138=_0x469514[_0x183183];return _0xb00138;},_0x1831(_0x481add,_0x451078);}var I=(_0x2a67c7=>(_0x2a67c7[_0x2a67c7[_0x5f5545(0x9c)]=0x0]='OpenOrReOpen',_0x2a67c7[_0x2a67c7[_0x5f5545(0x9d)]=0x1]=_0x5f5545(0x9d),_0x2a67c7[_0x2a67c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a67c7))(I||{}),v=(_0x16f714=>(_0x16f714[_0x16f714[_0x5f5545(0xb6)]=0x0]=_0x5f5545(0xb6),_0x16f714[_0x16f714['Add']=0x1]='Add',_0x16f714[_0x16f714['Reply']=0x2]=_0x5f5545(0xd0),_0x16f714[_0x16f714[_0x5f5545(0x92)]=0x3]=_0x5f5545(0x92),_0x16f714[_0x16f714[_0x5f5545(0x94)]=0x4]=_0x5f5545(0x94),_0x16f714[_0x16f714[_0x5f5545(0xde)]=0x5]='Solve',_0x16f714[_0x16f714[_0x5f5545(0x8f)]=-0x1]=_0x5f5545(0x8f),_0x16f714))(v||{});const D=_0xc1d100=>_0x48433f(new Date(+_0xc1d100))[_0x5f5545(0xa6)](_0x5f5545(0xb1)),B=async(_0x2a49cb,_0x53c868)=>{const _0x16b647=_0x5f5545,_0x231d78=_0x2a49cb[_0x16b647(0xc5)](_0x25f664),_0x85d9e5=_0x2a49cb['get'](_0x470e80);_0x53c868[_0x16b647(0xef)](_0x385ef3=>{const _0x52ed65=_0x16b647;_0x231d78[_0x52ed65(0xe9)](_0x385ef3)&&_0x53c868[_0x52ed65(0xb2)](_0x385ef3);}),_0x53c868['size']&&(await _0x85d9e5['get'](_0x16b647(0xe6),{'params':{'userIDs':[..._0x53c868]}}))[_0x16b647(0xb3)]['users'][_0x16b647(0xef)](_0x1e90fd=>{const _0x19075c=_0x16b647;_0x1e90fd&&_0x231d78[_0x19075c(0xd9)](_0x1e90fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2c349b,_0x5887a2,_0x4fdd97,_0x2988da)=>{for(var _0x237d11=_0x2988da>0x1?void 0x0:_0x2988da?K(_0x5887a2,_0x4fdd97):_0x5887a2,_0x512315=_0x2c349b['length']-0x1,_0x44b818;_0x512315>=0x0;_0x512315--)(_0x44b818=_0x2c349b[_0x512315])&&(_0x237d11=_0x44b818(_0x237d11)||_0x237d11);return _0x237d11;},p=(_0x151ad7,_0xc5ce70)=>(_0x2a1fec,_0x1ee09f)=>_0xc5ce70(_0x2a1fec,_0x1ee09f,_0x151ad7);let S=class extends _0x272377{constructor(_0x69d3d5,_0x1884d3,_0x3b4d93,_0x4c6a7b){const _0x14e4b9=_0x5f5545;super(),this[_0x14e4b9(0xdb)]=_0x69d3d5,this['_threadCommentModel']=_0x1884d3,this[_0x14e4b9(0xe3)]=_0x3b4d93,this['_injector']=_0x4c6a7b,this[_0x14e4b9(0xbc)](),this[_0x14e4b9(0x96)]();}[_0x5f5545(0x96)](){const _0x516eed=_0x5f5545;this[_0x516eed(0xbb)](this['_threadCommentModel']['commentUpdate$'][_0x516eed(0xa4)](_0x2add9b(0x10))['subscribe'](_0x1d57ab=>{const _0x56d4e1=_0x516eed,_0x1d3825=new Set();_0x1d57ab[_0x56d4e1(0xef)](_0x238a85=>{const _0x17231d=_0x56d4e1;switch(_0x238a85[_0x17231d(0xa0)]){case _0x17231d(0xa8):{const _0x5dfb2b=_0x238a85[_0x17231d(0xb9)][_0x17231d(0xe7)];_0x1d3825[_0x17231d(0xa8)](_0x5dfb2b);break;}}}),B(this['_injector'],_0x1d3825);}));}[_0x5f5545(0xbc)](){const _0x569450=_0x5f5545;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x569450(0xb8)](async _0x3528fc=>{const _0xde0344=_0x569450;var _0x1b8409,_0x4e1602,_0x16706b,_0x3b6e32;const _0x2389f0=(_0x1b8409=this['_threadCommentModel']['getUnit'](_0x3528fc[_0xde0344(0xd1)])[_0xde0344(0xa7)](_0xd1a1bb=>_0xd1a1bb['threadId']===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x1b8409[_0xde0344(0x9b)];if(!_0x2389f0)return;const {unitId:_0x2b8a39,subUnitId:_0x3700b5}=_0x2389f0;switch(_0x3528fc[_0xde0344(0xdd)]&&this[_0xde0344(0xe3)][_0xde0344(0xd9)](_0x3528fc[_0xde0344(0xdd)]),_0x3528fc['type']){case v['Add']:break;case v['Reply']:{this[_0xde0344(0xdf)][_0xde0344(0xd6)](_0x2b8a39,_0x3700b5,{'unitId':_0x2b8a39,'subUnitId':_0x3700b5,'ref':'','id':_0x3528fc['replyId'],'dT':D(+_0x3528fc[_0xde0344(0xd4)]),'threadId':_0x3528fc['threadId'],'personId':(_0x16706b=(_0x4e1602=_0x3528fc[_0xde0344(0xdd)])==null?void 0x0:_0x4e1602['userID'])!=null?_0x16706b:_0x3528fc[_0xde0344(0xc8)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)]),'parentId':_0x2389f0['id']});break;}case v[_0xde0344(0x94)]:{const _0x3263d4=this[_0xde0344(0xdf)][_0xde0344(0xd8)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);_0x3263d4&&_0x3263d4['parentId']&&this[_0xde0344(0xdf)][_0xde0344(0x97)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);break;}case v[_0xde0344(0x92)]:{this['_threadCommentModel'][_0xde0344(0xcd)](_0x2b8a39,_0x3700b5,{'commentId':_0x3528fc[_0xde0344(0xac)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)])});break;}case v[_0xde0344(0xde)]:{const _0x2f3532=(_0x3b6e32=this[_0xde0344(0xdf)]['getUnit'](_0x3528fc['unitId'])[_0xde0344(0xa7)](_0x5d27b2=>_0x5d27b2[_0xde0344(0xba)]===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x3b6e32[_0xde0344(0x9b)];_0x2f3532&&this[_0xde0344(0xdf)]['resolveComment'](_0x2b8a39,_0x3700b5,_0x2f3532['id'],_0x3528fc['solved']===I[_0xde0344(0x9d)]);break;}}}));}};S=V([p(0x0,_0x40680a(_0x15a9b5)),p(0x1,_0x40680a(_0x5e5ade)),p(0x2,_0x40680a(_0x25f664)),p(0x3,_0x40680a(_0x57ef01))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5f5545(0xc1)],Q=(_0x34d57d,_0x36d811,_0x4fdc03,_0x241a19)=>{for(var _0x17ce6a=_0x241a19>0x1?void 0x0:_0x241a19?k(_0x36d811,_0x4fdc03):_0x36d811,_0x3a7411=_0x34d57d['length']-0x1,_0x181bfe;_0x3a7411>=0x0;_0x3a7411--)(_0x181bfe=_0x34d57d[_0x3a7411])&&(_0x17ce6a=_0x181bfe(_0x17ce6a)||_0x17ce6a);return _0x17ce6a;},_=(_0x55136f,_0x1a4648)=>(_0x194e55,_0x33710f)=>_0x1a4648(_0x194e55,_0x33710f,_0x55136f);function X(_0x3956ba,_0x8b482d){const _0x54c237=_0x5f5545,_0x5df23e=_0x3956ba[_0x54c237(0xc6)][0x0];return{..._0x8b482d,'id':_0x5df23e[_0x54c237(0xac)],'resolved':_0x3956ba[_0x54c237(0xb4)]===0x1,'dT':D(_0x5df23e[_0x54c237(0xd4)]),'personId':_0x5df23e[_0x54c237(0xc8)],'threadId':_0x5df23e[_0x54c237(0xba)]};}function ee(_0x369cf,_0x4b7f75,_0x6cea36){const _0x345c25=_0x5f5545;var _0x371ae6,_0x3c41ee;if(((_0x3c41ee=(_0x371ae6=_0x369cf==null?void 0x0:_0x369cf[_0x345c25(0xc6)])==null?void 0x0:_0x371ae6[_0x345c25(0x9f)])!=null?_0x3c41ee:0x0)>0x0){const _0x2d070e=(_0x8a14db,_0x16d296)=>({'id':_0x8a14db[_0x345c25(0xac)],'threadId':_0x8a14db['threadId'],'dT':D(_0x8a14db[_0x345c25(0xd4)]),'personId':_0x8a14db[_0x345c25(0xc8)],'resolved':_0x369cf[_0x345c25(0xb4)]===I[_0x345c25(0x9d)],'unitId':_0x4b7f75,'subUnitId':_0x6cea36,'text':JSON[_0x345c25(0x93)](_0x8a14db[_0x345c25(0xaa)]),'parentId':_0x16d296}),_0x2e7fc1=_0x2d070e(_0x369cf[_0x345c25(0xc6)][0x0]);return{..._0x2e7fc1,'children':_0x369cf[_0x345c25(0xc6)][_0x345c25(0xe4)](0x1)[_0x345c25(0xce)](_0x11a7c8=>_0x2d070e(_0x11a7c8,_0x2e7fc1['id']))};}return null;}let f=class{constructor(_0x4f6ac7,_0x5b5df2,_0x337650,_0x47dbad){const _0x55f29d=_0x5f5545;this[_0x55f29d(0x98)]=_0x4f6ac7,this[_0x55f29d(0xe3)]=_0x5b5df2,this[_0x55f29d(0xf0)]=_0x337650,this[_0x55f29d(0xe1)]=_0x47dbad;}async[_0x5f5545(0xd6)](_0x2c6d25){const _0x5a447d=_0x5f5545;var _0x26db16,_0xf3a1cf;const {parentId:_0x41dbd0,unitId:_0x3788a5,text:_0x2093c5,threadId:_0x13707a}=_0x2c6d25,_0x456d67=(_0xf3a1cf=(_0x26db16=_0x2093c5[_0x5a447d(0xa9)])==null?void 0x0:_0x26db16[_0x5a447d(0xc7)](_0x32fa4d=>_0x32fa4d[_0x5a447d(0xe0)]===_0x2b2672['COMMENT'])[_0x5a447d(0xce)](_0x7f2307=>_0x7f2307[_0x5a447d(0xcf)]))!=null?_0xf3a1cf:[],_0x394ffb=JSON[_0x5a447d(0xf2)](_0x2093c5),_0x55e8f6=(await this[_0x5a447d(0xf0)][_0x5a447d(0xb5)](_0x3788a5))[_0x5a447d(0xc0)]();if(_0x41dbd0){const _0x19970a={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67,'threadId':_0x13707a},_0x18c3ff=(await this[_0x5a447d(0x98)]['post'](_0x5a447d(0xec)+_0x3788a5+'/reply',{'body':_0x19970a}))[_0x5a447d(0xb3)][_0x5a447d(0x90)];return{..._0x2c6d25,'id':_0x18c3ff[_0x5a447d(0xac)],'dT':_0x48433f(+_0x18c3ff[_0x5a447d(0xd4)])[_0x5a447d(0xa6)](_0x5a447d(0xb1)),'personId':_0x18c3ff['userId']};}else{const _0x2d6d65={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67},_0x100e62=await this[_0x5a447d(0x98)]['post']('/universer-api/comment/unit/'+_0x3788a5+_0x5a447d(0xd5),{'body':_0x2d6d65});return X(_0x100e62[_0x5a447d(0xb3)][_0x5a447d(0xd3)],_0x2c6d25);}}async[_0x5f5545(0xcd)](_0x4ae5b4){const _0x372399=_0x5f5545;var _0x595a1b,_0x28b748;const {text:_0x4e05b3,unitId:_0x469f2c}=_0x4ae5b4,_0x3b5016=(_0x28b748=(_0x595a1b=_0x4e05b3[_0x372399(0xa9)])==null?void 0x0:_0x595a1b[_0x372399(0xc7)](_0x33a85a=>_0x33a85a[_0x372399(0xe0)]===_0x2b2672[_0x372399(0xa1)])[_0x372399(0xce)](_0x1186ee=>_0x1186ee[_0x372399(0xcf)]))!=null?_0x28b748:[],_0x5b9f30=JSON['stringify'](_0x4e05b3),_0x59e1c4=_0x4ae5b4[_0x372399(0xba)],_0xc72f0d=_0x4ae5b4['id'],_0x55d1d0={'memberId':(await this[_0x372399(0xf0)]['requireSession'](_0x469f2c))[_0x372399(0xc0)](),'unitId':_0x469f2c,'threadId':_0x59e1c4,'mention':_0x3b5016,'content':_0x5b9f30,'replyId':_0xc72f0d},_0x2dd45f=await this['_httpService'][_0x372399(0xd2)](_0x372399(0xec)+_0x469f2c+'/edit',{'body':_0x55d1d0});return!_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)]||_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)][_0x372399(0xb7)]===0x1;}async[_0x5f5545(0xdc)](_0x425b99){const _0x363dc4=_0x5f5545,{unitId:_0x47f27f}=_0x425b99,_0x5862e7=_0x425b99[_0x363dc4(0xba)],_0x323139={'memberId':this[_0x363dc4(0xe3)][_0x363dc4(0xee)]()['userID'],'unitId':_0x47f27f,'threadId':_0x5862e7,'solved':_0x425b99[_0x363dc4(0x95)]?I[_0x363dc4(0x9d)]:I[_0x363dc4(0x9c)]},_0x2b33e5=await this[_0x363dc4(0x98)][_0x363dc4(0xd2)](_0x363dc4(0xec)+_0x47f27f+_0x363dc4(0xbe),{'body':_0x323139});return!_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]||_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]['code']===0x1;}async[_0x5f5545(0x97)](_0x5883ba,_0x54c3bd,_0x22f0d3,_0x569f0d){const _0x48f910=_0x5f5545,_0x34b05a={'memberId':(await this['_sessionService']['requireSession'](_0x5883ba))[_0x48f910(0xc0)](),'threadId':_0x22f0d3,'replyId':_0x569f0d,'unitId':_0x5883ba},_0x591e34=await this[_0x48f910(0x98)][_0x48f910(0xd2)]('/universer-api/comment/unit/'+_0x5883ba+_0x48f910(0xe2),{'body':_0x34b05a});return!_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)]||_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)][_0x48f910(0xb7)]===0x1;}async['listComments'](_0x33333f,_0x545a05,_0x35d1f1){const _0x52d7e1=_0x5f5545,_0x39a092={'unitId':_0x33333f,'threadId':_0x35d1f1},_0x2d3a40=await this['_httpService'][_0x52d7e1(0xd2)](_0x52d7e1(0xec)+_0x33333f+_0x52d7e1(0xda),{'body':_0x39a092}),_0x239596=_0x35d1f1[_0x52d7e1(0xce)](_0x1920a0=>ee(_0x2d3a40['body']['comments'][_0x1920a0],_0x33333f,_0x545a05))[_0x52d7e1(0xc7)](Boolean);return Object[_0x52d7e1(0x99)](_0x2d3a40[_0x52d7e1(0xb3)][_0x52d7e1(0xc9)])[_0x52d7e1(0xef)](_0x2d69ff=>{const _0x2cc1ce=_0x52d7e1;this['_userService'][_0x2cc1ce(0xd9)](_0x2d69ff);}),_0x239596;}[_0x5f5545(0xca)](_0x2cdc3a){const _0x55e12a=_0x5f5545;return{'id':_0x2cdc3a['id'],'threadId':_0x2cdc3a['threadId'],'ref':_0x2cdc3a[_0x55e12a(0xa3)]};}};f=Q([_(0x0,_0x40680a(_0x470e80)),_(0x1,_0x40680a(_0x25f664)),_(0x2,_0x40680a(_0x500a18)),_(0x3,_0x40680a(_0x57ef01))],f);var re=Object[_0x5f5545(0xc1)],te=(_0x3cc6a9,_0x5bd1c1,_0xe8b522,_0x419de4)=>{const _0x2eee61=_0x5f5545;for(var _0x587ff7=_0x419de4>0x1?void 0x0:_0x419de4?re(_0x5bd1c1,_0xe8b522):_0x5bd1c1,_0x3128aa=_0x3cc6a9[_0x2eee61(0x9f)]-0x1,_0x3f195e;_0x3128aa>=0x0;_0x3128aa--)(_0x3f195e=_0x3cc6a9[_0x3128aa])&&(_0x587ff7=_0x3f195e(_0x587ff7)||_0x587ff7);return _0x587ff7;},N=(_0x27b4ca,_0x17e376)=>(_0x1d33e2,_0x2a1fe7)=>_0x17e376(_0x1d33e2,_0x2a1fe7,_0x27b4ca);let g=class extends _0x272377{constructor(_0xc98618,_0x24a201){const _0x55ea7f=_0x5f5545;super(),this[_0x55ea7f(0xc4)]=_0xc98618,this['_threadCommentDataSource']=_0x24a201,this[_0x55ea7f(0xe8)]();}[_0x5f5545(0xe8)](){const _0x4a5051=_0x5f5545;this[_0x4a5051(0xc4)][_0x4a5051(0xed)]=this[_0x4a5051(0xe5)],this['_threadCommentDataSourceService'][_0x4a5051(0x9a)]=!0x1;}};g=te([N(0x0,_0xf97d9d),N(0x1,_0x40680a(f))],g);var se=Object[_0x5f5545(0xcc)],oe=Object[_0x5f5545(0xc1)],ne=(_0x36d24d,_0x17dc88,_0x225aba)=>_0x17dc88 in _0x36d24d?se(_0x36d24d,_0x17dc88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x225aba}):_0x36d24d[_0x17dc88]=_0x225aba,ie=(_0x42ca3a,_0x15b84c,_0x3473d2,_0x16a8ae)=>{const _0x27f953=_0x5f5545;for(var _0x4aff39=_0x16a8ae>0x1?void 0x0:_0x16a8ae?oe(_0x15b84c,_0x3473d2):_0x15b84c,_0x4be5d5=_0x42ca3a[_0x27f953(0x9f)]-0x1,_0x2c9e73;_0x4be5d5>=0x0;_0x4be5d5--)(_0x2c9e73=_0x42ca3a[_0x4be5d5])&&(_0x4aff39=_0x2c9e73(_0x4aff39)||_0x4aff39);return _0x4aff39;},w=(_0x5a96ae,_0x191494)=>(_0x3bf13d,_0x5b50aa)=>_0x191494(_0x3bf13d,_0x5b50aa,_0x5a96ae),$=(_0x7b1bc6,_0x3a5f6b,_0x1445ae)=>ne(_0x7b1bc6,typeof _0x3a5f6b!=_0x5f5545(0xea)?_0x3a5f6b+'':_0x3a5f6b,_0x1445ae);let b=class extends _0x43489b{constructor(_0x7cb831=M,_0x427f97,_0x3ff48d){const _0x6107da=_0x5f5545;super(),this[_0x6107da(0xa2)]=_0x7cb831,this[_0x6107da(0xe1)]=_0x427f97,this['_configService']=_0x3ff48d;const {..._0x257046}=_0x32f219({},M,this[_0x6107da(0xa2)]);this[_0x6107da(0xbf)][_0x6107da(0xc2)](z,_0x257046);}[_0x5f5545(0xaf)](){[[f],[g],[S]]['forEach'](_0x20913b=>{this['_injector']['add'](_0x20913b);});}[_0x5f5545(0x9e)](){const _0x31ad69=_0x5f5545;this[_0x31ad69(0xe1)][_0x31ad69(0xc5)](g),this['_injector'][_0x31ad69(0xc5)](S);}};$(b,'pluginName',W),$(b,_0x5f5545(0xa0),_0x408419['UNIVER_UNKNOWN']),b=ie([_0x2c6962(_0x3407d6,_0x2ffb99,_0x42875c),w(0x1,_0x40680a(_0x57ef01)),w(0x2,_0x3260d3)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4695(){const _0x1cf8df=['dataSource','getCurrentUser','forEach','_sessionService','12130dWJNmV','stringify','UNRECOGNIZED','reply','458xeYoVm','Edit','parse','Delete','resolved','_initUserSync','deleteComment','_httpService','values','syncUpdateMutationToColla','root','OpenOrReOpen','Solved','onReady','length','type','COMMENT','_config','ref','pipe','1842664ykFBRW','format','find','add','customRanges','content','3166856DkSZqX','replyId','9423QbISLI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','3zevDcf','YYYY/MM/DD\x20HH:mm','delete','body','solved','requireSession','Unknown','code','subscribe','payload','threadId','disposeWithMe','_init','3397572YxxFUV','/solved','_configService','getMemberID','getOwnPropertyDescriptor','setConfig','379TrZnsL','_threadCommentDataSourceService','get','replies','filter','userId','users','saveCommentToSnapshot','2307676gmLsKV','defineProperty','updateComment','map','rangeId','Reply','unitId','post','comment','createTimestamp','/add','addComment','error','getComment','addUser','/list','_commentService','resolveComment','user','Solve','_threadCommentModel','rangeType','_injector','/delete','_userService','slice','_threadCommentDataSource','/universer-api/user/list','personId','_initDataSource','getUser','symbol','2825805beJAlX','/universer-api/comment/unit/'];_0x4695=function(){return _0x1cf8df;};return _0x4695();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3871(_0x2af6eb,_0x4184b1){const _0x425224=_0x4252();return _0x3871=function(_0x387153,_0x354f9c){_0x387153=_0x387153-0xaf;let _0x58195b=_0x425224[_0x387153];return _0x58195b;},_0x3871(_0x2af6eb,_0x4184b1);}(function(_0x4cc55c,_0x1b8b13){const _0x1d0b0c=_0x3871,_0x559d99=_0x4cc55c();while(!![]){try{const _0x30fd98=parseInt(_0x1d0b0c(0xca))/0x1*(parseInt(_0x1d0b0c(0x102))/0x2)+-parseInt(_0x1d0b0c(0xe6))/0x3+parseInt(_0x1d0b0c(0xc9))/0x4+parseInt(_0x1d0b0c(0x113))/0x5+-parseInt(_0x1d0b0c(0xf3))/0x6+-parseInt(_0x1d0b0c(0x110))/0x7+-parseInt(_0x1d0b0c(0xf7))/0x8;if(_0x30fd98===_0x1b8b13)break;else _0x559d99['push'](_0x559d99['shift']());}catch(_0x2d0ef5){_0x559d99['push'](_0x559d99['shift']());}}}(_0x4252,0x1e181),function(_0x5c826a,_0x528672){const _0x9314ba=_0x3871;typeof exports=='object'&&typeof module<'u'?_0x528672(exports,require('@univerjs-pro/collaboration-client'),require(_0x9314ba(0x11c)),require(_0x9314ba(0x118)),require(_0x9314ba(0xb9)),require('@univerjs/thread-comment'),require(_0x9314ba(0x11a)),require(_0x9314ba(0x106))):typeof define==_0x9314ba(0x122)&&define['amd']?define([_0x9314ba(0xc7),_0x9314ba(0xe1),_0x9314ba(0x11c),_0x9314ba(0x118),'@univerjs/thread-comment-ui','@univerjs/thread-comment',_0x9314ba(0x11a),'@univerjs/network'],_0x528672):(_0x5c826a=typeof globalThis<'u'?globalThis:_0x5c826a||self,_0x528672(_0x5c826a[_0x9314ba(0x132)]={},_0x5c826a[_0x9314ba(0xaf)],_0x5c826a[_0x9314ba(0x11f)],_0x5c826a[_0x9314ba(0xcd)],_0x5c826a[_0x9314ba(0xf4)],_0x5c826a['UniverThreadComment'],_0x5c826a['rxjs'],_0x5c826a['UniverNetwork']));}(this,function(_0x42fddb,_0x197f87,_0x1b08bb,_0x4e02c2,_0x3bc6fc,_0x501bb6,_0x299429,_0xa2e709){'use strict';const _0xe30011=_0x3871;const _0x3892e5=_0xe30011(0x123);var _0x121c7f=(_0x59e94a=>(_0x59e94a[_0x59e94a['OpenOrReOpen']=0x0]=_0xe30011(0x101),_0x59e94a[_0x59e94a[_0xe30011(0xef)]=0x1]='Solved',_0x59e94a[_0x59e94a['UNRECOGNIZED']=-0x1]=_0xe30011(0xb6),_0x59e94a))(_0x121c7f||{}),_0x5a0d25=(_0x39a11e=>(_0x39a11e[_0x39a11e['Unknown']=0x0]=_0xe30011(0xb7),_0x39a11e[_0x39a11e[_0xe30011(0xb2)]=0x1]=_0xe30011(0xb2),_0x39a11e[_0x39a11e['Reply']=0x2]='Reply',_0x39a11e[_0x39a11e[_0xe30011(0xf2)]=0x3]=_0xe30011(0xf2),_0x39a11e[_0x39a11e[_0xe30011(0xde)]=0x4]='Delete',_0x39a11e[_0x39a11e[_0xe30011(0xc0)]=0x5]=_0xe30011(0xc0),_0x39a11e[_0x39a11e[_0xe30011(0xb6)]=-0x1]=_0xe30011(0xb6),_0x39a11e))(_0x5a0d25||{});const _0x3e8fd1=_0x1bd13b=>_0x4e02c2[_0xe30011(0x130)](new Date(+_0x1bd13b))['format'](_0xe30011(0xbf)),_0x7ccca9=async(_0x1bda24,_0x2cc243)=>{const _0x17b6c4=_0xe30011,_0x2e0c7a=_0x1bda24[_0x17b6c4(0xfe)](_0x4e02c2['UserManagerService']),_0x31a1b9=_0x1bda24[_0x17b6c4(0xfe)](_0xa2e709[_0x17b6c4(0xb0)]);_0x2cc243[_0x17b6c4(0xda)](_0x164593=>{const _0x225d47=_0x17b6c4;_0x2e0c7a[_0x225d47(0xd4)](_0x164593)&&_0x2cc243['delete'](_0x164593);}),_0x2cc243[_0x17b6c4(0x10c)]&&(await _0x31a1b9[_0x17b6c4(0xfe)](_0x17b6c4(0x12c),{'params':{'userIDs':[..._0x2cc243]}}))[_0x17b6c4(0xf5)][_0x17b6c4(0xc6)][_0x17b6c4(0xda)](_0x1d86c2=>{const _0x2cb8dc=_0x17b6c4;_0x1d86c2&&_0x2e0c7a[_0x2cb8dc(0xd1)](_0x1d86c2);});};var _0x6fb39=Object[_0xe30011(0xfd)],_0x2885b9=(_0x3646a0,_0x2f9308,_0x4478dc,_0x358fe5)=>{for(var _0x15cde1=_0x358fe5>0x1?void 0x0:_0x358fe5?_0x6fb39(_0x2f9308,_0x4478dc):_0x2f9308,_0x390aab=_0x3646a0['length']-0x1,_0x17d703;_0x390aab>=0x0;_0x390aab--)(_0x17d703=_0x3646a0[_0x390aab])&&(_0x15cde1=_0x17d703(_0x15cde1)||_0x15cde1);return _0x15cde1;},_0x37cfeb=(_0x1c29e5,_0x177aa4)=>(_0x4a4a9d,_0x27de31)=>_0x177aa4(_0x4a4a9d,_0x27de31,_0x1c29e5);let _0x10c8cb=class extends _0x4e02c2[_0xe30011(0xf6)]{constructor(_0x510363,_0x2c6a68,_0x5370a9,_0x4e7cdd){const _0x10dd0a=_0xe30011;super(),this['_commentService']=_0x510363,this[_0x10dd0a(0x124)]=_0x2c6a68,this['_userService']=_0x5370a9,this[_0x10dd0a(0xfb)]=_0x4e7cdd,this[_0x10dd0a(0x100)](),this[_0x10dd0a(0x105)]();}[_0xe30011(0x105)](){const _0x5b638e=_0xe30011;this[_0x5b638e(0x112)](this[_0x5b638e(0x124)][_0x5b638e(0x116)][_0x5b638e(0xd0)](_0x299429['bufferTime'](0x10))[_0x5b638e(0x104)](_0x56d7be=>{const _0x144acd=_0x5b638e,_0x4e21d3=new Set();_0x56d7be[_0x144acd(0xda)](_0x27cb88=>{const _0x22324e=_0x144acd;switch(_0x27cb88[_0x22324e(0x10e)]){case _0x22324e(0xf8):{const _0x5bbe84=_0x27cb88[_0x22324e(0xee)][_0x22324e(0xe0)];_0x4e21d3[_0x22324e(0xf8)](_0x5bbe84);break;}}}),_0x7ccca9(this['_injector'],_0x4e21d3);}));}[_0xe30011(0x100)](){const _0x5b0358=_0xe30011;this[_0x5b0358(0x112)](this[_0x5b0358(0xd8)][_0x5b0358(0x116)]['subscribe'](async _0x44ca9f=>{const _0x55c60e=_0x5b0358;var _0x32734a,_0x51bab5,_0x55ba24,_0x190ea2;const _0x590ffe=(_0x32734a=this['_threadCommentModel'][_0x55c60e(0xe4)](_0x44ca9f['unitId'])[_0x55c60e(0x129)](_0xc8562f=>_0xc8562f[_0x55c60e(0xdf)]===_0x44ca9f[_0x55c60e(0xdf)]))==null?void 0x0:_0x32734a[_0x55c60e(0xbe)];if(!_0x590ffe)return;const {unitId:_0x3bbaf6,subUnitId:_0x499fbb}=_0x590ffe;switch(_0x44ca9f['user']&&this[_0x55c60e(0xbd)][_0x55c60e(0xd1)](_0x44ca9f[_0x55c60e(0xff)]),_0x44ca9f['type']){case _0x5a0d25[_0x55c60e(0xb2)]:break;case _0x5a0d25[_0x55c60e(0x10f)]:{this['_threadCommentModel']['addComment'](_0x3bbaf6,_0x499fbb,{'unitId':_0x3bbaf6,'subUnitId':_0x499fbb,'ref':'','id':_0x44ca9f[_0x55c60e(0xd6)],'dT':_0x3e8fd1(+_0x44ca9f[_0x55c60e(0x128)]),'threadId':_0x44ca9f[_0x55c60e(0xdf)],'personId':(_0x55ba24=(_0x51bab5=_0x44ca9f[_0x55c60e(0xff)])==null?void 0x0:_0x51bab5[_0x55c60e(0x103)])!=null?_0x55ba24:_0x44ca9f[_0x55c60e(0x107)],'text':JSON['parse'](_0x44ca9f[_0x55c60e(0xec)]),'parentId':_0x590ffe['id']});break;}case _0x5a0d25[_0x55c60e(0xde)]:{const _0x2769a9=this[_0x55c60e(0x124)][_0x55c60e(0xba)](_0x3bbaf6,_0x499fbb,_0x44ca9f[_0x55c60e(0xd6)]);_0x2769a9&&_0x2769a9['parentId']&&this['_threadCommentModel'][_0x55c60e(0xce)](_0x3bbaf6,_0x499fbb,_0x44ca9f[_0x55c60e(0xd6)]);break;}case _0x5a0d25[_0x55c60e(0xf2)]:{this[_0x55c60e(0x124)]['updateComment'](_0x3bbaf6,_0x499fbb,{'commentId':_0x44ca9f[_0x55c60e(0xd6)],'text':JSON[_0x55c60e(0xe7)](_0x44ca9f[_0x55c60e(0xec)])});break;}case _0x5a0d25[_0x55c60e(0xc0)]:{const _0x1510e3=(_0x190ea2=this[_0x55c60e(0x124)]['getUnit'](_0x44ca9f[_0x55c60e(0x120)])['find'](_0x3239c2=>_0x3239c2[_0x55c60e(0xdf)]===_0x44ca9f[_0x55c60e(0xdf)]))==null?void 0x0:_0x190ea2[_0x55c60e(0xbe)];_0x1510e3&&this[_0x55c60e(0x124)]['resolveComment'](_0x3bbaf6,_0x499fbb,_0x1510e3['id'],_0x44ca9f['solved']===_0x121c7f[_0x55c60e(0xef)]);break;}}}));}};_0x10c8cb=_0x2885b9([_0x37cfeb(0x0,_0x4e02c2[_0xe30011(0x108)](_0x197f87[_0xe30011(0xfa)])),_0x37cfeb(0x1,_0x4e02c2[_0xe30011(0x108)](_0x501bb6[_0xe30011(0xcb)])),_0x37cfeb(0x2,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xd7)])),_0x37cfeb(0x3,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xe2)]))],_0x10c8cb);const _0x410b57='thread-comment-data-source.config',_0x3cb0f5={};var _0x364547=Object[_0xe30011(0xfd)],_0x33e5be=(_0x15ced9,_0xcd122,_0x1f6be8,_0x5e1439)=>{for(var _0x2dc532=_0x5e1439>0x1?void 0x0:_0x5e1439?_0x364547(_0xcd122,_0x1f6be8):_0xcd122,_0x38538c=_0x15ced9['length']-0x1,_0x34c8b1;_0x38538c>=0x0;_0x38538c--)(_0x34c8b1=_0x15ced9[_0x38538c])&&(_0x2dc532=_0x34c8b1(_0x2dc532)||_0x2dc532);return _0x2dc532;},_0x2a9489=(_0x2135e7,_0x7beab2)=>(_0x259dd8,_0x24e6f9)=>_0x7beab2(_0x259dd8,_0x24e6f9,_0x2135e7);function _0xe506fb(_0x5562a2,_0x6822c5){const _0x5a1f68=_0xe30011,_0x46eef5=_0x5562a2[_0x5a1f68(0xbc)][0x0];return{..._0x6822c5,'id':_0x46eef5[_0x5a1f68(0xd6)],'resolved':_0x5562a2[_0x5a1f68(0xd5)]===0x1,'dT':_0x3e8fd1(_0x46eef5[_0x5a1f68(0x128)]),'personId':_0x46eef5[_0x5a1f68(0x107)],'threadId':_0x46eef5['threadId']};}function _0x38f789(_0x52087e,_0x50a7cf,_0x5ca2a9){const _0x2479f2=_0xe30011;var _0x33d4bf,_0x1a8647;if(((_0x1a8647=(_0x33d4bf=_0x52087e==null?void 0x0:_0x52087e['replies'])==null?void 0x0:_0x33d4bf[_0x2479f2(0xbb)])!=null?_0x1a8647:0x0)>0x0){const _0x2a8049=(_0x48c65e,_0x2a194b)=>({'id':_0x48c65e[_0x2479f2(0xd6)],'threadId':_0x48c65e[_0x2479f2(0xdf)],'dT':_0x3e8fd1(_0x48c65e[_0x2479f2(0x128)]),'personId':_0x48c65e[_0x2479f2(0x107)],'resolved':_0x52087e['solved']===_0x121c7f['Solved'],'unitId':_0x50a7cf,'subUnitId':_0x5ca2a9,'text':JSON[_0x2479f2(0xe7)](_0x48c65e[_0x2479f2(0xec)]),'parentId':_0x2a194b}),_0x205efe=_0x2a8049(_0x52087e[_0x2479f2(0xbc)][0x0]);return{..._0x205efe,'children':_0x52087e['replies']['slice'](0x1)['map'](_0x474e2f=>_0x2a8049(_0x474e2f,_0x205efe['id']))};}return null;}let _0x21b41b=class{constructor(_0x53df73,_0x5499de,_0x34944c,_0x3f93cb){const _0x4d1255=_0xe30011;this[_0x4d1255(0xdb)]=_0x53df73,this['_userService']=_0x5499de,this[_0x4d1255(0xfc)]=_0x34944c,this[_0x4d1255(0xfb)]=_0x3f93cb;}async[_0xe30011(0x114)](_0x35b616){const _0x3499c3=_0xe30011;var _0x4c0282,_0x42b15f;const {parentId:_0x305d5d,unitId:_0x32aef9,text:_0x369432,threadId:_0x2da25f}=_0x35b616,_0x4b8bdc=(_0x42b15f=(_0x4c0282=_0x369432[_0x3499c3(0xe8)])==null?void 0x0:_0x4c0282[_0x3499c3(0xf1)](_0x42f617=>_0x42f617[_0x3499c3(0xc5)]===_0x4e02c2[_0x3499c3(0xe3)][_0x3499c3(0x10a)])[_0x3499c3(0xea)](_0xcc9470=>_0xcc9470[_0x3499c3(0xcc)]))!=null?_0x42b15f:[],_0x177d20=JSON[_0x3499c3(0xed)](_0x369432),_0x1c48b6=(await this[_0x3499c3(0xfc)][_0x3499c3(0xeb)](_0x32aef9))['getMemberID']();if(_0x305d5d){const _0x4f0f0b={'memberId':_0x1c48b6,'unitId':_0x32aef9,'content':_0x177d20,'mention':_0x4b8bdc,'threadId':_0x2da25f},_0x47024a=(await this[_0x3499c3(0xdb)][_0x3499c3(0xb3)]('/universer-api/comment/unit/'+_0x32aef9+_0x3499c3(0xb5),{'body':_0x4f0f0b}))[_0x3499c3(0xf5)][_0x3499c3(0xd9)];return{..._0x35b616,'id':_0x47024a[_0x3499c3(0xd6)],'dT':_0x4e02c2[_0x3499c3(0x130)](+_0x47024a[_0x3499c3(0x128)])['format'](_0x3499c3(0xbf)),'personId':_0x47024a[_0x3499c3(0x107)]};}else{const _0xe262b3={'memberId':_0x1c48b6,'unitId':_0x32aef9,'content':_0x177d20,'mention':_0x4b8bdc},_0x107ab8=await this[_0x3499c3(0xdb)][_0x3499c3(0xb3)](_0x3499c3(0xe9)+_0x32aef9+_0x3499c3(0xb8),{'body':_0xe262b3});return _0xe506fb(_0x107ab8[_0x3499c3(0xf5)][_0x3499c3(0xe5)],_0x35b616);}}async[_0xe30011(0x117)](_0x27177f){const _0x47b146=_0xe30011;var _0x2841b2,_0x3ead7c;const {text:_0xafe191,unitId:_0x3315dd}=_0x27177f,_0x1b7bba=(_0x3ead7c=(_0x2841b2=_0xafe191[_0x47b146(0xe8)])==null?void 0x0:_0x2841b2['filter'](_0x18486c=>_0x18486c[_0x47b146(0xc5)]===_0x4e02c2['CustomRangeType'][_0x47b146(0x10a)])[_0x47b146(0xea)](_0x1cded8=>_0x1cded8['rangeId']))!=null?_0x3ead7c:[],_0x1aa070=JSON[_0x47b146(0xed)](_0xafe191),_0x197af5=_0x27177f[_0x47b146(0xdf)],_0x2109d7=_0x27177f['id'],_0x44cae1={'memberId':(await this['_sessionService'][_0x47b146(0xeb)](_0x3315dd))['getMemberID'](),'unitId':_0x3315dd,'threadId':_0x197af5,'mention':_0x1b7bba,'content':_0x1aa070,'replyId':_0x2109d7},_0x1bd3e0=await this['_httpService'][_0x47b146(0xb3)](_0x47b146(0xe9)+_0x3315dd+_0x47b146(0xc1),{'body':_0x44cae1});return!_0x1bd3e0[_0x47b146(0xf5)][_0x47b146(0x127)]||_0x1bd3e0['body'][_0x47b146(0x127)][_0x47b146(0x109)]===0x1;}async[_0xe30011(0xb1)](_0x414e84){const _0x16d6ab=_0xe30011,{unitId:_0x18042f}=_0x414e84,_0x5c9de9=_0x414e84[_0x16d6ab(0xdf)],_0xf832e={'memberId':this['_userService'][_0x16d6ab(0x11b)]()[_0x16d6ab(0x103)],'unitId':_0x18042f,'threadId':_0x5c9de9,'solved':_0x414e84[_0x16d6ab(0x131)]?_0x121c7f[_0x16d6ab(0xef)]:_0x121c7f[_0x16d6ab(0x101)]},_0x50039=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x18042f+_0x16d6ab(0x12a),{'body':_0xf832e});return!_0x50039[_0x16d6ab(0xf5)][_0x16d6ab(0x127)]||_0x50039[_0x16d6ab(0xf5)][_0x16d6ab(0x127)][_0x16d6ab(0x109)]===0x1;}async[_0xe30011(0xce)](_0x3af12a,_0x4159c8,_0x331d8c,_0x227d82){const _0x3a469e=_0xe30011,_0x53fe29={'memberId':(await this[_0x3a469e(0xfc)][_0x3a469e(0xeb)](_0x3af12a))[_0x3a469e(0x10d)](),'threadId':_0x331d8c,'replyId':_0x227d82,'unitId':_0x3af12a},_0x4283b9=await this[_0x3a469e(0xdb)]['post'](_0x3a469e(0xe9)+_0x3af12a+_0x3a469e(0x10b),{'body':_0x53fe29});return!_0x4283b9[_0x3a469e(0xf5)][_0x3a469e(0x127)]||_0x4283b9[_0x3a469e(0xf5)][_0x3a469e(0x127)][_0x3a469e(0x109)]===0x1;}async[_0xe30011(0xb4)](_0x117297,_0x28f177,_0x7d864){const _0x2ab386=_0xe30011,_0x56b4b5={'unitId':_0x117297,'threadId':_0x7d864},_0x11242d=await this[_0x2ab386(0xdb)][_0x2ab386(0xb3)](_0x2ab386(0xe9)+_0x117297+'/list',{'body':_0x56b4b5}),_0x2ddb56=_0x7d864[_0x2ab386(0xea)](_0x2c0835=>_0x38f789(_0x11242d[_0x2ab386(0xf5)][_0x2ab386(0xc8)][_0x2c0835],_0x117297,_0x28f177))[_0x2ab386(0xf1)](Boolean);return Object[_0x2ab386(0x115)](_0x11242d[_0x2ab386(0xf5)][_0x2ab386(0xc6)])['forEach'](_0x267fc9=>{const _0x208afb=_0x2ab386;this[_0x208afb(0xbd)][_0x208afb(0xd1)](_0x267fc9);}),_0x2ddb56;}['saveCommentToSnapshot'](_0x24c8af){const _0x2e5918=_0xe30011;return{'id':_0x24c8af['id'],'threadId':_0x24c8af[_0x2e5918(0xdf)],'ref':_0x24c8af['ref']};}};_0x21b41b=_0x33e5be([_0x2a9489(0x0,_0x4e02c2[_0xe30011(0x108)](_0xa2e709[_0xe30011(0xb0)])),_0x2a9489(0x1,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xd7)])),_0x2a9489(0x2,_0x4e02c2['Inject'](_0x197f87[_0xe30011(0x12b)])),_0x2a9489(0x3,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xe2)]))],_0x21b41b);var _0x4483d9=Object[_0xe30011(0xfd)],_0x200423=(_0x54e8e6,_0x1089ce,_0x35cfc5,_0x5683cd)=>{const _0x184163=_0xe30011;for(var _0x19cc9d=_0x5683cd>0x1?void 0x0:_0x5683cd?_0x4483d9(_0x1089ce,_0x35cfc5):_0x1089ce,_0x304748=_0x54e8e6[_0x184163(0xbb)]-0x1,_0x2605ea;_0x304748>=0x0;_0x304748--)(_0x2605ea=_0x54e8e6[_0x304748])&&(_0x19cc9d=_0x2605ea(_0x19cc9d)||_0x19cc9d);return _0x19cc9d;},_0x4ce8b8=(_0x44fa7d,_0x391801)=>(_0x3c17ff,_0x560c00)=>_0x391801(_0x3c17ff,_0x560c00,_0x44fa7d);let _0x5b7c97=class extends _0x4e02c2['Disposable']{constructor(_0x2672e9,_0x4df45d){const _0x45e4a6=_0xe30011;super(),this[_0x45e4a6(0xc4)]=_0x2672e9,this['_threadCommentDataSource']=_0x4df45d,this[_0x45e4a6(0xf0)]();}['_initDataSource'](){const _0x5d3c81=_0xe30011;this[_0x5d3c81(0xc4)][_0x5d3c81(0x121)]=this[_0x5d3c81(0xd2)],this['_threadCommentDataSourceService'][_0x5d3c81(0xc3)]=!0x1;}};_0x5b7c97=_0x200423([_0x4ce8b8(0x0,_0x501bb6['IThreadCommentDataSourceService']),_0x4ce8b8(0x1,_0x4e02c2[_0xe30011(0x108)](_0x21b41b))],_0x5b7c97);var _0x5a070e=Object[_0xe30011(0xf9)],_0x14d617=Object[_0xe30011(0xfd)],_0x347eab=(_0x2f7542,_0x55e7bf,_0x439cfb)=>_0x55e7bf in _0x2f7542?_0x5a070e(_0x2f7542,_0x55e7bf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x439cfb}):_0x2f7542[_0x55e7bf]=_0x439cfb,_0x2b7aea=(_0x5f5d89,_0x51a22b,_0x4b1360,_0x3ecf4d)=>{for(var _0x4080c2=_0x3ecf4d>0x1?void 0x0:_0x3ecf4d?_0x14d617(_0x51a22b,_0x4b1360):_0x51a22b,_0x371573=_0x5f5d89['length']-0x1,_0xf38443;_0x371573>=0x0;_0x371573--)(_0xf38443=_0x5f5d89[_0x371573])&&(_0x4080c2=_0xf38443(_0x4080c2)||_0x4080c2);return _0x4080c2;},_0x9d8ad8=(_0x1a21e1,_0x484904)=>(_0x183a51,_0x531d01)=>_0x484904(_0x183a51,_0x531d01,_0x1a21e1),_0x52458c=(_0x48d7d0,_0x553b62,_0x118225)=>_0x347eab(_0x48d7d0,typeof _0x553b62!=_0xe30011(0xdd)?_0x553b62+'':_0x553b62,_0x118225);_0x42fddb[_0xe30011(0x119)]=class extends _0x4e02c2[_0xe30011(0x12e)]{constructor(_0xa5461f=_0x3cb0f5,_0x1ff810,_0x3cee52){const _0x3f6000=_0xe30011;super(),this[_0x3f6000(0x11d)]=_0xa5461f,this[_0x3f6000(0xfb)]=_0x1ff810,this[_0x3f6000(0xd3)]=_0x3cee52;const {..._0x5bd9c7}=_0x4e02c2[_0x3f6000(0xdc)]({},_0x3cb0f5,this[_0x3f6000(0x11d)]);this[_0x3f6000(0xd3)]['setConfig'](_0x410b57,_0x5bd9c7);}[_0xe30011(0x125)](){const _0x1454cb=_0xe30011;[[_0x21b41b],[_0x5b7c97],[_0x10c8cb]][_0x1454cb(0xda)](_0x39c9ab=>{const _0x42b76c=_0x1454cb;this[_0x42b76c(0xfb)][_0x42b76c(0xf8)](_0x39c9ab);});}[_0xe30011(0x12d)](){const _0x5a6960=_0xe30011;this[_0x5a6960(0xfb)][_0x5a6960(0xfe)](_0x5b7c97),this[_0x5a6960(0xfb)][_0x5a6960(0xfe)](_0x10c8cb);}},_0x52458c(_0x42fddb[_0xe30011(0x119)],_0xe30011(0xcf),_0x3892e5),_0x52458c(_0x42fddb[_0xe30011(0x119)],_0xe30011(0x10e),_0x4e02c2['UniverInstanceType']['UNIVER_UNKNOWN']),_0x42fddb['UniverThreadCommentDataSourcePlugin']=_0x2b7aea([_0x4e02c2['DependentOn'](_0x3bc6fc[_0xe30011(0xc2)],_0x197f87[_0xe30011(0x126)],_0x1b08bb[_0xe30011(0x111)]),_0x9d8ad8(0x1,_0x4e02c2['Inject'](_0x4e02c2[_0xe30011(0xe2)])),_0x9d8ad8(0x2,_0x4e02c2['IConfigService'])],_0x42fddb[_0xe30011(0x119)]),Object[_0xe30011(0xf9)](_0x42fddb,Symbol[_0xe30011(0x11e)],{'value':_0xe30011(0x12f)});}));function _0x4252(){const _0x2fd9ca=['deleteComment','pluginName','pipe','addUser','_threadCommentDataSource','_configService','getUser','solved','replyId','UserManagerService','_commentService','reply','forEach','_httpService','merge','symbol','Delete','threadId','personId','@univerjs-pro/collaboration-client','Injector','CustomRangeType','getUnit','comment','207387fyLgaq','parse','customRanges','/universer-api/comment/unit/','map','requireSession','content','stringify','payload','Solved','_initDataSource','filter','Edit','892338HGddbY','UniverThreadCommentUi','body','Disposable','247376wdQbUo','add','defineProperty','CommentService','_injector','_sessionService','getOwnPropertyDescriptor','get','user','_init','OpenOrReOpen','2IagTiS','userID','subscribe','_initUserSync','@univerjs/network','userId','Inject','code','COMMENT','/delete','size','getMemberID','type','Reply','123053gcNUxP','UniverLicensePlugin','disposeWithMe','155180ANBhMV','addComment','values','commentUpdate$','updateComment','@univerjs/core','UniverThreadCommentDataSourcePlugin','rxjs','getCurrentUser','@univerjs-pro/license','_config','toStringTag','UniverProLicense','unitId','dataSource','function','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','onStarting','UniverCollaborationClientPlugin','error','createTimestamp','find','/solved','CollaborationSessionService','/universer-api/user/list','onReady','Plugin','Module','dayjs','resolved','UniverProThreadCommentDatasource','UniverProCollaborationClient','HTTPService','resolveComment','Add','post','listComments','/reply','UNRECOGNIZED','Unknown','/add','@univerjs/thread-comment-ui','getComment','length','replies','_userService','root','YYYY/MM/DD\x20HH:mm','Solve','/edit','UniverThreadCommentUIPlugin','syncUpdateMutationToColla','_threadCommentDataSourceService','rangeType','users','exports','comments','676484WntJgL','189461qvoMTp','ThreadCommentModel','rangeId','UniverCore'];_0x4252=function(){return _0x2fd9ca;};return _0x4252();}
1
+ function _0x1886(_0x5e0cba,_0x33f3d9){const _0x2ddd80=_0x2ddd();return _0x1886=function(_0x188607,_0x35377b){_0x188607=_0x188607-0x1e0;let _0x5a85f3=_0x2ddd80[_0x188607];return _0x5a85f3;},_0x1886(_0x5e0cba,_0x33f3d9);}function _0x2ddd(){const _0x5e8a1d=['/universer-api/user/list','find','UNRECOGNIZED','@univerjs-pro/collaboration-client','stringify','Inject','slice','Unknown','getComment','Plugin','onStarting','_configService','730863woHWtd','type','3knshiU','UserManagerService','@univerjs/core','UniverCollaborationClientPlugin','symbol','_initDataSource','getUser','customRanges','195BAnPMF','UniverThreadCommentUi','addUser','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','_initUserSync','5870zVQKGA','OpenOrReOpen','/add','addComment','content','16969AWoEyo','@univerjs/network','3448cLQQnS','post','rangeType','reply','pluginName','dataSource','disposeWithMe','Add','Disposable','UniverLicensePlugin','forEach','length','filter','map','Solved','@univerjs/thread-comment-ui','solved','replies','get','863308AkRiXS','IThreadCommentDataSourceService','3311QxOsJK','listComments','UniverThreadComment','_httpService','YYYY/MM/DD\x20HH:mm','getUnit','commentUpdate$','UniverCore','values','personId','rxjs','parentId','onReady','merge','Delete','/universer-api/comment/unit/','/list','syncUpdateMutationToColla','_threadCommentDataSourceService','updateComment','code','_config','@univerjs-pro/license','179158DXkWhn','subscribe','_threadCommentModel','rangeId','/solved','amd','dayjs','4807iMsoRb','comment','user','@univerjs/thread-comment','UNIVER_UNKNOWN','thread-comment-data-source.config','/edit','requireSession','pipe','_userService','bufferTime','Solve','userID','getOwnPropertyDescriptor','/reply','size','deleteComment','root','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ref','setConfig','resolved','saveCommentToSnapshot','threadId','HTTPService','error','comments','exports','parse','UniverProLicense','toStringTag','_sessionService','UniverInstanceType','CustomRangeType','function','createTimestamp','Module','Reply','7218wAvFEq','_init','getMemberID','replyId','_injector','add','body','Edit','object','users','Injector','COMMENT','resolveComment','DependentOn','delete'];_0x2ddd=function(){return _0x5e8a1d;};return _0x2ddd();}(function(_0x300401,_0x1cff33){const _0x5e9c95=_0x1886,_0x589ae3=_0x300401();while(!![]){try{const _0x310316=parseInt(_0x5e9c95(0x251))/0x1+-parseInt(_0x5e9c95(0x1f3))/0x2+parseInt(_0x5e9c95(0x23e))/0x3*(parseInt(_0x5e9c95(0x266))/0x4)+parseInt(_0x5e9c95(0x246))/0x5*(-parseInt(_0x5e9c95(0x221))/0x6)+-parseInt(_0x5e9c95(0x268))/0x7*(-parseInt(_0x5e9c95(0x253))/0x8)+parseInt(_0x5e9c95(0x23c))/0x9+-parseInt(_0x5e9c95(0x24c))/0xa*(parseInt(_0x5e9c95(0x1fa))/0xb);if(_0x310316===_0x1cff33)break;else _0x589ae3['push'](_0x589ae3['shift']());}catch(_0x19b070){_0x589ae3['push'](_0x589ae3['shift']());}}}(_0x2ddd,0x1e7b3),function(_0x369f64,_0x5511c7){const _0x25f841=_0x1886;typeof exports==_0x25f841(0x229)&&typeof module<'u'?_0x5511c7(exports,require('@univerjs-pro/collaboration-client'),require(_0x25f841(0x1f2)),require(_0x25f841(0x240)),require(_0x25f841(0x262)),require(_0x25f841(0x1fd)),require(_0x25f841(0x1e6)),require(_0x25f841(0x252))):typeof define==_0x25f841(0x21d)&&define[_0x25f841(0x1f8)]?define([_0x25f841(0x216),_0x25f841(0x233),_0x25f841(0x1f2),_0x25f841(0x240),'@univerjs/thread-comment-ui',_0x25f841(0x1fd),_0x25f841(0x1e6),_0x25f841(0x252)],_0x5511c7):(_0x369f64=typeof globalThis<'u'?globalThis:_0x369f64||self,_0x5511c7(_0x369f64['UniverProThreadCommentDatasource']={},_0x369f64['UniverProCollaborationClient'],_0x369f64[_0x25f841(0x218)],_0x369f64[_0x25f841(0x1e3)],_0x369f64[_0x25f841(0x247)],_0x369f64[_0x25f841(0x26a)],_0x369f64[_0x25f841(0x1e6)],_0x369f64['UniverNetwork']));}(this,function(_0x196c1b,_0x2ed30a,_0x4644ff,_0x53ea67,_0x32dfc5,_0x4d3a93,_0x3107a4,_0x1e6624){'use strict';const _0x8d8e3d=_0x1886;const _0x35b4e4=_0x8d8e3d(0x20d);var _0x5a5666=(_0x293727=>(_0x293727[_0x293727[_0x8d8e3d(0x24d)]=0x0]='OpenOrReOpen',_0x293727[_0x293727[_0x8d8e3d(0x261)]=0x1]='Solved',_0x293727[_0x293727[_0x8d8e3d(0x232)]=-0x1]=_0x8d8e3d(0x232),_0x293727))(_0x5a5666||{}),_0x2d65d6=(_0x45f08b=>(_0x45f08b[_0x45f08b['Unknown']=0x0]=_0x8d8e3d(0x237),_0x45f08b[_0x45f08b['Add']=0x1]='Add',_0x45f08b[_0x45f08b[_0x8d8e3d(0x220)]=0x2]='Reply',_0x45f08b[_0x45f08b[_0x8d8e3d(0x228)]=0x3]=_0x8d8e3d(0x228),_0x45f08b[_0x45f08b[_0x8d8e3d(0x1ea)]=0x4]=_0x8d8e3d(0x1ea),_0x45f08b[_0x45f08b['Solve']=0x5]=_0x8d8e3d(0x205),_0x45f08b[_0x45f08b[_0x8d8e3d(0x232)]=-0x1]=_0x8d8e3d(0x232),_0x45f08b))(_0x2d65d6||{});const _0x45ccb4=_0x519299=>_0x53ea67[_0x8d8e3d(0x1f9)](new Date(+_0x519299))['format'](_0x8d8e3d(0x1e0)),_0x4a4ee9=async(_0x95deda,_0x4ca90e)=>{const _0x4e1ab2=_0x8d8e3d,_0x1f929e=_0x95deda[_0x4e1ab2(0x265)](_0x53ea67[_0x4e1ab2(0x23f)]),_0x2cdfa3=_0x95deda['get'](_0x1e6624[_0x4e1ab2(0x213)]);_0x4ca90e[_0x4e1ab2(0x25d)](_0x401e8e=>{const _0x2b4d87=_0x4e1ab2;_0x1f929e[_0x2b4d87(0x244)](_0x401e8e)&&_0x4ca90e[_0x2b4d87(0x22f)](_0x401e8e);}),_0x4ca90e[_0x4e1ab2(0x209)]&&(await _0x2cdfa3['get'](_0x4e1ab2(0x230),{'params':{'userIDs':[..._0x4ca90e]}}))[_0x4e1ab2(0x227)][_0x4e1ab2(0x22a)][_0x4e1ab2(0x25d)](_0x5eb121=>{const _0x3c503b=_0x4e1ab2;_0x5eb121&&_0x1f929e[_0x3c503b(0x248)](_0x5eb121);});};var _0x2086ac=Object['getOwnPropertyDescriptor'],_0x1a23da=(_0x2b2786,_0x3b8e43,_0x6ddc9f,_0x56a35d)=>{const _0x404826=_0x8d8e3d;for(var _0x12c580=_0x56a35d>0x1?void 0x0:_0x56a35d?_0x2086ac(_0x3b8e43,_0x6ddc9f):_0x3b8e43,_0x5ac9fc=_0x2b2786[_0x404826(0x25e)]-0x1,_0x4aaf8c;_0x5ac9fc>=0x0;_0x5ac9fc--)(_0x4aaf8c=_0x2b2786[_0x5ac9fc])&&(_0x12c580=_0x4aaf8c(_0x12c580)||_0x12c580);return _0x12c580;},_0x18b178=(_0x13f69d,_0x2a2906)=>(_0x1e3ba9,_0x34587e)=>_0x2a2906(_0x1e3ba9,_0x34587e,_0x13f69d);let _0x40513c=class extends _0x53ea67[_0x8d8e3d(0x25b)]{constructor(_0xa12e6b,_0x2ea3f0,_0x56d5c2,_0x4ab0fd){const _0x347ba5=_0x8d8e3d;super(),this['_commentService']=_0xa12e6b,this[_0x347ba5(0x1f5)]=_0x2ea3f0,this[_0x347ba5(0x203)]=_0x56d5c2,this[_0x347ba5(0x225)]=_0x4ab0fd,this[_0x347ba5(0x222)](),this[_0x347ba5(0x24b)]();}[_0x8d8e3d(0x24b)](){const _0x1ad9a3=_0x8d8e3d;this[_0x1ad9a3(0x259)](this[_0x1ad9a3(0x1f5)][_0x1ad9a3(0x1e2)][_0x1ad9a3(0x202)](_0x3107a4[_0x1ad9a3(0x204)](0x10))[_0x1ad9a3(0x1f4)](_0xfe9991=>{const _0x20d8c9=_0x1ad9a3,_0x228835=new Set();_0xfe9991[_0x20d8c9(0x25d)](_0x4a0391=>{const _0x5cf748=_0x20d8c9;switch(_0x4a0391[_0x5cf748(0x23d)]){case _0x5cf748(0x226):{const _0x55dcc5=_0x4a0391['payload'][_0x5cf748(0x1e5)];_0x228835[_0x5cf748(0x226)](_0x55dcc5);break;}}}),_0x4a4ee9(this[_0x20d8c9(0x225)],_0x228835);}));}[_0x8d8e3d(0x222)](){const _0x354d97=_0x8d8e3d;this[_0x354d97(0x259)](this['_commentService'][_0x354d97(0x1e2)][_0x354d97(0x1f4)](async _0x3d73ee=>{const _0xea572b=_0x354d97;var _0x513ad1,_0x2420be,_0x581dd4,_0x362012;const _0x293775=(_0x513ad1=this['_threadCommentModel'][_0xea572b(0x1e1)](_0x3d73ee['unitId'])['find'](_0xb4229d=>_0xb4229d['threadId']===_0x3d73ee[_0xea572b(0x212)]))==null?void 0x0:_0x513ad1[_0xea572b(0x20b)];if(!_0x293775)return;const {unitId:_0x4d1554,subUnitId:_0x108128}=_0x293775;switch(_0x3d73ee['user']&&this['_userService'][_0xea572b(0x248)](_0x3d73ee['user']),_0x3d73ee[_0xea572b(0x23d)]){case _0x2d65d6[_0xea572b(0x25a)]:break;case _0x2d65d6[_0xea572b(0x220)]:{this[_0xea572b(0x1f5)][_0xea572b(0x24f)](_0x4d1554,_0x108128,{'unitId':_0x4d1554,'subUnitId':_0x108128,'ref':'','id':_0x3d73ee[_0xea572b(0x224)],'dT':_0x45ccb4(+_0x3d73ee[_0xea572b(0x21e)]),'threadId':_0x3d73ee[_0xea572b(0x212)],'personId':(_0x581dd4=(_0x2420be=_0x3d73ee[_0xea572b(0x1fc)])==null?void 0x0:_0x2420be[_0xea572b(0x206)])!=null?_0x581dd4:_0x3d73ee[_0xea572b(0x20c)],'text':JSON[_0xea572b(0x217)](_0x3d73ee['content']),'parentId':_0x293775['id']});break;}case _0x2d65d6['Delete']:{const _0x43cda5=this[_0xea572b(0x1f5)][_0xea572b(0x238)](_0x4d1554,_0x108128,_0x3d73ee[_0xea572b(0x224)]);_0x43cda5&&_0x43cda5[_0xea572b(0x1e7)]&&this[_0xea572b(0x1f5)][_0xea572b(0x20a)](_0x4d1554,_0x108128,_0x3d73ee['replyId']);break;}case _0x2d65d6[_0xea572b(0x228)]:{this['_threadCommentModel'][_0xea572b(0x1ef)](_0x4d1554,_0x108128,{'commentId':_0x3d73ee[_0xea572b(0x224)],'text':JSON[_0xea572b(0x217)](_0x3d73ee['content'])});break;}case _0x2d65d6['Solve']:{const _0x30e102=(_0x362012=this[_0xea572b(0x1f5)][_0xea572b(0x1e1)](_0x3d73ee['unitId'])[_0xea572b(0x231)](_0x2b29f1=>_0x2b29f1['threadId']===_0x3d73ee[_0xea572b(0x212)]))==null?void 0x0:_0x362012[_0xea572b(0x20b)];_0x30e102&&this[_0xea572b(0x1f5)][_0xea572b(0x22d)](_0x4d1554,_0x108128,_0x30e102['id'],_0x3d73ee[_0xea572b(0x263)]===_0x5a5666[_0xea572b(0x261)]);break;}}}));}};_0x40513c=_0x1a23da([_0x18b178(0x0,_0x53ea67[_0x8d8e3d(0x235)](_0x2ed30a['CommentService'])),_0x18b178(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x4d3a93['ThreadCommentModel'])),_0x18b178(0x2,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x23f)])),_0x18b178(0x3,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x22b)]))],_0x40513c);const _0x269bef=_0x8d8e3d(0x1ff),_0x4f14c7={};var _0x2d560b=Object[_0x8d8e3d(0x207)],_0xa7fee2=(_0x678999,_0x3c8462,_0x5a7df7,_0x16df7e)=>{const _0x2d5b38=_0x8d8e3d;for(var _0x288621=_0x16df7e>0x1?void 0x0:_0x16df7e?_0x2d560b(_0x3c8462,_0x5a7df7):_0x3c8462,_0x895872=_0x678999[_0x2d5b38(0x25e)]-0x1,_0x3bf4de;_0x895872>=0x0;_0x895872--)(_0x3bf4de=_0x678999[_0x895872])&&(_0x288621=_0x3bf4de(_0x288621)||_0x288621);return _0x288621;},_0x489a18=(_0x3009f3,_0x4fd032)=>(_0x12e650,_0x23e3e0)=>_0x4fd032(_0x12e650,_0x23e3e0,_0x3009f3);function _0xa66f79(_0x208436,_0x3f445e){const _0x45cc2c=_0x8d8e3d,_0x5bb00b=_0x208436[_0x45cc2c(0x264)][0x0];return{..._0x3f445e,'id':_0x5bb00b[_0x45cc2c(0x224)],'resolved':_0x208436[_0x45cc2c(0x263)]===0x1,'dT':_0x45ccb4(_0x5bb00b['createTimestamp']),'personId':_0x5bb00b[_0x45cc2c(0x20c)],'threadId':_0x5bb00b[_0x45cc2c(0x212)]};}function _0x1deb81(_0x284ffc,_0x19eb47,_0x2513cb){const _0x3fd048=_0x8d8e3d;var _0x3137c4,_0x5e8511;if(((_0x5e8511=(_0x3137c4=_0x284ffc==null?void 0x0:_0x284ffc[_0x3fd048(0x264)])==null?void 0x0:_0x3137c4[_0x3fd048(0x25e)])!=null?_0x5e8511:0x0)>0x0){const _0x2ef2f4=(_0x2deb92,_0x40fddf)=>({'id':_0x2deb92[_0x3fd048(0x224)],'threadId':_0x2deb92[_0x3fd048(0x212)],'dT':_0x45ccb4(_0x2deb92[_0x3fd048(0x21e)]),'personId':_0x2deb92[_0x3fd048(0x20c)],'resolved':_0x284ffc[_0x3fd048(0x263)]===_0x5a5666[_0x3fd048(0x261)],'unitId':_0x19eb47,'subUnitId':_0x2513cb,'text':JSON[_0x3fd048(0x217)](_0x2deb92[_0x3fd048(0x250)]),'parentId':_0x40fddf}),_0x4dc30c=_0x2ef2f4(_0x284ffc[_0x3fd048(0x264)][0x0]);return{..._0x4dc30c,'children':_0x284ffc[_0x3fd048(0x264)][_0x3fd048(0x236)](0x1)[_0x3fd048(0x260)](_0x1e6c55=>_0x2ef2f4(_0x1e6c55,_0x4dc30c['id']))};}return null;}let _0x309cac=class{constructor(_0x20b2e4,_0x39c8f9,_0x27ccc8,_0x8774c4){const _0x36b956=_0x8d8e3d;this['_httpService']=_0x20b2e4,this[_0x36b956(0x203)]=_0x39c8f9,this[_0x36b956(0x21a)]=_0x27ccc8,this[_0x36b956(0x225)]=_0x8774c4;}async[_0x8d8e3d(0x24f)](_0x536a37){const _0x871a3a=_0x8d8e3d;var _0x1dd18e,_0x50e4b8;const {parentId:_0x5aec9c,unitId:_0x102a3f,text:_0x54485b,threadId:_0x3738b7}=_0x536a37,_0x104b8c=(_0x50e4b8=(_0x1dd18e=_0x54485b[_0x871a3a(0x245)])==null?void 0x0:_0x1dd18e['filter'](_0x5ed00e=>_0x5ed00e[_0x871a3a(0x255)]===_0x53ea67[_0x871a3a(0x21c)][_0x871a3a(0x22c)])[_0x871a3a(0x260)](_0x479efd=>_0x479efd[_0x871a3a(0x1f6)]))!=null?_0x50e4b8:[],_0x518544=JSON[_0x871a3a(0x234)](_0x54485b),_0x2c0255=(await this[_0x871a3a(0x21a)][_0x871a3a(0x201)](_0x102a3f))[_0x871a3a(0x223)]();if(_0x5aec9c){const _0x34094c={'memberId':_0x2c0255,'unitId':_0x102a3f,'content':_0x518544,'mention':_0x104b8c,'threadId':_0x3738b7},_0x418e65=(await this[_0x871a3a(0x26b)][_0x871a3a(0x254)]('/universer-api/comment/unit/'+_0x102a3f+_0x871a3a(0x208),{'body':_0x34094c}))['body'][_0x871a3a(0x256)];return{..._0x536a37,'id':_0x418e65[_0x871a3a(0x224)],'dT':_0x53ea67[_0x871a3a(0x1f9)](+_0x418e65['createTimestamp'])['format'](_0x871a3a(0x1e0)),'personId':_0x418e65[_0x871a3a(0x20c)]};}else{const _0x1134d9={'memberId':_0x2c0255,'unitId':_0x102a3f,'content':_0x518544,'mention':_0x104b8c},_0x4cbe3d=await this[_0x871a3a(0x26b)][_0x871a3a(0x254)](_0x871a3a(0x1eb)+_0x102a3f+_0x871a3a(0x24e),{'body':_0x1134d9});return _0xa66f79(_0x4cbe3d[_0x871a3a(0x227)][_0x871a3a(0x1fb)],_0x536a37);}}async[_0x8d8e3d(0x1ef)](_0x33e6a1){const _0x197984=_0x8d8e3d;var _0xd58beb,_0x142023;const {text:_0x4e8a20,unitId:_0x1e9337}=_0x33e6a1,_0x2728fa=(_0x142023=(_0xd58beb=_0x4e8a20['customRanges'])==null?void 0x0:_0xd58beb['filter'](_0x3306aa=>_0x3306aa[_0x197984(0x255)]===_0x53ea67[_0x197984(0x21c)]['COMMENT'])[_0x197984(0x260)](_0x1a46e9=>_0x1a46e9[_0x197984(0x1f6)]))!=null?_0x142023:[],_0x1f869b=JSON[_0x197984(0x234)](_0x4e8a20),_0x2e75e1=_0x33e6a1[_0x197984(0x212)],_0x15d194=_0x33e6a1['id'],_0x460dd6={'memberId':(await this[_0x197984(0x21a)][_0x197984(0x201)](_0x1e9337))[_0x197984(0x223)](),'unitId':_0x1e9337,'threadId':_0x2e75e1,'mention':_0x2728fa,'content':_0x1f869b,'replyId':_0x15d194},_0x2a5f81=await this['_httpService'][_0x197984(0x254)](_0x197984(0x1eb)+_0x1e9337+_0x197984(0x200),{'body':_0x460dd6});return!_0x2a5f81[_0x197984(0x227)]['error']||_0x2a5f81[_0x197984(0x227)][_0x197984(0x214)][_0x197984(0x1f0)]===0x1;}async[_0x8d8e3d(0x22d)](_0x483376){const _0x173fac=_0x8d8e3d,{unitId:_0x3dbb49}=_0x483376,_0x11d1ba=_0x483376[_0x173fac(0x212)],_0x56535e={'memberId':this[_0x173fac(0x203)]['getCurrentUser']()[_0x173fac(0x206)],'unitId':_0x3dbb49,'threadId':_0x11d1ba,'solved':_0x483376[_0x173fac(0x210)]?_0x5a5666['Solved']:_0x5a5666[_0x173fac(0x24d)]},_0x321d57=await this[_0x173fac(0x26b)][_0x173fac(0x254)](_0x173fac(0x1eb)+_0x3dbb49+_0x173fac(0x1f7),{'body':_0x56535e});return!_0x321d57[_0x173fac(0x227)]['error']||_0x321d57[_0x173fac(0x227)]['error'][_0x173fac(0x1f0)]===0x1;}async[_0x8d8e3d(0x20a)](_0x59b818,_0x1e73fe,_0x346667,_0x32ee47){const _0x5b3e84=_0x8d8e3d,_0x27cb76={'memberId':(await this['_sessionService']['requireSession'](_0x59b818))['getMemberID'](),'threadId':_0x346667,'replyId':_0x32ee47,'unitId':_0x59b818},_0x4ed956=await this[_0x5b3e84(0x26b)][_0x5b3e84(0x254)](_0x5b3e84(0x1eb)+_0x59b818+'/delete',{'body':_0x27cb76});return!_0x4ed956[_0x5b3e84(0x227)][_0x5b3e84(0x214)]||_0x4ed956['body'][_0x5b3e84(0x214)]['code']===0x1;}async[_0x8d8e3d(0x269)](_0x39fdc2,_0x2289b5,_0x30db5d){const _0x699f1f=_0x8d8e3d,_0x569ee4={'unitId':_0x39fdc2,'threadId':_0x30db5d},_0x5f49ae=await this[_0x699f1f(0x26b)][_0x699f1f(0x254)]('/universer-api/comment/unit/'+_0x39fdc2+_0x699f1f(0x1ec),{'body':_0x569ee4}),_0x222862=_0x30db5d['map'](_0x25925e=>_0x1deb81(_0x5f49ae[_0x699f1f(0x227)][_0x699f1f(0x215)][_0x25925e],_0x39fdc2,_0x2289b5))[_0x699f1f(0x25f)](Boolean);return Object[_0x699f1f(0x1e4)](_0x5f49ae[_0x699f1f(0x227)][_0x699f1f(0x22a)])[_0x699f1f(0x25d)](_0x4225e8=>{const _0x4ca643=_0x699f1f;this[_0x4ca643(0x203)][_0x4ca643(0x248)](_0x4225e8);}),_0x222862;}[_0x8d8e3d(0x211)](_0x4c5b61){const _0x2d854c=_0x8d8e3d;return{'id':_0x4c5b61['id'],'threadId':_0x4c5b61[_0x2d854c(0x212)],'ref':_0x4c5b61[_0x2d854c(0x20e)]};}};_0x309cac=_0xa7fee2([_0x489a18(0x0,_0x53ea67[_0x8d8e3d(0x235)](_0x1e6624[_0x8d8e3d(0x213)])),_0x489a18(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x23f)])),_0x489a18(0x2,_0x53ea67[_0x8d8e3d(0x235)](_0x2ed30a['CollaborationSessionService'])),_0x489a18(0x3,_0x53ea67['Inject'](_0x53ea67[_0x8d8e3d(0x22b)]))],_0x309cac);var _0x5e2c06=Object[_0x8d8e3d(0x207)],_0x2177c4=(_0xfbb8b8,_0x3f5db0,_0x30b707,_0x225dcb)=>{const _0x40ba87=_0x8d8e3d;for(var _0x56f477=_0x225dcb>0x1?void 0x0:_0x225dcb?_0x5e2c06(_0x3f5db0,_0x30b707):_0x3f5db0,_0x48f39a=_0xfbb8b8[_0x40ba87(0x25e)]-0x1,_0x505a64;_0x48f39a>=0x0;_0x48f39a--)(_0x505a64=_0xfbb8b8[_0x48f39a])&&(_0x56f477=_0x505a64(_0x56f477)||_0x56f477);return _0x56f477;},_0xe4d41f=(_0x221f06,_0x26e419)=>(_0x18aeec,_0x5db64a)=>_0x26e419(_0x18aeec,_0x5db64a,_0x221f06);let _0x2219be=class extends _0x53ea67[_0x8d8e3d(0x25b)]{constructor(_0x515812,_0xe87665){const _0x531c26=_0x8d8e3d;super(),this[_0x531c26(0x1ee)]=_0x515812,this[_0x531c26(0x249)]=_0xe87665,this[_0x531c26(0x243)]();}[_0x8d8e3d(0x243)](){const _0x4973dc=_0x8d8e3d;this[_0x4973dc(0x1ee)][_0x4973dc(0x258)]=this['_threadCommentDataSource'],this[_0x4973dc(0x1ee)][_0x4973dc(0x1ed)]=!0x1;}};_0x2219be=_0x2177c4([_0xe4d41f(0x0,_0x4d3a93[_0x8d8e3d(0x267)]),_0xe4d41f(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x309cac))],_0x2219be);var _0x9be933=Object['defineProperty'],_0xdbe7bc=Object[_0x8d8e3d(0x207)],_0x3f13c1=(_0x4dcf6e,_0x424319,_0x8dd5ce)=>_0x424319 in _0x4dcf6e?_0x9be933(_0x4dcf6e,_0x424319,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8dd5ce}):_0x4dcf6e[_0x424319]=_0x8dd5ce,_0x817ce2=(_0x3db1e6,_0x220de8,_0x2ab4df,_0x4898b5)=>{const _0x58190a=_0x8d8e3d;for(var _0x44df17=_0x4898b5>0x1?void 0x0:_0x4898b5?_0xdbe7bc(_0x220de8,_0x2ab4df):_0x220de8,_0x607ecc=_0x3db1e6[_0x58190a(0x25e)]-0x1,_0x43b042;_0x607ecc>=0x0;_0x607ecc--)(_0x43b042=_0x3db1e6[_0x607ecc])&&(_0x44df17=_0x43b042(_0x44df17)||_0x44df17);return _0x44df17;},_0x20b68c=(_0x310fb6,_0xd74139)=>(_0x3dbd7c,_0x5f2054)=>_0xd74139(_0x3dbd7c,_0x5f2054,_0x310fb6),_0x1dc1a9=(_0x4981dc,_0x58444f,_0x16732f)=>_0x3f13c1(_0x4981dc,typeof _0x58444f!=_0x8d8e3d(0x242)?_0x58444f+'':_0x58444f,_0x16732f);_0x196c1b[_0x8d8e3d(0x24a)]=class extends _0x53ea67[_0x8d8e3d(0x239)]{constructor(_0x511919=_0x4f14c7,_0x5ece5a,_0x2bc700){const _0x1a1526=_0x8d8e3d;super(),this[_0x1a1526(0x1f1)]=_0x511919,this[_0x1a1526(0x225)]=_0x5ece5a,this[_0x1a1526(0x23b)]=_0x2bc700;const {..._0x5d10a7}=_0x53ea67[_0x1a1526(0x1e9)]({},_0x4f14c7,this[_0x1a1526(0x1f1)]);this[_0x1a1526(0x23b)][_0x1a1526(0x20f)](_0x269bef,_0x5d10a7);}[_0x8d8e3d(0x23a)](){const _0x54ac1b=_0x8d8e3d;[[_0x309cac],[_0x2219be],[_0x40513c]][_0x54ac1b(0x25d)](_0x309e3a=>{const _0x29ba6a=_0x54ac1b;this[_0x29ba6a(0x225)][_0x29ba6a(0x226)](_0x309e3a);});}[_0x8d8e3d(0x1e8)](){const _0x500209=_0x8d8e3d;this[_0x500209(0x225)][_0x500209(0x265)](_0x2219be),this[_0x500209(0x225)][_0x500209(0x265)](_0x40513c);}},_0x1dc1a9(_0x196c1b[_0x8d8e3d(0x24a)],_0x8d8e3d(0x257),_0x35b4e4),_0x1dc1a9(_0x196c1b['UniverThreadCommentDataSourcePlugin'],'type',_0x53ea67[_0x8d8e3d(0x21b)][_0x8d8e3d(0x1fe)]),_0x196c1b[_0x8d8e3d(0x24a)]=_0x817ce2([_0x53ea67[_0x8d8e3d(0x22e)](_0x32dfc5['UniverThreadCommentUIPlugin'],_0x2ed30a[_0x8d8e3d(0x241)],_0x4644ff[_0x8d8e3d(0x25c)]),_0x20b68c(0x1,_0x53ea67['Inject'](_0x53ea67[_0x8d8e3d(0x22b)])),_0x20b68c(0x2,_0x53ea67['IConfigService'])],_0x196c1b[_0x8d8e3d(0x24a)]),Object['defineProperty'](_0x196c1b,Symbol[_0x8d8e3d(0x219)],{'value':_0x8d8e3d(0x21f)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.7-nightly.202504011606",
3
+ "version": "0.6.8",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.7-nightly.202504011606",
49
- "@univerjs-pro/license": "0.6.7-nightly.202504011606",
50
- "@univerjs/core": "0.6.7-nightly.202504011606",
51
- "@univerjs/network": "0.6.7-nightly.202504011606",
48
+ "@univerjs-pro/license": "0.6.8",
49
+ "@univerjs-pro/collaboration-client": "0.6.8",
50
+ "@univerjs/core": "0.6.8",
52
51
  "@univerjs/protocol": "0.1.45",
53
- "@univerjs/thread-comment-ui": "0.6.7-nightly.202504011606",
54
- "@univerjs/thread-comment": "0.6.7-nightly.202504011606"
52
+ "@univerjs/network": "0.6.8",
53
+ "@univerjs/thread-comment-ui": "0.6.8",
54
+ "@univerjs/thread-comment": "0.6.8"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
59
  "vite": "^6.2.2",
60
60
  "vitest": "^3.0.9",
61
- "@univerjs-infra/shared": "0.6.7"
61
+ "@univerjs-infra/shared": "0.6.8"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",