@univerjs-pro/thread-comment-datasource 0.8.0-beta.0 → 0.8.0-nightly.202505271607
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 _0x24cd7f=_0x48cf;(function(_0x2e5aa8,_0x3a4b0e){const _0x596b5f=_0x48cf,_0x20b676=_0x2e5aa8();while(!![]){try{const _0x25c708=-parseInt(_0x596b5f(0x10b))/0x1+parseInt(_0x596b5f(0xdc))/0x2+parseInt(_0x596b5f(0xc6))/0x3*(parseInt(_0x596b5f(0x10e))/0x4)+parseInt(_0x596b5f(0xbb))/0x5*(-parseInt(_0x596b5f(0x134))/0x6)+parseInt(_0x596b5f(0x117))/0x7*(parseInt(_0x596b5f(0xf5))/0x8)+parseInt(_0x596b5f(0x122))/0x9+-parseInt(_0x596b5f(0xdd))/0xa*(parseInt(_0x596b5f(0x11f))/0xb);if(_0x25c708===_0x3a4b0e)break;else _0x20b676['push'](_0x20b676['shift']());}catch(_0x3ec97b){_0x20b676['push'](_0x20b676['shift']());}}}(_0xf7c7,0x2c742));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24cd7f(0xcc)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x24cd7f(0xeb)),c=require(_0x24cd7f(0xba)),j=require(_0x24cd7f(0xcf)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x24cd7f(0x119);var I=(_0x5dfb21=>(_0x5dfb21[_0x5dfb21['OpenOrReOpen']=0x0]=_0x24cd7f(0xf2),_0x5dfb21[_0x5dfb21[_0x24cd7f(0x12d)]=0x1]='Solved',_0x5dfb21[_0x5dfb21['UNRECOGNIZED']=-0x1]=_0x24cd7f(0xdb),_0x5dfb21))(I||{}),v=(_0x379c1d=>(_0x379c1d[_0x379c1d[_0x24cd7f(0xf8)]=0x0]=_0x24cd7f(0xf8),_0x379c1d[_0x379c1d[_0x24cd7f(0xc9)]=0x1]='Add',_0x379c1d[_0x379c1d[_0x24cd7f(0x104)]=0x2]=_0x24cd7f(0x104),_0x379c1d[_0x379c1d[_0x24cd7f(0xff)]=0x3]=_0x24cd7f(0xff),_0x379c1d[_0x379c1d[_0x24cd7f(0x114)]=0x4]=_0x24cd7f(0x114),_0x379c1d[_0x379c1d[_0x24cd7f(0x123)]=0x5]='Solve',_0x379c1d[_0x379c1d[_0x24cd7f(0xdb)]=-0x1]='UNRECOGNIZED',_0x379c1d))(v||{});function _0xf7c7(){const _0x1c5888=['filter','pipe','/reply','content','/universer-api/user/list','Delete','solved','_initDataSource','14917ytkCKI','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onReady','bufferTime','_init','_configService','body','88aJXnFZ','error','map','1108296kifsTu','Solve','getUser','UniverLicensePlugin','reply','Plugin','/solved','addComment','type','DependentOn','HTTPService','Solved','comments','disposeWithMe','onStarting','personId','deleteComment','CustomRangeType','110652fxqfgI','defineProperty','size','addUser','threadId','@univerjs/core','85HDwawR','_initUserSync','code','users','payload','forEach','slice','_injector','userID','UniverThreadCommentDataSourcePlugin','Disposable','3UXCjIO','_config','UniverThreadCommentUIPlugin','Add','_threadCommentDataSourceService','dataSource','Module','getMemberID','delete','@univerjs/thread-comment-ui','Injector','_httpService','get','replies','CollaborationSessionService','ThreadCommentModel','COMMENT','/universer-api/comment/unit/','replyId','Inject','commentUpdate$','UNRECOGNIZED','690140RYqVFt','141050RVoQQd','UserManagerService','_userService','_commentService','userId','createTimestamp','rangeId','pluginName','symbol','/list','resolveComment','root','_threadCommentModel','updateComment','@univerjs-pro/license','_sessionService','ref','subscribe','getUnit','post','add','OpenOrReOpen','find','format','552yNkHfi','stringify','getOwnPropertyDescriptor','Unknown','syncUpdateMutationToColla','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','merge','/add','user','Edit','customRanges','parse','IThreadCommentDataSourceService','length','Reply','parentId','UNIVER_UNKNOWN','comment','listComments','IConfigService','saveCommentToSnapshot','326766gcCKCA','requireSession','thread-comment-data-source.config','1279796jLTXkS'];_0xf7c7=function(){return _0x1c5888;};return _0xf7c7();}const f=_0x2ec48a=>c['dayjs'](new Date(+_0x2ec48a))[_0x24cd7f(0xf4)](_0x24cd7f(0xfb)),R=async(_0x479c9b,_0x151f08)=>{const _0x4d57f5=_0x24cd7f,_0x54c409=_0x479c9b[_0x4d57f5(0xd2)](c[_0x4d57f5(0xde)]),_0x4cefec=_0x479c9b[_0x4d57f5(0xd2)](P[_0x4d57f5(0x12c)]);_0x151f08[_0x4d57f5(0xc0)](_0x38fa52=>{const _0x1fc802=_0x4d57f5;_0x54c409[_0x1fc802(0x124)](_0x38fa52)&&_0x151f08[_0x1fc802(0xce)](_0x38fa52);}),_0x151f08[_0x4d57f5(0xb7)]&&(await _0x4cefec['get'](_0x4d57f5(0x113),{'params':{'userIDs':[..._0x151f08]}}))[_0x4d57f5(0x11e)][_0x4d57f5(0xbe)][_0x4d57f5(0xc0)](_0x41b9ae=>{const _0x3c460e=_0x4d57f5;_0x41b9ae&&_0x54c409[_0x3c460e(0xb8)](_0x41b9ae);});};var $=Object[_0x24cd7f(0xf7)],E=(_0x5c3653,_0x1f4f2e,_0xa3397b,_0x233ac2)=>{const _0x51ffee=_0x24cd7f;for(var _0x26c193=_0x233ac2>0x1?void 0x0:_0x233ac2?$(_0x1f4f2e,_0xa3397b):_0x1f4f2e,_0x47add2=_0x5c3653[_0x51ffee(0x103)]-0x1,_0x3a6785;_0x47add2>=0x0;_0x47add2--)(_0x3a6785=_0x5c3653[_0x47add2])&&(_0x26c193=_0x3a6785(_0x26c193)||_0x26c193);return _0x26c193;},S=(_0x40090a,_0x2efe13)=>(_0xb110b0,_0x2ca2e8)=>_0x2efe13(_0xb110b0,_0x2ca2e8,_0x40090a);let p=class extends c[_0x24cd7f(0xc5)]{constructor(_0x3a2fb9,_0xdacefd,_0xbfa23b,_0x5691da){const _0x5a2990=_0x24cd7f;super(),this[_0x5a2990(0xe0)]=_0x3a2fb9,this[_0x5a2990(0xe9)]=_0xdacefd,this[_0x5a2990(0xdf)]=_0xbfa23b,this[_0x5a2990(0xc2)]=_0x5691da,this[_0x5a2990(0x11c)](),this[_0x5a2990(0xbc)]();}[_0x24cd7f(0xbc)](){const _0x3a74b7=_0x24cd7f;this[_0x3a74b7(0x12f)](this['_threadCommentModel'][_0x3a74b7(0xda)][_0x3a74b7(0x110)](w[_0x3a74b7(0x11b)](0x10))[_0x3a74b7(0xee)](_0x5c26a0=>{const _0x112582=_0x3a74b7,_0x302d5e=new Set();_0x5c26a0[_0x112582(0xc0)](_0x4fa186=>{const _0x5c133f=_0x112582;switch(_0x4fa186[_0x5c133f(0x12a)]){case _0x5c133f(0xf1):{const _0x30b30e=_0x4fa186[_0x5c133f(0xbf)][_0x5c133f(0x131)];_0x302d5e[_0x5c133f(0xf1)](_0x30b30e);break;}}}),R(this[_0x112582(0xc2)],_0x302d5e);}));}[_0x24cd7f(0x11c)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x41257a=>{const _0x2552b0=_0x48cf;var _0xb88aa7,_0x208c3b,_0x17bd03,_0x383091;const _0x139182=(_0xb88aa7=this['_threadCommentModel'][_0x2552b0(0xef)](_0x41257a[_0x2552b0(0x118)])[_0x2552b0(0xf3)](_0x3ea0e4=>_0x3ea0e4[_0x2552b0(0xb9)]===_0x41257a[_0x2552b0(0xb9)]))==null?void 0x0:_0xb88aa7[_0x2552b0(0xe8)];if(!_0x139182)return;const {unitId:_0x519515,subUnitId:_0x6b23c}=_0x139182;switch(_0x41257a[_0x2552b0(0xfe)]&&this[_0x2552b0(0xdf)][_0x2552b0(0xb8)](_0x41257a['user']),_0x41257a[_0x2552b0(0x12a)]){case v[_0x2552b0(0xc9)]:break;case v['Reply']:{this[_0x2552b0(0xe9)][_0x2552b0(0x129)](_0x519515,_0x6b23c,{'unitId':_0x519515,'subUnitId':_0x6b23c,'ref':'','id':_0x41257a[_0x2552b0(0xd8)],'dT':f(+_0x41257a['createTimestamp']),'threadId':_0x41257a['threadId'],'personId':(_0x17bd03=(_0x208c3b=_0x41257a[_0x2552b0(0xfe)])==null?void 0x0:_0x208c3b[_0x2552b0(0xc3)])!=null?_0x17bd03:_0x41257a[_0x2552b0(0xe1)],'text':JSON[_0x2552b0(0x101)](_0x41257a[_0x2552b0(0x112)]),'parentId':_0x139182['id']});break;}case v[_0x2552b0(0x114)]:{const _0xae078a=this[_0x2552b0(0xe9)]['getComment'](_0x519515,_0x6b23c,_0x41257a[_0x2552b0(0xd8)]);_0xae078a&&_0xae078a[_0x2552b0(0x105)]&&this['_threadCommentModel']['deleteComment'](_0x519515,_0x6b23c,_0x41257a[_0x2552b0(0xd8)]);break;}case v[_0x2552b0(0xff)]:{this[_0x2552b0(0xe9)][_0x2552b0(0xea)](_0x519515,_0x6b23c,{'commentId':_0x41257a[_0x2552b0(0xd8)],'text':JSON[_0x2552b0(0x101)](_0x41257a[_0x2552b0(0x112)])});break;}case v[_0x2552b0(0x123)]:{const _0x204500=(_0x383091=this[_0x2552b0(0xe9)][_0x2552b0(0xef)](_0x41257a[_0x2552b0(0x118)])[_0x2552b0(0xf3)](_0x3af9fe=>_0x3af9fe['threadId']===_0x41257a['threadId']))==null?void 0x0:_0x383091[_0x2552b0(0xe8)];_0x204500&&this['_threadCommentModel'][_0x2552b0(0xe7)](_0x519515,_0x6b23c,_0x204500['id'],_0x41257a[_0x2552b0(0x115)]===I[_0x2552b0(0x12d)]);break;}}}));}};p=E([S(0x0,c[_0x24cd7f(0xd9)](b['CommentService'])),S(0x1,c[_0x24cd7f(0xd9)](M[_0x24cd7f(0xd5)])),S(0x2,c['Inject'](c[_0x24cd7f(0xde)])),S(0x3,c[_0x24cd7f(0xd9)](c[_0x24cd7f(0xd0)]))],p);const q=_0x24cd7f(0x10d),D={};var A=Object[_0x24cd7f(0xf7)],x=(_0x105fd3,_0x491c3b,_0x13a3c8,_0x5cb772)=>{for(var _0x469438=_0x5cb772>0x1?void 0x0:_0x5cb772?A(_0x491c3b,_0x13a3c8):_0x491c3b,_0x51e1a1=_0x105fd3['length']-0x1,_0x165db2;_0x51e1a1>=0x0;_0x51e1a1--)(_0x165db2=_0x105fd3[_0x51e1a1])&&(_0x469438=_0x165db2(_0x469438)||_0x469438);return _0x469438;},_=(_0x3b6bd8,_0x1ad0d0)=>(_0x46a18d,_0x2a0720)=>_0x1ad0d0(_0x46a18d,_0x2a0720,_0x3b6bd8);function Y(_0x6e2f35,_0x26e03d){const _0x5be93f=_0x24cd7f,_0x5ab89d=_0x6e2f35[_0x5be93f(0xd3)][0x0];return{..._0x26e03d,'id':_0x5ab89d[_0x5be93f(0xd8)],'resolved':_0x6e2f35[_0x5be93f(0x115)]===0x1,'dT':f(_0x5ab89d[_0x5be93f(0xe2)]),'personId':_0x5ab89d[_0x5be93f(0xe1)],'threadId':_0x5ab89d['threadId']};}function _0x48cf(_0x30cc5d,_0x25e750){const _0xf7c7f8=_0xf7c7();return _0x48cf=function(_0x48cf82,_0x3231d1){_0x48cf82=_0x48cf82-0xb7;let _0x1687d3=_0xf7c7f8[_0x48cf82];return _0x1687d3;},_0x48cf(_0x30cc5d,_0x25e750);}function G(_0x168684,_0x520577,_0xf09982){const _0x56e814=_0x24cd7f;var _0x29ad35,_0x29c570;if(((_0x29c570=(_0x29ad35=_0x168684==null?void 0x0:_0x168684[_0x56e814(0xd3)])==null?void 0x0:_0x29ad35['length'])!=null?_0x29c570:0x0)>0x0){const _0x521c68=(_0x4d5cff,_0x11e879)=>({'id':_0x4d5cff[_0x56e814(0xd8)],'threadId':_0x4d5cff['threadId'],'dT':f(_0x4d5cff['createTimestamp']),'personId':_0x4d5cff[_0x56e814(0xe1)],'resolved':_0x168684[_0x56e814(0x115)]===I[_0x56e814(0x12d)],'unitId':_0x520577,'subUnitId':_0xf09982,'text':JSON[_0x56e814(0x101)](_0x4d5cff[_0x56e814(0x112)]),'parentId':_0x11e879}),_0x172d7a=_0x521c68(_0x168684[_0x56e814(0xd3)][0x0]);return{..._0x172d7a,'children':_0x168684[_0x56e814(0xd3)][_0x56e814(0xc1)](0x1)[_0x56e814(0x121)](_0x4b8737=>_0x521c68(_0x4b8737,_0x172d7a['id']))};}return null;}let g=class{constructor(_0x24fa46,_0x10415a,_0x4d68bf,_0x5d80eb){const _0xe25e88=_0x24cd7f;this[_0xe25e88(0xd1)]=_0x24fa46,this[_0xe25e88(0xdf)]=_0x10415a,this[_0xe25e88(0xec)]=_0x4d68bf,this['_injector']=_0x5d80eb;}async[_0x24cd7f(0x129)](_0x3cea79){const _0xdb57c7=_0x24cd7f;var _0x4157ac,_0x440567;const {parentId:_0x17a3c5,unitId:_0x2add0d,text:_0x18baa5,threadId:_0x589b73}=_0x3cea79,_0x2fa42=(_0x440567=(_0x4157ac=_0x18baa5[_0xdb57c7(0x100)])==null?void 0x0:_0x4157ac[_0xdb57c7(0x10f)](_0x134781=>_0x134781['rangeType']===c[_0xdb57c7(0x133)][_0xdb57c7(0xd6)])['map'](_0x4db88d=>_0x4db88d['rangeId']))!=null?_0x440567:[],_0x47cab2=JSON[_0xdb57c7(0xf6)](_0x18baa5),_0x25328b=(await this[_0xdb57c7(0xec)]['requireSession'](_0x2add0d))[_0xdb57c7(0xcd)]();if(_0x17a3c5){const _0x3f10dd={'memberId':_0x25328b,'unitId':_0x2add0d,'content':_0x47cab2,'mention':_0x2fa42,'threadId':_0x589b73},_0x1bd0c5=(await this[_0xdb57c7(0xd1)][_0xdb57c7(0xf0)](_0xdb57c7(0xd7)+_0x2add0d+_0xdb57c7(0x111),{'body':_0x3f10dd}))[_0xdb57c7(0x11e)][_0xdb57c7(0x126)];return{..._0x3cea79,'id':_0x1bd0c5['replyId'],'dT':c['dayjs'](+_0x1bd0c5['createTimestamp'])[_0xdb57c7(0xf4)](_0xdb57c7(0xfb)),'personId':_0x1bd0c5[_0xdb57c7(0xe1)]};}else{const _0x57cdb7={'memberId':_0x25328b,'unitId':_0x2add0d,'content':_0x47cab2,'mention':_0x2fa42},_0x44f028=await this['_httpService'][_0xdb57c7(0xf0)](_0xdb57c7(0xd7)+_0x2add0d+_0xdb57c7(0xfd),{'body':_0x57cdb7});return Y(_0x44f028['body'][_0xdb57c7(0x107)],_0x3cea79);}}async['updateComment'](_0x21b14e){const _0x47213c=_0x24cd7f;var _0x5f051b,_0xe97167;const {text:_0x38cefe,unitId:_0x1cdf49}=_0x21b14e,_0x54608c=(_0xe97167=(_0x5f051b=_0x38cefe[_0x47213c(0x100)])==null?void 0x0:_0x5f051b[_0x47213c(0x10f)](_0x2ce8e1=>_0x2ce8e1['rangeType']===c[_0x47213c(0x133)][_0x47213c(0xd6)])[_0x47213c(0x121)](_0x3606bb=>_0x3606bb[_0x47213c(0xe3)]))!=null?_0xe97167:[],_0x44a8bc=JSON[_0x47213c(0xf6)](_0x38cefe),_0x544622=_0x21b14e[_0x47213c(0xb9)],_0x43d7cc=_0x21b14e['id'],_0x267335={'memberId':(await this['_sessionService'][_0x47213c(0x10c)](_0x1cdf49))[_0x47213c(0xcd)](),'unitId':_0x1cdf49,'threadId':_0x544622,'mention':_0x54608c,'content':_0x44a8bc,'replyId':_0x43d7cc},_0x94106f=await this[_0x47213c(0xd1)][_0x47213c(0xf0)](_0x47213c(0xd7)+_0x1cdf49+'/edit',{'body':_0x267335});return!_0x94106f['body']['error']||_0x94106f[_0x47213c(0x11e)][_0x47213c(0x120)]['code']===0x1;}async['resolveComment'](_0x2ae74c){const _0x33574a=_0x24cd7f,{unitId:_0x405af1}=_0x2ae74c,_0x5bf048=_0x2ae74c['threadId'],_0x5a318a={'memberId':this['_userService']['getCurrentUser']()[_0x33574a(0xc3)],'unitId':_0x405af1,'threadId':_0x5bf048,'solved':_0x2ae74c['resolved']?I[_0x33574a(0x12d)]:I[_0x33574a(0xf2)]},_0x890cea=await this[_0x33574a(0xd1)][_0x33574a(0xf0)]('/universer-api/comment/unit/'+_0x405af1+_0x33574a(0x128),{'body':_0x5a318a});return!_0x890cea[_0x33574a(0x11e)][_0x33574a(0x120)]||_0x890cea[_0x33574a(0x11e)][_0x33574a(0x120)][_0x33574a(0xbd)]===0x1;}async[_0x24cd7f(0x132)](_0x1fa43b,_0x3d9d65,_0x4e1cd,_0xae5bba){const _0x9dc541=_0x24cd7f,_0x486317={'memberId':(await this['_sessionService'][_0x9dc541(0x10c)](_0x1fa43b))[_0x9dc541(0xcd)](),'threadId':_0x4e1cd,'replyId':_0xae5bba,'unitId':_0x1fa43b},_0x5a6e5b=await this['_httpService'][_0x9dc541(0xf0)](_0x9dc541(0xd7)+_0x1fa43b+'/delete',{'body':_0x486317});return!_0x5a6e5b[_0x9dc541(0x11e)][_0x9dc541(0x120)]||_0x5a6e5b[_0x9dc541(0x11e)]['error'][_0x9dc541(0xbd)]===0x1;}async[_0x24cd7f(0x108)](_0x17fec5,_0x44a24d,_0x3757f7){const _0x5a3280=_0x24cd7f,_0x526aab={'unitId':_0x17fec5,'threadId':_0x3757f7},_0x1f4a1d=await this['_httpService'][_0x5a3280(0xf0)](_0x5a3280(0xd7)+_0x17fec5+_0x5a3280(0xe6),{'body':_0x526aab}),_0x2f5da4=_0x3757f7['map'](_0x5f25cb=>G(_0x1f4a1d[_0x5a3280(0x11e)][_0x5a3280(0x12e)][_0x5f25cb],_0x17fec5,_0x44a24d))[_0x5a3280(0x10f)](Boolean);return Object['values'](_0x1f4a1d['body'][_0x5a3280(0xbe)])[_0x5a3280(0xc0)](_0xe3937f=>{const _0x58950f=_0x5a3280;this[_0x58950f(0xdf)]['addUser'](_0xe3937f);}),_0x2f5da4;}[_0x24cd7f(0x10a)](_0x4ea6dd){const _0x256dec=_0x24cd7f;return{'id':_0x4ea6dd['id'],'threadId':_0x4ea6dd[_0x256dec(0xb9)],'ref':_0x4ea6dd[_0x256dec(0xed)]};}};g=x([_(0x0,c['Inject'](P[_0x24cd7f(0x12c)])),_(0x1,c[_0x24cd7f(0xd9)](c[_0x24cd7f(0xde)])),_(0x2,c[_0x24cd7f(0xd9)](b[_0x24cd7f(0xd4)])),_(0x3,c['Inject'](c[_0x24cd7f(0xd0)]))],g);var H=Object[_0x24cd7f(0xf7)],J=(_0x247382,_0x531161,_0x3cc8c8,_0x4dda94)=>{const _0x3d95fb=_0x24cd7f;for(var _0xe172d8=_0x4dda94>0x1?void 0x0:_0x4dda94?H(_0x531161,_0x3cc8c8):_0x531161,_0x4c3319=_0x247382[_0x3d95fb(0x103)]-0x1,_0x2dd14e;_0x4c3319>=0x0;_0x4c3319--)(_0x2dd14e=_0x247382[_0x4c3319])&&(_0xe172d8=_0x2dd14e(_0xe172d8)||_0xe172d8);return _0xe172d8;},y=(_0x5260da,_0xf40068)=>(_0x103204,_0x154be4)=>_0xf40068(_0x103204,_0x154be4,_0x5260da);let C=class extends c[_0x24cd7f(0xc5)]{constructor(_0x4354f7,_0x5f5305){const _0x4a71b1=_0x24cd7f;super(),this['_threadCommentDataSourceService']=_0x4354f7,this[_0x4a71b1(0xfa)]=_0x5f5305,this[_0x4a71b1(0x116)]();}['_initDataSource'](){const _0x4102c3=_0x24cd7f;this['_threadCommentDataSourceService'][_0x4102c3(0xcb)]=this[_0x4102c3(0xfa)],this[_0x4102c3(0xca)][_0x4102c3(0xf9)]=!0x1;}};C=J([y(0x0,M[_0x24cd7f(0x102)]),y(0x1,c[_0x24cd7f(0xd9)](g))],C);var F=Object[_0x24cd7f(0x135)],L=Object['getOwnPropertyDescriptor'],Z=(_0x38c5dc,_0xf19c4,_0x5b9478)=>_0xf19c4 in _0x38c5dc?F(_0x38c5dc,_0xf19c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b9478}):_0x38c5dc[_0xf19c4]=_0x5b9478,W=(_0x337cbc,_0x1facc5,_0x10d4db,_0x4a9594)=>{const _0x25caed=_0x24cd7f;for(var _0x1299d0=_0x4a9594>0x1?void 0x0:_0x4a9594?L(_0x1facc5,_0x10d4db):_0x1facc5,_0x2bc413=_0x337cbc[_0x25caed(0x103)]-0x1,_0x48b1ad;_0x2bc413>=0x0;_0x2bc413--)(_0x48b1ad=_0x337cbc[_0x2bc413])&&(_0x1299d0=_0x48b1ad(_0x1299d0)||_0x1299d0);return _0x1299d0;},O=(_0x515aa7,_0x4d6b01)=>(_0x5a329b,_0x3a8c78)=>_0x4d6b01(_0x5a329b,_0x3a8c78,_0x515aa7),N=(_0x3e9ce7,_0x4a8d3c,_0x2abfd1)=>Z(_0x3e9ce7,typeof _0x4a8d3c!=_0x24cd7f(0xe5)?_0x4a8d3c+'':_0x4a8d3c,_0x2abfd1);exports[_0x24cd7f(0xc4)]=class extends c[_0x24cd7f(0x127)]{constructor(_0x1fa87b=D,_0x28a78f,_0x250814){const _0x5aaf66=_0x24cd7f;super(),this[_0x5aaf66(0xc7)]=_0x1fa87b,this['_injector']=_0x28a78f,this[_0x5aaf66(0x11d)]=_0x250814;const {..._0x582a69}=c[_0x5aaf66(0xfc)]({},D,this['_config']);this[_0x5aaf66(0x11d)]['setConfig'](q,_0x582a69);}[_0x24cd7f(0x130)](){const _0x4c9884=_0x24cd7f;[[g],[C],[p]][_0x4c9884(0xc0)](_0x4fec74=>{const _0x1cee96=_0x4c9884;this[_0x1cee96(0xc2)][_0x1cee96(0xf1)](_0x4fec74);});}[_0x24cd7f(0x11a)](){const _0x48f178=_0x24cd7f;this[_0x48f178(0xc2)]['get'](C),this[_0x48f178(0xc2)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x24cd7f(0xe4),U),N(exports[_0x24cd7f(0xc4)],_0x24cd7f(0x12a),c['UniverInstanceType'][_0x24cd7f(0x106)]),exports[_0x24cd7f(0xc4)]=W([c[_0x24cd7f(0x12b)](j[_0x24cd7f(0xc8)],b['UniverCollaborationClientPlugin'],T[_0x24cd7f(0x125)]),O(0x1,c['Inject'](c[_0x24cd7f(0xd0)])),O(0x2,c[_0x24cd7f(0x109)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4deb1c=_0x4d64;(function(_0x116328,_0x49454b){const _0x37072f=_0x4d64,_0x298eac=_0x116328();while(!![]){try{const _0x3be10a=-parseInt(_0x37072f(0x1a5))/0x1+parseInt(_0x37072f(0x1a1))/0x2*(-parseInt(_0x37072f(0x1cf))/0x3)+parseInt(_0x37072f(0x1da))/0x4+-parseInt(_0x37072f(0x177))/0x5*(-parseInt(_0x37072f(0x1a8))/0x6)+parseInt(_0x37072f(0x1ce))/0x7*(-parseInt(_0x37072f(0x1d7))/0x8)+-parseInt(_0x37072f(0x1af))/0x9*(-parseInt(_0x37072f(0x165))/0xa)+-parseInt(_0x37072f(0x19a))/0xb*(parseInt(_0x37072f(0x1d4))/0xc);if(_0x3be10a===_0x49454b)break;else _0x298eac['push'](_0x298eac['shift']());}catch(_0x21b5dd){_0x298eac['push'](_0x298eac['shift']());}}}(_0x3068,0x859e5));Object[_0x4deb1c(0x1d2)](exports,Symbol[_0x4deb1c(0x1df)],{'value':_0x4deb1c(0x16d)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x4deb1c(0x1b7)),c=require(_0x4deb1c(0x197)),j=require('@univerjs/thread-comment-ui'),M=require(_0x4deb1c(0x16a)),w=require(_0x4deb1c(0x1dd)),P=require('@univerjs/network'),U=_0x4deb1c(0x1ab);var I=(_0x3ad4cf=>(_0x3ad4cf[_0x3ad4cf[_0x4deb1c(0x192)]=0x0]=_0x4deb1c(0x192),_0x3ad4cf[_0x3ad4cf[_0x4deb1c(0x18e)]=0x1]=_0x4deb1c(0x18e),_0x3ad4cf[_0x3ad4cf['UNRECOGNIZED']=-0x1]=_0x4deb1c(0x190),_0x3ad4cf))(I||{}),v=(_0x5f5d88=>(_0x5f5d88[_0x5f5d88[_0x4deb1c(0x171)]=0x0]=_0x4deb1c(0x171),_0x5f5d88[_0x5f5d88['Add']=0x1]=_0x4deb1c(0x19d),_0x5f5d88[_0x5f5d88['Reply']=0x2]=_0x4deb1c(0x193),_0x5f5d88[_0x5f5d88[_0x4deb1c(0x19f)]=0x3]=_0x4deb1c(0x19f),_0x5f5d88[_0x5f5d88['Delete']=0x4]='Delete',_0x5f5d88[_0x5f5d88[_0x4deb1c(0x1b5)]=0x5]=_0x4deb1c(0x1b5),_0x5f5d88[_0x5f5d88[_0x4deb1c(0x190)]=-0x1]='UNRECOGNIZED',_0x5f5d88))(v||{});const f=_0x4f9d0b=>c[_0x4deb1c(0x1a2)](new Date(+_0x4f9d0b))[_0x4deb1c(0x19c)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1fec01,_0x3253a5)=>{const _0x5329d9=_0x4deb1c,_0x7272aa=_0x1fec01['get'](c[_0x5329d9(0x184)]),_0x2c24ca=_0x1fec01[_0x5329d9(0x195)](P[_0x5329d9(0x1c1)]);_0x3253a5[_0x5329d9(0x1be)](_0x4e4e5d=>{const _0x154a67=_0x5329d9;_0x7272aa['getUser'](_0x4e4e5d)&&_0x3253a5[_0x154a67(0x1b4)](_0x4e4e5d);}),_0x3253a5[_0x5329d9(0x17f)]&&(await _0x2c24ca[_0x5329d9(0x195)](_0x5329d9(0x1e0),{'params':{'userIDs':[..._0x3253a5]}}))[_0x5329d9(0x1db)][_0x5329d9(0x160)][_0x5329d9(0x1be)](_0x4a46b2=>{const _0x942d4c=_0x5329d9;_0x4a46b2&&_0x7272aa[_0x942d4c(0x1ae)](_0x4a46b2);});};var $=Object[_0x4deb1c(0x17d)],E=(_0x3f5361,_0x5df08f,_0xfa55b8,_0x33692b)=>{for(var _0x34a77d=_0x33692b>0x1?void 0x0:_0x33692b?$(_0x5df08f,_0xfa55b8):_0x5df08f,_0x3c3368=_0x3f5361['length']-0x1,_0x353fa9;_0x3c3368>=0x0;_0x3c3368--)(_0x353fa9=_0x3f5361[_0x3c3368])&&(_0x34a77d=_0x353fa9(_0x34a77d)||_0x34a77d);return _0x34a77d;},S=(_0x5395cc,_0x178471)=>(_0x24292e,_0x4b6c8a)=>_0x178471(_0x24292e,_0x4b6c8a,_0x5395cc);let p=class extends c[_0x4deb1c(0x164)]{constructor(_0x168e57,_0xc39edc,_0x28592e,_0x4448d1){const _0x2f9303=_0x4deb1c;super(),this[_0x2f9303(0x162)]=_0x168e57,this['_threadCommentModel']=_0xc39edc,this[_0x2f9303(0x15e)]=_0x28592e,this['_injector']=_0x4448d1,this[_0x2f9303(0x1bb)](),this[_0x2f9303(0x1c9)]();}[_0x4deb1c(0x1c9)](){const _0x5d8b09=_0x4deb1c;this['disposeWithMe'](this[_0x5d8b09(0x1bf)][_0x5d8b09(0x199)][_0x5d8b09(0x17b)](w[_0x5d8b09(0x1d6)](0x10))[_0x5d8b09(0x196)](_0x2e3c9e=>{const _0xc06a17=_0x5d8b09,_0x110c23=new Set();_0x2e3c9e[_0xc06a17(0x1be)](_0x24dd30=>{const _0x2c679e=_0xc06a17;switch(_0x24dd30['type']){case _0x2c679e(0x198):{const _0x519bf=_0x24dd30[_0x2c679e(0x1c7)][_0x2c679e(0x1ac)];_0x110c23[_0x2c679e(0x198)](_0x519bf);break;}}}),R(this[_0xc06a17(0x18d)],_0x110c23);}));}['_init'](){const _0x4411b9=_0x4deb1c;this[_0x4411b9(0x1cb)](this[_0x4411b9(0x162)][_0x4411b9(0x199)][_0x4411b9(0x196)](async _0x148ba0=>{const _0x577e6a=_0x4411b9;var _0x5d18e0,_0x181b45,_0xfc210a,_0x34ac40;const _0x6d7b39=(_0x5d18e0=this[_0x577e6a(0x1bf)][_0x577e6a(0x15d)](_0x148ba0[_0x577e6a(0x178)])[_0x577e6a(0x166)](_0x5085ca=>_0x5085ca[_0x577e6a(0x168)]===_0x148ba0[_0x577e6a(0x168)]))==null?void 0x0:_0x5d18e0[_0x577e6a(0x16e)];if(!_0x6d7b39)return;const {unitId:_0xbc118e,subUnitId:_0x287cd4}=_0x6d7b39;switch(_0x148ba0[_0x577e6a(0x1a9)]&&this['_userService'][_0x577e6a(0x1ae)](_0x148ba0['user']),_0x148ba0['type']){case v[_0x577e6a(0x19d)]:break;case v[_0x577e6a(0x193)]:{this[_0x577e6a(0x1bf)][_0x577e6a(0x1bd)](_0xbc118e,_0x287cd4,{'unitId':_0xbc118e,'subUnitId':_0x287cd4,'ref':'','id':_0x148ba0[_0x577e6a(0x18a)],'dT':f(+_0x148ba0[_0x577e6a(0x16c)]),'threadId':_0x148ba0['threadId'],'personId':(_0xfc210a=(_0x181b45=_0x148ba0[_0x577e6a(0x1a9)])==null?void 0x0:_0x181b45[_0x577e6a(0x1b9)])!=null?_0xfc210a:_0x148ba0['userId'],'text':JSON[_0x577e6a(0x1d5)](_0x148ba0[_0x577e6a(0x183)]),'parentId':_0x6d7b39['id']});break;}case v['Delete']:{const _0x551356=this[_0x577e6a(0x1bf)]['getComment'](_0xbc118e,_0x287cd4,_0x148ba0['replyId']);_0x551356&&_0x551356[_0x577e6a(0x181)]&&this[_0x577e6a(0x1bf)][_0x577e6a(0x173)](_0xbc118e,_0x287cd4,_0x148ba0[_0x577e6a(0x18a)]);break;}case v[_0x577e6a(0x19f)]:{this['_threadCommentModel']['updateComment'](_0xbc118e,_0x287cd4,{'commentId':_0x148ba0[_0x577e6a(0x18a)],'text':JSON['parse'](_0x148ba0[_0x577e6a(0x183)])});break;}case v[_0x577e6a(0x1b5)]:{const _0x136919=(_0x34ac40=this[_0x577e6a(0x1bf)][_0x577e6a(0x15d)](_0x148ba0[_0x577e6a(0x178)])['find'](_0x11610f=>_0x11610f['threadId']===_0x148ba0[_0x577e6a(0x168)]))==null?void 0x0:_0x34ac40['root'];_0x136919&&this[_0x577e6a(0x1bf)][_0x577e6a(0x1ad)](_0xbc118e,_0x287cd4,_0x136919['id'],_0x148ba0[_0x577e6a(0x1b1)]===I[_0x577e6a(0x18e)]);break;}}}));}};p=E([S(0x0,c[_0x4deb1c(0x18f)](b['CommentService'])),S(0x1,c[_0x4deb1c(0x18f)](M['ThreadCommentModel'])),S(0x2,c[_0x4deb1c(0x18f)](c['UserManagerService'])),S(0x3,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)]))],p);const q=_0x4deb1c(0x1d1),D={};var A=Object[_0x4deb1c(0x17d)],x=(_0x3b0cb0,_0x5bf2ad,_0x40c627,_0x44e679)=>{const _0x108d27=_0x4deb1c;for(var _0xff5cb6=_0x44e679>0x1?void 0x0:_0x44e679?A(_0x5bf2ad,_0x40c627):_0x5bf2ad,_0x42001c=_0x3b0cb0[_0x108d27(0x17e)]-0x1,_0x4b65e5;_0x42001c>=0x0;_0x42001c--)(_0x4b65e5=_0x3b0cb0[_0x42001c])&&(_0xff5cb6=_0x4b65e5(_0xff5cb6)||_0xff5cb6);return _0xff5cb6;},_=(_0x135633,_0x5b1f79)=>(_0x4a24ee,_0x32a479)=>_0x5b1f79(_0x4a24ee,_0x32a479,_0x135633);function Y(_0x45c10a,_0x5e56c4){const _0x269e5b=_0x4deb1c,_0x133b83=_0x45c10a[_0x269e5b(0x174)][0x0];return{..._0x5e56c4,'id':_0x133b83['replyId'],'resolved':_0x45c10a[_0x269e5b(0x1b1)]===0x1,'dT':f(_0x133b83['createTimestamp']),'personId':_0x133b83[_0x269e5b(0x1c3)],'threadId':_0x133b83['threadId']};}function G(_0x108d87,_0x57c02c,_0xb254c7){const _0x1dee86=_0x4deb1c;var _0x4cd930,_0x3a04b8;if(((_0x3a04b8=(_0x4cd930=_0x108d87==null?void 0x0:_0x108d87[_0x1dee86(0x174)])==null?void 0x0:_0x4cd930[_0x1dee86(0x17e)])!=null?_0x3a04b8:0x0)>0x0){const _0x49cbd5=(_0x521d5b,_0x41eb75)=>({'id':_0x521d5b[_0x1dee86(0x18a)],'threadId':_0x521d5b['threadId'],'dT':f(_0x521d5b[_0x1dee86(0x16c)]),'personId':_0x521d5b[_0x1dee86(0x1c3)],'resolved':_0x108d87[_0x1dee86(0x1b1)]===I[_0x1dee86(0x18e)],'unitId':_0x57c02c,'subUnitId':_0xb254c7,'text':JSON[_0x1dee86(0x1d5)](_0x521d5b['content']),'parentId':_0x41eb75}),_0x14f29c=_0x49cbd5(_0x108d87[_0x1dee86(0x174)][0x0]);return{..._0x14f29c,'children':_0x108d87[_0x1dee86(0x174)][_0x1dee86(0x175)](0x1)[_0x1dee86(0x1d9)](_0x1422dd=>_0x49cbd5(_0x1422dd,_0x14f29c['id']))};}return null;}let g=class{constructor(_0x86b181,_0x3a0e4a,_0x55faf5,_0xecc61e){const _0x464811=_0x4deb1c;this[_0x464811(0x1cc)]=_0x86b181,this['_userService']=_0x3a0e4a,this['_sessionService']=_0x55faf5,this[_0x464811(0x18d)]=_0xecc61e;}async[_0x4deb1c(0x1bd)](_0x5a3ca1){const _0xc15d6b=_0x4deb1c;var _0x1501a8,_0x9f0d2;const {parentId:_0x23d9b8,unitId:_0x4753cb,text:_0x2c4a7d,threadId:_0x292740}=_0x5a3ca1,_0x5f25cb=(_0x9f0d2=(_0x1501a8=_0x2c4a7d[_0xc15d6b(0x1e1)])==null?void 0x0:_0x1501a8['filter'](_0xfa1b5f=>_0xfa1b5f[_0xc15d6b(0x186)]===c[_0xc15d6b(0x1a6)][_0xc15d6b(0x182)])['map'](_0xea7818=>_0xea7818[_0xc15d6b(0x1b8)]))!=null?_0x9f0d2:[],_0x587e69=JSON[_0xc15d6b(0x188)](_0x2c4a7d),_0x322d65=(await this[_0xc15d6b(0x179)][_0xc15d6b(0x1c5)](_0x4753cb))[_0xc15d6b(0x1e2)]();if(_0x23d9b8){const _0x565d18={'memberId':_0x322d65,'unitId':_0x4753cb,'content':_0x587e69,'mention':_0x5f25cb,'threadId':_0x292740},_0x810bce=(await this[_0xc15d6b(0x1cc)][_0xc15d6b(0x19e)]('/universer-api/comment/unit/'+_0x4753cb+_0xc15d6b(0x1de),{'body':_0x565d18}))['body'][_0xc15d6b(0x170)];return{..._0x5a3ca1,'id':_0x810bce['replyId'],'dT':c[_0xc15d6b(0x1a2)](+_0x810bce[_0xc15d6b(0x16c)])[_0xc15d6b(0x19c)](_0xc15d6b(0x1d0)),'personId':_0x810bce[_0xc15d6b(0x1c3)]};}else{const _0x48fda1={'memberId':_0x322d65,'unitId':_0x4753cb,'content':_0x587e69,'mention':_0x5f25cb},_0x5c19a4=await this[_0xc15d6b(0x1cc)][_0xc15d6b(0x19e)](_0xc15d6b(0x1b0)+_0x4753cb+_0xc15d6b(0x1c0),{'body':_0x48fda1});return Y(_0x5c19a4[_0xc15d6b(0x1db)][_0xc15d6b(0x16f)],_0x5a3ca1);}}async[_0x4deb1c(0x187)](_0x1901f5){const _0x36e10a=_0x4deb1c;var _0x4b17fd,_0x2af6a3;const {text:_0x5bc7f3,unitId:_0x494964}=_0x1901f5,_0x39e2eb=(_0x2af6a3=(_0x4b17fd=_0x5bc7f3[_0x36e10a(0x1e1)])==null?void 0x0:_0x4b17fd[_0x36e10a(0x1dc)](_0x114d8c=>_0x114d8c[_0x36e10a(0x186)]===c['CustomRangeType']['COMMENT'])['map'](_0x3cdd42=>_0x3cdd42[_0x36e10a(0x1b8)]))!=null?_0x2af6a3:[],_0x3ac44e=JSON[_0x36e10a(0x188)](_0x5bc7f3),_0x5d84c3=_0x1901f5[_0x36e10a(0x168)],_0x37e2a0=_0x1901f5['id'],_0x33eade={'memberId':(await this[_0x36e10a(0x179)][_0x36e10a(0x1c5)](_0x494964))[_0x36e10a(0x1e2)](),'unitId':_0x494964,'threadId':_0x5d84c3,'mention':_0x39e2eb,'content':_0x3ac44e,'replyId':_0x37e2a0},_0x140ac6=await this[_0x36e10a(0x1cc)][_0x36e10a(0x19e)]('/universer-api/comment/unit/'+_0x494964+_0x36e10a(0x185),{'body':_0x33eade});return!_0x140ac6['body']['error']||_0x140ac6[_0x36e10a(0x1db)]['error'][_0x36e10a(0x17a)]===0x1;}async['resolveComment'](_0x96010e){const _0x167534=_0x4deb1c,{unitId:_0x54c9cd}=_0x96010e,_0x436ebf=_0x96010e[_0x167534(0x168)],_0x18e3b4={'memberId':this[_0x167534(0x15e)][_0x167534(0x1ca)]()[_0x167534(0x1b9)],'unitId':_0x54c9cd,'threadId':_0x436ebf,'solved':_0x96010e[_0x167534(0x189)]?I['Solved']:I[_0x167534(0x192)]},_0x1d1c52=await this['_httpService'][_0x167534(0x19e)](_0x167534(0x1b0)+_0x54c9cd+'/solved',{'body':_0x18e3b4});return!_0x1d1c52[_0x167534(0x1db)][_0x167534(0x1bc)]||_0x1d1c52[_0x167534(0x1db)][_0x167534(0x1bc)][_0x167534(0x17a)]===0x1;}async[_0x4deb1c(0x173)](_0x4053d0,_0x1fb42c,_0x415d6c,_0x1bcbef){const _0x52ee5b=_0x4deb1c,_0x49ef59={'memberId':(await this[_0x52ee5b(0x179)][_0x52ee5b(0x1c5)](_0x4053d0))[_0x52ee5b(0x1e2)](),'threadId':_0x415d6c,'replyId':_0x1bcbef,'unitId':_0x4053d0},_0x5f3abb=await this[_0x52ee5b(0x1cc)]['post'](_0x52ee5b(0x1b0)+_0x4053d0+_0x52ee5b(0x1b2),{'body':_0x49ef59});return!_0x5f3abb[_0x52ee5b(0x1db)][_0x52ee5b(0x1bc)]||_0x5f3abb['body'][_0x52ee5b(0x1bc)][_0x52ee5b(0x17a)]===0x1;}async[_0x4deb1c(0x1ba)](_0x37757d,_0x1cdb2a,_0x476991){const _0x4fa238=_0x4deb1c,_0x53d9ab={'unitId':_0x37757d,'threadId':_0x476991},_0x189087=await this[_0x4fa238(0x1cc)][_0x4fa238(0x19e)](_0x4fa238(0x1b0)+_0x37757d+_0x4fa238(0x1b3),{'body':_0x53d9ab}),_0x3c93cc=_0x476991[_0x4fa238(0x1d9)](_0x25aec9=>G(_0x189087[_0x4fa238(0x1db)][_0x4fa238(0x19b)][_0x25aec9],_0x37757d,_0x1cdb2a))['filter'](Boolean);return Object['values'](_0x189087['body']['users'])[_0x4fa238(0x1be)](_0x384791=>{const _0x103c85=_0x4fa238;this['_userService'][_0x103c85(0x1ae)](_0x384791);}),_0x3c93cc;}[_0x4deb1c(0x1a4)](_0x59aa02){const _0xad1d02=_0x4deb1c;return{'id':_0x59aa02['id'],'threadId':_0x59aa02[_0xad1d02(0x168)],'ref':_0x59aa02[_0xad1d02(0x1d3)]};}};function _0x3068(){const _0x20ba1e=['slice','_threadCommentDataSourceService','12895EkVcBS','unitId','_sessionService','code','pipe','Injector','getOwnPropertyDescriptor','length','size','UniverThreadCommentUIPlugin','parentId','COMMENT','content','UserManagerService','/edit','rangeType','updateComment','stringify','resolved','replyId','_configService','_threadCommentDataSource','_injector','Solved','Inject','UNRECOGNIZED','Plugin','OpenOrReOpen','Reply','syncUpdateMutationToColla','get','subscribe','@univerjs/core','add','commentUpdate$','55iDiWnI','comments','format','Add','post','Edit','onStarting','56aOzPmS','dayjs','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','859586uCzZqZ','CustomRangeType','UniverCollaborationClientPlugin','1746bcpSfQ','user','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','resolveComment','addUser','269883eeNlCt','/universer-api/comment/unit/','solved','/delete','/list','delete','Solve','symbol','@univerjs-pro/license','rangeId','userID','listComments','_init','error','addComment','forEach','_threadCommentModel','/add','HTTPService','_initDataSource','userId','UniverLicensePlugin','requireSession','setConfig','payload','type','_initUserSync','getCurrentUser','disposeWithMe','_httpService','dataSource','1234009hdrFGb','51225NEMnTJ','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','defineProperty','ref','158736zIXJUz','parse','bufferTime','24FbSzQU','merge','map','2719816ZAwsYC','body','filter','rxjs','/reply','toStringTag','/universer-api/user/list','customRanges','getMemberID','pluginName','getUnit','_userService','onReady','users','IThreadCommentDataSourceService','_commentService','IConfigService','Disposable','350eHcoDE','find','UniverInstanceType','threadId','_config','@univerjs/thread-comment','UNIVER_UNKNOWN','createTimestamp','Module','root','comment','reply','Unknown','DependentOn','deleteComment','replies'];_0x3068=function(){return _0x20ba1e;};return _0x3068();}g=x([_(0x0,c[_0x4deb1c(0x18f)](P['HTTPService'])),_(0x1,c[_0x4deb1c(0x18f)](c['UserManagerService'])),_(0x2,c[_0x4deb1c(0x18f)](b[_0x4deb1c(0x1aa)])),_(0x3,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)]))],g);var H=Object[_0x4deb1c(0x17d)],J=(_0x161935,_0x2173f0,_0x172e66,_0x35a0a1)=>{const _0x5b1bf3=_0x4deb1c;for(var _0x477ebe=_0x35a0a1>0x1?void 0x0:_0x35a0a1?H(_0x2173f0,_0x172e66):_0x2173f0,_0x409bd3=_0x161935[_0x5b1bf3(0x17e)]-0x1,_0x3ec163;_0x409bd3>=0x0;_0x409bd3--)(_0x3ec163=_0x161935[_0x409bd3])&&(_0x477ebe=_0x3ec163(_0x477ebe)||_0x477ebe);return _0x477ebe;},y=(_0x1a54ae,_0x105c94)=>(_0x78397b,_0x5932c1)=>_0x105c94(_0x78397b,_0x5932c1,_0x1a54ae);let C=class extends c[_0x4deb1c(0x164)]{constructor(_0x20c804,_0x346bce){const _0x57ff3a=_0x4deb1c;super(),this[_0x57ff3a(0x176)]=_0x20c804,this[_0x57ff3a(0x18c)]=_0x346bce,this[_0x57ff3a(0x1c2)]();}['_initDataSource'](){const _0x3f3135=_0x4deb1c;this['_threadCommentDataSourceService'][_0x3f3135(0x1cd)]=this[_0x3f3135(0x18c)],this[_0x3f3135(0x176)][_0x3f3135(0x194)]=!0x1;}};C=J([y(0x0,M[_0x4deb1c(0x161)]),y(0x1,c[_0x4deb1c(0x18f)](g))],C);var F=Object[_0x4deb1c(0x1d2)],L=Object[_0x4deb1c(0x17d)],Z=(_0x352015,_0x4c2311,_0x874d2f)=>_0x4c2311 in _0x352015?F(_0x352015,_0x4c2311,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x874d2f}):_0x352015[_0x4c2311]=_0x874d2f,W=(_0x376111,_0x18cdc4,_0x1c152d,_0x187f87)=>{const _0x4e4d36=_0x4deb1c;for(var _0xad2e6f=_0x187f87>0x1?void 0x0:_0x187f87?L(_0x18cdc4,_0x1c152d):_0x18cdc4,_0x22ef4b=_0x376111[_0x4e4d36(0x17e)]-0x1,_0x3803a9;_0x22ef4b>=0x0;_0x22ef4b--)(_0x3803a9=_0x376111[_0x22ef4b])&&(_0xad2e6f=_0x3803a9(_0xad2e6f)||_0xad2e6f);return _0xad2e6f;},O=(_0x533b7c,_0xd7ccd5)=>(_0x20cd7c,_0x2f7a6f)=>_0xd7ccd5(_0x20cd7c,_0x2f7a6f,_0x533b7c),N=(_0x5cf3d7,_0x564d7c,_0x3c4043)=>Z(_0x5cf3d7,typeof _0x564d7c!=_0x4deb1c(0x1b6)?_0x564d7c+'':_0x564d7c,_0x3c4043);function _0x4d64(_0xa99ae,_0x52f4bb){const _0x306821=_0x3068();return _0x4d64=function(_0x4d64e3,_0x5b12a4){_0x4d64e3=_0x4d64e3-0x15c;let _0x57ebb0=_0x306821[_0x4d64e3];return _0x57ebb0;},_0x4d64(_0xa99ae,_0x52f4bb);}exports[_0x4deb1c(0x1a3)]=class extends c[_0x4deb1c(0x191)]{constructor(_0x4c1d0e=D,_0x44c187,_0x1ca1a4){const _0x34e44e=_0x4deb1c;super(),this[_0x34e44e(0x169)]=_0x4c1d0e,this[_0x34e44e(0x18d)]=_0x44c187,this[_0x34e44e(0x18b)]=_0x1ca1a4;const {..._0x2551bd}=c[_0x34e44e(0x1d8)]({},D,this[_0x34e44e(0x169)]);this[_0x34e44e(0x18b)][_0x34e44e(0x1c6)](q,_0x2551bd);}[_0x4deb1c(0x1a0)](){const _0xbfadb8=_0x4deb1c;[[g],[C],[p]][_0xbfadb8(0x1be)](_0xde0635=>{const _0x1b4546=_0xbfadb8;this[_0x1b4546(0x18d)][_0x1b4546(0x198)](_0xde0635);});}[_0x4deb1c(0x15f)](){const _0x37d72b=_0x4deb1c;this['_injector'][_0x37d72b(0x195)](C),this[_0x37d72b(0x18d)][_0x37d72b(0x195)](p);}},N(exports[_0x4deb1c(0x1a3)],_0x4deb1c(0x15c),U),N(exports[_0x4deb1c(0x1a3)],_0x4deb1c(0x1c8),c[_0x4deb1c(0x167)][_0x4deb1c(0x16b)]),exports[_0x4deb1c(0x1a3)]=W([c[_0x4deb1c(0x172)](j[_0x4deb1c(0x180)],b[_0x4deb1c(0x1a7)],T[_0x4deb1c(0x1c4)]),O(0x1,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)])),O(0x2,c[_0x4deb1c(0x163)])],exports[_0x4deb1c(0x1a3)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2d5350=_0x5b24;function _0x5282(){const _0x322b26=['format','OpenOrReOpen','getCurrentUser','/edit','body','symbol','requireSession','/universer-api/comment/unit/','onReady','size','rangeType','userId','Reply','deleteComment','user','ref','getComment','comments','/solved','31920240NEnvaB','get','Unknown','listComments','content','forEach','_httpService','1763512CQnKvL','stringify','parse','root','_configService','replies','_injector','Add','code','Delete','_threadCommentDataSourceService','Solve','getMemberID','_threadCommentDataSource','/add','Solved','_commentService','UNIVER_UNKNOWN','6986168DhicmD','threadId','solved','5801478JeRctW','onStarting','defineProperty','reply','delete','post','updateComment','userID','find','dataSource','subscribe','_sessionService','getUser','disposeWithMe','users','9ZHbwiz','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','Edit','getUnit','customRanges','add','1208Pbenet','/list','replyId','_initUserSync','addUser','unitId','5638824XeUNfj','commentUpdate$','1IrWvpq','2885427rweuQJ','_initDataSource','rangeId','COMMENT','filter','type','resolveComment','_userService','createTimestamp','13085twpSKB','UNRECOGNIZED','length','pluginName','map','pipe','error','getOwnPropertyDescriptor'];_0x5282=function(){return _0x322b26;};return _0x5282();}(function(_0x4f49c9,_0x1d89f0){const _0xa95a08=_0x5b24,_0x3a6338=_0x4f49c9();while(!![]){try{const _0x5300d0=parseInt(_0xa95a08(0xed))/0x1*(parseInt(_0xa95a08(0x119))/0x2)+parseInt(_0xa95a08(0xee))/0x3+parseInt(_0xa95a08(0xe5))/0x4*(parseInt(_0xa95a08(0xf7))/0x5)+parseInt(_0xa95a08(0xce))/0x6+parseInt(_0xa95a08(0xcb))/0x7+parseInt(_0xa95a08(0xeb))/0x8*(-parseInt(_0xa95a08(0xdd))/0x9)+-parseInt(_0xa95a08(0x112))/0xa;if(_0x5300d0===_0x1d89f0)break;else _0x3a6338['push'](_0x3a6338['shift']());}catch(_0xee8e77){_0x3a6338['push'](_0x3a6338['shift']());}}}(_0x5282,0xab607));import{CommentService as _0x5646f3,CollaborationSessionService as _0x242f6a,UniverCollaborationClientPlugin as _0x1f9298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3137d0}from'@univerjs-pro/license';import{dayjs as _0x4b79be,UserManagerService as _0x48e2a5,Inject as _0x82e101,Injector as _0x2de2a0,Disposable as _0xd7e540,CustomRangeType as _0x27a3d3,UniverInstanceType as _0x5b3885,DependentOn as _0xfde2f5,IConfigService as _0x14ce99,Plugin as _0x419499,merge as _0x4682c7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55cac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ba485,IThreadCommentDataSourceService as _0x4fae4e}from'@univerjs/thread-comment';import{bufferTime as _0x1ee30f}from'rxjs';function _0x5b24(_0x1cdd0e,_0x5af263){const _0x5282bc=_0x5282();return _0x5b24=function(_0x5b240b,_0x2b21c8){_0x5b240b=_0x5b240b-0xc8;let _0x1acb8b=_0x5282bc[_0x5b240b];return _0x1acb8b;},_0x5b24(_0x1cdd0e,_0x5af263);}import{HTTPService as _0x16aa01}from'@univerjs/network';const W=_0x2d5350(0xdf);var I=(_0x3024b4=>(_0x3024b4[_0x3024b4[_0x2d5350(0x100)]=0x0]='OpenOrReOpen',_0x3024b4[_0x3024b4['Solved']=0x1]='Solved',_0x3024b4[_0x3024b4[_0x2d5350(0xf8)]=-0x1]='UNRECOGNIZED',_0x3024b4))(I||{}),v=(_0x124b25=>(_0x124b25[_0x124b25[_0x2d5350(0x114)]=0x0]=_0x2d5350(0x114),_0x124b25[_0x124b25[_0x2d5350(0x120)]=0x1]=_0x2d5350(0x120),_0x124b25[_0x124b25[_0x2d5350(0x10b)]=0x2]=_0x2d5350(0x10b),_0x124b25[_0x124b25[_0x2d5350(0xe1)]=0x3]=_0x2d5350(0xe1),_0x124b25[_0x124b25[_0x2d5350(0x122)]=0x4]=_0x2d5350(0x122),_0x124b25[_0x124b25[_0x2d5350(0x124)]=0x5]=_0x2d5350(0x124),_0x124b25[_0x124b25[_0x2d5350(0xf8)]=-0x1]=_0x2d5350(0xf8),_0x124b25))(v||{});const D=_0x35cca1=>_0x4b79be(new Date(+_0x35cca1))[_0x2d5350(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e423b,_0x367b81)=>{const _0x8e92fc=_0x2d5350,_0x379b67=_0x3e423b[_0x8e92fc(0x113)](_0x48e2a5),_0xa89619=_0x3e423b['get'](_0x16aa01);_0x367b81['forEach'](_0x16088e=>{const _0x3d4f42=_0x8e92fc;_0x379b67[_0x3d4f42(0xda)](_0x16088e)&&_0x367b81[_0x3d4f42(0xd2)](_0x16088e);}),_0x367b81[_0x8e92fc(0x108)]&&(await _0xa89619[_0x8e92fc(0x113)]('/universer-api/user/list',{'params':{'userIDs':[..._0x367b81]}}))[_0x8e92fc(0x103)][_0x8e92fc(0xdc)][_0x8e92fc(0x117)](_0x402337=>{const _0x2ffb06=_0x8e92fc;_0x402337&&_0x379b67[_0x2ffb06(0xe9)](_0x402337);});};var K=Object[_0x2d5350(0xfe)],V=(_0xcb8fcf,_0x975fa6,_0x305288,_0x4242cf)=>{const _0x5429ec=_0x2d5350;for(var _0x17ad9a=_0x4242cf>0x1?void 0x0:_0x4242cf?K(_0x975fa6,_0x305288):_0x975fa6,_0x48544c=_0xcb8fcf[_0x5429ec(0xf9)]-0x1,_0x1bd1ac;_0x48544c>=0x0;_0x48544c--)(_0x1bd1ac=_0xcb8fcf[_0x48544c])&&(_0x17ad9a=_0x1bd1ac(_0x17ad9a)||_0x17ad9a);return _0x17ad9a;},p=(_0x54ffd1,_0x234003)=>(_0x22f624,_0x47e8ec)=>_0x234003(_0x22f624,_0x47e8ec,_0x54ffd1);let S=class extends _0xd7e540{constructor(_0x1c8253,_0x50c327,_0x11a5e8,_0x4f4a1c){const _0x431fd6=_0x2d5350;super(),this[_0x431fd6(0xc9)]=_0x1c8253,this[_0x431fd6(0xe0)]=_0x50c327,this[_0x431fd6(0xf5)]=_0x11a5e8,this[_0x431fd6(0x11f)]=_0x4f4a1c,this['_init'](),this[_0x431fd6(0xe8)]();}[_0x2d5350(0xe8)](){const _0x430198=_0x2d5350;this[_0x430198(0xdb)](this['_threadCommentModel'][_0x430198(0xec)][_0x430198(0xfc)](_0x1ee30f(0x10))['subscribe'](_0x387b63=>{const _0x35251e=_0x430198,_0xe145be=new Set();_0x387b63[_0x35251e(0x117)](_0x128904=>{const _0x400e9b=_0x35251e;switch(_0x128904[_0x400e9b(0xf3)]){case'add':{const _0x35594e=_0x128904['payload']['personId'];_0xe145be[_0x400e9b(0xe4)](_0x35594e);break;}}}),B(this[_0x35251e(0x11f)],_0xe145be);}));}['_init'](){const _0x10548d=_0x2d5350;this[_0x10548d(0xdb)](this[_0x10548d(0xc9)][_0x10548d(0xec)][_0x10548d(0xd8)](async _0x79bf6a=>{const _0x1b120d=_0x10548d;var _0x2a947d,_0x45f03f,_0x33dc3b,_0x5c655c;const _0x35e463=(_0x2a947d=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a[_0x1b120d(0xea)])[_0x1b120d(0xd6)](_0x5cfb28=>_0x5cfb28[_0x1b120d(0xcc)]===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x2a947d[_0x1b120d(0x11c)];if(!_0x35e463)return;const {unitId:_0x41d88e,subUnitId:_0x456ee6}=_0x35e463;switch(_0x79bf6a[_0x1b120d(0x10d)]&&this['_userService'][_0x1b120d(0xe9)](_0x79bf6a[_0x1b120d(0x10d)]),_0x79bf6a[_0x1b120d(0xf3)]){case v[_0x1b120d(0x120)]:break;case v['Reply']:{this[_0x1b120d(0xe0)]['addComment'](_0x41d88e,_0x456ee6,{'unitId':_0x41d88e,'subUnitId':_0x456ee6,'ref':'','id':_0x79bf6a['replyId'],'dT':D(+_0x79bf6a[_0x1b120d(0xf6)]),'threadId':_0x79bf6a['threadId'],'personId':(_0x33dc3b=(_0x45f03f=_0x79bf6a[_0x1b120d(0x10d)])==null?void 0x0:_0x45f03f[_0x1b120d(0xd5)])!=null?_0x33dc3b:_0x79bf6a['userId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)]),'parentId':_0x35e463['id']});break;}case v[_0x1b120d(0x122)]:{const _0x151700=this['_threadCommentModel'][_0x1b120d(0x10f)](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);_0x151700&&_0x151700['parentId']&&this[_0x1b120d(0xe0)]['deleteComment'](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);break;}case v[_0x1b120d(0xe1)]:{this['_threadCommentModel']['updateComment'](_0x41d88e,_0x456ee6,{'commentId':_0x79bf6a['replyId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)])});break;}case v[_0x1b120d(0x124)]:{const _0x3d510d=(_0x5c655c=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a['unitId'])[_0x1b120d(0xd6)](_0x167fe3=>_0x167fe3['threadId']===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x5c655c[_0x1b120d(0x11c)];_0x3d510d&&this[_0x1b120d(0xe0)][_0x1b120d(0xf4)](_0x41d88e,_0x456ee6,_0x3d510d['id'],_0x79bf6a[_0x1b120d(0xcd)]===I[_0x1b120d(0xc8)]);break;}}}));}};S=V([p(0x0,_0x82e101(_0x5646f3)),p(0x1,_0x82e101(_0x1ba485)),p(0x2,_0x82e101(_0x48e2a5)),p(0x3,_0x82e101(_0x2de2a0))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1df013,_0x388f42,_0x986144,_0x5354af)=>{const _0x4b08f0=_0x2d5350;for(var _0x27d257=_0x5354af>0x1?void 0x0:_0x5354af?k(_0x388f42,_0x986144):_0x388f42,_0x2e01c4=_0x1df013[_0x4b08f0(0xf9)]-0x1,_0x26e628;_0x2e01c4>=0x0;_0x2e01c4--)(_0x26e628=_0x1df013[_0x2e01c4])&&(_0x27d257=_0x26e628(_0x27d257)||_0x27d257);return _0x27d257;},_=(_0x4bdda0,_0x36d52c)=>(_0x520d65,_0x141c4e)=>_0x36d52c(_0x520d65,_0x141c4e,_0x4bdda0);function X(_0x5e74aa,_0x413701){const _0x2f8e15=_0x2d5350,_0x5ac38b=_0x5e74aa[_0x2f8e15(0x11e)][0x0];return{..._0x413701,'id':_0x5ac38b[_0x2f8e15(0xe7)],'resolved':_0x5e74aa[_0x2f8e15(0xcd)]===0x1,'dT':D(_0x5ac38b[_0x2f8e15(0xf6)]),'personId':_0x5ac38b[_0x2f8e15(0x10a)],'threadId':_0x5ac38b[_0x2f8e15(0xcc)]};}function ee(_0x2417a,_0x1931a0,_0x5b039b){const _0xee6606=_0x2d5350;var _0x2dc4af,_0x85328f;if(((_0x85328f=(_0x2dc4af=_0x2417a==null?void 0x0:_0x2417a[_0xee6606(0x11e)])==null?void 0x0:_0x2dc4af[_0xee6606(0xf9)])!=null?_0x85328f:0x0)>0x0){const _0x395103=(_0x360bdc,_0x38d607)=>({'id':_0x360bdc['replyId'],'threadId':_0x360bdc[_0xee6606(0xcc)],'dT':D(_0x360bdc[_0xee6606(0xf6)]),'personId':_0x360bdc[_0xee6606(0x10a)],'resolved':_0x2417a[_0xee6606(0xcd)]===I[_0xee6606(0xc8)],'unitId':_0x1931a0,'subUnitId':_0x5b039b,'text':JSON[_0xee6606(0x11b)](_0x360bdc[_0xee6606(0x116)]),'parentId':_0x38d607}),_0x4dce44=_0x395103(_0x2417a[_0xee6606(0x11e)][0x0]);return{..._0x4dce44,'children':_0x2417a['replies']['slice'](0x1)[_0xee6606(0xfb)](_0x5bbbba=>_0x395103(_0x5bbbba,_0x4dce44['id']))};}return null;}let f=class{constructor(_0x27a508,_0x576c22,_0x28db77,_0x1180f6){const _0x12defe=_0x2d5350;this[_0x12defe(0x118)]=_0x27a508,this['_userService']=_0x576c22,this[_0x12defe(0xd9)]=_0x28db77,this['_injector']=_0x1180f6;}async['addComment'](_0x2610cc){const _0x30c68b=_0x2d5350;var _0x4071d5,_0x4a7861;const {parentId:_0x324571,unitId:_0x17f5e0,text:_0x81fbea,threadId:_0x151e10}=_0x2610cc,_0x2e0da6=(_0x4a7861=(_0x4071d5=_0x81fbea[_0x30c68b(0xe3)])==null?void 0x0:_0x4071d5[_0x30c68b(0xf2)](_0x43d350=>_0x43d350[_0x30c68b(0x109)]===_0x27a3d3[_0x30c68b(0xf1)])[_0x30c68b(0xfb)](_0x6c75c5=>_0x6c75c5[_0x30c68b(0xf0)]))!=null?_0x4a7861:[],_0x1a50a4=JSON[_0x30c68b(0x11a)](_0x81fbea),_0x55db86=(await this[_0x30c68b(0xd9)]['requireSession'](_0x17f5e0))[_0x30c68b(0x125)]();if(_0x324571){const _0x580ad2={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6,'threadId':_0x151e10},_0x2d770c=(await this['_httpService']['post'](_0x30c68b(0x106)+_0x17f5e0+'/reply',{'body':_0x580ad2}))[_0x30c68b(0x103)][_0x30c68b(0xd1)];return{..._0x2610cc,'id':_0x2d770c[_0x30c68b(0xe7)],'dT':_0x4b79be(+_0x2d770c[_0x30c68b(0xf6)])[_0x30c68b(0xff)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d770c[_0x30c68b(0x10a)]};}else{const _0xceb580={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6},_0x168c13=await this['_httpService'][_0x30c68b(0xd3)](_0x30c68b(0x106)+_0x17f5e0+_0x30c68b(0x127),{'body':_0xceb580});return X(_0x168c13['body']['comment'],_0x2610cc);}}async[_0x2d5350(0xd4)](_0x47e27d){const _0x85ce6a=_0x2d5350;var _0x31e541,_0x49498e;const {text:_0x1951c8,unitId:_0x195b3f}=_0x47e27d,_0x2f6d65=(_0x49498e=(_0x31e541=_0x1951c8['customRanges'])==null?void 0x0:_0x31e541[_0x85ce6a(0xf2)](_0x111feb=>_0x111feb['rangeType']===_0x27a3d3[_0x85ce6a(0xf1)])[_0x85ce6a(0xfb)](_0x35fdd7=>_0x35fdd7['rangeId']))!=null?_0x49498e:[],_0x713cf1=JSON[_0x85ce6a(0x11a)](_0x1951c8),_0x4fc30d=_0x47e27d[_0x85ce6a(0xcc)],_0x1e5033=_0x47e27d['id'],_0x487d62={'memberId':(await this[_0x85ce6a(0xd9)][_0x85ce6a(0x105)](_0x195b3f))[_0x85ce6a(0x125)](),'unitId':_0x195b3f,'threadId':_0x4fc30d,'mention':_0x2f6d65,'content':_0x713cf1,'replyId':_0x1e5033},_0x236b07=await this[_0x85ce6a(0x118)][_0x85ce6a(0xd3)](_0x85ce6a(0x106)+_0x195b3f+_0x85ce6a(0x102),{'body':_0x487d62});return!_0x236b07['body'][_0x85ce6a(0xfd)]||_0x236b07[_0x85ce6a(0x103)]['error'][_0x85ce6a(0x121)]===0x1;}async[_0x2d5350(0xf4)](_0x675f29){const _0x43c343=_0x2d5350,{unitId:_0x27a660}=_0x675f29,_0x448c66=_0x675f29[_0x43c343(0xcc)],_0x14a711={'memberId':this[_0x43c343(0xf5)][_0x43c343(0x101)]()['userID'],'unitId':_0x27a660,'threadId':_0x448c66,'solved':_0x675f29['resolved']?I['Solved']:I['OpenOrReOpen']},_0x282023=await this[_0x43c343(0x118)][_0x43c343(0xd3)]('/universer-api/comment/unit/'+_0x27a660+_0x43c343(0x111),{'body':_0x14a711});return!_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]||_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]['code']===0x1;}async[_0x2d5350(0x10c)](_0x3776f5,_0x3ba336,_0x1779c9,_0x5ae9b3){const _0xbafe49=_0x2d5350,_0x3d9aad={'memberId':(await this['_sessionService'][_0xbafe49(0x105)](_0x3776f5))[_0xbafe49(0x125)](),'threadId':_0x1779c9,'replyId':_0x5ae9b3,'unitId':_0x3776f5},_0x2d252c=await this['_httpService']['post'](_0xbafe49(0x106)+_0x3776f5+'/delete',{'body':_0x3d9aad});return!_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)]||_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)][_0xbafe49(0x121)]===0x1;}async[_0x2d5350(0x115)](_0x5bc84b,_0x124577,_0x144626){const _0x32ed26=_0x2d5350,_0x5c63f8={'unitId':_0x5bc84b,'threadId':_0x144626},_0x28f4ec=await this[_0x32ed26(0x118)][_0x32ed26(0xd3)]('/universer-api/comment/unit/'+_0x5bc84b+_0x32ed26(0xe6),{'body':_0x5c63f8}),_0x49ddfc=_0x144626[_0x32ed26(0xfb)](_0x1fab8e=>ee(_0x28f4ec['body'][_0x32ed26(0x110)][_0x1fab8e],_0x5bc84b,_0x124577))['filter'](Boolean);return Object['values'](_0x28f4ec[_0x32ed26(0x103)][_0x32ed26(0xdc)])[_0x32ed26(0x117)](_0xd5d441=>{const _0x1af91d=_0x32ed26;this[_0x1af91d(0xf5)][_0x1af91d(0xe9)](_0xd5d441);}),_0x49ddfc;}['saveCommentToSnapshot'](_0x172d15){const _0x52eb70=_0x2d5350;return{'id':_0x172d15['id'],'threadId':_0x172d15['threadId'],'ref':_0x172d15[_0x52eb70(0x10e)]};}};f=Q([_(0x0,_0x82e101(_0x16aa01)),_(0x1,_0x82e101(_0x48e2a5)),_(0x2,_0x82e101(_0x242f6a)),_(0x3,_0x82e101(_0x2de2a0))],f);var re=Object[_0x2d5350(0xfe)],te=(_0x161bb3,_0x4e6a7b,_0x316e49,_0x3b8236)=>{const _0x99020e=_0x2d5350;for(var _0x38d524=_0x3b8236>0x1?void 0x0:_0x3b8236?re(_0x4e6a7b,_0x316e49):_0x4e6a7b,_0x39255b=_0x161bb3[_0x99020e(0xf9)]-0x1,_0x1341c9;_0x39255b>=0x0;_0x39255b--)(_0x1341c9=_0x161bb3[_0x39255b])&&(_0x38d524=_0x1341c9(_0x38d524)||_0x38d524);return _0x38d524;},N=(_0x31621c,_0xad4c0f)=>(_0x2024d5,_0x394031)=>_0xad4c0f(_0x2024d5,_0x394031,_0x31621c);let g=class extends _0xd7e540{constructor(_0x2e1c38,_0x31f48d){const _0x61a7bc=_0x2d5350;super(),this[_0x61a7bc(0x123)]=_0x2e1c38,this[_0x61a7bc(0x126)]=_0x31f48d,this[_0x61a7bc(0xef)]();}['_initDataSource'](){const _0x99b2e2=_0x2d5350;this[_0x99b2e2(0x123)][_0x99b2e2(0xd7)]=this[_0x99b2e2(0x126)],this[_0x99b2e2(0x123)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4fae4e),N(0x1,_0x82e101(f))],g);var se=Object[_0x2d5350(0xd0)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1d8100,_0xb2340,_0x542ef7)=>_0xb2340 in _0x1d8100?se(_0x1d8100,_0xb2340,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x542ef7}):_0x1d8100[_0xb2340]=_0x542ef7,ie=(_0x42f1d8,_0x4548d8,_0x54b53c,_0x4c2c1f)=>{for(var _0x5dbc5d=_0x4c2c1f>0x1?void 0x0:_0x4c2c1f?oe(_0x4548d8,_0x54b53c):_0x4548d8,_0xdae79f=_0x42f1d8['length']-0x1,_0x2c1c90;_0xdae79f>=0x0;_0xdae79f--)(_0x2c1c90=_0x42f1d8[_0xdae79f])&&(_0x5dbc5d=_0x2c1c90(_0x5dbc5d)||_0x5dbc5d);return _0x5dbc5d;},w=(_0xbd0b62,_0x57b92e)=>(_0x2f69b6,_0x5c7479)=>_0x57b92e(_0x2f69b6,_0x5c7479,_0xbd0b62),$=(_0x52dd39,_0x1a4a83,_0x1fdefe)=>ne(_0x52dd39,typeof _0x1a4a83!=_0x2d5350(0x104)?_0x1a4a83+'':_0x1a4a83,_0x1fdefe);let b=class extends _0x419499{constructor(_0x418a10=M,_0x4b4bbc,_0x16863c){const _0x421808=_0x2d5350;super(),this['_config']=_0x418a10,this[_0x421808(0x11f)]=_0x4b4bbc,this[_0x421808(0x11d)]=_0x16863c;const {..._0x5da4ff}=_0x4682c7({},M,this[_0x421808(0xde)]);this['_configService']['setConfig'](z,_0x5da4ff);}[_0x2d5350(0xcf)](){const _0x173f0d=_0x2d5350;[[f],[g],[S]][_0x173f0d(0x117)](_0x43f6e8=>{const _0x41eb1d=_0x173f0d;this['_injector'][_0x41eb1d(0xe4)](_0x43f6e8);});}[_0x2d5350(0x107)](){const _0x51c706=_0x2d5350;this[_0x51c706(0x11f)][_0x51c706(0x113)](g),this[_0x51c706(0x11f)]['get'](S);}};$(b,_0x2d5350(0xfa),W),$(b,'type',_0x5b3885[_0x2d5350(0xca)]),b=ie([_0xfde2f5(_0x55cac6,_0x1f9298,_0x3137d0),w(0x1,_0x82e101(_0x2de2a0)),w(0x2,_0x14ce99)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4e76f=_0x173a;(function(_0x226cbb,_0x41b0f0){const _0x5cf68d=_0x173a,_0x4e1a76=_0x226cbb();while(!![]){try{const _0x46f023=-parseInt(_0x5cf68d(0x16f))/0x1+parseInt(_0x5cf68d(0x123))/0x2+parseInt(_0x5cf68d(0x137))/0x3*(parseInt(_0x5cf68d(0x12d))/0x4)+-parseInt(_0x5cf68d(0x146))/0x5*(-parseInt(_0x5cf68d(0x14d))/0x6)+parseInt(_0x5cf68d(0x151))/0x7*(parseInt(_0x5cf68d(0x121))/0x8)+parseInt(_0x5cf68d(0x13c))/0x9+-parseInt(_0x5cf68d(0x16b))/0xa;if(_0x46f023===_0x41b0f0)break;else _0x4e1a76['push'](_0x4e1a76['shift']());}catch(_0x1d1506){_0x4e1a76['push'](_0x4e1a76['shift']());}}}(_0x2a00,0xc36c6));import{CommentService as _0x3fd827,CollaborationSessionService as _0x312cb8,UniverCollaborationClientPlugin as _0xe00712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e497f}from'@univerjs-pro/license';import{dayjs as _0x21bb25,UserManagerService as _0x516a13,Inject as _0x113b48,Injector as _0x130087,Disposable as _0x311500,CustomRangeType as _0x488275,UniverInstanceType as _0x414e33,DependentOn as _0x14f0d8,IConfigService as _0x40717c,Plugin as _0x177895,merge as _0x1d1215}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x322bae}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfb0986,IThreadCommentDataSourceService as _0x2a9349}from'@univerjs/thread-comment';import{bufferTime as _0x25c191}from'rxjs';function _0x173a(_0x3780c3,_0x26751c){const _0x2a009d=_0x2a00();return _0x173a=function(_0x173a32,_0x1aada5){_0x173a32=_0x173a32-0x113;let _0x547450=_0x2a009d[_0x173a32];return _0x547450;},_0x173a(_0x3780c3,_0x26751c);}import{HTTPService as _0x28d87b}from'@univerjs/network';const W=_0x4e76f(0x156);var I=(_0x51b954=>(_0x51b954[_0x51b954['OpenOrReOpen']=0x0]=_0x4e76f(0x169),_0x51b954[_0x51b954[_0x4e76f(0x154)]=0x1]=_0x4e76f(0x154),_0x51b954[_0x51b954[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51b954))(I||{}),v=(_0x51af3c=>(_0x51af3c[_0x51af3c[_0x4e76f(0x162)]=0x0]=_0x4e76f(0x162),_0x51af3c[_0x51af3c[_0x4e76f(0x16a)]=0x1]='Add',_0x51af3c[_0x51af3c[_0x4e76f(0x171)]=0x2]=_0x4e76f(0x171),_0x51af3c[_0x51af3c[_0x4e76f(0x12c)]=0x3]=_0x4e76f(0x12c),_0x51af3c[_0x51af3c[_0x4e76f(0x114)]=0x4]=_0x4e76f(0x114),_0x51af3c[_0x51af3c['Solve']=0x5]=_0x4e76f(0x178),_0x51af3c[_0x51af3c[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51af3c))(v||{});const D=_0x250c87=>_0x21bb25(new Date(+_0x250c87))[_0x4e76f(0x11b)](_0x4e76f(0x142)),B=async(_0x23e660,_0x170f3f)=>{const _0x2d9366=_0x4e76f,_0x3f3df0=_0x23e660[_0x2d9366(0x144)](_0x516a13),_0x1b1eb1=_0x23e660['get'](_0x28d87b);_0x170f3f[_0x2d9366(0x160)](_0x3c1cd7=>{const _0x3955d9=_0x2d9366;_0x3f3df0[_0x3955d9(0x143)](_0x3c1cd7)&&_0x170f3f[_0x3955d9(0x16d)](_0x3c1cd7);}),_0x170f3f[_0x2d9366(0x167)]&&(await _0x1b1eb1[_0x2d9366(0x144)](_0x2d9366(0x179),{'params':{'userIDs':[..._0x170f3f]}}))[_0x2d9366(0x130)]['users'][_0x2d9366(0x160)](_0x182a19=>{const _0x1e0345=_0x2d9366;_0x182a19&&_0x3f3df0[_0x1e0345(0x177)](_0x182a19);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dc74d,_0x4ac995,_0x3bbf85,_0x5020ff)=>{const _0x5cd43f=_0x4e76f;for(var _0x3bbe85=_0x5020ff>0x1?void 0x0:_0x5020ff?K(_0x4ac995,_0x3bbf85):_0x4ac995,_0x223f4d=_0x5dc74d[_0x5cd43f(0x14b)]-0x1,_0x4f7810;_0x223f4d>=0x0;_0x223f4d--)(_0x4f7810=_0x5dc74d[_0x223f4d])&&(_0x3bbe85=_0x4f7810(_0x3bbe85)||_0x3bbe85);return _0x3bbe85;},p=(_0x208eed,_0x5cbabf)=>(_0x5b8c18,_0x55544b)=>_0x5cbabf(_0x5b8c18,_0x55544b,_0x208eed);let S=class extends _0x311500{constructor(_0x38059a,_0x5434c7,_0x41ef4f,_0x4082f1){const _0x3128e7=_0x4e76f;super(),this[_0x3128e7(0x157)]=_0x38059a,this[_0x3128e7(0x118)]=_0x5434c7,this[_0x3128e7(0x124)]=_0x41ef4f,this['_injector']=_0x4082f1,this[_0x3128e7(0x134)](),this[_0x3128e7(0x163)]();}[_0x4e76f(0x163)](){const _0x1313d3=_0x4e76f;this['disposeWithMe'](this[_0x1313d3(0x118)][_0x1313d3(0x155)][_0x1313d3(0x127)](_0x25c191(0x10))['subscribe'](_0x37593a=>{const _0x3221bc=_0x1313d3,_0x235850=new Set();_0x37593a[_0x3221bc(0x160)](_0x16a2c6=>{const _0x22ba9c=_0x3221bc;switch(_0x16a2c6[_0x22ba9c(0x120)]){case _0x22ba9c(0x161):{const _0x52a32b=_0x16a2c6[_0x22ba9c(0x15d)]['personId'];_0x235850[_0x22ba9c(0x161)](_0x52a32b);break;}}}),B(this[_0x3221bc(0x11e)],_0x235850);}));}[_0x4e76f(0x134)](){const _0x197da0=_0x4e76f;this[_0x197da0(0x13a)](this[_0x197da0(0x157)][_0x197da0(0x155)][_0x197da0(0x14f)](async _0x323457=>{const _0x1a59c3=_0x197da0;var _0x4a5272,_0x44c8fa,_0x4a1a70,_0xb2ab84;const _0x489c20=(_0x4a5272=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457['unitId'])['find'](_0x2ee3cc=>_0x2ee3cc[_0x1a59c3(0x125)]===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0x4a5272[_0x1a59c3(0x14e)];if(!_0x489c20)return;const {unitId:_0xe1c271,subUnitId:_0x26414f}=_0x489c20;switch(_0x323457[_0x1a59c3(0x16e)]&&this[_0x1a59c3(0x124)]['addUser'](_0x323457['user']),_0x323457[_0x1a59c3(0x120)]){case v[_0x1a59c3(0x16a)]:break;case v[_0x1a59c3(0x171)]:{this['_threadCommentModel'][_0x1a59c3(0x168)](_0xe1c271,_0x26414f,{'unitId':_0xe1c271,'subUnitId':_0x26414f,'ref':'','id':_0x323457['replyId'],'dT':D(+_0x323457[_0x1a59c3(0x133)]),'threadId':_0x323457[_0x1a59c3(0x125)],'personId':(_0x4a1a70=(_0x44c8fa=_0x323457[_0x1a59c3(0x16e)])==null?void 0x0:_0x44c8fa[_0x1a59c3(0x15a)])!=null?_0x4a1a70:_0x323457[_0x1a59c3(0x17c)],'text':JSON[_0x1a59c3(0x128)](_0x323457[_0x1a59c3(0x170)]),'parentId':_0x489c20['id']});break;}case v['Delete']:{const _0x4f0f7e=this[_0x1a59c3(0x118)][_0x1a59c3(0x139)](_0xe1c271,_0x26414f,_0x323457[_0x1a59c3(0x131)]);_0x4f0f7e&&_0x4f0f7e[_0x1a59c3(0x11f)]&&this[_0x1a59c3(0x118)][_0x1a59c3(0x115)](_0xe1c271,_0x26414f,_0x323457['replyId']);break;}case v[_0x1a59c3(0x12c)]:{this['_threadCommentModel'][_0x1a59c3(0x158)](_0xe1c271,_0x26414f,{'commentId':_0x323457[_0x1a59c3(0x131)],'text':JSON[_0x1a59c3(0x128)](_0x323457['content'])});break;}case v[_0x1a59c3(0x178)]:{const _0x3bb8d5=(_0xb2ab84=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457[_0x1a59c3(0x12a)])[_0x1a59c3(0x148)](_0x5a32aa=>_0x5a32aa['threadId']===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0xb2ab84[_0x1a59c3(0x14e)];_0x3bb8d5&&this[_0x1a59c3(0x118)]['resolveComment'](_0xe1c271,_0x26414f,_0x3bb8d5['id'],_0x323457[_0x1a59c3(0x175)]===I[_0x1a59c3(0x154)]);break;}}}));}};S=V([p(0x0,_0x113b48(_0x3fd827)),p(0x1,_0x113b48(_0xfb0986)),p(0x2,_0x113b48(_0x516a13)),p(0x3,_0x113b48(_0x130087))],S);const z=_0x4e76f(0x126),M={};var k=Object[_0x4e76f(0x132)],Q=(_0x89db04,_0x215f04,_0x577efd,_0x1dd950)=>{const _0x483137=_0x4e76f;for(var _0x35bf35=_0x1dd950>0x1?void 0x0:_0x1dd950?k(_0x215f04,_0x577efd):_0x215f04,_0x2fc482=_0x89db04[_0x483137(0x14b)]-0x1,_0x4d377d;_0x2fc482>=0x0;_0x2fc482--)(_0x4d377d=_0x89db04[_0x2fc482])&&(_0x35bf35=_0x4d377d(_0x35bf35)||_0x35bf35);return _0x35bf35;},_=(_0x1d5945,_0x241dc2)=>(_0x17d376,_0xe16305)=>_0x241dc2(_0x17d376,_0xe16305,_0x1d5945);function X(_0x4c6d0a,_0xa08a1c){const _0x4169a0=_0x4e76f,_0x2b26a2=_0x4c6d0a[_0x4169a0(0x122)][0x0];return{..._0xa08a1c,'id':_0x2b26a2[_0x4169a0(0x131)],'resolved':_0x4c6d0a['solved']===0x1,'dT':D(_0x2b26a2[_0x4169a0(0x133)]),'personId':_0x2b26a2[_0x4169a0(0x17c)],'threadId':_0x2b26a2[_0x4169a0(0x125)]};}function ee(_0x50c8a3,_0x4f0d55,_0x414b48){const _0x4d921b=_0x4e76f;var _0x49551f,_0x48ff7b;if(((_0x48ff7b=(_0x49551f=_0x50c8a3==null?void 0x0:_0x50c8a3[_0x4d921b(0x122)])==null?void 0x0:_0x49551f['length'])!=null?_0x48ff7b:0x0)>0x0){const _0x1d275d=(_0x218bbb,_0x451fa5)=>({'id':_0x218bbb[_0x4d921b(0x131)],'threadId':_0x218bbb[_0x4d921b(0x125)],'dT':D(_0x218bbb[_0x4d921b(0x133)]),'personId':_0x218bbb[_0x4d921b(0x17c)],'resolved':_0x50c8a3[_0x4d921b(0x175)]===I[_0x4d921b(0x154)],'unitId':_0x4f0d55,'subUnitId':_0x414b48,'text':JSON[_0x4d921b(0x128)](_0x218bbb[_0x4d921b(0x170)]),'parentId':_0x451fa5}),_0x1dd06d=_0x1d275d(_0x50c8a3[_0x4d921b(0x122)][0x0]);return{..._0x1dd06d,'children':_0x50c8a3['replies']['slice'](0x1)['map'](_0x56f60f=>_0x1d275d(_0x56f60f,_0x1dd06d['id']))};}return null;}let f=class{constructor(_0x75dd6b,_0x2ca638,_0x3f2f8b,_0x194d57){const _0x588cb5=_0x4e76f;this[_0x588cb5(0x17a)]=_0x75dd6b,this[_0x588cb5(0x124)]=_0x2ca638,this[_0x588cb5(0x129)]=_0x3f2f8b,this['_injector']=_0x194d57;}async[_0x4e76f(0x168)](_0xa1fb67){const _0x32bffb=_0x4e76f;var _0x59adaa,_0x3adcc2;const {parentId:_0x15ec77,unitId:_0x5a2dd2,text:_0xd9a0ee,threadId:_0x7b6a91}=_0xa1fb67,_0x1130d8=(_0x3adcc2=(_0x59adaa=_0xd9a0ee['customRanges'])==null?void 0x0:_0x59adaa[_0x32bffb(0x15c)](_0x508ebc=>_0x508ebc[_0x32bffb(0x164)]===_0x488275[_0x32bffb(0x159)])[_0x32bffb(0x172)](_0x48505d=>_0x48505d['rangeId']))!=null?_0x3adcc2:[],_0x507721=JSON[_0x32bffb(0x13d)](_0xd9a0ee),_0xe05860=(await this[_0x32bffb(0x129)][_0x32bffb(0x152)](_0x5a2dd2))['getMemberID']();if(_0x15ec77){const _0x4a6aab={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8,'threadId':_0x7b6a91},_0x37d9cf=(await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x136),{'body':_0x4a6aab}))[_0x32bffb(0x130)][_0x32bffb(0x17d)];return{..._0xa1fb67,'id':_0x37d9cf[_0x32bffb(0x131)],'dT':_0x21bb25(+_0x37d9cf['createTimestamp'])[_0x32bffb(0x11b)](_0x32bffb(0x142)),'personId':_0x37d9cf[_0x32bffb(0x17c)]};}else{const _0x186775={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8},_0x4426f5=await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x113),{'body':_0x186775});return X(_0x4426f5[_0x32bffb(0x130)][_0x32bffb(0x116)],_0xa1fb67);}}async['updateComment'](_0x5cf13e){const _0x541960=_0x4e76f;var _0x33f1be,_0x153579;const {text:_0x565d58,unitId:_0x1320e2}=_0x5cf13e,_0x26ff26=(_0x153579=(_0x33f1be=_0x565d58[_0x541960(0x150)])==null?void 0x0:_0x33f1be['filter'](_0x528401=>_0x528401[_0x541960(0x164)]===_0x488275[_0x541960(0x159)])[_0x541960(0x172)](_0x32cb40=>_0x32cb40['rangeId']))!=null?_0x153579:[],_0x4b37ff=JSON['stringify'](_0x565d58),_0x4285fa=_0x5cf13e[_0x541960(0x125)],_0x3fb545=_0x5cf13e['id'],_0x1a05c8={'memberId':(await this[_0x541960(0x129)][_0x541960(0x152)](_0x1320e2))[_0x541960(0x174)](),'unitId':_0x1320e2,'threadId':_0x4285fa,'mention':_0x26ff26,'content':_0x4b37ff,'replyId':_0x3fb545},_0x590671=await this[_0x541960(0x17a)]['post'](_0x541960(0x176)+_0x1320e2+_0x541960(0x153),{'body':_0x1a05c8});return!_0x590671['body'][_0x541960(0x117)]||_0x590671[_0x541960(0x130)][_0x541960(0x117)][_0x541960(0x149)]===0x1;}async[_0x4e76f(0x15e)](_0x498879){const _0x53e844=_0x4e76f,{unitId:_0x269a30}=_0x498879,_0x527487=_0x498879[_0x53e844(0x125)],_0x157d06={'memberId':this[_0x53e844(0x124)][_0x53e844(0x141)]()['userID'],'unitId':_0x269a30,'threadId':_0x527487,'solved':_0x498879[_0x53e844(0x13e)]?I['Solved']:I[_0x53e844(0x169)]},_0x1891d9=await this['_httpService'][_0x53e844(0x135)](_0x53e844(0x176)+_0x269a30+'/solved',{'body':_0x157d06});return!_0x1891d9['body'][_0x53e844(0x117)]||_0x1891d9['body']['error'][_0x53e844(0x149)]===0x1;}async[_0x4e76f(0x115)](_0x11bde1,_0x52967a,_0x5228ae,_0x332692){const _0x12b8d9=_0x4e76f,_0x56c35d={'memberId':(await this['_sessionService'][_0x12b8d9(0x152)](_0x11bde1))[_0x12b8d9(0x174)](),'threadId':_0x5228ae,'replyId':_0x332692,'unitId':_0x11bde1},_0x384526=await this[_0x12b8d9(0x17a)][_0x12b8d9(0x135)](_0x12b8d9(0x176)+_0x11bde1+_0x12b8d9(0x11d),{'body':_0x56c35d});return!_0x384526['body']['error']||_0x384526[_0x12b8d9(0x130)][_0x12b8d9(0x117)][_0x12b8d9(0x149)]===0x1;}async[_0x4e76f(0x16c)](_0x34d9cd,_0x101f62,_0x3e0a73){const _0x1de798=_0x4e76f,_0x5049f8={'unitId':_0x34d9cd,'threadId':_0x3e0a73},_0xce298e=await this['_httpService']['post'](_0x1de798(0x176)+_0x34d9cd+'/list',{'body':_0x5049f8}),_0x280787=_0x3e0a73[_0x1de798(0x172)](_0x23a250=>ee(_0xce298e[_0x1de798(0x130)][_0x1de798(0x12e)][_0x23a250],_0x34d9cd,_0x101f62))[_0x1de798(0x15c)](Boolean);return Object[_0x1de798(0x147)](_0xce298e[_0x1de798(0x130)][_0x1de798(0x145)])['forEach'](_0x49c9b5=>{const _0x3e8a9b=_0x1de798;this['_userService'][_0x3e8a9b(0x177)](_0x49c9b5);}),_0x280787;}[_0x4e76f(0x13b)](_0x161504){const _0x232fe9=_0x4e76f;return{'id':_0x161504['id'],'threadId':_0x161504[_0x232fe9(0x125)],'ref':_0x161504[_0x232fe9(0x17b)]};}};f=Q([_(0x0,_0x113b48(_0x28d87b)),_(0x1,_0x113b48(_0x516a13)),_(0x2,_0x113b48(_0x312cb8)),_(0x3,_0x113b48(_0x130087))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x743fd8,_0x5cb16f,_0x2b0c63,_0x525290)=>{const _0x81cea0=_0x4e76f;for(var _0x29e226=_0x525290>0x1?void 0x0:_0x525290?re(_0x5cb16f,_0x2b0c63):_0x5cb16f,_0xa05e90=_0x743fd8[_0x81cea0(0x14b)]-0x1,_0x5460c2;_0xa05e90>=0x0;_0xa05e90--)(_0x5460c2=_0x743fd8[_0xa05e90])&&(_0x29e226=_0x5460c2(_0x29e226)||_0x29e226);return _0x29e226;},N=(_0x2b51f3,_0xa3ee79)=>(_0x37b244,_0x6ca17d)=>_0xa3ee79(_0x37b244,_0x6ca17d,_0x2b51f3);function _0x2a00(){const _0x1c3838=['COMMENT','userID','defineProperty','filter','payload','resolveComment','_threadCommentDataSourceService','forEach','add','Unknown','_initUserSync','rangeType','setConfig','onReady','size','addComment','OpenOrReOpen','Add','17189440RAJMBU','listComments','delete','user','6100CvjTcz','content','Reply','map','getUnit','getMemberID','solved','/universer-api/comment/unit/','addUser','Solve','/universer-api/user/list','_httpService','ref','userId','reply','/add','Delete','deleteComment','comment','error','_threadCommentModel','UNRECOGNIZED','_config','format','onStarting','/delete','_injector','parentId','type','4856JgUuPZ','replies','2965112BydwKc','_userService','threadId','thread-comment-data-source.config','pipe','parse','_sessionService','unitId','_configService','Edit','834004WfCspo','comments','symbol','body','replyId','getOwnPropertyDescriptor','createTimestamp','_init','post','/reply','12QEkJLH','UNIVER_UNKNOWN','getComment','disposeWithMe','saveCommentToSnapshot','734661HnJWAK','stringify','resolved','pluginName','dataSource','getCurrentUser','YYYY/MM/DD\x20HH:mm','getUser','get','users','107885GefCNY','values','find','code','_initDataSource','length','_threadCommentDataSource','30YGFUSM','root','subscribe','customRanges','224zdWAzQ','requireSession','/edit','Solved','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','updateComment'];_0x2a00=function(){return _0x1c3838;};return _0x2a00();}let g=class extends _0x311500{constructor(_0x216287,_0xb2ccf9){const _0x4289c8=_0x4e76f;super(),this[_0x4289c8(0x15f)]=_0x216287,this[_0x4289c8(0x14c)]=_0xb2ccf9,this[_0x4289c8(0x14a)]();}['_initDataSource'](){const _0x1c1695=_0x4e76f;this[_0x1c1695(0x15f)][_0x1c1695(0x140)]=this[_0x1c1695(0x14c)],this[_0x1c1695(0x15f)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2a9349),N(0x1,_0x113b48(f))],g);var se=Object[_0x4e76f(0x15b)],oe=Object[_0x4e76f(0x132)],ne=(_0x3394a7,_0xe46d86,_0x2eded9)=>_0xe46d86 in _0x3394a7?se(_0x3394a7,_0xe46d86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eded9}):_0x3394a7[_0xe46d86]=_0x2eded9,ie=(_0x15999a,_0x5d8095,_0xc65a86,_0xfc9e27)=>{for(var _0x373b7f=_0xfc9e27>0x1?void 0x0:_0xfc9e27?oe(_0x5d8095,_0xc65a86):_0x5d8095,_0x20bca9=_0x15999a['length']-0x1,_0x17f830;_0x20bca9>=0x0;_0x20bca9--)(_0x17f830=_0x15999a[_0x20bca9])&&(_0x373b7f=_0x17f830(_0x373b7f)||_0x373b7f);return _0x373b7f;},w=(_0x23c853,_0x25fff0)=>(_0x280bd6,_0x276d71)=>_0x25fff0(_0x280bd6,_0x276d71,_0x23c853),$=(_0x464b68,_0x57af3e,_0x55247a)=>ne(_0x464b68,typeof _0x57af3e!=_0x4e76f(0x12f)?_0x57af3e+'':_0x57af3e,_0x55247a);let b=class extends _0x177895{constructor(_0x662cda=M,_0x2512d3,_0x13de20){const _0x187016=_0x4e76f;super(),this['_config']=_0x662cda,this[_0x187016(0x11e)]=_0x2512d3,this['_configService']=_0x13de20;const {..._0x40df12}=_0x1d1215({},M,this[_0x187016(0x11a)]);this[_0x187016(0x12b)][_0x187016(0x165)](z,_0x40df12);}[_0x4e76f(0x11c)](){const _0x589212=_0x4e76f;[[f],[g],[S]][_0x589212(0x160)](_0x1b8c43=>{const _0x2c55a7=_0x589212;this[_0x2c55a7(0x11e)][_0x2c55a7(0x161)](_0x1b8c43);});}[_0x4e76f(0x166)](){const _0x414fed=_0x4e76f;this['_injector'][_0x414fed(0x144)](g),this['_injector'][_0x414fed(0x144)](S);}};$(b,_0x4e76f(0x13f),W),$(b,_0x4e76f(0x120),_0x414e33[_0x4e76f(0x138)]),b=ie([_0x14f0d8(_0x322bae,_0xe00712,_0x1e497f),w(0x1,_0x113b48(_0x130087)),w(0x2,_0x40717c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2d5350=_0x5b24;function _0x5282(){const _0x322b26=['format','OpenOrReOpen','getCurrentUser','/edit','body','symbol','requireSession','/universer-api/comment/unit/','onReady','size','rangeType','userId','Reply','deleteComment','user','ref','getComment','comments','/solved','31920240NEnvaB','get','Unknown','listComments','content','forEach','_httpService','1763512CQnKvL','stringify','parse','root','_configService','replies','_injector','Add','code','Delete','_threadCommentDataSourceService','Solve','getMemberID','_threadCommentDataSource','/add','Solved','_commentService','UNIVER_UNKNOWN','6986168DhicmD','threadId','solved','5801478JeRctW','onStarting','defineProperty','reply','delete','post','updateComment','userID','find','dataSource','subscribe','_sessionService','getUser','disposeWithMe','users','9ZHbwiz','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','Edit','getUnit','customRanges','add','1208Pbenet','/list','replyId','_initUserSync','addUser','unitId','5638824XeUNfj','commentUpdate$','1IrWvpq','2885427rweuQJ','_initDataSource','rangeId','COMMENT','filter','type','resolveComment','_userService','createTimestamp','13085twpSKB','UNRECOGNIZED','length','pluginName','map','pipe','error','getOwnPropertyDescriptor'];_0x5282=function(){return _0x322b26;};return _0x5282();}(function(_0x4f49c9,_0x1d89f0){const _0xa95a08=_0x5b24,_0x3a6338=_0x4f49c9();while(!![]){try{const _0x5300d0=parseInt(_0xa95a08(0xed))/0x1*(parseInt(_0xa95a08(0x119))/0x2)+parseInt(_0xa95a08(0xee))/0x3+parseInt(_0xa95a08(0xe5))/0x4*(parseInt(_0xa95a08(0xf7))/0x5)+parseInt(_0xa95a08(0xce))/0x6+parseInt(_0xa95a08(0xcb))/0x7+parseInt(_0xa95a08(0xeb))/0x8*(-parseInt(_0xa95a08(0xdd))/0x9)+-parseInt(_0xa95a08(0x112))/0xa;if(_0x5300d0===_0x1d89f0)break;else _0x3a6338['push'](_0x3a6338['shift']());}catch(_0xee8e77){_0x3a6338['push'](_0x3a6338['shift']());}}}(_0x5282,0xab607));import{CommentService as _0x5646f3,CollaborationSessionService as _0x242f6a,UniverCollaborationClientPlugin as _0x1f9298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3137d0}from'@univerjs-pro/license';import{dayjs as _0x4b79be,UserManagerService as _0x48e2a5,Inject as _0x82e101,Injector as _0x2de2a0,Disposable as _0xd7e540,CustomRangeType as _0x27a3d3,UniverInstanceType as _0x5b3885,DependentOn as _0xfde2f5,IConfigService as _0x14ce99,Plugin as _0x419499,merge as _0x4682c7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55cac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ba485,IThreadCommentDataSourceService as _0x4fae4e}from'@univerjs/thread-comment';import{bufferTime as _0x1ee30f}from'rxjs';function _0x5b24(_0x1cdd0e,_0x5af263){const _0x5282bc=_0x5282();return _0x5b24=function(_0x5b240b,_0x2b21c8){_0x5b240b=_0x5b240b-0xc8;let _0x1acb8b=_0x5282bc[_0x5b240b];return _0x1acb8b;},_0x5b24(_0x1cdd0e,_0x5af263);}import{HTTPService as _0x16aa01}from'@univerjs/network';const W=_0x2d5350(0xdf);var I=(_0x3024b4=>(_0x3024b4[_0x3024b4[_0x2d5350(0x100)]=0x0]='OpenOrReOpen',_0x3024b4[_0x3024b4['Solved']=0x1]='Solved',_0x3024b4[_0x3024b4[_0x2d5350(0xf8)]=-0x1]='UNRECOGNIZED',_0x3024b4))(I||{}),v=(_0x124b25=>(_0x124b25[_0x124b25[_0x2d5350(0x114)]=0x0]=_0x2d5350(0x114),_0x124b25[_0x124b25[_0x2d5350(0x120)]=0x1]=_0x2d5350(0x120),_0x124b25[_0x124b25[_0x2d5350(0x10b)]=0x2]=_0x2d5350(0x10b),_0x124b25[_0x124b25[_0x2d5350(0xe1)]=0x3]=_0x2d5350(0xe1),_0x124b25[_0x124b25[_0x2d5350(0x122)]=0x4]=_0x2d5350(0x122),_0x124b25[_0x124b25[_0x2d5350(0x124)]=0x5]=_0x2d5350(0x124),_0x124b25[_0x124b25[_0x2d5350(0xf8)]=-0x1]=_0x2d5350(0xf8),_0x124b25))(v||{});const D=_0x35cca1=>_0x4b79be(new Date(+_0x35cca1))[_0x2d5350(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e423b,_0x367b81)=>{const _0x8e92fc=_0x2d5350,_0x379b67=_0x3e423b[_0x8e92fc(0x113)](_0x48e2a5),_0xa89619=_0x3e423b['get'](_0x16aa01);_0x367b81['forEach'](_0x16088e=>{const _0x3d4f42=_0x8e92fc;_0x379b67[_0x3d4f42(0xda)](_0x16088e)&&_0x367b81[_0x3d4f42(0xd2)](_0x16088e);}),_0x367b81[_0x8e92fc(0x108)]&&(await _0xa89619[_0x8e92fc(0x113)]('/universer-api/user/list',{'params':{'userIDs':[..._0x367b81]}}))[_0x8e92fc(0x103)][_0x8e92fc(0xdc)][_0x8e92fc(0x117)](_0x402337=>{const _0x2ffb06=_0x8e92fc;_0x402337&&_0x379b67[_0x2ffb06(0xe9)](_0x402337);});};var K=Object[_0x2d5350(0xfe)],V=(_0xcb8fcf,_0x975fa6,_0x305288,_0x4242cf)=>{const _0x5429ec=_0x2d5350;for(var _0x17ad9a=_0x4242cf>0x1?void 0x0:_0x4242cf?K(_0x975fa6,_0x305288):_0x975fa6,_0x48544c=_0xcb8fcf[_0x5429ec(0xf9)]-0x1,_0x1bd1ac;_0x48544c>=0x0;_0x48544c--)(_0x1bd1ac=_0xcb8fcf[_0x48544c])&&(_0x17ad9a=_0x1bd1ac(_0x17ad9a)||_0x17ad9a);return _0x17ad9a;},p=(_0x54ffd1,_0x234003)=>(_0x22f624,_0x47e8ec)=>_0x234003(_0x22f624,_0x47e8ec,_0x54ffd1);let S=class extends _0xd7e540{constructor(_0x1c8253,_0x50c327,_0x11a5e8,_0x4f4a1c){const _0x431fd6=_0x2d5350;super(),this[_0x431fd6(0xc9)]=_0x1c8253,this[_0x431fd6(0xe0)]=_0x50c327,this[_0x431fd6(0xf5)]=_0x11a5e8,this[_0x431fd6(0x11f)]=_0x4f4a1c,this['_init'](),this[_0x431fd6(0xe8)]();}[_0x2d5350(0xe8)](){const _0x430198=_0x2d5350;this[_0x430198(0xdb)](this['_threadCommentModel'][_0x430198(0xec)][_0x430198(0xfc)](_0x1ee30f(0x10))['subscribe'](_0x387b63=>{const _0x35251e=_0x430198,_0xe145be=new Set();_0x387b63[_0x35251e(0x117)](_0x128904=>{const _0x400e9b=_0x35251e;switch(_0x128904[_0x400e9b(0xf3)]){case'add':{const _0x35594e=_0x128904['payload']['personId'];_0xe145be[_0x400e9b(0xe4)](_0x35594e);break;}}}),B(this[_0x35251e(0x11f)],_0xe145be);}));}['_init'](){const _0x10548d=_0x2d5350;this[_0x10548d(0xdb)](this[_0x10548d(0xc9)][_0x10548d(0xec)][_0x10548d(0xd8)](async _0x79bf6a=>{const _0x1b120d=_0x10548d;var _0x2a947d,_0x45f03f,_0x33dc3b,_0x5c655c;const _0x35e463=(_0x2a947d=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a[_0x1b120d(0xea)])[_0x1b120d(0xd6)](_0x5cfb28=>_0x5cfb28[_0x1b120d(0xcc)]===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x2a947d[_0x1b120d(0x11c)];if(!_0x35e463)return;const {unitId:_0x41d88e,subUnitId:_0x456ee6}=_0x35e463;switch(_0x79bf6a[_0x1b120d(0x10d)]&&this['_userService'][_0x1b120d(0xe9)](_0x79bf6a[_0x1b120d(0x10d)]),_0x79bf6a[_0x1b120d(0xf3)]){case v[_0x1b120d(0x120)]:break;case v['Reply']:{this[_0x1b120d(0xe0)]['addComment'](_0x41d88e,_0x456ee6,{'unitId':_0x41d88e,'subUnitId':_0x456ee6,'ref':'','id':_0x79bf6a['replyId'],'dT':D(+_0x79bf6a[_0x1b120d(0xf6)]),'threadId':_0x79bf6a['threadId'],'personId':(_0x33dc3b=(_0x45f03f=_0x79bf6a[_0x1b120d(0x10d)])==null?void 0x0:_0x45f03f[_0x1b120d(0xd5)])!=null?_0x33dc3b:_0x79bf6a['userId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)]),'parentId':_0x35e463['id']});break;}case v[_0x1b120d(0x122)]:{const _0x151700=this['_threadCommentModel'][_0x1b120d(0x10f)](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);_0x151700&&_0x151700['parentId']&&this[_0x1b120d(0xe0)]['deleteComment'](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);break;}case v[_0x1b120d(0xe1)]:{this['_threadCommentModel']['updateComment'](_0x41d88e,_0x456ee6,{'commentId':_0x79bf6a['replyId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)])});break;}case v[_0x1b120d(0x124)]:{const _0x3d510d=(_0x5c655c=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a['unitId'])[_0x1b120d(0xd6)](_0x167fe3=>_0x167fe3['threadId']===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x5c655c[_0x1b120d(0x11c)];_0x3d510d&&this[_0x1b120d(0xe0)][_0x1b120d(0xf4)](_0x41d88e,_0x456ee6,_0x3d510d['id'],_0x79bf6a[_0x1b120d(0xcd)]===I[_0x1b120d(0xc8)]);break;}}}));}};S=V([p(0x0,_0x82e101(_0x5646f3)),p(0x1,_0x82e101(_0x1ba485)),p(0x2,_0x82e101(_0x48e2a5)),p(0x3,_0x82e101(_0x2de2a0))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1df013,_0x388f42,_0x986144,_0x5354af)=>{const _0x4b08f0=_0x2d5350;for(var _0x27d257=_0x5354af>0x1?void 0x0:_0x5354af?k(_0x388f42,_0x986144):_0x388f42,_0x2e01c4=_0x1df013[_0x4b08f0(0xf9)]-0x1,_0x26e628;_0x2e01c4>=0x0;_0x2e01c4--)(_0x26e628=_0x1df013[_0x2e01c4])&&(_0x27d257=_0x26e628(_0x27d257)||_0x27d257);return _0x27d257;},_=(_0x4bdda0,_0x36d52c)=>(_0x520d65,_0x141c4e)=>_0x36d52c(_0x520d65,_0x141c4e,_0x4bdda0);function X(_0x5e74aa,_0x413701){const _0x2f8e15=_0x2d5350,_0x5ac38b=_0x5e74aa[_0x2f8e15(0x11e)][0x0];return{..._0x413701,'id':_0x5ac38b[_0x2f8e15(0xe7)],'resolved':_0x5e74aa[_0x2f8e15(0xcd)]===0x1,'dT':D(_0x5ac38b[_0x2f8e15(0xf6)]),'personId':_0x5ac38b[_0x2f8e15(0x10a)],'threadId':_0x5ac38b[_0x2f8e15(0xcc)]};}function ee(_0x2417a,_0x1931a0,_0x5b039b){const _0xee6606=_0x2d5350;var _0x2dc4af,_0x85328f;if(((_0x85328f=(_0x2dc4af=_0x2417a==null?void 0x0:_0x2417a[_0xee6606(0x11e)])==null?void 0x0:_0x2dc4af[_0xee6606(0xf9)])!=null?_0x85328f:0x0)>0x0){const _0x395103=(_0x360bdc,_0x38d607)=>({'id':_0x360bdc['replyId'],'threadId':_0x360bdc[_0xee6606(0xcc)],'dT':D(_0x360bdc[_0xee6606(0xf6)]),'personId':_0x360bdc[_0xee6606(0x10a)],'resolved':_0x2417a[_0xee6606(0xcd)]===I[_0xee6606(0xc8)],'unitId':_0x1931a0,'subUnitId':_0x5b039b,'text':JSON[_0xee6606(0x11b)](_0x360bdc[_0xee6606(0x116)]),'parentId':_0x38d607}),_0x4dce44=_0x395103(_0x2417a[_0xee6606(0x11e)][0x0]);return{..._0x4dce44,'children':_0x2417a['replies']['slice'](0x1)[_0xee6606(0xfb)](_0x5bbbba=>_0x395103(_0x5bbbba,_0x4dce44['id']))};}return null;}let f=class{constructor(_0x27a508,_0x576c22,_0x28db77,_0x1180f6){const _0x12defe=_0x2d5350;this[_0x12defe(0x118)]=_0x27a508,this['_userService']=_0x576c22,this[_0x12defe(0xd9)]=_0x28db77,this['_injector']=_0x1180f6;}async['addComment'](_0x2610cc){const _0x30c68b=_0x2d5350;var _0x4071d5,_0x4a7861;const {parentId:_0x324571,unitId:_0x17f5e0,text:_0x81fbea,threadId:_0x151e10}=_0x2610cc,_0x2e0da6=(_0x4a7861=(_0x4071d5=_0x81fbea[_0x30c68b(0xe3)])==null?void 0x0:_0x4071d5[_0x30c68b(0xf2)](_0x43d350=>_0x43d350[_0x30c68b(0x109)]===_0x27a3d3[_0x30c68b(0xf1)])[_0x30c68b(0xfb)](_0x6c75c5=>_0x6c75c5[_0x30c68b(0xf0)]))!=null?_0x4a7861:[],_0x1a50a4=JSON[_0x30c68b(0x11a)](_0x81fbea),_0x55db86=(await this[_0x30c68b(0xd9)]['requireSession'](_0x17f5e0))[_0x30c68b(0x125)]();if(_0x324571){const _0x580ad2={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6,'threadId':_0x151e10},_0x2d770c=(await this['_httpService']['post'](_0x30c68b(0x106)+_0x17f5e0+'/reply',{'body':_0x580ad2}))[_0x30c68b(0x103)][_0x30c68b(0xd1)];return{..._0x2610cc,'id':_0x2d770c[_0x30c68b(0xe7)],'dT':_0x4b79be(+_0x2d770c[_0x30c68b(0xf6)])[_0x30c68b(0xff)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d770c[_0x30c68b(0x10a)]};}else{const _0xceb580={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6},_0x168c13=await this['_httpService'][_0x30c68b(0xd3)](_0x30c68b(0x106)+_0x17f5e0+_0x30c68b(0x127),{'body':_0xceb580});return X(_0x168c13['body']['comment'],_0x2610cc);}}async[_0x2d5350(0xd4)](_0x47e27d){const _0x85ce6a=_0x2d5350;var _0x31e541,_0x49498e;const {text:_0x1951c8,unitId:_0x195b3f}=_0x47e27d,_0x2f6d65=(_0x49498e=(_0x31e541=_0x1951c8['customRanges'])==null?void 0x0:_0x31e541[_0x85ce6a(0xf2)](_0x111feb=>_0x111feb['rangeType']===_0x27a3d3[_0x85ce6a(0xf1)])[_0x85ce6a(0xfb)](_0x35fdd7=>_0x35fdd7['rangeId']))!=null?_0x49498e:[],_0x713cf1=JSON[_0x85ce6a(0x11a)](_0x1951c8),_0x4fc30d=_0x47e27d[_0x85ce6a(0xcc)],_0x1e5033=_0x47e27d['id'],_0x487d62={'memberId':(await this[_0x85ce6a(0xd9)][_0x85ce6a(0x105)](_0x195b3f))[_0x85ce6a(0x125)](),'unitId':_0x195b3f,'threadId':_0x4fc30d,'mention':_0x2f6d65,'content':_0x713cf1,'replyId':_0x1e5033},_0x236b07=await this[_0x85ce6a(0x118)][_0x85ce6a(0xd3)](_0x85ce6a(0x106)+_0x195b3f+_0x85ce6a(0x102),{'body':_0x487d62});return!_0x236b07['body'][_0x85ce6a(0xfd)]||_0x236b07[_0x85ce6a(0x103)]['error'][_0x85ce6a(0x121)]===0x1;}async[_0x2d5350(0xf4)](_0x675f29){const _0x43c343=_0x2d5350,{unitId:_0x27a660}=_0x675f29,_0x448c66=_0x675f29[_0x43c343(0xcc)],_0x14a711={'memberId':this[_0x43c343(0xf5)][_0x43c343(0x101)]()['userID'],'unitId':_0x27a660,'threadId':_0x448c66,'solved':_0x675f29['resolved']?I['Solved']:I['OpenOrReOpen']},_0x282023=await this[_0x43c343(0x118)][_0x43c343(0xd3)]('/universer-api/comment/unit/'+_0x27a660+_0x43c343(0x111),{'body':_0x14a711});return!_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]||_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]['code']===0x1;}async[_0x2d5350(0x10c)](_0x3776f5,_0x3ba336,_0x1779c9,_0x5ae9b3){const _0xbafe49=_0x2d5350,_0x3d9aad={'memberId':(await this['_sessionService'][_0xbafe49(0x105)](_0x3776f5))[_0xbafe49(0x125)](),'threadId':_0x1779c9,'replyId':_0x5ae9b3,'unitId':_0x3776f5},_0x2d252c=await this['_httpService']['post'](_0xbafe49(0x106)+_0x3776f5+'/delete',{'body':_0x3d9aad});return!_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)]||_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)][_0xbafe49(0x121)]===0x1;}async[_0x2d5350(0x115)](_0x5bc84b,_0x124577,_0x144626){const _0x32ed26=_0x2d5350,_0x5c63f8={'unitId':_0x5bc84b,'threadId':_0x144626},_0x28f4ec=await this[_0x32ed26(0x118)][_0x32ed26(0xd3)]('/universer-api/comment/unit/'+_0x5bc84b+_0x32ed26(0xe6),{'body':_0x5c63f8}),_0x49ddfc=_0x144626[_0x32ed26(0xfb)](_0x1fab8e=>ee(_0x28f4ec['body'][_0x32ed26(0x110)][_0x1fab8e],_0x5bc84b,_0x124577))['filter'](Boolean);return Object['values'](_0x28f4ec[_0x32ed26(0x103)][_0x32ed26(0xdc)])[_0x32ed26(0x117)](_0xd5d441=>{const _0x1af91d=_0x32ed26;this[_0x1af91d(0xf5)][_0x1af91d(0xe9)](_0xd5d441);}),_0x49ddfc;}['saveCommentToSnapshot'](_0x172d15){const _0x52eb70=_0x2d5350;return{'id':_0x172d15['id'],'threadId':_0x172d15['threadId'],'ref':_0x172d15[_0x52eb70(0x10e)]};}};f=Q([_(0x0,_0x82e101(_0x16aa01)),_(0x1,_0x82e101(_0x48e2a5)),_(0x2,_0x82e101(_0x242f6a)),_(0x3,_0x82e101(_0x2de2a0))],f);var re=Object[_0x2d5350(0xfe)],te=(_0x161bb3,_0x4e6a7b,_0x316e49,_0x3b8236)=>{const _0x99020e=_0x2d5350;for(var _0x38d524=_0x3b8236>0x1?void 0x0:_0x3b8236?re(_0x4e6a7b,_0x316e49):_0x4e6a7b,_0x39255b=_0x161bb3[_0x99020e(0xf9)]-0x1,_0x1341c9;_0x39255b>=0x0;_0x39255b--)(_0x1341c9=_0x161bb3[_0x39255b])&&(_0x38d524=_0x1341c9(_0x38d524)||_0x38d524);return _0x38d524;},N=(_0x31621c,_0xad4c0f)=>(_0x2024d5,_0x394031)=>_0xad4c0f(_0x2024d5,_0x394031,_0x31621c);let g=class extends _0xd7e540{constructor(_0x2e1c38,_0x31f48d){const _0x61a7bc=_0x2d5350;super(),this[_0x61a7bc(0x123)]=_0x2e1c38,this[_0x61a7bc(0x126)]=_0x31f48d,this[_0x61a7bc(0xef)]();}['_initDataSource'](){const _0x99b2e2=_0x2d5350;this[_0x99b2e2(0x123)][_0x99b2e2(0xd7)]=this[_0x99b2e2(0x126)],this[_0x99b2e2(0x123)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4fae4e),N(0x1,_0x82e101(f))],g);var se=Object[_0x2d5350(0xd0)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1d8100,_0xb2340,_0x542ef7)=>_0xb2340 in _0x1d8100?se(_0x1d8100,_0xb2340,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x542ef7}):_0x1d8100[_0xb2340]=_0x542ef7,ie=(_0x42f1d8,_0x4548d8,_0x54b53c,_0x4c2c1f)=>{for(var _0x5dbc5d=_0x4c2c1f>0x1?void 0x0:_0x4c2c1f?oe(_0x4548d8,_0x54b53c):_0x4548d8,_0xdae79f=_0x42f1d8['length']-0x1,_0x2c1c90;_0xdae79f>=0x0;_0xdae79f--)(_0x2c1c90=_0x42f1d8[_0xdae79f])&&(_0x5dbc5d=_0x2c1c90(_0x5dbc5d)||_0x5dbc5d);return _0x5dbc5d;},w=(_0xbd0b62,_0x57b92e)=>(_0x2f69b6,_0x5c7479)=>_0x57b92e(_0x2f69b6,_0x5c7479,_0xbd0b62),$=(_0x52dd39,_0x1a4a83,_0x1fdefe)=>ne(_0x52dd39,typeof _0x1a4a83!=_0x2d5350(0x104)?_0x1a4a83+'':_0x1a4a83,_0x1fdefe);let b=class extends _0x419499{constructor(_0x418a10=M,_0x4b4bbc,_0x16863c){const _0x421808=_0x2d5350;super(),this['_config']=_0x418a10,this[_0x421808(0x11f)]=_0x4b4bbc,this[_0x421808(0x11d)]=_0x16863c;const {..._0x5da4ff}=_0x4682c7({},M,this[_0x421808(0xde)]);this['_configService']['setConfig'](z,_0x5da4ff);}[_0x2d5350(0xcf)](){const _0x173f0d=_0x2d5350;[[f],[g],[S]][_0x173f0d(0x117)](_0x43f6e8=>{const _0x41eb1d=_0x173f0d;this['_injector'][_0x41eb1d(0xe4)](_0x43f6e8);});}[_0x2d5350(0x107)](){const _0x51c706=_0x2d5350;this[_0x51c706(0x11f)][_0x51c706(0x113)](g),this[_0x51c706(0x11f)]['get'](S);}};$(b,_0x2d5350(0xfa),W),$(b,'type',_0x5b3885[_0x2d5350(0xca)]),b=ie([_0xfde2f5(_0x55cac6,_0x1f9298,_0x3137d0),w(0x1,_0x82e101(_0x2de2a0)),w(0x2,_0x14ce99)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4e76f=_0x173a;(function(_0x226cbb,_0x41b0f0){const _0x5cf68d=_0x173a,_0x4e1a76=_0x226cbb();while(!![]){try{const _0x46f023=-parseInt(_0x5cf68d(0x16f))/0x1+parseInt(_0x5cf68d(0x123))/0x2+parseInt(_0x5cf68d(0x137))/0x3*(parseInt(_0x5cf68d(0x12d))/0x4)+-parseInt(_0x5cf68d(0x146))/0x5*(-parseInt(_0x5cf68d(0x14d))/0x6)+parseInt(_0x5cf68d(0x151))/0x7*(parseInt(_0x5cf68d(0x121))/0x8)+parseInt(_0x5cf68d(0x13c))/0x9+-parseInt(_0x5cf68d(0x16b))/0xa;if(_0x46f023===_0x41b0f0)break;else _0x4e1a76['push'](_0x4e1a76['shift']());}catch(_0x1d1506){_0x4e1a76['push'](_0x4e1a76['shift']());}}}(_0x2a00,0xc36c6));import{CommentService as _0x3fd827,CollaborationSessionService as _0x312cb8,UniverCollaborationClientPlugin as _0xe00712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e497f}from'@univerjs-pro/license';import{dayjs as _0x21bb25,UserManagerService as _0x516a13,Inject as _0x113b48,Injector as _0x130087,Disposable as _0x311500,CustomRangeType as _0x488275,UniverInstanceType as _0x414e33,DependentOn as _0x14f0d8,IConfigService as _0x40717c,Plugin as _0x177895,merge as _0x1d1215}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x322bae}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfb0986,IThreadCommentDataSourceService as _0x2a9349}from'@univerjs/thread-comment';import{bufferTime as _0x25c191}from'rxjs';function _0x173a(_0x3780c3,_0x26751c){const _0x2a009d=_0x2a00();return _0x173a=function(_0x173a32,_0x1aada5){_0x173a32=_0x173a32-0x113;let _0x547450=_0x2a009d[_0x173a32];return _0x547450;},_0x173a(_0x3780c3,_0x26751c);}import{HTTPService as _0x28d87b}from'@univerjs/network';const W=_0x4e76f(0x156);var I=(_0x51b954=>(_0x51b954[_0x51b954['OpenOrReOpen']=0x0]=_0x4e76f(0x169),_0x51b954[_0x51b954[_0x4e76f(0x154)]=0x1]=_0x4e76f(0x154),_0x51b954[_0x51b954[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51b954))(I||{}),v=(_0x51af3c=>(_0x51af3c[_0x51af3c[_0x4e76f(0x162)]=0x0]=_0x4e76f(0x162),_0x51af3c[_0x51af3c[_0x4e76f(0x16a)]=0x1]='Add',_0x51af3c[_0x51af3c[_0x4e76f(0x171)]=0x2]=_0x4e76f(0x171),_0x51af3c[_0x51af3c[_0x4e76f(0x12c)]=0x3]=_0x4e76f(0x12c),_0x51af3c[_0x51af3c[_0x4e76f(0x114)]=0x4]=_0x4e76f(0x114),_0x51af3c[_0x51af3c['Solve']=0x5]=_0x4e76f(0x178),_0x51af3c[_0x51af3c[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51af3c))(v||{});const D=_0x250c87=>_0x21bb25(new Date(+_0x250c87))[_0x4e76f(0x11b)](_0x4e76f(0x142)),B=async(_0x23e660,_0x170f3f)=>{const _0x2d9366=_0x4e76f,_0x3f3df0=_0x23e660[_0x2d9366(0x144)](_0x516a13),_0x1b1eb1=_0x23e660['get'](_0x28d87b);_0x170f3f[_0x2d9366(0x160)](_0x3c1cd7=>{const _0x3955d9=_0x2d9366;_0x3f3df0[_0x3955d9(0x143)](_0x3c1cd7)&&_0x170f3f[_0x3955d9(0x16d)](_0x3c1cd7);}),_0x170f3f[_0x2d9366(0x167)]&&(await _0x1b1eb1[_0x2d9366(0x144)](_0x2d9366(0x179),{'params':{'userIDs':[..._0x170f3f]}}))[_0x2d9366(0x130)]['users'][_0x2d9366(0x160)](_0x182a19=>{const _0x1e0345=_0x2d9366;_0x182a19&&_0x3f3df0[_0x1e0345(0x177)](_0x182a19);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dc74d,_0x4ac995,_0x3bbf85,_0x5020ff)=>{const _0x5cd43f=_0x4e76f;for(var _0x3bbe85=_0x5020ff>0x1?void 0x0:_0x5020ff?K(_0x4ac995,_0x3bbf85):_0x4ac995,_0x223f4d=_0x5dc74d[_0x5cd43f(0x14b)]-0x1,_0x4f7810;_0x223f4d>=0x0;_0x223f4d--)(_0x4f7810=_0x5dc74d[_0x223f4d])&&(_0x3bbe85=_0x4f7810(_0x3bbe85)||_0x3bbe85);return _0x3bbe85;},p=(_0x208eed,_0x5cbabf)=>(_0x5b8c18,_0x55544b)=>_0x5cbabf(_0x5b8c18,_0x55544b,_0x208eed);let S=class extends _0x311500{constructor(_0x38059a,_0x5434c7,_0x41ef4f,_0x4082f1){const _0x3128e7=_0x4e76f;super(),this[_0x3128e7(0x157)]=_0x38059a,this[_0x3128e7(0x118)]=_0x5434c7,this[_0x3128e7(0x124)]=_0x41ef4f,this['_injector']=_0x4082f1,this[_0x3128e7(0x134)](),this[_0x3128e7(0x163)]();}[_0x4e76f(0x163)](){const _0x1313d3=_0x4e76f;this['disposeWithMe'](this[_0x1313d3(0x118)][_0x1313d3(0x155)][_0x1313d3(0x127)](_0x25c191(0x10))['subscribe'](_0x37593a=>{const _0x3221bc=_0x1313d3,_0x235850=new Set();_0x37593a[_0x3221bc(0x160)](_0x16a2c6=>{const _0x22ba9c=_0x3221bc;switch(_0x16a2c6[_0x22ba9c(0x120)]){case _0x22ba9c(0x161):{const _0x52a32b=_0x16a2c6[_0x22ba9c(0x15d)]['personId'];_0x235850[_0x22ba9c(0x161)](_0x52a32b);break;}}}),B(this[_0x3221bc(0x11e)],_0x235850);}));}[_0x4e76f(0x134)](){const _0x197da0=_0x4e76f;this[_0x197da0(0x13a)](this[_0x197da0(0x157)][_0x197da0(0x155)][_0x197da0(0x14f)](async _0x323457=>{const _0x1a59c3=_0x197da0;var _0x4a5272,_0x44c8fa,_0x4a1a70,_0xb2ab84;const _0x489c20=(_0x4a5272=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457['unitId'])['find'](_0x2ee3cc=>_0x2ee3cc[_0x1a59c3(0x125)]===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0x4a5272[_0x1a59c3(0x14e)];if(!_0x489c20)return;const {unitId:_0xe1c271,subUnitId:_0x26414f}=_0x489c20;switch(_0x323457[_0x1a59c3(0x16e)]&&this[_0x1a59c3(0x124)]['addUser'](_0x323457['user']),_0x323457[_0x1a59c3(0x120)]){case v[_0x1a59c3(0x16a)]:break;case v[_0x1a59c3(0x171)]:{this['_threadCommentModel'][_0x1a59c3(0x168)](_0xe1c271,_0x26414f,{'unitId':_0xe1c271,'subUnitId':_0x26414f,'ref':'','id':_0x323457['replyId'],'dT':D(+_0x323457[_0x1a59c3(0x133)]),'threadId':_0x323457[_0x1a59c3(0x125)],'personId':(_0x4a1a70=(_0x44c8fa=_0x323457[_0x1a59c3(0x16e)])==null?void 0x0:_0x44c8fa[_0x1a59c3(0x15a)])!=null?_0x4a1a70:_0x323457[_0x1a59c3(0x17c)],'text':JSON[_0x1a59c3(0x128)](_0x323457[_0x1a59c3(0x170)]),'parentId':_0x489c20['id']});break;}case v['Delete']:{const _0x4f0f7e=this[_0x1a59c3(0x118)][_0x1a59c3(0x139)](_0xe1c271,_0x26414f,_0x323457[_0x1a59c3(0x131)]);_0x4f0f7e&&_0x4f0f7e[_0x1a59c3(0x11f)]&&this[_0x1a59c3(0x118)][_0x1a59c3(0x115)](_0xe1c271,_0x26414f,_0x323457['replyId']);break;}case v[_0x1a59c3(0x12c)]:{this['_threadCommentModel'][_0x1a59c3(0x158)](_0xe1c271,_0x26414f,{'commentId':_0x323457[_0x1a59c3(0x131)],'text':JSON[_0x1a59c3(0x128)](_0x323457['content'])});break;}case v[_0x1a59c3(0x178)]:{const _0x3bb8d5=(_0xb2ab84=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457[_0x1a59c3(0x12a)])[_0x1a59c3(0x148)](_0x5a32aa=>_0x5a32aa['threadId']===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0xb2ab84[_0x1a59c3(0x14e)];_0x3bb8d5&&this[_0x1a59c3(0x118)]['resolveComment'](_0xe1c271,_0x26414f,_0x3bb8d5['id'],_0x323457[_0x1a59c3(0x175)]===I[_0x1a59c3(0x154)]);break;}}}));}};S=V([p(0x0,_0x113b48(_0x3fd827)),p(0x1,_0x113b48(_0xfb0986)),p(0x2,_0x113b48(_0x516a13)),p(0x3,_0x113b48(_0x130087))],S);const z=_0x4e76f(0x126),M={};var k=Object[_0x4e76f(0x132)],Q=(_0x89db04,_0x215f04,_0x577efd,_0x1dd950)=>{const _0x483137=_0x4e76f;for(var _0x35bf35=_0x1dd950>0x1?void 0x0:_0x1dd950?k(_0x215f04,_0x577efd):_0x215f04,_0x2fc482=_0x89db04[_0x483137(0x14b)]-0x1,_0x4d377d;_0x2fc482>=0x0;_0x2fc482--)(_0x4d377d=_0x89db04[_0x2fc482])&&(_0x35bf35=_0x4d377d(_0x35bf35)||_0x35bf35);return _0x35bf35;},_=(_0x1d5945,_0x241dc2)=>(_0x17d376,_0xe16305)=>_0x241dc2(_0x17d376,_0xe16305,_0x1d5945);function X(_0x4c6d0a,_0xa08a1c){const _0x4169a0=_0x4e76f,_0x2b26a2=_0x4c6d0a[_0x4169a0(0x122)][0x0];return{..._0xa08a1c,'id':_0x2b26a2[_0x4169a0(0x131)],'resolved':_0x4c6d0a['solved']===0x1,'dT':D(_0x2b26a2[_0x4169a0(0x133)]),'personId':_0x2b26a2[_0x4169a0(0x17c)],'threadId':_0x2b26a2[_0x4169a0(0x125)]};}function ee(_0x50c8a3,_0x4f0d55,_0x414b48){const _0x4d921b=_0x4e76f;var _0x49551f,_0x48ff7b;if(((_0x48ff7b=(_0x49551f=_0x50c8a3==null?void 0x0:_0x50c8a3[_0x4d921b(0x122)])==null?void 0x0:_0x49551f['length'])!=null?_0x48ff7b:0x0)>0x0){const _0x1d275d=(_0x218bbb,_0x451fa5)=>({'id':_0x218bbb[_0x4d921b(0x131)],'threadId':_0x218bbb[_0x4d921b(0x125)],'dT':D(_0x218bbb[_0x4d921b(0x133)]),'personId':_0x218bbb[_0x4d921b(0x17c)],'resolved':_0x50c8a3[_0x4d921b(0x175)]===I[_0x4d921b(0x154)],'unitId':_0x4f0d55,'subUnitId':_0x414b48,'text':JSON[_0x4d921b(0x128)](_0x218bbb[_0x4d921b(0x170)]),'parentId':_0x451fa5}),_0x1dd06d=_0x1d275d(_0x50c8a3[_0x4d921b(0x122)][0x0]);return{..._0x1dd06d,'children':_0x50c8a3['replies']['slice'](0x1)['map'](_0x56f60f=>_0x1d275d(_0x56f60f,_0x1dd06d['id']))};}return null;}let f=class{constructor(_0x75dd6b,_0x2ca638,_0x3f2f8b,_0x194d57){const _0x588cb5=_0x4e76f;this[_0x588cb5(0x17a)]=_0x75dd6b,this[_0x588cb5(0x124)]=_0x2ca638,this[_0x588cb5(0x129)]=_0x3f2f8b,this['_injector']=_0x194d57;}async[_0x4e76f(0x168)](_0xa1fb67){const _0x32bffb=_0x4e76f;var _0x59adaa,_0x3adcc2;const {parentId:_0x15ec77,unitId:_0x5a2dd2,text:_0xd9a0ee,threadId:_0x7b6a91}=_0xa1fb67,_0x1130d8=(_0x3adcc2=(_0x59adaa=_0xd9a0ee['customRanges'])==null?void 0x0:_0x59adaa[_0x32bffb(0x15c)](_0x508ebc=>_0x508ebc[_0x32bffb(0x164)]===_0x488275[_0x32bffb(0x159)])[_0x32bffb(0x172)](_0x48505d=>_0x48505d['rangeId']))!=null?_0x3adcc2:[],_0x507721=JSON[_0x32bffb(0x13d)](_0xd9a0ee),_0xe05860=(await this[_0x32bffb(0x129)][_0x32bffb(0x152)](_0x5a2dd2))['getMemberID']();if(_0x15ec77){const _0x4a6aab={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8,'threadId':_0x7b6a91},_0x37d9cf=(await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x136),{'body':_0x4a6aab}))[_0x32bffb(0x130)][_0x32bffb(0x17d)];return{..._0xa1fb67,'id':_0x37d9cf[_0x32bffb(0x131)],'dT':_0x21bb25(+_0x37d9cf['createTimestamp'])[_0x32bffb(0x11b)](_0x32bffb(0x142)),'personId':_0x37d9cf[_0x32bffb(0x17c)]};}else{const _0x186775={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8},_0x4426f5=await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x113),{'body':_0x186775});return X(_0x4426f5[_0x32bffb(0x130)][_0x32bffb(0x116)],_0xa1fb67);}}async['updateComment'](_0x5cf13e){const _0x541960=_0x4e76f;var _0x33f1be,_0x153579;const {text:_0x565d58,unitId:_0x1320e2}=_0x5cf13e,_0x26ff26=(_0x153579=(_0x33f1be=_0x565d58[_0x541960(0x150)])==null?void 0x0:_0x33f1be['filter'](_0x528401=>_0x528401[_0x541960(0x164)]===_0x488275[_0x541960(0x159)])[_0x541960(0x172)](_0x32cb40=>_0x32cb40['rangeId']))!=null?_0x153579:[],_0x4b37ff=JSON['stringify'](_0x565d58),_0x4285fa=_0x5cf13e[_0x541960(0x125)],_0x3fb545=_0x5cf13e['id'],_0x1a05c8={'memberId':(await this[_0x541960(0x129)][_0x541960(0x152)](_0x1320e2))[_0x541960(0x174)](),'unitId':_0x1320e2,'threadId':_0x4285fa,'mention':_0x26ff26,'content':_0x4b37ff,'replyId':_0x3fb545},_0x590671=await this[_0x541960(0x17a)]['post'](_0x541960(0x176)+_0x1320e2+_0x541960(0x153),{'body':_0x1a05c8});return!_0x590671['body'][_0x541960(0x117)]||_0x590671[_0x541960(0x130)][_0x541960(0x117)][_0x541960(0x149)]===0x1;}async[_0x4e76f(0x15e)](_0x498879){const _0x53e844=_0x4e76f,{unitId:_0x269a30}=_0x498879,_0x527487=_0x498879[_0x53e844(0x125)],_0x157d06={'memberId':this[_0x53e844(0x124)][_0x53e844(0x141)]()['userID'],'unitId':_0x269a30,'threadId':_0x527487,'solved':_0x498879[_0x53e844(0x13e)]?I['Solved']:I[_0x53e844(0x169)]},_0x1891d9=await this['_httpService'][_0x53e844(0x135)](_0x53e844(0x176)+_0x269a30+'/solved',{'body':_0x157d06});return!_0x1891d9['body'][_0x53e844(0x117)]||_0x1891d9['body']['error'][_0x53e844(0x149)]===0x1;}async[_0x4e76f(0x115)](_0x11bde1,_0x52967a,_0x5228ae,_0x332692){const _0x12b8d9=_0x4e76f,_0x56c35d={'memberId':(await this['_sessionService'][_0x12b8d9(0x152)](_0x11bde1))[_0x12b8d9(0x174)](),'threadId':_0x5228ae,'replyId':_0x332692,'unitId':_0x11bde1},_0x384526=await this[_0x12b8d9(0x17a)][_0x12b8d9(0x135)](_0x12b8d9(0x176)+_0x11bde1+_0x12b8d9(0x11d),{'body':_0x56c35d});return!_0x384526['body']['error']||_0x384526[_0x12b8d9(0x130)][_0x12b8d9(0x117)][_0x12b8d9(0x149)]===0x1;}async[_0x4e76f(0x16c)](_0x34d9cd,_0x101f62,_0x3e0a73){const _0x1de798=_0x4e76f,_0x5049f8={'unitId':_0x34d9cd,'threadId':_0x3e0a73},_0xce298e=await this['_httpService']['post'](_0x1de798(0x176)+_0x34d9cd+'/list',{'body':_0x5049f8}),_0x280787=_0x3e0a73[_0x1de798(0x172)](_0x23a250=>ee(_0xce298e[_0x1de798(0x130)][_0x1de798(0x12e)][_0x23a250],_0x34d9cd,_0x101f62))[_0x1de798(0x15c)](Boolean);return Object[_0x1de798(0x147)](_0xce298e[_0x1de798(0x130)][_0x1de798(0x145)])['forEach'](_0x49c9b5=>{const _0x3e8a9b=_0x1de798;this['_userService'][_0x3e8a9b(0x177)](_0x49c9b5);}),_0x280787;}[_0x4e76f(0x13b)](_0x161504){const _0x232fe9=_0x4e76f;return{'id':_0x161504['id'],'threadId':_0x161504[_0x232fe9(0x125)],'ref':_0x161504[_0x232fe9(0x17b)]};}};f=Q([_(0x0,_0x113b48(_0x28d87b)),_(0x1,_0x113b48(_0x516a13)),_(0x2,_0x113b48(_0x312cb8)),_(0x3,_0x113b48(_0x130087))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x743fd8,_0x5cb16f,_0x2b0c63,_0x525290)=>{const _0x81cea0=_0x4e76f;for(var _0x29e226=_0x525290>0x1?void 0x0:_0x525290?re(_0x5cb16f,_0x2b0c63):_0x5cb16f,_0xa05e90=_0x743fd8[_0x81cea0(0x14b)]-0x1,_0x5460c2;_0xa05e90>=0x0;_0xa05e90--)(_0x5460c2=_0x743fd8[_0xa05e90])&&(_0x29e226=_0x5460c2(_0x29e226)||_0x29e226);return _0x29e226;},N=(_0x2b51f3,_0xa3ee79)=>(_0x37b244,_0x6ca17d)=>_0xa3ee79(_0x37b244,_0x6ca17d,_0x2b51f3);function _0x2a00(){const _0x1c3838=['COMMENT','userID','defineProperty','filter','payload','resolveComment','_threadCommentDataSourceService','forEach','add','Unknown','_initUserSync','rangeType','setConfig','onReady','size','addComment','OpenOrReOpen','Add','17189440RAJMBU','listComments','delete','user','6100CvjTcz','content','Reply','map','getUnit','getMemberID','solved','/universer-api/comment/unit/','addUser','Solve','/universer-api/user/list','_httpService','ref','userId','reply','/add','Delete','deleteComment','comment','error','_threadCommentModel','UNRECOGNIZED','_config','format','onStarting','/delete','_injector','parentId','type','4856JgUuPZ','replies','2965112BydwKc','_userService','threadId','thread-comment-data-source.config','pipe','parse','_sessionService','unitId','_configService','Edit','834004WfCspo','comments','symbol','body','replyId','getOwnPropertyDescriptor','createTimestamp','_init','post','/reply','12QEkJLH','UNIVER_UNKNOWN','getComment','disposeWithMe','saveCommentToSnapshot','734661HnJWAK','stringify','resolved','pluginName','dataSource','getCurrentUser','YYYY/MM/DD\x20HH:mm','getUser','get','users','107885GefCNY','values','find','code','_initDataSource','length','_threadCommentDataSource','30YGFUSM','root','subscribe','customRanges','224zdWAzQ','requireSession','/edit','Solved','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','updateComment'];_0x2a00=function(){return _0x1c3838;};return _0x2a00();}let g=class extends _0x311500{constructor(_0x216287,_0xb2ccf9){const _0x4289c8=_0x4e76f;super(),this[_0x4289c8(0x15f)]=_0x216287,this[_0x4289c8(0x14c)]=_0xb2ccf9,this[_0x4289c8(0x14a)]();}['_initDataSource'](){const _0x1c1695=_0x4e76f;this[_0x1c1695(0x15f)][_0x1c1695(0x140)]=this[_0x1c1695(0x14c)],this[_0x1c1695(0x15f)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2a9349),N(0x1,_0x113b48(f))],g);var se=Object[_0x4e76f(0x15b)],oe=Object[_0x4e76f(0x132)],ne=(_0x3394a7,_0xe46d86,_0x2eded9)=>_0xe46d86 in _0x3394a7?se(_0x3394a7,_0xe46d86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eded9}):_0x3394a7[_0xe46d86]=_0x2eded9,ie=(_0x15999a,_0x5d8095,_0xc65a86,_0xfc9e27)=>{for(var _0x373b7f=_0xfc9e27>0x1?void 0x0:_0xfc9e27?oe(_0x5d8095,_0xc65a86):_0x5d8095,_0x20bca9=_0x15999a['length']-0x1,_0x17f830;_0x20bca9>=0x0;_0x20bca9--)(_0x17f830=_0x15999a[_0x20bca9])&&(_0x373b7f=_0x17f830(_0x373b7f)||_0x373b7f);return _0x373b7f;},w=(_0x23c853,_0x25fff0)=>(_0x280bd6,_0x276d71)=>_0x25fff0(_0x280bd6,_0x276d71,_0x23c853),$=(_0x464b68,_0x57af3e,_0x55247a)=>ne(_0x464b68,typeof _0x57af3e!=_0x4e76f(0x12f)?_0x57af3e+'':_0x57af3e,_0x55247a);let b=class extends _0x177895{constructor(_0x662cda=M,_0x2512d3,_0x13de20){const _0x187016=_0x4e76f;super(),this['_config']=_0x662cda,this[_0x187016(0x11e)]=_0x2512d3,this['_configService']=_0x13de20;const {..._0x40df12}=_0x1d1215({},M,this[_0x187016(0x11a)]);this[_0x187016(0x12b)][_0x187016(0x165)](z,_0x40df12);}[_0x4e76f(0x11c)](){const _0x589212=_0x4e76f;[[f],[g],[S]][_0x589212(0x160)](_0x1b8c43=>{const _0x2c55a7=_0x589212;this[_0x2c55a7(0x11e)][_0x2c55a7(0x161)](_0x1b8c43);});}[_0x4e76f(0x166)](){const _0x414fed=_0x4e76f;this['_injector'][_0x414fed(0x144)](g),this['_injector'][_0x414fed(0x144)](S);}};$(b,_0x4e76f(0x13f),W),$(b,_0x4e76f(0x120),_0x414e33[_0x4e76f(0x138)]),b=ie([_0x14f0d8(_0x322bae,_0xe00712,_0x1e497f),w(0x1,_0x113b48(_0x130087)),w(0x2,_0x40717c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x8c6a(_0x1e4ec5,_0x3a5205){const _0x5c169b=_0x5c16();return _0x8c6a=function(_0x8c6ab,_0x108e47){_0x8c6ab=_0x8c6ab-0x175;let _0x134f9c=_0x5c169b[_0x8c6ab];return _0x134f9c;},_0x8c6a(_0x1e4ec5,_0x3a5205);}(function(_0x4873a7,_0x496b74){const _0x2ecdf7=_0x8c6a,_0x370cbb=_0x4873a7();while(!![]){try{const _0x296036=parseInt(_0x2ecdf7(0x1ea))/0x1*(parseInt(_0x2ecdf7(0x194))/0x2)+-parseInt(_0x2ecdf7(0x1cc))/0x3+-parseInt(_0x2ecdf7(0x1f1))/0x4*(parseInt(_0x2ecdf7(0x1a0))/0x5)+-parseInt(_0x2ecdf7(0x1ca))/0x6*(parseInt(_0x2ecdf7(0x17f))/0x7)+parseInt(_0x2ecdf7(0x1d6))/0x8*(-parseInt(_0x2ecdf7(0x189))/0x9)+-parseInt(_0x2ecdf7(0x190))/0xa+-parseInt(_0x2ecdf7(0x1b5))/0xb*(-parseInt(_0x2ecdf7(0x1cf))/0xc);if(_0x296036===_0x496b74)break;else _0x370cbb['push'](_0x370cbb['shift']());}catch(_0x43cfa2){_0x370cbb['push'](_0x370cbb['shift']());}}}(_0x5c16,0x5d3ce),function(_0x559d2f,_0x928144){const _0x19e11c=_0x8c6a;typeof exports==_0x19e11c(0x17a)&&typeof module<'u'?_0x928144(exports,require(_0x19e11c(0x1a8)),require(_0x19e11c(0x1e6)),require('@univerjs/core'),require(_0x19e11c(0x176)),require(_0x19e11c(0x1b7)),require(_0x19e11c(0x195)),require(_0x19e11c(0x1e1))):typeof define==_0x19e11c(0x1a2)&&define[_0x19e11c(0x1e8)]?define(['exports',_0x19e11c(0x1a8),_0x19e11c(0x1e6),'@univerjs/core',_0x19e11c(0x176),_0x19e11c(0x1b7),_0x19e11c(0x195),'@univerjs/network'],_0x928144):(_0x559d2f=typeof globalThis<'u'?globalThis:_0x559d2f||self,_0x928144(_0x559d2f[_0x19e11c(0x1fa)]={},_0x559d2f[_0x19e11c(0x19c)],_0x559d2f[_0x19e11c(0x19e)],_0x559d2f[_0x19e11c(0x183)],_0x559d2f['UniverThreadCommentUi'],_0x559d2f[_0x19e11c(0x1cb)],_0x559d2f[_0x19e11c(0x195)],_0x559d2f[_0x19e11c(0x1dd)]));}(this,function(_0x5a7c67,_0x3871da,_0x46729d,_0x533e70,_0x2a2413,_0x3ce02e,_0x363ffb,_0x457d43){'use strict';const _0xd67764=_0x8c6a;const _0x322963=_0xd67764(0x17b);var _0x3c522a=(_0x4a6efc=>(_0x4a6efc[_0x4a6efc[_0xd67764(0x1af)]=0x0]=_0xd67764(0x1af),_0x4a6efc[_0x4a6efc[_0xd67764(0x1d0)]=0x1]=_0xd67764(0x1d0),_0x4a6efc[_0x4a6efc[_0xd67764(0x1c9)]=-0x1]=_0xd67764(0x1c9),_0x4a6efc))(_0x3c522a||{}),_0x447af1=(_0xacf8ce=>(_0xacf8ce[_0xacf8ce['Unknown']=0x0]='Unknown',_0xacf8ce[_0xacf8ce[_0xd67764(0x19f)]=0x1]=_0xd67764(0x19f),_0xacf8ce[_0xacf8ce[_0xd67764(0x1eb)]=0x2]=_0xd67764(0x1eb),_0xacf8ce[_0xacf8ce[_0xd67764(0x1a5)]=0x3]=_0xd67764(0x1a5),_0xacf8ce[_0xacf8ce[_0xd67764(0x179)]=0x4]=_0xd67764(0x179),_0xacf8ce[_0xacf8ce[_0xd67764(0x186)]=0x5]=_0xd67764(0x186),_0xacf8ce[_0xacf8ce[_0xd67764(0x1c9)]=-0x1]=_0xd67764(0x1c9),_0xacf8ce))(_0x447af1||{});const _0x36926e=_0x4a96ec=>_0x533e70['dayjs'](new Date(+_0x4a96ec))['format'](_0xd67764(0x1b4)),_0xa1bb66=async(_0x5a0b69,_0x5c34f8)=>{const _0x26b86d=_0xd67764,_0x23c5ff=_0x5a0b69[_0x26b86d(0x1e4)](_0x533e70[_0x26b86d(0x1c5)]),_0x5ac5d9=_0x5a0b69[_0x26b86d(0x1e4)](_0x457d43['HTTPService']);_0x5c34f8['forEach'](_0x5508a7=>{const _0x5bd936=_0x26b86d;_0x23c5ff[_0x5bd936(0x1a7)](_0x5508a7)&&_0x5c34f8[_0x5bd936(0x1b0)](_0x5508a7);}),_0x5c34f8['size']&&(await _0x5ac5d9[_0x26b86d(0x1e4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c34f8]}}))[_0x26b86d(0x1ae)]['users'][_0x26b86d(0x1a9)](_0x1c6d5b=>{const _0x37ad39=_0x26b86d;_0x1c6d5b&&_0x23c5ff[_0x37ad39(0x177)](_0x1c6d5b);});};var _0x363d00=Object[_0xd67764(0x178)],_0x1965bd=(_0x9a3bd0,_0x6fb14a,_0xa98c8e,_0x47ae64)=>{for(var _0x5173cf=_0x47ae64>0x1?void 0x0:_0x47ae64?_0x363d00(_0x6fb14a,_0xa98c8e):_0x6fb14a,_0x44ef59=_0x9a3bd0['length']-0x1,_0x1ea466;_0x44ef59>=0x0;_0x44ef59--)(_0x1ea466=_0x9a3bd0[_0x44ef59])&&(_0x5173cf=_0x1ea466(_0x5173cf)||_0x5173cf);return _0x5173cf;},_0xc19667=(_0x34cb81,_0x48c081)=>(_0x7025ca,_0xc7fbdb)=>_0x48c081(_0x7025ca,_0xc7fbdb,_0x34cb81);let _0x8f3511=class extends _0x533e70[_0xd67764(0x1b1)]{constructor(_0x41e5aa,_0x34828c,_0x544c69,_0x46ecbf){const _0x5a51b2=_0xd67764;super(),this[_0x5a51b2(0x1ba)]=_0x41e5aa,this[_0x5a51b2(0x1ac)]=_0x34828c,this[_0x5a51b2(0x1e7)]=_0x544c69,this['_injector']=_0x46ecbf,this[_0x5a51b2(0x1f5)](),this[_0x5a51b2(0x1e0)]();}['_initUserSync'](){const _0x2a1466=_0xd67764;this[_0x2a1466(0x1aa)](this[_0x2a1466(0x1ac)][_0x2a1466(0x17e)][_0x2a1466(0x184)](_0x363ffb[_0x2a1466(0x18e)](0x10))[_0x2a1466(0x1cd)](_0x4087ce=>{const _0x60c112=_0x2a1466,_0x41f083=new Set();_0x4087ce[_0x60c112(0x1a9)](_0x4f18b0=>{const _0x266f64=_0x60c112;switch(_0x4f18b0[_0x266f64(0x17c)]){case _0x266f64(0x1ec):{const _0x1eb637=_0x4f18b0[_0x266f64(0x1f8)][_0x266f64(0x1a1)];_0x41f083[_0x266f64(0x1ec)](_0x1eb637);break;}}}),_0xa1bb66(this[_0x60c112(0x19d)],_0x41f083);}));}[_0xd67764(0x1f5)](){const _0x3468b0=_0xd67764;this[_0x3468b0(0x1aa)](this['_commentService'][_0x3468b0(0x17e)][_0x3468b0(0x1cd)](async _0x3bf02c=>{const _0x45649f=_0x3468b0;var _0x130acf,_0x37f5c5,_0x5886ba,_0xfc4603;const _0x5f1ed9=(_0x130acf=this['_threadCommentModel'][_0x45649f(0x191)](_0x3bf02c[_0x45649f(0x193)])[_0x45649f(0x1fc)](_0x2773e0=>_0x2773e0[_0x45649f(0x199)]===_0x3bf02c['threadId']))==null?void 0x0:_0x130acf[_0x45649f(0x1d2)];if(!_0x5f1ed9)return;const {unitId:_0x4642a0,subUnitId:_0x3ae869}=_0x5f1ed9;switch(_0x3bf02c[_0x45649f(0x18b)]&&this['_userService'][_0x45649f(0x177)](_0x3bf02c[_0x45649f(0x18b)]),_0x3bf02c[_0x45649f(0x17c)]){case _0x447af1[_0x45649f(0x19f)]:break;case _0x447af1[_0x45649f(0x1eb)]:{this[_0x45649f(0x1ac)][_0x45649f(0x1c0)](_0x4642a0,_0x3ae869,{'unitId':_0x4642a0,'subUnitId':_0x3ae869,'ref':'','id':_0x3bf02c['replyId'],'dT':_0x36926e(+_0x3bf02c[_0x45649f(0x192)]),'threadId':_0x3bf02c[_0x45649f(0x199)],'personId':(_0x5886ba=(_0x37f5c5=_0x3bf02c[_0x45649f(0x18b)])==null?void 0x0:_0x37f5c5[_0x45649f(0x1ed)])!=null?_0x5886ba:_0x3bf02c[_0x45649f(0x1a6)],'text':JSON['parse'](_0x3bf02c['content']),'parentId':_0x5f1ed9['id']});break;}case _0x447af1[_0x45649f(0x179)]:{const _0x167d79=this[_0x45649f(0x1ac)][_0x45649f(0x180)](_0x4642a0,_0x3ae869,_0x3bf02c[_0x45649f(0x1df)]);_0x167d79&&_0x167d79[_0x45649f(0x1f2)]&&this[_0x45649f(0x1ac)][_0x45649f(0x18f)](_0x4642a0,_0x3ae869,_0x3bf02c[_0x45649f(0x1df)]);break;}case _0x447af1[_0x45649f(0x1a5)]:{this[_0x45649f(0x1ac)][_0x45649f(0x1bb)](_0x4642a0,_0x3ae869,{'commentId':_0x3bf02c['replyId'],'text':JSON[_0x45649f(0x1d3)](_0x3bf02c[_0x45649f(0x1dc)])});break;}case _0x447af1['Solve']:{const _0x24b78b=(_0xfc4603=this['_threadCommentModel']['getUnit'](_0x3bf02c[_0x45649f(0x193)])[_0x45649f(0x1fc)](_0x186c65=>_0x186c65[_0x45649f(0x199)]===_0x3bf02c[_0x45649f(0x199)]))==null?void 0x0:_0xfc4603[_0x45649f(0x1d2)];_0x24b78b&&this[_0x45649f(0x1ac)][_0x45649f(0x1db)](_0x4642a0,_0x3ae869,_0x24b78b['id'],_0x3bf02c[_0x45649f(0x198)]===_0x3c522a[_0x45649f(0x1d0)]);break;}}}));}};_0x8f3511=_0x1965bd([_0xc19667(0x0,_0x533e70['Inject'](_0x3871da[_0xd67764(0x1d7)])),_0xc19667(0x1,_0x533e70[_0xd67764(0x1ee)](_0x3ce02e['ThreadCommentModel'])),_0xc19667(0x2,_0x533e70[_0xd67764(0x1ee)](_0x533e70[_0xd67764(0x1c5)])),_0xc19667(0x3,_0x533e70[_0xd67764(0x1ee)](_0x533e70['Injector']))],_0x8f3511);const _0x36b3b0='thread-comment-data-source.config',_0x4d9c69={};var _0x2bd032=Object[_0xd67764(0x178)],_0x3efbd8=(_0x1eb7f0,_0x3427ce,_0x588bb3,_0x16ed3f)=>{for(var _0x5315b6=_0x16ed3f>0x1?void 0x0:_0x16ed3f?_0x2bd032(_0x3427ce,_0x588bb3):_0x3427ce,_0x40605a=_0x1eb7f0['length']-0x1,_0x189777;_0x40605a>=0x0;_0x40605a--)(_0x189777=_0x1eb7f0[_0x40605a])&&(_0x5315b6=_0x189777(_0x5315b6)||_0x5315b6);return _0x5315b6;},_0x4ff84b=(_0x2e0d24,_0x230135)=>(_0x4bf249,_0x419074)=>_0x230135(_0x4bf249,_0x419074,_0x2e0d24);function _0x145529(_0x32cb57,_0x26cda5){const _0xbb4276=_0xd67764,_0x50fa2e=_0x32cb57[_0xbb4276(0x1c2)][0x0];return{..._0x26cda5,'id':_0x50fa2e[_0xbb4276(0x1df)],'resolved':_0x32cb57[_0xbb4276(0x198)]===0x1,'dT':_0x36926e(_0x50fa2e[_0xbb4276(0x192)]),'personId':_0x50fa2e['userId'],'threadId':_0x50fa2e[_0xbb4276(0x199)]};}function _0x35ea8c(_0x4dde6e,_0x29a0ff,_0x447ae){const _0x16e1a2=_0xd67764;var _0x4e7aac,_0x47d0fd;if(((_0x47d0fd=(_0x4e7aac=_0x4dde6e==null?void 0x0:_0x4dde6e['replies'])==null?void 0x0:_0x4e7aac['length'])!=null?_0x47d0fd:0x0)>0x0){const _0x544a18=(_0x3ca6ba,_0x543b9e)=>({'id':_0x3ca6ba[_0x16e1a2(0x1df)],'threadId':_0x3ca6ba[_0x16e1a2(0x199)],'dT':_0x36926e(_0x3ca6ba[_0x16e1a2(0x192)]),'personId':_0x3ca6ba[_0x16e1a2(0x1a6)],'resolved':_0x4dde6e[_0x16e1a2(0x198)]===_0x3c522a[_0x16e1a2(0x1d0)],'unitId':_0x29a0ff,'subUnitId':_0x447ae,'text':JSON[_0x16e1a2(0x1d3)](_0x3ca6ba[_0x16e1a2(0x1dc)]),'parentId':_0x543b9e}),_0x11b197=_0x544a18(_0x4dde6e[_0x16e1a2(0x1c2)][0x0]);return{..._0x11b197,'children':_0x4dde6e['replies'][_0x16e1a2(0x1bd)](0x1)[_0x16e1a2(0x17d)](_0x5945e2=>_0x544a18(_0x5945e2,_0x11b197['id']))};}return null;}let _0x407eca=class{constructor(_0x4d87ec,_0x9e6a15,_0x52ecaf,_0x55ba50){const _0x12c01d=_0xd67764;this[_0x12c01d(0x1d1)]=_0x4d87ec,this[_0x12c01d(0x1e7)]=_0x9e6a15,this[_0x12c01d(0x175)]=_0x52ecaf,this[_0x12c01d(0x19d)]=_0x55ba50;}async['addComment'](_0x4e9d0e){const _0x3a8471=_0xd67764;var _0x462d73,_0x1ad62d;const {parentId:_0x216302,unitId:_0x53aca3,text:_0x25479f,threadId:_0x5df593}=_0x4e9d0e,_0x1de09=(_0x1ad62d=(_0x462d73=_0x25479f[_0x3a8471(0x1ab)])==null?void 0x0:_0x462d73[_0x3a8471(0x1b9)](_0x4ab3d0=>_0x4ab3d0[_0x3a8471(0x1e3)]===_0x533e70[_0x3a8471(0x19b)][_0x3a8471(0x1de)])[_0x3a8471(0x17d)](_0x3bd196=>_0x3bd196[_0x3a8471(0x1a4)]))!=null?_0x1ad62d:[],_0x21e251=JSON['stringify'](_0x25479f),_0xb4dd94=(await this[_0x3a8471(0x175)]['requireSession'](_0x53aca3))['getMemberID']();if(_0x216302){const _0x3f81af={'memberId':_0xb4dd94,'unitId':_0x53aca3,'content':_0x21e251,'mention':_0x1de09,'threadId':_0x5df593},_0x590108=(await this['_httpService'][_0x3a8471(0x1c1)](_0x3a8471(0x1a3)+_0x53aca3+_0x3a8471(0x18c),{'body':_0x3f81af}))[_0x3a8471(0x1ae)][_0x3a8471(0x1e9)];return{..._0x4e9d0e,'id':_0x590108['replyId'],'dT':_0x533e70[_0x3a8471(0x181)](+_0x590108[_0x3a8471(0x192)])['format'](_0x3a8471(0x1b4)),'personId':_0x590108[_0x3a8471(0x1a6)]};}else{const _0x241094={'memberId':_0xb4dd94,'unitId':_0x53aca3,'content':_0x21e251,'mention':_0x1de09},_0xc27d9b=await this[_0x3a8471(0x1d1)][_0x3a8471(0x1c1)](_0x3a8471(0x1a3)+_0x53aca3+_0x3a8471(0x1f4),{'body':_0x241094});return _0x145529(_0xc27d9b[_0x3a8471(0x1ae)]['comment'],_0x4e9d0e);}}async[_0xd67764(0x1bb)](_0x16baec){const _0x4a0be9=_0xd67764;var _0x545ba7,_0x1aff1d;const {text:_0x2e55eb,unitId:_0x4d4372}=_0x16baec,_0x3be248=(_0x1aff1d=(_0x545ba7=_0x2e55eb[_0x4a0be9(0x1ab)])==null?void 0x0:_0x545ba7[_0x4a0be9(0x1b9)](_0x49b258=>_0x49b258[_0x4a0be9(0x1e3)]===_0x533e70[_0x4a0be9(0x19b)][_0x4a0be9(0x1de)])[_0x4a0be9(0x17d)](_0x1dc274=>_0x1dc274[_0x4a0be9(0x1a4)]))!=null?_0x1aff1d:[],_0x1118d8=JSON[_0x4a0be9(0x1b3)](_0x2e55eb),_0xf70581=_0x16baec[_0x4a0be9(0x199)],_0x5a0348=_0x16baec['id'],_0x1e721d={'memberId':(await this[_0x4a0be9(0x175)]['requireSession'](_0x4d4372))[_0x4a0be9(0x1d9)](),'unitId':_0x4d4372,'threadId':_0xf70581,'mention':_0x3be248,'content':_0x1118d8,'replyId':_0x5a0348},_0x3b2790=await this[_0x4a0be9(0x1d1)][_0x4a0be9(0x1c1)](_0x4a0be9(0x1a3)+_0x4d4372+_0x4a0be9(0x1ad),{'body':_0x1e721d});return!_0x3b2790[_0x4a0be9(0x1ae)][_0x4a0be9(0x1c6)]||_0x3b2790['body'][_0x4a0be9(0x1c6)][_0x4a0be9(0x1e5)]===0x1;}async[_0xd67764(0x1db)](_0x697dd){const _0xb78577=_0xd67764,{unitId:_0x16e60c}=_0x697dd,_0x1f4d1d=_0x697dd[_0xb78577(0x199)],_0xdf6f5a={'memberId':this[_0xb78577(0x1e7)]['getCurrentUser']()[_0xb78577(0x1ed)],'unitId':_0x16e60c,'threadId':_0x1f4d1d,'solved':_0x697dd['resolved']?_0x3c522a['Solved']:_0x3c522a[_0xb78577(0x1af)]},_0x2428b5=await this[_0xb78577(0x1d1)][_0xb78577(0x1c1)](_0xb78577(0x1a3)+_0x16e60c+_0xb78577(0x187),{'body':_0xdf6f5a});return!_0x2428b5[_0xb78577(0x1ae)][_0xb78577(0x1c6)]||_0x2428b5[_0xb78577(0x1ae)]['error'][_0xb78577(0x1e5)]===0x1;}async[_0xd67764(0x18f)](_0x359ccc,_0x174396,_0x1b6f81,_0x2eedfc){const _0x50ce3f=_0xd67764,_0x9beb9d={'memberId':(await this['_sessionService'][_0x50ce3f(0x18d)](_0x359ccc))[_0x50ce3f(0x1d9)](),'threadId':_0x1b6f81,'replyId':_0x2eedfc,'unitId':_0x359ccc},_0x4d764f=await this[_0x50ce3f(0x1d1)]['post']('/universer-api/comment/unit/'+_0x359ccc+'/delete',{'body':_0x9beb9d});return!_0x4d764f[_0x50ce3f(0x1ae)][_0x50ce3f(0x1c6)]||_0x4d764f[_0x50ce3f(0x1ae)][_0x50ce3f(0x1c6)]['code']===0x1;}async[_0xd67764(0x1f7)](_0x31682f,_0x2d133f,_0x44768c){const _0x127e88=_0xd67764,_0x51817c={'unitId':_0x31682f,'threadId':_0x44768c},_0x3638d8=await this[_0x127e88(0x1d1)][_0x127e88(0x1c1)](_0x127e88(0x1a3)+_0x31682f+_0x127e88(0x1f0),{'body':_0x51817c}),_0x12e74d=_0x44768c[_0x127e88(0x17d)](_0x5bcf3b=>_0x35ea8c(_0x3638d8['body'][_0x127e88(0x1d4)][_0x5bcf3b],_0x31682f,_0x2d133f))[_0x127e88(0x1b9)](Boolean);return Object[_0x127e88(0x1f3)](_0x3638d8['body'][_0x127e88(0x1be)])[_0x127e88(0x1a9)](_0xb17755=>{const _0x1ed35d=_0x127e88;this[_0x1ed35d(0x1e7)]['addUser'](_0xb17755);}),_0x12e74d;}['saveCommentToSnapshot'](_0x4ccf30){const _0xc9a88=_0xd67764;return{'id':_0x4ccf30['id'],'threadId':_0x4ccf30[_0xc9a88(0x199)],'ref':_0x4ccf30[_0xc9a88(0x1ef)]};}};_0x407eca=_0x3efbd8([_0x4ff84b(0x0,_0x533e70[_0xd67764(0x1ee)](_0x457d43[_0xd67764(0x1b2)])),_0x4ff84b(0x1,_0x533e70['Inject'](_0x533e70[_0xd67764(0x1c5)])),_0x4ff84b(0x2,_0x533e70['Inject'](_0x3871da[_0xd67764(0x196)])),_0x4ff84b(0x3,_0x533e70['Inject'](_0x533e70[_0xd67764(0x185)]))],_0x407eca);var _0x28a2b6=Object[_0xd67764(0x178)],_0x2e3a05=(_0x68ee86,_0x465ff7,_0x3da224,_0x176324)=>{for(var _0x4ede24=_0x176324>0x1?void 0x0:_0x176324?_0x28a2b6(_0x465ff7,_0x3da224):_0x465ff7,_0xc629cd=_0x68ee86['length']-0x1,_0x3299e0;_0xc629cd>=0x0;_0xc629cd--)(_0x3299e0=_0x68ee86[_0xc629cd])&&(_0x4ede24=_0x3299e0(_0x4ede24)||_0x4ede24);return _0x4ede24;},_0x72a1ea=(_0x37468d,_0x147258)=>(_0x160e10,_0x29fb51)=>_0x147258(_0x160e10,_0x29fb51,_0x37468d);let _0x307b6a=class extends _0x533e70[_0xd67764(0x1b1)]{constructor(_0x2dd793,_0x4caca1){const _0x3f4cdf=_0xd67764;super(),this[_0x3f4cdf(0x1fb)]=_0x2dd793,this[_0x3f4cdf(0x1bf)]=_0x4caca1,this[_0x3f4cdf(0x1e2)]();}[_0xd67764(0x1e2)](){const _0x1d5e5a=_0xd67764;this[_0x1d5e5a(0x1fb)]['dataSource']=this[_0x1d5e5a(0x1bf)],this[_0x1d5e5a(0x1fb)][_0x1d5e5a(0x1b8)]=!0x1;}};_0x307b6a=_0x2e3a05([_0x72a1ea(0x0,_0x3ce02e[_0xd67764(0x1d8)]),_0x72a1ea(0x1,_0x533e70[_0xd67764(0x1ee)](_0x407eca))],_0x307b6a);var _0x1c3c13=Object[_0xd67764(0x1c8)],_0x17cd52=Object[_0xd67764(0x178)],_0x25ca65=(_0x4211fa,_0x48f40b,_0x4232f1)=>_0x48f40b in _0x4211fa?_0x1c3c13(_0x4211fa,_0x48f40b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4232f1}):_0x4211fa[_0x48f40b]=_0x4232f1,_0x4d5234=(_0x411fa9,_0x7ec6c,_0x20b3c8,_0x3d1bcc)=>{const _0x717cf4=_0xd67764;for(var _0x59f714=_0x3d1bcc>0x1?void 0x0:_0x3d1bcc?_0x17cd52(_0x7ec6c,_0x20b3c8):_0x7ec6c,_0x24988d=_0x411fa9[_0x717cf4(0x182)]-0x1,_0x3ba6cf;_0x24988d>=0x0;_0x24988d--)(_0x3ba6cf=_0x411fa9[_0x24988d])&&(_0x59f714=_0x3ba6cf(_0x59f714)||_0x59f714);return _0x59f714;},_0x1be6f4=(_0xdd7980,_0xe881bf)=>(_0x3e7f42,_0x49d6e5)=>_0xe881bf(_0x3e7f42,_0x49d6e5,_0xdd7980),_0x1bfb74=(_0x260e6e,_0x3145e7,_0x2876cf)=>_0x25ca65(_0x260e6e,typeof _0x3145e7!=_0xd67764(0x1ce)?_0x3145e7+'':_0x3145e7,_0x2876cf);_0x5a7c67[_0xd67764(0x1bc)]=class extends _0x533e70['Plugin']{constructor(_0x2f3352=_0x4d9c69,_0x41d564,_0x17f59c){const _0x4197c0=_0xd67764;super(),this[_0x4197c0(0x1c4)]=_0x2f3352,this[_0x4197c0(0x19d)]=_0x41d564,this[_0x4197c0(0x1f6)]=_0x17f59c;const {..._0x50cadc}=_0x533e70[_0x4197c0(0x18a)]({},_0x4d9c69,this[_0x4197c0(0x1c4)]);this[_0x4197c0(0x1f6)]['setConfig'](_0x36b3b0,_0x50cadc);}[_0xd67764(0x1da)](){const _0x5be3f2=_0xd67764;[[_0x407eca],[_0x307b6a],[_0x8f3511]][_0x5be3f2(0x1a9)](_0x40e62f=>{const _0x26c88d=_0x5be3f2;this[_0x26c88d(0x19d)][_0x26c88d(0x1ec)](_0x40e62f);});}['onReady'](){const _0x43d58f=_0xd67764;this[_0x43d58f(0x19d)][_0x43d58f(0x1e4)](_0x307b6a),this[_0x43d58f(0x19d)]['get'](_0x8f3511);}},_0x1bfb74(_0x5a7c67[_0xd67764(0x1bc)],'pluginName',_0x322963),_0x1bfb74(_0x5a7c67['UniverThreadCommentDataSourcePlugin'],_0xd67764(0x17c),_0x533e70[_0xd67764(0x1c7)][_0xd67764(0x197)]),_0x5a7c67['UniverThreadCommentDataSourcePlugin']=_0x4d5234([_0x533e70['DependentOn'](_0x2a2413[_0xd67764(0x1f9)],_0x3871da[_0xd67764(0x1b6)],_0x46729d[_0xd67764(0x1d5)]),_0x1be6f4(0x1,_0x533e70['Inject'](_0x533e70[_0xd67764(0x185)])),_0x1be6f4(0x2,_0x533e70[_0xd67764(0x19a)])],_0x5a7c67[_0xd67764(0x1bc)]),Object['defineProperty'](_0x5a7c67,Symbol[_0xd67764(0x188)],{'value':_0xd67764(0x1c3)});}));function _0x5c16(){const _0x49c782=['comments','UniverLicensePlugin','1496pPnidA','CommentService','IThreadCommentDataSourceService','getMemberID','onStarting','resolveComment','content','UniverNetwork','COMMENT','replyId','_initUserSync','@univerjs/network','_initDataSource','rangeType','get','code','@univerjs-pro/license','_userService','amd','reply','1ESvHtD','Reply','add','userID','Inject','ref','/list','160vEOGZC','parentId','values','/add','_init','_configService','listComments','payload','UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','_threadCommentDataSourceService','find','_sessionService','@univerjs/thread-comment-ui','addUser','getOwnPropertyDescriptor','Delete','object','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','map','commentUpdate$','970354jDfNcp','getComment','dayjs','length','UniverCore','pipe','Injector','Solve','/solved','toStringTag','36117fkrrOb','merge','user','/reply','requireSession','bufferTime','deleteComment','428060CHSyVL','getUnit','createTimestamp','unitId','689382VHfeIN','rxjs','CollaborationSessionService','UNIVER_UNKNOWN','solved','threadId','IConfigService','CustomRangeType','UniverProCollaborationClient','_injector','UniverProLicense','Add','70250vebvLD','personId','function','/universer-api/comment/unit/','rangeId','Edit','userId','getUser','@univerjs-pro/collaboration-client','forEach','disposeWithMe','customRanges','_threadCommentModel','/edit','body','OpenOrReOpen','delete','Disposable','HTTPService','stringify','YYYY/MM/DD\x20HH:mm','21430387nnDsHH','UniverCollaborationClientPlugin','@univerjs/thread-comment','syncUpdateMutationToColla','filter','_commentService','updateComment','UniverThreadCommentDataSourcePlugin','slice','users','_threadCommentDataSource','addComment','post','replies','Module','_config','UserManagerService','error','UniverInstanceType','defineProperty','UNRECOGNIZED','6CbWOWp','UniverThreadComment','1251441gsBtFq','subscribe','symbol','12LvXfLe','Solved','_httpService','root','parse'];_0x5c16=function(){return _0x49c782;};return _0x5c16();}
|
|
1
|
+
(function(_0x86a69a,_0x54fa86){const _0xd758f1=_0x1af2,_0x2e67b2=_0x86a69a();while(!![]){try{const _0x2e845e=-parseInt(_0xd758f1(0x1be))/0x1*(-parseInt(_0xd758f1(0x1b2))/0x2)+-parseInt(_0xd758f1(0x13c))/0x3*(parseInt(_0xd758f1(0x141))/0x4)+parseInt(_0xd758f1(0x17b))/0x5+parseInt(_0xd758f1(0x1ab))/0x6*(parseInt(_0xd758f1(0x184))/0x7)+-parseInt(_0xd758f1(0x149))/0x8*(-parseInt(_0xd758f1(0x154))/0x9)+-parseInt(_0xd758f1(0x1ad))/0xa+parseInt(_0xd758f1(0x1b8))/0xb*(-parseInt(_0xd758f1(0x1a9))/0xc);if(_0x2e845e===_0x54fa86)break;else _0x2e67b2['push'](_0x2e67b2['shift']());}catch(_0x96302){_0x2e67b2['push'](_0x2e67b2['shift']());}}}(_0x3c95,0xafeea),function(_0x505a51,_0x8476bf){const _0x152dd6=_0x1af2;typeof exports==_0x152dd6(0x178)&&typeof module<'u'?_0x8476bf(exports,require(_0x152dd6(0x176)),require(_0x152dd6(0x156)),require(_0x152dd6(0x19f)),require('@univerjs/thread-comment-ui'),require(_0x152dd6(0x151)),require(_0x152dd6(0x142)),require(_0x152dd6(0x1b3))):typeof define==_0x152dd6(0x1aa)&&define[_0x152dd6(0x169)]?define([_0x152dd6(0x157),_0x152dd6(0x176),_0x152dd6(0x156),'@univerjs/core','@univerjs/thread-comment-ui',_0x152dd6(0x151),_0x152dd6(0x142),'@univerjs/network'],_0x8476bf):(_0x505a51=typeof globalThis<'u'?globalThis:_0x505a51||self,_0x8476bf(_0x505a51[_0x152dd6(0x196)]={},_0x505a51[_0x152dd6(0x165)],_0x505a51['UniverProLicense'],_0x505a51[_0x152dd6(0x18d)],_0x505a51[_0x152dd6(0x198)],_0x505a51[_0x152dd6(0x1bb)],_0x505a51[_0x152dd6(0x142)],_0x505a51[_0x152dd6(0x19d)]));}(this,function(_0x54c443,_0x17f06f,_0x27b3c8,_0x5af020,_0x11abb0,_0x1affee,_0x47f407,_0x61f4b4){'use strict';const _0x2f3eb6=_0x1af2;const _0x53620e=_0x2f3eb6(0x143);var _0x18219b=(_0x4b914e=>(_0x4b914e[_0x4b914e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4b914e[_0x4b914e['Solved']=0x1]='Solved',_0x4b914e[_0x4b914e[_0x2f3eb6(0x13b)]=-0x1]='UNRECOGNIZED',_0x4b914e))(_0x18219b||{}),_0x357c5d=(_0x3f2f6d=>(_0x3f2f6d[_0x3f2f6d['Unknown']=0x0]=_0x2f3eb6(0x179),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x173)]=0x1]='Add',_0x3f2f6d[_0x3f2f6d['Reply']=0x2]=_0x2f3eb6(0x183),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x172)]=0x3]=_0x2f3eb6(0x172),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x192)]=0x4]=_0x2f3eb6(0x192),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x19b)]=0x5]='Solve',_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x13b)]=-0x1]=_0x2f3eb6(0x13b),_0x3f2f6d))(_0x357c5d||{});const _0x2ae6c5=_0x3d3c5d=>_0x5af020['dayjs'](new Date(+_0x3d3c5d))['format'](_0x2f3eb6(0x15b)),_0x15f18c=async(_0x37a68f,_0x567003)=>{const _0x5c13f2=_0x2f3eb6,_0x28b5a6=_0x37a68f[_0x5c13f2(0x180)](_0x5af020[_0x5c13f2(0x15d)]),_0x59617c=_0x37a68f[_0x5c13f2(0x180)](_0x61f4b4[_0x5c13f2(0x155)]);_0x567003[_0x5c13f2(0x1a6)](_0xcc07d1=>{_0x28b5a6['getUser'](_0xcc07d1)&&_0x567003['delete'](_0xcc07d1);}),_0x567003[_0x5c13f2(0x13e)]&&(await _0x59617c['get'](_0x5c13f2(0x193),{'params':{'userIDs':[..._0x567003]}}))[_0x5c13f2(0x174)][_0x5c13f2(0x1a3)][_0x5c13f2(0x1a6)](_0x29b9c1=>{const _0x9b6fb3=_0x5c13f2;_0x29b9c1&&_0x28b5a6[_0x9b6fb3(0x15e)](_0x29b9c1);});};var _0x9fdb87=Object[_0x2f3eb6(0x14b)],_0x4bee03=(_0x28c2c3,_0x2b4af5,_0x399b24,_0x467ace)=>{const _0x12247a=_0x2f3eb6;for(var _0x328404=_0x467ace>0x1?void 0x0:_0x467ace?_0x9fdb87(_0x2b4af5,_0x399b24):_0x2b4af5,_0xec4f86=_0x28c2c3[_0x12247a(0x189)]-0x1,_0x375a75;_0xec4f86>=0x0;_0xec4f86--)(_0x375a75=_0x28c2c3[_0xec4f86])&&(_0x328404=_0x375a75(_0x328404)||_0x328404);return _0x328404;},_0x5c13d6=(_0x2751a5,_0x4a3475)=>(_0xe79715,_0x518397)=>_0x4a3475(_0xe79715,_0x518397,_0x2751a5);let _0x303fa7=class extends _0x5af020[_0x2f3eb6(0x1a2)]{constructor(_0x3bc234,_0x26a5df,_0x339e36,_0x12d5f2){const _0x3f1054=_0x2f3eb6;super(),this['_commentService']=_0x3bc234,this[_0x3f1054(0x17e)]=_0x26a5df,this[_0x3f1054(0x194)]=_0x339e36,this['_injector']=_0x12d5f2,this[_0x3f1054(0x145)](),this['_initUserSync']();}[_0x2f3eb6(0x15a)](){const _0xb15f97=_0x2f3eb6;this[_0xb15f97(0x170)](this[_0xb15f97(0x17e)][_0xb15f97(0x160)][_0xb15f97(0x1a5)](_0x47f407['bufferTime'](0x10))[_0xb15f97(0x13f)](_0x1f6118=>{const _0x18805d=_0xb15f97,_0x49d58e=new Set();_0x1f6118[_0x18805d(0x1a6)](_0x4f9441=>{const _0x5a17e0=_0x18805d;switch(_0x4f9441[_0x5a17e0(0x1a4)]){case'add':{const _0x25c7d1=_0x4f9441[_0x5a17e0(0x188)]['personId'];_0x49d58e[_0x5a17e0(0x14c)](_0x25c7d1);break;}}}),_0x15f18c(this[_0x18805d(0x1a7)],_0x49d58e);}));}[_0x2f3eb6(0x145)](){const _0x5c6c83=_0x2f3eb6;this[_0x5c6c83(0x170)](this[_0x5c6c83(0x1c4)]['commentUpdate$'][_0x5c6c83(0x13f)](async _0x3c28cf=>{const _0x1e5f53=_0x5c6c83;var _0x3e5d47,_0x13c85d,_0xb4a3eb,_0xe6fd97;const _0x35cc20=(_0x3e5d47=this[_0x1e5f53(0x17e)]['getUnit'](_0x3c28cf[_0x1e5f53(0x1b1)])[_0x1e5f53(0x14d)](_0x4ddb5b=>_0x4ddb5b[_0x1e5f53(0x168)]===_0x3c28cf['threadId']))==null?void 0x0:_0x3e5d47[_0x1e5f53(0x18c)];if(!_0x35cc20)return;const {unitId:_0x3215f8,subUnitId:_0x29b39f}=_0x35cc20;switch(_0x3c28cf[_0x1e5f53(0x153)]&&this[_0x1e5f53(0x194)][_0x1e5f53(0x15e)](_0x3c28cf['user']),_0x3c28cf[_0x1e5f53(0x1a4)]){case _0x357c5d['Add']:break;case _0x357c5d['Reply']:{this['_threadCommentModel']['addComment'](_0x3215f8,_0x29b39f,{'unitId':_0x3215f8,'subUnitId':_0x29b39f,'ref':'','id':_0x3c28cf[_0x1e5f53(0x14a)],'dT':_0x2ae6c5(+_0x3c28cf['createTimestamp']),'threadId':_0x3c28cf['threadId'],'personId':(_0xb4a3eb=(_0x13c85d=_0x3c28cf[_0x1e5f53(0x153)])==null?void 0x0:_0x13c85d['userID'])!=null?_0xb4a3eb:_0x3c28cf[_0x1e5f53(0x1c1)],'text':JSON[_0x1e5f53(0x18e)](_0x3c28cf[_0x1e5f53(0x14e)]),'parentId':_0x35cc20['id']});break;}case _0x357c5d[_0x1e5f53(0x192)]:{const _0x26b8ab=this[_0x1e5f53(0x17e)][_0x1e5f53(0x150)](_0x3215f8,_0x29b39f,_0x3c28cf[_0x1e5f53(0x14a)]);_0x26b8ab&&_0x26b8ab[_0x1e5f53(0x1af)]&&this['_threadCommentModel']['deleteComment'](_0x3215f8,_0x29b39f,_0x3c28cf[_0x1e5f53(0x14a)]);break;}case _0x357c5d[_0x1e5f53(0x172)]:{this[_0x1e5f53(0x17e)][_0x1e5f53(0x15c)](_0x3215f8,_0x29b39f,{'commentId':_0x3c28cf[_0x1e5f53(0x14a)],'text':JSON[_0x1e5f53(0x18e)](_0x3c28cf['content'])});break;}case _0x357c5d[_0x1e5f53(0x19b)]:{const _0x3bca79=(_0xe6fd97=this['_threadCommentModel']['getUnit'](_0x3c28cf[_0x1e5f53(0x1b1)])[_0x1e5f53(0x14d)](_0x3c5507=>_0x3c5507['threadId']===_0x3c28cf['threadId']))==null?void 0x0:_0xe6fd97[_0x1e5f53(0x18c)];_0x3bca79&&this[_0x1e5f53(0x17e)][_0x1e5f53(0x1a1)](_0x3215f8,_0x29b39f,_0x3bca79['id'],_0x3c28cf[_0x1e5f53(0x1c0)]===_0x18219b[_0x1e5f53(0x16a)]);break;}}}));}};_0x303fa7=_0x4bee03([_0x5c13d6(0x0,_0x5af020[_0x2f3eb6(0x1b7)](_0x17f06f[_0x2f3eb6(0x1bf)])),_0x5c13d6(0x1,_0x5af020['Inject'](_0x1affee[_0x2f3eb6(0x167)])),_0x5c13d6(0x2,_0x5af020['Inject'](_0x5af020[_0x2f3eb6(0x15d)])),_0x5c13d6(0x3,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020['Injector']))],_0x303fa7);const _0x4ac308='thread-comment-data-source.config',_0x7f1c54={};var _0x418b8a=Object[_0x2f3eb6(0x14b)],_0x3d504d=(_0x5588b3,_0x378f53,_0x4abcf9,_0x5d609b)=>{const _0xfa7a06=_0x2f3eb6;for(var _0x398e2d=_0x5d609b>0x1?void 0x0:_0x5d609b?_0x418b8a(_0x378f53,_0x4abcf9):_0x378f53,_0x2b2e9e=_0x5588b3[_0xfa7a06(0x189)]-0x1,_0x17837d;_0x2b2e9e>=0x0;_0x2b2e9e--)(_0x17837d=_0x5588b3[_0x2b2e9e])&&(_0x398e2d=_0x17837d(_0x398e2d)||_0x398e2d);return _0x398e2d;},_0x14cfd5=(_0x1fa72c,_0x42d076)=>(_0x55529f,_0x1988b3)=>_0x42d076(_0x55529f,_0x1988b3,_0x1fa72c);function _0x4666b2(_0x2cab68,_0x1a1c67){const _0x2bc2a5=_0x2f3eb6,_0x489f44=_0x2cab68[_0x2bc2a5(0x175)][0x0];return{..._0x1a1c67,'id':_0x489f44[_0x2bc2a5(0x14a)],'resolved':_0x2cab68[_0x2bc2a5(0x1c0)]===0x1,'dT':_0x2ae6c5(_0x489f44[_0x2bc2a5(0x19a)]),'personId':_0x489f44[_0x2bc2a5(0x1c1)],'threadId':_0x489f44['threadId']};}function _0xbd3c07(_0x17d9dc,_0x2fa7eb,_0x28535d){const _0x4f1fae=_0x2f3eb6;var _0x1847e7,_0x16ada5;if(((_0x16ada5=(_0x1847e7=_0x17d9dc==null?void 0x0:_0x17d9dc[_0x4f1fae(0x175)])==null?void 0x0:_0x1847e7[_0x4f1fae(0x189)])!=null?_0x16ada5:0x0)>0x0){const _0x233fd4=(_0x4b58bf,_0x2c5df1)=>({'id':_0x4b58bf[_0x4f1fae(0x14a)],'threadId':_0x4b58bf[_0x4f1fae(0x168)],'dT':_0x2ae6c5(_0x4b58bf[_0x4f1fae(0x19a)]),'personId':_0x4b58bf[_0x4f1fae(0x1c1)],'resolved':_0x17d9dc[_0x4f1fae(0x1c0)]===_0x18219b[_0x4f1fae(0x16a)],'unitId':_0x2fa7eb,'subUnitId':_0x28535d,'text':JSON[_0x4f1fae(0x18e)](_0x4b58bf[_0x4f1fae(0x14e)]),'parentId':_0x2c5df1}),_0x4ab9f6=_0x233fd4(_0x17d9dc[_0x4f1fae(0x175)][0x0]);return{..._0x4ab9f6,'children':_0x17d9dc[_0x4f1fae(0x175)]['slice'](0x1)['map'](_0x2133fb=>_0x233fd4(_0x2133fb,_0x4ab9f6['id']))};}return null;}let _0x733606=class{constructor(_0x428051,_0x3a187a,_0x3ba0fe,_0x569fe6){const _0x3e5d36=_0x2f3eb6;this[_0x3e5d36(0x1b9)]=_0x428051,this[_0x3e5d36(0x194)]=_0x3a187a,this[_0x3e5d36(0x147)]=_0x3ba0fe,this[_0x3e5d36(0x1a7)]=_0x569fe6;}async[_0x2f3eb6(0x148)](_0x393736){const _0x3422b3=_0x2f3eb6;var _0x583522,_0x32b3ae;const {parentId:_0x39eb93,unitId:_0x4ee73d,text:_0x1d508e,threadId:_0x27b866}=_0x393736,_0x11767b=(_0x32b3ae=(_0x583522=_0x1d508e[_0x3422b3(0x146)])==null?void 0x0:_0x583522[_0x3422b3(0x195)](_0x336fae=>_0x336fae[_0x3422b3(0x1b6)]===_0x5af020[_0x3422b3(0x161)]['COMMENT'])[_0x3422b3(0x1ae)](_0x3de5b3=>_0x3de5b3['rangeId']))!=null?_0x32b3ae:[],_0x4c76e3=JSON[_0x3422b3(0x166)](_0x1d508e),_0x5d8ce0=(await this[_0x3422b3(0x147)][_0x3422b3(0x1ac)](_0x4ee73d))[_0x3422b3(0x1c2)]();if(_0x39eb93){const _0x56f8ba={'memberId':_0x5d8ce0,'unitId':_0x4ee73d,'content':_0x4c76e3,'mention':_0x11767b,'threadId':_0x27b866},_0x54e048=(await this[_0x3422b3(0x1b9)]['post'](_0x3422b3(0x18f)+_0x4ee73d+_0x3422b3(0x16e),{'body':_0x56f8ba}))[_0x3422b3(0x174)]['reply'];return{..._0x393736,'id':_0x54e048[_0x3422b3(0x14a)],'dT':_0x5af020[_0x3422b3(0x13a)](+_0x54e048[_0x3422b3(0x19a)])['format'](_0x3422b3(0x15b)),'personId':_0x54e048[_0x3422b3(0x1c1)]};}else{const _0x38b7da={'memberId':_0x5d8ce0,'unitId':_0x4ee73d,'content':_0x4c76e3,'mention':_0x11767b},_0x17ba61=await this[_0x3422b3(0x1b9)][_0x3422b3(0x187)](_0x3422b3(0x18f)+_0x4ee73d+_0x3422b3(0x171),{'body':_0x38b7da});return _0x4666b2(_0x17ba61[_0x3422b3(0x174)][_0x3422b3(0x17f)],_0x393736);}}async[_0x2f3eb6(0x15c)](_0x3259b7){const _0x1443ab=_0x2f3eb6;var _0x480695,_0x414cf5;const {text:_0x460ead,unitId:_0x2db669}=_0x3259b7,_0x36fdc1=(_0x414cf5=(_0x480695=_0x460ead['customRanges'])==null?void 0x0:_0x480695[_0x1443ab(0x195)](_0x2bff2f=>_0x2bff2f[_0x1443ab(0x1b6)]===_0x5af020[_0x1443ab(0x161)][_0x1443ab(0x1a8)])['map'](_0x1e9216=>_0x1e9216[_0x1443ab(0x1a0)]))!=null?_0x414cf5:[],_0x1cbd26=JSON[_0x1443ab(0x166)](_0x460ead),_0x364c34=_0x3259b7[_0x1443ab(0x168)],_0x5c2550=_0x3259b7['id'],_0x2456ce={'memberId':(await this[_0x1443ab(0x147)][_0x1443ab(0x1ac)](_0x2db669))[_0x1443ab(0x1c2)](),'unitId':_0x2db669,'threadId':_0x364c34,'mention':_0x36fdc1,'content':_0x1cbd26,'replyId':_0x5c2550},_0x362404=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2db669+_0x1443ab(0x15f),{'body':_0x2456ce});return!_0x362404['body'][_0x1443ab(0x16f)]||_0x362404[_0x1443ab(0x174)]['error']['code']===0x1;}async[_0x2f3eb6(0x1a1)](_0x50906f){const _0x420b2b=_0x2f3eb6,{unitId:_0x2dbb40}=_0x50906f,_0x51f0fa=_0x50906f[_0x420b2b(0x168)],_0x496287={'memberId':this[_0x420b2b(0x194)][_0x420b2b(0x181)]()['userID'],'unitId':_0x2dbb40,'threadId':_0x51f0fa,'solved':_0x50906f[_0x420b2b(0x1bd)]?_0x18219b[_0x420b2b(0x16a)]:_0x18219b[_0x420b2b(0x16c)]},_0x12cf14=await this[_0x420b2b(0x1b9)][_0x420b2b(0x187)](_0x420b2b(0x18f)+_0x2dbb40+_0x420b2b(0x1ba),{'body':_0x496287});return!_0x12cf14[_0x420b2b(0x174)][_0x420b2b(0x16f)]||_0x12cf14[_0x420b2b(0x174)][_0x420b2b(0x16f)][_0x420b2b(0x1b0)]===0x1;}async[_0x2f3eb6(0x186)](_0x553d61,_0x4700b3,_0x20d3bb,_0x52bd82){const _0x14934a=_0x2f3eb6,_0x205875={'memberId':(await this[_0x14934a(0x147)][_0x14934a(0x1ac)](_0x553d61))[_0x14934a(0x1c2)](),'threadId':_0x20d3bb,'replyId':_0x52bd82,'unitId':_0x553d61},_0x48f0a2=await this[_0x14934a(0x1b9)][_0x14934a(0x187)](_0x14934a(0x18f)+_0x553d61+_0x14934a(0x152),{'body':_0x205875});return!_0x48f0a2[_0x14934a(0x174)]['error']||_0x48f0a2[_0x14934a(0x174)][_0x14934a(0x16f)][_0x14934a(0x1b0)]===0x1;}async[_0x2f3eb6(0x1b5)](_0x621d7c,_0x3bb61c,_0x3dc855){const _0x925dc0=_0x2f3eb6,_0xc9ec5d={'unitId':_0x621d7c,'threadId':_0x3dc855},_0x4cf06c=await this[_0x925dc0(0x1b9)][_0x925dc0(0x187)](_0x925dc0(0x18f)+_0x621d7c+_0x925dc0(0x1c3),{'body':_0xc9ec5d}),_0x4dc681=_0x3dc855[_0x925dc0(0x1ae)](_0x2b0b1e=>_0xbd3c07(_0x4cf06c['body'][_0x925dc0(0x16d)][_0x2b0b1e],_0x621d7c,_0x3bb61c))['filter'](Boolean);return Object['values'](_0x4cf06c[_0x925dc0(0x174)][_0x925dc0(0x1a3)])[_0x925dc0(0x1a6)](_0x14ce9e=>{const _0x2c3a39=_0x925dc0;this[_0x2c3a39(0x194)]['addUser'](_0x14ce9e);}),_0x4dc681;}[_0x2f3eb6(0x18a)](_0x50206d){const _0x434267=_0x2f3eb6;return{'id':_0x50206d['id'],'threadId':_0x50206d[_0x434267(0x168)],'ref':_0x50206d[_0x434267(0x1bc)]};}};_0x733606=_0x3d504d([_0x14cfd5(0x0,_0x5af020[_0x2f3eb6(0x1b7)](_0x61f4b4[_0x2f3eb6(0x155)])),_0x14cfd5(0x1,_0x5af020['Inject'](_0x5af020[_0x2f3eb6(0x15d)])),_0x14cfd5(0x2,_0x5af020[_0x2f3eb6(0x1b7)](_0x17f06f[_0x2f3eb6(0x18b)])),_0x14cfd5(0x3,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020[_0x2f3eb6(0x190)]))],_0x733606);var _0x497c40=Object[_0x2f3eb6(0x14b)],_0x683968=(_0x2d99c2,_0x36986f,_0xf3d3a5,_0x39d79b)=>{const _0x276060=_0x2f3eb6;for(var _0x5d01c2=_0x39d79b>0x1?void 0x0:_0x39d79b?_0x497c40(_0x36986f,_0xf3d3a5):_0x36986f,_0x1dd166=_0x2d99c2[_0x276060(0x189)]-0x1,_0x2f1b7a;_0x1dd166>=0x0;_0x1dd166--)(_0x2f1b7a=_0x2d99c2[_0x1dd166])&&(_0x5d01c2=_0x2f1b7a(_0x5d01c2)||_0x5d01c2);return _0x5d01c2;},_0x1b7c4b=(_0x3b9906,_0x7be051)=>(_0x40b810,_0x181976)=>_0x7be051(_0x40b810,_0x181976,_0x3b9906);let _0xbab93=class extends _0x5af020[_0x2f3eb6(0x1a2)]{constructor(_0x5879b2,_0x2fc1c4){const _0x136330=_0x2f3eb6;super(),this['_threadCommentDataSourceService']=_0x5879b2,this[_0x136330(0x14f)]=_0x2fc1c4,this['_initDataSource']();}['_initDataSource'](){const _0x82d559=_0x2f3eb6;this['_threadCommentDataSourceService'][_0x82d559(0x162)]=this['_threadCommentDataSource'],this[_0x82d559(0x1b4)][_0x82d559(0x159)]=!0x1;}};_0xbab93=_0x683968([_0x1b7c4b(0x0,_0x1affee[_0x2f3eb6(0x199)]),_0x1b7c4b(0x1,_0x5af020[_0x2f3eb6(0x1b7)](_0x733606))],_0xbab93);var _0x3d53df=Object[_0x2f3eb6(0x197)],_0x51d39b=Object['getOwnPropertyDescriptor'],_0x51ac15=(_0x20daed,_0x548536,_0x277fd4)=>_0x548536 in _0x20daed?_0x3d53df(_0x20daed,_0x548536,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x277fd4}):_0x20daed[_0x548536]=_0x277fd4,_0x2f3f38=(_0x15a4c0,_0x545e0e,_0x5b00f1,_0x265b23)=>{const _0x3a5cdf=_0x2f3eb6;for(var _0x3fdb95=_0x265b23>0x1?void 0x0:_0x265b23?_0x51d39b(_0x545e0e,_0x5b00f1):_0x545e0e,_0x1b835a=_0x15a4c0[_0x3a5cdf(0x189)]-0x1,_0x5b0e58;_0x1b835a>=0x0;_0x1b835a--)(_0x5b0e58=_0x15a4c0[_0x1b835a])&&(_0x3fdb95=_0x5b0e58(_0x3fdb95)||_0x3fdb95);return _0x3fdb95;},_0x21605c=(_0x5107a8,_0xa7e4d5)=>(_0x204fd5,_0x101a83)=>_0xa7e4d5(_0x204fd5,_0x101a83,_0x5107a8),_0x4222c3=(_0x12698f,_0x407daa,_0x1e31b4)=>_0x51ac15(_0x12698f,typeof _0x407daa!='symbol'?_0x407daa+'':_0x407daa,_0x1e31b4);_0x54c443['UniverThreadCommentDataSourcePlugin']=class extends _0x5af020[_0x2f3eb6(0x17d)]{constructor(_0x4ba840=_0x7f1c54,_0x385eed,_0x48e800){const _0x1c93b6=_0x2f3eb6;super(),this[_0x1c93b6(0x164)]=_0x4ba840,this[_0x1c93b6(0x1a7)]=_0x385eed,this[_0x1c93b6(0x163)]=_0x48e800;const {..._0x417ed5}=_0x5af020[_0x1c93b6(0x185)]({},_0x7f1c54,this[_0x1c93b6(0x164)]);this['_configService'][_0x1c93b6(0x177)](_0x4ac308,_0x417ed5);}['onStarting'](){const _0x54fffc=_0x2f3eb6;[[_0x733606],[_0xbab93],[_0x303fa7]][_0x54fffc(0x1a6)](_0x4a81aa=>{const _0x494567=_0x54fffc;this['_injector'][_0x494567(0x14c)](_0x4a81aa);});}['onReady'](){const _0x1964f8=_0x2f3eb6;this[_0x1964f8(0x1a7)][_0x1964f8(0x180)](_0xbab93),this[_0x1964f8(0x1a7)][_0x1964f8(0x180)](_0x303fa7);}},_0x4222c3(_0x54c443['UniverThreadCommentDataSourcePlugin'],_0x2f3eb6(0x158),_0x53620e),_0x4222c3(_0x54c443['UniverThreadCommentDataSourcePlugin'],_0x2f3eb6(0x1a4),_0x5af020[_0x2f3eb6(0x19c)][_0x2f3eb6(0x17a)]),_0x54c443[_0x2f3eb6(0x16b)]=_0x2f3f38([_0x5af020[_0x2f3eb6(0x17c)](_0x11abb0[_0x2f3eb6(0x140)],_0x17f06f[_0x2f3eb6(0x13d)],_0x27b3c8[_0x2f3eb6(0x182)]),_0x21605c(0x1,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020[_0x2f3eb6(0x190)])),_0x21605c(0x2,_0x5af020[_0x2f3eb6(0x144)])],_0x54c443['UniverThreadCommentDataSourcePlugin']),Object[_0x2f3eb6(0x197)](_0x54c443,Symbol[_0x2f3eb6(0x191)],{'value':_0x2f3eb6(0x19e)});}));function _0x1af2(_0x66b7f5,_0x4fbe28){const _0x3c95af=_0x3c95();return _0x1af2=function(_0x1af2d3,_0x2609f8){_0x1af2d3=_0x1af2d3-0x13a;let _0x9f0ace=_0x3c95af[_0x1af2d3];return _0x9f0ace;},_0x1af2(_0x66b7f5,_0x4fbe28);}function _0x3c95(){const _0xd91313=['stringify','ThreadCommentModel','threadId','amd','Solved','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','comments','/reply','error','disposeWithMe','/add','Edit','Add','body','replies','@univerjs-pro/collaboration-client','setConfig','object','Unknown','UNIVER_UNKNOWN','4570675yVyIoJ','DependentOn','Plugin','_threadCommentModel','comment','get','getCurrentUser','UniverLicensePlugin','Reply','234899lfsyZi','merge','deleteComment','post','payload','length','saveCommentToSnapshot','CollaborationSessionService','root','UniverCore','parse','/universer-api/comment/unit/','Injector','toStringTag','Delete','/universer-api/user/list','_userService','filter','UniverProThreadCommentDatasource','defineProperty','UniverThreadCommentUi','IThreadCommentDataSourceService','createTimestamp','Solve','UniverInstanceType','UniverNetwork','Module','@univerjs/core','rangeId','resolveComment','Disposable','users','type','pipe','forEach','_injector','COMMENT','1476jawRnZ','function','114YJrMfN','requireSession','5290250deGMgS','map','parentId','code','unitId','2918kVZCPU','@univerjs/network','_threadCommentDataSourceService','listComments','rangeType','Inject','146663cWYkzo','_httpService','/solved','UniverThreadComment','ref','resolved','667LhmXkK','CommentService','solved','userId','getMemberID','/list','_commentService','dayjs','UNRECOGNIZED','351141ajqngL','UniverCollaborationClientPlugin','size','subscribe','UniverThreadCommentUIPlugin','20fxTlXD','rxjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','_init','customRanges','_sessionService','addComment','3799864rHIYmM','replyId','getOwnPropertyDescriptor','add','find','content','_threadCommentDataSource','getComment','@univerjs/thread-comment','/delete','user','18SkUqcH','HTTPService','@univerjs-pro/license','exports','pluginName','syncUpdateMutationToColla','_initUserSync','YYYY/MM/DD\x20HH:mm','updateComment','UserManagerService','addUser','/edit','commentUpdate$','CustomRangeType','dataSource','_configService','_config','UniverProCollaborationClient'];_0x3c95=function(){return _0xd91313;};return _0x3c95();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-
|
|
3
|
+
"version": "0.8.0-nightly.202505271607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.8.0-
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202505271607",
|
|
49
|
+
"@univerjs/network": "0.8.0-nightly.202505271607",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202505271607",
|
|
51
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202505271607",
|
|
52
|
+
"@univerjs-pro/license": "0.8.0-nightly.202505271607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202505271607",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|