@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507121606 → 0.9.2-nightly.202507131606
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 _0x3c1436=_0x4a91;(function(_0x102278,_0x429386){const _0x27702b=_0x4a91,_0x43f3de=_0x102278();while(!![]){try{const _0x4b5785=-parseInt(_0x27702b(0x1e7))/0x1*(parseInt(_0x27702b(0x202))/0x2)+parseInt(_0x27702b(0x1f2))/0x3+-parseInt(_0x27702b(0x247))/0x4*(parseInt(_0x27702b(0x1e0))/0x5)+parseInt(_0x27702b(0x256))/0x6+-parseInt(_0x27702b(0x1e8))/0x7*(parseInt(_0x27702b(0x1f6))/0x8)+-parseInt(_0x27702b(0x253))/0x9*(-parseInt(_0x27702b(0x251))/0xa)+-parseInt(_0x27702b(0x223))/0xb*(-parseInt(_0x27702b(0x22c))/0xc);if(_0x4b5785===_0x429386)break;else _0x43f3de['push'](_0x43f3de['shift']());}catch(_0xe657ca){_0x43f3de['push'](_0x43f3de['shift']());}}}(_0xa18f,0x38c60));Object['defineProperty'](exports,Symbol[_0x3c1436(0x1ef)],{'value':_0x3c1436(0x220)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x3c1436(0x25b);var I=(_0x223740=>(_0x223740[_0x223740[_0x3c1436(0x232)]=0x0]=_0x3c1436(0x232),_0x223740[_0x223740[_0x3c1436(0x213)]=0x1]='Solved',_0x223740[_0x223740['UNRECOGNIZED']=-0x1]=_0x3c1436(0x216),_0x223740))(I||{}),v=(_0x49b65e=>(_0x49b65e[_0x49b65e[_0x3c1436(0x24e)]=0x0]='Unknown',_0x49b65e[_0x49b65e['Add']=0x1]=_0x3c1436(0x1e3),_0x49b65e[_0x49b65e['Reply']=0x2]=_0x3c1436(0x248),_0x49b65e[_0x49b65e[_0x3c1436(0x254)]=0x3]='Edit',_0x49b65e[_0x49b65e[_0x3c1436(0x219)]=0x4]=_0x3c1436(0x219),_0x49b65e[_0x49b65e[_0x3c1436(0x206)]=0x5]=_0x3c1436(0x206),_0x49b65e[_0x49b65e[_0x3c1436(0x216)]=-0x1]=_0x3c1436(0x216),_0x49b65e))(v||{});const f=_0x5d5ce6=>c[_0x3c1436(0x23c)](new Date(+_0x5d5ce6))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x4b64b4,_0x3d7924)=>{const _0x4a2fc1=_0x3c1436,_0x2a2f95=_0x4b64b4['get'](c[_0x4a2fc1(0x231)]),_0x282a56=_0x4b64b4[_0x4a2fc1(0x1f3)](P[_0x4a2fc1(0x1ec)]);_0x3d7924[_0x4a2fc1(0x23e)](_0x529dc7=>{const _0x3fe207=_0x4a2fc1;_0x2a2f95[_0x3fe207(0x236)](_0x529dc7)&&_0x3d7924['delete'](_0x529dc7);}),_0x3d7924[_0x4a2fc1(0x225)]&&(await _0x282a56[_0x4a2fc1(0x1f3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3d7924]}}))[_0x4a2fc1(0x20c)]['users'][_0x4a2fc1(0x23e)](_0x11772f=>{const _0xa7c16b=_0x4a2fc1;_0x11772f&&_0x2a2f95[_0xa7c16b(0x217)](_0x11772f);});};var $=Object[_0x3c1436(0x21a)],E=(_0xb0cf05,_0x195bc0,_0x3ff904,_0xe068af)=>{for(var _0x4167aa=_0xe068af>0x1?void 0x0:_0xe068af?$(_0x195bc0,_0x3ff904):_0x195bc0,_0x5e58f3=_0xb0cf05['length']-0x1,_0x454664;_0x5e58f3>=0x0;_0x5e58f3--)(_0x454664=_0xb0cf05[_0x5e58f3])&&(_0x4167aa=_0x454664(_0x4167aa)||_0x4167aa);return _0x4167aa;},S=(_0x4bba3b,_0x52c1ca)=>(_0x58cefe,_0x3312a6)=>_0x52c1ca(_0x58cefe,_0x3312a6,_0x4bba3b);let p=class extends c['Disposable']{constructor(_0x56e5b2,_0x487423,_0x5a1fd3,_0xf6de5a){const _0x2a1293=_0x3c1436;super(),this[_0x2a1293(0x23d)]=_0x56e5b2,this[_0x2a1293(0x1ee)]=_0x487423,this[_0x2a1293(0x252)]=_0x5a1fd3,this[_0x2a1293(0x24a)]=_0xf6de5a,this[_0x2a1293(0x1e5)](),this['_initUserSync']();}[_0x3c1436(0x215)](){const _0x5386ee=_0x3c1436;this['disposeWithMe'](this[_0x5386ee(0x1ee)]['commentUpdate$']['pipe'](w['bufferTime'](0x10))[_0x5386ee(0x226)](_0x4d4c5c=>{const _0x3d2096=_0x5386ee,_0x4477db=new Set();_0x4d4c5c[_0x3d2096(0x23e)](_0x91ce8c=>{const _0x4422bf=_0x3d2096;switch(_0x91ce8c[_0x4422bf(0x24f)]){case'add':{const _0x51f9d4=_0x91ce8c[_0x4422bf(0x1fb)][_0x4422bf(0x1fc)];_0x4477db[_0x4422bf(0x255)](_0x51f9d4);break;}}}),R(this['_injector'],_0x4477db);}));}[_0x3c1436(0x1e5)](){const _0x54f627=_0x3c1436;this[_0x54f627(0x20a)](this[_0x54f627(0x23d)][_0x54f627(0x1e2)][_0x54f627(0x226)](async _0x413ed6=>{const _0x6eaf88=_0x54f627;var _0x40f981,_0x428eb0,_0x8b0195,_0x321476;const _0x5b647a=(_0x40f981=this[_0x6eaf88(0x1ee)][_0x6eaf88(0x239)](_0x413ed6['unitId'])[_0x6eaf88(0x210)](_0x416944=>_0x416944[_0x6eaf88(0x1ea)]===_0x413ed6['threadId']))==null?void 0x0:_0x40f981['root'];if(!_0x5b647a)return;const {unitId:_0x4b605f,subUnitId:_0x1cb384}=_0x5b647a;switch(_0x413ed6[_0x6eaf88(0x1e4)]&&this[_0x6eaf88(0x252)][_0x6eaf88(0x217)](_0x413ed6['user']),_0x413ed6[_0x6eaf88(0x24f)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x4b605f,_0x1cb384,{'unitId':_0x4b605f,'subUnitId':_0x1cb384,'ref':'','id':_0x413ed6['replyId'],'dT':f(+_0x413ed6['createTimestamp']),'threadId':_0x413ed6[_0x6eaf88(0x1ea)],'personId':(_0x8b0195=(_0x428eb0=_0x413ed6['user'])==null?void 0x0:_0x428eb0[_0x6eaf88(0x25a)])!=null?_0x8b0195:_0x413ed6[_0x6eaf88(0x224)],'text':JSON[_0x6eaf88(0x1fe)](_0x413ed6[_0x6eaf88(0x1ff)]),'parentId':_0x5b647a['id']});break;}case v['Delete']:{const _0x3c8109=this[_0x6eaf88(0x1ee)][_0x6eaf88(0x200)](_0x4b605f,_0x1cb384,_0x413ed6[_0x6eaf88(0x211)]);_0x3c8109&&_0x3c8109[_0x6eaf88(0x1f4)]&&this['_threadCommentModel'][_0x6eaf88(0x22a)](_0x4b605f,_0x1cb384,_0x413ed6[_0x6eaf88(0x211)]);break;}case v[_0x6eaf88(0x254)]:{this['_threadCommentModel'][_0x6eaf88(0x205)](_0x4b605f,_0x1cb384,{'commentId':_0x413ed6[_0x6eaf88(0x211)],'text':JSON[_0x6eaf88(0x1fe)](_0x413ed6[_0x6eaf88(0x1ff)])});break;}case v[_0x6eaf88(0x206)]:{const _0x2d1c98=(_0x321476=this[_0x6eaf88(0x1ee)][_0x6eaf88(0x239)](_0x413ed6[_0x6eaf88(0x1fa)])[_0x6eaf88(0x210)](_0x5a9d4a=>_0x5a9d4a[_0x6eaf88(0x1ea)]===_0x413ed6['threadId']))==null?void 0x0:_0x321476[_0x6eaf88(0x209)];_0x2d1c98&&this[_0x6eaf88(0x1ee)][_0x6eaf88(0x249)](_0x4b605f,_0x1cb384,_0x2d1c98['id'],_0x413ed6[_0x6eaf88(0x203)]===I[_0x6eaf88(0x213)]);break;}}}));}};function _0xa18f(){const _0x16edca=['_threadCommentModel','toStringTag','UniverLicensePlugin','_httpService','796857sIvcEL','get','parentId','comments','94200TTNVGW','setConfig','Injector','_config','unitId','payload','personId','slice','parse','content','getComment','length','24FrrtNg','solved','UniverThreadCommentUIPlugin','updateComment','Solve','COMMENT','_initDataSource','root','disposeWithMe','UniverCollaborationClientPlugin','body','map','Inject','CustomRangeType','find','replyId','onReady','Solved','_threadCommentDataSourceService','_initUserSync','UNRECOGNIZED','addUser','UniverThreadCommentDataSourcePlugin','Delete','getOwnPropertyDescriptor','defineProperty','post','users','resolved','merge','Module','_sessionService','rangeId','1076042AxmOEH','userId','size','subscribe','requireSession','Disposable','getCurrentUser','deleteComment','error','36VzkNbK','comment','/universer-api/comment/unit/','DependentOn','replies','UserManagerService','OpenOrReOpen','onStarting','saveCommentToSnapshot','rangeType','getUser','/list','_threadCommentDataSource','getUnit','/add','/edit','dayjs','_commentService','forEach','IConfigService','listComments','dataSource','createTimestamp','UNIVER_UNKNOWN','UniverInstanceType','code','pluginName','8PsvbUr','Reply','resolveComment','_injector','thread-comment-data-source.config','stringify','filter','Unknown','type','ThreadCommentModel','1917970iNSIDV','_userService','9FtWGEH','Edit','add','2287962VxLDSP','_configService','format','syncUpdateMutationToColla','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','1150345vaGqql','addComment','commentUpdate$','Add','user','_init','/solved','19946NJmKfT','119MUWmDW','ref','threadId','IThreadCommentDataSourceService','HTTPService','getMemberID'];_0xa18f=function(){return _0x16edca;};return _0xa18f();}p=E([S(0x0,c[_0x3c1436(0x20e)](b['CommentService'])),S(0x1,c[_0x3c1436(0x20e)](M[_0x3c1436(0x250)])),S(0x2,c[_0x3c1436(0x20e)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x3c1436(0x1f8)]))],p);const q=_0x3c1436(0x24b),D={};var A=Object[_0x3c1436(0x21a)],x=(_0x2ddf58,_0x8f08cc,_0x522de4,_0x41c6dd)=>{const _0x237a5f=_0x3c1436;for(var _0x575839=_0x41c6dd>0x1?void 0x0:_0x41c6dd?A(_0x8f08cc,_0x522de4):_0x8f08cc,_0x201ab1=_0x2ddf58[_0x237a5f(0x201)]-0x1,_0x409b82;_0x201ab1>=0x0;_0x201ab1--)(_0x409b82=_0x2ddf58[_0x201ab1])&&(_0x575839=_0x409b82(_0x575839)||_0x575839);return _0x575839;},_=(_0x26bb66,_0x5e6497)=>(_0x237dd0,_0x3ac2aa)=>_0x5e6497(_0x237dd0,_0x3ac2aa,_0x26bb66);function Y(_0x6404d,_0x1e988f){const _0x33f3ee=_0x3c1436,_0x4825ae=_0x6404d[_0x33f3ee(0x230)][0x0];return{..._0x1e988f,'id':_0x4825ae[_0x33f3ee(0x211)],'resolved':_0x6404d[_0x33f3ee(0x203)]===0x1,'dT':f(_0x4825ae['createTimestamp']),'personId':_0x4825ae['userId'],'threadId':_0x4825ae[_0x33f3ee(0x1ea)]};}function G(_0x14ff88,_0x4d6892,_0x2e289f){const _0x264da0=_0x3c1436;var _0x2d3e80,_0x4ba217;if(((_0x4ba217=(_0x2d3e80=_0x14ff88==null?void 0x0:_0x14ff88['replies'])==null?void 0x0:_0x2d3e80['length'])!=null?_0x4ba217:0x0)>0x0){const _0x1f1f5f=(_0x58c842,_0x443c2c)=>({'id':_0x58c842[_0x264da0(0x211)],'threadId':_0x58c842[_0x264da0(0x1ea)],'dT':f(_0x58c842[_0x264da0(0x242)]),'personId':_0x58c842[_0x264da0(0x224)],'resolved':_0x14ff88['solved']===I['Solved'],'unitId':_0x4d6892,'subUnitId':_0x2e289f,'text':JSON['parse'](_0x58c842[_0x264da0(0x1ff)]),'parentId':_0x443c2c}),_0xa10d96=_0x1f1f5f(_0x14ff88[_0x264da0(0x230)][0x0]);return{..._0xa10d96,'children':_0x14ff88['replies'][_0x264da0(0x1fd)](0x1)['map'](_0xc03775=>_0x1f1f5f(_0xc03775,_0xa10d96['id']))};}return null;}let g=class{constructor(_0x1de36c,_0x2c49d3,_0x3027f4,_0x5deb8f){const _0x2b826f=_0x3c1436;this['_httpService']=_0x1de36c,this[_0x2b826f(0x252)]=_0x2c49d3,this[_0x2b826f(0x221)]=_0x3027f4,this['_injector']=_0x5deb8f;}async[_0x3c1436(0x1e1)](_0x1a3aee){const _0x2a65c0=_0x3c1436;var _0x284d1a,_0x3e6ac6;const {parentId:_0x1d8214,unitId:_0x1fd5df,text:_0x18a62e,threadId:_0x265e88}=_0x1a3aee,_0x2cd226=(_0x3e6ac6=(_0x284d1a=_0x18a62e['customRanges'])==null?void 0x0:_0x284d1a['filter'](_0x4f1926=>_0x4f1926['rangeType']===c['CustomRangeType'][_0x2a65c0(0x207)])[_0x2a65c0(0x20d)](_0x469cc2=>_0x469cc2[_0x2a65c0(0x222)]))!=null?_0x3e6ac6:[],_0x305d01=JSON[_0x2a65c0(0x24c)](_0x18a62e),_0x50f3bf=(await this['_sessionService'][_0x2a65c0(0x227)](_0x1fd5df))[_0x2a65c0(0x1ed)]();if(_0x1d8214){const _0x1fb28f={'memberId':_0x50f3bf,'unitId':_0x1fd5df,'content':_0x305d01,'mention':_0x2cd226,'threadId':_0x265e88},_0x35e0cb=(await this['_httpService']['post'](_0x2a65c0(0x22e)+_0x1fd5df+'/reply',{'body':_0x1fb28f}))[_0x2a65c0(0x20c)]['reply'];return{..._0x1a3aee,'id':_0x35e0cb[_0x2a65c0(0x211)],'dT':c['dayjs'](+_0x35e0cb[_0x2a65c0(0x242)])[_0x2a65c0(0x258)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x35e0cb[_0x2a65c0(0x224)]};}else{const _0x64ac33={'memberId':_0x50f3bf,'unitId':_0x1fd5df,'content':_0x305d01,'mention':_0x2cd226},_0x380f43=await this[_0x2a65c0(0x1f1)][_0x2a65c0(0x21c)]('/universer-api/comment/unit/'+_0x1fd5df+_0x2a65c0(0x23a),{'body':_0x64ac33});return Y(_0x380f43[_0x2a65c0(0x20c)][_0x2a65c0(0x22d)],_0x1a3aee);}}async['updateComment'](_0xe85771){const _0x5c14b2=_0x3c1436;var _0x673889,_0x3b490b;const {text:_0x2df14d,unitId:_0xd3c8df}=_0xe85771,_0x319e5b=(_0x3b490b=(_0x673889=_0x2df14d[_0x5c14b2(0x1df)])==null?void 0x0:_0x673889[_0x5c14b2(0x24d)](_0x4ae3de=>_0x4ae3de[_0x5c14b2(0x235)]===c[_0x5c14b2(0x20f)][_0x5c14b2(0x207)])[_0x5c14b2(0x20d)](_0x36585f=>_0x36585f[_0x5c14b2(0x222)]))!=null?_0x3b490b:[],_0xd75ca=JSON[_0x5c14b2(0x24c)](_0x2df14d),_0x541933=_0xe85771[_0x5c14b2(0x1ea)],_0x306cc2=_0xe85771['id'],_0x15596d={'memberId':(await this[_0x5c14b2(0x221)][_0x5c14b2(0x227)](_0xd3c8df))[_0x5c14b2(0x1ed)](),'unitId':_0xd3c8df,'threadId':_0x541933,'mention':_0x319e5b,'content':_0xd75ca,'replyId':_0x306cc2},_0x23741a=await this['_httpService'][_0x5c14b2(0x21c)](_0x5c14b2(0x22e)+_0xd3c8df+_0x5c14b2(0x23b),{'body':_0x15596d});return!_0x23741a[_0x5c14b2(0x20c)]['error']||_0x23741a['body'][_0x5c14b2(0x22b)][_0x5c14b2(0x245)]===0x1;}async['resolveComment'](_0x1b4588){const _0x39acde=_0x3c1436,{unitId:_0x4cc2bd}=_0x1b4588,_0x4aa91f=_0x1b4588[_0x39acde(0x1ea)],_0x438773={'memberId':this['_userService'][_0x39acde(0x229)]()['userID'],'unitId':_0x4cc2bd,'threadId':_0x4aa91f,'solved':_0x1b4588[_0x39acde(0x21e)]?I[_0x39acde(0x213)]:I[_0x39acde(0x232)]},_0x476b5a=await this[_0x39acde(0x1f1)]['post'](_0x39acde(0x22e)+_0x4cc2bd+_0x39acde(0x1e6),{'body':_0x438773});return!_0x476b5a['body'][_0x39acde(0x22b)]||_0x476b5a[_0x39acde(0x20c)][_0x39acde(0x22b)][_0x39acde(0x245)]===0x1;}async[_0x3c1436(0x22a)](_0x537308,_0x3ed2de,_0x1f6b29,_0xf9fed1){const _0x403352=_0x3c1436,_0x5496fa={'memberId':(await this['_sessionService'][_0x403352(0x227)](_0x537308))['getMemberID'](),'threadId':_0x1f6b29,'replyId':_0xf9fed1,'unitId':_0x537308},_0x5c28ec=await this['_httpService'][_0x403352(0x21c)](_0x403352(0x22e)+_0x537308+'/delete',{'body':_0x5496fa});return!_0x5c28ec[_0x403352(0x20c)][_0x403352(0x22b)]||_0x5c28ec[_0x403352(0x20c)][_0x403352(0x22b)][_0x403352(0x245)]===0x1;}async[_0x3c1436(0x240)](_0x34d8e4,_0x2a27ca,_0x204303){const _0x453e15=_0x3c1436,_0x553d76={'unitId':_0x34d8e4,'threadId':_0x204303},_0x2ac7f7=await this[_0x453e15(0x1f1)]['post'](_0x453e15(0x22e)+_0x34d8e4+_0x453e15(0x237),{'body':_0x553d76}),_0x5783a7=_0x204303[_0x453e15(0x20d)](_0x3ea054=>G(_0x2ac7f7[_0x453e15(0x20c)][_0x453e15(0x1f5)][_0x3ea054],_0x34d8e4,_0x2a27ca))[_0x453e15(0x24d)](Boolean);return Object['values'](_0x2ac7f7['body'][_0x453e15(0x21d)])[_0x453e15(0x23e)](_0x483212=>{const _0x396e02=_0x453e15;this[_0x396e02(0x252)][_0x396e02(0x217)](_0x483212);}),_0x5783a7;}[_0x3c1436(0x234)](_0xa7b093){const _0x390696=_0x3c1436;return{'id':_0xa7b093['id'],'threadId':_0xa7b093[_0x390696(0x1ea)],'ref':_0xa7b093[_0x390696(0x1e9)]};}};g=x([_(0x0,c[_0x3c1436(0x20e)](P[_0x3c1436(0x1ec)])),_(0x1,c[_0x3c1436(0x20e)](c['UserManagerService'])),_(0x2,c[_0x3c1436(0x20e)](b['CollaborationSessionService'])),_(0x3,c[_0x3c1436(0x20e)](c[_0x3c1436(0x1f8)]))],g);var H=Object[_0x3c1436(0x21a)],J=(_0x4c3da7,_0x4a533c,_0x1f40a3,_0x2172b1)=>{const _0x96ef67=_0x3c1436;for(var _0x2aa04f=_0x2172b1>0x1?void 0x0:_0x2172b1?H(_0x4a533c,_0x1f40a3):_0x4a533c,_0x342814=_0x4c3da7[_0x96ef67(0x201)]-0x1,_0x2456fb;_0x342814>=0x0;_0x342814--)(_0x2456fb=_0x4c3da7[_0x342814])&&(_0x2aa04f=_0x2456fb(_0x2aa04f)||_0x2aa04f);return _0x2aa04f;},y=(_0xb33d3e,_0x5eeab2)=>(_0x5932b4,_0x30d5dc)=>_0x5eeab2(_0x5932b4,_0x30d5dc,_0xb33d3e);let C=class extends c[_0x3c1436(0x228)]{constructor(_0x637574,_0x347b17){const _0x2ba611=_0x3c1436;super(),this['_threadCommentDataSourceService']=_0x637574,this[_0x2ba611(0x238)]=_0x347b17,this[_0x2ba611(0x208)]();}['_initDataSource'](){const _0x1b2311=_0x3c1436;this[_0x1b2311(0x214)][_0x1b2311(0x241)]=this[_0x1b2311(0x238)],this[_0x1b2311(0x214)][_0x1b2311(0x259)]=!0x1;}};C=J([y(0x0,M[_0x3c1436(0x1eb)]),y(0x1,c[_0x3c1436(0x20e)](g))],C);var F=Object[_0x3c1436(0x21b)],L=Object[_0x3c1436(0x21a)],Z=(_0x4654eb,_0x25fb45,_0x509946)=>_0x25fb45 in _0x4654eb?F(_0x4654eb,_0x25fb45,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x509946}):_0x4654eb[_0x25fb45]=_0x509946,W=(_0x3bce40,_0x2eeea5,_0x9f46a,_0x340084)=>{const _0x1613a3=_0x3c1436;for(var _0x5a64d0=_0x340084>0x1?void 0x0:_0x340084?L(_0x2eeea5,_0x9f46a):_0x2eeea5,_0x5dcbd4=_0x3bce40[_0x1613a3(0x201)]-0x1,_0x695073;_0x5dcbd4>=0x0;_0x5dcbd4--)(_0x695073=_0x3bce40[_0x5dcbd4])&&(_0x5a64d0=_0x695073(_0x5a64d0)||_0x5a64d0);return _0x5a64d0;},O=(_0x3ad2a1,_0x5347b3)=>(_0x270a09,_0x2c2620)=>_0x5347b3(_0x270a09,_0x2c2620,_0x3ad2a1),N=(_0x32f5d0,_0x1afca1,_0x144bef)=>Z(_0x32f5d0,typeof _0x1afca1!='symbol'?_0x1afca1+'':_0x1afca1,_0x144bef);function _0x4a91(_0x4f8899,_0x3ca2c0){const _0xa18f59=_0xa18f();return _0x4a91=function(_0x4a9149,_0xc25194){_0x4a9149=_0x4a9149-0x1df;let _0x39259e=_0xa18f59[_0x4a9149];return _0x39259e;},_0x4a91(_0x4f8899,_0x3ca2c0);}exports[_0x3c1436(0x218)]=class extends c['Plugin']{constructor(_0x3fc7c4=D,_0x500119,_0x4e83f0){const _0x411c9b=_0x3c1436;super(),this['_config']=_0x3fc7c4,this[_0x411c9b(0x24a)]=_0x500119,this['_configService']=_0x4e83f0;const {..._0x160955}=c[_0x411c9b(0x21f)]({},D,this[_0x411c9b(0x1f9)]);this[_0x411c9b(0x257)][_0x411c9b(0x1f7)](q,_0x160955);}[_0x3c1436(0x233)](){const _0x3ab631=_0x3c1436;[[g],[C],[p]][_0x3ab631(0x23e)](_0x3b5930=>{const _0x2cc0c9=_0x3ab631;this[_0x2cc0c9(0x24a)][_0x2cc0c9(0x255)](_0x3b5930);});}[_0x3c1436(0x212)](){const _0x436080=_0x3c1436;this['_injector'][_0x436080(0x1f3)](C),this['_injector'][_0x436080(0x1f3)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c1436(0x246),U),N(exports[_0x3c1436(0x218)],_0x3c1436(0x24f),c[_0x3c1436(0x244)][_0x3c1436(0x243)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3c1436(0x22f)](j[_0x3c1436(0x204)],b[_0x3c1436(0x20b)],T[_0x3c1436(0x1f0)]),O(0x1,c[_0x3c1436(0x20e)](c['Injector'])),O(0x2,c[_0x3c1436(0x23f)])],exports[_0x3c1436(0x218)]);
|
|
1
|
+
'use strict';const _0x3f12ff=_0x4010;(function(_0x354f79,_0x22d64f){const _0x30eab3=_0x4010,_0x3f1718=_0x354f79();while(!![]){try{const _0x2306b1=-parseInt(_0x30eab3(0x1ff))/0x1+parseInt(_0x30eab3(0x20b))/0x2+parseInt(_0x30eab3(0x1de))/0x3*(-parseInt(_0x30eab3(0x1c8))/0x4)+parseInt(_0x30eab3(0x202))/0x5+parseInt(_0x30eab3(0x214))/0x6+parseInt(_0x30eab3(0x22a))/0x7*(-parseInt(_0x30eab3(0x224))/0x8)+parseInt(_0x30eab3(0x1ee))/0x9;if(_0x2306b1===_0x22d64f)break;else _0x3f1718['push'](_0x3f1718['shift']());}catch(_0x1fd701){_0x3f1718['push'](_0x3f1718['shift']());}}}(_0x9afa,0xe5397));Object[_0x3f12ff(0x223)](exports,Symbol[_0x3f12ff(0x1c1)],{'value':_0x3f12ff(0x1f4)});function _0x9afa(){const _0x3635ff=['subscribe','parentId','_threadCommentDataSource','createTimestamp','IConfigService','pluginName','getMemberID','error','values','488682YFTeAt','dayjs','commentUpdate$','stringify','syncUpdateMutationToColla','user','Module','length','_sessionService','/universer-api/comment/unit/','UNIVER_UNKNOWN','userID','COMMENT','UserManagerService','unitId','IThreadCommentDataSourceService','getCurrentUser','899079iDatFV','Plugin','_userService','3611205YfkfKH','_injector','body','Injector','Unknown','format','getUnit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','1258100SYHXSj','/reply','/universer-api/user/list','rangeType','comment','_init','size','forEach','YYYY/MM/DD\x20HH:mm','6790242MmWenc','UniverThreadCommentUIPlugin','Add','Inject','merge','_threadCommentDataSourceService','parse','comments','HTTPService','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','find','addUser','code','customRanges','defineProperty','9608tqqhIQ','Solved','/list','post','UNRECOGNIZED','replies','1043RAUeFJ','getUser','filter','UniverLicensePlugin','Solve','disposeWithMe','setConfig','onStarting','_config','_configService','map','Delete','CustomRangeType','Reply','userId','ThreadCommentModel','replyId','toStringTag','requireSession','pipe','reply','deleteComment','CommentService','/edit','18420eOZNGa','_initUserSync','/add','_httpService','symbol','_commentService','users','Edit','UniverInstanceType','/delete','add','resolveComment','Disposable','updateComment','getOwnPropertyDescriptor','slice','thread-comment-data-source.config','payload','type','threadId','_threadCommentModel','content','339hsNJtz','ref','getComment','personId','OpenOrReOpen','bufferTime','get'];_0x9afa=function(){return _0x3635ff;};return _0x9afa();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x3f12ff(0x209);var I=(_0x55eeba=>(_0x55eeba[_0x55eeba[_0x3f12ff(0x1e2)]=0x0]=_0x3f12ff(0x1e2),_0x55eeba[_0x55eeba['Solved']=0x1]=_0x3f12ff(0x225),_0x55eeba[_0x55eeba[_0x3f12ff(0x228)]=-0x1]=_0x3f12ff(0x228),_0x55eeba))(I||{}),v=(_0xb11008=>(_0xb11008[_0xb11008['Unknown']=0x0]=_0x3f12ff(0x206),_0xb11008[_0xb11008[_0x3f12ff(0x216)]=0x1]='Add',_0xb11008[_0xb11008[_0x3f12ff(0x1bd)]=0x2]=_0x3f12ff(0x1bd),_0xb11008[_0xb11008[_0x3f12ff(0x1cf)]=0x3]=_0x3f12ff(0x1cf),_0xb11008[_0xb11008[_0x3f12ff(0x235)]=0x4]=_0x3f12ff(0x235),_0xb11008[_0xb11008[_0x3f12ff(0x22e)]=0x5]='Solve',_0xb11008[_0xb11008['UNRECOGNIZED']=-0x1]=_0x3f12ff(0x228),_0xb11008))(v||{});const f=_0x484f94=>c[_0x3f12ff(0x1ef)](new Date(+_0x484f94))['format'](_0x3f12ff(0x213)),R=async(_0x3774bd,_0x36b32a)=>{const _0x58e353=_0x3f12ff,_0x12d8ff=_0x3774bd[_0x58e353(0x1e4)](c[_0x58e353(0x1fb)]),_0x47967b=_0x3774bd[_0x58e353(0x1e4)](P[_0x58e353(0x21c)]);_0x36b32a[_0x58e353(0x212)](_0x3a12a0=>{const _0x201bb8=_0x58e353;_0x12d8ff[_0x201bb8(0x22b)](_0x3a12a0)&&_0x36b32a['delete'](_0x3a12a0);}),_0x36b32a[_0x58e353(0x211)]&&(await _0x47967b['get'](_0x58e353(0x20d),{'params':{'userIDs':[..._0x36b32a]}}))[_0x58e353(0x204)][_0x58e353(0x1ce)][_0x58e353(0x212)](_0x37f7ae=>{_0x37f7ae&&_0x12d8ff['addUser'](_0x37f7ae);});};var $=Object[_0x3f12ff(0x1d6)],E=(_0x49a5b8,_0xf89ff1,_0x9b07e7,_0x1d927f)=>{for(var _0x256040=_0x1d927f>0x1?void 0x0:_0x1d927f?$(_0xf89ff1,_0x9b07e7):_0xf89ff1,_0x234ae5=_0x49a5b8['length']-0x1,_0x2f4ddf;_0x234ae5>=0x0;_0x234ae5--)(_0x2f4ddf=_0x49a5b8[_0x234ae5])&&(_0x256040=_0x2f4ddf(_0x256040)||_0x256040);return _0x256040;},S=(_0x37cefa,_0x46fc52)=>(_0x12d601,_0x5a147f)=>_0x46fc52(_0x12d601,_0x5a147f,_0x37cefa);let p=class extends c['Disposable']{constructor(_0x255c37,_0x1c8afb,_0x4caa63,_0x422453){const _0x4601c2=_0x3f12ff;super(),this[_0x4601c2(0x1cd)]=_0x255c37,this[_0x4601c2(0x1dc)]=_0x1c8afb,this[_0x4601c2(0x201)]=_0x4caa63,this['_injector']=_0x422453,this[_0x4601c2(0x210)](),this['_initUserSync']();}[_0x3f12ff(0x1c9)](){const _0x103be0=_0x3f12ff;this[_0x103be0(0x22f)](this[_0x103be0(0x1dc)][_0x103be0(0x1f0)][_0x103be0(0x1c3)](w[_0x103be0(0x1e3)](0x10))[_0x103be0(0x1e5)](_0xa3663a=>{const _0x362fde=_0x103be0,_0x12629b=new Set();_0xa3663a['forEach'](_0x5e62a1=>{const _0x5f9c55=_0x4010;switch(_0x5e62a1[_0x5f9c55(0x1da)]){case _0x5f9c55(0x1d2):{const _0x386fa3=_0x5e62a1[_0x5f9c55(0x1d9)][_0x5f9c55(0x1e1)];_0x12629b[_0x5f9c55(0x1d2)](_0x386fa3);break;}}}),R(this[_0x362fde(0x203)],_0x12629b);}));}['_init'](){const _0x501f11=_0x3f12ff;this[_0x501f11(0x22f)](this[_0x501f11(0x1cd)][_0x501f11(0x1f0)][_0x501f11(0x1e5)](async _0xcb9ce8=>{const _0x212146=_0x501f11;var _0x3d8c0b,_0x4d1f25,_0x11d8a8,_0x37b94d;const _0x1ff6a7=(_0x3d8c0b=this[_0x212146(0x1dc)][_0x212146(0x208)](_0xcb9ce8[_0x212146(0x1fc)])['find'](_0x40e652=>_0x40e652[_0x212146(0x1db)]===_0xcb9ce8[_0x212146(0x1db)]))==null?void 0x0:_0x3d8c0b['root'];if(!_0x1ff6a7)return;const {unitId:_0x5c31e7,subUnitId:_0x4bd4ec}=_0x1ff6a7;switch(_0xcb9ce8[_0x212146(0x1f3)]&&this[_0x212146(0x201)]['addUser'](_0xcb9ce8[_0x212146(0x1f3)]),_0xcb9ce8[_0x212146(0x1da)]){case v[_0x212146(0x216)]:break;case v[_0x212146(0x1bd)]:{this[_0x212146(0x1dc)]['addComment'](_0x5c31e7,_0x4bd4ec,{'unitId':_0x5c31e7,'subUnitId':_0x4bd4ec,'ref':'','id':_0xcb9ce8[_0x212146(0x1c0)],'dT':f(+_0xcb9ce8[_0x212146(0x1e8)]),'threadId':_0xcb9ce8[_0x212146(0x1db)],'personId':(_0x11d8a8=(_0x4d1f25=_0xcb9ce8[_0x212146(0x1f3)])==null?void 0x0:_0x4d1f25[_0x212146(0x1f9)])!=null?_0x11d8a8:_0xcb9ce8[_0x212146(0x1be)],'text':JSON[_0x212146(0x21a)](_0xcb9ce8[_0x212146(0x1dd)]),'parentId':_0x1ff6a7['id']});break;}case v['Delete']:{const _0x8ed531=this[_0x212146(0x1dc)][_0x212146(0x1e0)](_0x5c31e7,_0x4bd4ec,_0xcb9ce8[_0x212146(0x1c0)]);_0x8ed531&&_0x8ed531[_0x212146(0x1e6)]&&this[_0x212146(0x1dc)][_0x212146(0x1c5)](_0x5c31e7,_0x4bd4ec,_0xcb9ce8[_0x212146(0x1c0)]);break;}case v[_0x212146(0x1cf)]:{this['_threadCommentModel'][_0x212146(0x1d5)](_0x5c31e7,_0x4bd4ec,{'commentId':_0xcb9ce8[_0x212146(0x1c0)],'text':JSON['parse'](_0xcb9ce8[_0x212146(0x1dd)])});break;}case v[_0x212146(0x22e)]:{const _0xbc4e47=(_0x37b94d=this[_0x212146(0x1dc)][_0x212146(0x208)](_0xcb9ce8[_0x212146(0x1fc)])[_0x212146(0x21f)](_0x5216e6=>_0x5216e6[_0x212146(0x1db)]===_0xcb9ce8[_0x212146(0x1db)]))==null?void 0x0:_0x37b94d['root'];_0xbc4e47&&this['_threadCommentModel'][_0x212146(0x1d3)](_0x5c31e7,_0x4bd4ec,_0xbc4e47['id'],_0xcb9ce8['solved']===I[_0x212146(0x225)]);break;}}}));}};p=E([S(0x0,c[_0x3f12ff(0x217)](b[_0x3f12ff(0x1c6)])),S(0x1,c[_0x3f12ff(0x217)](M[_0x3f12ff(0x1bf)])),S(0x2,c[_0x3f12ff(0x217)](c[_0x3f12ff(0x1fb)])),S(0x3,c[_0x3f12ff(0x217)](c['Injector']))],p);const q=_0x3f12ff(0x1d8),D={};var A=Object[_0x3f12ff(0x1d6)],x=(_0xcd3d84,_0x3cb3d7,_0x231dea,_0x112247)=>{const _0x1e93b1=_0x3f12ff;for(var _0x187e80=_0x112247>0x1?void 0x0:_0x112247?A(_0x3cb3d7,_0x231dea):_0x3cb3d7,_0x213f40=_0xcd3d84[_0x1e93b1(0x1f5)]-0x1,_0x226be9;_0x213f40>=0x0;_0x213f40--)(_0x226be9=_0xcd3d84[_0x213f40])&&(_0x187e80=_0x226be9(_0x187e80)||_0x187e80);return _0x187e80;},_=(_0x213bb0,_0x11c92b)=>(_0x149385,_0x3be764)=>_0x11c92b(_0x149385,_0x3be764,_0x213bb0);function Y(_0x43740e,_0x3e9205){const _0x2c74d1=_0x3f12ff,_0x1c2b44=_0x43740e['replies'][0x0];return{..._0x3e9205,'id':_0x1c2b44[_0x2c74d1(0x1c0)],'resolved':_0x43740e['solved']===0x1,'dT':f(_0x1c2b44[_0x2c74d1(0x1e8)]),'personId':_0x1c2b44[_0x2c74d1(0x1be)],'threadId':_0x1c2b44[_0x2c74d1(0x1db)]};}function G(_0x548557,_0x2644a,_0x457502){const _0x37b6b5=_0x3f12ff;var _0x4d22d7,_0x2a0b2e;if(((_0x2a0b2e=(_0x4d22d7=_0x548557==null?void 0x0:_0x548557[_0x37b6b5(0x229)])==null?void 0x0:_0x4d22d7[_0x37b6b5(0x1f5)])!=null?_0x2a0b2e:0x0)>0x0){const _0x1053f8=(_0x121167,_0xd1cabb)=>({'id':_0x121167['replyId'],'threadId':_0x121167[_0x37b6b5(0x1db)],'dT':f(_0x121167[_0x37b6b5(0x1e8)]),'personId':_0x121167[_0x37b6b5(0x1be)],'resolved':_0x548557['solved']===I[_0x37b6b5(0x225)],'unitId':_0x2644a,'subUnitId':_0x457502,'text':JSON['parse'](_0x121167[_0x37b6b5(0x1dd)]),'parentId':_0xd1cabb}),_0x441c8e=_0x1053f8(_0x548557[_0x37b6b5(0x229)][0x0]);return{..._0x441c8e,'children':_0x548557[_0x37b6b5(0x229)][_0x37b6b5(0x1d7)](0x1)['map'](_0x5bf0ab=>_0x1053f8(_0x5bf0ab,_0x441c8e['id']))};}return null;}let g=class{constructor(_0xe4cea4,_0x4ac633,_0x1c7b94,_0x3a8590){const _0x1d0198=_0x3f12ff;this[_0x1d0198(0x1cb)]=_0xe4cea4,this[_0x1d0198(0x201)]=_0x4ac633,this['_sessionService']=_0x1c7b94,this['_injector']=_0x3a8590;}async['addComment'](_0x5031ca){const _0x369a27=_0x3f12ff;var _0xaf45f8,_0xf2b5a8;const {parentId:_0x3d9b5b,unitId:_0x17ab9d,text:_0x1798a4,threadId:_0x53bfa6}=_0x5031ca,_0x54291a=(_0xf2b5a8=(_0xaf45f8=_0x1798a4[_0x369a27(0x222)])==null?void 0x0:_0xaf45f8[_0x369a27(0x22c)](_0x5ec90b=>_0x5ec90b[_0x369a27(0x20e)]===c[_0x369a27(0x236)][_0x369a27(0x1fa)])['map'](_0x5e01b2=>_0x5e01b2['rangeId']))!=null?_0xf2b5a8:[],_0x4986fb=JSON[_0x369a27(0x1f1)](_0x1798a4),_0x1444b8=(await this[_0x369a27(0x1f6)][_0x369a27(0x1c2)](_0x17ab9d))[_0x369a27(0x1eb)]();if(_0x3d9b5b){const _0x65cc37={'memberId':_0x1444b8,'unitId':_0x17ab9d,'content':_0x4986fb,'mention':_0x54291a,'threadId':_0x53bfa6},_0x373598=(await this[_0x369a27(0x1cb)][_0x369a27(0x227)](_0x369a27(0x1f7)+_0x17ab9d+_0x369a27(0x20c),{'body':_0x65cc37}))[_0x369a27(0x204)][_0x369a27(0x1c4)];return{..._0x5031ca,'id':_0x373598[_0x369a27(0x1c0)],'dT':c[_0x369a27(0x1ef)](+_0x373598[_0x369a27(0x1e8)])[_0x369a27(0x207)](_0x369a27(0x213)),'personId':_0x373598[_0x369a27(0x1be)]};}else{const _0x4e8468={'memberId':_0x1444b8,'unitId':_0x17ab9d,'content':_0x4986fb,'mention':_0x54291a},_0x389204=await this['_httpService']['post'](_0x369a27(0x1f7)+_0x17ab9d+_0x369a27(0x1ca),{'body':_0x4e8468});return Y(_0x389204[_0x369a27(0x204)][_0x369a27(0x20f)],_0x5031ca);}}async[_0x3f12ff(0x1d5)](_0x29e21a){const _0x294b68=_0x3f12ff;var _0x3e0685,_0x2427e6;const {text:_0x27adec,unitId:_0x23ab8b}=_0x29e21a,_0x3dd34a=(_0x2427e6=(_0x3e0685=_0x27adec[_0x294b68(0x222)])==null?void 0x0:_0x3e0685['filter'](_0x3e7dab=>_0x3e7dab[_0x294b68(0x20e)]===c[_0x294b68(0x236)]['COMMENT'])[_0x294b68(0x234)](_0x367755=>_0x367755['rangeId']))!=null?_0x2427e6:[],_0x9834e4=JSON[_0x294b68(0x1f1)](_0x27adec),_0x44a7f7=_0x29e21a[_0x294b68(0x1db)],_0x297648=_0x29e21a['id'],_0x52fc1d={'memberId':(await this[_0x294b68(0x1f6)][_0x294b68(0x1c2)](_0x23ab8b))[_0x294b68(0x1eb)](),'unitId':_0x23ab8b,'threadId':_0x44a7f7,'mention':_0x3dd34a,'content':_0x9834e4,'replyId':_0x297648},_0x55052c=await this[_0x294b68(0x1cb)][_0x294b68(0x227)](_0x294b68(0x1f7)+_0x23ab8b+_0x294b68(0x1c7),{'body':_0x52fc1d});return!_0x55052c['body'][_0x294b68(0x1ec)]||_0x55052c[_0x294b68(0x204)][_0x294b68(0x1ec)]['code']===0x1;}async[_0x3f12ff(0x1d3)](_0x5281ea){const _0x52365a=_0x3f12ff,{unitId:_0x45f9b2}=_0x5281ea,_0x27ae7c=_0x5281ea['threadId'],_0x4d3c29={'memberId':this['_userService'][_0x52365a(0x1fe)]()['userID'],'unitId':_0x45f9b2,'threadId':_0x27ae7c,'solved':_0x5281ea['resolved']?I[_0x52365a(0x225)]:I[_0x52365a(0x1e2)]},_0x4741ce=await this[_0x52365a(0x1cb)]['post']('/universer-api/comment/unit/'+_0x45f9b2+'/solved',{'body':_0x4d3c29});return!_0x4741ce['body'][_0x52365a(0x1ec)]||_0x4741ce[_0x52365a(0x204)][_0x52365a(0x1ec)][_0x52365a(0x221)]===0x1;}async[_0x3f12ff(0x1c5)](_0x255463,_0x468ab2,_0x3f32b4,_0x4baf63){const _0x525c4e=_0x3f12ff,_0x31eb27={'memberId':(await this['_sessionService'][_0x525c4e(0x1c2)](_0x255463))[_0x525c4e(0x1eb)](),'threadId':_0x3f32b4,'replyId':_0x4baf63,'unitId':_0x255463},_0x5c4985=await this[_0x525c4e(0x1cb)][_0x525c4e(0x227)](_0x525c4e(0x1f7)+_0x255463+_0x525c4e(0x1d1),{'body':_0x31eb27});return!_0x5c4985[_0x525c4e(0x204)][_0x525c4e(0x1ec)]||_0x5c4985['body'][_0x525c4e(0x1ec)]['code']===0x1;}async['listComments'](_0x154b0b,_0x4a813c,_0x91eb87){const _0x104a36=_0x3f12ff,_0x51b3d8={'unitId':_0x154b0b,'threadId':_0x91eb87},_0x5606a1=await this[_0x104a36(0x1cb)]['post'](_0x104a36(0x1f7)+_0x154b0b+_0x104a36(0x226),{'body':_0x51b3d8}),_0x2302ee=_0x91eb87['map'](_0x1979e1=>G(_0x5606a1['body'][_0x104a36(0x21b)][_0x1979e1],_0x154b0b,_0x4a813c))['filter'](Boolean);return Object[_0x104a36(0x1ed)](_0x5606a1[_0x104a36(0x204)]['users'])[_0x104a36(0x212)](_0x29bc69=>{const _0x362776=_0x104a36;this[_0x362776(0x201)][_0x362776(0x220)](_0x29bc69);}),_0x2302ee;}[_0x3f12ff(0x21e)](_0x274342){const _0x15840e=_0x3f12ff;return{'id':_0x274342['id'],'threadId':_0x274342[_0x15840e(0x1db)],'ref':_0x274342[_0x15840e(0x1df)]};}};g=x([_(0x0,c[_0x3f12ff(0x217)](P['HTTPService'])),_(0x1,c[_0x3f12ff(0x217)](c[_0x3f12ff(0x1fb)])),_(0x2,c[_0x3f12ff(0x217)](b['CollaborationSessionService'])),_(0x3,c[_0x3f12ff(0x217)](c[_0x3f12ff(0x205)]))],g);function _0x4010(_0x3c4449,_0x2fc0dc){const _0x9afa75=_0x9afa();return _0x4010=function(_0x401035,_0x25637c){_0x401035=_0x401035-0x1bd;let _0x43929b=_0x9afa75[_0x401035];return _0x43929b;},_0x4010(_0x3c4449,_0x2fc0dc);}var H=Object[_0x3f12ff(0x1d6)],J=(_0x242fbc,_0x1aa9f0,_0x291b27,_0x4a5756)=>{const _0x22e59f=_0x3f12ff;for(var _0x9e0676=_0x4a5756>0x1?void 0x0:_0x4a5756?H(_0x1aa9f0,_0x291b27):_0x1aa9f0,_0x57c5ed=_0x242fbc[_0x22e59f(0x1f5)]-0x1,_0x40630a;_0x57c5ed>=0x0;_0x57c5ed--)(_0x40630a=_0x242fbc[_0x57c5ed])&&(_0x9e0676=_0x40630a(_0x9e0676)||_0x9e0676);return _0x9e0676;},y=(_0x44b91f,_0x214373)=>(_0x410914,_0x41c818)=>_0x214373(_0x410914,_0x41c818,_0x44b91f);let C=class extends c[_0x3f12ff(0x1d4)]{constructor(_0x6f9c41,_0x2d9708){const _0x1c45d0=_0x3f12ff;super(),this[_0x1c45d0(0x219)]=_0x6f9c41,this[_0x1c45d0(0x1e7)]=_0x2d9708,this[_0x1c45d0(0x20a)]();}[_0x3f12ff(0x20a)](){const _0x1b16b0=_0x3f12ff;this[_0x1b16b0(0x219)]['dataSource']=this[_0x1b16b0(0x1e7)],this['_threadCommentDataSourceService'][_0x1b16b0(0x1f2)]=!0x1;}};C=J([y(0x0,M[_0x3f12ff(0x1fd)]),y(0x1,c[_0x3f12ff(0x217)](g))],C);var F=Object['defineProperty'],L=Object[_0x3f12ff(0x1d6)],Z=(_0x86d4a3,_0x56cdc9,_0x5aa755)=>_0x56cdc9 in _0x86d4a3?F(_0x86d4a3,_0x56cdc9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aa755}):_0x86d4a3[_0x56cdc9]=_0x5aa755,W=(_0x27d69d,_0x4b0eda,_0x5b0beb,_0x17dd9d)=>{const _0x564611=_0x3f12ff;for(var _0x584c38=_0x17dd9d>0x1?void 0x0:_0x17dd9d?L(_0x4b0eda,_0x5b0beb):_0x4b0eda,_0x3d9cab=_0x27d69d[_0x564611(0x1f5)]-0x1,_0x4100ca;_0x3d9cab>=0x0;_0x3d9cab--)(_0x4100ca=_0x27d69d[_0x3d9cab])&&(_0x584c38=_0x4100ca(_0x584c38)||_0x584c38);return _0x584c38;},O=(_0x2243d0,_0x2a1751)=>(_0x19ffea,_0xa95e6a)=>_0x2a1751(_0x19ffea,_0xa95e6a,_0x2243d0),N=(_0x175ca9,_0x35995c,_0x3578f6)=>Z(_0x175ca9,typeof _0x35995c!=_0x3f12ff(0x1cc)?_0x35995c+'':_0x35995c,_0x3578f6);exports[_0x3f12ff(0x21d)]=class extends c[_0x3f12ff(0x200)]{constructor(_0x57dc8c=D,_0x5596fc,_0x21c1d2){const _0x6e6ba0=_0x3f12ff;super(),this['_config']=_0x57dc8c,this[_0x6e6ba0(0x203)]=_0x5596fc,this[_0x6e6ba0(0x233)]=_0x21c1d2;const {..._0xf2ea86}=c[_0x6e6ba0(0x218)]({},D,this[_0x6e6ba0(0x232)]);this['_configService'][_0x6e6ba0(0x230)](q,_0xf2ea86);}[_0x3f12ff(0x231)](){const _0x969329=_0x3f12ff;[[g],[C],[p]][_0x969329(0x212)](_0xadccb2=>{const _0x5e505a=_0x969329;this['_injector'][_0x5e505a(0x1d2)](_0xadccb2);});}['onReady'](){const _0xe84286=_0x3f12ff;this[_0xe84286(0x203)][_0xe84286(0x1e4)](C),this['_injector'][_0xe84286(0x1e4)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3f12ff(0x1ea),U),N(exports[_0x3f12ff(0x21d)],_0x3f12ff(0x1da),c[_0x3f12ff(0x1d0)][_0x3f12ff(0x1f8)]),exports[_0x3f12ff(0x21d)]=W([c['DependentOn'](j[_0x3f12ff(0x215)],b['UniverCollaborationClientPlugin'],T[_0x3f12ff(0x22d)]),O(0x1,c['Inject'](c[_0x3f12ff(0x205)])),O(0x2,c[_0x3f12ff(0x1e9)])],exports[_0x3f12ff(0x21d)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x112b04=_0x5e66;(function(_0x229a7e,_0x4a0c5c){const _0xccb305=_0x5e66,_0x432426=_0x229a7e();while(!![]){try{const _0x4c2db0=parseInt(_0xccb305(0x1f2))/0x1+parseInt(_0xccb305(0x200))/0x2*(parseInt(_0xccb305(0x1fa))/0x3)+-parseInt(_0xccb305(0x21d))/0x4*(parseInt(_0xccb305(0x21b))/0x5)+parseInt(_0xccb305(0x209))/0x6+parseInt(_0xccb305(0x234))/0x7*(parseInt(_0xccb305(0x23d))/0x8)+parseInt(_0xccb305(0x205))/0x9+-parseInt(_0xccb305(0x1e4))/0xa;if(_0x4c2db0===_0x4a0c5c)break;else _0x432426['push'](_0x432426['shift']());}catch(_0x2b451d){_0x432426['push'](_0x432426['shift']());}}}(_0x116d,0x7011c));import{CommentService as _0x167d25,CollaborationSessionService as _0x1fd72c,UniverCollaborationClientPlugin as _0x27eaf3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x923530}from'@univerjs-pro/license';import{dayjs as _0xace482,UserManagerService as _0x7fb191,Inject as _0x14bcb9,Injector as _0x568f8f,Disposable as _0x910a31,CustomRangeType as _0x2c6631,UniverInstanceType as _0x3be5a5,DependentOn as _0x1d015c,IConfigService as _0x2f6a76,Plugin as _0x4040ad,merge as _0x464ec7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4024f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9dde70,IThreadCommentDataSourceService as _0x250605}from'@univerjs/thread-comment';import{bufferTime as _0x5436f1}from'rxjs';import{HTTPService as _0xe94ad1}from'@univerjs/network';function _0x5e66(_0x16ffab,_0x3632d3){const _0x116d84=_0x116d();return _0x5e66=function(_0x5e6685,_0x281888){_0x5e6685=_0x5e6685-0x1dd;let _0x56b3e0=_0x116d84[_0x5e6685];return _0x56b3e0;},_0x5e66(_0x16ffab,_0x3632d3);}const W=_0x112b04(0x1e3);var I=(_0x51aeaa=>(_0x51aeaa[_0x51aeaa[_0x112b04(0x1f0)]=0x0]=_0x112b04(0x1f0),_0x51aeaa[_0x51aeaa[_0x112b04(0x239)]=0x1]=_0x112b04(0x239),_0x51aeaa[_0x51aeaa[_0x112b04(0x21e)]=-0x1]=_0x112b04(0x21e),_0x51aeaa))(I||{}),v=(_0x492e30=>(_0x492e30[_0x492e30['Unknown']=0x0]=_0x112b04(0x230),_0x492e30[_0x492e30[_0x112b04(0x237)]=0x1]=_0x112b04(0x237),_0x492e30[_0x492e30[_0x112b04(0x221)]=0x2]='Reply',_0x492e30[_0x492e30[_0x112b04(0x21c)]=0x3]=_0x112b04(0x21c),_0x492e30[_0x492e30[_0x112b04(0x214)]=0x4]=_0x112b04(0x214),_0x492e30[_0x492e30['Solve']=0x5]=_0x112b04(0x23c),_0x492e30[_0x492e30[_0x112b04(0x21e)]=-0x1]=_0x112b04(0x21e),_0x492e30))(v||{});const D=_0x519300=>_0xace482(new Date(+_0x519300))['format'](_0x112b04(0x21a)),B=async(_0x2fc1df,_0x2109ac)=>{const _0x4b9197=_0x112b04,_0xe12edf=_0x2fc1df['get'](_0x7fb191),_0x217c28=_0x2fc1df['get'](_0xe94ad1);_0x2109ac[_0x4b9197(0x20e)](_0xbad0bb=>{const _0xbc88b3=_0x4b9197;_0xe12edf[_0xbc88b3(0x241)](_0xbad0bb)&&_0x2109ac[_0xbc88b3(0x23e)](_0xbad0bb);}),_0x2109ac[_0x4b9197(0x228)]&&(await _0x217c28[_0x4b9197(0x1f7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2109ac]}}))[_0x4b9197(0x1ec)][_0x4b9197(0x23a)][_0x4b9197(0x20e)](_0x225c6c=>{const _0xad295e=_0x4b9197;_0x225c6c&&_0xe12edf[_0xad295e(0x1e6)](_0x225c6c);});};var K=Object[_0x112b04(0x238)],V=(_0x21833c,_0x14d4bc,_0x45faed,_0x1ac882)=>{const _0xe21fd1=_0x112b04;for(var _0x46a33a=_0x1ac882>0x1?void 0x0:_0x1ac882?K(_0x14d4bc,_0x45faed):_0x14d4bc,_0x48c8ba=_0x21833c[_0xe21fd1(0x1e8)]-0x1,_0x237017;_0x48c8ba>=0x0;_0x48c8ba--)(_0x237017=_0x21833c[_0x48c8ba])&&(_0x46a33a=_0x237017(_0x46a33a)||_0x46a33a);return _0x46a33a;},p=(_0x4a4b70,_0x2cb541)=>(_0x457e6e,_0x4378f6)=>_0x2cb541(_0x457e6e,_0x4378f6,_0x4a4b70);let S=class extends _0x910a31{constructor(_0x38742e,_0x3786b0,_0x4c2699,_0x32adac){const _0x25e331=_0x112b04;super(),this[_0x25e331(0x1df)]=_0x38742e,this[_0x25e331(0x210)]=_0x3786b0,this['_userService']=_0x4c2699,this[_0x25e331(0x224)]=_0x32adac,this[_0x25e331(0x220)](),this[_0x25e331(0x20c)]();}[_0x112b04(0x20c)](){const _0x2a74fa=_0x112b04;this['disposeWithMe'](this[_0x2a74fa(0x210)][_0x2a74fa(0x20d)][_0x2a74fa(0x1e5)](_0x5436f1(0x10))[_0x2a74fa(0x20a)](_0x54bb43=>{const _0xece682=_0x2a74fa,_0x1cc9d4=new Set();_0x54bb43[_0xece682(0x20e)](_0x4a20aa=>{const _0x4eddb8=_0xece682;switch(_0x4a20aa[_0x4eddb8(0x233)]){case _0x4eddb8(0x23b):{const _0x411869=_0x4a20aa[_0x4eddb8(0x215)][_0x4eddb8(0x202)];_0x1cc9d4[_0x4eddb8(0x23b)](_0x411869);break;}}}),B(this[_0xece682(0x224)],_0x1cc9d4);}));}[_0x112b04(0x220)](){const _0x20fccc=_0x112b04;this[_0x20fccc(0x1ff)](this['_commentService']['commentUpdate$'][_0x20fccc(0x20a)](async _0x123972=>{const _0x1ac630=_0x20fccc;var _0x4844e3,_0x310692,_0xb589b9,_0x3fd66d;const _0x219766=(_0x4844e3=this[_0x1ac630(0x210)][_0x1ac630(0x240)](_0x123972['unitId'])['find'](_0x233c7f=>_0x233c7f['threadId']===_0x123972[_0x1ac630(0x1f6)]))==null?void 0x0:_0x4844e3[_0x1ac630(0x225)];if(!_0x219766)return;const {unitId:_0x351907,subUnitId:_0x1880b8}=_0x219766;switch(_0x123972[_0x1ac630(0x1f1)]&&this[_0x1ac630(0x20b)][_0x1ac630(0x1e6)](_0x123972[_0x1ac630(0x1f1)]),_0x123972['type']){case v[_0x1ac630(0x237)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x351907,_0x1880b8,{'unitId':_0x351907,'subUnitId':_0x1880b8,'ref':'','id':_0x123972[_0x1ac630(0x1de)],'dT':D(+_0x123972['createTimestamp']),'threadId':_0x123972[_0x1ac630(0x1f6)],'personId':(_0xb589b9=(_0x310692=_0x123972[_0x1ac630(0x1f1)])==null?void 0x0:_0x310692[_0x1ac630(0x22e)])!=null?_0xb589b9:_0x123972[_0x1ac630(0x1fb)],'text':JSON[_0x1ac630(0x22d)](_0x123972[_0x1ac630(0x207)]),'parentId':_0x219766['id']});break;}case v[_0x1ac630(0x214)]:{const _0x404b9b=this['_threadCommentModel']['getComment'](_0x351907,_0x1880b8,_0x123972[_0x1ac630(0x1de)]);_0x404b9b&&_0x404b9b['parentId']&&this[_0x1ac630(0x210)][_0x1ac630(0x223)](_0x351907,_0x1880b8,_0x123972['replyId']);break;}case v[_0x1ac630(0x21c)]:{this[_0x1ac630(0x210)][_0x1ac630(0x1fc)](_0x351907,_0x1880b8,{'commentId':_0x123972[_0x1ac630(0x1de)],'text':JSON[_0x1ac630(0x22d)](_0x123972[_0x1ac630(0x207)])});break;}case v[_0x1ac630(0x23c)]:{const _0xf60deb=(_0x3fd66d=this[_0x1ac630(0x210)][_0x1ac630(0x240)](_0x123972['unitId'])[_0x1ac630(0x1ea)](_0x319022=>_0x319022[_0x1ac630(0x1f6)]===_0x123972[_0x1ac630(0x1f6)]))==null?void 0x0:_0x3fd66d[_0x1ac630(0x225)];_0xf60deb&&this['_threadCommentModel'][_0x1ac630(0x21f)](_0x351907,_0x1880b8,_0xf60deb['id'],_0x123972[_0x1ac630(0x1e1)]===I[_0x1ac630(0x239)]);break;}}}));}};S=V([p(0x0,_0x14bcb9(_0x167d25)),p(0x1,_0x14bcb9(_0x9dde70)),p(0x2,_0x14bcb9(_0x7fb191)),p(0x3,_0x14bcb9(_0x568f8f))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x112b04(0x238)],Q=(_0x467923,_0x2995a2,_0x2e7a38,_0x5ba613)=>{const _0x605e75=_0x112b04;for(var _0x268496=_0x5ba613>0x1?void 0x0:_0x5ba613?k(_0x2995a2,_0x2e7a38):_0x2995a2,_0x506527=_0x467923[_0x605e75(0x1e8)]-0x1,_0x5a74f1;_0x506527>=0x0;_0x506527--)(_0x5a74f1=_0x467923[_0x506527])&&(_0x268496=_0x5a74f1(_0x268496)||_0x268496);return _0x268496;},_=(_0x32e08a,_0x3e6415)=>(_0x55231e,_0x2fcf54)=>_0x3e6415(_0x55231e,_0x2fcf54,_0x32e08a);function X(_0x51696e,_0x160bba){const _0x40097d=_0x112b04,_0x36f85=_0x51696e[_0x40097d(0x222)][0x0];return{..._0x160bba,'id':_0x36f85['replyId'],'resolved':_0x51696e[_0x40097d(0x1e1)]===0x1,'dT':D(_0x36f85[_0x40097d(0x22b)]),'personId':_0x36f85[_0x40097d(0x1fb)],'threadId':_0x36f85[_0x40097d(0x1f6)]};}function ee(_0x2fabe6,_0x449d4a,_0x297766){const _0x4c97ce=_0x112b04;var _0x53cc76,_0x2e1edb;if(((_0x2e1edb=(_0x53cc76=_0x2fabe6==null?void 0x0:_0x2fabe6['replies'])==null?void 0x0:_0x53cc76[_0x4c97ce(0x1e8)])!=null?_0x2e1edb:0x0)>0x0){const _0x532f49=(_0x456186,_0x29b4ce)=>({'id':_0x456186['replyId'],'threadId':_0x456186['threadId'],'dT':D(_0x456186[_0x4c97ce(0x22b)]),'personId':_0x456186[_0x4c97ce(0x1fb)],'resolved':_0x2fabe6[_0x4c97ce(0x1e1)]===I[_0x4c97ce(0x239)],'unitId':_0x449d4a,'subUnitId':_0x297766,'text':JSON[_0x4c97ce(0x22d)](_0x456186[_0x4c97ce(0x207)]),'parentId':_0x29b4ce}),_0x4ea6ad=_0x532f49(_0x2fabe6['replies'][0x0]);return{..._0x4ea6ad,'children':_0x2fabe6[_0x4c97ce(0x222)][_0x4c97ce(0x1f8)](0x1)['map'](_0x4c4d3a=>_0x532f49(_0x4c4d3a,_0x4ea6ad['id']))};}return null;}let f=class{constructor(_0x6d311a,_0xed9fc9,_0x85eeb4,_0xb20c04){const _0x311765=_0x112b04;this[_0x311765(0x242)]=_0x6d311a,this[_0x311765(0x20b)]=_0xed9fc9,this[_0x311765(0x201)]=_0x85eeb4,this['_injector']=_0xb20c04;}async[_0x112b04(0x23f)](_0x3948d5){const _0x4163d0=_0x112b04;var _0x26fba5,_0x3a7bb0;const {parentId:_0x58f115,unitId:_0x184b95,text:_0x30156e,threadId:_0x14c715}=_0x3948d5,_0x1b643b=(_0x3a7bb0=(_0x26fba5=_0x30156e[_0x4163d0(0x1e7)])==null?void 0x0:_0x26fba5[_0x4163d0(0x1e9)](_0x58e45d=>_0x58e45d[_0x4163d0(0x1ed)]===_0x2c6631[_0x4163d0(0x22f)])[_0x4163d0(0x211)](_0x3f7ef9=>_0x3f7ef9[_0x4163d0(0x229)]))!=null?_0x3a7bb0:[],_0x2ca527=JSON[_0x4163d0(0x226)](_0x30156e),_0x1d168f=(await this[_0x4163d0(0x201)][_0x4163d0(0x217)](_0x184b95))[_0x4163d0(0x1f9)]();if(_0x58f115){const _0x566d97={'memberId':_0x1d168f,'unitId':_0x184b95,'content':_0x2ca527,'mention':_0x1b643b,'threadId':_0x14c715},_0x5a296b=(await this[_0x4163d0(0x242)][_0x4163d0(0x219)]('/universer-api/comment/unit/'+_0x184b95+_0x4163d0(0x236),{'body':_0x566d97}))[_0x4163d0(0x1ec)][_0x4163d0(0x232)];return{..._0x3948d5,'id':_0x5a296b[_0x4163d0(0x1de)],'dT':_0xace482(+_0x5a296b[_0x4163d0(0x22b)])[_0x4163d0(0x1e0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a296b[_0x4163d0(0x1fb)]};}else{const _0xa69f1b={'memberId':_0x1d168f,'unitId':_0x184b95,'content':_0x2ca527,'mention':_0x1b643b},_0x4cd464=await this['_httpService'][_0x4163d0(0x219)]('/universer-api/comment/unit/'+_0x184b95+_0x4163d0(0x22c),{'body':_0xa69f1b});return X(_0x4cd464[_0x4163d0(0x1ec)][_0x4163d0(0x22a)],_0x3948d5);}}async['updateComment'](_0x21cce0){const _0x38c371=_0x112b04;var _0x10dd4f,_0x3b5806;const {text:_0x3776fc,unitId:_0x10ee90}=_0x21cce0,_0x48118f=(_0x3b5806=(_0x10dd4f=_0x3776fc[_0x38c371(0x1e7)])==null?void 0x0:_0x10dd4f[_0x38c371(0x1e9)](_0x3d24ee=>_0x3d24ee[_0x38c371(0x1ed)]===_0x2c6631['COMMENT'])[_0x38c371(0x211)](_0x7cb809=>_0x7cb809[_0x38c371(0x229)]))!=null?_0x3b5806:[],_0x1bc57e=JSON[_0x38c371(0x226)](_0x3776fc),_0x58d09f=_0x21cce0[_0x38c371(0x1f6)],_0x2c29ef=_0x21cce0['id'],_0x126abd={'memberId':(await this[_0x38c371(0x201)][_0x38c371(0x217)](_0x10ee90))[_0x38c371(0x1f9)](),'unitId':_0x10ee90,'threadId':_0x58d09f,'mention':_0x48118f,'content':_0x1bc57e,'replyId':_0x2c29ef},_0x4194f4=await this[_0x38c371(0x242)][_0x38c371(0x219)](_0x38c371(0x218)+_0x10ee90+_0x38c371(0x1eb),{'body':_0x126abd});return!_0x4194f4[_0x38c371(0x1ec)][_0x38c371(0x1e2)]||_0x4194f4[_0x38c371(0x1ec)]['error'][_0x38c371(0x208)]===0x1;}async['resolveComment'](_0x450b3b){const _0x15af90=_0x112b04,{unitId:_0x2a3bc4}=_0x450b3b,_0x177b0c=_0x450b3b['threadId'],_0x1af08b={'memberId':this[_0x15af90(0x20b)][_0x15af90(0x1ef)]()['userID'],'unitId':_0x2a3bc4,'threadId':_0x177b0c,'solved':_0x450b3b[_0x15af90(0x1dd)]?I[_0x15af90(0x239)]:I[_0x15af90(0x1f0)]},_0x4fa032=await this[_0x15af90(0x242)]['post'](_0x15af90(0x218)+_0x2a3bc4+_0x15af90(0x216),{'body':_0x1af08b});return!_0x4fa032['body'][_0x15af90(0x1e2)]||_0x4fa032[_0x15af90(0x1ec)][_0x15af90(0x1e2)]['code']===0x1;}async['deleteComment'](_0x4ed570,_0x232c4a,_0x277943,_0x796f50){const _0xed6518=_0x112b04,_0x333459={'memberId':(await this[_0xed6518(0x201)][_0xed6518(0x217)](_0x4ed570))['getMemberID'](),'threadId':_0x277943,'replyId':_0x796f50,'unitId':_0x4ed570},_0x3ed414=await this[_0xed6518(0x242)][_0xed6518(0x219)](_0xed6518(0x218)+_0x4ed570+'/delete',{'body':_0x333459});return!_0x3ed414[_0xed6518(0x1ec)][_0xed6518(0x1e2)]||_0x3ed414[_0xed6518(0x1ec)][_0xed6518(0x1e2)][_0xed6518(0x208)]===0x1;}async[_0x112b04(0x20f)](_0x524d12,_0x50c5d5,_0x38f3a7){const _0x4da3d9=_0x112b04,_0x28cbd7={'unitId':_0x524d12,'threadId':_0x38f3a7},_0x3b72d5=await this[_0x4da3d9(0x242)][_0x4da3d9(0x219)]('/universer-api/comment/unit/'+_0x524d12+_0x4da3d9(0x1ee),{'body':_0x28cbd7}),_0x4052ae=_0x38f3a7[_0x4da3d9(0x211)](_0x4da020=>ee(_0x3b72d5['body'][_0x4da3d9(0x213)][_0x4da020],_0x524d12,_0x50c5d5))['filter'](Boolean);return Object[_0x4da3d9(0x227)](_0x3b72d5['body']['users'])['forEach'](_0x45aab4=>{this['_userService']['addUser'](_0x45aab4);}),_0x4052ae;}['saveCommentToSnapshot'](_0x43266f){const _0x35d0fe=_0x112b04;return{'id':_0x43266f['id'],'threadId':_0x43266f[_0x35d0fe(0x1f6)],'ref':_0x43266f[_0x35d0fe(0x1fe)]};}};f=Q([_(0x0,_0x14bcb9(_0xe94ad1)),_(0x1,_0x14bcb9(_0x7fb191)),_(0x2,_0x14bcb9(_0x1fd72c)),_(0x3,_0x14bcb9(_0x568f8f))],f);var re=Object[_0x112b04(0x238)],te=(_0x1e9673,_0x2aee0e,_0x16a8c8,_0x14c147)=>{const _0x140c44=_0x112b04;for(var _0x39d39e=_0x14c147>0x1?void 0x0:_0x14c147?re(_0x2aee0e,_0x16a8c8):_0x2aee0e,_0x49ff5c=_0x1e9673[_0x140c44(0x1e8)]-0x1,_0x1d34a3;_0x49ff5c>=0x0;_0x49ff5c--)(_0x1d34a3=_0x1e9673[_0x49ff5c])&&(_0x39d39e=_0x1d34a3(_0x39d39e)||_0x39d39e);return _0x39d39e;},N=(_0x1026ad,_0x438215)=>(_0x7dcb19,_0x5dd47c)=>_0x438215(_0x7dcb19,_0x5dd47c,_0x1026ad);let g=class extends _0x910a31{constructor(_0x2f4743,_0x4ae55a){const _0x2d0732=_0x112b04;super(),this[_0x2d0732(0x203)]=_0x2f4743,this['_threadCommentDataSource']=_0x4ae55a,this[_0x2d0732(0x212)]();}[_0x112b04(0x212)](){const _0x5239eb=_0x112b04;this[_0x5239eb(0x203)][_0x5239eb(0x231)]=this[_0x5239eb(0x235)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x250605),N(0x1,_0x14bcb9(f))],g);var se=Object[_0x112b04(0x1f3)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x431503,_0x128673,_0x97c8f8)=>_0x128673 in _0x431503?se(_0x431503,_0x128673,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x97c8f8}):_0x431503[_0x128673]=_0x97c8f8,ie=(_0x3c56ac,_0x519380,_0x3b497c,_0x1677d6)=>{const _0x22eb53=_0x112b04;for(var _0x3c7ed4=_0x1677d6>0x1?void 0x0:_0x1677d6?oe(_0x519380,_0x3b497c):_0x519380,_0x314bbc=_0x3c56ac[_0x22eb53(0x1e8)]-0x1,_0x4f349e;_0x314bbc>=0x0;_0x314bbc--)(_0x4f349e=_0x3c56ac[_0x314bbc])&&(_0x3c7ed4=_0x4f349e(_0x3c7ed4)||_0x3c7ed4);return _0x3c7ed4;},w=(_0x3f5479,_0x5be5d0)=>(_0x14a34b,_0x8a6b3a)=>_0x5be5d0(_0x14a34b,_0x8a6b3a,_0x3f5479),$=(_0x17231e,_0x524521,_0x46592e)=>ne(_0x17231e,typeof _0x524521!=_0x112b04(0x1f4)?_0x524521+'':_0x524521,_0x46592e);let b=class extends _0x4040ad{constructor(_0xaa204c=M,_0x29e91e,_0x2c6d56){const _0x23fea7=_0x112b04;super(),this['_config']=_0xaa204c,this[_0x23fea7(0x224)]=_0x29e91e,this[_0x23fea7(0x1fd)]=_0x2c6d56;const {..._0x20b2d0}=_0x464ec7({},M,this[_0x23fea7(0x1f5)]);this[_0x23fea7(0x1fd)][_0x23fea7(0x206)](z,_0x20b2d0);}['onStarting'](){const _0x3282d2=_0x112b04;[[f],[g],[S]][_0x3282d2(0x20e)](_0x3cc11f=>{const _0x18daac=_0x3282d2;this['_injector'][_0x18daac(0x23b)](_0x3cc11f);});}['onReady'](){const _0x5bcd49=_0x112b04;this['_injector'][_0x5bcd49(0x1f7)](g),this[_0x5bcd49(0x224)][_0x5bcd49(0x1f7)](S);}};$(b,'pluginName',W),$(b,_0x112b04(0x233),_0x3be5a5[_0x112b04(0x204)]),b=ie([_0x1d015c(_0x4024f2,_0x27eaf3,_0x923530),w(0x1,_0x14bcb9(_0x568f8f)),w(0x2,_0x2f6a76)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x116d(){const _0x17732c=['getCurrentUser','OpenOrReOpen','user','389400qKQDaK','defineProperty','symbol','_config','threadId','get','slice','getMemberID','775851HKaDZt','userId','updateComment','_configService','ref','disposeWithMe','2rYslzt','_sessionService','personId','_threadCommentDataSourceService','UNIVER_UNKNOWN','2388537tZUSmc','setConfig','content','code','2272842UmVkSU','subscribe','_userService','_initUserSync','commentUpdate$','forEach','listComments','_threadCommentModel','map','_initDataSource','comments','Delete','payload','/solved','requireSession','/universer-api/comment/unit/','post','YYYY/MM/DD\x20HH:mm','5rUDHaI','Edit','3298240NNGZyH','UNRECOGNIZED','resolveComment','_init','Reply','replies','deleteComment','_injector','root','stringify','values','size','rangeId','comment','createTimestamp','/add','parse','userID','COMMENT','Unknown','dataSource','reply','type','2110857xJkFMX','_threadCommentDataSource','/reply','Add','getOwnPropertyDescriptor','Solved','users','add','Solve','24WMjMte','delete','addComment','getUnit','getUser','_httpService','resolved','replyId','_commentService','format','solved','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','9132740fnbtxY','pipe','addUser','customRanges','length','filter','find','/edit','body','rangeType','/list'];_0x116d=function(){return _0x17732c;};return _0x116d();}
|
|
1
|
+
const _0x218b1b=_0x5793;(function(_0x2f7d05,_0x345765){const _0x319dee=_0x5793,_0x582086=_0x2f7d05();while(!![]){try{const _0x4c5b48=-parseInt(_0x319dee(0x1ce))/0x1+parseInt(_0x319dee(0x1b3))/0x2+parseInt(_0x319dee(0x1e6))/0x3+parseInt(_0x319dee(0x1f2))/0x4+parseInt(_0x319dee(0x20a))/0x5+-parseInt(_0x319dee(0x1f6))/0x6+-parseInt(_0x319dee(0x1bb))/0x7*(parseInt(_0x319dee(0x1ef))/0x8);if(_0x4c5b48===_0x345765)break;else _0x582086['push'](_0x582086['shift']());}catch(_0x405fdf){_0x582086['push'](_0x582086['shift']());}}}(_0x1114,0xeb9c4));import{CommentService as _0x3c5e4f,CollaborationSessionService as _0x234389,UniverCollaborationClientPlugin as _0x529408}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e54fb}from'@univerjs-pro/license';import{dayjs as _0x57fc57,UserManagerService as _0x1e18f7,Inject as _0x57b463,Injector as _0x2b34e0,Disposable as _0x4b2cab,CustomRangeType as _0x41ef65,UniverInstanceType as _0x560016,DependentOn as _0x40913a,IConfigService as _0xec0c59,Plugin as _0x6a62ef,merge as _0x26f562}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x363f4c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x172d4d,IThreadCommentDataSourceService as _0x41f3b2}from'@univerjs/thread-comment';import{bufferTime as _0x1521d5}from'rxjs';import{HTTPService as _0x1b5530}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x48d5f4=>(_0x48d5f4[_0x48d5f4[_0x218b1b(0x1bf)]=0x0]='OpenOrReOpen',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1d5)]=0x1]='Solved',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1c3)]=-0x1]=_0x218b1b(0x1c3),_0x48d5f4))(I||{}),v=(_0x43bbf0=>(_0x43bbf0[_0x43bbf0[_0x218b1b(0x1d3)]=0x0]=_0x218b1b(0x1d3),_0x43bbf0[_0x43bbf0[_0x218b1b(0x200)]=0x1]=_0x218b1b(0x200),_0x43bbf0[_0x43bbf0[_0x218b1b(0x1b0)]=0x2]='Reply',_0x43bbf0[_0x43bbf0['Edit']=0x3]='Edit',_0x43bbf0[_0x43bbf0[_0x218b1b(0x1e9)]=0x4]=_0x218b1b(0x1e9),_0x43bbf0[_0x43bbf0['Solve']=0x5]=_0x218b1b(0x1ae),_0x43bbf0[_0x43bbf0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43bbf0))(v||{});const D=_0x5de655=>_0x57fc57(new Date(+_0x5de655))[_0x218b1b(0x1cb)](_0x218b1b(0x1af)),B=async(_0x32496e,_0x2a21a8)=>{const _0xc483cd=_0x218b1b,_0x452701=_0x32496e[_0xc483cd(0x1f7)](_0x1e18f7),_0x99a0b9=_0x32496e[_0xc483cd(0x1f7)](_0x1b5530);_0x2a21a8[_0xc483cd(0x1b5)](_0x453bfb=>{_0x452701['getUser'](_0x453bfb)&&_0x2a21a8['delete'](_0x453bfb);}),_0x2a21a8[_0xc483cd(0x1fa)]&&(await _0x99a0b9[_0xc483cd(0x1f7)](_0xc483cd(0x1bd),{'params':{'userIDs':[..._0x2a21a8]}}))[_0xc483cd(0x1cc)][_0xc483cd(0x209)][_0xc483cd(0x1b5)](_0x41d54c=>{const _0x40cb51=_0xc483cd;_0x41d54c&&_0x452701[_0x40cb51(0x1f5)](_0x41d54c);});};var K=Object[_0x218b1b(0x1cf)],V=(_0x2cc9fa,_0x6cc859,_0x1f408c,_0x5a37f6)=>{const _0x38341a=_0x218b1b;for(var _0x2d5a14=_0x5a37f6>0x1?void 0x0:_0x5a37f6?K(_0x6cc859,_0x1f408c):_0x6cc859,_0x4e9718=_0x2cc9fa[_0x38341a(0x1e8)]-0x1,_0x3b55ee;_0x4e9718>=0x0;_0x4e9718--)(_0x3b55ee=_0x2cc9fa[_0x4e9718])&&(_0x2d5a14=_0x3b55ee(_0x2d5a14)||_0x2d5a14);return _0x2d5a14;},p=(_0x28028a,_0x11976f)=>(_0x3ecca1,_0x5e38be)=>_0x11976f(_0x3ecca1,_0x5e38be,_0x28028a);let S=class extends _0x4b2cab{constructor(_0x21f0a9,_0x4257e6,_0xa3bc7f,_0x4d02f0){const _0x443dee=_0x218b1b;super(),this['_commentService']=_0x21f0a9,this[_0x443dee(0x1fb)]=_0x4257e6,this['_userService']=_0xa3bc7f,this[_0x443dee(0x1cd)]=_0x4d02f0,this[_0x443dee(0x1d7)](),this[_0x443dee(0x1b8)]();}['_initUserSync'](){const _0x1f7962=_0x218b1b;this[_0x1f7962(0x1ac)](this[_0x1f7962(0x1fb)][_0x1f7962(0x1d1)]['pipe'](_0x1521d5(0x10))[_0x1f7962(0x1f8)](_0x31fc0b=>{const _0x3e85e2=_0x1f7962,_0x47cd46=new Set();_0x31fc0b['forEach'](_0x50e185=>{const _0x35ff9=_0x5793;switch(_0x50e185[_0x35ff9(0x1d9)]){case'add':{const _0x3c6181=_0x50e185[_0x35ff9(0x1ee)][_0x35ff9(0x203)];_0x47cd46['add'](_0x3c6181);break;}}}),B(this[_0x3e85e2(0x1cd)],_0x47cd46);}));}[_0x218b1b(0x1d7)](){const _0x3df9e7=_0x218b1b;this[_0x3df9e7(0x1ac)](this[_0x3df9e7(0x1ba)]['commentUpdate$'][_0x3df9e7(0x1f8)](async _0x1c88f4=>{const _0x33f90b=_0x3df9e7;var _0x6a25fe,_0x309902,_0x192a9e,_0x447c29;const _0x4e8b8a=(_0x6a25fe=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4[_0x33f90b(0x1f0)])[_0x33f90b(0x1e4)](_0x3c4c23=>_0x3c4c23[_0x33f90b(0x1c1)]===_0x1c88f4['threadId']))==null?void 0x0:_0x6a25fe['root'];if(!_0x4e8b8a)return;const {unitId:_0x18e153,subUnitId:_0x1d86f0}=_0x4e8b8a;switch(_0x1c88f4[_0x33f90b(0x1e3)]&&this[_0x33f90b(0x1d8)]['addUser'](_0x1c88f4[_0x33f90b(0x1e3)]),_0x1c88f4[_0x33f90b(0x1d9)]){case v[_0x33f90b(0x200)]:break;case v[_0x33f90b(0x1b0)]:{this['_threadCommentModel'][_0x33f90b(0x1ea)](_0x18e153,_0x1d86f0,{'unitId':_0x18e153,'subUnitId':_0x1d86f0,'ref':'','id':_0x1c88f4[_0x33f90b(0x1dc)],'dT':D(+_0x1c88f4[_0x33f90b(0x1b6)]),'threadId':_0x1c88f4[_0x33f90b(0x1c1)],'personId':(_0x192a9e=(_0x309902=_0x1c88f4[_0x33f90b(0x1e3)])==null?void 0x0:_0x309902['userID'])!=null?_0x192a9e:_0x1c88f4[_0x33f90b(0x1ec)],'text':JSON['parse'](_0x1c88f4[_0x33f90b(0x1b4)]),'parentId':_0x4e8b8a['id']});break;}case v[_0x33f90b(0x1e9)]:{const _0x3e1005=this['_threadCommentModel'][_0x33f90b(0x1c8)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);_0x3e1005&&_0x3e1005[_0x33f90b(0x1e5)]&&this['_threadCommentModel'][_0x33f90b(0x1da)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);break;}case v['Edit']:{this[_0x33f90b(0x1fb)][_0x33f90b(0x1d2)](_0x18e153,_0x1d86f0,{'commentId':_0x1c88f4[_0x33f90b(0x1dc)],'text':JSON[_0x33f90b(0x1d4)](_0x1c88f4[_0x33f90b(0x1b4)])});break;}case v['Solve']:{const _0x79daf5=(_0x447c29=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4['unitId'])[_0x33f90b(0x1e4)](_0x4aa4d5=>_0x4aa4d5[_0x33f90b(0x1c1)]===_0x1c88f4[_0x33f90b(0x1c1)]))==null?void 0x0:_0x447c29[_0x33f90b(0x1de)];_0x79daf5&&this[_0x33f90b(0x1fb)][_0x33f90b(0x1b2)](_0x18e153,_0x1d86f0,_0x79daf5['id'],_0x1c88f4[_0x33f90b(0x1c2)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x57b463(_0x3c5e4f)),p(0x1,_0x57b463(_0x172d4d)),p(0x2,_0x57b463(_0x1e18f7)),p(0x3,_0x57b463(_0x2b34e0))],S);const z='thread-comment-data-source.config',M={};function _0x5793(_0x1a0fe1,_0x27a806){const _0x111446=_0x1114();return _0x5793=function(_0x579335,_0x46b67d){_0x579335=_0x579335-0x1aa;let _0x1aedd1=_0x111446[_0x579335];return _0x1aedd1;},_0x5793(_0x1a0fe1,_0x27a806);}var k=Object[_0x218b1b(0x1cf)],Q=(_0x2ee888,_0x5b796b,_0x39fb3a,_0x4f391c)=>{const _0x119055=_0x218b1b;for(var _0x38f24f=_0x4f391c>0x1?void 0x0:_0x4f391c?k(_0x5b796b,_0x39fb3a):_0x5b796b,_0x2da413=_0x2ee888[_0x119055(0x1e8)]-0x1,_0x9e11eb;_0x2da413>=0x0;_0x2da413--)(_0x9e11eb=_0x2ee888[_0x2da413])&&(_0x38f24f=_0x9e11eb(_0x38f24f)||_0x38f24f);return _0x38f24f;},_=(_0x1470ee,_0x3d6d6d)=>(_0x4fb35b,_0x35ff70)=>_0x3d6d6d(_0x4fb35b,_0x35ff70,_0x1470ee);function _0x1114(){const _0x3c601a=['getComment','customRanges','reply','format','body','_injector','617387WFSSks','getOwnPropertyDescriptor','_threadCommentDataSourceService','commentUpdate$','updateComment','Unknown','parse','Solved','_threadCommentDataSource','_init','_userService','type','deleteComment','/solved','replyId','comment','root','error','comments','_initDataSource','replies','user','find','parentId','5747580xgglVl','_config','length','Delete','addComment','add','userId','dataSource','payload','1913256CMWGYg','unitId','_sessionService','4049792MCZFHg','_configService','/universer-api/comment/unit/','addUser','5999292unGysp','get','subscribe','resolved','size','_threadCommentModel','code','UNIVER_UNKNOWN','pluginName','symbol','Add','_httpService','getMemberID','personId','saveCommentToSnapshot','getUnit','rangeId','rangeType','post','users','6177075QGObhl','values','onStarting','disposeWithMe','filter','Solve','YYYY/MM/DD\x20HH:mm','Reply','defineProperty','resolveComment','3055294MUFlmL','content','forEach','createTimestamp','/delete','_initUserSync','setConfig','_commentService','91GdzjXB','syncUpdateMutationToColla','/universer-api/user/list','/edit','OpenOrReOpen','stringify','threadId','solved','UNRECOGNIZED','map','COMMENT','requireSession','onReady'];_0x1114=function(){return _0x3c601a;};return _0x1114();}function X(_0x189eac,_0x9ab8f9){const _0x2bdc3e=_0x218b1b,_0x1902dc=_0x189eac[_0x2bdc3e(0x1e2)][0x0];return{..._0x9ab8f9,'id':_0x1902dc[_0x2bdc3e(0x1dc)],'resolved':_0x189eac[_0x2bdc3e(0x1c2)]===0x1,'dT':D(_0x1902dc[_0x2bdc3e(0x1b6)]),'personId':_0x1902dc[_0x2bdc3e(0x1ec)],'threadId':_0x1902dc[_0x2bdc3e(0x1c1)]};}function ee(_0x2d2a27,_0x4c5992,_0x4f4ff0){const _0x95fe85=_0x218b1b;var _0x2a5c90,_0x586e7d;if(((_0x586e7d=(_0x2a5c90=_0x2d2a27==null?void 0x0:_0x2d2a27[_0x95fe85(0x1e2)])==null?void 0x0:_0x2a5c90['length'])!=null?_0x586e7d:0x0)>0x0){const _0x372928=(_0x47ac82,_0x27ebc8)=>({'id':_0x47ac82['replyId'],'threadId':_0x47ac82[_0x95fe85(0x1c1)],'dT':D(_0x47ac82[_0x95fe85(0x1b6)]),'personId':_0x47ac82[_0x95fe85(0x1ec)],'resolved':_0x2d2a27[_0x95fe85(0x1c2)]===I[_0x95fe85(0x1d5)],'unitId':_0x4c5992,'subUnitId':_0x4f4ff0,'text':JSON[_0x95fe85(0x1d4)](_0x47ac82[_0x95fe85(0x1b4)]),'parentId':_0x27ebc8}),_0x29703f=_0x372928(_0x2d2a27['replies'][0x0]);return{..._0x29703f,'children':_0x2d2a27[_0x95fe85(0x1e2)]['slice'](0x1)['map'](_0x58c2f3=>_0x372928(_0x58c2f3,_0x29703f['id']))};}return null;}let f=class{constructor(_0x41015e,_0x36976e,_0x42020d,_0x5d1dcb){const _0x5e9b30=_0x218b1b;this['_httpService']=_0x41015e,this[_0x5e9b30(0x1d8)]=_0x36976e,this[_0x5e9b30(0x1f1)]=_0x42020d,this[_0x5e9b30(0x1cd)]=_0x5d1dcb;}async[_0x218b1b(0x1ea)](_0x550f4b){const _0x116228=_0x218b1b;var _0x4fc409,_0x35bca5;const {parentId:_0x1b284d,unitId:_0x5ca5bd,text:_0x231a87,threadId:_0x1046c5}=_0x550f4b,_0x15c45a=(_0x35bca5=(_0x4fc409=_0x231a87[_0x116228(0x1c9)])==null?void 0x0:_0x4fc409[_0x116228(0x1ad)](_0x31147d=>_0x31147d[_0x116228(0x207)]===_0x41ef65[_0x116228(0x1c5)])[_0x116228(0x1c4)](_0x4edcff=>_0x4edcff[_0x116228(0x206)]))!=null?_0x35bca5:[],_0xac80f6=JSON[_0x116228(0x1c0)](_0x231a87),_0x561a74=(await this[_0x116228(0x1f1)]['requireSession'](_0x5ca5bd))[_0x116228(0x202)]();if(_0x1b284d){const _0x2d29aa={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a,'threadId':_0x1046c5},_0x20a59b=(await this[_0x116228(0x201)][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/reply',{'body':_0x2d29aa}))[_0x116228(0x1cc)][_0x116228(0x1ca)];return{..._0x550f4b,'id':_0x20a59b[_0x116228(0x1dc)],'dT':_0x57fc57(+_0x20a59b[_0x116228(0x1b6)])[_0x116228(0x1cb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x20a59b[_0x116228(0x1ec)]};}else{const _0x5440ca={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a},_0x592c3c=await this['_httpService'][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/add',{'body':_0x5440ca});return X(_0x592c3c['body'][_0x116228(0x1dd)],_0x550f4b);}}async['updateComment'](_0x5421c1){const _0x59bc22=_0x218b1b;var _0xfaed3b,_0x54ba37;const {text:_0x4cd565,unitId:_0x9ecd81}=_0x5421c1,_0x34069a=(_0x54ba37=(_0xfaed3b=_0x4cd565[_0x59bc22(0x1c9)])==null?void 0x0:_0xfaed3b['filter'](_0x418fba=>_0x418fba[_0x59bc22(0x207)]===_0x41ef65['COMMENT'])[_0x59bc22(0x1c4)](_0x50346c=>_0x50346c[_0x59bc22(0x206)]))!=null?_0x54ba37:[],_0xdcdff2=JSON[_0x59bc22(0x1c0)](_0x4cd565),_0x27b6c7=_0x5421c1[_0x59bc22(0x1c1)],_0x257710=_0x5421c1['id'],_0x3b0da1={'memberId':(await this[_0x59bc22(0x1f1)][_0x59bc22(0x1c6)](_0x9ecd81))[_0x59bc22(0x202)](),'unitId':_0x9ecd81,'threadId':_0x27b6c7,'mention':_0x34069a,'content':_0xdcdff2,'replyId':_0x257710},_0x4c6c04=await this[_0x59bc22(0x201)][_0x59bc22(0x208)](_0x59bc22(0x1f4)+_0x9ecd81+_0x59bc22(0x1be),{'body':_0x3b0da1});return!_0x4c6c04[_0x59bc22(0x1cc)]['error']||_0x4c6c04[_0x59bc22(0x1cc)]['error']['code']===0x1;}async['resolveComment'](_0x15f442){const _0x29b574=_0x218b1b,{unitId:_0x3b631a}=_0x15f442,_0x5c634f=_0x15f442[_0x29b574(0x1c1)],_0x18d9bd={'memberId':this[_0x29b574(0x1d8)]['getCurrentUser']()['userID'],'unitId':_0x3b631a,'threadId':_0x5c634f,'solved':_0x15f442[_0x29b574(0x1f9)]?I['Solved']:I['OpenOrReOpen']},_0x21cb72=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3b631a+_0x29b574(0x1db),{'body':_0x18d9bd});return!_0x21cb72[_0x29b574(0x1cc)][_0x29b574(0x1df)]||_0x21cb72['body'][_0x29b574(0x1df)]['code']===0x1;}async[_0x218b1b(0x1da)](_0x4cbaea,_0x1d903c,_0x3beacd,_0x55ecda){const _0x413474=_0x218b1b,_0x442131={'memberId':(await this[_0x413474(0x1f1)]['requireSession'](_0x4cbaea))[_0x413474(0x202)](),'threadId':_0x3beacd,'replyId':_0x55ecda,'unitId':_0x4cbaea},_0x917901=await this[_0x413474(0x201)]['post'](_0x413474(0x1f4)+_0x4cbaea+_0x413474(0x1b7),{'body':_0x442131});return!_0x917901[_0x413474(0x1cc)][_0x413474(0x1df)]||_0x917901[_0x413474(0x1cc)]['error'][_0x413474(0x1fc)]===0x1;}async['listComments'](_0x15c2fe,_0x2fefd9,_0xa7015){const _0x3b66da=_0x218b1b,_0x425889={'unitId':_0x15c2fe,'threadId':_0xa7015},_0x5013fe=await this[_0x3b66da(0x201)]['post']('/universer-api/comment/unit/'+_0x15c2fe+'/list',{'body':_0x425889}),_0x17dd92=_0xa7015[_0x3b66da(0x1c4)](_0x246688=>ee(_0x5013fe['body'][_0x3b66da(0x1e0)][_0x246688],_0x15c2fe,_0x2fefd9))['filter'](Boolean);return Object[_0x3b66da(0x1aa)](_0x5013fe[_0x3b66da(0x1cc)][_0x3b66da(0x209)])[_0x3b66da(0x1b5)](_0x38cdf3=>{const _0xaa4097=_0x3b66da;this[_0xaa4097(0x1d8)][_0xaa4097(0x1f5)](_0x38cdf3);}),_0x17dd92;}[_0x218b1b(0x204)](_0x5564f2){const _0x4e676f=_0x218b1b;return{'id':_0x5564f2['id'],'threadId':_0x5564f2[_0x4e676f(0x1c1)],'ref':_0x5564f2['ref']};}};f=Q([_(0x0,_0x57b463(_0x1b5530)),_(0x1,_0x57b463(_0x1e18f7)),_(0x2,_0x57b463(_0x234389)),_(0x3,_0x57b463(_0x2b34e0))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x370407,_0xf4b3c0,_0x16d409,_0x36b6ff)=>{for(var _0x25d21d=_0x36b6ff>0x1?void 0x0:_0x36b6ff?re(_0xf4b3c0,_0x16d409):_0xf4b3c0,_0x347b03=_0x370407['length']-0x1,_0x3de019;_0x347b03>=0x0;_0x347b03--)(_0x3de019=_0x370407[_0x347b03])&&(_0x25d21d=_0x3de019(_0x25d21d)||_0x25d21d);return _0x25d21d;},N=(_0x57484d,_0x7b693a)=>(_0x11f3c3,_0x194d79)=>_0x7b693a(_0x11f3c3,_0x194d79,_0x57484d);let g=class extends _0x4b2cab{constructor(_0x4d2277,_0x373121){const _0x1e99dc=_0x218b1b;super(),this[_0x1e99dc(0x1d0)]=_0x4d2277,this[_0x1e99dc(0x1d6)]=_0x373121,this[_0x1e99dc(0x1e1)]();}['_initDataSource'](){const _0x4d7ec7=_0x218b1b;this[_0x4d7ec7(0x1d0)][_0x4d7ec7(0x1ed)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4d7ec7(0x1bc)]=!0x1;}};g=te([N(0x0,_0x41f3b2),N(0x1,_0x57b463(f))],g);var se=Object[_0x218b1b(0x1b1)],oe=Object[_0x218b1b(0x1cf)],ne=(_0x4d6cd6,_0x54b7d6,_0x2fef47)=>_0x54b7d6 in _0x4d6cd6?se(_0x4d6cd6,_0x54b7d6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2fef47}):_0x4d6cd6[_0x54b7d6]=_0x2fef47,ie=(_0x3ac978,_0x4e242f,_0x2a17b8,_0x30979f)=>{const _0x2c00e5=_0x218b1b;for(var _0x10bf60=_0x30979f>0x1?void 0x0:_0x30979f?oe(_0x4e242f,_0x2a17b8):_0x4e242f,_0x24bce6=_0x3ac978[_0x2c00e5(0x1e8)]-0x1,_0x30ffdf;_0x24bce6>=0x0;_0x24bce6--)(_0x30ffdf=_0x3ac978[_0x24bce6])&&(_0x10bf60=_0x30ffdf(_0x10bf60)||_0x10bf60);return _0x10bf60;},w=(_0x330e8e,_0x1aea17)=>(_0x326674,_0x3423e5)=>_0x1aea17(_0x326674,_0x3423e5,_0x330e8e),$=(_0x5c726b,_0x4c5532,_0x1ebdd9)=>ne(_0x5c726b,typeof _0x4c5532!=_0x218b1b(0x1ff)?_0x4c5532+'':_0x4c5532,_0x1ebdd9);let b=class extends _0x6a62ef{constructor(_0x1fafff=M,_0x2da749,_0x394955){const _0x4f8f84=_0x218b1b;super(),this[_0x4f8f84(0x1e7)]=_0x1fafff,this[_0x4f8f84(0x1cd)]=_0x2da749,this[_0x4f8f84(0x1f3)]=_0x394955;const {..._0x2d86ac}=_0x26f562({},M,this[_0x4f8f84(0x1e7)]);this[_0x4f8f84(0x1f3)][_0x4f8f84(0x1b9)](z,_0x2d86ac);}[_0x218b1b(0x1ab)](){const _0x1df57e=_0x218b1b;[[f],[g],[S]][_0x1df57e(0x1b5)](_0x1c0741=>{const _0x1207b6=_0x1df57e;this[_0x1207b6(0x1cd)][_0x1207b6(0x1eb)](_0x1c0741);});}[_0x218b1b(0x1c7)](){const _0x92beb3=_0x218b1b;this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](g),this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](S);}};$(b,_0x218b1b(0x1fe),W),$(b,_0x218b1b(0x1d9),_0x560016[_0x218b1b(0x1fd)]),b=ie([_0x40913a(_0x363f4c,_0x529408,_0x1e54fb),w(0x1,_0x57b463(_0x2b34e0)),w(0x2,_0xec0c59)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x112b04=_0x5e66;(function(_0x229a7e,_0x4a0c5c){const _0xccb305=_0x5e66,_0x432426=_0x229a7e();while(!![]){try{const _0x4c2db0=parseInt(_0xccb305(0x1f2))/0x1+parseInt(_0xccb305(0x200))/0x2*(parseInt(_0xccb305(0x1fa))/0x3)+-parseInt(_0xccb305(0x21d))/0x4*(parseInt(_0xccb305(0x21b))/0x5)+parseInt(_0xccb305(0x209))/0x6+parseInt(_0xccb305(0x234))/0x7*(parseInt(_0xccb305(0x23d))/0x8)+parseInt(_0xccb305(0x205))/0x9+-parseInt(_0xccb305(0x1e4))/0xa;if(_0x4c2db0===_0x4a0c5c)break;else _0x432426['push'](_0x432426['shift']());}catch(_0x2b451d){_0x432426['push'](_0x432426['shift']());}}}(_0x116d,0x7011c));import{CommentService as _0x167d25,CollaborationSessionService as _0x1fd72c,UniverCollaborationClientPlugin as _0x27eaf3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x923530}from'@univerjs-pro/license';import{dayjs as _0xace482,UserManagerService as _0x7fb191,Inject as _0x14bcb9,Injector as _0x568f8f,Disposable as _0x910a31,CustomRangeType as _0x2c6631,UniverInstanceType as _0x3be5a5,DependentOn as _0x1d015c,IConfigService as _0x2f6a76,Plugin as _0x4040ad,merge as _0x464ec7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4024f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9dde70,IThreadCommentDataSourceService as _0x250605}from'@univerjs/thread-comment';import{bufferTime as _0x5436f1}from'rxjs';import{HTTPService as _0xe94ad1}from'@univerjs/network';function _0x5e66(_0x16ffab,_0x3632d3){const _0x116d84=_0x116d();return _0x5e66=function(_0x5e6685,_0x281888){_0x5e6685=_0x5e6685-0x1dd;let _0x56b3e0=_0x116d84[_0x5e6685];return _0x56b3e0;},_0x5e66(_0x16ffab,_0x3632d3);}const W=_0x112b04(0x1e3);var I=(_0x51aeaa=>(_0x51aeaa[_0x51aeaa[_0x112b04(0x1f0)]=0x0]=_0x112b04(0x1f0),_0x51aeaa[_0x51aeaa[_0x112b04(0x239)]=0x1]=_0x112b04(0x239),_0x51aeaa[_0x51aeaa[_0x112b04(0x21e)]=-0x1]=_0x112b04(0x21e),_0x51aeaa))(I||{}),v=(_0x492e30=>(_0x492e30[_0x492e30['Unknown']=0x0]=_0x112b04(0x230),_0x492e30[_0x492e30[_0x112b04(0x237)]=0x1]=_0x112b04(0x237),_0x492e30[_0x492e30[_0x112b04(0x221)]=0x2]='Reply',_0x492e30[_0x492e30[_0x112b04(0x21c)]=0x3]=_0x112b04(0x21c),_0x492e30[_0x492e30[_0x112b04(0x214)]=0x4]=_0x112b04(0x214),_0x492e30[_0x492e30['Solve']=0x5]=_0x112b04(0x23c),_0x492e30[_0x492e30[_0x112b04(0x21e)]=-0x1]=_0x112b04(0x21e),_0x492e30))(v||{});const D=_0x519300=>_0xace482(new Date(+_0x519300))['format'](_0x112b04(0x21a)),B=async(_0x2fc1df,_0x2109ac)=>{const _0x4b9197=_0x112b04,_0xe12edf=_0x2fc1df['get'](_0x7fb191),_0x217c28=_0x2fc1df['get'](_0xe94ad1);_0x2109ac[_0x4b9197(0x20e)](_0xbad0bb=>{const _0xbc88b3=_0x4b9197;_0xe12edf[_0xbc88b3(0x241)](_0xbad0bb)&&_0x2109ac[_0xbc88b3(0x23e)](_0xbad0bb);}),_0x2109ac[_0x4b9197(0x228)]&&(await _0x217c28[_0x4b9197(0x1f7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2109ac]}}))[_0x4b9197(0x1ec)][_0x4b9197(0x23a)][_0x4b9197(0x20e)](_0x225c6c=>{const _0xad295e=_0x4b9197;_0x225c6c&&_0xe12edf[_0xad295e(0x1e6)](_0x225c6c);});};var K=Object[_0x112b04(0x238)],V=(_0x21833c,_0x14d4bc,_0x45faed,_0x1ac882)=>{const _0xe21fd1=_0x112b04;for(var _0x46a33a=_0x1ac882>0x1?void 0x0:_0x1ac882?K(_0x14d4bc,_0x45faed):_0x14d4bc,_0x48c8ba=_0x21833c[_0xe21fd1(0x1e8)]-0x1,_0x237017;_0x48c8ba>=0x0;_0x48c8ba--)(_0x237017=_0x21833c[_0x48c8ba])&&(_0x46a33a=_0x237017(_0x46a33a)||_0x46a33a);return _0x46a33a;},p=(_0x4a4b70,_0x2cb541)=>(_0x457e6e,_0x4378f6)=>_0x2cb541(_0x457e6e,_0x4378f6,_0x4a4b70);let S=class extends _0x910a31{constructor(_0x38742e,_0x3786b0,_0x4c2699,_0x32adac){const _0x25e331=_0x112b04;super(),this[_0x25e331(0x1df)]=_0x38742e,this[_0x25e331(0x210)]=_0x3786b0,this['_userService']=_0x4c2699,this[_0x25e331(0x224)]=_0x32adac,this[_0x25e331(0x220)](),this[_0x25e331(0x20c)]();}[_0x112b04(0x20c)](){const _0x2a74fa=_0x112b04;this['disposeWithMe'](this[_0x2a74fa(0x210)][_0x2a74fa(0x20d)][_0x2a74fa(0x1e5)](_0x5436f1(0x10))[_0x2a74fa(0x20a)](_0x54bb43=>{const _0xece682=_0x2a74fa,_0x1cc9d4=new Set();_0x54bb43[_0xece682(0x20e)](_0x4a20aa=>{const _0x4eddb8=_0xece682;switch(_0x4a20aa[_0x4eddb8(0x233)]){case _0x4eddb8(0x23b):{const _0x411869=_0x4a20aa[_0x4eddb8(0x215)][_0x4eddb8(0x202)];_0x1cc9d4[_0x4eddb8(0x23b)](_0x411869);break;}}}),B(this[_0xece682(0x224)],_0x1cc9d4);}));}[_0x112b04(0x220)](){const _0x20fccc=_0x112b04;this[_0x20fccc(0x1ff)](this['_commentService']['commentUpdate$'][_0x20fccc(0x20a)](async _0x123972=>{const _0x1ac630=_0x20fccc;var _0x4844e3,_0x310692,_0xb589b9,_0x3fd66d;const _0x219766=(_0x4844e3=this[_0x1ac630(0x210)][_0x1ac630(0x240)](_0x123972['unitId'])['find'](_0x233c7f=>_0x233c7f['threadId']===_0x123972[_0x1ac630(0x1f6)]))==null?void 0x0:_0x4844e3[_0x1ac630(0x225)];if(!_0x219766)return;const {unitId:_0x351907,subUnitId:_0x1880b8}=_0x219766;switch(_0x123972[_0x1ac630(0x1f1)]&&this[_0x1ac630(0x20b)][_0x1ac630(0x1e6)](_0x123972[_0x1ac630(0x1f1)]),_0x123972['type']){case v[_0x1ac630(0x237)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x351907,_0x1880b8,{'unitId':_0x351907,'subUnitId':_0x1880b8,'ref':'','id':_0x123972[_0x1ac630(0x1de)],'dT':D(+_0x123972['createTimestamp']),'threadId':_0x123972[_0x1ac630(0x1f6)],'personId':(_0xb589b9=(_0x310692=_0x123972[_0x1ac630(0x1f1)])==null?void 0x0:_0x310692[_0x1ac630(0x22e)])!=null?_0xb589b9:_0x123972[_0x1ac630(0x1fb)],'text':JSON[_0x1ac630(0x22d)](_0x123972[_0x1ac630(0x207)]),'parentId':_0x219766['id']});break;}case v[_0x1ac630(0x214)]:{const _0x404b9b=this['_threadCommentModel']['getComment'](_0x351907,_0x1880b8,_0x123972[_0x1ac630(0x1de)]);_0x404b9b&&_0x404b9b['parentId']&&this[_0x1ac630(0x210)][_0x1ac630(0x223)](_0x351907,_0x1880b8,_0x123972['replyId']);break;}case v[_0x1ac630(0x21c)]:{this[_0x1ac630(0x210)][_0x1ac630(0x1fc)](_0x351907,_0x1880b8,{'commentId':_0x123972[_0x1ac630(0x1de)],'text':JSON[_0x1ac630(0x22d)](_0x123972[_0x1ac630(0x207)])});break;}case v[_0x1ac630(0x23c)]:{const _0xf60deb=(_0x3fd66d=this[_0x1ac630(0x210)][_0x1ac630(0x240)](_0x123972['unitId'])[_0x1ac630(0x1ea)](_0x319022=>_0x319022[_0x1ac630(0x1f6)]===_0x123972[_0x1ac630(0x1f6)]))==null?void 0x0:_0x3fd66d[_0x1ac630(0x225)];_0xf60deb&&this['_threadCommentModel'][_0x1ac630(0x21f)](_0x351907,_0x1880b8,_0xf60deb['id'],_0x123972[_0x1ac630(0x1e1)]===I[_0x1ac630(0x239)]);break;}}}));}};S=V([p(0x0,_0x14bcb9(_0x167d25)),p(0x1,_0x14bcb9(_0x9dde70)),p(0x2,_0x14bcb9(_0x7fb191)),p(0x3,_0x14bcb9(_0x568f8f))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x112b04(0x238)],Q=(_0x467923,_0x2995a2,_0x2e7a38,_0x5ba613)=>{const _0x605e75=_0x112b04;for(var _0x268496=_0x5ba613>0x1?void 0x0:_0x5ba613?k(_0x2995a2,_0x2e7a38):_0x2995a2,_0x506527=_0x467923[_0x605e75(0x1e8)]-0x1,_0x5a74f1;_0x506527>=0x0;_0x506527--)(_0x5a74f1=_0x467923[_0x506527])&&(_0x268496=_0x5a74f1(_0x268496)||_0x268496);return _0x268496;},_=(_0x32e08a,_0x3e6415)=>(_0x55231e,_0x2fcf54)=>_0x3e6415(_0x55231e,_0x2fcf54,_0x32e08a);function X(_0x51696e,_0x160bba){const _0x40097d=_0x112b04,_0x36f85=_0x51696e[_0x40097d(0x222)][0x0];return{..._0x160bba,'id':_0x36f85['replyId'],'resolved':_0x51696e[_0x40097d(0x1e1)]===0x1,'dT':D(_0x36f85[_0x40097d(0x22b)]),'personId':_0x36f85[_0x40097d(0x1fb)],'threadId':_0x36f85[_0x40097d(0x1f6)]};}function ee(_0x2fabe6,_0x449d4a,_0x297766){const _0x4c97ce=_0x112b04;var _0x53cc76,_0x2e1edb;if(((_0x2e1edb=(_0x53cc76=_0x2fabe6==null?void 0x0:_0x2fabe6['replies'])==null?void 0x0:_0x53cc76[_0x4c97ce(0x1e8)])!=null?_0x2e1edb:0x0)>0x0){const _0x532f49=(_0x456186,_0x29b4ce)=>({'id':_0x456186['replyId'],'threadId':_0x456186['threadId'],'dT':D(_0x456186[_0x4c97ce(0x22b)]),'personId':_0x456186[_0x4c97ce(0x1fb)],'resolved':_0x2fabe6[_0x4c97ce(0x1e1)]===I[_0x4c97ce(0x239)],'unitId':_0x449d4a,'subUnitId':_0x297766,'text':JSON[_0x4c97ce(0x22d)](_0x456186[_0x4c97ce(0x207)]),'parentId':_0x29b4ce}),_0x4ea6ad=_0x532f49(_0x2fabe6['replies'][0x0]);return{..._0x4ea6ad,'children':_0x2fabe6[_0x4c97ce(0x222)][_0x4c97ce(0x1f8)](0x1)['map'](_0x4c4d3a=>_0x532f49(_0x4c4d3a,_0x4ea6ad['id']))};}return null;}let f=class{constructor(_0x6d311a,_0xed9fc9,_0x85eeb4,_0xb20c04){const _0x311765=_0x112b04;this[_0x311765(0x242)]=_0x6d311a,this[_0x311765(0x20b)]=_0xed9fc9,this[_0x311765(0x201)]=_0x85eeb4,this['_injector']=_0xb20c04;}async[_0x112b04(0x23f)](_0x3948d5){const _0x4163d0=_0x112b04;var _0x26fba5,_0x3a7bb0;const {parentId:_0x58f115,unitId:_0x184b95,text:_0x30156e,threadId:_0x14c715}=_0x3948d5,_0x1b643b=(_0x3a7bb0=(_0x26fba5=_0x30156e[_0x4163d0(0x1e7)])==null?void 0x0:_0x26fba5[_0x4163d0(0x1e9)](_0x58e45d=>_0x58e45d[_0x4163d0(0x1ed)]===_0x2c6631[_0x4163d0(0x22f)])[_0x4163d0(0x211)](_0x3f7ef9=>_0x3f7ef9[_0x4163d0(0x229)]))!=null?_0x3a7bb0:[],_0x2ca527=JSON[_0x4163d0(0x226)](_0x30156e),_0x1d168f=(await this[_0x4163d0(0x201)][_0x4163d0(0x217)](_0x184b95))[_0x4163d0(0x1f9)]();if(_0x58f115){const _0x566d97={'memberId':_0x1d168f,'unitId':_0x184b95,'content':_0x2ca527,'mention':_0x1b643b,'threadId':_0x14c715},_0x5a296b=(await this[_0x4163d0(0x242)][_0x4163d0(0x219)]('/universer-api/comment/unit/'+_0x184b95+_0x4163d0(0x236),{'body':_0x566d97}))[_0x4163d0(0x1ec)][_0x4163d0(0x232)];return{..._0x3948d5,'id':_0x5a296b[_0x4163d0(0x1de)],'dT':_0xace482(+_0x5a296b[_0x4163d0(0x22b)])[_0x4163d0(0x1e0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a296b[_0x4163d0(0x1fb)]};}else{const _0xa69f1b={'memberId':_0x1d168f,'unitId':_0x184b95,'content':_0x2ca527,'mention':_0x1b643b},_0x4cd464=await this['_httpService'][_0x4163d0(0x219)]('/universer-api/comment/unit/'+_0x184b95+_0x4163d0(0x22c),{'body':_0xa69f1b});return X(_0x4cd464[_0x4163d0(0x1ec)][_0x4163d0(0x22a)],_0x3948d5);}}async['updateComment'](_0x21cce0){const _0x38c371=_0x112b04;var _0x10dd4f,_0x3b5806;const {text:_0x3776fc,unitId:_0x10ee90}=_0x21cce0,_0x48118f=(_0x3b5806=(_0x10dd4f=_0x3776fc[_0x38c371(0x1e7)])==null?void 0x0:_0x10dd4f[_0x38c371(0x1e9)](_0x3d24ee=>_0x3d24ee[_0x38c371(0x1ed)]===_0x2c6631['COMMENT'])[_0x38c371(0x211)](_0x7cb809=>_0x7cb809[_0x38c371(0x229)]))!=null?_0x3b5806:[],_0x1bc57e=JSON[_0x38c371(0x226)](_0x3776fc),_0x58d09f=_0x21cce0[_0x38c371(0x1f6)],_0x2c29ef=_0x21cce0['id'],_0x126abd={'memberId':(await this[_0x38c371(0x201)][_0x38c371(0x217)](_0x10ee90))[_0x38c371(0x1f9)](),'unitId':_0x10ee90,'threadId':_0x58d09f,'mention':_0x48118f,'content':_0x1bc57e,'replyId':_0x2c29ef},_0x4194f4=await this[_0x38c371(0x242)][_0x38c371(0x219)](_0x38c371(0x218)+_0x10ee90+_0x38c371(0x1eb),{'body':_0x126abd});return!_0x4194f4[_0x38c371(0x1ec)][_0x38c371(0x1e2)]||_0x4194f4[_0x38c371(0x1ec)]['error'][_0x38c371(0x208)]===0x1;}async['resolveComment'](_0x450b3b){const _0x15af90=_0x112b04,{unitId:_0x2a3bc4}=_0x450b3b,_0x177b0c=_0x450b3b['threadId'],_0x1af08b={'memberId':this[_0x15af90(0x20b)][_0x15af90(0x1ef)]()['userID'],'unitId':_0x2a3bc4,'threadId':_0x177b0c,'solved':_0x450b3b[_0x15af90(0x1dd)]?I[_0x15af90(0x239)]:I[_0x15af90(0x1f0)]},_0x4fa032=await this[_0x15af90(0x242)]['post'](_0x15af90(0x218)+_0x2a3bc4+_0x15af90(0x216),{'body':_0x1af08b});return!_0x4fa032['body'][_0x15af90(0x1e2)]||_0x4fa032[_0x15af90(0x1ec)][_0x15af90(0x1e2)]['code']===0x1;}async['deleteComment'](_0x4ed570,_0x232c4a,_0x277943,_0x796f50){const _0xed6518=_0x112b04,_0x333459={'memberId':(await this[_0xed6518(0x201)][_0xed6518(0x217)](_0x4ed570))['getMemberID'](),'threadId':_0x277943,'replyId':_0x796f50,'unitId':_0x4ed570},_0x3ed414=await this[_0xed6518(0x242)][_0xed6518(0x219)](_0xed6518(0x218)+_0x4ed570+'/delete',{'body':_0x333459});return!_0x3ed414[_0xed6518(0x1ec)][_0xed6518(0x1e2)]||_0x3ed414[_0xed6518(0x1ec)][_0xed6518(0x1e2)][_0xed6518(0x208)]===0x1;}async[_0x112b04(0x20f)](_0x524d12,_0x50c5d5,_0x38f3a7){const _0x4da3d9=_0x112b04,_0x28cbd7={'unitId':_0x524d12,'threadId':_0x38f3a7},_0x3b72d5=await this[_0x4da3d9(0x242)][_0x4da3d9(0x219)]('/universer-api/comment/unit/'+_0x524d12+_0x4da3d9(0x1ee),{'body':_0x28cbd7}),_0x4052ae=_0x38f3a7[_0x4da3d9(0x211)](_0x4da020=>ee(_0x3b72d5['body'][_0x4da3d9(0x213)][_0x4da020],_0x524d12,_0x50c5d5))['filter'](Boolean);return Object[_0x4da3d9(0x227)](_0x3b72d5['body']['users'])['forEach'](_0x45aab4=>{this['_userService']['addUser'](_0x45aab4);}),_0x4052ae;}['saveCommentToSnapshot'](_0x43266f){const _0x35d0fe=_0x112b04;return{'id':_0x43266f['id'],'threadId':_0x43266f[_0x35d0fe(0x1f6)],'ref':_0x43266f[_0x35d0fe(0x1fe)]};}};f=Q([_(0x0,_0x14bcb9(_0xe94ad1)),_(0x1,_0x14bcb9(_0x7fb191)),_(0x2,_0x14bcb9(_0x1fd72c)),_(0x3,_0x14bcb9(_0x568f8f))],f);var re=Object[_0x112b04(0x238)],te=(_0x1e9673,_0x2aee0e,_0x16a8c8,_0x14c147)=>{const _0x140c44=_0x112b04;for(var _0x39d39e=_0x14c147>0x1?void 0x0:_0x14c147?re(_0x2aee0e,_0x16a8c8):_0x2aee0e,_0x49ff5c=_0x1e9673[_0x140c44(0x1e8)]-0x1,_0x1d34a3;_0x49ff5c>=0x0;_0x49ff5c--)(_0x1d34a3=_0x1e9673[_0x49ff5c])&&(_0x39d39e=_0x1d34a3(_0x39d39e)||_0x39d39e);return _0x39d39e;},N=(_0x1026ad,_0x438215)=>(_0x7dcb19,_0x5dd47c)=>_0x438215(_0x7dcb19,_0x5dd47c,_0x1026ad);let g=class extends _0x910a31{constructor(_0x2f4743,_0x4ae55a){const _0x2d0732=_0x112b04;super(),this[_0x2d0732(0x203)]=_0x2f4743,this['_threadCommentDataSource']=_0x4ae55a,this[_0x2d0732(0x212)]();}[_0x112b04(0x212)](){const _0x5239eb=_0x112b04;this[_0x5239eb(0x203)][_0x5239eb(0x231)]=this[_0x5239eb(0x235)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x250605),N(0x1,_0x14bcb9(f))],g);var se=Object[_0x112b04(0x1f3)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x431503,_0x128673,_0x97c8f8)=>_0x128673 in _0x431503?se(_0x431503,_0x128673,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x97c8f8}):_0x431503[_0x128673]=_0x97c8f8,ie=(_0x3c56ac,_0x519380,_0x3b497c,_0x1677d6)=>{const _0x22eb53=_0x112b04;for(var _0x3c7ed4=_0x1677d6>0x1?void 0x0:_0x1677d6?oe(_0x519380,_0x3b497c):_0x519380,_0x314bbc=_0x3c56ac[_0x22eb53(0x1e8)]-0x1,_0x4f349e;_0x314bbc>=0x0;_0x314bbc--)(_0x4f349e=_0x3c56ac[_0x314bbc])&&(_0x3c7ed4=_0x4f349e(_0x3c7ed4)||_0x3c7ed4);return _0x3c7ed4;},w=(_0x3f5479,_0x5be5d0)=>(_0x14a34b,_0x8a6b3a)=>_0x5be5d0(_0x14a34b,_0x8a6b3a,_0x3f5479),$=(_0x17231e,_0x524521,_0x46592e)=>ne(_0x17231e,typeof _0x524521!=_0x112b04(0x1f4)?_0x524521+'':_0x524521,_0x46592e);let b=class extends _0x4040ad{constructor(_0xaa204c=M,_0x29e91e,_0x2c6d56){const _0x23fea7=_0x112b04;super(),this['_config']=_0xaa204c,this[_0x23fea7(0x224)]=_0x29e91e,this[_0x23fea7(0x1fd)]=_0x2c6d56;const {..._0x20b2d0}=_0x464ec7({},M,this[_0x23fea7(0x1f5)]);this[_0x23fea7(0x1fd)][_0x23fea7(0x206)](z,_0x20b2d0);}['onStarting'](){const _0x3282d2=_0x112b04;[[f],[g],[S]][_0x3282d2(0x20e)](_0x3cc11f=>{const _0x18daac=_0x3282d2;this['_injector'][_0x18daac(0x23b)](_0x3cc11f);});}['onReady'](){const _0x5bcd49=_0x112b04;this['_injector'][_0x5bcd49(0x1f7)](g),this[_0x5bcd49(0x224)][_0x5bcd49(0x1f7)](S);}};$(b,'pluginName',W),$(b,_0x112b04(0x233),_0x3be5a5[_0x112b04(0x204)]),b=ie([_0x1d015c(_0x4024f2,_0x27eaf3,_0x923530),w(0x1,_0x14bcb9(_0x568f8f)),w(0x2,_0x2f6a76)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x116d(){const _0x17732c=['getCurrentUser','OpenOrReOpen','user','389400qKQDaK','defineProperty','symbol','_config','threadId','get','slice','getMemberID','775851HKaDZt','userId','updateComment','_configService','ref','disposeWithMe','2rYslzt','_sessionService','personId','_threadCommentDataSourceService','UNIVER_UNKNOWN','2388537tZUSmc','setConfig','content','code','2272842UmVkSU','subscribe','_userService','_initUserSync','commentUpdate$','forEach','listComments','_threadCommentModel','map','_initDataSource','comments','Delete','payload','/solved','requireSession','/universer-api/comment/unit/','post','YYYY/MM/DD\x20HH:mm','5rUDHaI','Edit','3298240NNGZyH','UNRECOGNIZED','resolveComment','_init','Reply','replies','deleteComment','_injector','root','stringify','values','size','rangeId','comment','createTimestamp','/add','parse','userID','COMMENT','Unknown','dataSource','reply','type','2110857xJkFMX','_threadCommentDataSource','/reply','Add','getOwnPropertyDescriptor','Solved','users','add','Solve','24WMjMte','delete','addComment','getUnit','getUser','_httpService','resolved','replyId','_commentService','format','solved','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','9132740fnbtxY','pipe','addUser','customRanges','length','filter','find','/edit','body','rangeType','/list'];_0x116d=function(){return _0x17732c;};return _0x116d();}
|
|
1
|
+
const _0x218b1b=_0x5793;(function(_0x2f7d05,_0x345765){const _0x319dee=_0x5793,_0x582086=_0x2f7d05();while(!![]){try{const _0x4c5b48=-parseInt(_0x319dee(0x1ce))/0x1+parseInt(_0x319dee(0x1b3))/0x2+parseInt(_0x319dee(0x1e6))/0x3+parseInt(_0x319dee(0x1f2))/0x4+parseInt(_0x319dee(0x20a))/0x5+-parseInt(_0x319dee(0x1f6))/0x6+-parseInt(_0x319dee(0x1bb))/0x7*(parseInt(_0x319dee(0x1ef))/0x8);if(_0x4c5b48===_0x345765)break;else _0x582086['push'](_0x582086['shift']());}catch(_0x405fdf){_0x582086['push'](_0x582086['shift']());}}}(_0x1114,0xeb9c4));import{CommentService as _0x3c5e4f,CollaborationSessionService as _0x234389,UniverCollaborationClientPlugin as _0x529408}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e54fb}from'@univerjs-pro/license';import{dayjs as _0x57fc57,UserManagerService as _0x1e18f7,Inject as _0x57b463,Injector as _0x2b34e0,Disposable as _0x4b2cab,CustomRangeType as _0x41ef65,UniverInstanceType as _0x560016,DependentOn as _0x40913a,IConfigService as _0xec0c59,Plugin as _0x6a62ef,merge as _0x26f562}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x363f4c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x172d4d,IThreadCommentDataSourceService as _0x41f3b2}from'@univerjs/thread-comment';import{bufferTime as _0x1521d5}from'rxjs';import{HTTPService as _0x1b5530}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x48d5f4=>(_0x48d5f4[_0x48d5f4[_0x218b1b(0x1bf)]=0x0]='OpenOrReOpen',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1d5)]=0x1]='Solved',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1c3)]=-0x1]=_0x218b1b(0x1c3),_0x48d5f4))(I||{}),v=(_0x43bbf0=>(_0x43bbf0[_0x43bbf0[_0x218b1b(0x1d3)]=0x0]=_0x218b1b(0x1d3),_0x43bbf0[_0x43bbf0[_0x218b1b(0x200)]=0x1]=_0x218b1b(0x200),_0x43bbf0[_0x43bbf0[_0x218b1b(0x1b0)]=0x2]='Reply',_0x43bbf0[_0x43bbf0['Edit']=0x3]='Edit',_0x43bbf0[_0x43bbf0[_0x218b1b(0x1e9)]=0x4]=_0x218b1b(0x1e9),_0x43bbf0[_0x43bbf0['Solve']=0x5]=_0x218b1b(0x1ae),_0x43bbf0[_0x43bbf0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43bbf0))(v||{});const D=_0x5de655=>_0x57fc57(new Date(+_0x5de655))[_0x218b1b(0x1cb)](_0x218b1b(0x1af)),B=async(_0x32496e,_0x2a21a8)=>{const _0xc483cd=_0x218b1b,_0x452701=_0x32496e[_0xc483cd(0x1f7)](_0x1e18f7),_0x99a0b9=_0x32496e[_0xc483cd(0x1f7)](_0x1b5530);_0x2a21a8[_0xc483cd(0x1b5)](_0x453bfb=>{_0x452701['getUser'](_0x453bfb)&&_0x2a21a8['delete'](_0x453bfb);}),_0x2a21a8[_0xc483cd(0x1fa)]&&(await _0x99a0b9[_0xc483cd(0x1f7)](_0xc483cd(0x1bd),{'params':{'userIDs':[..._0x2a21a8]}}))[_0xc483cd(0x1cc)][_0xc483cd(0x209)][_0xc483cd(0x1b5)](_0x41d54c=>{const _0x40cb51=_0xc483cd;_0x41d54c&&_0x452701[_0x40cb51(0x1f5)](_0x41d54c);});};var K=Object[_0x218b1b(0x1cf)],V=(_0x2cc9fa,_0x6cc859,_0x1f408c,_0x5a37f6)=>{const _0x38341a=_0x218b1b;for(var _0x2d5a14=_0x5a37f6>0x1?void 0x0:_0x5a37f6?K(_0x6cc859,_0x1f408c):_0x6cc859,_0x4e9718=_0x2cc9fa[_0x38341a(0x1e8)]-0x1,_0x3b55ee;_0x4e9718>=0x0;_0x4e9718--)(_0x3b55ee=_0x2cc9fa[_0x4e9718])&&(_0x2d5a14=_0x3b55ee(_0x2d5a14)||_0x2d5a14);return _0x2d5a14;},p=(_0x28028a,_0x11976f)=>(_0x3ecca1,_0x5e38be)=>_0x11976f(_0x3ecca1,_0x5e38be,_0x28028a);let S=class extends _0x4b2cab{constructor(_0x21f0a9,_0x4257e6,_0xa3bc7f,_0x4d02f0){const _0x443dee=_0x218b1b;super(),this['_commentService']=_0x21f0a9,this[_0x443dee(0x1fb)]=_0x4257e6,this['_userService']=_0xa3bc7f,this[_0x443dee(0x1cd)]=_0x4d02f0,this[_0x443dee(0x1d7)](),this[_0x443dee(0x1b8)]();}['_initUserSync'](){const _0x1f7962=_0x218b1b;this[_0x1f7962(0x1ac)](this[_0x1f7962(0x1fb)][_0x1f7962(0x1d1)]['pipe'](_0x1521d5(0x10))[_0x1f7962(0x1f8)](_0x31fc0b=>{const _0x3e85e2=_0x1f7962,_0x47cd46=new Set();_0x31fc0b['forEach'](_0x50e185=>{const _0x35ff9=_0x5793;switch(_0x50e185[_0x35ff9(0x1d9)]){case'add':{const _0x3c6181=_0x50e185[_0x35ff9(0x1ee)][_0x35ff9(0x203)];_0x47cd46['add'](_0x3c6181);break;}}}),B(this[_0x3e85e2(0x1cd)],_0x47cd46);}));}[_0x218b1b(0x1d7)](){const _0x3df9e7=_0x218b1b;this[_0x3df9e7(0x1ac)](this[_0x3df9e7(0x1ba)]['commentUpdate$'][_0x3df9e7(0x1f8)](async _0x1c88f4=>{const _0x33f90b=_0x3df9e7;var _0x6a25fe,_0x309902,_0x192a9e,_0x447c29;const _0x4e8b8a=(_0x6a25fe=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4[_0x33f90b(0x1f0)])[_0x33f90b(0x1e4)](_0x3c4c23=>_0x3c4c23[_0x33f90b(0x1c1)]===_0x1c88f4['threadId']))==null?void 0x0:_0x6a25fe['root'];if(!_0x4e8b8a)return;const {unitId:_0x18e153,subUnitId:_0x1d86f0}=_0x4e8b8a;switch(_0x1c88f4[_0x33f90b(0x1e3)]&&this[_0x33f90b(0x1d8)]['addUser'](_0x1c88f4[_0x33f90b(0x1e3)]),_0x1c88f4[_0x33f90b(0x1d9)]){case v[_0x33f90b(0x200)]:break;case v[_0x33f90b(0x1b0)]:{this['_threadCommentModel'][_0x33f90b(0x1ea)](_0x18e153,_0x1d86f0,{'unitId':_0x18e153,'subUnitId':_0x1d86f0,'ref':'','id':_0x1c88f4[_0x33f90b(0x1dc)],'dT':D(+_0x1c88f4[_0x33f90b(0x1b6)]),'threadId':_0x1c88f4[_0x33f90b(0x1c1)],'personId':(_0x192a9e=(_0x309902=_0x1c88f4[_0x33f90b(0x1e3)])==null?void 0x0:_0x309902['userID'])!=null?_0x192a9e:_0x1c88f4[_0x33f90b(0x1ec)],'text':JSON['parse'](_0x1c88f4[_0x33f90b(0x1b4)]),'parentId':_0x4e8b8a['id']});break;}case v[_0x33f90b(0x1e9)]:{const _0x3e1005=this['_threadCommentModel'][_0x33f90b(0x1c8)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);_0x3e1005&&_0x3e1005[_0x33f90b(0x1e5)]&&this['_threadCommentModel'][_0x33f90b(0x1da)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);break;}case v['Edit']:{this[_0x33f90b(0x1fb)][_0x33f90b(0x1d2)](_0x18e153,_0x1d86f0,{'commentId':_0x1c88f4[_0x33f90b(0x1dc)],'text':JSON[_0x33f90b(0x1d4)](_0x1c88f4[_0x33f90b(0x1b4)])});break;}case v['Solve']:{const _0x79daf5=(_0x447c29=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4['unitId'])[_0x33f90b(0x1e4)](_0x4aa4d5=>_0x4aa4d5[_0x33f90b(0x1c1)]===_0x1c88f4[_0x33f90b(0x1c1)]))==null?void 0x0:_0x447c29[_0x33f90b(0x1de)];_0x79daf5&&this[_0x33f90b(0x1fb)][_0x33f90b(0x1b2)](_0x18e153,_0x1d86f0,_0x79daf5['id'],_0x1c88f4[_0x33f90b(0x1c2)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x57b463(_0x3c5e4f)),p(0x1,_0x57b463(_0x172d4d)),p(0x2,_0x57b463(_0x1e18f7)),p(0x3,_0x57b463(_0x2b34e0))],S);const z='thread-comment-data-source.config',M={};function _0x5793(_0x1a0fe1,_0x27a806){const _0x111446=_0x1114();return _0x5793=function(_0x579335,_0x46b67d){_0x579335=_0x579335-0x1aa;let _0x1aedd1=_0x111446[_0x579335];return _0x1aedd1;},_0x5793(_0x1a0fe1,_0x27a806);}var k=Object[_0x218b1b(0x1cf)],Q=(_0x2ee888,_0x5b796b,_0x39fb3a,_0x4f391c)=>{const _0x119055=_0x218b1b;for(var _0x38f24f=_0x4f391c>0x1?void 0x0:_0x4f391c?k(_0x5b796b,_0x39fb3a):_0x5b796b,_0x2da413=_0x2ee888[_0x119055(0x1e8)]-0x1,_0x9e11eb;_0x2da413>=0x0;_0x2da413--)(_0x9e11eb=_0x2ee888[_0x2da413])&&(_0x38f24f=_0x9e11eb(_0x38f24f)||_0x38f24f);return _0x38f24f;},_=(_0x1470ee,_0x3d6d6d)=>(_0x4fb35b,_0x35ff70)=>_0x3d6d6d(_0x4fb35b,_0x35ff70,_0x1470ee);function _0x1114(){const _0x3c601a=['getComment','customRanges','reply','format','body','_injector','617387WFSSks','getOwnPropertyDescriptor','_threadCommentDataSourceService','commentUpdate$','updateComment','Unknown','parse','Solved','_threadCommentDataSource','_init','_userService','type','deleteComment','/solved','replyId','comment','root','error','comments','_initDataSource','replies','user','find','parentId','5747580xgglVl','_config','length','Delete','addComment','add','userId','dataSource','payload','1913256CMWGYg','unitId','_sessionService','4049792MCZFHg','_configService','/universer-api/comment/unit/','addUser','5999292unGysp','get','subscribe','resolved','size','_threadCommentModel','code','UNIVER_UNKNOWN','pluginName','symbol','Add','_httpService','getMemberID','personId','saveCommentToSnapshot','getUnit','rangeId','rangeType','post','users','6177075QGObhl','values','onStarting','disposeWithMe','filter','Solve','YYYY/MM/DD\x20HH:mm','Reply','defineProperty','resolveComment','3055294MUFlmL','content','forEach','createTimestamp','/delete','_initUserSync','setConfig','_commentService','91GdzjXB','syncUpdateMutationToColla','/universer-api/user/list','/edit','OpenOrReOpen','stringify','threadId','solved','UNRECOGNIZED','map','COMMENT','requireSession','onReady'];_0x1114=function(){return _0x3c601a;};return _0x1114();}function X(_0x189eac,_0x9ab8f9){const _0x2bdc3e=_0x218b1b,_0x1902dc=_0x189eac[_0x2bdc3e(0x1e2)][0x0];return{..._0x9ab8f9,'id':_0x1902dc[_0x2bdc3e(0x1dc)],'resolved':_0x189eac[_0x2bdc3e(0x1c2)]===0x1,'dT':D(_0x1902dc[_0x2bdc3e(0x1b6)]),'personId':_0x1902dc[_0x2bdc3e(0x1ec)],'threadId':_0x1902dc[_0x2bdc3e(0x1c1)]};}function ee(_0x2d2a27,_0x4c5992,_0x4f4ff0){const _0x95fe85=_0x218b1b;var _0x2a5c90,_0x586e7d;if(((_0x586e7d=(_0x2a5c90=_0x2d2a27==null?void 0x0:_0x2d2a27[_0x95fe85(0x1e2)])==null?void 0x0:_0x2a5c90['length'])!=null?_0x586e7d:0x0)>0x0){const _0x372928=(_0x47ac82,_0x27ebc8)=>({'id':_0x47ac82['replyId'],'threadId':_0x47ac82[_0x95fe85(0x1c1)],'dT':D(_0x47ac82[_0x95fe85(0x1b6)]),'personId':_0x47ac82[_0x95fe85(0x1ec)],'resolved':_0x2d2a27[_0x95fe85(0x1c2)]===I[_0x95fe85(0x1d5)],'unitId':_0x4c5992,'subUnitId':_0x4f4ff0,'text':JSON[_0x95fe85(0x1d4)](_0x47ac82[_0x95fe85(0x1b4)]),'parentId':_0x27ebc8}),_0x29703f=_0x372928(_0x2d2a27['replies'][0x0]);return{..._0x29703f,'children':_0x2d2a27[_0x95fe85(0x1e2)]['slice'](0x1)['map'](_0x58c2f3=>_0x372928(_0x58c2f3,_0x29703f['id']))};}return null;}let f=class{constructor(_0x41015e,_0x36976e,_0x42020d,_0x5d1dcb){const _0x5e9b30=_0x218b1b;this['_httpService']=_0x41015e,this[_0x5e9b30(0x1d8)]=_0x36976e,this[_0x5e9b30(0x1f1)]=_0x42020d,this[_0x5e9b30(0x1cd)]=_0x5d1dcb;}async[_0x218b1b(0x1ea)](_0x550f4b){const _0x116228=_0x218b1b;var _0x4fc409,_0x35bca5;const {parentId:_0x1b284d,unitId:_0x5ca5bd,text:_0x231a87,threadId:_0x1046c5}=_0x550f4b,_0x15c45a=(_0x35bca5=(_0x4fc409=_0x231a87[_0x116228(0x1c9)])==null?void 0x0:_0x4fc409[_0x116228(0x1ad)](_0x31147d=>_0x31147d[_0x116228(0x207)]===_0x41ef65[_0x116228(0x1c5)])[_0x116228(0x1c4)](_0x4edcff=>_0x4edcff[_0x116228(0x206)]))!=null?_0x35bca5:[],_0xac80f6=JSON[_0x116228(0x1c0)](_0x231a87),_0x561a74=(await this[_0x116228(0x1f1)]['requireSession'](_0x5ca5bd))[_0x116228(0x202)]();if(_0x1b284d){const _0x2d29aa={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a,'threadId':_0x1046c5},_0x20a59b=(await this[_0x116228(0x201)][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/reply',{'body':_0x2d29aa}))[_0x116228(0x1cc)][_0x116228(0x1ca)];return{..._0x550f4b,'id':_0x20a59b[_0x116228(0x1dc)],'dT':_0x57fc57(+_0x20a59b[_0x116228(0x1b6)])[_0x116228(0x1cb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x20a59b[_0x116228(0x1ec)]};}else{const _0x5440ca={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a},_0x592c3c=await this['_httpService'][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/add',{'body':_0x5440ca});return X(_0x592c3c['body'][_0x116228(0x1dd)],_0x550f4b);}}async['updateComment'](_0x5421c1){const _0x59bc22=_0x218b1b;var _0xfaed3b,_0x54ba37;const {text:_0x4cd565,unitId:_0x9ecd81}=_0x5421c1,_0x34069a=(_0x54ba37=(_0xfaed3b=_0x4cd565[_0x59bc22(0x1c9)])==null?void 0x0:_0xfaed3b['filter'](_0x418fba=>_0x418fba[_0x59bc22(0x207)]===_0x41ef65['COMMENT'])[_0x59bc22(0x1c4)](_0x50346c=>_0x50346c[_0x59bc22(0x206)]))!=null?_0x54ba37:[],_0xdcdff2=JSON[_0x59bc22(0x1c0)](_0x4cd565),_0x27b6c7=_0x5421c1[_0x59bc22(0x1c1)],_0x257710=_0x5421c1['id'],_0x3b0da1={'memberId':(await this[_0x59bc22(0x1f1)][_0x59bc22(0x1c6)](_0x9ecd81))[_0x59bc22(0x202)](),'unitId':_0x9ecd81,'threadId':_0x27b6c7,'mention':_0x34069a,'content':_0xdcdff2,'replyId':_0x257710},_0x4c6c04=await this[_0x59bc22(0x201)][_0x59bc22(0x208)](_0x59bc22(0x1f4)+_0x9ecd81+_0x59bc22(0x1be),{'body':_0x3b0da1});return!_0x4c6c04[_0x59bc22(0x1cc)]['error']||_0x4c6c04[_0x59bc22(0x1cc)]['error']['code']===0x1;}async['resolveComment'](_0x15f442){const _0x29b574=_0x218b1b,{unitId:_0x3b631a}=_0x15f442,_0x5c634f=_0x15f442[_0x29b574(0x1c1)],_0x18d9bd={'memberId':this[_0x29b574(0x1d8)]['getCurrentUser']()['userID'],'unitId':_0x3b631a,'threadId':_0x5c634f,'solved':_0x15f442[_0x29b574(0x1f9)]?I['Solved']:I['OpenOrReOpen']},_0x21cb72=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3b631a+_0x29b574(0x1db),{'body':_0x18d9bd});return!_0x21cb72[_0x29b574(0x1cc)][_0x29b574(0x1df)]||_0x21cb72['body'][_0x29b574(0x1df)]['code']===0x1;}async[_0x218b1b(0x1da)](_0x4cbaea,_0x1d903c,_0x3beacd,_0x55ecda){const _0x413474=_0x218b1b,_0x442131={'memberId':(await this[_0x413474(0x1f1)]['requireSession'](_0x4cbaea))[_0x413474(0x202)](),'threadId':_0x3beacd,'replyId':_0x55ecda,'unitId':_0x4cbaea},_0x917901=await this[_0x413474(0x201)]['post'](_0x413474(0x1f4)+_0x4cbaea+_0x413474(0x1b7),{'body':_0x442131});return!_0x917901[_0x413474(0x1cc)][_0x413474(0x1df)]||_0x917901[_0x413474(0x1cc)]['error'][_0x413474(0x1fc)]===0x1;}async['listComments'](_0x15c2fe,_0x2fefd9,_0xa7015){const _0x3b66da=_0x218b1b,_0x425889={'unitId':_0x15c2fe,'threadId':_0xa7015},_0x5013fe=await this[_0x3b66da(0x201)]['post']('/universer-api/comment/unit/'+_0x15c2fe+'/list',{'body':_0x425889}),_0x17dd92=_0xa7015[_0x3b66da(0x1c4)](_0x246688=>ee(_0x5013fe['body'][_0x3b66da(0x1e0)][_0x246688],_0x15c2fe,_0x2fefd9))['filter'](Boolean);return Object[_0x3b66da(0x1aa)](_0x5013fe[_0x3b66da(0x1cc)][_0x3b66da(0x209)])[_0x3b66da(0x1b5)](_0x38cdf3=>{const _0xaa4097=_0x3b66da;this[_0xaa4097(0x1d8)][_0xaa4097(0x1f5)](_0x38cdf3);}),_0x17dd92;}[_0x218b1b(0x204)](_0x5564f2){const _0x4e676f=_0x218b1b;return{'id':_0x5564f2['id'],'threadId':_0x5564f2[_0x4e676f(0x1c1)],'ref':_0x5564f2['ref']};}};f=Q([_(0x0,_0x57b463(_0x1b5530)),_(0x1,_0x57b463(_0x1e18f7)),_(0x2,_0x57b463(_0x234389)),_(0x3,_0x57b463(_0x2b34e0))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x370407,_0xf4b3c0,_0x16d409,_0x36b6ff)=>{for(var _0x25d21d=_0x36b6ff>0x1?void 0x0:_0x36b6ff?re(_0xf4b3c0,_0x16d409):_0xf4b3c0,_0x347b03=_0x370407['length']-0x1,_0x3de019;_0x347b03>=0x0;_0x347b03--)(_0x3de019=_0x370407[_0x347b03])&&(_0x25d21d=_0x3de019(_0x25d21d)||_0x25d21d);return _0x25d21d;},N=(_0x57484d,_0x7b693a)=>(_0x11f3c3,_0x194d79)=>_0x7b693a(_0x11f3c3,_0x194d79,_0x57484d);let g=class extends _0x4b2cab{constructor(_0x4d2277,_0x373121){const _0x1e99dc=_0x218b1b;super(),this[_0x1e99dc(0x1d0)]=_0x4d2277,this[_0x1e99dc(0x1d6)]=_0x373121,this[_0x1e99dc(0x1e1)]();}['_initDataSource'](){const _0x4d7ec7=_0x218b1b;this[_0x4d7ec7(0x1d0)][_0x4d7ec7(0x1ed)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4d7ec7(0x1bc)]=!0x1;}};g=te([N(0x0,_0x41f3b2),N(0x1,_0x57b463(f))],g);var se=Object[_0x218b1b(0x1b1)],oe=Object[_0x218b1b(0x1cf)],ne=(_0x4d6cd6,_0x54b7d6,_0x2fef47)=>_0x54b7d6 in _0x4d6cd6?se(_0x4d6cd6,_0x54b7d6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2fef47}):_0x4d6cd6[_0x54b7d6]=_0x2fef47,ie=(_0x3ac978,_0x4e242f,_0x2a17b8,_0x30979f)=>{const _0x2c00e5=_0x218b1b;for(var _0x10bf60=_0x30979f>0x1?void 0x0:_0x30979f?oe(_0x4e242f,_0x2a17b8):_0x4e242f,_0x24bce6=_0x3ac978[_0x2c00e5(0x1e8)]-0x1,_0x30ffdf;_0x24bce6>=0x0;_0x24bce6--)(_0x30ffdf=_0x3ac978[_0x24bce6])&&(_0x10bf60=_0x30ffdf(_0x10bf60)||_0x10bf60);return _0x10bf60;},w=(_0x330e8e,_0x1aea17)=>(_0x326674,_0x3423e5)=>_0x1aea17(_0x326674,_0x3423e5,_0x330e8e),$=(_0x5c726b,_0x4c5532,_0x1ebdd9)=>ne(_0x5c726b,typeof _0x4c5532!=_0x218b1b(0x1ff)?_0x4c5532+'':_0x4c5532,_0x1ebdd9);let b=class extends _0x6a62ef{constructor(_0x1fafff=M,_0x2da749,_0x394955){const _0x4f8f84=_0x218b1b;super(),this[_0x4f8f84(0x1e7)]=_0x1fafff,this[_0x4f8f84(0x1cd)]=_0x2da749,this[_0x4f8f84(0x1f3)]=_0x394955;const {..._0x2d86ac}=_0x26f562({},M,this[_0x4f8f84(0x1e7)]);this[_0x4f8f84(0x1f3)][_0x4f8f84(0x1b9)](z,_0x2d86ac);}[_0x218b1b(0x1ab)](){const _0x1df57e=_0x218b1b;[[f],[g],[S]][_0x1df57e(0x1b5)](_0x1c0741=>{const _0x1207b6=_0x1df57e;this[_0x1207b6(0x1cd)][_0x1207b6(0x1eb)](_0x1c0741);});}[_0x218b1b(0x1c7)](){const _0x92beb3=_0x218b1b;this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](g),this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](S);}};$(b,_0x218b1b(0x1fe),W),$(b,_0x218b1b(0x1d9),_0x560016[_0x218b1b(0x1fd)]),b=ie([_0x40913a(_0x363f4c,_0x529408,_0x1e54fb),w(0x1,_0x57b463(_0x2b34e0)),w(0x2,_0xec0c59)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x140a(_0x473e61,_0x5f1b88){const _0x616d45=_0x616d();return _0x140a=function(_0x140a25,_0x4f8b47){_0x140a25=_0x140a25-0x1e4;let _0x1e2e1f=_0x616d45[_0x140a25];return _0x1e2e1f;},_0x140a(_0x473e61,_0x5f1b88);}function _0x616d(){const _0x2111a2=['_httpService','Delete','OpenOrReOpen','onReady','IThreadCommentDataSourceService','Disposable','@univerjs/thread-comment-ui','2396764HujyFm','addComment','users','@univerjs/core','/add','UniverThreadComment','rxjs','CollaborationSessionService','saveCommentToSnapshot','_sessionService','Edit','format','values','dayjs','code','delete','UniverThreadCommentUi','setConfig','body','getComment','Module','UNIVER_UNKNOWN','COMMENT','toStringTag','DependentOn','_initUserSync','requireSession','replies','_threadCommentModel','unitId','Injector','Solve','HTTPService','commentUpdate$','Add','/universer-api/user/list','bufferTime','IConfigService','resolveComment','_configService','parse','reply','CustomRangeType','solved','_injector','/universer-api/comment/unit/','userID','forEach','userId','Inject','find','999064Fwfpqv','getCurrentUser','payload','/edit','/solved','UniverLicensePlugin','getOwnPropertyDescriptor','5rowheP','688357JfyknH','ThreadCommentModel','replyId','customRanges','_config','_threadCommentDataSourceService','parentId','type','personId','@univerjs/network','comment','27KrPRkd','_userService','332562vErVXq','map','@univerjs-pro/collaboration-client','rangeId','dataSource','Solved','getUnit','length','exports','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','/reply','symbol','createTimestamp','size','root','post','getMemberID','UniverThreadCommentDataSourcePlugin','thread-comment-data-source.config','_init','user','defineProperty','UNRECOGNIZED','get','@univerjs-pro/license','_initDataSource','stringify','_commentService','content','function','/delete','UserManagerService','1793376zmMlSK','UniverProCollaborationClient','filter','add','Reply','updateComment','syncUpdateMutationToColla','error','657240EtLGaq','UniverNetwork','merge','object','addUser','4072677cHBQLz','YYYY/MM/DD\x20HH:mm','deleteComment','threadId','disposeWithMe'];_0x616d=function(){return _0x2111a2;};return _0x616d();}(function(_0x3934c9,_0x4fa952){const _0x2da5f3=_0x140a,_0x57bcf9=_0x3934c9();while(!![]){try{const _0x4b7b9b=parseInt(_0x2da5f3(0x217))/0x1+-parseInt(_0x2da5f3(0x224))/0x2+-parseInt(_0x2da5f3(0x24d))/0x3+parseInt(_0x2da5f3(0x25e))/0x4*(parseInt(_0x2da5f3(0x216))/0x5)+-parseInt(_0x2da5f3(0x245))/0x6+-parseInt(_0x2da5f3(0x252))/0x7+-parseInt(_0x2da5f3(0x20f))/0x8*(-parseInt(_0x2da5f3(0x222))/0x9);if(_0x4b7b9b===_0x4fa952)break;else _0x57bcf9['push'](_0x57bcf9['shift']());}catch(_0x3b792a){_0x57bcf9['push'](_0x57bcf9['shift']());}}}(_0x616d,0x60b61),function(_0x3494c9,_0x1255bc){const _0x37484f=_0x140a;typeof exports==_0x37484f(0x250)&&typeof module<'u'?_0x1255bc(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x37484f(0x242)&&define['amd']?define([_0x37484f(0x22c),_0x37484f(0x226),_0x37484f(0x23d),_0x37484f(0x261),_0x37484f(0x25d),'@univerjs/thread-comment',_0x37484f(0x264),_0x37484f(0x220)],_0x1255bc):(_0x3494c9=typeof globalThis<'u'?globalThis:_0x3494c9||self,_0x1255bc(_0x3494c9['UniverProThreadCommentDatasource']={},_0x3494c9[_0x37484f(0x246)],_0x3494c9['UniverProLicense'],_0x3494c9['UniverCore'],_0x3494c9[_0x37484f(0x1ec)],_0x3494c9[_0x37484f(0x263)],_0x3494c9['rxjs'],_0x3494c9[_0x37484f(0x24e)]));}(this,function(_0x8bcca2,_0x47ee75,_0x5538a2,_0x25c1bf,_0xd2e049,_0x17cd38,_0x28a8c0,_0x323163){'use strict';const _0x26c497=_0x140a;const _0x1b5c52=_0x26c497(0x22d);var _0x4ad343=(_0x45f2b0=>(_0x45f2b0[_0x45f2b0[_0x26c497(0x259)]=0x0]=_0x26c497(0x259),_0x45f2b0[_0x45f2b0['Solved']=0x1]='Solved',_0x45f2b0[_0x45f2b0[_0x26c497(0x23b)]=-0x1]=_0x26c497(0x23b),_0x45f2b0))(_0x4ad343||{}),_0x7132b5=(_0x4b4578=>(_0x4b4578[_0x4b4578['Unknown']=0x0]='Unknown',_0x4b4578[_0x4b4578[_0x26c497(0x1fe)]=0x1]='Add',_0x4b4578[_0x4b4578['Reply']=0x2]=_0x26c497(0x249),_0x4b4578[_0x4b4578[_0x26c497(0x1e6)]=0x3]='Edit',_0x4b4578[_0x4b4578[_0x26c497(0x258)]=0x4]='Delete',_0x4b4578[_0x4b4578[_0x26c497(0x1fb)]=0x5]='Solve',_0x4b4578[_0x4b4578[_0x26c497(0x23b)]=-0x1]=_0x26c497(0x23b),_0x4b4578))(_0x7132b5||{});const _0x6e2817=_0x11a811=>_0x25c1bf[_0x26c497(0x1e9)](new Date(+_0x11a811))['format'](_0x26c497(0x253)),_0x488ad0=async(_0x587106,_0x332b9c)=>{const _0x3e5e66=_0x26c497,_0x14854e=_0x587106[_0x3e5e66(0x23c)](_0x25c1bf[_0x3e5e66(0x244)]),_0x477c71=_0x587106[_0x3e5e66(0x23c)](_0x323163[_0x3e5e66(0x1fc)]);_0x332b9c[_0x3e5e66(0x20b)](_0x1a69ae=>{const _0x45472c=_0x3e5e66;_0x14854e['getUser'](_0x1a69ae)&&_0x332b9c[_0x45472c(0x1eb)](_0x1a69ae);}),_0x332b9c[_0x3e5e66(0x232)]&&(await _0x477c71['get'](_0x3e5e66(0x1ff),{'params':{'userIDs':[..._0x332b9c]}}))[_0x3e5e66(0x1ee)]['users'][_0x3e5e66(0x20b)](_0x2734f5=>{_0x2734f5&&_0x14854e['addUser'](_0x2734f5);});};var _0x4411ab=Object[_0x26c497(0x215)],_0x1caf62=(_0x39f35b,_0x36792f,_0x3e6d3c,_0x149e46)=>{const _0x3afe95=_0x26c497;for(var _0x47d12a=_0x149e46>0x1?void 0x0:_0x149e46?_0x4411ab(_0x36792f,_0x3e6d3c):_0x36792f,_0x11dfc0=_0x39f35b[_0x3afe95(0x22b)]-0x1,_0x5ec91d;_0x11dfc0>=0x0;_0x11dfc0--)(_0x5ec91d=_0x39f35b[_0x11dfc0])&&(_0x47d12a=_0x5ec91d(_0x47d12a)||_0x47d12a);return _0x47d12a;},_0x54e6b6=(_0x3e4b49,_0x87077)=>(_0x55803d,_0xb6bc58)=>_0x87077(_0x55803d,_0xb6bc58,_0x3e4b49);let _0x843680=class extends _0x25c1bf[_0x26c497(0x25c)]{constructor(_0xfc9597,_0x20f5b0,_0x485f85,_0x868df6){const _0x398e1c=_0x26c497;super(),this[_0x398e1c(0x240)]=_0xfc9597,this[_0x398e1c(0x1f8)]=_0x20f5b0,this[_0x398e1c(0x223)]=_0x485f85,this[_0x398e1c(0x208)]=_0x868df6,this[_0x398e1c(0x238)](),this[_0x398e1c(0x1f5)]();}[_0x26c497(0x1f5)](){const _0x262602=_0x26c497;this[_0x262602(0x256)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x28a8c0[_0x262602(0x200)](0x10))['subscribe'](_0x3b68bc=>{const _0x46d0fc=_0x262602,_0x3e9a0c=new Set();_0x3b68bc[_0x46d0fc(0x20b)](_0x5c71df=>{const _0x122747=_0x46d0fc;switch(_0x5c71df[_0x122747(0x21e)]){case _0x122747(0x248):{const _0x1c66f4=_0x5c71df[_0x122747(0x211)][_0x122747(0x21f)];_0x3e9a0c[_0x122747(0x248)](_0x1c66f4);break;}}}),_0x488ad0(this['_injector'],_0x3e9a0c);}));}[_0x26c497(0x238)](){const _0x58c40e=_0x26c497;this[_0x58c40e(0x256)](this[_0x58c40e(0x240)][_0x58c40e(0x1fd)]['subscribe'](async _0x1737bc=>{const _0x51ec3d=_0x58c40e;var _0x1247a4,_0x5d9296,_0x4a17a1,_0x46e1a5;const _0x3af0be=(_0x1247a4=this[_0x51ec3d(0x1f8)][_0x51ec3d(0x22a)](_0x1737bc['unitId'])[_0x51ec3d(0x20e)](_0x403357=>_0x403357['threadId']===_0x1737bc[_0x51ec3d(0x255)]))==null?void 0x0:_0x1247a4[_0x51ec3d(0x233)];if(!_0x3af0be)return;const {unitId:_0x3117e2,subUnitId:_0x468981}=_0x3af0be;switch(_0x1737bc[_0x51ec3d(0x239)]&&this[_0x51ec3d(0x223)]['addUser'](_0x1737bc['user']),_0x1737bc[_0x51ec3d(0x21e)]){case _0x7132b5['Add']:break;case _0x7132b5[_0x51ec3d(0x249)]:{this['_threadCommentModel'][_0x51ec3d(0x25f)](_0x3117e2,_0x468981,{'unitId':_0x3117e2,'subUnitId':_0x468981,'ref':'','id':_0x1737bc[_0x51ec3d(0x219)],'dT':_0x6e2817(+_0x1737bc[_0x51ec3d(0x231)]),'threadId':_0x1737bc['threadId'],'personId':(_0x4a17a1=(_0x5d9296=_0x1737bc[_0x51ec3d(0x239)])==null?void 0x0:_0x5d9296[_0x51ec3d(0x20a)])!=null?_0x4a17a1:_0x1737bc[_0x51ec3d(0x20c)],'text':JSON['parse'](_0x1737bc['content']),'parentId':_0x3af0be['id']});break;}case _0x7132b5['Delete']:{const _0x5cce07=this[_0x51ec3d(0x1f8)][_0x51ec3d(0x1ef)](_0x3117e2,_0x468981,_0x1737bc[_0x51ec3d(0x219)]);_0x5cce07&&_0x5cce07[_0x51ec3d(0x21d)]&&this['_threadCommentModel'][_0x51ec3d(0x254)](_0x3117e2,_0x468981,_0x1737bc[_0x51ec3d(0x219)]);break;}case _0x7132b5[_0x51ec3d(0x1e6)]:{this['_threadCommentModel'][_0x51ec3d(0x24a)](_0x3117e2,_0x468981,{'commentId':_0x1737bc['replyId'],'text':JSON[_0x51ec3d(0x204)](_0x1737bc[_0x51ec3d(0x241)])});break;}case _0x7132b5[_0x51ec3d(0x1fb)]:{const _0x20f0a3=(_0x46e1a5=this[_0x51ec3d(0x1f8)][_0x51ec3d(0x22a)](_0x1737bc[_0x51ec3d(0x1f9)])[_0x51ec3d(0x20e)](_0x4ceec4=>_0x4ceec4[_0x51ec3d(0x255)]===_0x1737bc['threadId']))==null?void 0x0:_0x46e1a5['root'];_0x20f0a3&&this[_0x51ec3d(0x1f8)][_0x51ec3d(0x202)](_0x3117e2,_0x468981,_0x20f0a3['id'],_0x1737bc[_0x51ec3d(0x207)]===_0x4ad343[_0x51ec3d(0x229)]);break;}}}));}};_0x843680=_0x1caf62([_0x54e6b6(0x0,_0x25c1bf[_0x26c497(0x20d)](_0x47ee75['CommentService'])),_0x54e6b6(0x1,_0x25c1bf[_0x26c497(0x20d)](_0x17cd38[_0x26c497(0x218)])),_0x54e6b6(0x2,_0x25c1bf['Inject'](_0x25c1bf[_0x26c497(0x244)])),_0x54e6b6(0x3,_0x25c1bf[_0x26c497(0x20d)](_0x25c1bf[_0x26c497(0x1fa)]))],_0x843680);const _0x2fc14d=_0x26c497(0x237),_0x398924={};var _0x3e8382=Object['getOwnPropertyDescriptor'],_0x4710f4=(_0x2f5c8a,_0x37cc82,_0x3ef54e,_0x3e8e47)=>{const _0x54b3aa=_0x26c497;for(var _0x3f3d85=_0x3e8e47>0x1?void 0x0:_0x3e8e47?_0x3e8382(_0x37cc82,_0x3ef54e):_0x37cc82,_0x13e722=_0x2f5c8a[_0x54b3aa(0x22b)]-0x1,_0x4f2ee7;_0x13e722>=0x0;_0x13e722--)(_0x4f2ee7=_0x2f5c8a[_0x13e722])&&(_0x3f3d85=_0x4f2ee7(_0x3f3d85)||_0x3f3d85);return _0x3f3d85;},_0x5a62a9=(_0x4a0821,_0x4904a3)=>(_0x1565d1,_0x4333cc)=>_0x4904a3(_0x1565d1,_0x4333cc,_0x4a0821);function _0x3185a9(_0x23dbd3,_0x541383){const _0xe50122=_0x26c497,_0x99f87c=_0x23dbd3[_0xe50122(0x1f7)][0x0];return{..._0x541383,'id':_0x99f87c[_0xe50122(0x219)],'resolved':_0x23dbd3[_0xe50122(0x207)]===0x1,'dT':_0x6e2817(_0x99f87c['createTimestamp']),'personId':_0x99f87c['userId'],'threadId':_0x99f87c[_0xe50122(0x255)]};}function _0x25c772(_0x5a6553,_0x3b4f50,_0x282ae9){const _0x387a6d=_0x26c497;var _0x1ce66a,_0x65438f;if(((_0x65438f=(_0x1ce66a=_0x5a6553==null?void 0x0:_0x5a6553[_0x387a6d(0x1f7)])==null?void 0x0:_0x1ce66a[_0x387a6d(0x22b)])!=null?_0x65438f:0x0)>0x0){const _0x47cbe4=(_0x4c3515,_0x11f791)=>({'id':_0x4c3515['replyId'],'threadId':_0x4c3515[_0x387a6d(0x255)],'dT':_0x6e2817(_0x4c3515[_0x387a6d(0x231)]),'personId':_0x4c3515[_0x387a6d(0x20c)],'resolved':_0x5a6553[_0x387a6d(0x207)]===_0x4ad343[_0x387a6d(0x229)],'unitId':_0x3b4f50,'subUnitId':_0x282ae9,'text':JSON[_0x387a6d(0x204)](_0x4c3515[_0x387a6d(0x241)]),'parentId':_0x11f791}),_0xdf233c=_0x47cbe4(_0x5a6553[_0x387a6d(0x1f7)][0x0]);return{..._0xdf233c,'children':_0x5a6553[_0x387a6d(0x1f7)]['slice'](0x1)[_0x387a6d(0x225)](_0x16734d=>_0x47cbe4(_0x16734d,_0xdf233c['id']))};}return null;}let _0x412e3e=class{constructor(_0x5e3450,_0x5db3e1,_0x26ac65,_0x31e19d){const _0x309df6=_0x26c497;this['_httpService']=_0x5e3450,this[_0x309df6(0x223)]=_0x5db3e1,this[_0x309df6(0x1e5)]=_0x26ac65,this[_0x309df6(0x208)]=_0x31e19d;}async[_0x26c497(0x25f)](_0x14ca40){const _0x128423=_0x26c497;var _0xe801f4,_0x48298f;const {parentId:_0x1d120b,unitId:_0x29c743,text:_0x446fe5,threadId:_0x455a24}=_0x14ca40,_0x170bb2=(_0x48298f=(_0xe801f4=_0x446fe5[_0x128423(0x21a)])==null?void 0x0:_0xe801f4[_0x128423(0x247)](_0x3771c2=>_0x3771c2['rangeType']===_0x25c1bf[_0x128423(0x206)][_0x128423(0x1f2)])[_0x128423(0x225)](_0x1100b6=>_0x1100b6[_0x128423(0x227)]))!=null?_0x48298f:[],_0x17d346=JSON[_0x128423(0x23f)](_0x446fe5),_0x6d3cc5=(await this['_sessionService']['requireSession'](_0x29c743))['getMemberID']();if(_0x1d120b){const _0x2739eb={'memberId':_0x6d3cc5,'unitId':_0x29c743,'content':_0x17d346,'mention':_0x170bb2,'threadId':_0x455a24},_0x157939=(await this[_0x128423(0x257)][_0x128423(0x234)](_0x128423(0x209)+_0x29c743+_0x128423(0x22f),{'body':_0x2739eb}))[_0x128423(0x1ee)][_0x128423(0x205)];return{..._0x14ca40,'id':_0x157939['replyId'],'dT':_0x25c1bf[_0x128423(0x1e9)](+_0x157939[_0x128423(0x231)])[_0x128423(0x1e7)](_0x128423(0x253)),'personId':_0x157939[_0x128423(0x20c)]};}else{const _0x232285={'memberId':_0x6d3cc5,'unitId':_0x29c743,'content':_0x17d346,'mention':_0x170bb2},_0x4113c3=await this[_0x128423(0x257)][_0x128423(0x234)](_0x128423(0x209)+_0x29c743+_0x128423(0x262),{'body':_0x232285});return _0x3185a9(_0x4113c3['body'][_0x128423(0x221)],_0x14ca40);}}async[_0x26c497(0x24a)](_0x583b73){const _0x233c92=_0x26c497;var _0x3f0c76,_0x55f35c;const {text:_0x5293f3,unitId:_0x3611e4}=_0x583b73,_0x145d33=(_0x55f35c=(_0x3f0c76=_0x5293f3[_0x233c92(0x21a)])==null?void 0x0:_0x3f0c76[_0x233c92(0x247)](_0x136a6a=>_0x136a6a['rangeType']===_0x25c1bf['CustomRangeType'][_0x233c92(0x1f2)])['map'](_0x27a36d=>_0x27a36d['rangeId']))!=null?_0x55f35c:[],_0x283124=JSON['stringify'](_0x5293f3),_0x2288a6=_0x583b73[_0x233c92(0x255)],_0x1b80ed=_0x583b73['id'],_0x471d13={'memberId':(await this[_0x233c92(0x1e5)][_0x233c92(0x1f6)](_0x3611e4))[_0x233c92(0x235)](),'unitId':_0x3611e4,'threadId':_0x2288a6,'mention':_0x145d33,'content':_0x283124,'replyId':_0x1b80ed},_0x37c10d=await this[_0x233c92(0x257)][_0x233c92(0x234)](_0x233c92(0x209)+_0x3611e4+_0x233c92(0x212),{'body':_0x471d13});return!_0x37c10d[_0x233c92(0x1ee)][_0x233c92(0x24c)]||_0x37c10d[_0x233c92(0x1ee)]['error'][_0x233c92(0x1ea)]===0x1;}async[_0x26c497(0x202)](_0x171503){const _0x239218=_0x26c497,{unitId:_0x5cc4f4}=_0x171503,_0x3fabd9=_0x171503['threadId'],_0x47c7ea={'memberId':this[_0x239218(0x223)][_0x239218(0x210)]()[_0x239218(0x20a)],'unitId':_0x5cc4f4,'threadId':_0x3fabd9,'solved':_0x171503['resolved']?_0x4ad343[_0x239218(0x229)]:_0x4ad343['OpenOrReOpen']},_0xe49c70=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5cc4f4+_0x239218(0x213),{'body':_0x47c7ea});return!_0xe49c70[_0x239218(0x1ee)][_0x239218(0x24c)]||_0xe49c70['body']['error'][_0x239218(0x1ea)]===0x1;}async[_0x26c497(0x254)](_0x3fb4fd,_0x268e61,_0x2b5e60,_0x43c011){const _0x2442a1=_0x26c497,_0x43408e={'memberId':(await this[_0x2442a1(0x1e5)][_0x2442a1(0x1f6)](_0x3fb4fd))[_0x2442a1(0x235)](),'threadId':_0x2b5e60,'replyId':_0x43c011,'unitId':_0x3fb4fd},_0x149149=await this[_0x2442a1(0x257)]['post'](_0x2442a1(0x209)+_0x3fb4fd+_0x2442a1(0x243),{'body':_0x43408e});return!_0x149149[_0x2442a1(0x1ee)][_0x2442a1(0x24c)]||_0x149149[_0x2442a1(0x1ee)][_0x2442a1(0x24c)]['code']===0x1;}async['listComments'](_0x5ad15d,_0x2d75b0,_0x277bf2){const _0x784e0f=_0x26c497,_0x492f8e={'unitId':_0x5ad15d,'threadId':_0x277bf2},_0x1bc148=await this['_httpService'][_0x784e0f(0x234)]('/universer-api/comment/unit/'+_0x5ad15d+_0x784e0f(0x22e),{'body':_0x492f8e}),_0x26816d=_0x277bf2[_0x784e0f(0x225)](_0x20f8db=>_0x25c772(_0x1bc148['body']['comments'][_0x20f8db],_0x5ad15d,_0x2d75b0))['filter'](Boolean);return Object[_0x784e0f(0x1e8)](_0x1bc148[_0x784e0f(0x1ee)][_0x784e0f(0x260)])[_0x784e0f(0x20b)](_0xb17ab7=>{const _0x932c67=_0x784e0f;this['_userService'][_0x932c67(0x251)](_0xb17ab7);}),_0x26816d;}[_0x26c497(0x1e4)](_0x5ac5a9){const _0x3671b5=_0x26c497;return{'id':_0x5ac5a9['id'],'threadId':_0x5ac5a9[_0x3671b5(0x255)],'ref':_0x5ac5a9['ref']};}};_0x412e3e=_0x4710f4([_0x5a62a9(0x0,_0x25c1bf[_0x26c497(0x20d)](_0x323163[_0x26c497(0x1fc)])),_0x5a62a9(0x1,_0x25c1bf[_0x26c497(0x20d)](_0x25c1bf[_0x26c497(0x244)])),_0x5a62a9(0x2,_0x25c1bf[_0x26c497(0x20d)](_0x47ee75[_0x26c497(0x265)])),_0x5a62a9(0x3,_0x25c1bf[_0x26c497(0x20d)](_0x25c1bf[_0x26c497(0x1fa)]))],_0x412e3e);var _0x1ae175=Object[_0x26c497(0x215)],_0x4f2a75=(_0x2e09d7,_0xd110f7,_0x57ee63,_0x7d5c43)=>{const _0x100ec9=_0x26c497;for(var _0x306db3=_0x7d5c43>0x1?void 0x0:_0x7d5c43?_0x1ae175(_0xd110f7,_0x57ee63):_0xd110f7,_0x32cef4=_0x2e09d7[_0x100ec9(0x22b)]-0x1,_0x9f03b7;_0x32cef4>=0x0;_0x32cef4--)(_0x9f03b7=_0x2e09d7[_0x32cef4])&&(_0x306db3=_0x9f03b7(_0x306db3)||_0x306db3);return _0x306db3;},_0x155995=(_0x12488,_0x36b6f0)=>(_0x197bd2,_0x5aa94a)=>_0x36b6f0(_0x197bd2,_0x5aa94a,_0x12488);let _0x40d96e=class extends _0x25c1bf[_0x26c497(0x25c)]{constructor(_0x229f1f,_0x4064d5){const _0xd47ac=_0x26c497;super(),this[_0xd47ac(0x21c)]=_0x229f1f,this['_threadCommentDataSource']=_0x4064d5,this[_0xd47ac(0x23e)]();}[_0x26c497(0x23e)](){const _0x23aa0f=_0x26c497;this[_0x23aa0f(0x21c)][_0x23aa0f(0x228)]=this['_threadCommentDataSource'],this[_0x23aa0f(0x21c)][_0x23aa0f(0x24b)]=!0x1;}};_0x40d96e=_0x4f2a75([_0x155995(0x0,_0x17cd38[_0x26c497(0x25b)]),_0x155995(0x1,_0x25c1bf[_0x26c497(0x20d)](_0x412e3e))],_0x40d96e);var _0x10a329=Object[_0x26c497(0x23a)],_0xb1647=Object[_0x26c497(0x215)],_0x4e52c0=(_0x39dc91,_0x4f220f,_0x8a2946)=>_0x4f220f in _0x39dc91?_0x10a329(_0x39dc91,_0x4f220f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8a2946}):_0x39dc91[_0x4f220f]=_0x8a2946,_0x199e4c=(_0x31d6e1,_0xcdf2bf,_0x1f88a3,_0x4468ab)=>{const _0x1f4614=_0x26c497;for(var _0x27d71d=_0x4468ab>0x1?void 0x0:_0x4468ab?_0xb1647(_0xcdf2bf,_0x1f88a3):_0xcdf2bf,_0x44bf9f=_0x31d6e1[_0x1f4614(0x22b)]-0x1,_0x4316c6;_0x44bf9f>=0x0;_0x44bf9f--)(_0x4316c6=_0x31d6e1[_0x44bf9f])&&(_0x27d71d=_0x4316c6(_0x27d71d)||_0x27d71d);return _0x27d71d;},_0x3d8c74=(_0x3c9866,_0x4a4b73)=>(_0x5d245c,_0x5a919d)=>_0x4a4b73(_0x5d245c,_0x5a919d,_0x3c9866),_0x1fbf1f=(_0x285d62,_0x230194,_0x2898bb)=>_0x4e52c0(_0x285d62,typeof _0x230194!=_0x26c497(0x230)?_0x230194+'':_0x230194,_0x2898bb);_0x8bcca2[_0x26c497(0x236)]=class extends _0x25c1bf['Plugin']{constructor(_0x321357=_0x398924,_0x3d7f0d,_0x37b0f6){const _0x1fa541=_0x26c497;super(),this[_0x1fa541(0x21b)]=_0x321357,this['_injector']=_0x3d7f0d,this[_0x1fa541(0x203)]=_0x37b0f6;const {..._0x54b11b}=_0x25c1bf[_0x1fa541(0x24f)]({},_0x398924,this['_config']);this[_0x1fa541(0x203)][_0x1fa541(0x1ed)](_0x2fc14d,_0x54b11b);}['onStarting'](){const _0x40f9b8=_0x26c497;[[_0x412e3e],[_0x40d96e],[_0x843680]][_0x40f9b8(0x20b)](_0x3388a3=>{const _0x58a32b=_0x40f9b8;this[_0x58a32b(0x208)][_0x58a32b(0x248)](_0x3388a3);});}[_0x26c497(0x25a)](){const _0x4a48d7=_0x26c497;this[_0x4a48d7(0x208)][_0x4a48d7(0x23c)](_0x40d96e),this['_injector']['get'](_0x843680);}},_0x1fbf1f(_0x8bcca2[_0x26c497(0x236)],'pluginName',_0x1b5c52),_0x1fbf1f(_0x8bcca2[_0x26c497(0x236)],_0x26c497(0x21e),_0x25c1bf['UniverInstanceType'][_0x26c497(0x1f1)]),_0x8bcca2[_0x26c497(0x236)]=_0x199e4c([_0x25c1bf[_0x26c497(0x1f4)](_0xd2e049['UniverThreadCommentUIPlugin'],_0x47ee75['UniverCollaborationClientPlugin'],_0x5538a2[_0x26c497(0x214)]),_0x3d8c74(0x1,_0x25c1bf[_0x26c497(0x20d)](_0x25c1bf['Injector'])),_0x3d8c74(0x2,_0x25c1bf[_0x26c497(0x201)])],_0x8bcca2['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x8bcca2,Symbol[_0x26c497(0x1f3)],{'value':_0x26c497(0x1f0)});}));
|
|
1
|
+
(function(_0x3cb9e3,_0x23efbe){const _0x1c905c=_0x4349,_0x94e9da=_0x3cb9e3();while(!![]){try{const _0x2b3ed6=-parseInt(_0x1c905c(0x12a))/0x1*(parseInt(_0x1c905c(0xe3))/0x2)+-parseInt(_0x1c905c(0x143))/0x3*(-parseInt(_0x1c905c(0x13c))/0x4)+-parseInt(_0x1c905c(0x136))/0x5+-parseInt(_0x1c905c(0xca))/0x6+-parseInt(_0x1c905c(0xf1))/0x7*(parseInt(_0x1c905c(0x152))/0x8)+-parseInt(_0x1c905c(0x14d))/0x9*(-parseInt(_0x1c905c(0x117))/0xa)+parseInt(_0x1c905c(0xd3))/0xb;if(_0x2b3ed6===_0x23efbe)break;else _0x94e9da['push'](_0x94e9da['shift']());}catch(_0x4e113e){_0x94e9da['push'](_0x94e9da['shift']());}}}(_0x2ee3,0x97429),function(_0x2082cd,_0x298a19){const _0x288384=_0x4349;typeof exports==_0x288384(0x146)&&typeof module<'u'?_0x298a19(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x288384(0x155)&&define[_0x288384(0x126)]?define(['exports',_0x288384(0x14f),'@univerjs-pro/license',_0x288384(0xc9),_0x288384(0xe8),_0x288384(0x132),'rxjs',_0x288384(0xe9)],_0x298a19):(_0x2082cd=typeof globalThis<'u'?globalThis:_0x2082cd||self,_0x298a19(_0x2082cd['UniverProThreadCommentDatasource']={},_0x2082cd[_0x288384(0x11a)],_0x2082cd[_0x288384(0xeb)],_0x2082cd[_0x288384(0x10e)],_0x2082cd[_0x288384(0x150)],_0x2082cd[_0x288384(0xe6)],_0x2082cd[_0x288384(0x10b)],_0x2082cd[_0x288384(0x133)]));}(this,function(_0x1d1eab,_0x59815a,_0x3fc5c7,_0x2941a7,_0x151541,_0xb01d52,_0x10a70d,_0x2e8727){'use strict';const _0x791389=_0x4349;const _0x2612f2=_0x791389(0xd9);var _0x2634df=(_0x4f5787=>(_0x4f5787[_0x4f5787['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4f5787[_0x4f5787[_0x791389(0x121)]=0x1]='Solved',_0x4f5787[_0x4f5787[_0x791389(0x12d)]=-0x1]=_0x791389(0x12d),_0x4f5787))(_0x2634df||{}),_0xfb16b=(_0x1bbab5=>(_0x1bbab5[_0x1bbab5[_0x791389(0x147)]=0x0]='Unknown',_0x1bbab5[_0x1bbab5[_0x791389(0x114)]=0x1]='Add',_0x1bbab5[_0x1bbab5[_0x791389(0x109)]=0x2]='Reply',_0x1bbab5[_0x1bbab5[_0x791389(0xf6)]=0x3]=_0x791389(0xf6),_0x1bbab5[_0x1bbab5[_0x791389(0x10c)]=0x4]=_0x791389(0x10c),_0x1bbab5[_0x1bbab5['Solve']=0x5]=_0x791389(0x125),_0x1bbab5[_0x1bbab5[_0x791389(0x12d)]=-0x1]=_0x791389(0x12d),_0x1bbab5))(_0xfb16b||{});const _0x27177d=_0x5d50de=>_0x2941a7[_0x791389(0xe1)](new Date(+_0x5d50de))['format'](_0x791389(0xe2)),_0x101a6e=async(_0x3f8a74,_0x53a6af)=>{const _0x124d6a=_0x791389,_0x56be90=_0x3f8a74[_0x124d6a(0x153)](_0x2941a7['UserManagerService']),_0x470019=_0x3f8a74[_0x124d6a(0x153)](_0x2e8727['HTTPService']);_0x53a6af['forEach'](_0x379409=>{const _0xb48919=_0x124d6a;_0x56be90[_0xb48919(0x13d)](_0x379409)&&_0x53a6af[_0xb48919(0xec)](_0x379409);}),_0x53a6af[_0x124d6a(0x135)]&&(await _0x470019['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x53a6af]}}))[_0x124d6a(0x14e)][_0x124d6a(0x13e)][_0x124d6a(0xf5)](_0x1acfea=>{const _0xf92bac=_0x124d6a;_0x1acfea&&_0x56be90[_0xf92bac(0x100)](_0x1acfea);});};var _0x3cb4ab=Object[_0x791389(0x108)],_0x2fe928=(_0x530ee7,_0x178237,_0x58f4f1,_0x4a04ba)=>{for(var _0x1a808b=_0x4a04ba>0x1?void 0x0:_0x4a04ba?_0x3cb4ab(_0x178237,_0x58f4f1):_0x178237,_0xe8ef32=_0x530ee7['length']-0x1,_0x5dc490;_0xe8ef32>=0x0;_0xe8ef32--)(_0x5dc490=_0x530ee7[_0xe8ef32])&&(_0x1a808b=_0x5dc490(_0x1a808b)||_0x1a808b);return _0x1a808b;},_0x2d50d3=(_0xd9eb62,_0x36737d)=>(_0xfd588a,_0x113573)=>_0x36737d(_0xfd588a,_0x113573,_0xd9eb62);let _0x40a442=class extends _0x2941a7[_0x791389(0xce)]{constructor(_0x3d3e1e,_0x3d7ff2,_0x3f3215,_0x349725){const _0xa306dd=_0x791389;super(),this[_0xa306dd(0xfb)]=_0x3d3e1e,this['_threadCommentModel']=_0x3d7ff2,this[_0xa306dd(0x137)]=_0x3f3215,this[_0xa306dd(0xcf)]=_0x349725,this['_init'](),this[_0xa306dd(0x130)]();}[_0x791389(0x130)](){const _0x38b593=_0x791389;this['disposeWithMe'](this['_threadCommentModel'][_0x38b593(0xea)][_0x38b593(0xd2)](_0x10a70d[_0x38b593(0x124)](0x10))[_0x38b593(0xe5)](_0x49fd3b=>{const _0x5397fb=new Set();_0x49fd3b['forEach'](_0x2fe6fc=>{const _0x37d0fb=_0x4349;switch(_0x2fe6fc[_0x37d0fb(0x11e)]){case _0x37d0fb(0xfd):{const _0xd34595=_0x2fe6fc[_0x37d0fb(0xee)]['personId'];_0x5397fb[_0x37d0fb(0xfd)](_0xd34595);break;}}}),_0x101a6e(this['_injector'],_0x5397fb);}));}[_0x791389(0x113)](){const _0x733764=_0x791389;this[_0x733764(0x103)](this[_0x733764(0xfb)][_0x733764(0xea)][_0x733764(0xe5)](async _0xe6d531=>{const _0x44b3ed=_0x733764;var _0x57d5d7,_0x3a0762,_0x28d9f5,_0x20f0e5;const _0x323aea=(_0x57d5d7=this['_threadCommentModel'][_0x44b3ed(0x116)](_0xe6d531[_0x44b3ed(0xd0)])[_0x44b3ed(0x12e)](_0x1e7913=>_0x1e7913[_0x44b3ed(0xf4)]===_0xe6d531[_0x44b3ed(0xf4)]))==null?void 0x0:_0x57d5d7['root'];if(!_0x323aea)return;const {unitId:_0x1ac90f,subUnitId:_0x11e763}=_0x323aea;switch(_0xe6d531[_0x44b3ed(0x139)]&&this[_0x44b3ed(0x137)][_0x44b3ed(0x100)](_0xe6d531[_0x44b3ed(0x139)]),_0xe6d531['type']){case _0xfb16b[_0x44b3ed(0x114)]:break;case _0xfb16b['Reply']:{this['_threadCommentModel'][_0x44b3ed(0x14a)](_0x1ac90f,_0x11e763,{'unitId':_0x1ac90f,'subUnitId':_0x11e763,'ref':'','id':_0xe6d531[_0x44b3ed(0xcb)],'dT':_0x27177d(+_0xe6d531[_0x44b3ed(0x151)]),'threadId':_0xe6d531[_0x44b3ed(0xf4)],'personId':(_0x28d9f5=(_0x3a0762=_0xe6d531[_0x44b3ed(0x139)])==null?void 0x0:_0x3a0762[_0x44b3ed(0xdd)])!=null?_0x28d9f5:_0xe6d531[_0x44b3ed(0x122)],'text':JSON[_0x44b3ed(0x110)](_0xe6d531[_0x44b3ed(0x128)]),'parentId':_0x323aea['id']});break;}case _0xfb16b[_0x44b3ed(0x10c)]:{const _0x1bde4f=this[_0x44b3ed(0x115)][_0x44b3ed(0x12c)](_0x1ac90f,_0x11e763,_0xe6d531[_0x44b3ed(0xcb)]);_0x1bde4f&&_0x1bde4f[_0x44b3ed(0xcc)]&&this[_0x44b3ed(0x115)]['deleteComment'](_0x1ac90f,_0x11e763,_0xe6d531['replyId']);break;}case _0xfb16b[_0x44b3ed(0xf6)]:{this[_0x44b3ed(0x115)][_0x44b3ed(0x127)](_0x1ac90f,_0x11e763,{'commentId':_0xe6d531[_0x44b3ed(0xcb)],'text':JSON['parse'](_0xe6d531[_0x44b3ed(0x128)])});break;}case _0xfb16b['Solve']:{const _0x3b76bf=(_0x20f0e5=this[_0x44b3ed(0x115)][_0x44b3ed(0x116)](_0xe6d531[_0x44b3ed(0xd0)])[_0x44b3ed(0x12e)](_0x17078d=>_0x17078d[_0x44b3ed(0xf4)]===_0xe6d531['threadId']))==null?void 0x0:_0x20f0e5[_0x44b3ed(0x13a)];_0x3b76bf&&this[_0x44b3ed(0x115)][_0x44b3ed(0x134)](_0x1ac90f,_0x11e763,_0x3b76bf['id'],_0xe6d531[_0x44b3ed(0xfa)]===_0x2634df['Solved']);break;}}}));}};_0x40a442=_0x2fe928([_0x2d50d3(0x0,_0x2941a7[_0x791389(0xe4)](_0x59815a[_0x791389(0xfc)])),_0x2d50d3(0x1,_0x2941a7[_0x791389(0xe4)](_0xb01d52[_0x791389(0xd4)])),_0x2d50d3(0x2,_0x2941a7['Inject'](_0x2941a7[_0x791389(0xc8)])),_0x2d50d3(0x3,_0x2941a7[_0x791389(0xe4)](_0x2941a7['Injector']))],_0x40a442);const _0x2d2338=_0x791389(0x11c),_0x48ec76={};var _0x268268=Object[_0x791389(0x108)],_0x3febf1=(_0x2085c7,_0x4209db,_0x279c9c,_0x589bb8)=>{const _0x431324=_0x791389;for(var _0x163df2=_0x589bb8>0x1?void 0x0:_0x589bb8?_0x268268(_0x4209db,_0x279c9c):_0x4209db,_0x2b8701=_0x2085c7[_0x431324(0x11b)]-0x1,_0x19a0bf;_0x2b8701>=0x0;_0x2b8701--)(_0x19a0bf=_0x2085c7[_0x2b8701])&&(_0x163df2=_0x19a0bf(_0x163df2)||_0x163df2);return _0x163df2;},_0x5ba8de=(_0xb7cd67,_0x5cadf0)=>(_0x1e739f,_0x51ecf0)=>_0x5cadf0(_0x1e739f,_0x51ecf0,_0xb7cd67);function _0x1d6d94(_0xff0cf2,_0x35dc67){const _0x336a7d=_0x791389,_0x4b54a1=_0xff0cf2[_0x336a7d(0x10d)][0x0];return{..._0x35dc67,'id':_0x4b54a1[_0x336a7d(0xcb)],'resolved':_0xff0cf2[_0x336a7d(0xfa)]===0x1,'dT':_0x27177d(_0x4b54a1[_0x336a7d(0x151)]),'personId':_0x4b54a1[_0x336a7d(0x122)],'threadId':_0x4b54a1['threadId']};}function _0x14b44e(_0x566e8e,_0x5352c0,_0x642dc5){const _0x41848e=_0x791389;var _0x5f1af9,_0x1adfb4;if(((_0x1adfb4=(_0x5f1af9=_0x566e8e==null?void 0x0:_0x566e8e['replies'])==null?void 0x0:_0x5f1af9['length'])!=null?_0x1adfb4:0x0)>0x0){const _0x4effce=(_0x506365,_0x40dd2b)=>({'id':_0x506365[_0x41848e(0xcb)],'threadId':_0x506365[_0x41848e(0xf4)],'dT':_0x27177d(_0x506365['createTimestamp']),'personId':_0x506365['userId'],'resolved':_0x566e8e[_0x41848e(0xfa)]===_0x2634df[_0x41848e(0x121)],'unitId':_0x5352c0,'subUnitId':_0x642dc5,'text':JSON['parse'](_0x506365[_0x41848e(0x128)]),'parentId':_0x40dd2b}),_0x2d6383=_0x4effce(_0x566e8e[_0x41848e(0x10d)][0x0]);return{..._0x2d6383,'children':_0x566e8e[_0x41848e(0x10d)][_0x41848e(0x142)](0x1)[_0x41848e(0xe7)](_0x183574=>_0x4effce(_0x183574,_0x2d6383['id']))};}return null;}let _0x316b70=class{constructor(_0x3eabbc,_0x3574d0,_0x202aa2,_0x28d3e4){const _0x1dbd11=_0x791389;this[_0x1dbd11(0xf9)]=_0x3eabbc,this['_userService']=_0x3574d0,this[_0x1dbd11(0x101)]=_0x202aa2,this[_0x1dbd11(0xcf)]=_0x28d3e4;}async[_0x791389(0x14a)](_0x5ac52f){const _0x1bd848=_0x791389;var _0x47a92c,_0x3852bd;const {parentId:_0x52912d,unitId:_0xda665c,text:_0x338227,threadId:_0x28e76d}=_0x5ac52f,_0x450b21=(_0x3852bd=(_0x47a92c=_0x338227[_0x1bd848(0x11f)])==null?void 0x0:_0x47a92c[_0x1bd848(0xff)](_0x2127b6=>_0x2127b6[_0x1bd848(0x119)]===_0x2941a7[_0x1bd848(0xed)][_0x1bd848(0x138)])['map'](_0x4846aa=>_0x4846aa[_0x1bd848(0x10a)]))!=null?_0x3852bd:[],_0x1f12ad=JSON[_0x1bd848(0x10f)](_0x338227),_0x4168d4=(await this[_0x1bd848(0x101)]['requireSession'](_0xda665c))[_0x1bd848(0x112)]();if(_0x52912d){const _0x32bb13={'memberId':_0x4168d4,'unitId':_0xda665c,'content':_0x1f12ad,'mention':_0x450b21,'threadId':_0x28e76d},_0x42da76=(await this[_0x1bd848(0xf9)]['post']('/universer-api/comment/unit/'+_0xda665c+_0x1bd848(0x14c),{'body':_0x32bb13}))[_0x1bd848(0x14e)]['reply'];return{..._0x5ac52f,'id':_0x42da76[_0x1bd848(0xcb)],'dT':_0x2941a7[_0x1bd848(0xe1)](+_0x42da76['createTimestamp'])['format'](_0x1bd848(0xe2)),'personId':_0x42da76[_0x1bd848(0x122)]};}else{const _0x16c69d={'memberId':_0x4168d4,'unitId':_0xda665c,'content':_0x1f12ad,'mention':_0x450b21},_0x107283=await this[_0x1bd848(0xf9)][_0x1bd848(0x131)](_0x1bd848(0x102)+_0xda665c+_0x1bd848(0x145),{'body':_0x16c69d});return _0x1d6d94(_0x107283[_0x1bd848(0x14e)][_0x1bd848(0xd8)],_0x5ac52f);}}async['updateComment'](_0x3d2ea4){const _0x16919f=_0x791389;var _0x304be8,_0x2007c5;const {text:_0x32d3d2,unitId:_0x2ad25d}=_0x3d2ea4,_0x41d361=(_0x2007c5=(_0x304be8=_0x32d3d2[_0x16919f(0x11f)])==null?void 0x0:_0x304be8['filter'](_0x310e00=>_0x310e00[_0x16919f(0x119)]===_0x2941a7[_0x16919f(0xed)][_0x16919f(0x138)])[_0x16919f(0xe7)](_0x3f9443=>_0x3f9443[_0x16919f(0x10a)]))!=null?_0x2007c5:[],_0xa4e40b=JSON[_0x16919f(0x10f)](_0x32d3d2),_0x5cbf2e=_0x3d2ea4[_0x16919f(0xf4)],_0x228b68=_0x3d2ea4['id'],_0x27577d={'memberId':(await this[_0x16919f(0x101)][_0x16919f(0xf8)](_0x2ad25d))[_0x16919f(0x112)](),'unitId':_0x2ad25d,'threadId':_0x5cbf2e,'mention':_0x41d361,'content':_0xa4e40b,'replyId':_0x228b68},_0x2fde45=await this[_0x16919f(0xf9)][_0x16919f(0x131)]('/universer-api/comment/unit/'+_0x2ad25d+_0x16919f(0x13f),{'body':_0x27577d});return!_0x2fde45[_0x16919f(0x14e)]['error']||_0x2fde45['body'][_0x16919f(0xcd)]['code']===0x1;}async['resolveComment'](_0x158bb5){const _0x45d5fa=_0x791389,{unitId:_0x873109}=_0x158bb5,_0x377417=_0x158bb5[_0x45d5fa(0xf4)],_0x27f8e2={'memberId':this[_0x45d5fa(0x137)][_0x45d5fa(0x11d)]()['userID'],'unitId':_0x873109,'threadId':_0x377417,'solved':_0x158bb5[_0x45d5fa(0x106)]?_0x2634df[_0x45d5fa(0x121)]:_0x2634df[_0x45d5fa(0x105)]},_0x57bd9b=await this[_0x45d5fa(0xf9)][_0x45d5fa(0x131)](_0x45d5fa(0x102)+_0x873109+_0x45d5fa(0x12b),{'body':_0x27f8e2});return!_0x57bd9b[_0x45d5fa(0x14e)]['error']||_0x57bd9b[_0x45d5fa(0x14e)][_0x45d5fa(0xcd)][_0x45d5fa(0xf3)]===0x1;}async[_0x791389(0xd1)](_0x34a54a,_0x2ee5c9,_0x52968e,_0x22ecaf){const _0x345dfb=_0x791389,_0x1a00e9={'memberId':(await this[_0x345dfb(0x101)][_0x345dfb(0xf8)](_0x34a54a))[_0x345dfb(0x112)](),'threadId':_0x52968e,'replyId':_0x22ecaf,'unitId':_0x34a54a},_0x594a78=await this['_httpService'][_0x345dfb(0x131)](_0x345dfb(0x102)+_0x34a54a+_0x345dfb(0xf2),{'body':_0x1a00e9});return!_0x594a78['body']['error']||_0x594a78[_0x345dfb(0x14e)][_0x345dfb(0xcd)]['code']===0x1;}async[_0x791389(0x123)](_0x1d54be,_0x43a5ea,_0x75e79b){const _0xf85445=_0x791389,_0x5d73c7={'unitId':_0x1d54be,'threadId':_0x75e79b},_0xdc12ac=await this[_0xf85445(0xf9)][_0xf85445(0x131)]('/universer-api/comment/unit/'+_0x1d54be+_0xf85445(0xd7),{'body':_0x5d73c7}),_0xbacbba=_0x75e79b['map'](_0x291ed4=>_0x14b44e(_0xdc12ac[_0xf85445(0x14e)][_0xf85445(0x111)][_0x291ed4],_0x1d54be,_0x43a5ea))['filter'](Boolean);return Object['values'](_0xdc12ac[_0xf85445(0x14e)][_0xf85445(0x13e)])[_0xf85445(0xf5)](_0x31907d=>{const _0x3929b6=_0xf85445;this['_userService'][_0x3929b6(0x100)](_0x31907d);}),_0xbacbba;}[_0x791389(0xde)](_0x274027){const _0x4365bf=_0x791389;return{'id':_0x274027['id'],'threadId':_0x274027[_0x4365bf(0xf4)],'ref':_0x274027[_0x4365bf(0xf7)]};}};_0x316b70=_0x3febf1([_0x5ba8de(0x0,_0x2941a7['Inject'](_0x2e8727[_0x791389(0x120)])),_0x5ba8de(0x1,_0x2941a7['Inject'](_0x2941a7[_0x791389(0xc8)])),_0x5ba8de(0x2,_0x2941a7[_0x791389(0xe4)](_0x59815a[_0x791389(0xef)])),_0x5ba8de(0x3,_0x2941a7['Inject'](_0x2941a7[_0x791389(0x118)]))],_0x316b70);var _0x14ae07=Object[_0x791389(0x108)],_0x4e3a9a=(_0x279d19,_0x30edc2,_0x55ac2a,_0x59e5e1)=>{const _0x14dde2=_0x791389;for(var _0x4746bd=_0x59e5e1>0x1?void 0x0:_0x59e5e1?_0x14ae07(_0x30edc2,_0x55ac2a):_0x30edc2,_0x11072a=_0x279d19[_0x14dde2(0x11b)]-0x1,_0x3bfb26;_0x11072a>=0x0;_0x11072a--)(_0x3bfb26=_0x279d19[_0x11072a])&&(_0x4746bd=_0x3bfb26(_0x4746bd)||_0x4746bd);return _0x4746bd;},_0x46c5cd=(_0x16bd58,_0x55e15e)=>(_0x134e54,_0xf560ec)=>_0x55e15e(_0x134e54,_0xf560ec,_0x16bd58);let _0x2169ed=class extends _0x2941a7[_0x791389(0xce)]{constructor(_0xf7a432,_0x6a5f67){const _0x5e64b7=_0x791389;super(),this[_0x5e64b7(0x154)]=_0xf7a432,this[_0x5e64b7(0xdf)]=_0x6a5f67,this[_0x5e64b7(0x140)]();}[_0x791389(0x140)](){const _0x8b2b6f=_0x791389;this[_0x8b2b6f(0x154)][_0x8b2b6f(0x13b)]=this['_threadCommentDataSource'],this[_0x8b2b6f(0x154)][_0x8b2b6f(0x148)]=!0x1;}};_0x2169ed=_0x4e3a9a([_0x46c5cd(0x0,_0xb01d52[_0x791389(0xd6)]),_0x46c5cd(0x1,_0x2941a7[_0x791389(0xe4)](_0x316b70))],_0x2169ed);var _0x2ff294=Object['defineProperty'],_0x3a908c=Object['getOwnPropertyDescriptor'],_0x25b8e7=(_0x1f4ef0,_0x369941,_0x50e9ce)=>_0x369941 in _0x1f4ef0?_0x2ff294(_0x1f4ef0,_0x369941,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50e9ce}):_0x1f4ef0[_0x369941]=_0x50e9ce,_0x45f856=(_0x1a2f8,_0x56b667,_0x5f30f3,_0x372141)=>{const _0x5d6831=_0x791389;for(var _0x395e9b=_0x372141>0x1?void 0x0:_0x372141?_0x3a908c(_0x56b667,_0x5f30f3):_0x56b667,_0xb628aa=_0x1a2f8[_0x5d6831(0x11b)]-0x1,_0x5cca3b;_0xb628aa>=0x0;_0xb628aa--)(_0x5cca3b=_0x1a2f8[_0xb628aa])&&(_0x395e9b=_0x5cca3b(_0x395e9b)||_0x395e9b);return _0x395e9b;},_0x3e20d3=(_0x4c1814,_0xe4cd05)=>(_0xaa835a,_0x26d251)=>_0xe4cd05(_0xaa835a,_0x26d251,_0x4c1814),_0x6432f0=(_0x2b1d5f,_0x124099,_0x183955)=>_0x25b8e7(_0x2b1d5f,typeof _0x124099!=_0x791389(0x12f)?_0x124099+'':_0x124099,_0x183955);_0x1d1eab['UniverThreadCommentDataSourcePlugin']=class extends _0x2941a7[_0x791389(0xf0)]{constructor(_0x235f85=_0x48ec76,_0x509b30,_0x90915d){const _0x1d83f8=_0x791389;super(),this['_config']=_0x235f85,this[_0x1d83f8(0xcf)]=_0x509b30,this[_0x1d83f8(0x141)]=_0x90915d;const {..._0x149dfa}=_0x2941a7[_0x1d83f8(0xdb)]({},_0x48ec76,this[_0x1d83f8(0xd5)]);this['_configService'][_0x1d83f8(0x129)](_0x2d2338,_0x149dfa);}[_0x791389(0x104)](){const _0xdf0020=_0x791389;[[_0x316b70],[_0x2169ed],[_0x40a442]][_0xdf0020(0xf5)](_0x3e08e9=>{const _0x5459c4=_0xdf0020;this[_0x5459c4(0xcf)][_0x5459c4(0xfd)](_0x3e08e9);});}[_0x791389(0xfe)](){const _0x3b59b9=_0x791389;this[_0x3b59b9(0xcf)][_0x3b59b9(0x153)](_0x2169ed),this[_0x3b59b9(0xcf)][_0x3b59b9(0x153)](_0x40a442);}},_0x6432f0(_0x1d1eab[_0x791389(0x144)],'pluginName',_0x2612f2),_0x6432f0(_0x1d1eab[_0x791389(0x144)],_0x791389(0x11e),_0x2941a7['UniverInstanceType']['UNIVER_UNKNOWN']),_0x1d1eab[_0x791389(0x144)]=_0x45f856([_0x2941a7[_0x791389(0xe0)](_0x151541[_0x791389(0x107)],_0x59815a[_0x791389(0xdc)],_0x3fc5c7['UniverLicensePlugin']),_0x3e20d3(0x1,_0x2941a7[_0x791389(0xe4)](_0x2941a7['Injector'])),_0x3e20d3(0x2,_0x2941a7['IConfigService'])],_0x1d1eab[_0x791389(0x144)]),Object[_0x791389(0x14b)](_0x1d1eab,Symbol[_0x791389(0x149)],{'value':_0x791389(0xda)});}));function _0x4349(_0x1c1215,_0x9f4fb4){const _0x2ee3b1=_0x2ee3();return _0x4349=function(_0x4349fd,_0x584817){_0x4349fd=_0x4349fd-0xc8;let _0x1c6cf1=_0x2ee3b1[_0x4349fd];return _0x1c6cf1;},_0x4349(_0x1c1215,_0x9f4fb4);}function _0x2ee3(){const _0x3b25c1=['amd','updateComment','content','setConfig','307941rXQcPK','/solved','getComment','UNRECOGNIZED','find','symbol','_initUserSync','post','@univerjs/thread-comment','UniverNetwork','resolveComment','size','1323270vmeCcK','_userService','COMMENT','user','root','dataSource','135316OKjexZ','getUser','users','/edit','_initDataSource','_configService','slice','48OWDEBS','UniverThreadCommentDataSourcePlugin','/add','object','Unknown','syncUpdateMutationToColla','toStringTag','addComment','defineProperty','/reply','3960EXCMpH','body','@univerjs-pro/collaboration-client','UniverThreadCommentUi','createTimestamp','1112jSCRZC','get','_threadCommentDataSourceService','function','UserManagerService','@univerjs/core','24762bfbYAD','replyId','parentId','error','Disposable','_injector','unitId','deleteComment','pipe','12079881lTjtUL','ThreadCommentModel','_config','IThreadCommentDataSourceService','/list','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Module','merge','UniverCollaborationClientPlugin','userID','saveCommentToSnapshot','_threadCommentDataSource','DependentOn','dayjs','YYYY/MM/DD\x20HH:mm','4ErBDFh','Inject','subscribe','UniverThreadComment','map','@univerjs/thread-comment-ui','@univerjs/network','commentUpdate$','UniverProLicense','delete','CustomRangeType','payload','CollaborationSessionService','Plugin','11263owrhtQ','/delete','code','threadId','forEach','Edit','ref','requireSession','_httpService','solved','_commentService','CommentService','add','onReady','filter','addUser','_sessionService','/universer-api/comment/unit/','disposeWithMe','onStarting','OpenOrReOpen','resolved','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','Reply','rangeId','rxjs','Delete','replies','UniverCore','stringify','parse','comments','getMemberID','_init','Add','_threadCommentModel','getUnit','2010pqHbKA','Injector','rangeType','UniverProCollaborationClient','length','thread-comment-data-source.config','getCurrentUser','type','customRanges','HTTPService','Solved','userId','listComments','bufferTime','Solve'];_0x2ee3=function(){return _0x3b25c1;};return _0x2ee3();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.2-nightly.
|
|
3
|
+
"version": "0.9.2-nightly.202507131606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.9.2-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/core": "0.9.2-nightly.202507121606",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.2-nightly.202507131606",
|
|
49
|
+
"@univerjs-pro/license": "0.9.2-nightly.202507131606",
|
|
50
|
+
"@univerjs/core": "0.9.2-nightly.202507131606",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment": "0.9.2-nightly.
|
|
52
|
+
"@univerjs/network": "0.9.2-nightly.202507131606",
|
|
53
|
+
"@univerjs/thread-comment": "0.9.2-nightly.202507131606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.9.2-nightly.202507131606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|