@univerjs-pro/thread-comment-datasource 0.12.4-experimental.20251210-d708bff → 0.12.4-experimental.20251210-29c379a
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 _0x1888c3=_0x43bd;(function(_0x2ba05b,_0x4bb40b){const _0x3e1b85=_0x43bd,_0x1e4cbd=_0x2ba05b();while(!![]){try{const _0x11a6b7=parseInt(_0x3e1b85(0x115))/0x1*(-parseInt(_0x3e1b85(0xf8))/0x2)+parseInt(_0x3e1b85(0x117))/0x3*(-parseInt(_0x3e1b85(0x14b))/0x4)+parseInt(_0x3e1b85(0x150))/0x5+parseInt(_0x3e1b85(0x111))/0x6*(-parseInt(_0x3e1b85(0x106))/0x7)+-parseInt(_0x3e1b85(0x127))/0x8*(-parseInt(_0x3e1b85(0x167))/0x9)+parseInt(_0x3e1b85(0x118))/0xa*(parseInt(_0x3e1b85(0x124))/0xb)+-parseInt(_0x3e1b85(0x149))/0xc;if(_0x11a6b7===_0x4bb40b)break;else _0x1e4cbd['push'](_0x1e4cbd['shift']());}catch(_0x140c51){_0x1e4cbd['push'](_0x1e4cbd['shift']());}}}(_0x2d3f,0x74d5f));Object[_0x1888c3(0xf6)](exports,Symbol['toStringTag'],{'value':_0x1888c3(0x15d)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1888c3(0x101);var I=(_0x384f36=>(_0x384f36[_0x384f36[_0x1888c3(0x11b)]=0x0]='OpenOrReOpen',_0x384f36[_0x384f36[_0x1888c3(0x158)]=0x1]=_0x1888c3(0x158),_0x384f36[_0x384f36['UNRECOGNIZED']=-0x1]=_0x1888c3(0xf1),_0x384f36))(I||{}),v=(_0x3ef90b=>(_0x3ef90b[_0x3ef90b[_0x1888c3(0x125)]=0x0]=_0x1888c3(0x125),_0x3ef90b[_0x3ef90b[_0x1888c3(0x162)]=0x1]=_0x1888c3(0x162),_0x3ef90b[_0x3ef90b[_0x1888c3(0x15b)]=0x2]='Reply',_0x3ef90b[_0x3ef90b[_0x1888c3(0x12a)]=0x3]=_0x1888c3(0x12a),_0x3ef90b[_0x3ef90b[_0x1888c3(0x10d)]=0x4]='Delete',_0x3ef90b[_0x3ef90b[_0x1888c3(0x143)]=0x5]=_0x1888c3(0x143),_0x3ef90b[_0x3ef90b[_0x1888c3(0xf1)]=-0x1]=_0x1888c3(0xf1),_0x3ef90b))(v||{});const f=_0x47bdcd=>c[_0x1888c3(0x137)](new Date(+_0x47bdcd))['format'](_0x1888c3(0xfc)),R=async(_0x95942,_0x47576a)=>{const _0x393920=_0x1888c3,_0x5d1200=_0x95942[_0x393920(0x142)](c[_0x393920(0x128)]),_0x27b64d=_0x95942[_0x393920(0x142)](P[_0x393920(0x10b)]);_0x47576a[_0x393920(0x140)](_0x16832c=>{const _0x5f50e4=_0x393920;_0x5d1200[_0x5f50e4(0x13e)](_0x16832c)&&_0x47576a[_0x5f50e4(0x14c)](_0x16832c);}),_0x47576a[_0x393920(0x163)]&&(await _0x27b64d[_0x393920(0x142)](_0x393920(0xfb),{'params':{'userIDs':[..._0x47576a]}}))['body']['users'][_0x393920(0x140)](_0x3963ed=>{_0x3963ed&&_0x5d1200['addUser'](_0x3963ed);});};var $=Object[_0x1888c3(0x116)],E=(_0x45ce24,_0x599d5d,_0x38b08a,_0x7dc6a1)=>{const _0x4ac7ff=_0x1888c3;for(var _0x571d9b=_0x7dc6a1>0x1?void 0x0:_0x7dc6a1?$(_0x599d5d,_0x38b08a):_0x599d5d,_0x9c72ae=_0x45ce24[_0x4ac7ff(0x15a)]-0x1,_0x55b343;_0x9c72ae>=0x0;_0x9c72ae--)(_0x55b343=_0x45ce24[_0x9c72ae])&&(_0x571d9b=_0x55b343(_0x571d9b)||_0x571d9b);return _0x571d9b;},S=(_0x27b5dc,_0x2e39cb)=>(_0x1d5108,_0x47b0c9)=>_0x2e39cb(_0x1d5108,_0x47b0c9,_0x27b5dc);let _=class extends c[_0x1888c3(0x152)]{constructor(_0x712adb,_0x404caf,_0x5a7ed5,_0x49cd83){const _0x5c96c1=_0x1888c3;super(),this['_commentService']=_0x712adb,this[_0x5c96c1(0x107)]=_0x404caf,this[_0x5c96c1(0x155)]=_0x5a7ed5,this['_injector']=_0x49cd83,this[_0x5c96c1(0x130)](),this[_0x5c96c1(0x159)]();}['_initUserSync'](){const _0x443a9d=_0x1888c3;this[_0x443a9d(0xf7)](this['_threadCommentModel'][_0x443a9d(0x120)][_0x443a9d(0x138)](j['bufferTime'](0x10))['subscribe'](_0x1af942=>{const _0x4954d7=_0x443a9d,_0x5d9958=new Set();_0x1af942[_0x4954d7(0x140)](_0x2c19a2=>{const _0x1b4eb6=_0x4954d7;switch(_0x2c19a2[_0x1b4eb6(0x121)]){case _0x1b4eb6(0x119):{const _0x2f7f2d=_0x2c19a2[_0x1b4eb6(0x11a)][_0x1b4eb6(0x11f)];_0x5d9958[_0x1b4eb6(0x119)](_0x2f7f2d);break;}}}),R(this['_injector'],_0x5d9958);}));}['_init'](){const _0x3b9995=_0x1888c3;this[_0x3b9995(0xf7)](this[_0x3b9995(0x123)][_0x3b9995(0x120)][_0x3b9995(0xf0)](async _0x644664=>{const _0x16025a=_0x3b9995;var _0x34a0ba,_0xdb0160,_0x346d56,_0x226f33;const _0x57d2cb=(_0x34a0ba=this[_0x16025a(0x107)][_0x16025a(0x133)](_0x644664['unitId'])[_0x16025a(0x160)](_0x5e8efe=>_0x5e8efe[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x34a0ba[_0x16025a(0x144)];if(!_0x57d2cb)return;const {unitId:_0x168825,subUnitId:_0x4e8c45}=_0x57d2cb;switch(_0x644664['user']&&this['_userService']['addUser'](_0x644664['user']),_0x644664['type']){case v[_0x16025a(0x162)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x168825,_0x4e8c45,{'unitId':_0x168825,'subUnitId':_0x4e8c45,'ref':'','id':_0x644664[_0x16025a(0x164)],'dT':f(+_0x644664['createTimestamp']),'threadId':_0x644664[_0x16025a(0xfe)],'personId':(_0x346d56=(_0xdb0160=_0x644664[_0x16025a(0x13f)])==null?void 0x0:_0xdb0160[_0x16025a(0x161)])!=null?_0x346d56:_0x644664[_0x16025a(0x153)],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)]),'parentId':_0x57d2cb['id']});break;}case v[_0x16025a(0x10d)]:{const _0x57a1df=this[_0x16025a(0x107)][_0x16025a(0x139)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);_0x57a1df&&_0x57a1df[_0x16025a(0x10e)]&&this[_0x16025a(0x107)][_0x16025a(0x15e)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);break;}case v[_0x16025a(0x12a)]:{this[_0x16025a(0x107)][_0x16025a(0xfa)](_0x168825,_0x4e8c45,{'commentId':_0x644664['replyId'],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)])});break;}case v[_0x16025a(0x143)]:{const _0x42c666=(_0x226f33=this['_threadCommentModel'][_0x16025a(0x133)](_0x644664[_0x16025a(0x110)])[_0x16025a(0x160)](_0x25184c=>_0x25184c[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x226f33['root'];_0x42c666&&this['_threadCommentModel']['resolveComment'](_0x168825,_0x4e8c45,_0x42c666['id'],_0x644664[_0x16025a(0x12f)]===I[_0x16025a(0x158)]);break;}}}));}};function _0x2d3f(){const _0x2e8b30=['slice','Disposable','userId','symbol','_userService','thread-comment-data-source.config','dataSource','Solved','_initUserSync','length','Reply','COMMENT','Module','deleteComment','/add','find','userID','Add','size','replyId','Inject','stringify','333cyqofo','IConfigService','subscribe','UNRECOGNIZED','rangeType','CustomRangeType','UniverThreadCommentDataSourcePlugin','rangeId','defineProperty','disposeWithMe','19442Dvdwpw','Plugin','updateComment','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','content','threadId','/universer-api/comment/unit/','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','filter','addUser','_threadCommentDataSource','78785YUjqrG','_threadCommentModel','UNIVER_UNKNOWN','_injector','_configService','HTTPService','syncUpdateMutationToColla','Delete','parentId','DependentOn','unitId','150RgKQMM','resolved','_initDataSource','createTimestamp','1hnrEUR','getOwnPropertyDescriptor','3fqRGbW','1070WkGaGz','add','payload','OpenOrReOpen','/reply','pluginName','_threadCommentDataSourceService','personId','commentUpdate$','type','getCurrentUser','_commentService','78133XiXKrM','Unknown','ThreadCommentModel','64184zjQVJf','UserManagerService','UniverInstanceType','Edit','getMemberID','body','_httpService','comment','solved','_init','values','UniverThreadCommentUIPlugin','getUnit','map','listComments','Injector','dayjs','pipe','getComment','CommentService','/delete','requireSession','post','getUser','user','forEach','CollaborationSessionService','get','Solve','root','error','format','_config','customRanges','238584agLnzt','merge','2664092LJxKTF','delete','code','ref','_sessionService','1993440fxbYSD'];_0x2d3f=function(){return _0x2e8b30;};return _0x2d3f();}_=E([S(0x0,c['Inject'](b[_0x1888c3(0x13a)])),S(0x1,c['Inject'](M[_0x1888c3(0x126)])),S(0x2,c['Inject'](c[_0x1888c3(0x128)])),S(0x3,c[_0x1888c3(0x165)](c[_0x1888c3(0x136)]))],_);const q=_0x1888c3(0x156),D={};var A=Object[_0x1888c3(0x116)],x=(_0x37fe40,_0x158bb5,_0x5143df,_0x5c1a51)=>{const _0xfe44ad=_0x1888c3;for(var _0x10da52=_0x5c1a51>0x1?void 0x0:_0x5c1a51?A(_0x158bb5,_0x5143df):_0x158bb5,_0x4ee92e=_0x37fe40[_0xfe44ad(0x15a)]-0x1,_0x229636;_0x4ee92e>=0x0;_0x4ee92e--)(_0x229636=_0x37fe40[_0x4ee92e])&&(_0x10da52=_0x229636(_0x10da52)||_0x10da52);return _0x10da52;},C=(_0x2b5a6f,_0x47c57c)=>(_0x3d43f7,_0x30a94d)=>_0x47c57c(_0x3d43f7,_0x30a94d,_0x2b5a6f);function Y(_0x100041,_0x443287){const _0x13106e=_0x1888c3,_0x3164cd=_0x100041[_0x13106e(0x100)][0x0];return{..._0x443287,'id':_0x3164cd[_0x13106e(0x164)],'resolved':_0x100041['solved']===0x1,'dT':f(_0x3164cd[_0x13106e(0x114)]),'personId':_0x3164cd[_0x13106e(0x153)],'threadId':_0x3164cd[_0x13106e(0xfe)]};}function G(_0x5ed0e9,_0x4a5b94,_0x17b073){const _0x2c06d9=_0x1888c3;var _0x383261,_0x240e18;if(((_0x240e18=(_0x383261=_0x5ed0e9==null?void 0x0:_0x5ed0e9[_0x2c06d9(0x100)])==null?void 0x0:_0x383261[_0x2c06d9(0x15a)])!=null?_0x240e18:0x0)>0x0){const _0x49d696=(_0x25ec7e,_0x849351)=>({'id':_0x25ec7e['replyId'],'threadId':_0x25ec7e['threadId'],'dT':f(_0x25ec7e[_0x2c06d9(0x114)]),'personId':_0x25ec7e['userId'],'resolved':_0x5ed0e9[_0x2c06d9(0x12f)]===I[_0x2c06d9(0x158)],'unitId':_0x4a5b94,'subUnitId':_0x17b073,'text':JSON[_0x2c06d9(0x102)](_0x25ec7e['content']),'parentId':_0x849351}),_0x221515=_0x49d696(_0x5ed0e9[_0x2c06d9(0x100)][0x0]);return{..._0x221515,'children':_0x5ed0e9[_0x2c06d9(0x100)][_0x2c06d9(0x151)](0x1)[_0x2c06d9(0x134)](_0x5496c6=>_0x49d696(_0x5496c6,_0x221515['id']))};}return null;}let p=class{constructor(_0x376885,_0x18a3bf,_0x4befc7){const _0x26f50a=_0x1888c3;this[_0x26f50a(0x12d)]=_0x376885,this[_0x26f50a(0x155)]=_0x18a3bf,this[_0x26f50a(0x14f)]=_0x4befc7;}async['addComment'](_0x330d9e){const _0x202c88=_0x1888c3;var _0xaabada,_0x8d1291;const {parentId:_0x266295,unitId:_0x2944a2,text:_0x41b459,threadId:_0x3e8abd}=_0x330d9e,_0x392a2b=(_0x8d1291=(_0xaabada=_0x41b459['customRanges'])==null?void 0x0:_0xaabada['filter'](_0x1ced1d=>_0x1ced1d[_0x202c88(0xf2)]===c[_0x202c88(0xf3)][_0x202c88(0x15c)])['map'](_0x88b8ef=>_0x88b8ef[_0x202c88(0xf5)]))!=null?_0x8d1291:[],_0x1e0dcf=JSON['stringify'](_0x41b459),_0x39c75d=(await this[_0x202c88(0x14f)][_0x202c88(0x13c)](_0x2944a2))[_0x202c88(0x12b)]();if(_0x266295){const _0x261019={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b,'threadId':_0x3e8abd},_0x7e9e79=(await this[_0x202c88(0x12d)][_0x202c88(0x13d)](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x11c),{'body':_0x261019}))['body']['reply'];return{..._0x330d9e,'id':_0x7e9e79[_0x202c88(0x164)],'dT':c[_0x202c88(0x137)](+_0x7e9e79[_0x202c88(0x114)])[_0x202c88(0x146)](_0x202c88(0xfc)),'personId':_0x7e9e79[_0x202c88(0x153)]};}else{const _0x470466={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b},_0x4124a6=await this[_0x202c88(0x12d)]['post'](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x15f),{'body':_0x470466});return Y(_0x4124a6['body'][_0x202c88(0x12e)],_0x330d9e);}}async[_0x1888c3(0xfa)](_0x2a873d){const _0x2eeb14=_0x1888c3;var _0x3c0fe8,_0x4b2330;const {text:_0x5be4b2,unitId:_0x24c828}=_0x2a873d,_0x10d790=(_0x4b2330=(_0x3c0fe8=_0x5be4b2[_0x2eeb14(0x148)])==null?void 0x0:_0x3c0fe8[_0x2eeb14(0x103)](_0x1cb946=>_0x1cb946['rangeType']===c[_0x2eeb14(0xf3)]['COMMENT'])[_0x2eeb14(0x134)](_0x5f23eb=>_0x5f23eb[_0x2eeb14(0xf5)]))!=null?_0x4b2330:[],_0xd83c93=JSON[_0x2eeb14(0x166)](_0x5be4b2),_0x31ce00=_0x2a873d['threadId'],_0x1e3941=_0x2a873d['id'],_0x4565f7={'memberId':(await this['_sessionService']['requireSession'](_0x24c828))['getMemberID'](),'unitId':_0x24c828,'threadId':_0x31ce00,'mention':_0x10d790,'content':_0xd83c93,'replyId':_0x1e3941},_0x38b216=await this['_httpService'][_0x2eeb14(0x13d)](_0x2eeb14(0xff)+_0x24c828+'/edit',{'body':_0x4565f7});return!_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]||_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]['code']===0x1;}async['resolveComment'](_0x447063){const _0xbbd85a=_0x1888c3,{unitId:_0x5f3a07}=_0x447063,_0x3d1d4d=_0x447063[_0xbbd85a(0xfe)],_0x2e0432={'memberId':this[_0xbbd85a(0x155)][_0xbbd85a(0x122)]()[_0xbbd85a(0x161)],'unitId':_0x5f3a07,'threadId':_0x3d1d4d,'solved':_0x447063[_0xbbd85a(0x112)]?I[_0xbbd85a(0x158)]:I['OpenOrReOpen']},_0x5efcb4=await this[_0xbbd85a(0x12d)][_0xbbd85a(0x13d)]('/universer-api/comment/unit/'+_0x5f3a07+'/solved',{'body':_0x2e0432});return!_0x5efcb4['body'][_0xbbd85a(0x145)]||_0x5efcb4['body'][_0xbbd85a(0x145)][_0xbbd85a(0x14d)]===0x1;}async[_0x1888c3(0x15e)](_0x51f123,_0x9512fd,_0x1a70d2,_0x28feff){const _0xe4e6a1=_0x1888c3,_0x521122={'memberId':(await this['_sessionService'][_0xe4e6a1(0x13c)](_0x51f123))[_0xe4e6a1(0x12b)](),'threadId':_0x1a70d2,'replyId':_0x28feff,'unitId':_0x51f123},_0x163300=await this[_0xe4e6a1(0x12d)][_0xe4e6a1(0x13d)](_0xe4e6a1(0xff)+_0x51f123+_0xe4e6a1(0x13b),{'body':_0x521122});return!_0x163300['body'][_0xe4e6a1(0x145)]||_0x163300[_0xe4e6a1(0x12c)]['error']['code']===0x1;}async[_0x1888c3(0x135)](_0x4e4743,_0x529182,_0x10a06f){const _0x360190=_0x1888c3,_0x3abc90={'unitId':_0x4e4743,'threadId':_0x10a06f},_0x170259=await this[_0x360190(0x12d)]['post'](_0x360190(0xff)+_0x4e4743+'/list',{'body':_0x3abc90}),_0x54df3b=_0x10a06f[_0x360190(0x134)](_0x402bd4=>G(_0x170259[_0x360190(0x12c)]['comments'][_0x402bd4],_0x4e4743,_0x529182))[_0x360190(0x103)](Boolean);return Object[_0x360190(0x131)](_0x170259[_0x360190(0x12c)]['users'])[_0x360190(0x140)](_0x585efe=>{const _0x364d2e=_0x360190;this['_userService'][_0x364d2e(0x104)](_0x585efe);}),_0x54df3b;}['saveCommentToSnapshot'](_0x4beb55){const _0x4a4191=_0x1888c3;return{'id':_0x4beb55['id'],'threadId':_0x4beb55[_0x4a4191(0xfe)],'ref':_0x4beb55[_0x4a4191(0x14e)]};}};p=x([C(0x0,c[_0x1888c3(0x165)](P[_0x1888c3(0x10b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1888c3(0x165)](b[_0x1888c3(0x141)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x27ef8a,_0x10fb27,_0x425d6a,_0x2395f2)=>{for(var _0x5aa957=_0x2395f2>0x1?void 0x0:_0x2395f2?H(_0x10fb27,_0x425d6a):_0x10fb27,_0x3188a3=_0x27ef8a['length']-0x1,_0x28008a;_0x3188a3>=0x0;_0x3188a3--)(_0x28008a=_0x27ef8a[_0x3188a3])&&(_0x5aa957=_0x28008a(_0x5aa957)||_0x5aa957);return _0x5aa957;},y=(_0x26766f,_0x11fcc7)=>(_0x543db4,_0xaaefcc)=>_0x11fcc7(_0x543db4,_0xaaefcc,_0x26766f);function _0x43bd(_0x3240d3,_0x54e897){_0x3240d3=_0x3240d3-0xf0;const _0x2d3f02=_0x2d3f();let _0x43bd8a=_0x2d3f02[_0x3240d3];return _0x43bd8a;}let g=class extends c[_0x1888c3(0x152)]{constructor(_0xc42b85,_0x40d4b1){const _0x45b12c=_0x1888c3;super(),this[_0x45b12c(0x11e)]=_0xc42b85,this[_0x45b12c(0x105)]=_0x40d4b1,this[_0x45b12c(0x113)]();}['_initDataSource'](){const _0x543c6f=_0x1888c3;this[_0x543c6f(0x11e)][_0x543c6f(0x157)]=this['_threadCommentDataSource'],this[_0x543c6f(0x11e)][_0x543c6f(0x10c)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1888c3(0x165)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x485531,_0x12e569,_0x4823ea)=>_0x12e569 in _0x485531?F(_0x485531,_0x12e569,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4823ea}):_0x485531[_0x12e569]=_0x4823ea,W=(_0x4a5115,_0x984356,_0x4479d1,_0x1ffde3)=>{for(var _0x66e163=_0x1ffde3>0x1?void 0x0:_0x1ffde3?L(_0x984356,_0x4479d1):_0x984356,_0x2f56da=_0x4a5115['length']-0x1,_0x54eb55;_0x2f56da>=0x0;_0x2f56da--)(_0x54eb55=_0x4a5115[_0x2f56da])&&(_0x66e163=_0x54eb55(_0x66e163)||_0x66e163);return _0x66e163;},O=(_0x44c1b6,_0x1a42e6)=>(_0x556fa3,_0x4b792a)=>_0x1a42e6(_0x556fa3,_0x4b792a,_0x44c1b6),N=(_0x53b36e,_0x3fa555,_0x3466f9)=>Z(_0x53b36e,typeof _0x3fa555!=_0x1888c3(0x154)?_0x3fa555+'':_0x3fa555,_0x3466f9);exports[_0x1888c3(0xf4)]=class extends c[_0x1888c3(0xf9)]{constructor(_0x1c496f=D,_0x2605bb,_0xab95b6){const _0x23eb8b=_0x1888c3;super(),this['_config']=_0x1c496f,this['_injector']=_0x2605bb,this[_0x23eb8b(0x10a)]=_0xab95b6;const {..._0x2a20c2}=c[_0x23eb8b(0x14a)]({},D,this[_0x23eb8b(0x147)]);this[_0x23eb8b(0x10a)]['setConfig'](q,_0x2a20c2);}['onStarting'](){const _0x27f504=_0x1888c3;[[p],[g],[_]][_0x27f504(0x140)](_0x1f5e21=>{const _0x3e794a=_0x27f504;this[_0x3e794a(0x109)]['add'](_0x1f5e21);});}['onReady'](){const _0x228b78=_0x1888c3;this['_injector']['get'](g),this[_0x228b78(0x109)][_0x228b78(0x142)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x11d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x121),c[_0x1888c3(0x129)][_0x1888c3(0x108)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1888c3(0x10f)](w[_0x1888c3(0x132)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x1888c3(0x136)])),O(0x2,c[_0x1888c3(0x168)])],exports[_0x1888c3(0xf4)]);
|
|
1
|
+
'use strict';const _0x66c89=_0x347c;(function(_0x67cf03,_0x42dca9){const _0xae4057=_0x347c,_0x233d57=_0x67cf03();while(!![]){try{const _0x52db19=-parseInt(_0xae4057(0x148))/0x1*(parseInt(_0xae4057(0x18e))/0x2)+-parseInt(_0xae4057(0x162))/0x3+parseInt(_0xae4057(0x1a0))/0x4*(parseInt(_0xae4057(0x1a1))/0x5)+-parseInt(_0xae4057(0x147))/0x6*(parseInt(_0xae4057(0x1a8))/0x7)+-parseInt(_0xae4057(0x173))/0x8+-parseInt(_0xae4057(0x17c))/0x9+parseInt(_0xae4057(0x193))/0xa*(parseInt(_0xae4057(0x177))/0xb);if(_0x52db19===_0x42dca9)break;else _0x233d57['push'](_0x233d57['shift']());}catch(_0x48d094){_0x233d57['push'](_0x233d57['shift']());}}}(_0x385e,0x9845e));Object[_0x66c89(0x180)](exports,Symbol[_0x66c89(0x19b)],{'value':'Module'});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=_0x66c89(0x175);var I=(_0x5d4ab0=>(_0x5d4ab0[_0x5d4ab0[_0x66c89(0x154)]=0x0]=_0x66c89(0x154),_0x5d4ab0[_0x5d4ab0[_0x66c89(0x18c)]=0x1]=_0x66c89(0x18c),_0x5d4ab0[_0x5d4ab0[_0x66c89(0x16b)]=-0x1]=_0x66c89(0x16b),_0x5d4ab0))(I||{}),v=(_0x4157fa=>(_0x4157fa[_0x4157fa['Unknown']=0x0]='Unknown',_0x4157fa[_0x4157fa[_0x66c89(0x166)]=0x1]='Add',_0x4157fa[_0x4157fa[_0x66c89(0x14c)]=0x2]='Reply',_0x4157fa[_0x4157fa[_0x66c89(0x1a2)]=0x3]=_0x66c89(0x1a2),_0x4157fa[_0x4157fa[_0x66c89(0x1b1)]=0x4]=_0x66c89(0x1b1),_0x4157fa[_0x4157fa['Solve']=0x5]='Solve',_0x4157fa[_0x4157fa[_0x66c89(0x16b)]=-0x1]=_0x66c89(0x16b),_0x4157fa))(v||{});const f=_0x2c5dee=>c[_0x66c89(0x192)](new Date(+_0x2c5dee))[_0x66c89(0x140)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2acbcb,_0x3f262b)=>{const _0x595555=_0x66c89,_0x2048b4=_0x2acbcb[_0x595555(0x167)](c[_0x595555(0x159)]),_0x5a1327=_0x2acbcb[_0x595555(0x167)](P[_0x595555(0x1a7)]);_0x3f262b['forEach'](_0x1c321f=>{const _0x25f43a=_0x595555;_0x2048b4[_0x25f43a(0x1ae)](_0x1c321f)&&_0x3f262b['delete'](_0x1c321f);}),_0x3f262b[_0x595555(0x181)]&&(await _0x5a1327[_0x595555(0x167)](_0x595555(0x169),{'params':{'userIDs':[..._0x3f262b]}}))[_0x595555(0x182)][_0x595555(0x1a4)][_0x595555(0x198)](_0xb78124=>{_0xb78124&&_0x2048b4['addUser'](_0xb78124);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x47dc7b,_0x9f633,_0x36b723,_0x194f55)=>{const _0x221ee8=_0x66c89;for(var _0xefc8f3=_0x194f55>0x1?void 0x0:_0x194f55?$(_0x9f633,_0x36b723):_0x9f633,_0x4b9cd7=_0x47dc7b[_0x221ee8(0x19f)]-0x1,_0x482cf2;_0x4b9cd7>=0x0;_0x4b9cd7--)(_0x482cf2=_0x47dc7b[_0x4b9cd7])&&(_0xefc8f3=_0x482cf2(_0xefc8f3)||_0xefc8f3);return _0xefc8f3;},S=(_0x8b24e3,_0x32dcfd)=>(_0x34eb99,_0x314b64)=>_0x32dcfd(_0x34eb99,_0x314b64,_0x8b24e3);let _=class extends c['Disposable']{constructor(_0xb16d14,_0x4e1747,_0x12de62,_0x30e2b4){const _0x5ec4fd=_0x66c89;super(),this[_0x5ec4fd(0x184)]=_0xb16d14,this[_0x5ec4fd(0x1a5)]=_0x4e1747,this['_userService']=_0x12de62,this[_0x5ec4fd(0x15e)]=_0x30e2b4,this[_0x5ec4fd(0x172)](),this[_0x5ec4fd(0x19a)]();}['_initUserSync'](){const _0x54d6b8=_0x66c89;this[_0x54d6b8(0x142)](this['_threadCommentModel'][_0x54d6b8(0x171)][_0x54d6b8(0x153)](j['bufferTime'](0x10))[_0x54d6b8(0x1b0)](_0x3dff33=>{const _0xa2aad2=_0x54d6b8,_0x38d52c=new Set();_0x3dff33['forEach'](_0x1fedad=>{const _0x375c04=_0x347c;switch(_0x1fedad[_0x375c04(0x189)]){case _0x375c04(0x16c):{const _0x38079b=_0x1fedad[_0x375c04(0x179)]['personId'];_0x38d52c['add'](_0x38079b);break;}}}),R(this[_0xa2aad2(0x15e)],_0x38d52c);}));}['_init'](){const _0x52d70b=_0x66c89;this[_0x52d70b(0x142)](this[_0x52d70b(0x184)][_0x52d70b(0x171)]['subscribe'](async _0x158a15=>{const _0xc56e86=_0x52d70b;var _0xa4e34a,_0x23762c,_0x5c14b0,_0x52c322;const _0x3e5d01=(_0xa4e34a=this['_threadCommentModel'][_0xc56e86(0x178)](_0x158a15[_0xc56e86(0x18b)])[_0xc56e86(0x19d)](_0x2941dc=>_0x2941dc[_0xc56e86(0x158)]===_0x158a15[_0xc56e86(0x158)]))==null?void 0x0:_0xa4e34a['root'];if(!_0x3e5d01)return;const {unitId:_0x4a839b,subUnitId:_0x14fc09}=_0x3e5d01;switch(_0x158a15[_0xc56e86(0x168)]&&this[_0xc56e86(0x16a)][_0xc56e86(0x1aa)](_0x158a15['user']),_0x158a15['type']){case v['Add']:break;case v[_0xc56e86(0x14c)]:{this[_0xc56e86(0x1a5)][_0xc56e86(0x14a)](_0x4a839b,_0x14fc09,{'unitId':_0x4a839b,'subUnitId':_0x14fc09,'ref':'','id':_0x158a15[_0xc56e86(0x18f)],'dT':f(+_0x158a15['createTimestamp']),'threadId':_0x158a15[_0xc56e86(0x158)],'personId':(_0x5c14b0=(_0x23762c=_0x158a15[_0xc56e86(0x168)])==null?void 0x0:_0x23762c[_0xc56e86(0x143)])!=null?_0x5c14b0:_0x158a15[_0xc56e86(0x1a6)],'text':JSON['parse'](_0x158a15[_0xc56e86(0x144)]),'parentId':_0x3e5d01['id']});break;}case v[_0xc56e86(0x1b1)]:{const _0x3d657e=this[_0xc56e86(0x1a5)][_0xc56e86(0x146)](_0x4a839b,_0x14fc09,_0x158a15[_0xc56e86(0x18f)]);_0x3d657e&&_0x3d657e[_0xc56e86(0x186)]&&this[_0xc56e86(0x1a5)]['deleteComment'](_0x4a839b,_0x14fc09,_0x158a15[_0xc56e86(0x18f)]);break;}case v[_0xc56e86(0x1a2)]:{this[_0xc56e86(0x1a5)][_0xc56e86(0x190)](_0x4a839b,_0x14fc09,{'commentId':_0x158a15[_0xc56e86(0x18f)],'text':JSON[_0xc56e86(0x141)](_0x158a15[_0xc56e86(0x144)])});break;}case v[_0xc56e86(0x19e)]:{const _0x2173f9=(_0x52c322=this[_0xc56e86(0x1a5)]['getUnit'](_0x158a15[_0xc56e86(0x18b)])[_0xc56e86(0x19d)](_0xb02150=>_0xb02150[_0xc56e86(0x158)]===_0x158a15['threadId']))==null?void 0x0:_0x52c322['root'];_0x2173f9&&this['_threadCommentModel'][_0xc56e86(0x185)](_0x4a839b,_0x14fc09,_0x2173f9['id'],_0x158a15[_0xc56e86(0x14b)]===I[_0xc56e86(0x18c)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x66c89(0x17f)])),S(0x1,c[_0x66c89(0x160)](M['ThreadCommentModel'])),S(0x2,c[_0x66c89(0x160)](c['UserManagerService'])),S(0x3,c['Inject'](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x66c89(0x15c)],x=(_0x245375,_0x44440b,_0x593c6c,_0x313d42)=>{const _0x4a989f=_0x66c89;for(var _0x4ce373=_0x313d42>0x1?void 0x0:_0x313d42?A(_0x44440b,_0x593c6c):_0x44440b,_0x20a6eb=_0x245375[_0x4a989f(0x19f)]-0x1,_0xae6ed2;_0x20a6eb>=0x0;_0x20a6eb--)(_0xae6ed2=_0x245375[_0x20a6eb])&&(_0x4ce373=_0xae6ed2(_0x4ce373)||_0x4ce373);return _0x4ce373;},C=(_0x13f766,_0xe22127)=>(_0x35757e,_0xb3a03a)=>_0xe22127(_0x35757e,_0xb3a03a,_0x13f766);function Y(_0xfe1d64,_0x43d95f){const _0x13c9fb=_0x66c89,_0x545ca6=_0xfe1d64['replies'][0x0];return{..._0x43d95f,'id':_0x545ca6[_0x13c9fb(0x18f)],'resolved':_0xfe1d64['solved']===0x1,'dT':f(_0x545ca6['createTimestamp']),'personId':_0x545ca6[_0x13c9fb(0x1a6)],'threadId':_0x545ca6[_0x13c9fb(0x158)]};}function G(_0x46435f,_0x25a935,_0x4db982){const _0x27ab42=_0x66c89;var _0xf53a83,_0x8f493d;if(((_0x8f493d=(_0xf53a83=_0x46435f==null?void 0x0:_0x46435f[_0x27ab42(0x174)])==null?void 0x0:_0xf53a83['length'])!=null?_0x8f493d:0x0)>0x0){const _0x112740=(_0x5072fe,_0x5214c4)=>({'id':_0x5072fe[_0x27ab42(0x18f)],'threadId':_0x5072fe[_0x27ab42(0x158)],'dT':f(_0x5072fe[_0x27ab42(0x14d)]),'personId':_0x5072fe['userId'],'resolved':_0x46435f[_0x27ab42(0x14b)]===I[_0x27ab42(0x18c)],'unitId':_0x25a935,'subUnitId':_0x4db982,'text':JSON[_0x27ab42(0x141)](_0x5072fe[_0x27ab42(0x144)]),'parentId':_0x5214c4}),_0x3280b3=_0x112740(_0x46435f[_0x27ab42(0x174)][0x0]);return{..._0x3280b3,'children':_0x46435f[_0x27ab42(0x174)][_0x27ab42(0x15d)](0x1)[_0x27ab42(0x155)](_0x95f8d3=>_0x112740(_0x95f8d3,_0x3280b3['id']))};}return null;}let p=class{constructor(_0x4309e8,_0xfc1495,_0x190dc3){const _0x4f7027=_0x66c89;this[_0x4f7027(0x163)]=_0x4309e8,this[_0x4f7027(0x16a)]=_0xfc1495,this['_sessionService']=_0x190dc3;}async[_0x66c89(0x14a)](_0x21ddcb){const _0x347d08=_0x66c89;var _0x3c7f7a,_0x4f331a;const {parentId:_0x4c6039,unitId:_0x266f2f,text:_0x49d410,threadId:_0x411cdd}=_0x21ddcb,_0x28e955=(_0x4f331a=(_0x3c7f7a=_0x49d410['customRanges'])==null?void 0x0:_0x3c7f7a['filter'](_0x55f045=>_0x55f045[_0x347d08(0x149)]===c[_0x347d08(0x18a)][_0x347d08(0x199)])[_0x347d08(0x155)](_0x40b6e5=>_0x40b6e5[_0x347d08(0x165)]))!=null?_0x4f331a:[],_0x55eb8a=JSON['stringify'](_0x49d410),_0x3cbc53=(await this[_0x347d08(0x15a)][_0x347d08(0x157)](_0x266f2f))['getMemberID']();if(_0x4c6039){const _0x27e9c7={'memberId':_0x3cbc53,'unitId':_0x266f2f,'content':_0x55eb8a,'mention':_0x28e955,'threadId':_0x411cdd},_0x21bc22=(await this[_0x347d08(0x163)][_0x347d08(0x16d)](_0x347d08(0x196)+_0x266f2f+_0x347d08(0x195),{'body':_0x27e9c7}))[_0x347d08(0x182)]['reply'];return{..._0x21ddcb,'id':_0x21bc22[_0x347d08(0x18f)],'dT':c[_0x347d08(0x192)](+_0x21bc22['createTimestamp'])[_0x347d08(0x140)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x21bc22[_0x347d08(0x1a6)]};}else{const _0x3a041c={'memberId':_0x3cbc53,'unitId':_0x266f2f,'content':_0x55eb8a,'mention':_0x28e955},_0xb15289=await this[_0x347d08(0x163)]['post'](_0x347d08(0x196)+_0x266f2f+_0x347d08(0x1af),{'body':_0x3a041c});return Y(_0xb15289['body'][_0x347d08(0x15b)],_0x21ddcb);}}async[_0x66c89(0x190)](_0x331e65){const _0x45b7eb=_0x66c89;var _0x4c9093,_0x133991;const {text:_0x35b493,unitId:_0x58e3ed}=_0x331e65,_0x3cf8c4=(_0x133991=(_0x4c9093=_0x35b493['customRanges'])==null?void 0x0:_0x4c9093[_0x45b7eb(0x161)](_0x555315=>_0x555315[_0x45b7eb(0x149)]===c[_0x45b7eb(0x18a)][_0x45b7eb(0x199)])[_0x45b7eb(0x155)](_0x2dd4b7=>_0x2dd4b7[_0x45b7eb(0x165)]))!=null?_0x133991:[],_0x256d64=JSON[_0x45b7eb(0x17a)](_0x35b493),_0x44e90b=_0x331e65['threadId'],_0x51f8ed=_0x331e65['id'],_0x52e24f={'memberId':(await this[_0x45b7eb(0x15a)][_0x45b7eb(0x157)](_0x58e3ed))['getMemberID'](),'unitId':_0x58e3ed,'threadId':_0x44e90b,'mention':_0x3cf8c4,'content':_0x256d64,'replyId':_0x51f8ed},_0x275d7f=await this[_0x45b7eb(0x163)]['post'](_0x45b7eb(0x196)+_0x58e3ed+_0x45b7eb(0x1a9),{'body':_0x52e24f});return!_0x275d7f[_0x45b7eb(0x182)][_0x45b7eb(0x19c)]||_0x275d7f['body'][_0x45b7eb(0x19c)][_0x45b7eb(0x1ad)]===0x1;}async['resolveComment'](_0x59e1ae){const _0x2c59bc=_0x66c89,{unitId:_0x28da7e}=_0x59e1ae,_0x263c5a=_0x59e1ae[_0x2c59bc(0x158)],_0x464778={'memberId':this[_0x2c59bc(0x16a)][_0x2c59bc(0x151)]()[_0x2c59bc(0x143)],'unitId':_0x28da7e,'threadId':_0x263c5a,'solved':_0x59e1ae[_0x2c59bc(0x150)]?I['Solved']:I[_0x2c59bc(0x154)]},_0xf9cbc9=await this['_httpService'][_0x2c59bc(0x16d)](_0x2c59bc(0x196)+_0x28da7e+_0x2c59bc(0x14f),{'body':_0x464778});return!_0xf9cbc9['body'][_0x2c59bc(0x19c)]||_0xf9cbc9[_0x2c59bc(0x182)][_0x2c59bc(0x19c)]['code']===0x1;}async['deleteComment'](_0x266256,_0x492be9,_0x534a29,_0x23d433){const _0x3406a3=_0x66c89,_0x332b58={'memberId':(await this[_0x3406a3(0x15a)]['requireSession'](_0x266256))['getMemberID'](),'threadId':_0x534a29,'replyId':_0x23d433,'unitId':_0x266256},_0x1dabbe=await this[_0x3406a3(0x163)]['post'](_0x3406a3(0x196)+_0x266256+_0x3406a3(0x1ac),{'body':_0x332b58});return!_0x1dabbe['body'][_0x3406a3(0x19c)]||_0x1dabbe[_0x3406a3(0x182)]['error'][_0x3406a3(0x1ad)]===0x1;}async[_0x66c89(0x16f)](_0x50a417,_0x40293e,_0xdcf7ea){const _0x2d3333=_0x66c89,_0x23a60f={'unitId':_0x50a417,'threadId':_0xdcf7ea},_0x3289fc=await this[_0x2d3333(0x163)][_0x2d3333(0x16d)](_0x2d3333(0x196)+_0x50a417+_0x2d3333(0x1a3),{'body':_0x23a60f}),_0x45b75b=_0xdcf7ea[_0x2d3333(0x155)](_0x30a7e5=>G(_0x3289fc[_0x2d3333(0x182)][_0x2d3333(0x17e)][_0x30a7e5],_0x50a417,_0x40293e))[_0x2d3333(0x161)](Boolean);return Object['values'](_0x3289fc['body'][_0x2d3333(0x1a4)])['forEach'](_0x533de6=>{const _0x2edd69=_0x2d3333;this['_userService'][_0x2edd69(0x1aa)](_0x533de6);}),_0x45b75b;}['saveCommentToSnapshot'](_0x1a2f6f){const _0x17ce33=_0x66c89;return{'id':_0x1a2f6f['id'],'threadId':_0x1a2f6f[_0x17ce33(0x158)],'ref':_0x1a2f6f[_0x17ce33(0x183)]};}};function _0x347c(_0x4c3421,_0x487e26){_0x4c3421=_0x4c3421-0x13e;const _0x385e62=_0x385e();let _0x347c5a=_0x385e62[_0x4c3421];return _0x347c5a;}p=x([C(0x0,c[_0x66c89(0x160)](P[_0x66c89(0x1a7)])),C(0x1,c[_0x66c89(0x160)](c[_0x66c89(0x159)])),C(0x2,c[_0x66c89(0x160)](b[_0x66c89(0x16e)]))],p);var H=Object[_0x66c89(0x15c)],J=(_0x11fae8,_0x16669e,_0x166aa3,_0x1ecc2d)=>{const _0x5e1847=_0x66c89;for(var _0x30e3d5=_0x1ecc2d>0x1?void 0x0:_0x1ecc2d?H(_0x16669e,_0x166aa3):_0x16669e,_0x134a43=_0x11fae8[_0x5e1847(0x19f)]-0x1,_0x35908c;_0x134a43>=0x0;_0x134a43--)(_0x35908c=_0x11fae8[_0x134a43])&&(_0x30e3d5=_0x35908c(_0x30e3d5)||_0x30e3d5);return _0x30e3d5;},y=(_0x22a6d5,_0x415db5)=>(_0xdfe1ff,_0x358666)=>_0x415db5(_0xdfe1ff,_0x358666,_0x22a6d5);let g=class extends c['Disposable']{constructor(_0x2db658,_0x1e6a7f){const _0x2f7f50=_0x66c89;super(),this[_0x2f7f50(0x156)]=_0x2db658,this[_0x2f7f50(0x13e)]=_0x1e6a7f,this[_0x2f7f50(0x176)]();}[_0x66c89(0x176)](){const _0x19deed=_0x66c89;this[_0x19deed(0x156)]['dataSource']=this[_0x19deed(0x13e)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x66c89(0x1ab)]),y(0x1,c[_0x66c89(0x160)](p))],g);var F=Object['defineProperty'],L=Object[_0x66c89(0x15c)],Z=(_0x2d79ac,_0xa60871,_0x39354b)=>_0xa60871 in _0x2d79ac?F(_0x2d79ac,_0xa60871,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39354b}):_0x2d79ac[_0xa60871]=_0x39354b,W=(_0x26d8ce,_0x690552,_0x1f8718,_0x4cb116)=>{for(var _0x1e94d3=_0x4cb116>0x1?void 0x0:_0x4cb116?L(_0x690552,_0x1f8718):_0x690552,_0x3236a7=_0x26d8ce['length']-0x1,_0x57fc3d;_0x3236a7>=0x0;_0x3236a7--)(_0x57fc3d=_0x26d8ce[_0x3236a7])&&(_0x1e94d3=_0x57fc3d(_0x1e94d3)||_0x1e94d3);return _0x1e94d3;},O=(_0x8fa8f8,_0x34bc57)=>(_0x2d6967,_0x33f383)=>_0x34bc57(_0x2d6967,_0x33f383,_0x8fa8f8),N=(_0x5ed8b4,_0x4674e8,_0x51ff46)=>Z(_0x5ed8b4,typeof _0x4674e8!='symbol'?_0x4674e8+'':_0x4674e8,_0x51ff46);function _0x385e(){const _0x9b1b61=['66fgABtk','623586WSjJAa','rangeType','addComment','solved','Reply','createTimestamp','pluginName','/solved','resolved','getCurrentUser','UniverThreadCommentDataSourcePlugin','pipe','OpenOrReOpen','map','_threadCommentDataSourceService','requireSession','threadId','UserManagerService','_sessionService','comment','getOwnPropertyDescriptor','slice','_injector','merge','Inject','filter','2884206PXAZqn','_httpService','IConfigService','rangeId','Add','get','user','/universer-api/user/list','_userService','UNRECOGNIZED','add','post','CollaborationSessionService','listComments','setConfig','commentUpdate$','_init','2285208TkZTXc','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','2497AewRLl','getUnit','payload','stringify','Injector','5098068GNojxR','UNIVER_UNKNOWN','comments','CommentService','defineProperty','size','body','ref','_commentService','resolveComment','parentId','UniverThreadCommentUIPlugin','UniverCollaborationClientPlugin','type','CustomRangeType','unitId','Solved','_config','2cFVarD','replyId','updateComment','Plugin','dayjs','164210fbJfgM','onReady','/reply','/universer-api/comment/unit/','onStarting','forEach','COMMENT','_initUserSync','toStringTag','error','find','Solve','length','22844Scxfcz','25YeWwHb','Edit','/list','users','_threadCommentModel','userId','HTTPService','442477XxcWpa','/edit','addUser','IThreadCommentDataSourceService','/delete','code','getUser','/add','subscribe','Delete','_threadCommentDataSource','UniverInstanceType','format','parse','disposeWithMe','userID','content','_configService','getComment'];_0x385e=function(){return _0x9b1b61;};return _0x385e();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x66c89(0x191)]{constructor(_0x14009f=D,_0xcb3ec7,_0x1e018e){const _0x56b589=_0x66c89;super(),this['_config']=_0x14009f,this['_injector']=_0xcb3ec7,this[_0x56b589(0x145)]=_0x1e018e;const {..._0x16093e}=c[_0x56b589(0x15f)]({},D,this[_0x56b589(0x18d)]);this[_0x56b589(0x145)][_0x56b589(0x170)](q,_0x16093e);}[_0x66c89(0x197)](){const _0x45a84b=_0x66c89;[[p],[g],[_]][_0x45a84b(0x198)](_0x284075=>{const _0x199f97=_0x45a84b;this[_0x199f97(0x15e)]['add'](_0x284075);});}[_0x66c89(0x194)](){const _0x563bfa=_0x66c89;this[_0x563bfa(0x15e)]['get'](g),this[_0x563bfa(0x15e)]['get'](_);}},N(exports[_0x66c89(0x152)],_0x66c89(0x14e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x66c89(0x189),c[_0x66c89(0x13f)][_0x66c89(0x17d)]),exports[_0x66c89(0x152)]=W([c['DependentOn'](w[_0x66c89(0x187)],b[_0x66c89(0x188)],T['UniverLicensePlugin']),O(0x1,c[_0x66c89(0x160)](c[_0x66c89(0x17b)])),O(0x2,c[_0x66c89(0x164)])],exports[_0x66c89(0x152)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5b6015=_0x5345;(function(_0x10be98,_0x1a3475){const _0x2b2dad=_0x5345,_0x16b182=_0x10be98();while(!![]){try{const _0x3787e3=parseInt(_0x2b2dad(0x7d))/0x1+parseInt(_0x2b2dad(0xad))/0x2*(-parseInt(_0x2b2dad(0x99))/0x3)+parseInt(_0x2b2dad(0xd4))/0x4*(-parseInt(_0x2b2dad(0xce))/0x5)+-parseInt(_0x2b2dad(0x8f))/0x6+parseInt(_0x2b2dad(0xdf))/0x7+-parseInt(_0x2b2dad(0x96))/0x8+-parseInt(_0x2b2dad(0xd8))/0x9*(-parseInt(_0x2b2dad(0xb8))/0xa);if(_0x3787e3===_0x1a3475)break;else _0x16b182['push'](_0x16b182['shift']());}catch(_0x4bfa2d){_0x16b182['push'](_0x16b182['shift']());}}}(_0x5a9e,0xce6df));import{CommentService as _0xca352f,CollaborationSessionService as _0x29ee25,UniverCollaborationClientPlugin as _0x177961}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c7c0c}from'@univerjs-pro/license';function _0x5345(_0x74099f,_0x425bf1){_0x74099f=_0x74099f-0x7d;const _0x5a9ef1=_0x5a9e();let _0x53452f=_0x5a9ef1[_0x74099f];return _0x53452f;}import{dayjs as _0x26f78f,UserManagerService as _0x12114f,Inject as _0x4b0cba,Injector as _0x4d5ddb,Disposable as _0x3b3f77,CustomRangeType as _0x4307c4,UniverInstanceType as _0x2ab80c,DependentOn as _0x199c17,IConfigService as _0x1283d7,Plugin as _0xcfd23c,merge as _0x5c4574}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38adf0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24071b,IThreadCommentDataSourceService as _0x33a4e7}from'@univerjs/thread-comment';function _0x5a9e(){const _0x26f432=['userId','_userService','Unknown','rangeType','5541090fCpPPt','/add','map','length','_config','commentUpdate$','4EIRzRC','rangeId','getOwnPropertyDescriptor','_initDataSource','9leerRd','customRanges','UNIVER_UNKNOWN','onReady','body','replyId','size','4094300VFjLVJ','/universer-api/comment/unit/','payload','500994CttkVm','Delete','OpenOrReOpen','users','_injector','/list','addComment','Solved','comments','resolveComment','getMemberID','replies','error','onStarting','resolved','defineProperty','COMMENT','updateComment','6361170kfwXoA','_sessionService','root','code','parentId','forEach','thread-comment-data-source.config','11350536RhjeHf','pipe','getCurrentUser','17691YtEilz','_commentService','symbol','user','parse','subscribe','_httpService','_configService','type','requireSession','stringify','/universer-api/user/list','solved','Edit','_init','_threadCommentModel','reply','deleteComment','Add','YYYY/MM/DD\x20HH:mm','382IWZQvC','getComment','_initUserSync','userID','post','format','syncUpdateMutationToColla','filter','find','addUser','unitId','44731980fqxCbN','UNRECOGNIZED','getUser','dataSource','get','/edit','/solved','setConfig','threadId','createTimestamp','Solve','add','values','_threadCommentDataSourceService','Reply','_threadCommentDataSource','content','listComments'];_0x5a9e=function(){return _0x26f432;};return _0x5a9e();}import{bufferTime as _0x10fefe}from'rxjs';import{HTTPService as _0x5d2f8c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d1bd2=>(_0x1d1bd2[_0x1d1bd2['OpenOrReOpen']=0x0]=_0x5b6015(0x7f),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0x84)]=0x1]=_0x5b6015(0x84),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0xb9)]=-0x1]=_0x5b6015(0xb9),_0x1d1bd2))(I||{}),v=(_0x8491ac=>(_0x8491ac[_0x8491ac['Unknown']=0x0]=_0x5b6015(0xcc),_0x8491ac[_0x8491ac[_0x5b6015(0xab)]=0x1]=_0x5b6015(0xab),_0x8491ac[_0x8491ac[_0x5b6015(0xc6)]=0x2]='Reply',_0x8491ac[_0x8491ac[_0x5b6015(0xa6)]=0x3]='Edit',_0x8491ac[_0x8491ac[_0x5b6015(0x7e)]=0x4]=_0x5b6015(0x7e),_0x8491ac[_0x8491ac[_0x5b6015(0xc2)]=0x5]=_0x5b6015(0xc2),_0x8491ac[_0x8491ac['UNRECOGNIZED']=-0x1]=_0x5b6015(0xb9),_0x8491ac))(v||{});const y=_0x2a6126=>_0x26f78f(new Date(+_0x2a6126))[_0x5b6015(0xb2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xf88bd,_0x126f9e)=>{const _0x5139bf=_0x5b6015,_0xe0419a=_0xf88bd['get'](_0x12114f),_0x329189=_0xf88bd[_0x5139bf(0xbc)](_0x5d2f8c);_0x126f9e[_0x5139bf(0x94)](_0x58c1e4=>{const _0x1d5339=_0x5139bf;_0xe0419a[_0x1d5339(0xba)](_0x58c1e4)&&_0x126f9e['delete'](_0x58c1e4);}),_0x126f9e[_0x5139bf(0xde)]&&(await _0x329189[_0x5139bf(0xbc)](_0x5139bf(0xa4),{'params':{'userIDs':[..._0x126f9e]}}))[_0x5139bf(0xdc)][_0x5139bf(0x80)][_0x5139bf(0x94)](_0x4f1556=>{const _0x162388=_0x5139bf;_0x4f1556&&_0xe0419a[_0x162388(0xb6)](_0x4f1556);});};var K=Object[_0x5b6015(0xd6)],V=(_0x5385d3,_0x198600,_0x656f50,_0x1dfa78)=>{for(var _0x2a8b14=_0x1dfa78>0x1?void 0x0:_0x1dfa78?K(_0x198600,_0x656f50):_0x198600,_0x1afcd6=_0x5385d3['length']-0x1,_0x212105;_0x1afcd6>=0x0;_0x1afcd6--)(_0x212105=_0x5385d3[_0x1afcd6])&&(_0x2a8b14=_0x212105(_0x2a8b14)||_0x2a8b14);return _0x2a8b14;},p=(_0x47a432,_0x47f724)=>(_0x1da5be,_0x29416c)=>_0x47f724(_0x1da5be,_0x29416c,_0x47a432);let _=class extends _0x3b3f77{constructor(_0x41e645,_0x3a0375,_0x3728ac,_0x3b04a7){const _0xce39cf=_0x5b6015;super(),this[_0xce39cf(0x9a)]=_0x41e645,this[_0xce39cf(0xa8)]=_0x3a0375,this[_0xce39cf(0xcb)]=_0x3728ac,this[_0xce39cf(0x81)]=_0x3b04a7,this['_init'](),this[_0xce39cf(0xaf)]();}[_0x5b6015(0xaf)](){const _0x5754b4=_0x5b6015;this['disposeWithMe'](this['_threadCommentModel'][_0x5754b4(0xd3)][_0x5754b4(0x97)](_0x10fefe(0x10))[_0x5754b4(0x9e)](_0x3ccadf=>{const _0x592f96=new Set();_0x3ccadf['forEach'](_0x5777ea=>{const _0x422de5=_0x5345;switch(_0x5777ea[_0x422de5(0xa1)]){case _0x422de5(0xc3):{const _0x401d7a=_0x5777ea[_0x422de5(0xe1)]['personId'];_0x592f96[_0x422de5(0xc3)](_0x401d7a);break;}}}),B(this['_injector'],_0x592f96);}));}[_0x5b6015(0xa7)](){const _0x4a35f6=_0x5b6015;this['disposeWithMe'](this[_0x4a35f6(0x9a)][_0x4a35f6(0xd3)][_0x4a35f6(0x9e)](async _0x2805fb=>{const _0x57a484=_0x4a35f6;var _0x2ac65b,_0x1f502d,_0x5a7f39,_0x326f3e;const _0x20859d=(_0x2ac65b=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])['find'](_0x3a3fcc=>_0x3a3fcc['threadId']===_0x2805fb[_0x57a484(0xc0)]))==null?void 0x0:_0x2ac65b[_0x57a484(0x91)];if(!_0x20859d)return;const {unitId:_0x502519,subUnitId:_0x4814e6}=_0x20859d;switch(_0x2805fb[_0x57a484(0x9c)]&&this['_userService']['addUser'](_0x2805fb['user']),_0x2805fb[_0x57a484(0xa1)]){case v[_0x57a484(0xab)]:break;case v['Reply']:{this[_0x57a484(0xa8)]['addComment'](_0x502519,_0x4814e6,{'unitId':_0x502519,'subUnitId':_0x4814e6,'ref':'','id':_0x2805fb[_0x57a484(0xdd)],'dT':y(+_0x2805fb[_0x57a484(0xc1)]),'threadId':_0x2805fb[_0x57a484(0xc0)],'personId':(_0x5a7f39=(_0x1f502d=_0x2805fb[_0x57a484(0x9c)])==null?void 0x0:_0x1f502d[_0x57a484(0xb0)])!=null?_0x5a7f39:_0x2805fb[_0x57a484(0xca)],'text':JSON['parse'](_0x2805fb[_0x57a484(0xc8)]),'parentId':_0x20859d['id']});break;}case v[_0x57a484(0x7e)]:{const _0x13ff35=this['_threadCommentModel'][_0x57a484(0xae)](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);_0x13ff35&&_0x13ff35[_0x57a484(0x93)]&&this[_0x57a484(0xa8)]['deleteComment'](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);break;}case v[_0x57a484(0xa6)]:{this['_threadCommentModel'][_0x57a484(0x8e)](_0x502519,_0x4814e6,{'commentId':_0x2805fb[_0x57a484(0xdd)],'text':JSON[_0x57a484(0x9d)](_0x2805fb['content'])});break;}case v[_0x57a484(0xc2)]:{const _0x88b066=(_0x326f3e=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])[_0x57a484(0xb5)](_0x6a6c52=>_0x6a6c52[_0x57a484(0xc0)]===_0x2805fb['threadId']))==null?void 0x0:_0x326f3e[_0x57a484(0x91)];_0x88b066&&this[_0x57a484(0xa8)]['resolveComment'](_0x502519,_0x4814e6,_0x88b066['id'],_0x2805fb[_0x57a484(0xa5)]===I[_0x57a484(0x84)]);break;}}}));}};_=V([p(0x0,_0x4b0cba(_0xca352f)),p(0x1,_0x4b0cba(_0x24071b)),p(0x2,_0x4b0cba(_0x12114f)),p(0x3,_0x4b0cba(_0x4d5ddb))],_);const z=_0x5b6015(0x95),O={};var k=Object[_0x5b6015(0xd6)],Q=(_0x579178,_0x45a366,_0x54e729,_0x442a64)=>{const _0x340b42=_0x5b6015;for(var _0x32938c=_0x442a64>0x1?void 0x0:_0x442a64?k(_0x45a366,_0x54e729):_0x45a366,_0x39ef0e=_0x579178[_0x340b42(0xd1)]-0x1,_0x31a940;_0x39ef0e>=0x0;_0x39ef0e--)(_0x31a940=_0x579178[_0x39ef0e])&&(_0x32938c=_0x31a940(_0x32938c)||_0x32938c);return _0x32938c;},b=(_0x251e75,_0x2bc54c)=>(_0x4b2abb,_0x45fc6f)=>_0x2bc54c(_0x4b2abb,_0x45fc6f,_0x251e75);function X(_0x163785,_0x79566d){const _0x502e60=_0x5b6015,_0x2580ec=_0x163785['replies'][0x0];return{..._0x79566d,'id':_0x2580ec[_0x502e60(0xdd)],'resolved':_0x163785[_0x502e60(0xa5)]===0x1,'dT':y(_0x2580ec[_0x502e60(0xc1)]),'personId':_0x2580ec[_0x502e60(0xca)],'threadId':_0x2580ec['threadId']};}function ee(_0x46ff52,_0x582897,_0x2a1027){const _0x5d77c1=_0x5b6015;var _0x208e1,_0x5e6007;if(((_0x5e6007=(_0x208e1=_0x46ff52==null?void 0x0:_0x46ff52[_0x5d77c1(0x88)])==null?void 0x0:_0x208e1['length'])!=null?_0x5e6007:0x0)>0x0){const _0x67fccd=(_0x4021e4,_0x5d2eca)=>({'id':_0x4021e4[_0x5d77c1(0xdd)],'threadId':_0x4021e4['threadId'],'dT':y(_0x4021e4[_0x5d77c1(0xc1)]),'personId':_0x4021e4['userId'],'resolved':_0x46ff52[_0x5d77c1(0xa5)]===I[_0x5d77c1(0x84)],'unitId':_0x582897,'subUnitId':_0x2a1027,'text':JSON[_0x5d77c1(0x9d)](_0x4021e4['content']),'parentId':_0x5d2eca}),_0x5d196a=_0x67fccd(_0x46ff52[_0x5d77c1(0x88)][0x0]);return{..._0x5d196a,'children':_0x46ff52['replies']['slice'](0x1)[_0x5d77c1(0xd0)](_0x47c3df=>_0x67fccd(_0x47c3df,_0x5d196a['id']))};}return null;}let S=class{constructor(_0x367a49,_0x106fa5,_0x5c327a){const _0x2696a8=_0x5b6015;this[_0x2696a8(0x9f)]=_0x367a49,this[_0x2696a8(0xcb)]=_0x106fa5,this[_0x2696a8(0x90)]=_0x5c327a;}async[_0x5b6015(0x83)](_0x2b1c62){const _0x50f4f0=_0x5b6015;var _0x4c08a5,_0x3eb1c3;const {parentId:_0x292928,unitId:_0x7c2ffa,text:_0x3ef9f1,threadId:_0x55b16f}=_0x2b1c62,_0x5db5c6=(_0x3eb1c3=(_0x4c08a5=_0x3ef9f1[_0x50f4f0(0xd9)])==null?void 0x0:_0x4c08a5[_0x50f4f0(0xb4)](_0x47f712=>_0x47f712[_0x50f4f0(0xcd)]===_0x4307c4[_0x50f4f0(0x8d)])['map'](_0x466759=>_0x466759[_0x50f4f0(0xd5)]))!=null?_0x3eb1c3:[],_0x4f578c=JSON[_0x50f4f0(0xa3)](_0x3ef9f1),_0x4ef1f2=(await this[_0x50f4f0(0x90)]['requireSession'](_0x7c2ffa))[_0x50f4f0(0x87)]();if(_0x292928){const _0x54f228={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6,'threadId':_0x55b16f},_0x70e0d7=(await this[_0x50f4f0(0x9f)][_0x50f4f0(0xb1)]('/universer-api/comment/unit/'+_0x7c2ffa+'/reply',{'body':_0x54f228}))[_0x50f4f0(0xdc)][_0x50f4f0(0xa9)];return{..._0x2b1c62,'id':_0x70e0d7[_0x50f4f0(0xdd)],'dT':_0x26f78f(+_0x70e0d7[_0x50f4f0(0xc1)])['format'](_0x50f4f0(0xac)),'personId':_0x70e0d7[_0x50f4f0(0xca)]};}else{const _0x219d44={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6},_0x229001=await this[_0x50f4f0(0x9f)]['post'](_0x50f4f0(0xe0)+_0x7c2ffa+_0x50f4f0(0xcf),{'body':_0x219d44});return X(_0x229001[_0x50f4f0(0xdc)]['comment'],_0x2b1c62);}}async[_0x5b6015(0x8e)](_0x53bcd2){const _0x344118=_0x5b6015;var _0x105992,_0x881ca2;const {text:_0x112d80,unitId:_0x59322c}=_0x53bcd2,_0x5947f5=(_0x881ca2=(_0x105992=_0x112d80[_0x344118(0xd9)])==null?void 0x0:_0x105992['filter'](_0xa590ac=>_0xa590ac[_0x344118(0xcd)]===_0x4307c4['COMMENT'])[_0x344118(0xd0)](_0x40ab16=>_0x40ab16[_0x344118(0xd5)]))!=null?_0x881ca2:[],_0x2fc807=JSON['stringify'](_0x112d80),_0x4ad30e=_0x53bcd2['threadId'],_0x16a054=_0x53bcd2['id'],_0x4ab5cf={'memberId':(await this[_0x344118(0x90)][_0x344118(0xa2)](_0x59322c))[_0x344118(0x87)](),'unitId':_0x59322c,'threadId':_0x4ad30e,'mention':_0x5947f5,'content':_0x2fc807,'replyId':_0x16a054},_0x28c765=await this[_0x344118(0x9f)][_0x344118(0xb1)](_0x344118(0xe0)+_0x59322c+_0x344118(0xbd),{'body':_0x4ab5cf});return!_0x28c765[_0x344118(0xdc)][_0x344118(0x89)]||_0x28c765[_0x344118(0xdc)][_0x344118(0x89)][_0x344118(0x92)]===0x1;}async[_0x5b6015(0x86)](_0x51e348){const _0x1ccda8=_0x5b6015,{unitId:_0x5cafea}=_0x51e348,_0x595bdf=_0x51e348[_0x1ccda8(0xc0)],_0x258f26={'memberId':this['_userService'][_0x1ccda8(0x98)]()[_0x1ccda8(0xb0)],'unitId':_0x5cafea,'threadId':_0x595bdf,'solved':_0x51e348[_0x1ccda8(0x8b)]?I[_0x1ccda8(0x84)]:I['OpenOrReOpen']},_0x265a05=await this[_0x1ccda8(0x9f)][_0x1ccda8(0xb1)](_0x1ccda8(0xe0)+_0x5cafea+_0x1ccda8(0xbe),{'body':_0x258f26});return!_0x265a05[_0x1ccda8(0xdc)]['error']||_0x265a05[_0x1ccda8(0xdc)][_0x1ccda8(0x89)][_0x1ccda8(0x92)]===0x1;}async[_0x5b6015(0xaa)](_0x38f219,_0x11bbab,_0x5c5187,_0x51860){const _0x43f33c=_0x5b6015,_0xff06f8={'memberId':(await this[_0x43f33c(0x90)][_0x43f33c(0xa2)](_0x38f219))[_0x43f33c(0x87)](),'threadId':_0x5c5187,'replyId':_0x51860,'unitId':_0x38f219},_0x1b8fe1=await this[_0x43f33c(0x9f)][_0x43f33c(0xb1)]('/universer-api/comment/unit/'+_0x38f219+'/delete',{'body':_0xff06f8});return!_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)]||_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)][_0x43f33c(0x92)]===0x1;}async[_0x5b6015(0xc9)](_0x2226e4,_0x2ff79,_0x409878){const _0x19f346=_0x5b6015,_0x1849de={'unitId':_0x2226e4,'threadId':_0x409878},_0x2f29b8=await this[_0x19f346(0x9f)][_0x19f346(0xb1)]('/universer-api/comment/unit/'+_0x2226e4+_0x19f346(0x82),{'body':_0x1849de}),_0x459bc6=_0x409878['map'](_0x296e7f=>ee(_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x85)][_0x296e7f],_0x2226e4,_0x2ff79))[_0x19f346(0xb4)](Boolean);return Object[_0x19f346(0xc4)](_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x80)])[_0x19f346(0x94)](_0x22b456=>{const _0x3402c6=_0x19f346;this['_userService'][_0x3402c6(0xb6)](_0x22b456);}),_0x459bc6;}['saveCommentToSnapshot'](_0x41a0df){const _0x3820e3=_0x5b6015;return{'id':_0x41a0df['id'],'threadId':_0x41a0df[_0x3820e3(0xc0)],'ref':_0x41a0df['ref']};}};S=Q([b(0x0,_0x4b0cba(_0x5d2f8c)),b(0x1,_0x4b0cba(_0x12114f)),b(0x2,_0x4b0cba(_0x29ee25))],S);var re=Object[_0x5b6015(0xd6)],te=(_0xb695cb,_0x5112ec,_0x39869f,_0x2099f3)=>{const _0xa703a8=_0x5b6015;for(var _0x2616a3=_0x2099f3>0x1?void 0x0:_0x2099f3?re(_0x5112ec,_0x39869f):_0x5112ec,_0x1f04bf=_0xb695cb[_0xa703a8(0xd1)]-0x1,_0x50f075;_0x1f04bf>=0x0;_0x1f04bf--)(_0x50f075=_0xb695cb[_0x1f04bf])&&(_0x2616a3=_0x50f075(_0x2616a3)||_0x2616a3);return _0x2616a3;},M=(_0x43e5b5,_0x50904f)=>(_0x219fb3,_0x4a5c75)=>_0x50904f(_0x219fb3,_0x4a5c75,_0x43e5b5);let f=class extends _0x3b3f77{constructor(_0xf490ac,_0xc6ed98){const _0x7e5e80=_0x5b6015;super(),this[_0x7e5e80(0xc5)]=_0xf490ac,this[_0x7e5e80(0xc7)]=_0xc6ed98,this[_0x7e5e80(0xd7)]();}[_0x5b6015(0xd7)](){const _0x28b28c=_0x5b6015;this['_threadCommentDataSourceService'][_0x28b28c(0xbb)]=this[_0x28b28c(0xc7)],this[_0x28b28c(0xc5)][_0x28b28c(0xb3)]=!0x1;}};f=te([M(0x0,_0x33a4e7),M(0x1,_0x4b0cba(S))],f);var se=Object[_0x5b6015(0x8c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5393ea,_0x481c86,_0x3b993f)=>_0x481c86 in _0x5393ea?se(_0x5393ea,_0x481c86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b993f}):_0x5393ea[_0x481c86]=_0x3b993f,ie=(_0x165abb,_0x970ce0,_0x352c3b,_0x34f17f)=>{const _0x34c5e0=_0x5b6015;for(var _0x1e27b7=_0x34f17f>0x1?void 0x0:_0x34f17f?oe(_0x970ce0,_0x352c3b):_0x970ce0,_0x23861c=_0x165abb[_0x34c5e0(0xd1)]-0x1,_0x3bf9a1;_0x23861c>=0x0;_0x23861c--)(_0x3bf9a1=_0x165abb[_0x23861c])&&(_0x1e27b7=_0x3bf9a1(_0x1e27b7)||_0x1e27b7);return _0x1e27b7;},N=(_0x34e02e,_0x929a64)=>(_0x1a277b,_0x4d57dd)=>_0x929a64(_0x1a277b,_0x4d57dd,_0x34e02e),$=(_0x42bf6c,_0x4e47f1,_0x907bc7)=>ne(_0x42bf6c,typeof _0x4e47f1!=_0x5b6015(0x9b)?_0x4e47f1+'':_0x4e47f1,_0x907bc7);let g=class extends _0xcfd23c{constructor(_0x5da0d0=O,_0x122318,_0x4213f4){const _0x2e46ea=_0x5b6015;super(),this[_0x2e46ea(0xd2)]=_0x5da0d0,this[_0x2e46ea(0x81)]=_0x122318,this[_0x2e46ea(0xa0)]=_0x4213f4;const {..._0xfc2f11}=_0x5c4574({},O,this[_0x2e46ea(0xd2)]);this[_0x2e46ea(0xa0)][_0x2e46ea(0xbf)](z,_0xfc2f11);}[_0x5b6015(0x8a)](){const _0x246acc=_0x5b6015;[[S],[f],[_]][_0x246acc(0x94)](_0x39d325=>{const _0x5e9d4e=_0x246acc;this['_injector'][_0x5e9d4e(0xc3)](_0x39d325);});}[_0x5b6015(0xdb)](){const _0x4c9225=_0x5b6015;this[_0x4c9225(0x81)][_0x4c9225(0xbc)](f),this[_0x4c9225(0x81)][_0x4c9225(0xbc)](_);}};$(g,'pluginName',W),$(g,_0x5b6015(0xa1),_0x2ab80c[_0x5b6015(0xda)]),g=ie([_0x199c17(_0x38adf0,_0x177961,_0x4c7c0c),N(0x1,_0x4b0cba(_0x4d5ddb)),N(0x2,_0x1283d7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5b6015=_0x5345;(function(_0x10be98,_0x1a3475){const _0x2b2dad=_0x5345,_0x16b182=_0x10be98();while(!![]){try{const _0x3787e3=parseInt(_0x2b2dad(0x7d))/0x1+parseInt(_0x2b2dad(0xad))/0x2*(-parseInt(_0x2b2dad(0x99))/0x3)+parseInt(_0x2b2dad(0xd4))/0x4*(-parseInt(_0x2b2dad(0xce))/0x5)+-parseInt(_0x2b2dad(0x8f))/0x6+parseInt(_0x2b2dad(0xdf))/0x7+-parseInt(_0x2b2dad(0x96))/0x8+-parseInt(_0x2b2dad(0xd8))/0x9*(-parseInt(_0x2b2dad(0xb8))/0xa);if(_0x3787e3===_0x1a3475)break;else _0x16b182['push'](_0x16b182['shift']());}catch(_0x4bfa2d){_0x16b182['push'](_0x16b182['shift']());}}}(_0x5a9e,0xce6df));import{CommentService as _0xca352f,CollaborationSessionService as _0x29ee25,UniverCollaborationClientPlugin as _0x177961}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c7c0c}from'@univerjs-pro/license';function _0x5345(_0x74099f,_0x425bf1){_0x74099f=_0x74099f-0x7d;const _0x5a9ef1=_0x5a9e();let _0x53452f=_0x5a9ef1[_0x74099f];return _0x53452f;}import{dayjs as _0x26f78f,UserManagerService as _0x12114f,Inject as _0x4b0cba,Injector as _0x4d5ddb,Disposable as _0x3b3f77,CustomRangeType as _0x4307c4,UniverInstanceType as _0x2ab80c,DependentOn as _0x199c17,IConfigService as _0x1283d7,Plugin as _0xcfd23c,merge as _0x5c4574}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38adf0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24071b,IThreadCommentDataSourceService as _0x33a4e7}from'@univerjs/thread-comment';function _0x5a9e(){const _0x26f432=['userId','_userService','Unknown','rangeType','5541090fCpPPt','/add','map','length','_config','commentUpdate$','4EIRzRC','rangeId','getOwnPropertyDescriptor','_initDataSource','9leerRd','customRanges','UNIVER_UNKNOWN','onReady','body','replyId','size','4094300VFjLVJ','/universer-api/comment/unit/','payload','500994CttkVm','Delete','OpenOrReOpen','users','_injector','/list','addComment','Solved','comments','resolveComment','getMemberID','replies','error','onStarting','resolved','defineProperty','COMMENT','updateComment','6361170kfwXoA','_sessionService','root','code','parentId','forEach','thread-comment-data-source.config','11350536RhjeHf','pipe','getCurrentUser','17691YtEilz','_commentService','symbol','user','parse','subscribe','_httpService','_configService','type','requireSession','stringify','/universer-api/user/list','solved','Edit','_init','_threadCommentModel','reply','deleteComment','Add','YYYY/MM/DD\x20HH:mm','382IWZQvC','getComment','_initUserSync','userID','post','format','syncUpdateMutationToColla','filter','find','addUser','unitId','44731980fqxCbN','UNRECOGNIZED','getUser','dataSource','get','/edit','/solved','setConfig','threadId','createTimestamp','Solve','add','values','_threadCommentDataSourceService','Reply','_threadCommentDataSource','content','listComments'];_0x5a9e=function(){return _0x26f432;};return _0x5a9e();}import{bufferTime as _0x10fefe}from'rxjs';import{HTTPService as _0x5d2f8c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d1bd2=>(_0x1d1bd2[_0x1d1bd2['OpenOrReOpen']=0x0]=_0x5b6015(0x7f),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0x84)]=0x1]=_0x5b6015(0x84),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0xb9)]=-0x1]=_0x5b6015(0xb9),_0x1d1bd2))(I||{}),v=(_0x8491ac=>(_0x8491ac[_0x8491ac['Unknown']=0x0]=_0x5b6015(0xcc),_0x8491ac[_0x8491ac[_0x5b6015(0xab)]=0x1]=_0x5b6015(0xab),_0x8491ac[_0x8491ac[_0x5b6015(0xc6)]=0x2]='Reply',_0x8491ac[_0x8491ac[_0x5b6015(0xa6)]=0x3]='Edit',_0x8491ac[_0x8491ac[_0x5b6015(0x7e)]=0x4]=_0x5b6015(0x7e),_0x8491ac[_0x8491ac[_0x5b6015(0xc2)]=0x5]=_0x5b6015(0xc2),_0x8491ac[_0x8491ac['UNRECOGNIZED']=-0x1]=_0x5b6015(0xb9),_0x8491ac))(v||{});const y=_0x2a6126=>_0x26f78f(new Date(+_0x2a6126))[_0x5b6015(0xb2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xf88bd,_0x126f9e)=>{const _0x5139bf=_0x5b6015,_0xe0419a=_0xf88bd['get'](_0x12114f),_0x329189=_0xf88bd[_0x5139bf(0xbc)](_0x5d2f8c);_0x126f9e[_0x5139bf(0x94)](_0x58c1e4=>{const _0x1d5339=_0x5139bf;_0xe0419a[_0x1d5339(0xba)](_0x58c1e4)&&_0x126f9e['delete'](_0x58c1e4);}),_0x126f9e[_0x5139bf(0xde)]&&(await _0x329189[_0x5139bf(0xbc)](_0x5139bf(0xa4),{'params':{'userIDs':[..._0x126f9e]}}))[_0x5139bf(0xdc)][_0x5139bf(0x80)][_0x5139bf(0x94)](_0x4f1556=>{const _0x162388=_0x5139bf;_0x4f1556&&_0xe0419a[_0x162388(0xb6)](_0x4f1556);});};var K=Object[_0x5b6015(0xd6)],V=(_0x5385d3,_0x198600,_0x656f50,_0x1dfa78)=>{for(var _0x2a8b14=_0x1dfa78>0x1?void 0x0:_0x1dfa78?K(_0x198600,_0x656f50):_0x198600,_0x1afcd6=_0x5385d3['length']-0x1,_0x212105;_0x1afcd6>=0x0;_0x1afcd6--)(_0x212105=_0x5385d3[_0x1afcd6])&&(_0x2a8b14=_0x212105(_0x2a8b14)||_0x2a8b14);return _0x2a8b14;},p=(_0x47a432,_0x47f724)=>(_0x1da5be,_0x29416c)=>_0x47f724(_0x1da5be,_0x29416c,_0x47a432);let _=class extends _0x3b3f77{constructor(_0x41e645,_0x3a0375,_0x3728ac,_0x3b04a7){const _0xce39cf=_0x5b6015;super(),this[_0xce39cf(0x9a)]=_0x41e645,this[_0xce39cf(0xa8)]=_0x3a0375,this[_0xce39cf(0xcb)]=_0x3728ac,this[_0xce39cf(0x81)]=_0x3b04a7,this['_init'](),this[_0xce39cf(0xaf)]();}[_0x5b6015(0xaf)](){const _0x5754b4=_0x5b6015;this['disposeWithMe'](this['_threadCommentModel'][_0x5754b4(0xd3)][_0x5754b4(0x97)](_0x10fefe(0x10))[_0x5754b4(0x9e)](_0x3ccadf=>{const _0x592f96=new Set();_0x3ccadf['forEach'](_0x5777ea=>{const _0x422de5=_0x5345;switch(_0x5777ea[_0x422de5(0xa1)]){case _0x422de5(0xc3):{const _0x401d7a=_0x5777ea[_0x422de5(0xe1)]['personId'];_0x592f96[_0x422de5(0xc3)](_0x401d7a);break;}}}),B(this['_injector'],_0x592f96);}));}[_0x5b6015(0xa7)](){const _0x4a35f6=_0x5b6015;this['disposeWithMe'](this[_0x4a35f6(0x9a)][_0x4a35f6(0xd3)][_0x4a35f6(0x9e)](async _0x2805fb=>{const _0x57a484=_0x4a35f6;var _0x2ac65b,_0x1f502d,_0x5a7f39,_0x326f3e;const _0x20859d=(_0x2ac65b=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])['find'](_0x3a3fcc=>_0x3a3fcc['threadId']===_0x2805fb[_0x57a484(0xc0)]))==null?void 0x0:_0x2ac65b[_0x57a484(0x91)];if(!_0x20859d)return;const {unitId:_0x502519,subUnitId:_0x4814e6}=_0x20859d;switch(_0x2805fb[_0x57a484(0x9c)]&&this['_userService']['addUser'](_0x2805fb['user']),_0x2805fb[_0x57a484(0xa1)]){case v[_0x57a484(0xab)]:break;case v['Reply']:{this[_0x57a484(0xa8)]['addComment'](_0x502519,_0x4814e6,{'unitId':_0x502519,'subUnitId':_0x4814e6,'ref':'','id':_0x2805fb[_0x57a484(0xdd)],'dT':y(+_0x2805fb[_0x57a484(0xc1)]),'threadId':_0x2805fb[_0x57a484(0xc0)],'personId':(_0x5a7f39=(_0x1f502d=_0x2805fb[_0x57a484(0x9c)])==null?void 0x0:_0x1f502d[_0x57a484(0xb0)])!=null?_0x5a7f39:_0x2805fb[_0x57a484(0xca)],'text':JSON['parse'](_0x2805fb[_0x57a484(0xc8)]),'parentId':_0x20859d['id']});break;}case v[_0x57a484(0x7e)]:{const _0x13ff35=this['_threadCommentModel'][_0x57a484(0xae)](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);_0x13ff35&&_0x13ff35[_0x57a484(0x93)]&&this[_0x57a484(0xa8)]['deleteComment'](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);break;}case v[_0x57a484(0xa6)]:{this['_threadCommentModel'][_0x57a484(0x8e)](_0x502519,_0x4814e6,{'commentId':_0x2805fb[_0x57a484(0xdd)],'text':JSON[_0x57a484(0x9d)](_0x2805fb['content'])});break;}case v[_0x57a484(0xc2)]:{const _0x88b066=(_0x326f3e=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])[_0x57a484(0xb5)](_0x6a6c52=>_0x6a6c52[_0x57a484(0xc0)]===_0x2805fb['threadId']))==null?void 0x0:_0x326f3e[_0x57a484(0x91)];_0x88b066&&this[_0x57a484(0xa8)]['resolveComment'](_0x502519,_0x4814e6,_0x88b066['id'],_0x2805fb[_0x57a484(0xa5)]===I[_0x57a484(0x84)]);break;}}}));}};_=V([p(0x0,_0x4b0cba(_0xca352f)),p(0x1,_0x4b0cba(_0x24071b)),p(0x2,_0x4b0cba(_0x12114f)),p(0x3,_0x4b0cba(_0x4d5ddb))],_);const z=_0x5b6015(0x95),O={};var k=Object[_0x5b6015(0xd6)],Q=(_0x579178,_0x45a366,_0x54e729,_0x442a64)=>{const _0x340b42=_0x5b6015;for(var _0x32938c=_0x442a64>0x1?void 0x0:_0x442a64?k(_0x45a366,_0x54e729):_0x45a366,_0x39ef0e=_0x579178[_0x340b42(0xd1)]-0x1,_0x31a940;_0x39ef0e>=0x0;_0x39ef0e--)(_0x31a940=_0x579178[_0x39ef0e])&&(_0x32938c=_0x31a940(_0x32938c)||_0x32938c);return _0x32938c;},b=(_0x251e75,_0x2bc54c)=>(_0x4b2abb,_0x45fc6f)=>_0x2bc54c(_0x4b2abb,_0x45fc6f,_0x251e75);function X(_0x163785,_0x79566d){const _0x502e60=_0x5b6015,_0x2580ec=_0x163785['replies'][0x0];return{..._0x79566d,'id':_0x2580ec[_0x502e60(0xdd)],'resolved':_0x163785[_0x502e60(0xa5)]===0x1,'dT':y(_0x2580ec[_0x502e60(0xc1)]),'personId':_0x2580ec[_0x502e60(0xca)],'threadId':_0x2580ec['threadId']};}function ee(_0x46ff52,_0x582897,_0x2a1027){const _0x5d77c1=_0x5b6015;var _0x208e1,_0x5e6007;if(((_0x5e6007=(_0x208e1=_0x46ff52==null?void 0x0:_0x46ff52[_0x5d77c1(0x88)])==null?void 0x0:_0x208e1['length'])!=null?_0x5e6007:0x0)>0x0){const _0x67fccd=(_0x4021e4,_0x5d2eca)=>({'id':_0x4021e4[_0x5d77c1(0xdd)],'threadId':_0x4021e4['threadId'],'dT':y(_0x4021e4[_0x5d77c1(0xc1)]),'personId':_0x4021e4['userId'],'resolved':_0x46ff52[_0x5d77c1(0xa5)]===I[_0x5d77c1(0x84)],'unitId':_0x582897,'subUnitId':_0x2a1027,'text':JSON[_0x5d77c1(0x9d)](_0x4021e4['content']),'parentId':_0x5d2eca}),_0x5d196a=_0x67fccd(_0x46ff52[_0x5d77c1(0x88)][0x0]);return{..._0x5d196a,'children':_0x46ff52['replies']['slice'](0x1)[_0x5d77c1(0xd0)](_0x47c3df=>_0x67fccd(_0x47c3df,_0x5d196a['id']))};}return null;}let S=class{constructor(_0x367a49,_0x106fa5,_0x5c327a){const _0x2696a8=_0x5b6015;this[_0x2696a8(0x9f)]=_0x367a49,this[_0x2696a8(0xcb)]=_0x106fa5,this[_0x2696a8(0x90)]=_0x5c327a;}async[_0x5b6015(0x83)](_0x2b1c62){const _0x50f4f0=_0x5b6015;var _0x4c08a5,_0x3eb1c3;const {parentId:_0x292928,unitId:_0x7c2ffa,text:_0x3ef9f1,threadId:_0x55b16f}=_0x2b1c62,_0x5db5c6=(_0x3eb1c3=(_0x4c08a5=_0x3ef9f1[_0x50f4f0(0xd9)])==null?void 0x0:_0x4c08a5[_0x50f4f0(0xb4)](_0x47f712=>_0x47f712[_0x50f4f0(0xcd)]===_0x4307c4[_0x50f4f0(0x8d)])['map'](_0x466759=>_0x466759[_0x50f4f0(0xd5)]))!=null?_0x3eb1c3:[],_0x4f578c=JSON[_0x50f4f0(0xa3)](_0x3ef9f1),_0x4ef1f2=(await this[_0x50f4f0(0x90)]['requireSession'](_0x7c2ffa))[_0x50f4f0(0x87)]();if(_0x292928){const _0x54f228={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6,'threadId':_0x55b16f},_0x70e0d7=(await this[_0x50f4f0(0x9f)][_0x50f4f0(0xb1)]('/universer-api/comment/unit/'+_0x7c2ffa+'/reply',{'body':_0x54f228}))[_0x50f4f0(0xdc)][_0x50f4f0(0xa9)];return{..._0x2b1c62,'id':_0x70e0d7[_0x50f4f0(0xdd)],'dT':_0x26f78f(+_0x70e0d7[_0x50f4f0(0xc1)])['format'](_0x50f4f0(0xac)),'personId':_0x70e0d7[_0x50f4f0(0xca)]};}else{const _0x219d44={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6},_0x229001=await this[_0x50f4f0(0x9f)]['post'](_0x50f4f0(0xe0)+_0x7c2ffa+_0x50f4f0(0xcf),{'body':_0x219d44});return X(_0x229001[_0x50f4f0(0xdc)]['comment'],_0x2b1c62);}}async[_0x5b6015(0x8e)](_0x53bcd2){const _0x344118=_0x5b6015;var _0x105992,_0x881ca2;const {text:_0x112d80,unitId:_0x59322c}=_0x53bcd2,_0x5947f5=(_0x881ca2=(_0x105992=_0x112d80[_0x344118(0xd9)])==null?void 0x0:_0x105992['filter'](_0xa590ac=>_0xa590ac[_0x344118(0xcd)]===_0x4307c4['COMMENT'])[_0x344118(0xd0)](_0x40ab16=>_0x40ab16[_0x344118(0xd5)]))!=null?_0x881ca2:[],_0x2fc807=JSON['stringify'](_0x112d80),_0x4ad30e=_0x53bcd2['threadId'],_0x16a054=_0x53bcd2['id'],_0x4ab5cf={'memberId':(await this[_0x344118(0x90)][_0x344118(0xa2)](_0x59322c))[_0x344118(0x87)](),'unitId':_0x59322c,'threadId':_0x4ad30e,'mention':_0x5947f5,'content':_0x2fc807,'replyId':_0x16a054},_0x28c765=await this[_0x344118(0x9f)][_0x344118(0xb1)](_0x344118(0xe0)+_0x59322c+_0x344118(0xbd),{'body':_0x4ab5cf});return!_0x28c765[_0x344118(0xdc)][_0x344118(0x89)]||_0x28c765[_0x344118(0xdc)][_0x344118(0x89)][_0x344118(0x92)]===0x1;}async[_0x5b6015(0x86)](_0x51e348){const _0x1ccda8=_0x5b6015,{unitId:_0x5cafea}=_0x51e348,_0x595bdf=_0x51e348[_0x1ccda8(0xc0)],_0x258f26={'memberId':this['_userService'][_0x1ccda8(0x98)]()[_0x1ccda8(0xb0)],'unitId':_0x5cafea,'threadId':_0x595bdf,'solved':_0x51e348[_0x1ccda8(0x8b)]?I[_0x1ccda8(0x84)]:I['OpenOrReOpen']},_0x265a05=await this[_0x1ccda8(0x9f)][_0x1ccda8(0xb1)](_0x1ccda8(0xe0)+_0x5cafea+_0x1ccda8(0xbe),{'body':_0x258f26});return!_0x265a05[_0x1ccda8(0xdc)]['error']||_0x265a05[_0x1ccda8(0xdc)][_0x1ccda8(0x89)][_0x1ccda8(0x92)]===0x1;}async[_0x5b6015(0xaa)](_0x38f219,_0x11bbab,_0x5c5187,_0x51860){const _0x43f33c=_0x5b6015,_0xff06f8={'memberId':(await this[_0x43f33c(0x90)][_0x43f33c(0xa2)](_0x38f219))[_0x43f33c(0x87)](),'threadId':_0x5c5187,'replyId':_0x51860,'unitId':_0x38f219},_0x1b8fe1=await this[_0x43f33c(0x9f)][_0x43f33c(0xb1)]('/universer-api/comment/unit/'+_0x38f219+'/delete',{'body':_0xff06f8});return!_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)]||_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)][_0x43f33c(0x92)]===0x1;}async[_0x5b6015(0xc9)](_0x2226e4,_0x2ff79,_0x409878){const _0x19f346=_0x5b6015,_0x1849de={'unitId':_0x2226e4,'threadId':_0x409878},_0x2f29b8=await this[_0x19f346(0x9f)][_0x19f346(0xb1)]('/universer-api/comment/unit/'+_0x2226e4+_0x19f346(0x82),{'body':_0x1849de}),_0x459bc6=_0x409878['map'](_0x296e7f=>ee(_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x85)][_0x296e7f],_0x2226e4,_0x2ff79))[_0x19f346(0xb4)](Boolean);return Object[_0x19f346(0xc4)](_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x80)])[_0x19f346(0x94)](_0x22b456=>{const _0x3402c6=_0x19f346;this['_userService'][_0x3402c6(0xb6)](_0x22b456);}),_0x459bc6;}['saveCommentToSnapshot'](_0x41a0df){const _0x3820e3=_0x5b6015;return{'id':_0x41a0df['id'],'threadId':_0x41a0df[_0x3820e3(0xc0)],'ref':_0x41a0df['ref']};}};S=Q([b(0x0,_0x4b0cba(_0x5d2f8c)),b(0x1,_0x4b0cba(_0x12114f)),b(0x2,_0x4b0cba(_0x29ee25))],S);var re=Object[_0x5b6015(0xd6)],te=(_0xb695cb,_0x5112ec,_0x39869f,_0x2099f3)=>{const _0xa703a8=_0x5b6015;for(var _0x2616a3=_0x2099f3>0x1?void 0x0:_0x2099f3?re(_0x5112ec,_0x39869f):_0x5112ec,_0x1f04bf=_0xb695cb[_0xa703a8(0xd1)]-0x1,_0x50f075;_0x1f04bf>=0x0;_0x1f04bf--)(_0x50f075=_0xb695cb[_0x1f04bf])&&(_0x2616a3=_0x50f075(_0x2616a3)||_0x2616a3);return _0x2616a3;},M=(_0x43e5b5,_0x50904f)=>(_0x219fb3,_0x4a5c75)=>_0x50904f(_0x219fb3,_0x4a5c75,_0x43e5b5);let f=class extends _0x3b3f77{constructor(_0xf490ac,_0xc6ed98){const _0x7e5e80=_0x5b6015;super(),this[_0x7e5e80(0xc5)]=_0xf490ac,this[_0x7e5e80(0xc7)]=_0xc6ed98,this[_0x7e5e80(0xd7)]();}[_0x5b6015(0xd7)](){const _0x28b28c=_0x5b6015;this['_threadCommentDataSourceService'][_0x28b28c(0xbb)]=this[_0x28b28c(0xc7)],this[_0x28b28c(0xc5)][_0x28b28c(0xb3)]=!0x1;}};f=te([M(0x0,_0x33a4e7),M(0x1,_0x4b0cba(S))],f);var se=Object[_0x5b6015(0x8c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5393ea,_0x481c86,_0x3b993f)=>_0x481c86 in _0x5393ea?se(_0x5393ea,_0x481c86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b993f}):_0x5393ea[_0x481c86]=_0x3b993f,ie=(_0x165abb,_0x970ce0,_0x352c3b,_0x34f17f)=>{const _0x34c5e0=_0x5b6015;for(var _0x1e27b7=_0x34f17f>0x1?void 0x0:_0x34f17f?oe(_0x970ce0,_0x352c3b):_0x970ce0,_0x23861c=_0x165abb[_0x34c5e0(0xd1)]-0x1,_0x3bf9a1;_0x23861c>=0x0;_0x23861c--)(_0x3bf9a1=_0x165abb[_0x23861c])&&(_0x1e27b7=_0x3bf9a1(_0x1e27b7)||_0x1e27b7);return _0x1e27b7;},N=(_0x34e02e,_0x929a64)=>(_0x1a277b,_0x4d57dd)=>_0x929a64(_0x1a277b,_0x4d57dd,_0x34e02e),$=(_0x42bf6c,_0x4e47f1,_0x907bc7)=>ne(_0x42bf6c,typeof _0x4e47f1!=_0x5b6015(0x9b)?_0x4e47f1+'':_0x4e47f1,_0x907bc7);let g=class extends _0xcfd23c{constructor(_0x5da0d0=O,_0x122318,_0x4213f4){const _0x2e46ea=_0x5b6015;super(),this[_0x2e46ea(0xd2)]=_0x5da0d0,this[_0x2e46ea(0x81)]=_0x122318,this[_0x2e46ea(0xa0)]=_0x4213f4;const {..._0xfc2f11}=_0x5c4574({},O,this[_0x2e46ea(0xd2)]);this[_0x2e46ea(0xa0)][_0x2e46ea(0xbf)](z,_0xfc2f11);}[_0x5b6015(0x8a)](){const _0x246acc=_0x5b6015;[[S],[f],[_]][_0x246acc(0x94)](_0x39d325=>{const _0x5e9d4e=_0x246acc;this['_injector'][_0x5e9d4e(0xc3)](_0x39d325);});}[_0x5b6015(0xdb)](){const _0x4c9225=_0x5b6015;this[_0x4c9225(0x81)][_0x4c9225(0xbc)](f),this[_0x4c9225(0x81)][_0x4c9225(0xbc)](_);}};$(g,'pluginName',W),$(g,_0x5b6015(0xa1),_0x2ab80c[_0x5b6015(0xda)]),g=ie([_0x199c17(_0x38adf0,_0x177961,_0x4c7c0c),N(0x1,_0x4b0cba(_0x4d5ddb)),N(0x2,_0x1283d7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x49bd(){const _0x2b4341=['disposeWithMe','UniverThreadCommentUIPlugin','rxjs','post','_injector','updateComment','221076jHqOjz','customRanges','Unknown','OpenOrReOpen','reply','UniverProLicense','@univerjs-pro/license','parentId','Edit','comment','userId','format','addComment','CommentService','filter','_commentService','Add','content','map','requireSession','Solve','6821270CtaySs','symbol','getMemberID','UserManagerService','_initDataSource','saveCommentToSnapshot','subscribe','_config','getUser','Reply','createTimestamp','delete','1Tsschq','1097278WoxlRt','getOwnPropertyDescriptor','exports','object','1892421mhYmly','add','unitId','_httpService','Solved','/solved','_threadCommentModel','_initUserSync','18tvPwal','users','UniverProCollaborationClient','_threadCommentDataSource','threadId','userID','merge','_threadCommentDataSourceService','bufferTime','UniverInstanceType','@univerjs/network','replyId','_userService','error','deleteComment','slice','CustomRangeType','/delete','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','604445kxbWLG','Injector','UNIVER_UNKNOWN','forEach','onReady','_sessionService','getUnit','body','addUser','toStringTag','rangeId','@univerjs/thread-comment','find','getComment','@univerjs/core','DependentOn','459468UuUfVu','_init','stringify','UNRECOGNIZED','@univerjs/thread-comment-ui','personId','24FLrZwF','COMMENT','rangeType','IConfigService','_configService','payload','parse','defineProperty','UniverCore','values','code','length','Delete','amd','HTTPService','syncUpdateMutationToColla','IThreadCommentDataSourceService','dayjs','user','get','/edit','setConfig','Inject','/universer-api/comment/unit/','resolveComment','/universer-api/user/list','comments','root','UniverThreadCommentDataSourcePlugin','602358dhCeKY','type','/list','pipe','replies','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','UniverThreadComment'];_0x49bd=function(){return _0x2b4341;};return _0x49bd();}function _0x304b(_0x1341da,_0x37a169){_0x1341da=_0x1341da-0xae;const _0x49bdda=_0x49bd();let _0x304bb9=_0x49bdda[_0x1341da];return _0x304bb9;}(function(_0x1f9b10,_0x5800d4){const _0x5a9bc0=_0x304b,_0xa178ef=_0x1f9b10();while(!![]){try{const _0xaf423b=-parseInt(_0x5a9bc0(0xfb))/0x1*(-parseInt(_0x5a9bc0(0xcb))/0x2)+-parseInt(_0x5a9bc0(0x12c))/0x3+parseInt(_0x5a9bc0(0xda))/0x4+-parseInt(_0x5a9bc0(0x11c))/0x5*(parseInt(_0x5a9bc0(0x108))/0x6)+parseInt(_0x5a9bc0(0xfc))/0x7*(-parseInt(_0x5a9bc0(0xae))/0x8)+parseInt(_0x5a9bc0(0x100))/0x9+parseInt(_0x5a9bc0(0xef))/0xa;if(_0xaf423b===_0x5800d4)break;else _0xa178ef['push'](_0xa178ef['shift']());}catch(_0x367177){_0xa178ef['push'](_0xa178ef['shift']());}}}(_0x49bd,0x40267),function(_0x2c1fb6,_0x423ad1){const _0x353b80=_0x304b;typeof exports==_0x353b80(0xff)&&typeof module<'u'?_0x423ad1(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x353b80(0xbb)]?define([_0x353b80(0xfe),'@univerjs-pro/collaboration-client',_0x353b80(0xe0),_0x353b80(0x12a),_0x353b80(0x130),_0x353b80(0x127),_0x353b80(0xd6),_0x353b80(0x112)],_0x423ad1):(_0x2c1fb6=typeof globalThis<'u'?globalThis:_0x2c1fb6||self,_0x423ad1(_0x2c1fb6['UniverProThreadCommentDatasource']={},_0x2c1fb6[_0x353b80(0x10a)],_0x2c1fb6[_0x353b80(0xdf)],_0x2c1fb6[_0x353b80(0xb6)],_0x2c1fb6['UniverThreadCommentUi'],_0x2c1fb6[_0x353b80(0xd3)],_0x2c1fb6[_0x353b80(0xd6)],_0x2c1fb6['UniverNetwork']));}(this,function(_0x9e9bf4,_0x210bf8,_0x362b49,_0x202475,_0x373872,_0x4dc4ac,_0x2cd9a9,_0x507eab){'use strict';const _0x3e5609=_0x304b;const _0x279a9d=_0x3e5609(0xd1);var _0x19b0c8=(_0x15fcc5=>(_0x15fcc5[_0x15fcc5['OpenOrReOpen']=0x0]=_0x3e5609(0xdd),_0x15fcc5[_0x15fcc5[_0x3e5609(0x104)]=0x1]='Solved',_0x15fcc5[_0x15fcc5['UNRECOGNIZED']=-0x1]=_0x3e5609(0x12f),_0x15fcc5))(_0x19b0c8||{}),_0x3fcc7f=(_0x320b82=>(_0x320b82[_0x320b82[_0x3e5609(0xdc)]=0x0]=_0x3e5609(0xdc),_0x320b82[_0x320b82[_0x3e5609(0xea)]=0x1]='Add',_0x320b82[_0x320b82['Reply']=0x2]=_0x3e5609(0xf8),_0x320b82[_0x320b82[_0x3e5609(0xe2)]=0x3]=_0x3e5609(0xe2),_0x320b82[_0x320b82[_0x3e5609(0xba)]=0x4]=_0x3e5609(0xba),_0x320b82[_0x320b82[_0x3e5609(0xee)]=0x5]=_0x3e5609(0xee),_0x320b82[_0x320b82['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x320b82))(_0x3fcc7f||{});const _0x1eabda=_0x148376=>_0x202475['dayjs'](new Date(+_0x148376))[_0x3e5609(0xe5)](_0x3e5609(0x11b)),_0x22f5ce=async(_0x144b2b,_0x3c541d)=>{const _0x4dcc88=_0x3e5609,_0x4fcb45=_0x144b2b[_0x4dcc88(0xc1)](_0x202475[_0x4dcc88(0xf2)]),_0x1ccee2=_0x144b2b[_0x4dcc88(0xc1)](_0x507eab[_0x4dcc88(0xbc)]);_0x3c541d[_0x4dcc88(0x11f)](_0x4d5634=>{const _0xea520f=_0x4dcc88;_0x4fcb45[_0xea520f(0xf7)](_0x4d5634)&&_0x3c541d[_0xea520f(0xfa)](_0x4d5634);}),_0x3c541d['size']&&(await _0x1ccee2[_0x4dcc88(0xc1)](_0x4dcc88(0xc7),{'params':{'userIDs':[..._0x3c541d]}}))[_0x4dcc88(0x123)][_0x4dcc88(0x109)][_0x4dcc88(0x11f)](_0x4470f5=>{const _0xc69f1e=_0x4dcc88;_0x4470f5&&_0x4fcb45[_0xc69f1e(0x124)](_0x4470f5);});};var _0x4c9b0d=Object[_0x3e5609(0xfd)],_0x230cee=(_0x3fdcee,_0x33ebd6,_0x24ed6c,_0x51ae92)=>{for(var _0x48f846=_0x51ae92>0x1?void 0x0:_0x51ae92?_0x4c9b0d(_0x33ebd6,_0x24ed6c):_0x33ebd6,_0x2381ea=_0x3fdcee['length']-0x1,_0x4ede50;_0x2381ea>=0x0;_0x2381ea--)(_0x4ede50=_0x3fdcee[_0x2381ea])&&(_0x48f846=_0x4ede50(_0x48f846)||_0x48f846);return _0x48f846;},_0x212e72=(_0x37ec27,_0x3348ef)=>(_0x1f1ce7,_0x1ece43)=>_0x3348ef(_0x1f1ce7,_0x1ece43,_0x37ec27);let _0x4f3510=class extends _0x202475['Disposable']{constructor(_0x547705,_0x7eb2ad,_0x1e49f9,_0x395dba){const _0x350d4a=_0x3e5609;super(),this[_0x350d4a(0xe9)]=_0x547705,this[_0x350d4a(0x106)]=_0x7eb2ad,this[_0x350d4a(0x114)]=_0x1e49f9,this[_0x350d4a(0xd8)]=_0x395dba,this[_0x350d4a(0x12d)](),this[_0x350d4a(0x107)]();}[_0x3e5609(0x107)](){const _0xa7f7eb=_0x3e5609;this[_0xa7f7eb(0xd4)](this[_0xa7f7eb(0x106)]['commentUpdate$'][_0xa7f7eb(0xce)](_0x2cd9a9[_0xa7f7eb(0x110)](0x10))[_0xa7f7eb(0xf5)](_0xc625e2=>{const _0x15ede7=_0xa7f7eb,_0x33afd3=new Set();_0xc625e2[_0x15ede7(0x11f)](_0x5c84c6=>{const _0x5112ae=_0x15ede7;switch(_0x5c84c6['type']){case _0x5112ae(0x101):{const _0x3161b3=_0x5c84c6[_0x5112ae(0xb3)][_0x5112ae(0x131)];_0x33afd3[_0x5112ae(0x101)](_0x3161b3);break;}}}),_0x22f5ce(this[_0x15ede7(0xd8)],_0x33afd3);}));}[_0x3e5609(0x12d)](){const _0xc52f5b=_0x3e5609;this[_0xc52f5b(0xd4)](this[_0xc52f5b(0xe9)]['commentUpdate$'][_0xc52f5b(0xf5)](async _0x4f07fb=>{const _0x4bc363=_0xc52f5b;var _0x5aa5a0,_0x1816e0,_0x370da7,_0x2c8d62;const _0x12df3f=(_0x5aa5a0=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])[_0x4bc363(0x128)](_0x216a37=>_0x216a37[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x5aa5a0[_0x4bc363(0xc9)];if(!_0x12df3f)return;const {unitId:_0x485f78,subUnitId:_0x568ef5}=_0x12df3f;switch(_0x4f07fb[_0x4bc363(0xc0)]&&this['_userService'][_0x4bc363(0x124)](_0x4f07fb[_0x4bc363(0xc0)]),_0x4f07fb[_0x4bc363(0xcc)]){case _0x3fcc7f[_0x4bc363(0xea)]:break;case _0x3fcc7f['Reply']:{this[_0x4bc363(0x106)][_0x4bc363(0xe6)](_0x485f78,_0x568ef5,{'unitId':_0x485f78,'subUnitId':_0x568ef5,'ref':'','id':_0x4f07fb[_0x4bc363(0x113)],'dT':_0x1eabda(+_0x4f07fb['createTimestamp']),'threadId':_0x4f07fb[_0x4bc363(0x10c)],'personId':(_0x370da7=(_0x1816e0=_0x4f07fb['user'])==null?void 0x0:_0x1816e0[_0x4bc363(0x10d)])!=null?_0x370da7:_0x4f07fb[_0x4bc363(0xe4)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)]),'parentId':_0x12df3f['id']});break;}case _0x3fcc7f['Delete']:{const _0x329df3=this[_0x4bc363(0x106)][_0x4bc363(0x129)](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);_0x329df3&&_0x329df3[_0x4bc363(0xe1)]&&this['_threadCommentModel']['deleteComment'](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);break;}case _0x3fcc7f[_0x4bc363(0xe2)]:{this[_0x4bc363(0x106)][_0x4bc363(0xd9)](_0x485f78,_0x568ef5,{'commentId':_0x4f07fb[_0x4bc363(0x113)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)])});break;}case _0x3fcc7f[_0x4bc363(0xee)]:{const _0x1d3f2b=(_0x2c8d62=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])['find'](_0x34b950=>_0x34b950[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x2c8d62[_0x4bc363(0xc9)];_0x1d3f2b&&this[_0x4bc363(0x106)]['resolveComment'](_0x485f78,_0x568ef5,_0x1d3f2b['id'],_0x4f07fb[_0x4bc363(0xd0)]===_0x19b0c8[_0x4bc363(0x104)]);break;}}}));}};_0x4f3510=_0x230cee([_0x212e72(0x0,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xe7)])),_0x212e72(0x1,_0x202475['Inject'](_0x4dc4ac['ThreadCommentModel'])),_0x212e72(0x2,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x212e72(0x3,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)]))],_0x4f3510);const _0x5626f9=_0x3e5609(0x11a),_0x4f5793={};var _0x2207e8=Object[_0x3e5609(0xfd)],_0xb4a31d=(_0x26f0f6,_0x585f36,_0x803e07,_0x1d2a11)=>{const _0x412a91=_0x3e5609;for(var _0xcd4c23=_0x1d2a11>0x1?void 0x0:_0x1d2a11?_0x2207e8(_0x585f36,_0x803e07):_0x585f36,_0x3c2410=_0x26f0f6[_0x412a91(0xb9)]-0x1,_0x98604e;_0x3c2410>=0x0;_0x3c2410--)(_0x98604e=_0x26f0f6[_0x3c2410])&&(_0xcd4c23=_0x98604e(_0xcd4c23)||_0xcd4c23);return _0xcd4c23;},_0x208ff8=(_0x5cb5ee,_0x1d0691)=>(_0x21c860,_0x2bc8cd)=>_0x1d0691(_0x21c860,_0x2bc8cd,_0x5cb5ee);function _0x33b9b5(_0x403073,_0x421578){const _0x3d2876=_0x3e5609,_0x27f513=_0x403073[_0x3d2876(0xcf)][0x0];return{..._0x421578,'id':_0x27f513[_0x3d2876(0x113)],'resolved':_0x403073[_0x3d2876(0xd0)]===0x1,'dT':_0x1eabda(_0x27f513[_0x3d2876(0xf9)]),'personId':_0x27f513[_0x3d2876(0xe4)],'threadId':_0x27f513[_0x3d2876(0x10c)]};}function _0x2311b1(_0x56ee2b,_0x4f3cfa,_0x416fce){const _0x311ff3=_0x3e5609;var _0xbc7c97,_0x28487c;if(((_0x28487c=(_0xbc7c97=_0x56ee2b==null?void 0x0:_0x56ee2b['replies'])==null?void 0x0:_0xbc7c97[_0x311ff3(0xb9)])!=null?_0x28487c:0x0)>0x0){const _0xfcf787=(_0x270c80,_0x125a21)=>({'id':_0x270c80[_0x311ff3(0x113)],'threadId':_0x270c80[_0x311ff3(0x10c)],'dT':_0x1eabda(_0x270c80[_0x311ff3(0xf9)]),'personId':_0x270c80[_0x311ff3(0xe4)],'resolved':_0x56ee2b[_0x311ff3(0xd0)]===_0x19b0c8[_0x311ff3(0x104)],'unitId':_0x4f3cfa,'subUnitId':_0x416fce,'text':JSON[_0x311ff3(0xb4)](_0x270c80['content']),'parentId':_0x125a21}),_0x290e2f=_0xfcf787(_0x56ee2b['replies'][0x0]);return{..._0x290e2f,'children':_0x56ee2b['replies'][_0x311ff3(0x117)](0x1)['map'](_0x50099c=>_0xfcf787(_0x50099c,_0x290e2f['id']))};}return null;}let _0xdf0bdf=class{constructor(_0x56624b,_0x56d3f4,_0x1c217d){const _0x5bce36=_0x3e5609;this[_0x5bce36(0x103)]=_0x56624b,this['_userService']=_0x56d3f4,this[_0x5bce36(0x121)]=_0x1c217d;}async[_0x3e5609(0xe6)](_0x168e59){const _0x49cbfa=_0x3e5609;var _0x5c6078,_0x47ff27;const {parentId:_0x4da86b,unitId:_0x3914fe,text:_0x1dca7c,threadId:_0x5a989c}=_0x168e59,_0x29aef3=(_0x47ff27=(_0x5c6078=_0x1dca7c[_0x49cbfa(0xdb)])==null?void 0x0:_0x5c6078[_0x49cbfa(0xe8)](_0x3e8fa7=>_0x3e8fa7['rangeType']===_0x202475[_0x49cbfa(0x118)]['COMMENT'])[_0x49cbfa(0xec)](_0x385e81=>_0x385e81[_0x49cbfa(0x126)]))!=null?_0x47ff27:[],_0x4a149c=JSON[_0x49cbfa(0x12e)](_0x1dca7c),_0x362605=(await this[_0x49cbfa(0x121)][_0x49cbfa(0xed)](_0x3914fe))['getMemberID']();if(_0x4da86b){const _0x52f095={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3,'threadId':_0x5a989c},_0x395666=(await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)](_0x49cbfa(0xc5)+_0x3914fe+'/reply',{'body':_0x52f095}))['body'][_0x49cbfa(0xde)];return{..._0x168e59,'id':_0x395666[_0x49cbfa(0x113)],'dT':_0x202475[_0x49cbfa(0xbf)](+_0x395666[_0x49cbfa(0xf9)])[_0x49cbfa(0xe5)](_0x49cbfa(0x11b)),'personId':_0x395666['userId']};}else{const _0x1fa894={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3},_0x248c99=await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)]('/universer-api/comment/unit/'+_0x3914fe+'/add',{'body':_0x1fa894});return _0x33b9b5(_0x248c99[_0x49cbfa(0x123)][_0x49cbfa(0xe3)],_0x168e59);}}async['updateComment'](_0x5a535c){const _0x13bb1c=_0x3e5609;var _0x16e342,_0x25abcf;const {text:_0x5b4232,unitId:_0x2b2e10}=_0x5a535c,_0x549b7f=(_0x25abcf=(_0x16e342=_0x5b4232[_0x13bb1c(0xdb)])==null?void 0x0:_0x16e342[_0x13bb1c(0xe8)](_0x211152=>_0x211152[_0x13bb1c(0xb0)]===_0x202475[_0x13bb1c(0x118)][_0x13bb1c(0xaf)])[_0x13bb1c(0xec)](_0x3d69b8=>_0x3d69b8[_0x13bb1c(0x126)]))!=null?_0x25abcf:[],_0x4c6c13=JSON[_0x13bb1c(0x12e)](_0x5b4232),_0x919a62=_0x5a535c[_0x13bb1c(0x10c)],_0x482d0d=_0x5a535c['id'],_0x51f671={'memberId':(await this[_0x13bb1c(0x121)][_0x13bb1c(0xed)](_0x2b2e10))['getMemberID'](),'unitId':_0x2b2e10,'threadId':_0x919a62,'mention':_0x549b7f,'content':_0x4c6c13,'replyId':_0x482d0d},_0x3e61bd=await this[_0x13bb1c(0x103)][_0x13bb1c(0xd7)](_0x13bb1c(0xc5)+_0x2b2e10+_0x13bb1c(0xc2),{'body':_0x51f671});return!_0x3e61bd[_0x13bb1c(0x123)][_0x13bb1c(0x115)]||_0x3e61bd[_0x13bb1c(0x123)]['error']['code']===0x1;}async[_0x3e5609(0xc6)](_0x2303b8){const _0xc9f1ab=_0x3e5609,{unitId:_0x10386b}=_0x2303b8,_0x5c6a51=_0x2303b8['threadId'],_0x8bf873={'memberId':this[_0xc9f1ab(0x114)]['getCurrentUser']()[_0xc9f1ab(0x10d)],'unitId':_0x10386b,'threadId':_0x5c6a51,'solved':_0x2303b8['resolved']?_0x19b0c8[_0xc9f1ab(0x104)]:_0x19b0c8['OpenOrReOpen']},_0x12ba0a=await this[_0xc9f1ab(0x103)][_0xc9f1ab(0xd7)](_0xc9f1ab(0xc5)+_0x10386b+_0xc9f1ab(0x105),{'body':_0x8bf873});return!_0x12ba0a[_0xc9f1ab(0x123)]['error']||_0x12ba0a[_0xc9f1ab(0x123)][_0xc9f1ab(0x115)][_0xc9f1ab(0xb8)]===0x1;}async[_0x3e5609(0x116)](_0x3bc1be,_0x9e9625,_0x41ef59,_0x11f5cd){const _0x30a97f=_0x3e5609,_0x1c01f7={'memberId':(await this['_sessionService'][_0x30a97f(0xed)](_0x3bc1be))[_0x30a97f(0xf1)](),'threadId':_0x41ef59,'replyId':_0x11f5cd,'unitId':_0x3bc1be},_0x3f8fa8=await this['_httpService']['post'](_0x30a97f(0xc5)+_0x3bc1be+_0x30a97f(0x119),{'body':_0x1c01f7});return!_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)]||_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)][_0x30a97f(0xb8)]===0x1;}async['listComments'](_0x4ee892,_0x5d17b6,_0xbf7b2b){const _0x303bf2=_0x3e5609,_0xe64dc0={'unitId':_0x4ee892,'threadId':_0xbf7b2b},_0x88718a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4ee892+_0x303bf2(0xcd),{'body':_0xe64dc0}),_0x5e1eef=_0xbf7b2b[_0x303bf2(0xec)](_0x551f24=>_0x2311b1(_0x88718a[_0x303bf2(0x123)][_0x303bf2(0xc8)][_0x551f24],_0x4ee892,_0x5d17b6))[_0x303bf2(0xe8)](Boolean);return Object[_0x303bf2(0xb7)](_0x88718a[_0x303bf2(0x123)][_0x303bf2(0x109)])[_0x303bf2(0x11f)](_0x272551=>{const _0x23fb14=_0x303bf2;this[_0x23fb14(0x114)][_0x23fb14(0x124)](_0x272551);}),_0x5e1eef;}[_0x3e5609(0xf4)](_0x2c8f99){const _0x1ae9fa=_0x3e5609;return{'id':_0x2c8f99['id'],'threadId':_0x2c8f99[_0x1ae9fa(0x10c)],'ref':_0x2c8f99['ref']};}};_0xdf0bdf=_0xb4a31d([_0x208ff8(0x0,_0x202475['Inject'](_0x507eab['HTTPService'])),_0x208ff8(0x1,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x208ff8(0x2,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xd2)]))],_0xdf0bdf);var _0x27ff12=Object['getOwnPropertyDescriptor'],_0x5a430b=(_0x804519,_0xa83008,_0x22a1a4,_0x58094b)=>{const _0x33e9d6=_0x3e5609;for(var _0xfef8e4=_0x58094b>0x1?void 0x0:_0x58094b?_0x27ff12(_0xa83008,_0x22a1a4):_0xa83008,_0x45c851=_0x804519[_0x33e9d6(0xb9)]-0x1,_0x26e74b;_0x45c851>=0x0;_0x45c851--)(_0x26e74b=_0x804519[_0x45c851])&&(_0xfef8e4=_0x26e74b(_0xfef8e4)||_0xfef8e4);return _0xfef8e4;},_0x5d785c=(_0x1229f5,_0x2abb33)=>(_0x438bce,_0x41c468)=>_0x2abb33(_0x438bce,_0x41c468,_0x1229f5);let _0x2bb563=class extends _0x202475['Disposable']{constructor(_0x4803ab,_0x3adaf8){const _0x21160b=_0x3e5609;super(),this[_0x21160b(0x10f)]=_0x4803ab,this[_0x21160b(0x10b)]=_0x3adaf8,this[_0x21160b(0xf3)]();}['_initDataSource'](){const _0x378b7c=_0x3e5609;this[_0x378b7c(0x10f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x378b7c(0xbd)]=!0x1;}};_0x2bb563=_0x5a430b([_0x5d785c(0x0,_0x4dc4ac[_0x3e5609(0xbe)]),_0x5d785c(0x1,_0x202475['Inject'](_0xdf0bdf))],_0x2bb563);var _0x371113=Object[_0x3e5609(0xb5)],_0x304192=Object[_0x3e5609(0xfd)],_0xb62991=(_0x174803,_0xd98d41,_0x3bb23a)=>_0xd98d41 in _0x174803?_0x371113(_0x174803,_0xd98d41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3bb23a}):_0x174803[_0xd98d41]=_0x3bb23a,_0x251a17=(_0xfbf9af,_0x4ad050,_0x1a95f7,_0x4b9a68)=>{const _0x45803d=_0x3e5609;for(var _0x19a345=_0x4b9a68>0x1?void 0x0:_0x4b9a68?_0x304192(_0x4ad050,_0x1a95f7):_0x4ad050,_0x3bf28a=_0xfbf9af[_0x45803d(0xb9)]-0x1,_0x4373e3;_0x3bf28a>=0x0;_0x3bf28a--)(_0x4373e3=_0xfbf9af[_0x3bf28a])&&(_0x19a345=_0x4373e3(_0x19a345)||_0x19a345);return _0x19a345;},_0x360acd=(_0x4056c6,_0x2b1797)=>(_0x31bd9f,_0x2ae1da)=>_0x2b1797(_0x31bd9f,_0x2ae1da,_0x4056c6),_0x54f9de=(_0x144489,_0x480160,_0x5d9d6f)=>_0xb62991(_0x144489,typeof _0x480160!=_0x3e5609(0xf0)?_0x480160+'':_0x480160,_0x5d9d6f);_0x9e9bf4[_0x3e5609(0xca)]=class extends _0x202475['Plugin']{constructor(_0x42c1ca=_0x4f5793,_0x21479e,_0xfb189d){const _0x31c4b9=_0x3e5609;super(),this[_0x31c4b9(0xf6)]=_0x42c1ca,this[_0x31c4b9(0xd8)]=_0x21479e,this[_0x31c4b9(0xb2)]=_0xfb189d;const {..._0x5ade38}=_0x202475[_0x31c4b9(0x10e)]({},_0x4f5793,this[_0x31c4b9(0xf6)]);this[_0x31c4b9(0xb2)][_0x31c4b9(0xc3)](_0x5626f9,_0x5ade38);}['onStarting'](){[[_0xdf0bdf],[_0x2bb563],[_0x4f3510]]['forEach'](_0xb2c998=>{const _0x31f197=_0x304b;this[_0x31f197(0xd8)]['add'](_0xb2c998);});}[_0x3e5609(0x120)](){const _0x3f4ad0=_0x3e5609;this['_injector']['get'](_0x2bb563),this['_injector'][_0x3f4ad0(0xc1)](_0x4f3510);}},_0x54f9de(_0x9e9bf4[_0x3e5609(0xca)],'pluginName',_0x279a9d),_0x54f9de(_0x9e9bf4['UniverThreadCommentDataSourcePlugin'],_0x3e5609(0xcc),_0x202475[_0x3e5609(0x111)][_0x3e5609(0x11e)]),_0x9e9bf4[_0x3e5609(0xca)]=_0x251a17([_0x202475[_0x3e5609(0x12b)](_0x373872[_0x3e5609(0xd5)],_0x210bf8['UniverCollaborationClientPlugin'],_0x362b49['UniverLicensePlugin']),_0x360acd(0x1,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)])),_0x360acd(0x2,_0x202475[_0x3e5609(0xb1)])],_0x9e9bf4[_0x3e5609(0xca)]),Object['defineProperty'](_0x9e9bf4,Symbol[_0x3e5609(0x125)],{'value':'Module'});}));
|
|
1
|
+
function _0x4248(_0xdf34f0,_0x2310ad){_0xdf34f0=_0xdf34f0-0x12c;const _0x3bda66=_0x3bda();let _0x42487e=_0x3bda66[_0xdf34f0];return _0x42487e;}(function(_0x3984f9,_0x2cb49e){const _0x26c883=_0x4248,_0x21ddb2=_0x3984f9();while(!![]){try{const _0x5b7f28=parseInt(_0x26c883(0x17e))/0x1*(-parseInt(_0x26c883(0x182))/0x2)+-parseInt(_0x26c883(0x12e))/0x3+-parseInt(_0x26c883(0x160))/0x4+parseInt(_0x26c883(0x167))/0x5*(-parseInt(_0x26c883(0x14a))/0x6)+-parseInt(_0x26c883(0x181))/0x7+-parseInt(_0x26c883(0x198))/0x8+parseInt(_0x26c883(0x1a6))/0x9*(parseInt(_0x26c883(0x12d))/0xa);if(_0x5b7f28===_0x2cb49e)break;else _0x21ddb2['push'](_0x21ddb2['shift']());}catch(_0x37a86d){_0x21ddb2['push'](_0x21ddb2['shift']());}}}(_0x3bda,0xe14b2),function(_0x4cf0ad,_0x2cbc82){const _0x34a802=_0x4248;typeof exports==_0x34a802(0x13b)&&typeof module<'u'?_0x2cbc82(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==_0x34a802(0x15a)&&define[_0x34a802(0x132)]?define([_0x34a802(0x175),_0x34a802(0x146),_0x34a802(0x184),_0x34a802(0x16f),_0x34a802(0x168),_0x34a802(0x18c),'rxjs',_0x34a802(0x189)],_0x2cbc82):(_0x4cf0ad=typeof globalThis<'u'?globalThis:_0x4cf0ad||self,_0x2cbc82(_0x4cf0ad['UniverProThreadCommentDatasource']={},_0x4cf0ad['UniverProCollaborationClient'],_0x4cf0ad['UniverProLicense'],_0x4cf0ad[_0x34a802(0x13a)],_0x4cf0ad[_0x34a802(0x144)],_0x4cf0ad[_0x34a802(0x173)],_0x4cf0ad[_0x34a802(0x131)],_0x4cf0ad[_0x34a802(0x185)]));}(this,function(_0x195de8,_0x2a52ea,_0x452d03,_0x4c82ca,_0x2aa394,_0x30dc8c,_0x4cc962,_0x8ca4ce){'use strict';const _0x437c14=_0x4248;const _0x5eb1ac=_0x437c14(0x1a8);var _0x7859da=(_0x3037a3=>(_0x3037a3[_0x3037a3[_0x437c14(0x135)]=0x0]=_0x437c14(0x135),_0x3037a3[_0x3037a3[_0x437c14(0x1a5)]=0x1]='Solved',_0x3037a3[_0x3037a3[_0x437c14(0x190)]=-0x1]='UNRECOGNIZED',_0x3037a3))(_0x7859da||{}),_0x4330df=(_0x5ad12f=>(_0x5ad12f[_0x5ad12f[_0x437c14(0x19e)]=0x0]=_0x437c14(0x19e),_0x5ad12f[_0x5ad12f[_0x437c14(0x194)]=0x1]=_0x437c14(0x194),_0x5ad12f[_0x5ad12f[_0x437c14(0x136)]=0x2]=_0x437c14(0x136),_0x5ad12f[_0x5ad12f[_0x437c14(0x16d)]=0x3]=_0x437c14(0x16d),_0x5ad12f[_0x5ad12f[_0x437c14(0x17c)]=0x4]=_0x437c14(0x17c),_0x5ad12f[_0x5ad12f['Solve']=0x5]='Solve',_0x5ad12f[_0x5ad12f[_0x437c14(0x190)]=-0x1]=_0x437c14(0x190),_0x5ad12f))(_0x4330df||{});const _0x416b7d=_0x13797a=>_0x4c82ca[_0x437c14(0x15d)](new Date(+_0x13797a))[_0x437c14(0x159)](_0x437c14(0x169)),_0x2d4877=async(_0xde571a,_0x13c13b)=>{const _0xf68269=_0x437c14,_0x482857=_0xde571a[_0xf68269(0x17d)](_0x4c82ca['UserManagerService']),_0x3f75ff=_0xde571a['get'](_0x8ca4ce['HTTPService']);_0x13c13b[_0xf68269(0x15e)](_0x3d488a=>{_0x482857['getUser'](_0x3d488a)&&_0x13c13b['delete'](_0x3d488a);}),_0x13c13b['size']&&(await _0x3f75ff[_0xf68269(0x17d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13c13b]}}))[_0xf68269(0x179)][_0xf68269(0x18d)]['forEach'](_0x423fea=>{const _0x4c56e4=_0xf68269;_0x423fea&&_0x482857[_0x4c56e4(0x19c)](_0x423fea);});};var _0x2c623d=Object['getOwnPropertyDescriptor'],_0x4f5771=(_0x559f48,_0x5cbb44,_0x56d96e,_0x2fc6b8)=>{const _0x1c9bd4=_0x437c14;for(var _0xcbc5e2=_0x2fc6b8>0x1?void 0x0:_0x2fc6b8?_0x2c623d(_0x5cbb44,_0x56d96e):_0x5cbb44,_0x274884=_0x559f48[_0x1c9bd4(0x18b)]-0x1,_0x29411c;_0x274884>=0x0;_0x274884--)(_0x29411c=_0x559f48[_0x274884])&&(_0xcbc5e2=_0x29411c(_0xcbc5e2)||_0xcbc5e2);return _0xcbc5e2;},_0x968b49=(_0x4f36f8,_0x16a422)=>(_0x1799ef,_0x2f6670)=>_0x16a422(_0x1799ef,_0x2f6670,_0x4f36f8);let _0x1417c0=class extends _0x4c82ca[_0x437c14(0x16c)]{constructor(_0x57949b,_0x4d06ce,_0x231aca,_0x995a7b){const _0x5bc46f=_0x437c14;super(),this[_0x5bc46f(0x15b)]=_0x57949b,this[_0x5bc46f(0x14e)]=_0x4d06ce,this[_0x5bc46f(0x14d)]=_0x231aca,this['_injector']=_0x995a7b,this[_0x5bc46f(0x14f)](),this[_0x5bc46f(0x145)]();}[_0x437c14(0x145)](){const _0x43f322=_0x437c14;this[_0x43f322(0x139)](this[_0x43f322(0x14e)][_0x43f322(0x140)][_0x43f322(0x141)](_0x4cc962[_0x43f322(0x170)](0x10))[_0x43f322(0x178)](_0x26e6a5=>{const _0x180780=_0x43f322,_0x3a1954=new Set();_0x26e6a5[_0x180780(0x15e)](_0x5cb876=>{const _0xb9f2e7=_0x180780;switch(_0x5cb876['type']){case _0xb9f2e7(0x147):{const _0x219be6=_0x5cb876['payload'][_0xb9f2e7(0x13f)];_0x3a1954[_0xb9f2e7(0x147)](_0x219be6);break;}}}),_0x2d4877(this['_injector'],_0x3a1954);}));}[_0x437c14(0x14f)](){const _0x4d1d07=_0x437c14;this[_0x4d1d07(0x139)](this[_0x4d1d07(0x15b)][_0x4d1d07(0x140)][_0x4d1d07(0x178)](async _0x4cf466=>{const _0x5acd53=_0x4d1d07;var _0x24a72b,_0x1c94b3,_0x3134cb,_0x501202;const _0x299e3e=(_0x24a72b=this[_0x5acd53(0x14e)][_0x5acd53(0x183)](_0x4cf466[_0x5acd53(0x18a)])[_0x5acd53(0x14c)](_0xb00cc6=>_0xb00cc6['threadId']===_0x4cf466['threadId']))==null?void 0x0:_0x24a72b[_0x5acd53(0x187)];if(!_0x299e3e)return;const {unitId:_0x5d5b60,subUnitId:_0x271111}=_0x299e3e;switch(_0x4cf466['user']&&this[_0x5acd53(0x14d)][_0x5acd53(0x19c)](_0x4cf466['user']),_0x4cf466['type']){case _0x4330df[_0x5acd53(0x194)]:break;case _0x4330df[_0x5acd53(0x136)]:{this[_0x5acd53(0x14e)][_0x5acd53(0x172)](_0x5d5b60,_0x271111,{'unitId':_0x5d5b60,'subUnitId':_0x271111,'ref':'','id':_0x4cf466['replyId'],'dT':_0x416b7d(+_0x4cf466[_0x5acd53(0x1a2)]),'threadId':_0x4cf466[_0x5acd53(0x161)],'personId':(_0x3134cb=(_0x1c94b3=_0x4cf466['user'])==null?void 0x0:_0x1c94b3['userID'])!=null?_0x3134cb:_0x4cf466[_0x5acd53(0x158)],'text':JSON['parse'](_0x4cf466['content']),'parentId':_0x299e3e['id']});break;}case _0x4330df['Delete']:{const _0x25dcca=this[_0x5acd53(0x14e)][_0x5acd53(0x196)](_0x5d5b60,_0x271111,_0x4cf466['replyId']);_0x25dcca&&_0x25dcca[_0x5acd53(0x15c)]&&this[_0x5acd53(0x14e)][_0x5acd53(0x162)](_0x5d5b60,_0x271111,_0x4cf466['replyId']);break;}case _0x4330df[_0x5acd53(0x16d)]:{this[_0x5acd53(0x14e)][_0x5acd53(0x153)](_0x5d5b60,_0x271111,{'commentId':_0x4cf466[_0x5acd53(0x188)],'text':JSON['parse'](_0x4cf466['content'])});break;}case _0x4330df[_0x5acd53(0x13c)]:{const _0x5046a3=(_0x501202=this['_threadCommentModel'][_0x5acd53(0x183)](_0x4cf466['unitId'])['find'](_0x5e2f76=>_0x5e2f76[_0x5acd53(0x161)]===_0x4cf466['threadId']))==null?void 0x0:_0x501202[_0x5acd53(0x187)];_0x5046a3&&this[_0x5acd53(0x14e)][_0x5acd53(0x186)](_0x5d5b60,_0x271111,_0x5046a3['id'],_0x4cf466['solved']===_0x7859da[_0x5acd53(0x1a5)]);break;}}}));}};_0x1417c0=_0x4f5771([_0x968b49(0x0,_0x4c82ca[_0x437c14(0x180)](_0x2a52ea[_0x437c14(0x1aa)])),_0x968b49(0x1,_0x4c82ca[_0x437c14(0x180)](_0x30dc8c[_0x437c14(0x16e)])),_0x968b49(0x2,_0x4c82ca['Inject'](_0x4c82ca[_0x437c14(0x143)])),_0x968b49(0x3,_0x4c82ca[_0x437c14(0x180)](_0x4c82ca[_0x437c14(0x199)]))],_0x1417c0);const _0x20cc5e=_0x437c14(0x171),_0x230dab={};var _0x286bb9=Object['getOwnPropertyDescriptor'],_0x1d0ad9=(_0x2b3944,_0x256871,_0x252112,_0x1f9910)=>{const _0x467ce6=_0x437c14;for(var _0x420641=_0x1f9910>0x1?void 0x0:_0x1f9910?_0x286bb9(_0x256871,_0x252112):_0x256871,_0xa63b84=_0x2b3944[_0x467ce6(0x18b)]-0x1,_0xba5054;_0xa63b84>=0x0;_0xa63b84--)(_0xba5054=_0x2b3944[_0xa63b84])&&(_0x420641=_0xba5054(_0x420641)||_0x420641);return _0x420641;},_0x2a8ef1=(_0x39a8a7,_0x4a799c)=>(_0x17ce2c,_0x21aa34)=>_0x4a799c(_0x17ce2c,_0x21aa34,_0x39a8a7);function _0x366ef8(_0xa53dcb,_0x4df3c1){const _0x1da4ad=_0x437c14,_0x3f9e6d=_0xa53dcb[_0x1da4ad(0x197)][0x0];return{..._0x4df3c1,'id':_0x3f9e6d[_0x1da4ad(0x188)],'resolved':_0xa53dcb['solved']===0x1,'dT':_0x416b7d(_0x3f9e6d['createTimestamp']),'personId':_0x3f9e6d[_0x1da4ad(0x158)],'threadId':_0x3f9e6d[_0x1da4ad(0x161)]};}function _0xdb0f61(_0xf1b55,_0x48cef7,_0x30770a){const _0x107f8f=_0x437c14;var _0x2e152f,_0x53b752;if(((_0x53b752=(_0x2e152f=_0xf1b55==null?void 0x0:_0xf1b55[_0x107f8f(0x197)])==null?void 0x0:_0x2e152f[_0x107f8f(0x18b)])!=null?_0x53b752:0x0)>0x0){const _0x2ece23=(_0x23e8d0,_0x2833f8)=>({'id':_0x23e8d0['replyId'],'threadId':_0x23e8d0[_0x107f8f(0x161)],'dT':_0x416b7d(_0x23e8d0[_0x107f8f(0x1a2)]),'personId':_0x23e8d0[_0x107f8f(0x158)],'resolved':_0xf1b55[_0x107f8f(0x16b)]===_0x7859da[_0x107f8f(0x1a5)],'unitId':_0x48cef7,'subUnitId':_0x30770a,'text':JSON[_0x107f8f(0x1ac)](_0x23e8d0[_0x107f8f(0x142)]),'parentId':_0x2833f8}),_0x27b8a5=_0x2ece23(_0xf1b55['replies'][0x0]);return{..._0x27b8a5,'children':_0xf1b55[_0x107f8f(0x197)][_0x107f8f(0x18f)](0x1)[_0x107f8f(0x14b)](_0x1938c4=>_0x2ece23(_0x1938c4,_0x27b8a5['id']))};}return null;}let _0x5724dd=class{constructor(_0x513aa9,_0x5da920,_0x2630ba){const _0x31ff97=_0x437c14;this['_httpService']=_0x513aa9,this[_0x31ff97(0x14d)]=_0x5da920,this['_sessionService']=_0x2630ba;}async['addComment'](_0x4b4458){const _0x8b57d=_0x437c14;var _0x5d5bcf,_0x904f35;const {parentId:_0x25a6b8,unitId:_0x2553d0,text:_0x2ca174,threadId:_0x218a75}=_0x4b4458,_0x8f5464=(_0x904f35=(_0x5d5bcf=_0x2ca174['customRanges'])==null?void 0x0:_0x5d5bcf['filter'](_0x3fdbd2=>_0x3fdbd2[_0x8b57d(0x17a)]===_0x4c82ca[_0x8b57d(0x150)][_0x8b57d(0x19a)])[_0x8b57d(0x14b)](_0x474d6f=>_0x474d6f['rangeId']))!=null?_0x904f35:[],_0x489d9c=JSON['stringify'](_0x2ca174),_0x51681c=(await this[_0x8b57d(0x130)][_0x8b57d(0x166)](_0x2553d0))[_0x8b57d(0x195)]();if(_0x25a6b8){const _0x2352b5={'memberId':_0x51681c,'unitId':_0x2553d0,'content':_0x489d9c,'mention':_0x8f5464,'threadId':_0x218a75},_0x411337=(await this[_0x8b57d(0x174)]['post']('/universer-api/comment/unit/'+_0x2553d0+'/reply',{'body':_0x2352b5}))[_0x8b57d(0x179)][_0x8b57d(0x17f)];return{..._0x4b4458,'id':_0x411337[_0x8b57d(0x188)],'dT':_0x4c82ca[_0x8b57d(0x15d)](+_0x411337[_0x8b57d(0x1a2)])['format'](_0x8b57d(0x169)),'personId':_0x411337[_0x8b57d(0x158)]};}else{const _0x34ce78={'memberId':_0x51681c,'unitId':_0x2553d0,'content':_0x489d9c,'mention':_0x8f5464},_0x1b9261=await this[_0x8b57d(0x174)][_0x8b57d(0x155)](_0x8b57d(0x176)+_0x2553d0+_0x8b57d(0x134),{'body':_0x34ce78});return _0x366ef8(_0x1b9261['body'][_0x8b57d(0x1a7)],_0x4b4458);}}async['updateComment'](_0x58205b){const _0x21ec1a=_0x437c14;var _0x4a0ee9,_0x55ad1c;const {text:_0x4257ee,unitId:_0x33a538}=_0x58205b,_0x69f8ab=(_0x55ad1c=(_0x4a0ee9=_0x4257ee['customRanges'])==null?void 0x0:_0x4a0ee9[_0x21ec1a(0x137)](_0x222358=>_0x222358['rangeType']===_0x4c82ca[_0x21ec1a(0x150)]['COMMENT'])[_0x21ec1a(0x14b)](_0x48564b=>_0x48564b[_0x21ec1a(0x157)]))!=null?_0x55ad1c:[],_0x31badd=JSON[_0x21ec1a(0x156)](_0x4257ee),_0x18c5b2=_0x58205b[_0x21ec1a(0x161)],_0x3e263e=_0x58205b['id'],_0x39a5c0={'memberId':(await this[_0x21ec1a(0x130)]['requireSession'](_0x33a538))['getMemberID'](),'unitId':_0x33a538,'threadId':_0x18c5b2,'mention':_0x69f8ab,'content':_0x31badd,'replyId':_0x3e263e},_0x2467be=await this['_httpService']['post'](_0x21ec1a(0x176)+_0x33a538+'/edit',{'body':_0x39a5c0});return!_0x2467be[_0x21ec1a(0x179)]['error']||_0x2467be[_0x21ec1a(0x179)][_0x21ec1a(0x13d)]['code']===0x1;}async['resolveComment'](_0x116bc2){const _0x243997=_0x437c14,{unitId:_0x1b27fa}=_0x116bc2,_0x4e9323=_0x116bc2[_0x243997(0x161)],_0xb097ec={'memberId':this[_0x243997(0x14d)][_0x243997(0x138)]()[_0x243997(0x154)],'unitId':_0x1b27fa,'threadId':_0x4e9323,'solved':_0x116bc2['resolved']?_0x7859da[_0x243997(0x1a5)]:_0x7859da[_0x243997(0x135)]},_0x348678=await this[_0x243997(0x174)][_0x243997(0x155)](_0x243997(0x176)+_0x1b27fa+'/solved',{'body':_0xb097ec});return!_0x348678[_0x243997(0x179)][_0x243997(0x13d)]||_0x348678['body']['error'][_0x243997(0x1ab)]===0x1;}async[_0x437c14(0x162)](_0x367235,_0x9d9823,_0x4527cc,_0x45ca38){const _0x434971=_0x437c14,_0xdb700b={'memberId':(await this[_0x434971(0x130)]['requireSession'](_0x367235))[_0x434971(0x195)](),'threadId':_0x4527cc,'replyId':_0x45ca38,'unitId':_0x367235},_0x435f3b=await this[_0x434971(0x174)][_0x434971(0x155)]('/universer-api/comment/unit/'+_0x367235+_0x434971(0x19f),{'body':_0xdb700b});return!_0x435f3b[_0x434971(0x179)][_0x434971(0x13d)]||_0x435f3b['body'][_0x434971(0x13d)][_0x434971(0x1ab)]===0x1;}async[_0x437c14(0x133)](_0xcad9d3,_0x5d1b37,_0x4330e0){const _0x1a12cc=_0x437c14,_0x5468d0={'unitId':_0xcad9d3,'threadId':_0x4330e0},_0x2ce540=await this['_httpService'][_0x1a12cc(0x155)]('/universer-api/comment/unit/'+_0xcad9d3+'/list',{'body':_0x5468d0}),_0x152596=_0x4330e0[_0x1a12cc(0x14b)](_0xd28abc=>_0xdb0f61(_0x2ce540[_0x1a12cc(0x179)][_0x1a12cc(0x16a)][_0xd28abc],_0xcad9d3,_0x5d1b37))['filter'](Boolean);return Object[_0x1a12cc(0x165)](_0x2ce540[_0x1a12cc(0x179)]['users'])[_0x1a12cc(0x15e)](_0x1934f1=>{const _0x1efafd=_0x1a12cc;this[_0x1efafd(0x14d)][_0x1efafd(0x19c)](_0x1934f1);}),_0x152596;}['saveCommentToSnapshot'](_0x2d9e06){const _0x37e4e2=_0x437c14;return{'id':_0x2d9e06['id'],'threadId':_0x2d9e06[_0x37e4e2(0x161)],'ref':_0x2d9e06[_0x37e4e2(0x148)]};}};_0x5724dd=_0x1d0ad9([_0x2a8ef1(0x0,_0x4c82ca[_0x437c14(0x180)](_0x8ca4ce[_0x437c14(0x19d)])),_0x2a8ef1(0x1,_0x4c82ca['Inject'](_0x4c82ca['UserManagerService'])),_0x2a8ef1(0x2,_0x4c82ca[_0x437c14(0x180)](_0x2a52ea[_0x437c14(0x1a9)]))],_0x5724dd);var _0x3f4e5d=Object[_0x437c14(0x192)],_0x4c0ba9=(_0x426f83,_0x4d945d,_0x390128,_0x23e558)=>{const _0x23b559=_0x437c14;for(var _0x3fd495=_0x23e558>0x1?void 0x0:_0x23e558?_0x3f4e5d(_0x4d945d,_0x390128):_0x4d945d,_0x1a14b3=_0x426f83[_0x23b559(0x18b)]-0x1,_0x3b73ae;_0x1a14b3>=0x0;_0x1a14b3--)(_0x3b73ae=_0x426f83[_0x1a14b3])&&(_0x3fd495=_0x3b73ae(_0x3fd495)||_0x3fd495);return _0x3fd495;},_0x1f2310=(_0x165d17,_0x1d930c)=>(_0x1b73e1,_0x73d5c4)=>_0x1d930c(_0x1b73e1,_0x73d5c4,_0x165d17);let _0x358942=class extends _0x4c82ca['Disposable']{constructor(_0x33aa47,_0x3750ac){const _0x4668c8=_0x437c14;super(),this[_0x4668c8(0x163)]=_0x33aa47,this[_0x4668c8(0x193)]=_0x3750ac,this[_0x4668c8(0x12f)]();}[_0x437c14(0x12f)](){const _0x387567=_0x437c14;this[_0x387567(0x163)]['dataSource']=this[_0x387567(0x193)],this[_0x387567(0x163)]['syncUpdateMutationToColla']=!0x1;}};_0x358942=_0x4c0ba9([_0x1f2310(0x0,_0x30dc8c[_0x437c14(0x177)]),_0x1f2310(0x1,_0x4c82ca['Inject'](_0x5724dd))],_0x358942);var _0x5254ed=Object['defineProperty'],_0x5d3f9d=Object['getOwnPropertyDescriptor'],_0x119651=(_0x26b0f5,_0x1763a5,_0x127f9a)=>_0x1763a5 in _0x26b0f5?_0x5254ed(_0x26b0f5,_0x1763a5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x127f9a}):_0x26b0f5[_0x1763a5]=_0x127f9a,_0x29ed63=(_0x59a08c,_0x381632,_0x35def7,_0x39b43e)=>{const _0x3c17c1=_0x437c14;for(var _0x2f6b5c=_0x39b43e>0x1?void 0x0:_0x39b43e?_0x5d3f9d(_0x381632,_0x35def7):_0x381632,_0x31f1a9=_0x59a08c[_0x3c17c1(0x18b)]-0x1,_0x267b22;_0x31f1a9>=0x0;_0x31f1a9--)(_0x267b22=_0x59a08c[_0x31f1a9])&&(_0x2f6b5c=_0x267b22(_0x2f6b5c)||_0x2f6b5c);return _0x2f6b5c;},_0x2a9ba8=(_0x17f94c,_0x2db662)=>(_0x45e7e2,_0x388599)=>_0x2db662(_0x45e7e2,_0x388599,_0x17f94c),_0x406575=(_0x1a4f8f,_0x20ccf6,_0x4c710f)=>_0x119651(_0x1a4f8f,typeof _0x20ccf6!=_0x437c14(0x1a3)?_0x20ccf6+'':_0x20ccf6,_0x4c710f);_0x195de8['UniverThreadCommentDataSourcePlugin']=class extends _0x4c82ca['Plugin']{constructor(_0x30825f=_0x230dab,_0x5f3bf1,_0x5f211e){const _0x4f93f1=_0x437c14;super(),this[_0x4f93f1(0x1a4)]=_0x30825f,this['_injector']=_0x5f3bf1,this['_configService']=_0x5f211e;const {..._0x61987a}=_0x4c82ca[_0x4f93f1(0x164)]({},_0x230dab,this[_0x4f93f1(0x1a4)]);this[_0x4f93f1(0x12c)]['setConfig'](_0x20cc5e,_0x61987a);}[_0x437c14(0x17b)](){[[_0x5724dd],[_0x358942],[_0x1417c0]]['forEach'](_0x1a54de=>{const _0x272186=_0x4248;this['_injector'][_0x272186(0x147)](_0x1a54de);});}[_0x437c14(0x191)](){const _0x37aa84=_0x437c14;this[_0x37aa84(0x1a1)]['get'](_0x358942),this[_0x37aa84(0x1a1)][_0x37aa84(0x17d)](_0x1417c0);}},_0x406575(_0x195de8['UniverThreadCommentDataSourcePlugin'],_0x437c14(0x18e),_0x5eb1ac),_0x406575(_0x195de8[_0x437c14(0x15f)],'type',_0x4c82ca[_0x437c14(0x13e)]['UNIVER_UNKNOWN']),_0x195de8[_0x437c14(0x15f)]=_0x29ed63([_0x4c82ca[_0x437c14(0x19b)](_0x2aa394['UniverThreadCommentUIPlugin'],_0x2a52ea['UniverCollaborationClientPlugin'],_0x452d03['UniverLicensePlugin']),_0x2a9ba8(0x1,_0x4c82ca[_0x437c14(0x180)](_0x4c82ca['Injector'])),_0x2a9ba8(0x2,_0x4c82ca[_0x437c14(0x149)])],_0x195de8[_0x437c14(0x15f)]),Object[_0x437c14(0x152)](_0x195de8,Symbol[_0x437c14(0x151)],{'value':_0x437c14(0x1a0)});}));function _0x3bda(){const _0x158641=['UniverInstanceType','personId','commentUpdate$','pipe','content','UserManagerService','UniverThreadCommentUi','_initUserSync','@univerjs-pro/collaboration-client','add','ref','IConfigService','395886eNbQpu','map','find','_userService','_threadCommentModel','_init','CustomRangeType','toStringTag','defineProperty','updateComment','userID','post','stringify','rangeId','userId','format','function','_commentService','parentId','dayjs','forEach','UniverThreadCommentDataSourcePlugin','658112rpgKdq','threadId','deleteComment','_threadCommentDataSourceService','merge','values','requireSession','130TAlvCr','@univerjs/thread-comment-ui','YYYY/MM/DD\x20HH:mm','comments','solved','Disposable','Edit','ThreadCommentModel','@univerjs/core','bufferTime','thread-comment-data-source.config','addComment','UniverThreadComment','_httpService','exports','/universer-api/comment/unit/','IThreadCommentDataSourceService','subscribe','body','rangeType','onStarting','Delete','get','13613wMhNWV','reply','Inject','7252882KgpxzN','202CRUXFv','getUnit','@univerjs-pro/license','UniverNetwork','resolveComment','root','replyId','@univerjs/network','unitId','length','@univerjs/thread-comment','users','pluginName','slice','UNRECOGNIZED','onReady','getOwnPropertyDescriptor','_threadCommentDataSource','Add','getMemberID','getComment','replies','13820104yvBuSJ','Injector','COMMENT','DependentOn','addUser','HTTPService','Unknown','/delete','Module','_injector','createTimestamp','symbol','_config','Solved','17862003qTUjXG','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','CommentService','code','parse','_configService','40YNPVLR','2991840wDTrNH','_initDataSource','_sessionService','rxjs','amd','listComments','/add','OpenOrReOpen','Reply','filter','getCurrentUser','disposeWithMe','UniverCore','object','Solve','error'];_0x3bda=function(){return _0x158641;};return _0x3bda();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.4-experimental.20251210-
|
|
3
|
+
"version": "0.12.4-experimental.20251210-29c379a",
|
|
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/network": "0.12.4-experimental.20251210-
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
52
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-29c379a",
|
|
49
|
+
"@univerjs/network": "0.12.4-experimental.20251210-29c379a",
|
|
50
|
+
"@univerjs-pro/license": "0.12.4-experimental.20251210-29c379a",
|
|
51
|
+
"@univerjs/thread-comment": "0.12.4-experimental.20251210-29c379a",
|
|
52
|
+
"@univerjs/core": "0.12.4-experimental.20251210-29c379a",
|
|
53
53
|
"@univerjs/protocol": "0.1.47",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-29c379a"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|