@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260108-7b9120d → 0.15.0-insiders.20260110-48b77c8
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 _0x4d9893=_0x407f;(function(_0x2db744,_0x5a0601){const _0x35927b=_0x407f,_0x2caa14=_0x2db744();while(!![]){try{const _0x297afa=-parseInt(_0x35927b(0xe4))/0x1*(parseInt(_0x35927b(0xa4))/0x2)+-parseInt(_0x35927b(0xb7))/0x3*(parseInt(_0x35927b(0xbf))/0x4)+-parseInt(_0x35927b(0xa6))/0x5*(-parseInt(_0x35927b(0xc5))/0x6)+parseInt(_0x35927b(0xb1))/0x7+parseInt(_0x35927b(0xef))/0x8*(-parseInt(_0x35927b(0xc7))/0x9)+parseInt(_0x35927b(0x9c))/0xa*(parseInt(_0x35927b(0x8b))/0xb)+-parseInt(_0x35927b(0x9f))/0xc*(-parseInt(_0x35927b(0x98))/0xd);if(_0x297afa===_0x5a0601)break;else _0x2caa14['push'](_0x2caa14['shift']());}catch(_0x542340){_0x2caa14['push'](_0x2caa14['shift']());}}}(_0x921f,0x3a3de));Object[_0x4d9893(0x90)](exports,Symbol[_0x4d9893(0xbd)],{'value':_0x4d9893(0x102)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4d9893(0xd8);var I=(_0x4e79c8=>(_0x4e79c8[_0x4e79c8[_0x4d9893(0xdd)]=0x0]=_0x4d9893(0xdd),_0x4e79c8[_0x4e79c8[_0x4d9893(0xda)]=0x1]=_0x4d9893(0xda),_0x4e79c8[_0x4e79c8[_0x4d9893(0xd7)]=-0x1]=_0x4d9893(0xd7),_0x4e79c8))(I||{}),v=(_0x351327=>(_0x351327[_0x351327[_0x4d9893(0xdf)]=0x0]=_0x4d9893(0xdf),_0x351327[_0x351327[_0x4d9893(0xd1)]=0x1]=_0x4d9893(0xd1),_0x351327[_0x351327['Reply']=0x2]=_0x4d9893(0xe7),_0x351327[_0x351327[_0x4d9893(0xc6)]=0x3]='Edit',_0x351327[_0x351327[_0x4d9893(0x8f)]=0x4]=_0x4d9893(0x8f),_0x351327[_0x351327['Solve']=0x5]=_0x4d9893(0xf3),_0x351327[_0x351327[_0x4d9893(0xd7)]=-0x1]=_0x4d9893(0xd7),_0x351327))(v||{});const f=_0x4d5ffd=>c[_0x4d9893(0xff)](new Date(+_0x4d5ffd))[_0x4d9893(0xa0)](_0x4d9893(0xf9)),R=async(_0x3f046a,_0x3aa57b)=>{const _0x430cef=_0x4d9893,_0x14728c=_0x3f046a[_0x430cef(0xec)](c[_0x430cef(0xce)]),_0x1726e0=_0x3f046a['get'](P[_0x430cef(0xc8)]);_0x3aa57b[_0x430cef(0x96)](_0x1dc39d=>{const _0x99a700=_0x430cef;_0x14728c['getUser'](_0x1dc39d)&&_0x3aa57b[_0x99a700(0xd5)](_0x1dc39d);}),_0x3aa57b['size']&&(await _0x1726e0[_0x430cef(0xec)](_0x430cef(0xfb),{'params':{'userIDs':[..._0x3aa57b]}}))[_0x430cef(0xe5)][_0x430cef(0xfe)][_0x430cef(0x96)](_0x4da15a=>{const _0x4bcdeb=_0x430cef;_0x4da15a&&_0x14728c[_0x4bcdeb(0x9b)](_0x4da15a);});};var $=Object[_0x4d9893(0xac)],E=(_0x3fba8f,_0x4e47de,_0x5f52d4,_0x24ac4f)=>{const _0x192cc5=_0x4d9893;for(var _0x1151bd=_0x24ac4f>0x1?void 0x0:_0x24ac4f?$(_0x4e47de,_0x5f52d4):_0x4e47de,_0x48a210=_0x3fba8f[_0x192cc5(0xfa)]-0x1,_0x17725b;_0x48a210>=0x0;_0x48a210--)(_0x17725b=_0x3fba8f[_0x48a210])&&(_0x1151bd=_0x17725b(_0x1151bd)||_0x1151bd);return _0x1151bd;},S=(_0x2f102c,_0x387088)=>(_0xff1df9,_0x149e5a)=>_0x387088(_0xff1df9,_0x149e5a,_0x2f102c);function _0x921f(){const _0x5d1b2b=['11kQFiOt','UNIVER_UNKNOWN','map','CollaborationSessionService','Delete','defineProperty','DependentOn','onReady','COMMENT','createTimestamp','/add','forEach','IThreadCommentDataSourceService','39wADHmi','customRanges','setConfig','addUser','2389190kxMcFk','merge','/reply','1906584VIhPDS','format','_sessionService','_config','_threadCommentDataSourceService','591410JuelGh','/edit','55FMjDZp','Disposable','_injector','type','commentUpdate$','parse','getOwnPropertyDescriptor','addComment','find','post','_threadCommentModel','641263YUuhGA','payload','rangeType','Injector','userId','requireSession','145785PLMJpy','_commentService','resolveComment','personId','subscribe','_userService','toStringTag','unitId','16VRxnIN','pluginName','ref','getMemberID','slice','bufferTime','8322JukZym','Edit','18YHUapA','HTTPService','_httpService','CustomRangeType','Plugin','replies','/list','UserManagerService','/delete','getUnit','Add','user','getComment','updateComment','delete','UniverInstanceType','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','Solved','add','disposeWithMe','OpenOrReOpen','userID','Unknown','UniverThreadCommentUIPlugin','_init','/universer-api/comment/unit/','Inject','1RFdoyD','body','onStarting','Reply','root','saveCommentToSnapshot','comment','stringify','get','resolved','solved','375152NwBBJS','rangeId','reply','replyId','Solve','filter','UniverThreadCommentDataSourcePlugin','code','_initDataSource','content','YYYY/MM/DD\x20HH:mm','length','/universer-api/user/list','_configService','syncUpdateMutationToColla','users','dayjs','CommentService','/solved','Module','threadId','ThreadCommentModel','error','_threadCommentDataSource'];_0x921f=function(){return _0x5d1b2b;};return _0x921f();}let _=class extends c[_0x4d9893(0xa7)]{constructor(_0x44759e,_0x387b7e,_0x348ac1,_0x5d6a2f){const _0x43380a=_0x4d9893;super(),this[_0x43380a(0xb8)]=_0x44759e,this[_0x43380a(0xb0)]=_0x387b7e,this[_0x43380a(0xbc)]=_0x348ac1,this['_injector']=_0x5d6a2f,this[_0x43380a(0xe1)](),this[_0x43380a(0xd9)]();}[_0x4d9893(0xd9)](){const _0x9fab5a=_0x4d9893;this[_0x9fab5a(0xdc)](this[_0x9fab5a(0xb0)][_0x9fab5a(0xaa)]['pipe'](j[_0x9fab5a(0xc4)](0x10))[_0x9fab5a(0xbb)](_0x471725=>{const _0xde650b=_0x9fab5a,_0x196b88=new Set();_0x471725[_0xde650b(0x96)](_0x48d556=>{const _0x19d077=_0xde650b;if(_0x48d556['type']===_0x19d077(0xdb)){const _0x176226=_0x48d556[_0x19d077(0xb2)][_0x19d077(0xba)];_0x196b88[_0x19d077(0xdb)](_0x176226);}}),R(this[_0xde650b(0xa8)],_0x196b88);}));}[_0x4d9893(0xe1)](){const _0xd4feb7=_0x4d9893;this[_0xd4feb7(0xdc)](this[_0xd4feb7(0xb8)][_0xd4feb7(0xaa)][_0xd4feb7(0xbb)](async _0x52b5e7=>{const _0x4ed3dc=_0xd4feb7;var _0x246e1e,_0x139422,_0x5e4f3f,_0x365713;const _0x3c242e=(_0x246e1e=this[_0x4ed3dc(0xb0)]['getUnit'](_0x52b5e7[_0x4ed3dc(0xbe)])[_0x4ed3dc(0xae)](_0x5daeab=>_0x5daeab['threadId']===_0x52b5e7[_0x4ed3dc(0x103)]))==null?void 0x0:_0x246e1e['root'];if(!_0x3c242e)return;const {unitId:_0x3be60c,subUnitId:_0x9b6069}=_0x3c242e;switch(_0x52b5e7[_0x4ed3dc(0xd2)]&&this[_0x4ed3dc(0xbc)][_0x4ed3dc(0x9b)](_0x52b5e7[_0x4ed3dc(0xd2)]),_0x52b5e7[_0x4ed3dc(0xa9)]){case v[_0x4ed3dc(0xd1)]:break;case v[_0x4ed3dc(0xe7)]:{this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xad)](_0x3be60c,_0x9b6069,{'unitId':_0x3be60c,'subUnitId':_0x9b6069,'ref':'','id':_0x52b5e7[_0x4ed3dc(0xf2)],'dT':f(+_0x52b5e7[_0x4ed3dc(0x94)]),'threadId':_0x52b5e7['threadId'],'personId':(_0x5e4f3f=(_0x139422=_0x52b5e7[_0x4ed3dc(0xd2)])==null?void 0x0:_0x139422[_0x4ed3dc(0xde)])!=null?_0x5e4f3f:_0x52b5e7[_0x4ed3dc(0xb5)],'text':JSON['parse'](_0x52b5e7[_0x4ed3dc(0xf8)]),'parentId':_0x3c242e['id']});break;}case v[_0x4ed3dc(0x8f)]:{const _0x38fbfe=this['_threadCommentModel'][_0x4ed3dc(0xd3)](_0x3be60c,_0x9b6069,_0x52b5e7[_0x4ed3dc(0xf2)]);_0x38fbfe&&_0x38fbfe['parentId']&&this['_threadCommentModel']['deleteComment'](_0x3be60c,_0x9b6069,_0x52b5e7[_0x4ed3dc(0xf2)]);break;}case v[_0x4ed3dc(0xc6)]:{this['_threadCommentModel'][_0x4ed3dc(0xd4)](_0x3be60c,_0x9b6069,{'commentId':_0x52b5e7['replyId'],'text':JSON[_0x4ed3dc(0xab)](_0x52b5e7[_0x4ed3dc(0xf8)])});break;}case v[_0x4ed3dc(0xf3)]:{const _0x119d25=(_0x365713=this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xd0)](_0x52b5e7['unitId'])[_0x4ed3dc(0xae)](_0x3d4071=>_0x3d4071[_0x4ed3dc(0x103)]===_0x52b5e7[_0x4ed3dc(0x103)]))==null?void 0x0:_0x365713[_0x4ed3dc(0xe8)];_0x119d25&&this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xb9)](_0x3be60c,_0x9b6069,_0x119d25['id'],_0x52b5e7['solved']===I[_0x4ed3dc(0xda)]);break;}}}));}};_=E([S(0x0,c[_0x4d9893(0xe3)](b[_0x4d9893(0x100)])),S(0x1,c[_0x4d9893(0xe3)](M[_0x4d9893(0x104)])),S(0x2,c[_0x4d9893(0xe3)](c['UserManagerService'])),S(0x3,c[_0x4d9893(0xe3)](c[_0x4d9893(0xb4)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4d9893(0xac)],x=(_0xb4f27,_0x176743,_0x1e6580,_0x1a631a)=>{const _0x31b142=_0x4d9893;for(var _0x823a17=_0x1a631a>0x1?void 0x0:_0x1a631a?A(_0x176743,_0x1e6580):_0x176743,_0x5f92b6=_0xb4f27[_0x31b142(0xfa)]-0x1,_0x499f40;_0x5f92b6>=0x0;_0x5f92b6--)(_0x499f40=_0xb4f27[_0x5f92b6])&&(_0x823a17=_0x499f40(_0x823a17)||_0x823a17);return _0x823a17;},C=(_0x2e273b,_0xc84b20)=>(_0x1c5206,_0x4150a3)=>_0xc84b20(_0x1c5206,_0x4150a3,_0x2e273b);function Y(_0x2b3d36,_0x34f3c0){const _0x18baff=_0x4d9893,_0x2963f1=_0x2b3d36[_0x18baff(0xcc)][0x0];return{..._0x34f3c0,'id':_0x2963f1[_0x18baff(0xf2)],'resolved':_0x2b3d36[_0x18baff(0xee)]===0x1,'dT':f(_0x2963f1['createTimestamp']),'personId':_0x2963f1[_0x18baff(0xb5)],'threadId':_0x2963f1[_0x18baff(0x103)]};}function G(_0x1ce70a,_0x4a624d,_0x37d2b7){const _0x4dc731=_0x4d9893;var _0x13856e,_0x428fb4;if(((_0x428fb4=(_0x13856e=_0x1ce70a==null?void 0x0:_0x1ce70a[_0x4dc731(0xcc)])==null?void 0x0:_0x13856e[_0x4dc731(0xfa)])!=null?_0x428fb4:0x0)>0x0){const _0x183633=(_0x13a4c8,_0x2cfd87)=>({'id':_0x13a4c8[_0x4dc731(0xf2)],'threadId':_0x13a4c8['threadId'],'dT':f(_0x13a4c8[_0x4dc731(0x94)]),'personId':_0x13a4c8[_0x4dc731(0xb5)],'resolved':_0x1ce70a[_0x4dc731(0xee)]===I['Solved'],'unitId':_0x4a624d,'subUnitId':_0x37d2b7,'text':JSON[_0x4dc731(0xab)](_0x13a4c8[_0x4dc731(0xf8)]),'parentId':_0x2cfd87}),_0xa8d8b=_0x183633(_0x1ce70a[_0x4dc731(0xcc)][0x0]);return{..._0xa8d8b,'children':_0x1ce70a['replies'][_0x4dc731(0xc3)](0x1)['map'](_0x5bcf61=>_0x183633(_0x5bcf61,_0xa8d8b['id']))};}return null;}let p=class{constructor(_0x23a115,_0x469d62,_0x58dfe8){const _0x5a855e=_0x4d9893;this[_0x5a855e(0xc9)]=_0x23a115,this[_0x5a855e(0xbc)]=_0x469d62,this[_0x5a855e(0xa1)]=_0x58dfe8;}async[_0x4d9893(0xad)](_0xe90edb){const _0x104126=_0x4d9893;var _0x41252e,_0x4e750a;const {parentId:_0x4993e8,unitId:_0xe68ae,text:_0x42f2cf,threadId:_0x480deb}=_0xe90edb,_0x4a17d4=(_0x4e750a=(_0x41252e=_0x42f2cf[_0x104126(0x99)])==null?void 0x0:_0x41252e[_0x104126(0xf4)](_0x22910a=>_0x22910a[_0x104126(0xb3)]===c[_0x104126(0xca)][_0x104126(0x93)])[_0x104126(0x8d)](_0x2219ba=>_0x2219ba[_0x104126(0xf0)]))!=null?_0x4e750a:[],_0x558257=JSON[_0x104126(0xeb)](_0x42f2cf),_0x31edc4=(await this['_sessionService'][_0x104126(0xb6)](_0xe68ae))[_0x104126(0xc2)]();if(_0x4993e8){const _0x22ce4f={'memberId':_0x31edc4,'unitId':_0xe68ae,'content':_0x558257,'mention':_0x4a17d4,'threadId':_0x480deb},_0x153804=(await this[_0x104126(0xc9)][_0x104126(0xaf)]('/universer-api/comment/unit/'+_0xe68ae+_0x104126(0x9e),{'body':_0x22ce4f}))['body'][_0x104126(0xf1)];return{..._0xe90edb,'id':_0x153804[_0x104126(0xf2)],'dT':c[_0x104126(0xff)](+_0x153804['createTimestamp'])[_0x104126(0xa0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x153804['userId']};}else{const _0x3d70d7={'memberId':_0x31edc4,'unitId':_0xe68ae,'content':_0x558257,'mention':_0x4a17d4},_0xd674a3=await this['_httpService']['post'](_0x104126(0xe2)+_0xe68ae+_0x104126(0x95),{'body':_0x3d70d7});return Y(_0xd674a3[_0x104126(0xe5)][_0x104126(0xea)],_0xe90edb);}}async[_0x4d9893(0xd4)](_0x5deba7){const _0x4951a0=_0x4d9893;var _0x220723,_0x103887;const {text:_0x149e3e,unitId:_0x18162b}=_0x5deba7,_0x35526c=(_0x103887=(_0x220723=_0x149e3e[_0x4951a0(0x99)])==null?void 0x0:_0x220723[_0x4951a0(0xf4)](_0x3aca50=>_0x3aca50[_0x4951a0(0xb3)]===c[_0x4951a0(0xca)][_0x4951a0(0x93)])['map'](_0x5a3aac=>_0x5a3aac[_0x4951a0(0xf0)]))!=null?_0x103887:[],_0x12fd05=JSON[_0x4951a0(0xeb)](_0x149e3e),_0x455a2d=_0x5deba7[_0x4951a0(0x103)],_0x351a33=_0x5deba7['id'],_0xc454f9={'memberId':(await this[_0x4951a0(0xa1)]['requireSession'](_0x18162b))[_0x4951a0(0xc2)](),'unitId':_0x18162b,'threadId':_0x455a2d,'mention':_0x35526c,'content':_0x12fd05,'replyId':_0x351a33},_0x269bd1=await this[_0x4951a0(0xc9)][_0x4951a0(0xaf)]('/universer-api/comment/unit/'+_0x18162b+_0x4951a0(0xa5),{'body':_0xc454f9});return!_0x269bd1[_0x4951a0(0xe5)][_0x4951a0(0x105)]||_0x269bd1[_0x4951a0(0xe5)][_0x4951a0(0x105)][_0x4951a0(0xf6)]===0x1;}async[_0x4d9893(0xb9)](_0x2cdd35){const _0x4d532d=_0x4d9893,{unitId:_0x575162}=_0x2cdd35,_0x33bcfe=_0x2cdd35[_0x4d532d(0x103)],_0x1fca14={'memberId':this[_0x4d532d(0xbc)]['getCurrentUser']()[_0x4d532d(0xde)],'unitId':_0x575162,'threadId':_0x33bcfe,'solved':_0x2cdd35[_0x4d532d(0xed)]?I[_0x4d532d(0xda)]:I['OpenOrReOpen']},_0x30238c=await this['_httpService'][_0x4d532d(0xaf)](_0x4d532d(0xe2)+_0x575162+_0x4d532d(0x101),{'body':_0x1fca14});return!_0x30238c[_0x4d532d(0xe5)][_0x4d532d(0x105)]||_0x30238c['body']['error']['code']===0x1;}async['deleteComment'](_0x135afc,_0x58b731,_0xcbd6d,_0x5de782){const _0xf19fd1=_0x4d9893,_0xb6c32f={'memberId':(await this[_0xf19fd1(0xa1)][_0xf19fd1(0xb6)](_0x135afc))[_0xf19fd1(0xc2)](),'threadId':_0xcbd6d,'replyId':_0x5de782,'unitId':_0x135afc},_0x254ffe=await this[_0xf19fd1(0xc9)][_0xf19fd1(0xaf)](_0xf19fd1(0xe2)+_0x135afc+_0xf19fd1(0xcf),{'body':_0xb6c32f});return!_0x254ffe['body'][_0xf19fd1(0x105)]||_0x254ffe[_0xf19fd1(0xe5)][_0xf19fd1(0x105)]['code']===0x1;}async['listComments'](_0x56ce51,_0x34936d,_0x233ba7){const _0x1a3374=_0x4d9893,_0x4381b8={'unitId':_0x56ce51,'threadId':_0x233ba7},_0x4f77cf=await this[_0x1a3374(0xc9)][_0x1a3374(0xaf)](_0x1a3374(0xe2)+_0x56ce51+_0x1a3374(0xcd),{'body':_0x4381b8}),_0x106c1f=_0x233ba7[_0x1a3374(0x8d)](_0x1ed7ca=>G(_0x4f77cf[_0x1a3374(0xe5)]['comments'][_0x1ed7ca],_0x56ce51,_0x34936d))[_0x1a3374(0xf4)](Boolean);return Object['values'](_0x4f77cf[_0x1a3374(0xe5)]['users'])[_0x1a3374(0x96)](_0x57f93d=>{const _0x474b77=_0x1a3374;this[_0x474b77(0xbc)][_0x474b77(0x9b)](_0x57f93d);}),_0x106c1f;}[_0x4d9893(0xe9)](_0x53c864){const _0x264a9b=_0x4d9893;return{'id':_0x53c864['id'],'threadId':_0x53c864[_0x264a9b(0x103)],'ref':_0x53c864[_0x264a9b(0xc1)]};}};p=x([C(0x0,c[_0x4d9893(0xe3)](P['HTTPService'])),C(0x1,c[_0x4d9893(0xe3)](c[_0x4d9893(0xce)])),C(0x2,c[_0x4d9893(0xe3)](b[_0x4d9893(0x8e)]))],p);var H=Object[_0x4d9893(0xac)],J=(_0xb2e016,_0x28ccb5,_0x30b31a,_0x18cf60)=>{for(var _0x337311=_0x18cf60>0x1?void 0x0:_0x18cf60?H(_0x28ccb5,_0x30b31a):_0x28ccb5,_0x84fc9d=_0xb2e016['length']-0x1,_0x53d6bd;_0x84fc9d>=0x0;_0x84fc9d--)(_0x53d6bd=_0xb2e016[_0x84fc9d])&&(_0x337311=_0x53d6bd(_0x337311)||_0x337311);return _0x337311;},y=(_0x22d07a,_0x17de8b)=>(_0x451ecf,_0x214645)=>_0x17de8b(_0x451ecf,_0x214645,_0x22d07a);let g=class extends c['Disposable']{constructor(_0x1ac588,_0x537c11){const _0x2f87cb=_0x4d9893;super(),this[_0x2f87cb(0xa3)]=_0x1ac588,this[_0x2f87cb(0x8a)]=_0x537c11,this[_0x2f87cb(0xf7)]();}[_0x4d9893(0xf7)](){const _0x59b1b2=_0x4d9893;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x59b1b2(0xa3)][_0x59b1b2(0xfd)]=!0x1;}};g=J([y(0x0,M[_0x4d9893(0x97)]),y(0x1,c[_0x4d9893(0xe3)](p))],g);var F=Object['defineProperty'],L=Object[_0x4d9893(0xac)],Z=(_0x2a47a6,_0x31d8f9,_0x317c98)=>_0x31d8f9 in _0x2a47a6?F(_0x2a47a6,_0x31d8f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x317c98}):_0x2a47a6[_0x31d8f9]=_0x317c98,W=(_0x2ceab3,_0x28bd59,_0x17c8a4,_0x24fc32)=>{const _0x558aaa=_0x4d9893;for(var _0x5c38ae=_0x24fc32>0x1?void 0x0:_0x24fc32?L(_0x28bd59,_0x17c8a4):_0x28bd59,_0x4f995b=_0x2ceab3[_0x558aaa(0xfa)]-0x1,_0x54fdf8;_0x4f995b>=0x0;_0x4f995b--)(_0x54fdf8=_0x2ceab3[_0x4f995b])&&(_0x5c38ae=_0x54fdf8(_0x5c38ae)||_0x5c38ae);return _0x5c38ae;},O=(_0x462731,_0x2b18c3)=>(_0x1a2e56,_0x2038cc)=>_0x2b18c3(_0x1a2e56,_0x2038cc,_0x462731),N=(_0x1a88ae,_0x118b64,_0x213e65)=>Z(_0x1a88ae,typeof _0x118b64!='symbol'?_0x118b64+'':_0x118b64,_0x213e65);function _0x407f(_0x1bf611,_0x4a5ccf){_0x1bf611=_0x1bf611-0x8a;const _0x921fea=_0x921f();let _0x407f39=_0x921fea[_0x1bf611];return _0x407f39;}exports[_0x4d9893(0xf5)]=class extends c[_0x4d9893(0xcb)]{constructor(_0x47a1e2=D,_0x3f3adb,_0x4d9de7){const _0x4ecd55=_0x4d9893;super(),this[_0x4ecd55(0xa2)]=_0x47a1e2,this['_injector']=_0x3f3adb,this['_configService']=_0x4d9de7;const {..._0x37a6f6}=c[_0x4ecd55(0x9d)]({},D,this[_0x4ecd55(0xa2)]);this[_0x4ecd55(0xfc)][_0x4ecd55(0x9a)](q,_0x37a6f6);}[_0x4d9893(0xe6)](){[[p],[g],[_]]['forEach'](_0x4b0da5=>{const _0x2a58fe=_0x407f;this[_0x2a58fe(0xa8)]['add'](_0x4b0da5);});}[_0x4d9893(0x92)](){const _0x5a07aa=_0x4d9893;this['_injector']['get'](g),this[_0x5a07aa(0xa8)][_0x5a07aa(0xec)](_);}},N(exports[_0x4d9893(0xf5)],_0x4d9893(0xc0),U),N(exports[_0x4d9893(0xf5)],'type',c[_0x4d9893(0xd6)][_0x4d9893(0x8c)]),exports[_0x4d9893(0xf5)]=W([c[_0x4d9893(0x91)](w[_0x4d9893(0xe0)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4d9893(0xe3)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4d9893(0xf5)]);
|
|
1
|
+
'use strict';const _0x496397=_0x50c3;(function(_0xc5a695,_0x4537b5){const _0x4f1b7d=_0x50c3,_0xaa87cf=_0xc5a695();while(!![]){try{const _0x1fad32=-parseInt(_0x4f1b7d(0x21f))/0x1*(-parseInt(_0x4f1b7d(0x1d4))/0x2)+-parseInt(_0x4f1b7d(0x1dc))/0x3*(parseInt(_0x4f1b7d(0x1e9))/0x4)+-parseInt(_0x4f1b7d(0x1ab))/0x5+parseInt(_0x4f1b7d(0x1e7))/0x6*(parseInt(_0x4f1b7d(0x1c6))/0x7)+parseInt(_0x4f1b7d(0x1c0))/0x8+parseInt(_0x4f1b7d(0x1c5))/0x9*(parseInt(_0x4f1b7d(0x1f4))/0xa)+-parseInt(_0x4f1b7d(0x1d0))/0xb;if(_0x1fad32===_0x4537b5)break;else _0xaa87cf['push'](_0xaa87cf['shift']());}catch(_0x2af6c2){_0xaa87cf['push'](_0xaa87cf['shift']());}}}(_0xdb8f,0x20af4));Object[_0x496397(0x1f9)](exports,Symbol[_0x496397(0x21c)],{'value':_0x496397(0x1e4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x496397(0x21e);function _0x50c3(_0x564d0a,_0x186c00){_0x564d0a=_0x564d0a-0x1a7;const _0xdb8f00=_0xdb8f();let _0x50c357=_0xdb8f00[_0x564d0a];return _0x50c357;}function _0xdb8f(){const _0x497def=['/list','symbol','parse','commentUpdate$','comment','UniverInstanceType','reply','threadId','HTTPService','_sessionService','UniverLicensePlugin','OpenOrReOpen','ThreadCommentModel','payload','forEach','pluginName','error','/solved','createTimestamp','userID','requireSession','getMemberID','toStringTag','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','19bfmGnq','customRanges','resolveComment','Reply','type','/edit','listComments','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Add','UNIVER_UNKNOWN','1227810YSWNqT','/add','user','/universer-api/user/list','_configService','_threadCommentDataSourceService','UniverThreadCommentUIPlugin','getComment','IConfigService','get','dataSource','DependentOn','Plugin','saveCommentToSnapshot','map','length','CustomRangeType','_commentService','getOwnPropertyDescriptor','stringify','UserManagerService','807992GSYSnk','_config','addUser','_httpService','merge','2511NGJAhu','1403871DQCUzp','solved','delete','Edit','_initUserSync','parentId','thread-comment-data-source.config','userId','onStarting','deleteComment','3347762DpfsJl','find','/reply','personId','23158IhikXn','Unknown','Solved','_userService','_initDataSource','UNRECOGNIZED','setConfig','replies','789MVqPGr','values','Delete','root','filter','body','getUnit','COMMENT','Module','/universer-api/comment/unit/','Injector','6GTaVMW','CommentService','32fKGlgu','content','code','ref','rangeId','UniverThreadCommentDataSourcePlugin','comments','disposeWithMe','unitId','CollaborationSessionService','_injector','5890RtyYZh','resolved','subscribe','post','/delete','defineProperty','_init','getCurrentUser','users','format','Inject','dayjs','Solve','Disposable','replyId','add','addComment','rangeType'];_0xdb8f=function(){return _0x497def;};return _0xdb8f();}var I=(_0x43136f=>(_0x43136f[_0x43136f[_0x496397(0x211)]=0x0]=_0x496397(0x211),_0x43136f[_0x43136f[_0x496397(0x1d6)]=0x1]=_0x496397(0x1d6),_0x43136f[_0x43136f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43136f))(I||{}),v=(_0x2aa0e1=>(_0x2aa0e1[_0x2aa0e1[_0x496397(0x1d5)]=0x0]=_0x496397(0x1d5),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1a9)]=0x1]=_0x496397(0x1a9),_0x2aa0e1[_0x2aa0e1[_0x496397(0x222)]=0x2]=_0x496397(0x222),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1c9)]=0x3]=_0x496397(0x1c9),_0x2aa0e1[_0x2aa0e1['Delete']=0x4]=_0x496397(0x1de),_0x2aa0e1[_0x2aa0e1[_0x496397(0x200)]=0x5]=_0x496397(0x200),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1d9)]=-0x1]=_0x496397(0x1d9),_0x2aa0e1))(v||{});const f=_0x1667ee=>c[_0x496397(0x1ff)](new Date(+_0x1667ee))['format'](_0x496397(0x1a7)),R=async(_0x248ac6,_0x266cea)=>{const _0x12dac8=_0x496397,_0x3167ee=_0x248ac6[_0x12dac8(0x1b4)](c[_0x12dac8(0x1bf)]),_0x5e0250=_0x248ac6[_0x12dac8(0x1b4)](P[_0x12dac8(0x20e)]);_0x266cea[_0x12dac8(0x214)](_0x5be8d9=>{const _0x1c4a9d=_0x12dac8;_0x3167ee['getUser'](_0x5be8d9)&&_0x266cea[_0x1c4a9d(0x1c8)](_0x5be8d9);}),_0x266cea['size']&&(await _0x5e0250['get'](_0x12dac8(0x1ae),{'params':{'userIDs':[..._0x266cea]}}))[_0x12dac8(0x1e1)][_0x12dac8(0x1fc)][_0x12dac8(0x214)](_0x16a6ae=>{_0x16a6ae&&_0x3167ee['addUser'](_0x16a6ae);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x464cd2,_0x52f20b,_0x494bf2,_0x1f181d)=>{for(var _0x28aee2=_0x1f181d>0x1?void 0x0:_0x1f181d?$(_0x52f20b,_0x494bf2):_0x52f20b,_0x3d8017=_0x464cd2['length']-0x1,_0x4790a7;_0x3d8017>=0x0;_0x3d8017--)(_0x4790a7=_0x464cd2[_0x3d8017])&&(_0x28aee2=_0x4790a7(_0x28aee2)||_0x28aee2);return _0x28aee2;},S=(_0x27a8c2,_0x362b35)=>(_0x245357,_0x3631e6)=>_0x362b35(_0x245357,_0x3631e6,_0x27a8c2);let _=class extends c[_0x496397(0x201)]{constructor(_0x2eb10c,_0x1cbceb,_0x4d8e9a,_0xde809b){const _0x2d2e4a=_0x496397;super(),this[_0x2d2e4a(0x1bc)]=_0x2eb10c,this[_0x2d2e4a(0x1a8)]=_0x1cbceb,this['_userService']=_0x4d8e9a,this[_0x2d2e4a(0x1f3)]=_0xde809b,this[_0x2d2e4a(0x1fa)](),this[_0x2d2e4a(0x1ca)]();}[_0x496397(0x1ca)](){const _0x5ee67a=_0x496397;this[_0x5ee67a(0x1f0)](this[_0x5ee67a(0x1a8)][_0x5ee67a(0x209)]['pipe'](j[_0x5ee67a(0x21d)](0x10))['subscribe'](_0x1e888b=>{const _0xc2af8d=_0x5ee67a,_0x44e48c=new Set();_0x1e888b['forEach'](_0x40a87a=>{const _0x559c8a=_0x50c3;if(_0x40a87a[_0x559c8a(0x223)]==='add'){const _0x1c9b1e=_0x40a87a[_0x559c8a(0x213)][_0x559c8a(0x1d3)];_0x44e48c['add'](_0x1c9b1e);}}),R(this[_0xc2af8d(0x1f3)],_0x44e48c);}));}[_0x496397(0x1fa)](){const _0x2c8f54=_0x496397;this[_0x2c8f54(0x1f0)](this[_0x2c8f54(0x1bc)]['commentUpdate$'][_0x2c8f54(0x1f6)](async _0x2ef9d7=>{const _0x4db751=_0x2c8f54;var _0x59a91c,_0x296d28,_0x1d5504,_0x5caa74;const _0x280a59=(_0x59a91c=this['_threadCommentModel'][_0x4db751(0x1e2)](_0x2ef9d7[_0x4db751(0x1f1)])[_0x4db751(0x1d1)](_0x54a988=>_0x54a988[_0x4db751(0x20d)]===_0x2ef9d7['threadId']))==null?void 0x0:_0x59a91c[_0x4db751(0x1df)];if(!_0x280a59)return;const {unitId:_0x29cec8,subUnitId:_0x17124b}=_0x280a59;switch(_0x2ef9d7[_0x4db751(0x1ad)]&&this[_0x4db751(0x1d7)][_0x4db751(0x1c2)](_0x2ef9d7['user']),_0x2ef9d7[_0x4db751(0x223)]){case v[_0x4db751(0x1a9)]:break;case v['Reply']:{this[_0x4db751(0x1a8)][_0x4db751(0x204)](_0x29cec8,_0x17124b,{'unitId':_0x29cec8,'subUnitId':_0x17124b,'ref':'','id':_0x2ef9d7[_0x4db751(0x202)],'dT':f(+_0x2ef9d7[_0x4db751(0x218)]),'threadId':_0x2ef9d7[_0x4db751(0x20d)],'personId':(_0x1d5504=(_0x296d28=_0x2ef9d7[_0x4db751(0x1ad)])==null?void 0x0:_0x296d28[_0x4db751(0x219)])!=null?_0x1d5504:_0x2ef9d7[_0x4db751(0x1cd)],'text':JSON[_0x4db751(0x208)](_0x2ef9d7[_0x4db751(0x1ea)]),'parentId':_0x280a59['id']});break;}case v[_0x4db751(0x1de)]:{const _0x5696d4=this[_0x4db751(0x1a8)][_0x4db751(0x1b2)](_0x29cec8,_0x17124b,_0x2ef9d7[_0x4db751(0x202)]);_0x5696d4&&_0x5696d4[_0x4db751(0x1cb)]&&this['_threadCommentModel'][_0x4db751(0x1cf)](_0x29cec8,_0x17124b,_0x2ef9d7['replyId']);break;}case v[_0x4db751(0x1c9)]:{this['_threadCommentModel']['updateComment'](_0x29cec8,_0x17124b,{'commentId':_0x2ef9d7['replyId'],'text':JSON[_0x4db751(0x208)](_0x2ef9d7[_0x4db751(0x1ea)])});break;}case v[_0x4db751(0x200)]:{const _0x2a5702=(_0x5caa74=this[_0x4db751(0x1a8)][_0x4db751(0x1e2)](_0x2ef9d7['unitId'])['find'](_0xfc40db=>_0xfc40db[_0x4db751(0x20d)]===_0x2ef9d7[_0x4db751(0x20d)]))==null?void 0x0:_0x5caa74[_0x4db751(0x1df)];_0x2a5702&&this['_threadCommentModel']['resolveComment'](_0x29cec8,_0x17124b,_0x2a5702['id'],_0x2ef9d7[_0x4db751(0x1c7)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x496397(0x1fe)](b[_0x496397(0x1e8)])),S(0x1,c['Inject'](M[_0x496397(0x212)])),S(0x2,c[_0x496397(0x1fe)](c[_0x496397(0x1bf)])),S(0x3,c[_0x496397(0x1fe)](c[_0x496397(0x1e6)]))],_);const q=_0x496397(0x1cc),D={};var A=Object[_0x496397(0x1bd)],x=(_0x1526d9,_0x483b9f,_0x547e55,_0x1e96db)=>{const _0x461f32=_0x496397;for(var _0x69f86d=_0x1e96db>0x1?void 0x0:_0x1e96db?A(_0x483b9f,_0x547e55):_0x483b9f,_0x266e69=_0x1526d9[_0x461f32(0x1ba)]-0x1,_0x390216;_0x266e69>=0x0;_0x266e69--)(_0x390216=_0x1526d9[_0x266e69])&&(_0x69f86d=_0x390216(_0x69f86d)||_0x69f86d);return _0x69f86d;},C=(_0xc014bb,_0x58f93e)=>(_0x179bc9,_0x21a9f5)=>_0x58f93e(_0x179bc9,_0x21a9f5,_0xc014bb);function Y(_0x56bc64,_0x489b4b){const _0x4c7c77=_0x496397,_0x1357af=_0x56bc64[_0x4c7c77(0x1db)][0x0];return{..._0x489b4b,'id':_0x1357af[_0x4c7c77(0x202)],'resolved':_0x56bc64[_0x4c7c77(0x1c7)]===0x1,'dT':f(_0x1357af[_0x4c7c77(0x218)]),'personId':_0x1357af[_0x4c7c77(0x1cd)],'threadId':_0x1357af[_0x4c7c77(0x20d)]};}function G(_0x1ba542,_0x5b9e89,_0x58f40c){const _0x2f9a83=_0x496397;var _0x27e062,_0x4788ac;if(((_0x4788ac=(_0x27e062=_0x1ba542==null?void 0x0:_0x1ba542['replies'])==null?void 0x0:_0x27e062[_0x2f9a83(0x1ba)])!=null?_0x4788ac:0x0)>0x0){const _0x200589=(_0x12e432,_0x4211e2)=>({'id':_0x12e432[_0x2f9a83(0x202)],'threadId':_0x12e432[_0x2f9a83(0x20d)],'dT':f(_0x12e432[_0x2f9a83(0x218)]),'personId':_0x12e432[_0x2f9a83(0x1cd)],'resolved':_0x1ba542[_0x2f9a83(0x1c7)]===I[_0x2f9a83(0x1d6)],'unitId':_0x5b9e89,'subUnitId':_0x58f40c,'text':JSON[_0x2f9a83(0x208)](_0x12e432[_0x2f9a83(0x1ea)]),'parentId':_0x4211e2}),_0x48ca36=_0x200589(_0x1ba542[_0x2f9a83(0x1db)][0x0]);return{..._0x48ca36,'children':_0x1ba542[_0x2f9a83(0x1db)]['slice'](0x1)[_0x2f9a83(0x1b9)](_0x4d3044=>_0x200589(_0x4d3044,_0x48ca36['id']))};}return null;}let p=class{constructor(_0x9c412a,_0x11e429,_0x7d1c6a){const _0x22dba8=_0x496397;this[_0x22dba8(0x1c3)]=_0x9c412a,this['_userService']=_0x11e429,this[_0x22dba8(0x20f)]=_0x7d1c6a;}async[_0x496397(0x204)](_0x25dc89){const _0x68c67a=_0x496397;var _0x3953f7,_0x4df76e;const {parentId:_0x48dcbb,unitId:_0x5a8fdd,text:_0x1ec326,threadId:_0x4eebd8}=_0x25dc89,_0x3289c1=(_0x4df76e=(_0x3953f7=_0x1ec326[_0x68c67a(0x220)])==null?void 0x0:_0x3953f7['filter'](_0x451f9e=>_0x451f9e[_0x68c67a(0x205)]===c['CustomRangeType'][_0x68c67a(0x1e3)])[_0x68c67a(0x1b9)](_0x43eaca=>_0x43eaca[_0x68c67a(0x1ed)]))!=null?_0x4df76e:[],_0x284ea6=JSON[_0x68c67a(0x1be)](_0x1ec326),_0x13091a=(await this[_0x68c67a(0x20f)][_0x68c67a(0x21a)](_0x5a8fdd))[_0x68c67a(0x21b)]();if(_0x48dcbb){const _0x308350={'memberId':_0x13091a,'unitId':_0x5a8fdd,'content':_0x284ea6,'mention':_0x3289c1,'threadId':_0x4eebd8},_0x50a430=(await this[_0x68c67a(0x1c3)][_0x68c67a(0x1f7)](_0x68c67a(0x1e5)+_0x5a8fdd+_0x68c67a(0x1d2),{'body':_0x308350}))[_0x68c67a(0x1e1)][_0x68c67a(0x20c)];return{..._0x25dc89,'id':_0x50a430[_0x68c67a(0x202)],'dT':c['dayjs'](+_0x50a430[_0x68c67a(0x218)])[_0x68c67a(0x1fd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50a430['userId']};}else{const _0x484525={'memberId':_0x13091a,'unitId':_0x5a8fdd,'content':_0x284ea6,'mention':_0x3289c1},_0x5b1204=await this[_0x68c67a(0x1c3)][_0x68c67a(0x1f7)]('/universer-api/comment/unit/'+_0x5a8fdd+_0x68c67a(0x1ac),{'body':_0x484525});return Y(_0x5b1204[_0x68c67a(0x1e1)][_0x68c67a(0x20a)],_0x25dc89);}}async['updateComment'](_0x483d14){const _0x14b1e6=_0x496397;var _0x15fafa,_0x4ec84b;const {text:_0x7c98b,unitId:_0x2c1055}=_0x483d14,_0x294ac7=(_0x4ec84b=(_0x15fafa=_0x7c98b[_0x14b1e6(0x220)])==null?void 0x0:_0x15fafa[_0x14b1e6(0x1e0)](_0x1b5fa9=>_0x1b5fa9[_0x14b1e6(0x205)]===c[_0x14b1e6(0x1bb)][_0x14b1e6(0x1e3)])[_0x14b1e6(0x1b9)](_0x32769b=>_0x32769b[_0x14b1e6(0x1ed)]))!=null?_0x4ec84b:[],_0x1382ad=JSON[_0x14b1e6(0x1be)](_0x7c98b),_0x4a6c10=_0x483d14[_0x14b1e6(0x20d)],_0x5b5df7=_0x483d14['id'],_0x55f5ed={'memberId':(await this[_0x14b1e6(0x20f)][_0x14b1e6(0x21a)](_0x2c1055))[_0x14b1e6(0x21b)](),'unitId':_0x2c1055,'threadId':_0x4a6c10,'mention':_0x294ac7,'content':_0x1382ad,'replyId':_0x5b5df7},_0x59dd6a=await this['_httpService'][_0x14b1e6(0x1f7)](_0x14b1e6(0x1e5)+_0x2c1055+_0x14b1e6(0x224),{'body':_0x55f5ed});return!_0x59dd6a[_0x14b1e6(0x1e1)]['error']||_0x59dd6a['body'][_0x14b1e6(0x216)][_0x14b1e6(0x1eb)]===0x1;}async[_0x496397(0x221)](_0x501a4d){const _0x56e368=_0x496397,{unitId:_0x2a5048}=_0x501a4d,_0x9b76d3=_0x501a4d[_0x56e368(0x20d)],_0x532977={'memberId':this[_0x56e368(0x1d7)][_0x56e368(0x1fb)]()[_0x56e368(0x219)],'unitId':_0x2a5048,'threadId':_0x9b76d3,'solved':_0x501a4d[_0x56e368(0x1f5)]?I['Solved']:I['OpenOrReOpen']},_0x243baa=await this[_0x56e368(0x1c3)]['post']('/universer-api/comment/unit/'+_0x2a5048+_0x56e368(0x217),{'body':_0x532977});return!_0x243baa[_0x56e368(0x1e1)][_0x56e368(0x216)]||_0x243baa[_0x56e368(0x1e1)][_0x56e368(0x216)][_0x56e368(0x1eb)]===0x1;}async[_0x496397(0x1cf)](_0x29fbc3,_0x37afed,_0xd29964,_0x10b283){const _0x23d757=_0x496397,_0x66a3db={'memberId':(await this[_0x23d757(0x20f)][_0x23d757(0x21a)](_0x29fbc3))['getMemberID'](),'threadId':_0xd29964,'replyId':_0x10b283,'unitId':_0x29fbc3},_0x2d8fda=await this[_0x23d757(0x1c3)]['post']('/universer-api/comment/unit/'+_0x29fbc3+_0x23d757(0x1f8),{'body':_0x66a3db});return!_0x2d8fda[_0x23d757(0x1e1)][_0x23d757(0x216)]||_0x2d8fda[_0x23d757(0x1e1)][_0x23d757(0x216)][_0x23d757(0x1eb)]===0x1;}async[_0x496397(0x225)](_0x176412,_0x2741be,_0x1b30a0){const _0x4d95ce=_0x496397,_0x263b12={'unitId':_0x176412,'threadId':_0x1b30a0},_0x61f093=await this['_httpService'][_0x4d95ce(0x1f7)](_0x4d95ce(0x1e5)+_0x176412+_0x4d95ce(0x206),{'body':_0x263b12}),_0x27c620=_0x1b30a0['map'](_0x5c3dd1=>G(_0x61f093[_0x4d95ce(0x1e1)][_0x4d95ce(0x1ef)][_0x5c3dd1],_0x176412,_0x2741be))[_0x4d95ce(0x1e0)](Boolean);return Object[_0x4d95ce(0x1dd)](_0x61f093['body'][_0x4d95ce(0x1fc)])[_0x4d95ce(0x214)](_0x46fbb4=>{const _0x44d93e=_0x4d95ce;this['_userService'][_0x44d93e(0x1c2)](_0x46fbb4);}),_0x27c620;}[_0x496397(0x1b8)](_0x5ad51e){const _0x35cf07=_0x496397;return{'id':_0x5ad51e['id'],'threadId':_0x5ad51e[_0x35cf07(0x20d)],'ref':_0x5ad51e[_0x35cf07(0x1ec)]};}};p=x([C(0x0,c[_0x496397(0x1fe)](P[_0x496397(0x20e)])),C(0x1,c[_0x496397(0x1fe)](c[_0x496397(0x1bf)])),C(0x2,c[_0x496397(0x1fe)](b[_0x496397(0x1f2)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x3ac7b1,_0x279154,_0x22cdb2,_0x107095)=>{const _0xa43ed=_0x496397;for(var _0x203395=_0x107095>0x1?void 0x0:_0x107095?H(_0x279154,_0x22cdb2):_0x279154,_0x1a4ecd=_0x3ac7b1[_0xa43ed(0x1ba)]-0x1,_0x1f1e04;_0x1a4ecd>=0x0;_0x1a4ecd--)(_0x1f1e04=_0x3ac7b1[_0x1a4ecd])&&(_0x203395=_0x1f1e04(_0x203395)||_0x203395);return _0x203395;},y=(_0x554bfc,_0x398945)=>(_0x16ffc7,_0x2e41bd)=>_0x398945(_0x16ffc7,_0x2e41bd,_0x554bfc);let g=class extends c[_0x496397(0x201)]{constructor(_0x47c51f,_0x1bd6ff){super(),this['_threadCommentDataSourceService']=_0x47c51f,this['_threadCommentDataSource']=_0x1bd6ff,this['_initDataSource']();}[_0x496397(0x1d8)](){const _0x59dfe5=_0x496397;this['_threadCommentDataSourceService'][_0x59dfe5(0x1b5)]=this['_threadCommentDataSource'],this[_0x59dfe5(0x1b0)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x496397(0x1fe)](p))],g);var F=Object[_0x496397(0x1f9)],L=Object[_0x496397(0x1bd)],Z=(_0x189e48,_0x13121f,_0x5d1085)=>_0x13121f in _0x189e48?F(_0x189e48,_0x13121f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d1085}):_0x189e48[_0x13121f]=_0x5d1085,W=(_0x5c8db4,_0x4ace0b,_0x203273,_0x2a54a7)=>{const _0x118798=_0x496397;for(var _0x3bfec4=_0x2a54a7>0x1?void 0x0:_0x2a54a7?L(_0x4ace0b,_0x203273):_0x4ace0b,_0x5b7b09=_0x5c8db4[_0x118798(0x1ba)]-0x1,_0x1ed0a8;_0x5b7b09>=0x0;_0x5b7b09--)(_0x1ed0a8=_0x5c8db4[_0x5b7b09])&&(_0x3bfec4=_0x1ed0a8(_0x3bfec4)||_0x3bfec4);return _0x3bfec4;},O=(_0x3e68b8,_0x55b7e3)=>(_0x2317f9,_0x3cb4a3)=>_0x55b7e3(_0x2317f9,_0x3cb4a3,_0x3e68b8),N=(_0x5214bf,_0x1557f9,_0x568ee1)=>Z(_0x5214bf,typeof _0x1557f9!=_0x496397(0x207)?_0x1557f9+'':_0x1557f9,_0x568ee1);exports[_0x496397(0x1ee)]=class extends c[_0x496397(0x1b7)]{constructor(_0x2a87a8=D,_0x298c19,_0xa6c756){const _0x525674=_0x496397;super(),this[_0x525674(0x1c1)]=_0x2a87a8,this[_0x525674(0x1f3)]=_0x298c19,this[_0x525674(0x1af)]=_0xa6c756;const {..._0x135a6d}=c[_0x525674(0x1c4)]({},D,this['_config']);this[_0x525674(0x1af)][_0x525674(0x1da)](q,_0x135a6d);}[_0x496397(0x1ce)](){const _0x57369d=_0x496397;[[p],[g],[_]][_0x57369d(0x214)](_0xfefbd4=>{const _0x5b34ff=_0x57369d;this[_0x5b34ff(0x1f3)][_0x5b34ff(0x203)](_0xfefbd4);});}['onReady'](){const _0x42e236=_0x496397;this['_injector'][_0x42e236(0x1b4)](g),this[_0x42e236(0x1f3)][_0x42e236(0x1b4)](_);}},N(exports[_0x496397(0x1ee)],_0x496397(0x215),U),N(exports[_0x496397(0x1ee)],_0x496397(0x223),c[_0x496397(0x20b)][_0x496397(0x1aa)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x496397(0x1b6)](w[_0x496397(0x1b1)],b['UniverCollaborationClientPlugin'],T[_0x496397(0x210)]),O(0x1,c[_0x496397(0x1fe)](c[_0x496397(0x1e6)])),O(0x2,c[_0x496397(0x1b3)])],exports[_0x496397(0x1ee)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5502ef=_0x6c3d;(function(_0x19a02a,_0x3148c0){const _0x3b5673=_0x6c3d,_0x32203f=_0x19a02a();while(!![]){try{const _0xeea4f4=parseInt(_0x3b5673(0xf4))/0x1*(-parseInt(_0x3b5673(0x109))/0x2)+-parseInt(_0x3b5673(0x108))/0x3*(parseInt(_0x3b5673(0x130))/0x4)+parseInt(_0x3b5673(0xff))/0x5+parseInt(_0x3b5673(0xeb))/0x6*(-parseInt(_0x3b5673(0xf5))/0x7)+-parseInt(_0x3b5673(0x11e))/0x8+parseInt(_0x3b5673(0xd7))/0x9+parseInt(_0x3b5673(0xf7))/0xa*(parseInt(_0x3b5673(0xef))/0xb);if(_0xeea4f4===_0x3148c0)break;else _0x32203f['push'](_0x32203f['shift']());}catch(_0x3a312f){_0x32203f['push'](_0x32203f['shift']());}}}(_0x4c9d,0x1fca8));import{CommentService as _0x384589,CollaborationSessionService as _0x4648a7,UniverCollaborationClientPlugin as _0xbacb1d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4273b7}from'@univerjs-pro/license';import{dayjs as _0x46326d,UserManagerService as _0x27db51,Inject as _0x4bcd01,Injector as _0x3fde1a,Disposable as _0x57944e,CustomRangeType as _0x486a80,UniverInstanceType as _0x486682,DependentOn as _0x56a696,IConfigService as _0x2e8d6c,Plugin as _0x2cdc95,merge as _0x1425e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11d26e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x82c273,IThreadCommentDataSourceService as _0x49bb57}from'@univerjs/thread-comment';function _0x6c3d(_0x37e9de,_0x2cddf4){_0x37e9de=_0x37e9de-0xd3;const _0x4c9d6f=_0x4c9d();let _0x6c3d0f=_0x4c9d6f[_0x37e9de];return _0x6c3d0f;}import{bufferTime as _0x30b318}from'rxjs';function _0x4c9d(){const _0x15b6e7=['dataSource','resolved','_httpService','thread-comment-data-source.config','Solve','_config','rangeId','threadId','comment','_sessionService','_threadCommentDataSourceService','OpenOrReOpen','personId','replies','users','6vBTVin','commentUpdate$','code','_initUserSync','6798ibJrAG','userID','createTimestamp','map','solved','75930itfKTx','1306613ydaNvL','customRanges','4730VfOyJz','pipe','content','filter','Delete','pluginName','Edit','addUser','716215fHxlLQ','forEach','root','values','body','updateComment','Add','find','/add','12CGkRVB','2MKkafv','disposeWithMe','_threadCommentDataSource','_threadCommentModel','rangeType','unitId','size','replyId','reply','parentId','/list','slice','YYYY/MM/DD\x20HH:mm','Reply','getCurrentUser','/universer-api/comment/unit/','_injector','/solved','Unknown','Solved','format','1813040rVTUOU','addComment','defineProperty','getComment','deleteComment','_initDataSource','userId','getMemberID','UNRECOGNIZED','user','requireSession','resolveComment','COMMENT','post','add','get','_init','getOwnPropertyDescriptor','17552hYYdbV','/universer-api/user/list','onReady','subscribe','_configService','_userService','/edit','error','saveCommentToSnapshot','1812870MuZphA','syncUpdateMutationToColla','parse','type','length'];_0x4c9d=function(){return _0x15b6e7;};return _0x4c9d();}import{HTTPService as _0x4487a0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6a11=>(_0x5b6a11[_0x5b6a11[_0x5502ef(0xe7)]=0x0]=_0x5502ef(0xe7),_0x5b6a11[_0x5b6a11[_0x5502ef(0x11c)]=0x1]=_0x5502ef(0x11c),_0x5b6a11[_0x5b6a11[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x5b6a11))(I||{}),v=(_0x18381d=>(_0x18381d[_0x18381d['Unknown']=0x0]=_0x5502ef(0x11b),_0x18381d[_0x18381d[_0x5502ef(0x105)]=0x1]=_0x5502ef(0x105),_0x18381d[_0x18381d['Reply']=0x2]=_0x5502ef(0x116),_0x18381d[_0x18381d[_0x5502ef(0xfd)]=0x3]=_0x5502ef(0xfd),_0x18381d[_0x18381d[_0x5502ef(0xfb)]=0x4]=_0x5502ef(0xfb),_0x18381d[_0x18381d[_0x5502ef(0xe0)]=0x5]=_0x5502ef(0xe0),_0x18381d[_0x18381d[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x18381d))(v||{});const y=_0x2c1584=>_0x46326d(new Date(+_0x2c1584))[_0x5502ef(0x11d)](_0x5502ef(0x115)),B=async(_0x657c59,_0x1db819)=>{const _0x4cfbaa=_0x5502ef,_0x27bcdb=_0x657c59[_0x4cfbaa(0x12d)](_0x27db51),_0x1680cc=_0x657c59[_0x4cfbaa(0x12d)](_0x4487a0);_0x1db819[_0x4cfbaa(0x100)](_0x156408=>{_0x27bcdb['getUser'](_0x156408)&&_0x1db819['delete'](_0x156408);}),_0x1db819[_0x4cfbaa(0x10f)]&&(await _0x1680cc[_0x4cfbaa(0x12d)](_0x4cfbaa(0x131),{'params':{'userIDs':[..._0x1db819]}}))[_0x4cfbaa(0x103)][_0x4cfbaa(0xea)][_0x4cfbaa(0x100)](_0x1edb5f=>{const _0x2b0e2e=_0x4cfbaa;_0x1edb5f&&_0x27bcdb[_0x2b0e2e(0xfe)](_0x1edb5f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d0357,_0x1f97d5,_0x38f3c8,_0xcd4924)=>{const _0x9ede38=_0x5502ef;for(var _0x580322=_0xcd4924>0x1?void 0x0:_0xcd4924?K(_0x1f97d5,_0x38f3c8):_0x1f97d5,_0x5ce02e=_0x3d0357[_0x9ede38(0xdb)]-0x1,_0x20cd4b;_0x5ce02e>=0x0;_0x5ce02e--)(_0x20cd4b=_0x3d0357[_0x5ce02e])&&(_0x580322=_0x20cd4b(_0x580322)||_0x580322);return _0x580322;},p=(_0x3be05e,_0x1c1942)=>(_0x55356e,_0x3166af)=>_0x1c1942(_0x55356e,_0x3166af,_0x3be05e);let _=class extends _0x57944e{constructor(_0x26567a,_0x253629,_0x1923ca,_0x347c33){const _0x2d40d5=_0x5502ef;super(),this['_commentService']=_0x26567a,this[_0x2d40d5(0x10c)]=_0x253629,this['_userService']=_0x1923ca,this[_0x2d40d5(0x119)]=_0x347c33,this[_0x2d40d5(0x12e)](),this[_0x2d40d5(0xee)]();}[_0x5502ef(0xee)](){const _0x4c71d0=_0x5502ef;this[_0x4c71d0(0x10a)](this[_0x4c71d0(0x10c)][_0x4c71d0(0xec)][_0x4c71d0(0xf8)](_0x30b318(0x10))[_0x4c71d0(0x133)](_0x1ba8b2=>{const _0x533292=new Set();_0x1ba8b2['forEach'](_0xf9b475=>{const _0xb3b3cf=_0x6c3d;if(_0xf9b475[_0xb3b3cf(0xda)]===_0xb3b3cf(0x12c)){const _0x5ac8dd=_0xf9b475['payload'][_0xb3b3cf(0xe8)];_0x533292[_0xb3b3cf(0x12c)](_0x5ac8dd);}}),B(this['_injector'],_0x533292);}));}[_0x5502ef(0x12e)](){const _0x113680=_0x5502ef;this[_0x113680(0x10a)](this['_commentService'][_0x113680(0xec)][_0x113680(0x133)](async _0x54feed=>{const _0x15d514=_0x113680;var _0x501ab7,_0x3af9f0,_0xac0b7b,_0x43d864;const _0x1cc4a0=(_0x501ab7=this[_0x15d514(0x10c)]['getUnit'](_0x54feed['unitId'])[_0x15d514(0x106)](_0xc4bc9e=>_0xc4bc9e[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x501ab7[_0x15d514(0x101)];if(!_0x1cc4a0)return;const {unitId:_0x296b6e,subUnitId:_0x4879cf}=_0x1cc4a0;switch(_0x54feed[_0x15d514(0x127)]&&this['_userService'][_0x15d514(0xfe)](_0x54feed[_0x15d514(0x127)]),_0x54feed['type']){case v[_0x15d514(0x105)]:break;case v[_0x15d514(0x116)]:{this[_0x15d514(0x10c)][_0x15d514(0x11f)](_0x296b6e,_0x4879cf,{'unitId':_0x296b6e,'subUnitId':_0x4879cf,'ref':'','id':_0x54feed[_0x15d514(0x110)],'dT':y(+_0x54feed[_0x15d514(0xf1)]),'threadId':_0x54feed[_0x15d514(0xe3)],'personId':(_0xac0b7b=(_0x3af9f0=_0x54feed[_0x15d514(0x127)])==null?void 0x0:_0x3af9f0[_0x15d514(0xf0)])!=null?_0xac0b7b:_0x54feed[_0x15d514(0x124)],'text':JSON[_0x15d514(0xd9)](_0x54feed['content']),'parentId':_0x1cc4a0['id']});break;}case v[_0x15d514(0xfb)]:{const _0x5c5bff=this[_0x15d514(0x10c)][_0x15d514(0x121)](_0x296b6e,_0x4879cf,_0x54feed['replyId']);_0x5c5bff&&_0x5c5bff[_0x15d514(0x112)]&&this[_0x15d514(0x10c)][_0x15d514(0x122)](_0x296b6e,_0x4879cf,_0x54feed[_0x15d514(0x110)]);break;}case v[_0x15d514(0xfd)]:{this['_threadCommentModel'][_0x15d514(0x104)](_0x296b6e,_0x4879cf,{'commentId':_0x54feed['replyId'],'text':JSON[_0x15d514(0xd9)](_0x54feed['content'])});break;}case v[_0x15d514(0xe0)]:{const _0x417757=(_0x43d864=this['_threadCommentModel']['getUnit'](_0x54feed[_0x15d514(0x10e)])[_0x15d514(0x106)](_0x45d009=>_0x45d009[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x43d864[_0x15d514(0x101)];_0x417757&&this[_0x15d514(0x10c)][_0x15d514(0x129)](_0x296b6e,_0x4879cf,_0x417757['id'],_0x54feed[_0x15d514(0xf3)]===I[_0x15d514(0x11c)]);break;}}}));}};_=V([p(0x0,_0x4bcd01(_0x384589)),p(0x1,_0x4bcd01(_0x82c273)),p(0x2,_0x4bcd01(_0x27db51)),p(0x3,_0x4bcd01(_0x3fde1a))],_);const z=_0x5502ef(0xdf),O={};var k=Object[_0x5502ef(0x12f)],Q=(_0x1115d8,_0x2b2626,_0x81fe15,_0x21201c)=>{const _0x5c29ad=_0x5502ef;for(var _0x43afe1=_0x21201c>0x1?void 0x0:_0x21201c?k(_0x2b2626,_0x81fe15):_0x2b2626,_0x396ed7=_0x1115d8[_0x5c29ad(0xdb)]-0x1,_0x2d5ddb;_0x396ed7>=0x0;_0x396ed7--)(_0x2d5ddb=_0x1115d8[_0x396ed7])&&(_0x43afe1=_0x2d5ddb(_0x43afe1)||_0x43afe1);return _0x43afe1;},b=(_0x53fa4b,_0xd2d989)=>(_0x1948ef,_0x1ab021)=>_0xd2d989(_0x1948ef,_0x1ab021,_0x53fa4b);function X(_0x27783f,_0x55f584){const _0x5d6b52=_0x5502ef,_0x126ec8=_0x27783f[_0x5d6b52(0xe9)][0x0];return{..._0x55f584,'id':_0x126ec8[_0x5d6b52(0x110)],'resolved':_0x27783f['solved']===0x1,'dT':y(_0x126ec8[_0x5d6b52(0xf1)]),'personId':_0x126ec8[_0x5d6b52(0x124)],'threadId':_0x126ec8[_0x5d6b52(0xe3)]};}function ee(_0x3cd999,_0x416f6d,_0x143aba){const _0x9db4b=_0x5502ef;var _0x31695b,_0x219fa7;if(((_0x219fa7=(_0x31695b=_0x3cd999==null?void 0x0:_0x3cd999[_0x9db4b(0xe9)])==null?void 0x0:_0x31695b[_0x9db4b(0xdb)])!=null?_0x219fa7:0x0)>0x0){const _0x40d3b5=(_0x34abc9,_0x4b6350)=>({'id':_0x34abc9[_0x9db4b(0x110)],'threadId':_0x34abc9['threadId'],'dT':y(_0x34abc9[_0x9db4b(0xf1)]),'personId':_0x34abc9['userId'],'resolved':_0x3cd999[_0x9db4b(0xf3)]===I[_0x9db4b(0x11c)],'unitId':_0x416f6d,'subUnitId':_0x143aba,'text':JSON['parse'](_0x34abc9[_0x9db4b(0xf9)]),'parentId':_0x4b6350}),_0x314cc4=_0x40d3b5(_0x3cd999[_0x9db4b(0xe9)][0x0]);return{..._0x314cc4,'children':_0x3cd999['replies'][_0x9db4b(0x114)](0x1)[_0x9db4b(0xf2)](_0xd26377=>_0x40d3b5(_0xd26377,_0x314cc4['id']))};}return null;}let S=class{constructor(_0x25b219,_0x279756,_0x4a54b6){const _0x4e93a9=_0x5502ef;this[_0x4e93a9(0xde)]=_0x25b219,this[_0x4e93a9(0xd3)]=_0x279756,this[_0x4e93a9(0xe5)]=_0x4a54b6;}async[_0x5502ef(0x11f)](_0x2198b3){const _0x2d5ec8=_0x5502ef;var _0xd23009,_0x15427d;const {parentId:_0x25a4e2,unitId:_0x3acb94,text:_0x41ec0b,threadId:_0x276f2a}=_0x2198b3,_0x596727=(_0x15427d=(_0xd23009=_0x41ec0b[_0x2d5ec8(0xf6)])==null?void 0x0:_0xd23009[_0x2d5ec8(0xfa)](_0x4148b3=>_0x4148b3[_0x2d5ec8(0x10d)]===_0x486a80[_0x2d5ec8(0x12a)])[_0x2d5ec8(0xf2)](_0x496d93=>_0x496d93['rangeId']))!=null?_0x15427d:[],_0x667b60=JSON['stringify'](_0x41ec0b),_0x4d26d3=(await this[_0x2d5ec8(0xe5)]['requireSession'](_0x3acb94))['getMemberID']();if(_0x25a4e2){const _0x25f7e4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727,'threadId':_0x276f2a},_0x41eeac=(await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+'/reply',{'body':_0x25f7e4}))[_0x2d5ec8(0x103)][_0x2d5ec8(0x111)];return{..._0x2198b3,'id':_0x41eeac[_0x2d5ec8(0x110)],'dT':_0x46326d(+_0x41eeac[_0x2d5ec8(0xf1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x41eeac[_0x2d5ec8(0x124)]};}else{const _0x5a2af4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727},_0x46c442=await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+_0x2d5ec8(0x107),{'body':_0x5a2af4});return X(_0x46c442[_0x2d5ec8(0x103)][_0x2d5ec8(0xe4)],_0x2198b3);}}async['updateComment'](_0x2d15d4){const _0x1cb45b=_0x5502ef;var _0x21da22,_0x38e3a1;const {text:_0x18b35a,unitId:_0x3a3216}=_0x2d15d4,_0x2dd3d7=(_0x38e3a1=(_0x21da22=_0x18b35a['customRanges'])==null?void 0x0:_0x21da22[_0x1cb45b(0xfa)](_0x49c750=>_0x49c750[_0x1cb45b(0x10d)]===_0x486a80[_0x1cb45b(0x12a)])[_0x1cb45b(0xf2)](_0x5a9771=>_0x5a9771[_0x1cb45b(0xe2)]))!=null?_0x38e3a1:[],_0x77ccb4=JSON['stringify'](_0x18b35a),_0x1e8672=_0x2d15d4[_0x1cb45b(0xe3)],_0x43e31c=_0x2d15d4['id'],_0x33c30d={'memberId':(await this[_0x1cb45b(0xe5)][_0x1cb45b(0x128)](_0x3a3216))['getMemberID'](),'unitId':_0x3a3216,'threadId':_0x1e8672,'mention':_0x2dd3d7,'content':_0x77ccb4,'replyId':_0x43e31c},_0x3954f5=await this[_0x1cb45b(0xde)][_0x1cb45b(0x12b)](_0x1cb45b(0x118)+_0x3a3216+_0x1cb45b(0xd4),{'body':_0x33c30d});return!_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)]||_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)][_0x1cb45b(0xed)]===0x1;}async[_0x5502ef(0x129)](_0x42cf16){const _0x134633=_0x5502ef,{unitId:_0x1011b6}=_0x42cf16,_0x741f78=_0x42cf16['threadId'],_0xf28209={'memberId':this[_0x134633(0xd3)][_0x134633(0x117)]()[_0x134633(0xf0)],'unitId':_0x1011b6,'threadId':_0x741f78,'solved':_0x42cf16[_0x134633(0xdd)]?I[_0x134633(0x11c)]:I['OpenOrReOpen']},_0x2cb7f5=await this[_0x134633(0xde)][_0x134633(0x12b)]('/universer-api/comment/unit/'+_0x1011b6+_0x134633(0x11a),{'body':_0xf28209});return!_0x2cb7f5['body'][_0x134633(0xd5)]||_0x2cb7f5[_0x134633(0x103)][_0x134633(0xd5)][_0x134633(0xed)]===0x1;}async[_0x5502ef(0x122)](_0x199ca0,_0x3ffdfe,_0x4a3a36,_0x77629f){const _0x392413=_0x5502ef,_0x4f2ac3={'memberId':(await this[_0x392413(0xe5)][_0x392413(0x128)](_0x199ca0))[_0x392413(0x125)](),'threadId':_0x4a3a36,'replyId':_0x77629f,'unitId':_0x199ca0},_0x57f60f=await this['_httpService'][_0x392413(0x12b)](_0x392413(0x118)+_0x199ca0+'/delete',{'body':_0x4f2ac3});return!_0x57f60f['body'][_0x392413(0xd5)]||_0x57f60f[_0x392413(0x103)]['error'][_0x392413(0xed)]===0x1;}async['listComments'](_0x1cf0e6,_0x549585,_0x5e5a69){const _0x2f1732=_0x5502ef,_0x4d5a9a={'unitId':_0x1cf0e6,'threadId':_0x5e5a69},_0x416232=await this[_0x2f1732(0xde)][_0x2f1732(0x12b)](_0x2f1732(0x118)+_0x1cf0e6+_0x2f1732(0x113),{'body':_0x4d5a9a}),_0x412e8=_0x5e5a69[_0x2f1732(0xf2)](_0x3095d7=>ee(_0x416232[_0x2f1732(0x103)]['comments'][_0x3095d7],_0x1cf0e6,_0x549585))[_0x2f1732(0xfa)](Boolean);return Object[_0x2f1732(0x102)](_0x416232[_0x2f1732(0x103)][_0x2f1732(0xea)])[_0x2f1732(0x100)](_0x507473=>{const _0x4dd1fa=_0x2f1732;this['_userService'][_0x4dd1fa(0xfe)](_0x507473);}),_0x412e8;}[_0x5502ef(0xd6)](_0xd406e){const _0x1a094f=_0x5502ef;return{'id':_0xd406e['id'],'threadId':_0xd406e[_0x1a094f(0xe3)],'ref':_0xd406e['ref']};}};S=Q([b(0x0,_0x4bcd01(_0x4487a0)),b(0x1,_0x4bcd01(_0x27db51)),b(0x2,_0x4bcd01(_0x4648a7))],S);var re=Object[_0x5502ef(0x12f)],te=(_0x4fe564,_0x305496,_0x494da1,_0x523969)=>{const _0x5da8ff=_0x5502ef;for(var _0x5b9584=_0x523969>0x1?void 0x0:_0x523969?re(_0x305496,_0x494da1):_0x305496,_0x1a059a=_0x4fe564[_0x5da8ff(0xdb)]-0x1,_0x2fc531;_0x1a059a>=0x0;_0x1a059a--)(_0x2fc531=_0x4fe564[_0x1a059a])&&(_0x5b9584=_0x2fc531(_0x5b9584)||_0x5b9584);return _0x5b9584;},M=(_0x438c9b,_0xa6f0f6)=>(_0x41f0ff,_0x27bac4)=>_0xa6f0f6(_0x41f0ff,_0x27bac4,_0x438c9b);let f=class extends _0x57944e{constructor(_0x1c140a,_0x2a37df){const _0x400922=_0x5502ef;super(),this[_0x400922(0xe6)]=_0x1c140a,this[_0x400922(0x10b)]=_0x2a37df,this['_initDataSource']();}[_0x5502ef(0x123)](){const _0x295691=_0x5502ef;this[_0x295691(0xe6)][_0x295691(0xdc)]=this['_threadCommentDataSource'],this[_0x295691(0xe6)][_0x295691(0xd8)]=!0x1;}};f=te([M(0x0,_0x49bb57),M(0x1,_0x4bcd01(S))],f);var se=Object[_0x5502ef(0x120)],oe=Object[_0x5502ef(0x12f)],ne=(_0x2b2d8a,_0x490009,_0x446ff8)=>_0x490009 in _0x2b2d8a?se(_0x2b2d8a,_0x490009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446ff8}):_0x2b2d8a[_0x490009]=_0x446ff8,ie=(_0x2cfb48,_0x4d72e5,_0x2ca01f,_0x1df935)=>{for(var _0x5c1628=_0x1df935>0x1?void 0x0:_0x1df935?oe(_0x4d72e5,_0x2ca01f):_0x4d72e5,_0x4765db=_0x2cfb48['length']-0x1,_0x28be5e;_0x4765db>=0x0;_0x4765db--)(_0x28be5e=_0x2cfb48[_0x4765db])&&(_0x5c1628=_0x28be5e(_0x5c1628)||_0x5c1628);return _0x5c1628;},N=(_0xa8815c,_0x157fe2)=>(_0x4400e0,_0x59cee3)=>_0x157fe2(_0x4400e0,_0x59cee3,_0xa8815c),$=(_0x30c66c,_0x30f413,_0x1ea869)=>ne(_0x30c66c,typeof _0x30f413!='symbol'?_0x30f413+'':_0x30f413,_0x1ea869);let g=class extends _0x2cdc95{constructor(_0x1df3a3=O,_0x77e181,_0x2fd41e){const _0x6b2442=_0x5502ef;super(),this[_0x6b2442(0xe1)]=_0x1df3a3,this[_0x6b2442(0x119)]=_0x77e181,this[_0x6b2442(0x134)]=_0x2fd41e;const {..._0x50a352}=_0x1425e8({},O,this[_0x6b2442(0xe1)]);this[_0x6b2442(0x134)]['setConfig'](z,_0x50a352);}['onStarting'](){const _0x11dcc8=_0x5502ef;[[S],[f],[_]][_0x11dcc8(0x100)](_0x461bc1=>{const _0xdd882d=_0x11dcc8;this[_0xdd882d(0x119)]['add'](_0x461bc1);});}[_0x5502ef(0x132)](){const _0xe778b5=_0x5502ef;this[_0xe778b5(0x119)]['get'](f),this[_0xe778b5(0x119)][_0xe778b5(0x12d)](_);}};$(g,_0x5502ef(0xfc),W),$(g,_0x5502ef(0xda),_0x486682['UNIVER_UNKNOWN']),g=ie([_0x56a696(_0x11d26e,_0xbacb1d,_0x4273b7),N(0x1,_0x4bcd01(_0x3fde1a)),N(0x2,_0x2e8d6c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x231458=_0x43f0;(function(_0x5102db,_0x2b7586){const _0x5b2b93=_0x43f0,_0x321477=_0x5102db();while(!![]){try{const _0x3c4b1c=parseInt(_0x5b2b93(0x74))/0x1*(parseInt(_0x5b2b93(0xc0))/0x2)+-parseInt(_0x5b2b93(0x75))/0x3+-parseInt(_0x5b2b93(0x98))/0x4*(parseInt(_0x5b2b93(0xcc))/0x5)+-parseInt(_0x5b2b93(0x78))/0x6+-parseInt(_0x5b2b93(0x6c))/0x7+-parseInt(_0x5b2b93(0x7a))/0x8*(parseInt(_0x5b2b93(0xc6))/0x9)+parseInt(_0x5b2b93(0xb2))/0xa;if(_0x3c4b1c===_0x2b7586)break;else _0x321477['push'](_0x321477['shift']());}catch(_0xb1d5e1){_0x321477['push'](_0x321477['shift']());}}}(_0x5e35,0x27ffd));import{CommentService as _0x20b5b6,CollaborationSessionService as _0x41a581,UniverCollaborationClientPlugin as _0x40c7ce}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3794a6}from'@univerjs-pro/license';import{dayjs as _0x1a50d1,UserManagerService as _0x1caf0d,Inject as _0x3fb278,Injector as _0x1416f8,Disposable as _0x519c68,CustomRangeType as _0x34627d,UniverInstanceType as _0x13e5ee,DependentOn as _0x326330,IConfigService as _0x25bde9,Plugin as _0x3e97cc,merge as _0x58bb88}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47e1d5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b6328,IThreadCommentDataSourceService as _0x563d0d}from'@univerjs/thread-comment';import{bufferTime as _0x11cf83}from'rxjs';function _0x43f0(_0x22e547,_0x3e2ffa){_0x22e547=_0x22e547-0x64;const _0x5e3560=_0x5e35();let _0x43f0b7=_0x5e3560[_0x22e547];return _0x43f0b7;}import{HTTPService as _0x269dd4}from'@univerjs/network';const W=_0x231458(0x92);function _0x5e35(){const _0x2b0d9e=['Edit','add','14373WVenHI','getCurrentUser','length','symbol','post','_injector','5ERuIrS','_httpService','_initUserSync','/add','filter','subscribe','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','reply','forEach','1316322XwoJmL','delete','error','_initDataSource','commentUpdate$','Delete','comment','unitId','985pQWjHV','118935ZvVfhV','userId','/universer-api/user/list','197640heeEAB','_sessionService','1208zSADBw','threadId','values','Solve','users','find','_init','UNRECOGNIZED','thread-comment-data-source.config','getUnit','parentId','/universer-api/comment/unit/','createTimestamp','Add','disposeWithMe','body','UNIVER_UNKNOWN','addUser','_commentService','rangeId','pluginName','format','OpenOrReOpen','/edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','setConfig','replyId','customRanges','_threadCommentDataSource','422068wOmwwL','onStarting','getMemberID','_config','code','content','Solved','_threadCommentDataSourceService','rangeType','deleteComment','Unknown','_configService','root','parse','_userService','user','getComment','getUser','ref','Reply','dataSource','map','updateComment','_threadCommentModel','onReady','resolveComment','7307470gUJAHC','addComment','listComments','/solved','defineProperty','COMMENT','resolved','stringify','type','replies','requireSession','comments','getOwnPropertyDescriptor','payload','82xyhusV','solved','userID','get'];_0x5e35=function(){return _0x2b0d9e;};return _0x5e35();}var I=(_0x4ef7e3=>(_0x4ef7e3[_0x4ef7e3[_0x231458(0x90)]=0x0]=_0x231458(0x90),_0x4ef7e3[_0x4ef7e3[_0x231458(0x9e)]=0x1]=_0x231458(0x9e),_0x4ef7e3[_0x4ef7e3[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4ef7e3))(I||{}),v=(_0x4692a5=>(_0x4692a5[_0x4692a5['Unknown']=0x0]=_0x231458(0xa2),_0x4692a5[_0x4692a5[_0x231458(0x87)]=0x1]=_0x231458(0x87),_0x4692a5[_0x4692a5[_0x231458(0xab)]=0x2]=_0x231458(0xab),_0x4692a5[_0x4692a5[_0x231458(0xc4)]=0x3]=_0x231458(0xc4),_0x4692a5[_0x4692a5[_0x231458(0x71)]=0x4]=_0x231458(0x71),_0x4692a5[_0x4692a5['Solve']=0x5]=_0x231458(0x7d),_0x4692a5[_0x4692a5[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4692a5))(v||{});const y=_0x79c51e=>_0x1a50d1(new Date(+_0x79c51e))[_0x231458(0x8f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bb590,_0x1f806d)=>{const _0x4e232b=_0x231458,_0x4e6f18=_0x3bb590[_0x4e232b(0xc3)](_0x1caf0d),_0x1fcd03=_0x3bb590[_0x4e232b(0xc3)](_0x269dd4);_0x1f806d[_0x4e232b(0x6b)](_0x5550ed=>{const _0x345121=_0x4e232b;_0x4e6f18[_0x345121(0xa9)](_0x5550ed)&&_0x1f806d[_0x345121(0x6d)](_0x5550ed);}),_0x1f806d[_0x4e232b(0x93)]&&(await _0x1fcd03[_0x4e232b(0xc3)](_0x4e232b(0x77),{'params':{'userIDs':[..._0x1f806d]}}))[_0x4e232b(0x89)]['users'][_0x4e232b(0x6b)](_0x5e00e6=>{_0x5e00e6&&_0x4e6f18['addUser'](_0x5e00e6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6b7e,_0x2021d1,_0x5daf91,_0x5c80f0)=>{const _0x54f4c0=_0x231458;for(var _0x106b8f=_0x5c80f0>0x1?void 0x0:_0x5c80f0?K(_0x2021d1,_0x5daf91):_0x2021d1,_0x304f60=_0x3c6b7e[_0x54f4c0(0xc8)]-0x1,_0x3d6e36;_0x304f60>=0x0;_0x304f60--)(_0x3d6e36=_0x3c6b7e[_0x304f60])&&(_0x106b8f=_0x3d6e36(_0x106b8f)||_0x106b8f);return _0x106b8f;},p=(_0xf9b229,_0x1eb5c0)=>(_0x3e81f1,_0x5f242c)=>_0x1eb5c0(_0x3e81f1,_0x5f242c,_0xf9b229);let _=class extends _0x519c68{constructor(_0x3616ae,_0x539f17,_0x2f208f,_0x468c09){const _0x49e627=_0x231458;super(),this['_commentService']=_0x3616ae,this[_0x49e627(0xaf)]=_0x539f17,this['_userService']=_0x2f208f,this[_0x49e627(0xcb)]=_0x468c09,this[_0x49e627(0x80)](),this['_initUserSync']();}[_0x231458(0x64)](){const _0x47fb5d=_0x231458;this[_0x47fb5d(0x88)](this[_0x47fb5d(0xaf)]['commentUpdate$']['pipe'](_0x11cf83(0x10))[_0x47fb5d(0x67)](_0x41f0a4=>{const _0x142e96=_0x47fb5d,_0x512799=new Set();_0x41f0a4[_0x142e96(0x6b)](_0x808872=>{const _0x17bc13=_0x142e96;if(_0x808872[_0x17bc13(0xba)]===_0x17bc13(0xc5)){const _0x299246=_0x808872[_0x17bc13(0xbf)]['personId'];_0x512799['add'](_0x299246);}}),B(this[_0x142e96(0xcb)],_0x512799);}));}['_init'](){const _0x1f6025=_0x231458;this[_0x1f6025(0x88)](this[_0x1f6025(0x8c)][_0x1f6025(0x70)][_0x1f6025(0x67)](async _0x10ff55=>{const _0x4a5eb3=_0x1f6025;var _0x3647c2,_0x3a598a,_0x5b8a40,_0x5511ab;const _0x43d6c9=(_0x3647c2=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0x83)](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x53ff03=>_0x53ff03[_0x4a5eb3(0x7b)]===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x3647c2['root'];if(!_0x43d6c9)return;const {unitId:_0x399263,subUnitId:_0x40a574}=_0x43d6c9;switch(_0x10ff55[_0x4a5eb3(0xa7)]&&this[_0x4a5eb3(0xa6)][_0x4a5eb3(0x8b)](_0x10ff55[_0x4a5eb3(0xa7)]),_0x10ff55[_0x4a5eb3(0xba)]){case v[_0x4a5eb3(0x87)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x399263,_0x40a574,{'unitId':_0x399263,'subUnitId':_0x40a574,'ref':'','id':_0x10ff55['replyId'],'dT':y(+_0x10ff55[_0x4a5eb3(0x86)]),'threadId':_0x10ff55[_0x4a5eb3(0x7b)],'personId':(_0x5b8a40=(_0x3a598a=_0x10ff55[_0x4a5eb3(0xa7)])==null?void 0x0:_0x3a598a[_0x4a5eb3(0xc2)])!=null?_0x5b8a40:_0x10ff55[_0x4a5eb3(0x76)],'text':JSON['parse'](_0x10ff55[_0x4a5eb3(0x9d)]),'parentId':_0x43d6c9['id']});break;}case v['Delete']:{const _0x13e83f=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa8)](_0x399263,_0x40a574,_0x10ff55['replyId']);_0x13e83f&&_0x13e83f[_0x4a5eb3(0x84)]&&this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa1)](_0x399263,_0x40a574,_0x10ff55[_0x4a5eb3(0x95)]);break;}case v['Edit']:{this[_0x4a5eb3(0xaf)]['updateComment'](_0x399263,_0x40a574,{'commentId':_0x10ff55[_0x4a5eb3(0x95)],'text':JSON[_0x4a5eb3(0xa5)](_0x10ff55[_0x4a5eb3(0x9d)])});break;}case v[_0x4a5eb3(0x7d)]:{const _0x30c189=(_0x5511ab=this[_0x4a5eb3(0xaf)]['getUnit'](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x2cd669=>_0x2cd669['threadId']===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x5511ab[_0x4a5eb3(0xa4)];_0x30c189&&this['_threadCommentModel']['resolveComment'](_0x399263,_0x40a574,_0x30c189['id'],_0x10ff55['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3fb278(_0x20b5b6)),p(0x1,_0x3fb278(_0x1b6328)),p(0x2,_0x3fb278(_0x1caf0d)),p(0x3,_0x3fb278(_0x1416f8))],_);const z=_0x231458(0x82),O={};var k=Object[_0x231458(0xbe)],Q=(_0x584a99,_0x43e7eb,_0x2cebbb,_0x208e32)=>{const _0x456ba3=_0x231458;for(var _0x395a4a=_0x208e32>0x1?void 0x0:_0x208e32?k(_0x43e7eb,_0x2cebbb):_0x43e7eb,_0x4b94e3=_0x584a99[_0x456ba3(0xc8)]-0x1,_0x4ee66d;_0x4b94e3>=0x0;_0x4b94e3--)(_0x4ee66d=_0x584a99[_0x4b94e3])&&(_0x395a4a=_0x4ee66d(_0x395a4a)||_0x395a4a);return _0x395a4a;},b=(_0x42de08,_0x20225f)=>(_0x493f97,_0x2266f7)=>_0x20225f(_0x493f97,_0x2266f7,_0x42de08);function X(_0x27ade2,_0x4e6a02){const _0x373dfa=_0x231458,_0x1d0fc2=_0x27ade2[_0x373dfa(0xbb)][0x0];return{..._0x4e6a02,'id':_0x1d0fc2[_0x373dfa(0x95)],'resolved':_0x27ade2[_0x373dfa(0xc1)]===0x1,'dT':y(_0x1d0fc2[_0x373dfa(0x86)]),'personId':_0x1d0fc2[_0x373dfa(0x76)],'threadId':_0x1d0fc2['threadId']};}function ee(_0xc4f5c,_0x17465c,_0x5c5932){const _0x50bc7d=_0x231458;var _0x4317af,_0x316c56;if(((_0x316c56=(_0x4317af=_0xc4f5c==null?void 0x0:_0xc4f5c[_0x50bc7d(0xbb)])==null?void 0x0:_0x4317af[_0x50bc7d(0xc8)])!=null?_0x316c56:0x0)>0x0){const _0x1b85b0=(_0x503676,_0x102c51)=>({'id':_0x503676['replyId'],'threadId':_0x503676['threadId'],'dT':y(_0x503676[_0x50bc7d(0x86)]),'personId':_0x503676['userId'],'resolved':_0xc4f5c[_0x50bc7d(0xc1)]===I[_0x50bc7d(0x9e)],'unitId':_0x17465c,'subUnitId':_0x5c5932,'text':JSON[_0x50bc7d(0xa5)](_0x503676['content']),'parentId':_0x102c51}),_0x8f41eb=_0x1b85b0(_0xc4f5c[_0x50bc7d(0xbb)][0x0]);return{..._0x8f41eb,'children':_0xc4f5c[_0x50bc7d(0xbb)]['slice'](0x1)[_0x50bc7d(0xad)](_0x4605f7=>_0x1b85b0(_0x4605f7,_0x8f41eb['id']))};}return null;}let S=class{constructor(_0x47bedd,_0xa9358a,_0xf0de91){const _0x56c29e=_0x231458;this[_0x56c29e(0xcd)]=_0x47bedd,this[_0x56c29e(0xa6)]=_0xa9358a,this[_0x56c29e(0x79)]=_0xf0de91;}async[_0x231458(0xb3)](_0x2d48be){const _0x85b75d=_0x231458;var _0x4ce832,_0x61ac4;const {parentId:_0x336bac,unitId:_0x48fd40,text:_0x31ab99,threadId:_0x57ff7c}=_0x2d48be,_0x225db2=(_0x61ac4=(_0x4ce832=_0x31ab99[_0x85b75d(0x96)])==null?void 0x0:_0x4ce832[_0x85b75d(0x66)](_0x53528d=>_0x53528d[_0x85b75d(0xa0)]===_0x34627d[_0x85b75d(0xb7)])[_0x85b75d(0xad)](_0x2b515f=>_0x2b515f[_0x85b75d(0x8d)]))!=null?_0x61ac4:[],_0x3e1990=JSON[_0x85b75d(0xb9)](_0x31ab99),_0x4786f4=(await this['_sessionService'][_0x85b75d(0xbc)](_0x48fd40))[_0x85b75d(0x9a)]();if(_0x336bac){const _0xa7c55e={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2,'threadId':_0x57ff7c},_0x45ffcc=(await this[_0x85b75d(0xcd)][_0x85b75d(0xca)](_0x85b75d(0x85)+_0x48fd40+'/reply',{'body':_0xa7c55e}))[_0x85b75d(0x89)][_0x85b75d(0x6a)];return{..._0x2d48be,'id':_0x45ffcc[_0x85b75d(0x95)],'dT':_0x1a50d1(+_0x45ffcc[_0x85b75d(0x86)])['format'](_0x85b75d(0x68)),'personId':_0x45ffcc[_0x85b75d(0x76)]};}else{const _0x414308={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2},_0x33b3fc=await this[_0x85b75d(0xcd)][_0x85b75d(0xca)]('/universer-api/comment/unit/'+_0x48fd40+_0x85b75d(0x65),{'body':_0x414308});return X(_0x33b3fc[_0x85b75d(0x89)][_0x85b75d(0x72)],_0x2d48be);}}async[_0x231458(0xae)](_0x541770){const _0x3cf72a=_0x231458;var _0x28a5ee,_0x109011;const {text:_0x37bc5c,unitId:_0x2ff56e}=_0x541770,_0x4f476a=(_0x109011=(_0x28a5ee=_0x37bc5c[_0x3cf72a(0x96)])==null?void 0x0:_0x28a5ee[_0x3cf72a(0x66)](_0xc4082=>_0xc4082[_0x3cf72a(0xa0)]===_0x34627d[_0x3cf72a(0xb7)])['map'](_0x587523=>_0x587523['rangeId']))!=null?_0x109011:[],_0x1e6715=JSON[_0x3cf72a(0xb9)](_0x37bc5c),_0x2a50ed=_0x541770[_0x3cf72a(0x7b)],_0x227939=_0x541770['id'],_0x19ca49={'memberId':(await this[_0x3cf72a(0x79)][_0x3cf72a(0xbc)](_0x2ff56e))[_0x3cf72a(0x9a)](),'unitId':_0x2ff56e,'threadId':_0x2a50ed,'mention':_0x4f476a,'content':_0x1e6715,'replyId':_0x227939},_0x25c328=await this['_httpService'][_0x3cf72a(0xca)](_0x3cf72a(0x85)+_0x2ff56e+_0x3cf72a(0x91),{'body':_0x19ca49});return!_0x25c328['body'][_0x3cf72a(0x6e)]||_0x25c328[_0x3cf72a(0x89)]['error'][_0x3cf72a(0x9c)]===0x1;}async[_0x231458(0xb1)](_0x5e4769){const _0x30d8cb=_0x231458,{unitId:_0x13a05b}=_0x5e4769,_0xe85882=_0x5e4769[_0x30d8cb(0x7b)],_0x1d1a69={'memberId':this[_0x30d8cb(0xa6)][_0x30d8cb(0xc7)]()[_0x30d8cb(0xc2)],'unitId':_0x13a05b,'threadId':_0xe85882,'solved':_0x5e4769[_0x30d8cb(0xb8)]?I['Solved']:I[_0x30d8cb(0x90)]},_0x5409bb=await this[_0x30d8cb(0xcd)][_0x30d8cb(0xca)](_0x30d8cb(0x85)+_0x13a05b+_0x30d8cb(0xb5),{'body':_0x1d1a69});return!_0x5409bb['body'][_0x30d8cb(0x6e)]||_0x5409bb[_0x30d8cb(0x89)][_0x30d8cb(0x6e)][_0x30d8cb(0x9c)]===0x1;}async[_0x231458(0xa1)](_0x4953d3,_0x3f84a6,_0x31bd95,_0x115941){const _0x309135=_0x231458,_0x117c2={'memberId':(await this[_0x309135(0x79)][_0x309135(0xbc)](_0x4953d3))['getMemberID'](),'threadId':_0x31bd95,'replyId':_0x115941,'unitId':_0x4953d3},_0x422c3d=await this[_0x309135(0xcd)]['post'](_0x309135(0x85)+_0x4953d3+'/delete',{'body':_0x117c2});return!_0x422c3d[_0x309135(0x89)][_0x309135(0x6e)]||_0x422c3d['body'][_0x309135(0x6e)]['code']===0x1;}async[_0x231458(0xb4)](_0x4d4a98,_0xade5a0,_0x39c87f){const _0x4ac75=_0x231458,_0xd43ed0={'unitId':_0x4d4a98,'threadId':_0x39c87f},_0x5240bf=await this['_httpService']['post'](_0x4ac75(0x85)+_0x4d4a98+'/list',{'body':_0xd43ed0}),_0x35b5cf=_0x39c87f[_0x4ac75(0xad)](_0x373e1c=>ee(_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0xbd)][_0x373e1c],_0x4d4a98,_0xade5a0))[_0x4ac75(0x66)](Boolean);return Object[_0x4ac75(0x7c)](_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0x7e)])['forEach'](_0x4d7cda=>{const _0x5acd67=_0x4ac75;this[_0x5acd67(0xa6)][_0x5acd67(0x8b)](_0x4d7cda);}),_0x35b5cf;}['saveCommentToSnapshot'](_0x5a886f){const _0x37b405=_0x231458;return{'id':_0x5a886f['id'],'threadId':_0x5a886f[_0x37b405(0x7b)],'ref':_0x5a886f[_0x37b405(0xaa)]};}};S=Q([b(0x0,_0x3fb278(_0x269dd4)),b(0x1,_0x3fb278(_0x1caf0d)),b(0x2,_0x3fb278(_0x41a581))],S);var re=Object[_0x231458(0xbe)],te=(_0x57dcf0,_0x32b319,_0x576092,_0x518402)=>{const _0x50b58d=_0x231458;for(var _0x383283=_0x518402>0x1?void 0x0:_0x518402?re(_0x32b319,_0x576092):_0x32b319,_0x1d9cd9=_0x57dcf0[_0x50b58d(0xc8)]-0x1,_0x2849bc;_0x1d9cd9>=0x0;_0x1d9cd9--)(_0x2849bc=_0x57dcf0[_0x1d9cd9])&&(_0x383283=_0x2849bc(_0x383283)||_0x383283);return _0x383283;},M=(_0x4f6e49,_0x506561)=>(_0x3bc141,_0x25b58f)=>_0x506561(_0x3bc141,_0x25b58f,_0x4f6e49);let f=class extends _0x519c68{constructor(_0x3a175e,_0x25e067){const _0x20b3fd=_0x231458;super(),this[_0x20b3fd(0x9f)]=_0x3a175e,this[_0x20b3fd(0x97)]=_0x25e067,this[_0x20b3fd(0x6f)]();}[_0x231458(0x6f)](){const _0x47f909=_0x231458;this[_0x47f909(0x9f)][_0x47f909(0xac)]=this[_0x47f909(0x97)],this[_0x47f909(0x9f)][_0x47f909(0x69)]=!0x1;}};f=te([M(0x0,_0x563d0d),M(0x1,_0x3fb278(S))],f);var se=Object[_0x231458(0xb6)],oe=Object[_0x231458(0xbe)],ne=(_0x7d0e6a,_0x31e64d,_0x55a49f)=>_0x31e64d in _0x7d0e6a?se(_0x7d0e6a,_0x31e64d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55a49f}):_0x7d0e6a[_0x31e64d]=_0x55a49f,ie=(_0x49da57,_0x121fac,_0x92989f,_0xa89334)=>{const _0x31be25=_0x231458;for(var _0x20f65b=_0xa89334>0x1?void 0x0:_0xa89334?oe(_0x121fac,_0x92989f):_0x121fac,_0x2c6408=_0x49da57[_0x31be25(0xc8)]-0x1,_0x53ec7d;_0x2c6408>=0x0;_0x2c6408--)(_0x53ec7d=_0x49da57[_0x2c6408])&&(_0x20f65b=_0x53ec7d(_0x20f65b)||_0x20f65b);return _0x20f65b;},N=(_0x27ebf2,_0x216e31)=>(_0x51c29b,_0x1cebb8)=>_0x216e31(_0x51c29b,_0x1cebb8,_0x27ebf2),$=(_0x4a1bfa,_0x3551cf,_0x44ab4f)=>ne(_0x4a1bfa,typeof _0x3551cf!=_0x231458(0xc9)?_0x3551cf+'':_0x3551cf,_0x44ab4f);let g=class extends _0x3e97cc{constructor(_0x1ba5e1=O,_0x29581f,_0x25a5ec){const _0xec65f7=_0x231458;super(),this[_0xec65f7(0x9b)]=_0x1ba5e1,this[_0xec65f7(0xcb)]=_0x29581f,this['_configService']=_0x25a5ec;const {..._0x56334c}=_0x58bb88({},O,this[_0xec65f7(0x9b)]);this[_0xec65f7(0xa3)][_0xec65f7(0x94)](z,_0x56334c);}[_0x231458(0x99)](){const _0x3a9dd8=_0x231458;[[S],[f],[_]][_0x3a9dd8(0x6b)](_0x569e31=>{const _0x284db3=_0x3a9dd8;this['_injector'][_0x284db3(0xc5)](_0x569e31);});}[_0x231458(0xb0)](){const _0x588446=_0x231458;this[_0x588446(0xcb)][_0x588446(0xc3)](f),this[_0x588446(0xcb)][_0x588446(0xc3)](_);}};$(g,_0x231458(0x8e),W),$(g,'type',_0x13e5ee[_0x231458(0x8a)]),g=ie([_0x326330(_0x47e1d5,_0x40c7ce,_0x3794a6),N(0x1,_0x3fb278(_0x1416f8)),N(0x2,_0x25bde9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5502ef=_0x6c3d;(function(_0x19a02a,_0x3148c0){const _0x3b5673=_0x6c3d,_0x32203f=_0x19a02a();while(!![]){try{const _0xeea4f4=parseInt(_0x3b5673(0xf4))/0x1*(-parseInt(_0x3b5673(0x109))/0x2)+-parseInt(_0x3b5673(0x108))/0x3*(parseInt(_0x3b5673(0x130))/0x4)+parseInt(_0x3b5673(0xff))/0x5+parseInt(_0x3b5673(0xeb))/0x6*(-parseInt(_0x3b5673(0xf5))/0x7)+-parseInt(_0x3b5673(0x11e))/0x8+parseInt(_0x3b5673(0xd7))/0x9+parseInt(_0x3b5673(0xf7))/0xa*(parseInt(_0x3b5673(0xef))/0xb);if(_0xeea4f4===_0x3148c0)break;else _0x32203f['push'](_0x32203f['shift']());}catch(_0x3a312f){_0x32203f['push'](_0x32203f['shift']());}}}(_0x4c9d,0x1fca8));import{CommentService as _0x384589,CollaborationSessionService as _0x4648a7,UniverCollaborationClientPlugin as _0xbacb1d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4273b7}from'@univerjs-pro/license';import{dayjs as _0x46326d,UserManagerService as _0x27db51,Inject as _0x4bcd01,Injector as _0x3fde1a,Disposable as _0x57944e,CustomRangeType as _0x486a80,UniverInstanceType as _0x486682,DependentOn as _0x56a696,IConfigService as _0x2e8d6c,Plugin as _0x2cdc95,merge as _0x1425e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11d26e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x82c273,IThreadCommentDataSourceService as _0x49bb57}from'@univerjs/thread-comment';function _0x6c3d(_0x37e9de,_0x2cddf4){_0x37e9de=_0x37e9de-0xd3;const _0x4c9d6f=_0x4c9d();let _0x6c3d0f=_0x4c9d6f[_0x37e9de];return _0x6c3d0f;}import{bufferTime as _0x30b318}from'rxjs';function _0x4c9d(){const _0x15b6e7=['dataSource','resolved','_httpService','thread-comment-data-source.config','Solve','_config','rangeId','threadId','comment','_sessionService','_threadCommentDataSourceService','OpenOrReOpen','personId','replies','users','6vBTVin','commentUpdate$','code','_initUserSync','6798ibJrAG','userID','createTimestamp','map','solved','75930itfKTx','1306613ydaNvL','customRanges','4730VfOyJz','pipe','content','filter','Delete','pluginName','Edit','addUser','716215fHxlLQ','forEach','root','values','body','updateComment','Add','find','/add','12CGkRVB','2MKkafv','disposeWithMe','_threadCommentDataSource','_threadCommentModel','rangeType','unitId','size','replyId','reply','parentId','/list','slice','YYYY/MM/DD\x20HH:mm','Reply','getCurrentUser','/universer-api/comment/unit/','_injector','/solved','Unknown','Solved','format','1813040rVTUOU','addComment','defineProperty','getComment','deleteComment','_initDataSource','userId','getMemberID','UNRECOGNIZED','user','requireSession','resolveComment','COMMENT','post','add','get','_init','getOwnPropertyDescriptor','17552hYYdbV','/universer-api/user/list','onReady','subscribe','_configService','_userService','/edit','error','saveCommentToSnapshot','1812870MuZphA','syncUpdateMutationToColla','parse','type','length'];_0x4c9d=function(){return _0x15b6e7;};return _0x4c9d();}import{HTTPService as _0x4487a0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6a11=>(_0x5b6a11[_0x5b6a11[_0x5502ef(0xe7)]=0x0]=_0x5502ef(0xe7),_0x5b6a11[_0x5b6a11[_0x5502ef(0x11c)]=0x1]=_0x5502ef(0x11c),_0x5b6a11[_0x5b6a11[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x5b6a11))(I||{}),v=(_0x18381d=>(_0x18381d[_0x18381d['Unknown']=0x0]=_0x5502ef(0x11b),_0x18381d[_0x18381d[_0x5502ef(0x105)]=0x1]=_0x5502ef(0x105),_0x18381d[_0x18381d['Reply']=0x2]=_0x5502ef(0x116),_0x18381d[_0x18381d[_0x5502ef(0xfd)]=0x3]=_0x5502ef(0xfd),_0x18381d[_0x18381d[_0x5502ef(0xfb)]=0x4]=_0x5502ef(0xfb),_0x18381d[_0x18381d[_0x5502ef(0xe0)]=0x5]=_0x5502ef(0xe0),_0x18381d[_0x18381d[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x18381d))(v||{});const y=_0x2c1584=>_0x46326d(new Date(+_0x2c1584))[_0x5502ef(0x11d)](_0x5502ef(0x115)),B=async(_0x657c59,_0x1db819)=>{const _0x4cfbaa=_0x5502ef,_0x27bcdb=_0x657c59[_0x4cfbaa(0x12d)](_0x27db51),_0x1680cc=_0x657c59[_0x4cfbaa(0x12d)](_0x4487a0);_0x1db819[_0x4cfbaa(0x100)](_0x156408=>{_0x27bcdb['getUser'](_0x156408)&&_0x1db819['delete'](_0x156408);}),_0x1db819[_0x4cfbaa(0x10f)]&&(await _0x1680cc[_0x4cfbaa(0x12d)](_0x4cfbaa(0x131),{'params':{'userIDs':[..._0x1db819]}}))[_0x4cfbaa(0x103)][_0x4cfbaa(0xea)][_0x4cfbaa(0x100)](_0x1edb5f=>{const _0x2b0e2e=_0x4cfbaa;_0x1edb5f&&_0x27bcdb[_0x2b0e2e(0xfe)](_0x1edb5f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d0357,_0x1f97d5,_0x38f3c8,_0xcd4924)=>{const _0x9ede38=_0x5502ef;for(var _0x580322=_0xcd4924>0x1?void 0x0:_0xcd4924?K(_0x1f97d5,_0x38f3c8):_0x1f97d5,_0x5ce02e=_0x3d0357[_0x9ede38(0xdb)]-0x1,_0x20cd4b;_0x5ce02e>=0x0;_0x5ce02e--)(_0x20cd4b=_0x3d0357[_0x5ce02e])&&(_0x580322=_0x20cd4b(_0x580322)||_0x580322);return _0x580322;},p=(_0x3be05e,_0x1c1942)=>(_0x55356e,_0x3166af)=>_0x1c1942(_0x55356e,_0x3166af,_0x3be05e);let _=class extends _0x57944e{constructor(_0x26567a,_0x253629,_0x1923ca,_0x347c33){const _0x2d40d5=_0x5502ef;super(),this['_commentService']=_0x26567a,this[_0x2d40d5(0x10c)]=_0x253629,this['_userService']=_0x1923ca,this[_0x2d40d5(0x119)]=_0x347c33,this[_0x2d40d5(0x12e)](),this[_0x2d40d5(0xee)]();}[_0x5502ef(0xee)](){const _0x4c71d0=_0x5502ef;this[_0x4c71d0(0x10a)](this[_0x4c71d0(0x10c)][_0x4c71d0(0xec)][_0x4c71d0(0xf8)](_0x30b318(0x10))[_0x4c71d0(0x133)](_0x1ba8b2=>{const _0x533292=new Set();_0x1ba8b2['forEach'](_0xf9b475=>{const _0xb3b3cf=_0x6c3d;if(_0xf9b475[_0xb3b3cf(0xda)]===_0xb3b3cf(0x12c)){const _0x5ac8dd=_0xf9b475['payload'][_0xb3b3cf(0xe8)];_0x533292[_0xb3b3cf(0x12c)](_0x5ac8dd);}}),B(this['_injector'],_0x533292);}));}[_0x5502ef(0x12e)](){const _0x113680=_0x5502ef;this[_0x113680(0x10a)](this['_commentService'][_0x113680(0xec)][_0x113680(0x133)](async _0x54feed=>{const _0x15d514=_0x113680;var _0x501ab7,_0x3af9f0,_0xac0b7b,_0x43d864;const _0x1cc4a0=(_0x501ab7=this[_0x15d514(0x10c)]['getUnit'](_0x54feed['unitId'])[_0x15d514(0x106)](_0xc4bc9e=>_0xc4bc9e[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x501ab7[_0x15d514(0x101)];if(!_0x1cc4a0)return;const {unitId:_0x296b6e,subUnitId:_0x4879cf}=_0x1cc4a0;switch(_0x54feed[_0x15d514(0x127)]&&this['_userService'][_0x15d514(0xfe)](_0x54feed[_0x15d514(0x127)]),_0x54feed['type']){case v[_0x15d514(0x105)]:break;case v[_0x15d514(0x116)]:{this[_0x15d514(0x10c)][_0x15d514(0x11f)](_0x296b6e,_0x4879cf,{'unitId':_0x296b6e,'subUnitId':_0x4879cf,'ref':'','id':_0x54feed[_0x15d514(0x110)],'dT':y(+_0x54feed[_0x15d514(0xf1)]),'threadId':_0x54feed[_0x15d514(0xe3)],'personId':(_0xac0b7b=(_0x3af9f0=_0x54feed[_0x15d514(0x127)])==null?void 0x0:_0x3af9f0[_0x15d514(0xf0)])!=null?_0xac0b7b:_0x54feed[_0x15d514(0x124)],'text':JSON[_0x15d514(0xd9)](_0x54feed['content']),'parentId':_0x1cc4a0['id']});break;}case v[_0x15d514(0xfb)]:{const _0x5c5bff=this[_0x15d514(0x10c)][_0x15d514(0x121)](_0x296b6e,_0x4879cf,_0x54feed['replyId']);_0x5c5bff&&_0x5c5bff[_0x15d514(0x112)]&&this[_0x15d514(0x10c)][_0x15d514(0x122)](_0x296b6e,_0x4879cf,_0x54feed[_0x15d514(0x110)]);break;}case v[_0x15d514(0xfd)]:{this['_threadCommentModel'][_0x15d514(0x104)](_0x296b6e,_0x4879cf,{'commentId':_0x54feed['replyId'],'text':JSON[_0x15d514(0xd9)](_0x54feed['content'])});break;}case v[_0x15d514(0xe0)]:{const _0x417757=(_0x43d864=this['_threadCommentModel']['getUnit'](_0x54feed[_0x15d514(0x10e)])[_0x15d514(0x106)](_0x45d009=>_0x45d009[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x43d864[_0x15d514(0x101)];_0x417757&&this[_0x15d514(0x10c)][_0x15d514(0x129)](_0x296b6e,_0x4879cf,_0x417757['id'],_0x54feed[_0x15d514(0xf3)]===I[_0x15d514(0x11c)]);break;}}}));}};_=V([p(0x0,_0x4bcd01(_0x384589)),p(0x1,_0x4bcd01(_0x82c273)),p(0x2,_0x4bcd01(_0x27db51)),p(0x3,_0x4bcd01(_0x3fde1a))],_);const z=_0x5502ef(0xdf),O={};var k=Object[_0x5502ef(0x12f)],Q=(_0x1115d8,_0x2b2626,_0x81fe15,_0x21201c)=>{const _0x5c29ad=_0x5502ef;for(var _0x43afe1=_0x21201c>0x1?void 0x0:_0x21201c?k(_0x2b2626,_0x81fe15):_0x2b2626,_0x396ed7=_0x1115d8[_0x5c29ad(0xdb)]-0x1,_0x2d5ddb;_0x396ed7>=0x0;_0x396ed7--)(_0x2d5ddb=_0x1115d8[_0x396ed7])&&(_0x43afe1=_0x2d5ddb(_0x43afe1)||_0x43afe1);return _0x43afe1;},b=(_0x53fa4b,_0xd2d989)=>(_0x1948ef,_0x1ab021)=>_0xd2d989(_0x1948ef,_0x1ab021,_0x53fa4b);function X(_0x27783f,_0x55f584){const _0x5d6b52=_0x5502ef,_0x126ec8=_0x27783f[_0x5d6b52(0xe9)][0x0];return{..._0x55f584,'id':_0x126ec8[_0x5d6b52(0x110)],'resolved':_0x27783f['solved']===0x1,'dT':y(_0x126ec8[_0x5d6b52(0xf1)]),'personId':_0x126ec8[_0x5d6b52(0x124)],'threadId':_0x126ec8[_0x5d6b52(0xe3)]};}function ee(_0x3cd999,_0x416f6d,_0x143aba){const _0x9db4b=_0x5502ef;var _0x31695b,_0x219fa7;if(((_0x219fa7=(_0x31695b=_0x3cd999==null?void 0x0:_0x3cd999[_0x9db4b(0xe9)])==null?void 0x0:_0x31695b[_0x9db4b(0xdb)])!=null?_0x219fa7:0x0)>0x0){const _0x40d3b5=(_0x34abc9,_0x4b6350)=>({'id':_0x34abc9[_0x9db4b(0x110)],'threadId':_0x34abc9['threadId'],'dT':y(_0x34abc9[_0x9db4b(0xf1)]),'personId':_0x34abc9['userId'],'resolved':_0x3cd999[_0x9db4b(0xf3)]===I[_0x9db4b(0x11c)],'unitId':_0x416f6d,'subUnitId':_0x143aba,'text':JSON['parse'](_0x34abc9[_0x9db4b(0xf9)]),'parentId':_0x4b6350}),_0x314cc4=_0x40d3b5(_0x3cd999[_0x9db4b(0xe9)][0x0]);return{..._0x314cc4,'children':_0x3cd999['replies'][_0x9db4b(0x114)](0x1)[_0x9db4b(0xf2)](_0xd26377=>_0x40d3b5(_0xd26377,_0x314cc4['id']))};}return null;}let S=class{constructor(_0x25b219,_0x279756,_0x4a54b6){const _0x4e93a9=_0x5502ef;this[_0x4e93a9(0xde)]=_0x25b219,this[_0x4e93a9(0xd3)]=_0x279756,this[_0x4e93a9(0xe5)]=_0x4a54b6;}async[_0x5502ef(0x11f)](_0x2198b3){const _0x2d5ec8=_0x5502ef;var _0xd23009,_0x15427d;const {parentId:_0x25a4e2,unitId:_0x3acb94,text:_0x41ec0b,threadId:_0x276f2a}=_0x2198b3,_0x596727=(_0x15427d=(_0xd23009=_0x41ec0b[_0x2d5ec8(0xf6)])==null?void 0x0:_0xd23009[_0x2d5ec8(0xfa)](_0x4148b3=>_0x4148b3[_0x2d5ec8(0x10d)]===_0x486a80[_0x2d5ec8(0x12a)])[_0x2d5ec8(0xf2)](_0x496d93=>_0x496d93['rangeId']))!=null?_0x15427d:[],_0x667b60=JSON['stringify'](_0x41ec0b),_0x4d26d3=(await this[_0x2d5ec8(0xe5)]['requireSession'](_0x3acb94))['getMemberID']();if(_0x25a4e2){const _0x25f7e4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727,'threadId':_0x276f2a},_0x41eeac=(await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+'/reply',{'body':_0x25f7e4}))[_0x2d5ec8(0x103)][_0x2d5ec8(0x111)];return{..._0x2198b3,'id':_0x41eeac[_0x2d5ec8(0x110)],'dT':_0x46326d(+_0x41eeac[_0x2d5ec8(0xf1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x41eeac[_0x2d5ec8(0x124)]};}else{const _0x5a2af4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727},_0x46c442=await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+_0x2d5ec8(0x107),{'body':_0x5a2af4});return X(_0x46c442[_0x2d5ec8(0x103)][_0x2d5ec8(0xe4)],_0x2198b3);}}async['updateComment'](_0x2d15d4){const _0x1cb45b=_0x5502ef;var _0x21da22,_0x38e3a1;const {text:_0x18b35a,unitId:_0x3a3216}=_0x2d15d4,_0x2dd3d7=(_0x38e3a1=(_0x21da22=_0x18b35a['customRanges'])==null?void 0x0:_0x21da22[_0x1cb45b(0xfa)](_0x49c750=>_0x49c750[_0x1cb45b(0x10d)]===_0x486a80[_0x1cb45b(0x12a)])[_0x1cb45b(0xf2)](_0x5a9771=>_0x5a9771[_0x1cb45b(0xe2)]))!=null?_0x38e3a1:[],_0x77ccb4=JSON['stringify'](_0x18b35a),_0x1e8672=_0x2d15d4[_0x1cb45b(0xe3)],_0x43e31c=_0x2d15d4['id'],_0x33c30d={'memberId':(await this[_0x1cb45b(0xe5)][_0x1cb45b(0x128)](_0x3a3216))['getMemberID'](),'unitId':_0x3a3216,'threadId':_0x1e8672,'mention':_0x2dd3d7,'content':_0x77ccb4,'replyId':_0x43e31c},_0x3954f5=await this[_0x1cb45b(0xde)][_0x1cb45b(0x12b)](_0x1cb45b(0x118)+_0x3a3216+_0x1cb45b(0xd4),{'body':_0x33c30d});return!_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)]||_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)][_0x1cb45b(0xed)]===0x1;}async[_0x5502ef(0x129)](_0x42cf16){const _0x134633=_0x5502ef,{unitId:_0x1011b6}=_0x42cf16,_0x741f78=_0x42cf16['threadId'],_0xf28209={'memberId':this[_0x134633(0xd3)][_0x134633(0x117)]()[_0x134633(0xf0)],'unitId':_0x1011b6,'threadId':_0x741f78,'solved':_0x42cf16[_0x134633(0xdd)]?I[_0x134633(0x11c)]:I['OpenOrReOpen']},_0x2cb7f5=await this[_0x134633(0xde)][_0x134633(0x12b)]('/universer-api/comment/unit/'+_0x1011b6+_0x134633(0x11a),{'body':_0xf28209});return!_0x2cb7f5['body'][_0x134633(0xd5)]||_0x2cb7f5[_0x134633(0x103)][_0x134633(0xd5)][_0x134633(0xed)]===0x1;}async[_0x5502ef(0x122)](_0x199ca0,_0x3ffdfe,_0x4a3a36,_0x77629f){const _0x392413=_0x5502ef,_0x4f2ac3={'memberId':(await this[_0x392413(0xe5)][_0x392413(0x128)](_0x199ca0))[_0x392413(0x125)](),'threadId':_0x4a3a36,'replyId':_0x77629f,'unitId':_0x199ca0},_0x57f60f=await this['_httpService'][_0x392413(0x12b)](_0x392413(0x118)+_0x199ca0+'/delete',{'body':_0x4f2ac3});return!_0x57f60f['body'][_0x392413(0xd5)]||_0x57f60f[_0x392413(0x103)]['error'][_0x392413(0xed)]===0x1;}async['listComments'](_0x1cf0e6,_0x549585,_0x5e5a69){const _0x2f1732=_0x5502ef,_0x4d5a9a={'unitId':_0x1cf0e6,'threadId':_0x5e5a69},_0x416232=await this[_0x2f1732(0xde)][_0x2f1732(0x12b)](_0x2f1732(0x118)+_0x1cf0e6+_0x2f1732(0x113),{'body':_0x4d5a9a}),_0x412e8=_0x5e5a69[_0x2f1732(0xf2)](_0x3095d7=>ee(_0x416232[_0x2f1732(0x103)]['comments'][_0x3095d7],_0x1cf0e6,_0x549585))[_0x2f1732(0xfa)](Boolean);return Object[_0x2f1732(0x102)](_0x416232[_0x2f1732(0x103)][_0x2f1732(0xea)])[_0x2f1732(0x100)](_0x507473=>{const _0x4dd1fa=_0x2f1732;this['_userService'][_0x4dd1fa(0xfe)](_0x507473);}),_0x412e8;}[_0x5502ef(0xd6)](_0xd406e){const _0x1a094f=_0x5502ef;return{'id':_0xd406e['id'],'threadId':_0xd406e[_0x1a094f(0xe3)],'ref':_0xd406e['ref']};}};S=Q([b(0x0,_0x4bcd01(_0x4487a0)),b(0x1,_0x4bcd01(_0x27db51)),b(0x2,_0x4bcd01(_0x4648a7))],S);var re=Object[_0x5502ef(0x12f)],te=(_0x4fe564,_0x305496,_0x494da1,_0x523969)=>{const _0x5da8ff=_0x5502ef;for(var _0x5b9584=_0x523969>0x1?void 0x0:_0x523969?re(_0x305496,_0x494da1):_0x305496,_0x1a059a=_0x4fe564[_0x5da8ff(0xdb)]-0x1,_0x2fc531;_0x1a059a>=0x0;_0x1a059a--)(_0x2fc531=_0x4fe564[_0x1a059a])&&(_0x5b9584=_0x2fc531(_0x5b9584)||_0x5b9584);return _0x5b9584;},M=(_0x438c9b,_0xa6f0f6)=>(_0x41f0ff,_0x27bac4)=>_0xa6f0f6(_0x41f0ff,_0x27bac4,_0x438c9b);let f=class extends _0x57944e{constructor(_0x1c140a,_0x2a37df){const _0x400922=_0x5502ef;super(),this[_0x400922(0xe6)]=_0x1c140a,this[_0x400922(0x10b)]=_0x2a37df,this['_initDataSource']();}[_0x5502ef(0x123)](){const _0x295691=_0x5502ef;this[_0x295691(0xe6)][_0x295691(0xdc)]=this['_threadCommentDataSource'],this[_0x295691(0xe6)][_0x295691(0xd8)]=!0x1;}};f=te([M(0x0,_0x49bb57),M(0x1,_0x4bcd01(S))],f);var se=Object[_0x5502ef(0x120)],oe=Object[_0x5502ef(0x12f)],ne=(_0x2b2d8a,_0x490009,_0x446ff8)=>_0x490009 in _0x2b2d8a?se(_0x2b2d8a,_0x490009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446ff8}):_0x2b2d8a[_0x490009]=_0x446ff8,ie=(_0x2cfb48,_0x4d72e5,_0x2ca01f,_0x1df935)=>{for(var _0x5c1628=_0x1df935>0x1?void 0x0:_0x1df935?oe(_0x4d72e5,_0x2ca01f):_0x4d72e5,_0x4765db=_0x2cfb48['length']-0x1,_0x28be5e;_0x4765db>=0x0;_0x4765db--)(_0x28be5e=_0x2cfb48[_0x4765db])&&(_0x5c1628=_0x28be5e(_0x5c1628)||_0x5c1628);return _0x5c1628;},N=(_0xa8815c,_0x157fe2)=>(_0x4400e0,_0x59cee3)=>_0x157fe2(_0x4400e0,_0x59cee3,_0xa8815c),$=(_0x30c66c,_0x30f413,_0x1ea869)=>ne(_0x30c66c,typeof _0x30f413!='symbol'?_0x30f413+'':_0x30f413,_0x1ea869);let g=class extends _0x2cdc95{constructor(_0x1df3a3=O,_0x77e181,_0x2fd41e){const _0x6b2442=_0x5502ef;super(),this[_0x6b2442(0xe1)]=_0x1df3a3,this[_0x6b2442(0x119)]=_0x77e181,this[_0x6b2442(0x134)]=_0x2fd41e;const {..._0x50a352}=_0x1425e8({},O,this[_0x6b2442(0xe1)]);this[_0x6b2442(0x134)]['setConfig'](z,_0x50a352);}['onStarting'](){const _0x11dcc8=_0x5502ef;[[S],[f],[_]][_0x11dcc8(0x100)](_0x461bc1=>{const _0xdd882d=_0x11dcc8;this[_0xdd882d(0x119)]['add'](_0x461bc1);});}[_0x5502ef(0x132)](){const _0xe778b5=_0x5502ef;this[_0xe778b5(0x119)]['get'](f),this[_0xe778b5(0x119)][_0xe778b5(0x12d)](_);}};$(g,_0x5502ef(0xfc),W),$(g,_0x5502ef(0xda),_0x486682['UNIVER_UNKNOWN']),g=ie([_0x56a696(_0x11d26e,_0xbacb1d,_0x4273b7),N(0x1,_0x4bcd01(_0x3fde1a)),N(0x2,_0x2e8d6c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x231458=_0x43f0;(function(_0x5102db,_0x2b7586){const _0x5b2b93=_0x43f0,_0x321477=_0x5102db();while(!![]){try{const _0x3c4b1c=parseInt(_0x5b2b93(0x74))/0x1*(parseInt(_0x5b2b93(0xc0))/0x2)+-parseInt(_0x5b2b93(0x75))/0x3+-parseInt(_0x5b2b93(0x98))/0x4*(parseInt(_0x5b2b93(0xcc))/0x5)+-parseInt(_0x5b2b93(0x78))/0x6+-parseInt(_0x5b2b93(0x6c))/0x7+-parseInt(_0x5b2b93(0x7a))/0x8*(parseInt(_0x5b2b93(0xc6))/0x9)+parseInt(_0x5b2b93(0xb2))/0xa;if(_0x3c4b1c===_0x2b7586)break;else _0x321477['push'](_0x321477['shift']());}catch(_0xb1d5e1){_0x321477['push'](_0x321477['shift']());}}}(_0x5e35,0x27ffd));import{CommentService as _0x20b5b6,CollaborationSessionService as _0x41a581,UniverCollaborationClientPlugin as _0x40c7ce}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3794a6}from'@univerjs-pro/license';import{dayjs as _0x1a50d1,UserManagerService as _0x1caf0d,Inject as _0x3fb278,Injector as _0x1416f8,Disposable as _0x519c68,CustomRangeType as _0x34627d,UniverInstanceType as _0x13e5ee,DependentOn as _0x326330,IConfigService as _0x25bde9,Plugin as _0x3e97cc,merge as _0x58bb88}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47e1d5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b6328,IThreadCommentDataSourceService as _0x563d0d}from'@univerjs/thread-comment';import{bufferTime as _0x11cf83}from'rxjs';function _0x43f0(_0x22e547,_0x3e2ffa){_0x22e547=_0x22e547-0x64;const _0x5e3560=_0x5e35();let _0x43f0b7=_0x5e3560[_0x22e547];return _0x43f0b7;}import{HTTPService as _0x269dd4}from'@univerjs/network';const W=_0x231458(0x92);function _0x5e35(){const _0x2b0d9e=['Edit','add','14373WVenHI','getCurrentUser','length','symbol','post','_injector','5ERuIrS','_httpService','_initUserSync','/add','filter','subscribe','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','reply','forEach','1316322XwoJmL','delete','error','_initDataSource','commentUpdate$','Delete','comment','unitId','985pQWjHV','118935ZvVfhV','userId','/universer-api/user/list','197640heeEAB','_sessionService','1208zSADBw','threadId','values','Solve','users','find','_init','UNRECOGNIZED','thread-comment-data-source.config','getUnit','parentId','/universer-api/comment/unit/','createTimestamp','Add','disposeWithMe','body','UNIVER_UNKNOWN','addUser','_commentService','rangeId','pluginName','format','OpenOrReOpen','/edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','setConfig','replyId','customRanges','_threadCommentDataSource','422068wOmwwL','onStarting','getMemberID','_config','code','content','Solved','_threadCommentDataSourceService','rangeType','deleteComment','Unknown','_configService','root','parse','_userService','user','getComment','getUser','ref','Reply','dataSource','map','updateComment','_threadCommentModel','onReady','resolveComment','7307470gUJAHC','addComment','listComments','/solved','defineProperty','COMMENT','resolved','stringify','type','replies','requireSession','comments','getOwnPropertyDescriptor','payload','82xyhusV','solved','userID','get'];_0x5e35=function(){return _0x2b0d9e;};return _0x5e35();}var I=(_0x4ef7e3=>(_0x4ef7e3[_0x4ef7e3[_0x231458(0x90)]=0x0]=_0x231458(0x90),_0x4ef7e3[_0x4ef7e3[_0x231458(0x9e)]=0x1]=_0x231458(0x9e),_0x4ef7e3[_0x4ef7e3[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4ef7e3))(I||{}),v=(_0x4692a5=>(_0x4692a5[_0x4692a5['Unknown']=0x0]=_0x231458(0xa2),_0x4692a5[_0x4692a5[_0x231458(0x87)]=0x1]=_0x231458(0x87),_0x4692a5[_0x4692a5[_0x231458(0xab)]=0x2]=_0x231458(0xab),_0x4692a5[_0x4692a5[_0x231458(0xc4)]=0x3]=_0x231458(0xc4),_0x4692a5[_0x4692a5[_0x231458(0x71)]=0x4]=_0x231458(0x71),_0x4692a5[_0x4692a5['Solve']=0x5]=_0x231458(0x7d),_0x4692a5[_0x4692a5[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4692a5))(v||{});const y=_0x79c51e=>_0x1a50d1(new Date(+_0x79c51e))[_0x231458(0x8f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bb590,_0x1f806d)=>{const _0x4e232b=_0x231458,_0x4e6f18=_0x3bb590[_0x4e232b(0xc3)](_0x1caf0d),_0x1fcd03=_0x3bb590[_0x4e232b(0xc3)](_0x269dd4);_0x1f806d[_0x4e232b(0x6b)](_0x5550ed=>{const _0x345121=_0x4e232b;_0x4e6f18[_0x345121(0xa9)](_0x5550ed)&&_0x1f806d[_0x345121(0x6d)](_0x5550ed);}),_0x1f806d[_0x4e232b(0x93)]&&(await _0x1fcd03[_0x4e232b(0xc3)](_0x4e232b(0x77),{'params':{'userIDs':[..._0x1f806d]}}))[_0x4e232b(0x89)]['users'][_0x4e232b(0x6b)](_0x5e00e6=>{_0x5e00e6&&_0x4e6f18['addUser'](_0x5e00e6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6b7e,_0x2021d1,_0x5daf91,_0x5c80f0)=>{const _0x54f4c0=_0x231458;for(var _0x106b8f=_0x5c80f0>0x1?void 0x0:_0x5c80f0?K(_0x2021d1,_0x5daf91):_0x2021d1,_0x304f60=_0x3c6b7e[_0x54f4c0(0xc8)]-0x1,_0x3d6e36;_0x304f60>=0x0;_0x304f60--)(_0x3d6e36=_0x3c6b7e[_0x304f60])&&(_0x106b8f=_0x3d6e36(_0x106b8f)||_0x106b8f);return _0x106b8f;},p=(_0xf9b229,_0x1eb5c0)=>(_0x3e81f1,_0x5f242c)=>_0x1eb5c0(_0x3e81f1,_0x5f242c,_0xf9b229);let _=class extends _0x519c68{constructor(_0x3616ae,_0x539f17,_0x2f208f,_0x468c09){const _0x49e627=_0x231458;super(),this['_commentService']=_0x3616ae,this[_0x49e627(0xaf)]=_0x539f17,this['_userService']=_0x2f208f,this[_0x49e627(0xcb)]=_0x468c09,this[_0x49e627(0x80)](),this['_initUserSync']();}[_0x231458(0x64)](){const _0x47fb5d=_0x231458;this[_0x47fb5d(0x88)](this[_0x47fb5d(0xaf)]['commentUpdate$']['pipe'](_0x11cf83(0x10))[_0x47fb5d(0x67)](_0x41f0a4=>{const _0x142e96=_0x47fb5d,_0x512799=new Set();_0x41f0a4[_0x142e96(0x6b)](_0x808872=>{const _0x17bc13=_0x142e96;if(_0x808872[_0x17bc13(0xba)]===_0x17bc13(0xc5)){const _0x299246=_0x808872[_0x17bc13(0xbf)]['personId'];_0x512799['add'](_0x299246);}}),B(this[_0x142e96(0xcb)],_0x512799);}));}['_init'](){const _0x1f6025=_0x231458;this[_0x1f6025(0x88)](this[_0x1f6025(0x8c)][_0x1f6025(0x70)][_0x1f6025(0x67)](async _0x10ff55=>{const _0x4a5eb3=_0x1f6025;var _0x3647c2,_0x3a598a,_0x5b8a40,_0x5511ab;const _0x43d6c9=(_0x3647c2=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0x83)](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x53ff03=>_0x53ff03[_0x4a5eb3(0x7b)]===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x3647c2['root'];if(!_0x43d6c9)return;const {unitId:_0x399263,subUnitId:_0x40a574}=_0x43d6c9;switch(_0x10ff55[_0x4a5eb3(0xa7)]&&this[_0x4a5eb3(0xa6)][_0x4a5eb3(0x8b)](_0x10ff55[_0x4a5eb3(0xa7)]),_0x10ff55[_0x4a5eb3(0xba)]){case v[_0x4a5eb3(0x87)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x399263,_0x40a574,{'unitId':_0x399263,'subUnitId':_0x40a574,'ref':'','id':_0x10ff55['replyId'],'dT':y(+_0x10ff55[_0x4a5eb3(0x86)]),'threadId':_0x10ff55[_0x4a5eb3(0x7b)],'personId':(_0x5b8a40=(_0x3a598a=_0x10ff55[_0x4a5eb3(0xa7)])==null?void 0x0:_0x3a598a[_0x4a5eb3(0xc2)])!=null?_0x5b8a40:_0x10ff55[_0x4a5eb3(0x76)],'text':JSON['parse'](_0x10ff55[_0x4a5eb3(0x9d)]),'parentId':_0x43d6c9['id']});break;}case v['Delete']:{const _0x13e83f=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa8)](_0x399263,_0x40a574,_0x10ff55['replyId']);_0x13e83f&&_0x13e83f[_0x4a5eb3(0x84)]&&this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa1)](_0x399263,_0x40a574,_0x10ff55[_0x4a5eb3(0x95)]);break;}case v['Edit']:{this[_0x4a5eb3(0xaf)]['updateComment'](_0x399263,_0x40a574,{'commentId':_0x10ff55[_0x4a5eb3(0x95)],'text':JSON[_0x4a5eb3(0xa5)](_0x10ff55[_0x4a5eb3(0x9d)])});break;}case v[_0x4a5eb3(0x7d)]:{const _0x30c189=(_0x5511ab=this[_0x4a5eb3(0xaf)]['getUnit'](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x2cd669=>_0x2cd669['threadId']===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x5511ab[_0x4a5eb3(0xa4)];_0x30c189&&this['_threadCommentModel']['resolveComment'](_0x399263,_0x40a574,_0x30c189['id'],_0x10ff55['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3fb278(_0x20b5b6)),p(0x1,_0x3fb278(_0x1b6328)),p(0x2,_0x3fb278(_0x1caf0d)),p(0x3,_0x3fb278(_0x1416f8))],_);const z=_0x231458(0x82),O={};var k=Object[_0x231458(0xbe)],Q=(_0x584a99,_0x43e7eb,_0x2cebbb,_0x208e32)=>{const _0x456ba3=_0x231458;for(var _0x395a4a=_0x208e32>0x1?void 0x0:_0x208e32?k(_0x43e7eb,_0x2cebbb):_0x43e7eb,_0x4b94e3=_0x584a99[_0x456ba3(0xc8)]-0x1,_0x4ee66d;_0x4b94e3>=0x0;_0x4b94e3--)(_0x4ee66d=_0x584a99[_0x4b94e3])&&(_0x395a4a=_0x4ee66d(_0x395a4a)||_0x395a4a);return _0x395a4a;},b=(_0x42de08,_0x20225f)=>(_0x493f97,_0x2266f7)=>_0x20225f(_0x493f97,_0x2266f7,_0x42de08);function X(_0x27ade2,_0x4e6a02){const _0x373dfa=_0x231458,_0x1d0fc2=_0x27ade2[_0x373dfa(0xbb)][0x0];return{..._0x4e6a02,'id':_0x1d0fc2[_0x373dfa(0x95)],'resolved':_0x27ade2[_0x373dfa(0xc1)]===0x1,'dT':y(_0x1d0fc2[_0x373dfa(0x86)]),'personId':_0x1d0fc2[_0x373dfa(0x76)],'threadId':_0x1d0fc2['threadId']};}function ee(_0xc4f5c,_0x17465c,_0x5c5932){const _0x50bc7d=_0x231458;var _0x4317af,_0x316c56;if(((_0x316c56=(_0x4317af=_0xc4f5c==null?void 0x0:_0xc4f5c[_0x50bc7d(0xbb)])==null?void 0x0:_0x4317af[_0x50bc7d(0xc8)])!=null?_0x316c56:0x0)>0x0){const _0x1b85b0=(_0x503676,_0x102c51)=>({'id':_0x503676['replyId'],'threadId':_0x503676['threadId'],'dT':y(_0x503676[_0x50bc7d(0x86)]),'personId':_0x503676['userId'],'resolved':_0xc4f5c[_0x50bc7d(0xc1)]===I[_0x50bc7d(0x9e)],'unitId':_0x17465c,'subUnitId':_0x5c5932,'text':JSON[_0x50bc7d(0xa5)](_0x503676['content']),'parentId':_0x102c51}),_0x8f41eb=_0x1b85b0(_0xc4f5c[_0x50bc7d(0xbb)][0x0]);return{..._0x8f41eb,'children':_0xc4f5c[_0x50bc7d(0xbb)]['slice'](0x1)[_0x50bc7d(0xad)](_0x4605f7=>_0x1b85b0(_0x4605f7,_0x8f41eb['id']))};}return null;}let S=class{constructor(_0x47bedd,_0xa9358a,_0xf0de91){const _0x56c29e=_0x231458;this[_0x56c29e(0xcd)]=_0x47bedd,this[_0x56c29e(0xa6)]=_0xa9358a,this[_0x56c29e(0x79)]=_0xf0de91;}async[_0x231458(0xb3)](_0x2d48be){const _0x85b75d=_0x231458;var _0x4ce832,_0x61ac4;const {parentId:_0x336bac,unitId:_0x48fd40,text:_0x31ab99,threadId:_0x57ff7c}=_0x2d48be,_0x225db2=(_0x61ac4=(_0x4ce832=_0x31ab99[_0x85b75d(0x96)])==null?void 0x0:_0x4ce832[_0x85b75d(0x66)](_0x53528d=>_0x53528d[_0x85b75d(0xa0)]===_0x34627d[_0x85b75d(0xb7)])[_0x85b75d(0xad)](_0x2b515f=>_0x2b515f[_0x85b75d(0x8d)]))!=null?_0x61ac4:[],_0x3e1990=JSON[_0x85b75d(0xb9)](_0x31ab99),_0x4786f4=(await this['_sessionService'][_0x85b75d(0xbc)](_0x48fd40))[_0x85b75d(0x9a)]();if(_0x336bac){const _0xa7c55e={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2,'threadId':_0x57ff7c},_0x45ffcc=(await this[_0x85b75d(0xcd)][_0x85b75d(0xca)](_0x85b75d(0x85)+_0x48fd40+'/reply',{'body':_0xa7c55e}))[_0x85b75d(0x89)][_0x85b75d(0x6a)];return{..._0x2d48be,'id':_0x45ffcc[_0x85b75d(0x95)],'dT':_0x1a50d1(+_0x45ffcc[_0x85b75d(0x86)])['format'](_0x85b75d(0x68)),'personId':_0x45ffcc[_0x85b75d(0x76)]};}else{const _0x414308={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2},_0x33b3fc=await this[_0x85b75d(0xcd)][_0x85b75d(0xca)]('/universer-api/comment/unit/'+_0x48fd40+_0x85b75d(0x65),{'body':_0x414308});return X(_0x33b3fc[_0x85b75d(0x89)][_0x85b75d(0x72)],_0x2d48be);}}async[_0x231458(0xae)](_0x541770){const _0x3cf72a=_0x231458;var _0x28a5ee,_0x109011;const {text:_0x37bc5c,unitId:_0x2ff56e}=_0x541770,_0x4f476a=(_0x109011=(_0x28a5ee=_0x37bc5c[_0x3cf72a(0x96)])==null?void 0x0:_0x28a5ee[_0x3cf72a(0x66)](_0xc4082=>_0xc4082[_0x3cf72a(0xa0)]===_0x34627d[_0x3cf72a(0xb7)])['map'](_0x587523=>_0x587523['rangeId']))!=null?_0x109011:[],_0x1e6715=JSON[_0x3cf72a(0xb9)](_0x37bc5c),_0x2a50ed=_0x541770[_0x3cf72a(0x7b)],_0x227939=_0x541770['id'],_0x19ca49={'memberId':(await this[_0x3cf72a(0x79)][_0x3cf72a(0xbc)](_0x2ff56e))[_0x3cf72a(0x9a)](),'unitId':_0x2ff56e,'threadId':_0x2a50ed,'mention':_0x4f476a,'content':_0x1e6715,'replyId':_0x227939},_0x25c328=await this['_httpService'][_0x3cf72a(0xca)](_0x3cf72a(0x85)+_0x2ff56e+_0x3cf72a(0x91),{'body':_0x19ca49});return!_0x25c328['body'][_0x3cf72a(0x6e)]||_0x25c328[_0x3cf72a(0x89)]['error'][_0x3cf72a(0x9c)]===0x1;}async[_0x231458(0xb1)](_0x5e4769){const _0x30d8cb=_0x231458,{unitId:_0x13a05b}=_0x5e4769,_0xe85882=_0x5e4769[_0x30d8cb(0x7b)],_0x1d1a69={'memberId':this[_0x30d8cb(0xa6)][_0x30d8cb(0xc7)]()[_0x30d8cb(0xc2)],'unitId':_0x13a05b,'threadId':_0xe85882,'solved':_0x5e4769[_0x30d8cb(0xb8)]?I['Solved']:I[_0x30d8cb(0x90)]},_0x5409bb=await this[_0x30d8cb(0xcd)][_0x30d8cb(0xca)](_0x30d8cb(0x85)+_0x13a05b+_0x30d8cb(0xb5),{'body':_0x1d1a69});return!_0x5409bb['body'][_0x30d8cb(0x6e)]||_0x5409bb[_0x30d8cb(0x89)][_0x30d8cb(0x6e)][_0x30d8cb(0x9c)]===0x1;}async[_0x231458(0xa1)](_0x4953d3,_0x3f84a6,_0x31bd95,_0x115941){const _0x309135=_0x231458,_0x117c2={'memberId':(await this[_0x309135(0x79)][_0x309135(0xbc)](_0x4953d3))['getMemberID'](),'threadId':_0x31bd95,'replyId':_0x115941,'unitId':_0x4953d3},_0x422c3d=await this[_0x309135(0xcd)]['post'](_0x309135(0x85)+_0x4953d3+'/delete',{'body':_0x117c2});return!_0x422c3d[_0x309135(0x89)][_0x309135(0x6e)]||_0x422c3d['body'][_0x309135(0x6e)]['code']===0x1;}async[_0x231458(0xb4)](_0x4d4a98,_0xade5a0,_0x39c87f){const _0x4ac75=_0x231458,_0xd43ed0={'unitId':_0x4d4a98,'threadId':_0x39c87f},_0x5240bf=await this['_httpService']['post'](_0x4ac75(0x85)+_0x4d4a98+'/list',{'body':_0xd43ed0}),_0x35b5cf=_0x39c87f[_0x4ac75(0xad)](_0x373e1c=>ee(_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0xbd)][_0x373e1c],_0x4d4a98,_0xade5a0))[_0x4ac75(0x66)](Boolean);return Object[_0x4ac75(0x7c)](_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0x7e)])['forEach'](_0x4d7cda=>{const _0x5acd67=_0x4ac75;this[_0x5acd67(0xa6)][_0x5acd67(0x8b)](_0x4d7cda);}),_0x35b5cf;}['saveCommentToSnapshot'](_0x5a886f){const _0x37b405=_0x231458;return{'id':_0x5a886f['id'],'threadId':_0x5a886f[_0x37b405(0x7b)],'ref':_0x5a886f[_0x37b405(0xaa)]};}};S=Q([b(0x0,_0x3fb278(_0x269dd4)),b(0x1,_0x3fb278(_0x1caf0d)),b(0x2,_0x3fb278(_0x41a581))],S);var re=Object[_0x231458(0xbe)],te=(_0x57dcf0,_0x32b319,_0x576092,_0x518402)=>{const _0x50b58d=_0x231458;for(var _0x383283=_0x518402>0x1?void 0x0:_0x518402?re(_0x32b319,_0x576092):_0x32b319,_0x1d9cd9=_0x57dcf0[_0x50b58d(0xc8)]-0x1,_0x2849bc;_0x1d9cd9>=0x0;_0x1d9cd9--)(_0x2849bc=_0x57dcf0[_0x1d9cd9])&&(_0x383283=_0x2849bc(_0x383283)||_0x383283);return _0x383283;},M=(_0x4f6e49,_0x506561)=>(_0x3bc141,_0x25b58f)=>_0x506561(_0x3bc141,_0x25b58f,_0x4f6e49);let f=class extends _0x519c68{constructor(_0x3a175e,_0x25e067){const _0x20b3fd=_0x231458;super(),this[_0x20b3fd(0x9f)]=_0x3a175e,this[_0x20b3fd(0x97)]=_0x25e067,this[_0x20b3fd(0x6f)]();}[_0x231458(0x6f)](){const _0x47f909=_0x231458;this[_0x47f909(0x9f)][_0x47f909(0xac)]=this[_0x47f909(0x97)],this[_0x47f909(0x9f)][_0x47f909(0x69)]=!0x1;}};f=te([M(0x0,_0x563d0d),M(0x1,_0x3fb278(S))],f);var se=Object[_0x231458(0xb6)],oe=Object[_0x231458(0xbe)],ne=(_0x7d0e6a,_0x31e64d,_0x55a49f)=>_0x31e64d in _0x7d0e6a?se(_0x7d0e6a,_0x31e64d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55a49f}):_0x7d0e6a[_0x31e64d]=_0x55a49f,ie=(_0x49da57,_0x121fac,_0x92989f,_0xa89334)=>{const _0x31be25=_0x231458;for(var _0x20f65b=_0xa89334>0x1?void 0x0:_0xa89334?oe(_0x121fac,_0x92989f):_0x121fac,_0x2c6408=_0x49da57[_0x31be25(0xc8)]-0x1,_0x53ec7d;_0x2c6408>=0x0;_0x2c6408--)(_0x53ec7d=_0x49da57[_0x2c6408])&&(_0x20f65b=_0x53ec7d(_0x20f65b)||_0x20f65b);return _0x20f65b;},N=(_0x27ebf2,_0x216e31)=>(_0x51c29b,_0x1cebb8)=>_0x216e31(_0x51c29b,_0x1cebb8,_0x27ebf2),$=(_0x4a1bfa,_0x3551cf,_0x44ab4f)=>ne(_0x4a1bfa,typeof _0x3551cf!=_0x231458(0xc9)?_0x3551cf+'':_0x3551cf,_0x44ab4f);let g=class extends _0x3e97cc{constructor(_0x1ba5e1=O,_0x29581f,_0x25a5ec){const _0xec65f7=_0x231458;super(),this[_0xec65f7(0x9b)]=_0x1ba5e1,this[_0xec65f7(0xcb)]=_0x29581f,this['_configService']=_0x25a5ec;const {..._0x56334c}=_0x58bb88({},O,this[_0xec65f7(0x9b)]);this[_0xec65f7(0xa3)][_0xec65f7(0x94)](z,_0x56334c);}[_0x231458(0x99)](){const _0x3a9dd8=_0x231458;[[S],[f],[_]][_0x3a9dd8(0x6b)](_0x569e31=>{const _0x284db3=_0x3a9dd8;this['_injector'][_0x284db3(0xc5)](_0x569e31);});}[_0x231458(0xb0)](){const _0x588446=_0x231458;this[_0x588446(0xcb)][_0x588446(0xc3)](f),this[_0x588446(0xcb)][_0x588446(0xc3)](_);}};$(g,_0x231458(0x8e),W),$(g,'type',_0x13e5ee[_0x231458(0x8a)]),g=ie([_0x326330(_0x47e1d5,_0x40c7ce,_0x3794a6),N(0x1,_0x3fb278(_0x1416f8)),N(0x2,_0x25bde9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1f52f5,_0x3d9e5f){const _0x42616d=_0x3960,_0x171adc=_0x1f52f5();while(!![]){try{const _0x4b393f=parseInt(_0x42616d(0x1b1))/0x1+parseInt(_0x42616d(0x1cb))/0x2*(-parseInt(_0x42616d(0x1c3))/0x3)+parseInt(_0x42616d(0x16e))/0x4+parseInt(_0x42616d(0x18a))/0x5+-parseInt(_0x42616d(0x18e))/0x6+parseInt(_0x42616d(0x162))/0x7*(parseInt(_0x42616d(0x19c))/0x8)+-parseInt(_0x42616d(0x172))/0x9;if(_0x4b393f===_0x3d9e5f)break;else _0x171adc['push'](_0x171adc['shift']());}catch(_0x5c365a){_0x171adc['push'](_0x171adc['shift']());}}}(_0x3d7c,0x5b6a0),function(_0x2a9e4f,_0x270940){const _0xfb450a=_0x3960;typeof exports=='object'&&typeof module<'u'?_0x270940(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==_0xfb450a(0x1cd)&&define[_0xfb450a(0x17d)]?define([_0xfb450a(0x1d5),_0xfb450a(0x17f),_0xfb450a(0x17e),_0xfb450a(0x18b),'@univerjs/thread-comment-ui',_0xfb450a(0x1ce),_0xfb450a(0x1b2),'@univerjs/network'],_0x270940):(_0x2a9e4f=typeof globalThis<'u'?globalThis:_0x2a9e4f||self,_0x270940(_0x2a9e4f[_0xfb450a(0x1b4)]={},_0x2a9e4f[_0xfb450a(0x1b3)],_0x2a9e4f[_0xfb450a(0x15c)],_0x2a9e4f['UniverCore'],_0x2a9e4f[_0xfb450a(0x1c2)],_0x2a9e4f[_0xfb450a(0x198)],_0x2a9e4f[_0xfb450a(0x1b2)],_0x2a9e4f['UniverNetwork']));}(this,function(_0x498946,_0x50192b,_0x54c7b5,_0xd19589,_0x47ef7c,_0xf14448,_0x505807,_0x3a4598){'use strict';const _0xfcf55d=_0x3960;const _0x12c6bd=_0xfcf55d(0x1d8);var _0xa67b23=(_0x228496=>(_0x228496[_0x228496[_0xfcf55d(0x1c9)]=0x0]=_0xfcf55d(0x1c9),_0x228496[_0x228496[_0xfcf55d(0x164)]=0x1]=_0xfcf55d(0x164),_0x228496[_0x228496[_0xfcf55d(0x165)]=-0x1]=_0xfcf55d(0x165),_0x228496))(_0xa67b23||{}),_0x2f9f97=(_0x58c0a0=>(_0x58c0a0[_0x58c0a0[_0xfcf55d(0x186)]=0x0]='Unknown',_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1ba)]=0x1]=_0xfcf55d(0x1ba),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1d9)]=0x2]='Reply',_0x58c0a0[_0x58c0a0[_0xfcf55d(0x187)]=0x3]=_0xfcf55d(0x187),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1db)]=0x4]=_0xfcf55d(0x1db),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x17b)]=0x5]=_0xfcf55d(0x17b),_0x58c0a0[_0x58c0a0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x58c0a0))(_0x2f9f97||{});const _0x4211b3=_0x5f2993=>_0xd19589[_0xfcf55d(0x1c0)](new Date(+_0x5f2993))[_0xfcf55d(0x197)](_0xfcf55d(0x1ae)),_0x17d597=async(_0x47ab1e,_0x1b7606)=>{const _0x3ef546=_0xfcf55d,_0x18a070=_0x47ab1e['get'](_0xd19589[_0x3ef546(0x1d4)]),_0x584e56=_0x47ab1e['get'](_0x3a4598[_0x3ef546(0x1be)]);_0x1b7606[_0x3ef546(0x1bf)](_0x250a77=>{const _0x4040f9=_0x3ef546;_0x18a070['getUser'](_0x250a77)&&_0x1b7606[_0x4040f9(0x1bb)](_0x250a77);}),_0x1b7606['size']&&(await _0x584e56['get'](_0x3ef546(0x1a7),{'params':{'userIDs':[..._0x1b7606]}}))[_0x3ef546(0x1b5)]['users'][_0x3ef546(0x1bf)](_0x585d0e=>{const _0x42110c=_0x3ef546;_0x585d0e&&_0x18a070[_0x42110c(0x1a2)](_0x585d0e);});};var _0x3a78c3=Object[_0xfcf55d(0x185)],_0x62b0d3=(_0x4d798c,_0x31d490,_0x3a4ffa,_0x37e4a5)=>{const _0x3773d1=_0xfcf55d;for(var _0x2a7d94=_0x37e4a5>0x1?void 0x0:_0x37e4a5?_0x3a78c3(_0x31d490,_0x3a4ffa):_0x31d490,_0x4f44e5=_0x4d798c[_0x3773d1(0x16b)]-0x1,_0x1aa333;_0x4f44e5>=0x0;_0x4f44e5--)(_0x1aa333=_0x4d798c[_0x4f44e5])&&(_0x2a7d94=_0x1aa333(_0x2a7d94)||_0x2a7d94);return _0x2a7d94;},_0xf156e5=(_0x2205f4,_0x285d89)=>(_0x3c56bf,_0xf264ce)=>_0x285d89(_0x3c56bf,_0xf264ce,_0x2205f4);let _0x496ab1=class extends _0xd19589[_0xfcf55d(0x1d2)]{constructor(_0x14dec3,_0x5c982b,_0x1924cb,_0x16bc93){const _0x48e37f=_0xfcf55d;super(),this[_0x48e37f(0x188)]=_0x14dec3,this['_threadCommentModel']=_0x5c982b,this['_userService']=_0x1924cb,this[_0x48e37f(0x1b6)]=_0x16bc93,this[_0x48e37f(0x180)](),this['_initUserSync']();}[_0xfcf55d(0x1c7)](){const _0x4161dd=_0xfcf55d;this[_0x4161dd(0x1ab)](this[_0x4161dd(0x196)][_0x4161dd(0x193)]['pipe'](_0x505807[_0x4161dd(0x19b)](0x10))[_0x4161dd(0x161)](_0x34f599=>{const _0x4602f3=_0x4161dd,_0x28f8f7=new Set();_0x34f599[_0x4602f3(0x1bf)](_0x1a7006=>{const _0x2d2f46=_0x4602f3;if(_0x1a7006[_0x2d2f46(0x19e)]==='add'){const _0x39230a=_0x1a7006[_0x2d2f46(0x184)]['personId'];_0x28f8f7[_0x2d2f46(0x1d7)](_0x39230a);}}),_0x17d597(this[_0x4602f3(0x1b6)],_0x28f8f7);}));}[_0xfcf55d(0x180)](){const _0x135740=_0xfcf55d;this[_0x135740(0x1ab)](this[_0x135740(0x188)][_0x135740(0x193)][_0x135740(0x161)](async _0x43dcdb=>{const _0x3bf6a9=_0x135740;var _0x356a9d,_0x59e9b1,_0x49cfac,_0x4f676f;const _0x50e5ee=(_0x356a9d=this[_0x3bf6a9(0x196)]['getUnit'](_0x43dcdb[_0x3bf6a9(0x170)])[_0x3bf6a9(0x15e)](_0x3cdf11=>_0x3cdf11[_0x3bf6a9(0x15a)]===_0x43dcdb[_0x3bf6a9(0x15a)]))==null?void 0x0:_0x356a9d[_0x3bf6a9(0x17c)];if(!_0x50e5ee)return;const {unitId:_0x23fca2,subUnitId:_0x59efba}=_0x50e5ee;switch(_0x43dcdb[_0x3bf6a9(0x1c5)]&&this[_0x3bf6a9(0x1a6)][_0x3bf6a9(0x1a2)](_0x43dcdb['user']),_0x43dcdb[_0x3bf6a9(0x19e)]){case _0x2f9f97[_0x3bf6a9(0x1ba)]:break;case _0x2f9f97[_0x3bf6a9(0x1d9)]:{this[_0x3bf6a9(0x196)]['addComment'](_0x23fca2,_0x59efba,{'unitId':_0x23fca2,'subUnitId':_0x59efba,'ref':'','id':_0x43dcdb[_0x3bf6a9(0x1b7)],'dT':_0x4211b3(+_0x43dcdb[_0x3bf6a9(0x16a)]),'threadId':_0x43dcdb[_0x3bf6a9(0x15a)],'personId':(_0x49cfac=(_0x59e9b1=_0x43dcdb[_0x3bf6a9(0x1c5)])==null?void 0x0:_0x59e9b1['userID'])!=null?_0x49cfac:_0x43dcdb['userId'],'text':JSON[_0x3bf6a9(0x18d)](_0x43dcdb[_0x3bf6a9(0x192)]),'parentId':_0x50e5ee['id']});break;}case _0x2f9f97[_0x3bf6a9(0x1db)]:{const _0x237356=this['_threadCommentModel'][_0x3bf6a9(0x178)](_0x23fca2,_0x59efba,_0x43dcdb[_0x3bf6a9(0x1b7)]);_0x237356&&_0x237356[_0x3bf6a9(0x191)]&&this[_0x3bf6a9(0x196)][_0x3bf6a9(0x166)](_0x23fca2,_0x59efba,_0x43dcdb[_0x3bf6a9(0x1b7)]);break;}case _0x2f9f97[_0x3bf6a9(0x187)]:{this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1dc)](_0x23fca2,_0x59efba,{'commentId':_0x43dcdb['replyId'],'text':JSON['parse'](_0x43dcdb[_0x3bf6a9(0x192)])});break;}case _0x2f9f97['Solve']:{const _0x2d99f2=(_0x4f676f=this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1bc)](_0x43dcdb[_0x3bf6a9(0x170)])[_0x3bf6a9(0x15e)](_0x4dba37=>_0x4dba37['threadId']===_0x43dcdb[_0x3bf6a9(0x15a)]))==null?void 0x0:_0x4f676f[_0x3bf6a9(0x17c)];_0x2d99f2&&this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1a9)](_0x23fca2,_0x59efba,_0x2d99f2['id'],_0x43dcdb[_0x3bf6a9(0x1a4)]===_0xa67b23['Solved']);break;}}}));}};_0x496ab1=_0x62b0d3([_0xf156e5(0x0,_0xd19589[_0xfcf55d(0x183)](_0x50192b[_0xfcf55d(0x1bd)])),_0xf156e5(0x1,_0xd19589[_0xfcf55d(0x183)](_0xf14448['ThreadCommentModel'])),_0xf156e5(0x2,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1d4)])),_0xf156e5(0x3,_0xd19589['Inject'](_0xd19589[_0xfcf55d(0x1aa)]))],_0x496ab1);const _0x5ee21c=_0xfcf55d(0x1da),_0x1e6a65={};var _0x537144=Object[_0xfcf55d(0x185)],_0x144496=(_0x17c3ee,_0xb7f796,_0x39f4d4,_0x1899ad)=>{for(var _0x349baa=_0x1899ad>0x1?void 0x0:_0x1899ad?_0x537144(_0xb7f796,_0x39f4d4):_0xb7f796,_0x31ca6d=_0x17c3ee['length']-0x1,_0x1bcc9b;_0x31ca6d>=0x0;_0x31ca6d--)(_0x1bcc9b=_0x17c3ee[_0x31ca6d])&&(_0x349baa=_0x1bcc9b(_0x349baa)||_0x349baa);return _0x349baa;},_0x406750=(_0x4d43f5,_0x4c0d6a)=>(_0x15f70a,_0x12ce64)=>_0x4c0d6a(_0x15f70a,_0x12ce64,_0x4d43f5);function _0x4bf53f(_0x459b4c,_0x4a9667){const _0xbfc9d8=_0xfcf55d,_0x95d346=_0x459b4c[_0xbfc9d8(0x194)][0x0];return{..._0x4a9667,'id':_0x95d346[_0xbfc9d8(0x1b7)],'resolved':_0x459b4c[_0xbfc9d8(0x1a4)]===0x1,'dT':_0x4211b3(_0x95d346['createTimestamp']),'personId':_0x95d346[_0xbfc9d8(0x16d)],'threadId':_0x95d346[_0xbfc9d8(0x15a)]};}function _0x47d274(_0x3eb4c1,_0x2492bd,_0x241db7){const _0xda18ff=_0xfcf55d;var _0x115e52,_0xbdb76f;if(((_0xbdb76f=(_0x115e52=_0x3eb4c1==null?void 0x0:_0x3eb4c1[_0xda18ff(0x194)])==null?void 0x0:_0x115e52[_0xda18ff(0x16b)])!=null?_0xbdb76f:0x0)>0x0){const _0x44d5de=(_0x133123,_0x2193d7)=>({'id':_0x133123[_0xda18ff(0x1b7)],'threadId':_0x133123[_0xda18ff(0x15a)],'dT':_0x4211b3(_0x133123[_0xda18ff(0x16a)]),'personId':_0x133123['userId'],'resolved':_0x3eb4c1[_0xda18ff(0x1a4)]===_0xa67b23['Solved'],'unitId':_0x2492bd,'subUnitId':_0x241db7,'text':JSON[_0xda18ff(0x18d)](_0x133123[_0xda18ff(0x192)]),'parentId':_0x2193d7}),_0x110b80=_0x44d5de(_0x3eb4c1['replies'][0x0]);return{..._0x110b80,'children':_0x3eb4c1['replies']['slice'](0x1)[_0xda18ff(0x1a0)](_0xb74aa=>_0x44d5de(_0xb74aa,_0x110b80['id']))};}return null;}let _0x4e6efe=class{constructor(_0x268fe9,_0x9dbb3c,_0x435b33){const _0x2576b7=_0xfcf55d;this[_0x2576b7(0x1ad)]=_0x268fe9,this[_0x2576b7(0x1a6)]=_0x9dbb3c,this['_sessionService']=_0x435b33;}async['addComment'](_0x4b4536){const _0x3d6465=_0xfcf55d;var _0x5d5528,_0x40f24c;const {parentId:_0x484ebe,unitId:_0x49ec91,text:_0xc20f9b,threadId:_0x490aee}=_0x4b4536,_0x53cc86=(_0x40f24c=(_0x5d5528=_0xc20f9b[_0x3d6465(0x167)])==null?void 0x0:_0x5d5528['filter'](_0x3e06dc=>_0x3e06dc['rangeType']===_0xd19589['CustomRangeType'][_0x3d6465(0x17a)])['map'](_0x1f010a=>_0x1f010a[_0x3d6465(0x1ca)]))!=null?_0x40f24c:[],_0xb89b88=JSON[_0x3d6465(0x19d)](_0xc20f9b),_0x78cea3=(await this[_0x3d6465(0x163)][_0x3d6465(0x1a5)](_0x49ec91))[_0x3d6465(0x1b8)]();if(_0x484ebe){const _0x4e6c35={'memberId':_0x78cea3,'unitId':_0x49ec91,'content':_0xb89b88,'mention':_0x53cc86,'threadId':_0x490aee},_0xeee47e=(await this[_0x3d6465(0x1ad)]['post'](_0x3d6465(0x16f)+_0x49ec91+_0x3d6465(0x1ac),{'body':_0x4e6c35}))[_0x3d6465(0x1b5)][_0x3d6465(0x16c)];return{..._0x4b4536,'id':_0xeee47e[_0x3d6465(0x1b7)],'dT':_0xd19589['dayjs'](+_0xeee47e['createTimestamp'])[_0x3d6465(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xeee47e[_0x3d6465(0x16d)]};}else{const _0x5d2ea1={'memberId':_0x78cea3,'unitId':_0x49ec91,'content':_0xb89b88,'mention':_0x53cc86},_0x295f49=await this[_0x3d6465(0x1ad)][_0x3d6465(0x1b0)](_0x3d6465(0x16f)+_0x49ec91+_0x3d6465(0x169),{'body':_0x5d2ea1});return _0x4bf53f(_0x295f49[_0x3d6465(0x1b5)]['comment'],_0x4b4536);}}async[_0xfcf55d(0x1dc)](_0x410686){const _0x467f70=_0xfcf55d;var _0xbe61fc,_0x26e82e;const {text:_0xedb227,unitId:_0xf608f9}=_0x410686,_0x9b3a5=(_0x26e82e=(_0xbe61fc=_0xedb227[_0x467f70(0x167)])==null?void 0x0:_0xbe61fc['filter'](_0x33eaca=>_0x33eaca[_0x467f70(0x1d3)]===_0xd19589['CustomRangeType']['COMMENT'])['map'](_0x524053=>_0x524053[_0x467f70(0x1ca)]))!=null?_0x26e82e:[],_0x2c0132=JSON[_0x467f70(0x19d)](_0xedb227),_0x3db96e=_0x410686[_0x467f70(0x15a)],_0x40cc12=_0x410686['id'],_0x2e7910={'memberId':(await this['_sessionService'][_0x467f70(0x1a5)](_0xf608f9))[_0x467f70(0x1b8)](),'unitId':_0xf608f9,'threadId':_0x3db96e,'mention':_0x9b3a5,'content':_0x2c0132,'replyId':_0x40cc12},_0x255aef=await this['_httpService'][_0x467f70(0x1b0)](_0x467f70(0x16f)+_0xf608f9+'/edit',{'body':_0x2e7910});return!_0x255aef['body']['error']||_0x255aef[_0x467f70(0x1b5)][_0x467f70(0x1c6)]['code']===0x1;}async[_0xfcf55d(0x1a9)](_0x34c2db){const _0x5220c4=_0xfcf55d,{unitId:_0x134437}=_0x34c2db,_0x1eac8b=_0x34c2db[_0x5220c4(0x15a)],_0x35f0c7={'memberId':this['_userService'][_0x5220c4(0x1cf)]()[_0x5220c4(0x177)],'unitId':_0x134437,'threadId':_0x1eac8b,'solved':_0x34c2db[_0x5220c4(0x1a8)]?_0xa67b23[_0x5220c4(0x164)]:_0xa67b23[_0x5220c4(0x1c9)]},_0x4d0bd4=await this[_0x5220c4(0x1ad)][_0x5220c4(0x1b0)]('/universer-api/comment/unit/'+_0x134437+_0x5220c4(0x1c1),{'body':_0x35f0c7});return!_0x4d0bd4['body'][_0x5220c4(0x1c6)]||_0x4d0bd4[_0x5220c4(0x1b5)]['error'][_0x5220c4(0x160)]===0x1;}async['deleteComment'](_0x4db55c,_0x20c560,_0x2189bc,_0x54aa66){const _0x15e535=_0xfcf55d,_0x57b319={'memberId':(await this[_0x15e535(0x163)]['requireSession'](_0x4db55c))['getMemberID'](),'threadId':_0x2189bc,'replyId':_0x54aa66,'unitId':_0x4db55c},_0x35e2fb=await this[_0x15e535(0x1ad)][_0x15e535(0x1b0)]('/universer-api/comment/unit/'+_0x4db55c+_0x15e535(0x173),{'body':_0x57b319});return!_0x35e2fb['body'][_0x15e535(0x1c6)]||_0x35e2fb['body'][_0x15e535(0x1c6)][_0x15e535(0x160)]===0x1;}async[_0xfcf55d(0x18c)](_0x5ab79c,_0x49c689,_0x168910){const _0x38466c=_0xfcf55d,_0x7c33b5={'unitId':_0x5ab79c,'threadId':_0x168910},_0x4d25d2=await this[_0x38466c(0x1ad)][_0x38466c(0x1b0)](_0x38466c(0x16f)+_0x5ab79c+_0x38466c(0x1a1),{'body':_0x7c33b5}),_0x4e10a2=_0x168910['map'](_0x3858c6=>_0x47d274(_0x4d25d2['body']['comments'][_0x3858c6],_0x5ab79c,_0x49c689))[_0x38466c(0x15b)](Boolean);return Object[_0x38466c(0x181)](_0x4d25d2['body'][_0x38466c(0x171)])['forEach'](_0x17c864=>{const _0x1e5459=_0x38466c;this[_0x1e5459(0x1a6)][_0x1e5459(0x1a2)](_0x17c864);}),_0x4e10a2;}[_0xfcf55d(0x189)](_0x4f1eaf){const _0x159aea=_0xfcf55d;return{'id':_0x4f1eaf['id'],'threadId':_0x4f1eaf[_0x159aea(0x15a)],'ref':_0x4f1eaf[_0x159aea(0x176)]};}};_0x4e6efe=_0x144496([_0x406750(0x0,_0xd19589[_0xfcf55d(0x183)](_0x3a4598[_0xfcf55d(0x1be)])),_0x406750(0x1,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1d4)])),_0x406750(0x2,_0xd19589[_0xfcf55d(0x183)](_0x50192b[_0xfcf55d(0x19f)]))],_0x4e6efe);var _0x3d7009=Object['getOwnPropertyDescriptor'],_0x44f3c4=(_0x55ece0,_0x11b5c0,_0x5221f3,_0x3e4cc6)=>{for(var _0x34de91=_0x3e4cc6>0x1?void 0x0:_0x3e4cc6?_0x3d7009(_0x11b5c0,_0x5221f3):_0x11b5c0,_0x49ac18=_0x55ece0['length']-0x1,_0x36b61c;_0x49ac18>=0x0;_0x49ac18--)(_0x36b61c=_0x55ece0[_0x49ac18])&&(_0x34de91=_0x36b61c(_0x34de91)||_0x34de91);return _0x34de91;},_0x21eb5f=(_0x14a501,_0x250d68)=>(_0x22a682,_0x5d9711)=>_0x250d68(_0x22a682,_0x5d9711,_0x14a501);let _0x4e316c=class extends _0xd19589[_0xfcf55d(0x1d2)]{constructor(_0x341908,_0x17f5b8){const _0x575838=_0xfcf55d;super(),this[_0x575838(0x15f)]=_0x341908,this[_0x575838(0x179)]=_0x17f5b8,this['_initDataSource']();}[_0xfcf55d(0x190)](){const _0x2dc6ac=_0xfcf55d;this[_0x2dc6ac(0x15f)]['dataSource']=this['_threadCommentDataSource'],this[_0x2dc6ac(0x15f)]['syncUpdateMutationToColla']=!0x1;}};_0x4e316c=_0x44f3c4([_0x21eb5f(0x0,_0xf14448[_0xfcf55d(0x195)]),_0x21eb5f(0x1,_0xd19589[_0xfcf55d(0x183)](_0x4e6efe))],_0x4e316c);var _0x442aba=Object[_0xfcf55d(0x1c8)],_0x4d4302=Object[_0xfcf55d(0x185)],_0x1ce4c0=(_0x2a6bac,_0x27e4d7,_0x38aad3)=>_0x27e4d7 in _0x2a6bac?_0x442aba(_0x2a6bac,_0x27e4d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38aad3}):_0x2a6bac[_0x27e4d7]=_0x38aad3,_0x5a4ad2=(_0xd5df8e,_0x4acab5,_0x1c5d5f,_0x7a790d)=>{for(var _0x18f887=_0x7a790d>0x1?void 0x0:_0x7a790d?_0x4d4302(_0x4acab5,_0x1c5d5f):_0x4acab5,_0x5c5336=_0xd5df8e['length']-0x1,_0x1e1584;_0x5c5336>=0x0;_0x5c5336--)(_0x1e1584=_0xd5df8e[_0x5c5336])&&(_0x18f887=_0x1e1584(_0x18f887)||_0x18f887);return _0x18f887;},_0xdb5df0=(_0x5b982f,_0x244341)=>(_0x47caa1,_0x238a19)=>_0x244341(_0x47caa1,_0x238a19,_0x5b982f),_0x4a35ae=(_0x4c5399,_0x1d47e2,_0x340b5d)=>_0x1ce4c0(_0x4c5399,typeof _0x1d47e2!=_0xfcf55d(0x1d0)?_0x1d47e2+'':_0x1d47e2,_0x340b5d);_0x498946[_0xfcf55d(0x1b9)]=class extends _0xd19589[_0xfcf55d(0x19a)]{constructor(_0x3da852=_0x1e6a65,_0x437775,_0x3dbe58){const _0x4cf8b0=_0xfcf55d;super(),this['_config']=_0x3da852,this[_0x4cf8b0(0x1b6)]=_0x437775,this[_0x4cf8b0(0x1d1)]=_0x3dbe58;const {..._0x3fa239}=_0xd19589[_0x4cf8b0(0x15d)]({},_0x1e6a65,this[_0x4cf8b0(0x182)]);this[_0x4cf8b0(0x1d1)][_0x4cf8b0(0x1c4)](_0x5ee21c,_0x3fa239);}[_0xfcf55d(0x1af)](){const _0x2be5c0=_0xfcf55d;[[_0x4e6efe],[_0x4e316c],[_0x496ab1]][_0x2be5c0(0x1bf)](_0x22021d=>{const _0x28831c=_0x2be5c0;this[_0x28831c(0x1b6)]['add'](_0x22021d);});}['onReady'](){const _0x3a7a49=_0xfcf55d;this[_0x3a7a49(0x1b6)]['get'](_0x4e316c),this[_0x3a7a49(0x1b6)]['get'](_0x496ab1);}},_0x4a35ae(_0x498946[_0xfcf55d(0x1b9)],_0xfcf55d(0x1cc),_0x12c6bd),_0x4a35ae(_0x498946[_0xfcf55d(0x1b9)],_0xfcf55d(0x19e),_0xd19589[_0xfcf55d(0x199)][_0xfcf55d(0x168)]),_0x498946[_0xfcf55d(0x1b9)]=_0x5a4ad2([_0xd19589[_0xfcf55d(0x1a3)](_0x47ef7c['UniverThreadCommentUIPlugin'],_0x50192b['UniverCollaborationClientPlugin'],_0x54c7b5[_0xfcf55d(0x174)]),_0xdb5df0(0x1,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1aa)])),_0xdb5df0(0x2,_0xd19589[_0xfcf55d(0x18f)])],_0x498946[_0xfcf55d(0x1b9)]),Object[_0xfcf55d(0x1c8)](_0x498946,Symbol[_0xfcf55d(0x175)],{'value':_0xfcf55d(0x1d6)});}));function _0x3960(_0x30b5d9,_0x5b6936){_0x30b5d9=_0x30b5d9-0x15a;const _0x3d7ced=_0x3d7c();let _0x396072=_0x3d7ced[_0x30b5d9];return _0x396072;}function _0x3d7c(){const _0x4c0843=['15xxgRpE','setConfig','user','error','_initUserSync','defineProperty','OpenOrReOpen','rangeId','197038qbQecU','pluginName','function','@univerjs/thread-comment','getCurrentUser','symbol','_configService','Disposable','rangeType','UserManagerService','exports','Module','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','thread-comment-data-source.config','Delete','updateComment','threadId','filter','UniverProLicense','merge','find','_threadCommentDataSourceService','code','subscribe','111853hPFHPc','_sessionService','Solved','UNRECOGNIZED','deleteComment','customRanges','UNIVER_UNKNOWN','/add','createTimestamp','length','reply','userId','1809068QtGhfa','/universer-api/comment/unit/','unitId','users','5948568ibVTqg','/delete','UniverLicensePlugin','toStringTag','ref','userID','getComment','_threadCommentDataSource','COMMENT','Solve','root','amd','@univerjs-pro/license','@univerjs-pro/collaboration-client','_init','values','_config','Inject','payload','getOwnPropertyDescriptor','Unknown','Edit','_commentService','saveCommentToSnapshot','2942510xRepFK','@univerjs/core','listComments','parse','1493370kOXYTr','IConfigService','_initDataSource','parentId','content','commentUpdate$','replies','IThreadCommentDataSourceService','_threadCommentModel','format','UniverThreadComment','UniverInstanceType','Plugin','bufferTime','256oSKjdW','stringify','type','CollaborationSessionService','map','/list','addUser','DependentOn','solved','requireSession','_userService','/universer-api/user/list','resolved','resolveComment','Injector','disposeWithMe','/reply','_httpService','YYYY/MM/DD\x20HH:mm','onStarting','post','224777Tbopsk','rxjs','UniverProCollaborationClient','UniverProThreadCommentDatasource','body','_injector','replyId','getMemberID','UniverThreadCommentDataSourcePlugin','Add','delete','getUnit','CommentService','HTTPService','forEach','dayjs','/solved','UniverThreadCommentUi'];_0x3d7c=function(){return _0x4c0843;};return _0x3d7c();}
|
|
1
|
+
function _0x1d47(){const _0x526205=['user','UniverThreadCommentDataSourcePlugin','defineProperty','1941597jjRLip','addComment','parse','Solved','forEach','onReady','content','UniverCollaborationClientPlugin','10UjQcSX','function','updateComment','type','_configService','replies','code','/universer-api/comment/unit/','pipe','createTimestamp','/add','/universer-api/user/list','Module','761718vsZgzY','format','_initUserSync','add','find','/list','HTTPService','merge','solved','_threadCommentModel','CommentService','rangeType','getOwnPropertyDescriptor','subscribe','UserManagerService','getComment','getMemberID','thread-comment-data-source.config','length','exports','_userService','296359yVblPy','UniverInstanceType','@univerjs-pro/license','saveCommentToSnapshot','pluginName','threadId','_injector','disposeWithMe','Disposable','payload','/solved','UniverThreadComment','resolveComment','UniverThreadCommentUIPlugin','customRanges','error','_config','reply','filter','comments','addUser','amd','_commentService','symbol','onStarting','@univerjs/thread-comment-ui','userID','personId','38960piiiQW','112AzaMgv','userId','unitId','Add','stringify','Reply','40700YiiGql','getCurrentUser','240GaaaMv','comment','DependentOn','_httpService','UNRECOGNIZED','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','UniverProLicense','map','/delete','CollaborationSessionService','UniverCore','Injector','delete','YYYY/MM/DD\x20HH:mm','root','getUnit','Inject','@univerjs/network','_threadCommentDataSource','Solve','2581928CqmJtH','Edit','rangeId','146556sQRBZL','ref','rxjs','get','commentUpdate$','syncUpdateMutationToColla','bufferTime','dayjs','_threadCommentDataSourceService','replyId','_sessionService','1628OlTBXP','COMMENT','post','UniverThreadCommentUi','users','_initDataSource','UniverProCollaborationClient','Delete','UniverNetwork','CustomRangeType','deleteComment','listComments','@univerjs/thread-comment','resolved','object','OpenOrReOpen','parentId','/reply','body','requireSession','3usuhFu'];_0x1d47=function(){return _0x526205;};return _0x1d47();}function _0x4087(_0x31160d,_0x547d67){_0x31160d=_0x31160d-0x135;const _0x1d47b8=_0x1d47();let _0x4087f0=_0x1d47b8[_0x31160d];return _0x4087f0;}(function(_0x49302e,_0x467924){const _0x576ef5=_0x4087,_0x10abdd=_0x49302e();while(!![]){try{const _0x39ddd9=-parseInt(_0x576ef5(0x156))/0x1+-parseInt(_0x576ef5(0x18e))/0x2+parseInt(_0x576ef5(0x13d))/0x3*(-parseInt(_0x576ef5(0x1a5))/0x4)+-parseInt(_0x576ef5(0x187))/0x5*(parseInt(_0x576ef5(0x190))/0x6)+parseInt(_0x576ef5(0x16b))/0x7*(parseInt(_0x576ef5(0x188))/0x8)+parseInt(_0x576ef5(0x141))/0x9*(-parseInt(_0x576ef5(0x149))/0xa)+-parseInt(_0x576ef5(0x1b3))/0xb*(-parseInt(_0x576ef5(0x1a8))/0xc);if(_0x39ddd9===_0x467924)break;else _0x10abdd['push'](_0x10abdd['shift']());}catch(_0x38425b){_0x10abdd['push'](_0x10abdd['shift']());}}}(_0x1d47,0x6cb5f),function(_0x5ed46b,_0x4af973){const _0x19f574=_0x4087;typeof exports==_0x19f574(0x137)&&typeof module<'u'?_0x4af973(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==_0x19f574(0x14a)&&define[_0x19f574(0x180)]?define([_0x19f574(0x169),_0x19f574(0x196),_0x19f574(0x16d),'@univerjs/core',_0x19f574(0x184),_0x19f574(0x135),_0x19f574(0x1aa),_0x19f574(0x1a2)],_0x4af973):(_0x5ed46b=typeof globalThis<'u'?globalThis:_0x5ed46b||self,_0x4af973(_0x5ed46b[_0x19f574(0x195)]={},_0x5ed46b[_0x19f574(0x1b9)],_0x5ed46b[_0x19f574(0x197)],_0x5ed46b[_0x19f574(0x19b)],_0x5ed46b[_0x19f574(0x1b6)],_0x5ed46b[_0x19f574(0x176)],_0x5ed46b['rxjs'],_0x5ed46b[_0x19f574(0x1bb)]));}(this,function(_0x49d9d0,_0x3f551b,_0x440cb5,_0x4fe06f,_0x54f791,_0x1e3f01,_0x3ca38b,_0x5d6bde){'use strict';const _0x6736aa=_0x4087;const _0x56c31e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x59ce22=(_0x3882d3=>(_0x3882d3[_0x3882d3['OpenOrReOpen']=0x0]=_0x6736aa(0x138),_0x3882d3[_0x3882d3['Solved']=0x1]=_0x6736aa(0x144),_0x3882d3[_0x3882d3[_0x6736aa(0x194)]=-0x1]=_0x6736aa(0x194),_0x3882d3))(_0x59ce22||{}),_0x1c27e3=(_0x296fe4=>(_0x296fe4[_0x296fe4['Unknown']=0x0]='Unknown',_0x296fe4[_0x296fe4[_0x6736aa(0x18b)]=0x1]=_0x6736aa(0x18b),_0x296fe4[_0x296fe4[_0x6736aa(0x18d)]=0x2]=_0x6736aa(0x18d),_0x296fe4[_0x296fe4[_0x6736aa(0x1a6)]=0x3]=_0x6736aa(0x1a6),_0x296fe4[_0x296fe4[_0x6736aa(0x1ba)]=0x4]=_0x6736aa(0x1ba),_0x296fe4[_0x296fe4['Solve']=0x5]=_0x6736aa(0x1a4),_0x296fe4[_0x296fe4[_0x6736aa(0x194)]=-0x1]=_0x6736aa(0x194),_0x296fe4))(_0x1c27e3||{});const _0x38a025=_0x212e95=>_0x4fe06f[_0x6736aa(0x1af)](new Date(+_0x212e95))[_0x6736aa(0x157)](_0x6736aa(0x19e)),_0x4b7d46=async(_0x3776d9,_0x5651b4)=>{const _0x1d02fc=_0x6736aa,_0xf64a32=_0x3776d9['get'](_0x4fe06f['UserManagerService']),_0x57cf63=_0x3776d9[_0x1d02fc(0x1ab)](_0x5d6bde[_0x1d02fc(0x15c)]);_0x5651b4[_0x1d02fc(0x145)](_0x5c34fe=>{const _0x484313=_0x1d02fc;_0xf64a32['getUser'](_0x5c34fe)&&_0x5651b4[_0x484313(0x19d)](_0x5c34fe);}),_0x5651b4['size']&&(await _0x57cf63[_0x1d02fc(0x1ab)](_0x1d02fc(0x154),{'params':{'userIDs':[..._0x5651b4]}}))['body'][_0x1d02fc(0x1b7)]['forEach'](_0x3de21c=>{const _0x1c7213=_0x1d02fc;_0x3de21c&&_0xf64a32[_0x1c7213(0x17f)](_0x3de21c);});};var _0x130ee3=Object[_0x6736aa(0x162)],_0x519187=(_0x1025b4,_0x338459,_0x17de55,_0x2b7874)=>{const _0xeadce8=_0x6736aa;for(var _0x2b7efa=_0x2b7874>0x1?void 0x0:_0x2b7874?_0x130ee3(_0x338459,_0x17de55):_0x338459,_0x12a4c0=_0x1025b4[_0xeadce8(0x168)]-0x1,_0x787621;_0x12a4c0>=0x0;_0x12a4c0--)(_0x787621=_0x1025b4[_0x12a4c0])&&(_0x2b7efa=_0x787621(_0x2b7efa)||_0x2b7efa);return _0x2b7efa;},_0x5d16ca=(_0x2aaace,_0xe6ae6c)=>(_0x244d3b,_0x1fd9fd)=>_0xe6ae6c(_0x244d3b,_0x1fd9fd,_0x2aaace);let _0x4be7f0=class extends _0x4fe06f[_0x6736aa(0x173)]{constructor(_0x23f436,_0x574643,_0xe221a3,_0x2d7070){const _0xcb0d8c=_0x6736aa;super(),this[_0xcb0d8c(0x181)]=_0x23f436,this['_threadCommentModel']=_0x574643,this[_0xcb0d8c(0x16a)]=_0xe221a3,this[_0xcb0d8c(0x171)]=_0x2d7070,this['_init'](),this[_0xcb0d8c(0x158)]();}['_initUserSync'](){const _0x2e610d=_0x6736aa;this[_0x2e610d(0x172)](this[_0x2e610d(0x15f)][_0x2e610d(0x1ac)][_0x2e610d(0x151)](_0x3ca38b[_0x2e610d(0x1ae)](0x10))[_0x2e610d(0x163)](_0x3e36b2=>{const _0x5e9012=_0x2e610d,_0x4f7834=new Set();_0x3e36b2[_0x5e9012(0x145)](_0x1c0676=>{const _0x33abde=_0x5e9012;if(_0x1c0676[_0x33abde(0x14c)]==='add'){const _0x1aaa6f=_0x1c0676[_0x33abde(0x174)][_0x33abde(0x186)];_0x4f7834[_0x33abde(0x159)](_0x1aaa6f);}}),_0x4b7d46(this[_0x5e9012(0x171)],_0x4f7834);}));}['_init'](){const _0x49d218=_0x6736aa;this[_0x49d218(0x172)](this[_0x49d218(0x181)][_0x49d218(0x1ac)]['subscribe'](async _0x144f8a=>{const _0x3e2eaa=_0x49d218;var _0x5da06e,_0x32eabc,_0x1df3e1,_0x2c8c21;const _0x2213f1=(_0x5da06e=this['_threadCommentModel'][_0x3e2eaa(0x1a0)](_0x144f8a[_0x3e2eaa(0x18a)])[_0x3e2eaa(0x15a)](_0x49137b=>_0x49137b[_0x3e2eaa(0x170)]===_0x144f8a[_0x3e2eaa(0x170)]))==null?void 0x0:_0x5da06e[_0x3e2eaa(0x19f)];if(!_0x2213f1)return;const {unitId:_0x1e94d4,subUnitId:_0xd0deb5}=_0x2213f1;switch(_0x144f8a[_0x3e2eaa(0x13e)]&&this[_0x3e2eaa(0x16a)][_0x3e2eaa(0x17f)](_0x144f8a[_0x3e2eaa(0x13e)]),_0x144f8a['type']){case _0x1c27e3['Add']:break;case _0x1c27e3['Reply']:{this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x142)](_0x1e94d4,_0xd0deb5,{'unitId':_0x1e94d4,'subUnitId':_0xd0deb5,'ref':'','id':_0x144f8a['replyId'],'dT':_0x38a025(+_0x144f8a[_0x3e2eaa(0x152)]),'threadId':_0x144f8a[_0x3e2eaa(0x170)],'personId':(_0x1df3e1=(_0x32eabc=_0x144f8a[_0x3e2eaa(0x13e)])==null?void 0x0:_0x32eabc[_0x3e2eaa(0x185)])!=null?_0x1df3e1:_0x144f8a[_0x3e2eaa(0x189)],'text':JSON[_0x3e2eaa(0x143)](_0x144f8a[_0x3e2eaa(0x147)]),'parentId':_0x2213f1['id']});break;}case _0x1c27e3[_0x3e2eaa(0x1ba)]:{const _0x159895=this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x165)](_0x1e94d4,_0xd0deb5,_0x144f8a[_0x3e2eaa(0x1b1)]);_0x159895&&_0x159895[_0x3e2eaa(0x139)]&&this['_threadCommentModel'][_0x3e2eaa(0x1bd)](_0x1e94d4,_0xd0deb5,_0x144f8a['replyId']);break;}case _0x1c27e3[_0x3e2eaa(0x1a6)]:{this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x14b)](_0x1e94d4,_0xd0deb5,{'commentId':_0x144f8a[_0x3e2eaa(0x1b1)],'text':JSON[_0x3e2eaa(0x143)](_0x144f8a[_0x3e2eaa(0x147)])});break;}case _0x1c27e3[_0x3e2eaa(0x1a4)]:{const _0x2f6214=(_0x2c8c21=this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x1a0)](_0x144f8a[_0x3e2eaa(0x18a)])[_0x3e2eaa(0x15a)](_0x58afec=>_0x58afec[_0x3e2eaa(0x170)]===_0x144f8a[_0x3e2eaa(0x170)]))==null?void 0x0:_0x2c8c21[_0x3e2eaa(0x19f)];_0x2f6214&&this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x177)](_0x1e94d4,_0xd0deb5,_0x2f6214['id'],_0x144f8a[_0x3e2eaa(0x15e)]===_0x59ce22[_0x3e2eaa(0x144)]);break;}}}));}};_0x4be7f0=_0x519187([_0x5d16ca(0x0,_0x4fe06f['Inject'](_0x3f551b[_0x6736aa(0x160)])),_0x5d16ca(0x1,_0x4fe06f['Inject'](_0x1e3f01['ThreadCommentModel'])),_0x5d16ca(0x2,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f[_0x6736aa(0x164)])),_0x5d16ca(0x3,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f['Injector']))],_0x4be7f0);const _0x54c8e2=_0x6736aa(0x167),_0x438838={};var _0x5ed805=Object[_0x6736aa(0x162)],_0x51a55c=(_0x43ef4e,_0x290fa8,_0x134939,_0x4d6c29)=>{const _0x41ed2f=_0x6736aa;for(var _0xbf9309=_0x4d6c29>0x1?void 0x0:_0x4d6c29?_0x5ed805(_0x290fa8,_0x134939):_0x290fa8,_0x27d9dd=_0x43ef4e[_0x41ed2f(0x168)]-0x1,_0x20840e;_0x27d9dd>=0x0;_0x27d9dd--)(_0x20840e=_0x43ef4e[_0x27d9dd])&&(_0xbf9309=_0x20840e(_0xbf9309)||_0xbf9309);return _0xbf9309;},_0x4b82ef=(_0x335a4e,_0x3ed867)=>(_0x10bfb6,_0x11ceea)=>_0x3ed867(_0x10bfb6,_0x11ceea,_0x335a4e);function _0x2d0a7e(_0x376d71,_0x5cf0c3){const _0x1a1042=_0x6736aa,_0x391af1=_0x376d71[_0x1a1042(0x14e)][0x0];return{..._0x5cf0c3,'id':_0x391af1[_0x1a1042(0x1b1)],'resolved':_0x376d71[_0x1a1042(0x15e)]===0x1,'dT':_0x38a025(_0x391af1['createTimestamp']),'personId':_0x391af1[_0x1a1042(0x189)],'threadId':_0x391af1[_0x1a1042(0x170)]};}function _0x921182(_0x3f5f75,_0x49bd1e,_0x1bd971){const _0x601726=_0x6736aa;var _0x616c3b,_0x42b94e;if(((_0x42b94e=(_0x616c3b=_0x3f5f75==null?void 0x0:_0x3f5f75[_0x601726(0x14e)])==null?void 0x0:_0x616c3b['length'])!=null?_0x42b94e:0x0)>0x0){const _0x177f9c=(_0x74ea34,_0x1ac6e2)=>({'id':_0x74ea34['replyId'],'threadId':_0x74ea34['threadId'],'dT':_0x38a025(_0x74ea34['createTimestamp']),'personId':_0x74ea34[_0x601726(0x189)],'resolved':_0x3f5f75[_0x601726(0x15e)]===_0x59ce22['Solved'],'unitId':_0x49bd1e,'subUnitId':_0x1bd971,'text':JSON[_0x601726(0x143)](_0x74ea34['content']),'parentId':_0x1ac6e2}),_0xf1409e=_0x177f9c(_0x3f5f75[_0x601726(0x14e)][0x0]);return{..._0xf1409e,'children':_0x3f5f75[_0x601726(0x14e)]['slice'](0x1)[_0x601726(0x198)](_0x29bcd2=>_0x177f9c(_0x29bcd2,_0xf1409e['id']))};}return null;}let _0x2baa26=class{constructor(_0x5d2f19,_0x30fc30,_0x5f17ed){const _0x70d3a9=_0x6736aa;this['_httpService']=_0x5d2f19,this[_0x70d3a9(0x16a)]=_0x30fc30,this[_0x70d3a9(0x1b2)]=_0x5f17ed;}async['addComment'](_0x235877){const _0x600b12=_0x6736aa;var _0x4f6199,_0x2c3793;const {parentId:_0x1d6197,unitId:_0x4c90b4,text:_0x2a8f3e,threadId:_0x4f0392}=_0x235877,_0x38142e=(_0x2c3793=(_0x4f6199=_0x2a8f3e[_0x600b12(0x179)])==null?void 0x0:_0x4f6199[_0x600b12(0x17d)](_0x4c8bbc=>_0x4c8bbc[_0x600b12(0x161)]===_0x4fe06f['CustomRangeType']['COMMENT'])[_0x600b12(0x198)](_0x1e0a10=>_0x1e0a10[_0x600b12(0x1a7)]))!=null?_0x2c3793:[],_0x2cfb7a=JSON[_0x600b12(0x18c)](_0x2a8f3e),_0x47f7e7=(await this[_0x600b12(0x1b2)][_0x600b12(0x13c)](_0x4c90b4))[_0x600b12(0x166)]();if(_0x1d6197){const _0x1ea1a4={'memberId':_0x47f7e7,'unitId':_0x4c90b4,'content':_0x2cfb7a,'mention':_0x38142e,'threadId':_0x4f0392},_0x4514ca=(await this[_0x600b12(0x193)]['post'](_0x600b12(0x150)+_0x4c90b4+_0x600b12(0x13a),{'body':_0x1ea1a4}))['body'][_0x600b12(0x17c)];return{..._0x235877,'id':_0x4514ca[_0x600b12(0x1b1)],'dT':_0x4fe06f['dayjs'](+_0x4514ca[_0x600b12(0x152)])[_0x600b12(0x157)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4514ca['userId']};}else{const _0x44a0c4={'memberId':_0x47f7e7,'unitId':_0x4c90b4,'content':_0x2cfb7a,'mention':_0x38142e},_0x37cc02=await this[_0x600b12(0x193)][_0x600b12(0x1b5)](_0x600b12(0x150)+_0x4c90b4+_0x600b12(0x153),{'body':_0x44a0c4});return _0x2d0a7e(_0x37cc02[_0x600b12(0x13b)][_0x600b12(0x191)],_0x235877);}}async[_0x6736aa(0x14b)](_0x2a4959){const _0x17b6e0=_0x6736aa;var _0x2d4469,_0x5da2b4;const {text:_0xafad1a,unitId:_0x5cacc1}=_0x2a4959,_0x424ed1=(_0x5da2b4=(_0x2d4469=_0xafad1a[_0x17b6e0(0x179)])==null?void 0x0:_0x2d4469[_0x17b6e0(0x17d)](_0x147077=>_0x147077[_0x17b6e0(0x161)]===_0x4fe06f[_0x17b6e0(0x1bc)][_0x17b6e0(0x1b4)])[_0x17b6e0(0x198)](_0x3fb01d=>_0x3fb01d[_0x17b6e0(0x1a7)]))!=null?_0x5da2b4:[],_0x604f0=JSON[_0x17b6e0(0x18c)](_0xafad1a),_0x59ab49=_0x2a4959[_0x17b6e0(0x170)],_0x2c85d0=_0x2a4959['id'],_0x3011f2={'memberId':(await this[_0x17b6e0(0x1b2)]['requireSession'](_0x5cacc1))['getMemberID'](),'unitId':_0x5cacc1,'threadId':_0x59ab49,'mention':_0x424ed1,'content':_0x604f0,'replyId':_0x2c85d0},_0x356420=await this[_0x17b6e0(0x193)][_0x17b6e0(0x1b5)](_0x17b6e0(0x150)+_0x5cacc1+'/edit',{'body':_0x3011f2});return!_0x356420[_0x17b6e0(0x13b)][_0x17b6e0(0x17a)]||_0x356420[_0x17b6e0(0x13b)][_0x17b6e0(0x17a)][_0x17b6e0(0x14f)]===0x1;}async[_0x6736aa(0x177)](_0x440ffd){const _0x2831fb=_0x6736aa,{unitId:_0x5ddfb8}=_0x440ffd,_0x3a7e4c=_0x440ffd[_0x2831fb(0x170)],_0x222c5f={'memberId':this[_0x2831fb(0x16a)][_0x2831fb(0x18f)]()[_0x2831fb(0x185)],'unitId':_0x5ddfb8,'threadId':_0x3a7e4c,'solved':_0x440ffd[_0x2831fb(0x136)]?_0x59ce22[_0x2831fb(0x144)]:_0x59ce22[_0x2831fb(0x138)]},_0x2ad333=await this[_0x2831fb(0x193)][_0x2831fb(0x1b5)]('/universer-api/comment/unit/'+_0x5ddfb8+_0x2831fb(0x175),{'body':_0x222c5f});return!_0x2ad333[_0x2831fb(0x13b)]['error']||_0x2ad333[_0x2831fb(0x13b)][_0x2831fb(0x17a)][_0x2831fb(0x14f)]===0x1;}async[_0x6736aa(0x1bd)](_0x1b741e,_0x328642,_0x2785ae,_0x49c029){const _0x130167=_0x6736aa,_0x5b7d19={'memberId':(await this[_0x130167(0x1b2)]['requireSession'](_0x1b741e))['getMemberID'](),'threadId':_0x2785ae,'replyId':_0x49c029,'unitId':_0x1b741e},_0x228d28=await this[_0x130167(0x193)][_0x130167(0x1b5)](_0x130167(0x150)+_0x1b741e+_0x130167(0x199),{'body':_0x5b7d19});return!_0x228d28['body'][_0x130167(0x17a)]||_0x228d28[_0x130167(0x13b)][_0x130167(0x17a)]['code']===0x1;}async[_0x6736aa(0x1be)](_0x36e5d5,_0x48a751,_0x580ce0){const _0x180ccf=_0x6736aa,_0x53d613={'unitId':_0x36e5d5,'threadId':_0x580ce0},_0x187a4e=await this[_0x180ccf(0x193)][_0x180ccf(0x1b5)](_0x180ccf(0x150)+_0x36e5d5+_0x180ccf(0x15b),{'body':_0x53d613}),_0x57da0b=_0x580ce0[_0x180ccf(0x198)](_0x26c47e=>_0x921182(_0x187a4e[_0x180ccf(0x13b)][_0x180ccf(0x17e)][_0x26c47e],_0x36e5d5,_0x48a751))['filter'](Boolean);return Object['values'](_0x187a4e['body']['users'])[_0x180ccf(0x145)](_0x40a675=>{const _0x3c569e=_0x180ccf;this[_0x3c569e(0x16a)]['addUser'](_0x40a675);}),_0x57da0b;}[_0x6736aa(0x16e)](_0x47ae28){const _0x3f69c9=_0x6736aa;return{'id':_0x47ae28['id'],'threadId':_0x47ae28[_0x3f69c9(0x170)],'ref':_0x47ae28[_0x3f69c9(0x1a9)]};}};_0x2baa26=_0x51a55c([_0x4b82ef(0x0,_0x4fe06f[_0x6736aa(0x1a1)](_0x5d6bde[_0x6736aa(0x15c)])),_0x4b82ef(0x1,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f[_0x6736aa(0x164)])),_0x4b82ef(0x2,_0x4fe06f[_0x6736aa(0x1a1)](_0x3f551b[_0x6736aa(0x19a)]))],_0x2baa26);var _0x3e5146=Object[_0x6736aa(0x162)],_0x52cab3=(_0x217c01,_0xbd1b83,_0x1afa07,_0x5777bc)=>{for(var _0x560292=_0x5777bc>0x1?void 0x0:_0x5777bc?_0x3e5146(_0xbd1b83,_0x1afa07):_0xbd1b83,_0x4b1f5a=_0x217c01['length']-0x1,_0x11eb3e;_0x4b1f5a>=0x0;_0x4b1f5a--)(_0x11eb3e=_0x217c01[_0x4b1f5a])&&(_0x560292=_0x11eb3e(_0x560292)||_0x560292);return _0x560292;},_0x181612=(_0x653374,_0x8d9cc2)=>(_0x147275,_0x28d89a)=>_0x8d9cc2(_0x147275,_0x28d89a,_0x653374);let _0x5bfd8c=class extends _0x4fe06f[_0x6736aa(0x173)]{constructor(_0x2360e2,_0xe9c32e){const _0x401dbc=_0x6736aa;super(),this[_0x401dbc(0x1b0)]=_0x2360e2,this[_0x401dbc(0x1a3)]=_0xe9c32e,this[_0x401dbc(0x1b8)]();}[_0x6736aa(0x1b8)](){const _0x31cbe4=_0x6736aa;this[_0x31cbe4(0x1b0)]['dataSource']=this['_threadCommentDataSource'],this[_0x31cbe4(0x1b0)][_0x31cbe4(0x1ad)]=!0x1;}};_0x5bfd8c=_0x52cab3([_0x181612(0x0,_0x1e3f01['IThreadCommentDataSourceService']),_0x181612(0x1,_0x4fe06f[_0x6736aa(0x1a1)](_0x2baa26))],_0x5bfd8c);var _0x4aee73=Object[_0x6736aa(0x140)],_0x105302=Object[_0x6736aa(0x162)],_0x58450d=(_0x504751,_0x340921,_0x1f0908)=>_0x340921 in _0x504751?_0x4aee73(_0x504751,_0x340921,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f0908}):_0x504751[_0x340921]=_0x1f0908,_0x5c856b=(_0x1032eb,_0x15fbf5,_0xa9f7af,_0x4a66bb)=>{for(var _0x28babe=_0x4a66bb>0x1?void 0x0:_0x4a66bb?_0x105302(_0x15fbf5,_0xa9f7af):_0x15fbf5,_0x34725e=_0x1032eb['length']-0x1,_0x50c1eb;_0x34725e>=0x0;_0x34725e--)(_0x50c1eb=_0x1032eb[_0x34725e])&&(_0x28babe=_0x50c1eb(_0x28babe)||_0x28babe);return _0x28babe;},_0x319192=(_0x5c20fe,_0x37d768)=>(_0x1797ae,_0x338610)=>_0x37d768(_0x1797ae,_0x338610,_0x5c20fe),_0x5946f7=(_0x1d2f33,_0x3bd1c8,_0x55886b)=>_0x58450d(_0x1d2f33,typeof _0x3bd1c8!=_0x6736aa(0x182)?_0x3bd1c8+'':_0x3bd1c8,_0x55886b);_0x49d9d0[_0x6736aa(0x13f)]=class extends _0x4fe06f['Plugin']{constructor(_0x566bcb=_0x438838,_0x7c444,_0x420d60){const _0x3ac20e=_0x6736aa;super(),this[_0x3ac20e(0x17b)]=_0x566bcb,this[_0x3ac20e(0x171)]=_0x7c444,this[_0x3ac20e(0x14d)]=_0x420d60;const {..._0x68044a}=_0x4fe06f[_0x3ac20e(0x15d)]({},_0x438838,this[_0x3ac20e(0x17b)]);this['_configService']['setConfig'](_0x54c8e2,_0x68044a);}[_0x6736aa(0x183)](){[[_0x2baa26],[_0x5bfd8c],[_0x4be7f0]]['forEach'](_0x1acba8=>{const _0x2ffcc7=_0x4087;this[_0x2ffcc7(0x171)][_0x2ffcc7(0x159)](_0x1acba8);});}[_0x6736aa(0x146)](){this['_injector']['get'](_0x5bfd8c),this['_injector']['get'](_0x4be7f0);}},_0x5946f7(_0x49d9d0[_0x6736aa(0x13f)],_0x6736aa(0x16f),_0x56c31e),_0x5946f7(_0x49d9d0[_0x6736aa(0x13f)],'type',_0x4fe06f[_0x6736aa(0x16c)]['UNIVER_UNKNOWN']),_0x49d9d0[_0x6736aa(0x13f)]=_0x5c856b([_0x4fe06f[_0x6736aa(0x192)](_0x54f791[_0x6736aa(0x178)],_0x3f551b[_0x6736aa(0x148)],_0x440cb5['UniverLicensePlugin']),_0x319192(0x1,_0x4fe06f['Inject'](_0x4fe06f[_0x6736aa(0x19c)])),_0x319192(0x2,_0x4fe06f['IConfigService'])],_0x49d9d0[_0x6736aa(0x13f)]),Object['defineProperty'](_0x49d9d0,Symbol['toStringTag'],{'value':_0x6736aa(0x155)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.
|
|
3
|
+
"version": "0.15.0-insiders.20260110-48b77c8",
|
|
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.15.0-insiders.
|
|
49
|
-
"@univerjs-pro/license": "0.15.0-insiders.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260110-48b77c8",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260110-48b77c8",
|
|
50
|
+
"@univerjs/network": "0.15.0-insiders.20260110-48b77c8",
|
|
51
|
+
"@univerjs/core": "0.15.0-insiders.20260110-48b77c8",
|
|
52
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260110-48b77c8",
|
|
52
53
|
"@univerjs/protocol": "0.1.48",
|
|
53
|
-
"@univerjs/thread-comment": "0.15.0-insiders.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260108-7b9120d"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260110-48b77c8"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|