@univerjs-pro/thread-comment-datasource 0.16.0 → 0.16.1
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x79121e=_0x479c;(function(_0x30ed0f,_0x1d6395){const _0x1ef56a=_0x479c,_0x59982c=_0x30ed0f();while(!![]){try{const _0x4b4d69=-parseInt(_0x1ef56a(0x1ad))/0x1+parseInt(_0x1ef56a(0x1bd))/0x2+parseInt(_0x1ef56a(0x1a6))/0x3*(parseInt(_0x1ef56a(0x1d1))/0x4)+-parseInt(_0x1ef56a(0x1df))/0x5*(parseInt(_0x1ef56a(0x203))/0x6)+-parseInt(_0x1ef56a(0x1f9))/0x7+parseInt(_0x1ef56a(0x20d))/0x8+-parseInt(_0x1ef56a(0x1f5))/0x9*(-parseInt(_0x1ef56a(0x1b2))/0xa);if(_0x4b4d69===_0x1d6395)break;else _0x59982c['push'](_0x59982c['shift']());}catch(_0x24d1ce){_0x59982c['push'](_0x59982c['shift']());}}}(_0x46a9,0x98c46));function _0x46a9(){const _0x3f5857=['syncUpdateMutationToColla','_userService','Module','dataSource','_init','1087780jhnklr','listComments','Unknown','merge','subscribe','282350pdazoi','Reply','requireSession','_injector','getMemberID','getOwnPropertyDescriptor','resolveComment','personId','OpenOrReOpen','DependentOn','payload','1119676PmpPFq','/universer-api/user/list','userID','getComment','/list','Plugin','values','_config','UserManagerService','filter','UNRECOGNIZED','userId','CollaborationSessionService','_threadCommentDataSourceService','HTTPService','addComment','replies','UniverThreadCommentDataSourcePlugin','commentUpdate$','deleteComment','923004OexVZW','_initUserSync','_threadCommentModel','size','/edit','Delete','find','YYYY/MM/DD\x20HH:mm','length','parse','updateComment','stringify','type','ThreadCommentModel','5WaiWGT','content','getUnit','saveCommentToSnapshot','solved','_threadCommentDataSource','CustomRangeType','getUser','post','body','format','UniverInstanceType','Inject','Add','get','createTimestamp','_sessionService','slice','add','map','comments','users','315Epbvjc','/reply','_httpService','Solved','1674729QNcLvh','bufferTime','onReady','pipe','unitId','_initDataSource','rangeType','customRanges','_configService','defineProperty','731166sUtoZH','rangeId','addUser','/add','/universer-api/comment/unit/','replyId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUIPlugin','Injector','code','520456lfKWNH','_commentService','user','disposeWithMe','CommentService','threadId','/delete','UniverCollaborationClientPlugin','toStringTag','forEach','dayjs','error','parentId','COMMENT','Solve','onStarting','setConfig','6zjoGjG','root'];_0x46a9=function(){return _0x3f5857;};return _0x46a9();}Object['defineProperty'](exports,Symbol[_0x79121e(0x19d)],{'value':_0x79121e(0x1aa)});function _0x479c(_0x6340a5,_0x359f30){_0x6340a5=_0x6340a5-0x19b;const _0x46a9ce=_0x46a9();let _0x479ca3=_0x46a9ce[_0x6340a5];return _0x479ca3;}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=_0x79121e(0x209);var I=(_0x40ba32=>(_0x40ba32[_0x40ba32['OpenOrReOpen']=0x0]=_0x79121e(0x1ba),_0x40ba32[_0x40ba32[_0x79121e(0x1f8)]=0x1]=_0x79121e(0x1f8),_0x40ba32[_0x40ba32[_0x79121e(0x1c7)]=-0x1]=_0x79121e(0x1c7),_0x40ba32))(I||{}),v=(_0x592b3f=>(_0x592b3f[_0x592b3f[_0x79121e(0x1af)]=0x0]=_0x79121e(0x1af),_0x592b3f[_0x592b3f[_0x79121e(0x1ec)]=0x1]=_0x79121e(0x1ec),_0x592b3f[_0x592b3f['Reply']=0x2]=_0x79121e(0x1b3),_0x592b3f[_0x592b3f['Edit']=0x3]='Edit',_0x592b3f[_0x592b3f[_0x79121e(0x1d6)]=0x4]=_0x79121e(0x1d6),_0x592b3f[_0x592b3f[_0x79121e(0x1a3)]=0x5]=_0x79121e(0x1a3),_0x592b3f[_0x592b3f[_0x79121e(0x1c7)]=-0x1]=_0x79121e(0x1c7),_0x592b3f))(v||{});const f=_0x582460=>c[_0x79121e(0x19f)](new Date(+_0x582460))[_0x79121e(0x1e9)](_0x79121e(0x1d8)),R=async(_0x4e3041,_0xea9010)=>{const _0x2c44a1=_0x79121e,_0x452570=_0x4e3041['get'](c[_0x2c44a1(0x1c5)]),_0x41d6ca=_0x4e3041[_0x2c44a1(0x1ed)](P['HTTPService']);_0xea9010[_0x2c44a1(0x19e)](_0x4d28c8=>{const _0x2c2c18=_0x2c44a1;_0x452570[_0x2c2c18(0x1e6)](_0x4d28c8)&&_0xea9010['delete'](_0x4d28c8);}),_0xea9010[_0x2c44a1(0x1d4)]&&(await _0x41d6ca[_0x2c44a1(0x1ed)](_0x2c44a1(0x1be),{'params':{'userIDs':[..._0xea9010]}}))[_0x2c44a1(0x1e8)]['users']['forEach'](_0x2aa5f7=>{const _0x40e412=_0x2c44a1;_0x2aa5f7&&_0x452570[_0x40e412(0x205)](_0x2aa5f7);});};var $=Object[_0x79121e(0x1b7)],E=(_0x2a98e1,_0x1eb9f2,_0x394122,_0x1db45a)=>{const _0x507493=_0x79121e;for(var _0x1700a8=_0x1db45a>0x1?void 0x0:_0x1db45a?$(_0x1eb9f2,_0x394122):_0x1eb9f2,_0x12e9fb=_0x2a98e1[_0x507493(0x1d9)]-0x1,_0x489005;_0x12e9fb>=0x0;_0x12e9fb--)(_0x489005=_0x2a98e1[_0x12e9fb])&&(_0x1700a8=_0x489005(_0x1700a8)||_0x1700a8);return _0x1700a8;},S=(_0x14306f,_0x18fcfc)=>(_0x4725ae,_0x315658)=>_0x18fcfc(_0x4725ae,_0x315658,_0x14306f);let _=class extends c['Disposable']{constructor(_0x29c658,_0x55ea4f,_0x1adfbe,_0x32de8b){const _0x1367d1=_0x79121e;super(),this[_0x1367d1(0x20e)]=_0x29c658,this[_0x1367d1(0x1d3)]=_0x55ea4f,this['_userService']=_0x1adfbe,this[_0x1367d1(0x1b5)]=_0x32de8b,this[_0x1367d1(0x1ac)](),this[_0x1367d1(0x1d2)]();}[_0x79121e(0x1d2)](){const _0x583c79=_0x79121e;this[_0x583c79(0x210)](this[_0x583c79(0x1d3)][_0x583c79(0x1cf)][_0x583c79(0x1fc)](j[_0x583c79(0x1fa)](0x10))[_0x583c79(0x1b1)](_0x462e27=>{const _0x47584f=_0x583c79,_0x43cc3c=new Set();_0x462e27[_0x47584f(0x19e)](_0x53349d=>{const _0x23c2be=_0x47584f;if(_0x53349d['type']===_0x23c2be(0x1f1)){const _0x302cde=_0x53349d[_0x23c2be(0x1bc)][_0x23c2be(0x1b9)];_0x43cc3c[_0x23c2be(0x1f1)](_0x302cde);}}),R(this[_0x47584f(0x1b5)],_0x43cc3c);}));}[_0x79121e(0x1ac)](){const _0x29d64b=_0x79121e;this['disposeWithMe'](this[_0x29d64b(0x20e)][_0x29d64b(0x1cf)][_0x29d64b(0x1b1)](async _0x5afc42=>{const _0x3e238d=_0x29d64b;var _0x299440,_0x5626de,_0x291b58,_0xcab014;const _0x1f1a5f=(_0x299440=this[_0x3e238d(0x1d3)][_0x3e238d(0x1e1)](_0x5afc42[_0x3e238d(0x1fd)])[_0x3e238d(0x1d7)](_0x510ced=>_0x510ced[_0x3e238d(0x212)]===_0x5afc42[_0x3e238d(0x212)]))==null?void 0x0:_0x299440['root'];if(!_0x1f1a5f)return;const {unitId:_0xe17eb4,subUnitId:_0x21811f}=_0x1f1a5f;switch(_0x5afc42[_0x3e238d(0x20f)]&&this[_0x3e238d(0x1a9)][_0x3e238d(0x205)](_0x5afc42['user']),_0x5afc42[_0x3e238d(0x1dd)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0xe17eb4,_0x21811f,{'unitId':_0xe17eb4,'subUnitId':_0x21811f,'ref':'','id':_0x5afc42['replyId'],'dT':f(+_0x5afc42['createTimestamp']),'threadId':_0x5afc42['threadId'],'personId':(_0x291b58=(_0x5626de=_0x5afc42[_0x3e238d(0x20f)])==null?void 0x0:_0x5626de[_0x3e238d(0x1bf)])!=null?_0x291b58:_0x5afc42[_0x3e238d(0x1c8)],'text':JSON[_0x3e238d(0x1da)](_0x5afc42[_0x3e238d(0x1e0)]),'parentId':_0x1f1a5f['id']});break;}case v[_0x3e238d(0x1d6)]:{const _0x2c5f13=this['_threadCommentModel'][_0x3e238d(0x1c0)](_0xe17eb4,_0x21811f,_0x5afc42[_0x3e238d(0x208)]);_0x2c5f13&&_0x2c5f13[_0x3e238d(0x1a1)]&&this[_0x3e238d(0x1d3)]['deleteComment'](_0xe17eb4,_0x21811f,_0x5afc42['replyId']);break;}case v['Edit']:{this[_0x3e238d(0x1d3)][_0x3e238d(0x1db)](_0xe17eb4,_0x21811f,{'commentId':_0x5afc42[_0x3e238d(0x208)],'text':JSON[_0x3e238d(0x1da)](_0x5afc42[_0x3e238d(0x1e0)])});break;}case v[_0x3e238d(0x1a3)]:{const _0x32d2d9=(_0xcab014=this[_0x3e238d(0x1d3)]['getUnit'](_0x5afc42[_0x3e238d(0x1fd)])[_0x3e238d(0x1d7)](_0x2b2f11=>_0x2b2f11['threadId']===_0x5afc42[_0x3e238d(0x212)]))==null?void 0x0:_0xcab014[_0x3e238d(0x1a7)];_0x32d2d9&&this[_0x3e238d(0x1d3)]['resolveComment'](_0xe17eb4,_0x21811f,_0x32d2d9['id'],_0x5afc42[_0x3e238d(0x1e3)]===I[_0x3e238d(0x1f8)]);break;}}}));}};_=E([S(0x0,c[_0x79121e(0x1eb)](b[_0x79121e(0x211)])),S(0x1,c[_0x79121e(0x1eb)](M[_0x79121e(0x1de)])),S(0x2,c[_0x79121e(0x1eb)](c[_0x79121e(0x1c5)])),S(0x3,c[_0x79121e(0x1eb)](c[_0x79121e(0x20b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x79121e(0x1b7)],x=(_0x3bfacc,_0x1c61bf,_0x630c5f,_0x517e23)=>{const _0x50f5b5=_0x79121e;for(var _0x5cbd9f=_0x517e23>0x1?void 0x0:_0x517e23?A(_0x1c61bf,_0x630c5f):_0x1c61bf,_0x53b2b7=_0x3bfacc[_0x50f5b5(0x1d9)]-0x1,_0x45465a;_0x53b2b7>=0x0;_0x53b2b7--)(_0x45465a=_0x3bfacc[_0x53b2b7])&&(_0x5cbd9f=_0x45465a(_0x5cbd9f)||_0x5cbd9f);return _0x5cbd9f;},C=(_0x28e9a9,_0x33d4a5)=>(_0x16ef13,_0x2cb8e4)=>_0x33d4a5(_0x16ef13,_0x2cb8e4,_0x28e9a9);function Y(_0x5d3c77,_0x288c26){const _0x299584=_0x79121e,_0x2418c5=_0x5d3c77[_0x299584(0x1cd)][0x0];return{..._0x288c26,'id':_0x2418c5[_0x299584(0x208)],'resolved':_0x5d3c77[_0x299584(0x1e3)]===0x1,'dT':f(_0x2418c5[_0x299584(0x1ee)]),'personId':_0x2418c5[_0x299584(0x1c8)],'threadId':_0x2418c5[_0x299584(0x212)]};}function G(_0x269a33,_0xf3461f,_0x53a13b){const _0x238fb9=_0x79121e;var _0x461647,_0x445dee;if(((_0x445dee=(_0x461647=_0x269a33==null?void 0x0:_0x269a33[_0x238fb9(0x1cd)])==null?void 0x0:_0x461647[_0x238fb9(0x1d9)])!=null?_0x445dee:0x0)>0x0){const _0x51b031=(_0x556907,_0x38bc1a)=>({'id':_0x556907['replyId'],'threadId':_0x556907[_0x238fb9(0x212)],'dT':f(_0x556907[_0x238fb9(0x1ee)]),'personId':_0x556907[_0x238fb9(0x1c8)],'resolved':_0x269a33['solved']===I[_0x238fb9(0x1f8)],'unitId':_0xf3461f,'subUnitId':_0x53a13b,'text':JSON[_0x238fb9(0x1da)](_0x556907[_0x238fb9(0x1e0)]),'parentId':_0x38bc1a}),_0x57935b=_0x51b031(_0x269a33['replies'][0x0]);return{..._0x57935b,'children':_0x269a33[_0x238fb9(0x1cd)][_0x238fb9(0x1f0)](0x1)['map'](_0x36fb87=>_0x51b031(_0x36fb87,_0x57935b['id']))};}return null;}let p=class{constructor(_0x1f8b8d,_0x4fad24,_0x2612c4){const _0x4c8bfb=_0x79121e;this[_0x4c8bfb(0x1f7)]=_0x1f8b8d,this[_0x4c8bfb(0x1a9)]=_0x4fad24,this[_0x4c8bfb(0x1ef)]=_0x2612c4;}async[_0x79121e(0x1cc)](_0x35a582){const _0x2b6a48=_0x79121e;var _0x30c1c4,_0x440f67;const {parentId:_0x15fca4,unitId:_0x3a77a4,text:_0x3ff7f2,threadId:_0x6f20d9}=_0x35a582,_0x3514d7=(_0x440f67=(_0x30c1c4=_0x3ff7f2[_0x2b6a48(0x200)])==null?void 0x0:_0x30c1c4[_0x2b6a48(0x1c6)](_0x181257=>_0x181257[_0x2b6a48(0x1ff)]===c[_0x2b6a48(0x1e5)][_0x2b6a48(0x1a2)])['map'](_0x1e26ff=>_0x1e26ff[_0x2b6a48(0x204)]))!=null?_0x440f67:[],_0x55f53f=JSON['stringify'](_0x3ff7f2),_0x273db9=(await this[_0x2b6a48(0x1ef)][_0x2b6a48(0x1b4)](_0x3a77a4))[_0x2b6a48(0x1b6)]();if(_0x15fca4){const _0x5852ae={'memberId':_0x273db9,'unitId':_0x3a77a4,'content':_0x55f53f,'mention':_0x3514d7,'threadId':_0x6f20d9},_0xf07921=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3a77a4+_0x2b6a48(0x1f6),{'body':_0x5852ae}))[_0x2b6a48(0x1e8)]['reply'];return{..._0x35a582,'id':_0xf07921[_0x2b6a48(0x208)],'dT':c[_0x2b6a48(0x19f)](+_0xf07921['createTimestamp'])[_0x2b6a48(0x1e9)](_0x2b6a48(0x1d8)),'personId':_0xf07921['userId']};}else{const _0x40cef9={'memberId':_0x273db9,'unitId':_0x3a77a4,'content':_0x55f53f,'mention':_0x3514d7},_0x52153b=await this[_0x2b6a48(0x1f7)][_0x2b6a48(0x1e7)]('/universer-api/comment/unit/'+_0x3a77a4+_0x2b6a48(0x206),{'body':_0x40cef9});return Y(_0x52153b[_0x2b6a48(0x1e8)]['comment'],_0x35a582);}}async[_0x79121e(0x1db)](_0x4e51d7){const _0x414d5d=_0x79121e;var _0x4a1d3d,_0x3a0cba;const {text:_0x5dcd63,unitId:_0x15b7ae}=_0x4e51d7,_0x194410=(_0x3a0cba=(_0x4a1d3d=_0x5dcd63[_0x414d5d(0x200)])==null?void 0x0:_0x4a1d3d[_0x414d5d(0x1c6)](_0x32227e=>_0x32227e[_0x414d5d(0x1ff)]===c[_0x414d5d(0x1e5)][_0x414d5d(0x1a2)])[_0x414d5d(0x1f2)](_0x191780=>_0x191780[_0x414d5d(0x204)]))!=null?_0x3a0cba:[],_0x1184d3=JSON[_0x414d5d(0x1dc)](_0x5dcd63),_0x58bc6a=_0x4e51d7[_0x414d5d(0x212)],_0x431bd6=_0x4e51d7['id'],_0x2e42dc={'memberId':(await this[_0x414d5d(0x1ef)][_0x414d5d(0x1b4)](_0x15b7ae))[_0x414d5d(0x1b6)](),'unitId':_0x15b7ae,'threadId':_0x58bc6a,'mention':_0x194410,'content':_0x1184d3,'replyId':_0x431bd6},_0x574bc0=await this[_0x414d5d(0x1f7)]['post'](_0x414d5d(0x207)+_0x15b7ae+_0x414d5d(0x1d5),{'body':_0x2e42dc});return!_0x574bc0[_0x414d5d(0x1e8)][_0x414d5d(0x1a0)]||_0x574bc0[_0x414d5d(0x1e8)][_0x414d5d(0x1a0)][_0x414d5d(0x20c)]===0x1;}async[_0x79121e(0x1b8)](_0x1473b7){const _0x3ab992=_0x79121e,{unitId:_0x27623f}=_0x1473b7,_0x54432b=_0x1473b7[_0x3ab992(0x212)],_0xc41ed9={'memberId':this[_0x3ab992(0x1a9)]['getCurrentUser']()[_0x3ab992(0x1bf)],'unitId':_0x27623f,'threadId':_0x54432b,'solved':_0x1473b7['resolved']?I[_0x3ab992(0x1f8)]:I[_0x3ab992(0x1ba)]},_0x121ed3=await this[_0x3ab992(0x1f7)]['post'](_0x3ab992(0x207)+_0x27623f+'/solved',{'body':_0xc41ed9});return!_0x121ed3[_0x3ab992(0x1e8)][_0x3ab992(0x1a0)]||_0x121ed3[_0x3ab992(0x1e8)][_0x3ab992(0x1a0)][_0x3ab992(0x20c)]===0x1;}async[_0x79121e(0x1d0)](_0x3afd35,_0xec59ab,_0x2cd843,_0x29aa58){const _0x44c2ec=_0x79121e,_0x1535f6={'memberId':(await this[_0x44c2ec(0x1ef)][_0x44c2ec(0x1b4)](_0x3afd35))[_0x44c2ec(0x1b6)](),'threadId':_0x2cd843,'replyId':_0x29aa58,'unitId':_0x3afd35},_0x34333f=await this[_0x44c2ec(0x1f7)][_0x44c2ec(0x1e7)](_0x44c2ec(0x207)+_0x3afd35+_0x44c2ec(0x19b),{'body':_0x1535f6});return!_0x34333f[_0x44c2ec(0x1e8)][_0x44c2ec(0x1a0)]||_0x34333f['body'][_0x44c2ec(0x1a0)][_0x44c2ec(0x20c)]===0x1;}async[_0x79121e(0x1ae)](_0xeae2ce,_0x3de38b,_0x12cd25){const _0x32dc0b=_0x79121e,_0xb3fdcc={'unitId':_0xeae2ce,'threadId':_0x12cd25},_0x202ed1=await this[_0x32dc0b(0x1f7)][_0x32dc0b(0x1e7)](_0x32dc0b(0x207)+_0xeae2ce+_0x32dc0b(0x1c1),{'body':_0xb3fdcc}),_0x5c35ea=_0x12cd25[_0x32dc0b(0x1f2)](_0x1cabf3=>G(_0x202ed1[_0x32dc0b(0x1e8)][_0x32dc0b(0x1f3)][_0x1cabf3],_0xeae2ce,_0x3de38b))[_0x32dc0b(0x1c6)](Boolean);return Object[_0x32dc0b(0x1c3)](_0x202ed1[_0x32dc0b(0x1e8)][_0x32dc0b(0x1f4)])[_0x32dc0b(0x19e)](_0x5409e2=>{const _0x4fd513=_0x32dc0b;this[_0x4fd513(0x1a9)]['addUser'](_0x5409e2);}),_0x5c35ea;}[_0x79121e(0x1e2)](_0xd33b9d){const _0x3d59c9=_0x79121e;return{'id':_0xd33b9d['id'],'threadId':_0xd33b9d[_0x3d59c9(0x212)],'ref':_0xd33b9d['ref']};}};p=x([C(0x0,c[_0x79121e(0x1eb)](P[_0x79121e(0x1cb)])),C(0x1,c[_0x79121e(0x1eb)](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x79121e(0x1c9)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x15ce0e,_0x40d903,_0xa4af7b,_0x151839)=>{const _0x12b060=_0x79121e;for(var _0x521f09=_0x151839>0x1?void 0x0:_0x151839?H(_0x40d903,_0xa4af7b):_0x40d903,_0x44d7a5=_0x15ce0e[_0x12b060(0x1d9)]-0x1,_0x108f5e;_0x44d7a5>=0x0;_0x44d7a5--)(_0x108f5e=_0x15ce0e[_0x44d7a5])&&(_0x521f09=_0x108f5e(_0x521f09)||_0x521f09);return _0x521f09;},y=(_0x30cbfa,_0x2c6210)=>(_0x251ac2,_0x4b6a92)=>_0x2c6210(_0x251ac2,_0x4b6a92,_0x30cbfa);let g=class extends c['Disposable']{constructor(_0x26fc68,_0x5bf604){const _0x4c7fb3=_0x79121e;super(),this[_0x4c7fb3(0x1ca)]=_0x26fc68,this[_0x4c7fb3(0x1e4)]=_0x5bf604,this[_0x4c7fb3(0x1fe)]();}[_0x79121e(0x1fe)](){const _0x30151d=_0x79121e;this['_threadCommentDataSourceService'][_0x30151d(0x1ab)]=this[_0x30151d(0x1e4)],this[_0x30151d(0x1ca)][_0x30151d(0x1a8)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x79121e(0x1eb)](p))],g);var F=Object[_0x79121e(0x202)],L=Object[_0x79121e(0x1b7)],Z=(_0x583dc8,_0x37cd95,_0x3655cc)=>_0x37cd95 in _0x583dc8?F(_0x583dc8,_0x37cd95,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3655cc}):_0x583dc8[_0x37cd95]=_0x3655cc,W=(_0x40f448,_0xa14a89,_0x5a0f00,_0x266660)=>{for(var _0x589061=_0x266660>0x1?void 0x0:_0x266660?L(_0xa14a89,_0x5a0f00):_0xa14a89,_0x432711=_0x40f448['length']-0x1,_0x2fc033;_0x432711>=0x0;_0x432711--)(_0x2fc033=_0x40f448[_0x432711])&&(_0x589061=_0x2fc033(_0x589061)||_0x589061);return _0x589061;},O=(_0x418cbb,_0x5313c2)=>(_0x4f8416,_0x1dcdd9)=>_0x5313c2(_0x4f8416,_0x1dcdd9,_0x418cbb),N=(_0x38473d,_0x4e6606,_0x50634b)=>Z(_0x38473d,typeof _0x4e6606!='symbol'?_0x4e6606+'':_0x4e6606,_0x50634b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x79121e(0x1c2)]{constructor(_0x30bd56=D,_0x5a9e6c,_0x198924){const _0x19cdf0=_0x79121e;super(),this[_0x19cdf0(0x1c4)]=_0x30bd56,this[_0x19cdf0(0x1b5)]=_0x5a9e6c,this[_0x19cdf0(0x201)]=_0x198924;const {..._0xcfa4d3}=c[_0x19cdf0(0x1b0)]({},D,this[_0x19cdf0(0x1c4)]);this[_0x19cdf0(0x201)][_0x19cdf0(0x1a5)](q,_0xcfa4d3);}[_0x79121e(0x1a4)](){const _0x2470e5=_0x79121e;[[p],[g],[_]][_0x2470e5(0x19e)](_0x3e1f8c=>{const _0x1938d2=_0x2470e5;this['_injector'][_0x1938d2(0x1f1)](_0x3e1f8c);});}[_0x79121e(0x1fb)](){const _0x5388a2=_0x79121e;this[_0x5388a2(0x1b5)][_0x5388a2(0x1ed)](g),this[_0x5388a2(0x1b5)][_0x5388a2(0x1ed)](_);}},N(exports[_0x79121e(0x1ce)],'pluginName',U),N(exports[_0x79121e(0x1ce)],_0x79121e(0x1dd),c[_0x79121e(0x1ea)]['UNIVER_UNKNOWN']),exports[_0x79121e(0x1ce)]=W([c[_0x79121e(0x1bb)](w[_0x79121e(0x20a)],b[_0x79121e(0x19c)],T['UniverLicensePlugin']),O(0x1,c[_0x79121e(0x1eb)](c[_0x79121e(0x20b)])),O(0x2,c['IConfigService'])],exports[_0x79121e(0x1ce)]);
|
|
1
|
+
'use strict';const _0x320824=_0x3448;function _0x4f97(){const _0x17a9ed=['listComments','CommentService','DependentOn','requireSession','customRanges','/delete','size','YYYY/MM/DD\x20HH:mm','6xxZifR','473ueSshA','user','/edit','length','/add','threadId','forEach','_httpService','filter','/universer-api/user/list','values','unitId','rangeId','ThreadCommentModel','code','/universer-api/comment/unit/','Unknown','_initDataSource','UniverInstanceType','CollaborationSessionService','2060073rICuiO','get','content','map','comments','286010FvwHGc','stringify','27100KwSeRg','CustomRangeType','addComment','Reply','dayjs','UNIVER_UNKNOWN','_commentService','UniverThreadCommentUIPlugin','root','pluginName','pipe','_config','userId','_sessionService','getMemberID','add','resolveComment','Delete','UniverThreadCommentDataSourcePlugin','userID','_init','Injector','413KKssRe','getOwnPropertyDescriptor','getUnit','payload','createTimestamp','error','IThreadCommentDataSourceService','382tBUBfu','rangeType','find','subscribe','1692700xoGuUx','_configService','personId','Module','delete','toStringTag','UserManagerService','UNRECOGNIZED','replyId','_threadCommentDataSource','comment','addUser','getComment','replies','UniverCollaborationClientPlugin','bufferTime','Solve','parse','_initUserSync','dataSource','/solved','_threadCommentDataSourceService','Disposable','1452304dqXssr','merge','thread-comment-data-source.config','Solved','solved','COMMENT','commentUpdate$','2523936SDwldi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','format','_userService','HTTPService','post','getUser','body','type','Inject','slice','Add','defineProperty','Edit','users','174MuCQwi','resolved','setConfig','_threadCommentModel','_injector','/list'];_0x4f97=function(){return _0x17a9ed;};return _0x4f97();}(function(_0x289cb4,_0x413791){const _0x50013d=_0x3448,_0x9d40e5=_0x289cb4();while(!![]){try{const _0x4d5a04=-parseInt(_0x50013d(0x1e8))/0x1*(parseInt(_0x50013d(0x1ef))/0x2)+-parseInt(_0x50013d(0x221))/0x3*(parseInt(_0x50013d(0x1d2))/0x4)+-parseInt(_0x50013d(0x1f3))/0x5+parseInt(_0x50013d(0x1b6))/0x6*(-parseInt(_0x50013d(0x20a))/0x7)+parseInt(_0x50013d(0x211))/0x8+-parseInt(_0x50013d(0x1cb))/0x9+parseInt(_0x50013d(0x1d0))/0xa*(parseInt(_0x50013d(0x1b7))/0xb);if(_0x4d5a04===_0x413791)break;else _0x9d40e5['push'](_0x9d40e5['shift']());}catch(_0xf696bb){_0x9d40e5['push'](_0x9d40e5['shift']());}}}(_0x4f97,0x48e61));Object[_0x320824(0x21e)](exports,Symbol[_0x320824(0x1f8)],{'value':_0x320824(0x1f6)});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=_0x320824(0x212);var I=(_0x562c3a=>(_0x562c3a[_0x562c3a['OpenOrReOpen']=0x0]=_0x320824(0x213),_0x562c3a[_0x562c3a[_0x320824(0x20d)]=0x1]='Solved',_0x562c3a[_0x562c3a[_0x320824(0x1fa)]=-0x1]='UNRECOGNIZED',_0x562c3a))(I||{}),v=(_0x246be9=>(_0x246be9[_0x246be9[_0x320824(0x1c7)]=0x0]=_0x320824(0x1c7),_0x246be9[_0x246be9[_0x320824(0x21d)]=0x1]='Add',_0x246be9[_0x246be9[_0x320824(0x1d5)]=0x2]=_0x320824(0x1d5),_0x246be9[_0x246be9[_0x320824(0x21f)]=0x3]=_0x320824(0x21f),_0x246be9[_0x246be9['Delete']=0x4]=_0x320824(0x1e3),_0x246be9[_0x246be9[_0x320824(0x203)]=0x5]=_0x320824(0x203),_0x246be9[_0x246be9['UNRECOGNIZED']=-0x1]=_0x320824(0x1fa),_0x246be9))(v||{});const f=_0x21ebfd=>c[_0x320824(0x1d6)](new Date(+_0x21ebfd))[_0x320824(0x214)](_0x320824(0x22e)),R=async(_0x32f931,_0x21fc0e)=>{const _0x504151=_0x320824,_0x57fb28=_0x32f931['get'](c[_0x504151(0x1f9)]),_0x3ea110=_0x32f931[_0x504151(0x1cc)](P['HTTPService']);_0x21fc0e[_0x504151(0x1bd)](_0x41ae85=>{const _0xc82df=_0x504151;_0x57fb28[_0xc82df(0x218)](_0x41ae85)&&_0x21fc0e[_0xc82df(0x1f7)](_0x41ae85);}),_0x21fc0e[_0x504151(0x22d)]&&(await _0x3ea110[_0x504151(0x1cc)](_0x504151(0x1c0),{'params':{'userIDs':[..._0x21fc0e]}}))['body'][_0x504151(0x220)][_0x504151(0x1bd)](_0x1486ca=>{const _0x22a211=_0x504151;_0x1486ca&&_0x57fb28[_0x22a211(0x1fe)](_0x1486ca);});};var $=Object[_0x320824(0x1e9)],E=(_0xc48fca,_0x4e173e,_0x2bf1e9,_0xd6fd4b)=>{const _0x3f779e=_0x320824;for(var _0x26fa8f=_0xd6fd4b>0x1?void 0x0:_0xd6fd4b?$(_0x4e173e,_0x2bf1e9):_0x4e173e,_0x1bff71=_0xc48fca[_0x3f779e(0x1ba)]-0x1,_0x11ae3b;_0x1bff71>=0x0;_0x1bff71--)(_0x11ae3b=_0xc48fca[_0x1bff71])&&(_0x26fa8f=_0x11ae3b(_0x26fa8f)||_0x26fa8f);return _0x26fa8f;},S=(_0x4c690b,_0xac982f)=>(_0x45bc73,_0x1f747d)=>_0xac982f(_0x45bc73,_0x1f747d,_0x4c690b);let _=class extends c[_0x320824(0x209)]{constructor(_0x24a123,_0x587a3f,_0x3a7409,_0x22b132){const _0x4ded85=_0x320824;super(),this[_0x4ded85(0x1d8)]=_0x24a123,this[_0x4ded85(0x224)]=_0x587a3f,this[_0x4ded85(0x215)]=_0x3a7409,this['_injector']=_0x22b132,this[_0x4ded85(0x1e6)](),this['_initUserSync']();}[_0x320824(0x205)](){const _0x32ff98=_0x320824;this['disposeWithMe'](this[_0x32ff98(0x224)][_0x32ff98(0x210)][_0x32ff98(0x1dc)](j[_0x32ff98(0x202)](0x10))[_0x32ff98(0x1f2)](_0x2ea23d=>{const _0x21897a=_0x32ff98,_0x2273e4=new Set();_0x2ea23d[_0x21897a(0x1bd)](_0x481c88=>{const _0x5ca8b5=_0x21897a;if(_0x481c88[_0x5ca8b5(0x21a)]===_0x5ca8b5(0x1e1)){const _0x1012c8=_0x481c88[_0x5ca8b5(0x1eb)][_0x5ca8b5(0x1f5)];_0x2273e4[_0x5ca8b5(0x1e1)](_0x1012c8);}}),R(this['_injector'],_0x2273e4);}));}[_0x320824(0x1e6)](){const _0x21e10c=_0x320824;this['disposeWithMe'](this[_0x21e10c(0x1d8)][_0x21e10c(0x210)][_0x21e10c(0x1f2)](async _0x3b9455=>{const _0x1ca81a=_0x21e10c;var _0x39a7bc,_0x3be3a1,_0x440939,_0x201b2e;const _0x11f726=(_0x39a7bc=this[_0x1ca81a(0x224)][_0x1ca81a(0x1ea)](_0x3b9455['unitId'])[_0x1ca81a(0x1f1)](_0x1e679f=>_0x1e679f[_0x1ca81a(0x1bc)]===_0x3b9455[_0x1ca81a(0x1bc)]))==null?void 0x0:_0x39a7bc[_0x1ca81a(0x1da)];if(!_0x11f726)return;const {unitId:_0x5a64b3,subUnitId:_0x40653e}=_0x11f726;switch(_0x3b9455[_0x1ca81a(0x1b8)]&&this[_0x1ca81a(0x215)][_0x1ca81a(0x1fe)](_0x3b9455['user']),_0x3b9455[_0x1ca81a(0x21a)]){case v[_0x1ca81a(0x21d)]:break;case v['Reply']:{this[_0x1ca81a(0x224)][_0x1ca81a(0x1d4)](_0x5a64b3,_0x40653e,{'unitId':_0x5a64b3,'subUnitId':_0x40653e,'ref':'','id':_0x3b9455[_0x1ca81a(0x1fb)],'dT':f(+_0x3b9455['createTimestamp']),'threadId':_0x3b9455[_0x1ca81a(0x1bc)],'personId':(_0x440939=(_0x3be3a1=_0x3b9455[_0x1ca81a(0x1b8)])==null?void 0x0:_0x3be3a1[_0x1ca81a(0x1e5)])!=null?_0x440939:_0x3b9455[_0x1ca81a(0x1de)],'text':JSON[_0x1ca81a(0x204)](_0x3b9455[_0x1ca81a(0x1cd)]),'parentId':_0x11f726['id']});break;}case v['Delete']:{const _0x30e719=this[_0x1ca81a(0x224)][_0x1ca81a(0x1ff)](_0x5a64b3,_0x40653e,_0x3b9455[_0x1ca81a(0x1fb)]);_0x30e719&&_0x30e719['parentId']&&this[_0x1ca81a(0x224)]['deleteComment'](_0x5a64b3,_0x40653e,_0x3b9455[_0x1ca81a(0x1fb)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x5a64b3,_0x40653e,{'commentId':_0x3b9455['replyId'],'text':JSON[_0x1ca81a(0x204)](_0x3b9455['content'])});break;}case v['Solve']:{const _0x22f02a=(_0x201b2e=this[_0x1ca81a(0x224)][_0x1ca81a(0x1ea)](_0x3b9455[_0x1ca81a(0x1c2)])[_0x1ca81a(0x1f1)](_0x4c56ad=>_0x4c56ad['threadId']===_0x3b9455['threadId']))==null?void 0x0:_0x201b2e[_0x1ca81a(0x1da)];_0x22f02a&&this['_threadCommentModel'][_0x1ca81a(0x1e2)](_0x5a64b3,_0x40653e,_0x22f02a['id'],_0x3b9455['solved']===I[_0x1ca81a(0x20d)]);break;}}}));}};_=E([S(0x0,c[_0x320824(0x21b)](b[_0x320824(0x228)])),S(0x1,c[_0x320824(0x21b)](M[_0x320824(0x1c4)])),S(0x2,c[_0x320824(0x21b)](c[_0x320824(0x1f9)])),S(0x3,c[_0x320824(0x21b)](c[_0x320824(0x1e7)]))],_);const q=_0x320824(0x20c),D={};var A=Object[_0x320824(0x1e9)],x=(_0x614bc9,_0x2816f9,_0x2312a4,_0x2dc4c2)=>{const _0x4d41fa=_0x320824;for(var _0x205f06=_0x2dc4c2>0x1?void 0x0:_0x2dc4c2?A(_0x2816f9,_0x2312a4):_0x2816f9,_0x342237=_0x614bc9[_0x4d41fa(0x1ba)]-0x1,_0x304db1;_0x342237>=0x0;_0x342237--)(_0x304db1=_0x614bc9[_0x342237])&&(_0x205f06=_0x304db1(_0x205f06)||_0x205f06);return _0x205f06;},C=(_0x56bfb8,_0x4dbe4b)=>(_0x270730,_0x5ea6a2)=>_0x4dbe4b(_0x270730,_0x5ea6a2,_0x56bfb8);function Y(_0xe3b5e9,_0x1011d0){const _0x40e66d=_0x320824,_0x6f779d=_0xe3b5e9[_0x40e66d(0x200)][0x0];return{..._0x1011d0,'id':_0x6f779d[_0x40e66d(0x1fb)],'resolved':_0xe3b5e9[_0x40e66d(0x20e)]===0x1,'dT':f(_0x6f779d[_0x40e66d(0x1ec)]),'personId':_0x6f779d[_0x40e66d(0x1de)],'threadId':_0x6f779d[_0x40e66d(0x1bc)]};}function G(_0x193ed8,_0x2ff490,_0x2cf254){const _0x27bbb9=_0x320824;var _0x3d3bd1,_0x43c80c;if(((_0x43c80c=(_0x3d3bd1=_0x193ed8==null?void 0x0:_0x193ed8['replies'])==null?void 0x0:_0x3d3bd1[_0x27bbb9(0x1ba)])!=null?_0x43c80c:0x0)>0x0){const _0xbe8caa=(_0x519c91,_0x511fee)=>({'id':_0x519c91[_0x27bbb9(0x1fb)],'threadId':_0x519c91[_0x27bbb9(0x1bc)],'dT':f(_0x519c91['createTimestamp']),'personId':_0x519c91[_0x27bbb9(0x1de)],'resolved':_0x193ed8[_0x27bbb9(0x20e)]===I[_0x27bbb9(0x20d)],'unitId':_0x2ff490,'subUnitId':_0x2cf254,'text':JSON['parse'](_0x519c91[_0x27bbb9(0x1cd)]),'parentId':_0x511fee}),_0x46fc10=_0xbe8caa(_0x193ed8[_0x27bbb9(0x200)][0x0]);return{..._0x46fc10,'children':_0x193ed8[_0x27bbb9(0x200)][_0x27bbb9(0x21c)](0x1)[_0x27bbb9(0x1ce)](_0x2adc9b=>_0xbe8caa(_0x2adc9b,_0x46fc10['id']))};}return null;}let p=class{constructor(_0x2bb934,_0x3866e6,_0x350035){const _0x551145=_0x320824;this['_httpService']=_0x2bb934,this[_0x551145(0x215)]=_0x3866e6,this['_sessionService']=_0x350035;}async['addComment'](_0x369eb3){const _0x570935=_0x320824;var _0x4ebe7d,_0x3c4d2d;const {parentId:_0x3dad1e,unitId:_0x52d254,text:_0x24cfef,threadId:_0xd3a9db}=_0x369eb3,_0x3b882c=(_0x3c4d2d=(_0x4ebe7d=_0x24cfef['customRanges'])==null?void 0x0:_0x4ebe7d[_0x570935(0x1bf)](_0x1ba2c3=>_0x1ba2c3[_0x570935(0x1f0)]===c[_0x570935(0x1d3)][_0x570935(0x20f)])[_0x570935(0x1ce)](_0x1481a=>_0x1481a[_0x570935(0x1c3)]))!=null?_0x3c4d2d:[],_0x28ea37=JSON[_0x570935(0x1d1)](_0x24cfef),_0x69cb38=(await this['_sessionService'][_0x570935(0x22a)](_0x52d254))[_0x570935(0x1e0)]();if(_0x3dad1e){const _0x148fe3={'memberId':_0x69cb38,'unitId':_0x52d254,'content':_0x28ea37,'mention':_0x3b882c,'threadId':_0xd3a9db},_0xaf5458=(await this[_0x570935(0x1be)][_0x570935(0x217)](_0x570935(0x1c6)+_0x52d254+'/reply',{'body':_0x148fe3}))[_0x570935(0x219)]['reply'];return{..._0x369eb3,'id':_0xaf5458[_0x570935(0x1fb)],'dT':c[_0x570935(0x1d6)](+_0xaf5458[_0x570935(0x1ec)])[_0x570935(0x214)](_0x570935(0x22e)),'personId':_0xaf5458[_0x570935(0x1de)]};}else{const _0x50bf70={'memberId':_0x69cb38,'unitId':_0x52d254,'content':_0x28ea37,'mention':_0x3b882c},_0x23d068=await this[_0x570935(0x1be)][_0x570935(0x217)](_0x570935(0x1c6)+_0x52d254+_0x570935(0x1bb),{'body':_0x50bf70});return Y(_0x23d068['body'][_0x570935(0x1fd)],_0x369eb3);}}async['updateComment'](_0x14ea21){const _0x41fbc2=_0x320824;var _0x162537,_0x532d7e;const {text:_0x3aba0d,unitId:_0x4a6234}=_0x14ea21,_0x3cc595=(_0x532d7e=(_0x162537=_0x3aba0d[_0x41fbc2(0x22b)])==null?void 0x0:_0x162537[_0x41fbc2(0x1bf)](_0x2948fa=>_0x2948fa[_0x41fbc2(0x1f0)]===c[_0x41fbc2(0x1d3)][_0x41fbc2(0x20f)])[_0x41fbc2(0x1ce)](_0x3ece4c=>_0x3ece4c['rangeId']))!=null?_0x532d7e:[],_0x1089cd=JSON[_0x41fbc2(0x1d1)](_0x3aba0d),_0x5142d5=_0x14ea21['threadId'],_0x1e6a29=_0x14ea21['id'],_0x11e368={'memberId':(await this[_0x41fbc2(0x1df)][_0x41fbc2(0x22a)](_0x4a6234))[_0x41fbc2(0x1e0)](),'unitId':_0x4a6234,'threadId':_0x5142d5,'mention':_0x3cc595,'content':_0x1089cd,'replyId':_0x1e6a29},_0x101d8b=await this[_0x41fbc2(0x1be)][_0x41fbc2(0x217)](_0x41fbc2(0x1c6)+_0x4a6234+_0x41fbc2(0x1b9),{'body':_0x11e368});return!_0x101d8b[_0x41fbc2(0x219)][_0x41fbc2(0x1ed)]||_0x101d8b[_0x41fbc2(0x219)][_0x41fbc2(0x1ed)][_0x41fbc2(0x1c5)]===0x1;}async['resolveComment'](_0xd2b682){const _0x1bfecb=_0x320824,{unitId:_0xa8fbe}=_0xd2b682,_0x1c7acf=_0xd2b682[_0x1bfecb(0x1bc)],_0xc37f5c={'memberId':this['_userService']['getCurrentUser']()[_0x1bfecb(0x1e5)],'unitId':_0xa8fbe,'threadId':_0x1c7acf,'solved':_0xd2b682[_0x1bfecb(0x222)]?I['Solved']:I['OpenOrReOpen']},_0x4825ce=await this['_httpService'][_0x1bfecb(0x217)](_0x1bfecb(0x1c6)+_0xa8fbe+_0x1bfecb(0x207),{'body':_0xc37f5c});return!_0x4825ce[_0x1bfecb(0x219)][_0x1bfecb(0x1ed)]||_0x4825ce[_0x1bfecb(0x219)][_0x1bfecb(0x1ed)]['code']===0x1;}async['deleteComment'](_0x1a6ce7,_0x22c8fd,_0x8bec7a,_0x14f9c5){const _0x35cc7a=_0x320824,_0x588ba3={'memberId':(await this[_0x35cc7a(0x1df)][_0x35cc7a(0x22a)](_0x1a6ce7))[_0x35cc7a(0x1e0)](),'threadId':_0x8bec7a,'replyId':_0x14f9c5,'unitId':_0x1a6ce7},_0x2cdb16=await this['_httpService'][_0x35cc7a(0x217)]('/universer-api/comment/unit/'+_0x1a6ce7+_0x35cc7a(0x22c),{'body':_0x588ba3});return!_0x2cdb16[_0x35cc7a(0x219)]['error']||_0x2cdb16[_0x35cc7a(0x219)][_0x35cc7a(0x1ed)][_0x35cc7a(0x1c5)]===0x1;}async[_0x320824(0x227)](_0x18e15b,_0x21b1cf,_0x435e5c){const _0x68aeb6=_0x320824,_0x43e348={'unitId':_0x18e15b,'threadId':_0x435e5c},_0x55037e=await this[_0x68aeb6(0x1be)][_0x68aeb6(0x217)](_0x68aeb6(0x1c6)+_0x18e15b+_0x68aeb6(0x226),{'body':_0x43e348}),_0x485f03=_0x435e5c['map'](_0x4e3091=>G(_0x55037e[_0x68aeb6(0x219)][_0x68aeb6(0x1cf)][_0x4e3091],_0x18e15b,_0x21b1cf))['filter'](Boolean);return Object[_0x68aeb6(0x1c1)](_0x55037e['body']['users'])['forEach'](_0x17d020=>{const _0x3cdd41=_0x68aeb6;this[_0x3cdd41(0x215)]['addUser'](_0x17d020);}),_0x485f03;}['saveCommentToSnapshot'](_0x44b7be){const _0x3b4965=_0x320824;return{'id':_0x44b7be['id'],'threadId':_0x44b7be[_0x3b4965(0x1bc)],'ref':_0x44b7be['ref']};}};function _0x3448(_0x395b86,_0x4cf981){_0x395b86=_0x395b86-0x1b6;const _0x4f973b=_0x4f97();let _0x344854=_0x4f973b[_0x395b86];return _0x344854;}p=x([C(0x0,c[_0x320824(0x21b)](P[_0x320824(0x216)])),C(0x1,c[_0x320824(0x21b)](c['UserManagerService'])),C(0x2,c[_0x320824(0x21b)](b[_0x320824(0x1ca)]))],p);var H=Object[_0x320824(0x1e9)],J=(_0x2667d3,_0x3c1636,_0x269e79,_0x52f0f9)=>{const _0x394286=_0x320824;for(var _0x3cc25b=_0x52f0f9>0x1?void 0x0:_0x52f0f9?H(_0x3c1636,_0x269e79):_0x3c1636,_0x49aa38=_0x2667d3[_0x394286(0x1ba)]-0x1,_0xdcb04e;_0x49aa38>=0x0;_0x49aa38--)(_0xdcb04e=_0x2667d3[_0x49aa38])&&(_0x3cc25b=_0xdcb04e(_0x3cc25b)||_0x3cc25b);return _0x3cc25b;},y=(_0xf63a0e,_0x4756b1)=>(_0x59a3e5,_0x36d21f)=>_0x4756b1(_0x59a3e5,_0x36d21f,_0xf63a0e);let g=class extends c[_0x320824(0x209)]{constructor(_0x2ab398,_0xec44db){const _0x482cce=_0x320824;super(),this[_0x482cce(0x208)]=_0x2ab398,this[_0x482cce(0x1fc)]=_0xec44db,this['_initDataSource']();}[_0x320824(0x1c8)](){const _0x1b8e42=_0x320824;this[_0x1b8e42(0x208)][_0x1b8e42(0x206)]=this['_threadCommentDataSource'],this[_0x1b8e42(0x208)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x320824(0x1ee)]),y(0x1,c[_0x320824(0x21b)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x3dd349,_0x5de03d,_0x287618)=>_0x5de03d in _0x3dd349?F(_0x3dd349,_0x5de03d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x287618}):_0x3dd349[_0x5de03d]=_0x287618,W=(_0x3e9922,_0x4cf239,_0x1bb037,_0x366262)=>{const _0x1fdeca=_0x320824;for(var _0x236d6b=_0x366262>0x1?void 0x0:_0x366262?L(_0x4cf239,_0x1bb037):_0x4cf239,_0x3be541=_0x3e9922[_0x1fdeca(0x1ba)]-0x1,_0x4a5858;_0x3be541>=0x0;_0x3be541--)(_0x4a5858=_0x3e9922[_0x3be541])&&(_0x236d6b=_0x4a5858(_0x236d6b)||_0x236d6b);return _0x236d6b;},O=(_0x73f52b,_0x6bac67)=>(_0x3a3c09,_0x16ac1d)=>_0x6bac67(_0x3a3c09,_0x16ac1d,_0x73f52b),N=(_0x44db95,_0x187ac1,_0x4da549)=>Z(_0x44db95,typeof _0x187ac1!='symbol'?_0x187ac1+'':_0x187ac1,_0x4da549);exports[_0x320824(0x1e4)]=class extends c['Plugin']{constructor(_0x6229ca=D,_0x1a8746,_0x37be96){const _0xd0e435=_0x320824;super(),this[_0xd0e435(0x1dd)]=_0x6229ca,this[_0xd0e435(0x225)]=_0x1a8746,this[_0xd0e435(0x1f4)]=_0x37be96;const {..._0x4e2b9d}=c[_0xd0e435(0x20b)]({},D,this[_0xd0e435(0x1dd)]);this[_0xd0e435(0x1f4)][_0xd0e435(0x223)](q,_0x4e2b9d);}['onStarting'](){const _0x190055=_0x320824;[[p],[g],[_]][_0x190055(0x1bd)](_0x2d83dc=>{const _0x657fb0=_0x190055;this[_0x657fb0(0x225)]['add'](_0x2d83dc);});}['onReady'](){const _0x3d9ef8=_0x320824;this[_0x3d9ef8(0x225)][_0x3d9ef8(0x1cc)](g),this['_injector'][_0x3d9ef8(0x1cc)](_);}},N(exports[_0x320824(0x1e4)],_0x320824(0x1db),U),N(exports[_0x320824(0x1e4)],_0x320824(0x21a),c[_0x320824(0x1c9)][_0x320824(0x1d7)]),exports[_0x320824(0x1e4)]=W([c[_0x320824(0x229)](w[_0x320824(0x1d9)],b[_0x320824(0x201)],T['UniverLicensePlugin']),O(0x1,c[_0x320824(0x21b)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x320824(0x1e4)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16030e=_0x4fd3;(function(_0x570c,_0x4d7997){const _0x3d990a=_0x4fd3,_0x4e4308=_0x570c();while(!![]){try{const _0x103bbb=-parseInt(_0x3d990a(0x140))/0x1+-parseInt(_0x3d990a(0x186))/0x2+parseInt(_0x3d990a(0x18f))/0x3+-parseInt(_0x3d990a(0x17e))/0x4*(parseInt(_0x3d990a(0x179))/0x5)+-parseInt(_0x3d990a(0x146))/0x6+parseInt(_0x3d990a(0x135))/0x7*(parseInt(_0x3d990a(0x13c))/0x8)+parseInt(_0x3d990a(0x183))/0x9;if(_0x103bbb===_0x4d7997)break;else _0x4e4308['push'](_0x4e4308['shift']());}catch(_0x5004f4){_0x4e4308['push'](_0x4e4308['shift']());}}}(_0x4737,0x7f1cb));import{CommentService as _0x461905,CollaborationSessionService as _0x5409b3,UniverCollaborationClientPlugin as _0x32afc7}from'@univerjs-pro/collaboration-client';function _0x4737(){const _0x41a910=['/universer-api/comment/unit/','userId','onReady','Reply','deleteComment','getUnit','listComments','solved','resolveComment','/delete','replyId','commentUpdate$','personId','_configService','10JbznCh','symbol','find','/add','code','468612jUVmvX','_initUserSync','/universer-api/user/list','users','values','13170312CDXJTA','OpenOrReOpen','_userService','792528OCOSPx','getCurrentUser','filter','UNIVER_UNKNOWN','_httpService','_initDataSource','addComment','_config','unitId','2040699MSjwGq','setConfig','delete','error','getOwnPropertyDescriptor','saveCommentToSnapshot','forEach','parse','userID','21iszxVW','defineProperty','_sessionService','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','body','Add','1120672iHLxwB','addUser','content','subscribe','786605UwPaVy','add','_init','map','_injector','/list','3756162wvvWEk','/solved','getUser','updateComment','rangeType','disposeWithMe','size','Solved','_threadCommentModel','format','UNRECOGNIZED','rangeId','COMMENT','reply','createTimestamp','_threadCommentDataSourceService','Delete','slice','requireSession','Edit','length','Unknown','post','replies','getMemberID','Solve','threadId','parentId','stringify','customRanges','user','root','getComment','resolved','get','_commentService','/reply'];_0x4737=function(){return _0x41a910;};return _0x4737();}import{UniverLicensePlugin as _0x15cb9c}from'@univerjs-pro/license';import{dayjs as _0x3452f2,UserManagerService as _0x42539e,Inject as _0x232c4f,Injector as _0x291ac5,Disposable as _0x420710,CustomRangeType as _0x3f0bbe,UniverInstanceType as _0x2c1c94,DependentOn as _0x3102ce,Plugin as _0x1d2449,merge as _0x3b1644,IConfigService as _0x1b3c83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9ebaf1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x7b32fd,IThreadCommentDataSourceService as _0x25fc8b}from'@univerjs/thread-comment';import{bufferTime as _0x1985d4}from'rxjs';import{HTTPService as _0x349971}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x527823=>(_0x527823[_0x527823[_0x16030e(0x184)]=0x0]=_0x16030e(0x184),_0x527823[_0x527823[_0x16030e(0x14d)]=0x1]=_0x16030e(0x14d),_0x527823[_0x527823['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x527823))(I||{}),v=(_0x363897=>(_0x363897[_0x363897[_0x16030e(0x15b)]=0x0]=_0x16030e(0x15b),_0x363897[_0x363897[_0x16030e(0x13b)]=0x1]=_0x16030e(0x13b),_0x363897[_0x363897[_0x16030e(0x16e)]=0x2]=_0x16030e(0x16e),_0x363897[_0x363897[_0x16030e(0x159)]=0x3]=_0x16030e(0x159),_0x363897[_0x363897[_0x16030e(0x156)]=0x4]=_0x16030e(0x156),_0x363897[_0x363897[_0x16030e(0x15f)]=0x5]=_0x16030e(0x15f),_0x363897[_0x363897[_0x16030e(0x150)]=-0x1]=_0x16030e(0x150),_0x363897))(v||{});const y=_0x4d52b0=>_0x3452f2(new Date(+_0x4d52b0))[_0x16030e(0x14f)](_0x16030e(0x138)),B=async(_0x723b93,_0x38ae3d)=>{const _0x45ab6b=_0x16030e,_0x4d6b91=_0x723b93[_0x45ab6b(0x168)](_0x42539e),_0x1eb950=_0x723b93[_0x45ab6b(0x168)](_0x349971);_0x38ae3d[_0x45ab6b(0x132)](_0x2bbfb3=>{const _0x325383=_0x45ab6b;_0x4d6b91[_0x325383(0x148)](_0x2bbfb3)&&_0x38ae3d[_0x325383(0x191)](_0x2bbfb3);}),_0x38ae3d[_0x45ab6b(0x14c)]&&(await _0x1eb950[_0x45ab6b(0x168)](_0x45ab6b(0x180),{'params':{'userIDs':[..._0x38ae3d]}}))[_0x45ab6b(0x13a)][_0x45ab6b(0x181)][_0x45ab6b(0x132)](_0x574b81=>{const _0x10a9c9=_0x45ab6b;_0x574b81&&_0x4d6b91[_0x10a9c9(0x13d)](_0x574b81);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x422c9a,_0x41893e,_0x40d3c0,_0x4ede76)=>{for(var _0x7d4ceb=_0x4ede76>0x1?void 0x0:_0x4ede76?K(_0x41893e,_0x40d3c0):_0x41893e,_0x1e7fd5=_0x422c9a['length']-0x1,_0x3024da;_0x1e7fd5>=0x0;_0x1e7fd5--)(_0x3024da=_0x422c9a[_0x1e7fd5])&&(_0x7d4ceb=_0x3024da(_0x7d4ceb)||_0x7d4ceb);return _0x7d4ceb;},p=(_0x1fea2f,_0x161859)=>(_0x360840,_0x4929e1)=>_0x161859(_0x360840,_0x4929e1,_0x1fea2f);let _=class extends _0x420710{constructor(_0x4e5406,_0x3e96ae,_0x41e4e7,_0x4d4c75){const _0x49d77a=_0x16030e;super(),this[_0x49d77a(0x169)]=_0x4e5406,this['_threadCommentModel']=_0x3e96ae,this[_0x49d77a(0x185)]=_0x41e4e7,this[_0x49d77a(0x144)]=_0x4d4c75,this[_0x49d77a(0x142)](),this[_0x49d77a(0x17f)]();}[_0x16030e(0x17f)](){const _0x49cf73=_0x16030e;this[_0x49cf73(0x14b)](this[_0x49cf73(0x14e)][_0x49cf73(0x176)]['pipe'](_0x1985d4(0x10))['subscribe'](_0x5ee4c0=>{const _0x107253=_0x49cf73,_0x5f0f7b=new Set();_0x5ee4c0[_0x107253(0x132)](_0x1dd8a2=>{const _0x3a1b87=_0x107253;if(_0x1dd8a2['type']===_0x3a1b87(0x141)){const _0x1bb66f=_0x1dd8a2['payload'][_0x3a1b87(0x177)];_0x5f0f7b[_0x3a1b87(0x141)](_0x1bb66f);}}),B(this[_0x107253(0x144)],_0x5f0f7b);}));}[_0x16030e(0x142)](){const _0x3fe3f4=_0x16030e;this[_0x3fe3f4(0x14b)](this['_commentService'][_0x3fe3f4(0x176)][_0x3fe3f4(0x13f)](async _0x3162a4=>{const _0x1c2bc1=_0x3fe3f4;var _0xa9cacb,_0x3a6163,_0x5a3b2e,_0x178f57;const _0x59d2ff=(_0xa9cacb=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0xb58524=>_0xb58524[_0x1c2bc1(0x160)]===_0x3162a4['threadId']))==null?void 0x0:_0xa9cacb['root'];if(!_0x59d2ff)return;const {unitId:_0xd798b3,subUnitId:_0x46e6cd}=_0x59d2ff;switch(_0x3162a4['user']&&this[_0x1c2bc1(0x185)][_0x1c2bc1(0x13d)](_0x3162a4[_0x1c2bc1(0x164)]),_0x3162a4['type']){case v[_0x1c2bc1(0x13b)]:break;case v[_0x1c2bc1(0x16e)]:{this['_threadCommentModel']['addComment'](_0xd798b3,_0x46e6cd,{'unitId':_0xd798b3,'subUnitId':_0x46e6cd,'ref':'','id':_0x3162a4['replyId'],'dT':y(+_0x3162a4['createTimestamp']),'threadId':_0x3162a4['threadId'],'personId':(_0x5a3b2e=(_0x3a6163=_0x3162a4['user'])==null?void 0x0:_0x3a6163[_0x1c2bc1(0x134)])!=null?_0x5a3b2e:_0x3162a4['userId'],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)]),'parentId':_0x59d2ff['id']});break;}case v[_0x1c2bc1(0x156)]:{const _0x42a236=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x166)](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);_0x42a236&&_0x42a236[_0x1c2bc1(0x161)]&&this['_threadCommentModel']['deleteComment'](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);break;}case v['Edit']:{this[_0x1c2bc1(0x14e)]['updateComment'](_0xd798b3,_0x46e6cd,{'commentId':_0x3162a4[_0x1c2bc1(0x175)],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)])});break;}case v[_0x1c2bc1(0x15f)]:{const _0x153a77=(_0x178f57=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0x147fc5=>_0x147fc5['threadId']===_0x3162a4['threadId']))==null?void 0x0:_0x178f57[_0x1c2bc1(0x165)];_0x153a77&&this[_0x1c2bc1(0x14e)]['resolveComment'](_0xd798b3,_0x46e6cd,_0x153a77['id'],_0x3162a4[_0x1c2bc1(0x172)]===I[_0x1c2bc1(0x14d)]);break;}}}));}};_=V([p(0x0,_0x232c4f(_0x461905)),p(0x1,_0x232c4f(_0x7b32fd)),p(0x2,_0x232c4f(_0x42539e)),p(0x3,_0x232c4f(_0x291ac5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x16030e(0x130)],Q=(_0x1cbaa2,_0x39d4b3,_0x2659d2,_0x4b1351)=>{const _0x285813=_0x16030e;for(var _0x3d2101=_0x4b1351>0x1?void 0x0:_0x4b1351?k(_0x39d4b3,_0x2659d2):_0x39d4b3,_0x2abc04=_0x1cbaa2[_0x285813(0x15a)]-0x1,_0x3a7ece;_0x2abc04>=0x0;_0x2abc04--)(_0x3a7ece=_0x1cbaa2[_0x2abc04])&&(_0x3d2101=_0x3a7ece(_0x3d2101)||_0x3d2101);return _0x3d2101;},b=(_0x54d628,_0x39f988)=>(_0x3a8cc9,_0x105b52)=>_0x39f988(_0x3a8cc9,_0x105b52,_0x54d628);function X(_0x4a8b4e,_0x1b8b6c){const _0x166944=_0x16030e,_0x205cea=_0x4a8b4e[_0x166944(0x15d)][0x0];return{..._0x1b8b6c,'id':_0x205cea['replyId'],'resolved':_0x4a8b4e[_0x166944(0x172)]===0x1,'dT':y(_0x205cea[_0x166944(0x154)]),'personId':_0x205cea['userId'],'threadId':_0x205cea[_0x166944(0x160)]};}function ee(_0x5944be,_0x41049d,_0x279b53){const _0x2e6a62=_0x16030e;var _0x2d3b89,_0x55de9e;if(((_0x55de9e=(_0x2d3b89=_0x5944be==null?void 0x0:_0x5944be[_0x2e6a62(0x15d)])==null?void 0x0:_0x2d3b89['length'])!=null?_0x55de9e:0x0)>0x0){const _0x3ebed1=(_0x1fc046,_0x205c33)=>({'id':_0x1fc046[_0x2e6a62(0x175)],'threadId':_0x1fc046[_0x2e6a62(0x160)],'dT':y(_0x1fc046[_0x2e6a62(0x154)]),'personId':_0x1fc046[_0x2e6a62(0x16c)],'resolved':_0x5944be[_0x2e6a62(0x172)]===I[_0x2e6a62(0x14d)],'unitId':_0x41049d,'subUnitId':_0x279b53,'text':JSON[_0x2e6a62(0x133)](_0x1fc046['content']),'parentId':_0x205c33}),_0x1970ce=_0x3ebed1(_0x5944be[_0x2e6a62(0x15d)][0x0]);return{..._0x1970ce,'children':_0x5944be[_0x2e6a62(0x15d)][_0x2e6a62(0x157)](0x1)['map'](_0xd684d9=>_0x3ebed1(_0xd684d9,_0x1970ce['id']))};}return null;}let S=class{constructor(_0x466874,_0x2f23b8,_0x83f2d0){const _0x1c7807=_0x16030e;this['_httpService']=_0x466874,this[_0x1c7807(0x185)]=_0x2f23b8,this[_0x1c7807(0x137)]=_0x83f2d0;}async[_0x16030e(0x18c)](_0x5aa5b4){const _0xc4f2e3=_0x16030e;var _0x581b45,_0x2930af;const {parentId:_0x8beb0c,unitId:_0x42cddc,text:_0x2cd8df,threadId:_0x342497}=_0x5aa5b4,_0x84a48f=(_0x2930af=(_0x581b45=_0x2cd8df[_0xc4f2e3(0x163)])==null?void 0x0:_0x581b45[_0xc4f2e3(0x188)](_0x1c8fc9=>_0x1c8fc9[_0xc4f2e3(0x14a)]===_0x3f0bbe[_0xc4f2e3(0x152)])[_0xc4f2e3(0x143)](_0x4ae62e=>_0x4ae62e[_0xc4f2e3(0x151)]))!=null?_0x2930af:[],_0x361378=JSON[_0xc4f2e3(0x162)](_0x2cd8df),_0x4cd559=(await this['_sessionService'][_0xc4f2e3(0x158)](_0x42cddc))[_0xc4f2e3(0x15e)]();if(_0x8beb0c){const _0x4888b4={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f,'threadId':_0x342497},_0x169cc2=(await this['_httpService']['post'](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x16a),{'body':_0x4888b4}))[_0xc4f2e3(0x13a)][_0xc4f2e3(0x153)];return{..._0x5aa5b4,'id':_0x169cc2[_0xc4f2e3(0x175)],'dT':_0x3452f2(+_0x169cc2['createTimestamp'])[_0xc4f2e3(0x14f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x169cc2['userId']};}else{const _0x240c86={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f},_0x517858=await this['_httpService'][_0xc4f2e3(0x15c)](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x17c),{'body':_0x240c86});return X(_0x517858[_0xc4f2e3(0x13a)]['comment'],_0x5aa5b4);}}async[_0x16030e(0x149)](_0x3ec974){const _0x3e9946=_0x16030e;var _0x136404,_0x29f46f;const {text:_0x5328b6,unitId:_0x1020df}=_0x3ec974,_0x4f98ac=(_0x29f46f=(_0x136404=_0x5328b6[_0x3e9946(0x163)])==null?void 0x0:_0x136404[_0x3e9946(0x188)](_0x45da1a=>_0x45da1a[_0x3e9946(0x14a)]===_0x3f0bbe[_0x3e9946(0x152)])[_0x3e9946(0x143)](_0x30a16e=>_0x30a16e[_0x3e9946(0x151)]))!=null?_0x29f46f:[],_0x1be7f9=JSON['stringify'](_0x5328b6),_0x409195=_0x3ec974[_0x3e9946(0x160)],_0x1d77f9=_0x3ec974['id'],_0x5d93e5={'memberId':(await this[_0x3e9946(0x137)][_0x3e9946(0x158)](_0x1020df))['getMemberID'](),'unitId':_0x1020df,'threadId':_0x409195,'mention':_0x4f98ac,'content':_0x1be7f9,'replyId':_0x1d77f9},_0x534ca5=await this[_0x3e9946(0x18a)][_0x3e9946(0x15c)](_0x3e9946(0x16b)+_0x1020df+'/edit',{'body':_0x5d93e5});return!_0x534ca5[_0x3e9946(0x13a)]['error']||_0x534ca5[_0x3e9946(0x13a)][_0x3e9946(0x12f)][_0x3e9946(0x17d)]===0x1;}async[_0x16030e(0x173)](_0x30c38f){const _0x1f349e=_0x16030e,{unitId:_0x5df38a}=_0x30c38f,_0x34d904=_0x30c38f[_0x1f349e(0x160)],_0x5d1d1d={'memberId':this['_userService'][_0x1f349e(0x187)]()[_0x1f349e(0x134)],'unitId':_0x5df38a,'threadId':_0x34d904,'solved':_0x30c38f[_0x1f349e(0x167)]?I[_0x1f349e(0x14d)]:I[_0x1f349e(0x184)]},_0xd8d62a=await this[_0x1f349e(0x18a)][_0x1f349e(0x15c)](_0x1f349e(0x16b)+_0x5df38a+_0x1f349e(0x147),{'body':_0x5d1d1d});return!_0xd8d62a['body'][_0x1f349e(0x12f)]||_0xd8d62a[_0x1f349e(0x13a)]['error'][_0x1f349e(0x17d)]===0x1;}async[_0x16030e(0x16f)](_0x233cbd,_0x1431f7,_0x2c4771,_0x4a6fb9){const _0x5f3859=_0x16030e,_0x146e76={'memberId':(await this[_0x5f3859(0x137)][_0x5f3859(0x158)](_0x233cbd))['getMemberID'](),'threadId':_0x2c4771,'replyId':_0x4a6fb9,'unitId':_0x233cbd},_0x5d9d95=await this[_0x5f3859(0x18a)][_0x5f3859(0x15c)]('/universer-api/comment/unit/'+_0x233cbd+_0x5f3859(0x174),{'body':_0x146e76});return!_0x5d9d95['body'][_0x5f3859(0x12f)]||_0x5d9d95['body'][_0x5f3859(0x12f)][_0x5f3859(0x17d)]===0x1;}async[_0x16030e(0x171)](_0x5d3103,_0x3bf490,_0x4af051){const _0xce3e3=_0x16030e,_0x4cbed0={'unitId':_0x5d3103,'threadId':_0x4af051},_0x313228=await this[_0xce3e3(0x18a)]['post'](_0xce3e3(0x16b)+_0x5d3103+_0xce3e3(0x145),{'body':_0x4cbed0}),_0x348243=_0x4af051[_0xce3e3(0x143)](_0x50c725=>ee(_0x313228[_0xce3e3(0x13a)]['comments'][_0x50c725],_0x5d3103,_0x3bf490))[_0xce3e3(0x188)](Boolean);return Object[_0xce3e3(0x182)](_0x313228[_0xce3e3(0x13a)][_0xce3e3(0x181)])[_0xce3e3(0x132)](_0x28339c=>{const _0x49ead5=_0xce3e3;this['_userService'][_0x49ead5(0x13d)](_0x28339c);}),_0x348243;}[_0x16030e(0x131)](_0x1eb535){const _0x27d827=_0x16030e;return{'id':_0x1eb535['id'],'threadId':_0x1eb535[_0x27d827(0x160)],'ref':_0x1eb535['ref']};}};S=Q([b(0x0,_0x232c4f(_0x349971)),b(0x1,_0x232c4f(_0x42539e)),b(0x2,_0x232c4f(_0x5409b3))],S);var re=Object[_0x16030e(0x130)],te=(_0x340d62,_0x4bf1e3,_0x194a5f,_0x323b25)=>{const _0x15bccb=_0x16030e;for(var _0x4be9d4=_0x323b25>0x1?void 0x0:_0x323b25?re(_0x4bf1e3,_0x194a5f):_0x4bf1e3,_0x5cde31=_0x340d62[_0x15bccb(0x15a)]-0x1,_0x532d70;_0x5cde31>=0x0;_0x5cde31--)(_0x532d70=_0x340d62[_0x5cde31])&&(_0x4be9d4=_0x532d70(_0x4be9d4)||_0x4be9d4);return _0x4be9d4;},M=(_0x527b20,_0x3999e6)=>(_0x2f7ae4,_0x3033d2)=>_0x3999e6(_0x2f7ae4,_0x3033d2,_0x527b20);let f=class extends _0x420710{constructor(_0x430d79,_0x3e9341){const _0x1c92bb=_0x16030e;super(),this[_0x1c92bb(0x155)]=_0x430d79,this[_0x1c92bb(0x139)]=_0x3e9341,this[_0x1c92bb(0x18b)]();}[_0x16030e(0x18b)](){const _0x1130fa=_0x16030e;this['_threadCommentDataSourceService']['dataSource']=this[_0x1130fa(0x139)],this[_0x1130fa(0x155)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x25fc8b),M(0x1,_0x232c4f(S))],f);var se=Object[_0x16030e(0x136)],oe=Object[_0x16030e(0x130)],ne=(_0x1e8655,_0xe483cf,_0x2a287a)=>_0xe483cf in _0x1e8655?se(_0x1e8655,_0xe483cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a287a}):_0x1e8655[_0xe483cf]=_0x2a287a,ie=(_0x368850,_0xcfcd19,_0x1a0bc3,_0x2961ac)=>{const _0x2278df=_0x16030e;for(var _0x4b8124=_0x2961ac>0x1?void 0x0:_0x2961ac?oe(_0xcfcd19,_0x1a0bc3):_0xcfcd19,_0x5b97dc=_0x368850[_0x2278df(0x15a)]-0x1,_0x46b769;_0x5b97dc>=0x0;_0x5b97dc--)(_0x46b769=_0x368850[_0x5b97dc])&&(_0x4b8124=_0x46b769(_0x4b8124)||_0x4b8124);return _0x4b8124;},N=(_0x36fac0,_0x48cb5a)=>(_0x30f48e,_0x41ee2f)=>_0x48cb5a(_0x30f48e,_0x41ee2f,_0x36fac0),$=(_0x44ddce,_0x5c2be8,_0x16c6a1)=>ne(_0x44ddce,typeof _0x5c2be8!=_0x16030e(0x17a)?_0x5c2be8+'':_0x5c2be8,_0x16c6a1);let g=class extends _0x1d2449{constructor(_0x5cbb9e=O,_0x239262,_0x20f637){const _0x3fb519=_0x16030e;super(),this[_0x3fb519(0x18d)]=_0x5cbb9e,this[_0x3fb519(0x144)]=_0x239262,this[_0x3fb519(0x178)]=_0x20f637;const {..._0x3e49c3}=_0x3b1644({},O,this[_0x3fb519(0x18d)]);this[_0x3fb519(0x178)][_0x3fb519(0x190)](z,_0x3e49c3);}['onStarting'](){const _0x5311fc=_0x16030e;[[S],[f],[_]][_0x5311fc(0x132)](_0x25b6ba=>{const _0x11db2d=_0x5311fc;this[_0x11db2d(0x144)][_0x11db2d(0x141)](_0x25b6ba);});}[_0x16030e(0x16d)](){const _0x6492c6=_0x16030e;this['_injector']['get'](f),this['_injector'][_0x6492c6(0x168)](_);}};function _0x4fd3(_0x4e73ca,_0x46251d){_0x4e73ca=_0x4e73ca-0x12f;const _0x473706=_0x4737();let _0x4fd327=_0x473706[_0x4e73ca];return _0x4fd327;}$(g,'pluginName',W),$(g,'type',_0x2c1c94[_0x16030e(0x189)]),g=ie([_0x3102ce(_0x9ebaf1,_0x32afc7,_0x15cb9c),N(0x1,_0x232c4f(_0x291ac5)),N(0x2,_0x1b3c83)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1c4990=_0x37a2;(function(_0x54bbc5,_0xe0f6fc){const _0x38a8ac=_0x37a2,_0x1381ee=_0x54bbc5();while(!![]){try{const _0x3aa1eb=-parseInt(_0x38a8ac(0xef))/0x1+-parseInt(_0x38a8ac(0x10b))/0x2*(-parseInt(_0x38a8ac(0xf2))/0x3)+-parseInt(_0x38a8ac(0x102))/0x4+parseInt(_0x38a8ac(0xee))/0x5+parseInt(_0x38a8ac(0x118))/0x6*(-parseInt(_0x38a8ac(0x110))/0x7)+-parseInt(_0x38a8ac(0xf7))/0x8+parseInt(_0x38a8ac(0x106))/0x9;if(_0x3aa1eb===_0xe0f6fc)break;else _0x1381ee['push'](_0x1381ee['shift']());}catch(_0x3fd14b){_0x1381ee['push'](_0x1381ee['shift']());}}}(_0x5d44,0x4be44));import{CommentService as _0x278af8,CollaborationSessionService as _0x5417b5,UniverCollaborationClientPlugin as _0x4fb59d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c8ed9}from'@univerjs-pro/license';import{dayjs as _0x5b2334,UserManagerService as _0x4e911f,Inject as _0x108585,Injector as _0x2d7221,Disposable as _0x2c9fc3,CustomRangeType as _0x11ff2a,UniverInstanceType as _0x22c964,DependentOn as _0x4a4332,Plugin as _0x21d69d,merge as _0x49cd4d,IConfigService as _0x440bd9}from'@univerjs/core';function _0x5d44(){const _0x24d7fe=['userId','Delete','UNRECOGNIZED','/delete','_sessionService','_config','reply','requireSession','users','syncUpdateMutationToColla','slice','Unknown','Reply','1859205ZqtcBQ','185859TLmOvm','OpenOrReOpen','body','1038rYgssC','threadId','_init','replies','customRanges','2004256PfLaNi','userID','_initUserSync','pluginName','resolved','root','/reply','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','updateComment','870664OYMeBY','UNIVER_UNKNOWN','symbol','defineProperty','3931740HkgxHN','/list','dataSource','/edit','type','2766gefcSB','/add','Solved','listComments','map','35rhqpDw','delete','get','personId','Add','/universer-api/comment/unit/','parse','addComment','386772kwDwfN','forEach','add','getUnit','format','YYYY/MM/DD\x20HH:mm','parentId','_threadCommentDataSource','resolveComment','error','subscribe','saveCommentToSnapshot','onReady','rangeType','ref','stringify','replyId','values','_configService','createTimestamp','_injector','comments','_commentService','post','getOwnPropertyDescriptor','setConfig','/universer-api/user/list','commentUpdate$','addUser','getComment','pipe','_userService','_threadCommentDataSourceService','_initDataSource','getMemberID','deleteComment','thread-comment-data-source.config','Edit','onStarting','user','getUser','_threadCommentModel','Solve','solved','filter','COMMENT','disposeWithMe','code','_httpService','content','unitId'];_0x5d44=function(){return _0x24d7fe;};return _0x5d44();}import{UniverThreadCommentUIPlugin as _0x33ba46}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54e638,IThreadCommentDataSourceService as _0x7340a4}from'@univerjs/thread-comment';import{bufferTime as _0x3ed3f1}from'rxjs';import{HTTPService as _0x23a127}from'@univerjs/network';const W=_0x1c4990(0xff);var I=(_0x3e2845=>(_0x3e2845[_0x3e2845[_0x1c4990(0xf0)]=0x0]='OpenOrReOpen',_0x3e2845[_0x3e2845[_0x1c4990(0x10d)]=0x1]='Solved',_0x3e2845[_0x3e2845[_0x1c4990(0xe3)]=-0x1]=_0x1c4990(0xe3),_0x3e2845))(I||{}),v=(_0xb69aba=>(_0xb69aba[_0xb69aba[_0x1c4990(0xec)]=0x0]=_0x1c4990(0xec),_0xb69aba[_0xb69aba[_0x1c4990(0x114)]=0x1]=_0x1c4990(0x114),_0xb69aba[_0xb69aba[_0x1c4990(0xed)]=0x2]=_0x1c4990(0xed),_0xb69aba[_0xb69aba[_0x1c4990(0xd3)]=0x3]=_0x1c4990(0xd3),_0xb69aba[_0xb69aba[_0x1c4990(0xe2)]=0x4]=_0x1c4990(0xe2),_0xb69aba[_0xb69aba[_0x1c4990(0xd8)]=0x5]=_0x1c4990(0xd8),_0xb69aba[_0xb69aba[_0x1c4990(0xe3)]=-0x1]='UNRECOGNIZED',_0xb69aba))(v||{});function _0x37a2(_0x4089be,_0x559117){_0x4089be=_0x4089be-0xc3;const _0x5d44ad=_0x5d44();let _0x37a29e=_0x5d44ad[_0x4089be];return _0x37a29e;}const y=_0x40d80b=>_0x5b2334(new Date(+_0x40d80b))[_0x1c4990(0x11c)](_0x1c4990(0x11d)),B=async(_0x3cc7f2,_0x442646)=>{const _0x3429a9=_0x1c4990,_0x5a03fc=_0x3cc7f2[_0x3429a9(0x112)](_0x4e911f),_0x2fda37=_0x3cc7f2['get'](_0x23a127);_0x442646[_0x3429a9(0x119)](_0x4dcb1c=>{const _0x24859f=_0x3429a9;_0x5a03fc[_0x24859f(0xd6)](_0x4dcb1c)&&_0x442646[_0x24859f(0x111)](_0x4dcb1c);}),_0x442646['size']&&(await _0x2fda37[_0x3429a9(0x112)](_0x3429a9(0xc8),{'params':{'userIDs':[..._0x442646]}}))[_0x3429a9(0xf1)][_0x3429a9(0xe9)][_0x3429a9(0x119)](_0x39929e=>{const _0x55272c=_0x3429a9;_0x39929e&&_0x5a03fc[_0x55272c(0xca)](_0x39929e);});};var K=Object[_0x1c4990(0xc6)],V=(_0x36a719,_0x446352,_0x630a7a,_0x19e310)=>{const _0x296f3c=_0x1c4990;for(var _0x1a0b07=_0x19e310>0x1?void 0x0:_0x19e310?K(_0x446352,_0x630a7a):_0x446352,_0x350ed8=_0x36a719[_0x296f3c(0x100)]-0x1,_0x47c209;_0x350ed8>=0x0;_0x350ed8--)(_0x47c209=_0x36a719[_0x350ed8])&&(_0x1a0b07=_0x47c209(_0x1a0b07)||_0x1a0b07);return _0x1a0b07;},p=(_0x4f7ad6,_0x5ef58f)=>(_0x26b672,_0x161874)=>_0x5ef58f(_0x26b672,_0x161874,_0x4f7ad6);let _=class extends _0x2c9fc3{constructor(_0x7df6b6,_0x43303f,_0xc1cb11,_0x76d89f){const _0x3510e0=_0x1c4990;super(),this[_0x3510e0(0xc4)]=_0x7df6b6,this[_0x3510e0(0xd7)]=_0x43303f,this['_userService']=_0xc1cb11,this[_0x3510e0(0x12c)]=_0x76d89f,this[_0x3510e0(0xf4)](),this[_0x3510e0(0xf9)]();}[_0x1c4990(0xf9)](){const _0x233f80=_0x1c4990;this[_0x233f80(0xdc)](this['_threadCommentModel'][_0x233f80(0xc9)][_0x233f80(0xcc)](_0x3ed3f1(0x10))[_0x233f80(0x122)](_0x14df9b=>{const _0x175d5a=_0x233f80,_0x4753e7=new Set();_0x14df9b[_0x175d5a(0x119)](_0x40cd96=>{const _0x298787=_0x175d5a;if(_0x40cd96[_0x298787(0x10a)]===_0x298787(0x11a)){const _0x179b2f=_0x40cd96['payload'][_0x298787(0x113)];_0x4753e7[_0x298787(0x11a)](_0x179b2f);}}),B(this[_0x175d5a(0x12c)],_0x4753e7);}));}[_0x1c4990(0xf4)](){const _0x4c9bf3=_0x1c4990;this[_0x4c9bf3(0xdc)](this[_0x4c9bf3(0xc4)][_0x4c9bf3(0xc9)][_0x4c9bf3(0x122)](async _0x123081=>{const _0x1a1548=_0x4c9bf3;var _0x58c976,_0x5013ef,_0x56f182,_0x433c01;const _0x15b03a=(_0x58c976=this[_0x1a1548(0xd7)][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x12282c=>_0x12282c[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x58c976[_0x1a1548(0xfc)];if(!_0x15b03a)return;const {unitId:_0x5b2556,subUnitId:_0x47606f}=_0x15b03a;switch(_0x123081[_0x1a1548(0xd5)]&&this[_0x1a1548(0xcd)][_0x1a1548(0xca)](_0x123081['user']),_0x123081[_0x1a1548(0x10a)]){case v[_0x1a1548(0x114)]:break;case v['Reply']:{this[_0x1a1548(0xd7)][_0x1a1548(0x117)](_0x5b2556,_0x47606f,{'unitId':_0x5b2556,'subUnitId':_0x47606f,'ref':'','id':_0x123081[_0x1a1548(0x128)],'dT':y(+_0x123081[_0x1a1548(0x12b)]),'threadId':_0x123081[_0x1a1548(0xf3)],'personId':(_0x56f182=(_0x5013ef=_0x123081[_0x1a1548(0xd5)])==null?void 0x0:_0x5013ef['userID'])!=null?_0x56f182:_0x123081['userId'],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)]),'parentId':_0x15b03a['id']});break;}case v['Delete']:{const _0x37fef5=this[_0x1a1548(0xd7)][_0x1a1548(0xcb)](_0x5b2556,_0x47606f,_0x123081['replyId']);_0x37fef5&&_0x37fef5[_0x1a1548(0x11e)]&&this[_0x1a1548(0xd7)]['deleteComment'](_0x5b2556,_0x47606f,_0x123081[_0x1a1548(0x128)]);break;}case v[_0x1a1548(0xd3)]:{this[_0x1a1548(0xd7)][_0x1a1548(0x101)](_0x5b2556,_0x47606f,{'commentId':_0x123081[_0x1a1548(0x128)],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)])});break;}case v[_0x1a1548(0xd8)]:{const _0x5b1f61=(_0x433c01=this['_threadCommentModel'][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x383b3f=>_0x383b3f[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x433c01[_0x1a1548(0xfc)];_0x5b1f61&&this[_0x1a1548(0xd7)][_0x1a1548(0x120)](_0x5b2556,_0x47606f,_0x5b1f61['id'],_0x123081['solved']===I[_0x1a1548(0x10d)]);break;}}}));}};_=V([p(0x0,_0x108585(_0x278af8)),p(0x1,_0x108585(_0x54e638)),p(0x2,_0x108585(_0x4e911f)),p(0x3,_0x108585(_0x2d7221))],_);const z=_0x1c4990(0xd2),O={};var k=Object[_0x1c4990(0xc6)],Q=(_0x4bb896,_0x3c563d,_0x3dcc2e,_0x3a5e29)=>{for(var _0x223ec3=_0x3a5e29>0x1?void 0x0:_0x3a5e29?k(_0x3c563d,_0x3dcc2e):_0x3c563d,_0x53dec0=_0x4bb896['length']-0x1,_0x56ffab;_0x53dec0>=0x0;_0x53dec0--)(_0x56ffab=_0x4bb896[_0x53dec0])&&(_0x223ec3=_0x56ffab(_0x223ec3)||_0x223ec3);return _0x223ec3;},b=(_0x267a8b,_0x437b0f)=>(_0x81f267,_0x5e3a5f)=>_0x437b0f(_0x81f267,_0x5e3a5f,_0x267a8b);function X(_0x3f0a39,_0x34f7d2){const _0x13a7d7=_0x1c4990,_0x34b8a7=_0x3f0a39[_0x13a7d7(0xf5)][0x0];return{..._0x34f7d2,'id':_0x34b8a7[_0x13a7d7(0x128)],'resolved':_0x3f0a39[_0x13a7d7(0xd9)]===0x1,'dT':y(_0x34b8a7[_0x13a7d7(0x12b)]),'personId':_0x34b8a7[_0x13a7d7(0xe1)],'threadId':_0x34b8a7['threadId']};}function ee(_0x748a8d,_0x2fef79,_0x5407fb){const _0x395350=_0x1c4990;var _0x199550,_0x5b80fe;if(((_0x5b80fe=(_0x199550=_0x748a8d==null?void 0x0:_0x748a8d[_0x395350(0xf5)])==null?void 0x0:_0x199550['length'])!=null?_0x5b80fe:0x0)>0x0){const _0x41758e=(_0x4f7dee,_0x169062)=>({'id':_0x4f7dee[_0x395350(0x128)],'threadId':_0x4f7dee['threadId'],'dT':y(_0x4f7dee['createTimestamp']),'personId':_0x4f7dee[_0x395350(0xe1)],'resolved':_0x748a8d[_0x395350(0xd9)]===I[_0x395350(0x10d)],'unitId':_0x2fef79,'subUnitId':_0x5407fb,'text':JSON[_0x395350(0x116)](_0x4f7dee[_0x395350(0xdf)]),'parentId':_0x169062}),_0x391086=_0x41758e(_0x748a8d[_0x395350(0xf5)][0x0]);return{..._0x391086,'children':_0x748a8d['replies'][_0x395350(0xeb)](0x1)[_0x395350(0x10f)](_0x2eb096=>_0x41758e(_0x2eb096,_0x391086['id']))};}return null;}let S=class{constructor(_0x50ab96,_0x3aaf62,_0x554d8e){const _0x2fea0f=_0x1c4990;this[_0x2fea0f(0xde)]=_0x50ab96,this[_0x2fea0f(0xcd)]=_0x3aaf62,this[_0x2fea0f(0xe5)]=_0x554d8e;}async[_0x1c4990(0x117)](_0x1a7d5f){const _0x749028=_0x1c4990;var _0x52c72b,_0x15a47e;const {parentId:_0x490d09,unitId:_0x396f65,text:_0x3004c3,threadId:_0x513f4c}=_0x1a7d5f,_0x2e4409=(_0x15a47e=(_0x52c72b=_0x3004c3[_0x749028(0xf6)])==null?void 0x0:_0x52c72b[_0x749028(0xda)](_0x165cfc=>_0x165cfc[_0x749028(0x125)]===_0x11ff2a[_0x749028(0xdb)])[_0x749028(0x10f)](_0x186c68=>_0x186c68[_0x749028(0xfe)]))!=null?_0x15a47e:[],_0x2184b9=JSON[_0x749028(0x127)](_0x3004c3),_0x385dd5=(await this[_0x749028(0xe5)][_0x749028(0xe8)](_0x396f65))[_0x749028(0xd0)]();if(_0x490d09){const _0x487cfe={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409,'threadId':_0x513f4c},_0x422576=(await this[_0x749028(0xde)][_0x749028(0xc5)]('/universer-api/comment/unit/'+_0x396f65+_0x749028(0xfd),{'body':_0x487cfe}))[_0x749028(0xf1)][_0x749028(0xe7)];return{..._0x1a7d5f,'id':_0x422576[_0x749028(0x128)],'dT':_0x5b2334(+_0x422576['createTimestamp'])[_0x749028(0x11c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x422576[_0x749028(0xe1)]};}else{const _0x369960={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409},_0x535b31=await this[_0x749028(0xde)][_0x749028(0xc5)](_0x749028(0x115)+_0x396f65+_0x749028(0x10c),{'body':_0x369960});return X(_0x535b31['body']['comment'],_0x1a7d5f);}}async['updateComment'](_0x369df0){const _0x48629d=_0x1c4990;var _0x23b1d0,_0x36d45c;const {text:_0x404232,unitId:_0x41e7b6}=_0x369df0,_0x29d593=(_0x36d45c=(_0x23b1d0=_0x404232[_0x48629d(0xf6)])==null?void 0x0:_0x23b1d0[_0x48629d(0xda)](_0x1806e6=>_0x1806e6['rangeType']===_0x11ff2a['COMMENT'])[_0x48629d(0x10f)](_0xae005d=>_0xae005d[_0x48629d(0xfe)]))!=null?_0x36d45c:[],_0x171d31=JSON['stringify'](_0x404232),_0x1c7e3a=_0x369df0['threadId'],_0x2b5a73=_0x369df0['id'],_0x3f7d42={'memberId':(await this[_0x48629d(0xe5)]['requireSession'](_0x41e7b6))['getMemberID'](),'unitId':_0x41e7b6,'threadId':_0x1c7e3a,'mention':_0x29d593,'content':_0x171d31,'replyId':_0x2b5a73},_0x4c3a8b=await this[_0x48629d(0xde)]['post']('/universer-api/comment/unit/'+_0x41e7b6+_0x48629d(0x109),{'body':_0x3f7d42});return!_0x4c3a8b['body'][_0x48629d(0x121)]||_0x4c3a8b[_0x48629d(0xf1)][_0x48629d(0x121)][_0x48629d(0xdd)]===0x1;}async['resolveComment'](_0x3e49a5){const _0x8f86e2=_0x1c4990,{unitId:_0x20fc31}=_0x3e49a5,_0x2f95c2=_0x3e49a5['threadId'],_0x2a8a3f={'memberId':this[_0x8f86e2(0xcd)]['getCurrentUser']()[_0x8f86e2(0xf8)],'unitId':_0x20fc31,'threadId':_0x2f95c2,'solved':_0x3e49a5[_0x8f86e2(0xfb)]?I[_0x8f86e2(0x10d)]:I[_0x8f86e2(0xf0)]},_0x2bbce0=await this['_httpService'][_0x8f86e2(0xc5)](_0x8f86e2(0x115)+_0x20fc31+'/solved',{'body':_0x2a8a3f});return!_0x2bbce0[_0x8f86e2(0xf1)]['error']||_0x2bbce0['body'][_0x8f86e2(0x121)][_0x8f86e2(0xdd)]===0x1;}async[_0x1c4990(0xd1)](_0x24fcdd,_0x1288a7,_0x53f267,_0x2f707f){const _0x141d46=_0x1c4990,_0x160c26={'memberId':(await this[_0x141d46(0xe5)][_0x141d46(0xe8)](_0x24fcdd))['getMemberID'](),'threadId':_0x53f267,'replyId':_0x2f707f,'unitId':_0x24fcdd},_0x3b8df8=await this[_0x141d46(0xde)][_0x141d46(0xc5)](_0x141d46(0x115)+_0x24fcdd+_0x141d46(0xe4),{'body':_0x160c26});return!_0x3b8df8['body'][_0x141d46(0x121)]||_0x3b8df8['body']['error'][_0x141d46(0xdd)]===0x1;}async[_0x1c4990(0x10e)](_0x55bc69,_0x53a9ce,_0x330570){const _0x2439f2=_0x1c4990,_0x16ee93={'unitId':_0x55bc69,'threadId':_0x330570},_0x5c7c4d=await this[_0x2439f2(0xde)][_0x2439f2(0xc5)](_0x2439f2(0x115)+_0x55bc69+_0x2439f2(0x107),{'body':_0x16ee93}),_0x2cfb57=_0x330570[_0x2439f2(0x10f)](_0xb9d311=>ee(_0x5c7c4d['body'][_0x2439f2(0xc3)][_0xb9d311],_0x55bc69,_0x53a9ce))[_0x2439f2(0xda)](Boolean);return Object[_0x2439f2(0x129)](_0x5c7c4d[_0x2439f2(0xf1)][_0x2439f2(0xe9)])['forEach'](_0x5c2d1c=>{const _0x17d590=_0x2439f2;this['_userService'][_0x17d590(0xca)](_0x5c2d1c);}),_0x2cfb57;}[_0x1c4990(0x123)](_0x19e459){const _0x218cc9=_0x1c4990;return{'id':_0x19e459['id'],'threadId':_0x19e459[_0x218cc9(0xf3)],'ref':_0x19e459[_0x218cc9(0x126)]};}};S=Q([b(0x0,_0x108585(_0x23a127)),b(0x1,_0x108585(_0x4e911f)),b(0x2,_0x108585(_0x5417b5))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x1b4820,_0x1d946c,_0x470e7d,_0x2b234e)=>{const _0x2932ec=_0x1c4990;for(var _0x2aafea=_0x2b234e>0x1?void 0x0:_0x2b234e?re(_0x1d946c,_0x470e7d):_0x1d946c,_0x5522c6=_0x1b4820[_0x2932ec(0x100)]-0x1,_0x2227b2;_0x5522c6>=0x0;_0x5522c6--)(_0x2227b2=_0x1b4820[_0x5522c6])&&(_0x2aafea=_0x2227b2(_0x2aafea)||_0x2aafea);return _0x2aafea;},M=(_0x3f0353,_0x381eb5)=>(_0xad62ff,_0x2c6546)=>_0x381eb5(_0xad62ff,_0x2c6546,_0x3f0353);let f=class extends _0x2c9fc3{constructor(_0x4d80fa,_0x4e8550){const _0x507e42=_0x1c4990;super(),this[_0x507e42(0xce)]=_0x4d80fa,this[_0x507e42(0x11f)]=_0x4e8550,this['_initDataSource']();}[_0x1c4990(0xcf)](){const _0x273b0e=_0x1c4990;this[_0x273b0e(0xce)][_0x273b0e(0x108)]=this[_0x273b0e(0x11f)],this[_0x273b0e(0xce)][_0x273b0e(0xea)]=!0x1;}};f=te([M(0x0,_0x7340a4),M(0x1,_0x108585(S))],f);var se=Object[_0x1c4990(0x105)],oe=Object[_0x1c4990(0xc6)],ne=(_0x2e56ff,_0x1a590,_0x2984f2)=>_0x1a590 in _0x2e56ff?se(_0x2e56ff,_0x1a590,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2984f2}):_0x2e56ff[_0x1a590]=_0x2984f2,ie=(_0x8bb360,_0x469d97,_0x529a7e,_0x6b3b8)=>{const _0x1e3213=_0x1c4990;for(var _0x4bae41=_0x6b3b8>0x1?void 0x0:_0x6b3b8?oe(_0x469d97,_0x529a7e):_0x469d97,_0x87d4aa=_0x8bb360[_0x1e3213(0x100)]-0x1,_0x297edd;_0x87d4aa>=0x0;_0x87d4aa--)(_0x297edd=_0x8bb360[_0x87d4aa])&&(_0x4bae41=_0x297edd(_0x4bae41)||_0x4bae41);return _0x4bae41;},N=(_0x5071fe,_0xf3b938)=>(_0x41a703,_0x4bbe2e)=>_0xf3b938(_0x41a703,_0x4bbe2e,_0x5071fe),$=(_0x134d42,_0x2ee20b,_0x11136e)=>ne(_0x134d42,typeof _0x2ee20b!=_0x1c4990(0x104)?_0x2ee20b+'':_0x2ee20b,_0x11136e);let g=class extends _0x21d69d{constructor(_0x416df8=O,_0x2e5463,_0xe1cafb){const _0x57e98c=_0x1c4990;super(),this[_0x57e98c(0xe6)]=_0x416df8,this[_0x57e98c(0x12c)]=_0x2e5463,this[_0x57e98c(0x12a)]=_0xe1cafb;const {..._0x39e32f}=_0x49cd4d({},O,this[_0x57e98c(0xe6)]);this[_0x57e98c(0x12a)][_0x57e98c(0xc7)](z,_0x39e32f);}[_0x1c4990(0xd4)](){[[S],[f],[_]]['forEach'](_0x42786a=>{const _0x108275=_0x37a2;this[_0x108275(0x12c)][_0x108275(0x11a)](_0x42786a);});}[_0x1c4990(0x124)](){const _0x440764=_0x1c4990;this[_0x440764(0x12c)][_0x440764(0x112)](f),this['_injector'][_0x440764(0x112)](_);}};$(g,_0x1c4990(0xfa),W),$(g,_0x1c4990(0x10a),_0x22c964[_0x1c4990(0x103)]),g=ie([_0x4a4332(_0x33ba46,_0x4fb59d,_0x2c8ed9),N(0x1,_0x108585(_0x2d7221)),N(0x2,_0x440bd9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16030e=_0x4fd3;(function(_0x570c,_0x4d7997){const _0x3d990a=_0x4fd3,_0x4e4308=_0x570c();while(!![]){try{const _0x103bbb=-parseInt(_0x3d990a(0x140))/0x1+-parseInt(_0x3d990a(0x186))/0x2+parseInt(_0x3d990a(0x18f))/0x3+-parseInt(_0x3d990a(0x17e))/0x4*(parseInt(_0x3d990a(0x179))/0x5)+-parseInt(_0x3d990a(0x146))/0x6+parseInt(_0x3d990a(0x135))/0x7*(parseInt(_0x3d990a(0x13c))/0x8)+parseInt(_0x3d990a(0x183))/0x9;if(_0x103bbb===_0x4d7997)break;else _0x4e4308['push'](_0x4e4308['shift']());}catch(_0x5004f4){_0x4e4308['push'](_0x4e4308['shift']());}}}(_0x4737,0x7f1cb));import{CommentService as _0x461905,CollaborationSessionService as _0x5409b3,UniverCollaborationClientPlugin as _0x32afc7}from'@univerjs-pro/collaboration-client';function _0x4737(){const _0x41a910=['/universer-api/comment/unit/','userId','onReady','Reply','deleteComment','getUnit','listComments','solved','resolveComment','/delete','replyId','commentUpdate$','personId','_configService','10JbznCh','symbol','find','/add','code','468612jUVmvX','_initUserSync','/universer-api/user/list','users','values','13170312CDXJTA','OpenOrReOpen','_userService','792528OCOSPx','getCurrentUser','filter','UNIVER_UNKNOWN','_httpService','_initDataSource','addComment','_config','unitId','2040699MSjwGq','setConfig','delete','error','getOwnPropertyDescriptor','saveCommentToSnapshot','forEach','parse','userID','21iszxVW','defineProperty','_sessionService','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','body','Add','1120672iHLxwB','addUser','content','subscribe','786605UwPaVy','add','_init','map','_injector','/list','3756162wvvWEk','/solved','getUser','updateComment','rangeType','disposeWithMe','size','Solved','_threadCommentModel','format','UNRECOGNIZED','rangeId','COMMENT','reply','createTimestamp','_threadCommentDataSourceService','Delete','slice','requireSession','Edit','length','Unknown','post','replies','getMemberID','Solve','threadId','parentId','stringify','customRanges','user','root','getComment','resolved','get','_commentService','/reply'];_0x4737=function(){return _0x41a910;};return _0x4737();}import{UniverLicensePlugin as _0x15cb9c}from'@univerjs-pro/license';import{dayjs as _0x3452f2,UserManagerService as _0x42539e,Inject as _0x232c4f,Injector as _0x291ac5,Disposable as _0x420710,CustomRangeType as _0x3f0bbe,UniverInstanceType as _0x2c1c94,DependentOn as _0x3102ce,Plugin as _0x1d2449,merge as _0x3b1644,IConfigService as _0x1b3c83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9ebaf1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x7b32fd,IThreadCommentDataSourceService as _0x25fc8b}from'@univerjs/thread-comment';import{bufferTime as _0x1985d4}from'rxjs';import{HTTPService as _0x349971}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x527823=>(_0x527823[_0x527823[_0x16030e(0x184)]=0x0]=_0x16030e(0x184),_0x527823[_0x527823[_0x16030e(0x14d)]=0x1]=_0x16030e(0x14d),_0x527823[_0x527823['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x527823))(I||{}),v=(_0x363897=>(_0x363897[_0x363897[_0x16030e(0x15b)]=0x0]=_0x16030e(0x15b),_0x363897[_0x363897[_0x16030e(0x13b)]=0x1]=_0x16030e(0x13b),_0x363897[_0x363897[_0x16030e(0x16e)]=0x2]=_0x16030e(0x16e),_0x363897[_0x363897[_0x16030e(0x159)]=0x3]=_0x16030e(0x159),_0x363897[_0x363897[_0x16030e(0x156)]=0x4]=_0x16030e(0x156),_0x363897[_0x363897[_0x16030e(0x15f)]=0x5]=_0x16030e(0x15f),_0x363897[_0x363897[_0x16030e(0x150)]=-0x1]=_0x16030e(0x150),_0x363897))(v||{});const y=_0x4d52b0=>_0x3452f2(new Date(+_0x4d52b0))[_0x16030e(0x14f)](_0x16030e(0x138)),B=async(_0x723b93,_0x38ae3d)=>{const _0x45ab6b=_0x16030e,_0x4d6b91=_0x723b93[_0x45ab6b(0x168)](_0x42539e),_0x1eb950=_0x723b93[_0x45ab6b(0x168)](_0x349971);_0x38ae3d[_0x45ab6b(0x132)](_0x2bbfb3=>{const _0x325383=_0x45ab6b;_0x4d6b91[_0x325383(0x148)](_0x2bbfb3)&&_0x38ae3d[_0x325383(0x191)](_0x2bbfb3);}),_0x38ae3d[_0x45ab6b(0x14c)]&&(await _0x1eb950[_0x45ab6b(0x168)](_0x45ab6b(0x180),{'params':{'userIDs':[..._0x38ae3d]}}))[_0x45ab6b(0x13a)][_0x45ab6b(0x181)][_0x45ab6b(0x132)](_0x574b81=>{const _0x10a9c9=_0x45ab6b;_0x574b81&&_0x4d6b91[_0x10a9c9(0x13d)](_0x574b81);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x422c9a,_0x41893e,_0x40d3c0,_0x4ede76)=>{for(var _0x7d4ceb=_0x4ede76>0x1?void 0x0:_0x4ede76?K(_0x41893e,_0x40d3c0):_0x41893e,_0x1e7fd5=_0x422c9a['length']-0x1,_0x3024da;_0x1e7fd5>=0x0;_0x1e7fd5--)(_0x3024da=_0x422c9a[_0x1e7fd5])&&(_0x7d4ceb=_0x3024da(_0x7d4ceb)||_0x7d4ceb);return _0x7d4ceb;},p=(_0x1fea2f,_0x161859)=>(_0x360840,_0x4929e1)=>_0x161859(_0x360840,_0x4929e1,_0x1fea2f);let _=class extends _0x420710{constructor(_0x4e5406,_0x3e96ae,_0x41e4e7,_0x4d4c75){const _0x49d77a=_0x16030e;super(),this[_0x49d77a(0x169)]=_0x4e5406,this['_threadCommentModel']=_0x3e96ae,this[_0x49d77a(0x185)]=_0x41e4e7,this[_0x49d77a(0x144)]=_0x4d4c75,this[_0x49d77a(0x142)](),this[_0x49d77a(0x17f)]();}[_0x16030e(0x17f)](){const _0x49cf73=_0x16030e;this[_0x49cf73(0x14b)](this[_0x49cf73(0x14e)][_0x49cf73(0x176)]['pipe'](_0x1985d4(0x10))['subscribe'](_0x5ee4c0=>{const _0x107253=_0x49cf73,_0x5f0f7b=new Set();_0x5ee4c0[_0x107253(0x132)](_0x1dd8a2=>{const _0x3a1b87=_0x107253;if(_0x1dd8a2['type']===_0x3a1b87(0x141)){const _0x1bb66f=_0x1dd8a2['payload'][_0x3a1b87(0x177)];_0x5f0f7b[_0x3a1b87(0x141)](_0x1bb66f);}}),B(this[_0x107253(0x144)],_0x5f0f7b);}));}[_0x16030e(0x142)](){const _0x3fe3f4=_0x16030e;this[_0x3fe3f4(0x14b)](this['_commentService'][_0x3fe3f4(0x176)][_0x3fe3f4(0x13f)](async _0x3162a4=>{const _0x1c2bc1=_0x3fe3f4;var _0xa9cacb,_0x3a6163,_0x5a3b2e,_0x178f57;const _0x59d2ff=(_0xa9cacb=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0xb58524=>_0xb58524[_0x1c2bc1(0x160)]===_0x3162a4['threadId']))==null?void 0x0:_0xa9cacb['root'];if(!_0x59d2ff)return;const {unitId:_0xd798b3,subUnitId:_0x46e6cd}=_0x59d2ff;switch(_0x3162a4['user']&&this[_0x1c2bc1(0x185)][_0x1c2bc1(0x13d)](_0x3162a4[_0x1c2bc1(0x164)]),_0x3162a4['type']){case v[_0x1c2bc1(0x13b)]:break;case v[_0x1c2bc1(0x16e)]:{this['_threadCommentModel']['addComment'](_0xd798b3,_0x46e6cd,{'unitId':_0xd798b3,'subUnitId':_0x46e6cd,'ref':'','id':_0x3162a4['replyId'],'dT':y(+_0x3162a4['createTimestamp']),'threadId':_0x3162a4['threadId'],'personId':(_0x5a3b2e=(_0x3a6163=_0x3162a4['user'])==null?void 0x0:_0x3a6163[_0x1c2bc1(0x134)])!=null?_0x5a3b2e:_0x3162a4['userId'],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)]),'parentId':_0x59d2ff['id']});break;}case v[_0x1c2bc1(0x156)]:{const _0x42a236=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x166)](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);_0x42a236&&_0x42a236[_0x1c2bc1(0x161)]&&this['_threadCommentModel']['deleteComment'](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);break;}case v['Edit']:{this[_0x1c2bc1(0x14e)]['updateComment'](_0xd798b3,_0x46e6cd,{'commentId':_0x3162a4[_0x1c2bc1(0x175)],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)])});break;}case v[_0x1c2bc1(0x15f)]:{const _0x153a77=(_0x178f57=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0x147fc5=>_0x147fc5['threadId']===_0x3162a4['threadId']))==null?void 0x0:_0x178f57[_0x1c2bc1(0x165)];_0x153a77&&this[_0x1c2bc1(0x14e)]['resolveComment'](_0xd798b3,_0x46e6cd,_0x153a77['id'],_0x3162a4[_0x1c2bc1(0x172)]===I[_0x1c2bc1(0x14d)]);break;}}}));}};_=V([p(0x0,_0x232c4f(_0x461905)),p(0x1,_0x232c4f(_0x7b32fd)),p(0x2,_0x232c4f(_0x42539e)),p(0x3,_0x232c4f(_0x291ac5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x16030e(0x130)],Q=(_0x1cbaa2,_0x39d4b3,_0x2659d2,_0x4b1351)=>{const _0x285813=_0x16030e;for(var _0x3d2101=_0x4b1351>0x1?void 0x0:_0x4b1351?k(_0x39d4b3,_0x2659d2):_0x39d4b3,_0x2abc04=_0x1cbaa2[_0x285813(0x15a)]-0x1,_0x3a7ece;_0x2abc04>=0x0;_0x2abc04--)(_0x3a7ece=_0x1cbaa2[_0x2abc04])&&(_0x3d2101=_0x3a7ece(_0x3d2101)||_0x3d2101);return _0x3d2101;},b=(_0x54d628,_0x39f988)=>(_0x3a8cc9,_0x105b52)=>_0x39f988(_0x3a8cc9,_0x105b52,_0x54d628);function X(_0x4a8b4e,_0x1b8b6c){const _0x166944=_0x16030e,_0x205cea=_0x4a8b4e[_0x166944(0x15d)][0x0];return{..._0x1b8b6c,'id':_0x205cea['replyId'],'resolved':_0x4a8b4e[_0x166944(0x172)]===0x1,'dT':y(_0x205cea[_0x166944(0x154)]),'personId':_0x205cea['userId'],'threadId':_0x205cea[_0x166944(0x160)]};}function ee(_0x5944be,_0x41049d,_0x279b53){const _0x2e6a62=_0x16030e;var _0x2d3b89,_0x55de9e;if(((_0x55de9e=(_0x2d3b89=_0x5944be==null?void 0x0:_0x5944be[_0x2e6a62(0x15d)])==null?void 0x0:_0x2d3b89['length'])!=null?_0x55de9e:0x0)>0x0){const _0x3ebed1=(_0x1fc046,_0x205c33)=>({'id':_0x1fc046[_0x2e6a62(0x175)],'threadId':_0x1fc046[_0x2e6a62(0x160)],'dT':y(_0x1fc046[_0x2e6a62(0x154)]),'personId':_0x1fc046[_0x2e6a62(0x16c)],'resolved':_0x5944be[_0x2e6a62(0x172)]===I[_0x2e6a62(0x14d)],'unitId':_0x41049d,'subUnitId':_0x279b53,'text':JSON[_0x2e6a62(0x133)](_0x1fc046['content']),'parentId':_0x205c33}),_0x1970ce=_0x3ebed1(_0x5944be[_0x2e6a62(0x15d)][0x0]);return{..._0x1970ce,'children':_0x5944be[_0x2e6a62(0x15d)][_0x2e6a62(0x157)](0x1)['map'](_0xd684d9=>_0x3ebed1(_0xd684d9,_0x1970ce['id']))};}return null;}let S=class{constructor(_0x466874,_0x2f23b8,_0x83f2d0){const _0x1c7807=_0x16030e;this['_httpService']=_0x466874,this[_0x1c7807(0x185)]=_0x2f23b8,this[_0x1c7807(0x137)]=_0x83f2d0;}async[_0x16030e(0x18c)](_0x5aa5b4){const _0xc4f2e3=_0x16030e;var _0x581b45,_0x2930af;const {parentId:_0x8beb0c,unitId:_0x42cddc,text:_0x2cd8df,threadId:_0x342497}=_0x5aa5b4,_0x84a48f=(_0x2930af=(_0x581b45=_0x2cd8df[_0xc4f2e3(0x163)])==null?void 0x0:_0x581b45[_0xc4f2e3(0x188)](_0x1c8fc9=>_0x1c8fc9[_0xc4f2e3(0x14a)]===_0x3f0bbe[_0xc4f2e3(0x152)])[_0xc4f2e3(0x143)](_0x4ae62e=>_0x4ae62e[_0xc4f2e3(0x151)]))!=null?_0x2930af:[],_0x361378=JSON[_0xc4f2e3(0x162)](_0x2cd8df),_0x4cd559=(await this['_sessionService'][_0xc4f2e3(0x158)](_0x42cddc))[_0xc4f2e3(0x15e)]();if(_0x8beb0c){const _0x4888b4={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f,'threadId':_0x342497},_0x169cc2=(await this['_httpService']['post'](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x16a),{'body':_0x4888b4}))[_0xc4f2e3(0x13a)][_0xc4f2e3(0x153)];return{..._0x5aa5b4,'id':_0x169cc2[_0xc4f2e3(0x175)],'dT':_0x3452f2(+_0x169cc2['createTimestamp'])[_0xc4f2e3(0x14f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x169cc2['userId']};}else{const _0x240c86={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f},_0x517858=await this['_httpService'][_0xc4f2e3(0x15c)](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x17c),{'body':_0x240c86});return X(_0x517858[_0xc4f2e3(0x13a)]['comment'],_0x5aa5b4);}}async[_0x16030e(0x149)](_0x3ec974){const _0x3e9946=_0x16030e;var _0x136404,_0x29f46f;const {text:_0x5328b6,unitId:_0x1020df}=_0x3ec974,_0x4f98ac=(_0x29f46f=(_0x136404=_0x5328b6[_0x3e9946(0x163)])==null?void 0x0:_0x136404[_0x3e9946(0x188)](_0x45da1a=>_0x45da1a[_0x3e9946(0x14a)]===_0x3f0bbe[_0x3e9946(0x152)])[_0x3e9946(0x143)](_0x30a16e=>_0x30a16e[_0x3e9946(0x151)]))!=null?_0x29f46f:[],_0x1be7f9=JSON['stringify'](_0x5328b6),_0x409195=_0x3ec974[_0x3e9946(0x160)],_0x1d77f9=_0x3ec974['id'],_0x5d93e5={'memberId':(await this[_0x3e9946(0x137)][_0x3e9946(0x158)](_0x1020df))['getMemberID'](),'unitId':_0x1020df,'threadId':_0x409195,'mention':_0x4f98ac,'content':_0x1be7f9,'replyId':_0x1d77f9},_0x534ca5=await this[_0x3e9946(0x18a)][_0x3e9946(0x15c)](_0x3e9946(0x16b)+_0x1020df+'/edit',{'body':_0x5d93e5});return!_0x534ca5[_0x3e9946(0x13a)]['error']||_0x534ca5[_0x3e9946(0x13a)][_0x3e9946(0x12f)][_0x3e9946(0x17d)]===0x1;}async[_0x16030e(0x173)](_0x30c38f){const _0x1f349e=_0x16030e,{unitId:_0x5df38a}=_0x30c38f,_0x34d904=_0x30c38f[_0x1f349e(0x160)],_0x5d1d1d={'memberId':this['_userService'][_0x1f349e(0x187)]()[_0x1f349e(0x134)],'unitId':_0x5df38a,'threadId':_0x34d904,'solved':_0x30c38f[_0x1f349e(0x167)]?I[_0x1f349e(0x14d)]:I[_0x1f349e(0x184)]},_0xd8d62a=await this[_0x1f349e(0x18a)][_0x1f349e(0x15c)](_0x1f349e(0x16b)+_0x5df38a+_0x1f349e(0x147),{'body':_0x5d1d1d});return!_0xd8d62a['body'][_0x1f349e(0x12f)]||_0xd8d62a[_0x1f349e(0x13a)]['error'][_0x1f349e(0x17d)]===0x1;}async[_0x16030e(0x16f)](_0x233cbd,_0x1431f7,_0x2c4771,_0x4a6fb9){const _0x5f3859=_0x16030e,_0x146e76={'memberId':(await this[_0x5f3859(0x137)][_0x5f3859(0x158)](_0x233cbd))['getMemberID'](),'threadId':_0x2c4771,'replyId':_0x4a6fb9,'unitId':_0x233cbd},_0x5d9d95=await this[_0x5f3859(0x18a)][_0x5f3859(0x15c)]('/universer-api/comment/unit/'+_0x233cbd+_0x5f3859(0x174),{'body':_0x146e76});return!_0x5d9d95['body'][_0x5f3859(0x12f)]||_0x5d9d95['body'][_0x5f3859(0x12f)][_0x5f3859(0x17d)]===0x1;}async[_0x16030e(0x171)](_0x5d3103,_0x3bf490,_0x4af051){const _0xce3e3=_0x16030e,_0x4cbed0={'unitId':_0x5d3103,'threadId':_0x4af051},_0x313228=await this[_0xce3e3(0x18a)]['post'](_0xce3e3(0x16b)+_0x5d3103+_0xce3e3(0x145),{'body':_0x4cbed0}),_0x348243=_0x4af051[_0xce3e3(0x143)](_0x50c725=>ee(_0x313228[_0xce3e3(0x13a)]['comments'][_0x50c725],_0x5d3103,_0x3bf490))[_0xce3e3(0x188)](Boolean);return Object[_0xce3e3(0x182)](_0x313228[_0xce3e3(0x13a)][_0xce3e3(0x181)])[_0xce3e3(0x132)](_0x28339c=>{const _0x49ead5=_0xce3e3;this['_userService'][_0x49ead5(0x13d)](_0x28339c);}),_0x348243;}[_0x16030e(0x131)](_0x1eb535){const _0x27d827=_0x16030e;return{'id':_0x1eb535['id'],'threadId':_0x1eb535[_0x27d827(0x160)],'ref':_0x1eb535['ref']};}};S=Q([b(0x0,_0x232c4f(_0x349971)),b(0x1,_0x232c4f(_0x42539e)),b(0x2,_0x232c4f(_0x5409b3))],S);var re=Object[_0x16030e(0x130)],te=(_0x340d62,_0x4bf1e3,_0x194a5f,_0x323b25)=>{const _0x15bccb=_0x16030e;for(var _0x4be9d4=_0x323b25>0x1?void 0x0:_0x323b25?re(_0x4bf1e3,_0x194a5f):_0x4bf1e3,_0x5cde31=_0x340d62[_0x15bccb(0x15a)]-0x1,_0x532d70;_0x5cde31>=0x0;_0x5cde31--)(_0x532d70=_0x340d62[_0x5cde31])&&(_0x4be9d4=_0x532d70(_0x4be9d4)||_0x4be9d4);return _0x4be9d4;},M=(_0x527b20,_0x3999e6)=>(_0x2f7ae4,_0x3033d2)=>_0x3999e6(_0x2f7ae4,_0x3033d2,_0x527b20);let f=class extends _0x420710{constructor(_0x430d79,_0x3e9341){const _0x1c92bb=_0x16030e;super(),this[_0x1c92bb(0x155)]=_0x430d79,this[_0x1c92bb(0x139)]=_0x3e9341,this[_0x1c92bb(0x18b)]();}[_0x16030e(0x18b)](){const _0x1130fa=_0x16030e;this['_threadCommentDataSourceService']['dataSource']=this[_0x1130fa(0x139)],this[_0x1130fa(0x155)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x25fc8b),M(0x1,_0x232c4f(S))],f);var se=Object[_0x16030e(0x136)],oe=Object[_0x16030e(0x130)],ne=(_0x1e8655,_0xe483cf,_0x2a287a)=>_0xe483cf in _0x1e8655?se(_0x1e8655,_0xe483cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a287a}):_0x1e8655[_0xe483cf]=_0x2a287a,ie=(_0x368850,_0xcfcd19,_0x1a0bc3,_0x2961ac)=>{const _0x2278df=_0x16030e;for(var _0x4b8124=_0x2961ac>0x1?void 0x0:_0x2961ac?oe(_0xcfcd19,_0x1a0bc3):_0xcfcd19,_0x5b97dc=_0x368850[_0x2278df(0x15a)]-0x1,_0x46b769;_0x5b97dc>=0x0;_0x5b97dc--)(_0x46b769=_0x368850[_0x5b97dc])&&(_0x4b8124=_0x46b769(_0x4b8124)||_0x4b8124);return _0x4b8124;},N=(_0x36fac0,_0x48cb5a)=>(_0x30f48e,_0x41ee2f)=>_0x48cb5a(_0x30f48e,_0x41ee2f,_0x36fac0),$=(_0x44ddce,_0x5c2be8,_0x16c6a1)=>ne(_0x44ddce,typeof _0x5c2be8!=_0x16030e(0x17a)?_0x5c2be8+'':_0x5c2be8,_0x16c6a1);let g=class extends _0x1d2449{constructor(_0x5cbb9e=O,_0x239262,_0x20f637){const _0x3fb519=_0x16030e;super(),this[_0x3fb519(0x18d)]=_0x5cbb9e,this[_0x3fb519(0x144)]=_0x239262,this[_0x3fb519(0x178)]=_0x20f637;const {..._0x3e49c3}=_0x3b1644({},O,this[_0x3fb519(0x18d)]);this[_0x3fb519(0x178)][_0x3fb519(0x190)](z,_0x3e49c3);}['onStarting'](){const _0x5311fc=_0x16030e;[[S],[f],[_]][_0x5311fc(0x132)](_0x25b6ba=>{const _0x11db2d=_0x5311fc;this[_0x11db2d(0x144)][_0x11db2d(0x141)](_0x25b6ba);});}[_0x16030e(0x16d)](){const _0x6492c6=_0x16030e;this['_injector']['get'](f),this['_injector'][_0x6492c6(0x168)](_);}};function _0x4fd3(_0x4e73ca,_0x46251d){_0x4e73ca=_0x4e73ca-0x12f;const _0x473706=_0x4737();let _0x4fd327=_0x473706[_0x4e73ca];return _0x4fd327;}$(g,'pluginName',W),$(g,'type',_0x2c1c94[_0x16030e(0x189)]),g=ie([_0x3102ce(_0x9ebaf1,_0x32afc7,_0x15cb9c),N(0x1,_0x232c4f(_0x291ac5)),N(0x2,_0x1b3c83)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1c4990=_0x37a2;(function(_0x54bbc5,_0xe0f6fc){const _0x38a8ac=_0x37a2,_0x1381ee=_0x54bbc5();while(!![]){try{const _0x3aa1eb=-parseInt(_0x38a8ac(0xef))/0x1+-parseInt(_0x38a8ac(0x10b))/0x2*(-parseInt(_0x38a8ac(0xf2))/0x3)+-parseInt(_0x38a8ac(0x102))/0x4+parseInt(_0x38a8ac(0xee))/0x5+parseInt(_0x38a8ac(0x118))/0x6*(-parseInt(_0x38a8ac(0x110))/0x7)+-parseInt(_0x38a8ac(0xf7))/0x8+parseInt(_0x38a8ac(0x106))/0x9;if(_0x3aa1eb===_0xe0f6fc)break;else _0x1381ee['push'](_0x1381ee['shift']());}catch(_0x3fd14b){_0x1381ee['push'](_0x1381ee['shift']());}}}(_0x5d44,0x4be44));import{CommentService as _0x278af8,CollaborationSessionService as _0x5417b5,UniverCollaborationClientPlugin as _0x4fb59d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c8ed9}from'@univerjs-pro/license';import{dayjs as _0x5b2334,UserManagerService as _0x4e911f,Inject as _0x108585,Injector as _0x2d7221,Disposable as _0x2c9fc3,CustomRangeType as _0x11ff2a,UniverInstanceType as _0x22c964,DependentOn as _0x4a4332,Plugin as _0x21d69d,merge as _0x49cd4d,IConfigService as _0x440bd9}from'@univerjs/core';function _0x5d44(){const _0x24d7fe=['userId','Delete','UNRECOGNIZED','/delete','_sessionService','_config','reply','requireSession','users','syncUpdateMutationToColla','slice','Unknown','Reply','1859205ZqtcBQ','185859TLmOvm','OpenOrReOpen','body','1038rYgssC','threadId','_init','replies','customRanges','2004256PfLaNi','userID','_initUserSync','pluginName','resolved','root','/reply','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','updateComment','870664OYMeBY','UNIVER_UNKNOWN','symbol','defineProperty','3931740HkgxHN','/list','dataSource','/edit','type','2766gefcSB','/add','Solved','listComments','map','35rhqpDw','delete','get','personId','Add','/universer-api/comment/unit/','parse','addComment','386772kwDwfN','forEach','add','getUnit','format','YYYY/MM/DD\x20HH:mm','parentId','_threadCommentDataSource','resolveComment','error','subscribe','saveCommentToSnapshot','onReady','rangeType','ref','stringify','replyId','values','_configService','createTimestamp','_injector','comments','_commentService','post','getOwnPropertyDescriptor','setConfig','/universer-api/user/list','commentUpdate$','addUser','getComment','pipe','_userService','_threadCommentDataSourceService','_initDataSource','getMemberID','deleteComment','thread-comment-data-source.config','Edit','onStarting','user','getUser','_threadCommentModel','Solve','solved','filter','COMMENT','disposeWithMe','code','_httpService','content','unitId'];_0x5d44=function(){return _0x24d7fe;};return _0x5d44();}import{UniverThreadCommentUIPlugin as _0x33ba46}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54e638,IThreadCommentDataSourceService as _0x7340a4}from'@univerjs/thread-comment';import{bufferTime as _0x3ed3f1}from'rxjs';import{HTTPService as _0x23a127}from'@univerjs/network';const W=_0x1c4990(0xff);var I=(_0x3e2845=>(_0x3e2845[_0x3e2845[_0x1c4990(0xf0)]=0x0]='OpenOrReOpen',_0x3e2845[_0x3e2845[_0x1c4990(0x10d)]=0x1]='Solved',_0x3e2845[_0x3e2845[_0x1c4990(0xe3)]=-0x1]=_0x1c4990(0xe3),_0x3e2845))(I||{}),v=(_0xb69aba=>(_0xb69aba[_0xb69aba[_0x1c4990(0xec)]=0x0]=_0x1c4990(0xec),_0xb69aba[_0xb69aba[_0x1c4990(0x114)]=0x1]=_0x1c4990(0x114),_0xb69aba[_0xb69aba[_0x1c4990(0xed)]=0x2]=_0x1c4990(0xed),_0xb69aba[_0xb69aba[_0x1c4990(0xd3)]=0x3]=_0x1c4990(0xd3),_0xb69aba[_0xb69aba[_0x1c4990(0xe2)]=0x4]=_0x1c4990(0xe2),_0xb69aba[_0xb69aba[_0x1c4990(0xd8)]=0x5]=_0x1c4990(0xd8),_0xb69aba[_0xb69aba[_0x1c4990(0xe3)]=-0x1]='UNRECOGNIZED',_0xb69aba))(v||{});function _0x37a2(_0x4089be,_0x559117){_0x4089be=_0x4089be-0xc3;const _0x5d44ad=_0x5d44();let _0x37a29e=_0x5d44ad[_0x4089be];return _0x37a29e;}const y=_0x40d80b=>_0x5b2334(new Date(+_0x40d80b))[_0x1c4990(0x11c)](_0x1c4990(0x11d)),B=async(_0x3cc7f2,_0x442646)=>{const _0x3429a9=_0x1c4990,_0x5a03fc=_0x3cc7f2[_0x3429a9(0x112)](_0x4e911f),_0x2fda37=_0x3cc7f2['get'](_0x23a127);_0x442646[_0x3429a9(0x119)](_0x4dcb1c=>{const _0x24859f=_0x3429a9;_0x5a03fc[_0x24859f(0xd6)](_0x4dcb1c)&&_0x442646[_0x24859f(0x111)](_0x4dcb1c);}),_0x442646['size']&&(await _0x2fda37[_0x3429a9(0x112)](_0x3429a9(0xc8),{'params':{'userIDs':[..._0x442646]}}))[_0x3429a9(0xf1)][_0x3429a9(0xe9)][_0x3429a9(0x119)](_0x39929e=>{const _0x55272c=_0x3429a9;_0x39929e&&_0x5a03fc[_0x55272c(0xca)](_0x39929e);});};var K=Object[_0x1c4990(0xc6)],V=(_0x36a719,_0x446352,_0x630a7a,_0x19e310)=>{const _0x296f3c=_0x1c4990;for(var _0x1a0b07=_0x19e310>0x1?void 0x0:_0x19e310?K(_0x446352,_0x630a7a):_0x446352,_0x350ed8=_0x36a719[_0x296f3c(0x100)]-0x1,_0x47c209;_0x350ed8>=0x0;_0x350ed8--)(_0x47c209=_0x36a719[_0x350ed8])&&(_0x1a0b07=_0x47c209(_0x1a0b07)||_0x1a0b07);return _0x1a0b07;},p=(_0x4f7ad6,_0x5ef58f)=>(_0x26b672,_0x161874)=>_0x5ef58f(_0x26b672,_0x161874,_0x4f7ad6);let _=class extends _0x2c9fc3{constructor(_0x7df6b6,_0x43303f,_0xc1cb11,_0x76d89f){const _0x3510e0=_0x1c4990;super(),this[_0x3510e0(0xc4)]=_0x7df6b6,this[_0x3510e0(0xd7)]=_0x43303f,this['_userService']=_0xc1cb11,this[_0x3510e0(0x12c)]=_0x76d89f,this[_0x3510e0(0xf4)](),this[_0x3510e0(0xf9)]();}[_0x1c4990(0xf9)](){const _0x233f80=_0x1c4990;this[_0x233f80(0xdc)](this['_threadCommentModel'][_0x233f80(0xc9)][_0x233f80(0xcc)](_0x3ed3f1(0x10))[_0x233f80(0x122)](_0x14df9b=>{const _0x175d5a=_0x233f80,_0x4753e7=new Set();_0x14df9b[_0x175d5a(0x119)](_0x40cd96=>{const _0x298787=_0x175d5a;if(_0x40cd96[_0x298787(0x10a)]===_0x298787(0x11a)){const _0x179b2f=_0x40cd96['payload'][_0x298787(0x113)];_0x4753e7[_0x298787(0x11a)](_0x179b2f);}}),B(this[_0x175d5a(0x12c)],_0x4753e7);}));}[_0x1c4990(0xf4)](){const _0x4c9bf3=_0x1c4990;this[_0x4c9bf3(0xdc)](this[_0x4c9bf3(0xc4)][_0x4c9bf3(0xc9)][_0x4c9bf3(0x122)](async _0x123081=>{const _0x1a1548=_0x4c9bf3;var _0x58c976,_0x5013ef,_0x56f182,_0x433c01;const _0x15b03a=(_0x58c976=this[_0x1a1548(0xd7)][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x12282c=>_0x12282c[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x58c976[_0x1a1548(0xfc)];if(!_0x15b03a)return;const {unitId:_0x5b2556,subUnitId:_0x47606f}=_0x15b03a;switch(_0x123081[_0x1a1548(0xd5)]&&this[_0x1a1548(0xcd)][_0x1a1548(0xca)](_0x123081['user']),_0x123081[_0x1a1548(0x10a)]){case v[_0x1a1548(0x114)]:break;case v['Reply']:{this[_0x1a1548(0xd7)][_0x1a1548(0x117)](_0x5b2556,_0x47606f,{'unitId':_0x5b2556,'subUnitId':_0x47606f,'ref':'','id':_0x123081[_0x1a1548(0x128)],'dT':y(+_0x123081[_0x1a1548(0x12b)]),'threadId':_0x123081[_0x1a1548(0xf3)],'personId':(_0x56f182=(_0x5013ef=_0x123081[_0x1a1548(0xd5)])==null?void 0x0:_0x5013ef['userID'])!=null?_0x56f182:_0x123081['userId'],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)]),'parentId':_0x15b03a['id']});break;}case v['Delete']:{const _0x37fef5=this[_0x1a1548(0xd7)][_0x1a1548(0xcb)](_0x5b2556,_0x47606f,_0x123081['replyId']);_0x37fef5&&_0x37fef5[_0x1a1548(0x11e)]&&this[_0x1a1548(0xd7)]['deleteComment'](_0x5b2556,_0x47606f,_0x123081[_0x1a1548(0x128)]);break;}case v[_0x1a1548(0xd3)]:{this[_0x1a1548(0xd7)][_0x1a1548(0x101)](_0x5b2556,_0x47606f,{'commentId':_0x123081[_0x1a1548(0x128)],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)])});break;}case v[_0x1a1548(0xd8)]:{const _0x5b1f61=(_0x433c01=this['_threadCommentModel'][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x383b3f=>_0x383b3f[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x433c01[_0x1a1548(0xfc)];_0x5b1f61&&this[_0x1a1548(0xd7)][_0x1a1548(0x120)](_0x5b2556,_0x47606f,_0x5b1f61['id'],_0x123081['solved']===I[_0x1a1548(0x10d)]);break;}}}));}};_=V([p(0x0,_0x108585(_0x278af8)),p(0x1,_0x108585(_0x54e638)),p(0x2,_0x108585(_0x4e911f)),p(0x3,_0x108585(_0x2d7221))],_);const z=_0x1c4990(0xd2),O={};var k=Object[_0x1c4990(0xc6)],Q=(_0x4bb896,_0x3c563d,_0x3dcc2e,_0x3a5e29)=>{for(var _0x223ec3=_0x3a5e29>0x1?void 0x0:_0x3a5e29?k(_0x3c563d,_0x3dcc2e):_0x3c563d,_0x53dec0=_0x4bb896['length']-0x1,_0x56ffab;_0x53dec0>=0x0;_0x53dec0--)(_0x56ffab=_0x4bb896[_0x53dec0])&&(_0x223ec3=_0x56ffab(_0x223ec3)||_0x223ec3);return _0x223ec3;},b=(_0x267a8b,_0x437b0f)=>(_0x81f267,_0x5e3a5f)=>_0x437b0f(_0x81f267,_0x5e3a5f,_0x267a8b);function X(_0x3f0a39,_0x34f7d2){const _0x13a7d7=_0x1c4990,_0x34b8a7=_0x3f0a39[_0x13a7d7(0xf5)][0x0];return{..._0x34f7d2,'id':_0x34b8a7[_0x13a7d7(0x128)],'resolved':_0x3f0a39[_0x13a7d7(0xd9)]===0x1,'dT':y(_0x34b8a7[_0x13a7d7(0x12b)]),'personId':_0x34b8a7[_0x13a7d7(0xe1)],'threadId':_0x34b8a7['threadId']};}function ee(_0x748a8d,_0x2fef79,_0x5407fb){const _0x395350=_0x1c4990;var _0x199550,_0x5b80fe;if(((_0x5b80fe=(_0x199550=_0x748a8d==null?void 0x0:_0x748a8d[_0x395350(0xf5)])==null?void 0x0:_0x199550['length'])!=null?_0x5b80fe:0x0)>0x0){const _0x41758e=(_0x4f7dee,_0x169062)=>({'id':_0x4f7dee[_0x395350(0x128)],'threadId':_0x4f7dee['threadId'],'dT':y(_0x4f7dee['createTimestamp']),'personId':_0x4f7dee[_0x395350(0xe1)],'resolved':_0x748a8d[_0x395350(0xd9)]===I[_0x395350(0x10d)],'unitId':_0x2fef79,'subUnitId':_0x5407fb,'text':JSON[_0x395350(0x116)](_0x4f7dee[_0x395350(0xdf)]),'parentId':_0x169062}),_0x391086=_0x41758e(_0x748a8d[_0x395350(0xf5)][0x0]);return{..._0x391086,'children':_0x748a8d['replies'][_0x395350(0xeb)](0x1)[_0x395350(0x10f)](_0x2eb096=>_0x41758e(_0x2eb096,_0x391086['id']))};}return null;}let S=class{constructor(_0x50ab96,_0x3aaf62,_0x554d8e){const _0x2fea0f=_0x1c4990;this[_0x2fea0f(0xde)]=_0x50ab96,this[_0x2fea0f(0xcd)]=_0x3aaf62,this[_0x2fea0f(0xe5)]=_0x554d8e;}async[_0x1c4990(0x117)](_0x1a7d5f){const _0x749028=_0x1c4990;var _0x52c72b,_0x15a47e;const {parentId:_0x490d09,unitId:_0x396f65,text:_0x3004c3,threadId:_0x513f4c}=_0x1a7d5f,_0x2e4409=(_0x15a47e=(_0x52c72b=_0x3004c3[_0x749028(0xf6)])==null?void 0x0:_0x52c72b[_0x749028(0xda)](_0x165cfc=>_0x165cfc[_0x749028(0x125)]===_0x11ff2a[_0x749028(0xdb)])[_0x749028(0x10f)](_0x186c68=>_0x186c68[_0x749028(0xfe)]))!=null?_0x15a47e:[],_0x2184b9=JSON[_0x749028(0x127)](_0x3004c3),_0x385dd5=(await this[_0x749028(0xe5)][_0x749028(0xe8)](_0x396f65))[_0x749028(0xd0)]();if(_0x490d09){const _0x487cfe={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409,'threadId':_0x513f4c},_0x422576=(await this[_0x749028(0xde)][_0x749028(0xc5)]('/universer-api/comment/unit/'+_0x396f65+_0x749028(0xfd),{'body':_0x487cfe}))[_0x749028(0xf1)][_0x749028(0xe7)];return{..._0x1a7d5f,'id':_0x422576[_0x749028(0x128)],'dT':_0x5b2334(+_0x422576['createTimestamp'])[_0x749028(0x11c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x422576[_0x749028(0xe1)]};}else{const _0x369960={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409},_0x535b31=await this[_0x749028(0xde)][_0x749028(0xc5)](_0x749028(0x115)+_0x396f65+_0x749028(0x10c),{'body':_0x369960});return X(_0x535b31['body']['comment'],_0x1a7d5f);}}async['updateComment'](_0x369df0){const _0x48629d=_0x1c4990;var _0x23b1d0,_0x36d45c;const {text:_0x404232,unitId:_0x41e7b6}=_0x369df0,_0x29d593=(_0x36d45c=(_0x23b1d0=_0x404232[_0x48629d(0xf6)])==null?void 0x0:_0x23b1d0[_0x48629d(0xda)](_0x1806e6=>_0x1806e6['rangeType']===_0x11ff2a['COMMENT'])[_0x48629d(0x10f)](_0xae005d=>_0xae005d[_0x48629d(0xfe)]))!=null?_0x36d45c:[],_0x171d31=JSON['stringify'](_0x404232),_0x1c7e3a=_0x369df0['threadId'],_0x2b5a73=_0x369df0['id'],_0x3f7d42={'memberId':(await this[_0x48629d(0xe5)]['requireSession'](_0x41e7b6))['getMemberID'](),'unitId':_0x41e7b6,'threadId':_0x1c7e3a,'mention':_0x29d593,'content':_0x171d31,'replyId':_0x2b5a73},_0x4c3a8b=await this[_0x48629d(0xde)]['post']('/universer-api/comment/unit/'+_0x41e7b6+_0x48629d(0x109),{'body':_0x3f7d42});return!_0x4c3a8b['body'][_0x48629d(0x121)]||_0x4c3a8b[_0x48629d(0xf1)][_0x48629d(0x121)][_0x48629d(0xdd)]===0x1;}async['resolveComment'](_0x3e49a5){const _0x8f86e2=_0x1c4990,{unitId:_0x20fc31}=_0x3e49a5,_0x2f95c2=_0x3e49a5['threadId'],_0x2a8a3f={'memberId':this[_0x8f86e2(0xcd)]['getCurrentUser']()[_0x8f86e2(0xf8)],'unitId':_0x20fc31,'threadId':_0x2f95c2,'solved':_0x3e49a5[_0x8f86e2(0xfb)]?I[_0x8f86e2(0x10d)]:I[_0x8f86e2(0xf0)]},_0x2bbce0=await this['_httpService'][_0x8f86e2(0xc5)](_0x8f86e2(0x115)+_0x20fc31+'/solved',{'body':_0x2a8a3f});return!_0x2bbce0[_0x8f86e2(0xf1)]['error']||_0x2bbce0['body'][_0x8f86e2(0x121)][_0x8f86e2(0xdd)]===0x1;}async[_0x1c4990(0xd1)](_0x24fcdd,_0x1288a7,_0x53f267,_0x2f707f){const _0x141d46=_0x1c4990,_0x160c26={'memberId':(await this[_0x141d46(0xe5)][_0x141d46(0xe8)](_0x24fcdd))['getMemberID'](),'threadId':_0x53f267,'replyId':_0x2f707f,'unitId':_0x24fcdd},_0x3b8df8=await this[_0x141d46(0xde)][_0x141d46(0xc5)](_0x141d46(0x115)+_0x24fcdd+_0x141d46(0xe4),{'body':_0x160c26});return!_0x3b8df8['body'][_0x141d46(0x121)]||_0x3b8df8['body']['error'][_0x141d46(0xdd)]===0x1;}async[_0x1c4990(0x10e)](_0x55bc69,_0x53a9ce,_0x330570){const _0x2439f2=_0x1c4990,_0x16ee93={'unitId':_0x55bc69,'threadId':_0x330570},_0x5c7c4d=await this[_0x2439f2(0xde)][_0x2439f2(0xc5)](_0x2439f2(0x115)+_0x55bc69+_0x2439f2(0x107),{'body':_0x16ee93}),_0x2cfb57=_0x330570[_0x2439f2(0x10f)](_0xb9d311=>ee(_0x5c7c4d['body'][_0x2439f2(0xc3)][_0xb9d311],_0x55bc69,_0x53a9ce))[_0x2439f2(0xda)](Boolean);return Object[_0x2439f2(0x129)](_0x5c7c4d[_0x2439f2(0xf1)][_0x2439f2(0xe9)])['forEach'](_0x5c2d1c=>{const _0x17d590=_0x2439f2;this['_userService'][_0x17d590(0xca)](_0x5c2d1c);}),_0x2cfb57;}[_0x1c4990(0x123)](_0x19e459){const _0x218cc9=_0x1c4990;return{'id':_0x19e459['id'],'threadId':_0x19e459[_0x218cc9(0xf3)],'ref':_0x19e459[_0x218cc9(0x126)]};}};S=Q([b(0x0,_0x108585(_0x23a127)),b(0x1,_0x108585(_0x4e911f)),b(0x2,_0x108585(_0x5417b5))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x1b4820,_0x1d946c,_0x470e7d,_0x2b234e)=>{const _0x2932ec=_0x1c4990;for(var _0x2aafea=_0x2b234e>0x1?void 0x0:_0x2b234e?re(_0x1d946c,_0x470e7d):_0x1d946c,_0x5522c6=_0x1b4820[_0x2932ec(0x100)]-0x1,_0x2227b2;_0x5522c6>=0x0;_0x5522c6--)(_0x2227b2=_0x1b4820[_0x5522c6])&&(_0x2aafea=_0x2227b2(_0x2aafea)||_0x2aafea);return _0x2aafea;},M=(_0x3f0353,_0x381eb5)=>(_0xad62ff,_0x2c6546)=>_0x381eb5(_0xad62ff,_0x2c6546,_0x3f0353);let f=class extends _0x2c9fc3{constructor(_0x4d80fa,_0x4e8550){const _0x507e42=_0x1c4990;super(),this[_0x507e42(0xce)]=_0x4d80fa,this[_0x507e42(0x11f)]=_0x4e8550,this['_initDataSource']();}[_0x1c4990(0xcf)](){const _0x273b0e=_0x1c4990;this[_0x273b0e(0xce)][_0x273b0e(0x108)]=this[_0x273b0e(0x11f)],this[_0x273b0e(0xce)][_0x273b0e(0xea)]=!0x1;}};f=te([M(0x0,_0x7340a4),M(0x1,_0x108585(S))],f);var se=Object[_0x1c4990(0x105)],oe=Object[_0x1c4990(0xc6)],ne=(_0x2e56ff,_0x1a590,_0x2984f2)=>_0x1a590 in _0x2e56ff?se(_0x2e56ff,_0x1a590,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2984f2}):_0x2e56ff[_0x1a590]=_0x2984f2,ie=(_0x8bb360,_0x469d97,_0x529a7e,_0x6b3b8)=>{const _0x1e3213=_0x1c4990;for(var _0x4bae41=_0x6b3b8>0x1?void 0x0:_0x6b3b8?oe(_0x469d97,_0x529a7e):_0x469d97,_0x87d4aa=_0x8bb360[_0x1e3213(0x100)]-0x1,_0x297edd;_0x87d4aa>=0x0;_0x87d4aa--)(_0x297edd=_0x8bb360[_0x87d4aa])&&(_0x4bae41=_0x297edd(_0x4bae41)||_0x4bae41);return _0x4bae41;},N=(_0x5071fe,_0xf3b938)=>(_0x41a703,_0x4bbe2e)=>_0xf3b938(_0x41a703,_0x4bbe2e,_0x5071fe),$=(_0x134d42,_0x2ee20b,_0x11136e)=>ne(_0x134d42,typeof _0x2ee20b!=_0x1c4990(0x104)?_0x2ee20b+'':_0x2ee20b,_0x11136e);let g=class extends _0x21d69d{constructor(_0x416df8=O,_0x2e5463,_0xe1cafb){const _0x57e98c=_0x1c4990;super(),this[_0x57e98c(0xe6)]=_0x416df8,this[_0x57e98c(0x12c)]=_0x2e5463,this[_0x57e98c(0x12a)]=_0xe1cafb;const {..._0x39e32f}=_0x49cd4d({},O,this[_0x57e98c(0xe6)]);this[_0x57e98c(0x12a)][_0x57e98c(0xc7)](z,_0x39e32f);}[_0x1c4990(0xd4)](){[[S],[f],[_]]['forEach'](_0x42786a=>{const _0x108275=_0x37a2;this[_0x108275(0x12c)][_0x108275(0x11a)](_0x42786a);});}[_0x1c4990(0x124)](){const _0x440764=_0x1c4990;this[_0x440764(0x12c)][_0x440764(0x112)](f),this['_injector'][_0x440764(0x112)](_);}};$(g,_0x1c4990(0xfa),W),$(g,_0x1c4990(0x10a),_0x22c964[_0x1c4990(0x103)]),g=ie([_0x4a4332(_0x33ba46,_0x4fb59d,_0x2c8ed9),N(0x1,_0x108585(_0x2d7221)),N(0x2,_0x440bd9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x57c604,_0x5974a2){const _0x569ed6=_0x5bc3,_0x905308=_0x57c604();while(!![]){try{const _0x2f3681=-parseInt(_0x569ed6(0x17a))/0x1*(-parseInt(_0x569ed6(0x164))/0x2)+parseInt(_0x569ed6(0x128))/0x3*(parseInt(_0x569ed6(0x138))/0x4)+parseInt(_0x569ed6(0x199))/0x5*(parseInt(_0x569ed6(0x163))/0x6)+-parseInt(_0x569ed6(0x140))/0x7+-parseInt(_0x569ed6(0x15a))/0x8*(parseInt(_0x569ed6(0x14c))/0x9)+-parseInt(_0x569ed6(0x134))/0xa*(parseInt(_0x569ed6(0x13c))/0xb)+parseInt(_0x569ed6(0x14f))/0xc;if(_0x2f3681===_0x5974a2)break;else _0x905308['push'](_0x905308['shift']());}catch(_0x51c0c6){_0x905308['push'](_0x905308['shift']());}}}(_0x2f9b,0xb47ca),function(_0x78cfc1,_0x40245f){const _0x3139cf=_0x5bc3;typeof exports==_0x3139cf(0x125)&&typeof module<'u'?_0x40245f(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==_0x3139cf(0x156)&&define[_0x3139cf(0x166)]?define([_0x3139cf(0x191),_0x3139cf(0x180),_0x3139cf(0x17b),_0x3139cf(0x142),_0x3139cf(0x19f),_0x3139cf(0x167),'rxjs',_0x3139cf(0x19a)],_0x40245f):(_0x78cfc1=typeof globalThis<'u'?globalThis:_0x78cfc1||self,_0x40245f(_0x78cfc1[_0x3139cf(0x148)]={},_0x78cfc1[_0x3139cf(0x147)],_0x78cfc1[_0x3139cf(0x135)],_0x78cfc1[_0x3139cf(0x176)],_0x78cfc1[_0x3139cf(0x187)],_0x78cfc1[_0x3139cf(0x14b)],_0x78cfc1[_0x3139cf(0x196)],_0x78cfc1['UniverNetwork']));}(this,function(_0x5e78cf,_0x15f612,_0x44a182,_0x405bac,_0x4892e8,_0x311be5,_0x17adfc,_0x5ed600){'use strict';const _0x1c1955=_0x5bc3;const _0x2b1af4='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3fbe65=(_0x4e7c48=>(_0x4e7c48[_0x4e7c48[_0x1c1955(0x136)]=0x0]='OpenOrReOpen',_0x4e7c48[_0x4e7c48[_0x1c1955(0x15e)]=0x1]=_0x1c1955(0x15e),_0x4e7c48[_0x4e7c48[_0x1c1955(0x12d)]=-0x1]=_0x1c1955(0x12d),_0x4e7c48))(_0x3fbe65||{}),_0x4fe209=(_0x483d38=>(_0x483d38[_0x483d38['Unknown']=0x0]=_0x1c1955(0x17c),_0x483d38[_0x483d38[_0x1c1955(0x1a0)]=0x1]='Add',_0x483d38[_0x483d38[_0x1c1955(0x139)]=0x2]=_0x1c1955(0x139),_0x483d38[_0x483d38[_0x1c1955(0x189)]=0x3]=_0x1c1955(0x189),_0x483d38[_0x483d38[_0x1c1955(0x159)]=0x4]=_0x1c1955(0x159),_0x483d38[_0x483d38[_0x1c1955(0x1a1)]=0x5]=_0x1c1955(0x1a1),_0x483d38[_0x483d38[_0x1c1955(0x12d)]=-0x1]='UNRECOGNIZED',_0x483d38))(_0x4fe209||{});const _0x29a87b=_0x50ecb0=>_0x405bac[_0x1c1955(0x13f)](new Date(+_0x50ecb0))[_0x1c1955(0x1a3)](_0x1c1955(0x146)),_0xd4cde=async(_0x51d27a,_0x49b6b7)=>{const _0x552cba=_0x1c1955,_0x5b6ead=_0x51d27a[_0x552cba(0x18d)](_0x405bac[_0x552cba(0x1a2)]),_0x5b9d0b=_0x51d27a[_0x552cba(0x18d)](_0x5ed600[_0x552cba(0x16c)]);_0x49b6b7[_0x552cba(0x195)](_0x466a15=>{const _0x5cc41e=_0x552cba;_0x5b6ead[_0x5cc41e(0x175)](_0x466a15)&&_0x49b6b7[_0x5cc41e(0x12e)](_0x466a15);}),_0x49b6b7[_0x552cba(0x130)]&&(await _0x5b9d0b['get'](_0x552cba(0x14e),{'params':{'userIDs':[..._0x49b6b7]}}))[_0x552cba(0x132)][_0x552cba(0x15d)][_0x552cba(0x195)](_0x962960=>{const _0x14c810=_0x552cba;_0x962960&&_0x5b6ead[_0x14c810(0x16e)](_0x962960);});};var _0xead491=Object[_0x1c1955(0x145)],_0xcc1f5c=(_0x41490f,_0x418189,_0x4bcf6a,_0x23d2a0)=>{const _0x2a19cf=_0x1c1955;for(var _0x3e076d=_0x23d2a0>0x1?void 0x0:_0x23d2a0?_0xead491(_0x418189,_0x4bcf6a):_0x418189,_0x1f76c4=_0x41490f[_0x2a19cf(0x162)]-0x1,_0x296812;_0x1f76c4>=0x0;_0x1f76c4--)(_0x296812=_0x41490f[_0x1f76c4])&&(_0x3e076d=_0x296812(_0x3e076d)||_0x3e076d);return _0x3e076d;},_0x1031a3=(_0x5686b6,_0xffe9f)=>(_0x41350d,_0x2cb93c)=>_0xffe9f(_0x41350d,_0x2cb93c,_0x5686b6);let _0x4b9ada=class extends _0x405bac[_0x1c1955(0x182)]{constructor(_0x5efc45,_0x43d8bb,_0x3bfc2b,_0x3affc0){const _0x1c68b9=_0x1c1955;super(),this[_0x1c68b9(0x18b)]=_0x5efc45,this[_0x1c68b9(0x15f)]=_0x43d8bb,this[_0x1c68b9(0x13d)]=_0x3bfc2b,this[_0x1c68b9(0x173)]=_0x3affc0,this['_init'](),this['_initUserSync']();}[_0x1c1955(0x16f)](){const _0xb3117f=_0x1c1955;this['disposeWithMe'](this[_0xb3117f(0x15f)][_0xb3117f(0x12f)][_0xb3117f(0x1aa)](_0x17adfc[_0xb3117f(0x13b)](0x10))[_0xb3117f(0x151)](_0xdc6c58=>{const _0x5f2293=_0xb3117f,_0x185135=new Set();_0xdc6c58[_0x5f2293(0x195)](_0x59d02f=>{const _0x1600e2=_0x5f2293;if(_0x59d02f[_0x1600e2(0x137)]===_0x1600e2(0x15b)){const _0x6161d8=_0x59d02f['payload'][_0x1600e2(0x12a)];_0x185135[_0x1600e2(0x15b)](_0x6161d8);}}),_0xd4cde(this[_0x5f2293(0x173)],_0x185135);}));}[_0x1c1955(0x158)](){const _0x3a60fc=_0x1c1955;this['disposeWithMe'](this[_0x3a60fc(0x18b)][_0x3a60fc(0x12f)][_0x3a60fc(0x151)](async _0xf6c6f2=>{const _0x172f11=_0x3a60fc;var _0x156b1d,_0x55782c,_0x4ff649,_0x3d96c7;const _0x34fb79=(_0x156b1d=this[_0x172f11(0x15f)][_0x172f11(0x178)](_0xf6c6f2[_0x172f11(0x14a)])[_0x172f11(0x194)](_0x5f3b83=>_0x5f3b83[_0x172f11(0x174)]===_0xf6c6f2[_0x172f11(0x174)]))==null?void 0x0:_0x156b1d[_0x172f11(0x160)];if(!_0x34fb79)return;const {unitId:_0x4268d7,subUnitId:_0x86be2b}=_0x34fb79;switch(_0xf6c6f2[_0x172f11(0x131)]&&this['_userService'][_0x172f11(0x16e)](_0xf6c6f2['user']),_0xf6c6f2['type']){case _0x4fe209[_0x172f11(0x1a0)]:break;case _0x4fe209[_0x172f11(0x139)]:{this['_threadCommentModel']['addComment'](_0x4268d7,_0x86be2b,{'unitId':_0x4268d7,'subUnitId':_0x86be2b,'ref':'','id':_0xf6c6f2[_0x172f11(0x169)],'dT':_0x29a87b(+_0xf6c6f2['createTimestamp']),'threadId':_0xf6c6f2['threadId'],'personId':(_0x4ff649=(_0x55782c=_0xf6c6f2['user'])==null?void 0x0:_0x55782c[_0x172f11(0x12c)])!=null?_0x4ff649:_0xf6c6f2[_0x172f11(0x14d)],'text':JSON[_0x172f11(0x1a7)](_0xf6c6f2[_0x172f11(0x127)]),'parentId':_0x34fb79['id']});break;}case _0x4fe209[_0x172f11(0x159)]:{const _0x544131=this[_0x172f11(0x15f)][_0x172f11(0x188)](_0x4268d7,_0x86be2b,_0xf6c6f2[_0x172f11(0x169)]);_0x544131&&_0x544131[_0x172f11(0x177)]&&this['_threadCommentModel'][_0x172f11(0x16a)](_0x4268d7,_0x86be2b,_0xf6c6f2[_0x172f11(0x169)]);break;}case _0x4fe209[_0x172f11(0x189)]:{this[_0x172f11(0x15f)][_0x172f11(0x1a4)](_0x4268d7,_0x86be2b,{'commentId':_0xf6c6f2['replyId'],'text':JSON[_0x172f11(0x1a7)](_0xf6c6f2[_0x172f11(0x127)])});break;}case _0x4fe209['Solve']:{const _0x9b43a1=(_0x3d96c7=this[_0x172f11(0x15f)][_0x172f11(0x178)](_0xf6c6f2[_0x172f11(0x14a)])[_0x172f11(0x194)](_0x1a5377=>_0x1a5377[_0x172f11(0x174)]===_0xf6c6f2[_0x172f11(0x174)]))==null?void 0x0:_0x3d96c7['root'];_0x9b43a1&&this[_0x172f11(0x15f)][_0x172f11(0x1ac)](_0x4268d7,_0x86be2b,_0x9b43a1['id'],_0xf6c6f2[_0x172f11(0x17d)]===_0x3fbe65[_0x172f11(0x15e)]);break;}}}));}};_0x4b9ada=_0xcc1f5c([_0x1031a3(0x0,_0x405bac[_0x1c1955(0x19e)](_0x15f612['CommentService'])),_0x1031a3(0x1,_0x405bac['Inject'](_0x311be5['ThreadCommentModel'])),_0x1031a3(0x2,_0x405bac[_0x1c1955(0x19e)](_0x405bac['UserManagerService'])),_0x1031a3(0x3,_0x405bac[_0x1c1955(0x19e)](_0x405bac['Injector']))],_0x4b9ada);const _0x140c61=_0x1c1955(0x161),_0x44e49b={};var _0x2e5034=Object[_0x1c1955(0x145)],_0x82a4b4=(_0x1c17b7,_0x2715b2,_0x28c86e,_0x23a8c5)=>{const _0x3482b3=_0x1c1955;for(var _0x38ae86=_0x23a8c5>0x1?void 0x0:_0x23a8c5?_0x2e5034(_0x2715b2,_0x28c86e):_0x2715b2,_0x502e6=_0x1c17b7[_0x3482b3(0x162)]-0x1,_0x359400;_0x502e6>=0x0;_0x502e6--)(_0x359400=_0x1c17b7[_0x502e6])&&(_0x38ae86=_0x359400(_0x38ae86)||_0x38ae86);return _0x38ae86;},_0x191a8b=(_0x2ca38f,_0x4cb0d6)=>(_0x1ab6cf,_0x4c947c)=>_0x4cb0d6(_0x1ab6cf,_0x4c947c,_0x2ca38f);function _0x3a216(_0x3af326,_0x5a0f01){const _0x3c40dc=_0x1c1955,_0x470704=_0x3af326['replies'][0x0];return{..._0x5a0f01,'id':_0x470704[_0x3c40dc(0x169)],'resolved':_0x3af326[_0x3c40dc(0x17d)]===0x1,'dT':_0x29a87b(_0x470704[_0x3c40dc(0x18c)]),'personId':_0x470704[_0x3c40dc(0x14d)],'threadId':_0x470704[_0x3c40dc(0x174)]};}function _0x5df92e(_0x1d1097,_0x1b6629,_0x444ba3){const _0x29aa50=_0x1c1955;var _0x47d5c1,_0x114c01;if(((_0x114c01=(_0x47d5c1=_0x1d1097==null?void 0x0:_0x1d1097[_0x29aa50(0x133)])==null?void 0x0:_0x47d5c1[_0x29aa50(0x162)])!=null?_0x114c01:0x0)>0x0){const _0x4ff323=(_0x424f8d,_0x37bad)=>({'id':_0x424f8d[_0x29aa50(0x169)],'threadId':_0x424f8d[_0x29aa50(0x174)],'dT':_0x29a87b(_0x424f8d[_0x29aa50(0x18c)]),'personId':_0x424f8d[_0x29aa50(0x14d)],'resolved':_0x1d1097[_0x29aa50(0x17d)]===_0x3fbe65[_0x29aa50(0x15e)],'unitId':_0x1b6629,'subUnitId':_0x444ba3,'text':JSON[_0x29aa50(0x1a7)](_0x424f8d[_0x29aa50(0x127)]),'parentId':_0x37bad}),_0x30766c=_0x4ff323(_0x1d1097[_0x29aa50(0x133)][0x0]);return{..._0x30766c,'children':_0x1d1097[_0x29aa50(0x133)][_0x29aa50(0x190)](0x1)[_0x29aa50(0x157)](_0x239ec6=>_0x4ff323(_0x239ec6,_0x30766c['id']))};}return null;}let _0x51bae9=class{constructor(_0x83d480,_0x5ceea7,_0x827c32){const _0x47e51d=_0x1c1955;this[_0x47e51d(0x18e)]=_0x83d480,this[_0x47e51d(0x13d)]=_0x5ceea7,this[_0x47e51d(0x192)]=_0x827c32;}async[_0x1c1955(0x1ab)](_0x3d8309){const _0x1c5902=_0x1c1955;var _0x359795,_0x11289;const {parentId:_0x510fb3,unitId:_0x5ee124,text:_0x2396ea,threadId:_0x46ef1b}=_0x3d8309,_0x260296=(_0x11289=(_0x359795=_0x2396ea[_0x1c5902(0x12b)])==null?void 0x0:_0x359795[_0x1c5902(0x153)](_0x4c72a7=>_0x4c72a7[_0x1c5902(0x1ae)]===_0x405bac[_0x1c5902(0x144)][_0x1c5902(0x1ad)])[_0x1c5902(0x157)](_0x362fb2=>_0x362fb2[_0x1c5902(0x1a8)]))!=null?_0x11289:[],_0x204321=JSON[_0x1c5902(0x13e)](_0x2396ea),_0xb37b50=(await this[_0x1c5902(0x192)][_0x1c5902(0x154)](_0x5ee124))[_0x1c5902(0x193)]();if(_0x510fb3){const _0x2dab27={'memberId':_0xb37b50,'unitId':_0x5ee124,'content':_0x204321,'mention':_0x260296,'threadId':_0x46ef1b},_0x2bc355=(await this[_0x1c5902(0x18e)][_0x1c5902(0x15c)](_0x1c5902(0x19c)+_0x5ee124+_0x1c5902(0x1a9),{'body':_0x2dab27}))['body'][_0x1c5902(0x186)];return{..._0x3d8309,'id':_0x2bc355[_0x1c5902(0x169)],'dT':_0x405bac[_0x1c5902(0x13f)](+_0x2bc355[_0x1c5902(0x18c)])['format'](_0x1c5902(0x146)),'personId':_0x2bc355[_0x1c5902(0x14d)]};}else{const _0x288b58={'memberId':_0xb37b50,'unitId':_0x5ee124,'content':_0x204321,'mention':_0x260296},_0xaed123=await this[_0x1c5902(0x18e)][_0x1c5902(0x15c)](_0x1c5902(0x19c)+_0x5ee124+_0x1c5902(0x16d),{'body':_0x288b58});return _0x3a216(_0xaed123[_0x1c5902(0x132)]['comment'],_0x3d8309);}}async['updateComment'](_0x53e960){const _0x2907cb=_0x1c1955;var _0x34820a,_0x3376e0;const {text:_0x5a7110,unitId:_0x414434}=_0x53e960,_0x39cba2=(_0x3376e0=(_0x34820a=_0x5a7110[_0x2907cb(0x12b)])==null?void 0x0:_0x34820a[_0x2907cb(0x153)](_0x779168=>_0x779168[_0x2907cb(0x1ae)]===_0x405bac[_0x2907cb(0x144)][_0x2907cb(0x1ad)])[_0x2907cb(0x157)](_0x235e4b=>_0x235e4b[_0x2907cb(0x1a8)]))!=null?_0x3376e0:[],_0x2d3949=JSON[_0x2907cb(0x13e)](_0x5a7110),_0x2f4fd4=_0x53e960['threadId'],_0x14321e=_0x53e960['id'],_0x47f7eb={'memberId':(await this[_0x2907cb(0x192)]['requireSession'](_0x414434))['getMemberID'](),'unitId':_0x414434,'threadId':_0x2f4fd4,'mention':_0x39cba2,'content':_0x2d3949,'replyId':_0x14321e},_0x132095=await this['_httpService'][_0x2907cb(0x15c)](_0x2907cb(0x19c)+_0x414434+_0x2907cb(0x17e),{'body':_0x47f7eb});return!_0x132095[_0x2907cb(0x132)][_0x2907cb(0x171)]||_0x132095[_0x2907cb(0x132)]['error'][_0x2907cb(0x19b)]===0x1;}async[_0x1c1955(0x1ac)](_0x5159d6){const _0x595a5b=_0x1c1955,{unitId:_0x564e44}=_0x5159d6,_0x13ee1e=_0x5159d6[_0x595a5b(0x174)],_0x22dca1={'memberId':this['_userService'][_0x595a5b(0x17f)]()[_0x595a5b(0x12c)],'unitId':_0x564e44,'threadId':_0x13ee1e,'solved':_0x5159d6[_0x595a5b(0x185)]?_0x3fbe65[_0x595a5b(0x15e)]:_0x3fbe65[_0x595a5b(0x136)]},_0x57ed55=await this[_0x595a5b(0x18e)]['post'](_0x595a5b(0x19c)+_0x564e44+_0x595a5b(0x1a5),{'body':_0x22dca1});return!_0x57ed55[_0x595a5b(0x132)]['error']||_0x57ed55[_0x595a5b(0x132)][_0x595a5b(0x171)][_0x595a5b(0x19b)]===0x1;}async[_0x1c1955(0x16a)](_0x517dfb,_0x32051f,_0x2e1e59,_0x28851a){const _0x15a2f7=_0x1c1955,_0x36a492={'memberId':(await this[_0x15a2f7(0x192)][_0x15a2f7(0x154)](_0x517dfb))[_0x15a2f7(0x193)](),'threadId':_0x2e1e59,'replyId':_0x28851a,'unitId':_0x517dfb},_0x4ad057=await this['_httpService'][_0x15a2f7(0x15c)](_0x15a2f7(0x19c)+_0x517dfb+_0x15a2f7(0x1a6),{'body':_0x36a492});return!_0x4ad057[_0x15a2f7(0x132)][_0x15a2f7(0x171)]||_0x4ad057[_0x15a2f7(0x132)][_0x15a2f7(0x171)]['code']===0x1;}async[_0x1c1955(0x198)](_0x15a7ed,_0x1ce800,_0x541980){const _0x526016=_0x1c1955,_0x2c5078={'unitId':_0x15a7ed,'threadId':_0x541980},_0x2c5f90=await this[_0x526016(0x18e)][_0x526016(0x15c)]('/universer-api/comment/unit/'+_0x15a7ed+_0x526016(0x143),{'body':_0x2c5078}),_0x4e0f96=_0x541980[_0x526016(0x157)](_0x50b8f3=>_0x5df92e(_0x2c5f90[_0x526016(0x132)][_0x526016(0x124)][_0x50b8f3],_0x15a7ed,_0x1ce800))[_0x526016(0x153)](Boolean);return Object['values'](_0x2c5f90[_0x526016(0x132)][_0x526016(0x15d)])[_0x526016(0x195)](_0x454a18=>{const _0x28b42a=_0x526016;this[_0x28b42a(0x13d)][_0x28b42a(0x16e)](_0x454a18);}),_0x4e0f96;}[_0x1c1955(0x18f)](_0x33d316){const _0x2d8fa8=_0x1c1955;return{'id':_0x33d316['id'],'threadId':_0x33d316['threadId'],'ref':_0x33d316[_0x2d8fa8(0x197)]};}};_0x51bae9=_0x82a4b4([_0x191a8b(0x0,_0x405bac[_0x1c1955(0x19e)](_0x5ed600[_0x1c1955(0x16c)])),_0x191a8b(0x1,_0x405bac[_0x1c1955(0x19e)](_0x405bac[_0x1c1955(0x1a2)])),_0x191a8b(0x2,_0x405bac[_0x1c1955(0x19e)](_0x15f612[_0x1c1955(0x13a)]))],_0x51bae9);var _0x3ef5aa=Object[_0x1c1955(0x145)],_0x187fc5=(_0x586f4b,_0x2c05b3,_0x5af811,_0x31b719)=>{for(var _0x31c295=_0x31b719>0x1?void 0x0:_0x31b719?_0x3ef5aa(_0x2c05b3,_0x5af811):_0x2c05b3,_0x40fc92=_0x586f4b['length']-0x1,_0x905785;_0x40fc92>=0x0;_0x40fc92--)(_0x905785=_0x586f4b[_0x40fc92])&&(_0x31c295=_0x905785(_0x31c295)||_0x31c295);return _0x31c295;},_0xf86f18=(_0x1642cf,_0xd701cf)=>(_0x43eb1f,_0x4d9fe3)=>_0xd701cf(_0x43eb1f,_0x4d9fe3,_0x1642cf);let _0x3a71d5=class extends _0x405bac[_0x1c1955(0x182)]{constructor(_0xcfad3c,_0x38b2f8){const _0x3264a0=_0x1c1955;super(),this['_threadCommentDataSourceService']=_0xcfad3c,this[_0x3264a0(0x183)]=_0x38b2f8,this[_0x3264a0(0x126)]();}[_0x1c1955(0x126)](){const _0x2ab28c=_0x1c1955;this[_0x2ab28c(0x184)]['dataSource']=this[_0x2ab28c(0x183)],this[_0x2ab28c(0x184)]['syncUpdateMutationToColla']=!0x1;}};_0x3a71d5=_0x187fc5([_0xf86f18(0x0,_0x311be5[_0x1c1955(0x129)]),_0xf86f18(0x1,_0x405bac[_0x1c1955(0x19e)](_0x51bae9))],_0x3a71d5);var _0x531e13=Object[_0x1c1955(0x165)],_0x419cab=Object['getOwnPropertyDescriptor'],_0x3dcbfc=(_0x1149f0,_0x7a1d92,_0x3db071)=>_0x7a1d92 in _0x1149f0?_0x531e13(_0x1149f0,_0x7a1d92,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3db071}):_0x1149f0[_0x7a1d92]=_0x3db071,_0x3f807e=(_0x553520,_0x4c3816,_0x595a71,_0x4b5067)=>{const _0x4f501f=_0x1c1955;for(var _0x3360af=_0x4b5067>0x1?void 0x0:_0x4b5067?_0x419cab(_0x4c3816,_0x595a71):_0x4c3816,_0x34f44d=_0x553520[_0x4f501f(0x162)]-0x1,_0x29965a;_0x34f44d>=0x0;_0x34f44d--)(_0x29965a=_0x553520[_0x34f44d])&&(_0x3360af=_0x29965a(_0x3360af)||_0x3360af);return _0x3360af;},_0x4707b0=(_0x2f432e,_0x3396dc)=>(_0x3b7131,_0x132269)=>_0x3396dc(_0x3b7131,_0x132269,_0x2f432e),_0x30f6ba=(_0x155455,_0x5197f7,_0x30c1e9)=>_0x3dcbfc(_0x155455,typeof _0x5197f7!=_0x1c1955(0x172)?_0x5197f7+'':_0x5197f7,_0x30c1e9);_0x5e78cf[_0x1c1955(0x152)]=class extends _0x405bac[_0x1c1955(0x168)]{constructor(_0x1a1748=_0x44e49b,_0x1ce92e,_0x3d1e2a){const _0x1e8f52=_0x1c1955;super(),this['_config']=_0x1a1748,this[_0x1e8f52(0x173)]=_0x1ce92e,this[_0x1e8f52(0x170)]=_0x3d1e2a;const {..._0xd7b987}=_0x405bac[_0x1e8f52(0x19d)]({},_0x44e49b,this[_0x1e8f52(0x141)]);this['_configService']['setConfig'](_0x140c61,_0xd7b987);}[_0x1c1955(0x1af)](){const _0x264e64=_0x1c1955;[[_0x51bae9],[_0x3a71d5],[_0x4b9ada]][_0x264e64(0x195)](_0x5ff259=>{const _0x9bf9dc=_0x264e64;this['_injector'][_0x9bf9dc(0x15b)](_0x5ff259);});}[_0x1c1955(0x18a)](){const _0x2bad94=_0x1c1955;this[_0x2bad94(0x173)][_0x2bad94(0x18d)](_0x3a71d5),this[_0x2bad94(0x173)]['get'](_0x4b9ada);}},_0x30f6ba(_0x5e78cf[_0x1c1955(0x152)],'pluginName',_0x2b1af4),_0x30f6ba(_0x5e78cf[_0x1c1955(0x152)],_0x1c1955(0x137),_0x405bac['UniverInstanceType'][_0x1c1955(0x181)]),_0x5e78cf[_0x1c1955(0x152)]=_0x3f807e([_0x405bac[_0x1c1955(0x149)](_0x4892e8[_0x1c1955(0x155)],_0x15f612['UniverCollaborationClientPlugin'],_0x44a182[_0x1c1955(0x16b)]),_0x4707b0(0x1,_0x405bac[_0x1c1955(0x19e)](_0x405bac[_0x1c1955(0x150)])),_0x4707b0(0x2,_0x405bac['IConfigService'])],_0x5e78cf[_0x1c1955(0x152)]),Object[_0x1c1955(0x165)](_0x5e78cf,Symbol[_0x1c1955(0x179)],{'value':'Module'});}));function _0x5bc3(_0x563193,_0x3c949c){_0x563193=_0x563193-0x124;const _0x2f9bae=_0x2f9b();let _0x5bc35b=_0x2f9bae[_0x563193];return _0x5bc35b;}function _0x2f9b(){const _0x120d49=['Plugin','replyId','deleteComment','UniverLicensePlugin','HTTPService','/add','addUser','_initUserSync','_configService','error','symbol','_injector','threadId','getUser','UniverCore','parentId','getUnit','toStringTag','44186rOIGrc','@univerjs-pro/license','Unknown','solved','/edit','getCurrentUser','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','Disposable','_threadCommentDataSource','_threadCommentDataSourceService','resolved','reply','UniverThreadCommentUi','getComment','Edit','onReady','_commentService','createTimestamp','get','_httpService','saveCommentToSnapshot','slice','exports','_sessionService','getMemberID','find','forEach','rxjs','ref','listComments','348830FTOTZg','@univerjs/network','code','/universer-api/comment/unit/','merge','Inject','@univerjs/thread-comment-ui','Add','Solve','UserManagerService','format','updateComment','/solved','/delete','parse','rangeId','/reply','pipe','addComment','resolveComment','COMMENT','rangeType','onStarting','comments','object','_initDataSource','content','20985TeOMPg','IThreadCommentDataSourceService','personId','customRanges','userID','UNRECOGNIZED','delete','commentUpdate$','size','user','body','replies','1870PfUsKm','UniverProLicense','OpenOrReOpen','type','56eJYdzI','Reply','CollaborationSessionService','bufferTime','1177GSdVRH','_userService','stringify','dayjs','5757710PPrrpF','_config','@univerjs/core','/list','CustomRangeType','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','UniverProCollaborationClient','UniverProThreadCommentDatasource','DependentOn','unitId','UniverThreadComment','667782Qrmzfh','userId','/universer-api/user/list','1255212rCIEkZ','Injector','subscribe','UniverThreadCommentDataSourcePlugin','filter','requireSession','UniverThreadCommentUIPlugin','function','map','_init','Delete','8uAfoXQ','add','post','users','Solved','_threadCommentModel','root','thread-comment-data-source.config','length','30rafBRZ','50SnGLqT','defineProperty','amd','@univerjs/thread-comment'];_0x2f9b=function(){return _0x120d49;};return _0x2f9b();}
|
|
1
|
+
function _0x3d2c(_0x3d0f84,_0x27be1f){_0x3d0f84=_0x3d0f84-0x19a;const _0x2316dd=_0x2316();let _0x3d2c86=_0x2316dd[_0x3d0f84];return _0x3d2c86;}function _0x2316(){const _0x4ff98a=['threadId','subscribe','onReady','dayjs','CollaborationSessionService','updateComment','_commentService','get','Edit','UNIVER_UNKNOWN','userID','3254FxHqbB','rxjs','add','2490264TROSQZ','HTTPService','error','UniverProThreadCommentDatasource','code','toStringTag','CustomRangeType','OpenOrReOpen','171UNGvZg','UniverThreadCommentUi','UniverThreadComment','2037304ZSwkOj','rangeType','Add','dataSource','UniverProLicense','body','Module','function','getOwnPropertyDescriptor','145585GUUQTb','getUser','user','filter','@univerjs/core','/solved','forEach','unitId','stringify','_userService','7SLfrGz','replyId','Disposable','CommentService','resolveComment','@univerjs/thread-comment','UserManagerService','_sessionService','comment','/universer-api/user/list','slice','parse','post','4312496QcWiDy','delete','_threadCommentModel','addUser','content','UNRECOGNIZED','_threadCommentDataSourceService','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','UniverThreadCommentUIPlugin','UniverThreadCommentDataSourcePlugin','onStarting','/list','userId','UniverLicensePlugin','commentUpdate$','@univerjs/network','/reply','listComments','_injector','_httpService','IConfigService','root','@univerjs/thread-comment-ui','syncUpdateMutationToColla','merge','_initUserSync','439640BHafQB','YYYY/MM/DD\x20HH:mm','type','payload','parentId','getUnit','format','/delete','Unknown','UniverCore','disposeWithMe','ThreadCommentModel','UniverInstanceType','_config','customRanges','createTimestamp','@univerjs-pro/license','/add','Injector','getMemberID','264gSYEdM','amd','deleteComment','reply','pipe','UniverNetwork','symbol','UniverProCollaborationClient','ref','defineProperty','_init','Reply','Solved','Solve','Delete','users','bufferTime','Plugin','replies','map','_initDataSource','addComment','@univerjs-pro/collaboration-client','/edit','rangeId','/universer-api/comment/unit/','_threadCommentDataSource','setConfig','26079deuoLV','length','comments','Inject','resolved'];_0x2316=function(){return _0x4ff98a;};return _0x2316();}(function(_0x479fa5,_0x28c803){const _0x2dd055=_0x3d2c,_0x597863=_0x479fa5();while(!![]){try{const _0xb85466=-parseInt(_0x2dd055(0x1bd))/0x1*(-parseInt(_0x2dd055(0x1b2))/0x2)+parseInt(_0x2dd055(0x1a2))/0x3+parseInt(_0x2dd055(0x1e0))/0x4+parseInt(_0x2dd055(0x1c9))/0x5*(-parseInt(_0x2dd055(0x210))/0x6)+parseInt(_0x2dd055(0x1d3))/0x7*(parseInt(_0x2dd055(0x1c0))/0x8)+parseInt(_0x2dd055(0x1b5))/0x9+parseInt(_0x2dd055(0x1fc))/0xa;if(_0xb85466===_0x28c803)break;else _0x597863['push'](_0x597863['shift']());}catch(_0x5e72ad){_0x597863['push'](_0x597863['shift']());}}}(_0x2316,0xa0f09),function(_0x4c1147,_0x4a716f){const _0x80ca34=_0x3d2c;typeof exports=='object'&&typeof module<'u'?_0x4a716f(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==_0x80ca34(0x1c7)&&define[_0x80ca34(0x211)]?define(['exports',_0x80ca34(0x19c),_0x80ca34(0x20c),_0x80ca34(0x1cd),_0x80ca34(0x1f8),_0x80ca34(0x1d8),'rxjs',_0x80ca34(0x1f1)],_0x4a716f):(_0x4c1147=typeof globalThis<'u'?globalThis:_0x4c1147||self,_0x4a716f(_0x4c1147[_0x80ca34(0x1b8)]={},_0x4c1147[_0x80ca34(0x217)],_0x4c1147[_0x80ca34(0x1c4)],_0x4c1147[_0x80ca34(0x205)],_0x4c1147[_0x80ca34(0x1be)],_0x4c1147[_0x80ca34(0x1bf)],_0x4c1147[_0x80ca34(0x1b3)],_0x4c1147[_0x80ca34(0x215)]));}(this,function(_0x385d40,_0x369bd8,_0x47e426,_0xa66518,_0x1b42b9,_0x4a626a,_0x10c18f,_0x4c6741){'use strict';const _0x12bde9=_0x3d2c;const _0x381fe7=_0x12bde9(0x1e8);var _0x5f4b83=(_0x3bbd7c=>(_0x3bbd7c[_0x3bbd7c[_0x12bde9(0x1bc)]=0x0]=_0x12bde9(0x1bc),_0x3bbd7c[_0x3bbd7c[_0x12bde9(0x21c)]=0x1]=_0x12bde9(0x21c),_0x3bbd7c[_0x3bbd7c[_0x12bde9(0x1e5)]=-0x1]='UNRECOGNIZED',_0x3bbd7c))(_0x5f4b83||{}),_0x387e95=(_0x28a4a1=>(_0x28a4a1[_0x28a4a1[_0x12bde9(0x204)]=0x0]=_0x12bde9(0x204),_0x28a4a1[_0x28a4a1['Add']=0x1]=_0x12bde9(0x1c2),_0x28a4a1[_0x28a4a1[_0x12bde9(0x21b)]=0x2]=_0x12bde9(0x21b),_0x28a4a1[_0x28a4a1['Edit']=0x3]='Edit',_0x28a4a1[_0x28a4a1[_0x12bde9(0x21e)]=0x4]=_0x12bde9(0x21e),_0x28a4a1[_0x28a4a1['Solve']=0x5]='Solve',_0x28a4a1[_0x28a4a1[_0x12bde9(0x1e5)]=-0x1]=_0x12bde9(0x1e5),_0x28a4a1))(_0x387e95||{});const _0x43f364=_0x3aa1ca=>_0xa66518[_0x12bde9(0x1aa)](new Date(+_0x3aa1ca))['format'](_0x12bde9(0x1fd)),_0x368d8c=async(_0x26d658,_0x31e6a8)=>{const _0x1677a9=_0x12bde9,_0x1f629a=_0x26d658[_0x1677a9(0x1ae)](_0xa66518[_0x1677a9(0x1d9)]),_0x979477=_0x26d658[_0x1677a9(0x1ae)](_0x4c6741[_0x1677a9(0x1b6)]);_0x31e6a8[_0x1677a9(0x1cf)](_0x16f3bf=>{const _0x518c43=_0x1677a9;_0x1f629a[_0x518c43(0x1ca)](_0x16f3bf)&&_0x31e6a8[_0x518c43(0x1e1)](_0x16f3bf);}),_0x31e6a8['size']&&(await _0x979477[_0x1677a9(0x1ae)](_0x1677a9(0x1dc),{'params':{'userIDs':[..._0x31e6a8]}}))[_0x1677a9(0x1c5)]['users']['forEach'](_0x8d6400=>{const _0x4dc5e6=_0x1677a9;_0x8d6400&&_0x1f629a[_0x4dc5e6(0x1e3)](_0x8d6400);});};var _0x2ca868=Object['getOwnPropertyDescriptor'],_0x4c136a=(_0x6b60cd,_0x505064,_0x42d0b5,_0x357ce3)=>{for(var _0x194cca=_0x357ce3>0x1?void 0x0:_0x357ce3?_0x2ca868(_0x505064,_0x42d0b5):_0x505064,_0x30b2e4=_0x6b60cd['length']-0x1,_0x30b196;_0x30b2e4>=0x0;_0x30b2e4--)(_0x30b196=_0x6b60cd[_0x30b2e4])&&(_0x194cca=_0x30b196(_0x194cca)||_0x194cca);return _0x194cca;},_0x59dab2=(_0x4997bc,_0x61feea)=>(_0x1d8267,_0x20ba7e)=>_0x61feea(_0x1d8267,_0x20ba7e,_0x4997bc);let _0x4184d8=class extends _0xa66518[_0x12bde9(0x1d5)]{constructor(_0x100132,_0x574281,_0x4d7ada,_0x4fbef9){const _0x28d610=_0x12bde9;super(),this['_commentService']=_0x100132,this[_0x28d610(0x1e2)]=_0x574281,this['_userService']=_0x4d7ada,this['_injector']=_0x4fbef9,this[_0x28d610(0x21a)](),this['_initUserSync']();}[_0x12bde9(0x1fb)](){const _0x340744=_0x12bde9;this[_0x340744(0x206)](this['_threadCommentModel']['commentUpdate$'][_0x340744(0x214)](_0x10c18f[_0x340744(0x220)](0x10))['subscribe'](_0x566359=>{const _0x185bfc=_0x340744,_0x2b364e=new Set();_0x566359[_0x185bfc(0x1cf)](_0x241c54=>{const _0x523779=_0x185bfc;if(_0x241c54[_0x523779(0x1fe)]===_0x523779(0x1b4)){const _0x47af20=_0x241c54[_0x523779(0x1ff)]['personId'];_0x2b364e[_0x523779(0x1b4)](_0x47af20);}}),_0x368d8c(this[_0x185bfc(0x1f4)],_0x2b364e);}));}['_init'](){const _0x574426=_0x12bde9;this[_0x574426(0x206)](this[_0x574426(0x1ad)][_0x574426(0x1f0)][_0x574426(0x1a8)](async _0x1e2765=>{const _0x1508a8=_0x574426;var _0x46499b,_0x1c788b,_0x4576c2,_0x5722e3;const _0x485161=(_0x46499b=this[_0x1508a8(0x1e2)][_0x1508a8(0x201)](_0x1e2765[_0x1508a8(0x1d0)])['find'](_0x3c3661=>_0x3c3661['threadId']===_0x1e2765[_0x1508a8(0x1a7)]))==null?void 0x0:_0x46499b[_0x1508a8(0x1f7)];if(!_0x485161)return;const {unitId:_0x1de645,subUnitId:_0x399e2b}=_0x485161;switch(_0x1e2765['user']&&this['_userService']['addUser'](_0x1e2765[_0x1508a8(0x1cb)]),_0x1e2765['type']){case _0x387e95[_0x1508a8(0x1c2)]:break;case _0x387e95[_0x1508a8(0x21b)]:{this[_0x1508a8(0x1e2)][_0x1508a8(0x19b)](_0x1de645,_0x399e2b,{'unitId':_0x1de645,'subUnitId':_0x399e2b,'ref':'','id':_0x1e2765[_0x1508a8(0x1d4)],'dT':_0x43f364(+_0x1e2765[_0x1508a8(0x20b)]),'threadId':_0x1e2765[_0x1508a8(0x1a7)],'personId':(_0x4576c2=(_0x1c788b=_0x1e2765['user'])==null?void 0x0:_0x1c788b[_0x1508a8(0x1b1)])!=null?_0x4576c2:_0x1e2765[_0x1508a8(0x1ee)],'text':JSON[_0x1508a8(0x1de)](_0x1e2765['content']),'parentId':_0x485161['id']});break;}case _0x387e95[_0x1508a8(0x21e)]:{const _0x4bbd90=this[_0x1508a8(0x1e2)]['getComment'](_0x1de645,_0x399e2b,_0x1e2765['replyId']);_0x4bbd90&&_0x4bbd90[_0x1508a8(0x200)]&&this[_0x1508a8(0x1e2)][_0x1508a8(0x212)](_0x1de645,_0x399e2b,_0x1e2765['replyId']);break;}case _0x387e95[_0x1508a8(0x1af)]:{this['_threadCommentModel'][_0x1508a8(0x1ac)](_0x1de645,_0x399e2b,{'commentId':_0x1e2765[_0x1508a8(0x1d4)],'text':JSON[_0x1508a8(0x1de)](_0x1e2765[_0x1508a8(0x1e4)])});break;}case _0x387e95[_0x1508a8(0x21d)]:{const _0x278cd=(_0x5722e3=this[_0x1508a8(0x1e2)][_0x1508a8(0x201)](_0x1e2765[_0x1508a8(0x1d0)])['find'](_0x56bd82=>_0x56bd82[_0x1508a8(0x1a7)]===_0x1e2765[_0x1508a8(0x1a7)]))==null?void 0x0:_0x5722e3[_0x1508a8(0x1f7)];_0x278cd&&this[_0x1508a8(0x1e2)][_0x1508a8(0x1d7)](_0x1de645,_0x399e2b,_0x278cd['id'],_0x1e2765['solved']===_0x5f4b83[_0x1508a8(0x21c)]);break;}}}));}};_0x4184d8=_0x4c136a([_0x59dab2(0x0,_0xa66518[_0x12bde9(0x1a5)](_0x369bd8[_0x12bde9(0x1d6)])),_0x59dab2(0x1,_0xa66518[_0x12bde9(0x1a5)](_0x4a626a[_0x12bde9(0x207)])),_0x59dab2(0x2,_0xa66518[_0x12bde9(0x1a5)](_0xa66518['UserManagerService'])),_0x59dab2(0x3,_0xa66518[_0x12bde9(0x1a5)](_0xa66518[_0x12bde9(0x20e)]))],_0x4184d8);const _0x5a5f98='thread-comment-data-source.config',_0x584180={};var _0xe1ceb4=Object['getOwnPropertyDescriptor'],_0x49d1ca=(_0x359a16,_0x32ccf8,_0x1413ec,_0x132601)=>{const _0x2ff045=_0x12bde9;for(var _0x1c22a0=_0x132601>0x1?void 0x0:_0x132601?_0xe1ceb4(_0x32ccf8,_0x1413ec):_0x32ccf8,_0x47b88d=_0x359a16[_0x2ff045(0x1a3)]-0x1,_0x3f776b;_0x47b88d>=0x0;_0x47b88d--)(_0x3f776b=_0x359a16[_0x47b88d])&&(_0x1c22a0=_0x3f776b(_0x1c22a0)||_0x1c22a0);return _0x1c22a0;},_0x309ed0=(_0x5c6425,_0x44d186)=>(_0x12ce66,_0x53da26)=>_0x44d186(_0x12ce66,_0x53da26,_0x5c6425);function _0x3a580c(_0xc2b70f,_0x50c6b0){const _0x2f59b5=_0x12bde9,_0x320778=_0xc2b70f[_0x2f59b5(0x222)][0x0];return{..._0x50c6b0,'id':_0x320778['replyId'],'resolved':_0xc2b70f[_0x2f59b5(0x1e9)]===0x1,'dT':_0x43f364(_0x320778[_0x2f59b5(0x20b)]),'personId':_0x320778['userId'],'threadId':_0x320778[_0x2f59b5(0x1a7)]};}function _0x1263d8(_0x751563,_0x3f4eb5,_0x5e2867){const _0x53bb9e=_0x12bde9;var _0x12799f,_0x425f3c;if(((_0x425f3c=(_0x12799f=_0x751563==null?void 0x0:_0x751563[_0x53bb9e(0x222)])==null?void 0x0:_0x12799f[_0x53bb9e(0x1a3)])!=null?_0x425f3c:0x0)>0x0){const _0x112f31=(_0x59e90f,_0x59897b)=>({'id':_0x59e90f[_0x53bb9e(0x1d4)],'threadId':_0x59e90f[_0x53bb9e(0x1a7)],'dT':_0x43f364(_0x59e90f[_0x53bb9e(0x20b)]),'personId':_0x59e90f['userId'],'resolved':_0x751563[_0x53bb9e(0x1e9)]===_0x5f4b83[_0x53bb9e(0x21c)],'unitId':_0x3f4eb5,'subUnitId':_0x5e2867,'text':JSON[_0x53bb9e(0x1de)](_0x59e90f['content']),'parentId':_0x59897b}),_0x9fc0c1=_0x112f31(_0x751563['replies'][0x0]);return{..._0x9fc0c1,'children':_0x751563[_0x53bb9e(0x222)][_0x53bb9e(0x1dd)](0x1)[_0x53bb9e(0x223)](_0x13ee11=>_0x112f31(_0x13ee11,_0x9fc0c1['id']))};}return null;}let _0x14852d=class{constructor(_0x435bd9,_0x28ba5b,_0x57abf8){const _0x568f13=_0x12bde9;this[_0x568f13(0x1f5)]=_0x435bd9,this['_userService']=_0x28ba5b,this[_0x568f13(0x1da)]=_0x57abf8;}async[_0x12bde9(0x19b)](_0x357fea){const _0x60938c=_0x12bde9;var _0x300c6e,_0x1fb6f8;const {parentId:_0x5d68a7,unitId:_0x734663,text:_0x22abc2,threadId:_0x201c40}=_0x357fea,_0x1acb5a=(_0x1fb6f8=(_0x300c6e=_0x22abc2[_0x60938c(0x20a)])==null?void 0x0:_0x300c6e['filter'](_0x2ea3e8=>_0x2ea3e8[_0x60938c(0x1c1)]===_0xa66518[_0x60938c(0x1bb)]['COMMENT'])[_0x60938c(0x223)](_0x4c684b=>_0x4c684b['rangeId']))!=null?_0x1fb6f8:[],_0x3a78c1=JSON[_0x60938c(0x1d1)](_0x22abc2),_0x21be09=(await this[_0x60938c(0x1da)]['requireSession'](_0x734663))[_0x60938c(0x20f)]();if(_0x5d68a7){const _0x61c2c5={'memberId':_0x21be09,'unitId':_0x734663,'content':_0x3a78c1,'mention':_0x1acb5a,'threadId':_0x201c40},_0x8c8931=(await this[_0x60938c(0x1f5)]['post'](_0x60938c(0x19f)+_0x734663+_0x60938c(0x1f2),{'body':_0x61c2c5}))[_0x60938c(0x1c5)][_0x60938c(0x213)];return{..._0x357fea,'id':_0x8c8931[_0x60938c(0x1d4)],'dT':_0xa66518['dayjs'](+_0x8c8931[_0x60938c(0x20b)])[_0x60938c(0x202)](_0x60938c(0x1fd)),'personId':_0x8c8931['userId']};}else{const _0x281437={'memberId':_0x21be09,'unitId':_0x734663,'content':_0x3a78c1,'mention':_0x1acb5a},_0x4ada82=await this[_0x60938c(0x1f5)][_0x60938c(0x1df)](_0x60938c(0x19f)+_0x734663+_0x60938c(0x20d),{'body':_0x281437});return _0x3a580c(_0x4ada82[_0x60938c(0x1c5)][_0x60938c(0x1db)],_0x357fea);}}async[_0x12bde9(0x1ac)](_0x2413a8){const _0x97b2c7=_0x12bde9;var _0x33a649,_0x43566f;const {text:_0x1f3d28,unitId:_0x427fe5}=_0x2413a8,_0x279e81=(_0x43566f=(_0x33a649=_0x1f3d28[_0x97b2c7(0x20a)])==null?void 0x0:_0x33a649['filter'](_0x14be66=>_0x14be66[_0x97b2c7(0x1c1)]===_0xa66518[_0x97b2c7(0x1bb)]['COMMENT'])[_0x97b2c7(0x223)](_0x4f4667=>_0x4f4667[_0x97b2c7(0x19e)]))!=null?_0x43566f:[],_0x2bb815=JSON[_0x97b2c7(0x1d1)](_0x1f3d28),_0x3fcf47=_0x2413a8[_0x97b2c7(0x1a7)],_0x5eca48=_0x2413a8['id'],_0x483c42={'memberId':(await this[_0x97b2c7(0x1da)]['requireSession'](_0x427fe5))['getMemberID'](),'unitId':_0x427fe5,'threadId':_0x3fcf47,'mention':_0x279e81,'content':_0x2bb815,'replyId':_0x5eca48},_0x3cfb93=await this[_0x97b2c7(0x1f5)]['post'](_0x97b2c7(0x19f)+_0x427fe5+_0x97b2c7(0x19d),{'body':_0x483c42});return!_0x3cfb93[_0x97b2c7(0x1c5)][_0x97b2c7(0x1b7)]||_0x3cfb93[_0x97b2c7(0x1c5)][_0x97b2c7(0x1b7)][_0x97b2c7(0x1b9)]===0x1;}async[_0x12bde9(0x1d7)](_0x12133b){const _0x60bd62=_0x12bde9,{unitId:_0x315b42}=_0x12133b,_0x1126ae=_0x12133b[_0x60bd62(0x1a7)],_0x141f48={'memberId':this[_0x60bd62(0x1d2)]['getCurrentUser']()[_0x60bd62(0x1b1)],'unitId':_0x315b42,'threadId':_0x1126ae,'solved':_0x12133b[_0x60bd62(0x1a6)]?_0x5f4b83['Solved']:_0x5f4b83['OpenOrReOpen']},_0x550293=await this['_httpService'][_0x60bd62(0x1df)](_0x60bd62(0x19f)+_0x315b42+_0x60bd62(0x1ce),{'body':_0x141f48});return!_0x550293[_0x60bd62(0x1c5)]['error']||_0x550293[_0x60bd62(0x1c5)][_0x60bd62(0x1b7)]['code']===0x1;}async[_0x12bde9(0x212)](_0x3d6459,_0xe859f4,_0x2e223f,_0x53e31b){const _0xbe89a9=_0x12bde9,_0x4ffa4f={'memberId':(await this[_0xbe89a9(0x1da)][_0xbe89a9(0x1e7)](_0x3d6459))['getMemberID'](),'threadId':_0x2e223f,'replyId':_0x53e31b,'unitId':_0x3d6459},_0x1c7a13=await this[_0xbe89a9(0x1f5)]['post'](_0xbe89a9(0x19f)+_0x3d6459+_0xbe89a9(0x203),{'body':_0x4ffa4f});return!_0x1c7a13[_0xbe89a9(0x1c5)][_0xbe89a9(0x1b7)]||_0x1c7a13[_0xbe89a9(0x1c5)][_0xbe89a9(0x1b7)][_0xbe89a9(0x1b9)]===0x1;}async[_0x12bde9(0x1f3)](_0xd18e15,_0x576375,_0x52476f){const _0x3f42c8=_0x12bde9,_0x5d8f78={'unitId':_0xd18e15,'threadId':_0x52476f},_0x1d8612=await this['_httpService'][_0x3f42c8(0x1df)]('/universer-api/comment/unit/'+_0xd18e15+_0x3f42c8(0x1ed),{'body':_0x5d8f78}),_0x2a311b=_0x52476f[_0x3f42c8(0x223)](_0x3f359d=>_0x1263d8(_0x1d8612[_0x3f42c8(0x1c5)][_0x3f42c8(0x1a4)][_0x3f359d],_0xd18e15,_0x576375))[_0x3f42c8(0x1cc)](Boolean);return Object['values'](_0x1d8612[_0x3f42c8(0x1c5)][_0x3f42c8(0x21f)])[_0x3f42c8(0x1cf)](_0x3930f5=>{const _0x4b7ad3=_0x3f42c8;this[_0x4b7ad3(0x1d2)][_0x4b7ad3(0x1e3)](_0x3930f5);}),_0x2a311b;}['saveCommentToSnapshot'](_0x1c421f){const _0x24bf2c=_0x12bde9;return{'id':_0x1c421f['id'],'threadId':_0x1c421f[_0x24bf2c(0x1a7)],'ref':_0x1c421f[_0x24bf2c(0x218)]};}};_0x14852d=_0x49d1ca([_0x309ed0(0x0,_0xa66518[_0x12bde9(0x1a5)](_0x4c6741[_0x12bde9(0x1b6)])),_0x309ed0(0x1,_0xa66518[_0x12bde9(0x1a5)](_0xa66518[_0x12bde9(0x1d9)])),_0x309ed0(0x2,_0xa66518[_0x12bde9(0x1a5)](_0x369bd8[_0x12bde9(0x1ab)]))],_0x14852d);var _0xc587c1=Object['getOwnPropertyDescriptor'],_0x406b50=(_0x368638,_0x4b7879,_0x48e6de,_0x2adb2a)=>{for(var _0x108c1e=_0x2adb2a>0x1?void 0x0:_0x2adb2a?_0xc587c1(_0x4b7879,_0x48e6de):_0x4b7879,_0x3c2198=_0x368638['length']-0x1,_0x386bbd;_0x3c2198>=0x0;_0x3c2198--)(_0x386bbd=_0x368638[_0x3c2198])&&(_0x108c1e=_0x386bbd(_0x108c1e)||_0x108c1e);return _0x108c1e;},_0x1a9ba1=(_0x5b64e8,_0x4d4c37)=>(_0x303ec2,_0x13f5d8)=>_0x4d4c37(_0x303ec2,_0x13f5d8,_0x5b64e8);let _0x52afc6=class extends _0xa66518[_0x12bde9(0x1d5)]{constructor(_0x2abe23,_0x15c9a0){const _0x535d96=_0x12bde9;super(),this[_0x535d96(0x1e6)]=_0x2abe23,this[_0x535d96(0x1a0)]=_0x15c9a0,this['_initDataSource']();}[_0x12bde9(0x19a)](){const _0x2a398=_0x12bde9;this[_0x2a398(0x1e6)][_0x2a398(0x1c3)]=this['_threadCommentDataSource'],this[_0x2a398(0x1e6)][_0x2a398(0x1f9)]=!0x1;}};_0x52afc6=_0x406b50([_0x1a9ba1(0x0,_0x4a626a['IThreadCommentDataSourceService']),_0x1a9ba1(0x1,_0xa66518[_0x12bde9(0x1a5)](_0x14852d))],_0x52afc6);var _0x1c3b87=Object['defineProperty'],_0x1dd6e4=Object[_0x12bde9(0x1c8)],_0x25e32=(_0x371a62,_0x278369,_0x25171c)=>_0x278369 in _0x371a62?_0x1c3b87(_0x371a62,_0x278369,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25171c}):_0x371a62[_0x278369]=_0x25171c,_0x2e2ead=(_0x588746,_0x3a2a33,_0x1d3d0c,_0xe4ad41)=>{const _0x565e24=_0x12bde9;for(var _0x4bf82f=_0xe4ad41>0x1?void 0x0:_0xe4ad41?_0x1dd6e4(_0x3a2a33,_0x1d3d0c):_0x3a2a33,_0x3553fd=_0x588746[_0x565e24(0x1a3)]-0x1,_0x302e2e;_0x3553fd>=0x0;_0x3553fd--)(_0x302e2e=_0x588746[_0x3553fd])&&(_0x4bf82f=_0x302e2e(_0x4bf82f)||_0x4bf82f);return _0x4bf82f;},_0x2fd0cb=(_0x1a71c5,_0x55cb9f)=>(_0x5523b5,_0x5c8455)=>_0x55cb9f(_0x5523b5,_0x5c8455,_0x1a71c5),_0x4bbf9d=(_0x2538f7,_0x1e8e27,_0x2bebdf)=>_0x25e32(_0x2538f7,typeof _0x1e8e27!=_0x12bde9(0x216)?_0x1e8e27+'':_0x1e8e27,_0x2bebdf);_0x385d40[_0x12bde9(0x1eb)]=class extends _0xa66518[_0x12bde9(0x221)]{constructor(_0x59ff59=_0x584180,_0x37346a,_0x50f7d3){const _0x933647=_0x12bde9;super(),this[_0x933647(0x209)]=_0x59ff59,this[_0x933647(0x1f4)]=_0x37346a,this['_configService']=_0x50f7d3;const {..._0x2eb91a}=_0xa66518[_0x933647(0x1fa)]({},_0x584180,this[_0x933647(0x209)]);this['_configService'][_0x933647(0x1a1)](_0x5a5f98,_0x2eb91a);}[_0x12bde9(0x1ec)](){[[_0x14852d],[_0x52afc6],[_0x4184d8]]['forEach'](_0x482d40=>{const _0x5d4638=_0x3d2c;this['_injector'][_0x5d4638(0x1b4)](_0x482d40);});}[_0x12bde9(0x1a9)](){const _0x2c6ea7=_0x12bde9;this[_0x2c6ea7(0x1f4)][_0x2c6ea7(0x1ae)](_0x52afc6),this[_0x2c6ea7(0x1f4)][_0x2c6ea7(0x1ae)](_0x4184d8);}},_0x4bbf9d(_0x385d40[_0x12bde9(0x1eb)],'pluginName',_0x381fe7),_0x4bbf9d(_0x385d40[_0x12bde9(0x1eb)],_0x12bde9(0x1fe),_0xa66518[_0x12bde9(0x208)][_0x12bde9(0x1b0)]),_0x385d40['UniverThreadCommentDataSourcePlugin']=_0x2e2ead([_0xa66518['DependentOn'](_0x1b42b9[_0x12bde9(0x1ea)],_0x369bd8['UniverCollaborationClientPlugin'],_0x47e426[_0x12bde9(0x1ef)]),_0x2fd0cb(0x1,_0xa66518[_0x12bde9(0x1a5)](_0xa66518[_0x12bde9(0x20e)])),_0x2fd0cb(0x2,_0xa66518[_0x12bde9(0x1f6)])],_0x385d40[_0x12bde9(0x1eb)]),Object[_0x12bde9(0x219)](_0x385d40,Symbol[_0x12bde9(0x1ba)],{'value':_0x12bde9(0x1c6)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.16.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment": "0.16.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.16.1",
|
|
49
|
+
"@univerjs/core": "0.16.1",
|
|
50
|
+
"@univerjs/network": "0.16.1",
|
|
51
|
+
"@univerjs/thread-comment": "0.16.1",
|
|
52
52
|
"@univerjs/protocol": "0.1.48",
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.16.
|
|
54
|
-
"@univerjs/
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.16.1",
|
|
54
|
+
"@univerjs-pro/license": "0.16.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
60
|
"vitest": "^4.0.18",
|
|
61
|
-
"@univerjs-infra/shared": "0.16.
|
|
61
|
+
"@univerjs-infra/shared": "0.16.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|