@univerjs-pro/thread-comment-datasource 0.6.9-experimental.20250408-92eabfd → 0.6.9-experimental.20250409-e08c696
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 _0x2187d4=_0x3e02;(function(_0x444684,_0x1b7cc8){const _0x64d7d8=_0x3e02,_0x4504fe=_0x444684();while(!![]){try{const _0x27894f=parseInt(_0x64d7d8(0x1e1))/0x1*(-parseInt(_0x64d7d8(0x218))/0x2)+-parseInt(_0x64d7d8(0x229))/0x3+parseInt(_0x64d7d8(0x1d4))/0x4*(-parseInt(_0x64d7d8(0x21f))/0x5)+-parseInt(_0x64d7d8(0x1cb))/0x6+-parseInt(_0x64d7d8(0x20b))/0x7*(-parseInt(_0x64d7d8(0x1aa))/0x8)+parseInt(_0x64d7d8(0x1fe))/0x9*(-parseInt(_0x64d7d8(0x21d))/0xa)+-parseInt(_0x64d7d8(0x1c6))/0xb*(-parseInt(_0x64d7d8(0x1cf))/0xc);if(_0x27894f===_0x1b7cc8)break;else _0x4504fe['push'](_0x4504fe['shift']());}catch(_0x3552a7){_0x4504fe['push'](_0x4504fe['shift']());}}}(_0x59da,0x1c56f));Object['defineProperty'](exports,Symbol[_0x2187d4(0x1d6)],{'value':_0x2187d4(0x226)});const b=require(_0x2187d4(0x205)),T=require(_0x2187d4(0x217)),c=require(_0x2187d4(0x204)),j=require(_0x2187d4(0x224)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x2187d4(0x1d2);var I=(_0x557597=>(_0x557597[_0x557597[_0x2187d4(0x1dc)]=0x0]=_0x2187d4(0x1dc),_0x557597[_0x557597[_0x2187d4(0x210)]=0x1]=_0x2187d4(0x210),_0x557597[_0x557597[_0x2187d4(0x1ee)]=-0x1]=_0x2187d4(0x1ee),_0x557597))(I||{}),v=(_0x3de9d7=>(_0x3de9d7[_0x3de9d7[_0x2187d4(0x1ed)]=0x0]='Unknown',_0x3de9d7[_0x3de9d7[_0x2187d4(0x21a)]=0x1]='Add',_0x3de9d7[_0x3de9d7[_0x2187d4(0x1e4)]=0x2]=_0x2187d4(0x1e4),_0x3de9d7[_0x3de9d7[_0x2187d4(0x1fa)]=0x3]=_0x2187d4(0x1fa),_0x3de9d7[_0x3de9d7[_0x2187d4(0x1eb)]=0x4]=_0x2187d4(0x1eb),_0x3de9d7[_0x3de9d7[_0x2187d4(0x1f1)]=0x5]=_0x2187d4(0x1f1),_0x3de9d7[_0x3de9d7[_0x2187d4(0x1ee)]=-0x1]='UNRECOGNIZED',_0x3de9d7))(v||{});const f=_0x201292=>c['dayjs'](new Date(+_0x201292))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x17161f,_0x4e7369)=>{const _0x46205e=_0x2187d4,_0xa0abf4=_0x17161f[_0x46205e(0x1dd)](c[_0x46205e(0x208)]),_0x30de51=_0x17161f[_0x46205e(0x1dd)](P[_0x46205e(0x1ea)]);_0x4e7369[_0x46205e(0x1b7)](_0x53614f=>{const _0x223e7e=_0x46205e;_0xa0abf4[_0x223e7e(0x223)](_0x53614f)&&_0x4e7369['delete'](_0x53614f);}),_0x4e7369[_0x46205e(0x1f7)]&&(await _0x30de51['get'](_0x46205e(0x1e7),{'params':{'userIDs':[..._0x4e7369]}}))[_0x46205e(0x20c)]['users']['forEach'](_0x223352=>{const _0x3f7a4f=_0x46205e;_0x223352&&_0xa0abf4[_0x3f7a4f(0x1b4)](_0x223352);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4053b8,_0x446c2f,_0x72b5a6,_0x6872dc)=>{const _0x47d0b7=_0x2187d4;for(var _0x3c79f3=_0x6872dc>0x1?void 0x0:_0x6872dc?$(_0x446c2f,_0x72b5a6):_0x446c2f,_0x2522f0=_0x4053b8[_0x47d0b7(0x219)]-0x1,_0xea9db7;_0x2522f0>=0x0;_0x2522f0--)(_0xea9db7=_0x4053b8[_0x2522f0])&&(_0x3c79f3=_0xea9db7(_0x3c79f3)||_0x3c79f3);return _0x3c79f3;},S=(_0x9ba77a,_0x51cc12)=>(_0x254009,_0x58f972)=>_0x51cc12(_0x254009,_0x58f972,_0x9ba77a);let p=class extends c[_0x2187d4(0x209)]{constructor(_0xa6a5c0,_0x29ec05,_0x41c1a2,_0x1dfdbc){const _0x4ba38d=_0x2187d4;super(),this[_0x4ba38d(0x1e5)]=_0xa6a5c0,this[_0x4ba38d(0x1b9)]=_0x29ec05,this[_0x4ba38d(0x215)]=_0x41c1a2,this[_0x4ba38d(0x202)]=_0x1dfdbc,this[_0x4ba38d(0x1bf)](),this[_0x4ba38d(0x1b0)]();}[_0x2187d4(0x1b0)](){const _0x259c5d=_0x2187d4;this['disposeWithMe'](this[_0x259c5d(0x1b9)][_0x259c5d(0x1ef)][_0x259c5d(0x212)](w[_0x259c5d(0x1e8)](0x10))[_0x259c5d(0x1cd)](_0x5da59a=>{const _0x10e6d5=_0x259c5d,_0x2cefe3=new Set();_0x5da59a[_0x10e6d5(0x1b7)](_0x169979=>{const _0x1e6a81=_0x10e6d5;switch(_0x169979[_0x1e6a81(0x1e9)]){case _0x1e6a81(0x1e3):{const _0x20f678=_0x169979[_0x1e6a81(0x1df)][_0x1e6a81(0x1db)];_0x2cefe3[_0x1e6a81(0x1e3)](_0x20f678);break;}}}),R(this[_0x10e6d5(0x202)],_0x2cefe3);}));}[_0x2187d4(0x1bf)](){const _0x212385=_0x2187d4;this[_0x212385(0x221)](this['_commentService'][_0x212385(0x1ef)]['subscribe'](async _0x32c862=>{const _0xce9498=_0x212385;var _0x41be7e,_0x3046f8,_0xb15a02,_0x3f5dce;const _0x97401e=(_0x41be7e=this[_0xce9498(0x1b9)][_0xce9498(0x1e0)](_0x32c862['unitId'])['find'](_0x26a5f1=>_0x26a5f1[_0xce9498(0x216)]===_0x32c862[_0xce9498(0x216)]))==null?void 0x0:_0x41be7e['root'];if(!_0x97401e)return;const {unitId:_0xd74f48,subUnitId:_0x59a43a}=_0x97401e;switch(_0x32c862['user']&&this['_userService'][_0xce9498(0x1b4)](_0x32c862['user']),_0x32c862['type']){case v[_0xce9498(0x21a)]:break;case v['Reply']:{this[_0xce9498(0x1b9)][_0xce9498(0x1ba)](_0xd74f48,_0x59a43a,{'unitId':_0xd74f48,'subUnitId':_0x59a43a,'ref':'','id':_0x32c862[_0xce9498(0x214)],'dT':f(+_0x32c862[_0xce9498(0x1ff)]),'threadId':_0x32c862[_0xce9498(0x216)],'personId':(_0xb15a02=(_0x3046f8=_0x32c862[_0xce9498(0x21b)])==null?void 0x0:_0x3046f8[_0xce9498(0x1ae)])!=null?_0xb15a02:_0x32c862[_0xce9498(0x1be)],'text':JSON[_0xce9498(0x1ec)](_0x32c862[_0xce9498(0x20e)]),'parentId':_0x97401e['id']});break;}case v[_0xce9498(0x1eb)]:{const _0x1f1134=this[_0xce9498(0x1b9)][_0xce9498(0x200)](_0xd74f48,_0x59a43a,_0x32c862[_0xce9498(0x214)]);_0x1f1134&&_0x1f1134['parentId']&&this['_threadCommentModel'][_0xce9498(0x227)](_0xd74f48,_0x59a43a,_0x32c862[_0xce9498(0x214)]);break;}case v[_0xce9498(0x1fa)]:{this['_threadCommentModel'][_0xce9498(0x1c1)](_0xd74f48,_0x59a43a,{'commentId':_0x32c862[_0xce9498(0x214)],'text':JSON[_0xce9498(0x1ec)](_0x32c862[_0xce9498(0x20e)])});break;}case v[_0xce9498(0x1f1)]:{const _0x3ac31a=(_0x3f5dce=this[_0xce9498(0x1b9)][_0xce9498(0x1e0)](_0x32c862[_0xce9498(0x1cc)])[_0xce9498(0x1d8)](_0x3780a3=>_0x3780a3[_0xce9498(0x216)]===_0x32c862[_0xce9498(0x216)]))==null?void 0x0:_0x3f5dce[_0xce9498(0x1c0)];_0x3ac31a&&this[_0xce9498(0x1b9)]['resolveComment'](_0xd74f48,_0x59a43a,_0x3ac31a['id'],_0x32c862[_0xce9498(0x207)]===I[_0xce9498(0x210)]);break;}}}));}};p=E([S(0x0,c[_0x2187d4(0x1f3)](b['CommentService'])),S(0x1,c[_0x2187d4(0x1f3)](M[_0x2187d4(0x1da)])),S(0x2,c[_0x2187d4(0x1f3)](c[_0x2187d4(0x208)])),S(0x3,c['Inject'](c[_0x2187d4(0x1e6)]))],p);const q=_0x2187d4(0x1f4),D={};function _0x59da(){const _0x4bfdeb=['find','stringify','ThreadCommentModel','personId','OpenOrReOpen','get','setConfig','payload','getUnit','3JkRcQY','resolveComment','add','Reply','_commentService','Injector','/universer-api/user/list','bufferTime','type','HTTPService','Delete','parse','Unknown','UNRECOGNIZED','commentUpdate$','post','Solve','_threadCommentDataSource','Inject','thread-comment-data-source.config','Plugin','pluginName','size','format','filter','Edit','saveCommentToSnapshot','slice','symbol','32679bMYTko','createTimestamp','getComment','getMemberID','_injector','dataSource','@univerjs/core','@univerjs-pro/collaboration-client','_httpService','solved','UserManagerService','Disposable','UniverThreadCommentDataSourcePlugin','91FpiuZq','body','rangeType','content','customRanges','Solved','dayjs','pipe','error','replyId','_userService','threadId','@univerjs-pro/license','126518FWqGOX','length','Add','user','/reply','300ONBryh','CollaborationSessionService','36105BSwFXk','/add','disposeWithMe','ref','getUser','@univerjs/thread-comment-ui','_config','Module','deleteComment','/universer-api/comment/unit/','583848tItFpY','63176sRDStF','resolved','defineProperty','UniverThreadCommentUIPlugin','userID','_threadCommentDataSourceService','_initUserSync','UniverCollaborationClientPlugin','rangeId','values','addUser','requireSession','comment','forEach','syncUpdateMutationToColla','_threadCommentModel','addComment','code','getCurrentUser','UniverLicensePlugin','userId','_init','root','updateComment','YYYY/MM/DD\x20HH:mm','onStarting','/list','reply','72523rVtTOK','DependentOn','listComments','getOwnPropertyDescriptor','_sessionService','58260Ewxfmc','unitId','subscribe','comments','1032isJwam','_configService','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','28djFhJx','map','toStringTag','_initDataSource'];_0x59da=function(){return _0x4bfdeb;};return _0x59da();}var A=Object[_0x2187d4(0x1c9)],x=(_0x4ae81b,_0x1205ad,_0x5d7e8d,_0x2a1c34)=>{const _0x565b6d=_0x2187d4;for(var _0x4c2e38=_0x2a1c34>0x1?void 0x0:_0x2a1c34?A(_0x1205ad,_0x5d7e8d):_0x1205ad,_0x54230d=_0x4ae81b[_0x565b6d(0x219)]-0x1,_0x386202;_0x54230d>=0x0;_0x54230d--)(_0x386202=_0x4ae81b[_0x54230d])&&(_0x4c2e38=_0x386202(_0x4c2e38)||_0x4c2e38);return _0x4c2e38;},_=(_0x5af885,_0x5b39be)=>(_0x29bf89,_0x5c43f8)=>_0x5b39be(_0x29bf89,_0x5c43f8,_0x5af885);function Y(_0x57882c,_0xc17ae4){const _0xa3e50a=_0x2187d4,_0x5975dc=_0x57882c[_0xa3e50a(0x1d1)][0x0];return{..._0xc17ae4,'id':_0x5975dc[_0xa3e50a(0x214)],'resolved':_0x57882c['solved']===0x1,'dT':f(_0x5975dc[_0xa3e50a(0x1ff)]),'personId':_0x5975dc[_0xa3e50a(0x1be)],'threadId':_0x5975dc['threadId']};}function G(_0x27aca2,_0xbfd98,_0x146045){const _0x4b7426=_0x2187d4;var _0x5c45d7,_0x3169f0;if(((_0x3169f0=(_0x5c45d7=_0x27aca2==null?void 0x0:_0x27aca2[_0x4b7426(0x1d1)])==null?void 0x0:_0x5c45d7[_0x4b7426(0x219)])!=null?_0x3169f0:0x0)>0x0){const _0x334449=(_0x31b525,_0x2f9929)=>({'id':_0x31b525[_0x4b7426(0x214)],'threadId':_0x31b525[_0x4b7426(0x216)],'dT':f(_0x31b525[_0x4b7426(0x1ff)]),'personId':_0x31b525['userId'],'resolved':_0x27aca2['solved']===I[_0x4b7426(0x210)],'unitId':_0xbfd98,'subUnitId':_0x146045,'text':JSON['parse'](_0x31b525[_0x4b7426(0x20e)]),'parentId':_0x2f9929}),_0x4d81b6=_0x334449(_0x27aca2[_0x4b7426(0x1d1)][0x0]);return{..._0x4d81b6,'children':_0x27aca2[_0x4b7426(0x1d1)][_0x4b7426(0x1fc)](0x1)[_0x4b7426(0x1d5)](_0x490bdb=>_0x334449(_0x490bdb,_0x4d81b6['id']))};}return null;}let g=class{constructor(_0x5653ce,_0x4aa94b,_0x307fc2,_0xfc2739){const _0x5162d9=_0x2187d4;this[_0x5162d9(0x206)]=_0x5653ce,this[_0x5162d9(0x215)]=_0x4aa94b,this[_0x5162d9(0x1ca)]=_0x307fc2,this['_injector']=_0xfc2739;}async[_0x2187d4(0x1ba)](_0x598e0d){const _0x3a54ed=_0x2187d4;var _0x57cf61,_0x31bad5;const {parentId:_0x18b4a0,unitId:_0x11baf3,text:_0x11b94c,threadId:_0x18e782}=_0x598e0d,_0x527813=(_0x31bad5=(_0x57cf61=_0x11b94c[_0x3a54ed(0x20f)])==null?void 0x0:_0x57cf61[_0x3a54ed(0x1f9)](_0x1e3e7d=>_0x1e3e7d[_0x3a54ed(0x20d)]===c['CustomRangeType']['COMMENT'])[_0x3a54ed(0x1d5)](_0x52e128=>_0x52e128['rangeId']))!=null?_0x31bad5:[],_0x1da035=JSON[_0x3a54ed(0x1d9)](_0x11b94c),_0x1931f1=(await this[_0x3a54ed(0x1ca)]['requireSession'](_0x11baf3))['getMemberID']();if(_0x18b4a0){const _0xc4ffa3={'memberId':_0x1931f1,'unitId':_0x11baf3,'content':_0x1da035,'mention':_0x527813,'threadId':_0x18e782},_0x39a39b=(await this['_httpService']['post'](_0x3a54ed(0x228)+_0x11baf3+_0x3a54ed(0x21c),{'body':_0xc4ffa3}))[_0x3a54ed(0x20c)][_0x3a54ed(0x1c5)];return{..._0x598e0d,'id':_0x39a39b[_0x3a54ed(0x214)],'dT':c[_0x3a54ed(0x211)](+_0x39a39b[_0x3a54ed(0x1ff)])[_0x3a54ed(0x1f8)](_0x3a54ed(0x1c2)),'personId':_0x39a39b[_0x3a54ed(0x1be)]};}else{const _0xe327da={'memberId':_0x1931f1,'unitId':_0x11baf3,'content':_0x1da035,'mention':_0x527813},_0x50dd18=await this[_0x3a54ed(0x206)][_0x3a54ed(0x1f0)](_0x3a54ed(0x228)+_0x11baf3+_0x3a54ed(0x220),{'body':_0xe327da});return Y(_0x50dd18[_0x3a54ed(0x20c)][_0x3a54ed(0x1b6)],_0x598e0d);}}async['updateComment'](_0x46935b){const _0x421a69=_0x2187d4;var _0x3307ad,_0x360e4d;const {text:_0xa7a27a,unitId:_0x21c199}=_0x46935b,_0x75d609=(_0x360e4d=(_0x3307ad=_0xa7a27a[_0x421a69(0x20f)])==null?void 0x0:_0x3307ad[_0x421a69(0x1f9)](_0x415e2a=>_0x415e2a[_0x421a69(0x20d)]===c['CustomRangeType']['COMMENT'])[_0x421a69(0x1d5)](_0x271375=>_0x271375[_0x421a69(0x1b2)]))!=null?_0x360e4d:[],_0x5110af=JSON['stringify'](_0xa7a27a),_0x5de578=_0x46935b[_0x421a69(0x216)],_0x15f63a=_0x46935b['id'],_0x293883={'memberId':(await this[_0x421a69(0x1ca)][_0x421a69(0x1b5)](_0x21c199))[_0x421a69(0x201)](),'unitId':_0x21c199,'threadId':_0x5de578,'mention':_0x75d609,'content':_0x5110af,'replyId':_0x15f63a},_0x547e8c=await this[_0x421a69(0x206)][_0x421a69(0x1f0)](_0x421a69(0x228)+_0x21c199+'/edit',{'body':_0x293883});return!_0x547e8c[_0x421a69(0x20c)][_0x421a69(0x213)]||_0x547e8c[_0x421a69(0x20c)]['error'][_0x421a69(0x1bb)]===0x1;}async[_0x2187d4(0x1e2)](_0x311c11){const _0xa58582=_0x2187d4,{unitId:_0x4b45bd}=_0x311c11,_0x53928e=_0x311c11['threadId'],_0x596d12={'memberId':this[_0xa58582(0x215)][_0xa58582(0x1bc)]()[_0xa58582(0x1ae)],'unitId':_0x4b45bd,'threadId':_0x53928e,'solved':_0x311c11[_0xa58582(0x1ab)]?I[_0xa58582(0x210)]:I[_0xa58582(0x1dc)]},_0x3b0c7b=await this[_0xa58582(0x206)]['post'](_0xa58582(0x228)+_0x4b45bd+_0xa58582(0x1d3),{'body':_0x596d12});return!_0x3b0c7b['body'][_0xa58582(0x213)]||_0x3b0c7b[_0xa58582(0x20c)]['error']['code']===0x1;}async['deleteComment'](_0xfbea4e,_0xa6a23f,_0x4d1b6a,_0x365eba){const _0x60a610=_0x2187d4,_0x37ab84={'memberId':(await this['_sessionService'][_0x60a610(0x1b5)](_0xfbea4e))[_0x60a610(0x201)](),'threadId':_0x4d1b6a,'replyId':_0x365eba,'unitId':_0xfbea4e},_0x56b5cc=await this[_0x60a610(0x206)][_0x60a610(0x1f0)](_0x60a610(0x228)+_0xfbea4e+'/delete',{'body':_0x37ab84});return!_0x56b5cc[_0x60a610(0x20c)]['error']||_0x56b5cc['body']['error']['code']===0x1;}async[_0x2187d4(0x1c8)](_0x13667c,_0xc8965a,_0x49228b){const _0x38b0fa=_0x2187d4,_0x496a46={'unitId':_0x13667c,'threadId':_0x49228b},_0x23f38f=await this[_0x38b0fa(0x206)]['post'](_0x38b0fa(0x228)+_0x13667c+_0x38b0fa(0x1c4),{'body':_0x496a46}),_0x422349=_0x49228b[_0x38b0fa(0x1d5)](_0x9365df=>G(_0x23f38f[_0x38b0fa(0x20c)][_0x38b0fa(0x1ce)][_0x9365df],_0x13667c,_0xc8965a))[_0x38b0fa(0x1f9)](Boolean);return Object[_0x38b0fa(0x1b3)](_0x23f38f[_0x38b0fa(0x20c)]['users'])[_0x38b0fa(0x1b7)](_0x277f2b=>{const _0x5b96ba=_0x38b0fa;this[_0x5b96ba(0x215)]['addUser'](_0x277f2b);}),_0x422349;}[_0x2187d4(0x1fb)](_0xec45bb){const _0x22dbf4=_0x2187d4;return{'id':_0xec45bb['id'],'threadId':_0xec45bb[_0x22dbf4(0x216)],'ref':_0xec45bb[_0x22dbf4(0x222)]};}};g=x([_(0x0,c['Inject'](P[_0x2187d4(0x1ea)])),_(0x1,c[_0x2187d4(0x1f3)](c[_0x2187d4(0x208)])),_(0x2,c[_0x2187d4(0x1f3)](b[_0x2187d4(0x21e)])),_(0x3,c[_0x2187d4(0x1f3)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x5eef8,_0x55e91a,_0xcb290b,_0x3ac765)=>{const _0x372a3f=_0x2187d4;for(var _0xae9cfa=_0x3ac765>0x1?void 0x0:_0x3ac765?H(_0x55e91a,_0xcb290b):_0x55e91a,_0xbba86b=_0x5eef8[_0x372a3f(0x219)]-0x1,_0x1df48e;_0xbba86b>=0x0;_0xbba86b--)(_0x1df48e=_0x5eef8[_0xbba86b])&&(_0xae9cfa=_0x1df48e(_0xae9cfa)||_0xae9cfa);return _0xae9cfa;},y=(_0x13bfe3,_0x188f58)=>(_0x39d902,_0x256e54)=>_0x188f58(_0x39d902,_0x256e54,_0x13bfe3);let C=class extends c[_0x2187d4(0x209)]{constructor(_0x2d4ee6,_0x14ed62){const _0xc58e54=_0x2187d4;super(),this[_0xc58e54(0x1af)]=_0x2d4ee6,this[_0xc58e54(0x1f2)]=_0x14ed62,this[_0xc58e54(0x1d7)]();}['_initDataSource'](){const _0x40c822=_0x2187d4;this[_0x40c822(0x1af)][_0x40c822(0x203)]=this[_0x40c822(0x1f2)],this['_threadCommentDataSourceService'][_0x40c822(0x1b8)]=!0x1;}};function _0x3e02(_0x51b376,_0x597173){const _0x59da12=_0x59da();return _0x3e02=function(_0x3e02a5,_0x28461c){_0x3e02a5=_0x3e02a5-0x1aa;let _0x1ed530=_0x59da12[_0x3e02a5];return _0x1ed530;},_0x3e02(_0x51b376,_0x597173);}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x2187d4(0x1f3)](g))],C);var F=Object[_0x2187d4(0x1ac)],L=Object[_0x2187d4(0x1c9)],Z=(_0x15e597,_0x72a1cf,_0x5eb424)=>_0x72a1cf in _0x15e597?F(_0x15e597,_0x72a1cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5eb424}):_0x15e597[_0x72a1cf]=_0x5eb424,W=(_0x350031,_0x59a0bc,_0x29147b,_0xa8c5a)=>{const _0x2c34e8=_0x2187d4;for(var _0x498289=_0xa8c5a>0x1?void 0x0:_0xa8c5a?L(_0x59a0bc,_0x29147b):_0x59a0bc,_0x18bd05=_0x350031[_0x2c34e8(0x219)]-0x1,_0x265fa7;_0x18bd05>=0x0;_0x18bd05--)(_0x265fa7=_0x350031[_0x18bd05])&&(_0x498289=_0x265fa7(_0x498289)||_0x498289);return _0x498289;},O=(_0x3121c9,_0x4a6fbf)=>(_0x3f25ff,_0x249689)=>_0x4a6fbf(_0x3f25ff,_0x249689,_0x3121c9),N=(_0x114cfb,_0x56c131,_0x27a4b1)=>Z(_0x114cfb,typeof _0x56c131!=_0x2187d4(0x1fd)?_0x56c131+'':_0x56c131,_0x27a4b1);exports[_0x2187d4(0x20a)]=class extends c[_0x2187d4(0x1f5)]{constructor(_0x4ca965=D,_0x369b21,_0x11c43f){const _0x4ab4d7=_0x2187d4;super(),this[_0x4ab4d7(0x225)]=_0x4ca965,this[_0x4ab4d7(0x202)]=_0x369b21,this[_0x4ab4d7(0x1d0)]=_0x11c43f;const {..._0xf5fcd6}=c['merge']({},D,this[_0x4ab4d7(0x225)]);this[_0x4ab4d7(0x1d0)][_0x4ab4d7(0x1de)](q,_0xf5fcd6);}[_0x2187d4(0x1c3)](){[[g],[C],[p]]['forEach'](_0x4ce6f=>{const _0x525749=_0x3e02;this['_injector'][_0x525749(0x1e3)](_0x4ce6f);});}['onReady'](){const _0x5f5dc3=_0x2187d4;this[_0x5f5dc3(0x202)][_0x5f5dc3(0x1dd)](C),this[_0x5f5dc3(0x202)][_0x5f5dc3(0x1dd)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2187d4(0x1f6),U),N(exports[_0x2187d4(0x20a)],_0x2187d4(0x1e9),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x2187d4(0x20a)]=W([c[_0x2187d4(0x1c7)](j[_0x2187d4(0x1ad)],b[_0x2187d4(0x1b1)],T[_0x2187d4(0x1bd)]),O(0x1,c[_0x2187d4(0x1f3)](c[_0x2187d4(0x1e6)])),O(0x2,c['IConfigService'])],exports[_0x2187d4(0x20a)]);
|
|
1
|
+
'use strict';const _0x3c1c0b=_0x3853;(function(_0x1c385c,_0x2abe09){const _0x3c64cc=_0x3853,_0xe56bfa=_0x1c385c();while(!![]){try{const _0x108232=-parseInt(_0x3c64cc(0x152))/0x1+-parseInt(_0x3c64cc(0x133))/0x2*(-parseInt(_0x3c64cc(0x136))/0x3)+-parseInt(_0x3c64cc(0x14a))/0x4+parseInt(_0x3c64cc(0x176))/0x5+parseInt(_0x3c64cc(0x168))/0x6*(-parseInt(_0x3c64cc(0x12a))/0x7)+parseInt(_0x3c64cc(0x11e))/0x8+-parseInt(_0x3c64cc(0x181))/0x9*(parseInt(_0x3c64cc(0x16b))/0xa);if(_0x108232===_0x2abe09)break;else _0xe56bfa['push'](_0xe56bfa['shift']());}catch(_0x4176ec){_0xe56bfa['push'](_0xe56bfa['shift']());}}}(_0x35b9,0x54d4a));Object[_0x3c1c0b(0x175)](exports,Symbol[_0x3c1c0b(0x167)],{'value':_0x3c1c0b(0x113)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x3c1c0b(0x12d)),c=require(_0x3c1c0b(0x135)),j=require(_0x3c1c0b(0x156)),M=require('@univerjs/thread-comment'),w=require(_0x3c1c0b(0x157)),P=require(_0x3c1c0b(0x144)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x112cbb=>(_0x112cbb[_0x112cbb['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x112cbb[_0x112cbb[_0x3c1c0b(0x158)]=0x1]=_0x3c1c0b(0x158),_0x112cbb[_0x112cbb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x112cbb))(I||{}),v=(_0x4db106=>(_0x4db106[_0x4db106['Unknown']=0x0]=_0x3c1c0b(0x11f),_0x4db106[_0x4db106[_0x3c1c0b(0x10b)]=0x1]=_0x3c1c0b(0x10b),_0x4db106[_0x4db106[_0x3c1c0b(0x12b)]=0x2]='Reply',_0x4db106[_0x4db106[_0x3c1c0b(0x12f)]=0x3]=_0x3c1c0b(0x12f),_0x4db106[_0x4db106[_0x3c1c0b(0x10c)]=0x4]=_0x3c1c0b(0x10c),_0x4db106[_0x4db106[_0x3c1c0b(0x149)]=0x5]=_0x3c1c0b(0x149),_0x4db106[_0x4db106[_0x3c1c0b(0x132)]=-0x1]=_0x3c1c0b(0x132),_0x4db106))(v||{});const f=_0x3d6dbd=>c[_0x3c1c0b(0x17c)](new Date(+_0x3d6dbd))[_0x3c1c0b(0x128)](_0x3c1c0b(0x145)),R=async(_0x425db9,_0x2e5e69)=>{const _0x23b318=_0x3c1c0b,_0x1d4634=_0x425db9['get'](c[_0x23b318(0x122)]),_0x3b5d4b=_0x425db9[_0x23b318(0x160)](P[_0x23b318(0x159)]);_0x2e5e69[_0x23b318(0x17e)](_0x2e2853=>{const _0x2f7c04=_0x23b318;_0x1d4634[_0x2f7c04(0x174)](_0x2e2853)&&_0x2e5e69[_0x2f7c04(0x169)](_0x2e2853);}),_0x2e5e69[_0x23b318(0x13e)]&&(await _0x3b5d4b[_0x23b318(0x160)](_0x23b318(0x125),{'params':{'userIDs':[..._0x2e5e69]}}))[_0x23b318(0x16e)][_0x23b318(0x17d)]['forEach'](_0x1cadfa=>{_0x1cadfa&&_0x1d4634['addUser'](_0x1cadfa);});};var $=Object[_0x3c1c0b(0x126)],E=(_0x1e625f,_0x248ac1,_0x516a08,_0x1a6763)=>{const _0xe15b3f=_0x3c1c0b;for(var _0x280658=_0x1a6763>0x1?void 0x0:_0x1a6763?$(_0x248ac1,_0x516a08):_0x248ac1,_0x291f7c=_0x1e625f[_0xe15b3f(0x182)]-0x1,_0x726f37;_0x291f7c>=0x0;_0x291f7c--)(_0x726f37=_0x1e625f[_0x291f7c])&&(_0x280658=_0x726f37(_0x280658)||_0x280658);return _0x280658;},S=(_0x10a0a8,_0x21f565)=>(_0x48102c,_0x42fc55)=>_0x21f565(_0x48102c,_0x42fc55,_0x10a0a8);let p=class extends c['Disposable']{constructor(_0x406cbe,_0x479d93,_0xe81488,_0xb7041d){const _0x2ae140=_0x3c1c0b;super(),this[_0x2ae140(0x15e)]=_0x406cbe,this[_0x2ae140(0x12e)]=_0x479d93,this[_0x2ae140(0x15c)]=_0xe81488,this['_injector']=_0xb7041d,this[_0x2ae140(0x11b)](),this[_0x2ae140(0x112)]();}[_0x3c1c0b(0x112)](){const _0x739868=_0x3c1c0b;this[_0x739868(0x10d)](this[_0x739868(0x12e)]['commentUpdate$'][_0x739868(0x114)](w[_0x739868(0x11a)](0x10))[_0x739868(0x116)](_0x4a1ff0=>{const _0x54b5c3=_0x739868,_0x4b32d2=new Set();_0x4a1ff0['forEach'](_0x366e21=>{const _0x44b48b=_0x3853;switch(_0x366e21[_0x44b48b(0x15a)]){case _0x44b48b(0x179):{const _0x4d5048=_0x366e21['payload'][_0x44b48b(0x166)];_0x4b32d2[_0x44b48b(0x179)](_0x4d5048);break;}}}),R(this[_0x54b5c3(0x121)],_0x4b32d2);}));}['_init'](){const _0x1d7df0=_0x3c1c0b;this[_0x1d7df0(0x10d)](this[_0x1d7df0(0x15e)][_0x1d7df0(0x109)]['subscribe'](async _0x33115c=>{const _0x59c5f7=_0x1d7df0;var _0x4cdd20,_0x10d9e1,_0x103930,_0x22c095;const _0x5b5ccf=(_0x4cdd20=this[_0x59c5f7(0x12e)][_0x59c5f7(0x142)](_0x33115c['unitId'])[_0x59c5f7(0x146)](_0x31d887=>_0x31d887[_0x59c5f7(0x180)]===_0x33115c[_0x59c5f7(0x180)]))==null?void 0x0:_0x4cdd20[_0x59c5f7(0x12c)];if(!_0x5b5ccf)return;const {unitId:_0x428fc8,subUnitId:_0x2914a5}=_0x5b5ccf;switch(_0x33115c[_0x59c5f7(0x118)]&&this[_0x59c5f7(0x15c)][_0x59c5f7(0x139)](_0x33115c[_0x59c5f7(0x118)]),_0x33115c['type']){case v[_0x59c5f7(0x10b)]:break;case v[_0x59c5f7(0x12b)]:{this['_threadCommentModel'][_0x59c5f7(0x16f)](_0x428fc8,_0x2914a5,{'unitId':_0x428fc8,'subUnitId':_0x2914a5,'ref':'','id':_0x33115c['replyId'],'dT':f(+_0x33115c['createTimestamp']),'threadId':_0x33115c[_0x59c5f7(0x180)],'personId':(_0x103930=(_0x10d9e1=_0x33115c[_0x59c5f7(0x118)])==null?void 0x0:_0x10d9e1[_0x59c5f7(0x13f)])!=null?_0x103930:_0x33115c[_0x59c5f7(0x163)],'text':JSON[_0x59c5f7(0x15b)](_0x33115c['content']),'parentId':_0x5b5ccf['id']});break;}case v[_0x59c5f7(0x10c)]:{const _0x4e5d1b=this['_threadCommentModel'][_0x59c5f7(0x137)](_0x428fc8,_0x2914a5,_0x33115c[_0x59c5f7(0x131)]);_0x4e5d1b&&_0x4e5d1b[_0x59c5f7(0x13d)]&&this[_0x59c5f7(0x12e)][_0x59c5f7(0x13b)](_0x428fc8,_0x2914a5,_0x33115c[_0x59c5f7(0x131)]);break;}case v[_0x59c5f7(0x12f)]:{this['_threadCommentModel']['updateComment'](_0x428fc8,_0x2914a5,{'commentId':_0x33115c[_0x59c5f7(0x131)],'text':JSON[_0x59c5f7(0x15b)](_0x33115c[_0x59c5f7(0x170)])});break;}case v[_0x59c5f7(0x149)]:{const _0x1f05ba=(_0x22c095=this[_0x59c5f7(0x12e)][_0x59c5f7(0x142)](_0x33115c[_0x59c5f7(0x107)])['find'](_0x4260c1=>_0x4260c1[_0x59c5f7(0x180)]===_0x33115c[_0x59c5f7(0x180)]))==null?void 0x0:_0x22c095[_0x59c5f7(0x12c)];_0x1f05ba&&this[_0x59c5f7(0x12e)][_0x59c5f7(0x151)](_0x428fc8,_0x2914a5,_0x1f05ba['id'],_0x33115c[_0x59c5f7(0x15d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x3c1c0b(0x143)](b['CommentService'])),S(0x1,c[_0x3c1c0b(0x143)](M[_0x3c1c0b(0x183)])),S(0x2,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x122)])),S(0x3,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x138)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3c1c0b(0x126)],x=(_0x21977a,_0x532695,_0x4a7c5b,_0x4a9c58)=>{const _0x1a4f8b=_0x3c1c0b;for(var _0x32fd9d=_0x4a9c58>0x1?void 0x0:_0x4a9c58?A(_0x532695,_0x4a7c5b):_0x532695,_0x13d365=_0x21977a[_0x1a4f8b(0x182)]-0x1,_0x3488b6;_0x13d365>=0x0;_0x13d365--)(_0x3488b6=_0x21977a[_0x13d365])&&(_0x32fd9d=_0x3488b6(_0x32fd9d)||_0x32fd9d);return _0x32fd9d;},_=(_0x3b9deb,_0x454ac8)=>(_0x30accf,_0x5d63e8)=>_0x454ac8(_0x30accf,_0x5d63e8,_0x3b9deb);function Y(_0x48b9a5,_0xc65269){const _0x2254ce=_0x3c1c0b,_0x1bc505=_0x48b9a5[_0x2254ce(0x14d)][0x0];return{..._0xc65269,'id':_0x1bc505[_0x2254ce(0x131)],'resolved':_0x48b9a5[_0x2254ce(0x15d)]===0x1,'dT':f(_0x1bc505[_0x2254ce(0x148)]),'personId':_0x1bc505[_0x2254ce(0x163)],'threadId':_0x1bc505[_0x2254ce(0x180)]};}function G(_0x287fb5,_0x24bdd8,_0x3bd5cc){const _0x5656c2=_0x3c1c0b;var _0x5dc4cb,_0x1f1c3c;if(((_0x1f1c3c=(_0x5dc4cb=_0x287fb5==null?void 0x0:_0x287fb5['replies'])==null?void 0x0:_0x5dc4cb[_0x5656c2(0x182)])!=null?_0x1f1c3c:0x0)>0x0){const _0x519296=(_0x3abadb,_0x185e72)=>({'id':_0x3abadb[_0x5656c2(0x131)],'threadId':_0x3abadb['threadId'],'dT':f(_0x3abadb[_0x5656c2(0x148)]),'personId':_0x3abadb[_0x5656c2(0x163)],'resolved':_0x287fb5[_0x5656c2(0x15d)]===I[_0x5656c2(0x158)],'unitId':_0x24bdd8,'subUnitId':_0x3bd5cc,'text':JSON['parse'](_0x3abadb[_0x5656c2(0x170)]),'parentId':_0x185e72}),_0x59ac3b=_0x519296(_0x287fb5[_0x5656c2(0x14d)][0x0]);return{..._0x59ac3b,'children':_0x287fb5[_0x5656c2(0x14d)][_0x5656c2(0x17b)](0x1)[_0x5656c2(0x129)](_0x2d2001=>_0x519296(_0x2d2001,_0x59ac3b['id']))};}return null;}function _0x3853(_0x372652,_0x2a9d62){const _0x35b979=_0x35b9();return _0x3853=function(_0x385366,_0x24875b){_0x385366=_0x385366-0x106;let _0x11c5c7=_0x35b979[_0x385366];return _0x11c5c7;},_0x3853(_0x372652,_0x2a9d62);}let g=class{constructor(_0x284c23,_0x4a1309,_0x175d3e,_0x4215ad){const _0x3c477f=_0x3c1c0b;this[_0x3c477f(0x110)]=_0x284c23,this[_0x3c477f(0x15c)]=_0x4a1309,this[_0x3c477f(0x140)]=_0x175d3e,this[_0x3c477f(0x121)]=_0x4215ad;}async['addComment'](_0x5f1a3d){const _0x4595a8=_0x3c1c0b;var _0x1df8c4,_0x309517;const {parentId:_0x3f70e5,unitId:_0x30333a,text:_0x5902de,threadId:_0x28e4e1}=_0x5f1a3d,_0x2f8142=(_0x309517=(_0x1df8c4=_0x5902de[_0x4595a8(0x153)])==null?void 0x0:_0x1df8c4[_0x4595a8(0x10a)](_0x14cbef=>_0x14cbef[_0x4595a8(0x123)]===c['CustomRangeType'][_0x4595a8(0x111)])[_0x4595a8(0x129)](_0x3c6a50=>_0x3c6a50['rangeId']))!=null?_0x309517:[],_0x29e3ba=JSON[_0x4595a8(0x11c)](_0x5902de),_0x5251f0=(await this['_sessionService'][_0x4595a8(0x16d)](_0x30333a))[_0x4595a8(0x14e)]();if(_0x3f70e5){const _0x500cde={'memberId':_0x5251f0,'unitId':_0x30333a,'content':_0x29e3ba,'mention':_0x2f8142,'threadId':_0x28e4e1},_0x5dc134=(await this['_httpService'][_0x4595a8(0x171)](_0x4595a8(0x117)+_0x30333a+_0x4595a8(0x17f),{'body':_0x500cde}))[_0x4595a8(0x16e)][_0x4595a8(0x13c)];return{..._0x5f1a3d,'id':_0x5dc134[_0x4595a8(0x131)],'dT':c[_0x4595a8(0x17c)](+_0x5dc134[_0x4595a8(0x148)])[_0x4595a8(0x128)](_0x4595a8(0x145)),'personId':_0x5dc134[_0x4595a8(0x163)]};}else{const _0x2e96dd={'memberId':_0x5251f0,'unitId':_0x30333a,'content':_0x29e3ba,'mention':_0x2f8142},_0x3d878d=await this[_0x4595a8(0x110)][_0x4595a8(0x171)](_0x4595a8(0x117)+_0x30333a+_0x4595a8(0x11d),{'body':_0x2e96dd});return Y(_0x3d878d[_0x4595a8(0x16e)][_0x4595a8(0x16a)],_0x5f1a3d);}}async[_0x3c1c0b(0x130)](_0x507f20){const _0xb16cd5=_0x3c1c0b;var _0x1a2184,_0x3dabea;const {text:_0x35ed2c,unitId:_0x320e7a}=_0x507f20,_0x166275=(_0x3dabea=(_0x1a2184=_0x35ed2c[_0xb16cd5(0x153)])==null?void 0x0:_0x1a2184['filter'](_0x26a441=>_0x26a441[_0xb16cd5(0x123)]===c[_0xb16cd5(0x119)]['COMMENT'])['map'](_0x4af9be=>_0x4af9be['rangeId']))!=null?_0x3dabea:[],_0x14e044=JSON[_0xb16cd5(0x11c)](_0x35ed2c),_0x4baf30=_0x507f20[_0xb16cd5(0x180)],_0x54d8ba=_0x507f20['id'],_0x846a5e={'memberId':(await this[_0xb16cd5(0x140)][_0xb16cd5(0x16d)](_0x320e7a))[_0xb16cd5(0x14e)](),'unitId':_0x320e7a,'threadId':_0x4baf30,'mention':_0x166275,'content':_0x14e044,'replyId':_0x54d8ba},_0x529680=await this[_0xb16cd5(0x110)][_0xb16cd5(0x171)]('/universer-api/comment/unit/'+_0x320e7a+_0xb16cd5(0x154),{'body':_0x846a5e});return!_0x529680[_0xb16cd5(0x16e)][_0xb16cd5(0x164)]||_0x529680[_0xb16cd5(0x16e)][_0xb16cd5(0x164)][_0xb16cd5(0x134)]===0x1;}async['resolveComment'](_0x361866){const _0x5d962f=_0x3c1c0b,{unitId:_0x460a54}=_0x361866,_0x3c0a0d=_0x361866[_0x5d962f(0x180)],_0x253627={'memberId':this[_0x5d962f(0x15c)][_0x5d962f(0x14f)]()['userID'],'unitId':_0x460a54,'threadId':_0x3c0a0d,'solved':_0x361866['resolved']?I[_0x5d962f(0x158)]:I[_0x5d962f(0x16c)]},_0x1ad817=await this[_0x5d962f(0x110)]['post']('/universer-api/comment/unit/'+_0x460a54+_0x5d962f(0x184),{'body':_0x253627});return!_0x1ad817[_0x5d962f(0x16e)][_0x5d962f(0x164)]||_0x1ad817['body'][_0x5d962f(0x164)][_0x5d962f(0x134)]===0x1;}async[_0x3c1c0b(0x13b)](_0x417b95,_0x557579,_0x489254,_0x4df585){const _0xec9c52=_0x3c1c0b,_0x38fb9f={'memberId':(await this[_0xec9c52(0x140)]['requireSession'](_0x417b95))[_0xec9c52(0x14e)](),'threadId':_0x489254,'replyId':_0x4df585,'unitId':_0x417b95},_0x1573d4=await this[_0xec9c52(0x110)][_0xec9c52(0x171)](_0xec9c52(0x117)+_0x417b95+_0xec9c52(0x165),{'body':_0x38fb9f});return!_0x1573d4['body']['error']||_0x1573d4[_0xec9c52(0x16e)][_0xec9c52(0x164)][_0xec9c52(0x134)]===0x1;}async['listComments'](_0x12dce1,_0x5cb7ee,_0x41e634){const _0x22fa62=_0x3c1c0b,_0x225906={'unitId':_0x12dce1,'threadId':_0x41e634},_0x753232=await this[_0x22fa62(0x110)][_0x22fa62(0x171)](_0x22fa62(0x117)+_0x12dce1+'/list',{'body':_0x225906}),_0xe780c9=_0x41e634[_0x22fa62(0x129)](_0x35145c=>G(_0x753232[_0x22fa62(0x16e)][_0x22fa62(0x147)][_0x35145c],_0x12dce1,_0x5cb7ee))[_0x22fa62(0x10a)](Boolean);return Object[_0x22fa62(0x178)](_0x753232[_0x22fa62(0x16e)]['users'])[_0x22fa62(0x17e)](_0x38a398=>{const _0x8a0251=_0x22fa62;this[_0x8a0251(0x15c)]['addUser'](_0x38a398);}),_0xe780c9;}[_0x3c1c0b(0x161)](_0x5a82ca){const _0x4a5906=_0x3c1c0b;return{'id':_0x5a82ca['id'],'threadId':_0x5a82ca['threadId'],'ref':_0x5a82ca[_0x4a5906(0x150)]};}};g=x([_(0x0,c[_0x3c1c0b(0x143)](P[_0x3c1c0b(0x159)])),_(0x1,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x122)])),_(0x2,c[_0x3c1c0b(0x143)](b[_0x3c1c0b(0x10f)])),_(0x3,c[_0x3c1c0b(0x143)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x521a71,_0x74da72,_0x4b5abf,_0x12e1e8)=>{const _0x235af0=_0x3c1c0b;for(var _0xf5e6f=_0x12e1e8>0x1?void 0x0:_0x12e1e8?H(_0x74da72,_0x4b5abf):_0x74da72,_0x29feea=_0x521a71[_0x235af0(0x182)]-0x1,_0x29553d;_0x29feea>=0x0;_0x29feea--)(_0x29553d=_0x521a71[_0x29feea])&&(_0xf5e6f=_0x29553d(_0xf5e6f)||_0xf5e6f);return _0xf5e6f;},y=(_0x3b19bd,_0x14bae8)=>(_0x2ee740,_0x35b8c8)=>_0x14bae8(_0x2ee740,_0x35b8c8,_0x3b19bd);let C=class extends c[_0x3c1c0b(0x14c)]{constructor(_0x50d258,_0x26ab8c){const _0x26cd84=_0x3c1c0b;super(),this[_0x26cd84(0x10e)]=_0x50d258,this[_0x26cd84(0x177)]=_0x26ab8c,this['_initDataSource']();}[_0x3c1c0b(0x115)](){const _0x4a4ee5=_0x3c1c0b;this[_0x4a4ee5(0x10e)][_0x4a4ee5(0x17a)]=this[_0x4a4ee5(0x177)],this['_threadCommentDataSourceService'][_0x4a4ee5(0x14b)]=!0x1;}};C=J([y(0x0,M[_0x3c1c0b(0x186)]),y(0x1,c[_0x3c1c0b(0x143)](g))],C);var F=Object[_0x3c1c0b(0x175)],L=Object[_0x3c1c0b(0x126)],Z=(_0x4613e4,_0x2fe8eb,_0x444d16)=>_0x2fe8eb in _0x4613e4?F(_0x4613e4,_0x2fe8eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x444d16}):_0x4613e4[_0x2fe8eb]=_0x444d16,W=(_0x25f354,_0xf95aba,_0x3d952b,_0x2dbfc1)=>{const _0x5c25b3=_0x3c1c0b;for(var _0xd358bd=_0x2dbfc1>0x1?void 0x0:_0x2dbfc1?L(_0xf95aba,_0x3d952b):_0xf95aba,_0x44b20c=_0x25f354[_0x5c25b3(0x182)]-0x1,_0x79f05a;_0x44b20c>=0x0;_0x44b20c--)(_0x79f05a=_0x25f354[_0x44b20c])&&(_0xd358bd=_0x79f05a(_0xd358bd)||_0xd358bd);return _0xd358bd;},O=(_0x553026,_0x5c9f3e)=>(_0x27b9d6,_0x131bd4)=>_0x5c9f3e(_0x27b9d6,_0x131bd4,_0x553026),N=(_0x26c779,_0x55bb92,_0x348030)=>Z(_0x26c779,typeof _0x55bb92!=_0x3c1c0b(0x155)?_0x55bb92+'':_0x55bb92,_0x348030);function _0x35b9(){const _0xd84d4e=['subscribe','/universer-api/comment/unit/','user','CustomRangeType','bufferTime','_init','stringify','/add','5299840qPEuBx','Unknown','onReady','_injector','UserManagerService','rangeType','setConfig','/universer-api/user/list','getOwnPropertyDescriptor','_configService','format','map','7ZZkoKu','Reply','root','@univerjs-pro/license','_threadCommentModel','Edit','updateComment','replyId','UNRECOGNIZED','342368feUaSo','code','@univerjs/core','12uevjox','getComment','Injector','addUser','UniverLicensePlugin','deleteComment','reply','parentId','size','userID','_sessionService','UniverThreadCommentDataSourcePlugin','getUnit','Inject','@univerjs/network','YYYY/MM/DD\x20HH:mm','find','comments','createTimestamp','Solve','1228280CTKwmJ','syncUpdateMutationToColla','Disposable','replies','getMemberID','getCurrentUser','ref','resolveComment','515019LONVRh','customRanges','/edit','symbol','@univerjs/thread-comment-ui','rxjs','Solved','HTTPService','type','parse','_userService','solved','_commentService','merge','get','saveCommentToSnapshot','_config','userId','error','/delete','personId','toStringTag','1709358TtzHss','delete','comment','328010uVpjKb','OpenOrReOpen','requireSession','body','addComment','content','post','Plugin','onStarting','getUser','defineProperty','700165zopvJh','_threadCommentDataSource','values','add','dataSource','slice','dayjs','users','forEach','/reply','threadId','9EFyQyF','length','ThreadCommentModel','/solved','IConfigService','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','unitId','DependentOn','commentUpdate$','filter','Add','Delete','disposeWithMe','_threadCommentDataSourceService','CollaborationSessionService','_httpService','COMMENT','_initUserSync','Module','pipe','_initDataSource'];_0x35b9=function(){return _0xd84d4e;};return _0x35b9();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3c1c0b(0x172)]{constructor(_0x234a08=D,_0x53ad79,_0x4511ee){const _0x33096a=_0x3c1c0b;super(),this[_0x33096a(0x162)]=_0x234a08,this[_0x33096a(0x121)]=_0x53ad79,this[_0x33096a(0x127)]=_0x4511ee;const {..._0x247870}=c[_0x33096a(0x15f)]({},D,this['_config']);this[_0x33096a(0x127)][_0x33096a(0x124)](q,_0x247870);}[_0x3c1c0b(0x173)](){const _0x977ebf=_0x3c1c0b;[[g],[C],[p]][_0x977ebf(0x17e)](_0x2b6a83=>{const _0x2af999=_0x977ebf;this['_injector'][_0x2af999(0x179)](_0x2b6a83);});}[_0x3c1c0b(0x120)](){const _0x5849c3=_0x3c1c0b;this['_injector'][_0x5849c3(0x160)](C),this[_0x5849c3(0x121)]['get'](p);}},N(exports[_0x3c1c0b(0x141)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c1c0b(0x15a),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3c1c0b(0x108)](j[_0x3c1c0b(0x106)],b['UniverCollaborationClientPlugin'],T[_0x3c1c0b(0x13a)]),O(0x1,c[_0x3c1c0b(0x143)](c['Injector'])),O(0x2,c[_0x3c1c0b(0x185)])],exports[_0x3c1c0b(0x141)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x343d3b=_0x35d7;(function(_0x76a15e,_0x254761){const _0x3240bf=_0x35d7,_0x11b755=_0x76a15e();while(!![]){try{const _0x4020d8=parseInt(_0x3240bf(0xe0))/0x1+parseInt(_0x3240bf(0xc7))/0x2+-parseInt(_0x3240bf(0xc8))/0x3*(parseInt(_0x3240bf(0x9d))/0x4)+parseInt(_0x3240bf(0xbc))/0x5*(-parseInt(_0x3240bf(0x99))/0x6)+-parseInt(_0x3240bf(0xd5))/0x7+-parseInt(_0x3240bf(0xc6))/0x8+-parseInt(_0x3240bf(0xb0))/0x9*(-parseInt(_0x3240bf(0xc0))/0xa);if(_0x4020d8===_0x254761)break;else _0x11b755['push'](_0x11b755['shift']());}catch(_0x1c3ccb){_0x11b755['push'](_0x11b755['shift']());}}}(_0x1f9d,0xe882f));import{CommentService as _0x57595d,CollaborationSessionService as _0x31684a,UniverCollaborationClientPlugin as _0x243f13}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1d641e}from'@univerjs-pro/license';import{dayjs as _0x151ca6,UserManagerService as _0x2f7a4c,Inject as _0x29eff0,Injector as _0x2ee435,Disposable as _0x352537,CustomRangeType as _0x3475a6,UniverInstanceType as _0x339152,DependentOn as _0x3193ef,IConfigService as _0x474f47,Plugin as _0x196779,merge as _0x5d762b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a94fd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3d4432,IThreadCommentDataSourceService as _0x56f2fd}from'@univerjs/thread-comment';import{bufferTime as _0xf9217f}from'rxjs';import{HTTPService as _0x2f4d34}from'@univerjs/network';function _0x35d7(_0x4b1c17,_0x224fd7){const _0x1f9d07=_0x1f9d();return _0x35d7=function(_0x35d74d,_0x5a40ab){_0x35d74d=_0x35d74d-0x7f;let _0x2f36cb=_0x1f9d07[_0x35d74d];return _0x2f36cb;},_0x35d7(_0x4b1c17,_0x224fd7);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2019af=>(_0x2019af[_0x2019af[_0x343d3b(0x9e)]=0x0]=_0x343d3b(0x9e),_0x2019af[_0x2019af[_0x343d3b(0x90)]=0x1]=_0x343d3b(0x90),_0x2019af[_0x2019af['UNRECOGNIZED']=-0x1]=_0x343d3b(0xd4),_0x2019af))(I||{}),v=(_0x944ada=>(_0x944ada[_0x944ada[_0x343d3b(0x88)]=0x0]=_0x343d3b(0x88),_0x944ada[_0x944ada[_0x343d3b(0xdc)]=0x1]=_0x343d3b(0xdc),_0x944ada[_0x944ada[_0x343d3b(0xde)]=0x2]=_0x343d3b(0xde),_0x944ada[_0x944ada[_0x343d3b(0xd6)]=0x3]=_0x343d3b(0xd6),_0x944ada[_0x944ada[_0x343d3b(0xd3)]=0x4]=_0x343d3b(0xd3),_0x944ada[_0x944ada[_0x343d3b(0xaf)]=0x5]=_0x343d3b(0xaf),_0x944ada[_0x944ada[_0x343d3b(0xd4)]=-0x1]='UNRECOGNIZED',_0x944ada))(v||{});const D=_0xb7b8d8=>_0x151ca6(new Date(+_0xb7b8d8))[_0x343d3b(0xc3)](_0x343d3b(0xd0)),B=async(_0x252bf2,_0x13df45)=>{const _0x9a243=_0x343d3b,_0x1bbf0c=_0x252bf2[_0x9a243(0xe2)](_0x2f7a4c),_0x29be1e=_0x252bf2[_0x9a243(0xe2)](_0x2f4d34);_0x13df45['forEach'](_0x381226=>{const _0x4eaae5=_0x9a243;_0x1bbf0c[_0x4eaae5(0xb9)](_0x381226)&&_0x13df45['delete'](_0x381226);}),_0x13df45['size']&&(await _0x29be1e[_0x9a243(0xe2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13df45]}}))[_0x9a243(0xdb)][_0x9a243(0xe1)][_0x9a243(0xa0)](_0x469164=>{const _0x50ffb3=_0x9a243;_0x469164&&_0x1bbf0c[_0x50ffb3(0x8a)](_0x469164);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xca1f6d,_0x315303,_0x2ab52a,_0x53e1d2)=>{const _0x32847e=_0x343d3b;for(var _0x38adde=_0x53e1d2>0x1?void 0x0:_0x53e1d2?K(_0x315303,_0x2ab52a):_0x315303,_0x144a2b=_0xca1f6d[_0x32847e(0xa4)]-0x1,_0x768f1c;_0x144a2b>=0x0;_0x144a2b--)(_0x768f1c=_0xca1f6d[_0x144a2b])&&(_0x38adde=_0x768f1c(_0x38adde)||_0x38adde);return _0x38adde;},p=(_0xff8d94,_0x27f6a7)=>(_0x594333,_0x9da80f)=>_0x27f6a7(_0x594333,_0x9da80f,_0xff8d94);let S=class extends _0x352537{constructor(_0x564ad0,_0x240f9f,_0x47ef36,_0x4f5d82){const _0x277f0d=_0x343d3b;super(),this[_0x277f0d(0xd2)]=_0x564ad0,this[_0x277f0d(0xb4)]=_0x240f9f,this[_0x277f0d(0xda)]=_0x47ef36,this[_0x277f0d(0x85)]=_0x4f5d82,this[_0x277f0d(0x8e)](),this[_0x277f0d(0xbb)]();}['_initUserSync'](){const _0x5c8f31=_0x343d3b;this['disposeWithMe'](this['_threadCommentModel'][_0x5c8f31(0x87)][_0x5c8f31(0x9a)](_0xf9217f(0x10))[_0x5c8f31(0x81)](_0x2a0497=>{const _0x547b06=_0x5c8f31,_0x3a2dca=new Set();_0x2a0497['forEach'](_0x4d7125=>{const _0x38dd8b=_0x35d7;switch(_0x4d7125['type']){case _0x38dd8b(0x7f):{const _0x29b44c=_0x4d7125[_0x38dd8b(0x8d)][_0x38dd8b(0xd9)];_0x3a2dca[_0x38dd8b(0x7f)](_0x29b44c);break;}}}),B(this[_0x547b06(0x85)],_0x3a2dca);}));}[_0x343d3b(0x8e)](){const _0xd63668=_0x343d3b;this[_0xd63668(0xcd)](this[_0xd63668(0xd2)][_0xd63668(0x87)][_0xd63668(0x81)](async _0x5aaa3f=>{const _0xa40094=_0xd63668;var _0x13aec8,_0x4e23ec,_0xa40b53,_0x17ee2b;const _0x1693e5=(_0x13aec8=this[_0xa40094(0xb4)][_0xa40094(0x98)](_0x5aaa3f['unitId'])[_0xa40094(0x92)](_0x4c6416=>_0x4c6416['threadId']===_0x5aaa3f[_0xa40094(0x8f)]))==null?void 0x0:_0x13aec8[_0xa40094(0xb3)];if(!_0x1693e5)return;const {unitId:_0x307ac4,subUnitId:_0x156314}=_0x1693e5;switch(_0x5aaa3f[_0xa40094(0xa5)]&&this[_0xa40094(0xda)][_0xa40094(0x8a)](_0x5aaa3f['user']),_0x5aaa3f[_0xa40094(0xb1)]){case v[_0xa40094(0xdc)]:break;case v[_0xa40094(0xde)]:{this[_0xa40094(0xb4)][_0xa40094(0x96)](_0x307ac4,_0x156314,{'unitId':_0x307ac4,'subUnitId':_0x156314,'ref':'','id':_0x5aaa3f[_0xa40094(0xae)],'dT':D(+_0x5aaa3f[_0xa40094(0xb6)]),'threadId':_0x5aaa3f[_0xa40094(0x8f)],'personId':(_0xa40b53=(_0x4e23ec=_0x5aaa3f['user'])==null?void 0x0:_0x4e23ec[_0xa40094(0xa6)])!=null?_0xa40b53:_0x5aaa3f[_0xa40094(0x9b)],'text':JSON[_0xa40094(0xdf)](_0x5aaa3f[_0xa40094(0x95)]),'parentId':_0x1693e5['id']});break;}case v['Delete']:{const _0x474f66=this[_0xa40094(0xb4)][_0xa40094(0xbd)](_0x307ac4,_0x156314,_0x5aaa3f['replyId']);_0x474f66&&_0x474f66[_0xa40094(0x86)]&&this[_0xa40094(0xb4)][_0xa40094(0x94)](_0x307ac4,_0x156314,_0x5aaa3f[_0xa40094(0xae)]);break;}case v[_0xa40094(0xd6)]:{this[_0xa40094(0xb4)][_0xa40094(0xb2)](_0x307ac4,_0x156314,{'commentId':_0x5aaa3f['replyId'],'text':JSON[_0xa40094(0xdf)](_0x5aaa3f[_0xa40094(0x95)])});break;}case v[_0xa40094(0xaf)]:{const _0x123e29=(_0x17ee2b=this['_threadCommentModel'][_0xa40094(0x98)](_0x5aaa3f['unitId'])[_0xa40094(0x92)](_0x4b0491=>_0x4b0491[_0xa40094(0x8f)]===_0x5aaa3f[_0xa40094(0x8f)]))==null?void 0x0:_0x17ee2b['root'];_0x123e29&&this[_0xa40094(0xb4)]['resolveComment'](_0x307ac4,_0x156314,_0x123e29['id'],_0x5aaa3f[_0xa40094(0xb8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x29eff0(_0x57595d)),p(0x1,_0x29eff0(_0x3d4432)),p(0x2,_0x29eff0(_0x2f7a4c)),p(0x3,_0x29eff0(_0x2ee435))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x343d3b(0xa9)],Q=(_0xa46bfd,_0x9eaf59,_0x427a28,_0x3a3502)=>{const _0x440ae3=_0x343d3b;for(var _0x41704b=_0x3a3502>0x1?void 0x0:_0x3a3502?k(_0x9eaf59,_0x427a28):_0x9eaf59,_0x3bd227=_0xa46bfd[_0x440ae3(0xa4)]-0x1,_0x1f0cb7;_0x3bd227>=0x0;_0x3bd227--)(_0x1f0cb7=_0xa46bfd[_0x3bd227])&&(_0x41704b=_0x1f0cb7(_0x41704b)||_0x41704b);return _0x41704b;},_=(_0x3a442c,_0x1aac8b)=>(_0x4f039d,_0x4ab7f0)=>_0x1aac8b(_0x4f039d,_0x4ab7f0,_0x3a442c);function X(_0xdd6ec8,_0x2df818){const _0x491b86=_0x343d3b,_0x4e303f=_0xdd6ec8[_0x491b86(0x8c)][0x0];return{..._0x2df818,'id':_0x4e303f['replyId'],'resolved':_0xdd6ec8[_0x491b86(0xb8)]===0x1,'dT':D(_0x4e303f[_0x491b86(0xb6)]),'personId':_0x4e303f[_0x491b86(0x9b)],'threadId':_0x4e303f[_0x491b86(0x8f)]};}function ee(_0x58b511,_0x37aefa,_0x347428){const _0x49cc2c=_0x343d3b;var _0x435e32,_0x4c6d48;if(((_0x4c6d48=(_0x435e32=_0x58b511==null?void 0x0:_0x58b511['replies'])==null?void 0x0:_0x435e32[_0x49cc2c(0xa4)])!=null?_0x4c6d48:0x0)>0x0){const _0x3f579b=(_0x566558,_0x13a3a9)=>({'id':_0x566558[_0x49cc2c(0xae)],'threadId':_0x566558[_0x49cc2c(0x8f)],'dT':D(_0x566558[_0x49cc2c(0xb6)]),'personId':_0x566558['userId'],'resolved':_0x58b511['solved']===I[_0x49cc2c(0x90)],'unitId':_0x37aefa,'subUnitId':_0x347428,'text':JSON[_0x49cc2c(0xdf)](_0x566558[_0x49cc2c(0x95)]),'parentId':_0x13a3a9}),_0x4238bc=_0x3f579b(_0x58b511[_0x49cc2c(0x8c)][0x0]);return{..._0x4238bc,'children':_0x58b511[_0x49cc2c(0x8c)][_0x49cc2c(0xca)](0x1)[_0x49cc2c(0x9f)](_0x2e56bc=>_0x3f579b(_0x2e56bc,_0x4238bc['id']))};}return null;}let f=class{constructor(_0x4ff47c,_0x44c385,_0x57039a,_0x529b62){const _0x3cade9=_0x343d3b;this[_0x3cade9(0xab)]=_0x4ff47c,this[_0x3cade9(0xda)]=_0x44c385,this[_0x3cade9(0xc2)]=_0x57039a,this['_injector']=_0x529b62;}async[_0x343d3b(0x96)](_0x35a88a){const _0x3bfeaf=_0x343d3b;var _0x44ce2f,_0x475d66;const {parentId:_0x39204e,unitId:_0x51760b,text:_0x2d0543,threadId:_0x565dee}=_0x35a88a,_0x5c2ea8=(_0x475d66=(_0x44ce2f=_0x2d0543[_0x3bfeaf(0xdd)])==null?void 0x0:_0x44ce2f[_0x3bfeaf(0xbe)](_0x1632b8=>_0x1632b8[_0x3bfeaf(0xcb)]===_0x3475a6['COMMENT'])['map'](_0x26af86=>_0x26af86[_0x3bfeaf(0xc5)]))!=null?_0x475d66:[],_0x409722=JSON[_0x3bfeaf(0xd8)](_0x2d0543),_0x40f2f4=(await this[_0x3bfeaf(0xc2)][_0x3bfeaf(0xb5)](_0x51760b))[_0x3bfeaf(0xbf)]();if(_0x39204e){const _0x427da8={'memberId':_0x40f2f4,'unitId':_0x51760b,'content':_0x409722,'mention':_0x5c2ea8,'threadId':_0x565dee},_0x46de27=(await this['_httpService'][_0x3bfeaf(0xa8)](_0x3bfeaf(0xd7)+_0x51760b+_0x3bfeaf(0xd1),{'body':_0x427da8}))[_0x3bfeaf(0xdb)]['reply'];return{..._0x35a88a,'id':_0x46de27[_0x3bfeaf(0xae)],'dT':_0x151ca6(+_0x46de27[_0x3bfeaf(0xb6)])[_0x3bfeaf(0xc3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x46de27[_0x3bfeaf(0x9b)]};}else{const _0x4ddc4c={'memberId':_0x40f2f4,'unitId':_0x51760b,'content':_0x409722,'mention':_0x5c2ea8},_0x328398=await this['_httpService'][_0x3bfeaf(0xa8)](_0x3bfeaf(0xd7)+_0x51760b+_0x3bfeaf(0x82),{'body':_0x4ddc4c});return X(_0x328398[_0x3bfeaf(0xdb)][_0x3bfeaf(0x80)],_0x35a88a);}}async['updateComment'](_0x4a6cda){const _0x5f1033=_0x343d3b;var _0x1e8af6,_0xc6eb30;const {text:_0x13c77e,unitId:_0x2c77de}=_0x4a6cda,_0x1b52cc=(_0xc6eb30=(_0x1e8af6=_0x13c77e[_0x5f1033(0xdd)])==null?void 0x0:_0x1e8af6[_0x5f1033(0xbe)](_0x1102c8=>_0x1102c8[_0x5f1033(0xcb)]===_0x3475a6[_0x5f1033(0xba)])[_0x5f1033(0x9f)](_0x25dd9f=>_0x25dd9f[_0x5f1033(0xc5)]))!=null?_0xc6eb30:[],_0x1849dd=JSON[_0x5f1033(0xd8)](_0x13c77e),_0xc29c10=_0x4a6cda[_0x5f1033(0x8f)],_0x2e915a=_0x4a6cda['id'],_0x1ab8f3={'memberId':(await this[_0x5f1033(0xc2)]['requireSession'](_0x2c77de))[_0x5f1033(0xbf)](),'unitId':_0x2c77de,'threadId':_0xc29c10,'mention':_0x1b52cc,'content':_0x1849dd,'replyId':_0x2e915a},_0x15a843=await this[_0x5f1033(0xab)][_0x5f1033(0xa8)](_0x5f1033(0xd7)+_0x2c77de+_0x5f1033(0x8b),{'body':_0x1ab8f3});return!_0x15a843['body']['error']||_0x15a843[_0x5f1033(0xdb)]['error']['code']===0x1;}async[_0x343d3b(0x83)](_0x40c85b){const _0x1c4c43=_0x343d3b,{unitId:_0x5b83b9}=_0x40c85b,_0x180c47=_0x40c85b[_0x1c4c43(0x8f)],_0x5714e5={'memberId':this[_0x1c4c43(0xda)][_0x1c4c43(0x93)]()[_0x1c4c43(0xa6)],'unitId':_0x5b83b9,'threadId':_0x180c47,'solved':_0x40c85b[_0x1c4c43(0xc1)]?I[_0x1c4c43(0x90)]:I['OpenOrReOpen']},_0x37e3b8=await this[_0x1c4c43(0xab)][_0x1c4c43(0xa8)](_0x1c4c43(0xd7)+_0x5b83b9+_0x1c4c43(0xc4),{'body':_0x5714e5});return!_0x37e3b8[_0x1c4c43(0xdb)][_0x1c4c43(0xce)]||_0x37e3b8[_0x1c4c43(0xdb)][_0x1c4c43(0xce)][_0x1c4c43(0xaa)]===0x1;}async[_0x343d3b(0x94)](_0x14c358,_0x2c7748,_0x193bc8,_0x366f9a){const _0x8379ad=_0x343d3b,_0x315e3e={'memberId':(await this[_0x8379ad(0xc2)][_0x8379ad(0xb5)](_0x14c358))[_0x8379ad(0xbf)](),'threadId':_0x193bc8,'replyId':_0x366f9a,'unitId':_0x14c358},_0x4fc850=await this[_0x8379ad(0xab)][_0x8379ad(0xa8)](_0x8379ad(0xd7)+_0x14c358+_0x8379ad(0xad),{'body':_0x315e3e});return!_0x4fc850[_0x8379ad(0xdb)][_0x8379ad(0xce)]||_0x4fc850[_0x8379ad(0xdb)][_0x8379ad(0xce)][_0x8379ad(0xaa)]===0x1;}async[_0x343d3b(0xa1)](_0x2d6dd7,_0x1cedda,_0x40c74e){const _0x52e780=_0x343d3b,_0x5dfa53={'unitId':_0x2d6dd7,'threadId':_0x40c74e},_0x2ef6cd=await this['_httpService'][_0x52e780(0xa8)]('/universer-api/comment/unit/'+_0x2d6dd7+_0x52e780(0x91),{'body':_0x5dfa53}),_0x1459ef=_0x40c74e['map'](_0x55cdb0=>ee(_0x2ef6cd[_0x52e780(0xdb)][_0x52e780(0x97)][_0x55cdb0],_0x2d6dd7,_0x1cedda))[_0x52e780(0xbe)](Boolean);return Object['values'](_0x2ef6cd[_0x52e780(0xdb)][_0x52e780(0xe1)])[_0x52e780(0xa0)](_0x502a85=>{const _0x46df4b=_0x52e780;this[_0x46df4b(0xda)]['addUser'](_0x502a85);}),_0x1459ef;}[_0x343d3b(0x9c)](_0x1d657a){const _0x49ca9a=_0x343d3b;return{'id':_0x1d657a['id'],'threadId':_0x1d657a['threadId'],'ref':_0x1d657a[_0x49ca9a(0xb7)]};}};f=Q([_(0x0,_0x29eff0(_0x2f4d34)),_(0x1,_0x29eff0(_0x2f7a4c)),_(0x2,_0x29eff0(_0x31684a)),_(0x3,_0x29eff0(_0x2ee435))],f);var re=Object[_0x343d3b(0xa9)],te=(_0xee947c,_0x41df93,_0x571f3c,_0x862cb9)=>{const _0x191fca=_0x343d3b;for(var _0x2d4a3c=_0x862cb9>0x1?void 0x0:_0x862cb9?re(_0x41df93,_0x571f3c):_0x41df93,_0x2d33f6=_0xee947c[_0x191fca(0xa4)]-0x1,_0x20b79f;_0x2d33f6>=0x0;_0x2d33f6--)(_0x20b79f=_0xee947c[_0x2d33f6])&&(_0x2d4a3c=_0x20b79f(_0x2d4a3c)||_0x2d4a3c);return _0x2d4a3c;},N=(_0x5cd018,_0x54d3d2)=>(_0x2913e9,_0x1be43f)=>_0x54d3d2(_0x2913e9,_0x1be43f,_0x5cd018);let g=class extends _0x352537{constructor(_0x528678,_0x27d2e7){const _0x2c9394=_0x343d3b;super(),this[_0x2c9394(0x89)]=_0x528678,this[_0x2c9394(0xcc)]=_0x27d2e7,this[_0x2c9394(0xa3)]();}['_initDataSource'](){const _0x272d8d=_0x343d3b;this['_threadCommentDataSourceService'][_0x272d8d(0xc9)]=this[_0x272d8d(0xcc)],this[_0x272d8d(0x89)][_0x272d8d(0xac)]=!0x1;}};g=te([N(0x0,_0x56f2fd),N(0x1,_0x29eff0(f))],g);function _0x1f9d(){const _0x5a2236=['1066522ryZArz','users','get','add','comment','subscribe','/add','resolveComment','onReady','_injector','parentId','commentUpdate$','Unknown','_threadCommentDataSourceService','addUser','/edit','replies','payload','_init','threadId','Solved','/list','find','getCurrentUser','deleteComment','content','addComment','comments','getUnit','10074WVlvXr','pipe','userId','saveCommentToSnapshot','20MnsOqV','OpenOrReOpen','map','forEach','listComments','pluginName','_initDataSource','length','user','userID','_configService','post','getOwnPropertyDescriptor','code','_httpService','syncUpdateMutationToColla','/delete','replyId','Solve','963lWoBMo','type','updateComment','root','_threadCommentModel','requireSession','createTimestamp','ref','solved','getUser','COMMENT','_initUserSync','4085wXLbEz','getComment','filter','getMemberID','307180AIvfuz','resolved','_sessionService','format','/solved','rangeId','9354264gzAmVj','3077608GETkKk','661848JAYqvf','dataSource','slice','rangeType','_threadCommentDataSource','disposeWithMe','error','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','/reply','_commentService','Delete','UNRECOGNIZED','9069753pdOkvb','Edit','/universer-api/comment/unit/','stringify','personId','_userService','body','Add','customRanges','Reply','parse'];_0x1f9d=function(){return _0x5a2236;};return _0x1f9d();}var se=Object['defineProperty'],oe=Object[_0x343d3b(0xa9)],ne=(_0x5f1bef,_0x27b098,_0x270609)=>_0x27b098 in _0x5f1bef?se(_0x5f1bef,_0x27b098,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x270609}):_0x5f1bef[_0x27b098]=_0x270609,ie=(_0x5af9e9,_0x22f23b,_0x19c3b5,_0x113048)=>{const _0x5e8e03=_0x343d3b;for(var _0xcd1b93=_0x113048>0x1?void 0x0:_0x113048?oe(_0x22f23b,_0x19c3b5):_0x22f23b,_0x15d678=_0x5af9e9[_0x5e8e03(0xa4)]-0x1,_0x1df7ec;_0x15d678>=0x0;_0x15d678--)(_0x1df7ec=_0x5af9e9[_0x15d678])&&(_0xcd1b93=_0x1df7ec(_0xcd1b93)||_0xcd1b93);return _0xcd1b93;},w=(_0x21228c,_0x3c33e3)=>(_0x176712,_0x4e76d2)=>_0x3c33e3(_0x176712,_0x4e76d2,_0x21228c),$=(_0x3c5058,_0x24d389,_0x353be8)=>ne(_0x3c5058,typeof _0x24d389!='symbol'?_0x24d389+'':_0x24d389,_0x353be8);let b=class extends _0x196779{constructor(_0xe154a4=M,_0x3adb0d,_0x309527){const _0x3df05e=_0x343d3b;super(),this['_config']=_0xe154a4,this[_0x3df05e(0x85)]=_0x3adb0d,this[_0x3df05e(0xa7)]=_0x309527;const {..._0x269d09}=_0x5d762b({},M,this['_config']);this[_0x3df05e(0xa7)]['setConfig'](z,_0x269d09);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x25fecf=>{const _0x1025db=_0x35d7;this['_injector'][_0x1025db(0x7f)](_0x25fecf);});}[_0x343d3b(0x84)](){const _0x384695=_0x343d3b;this[_0x384695(0x85)][_0x384695(0xe2)](g),this[_0x384695(0x85)][_0x384695(0xe2)](S);}};$(b,_0x343d3b(0xa2),W),$(b,_0x343d3b(0xb1),_0x339152[_0x343d3b(0xcf)]),b=ie([_0x3193ef(_0x3a94fd,_0x243f13,_0x1d641e),w(0x1,_0x29eff0(_0x2ee435)),w(0x2,_0x474f47)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5d47f7=_0x224b;(function(_0x34b563,_0x5d1c36){const _0x2a423f=_0x224b,_0x4ce73e=_0x34b563();while(!![]){try{const _0x130ba2=-parseInt(_0x2a423f(0x1c8))/0x1+-parseInt(_0x2a423f(0x1c7))/0x2+parseInt(_0x2a423f(0x1fc))/0x3+parseInt(_0x2a423f(0x221))/0x4*(-parseInt(_0x2a423f(0x1d6))/0x5)+parseInt(_0x2a423f(0x1f9))/0x6+-parseInt(_0x2a423f(0x200))/0x7*(-parseInt(_0x2a423f(0x1fe))/0x8)+parseInt(_0x2a423f(0x1e4))/0x9*(parseInt(_0x2a423f(0x1c0))/0xa);if(_0x130ba2===_0x5d1c36)break;else _0x4ce73e['push'](_0x4ce73e['shift']());}catch(_0x2d12d8){_0x4ce73e['push'](_0x4ce73e['shift']());}}}(_0x4a97,0x63c31));import{CommentService as _0x5b5cb2,CollaborationSessionService as _0xff52e3,UniverCollaborationClientPlugin as _0x31a28b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x104cb6}from'@univerjs-pro/license';import{dayjs as _0x4892bc,UserManagerService as _0x4ec60f,Inject as _0x485985,Injector as _0x17ace1,Disposable as _0x3e4cea,CustomRangeType as _0x5108c3,UniverInstanceType as _0x5d649f,DependentOn as _0x5d59fb,IConfigService as _0x253407,Plugin as _0x28570a,merge as _0x43a2d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22014a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x508dd5,IThreadCommentDataSourceService as _0x596221}from'@univerjs/thread-comment';import{bufferTime as _0x38892e}from'rxjs';import{HTTPService as _0x166e15}from'@univerjs/network';const W=_0x5d47f7(0x205);var I=(_0x2ad048=>(_0x2ad048[_0x2ad048[_0x5d47f7(0x1e0)]=0x0]=_0x5d47f7(0x1e0),_0x2ad048[_0x2ad048['Solved']=0x1]=_0x5d47f7(0x1f5),_0x2ad048[_0x2ad048[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x2ad048))(I||{}),v=(_0x5893ba=>(_0x5893ba[_0x5893ba['Unknown']=0x0]=_0x5d47f7(0x21e),_0x5893ba[_0x5893ba[_0x5d47f7(0x216)]=0x1]=_0x5d47f7(0x216),_0x5893ba[_0x5893ba[_0x5d47f7(0x20d)]=0x2]=_0x5d47f7(0x20d),_0x5893ba[_0x5893ba[_0x5d47f7(0x1c1)]=0x3]='Edit',_0x5893ba[_0x5893ba[_0x5d47f7(0x1bc)]=0x4]=_0x5d47f7(0x1bc),_0x5893ba[_0x5893ba['Solve']=0x5]=_0x5d47f7(0x1e8),_0x5893ba[_0x5893ba[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x5893ba))(v||{});const D=_0xff3b01=>_0x4892bc(new Date(+_0xff3b01))[_0x5d47f7(0x1e6)](_0x5d47f7(0x1dd)),B=async(_0x18f1c4,_0x31ff46)=>{const _0x196e9e=_0x5d47f7,_0x3b0438=_0x18f1c4[_0x196e9e(0x206)](_0x4ec60f),_0x4256a7=_0x18f1c4[_0x196e9e(0x206)](_0x166e15);_0x31ff46[_0x196e9e(0x20a)](_0x2a8250=>{const _0xd01244=_0x196e9e;_0x3b0438[_0xd01244(0x1ef)](_0x2a8250)&&_0x31ff46['delete'](_0x2a8250);}),_0x31ff46[_0x196e9e(0x1ee)]&&(await _0x4256a7[_0x196e9e(0x206)](_0x196e9e(0x1f3),{'params':{'userIDs':[..._0x31ff46]}}))['body'][_0x196e9e(0x1de)]['forEach'](_0x3142f3=>{const _0x409850=_0x196e9e;_0x3142f3&&_0x3b0438[_0x409850(0x1d4)](_0x3142f3);});};var K=Object[_0x5d47f7(0x219)],V=(_0xe8b149,_0x27a239,_0x13da1c,_0x317ce8)=>{const _0x478706=_0x5d47f7;for(var _0x32e9db=_0x317ce8>0x1?void 0x0:_0x317ce8?K(_0x27a239,_0x13da1c):_0x27a239,_0x294f8c=_0xe8b149[_0x478706(0x1cc)]-0x1,_0x7c295b;_0x294f8c>=0x0;_0x294f8c--)(_0x7c295b=_0xe8b149[_0x294f8c])&&(_0x32e9db=_0x7c295b(_0x32e9db)||_0x32e9db);return _0x32e9db;},p=(_0x3e0ac1,_0x517b08)=>(_0x4e2493,_0x4c3d0a)=>_0x517b08(_0x4e2493,_0x4c3d0a,_0x3e0ac1);let S=class extends _0x3e4cea{constructor(_0x18558d,_0x46a022,_0x7ffe0f,_0x241782){const _0x2ad117=_0x5d47f7;super(),this[_0x2ad117(0x20e)]=_0x18558d,this[_0x2ad117(0x1c3)]=_0x46a022,this[_0x2ad117(0x1f4)]=_0x7ffe0f,this['_injector']=_0x241782,this[_0x2ad117(0x1f8)](),this[_0x2ad117(0x1e3)]();}[_0x5d47f7(0x1e3)](){const _0x389ee9=_0x5d47f7;this[_0x389ee9(0x21b)](this[_0x389ee9(0x1c3)][_0x389ee9(0x1dc)][_0x389ee9(0x211)](_0x38892e(0x10))[_0x389ee9(0x1cb)](_0x28e391=>{const _0x45d5e0=_0x389ee9,_0x588aa5=new Set();_0x28e391['forEach'](_0x2b74e8=>{const _0x2160b3=_0x224b;switch(_0x2b74e8['type']){case _0x2160b3(0x1bb):{const _0x9db2fb=_0x2b74e8[_0x2160b3(0x1ce)][_0x2160b3(0x213)];_0x588aa5[_0x2160b3(0x1bb)](_0x9db2fb);break;}}}),B(this[_0x45d5e0(0x1cd)],_0x588aa5);}));}[_0x5d47f7(0x1f8)](){const _0x43610f=_0x5d47f7;this[_0x43610f(0x21b)](this['_commentService']['commentUpdate$'][_0x43610f(0x1cb)](async _0xd954c1=>{const _0xea04b6=_0x43610f;var _0x2f3c75,_0x11a35b,_0x43385b,_0x3b40c3;const _0x4c3d57=(_0x2f3c75=this['_threadCommentModel']['getUnit'](_0xd954c1[_0xea04b6(0x1c2)])['find'](_0x13cd3d=>_0x13cd3d[_0xea04b6(0x1f2)]===_0xd954c1['threadId']))==null?void 0x0:_0x2f3c75[_0xea04b6(0x1c6)];if(!_0x4c3d57)return;const {unitId:_0x4d4990,subUnitId:_0x31a111}=_0x4c3d57;switch(_0xd954c1[_0xea04b6(0x1fb)]&&this['_userService'][_0xea04b6(0x1d4)](_0xd954c1['user']),_0xd954c1['type']){case v[_0xea04b6(0x216)]:break;case v[_0xea04b6(0x20d)]:{this[_0xea04b6(0x1c3)][_0xea04b6(0x1d2)](_0x4d4990,_0x31a111,{'unitId':_0x4d4990,'subUnitId':_0x31a111,'ref':'','id':_0xd954c1[_0xea04b6(0x1da)],'dT':D(+_0xd954c1[_0xea04b6(0x1ec)]),'threadId':_0xd954c1[_0xea04b6(0x1f2)],'personId':(_0x43385b=(_0x11a35b=_0xd954c1[_0xea04b6(0x1fb)])==null?void 0x0:_0x11a35b[_0xea04b6(0x212)])!=null?_0x43385b:_0xd954c1['userId'],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content']),'parentId':_0x4c3d57['id']});break;}case v[_0xea04b6(0x1bc)]:{const _0x25a717=this[_0xea04b6(0x1c3)][_0xea04b6(0x1c9)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);_0x25a717&&_0x25a717[_0xea04b6(0x21f)]&&this[_0xea04b6(0x1c3)][_0xea04b6(0x1f6)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);break;}case v[_0xea04b6(0x1c1)]:{this[_0xea04b6(0x1c3)]['updateComment'](_0x4d4990,_0x31a111,{'commentId':_0xd954c1[_0xea04b6(0x1da)],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content'])});break;}case v[_0xea04b6(0x1e8)]:{const _0xc9187=(_0x3b40c3=this[_0xea04b6(0x1c3)][_0xea04b6(0x1ea)](_0xd954c1['unitId'])[_0xea04b6(0x207)](_0x2f12ec=>_0x2f12ec[_0xea04b6(0x1f2)]===_0xd954c1[_0xea04b6(0x1f2)]))==null?void 0x0:_0x3b40c3[_0xea04b6(0x1c6)];_0xc9187&&this[_0xea04b6(0x1c3)][_0xea04b6(0x202)](_0x4d4990,_0x31a111,_0xc9187['id'],_0xd954c1['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x485985(_0x5b5cb2)),p(0x1,_0x485985(_0x508dd5)),p(0x2,_0x485985(_0x4ec60f)),p(0x3,_0x485985(_0x17ace1))],S);const z=_0x5d47f7(0x1ca),M={};var k=Object[_0x5d47f7(0x219)],Q=(_0x2fa068,_0x31385a,_0x47307f,_0x1cb765)=>{const _0x168d28=_0x5d47f7;for(var _0x49129c=_0x1cb765>0x1?void 0x0:_0x1cb765?k(_0x31385a,_0x47307f):_0x31385a,_0x1127c9=_0x2fa068[_0x168d28(0x1cc)]-0x1,_0x364bf5;_0x1127c9>=0x0;_0x1127c9--)(_0x364bf5=_0x2fa068[_0x1127c9])&&(_0x49129c=_0x364bf5(_0x49129c)||_0x49129c);return _0x49129c;},_=(_0x202aea,_0x19ed85)=>(_0x58949b,_0x580c04)=>_0x19ed85(_0x58949b,_0x580c04,_0x202aea);function _0x4a97(){const _0x23bda0=['setConfig','requireSession','listComments','70yCuEHH','Edit','unitId','_threadCommentModel','rangeId','_config','root','1489384LJXPSo','743096EoCseq','getComment','thread-comment-data-source.config','subscribe','length','_injector','payload','_configService','code','COMMENT','addComment','error','addUser','dataSource','8815uzAPHn','UNRECOGNIZED','_threadCommentDataSource','parse','replyId','symbol','commentUpdate$','YYYY/MM/DD\x20HH:mm','users','solved','OpenOrReOpen','getMemberID','UNIVER_UNKNOWN','_initUserSync','1422585MeTzuE','defineProperty','format','userId','Solve','values','getUnit','map','createTimestamp','_httpService','size','getUser','filter','syncUpdateMutationToColla','threadId','/universer-api/user/list','_userService','Solved','deleteComment','rangeType','_init','2356656YijQem','saveCommentToSnapshot','user','1963389OFDTFN','/delete','16rVwNjf','content','808745NVGwig','/solved','resolveComment','pluginName','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','find','/edit','type','forEach','_sessionService','customRanges','Reply','_commentService','/reply','/universer-api/comment/unit/','pipe','userID','personId','ref','resolved','Add','/list','stringify','getOwnPropertyDescriptor','replies','disposeWithMe','post','_threadCommentDataSourceService','Unknown','parentId','/add','1108oisWBF','body','add','Delete'];_0x4a97=function(){return _0x23bda0;};return _0x4a97();}function X(_0x2853ff,_0x4efc93){const _0x39877e=_0x5d47f7,_0x1ad1dd=_0x2853ff[_0x39877e(0x21a)][0x0];return{..._0x4efc93,'id':_0x1ad1dd[_0x39877e(0x1da)],'resolved':_0x2853ff[_0x39877e(0x1df)]===0x1,'dT':D(_0x1ad1dd[_0x39877e(0x1ec)]),'personId':_0x1ad1dd[_0x39877e(0x1e7)],'threadId':_0x1ad1dd[_0x39877e(0x1f2)]};}function ee(_0x161cf9,_0x104e35,_0x33390b){const _0x4e3082=_0x5d47f7;var _0x52b2c2,_0x2e7d0c;if(((_0x2e7d0c=(_0x52b2c2=_0x161cf9==null?void 0x0:_0x161cf9[_0x4e3082(0x21a)])==null?void 0x0:_0x52b2c2['length'])!=null?_0x2e7d0c:0x0)>0x0){const _0x5c1f53=(_0x843475,_0xc7a9b5)=>({'id':_0x843475[_0x4e3082(0x1da)],'threadId':_0x843475[_0x4e3082(0x1f2)],'dT':D(_0x843475[_0x4e3082(0x1ec)]),'personId':_0x843475['userId'],'resolved':_0x161cf9[_0x4e3082(0x1df)]===I['Solved'],'unitId':_0x104e35,'subUnitId':_0x33390b,'text':JSON[_0x4e3082(0x1d9)](_0x843475[_0x4e3082(0x1ff)]),'parentId':_0xc7a9b5}),_0xd4ae6f=_0x5c1f53(_0x161cf9[_0x4e3082(0x21a)][0x0]);return{..._0xd4ae6f,'children':_0x161cf9[_0x4e3082(0x21a)]['slice'](0x1)[_0x4e3082(0x1eb)](_0x4108fe=>_0x5c1f53(_0x4108fe,_0xd4ae6f['id']))};}return null;}let f=class{constructor(_0x5f578d,_0x4fd9fe,_0x45f46e,_0x586ae3){const _0x3e06e9=_0x5d47f7;this[_0x3e06e9(0x1ed)]=_0x5f578d,this[_0x3e06e9(0x1f4)]=_0x4fd9fe,this['_sessionService']=_0x45f46e,this[_0x3e06e9(0x1cd)]=_0x586ae3;}async[_0x5d47f7(0x1d2)](_0x517c38){const _0x300896=_0x5d47f7;var _0x1d5f83,_0x2302dc;const {parentId:_0x59487b,unitId:_0x5b6976,text:_0x1d06c8,threadId:_0x515c10}=_0x517c38,_0x14de92=(_0x2302dc=(_0x1d5f83=_0x1d06c8[_0x300896(0x20c)])==null?void 0x0:_0x1d5f83[_0x300896(0x1f0)](_0x57cab6=>_0x57cab6[_0x300896(0x1f7)]===_0x5108c3[_0x300896(0x1d1)])[_0x300896(0x1eb)](_0x2be1de=>_0x2be1de[_0x300896(0x1c4)]))!=null?_0x2302dc:[],_0x2a1650=JSON[_0x300896(0x218)](_0x1d06c8),_0x50a64d=(await this[_0x300896(0x20b)][_0x300896(0x1be)](_0x5b6976))[_0x300896(0x1e1)]();if(_0x59487b){const _0xfa2b35={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92,'threadId':_0x515c10},_0x1bb879=(await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x20f),{'body':_0xfa2b35}))[_0x300896(0x222)]['reply'];return{..._0x517c38,'id':_0x1bb879['replyId'],'dT':_0x4892bc(+_0x1bb879[_0x300896(0x1ec)])[_0x300896(0x1e6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1bb879[_0x300896(0x1e7)]};}else{const _0x230492={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92},_0x4593bc=await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x220),{'body':_0x230492});return X(_0x4593bc[_0x300896(0x222)]['comment'],_0x517c38);}}async['updateComment'](_0x1d667a){const _0xe37e36=_0x5d47f7;var _0x2152b5,_0x25abb1;const {text:_0x4d99a3,unitId:_0x57573e}=_0x1d667a,_0x2c8c74=(_0x25abb1=(_0x2152b5=_0x4d99a3[_0xe37e36(0x20c)])==null?void 0x0:_0x2152b5[_0xe37e36(0x1f0)](_0xf05851=>_0xf05851[_0xe37e36(0x1f7)]===_0x5108c3[_0xe37e36(0x1d1)])[_0xe37e36(0x1eb)](_0x287918=>_0x287918[_0xe37e36(0x1c4)]))!=null?_0x25abb1:[],_0x3be6e3=JSON[_0xe37e36(0x218)](_0x4d99a3),_0x314092=_0x1d667a[_0xe37e36(0x1f2)],_0x40d215=_0x1d667a['id'],_0x3da70f={'memberId':(await this[_0xe37e36(0x20b)]['requireSession'](_0x57573e))[_0xe37e36(0x1e1)](),'unitId':_0x57573e,'threadId':_0x314092,'mention':_0x2c8c74,'content':_0x3be6e3,'replyId':_0x40d215},_0x2a8f82=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x57573e+_0xe37e36(0x208),{'body':_0x3da70f});return!_0x2a8f82[_0xe37e36(0x222)]['error']||_0x2a8f82[_0xe37e36(0x222)][_0xe37e36(0x1d3)][_0xe37e36(0x1d0)]===0x1;}async['resolveComment'](_0x253ac0){const _0x1f870a=_0x5d47f7,{unitId:_0x4ed73d}=_0x253ac0,_0x4a0286=_0x253ac0[_0x1f870a(0x1f2)],_0x14d47d={'memberId':this[_0x1f870a(0x1f4)]['getCurrentUser']()[_0x1f870a(0x212)],'unitId':_0x4ed73d,'threadId':_0x4a0286,'solved':_0x253ac0[_0x1f870a(0x215)]?I['Solved']:I[_0x1f870a(0x1e0)]},_0x2db48f=await this[_0x1f870a(0x1ed)][_0x1f870a(0x21c)](_0x1f870a(0x210)+_0x4ed73d+_0x1f870a(0x201),{'body':_0x14d47d});return!_0x2db48f['body'][_0x1f870a(0x1d3)]||_0x2db48f[_0x1f870a(0x222)][_0x1f870a(0x1d3)][_0x1f870a(0x1d0)]===0x1;}async[_0x5d47f7(0x1f6)](_0x59f5c7,_0x69c44a,_0x1d96a0,_0x4d92dc){const _0xb5c3f6=_0x5d47f7,_0x49f40e={'memberId':(await this[_0xb5c3f6(0x20b)][_0xb5c3f6(0x1be)](_0x59f5c7))[_0xb5c3f6(0x1e1)](),'threadId':_0x1d96a0,'replyId':_0x4d92dc,'unitId':_0x59f5c7},_0x167d5e=await this['_httpService'][_0xb5c3f6(0x21c)](_0xb5c3f6(0x210)+_0x59f5c7+_0xb5c3f6(0x1fd),{'body':_0x49f40e});return!_0x167d5e[_0xb5c3f6(0x222)]['error']||_0x167d5e[_0xb5c3f6(0x222)][_0xb5c3f6(0x1d3)][_0xb5c3f6(0x1d0)]===0x1;}async[_0x5d47f7(0x1bf)](_0x43e237,_0x4df04e,_0xda9039){const _0x3615fc=_0x5d47f7,_0x3fcdda={'unitId':_0x43e237,'threadId':_0xda9039},_0x1245d0=await this[_0x3615fc(0x1ed)][_0x3615fc(0x21c)](_0x3615fc(0x210)+_0x43e237+_0x3615fc(0x217),{'body':_0x3fcdda}),_0x4ebe4f=_0xda9039[_0x3615fc(0x1eb)](_0x5aa8b4=>ee(_0x1245d0[_0x3615fc(0x222)][_0x3615fc(0x204)][_0x5aa8b4],_0x43e237,_0x4df04e))[_0x3615fc(0x1f0)](Boolean);return Object[_0x3615fc(0x1e9)](_0x1245d0[_0x3615fc(0x222)]['users'])[_0x3615fc(0x20a)](_0xd59a04=>{const _0x136ac4=_0x3615fc;this[_0x136ac4(0x1f4)]['addUser'](_0xd59a04);}),_0x4ebe4f;}[_0x5d47f7(0x1fa)](_0x140357){const _0x2f3ba3=_0x5d47f7;return{'id':_0x140357['id'],'threadId':_0x140357[_0x2f3ba3(0x1f2)],'ref':_0x140357[_0x2f3ba3(0x214)]};}};f=Q([_(0x0,_0x485985(_0x166e15)),_(0x1,_0x485985(_0x4ec60f)),_(0x2,_0x485985(_0xff52e3)),_(0x3,_0x485985(_0x17ace1))],f);var re=Object[_0x5d47f7(0x219)],te=(_0x350f38,_0x57aaa4,_0x1003f5,_0x442795)=>{for(var _0x44c311=_0x442795>0x1?void 0x0:_0x442795?re(_0x57aaa4,_0x1003f5):_0x57aaa4,_0x363e11=_0x350f38['length']-0x1,_0x41c654;_0x363e11>=0x0;_0x363e11--)(_0x41c654=_0x350f38[_0x363e11])&&(_0x44c311=_0x41c654(_0x44c311)||_0x44c311);return _0x44c311;},N=(_0x1e6260,_0x5d7b47)=>(_0x4caee4,_0x59fb72)=>_0x5d7b47(_0x4caee4,_0x59fb72,_0x1e6260);function _0x224b(_0x1bfbe0,_0x324bfb){const _0x4a975f=_0x4a97();return _0x224b=function(_0x224b7e,_0x1aa131){_0x224b7e=_0x224b7e-0x1bb;let _0x1c5243=_0x4a975f[_0x224b7e];return _0x1c5243;},_0x224b(_0x1bfbe0,_0x324bfb);}let g=class extends _0x3e4cea{constructor(_0x32c99c,_0xa2b5c3){const _0x2cb612=_0x5d47f7;super(),this['_threadCommentDataSourceService']=_0x32c99c,this[_0x2cb612(0x1d8)]=_0xa2b5c3,this['_initDataSource']();}['_initDataSource'](){const _0x301852=_0x5d47f7;this[_0x301852(0x21d)][_0x301852(0x1d5)]=this[_0x301852(0x1d8)],this[_0x301852(0x21d)][_0x301852(0x1f1)]=!0x1;}};g=te([N(0x0,_0x596221),N(0x1,_0x485985(f))],g);var se=Object[_0x5d47f7(0x1e5)],oe=Object[_0x5d47f7(0x219)],ne=(_0x667073,_0x4b235e,_0x3f9984)=>_0x4b235e in _0x667073?se(_0x667073,_0x4b235e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f9984}):_0x667073[_0x4b235e]=_0x3f9984,ie=(_0x3a53f7,_0x2f87f1,_0x1065a5,_0x4e2ab)=>{const _0x2cc0ff=_0x5d47f7;for(var _0xb72658=_0x4e2ab>0x1?void 0x0:_0x4e2ab?oe(_0x2f87f1,_0x1065a5):_0x2f87f1,_0x531771=_0x3a53f7[_0x2cc0ff(0x1cc)]-0x1,_0x549758;_0x531771>=0x0;_0x531771--)(_0x549758=_0x3a53f7[_0x531771])&&(_0xb72658=_0x549758(_0xb72658)||_0xb72658);return _0xb72658;},w=(_0x77fef1,_0x2e63b6)=>(_0x4a806f,_0x3e6a5b)=>_0x2e63b6(_0x4a806f,_0x3e6a5b,_0x77fef1),$=(_0x37545b,_0x33f974,_0x59e734)=>ne(_0x37545b,typeof _0x33f974!=_0x5d47f7(0x1db)?_0x33f974+'':_0x33f974,_0x59e734);let b=class extends _0x28570a{constructor(_0x924144=M,_0x3994e0,_0x366957){const _0x1c068d=_0x5d47f7;super(),this[_0x1c068d(0x1c5)]=_0x924144,this[_0x1c068d(0x1cd)]=_0x3994e0,this['_configService']=_0x366957;const {..._0x4d7eef}=_0x43a2d8({},M,this[_0x1c068d(0x1c5)]);this[_0x1c068d(0x1cf)][_0x1c068d(0x1bd)](z,_0x4d7eef);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x116fd0=>{const _0x37d78d=_0x224b;this[_0x37d78d(0x1cd)][_0x37d78d(0x1bb)](_0x116fd0);});}['onReady'](){const _0x4ba9b8=_0x5d47f7;this[_0x4ba9b8(0x1cd)]['get'](g),this[_0x4ba9b8(0x1cd)][_0x4ba9b8(0x206)](S);}};$(b,_0x5d47f7(0x203),W),$(b,_0x5d47f7(0x209),_0x5d649f[_0x5d47f7(0x1e2)]),b=ie([_0x5d59fb(_0x22014a,_0x31a28b,_0x104cb6),w(0x1,_0x485985(_0x17ace1)),w(0x2,_0x253407)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x343d3b=_0x35d7;(function(_0x76a15e,_0x254761){const _0x3240bf=_0x35d7,_0x11b755=_0x76a15e();while(!![]){try{const _0x4020d8=parseInt(_0x3240bf(0xe0))/0x1+parseInt(_0x3240bf(0xc7))/0x2+-parseInt(_0x3240bf(0xc8))/0x3*(parseInt(_0x3240bf(0x9d))/0x4)+parseInt(_0x3240bf(0xbc))/0x5*(-parseInt(_0x3240bf(0x99))/0x6)+-parseInt(_0x3240bf(0xd5))/0x7+-parseInt(_0x3240bf(0xc6))/0x8+-parseInt(_0x3240bf(0xb0))/0x9*(-parseInt(_0x3240bf(0xc0))/0xa);if(_0x4020d8===_0x254761)break;else _0x11b755['push'](_0x11b755['shift']());}catch(_0x1c3ccb){_0x11b755['push'](_0x11b755['shift']());}}}(_0x1f9d,0xe882f));import{CommentService as _0x57595d,CollaborationSessionService as _0x31684a,UniverCollaborationClientPlugin as _0x243f13}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1d641e}from'@univerjs-pro/license';import{dayjs as _0x151ca6,UserManagerService as _0x2f7a4c,Inject as _0x29eff0,Injector as _0x2ee435,Disposable as _0x352537,CustomRangeType as _0x3475a6,UniverInstanceType as _0x339152,DependentOn as _0x3193ef,IConfigService as _0x474f47,Plugin as _0x196779,merge as _0x5d762b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a94fd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3d4432,IThreadCommentDataSourceService as _0x56f2fd}from'@univerjs/thread-comment';import{bufferTime as _0xf9217f}from'rxjs';import{HTTPService as _0x2f4d34}from'@univerjs/network';function _0x35d7(_0x4b1c17,_0x224fd7){const _0x1f9d07=_0x1f9d();return _0x35d7=function(_0x35d74d,_0x5a40ab){_0x35d74d=_0x35d74d-0x7f;let _0x2f36cb=_0x1f9d07[_0x35d74d];return _0x2f36cb;},_0x35d7(_0x4b1c17,_0x224fd7);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2019af=>(_0x2019af[_0x2019af[_0x343d3b(0x9e)]=0x0]=_0x343d3b(0x9e),_0x2019af[_0x2019af[_0x343d3b(0x90)]=0x1]=_0x343d3b(0x90),_0x2019af[_0x2019af['UNRECOGNIZED']=-0x1]=_0x343d3b(0xd4),_0x2019af))(I||{}),v=(_0x944ada=>(_0x944ada[_0x944ada[_0x343d3b(0x88)]=0x0]=_0x343d3b(0x88),_0x944ada[_0x944ada[_0x343d3b(0xdc)]=0x1]=_0x343d3b(0xdc),_0x944ada[_0x944ada[_0x343d3b(0xde)]=0x2]=_0x343d3b(0xde),_0x944ada[_0x944ada[_0x343d3b(0xd6)]=0x3]=_0x343d3b(0xd6),_0x944ada[_0x944ada[_0x343d3b(0xd3)]=0x4]=_0x343d3b(0xd3),_0x944ada[_0x944ada[_0x343d3b(0xaf)]=0x5]=_0x343d3b(0xaf),_0x944ada[_0x944ada[_0x343d3b(0xd4)]=-0x1]='UNRECOGNIZED',_0x944ada))(v||{});const D=_0xb7b8d8=>_0x151ca6(new Date(+_0xb7b8d8))[_0x343d3b(0xc3)](_0x343d3b(0xd0)),B=async(_0x252bf2,_0x13df45)=>{const _0x9a243=_0x343d3b,_0x1bbf0c=_0x252bf2[_0x9a243(0xe2)](_0x2f7a4c),_0x29be1e=_0x252bf2[_0x9a243(0xe2)](_0x2f4d34);_0x13df45['forEach'](_0x381226=>{const _0x4eaae5=_0x9a243;_0x1bbf0c[_0x4eaae5(0xb9)](_0x381226)&&_0x13df45['delete'](_0x381226);}),_0x13df45['size']&&(await _0x29be1e[_0x9a243(0xe2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13df45]}}))[_0x9a243(0xdb)][_0x9a243(0xe1)][_0x9a243(0xa0)](_0x469164=>{const _0x50ffb3=_0x9a243;_0x469164&&_0x1bbf0c[_0x50ffb3(0x8a)](_0x469164);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xca1f6d,_0x315303,_0x2ab52a,_0x53e1d2)=>{const _0x32847e=_0x343d3b;for(var _0x38adde=_0x53e1d2>0x1?void 0x0:_0x53e1d2?K(_0x315303,_0x2ab52a):_0x315303,_0x144a2b=_0xca1f6d[_0x32847e(0xa4)]-0x1,_0x768f1c;_0x144a2b>=0x0;_0x144a2b--)(_0x768f1c=_0xca1f6d[_0x144a2b])&&(_0x38adde=_0x768f1c(_0x38adde)||_0x38adde);return _0x38adde;},p=(_0xff8d94,_0x27f6a7)=>(_0x594333,_0x9da80f)=>_0x27f6a7(_0x594333,_0x9da80f,_0xff8d94);let S=class extends _0x352537{constructor(_0x564ad0,_0x240f9f,_0x47ef36,_0x4f5d82){const _0x277f0d=_0x343d3b;super(),this[_0x277f0d(0xd2)]=_0x564ad0,this[_0x277f0d(0xb4)]=_0x240f9f,this[_0x277f0d(0xda)]=_0x47ef36,this[_0x277f0d(0x85)]=_0x4f5d82,this[_0x277f0d(0x8e)](),this[_0x277f0d(0xbb)]();}['_initUserSync'](){const _0x5c8f31=_0x343d3b;this['disposeWithMe'](this['_threadCommentModel'][_0x5c8f31(0x87)][_0x5c8f31(0x9a)](_0xf9217f(0x10))[_0x5c8f31(0x81)](_0x2a0497=>{const _0x547b06=_0x5c8f31,_0x3a2dca=new Set();_0x2a0497['forEach'](_0x4d7125=>{const _0x38dd8b=_0x35d7;switch(_0x4d7125['type']){case _0x38dd8b(0x7f):{const _0x29b44c=_0x4d7125[_0x38dd8b(0x8d)][_0x38dd8b(0xd9)];_0x3a2dca[_0x38dd8b(0x7f)](_0x29b44c);break;}}}),B(this[_0x547b06(0x85)],_0x3a2dca);}));}[_0x343d3b(0x8e)](){const _0xd63668=_0x343d3b;this[_0xd63668(0xcd)](this[_0xd63668(0xd2)][_0xd63668(0x87)][_0xd63668(0x81)](async _0x5aaa3f=>{const _0xa40094=_0xd63668;var _0x13aec8,_0x4e23ec,_0xa40b53,_0x17ee2b;const _0x1693e5=(_0x13aec8=this[_0xa40094(0xb4)][_0xa40094(0x98)](_0x5aaa3f['unitId'])[_0xa40094(0x92)](_0x4c6416=>_0x4c6416['threadId']===_0x5aaa3f[_0xa40094(0x8f)]))==null?void 0x0:_0x13aec8[_0xa40094(0xb3)];if(!_0x1693e5)return;const {unitId:_0x307ac4,subUnitId:_0x156314}=_0x1693e5;switch(_0x5aaa3f[_0xa40094(0xa5)]&&this[_0xa40094(0xda)][_0xa40094(0x8a)](_0x5aaa3f['user']),_0x5aaa3f[_0xa40094(0xb1)]){case v[_0xa40094(0xdc)]:break;case v[_0xa40094(0xde)]:{this[_0xa40094(0xb4)][_0xa40094(0x96)](_0x307ac4,_0x156314,{'unitId':_0x307ac4,'subUnitId':_0x156314,'ref':'','id':_0x5aaa3f[_0xa40094(0xae)],'dT':D(+_0x5aaa3f[_0xa40094(0xb6)]),'threadId':_0x5aaa3f[_0xa40094(0x8f)],'personId':(_0xa40b53=(_0x4e23ec=_0x5aaa3f['user'])==null?void 0x0:_0x4e23ec[_0xa40094(0xa6)])!=null?_0xa40b53:_0x5aaa3f[_0xa40094(0x9b)],'text':JSON[_0xa40094(0xdf)](_0x5aaa3f[_0xa40094(0x95)]),'parentId':_0x1693e5['id']});break;}case v['Delete']:{const _0x474f66=this[_0xa40094(0xb4)][_0xa40094(0xbd)](_0x307ac4,_0x156314,_0x5aaa3f['replyId']);_0x474f66&&_0x474f66[_0xa40094(0x86)]&&this[_0xa40094(0xb4)][_0xa40094(0x94)](_0x307ac4,_0x156314,_0x5aaa3f[_0xa40094(0xae)]);break;}case v[_0xa40094(0xd6)]:{this[_0xa40094(0xb4)][_0xa40094(0xb2)](_0x307ac4,_0x156314,{'commentId':_0x5aaa3f['replyId'],'text':JSON[_0xa40094(0xdf)](_0x5aaa3f[_0xa40094(0x95)])});break;}case v[_0xa40094(0xaf)]:{const _0x123e29=(_0x17ee2b=this['_threadCommentModel'][_0xa40094(0x98)](_0x5aaa3f['unitId'])[_0xa40094(0x92)](_0x4b0491=>_0x4b0491[_0xa40094(0x8f)]===_0x5aaa3f[_0xa40094(0x8f)]))==null?void 0x0:_0x17ee2b['root'];_0x123e29&&this[_0xa40094(0xb4)]['resolveComment'](_0x307ac4,_0x156314,_0x123e29['id'],_0x5aaa3f[_0xa40094(0xb8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x29eff0(_0x57595d)),p(0x1,_0x29eff0(_0x3d4432)),p(0x2,_0x29eff0(_0x2f7a4c)),p(0x3,_0x29eff0(_0x2ee435))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x343d3b(0xa9)],Q=(_0xa46bfd,_0x9eaf59,_0x427a28,_0x3a3502)=>{const _0x440ae3=_0x343d3b;for(var _0x41704b=_0x3a3502>0x1?void 0x0:_0x3a3502?k(_0x9eaf59,_0x427a28):_0x9eaf59,_0x3bd227=_0xa46bfd[_0x440ae3(0xa4)]-0x1,_0x1f0cb7;_0x3bd227>=0x0;_0x3bd227--)(_0x1f0cb7=_0xa46bfd[_0x3bd227])&&(_0x41704b=_0x1f0cb7(_0x41704b)||_0x41704b);return _0x41704b;},_=(_0x3a442c,_0x1aac8b)=>(_0x4f039d,_0x4ab7f0)=>_0x1aac8b(_0x4f039d,_0x4ab7f0,_0x3a442c);function X(_0xdd6ec8,_0x2df818){const _0x491b86=_0x343d3b,_0x4e303f=_0xdd6ec8[_0x491b86(0x8c)][0x0];return{..._0x2df818,'id':_0x4e303f['replyId'],'resolved':_0xdd6ec8[_0x491b86(0xb8)]===0x1,'dT':D(_0x4e303f[_0x491b86(0xb6)]),'personId':_0x4e303f[_0x491b86(0x9b)],'threadId':_0x4e303f[_0x491b86(0x8f)]};}function ee(_0x58b511,_0x37aefa,_0x347428){const _0x49cc2c=_0x343d3b;var _0x435e32,_0x4c6d48;if(((_0x4c6d48=(_0x435e32=_0x58b511==null?void 0x0:_0x58b511['replies'])==null?void 0x0:_0x435e32[_0x49cc2c(0xa4)])!=null?_0x4c6d48:0x0)>0x0){const _0x3f579b=(_0x566558,_0x13a3a9)=>({'id':_0x566558[_0x49cc2c(0xae)],'threadId':_0x566558[_0x49cc2c(0x8f)],'dT':D(_0x566558[_0x49cc2c(0xb6)]),'personId':_0x566558['userId'],'resolved':_0x58b511['solved']===I[_0x49cc2c(0x90)],'unitId':_0x37aefa,'subUnitId':_0x347428,'text':JSON[_0x49cc2c(0xdf)](_0x566558[_0x49cc2c(0x95)]),'parentId':_0x13a3a9}),_0x4238bc=_0x3f579b(_0x58b511[_0x49cc2c(0x8c)][0x0]);return{..._0x4238bc,'children':_0x58b511[_0x49cc2c(0x8c)][_0x49cc2c(0xca)](0x1)[_0x49cc2c(0x9f)](_0x2e56bc=>_0x3f579b(_0x2e56bc,_0x4238bc['id']))};}return null;}let f=class{constructor(_0x4ff47c,_0x44c385,_0x57039a,_0x529b62){const _0x3cade9=_0x343d3b;this[_0x3cade9(0xab)]=_0x4ff47c,this[_0x3cade9(0xda)]=_0x44c385,this[_0x3cade9(0xc2)]=_0x57039a,this['_injector']=_0x529b62;}async[_0x343d3b(0x96)](_0x35a88a){const _0x3bfeaf=_0x343d3b;var _0x44ce2f,_0x475d66;const {parentId:_0x39204e,unitId:_0x51760b,text:_0x2d0543,threadId:_0x565dee}=_0x35a88a,_0x5c2ea8=(_0x475d66=(_0x44ce2f=_0x2d0543[_0x3bfeaf(0xdd)])==null?void 0x0:_0x44ce2f[_0x3bfeaf(0xbe)](_0x1632b8=>_0x1632b8[_0x3bfeaf(0xcb)]===_0x3475a6['COMMENT'])['map'](_0x26af86=>_0x26af86[_0x3bfeaf(0xc5)]))!=null?_0x475d66:[],_0x409722=JSON[_0x3bfeaf(0xd8)](_0x2d0543),_0x40f2f4=(await this[_0x3bfeaf(0xc2)][_0x3bfeaf(0xb5)](_0x51760b))[_0x3bfeaf(0xbf)]();if(_0x39204e){const _0x427da8={'memberId':_0x40f2f4,'unitId':_0x51760b,'content':_0x409722,'mention':_0x5c2ea8,'threadId':_0x565dee},_0x46de27=(await this['_httpService'][_0x3bfeaf(0xa8)](_0x3bfeaf(0xd7)+_0x51760b+_0x3bfeaf(0xd1),{'body':_0x427da8}))[_0x3bfeaf(0xdb)]['reply'];return{..._0x35a88a,'id':_0x46de27[_0x3bfeaf(0xae)],'dT':_0x151ca6(+_0x46de27[_0x3bfeaf(0xb6)])[_0x3bfeaf(0xc3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x46de27[_0x3bfeaf(0x9b)]};}else{const _0x4ddc4c={'memberId':_0x40f2f4,'unitId':_0x51760b,'content':_0x409722,'mention':_0x5c2ea8},_0x328398=await this['_httpService'][_0x3bfeaf(0xa8)](_0x3bfeaf(0xd7)+_0x51760b+_0x3bfeaf(0x82),{'body':_0x4ddc4c});return X(_0x328398[_0x3bfeaf(0xdb)][_0x3bfeaf(0x80)],_0x35a88a);}}async['updateComment'](_0x4a6cda){const _0x5f1033=_0x343d3b;var _0x1e8af6,_0xc6eb30;const {text:_0x13c77e,unitId:_0x2c77de}=_0x4a6cda,_0x1b52cc=(_0xc6eb30=(_0x1e8af6=_0x13c77e[_0x5f1033(0xdd)])==null?void 0x0:_0x1e8af6[_0x5f1033(0xbe)](_0x1102c8=>_0x1102c8[_0x5f1033(0xcb)]===_0x3475a6[_0x5f1033(0xba)])[_0x5f1033(0x9f)](_0x25dd9f=>_0x25dd9f[_0x5f1033(0xc5)]))!=null?_0xc6eb30:[],_0x1849dd=JSON[_0x5f1033(0xd8)](_0x13c77e),_0xc29c10=_0x4a6cda[_0x5f1033(0x8f)],_0x2e915a=_0x4a6cda['id'],_0x1ab8f3={'memberId':(await this[_0x5f1033(0xc2)]['requireSession'](_0x2c77de))[_0x5f1033(0xbf)](),'unitId':_0x2c77de,'threadId':_0xc29c10,'mention':_0x1b52cc,'content':_0x1849dd,'replyId':_0x2e915a},_0x15a843=await this[_0x5f1033(0xab)][_0x5f1033(0xa8)](_0x5f1033(0xd7)+_0x2c77de+_0x5f1033(0x8b),{'body':_0x1ab8f3});return!_0x15a843['body']['error']||_0x15a843[_0x5f1033(0xdb)]['error']['code']===0x1;}async[_0x343d3b(0x83)](_0x40c85b){const _0x1c4c43=_0x343d3b,{unitId:_0x5b83b9}=_0x40c85b,_0x180c47=_0x40c85b[_0x1c4c43(0x8f)],_0x5714e5={'memberId':this[_0x1c4c43(0xda)][_0x1c4c43(0x93)]()[_0x1c4c43(0xa6)],'unitId':_0x5b83b9,'threadId':_0x180c47,'solved':_0x40c85b[_0x1c4c43(0xc1)]?I[_0x1c4c43(0x90)]:I['OpenOrReOpen']},_0x37e3b8=await this[_0x1c4c43(0xab)][_0x1c4c43(0xa8)](_0x1c4c43(0xd7)+_0x5b83b9+_0x1c4c43(0xc4),{'body':_0x5714e5});return!_0x37e3b8[_0x1c4c43(0xdb)][_0x1c4c43(0xce)]||_0x37e3b8[_0x1c4c43(0xdb)][_0x1c4c43(0xce)][_0x1c4c43(0xaa)]===0x1;}async[_0x343d3b(0x94)](_0x14c358,_0x2c7748,_0x193bc8,_0x366f9a){const _0x8379ad=_0x343d3b,_0x315e3e={'memberId':(await this[_0x8379ad(0xc2)][_0x8379ad(0xb5)](_0x14c358))[_0x8379ad(0xbf)](),'threadId':_0x193bc8,'replyId':_0x366f9a,'unitId':_0x14c358},_0x4fc850=await this[_0x8379ad(0xab)][_0x8379ad(0xa8)](_0x8379ad(0xd7)+_0x14c358+_0x8379ad(0xad),{'body':_0x315e3e});return!_0x4fc850[_0x8379ad(0xdb)][_0x8379ad(0xce)]||_0x4fc850[_0x8379ad(0xdb)][_0x8379ad(0xce)][_0x8379ad(0xaa)]===0x1;}async[_0x343d3b(0xa1)](_0x2d6dd7,_0x1cedda,_0x40c74e){const _0x52e780=_0x343d3b,_0x5dfa53={'unitId':_0x2d6dd7,'threadId':_0x40c74e},_0x2ef6cd=await this['_httpService'][_0x52e780(0xa8)]('/universer-api/comment/unit/'+_0x2d6dd7+_0x52e780(0x91),{'body':_0x5dfa53}),_0x1459ef=_0x40c74e['map'](_0x55cdb0=>ee(_0x2ef6cd[_0x52e780(0xdb)][_0x52e780(0x97)][_0x55cdb0],_0x2d6dd7,_0x1cedda))[_0x52e780(0xbe)](Boolean);return Object['values'](_0x2ef6cd[_0x52e780(0xdb)][_0x52e780(0xe1)])[_0x52e780(0xa0)](_0x502a85=>{const _0x46df4b=_0x52e780;this[_0x46df4b(0xda)]['addUser'](_0x502a85);}),_0x1459ef;}[_0x343d3b(0x9c)](_0x1d657a){const _0x49ca9a=_0x343d3b;return{'id':_0x1d657a['id'],'threadId':_0x1d657a['threadId'],'ref':_0x1d657a[_0x49ca9a(0xb7)]};}};f=Q([_(0x0,_0x29eff0(_0x2f4d34)),_(0x1,_0x29eff0(_0x2f7a4c)),_(0x2,_0x29eff0(_0x31684a)),_(0x3,_0x29eff0(_0x2ee435))],f);var re=Object[_0x343d3b(0xa9)],te=(_0xee947c,_0x41df93,_0x571f3c,_0x862cb9)=>{const _0x191fca=_0x343d3b;for(var _0x2d4a3c=_0x862cb9>0x1?void 0x0:_0x862cb9?re(_0x41df93,_0x571f3c):_0x41df93,_0x2d33f6=_0xee947c[_0x191fca(0xa4)]-0x1,_0x20b79f;_0x2d33f6>=0x0;_0x2d33f6--)(_0x20b79f=_0xee947c[_0x2d33f6])&&(_0x2d4a3c=_0x20b79f(_0x2d4a3c)||_0x2d4a3c);return _0x2d4a3c;},N=(_0x5cd018,_0x54d3d2)=>(_0x2913e9,_0x1be43f)=>_0x54d3d2(_0x2913e9,_0x1be43f,_0x5cd018);let g=class extends _0x352537{constructor(_0x528678,_0x27d2e7){const _0x2c9394=_0x343d3b;super(),this[_0x2c9394(0x89)]=_0x528678,this[_0x2c9394(0xcc)]=_0x27d2e7,this[_0x2c9394(0xa3)]();}['_initDataSource'](){const _0x272d8d=_0x343d3b;this['_threadCommentDataSourceService'][_0x272d8d(0xc9)]=this[_0x272d8d(0xcc)],this[_0x272d8d(0x89)][_0x272d8d(0xac)]=!0x1;}};g=te([N(0x0,_0x56f2fd),N(0x1,_0x29eff0(f))],g);function _0x1f9d(){const _0x5a2236=['1066522ryZArz','users','get','add','comment','subscribe','/add','resolveComment','onReady','_injector','parentId','commentUpdate$','Unknown','_threadCommentDataSourceService','addUser','/edit','replies','payload','_init','threadId','Solved','/list','find','getCurrentUser','deleteComment','content','addComment','comments','getUnit','10074WVlvXr','pipe','userId','saveCommentToSnapshot','20MnsOqV','OpenOrReOpen','map','forEach','listComments','pluginName','_initDataSource','length','user','userID','_configService','post','getOwnPropertyDescriptor','code','_httpService','syncUpdateMutationToColla','/delete','replyId','Solve','963lWoBMo','type','updateComment','root','_threadCommentModel','requireSession','createTimestamp','ref','solved','getUser','COMMENT','_initUserSync','4085wXLbEz','getComment','filter','getMemberID','307180AIvfuz','resolved','_sessionService','format','/solved','rangeId','9354264gzAmVj','3077608GETkKk','661848JAYqvf','dataSource','slice','rangeType','_threadCommentDataSource','disposeWithMe','error','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','/reply','_commentService','Delete','UNRECOGNIZED','9069753pdOkvb','Edit','/universer-api/comment/unit/','stringify','personId','_userService','body','Add','customRanges','Reply','parse'];_0x1f9d=function(){return _0x5a2236;};return _0x1f9d();}var se=Object['defineProperty'],oe=Object[_0x343d3b(0xa9)],ne=(_0x5f1bef,_0x27b098,_0x270609)=>_0x27b098 in _0x5f1bef?se(_0x5f1bef,_0x27b098,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x270609}):_0x5f1bef[_0x27b098]=_0x270609,ie=(_0x5af9e9,_0x22f23b,_0x19c3b5,_0x113048)=>{const _0x5e8e03=_0x343d3b;for(var _0xcd1b93=_0x113048>0x1?void 0x0:_0x113048?oe(_0x22f23b,_0x19c3b5):_0x22f23b,_0x15d678=_0x5af9e9[_0x5e8e03(0xa4)]-0x1,_0x1df7ec;_0x15d678>=0x0;_0x15d678--)(_0x1df7ec=_0x5af9e9[_0x15d678])&&(_0xcd1b93=_0x1df7ec(_0xcd1b93)||_0xcd1b93);return _0xcd1b93;},w=(_0x21228c,_0x3c33e3)=>(_0x176712,_0x4e76d2)=>_0x3c33e3(_0x176712,_0x4e76d2,_0x21228c),$=(_0x3c5058,_0x24d389,_0x353be8)=>ne(_0x3c5058,typeof _0x24d389!='symbol'?_0x24d389+'':_0x24d389,_0x353be8);let b=class extends _0x196779{constructor(_0xe154a4=M,_0x3adb0d,_0x309527){const _0x3df05e=_0x343d3b;super(),this['_config']=_0xe154a4,this[_0x3df05e(0x85)]=_0x3adb0d,this[_0x3df05e(0xa7)]=_0x309527;const {..._0x269d09}=_0x5d762b({},M,this['_config']);this[_0x3df05e(0xa7)]['setConfig'](z,_0x269d09);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x25fecf=>{const _0x1025db=_0x35d7;this['_injector'][_0x1025db(0x7f)](_0x25fecf);});}[_0x343d3b(0x84)](){const _0x384695=_0x343d3b;this[_0x384695(0x85)][_0x384695(0xe2)](g),this[_0x384695(0x85)][_0x384695(0xe2)](S);}};$(b,_0x343d3b(0xa2),W),$(b,_0x343d3b(0xb1),_0x339152[_0x343d3b(0xcf)]),b=ie([_0x3193ef(_0x3a94fd,_0x243f13,_0x1d641e),w(0x1,_0x29eff0(_0x2ee435)),w(0x2,_0x474f47)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5d47f7=_0x224b;(function(_0x34b563,_0x5d1c36){const _0x2a423f=_0x224b,_0x4ce73e=_0x34b563();while(!![]){try{const _0x130ba2=-parseInt(_0x2a423f(0x1c8))/0x1+-parseInt(_0x2a423f(0x1c7))/0x2+parseInt(_0x2a423f(0x1fc))/0x3+parseInt(_0x2a423f(0x221))/0x4*(-parseInt(_0x2a423f(0x1d6))/0x5)+parseInt(_0x2a423f(0x1f9))/0x6+-parseInt(_0x2a423f(0x200))/0x7*(-parseInt(_0x2a423f(0x1fe))/0x8)+parseInt(_0x2a423f(0x1e4))/0x9*(parseInt(_0x2a423f(0x1c0))/0xa);if(_0x130ba2===_0x5d1c36)break;else _0x4ce73e['push'](_0x4ce73e['shift']());}catch(_0x2d12d8){_0x4ce73e['push'](_0x4ce73e['shift']());}}}(_0x4a97,0x63c31));import{CommentService as _0x5b5cb2,CollaborationSessionService as _0xff52e3,UniverCollaborationClientPlugin as _0x31a28b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x104cb6}from'@univerjs-pro/license';import{dayjs as _0x4892bc,UserManagerService as _0x4ec60f,Inject as _0x485985,Injector as _0x17ace1,Disposable as _0x3e4cea,CustomRangeType as _0x5108c3,UniverInstanceType as _0x5d649f,DependentOn as _0x5d59fb,IConfigService as _0x253407,Plugin as _0x28570a,merge as _0x43a2d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22014a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x508dd5,IThreadCommentDataSourceService as _0x596221}from'@univerjs/thread-comment';import{bufferTime as _0x38892e}from'rxjs';import{HTTPService as _0x166e15}from'@univerjs/network';const W=_0x5d47f7(0x205);var I=(_0x2ad048=>(_0x2ad048[_0x2ad048[_0x5d47f7(0x1e0)]=0x0]=_0x5d47f7(0x1e0),_0x2ad048[_0x2ad048['Solved']=0x1]=_0x5d47f7(0x1f5),_0x2ad048[_0x2ad048[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x2ad048))(I||{}),v=(_0x5893ba=>(_0x5893ba[_0x5893ba['Unknown']=0x0]=_0x5d47f7(0x21e),_0x5893ba[_0x5893ba[_0x5d47f7(0x216)]=0x1]=_0x5d47f7(0x216),_0x5893ba[_0x5893ba[_0x5d47f7(0x20d)]=0x2]=_0x5d47f7(0x20d),_0x5893ba[_0x5893ba[_0x5d47f7(0x1c1)]=0x3]='Edit',_0x5893ba[_0x5893ba[_0x5d47f7(0x1bc)]=0x4]=_0x5d47f7(0x1bc),_0x5893ba[_0x5893ba['Solve']=0x5]=_0x5d47f7(0x1e8),_0x5893ba[_0x5893ba[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x5893ba))(v||{});const D=_0xff3b01=>_0x4892bc(new Date(+_0xff3b01))[_0x5d47f7(0x1e6)](_0x5d47f7(0x1dd)),B=async(_0x18f1c4,_0x31ff46)=>{const _0x196e9e=_0x5d47f7,_0x3b0438=_0x18f1c4[_0x196e9e(0x206)](_0x4ec60f),_0x4256a7=_0x18f1c4[_0x196e9e(0x206)](_0x166e15);_0x31ff46[_0x196e9e(0x20a)](_0x2a8250=>{const _0xd01244=_0x196e9e;_0x3b0438[_0xd01244(0x1ef)](_0x2a8250)&&_0x31ff46['delete'](_0x2a8250);}),_0x31ff46[_0x196e9e(0x1ee)]&&(await _0x4256a7[_0x196e9e(0x206)](_0x196e9e(0x1f3),{'params':{'userIDs':[..._0x31ff46]}}))['body'][_0x196e9e(0x1de)]['forEach'](_0x3142f3=>{const _0x409850=_0x196e9e;_0x3142f3&&_0x3b0438[_0x409850(0x1d4)](_0x3142f3);});};var K=Object[_0x5d47f7(0x219)],V=(_0xe8b149,_0x27a239,_0x13da1c,_0x317ce8)=>{const _0x478706=_0x5d47f7;for(var _0x32e9db=_0x317ce8>0x1?void 0x0:_0x317ce8?K(_0x27a239,_0x13da1c):_0x27a239,_0x294f8c=_0xe8b149[_0x478706(0x1cc)]-0x1,_0x7c295b;_0x294f8c>=0x0;_0x294f8c--)(_0x7c295b=_0xe8b149[_0x294f8c])&&(_0x32e9db=_0x7c295b(_0x32e9db)||_0x32e9db);return _0x32e9db;},p=(_0x3e0ac1,_0x517b08)=>(_0x4e2493,_0x4c3d0a)=>_0x517b08(_0x4e2493,_0x4c3d0a,_0x3e0ac1);let S=class extends _0x3e4cea{constructor(_0x18558d,_0x46a022,_0x7ffe0f,_0x241782){const _0x2ad117=_0x5d47f7;super(),this[_0x2ad117(0x20e)]=_0x18558d,this[_0x2ad117(0x1c3)]=_0x46a022,this[_0x2ad117(0x1f4)]=_0x7ffe0f,this['_injector']=_0x241782,this[_0x2ad117(0x1f8)](),this[_0x2ad117(0x1e3)]();}[_0x5d47f7(0x1e3)](){const _0x389ee9=_0x5d47f7;this[_0x389ee9(0x21b)](this[_0x389ee9(0x1c3)][_0x389ee9(0x1dc)][_0x389ee9(0x211)](_0x38892e(0x10))[_0x389ee9(0x1cb)](_0x28e391=>{const _0x45d5e0=_0x389ee9,_0x588aa5=new Set();_0x28e391['forEach'](_0x2b74e8=>{const _0x2160b3=_0x224b;switch(_0x2b74e8['type']){case _0x2160b3(0x1bb):{const _0x9db2fb=_0x2b74e8[_0x2160b3(0x1ce)][_0x2160b3(0x213)];_0x588aa5[_0x2160b3(0x1bb)](_0x9db2fb);break;}}}),B(this[_0x45d5e0(0x1cd)],_0x588aa5);}));}[_0x5d47f7(0x1f8)](){const _0x43610f=_0x5d47f7;this[_0x43610f(0x21b)](this['_commentService']['commentUpdate$'][_0x43610f(0x1cb)](async _0xd954c1=>{const _0xea04b6=_0x43610f;var _0x2f3c75,_0x11a35b,_0x43385b,_0x3b40c3;const _0x4c3d57=(_0x2f3c75=this['_threadCommentModel']['getUnit'](_0xd954c1[_0xea04b6(0x1c2)])['find'](_0x13cd3d=>_0x13cd3d[_0xea04b6(0x1f2)]===_0xd954c1['threadId']))==null?void 0x0:_0x2f3c75[_0xea04b6(0x1c6)];if(!_0x4c3d57)return;const {unitId:_0x4d4990,subUnitId:_0x31a111}=_0x4c3d57;switch(_0xd954c1[_0xea04b6(0x1fb)]&&this['_userService'][_0xea04b6(0x1d4)](_0xd954c1['user']),_0xd954c1['type']){case v[_0xea04b6(0x216)]:break;case v[_0xea04b6(0x20d)]:{this[_0xea04b6(0x1c3)][_0xea04b6(0x1d2)](_0x4d4990,_0x31a111,{'unitId':_0x4d4990,'subUnitId':_0x31a111,'ref':'','id':_0xd954c1[_0xea04b6(0x1da)],'dT':D(+_0xd954c1[_0xea04b6(0x1ec)]),'threadId':_0xd954c1[_0xea04b6(0x1f2)],'personId':(_0x43385b=(_0x11a35b=_0xd954c1[_0xea04b6(0x1fb)])==null?void 0x0:_0x11a35b[_0xea04b6(0x212)])!=null?_0x43385b:_0xd954c1['userId'],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content']),'parentId':_0x4c3d57['id']});break;}case v[_0xea04b6(0x1bc)]:{const _0x25a717=this[_0xea04b6(0x1c3)][_0xea04b6(0x1c9)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);_0x25a717&&_0x25a717[_0xea04b6(0x21f)]&&this[_0xea04b6(0x1c3)][_0xea04b6(0x1f6)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);break;}case v[_0xea04b6(0x1c1)]:{this[_0xea04b6(0x1c3)]['updateComment'](_0x4d4990,_0x31a111,{'commentId':_0xd954c1[_0xea04b6(0x1da)],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content'])});break;}case v[_0xea04b6(0x1e8)]:{const _0xc9187=(_0x3b40c3=this[_0xea04b6(0x1c3)][_0xea04b6(0x1ea)](_0xd954c1['unitId'])[_0xea04b6(0x207)](_0x2f12ec=>_0x2f12ec[_0xea04b6(0x1f2)]===_0xd954c1[_0xea04b6(0x1f2)]))==null?void 0x0:_0x3b40c3[_0xea04b6(0x1c6)];_0xc9187&&this[_0xea04b6(0x1c3)][_0xea04b6(0x202)](_0x4d4990,_0x31a111,_0xc9187['id'],_0xd954c1['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x485985(_0x5b5cb2)),p(0x1,_0x485985(_0x508dd5)),p(0x2,_0x485985(_0x4ec60f)),p(0x3,_0x485985(_0x17ace1))],S);const z=_0x5d47f7(0x1ca),M={};var k=Object[_0x5d47f7(0x219)],Q=(_0x2fa068,_0x31385a,_0x47307f,_0x1cb765)=>{const _0x168d28=_0x5d47f7;for(var _0x49129c=_0x1cb765>0x1?void 0x0:_0x1cb765?k(_0x31385a,_0x47307f):_0x31385a,_0x1127c9=_0x2fa068[_0x168d28(0x1cc)]-0x1,_0x364bf5;_0x1127c9>=0x0;_0x1127c9--)(_0x364bf5=_0x2fa068[_0x1127c9])&&(_0x49129c=_0x364bf5(_0x49129c)||_0x49129c);return _0x49129c;},_=(_0x202aea,_0x19ed85)=>(_0x58949b,_0x580c04)=>_0x19ed85(_0x58949b,_0x580c04,_0x202aea);function _0x4a97(){const _0x23bda0=['setConfig','requireSession','listComments','70yCuEHH','Edit','unitId','_threadCommentModel','rangeId','_config','root','1489384LJXPSo','743096EoCseq','getComment','thread-comment-data-source.config','subscribe','length','_injector','payload','_configService','code','COMMENT','addComment','error','addUser','dataSource','8815uzAPHn','UNRECOGNIZED','_threadCommentDataSource','parse','replyId','symbol','commentUpdate$','YYYY/MM/DD\x20HH:mm','users','solved','OpenOrReOpen','getMemberID','UNIVER_UNKNOWN','_initUserSync','1422585MeTzuE','defineProperty','format','userId','Solve','values','getUnit','map','createTimestamp','_httpService','size','getUser','filter','syncUpdateMutationToColla','threadId','/universer-api/user/list','_userService','Solved','deleteComment','rangeType','_init','2356656YijQem','saveCommentToSnapshot','user','1963389OFDTFN','/delete','16rVwNjf','content','808745NVGwig','/solved','resolveComment','pluginName','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','find','/edit','type','forEach','_sessionService','customRanges','Reply','_commentService','/reply','/universer-api/comment/unit/','pipe','userID','personId','ref','resolved','Add','/list','stringify','getOwnPropertyDescriptor','replies','disposeWithMe','post','_threadCommentDataSourceService','Unknown','parentId','/add','1108oisWBF','body','add','Delete'];_0x4a97=function(){return _0x23bda0;};return _0x4a97();}function X(_0x2853ff,_0x4efc93){const _0x39877e=_0x5d47f7,_0x1ad1dd=_0x2853ff[_0x39877e(0x21a)][0x0];return{..._0x4efc93,'id':_0x1ad1dd[_0x39877e(0x1da)],'resolved':_0x2853ff[_0x39877e(0x1df)]===0x1,'dT':D(_0x1ad1dd[_0x39877e(0x1ec)]),'personId':_0x1ad1dd[_0x39877e(0x1e7)],'threadId':_0x1ad1dd[_0x39877e(0x1f2)]};}function ee(_0x161cf9,_0x104e35,_0x33390b){const _0x4e3082=_0x5d47f7;var _0x52b2c2,_0x2e7d0c;if(((_0x2e7d0c=(_0x52b2c2=_0x161cf9==null?void 0x0:_0x161cf9[_0x4e3082(0x21a)])==null?void 0x0:_0x52b2c2['length'])!=null?_0x2e7d0c:0x0)>0x0){const _0x5c1f53=(_0x843475,_0xc7a9b5)=>({'id':_0x843475[_0x4e3082(0x1da)],'threadId':_0x843475[_0x4e3082(0x1f2)],'dT':D(_0x843475[_0x4e3082(0x1ec)]),'personId':_0x843475['userId'],'resolved':_0x161cf9[_0x4e3082(0x1df)]===I['Solved'],'unitId':_0x104e35,'subUnitId':_0x33390b,'text':JSON[_0x4e3082(0x1d9)](_0x843475[_0x4e3082(0x1ff)]),'parentId':_0xc7a9b5}),_0xd4ae6f=_0x5c1f53(_0x161cf9[_0x4e3082(0x21a)][0x0]);return{..._0xd4ae6f,'children':_0x161cf9[_0x4e3082(0x21a)]['slice'](0x1)[_0x4e3082(0x1eb)](_0x4108fe=>_0x5c1f53(_0x4108fe,_0xd4ae6f['id']))};}return null;}let f=class{constructor(_0x5f578d,_0x4fd9fe,_0x45f46e,_0x586ae3){const _0x3e06e9=_0x5d47f7;this[_0x3e06e9(0x1ed)]=_0x5f578d,this[_0x3e06e9(0x1f4)]=_0x4fd9fe,this['_sessionService']=_0x45f46e,this[_0x3e06e9(0x1cd)]=_0x586ae3;}async[_0x5d47f7(0x1d2)](_0x517c38){const _0x300896=_0x5d47f7;var _0x1d5f83,_0x2302dc;const {parentId:_0x59487b,unitId:_0x5b6976,text:_0x1d06c8,threadId:_0x515c10}=_0x517c38,_0x14de92=(_0x2302dc=(_0x1d5f83=_0x1d06c8[_0x300896(0x20c)])==null?void 0x0:_0x1d5f83[_0x300896(0x1f0)](_0x57cab6=>_0x57cab6[_0x300896(0x1f7)]===_0x5108c3[_0x300896(0x1d1)])[_0x300896(0x1eb)](_0x2be1de=>_0x2be1de[_0x300896(0x1c4)]))!=null?_0x2302dc:[],_0x2a1650=JSON[_0x300896(0x218)](_0x1d06c8),_0x50a64d=(await this[_0x300896(0x20b)][_0x300896(0x1be)](_0x5b6976))[_0x300896(0x1e1)]();if(_0x59487b){const _0xfa2b35={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92,'threadId':_0x515c10},_0x1bb879=(await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x20f),{'body':_0xfa2b35}))[_0x300896(0x222)]['reply'];return{..._0x517c38,'id':_0x1bb879['replyId'],'dT':_0x4892bc(+_0x1bb879[_0x300896(0x1ec)])[_0x300896(0x1e6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1bb879[_0x300896(0x1e7)]};}else{const _0x230492={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92},_0x4593bc=await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x220),{'body':_0x230492});return X(_0x4593bc[_0x300896(0x222)]['comment'],_0x517c38);}}async['updateComment'](_0x1d667a){const _0xe37e36=_0x5d47f7;var _0x2152b5,_0x25abb1;const {text:_0x4d99a3,unitId:_0x57573e}=_0x1d667a,_0x2c8c74=(_0x25abb1=(_0x2152b5=_0x4d99a3[_0xe37e36(0x20c)])==null?void 0x0:_0x2152b5[_0xe37e36(0x1f0)](_0xf05851=>_0xf05851[_0xe37e36(0x1f7)]===_0x5108c3[_0xe37e36(0x1d1)])[_0xe37e36(0x1eb)](_0x287918=>_0x287918[_0xe37e36(0x1c4)]))!=null?_0x25abb1:[],_0x3be6e3=JSON[_0xe37e36(0x218)](_0x4d99a3),_0x314092=_0x1d667a[_0xe37e36(0x1f2)],_0x40d215=_0x1d667a['id'],_0x3da70f={'memberId':(await this[_0xe37e36(0x20b)]['requireSession'](_0x57573e))[_0xe37e36(0x1e1)](),'unitId':_0x57573e,'threadId':_0x314092,'mention':_0x2c8c74,'content':_0x3be6e3,'replyId':_0x40d215},_0x2a8f82=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x57573e+_0xe37e36(0x208),{'body':_0x3da70f});return!_0x2a8f82[_0xe37e36(0x222)]['error']||_0x2a8f82[_0xe37e36(0x222)][_0xe37e36(0x1d3)][_0xe37e36(0x1d0)]===0x1;}async['resolveComment'](_0x253ac0){const _0x1f870a=_0x5d47f7,{unitId:_0x4ed73d}=_0x253ac0,_0x4a0286=_0x253ac0[_0x1f870a(0x1f2)],_0x14d47d={'memberId':this[_0x1f870a(0x1f4)]['getCurrentUser']()[_0x1f870a(0x212)],'unitId':_0x4ed73d,'threadId':_0x4a0286,'solved':_0x253ac0[_0x1f870a(0x215)]?I['Solved']:I[_0x1f870a(0x1e0)]},_0x2db48f=await this[_0x1f870a(0x1ed)][_0x1f870a(0x21c)](_0x1f870a(0x210)+_0x4ed73d+_0x1f870a(0x201),{'body':_0x14d47d});return!_0x2db48f['body'][_0x1f870a(0x1d3)]||_0x2db48f[_0x1f870a(0x222)][_0x1f870a(0x1d3)][_0x1f870a(0x1d0)]===0x1;}async[_0x5d47f7(0x1f6)](_0x59f5c7,_0x69c44a,_0x1d96a0,_0x4d92dc){const _0xb5c3f6=_0x5d47f7,_0x49f40e={'memberId':(await this[_0xb5c3f6(0x20b)][_0xb5c3f6(0x1be)](_0x59f5c7))[_0xb5c3f6(0x1e1)](),'threadId':_0x1d96a0,'replyId':_0x4d92dc,'unitId':_0x59f5c7},_0x167d5e=await this['_httpService'][_0xb5c3f6(0x21c)](_0xb5c3f6(0x210)+_0x59f5c7+_0xb5c3f6(0x1fd),{'body':_0x49f40e});return!_0x167d5e[_0xb5c3f6(0x222)]['error']||_0x167d5e[_0xb5c3f6(0x222)][_0xb5c3f6(0x1d3)][_0xb5c3f6(0x1d0)]===0x1;}async[_0x5d47f7(0x1bf)](_0x43e237,_0x4df04e,_0xda9039){const _0x3615fc=_0x5d47f7,_0x3fcdda={'unitId':_0x43e237,'threadId':_0xda9039},_0x1245d0=await this[_0x3615fc(0x1ed)][_0x3615fc(0x21c)](_0x3615fc(0x210)+_0x43e237+_0x3615fc(0x217),{'body':_0x3fcdda}),_0x4ebe4f=_0xda9039[_0x3615fc(0x1eb)](_0x5aa8b4=>ee(_0x1245d0[_0x3615fc(0x222)][_0x3615fc(0x204)][_0x5aa8b4],_0x43e237,_0x4df04e))[_0x3615fc(0x1f0)](Boolean);return Object[_0x3615fc(0x1e9)](_0x1245d0[_0x3615fc(0x222)]['users'])[_0x3615fc(0x20a)](_0xd59a04=>{const _0x136ac4=_0x3615fc;this[_0x136ac4(0x1f4)]['addUser'](_0xd59a04);}),_0x4ebe4f;}[_0x5d47f7(0x1fa)](_0x140357){const _0x2f3ba3=_0x5d47f7;return{'id':_0x140357['id'],'threadId':_0x140357[_0x2f3ba3(0x1f2)],'ref':_0x140357[_0x2f3ba3(0x214)]};}};f=Q([_(0x0,_0x485985(_0x166e15)),_(0x1,_0x485985(_0x4ec60f)),_(0x2,_0x485985(_0xff52e3)),_(0x3,_0x485985(_0x17ace1))],f);var re=Object[_0x5d47f7(0x219)],te=(_0x350f38,_0x57aaa4,_0x1003f5,_0x442795)=>{for(var _0x44c311=_0x442795>0x1?void 0x0:_0x442795?re(_0x57aaa4,_0x1003f5):_0x57aaa4,_0x363e11=_0x350f38['length']-0x1,_0x41c654;_0x363e11>=0x0;_0x363e11--)(_0x41c654=_0x350f38[_0x363e11])&&(_0x44c311=_0x41c654(_0x44c311)||_0x44c311);return _0x44c311;},N=(_0x1e6260,_0x5d7b47)=>(_0x4caee4,_0x59fb72)=>_0x5d7b47(_0x4caee4,_0x59fb72,_0x1e6260);function _0x224b(_0x1bfbe0,_0x324bfb){const _0x4a975f=_0x4a97();return _0x224b=function(_0x224b7e,_0x1aa131){_0x224b7e=_0x224b7e-0x1bb;let _0x1c5243=_0x4a975f[_0x224b7e];return _0x1c5243;},_0x224b(_0x1bfbe0,_0x324bfb);}let g=class extends _0x3e4cea{constructor(_0x32c99c,_0xa2b5c3){const _0x2cb612=_0x5d47f7;super(),this['_threadCommentDataSourceService']=_0x32c99c,this[_0x2cb612(0x1d8)]=_0xa2b5c3,this['_initDataSource']();}['_initDataSource'](){const _0x301852=_0x5d47f7;this[_0x301852(0x21d)][_0x301852(0x1d5)]=this[_0x301852(0x1d8)],this[_0x301852(0x21d)][_0x301852(0x1f1)]=!0x1;}};g=te([N(0x0,_0x596221),N(0x1,_0x485985(f))],g);var se=Object[_0x5d47f7(0x1e5)],oe=Object[_0x5d47f7(0x219)],ne=(_0x667073,_0x4b235e,_0x3f9984)=>_0x4b235e in _0x667073?se(_0x667073,_0x4b235e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f9984}):_0x667073[_0x4b235e]=_0x3f9984,ie=(_0x3a53f7,_0x2f87f1,_0x1065a5,_0x4e2ab)=>{const _0x2cc0ff=_0x5d47f7;for(var _0xb72658=_0x4e2ab>0x1?void 0x0:_0x4e2ab?oe(_0x2f87f1,_0x1065a5):_0x2f87f1,_0x531771=_0x3a53f7[_0x2cc0ff(0x1cc)]-0x1,_0x549758;_0x531771>=0x0;_0x531771--)(_0x549758=_0x3a53f7[_0x531771])&&(_0xb72658=_0x549758(_0xb72658)||_0xb72658);return _0xb72658;},w=(_0x77fef1,_0x2e63b6)=>(_0x4a806f,_0x3e6a5b)=>_0x2e63b6(_0x4a806f,_0x3e6a5b,_0x77fef1),$=(_0x37545b,_0x33f974,_0x59e734)=>ne(_0x37545b,typeof _0x33f974!=_0x5d47f7(0x1db)?_0x33f974+'':_0x33f974,_0x59e734);let b=class extends _0x28570a{constructor(_0x924144=M,_0x3994e0,_0x366957){const _0x1c068d=_0x5d47f7;super(),this[_0x1c068d(0x1c5)]=_0x924144,this[_0x1c068d(0x1cd)]=_0x3994e0,this['_configService']=_0x366957;const {..._0x4d7eef}=_0x43a2d8({},M,this[_0x1c068d(0x1c5)]);this[_0x1c068d(0x1cf)][_0x1c068d(0x1bd)](z,_0x4d7eef);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x116fd0=>{const _0x37d78d=_0x224b;this[_0x37d78d(0x1cd)][_0x37d78d(0x1bb)](_0x116fd0);});}['onReady'](){const _0x4ba9b8=_0x5d47f7;this[_0x4ba9b8(0x1cd)]['get'](g),this[_0x4ba9b8(0x1cd)][_0x4ba9b8(0x206)](S);}};$(b,_0x5d47f7(0x203),W),$(b,_0x5d47f7(0x209),_0x5d649f[_0x5d47f7(0x1e2)]),b=ie([_0x5d59fb(_0x22014a,_0x31a28b,_0x104cb6),w(0x1,_0x485985(_0x17ace1)),w(0x2,_0x253407)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xe0b0(_0x4eca7d,_0x1faad0){const _0x3dffa5=_0x3dff();return _0xe0b0=function(_0xe0b0f9,_0x487544){_0xe0b0f9=_0xe0b0f9-0x7b;let _0x3a654a=_0x3dffa5[_0xe0b0f9];return _0x3a654a;},_0xe0b0(_0x4eca7d,_0x1faad0);}function _0x3dff(){const _0xfaea5a=['4HMFbwc','_initUserSync','UniverNetwork','_userService','getUnit','solved','pluginName','syncUpdateMutationToColla','Delete','2132904PQrcfF','forEach','ref','user','1649800BCXrEf','CommentService','add','parentId','merge','exports','onReady','updateComment','find','get','Reply','CustomRangeType','defineProperty','Inject','body','@univerjs/thread-comment','disposeWithMe','12PpCRYT','users','Module','@univerjs-pro/collaboration-client','personId','_commentService','addComment','IThreadCommentDataSourceService','subscribe','UserManagerService','bufferTime','comments','_httpService','COMMENT','createTimestamp','OpenOrReOpen','onStarting','UniverProThreadCommentDatasource','_threadCommentModel','replyId','threadId','_sessionService','_threadCommentDataSource','_injector','UniverThreadComment','@univerjs/thread-comment-ui','parse','/solved','length','Disposable','error','stringify','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','getMemberID','UniverThreadCommentDataSourcePlugin','map','11542949iAjLdZ','Plugin','321202JLvXHu','pipe','payload','rxjs','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','content','7ZYLzmq','resolveComment','code','_configService','amd','1071310KDjDgX','rangeId','saveCommentToSnapshot','1991144wDzhaX','delete','function','IConfigService','format','/universer-api/comment/unit/','root','Solved','customRanges','Edit','UniverCore','UniverProCollaborationClient','size','replies','Solve','getUser','symbol','@univerjs-pro/license','HTTPService','_threadCommentDataSourceService','/universer-api/user/list','1010518DbipRP','commentUpdate$','addUser','Add','UniverLicensePlugin','reply','requireSession','post','getComment','slice','thread-comment-data-source.config','UNIVER_UNKNOWN','UniverProLicense','Unknown','_config','listComments','18zTxscL','@univerjs/core','userId','_init','comment','UniverThreadCommentUi','/delete','@univerjs/network','/list','Injector','userID','type'];_0x3dff=function(){return _0xfaea5a;};return _0x3dff();}(function(_0x2fe8d0,_0x23d0d2){const _0x3aa1d6=_0xe0b0,_0x397c16=_0x2fe8d0();while(!![]){try{const _0x801223=parseInt(_0x3aa1d6(0x7f))/0x1+parseInt(_0x3aa1d6(0xa4))/0x2+-parseInt(_0x3aa1d6(0xc9))/0x3*(parseInt(_0x3aa1d6(0xc0))/0x4)+-parseInt(_0x3aa1d6(0xcd))/0x5*(parseInt(_0x3aa1d6(0xde))/0x6)+parseInt(_0x3aa1d6(0x87))/0x7*(-parseInt(_0x3aa1d6(0x8f))/0x8)+parseInt(_0x3aa1d6(0xb4))/0x9*(parseInt(_0x3aa1d6(0x8c))/0xa)+parseInt(_0x3aa1d6(0x7d))/0xb;if(_0x801223===_0x23d0d2)break;else _0x397c16['push'](_0x397c16['shift']());}catch(_0x42c28d){_0x397c16['push'](_0x397c16['shift']());}}}(_0x3dff,0x72d1d),function(_0x26b44e,_0x4e0d8a){const _0x15a39c=_0xe0b0;typeof exports=='object'&&typeof module<'u'?_0x4e0d8a(exports,require(_0x15a39c(0xe1)),require(_0x15a39c(0xa0)),require(_0x15a39c(0xb5)),require(_0x15a39c(0xf7)),require(_0x15a39c(0xdc)),require(_0x15a39c(0x82)),require('@univerjs/network')):typeof define==_0x15a39c(0x91)&&define[_0x15a39c(0x8b)]?define([_0x15a39c(0xd2),_0x15a39c(0xe1),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x15a39c(0xdc),'rxjs',_0x15a39c(0xbb)],_0x4e0d8a):(_0x26b44e=typeof globalThis<'u'?globalThis:_0x26b44e||self,_0x4e0d8a(_0x26b44e[_0x15a39c(0xef)]={},_0x26b44e[_0x15a39c(0x9a)],_0x26b44e[_0x15a39c(0xb0)],_0x26b44e[_0x15a39c(0x99)],_0x26b44e[_0x15a39c(0xb9)],_0x26b44e[_0x15a39c(0xf6)],_0x26b44e[_0x15a39c(0x82)],_0x26b44e[_0x15a39c(0xc2)]));}(this,function(_0x37b9c5,_0x4a9062,_0x1c51c1,_0x106492,_0x4c71e9,_0x37f266,_0x252765,_0x5c99fe){'use strict';const _0x752163=_0xe0b0;const _0xc9f176='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xf5b0de=(_0x19f565=>(_0x19f565[_0x19f565[_0x752163(0xed)]=0x0]=_0x752163(0xed),_0x19f565[_0x19f565[_0x752163(0x96)]=0x1]=_0x752163(0x96),_0x19f565[_0x19f565['UNRECOGNIZED']=-0x1]=_0x752163(0x84),_0x19f565))(_0xf5b0de||{}),_0x45b6b6=(_0xf5cd08=>(_0xf5cd08[_0xf5cd08[_0x752163(0xb1)]=0x0]='Unknown',_0xf5cd08[_0xf5cd08[_0x752163(0xa7)]=0x1]=_0x752163(0xa7),_0xf5cd08[_0xf5cd08[_0x752163(0xd7)]=0x2]=_0x752163(0xd7),_0xf5cd08[_0xf5cd08[_0x752163(0x98)]=0x3]=_0x752163(0x98),_0xf5cd08[_0xf5cd08[_0x752163(0xc8)]=0x4]=_0x752163(0xc8),_0xf5cd08[_0xf5cd08['Solve']=0x5]=_0x752163(0x9d),_0xf5cd08[_0xf5cd08[_0x752163(0x84)]=-0x1]=_0x752163(0x84),_0xf5cd08))(_0x45b6b6||{});const _0x1582fa=_0x78d874=>_0x106492['dayjs'](new Date(+_0x78d874))[_0x752163(0x93)](_0x752163(0x85)),_0x55c6a9=async(_0x356f13,_0x16630b)=>{const _0x1eea47=_0x752163,_0x267998=_0x356f13[_0x1eea47(0xd6)](_0x106492[_0x1eea47(0xe7)]),_0x9c6092=_0x356f13[_0x1eea47(0xd6)](_0x5c99fe['HTTPService']);_0x16630b['forEach'](_0x2d81f3=>{const _0x4e0bf9=_0x1eea47;_0x267998[_0x4e0bf9(0x9e)](_0x2d81f3)&&_0x16630b[_0x4e0bf9(0x90)](_0x2d81f3);}),_0x16630b[_0x1eea47(0x9b)]&&(await _0x9c6092[_0x1eea47(0xd6)](_0x1eea47(0xa3),{'params':{'userIDs':[..._0x16630b]}}))[_0x1eea47(0xdb)][_0x1eea47(0xdf)]['forEach'](_0x4c520f=>{_0x4c520f&&_0x267998['addUser'](_0x4c520f);});};var _0x485108=Object[_0x752163(0xfe)],_0x10bbe7=(_0x73a0ae,_0x5b6ea1,_0xd3e20e,_0x5b95e7)=>{for(var _0xffd0d8=_0x5b95e7>0x1?void 0x0:_0x5b95e7?_0x485108(_0x5b6ea1,_0xd3e20e):_0x5b6ea1,_0x1a3a18=_0x73a0ae['length']-0x1,_0x6491a;_0x1a3a18>=0x0;_0x1a3a18--)(_0x6491a=_0x73a0ae[_0x1a3a18])&&(_0xffd0d8=_0x6491a(_0xffd0d8)||_0xffd0d8);return _0xffd0d8;},_0x5eba81=(_0x2bdc3d,_0x3051a7)=>(_0x258e86,_0x147364)=>_0x3051a7(_0x258e86,_0x147364,_0x2bdc3d);let _0x5e03d9=class extends _0x106492[_0x752163(0xfb)]{constructor(_0x5bd420,_0x33e00c,_0x21fbbf,_0x28f251){const _0x5857c8=_0x752163;super(),this[_0x5857c8(0xe3)]=_0x5bd420,this[_0x5857c8(0xf0)]=_0x33e00c,this[_0x5857c8(0xc3)]=_0x21fbbf,this[_0x5857c8(0xf5)]=_0x28f251,this['_init'](),this[_0x5857c8(0xc1)]();}[_0x752163(0xc1)](){const _0x3dec24=_0x752163;this[_0x3dec24(0xdd)](this['_threadCommentModel']['commentUpdate$'][_0x3dec24(0x80)](_0x252765[_0x3dec24(0xe8)](0x10))[_0x3dec24(0xe6)](_0x548ff9=>{const _0x58bbcd=_0x3dec24,_0x52e763=new Set();_0x548ff9[_0x58bbcd(0xca)](_0x11327b=>{const _0x404146=_0x58bbcd;switch(_0x11327b[_0x404146(0xbf)]){case _0x404146(0xcf):{const _0x4c3f90=_0x11327b[_0x404146(0x81)][_0x404146(0xe2)];_0x52e763[_0x404146(0xcf)](_0x4c3f90);break;}}}),_0x55c6a9(this[_0x58bbcd(0xf5)],_0x52e763);}));}[_0x752163(0xb7)](){const _0x2ddc84=_0x752163;this[_0x2ddc84(0xdd)](this['_commentService'][_0x2ddc84(0xa5)][_0x2ddc84(0xe6)](async _0x21b155=>{const _0x12232c=_0x2ddc84;var _0x37de74,_0x2d1d08,_0x5d3adb,_0x437190;const _0x228281=(_0x37de74=this[_0x12232c(0xf0)][_0x12232c(0xc4)](_0x21b155['unitId'])[_0x12232c(0xd5)](_0x288895=>_0x288895[_0x12232c(0xf2)]===_0x21b155['threadId']))==null?void 0x0:_0x37de74[_0x12232c(0x95)];if(!_0x228281)return;const {unitId:_0x23b655,subUnitId:_0x514f42}=_0x228281;switch(_0x21b155[_0x12232c(0xcc)]&&this['_userService']['addUser'](_0x21b155[_0x12232c(0xcc)]),_0x21b155['type']){case _0x45b6b6['Add']:break;case _0x45b6b6[_0x12232c(0xd7)]:{this[_0x12232c(0xf0)][_0x12232c(0xe4)](_0x23b655,_0x514f42,{'unitId':_0x23b655,'subUnitId':_0x514f42,'ref':'','id':_0x21b155['replyId'],'dT':_0x1582fa(+_0x21b155[_0x12232c(0xec)]),'threadId':_0x21b155[_0x12232c(0xf2)],'personId':(_0x5d3adb=(_0x2d1d08=_0x21b155[_0x12232c(0xcc)])==null?void 0x0:_0x2d1d08[_0x12232c(0xbe)])!=null?_0x5d3adb:_0x21b155[_0x12232c(0xb6)],'text':JSON['parse'](_0x21b155[_0x12232c(0x86)]),'parentId':_0x228281['id']});break;}case _0x45b6b6[_0x12232c(0xc8)]:{const _0x48f1ed=this['_threadCommentModel'][_0x12232c(0xac)](_0x23b655,_0x514f42,_0x21b155['replyId']);_0x48f1ed&&_0x48f1ed[_0x12232c(0xd0)]&&this[_0x12232c(0xf0)]['deleteComment'](_0x23b655,_0x514f42,_0x21b155['replyId']);break;}case _0x45b6b6[_0x12232c(0x98)]:{this[_0x12232c(0xf0)][_0x12232c(0xd4)](_0x23b655,_0x514f42,{'commentId':_0x21b155['replyId'],'text':JSON[_0x12232c(0xf8)](_0x21b155[_0x12232c(0x86)])});break;}case _0x45b6b6[_0x12232c(0x9d)]:{const _0x159508=(_0x437190=this[_0x12232c(0xf0)][_0x12232c(0xc4)](_0x21b155['unitId'])['find'](_0xd9e5f=>_0xd9e5f[_0x12232c(0xf2)]===_0x21b155['threadId']))==null?void 0x0:_0x437190[_0x12232c(0x95)];_0x159508&&this[_0x12232c(0xf0)][_0x12232c(0x88)](_0x23b655,_0x514f42,_0x159508['id'],_0x21b155[_0x12232c(0xc5)]===_0xf5b0de['Solved']);break;}}}));}};_0x5e03d9=_0x10bbe7([_0x5eba81(0x0,_0x106492['Inject'](_0x4a9062[_0x752163(0xce)])),_0x5eba81(0x1,_0x106492[_0x752163(0xda)](_0x37f266['ThreadCommentModel'])),_0x5eba81(0x2,_0x106492[_0x752163(0xda)](_0x106492[_0x752163(0xe7)])),_0x5eba81(0x3,_0x106492[_0x752163(0xda)](_0x106492['Injector']))],_0x5e03d9);const _0x1a6d8b=_0x752163(0xae),_0x18bd11={};var _0x5d6e40=Object['getOwnPropertyDescriptor'],_0x295723=(_0x432ce6,_0x865611,_0x1e58ed,_0x11cfe3)=>{const _0x3e318d=_0x752163;for(var _0x4b0a6e=_0x11cfe3>0x1?void 0x0:_0x11cfe3?_0x5d6e40(_0x865611,_0x1e58ed):_0x865611,_0x43d53f=_0x432ce6[_0x3e318d(0xfa)]-0x1,_0x8c52b;_0x43d53f>=0x0;_0x43d53f--)(_0x8c52b=_0x432ce6[_0x43d53f])&&(_0x4b0a6e=_0x8c52b(_0x4b0a6e)||_0x4b0a6e);return _0x4b0a6e;},_0x24090e=(_0x41412f,_0x50169b)=>(_0x113a5a,_0x2d6f6f)=>_0x50169b(_0x113a5a,_0x2d6f6f,_0x41412f);function _0x1ae00a(_0x38e432,_0x95894b){const _0x4ac3cf=_0x752163,_0x4c216e=_0x38e432[_0x4ac3cf(0x9c)][0x0];return{..._0x95894b,'id':_0x4c216e[_0x4ac3cf(0xf1)],'resolved':_0x38e432[_0x4ac3cf(0xc5)]===0x1,'dT':_0x1582fa(_0x4c216e[_0x4ac3cf(0xec)]),'personId':_0x4c216e[_0x4ac3cf(0xb6)],'threadId':_0x4c216e['threadId']};}function _0x19e5c2(_0x260335,_0x432f47,_0xfebd20){const _0x39b747=_0x752163;var _0x5475b0,_0x379e06;if(((_0x379e06=(_0x5475b0=_0x260335==null?void 0x0:_0x260335[_0x39b747(0x9c)])==null?void 0x0:_0x5475b0[_0x39b747(0xfa)])!=null?_0x379e06:0x0)>0x0){const _0x20afb4=(_0xcdb9e,_0x10f758)=>({'id':_0xcdb9e['replyId'],'threadId':_0xcdb9e[_0x39b747(0xf2)],'dT':_0x1582fa(_0xcdb9e[_0x39b747(0xec)]),'personId':_0xcdb9e['userId'],'resolved':_0x260335[_0x39b747(0xc5)]===_0xf5b0de[_0x39b747(0x96)],'unitId':_0x432f47,'subUnitId':_0xfebd20,'text':JSON[_0x39b747(0xf8)](_0xcdb9e['content']),'parentId':_0x10f758}),_0x3cefad=_0x20afb4(_0x260335[_0x39b747(0x9c)][0x0]);return{..._0x3cefad,'children':_0x260335[_0x39b747(0x9c)][_0x39b747(0xad)](0x1)[_0x39b747(0x7c)](_0x797d04=>_0x20afb4(_0x797d04,_0x3cefad['id']))};}return null;}let _0x269ab3=class{constructor(_0x31c1a1,_0x21f423,_0xdcf678,_0x2f07f4){const _0x46c9b2=_0x752163;this[_0x46c9b2(0xea)]=_0x31c1a1,this['_userService']=_0x21f423,this[_0x46c9b2(0xf3)]=_0xdcf678,this[_0x46c9b2(0xf5)]=_0x2f07f4;}async[_0x752163(0xe4)](_0x2ff234){const _0x40effd=_0x752163;var _0x33dcd1,_0x320c43;const {parentId:_0x56c971,unitId:_0x176fe8,text:_0x395193,threadId:_0x1b69ce}=_0x2ff234,_0x28102b=(_0x320c43=(_0x33dcd1=_0x395193[_0x40effd(0x97)])==null?void 0x0:_0x33dcd1[_0x40effd(0x83)](_0x255100=>_0x255100['rangeType']===_0x106492['CustomRangeType'][_0x40effd(0xeb)])[_0x40effd(0x7c)](_0x22d7d8=>_0x22d7d8[_0x40effd(0x8d)]))!=null?_0x320c43:[],_0x5e5bc7=JSON[_0x40effd(0xfd)](_0x395193),_0x3b49dc=(await this[_0x40effd(0xf3)][_0x40effd(0xaa)](_0x176fe8))[_0x40effd(0x100)]();if(_0x56c971){const _0x164b22={'memberId':_0x3b49dc,'unitId':_0x176fe8,'content':_0x5e5bc7,'mention':_0x28102b,'threadId':_0x1b69ce},_0x41298c=(await this[_0x40effd(0xea)][_0x40effd(0xab)](_0x40effd(0x94)+_0x176fe8+'/reply',{'body':_0x164b22}))[_0x40effd(0xdb)][_0x40effd(0xa9)];return{..._0x2ff234,'id':_0x41298c[_0x40effd(0xf1)],'dT':_0x106492['dayjs'](+_0x41298c[_0x40effd(0xec)])[_0x40effd(0x93)](_0x40effd(0x85)),'personId':_0x41298c[_0x40effd(0xb6)]};}else{const _0x315ce3={'memberId':_0x3b49dc,'unitId':_0x176fe8,'content':_0x5e5bc7,'mention':_0x28102b},_0x1da899=await this[_0x40effd(0xea)][_0x40effd(0xab)](_0x40effd(0x94)+_0x176fe8+'/add',{'body':_0x315ce3});return _0x1ae00a(_0x1da899[_0x40effd(0xdb)][_0x40effd(0xb8)],_0x2ff234);}}async[_0x752163(0xd4)](_0xcfa8f1){const _0x59d08e=_0x752163;var _0x264450,_0x1e2535;const {text:_0xca322c,unitId:_0x63ed4d}=_0xcfa8f1,_0x4988b5=(_0x1e2535=(_0x264450=_0xca322c[_0x59d08e(0x97)])==null?void 0x0:_0x264450[_0x59d08e(0x83)](_0x28f4a0=>_0x28f4a0['rangeType']===_0x106492[_0x59d08e(0xd8)][_0x59d08e(0xeb)])[_0x59d08e(0x7c)](_0x16ea1e=>_0x16ea1e[_0x59d08e(0x8d)]))!=null?_0x1e2535:[],_0x2ed8f6=JSON[_0x59d08e(0xfd)](_0xca322c),_0x2f72fd=_0xcfa8f1['threadId'],_0x126f4a=_0xcfa8f1['id'],_0x3a4971={'memberId':(await this[_0x59d08e(0xf3)][_0x59d08e(0xaa)](_0x63ed4d))[_0x59d08e(0x100)](),'unitId':_0x63ed4d,'threadId':_0x2f72fd,'mention':_0x4988b5,'content':_0x2ed8f6,'replyId':_0x126f4a},_0x52373e=await this[_0x59d08e(0xea)]['post'](_0x59d08e(0x94)+_0x63ed4d+'/edit',{'body':_0x3a4971});return!_0x52373e[_0x59d08e(0xdb)]['error']||_0x52373e[_0x59d08e(0xdb)][_0x59d08e(0xfc)][_0x59d08e(0x89)]===0x1;}async['resolveComment'](_0x5698a4){const _0x244a6c=_0x752163,{unitId:_0x3efdfa}=_0x5698a4,_0x350b75=_0x5698a4[_0x244a6c(0xf2)],_0x13763d={'memberId':this[_0x244a6c(0xc3)]['getCurrentUser']()[_0x244a6c(0xbe)],'unitId':_0x3efdfa,'threadId':_0x350b75,'solved':_0x5698a4['resolved']?_0xf5b0de[_0x244a6c(0x96)]:_0xf5b0de[_0x244a6c(0xed)]},_0x161066=await this[_0x244a6c(0xea)]['post'](_0x244a6c(0x94)+_0x3efdfa+_0x244a6c(0xf9),{'body':_0x13763d});return!_0x161066['body']['error']||_0x161066[_0x244a6c(0xdb)]['error']['code']===0x1;}async['deleteComment'](_0x7b5f47,_0x248ca7,_0x29879e,_0x3d71dc){const _0x21a5ea=_0x752163,_0x1df7cf={'memberId':(await this[_0x21a5ea(0xf3)]['requireSession'](_0x7b5f47))['getMemberID'](),'threadId':_0x29879e,'replyId':_0x3d71dc,'unitId':_0x7b5f47},_0x4a636f=await this[_0x21a5ea(0xea)][_0x21a5ea(0xab)]('/universer-api/comment/unit/'+_0x7b5f47+_0x21a5ea(0xba),{'body':_0x1df7cf});return!_0x4a636f['body'][_0x21a5ea(0xfc)]||_0x4a636f[_0x21a5ea(0xdb)][_0x21a5ea(0xfc)][_0x21a5ea(0x89)]===0x1;}async[_0x752163(0xb3)](_0x58957d,_0x5101a0,_0x15689d){const _0x16ee04=_0x752163,_0x3d24cd={'unitId':_0x58957d,'threadId':_0x15689d},_0x56bba4=await this['_httpService'][_0x16ee04(0xab)](_0x16ee04(0x94)+_0x58957d+_0x16ee04(0xbc),{'body':_0x3d24cd}),_0x9b247=_0x15689d[_0x16ee04(0x7c)](_0x69ea03=>_0x19e5c2(_0x56bba4[_0x16ee04(0xdb)][_0x16ee04(0xe9)][_0x69ea03],_0x58957d,_0x5101a0))[_0x16ee04(0x83)](Boolean);return Object['values'](_0x56bba4[_0x16ee04(0xdb)][_0x16ee04(0xdf)])[_0x16ee04(0xca)](_0x2a8262=>{const _0xaf4c58=_0x16ee04;this[_0xaf4c58(0xc3)][_0xaf4c58(0xa6)](_0x2a8262);}),_0x9b247;}[_0x752163(0x8e)](_0x28cb4d){const _0x1fcdeb=_0x752163;return{'id':_0x28cb4d['id'],'threadId':_0x28cb4d[_0x1fcdeb(0xf2)],'ref':_0x28cb4d[_0x1fcdeb(0xcb)]};}};_0x269ab3=_0x295723([_0x24090e(0x0,_0x106492[_0x752163(0xda)](_0x5c99fe[_0x752163(0xa1)])),_0x24090e(0x1,_0x106492[_0x752163(0xda)](_0x106492['UserManagerService'])),_0x24090e(0x2,_0x106492[_0x752163(0xda)](_0x4a9062['CollaborationSessionService'])),_0x24090e(0x3,_0x106492[_0x752163(0xda)](_0x106492[_0x752163(0xbd)]))],_0x269ab3);var _0x1b2a59=Object[_0x752163(0xfe)],_0x453b23=(_0x35a0d5,_0x359125,_0x36ede4,_0x1d20ae)=>{for(var _0x5ee221=_0x1d20ae>0x1?void 0x0:_0x1d20ae?_0x1b2a59(_0x359125,_0x36ede4):_0x359125,_0x51fc64=_0x35a0d5['length']-0x1,_0x51ddf2;_0x51fc64>=0x0;_0x51fc64--)(_0x51ddf2=_0x35a0d5[_0x51fc64])&&(_0x5ee221=_0x51ddf2(_0x5ee221)||_0x5ee221);return _0x5ee221;},_0x49b9e9=(_0x238e75,_0x6c2c4a)=>(_0x1b3ac2,_0x5a6206)=>_0x6c2c4a(_0x1b3ac2,_0x5a6206,_0x238e75);let _0x25c718=class extends _0x106492[_0x752163(0xfb)]{constructor(_0x1a1284,_0x748766){const _0x5bce2f=_0x752163;super(),this[_0x5bce2f(0xa2)]=_0x1a1284,this[_0x5bce2f(0xf4)]=_0x748766,this['_initDataSource']();}['_initDataSource'](){const _0x133a21=_0x752163;this[_0x133a21(0xa2)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x133a21(0xc7)]=!0x1;}};_0x25c718=_0x453b23([_0x49b9e9(0x0,_0x37f266[_0x752163(0xe5)]),_0x49b9e9(0x1,_0x106492[_0x752163(0xda)](_0x269ab3))],_0x25c718);var _0x305577=Object[_0x752163(0xd9)],_0x4028e3=Object[_0x752163(0xfe)],_0x41f7e7=(_0xedc56d,_0x43c656,_0x6690b4)=>_0x43c656 in _0xedc56d?_0x305577(_0xedc56d,_0x43c656,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6690b4}):_0xedc56d[_0x43c656]=_0x6690b4,_0x23b810=(_0x3bec02,_0x35777e,_0x34d5c1,_0x5eea41)=>{const _0x32a6aa=_0x752163;for(var _0x4ae732=_0x5eea41>0x1?void 0x0:_0x5eea41?_0x4028e3(_0x35777e,_0x34d5c1):_0x35777e,_0x1f3cee=_0x3bec02[_0x32a6aa(0xfa)]-0x1,_0x34cded;_0x1f3cee>=0x0;_0x1f3cee--)(_0x34cded=_0x3bec02[_0x1f3cee])&&(_0x4ae732=_0x34cded(_0x4ae732)||_0x4ae732);return _0x4ae732;},_0x2afd88=(_0x321c77,_0x44a849)=>(_0x47db56,_0x35ab70)=>_0x44a849(_0x47db56,_0x35ab70,_0x321c77),_0x536f89=(_0x129bf5,_0x1571f9,_0x3dafd1)=>_0x41f7e7(_0x129bf5,typeof _0x1571f9!=_0x752163(0x9f)?_0x1571f9+'':_0x1571f9,_0x3dafd1);_0x37b9c5[_0x752163(0x7b)]=class extends _0x106492[_0x752163(0x7e)]{constructor(_0xcb68a0=_0x18bd11,_0x493644,_0x115cb8){const _0x2dad76=_0x752163;super(),this[_0x2dad76(0xb2)]=_0xcb68a0,this['_injector']=_0x493644,this['_configService']=_0x115cb8;const {..._0x49d425}=_0x106492[_0x2dad76(0xd1)]({},_0x18bd11,this[_0x2dad76(0xb2)]);this[_0x2dad76(0x8a)]['setConfig'](_0x1a6d8b,_0x49d425);}[_0x752163(0xee)](){const _0x18cec4=_0x752163;[[_0x269ab3],[_0x25c718],[_0x5e03d9]][_0x18cec4(0xca)](_0x301057=>{const _0x1f2119=_0x18cec4;this[_0x1f2119(0xf5)][_0x1f2119(0xcf)](_0x301057);});}[_0x752163(0xd3)](){const _0x32c000=_0x752163;this[_0x32c000(0xf5)][_0x32c000(0xd6)](_0x25c718),this['_injector'][_0x32c000(0xd6)](_0x5e03d9);}},_0x536f89(_0x37b9c5['UniverThreadCommentDataSourcePlugin'],_0x752163(0xc6),_0xc9f176),_0x536f89(_0x37b9c5[_0x752163(0x7b)],_0x752163(0xbf),_0x106492['UniverInstanceType'][_0x752163(0xaf)]),_0x37b9c5[_0x752163(0x7b)]=_0x23b810([_0x106492['DependentOn'](_0x4c71e9['UniverThreadCommentUIPlugin'],_0x4a9062[_0x752163(0xff)],_0x1c51c1[_0x752163(0xa8)]),_0x2afd88(0x1,_0x106492['Inject'](_0x106492[_0x752163(0xbd)])),_0x2afd88(0x2,_0x106492[_0x752163(0x92)])],_0x37b9c5[_0x752163(0x7b)]),Object[_0x752163(0xd9)](_0x37b9c5,Symbol['toStringTag'],{'value':_0x752163(0xe0)});}));
|
|
1
|
+
function _0xa04d(_0x727bc9,_0x2d04b2){const _0x357e69=_0x357e();return _0xa04d=function(_0xa04d17,_0x383b2c){_0xa04d17=_0xa04d17-0xcc;let _0x435e0b=_0x357e69[_0xa04d17];return _0x435e0b;},_0xa04d(_0x727bc9,_0x2d04b2);}function _0x357e(){const _0x418fc7=['object','root','UniverCollaborationClientPlugin','_threadCommentDataSourceService','COMMENT','UNRECOGNIZED','amd','Inject','IConfigService','getMemberID','values','threadId','/reply','Reply','get','reply','getOwnPropertyDescriptor','getUnit','UniverThreadCommentDataSourcePlugin','_threadCommentModel','_threadCommentDataSource','deleteComment','UniverInstanceType','getComment','length','symbol','Unknown','CommentService','code','_initDataSource','4043165zDxdhf','body','_config','merge','find','_httpService','rangeId','Edit','_userService','8374492LLDBkV','error','ThreadCommentModel','/universer-api/user/list','defineProperty','Module','requireSession','userId','replyId','Solve','_injector','unitId','_commentService','users','@univerjs/core','21625911UtBsnQ','/edit','Delete','rxjs','forEach','UniverCore','2114508FERiar','getUser','type','Solved','/list','_initUserSync','@univerjs/thread-comment','_sessionService','7628088qxuMBV','map','_init','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','function','user','solved','/universer-api/comment/unit/','OpenOrReOpen','dayjs','UniverProCollaborationClient','content','_configService','UniverThreadCommentUi','UNIVER_UNKNOWN','userID','exports','resolveComment','stringify','CustomRangeType','filter','parse','size','CollaborationSessionService','addUser','YYYY/MM/DD\x20HH:mm','Disposable','UniverProThreadCommentDatasource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4YaHWZk','Injector','pluginName','onStarting','ref','replies','createTimestamp','pipe','dataSource','getCurrentUser','add','post','UserManagerService','addComment','slice','IThreadCommentDataSourceService','customRanges','rangeType','setConfig','@univerjs-pro/license','comments','commentUpdate$','UniverNetwork','Add','updateComment','subscribe','/add','disposeWithMe','6718VBunGD','/solved','HTTPService','591VWIBZx','toStringTag','DependentOn','1022309XewAjY','comment','syncUpdateMutationToColla'];_0x357e=function(){return _0x418fc7;};return _0x357e();}(function(_0x1b86c1,_0x12409b){const _0x234e25=_0xa04d,_0x26d87d=_0x1b86c1();while(!![]){try{const _0x2c7d1f=-parseInt(_0x234e25(0x111))/0x1+parseInt(_0x234e25(0x10b))/0x2*(parseInt(_0x234e25(0x10e))/0x3)+parseInt(_0x234e25(0xef))/0x4*(-parseInt(_0x234e25(0x132))/0x5)+-parseInt(_0x234e25(0x150))/0x6+-parseInt(_0x234e25(0x13b))/0x7+parseInt(_0x234e25(0xd1))/0x8+parseInt(_0x234e25(0x14a))/0x9;if(_0x2c7d1f===_0x12409b)break;else _0x26d87d['push'](_0x26d87d['shift']());}catch(_0x55ea62){_0x26d87d['push'](_0x26d87d['shift']());}}}(_0x357e,0x9bdbd),function(_0x209042,_0x334779){const _0x23533d=_0xa04d;typeof exports==_0x23533d(0x114)&&typeof module<'u'?_0x334779(exports,require(_0x23533d(0xd4)),require('@univerjs-pro/license'),require(_0x23533d(0x149)),require('@univerjs/thread-comment-ui'),require(_0x23533d(0xcf)),require(_0x23533d(0x14d)),require('@univerjs/network')):typeof define==_0x23533d(0xd6)&&define[_0x23533d(0x11a)]?define([_0x23533d(0xe2),'@univerjs-pro/collaboration-client',_0x23533d(0x102),_0x23533d(0x149),_0x23533d(0xd5),'@univerjs/thread-comment',_0x23533d(0x14d),'@univerjs/network'],_0x334779):(_0x209042=typeof globalThis<'u'?globalThis:_0x209042||self,_0x334779(_0x209042[_0x23533d(0xed)]={},_0x209042[_0x23533d(0xdc)],_0x209042['UniverProLicense'],_0x209042[_0x23533d(0x14f)],_0x209042[_0x23533d(0xdf)],_0x209042['UniverThreadComment'],_0x209042[_0x23533d(0x14d)],_0x209042[_0x23533d(0x105)]));}(this,function(_0x3ae3d6,_0x2c01e0,_0x4323d6,_0x54c82a,_0x54976b,_0x1be2bb,_0x27359c,_0x573540){'use strict';const _0xdda779=_0xa04d;const _0x21e95b=_0xdda779(0xee);var _0xe043cf=(_0x3b14f5=>(_0x3b14f5[_0x3b14f5[_0xdda779(0xda)]=0x0]=_0xdda779(0xda),_0x3b14f5[_0x3b14f5[_0xdda779(0xcc)]=0x1]=_0xdda779(0xcc),_0x3b14f5[_0x3b14f5[_0xdda779(0x119)]=-0x1]=_0xdda779(0x119),_0x3b14f5))(_0xe043cf||{}),_0x51340d=(_0x18b3ff=>(_0x18b3ff[_0x18b3ff[_0xdda779(0x12e)]=0x0]=_0xdda779(0x12e),_0x18b3ff[_0x18b3ff[_0xdda779(0x106)]=0x1]=_0xdda779(0x106),_0x18b3ff[_0x18b3ff[_0xdda779(0x121)]=0x2]='Reply',_0x18b3ff[_0x18b3ff[_0xdda779(0x139)]=0x3]=_0xdda779(0x139),_0x18b3ff[_0x18b3ff[_0xdda779(0x14c)]=0x4]=_0xdda779(0x14c),_0x18b3ff[_0x18b3ff[_0xdda779(0x144)]=0x5]='Solve',_0x18b3ff[_0x18b3ff[_0xdda779(0x119)]=-0x1]=_0xdda779(0x119),_0x18b3ff))(_0x51340d||{});const _0xbb1a12=_0xd0d61e=>_0x54c82a[_0xdda779(0xdb)](new Date(+_0xd0d61e))['format']('YYYY/MM/DD\x20HH:mm'),_0x3a385a=async(_0x41382b,_0x4568bb)=>{const _0x5f86e8=_0xdda779,_0x7880d5=_0x41382b[_0x5f86e8(0x122)](_0x54c82a[_0x5f86e8(0xfb)]),_0x19e680=_0x41382b[_0x5f86e8(0x122)](_0x573540[_0x5f86e8(0x10d)]);_0x4568bb['forEach'](_0x56a64c=>{const _0x750581=_0x5f86e8;_0x7880d5[_0x750581(0x151)](_0x56a64c)&&_0x4568bb['delete'](_0x56a64c);}),_0x4568bb[_0x5f86e8(0xe8)]&&(await _0x19e680[_0x5f86e8(0x122)](_0x5f86e8(0x13e),{'params':{'userIDs':[..._0x4568bb]}}))['body'][_0x5f86e8(0x148)][_0x5f86e8(0x14e)](_0x2bc19d=>{const _0x224984=_0x5f86e8;_0x2bc19d&&_0x7880d5[_0x224984(0xea)](_0x2bc19d);});};var _0x23bfef=Object[_0xdda779(0x124)],_0x16eefa=(_0xc028f4,_0x58f2fa,_0x5d4b1f,_0x3cbb65)=>{const _0x218adf=_0xdda779;for(var _0x799fea=_0x3cbb65>0x1?void 0x0:_0x3cbb65?_0x23bfef(_0x58f2fa,_0x5d4b1f):_0x58f2fa,_0x570859=_0xc028f4[_0x218adf(0x12c)]-0x1,_0x4b18d1;_0x570859>=0x0;_0x570859--)(_0x4b18d1=_0xc028f4[_0x570859])&&(_0x799fea=_0x4b18d1(_0x799fea)||_0x799fea);return _0x799fea;},_0x2bfff2=(_0x289a60,_0x115d01)=>(_0x2ed513,_0x2de0aa)=>_0x115d01(_0x2ed513,_0x2de0aa,_0x289a60);let _0x406192=class extends _0x54c82a[_0xdda779(0xec)]{constructor(_0x423259,_0x414766,_0x11b87f,_0x56fdf7){const _0x50bac5=_0xdda779;super(),this[_0x50bac5(0x147)]=_0x423259,this[_0x50bac5(0x127)]=_0x414766,this['_userService']=_0x11b87f,this[_0x50bac5(0x145)]=_0x56fdf7,this['_init'](),this['_initUserSync']();}[_0xdda779(0xce)](){const _0xaa52b5=_0xdda779;this[_0xaa52b5(0x10a)](this[_0xaa52b5(0x127)][_0xaa52b5(0x104)][_0xaa52b5(0xf6)](_0x27359c['bufferTime'](0x10))[_0xaa52b5(0x108)](_0x15d759=>{const _0x5b69a1=_0xaa52b5,_0x4733a5=new Set();_0x15d759[_0x5b69a1(0x14e)](_0x2b746f=>{const _0x4a0209=_0x5b69a1;switch(_0x2b746f[_0x4a0209(0x152)]){case _0x4a0209(0xf9):{const _0x1494e7=_0x2b746f['payload']['personId'];_0x4733a5[_0x4a0209(0xf9)](_0x1494e7);break;}}}),_0x3a385a(this[_0x5b69a1(0x145)],_0x4733a5);}));}[_0xdda779(0xd3)](){const _0x26e1c7=_0xdda779;this[_0x26e1c7(0x10a)](this[_0x26e1c7(0x147)]['commentUpdate$'][_0x26e1c7(0x108)](async _0x49b598=>{const _0x42e908=_0x26e1c7;var _0x3ffed9,_0x2ac449,_0x8ad659,_0x4d6938;const _0x4c23a3=(_0x3ffed9=this[_0x42e908(0x127)][_0x42e908(0x125)](_0x49b598[_0x42e908(0x146)])[_0x42e908(0x136)](_0x236905=>_0x236905['threadId']===_0x49b598['threadId']))==null?void 0x0:_0x3ffed9['root'];if(!_0x4c23a3)return;const {unitId:_0x14c550,subUnitId:_0x539d36}=_0x4c23a3;switch(_0x49b598['user']&&this[_0x42e908(0x13a)]['addUser'](_0x49b598[_0x42e908(0xd7)]),_0x49b598[_0x42e908(0x152)]){case _0x51340d[_0x42e908(0x106)]:break;case _0x51340d[_0x42e908(0x121)]:{this[_0x42e908(0x127)][_0x42e908(0xfc)](_0x14c550,_0x539d36,{'unitId':_0x14c550,'subUnitId':_0x539d36,'ref':'','id':_0x49b598[_0x42e908(0x143)],'dT':_0xbb1a12(+_0x49b598['createTimestamp']),'threadId':_0x49b598['threadId'],'personId':(_0x8ad659=(_0x2ac449=_0x49b598['user'])==null?void 0x0:_0x2ac449[_0x42e908(0xe1)])!=null?_0x8ad659:_0x49b598[_0x42e908(0x142)],'text':JSON['parse'](_0x49b598[_0x42e908(0xdd)]),'parentId':_0x4c23a3['id']});break;}case _0x51340d[_0x42e908(0x14c)]:{const _0x5166a5=this[_0x42e908(0x127)][_0x42e908(0x12b)](_0x14c550,_0x539d36,_0x49b598[_0x42e908(0x143)]);_0x5166a5&&_0x5166a5['parentId']&&this['_threadCommentModel']['deleteComment'](_0x14c550,_0x539d36,_0x49b598[_0x42e908(0x143)]);break;}case _0x51340d[_0x42e908(0x139)]:{this[_0x42e908(0x127)][_0x42e908(0x107)](_0x14c550,_0x539d36,{'commentId':_0x49b598[_0x42e908(0x143)],'text':JSON['parse'](_0x49b598[_0x42e908(0xdd)])});break;}case _0x51340d[_0x42e908(0x144)]:{const _0x37d9cc=(_0x4d6938=this[_0x42e908(0x127)]['getUnit'](_0x49b598[_0x42e908(0x146)])['find'](_0x5d896a=>_0x5d896a[_0x42e908(0x11f)]===_0x49b598[_0x42e908(0x11f)]))==null?void 0x0:_0x4d6938[_0x42e908(0x115)];_0x37d9cc&&this[_0x42e908(0x127)][_0x42e908(0xe3)](_0x14c550,_0x539d36,_0x37d9cc['id'],_0x49b598[_0x42e908(0xd8)]===_0xe043cf[_0x42e908(0xcc)]);break;}}}));}};_0x406192=_0x16eefa([_0x2bfff2(0x0,_0x54c82a[_0xdda779(0x11b)](_0x2c01e0[_0xdda779(0x12f)])),_0x2bfff2(0x1,_0x54c82a[_0xdda779(0x11b)](_0x1be2bb[_0xdda779(0x13d)])),_0x2bfff2(0x2,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xfb)])),_0x2bfff2(0x3,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xf0)]))],_0x406192);const _0x314522='thread-comment-data-source.config',_0x404da1={};var _0x2e5077=Object[_0xdda779(0x124)],_0x14e704=(_0x5859b7,_0x578c9f,_0x2686a9,_0x2d89d)=>{const _0x5f490e=_0xdda779;for(var _0x3f8327=_0x2d89d>0x1?void 0x0:_0x2d89d?_0x2e5077(_0x578c9f,_0x2686a9):_0x578c9f,_0x246d8c=_0x5859b7[_0x5f490e(0x12c)]-0x1,_0x1d59d4;_0x246d8c>=0x0;_0x246d8c--)(_0x1d59d4=_0x5859b7[_0x246d8c])&&(_0x3f8327=_0x1d59d4(_0x3f8327)||_0x3f8327);return _0x3f8327;},_0x55e75a=(_0x4a1c76,_0x584d08)=>(_0x112df,_0xb6b51)=>_0x584d08(_0x112df,_0xb6b51,_0x4a1c76);function _0x112527(_0x3df793,_0x50d184){const _0x41db75=_0xdda779,_0x336071=_0x3df793['replies'][0x0];return{..._0x50d184,'id':_0x336071[_0x41db75(0x143)],'resolved':_0x3df793[_0x41db75(0xd8)]===0x1,'dT':_0xbb1a12(_0x336071[_0x41db75(0xf5)]),'personId':_0x336071['userId'],'threadId':_0x336071[_0x41db75(0x11f)]};}function _0x504e7f(_0x1a4679,_0x1307a2,_0x374ee0){const _0x16a472=_0xdda779;var _0xec86b5,_0x2a2257;if(((_0x2a2257=(_0xec86b5=_0x1a4679==null?void 0x0:_0x1a4679[_0x16a472(0xf4)])==null?void 0x0:_0xec86b5[_0x16a472(0x12c)])!=null?_0x2a2257:0x0)>0x0){const _0x13042a=(_0x553513,_0x733dc5)=>({'id':_0x553513['replyId'],'threadId':_0x553513[_0x16a472(0x11f)],'dT':_0xbb1a12(_0x553513['createTimestamp']),'personId':_0x553513[_0x16a472(0x142)],'resolved':_0x1a4679[_0x16a472(0xd8)]===_0xe043cf[_0x16a472(0xcc)],'unitId':_0x1307a2,'subUnitId':_0x374ee0,'text':JSON[_0x16a472(0xe7)](_0x553513[_0x16a472(0xdd)]),'parentId':_0x733dc5}),_0x15bc8a=_0x13042a(_0x1a4679[_0x16a472(0xf4)][0x0]);return{..._0x15bc8a,'children':_0x1a4679[_0x16a472(0xf4)][_0x16a472(0xfd)](0x1)['map'](_0x52dba7=>_0x13042a(_0x52dba7,_0x15bc8a['id']))};}return null;}let _0x154654=class{constructor(_0x4f9233,_0x42d2dc,_0x5e85e2,_0x43c87a){const _0x303576=_0xdda779;this[_0x303576(0x137)]=_0x4f9233,this['_userService']=_0x42d2dc,this[_0x303576(0xd0)]=_0x5e85e2,this[_0x303576(0x145)]=_0x43c87a;}async[_0xdda779(0xfc)](_0x1e4d8b){const _0xd05d64=_0xdda779;var _0x2e6f72,_0x775167;const {parentId:_0x1460c6,unitId:_0x2698b2,text:_0x5ae46d,threadId:_0x3420fa}=_0x1e4d8b,_0x22642a=(_0x775167=(_0x2e6f72=_0x5ae46d[_0xd05d64(0xff)])==null?void 0x0:_0x2e6f72[_0xd05d64(0xe6)](_0xb2f033=>_0xb2f033[_0xd05d64(0x100)]===_0x54c82a[_0xd05d64(0xe5)][_0xd05d64(0x118)])[_0xd05d64(0xd2)](_0x280603=>_0x280603[_0xd05d64(0x138)]))!=null?_0x775167:[],_0x558b4e=JSON[_0xd05d64(0xe4)](_0x5ae46d),_0x41dc07=(await this['_sessionService'][_0xd05d64(0x141)](_0x2698b2))[_0xd05d64(0x11d)]();if(_0x1460c6){const _0x367775={'memberId':_0x41dc07,'unitId':_0x2698b2,'content':_0x558b4e,'mention':_0x22642a,'threadId':_0x3420fa},_0x100968=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2698b2+_0xd05d64(0x120),{'body':_0x367775}))[_0xd05d64(0x133)][_0xd05d64(0x123)];return{..._0x1e4d8b,'id':_0x100968[_0xd05d64(0x143)],'dT':_0x54c82a[_0xd05d64(0xdb)](+_0x100968['createTimestamp'])['format'](_0xd05d64(0xeb)),'personId':_0x100968[_0xd05d64(0x142)]};}else{const _0x2dabe1={'memberId':_0x41dc07,'unitId':_0x2698b2,'content':_0x558b4e,'mention':_0x22642a},_0x437175=await this[_0xd05d64(0x137)][_0xd05d64(0xfa)](_0xd05d64(0xd9)+_0x2698b2+_0xd05d64(0x109),{'body':_0x2dabe1});return _0x112527(_0x437175[_0xd05d64(0x133)][_0xd05d64(0x112)],_0x1e4d8b);}}async[_0xdda779(0x107)](_0x3db6b6){const _0x1c6d12=_0xdda779;var _0x37f1e2,_0x12ca8f;const {text:_0x2fa5d7,unitId:_0xc5c3de}=_0x3db6b6,_0x5c22b8=(_0x12ca8f=(_0x37f1e2=_0x2fa5d7[_0x1c6d12(0xff)])==null?void 0x0:_0x37f1e2[_0x1c6d12(0xe6)](_0x4d537c=>_0x4d537c[_0x1c6d12(0x100)]===_0x54c82a[_0x1c6d12(0xe5)][_0x1c6d12(0x118)])['map'](_0x388e17=>_0x388e17[_0x1c6d12(0x138)]))!=null?_0x12ca8f:[],_0x1153bd=JSON[_0x1c6d12(0xe4)](_0x2fa5d7),_0x24a503=_0x3db6b6[_0x1c6d12(0x11f)],_0x413180=_0x3db6b6['id'],_0x2342ff={'memberId':(await this[_0x1c6d12(0xd0)]['requireSession'](_0xc5c3de))[_0x1c6d12(0x11d)](),'unitId':_0xc5c3de,'threadId':_0x24a503,'mention':_0x5c22b8,'content':_0x1153bd,'replyId':_0x413180},_0x1a44ea=await this['_httpService'][_0x1c6d12(0xfa)](_0x1c6d12(0xd9)+_0xc5c3de+_0x1c6d12(0x14b),{'body':_0x2342ff});return!_0x1a44ea['body']['error']||_0x1a44ea[_0x1c6d12(0x133)][_0x1c6d12(0x13c)][_0x1c6d12(0x130)]===0x1;}async['resolveComment'](_0x6c223b){const _0x4b8ca5=_0xdda779,{unitId:_0x1e40a8}=_0x6c223b,_0xfecd7a=_0x6c223b['threadId'],_0x4e8d23={'memberId':this[_0x4b8ca5(0x13a)][_0x4b8ca5(0xf8)]()[_0x4b8ca5(0xe1)],'unitId':_0x1e40a8,'threadId':_0xfecd7a,'solved':_0x6c223b['resolved']?_0xe043cf[_0x4b8ca5(0xcc)]:_0xe043cf[_0x4b8ca5(0xda)]},_0x1117c5=await this[_0x4b8ca5(0x137)]['post'](_0x4b8ca5(0xd9)+_0x1e40a8+_0x4b8ca5(0x10c),{'body':_0x4e8d23});return!_0x1117c5['body']['error']||_0x1117c5['body'][_0x4b8ca5(0x13c)][_0x4b8ca5(0x130)]===0x1;}async[_0xdda779(0x129)](_0xcbad8,_0xb2e2e3,_0x4713e9,_0x9d05c3){const _0x22b311=_0xdda779,_0x4297d6={'memberId':(await this[_0x22b311(0xd0)][_0x22b311(0x141)](_0xcbad8))[_0x22b311(0x11d)](),'threadId':_0x4713e9,'replyId':_0x9d05c3,'unitId':_0xcbad8},_0x1264f4=await this[_0x22b311(0x137)]['post'](_0x22b311(0xd9)+_0xcbad8+'/delete',{'body':_0x4297d6});return!_0x1264f4[_0x22b311(0x133)][_0x22b311(0x13c)]||_0x1264f4[_0x22b311(0x133)][_0x22b311(0x13c)][_0x22b311(0x130)]===0x1;}async['listComments'](_0x158496,_0x3feb58,_0x5a21f6){const _0x282cae=_0xdda779,_0xf27c62={'unitId':_0x158496,'threadId':_0x5a21f6},_0x4bd29f=await this[_0x282cae(0x137)]['post'](_0x282cae(0xd9)+_0x158496+_0x282cae(0xcd),{'body':_0xf27c62}),_0x474d50=_0x5a21f6[_0x282cae(0xd2)](_0x5ed25f=>_0x504e7f(_0x4bd29f[_0x282cae(0x133)][_0x282cae(0x103)][_0x5ed25f],_0x158496,_0x3feb58))[_0x282cae(0xe6)](Boolean);return Object[_0x282cae(0x11e)](_0x4bd29f[_0x282cae(0x133)]['users'])[_0x282cae(0x14e)](_0x16bf56=>{const _0x5711b8=_0x282cae;this[_0x5711b8(0x13a)]['addUser'](_0x16bf56);}),_0x474d50;}['saveCommentToSnapshot'](_0x28d497){const _0x1616c1=_0xdda779;return{'id':_0x28d497['id'],'threadId':_0x28d497[_0x1616c1(0x11f)],'ref':_0x28d497[_0x1616c1(0xf3)]};}};_0x154654=_0x14e704([_0x55e75a(0x0,_0x54c82a[_0xdda779(0x11b)](_0x573540[_0xdda779(0x10d)])),_0x55e75a(0x1,_0x54c82a[_0xdda779(0x11b)](_0x54c82a['UserManagerService'])),_0x55e75a(0x2,_0x54c82a[_0xdda779(0x11b)](_0x2c01e0[_0xdda779(0xe9)])),_0x55e75a(0x3,_0x54c82a['Inject'](_0x54c82a[_0xdda779(0xf0)]))],_0x154654);var _0xd5ab24=Object[_0xdda779(0x124)],_0x1e1e28=(_0x20c302,_0x3c990b,_0x3a34f1,_0x89def5)=>{const _0x3f0192=_0xdda779;for(var _0x4ae8d3=_0x89def5>0x1?void 0x0:_0x89def5?_0xd5ab24(_0x3c990b,_0x3a34f1):_0x3c990b,_0xb0b380=_0x20c302[_0x3f0192(0x12c)]-0x1,_0x28e1bb;_0xb0b380>=0x0;_0xb0b380--)(_0x28e1bb=_0x20c302[_0xb0b380])&&(_0x4ae8d3=_0x28e1bb(_0x4ae8d3)||_0x4ae8d3);return _0x4ae8d3;},_0x367747=(_0x4e53f2,_0x5d10c4)=>(_0x38f53d,_0x56d522)=>_0x5d10c4(_0x38f53d,_0x56d522,_0x4e53f2);let _0x124c7f=class extends _0x54c82a['Disposable']{constructor(_0x3ff869,_0x1c94ff){const _0x38d738=_0xdda779;super(),this[_0x38d738(0x117)]=_0x3ff869,this[_0x38d738(0x128)]=_0x1c94ff,this[_0x38d738(0x131)]();}[_0xdda779(0x131)](){const _0x330f0b=_0xdda779;this[_0x330f0b(0x117)][_0x330f0b(0xf7)]=this[_0x330f0b(0x128)],this[_0x330f0b(0x117)][_0x330f0b(0x113)]=!0x1;}};_0x124c7f=_0x1e1e28([_0x367747(0x0,_0x1be2bb[_0xdda779(0xfe)]),_0x367747(0x1,_0x54c82a[_0xdda779(0x11b)](_0x154654))],_0x124c7f);var _0x563cf7=Object[_0xdda779(0x13f)],_0x30e153=Object[_0xdda779(0x124)],_0x4d06d3=(_0xeafac1,_0x12d10c,_0x1be874)=>_0x12d10c in _0xeafac1?_0x563cf7(_0xeafac1,_0x12d10c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be874}):_0xeafac1[_0x12d10c]=_0x1be874,_0xd9b7bc=(_0x2feefc,_0x3ae689,_0x229c67,_0x321ca6)=>{for(var _0x123038=_0x321ca6>0x1?void 0x0:_0x321ca6?_0x30e153(_0x3ae689,_0x229c67):_0x3ae689,_0x14e81c=_0x2feefc['length']-0x1,_0x2d61fa;_0x14e81c>=0x0;_0x14e81c--)(_0x2d61fa=_0x2feefc[_0x14e81c])&&(_0x123038=_0x2d61fa(_0x123038)||_0x123038);return _0x123038;},_0x287ed3=(_0x573a83,_0x1d53f2)=>(_0x254245,_0xffa3bc)=>_0x1d53f2(_0x254245,_0xffa3bc,_0x573a83),_0x276f2a=(_0x5069be,_0x36f1b4,_0x3b8187)=>_0x4d06d3(_0x5069be,typeof _0x36f1b4!=_0xdda779(0x12d)?_0x36f1b4+'':_0x36f1b4,_0x3b8187);_0x3ae3d6[_0xdda779(0x126)]=class extends _0x54c82a['Plugin']{constructor(_0x432ac7=_0x404da1,_0x465d9d,_0x5d47cc){const _0x4e549f=_0xdda779;super(),this[_0x4e549f(0x134)]=_0x432ac7,this[_0x4e549f(0x145)]=_0x465d9d,this[_0x4e549f(0xde)]=_0x5d47cc;const {..._0x4d3501}=_0x54c82a[_0x4e549f(0x135)]({},_0x404da1,this[_0x4e549f(0x134)]);this[_0x4e549f(0xde)][_0x4e549f(0x101)](_0x314522,_0x4d3501);}[_0xdda779(0xf2)](){const _0xe20973=_0xdda779;[[_0x154654],[_0x124c7f],[_0x406192]][_0xe20973(0x14e)](_0x4650b6=>{const _0x5c3168=_0xe20973;this[_0x5c3168(0x145)][_0x5c3168(0xf9)](_0x4650b6);});}['onReady'](){const _0x27e6d4=_0xdda779;this[_0x27e6d4(0x145)]['get'](_0x124c7f),this[_0x27e6d4(0x145)][_0x27e6d4(0x122)](_0x406192);}},_0x276f2a(_0x3ae3d6[_0xdda779(0x126)],_0xdda779(0xf1),_0x21e95b),_0x276f2a(_0x3ae3d6['UniverThreadCommentDataSourcePlugin'],'type',_0x54c82a[_0xdda779(0x12a)][_0xdda779(0xe0)]),_0x3ae3d6[_0xdda779(0x126)]=_0xd9b7bc([_0x54c82a[_0xdda779(0x110)](_0x54976b['UniverThreadCommentUIPlugin'],_0x2c01e0[_0xdda779(0x116)],_0x4323d6['UniverLicensePlugin']),_0x287ed3(0x1,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xf0)])),_0x287ed3(0x2,_0x54c82a[_0xdda779(0x11c)])],_0x3ae3d6[_0xdda779(0x126)]),Object[_0xdda779(0x13f)](_0x3ae3d6,Symbol[_0xdda779(0x10f)],{'value':_0xdda779(0x140)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.9-experimental.
|
|
3
|
+
"version": "0.6.9-experimental.20250409-e08c696",
|
|
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
|
|
49
|
-
"@univerjs-pro/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.6.9-experimental.20250408-92eabfd",
|
|
48
|
+
"@univerjs/core": "0.6.9-experimental.20250409-e08c696",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.6.9-experimental.20250409-e08c696",
|
|
50
|
+
"@univerjs/network": "0.6.9-experimental.20250409-e08c696",
|
|
51
|
+
"@univerjs-pro/license": "0.6.9-experimental.20250409-e08c696",
|
|
53
52
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.9-experimental.
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.9-experimental.20250409-e08c696",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.9-experimental.20250409-e08c696"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|