@univerjs-pro/thread-comment-datasource 0.10.14-nightly.202511070628 → 0.10.14-nightly.202511070640
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 _0x342f94=_0x42c0;(function(_0x3ad902,_0x25431a){const _0x251bd3=_0x42c0,_0x510ba4=_0x3ad902();while(!![]){try{const _0x1ba60e=-parseInt(_0x251bd3(0x119))/0x1+parseInt(_0x251bd3(0xc4))/0x2+parseInt(_0x251bd3(0xbd))/0x3+-parseInt(_0x251bd3(0x108))/0x4*(parseInt(_0x251bd3(0x126))/0x5)+parseInt(_0x251bd3(0xba))/0x6*(-parseInt(_0x251bd3(0xef))/0x7)+-parseInt(_0x251bd3(0x101))/0x8*(-parseInt(_0x251bd3(0xf7))/0x9)+parseInt(_0x251bd3(0xc7))/0xa*(parseInt(_0x251bd3(0xcf))/0xb);if(_0x1ba60e===_0x25431a)break;else _0x510ba4['push'](_0x510ba4['shift']());}catch(_0xbc93ce){_0x510ba4['push'](_0x510ba4['shift']());}}}(_0x4a57,0x9a06f));function _0x4a57(){const _0x580f18=['deleteComment','values','Delete','customRanges','disposeWithMe','syncUpdateMutationToColla','342294jXOHYw','body','Unknown','141990uThtAR','UniverLicensePlugin','_commentService','add','get','user','parse','/list','110MkzvME','merge','getUnit','error','UniverCollaborationClientPlugin','forEach','symbol','parentId','setConfig','dayjs','format','_threadCommentModel','replyId','filter','_config','Module','_sessionService','_injector','createTimestamp','map','replies','onStarting','_initDataSource','type','_threadCommentDataSourceService','personId','slice','pipe','UNIVER_UNKNOWN','comment','UNRECOGNIZED','/universer-api/user/list','84063zhJVft','threadId','Edit','users','Reply','subscribe','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','3849201OREWHu','listComments','comments','userId','Solve','/delete','post','saveCommentToSnapshot','UniverInstanceType','CustomRangeType','8likdHl','UserManagerService','COMMENT','requireSession','Solved','userID','_configService','764LHUjFI','IConfigService','_httpService','rangeId','thread-comment-data-source.config','rangeType','getOwnPropertyDescriptor','HTTPService','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','unitId','addUser','dataSource','getMemberID','_userService','solved','145635ueIZbM','Add','getUser','addComment','size','find','commentUpdate$','content','_init','updateComment','getComment','Disposable','Plugin','28485CRiVBe','Inject','stringify','/edit','IThreadCommentDataSourceService','length','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','6ZcHLCB','payload','ThreadCommentModel','3407520NHsqMv'];_0x4a57=function(){return _0x580f18;};return _0x4a57();}Object[_0x342f94(0x112)](exports,Symbol['toStringTag'],{'value':_0x342f94(0xde)});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=_0x342f94(0x111);var I=(_0x6087d6=>(_0x6087d6[_0x6087d6['OpenOrReOpen']=0x0]=_0x342f94(0xf6),_0x6087d6[_0x6087d6[_0x342f94(0x105)]=0x1]='Solved',_0x6087d6[_0x6087d6[_0x342f94(0xed)]=-0x1]='UNRECOGNIZED',_0x6087d6))(I||{}),v=(_0xc43163=>(_0xc43163[_0xc43163[_0x342f94(0xc6)]=0x0]=_0x342f94(0xc6),_0xc43163[_0xc43163['Add']=0x1]=_0x342f94(0x11a),_0xc43163[_0xc43163[_0x342f94(0xf3)]=0x2]=_0x342f94(0xf3),_0xc43163[_0xc43163['Edit']=0x3]='Edit',_0xc43163[_0xc43163[_0x342f94(0xc0)]=0x4]=_0x342f94(0xc0),_0xc43163[_0xc43163[_0x342f94(0xfb)]=0x5]='Solve',_0xc43163[_0xc43163['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xc43163))(v||{});const f=_0x1dc30d=>c[_0x342f94(0xd8)](new Date(+_0x1dc30d))['format'](_0x342f94(0xb8)),R=async(_0x1e15ea,_0x549c7e)=>{const _0x5a330b=_0x342f94,_0x98a944=_0x1e15ea[_0x5a330b(0xcb)](c['UserManagerService']),_0x2f8418=_0x1e15ea[_0x5a330b(0xcb)](P[_0x5a330b(0x10f)]);_0x549c7e[_0x5a330b(0xd4)](_0x40729f=>{const _0x3cdce5=_0x5a330b;_0x98a944[_0x3cdce5(0x11b)](_0x40729f)&&_0x549c7e['delete'](_0x40729f);}),_0x549c7e[_0x5a330b(0x11d)]&&(await _0x2f8418[_0x5a330b(0xcb)](_0x5a330b(0xee),{'params':{'userIDs':[..._0x549c7e]}}))['body']['users']['forEach'](_0x3b18b6=>{const _0x15a3b6=_0x5a330b;_0x3b18b6&&_0x98a944[_0x15a3b6(0x114)](_0x3b18b6);});};var $=Object[_0x342f94(0x10e)],E=(_0x4d870b,_0xa58e17,_0x588729,_0x994d61)=>{const _0x2efe83=_0x342f94;for(var _0x5ebc1b=_0x994d61>0x1?void 0x0:_0x994d61?$(_0xa58e17,_0x588729):_0xa58e17,_0x19e4a3=_0x4d870b[_0x2efe83(0xb6)]-0x1,_0x280e53;_0x19e4a3>=0x0;_0x19e4a3--)(_0x280e53=_0x4d870b[_0x19e4a3])&&(_0x5ebc1b=_0x280e53(_0x5ebc1b)||_0x5ebc1b);return _0x5ebc1b;},S=(_0x51a2c5,_0x5ea9d4)=>(_0xa42c2a,_0x15457c)=>_0x5ea9d4(_0xa42c2a,_0x15457c,_0x51a2c5);let _=class extends c[_0x342f94(0x124)]{constructor(_0x3ec86c,_0x49b1f6,_0x2ebd8b,_0x3e9335){const _0x3064ff=_0x342f94;super(),this[_0x3064ff(0xc9)]=_0x3ec86c,this[_0x3064ff(0xda)]=_0x49b1f6,this[_0x3064ff(0x117)]=_0x2ebd8b,this[_0x3064ff(0xe0)]=_0x3e9335,this[_0x3064ff(0x121)](),this['_initUserSync']();}['_initUserSync'](){const _0x4e7462=_0x342f94;this[_0x4e7462(0xc2)](this[_0x4e7462(0xda)][_0x4e7462(0x11f)][_0x4e7462(0xea)](j['bufferTime'](0x10))[_0x4e7462(0xf4)](_0x3a4b29=>{const _0x3d445c=_0x4e7462,_0x10e27e=new Set();_0x3a4b29[_0x3d445c(0xd4)](_0x20afc7=>{const _0x507818=_0x3d445c;switch(_0x20afc7[_0x507818(0xe6)]){case _0x507818(0xca):{const _0x42bd71=_0x20afc7[_0x507818(0xbb)][_0x507818(0xe8)];_0x10e27e[_0x507818(0xca)](_0x42bd71);break;}}}),R(this['_injector'],_0x10e27e);}));}['_init'](){const _0x16414f=_0x342f94;this[_0x16414f(0xc2)](this[_0x16414f(0xc9)][_0x16414f(0x11f)][_0x16414f(0xf4)](async _0x5df3a1=>{const _0x428a1b=_0x16414f;var _0x1c62d0,_0xd6831d,_0x45df3f,_0x3a4cf1;const _0x30c1c0=(_0x1c62d0=this['_threadCommentModel'][_0x428a1b(0xd1)](_0x5df3a1['unitId'])['find'](_0x5bbc08=>_0x5bbc08[_0x428a1b(0xf0)]===_0x5df3a1[_0x428a1b(0xf0)]))==null?void 0x0:_0x1c62d0['root'];if(!_0x30c1c0)return;const {unitId:_0x2ea6c0,subUnitId:_0x4ad073}=_0x30c1c0;switch(_0x5df3a1['user']&&this[_0x428a1b(0x117)][_0x428a1b(0x114)](_0x5df3a1[_0x428a1b(0xcc)]),_0x5df3a1['type']){case v[_0x428a1b(0x11a)]:break;case v[_0x428a1b(0xf3)]:{this['_threadCommentModel']['addComment'](_0x2ea6c0,_0x4ad073,{'unitId':_0x2ea6c0,'subUnitId':_0x4ad073,'ref':'','id':_0x5df3a1[_0x428a1b(0xdb)],'dT':f(+_0x5df3a1[_0x428a1b(0xe1)]),'threadId':_0x5df3a1['threadId'],'personId':(_0x45df3f=(_0xd6831d=_0x5df3a1[_0x428a1b(0xcc)])==null?void 0x0:_0xd6831d[_0x428a1b(0x106)])!=null?_0x45df3f:_0x5df3a1[_0x428a1b(0xfa)],'text':JSON[_0x428a1b(0xcd)](_0x5df3a1[_0x428a1b(0x120)]),'parentId':_0x30c1c0['id']});break;}case v['Delete']:{const _0x25e9df=this[_0x428a1b(0xda)][_0x428a1b(0x123)](_0x2ea6c0,_0x4ad073,_0x5df3a1[_0x428a1b(0xdb)]);_0x25e9df&&_0x25e9df[_0x428a1b(0xd6)]&&this[_0x428a1b(0xda)][_0x428a1b(0xbe)](_0x2ea6c0,_0x4ad073,_0x5df3a1[_0x428a1b(0xdb)]);break;}case v[_0x428a1b(0xf1)]:{this[_0x428a1b(0xda)][_0x428a1b(0x122)](_0x2ea6c0,_0x4ad073,{'commentId':_0x5df3a1['replyId'],'text':JSON[_0x428a1b(0xcd)](_0x5df3a1[_0x428a1b(0x120)])});break;}case v[_0x428a1b(0xfb)]:{const _0x38b1b2=(_0x3a4cf1=this[_0x428a1b(0xda)]['getUnit'](_0x5df3a1[_0x428a1b(0x113)])[_0x428a1b(0x11e)](_0x498e20=>_0x498e20[_0x428a1b(0xf0)]===_0x5df3a1[_0x428a1b(0xf0)]))==null?void 0x0:_0x3a4cf1['root'];_0x38b1b2&&this[_0x428a1b(0xda)]['resolveComment'](_0x2ea6c0,_0x4ad073,_0x38b1b2['id'],_0x5df3a1[_0x428a1b(0x118)]===I[_0x428a1b(0x105)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c['Inject'](M[_0x342f94(0xbc)])),S(0x2,c['Inject'](c[_0x342f94(0x102)])),S(0x3,c[_0x342f94(0x127)](c['Injector']))],_);const q=_0x342f94(0x10c),D={};var A=Object[_0x342f94(0x10e)],x=(_0x481df1,_0x58892b,_0x2632be,_0x435ac0)=>{for(var _0x484daf=_0x435ac0>0x1?void 0x0:_0x435ac0?A(_0x58892b,_0x2632be):_0x58892b,_0x5d5bc7=_0x481df1['length']-0x1,_0x2a801d;_0x5d5bc7>=0x0;_0x5d5bc7--)(_0x2a801d=_0x481df1[_0x5d5bc7])&&(_0x484daf=_0x2a801d(_0x484daf)||_0x484daf);return _0x484daf;},C=(_0x2cd9d8,_0x22f673)=>(_0x116658,_0x30cc23)=>_0x22f673(_0x116658,_0x30cc23,_0x2cd9d8);function Y(_0x76ed73,_0x5846f8){const _0x1614be=_0x342f94,_0x555754=_0x76ed73[_0x1614be(0xe3)][0x0];return{..._0x5846f8,'id':_0x555754[_0x1614be(0xdb)],'resolved':_0x76ed73[_0x1614be(0x118)]===0x1,'dT':f(_0x555754[_0x1614be(0xe1)]),'personId':_0x555754[_0x1614be(0xfa)],'threadId':_0x555754['threadId']};}function G(_0x166dd0,_0x337348,_0x16b361){const _0x1312af=_0x342f94;var _0x4b59ef,_0xd95dd2;if(((_0xd95dd2=(_0x4b59ef=_0x166dd0==null?void 0x0:_0x166dd0[_0x1312af(0xe3)])==null?void 0x0:_0x4b59ef['length'])!=null?_0xd95dd2:0x0)>0x0){const _0x395c80=(_0x11830d,_0x546ffa)=>({'id':_0x11830d[_0x1312af(0xdb)],'threadId':_0x11830d['threadId'],'dT':f(_0x11830d['createTimestamp']),'personId':_0x11830d[_0x1312af(0xfa)],'resolved':_0x166dd0['solved']===I[_0x1312af(0x105)],'unitId':_0x337348,'subUnitId':_0x16b361,'text':JSON[_0x1312af(0xcd)](_0x11830d[_0x1312af(0x120)]),'parentId':_0x546ffa}),_0x54a749=_0x395c80(_0x166dd0[_0x1312af(0xe3)][0x0]);return{..._0x54a749,'children':_0x166dd0[_0x1312af(0xe3)][_0x1312af(0xe9)](0x1)[_0x1312af(0xe2)](_0x142241=>_0x395c80(_0x142241,_0x54a749['id']))};}return null;}let p=class{constructor(_0x43a6f9,_0x19e74f,_0x95e090){const _0x304b34=_0x342f94;this[_0x304b34(0x10a)]=_0x43a6f9,this[_0x304b34(0x117)]=_0x19e74f,this[_0x304b34(0xdf)]=_0x95e090;}async[_0x342f94(0x11c)](_0x33bc5){const _0x14f5bb=_0x342f94;var _0x40a94a,_0x2e6c32;const {parentId:_0x2e1c22,unitId:_0x5e8974,text:_0x2846b7,threadId:_0x275720}=_0x33bc5,_0x41a107=(_0x2e6c32=(_0x40a94a=_0x2846b7[_0x14f5bb(0xc1)])==null?void 0x0:_0x40a94a[_0x14f5bb(0xdc)](_0xbe35e5=>_0xbe35e5[_0x14f5bb(0x10d)]===c[_0x14f5bb(0x100)][_0x14f5bb(0x103)])['map'](_0x577c65=>_0x577c65[_0x14f5bb(0x10b)]))!=null?_0x2e6c32:[],_0x270cae=JSON[_0x14f5bb(0xb3)](_0x2846b7),_0x5daf65=(await this[_0x14f5bb(0xdf)][_0x14f5bb(0x104)](_0x5e8974))[_0x14f5bb(0x116)]();if(_0x2e1c22){const _0x1c5c45={'memberId':_0x5daf65,'unitId':_0x5e8974,'content':_0x270cae,'mention':_0x41a107,'threadId':_0x275720},_0x37fc9c=(await this['_httpService'][_0x14f5bb(0xfd)](_0x14f5bb(0xb9)+_0x5e8974+'/reply',{'body':_0x1c5c45}))['body']['reply'];return{..._0x33bc5,'id':_0x37fc9c['replyId'],'dT':c[_0x14f5bb(0xd8)](+_0x37fc9c['createTimestamp'])[_0x14f5bb(0xd9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37fc9c[_0x14f5bb(0xfa)]};}else{const _0x567fe0={'memberId':_0x5daf65,'unitId':_0x5e8974,'content':_0x270cae,'mention':_0x41a107},_0x308042=await this['_httpService'][_0x14f5bb(0xfd)]('/universer-api/comment/unit/'+_0x5e8974+'/add',{'body':_0x567fe0});return Y(_0x308042['body'][_0x14f5bb(0xec)],_0x33bc5);}}async['updateComment'](_0x4b3ee9){const _0xfedabd=_0x342f94;var _0x2da1ac,_0x56eea2;const {text:_0xb8c13a,unitId:_0x55431a}=_0x4b3ee9,_0x39022c=(_0x56eea2=(_0x2da1ac=_0xb8c13a[_0xfedabd(0xc1)])==null?void 0x0:_0x2da1ac[_0xfedabd(0xdc)](_0x5a5a68=>_0x5a5a68['rangeType']===c[_0xfedabd(0x100)][_0xfedabd(0x103)])['map'](_0x1dd82f=>_0x1dd82f[_0xfedabd(0x10b)]))!=null?_0x56eea2:[],_0x1441cb=JSON[_0xfedabd(0xb3)](_0xb8c13a),_0x25c9a9=_0x4b3ee9[_0xfedabd(0xf0)],_0x3cddfa=_0x4b3ee9['id'],_0x3e1ef3={'memberId':(await this[_0xfedabd(0xdf)][_0xfedabd(0x104)](_0x55431a))[_0xfedabd(0x116)](),'unitId':_0x55431a,'threadId':_0x25c9a9,'mention':_0x39022c,'content':_0x1441cb,'replyId':_0x3cddfa},_0x48d29a=await this[_0xfedabd(0x10a)][_0xfedabd(0xfd)]('/universer-api/comment/unit/'+_0x55431a+_0xfedabd(0xb4),{'body':_0x3e1ef3});return!_0x48d29a['body'][_0xfedabd(0xd2)]||_0x48d29a[_0xfedabd(0xc5)][_0xfedabd(0xd2)]['code']===0x1;}async['resolveComment'](_0x14e882){const _0x5cda04=_0x342f94,{unitId:_0x1a877f}=_0x14e882,_0x434bc5=_0x14e882['threadId'],_0x18ecc5={'memberId':this[_0x5cda04(0x117)]['getCurrentUser']()[_0x5cda04(0x106)],'unitId':_0x1a877f,'threadId':_0x434bc5,'solved':_0x14e882['resolved']?I[_0x5cda04(0x105)]:I[_0x5cda04(0xf6)]},_0x5a588b=await this[_0x5cda04(0x10a)][_0x5cda04(0xfd)](_0x5cda04(0xb9)+_0x1a877f+'/solved',{'body':_0x18ecc5});return!_0x5a588b[_0x5cda04(0xc5)]['error']||_0x5a588b[_0x5cda04(0xc5)][_0x5cda04(0xd2)]['code']===0x1;}async['deleteComment'](_0x446f9d,_0x3f009a,_0x14d9d7,_0x52b2c9){const _0x231b31=_0x342f94,_0x5ae7b2={'memberId':(await this[_0x231b31(0xdf)]['requireSession'](_0x446f9d))[_0x231b31(0x116)](),'threadId':_0x14d9d7,'replyId':_0x52b2c9,'unitId':_0x446f9d},_0x86cc9a=await this[_0x231b31(0x10a)]['post'](_0x231b31(0xb9)+_0x446f9d+_0x231b31(0xfc),{'body':_0x5ae7b2});return!_0x86cc9a[_0x231b31(0xc5)]['error']||_0x86cc9a['body'][_0x231b31(0xd2)]['code']===0x1;}async[_0x342f94(0xf8)](_0x3ff78c,_0x41e6ed,_0x23de14){const _0x53a34c=_0x342f94,_0x3d5efb={'unitId':_0x3ff78c,'threadId':_0x23de14},_0x59e830=await this[_0x53a34c(0x10a)][_0x53a34c(0xfd)](_0x53a34c(0xb9)+_0x3ff78c+_0x53a34c(0xce),{'body':_0x3d5efb}),_0x39c2d0=_0x23de14['map'](_0x155492=>G(_0x59e830[_0x53a34c(0xc5)][_0x53a34c(0xf9)][_0x155492],_0x3ff78c,_0x41e6ed))[_0x53a34c(0xdc)](Boolean);return Object[_0x53a34c(0xbf)](_0x59e830[_0x53a34c(0xc5)][_0x53a34c(0xf2)])[_0x53a34c(0xd4)](_0x3d50a2=>{const _0x3e44ae=_0x53a34c;this[_0x3e44ae(0x117)][_0x3e44ae(0x114)](_0x3d50a2);}),_0x39c2d0;}[_0x342f94(0xfe)](_0x10f101){return{'id':_0x10f101['id'],'threadId':_0x10f101['threadId'],'ref':_0x10f101['ref']};}};function _0x42c0(_0x3e69d0,_0x1ebf15){const _0x4a575d=_0x4a57();return _0x42c0=function(_0x42c0b4,_0xed804f){_0x42c0b4=_0x42c0b4-0xb3;let _0x519f2e=_0x4a575d[_0x42c0b4];return _0x519f2e;},_0x42c0(_0x3e69d0,_0x1ebf15);}p=x([C(0x0,c['Inject'](P[_0x342f94(0x10f)])),C(0x1,c[_0x342f94(0x127)](c['UserManagerService'])),C(0x2,c[_0x342f94(0x127)](b['CollaborationSessionService']))],p);var H=Object[_0x342f94(0x10e)],J=(_0x92fa4e,_0x10a10a,_0x4da55f,_0xdc810b)=>{const _0x14d69f=_0x342f94;for(var _0x55e283=_0xdc810b>0x1?void 0x0:_0xdc810b?H(_0x10a10a,_0x4da55f):_0x10a10a,_0x5269ed=_0x92fa4e[_0x14d69f(0xb6)]-0x1,_0x194630;_0x5269ed>=0x0;_0x5269ed--)(_0x194630=_0x92fa4e[_0x5269ed])&&(_0x55e283=_0x194630(_0x55e283)||_0x55e283);return _0x55e283;},y=(_0x26bdca,_0x43d06d)=>(_0x324775,_0x5b5ec6)=>_0x43d06d(_0x324775,_0x5b5ec6,_0x26bdca);let g=class extends c[_0x342f94(0x124)]{constructor(_0x3e675c,_0x41b5d1){const _0xa4c11f=_0x342f94;super(),this['_threadCommentDataSourceService']=_0x3e675c,this[_0xa4c11f(0xb7)]=_0x41b5d1,this['_initDataSource']();}[_0x342f94(0xe5)](){const _0x3898a3=_0x342f94;this[_0x3898a3(0xe7)][_0x3898a3(0x115)]=this[_0x3898a3(0xb7)],this[_0x3898a3(0xe7)][_0x3898a3(0xc3)]=!0x1;}};g=J([y(0x0,M[_0x342f94(0xb5)]),y(0x1,c[_0x342f94(0x127)](p))],g);var F=Object[_0x342f94(0x112)],L=Object[_0x342f94(0x10e)],Z=(_0x276f60,_0x53124f,_0xd2b8e8)=>_0x53124f in _0x276f60?F(_0x276f60,_0x53124f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd2b8e8}):_0x276f60[_0x53124f]=_0xd2b8e8,W=(_0x191e94,_0x38eb9d,_0xd07e57,_0x98efb1)=>{const _0x228b62=_0x342f94;for(var _0x261cde=_0x98efb1>0x1?void 0x0:_0x98efb1?L(_0x38eb9d,_0xd07e57):_0x38eb9d,_0x2fb9db=_0x191e94[_0x228b62(0xb6)]-0x1,_0x216069;_0x2fb9db>=0x0;_0x2fb9db--)(_0x216069=_0x191e94[_0x2fb9db])&&(_0x261cde=_0x216069(_0x261cde)||_0x261cde);return _0x261cde;},O=(_0x11375e,_0x14fef1)=>(_0x105beb,_0x2aa54b)=>_0x14fef1(_0x105beb,_0x2aa54b,_0x11375e),N=(_0x2bc4a6,_0x60092,_0x3ee51f)=>Z(_0x2bc4a6,typeof _0x60092!=_0x342f94(0xd5)?_0x60092+'':_0x60092,_0x3ee51f);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x342f94(0x125)]{constructor(_0x3ff9a3=D,_0x2fdaf0,_0x4c9416){const _0x36bec7=_0x342f94;super(),this[_0x36bec7(0xdd)]=_0x3ff9a3,this[_0x36bec7(0xe0)]=_0x2fdaf0,this[_0x36bec7(0x107)]=_0x4c9416;const {..._0x5b6018}=c[_0x36bec7(0xd0)]({},D,this['_config']);this['_configService'][_0x36bec7(0xd7)](q,_0x5b6018);}[_0x342f94(0xe4)](){[[p],[g],[_]]['forEach'](_0x23724f=>{const _0x26f2ad=_0x42c0;this['_injector'][_0x26f2ad(0xca)](_0x23724f);});}['onReady'](){const _0xe4434=_0x342f94;this[_0xe4434(0xe0)]['get'](g),this[_0xe4434(0xe0)]['get'](_);}},N(exports[_0x342f94(0xf5)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x342f94(0xff)][_0x342f94(0xeb)]),exports[_0x342f94(0xf5)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0x342f94(0xd3)],T[_0x342f94(0xc8)]),O(0x1,c[_0x342f94(0x127)](c[_0x342f94(0x110)])),O(0x2,c[_0x342f94(0x109)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';function _0xeebf(){const _0x571f90=['parse','code','requireSession','symbol','_sessionService','_threadCommentModel','addUser','ThreadCommentModel','/list','/add','/universer-api/comment/unit/','commentUpdate$','UNIVER_UNKNOWN','Injector','_injector','saveCommentToSnapshot','createTimestamp','stringify','format','subscribe','CustomRangeType','dayjs','Solve','CommentService','replies','pluginName','delete','IThreadCommentDataSourceService','getMemberID','deleteComment','216egMSgq','disposeWithMe','UniverThreadCommentDataSourcePlugin','_config','Edit','getOwnPropertyDescriptor','Module','UNRECOGNIZED','UniverCollaborationClientPlugin','replyId','/edit','onReady','length','userId','users','getCurrentUser','COMMENT','comments','_initUserSync','_userService','_initDataSource','unitId','_httpService','UniverInstanceType','syncUpdateMutationToColla','userID','5qVZMjy','175740TtaFKF','Disposable','UniverThreadCommentUIPlugin','85041aZUAzz','error','merge','dataSource','toStringTag','threadId','4675180ZQwaUU','payload','Unknown','forEach','map','1619548qLFovl','Reply','_threadCommentDataSource','HTTPService','add','_configService','Delete','get','CollaborationSessionService','filter','378888cftDHQ','customRanges','_threadCommentDataSourceService','getComment','size','type','post','/universer-api/user/list','3UuvXuO','_commentService','defineProperty','549396Pzgyni','Add','user','content','_init','addComment','values','UserManagerService','Solved','comment','/solved','root','reply','find','solved','394564BIqpBh','parentId','Inject','updateComment','resolveComment','body','YYYY/MM/DD\x20HH:mm','rangeId','thread-comment-data-source.config','UniverLicensePlugin','listComments','/reply','OpenOrReOpen','rangeType','personId','resolved'];_0xeebf=function(){return _0x571f90;};return _0xeebf();}const _0x343277=_0x1e16;(function(_0x253fe7,_0x2830ac){const _0x50a770=_0x1e16,_0x33b538=_0x253fe7();while(!![]){try{const _0x5add5b=parseInt(_0x50a770(0x185))/0x1+parseInt(_0x50a770(0x1b7))/0x2*(parseInt(_0x50a770(0x1a5))/0x3)+parseInt(_0x50a770(0x19d))/0x4*(-parseInt(_0x50a770(0x184))/0x5)+-parseInt(_0x50a770(0x1a8))/0x6+-parseInt(_0x50a770(0x193))/0x7+-parseInt(_0x50a770(0x1e5))/0x8*(parseInt(_0x50a770(0x188))/0x9)+parseInt(_0x50a770(0x18e))/0xa;if(_0x5add5b===_0x2830ac)break;else _0x33b538['push'](_0x33b538['shift']());}catch(_0x49459e){_0x33b538['push'](_0x33b538['shift']());}}}(_0xeebf,0x28f55));Object[_0x343277(0x1a7)](exports,Symbol[_0x343277(0x18c)],{'value':_0x343277(0x1eb)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543549=>(_0x543549[_0x543549[_0x343277(0x1c3)]=0x0]=_0x343277(0x1c3),_0x543549[_0x543549['Solved']=0x1]=_0x343277(0x1b0),_0x543549[_0x543549[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x543549))(I||{}),v=(_0x1c095f=>(_0x1c095f[_0x1c095f[_0x343277(0x190)]=0x0]=_0x343277(0x190),_0x1c095f[_0x1c095f[_0x343277(0x1a9)]=0x1]=_0x343277(0x1a9),_0x1c095f[_0x1c095f[_0x343277(0x194)]=0x2]='Reply',_0x1c095f[_0x1c095f[_0x343277(0x1e9)]=0x3]=_0x343277(0x1e9),_0x1c095f[_0x1c095f[_0x343277(0x199)]=0x4]='Delete',_0x1c095f[_0x1c095f[_0x343277(0x1dd)]=0x5]=_0x343277(0x1dd),_0x1c095f[_0x1c095f[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x1c095f))(v||{});const f=_0x5cc7b8=>c[_0x343277(0x1dc)](new Date(+_0x5cc7b8))['format'](_0x343277(0x1bd)),R=async(_0x1e8863,_0x2f8f6e)=>{const _0x278a82=_0x343277,_0x2a201a=_0x1e8863['get'](c[_0x278a82(0x1af)]),_0x2dc413=_0x1e8863[_0x278a82(0x19a)](P[_0x278a82(0x196)]);_0x2f8f6e['forEach'](_0xdb69bb=>{const _0x4bf723=_0x278a82;_0x2a201a['getUser'](_0xdb69bb)&&_0x2f8f6e[_0x4bf723(0x1e1)](_0xdb69bb);}),_0x2f8f6e[_0x278a82(0x1a1)]&&(await _0x2dc413['get'](_0x278a82(0x1a4),{'params':{'userIDs':[..._0x2f8f6e]}}))[_0x278a82(0x1bc)][_0x278a82(0x178)][_0x278a82(0x191)](_0x5cd1eb=>{const _0x1b88ea=_0x278a82;_0x5cd1eb&&_0x2a201a[_0x1b88ea(0x1cd)](_0x5cd1eb);});};var $=Object[_0x343277(0x1ea)],E=(_0x3049d0,_0x3e2ad6,_0x14e003,_0x5c8bb9)=>{const _0x4085a6=_0x343277;for(var _0x592e34=_0x5c8bb9>0x1?void 0x0:_0x5c8bb9?$(_0x3e2ad6,_0x14e003):_0x3e2ad6,_0x3408af=_0x3049d0[_0x4085a6(0x176)]-0x1,_0x4eafdd;_0x3408af>=0x0;_0x3408af--)(_0x4eafdd=_0x3049d0[_0x3408af])&&(_0x592e34=_0x4eafdd(_0x592e34)||_0x592e34);return _0x592e34;},S=(_0x5034f3,_0x4d8d85)=>(_0x3f3739,_0x4b5992)=>_0x4d8d85(_0x3f3739,_0x4b5992,_0x5034f3);let _=class extends c[_0x343277(0x186)]{constructor(_0x28cc22,_0x45cc9e,_0x2a18ac,_0x276156){const _0x40c795=_0x343277;super(),this[_0x40c795(0x1a6)]=_0x28cc22,this[_0x40c795(0x1cc)]=_0x45cc9e,this[_0x40c795(0x17d)]=_0x2a18ac,this[_0x40c795(0x1d5)]=_0x276156,this[_0x40c795(0x1ac)](),this[_0x40c795(0x17c)]();}[_0x343277(0x17c)](){const _0x531d3e=_0x343277;this['disposeWithMe'](this['_threadCommentModel'][_0x531d3e(0x1d2)]['pipe'](j['bufferTime'](0x10))[_0x531d3e(0x1da)](_0x1f9fe8=>{const _0x2a1c47=_0x531d3e,_0x2f8933=new Set();_0x1f9fe8[_0x2a1c47(0x191)](_0x49c74d=>{const _0x4dd2a2=_0x2a1c47;switch(_0x49c74d['type']){case _0x4dd2a2(0x197):{const _0x337b09=_0x49c74d[_0x4dd2a2(0x18f)][_0x4dd2a2(0x1c5)];_0x2f8933[_0x4dd2a2(0x197)](_0x337b09);break;}}}),R(this[_0x2a1c47(0x1d5)],_0x2f8933);}));}[_0x343277(0x1ac)](){const _0x418cf2=_0x343277;this[_0x418cf2(0x1e6)](this[_0x418cf2(0x1a6)]['commentUpdate$']['subscribe'](async _0x2607ab=>{const _0x3b8392=_0x418cf2;var _0x35b83e,_0x58df92,_0x33ce5f,_0x22421c;const _0x2595bf=(_0x35b83e=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab[_0x3b8392(0x17f)])[_0x3b8392(0x1b5)](_0xf2cd3a=>_0xf2cd3a[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x35b83e[_0x3b8392(0x1b3)];if(!_0x2595bf)return;const {unitId:_0x3cb9f5,subUnitId:_0x5f06ba}=_0x2595bf;switch(_0x2607ab[_0x3b8392(0x1aa)]&&this[_0x3b8392(0x17d)][_0x3b8392(0x1cd)](_0x2607ab['user']),_0x2607ab['type']){case v['Add']:break;case v['Reply']:{this[_0x3b8392(0x1cc)]['addComment'](_0x3cb9f5,_0x5f06ba,{'unitId':_0x3cb9f5,'subUnitId':_0x5f06ba,'ref':'','id':_0x2607ab[_0x3b8392(0x1ee)],'dT':f(+_0x2607ab['createTimestamp']),'threadId':_0x2607ab['threadId'],'personId':(_0x33ce5f=(_0x58df92=_0x2607ab['user'])==null?void 0x0:_0x58df92['userID'])!=null?_0x33ce5f:_0x2607ab[_0x3b8392(0x177)],'text':JSON['parse'](_0x2607ab['content']),'parentId':_0x2595bf['id']});break;}case v[_0x3b8392(0x199)]:{const _0x577316=this[_0x3b8392(0x1cc)][_0x3b8392(0x1a0)](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);_0x577316&&_0x577316[_0x3b8392(0x1b8)]&&this[_0x3b8392(0x1cc)]['deleteComment'](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);break;}case v[_0x3b8392(0x1e9)]:{this[_0x3b8392(0x1cc)]['updateComment'](_0x3cb9f5,_0x5f06ba,{'commentId':_0x2607ab['replyId'],'text':JSON[_0x3b8392(0x1c7)](_0x2607ab[_0x3b8392(0x1ab)])});break;}case v['Solve']:{const _0x7847de=(_0x22421c=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab['unitId'])[_0x3b8392(0x1b5)](_0x4cf7ec=>_0x4cf7ec[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x22421c[_0x3b8392(0x1b3)];_0x7847de&&this[_0x3b8392(0x1cc)][_0x3b8392(0x1bb)](_0x3cb9f5,_0x5f06ba,_0x7847de['id'],_0x2607ab[_0x3b8392(0x1b6)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x343277(0x1b9)](b[_0x343277(0x1de)])),S(0x1,c[_0x343277(0x1b9)](M[_0x343277(0x1ce)])),S(0x2,c['Inject'](c[_0x343277(0x1af)])),S(0x3,c[_0x343277(0x1b9)](c['Injector']))],_);const q=_0x343277(0x1bf),D={};var A=Object[_0x343277(0x1ea)],x=(_0x544170,_0x2231f4,_0x3340af,_0x938d7)=>{const _0x114875=_0x343277;for(var _0x2fc965=_0x938d7>0x1?void 0x0:_0x938d7?A(_0x2231f4,_0x3340af):_0x2231f4,_0x5477d4=_0x544170[_0x114875(0x176)]-0x1,_0x2c63fa;_0x5477d4>=0x0;_0x5477d4--)(_0x2c63fa=_0x544170[_0x5477d4])&&(_0x2fc965=_0x2c63fa(_0x2fc965)||_0x2fc965);return _0x2fc965;},C=(_0x728044,_0x49f86d)=>(_0x306ab8,_0x233d6b)=>_0x49f86d(_0x306ab8,_0x233d6b,_0x728044);function Y(_0x2e9565,_0x33f623){const _0x34258f=_0x343277,_0x39b164=_0x2e9565['replies'][0x0];return{..._0x33f623,'id':_0x39b164['replyId'],'resolved':_0x2e9565[_0x34258f(0x1b6)]===0x1,'dT':f(_0x39b164[_0x34258f(0x1d7)]),'personId':_0x39b164['userId'],'threadId':_0x39b164['threadId']};}function G(_0x4fb167,_0x53f968,_0x160d5b){const _0x4f74b6=_0x343277;var _0x3ccd20,_0x241c12;if(((_0x241c12=(_0x3ccd20=_0x4fb167==null?void 0x0:_0x4fb167[_0x4f74b6(0x1df)])==null?void 0x0:_0x3ccd20[_0x4f74b6(0x176)])!=null?_0x241c12:0x0)>0x0){const _0x31dae8=(_0x2db5a3,_0x2300a3)=>({'id':_0x2db5a3[_0x4f74b6(0x1ee)],'threadId':_0x2db5a3[_0x4f74b6(0x18d)],'dT':f(_0x2db5a3['createTimestamp']),'personId':_0x2db5a3[_0x4f74b6(0x177)],'resolved':_0x4fb167[_0x4f74b6(0x1b6)]===I[_0x4f74b6(0x1b0)],'unitId':_0x53f968,'subUnitId':_0x160d5b,'text':JSON[_0x4f74b6(0x1c7)](_0x2db5a3[_0x4f74b6(0x1ab)]),'parentId':_0x2300a3}),_0x41ada5=_0x31dae8(_0x4fb167['replies'][0x0]);return{..._0x41ada5,'children':_0x4fb167[_0x4f74b6(0x1df)]['slice'](0x1)[_0x4f74b6(0x192)](_0x1ea079=>_0x31dae8(_0x1ea079,_0x41ada5['id']))};}return null;}let p=class{constructor(_0x103b13,_0x5a34e6,_0x21be92){const _0x712b1d=_0x343277;this[_0x712b1d(0x180)]=_0x103b13,this[_0x712b1d(0x17d)]=_0x5a34e6,this['_sessionService']=_0x21be92;}async[_0x343277(0x1ad)](_0x550185){const _0x3fa8e0=_0x343277;var _0xc6a894,_0x5bf9cb;const {parentId:_0x1fe7b3,unitId:_0x213a19,text:_0x2ce286,threadId:_0x3bbb97}=_0x550185,_0x185b6f=(_0x5bf9cb=(_0xc6a894=_0x2ce286[_0x3fa8e0(0x19e)])==null?void 0x0:_0xc6a894[_0x3fa8e0(0x19c)](_0x39a279=>_0x39a279['rangeType']===c['CustomRangeType'][_0x3fa8e0(0x17a)])['map'](_0x5cd10c=>_0x5cd10c[_0x3fa8e0(0x1be)]))!=null?_0x5bf9cb:[],_0x4cd6b5=JSON[_0x3fa8e0(0x1d8)](_0x2ce286),_0x20fab7=(await this[_0x3fa8e0(0x1cb)][_0x3fa8e0(0x1c9)](_0x213a19))[_0x3fa8e0(0x1e3)]();if(_0x1fe7b3){const _0x459c0d={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f,'threadId':_0x3bbb97},_0x207ff2=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1c2),{'body':_0x459c0d}))['body'][_0x3fa8e0(0x1b4)];return{..._0x550185,'id':_0x207ff2[_0x3fa8e0(0x1ee)],'dT':c[_0x3fa8e0(0x1dc)](+_0x207ff2[_0x3fa8e0(0x1d7)])[_0x3fa8e0(0x1d9)](_0x3fa8e0(0x1bd)),'personId':_0x207ff2[_0x3fa8e0(0x177)]};}else{const _0x1dbbfd={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f},_0x267f6e=await this[_0x3fa8e0(0x180)][_0x3fa8e0(0x1a3)]('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1d0),{'body':_0x1dbbfd});return Y(_0x267f6e[_0x3fa8e0(0x1bc)][_0x3fa8e0(0x1b1)],_0x550185);}}async[_0x343277(0x1ba)](_0x3c1a2d){const _0x4cf655=_0x343277;var _0x257cfa,_0x4f4e49;const {text:_0x39c906,unitId:_0x8d856d}=_0x3c1a2d,_0xb395d9=(_0x4f4e49=(_0x257cfa=_0x39c906[_0x4cf655(0x19e)])==null?void 0x0:_0x257cfa[_0x4cf655(0x19c)](_0x58c8a0=>_0x58c8a0[_0x4cf655(0x1c4)]===c[_0x4cf655(0x1db)]['COMMENT'])[_0x4cf655(0x192)](_0x8974ac=>_0x8974ac[_0x4cf655(0x1be)]))!=null?_0x4f4e49:[],_0xaea036=JSON[_0x4cf655(0x1d8)](_0x39c906),_0x168574=_0x3c1a2d[_0x4cf655(0x18d)],_0x51d246=_0x3c1a2d['id'],_0x20134b={'memberId':(await this[_0x4cf655(0x1cb)][_0x4cf655(0x1c9)](_0x8d856d))[_0x4cf655(0x1e3)](),'unitId':_0x8d856d,'threadId':_0x168574,'mention':_0xb395d9,'content':_0xaea036,'replyId':_0x51d246},_0x513fcf=await this[_0x4cf655(0x180)][_0x4cf655(0x1a3)](_0x4cf655(0x1d1)+_0x8d856d+_0x4cf655(0x1ef),{'body':_0x20134b});return!_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)]||_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)][_0x4cf655(0x1c8)]===0x1;}async[_0x343277(0x1bb)](_0x2483f9){const _0x4c0a50=_0x343277,{unitId:_0x14b36e}=_0x2483f9,_0x3f1e1d=_0x2483f9[_0x4c0a50(0x18d)],_0x28b2d2={'memberId':this[_0x4c0a50(0x17d)][_0x4c0a50(0x179)]()[_0x4c0a50(0x183)],'unitId':_0x14b36e,'threadId':_0x3f1e1d,'solved':_0x2483f9[_0x4c0a50(0x1c6)]?I[_0x4c0a50(0x1b0)]:I[_0x4c0a50(0x1c3)]},_0xaf4aad=await this[_0x4c0a50(0x180)][_0x4c0a50(0x1a3)](_0x4c0a50(0x1d1)+_0x14b36e+_0x4c0a50(0x1b2),{'body':_0x28b2d2});return!_0xaf4aad['body']['error']||_0xaf4aad[_0x4c0a50(0x1bc)][_0x4c0a50(0x189)][_0x4c0a50(0x1c8)]===0x1;}async[_0x343277(0x1e4)](_0x57bd4b,_0x22b8bb,_0x4433ec,_0x25b20e){const _0x3cc841=_0x343277,_0x488665={'memberId':(await this[_0x3cc841(0x1cb)]['requireSession'](_0x57bd4b))['getMemberID'](),'threadId':_0x4433ec,'replyId':_0x25b20e,'unitId':_0x57bd4b},_0x3e94f1=await this[_0x3cc841(0x180)][_0x3cc841(0x1a3)](_0x3cc841(0x1d1)+_0x57bd4b+'/delete',{'body':_0x488665});return!_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)]||_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)][_0x3cc841(0x1c8)]===0x1;}async[_0x343277(0x1c1)](_0x44c0fa,_0x21e513,_0x153997){const _0x316190=_0x343277,_0x5079d3={'unitId':_0x44c0fa,'threadId':_0x153997},_0x1b8594=await this[_0x316190(0x180)][_0x316190(0x1a3)]('/universer-api/comment/unit/'+_0x44c0fa+_0x316190(0x1cf),{'body':_0x5079d3}),_0x47f2ea=_0x153997['map'](_0x2b60c0=>G(_0x1b8594[_0x316190(0x1bc)][_0x316190(0x17b)][_0x2b60c0],_0x44c0fa,_0x21e513))[_0x316190(0x19c)](Boolean);return Object[_0x316190(0x1ae)](_0x1b8594[_0x316190(0x1bc)][_0x316190(0x178)])[_0x316190(0x191)](_0x697836=>{const _0xfa3978=_0x316190;this[_0xfa3978(0x17d)][_0xfa3978(0x1cd)](_0x697836);}),_0x47f2ea;}[_0x343277(0x1d6)](_0x1b4ec9){const _0x437636=_0x343277;return{'id':_0x1b4ec9['id'],'threadId':_0x1b4ec9[_0x437636(0x18d)],'ref':_0x1b4ec9['ref']};}};p=x([C(0x0,c[_0x343277(0x1b9)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x343277(0x1af)])),C(0x2,c[_0x343277(0x1b9)](b[_0x343277(0x19b)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1cef70,_0x2216fc,_0x5be4c6,_0x378d7f)=>{const _0x4e6573=_0x343277;for(var _0x4b8a97=_0x378d7f>0x1?void 0x0:_0x378d7f?H(_0x2216fc,_0x5be4c6):_0x2216fc,_0x5f56fc=_0x1cef70[_0x4e6573(0x176)]-0x1,_0x39aa2e;_0x5f56fc>=0x0;_0x5f56fc--)(_0x39aa2e=_0x1cef70[_0x5f56fc])&&(_0x4b8a97=_0x39aa2e(_0x4b8a97)||_0x4b8a97);return _0x4b8a97;},y=(_0x187aec,_0x112785)=>(_0x1f4bbf,_0x996a4d)=>_0x112785(_0x1f4bbf,_0x996a4d,_0x187aec);let g=class extends c[_0x343277(0x186)]{constructor(_0xff1d42,_0x2819e9){const _0x830f97=_0x343277;super(),this['_threadCommentDataSourceService']=_0xff1d42,this[_0x830f97(0x195)]=_0x2819e9,this[_0x830f97(0x17e)]();}['_initDataSource'](){const _0x3520fc=_0x343277;this['_threadCommentDataSourceService'][_0x3520fc(0x18b)]=this['_threadCommentDataSource'],this[_0x3520fc(0x19f)][_0x3520fc(0x182)]=!0x1;}};function _0x1e16(_0x3701c3,_0x51a83b){const _0xeebf9c=_0xeebf();return _0x1e16=function(_0x1e1638,_0x30674b){_0x1e1638=_0x1e1638-0x175;let _0x1831fb=_0xeebf9c[_0x1e1638];return _0x1831fb;},_0x1e16(_0x3701c3,_0x51a83b);}g=J([y(0x0,M[_0x343277(0x1e2)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x343277(0x1a7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x4fbbb0,_0x14deaa,_0x14a2c7)=>_0x14deaa in _0x4fbbb0?F(_0x4fbbb0,_0x14deaa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a2c7}):_0x4fbbb0[_0x14deaa]=_0x14a2c7,W=(_0x10c2fa,_0x41444b,_0x3be036,_0x3b5be8)=>{const _0x12192e=_0x343277;for(var _0x3db597=_0x3b5be8>0x1?void 0x0:_0x3b5be8?L(_0x41444b,_0x3be036):_0x41444b,_0x55f01f=_0x10c2fa[_0x12192e(0x176)]-0x1,_0x349c68;_0x55f01f>=0x0;_0x55f01f--)(_0x349c68=_0x10c2fa[_0x55f01f])&&(_0x3db597=_0x349c68(_0x3db597)||_0x3db597);return _0x3db597;},O=(_0x54dcac,_0x5a0a87)=>(_0x204c55,_0xf363ba)=>_0x5a0a87(_0x204c55,_0xf363ba,_0x54dcac),N=(_0x252faf,_0x18d33f,_0x4b8c23)=>Z(_0x252faf,typeof _0x18d33f!=_0x343277(0x1ca)?_0x18d33f+'':_0x18d33f,_0x4b8c23);exports[_0x343277(0x1e7)]=class extends c['Plugin']{constructor(_0x5a2fcd=D,_0x203d03,_0xa81f46){const _0x53f8e=_0x343277;super(),this[_0x53f8e(0x1e8)]=_0x5a2fcd,this[_0x53f8e(0x1d5)]=_0x203d03,this[_0x53f8e(0x198)]=_0xa81f46;const {..._0xd3836d}=c[_0x53f8e(0x18a)]({},D,this['_config']);this[_0x53f8e(0x198)]['setConfig'](q,_0xd3836d);}['onStarting'](){const _0x2ef9d6=_0x343277;[[p],[g],[_]][_0x2ef9d6(0x191)](_0x8db7a=>{const _0x569310=_0x2ef9d6;this[_0x569310(0x1d5)][_0x569310(0x197)](_0x8db7a);});}[_0x343277(0x175)](){const _0x2bc8b4=_0x343277;this['_injector'][_0x2bc8b4(0x19a)](g),this[_0x2bc8b4(0x1d5)][_0x2bc8b4(0x19a)](_);}},N(exports[_0x343277(0x1e7)],_0x343277(0x1e0),U),N(exports[_0x343277(0x1e7)],_0x343277(0x1a2),c[_0x343277(0x181)][_0x343277(0x1d3)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x343277(0x187)],b[_0x343277(0x1ed)],T[_0x343277(0x1c0)]),O(0x1,c[_0x343277(0x1b9)](c[_0x343277(0x1d4)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x14b4(_0x7e0315,_0x1004b8){const _0x618831=_0x6188();return _0x14b4=function(_0x14b40c,_0x4e4645){_0x14b40c=_0x14b40c-0x1dc;let _0x343784=_0x618831[_0x14b40c];return _0x343784;},_0x14b4(_0x7e0315,_0x1004b8);}function _0x6188(){const _0x4204ed=['reply','comment','_httpService','userId','_userService','/universer-api/comment/unit/','addUser','943004cMETdO','YYYY/MM/DD\x20HH:mm','threadId','rangeType','parentId','pluginName','createTimestamp','requireSession','personId','/universer-api/user/list','ref','/add','find','map','_threadCommentModel','_threadCommentDataSourceService','get','UNRECOGNIZED','3865344CuzDzz','26361BcBHfz','1764679cyhQpn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','11442060UIAjVx','post','body','solved','stringify','pipe','addComment','530072mIVZzE','/edit','filter','unitId','getComment','resolveComment','content','dataSource','forEach','listComments','users','disposeWithMe','saveCommentToSnapshot','3824QfnqAl','replies','subscribe','symbol','onStarting','getOwnPropertyDescriptor','getMemberID','16671072etvSFx','thread-comment-data-source.config','getUser','_initUserSync','/solved','getCurrentUser','length','_threadCommentDataSource','OpenOrReOpen','parse','comments','syncUpdateMutationToColla','_initDataSource','deleteComment','updateComment','/reply','_sessionService','userID','code','_injector','COMMENT','Add','18QNnbBY','_init','Unknown','_config','root','user','_commentService','/delete','Solve','add','UNIVER_UNKNOWN','values','slice','error','Edit','5asvQLP','onReady','Solved','getUnit','4shPorO','resolved','customRanges','type','Delete','format','_configService','rangeId','commentUpdate$','Reply'];_0x6188=function(){return _0x4204ed;};return _0x6188();}const _0x4d2e20=_0x14b4;(function(_0x5dad8e,_0x5c5754){const _0x3c3886=_0x14b4,_0x311165=_0x5dad8e();while(!![]){try{const _0x30bb1e=parseInt(_0x3c3886(0x205))/0x1*(-parseInt(_0x3c3886(0x234))/0x2)+-parseInt(_0x3c3886(0x228))/0x3+-parseInt(_0x3c3886(0x216))/0x4*(parseInt(_0x3c3886(0x201))/0x5)+-parseInt(_0x3c3886(0x1f2))/0x6*(parseInt(_0x3c3886(0x22a))/0x7)+parseInt(_0x3c3886(0x241))/0x8*(parseInt(_0x3c3886(0x229))/0x9)+parseInt(_0x3c3886(0x22d))/0xa+parseInt(_0x3c3886(0x1dc))/0xb;if(_0x30bb1e===_0x5c5754)break;else _0x311165['push'](_0x311165['shift']());}catch(_0x4792fc){_0x311165['push'](_0x311165['shift']());}}}(_0x6188,0xaf952));import{CommentService as _0x33e698,CollaborationSessionService as _0x3b3256,UniverCollaborationClientPlugin as _0xfff223}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x593ad9}from'@univerjs-pro/license';import{dayjs as _0x5dad93,UserManagerService as _0x118a51,Inject as _0x4c6c26,Injector as _0x6d6cf3,Disposable as _0x2793c2,CustomRangeType as _0xafaec,UniverInstanceType as _0xbfac25,DependentOn as _0x5a8c90,IConfigService as _0x136898,Plugin as _0x3692f7,merge as _0x37574b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x39222f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38904e,IThreadCommentDataSourceService as _0x447bb4}from'@univerjs/thread-comment';import{bufferTime as _0x21aca5}from'rxjs';import{HTTPService as _0xd4ec99}from'@univerjs/network';const W=_0x4d2e20(0x22b);var I=(_0xc8bd83=>(_0xc8bd83[_0xc8bd83[_0x4d2e20(0x1e4)]=0x0]='OpenOrReOpen',_0xc8bd83[_0xc8bd83[_0x4d2e20(0x203)]=0x1]=_0x4d2e20(0x203),_0xc8bd83[_0xc8bd83[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0xc8bd83))(I||{}),v=(_0x3c1c33=>(_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f4)]=0x0]=_0x4d2e20(0x1f4),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f1)]=0x1]=_0x4d2e20(0x1f1),_0x3c1c33[_0x3c1c33['Reply']=0x2]=_0x4d2e20(0x20e),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x200)]=0x3]=_0x4d2e20(0x200),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x209)]=0x4]='Delete',_0x3c1c33[_0x3c1c33['Solve']=0x5]=_0x4d2e20(0x1fa),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0x3c1c33))(v||{});const y=_0x5f2023=>_0x5dad93(new Date(+_0x5f2023))[_0x4d2e20(0x20a)](_0x4d2e20(0x217)),B=async(_0xda3c59,_0x27cec2)=>{const _0x3c832e=_0x4d2e20,_0x37ef38=_0xda3c59[_0x3c832e(0x226)](_0x118a51),_0xeaead9=_0xda3c59['get'](_0xd4ec99);_0x27cec2[_0x3c832e(0x23c)](_0x4bfe75=>{const _0x51c883=_0x3c832e;_0x37ef38[_0x51c883(0x1de)](_0x4bfe75)&&_0x27cec2['delete'](_0x4bfe75);}),_0x27cec2['size']&&(await _0xeaead9[_0x3c832e(0x226)](_0x3c832e(0x21f),{'params':{'userIDs':[..._0x27cec2]}}))[_0x3c832e(0x22f)]['users'][_0x3c832e(0x23c)](_0x4a5abd=>{const _0x5d36b1=_0x3c832e;_0x4a5abd&&_0x37ef38[_0x5d36b1(0x215)](_0x4a5abd);});};var K=Object[_0x4d2e20(0x246)],V=(_0x5cbc32,_0x27ce48,_0x177543,_0x273c82)=>{const _0x36e96d=_0x4d2e20;for(var _0x20ccc5=_0x273c82>0x1?void 0x0:_0x273c82?K(_0x27ce48,_0x177543):_0x27ce48,_0x170d9b=_0x5cbc32[_0x36e96d(0x1e2)]-0x1,_0x41b30d;_0x170d9b>=0x0;_0x170d9b--)(_0x41b30d=_0x5cbc32[_0x170d9b])&&(_0x20ccc5=_0x41b30d(_0x20ccc5)||_0x20ccc5);return _0x20ccc5;},p=(_0xaa0075,_0x4811e4)=>(_0x1361c8,_0x244020)=>_0x4811e4(_0x1361c8,_0x244020,_0xaa0075);let _=class extends _0x2793c2{constructor(_0x481362,_0x11b8e5,_0x44660b,_0x150c04){const _0x331783=_0x4d2e20;super(),this[_0x331783(0x1f8)]=_0x481362,this[_0x331783(0x224)]=_0x11b8e5,this[_0x331783(0x213)]=_0x44660b,this[_0x331783(0x1ef)]=_0x150c04,this[_0x331783(0x1f3)](),this[_0x331783(0x1df)]();}[_0x4d2e20(0x1df)](){const _0x15fd57=_0x4d2e20;this['disposeWithMe'](this[_0x15fd57(0x224)][_0x15fd57(0x20d)][_0x15fd57(0x232)](_0x21aca5(0x10))[_0x15fd57(0x243)](_0x5117d1=>{const _0x2bd2ab=_0x15fd57,_0x1c7a5a=new Set();_0x5117d1[_0x2bd2ab(0x23c)](_0x36d6b7=>{const _0x1a4a66=_0x2bd2ab;switch(_0x36d6b7[_0x1a4a66(0x208)]){case _0x1a4a66(0x1fb):{const _0x4f4e0b=_0x36d6b7['payload'][_0x1a4a66(0x21e)];_0x1c7a5a[_0x1a4a66(0x1fb)](_0x4f4e0b);break;}}}),B(this['_injector'],_0x1c7a5a);}));}[_0x4d2e20(0x1f3)](){const _0x14b05f=_0x4d2e20;this[_0x14b05f(0x23f)](this[_0x14b05f(0x1f8)]['commentUpdate$'][_0x14b05f(0x243)](async _0x340bcd=>{const _0x279486=_0x14b05f;var _0x2620b7,_0x7a6136,_0x94bb98,_0x4dc22e;const _0x4e180d=(_0x2620b7=this[_0x279486(0x224)][_0x279486(0x204)](_0x340bcd[_0x279486(0x237)])[_0x279486(0x222)](_0x5ee2e5=>_0x5ee2e5[_0x279486(0x218)]===_0x340bcd[_0x279486(0x218)]))==null?void 0x0:_0x2620b7[_0x279486(0x1f6)];if(!_0x4e180d)return;const {unitId:_0xda18b1,subUnitId:_0x2ac44c}=_0x4e180d;switch(_0x340bcd[_0x279486(0x1f7)]&&this[_0x279486(0x213)][_0x279486(0x215)](_0x340bcd[_0x279486(0x1f7)]),_0x340bcd[_0x279486(0x208)]){case v[_0x279486(0x1f1)]:break;case v[_0x279486(0x20e)]:{this[_0x279486(0x224)][_0x279486(0x233)](_0xda18b1,_0x2ac44c,{'unitId':_0xda18b1,'subUnitId':_0x2ac44c,'ref':'','id':_0x340bcd[_0x279486(0x22c)],'dT':y(+_0x340bcd[_0x279486(0x21c)]),'threadId':_0x340bcd[_0x279486(0x218)],'personId':(_0x94bb98=(_0x7a6136=_0x340bcd['user'])==null?void 0x0:_0x7a6136[_0x279486(0x1ed)])!=null?_0x94bb98:_0x340bcd[_0x279486(0x212)],'text':JSON[_0x279486(0x1e5)](_0x340bcd['content']),'parentId':_0x4e180d['id']});break;}case v['Delete']:{const _0x2d5fe4=this[_0x279486(0x224)][_0x279486(0x238)](_0xda18b1,_0x2ac44c,_0x340bcd[_0x279486(0x22c)]);_0x2d5fe4&&_0x2d5fe4[_0x279486(0x21a)]&&this[_0x279486(0x224)][_0x279486(0x1e9)](_0xda18b1,_0x2ac44c,_0x340bcd['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x279486(0x1ea)](_0xda18b1,_0x2ac44c,{'commentId':_0x340bcd[_0x279486(0x22c)],'text':JSON[_0x279486(0x1e5)](_0x340bcd[_0x279486(0x23a)])});break;}case v['Solve']:{const _0x1712ad=(_0x4dc22e=this[_0x279486(0x224)]['getUnit'](_0x340bcd['unitId'])['find'](_0x3733e2=>_0x3733e2[_0x279486(0x218)]===_0x340bcd['threadId']))==null?void 0x0:_0x4dc22e[_0x279486(0x1f6)];_0x1712ad&&this[_0x279486(0x224)][_0x279486(0x239)](_0xda18b1,_0x2ac44c,_0x1712ad['id'],_0x340bcd[_0x279486(0x230)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c6c26(_0x33e698)),p(0x1,_0x4c6c26(_0x38904e)),p(0x2,_0x4c6c26(_0x118a51)),p(0x3,_0x4c6c26(_0x6d6cf3))],_);const z=_0x4d2e20(0x1dd),O={};var k=Object[_0x4d2e20(0x246)],Q=(_0x48d222,_0x38c19e,_0x2cc6a0,_0x1c213a)=>{const _0x2c588a=_0x4d2e20;for(var _0x41f48c=_0x1c213a>0x1?void 0x0:_0x1c213a?k(_0x38c19e,_0x2cc6a0):_0x38c19e,_0x17145d=_0x48d222[_0x2c588a(0x1e2)]-0x1,_0x51004c;_0x17145d>=0x0;_0x17145d--)(_0x51004c=_0x48d222[_0x17145d])&&(_0x41f48c=_0x51004c(_0x41f48c)||_0x41f48c);return _0x41f48c;},b=(_0x16f689,_0x423d00)=>(_0x1733c2,_0x53d984)=>_0x423d00(_0x1733c2,_0x53d984,_0x16f689);function X(_0x1a17b9,_0x352c15){const _0x18c2b8=_0x4d2e20,_0x355433=_0x1a17b9[_0x18c2b8(0x242)][0x0];return{..._0x352c15,'id':_0x355433[_0x18c2b8(0x22c)],'resolved':_0x1a17b9[_0x18c2b8(0x230)]===0x1,'dT':y(_0x355433['createTimestamp']),'personId':_0x355433[_0x18c2b8(0x212)],'threadId':_0x355433[_0x18c2b8(0x218)]};}function ee(_0x9ed2aa,_0x504553,_0x134bc9){const _0x5c6437=_0x4d2e20;var _0x5aed1f,_0x2c3a92;if(((_0x2c3a92=(_0x5aed1f=_0x9ed2aa==null?void 0x0:_0x9ed2aa['replies'])==null?void 0x0:_0x5aed1f[_0x5c6437(0x1e2)])!=null?_0x2c3a92:0x0)>0x0){const _0x2744b5=(_0x55b3bc,_0xfb8160)=>({'id':_0x55b3bc[_0x5c6437(0x22c)],'threadId':_0x55b3bc[_0x5c6437(0x218)],'dT':y(_0x55b3bc[_0x5c6437(0x21c)]),'personId':_0x55b3bc[_0x5c6437(0x212)],'resolved':_0x9ed2aa[_0x5c6437(0x230)]===I[_0x5c6437(0x203)],'unitId':_0x504553,'subUnitId':_0x134bc9,'text':JSON['parse'](_0x55b3bc[_0x5c6437(0x23a)]),'parentId':_0xfb8160}),_0x1435e5=_0x2744b5(_0x9ed2aa[_0x5c6437(0x242)][0x0]);return{..._0x1435e5,'children':_0x9ed2aa[_0x5c6437(0x242)][_0x5c6437(0x1fe)](0x1)[_0x5c6437(0x223)](_0x1b64d4=>_0x2744b5(_0x1b64d4,_0x1435e5['id']))};}return null;}let S=class{constructor(_0x131e3c,_0x602336,_0x2f8855){const _0xf2ef70=_0x4d2e20;this[_0xf2ef70(0x211)]=_0x131e3c,this[_0xf2ef70(0x213)]=_0x602336,this[_0xf2ef70(0x1ec)]=_0x2f8855;}async[_0x4d2e20(0x233)](_0x10490f){const _0x52f44a=_0x4d2e20;var _0x2a0754,_0x50961e;const {parentId:_0x429d2f,unitId:_0x5db86a,text:_0x32b385,threadId:_0x499f76}=_0x10490f,_0x3fb551=(_0x50961e=(_0x2a0754=_0x32b385['customRanges'])==null?void 0x0:_0x2a0754[_0x52f44a(0x236)](_0x53c8aa=>_0x53c8aa[_0x52f44a(0x219)]===_0xafaec[_0x52f44a(0x1f0)])[_0x52f44a(0x223)](_0xf8f2bb=>_0xf8f2bb[_0x52f44a(0x20c)]))!=null?_0x50961e:[],_0x5ad5e1=JSON[_0x52f44a(0x231)](_0x32b385),_0x1e5a88=(await this[_0x52f44a(0x1ec)]['requireSession'](_0x5db86a))[_0x52f44a(0x247)]();if(_0x429d2f){const _0x5d43b9={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551,'threadId':_0x499f76},_0x12834a=(await this['_httpService']['post'](_0x52f44a(0x214)+_0x5db86a+_0x52f44a(0x1eb),{'body':_0x5d43b9}))[_0x52f44a(0x22f)][_0x52f44a(0x20f)];return{..._0x10490f,'id':_0x12834a['replyId'],'dT':_0x5dad93(+_0x12834a[_0x52f44a(0x21c)])[_0x52f44a(0x20a)](_0x52f44a(0x217)),'personId':_0x12834a[_0x52f44a(0x212)]};}else{const _0x288287={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551},_0x3f4bfb=await this[_0x52f44a(0x211)]['post']('/universer-api/comment/unit/'+_0x5db86a+_0x52f44a(0x221),{'body':_0x288287});return X(_0x3f4bfb[_0x52f44a(0x22f)][_0x52f44a(0x210)],_0x10490f);}}async[_0x4d2e20(0x1ea)](_0xdf93f4){const _0x5ad989=_0x4d2e20;var _0xb85e03,_0x1d6a4b;const {text:_0x519185,unitId:_0x278486}=_0xdf93f4,_0x2b9d22=(_0x1d6a4b=(_0xb85e03=_0x519185[_0x5ad989(0x207)])==null?void 0x0:_0xb85e03[_0x5ad989(0x236)](_0x2f0225=>_0x2f0225[_0x5ad989(0x219)]===_0xafaec[_0x5ad989(0x1f0)])['map'](_0x29f3e5=>_0x29f3e5[_0x5ad989(0x20c)]))!=null?_0x1d6a4b:[],_0x219325=JSON[_0x5ad989(0x231)](_0x519185),_0x520dd1=_0xdf93f4[_0x5ad989(0x218)],_0x13cf53=_0xdf93f4['id'],_0xf8636={'memberId':(await this[_0x5ad989(0x1ec)]['requireSession'](_0x278486))[_0x5ad989(0x247)](),'unitId':_0x278486,'threadId':_0x520dd1,'mention':_0x2b9d22,'content':_0x219325,'replyId':_0x13cf53},_0x182ced=await this[_0x5ad989(0x211)][_0x5ad989(0x22e)](_0x5ad989(0x214)+_0x278486+_0x5ad989(0x235),{'body':_0xf8636});return!_0x182ced['body'][_0x5ad989(0x1ff)]||_0x182ced['body']['error']['code']===0x1;}async[_0x4d2e20(0x239)](_0x444a8a){const _0x169b9a=_0x4d2e20,{unitId:_0xf007ff}=_0x444a8a,_0x4563f1=_0x444a8a['threadId'],_0x32cfdf={'memberId':this[_0x169b9a(0x213)][_0x169b9a(0x1e1)]()[_0x169b9a(0x1ed)],'unitId':_0xf007ff,'threadId':_0x4563f1,'solved':_0x444a8a[_0x169b9a(0x206)]?I[_0x169b9a(0x203)]:I[_0x169b9a(0x1e4)]},_0xa8313c=await this[_0x169b9a(0x211)]['post']('/universer-api/comment/unit/'+_0xf007ff+_0x169b9a(0x1e0),{'body':_0x32cfdf});return!_0xa8313c[_0x169b9a(0x22f)][_0x169b9a(0x1ff)]||_0xa8313c[_0x169b9a(0x22f)]['error'][_0x169b9a(0x1ee)]===0x1;}async[_0x4d2e20(0x1e9)](_0x571af0,_0x43592a,_0x462bc2,_0x492ab5){const _0x4f1bd3=_0x4d2e20,_0x50d2cd={'memberId':(await this['_sessionService'][_0x4f1bd3(0x21d)](_0x571af0))['getMemberID'](),'threadId':_0x462bc2,'replyId':_0x492ab5,'unitId':_0x571af0},_0x2f7be5=await this[_0x4f1bd3(0x211)][_0x4f1bd3(0x22e)](_0x4f1bd3(0x214)+_0x571af0+_0x4f1bd3(0x1f9),{'body':_0x50d2cd});return!_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)]||_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)][_0x4f1bd3(0x1ee)]===0x1;}async[_0x4d2e20(0x23d)](_0x1b47ed,_0x27fcb7,_0x4d8531){const _0x3b273c=_0x4d2e20,_0x5bd317={'unitId':_0x1b47ed,'threadId':_0x4d8531},_0x5e729e=await this['_httpService'][_0x3b273c(0x22e)]('/universer-api/comment/unit/'+_0x1b47ed+'/list',{'body':_0x5bd317}),_0x394e1b=_0x4d8531['map'](_0x23f44c=>ee(_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x1e6)][_0x23f44c],_0x1b47ed,_0x27fcb7))[_0x3b273c(0x236)](Boolean);return Object[_0x3b273c(0x1fd)](_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x23e)])['forEach'](_0x2e4232=>{const _0x241826=_0x3b273c;this[_0x241826(0x213)][_0x241826(0x215)](_0x2e4232);}),_0x394e1b;}[_0x4d2e20(0x240)](_0x4400c7){const _0x4b7d90=_0x4d2e20;return{'id':_0x4400c7['id'],'threadId':_0x4400c7[_0x4b7d90(0x218)],'ref':_0x4400c7[_0x4b7d90(0x220)]};}};S=Q([b(0x0,_0x4c6c26(_0xd4ec99)),b(0x1,_0x4c6c26(_0x118a51)),b(0x2,_0x4c6c26(_0x3b3256))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x44e879,_0x4fcdbe,_0x1c7167,_0x143469)=>{for(var _0x11d2ac=_0x143469>0x1?void 0x0:_0x143469?re(_0x4fcdbe,_0x1c7167):_0x4fcdbe,_0x58b59b=_0x44e879['length']-0x1,_0x171a5a;_0x58b59b>=0x0;_0x58b59b--)(_0x171a5a=_0x44e879[_0x58b59b])&&(_0x11d2ac=_0x171a5a(_0x11d2ac)||_0x11d2ac);return _0x11d2ac;},M=(_0x4eb3b0,_0x10d459)=>(_0x3001bb,_0xf11f37)=>_0x10d459(_0x3001bb,_0xf11f37,_0x4eb3b0);let f=class extends _0x2793c2{constructor(_0x2201ac,_0x3bc853){const _0x59e9a2=_0x4d2e20;super(),this[_0x59e9a2(0x225)]=_0x2201ac,this[_0x59e9a2(0x1e3)]=_0x3bc853,this[_0x59e9a2(0x1e8)]();}[_0x4d2e20(0x1e8)](){const _0x20e137=_0x4d2e20;this[_0x20e137(0x225)][_0x20e137(0x23b)]=this[_0x20e137(0x1e3)],this[_0x20e137(0x225)][_0x20e137(0x1e7)]=!0x1;}};f=te([M(0x0,_0x447bb4),M(0x1,_0x4c6c26(S))],f);var se=Object['defineProperty'],oe=Object[_0x4d2e20(0x246)],ne=(_0x3e317c,_0x5a5b85,_0x58cc0e)=>_0x5a5b85 in _0x3e317c?se(_0x3e317c,_0x5a5b85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58cc0e}):_0x3e317c[_0x5a5b85]=_0x58cc0e,ie=(_0x454514,_0x532e98,_0x3a6e9f,_0x2b34e5)=>{const _0x3e4b0a=_0x4d2e20;for(var _0x56bdfd=_0x2b34e5>0x1?void 0x0:_0x2b34e5?oe(_0x532e98,_0x3a6e9f):_0x532e98,_0x5e7356=_0x454514[_0x3e4b0a(0x1e2)]-0x1,_0x39ef6b;_0x5e7356>=0x0;_0x5e7356--)(_0x39ef6b=_0x454514[_0x5e7356])&&(_0x56bdfd=_0x39ef6b(_0x56bdfd)||_0x56bdfd);return _0x56bdfd;},N=(_0x331e3f,_0x394ad6)=>(_0x1f659f,_0x3c1883)=>_0x394ad6(_0x1f659f,_0x3c1883,_0x331e3f),$=(_0x3d7dcb,_0x24dd78,_0x1460f6)=>ne(_0x3d7dcb,typeof _0x24dd78!=_0x4d2e20(0x244)?_0x24dd78+'':_0x24dd78,_0x1460f6);let g=class extends _0x3692f7{constructor(_0x51b7e7=O,_0x58baa4,_0x3ffb30){const _0x47fcf1=_0x4d2e20;super(),this['_config']=_0x51b7e7,this[_0x47fcf1(0x1ef)]=_0x58baa4,this[_0x47fcf1(0x20b)]=_0x3ffb30;const {..._0x4b2fe8}=_0x37574b({},O,this[_0x47fcf1(0x1f5)]);this[_0x47fcf1(0x20b)]['setConfig'](z,_0x4b2fe8);}[_0x4d2e20(0x245)](){[[S],[f],[_]]['forEach'](_0x298a5c=>{const _0x4baa19=_0x14b4;this[_0x4baa19(0x1ef)][_0x4baa19(0x1fb)](_0x298a5c);});}[_0x4d2e20(0x202)](){const _0x36ceee=_0x4d2e20;this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](f),this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](_);}};$(g,_0x4d2e20(0x21b),W),$(g,'type',_0xbfac25[_0x4d2e20(0x1fc)]),g=ie([_0x5a8c90(_0x39222f,_0xfff223,_0x593ad9),N(0x1,_0x4c6c26(_0x6d6cf3)),N(0x2,_0x136898)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x14b4(_0x7e0315,_0x1004b8){const _0x618831=_0x6188();return _0x14b4=function(_0x14b40c,_0x4e4645){_0x14b40c=_0x14b40c-0x1dc;let _0x343784=_0x618831[_0x14b40c];return _0x343784;},_0x14b4(_0x7e0315,_0x1004b8);}function _0x6188(){const _0x4204ed=['reply','comment','_httpService','userId','_userService','/universer-api/comment/unit/','addUser','943004cMETdO','YYYY/MM/DD\x20HH:mm','threadId','rangeType','parentId','pluginName','createTimestamp','requireSession','personId','/universer-api/user/list','ref','/add','find','map','_threadCommentModel','_threadCommentDataSourceService','get','UNRECOGNIZED','3865344CuzDzz','26361BcBHfz','1764679cyhQpn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','11442060UIAjVx','post','body','solved','stringify','pipe','addComment','530072mIVZzE','/edit','filter','unitId','getComment','resolveComment','content','dataSource','forEach','listComments','users','disposeWithMe','saveCommentToSnapshot','3824QfnqAl','replies','subscribe','symbol','onStarting','getOwnPropertyDescriptor','getMemberID','16671072etvSFx','thread-comment-data-source.config','getUser','_initUserSync','/solved','getCurrentUser','length','_threadCommentDataSource','OpenOrReOpen','parse','comments','syncUpdateMutationToColla','_initDataSource','deleteComment','updateComment','/reply','_sessionService','userID','code','_injector','COMMENT','Add','18QNnbBY','_init','Unknown','_config','root','user','_commentService','/delete','Solve','add','UNIVER_UNKNOWN','values','slice','error','Edit','5asvQLP','onReady','Solved','getUnit','4shPorO','resolved','customRanges','type','Delete','format','_configService','rangeId','commentUpdate$','Reply'];_0x6188=function(){return _0x4204ed;};return _0x6188();}const _0x4d2e20=_0x14b4;(function(_0x5dad8e,_0x5c5754){const _0x3c3886=_0x14b4,_0x311165=_0x5dad8e();while(!![]){try{const _0x30bb1e=parseInt(_0x3c3886(0x205))/0x1*(-parseInt(_0x3c3886(0x234))/0x2)+-parseInt(_0x3c3886(0x228))/0x3+-parseInt(_0x3c3886(0x216))/0x4*(parseInt(_0x3c3886(0x201))/0x5)+-parseInt(_0x3c3886(0x1f2))/0x6*(parseInt(_0x3c3886(0x22a))/0x7)+parseInt(_0x3c3886(0x241))/0x8*(parseInt(_0x3c3886(0x229))/0x9)+parseInt(_0x3c3886(0x22d))/0xa+parseInt(_0x3c3886(0x1dc))/0xb;if(_0x30bb1e===_0x5c5754)break;else _0x311165['push'](_0x311165['shift']());}catch(_0x4792fc){_0x311165['push'](_0x311165['shift']());}}}(_0x6188,0xaf952));import{CommentService as _0x33e698,CollaborationSessionService as _0x3b3256,UniverCollaborationClientPlugin as _0xfff223}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x593ad9}from'@univerjs-pro/license';import{dayjs as _0x5dad93,UserManagerService as _0x118a51,Inject as _0x4c6c26,Injector as _0x6d6cf3,Disposable as _0x2793c2,CustomRangeType as _0xafaec,UniverInstanceType as _0xbfac25,DependentOn as _0x5a8c90,IConfigService as _0x136898,Plugin as _0x3692f7,merge as _0x37574b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x39222f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38904e,IThreadCommentDataSourceService as _0x447bb4}from'@univerjs/thread-comment';import{bufferTime as _0x21aca5}from'rxjs';import{HTTPService as _0xd4ec99}from'@univerjs/network';const W=_0x4d2e20(0x22b);var I=(_0xc8bd83=>(_0xc8bd83[_0xc8bd83[_0x4d2e20(0x1e4)]=0x0]='OpenOrReOpen',_0xc8bd83[_0xc8bd83[_0x4d2e20(0x203)]=0x1]=_0x4d2e20(0x203),_0xc8bd83[_0xc8bd83[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0xc8bd83))(I||{}),v=(_0x3c1c33=>(_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f4)]=0x0]=_0x4d2e20(0x1f4),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f1)]=0x1]=_0x4d2e20(0x1f1),_0x3c1c33[_0x3c1c33['Reply']=0x2]=_0x4d2e20(0x20e),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x200)]=0x3]=_0x4d2e20(0x200),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x209)]=0x4]='Delete',_0x3c1c33[_0x3c1c33['Solve']=0x5]=_0x4d2e20(0x1fa),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0x3c1c33))(v||{});const y=_0x5f2023=>_0x5dad93(new Date(+_0x5f2023))[_0x4d2e20(0x20a)](_0x4d2e20(0x217)),B=async(_0xda3c59,_0x27cec2)=>{const _0x3c832e=_0x4d2e20,_0x37ef38=_0xda3c59[_0x3c832e(0x226)](_0x118a51),_0xeaead9=_0xda3c59['get'](_0xd4ec99);_0x27cec2[_0x3c832e(0x23c)](_0x4bfe75=>{const _0x51c883=_0x3c832e;_0x37ef38[_0x51c883(0x1de)](_0x4bfe75)&&_0x27cec2['delete'](_0x4bfe75);}),_0x27cec2['size']&&(await _0xeaead9[_0x3c832e(0x226)](_0x3c832e(0x21f),{'params':{'userIDs':[..._0x27cec2]}}))[_0x3c832e(0x22f)]['users'][_0x3c832e(0x23c)](_0x4a5abd=>{const _0x5d36b1=_0x3c832e;_0x4a5abd&&_0x37ef38[_0x5d36b1(0x215)](_0x4a5abd);});};var K=Object[_0x4d2e20(0x246)],V=(_0x5cbc32,_0x27ce48,_0x177543,_0x273c82)=>{const _0x36e96d=_0x4d2e20;for(var _0x20ccc5=_0x273c82>0x1?void 0x0:_0x273c82?K(_0x27ce48,_0x177543):_0x27ce48,_0x170d9b=_0x5cbc32[_0x36e96d(0x1e2)]-0x1,_0x41b30d;_0x170d9b>=0x0;_0x170d9b--)(_0x41b30d=_0x5cbc32[_0x170d9b])&&(_0x20ccc5=_0x41b30d(_0x20ccc5)||_0x20ccc5);return _0x20ccc5;},p=(_0xaa0075,_0x4811e4)=>(_0x1361c8,_0x244020)=>_0x4811e4(_0x1361c8,_0x244020,_0xaa0075);let _=class extends _0x2793c2{constructor(_0x481362,_0x11b8e5,_0x44660b,_0x150c04){const _0x331783=_0x4d2e20;super(),this[_0x331783(0x1f8)]=_0x481362,this[_0x331783(0x224)]=_0x11b8e5,this[_0x331783(0x213)]=_0x44660b,this[_0x331783(0x1ef)]=_0x150c04,this[_0x331783(0x1f3)](),this[_0x331783(0x1df)]();}[_0x4d2e20(0x1df)](){const _0x15fd57=_0x4d2e20;this['disposeWithMe'](this[_0x15fd57(0x224)][_0x15fd57(0x20d)][_0x15fd57(0x232)](_0x21aca5(0x10))[_0x15fd57(0x243)](_0x5117d1=>{const _0x2bd2ab=_0x15fd57,_0x1c7a5a=new Set();_0x5117d1[_0x2bd2ab(0x23c)](_0x36d6b7=>{const _0x1a4a66=_0x2bd2ab;switch(_0x36d6b7[_0x1a4a66(0x208)]){case _0x1a4a66(0x1fb):{const _0x4f4e0b=_0x36d6b7['payload'][_0x1a4a66(0x21e)];_0x1c7a5a[_0x1a4a66(0x1fb)](_0x4f4e0b);break;}}}),B(this['_injector'],_0x1c7a5a);}));}[_0x4d2e20(0x1f3)](){const _0x14b05f=_0x4d2e20;this[_0x14b05f(0x23f)](this[_0x14b05f(0x1f8)]['commentUpdate$'][_0x14b05f(0x243)](async _0x340bcd=>{const _0x279486=_0x14b05f;var _0x2620b7,_0x7a6136,_0x94bb98,_0x4dc22e;const _0x4e180d=(_0x2620b7=this[_0x279486(0x224)][_0x279486(0x204)](_0x340bcd[_0x279486(0x237)])[_0x279486(0x222)](_0x5ee2e5=>_0x5ee2e5[_0x279486(0x218)]===_0x340bcd[_0x279486(0x218)]))==null?void 0x0:_0x2620b7[_0x279486(0x1f6)];if(!_0x4e180d)return;const {unitId:_0xda18b1,subUnitId:_0x2ac44c}=_0x4e180d;switch(_0x340bcd[_0x279486(0x1f7)]&&this[_0x279486(0x213)][_0x279486(0x215)](_0x340bcd[_0x279486(0x1f7)]),_0x340bcd[_0x279486(0x208)]){case v[_0x279486(0x1f1)]:break;case v[_0x279486(0x20e)]:{this[_0x279486(0x224)][_0x279486(0x233)](_0xda18b1,_0x2ac44c,{'unitId':_0xda18b1,'subUnitId':_0x2ac44c,'ref':'','id':_0x340bcd[_0x279486(0x22c)],'dT':y(+_0x340bcd[_0x279486(0x21c)]),'threadId':_0x340bcd[_0x279486(0x218)],'personId':(_0x94bb98=(_0x7a6136=_0x340bcd['user'])==null?void 0x0:_0x7a6136[_0x279486(0x1ed)])!=null?_0x94bb98:_0x340bcd[_0x279486(0x212)],'text':JSON[_0x279486(0x1e5)](_0x340bcd['content']),'parentId':_0x4e180d['id']});break;}case v['Delete']:{const _0x2d5fe4=this[_0x279486(0x224)][_0x279486(0x238)](_0xda18b1,_0x2ac44c,_0x340bcd[_0x279486(0x22c)]);_0x2d5fe4&&_0x2d5fe4[_0x279486(0x21a)]&&this[_0x279486(0x224)][_0x279486(0x1e9)](_0xda18b1,_0x2ac44c,_0x340bcd['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x279486(0x1ea)](_0xda18b1,_0x2ac44c,{'commentId':_0x340bcd[_0x279486(0x22c)],'text':JSON[_0x279486(0x1e5)](_0x340bcd[_0x279486(0x23a)])});break;}case v['Solve']:{const _0x1712ad=(_0x4dc22e=this[_0x279486(0x224)]['getUnit'](_0x340bcd['unitId'])['find'](_0x3733e2=>_0x3733e2[_0x279486(0x218)]===_0x340bcd['threadId']))==null?void 0x0:_0x4dc22e[_0x279486(0x1f6)];_0x1712ad&&this[_0x279486(0x224)][_0x279486(0x239)](_0xda18b1,_0x2ac44c,_0x1712ad['id'],_0x340bcd[_0x279486(0x230)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c6c26(_0x33e698)),p(0x1,_0x4c6c26(_0x38904e)),p(0x2,_0x4c6c26(_0x118a51)),p(0x3,_0x4c6c26(_0x6d6cf3))],_);const z=_0x4d2e20(0x1dd),O={};var k=Object[_0x4d2e20(0x246)],Q=(_0x48d222,_0x38c19e,_0x2cc6a0,_0x1c213a)=>{const _0x2c588a=_0x4d2e20;for(var _0x41f48c=_0x1c213a>0x1?void 0x0:_0x1c213a?k(_0x38c19e,_0x2cc6a0):_0x38c19e,_0x17145d=_0x48d222[_0x2c588a(0x1e2)]-0x1,_0x51004c;_0x17145d>=0x0;_0x17145d--)(_0x51004c=_0x48d222[_0x17145d])&&(_0x41f48c=_0x51004c(_0x41f48c)||_0x41f48c);return _0x41f48c;},b=(_0x16f689,_0x423d00)=>(_0x1733c2,_0x53d984)=>_0x423d00(_0x1733c2,_0x53d984,_0x16f689);function X(_0x1a17b9,_0x352c15){const _0x18c2b8=_0x4d2e20,_0x355433=_0x1a17b9[_0x18c2b8(0x242)][0x0];return{..._0x352c15,'id':_0x355433[_0x18c2b8(0x22c)],'resolved':_0x1a17b9[_0x18c2b8(0x230)]===0x1,'dT':y(_0x355433['createTimestamp']),'personId':_0x355433[_0x18c2b8(0x212)],'threadId':_0x355433[_0x18c2b8(0x218)]};}function ee(_0x9ed2aa,_0x504553,_0x134bc9){const _0x5c6437=_0x4d2e20;var _0x5aed1f,_0x2c3a92;if(((_0x2c3a92=(_0x5aed1f=_0x9ed2aa==null?void 0x0:_0x9ed2aa['replies'])==null?void 0x0:_0x5aed1f[_0x5c6437(0x1e2)])!=null?_0x2c3a92:0x0)>0x0){const _0x2744b5=(_0x55b3bc,_0xfb8160)=>({'id':_0x55b3bc[_0x5c6437(0x22c)],'threadId':_0x55b3bc[_0x5c6437(0x218)],'dT':y(_0x55b3bc[_0x5c6437(0x21c)]),'personId':_0x55b3bc[_0x5c6437(0x212)],'resolved':_0x9ed2aa[_0x5c6437(0x230)]===I[_0x5c6437(0x203)],'unitId':_0x504553,'subUnitId':_0x134bc9,'text':JSON['parse'](_0x55b3bc[_0x5c6437(0x23a)]),'parentId':_0xfb8160}),_0x1435e5=_0x2744b5(_0x9ed2aa[_0x5c6437(0x242)][0x0]);return{..._0x1435e5,'children':_0x9ed2aa[_0x5c6437(0x242)][_0x5c6437(0x1fe)](0x1)[_0x5c6437(0x223)](_0x1b64d4=>_0x2744b5(_0x1b64d4,_0x1435e5['id']))};}return null;}let S=class{constructor(_0x131e3c,_0x602336,_0x2f8855){const _0xf2ef70=_0x4d2e20;this[_0xf2ef70(0x211)]=_0x131e3c,this[_0xf2ef70(0x213)]=_0x602336,this[_0xf2ef70(0x1ec)]=_0x2f8855;}async[_0x4d2e20(0x233)](_0x10490f){const _0x52f44a=_0x4d2e20;var _0x2a0754,_0x50961e;const {parentId:_0x429d2f,unitId:_0x5db86a,text:_0x32b385,threadId:_0x499f76}=_0x10490f,_0x3fb551=(_0x50961e=(_0x2a0754=_0x32b385['customRanges'])==null?void 0x0:_0x2a0754[_0x52f44a(0x236)](_0x53c8aa=>_0x53c8aa[_0x52f44a(0x219)]===_0xafaec[_0x52f44a(0x1f0)])[_0x52f44a(0x223)](_0xf8f2bb=>_0xf8f2bb[_0x52f44a(0x20c)]))!=null?_0x50961e:[],_0x5ad5e1=JSON[_0x52f44a(0x231)](_0x32b385),_0x1e5a88=(await this[_0x52f44a(0x1ec)]['requireSession'](_0x5db86a))[_0x52f44a(0x247)]();if(_0x429d2f){const _0x5d43b9={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551,'threadId':_0x499f76},_0x12834a=(await this['_httpService']['post'](_0x52f44a(0x214)+_0x5db86a+_0x52f44a(0x1eb),{'body':_0x5d43b9}))[_0x52f44a(0x22f)][_0x52f44a(0x20f)];return{..._0x10490f,'id':_0x12834a['replyId'],'dT':_0x5dad93(+_0x12834a[_0x52f44a(0x21c)])[_0x52f44a(0x20a)](_0x52f44a(0x217)),'personId':_0x12834a[_0x52f44a(0x212)]};}else{const _0x288287={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551},_0x3f4bfb=await this[_0x52f44a(0x211)]['post']('/universer-api/comment/unit/'+_0x5db86a+_0x52f44a(0x221),{'body':_0x288287});return X(_0x3f4bfb[_0x52f44a(0x22f)][_0x52f44a(0x210)],_0x10490f);}}async[_0x4d2e20(0x1ea)](_0xdf93f4){const _0x5ad989=_0x4d2e20;var _0xb85e03,_0x1d6a4b;const {text:_0x519185,unitId:_0x278486}=_0xdf93f4,_0x2b9d22=(_0x1d6a4b=(_0xb85e03=_0x519185[_0x5ad989(0x207)])==null?void 0x0:_0xb85e03[_0x5ad989(0x236)](_0x2f0225=>_0x2f0225[_0x5ad989(0x219)]===_0xafaec[_0x5ad989(0x1f0)])['map'](_0x29f3e5=>_0x29f3e5[_0x5ad989(0x20c)]))!=null?_0x1d6a4b:[],_0x219325=JSON[_0x5ad989(0x231)](_0x519185),_0x520dd1=_0xdf93f4[_0x5ad989(0x218)],_0x13cf53=_0xdf93f4['id'],_0xf8636={'memberId':(await this[_0x5ad989(0x1ec)]['requireSession'](_0x278486))[_0x5ad989(0x247)](),'unitId':_0x278486,'threadId':_0x520dd1,'mention':_0x2b9d22,'content':_0x219325,'replyId':_0x13cf53},_0x182ced=await this[_0x5ad989(0x211)][_0x5ad989(0x22e)](_0x5ad989(0x214)+_0x278486+_0x5ad989(0x235),{'body':_0xf8636});return!_0x182ced['body'][_0x5ad989(0x1ff)]||_0x182ced['body']['error']['code']===0x1;}async[_0x4d2e20(0x239)](_0x444a8a){const _0x169b9a=_0x4d2e20,{unitId:_0xf007ff}=_0x444a8a,_0x4563f1=_0x444a8a['threadId'],_0x32cfdf={'memberId':this[_0x169b9a(0x213)][_0x169b9a(0x1e1)]()[_0x169b9a(0x1ed)],'unitId':_0xf007ff,'threadId':_0x4563f1,'solved':_0x444a8a[_0x169b9a(0x206)]?I[_0x169b9a(0x203)]:I[_0x169b9a(0x1e4)]},_0xa8313c=await this[_0x169b9a(0x211)]['post']('/universer-api/comment/unit/'+_0xf007ff+_0x169b9a(0x1e0),{'body':_0x32cfdf});return!_0xa8313c[_0x169b9a(0x22f)][_0x169b9a(0x1ff)]||_0xa8313c[_0x169b9a(0x22f)]['error'][_0x169b9a(0x1ee)]===0x1;}async[_0x4d2e20(0x1e9)](_0x571af0,_0x43592a,_0x462bc2,_0x492ab5){const _0x4f1bd3=_0x4d2e20,_0x50d2cd={'memberId':(await this['_sessionService'][_0x4f1bd3(0x21d)](_0x571af0))['getMemberID'](),'threadId':_0x462bc2,'replyId':_0x492ab5,'unitId':_0x571af0},_0x2f7be5=await this[_0x4f1bd3(0x211)][_0x4f1bd3(0x22e)](_0x4f1bd3(0x214)+_0x571af0+_0x4f1bd3(0x1f9),{'body':_0x50d2cd});return!_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)]||_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)][_0x4f1bd3(0x1ee)]===0x1;}async[_0x4d2e20(0x23d)](_0x1b47ed,_0x27fcb7,_0x4d8531){const _0x3b273c=_0x4d2e20,_0x5bd317={'unitId':_0x1b47ed,'threadId':_0x4d8531},_0x5e729e=await this['_httpService'][_0x3b273c(0x22e)]('/universer-api/comment/unit/'+_0x1b47ed+'/list',{'body':_0x5bd317}),_0x394e1b=_0x4d8531['map'](_0x23f44c=>ee(_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x1e6)][_0x23f44c],_0x1b47ed,_0x27fcb7))[_0x3b273c(0x236)](Boolean);return Object[_0x3b273c(0x1fd)](_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x23e)])['forEach'](_0x2e4232=>{const _0x241826=_0x3b273c;this[_0x241826(0x213)][_0x241826(0x215)](_0x2e4232);}),_0x394e1b;}[_0x4d2e20(0x240)](_0x4400c7){const _0x4b7d90=_0x4d2e20;return{'id':_0x4400c7['id'],'threadId':_0x4400c7[_0x4b7d90(0x218)],'ref':_0x4400c7[_0x4b7d90(0x220)]};}};S=Q([b(0x0,_0x4c6c26(_0xd4ec99)),b(0x1,_0x4c6c26(_0x118a51)),b(0x2,_0x4c6c26(_0x3b3256))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x44e879,_0x4fcdbe,_0x1c7167,_0x143469)=>{for(var _0x11d2ac=_0x143469>0x1?void 0x0:_0x143469?re(_0x4fcdbe,_0x1c7167):_0x4fcdbe,_0x58b59b=_0x44e879['length']-0x1,_0x171a5a;_0x58b59b>=0x0;_0x58b59b--)(_0x171a5a=_0x44e879[_0x58b59b])&&(_0x11d2ac=_0x171a5a(_0x11d2ac)||_0x11d2ac);return _0x11d2ac;},M=(_0x4eb3b0,_0x10d459)=>(_0x3001bb,_0xf11f37)=>_0x10d459(_0x3001bb,_0xf11f37,_0x4eb3b0);let f=class extends _0x2793c2{constructor(_0x2201ac,_0x3bc853){const _0x59e9a2=_0x4d2e20;super(),this[_0x59e9a2(0x225)]=_0x2201ac,this[_0x59e9a2(0x1e3)]=_0x3bc853,this[_0x59e9a2(0x1e8)]();}[_0x4d2e20(0x1e8)](){const _0x20e137=_0x4d2e20;this[_0x20e137(0x225)][_0x20e137(0x23b)]=this[_0x20e137(0x1e3)],this[_0x20e137(0x225)][_0x20e137(0x1e7)]=!0x1;}};f=te([M(0x0,_0x447bb4),M(0x1,_0x4c6c26(S))],f);var se=Object['defineProperty'],oe=Object[_0x4d2e20(0x246)],ne=(_0x3e317c,_0x5a5b85,_0x58cc0e)=>_0x5a5b85 in _0x3e317c?se(_0x3e317c,_0x5a5b85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58cc0e}):_0x3e317c[_0x5a5b85]=_0x58cc0e,ie=(_0x454514,_0x532e98,_0x3a6e9f,_0x2b34e5)=>{const _0x3e4b0a=_0x4d2e20;for(var _0x56bdfd=_0x2b34e5>0x1?void 0x0:_0x2b34e5?oe(_0x532e98,_0x3a6e9f):_0x532e98,_0x5e7356=_0x454514[_0x3e4b0a(0x1e2)]-0x1,_0x39ef6b;_0x5e7356>=0x0;_0x5e7356--)(_0x39ef6b=_0x454514[_0x5e7356])&&(_0x56bdfd=_0x39ef6b(_0x56bdfd)||_0x56bdfd);return _0x56bdfd;},N=(_0x331e3f,_0x394ad6)=>(_0x1f659f,_0x3c1883)=>_0x394ad6(_0x1f659f,_0x3c1883,_0x331e3f),$=(_0x3d7dcb,_0x24dd78,_0x1460f6)=>ne(_0x3d7dcb,typeof _0x24dd78!=_0x4d2e20(0x244)?_0x24dd78+'':_0x24dd78,_0x1460f6);let g=class extends _0x3692f7{constructor(_0x51b7e7=O,_0x58baa4,_0x3ffb30){const _0x47fcf1=_0x4d2e20;super(),this['_config']=_0x51b7e7,this[_0x47fcf1(0x1ef)]=_0x58baa4,this[_0x47fcf1(0x20b)]=_0x3ffb30;const {..._0x4b2fe8}=_0x37574b({},O,this[_0x47fcf1(0x1f5)]);this[_0x47fcf1(0x20b)]['setConfig'](z,_0x4b2fe8);}[_0x4d2e20(0x245)](){[[S],[f],[_]]['forEach'](_0x298a5c=>{const _0x4baa19=_0x14b4;this[_0x4baa19(0x1ef)][_0x4baa19(0x1fb)](_0x298a5c);});}[_0x4d2e20(0x202)](){const _0x36ceee=_0x4d2e20;this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](f),this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](_);}};$(g,_0x4d2e20(0x21b),W),$(g,'type',_0xbfac25[_0x4d2e20(0x1fc)]),g=ie([_0x5a8c90(_0x39222f,_0xfff223,_0x593ad9),N(0x1,_0x4c6c26(_0x6d6cf3)),N(0x2,_0x136898)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2c79(){const _0x1b1f28=['customRanges','7880dRoauo','1UJfRzx','payload','CollaborationSessionService','dayjs','Plugin','Solved','CommentService','rxjs','symbol','delete','IConfigService','/delete','UniverThreadCommentUIPlugin','size','object','OpenOrReOpen','type','createTimestamp','UniverCore','Reply','_httpService','ref','merge','_configService','Edit','getMemberID','saveCommentToSnapshot','addUser','Add','forEach','unitId','@univerjs/core','pipe','_initUserSync','length','COMMENT','getOwnPropertyDescriptor','personId','deleteComment','defineProperty','thread-comment-data-source.config','exports','UniverProCollaborationClient','disposeWithMe','_sessionService','Delete','amd','UniverProLicense','_injector','/add','get','_threadCommentDataSourceService','UniverProThreadCommentDatasource','threadId','UniverThreadCommentUi','parentId','/universer-api/comment/unit/','addComment','@univerjs/thread-comment','289932QTNBHW','map','filter','reply','Solve','userId','getCurrentUser','replyId','users','updateComment','syncUpdateMutationToColla','content','349770oHPpIU','userID','error','getComment','UserManagerService','replies','572AIdxnB','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','onStarting','_threadCommentDataSource','requireSession','subscribe','root','_threadCommentModel','stringify','UniverNetwork','parse','format','commentUpdate$','comments','UniverLicensePlugin','post','dataSource','_config','resolveComment','Disposable','UniverThreadCommentDataSourcePlugin','UniverThreadComment','Unknown','user','resolved','HTTPService','Injector','2475312LHZrlL','body','UNRECOGNIZED','/universer-api/user/list','rangeType','Inject','ThreadCommentModel','Module','45oUXFOh','getUnit','6mnprBL','_userService','onReady','_commentService','code','add','/list','CustomRangeType','rangeId','@univerjs/thread-comment-ui','IThreadCommentDataSourceService','slice','_init','@univerjs-pro/license','values','1632617bCXOyw','pluginName','1221026muupiL','9922341vBVMmg'];_0x2c79=function(){return _0x1b1f28;};return _0x2c79();}function _0x3393(_0x21f317,_0x4d247c){const _0x2c7957=_0x2c79();return _0x3393=function(_0x3393f1,_0x5343dc){_0x3393f1=_0x3393f1-0x1e2;let _0x4017e3=_0x2c7957[_0x3393f1];return _0x4017e3;},_0x3393(_0x21f317,_0x4d247c);}(function(_0x1c16ed,_0x24d7d3){const _0x5716a6=_0x3393,_0x1faab0=_0x1c16ed();while(!![]){try{const _0x4c6fa5=-parseInt(_0x5716a6(0x201))/0x1*(parseInt(_0x5716a6(0x1fd))/0x2)+-parseInt(_0x5716a6(0x23c))/0x3+-parseInt(_0x5716a6(0x24e))/0x4*(-parseInt(_0x5716a6(0x200))/0x5)+-parseInt(_0x5716a6(0x1ec))/0x6*(parseInt(_0x5716a6(0x1fb))/0x7)+parseInt(_0x5716a6(0x1e2))/0x8+-parseInt(_0x5716a6(0x1ea))/0x9*(parseInt(_0x5716a6(0x248))/0xa)+parseInt(_0x5716a6(0x1fe))/0xb;if(_0x4c6fa5===_0x24d7d3)break;else _0x1faab0['push'](_0x1faab0['shift']());}catch(_0x555edb){_0x1faab0['push'](_0x1faab0['shift']());}}}(_0x2c79,0x4e804),function(_0x2c0849,_0x23fb5a){const _0x3ec13b=_0x3393;typeof exports==_0x3ec13b(0x20f)&&typeof module<'u'?_0x23fb5a(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[_0x3ec13b(0x22f)]?define([_0x3ec13b(0x22a),_0x3ec13b(0x24f),_0x3ec13b(0x1f9),_0x3ec13b(0x220),_0x3ec13b(0x1f5),_0x3ec13b(0x23b),'rxjs','@univerjs/network'],_0x23fb5a):(_0x2c0849=typeof globalThis<'u'?globalThis:_0x2c0849||self,_0x23fb5a(_0x2c0849[_0x3ec13b(0x235)]={},_0x2c0849[_0x3ec13b(0x22b)],_0x2c0849[_0x3ec13b(0x230)],_0x2c0849[_0x3ec13b(0x213)],_0x2c0849[_0x3ec13b(0x237)],_0x2c0849[_0x3ec13b(0x264)],_0x2c0849[_0x3ec13b(0x208)],_0x2c0849[_0x3ec13b(0x258)]));}(this,function(_0x256275,_0x271aba,_0x30cdcd,_0x5a07a9,_0x4c2680,_0x4cc5f5,_0x4f5e41,_0x476811){'use strict';const _0x19a2ad=_0x3393;const _0x257191='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1d7c20=(_0x3c18f1=>(_0x3c18f1[_0x3c18f1[_0x19a2ad(0x210)]=0x0]=_0x19a2ad(0x210),_0x3c18f1[_0x3c18f1[_0x19a2ad(0x206)]=0x1]=_0x19a2ad(0x206),_0x3c18f1[_0x3c18f1[_0x19a2ad(0x1e4)]=-0x1]='UNRECOGNIZED',_0x3c18f1))(_0x1d7c20||{}),_0x2d66f6=(_0x2a413e=>(_0x2a413e[_0x2a413e[_0x19a2ad(0x265)]=0x0]=_0x19a2ad(0x265),_0x2a413e[_0x2a413e['Add']=0x1]=_0x19a2ad(0x21d),_0x2a413e[_0x2a413e[_0x19a2ad(0x214)]=0x2]=_0x19a2ad(0x214),_0x2a413e[_0x2a413e['Edit']=0x3]=_0x19a2ad(0x219),_0x2a413e[_0x2a413e[_0x19a2ad(0x22e)]=0x4]=_0x19a2ad(0x22e),_0x2a413e[_0x2a413e[_0x19a2ad(0x240)]=0x5]=_0x19a2ad(0x240),_0x2a413e[_0x2a413e['UNRECOGNIZED']=-0x1]=_0x19a2ad(0x1e4),_0x2a413e))(_0x2d66f6||{});const _0x359ba0=_0x513d01=>_0x5a07a9[_0x19a2ad(0x204)](new Date(+_0x513d01))['format']('YYYY/MM/DD\x20HH:mm'),_0x1f5d1f=async(_0x4adbe6,_0x492ded)=>{const _0x3463a3=_0x19a2ad,_0x1c763b=_0x4adbe6[_0x3463a3(0x233)](_0x5a07a9[_0x3463a3(0x24c)]),_0x1eeb9a=_0x4adbe6[_0x3463a3(0x233)](_0x476811[_0x3463a3(0x268)]);_0x492ded[_0x3463a3(0x21e)](_0x126dd2=>{const _0x37e482=_0x3463a3;_0x1c763b['getUser'](_0x126dd2)&&_0x492ded[_0x37e482(0x20a)](_0x126dd2);}),_0x492ded[_0x3463a3(0x20e)]&&(await _0x1eeb9a[_0x3463a3(0x233)](_0x3463a3(0x1e5),{'params':{'userIDs':[..._0x492ded]}}))[_0x3463a3(0x1e3)][_0x3463a3(0x244)][_0x3463a3(0x21e)](_0x188e2e=>{const _0x24f2c4=_0x3463a3;_0x188e2e&&_0x1c763b[_0x24f2c4(0x21c)](_0x188e2e);});};var _0x893943=Object[_0x19a2ad(0x225)],_0x226db8=(_0x187eb3,_0x1588fa,_0x547ac0,_0xb6edec)=>{for(var _0x4b17f8=_0xb6edec>0x1?void 0x0:_0xb6edec?_0x893943(_0x1588fa,_0x547ac0):_0x1588fa,_0x2bdedb=_0x187eb3['length']-0x1,_0x48eae7;_0x2bdedb>=0x0;_0x2bdedb--)(_0x48eae7=_0x187eb3[_0x2bdedb])&&(_0x4b17f8=_0x48eae7(_0x4b17f8)||_0x4b17f8);return _0x4b17f8;},_0x219e01=(_0xa88f98,_0x2a5fd7)=>(_0x4aab3e,_0x27f968)=>_0x2a5fd7(_0x4aab3e,_0x27f968,_0xa88f98);let _0x4a6244=class extends _0x5a07a9[_0x19a2ad(0x262)]{constructor(_0x5d0295,_0x264fe0,_0x3460f0,_0x37c118){const _0x506773=_0x19a2ad;super(),this['_commentService']=_0x5d0295,this['_threadCommentModel']=_0x264fe0,this[_0x506773(0x1ed)]=_0x3460f0,this[_0x506773(0x231)]=_0x37c118,this[_0x506773(0x1f8)](),this['_initUserSync']();}[_0x19a2ad(0x222)](){const _0x34129c=_0x19a2ad;this[_0x34129c(0x22c)](this[_0x34129c(0x256)][_0x34129c(0x25b)][_0x34129c(0x221)](_0x4f5e41['bufferTime'](0x10))[_0x34129c(0x254)](_0x14a616=>{const _0x34c42c=_0x34129c,_0x3ff80d=new Set();_0x14a616['forEach'](_0x4f236f=>{const _0x5c2724=_0x3393;switch(_0x4f236f[_0x5c2724(0x211)]){case _0x5c2724(0x1f1):{const _0x5611af=_0x4f236f[_0x5c2724(0x202)][_0x5c2724(0x226)];_0x3ff80d[_0x5c2724(0x1f1)](_0x5611af);break;}}}),_0x1f5d1f(this[_0x34c42c(0x231)],_0x3ff80d);}));}[_0x19a2ad(0x1f8)](){const _0x998a58=_0x19a2ad;this[_0x998a58(0x22c)](this[_0x998a58(0x1ef)]['commentUpdate$']['subscribe'](async _0x4414ea=>{const _0xab3e1d=_0x998a58;var _0x5c1067,_0x439f71,_0x47c6ed,_0x1f4f26;const _0xfaa393=(_0x5c1067=this[_0xab3e1d(0x256)]['getUnit'](_0x4414ea[_0xab3e1d(0x21f)])['find'](_0x1a7878=>_0x1a7878['threadId']===_0x4414ea['threadId']))==null?void 0x0:_0x5c1067['root'];if(!_0xfaa393)return;const {unitId:_0x13b723,subUnitId:_0x1d6e85}=_0xfaa393;switch(_0x4414ea['user']&&this[_0xab3e1d(0x1ed)][_0xab3e1d(0x21c)](_0x4414ea[_0xab3e1d(0x266)]),_0x4414ea['type']){case _0x2d66f6['Add']:break;case _0x2d66f6[_0xab3e1d(0x214)]:{this[_0xab3e1d(0x256)][_0xab3e1d(0x23a)](_0x13b723,_0x1d6e85,{'unitId':_0x13b723,'subUnitId':_0x1d6e85,'ref':'','id':_0x4414ea['replyId'],'dT':_0x359ba0(+_0x4414ea['createTimestamp']),'threadId':_0x4414ea['threadId'],'personId':(_0x47c6ed=(_0x439f71=_0x4414ea[_0xab3e1d(0x266)])==null?void 0x0:_0x439f71['userID'])!=null?_0x47c6ed:_0x4414ea[_0xab3e1d(0x241)],'text':JSON[_0xab3e1d(0x259)](_0x4414ea['content']),'parentId':_0xfaa393['id']});break;}case _0x2d66f6[_0xab3e1d(0x22e)]:{const _0x469761=this[_0xab3e1d(0x256)][_0xab3e1d(0x24b)](_0x13b723,_0x1d6e85,_0x4414ea[_0xab3e1d(0x243)]);_0x469761&&_0x469761[_0xab3e1d(0x238)]&&this[_0xab3e1d(0x256)][_0xab3e1d(0x227)](_0x13b723,_0x1d6e85,_0x4414ea['replyId']);break;}case _0x2d66f6[_0xab3e1d(0x219)]:{this[_0xab3e1d(0x256)][_0xab3e1d(0x245)](_0x13b723,_0x1d6e85,{'commentId':_0x4414ea[_0xab3e1d(0x243)],'text':JSON[_0xab3e1d(0x259)](_0x4414ea[_0xab3e1d(0x247)])});break;}case _0x2d66f6[_0xab3e1d(0x240)]:{const _0x3c1256=(_0x1f4f26=this[_0xab3e1d(0x256)][_0xab3e1d(0x1eb)](_0x4414ea['unitId'])['find'](_0x11221a=>_0x11221a[_0xab3e1d(0x236)]===_0x4414ea[_0xab3e1d(0x236)]))==null?void 0x0:_0x1f4f26[_0xab3e1d(0x255)];_0x3c1256&&this[_0xab3e1d(0x256)][_0xab3e1d(0x261)](_0x13b723,_0x1d6e85,_0x3c1256['id'],_0x4414ea['solved']===_0x1d7c20[_0xab3e1d(0x206)]);break;}}}));}};_0x4a6244=_0x226db8([_0x219e01(0x0,_0x5a07a9[_0x19a2ad(0x1e7)](_0x271aba[_0x19a2ad(0x207)])),_0x219e01(0x1,_0x5a07a9[_0x19a2ad(0x1e7)](_0x4cc5f5[_0x19a2ad(0x1e8)])),_0x219e01(0x2,_0x5a07a9['Inject'](_0x5a07a9[_0x19a2ad(0x24c)])),_0x219e01(0x3,_0x5a07a9['Inject'](_0x5a07a9[_0x19a2ad(0x269)]))],_0x4a6244);const _0x435912=_0x19a2ad(0x229),_0x2ec340={};var _0x15e804=Object[_0x19a2ad(0x225)],_0x190b69=(_0x2b200d,_0x362946,_0x29bced,_0x3d8413)=>{for(var _0x8b0682=_0x3d8413>0x1?void 0x0:_0x3d8413?_0x15e804(_0x362946,_0x29bced):_0x362946,_0x35f66b=_0x2b200d['length']-0x1,_0x26a4e1;_0x35f66b>=0x0;_0x35f66b--)(_0x26a4e1=_0x2b200d[_0x35f66b])&&(_0x8b0682=_0x26a4e1(_0x8b0682)||_0x8b0682);return _0x8b0682;},_0x5cc6cb=(_0x28ae40,_0x4d8138)=>(_0x9b2f94,_0x42a73b)=>_0x4d8138(_0x9b2f94,_0x42a73b,_0x28ae40);function _0x3b7b74(_0x27c630,_0xc6758f){const _0x595053=_0x19a2ad,_0x5c8c94=_0x27c630[_0x595053(0x24d)][0x0];return{..._0xc6758f,'id':_0x5c8c94[_0x595053(0x243)],'resolved':_0x27c630['solved']===0x1,'dT':_0x359ba0(_0x5c8c94[_0x595053(0x212)]),'personId':_0x5c8c94[_0x595053(0x241)],'threadId':_0x5c8c94[_0x595053(0x236)]};}function _0x535d82(_0x15f630,_0x1b5b46,_0x13d04c){const _0x3af2ac=_0x19a2ad;var _0x2b3001,_0xb02a79;if(((_0xb02a79=(_0x2b3001=_0x15f630==null?void 0x0:_0x15f630[_0x3af2ac(0x24d)])==null?void 0x0:_0x2b3001['length'])!=null?_0xb02a79:0x0)>0x0){const _0x16779c=(_0x5e1992,_0x4d30f0)=>({'id':_0x5e1992[_0x3af2ac(0x243)],'threadId':_0x5e1992[_0x3af2ac(0x236)],'dT':_0x359ba0(_0x5e1992[_0x3af2ac(0x212)]),'personId':_0x5e1992[_0x3af2ac(0x241)],'resolved':_0x15f630['solved']===_0x1d7c20[_0x3af2ac(0x206)],'unitId':_0x1b5b46,'subUnitId':_0x13d04c,'text':JSON['parse'](_0x5e1992[_0x3af2ac(0x247)]),'parentId':_0x4d30f0}),_0x47719b=_0x16779c(_0x15f630[_0x3af2ac(0x24d)][0x0]);return{..._0x47719b,'children':_0x15f630['replies'][_0x3af2ac(0x1f7)](0x1)[_0x3af2ac(0x23d)](_0x35714e=>_0x16779c(_0x35714e,_0x47719b['id']))};}return null;}let _0x164f6f=class{constructor(_0x42ad86,_0x42102e,_0x248605){const _0x32a272=_0x19a2ad;this[_0x32a272(0x215)]=_0x42ad86,this[_0x32a272(0x1ed)]=_0x42102e,this[_0x32a272(0x22d)]=_0x248605;}async['addComment'](_0x4c79a9){const _0x31564d=_0x19a2ad;var _0x1fbf65,_0x477a2f;const {parentId:_0x3740e9,unitId:_0x2f1132,text:_0x1b4291,threadId:_0x3050e8}=_0x4c79a9,_0x4ac62c=(_0x477a2f=(_0x1fbf65=_0x1b4291[_0x31564d(0x1ff)])==null?void 0x0:_0x1fbf65['filter'](_0x152d57=>_0x152d57[_0x31564d(0x1e6)]===_0x5a07a9['CustomRangeType']['COMMENT'])['map'](_0xace3b7=>_0xace3b7[_0x31564d(0x1f4)]))!=null?_0x477a2f:[],_0x460a00=JSON[_0x31564d(0x257)](_0x1b4291),_0x2341ad=(await this[_0x31564d(0x22d)][_0x31564d(0x253)](_0x2f1132))[_0x31564d(0x21a)]();if(_0x3740e9){const _0x59cae1={'memberId':_0x2341ad,'unitId':_0x2f1132,'content':_0x460a00,'mention':_0x4ac62c,'threadId':_0x3050e8},_0x157e61=(await this[_0x31564d(0x215)][_0x31564d(0x25e)](_0x31564d(0x239)+_0x2f1132+'/reply',{'body':_0x59cae1}))[_0x31564d(0x1e3)][_0x31564d(0x23f)];return{..._0x4c79a9,'id':_0x157e61[_0x31564d(0x243)],'dT':_0x5a07a9[_0x31564d(0x204)](+_0x157e61[_0x31564d(0x212)])[_0x31564d(0x25a)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x157e61[_0x31564d(0x241)]};}else{const _0x2c0847={'memberId':_0x2341ad,'unitId':_0x2f1132,'content':_0x460a00,'mention':_0x4ac62c},_0x11ceed=await this[_0x31564d(0x215)][_0x31564d(0x25e)](_0x31564d(0x239)+_0x2f1132+_0x31564d(0x232),{'body':_0x2c0847});return _0x3b7b74(_0x11ceed[_0x31564d(0x1e3)]['comment'],_0x4c79a9);}}async[_0x19a2ad(0x245)](_0x207027){const _0x3390a8=_0x19a2ad;var _0x8b97f9,_0x5702a9;const {text:_0xbfeb8f,unitId:_0x343210}=_0x207027,_0x40d0b7=(_0x5702a9=(_0x8b97f9=_0xbfeb8f['customRanges'])==null?void 0x0:_0x8b97f9[_0x3390a8(0x23e)](_0xb55ea0=>_0xb55ea0[_0x3390a8(0x1e6)]===_0x5a07a9[_0x3390a8(0x1f3)][_0x3390a8(0x224)])[_0x3390a8(0x23d)](_0x46c3bf=>_0x46c3bf[_0x3390a8(0x1f4)]))!=null?_0x5702a9:[],_0x17c9f9=JSON['stringify'](_0xbfeb8f),_0x2ba4d6=_0x207027[_0x3390a8(0x236)],_0x81541d=_0x207027['id'],_0x5180c9={'memberId':(await this[_0x3390a8(0x22d)][_0x3390a8(0x253)](_0x343210))['getMemberID'](),'unitId':_0x343210,'threadId':_0x2ba4d6,'mention':_0x40d0b7,'content':_0x17c9f9,'replyId':_0x81541d},_0x5d6686=await this['_httpService'][_0x3390a8(0x25e)](_0x3390a8(0x239)+_0x343210+'/edit',{'body':_0x5180c9});return!_0x5d6686[_0x3390a8(0x1e3)][_0x3390a8(0x24a)]||_0x5d6686[_0x3390a8(0x1e3)][_0x3390a8(0x24a)][_0x3390a8(0x1f0)]===0x1;}async['resolveComment'](_0x508d67){const _0x546a6e=_0x19a2ad,{unitId:_0x598d4f}=_0x508d67,_0x1756fc=_0x508d67[_0x546a6e(0x236)],_0x2dcda7={'memberId':this[_0x546a6e(0x1ed)][_0x546a6e(0x242)]()[_0x546a6e(0x249)],'unitId':_0x598d4f,'threadId':_0x1756fc,'solved':_0x508d67[_0x546a6e(0x267)]?_0x1d7c20['Solved']:_0x1d7c20[_0x546a6e(0x210)]},_0x3691ec=await this[_0x546a6e(0x215)][_0x546a6e(0x25e)]('/universer-api/comment/unit/'+_0x598d4f+'/solved',{'body':_0x2dcda7});return!_0x3691ec['body'][_0x546a6e(0x24a)]||_0x3691ec[_0x546a6e(0x1e3)][_0x546a6e(0x24a)][_0x546a6e(0x1f0)]===0x1;}async[_0x19a2ad(0x227)](_0x428b22,_0x5c2a93,_0x3a975a,_0x4207b3){const _0x39d29c=_0x19a2ad,_0x14f221={'memberId':(await this[_0x39d29c(0x22d)]['requireSession'](_0x428b22))[_0x39d29c(0x21a)](),'threadId':_0x3a975a,'replyId':_0x4207b3,'unitId':_0x428b22},_0x1b05c0=await this[_0x39d29c(0x215)]['post'](_0x39d29c(0x239)+_0x428b22+_0x39d29c(0x20c),{'body':_0x14f221});return!_0x1b05c0[_0x39d29c(0x1e3)][_0x39d29c(0x24a)]||_0x1b05c0[_0x39d29c(0x1e3)]['error']['code']===0x1;}async['listComments'](_0x1b8fb9,_0x25f977,_0x115661){const _0x5c8a1a=_0x19a2ad,_0x195dab={'unitId':_0x1b8fb9,'threadId':_0x115661},_0x59d175=await this['_httpService'][_0x5c8a1a(0x25e)](_0x5c8a1a(0x239)+_0x1b8fb9+_0x5c8a1a(0x1f2),{'body':_0x195dab}),_0x3828a8=_0x115661[_0x5c8a1a(0x23d)](_0x555408=>_0x535d82(_0x59d175['body'][_0x5c8a1a(0x25c)][_0x555408],_0x1b8fb9,_0x25f977))[_0x5c8a1a(0x23e)](Boolean);return Object[_0x5c8a1a(0x1fa)](_0x59d175[_0x5c8a1a(0x1e3)][_0x5c8a1a(0x244)])[_0x5c8a1a(0x21e)](_0x338fe6=>{const _0x48a419=_0x5c8a1a;this[_0x48a419(0x1ed)][_0x48a419(0x21c)](_0x338fe6);}),_0x3828a8;}[_0x19a2ad(0x21b)](_0x2f357c){const _0x1ead9b=_0x19a2ad;return{'id':_0x2f357c['id'],'threadId':_0x2f357c[_0x1ead9b(0x236)],'ref':_0x2f357c[_0x1ead9b(0x216)]};}};_0x164f6f=_0x190b69([_0x5cc6cb(0x0,_0x5a07a9[_0x19a2ad(0x1e7)](_0x476811['HTTPService'])),_0x5cc6cb(0x1,_0x5a07a9[_0x19a2ad(0x1e7)](_0x5a07a9[_0x19a2ad(0x24c)])),_0x5cc6cb(0x2,_0x5a07a9['Inject'](_0x271aba[_0x19a2ad(0x203)]))],_0x164f6f);var _0x39bced=Object[_0x19a2ad(0x225)],_0x258703=(_0xb6dcf5,_0x143d44,_0x3a7561,_0xb787)=>{const _0x46e075=_0x19a2ad;for(var _0x35c5cf=_0xb787>0x1?void 0x0:_0xb787?_0x39bced(_0x143d44,_0x3a7561):_0x143d44,_0x1b1430=_0xb6dcf5[_0x46e075(0x223)]-0x1,_0x5b9be8;_0x1b1430>=0x0;_0x1b1430--)(_0x5b9be8=_0xb6dcf5[_0x1b1430])&&(_0x35c5cf=_0x5b9be8(_0x35c5cf)||_0x35c5cf);return _0x35c5cf;},_0x23cf85=(_0x5b7244,_0x2f9eb8)=>(_0x54a3ed,_0x2c6d32)=>_0x2f9eb8(_0x54a3ed,_0x2c6d32,_0x5b7244);let _0x4f242a=class extends _0x5a07a9[_0x19a2ad(0x262)]{constructor(_0x54518a,_0x27c644){const _0x5463c8=_0x19a2ad;super(),this[_0x5463c8(0x234)]=_0x54518a,this['_threadCommentDataSource']=_0x27c644,this['_initDataSource']();}['_initDataSource'](){const _0x313158=_0x19a2ad;this[_0x313158(0x234)][_0x313158(0x25f)]=this[_0x313158(0x252)],this['_threadCommentDataSourceService'][_0x313158(0x246)]=!0x1;}};_0x4f242a=_0x258703([_0x23cf85(0x0,_0x4cc5f5[_0x19a2ad(0x1f6)]),_0x23cf85(0x1,_0x5a07a9[_0x19a2ad(0x1e7)](_0x164f6f))],_0x4f242a);var _0x2c980a=Object[_0x19a2ad(0x228)],_0x4bacfd=Object[_0x19a2ad(0x225)],_0x624e45=(_0x1252f8,_0x2f1fe7,_0x3c6108)=>_0x2f1fe7 in _0x1252f8?_0x2c980a(_0x1252f8,_0x2f1fe7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3c6108}):_0x1252f8[_0x2f1fe7]=_0x3c6108,_0x437058=(_0x545ae1,_0xa10447,_0x4e2d7e,_0x2ee30f)=>{const _0x43f976=_0x19a2ad;for(var _0x1ce692=_0x2ee30f>0x1?void 0x0:_0x2ee30f?_0x4bacfd(_0xa10447,_0x4e2d7e):_0xa10447,_0x474620=_0x545ae1[_0x43f976(0x223)]-0x1,_0x20a351;_0x474620>=0x0;_0x474620--)(_0x20a351=_0x545ae1[_0x474620])&&(_0x1ce692=_0x20a351(_0x1ce692)||_0x1ce692);return _0x1ce692;},_0xfa33cb=(_0x3fd24b,_0x19be84)=>(_0x4bbdc3,_0x4c4957)=>_0x19be84(_0x4bbdc3,_0x4c4957,_0x3fd24b),_0x53e428=(_0x25e476,_0x2f20a3,_0x29b6bf)=>_0x624e45(_0x25e476,typeof _0x2f20a3!=_0x19a2ad(0x209)?_0x2f20a3+'':_0x2f20a3,_0x29b6bf);_0x256275['UniverThreadCommentDataSourcePlugin']=class extends _0x5a07a9[_0x19a2ad(0x205)]{constructor(_0x3196d7=_0x2ec340,_0x4ddf61,_0x462669){const _0x2c35af=_0x19a2ad;super(),this[_0x2c35af(0x260)]=_0x3196d7,this[_0x2c35af(0x231)]=_0x4ddf61,this[_0x2c35af(0x218)]=_0x462669;const {..._0x544278}=_0x5a07a9[_0x2c35af(0x217)]({},_0x2ec340,this[_0x2c35af(0x260)]);this[_0x2c35af(0x218)]['setConfig'](_0x435912,_0x544278);}[_0x19a2ad(0x251)](){const _0x2cadfc=_0x19a2ad;[[_0x164f6f],[_0x4f242a],[_0x4a6244]][_0x2cadfc(0x21e)](_0x43aa4f=>{const _0x39836f=_0x2cadfc;this[_0x39836f(0x231)][_0x39836f(0x1f1)](_0x43aa4f);});}[_0x19a2ad(0x1ee)](){const _0xe1a2c0=_0x19a2ad;this[_0xe1a2c0(0x231)][_0xe1a2c0(0x233)](_0x4f242a),this['_injector'][_0xe1a2c0(0x233)](_0x4a6244);}},_0x53e428(_0x256275[_0x19a2ad(0x263)],_0x19a2ad(0x1fc),_0x257191),_0x53e428(_0x256275[_0x19a2ad(0x263)],_0x19a2ad(0x211),_0x5a07a9['UniverInstanceType'][_0x19a2ad(0x250)]),_0x256275[_0x19a2ad(0x263)]=_0x437058([_0x5a07a9['DependentOn'](_0x4c2680[_0x19a2ad(0x20d)],_0x271aba['UniverCollaborationClientPlugin'],_0x30cdcd[_0x19a2ad(0x25d)]),_0xfa33cb(0x1,_0x5a07a9['Inject'](_0x5a07a9[_0x19a2ad(0x269)])),_0xfa33cb(0x2,_0x5a07a9[_0x19a2ad(0x20b)])],_0x256275[_0x19a2ad(0x263)]),Object['defineProperty'](_0x256275,Symbol['toStringTag'],{'value':_0x19a2ad(0x1e9)});}));
|
|
1
|
+
function _0x22a6(_0x419804,_0xdee646){const _0x31cc1a=_0x31cc();return _0x22a6=function(_0x22a686,_0x304ef3){_0x22a686=_0x22a686-0xbf;let _0x5c7ff7=_0x31cc1a[_0x22a686];return _0x5c7ff7;},_0x22a6(_0x419804,_0xdee646);}(function(_0x294f1e,_0x172fe6){const _0x3b4f1c=_0x22a6,_0x53da08=_0x294f1e();while(!![]){try{const _0x245cb3=parseInt(_0x3b4f1c(0x103))/0x1*(parseInt(_0x3b4f1c(0x126))/0x2)+parseInt(_0x3b4f1c(0xc1))/0x3+-parseInt(_0x3b4f1c(0x132))/0x4*(parseInt(_0x3b4f1c(0xf0))/0x5)+-parseInt(_0x3b4f1c(0xc0))/0x6+parseInt(_0x3b4f1c(0xf4))/0x7+-parseInt(_0x3b4f1c(0x10c))/0x8+parseInt(_0x3b4f1c(0xe6))/0x9;if(_0x245cb3===_0x172fe6)break;else _0x53da08['push'](_0x53da08['shift']());}catch(_0x407e9d){_0x53da08['push'](_0x53da08['shift']());}}}(_0x31cc,0x2b498),function(_0x59d4af,_0xa7c9fe){const _0x1f0330=_0x22a6;typeof exports==_0x1f0330(0x13b)&&typeof module<'u'?_0xa7c9fe(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[_0x1f0330(0xe3)]?define([_0x1f0330(0x141),_0x1f0330(0x100),'@univerjs-pro/license','@univerjs/core',_0x1f0330(0xc2),_0x1f0330(0x12d),_0x1f0330(0xdd),_0x1f0330(0x131)],_0xa7c9fe):(_0x59d4af=typeof globalThis<'u'?globalThis:_0x59d4af||self,_0xa7c9fe(_0x59d4af['UniverProThreadCommentDatasource']={},_0x59d4af[_0x1f0330(0x101)],_0x59d4af[_0x1f0330(0xea)],_0x59d4af[_0x1f0330(0x121)],_0x59d4af[_0x1f0330(0xc9)],_0x59d4af[_0x1f0330(0xff)],_0x59d4af[_0x1f0330(0xdd)],_0x59d4af[_0x1f0330(0x114)]));}(this,function(_0x243787,_0x502bd1,_0x202b06,_0x18f897,_0x3f5e55,_0x56d817,_0xee20,_0x3117ec){'use strict';const _0x3c178a=_0x22a6;const _0x3d4d00=_0x3c178a(0x119);var _0x357142=(_0x55d121=>(_0x55d121[_0x55d121[_0x3c178a(0x130)]=0x0]=_0x3c178a(0x130),_0x55d121[_0x55d121[_0x3c178a(0xe9)]=0x1]=_0x3c178a(0xe9),_0x55d121[_0x55d121[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x55d121))(_0x357142||{}),_0x3adca7=(_0x44e039=>(_0x44e039[_0x44e039['Unknown']=0x0]=_0x3c178a(0x110),_0x44e039[_0x44e039['Add']=0x1]='Add',_0x44e039[_0x44e039[_0x3c178a(0xc3)]=0x2]=_0x3c178a(0xc3),_0x44e039[_0x44e039[_0x3c178a(0xe2)]=0x3]=_0x3c178a(0xe2),_0x44e039[_0x44e039[_0x3c178a(0x10e)]=0x4]=_0x3c178a(0x10e),_0x44e039[_0x44e039[_0x3c178a(0x136)]=0x5]=_0x3c178a(0x136),_0x44e039[_0x44e039[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x44e039))(_0x3adca7||{});const _0x1a4050=_0x434f06=>_0x18f897[_0x3c178a(0xc8)](new Date(+_0x434f06))[_0x3c178a(0x12f)]('YYYY/MM/DD\x20HH:mm'),_0x306df8=async(_0x2e5bbf,_0x15c608)=>{const _0x36f4a3=_0x3c178a,_0x2cb2e8=_0x2e5bbf[_0x36f4a3(0xc6)](_0x18f897[_0x36f4a3(0x11d)]),_0x2be29d=_0x2e5bbf['get'](_0x3117ec[_0x36f4a3(0x138)]);_0x15c608[_0x36f4a3(0x125)](_0x3e2699=>{const _0x3b9f97=_0x36f4a3;_0x2cb2e8[_0x3b9f97(0xe1)](_0x3e2699)&&_0x15c608[_0x3b9f97(0xda)](_0x3e2699);}),_0x15c608[_0x36f4a3(0x133)]&&(await _0x2be29d[_0x36f4a3(0xc6)](_0x36f4a3(0xdb),{'params':{'userIDs':[..._0x15c608]}}))[_0x36f4a3(0xf8)][_0x36f4a3(0x12a)][_0x36f4a3(0x125)](_0x406e68=>{const _0x6e7f0b=_0x36f4a3;_0x406e68&&_0x2cb2e8[_0x6e7f0b(0xd6)](_0x406e68);});};var _0x30a999=Object['getOwnPropertyDescriptor'],_0x460654=(_0x1668c4,_0x417b4f,_0x40da8f,_0x312f99)=>{const _0x2140aa=_0x3c178a;for(var _0x2bade3=_0x312f99>0x1?void 0x0:_0x312f99?_0x30a999(_0x417b4f,_0x40da8f):_0x417b4f,_0x520a6e=_0x1668c4[_0x2140aa(0xfc)]-0x1,_0x73bb09;_0x520a6e>=0x0;_0x520a6e--)(_0x73bb09=_0x1668c4[_0x520a6e])&&(_0x2bade3=_0x73bb09(_0x2bade3)||_0x2bade3);return _0x2bade3;},_0x155543=(_0x4302ad,_0x5ec3e9)=>(_0x30f4eb,_0x1bf27b)=>_0x5ec3e9(_0x30f4eb,_0x1bf27b,_0x4302ad);let _0x167433=class extends _0x18f897['Disposable']{constructor(_0x21f979,_0x5f14a9,_0x531055,_0x39bf6d){const _0x536207=_0x3c178a;super(),this[_0x536207(0x122)]=_0x21f979,this[_0x536207(0x10f)]=_0x5f14a9,this['_userService']=_0x531055,this[_0x536207(0xc5)]=_0x39bf6d,this[_0x536207(0xf7)](),this['_initUserSync']();}['_initUserSync'](){const _0x25feb6=_0x3c178a;this[_0x25feb6(0xd9)](this[_0x25feb6(0x10f)]['commentUpdate$'][_0x25feb6(0xf1)](_0xee20['bufferTime'](0x10))[_0x25feb6(0xdf)](_0x2cfabf=>{const _0x3f8b3a=_0x25feb6,_0x17935b=new Set();_0x2cfabf[_0x3f8b3a(0x125)](_0x59e2aa=>{const _0x32f25f=_0x3f8b3a;switch(_0x59e2aa[_0x32f25f(0x11e)]){case _0x32f25f(0x104):{const _0x44a26a=_0x59e2aa[_0x32f25f(0xeb)]['personId'];_0x17935b[_0x32f25f(0x104)](_0x44a26a);break;}}}),_0x306df8(this[_0x3f8b3a(0xc5)],_0x17935b);}));}[_0x3c178a(0xf7)](){const _0x1a981b=_0x3c178a;this[_0x1a981b(0xd9)](this[_0x1a981b(0x122)]['commentUpdate$']['subscribe'](async _0x420eb4=>{const _0x2e5a47=_0x1a981b;var _0x191df1,_0xcd698b,_0x586aa2,_0x3540ea;const _0x5d1010=(_0x191df1=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])[_0x2e5a47(0x105)](_0x35ed5c=>_0x35ed5c[_0x2e5a47(0xf5)]===_0x420eb4[_0x2e5a47(0xf5)]))==null?void 0x0:_0x191df1[_0x2e5a47(0x128)];if(!_0x5d1010)return;const {unitId:_0x2ef8e5,subUnitId:_0x5db400}=_0x5d1010;switch(_0x420eb4[_0x2e5a47(0xd8)]&&this['_userService'][_0x2e5a47(0xd6)](_0x420eb4[_0x2e5a47(0xd8)]),_0x420eb4[_0x2e5a47(0x11e)]){case _0x3adca7[_0x2e5a47(0x139)]:break;case _0x3adca7['Reply']:{this['_threadCommentModel'][_0x2e5a47(0xf9)](_0x2ef8e5,_0x5db400,{'unitId':_0x2ef8e5,'subUnitId':_0x5db400,'ref':'','id':_0x420eb4[_0x2e5a47(0xcf)],'dT':_0x1a4050(+_0x420eb4[_0x2e5a47(0xe5)]),'threadId':_0x420eb4[_0x2e5a47(0xf5)],'personId':(_0x586aa2=(_0xcd698b=_0x420eb4['user'])==null?void 0x0:_0xcd698b['userID'])!=null?_0x586aa2:_0x420eb4[_0x2e5a47(0xd2)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4['content']),'parentId':_0x5d1010['id']});break;}case _0x3adca7[_0x2e5a47(0x10e)]:{const _0x1a4e40=this[_0x2e5a47(0x10f)][_0x2e5a47(0x120)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);_0x1a4e40&&_0x1a4e40[_0x2e5a47(0xe7)]&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xe4)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);break;}case _0x3adca7[_0x2e5a47(0xe2)]:{this[_0x2e5a47(0x10f)]['updateComment'](_0x2ef8e5,_0x5db400,{'commentId':_0x420eb4[_0x2e5a47(0xcf)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4[_0x2e5a47(0x129)])});break;}case _0x3adca7[_0x2e5a47(0x136)]:{const _0x2c46c5=(_0x3540ea=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])['find'](_0x5be5c0=>_0x5be5c0[_0x2e5a47(0xf5)]===_0x420eb4['threadId']))==null?void 0x0:_0x3540ea[_0x2e5a47(0x128)];_0x2c46c5&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xf3)](_0x2ef8e5,_0x5db400,_0x2c46c5['id'],_0x420eb4[_0x2e5a47(0x124)]===_0x357142[_0x2e5a47(0xe9)]);break;}}}));}};_0x167433=_0x460654([_0x155543(0x0,_0x18f897[_0x3c178a(0x123)](_0x502bd1['CommentService'])),_0x155543(0x1,_0x18f897[_0x3c178a(0x123)](_0x56d817[_0x3c178a(0xca)])),_0x155543(0x2,_0x18f897['Inject'](_0x18f897['UserManagerService'])),_0x155543(0x3,_0x18f897['Inject'](_0x18f897[_0x3c178a(0xf6)]))],_0x167433);const _0x4fafca=_0x3c178a(0x11c),_0x50de83={};var _0x44595d=Object[_0x3c178a(0x118)],_0xa0bbd0=(_0x41ef90,_0x3d07c9,_0xea53e0,_0x1e840c)=>{const _0x1d417c=_0x3c178a;for(var _0x1cecfd=_0x1e840c>0x1?void 0x0:_0x1e840c?_0x44595d(_0x3d07c9,_0xea53e0):_0x3d07c9,_0x32ff63=_0x41ef90[_0x1d417c(0xfc)]-0x1,_0x4dcbd8;_0x32ff63>=0x0;_0x32ff63--)(_0x4dcbd8=_0x41ef90[_0x32ff63])&&(_0x1cecfd=_0x4dcbd8(_0x1cecfd)||_0x1cecfd);return _0x1cecfd;},_0x3a60a8=(_0x4735c2,_0x948371)=>(_0x470f74,_0x1135bc)=>_0x948371(_0x470f74,_0x1135bc,_0x4735c2);function _0x19a2ab(_0x3b0acf,_0x2c957a){const _0x2aa4f3=_0x3c178a,_0x108b3f=_0x3b0acf[_0x2aa4f3(0xfd)][0x0];return{..._0x2c957a,'id':_0x108b3f['replyId'],'resolved':_0x3b0acf['solved']===0x1,'dT':_0x1a4050(_0x108b3f[_0x2aa4f3(0xe5)]),'personId':_0x108b3f[_0x2aa4f3(0xd2)],'threadId':_0x108b3f['threadId']};}function _0x3d4c28(_0x39a742,_0x157313,_0x2312e1){const _0x459cb6=_0x3c178a;var _0x438ff,_0x4a445c;if(((_0x4a445c=(_0x438ff=_0x39a742==null?void 0x0:_0x39a742[_0x459cb6(0xfd)])==null?void 0x0:_0x438ff['length'])!=null?_0x4a445c:0x0)>0x0){const _0x8c464f=(_0xccc072,_0x16cdd6)=>({'id':_0xccc072[_0x459cb6(0xcf)],'threadId':_0xccc072[_0x459cb6(0xf5)],'dT':_0x1a4050(_0xccc072[_0x459cb6(0xe5)]),'personId':_0xccc072[_0x459cb6(0xd2)],'resolved':_0x39a742[_0x459cb6(0x124)]===_0x357142[_0x459cb6(0xe9)],'unitId':_0x157313,'subUnitId':_0x2312e1,'text':JSON[_0x459cb6(0x112)](_0xccc072[_0x459cb6(0x129)]),'parentId':_0x16cdd6}),_0x4ca69c=_0x8c464f(_0x39a742[_0x459cb6(0xfd)][0x0]);return{..._0x4ca69c,'children':_0x39a742[_0x459cb6(0xfd)][_0x459cb6(0x13e)](0x1)[_0x459cb6(0xf2)](_0x1fa2c3=>_0x8c464f(_0x1fa2c3,_0x4ca69c['id']))};}return null;}let _0x1f8a13=class{constructor(_0x55215f,_0x17e638,_0x2254a4){const _0x3c7340=_0x3c178a;this[_0x3c7340(0x116)]=_0x55215f,this['_userService']=_0x17e638,this[_0x3c7340(0xed)]=_0x2254a4;}async['addComment'](_0x44b159){const _0x252bbd=_0x3c178a;var _0x5d50c2,_0x63c049;const {parentId:_0x5b961f,unitId:_0x7c792d,text:_0x368ab0,threadId:_0x5c5136}=_0x44b159,_0x40f682=(_0x63c049=(_0x5d50c2=_0x368ab0[_0x252bbd(0x12b)])==null?void 0x0:_0x5d50c2['filter'](_0x8f0cc7=>_0x8f0cc7['rangeType']===_0x18f897[_0x252bbd(0xfa)]['COMMENT'])['map'](_0x3338b6=>_0x3338b6[_0x252bbd(0x12e)]))!=null?_0x63c049:[],_0x43cbd1=JSON[_0x252bbd(0x107)](_0x368ab0),_0x8b1753=(await this['_sessionService'][_0x252bbd(0xd4)](_0x7c792d))[_0x252bbd(0xd5)]();if(_0x5b961f){const _0x2bd84a={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682,'threadId':_0x5c5136},_0x1bc25a=(await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+'/reply',{'body':_0x2bd84a}))['body'][_0x252bbd(0x12c)];return{..._0x44b159,'id':_0x1bc25a[_0x252bbd(0xcf)],'dT':_0x18f897['dayjs'](+_0x1bc25a[_0x252bbd(0xe5)])[_0x252bbd(0x12f)](_0x252bbd(0x127)),'personId':_0x1bc25a[_0x252bbd(0xd2)]};}else{const _0x31ac71={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682},_0xe6c72c=await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+_0x252bbd(0x13f),{'body':_0x31ac71});return _0x19a2ab(_0xe6c72c['body'][_0x252bbd(0xcd)],_0x44b159);}}async[_0x3c178a(0xef)](_0x5b311e){const _0x6f7536=_0x3c178a;var _0x18a316,_0x580694;const {text:_0xe8ae00,unitId:_0xda708c}=_0x5b311e,_0x20e6e4=(_0x580694=(_0x18a316=_0xe8ae00[_0x6f7536(0x12b)])==null?void 0x0:_0x18a316[_0x6f7536(0x134)](_0x167e5c=>_0x167e5c[_0x6f7536(0x10b)]===_0x18f897[_0x6f7536(0xfa)]['COMMENT'])['map'](_0x13ed50=>_0x13ed50[_0x6f7536(0x12e)]))!=null?_0x580694:[],_0x148540=JSON[_0x6f7536(0x107)](_0xe8ae00),_0x2c0c54=_0x5b311e[_0x6f7536(0xf5)],_0x13449c=_0x5b311e['id'],_0x5776ed={'memberId':(await this[_0x6f7536(0xed)]['requireSession'](_0xda708c))[_0x6f7536(0xd5)](),'unitId':_0xda708c,'threadId':_0x2c0c54,'mention':_0x20e6e4,'content':_0x148540,'replyId':_0x13449c},_0x131f98=await this[_0x6f7536(0x116)][_0x6f7536(0xd0)](_0x6f7536(0x10a)+_0xda708c+_0x6f7536(0x108),{'body':_0x5776ed});return!_0x131f98[_0x6f7536(0xf8)]['error']||_0x131f98['body'][_0x6f7536(0x11f)][_0x6f7536(0x13d)]===0x1;}async[_0x3c178a(0xf3)](_0x169833){const _0x1c757e=_0x3c178a,{unitId:_0x4403d6}=_0x169833,_0x98012d=_0x169833[_0x1c757e(0xf5)],_0x1b77d7={'memberId':this['_userService'][_0x1c757e(0x142)]()[_0x1c757e(0xdc)],'unitId':_0x4403d6,'threadId':_0x98012d,'solved':_0x169833[_0x1c757e(0xd3)]?_0x357142[_0x1c757e(0xe9)]:_0x357142[_0x1c757e(0x130)]},_0x25c586=await this[_0x1c757e(0x116)]['post']('/universer-api/comment/unit/'+_0x4403d6+_0x1c757e(0x140),{'body':_0x1b77d7});return!_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]||_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]['code']===0x1;}async[_0x3c178a(0xe4)](_0x925fb6,_0x4821d8,_0x2b93b3,_0x2d2e9b){const _0x3c57ba=_0x3c178a,_0x1ea47c={'memberId':(await this['_sessionService'][_0x3c57ba(0xd4)](_0x925fb6))[_0x3c57ba(0xd5)](),'threadId':_0x2b93b3,'replyId':_0x2d2e9b,'unitId':_0x925fb6},_0x191ac7=await this[_0x3c57ba(0x116)]['post'](_0x3c57ba(0x10a)+_0x925fb6+'/delete',{'body':_0x1ea47c});return!_0x191ac7[_0x3c57ba(0xf8)][_0x3c57ba(0x11f)]||_0x191ac7[_0x3c57ba(0xf8)]['error'][_0x3c57ba(0x13d)]===0x1;}async[_0x3c178a(0x109)](_0x5931d0,_0x2f9e4a,_0x1fa66b){const _0x3e1e22=_0x3c178a,_0x4213a5={'unitId':_0x5931d0,'threadId':_0x1fa66b},_0x73be5b=await this[_0x3e1e22(0x116)][_0x3e1e22(0xd0)]('/universer-api/comment/unit/'+_0x5931d0+_0x3e1e22(0x13a),{'body':_0x4213a5}),_0x3f7678=_0x1fa66b[_0x3e1e22(0xf2)](_0x5ed43d=>_0x3d4c28(_0x73be5b[_0x3e1e22(0xf8)][_0x3e1e22(0x13c)][_0x5ed43d],_0x5931d0,_0x2f9e4a))[_0x3e1e22(0x134)](Boolean);return Object[_0x3e1e22(0x106)](_0x73be5b['body'][_0x3e1e22(0x12a)])[_0x3e1e22(0x125)](_0x625c5=>{const _0x668594=_0x3e1e22;this[_0x668594(0xfe)]['addUser'](_0x625c5);}),_0x3f7678;}[_0x3c178a(0xce)](_0x14b099){const _0x5d6050=_0x3c178a;return{'id':_0x14b099['id'],'threadId':_0x14b099[_0x5d6050(0xf5)],'ref':_0x14b099['ref']};}};_0x1f8a13=_0xa0bbd0([_0x3a60a8(0x0,_0x18f897[_0x3c178a(0x123)](_0x3117ec[_0x3c178a(0x138)])),_0x3a60a8(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897['UserManagerService'])),_0x3a60a8(0x2,_0x18f897['Inject'](_0x502bd1[_0x3c178a(0xd7)]))],_0x1f8a13);var _0xeb0d32=Object[_0x3c178a(0x118)],_0x5a8a9f=(_0x242a39,_0x2252a0,_0x39f488,_0x12a6ed)=>{const _0x224115=_0x3c178a;for(var _0x599f93=_0x12a6ed>0x1?void 0x0:_0x12a6ed?_0xeb0d32(_0x2252a0,_0x39f488):_0x2252a0,_0x3584b9=_0x242a39[_0x224115(0xfc)]-0x1,_0x308ba4;_0x3584b9>=0x0;_0x3584b9--)(_0x308ba4=_0x242a39[_0x3584b9])&&(_0x599f93=_0x308ba4(_0x599f93)||_0x599f93);return _0x599f93;},_0x3acd58=(_0x22f0a1,_0x3e9633)=>(_0x2f67e2,_0x1f0ae7)=>_0x3e9633(_0x2f67e2,_0x1f0ae7,_0x22f0a1);let _0x30438a=class extends _0x18f897[_0x3c178a(0x111)]{constructor(_0x3654c7,_0x1f48f0){const _0x5e636b=_0x3c178a;super(),this[_0x5e636b(0x11a)]=_0x3654c7,this['_threadCommentDataSource']=_0x1f48f0,this[_0x5e636b(0xec)]();}['_initDataSource'](){const _0x2ab420=_0x3c178a;this[_0x2ab420(0x11a)][_0x2ab420(0xde)]=this[_0x2ab420(0x113)],this[_0x2ab420(0x11a)][_0x2ab420(0xe8)]=!0x1;}};_0x30438a=_0x5a8a9f([_0x3acd58(0x0,_0x56d817['IThreadCommentDataSourceService']),_0x3acd58(0x1,_0x18f897[_0x3c178a(0x123)](_0x1f8a13))],_0x30438a);var _0x2d9d46=Object[_0x3c178a(0xc7)],_0x385914=Object[_0x3c178a(0x118)],_0x38067e=(_0x4daafd,_0x497a27,_0x4734c5)=>_0x497a27 in _0x4daafd?_0x2d9d46(_0x4daafd,_0x497a27,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4734c5}):_0x4daafd[_0x497a27]=_0x4734c5,_0x46b08a=(_0x1ec1ca,_0x518719,_0x202a3e,_0xe98453)=>{const _0x3ba571=_0x3c178a;for(var _0x2149f0=_0xe98453>0x1?void 0x0:_0xe98453?_0x385914(_0x518719,_0x202a3e):_0x518719,_0x5da5d0=_0x1ec1ca[_0x3ba571(0xfc)]-0x1,_0x3e4c63;_0x5da5d0>=0x0;_0x5da5d0--)(_0x3e4c63=_0x1ec1ca[_0x5da5d0])&&(_0x2149f0=_0x3e4c63(_0x2149f0)||_0x2149f0);return _0x2149f0;},_0x42334c=(_0x35c083,_0x1861b9)=>(_0x11d970,_0x577ed3)=>_0x1861b9(_0x11d970,_0x577ed3,_0x35c083),_0x6549fc=(_0x366b18,_0x30557d,_0x56b8b0)=>_0x38067e(_0x366b18,typeof _0x30557d!='symbol'?_0x30557d+'':_0x30557d,_0x56b8b0);_0x243787['UniverThreadCommentDataSourcePlugin']=class extends _0x18f897[_0x3c178a(0xcb)]{constructor(_0x36e243=_0x50de83,_0x53c994,_0x3b0fa5){const _0x10c369=_0x3c178a;super(),this[_0x10c369(0x11b)]=_0x36e243,this[_0x10c369(0xc5)]=_0x53c994,this[_0x10c369(0xee)]=_0x3b0fa5;const {..._0x18ab64}=_0x18f897['merge']({},_0x50de83,this[_0x10c369(0x11b)]);this[_0x10c369(0xee)]['setConfig'](_0x4fafca,_0x18ab64);}[_0x3c178a(0x137)](){const _0x3fb8f2=_0x3c178a;[[_0x1f8a13],[_0x30438a],[_0x167433]][_0x3fb8f2(0x125)](_0x4231e9=>{const _0x58be02=_0x3fb8f2;this['_injector'][_0x58be02(0x104)](_0x4231e9);});}[_0x3c178a(0x135)](){const _0x142dfc=_0x3c178a;this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x30438a),this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x167433);}},_0x6549fc(_0x243787[_0x3c178a(0xc4)],'pluginName',_0x3d4d00),_0x6549fc(_0x243787[_0x3c178a(0xc4)],_0x3c178a(0x11e),_0x18f897['UniverInstanceType'][_0x3c178a(0xe0)]),_0x243787['UniverThreadCommentDataSourcePlugin']=_0x46b08a([_0x18f897[_0x3c178a(0x117)](_0x3f5e55[_0x3c178a(0x115)],_0x502bd1[_0x3c178a(0xfb)],_0x202b06[_0x3c178a(0x143)]),_0x42334c(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897[_0x3c178a(0xf6)])),_0x42334c(0x2,_0x18f897[_0x3c178a(0xd1)])],_0x243787[_0x3c178a(0xc4)]),Object[_0x3c178a(0xc7)](_0x243787,Symbol['toStringTag'],{'value':_0x3c178a(0x102)});}));function _0x31cc(){const _0x55ee7d=['getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','_config','thread-comment-data-source.config','UserManagerService','type','error','getComment','UniverCore','_commentService','Inject','solved','forEach','2jROPFk','YYYY/MM/DD\x20HH:mm','root','content','users','customRanges','reply','@univerjs/thread-comment','rangeId','format','OpenOrReOpen','@univerjs/network','236GccEAp','size','filter','onReady','Solve','onStarting','HTTPService','Add','/list','object','comments','code','slice','/add','/solved','exports','getCurrentUser','UniverLicensePlugin','unitId','212712LwDaPB','55143YgVmbC','@univerjs/thread-comment-ui','Reply','UniverThreadCommentDataSourcePlugin','_injector','get','defineProperty','dayjs','UniverThreadCommentUi','ThreadCommentModel','Plugin','UNRECOGNIZED','comment','saveCommentToSnapshot','replyId','post','IConfigService','userId','resolved','requireSession','getMemberID','addUser','CollaborationSessionService','user','disposeWithMe','delete','/universer-api/user/list','userID','rxjs','dataSource','subscribe','UNIVER_UNKNOWN','getUser','Edit','amd','deleteComment','createTimestamp','4066857PdarRv','parentId','syncUpdateMutationToColla','Solved','UniverProLicense','payload','_initDataSource','_sessionService','_configService','updateComment','12235RfoFHZ','pipe','map','resolveComment','432068hngZzF','threadId','Injector','_init','body','addComment','CustomRangeType','UniverCollaborationClientPlugin','length','replies','_userService','UniverThreadComment','@univerjs-pro/collaboration-client','UniverProCollaborationClient','Module','109189vzjuoy','add','find','values','stringify','/edit','listComments','/universer-api/comment/unit/','rangeType','2272304pVWhGL','getUnit','Delete','_threadCommentModel','Unknown','Disposable','parse','_threadCommentDataSource','UniverNetwork','UniverThreadCommentUIPlugin','_httpService','DependentOn'];_0x31cc=function(){return _0x55ee7d;};return _0x31cc();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.14-nightly.
|
|
3
|
+
"version": "0.10.14-nightly.202511070640",
|
|
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-pro/
|
|
50
|
-
"@univerjs/core": "0.10.14-nightly.
|
|
51
|
-
"@univerjs/network": "0.10.14-nightly.
|
|
48
|
+
"@univerjs-pro/license": "0.10.14-nightly.202511070640",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.10.14-nightly.202511070640",
|
|
50
|
+
"@univerjs/core": "0.10.14-nightly.202511070640",
|
|
51
|
+
"@univerjs/network": "0.10.14-nightly.202511070640",
|
|
52
|
+
"@univerjs/thread-comment": "0.10.14-nightly.202511070640",
|
|
52
53
|
"@univerjs/protocol": "0.1.47",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.14-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.14-nightly.202511070628"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.14-nightly.202511070640"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|