@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507051607 → 0.9.1-nightly.202507061606
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 _0x195953=_0x148b;(function(_0x4c8502,_0xb5a87f){const _0x3c0b44=_0x148b,_0x43013f=_0x4c8502();while(!![]){try{const _0x4d2137=parseInt(_0x3c0b44(0x1ce))/0x1+-parseInt(_0x3c0b44(0x1da))/0x2*(parseInt(_0x3c0b44(0x1ff))/0x3)+parseInt(_0x3c0b44(0x1c0))/0x4+parseInt(_0x3c0b44(0x202))/0x5*(parseInt(_0x3c0b44(0x1b9))/0x6)+-parseInt(_0x3c0b44(0x1d8))/0x7*(parseInt(_0x3c0b44(0x208))/0x8)+parseInt(_0x3c0b44(0x1a8))/0x9*(-parseInt(_0x3c0b44(0x1b3))/0xa)+parseInt(_0x3c0b44(0x1a0))/0xb;if(_0x4d2137===_0xb5a87f)break;else _0x43013f['push'](_0x43013f['shift']());}catch(_0x3233ee){_0x43013f['push'](_0x43013f['shift']());}}}(_0x4b26,0x281fd));Object[_0x195953(0x20a)](exports,Symbol['toStringTag'],{'value':_0x195953(0x1e8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x45ff1b=>(_0x45ff1b[_0x45ff1b['OpenOrReOpen']=0x0]=_0x195953(0x1c3),_0x45ff1b[_0x45ff1b[_0x195953(0x197)]=0x1]=_0x195953(0x197),_0x45ff1b[_0x45ff1b[_0x195953(0x1ae)]=-0x1]='UNRECOGNIZED',_0x45ff1b))(I||{}),v=(_0x29d7d3=>(_0x29d7d3[_0x29d7d3[_0x195953(0x1e9)]=0x0]=_0x195953(0x1e9),_0x29d7d3[_0x29d7d3[_0x195953(0x1d7)]=0x1]=_0x195953(0x1d7),_0x29d7d3[_0x29d7d3[_0x195953(0x1de)]=0x2]='Reply',_0x29d7d3[_0x29d7d3[_0x195953(0x201)]=0x3]='Edit',_0x29d7d3[_0x29d7d3[_0x195953(0x190)]=0x4]=_0x195953(0x190),_0x29d7d3[_0x29d7d3[_0x195953(0x1be)]=0x5]=_0x195953(0x1be),_0x29d7d3[_0x29d7d3[_0x195953(0x1ae)]=-0x1]=_0x195953(0x1ae),_0x29d7d3))(v||{});function _0x4b26(){const _0x2eb8a2=['Injector','/delete','3284292VbfTmq','bufferTime','_sessionService','setConfig','getOwnPropertyDescriptor','pluginName','length','UniverThreadCommentUIPlugin','2068533dxlbOg','getComment','forEach','YYYY/MM/DD\x20HH:mm','IConfigService','map','UNRECOGNIZED','error','comment','dataSource','/universer-api/user/list','10mQWUhZ','rangeId','delete','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','body','2202eajTbU','CustomRangeType','replies','/list','unitId','Solve','root','861212ZnlAaW','replyId','content','OpenOrReOpen','addUser','comments','commentUpdate$','parentId','find','addComment','UniverInstanceType','users','get','ThreadCommentModel','99705XRiQQP','updateComment','UserManagerService','parse','_userService','dayjs','_config','/add','createTimestamp','Add','231861wkEnkv','getCurrentUser','52fjhtjj','UNIVER_UNKNOWN','filter','symbol','Reply','_threadCommentDataSourceService','deleteComment','/reply','getMemberID','Inject','stringify','/solved','ref','HTTPService','Module','Unknown','Disposable','listComments','post','slice','format','onReady','merge','getUser','userId','_commentService','pipe','threadId','resolveComment','Plugin','solved','_initDataSource','_threadCommentDataSource','disposeWithMe','_injector','CommentService','_threadCommentModel','28839wUpWEb','_init','Edit','3575clCbFV','type','rangeType','_httpService','_initUserSync','user','56QNuauI','add','defineProperty','CollaborationSessionService','userID','Delete','COMMENT','size','onStarting','/universer-api/comment/unit/','requireSession','getUnit','Solved','UniverLicensePlugin','code','subscribe','_configService','customRanges','DependentOn'];_0x4b26=function(){return _0x2eb8a2;};return _0x4b26();}const f=_0x2691ab=>c[_0x195953(0x1d3)](new Date(+_0x2691ab))[_0x195953(0x1ee)](_0x195953(0x1ab)),R=async(_0x13f8e5,_0x60cf0c)=>{const _0xb2adb4=_0x195953,_0x39315c=_0x13f8e5['get'](c[_0xb2adb4(0x1d0)]),_0x10efcd=_0x13f8e5[_0xb2adb4(0x1cc)](P['HTTPService']);_0x60cf0c[_0xb2adb4(0x1aa)](_0xb63f72=>{const _0x2ff63f=_0xb2adb4;_0x39315c[_0x2ff63f(0x1f1)](_0xb63f72)&&_0x60cf0c[_0x2ff63f(0x1b5)](_0xb63f72);}),_0x60cf0c[_0xb2adb4(0x192)]&&(await _0x10efcd[_0xb2adb4(0x1cc)](_0xb2adb4(0x1b2),{'params':{'userIDs':[..._0x60cf0c]}}))['body'][_0xb2adb4(0x1cb)][_0xb2adb4(0x1aa)](_0x3dec73=>{const _0x1a5f02=_0xb2adb4;_0x3dec73&&_0x39315c[_0x1a5f02(0x1c4)](_0x3dec73);});};var $=Object[_0x195953(0x1a4)],E=(_0x20ec85,_0x1441ae,_0x1fe7f2,_0xafed78)=>{const _0x2dfa39=_0x195953;for(var _0x1a816a=_0xafed78>0x1?void 0x0:_0xafed78?$(_0x1441ae,_0x1fe7f2):_0x1441ae,_0x4818a0=_0x20ec85[_0x2dfa39(0x1a6)]-0x1,_0x247aa5;_0x4818a0>=0x0;_0x4818a0--)(_0x247aa5=_0x20ec85[_0x4818a0])&&(_0x1a816a=_0x247aa5(_0x1a816a)||_0x1a816a);return _0x1a816a;},S=(_0x844d26,_0x20342e)=>(_0x3971c8,_0x3e348)=>_0x20342e(_0x3971c8,_0x3e348,_0x844d26);let p=class extends c[_0x195953(0x1ea)]{constructor(_0x2a1ec3,_0x16190a,_0x217e61,_0x315970){const _0x438c57=_0x195953;super(),this[_0x438c57(0x1f3)]=_0x2a1ec3,this['_threadCommentModel']=_0x16190a,this[_0x438c57(0x1d2)]=_0x217e61,this[_0x438c57(0x1fc)]=_0x315970,this[_0x438c57(0x200)](),this[_0x438c57(0x206)]();}[_0x195953(0x206)](){const _0x4c0ff1=_0x195953;this[_0x4c0ff1(0x1fb)](this[_0x4c0ff1(0x1fe)][_0x4c0ff1(0x1c6)][_0x4c0ff1(0x1f4)](w[_0x4c0ff1(0x1a1)](0x10))[_0x4c0ff1(0x19a)](_0x31a2e9=>{const _0x1383fe=_0x4c0ff1,_0x51ad61=new Set();_0x31a2e9[_0x1383fe(0x1aa)](_0x45593d=>{const _0x12745f=_0x1383fe;switch(_0x45593d[_0x12745f(0x203)]){case _0x12745f(0x209):{const _0x31bb6c=_0x45593d['payload']['personId'];_0x51ad61['add'](_0x31bb6c);break;}}}),R(this[_0x1383fe(0x1fc)],_0x51ad61);}));}[_0x195953(0x200)](){const _0x51653d=_0x195953;this[_0x51653d(0x1fb)](this['_commentService'][_0x51653d(0x1c6)]['subscribe'](async _0x4f91ed=>{const _0x42071f=_0x51653d;var _0x2cab8a,_0x5ca273,_0x159ae7,_0x29dd1d;const _0x22eb26=(_0x2cab8a=this[_0x42071f(0x1fe)][_0x42071f(0x196)](_0x4f91ed[_0x42071f(0x1bd)])[_0x42071f(0x1c8)](_0x478c47=>_0x478c47['threadId']===_0x4f91ed[_0x42071f(0x1f5)]))==null?void 0x0:_0x2cab8a[_0x42071f(0x1bf)];if(!_0x22eb26)return;const {unitId:_0x21f4d8,subUnitId:_0x4fec5e}=_0x22eb26;switch(_0x4f91ed[_0x42071f(0x207)]&&this[_0x42071f(0x1d2)][_0x42071f(0x1c4)](_0x4f91ed[_0x42071f(0x207)]),_0x4f91ed[_0x42071f(0x203)]){case v[_0x42071f(0x1d7)]:break;case v[_0x42071f(0x1de)]:{this[_0x42071f(0x1fe)]['addComment'](_0x21f4d8,_0x4fec5e,{'unitId':_0x21f4d8,'subUnitId':_0x4fec5e,'ref':'','id':_0x4f91ed[_0x42071f(0x1c1)],'dT':f(+_0x4f91ed[_0x42071f(0x1d6)]),'threadId':_0x4f91ed[_0x42071f(0x1f5)],'personId':(_0x159ae7=(_0x5ca273=_0x4f91ed['user'])==null?void 0x0:_0x5ca273[_0x42071f(0x20c)])!=null?_0x159ae7:_0x4f91ed['userId'],'text':JSON[_0x42071f(0x1d1)](_0x4f91ed[_0x42071f(0x1c2)]),'parentId':_0x22eb26['id']});break;}case v[_0x42071f(0x190)]:{const _0x4f8827=this['_threadCommentModel'][_0x42071f(0x1a9)](_0x21f4d8,_0x4fec5e,_0x4f91ed['replyId']);_0x4f8827&&_0x4f8827[_0x42071f(0x1c7)]&&this[_0x42071f(0x1fe)][_0x42071f(0x1e0)](_0x21f4d8,_0x4fec5e,_0x4f91ed[_0x42071f(0x1c1)]);break;}case v[_0x42071f(0x201)]:{this['_threadCommentModel'][_0x42071f(0x1cf)](_0x21f4d8,_0x4fec5e,{'commentId':_0x4f91ed[_0x42071f(0x1c1)],'text':JSON[_0x42071f(0x1d1)](_0x4f91ed[_0x42071f(0x1c2)])});break;}case v[_0x42071f(0x1be)]:{const _0xa95bb3=(_0x29dd1d=this[_0x42071f(0x1fe)]['getUnit'](_0x4f91ed[_0x42071f(0x1bd)])[_0x42071f(0x1c8)](_0x16bb4d=>_0x16bb4d[_0x42071f(0x1f5)]===_0x4f91ed[_0x42071f(0x1f5)]))==null?void 0x0:_0x29dd1d[_0x42071f(0x1bf)];_0xa95bb3&&this[_0x42071f(0x1fe)][_0x42071f(0x1f6)](_0x21f4d8,_0x4fec5e,_0xa95bb3['id'],_0x4f91ed['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x195953(0x1e3)](b[_0x195953(0x1fd)])),S(0x1,c[_0x195953(0x1e3)](M[_0x195953(0x1cd)])),S(0x2,c[_0x195953(0x1e3)](c[_0x195953(0x1d0)])),S(0x3,c['Inject'](c[_0x195953(0x19e)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x195953(0x1a4)],x=(_0x31a997,_0x1439bf,_0xbe1be5,_0xb93579)=>{const _0x27a855=_0x195953;for(var _0x378a53=_0xb93579>0x1?void 0x0:_0xb93579?A(_0x1439bf,_0xbe1be5):_0x1439bf,_0x483ded=_0x31a997[_0x27a855(0x1a6)]-0x1,_0x5ae0fb;_0x483ded>=0x0;_0x483ded--)(_0x5ae0fb=_0x31a997[_0x483ded])&&(_0x378a53=_0x5ae0fb(_0x378a53)||_0x378a53);return _0x378a53;},_=(_0x29b7ff,_0x424eea)=>(_0x43ed70,_0x631168)=>_0x424eea(_0x43ed70,_0x631168,_0x29b7ff);function Y(_0x2a09be,_0x22e0e6){const _0x27bc2a=_0x195953,_0x5c482a=_0x2a09be['replies'][0x0];return{..._0x22e0e6,'id':_0x5c482a['replyId'],'resolved':_0x2a09be[_0x27bc2a(0x1f8)]===0x1,'dT':f(_0x5c482a[_0x27bc2a(0x1d6)]),'personId':_0x5c482a[_0x27bc2a(0x1f2)],'threadId':_0x5c482a['threadId']};}function G(_0x51f882,_0xde0e31,_0x4c4853){const _0x44042c=_0x195953;var _0x5245f1,_0x32f5fd;if(((_0x32f5fd=(_0x5245f1=_0x51f882==null?void 0x0:_0x51f882[_0x44042c(0x1bb)])==null?void 0x0:_0x5245f1['length'])!=null?_0x32f5fd:0x0)>0x0){const _0xf407df=(_0x1bc40f,_0x4075dc)=>({'id':_0x1bc40f[_0x44042c(0x1c1)],'threadId':_0x1bc40f[_0x44042c(0x1f5)],'dT':f(_0x1bc40f[_0x44042c(0x1d6)]),'personId':_0x1bc40f[_0x44042c(0x1f2)],'resolved':_0x51f882['solved']===I[_0x44042c(0x197)],'unitId':_0xde0e31,'subUnitId':_0x4c4853,'text':JSON[_0x44042c(0x1d1)](_0x1bc40f['content']),'parentId':_0x4075dc}),_0x2b2ba6=_0xf407df(_0x51f882[_0x44042c(0x1bb)][0x0]);return{..._0x2b2ba6,'children':_0x51f882['replies'][_0x44042c(0x1ed)](0x1)[_0x44042c(0x1ad)](_0x36b7c5=>_0xf407df(_0x36b7c5,_0x2b2ba6['id']))};}return null;}let g=class{constructor(_0x37ad56,_0x3f748b,_0x1aa908,_0x35f493){const _0xb7a2b4=_0x195953;this[_0xb7a2b4(0x205)]=_0x37ad56,this[_0xb7a2b4(0x1d2)]=_0x3f748b,this[_0xb7a2b4(0x1a2)]=_0x1aa908,this[_0xb7a2b4(0x1fc)]=_0x35f493;}async[_0x195953(0x1c9)](_0x46d1e3){const _0x3f2974=_0x195953;var _0x2bff5c,_0x5cb3d2;const {parentId:_0x4673a3,unitId:_0x30d9c2,text:_0x2c1ce2,threadId:_0x105a0f}=_0x46d1e3,_0x19d4b8=(_0x5cb3d2=(_0x2bff5c=_0x2c1ce2['customRanges'])==null?void 0x0:_0x2bff5c[_0x3f2974(0x1dc)](_0x53d85b=>_0x53d85b[_0x3f2974(0x204)]===c['CustomRangeType'][_0x3f2974(0x191)])[_0x3f2974(0x1ad)](_0x4329c6=>_0x4329c6['rangeId']))!=null?_0x5cb3d2:[],_0x123c2d=JSON[_0x3f2974(0x1e4)](_0x2c1ce2),_0x129ca3=(await this[_0x3f2974(0x1a2)][_0x3f2974(0x195)](_0x30d9c2))[_0x3f2974(0x1e2)]();if(_0x4673a3){const _0x2f9ccc={'memberId':_0x129ca3,'unitId':_0x30d9c2,'content':_0x123c2d,'mention':_0x19d4b8,'threadId':_0x105a0f},_0x325d89=(await this[_0x3f2974(0x205)]['post'](_0x3f2974(0x194)+_0x30d9c2+_0x3f2974(0x1e1),{'body':_0x2f9ccc}))[_0x3f2974(0x1b8)]['reply'];return{..._0x46d1e3,'id':_0x325d89['replyId'],'dT':c[_0x3f2974(0x1d3)](+_0x325d89[_0x3f2974(0x1d6)])[_0x3f2974(0x1ee)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x325d89[_0x3f2974(0x1f2)]};}else{const _0x36c381={'memberId':_0x129ca3,'unitId':_0x30d9c2,'content':_0x123c2d,'mention':_0x19d4b8},_0x38d647=await this[_0x3f2974(0x205)][_0x3f2974(0x1ec)](_0x3f2974(0x194)+_0x30d9c2+_0x3f2974(0x1d5),{'body':_0x36c381});return Y(_0x38d647[_0x3f2974(0x1b8)][_0x3f2974(0x1b0)],_0x46d1e3);}}async['updateComment'](_0x53ab37){const _0x1fcba9=_0x195953;var _0x25c911,_0x5a835e;const {text:_0x277a82,unitId:_0x4a39aa}=_0x53ab37,_0x1841e0=(_0x5a835e=(_0x25c911=_0x277a82[_0x1fcba9(0x19c)])==null?void 0x0:_0x25c911[_0x1fcba9(0x1dc)](_0x49d437=>_0x49d437['rangeType']===c[_0x1fcba9(0x1ba)][_0x1fcba9(0x191)])[_0x1fcba9(0x1ad)](_0x443dad=>_0x443dad[_0x1fcba9(0x1b4)]))!=null?_0x5a835e:[],_0x5925c4=JSON[_0x1fcba9(0x1e4)](_0x277a82),_0x4d1628=_0x53ab37[_0x1fcba9(0x1f5)],_0x437ce7=_0x53ab37['id'],_0x3a1db1={'memberId':(await this[_0x1fcba9(0x1a2)]['requireSession'](_0x4a39aa))[_0x1fcba9(0x1e2)](),'unitId':_0x4a39aa,'threadId':_0x4d1628,'mention':_0x1841e0,'content':_0x5925c4,'replyId':_0x437ce7},_0x2c4b2f=await this[_0x1fcba9(0x205)]['post'](_0x1fcba9(0x194)+_0x4a39aa+'/edit',{'body':_0x3a1db1});return!_0x2c4b2f['body'][_0x1fcba9(0x1af)]||_0x2c4b2f[_0x1fcba9(0x1b8)][_0x1fcba9(0x1af)][_0x1fcba9(0x199)]===0x1;}async[_0x195953(0x1f6)](_0x43884e){const _0x38d02d=_0x195953,{unitId:_0x3225cf}=_0x43884e,_0x4b2766=_0x43884e[_0x38d02d(0x1f5)],_0x4ec085={'memberId':this[_0x38d02d(0x1d2)][_0x38d02d(0x1d9)]()[_0x38d02d(0x20c)],'unitId':_0x3225cf,'threadId':_0x4b2766,'solved':_0x43884e['resolved']?I[_0x38d02d(0x197)]:I[_0x38d02d(0x1c3)]},_0x54121b=await this[_0x38d02d(0x205)][_0x38d02d(0x1ec)](_0x38d02d(0x194)+_0x3225cf+_0x38d02d(0x1e5),{'body':_0x4ec085});return!_0x54121b['body'][_0x38d02d(0x1af)]||_0x54121b[_0x38d02d(0x1b8)]['error'][_0x38d02d(0x199)]===0x1;}async[_0x195953(0x1e0)](_0xf3f726,_0x31982b,_0x34b8c2,_0x371cf4){const _0x1e443c=_0x195953,_0x49107d={'memberId':(await this['_sessionService'][_0x1e443c(0x195)](_0xf3f726))[_0x1e443c(0x1e2)](),'threadId':_0x34b8c2,'replyId':_0x371cf4,'unitId':_0xf3f726},_0x484c6f=await this[_0x1e443c(0x205)]['post'](_0x1e443c(0x194)+_0xf3f726+_0x1e443c(0x19f),{'body':_0x49107d});return!_0x484c6f[_0x1e443c(0x1b8)][_0x1e443c(0x1af)]||_0x484c6f[_0x1e443c(0x1b8)]['error'][_0x1e443c(0x199)]===0x1;}async[_0x195953(0x1eb)](_0x1d7543,_0x4d04a3,_0x326f65){const _0x54c89e=_0x195953,_0x364f7a={'unitId':_0x1d7543,'threadId':_0x326f65},_0x32bc13=await this['_httpService'][_0x54c89e(0x1ec)](_0x54c89e(0x194)+_0x1d7543+_0x54c89e(0x1bc),{'body':_0x364f7a}),_0x504352=_0x326f65['map'](_0x55ff6c=>G(_0x32bc13[_0x54c89e(0x1b8)][_0x54c89e(0x1c5)][_0x55ff6c],_0x1d7543,_0x4d04a3))['filter'](Boolean);return Object['values'](_0x32bc13[_0x54c89e(0x1b8)][_0x54c89e(0x1cb)])[_0x54c89e(0x1aa)](_0x6a383a=>{const _0xd3946a=_0x54c89e;this[_0xd3946a(0x1d2)][_0xd3946a(0x1c4)](_0x6a383a);}),_0x504352;}['saveCommentToSnapshot'](_0x1c5fb7){const _0x52d065=_0x195953;return{'id':_0x1c5fb7['id'],'threadId':_0x1c5fb7['threadId'],'ref':_0x1c5fb7[_0x52d065(0x1e6)]};}};g=x([_(0x0,c[_0x195953(0x1e3)](P[_0x195953(0x1e7)])),_(0x1,c[_0x195953(0x1e3)](c[_0x195953(0x1d0)])),_(0x2,c[_0x195953(0x1e3)](b[_0x195953(0x20b)])),_(0x3,c[_0x195953(0x1e3)](c[_0x195953(0x19e)]))],g);var H=Object[_0x195953(0x1a4)],J=(_0x4925fa,_0x1627dd,_0xf7a819,_0x23136e)=>{const _0x57ce69=_0x195953;for(var _0x2ae7e8=_0x23136e>0x1?void 0x0:_0x23136e?H(_0x1627dd,_0xf7a819):_0x1627dd,_0x5d28a5=_0x4925fa[_0x57ce69(0x1a6)]-0x1,_0xbd4083;_0x5d28a5>=0x0;_0x5d28a5--)(_0xbd4083=_0x4925fa[_0x5d28a5])&&(_0x2ae7e8=_0xbd4083(_0x2ae7e8)||_0x2ae7e8);return _0x2ae7e8;},y=(_0x2b5d35,_0x13f846)=>(_0x1d4929,_0x54533e)=>_0x13f846(_0x1d4929,_0x54533e,_0x2b5d35);let C=class extends c['Disposable']{constructor(_0x3e6e03,_0x4c802e){const _0x491513=_0x195953;super(),this['_threadCommentDataSourceService']=_0x3e6e03,this[_0x491513(0x1fa)]=_0x4c802e,this[_0x491513(0x1f9)]();}[_0x195953(0x1f9)](){const _0x206905=_0x195953;this[_0x206905(0x1df)][_0x206905(0x1b1)]=this[_0x206905(0x1fa)],this[_0x206905(0x1df)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x195953(0x1e3)](g))],C);var F=Object[_0x195953(0x20a)],L=Object['getOwnPropertyDescriptor'],Z=(_0x32d44a,_0x4db2eb,_0x1b1f84)=>_0x4db2eb in _0x32d44a?F(_0x32d44a,_0x4db2eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b1f84}):_0x32d44a[_0x4db2eb]=_0x1b1f84,W=(_0x400c00,_0x5d3bbc,_0x523c6a,_0x2c4bf7)=>{const _0x3a8afa=_0x195953;for(var _0x40bb74=_0x2c4bf7>0x1?void 0x0:_0x2c4bf7?L(_0x5d3bbc,_0x523c6a):_0x5d3bbc,_0x3fd1a8=_0x400c00[_0x3a8afa(0x1a6)]-0x1,_0x4ca5be;_0x3fd1a8>=0x0;_0x3fd1a8--)(_0x4ca5be=_0x400c00[_0x3fd1a8])&&(_0x40bb74=_0x4ca5be(_0x40bb74)||_0x40bb74);return _0x40bb74;},O=(_0x409c03,_0x3df80f)=>(_0x4902e1,_0x5942d7)=>_0x3df80f(_0x4902e1,_0x5942d7,_0x409c03),N=(_0x352c32,_0x236213,_0x498b31)=>Z(_0x352c32,typeof _0x236213!=_0x195953(0x1dd)?_0x236213+'':_0x236213,_0x498b31);function _0x148b(_0x3e74f9,_0x53e011){const _0x4b26cd=_0x4b26();return _0x148b=function(_0x148b9c,_0x3824fb){_0x148b9c=_0x148b9c-0x190;let _0x250d7c=_0x4b26cd[_0x148b9c];return _0x250d7c;},_0x148b(_0x3e74f9,_0x53e011);}exports[_0x195953(0x1b7)]=class extends c[_0x195953(0x1f7)]{constructor(_0x15aacc=D,_0x23c046,_0xfec4a9){const _0x1a7141=_0x195953;super(),this[_0x1a7141(0x1d4)]=_0x15aacc,this[_0x1a7141(0x1fc)]=_0x23c046,this[_0x1a7141(0x19b)]=_0xfec4a9;const {..._0x2030a8}=c[_0x1a7141(0x1f0)]({},D,this[_0x1a7141(0x1d4)]);this[_0x1a7141(0x19b)][_0x1a7141(0x1a3)](q,_0x2030a8);}[_0x195953(0x193)](){const _0x24a5a0=_0x195953;[[g],[C],[p]][_0x24a5a0(0x1aa)](_0x15a7e5=>{const _0x173c5b=_0x24a5a0;this['_injector'][_0x173c5b(0x209)](_0x15a7e5);});}[_0x195953(0x1ef)](){const _0x5290e3=_0x195953;this['_injector'][_0x5290e3(0x1cc)](C),this[_0x5290e3(0x1fc)][_0x5290e3(0x1cc)](p);}},N(exports[_0x195953(0x1b7)],_0x195953(0x1a5),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x195953(0x203),c[_0x195953(0x1ca)][_0x195953(0x1db)]),exports[_0x195953(0x1b7)]=W([c[_0x195953(0x19d)](j[_0x195953(0x1a7)],b[_0x195953(0x1b6)],T[_0x195953(0x198)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x195953(0x1ac)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x890958=_0x417b;(function(_0x44e61a,_0x5f33ff){const _0x36b721=_0x417b,_0x5d30af=_0x44e61a();while(!![]){try{const _0x3a3860=parseInt(_0x36b721(0x162))/0x1+parseInt(_0x36b721(0x1ae))/0x2+-parseInt(_0x36b721(0x174))/0x3+parseInt(_0x36b721(0x19e))/0x4+parseInt(_0x36b721(0x190))/0x5*(-parseInt(_0x36b721(0x170))/0x6)+-parseInt(_0x36b721(0x16f))/0x7*(-parseInt(_0x36b721(0x148))/0x8)+-parseInt(_0x36b721(0x19a))/0x9;if(_0x3a3860===_0x5f33ff)break;else _0x5d30af['push'](_0x5d30af['shift']());}catch(_0x1df6a1){_0x5d30af['push'](_0x5d30af['shift']());}}}(_0xdf44,0x2b859));function _0x417b(_0x264f03,_0x1df089){const _0xdf443=_0xdf44();return _0x417b=function(_0x417b1c,_0x3b5e43){_0x417b1c=_0x417b1c-0x142;let _0x1bc91f=_0xdf443[_0x417b1c];return _0x1bc91f;},_0x417b(_0x264f03,_0x1df089);}Object[_0x890958(0x156)](exports,Symbol[_0x890958(0x164)],{'value':_0x890958(0x194)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5355ab=>(_0x5355ab[_0x5355ab[_0x890958(0x15b)]=0x0]=_0x890958(0x15b),_0x5355ab[_0x5355ab['Solved']=0x1]=_0x890958(0x1b7),_0x5355ab[_0x5355ab['UNRECOGNIZED']=-0x1]=_0x890958(0x1b3),_0x5355ab))(I||{}),v=(_0x4a69ec=>(_0x4a69ec[_0x4a69ec['Unknown']=0x0]=_0x890958(0x15c),_0x4a69ec[_0x4a69ec[_0x890958(0x15e)]=0x1]='Add',_0x4a69ec[_0x4a69ec[_0x890958(0x14d)]=0x2]=_0x890958(0x14d),_0x4a69ec[_0x4a69ec['Edit']=0x3]=_0x890958(0x152),_0x4a69ec[_0x4a69ec[_0x890958(0x15a)]=0x4]=_0x890958(0x15a),_0x4a69ec[_0x4a69ec[_0x890958(0x18c)]=0x5]='Solve',_0x4a69ec[_0x4a69ec[_0x890958(0x1b3)]=-0x1]=_0x890958(0x1b3),_0x4a69ec))(v||{});const f=_0x3e90b0=>c[_0x890958(0x1ab)](new Date(+_0x3e90b0))['format'](_0x890958(0x1a0)),R=async(_0x319305,_0x237818)=>{const _0x5b5677=_0x890958,_0x55d863=_0x319305['get'](c[_0x5b5677(0x160)]),_0x5f234f=_0x319305['get'](P[_0x5b5677(0x165)]);_0x237818[_0x5b5677(0x1ba)](_0x5042cd=>{const _0x1e5a68=_0x5b5677;_0x55d863[_0x1e5a68(0x178)](_0x5042cd)&&_0x237818[_0x1e5a68(0x1a1)](_0x5042cd);}),_0x237818[_0x5b5677(0x14b)]&&(await _0x5f234f[_0x5b5677(0x197)](_0x5b5677(0x1a3),{'params':{'userIDs':[..._0x237818]}}))[_0x5b5677(0x19d)]['users'][_0x5b5677(0x1ba)](_0x20b485=>{_0x20b485&&_0x55d863['addUser'](_0x20b485);});};var $=Object[_0x890958(0x1b5)],E=(_0x3b39ff,_0xee7aff,_0x58b200,_0x14888e)=>{const _0xd51139=_0x890958;for(var _0x1c2bd2=_0x14888e>0x1?void 0x0:_0x14888e?$(_0xee7aff,_0x58b200):_0xee7aff,_0x1b5f7c=_0x3b39ff[_0xd51139(0x15d)]-0x1,_0x117af0;_0x1b5f7c>=0x0;_0x1b5f7c--)(_0x117af0=_0x3b39ff[_0x1b5f7c])&&(_0x1c2bd2=_0x117af0(_0x1c2bd2)||_0x1c2bd2);return _0x1c2bd2;},S=(_0x278449,_0x4a1ede)=>(_0x5a6097,_0x57d322)=>_0x4a1ede(_0x5a6097,_0x57d322,_0x278449);let p=class extends c['Disposable']{constructor(_0x2ce659,_0x1b6646,_0x871be9,_0x49cb2a){const _0x3c19e1=_0x890958;super(),this[_0x3c19e1(0x158)]=_0x2ce659,this[_0x3c19e1(0x146)]=_0x1b6646,this['_userService']=_0x871be9,this['_injector']=_0x49cb2a,this[_0x3c19e1(0x142)](),this['_initUserSync']();}[_0x890958(0x145)](){const _0xcf502d=_0x890958;this[_0xcf502d(0x1af)](this['_threadCommentModel']['commentUpdate$'][_0xcf502d(0x143)](w['bufferTime'](0x10))[_0xcf502d(0x182)](_0xceb536=>{const _0x472d5e=_0xcf502d,_0x1635f1=new Set();_0xceb536[_0x472d5e(0x1ba)](_0x4eafe4=>{const _0x159813=_0x472d5e;switch(_0x4eafe4[_0x159813(0x161)]){case _0x159813(0x181):{const _0x344f88=_0x4eafe4[_0x159813(0x176)]['personId'];_0x1635f1[_0x159813(0x181)](_0x344f88);break;}}}),R(this['_injector'],_0x1635f1);}));}['_init'](){const _0x12a772=_0x890958;this['disposeWithMe'](this[_0x12a772(0x158)][_0x12a772(0x1b0)][_0x12a772(0x182)](async _0x2cfcf1=>{const _0x47a79a=_0x12a772;var _0x5c749f,_0x542354,_0x12557e,_0x2e86de;const _0x2fecf8=(_0x5c749f=this['_threadCommentModel'][_0x47a79a(0x172)](_0x2cfcf1[_0x47a79a(0x187)])[_0x47a79a(0x177)](_0x204f12=>_0x204f12[_0x47a79a(0x17f)]===_0x2cfcf1[_0x47a79a(0x17f)]))==null?void 0x0:_0x5c749f[_0x47a79a(0x16b)];if(!_0x2fecf8)return;const {unitId:_0x500a45,subUnitId:_0x38ae18}=_0x2fecf8;switch(_0x2cfcf1[_0x47a79a(0x1b8)]&&this['_userService'][_0x47a79a(0x19b)](_0x2cfcf1[_0x47a79a(0x1b8)]),_0x2cfcf1[_0x47a79a(0x161)]){case v[_0x47a79a(0x15e)]:break;case v['Reply']:{this['_threadCommentModel'][_0x47a79a(0x171)](_0x500a45,_0x38ae18,{'unitId':_0x500a45,'subUnitId':_0x38ae18,'ref':'','id':_0x2cfcf1[_0x47a79a(0x179)],'dT':f(+_0x2cfcf1[_0x47a79a(0x150)]),'threadId':_0x2cfcf1['threadId'],'personId':(_0x12557e=(_0x542354=_0x2cfcf1['user'])==null?void 0x0:_0x542354[_0x47a79a(0x1a4)])!=null?_0x12557e:_0x2cfcf1[_0x47a79a(0x16a)],'text':JSON['parse'](_0x2cfcf1['content']),'parentId':_0x2fecf8['id']});break;}case v[_0x47a79a(0x15a)]:{const _0x147814=this[_0x47a79a(0x146)][_0x47a79a(0x151)](_0x500a45,_0x38ae18,_0x2cfcf1[_0x47a79a(0x179)]);_0x147814&&_0x147814['parentId']&&this[_0x47a79a(0x146)]['deleteComment'](_0x500a45,_0x38ae18,_0x2cfcf1[_0x47a79a(0x179)]);break;}case v[_0x47a79a(0x152)]:{this[_0x47a79a(0x146)]['updateComment'](_0x500a45,_0x38ae18,{'commentId':_0x2cfcf1[_0x47a79a(0x179)],'text':JSON['parse'](_0x2cfcf1['content'])});break;}case v[_0x47a79a(0x18c)]:{const _0x18ab0a=(_0x2e86de=this[_0x47a79a(0x146)][_0x47a79a(0x172)](_0x2cfcf1[_0x47a79a(0x187)])[_0x47a79a(0x177)](_0x474270=>_0x474270[_0x47a79a(0x17f)]===_0x2cfcf1[_0x47a79a(0x17f)]))==null?void 0x0:_0x2e86de['root'];_0x18ab0a&&this[_0x47a79a(0x146)][_0x47a79a(0x175)](_0x500a45,_0x38ae18,_0x18ab0a['id'],_0x2cfcf1[_0x47a79a(0x199)]===I[_0x47a79a(0x1b7)]);break;}}}));}};p=E([S(0x0,c[_0x890958(0x184)](b[_0x890958(0x16c)])),S(0x1,c[_0x890958(0x184)](M['ThreadCommentModel'])),S(0x2,c[_0x890958(0x184)](c[_0x890958(0x160)])),S(0x3,c['Inject'](c[_0x890958(0x18a)]))],p);const q=_0x890958(0x17c),D={};var A=Object[_0x890958(0x1b5)],x=(_0x53dd59,_0x36a0ad,_0x459d2e,_0x49fb4b)=>{for(var _0x281e54=_0x49fb4b>0x1?void 0x0:_0x49fb4b?A(_0x36a0ad,_0x459d2e):_0x36a0ad,_0x3e1478=_0x53dd59['length']-0x1,_0x3ab942;_0x3e1478>=0x0;_0x3e1478--)(_0x3ab942=_0x53dd59[_0x3e1478])&&(_0x281e54=_0x3ab942(_0x281e54)||_0x281e54);return _0x281e54;},_=(_0x21f623,_0x17304c)=>(_0x41d446,_0xb024c3)=>_0x17304c(_0x41d446,_0xb024c3,_0x21f623);function Y(_0xc2402f,_0x34f536){const _0x28cc23=_0x890958,_0x2a3a67=_0xc2402f[_0x28cc23(0x17e)][0x0];return{..._0x34f536,'id':_0x2a3a67[_0x28cc23(0x179)],'resolved':_0xc2402f[_0x28cc23(0x199)]===0x1,'dT':f(_0x2a3a67[_0x28cc23(0x150)]),'personId':_0x2a3a67['userId'],'threadId':_0x2a3a67[_0x28cc23(0x17f)]};}function G(_0x226c30,_0x5f2f2c,_0x3443e1){const _0x50c32e=_0x890958;var _0x1919b7,_0x2eee68;if(((_0x2eee68=(_0x1919b7=_0x226c30==null?void 0x0:_0x226c30[_0x50c32e(0x17e)])==null?void 0x0:_0x1919b7[_0x50c32e(0x15d)])!=null?_0x2eee68:0x0)>0x0){const _0x352d10=(_0x44b6e2,_0xb1e77e)=>({'id':_0x44b6e2[_0x50c32e(0x179)],'threadId':_0x44b6e2[_0x50c32e(0x17f)],'dT':f(_0x44b6e2['createTimestamp']),'personId':_0x44b6e2[_0x50c32e(0x16a)],'resolved':_0x226c30['solved']===I[_0x50c32e(0x1b7)],'unitId':_0x5f2f2c,'subUnitId':_0x3443e1,'text':JSON[_0x50c32e(0x16e)](_0x44b6e2[_0x50c32e(0x195)]),'parentId':_0xb1e77e}),_0x45ca8f=_0x352d10(_0x226c30[_0x50c32e(0x17e)][0x0]);return{..._0x45ca8f,'children':_0x226c30['replies'][_0x50c32e(0x1a6)](0x1)[_0x50c32e(0x183)](_0x460808=>_0x352d10(_0x460808,_0x45ca8f['id']))};}return null;}let g=class{constructor(_0x3f9716,_0x55c54b,_0x2b4b1f,_0x15161d){const _0x4dc0aa=_0x890958;this[_0x4dc0aa(0x18b)]=_0x3f9716,this['_userService']=_0x55c54b,this[_0x4dc0aa(0x196)]=_0x2b4b1f,this[_0x4dc0aa(0x192)]=_0x15161d;}async[_0x890958(0x171)](_0x1b5ca8){const _0x464cfe=_0x890958;var _0x25e19d,_0x34f889;const {parentId:_0x207732,unitId:_0x450b05,text:_0x196328,threadId:_0x355fd8}=_0x1b5ca8,_0x52aef1=(_0x34f889=(_0x25e19d=_0x196328[_0x464cfe(0x1b9)])==null?void 0x0:_0x25e19d[_0x464cfe(0x163)](_0xc5ee7=>_0xc5ee7[_0x464cfe(0x14c)]===c['CustomRangeType'][_0x464cfe(0x153)])['map'](_0xa046ce=>_0xa046ce[_0x464cfe(0x1b2)]))!=null?_0x34f889:[],_0x631f66=JSON[_0x464cfe(0x1bb)](_0x196328),_0x411a7a=(await this['_sessionService'][_0x464cfe(0x19f)](_0x450b05))['getMemberID']();if(_0x207732){const _0x56e696={'memberId':_0x411a7a,'unitId':_0x450b05,'content':_0x631f66,'mention':_0x52aef1,'threadId':_0x355fd8},_0x926433=(await this[_0x464cfe(0x18b)]['post'](_0x464cfe(0x186)+_0x450b05+_0x464cfe(0x144),{'body':_0x56e696}))[_0x464cfe(0x19d)][_0x464cfe(0x18d)];return{..._0x1b5ca8,'id':_0x926433[_0x464cfe(0x179)],'dT':c[_0x464cfe(0x1ab)](+_0x926433[_0x464cfe(0x150)])[_0x464cfe(0x18f)](_0x464cfe(0x1a0)),'personId':_0x926433[_0x464cfe(0x16a)]};}else{const _0xf9b030={'memberId':_0x411a7a,'unitId':_0x450b05,'content':_0x631f66,'mention':_0x52aef1},_0x43f38d=await this['_httpService'][_0x464cfe(0x173)](_0x464cfe(0x186)+_0x450b05+'/add',{'body':_0xf9b030});return Y(_0x43f38d[_0x464cfe(0x19d)][_0x464cfe(0x1a2)],_0x1b5ca8);}}async[_0x890958(0x15f)](_0x3edcfc){const _0x4011d6=_0x890958;var _0x5c7eb1,_0x54b951;const {text:_0x1764d2,unitId:_0x33dbe4}=_0x3edcfc,_0x31756e=(_0x54b951=(_0x5c7eb1=_0x1764d2['customRanges'])==null?void 0x0:_0x5c7eb1[_0x4011d6(0x163)](_0x3da741=>_0x3da741[_0x4011d6(0x14c)]===c[_0x4011d6(0x149)][_0x4011d6(0x153)])[_0x4011d6(0x183)](_0x23c317=>_0x23c317[_0x4011d6(0x1b2)]))!=null?_0x54b951:[],_0x38187c=JSON[_0x4011d6(0x1bb)](_0x1764d2),_0x2c7717=_0x3edcfc['threadId'],_0x1a61ad=_0x3edcfc['id'],_0x5d9d8a={'memberId':(await this[_0x4011d6(0x196)][_0x4011d6(0x19f)](_0x33dbe4))[_0x4011d6(0x157)](),'unitId':_0x33dbe4,'threadId':_0x2c7717,'mention':_0x31756e,'content':_0x38187c,'replyId':_0x1a61ad},_0x52ad01=await this['_httpService'][_0x4011d6(0x173)]('/universer-api/comment/unit/'+_0x33dbe4+'/edit',{'body':_0x5d9d8a});return!_0x52ad01[_0x4011d6(0x19d)][_0x4011d6(0x14f)]||_0x52ad01[_0x4011d6(0x19d)][_0x4011d6(0x14f)][_0x4011d6(0x1ad)]===0x1;}async[_0x890958(0x175)](_0x20c641){const _0x4d724d=_0x890958,{unitId:_0x3740a1}=_0x20c641,_0x4e4e28=_0x20c641['threadId'],_0x24b838={'memberId':this['_userService'][_0x4d724d(0x14e)]()[_0x4d724d(0x1a4)],'unitId':_0x3740a1,'threadId':_0x4e4e28,'solved':_0x20c641[_0x4d724d(0x17d)]?I['Solved']:I['OpenOrReOpen']},_0x5812e3=await this[_0x4d724d(0x18b)][_0x4d724d(0x173)]('/universer-api/comment/unit/'+_0x3740a1+_0x4d724d(0x188),{'body':_0x24b838});return!_0x5812e3[_0x4d724d(0x19d)][_0x4d724d(0x14f)]||_0x5812e3[_0x4d724d(0x19d)][_0x4d724d(0x14f)][_0x4d724d(0x1ad)]===0x1;}async[_0x890958(0x180)](_0x576a25,_0x3acbbe,_0x2f7f44,_0x34c115){const _0x1291eb=_0x890958,_0x262ce3={'memberId':(await this['_sessionService'][_0x1291eb(0x19f)](_0x576a25))[_0x1291eb(0x157)](),'threadId':_0x2f7f44,'replyId':_0x34c115,'unitId':_0x576a25},_0x1fbaf5=await this['_httpService']['post'](_0x1291eb(0x186)+_0x576a25+_0x1291eb(0x17a),{'body':_0x262ce3});return!_0x1fbaf5['body'][_0x1291eb(0x14f)]||_0x1fbaf5['body']['error']['code']===0x1;}async['listComments'](_0x327767,_0x33d3e6,_0x37534e){const _0x2bd181=_0x890958,_0x3dd4fe={'unitId':_0x327767,'threadId':_0x37534e},_0x4eab4c=await this['_httpService'][_0x2bd181(0x173)]('/universer-api/comment/unit/'+_0x327767+_0x2bd181(0x1ac),{'body':_0x3dd4fe}),_0x557235=_0x37534e['map'](_0xe9752=>G(_0x4eab4c[_0x2bd181(0x19d)][_0x2bd181(0x1b4)][_0xe9752],_0x327767,_0x33d3e6))[_0x2bd181(0x163)](Boolean);return Object[_0x2bd181(0x166)](_0x4eab4c[_0x2bd181(0x19d)][_0x2bd181(0x17b)])['forEach'](_0x2379ea=>{const _0x2e57c7=_0x2bd181;this[_0x2e57c7(0x18e)][_0x2e57c7(0x19b)](_0x2379ea);}),_0x557235;}[_0x890958(0x198)](_0x582861){const _0x118b46=_0x890958;return{'id':_0x582861['id'],'threadId':_0x582861[_0x118b46(0x17f)],'ref':_0x582861[_0x118b46(0x1a9)]};}};g=x([_(0x0,c[_0x890958(0x184)](P[_0x890958(0x165)])),_(0x1,c['Inject'](c[_0x890958(0x160)])),_(0x2,c[_0x890958(0x184)](b[_0x890958(0x1a8)])),_(0x3,c[_0x890958(0x184)](c[_0x890958(0x18a)]))],g);var H=Object[_0x890958(0x1b5)],J=(_0x5506f4,_0x1be645,_0x2d1eb7,_0x233eb6)=>{const _0x560946=_0x890958;for(var _0x3d44cc=_0x233eb6>0x1?void 0x0:_0x233eb6?H(_0x1be645,_0x2d1eb7):_0x1be645,_0x24f273=_0x5506f4[_0x560946(0x15d)]-0x1,_0xe9da49;_0x24f273>=0x0;_0x24f273--)(_0xe9da49=_0x5506f4[_0x24f273])&&(_0x3d44cc=_0xe9da49(_0x3d44cc)||_0x3d44cc);return _0x3d44cc;},y=(_0x11d915,_0x4ae6e4)=>(_0x2dd823,_0x37abf5)=>_0x4ae6e4(_0x2dd823,_0x37abf5,_0x11d915);let C=class extends c[_0x890958(0x191)]{constructor(_0xdf97d1,_0x1de124){const _0x1e70f1=_0x890958;super(),this[_0x1e70f1(0x14a)]=_0xdf97d1,this['_threadCommentDataSource']=_0x1de124,this['_initDataSource']();}[_0x890958(0x185)](){const _0x48dfee=_0x890958;this[_0x48dfee(0x14a)]['dataSource']=this[_0x48dfee(0x1b1)],this[_0x48dfee(0x14a)][_0x48dfee(0x147)]=!0x1;}};C=J([y(0x0,M[_0x890958(0x169)]),y(0x1,c[_0x890958(0x184)](g))],C);function _0xdf44(){const _0x33517e=['/universer-api/comment/unit/','unitId','/solved','UniverThreadCommentUIPlugin','Injector','_httpService','Solve','reply','_userService','format','42145BizHem','Disposable','_injector','setConfig','Module','content','_sessionService','get','saveCommentToSnapshot','solved','2109969wJqxWR','addUser','_config','body','307940BaLVtc','requireSession','YYYY/MM/DD\x20HH:mm','delete','comment','/universer-api/user/list','userID','UniverThreadCommentDataSourcePlugin','slice','DependentOn','CollaborationSessionService','ref','UNIVER_UNKNOWN','dayjs','/list','code','68742UBPzLJ','disposeWithMe','commentUpdate$','_threadCommentDataSource','rangeId','UNRECOGNIZED','comments','getOwnPropertyDescriptor','UniverInstanceType','Solved','user','customRanges','forEach','stringify','_init','pipe','/reply','_initUserSync','_threadCommentModel','syncUpdateMutationToColla','26472xZAbvz','CustomRangeType','_threadCommentDataSourceService','size','rangeType','Reply','getCurrentUser','error','createTimestamp','getComment','Edit','COMMENT','merge','Plugin','defineProperty','getMemberID','_commentService','_configService','Delete','OpenOrReOpen','Unknown','length','Add','updateComment','UserManagerService','type','149658RPWZCA','filter','toStringTag','HTTPService','values','IConfigService','symbol','IThreadCommentDataSourceService','userId','root','CommentService','UniverLicensePlugin','parse','630AkqPSQ','12PBEqBZ','addComment','getUnit','post','387780TiQXbL','resolveComment','payload','find','getUser','replyId','/delete','users','thread-comment-data-source.config','resolved','replies','threadId','deleteComment','add','subscribe','map','Inject','_initDataSource'];_0xdf44=function(){return _0x33517e;};return _0xdf44();}var F=Object[_0x890958(0x156)],L=Object[_0x890958(0x1b5)],Z=(_0x120979,_0x27f50c,_0x165d2d)=>_0x27f50c in _0x120979?F(_0x120979,_0x27f50c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165d2d}):_0x120979[_0x27f50c]=_0x165d2d,W=(_0x46e418,_0x5052aa,_0x4061f9,_0x293215)=>{const _0x3dc0d9=_0x890958;for(var _0x891663=_0x293215>0x1?void 0x0:_0x293215?L(_0x5052aa,_0x4061f9):_0x5052aa,_0x29d688=_0x46e418[_0x3dc0d9(0x15d)]-0x1,_0x5a072b;_0x29d688>=0x0;_0x29d688--)(_0x5a072b=_0x46e418[_0x29d688])&&(_0x891663=_0x5a072b(_0x891663)||_0x891663);return _0x891663;},O=(_0x1dda03,_0x5407e4)=>(_0x5a4fee,_0x53b60e)=>_0x5407e4(_0x5a4fee,_0x53b60e,_0x1dda03),N=(_0x5ea4e4,_0x833d8e,_0x25bf42)=>Z(_0x5ea4e4,typeof _0x833d8e!=_0x890958(0x168)?_0x833d8e+'':_0x833d8e,_0x25bf42);exports[_0x890958(0x1a5)]=class extends c[_0x890958(0x155)]{constructor(_0x22b6de=D,_0x1556fe,_0x551ea6){const _0x3a9ced=_0x890958;super(),this['_config']=_0x22b6de,this[_0x3a9ced(0x192)]=_0x1556fe,this['_configService']=_0x551ea6;const {..._0x156a68}=c[_0x3a9ced(0x154)]({},D,this[_0x3a9ced(0x19c)]);this[_0x3a9ced(0x159)][_0x3a9ced(0x193)](q,_0x156a68);}['onStarting'](){const _0x3d513b=_0x890958;[[g],[C],[p]][_0x3d513b(0x1ba)](_0x1d4a67=>{const _0x168edb=_0x3d513b;this[_0x168edb(0x192)][_0x168edb(0x181)](_0x1d4a67);});}['onReady'](){const _0x515ea4=_0x890958;this[_0x515ea4(0x192)][_0x515ea4(0x197)](C),this[_0x515ea4(0x192)]['get'](p);}},N(exports[_0x890958(0x1a5)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x890958(0x161),c[_0x890958(0x1b6)][_0x890958(0x1aa)]),exports[_0x890958(0x1a5)]=W([c[_0x890958(0x1a7)](j[_0x890958(0x189)],b['UniverCollaborationClientPlugin'],T[_0x890958(0x16d)]),O(0x1,c[_0x890958(0x184)](c[_0x890958(0x18a)])),O(0x2,c[_0x890958(0x167)])],exports[_0x890958(0x1a5)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5c421f=_0x1758;(function(_0x1680e2,_0x1343b6){const _0x1addc4=_0x1758,_0x39a2ac=_0x1680e2();while(!![]){try{const _0x51c933=parseInt(_0x1addc4(0x159))/0x1+-parseInt(_0x1addc4(0x145))/0x2+parseInt(_0x1addc4(0x137))/0x3*(parseInt(_0x1addc4(0x140))/0x4)+-parseInt(_0x1addc4(0x16e))/0x5*(-parseInt(_0x1addc4(0x117))/0x6)+-parseInt(_0x1addc4(0x121))/0x7+parseInt(_0x1addc4(0x153))/0x8*(-parseInt(_0x1addc4(0x116))/0x9)+-parseInt(_0x1addc4(0x14a))/0xa*(-parseInt(_0x1addc4(0x138))/0xb);if(_0x51c933===_0x1343b6)break;else _0x39a2ac['push'](_0x39a2ac['shift']());}catch(_0x4d5d77){_0x39a2ac['push'](_0x39a2ac['shift']());}}}(_0x1281,0x4f785));import{CommentService as _0x11b4f2,CollaborationSessionService as _0x3ff02a,UniverCollaborationClientPlugin as _0x204479}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4310b8}from'@univerjs-pro/license';import{dayjs as _0x4b8426,UserManagerService as _0x29b248,Inject as _0x4be273,Injector as _0x471303,Disposable as _0x51392c,CustomRangeType as _0x4776d5,UniverInstanceType as _0x526006,DependentOn as _0x841586,IConfigService as _0x476c9d,Plugin as _0x2f61a2,merge as _0x59e4de}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xcc5e7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xe551d2,IThreadCommentDataSourceService as _0x153cf3}from'@univerjs/thread-comment';import{bufferTime as _0x150afd}from'rxjs';import{HTTPService as _0x4a8660}from'@univerjs/network';const W=_0x5c421f(0x164);var I=(_0x4e2bd0=>(_0x4e2bd0[_0x4e2bd0[_0x5c421f(0x15a)]=0x0]=_0x5c421f(0x15a),_0x4e2bd0[_0x4e2bd0[_0x5c421f(0x144)]=0x1]='Solved',_0x4e2bd0[_0x4e2bd0[_0x5c421f(0x16b)]=-0x1]=_0x5c421f(0x16b),_0x4e2bd0))(I||{}),v=(_0x1602ab=>(_0x1602ab[_0x1602ab[_0x5c421f(0x110)]=0x0]=_0x5c421f(0x110),_0x1602ab[_0x1602ab[_0x5c421f(0x16f)]=0x1]=_0x5c421f(0x16f),_0x1602ab[_0x1602ab['Reply']=0x2]='Reply',_0x1602ab[_0x1602ab[_0x5c421f(0x112)]=0x3]='Edit',_0x1602ab[_0x1602ab[_0x5c421f(0x119)]=0x4]=_0x5c421f(0x119),_0x1602ab[_0x1602ab[_0x5c421f(0x131)]=0x5]=_0x5c421f(0x131),_0x1602ab[_0x1602ab[_0x5c421f(0x16b)]=-0x1]=_0x5c421f(0x16b),_0x1602ab))(v||{});const D=_0x2634d3=>_0x4b8426(new Date(+_0x2634d3))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4abd6c,_0x4d6136)=>{const _0x1a64c6=_0x5c421f,_0x27b940=_0x4abd6c[_0x1a64c6(0x13c)](_0x29b248),_0x363965=_0x4abd6c[_0x1a64c6(0x13c)](_0x4a8660);_0x4d6136['forEach'](_0x447287=>{const _0x33fcd0=_0x1a64c6;_0x27b940[_0x33fcd0(0x154)](_0x447287)&&_0x4d6136[_0x33fcd0(0x12e)](_0x447287);}),_0x4d6136[_0x1a64c6(0x166)]&&(await _0x363965[_0x1a64c6(0x13c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4d6136]}}))[_0x1a64c6(0x13b)][_0x1a64c6(0x160)][_0x1a64c6(0x120)](_0x1a5dd4=>{_0x1a5dd4&&_0x27b940['addUser'](_0x1a5dd4);});};var K=Object[_0x5c421f(0x141)],V=(_0x18231a,_0x45e220,_0x3ec2e6,_0x21cd40)=>{const _0x47fb73=_0x5c421f;for(var _0x23a770=_0x21cd40>0x1?void 0x0:_0x21cd40?K(_0x45e220,_0x3ec2e6):_0x45e220,_0x4d4af6=_0x18231a[_0x47fb73(0x11c)]-0x1,_0x4d641b;_0x4d4af6>=0x0;_0x4d4af6--)(_0x4d641b=_0x18231a[_0x4d4af6])&&(_0x23a770=_0x4d641b(_0x23a770)||_0x23a770);return _0x23a770;},p=(_0x53c5c8,_0x3e626a)=>(_0x2af297,_0xfef818)=>_0x3e626a(_0x2af297,_0xfef818,_0x53c5c8);let S=class extends _0x51392c{constructor(_0x1cded0,_0x131d05,_0xb38b3e,_0xc95b84){const _0x2e97e4=_0x5c421f;super(),this[_0x2e97e4(0x162)]=_0x1cded0,this[_0x2e97e4(0x155)]=_0x131d05,this[_0x2e97e4(0x14f)]=_0xb38b3e,this['_injector']=_0xc95b84,this[_0x2e97e4(0x10d)](),this['_initUserSync']();}['_initUserSync'](){const _0xc1f0fa=_0x5c421f;this[_0xc1f0fa(0x12f)](this[_0xc1f0fa(0x155)][_0xc1f0fa(0x151)]['pipe'](_0x150afd(0x10))[_0xc1f0fa(0x15b)](_0x1690af=>{const _0x347726=_0xc1f0fa,_0x3ea918=new Set();_0x1690af[_0x347726(0x120)](_0x3e2f08=>{const _0x4eb82f=_0x347726;switch(_0x3e2f08[_0x4eb82f(0x14c)]){case _0x4eb82f(0x113):{const _0x4b6837=_0x3e2f08['payload'][_0x4eb82f(0x123)];_0x3ea918['add'](_0x4b6837);break;}}}),B(this[_0x347726(0x156)],_0x3ea918);}));}[_0x5c421f(0x10d)](){const _0x5d074e=_0x5c421f;this[_0x5d074e(0x12f)](this['_commentService'][_0x5d074e(0x151)][_0x5d074e(0x15b)](async _0x59759e=>{const _0x200de7=_0x5d074e;var _0x5f4974,_0x45a584,_0x14d9fd,_0x2863e3;const _0xd4925a=(_0x5f4974=this[_0x200de7(0x155)]['getUnit'](_0x59759e[_0x200de7(0x146)])[_0x200de7(0x170)](_0x3dfe23=>_0x3dfe23[_0x200de7(0x125)]===_0x59759e[_0x200de7(0x125)]))==null?void 0x0:_0x5f4974[_0x200de7(0x128)];if(!_0xd4925a)return;const {unitId:_0xb5346e,subUnitId:_0x6dac3f}=_0xd4925a;switch(_0x59759e[_0x200de7(0x16a)]&&this[_0x200de7(0x14f)][_0x200de7(0x143)](_0x59759e[_0x200de7(0x16a)]),_0x59759e[_0x200de7(0x14c)]){case v[_0x200de7(0x16f)]:break;case v[_0x200de7(0x13f)]:{this[_0x200de7(0x155)]['addComment'](_0xb5346e,_0x6dac3f,{'unitId':_0xb5346e,'subUnitId':_0x6dac3f,'ref':'','id':_0x59759e[_0x200de7(0x11a)],'dT':D(+_0x59759e[_0x200de7(0x130)]),'threadId':_0x59759e[_0x200de7(0x125)],'personId':(_0x14d9fd=(_0x45a584=_0x59759e[_0x200de7(0x16a)])==null?void 0x0:_0x45a584[_0x200de7(0x148)])!=null?_0x14d9fd:_0x59759e[_0x200de7(0x13e)],'text':JSON[_0x200de7(0x168)](_0x59759e[_0x200de7(0x16d)]),'parentId':_0xd4925a['id']});break;}case v[_0x200de7(0x119)]:{const _0x324d03=this['_threadCommentModel'][_0x200de7(0x126)](_0xb5346e,_0x6dac3f,_0x59759e[_0x200de7(0x11a)]);_0x324d03&&_0x324d03[_0x200de7(0x14d)]&&this[_0x200de7(0x155)][_0x200de7(0x13d)](_0xb5346e,_0x6dac3f,_0x59759e[_0x200de7(0x11a)]);break;}case v[_0x200de7(0x112)]:{this[_0x200de7(0x155)][_0x200de7(0x10a)](_0xb5346e,_0x6dac3f,{'commentId':_0x59759e[_0x200de7(0x11a)],'text':JSON[_0x200de7(0x168)](_0x59759e['content'])});break;}case v[_0x200de7(0x131)]:{const _0x1c8553=(_0x2863e3=this[_0x200de7(0x155)][_0x200de7(0x152)](_0x59759e[_0x200de7(0x146)])['find'](_0x52dc59=>_0x52dc59[_0x200de7(0x125)]===_0x59759e[_0x200de7(0x125)]))==null?void 0x0:_0x2863e3[_0x200de7(0x128)];_0x1c8553&&this['_threadCommentModel'][_0x200de7(0x124)](_0xb5346e,_0x6dac3f,_0x1c8553['id'],_0x59759e[_0x200de7(0x10e)]===I[_0x200de7(0x144)]);break;}}}));}};S=V([p(0x0,_0x4be273(_0x11b4f2)),p(0x1,_0x4be273(_0xe551d2)),p(0x2,_0x4be273(_0x29b248)),p(0x3,_0x4be273(_0x471303))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5c421f(0x141)],Q=(_0x2c7321,_0x2c7902,_0x4a4c0d,_0x3a03f8)=>{for(var _0xd362e=_0x3a03f8>0x1?void 0x0:_0x3a03f8?k(_0x2c7902,_0x4a4c0d):_0x2c7902,_0x20d226=_0x2c7321['length']-0x1,_0x59d1d1;_0x20d226>=0x0;_0x20d226--)(_0x59d1d1=_0x2c7321[_0x20d226])&&(_0xd362e=_0x59d1d1(_0xd362e)||_0xd362e);return _0xd362e;},_=(_0x468782,_0x5d8421)=>(_0x493f3a,_0x34c28a)=>_0x5d8421(_0x493f3a,_0x34c28a,_0x468782);function X(_0x551d91,_0x5eb875){const _0x373cff=_0x5c421f,_0x1b50a3=_0x551d91[_0x373cff(0x158)][0x0];return{..._0x5eb875,'id':_0x1b50a3[_0x373cff(0x11a)],'resolved':_0x551d91['solved']===0x1,'dT':D(_0x1b50a3[_0x373cff(0x130)]),'personId':_0x1b50a3[_0x373cff(0x13e)],'threadId':_0x1b50a3['threadId']};}function _0x1758(_0x4a2192,_0x148cca){const _0x128112=_0x1281();return _0x1758=function(_0x1758de,_0x3f6737){_0x1758de=_0x1758de-0x109;let _0x511955=_0x128112[_0x1758de];return _0x511955;},_0x1758(_0x4a2192,_0x148cca);}function ee(_0x49998e,_0x3a94aa,_0x5e5540){const _0x257eff=_0x5c421f;var _0x19a18f,_0x5556b7;if(((_0x5556b7=(_0x19a18f=_0x49998e==null?void 0x0:_0x49998e['replies'])==null?void 0x0:_0x19a18f[_0x257eff(0x11c)])!=null?_0x5556b7:0x0)>0x0){const _0x31dfcf=(_0x39b2cc,_0x47dbd6)=>({'id':_0x39b2cc['replyId'],'threadId':_0x39b2cc[_0x257eff(0x125)],'dT':D(_0x39b2cc[_0x257eff(0x130)]),'personId':_0x39b2cc[_0x257eff(0x13e)],'resolved':_0x49998e[_0x257eff(0x10e)]===I['Solved'],'unitId':_0x3a94aa,'subUnitId':_0x5e5540,'text':JSON['parse'](_0x39b2cc[_0x257eff(0x16d)]),'parentId':_0x47dbd6}),_0x39d2d3=_0x31dfcf(_0x49998e['replies'][0x0]);return{..._0x39d2d3,'children':_0x49998e[_0x257eff(0x158)][_0x257eff(0x139)](0x1)['map'](_0x27f8fd=>_0x31dfcf(_0x27f8fd,_0x39d2d3['id']))};}return null;}let f=class{constructor(_0x453366,_0xd24883,_0xa2c3ad,_0x3816d0){const _0x4f92fd=_0x5c421f;this[_0x4f92fd(0x134)]=_0x453366,this[_0x4f92fd(0x14f)]=_0xd24883,this[_0x4f92fd(0x127)]=_0xa2c3ad,this[_0x4f92fd(0x156)]=_0x3816d0;}async['addComment'](_0x44be){const _0x187e08=_0x5c421f;var _0x398b39,_0x34ec15;const {parentId:_0x38c6c6,unitId:_0x4d282b,text:_0x22fa34,threadId:_0x140a76}=_0x44be,_0x24bd8b=(_0x34ec15=(_0x398b39=_0x22fa34['customRanges'])==null?void 0x0:_0x398b39[_0x187e08(0x115)](_0x538c36=>_0x538c36[_0x187e08(0x14e)]===_0x4776d5[_0x187e08(0x169)])['map'](_0x54471d=>_0x54471d['rangeId']))!=null?_0x34ec15:[],_0x2e8259=JSON[_0x187e08(0x12b)](_0x22fa34),_0x5f5ce9=(await this[_0x187e08(0x127)]['requireSession'](_0x4d282b))[_0x187e08(0x16c)]();if(_0x38c6c6){const _0xbd6239={'memberId':_0x5f5ce9,'unitId':_0x4d282b,'content':_0x2e8259,'mention':_0x24bd8b,'threadId':_0x140a76},_0x57da01=(await this['_httpService'][_0x187e08(0x12d)]('/universer-api/comment/unit/'+_0x4d282b+'/reply',{'body':_0xbd6239}))[_0x187e08(0x13b)][_0x187e08(0x114)];return{..._0x44be,'id':_0x57da01[_0x187e08(0x11a)],'dT':_0x4b8426(+_0x57da01['createTimestamp'])['format'](_0x187e08(0x11e)),'personId':_0x57da01['userId']};}else{const _0x59d9ff={'memberId':_0x5f5ce9,'unitId':_0x4d282b,'content':_0x2e8259,'mention':_0x24bd8b},_0x59c4cb=await this[_0x187e08(0x134)][_0x187e08(0x12d)](_0x187e08(0x10b)+_0x4d282b+_0x187e08(0x129),{'body':_0x59d9ff});return X(_0x59c4cb[_0x187e08(0x13b)][_0x187e08(0x167)],_0x44be);}}async['updateComment'](_0x3157d3){const _0x80566a=_0x5c421f;var _0x3f9ef5,_0x4641f0;const {text:_0x4573f4,unitId:_0x1ad48d}=_0x3157d3,_0x344211=(_0x4641f0=(_0x3f9ef5=_0x4573f4[_0x80566a(0x165)])==null?void 0x0:_0x3f9ef5[_0x80566a(0x115)](_0x6058f9=>_0x6058f9['rangeType']===_0x4776d5['COMMENT'])['map'](_0xe2a61e=>_0xe2a61e[_0x80566a(0x122)]))!=null?_0x4641f0:[],_0x21e1ec=JSON[_0x80566a(0x12b)](_0x4573f4),_0x1d1d8b=_0x3157d3['threadId'],_0x21c7a2=_0x3157d3['id'],_0x138fa4={'memberId':(await this[_0x80566a(0x127)][_0x80566a(0x12a)](_0x1ad48d))[_0x80566a(0x16c)](),'unitId':_0x1ad48d,'threadId':_0x1d1d8b,'mention':_0x344211,'content':_0x21e1ec,'replyId':_0x21c7a2},_0x122b9c=await this[_0x80566a(0x134)][_0x80566a(0x12d)](_0x80566a(0x10b)+_0x1ad48d+_0x80566a(0x10c),{'body':_0x138fa4});return!_0x122b9c['body'][_0x80566a(0x147)]||_0x122b9c[_0x80566a(0x13b)][_0x80566a(0x147)][_0x80566a(0x15e)]===0x1;}async[_0x5c421f(0x124)](_0x2b6d36){const _0xb207c5=_0x5c421f,{unitId:_0x18ee41}=_0x2b6d36,_0x511c38=_0x2b6d36[_0xb207c5(0x125)],_0x470d2d={'memberId':this[_0xb207c5(0x14f)][_0xb207c5(0x11f)]()[_0xb207c5(0x148)],'unitId':_0x18ee41,'threadId':_0x511c38,'solved':_0x2b6d36[_0xb207c5(0x132)]?I['Solved']:I[_0xb207c5(0x15a)]},_0x465044=await this['_httpService'][_0xb207c5(0x12d)]('/universer-api/comment/unit/'+_0x18ee41+_0xb207c5(0x111),{'body':_0x470d2d});return!_0x465044['body'][_0xb207c5(0x147)]||_0x465044[_0xb207c5(0x13b)][_0xb207c5(0x147)][_0xb207c5(0x15e)]===0x1;}async[_0x5c421f(0x13d)](_0x203b98,_0x5a29af,_0x1d2c79,_0x302394){const _0x524826=_0x5c421f,_0x4d96e9={'memberId':(await this[_0x524826(0x127)][_0x524826(0x12a)](_0x203b98))[_0x524826(0x16c)](),'threadId':_0x1d2c79,'replyId':_0x302394,'unitId':_0x203b98},_0x1f41fb=await this['_httpService'][_0x524826(0x12d)](_0x524826(0x10b)+_0x203b98+'/delete',{'body':_0x4d96e9});return!_0x1f41fb[_0x524826(0x13b)]['error']||_0x1f41fb[_0x524826(0x13b)][_0x524826(0x147)][_0x524826(0x15e)]===0x1;}async[_0x5c421f(0x163)](_0x59e50f,_0x29c9b7,_0x2c3f7f){const _0x24b06d=_0x5c421f,_0x2aa117={'unitId':_0x59e50f,'threadId':_0x2c3f7f},_0x42329a=await this['_httpService'][_0x24b06d(0x12d)]('/universer-api/comment/unit/'+_0x59e50f+_0x24b06d(0x149),{'body':_0x2aa117}),_0xc53ecc=_0x2c3f7f[_0x24b06d(0x118)](_0xb206e0=>ee(_0x42329a[_0x24b06d(0x13b)]['comments'][_0xb206e0],_0x59e50f,_0x29c9b7))[_0x24b06d(0x115)](Boolean);return Object[_0x24b06d(0x136)](_0x42329a[_0x24b06d(0x13b)]['users'])[_0x24b06d(0x120)](_0xba9ec9=>{const _0x47d4ae=_0x24b06d;this[_0x47d4ae(0x14f)][_0x47d4ae(0x143)](_0xba9ec9);}),_0xc53ecc;}[_0x5c421f(0x15c)](_0x3f2ebf){const _0x7734ed=_0x5c421f;return{'id':_0x3f2ebf['id'],'threadId':_0x3f2ebf['threadId'],'ref':_0x3f2ebf[_0x7734ed(0x11b)]};}};f=Q([_(0x0,_0x4be273(_0x4a8660)),_(0x1,_0x4be273(_0x29b248)),_(0x2,_0x4be273(_0x3ff02a)),_(0x3,_0x4be273(_0x471303))],f);var re=Object[_0x5c421f(0x141)],te=(_0x2fc54a,_0x536877,_0x3bc166,_0x3479b9)=>{const _0x335f73=_0x5c421f;for(var _0x25b099=_0x3479b9>0x1?void 0x0:_0x3479b9?re(_0x536877,_0x3bc166):_0x536877,_0x105f61=_0x2fc54a[_0x335f73(0x11c)]-0x1,_0x1dc07b;_0x105f61>=0x0;_0x105f61--)(_0x1dc07b=_0x2fc54a[_0x105f61])&&(_0x25b099=_0x1dc07b(_0x25b099)||_0x25b099);return _0x25b099;},N=(_0x4d5157,_0x3e0a28)=>(_0x2a111e,_0x34945d)=>_0x3e0a28(_0x2a111e,_0x34945d,_0x4d5157);let g=class extends _0x51392c{constructor(_0x5c0eef,_0x2f63fe){const _0x29ec43=_0x5c421f;super(),this[_0x29ec43(0x15f)]=_0x5c0eef,this[_0x29ec43(0x12c)]=_0x2f63fe,this[_0x29ec43(0x135)]();}['_initDataSource'](){const _0x51ffa1=_0x5c421f;this[_0x51ffa1(0x15f)][_0x51ffa1(0x133)]=this[_0x51ffa1(0x12c)],this['_threadCommentDataSourceService'][_0x51ffa1(0x14b)]=!0x1;}};g=te([N(0x0,_0x153cf3),N(0x1,_0x4be273(f))],g);var se=Object[_0x5c421f(0x15d)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4fe7b8,_0x1a6867,_0x285c9f)=>_0x1a6867 in _0x4fe7b8?se(_0x4fe7b8,_0x1a6867,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x285c9f}):_0x4fe7b8[_0x1a6867]=_0x285c9f,ie=(_0x527c3a,_0x969996,_0x21c201,_0x5a918c)=>{const _0x2665f2=_0x5c421f;for(var _0x317f4b=_0x5a918c>0x1?void 0x0:_0x5a918c?oe(_0x969996,_0x21c201):_0x969996,_0x4a5949=_0x527c3a[_0x2665f2(0x11c)]-0x1,_0x360d17;_0x4a5949>=0x0;_0x4a5949--)(_0x360d17=_0x527c3a[_0x4a5949])&&(_0x317f4b=_0x360d17(_0x317f4b)||_0x317f4b);return _0x317f4b;},w=(_0x1d6490,_0x44a790)=>(_0x1d4962,_0x5980bd)=>_0x44a790(_0x1d4962,_0x5980bd,_0x1d6490),$=(_0x8f0fbb,_0x59b23f,_0x1a33c9)=>ne(_0x8f0fbb,typeof _0x59b23f!=_0x5c421f(0x11d)?_0x59b23f+'':_0x59b23f,_0x1a33c9);function _0x1281(){const _0x5e5f4a=['post','delete','disposeWithMe','createTimestamp','Solve','resolved','dataSource','_httpService','_initDataSource','values','102126tJOuwl','242KrdGyG','slice','pluginName','body','get','deleteComment','userId','Reply','12pdyTWh','getOwnPropertyDescriptor','onStarting','addUser','Solved','797252LmKyVy','unitId','error','userID','/list','302920myEzIt','syncUpdateMutationToColla','type','parentId','rangeType','_userService','_configService','commentUpdate$','getUnit','8QdVQAN','getUser','_threadCommentModel','_injector','_config','replies','145710rDEIjf','OpenOrReOpen','subscribe','saveCommentToSnapshot','defineProperty','code','_threadCommentDataSourceService','users','UNIVER_UNKNOWN','_commentService','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','size','comment','parse','COMMENT','user','UNRECOGNIZED','getMemberID','content','78875klMpGa','Add','find','onReady','updateComment','/universer-api/comment/unit/','/edit','_init','solved','setConfig','Unknown','/solved','Edit','add','reply','filter','2665539YOvBFs','102KJHGDl','map','Delete','replyId','ref','length','symbol','YYYY/MM/DD\x20HH:mm','getCurrentUser','forEach','1134903ZFcILj','rangeId','personId','resolveComment','threadId','getComment','_sessionService','root','/add','requireSession','stringify','_threadCommentDataSource'];_0x1281=function(){return _0x5e5f4a;};return _0x1281();}let b=class extends _0x2f61a2{constructor(_0x121a3e=M,_0x9cb762,_0x6a13ad){const _0x2aca2a=_0x5c421f;super(),this[_0x2aca2a(0x157)]=_0x121a3e,this[_0x2aca2a(0x156)]=_0x9cb762,this[_0x2aca2a(0x150)]=_0x6a13ad;const {..._0x327877}=_0x59e4de({},M,this[_0x2aca2a(0x157)]);this['_configService'][_0x2aca2a(0x10f)](z,_0x327877);}[_0x5c421f(0x142)](){const _0x4cea0c=_0x5c421f;[[f],[g],[S]][_0x4cea0c(0x120)](_0x5b3870=>{const _0x3bc55d=_0x4cea0c;this[_0x3bc55d(0x156)][_0x3bc55d(0x113)](_0x5b3870);});}[_0x5c421f(0x109)](){const _0x48f2e0=_0x5c421f;this[_0x48f2e0(0x156)][_0x48f2e0(0x13c)](g),this[_0x48f2e0(0x156)][_0x48f2e0(0x13c)](S);}};$(b,_0x5c421f(0x13a),W),$(b,_0x5c421f(0x14c),_0x526006[_0x5c421f(0x161)]),b=ie([_0x841586(_0xcc5e7,_0x204479,_0x4310b8),w(0x1,_0x4be273(_0x471303)),w(0x2,_0x476c9d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x17b82a=_0x715e;(function(_0x4e841e,_0x5093c3){const _0x4231f1=_0x715e,_0x5cf7e7=_0x4e841e();while(!![]){try{const _0x599098=parseInt(_0x4231f1(0x101))/0x1*(parseInt(_0x4231f1(0x119))/0x2)+-parseInt(_0x4231f1(0x10a))/0x3+parseInt(_0x4231f1(0x10e))/0x4*(-parseInt(_0x4231f1(0xdb))/0x5)+parseInt(_0x4231f1(0xfc))/0x6+parseInt(_0x4231f1(0x11d))/0x7+parseInt(_0x4231f1(0x125))/0x8+parseInt(_0x4231f1(0x11a))/0x9;if(_0x599098===_0x5093c3)break;else _0x5cf7e7['push'](_0x5cf7e7['shift']());}catch(_0x44dfb1){_0x5cf7e7['push'](_0x5cf7e7['shift']());}}}(_0x3526,0x3a148));import{CommentService as _0x3a2a96,CollaborationSessionService as _0x19d43c,UniverCollaborationClientPlugin as _0x19e911}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219f24}from'@univerjs-pro/license';import{dayjs as _0x3a7d70,UserManagerService as _0x350584,Inject as _0x4128a6,Injector as _0x4d52d5,Disposable as _0x546ddf,CustomRangeType as _0x25d92a,UniverInstanceType as _0x4c85bc,DependentOn as _0x5b1abb,IConfigService as _0x17181b,Plugin as _0x235c2b,merge as _0x5886d2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21ed2e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37d2c5,IThreadCommentDataSourceService as _0xc19607}from'@univerjs/thread-comment';function _0x3526(){const _0x59ec1b=['userID','Edit','payload','_userService','pipe','parentId','addUser','content','getOwnPropertyDescriptor','_commentService','_configService','createTimestamp','218005HGGnsY','_initUserSync','UNRECOGNIZED','customRanges','format','stringify','_injector','resolveComment','symbol','code','Reply','COMMENT','_threadCommentModel','Solved','_sessionService','saveCommentToSnapshot','comment','/universer-api/comment/unit/','/add','threadId','root','unitId','deleteComment','reply','find','replies','commentUpdate$','thread-comment-data-source.config','_initDataSource','resolved','map','error','_threadCommentDataSource','20688TWdKlp','getMemberID','defineProperty','forEach','delete','17707HmUuaf','getUnit','addComment','body','_httpService','parse','type','subscribe','length','821046oVofEj','_threadCommentDataSourceService','solved','rangeId','4DzEzvr','listComments','/solved','rangeType','onReady','getUser','post','OpenOrReOpen','slice','Solve','_init','16sYPKRz','460431WaNFex','userId','YYYY/MM/DD\x20HH:mm','1138473wXHXfj','updateComment','/reply','filter','/list','_config','requireSession','disposeWithMe','1570216iBNWBR','Delete','getCurrentUser','/edit','Add','personId','users','get','getComment','add','setConfig','replyId','syncUpdateMutationToColla','size','UNIVER_UNKNOWN'];_0x3526=function(){return _0x59ec1b;};return _0x3526();}import{bufferTime as _0x2badf2}from'rxjs';import{HTTPService as _0x2b51a3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d95d1=>(_0x4d95d1[_0x4d95d1['OpenOrReOpen']=0x0]=_0x17b82a(0x115),_0x4d95d1[_0x4d95d1['Solved']=0x1]=_0x17b82a(0xe8),_0x4d95d1[_0x4d95d1[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x4d95d1))(I||{}),v=(_0x205eb5=>(_0x205eb5[_0x205eb5['Unknown']=0x0]='Unknown',_0x205eb5[_0x205eb5[_0x17b82a(0x129)]=0x1]=_0x17b82a(0x129),_0x205eb5[_0x205eb5[_0x17b82a(0xe5)]=0x2]=_0x17b82a(0xe5),_0x205eb5[_0x205eb5[_0x17b82a(0x135)]=0x3]=_0x17b82a(0x135),_0x205eb5[_0x205eb5[_0x17b82a(0x126)]=0x4]='Delete',_0x205eb5[_0x205eb5[_0x17b82a(0x117)]=0x5]='Solve',_0x205eb5[_0x205eb5[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x205eb5))(v||{});const D=_0x4ccf30=>_0x3a7d70(new Date(+_0x4ccf30))[_0x17b82a(0xdf)](_0x17b82a(0x11c)),B=async(_0xa869a1,_0x425d4a)=>{const _0x4e4138=_0x17b82a,_0x3b1afa=_0xa869a1['get'](_0x350584),_0xc624f5=_0xa869a1[_0x4e4138(0x12c)](_0x2b51a3);_0x425d4a[_0x4e4138(0xff)](_0x4623d6=>{const _0x511586=_0x4e4138;_0x3b1afa[_0x511586(0x113)](_0x4623d6)&&_0x425d4a[_0x511586(0x100)](_0x4623d6);}),_0x425d4a[_0x4e4138(0x132)]&&(await _0xc624f5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x425d4a]}}))[_0x4e4138(0x104)][_0x4e4138(0x12b)][_0x4e4138(0xff)](_0x17cfb7=>{const _0xe8d197=_0x4e4138;_0x17cfb7&&_0x3b1afa[_0xe8d197(0x13a)](_0x17cfb7);});};var K=Object[_0x17b82a(0x13c)],V=(_0x4f079f,_0x162339,_0x41a461,_0x53c732)=>{const _0x5a1243=_0x17b82a;for(var _0x5628fd=_0x53c732>0x1?void 0x0:_0x53c732?K(_0x162339,_0x41a461):_0x162339,_0x46943f=_0x4f079f[_0x5a1243(0x109)]-0x1,_0x25b76c;_0x46943f>=0x0;_0x46943f--)(_0x25b76c=_0x4f079f[_0x46943f])&&(_0x5628fd=_0x25b76c(_0x5628fd)||_0x5628fd);return _0x5628fd;},p=(_0x4df034,_0x284f92)=>(_0x2a035c,_0x370215)=>_0x284f92(_0x2a035c,_0x370215,_0x4df034);let S=class extends _0x546ddf{constructor(_0xbc44d0,_0xd291ec,_0x1e5fdf,_0x55c841){const _0x2ff66b=_0x17b82a;super(),this[_0x2ff66b(0x13d)]=_0xbc44d0,this[_0x2ff66b(0xe7)]=_0xd291ec,this[_0x2ff66b(0x137)]=_0x1e5fdf,this[_0x2ff66b(0xe1)]=_0x55c841,this[_0x2ff66b(0x118)](),this[_0x2ff66b(0xdc)]();}['_initUserSync'](){const _0x42d530=_0x17b82a;this[_0x42d530(0x124)](this[_0x42d530(0xe7)][_0x42d530(0xf5)][_0x42d530(0x138)](_0x2badf2(0x10))[_0x42d530(0x108)](_0xec9880=>{const _0x5b74a0=_0x42d530,_0x1f3630=new Set();_0xec9880[_0x5b74a0(0xff)](_0x5b5c63=>{const _0x83a605=_0x5b74a0;switch(_0x5b5c63[_0x83a605(0x107)]){case'add':{const _0x23a8e9=_0x5b5c63[_0x83a605(0x136)][_0x83a605(0x12a)];_0x1f3630['add'](_0x23a8e9);break;}}}),B(this[_0x5b74a0(0xe1)],_0x1f3630);}));}[_0x17b82a(0x118)](){const _0x1649d0=_0x17b82a;this[_0x1649d0(0x124)](this[_0x1649d0(0x13d)][_0x1649d0(0xf5)]['subscribe'](async _0x5a4c20=>{const _0x9c2efe=_0x1649d0;var _0x3c4970,_0x44043c,_0x46a65a,_0x35900c;const _0x46d982=(_0x3c4970=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x3d8083=>_0x3d8083['threadId']===_0x5a4c20['threadId']))==null?void 0x0:_0x3c4970[_0x9c2efe(0xef)];if(!_0x46d982)return;const {unitId:_0x34a78a,subUnitId:_0x5ab8bb}=_0x46d982;switch(_0x5a4c20['user']&&this['_userService'][_0x9c2efe(0x13a)](_0x5a4c20['user']),_0x5a4c20['type']){case v[_0x9c2efe(0x129)]:break;case v[_0x9c2efe(0xe5)]:{this['_threadCommentModel']['addComment'](_0x34a78a,_0x5ab8bb,{'unitId':_0x34a78a,'subUnitId':_0x5ab8bb,'ref':'','id':_0x5a4c20[_0x9c2efe(0x130)],'dT':D(+_0x5a4c20[_0x9c2efe(0x13f)]),'threadId':_0x5a4c20['threadId'],'personId':(_0x46a65a=(_0x44043c=_0x5a4c20['user'])==null?void 0x0:_0x44043c[_0x9c2efe(0x134)])!=null?_0x46a65a:_0x5a4c20[_0x9c2efe(0x11b)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)]),'parentId':_0x46d982['id']});break;}case v[_0x9c2efe(0x126)]:{const _0x16c9db=this[_0x9c2efe(0xe7)][_0x9c2efe(0x12d)](_0x34a78a,_0x5ab8bb,_0x5a4c20['replyId']);_0x16c9db&&_0x16c9db[_0x9c2efe(0x139)]&&this['_threadCommentModel'][_0x9c2efe(0xf1)](_0x34a78a,_0x5ab8bb,_0x5a4c20[_0x9c2efe(0x130)]);break;}case v[_0x9c2efe(0x135)]:{this['_threadCommentModel'][_0x9c2efe(0x11e)](_0x34a78a,_0x5ab8bb,{'commentId':_0x5a4c20[_0x9c2efe(0x130)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)])});break;}case v[_0x9c2efe(0x117)]:{const _0x1041e3=(_0x35900c=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x567ac2=>_0x567ac2[_0x9c2efe(0xee)]===_0x5a4c20['threadId']))==null?void 0x0:_0x35900c['root'];_0x1041e3&&this['_threadCommentModel']['resolveComment'](_0x34a78a,_0x5ab8bb,_0x1041e3['id'],_0x5a4c20['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4128a6(_0x3a2a96)),p(0x1,_0x4128a6(_0x37d2c5)),p(0x2,_0x4128a6(_0x350584)),p(0x3,_0x4128a6(_0x4d52d5))],S);const z=_0x17b82a(0xf6),M={};var k=Object[_0x17b82a(0x13c)],Q=(_0x201cde,_0x5b6cfc,_0x6091a1,_0x30641c)=>{for(var _0x5bde4f=_0x30641c>0x1?void 0x0:_0x30641c?k(_0x5b6cfc,_0x6091a1):_0x5b6cfc,_0x546446=_0x201cde['length']-0x1,_0x58c55f;_0x546446>=0x0;_0x546446--)(_0x58c55f=_0x201cde[_0x546446])&&(_0x5bde4f=_0x58c55f(_0x5bde4f)||_0x5bde4f);return _0x5bde4f;},_=(_0x168ac4,_0x4eaac1)=>(_0x44c667,_0x13dbaa)=>_0x4eaac1(_0x44c667,_0x13dbaa,_0x168ac4);function X(_0x44002b,_0x531905){const _0x357b0a=_0x17b82a,_0x412638=_0x44002b['replies'][0x0];return{..._0x531905,'id':_0x412638[_0x357b0a(0x130)],'resolved':_0x44002b[_0x357b0a(0x10c)]===0x1,'dT':D(_0x412638[_0x357b0a(0x13f)]),'personId':_0x412638[_0x357b0a(0x11b)],'threadId':_0x412638[_0x357b0a(0xee)]};}function ee(_0x2a5ea5,_0x33d41a,_0x518030){const _0x1eb974=_0x17b82a;var _0x42278c,_0x1f360d;if(((_0x1f360d=(_0x42278c=_0x2a5ea5==null?void 0x0:_0x2a5ea5[_0x1eb974(0xf4)])==null?void 0x0:_0x42278c['length'])!=null?_0x1f360d:0x0)>0x0){const _0x799fcf=(_0x440e38,_0x4b6841)=>({'id':_0x440e38['replyId'],'threadId':_0x440e38[_0x1eb974(0xee)],'dT':D(_0x440e38['createTimestamp']),'personId':_0x440e38['userId'],'resolved':_0x2a5ea5['solved']===I[_0x1eb974(0xe8)],'unitId':_0x33d41a,'subUnitId':_0x518030,'text':JSON[_0x1eb974(0x106)](_0x440e38[_0x1eb974(0x13b)]),'parentId':_0x4b6841}),_0x4c7cd2=_0x799fcf(_0x2a5ea5[_0x1eb974(0xf4)][0x0]);return{..._0x4c7cd2,'children':_0x2a5ea5[_0x1eb974(0xf4)][_0x1eb974(0x116)](0x1)[_0x1eb974(0xf9)](_0x4b8de7=>_0x799fcf(_0x4b8de7,_0x4c7cd2['id']))};}return null;}let f=class{constructor(_0x11b759,_0x162509,_0x1b9be4,_0x3e3a17){const _0x3ec8dd=_0x17b82a;this[_0x3ec8dd(0x105)]=_0x11b759,this['_userService']=_0x162509,this['_sessionService']=_0x1b9be4,this[_0x3ec8dd(0xe1)]=_0x3e3a17;}async[_0x17b82a(0x103)](_0x239561){const _0x526c73=_0x17b82a;var _0x4d0b4b,_0x326e59;const {parentId:_0x2c42fe,unitId:_0x2c695e,text:_0x4990f4,threadId:_0x589601}=_0x239561,_0x515fc7=(_0x326e59=(_0x4d0b4b=_0x4990f4[_0x526c73(0xde)])==null?void 0x0:_0x4d0b4b[_0x526c73(0x120)](_0x15d9e5=>_0x15d9e5[_0x526c73(0x111)]===_0x25d92a['COMMENT'])[_0x526c73(0xf9)](_0x4aa213=>_0x4aa213[_0x526c73(0x10d)]))!=null?_0x326e59:[],_0x2866f1=JSON['stringify'](_0x4990f4),_0x4e53c9=(await this['_sessionService'][_0x526c73(0x123)](_0x2c695e))[_0x526c73(0xfd)]();if(_0x2c42fe){const _0x4660e8={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7,'threadId':_0x589601},_0x3b052c=(await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0x11f),{'body':_0x4660e8}))['body'][_0x526c73(0xf2)];return{..._0x239561,'id':_0x3b052c[_0x526c73(0x130)],'dT':_0x3a7d70(+_0x3b052c[_0x526c73(0x13f)])[_0x526c73(0xdf)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b052c[_0x526c73(0x11b)]};}else{const _0x1545b0={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7},_0x315eef=await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0xed),{'body':_0x1545b0});return X(_0x315eef[_0x526c73(0x104)][_0x526c73(0xeb)],_0x239561);}}async['updateComment'](_0x31f3e6){const _0x3e815c=_0x17b82a;var _0xc710d5,_0x123d96;const {text:_0x3c1cfb,unitId:_0x579cbb}=_0x31f3e6,_0x66ea90=(_0x123d96=(_0xc710d5=_0x3c1cfb[_0x3e815c(0xde)])==null?void 0x0:_0xc710d5[_0x3e815c(0x120)](_0x261fa0=>_0x261fa0['rangeType']===_0x25d92a[_0x3e815c(0xe6)])[_0x3e815c(0xf9)](_0x2801ed=>_0x2801ed[_0x3e815c(0x10d)]))!=null?_0x123d96:[],_0x2650db=JSON[_0x3e815c(0xe0)](_0x3c1cfb),_0x320fd1=_0x31f3e6[_0x3e815c(0xee)],_0x5cfc65=_0x31f3e6['id'],_0x20cf92={'memberId':(await this['_sessionService'][_0x3e815c(0x123)](_0x579cbb))[_0x3e815c(0xfd)](),'unitId':_0x579cbb,'threadId':_0x320fd1,'mention':_0x66ea90,'content':_0x2650db,'replyId':_0x5cfc65},_0x3d8281=await this[_0x3e815c(0x105)]['post'](_0x3e815c(0xec)+_0x579cbb+_0x3e815c(0x128),{'body':_0x20cf92});return!_0x3d8281[_0x3e815c(0x104)][_0x3e815c(0xfa)]||_0x3d8281['body'][_0x3e815c(0xfa)][_0x3e815c(0xe4)]===0x1;}async[_0x17b82a(0xe2)](_0x160dc3){const _0x3a08bf=_0x17b82a,{unitId:_0x54ec44}=_0x160dc3,_0x561c86=_0x160dc3['threadId'],_0x3929b8={'memberId':this[_0x3a08bf(0x137)][_0x3a08bf(0x127)]()[_0x3a08bf(0x134)],'unitId':_0x54ec44,'threadId':_0x561c86,'solved':_0x160dc3[_0x3a08bf(0xf8)]?I[_0x3a08bf(0xe8)]:I['OpenOrReOpen']},_0x2bcc31=await this['_httpService']['post'](_0x3a08bf(0xec)+_0x54ec44+_0x3a08bf(0x110),{'body':_0x3929b8});return!_0x2bcc31['body']['error']||_0x2bcc31[_0x3a08bf(0x104)][_0x3a08bf(0xfa)][_0x3a08bf(0xe4)]===0x1;}async[_0x17b82a(0xf1)](_0x2c537b,_0x1769e2,_0xd79cf0,_0xae8210){const _0x277173=_0x17b82a,_0x517b21={'memberId':(await this[_0x277173(0xe9)]['requireSession'](_0x2c537b))[_0x277173(0xfd)](),'threadId':_0xd79cf0,'replyId':_0xae8210,'unitId':_0x2c537b},_0x2c754c=await this[_0x277173(0x105)][_0x277173(0x114)](_0x277173(0xec)+_0x2c537b+'/delete',{'body':_0x517b21});return!_0x2c754c[_0x277173(0x104)][_0x277173(0xfa)]||_0x2c754c[_0x277173(0x104)]['error'][_0x277173(0xe4)]===0x1;}async[_0x17b82a(0x10f)](_0xd04887,_0x20e1a7,_0x4d8c57){const _0x4a02e8=_0x17b82a,_0x46a642={'unitId':_0xd04887,'threadId':_0x4d8c57},_0x2218f1=await this[_0x4a02e8(0x105)][_0x4a02e8(0x114)](_0x4a02e8(0xec)+_0xd04887+_0x4a02e8(0x121),{'body':_0x46a642}),_0x291b60=_0x4d8c57['map'](_0x5c9938=>ee(_0x2218f1[_0x4a02e8(0x104)]['comments'][_0x5c9938],_0xd04887,_0x20e1a7))['filter'](Boolean);return Object['values'](_0x2218f1[_0x4a02e8(0x104)][_0x4a02e8(0x12b)])[_0x4a02e8(0xff)](_0x2ae379=>{const _0x248b37=_0x4a02e8;this['_userService'][_0x248b37(0x13a)](_0x2ae379);}),_0x291b60;}[_0x17b82a(0xea)](_0x2ef80f){const _0x3ba083=_0x17b82a;return{'id':_0x2ef80f['id'],'threadId':_0x2ef80f[_0x3ba083(0xee)],'ref':_0x2ef80f['ref']};}};f=Q([_(0x0,_0x4128a6(_0x2b51a3)),_(0x1,_0x4128a6(_0x350584)),_(0x2,_0x4128a6(_0x19d43c)),_(0x3,_0x4128a6(_0x4d52d5))],f);var re=Object[_0x17b82a(0x13c)],te=(_0x3237b3,_0x46db88,_0x317ff0,_0x56def5)=>{const _0x26e7a3=_0x17b82a;for(var _0x21217a=_0x56def5>0x1?void 0x0:_0x56def5?re(_0x46db88,_0x317ff0):_0x46db88,_0x38599d=_0x3237b3[_0x26e7a3(0x109)]-0x1,_0x31a63f;_0x38599d>=0x0;_0x38599d--)(_0x31a63f=_0x3237b3[_0x38599d])&&(_0x21217a=_0x31a63f(_0x21217a)||_0x21217a);return _0x21217a;},N=(_0x44bb67,_0x1c0ee4)=>(_0x4307ff,_0x11b61d)=>_0x1c0ee4(_0x4307ff,_0x11b61d,_0x44bb67);let g=class extends _0x546ddf{constructor(_0x17ec65,_0x2e1056){const _0x1360f4=_0x17b82a;super(),this['_threadCommentDataSourceService']=_0x17ec65,this[_0x1360f4(0xfb)]=_0x2e1056,this[_0x1360f4(0xf7)]();}['_initDataSource'](){const _0x51b820=_0x17b82a;this['_threadCommentDataSourceService']['dataSource']=this[_0x51b820(0xfb)],this[_0x51b820(0x10b)][_0x51b820(0x131)]=!0x1;}};g=te([N(0x0,_0xc19607),N(0x1,_0x4128a6(f))],g);var se=Object[_0x17b82a(0xfe)],oe=Object[_0x17b82a(0x13c)],ne=(_0x143215,_0xa11d85,_0x40d424)=>_0xa11d85 in _0x143215?se(_0x143215,_0xa11d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40d424}):_0x143215[_0xa11d85]=_0x40d424,ie=(_0x14492c,_0x2b7a57,_0x515b3a,_0x1e5748)=>{const _0x34b283=_0x17b82a;for(var _0x7ac608=_0x1e5748>0x1?void 0x0:_0x1e5748?oe(_0x2b7a57,_0x515b3a):_0x2b7a57,_0x29c895=_0x14492c[_0x34b283(0x109)]-0x1,_0x2acb9c;_0x29c895>=0x0;_0x29c895--)(_0x2acb9c=_0x14492c[_0x29c895])&&(_0x7ac608=_0x2acb9c(_0x7ac608)||_0x7ac608);return _0x7ac608;},w=(_0x73ddf8,_0x2e2ce9)=>(_0x326606,_0x41f52e)=>_0x2e2ce9(_0x326606,_0x41f52e,_0x73ddf8),$=(_0x20fb44,_0x3a98f1,_0x3d057b)=>ne(_0x20fb44,typeof _0x3a98f1!=_0x17b82a(0xe3)?_0x3a98f1+'':_0x3a98f1,_0x3d057b);let b=class extends _0x235c2b{constructor(_0xf7fdcd=M,_0x152b1f,_0xad410a){const _0x4108e=_0x17b82a;super(),this['_config']=_0xf7fdcd,this[_0x4108e(0xe1)]=_0x152b1f,this[_0x4108e(0x13e)]=_0xad410a;const {..._0x2e14f7}=_0x5886d2({},M,this[_0x4108e(0x122)]);this[_0x4108e(0x13e)][_0x4108e(0x12f)](z,_0x2e14f7);}['onStarting'](){const _0x1d298c=_0x17b82a;[[f],[g],[S]][_0x1d298c(0xff)](_0xc98e7e=>{const _0x119e64=_0x1d298c;this[_0x119e64(0xe1)][_0x119e64(0x12e)](_0xc98e7e);});}[_0x17b82a(0x112)](){const _0x45abec=_0x17b82a;this[_0x45abec(0xe1)][_0x45abec(0x12c)](g),this[_0x45abec(0xe1)]['get'](S);}};function _0x715e(_0x1869f7,_0x394278){const _0x352680=_0x3526();return _0x715e=function(_0x715e5a,_0x59550c){_0x715e5a=_0x715e5a-0xdb;let _0x2ef194=_0x352680[_0x715e5a];return _0x2ef194;},_0x715e(_0x1869f7,_0x394278);}$(b,'pluginName',W),$(b,_0x17b82a(0x107),_0x4c85bc[_0x17b82a(0x133)]),b=ie([_0x5b1abb(_0x21ed2e,_0x19e911,_0x219f24),w(0x1,_0x4128a6(_0x4d52d5)),w(0x2,_0x17181b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5c421f=_0x1758;(function(_0x1680e2,_0x1343b6){const _0x1addc4=_0x1758,_0x39a2ac=_0x1680e2();while(!![]){try{const _0x51c933=parseInt(_0x1addc4(0x159))/0x1+-parseInt(_0x1addc4(0x145))/0x2+parseInt(_0x1addc4(0x137))/0x3*(parseInt(_0x1addc4(0x140))/0x4)+-parseInt(_0x1addc4(0x16e))/0x5*(-parseInt(_0x1addc4(0x117))/0x6)+-parseInt(_0x1addc4(0x121))/0x7+parseInt(_0x1addc4(0x153))/0x8*(-parseInt(_0x1addc4(0x116))/0x9)+-parseInt(_0x1addc4(0x14a))/0xa*(-parseInt(_0x1addc4(0x138))/0xb);if(_0x51c933===_0x1343b6)break;else _0x39a2ac['push'](_0x39a2ac['shift']());}catch(_0x4d5d77){_0x39a2ac['push'](_0x39a2ac['shift']());}}}(_0x1281,0x4f785));import{CommentService as _0x11b4f2,CollaborationSessionService as _0x3ff02a,UniverCollaborationClientPlugin as _0x204479}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4310b8}from'@univerjs-pro/license';import{dayjs as _0x4b8426,UserManagerService as _0x29b248,Inject as _0x4be273,Injector as _0x471303,Disposable as _0x51392c,CustomRangeType as _0x4776d5,UniverInstanceType as _0x526006,DependentOn as _0x841586,IConfigService as _0x476c9d,Plugin as _0x2f61a2,merge as _0x59e4de}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xcc5e7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xe551d2,IThreadCommentDataSourceService as _0x153cf3}from'@univerjs/thread-comment';import{bufferTime as _0x150afd}from'rxjs';import{HTTPService as _0x4a8660}from'@univerjs/network';const W=_0x5c421f(0x164);var I=(_0x4e2bd0=>(_0x4e2bd0[_0x4e2bd0[_0x5c421f(0x15a)]=0x0]=_0x5c421f(0x15a),_0x4e2bd0[_0x4e2bd0[_0x5c421f(0x144)]=0x1]='Solved',_0x4e2bd0[_0x4e2bd0[_0x5c421f(0x16b)]=-0x1]=_0x5c421f(0x16b),_0x4e2bd0))(I||{}),v=(_0x1602ab=>(_0x1602ab[_0x1602ab[_0x5c421f(0x110)]=0x0]=_0x5c421f(0x110),_0x1602ab[_0x1602ab[_0x5c421f(0x16f)]=0x1]=_0x5c421f(0x16f),_0x1602ab[_0x1602ab['Reply']=0x2]='Reply',_0x1602ab[_0x1602ab[_0x5c421f(0x112)]=0x3]='Edit',_0x1602ab[_0x1602ab[_0x5c421f(0x119)]=0x4]=_0x5c421f(0x119),_0x1602ab[_0x1602ab[_0x5c421f(0x131)]=0x5]=_0x5c421f(0x131),_0x1602ab[_0x1602ab[_0x5c421f(0x16b)]=-0x1]=_0x5c421f(0x16b),_0x1602ab))(v||{});const D=_0x2634d3=>_0x4b8426(new Date(+_0x2634d3))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4abd6c,_0x4d6136)=>{const _0x1a64c6=_0x5c421f,_0x27b940=_0x4abd6c[_0x1a64c6(0x13c)](_0x29b248),_0x363965=_0x4abd6c[_0x1a64c6(0x13c)](_0x4a8660);_0x4d6136['forEach'](_0x447287=>{const _0x33fcd0=_0x1a64c6;_0x27b940[_0x33fcd0(0x154)](_0x447287)&&_0x4d6136[_0x33fcd0(0x12e)](_0x447287);}),_0x4d6136[_0x1a64c6(0x166)]&&(await _0x363965[_0x1a64c6(0x13c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4d6136]}}))[_0x1a64c6(0x13b)][_0x1a64c6(0x160)][_0x1a64c6(0x120)](_0x1a5dd4=>{_0x1a5dd4&&_0x27b940['addUser'](_0x1a5dd4);});};var K=Object[_0x5c421f(0x141)],V=(_0x18231a,_0x45e220,_0x3ec2e6,_0x21cd40)=>{const _0x47fb73=_0x5c421f;for(var _0x23a770=_0x21cd40>0x1?void 0x0:_0x21cd40?K(_0x45e220,_0x3ec2e6):_0x45e220,_0x4d4af6=_0x18231a[_0x47fb73(0x11c)]-0x1,_0x4d641b;_0x4d4af6>=0x0;_0x4d4af6--)(_0x4d641b=_0x18231a[_0x4d4af6])&&(_0x23a770=_0x4d641b(_0x23a770)||_0x23a770);return _0x23a770;},p=(_0x53c5c8,_0x3e626a)=>(_0x2af297,_0xfef818)=>_0x3e626a(_0x2af297,_0xfef818,_0x53c5c8);let S=class extends _0x51392c{constructor(_0x1cded0,_0x131d05,_0xb38b3e,_0xc95b84){const _0x2e97e4=_0x5c421f;super(),this[_0x2e97e4(0x162)]=_0x1cded0,this[_0x2e97e4(0x155)]=_0x131d05,this[_0x2e97e4(0x14f)]=_0xb38b3e,this['_injector']=_0xc95b84,this[_0x2e97e4(0x10d)](),this['_initUserSync']();}['_initUserSync'](){const _0xc1f0fa=_0x5c421f;this[_0xc1f0fa(0x12f)](this[_0xc1f0fa(0x155)][_0xc1f0fa(0x151)]['pipe'](_0x150afd(0x10))[_0xc1f0fa(0x15b)](_0x1690af=>{const _0x347726=_0xc1f0fa,_0x3ea918=new Set();_0x1690af[_0x347726(0x120)](_0x3e2f08=>{const _0x4eb82f=_0x347726;switch(_0x3e2f08[_0x4eb82f(0x14c)]){case _0x4eb82f(0x113):{const _0x4b6837=_0x3e2f08['payload'][_0x4eb82f(0x123)];_0x3ea918['add'](_0x4b6837);break;}}}),B(this[_0x347726(0x156)],_0x3ea918);}));}[_0x5c421f(0x10d)](){const _0x5d074e=_0x5c421f;this[_0x5d074e(0x12f)](this['_commentService'][_0x5d074e(0x151)][_0x5d074e(0x15b)](async _0x59759e=>{const _0x200de7=_0x5d074e;var _0x5f4974,_0x45a584,_0x14d9fd,_0x2863e3;const _0xd4925a=(_0x5f4974=this[_0x200de7(0x155)]['getUnit'](_0x59759e[_0x200de7(0x146)])[_0x200de7(0x170)](_0x3dfe23=>_0x3dfe23[_0x200de7(0x125)]===_0x59759e[_0x200de7(0x125)]))==null?void 0x0:_0x5f4974[_0x200de7(0x128)];if(!_0xd4925a)return;const {unitId:_0xb5346e,subUnitId:_0x6dac3f}=_0xd4925a;switch(_0x59759e[_0x200de7(0x16a)]&&this[_0x200de7(0x14f)][_0x200de7(0x143)](_0x59759e[_0x200de7(0x16a)]),_0x59759e[_0x200de7(0x14c)]){case v[_0x200de7(0x16f)]:break;case v[_0x200de7(0x13f)]:{this[_0x200de7(0x155)]['addComment'](_0xb5346e,_0x6dac3f,{'unitId':_0xb5346e,'subUnitId':_0x6dac3f,'ref':'','id':_0x59759e[_0x200de7(0x11a)],'dT':D(+_0x59759e[_0x200de7(0x130)]),'threadId':_0x59759e[_0x200de7(0x125)],'personId':(_0x14d9fd=(_0x45a584=_0x59759e[_0x200de7(0x16a)])==null?void 0x0:_0x45a584[_0x200de7(0x148)])!=null?_0x14d9fd:_0x59759e[_0x200de7(0x13e)],'text':JSON[_0x200de7(0x168)](_0x59759e[_0x200de7(0x16d)]),'parentId':_0xd4925a['id']});break;}case v[_0x200de7(0x119)]:{const _0x324d03=this['_threadCommentModel'][_0x200de7(0x126)](_0xb5346e,_0x6dac3f,_0x59759e[_0x200de7(0x11a)]);_0x324d03&&_0x324d03[_0x200de7(0x14d)]&&this[_0x200de7(0x155)][_0x200de7(0x13d)](_0xb5346e,_0x6dac3f,_0x59759e[_0x200de7(0x11a)]);break;}case v[_0x200de7(0x112)]:{this[_0x200de7(0x155)][_0x200de7(0x10a)](_0xb5346e,_0x6dac3f,{'commentId':_0x59759e[_0x200de7(0x11a)],'text':JSON[_0x200de7(0x168)](_0x59759e['content'])});break;}case v[_0x200de7(0x131)]:{const _0x1c8553=(_0x2863e3=this[_0x200de7(0x155)][_0x200de7(0x152)](_0x59759e[_0x200de7(0x146)])['find'](_0x52dc59=>_0x52dc59[_0x200de7(0x125)]===_0x59759e[_0x200de7(0x125)]))==null?void 0x0:_0x2863e3[_0x200de7(0x128)];_0x1c8553&&this['_threadCommentModel'][_0x200de7(0x124)](_0xb5346e,_0x6dac3f,_0x1c8553['id'],_0x59759e[_0x200de7(0x10e)]===I[_0x200de7(0x144)]);break;}}}));}};S=V([p(0x0,_0x4be273(_0x11b4f2)),p(0x1,_0x4be273(_0xe551d2)),p(0x2,_0x4be273(_0x29b248)),p(0x3,_0x4be273(_0x471303))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5c421f(0x141)],Q=(_0x2c7321,_0x2c7902,_0x4a4c0d,_0x3a03f8)=>{for(var _0xd362e=_0x3a03f8>0x1?void 0x0:_0x3a03f8?k(_0x2c7902,_0x4a4c0d):_0x2c7902,_0x20d226=_0x2c7321['length']-0x1,_0x59d1d1;_0x20d226>=0x0;_0x20d226--)(_0x59d1d1=_0x2c7321[_0x20d226])&&(_0xd362e=_0x59d1d1(_0xd362e)||_0xd362e);return _0xd362e;},_=(_0x468782,_0x5d8421)=>(_0x493f3a,_0x34c28a)=>_0x5d8421(_0x493f3a,_0x34c28a,_0x468782);function X(_0x551d91,_0x5eb875){const _0x373cff=_0x5c421f,_0x1b50a3=_0x551d91[_0x373cff(0x158)][0x0];return{..._0x5eb875,'id':_0x1b50a3[_0x373cff(0x11a)],'resolved':_0x551d91['solved']===0x1,'dT':D(_0x1b50a3[_0x373cff(0x130)]),'personId':_0x1b50a3[_0x373cff(0x13e)],'threadId':_0x1b50a3['threadId']};}function _0x1758(_0x4a2192,_0x148cca){const _0x128112=_0x1281();return _0x1758=function(_0x1758de,_0x3f6737){_0x1758de=_0x1758de-0x109;let _0x511955=_0x128112[_0x1758de];return _0x511955;},_0x1758(_0x4a2192,_0x148cca);}function ee(_0x49998e,_0x3a94aa,_0x5e5540){const _0x257eff=_0x5c421f;var _0x19a18f,_0x5556b7;if(((_0x5556b7=(_0x19a18f=_0x49998e==null?void 0x0:_0x49998e['replies'])==null?void 0x0:_0x19a18f[_0x257eff(0x11c)])!=null?_0x5556b7:0x0)>0x0){const _0x31dfcf=(_0x39b2cc,_0x47dbd6)=>({'id':_0x39b2cc['replyId'],'threadId':_0x39b2cc[_0x257eff(0x125)],'dT':D(_0x39b2cc[_0x257eff(0x130)]),'personId':_0x39b2cc[_0x257eff(0x13e)],'resolved':_0x49998e[_0x257eff(0x10e)]===I['Solved'],'unitId':_0x3a94aa,'subUnitId':_0x5e5540,'text':JSON['parse'](_0x39b2cc[_0x257eff(0x16d)]),'parentId':_0x47dbd6}),_0x39d2d3=_0x31dfcf(_0x49998e['replies'][0x0]);return{..._0x39d2d3,'children':_0x49998e[_0x257eff(0x158)][_0x257eff(0x139)](0x1)['map'](_0x27f8fd=>_0x31dfcf(_0x27f8fd,_0x39d2d3['id']))};}return null;}let f=class{constructor(_0x453366,_0xd24883,_0xa2c3ad,_0x3816d0){const _0x4f92fd=_0x5c421f;this[_0x4f92fd(0x134)]=_0x453366,this[_0x4f92fd(0x14f)]=_0xd24883,this[_0x4f92fd(0x127)]=_0xa2c3ad,this[_0x4f92fd(0x156)]=_0x3816d0;}async['addComment'](_0x44be){const _0x187e08=_0x5c421f;var _0x398b39,_0x34ec15;const {parentId:_0x38c6c6,unitId:_0x4d282b,text:_0x22fa34,threadId:_0x140a76}=_0x44be,_0x24bd8b=(_0x34ec15=(_0x398b39=_0x22fa34['customRanges'])==null?void 0x0:_0x398b39[_0x187e08(0x115)](_0x538c36=>_0x538c36[_0x187e08(0x14e)]===_0x4776d5[_0x187e08(0x169)])['map'](_0x54471d=>_0x54471d['rangeId']))!=null?_0x34ec15:[],_0x2e8259=JSON[_0x187e08(0x12b)](_0x22fa34),_0x5f5ce9=(await this[_0x187e08(0x127)]['requireSession'](_0x4d282b))[_0x187e08(0x16c)]();if(_0x38c6c6){const _0xbd6239={'memberId':_0x5f5ce9,'unitId':_0x4d282b,'content':_0x2e8259,'mention':_0x24bd8b,'threadId':_0x140a76},_0x57da01=(await this['_httpService'][_0x187e08(0x12d)]('/universer-api/comment/unit/'+_0x4d282b+'/reply',{'body':_0xbd6239}))[_0x187e08(0x13b)][_0x187e08(0x114)];return{..._0x44be,'id':_0x57da01[_0x187e08(0x11a)],'dT':_0x4b8426(+_0x57da01['createTimestamp'])['format'](_0x187e08(0x11e)),'personId':_0x57da01['userId']};}else{const _0x59d9ff={'memberId':_0x5f5ce9,'unitId':_0x4d282b,'content':_0x2e8259,'mention':_0x24bd8b},_0x59c4cb=await this[_0x187e08(0x134)][_0x187e08(0x12d)](_0x187e08(0x10b)+_0x4d282b+_0x187e08(0x129),{'body':_0x59d9ff});return X(_0x59c4cb[_0x187e08(0x13b)][_0x187e08(0x167)],_0x44be);}}async['updateComment'](_0x3157d3){const _0x80566a=_0x5c421f;var _0x3f9ef5,_0x4641f0;const {text:_0x4573f4,unitId:_0x1ad48d}=_0x3157d3,_0x344211=(_0x4641f0=(_0x3f9ef5=_0x4573f4[_0x80566a(0x165)])==null?void 0x0:_0x3f9ef5[_0x80566a(0x115)](_0x6058f9=>_0x6058f9['rangeType']===_0x4776d5['COMMENT'])['map'](_0xe2a61e=>_0xe2a61e[_0x80566a(0x122)]))!=null?_0x4641f0:[],_0x21e1ec=JSON[_0x80566a(0x12b)](_0x4573f4),_0x1d1d8b=_0x3157d3['threadId'],_0x21c7a2=_0x3157d3['id'],_0x138fa4={'memberId':(await this[_0x80566a(0x127)][_0x80566a(0x12a)](_0x1ad48d))[_0x80566a(0x16c)](),'unitId':_0x1ad48d,'threadId':_0x1d1d8b,'mention':_0x344211,'content':_0x21e1ec,'replyId':_0x21c7a2},_0x122b9c=await this[_0x80566a(0x134)][_0x80566a(0x12d)](_0x80566a(0x10b)+_0x1ad48d+_0x80566a(0x10c),{'body':_0x138fa4});return!_0x122b9c['body'][_0x80566a(0x147)]||_0x122b9c[_0x80566a(0x13b)][_0x80566a(0x147)][_0x80566a(0x15e)]===0x1;}async[_0x5c421f(0x124)](_0x2b6d36){const _0xb207c5=_0x5c421f,{unitId:_0x18ee41}=_0x2b6d36,_0x511c38=_0x2b6d36[_0xb207c5(0x125)],_0x470d2d={'memberId':this[_0xb207c5(0x14f)][_0xb207c5(0x11f)]()[_0xb207c5(0x148)],'unitId':_0x18ee41,'threadId':_0x511c38,'solved':_0x2b6d36[_0xb207c5(0x132)]?I['Solved']:I[_0xb207c5(0x15a)]},_0x465044=await this['_httpService'][_0xb207c5(0x12d)]('/universer-api/comment/unit/'+_0x18ee41+_0xb207c5(0x111),{'body':_0x470d2d});return!_0x465044['body'][_0xb207c5(0x147)]||_0x465044[_0xb207c5(0x13b)][_0xb207c5(0x147)][_0xb207c5(0x15e)]===0x1;}async[_0x5c421f(0x13d)](_0x203b98,_0x5a29af,_0x1d2c79,_0x302394){const _0x524826=_0x5c421f,_0x4d96e9={'memberId':(await this[_0x524826(0x127)][_0x524826(0x12a)](_0x203b98))[_0x524826(0x16c)](),'threadId':_0x1d2c79,'replyId':_0x302394,'unitId':_0x203b98},_0x1f41fb=await this['_httpService'][_0x524826(0x12d)](_0x524826(0x10b)+_0x203b98+'/delete',{'body':_0x4d96e9});return!_0x1f41fb[_0x524826(0x13b)]['error']||_0x1f41fb[_0x524826(0x13b)][_0x524826(0x147)][_0x524826(0x15e)]===0x1;}async[_0x5c421f(0x163)](_0x59e50f,_0x29c9b7,_0x2c3f7f){const _0x24b06d=_0x5c421f,_0x2aa117={'unitId':_0x59e50f,'threadId':_0x2c3f7f},_0x42329a=await this['_httpService'][_0x24b06d(0x12d)]('/universer-api/comment/unit/'+_0x59e50f+_0x24b06d(0x149),{'body':_0x2aa117}),_0xc53ecc=_0x2c3f7f[_0x24b06d(0x118)](_0xb206e0=>ee(_0x42329a[_0x24b06d(0x13b)]['comments'][_0xb206e0],_0x59e50f,_0x29c9b7))[_0x24b06d(0x115)](Boolean);return Object[_0x24b06d(0x136)](_0x42329a[_0x24b06d(0x13b)]['users'])[_0x24b06d(0x120)](_0xba9ec9=>{const _0x47d4ae=_0x24b06d;this[_0x47d4ae(0x14f)][_0x47d4ae(0x143)](_0xba9ec9);}),_0xc53ecc;}[_0x5c421f(0x15c)](_0x3f2ebf){const _0x7734ed=_0x5c421f;return{'id':_0x3f2ebf['id'],'threadId':_0x3f2ebf['threadId'],'ref':_0x3f2ebf[_0x7734ed(0x11b)]};}};f=Q([_(0x0,_0x4be273(_0x4a8660)),_(0x1,_0x4be273(_0x29b248)),_(0x2,_0x4be273(_0x3ff02a)),_(0x3,_0x4be273(_0x471303))],f);var re=Object[_0x5c421f(0x141)],te=(_0x2fc54a,_0x536877,_0x3bc166,_0x3479b9)=>{const _0x335f73=_0x5c421f;for(var _0x25b099=_0x3479b9>0x1?void 0x0:_0x3479b9?re(_0x536877,_0x3bc166):_0x536877,_0x105f61=_0x2fc54a[_0x335f73(0x11c)]-0x1,_0x1dc07b;_0x105f61>=0x0;_0x105f61--)(_0x1dc07b=_0x2fc54a[_0x105f61])&&(_0x25b099=_0x1dc07b(_0x25b099)||_0x25b099);return _0x25b099;},N=(_0x4d5157,_0x3e0a28)=>(_0x2a111e,_0x34945d)=>_0x3e0a28(_0x2a111e,_0x34945d,_0x4d5157);let g=class extends _0x51392c{constructor(_0x5c0eef,_0x2f63fe){const _0x29ec43=_0x5c421f;super(),this[_0x29ec43(0x15f)]=_0x5c0eef,this[_0x29ec43(0x12c)]=_0x2f63fe,this[_0x29ec43(0x135)]();}['_initDataSource'](){const _0x51ffa1=_0x5c421f;this[_0x51ffa1(0x15f)][_0x51ffa1(0x133)]=this[_0x51ffa1(0x12c)],this['_threadCommentDataSourceService'][_0x51ffa1(0x14b)]=!0x1;}};g=te([N(0x0,_0x153cf3),N(0x1,_0x4be273(f))],g);var se=Object[_0x5c421f(0x15d)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4fe7b8,_0x1a6867,_0x285c9f)=>_0x1a6867 in _0x4fe7b8?se(_0x4fe7b8,_0x1a6867,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x285c9f}):_0x4fe7b8[_0x1a6867]=_0x285c9f,ie=(_0x527c3a,_0x969996,_0x21c201,_0x5a918c)=>{const _0x2665f2=_0x5c421f;for(var _0x317f4b=_0x5a918c>0x1?void 0x0:_0x5a918c?oe(_0x969996,_0x21c201):_0x969996,_0x4a5949=_0x527c3a[_0x2665f2(0x11c)]-0x1,_0x360d17;_0x4a5949>=0x0;_0x4a5949--)(_0x360d17=_0x527c3a[_0x4a5949])&&(_0x317f4b=_0x360d17(_0x317f4b)||_0x317f4b);return _0x317f4b;},w=(_0x1d6490,_0x44a790)=>(_0x1d4962,_0x5980bd)=>_0x44a790(_0x1d4962,_0x5980bd,_0x1d6490),$=(_0x8f0fbb,_0x59b23f,_0x1a33c9)=>ne(_0x8f0fbb,typeof _0x59b23f!=_0x5c421f(0x11d)?_0x59b23f+'':_0x59b23f,_0x1a33c9);function _0x1281(){const _0x5e5f4a=['post','delete','disposeWithMe','createTimestamp','Solve','resolved','dataSource','_httpService','_initDataSource','values','102126tJOuwl','242KrdGyG','slice','pluginName','body','get','deleteComment','userId','Reply','12pdyTWh','getOwnPropertyDescriptor','onStarting','addUser','Solved','797252LmKyVy','unitId','error','userID','/list','302920myEzIt','syncUpdateMutationToColla','type','parentId','rangeType','_userService','_configService','commentUpdate$','getUnit','8QdVQAN','getUser','_threadCommentModel','_injector','_config','replies','145710rDEIjf','OpenOrReOpen','subscribe','saveCommentToSnapshot','defineProperty','code','_threadCommentDataSourceService','users','UNIVER_UNKNOWN','_commentService','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','size','comment','parse','COMMENT','user','UNRECOGNIZED','getMemberID','content','78875klMpGa','Add','find','onReady','updateComment','/universer-api/comment/unit/','/edit','_init','solved','setConfig','Unknown','/solved','Edit','add','reply','filter','2665539YOvBFs','102KJHGDl','map','Delete','replyId','ref','length','symbol','YYYY/MM/DD\x20HH:mm','getCurrentUser','forEach','1134903ZFcILj','rangeId','personId','resolveComment','threadId','getComment','_sessionService','root','/add','requireSession','stringify','_threadCommentDataSource'];_0x1281=function(){return _0x5e5f4a;};return _0x1281();}let b=class extends _0x2f61a2{constructor(_0x121a3e=M,_0x9cb762,_0x6a13ad){const _0x2aca2a=_0x5c421f;super(),this[_0x2aca2a(0x157)]=_0x121a3e,this[_0x2aca2a(0x156)]=_0x9cb762,this[_0x2aca2a(0x150)]=_0x6a13ad;const {..._0x327877}=_0x59e4de({},M,this[_0x2aca2a(0x157)]);this['_configService'][_0x2aca2a(0x10f)](z,_0x327877);}[_0x5c421f(0x142)](){const _0x4cea0c=_0x5c421f;[[f],[g],[S]][_0x4cea0c(0x120)](_0x5b3870=>{const _0x3bc55d=_0x4cea0c;this[_0x3bc55d(0x156)][_0x3bc55d(0x113)](_0x5b3870);});}[_0x5c421f(0x109)](){const _0x48f2e0=_0x5c421f;this[_0x48f2e0(0x156)][_0x48f2e0(0x13c)](g),this[_0x48f2e0(0x156)][_0x48f2e0(0x13c)](S);}};$(b,_0x5c421f(0x13a),W),$(b,_0x5c421f(0x14c),_0x526006[_0x5c421f(0x161)]),b=ie([_0x841586(_0xcc5e7,_0x204479,_0x4310b8),w(0x1,_0x4be273(_0x471303)),w(0x2,_0x476c9d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x17b82a=_0x715e;(function(_0x4e841e,_0x5093c3){const _0x4231f1=_0x715e,_0x5cf7e7=_0x4e841e();while(!![]){try{const _0x599098=parseInt(_0x4231f1(0x101))/0x1*(parseInt(_0x4231f1(0x119))/0x2)+-parseInt(_0x4231f1(0x10a))/0x3+parseInt(_0x4231f1(0x10e))/0x4*(-parseInt(_0x4231f1(0xdb))/0x5)+parseInt(_0x4231f1(0xfc))/0x6+parseInt(_0x4231f1(0x11d))/0x7+parseInt(_0x4231f1(0x125))/0x8+parseInt(_0x4231f1(0x11a))/0x9;if(_0x599098===_0x5093c3)break;else _0x5cf7e7['push'](_0x5cf7e7['shift']());}catch(_0x44dfb1){_0x5cf7e7['push'](_0x5cf7e7['shift']());}}}(_0x3526,0x3a148));import{CommentService as _0x3a2a96,CollaborationSessionService as _0x19d43c,UniverCollaborationClientPlugin as _0x19e911}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219f24}from'@univerjs-pro/license';import{dayjs as _0x3a7d70,UserManagerService as _0x350584,Inject as _0x4128a6,Injector as _0x4d52d5,Disposable as _0x546ddf,CustomRangeType as _0x25d92a,UniverInstanceType as _0x4c85bc,DependentOn as _0x5b1abb,IConfigService as _0x17181b,Plugin as _0x235c2b,merge as _0x5886d2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21ed2e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37d2c5,IThreadCommentDataSourceService as _0xc19607}from'@univerjs/thread-comment';function _0x3526(){const _0x59ec1b=['userID','Edit','payload','_userService','pipe','parentId','addUser','content','getOwnPropertyDescriptor','_commentService','_configService','createTimestamp','218005HGGnsY','_initUserSync','UNRECOGNIZED','customRanges','format','stringify','_injector','resolveComment','symbol','code','Reply','COMMENT','_threadCommentModel','Solved','_sessionService','saveCommentToSnapshot','comment','/universer-api/comment/unit/','/add','threadId','root','unitId','deleteComment','reply','find','replies','commentUpdate$','thread-comment-data-source.config','_initDataSource','resolved','map','error','_threadCommentDataSource','20688TWdKlp','getMemberID','defineProperty','forEach','delete','17707HmUuaf','getUnit','addComment','body','_httpService','parse','type','subscribe','length','821046oVofEj','_threadCommentDataSourceService','solved','rangeId','4DzEzvr','listComments','/solved','rangeType','onReady','getUser','post','OpenOrReOpen','slice','Solve','_init','16sYPKRz','460431WaNFex','userId','YYYY/MM/DD\x20HH:mm','1138473wXHXfj','updateComment','/reply','filter','/list','_config','requireSession','disposeWithMe','1570216iBNWBR','Delete','getCurrentUser','/edit','Add','personId','users','get','getComment','add','setConfig','replyId','syncUpdateMutationToColla','size','UNIVER_UNKNOWN'];_0x3526=function(){return _0x59ec1b;};return _0x3526();}import{bufferTime as _0x2badf2}from'rxjs';import{HTTPService as _0x2b51a3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d95d1=>(_0x4d95d1[_0x4d95d1['OpenOrReOpen']=0x0]=_0x17b82a(0x115),_0x4d95d1[_0x4d95d1['Solved']=0x1]=_0x17b82a(0xe8),_0x4d95d1[_0x4d95d1[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x4d95d1))(I||{}),v=(_0x205eb5=>(_0x205eb5[_0x205eb5['Unknown']=0x0]='Unknown',_0x205eb5[_0x205eb5[_0x17b82a(0x129)]=0x1]=_0x17b82a(0x129),_0x205eb5[_0x205eb5[_0x17b82a(0xe5)]=0x2]=_0x17b82a(0xe5),_0x205eb5[_0x205eb5[_0x17b82a(0x135)]=0x3]=_0x17b82a(0x135),_0x205eb5[_0x205eb5[_0x17b82a(0x126)]=0x4]='Delete',_0x205eb5[_0x205eb5[_0x17b82a(0x117)]=0x5]='Solve',_0x205eb5[_0x205eb5[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x205eb5))(v||{});const D=_0x4ccf30=>_0x3a7d70(new Date(+_0x4ccf30))[_0x17b82a(0xdf)](_0x17b82a(0x11c)),B=async(_0xa869a1,_0x425d4a)=>{const _0x4e4138=_0x17b82a,_0x3b1afa=_0xa869a1['get'](_0x350584),_0xc624f5=_0xa869a1[_0x4e4138(0x12c)](_0x2b51a3);_0x425d4a[_0x4e4138(0xff)](_0x4623d6=>{const _0x511586=_0x4e4138;_0x3b1afa[_0x511586(0x113)](_0x4623d6)&&_0x425d4a[_0x511586(0x100)](_0x4623d6);}),_0x425d4a[_0x4e4138(0x132)]&&(await _0xc624f5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x425d4a]}}))[_0x4e4138(0x104)][_0x4e4138(0x12b)][_0x4e4138(0xff)](_0x17cfb7=>{const _0xe8d197=_0x4e4138;_0x17cfb7&&_0x3b1afa[_0xe8d197(0x13a)](_0x17cfb7);});};var K=Object[_0x17b82a(0x13c)],V=(_0x4f079f,_0x162339,_0x41a461,_0x53c732)=>{const _0x5a1243=_0x17b82a;for(var _0x5628fd=_0x53c732>0x1?void 0x0:_0x53c732?K(_0x162339,_0x41a461):_0x162339,_0x46943f=_0x4f079f[_0x5a1243(0x109)]-0x1,_0x25b76c;_0x46943f>=0x0;_0x46943f--)(_0x25b76c=_0x4f079f[_0x46943f])&&(_0x5628fd=_0x25b76c(_0x5628fd)||_0x5628fd);return _0x5628fd;},p=(_0x4df034,_0x284f92)=>(_0x2a035c,_0x370215)=>_0x284f92(_0x2a035c,_0x370215,_0x4df034);let S=class extends _0x546ddf{constructor(_0xbc44d0,_0xd291ec,_0x1e5fdf,_0x55c841){const _0x2ff66b=_0x17b82a;super(),this[_0x2ff66b(0x13d)]=_0xbc44d0,this[_0x2ff66b(0xe7)]=_0xd291ec,this[_0x2ff66b(0x137)]=_0x1e5fdf,this[_0x2ff66b(0xe1)]=_0x55c841,this[_0x2ff66b(0x118)](),this[_0x2ff66b(0xdc)]();}['_initUserSync'](){const _0x42d530=_0x17b82a;this[_0x42d530(0x124)](this[_0x42d530(0xe7)][_0x42d530(0xf5)][_0x42d530(0x138)](_0x2badf2(0x10))[_0x42d530(0x108)](_0xec9880=>{const _0x5b74a0=_0x42d530,_0x1f3630=new Set();_0xec9880[_0x5b74a0(0xff)](_0x5b5c63=>{const _0x83a605=_0x5b74a0;switch(_0x5b5c63[_0x83a605(0x107)]){case'add':{const _0x23a8e9=_0x5b5c63[_0x83a605(0x136)][_0x83a605(0x12a)];_0x1f3630['add'](_0x23a8e9);break;}}}),B(this[_0x5b74a0(0xe1)],_0x1f3630);}));}[_0x17b82a(0x118)](){const _0x1649d0=_0x17b82a;this[_0x1649d0(0x124)](this[_0x1649d0(0x13d)][_0x1649d0(0xf5)]['subscribe'](async _0x5a4c20=>{const _0x9c2efe=_0x1649d0;var _0x3c4970,_0x44043c,_0x46a65a,_0x35900c;const _0x46d982=(_0x3c4970=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x3d8083=>_0x3d8083['threadId']===_0x5a4c20['threadId']))==null?void 0x0:_0x3c4970[_0x9c2efe(0xef)];if(!_0x46d982)return;const {unitId:_0x34a78a,subUnitId:_0x5ab8bb}=_0x46d982;switch(_0x5a4c20['user']&&this['_userService'][_0x9c2efe(0x13a)](_0x5a4c20['user']),_0x5a4c20['type']){case v[_0x9c2efe(0x129)]:break;case v[_0x9c2efe(0xe5)]:{this['_threadCommentModel']['addComment'](_0x34a78a,_0x5ab8bb,{'unitId':_0x34a78a,'subUnitId':_0x5ab8bb,'ref':'','id':_0x5a4c20[_0x9c2efe(0x130)],'dT':D(+_0x5a4c20[_0x9c2efe(0x13f)]),'threadId':_0x5a4c20['threadId'],'personId':(_0x46a65a=(_0x44043c=_0x5a4c20['user'])==null?void 0x0:_0x44043c[_0x9c2efe(0x134)])!=null?_0x46a65a:_0x5a4c20[_0x9c2efe(0x11b)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)]),'parentId':_0x46d982['id']});break;}case v[_0x9c2efe(0x126)]:{const _0x16c9db=this[_0x9c2efe(0xe7)][_0x9c2efe(0x12d)](_0x34a78a,_0x5ab8bb,_0x5a4c20['replyId']);_0x16c9db&&_0x16c9db[_0x9c2efe(0x139)]&&this['_threadCommentModel'][_0x9c2efe(0xf1)](_0x34a78a,_0x5ab8bb,_0x5a4c20[_0x9c2efe(0x130)]);break;}case v[_0x9c2efe(0x135)]:{this['_threadCommentModel'][_0x9c2efe(0x11e)](_0x34a78a,_0x5ab8bb,{'commentId':_0x5a4c20[_0x9c2efe(0x130)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)])});break;}case v[_0x9c2efe(0x117)]:{const _0x1041e3=(_0x35900c=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x567ac2=>_0x567ac2[_0x9c2efe(0xee)]===_0x5a4c20['threadId']))==null?void 0x0:_0x35900c['root'];_0x1041e3&&this['_threadCommentModel']['resolveComment'](_0x34a78a,_0x5ab8bb,_0x1041e3['id'],_0x5a4c20['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4128a6(_0x3a2a96)),p(0x1,_0x4128a6(_0x37d2c5)),p(0x2,_0x4128a6(_0x350584)),p(0x3,_0x4128a6(_0x4d52d5))],S);const z=_0x17b82a(0xf6),M={};var k=Object[_0x17b82a(0x13c)],Q=(_0x201cde,_0x5b6cfc,_0x6091a1,_0x30641c)=>{for(var _0x5bde4f=_0x30641c>0x1?void 0x0:_0x30641c?k(_0x5b6cfc,_0x6091a1):_0x5b6cfc,_0x546446=_0x201cde['length']-0x1,_0x58c55f;_0x546446>=0x0;_0x546446--)(_0x58c55f=_0x201cde[_0x546446])&&(_0x5bde4f=_0x58c55f(_0x5bde4f)||_0x5bde4f);return _0x5bde4f;},_=(_0x168ac4,_0x4eaac1)=>(_0x44c667,_0x13dbaa)=>_0x4eaac1(_0x44c667,_0x13dbaa,_0x168ac4);function X(_0x44002b,_0x531905){const _0x357b0a=_0x17b82a,_0x412638=_0x44002b['replies'][0x0];return{..._0x531905,'id':_0x412638[_0x357b0a(0x130)],'resolved':_0x44002b[_0x357b0a(0x10c)]===0x1,'dT':D(_0x412638[_0x357b0a(0x13f)]),'personId':_0x412638[_0x357b0a(0x11b)],'threadId':_0x412638[_0x357b0a(0xee)]};}function ee(_0x2a5ea5,_0x33d41a,_0x518030){const _0x1eb974=_0x17b82a;var _0x42278c,_0x1f360d;if(((_0x1f360d=(_0x42278c=_0x2a5ea5==null?void 0x0:_0x2a5ea5[_0x1eb974(0xf4)])==null?void 0x0:_0x42278c['length'])!=null?_0x1f360d:0x0)>0x0){const _0x799fcf=(_0x440e38,_0x4b6841)=>({'id':_0x440e38['replyId'],'threadId':_0x440e38[_0x1eb974(0xee)],'dT':D(_0x440e38['createTimestamp']),'personId':_0x440e38['userId'],'resolved':_0x2a5ea5['solved']===I[_0x1eb974(0xe8)],'unitId':_0x33d41a,'subUnitId':_0x518030,'text':JSON[_0x1eb974(0x106)](_0x440e38[_0x1eb974(0x13b)]),'parentId':_0x4b6841}),_0x4c7cd2=_0x799fcf(_0x2a5ea5[_0x1eb974(0xf4)][0x0]);return{..._0x4c7cd2,'children':_0x2a5ea5[_0x1eb974(0xf4)][_0x1eb974(0x116)](0x1)[_0x1eb974(0xf9)](_0x4b8de7=>_0x799fcf(_0x4b8de7,_0x4c7cd2['id']))};}return null;}let f=class{constructor(_0x11b759,_0x162509,_0x1b9be4,_0x3e3a17){const _0x3ec8dd=_0x17b82a;this[_0x3ec8dd(0x105)]=_0x11b759,this['_userService']=_0x162509,this['_sessionService']=_0x1b9be4,this[_0x3ec8dd(0xe1)]=_0x3e3a17;}async[_0x17b82a(0x103)](_0x239561){const _0x526c73=_0x17b82a;var _0x4d0b4b,_0x326e59;const {parentId:_0x2c42fe,unitId:_0x2c695e,text:_0x4990f4,threadId:_0x589601}=_0x239561,_0x515fc7=(_0x326e59=(_0x4d0b4b=_0x4990f4[_0x526c73(0xde)])==null?void 0x0:_0x4d0b4b[_0x526c73(0x120)](_0x15d9e5=>_0x15d9e5[_0x526c73(0x111)]===_0x25d92a['COMMENT'])[_0x526c73(0xf9)](_0x4aa213=>_0x4aa213[_0x526c73(0x10d)]))!=null?_0x326e59:[],_0x2866f1=JSON['stringify'](_0x4990f4),_0x4e53c9=(await this['_sessionService'][_0x526c73(0x123)](_0x2c695e))[_0x526c73(0xfd)]();if(_0x2c42fe){const _0x4660e8={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7,'threadId':_0x589601},_0x3b052c=(await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0x11f),{'body':_0x4660e8}))['body'][_0x526c73(0xf2)];return{..._0x239561,'id':_0x3b052c[_0x526c73(0x130)],'dT':_0x3a7d70(+_0x3b052c[_0x526c73(0x13f)])[_0x526c73(0xdf)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b052c[_0x526c73(0x11b)]};}else{const _0x1545b0={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7},_0x315eef=await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0xed),{'body':_0x1545b0});return X(_0x315eef[_0x526c73(0x104)][_0x526c73(0xeb)],_0x239561);}}async['updateComment'](_0x31f3e6){const _0x3e815c=_0x17b82a;var _0xc710d5,_0x123d96;const {text:_0x3c1cfb,unitId:_0x579cbb}=_0x31f3e6,_0x66ea90=(_0x123d96=(_0xc710d5=_0x3c1cfb[_0x3e815c(0xde)])==null?void 0x0:_0xc710d5[_0x3e815c(0x120)](_0x261fa0=>_0x261fa0['rangeType']===_0x25d92a[_0x3e815c(0xe6)])[_0x3e815c(0xf9)](_0x2801ed=>_0x2801ed[_0x3e815c(0x10d)]))!=null?_0x123d96:[],_0x2650db=JSON[_0x3e815c(0xe0)](_0x3c1cfb),_0x320fd1=_0x31f3e6[_0x3e815c(0xee)],_0x5cfc65=_0x31f3e6['id'],_0x20cf92={'memberId':(await this['_sessionService'][_0x3e815c(0x123)](_0x579cbb))[_0x3e815c(0xfd)](),'unitId':_0x579cbb,'threadId':_0x320fd1,'mention':_0x66ea90,'content':_0x2650db,'replyId':_0x5cfc65},_0x3d8281=await this[_0x3e815c(0x105)]['post'](_0x3e815c(0xec)+_0x579cbb+_0x3e815c(0x128),{'body':_0x20cf92});return!_0x3d8281[_0x3e815c(0x104)][_0x3e815c(0xfa)]||_0x3d8281['body'][_0x3e815c(0xfa)][_0x3e815c(0xe4)]===0x1;}async[_0x17b82a(0xe2)](_0x160dc3){const _0x3a08bf=_0x17b82a,{unitId:_0x54ec44}=_0x160dc3,_0x561c86=_0x160dc3['threadId'],_0x3929b8={'memberId':this[_0x3a08bf(0x137)][_0x3a08bf(0x127)]()[_0x3a08bf(0x134)],'unitId':_0x54ec44,'threadId':_0x561c86,'solved':_0x160dc3[_0x3a08bf(0xf8)]?I[_0x3a08bf(0xe8)]:I['OpenOrReOpen']},_0x2bcc31=await this['_httpService']['post'](_0x3a08bf(0xec)+_0x54ec44+_0x3a08bf(0x110),{'body':_0x3929b8});return!_0x2bcc31['body']['error']||_0x2bcc31[_0x3a08bf(0x104)][_0x3a08bf(0xfa)][_0x3a08bf(0xe4)]===0x1;}async[_0x17b82a(0xf1)](_0x2c537b,_0x1769e2,_0xd79cf0,_0xae8210){const _0x277173=_0x17b82a,_0x517b21={'memberId':(await this[_0x277173(0xe9)]['requireSession'](_0x2c537b))[_0x277173(0xfd)](),'threadId':_0xd79cf0,'replyId':_0xae8210,'unitId':_0x2c537b},_0x2c754c=await this[_0x277173(0x105)][_0x277173(0x114)](_0x277173(0xec)+_0x2c537b+'/delete',{'body':_0x517b21});return!_0x2c754c[_0x277173(0x104)][_0x277173(0xfa)]||_0x2c754c[_0x277173(0x104)]['error'][_0x277173(0xe4)]===0x1;}async[_0x17b82a(0x10f)](_0xd04887,_0x20e1a7,_0x4d8c57){const _0x4a02e8=_0x17b82a,_0x46a642={'unitId':_0xd04887,'threadId':_0x4d8c57},_0x2218f1=await this[_0x4a02e8(0x105)][_0x4a02e8(0x114)](_0x4a02e8(0xec)+_0xd04887+_0x4a02e8(0x121),{'body':_0x46a642}),_0x291b60=_0x4d8c57['map'](_0x5c9938=>ee(_0x2218f1[_0x4a02e8(0x104)]['comments'][_0x5c9938],_0xd04887,_0x20e1a7))['filter'](Boolean);return Object['values'](_0x2218f1[_0x4a02e8(0x104)][_0x4a02e8(0x12b)])[_0x4a02e8(0xff)](_0x2ae379=>{const _0x248b37=_0x4a02e8;this['_userService'][_0x248b37(0x13a)](_0x2ae379);}),_0x291b60;}[_0x17b82a(0xea)](_0x2ef80f){const _0x3ba083=_0x17b82a;return{'id':_0x2ef80f['id'],'threadId':_0x2ef80f[_0x3ba083(0xee)],'ref':_0x2ef80f['ref']};}};f=Q([_(0x0,_0x4128a6(_0x2b51a3)),_(0x1,_0x4128a6(_0x350584)),_(0x2,_0x4128a6(_0x19d43c)),_(0x3,_0x4128a6(_0x4d52d5))],f);var re=Object[_0x17b82a(0x13c)],te=(_0x3237b3,_0x46db88,_0x317ff0,_0x56def5)=>{const _0x26e7a3=_0x17b82a;for(var _0x21217a=_0x56def5>0x1?void 0x0:_0x56def5?re(_0x46db88,_0x317ff0):_0x46db88,_0x38599d=_0x3237b3[_0x26e7a3(0x109)]-0x1,_0x31a63f;_0x38599d>=0x0;_0x38599d--)(_0x31a63f=_0x3237b3[_0x38599d])&&(_0x21217a=_0x31a63f(_0x21217a)||_0x21217a);return _0x21217a;},N=(_0x44bb67,_0x1c0ee4)=>(_0x4307ff,_0x11b61d)=>_0x1c0ee4(_0x4307ff,_0x11b61d,_0x44bb67);let g=class extends _0x546ddf{constructor(_0x17ec65,_0x2e1056){const _0x1360f4=_0x17b82a;super(),this['_threadCommentDataSourceService']=_0x17ec65,this[_0x1360f4(0xfb)]=_0x2e1056,this[_0x1360f4(0xf7)]();}['_initDataSource'](){const _0x51b820=_0x17b82a;this['_threadCommentDataSourceService']['dataSource']=this[_0x51b820(0xfb)],this[_0x51b820(0x10b)][_0x51b820(0x131)]=!0x1;}};g=te([N(0x0,_0xc19607),N(0x1,_0x4128a6(f))],g);var se=Object[_0x17b82a(0xfe)],oe=Object[_0x17b82a(0x13c)],ne=(_0x143215,_0xa11d85,_0x40d424)=>_0xa11d85 in _0x143215?se(_0x143215,_0xa11d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40d424}):_0x143215[_0xa11d85]=_0x40d424,ie=(_0x14492c,_0x2b7a57,_0x515b3a,_0x1e5748)=>{const _0x34b283=_0x17b82a;for(var _0x7ac608=_0x1e5748>0x1?void 0x0:_0x1e5748?oe(_0x2b7a57,_0x515b3a):_0x2b7a57,_0x29c895=_0x14492c[_0x34b283(0x109)]-0x1,_0x2acb9c;_0x29c895>=0x0;_0x29c895--)(_0x2acb9c=_0x14492c[_0x29c895])&&(_0x7ac608=_0x2acb9c(_0x7ac608)||_0x7ac608);return _0x7ac608;},w=(_0x73ddf8,_0x2e2ce9)=>(_0x326606,_0x41f52e)=>_0x2e2ce9(_0x326606,_0x41f52e,_0x73ddf8),$=(_0x20fb44,_0x3a98f1,_0x3d057b)=>ne(_0x20fb44,typeof _0x3a98f1!=_0x17b82a(0xe3)?_0x3a98f1+'':_0x3a98f1,_0x3d057b);let b=class extends _0x235c2b{constructor(_0xf7fdcd=M,_0x152b1f,_0xad410a){const _0x4108e=_0x17b82a;super(),this['_config']=_0xf7fdcd,this[_0x4108e(0xe1)]=_0x152b1f,this[_0x4108e(0x13e)]=_0xad410a;const {..._0x2e14f7}=_0x5886d2({},M,this[_0x4108e(0x122)]);this[_0x4108e(0x13e)][_0x4108e(0x12f)](z,_0x2e14f7);}['onStarting'](){const _0x1d298c=_0x17b82a;[[f],[g],[S]][_0x1d298c(0xff)](_0xc98e7e=>{const _0x119e64=_0x1d298c;this[_0x119e64(0xe1)][_0x119e64(0x12e)](_0xc98e7e);});}[_0x17b82a(0x112)](){const _0x45abec=_0x17b82a;this[_0x45abec(0xe1)][_0x45abec(0x12c)](g),this[_0x45abec(0xe1)]['get'](S);}};function _0x715e(_0x1869f7,_0x394278){const _0x352680=_0x3526();return _0x715e=function(_0x715e5a,_0x59550c){_0x715e5a=_0x715e5a-0xdb;let _0x2ef194=_0x352680[_0x715e5a];return _0x2ef194;},_0x715e(_0x1869f7,_0x394278);}$(b,'pluginName',W),$(b,_0x17b82a(0x107),_0x4c85bc[_0x17b82a(0x133)]),b=ie([_0x5b1abb(_0x21ed2e,_0x19e911,_0x219f24),w(0x1,_0x4128a6(_0x4d52d5)),w(0x2,_0x17181b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1fe3d6,_0x42b43c){const _0x1cfb0d=_0x5877,_0x40a771=_0x1fe3d6();while(!![]){try{const _0x393d6a=-parseInt(_0x1cfb0d(0xdb))/0x1*(-parseInt(_0x1cfb0d(0x106))/0x2)+parseInt(_0x1cfb0d(0x136))/0x3*(-parseInt(_0x1cfb0d(0xe9))/0x4)+parseInt(_0x1cfb0d(0x12a))/0x5*(-parseInt(_0x1cfb0d(0x128))/0x6)+parseInt(_0x1cfb0d(0xd9))/0x7*(-parseInt(_0x1cfb0d(0x121))/0x8)+parseInt(_0x1cfb0d(0xcb))/0x9*(-parseInt(_0x1cfb0d(0x103))/0xa)+parseInt(_0x1cfb0d(0x11e))/0xb*(parseInt(_0x1cfb0d(0xd6))/0xc)+-parseInt(_0x1cfb0d(0xc1))/0xd*(-parseInt(_0x1cfb0d(0x133))/0xe);if(_0x393d6a===_0x42b43c)break;else _0x40a771['push'](_0x40a771['shift']());}catch(_0x3282d5){_0x40a771['push'](_0x40a771['shift']());}}}(_0x27d3,0x43936),function(_0x42c266,_0x15c99e){const _0x591d3f=_0x5877;typeof exports==_0x591d3f(0xf7)&&typeof module<'u'?_0x15c99e(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[_0x591d3f(0x145)]?define([_0x591d3f(0x127),_0x591d3f(0x132),_0x591d3f(0xd5),_0x591d3f(0x14b),_0x591d3f(0xe8),_0x591d3f(0xc2),_0x591d3f(0xf9),'@univerjs/network'],_0x15c99e):(_0x42c266=typeof globalThis<'u'?globalThis:_0x42c266||self,_0x15c99e(_0x42c266[_0x591d3f(0xda)]={},_0x42c266[_0x591d3f(0x110)],_0x42c266[_0x591d3f(0xfe)],_0x42c266[_0x591d3f(0x147)],_0x42c266[_0x591d3f(0xcc)],_0x42c266[_0x591d3f(0x123)],_0x42c266[_0x591d3f(0xf9)],_0x42c266['UniverNetwork']));}(this,function(_0x3121ed,_0x15eb53,_0x1a2464,_0x10e0f2,_0x3f6cf5,_0x5daa1c,_0x4af7fd,_0x5e4ef0){'use strict';const _0x310bd3=_0x5877;const _0x4eeec8=_0x310bd3(0xc9);var _0x5ad6e3=(_0x23a1ec=>(_0x23a1ec[_0x23a1ec['OpenOrReOpen']=0x0]=_0x310bd3(0x138),_0x23a1ec[_0x23a1ec['Solved']=0x1]=_0x310bd3(0x12d),_0x23a1ec[_0x23a1ec['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x23a1ec))(_0x5ad6e3||{}),_0x560c63=(_0x579f2d=>(_0x579f2d[_0x579f2d[_0x310bd3(0xe6)]=0x0]=_0x310bd3(0xe6),_0x579f2d[_0x579f2d[_0x310bd3(0x14a)]=0x1]='Add',_0x579f2d[_0x579f2d[_0x310bd3(0xe4)]=0x2]=_0x310bd3(0xe4),_0x579f2d[_0x579f2d[_0x310bd3(0x13f)]=0x3]=_0x310bd3(0x13f),_0x579f2d[_0x579f2d[_0x310bd3(0x122)]=0x4]=_0x310bd3(0x122),_0x579f2d[_0x579f2d['Solve']=0x5]=_0x310bd3(0x11f),_0x579f2d[_0x579f2d['UNRECOGNIZED']=-0x1]=_0x310bd3(0x144),_0x579f2d))(_0x560c63||{});const _0x25ff08=_0x4a501a=>_0x10e0f2['dayjs'](new Date(+_0x4a501a))['format'](_0x310bd3(0x105)),_0x31b41d=async(_0x25f007,_0x3a194a)=>{const _0x737ba6=_0x310bd3,_0x5e750b=_0x25f007['get'](_0x10e0f2[_0x737ba6(0xfd)]),_0x5fc989=_0x25f007[_0x737ba6(0x141)](_0x5e4ef0[_0x737ba6(0x130)]);_0x3a194a['forEach'](_0x4a8673=>{const _0x53f806=_0x737ba6;_0x5e750b[_0x53f806(0x10a)](_0x4a8673)&&_0x3a194a[_0x53f806(0xd0)](_0x4a8673);}),_0x3a194a['size']&&(await _0x5fc989[_0x737ba6(0x141)](_0x737ba6(0xeb),{'params':{'userIDs':[..._0x3a194a]}}))[_0x737ba6(0xc6)][_0x737ba6(0xc3)][_0x737ba6(0x101)](_0x50e44d=>{const _0xeb4f98=_0x737ba6;_0x50e44d&&_0x5e750b[_0xeb4f98(0x11b)](_0x50e44d);});};var _0x3f9906=Object[_0x310bd3(0x118)],_0x2ca8e8=(_0x29d1e4,_0x30ddaa,_0x49f37b,_0x3a3433)=>{const _0xe509=_0x310bd3;for(var _0x11b6be=_0x3a3433>0x1?void 0x0:_0x3a3433?_0x3f9906(_0x30ddaa,_0x49f37b):_0x30ddaa,_0x53c94b=_0x29d1e4[_0xe509(0xe0)]-0x1,_0x248f34;_0x53c94b>=0x0;_0x53c94b--)(_0x248f34=_0x29d1e4[_0x53c94b])&&(_0x11b6be=_0x248f34(_0x11b6be)||_0x11b6be);return _0x11b6be;},_0xecac7d=(_0x1ccb52,_0x151950)=>(_0xbf95db,_0x31f6d8)=>_0x151950(_0xbf95db,_0x31f6d8,_0x1ccb52);let _0x8bf77e=class extends _0x10e0f2['Disposable']{constructor(_0x4fca1b,_0x539c88,_0x497fb5,_0x4ce3f5){const _0x307aa5=_0x310bd3;super(),this[_0x307aa5(0x148)]=_0x4fca1b,this[_0x307aa5(0x142)]=_0x539c88,this[_0x307aa5(0xe1)]=_0x497fb5,this[_0x307aa5(0x109)]=_0x4ce3f5,this['_init'](),this[_0x307aa5(0x146)]();}[_0x310bd3(0x146)](){const _0x10e91d=_0x310bd3;this[_0x10e91d(0xfa)](this[_0x10e91d(0x142)][_0x10e91d(0x13a)]['pipe'](_0x4af7fd[_0x10e91d(0x139)](0x10))[_0x10e91d(0xdc)](_0x23c6b4=>{const _0x3f1007=_0x10e91d,_0x56ac74=new Set();_0x23c6b4[_0x3f1007(0x101)](_0xc74d38=>{const _0x4700ff=_0x3f1007;switch(_0xc74d38[_0x4700ff(0x131)]){case'add':{const _0x135969=_0xc74d38['payload'][_0x4700ff(0xc8)];_0x56ac74[_0x4700ff(0x119)](_0x135969);break;}}}),_0x31b41d(this[_0x3f1007(0x109)],_0x56ac74);}));}['_init'](){const _0x5af2b6=_0x310bd3;this[_0x5af2b6(0xfa)](this[_0x5af2b6(0x148)]['commentUpdate$'][_0x5af2b6(0xdc)](async _0xda31f0=>{const _0x3c598b=_0x5af2b6;var _0x3c6375,_0x1a907f,_0x469661,_0x577430;const _0x4b50dc=(_0x3c6375=this[_0x3c598b(0x142)][_0x3c598b(0x124)](_0xda31f0[_0x3c598b(0x13c)])[_0x3c598b(0xe7)](_0x4a0e07=>_0x4a0e07[_0x3c598b(0xd4)]===_0xda31f0[_0x3c598b(0xd4)]))==null?void 0x0:_0x3c6375[_0x3c598b(0x11a)];if(!_0x4b50dc)return;const {unitId:_0x62c21f,subUnitId:_0x110431}=_0x4b50dc;switch(_0xda31f0[_0x3c598b(0x107)]&&this[_0x3c598b(0xe1)][_0x3c598b(0x11b)](_0xda31f0[_0x3c598b(0x107)]),_0xda31f0[_0x3c598b(0x131)]){case _0x560c63[_0x3c598b(0x14a)]:break;case _0x560c63['Reply']:{this['_threadCommentModel'][_0x3c598b(0x13e)](_0x62c21f,_0x110431,{'unitId':_0x62c21f,'subUnitId':_0x110431,'ref':'','id':_0xda31f0[_0x3c598b(0xf1)],'dT':_0x25ff08(+_0xda31f0['createTimestamp']),'threadId':_0xda31f0[_0x3c598b(0xd4)],'personId':(_0x469661=(_0x1a907f=_0xda31f0[_0x3c598b(0x107)])==null?void 0x0:_0x1a907f[_0x3c598b(0xd8)])!=null?_0x469661:_0xda31f0[_0x3c598b(0xef)],'text':JSON['parse'](_0xda31f0['content']),'parentId':_0x4b50dc['id']});break;}case _0x560c63[_0x3c598b(0x122)]:{const _0xa14e8b=this[_0x3c598b(0x142)][_0x3c598b(0x13d)](_0x62c21f,_0x110431,_0xda31f0[_0x3c598b(0xf1)]);_0xa14e8b&&_0xa14e8b[_0x3c598b(0x102)]&&this[_0x3c598b(0x142)][_0x3c598b(0x125)](_0x62c21f,_0x110431,_0xda31f0[_0x3c598b(0xf1)]);break;}case _0x560c63[_0x3c598b(0x13f)]:{this['_threadCommentModel']['updateComment'](_0x62c21f,_0x110431,{'commentId':_0xda31f0[_0x3c598b(0xf1)],'text':JSON[_0x3c598b(0x112)](_0xda31f0['content'])});break;}case _0x560c63[_0x3c598b(0x11f)]:{const _0x2c2942=(_0x577430=this[_0x3c598b(0x142)][_0x3c598b(0x124)](_0xda31f0[_0x3c598b(0x13c)])[_0x3c598b(0xe7)](_0x222046=>_0x222046[_0x3c598b(0xd4)]===_0xda31f0[_0x3c598b(0xd4)]))==null?void 0x0:_0x577430[_0x3c598b(0x11a)];_0x2c2942&&this[_0x3c598b(0x142)][_0x3c598b(0xe5)](_0x62c21f,_0x110431,_0x2c2942['id'],_0xda31f0[_0x3c598b(0x135)]===_0x5ad6e3['Solved']);break;}}}));}};_0x8bf77e=_0x2ca8e8([_0xecac7d(0x0,_0x10e0f2['Inject'](_0x15eb53[_0x310bd3(0xfc)])),_0xecac7d(0x1,_0x10e0f2[_0x310bd3(0xf8)](_0x5daa1c['ThreadCommentModel'])),_0xecac7d(0x2,_0x10e0f2[_0x310bd3(0xf8)](_0x10e0f2[_0x310bd3(0xfd)])),_0xecac7d(0x3,_0x10e0f2[_0x310bd3(0xf8)](_0x10e0f2[_0x310bd3(0x12c)]))],_0x8bf77e);const _0x455aff='thread-comment-data-source.config',_0x5b94c0={};var _0x1b9e99=Object[_0x310bd3(0x118)],_0x1bd0fc=(_0x11adaa,_0x53e2ae,_0x3d8be4,_0x33308e)=>{const _0x184a53=_0x310bd3;for(var _0x5d5a92=_0x33308e>0x1?void 0x0:_0x33308e?_0x1b9e99(_0x53e2ae,_0x3d8be4):_0x53e2ae,_0x165d6e=_0x11adaa[_0x184a53(0xe0)]-0x1,_0x12837f;_0x165d6e>=0x0;_0x165d6e--)(_0x12837f=_0x11adaa[_0x165d6e])&&(_0x5d5a92=_0x12837f(_0x5d5a92)||_0x5d5a92);return _0x5d5a92;},_0x263ba7=(_0x34330d,_0x581c0a)=>(_0x4919f2,_0x193d37)=>_0x581c0a(_0x4919f2,_0x193d37,_0x34330d);function _0x2d3dbe(_0x5a3ff4,_0x4174f6){const _0x4caf18=_0x310bd3,_0x1b97c4=_0x5a3ff4[_0x4caf18(0xdf)][0x0];return{..._0x4174f6,'id':_0x1b97c4[_0x4caf18(0xf1)],'resolved':_0x5a3ff4[_0x4caf18(0x135)]===0x1,'dT':_0x25ff08(_0x1b97c4[_0x4caf18(0xee)]),'personId':_0x1b97c4[_0x4caf18(0xef)],'threadId':_0x1b97c4['threadId']};}function _0x3c5863(_0x4d7c60,_0x7cb273,_0x5b111d){const _0x3c721a=_0x310bd3;var _0x4106b3,_0x417f09;if(((_0x417f09=(_0x4106b3=_0x4d7c60==null?void 0x0:_0x4d7c60[_0x3c721a(0xdf)])==null?void 0x0:_0x4106b3[_0x3c721a(0xe0)])!=null?_0x417f09:0x0)>0x0){const _0x583947=(_0x497b04,_0x354c4c)=>({'id':_0x497b04[_0x3c721a(0xf1)],'threadId':_0x497b04[_0x3c721a(0xd4)],'dT':_0x25ff08(_0x497b04[_0x3c721a(0xee)]),'personId':_0x497b04[_0x3c721a(0xef)],'resolved':_0x4d7c60[_0x3c721a(0x135)]===_0x5ad6e3['Solved'],'unitId':_0x7cb273,'subUnitId':_0x5b111d,'text':JSON[_0x3c721a(0x112)](_0x497b04[_0x3c721a(0x12e)]),'parentId':_0x354c4c}),_0x4b75b4=_0x583947(_0x4d7c60[_0x3c721a(0xdf)][0x0]);return{..._0x4b75b4,'children':_0x4d7c60['replies'][_0x3c721a(0x108)](0x1)[_0x3c721a(0x134)](_0x133722=>_0x583947(_0x133722,_0x4b75b4['id']))};}return null;}let _0x162719=class{constructor(_0x3e3f60,_0x4f642e,_0x1daba2,_0x4a5aca){const _0x585efd=_0x310bd3;this[_0x585efd(0xfb)]=_0x3e3f60,this[_0x585efd(0xe1)]=_0x4f642e,this[_0x585efd(0xc5)]=_0x1daba2,this[_0x585efd(0x109)]=_0x4a5aca;}async[_0x310bd3(0x13e)](_0x1abb84){const _0x88cb0d=_0x310bd3;var _0x1b6a9a,_0x4fb909;const {parentId:_0x27280e,unitId:_0x10fb8e,text:_0x242a83,threadId:_0x796aa3}=_0x1abb84,_0x247980=(_0x4fb909=(_0x1b6a9a=_0x242a83[_0x88cb0d(0xd7)])==null?void 0x0:_0x1b6a9a[_0x88cb0d(0xde)](_0x5d4629=>_0x5d4629['rangeType']===_0x10e0f2[_0x88cb0d(0xf5)]['COMMENT'])[_0x88cb0d(0x134)](_0x339a0b=>_0x339a0b[_0x88cb0d(0xd1)]))!=null?_0x4fb909:[],_0x36541d=JSON[_0x88cb0d(0x140)](_0x242a83),_0x5887a8=(await this[_0x88cb0d(0xc5)]['requireSession'](_0x10fb8e))['getMemberID']();if(_0x27280e){const _0x3c3c0a={'memberId':_0x5887a8,'unitId':_0x10fb8e,'content':_0x36541d,'mention':_0x247980,'threadId':_0x796aa3},_0x51ec3f=(await this[_0x88cb0d(0xfb)][_0x88cb0d(0x10f)](_0x88cb0d(0xc0)+_0x10fb8e+_0x88cb0d(0xca),{'body':_0x3c3c0a}))[_0x88cb0d(0xc6)][_0x88cb0d(0x115)];return{..._0x1abb84,'id':_0x51ec3f[_0x88cb0d(0xf1)],'dT':_0x10e0f2[_0x88cb0d(0xe2)](+_0x51ec3f[_0x88cb0d(0xee)])[_0x88cb0d(0x10c)](_0x88cb0d(0x105)),'personId':_0x51ec3f[_0x88cb0d(0xef)]};}else{const _0x1855a8={'memberId':_0x5887a8,'unitId':_0x10fb8e,'content':_0x36541d,'mention':_0x247980},_0x1b0a9f=await this[_0x88cb0d(0xfb)]['post'](_0x88cb0d(0xc0)+_0x10fb8e+_0x88cb0d(0x104),{'body':_0x1855a8});return _0x2d3dbe(_0x1b0a9f['body'][_0x88cb0d(0xf6)],_0x1abb84);}}async[_0x310bd3(0xf3)](_0x1f7f2e){const _0x3dceb0=_0x310bd3;var _0x36b0c7,_0x56691e;const {text:_0x30aaec,unitId:_0x6d2094}=_0x1f7f2e,_0x2cd4d8=(_0x56691e=(_0x36b0c7=_0x30aaec[_0x3dceb0(0xd7)])==null?void 0x0:_0x36b0c7[_0x3dceb0(0xde)](_0x1b8562=>_0x1b8562[_0x3dceb0(0xcd)]===_0x10e0f2[_0x3dceb0(0xf5)][_0x3dceb0(0x120)])[_0x3dceb0(0x134)](_0x41bc0e=>_0x41bc0e[_0x3dceb0(0xd1)]))!=null?_0x56691e:[],_0x104e9f=JSON[_0x3dceb0(0x140)](_0x30aaec),_0x24625b=_0x1f7f2e['threadId'],_0x4cc849=_0x1f7f2e['id'],_0x6725ac={'memberId':(await this[_0x3dceb0(0xc5)][_0x3dceb0(0xd2)](_0x6d2094))[_0x3dceb0(0x100)](),'unitId':_0x6d2094,'threadId':_0x24625b,'mention':_0x2cd4d8,'content':_0x104e9f,'replyId':_0x4cc849},_0x1872f9=await this[_0x3dceb0(0xfb)][_0x3dceb0(0x10f)](_0x3dceb0(0xc0)+_0x6d2094+_0x3dceb0(0x137),{'body':_0x6725ac});return!_0x1872f9[_0x3dceb0(0xc6)][_0x3dceb0(0xf4)]||_0x1872f9[_0x3dceb0(0xc6)][_0x3dceb0(0xf4)][_0x3dceb0(0x10e)]===0x1;}async[_0x310bd3(0xe5)](_0x4aab84){const _0x1b0589=_0x310bd3,{unitId:_0xaf8f7e}=_0x4aab84,_0x2941e6=_0x4aab84['threadId'],_0x1e450c={'memberId':this['_userService'][_0x1b0589(0x113)]()[_0x1b0589(0xd8)],'unitId':_0xaf8f7e,'threadId':_0x2941e6,'solved':_0x4aab84[_0x1b0589(0xc7)]?_0x5ad6e3[_0x1b0589(0x12d)]:_0x5ad6e3[_0x1b0589(0x138)]},_0x27a1ad=await this[_0x1b0589(0xfb)][_0x1b0589(0x10f)](_0x1b0589(0xc0)+_0xaf8f7e+_0x1b0589(0xdd),{'body':_0x1e450c});return!_0x27a1ad[_0x1b0589(0xc6)][_0x1b0589(0xf4)]||_0x27a1ad[_0x1b0589(0xc6)]['error'][_0x1b0589(0x10e)]===0x1;}async[_0x310bd3(0x125)](_0x4ebd72,_0x3e0944,_0x4b47b3,_0x7a4858){const _0x3961d7=_0x310bd3,_0x4061a8={'memberId':(await this[_0x3961d7(0xc5)][_0x3961d7(0xd2)](_0x4ebd72))['getMemberID'](),'threadId':_0x4b47b3,'replyId':_0x7a4858,'unitId':_0x4ebd72},_0x13bfe1=await this[_0x3961d7(0xfb)][_0x3961d7(0x10f)]('/universer-api/comment/unit/'+_0x4ebd72+_0x3961d7(0x13b),{'body':_0x4061a8});return!_0x13bfe1[_0x3961d7(0xc6)]['error']||_0x13bfe1[_0x3961d7(0xc6)][_0x3961d7(0xf4)][_0x3961d7(0x10e)]===0x1;}async['listComments'](_0xe538fc,_0x1a7d7b,_0x3b4d51){const _0x2cd240=_0x310bd3,_0x1a3306={'unitId':_0xe538fc,'threadId':_0x3b4d51},_0x46b499=await this[_0x2cd240(0xfb)][_0x2cd240(0x10f)](_0x2cd240(0xc0)+_0xe538fc+'/list',{'body':_0x1a3306}),_0x31f037=_0x3b4d51[_0x2cd240(0x134)](_0x33fc43=>_0x3c5863(_0x46b499[_0x2cd240(0xc6)][_0x2cd240(0xf0)][_0x33fc43],_0xe538fc,_0x1a7d7b))['filter'](Boolean);return Object[_0x2cd240(0x12b)](_0x46b499['body'][_0x2cd240(0xc3)])['forEach'](_0x45db12=>{const _0x3f40a7=_0x2cd240;this[_0x3f40a7(0xe1)][_0x3f40a7(0x11b)](_0x45db12);}),_0x31f037;}[_0x310bd3(0xce)](_0x566d8c){const _0x21a8b2=_0x310bd3;return{'id':_0x566d8c['id'],'threadId':_0x566d8c[_0x21a8b2(0xd4)],'ref':_0x566d8c['ref']};}};_0x162719=_0x1bd0fc([_0x263ba7(0x0,_0x10e0f2[_0x310bd3(0xf8)](_0x5e4ef0[_0x310bd3(0x130)])),_0x263ba7(0x1,_0x10e0f2[_0x310bd3(0xf8)](_0x10e0f2['UserManagerService'])),_0x263ba7(0x2,_0x10e0f2[_0x310bd3(0xf8)](_0x15eb53[_0x310bd3(0x126)])),_0x263ba7(0x3,_0x10e0f2[_0x310bd3(0xf8)](_0x10e0f2['Injector']))],_0x162719);var _0x3c7b56=Object['getOwnPropertyDescriptor'],_0x36bc16=(_0x50b6b9,_0x40fb24,_0x2917a7,_0x170bd6)=>{const _0x1f9166=_0x310bd3;for(var _0x55ae7e=_0x170bd6>0x1?void 0x0:_0x170bd6?_0x3c7b56(_0x40fb24,_0x2917a7):_0x40fb24,_0x224549=_0x50b6b9[_0x1f9166(0xe0)]-0x1,_0x4be492;_0x224549>=0x0;_0x224549--)(_0x4be492=_0x50b6b9[_0x224549])&&(_0x55ae7e=_0x4be492(_0x55ae7e)||_0x55ae7e);return _0x55ae7e;},_0x1b5026=(_0x348437,_0x4f149e)=>(_0x58e635,_0x15f4eb)=>_0x4f149e(_0x58e635,_0x15f4eb,_0x348437);let _0x5dda2d=class extends _0x10e0f2[_0x310bd3(0x129)]{constructor(_0x398b4e,_0x823790){const _0x594bcd=_0x310bd3;super(),this[_0x594bcd(0xcf)]=_0x398b4e,this[_0x594bcd(0xc4)]=_0x823790,this[_0x594bcd(0xe3)]();}['_initDataSource'](){const _0x5f4376=_0x310bd3;this[_0x5f4376(0xcf)]['dataSource']=this[_0x5f4376(0xc4)],this['_threadCommentDataSourceService'][_0x5f4376(0x117)]=!0x1;}};_0x5dda2d=_0x36bc16([_0x1b5026(0x0,_0x5daa1c['IThreadCommentDataSourceService']),_0x1b5026(0x1,_0x10e0f2[_0x310bd3(0xf8)](_0x162719))],_0x5dda2d);var _0x3eaa3e=Object[_0x310bd3(0x10b)],_0x1774ae=Object[_0x310bd3(0x118)],_0x591bbc=(_0x4a8734,_0x597ef1,_0x12ffae)=>_0x597ef1 in _0x4a8734?_0x3eaa3e(_0x4a8734,_0x597ef1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12ffae}):_0x4a8734[_0x597ef1]=_0x12ffae,_0x4b80cc=(_0x4b6e6c,_0xa69980,_0x14dc27,_0xfc2bc0)=>{const _0x5417ca=_0x310bd3;for(var _0x20ac09=_0xfc2bc0>0x1?void 0x0:_0xfc2bc0?_0x1774ae(_0xa69980,_0x14dc27):_0xa69980,_0x421a74=_0x4b6e6c[_0x5417ca(0xe0)]-0x1,_0x1ea8da;_0x421a74>=0x0;_0x421a74--)(_0x1ea8da=_0x4b6e6c[_0x421a74])&&(_0x20ac09=_0x1ea8da(_0x20ac09)||_0x20ac09);return _0x20ac09;},_0xd81094=(_0x284b17,_0xc71537)=>(_0x1c2800,_0x380fa9)=>_0xc71537(_0x1c2800,_0x380fa9,_0x284b17),_0x4275e1=(_0x5a66fd,_0x3616f8,_0x36be18)=>_0x591bbc(_0x5a66fd,typeof _0x3616f8!=_0x310bd3(0x10d)?_0x3616f8+'':_0x3616f8,_0x36be18);_0x3121ed[_0x310bd3(0x12f)]=class extends _0x10e0f2[_0x310bd3(0x111)]{constructor(_0x2312bb=_0x5b94c0,_0x39e662,_0x4eb6fc){const _0x2e3288=_0x310bd3;super(),this[_0x2e3288(0xed)]=_0x2312bb,this['_injector']=_0x39e662,this[_0x2e3288(0x143)]=_0x4eb6fc;const {..._0x2610f3}=_0x10e0f2[_0x2e3288(0x149)]({},_0x5b94c0,this[_0x2e3288(0xed)]);this[_0x2e3288(0x143)][_0x2e3288(0x11c)](_0x455aff,_0x2610f3);}['onStarting'](){[[_0x162719],[_0x5dda2d],[_0x8bf77e]]['forEach'](_0x3fcccf=>{const _0x5b1045=_0x5877;this[_0x5b1045(0x109)]['add'](_0x3fcccf);});}[_0x310bd3(0x116)](){const _0x4b6bcb=_0x310bd3;this['_injector'][_0x4b6bcb(0x141)](_0x5dda2d),this[_0x4b6bcb(0x109)][_0x4b6bcb(0x141)](_0x8bf77e);}},_0x4275e1(_0x3121ed[_0x310bd3(0x12f)],_0x310bd3(0xf2),_0x4eeec8),_0x4275e1(_0x3121ed[_0x310bd3(0x12f)],_0x310bd3(0x131),_0x10e0f2[_0x310bd3(0xec)][_0x310bd3(0x11d)]),_0x3121ed[_0x310bd3(0x12f)]=_0x4b80cc([_0x10e0f2[_0x310bd3(0xd3)](_0x3f6cf5['UniverThreadCommentUIPlugin'],_0x15eb53[_0x310bd3(0xff)],_0x1a2464['UniverLicensePlugin']),_0xd81094(0x1,_0x10e0f2[_0x310bd3(0xf8)](_0x10e0f2[_0x310bd3(0x12c)])),_0xd81094(0x2,_0x10e0f2[_0x310bd3(0xea)])],_0x3121ed[_0x310bd3(0x12f)]),Object[_0x310bd3(0x10b)](_0x3121ed,Symbol['toStringTag'],{'value':_0x310bd3(0x114)});}));function _0x5877(_0x7c55b8,_0xec38e1){const _0x27d334=_0x27d3();return _0x5877=function(_0x5877e6,_0x1cb281){_0x5877e6=_0x5877e6-0xc0;let _0x145b7a=_0x27d334[_0x5877e6];return _0x145b7a;},_0x5877(_0x7c55b8,_0xec38e1);}function _0x27d3(){const _0x195223=['CommentService','UserManagerService','UniverProLicense','UniverCollaborationClientPlugin','getMemberID','forEach','parentId','10RZGVyB','/add','YYYY/MM/DD\x20HH:mm','508KZkMri','user','slice','_injector','getUser','defineProperty','format','symbol','code','post','UniverProCollaborationClient','Plugin','parse','getCurrentUser','Module','reply','onReady','syncUpdateMutationToColla','getOwnPropertyDescriptor','add','root','addUser','setConfig','UNIVER_UNKNOWN','92895FsKSzS','Solve','COMMENT','5912PoDCsz','Delete','UniverThreadComment','getUnit','deleteComment','CollaborationSessionService','exports','10326vxAzev','Disposable','805KpWikG','values','Injector','Solved','content','UniverThreadCommentDataSourcePlugin','HTTPService','type','@univerjs-pro/collaboration-client','126FbuXQP','map','solved','15165GhNxqA','/edit','OpenOrReOpen','bufferTime','commentUpdate$','/delete','unitId','getComment','addComment','Edit','stringify','get','_threadCommentModel','_configService','UNRECOGNIZED','amd','_initUserSync','UniverCore','_commentService','merge','Add','@univerjs/core','/universer-api/comment/unit/','880217sWlYLH','@univerjs/thread-comment','users','_threadCommentDataSource','_sessionService','body','resolved','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','791775byEnSQ','UniverThreadCommentUi','rangeType','saveCommentToSnapshot','_threadCommentDataSourceService','delete','rangeId','requireSession','DependentOn','threadId','@univerjs-pro/license','360BZWEDO','customRanges','userID','1855QLTAjr','UniverProThreadCommentDatasource','180JXsnut','subscribe','/solved','filter','replies','length','_userService','dayjs','_initDataSource','Reply','resolveComment','Unknown','find','@univerjs/thread-comment-ui','56ulHise','IConfigService','/universer-api/user/list','UniverInstanceType','_config','createTimestamp','userId','comments','replyId','pluginName','updateComment','error','CustomRangeType','comment','object','Inject','rxjs','disposeWithMe','_httpService'];_0x27d3=function(){return _0x195223;};return _0x27d3();}
|
|
1
|
+
function _0x3d7f(_0x2b9b9f,_0x5755f0){const _0x4815b8=_0x4815();return _0x3d7f=function(_0x3d7ffc,_0x13ee08){_0x3d7ffc=_0x3d7ffc-0x1b1;let _0x497f36=_0x4815b8[_0x3d7ffc];return _0x497f36;},_0x3d7f(_0x2b9b9f,_0x5755f0);}(function(_0x26b3a1,_0x4f1513){const _0x142b9c=_0x3d7f,_0x1cb5e9=_0x26b3a1();while(!![]){try{const _0x42234f=-parseInt(_0x142b9c(0x1cc))/0x1*(parseInt(_0x142b9c(0x1bb))/0x2)+parseInt(_0x142b9c(0x211))/0x3*(-parseInt(_0x142b9c(0x1dc))/0x4)+parseInt(_0x142b9c(0x20c))/0x5*(parseInt(_0x142b9c(0x232))/0x6)+-parseInt(_0x142b9c(0x1df))/0x7+parseInt(_0x142b9c(0x1f3))/0x8+parseInt(_0x142b9c(0x1b7))/0x9+-parseInt(_0x142b9c(0x1f9))/0xa*(parseInt(_0x142b9c(0x1ce))/0xb);if(_0x42234f===_0x4f1513)break;else _0x1cb5e9['push'](_0x1cb5e9['shift']());}catch(_0x2d272b){_0x1cb5e9['push'](_0x1cb5e9['shift']());}}}(_0x4815,0xc5348),function(_0x892da8,_0x4f7f2c){const _0x30e703=_0x3d7f;typeof exports==_0x30e703(0x1c9)&&typeof module<'u'?_0x4f7f2c(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==_0x30e703(0x1ea)&&define[_0x30e703(0x1ef)]?define([_0x30e703(0x1b5),_0x30e703(0x230),_0x30e703(0x20a),_0x30e703(0x206),_0x30e703(0x1ff),'@univerjs/thread-comment',_0x30e703(0x21d),'@univerjs/network'],_0x4f7f2c):(_0x892da8=typeof globalThis<'u'?globalThis:_0x892da8||self,_0x4f7f2c(_0x892da8['UniverProThreadCommentDatasource']={},_0x892da8[_0x30e703(0x236)],_0x892da8[_0x30e703(0x1fa)],_0x892da8[_0x30e703(0x234)],_0x892da8[_0x30e703(0x215)],_0x892da8['UniverThreadComment'],_0x892da8[_0x30e703(0x21d)],_0x892da8['UniverNetwork']));}(this,function(_0x60b3fd,_0x6e9407,_0x34bfcd,_0xa28331,_0x41e30c,_0x38a43b,_0x1087b2,_0x54e878){'use strict';const _0x582b18=_0x3d7f;const _0x7ff09c=_0x582b18(0x1ee);var _0x2fd73b=(_0x3a1ecf=>(_0x3a1ecf[_0x3a1ecf[_0x582b18(0x202)]=0x0]=_0x582b18(0x202),_0x3a1ecf[_0x3a1ecf[_0x582b18(0x1ca)]=0x1]=_0x582b18(0x1ca),_0x3a1ecf[_0x3a1ecf[_0x582b18(0x1da)]=-0x1]=_0x582b18(0x1da),_0x3a1ecf))(_0x2fd73b||{}),_0xb79733=(_0x5d822b=>(_0x5d822b[_0x5d822b[_0x582b18(0x1ed)]=0x0]='Unknown',_0x5d822b[_0x5d822b['Add']=0x1]='Add',_0x5d822b[_0x5d822b['Reply']=0x2]='Reply',_0x5d822b[_0x5d822b[_0x582b18(0x20e)]=0x3]=_0x582b18(0x20e),_0x5d822b[_0x5d822b[_0x582b18(0x1d4)]=0x4]=_0x582b18(0x1d4),_0x5d822b[_0x5d822b[_0x582b18(0x1d7)]=0x5]='Solve',_0x5d822b[_0x5d822b[_0x582b18(0x1da)]=-0x1]=_0x582b18(0x1da),_0x5d822b))(_0xb79733||{});const _0x37eb6c=_0x5b84b4=>_0xa28331[_0x582b18(0x22d)](new Date(+_0x5b84b4))[_0x582b18(0x1d2)](_0x582b18(0x1d5)),_0x415ebf=async(_0x2e0899,_0x77408c)=>{const _0xb2c134=_0x582b18,_0xc52bb8=_0x2e0899['get'](_0xa28331['UserManagerService']),_0x18a4ff=_0x2e0899['get'](_0x54e878[_0xb2c134(0x1bc)]);_0x77408c[_0xb2c134(0x218)](_0x565c6d=>{const _0x3e9ac5=_0xb2c134;_0xc52bb8[_0x3e9ac5(0x20b)](_0x565c6d)&&_0x77408c[_0x3e9ac5(0x1b9)](_0x565c6d);}),_0x77408c[_0xb2c134(0x1f5)]&&(await _0x18a4ff[_0xb2c134(0x223)]('/universer-api/user/list',{'params':{'userIDs':[..._0x77408c]}}))[_0xb2c134(0x21b)][_0xb2c134(0x1b2)][_0xb2c134(0x218)](_0x34d416=>{_0x34d416&&_0xc52bb8['addUser'](_0x34d416);});};var _0x3db9ed=Object[_0x582b18(0x23a)],_0x4ba6dd=(_0x39f761,_0x20b5bc,_0x172774,_0x26c5ef)=>{const _0x3cf95d=_0x582b18;for(var _0x1612d5=_0x26c5ef>0x1?void 0x0:_0x26c5ef?_0x3db9ed(_0x20b5bc,_0x172774):_0x20b5bc,_0x553b3c=_0x39f761[_0x3cf95d(0x212)]-0x1,_0x3ef59a;_0x553b3c>=0x0;_0x553b3c--)(_0x3ef59a=_0x39f761[_0x553b3c])&&(_0x1612d5=_0x3ef59a(_0x1612d5)||_0x1612d5);return _0x1612d5;},_0x13d6dd=(_0x4747bd,_0x3f2a5f)=>(_0x5d861b,_0x51a2d1)=>_0x3f2a5f(_0x5d861b,_0x51a2d1,_0x4747bd);let _0xed5d36=class extends _0xa28331[_0x582b18(0x1cb)]{constructor(_0x685724,_0x33a134,_0x4d0d39,_0x4fbfbd){const _0x541843=_0x582b18;super(),this['_commentService']=_0x685724,this[_0x541843(0x1e5)]=_0x33a134,this['_userService']=_0x4d0d39,this[_0x541843(0x1fb)]=_0x4fbfbd,this[_0x541843(0x1c4)](),this[_0x541843(0x22f)]();}[_0x582b18(0x22f)](){const _0x2e0ef8=_0x582b18;this['disposeWithMe'](this[_0x2e0ef8(0x1e5)][_0x2e0ef8(0x20f)][_0x2e0ef8(0x23b)](_0x1087b2[_0x2e0ef8(0x1bd)](0x10))[_0x2e0ef8(0x228)](_0x2e97e1=>{const _0x5977ba=_0x2e0ef8,_0x243945=new Set();_0x2e97e1[_0x5977ba(0x218)](_0x383534=>{const _0x29572b=_0x5977ba;switch(_0x383534[_0x29572b(0x1d6)]){case _0x29572b(0x220):{const _0x2529ab=_0x383534[_0x29572b(0x1be)]['personId'];_0x243945[_0x29572b(0x220)](_0x2529ab);break;}}}),_0x415ebf(this['_injector'],_0x243945);}));}[_0x582b18(0x1c4)](){const _0xe80763=_0x582b18;this[_0xe80763(0x1cd)](this[_0xe80763(0x1f6)][_0xe80763(0x20f)][_0xe80763(0x228)](async _0x3a6ba5=>{const _0x326ef8=_0xe80763;var _0x5b7b08,_0x7e7f59,_0x4d4fc5,_0x242622;const _0x482a61=(_0x5b7b08=this[_0x326ef8(0x1e5)]['getUnit'](_0x3a6ba5[_0x326ef8(0x204)])[_0x326ef8(0x201)](_0x5cc4ed=>_0x5cc4ed[_0x326ef8(0x1fd)]===_0x3a6ba5[_0x326ef8(0x1fd)]))==null?void 0x0:_0x5b7b08['root'];if(!_0x482a61)return;const {unitId:_0x36f029,subUnitId:_0xff0c7d}=_0x482a61;switch(_0x3a6ba5['user']&&this['_userService'][_0x326ef8(0x21e)](_0x3a6ba5['user']),_0x3a6ba5[_0x326ef8(0x1d6)]){case _0xb79733[_0x326ef8(0x1c0)]:break;case _0xb79733[_0x326ef8(0x200)]:{this[_0x326ef8(0x1e5)][_0x326ef8(0x205)](_0x36f029,_0xff0c7d,{'unitId':_0x36f029,'subUnitId':_0xff0c7d,'ref':'','id':_0x3a6ba5['replyId'],'dT':_0x37eb6c(+_0x3a6ba5['createTimestamp']),'threadId':_0x3a6ba5['threadId'],'personId':(_0x4d4fc5=(_0x7e7f59=_0x3a6ba5['user'])==null?void 0x0:_0x7e7f59[_0x326ef8(0x225)])!=null?_0x4d4fc5:_0x3a6ba5[_0x326ef8(0x22a)],'text':JSON[_0x326ef8(0x1bf)](_0x3a6ba5[_0x326ef8(0x1ec)]),'parentId':_0x482a61['id']});break;}case _0xb79733[_0x326ef8(0x1d4)]:{const _0x1d547f=this[_0x326ef8(0x1e5)]['getComment'](_0x36f029,_0xff0c7d,_0x3a6ba5[_0x326ef8(0x1c5)]);_0x1d547f&&_0x1d547f['parentId']&&this[_0x326ef8(0x1e5)][_0x326ef8(0x1c1)](_0x36f029,_0xff0c7d,_0x3a6ba5[_0x326ef8(0x1c5)]);break;}case _0xb79733['Edit']:{this['_threadCommentModel']['updateComment'](_0x36f029,_0xff0c7d,{'commentId':_0x3a6ba5['replyId'],'text':JSON[_0x326ef8(0x1bf)](_0x3a6ba5['content'])});break;}case _0xb79733[_0x326ef8(0x1d7)]:{const _0x2f59dc=(_0x242622=this[_0x326ef8(0x1e5)][_0x326ef8(0x1e8)](_0x3a6ba5[_0x326ef8(0x204)])[_0x326ef8(0x201)](_0x429ca4=>_0x429ca4[_0x326ef8(0x1fd)]===_0x3a6ba5[_0x326ef8(0x1fd)]))==null?void 0x0:_0x242622[_0x326ef8(0x22c)];_0x2f59dc&&this[_0x326ef8(0x1e5)]['resolveComment'](_0x36f029,_0xff0c7d,_0x2f59dc['id'],_0x3a6ba5[_0x326ef8(0x20d)]===_0x2fd73b[_0x326ef8(0x1ca)]);break;}}}));}};_0xed5d36=_0x4ba6dd([_0x13d6dd(0x0,_0xa28331[_0x582b18(0x1c2)](_0x6e9407[_0x582b18(0x1b4)])),_0x13d6dd(0x1,_0xa28331[_0x582b18(0x1c2)](_0x38a43b['ThreadCommentModel'])),_0x13d6dd(0x2,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x1c3)])),_0x13d6dd(0x3,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x233)]))],_0xed5d36);const _0x568bed=_0x582b18(0x1b3),_0x24add3={};var _0x55ec85=Object['getOwnPropertyDescriptor'],_0xec324c=(_0x2b1e4b,_0x3219fc,_0x178f6f,_0x58074a)=>{for(var _0x497c45=_0x58074a>0x1?void 0x0:_0x58074a?_0x55ec85(_0x3219fc,_0x178f6f):_0x3219fc,_0x423a66=_0x2b1e4b['length']-0x1,_0x2f9857;_0x423a66>=0x0;_0x423a66--)(_0x2f9857=_0x2b1e4b[_0x423a66])&&(_0x497c45=_0x2f9857(_0x497c45)||_0x497c45);return _0x497c45;},_0x204198=(_0x243425,_0x5921c9)=>(_0xc6f15,_0x4539c4)=>_0x5921c9(_0xc6f15,_0x4539c4,_0x243425);function _0x532c2d(_0x37a0b4,_0x20c245){const _0x26d4cc=_0x582b18,_0x1597a8=_0x37a0b4['replies'][0x0];return{..._0x20c245,'id':_0x1597a8[_0x26d4cc(0x1c5)],'resolved':_0x37a0b4[_0x26d4cc(0x20d)]===0x1,'dT':_0x37eb6c(_0x1597a8[_0x26d4cc(0x1f4)]),'personId':_0x1597a8['userId'],'threadId':_0x1597a8[_0x26d4cc(0x1fd)]};}function _0x348e21(_0x17568f,_0x18536f,_0x3d2bb7){const _0x290365=_0x582b18;var _0x468a8e,_0x4235e1;if(((_0x4235e1=(_0x468a8e=_0x17568f==null?void 0x0:_0x17568f[_0x290365(0x1cf)])==null?void 0x0:_0x468a8e[_0x290365(0x212)])!=null?_0x4235e1:0x0)>0x0){const _0x30abfa=(_0x5aaf8f,_0xdd7716)=>({'id':_0x5aaf8f['replyId'],'threadId':_0x5aaf8f[_0x290365(0x1fd)],'dT':_0x37eb6c(_0x5aaf8f[_0x290365(0x1f4)]),'personId':_0x5aaf8f[_0x290365(0x22a)],'resolved':_0x17568f[_0x290365(0x20d)]===_0x2fd73b[_0x290365(0x1ca)],'unitId':_0x18536f,'subUnitId':_0x3d2bb7,'text':JSON[_0x290365(0x1bf)](_0x5aaf8f['content']),'parentId':_0xdd7716}),_0x4f282e=_0x30abfa(_0x17568f['replies'][0x0]);return{..._0x4f282e,'children':_0x17568f[_0x290365(0x1cf)][_0x290365(0x1e0)](0x1)[_0x290365(0x1db)](_0x570ffa=>_0x30abfa(_0x570ffa,_0x4f282e['id']))};}return null;}let _0x16cc64=class{constructor(_0x5acc71,_0x168d49,_0xbe40e7,_0x22def6){const _0x326cd8=_0x582b18;this[_0x326cd8(0x1b6)]=_0x5acc71,this['_userService']=_0x168d49,this[_0x326cd8(0x1dd)]=_0xbe40e7,this[_0x326cd8(0x1fb)]=_0x22def6;}async[_0x582b18(0x205)](_0x399dcf){const _0x16740d=_0x582b18;var _0x497a80,_0x7b8c82;const {parentId:_0x46461e,unitId:_0x3a7723,text:_0x6b7c5,threadId:_0x1abed4}=_0x399dcf,_0x265dec=(_0x7b8c82=(_0x497a80=_0x6b7c5[_0x16740d(0x229)])==null?void 0x0:_0x497a80['filter'](_0x29e71c=>_0x29e71c['rangeType']===_0xa28331[_0x16740d(0x1b8)][_0x16740d(0x226)])[_0x16740d(0x1db)](_0x50a7bd=>_0x50a7bd['rangeId']))!=null?_0x7b8c82:[],_0x1df9f9=JSON['stringify'](_0x6b7c5),_0x2a0171=(await this[_0x16740d(0x1dd)]['requireSession'](_0x3a7723))['getMemberID']();if(_0x46461e){const _0x4273dd={'memberId':_0x2a0171,'unitId':_0x3a7723,'content':_0x1df9f9,'mention':_0x265dec,'threadId':_0x1abed4},_0x2042c9=(await this[_0x16740d(0x1b6)]['post'](_0x16740d(0x1eb)+_0x3a7723+'/reply',{'body':_0x4273dd}))[_0x16740d(0x21b)][_0x16740d(0x214)];return{..._0x399dcf,'id':_0x2042c9[_0x16740d(0x1c5)],'dT':_0xa28331['dayjs'](+_0x2042c9[_0x16740d(0x1f4)])[_0x16740d(0x1d2)](_0x16740d(0x1d5)),'personId':_0x2042c9[_0x16740d(0x22a)]};}else{const _0x146224={'memberId':_0x2a0171,'unitId':_0x3a7723,'content':_0x1df9f9,'mention':_0x265dec},_0x4412ac=await this[_0x16740d(0x1b6)]['post'](_0x16740d(0x1eb)+_0x3a7723+_0x16740d(0x1c6),{'body':_0x146224});return _0x532c2d(_0x4412ac[_0x16740d(0x21b)][_0x16740d(0x237)],_0x399dcf);}}async[_0x582b18(0x210)](_0x32bf14){const _0xa2c1e2=_0x582b18;var _0x448d8f,_0x320f30;const {text:_0x5eaaba,unitId:_0x4db669}=_0x32bf14,_0x291649=(_0x320f30=(_0x448d8f=_0x5eaaba[_0xa2c1e2(0x229)])==null?void 0x0:_0x448d8f[_0xa2c1e2(0x22b)](_0x155073=>_0x155073[_0xa2c1e2(0x216)]===_0xa28331['CustomRangeType'][_0xa2c1e2(0x226)])[_0xa2c1e2(0x1db)](_0x553ccf=>_0x553ccf[_0xa2c1e2(0x1de)]))!=null?_0x320f30:[],_0x35268c=JSON[_0xa2c1e2(0x1e7)](_0x5eaaba),_0x38a2b4=_0x32bf14[_0xa2c1e2(0x1fd)],_0x1d7fdd=_0x32bf14['id'],_0xddac34={'memberId':(await this[_0xa2c1e2(0x1dd)][_0xa2c1e2(0x227)](_0x4db669))[_0xa2c1e2(0x222)](),'unitId':_0x4db669,'threadId':_0x38a2b4,'mention':_0x291649,'content':_0x35268c,'replyId':_0x1d7fdd},_0x6269f2=await this[_0xa2c1e2(0x1b6)][_0xa2c1e2(0x239)]('/universer-api/comment/unit/'+_0x4db669+_0xa2c1e2(0x1e3),{'body':_0xddac34});return!_0x6269f2[_0xa2c1e2(0x21b)][_0xa2c1e2(0x1ba)]||_0x6269f2[_0xa2c1e2(0x21b)][_0xa2c1e2(0x1ba)][_0xa2c1e2(0x22e)]===0x1;}async[_0x582b18(0x1f8)](_0x1b9469){const _0x4b1f01=_0x582b18,{unitId:_0xfe1560}=_0x1b9469,_0x1c68ae=_0x1b9469['threadId'],_0xc7ef6c={'memberId':this[_0x4b1f01(0x1fe)][_0x4b1f01(0x21a)]()[_0x4b1f01(0x225)],'unitId':_0xfe1560,'threadId':_0x1c68ae,'solved':_0x1b9469[_0x4b1f01(0x209)]?_0x2fd73b[_0x4b1f01(0x1ca)]:_0x2fd73b[_0x4b1f01(0x202)]},_0x475d0e=await this['_httpService'][_0x4b1f01(0x239)](_0x4b1f01(0x1eb)+_0xfe1560+_0x4b1f01(0x208),{'body':_0xc7ef6c});return!_0x475d0e[_0x4b1f01(0x21b)]['error']||_0x475d0e[_0x4b1f01(0x21b)][_0x4b1f01(0x1ba)][_0x4b1f01(0x22e)]===0x1;}async['deleteComment'](_0x133e3f,_0x23cc2d,_0x3dc67d,_0x409045){const _0x20d244=_0x582b18,_0x2b88e6={'memberId':(await this[_0x20d244(0x1dd)][_0x20d244(0x227)](_0x133e3f))[_0x20d244(0x222)](),'threadId':_0x3dc67d,'replyId':_0x409045,'unitId':_0x133e3f},_0x4873f8=await this[_0x20d244(0x1b6)][_0x20d244(0x239)]('/universer-api/comment/unit/'+_0x133e3f+_0x20d244(0x224),{'body':_0x2b88e6});return!_0x4873f8[_0x20d244(0x21b)][_0x20d244(0x1ba)]||_0x4873f8['body'][_0x20d244(0x1ba)][_0x20d244(0x22e)]===0x1;}async[_0x582b18(0x1f2)](_0xb9e6d0,_0x2fce59,_0x28929e){const _0x32558d=_0x582b18,_0x491124={'unitId':_0xb9e6d0,'threadId':_0x28929e},_0x32a2cc=await this['_httpService'][_0x32558d(0x239)](_0x32558d(0x1eb)+_0xb9e6d0+_0x32558d(0x21c),{'body':_0x491124}),_0x4e2096=_0x28929e[_0x32558d(0x1db)](_0x4e6a7d=>_0x348e21(_0x32a2cc[_0x32558d(0x21b)][_0x32558d(0x1f0)][_0x4e6a7d],_0xb9e6d0,_0x2fce59))[_0x32558d(0x22b)](Boolean);return Object[_0x32558d(0x1c7)](_0x32a2cc[_0x32558d(0x21b)][_0x32558d(0x1b2)])['forEach'](_0x427ded=>{const _0x4fba7a=_0x32558d;this['_userService'][_0x4fba7a(0x21e)](_0x427ded);}),_0x4e2096;}[_0x582b18(0x1d0)](_0x387228){const _0x5cf562=_0x582b18;return{'id':_0x387228['id'],'threadId':_0x387228[_0x5cf562(0x1fd)],'ref':_0x387228[_0x5cf562(0x238)]};}};_0x16cc64=_0xec324c([_0x204198(0x0,_0xa28331[_0x582b18(0x1c2)](_0x54e878[_0x582b18(0x1bc)])),_0x204198(0x1,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x1c3)])),_0x204198(0x2,_0xa28331[_0x582b18(0x1c2)](_0x6e9407[_0x582b18(0x219)])),_0x204198(0x3,_0xa28331['Inject'](_0xa28331[_0x582b18(0x233)]))],_0x16cc64);var _0x1d1cbf=Object[_0x582b18(0x23a)],_0x34ebe1=(_0x44d5b0,_0xb52f5f,_0x4eeaca,_0x59d957)=>{for(var _0x19617e=_0x59d957>0x1?void 0x0:_0x59d957?_0x1d1cbf(_0xb52f5f,_0x4eeaca):_0xb52f5f,_0x3bcb2b=_0x44d5b0['length']-0x1,_0x2e6864;_0x3bcb2b>=0x0;_0x3bcb2b--)(_0x2e6864=_0x44d5b0[_0x3bcb2b])&&(_0x19617e=_0x2e6864(_0x19617e)||_0x19617e);return _0x19617e;},_0x145a3a=(_0x4abf5a,_0x29ac9a)=>(_0x146a68,_0x5df69e)=>_0x29ac9a(_0x146a68,_0x5df69e,_0x4abf5a);let _0x9f643a=class extends _0xa28331[_0x582b18(0x1cb)]{constructor(_0x5b7ebf,_0x228675){const _0x1af1e8=_0x582b18;super(),this[_0x1af1e8(0x203)]=_0x5b7ebf,this[_0x1af1e8(0x231)]=_0x228675,this['_initDataSource']();}[_0x582b18(0x1f7)](){const _0x34cfcb=_0x582b18;this[_0x34cfcb(0x203)]['dataSource']=this[_0x34cfcb(0x231)],this[_0x34cfcb(0x203)][_0x34cfcb(0x1e9)]=!0x1;}};_0x9f643a=_0x34ebe1([_0x145a3a(0x0,_0x38a43b[_0x582b18(0x1d1)]),_0x145a3a(0x1,_0xa28331['Inject'](_0x16cc64))],_0x9f643a);var _0x5ed0b6=Object[_0x582b18(0x1c8)],_0x905294=Object[_0x582b18(0x23a)],_0x13ca15=(_0x5bbc9f,_0x4776ab,_0x1567c5)=>_0x4776ab in _0x5bbc9f?_0x5ed0b6(_0x5bbc9f,_0x4776ab,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1567c5}):_0x5bbc9f[_0x4776ab]=_0x1567c5,_0x4bdd15=(_0x488d8a,_0x6987f4,_0x4845eb,_0x28e9bd)=>{const _0x31b037=_0x582b18;for(var _0x2d8d43=_0x28e9bd>0x1?void 0x0:_0x28e9bd?_0x905294(_0x6987f4,_0x4845eb):_0x6987f4,_0x10b3c9=_0x488d8a[_0x31b037(0x212)]-0x1,_0x22cb77;_0x10b3c9>=0x0;_0x10b3c9--)(_0x22cb77=_0x488d8a[_0x10b3c9])&&(_0x2d8d43=_0x22cb77(_0x2d8d43)||_0x2d8d43);return _0x2d8d43;},_0x13d8b9=(_0x5ebbd3,_0xa2a926)=>(_0x4480ba,_0x40d39e)=>_0xa2a926(_0x4480ba,_0x40d39e,_0x5ebbd3),_0x3bdd4d=(_0x390415,_0x5a482f,_0x70e610)=>_0x13ca15(_0x390415,typeof _0x5a482f!=_0x582b18(0x1f1)?_0x5a482f+'':_0x5a482f,_0x70e610);_0x60b3fd[_0x582b18(0x207)]=class extends _0xa28331[_0x582b18(0x1e2)]{constructor(_0x4c89f7=_0x24add3,_0xe7258d,_0x3ec3fa){const _0x54e347=_0x582b18;super(),this[_0x54e347(0x221)]=_0x4c89f7,this['_injector']=_0xe7258d,this[_0x54e347(0x1d3)]=_0x3ec3fa;const {..._0x719231}=_0xa28331['merge']({},_0x24add3,this[_0x54e347(0x221)]);this['_configService'][_0x54e347(0x1e1)](_0x568bed,_0x719231);}[_0x582b18(0x21f)](){const _0x48f955=_0x582b18;[[_0x16cc64],[_0x9f643a],[_0xed5d36]][_0x48f955(0x218)](_0x8d94eb=>{const _0x572a69=_0x48f955;this[_0x572a69(0x1fb)][_0x572a69(0x220)](_0x8d94eb);});}[_0x582b18(0x235)](){const _0xc8aa0=_0x582b18;this[_0xc8aa0(0x1fb)][_0xc8aa0(0x223)](_0x9f643a),this[_0xc8aa0(0x1fb)][_0xc8aa0(0x223)](_0xed5d36);}},_0x3bdd4d(_0x60b3fd['UniverThreadCommentDataSourcePlugin'],_0x582b18(0x1e6),_0x7ff09c),_0x3bdd4d(_0x60b3fd[_0x582b18(0x207)],'type',_0xa28331[_0x582b18(0x1fc)]['UNIVER_UNKNOWN']),_0x60b3fd['UniverThreadCommentDataSourcePlugin']=_0x4bdd15([_0xa28331[_0x582b18(0x1e4)](_0x41e30c[_0x582b18(0x217)],_0x6e9407[_0x582b18(0x1d8)],_0x34bfcd['UniverLicensePlugin']),_0x13d8b9(0x1,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x233)])),_0x13d8b9(0x2,_0xa28331[_0x582b18(0x213)])],_0x60b3fd[_0x582b18(0x207)]),Object[_0x582b18(0x1c8)](_0x60b3fd,Symbol[_0x582b18(0x1d9)],{'value':_0x582b18(0x1b1)});}));function _0x4815(){const _0x3685ad=['/edit','DependentOn','_threadCommentModel','pluginName','stringify','getUnit','syncUpdateMutationToColla','function','/universer-api/comment/unit/','content','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','amd','comments','symbol','listComments','12856608dTMoDW','createTimestamp','size','_commentService','_initDataSource','resolveComment','10mXRqDC','UniverProLicense','_injector','UniverInstanceType','threadId','_userService','@univerjs/thread-comment-ui','Reply','find','OpenOrReOpen','_threadCommentDataSourceService','unitId','addComment','@univerjs/core','UniverThreadCommentDataSourcePlugin','/solved','resolved','@univerjs-pro/license','getUser','1585zVKqsp','solved','Edit','commentUpdate$','updateComment','57rKmtiv','length','IConfigService','reply','UniverThreadCommentUi','rangeType','UniverThreadCommentUIPlugin','forEach','CollaborationSessionService','getCurrentUser','body','/list','rxjs','addUser','onStarting','add','_config','getMemberID','get','/delete','userID','COMMENT','requireSession','subscribe','customRanges','userId','filter','root','dayjs','code','_initUserSync','@univerjs-pro/collaboration-client','_threadCommentDataSource','18372HCVKFN','Injector','UniverCore','onReady','UniverProCollaborationClient','comment','ref','post','getOwnPropertyDescriptor','pipe','Module','users','thread-comment-data-source.config','CommentService','exports','_httpService','1775673wmIDNi','CustomRangeType','delete','error','134fkeaKC','HTTPService','bufferTime','payload','parse','Add','deleteComment','Inject','UserManagerService','_init','replyId','/add','values','defineProperty','object','Solved','Disposable','3785IWXQWQ','disposeWithMe','8086529ddaggn','replies','saveCommentToSnapshot','IThreadCommentDataSourceService','format','_configService','Delete','YYYY/MM/DD\x20HH:mm','type','Solve','UniverCollaborationClientPlugin','toStringTag','UNRECOGNIZED','map','57544HTzDyE','_sessionService','rangeId','4936449werYiN','slice','setConfig','Plugin'];_0x4815=function(){return _0x3685ad;};return _0x4815();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.1-nightly.
|
|
3
|
+
"version": "0.9.1-nightly.202507061606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.9.1-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
52
|
-
"@univerjs/thread-comment": "0.9.1-nightly.202507051607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.1-nightly.202507061606",
|
|
49
|
+
"@univerjs-pro/license": "0.9.1-nightly.202507061606",
|
|
50
|
+
"@univerjs/core": "0.9.1-nightly.202507061606",
|
|
51
|
+
"@univerjs/network": "0.9.1-nightly.202507061606",
|
|
53
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.9.1-nightly.
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.9.1-nightly.202507061606",
|
|
54
|
+
"@univerjs/thread-comment": "0.9.1-nightly.202507061606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|