@univerjs-pro/thread-comment-datasource 0.12.4-experimental.20251208-c4b8a44 → 0.12.4-experimental.20251210-d708bff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x278ed8=_0x1016;(function(_0x3ecf74,_0x181f01){const _0x146c8e=_0x1016,_0x4425ea=_0x3ecf74();while(!![]){try{const _0x111309=-parseInt(_0x146c8e(0x157))/0x1*(parseInt(_0x146c8e(0x1a8))/0x2)+-parseInt(_0x146c8e(0x180))/0x3+-parseInt(_0x146c8e(0x152))/0x4+parseInt(_0x146c8e(0x1a0))/0x5*(parseInt(_0x146c8e(0x146))/0x6)+-parseInt(_0x146c8e(0x173))/0x7+parseInt(_0x146c8e(0x17c))/0x8*(-parseInt(_0x146c8e(0x140))/0x9)+parseInt(_0x146c8e(0x14d))/0xa;if(_0x111309===_0x181f01)break;else _0x4425ea['push'](_0x4425ea['shift']());}catch(_0x420a2b){_0x4425ea['push'](_0x4425ea['shift']());}}}(_0x44de,0x4409c));Object[_0x278ed8(0x12e)](exports,Symbol[_0x278ed8(0x135)],{'value':_0x278ed8(0x186)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x278ed8(0x16e);var I=(_0x2df397=>(_0x2df397[_0x2df397[_0x278ed8(0x137)]=0x0]=_0x278ed8(0x137),_0x2df397[_0x2df397['Solved']=0x1]=_0x278ed8(0x159),_0x2df397[_0x2df397[_0x278ed8(0x181)]=-0x1]='UNRECOGNIZED',_0x2df397))(I||{}),v=(_0x2d6fd2=>(_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x142)]=0x0]=_0x278ed8(0x142),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x13f)]=0x1]=_0x278ed8(0x13f),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x199)]=0x2]=_0x278ed8(0x199),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x19c)]=0x3]=_0x278ed8(0x19c),_0x2d6fd2[_0x2d6fd2['Delete']=0x4]=_0x278ed8(0x138),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x15a)]=0x5]=_0x278ed8(0x15a),_0x2d6fd2[_0x2d6fd2['UNRECOGNIZED']=-0x1]=_0x278ed8(0x181),_0x2d6fd2))(v||{});function _0x44de(){const _0x288a59=['ref','_init','bufferTime','rangeId','deleteComment','unitId','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','_initDataSource','comments','threadId','2306367wvmLUB','/reply','replyId','getCurrentUser','getComment','pipe','requireSession','merge','stringify','2992UYhuXW','rangeType','CollaborationSessionService','/solved','1636281QiuDPH','UNRECOGNIZED','payload','saveCommentToSnapshot','customRanges','parse','Module','resolveComment','_configService','add','onReady','root','UniverCollaborationClientPlugin','_commentService','_injector','_config','type','UserManagerService','UniverThreadCommentUIPlugin','content','/edit','map','listComments','format','_threadCommentDataSourceService','Reply','Disposable','onStarting','Edit','dataSource','forEach','getOwnPropertyDescriptor','1135SDGuWF','addUser','commentUpdate$','_sessionService','/add','Injector','body','CommentService','910zVzhGa','/delete','Inject','get','reply','code','defineProperty','HTTPService','Plugin','getUnit','disposeWithMe','UniverThreadCommentDataSourcePlugin','dayjs','toStringTag','/universer-api/user/list','OpenOrReOpen','Delete','getMemberID','createTimestamp','COMMENT','delete','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Add','1881wkxCDG','IConfigService','Unknown','IThreadCommentDataSourceService','thread-comment-data-source.config','CustomRangeType','3570aImVTZ','UniverLicensePlugin','_threadCommentDataSource','subscribe','find','solved','length','13970100bhkfgN','addComment','size','updateComment','_httpService','78328WGIdUt','parentId','comment','replies','personId','617DyVxtr','ThreadCommentModel','Solved','Solve','user','error','syncUpdateMutationToColla','_initUserSync','userId','post','_userService','filter','userID','users','UniverInstanceType','/universer-api/comment/unit/'];_0x44de=function(){return _0x288a59;};return _0x44de();}const f=_0x3c1cc6=>c['dayjs'](new Date(+_0x3c1cc6))['format'](_0x278ed8(0x13d)),R=async(_0x5f35a6,_0xb2d4f8)=>{const _0x46c47b=_0x278ed8,_0x9f9f67=_0x5f35a6[_0x46c47b(0x12b)](c['UserManagerService']),_0x36db87=_0x5f35a6[_0x46c47b(0x12b)](P['HTTPService']);_0xb2d4f8[_0x46c47b(0x19e)](_0x48b1f0=>{const _0x3db998=_0x46c47b;_0x9f9f67[_0x3db998(0x16d)](_0x48b1f0)&&_0xb2d4f8[_0x3db998(0x13c)](_0x48b1f0);}),_0xb2d4f8[_0x46c47b(0x14f)]&&(await _0x36db87['get'](_0x46c47b(0x136),{'params':{'userIDs':[..._0xb2d4f8]}}))[_0x46c47b(0x1a6)][_0x46c47b(0x164)][_0x46c47b(0x19e)](_0x30e80=>{const _0x2d98f7=_0x46c47b;_0x30e80&&_0x9f9f67[_0x2d98f7(0x1a1)](_0x30e80);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3bcdea,_0x55c76a,_0x48910d,_0x234ce8)=>{const _0x1e8f44=_0x278ed8;for(var _0x25d13b=_0x234ce8>0x1?void 0x0:_0x234ce8?$(_0x55c76a,_0x48910d):_0x55c76a,_0x39d736=_0x3bcdea[_0x1e8f44(0x14c)]-0x1,_0xb756fd;_0x39d736>=0x0;_0x39d736--)(_0xb756fd=_0x3bcdea[_0x39d736])&&(_0x25d13b=_0xb756fd(_0x25d13b)||_0x25d13b);return _0x25d13b;},S=(_0xa64a9b,_0x25162f)=>(_0xbf014b,_0x4bfc3d)=>_0x25162f(_0xbf014b,_0x4bfc3d,_0xa64a9b);let _=class extends c[_0x278ed8(0x19a)]{constructor(_0x2ee0ed,_0x2eb936,_0x5a4199,_0x5a100b){const _0x58e029=_0x278ed8;super(),this[_0x58e029(0x18d)]=_0x2ee0ed,this[_0x58e029(0x13e)]=_0x2eb936,this[_0x58e029(0x161)]=_0x5a4199,this['_injector']=_0x5a100b,this[_0x58e029(0x168)](),this[_0x58e029(0x15e)]();}[_0x278ed8(0x15e)](){const _0x61fc44=_0x278ed8;this[_0x61fc44(0x132)](this[_0x61fc44(0x13e)][_0x61fc44(0x1a2)][_0x61fc44(0x178)](j[_0x61fc44(0x169)](0x10))[_0x61fc44(0x149)](_0x48cd76=>{const _0x11cd64=_0x61fc44,_0x19e633=new Set();_0x48cd76[_0x11cd64(0x19e)](_0x4f779f=>{const _0xf5768b=_0x11cd64;switch(_0x4f779f[_0xf5768b(0x190)]){case _0xf5768b(0x189):{const _0x2db6e1=_0x4f779f[_0xf5768b(0x182)][_0xf5768b(0x156)];_0x19e633[_0xf5768b(0x189)](_0x2db6e1);break;}}}),R(this[_0x11cd64(0x18e)],_0x19e633);}));}[_0x278ed8(0x168)](){const _0xb571e0=_0x278ed8;this[_0xb571e0(0x132)](this[_0xb571e0(0x18d)][_0xb571e0(0x1a2)][_0xb571e0(0x149)](async _0x53d7a7=>{const _0x95cea0=_0xb571e0;var _0x3b376f,_0x296cb8,_0x21c2d3,_0x31a0fd;const _0x28432c=(_0x3b376f=this[_0x95cea0(0x13e)]['getUnit'](_0x53d7a7[_0x95cea0(0x16c)])[_0x95cea0(0x14a)](_0x9e19af=>_0x9e19af['threadId']===_0x53d7a7['threadId']))==null?void 0x0:_0x3b376f[_0x95cea0(0x18b)];if(!_0x28432c)return;const {unitId:_0x365248,subUnitId:_0x9f4d75}=_0x28432c;switch(_0x53d7a7[_0x95cea0(0x15b)]&&this[_0x95cea0(0x161)][_0x95cea0(0x1a1)](_0x53d7a7[_0x95cea0(0x15b)]),_0x53d7a7['type']){case v[_0x95cea0(0x13f)]:break;case v['Reply']:{this['_threadCommentModel'][_0x95cea0(0x14e)](_0x365248,_0x9f4d75,{'unitId':_0x365248,'subUnitId':_0x9f4d75,'ref':'','id':_0x53d7a7[_0x95cea0(0x175)],'dT':f(+_0x53d7a7[_0x95cea0(0x13a)]),'threadId':_0x53d7a7[_0x95cea0(0x172)],'personId':(_0x21c2d3=(_0x296cb8=_0x53d7a7[_0x95cea0(0x15b)])==null?void 0x0:_0x296cb8['userID'])!=null?_0x21c2d3:_0x53d7a7[_0x95cea0(0x15f)],'text':JSON[_0x95cea0(0x185)](_0x53d7a7['content']),'parentId':_0x28432c['id']});break;}case v[_0x95cea0(0x138)]:{const _0x1fd558=this[_0x95cea0(0x13e)][_0x95cea0(0x177)](_0x365248,_0x9f4d75,_0x53d7a7[_0x95cea0(0x175)]);_0x1fd558&&_0x1fd558[_0x95cea0(0x153)]&&this[_0x95cea0(0x13e)]['deleteComment'](_0x365248,_0x9f4d75,_0x53d7a7[_0x95cea0(0x175)]);break;}case v[_0x95cea0(0x19c)]:{this[_0x95cea0(0x13e)][_0x95cea0(0x150)](_0x365248,_0x9f4d75,{'commentId':_0x53d7a7[_0x95cea0(0x175)],'text':JSON['parse'](_0x53d7a7[_0x95cea0(0x193)])});break;}case v[_0x95cea0(0x15a)]:{const _0x526efa=(_0x31a0fd=this[_0x95cea0(0x13e)][_0x95cea0(0x131)](_0x53d7a7['unitId'])[_0x95cea0(0x14a)](_0x42761b=>_0x42761b[_0x95cea0(0x172)]===_0x53d7a7[_0x95cea0(0x172)]))==null?void 0x0:_0x31a0fd[_0x95cea0(0x18b)];_0x526efa&&this['_threadCommentModel'][_0x95cea0(0x187)](_0x365248,_0x9f4d75,_0x526efa['id'],_0x53d7a7[_0x95cea0(0x14b)]===I[_0x95cea0(0x159)]);break;}}}));}};_=E([S(0x0,c[_0x278ed8(0x12a)](b[_0x278ed8(0x1a7)])),S(0x1,c[_0x278ed8(0x12a)](M[_0x278ed8(0x158)])),S(0x2,c[_0x278ed8(0x12a)](c[_0x278ed8(0x191)])),S(0x3,c['Inject'](c[_0x278ed8(0x1a5)]))],_);const q=_0x278ed8(0x144),D={};var A=Object[_0x278ed8(0x19f)],x=(_0x4f24ee,_0x56132b,_0x4bbd9b,_0x4e5507)=>{const _0x1d62e7=_0x278ed8;for(var _0x43fcf1=_0x4e5507>0x1?void 0x0:_0x4e5507?A(_0x56132b,_0x4bbd9b):_0x56132b,_0x1c951d=_0x4f24ee[_0x1d62e7(0x14c)]-0x1,_0x1c8be1;_0x1c951d>=0x0;_0x1c951d--)(_0x1c8be1=_0x4f24ee[_0x1c951d])&&(_0x43fcf1=_0x1c8be1(_0x43fcf1)||_0x43fcf1);return _0x43fcf1;},C=(_0x4d01fe,_0x283bab)=>(_0xc99d1b,_0x109ead)=>_0x283bab(_0xc99d1b,_0x109ead,_0x4d01fe);function _0x1016(_0x37c7e1,_0x32ae33){_0x37c7e1=_0x37c7e1-0x129;const _0x44deec=_0x44de();let _0x1016b3=_0x44deec[_0x37c7e1];return _0x1016b3;}function Y(_0x4a1670,_0x48b24f){const _0x4b3585=_0x278ed8,_0x2406cf=_0x4a1670[_0x4b3585(0x155)][0x0];return{..._0x48b24f,'id':_0x2406cf[_0x4b3585(0x175)],'resolved':_0x4a1670[_0x4b3585(0x14b)]===0x1,'dT':f(_0x2406cf[_0x4b3585(0x13a)]),'personId':_0x2406cf[_0x4b3585(0x15f)],'threadId':_0x2406cf[_0x4b3585(0x172)]};}function G(_0x383867,_0x237c68,_0x5abeb0){const _0x10d534=_0x278ed8;var _0x1fa980,_0x3c4f3c;if(((_0x3c4f3c=(_0x1fa980=_0x383867==null?void 0x0:_0x383867[_0x10d534(0x155)])==null?void 0x0:_0x1fa980[_0x10d534(0x14c)])!=null?_0x3c4f3c:0x0)>0x0){const _0x1fbaea=(_0xfded55,_0x529e67)=>({'id':_0xfded55[_0x10d534(0x175)],'threadId':_0xfded55[_0x10d534(0x172)],'dT':f(_0xfded55[_0x10d534(0x13a)]),'personId':_0xfded55[_0x10d534(0x15f)],'resolved':_0x383867['solved']===I[_0x10d534(0x159)],'unitId':_0x237c68,'subUnitId':_0x5abeb0,'text':JSON['parse'](_0xfded55[_0x10d534(0x193)]),'parentId':_0x529e67}),_0x37b578=_0x1fbaea(_0x383867[_0x10d534(0x155)][0x0]);return{..._0x37b578,'children':_0x383867['replies']['slice'](0x1)[_0x10d534(0x195)](_0x28d095=>_0x1fbaea(_0x28d095,_0x37b578['id']))};}return null;}let p=class{constructor(_0x41112c,_0x587d9f,_0x21f024){const _0x366108=_0x278ed8;this[_0x366108(0x151)]=_0x41112c,this[_0x366108(0x161)]=_0x587d9f,this[_0x366108(0x1a3)]=_0x21f024;}async[_0x278ed8(0x14e)](_0x36d285){const _0xa756f=_0x278ed8;var _0x2716e1,_0x2c556f;const {parentId:_0xc2631a,unitId:_0xa81247,text:_0x19a670,threadId:_0x90613a}=_0x36d285,_0x54e9c0=(_0x2c556f=(_0x2716e1=_0x19a670[_0xa756f(0x184)])==null?void 0x0:_0x2716e1[_0xa756f(0x162)](_0x195b25=>_0x195b25[_0xa756f(0x17d)]===c['CustomRangeType']['COMMENT'])[_0xa756f(0x195)](_0x3cd1e0=>_0x3cd1e0['rangeId']))!=null?_0x2c556f:[],_0x172d5d=JSON[_0xa756f(0x17b)](_0x19a670),_0x444e11=(await this[_0xa756f(0x1a3)][_0xa756f(0x179)](_0xa81247))[_0xa756f(0x139)]();if(_0xc2631a){const _0x147b47={'memberId':_0x444e11,'unitId':_0xa81247,'content':_0x172d5d,'mention':_0x54e9c0,'threadId':_0x90613a},_0x447659=(await this['_httpService'][_0xa756f(0x160)](_0xa756f(0x166)+_0xa81247+_0xa756f(0x174),{'body':_0x147b47}))[_0xa756f(0x1a6)][_0xa756f(0x12c)];return{..._0x36d285,'id':_0x447659[_0xa756f(0x175)],'dT':c[_0xa756f(0x134)](+_0x447659[_0xa756f(0x13a)])[_0xa756f(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x447659[_0xa756f(0x15f)]};}else{const _0x433ab1={'memberId':_0x444e11,'unitId':_0xa81247,'content':_0x172d5d,'mention':_0x54e9c0},_0x79b4ac=await this[_0xa756f(0x151)][_0xa756f(0x160)](_0xa756f(0x166)+_0xa81247+_0xa756f(0x1a4),{'body':_0x433ab1});return Y(_0x79b4ac['body'][_0xa756f(0x154)],_0x36d285);}}async['updateComment'](_0x301cae){const _0x51e63e=_0x278ed8;var _0x38e322,_0x26431b;const {text:_0x2805d1,unitId:_0x364e56}=_0x301cae,_0x3589f3=(_0x26431b=(_0x38e322=_0x2805d1[_0x51e63e(0x184)])==null?void 0x0:_0x38e322['filter'](_0x3649a1=>_0x3649a1['rangeType']===c[_0x51e63e(0x145)][_0x51e63e(0x13b)])['map'](_0xef4451=>_0xef4451[_0x51e63e(0x16a)]))!=null?_0x26431b:[],_0x147c92=JSON['stringify'](_0x2805d1),_0x177b29=_0x301cae[_0x51e63e(0x172)],_0x2555cf=_0x301cae['id'],_0x2fab02={'memberId':(await this[_0x51e63e(0x1a3)][_0x51e63e(0x179)](_0x364e56))[_0x51e63e(0x139)](),'unitId':_0x364e56,'threadId':_0x177b29,'mention':_0x3589f3,'content':_0x147c92,'replyId':_0x2555cf},_0x529935=await this[_0x51e63e(0x151)][_0x51e63e(0x160)](_0x51e63e(0x166)+_0x364e56+_0x51e63e(0x194),{'body':_0x2fab02});return!_0x529935[_0x51e63e(0x1a6)]['error']||_0x529935[_0x51e63e(0x1a6)][_0x51e63e(0x15c)][_0x51e63e(0x12d)]===0x1;}async[_0x278ed8(0x187)](_0x2de858){const _0xd74a94=_0x278ed8,{unitId:_0x540cbe}=_0x2de858,_0x193cbc=_0x2de858[_0xd74a94(0x172)],_0x313cdc={'memberId':this[_0xd74a94(0x161)][_0xd74a94(0x176)]()[_0xd74a94(0x163)],'unitId':_0x540cbe,'threadId':_0x193cbc,'solved':_0x2de858[_0xd74a94(0x16f)]?I[_0xd74a94(0x159)]:I[_0xd74a94(0x137)]},_0x40813d=await this[_0xd74a94(0x151)][_0xd74a94(0x160)](_0xd74a94(0x166)+_0x540cbe+_0xd74a94(0x17f),{'body':_0x313cdc});return!_0x40813d[_0xd74a94(0x1a6)][_0xd74a94(0x15c)]||_0x40813d['body'][_0xd74a94(0x15c)][_0xd74a94(0x12d)]===0x1;}async[_0x278ed8(0x16b)](_0x201f36,_0x190a9d,_0x5a5f84,_0x5eab5d){const _0x1384dd=_0x278ed8,_0x5edaac={'memberId':(await this[_0x1384dd(0x1a3)][_0x1384dd(0x179)](_0x201f36))['getMemberID'](),'threadId':_0x5a5f84,'replyId':_0x5eab5d,'unitId':_0x201f36},_0xdb314a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x201f36+_0x1384dd(0x129),{'body':_0x5edaac});return!_0xdb314a[_0x1384dd(0x1a6)][_0x1384dd(0x15c)]||_0xdb314a[_0x1384dd(0x1a6)][_0x1384dd(0x15c)][_0x1384dd(0x12d)]===0x1;}async[_0x278ed8(0x196)](_0x3e0d98,_0x190583,_0x2581c5){const _0x177e34=_0x278ed8,_0x26db13={'unitId':_0x3e0d98,'threadId':_0x2581c5},_0x15e01b=await this['_httpService'][_0x177e34(0x160)]('/universer-api/comment/unit/'+_0x3e0d98+'/list',{'body':_0x26db13}),_0x3b0408=_0x2581c5['map'](_0x3a7bea=>G(_0x15e01b['body'][_0x177e34(0x171)][_0x3a7bea],_0x3e0d98,_0x190583))[_0x177e34(0x162)](Boolean);return Object['values'](_0x15e01b[_0x177e34(0x1a6)][_0x177e34(0x164)])['forEach'](_0x6f6b61=>{const _0x4aaa8a=_0x177e34;this[_0x4aaa8a(0x161)][_0x4aaa8a(0x1a1)](_0x6f6b61);}),_0x3b0408;}[_0x278ed8(0x183)](_0x5e1bf3){const _0x15009a=_0x278ed8;return{'id':_0x5e1bf3['id'],'threadId':_0x5e1bf3[_0x15009a(0x172)],'ref':_0x5e1bf3[_0x15009a(0x167)]};}};p=x([C(0x0,c[_0x278ed8(0x12a)](P[_0x278ed8(0x12f)])),C(0x1,c[_0x278ed8(0x12a)](c[_0x278ed8(0x191)])),C(0x2,c[_0x278ed8(0x12a)](b[_0x278ed8(0x17e)]))],p);var H=Object[_0x278ed8(0x19f)],J=(_0x60f551,_0x2cd7a6,_0x3a95db,_0x37e670)=>{for(var _0x3bdb3b=_0x37e670>0x1?void 0x0:_0x37e670?H(_0x2cd7a6,_0x3a95db):_0x2cd7a6,_0x2a37bc=_0x60f551['length']-0x1,_0xd08401;_0x2a37bc>=0x0;_0x2a37bc--)(_0xd08401=_0x60f551[_0x2a37bc])&&(_0x3bdb3b=_0xd08401(_0x3bdb3b)||_0x3bdb3b);return _0x3bdb3b;},y=(_0x4c04be,_0x81ad90)=>(_0xeb7726,_0x4f7d9a)=>_0x81ad90(_0xeb7726,_0x4f7d9a,_0x4c04be);let g=class extends c[_0x278ed8(0x19a)]{constructor(_0x2d0812,_0x326b0d){const _0x548b7f=_0x278ed8;super(),this['_threadCommentDataSourceService']=_0x2d0812,this[_0x548b7f(0x148)]=_0x326b0d,this['_initDataSource']();}[_0x278ed8(0x170)](){const _0x4eb6a8=_0x278ed8;this[_0x4eb6a8(0x198)][_0x4eb6a8(0x19d)]=this[_0x4eb6a8(0x148)],this['_threadCommentDataSourceService'][_0x4eb6a8(0x15d)]=!0x1;}};g=J([y(0x0,M[_0x278ed8(0x143)]),y(0x1,c[_0x278ed8(0x12a)](p))],g);var F=Object['defineProperty'],L=Object[_0x278ed8(0x19f)],Z=(_0x154bba,_0x59702a,_0x490302)=>_0x59702a in _0x154bba?F(_0x154bba,_0x59702a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x490302}):_0x154bba[_0x59702a]=_0x490302,W=(_0x2890ac,_0x3dfa1c,_0x2bb7e3,_0x552c70)=>{const _0xb024a5=_0x278ed8;for(var _0x110d38=_0x552c70>0x1?void 0x0:_0x552c70?L(_0x3dfa1c,_0x2bb7e3):_0x3dfa1c,_0x2ba49e=_0x2890ac[_0xb024a5(0x14c)]-0x1,_0x20d7ff;_0x2ba49e>=0x0;_0x2ba49e--)(_0x20d7ff=_0x2890ac[_0x2ba49e])&&(_0x110d38=_0x20d7ff(_0x110d38)||_0x110d38);return _0x110d38;},O=(_0x5576e3,_0x4f8218)=>(_0x3ce1e9,_0x5332ad)=>_0x4f8218(_0x3ce1e9,_0x5332ad,_0x5576e3),N=(_0x4dbdb1,_0x7131a9,_0xfb32f6)=>Z(_0x4dbdb1,typeof _0x7131a9!='symbol'?_0x7131a9+'':_0x7131a9,_0xfb32f6);exports[_0x278ed8(0x133)]=class extends c[_0x278ed8(0x130)]{constructor(_0x476844=D,_0x406440,_0x1716a9){const _0x38ee53=_0x278ed8;super(),this[_0x38ee53(0x18f)]=_0x476844,this[_0x38ee53(0x18e)]=_0x406440,this[_0x38ee53(0x188)]=_0x1716a9;const {..._0x219258}=c[_0x38ee53(0x17a)]({},D,this[_0x38ee53(0x18f)]);this[_0x38ee53(0x188)]['setConfig'](q,_0x219258);}[_0x278ed8(0x19b)](){const _0x7fae47=_0x278ed8;[[p],[g],[_]][_0x7fae47(0x19e)](_0x52dea5=>{const _0x34e816=_0x7fae47;this[_0x34e816(0x18e)]['add'](_0x52dea5);});}[_0x278ed8(0x18a)](){const _0x125511=_0x278ed8;this[_0x125511(0x18e)][_0x125511(0x12b)](g),this[_0x125511(0x18e)][_0x125511(0x12b)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x278ed8(0x133)],_0x278ed8(0x190),c[_0x278ed8(0x165)]['UNIVER_UNKNOWN']),exports[_0x278ed8(0x133)]=W([c['DependentOn'](w[_0x278ed8(0x192)],b[_0x278ed8(0x18c)],T[_0x278ed8(0x147)]),O(0x1,c['Inject'](c[_0x278ed8(0x1a5)])),O(0x2,c[_0x278ed8(0x141)])],exports[_0x278ed8(0x133)]);
|
|
1
|
+
'use strict';const _0x1888c3=_0x43bd;(function(_0x2ba05b,_0x4bb40b){const _0x3e1b85=_0x43bd,_0x1e4cbd=_0x2ba05b();while(!![]){try{const _0x11a6b7=parseInt(_0x3e1b85(0x115))/0x1*(-parseInt(_0x3e1b85(0xf8))/0x2)+parseInt(_0x3e1b85(0x117))/0x3*(-parseInt(_0x3e1b85(0x14b))/0x4)+parseInt(_0x3e1b85(0x150))/0x5+parseInt(_0x3e1b85(0x111))/0x6*(-parseInt(_0x3e1b85(0x106))/0x7)+-parseInt(_0x3e1b85(0x127))/0x8*(-parseInt(_0x3e1b85(0x167))/0x9)+parseInt(_0x3e1b85(0x118))/0xa*(parseInt(_0x3e1b85(0x124))/0xb)+-parseInt(_0x3e1b85(0x149))/0xc;if(_0x11a6b7===_0x4bb40b)break;else _0x1e4cbd['push'](_0x1e4cbd['shift']());}catch(_0x140c51){_0x1e4cbd['push'](_0x1e4cbd['shift']());}}}(_0x2d3f,0x74d5f));Object[_0x1888c3(0xf6)](exports,Symbol['toStringTag'],{'value':_0x1888c3(0x15d)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1888c3(0x101);var I=(_0x384f36=>(_0x384f36[_0x384f36[_0x1888c3(0x11b)]=0x0]='OpenOrReOpen',_0x384f36[_0x384f36[_0x1888c3(0x158)]=0x1]=_0x1888c3(0x158),_0x384f36[_0x384f36['UNRECOGNIZED']=-0x1]=_0x1888c3(0xf1),_0x384f36))(I||{}),v=(_0x3ef90b=>(_0x3ef90b[_0x3ef90b[_0x1888c3(0x125)]=0x0]=_0x1888c3(0x125),_0x3ef90b[_0x3ef90b[_0x1888c3(0x162)]=0x1]=_0x1888c3(0x162),_0x3ef90b[_0x3ef90b[_0x1888c3(0x15b)]=0x2]='Reply',_0x3ef90b[_0x3ef90b[_0x1888c3(0x12a)]=0x3]=_0x1888c3(0x12a),_0x3ef90b[_0x3ef90b[_0x1888c3(0x10d)]=0x4]='Delete',_0x3ef90b[_0x3ef90b[_0x1888c3(0x143)]=0x5]=_0x1888c3(0x143),_0x3ef90b[_0x3ef90b[_0x1888c3(0xf1)]=-0x1]=_0x1888c3(0xf1),_0x3ef90b))(v||{});const f=_0x47bdcd=>c[_0x1888c3(0x137)](new Date(+_0x47bdcd))['format'](_0x1888c3(0xfc)),R=async(_0x95942,_0x47576a)=>{const _0x393920=_0x1888c3,_0x5d1200=_0x95942[_0x393920(0x142)](c[_0x393920(0x128)]),_0x27b64d=_0x95942[_0x393920(0x142)](P[_0x393920(0x10b)]);_0x47576a[_0x393920(0x140)](_0x16832c=>{const _0x5f50e4=_0x393920;_0x5d1200[_0x5f50e4(0x13e)](_0x16832c)&&_0x47576a[_0x5f50e4(0x14c)](_0x16832c);}),_0x47576a[_0x393920(0x163)]&&(await _0x27b64d[_0x393920(0x142)](_0x393920(0xfb),{'params':{'userIDs':[..._0x47576a]}}))['body']['users'][_0x393920(0x140)](_0x3963ed=>{_0x3963ed&&_0x5d1200['addUser'](_0x3963ed);});};var $=Object[_0x1888c3(0x116)],E=(_0x45ce24,_0x599d5d,_0x38b08a,_0x7dc6a1)=>{const _0x4ac7ff=_0x1888c3;for(var _0x571d9b=_0x7dc6a1>0x1?void 0x0:_0x7dc6a1?$(_0x599d5d,_0x38b08a):_0x599d5d,_0x9c72ae=_0x45ce24[_0x4ac7ff(0x15a)]-0x1,_0x55b343;_0x9c72ae>=0x0;_0x9c72ae--)(_0x55b343=_0x45ce24[_0x9c72ae])&&(_0x571d9b=_0x55b343(_0x571d9b)||_0x571d9b);return _0x571d9b;},S=(_0x27b5dc,_0x2e39cb)=>(_0x1d5108,_0x47b0c9)=>_0x2e39cb(_0x1d5108,_0x47b0c9,_0x27b5dc);let _=class extends c[_0x1888c3(0x152)]{constructor(_0x712adb,_0x404caf,_0x5a7ed5,_0x49cd83){const _0x5c96c1=_0x1888c3;super(),this['_commentService']=_0x712adb,this[_0x5c96c1(0x107)]=_0x404caf,this[_0x5c96c1(0x155)]=_0x5a7ed5,this['_injector']=_0x49cd83,this[_0x5c96c1(0x130)](),this[_0x5c96c1(0x159)]();}['_initUserSync'](){const _0x443a9d=_0x1888c3;this[_0x443a9d(0xf7)](this['_threadCommentModel'][_0x443a9d(0x120)][_0x443a9d(0x138)](j['bufferTime'](0x10))['subscribe'](_0x1af942=>{const _0x4954d7=_0x443a9d,_0x5d9958=new Set();_0x1af942[_0x4954d7(0x140)](_0x2c19a2=>{const _0x1b4eb6=_0x4954d7;switch(_0x2c19a2[_0x1b4eb6(0x121)]){case _0x1b4eb6(0x119):{const _0x2f7f2d=_0x2c19a2[_0x1b4eb6(0x11a)][_0x1b4eb6(0x11f)];_0x5d9958[_0x1b4eb6(0x119)](_0x2f7f2d);break;}}}),R(this['_injector'],_0x5d9958);}));}['_init'](){const _0x3b9995=_0x1888c3;this[_0x3b9995(0xf7)](this[_0x3b9995(0x123)][_0x3b9995(0x120)][_0x3b9995(0xf0)](async _0x644664=>{const _0x16025a=_0x3b9995;var _0x34a0ba,_0xdb0160,_0x346d56,_0x226f33;const _0x57d2cb=(_0x34a0ba=this[_0x16025a(0x107)][_0x16025a(0x133)](_0x644664['unitId'])[_0x16025a(0x160)](_0x5e8efe=>_0x5e8efe[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x34a0ba[_0x16025a(0x144)];if(!_0x57d2cb)return;const {unitId:_0x168825,subUnitId:_0x4e8c45}=_0x57d2cb;switch(_0x644664['user']&&this['_userService']['addUser'](_0x644664['user']),_0x644664['type']){case v[_0x16025a(0x162)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x168825,_0x4e8c45,{'unitId':_0x168825,'subUnitId':_0x4e8c45,'ref':'','id':_0x644664[_0x16025a(0x164)],'dT':f(+_0x644664['createTimestamp']),'threadId':_0x644664[_0x16025a(0xfe)],'personId':(_0x346d56=(_0xdb0160=_0x644664[_0x16025a(0x13f)])==null?void 0x0:_0xdb0160[_0x16025a(0x161)])!=null?_0x346d56:_0x644664[_0x16025a(0x153)],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)]),'parentId':_0x57d2cb['id']});break;}case v[_0x16025a(0x10d)]:{const _0x57a1df=this[_0x16025a(0x107)][_0x16025a(0x139)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);_0x57a1df&&_0x57a1df[_0x16025a(0x10e)]&&this[_0x16025a(0x107)][_0x16025a(0x15e)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);break;}case v[_0x16025a(0x12a)]:{this[_0x16025a(0x107)][_0x16025a(0xfa)](_0x168825,_0x4e8c45,{'commentId':_0x644664['replyId'],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)])});break;}case v[_0x16025a(0x143)]:{const _0x42c666=(_0x226f33=this['_threadCommentModel'][_0x16025a(0x133)](_0x644664[_0x16025a(0x110)])[_0x16025a(0x160)](_0x25184c=>_0x25184c[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x226f33['root'];_0x42c666&&this['_threadCommentModel']['resolveComment'](_0x168825,_0x4e8c45,_0x42c666['id'],_0x644664[_0x16025a(0x12f)]===I[_0x16025a(0x158)]);break;}}}));}};function _0x2d3f(){const _0x2e8b30=['slice','Disposable','userId','symbol','_userService','thread-comment-data-source.config','dataSource','Solved','_initUserSync','length','Reply','COMMENT','Module','deleteComment','/add','find','userID','Add','size','replyId','Inject','stringify','333cyqofo','IConfigService','subscribe','UNRECOGNIZED','rangeType','CustomRangeType','UniverThreadCommentDataSourcePlugin','rangeId','defineProperty','disposeWithMe','19442Dvdwpw','Plugin','updateComment','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','content','threadId','/universer-api/comment/unit/','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','filter','addUser','_threadCommentDataSource','78785YUjqrG','_threadCommentModel','UNIVER_UNKNOWN','_injector','_configService','HTTPService','syncUpdateMutationToColla','Delete','parentId','DependentOn','unitId','150RgKQMM','resolved','_initDataSource','createTimestamp','1hnrEUR','getOwnPropertyDescriptor','3fqRGbW','1070WkGaGz','add','payload','OpenOrReOpen','/reply','pluginName','_threadCommentDataSourceService','personId','commentUpdate$','type','getCurrentUser','_commentService','78133XiXKrM','Unknown','ThreadCommentModel','64184zjQVJf','UserManagerService','UniverInstanceType','Edit','getMemberID','body','_httpService','comment','solved','_init','values','UniverThreadCommentUIPlugin','getUnit','map','listComments','Injector','dayjs','pipe','getComment','CommentService','/delete','requireSession','post','getUser','user','forEach','CollaborationSessionService','get','Solve','root','error','format','_config','customRanges','238584agLnzt','merge','2664092LJxKTF','delete','code','ref','_sessionService','1993440fxbYSD'];_0x2d3f=function(){return _0x2e8b30;};return _0x2d3f();}_=E([S(0x0,c['Inject'](b[_0x1888c3(0x13a)])),S(0x1,c['Inject'](M[_0x1888c3(0x126)])),S(0x2,c['Inject'](c[_0x1888c3(0x128)])),S(0x3,c[_0x1888c3(0x165)](c[_0x1888c3(0x136)]))],_);const q=_0x1888c3(0x156),D={};var A=Object[_0x1888c3(0x116)],x=(_0x37fe40,_0x158bb5,_0x5143df,_0x5c1a51)=>{const _0xfe44ad=_0x1888c3;for(var _0x10da52=_0x5c1a51>0x1?void 0x0:_0x5c1a51?A(_0x158bb5,_0x5143df):_0x158bb5,_0x4ee92e=_0x37fe40[_0xfe44ad(0x15a)]-0x1,_0x229636;_0x4ee92e>=0x0;_0x4ee92e--)(_0x229636=_0x37fe40[_0x4ee92e])&&(_0x10da52=_0x229636(_0x10da52)||_0x10da52);return _0x10da52;},C=(_0x2b5a6f,_0x47c57c)=>(_0x3d43f7,_0x30a94d)=>_0x47c57c(_0x3d43f7,_0x30a94d,_0x2b5a6f);function Y(_0x100041,_0x443287){const _0x13106e=_0x1888c3,_0x3164cd=_0x100041[_0x13106e(0x100)][0x0];return{..._0x443287,'id':_0x3164cd[_0x13106e(0x164)],'resolved':_0x100041['solved']===0x1,'dT':f(_0x3164cd[_0x13106e(0x114)]),'personId':_0x3164cd[_0x13106e(0x153)],'threadId':_0x3164cd[_0x13106e(0xfe)]};}function G(_0x5ed0e9,_0x4a5b94,_0x17b073){const _0x2c06d9=_0x1888c3;var _0x383261,_0x240e18;if(((_0x240e18=(_0x383261=_0x5ed0e9==null?void 0x0:_0x5ed0e9[_0x2c06d9(0x100)])==null?void 0x0:_0x383261[_0x2c06d9(0x15a)])!=null?_0x240e18:0x0)>0x0){const _0x49d696=(_0x25ec7e,_0x849351)=>({'id':_0x25ec7e['replyId'],'threadId':_0x25ec7e['threadId'],'dT':f(_0x25ec7e[_0x2c06d9(0x114)]),'personId':_0x25ec7e['userId'],'resolved':_0x5ed0e9[_0x2c06d9(0x12f)]===I[_0x2c06d9(0x158)],'unitId':_0x4a5b94,'subUnitId':_0x17b073,'text':JSON[_0x2c06d9(0x102)](_0x25ec7e['content']),'parentId':_0x849351}),_0x221515=_0x49d696(_0x5ed0e9[_0x2c06d9(0x100)][0x0]);return{..._0x221515,'children':_0x5ed0e9[_0x2c06d9(0x100)][_0x2c06d9(0x151)](0x1)[_0x2c06d9(0x134)](_0x5496c6=>_0x49d696(_0x5496c6,_0x221515['id']))};}return null;}let p=class{constructor(_0x376885,_0x18a3bf,_0x4befc7){const _0x26f50a=_0x1888c3;this[_0x26f50a(0x12d)]=_0x376885,this[_0x26f50a(0x155)]=_0x18a3bf,this[_0x26f50a(0x14f)]=_0x4befc7;}async['addComment'](_0x330d9e){const _0x202c88=_0x1888c3;var _0xaabada,_0x8d1291;const {parentId:_0x266295,unitId:_0x2944a2,text:_0x41b459,threadId:_0x3e8abd}=_0x330d9e,_0x392a2b=(_0x8d1291=(_0xaabada=_0x41b459['customRanges'])==null?void 0x0:_0xaabada['filter'](_0x1ced1d=>_0x1ced1d[_0x202c88(0xf2)]===c[_0x202c88(0xf3)][_0x202c88(0x15c)])['map'](_0x88b8ef=>_0x88b8ef[_0x202c88(0xf5)]))!=null?_0x8d1291:[],_0x1e0dcf=JSON['stringify'](_0x41b459),_0x39c75d=(await this[_0x202c88(0x14f)][_0x202c88(0x13c)](_0x2944a2))[_0x202c88(0x12b)]();if(_0x266295){const _0x261019={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b,'threadId':_0x3e8abd},_0x7e9e79=(await this[_0x202c88(0x12d)][_0x202c88(0x13d)](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x11c),{'body':_0x261019}))['body']['reply'];return{..._0x330d9e,'id':_0x7e9e79[_0x202c88(0x164)],'dT':c[_0x202c88(0x137)](+_0x7e9e79[_0x202c88(0x114)])[_0x202c88(0x146)](_0x202c88(0xfc)),'personId':_0x7e9e79[_0x202c88(0x153)]};}else{const _0x470466={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b},_0x4124a6=await this[_0x202c88(0x12d)]['post'](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x15f),{'body':_0x470466});return Y(_0x4124a6['body'][_0x202c88(0x12e)],_0x330d9e);}}async[_0x1888c3(0xfa)](_0x2a873d){const _0x2eeb14=_0x1888c3;var _0x3c0fe8,_0x4b2330;const {text:_0x5be4b2,unitId:_0x24c828}=_0x2a873d,_0x10d790=(_0x4b2330=(_0x3c0fe8=_0x5be4b2[_0x2eeb14(0x148)])==null?void 0x0:_0x3c0fe8[_0x2eeb14(0x103)](_0x1cb946=>_0x1cb946['rangeType']===c[_0x2eeb14(0xf3)]['COMMENT'])[_0x2eeb14(0x134)](_0x5f23eb=>_0x5f23eb[_0x2eeb14(0xf5)]))!=null?_0x4b2330:[],_0xd83c93=JSON[_0x2eeb14(0x166)](_0x5be4b2),_0x31ce00=_0x2a873d['threadId'],_0x1e3941=_0x2a873d['id'],_0x4565f7={'memberId':(await this['_sessionService']['requireSession'](_0x24c828))['getMemberID'](),'unitId':_0x24c828,'threadId':_0x31ce00,'mention':_0x10d790,'content':_0xd83c93,'replyId':_0x1e3941},_0x38b216=await this['_httpService'][_0x2eeb14(0x13d)](_0x2eeb14(0xff)+_0x24c828+'/edit',{'body':_0x4565f7});return!_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]||_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]['code']===0x1;}async['resolveComment'](_0x447063){const _0xbbd85a=_0x1888c3,{unitId:_0x5f3a07}=_0x447063,_0x3d1d4d=_0x447063[_0xbbd85a(0xfe)],_0x2e0432={'memberId':this[_0xbbd85a(0x155)][_0xbbd85a(0x122)]()[_0xbbd85a(0x161)],'unitId':_0x5f3a07,'threadId':_0x3d1d4d,'solved':_0x447063[_0xbbd85a(0x112)]?I[_0xbbd85a(0x158)]:I['OpenOrReOpen']},_0x5efcb4=await this[_0xbbd85a(0x12d)][_0xbbd85a(0x13d)]('/universer-api/comment/unit/'+_0x5f3a07+'/solved',{'body':_0x2e0432});return!_0x5efcb4['body'][_0xbbd85a(0x145)]||_0x5efcb4['body'][_0xbbd85a(0x145)][_0xbbd85a(0x14d)]===0x1;}async[_0x1888c3(0x15e)](_0x51f123,_0x9512fd,_0x1a70d2,_0x28feff){const _0xe4e6a1=_0x1888c3,_0x521122={'memberId':(await this['_sessionService'][_0xe4e6a1(0x13c)](_0x51f123))[_0xe4e6a1(0x12b)](),'threadId':_0x1a70d2,'replyId':_0x28feff,'unitId':_0x51f123},_0x163300=await this[_0xe4e6a1(0x12d)][_0xe4e6a1(0x13d)](_0xe4e6a1(0xff)+_0x51f123+_0xe4e6a1(0x13b),{'body':_0x521122});return!_0x163300['body'][_0xe4e6a1(0x145)]||_0x163300[_0xe4e6a1(0x12c)]['error']['code']===0x1;}async[_0x1888c3(0x135)](_0x4e4743,_0x529182,_0x10a06f){const _0x360190=_0x1888c3,_0x3abc90={'unitId':_0x4e4743,'threadId':_0x10a06f},_0x170259=await this[_0x360190(0x12d)]['post'](_0x360190(0xff)+_0x4e4743+'/list',{'body':_0x3abc90}),_0x54df3b=_0x10a06f[_0x360190(0x134)](_0x402bd4=>G(_0x170259[_0x360190(0x12c)]['comments'][_0x402bd4],_0x4e4743,_0x529182))[_0x360190(0x103)](Boolean);return Object[_0x360190(0x131)](_0x170259[_0x360190(0x12c)]['users'])[_0x360190(0x140)](_0x585efe=>{const _0x364d2e=_0x360190;this['_userService'][_0x364d2e(0x104)](_0x585efe);}),_0x54df3b;}['saveCommentToSnapshot'](_0x4beb55){const _0x4a4191=_0x1888c3;return{'id':_0x4beb55['id'],'threadId':_0x4beb55[_0x4a4191(0xfe)],'ref':_0x4beb55[_0x4a4191(0x14e)]};}};p=x([C(0x0,c[_0x1888c3(0x165)](P[_0x1888c3(0x10b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1888c3(0x165)](b[_0x1888c3(0x141)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x27ef8a,_0x10fb27,_0x425d6a,_0x2395f2)=>{for(var _0x5aa957=_0x2395f2>0x1?void 0x0:_0x2395f2?H(_0x10fb27,_0x425d6a):_0x10fb27,_0x3188a3=_0x27ef8a['length']-0x1,_0x28008a;_0x3188a3>=0x0;_0x3188a3--)(_0x28008a=_0x27ef8a[_0x3188a3])&&(_0x5aa957=_0x28008a(_0x5aa957)||_0x5aa957);return _0x5aa957;},y=(_0x26766f,_0x11fcc7)=>(_0x543db4,_0xaaefcc)=>_0x11fcc7(_0x543db4,_0xaaefcc,_0x26766f);function _0x43bd(_0x3240d3,_0x54e897){_0x3240d3=_0x3240d3-0xf0;const _0x2d3f02=_0x2d3f();let _0x43bd8a=_0x2d3f02[_0x3240d3];return _0x43bd8a;}let g=class extends c[_0x1888c3(0x152)]{constructor(_0xc42b85,_0x40d4b1){const _0x45b12c=_0x1888c3;super(),this[_0x45b12c(0x11e)]=_0xc42b85,this[_0x45b12c(0x105)]=_0x40d4b1,this[_0x45b12c(0x113)]();}['_initDataSource'](){const _0x543c6f=_0x1888c3;this[_0x543c6f(0x11e)][_0x543c6f(0x157)]=this['_threadCommentDataSource'],this[_0x543c6f(0x11e)][_0x543c6f(0x10c)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1888c3(0x165)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x485531,_0x12e569,_0x4823ea)=>_0x12e569 in _0x485531?F(_0x485531,_0x12e569,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4823ea}):_0x485531[_0x12e569]=_0x4823ea,W=(_0x4a5115,_0x984356,_0x4479d1,_0x1ffde3)=>{for(var _0x66e163=_0x1ffde3>0x1?void 0x0:_0x1ffde3?L(_0x984356,_0x4479d1):_0x984356,_0x2f56da=_0x4a5115['length']-0x1,_0x54eb55;_0x2f56da>=0x0;_0x2f56da--)(_0x54eb55=_0x4a5115[_0x2f56da])&&(_0x66e163=_0x54eb55(_0x66e163)||_0x66e163);return _0x66e163;},O=(_0x44c1b6,_0x1a42e6)=>(_0x556fa3,_0x4b792a)=>_0x1a42e6(_0x556fa3,_0x4b792a,_0x44c1b6),N=(_0x53b36e,_0x3fa555,_0x3466f9)=>Z(_0x53b36e,typeof _0x3fa555!=_0x1888c3(0x154)?_0x3fa555+'':_0x3fa555,_0x3466f9);exports[_0x1888c3(0xf4)]=class extends c[_0x1888c3(0xf9)]{constructor(_0x1c496f=D,_0x2605bb,_0xab95b6){const _0x23eb8b=_0x1888c3;super(),this['_config']=_0x1c496f,this['_injector']=_0x2605bb,this[_0x23eb8b(0x10a)]=_0xab95b6;const {..._0x2a20c2}=c[_0x23eb8b(0x14a)]({},D,this[_0x23eb8b(0x147)]);this[_0x23eb8b(0x10a)]['setConfig'](q,_0x2a20c2);}['onStarting'](){const _0x27f504=_0x1888c3;[[p],[g],[_]][_0x27f504(0x140)](_0x1f5e21=>{const _0x3e794a=_0x27f504;this[_0x3e794a(0x109)]['add'](_0x1f5e21);});}['onReady'](){const _0x228b78=_0x1888c3;this['_injector']['get'](g),this[_0x228b78(0x109)][_0x228b78(0x142)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x11d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x121),c[_0x1888c3(0x129)][_0x1888c3(0x108)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1888c3(0x10f)](w[_0x1888c3(0x132)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x1888c3(0x136)])),O(0x2,c[_0x1888c3(0x168)])],exports[_0x1888c3(0xf4)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1bdfca=_0x5533;(function(_0xfb79f,_0x33210c){const _0x1204d4=_0x5533,_0x25c9e5=_0xfb79f();while(!![]){try{const _0x4f2acc=parseInt(_0x1204d4(0x1ed))/0x1*(parseInt(_0x1204d4(0x23c))/0x2)+parseInt(_0x1204d4(0x1f8))/0x3+parseInt(_0x1204d4(0x1fe))/0x4*(-parseInt(_0x1204d4(0x212))/0x5)+parseInt(_0x1204d4(0x1eb))/0x6*(parseInt(_0x1204d4(0x1e9))/0x7)+-parseInt(_0x1204d4(0x215))/0x8+-parseInt(_0x1204d4(0x1fd))/0x9+parseInt(_0x1204d4(0x1fc))/0xa;if(_0x4f2acc===_0x33210c)break;else _0x25c9e5['push'](_0x25c9e5['shift']());}catch(_0x4c0f23){_0x25c9e5['push'](_0x25c9e5['shift']());}}}(_0x51a9,0x31991));import{CommentService as _0x494070,CollaborationSessionService as _0x186ef6,UniverCollaborationClientPlugin as _0x82913d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b76e0}from'@univerjs-pro/license';import{dayjs as _0x118231,UserManagerService as _0x2ebc4d,Inject as _0x58577d,Injector as _0x418b1b,Disposable as _0x50a167,CustomRangeType as _0x28d5b5,UniverInstanceType as _0x12b441,DependentOn as _0x1e955f,IConfigService as _0x30ca1b,Plugin as _0x10008e,merge as _0xccd7ac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23fc9b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303d6b,IThreadCommentDataSourceService as _0x4babee}from'@univerjs/thread-comment';import{bufferTime as _0x2e4209}from'rxjs';import{HTTPService as _0x1f697f}from'@univerjs/network';function _0x51a9(){const _0x202810=['COMMENT','addComment','/solved','704105PAvUQt','/add','resolved','1157384CkixYI','rangeType','getMemberID','setConfig','replyId','_commentService','disposeWithMe','Delete','size','addUser','/list','/reply','_initUserSync','pluginName','length','threadId','payload','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','deleteComment','Solve','_httpService','defineProperty','resolveComment','get','_init','Unknown','dataSource','requireSession','replies','solved','reply','updateComment','Add','find','_userService','symbol','body','182lwBayO','commentUpdate$','createTimestamp','_threadCommentDataSource','forEach','Edit','comment','customRanges','getComment','Reply','rangeId','userId','post','_threadCommentDataSourceService','personId','userID','onStarting','7042yjqATK','pipe','792zpVaCo','stringify','1979cZwbkj','_threadCommentModel','users','getOwnPropertyDescriptor','user','Solved','UNRECOGNIZED','root','comments','error','/edit','436962nOtTxX','_sessionService','ref','onReady','666110VluHHY','328491HEnHPx','4TdobPT','code','/universer-api/comment/unit/','map','getUnit','_configService','UNIVER_UNKNOWN','filter','listComments','unitId','type','format','parse','_config','OpenOrReOpen','delete','subscribe'];_0x51a9=function(){return _0x202810;};return _0x51a9();}const W=_0x1bdfca(0x227);var I=(_0x4f2f5f=>(_0x4f2f5f[_0x4f2f5f['OpenOrReOpen']=0x0]=_0x1bdfca(0x20c),_0x4f2f5f[_0x4f2f5f['Solved']=0x1]=_0x1bdfca(0x1f2),_0x4f2f5f[_0x4f2f5f[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x4f2f5f))(I||{}),v=(_0x52c843=>(_0x52c843[_0x52c843[_0x1bdfca(0x230)]=0x0]=_0x1bdfca(0x230),_0x52c843[_0x52c843[_0x1bdfca(0x237)]=0x1]=_0x1bdfca(0x237),_0x52c843[_0x52c843['Reply']=0x2]='Reply',_0x52c843[_0x52c843['Edit']=0x3]=_0x1bdfca(0x241),_0x52c843[_0x52c843[_0x1bdfca(0x21c)]=0x4]=_0x1bdfca(0x21c),_0x52c843[_0x52c843[_0x1bdfca(0x22a)]=0x5]='Solve',_0x52c843[_0x52c843[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x52c843))(v||{});const y=_0x55878a=>_0x118231(new Date(+_0x55878a))[_0x1bdfca(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x480652,_0x5d149f)=>{const _0x2fc9a2=_0x1bdfca,_0x3a3a9a=_0x480652[_0x2fc9a2(0x22e)](_0x2ebc4d),_0x422c7a=_0x480652[_0x2fc9a2(0x22e)](_0x1f697f);_0x5d149f[_0x2fc9a2(0x240)](_0x5d678a=>{const _0x544cce=_0x2fc9a2;_0x3a3a9a['getUser'](_0x5d678a)&&_0x5d149f[_0x544cce(0x20d)](_0x5d678a);}),_0x5d149f[_0x2fc9a2(0x21d)]&&(await _0x422c7a[_0x2fc9a2(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d149f]}}))['body']['users'][_0x2fc9a2(0x240)](_0x1153b9=>{_0x1153b9&&_0x3a3a9a['addUser'](_0x1153b9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46f9ee,_0x3b2c16,_0x284fa3,_0x46b68f)=>{const _0xe280e7=_0x1bdfca;for(var _0x506c00=_0x46b68f>0x1?void 0x0:_0x46b68f?K(_0x3b2c16,_0x284fa3):_0x3b2c16,_0x161513=_0x46f9ee[_0xe280e7(0x223)]-0x1,_0x1b6630;_0x161513>=0x0;_0x161513--)(_0x1b6630=_0x46f9ee[_0x161513])&&(_0x506c00=_0x1b6630(_0x506c00)||_0x506c00);return _0x506c00;},p=(_0x14278c,_0x4403c4)=>(_0x2859df,_0x39e467)=>_0x4403c4(_0x2859df,_0x39e467,_0x14278c);let _=class extends _0x50a167{constructor(_0x51b89c,_0x1f169c,_0x5f3951,_0xffe9c6){const _0x8f5bf9=_0x1bdfca;super(),this[_0x8f5bf9(0x21a)]=_0x51b89c,this['_threadCommentModel']=_0x1f169c,this[_0x8f5bf9(0x239)]=_0x5f3951,this[_0x8f5bf9(0x228)]=_0xffe9c6,this[_0x8f5bf9(0x22f)](),this[_0x8f5bf9(0x221)]();}[_0x1bdfca(0x221)](){const _0x158fa4=_0x1bdfca;this[_0x158fa4(0x21b)](this['_threadCommentModel'][_0x158fa4(0x23d)][_0x158fa4(0x1ea)](_0x2e4209(0x10))[_0x158fa4(0x20e)](_0xc6c4bb=>{const _0x2cf343=new Set();_0xc6c4bb['forEach'](_0x473dea=>{const _0x483fb6=_0x5533;switch(_0x473dea[_0x483fb6(0x208)]){case'add':{const _0xc44d10=_0x473dea[_0x483fb6(0x225)][_0x483fb6(0x24a)];_0x2cf343['add'](_0xc44d10);break;}}}),B(this['_injector'],_0x2cf343);}));}[_0x1bdfca(0x22f)](){const _0x7bf000=_0x1bdfca;this[_0x7bf000(0x21b)](this[_0x7bf000(0x21a)][_0x7bf000(0x23d)][_0x7bf000(0x20e)](async _0x49ac9e=>{const _0x9491aa=_0x7bf000;var _0x49f8e3,_0x4ed501,_0xcc6137,_0x3fc950;const _0x28f568=(_0x49f8e3=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x5b532f=>_0x5b532f[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x49f8e3[_0x9491aa(0x1f4)];if(!_0x28f568)return;const {unitId:_0x1ed3e5,subUnitId:_0x4d723e}=_0x28f568;switch(_0x49ac9e['user']&&this['_userService'][_0x9491aa(0x21e)](_0x49ac9e[_0x9491aa(0x1f1)]),_0x49ac9e[_0x9491aa(0x208)]){case v['Add']:break;case v[_0x9491aa(0x245)]:{this[_0x9491aa(0x1ee)][_0x9491aa(0x210)](_0x1ed3e5,_0x4d723e,{'unitId':_0x1ed3e5,'subUnitId':_0x4d723e,'ref':'','id':_0x49ac9e[_0x9491aa(0x219)],'dT':y(+_0x49ac9e[_0x9491aa(0x23e)]),'threadId':_0x49ac9e['threadId'],'personId':(_0xcc6137=(_0x4ed501=_0x49ac9e[_0x9491aa(0x1f1)])==null?void 0x0:_0x4ed501['userID'])!=null?_0xcc6137:_0x49ac9e[_0x9491aa(0x247)],'text':JSON[_0x9491aa(0x20a)](_0x49ac9e[_0x9491aa(0x226)]),'parentId':_0x28f568['id']});break;}case v[_0x9491aa(0x21c)]:{const _0x407009=this[_0x9491aa(0x1ee)][_0x9491aa(0x244)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);_0x407009&&_0x407009['parentId']&&this['_threadCommentModel'][_0x9491aa(0x229)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);break;}case v['Edit']:{this[_0x9491aa(0x1ee)]['updateComment'](_0x1ed3e5,_0x4d723e,{'commentId':_0x49ac9e[_0x9491aa(0x219)],'text':JSON['parse'](_0x49ac9e[_0x9491aa(0x226)])});break;}case v[_0x9491aa(0x22a)]:{const _0x42e457=(_0x3fc950=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x58225e=>_0x58225e[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x3fc950['root'];_0x42e457&&this['_threadCommentModel'][_0x9491aa(0x22d)](_0x1ed3e5,_0x4d723e,_0x42e457['id'],_0x49ac9e['solved']===I[_0x9491aa(0x1f2)]);break;}}}));}};_=V([p(0x0,_0x58577d(_0x494070)),p(0x1,_0x58577d(_0x303d6b)),p(0x2,_0x58577d(_0x2ebc4d)),p(0x3,_0x58577d(_0x418b1b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1bdfca(0x1f0)],Q=(_0x409e4a,_0x4c9b9e,_0x5c2103,_0x97cd34)=>{const _0x47b94b=_0x1bdfca;for(var _0x8ee573=_0x97cd34>0x1?void 0x0:_0x97cd34?k(_0x4c9b9e,_0x5c2103):_0x4c9b9e,_0x5bfe73=_0x409e4a[_0x47b94b(0x223)]-0x1,_0x19e3ce;_0x5bfe73>=0x0;_0x5bfe73--)(_0x19e3ce=_0x409e4a[_0x5bfe73])&&(_0x8ee573=_0x19e3ce(_0x8ee573)||_0x8ee573);return _0x8ee573;},b=(_0x2fca9f,_0x283211)=>(_0xba5294,_0x245891)=>_0x283211(_0xba5294,_0x245891,_0x2fca9f);function X(_0x1095fd,_0x4ab505){const _0x4500c9=_0x1bdfca,_0x24582c=_0x1095fd[_0x4500c9(0x233)][0x0];return{..._0x4ab505,'id':_0x24582c[_0x4500c9(0x219)],'resolved':_0x1095fd[_0x4500c9(0x234)]===0x1,'dT':y(_0x24582c[_0x4500c9(0x23e)]),'personId':_0x24582c[_0x4500c9(0x247)],'threadId':_0x24582c[_0x4500c9(0x224)]};}function _0x5533(_0x4a58e5,_0x3cb8b5){_0x4a58e5=_0x4a58e5-0x1e8;const _0x51a9e6=_0x51a9();let _0x5533ca=_0x51a9e6[_0x4a58e5];return _0x5533ca;}function ee(_0x36163f,_0x50ee22,_0x3a19d6){const _0x442797=_0x1bdfca;var _0x4fddae,_0xd0e08c;if(((_0xd0e08c=(_0x4fddae=_0x36163f==null?void 0x0:_0x36163f[_0x442797(0x233)])==null?void 0x0:_0x4fddae[_0x442797(0x223)])!=null?_0xd0e08c:0x0)>0x0){const _0x448bad=(_0x6411f2,_0x57cfe7)=>({'id':_0x6411f2['replyId'],'threadId':_0x6411f2['threadId'],'dT':y(_0x6411f2['createTimestamp']),'personId':_0x6411f2[_0x442797(0x247)],'resolved':_0x36163f[_0x442797(0x234)]===I[_0x442797(0x1f2)],'unitId':_0x50ee22,'subUnitId':_0x3a19d6,'text':JSON[_0x442797(0x20a)](_0x6411f2[_0x442797(0x226)]),'parentId':_0x57cfe7}),_0x3fd306=_0x448bad(_0x36163f[_0x442797(0x233)][0x0]);return{..._0x3fd306,'children':_0x36163f['replies']['slice'](0x1)[_0x442797(0x201)](_0x42ba3d=>_0x448bad(_0x42ba3d,_0x3fd306['id']))};}return null;}let S=class{constructor(_0x5d841f,_0x1a3dae,_0x1f07da){const _0x3e5caf=_0x1bdfca;this['_httpService']=_0x5d841f,this[_0x3e5caf(0x239)]=_0x1a3dae,this[_0x3e5caf(0x1f9)]=_0x1f07da;}async[_0x1bdfca(0x210)](_0x463269){const _0x202c68=_0x1bdfca;var _0x42cd19,_0x1729b8;const {parentId:_0x123226,unitId:_0x85051f,text:_0x5da09d,threadId:_0x26a88a}=_0x463269,_0x551e15=(_0x1729b8=(_0x42cd19=_0x5da09d[_0x202c68(0x243)])==null?void 0x0:_0x42cd19[_0x202c68(0x205)](_0x17b1c8=>_0x17b1c8[_0x202c68(0x216)]===_0x28d5b5[_0x202c68(0x20f)])[_0x202c68(0x201)](_0x28203b=>_0x28203b['rangeId']))!=null?_0x1729b8:[],_0x524a5b=JSON['stringify'](_0x5da09d),_0xe5e07f=(await this[_0x202c68(0x1f9)][_0x202c68(0x232)](_0x85051f))[_0x202c68(0x217)]();if(_0x123226){const _0x3e817b={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15,'threadId':_0x26a88a},_0x51ac0b=(await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x220),{'body':_0x3e817b}))[_0x202c68(0x23b)][_0x202c68(0x235)];return{..._0x463269,'id':_0x51ac0b[_0x202c68(0x219)],'dT':_0x118231(+_0x51ac0b[_0x202c68(0x23e)])[_0x202c68(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x51ac0b['userId']};}else{const _0x25d323={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15},_0x3b2385=await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x213),{'body':_0x25d323});return X(_0x3b2385[_0x202c68(0x23b)][_0x202c68(0x242)],_0x463269);}}async[_0x1bdfca(0x236)](_0x4b6f50){const _0x260d75=_0x1bdfca;var _0x7df826,_0x2beab6;const {text:_0x306ec8,unitId:_0x4c0d43}=_0x4b6f50,_0x329961=(_0x2beab6=(_0x7df826=_0x306ec8[_0x260d75(0x243)])==null?void 0x0:_0x7df826['filter'](_0xef5cae=>_0xef5cae[_0x260d75(0x216)]===_0x28d5b5[_0x260d75(0x20f)])['map'](_0x45152f=>_0x45152f[_0x260d75(0x246)]))!=null?_0x2beab6:[],_0x351942=JSON[_0x260d75(0x1ec)](_0x306ec8),_0x28f864=_0x4b6f50[_0x260d75(0x224)],_0x132bdd=_0x4b6f50['id'],_0x115f99={'memberId':(await this['_sessionService'][_0x260d75(0x232)](_0x4c0d43))[_0x260d75(0x217)](),'unitId':_0x4c0d43,'threadId':_0x28f864,'mention':_0x329961,'content':_0x351942,'replyId':_0x132bdd},_0x340398=await this[_0x260d75(0x22b)][_0x260d75(0x248)](_0x260d75(0x200)+_0x4c0d43+_0x260d75(0x1f7),{'body':_0x115f99});return!_0x340398['body']['error']||_0x340398[_0x260d75(0x23b)][_0x260d75(0x1f6)][_0x260d75(0x1ff)]===0x1;}async['resolveComment'](_0x25576f){const _0x1512e7=_0x1bdfca,{unitId:_0x312032}=_0x25576f,_0x275c9c=_0x25576f[_0x1512e7(0x224)],_0x94f4bb={'memberId':this[_0x1512e7(0x239)]['getCurrentUser']()[_0x1512e7(0x24b)],'unitId':_0x312032,'threadId':_0x275c9c,'solved':_0x25576f[_0x1512e7(0x214)]?I['Solved']:I[_0x1512e7(0x20c)]},_0x2c25e3=await this[_0x1512e7(0x22b)][_0x1512e7(0x248)](_0x1512e7(0x200)+_0x312032+_0x1512e7(0x211),{'body':_0x94f4bb});return!_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)]||_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)][_0x1512e7(0x1ff)]===0x1;}async[_0x1bdfca(0x229)](_0x59fa22,_0x434a33,_0x1bac73,_0x23c309){const _0x50abe8=_0x1bdfca,_0x79e59b={'memberId':(await this[_0x50abe8(0x1f9)][_0x50abe8(0x232)](_0x59fa22))[_0x50abe8(0x217)](),'threadId':_0x1bac73,'replyId':_0x23c309,'unitId':_0x59fa22},_0x56ecca=await this[_0x50abe8(0x22b)][_0x50abe8(0x248)](_0x50abe8(0x200)+_0x59fa22+'/delete',{'body':_0x79e59b});return!_0x56ecca[_0x50abe8(0x23b)]['error']||_0x56ecca[_0x50abe8(0x23b)][_0x50abe8(0x1f6)][_0x50abe8(0x1ff)]===0x1;}async[_0x1bdfca(0x206)](_0x17d402,_0x45630b,_0x3adc83){const _0x579531=_0x1bdfca,_0x4c4611={'unitId':_0x17d402,'threadId':_0x3adc83},_0x534a10=await this[_0x579531(0x22b)][_0x579531(0x248)]('/universer-api/comment/unit/'+_0x17d402+_0x579531(0x21f),{'body':_0x4c4611}),_0x3182f6=_0x3adc83[_0x579531(0x201)](_0xe5d033=>ee(_0x534a10['body'][_0x579531(0x1f5)][_0xe5d033],_0x17d402,_0x45630b))[_0x579531(0x205)](Boolean);return Object['values'](_0x534a10[_0x579531(0x23b)][_0x579531(0x1ef)])['forEach'](_0x2a4fa7=>{const _0x3367db=_0x579531;this['_userService'][_0x3367db(0x21e)](_0x2a4fa7);}),_0x3182f6;}['saveCommentToSnapshot'](_0x55ccf7){const _0x1a6028=_0x1bdfca;return{'id':_0x55ccf7['id'],'threadId':_0x55ccf7[_0x1a6028(0x224)],'ref':_0x55ccf7[_0x1a6028(0x1fa)]};}};S=Q([b(0x0,_0x58577d(_0x1f697f)),b(0x1,_0x58577d(_0x2ebc4d)),b(0x2,_0x58577d(_0x186ef6))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x38ca22,_0x45d8e2,_0x50a57a,_0x416bda)=>{const _0x925489=_0x1bdfca;for(var _0xf86d79=_0x416bda>0x1?void 0x0:_0x416bda?re(_0x45d8e2,_0x50a57a):_0x45d8e2,_0x3dc5ca=_0x38ca22[_0x925489(0x223)]-0x1,_0x13cefe;_0x3dc5ca>=0x0;_0x3dc5ca--)(_0x13cefe=_0x38ca22[_0x3dc5ca])&&(_0xf86d79=_0x13cefe(_0xf86d79)||_0xf86d79);return _0xf86d79;},M=(_0x4050a9,_0x4945f5)=>(_0x47a348,_0x4b5022)=>_0x4945f5(_0x47a348,_0x4b5022,_0x4050a9);let f=class extends _0x50a167{constructor(_0x571375,_0x166e60){const _0x4d30a3=_0x1bdfca;super(),this[_0x4d30a3(0x249)]=_0x571375,this[_0x4d30a3(0x23f)]=_0x166e60,this['_initDataSource']();}['_initDataSource'](){const _0x46dca6=_0x1bdfca;this[_0x46dca6(0x249)][_0x46dca6(0x231)]=this['_threadCommentDataSource'],this[_0x46dca6(0x249)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4babee),M(0x1,_0x58577d(S))],f);var se=Object[_0x1bdfca(0x22c)],oe=Object[_0x1bdfca(0x1f0)],ne=(_0x470bdd,_0x5f25e9,_0x523605)=>_0x5f25e9 in _0x470bdd?se(_0x470bdd,_0x5f25e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523605}):_0x470bdd[_0x5f25e9]=_0x523605,ie=(_0x306133,_0xd18e40,_0x35b6d1,_0x5bf0ba)=>{const _0x4a7b1c=_0x1bdfca;for(var _0x33a395=_0x5bf0ba>0x1?void 0x0:_0x5bf0ba?oe(_0xd18e40,_0x35b6d1):_0xd18e40,_0x17d2dc=_0x306133[_0x4a7b1c(0x223)]-0x1,_0x3fd7fa;_0x17d2dc>=0x0;_0x17d2dc--)(_0x3fd7fa=_0x306133[_0x17d2dc])&&(_0x33a395=_0x3fd7fa(_0x33a395)||_0x33a395);return _0x33a395;},N=(_0x19f5c4,_0x6fe8d5)=>(_0x26bdb4,_0x54669f)=>_0x6fe8d5(_0x26bdb4,_0x54669f,_0x19f5c4),$=(_0x4ccd71,_0x1bfa1f,_0x16bd86)=>ne(_0x4ccd71,typeof _0x1bfa1f!=_0x1bdfca(0x23a)?_0x1bfa1f+'':_0x1bfa1f,_0x16bd86);let g=class extends _0x10008e{constructor(_0x37fa83=O,_0x265c42,_0x50f65e){const _0x579b6a=_0x1bdfca;super(),this[_0x579b6a(0x20b)]=_0x37fa83,this['_injector']=_0x265c42,this[_0x579b6a(0x203)]=_0x50f65e;const {..._0x47930d}=_0xccd7ac({},O,this[_0x579b6a(0x20b)]);this[_0x579b6a(0x203)][_0x579b6a(0x218)](z,_0x47930d);}[_0x1bdfca(0x1e8)](){const _0x1dcd0a=_0x1bdfca;[[S],[f],[_]][_0x1dcd0a(0x240)](_0x14fcc3=>{const _0x55e342=_0x1dcd0a;this[_0x55e342(0x228)]['add'](_0x14fcc3);});}[_0x1bdfca(0x1fb)](){const _0x581d00=_0x1bdfca;this[_0x581d00(0x228)][_0x581d00(0x22e)](f),this[_0x581d00(0x228)][_0x581d00(0x22e)](_);}};$(g,_0x1bdfca(0x222),W),$(g,'type',_0x12b441[_0x1bdfca(0x204)]),g=ie([_0x1e955f(_0x23fc9b,_0x82913d,_0x1b76e0),N(0x1,_0x58577d(_0x418b1b)),N(0x2,_0x30ca1b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1bdfca=_0x5533;(function(_0xfb79f,_0x33210c){const _0x1204d4=_0x5533,_0x25c9e5=_0xfb79f();while(!![]){try{const _0x4f2acc=parseInt(_0x1204d4(0x1ed))/0x1*(parseInt(_0x1204d4(0x23c))/0x2)+parseInt(_0x1204d4(0x1f8))/0x3+parseInt(_0x1204d4(0x1fe))/0x4*(-parseInt(_0x1204d4(0x212))/0x5)+parseInt(_0x1204d4(0x1eb))/0x6*(parseInt(_0x1204d4(0x1e9))/0x7)+-parseInt(_0x1204d4(0x215))/0x8+-parseInt(_0x1204d4(0x1fd))/0x9+parseInt(_0x1204d4(0x1fc))/0xa;if(_0x4f2acc===_0x33210c)break;else _0x25c9e5['push'](_0x25c9e5['shift']());}catch(_0x4c0f23){_0x25c9e5['push'](_0x25c9e5['shift']());}}}(_0x51a9,0x31991));import{CommentService as _0x494070,CollaborationSessionService as _0x186ef6,UniverCollaborationClientPlugin as _0x82913d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b76e0}from'@univerjs-pro/license';import{dayjs as _0x118231,UserManagerService as _0x2ebc4d,Inject as _0x58577d,Injector as _0x418b1b,Disposable as _0x50a167,CustomRangeType as _0x28d5b5,UniverInstanceType as _0x12b441,DependentOn as _0x1e955f,IConfigService as _0x30ca1b,Plugin as _0x10008e,merge as _0xccd7ac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23fc9b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303d6b,IThreadCommentDataSourceService as _0x4babee}from'@univerjs/thread-comment';import{bufferTime as _0x2e4209}from'rxjs';import{HTTPService as _0x1f697f}from'@univerjs/network';function _0x51a9(){const _0x202810=['COMMENT','addComment','/solved','704105PAvUQt','/add','resolved','1157384CkixYI','rangeType','getMemberID','setConfig','replyId','_commentService','disposeWithMe','Delete','size','addUser','/list','/reply','_initUserSync','pluginName','length','threadId','payload','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','deleteComment','Solve','_httpService','defineProperty','resolveComment','get','_init','Unknown','dataSource','requireSession','replies','solved','reply','updateComment','Add','find','_userService','symbol','body','182lwBayO','commentUpdate$','createTimestamp','_threadCommentDataSource','forEach','Edit','comment','customRanges','getComment','Reply','rangeId','userId','post','_threadCommentDataSourceService','personId','userID','onStarting','7042yjqATK','pipe','792zpVaCo','stringify','1979cZwbkj','_threadCommentModel','users','getOwnPropertyDescriptor','user','Solved','UNRECOGNIZED','root','comments','error','/edit','436962nOtTxX','_sessionService','ref','onReady','666110VluHHY','328491HEnHPx','4TdobPT','code','/universer-api/comment/unit/','map','getUnit','_configService','UNIVER_UNKNOWN','filter','listComments','unitId','type','format','parse','_config','OpenOrReOpen','delete','subscribe'];_0x51a9=function(){return _0x202810;};return _0x51a9();}const W=_0x1bdfca(0x227);var I=(_0x4f2f5f=>(_0x4f2f5f[_0x4f2f5f['OpenOrReOpen']=0x0]=_0x1bdfca(0x20c),_0x4f2f5f[_0x4f2f5f['Solved']=0x1]=_0x1bdfca(0x1f2),_0x4f2f5f[_0x4f2f5f[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x4f2f5f))(I||{}),v=(_0x52c843=>(_0x52c843[_0x52c843[_0x1bdfca(0x230)]=0x0]=_0x1bdfca(0x230),_0x52c843[_0x52c843[_0x1bdfca(0x237)]=0x1]=_0x1bdfca(0x237),_0x52c843[_0x52c843['Reply']=0x2]='Reply',_0x52c843[_0x52c843['Edit']=0x3]=_0x1bdfca(0x241),_0x52c843[_0x52c843[_0x1bdfca(0x21c)]=0x4]=_0x1bdfca(0x21c),_0x52c843[_0x52c843[_0x1bdfca(0x22a)]=0x5]='Solve',_0x52c843[_0x52c843[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x52c843))(v||{});const y=_0x55878a=>_0x118231(new Date(+_0x55878a))[_0x1bdfca(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x480652,_0x5d149f)=>{const _0x2fc9a2=_0x1bdfca,_0x3a3a9a=_0x480652[_0x2fc9a2(0x22e)](_0x2ebc4d),_0x422c7a=_0x480652[_0x2fc9a2(0x22e)](_0x1f697f);_0x5d149f[_0x2fc9a2(0x240)](_0x5d678a=>{const _0x544cce=_0x2fc9a2;_0x3a3a9a['getUser'](_0x5d678a)&&_0x5d149f[_0x544cce(0x20d)](_0x5d678a);}),_0x5d149f[_0x2fc9a2(0x21d)]&&(await _0x422c7a[_0x2fc9a2(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d149f]}}))['body']['users'][_0x2fc9a2(0x240)](_0x1153b9=>{_0x1153b9&&_0x3a3a9a['addUser'](_0x1153b9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46f9ee,_0x3b2c16,_0x284fa3,_0x46b68f)=>{const _0xe280e7=_0x1bdfca;for(var _0x506c00=_0x46b68f>0x1?void 0x0:_0x46b68f?K(_0x3b2c16,_0x284fa3):_0x3b2c16,_0x161513=_0x46f9ee[_0xe280e7(0x223)]-0x1,_0x1b6630;_0x161513>=0x0;_0x161513--)(_0x1b6630=_0x46f9ee[_0x161513])&&(_0x506c00=_0x1b6630(_0x506c00)||_0x506c00);return _0x506c00;},p=(_0x14278c,_0x4403c4)=>(_0x2859df,_0x39e467)=>_0x4403c4(_0x2859df,_0x39e467,_0x14278c);let _=class extends _0x50a167{constructor(_0x51b89c,_0x1f169c,_0x5f3951,_0xffe9c6){const _0x8f5bf9=_0x1bdfca;super(),this[_0x8f5bf9(0x21a)]=_0x51b89c,this['_threadCommentModel']=_0x1f169c,this[_0x8f5bf9(0x239)]=_0x5f3951,this[_0x8f5bf9(0x228)]=_0xffe9c6,this[_0x8f5bf9(0x22f)](),this[_0x8f5bf9(0x221)]();}[_0x1bdfca(0x221)](){const _0x158fa4=_0x1bdfca;this[_0x158fa4(0x21b)](this['_threadCommentModel'][_0x158fa4(0x23d)][_0x158fa4(0x1ea)](_0x2e4209(0x10))[_0x158fa4(0x20e)](_0xc6c4bb=>{const _0x2cf343=new Set();_0xc6c4bb['forEach'](_0x473dea=>{const _0x483fb6=_0x5533;switch(_0x473dea[_0x483fb6(0x208)]){case'add':{const _0xc44d10=_0x473dea[_0x483fb6(0x225)][_0x483fb6(0x24a)];_0x2cf343['add'](_0xc44d10);break;}}}),B(this['_injector'],_0x2cf343);}));}[_0x1bdfca(0x22f)](){const _0x7bf000=_0x1bdfca;this[_0x7bf000(0x21b)](this[_0x7bf000(0x21a)][_0x7bf000(0x23d)][_0x7bf000(0x20e)](async _0x49ac9e=>{const _0x9491aa=_0x7bf000;var _0x49f8e3,_0x4ed501,_0xcc6137,_0x3fc950;const _0x28f568=(_0x49f8e3=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x5b532f=>_0x5b532f[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x49f8e3[_0x9491aa(0x1f4)];if(!_0x28f568)return;const {unitId:_0x1ed3e5,subUnitId:_0x4d723e}=_0x28f568;switch(_0x49ac9e['user']&&this['_userService'][_0x9491aa(0x21e)](_0x49ac9e[_0x9491aa(0x1f1)]),_0x49ac9e[_0x9491aa(0x208)]){case v['Add']:break;case v[_0x9491aa(0x245)]:{this[_0x9491aa(0x1ee)][_0x9491aa(0x210)](_0x1ed3e5,_0x4d723e,{'unitId':_0x1ed3e5,'subUnitId':_0x4d723e,'ref':'','id':_0x49ac9e[_0x9491aa(0x219)],'dT':y(+_0x49ac9e[_0x9491aa(0x23e)]),'threadId':_0x49ac9e['threadId'],'personId':(_0xcc6137=(_0x4ed501=_0x49ac9e[_0x9491aa(0x1f1)])==null?void 0x0:_0x4ed501['userID'])!=null?_0xcc6137:_0x49ac9e[_0x9491aa(0x247)],'text':JSON[_0x9491aa(0x20a)](_0x49ac9e[_0x9491aa(0x226)]),'parentId':_0x28f568['id']});break;}case v[_0x9491aa(0x21c)]:{const _0x407009=this[_0x9491aa(0x1ee)][_0x9491aa(0x244)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);_0x407009&&_0x407009['parentId']&&this['_threadCommentModel'][_0x9491aa(0x229)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);break;}case v['Edit']:{this[_0x9491aa(0x1ee)]['updateComment'](_0x1ed3e5,_0x4d723e,{'commentId':_0x49ac9e[_0x9491aa(0x219)],'text':JSON['parse'](_0x49ac9e[_0x9491aa(0x226)])});break;}case v[_0x9491aa(0x22a)]:{const _0x42e457=(_0x3fc950=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x58225e=>_0x58225e[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x3fc950['root'];_0x42e457&&this['_threadCommentModel'][_0x9491aa(0x22d)](_0x1ed3e5,_0x4d723e,_0x42e457['id'],_0x49ac9e['solved']===I[_0x9491aa(0x1f2)]);break;}}}));}};_=V([p(0x0,_0x58577d(_0x494070)),p(0x1,_0x58577d(_0x303d6b)),p(0x2,_0x58577d(_0x2ebc4d)),p(0x3,_0x58577d(_0x418b1b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1bdfca(0x1f0)],Q=(_0x409e4a,_0x4c9b9e,_0x5c2103,_0x97cd34)=>{const _0x47b94b=_0x1bdfca;for(var _0x8ee573=_0x97cd34>0x1?void 0x0:_0x97cd34?k(_0x4c9b9e,_0x5c2103):_0x4c9b9e,_0x5bfe73=_0x409e4a[_0x47b94b(0x223)]-0x1,_0x19e3ce;_0x5bfe73>=0x0;_0x5bfe73--)(_0x19e3ce=_0x409e4a[_0x5bfe73])&&(_0x8ee573=_0x19e3ce(_0x8ee573)||_0x8ee573);return _0x8ee573;},b=(_0x2fca9f,_0x283211)=>(_0xba5294,_0x245891)=>_0x283211(_0xba5294,_0x245891,_0x2fca9f);function X(_0x1095fd,_0x4ab505){const _0x4500c9=_0x1bdfca,_0x24582c=_0x1095fd[_0x4500c9(0x233)][0x0];return{..._0x4ab505,'id':_0x24582c[_0x4500c9(0x219)],'resolved':_0x1095fd[_0x4500c9(0x234)]===0x1,'dT':y(_0x24582c[_0x4500c9(0x23e)]),'personId':_0x24582c[_0x4500c9(0x247)],'threadId':_0x24582c[_0x4500c9(0x224)]};}function _0x5533(_0x4a58e5,_0x3cb8b5){_0x4a58e5=_0x4a58e5-0x1e8;const _0x51a9e6=_0x51a9();let _0x5533ca=_0x51a9e6[_0x4a58e5];return _0x5533ca;}function ee(_0x36163f,_0x50ee22,_0x3a19d6){const _0x442797=_0x1bdfca;var _0x4fddae,_0xd0e08c;if(((_0xd0e08c=(_0x4fddae=_0x36163f==null?void 0x0:_0x36163f[_0x442797(0x233)])==null?void 0x0:_0x4fddae[_0x442797(0x223)])!=null?_0xd0e08c:0x0)>0x0){const _0x448bad=(_0x6411f2,_0x57cfe7)=>({'id':_0x6411f2['replyId'],'threadId':_0x6411f2['threadId'],'dT':y(_0x6411f2['createTimestamp']),'personId':_0x6411f2[_0x442797(0x247)],'resolved':_0x36163f[_0x442797(0x234)]===I[_0x442797(0x1f2)],'unitId':_0x50ee22,'subUnitId':_0x3a19d6,'text':JSON[_0x442797(0x20a)](_0x6411f2[_0x442797(0x226)]),'parentId':_0x57cfe7}),_0x3fd306=_0x448bad(_0x36163f[_0x442797(0x233)][0x0]);return{..._0x3fd306,'children':_0x36163f['replies']['slice'](0x1)[_0x442797(0x201)](_0x42ba3d=>_0x448bad(_0x42ba3d,_0x3fd306['id']))};}return null;}let S=class{constructor(_0x5d841f,_0x1a3dae,_0x1f07da){const _0x3e5caf=_0x1bdfca;this['_httpService']=_0x5d841f,this[_0x3e5caf(0x239)]=_0x1a3dae,this[_0x3e5caf(0x1f9)]=_0x1f07da;}async[_0x1bdfca(0x210)](_0x463269){const _0x202c68=_0x1bdfca;var _0x42cd19,_0x1729b8;const {parentId:_0x123226,unitId:_0x85051f,text:_0x5da09d,threadId:_0x26a88a}=_0x463269,_0x551e15=(_0x1729b8=(_0x42cd19=_0x5da09d[_0x202c68(0x243)])==null?void 0x0:_0x42cd19[_0x202c68(0x205)](_0x17b1c8=>_0x17b1c8[_0x202c68(0x216)]===_0x28d5b5[_0x202c68(0x20f)])[_0x202c68(0x201)](_0x28203b=>_0x28203b['rangeId']))!=null?_0x1729b8:[],_0x524a5b=JSON['stringify'](_0x5da09d),_0xe5e07f=(await this[_0x202c68(0x1f9)][_0x202c68(0x232)](_0x85051f))[_0x202c68(0x217)]();if(_0x123226){const _0x3e817b={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15,'threadId':_0x26a88a},_0x51ac0b=(await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x220),{'body':_0x3e817b}))[_0x202c68(0x23b)][_0x202c68(0x235)];return{..._0x463269,'id':_0x51ac0b[_0x202c68(0x219)],'dT':_0x118231(+_0x51ac0b[_0x202c68(0x23e)])[_0x202c68(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x51ac0b['userId']};}else{const _0x25d323={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15},_0x3b2385=await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x213),{'body':_0x25d323});return X(_0x3b2385[_0x202c68(0x23b)][_0x202c68(0x242)],_0x463269);}}async[_0x1bdfca(0x236)](_0x4b6f50){const _0x260d75=_0x1bdfca;var _0x7df826,_0x2beab6;const {text:_0x306ec8,unitId:_0x4c0d43}=_0x4b6f50,_0x329961=(_0x2beab6=(_0x7df826=_0x306ec8[_0x260d75(0x243)])==null?void 0x0:_0x7df826['filter'](_0xef5cae=>_0xef5cae[_0x260d75(0x216)]===_0x28d5b5[_0x260d75(0x20f)])['map'](_0x45152f=>_0x45152f[_0x260d75(0x246)]))!=null?_0x2beab6:[],_0x351942=JSON[_0x260d75(0x1ec)](_0x306ec8),_0x28f864=_0x4b6f50[_0x260d75(0x224)],_0x132bdd=_0x4b6f50['id'],_0x115f99={'memberId':(await this['_sessionService'][_0x260d75(0x232)](_0x4c0d43))[_0x260d75(0x217)](),'unitId':_0x4c0d43,'threadId':_0x28f864,'mention':_0x329961,'content':_0x351942,'replyId':_0x132bdd},_0x340398=await this[_0x260d75(0x22b)][_0x260d75(0x248)](_0x260d75(0x200)+_0x4c0d43+_0x260d75(0x1f7),{'body':_0x115f99});return!_0x340398['body']['error']||_0x340398[_0x260d75(0x23b)][_0x260d75(0x1f6)][_0x260d75(0x1ff)]===0x1;}async['resolveComment'](_0x25576f){const _0x1512e7=_0x1bdfca,{unitId:_0x312032}=_0x25576f,_0x275c9c=_0x25576f[_0x1512e7(0x224)],_0x94f4bb={'memberId':this[_0x1512e7(0x239)]['getCurrentUser']()[_0x1512e7(0x24b)],'unitId':_0x312032,'threadId':_0x275c9c,'solved':_0x25576f[_0x1512e7(0x214)]?I['Solved']:I[_0x1512e7(0x20c)]},_0x2c25e3=await this[_0x1512e7(0x22b)][_0x1512e7(0x248)](_0x1512e7(0x200)+_0x312032+_0x1512e7(0x211),{'body':_0x94f4bb});return!_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)]||_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)][_0x1512e7(0x1ff)]===0x1;}async[_0x1bdfca(0x229)](_0x59fa22,_0x434a33,_0x1bac73,_0x23c309){const _0x50abe8=_0x1bdfca,_0x79e59b={'memberId':(await this[_0x50abe8(0x1f9)][_0x50abe8(0x232)](_0x59fa22))[_0x50abe8(0x217)](),'threadId':_0x1bac73,'replyId':_0x23c309,'unitId':_0x59fa22},_0x56ecca=await this[_0x50abe8(0x22b)][_0x50abe8(0x248)](_0x50abe8(0x200)+_0x59fa22+'/delete',{'body':_0x79e59b});return!_0x56ecca[_0x50abe8(0x23b)]['error']||_0x56ecca[_0x50abe8(0x23b)][_0x50abe8(0x1f6)][_0x50abe8(0x1ff)]===0x1;}async[_0x1bdfca(0x206)](_0x17d402,_0x45630b,_0x3adc83){const _0x579531=_0x1bdfca,_0x4c4611={'unitId':_0x17d402,'threadId':_0x3adc83},_0x534a10=await this[_0x579531(0x22b)][_0x579531(0x248)]('/universer-api/comment/unit/'+_0x17d402+_0x579531(0x21f),{'body':_0x4c4611}),_0x3182f6=_0x3adc83[_0x579531(0x201)](_0xe5d033=>ee(_0x534a10['body'][_0x579531(0x1f5)][_0xe5d033],_0x17d402,_0x45630b))[_0x579531(0x205)](Boolean);return Object['values'](_0x534a10[_0x579531(0x23b)][_0x579531(0x1ef)])['forEach'](_0x2a4fa7=>{const _0x3367db=_0x579531;this['_userService'][_0x3367db(0x21e)](_0x2a4fa7);}),_0x3182f6;}['saveCommentToSnapshot'](_0x55ccf7){const _0x1a6028=_0x1bdfca;return{'id':_0x55ccf7['id'],'threadId':_0x55ccf7[_0x1a6028(0x224)],'ref':_0x55ccf7[_0x1a6028(0x1fa)]};}};S=Q([b(0x0,_0x58577d(_0x1f697f)),b(0x1,_0x58577d(_0x2ebc4d)),b(0x2,_0x58577d(_0x186ef6))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x38ca22,_0x45d8e2,_0x50a57a,_0x416bda)=>{const _0x925489=_0x1bdfca;for(var _0xf86d79=_0x416bda>0x1?void 0x0:_0x416bda?re(_0x45d8e2,_0x50a57a):_0x45d8e2,_0x3dc5ca=_0x38ca22[_0x925489(0x223)]-0x1,_0x13cefe;_0x3dc5ca>=0x0;_0x3dc5ca--)(_0x13cefe=_0x38ca22[_0x3dc5ca])&&(_0xf86d79=_0x13cefe(_0xf86d79)||_0xf86d79);return _0xf86d79;},M=(_0x4050a9,_0x4945f5)=>(_0x47a348,_0x4b5022)=>_0x4945f5(_0x47a348,_0x4b5022,_0x4050a9);let f=class extends _0x50a167{constructor(_0x571375,_0x166e60){const _0x4d30a3=_0x1bdfca;super(),this[_0x4d30a3(0x249)]=_0x571375,this[_0x4d30a3(0x23f)]=_0x166e60,this['_initDataSource']();}['_initDataSource'](){const _0x46dca6=_0x1bdfca;this[_0x46dca6(0x249)][_0x46dca6(0x231)]=this['_threadCommentDataSource'],this[_0x46dca6(0x249)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4babee),M(0x1,_0x58577d(S))],f);var se=Object[_0x1bdfca(0x22c)],oe=Object[_0x1bdfca(0x1f0)],ne=(_0x470bdd,_0x5f25e9,_0x523605)=>_0x5f25e9 in _0x470bdd?se(_0x470bdd,_0x5f25e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523605}):_0x470bdd[_0x5f25e9]=_0x523605,ie=(_0x306133,_0xd18e40,_0x35b6d1,_0x5bf0ba)=>{const _0x4a7b1c=_0x1bdfca;for(var _0x33a395=_0x5bf0ba>0x1?void 0x0:_0x5bf0ba?oe(_0xd18e40,_0x35b6d1):_0xd18e40,_0x17d2dc=_0x306133[_0x4a7b1c(0x223)]-0x1,_0x3fd7fa;_0x17d2dc>=0x0;_0x17d2dc--)(_0x3fd7fa=_0x306133[_0x17d2dc])&&(_0x33a395=_0x3fd7fa(_0x33a395)||_0x33a395);return _0x33a395;},N=(_0x19f5c4,_0x6fe8d5)=>(_0x26bdb4,_0x54669f)=>_0x6fe8d5(_0x26bdb4,_0x54669f,_0x19f5c4),$=(_0x4ccd71,_0x1bfa1f,_0x16bd86)=>ne(_0x4ccd71,typeof _0x1bfa1f!=_0x1bdfca(0x23a)?_0x1bfa1f+'':_0x1bfa1f,_0x16bd86);let g=class extends _0x10008e{constructor(_0x37fa83=O,_0x265c42,_0x50f65e){const _0x579b6a=_0x1bdfca;super(),this[_0x579b6a(0x20b)]=_0x37fa83,this['_injector']=_0x265c42,this[_0x579b6a(0x203)]=_0x50f65e;const {..._0x47930d}=_0xccd7ac({},O,this[_0x579b6a(0x20b)]);this[_0x579b6a(0x203)][_0x579b6a(0x218)](z,_0x47930d);}[_0x1bdfca(0x1e8)](){const _0x1dcd0a=_0x1bdfca;[[S],[f],[_]][_0x1dcd0a(0x240)](_0x14fcc3=>{const _0x55e342=_0x1dcd0a;this[_0x55e342(0x228)]['add'](_0x14fcc3);});}[_0x1bdfca(0x1fb)](){const _0x581d00=_0x1bdfca;this[_0x581d00(0x228)][_0x581d00(0x22e)](f),this[_0x581d00(0x228)][_0x581d00(0x22e)](_);}};$(g,_0x1bdfca(0x222),W),$(g,'type',_0x12b441[_0x1bdfca(0x204)]),g=ie([_0x1e955f(_0x23fc9b,_0x82913d,_0x1b76e0),N(0x1,_0x58577d(_0x418b1b)),N(0x2,_0x30ca1b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x22f4(){const _0x1d3983=['defineProperty','Module','dayjs','add','users','get','exports','1499643XxXRdt','Unknown','UniverThreadComment','forEach','addComment','/add','code','DependentOn','ThreadCommentModel','onReady','user','UniverInstanceType','syncUpdateMutationToColla','UniverCollaborationClientPlugin','_initUserSync','thread-comment-data-source.config','values','Disposable','1197588qDimJf','getComment','2058748deatBd','Injector','UniverThreadCommentUi','10hZQWMv','12490BzCUyP','userID','_threadCommentDataSourceService','@univerjs/network','find','@univerjs/thread-comment','subscribe','pipe','_userService','getOwnPropertyDescriptor','_httpService','payload','slice','_config','size','onStarting','Edit','_configService','addUser','Inject','/solved','/universer-api/comment/unit/','4597180klnwOa','Solved','rxjs','CustomRangeType','1ThehKj','requireSession','Plugin','_threadCommentModel','error','saveCommentToSnapshot','type','threadId','/reply','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/edit','Reply','getCurrentUser','format','parentId','Solve','merge','UniverProCollaborationClient','stringify','IThreadCommentDataSourceService','post','parse','YYYY/MM/DD\x20HH:mm','Add','dataSource','map','rangeType','unitId','/delete','8iixrzV','root','UniverThreadCommentDataSourcePlugin','4170330zPNEqT','ref','pluginName','Delete','body','updateComment','userId','resolveComment','OpenOrReOpen','_init','rangeId','function','amd','delete','customRanges','filter','_threadCommentDataSource','personId','createTimestamp','content','replies','comments','UNRECOGNIZED','disposeWithMe','44759bjYBvT','_injector','HTTPService','getMemberID','replyId','_sessionService','length','UniverProLicense','commentUpdate$','UserManagerService','solved','3025454ctsmZS'];_0x22f4=function(){return _0x1d3983;};return _0x22f4();}function _0x2946(_0x573ffd,_0xca1819){_0x573ffd=_0x573ffd-0x9e;const _0x22f4cc=_0x22f4();let _0x29467e=_0x22f4cc[_0x573ffd];return _0x29467e;}(function(_0x245cb3,_0xf6e2a){const _0x3166ff=_0x2946,_0x3e5d5a=_0x245cb3();while(!![]){try{const _0x2d1075=parseInt(_0x3166ff(0xb8))/0x1*(-parseInt(_0x3166ff(0xfd))/0x2)+-parseInt(_0x3166ff(0x117))/0x3+-parseInt(_0x3166ff(0x119))/0x4+-parseInt(_0x3166ff(0x11c))/0x5*(parseInt(_0x3166ff(0xda))/0x6)+-parseInt(_0x3166ff(0xb4))/0x7+parseInt(_0x3166ff(0xd7))/0x8*(parseInt(_0x3166ff(0x105))/0x9)+parseInt(_0x3166ff(0x9e))/0xa*(parseInt(_0x3166ff(0xf2))/0xb);if(_0x2d1075===_0xf6e2a)break;else _0x3e5d5a['push'](_0x3e5d5a['shift']());}catch(_0x5730be){_0x3e5d5a['push'](_0x3e5d5a['shift']());}}}(_0x22f4,0xbd4b4),function(_0x10f796,_0x162c10){const _0x5af409=_0x2946;typeof exports=='object'&&typeof module<'u'?_0x162c10(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5af409(0xe5)&&define[_0x5af409(0xe6)]?define([_0x5af409(0x104),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x5af409(0xa3),_0x5af409(0xb6),_0x5af409(0xa1)],_0x162c10):(_0x10f796=typeof globalThis<'u'?globalThis:_0x10f796||self,_0x162c10(_0x10f796['UniverProThreadCommentDatasource']={},_0x10f796[_0x5af409(0xcb)],_0x10f796[_0x5af409(0xf9)],_0x10f796['UniverCore'],_0x10f796[_0x5af409(0x11b)],_0x10f796[_0x5af409(0x107)],_0x10f796['rxjs'],_0x10f796['UniverNetwork']));}(this,function(_0x3d19a0,_0x323c91,_0x43588,_0x851170,_0x1daef5,_0x3b6309,_0x45bce8,_0x2629c9){'use strict';const _0x395cb0=_0x2946;const _0x44019f=_0x395cb0(0xc2);var _0x37e9b8=(_0x5e59a4=>(_0x5e59a4[_0x5e59a4['OpenOrReOpen']=0x0]=_0x395cb0(0xe2),_0x5e59a4[_0x5e59a4[_0x395cb0(0xb5)]=0x1]='Solved',_0x5e59a4[_0x5e59a4['UNRECOGNIZED']=-0x1]=_0x395cb0(0xf0),_0x5e59a4))(_0x37e9b8||{}),_0x20c545=(_0x3702dd=>(_0x3702dd[_0x3702dd['Unknown']=0x0]=_0x395cb0(0x106),_0x3702dd[_0x3702dd[_0x395cb0(0xd1)]=0x1]=_0x395cb0(0xd1),_0x3702dd[_0x3702dd[_0x395cb0(0xc5)]=0x2]=_0x395cb0(0xc5),_0x3702dd[_0x3702dd[_0x395cb0(0xae)]=0x3]='Edit',_0x3702dd[_0x3702dd[_0x395cb0(0xdd)]=0x4]=_0x395cb0(0xdd),_0x3702dd[_0x3702dd[_0x395cb0(0xc9)]=0x5]='Solve',_0x3702dd[_0x3702dd['UNRECOGNIZED']=-0x1]=_0x395cb0(0xf0),_0x3702dd))(_0x20c545||{});const _0x5e0d8f=_0x59be48=>_0x851170[_0x395cb0(0x100)](new Date(+_0x59be48))[_0x395cb0(0xc7)]('YYYY/MM/DD\x20HH:mm'),_0x2507bd=async(_0x251ee6,_0x3850bb)=>{const _0x3663c9=_0x395cb0,_0x8edbfb=_0x251ee6[_0x3663c9(0x103)](_0x851170['UserManagerService']),_0x50bb98=_0x251ee6[_0x3663c9(0x103)](_0x2629c9[_0x3663c9(0xf4)]);_0x3850bb[_0x3663c9(0x108)](_0x3c24ed=>{const _0x39cd4e=_0x3663c9;_0x8edbfb['getUser'](_0x3c24ed)&&_0x3850bb[_0x39cd4e(0xe7)](_0x3c24ed);}),_0x3850bb[_0x3663c9(0xac)]&&(await _0x50bb98['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3850bb]}}))['body'][_0x3663c9(0x102)][_0x3663c9(0x108)](_0x17efa6=>{const _0x453abd=_0x3663c9;_0x17efa6&&_0x8edbfb[_0x453abd(0xb0)](_0x17efa6);});};var _0x3b6d8e=Object[_0x395cb0(0xa7)],_0x569419=(_0x4892dc,_0x4068fb,_0x5a0a72,_0x40b98f)=>{const _0x57da7=_0x395cb0;for(var _0xad0646=_0x40b98f>0x1?void 0x0:_0x40b98f?_0x3b6d8e(_0x4068fb,_0x5a0a72):_0x4068fb,_0x4f7c24=_0x4892dc[_0x57da7(0xf8)]-0x1,_0xb94e18;_0x4f7c24>=0x0;_0x4f7c24--)(_0xb94e18=_0x4892dc[_0x4f7c24])&&(_0xad0646=_0xb94e18(_0xad0646)||_0xad0646);return _0xad0646;},_0x162d5d=(_0x567990,_0x353969)=>(_0x26a060,_0x5960f2)=>_0x353969(_0x26a060,_0x5960f2,_0x567990);let _0x3ecf5b=class extends _0x851170[_0x395cb0(0x116)]{constructor(_0x538608,_0xe543a,_0x53ceac,_0x19ee11){const _0x28de32=_0x395cb0;super(),this[_0x28de32(0xc1)]=_0x538608,this[_0x28de32(0xbb)]=_0xe543a,this[_0x28de32(0xa6)]=_0x53ceac,this['_injector']=_0x19ee11,this[_0x28de32(0xe3)](),this['_initUserSync']();}[_0x395cb0(0x113)](){const _0x1b8b5b=_0x395cb0;this[_0x1b8b5b(0xf1)](this['_threadCommentModel'][_0x1b8b5b(0xfa)][_0x1b8b5b(0xa5)](_0x45bce8['bufferTime'](0x10))[_0x1b8b5b(0xa4)](_0x246169=>{const _0x4ebcd0=_0x1b8b5b,_0x3448e8=new Set();_0x246169[_0x4ebcd0(0x108)](_0x3aa051=>{const _0x50f263=_0x4ebcd0;switch(_0x3aa051[_0x50f263(0xbe)]){case _0x50f263(0x101):{const _0x41b677=_0x3aa051[_0x50f263(0xa9)][_0x50f263(0xeb)];_0x3448e8[_0x50f263(0x101)](_0x41b677);break;}}}),_0x2507bd(this[_0x4ebcd0(0xf3)],_0x3448e8);}));}['_init'](){const _0x5d5b7a=_0x395cb0;this[_0x5d5b7a(0xf1)](this['_commentService'][_0x5d5b7a(0xfa)][_0x5d5b7a(0xa4)](async _0x105362=>{const _0x46d03f=_0x5d5b7a;var _0x2df702,_0x2802f3,_0x43f747,_0x17b230;const _0x27cffa=(_0x2df702=this['_threadCommentModel'][_0x46d03f(0xc3)](_0x105362[_0x46d03f(0xd5)])[_0x46d03f(0xa2)](_0x31a109=>_0x31a109[_0x46d03f(0xbf)]===_0x105362[_0x46d03f(0xbf)]))==null?void 0x0:_0x2df702[_0x46d03f(0xd8)];if(!_0x27cffa)return;const {unitId:_0x5c979d,subUnitId:_0x5c72ab}=_0x27cffa;switch(_0x105362[_0x46d03f(0x10f)]&&this[_0x46d03f(0xa6)][_0x46d03f(0xb0)](_0x105362[_0x46d03f(0x10f)]),_0x105362[_0x46d03f(0xbe)]){case _0x20c545[_0x46d03f(0xd1)]:break;case _0x20c545[_0x46d03f(0xc5)]:{this[_0x46d03f(0xbb)]['addComment'](_0x5c979d,_0x5c72ab,{'unitId':_0x5c979d,'subUnitId':_0x5c72ab,'ref':'','id':_0x105362[_0x46d03f(0xf6)],'dT':_0x5e0d8f(+_0x105362['createTimestamp']),'threadId':_0x105362[_0x46d03f(0xbf)],'personId':(_0x43f747=(_0x2802f3=_0x105362[_0x46d03f(0x10f)])==null?void 0x0:_0x2802f3[_0x46d03f(0x9f)])!=null?_0x43f747:_0x105362[_0x46d03f(0xe0)],'text':JSON['parse'](_0x105362['content']),'parentId':_0x27cffa['id']});break;}case _0x20c545[_0x46d03f(0xdd)]:{const _0x21bf0=this['_threadCommentModel'][_0x46d03f(0x118)](_0x5c979d,_0x5c72ab,_0x105362['replyId']);_0x21bf0&&_0x21bf0[_0x46d03f(0xc8)]&&this[_0x46d03f(0xbb)]['deleteComment'](_0x5c979d,_0x5c72ab,_0x105362['replyId']);break;}case _0x20c545[_0x46d03f(0xae)]:{this[_0x46d03f(0xbb)][_0x46d03f(0xdf)](_0x5c979d,_0x5c72ab,{'commentId':_0x105362[_0x46d03f(0xf6)],'text':JSON['parse'](_0x105362['content'])});break;}case _0x20c545[_0x46d03f(0xc9)]:{const _0x11522d=(_0x17b230=this[_0x46d03f(0xbb)]['getUnit'](_0x105362[_0x46d03f(0xd5)])['find'](_0x353f72=>_0x353f72[_0x46d03f(0xbf)]===_0x105362[_0x46d03f(0xbf)]))==null?void 0x0:_0x17b230[_0x46d03f(0xd8)];_0x11522d&&this['_threadCommentModel'][_0x46d03f(0xe1)](_0x5c979d,_0x5c72ab,_0x11522d['id'],_0x105362[_0x46d03f(0xfc)]===_0x37e9b8[_0x46d03f(0xb5)]);break;}}}));}};_0x3ecf5b=_0x569419([_0x162d5d(0x0,_0x851170[_0x395cb0(0xb1)](_0x323c91['CommentService'])),_0x162d5d(0x1,_0x851170['Inject'](_0x3b6309[_0x395cb0(0x10d)])),_0x162d5d(0x2,_0x851170[_0x395cb0(0xb1)](_0x851170[_0x395cb0(0xfb)])),_0x162d5d(0x3,_0x851170[_0x395cb0(0xb1)](_0x851170['Injector']))],_0x3ecf5b);const _0x318184=_0x395cb0(0x114),_0x5e5749={};var _0x306f61=Object['getOwnPropertyDescriptor'],_0x4eddf0=(_0x2723fb,_0x571ab0,_0x414b6d,_0x5dbdf9)=>{for(var _0x40acaf=_0x5dbdf9>0x1?void 0x0:_0x5dbdf9?_0x306f61(_0x571ab0,_0x414b6d):_0x571ab0,_0x5c7ad4=_0x2723fb['length']-0x1,_0x21bf3a;_0x5c7ad4>=0x0;_0x5c7ad4--)(_0x21bf3a=_0x2723fb[_0x5c7ad4])&&(_0x40acaf=_0x21bf3a(_0x40acaf)||_0x40acaf);return _0x40acaf;},_0x4513ae=(_0x3f862a,_0x2e5959)=>(_0x4322fb,_0x7a6573)=>_0x2e5959(_0x4322fb,_0x7a6573,_0x3f862a);function _0x2d615d(_0xe399ac,_0xe5ad38){const _0x8c7345=_0x395cb0,_0x2c516b=_0xe399ac[_0x8c7345(0xee)][0x0];return{..._0xe5ad38,'id':_0x2c516b['replyId'],'resolved':_0xe399ac[_0x8c7345(0xfc)]===0x1,'dT':_0x5e0d8f(_0x2c516b[_0x8c7345(0xec)]),'personId':_0x2c516b[_0x8c7345(0xe0)],'threadId':_0x2c516b['threadId']};}function _0x244604(_0x477cd7,_0x4ac8b1,_0x521b23){const _0x6a33ff=_0x395cb0;var _0x1d8ed5,_0x55c706;if(((_0x55c706=(_0x1d8ed5=_0x477cd7==null?void 0x0:_0x477cd7[_0x6a33ff(0xee)])==null?void 0x0:_0x1d8ed5[_0x6a33ff(0xf8)])!=null?_0x55c706:0x0)>0x0){const _0x1bd37e=(_0x1d9af5,_0xf34887)=>({'id':_0x1d9af5[_0x6a33ff(0xf6)],'threadId':_0x1d9af5[_0x6a33ff(0xbf)],'dT':_0x5e0d8f(_0x1d9af5[_0x6a33ff(0xec)]),'personId':_0x1d9af5['userId'],'resolved':_0x477cd7['solved']===_0x37e9b8['Solved'],'unitId':_0x4ac8b1,'subUnitId':_0x521b23,'text':JSON[_0x6a33ff(0xcf)](_0x1d9af5[_0x6a33ff(0xed)]),'parentId':_0xf34887}),_0x47119d=_0x1bd37e(_0x477cd7[_0x6a33ff(0xee)][0x0]);return{..._0x47119d,'children':_0x477cd7[_0x6a33ff(0xee)][_0x6a33ff(0xaa)](0x1)['map'](_0x4f0233=>_0x1bd37e(_0x4f0233,_0x47119d['id']))};}return null;}let _0x479b54=class{constructor(_0x42f12c,_0x28479f,_0x4d6327){const _0x17db6b=_0x395cb0;this[_0x17db6b(0xa8)]=_0x42f12c,this[_0x17db6b(0xa6)]=_0x28479f,this[_0x17db6b(0xf7)]=_0x4d6327;}async[_0x395cb0(0x109)](_0x1ab694){const _0x33dc6b=_0x395cb0;var _0x1b889e,_0x39ece9;const {parentId:_0x4ca085,unitId:_0x1f7cd4,text:_0x4b299e,threadId:_0x58cb93}=_0x1ab694,_0x2d28de=(_0x39ece9=(_0x1b889e=_0x4b299e[_0x33dc6b(0xe8)])==null?void 0x0:_0x1b889e['filter'](_0x1d24f0=>_0x1d24f0[_0x33dc6b(0xd4)]===_0x851170[_0x33dc6b(0xb7)]['COMMENT'])[_0x33dc6b(0xd3)](_0xd2c274=>_0xd2c274[_0x33dc6b(0xe4)]))!=null?_0x39ece9:[],_0x50b604=JSON[_0x33dc6b(0xcc)](_0x4b299e),_0x5363d4=(await this[_0x33dc6b(0xf7)]['requireSession'](_0x1f7cd4))[_0x33dc6b(0xf5)]();if(_0x4ca085){const _0x352985={'memberId':_0x5363d4,'unitId':_0x1f7cd4,'content':_0x50b604,'mention':_0x2d28de,'threadId':_0x58cb93},_0x1a0148=(await this[_0x33dc6b(0xa8)][_0x33dc6b(0xce)]('/universer-api/comment/unit/'+_0x1f7cd4+_0x33dc6b(0xc0),{'body':_0x352985}))[_0x33dc6b(0xde)]['reply'];return{..._0x1ab694,'id':_0x1a0148[_0x33dc6b(0xf6)],'dT':_0x851170[_0x33dc6b(0x100)](+_0x1a0148[_0x33dc6b(0xec)])['format'](_0x33dc6b(0xd0)),'personId':_0x1a0148[_0x33dc6b(0xe0)]};}else{const _0x16e62c={'memberId':_0x5363d4,'unitId':_0x1f7cd4,'content':_0x50b604,'mention':_0x2d28de},_0x280bad=await this[_0x33dc6b(0xa8)][_0x33dc6b(0xce)](_0x33dc6b(0xb3)+_0x1f7cd4+_0x33dc6b(0x10a),{'body':_0x16e62c});return _0x2d615d(_0x280bad[_0x33dc6b(0xde)]['comment'],_0x1ab694);}}async[_0x395cb0(0xdf)](_0x5e38f2){const _0x1bab11=_0x395cb0;var _0x922ebf,_0x714df9;const {text:_0x5a48a1,unitId:_0x3f77a0}=_0x5e38f2,_0x3f2e2a=(_0x714df9=(_0x922ebf=_0x5a48a1[_0x1bab11(0xe8)])==null?void 0x0:_0x922ebf[_0x1bab11(0xe9)](_0x13e217=>_0x13e217['rangeType']===_0x851170[_0x1bab11(0xb7)]['COMMENT'])[_0x1bab11(0xd3)](_0x1adaf7=>_0x1adaf7['rangeId']))!=null?_0x714df9:[],_0x48835d=JSON[_0x1bab11(0xcc)](_0x5a48a1),_0x20bf8c=_0x5e38f2[_0x1bab11(0xbf)],_0x542d45=_0x5e38f2['id'],_0x3a663e={'memberId':(await this[_0x1bab11(0xf7)][_0x1bab11(0xb9)](_0x3f77a0))[_0x1bab11(0xf5)](),'unitId':_0x3f77a0,'threadId':_0x20bf8c,'mention':_0x3f2e2a,'content':_0x48835d,'replyId':_0x542d45},_0xdc4747=await this[_0x1bab11(0xa8)][_0x1bab11(0xce)]('/universer-api/comment/unit/'+_0x3f77a0+_0x1bab11(0xc4),{'body':_0x3a663e});return!_0xdc4747[_0x1bab11(0xde)][_0x1bab11(0xbc)]||_0xdc4747[_0x1bab11(0xde)][_0x1bab11(0xbc)]['code']===0x1;}async[_0x395cb0(0xe1)](_0x5d2f21){const _0x208513=_0x395cb0,{unitId:_0x4b698f}=_0x5d2f21,_0x4b83f6=_0x5d2f21[_0x208513(0xbf)],_0x1dfced={'memberId':this[_0x208513(0xa6)][_0x208513(0xc6)]()[_0x208513(0x9f)],'unitId':_0x4b698f,'threadId':_0x4b83f6,'solved':_0x5d2f21['resolved']?_0x37e9b8['Solved']:_0x37e9b8[_0x208513(0xe2)]},_0x217fea=await this[_0x208513(0xa8)][_0x208513(0xce)](_0x208513(0xb3)+_0x4b698f+_0x208513(0xb2),{'body':_0x1dfced});return!_0x217fea[_0x208513(0xde)][_0x208513(0xbc)]||_0x217fea['body'][_0x208513(0xbc)][_0x208513(0x10b)]===0x1;}async['deleteComment'](_0x4c18fd,_0x2490e7,_0x1ab53f,_0x2212bc){const _0x55751a=_0x395cb0,_0x232e0e={'memberId':(await this['_sessionService'][_0x55751a(0xb9)](_0x4c18fd))[_0x55751a(0xf5)](),'threadId':_0x1ab53f,'replyId':_0x2212bc,'unitId':_0x4c18fd},_0x2ece6f=await this[_0x55751a(0xa8)][_0x55751a(0xce)](_0x55751a(0xb3)+_0x4c18fd+_0x55751a(0xd6),{'body':_0x232e0e});return!_0x2ece6f['body']['error']||_0x2ece6f['body']['error'][_0x55751a(0x10b)]===0x1;}async['listComments'](_0x42b5f8,_0x45b4ff,_0x17dc24){const _0x55bf5f=_0x395cb0,_0x4b3867={'unitId':_0x42b5f8,'threadId':_0x17dc24},_0x351a8b=await this[_0x55bf5f(0xa8)][_0x55bf5f(0xce)](_0x55bf5f(0xb3)+_0x42b5f8+'/list',{'body':_0x4b3867}),_0x449fd3=_0x17dc24['map'](_0x265bd0=>_0x244604(_0x351a8b[_0x55bf5f(0xde)][_0x55bf5f(0xef)][_0x265bd0],_0x42b5f8,_0x45b4ff))[_0x55bf5f(0xe9)](Boolean);return Object[_0x55bf5f(0x115)](_0x351a8b[_0x55bf5f(0xde)][_0x55bf5f(0x102)])[_0x55bf5f(0x108)](_0x59c5d1=>{const _0xda1a92=_0x55bf5f;this[_0xda1a92(0xa6)][_0xda1a92(0xb0)](_0x59c5d1);}),_0x449fd3;}[_0x395cb0(0xbd)](_0x9ba281){const _0x4adb78=_0x395cb0;return{'id':_0x9ba281['id'],'threadId':_0x9ba281[_0x4adb78(0xbf)],'ref':_0x9ba281[_0x4adb78(0xdb)]};}};_0x479b54=_0x4eddf0([_0x4513ae(0x0,_0x851170[_0x395cb0(0xb1)](_0x2629c9[_0x395cb0(0xf4)])),_0x4513ae(0x1,_0x851170['Inject'](_0x851170[_0x395cb0(0xfb)])),_0x4513ae(0x2,_0x851170[_0x395cb0(0xb1)](_0x323c91['CollaborationSessionService']))],_0x479b54);var _0x508a90=Object[_0x395cb0(0xa7)],_0x570dd8=(_0x1a410d,_0x1aba50,_0xd7d79f,_0x4eddc4)=>{for(var _0xfe983c=_0x4eddc4>0x1?void 0x0:_0x4eddc4?_0x508a90(_0x1aba50,_0xd7d79f):_0x1aba50,_0x51ba26=_0x1a410d['length']-0x1,_0x54e498;_0x51ba26>=0x0;_0x51ba26--)(_0x54e498=_0x1a410d[_0x51ba26])&&(_0xfe983c=_0x54e498(_0xfe983c)||_0xfe983c);return _0xfe983c;},_0x99d86c=(_0x35f1e3,_0x2e01a2)=>(_0x911f46,_0x1a1577)=>_0x2e01a2(_0x911f46,_0x1a1577,_0x35f1e3);let _0xf85777=class extends _0x851170[_0x395cb0(0x116)]{constructor(_0x47f8cd,_0x552627){const _0x12d275=_0x395cb0;super(),this[_0x12d275(0xa0)]=_0x47f8cd,this[_0x12d275(0xea)]=_0x552627,this['_initDataSource']();}['_initDataSource'](){const _0xc7a85d=_0x395cb0;this[_0xc7a85d(0xa0)][_0xc7a85d(0xd2)]=this['_threadCommentDataSource'],this[_0xc7a85d(0xa0)][_0xc7a85d(0x111)]=!0x1;}};_0xf85777=_0x570dd8([_0x99d86c(0x0,_0x3b6309[_0x395cb0(0xcd)]),_0x99d86c(0x1,_0x851170['Inject'](_0x479b54))],_0xf85777);var _0x1dc6cc=Object[_0x395cb0(0xfe)],_0x39bea6=Object['getOwnPropertyDescriptor'],_0x2bc154=(_0x361b33,_0x2647b3,_0x8ed16f)=>_0x2647b3 in _0x361b33?_0x1dc6cc(_0x361b33,_0x2647b3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8ed16f}):_0x361b33[_0x2647b3]=_0x8ed16f,_0x43c345=(_0xf9856b,_0x55a25b,_0x2315ac,_0x2c4df2)=>{const _0x8e9cd0=_0x395cb0;for(var _0x1f10c0=_0x2c4df2>0x1?void 0x0:_0x2c4df2?_0x39bea6(_0x55a25b,_0x2315ac):_0x55a25b,_0xcd379c=_0xf9856b[_0x8e9cd0(0xf8)]-0x1,_0xf6bcbf;_0xcd379c>=0x0;_0xcd379c--)(_0xf6bcbf=_0xf9856b[_0xcd379c])&&(_0x1f10c0=_0xf6bcbf(_0x1f10c0)||_0x1f10c0);return _0x1f10c0;},_0x28296a=(_0x6ad3a4,_0x12cd0b)=>(_0x4a72e2,_0x3181ee)=>_0x12cd0b(_0x4a72e2,_0x3181ee,_0x6ad3a4),_0x757c88=(_0x1747f7,_0x3a4811,_0x1c60ec)=>_0x2bc154(_0x1747f7,typeof _0x3a4811!='symbol'?_0x3a4811+'':_0x3a4811,_0x1c60ec);_0x3d19a0[_0x395cb0(0xd9)]=class extends _0x851170[_0x395cb0(0xba)]{constructor(_0x5472ad=_0x5e5749,_0x1c5f61,_0x18696d){const _0x505bb6=_0x395cb0;super(),this[_0x505bb6(0xab)]=_0x5472ad,this[_0x505bb6(0xf3)]=_0x1c5f61,this[_0x505bb6(0xaf)]=_0x18696d;const {..._0x1a65b3}=_0x851170[_0x505bb6(0xca)]({},_0x5e5749,this['_config']);this[_0x505bb6(0xaf)]['setConfig'](_0x318184,_0x1a65b3);}[_0x395cb0(0xad)](){const _0x2bf940=_0x395cb0;[[_0x479b54],[_0xf85777],[_0x3ecf5b]][_0x2bf940(0x108)](_0x517e94=>{const _0x2e15e4=_0x2bf940;this['_injector'][_0x2e15e4(0x101)](_0x517e94);});}[_0x395cb0(0x10e)](){const _0x102c59=_0x395cb0;this[_0x102c59(0xf3)]['get'](_0xf85777),this[_0x102c59(0xf3)][_0x102c59(0x103)](_0x3ecf5b);}},_0x757c88(_0x3d19a0['UniverThreadCommentDataSourcePlugin'],_0x395cb0(0xdc),_0x44019f),_0x757c88(_0x3d19a0[_0x395cb0(0xd9)],'type',_0x851170[_0x395cb0(0x110)]['UNIVER_UNKNOWN']),_0x3d19a0['UniverThreadCommentDataSourcePlugin']=_0x43c345([_0x851170[_0x395cb0(0x10c)](_0x1daef5['UniverThreadCommentUIPlugin'],_0x323c91[_0x395cb0(0x112)],_0x43588['UniverLicensePlugin']),_0x28296a(0x1,_0x851170[_0x395cb0(0xb1)](_0x851170[_0x395cb0(0x11a)])),_0x28296a(0x2,_0x851170['IConfigService'])],_0x3d19a0['UniverThreadCommentDataSourcePlugin']),Object[_0x395cb0(0xfe)](_0x3d19a0,Symbol['toStringTag'],{'value':_0x395cb0(0xff)});}));
|
|
1
|
+
function _0x49bd(){const _0x2b4341=['disposeWithMe','UniverThreadCommentUIPlugin','rxjs','post','_injector','updateComment','221076jHqOjz','customRanges','Unknown','OpenOrReOpen','reply','UniverProLicense','@univerjs-pro/license','parentId','Edit','comment','userId','format','addComment','CommentService','filter','_commentService','Add','content','map','requireSession','Solve','6821270CtaySs','symbol','getMemberID','UserManagerService','_initDataSource','saveCommentToSnapshot','subscribe','_config','getUser','Reply','createTimestamp','delete','1Tsschq','1097278WoxlRt','getOwnPropertyDescriptor','exports','object','1892421mhYmly','add','unitId','_httpService','Solved','/solved','_threadCommentModel','_initUserSync','18tvPwal','users','UniverProCollaborationClient','_threadCommentDataSource','threadId','userID','merge','_threadCommentDataSourceService','bufferTime','UniverInstanceType','@univerjs/network','replyId','_userService','error','deleteComment','slice','CustomRangeType','/delete','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','604445kxbWLG','Injector','UNIVER_UNKNOWN','forEach','onReady','_sessionService','getUnit','body','addUser','toStringTag','rangeId','@univerjs/thread-comment','find','getComment','@univerjs/core','DependentOn','459468UuUfVu','_init','stringify','UNRECOGNIZED','@univerjs/thread-comment-ui','personId','24FLrZwF','COMMENT','rangeType','IConfigService','_configService','payload','parse','defineProperty','UniverCore','values','code','length','Delete','amd','HTTPService','syncUpdateMutationToColla','IThreadCommentDataSourceService','dayjs','user','get','/edit','setConfig','Inject','/universer-api/comment/unit/','resolveComment','/universer-api/user/list','comments','root','UniverThreadCommentDataSourcePlugin','602358dhCeKY','type','/list','pipe','replies','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','UniverThreadComment'];_0x49bd=function(){return _0x2b4341;};return _0x49bd();}function _0x304b(_0x1341da,_0x37a169){_0x1341da=_0x1341da-0xae;const _0x49bdda=_0x49bd();let _0x304bb9=_0x49bdda[_0x1341da];return _0x304bb9;}(function(_0x1f9b10,_0x5800d4){const _0x5a9bc0=_0x304b,_0xa178ef=_0x1f9b10();while(!![]){try{const _0xaf423b=-parseInt(_0x5a9bc0(0xfb))/0x1*(-parseInt(_0x5a9bc0(0xcb))/0x2)+-parseInt(_0x5a9bc0(0x12c))/0x3+parseInt(_0x5a9bc0(0xda))/0x4+-parseInt(_0x5a9bc0(0x11c))/0x5*(parseInt(_0x5a9bc0(0x108))/0x6)+parseInt(_0x5a9bc0(0xfc))/0x7*(-parseInt(_0x5a9bc0(0xae))/0x8)+parseInt(_0x5a9bc0(0x100))/0x9+parseInt(_0x5a9bc0(0xef))/0xa;if(_0xaf423b===_0x5800d4)break;else _0xa178ef['push'](_0xa178ef['shift']());}catch(_0x367177){_0xa178ef['push'](_0xa178ef['shift']());}}}(_0x49bd,0x40267),function(_0x2c1fb6,_0x423ad1){const _0x353b80=_0x304b;typeof exports==_0x353b80(0xff)&&typeof module<'u'?_0x423ad1(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x353b80(0xbb)]?define([_0x353b80(0xfe),'@univerjs-pro/collaboration-client',_0x353b80(0xe0),_0x353b80(0x12a),_0x353b80(0x130),_0x353b80(0x127),_0x353b80(0xd6),_0x353b80(0x112)],_0x423ad1):(_0x2c1fb6=typeof globalThis<'u'?globalThis:_0x2c1fb6||self,_0x423ad1(_0x2c1fb6['UniverProThreadCommentDatasource']={},_0x2c1fb6[_0x353b80(0x10a)],_0x2c1fb6[_0x353b80(0xdf)],_0x2c1fb6[_0x353b80(0xb6)],_0x2c1fb6['UniverThreadCommentUi'],_0x2c1fb6[_0x353b80(0xd3)],_0x2c1fb6[_0x353b80(0xd6)],_0x2c1fb6['UniverNetwork']));}(this,function(_0x9e9bf4,_0x210bf8,_0x362b49,_0x202475,_0x373872,_0x4dc4ac,_0x2cd9a9,_0x507eab){'use strict';const _0x3e5609=_0x304b;const _0x279a9d=_0x3e5609(0xd1);var _0x19b0c8=(_0x15fcc5=>(_0x15fcc5[_0x15fcc5['OpenOrReOpen']=0x0]=_0x3e5609(0xdd),_0x15fcc5[_0x15fcc5[_0x3e5609(0x104)]=0x1]='Solved',_0x15fcc5[_0x15fcc5['UNRECOGNIZED']=-0x1]=_0x3e5609(0x12f),_0x15fcc5))(_0x19b0c8||{}),_0x3fcc7f=(_0x320b82=>(_0x320b82[_0x320b82[_0x3e5609(0xdc)]=0x0]=_0x3e5609(0xdc),_0x320b82[_0x320b82[_0x3e5609(0xea)]=0x1]='Add',_0x320b82[_0x320b82['Reply']=0x2]=_0x3e5609(0xf8),_0x320b82[_0x320b82[_0x3e5609(0xe2)]=0x3]=_0x3e5609(0xe2),_0x320b82[_0x320b82[_0x3e5609(0xba)]=0x4]=_0x3e5609(0xba),_0x320b82[_0x320b82[_0x3e5609(0xee)]=0x5]=_0x3e5609(0xee),_0x320b82[_0x320b82['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x320b82))(_0x3fcc7f||{});const _0x1eabda=_0x148376=>_0x202475['dayjs'](new Date(+_0x148376))[_0x3e5609(0xe5)](_0x3e5609(0x11b)),_0x22f5ce=async(_0x144b2b,_0x3c541d)=>{const _0x4dcc88=_0x3e5609,_0x4fcb45=_0x144b2b[_0x4dcc88(0xc1)](_0x202475[_0x4dcc88(0xf2)]),_0x1ccee2=_0x144b2b[_0x4dcc88(0xc1)](_0x507eab[_0x4dcc88(0xbc)]);_0x3c541d[_0x4dcc88(0x11f)](_0x4d5634=>{const _0xea520f=_0x4dcc88;_0x4fcb45[_0xea520f(0xf7)](_0x4d5634)&&_0x3c541d[_0xea520f(0xfa)](_0x4d5634);}),_0x3c541d['size']&&(await _0x1ccee2[_0x4dcc88(0xc1)](_0x4dcc88(0xc7),{'params':{'userIDs':[..._0x3c541d]}}))[_0x4dcc88(0x123)][_0x4dcc88(0x109)][_0x4dcc88(0x11f)](_0x4470f5=>{const _0xc69f1e=_0x4dcc88;_0x4470f5&&_0x4fcb45[_0xc69f1e(0x124)](_0x4470f5);});};var _0x4c9b0d=Object[_0x3e5609(0xfd)],_0x230cee=(_0x3fdcee,_0x33ebd6,_0x24ed6c,_0x51ae92)=>{for(var _0x48f846=_0x51ae92>0x1?void 0x0:_0x51ae92?_0x4c9b0d(_0x33ebd6,_0x24ed6c):_0x33ebd6,_0x2381ea=_0x3fdcee['length']-0x1,_0x4ede50;_0x2381ea>=0x0;_0x2381ea--)(_0x4ede50=_0x3fdcee[_0x2381ea])&&(_0x48f846=_0x4ede50(_0x48f846)||_0x48f846);return _0x48f846;},_0x212e72=(_0x37ec27,_0x3348ef)=>(_0x1f1ce7,_0x1ece43)=>_0x3348ef(_0x1f1ce7,_0x1ece43,_0x37ec27);let _0x4f3510=class extends _0x202475['Disposable']{constructor(_0x547705,_0x7eb2ad,_0x1e49f9,_0x395dba){const _0x350d4a=_0x3e5609;super(),this[_0x350d4a(0xe9)]=_0x547705,this[_0x350d4a(0x106)]=_0x7eb2ad,this[_0x350d4a(0x114)]=_0x1e49f9,this[_0x350d4a(0xd8)]=_0x395dba,this[_0x350d4a(0x12d)](),this[_0x350d4a(0x107)]();}[_0x3e5609(0x107)](){const _0xa7f7eb=_0x3e5609;this[_0xa7f7eb(0xd4)](this[_0xa7f7eb(0x106)]['commentUpdate$'][_0xa7f7eb(0xce)](_0x2cd9a9[_0xa7f7eb(0x110)](0x10))[_0xa7f7eb(0xf5)](_0xc625e2=>{const _0x15ede7=_0xa7f7eb,_0x33afd3=new Set();_0xc625e2[_0x15ede7(0x11f)](_0x5c84c6=>{const _0x5112ae=_0x15ede7;switch(_0x5c84c6['type']){case _0x5112ae(0x101):{const _0x3161b3=_0x5c84c6[_0x5112ae(0xb3)][_0x5112ae(0x131)];_0x33afd3[_0x5112ae(0x101)](_0x3161b3);break;}}}),_0x22f5ce(this[_0x15ede7(0xd8)],_0x33afd3);}));}[_0x3e5609(0x12d)](){const _0xc52f5b=_0x3e5609;this[_0xc52f5b(0xd4)](this[_0xc52f5b(0xe9)]['commentUpdate$'][_0xc52f5b(0xf5)](async _0x4f07fb=>{const _0x4bc363=_0xc52f5b;var _0x5aa5a0,_0x1816e0,_0x370da7,_0x2c8d62;const _0x12df3f=(_0x5aa5a0=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])[_0x4bc363(0x128)](_0x216a37=>_0x216a37[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x5aa5a0[_0x4bc363(0xc9)];if(!_0x12df3f)return;const {unitId:_0x485f78,subUnitId:_0x568ef5}=_0x12df3f;switch(_0x4f07fb[_0x4bc363(0xc0)]&&this['_userService'][_0x4bc363(0x124)](_0x4f07fb[_0x4bc363(0xc0)]),_0x4f07fb[_0x4bc363(0xcc)]){case _0x3fcc7f[_0x4bc363(0xea)]:break;case _0x3fcc7f['Reply']:{this[_0x4bc363(0x106)][_0x4bc363(0xe6)](_0x485f78,_0x568ef5,{'unitId':_0x485f78,'subUnitId':_0x568ef5,'ref':'','id':_0x4f07fb[_0x4bc363(0x113)],'dT':_0x1eabda(+_0x4f07fb['createTimestamp']),'threadId':_0x4f07fb[_0x4bc363(0x10c)],'personId':(_0x370da7=(_0x1816e0=_0x4f07fb['user'])==null?void 0x0:_0x1816e0[_0x4bc363(0x10d)])!=null?_0x370da7:_0x4f07fb[_0x4bc363(0xe4)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)]),'parentId':_0x12df3f['id']});break;}case _0x3fcc7f['Delete']:{const _0x329df3=this[_0x4bc363(0x106)][_0x4bc363(0x129)](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);_0x329df3&&_0x329df3[_0x4bc363(0xe1)]&&this['_threadCommentModel']['deleteComment'](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);break;}case _0x3fcc7f[_0x4bc363(0xe2)]:{this[_0x4bc363(0x106)][_0x4bc363(0xd9)](_0x485f78,_0x568ef5,{'commentId':_0x4f07fb[_0x4bc363(0x113)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)])});break;}case _0x3fcc7f[_0x4bc363(0xee)]:{const _0x1d3f2b=(_0x2c8d62=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])['find'](_0x34b950=>_0x34b950[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x2c8d62[_0x4bc363(0xc9)];_0x1d3f2b&&this[_0x4bc363(0x106)]['resolveComment'](_0x485f78,_0x568ef5,_0x1d3f2b['id'],_0x4f07fb[_0x4bc363(0xd0)]===_0x19b0c8[_0x4bc363(0x104)]);break;}}}));}};_0x4f3510=_0x230cee([_0x212e72(0x0,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xe7)])),_0x212e72(0x1,_0x202475['Inject'](_0x4dc4ac['ThreadCommentModel'])),_0x212e72(0x2,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x212e72(0x3,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)]))],_0x4f3510);const _0x5626f9=_0x3e5609(0x11a),_0x4f5793={};var _0x2207e8=Object[_0x3e5609(0xfd)],_0xb4a31d=(_0x26f0f6,_0x585f36,_0x803e07,_0x1d2a11)=>{const _0x412a91=_0x3e5609;for(var _0xcd4c23=_0x1d2a11>0x1?void 0x0:_0x1d2a11?_0x2207e8(_0x585f36,_0x803e07):_0x585f36,_0x3c2410=_0x26f0f6[_0x412a91(0xb9)]-0x1,_0x98604e;_0x3c2410>=0x0;_0x3c2410--)(_0x98604e=_0x26f0f6[_0x3c2410])&&(_0xcd4c23=_0x98604e(_0xcd4c23)||_0xcd4c23);return _0xcd4c23;},_0x208ff8=(_0x5cb5ee,_0x1d0691)=>(_0x21c860,_0x2bc8cd)=>_0x1d0691(_0x21c860,_0x2bc8cd,_0x5cb5ee);function _0x33b9b5(_0x403073,_0x421578){const _0x3d2876=_0x3e5609,_0x27f513=_0x403073[_0x3d2876(0xcf)][0x0];return{..._0x421578,'id':_0x27f513[_0x3d2876(0x113)],'resolved':_0x403073[_0x3d2876(0xd0)]===0x1,'dT':_0x1eabda(_0x27f513[_0x3d2876(0xf9)]),'personId':_0x27f513[_0x3d2876(0xe4)],'threadId':_0x27f513[_0x3d2876(0x10c)]};}function _0x2311b1(_0x56ee2b,_0x4f3cfa,_0x416fce){const _0x311ff3=_0x3e5609;var _0xbc7c97,_0x28487c;if(((_0x28487c=(_0xbc7c97=_0x56ee2b==null?void 0x0:_0x56ee2b['replies'])==null?void 0x0:_0xbc7c97[_0x311ff3(0xb9)])!=null?_0x28487c:0x0)>0x0){const _0xfcf787=(_0x270c80,_0x125a21)=>({'id':_0x270c80[_0x311ff3(0x113)],'threadId':_0x270c80[_0x311ff3(0x10c)],'dT':_0x1eabda(_0x270c80[_0x311ff3(0xf9)]),'personId':_0x270c80[_0x311ff3(0xe4)],'resolved':_0x56ee2b[_0x311ff3(0xd0)]===_0x19b0c8[_0x311ff3(0x104)],'unitId':_0x4f3cfa,'subUnitId':_0x416fce,'text':JSON[_0x311ff3(0xb4)](_0x270c80['content']),'parentId':_0x125a21}),_0x290e2f=_0xfcf787(_0x56ee2b['replies'][0x0]);return{..._0x290e2f,'children':_0x56ee2b['replies'][_0x311ff3(0x117)](0x1)['map'](_0x50099c=>_0xfcf787(_0x50099c,_0x290e2f['id']))};}return null;}let _0xdf0bdf=class{constructor(_0x56624b,_0x56d3f4,_0x1c217d){const _0x5bce36=_0x3e5609;this[_0x5bce36(0x103)]=_0x56624b,this['_userService']=_0x56d3f4,this[_0x5bce36(0x121)]=_0x1c217d;}async[_0x3e5609(0xe6)](_0x168e59){const _0x49cbfa=_0x3e5609;var _0x5c6078,_0x47ff27;const {parentId:_0x4da86b,unitId:_0x3914fe,text:_0x1dca7c,threadId:_0x5a989c}=_0x168e59,_0x29aef3=(_0x47ff27=(_0x5c6078=_0x1dca7c[_0x49cbfa(0xdb)])==null?void 0x0:_0x5c6078[_0x49cbfa(0xe8)](_0x3e8fa7=>_0x3e8fa7['rangeType']===_0x202475[_0x49cbfa(0x118)]['COMMENT'])[_0x49cbfa(0xec)](_0x385e81=>_0x385e81[_0x49cbfa(0x126)]))!=null?_0x47ff27:[],_0x4a149c=JSON[_0x49cbfa(0x12e)](_0x1dca7c),_0x362605=(await this[_0x49cbfa(0x121)][_0x49cbfa(0xed)](_0x3914fe))['getMemberID']();if(_0x4da86b){const _0x52f095={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3,'threadId':_0x5a989c},_0x395666=(await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)](_0x49cbfa(0xc5)+_0x3914fe+'/reply',{'body':_0x52f095}))['body'][_0x49cbfa(0xde)];return{..._0x168e59,'id':_0x395666[_0x49cbfa(0x113)],'dT':_0x202475[_0x49cbfa(0xbf)](+_0x395666[_0x49cbfa(0xf9)])[_0x49cbfa(0xe5)](_0x49cbfa(0x11b)),'personId':_0x395666['userId']};}else{const _0x1fa894={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3},_0x248c99=await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)]('/universer-api/comment/unit/'+_0x3914fe+'/add',{'body':_0x1fa894});return _0x33b9b5(_0x248c99[_0x49cbfa(0x123)][_0x49cbfa(0xe3)],_0x168e59);}}async['updateComment'](_0x5a535c){const _0x13bb1c=_0x3e5609;var _0x16e342,_0x25abcf;const {text:_0x5b4232,unitId:_0x2b2e10}=_0x5a535c,_0x549b7f=(_0x25abcf=(_0x16e342=_0x5b4232[_0x13bb1c(0xdb)])==null?void 0x0:_0x16e342[_0x13bb1c(0xe8)](_0x211152=>_0x211152[_0x13bb1c(0xb0)]===_0x202475[_0x13bb1c(0x118)][_0x13bb1c(0xaf)])[_0x13bb1c(0xec)](_0x3d69b8=>_0x3d69b8[_0x13bb1c(0x126)]))!=null?_0x25abcf:[],_0x4c6c13=JSON[_0x13bb1c(0x12e)](_0x5b4232),_0x919a62=_0x5a535c[_0x13bb1c(0x10c)],_0x482d0d=_0x5a535c['id'],_0x51f671={'memberId':(await this[_0x13bb1c(0x121)][_0x13bb1c(0xed)](_0x2b2e10))['getMemberID'](),'unitId':_0x2b2e10,'threadId':_0x919a62,'mention':_0x549b7f,'content':_0x4c6c13,'replyId':_0x482d0d},_0x3e61bd=await this[_0x13bb1c(0x103)][_0x13bb1c(0xd7)](_0x13bb1c(0xc5)+_0x2b2e10+_0x13bb1c(0xc2),{'body':_0x51f671});return!_0x3e61bd[_0x13bb1c(0x123)][_0x13bb1c(0x115)]||_0x3e61bd[_0x13bb1c(0x123)]['error']['code']===0x1;}async[_0x3e5609(0xc6)](_0x2303b8){const _0xc9f1ab=_0x3e5609,{unitId:_0x10386b}=_0x2303b8,_0x5c6a51=_0x2303b8['threadId'],_0x8bf873={'memberId':this[_0xc9f1ab(0x114)]['getCurrentUser']()[_0xc9f1ab(0x10d)],'unitId':_0x10386b,'threadId':_0x5c6a51,'solved':_0x2303b8['resolved']?_0x19b0c8[_0xc9f1ab(0x104)]:_0x19b0c8['OpenOrReOpen']},_0x12ba0a=await this[_0xc9f1ab(0x103)][_0xc9f1ab(0xd7)](_0xc9f1ab(0xc5)+_0x10386b+_0xc9f1ab(0x105),{'body':_0x8bf873});return!_0x12ba0a[_0xc9f1ab(0x123)]['error']||_0x12ba0a[_0xc9f1ab(0x123)][_0xc9f1ab(0x115)][_0xc9f1ab(0xb8)]===0x1;}async[_0x3e5609(0x116)](_0x3bc1be,_0x9e9625,_0x41ef59,_0x11f5cd){const _0x30a97f=_0x3e5609,_0x1c01f7={'memberId':(await this['_sessionService'][_0x30a97f(0xed)](_0x3bc1be))[_0x30a97f(0xf1)](),'threadId':_0x41ef59,'replyId':_0x11f5cd,'unitId':_0x3bc1be},_0x3f8fa8=await this['_httpService']['post'](_0x30a97f(0xc5)+_0x3bc1be+_0x30a97f(0x119),{'body':_0x1c01f7});return!_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)]||_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)][_0x30a97f(0xb8)]===0x1;}async['listComments'](_0x4ee892,_0x5d17b6,_0xbf7b2b){const _0x303bf2=_0x3e5609,_0xe64dc0={'unitId':_0x4ee892,'threadId':_0xbf7b2b},_0x88718a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4ee892+_0x303bf2(0xcd),{'body':_0xe64dc0}),_0x5e1eef=_0xbf7b2b[_0x303bf2(0xec)](_0x551f24=>_0x2311b1(_0x88718a[_0x303bf2(0x123)][_0x303bf2(0xc8)][_0x551f24],_0x4ee892,_0x5d17b6))[_0x303bf2(0xe8)](Boolean);return Object[_0x303bf2(0xb7)](_0x88718a[_0x303bf2(0x123)][_0x303bf2(0x109)])[_0x303bf2(0x11f)](_0x272551=>{const _0x23fb14=_0x303bf2;this[_0x23fb14(0x114)][_0x23fb14(0x124)](_0x272551);}),_0x5e1eef;}[_0x3e5609(0xf4)](_0x2c8f99){const _0x1ae9fa=_0x3e5609;return{'id':_0x2c8f99['id'],'threadId':_0x2c8f99[_0x1ae9fa(0x10c)],'ref':_0x2c8f99['ref']};}};_0xdf0bdf=_0xb4a31d([_0x208ff8(0x0,_0x202475['Inject'](_0x507eab['HTTPService'])),_0x208ff8(0x1,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x208ff8(0x2,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xd2)]))],_0xdf0bdf);var _0x27ff12=Object['getOwnPropertyDescriptor'],_0x5a430b=(_0x804519,_0xa83008,_0x22a1a4,_0x58094b)=>{const _0x33e9d6=_0x3e5609;for(var _0xfef8e4=_0x58094b>0x1?void 0x0:_0x58094b?_0x27ff12(_0xa83008,_0x22a1a4):_0xa83008,_0x45c851=_0x804519[_0x33e9d6(0xb9)]-0x1,_0x26e74b;_0x45c851>=0x0;_0x45c851--)(_0x26e74b=_0x804519[_0x45c851])&&(_0xfef8e4=_0x26e74b(_0xfef8e4)||_0xfef8e4);return _0xfef8e4;},_0x5d785c=(_0x1229f5,_0x2abb33)=>(_0x438bce,_0x41c468)=>_0x2abb33(_0x438bce,_0x41c468,_0x1229f5);let _0x2bb563=class extends _0x202475['Disposable']{constructor(_0x4803ab,_0x3adaf8){const _0x21160b=_0x3e5609;super(),this[_0x21160b(0x10f)]=_0x4803ab,this[_0x21160b(0x10b)]=_0x3adaf8,this[_0x21160b(0xf3)]();}['_initDataSource'](){const _0x378b7c=_0x3e5609;this[_0x378b7c(0x10f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x378b7c(0xbd)]=!0x1;}};_0x2bb563=_0x5a430b([_0x5d785c(0x0,_0x4dc4ac[_0x3e5609(0xbe)]),_0x5d785c(0x1,_0x202475['Inject'](_0xdf0bdf))],_0x2bb563);var _0x371113=Object[_0x3e5609(0xb5)],_0x304192=Object[_0x3e5609(0xfd)],_0xb62991=(_0x174803,_0xd98d41,_0x3bb23a)=>_0xd98d41 in _0x174803?_0x371113(_0x174803,_0xd98d41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3bb23a}):_0x174803[_0xd98d41]=_0x3bb23a,_0x251a17=(_0xfbf9af,_0x4ad050,_0x1a95f7,_0x4b9a68)=>{const _0x45803d=_0x3e5609;for(var _0x19a345=_0x4b9a68>0x1?void 0x0:_0x4b9a68?_0x304192(_0x4ad050,_0x1a95f7):_0x4ad050,_0x3bf28a=_0xfbf9af[_0x45803d(0xb9)]-0x1,_0x4373e3;_0x3bf28a>=0x0;_0x3bf28a--)(_0x4373e3=_0xfbf9af[_0x3bf28a])&&(_0x19a345=_0x4373e3(_0x19a345)||_0x19a345);return _0x19a345;},_0x360acd=(_0x4056c6,_0x2b1797)=>(_0x31bd9f,_0x2ae1da)=>_0x2b1797(_0x31bd9f,_0x2ae1da,_0x4056c6),_0x54f9de=(_0x144489,_0x480160,_0x5d9d6f)=>_0xb62991(_0x144489,typeof _0x480160!=_0x3e5609(0xf0)?_0x480160+'':_0x480160,_0x5d9d6f);_0x9e9bf4[_0x3e5609(0xca)]=class extends _0x202475['Plugin']{constructor(_0x42c1ca=_0x4f5793,_0x21479e,_0xfb189d){const _0x31c4b9=_0x3e5609;super(),this[_0x31c4b9(0xf6)]=_0x42c1ca,this[_0x31c4b9(0xd8)]=_0x21479e,this[_0x31c4b9(0xb2)]=_0xfb189d;const {..._0x5ade38}=_0x202475[_0x31c4b9(0x10e)]({},_0x4f5793,this[_0x31c4b9(0xf6)]);this[_0x31c4b9(0xb2)][_0x31c4b9(0xc3)](_0x5626f9,_0x5ade38);}['onStarting'](){[[_0xdf0bdf],[_0x2bb563],[_0x4f3510]]['forEach'](_0xb2c998=>{const _0x31f197=_0x304b;this[_0x31f197(0xd8)]['add'](_0xb2c998);});}[_0x3e5609(0x120)](){const _0x3f4ad0=_0x3e5609;this['_injector']['get'](_0x2bb563),this['_injector'][_0x3f4ad0(0xc1)](_0x4f3510);}},_0x54f9de(_0x9e9bf4[_0x3e5609(0xca)],'pluginName',_0x279a9d),_0x54f9de(_0x9e9bf4['UniverThreadCommentDataSourcePlugin'],_0x3e5609(0xcc),_0x202475[_0x3e5609(0x111)][_0x3e5609(0x11e)]),_0x9e9bf4[_0x3e5609(0xca)]=_0x251a17([_0x202475[_0x3e5609(0x12b)](_0x373872[_0x3e5609(0xd5)],_0x210bf8['UniverCollaborationClientPlugin'],_0x362b49['UniverLicensePlugin']),_0x360acd(0x1,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)])),_0x360acd(0x2,_0x202475[_0x3e5609(0xb1)])],_0x9e9bf4[_0x3e5609(0xca)]),Object['defineProperty'](_0x9e9bf4,Symbol[_0x3e5609(0x125)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.4-experimental.
|
|
3
|
+
"version": "0.12.4-experimental.20251210-d708bff",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/core": "0.12.4-experimental.
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/license": "0.12.4-experimental.20251210-d708bff",
|
|
49
|
+
"@univerjs/network": "0.12.4-experimental.20251210-d708bff",
|
|
50
|
+
"@univerjs/core": "0.12.4-experimental.20251210-d708bff",
|
|
51
|
+
"@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-d708bff",
|
|
52
|
+
"@univerjs/thread-comment": "0.12.4-experimental.20251210-d708bff",
|
|
52
53
|
"@univerjs/protocol": "0.1.47",
|
|
53
|
-
"@univerjs/thread-comment": "0.12.4-experimental.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.12.4-experimental.20251208-c4b8a44"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-d708bff"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|