@univerjs-pro/thread-comment-datasource 0.8.0-beta.0 → 0.8.0-nightly.202505261607

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 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 _0x3c8b66=_0x5db2;(function(_0x3f731d,_0x3441a2){const _0x398a16=_0x5db2,_0x1f59f7=_0x3f731d();while(!![]){try{const _0x2f7d38=-parseInt(_0x398a16(0x1a3))/0x1+parseInt(_0x398a16(0x142))/0x2*(parseInt(_0x398a16(0x1b7))/0x3)+parseInt(_0x398a16(0x144))/0x4*(parseInt(_0x398a16(0x162))/0x5)+-parseInt(_0x398a16(0x155))/0x6*(parseInt(_0x398a16(0x1a6))/0x7)+parseInt(_0x398a16(0x180))/0x8+parseInt(_0x398a16(0x182))/0x9+-parseInt(_0x398a16(0x1b0))/0xa*(parseInt(_0x398a16(0x192))/0xb);if(_0x2f7d38===_0x3441a2)break;else _0x1f59f7['push'](_0x1f59f7['shift']());}catch(_0x254243){_0x1f59f7['push'](_0x1f59f7['shift']());}}}(_0x415c,0xb0183));Object[_0x3c8b66(0x1a4)](exports,Symbol[_0x3c8b66(0x1ad)],{'value':_0x3c8b66(0x1c0)});const b=require(_0x3c8b66(0x1b1)),T=require(_0x3c8b66(0x169)),c=require(_0x3c8b66(0x174)),j=require(_0x3c8b66(0x146)),M=require(_0x3c8b66(0x17e)),w=require(_0x3c8b66(0x14d)),P=require(_0x3c8b66(0x1a9)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x415c(){const _0x1611a1=['getOwnPropertyDescriptor','userId','forEach','1137twtnHb','/solved','listComments','/list','/universer-api/comment/unit/','filter','_config','Edit','add','Module','users','/edit','slice','_injector','user','Add','2186YFcoss','CustomRangeType','109148Bjprpf','replyId','@univerjs/thread-comment-ui','find','get','rangeId','_sessionService','stringify','Reply','rxjs','UniverThreadCommentUIPlugin','body','parse','saveCommentToSnapshot','Delete','_configService','disposeWithMe','3673974rAPvNA','commentUpdate$','_threadCommentDataSource','pipe','CommentService','UniverCollaborationClientPlugin','IConfigService','code','requireSession','error','Inject','comment','symbol','235IsYDif','Solve','userID','format','root','resolveComment','_threadCommentModel','@univerjs-pro/license','Unknown','Disposable','pluginName','length','addUser','_initUserSync','Solved','_userService','UNRECOGNIZED','DependentOn','@univerjs/core','Injector','onReady','_commentService','addComment','bufferTime','unitId','replies','map','solved','@univerjs/thread-comment','rangeType','4163928miYGPV','getMemberID','2381994ZHpcrn','setConfig','HTTPService','size','ref','type','getCurrentUser','updateComment','content','dayjs','UniverLicensePlugin','personId','Plugin','UniverThreadCommentDataSourcePlugin','post','subscribe','11MBZgvd','customRanges','resolved','getUser','_threadCommentDataSourceService','_initDataSource','_init','/delete','createTimestamp','onStarting','getUnit','COMMENT','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','UserManagerService','ThreadCommentModel','UniverInstanceType','147588fSIQxp','defineProperty','UNIVER_UNKNOWN','7ybXphP','threadId','merge','@univerjs/network','delete','payload','deleteComment','toStringTag','/add','dataSource','10006930VdSfYv','@univerjs-pro/collaboration-client','values','_httpService'];_0x415c=function(){return _0x1611a1;};return _0x415c();}var I=(_0x2a23f2=>(_0x2a23f2[_0x2a23f2['OpenOrReOpen']=0x0]=_0x3c8b66(0x19e),_0x2a23f2[_0x2a23f2[_0x3c8b66(0x170)]=0x1]='Solved',_0x2a23f2[_0x2a23f2[_0x3c8b66(0x172)]=-0x1]='UNRECOGNIZED',_0x2a23f2))(I||{}),v=(_0x24ffea=>(_0x24ffea[_0x24ffea[_0x3c8b66(0x16a)]=0x0]=_0x3c8b66(0x16a),_0x24ffea[_0x24ffea[_0x3c8b66(0x141)]=0x1]=_0x3c8b66(0x141),_0x24ffea[_0x24ffea['Reply']=0x2]=_0x3c8b66(0x14c),_0x24ffea[_0x24ffea[_0x3c8b66(0x1be)]=0x3]='Edit',_0x24ffea[_0x24ffea['Delete']=0x4]=_0x3c8b66(0x152),_0x24ffea[_0x24ffea[_0x3c8b66(0x163)]=0x5]=_0x3c8b66(0x163),_0x24ffea[_0x24ffea[_0x3c8b66(0x172)]=-0x1]=_0x3c8b66(0x172),_0x24ffea))(v||{});const f=_0x5cb5b9=>c[_0x3c8b66(0x18b)](new Date(+_0x5cb5b9))[_0x3c8b66(0x165)](_0x3c8b66(0x19f)),R=async(_0x57f7e4,_0xdf846)=>{const _0xa0693b=_0x3c8b66,_0x17a03c=_0x57f7e4[_0xa0693b(0x148)](c[_0xa0693b(0x1a0)]),_0x37ec19=_0x57f7e4['get'](P[_0xa0693b(0x184)]);_0xdf846[_0xa0693b(0x1b6)](_0x2f7ca4=>{const _0x165c4c=_0xa0693b;_0x17a03c[_0x165c4c(0x195)](_0x2f7ca4)&&_0xdf846[_0x165c4c(0x1aa)](_0x2f7ca4);}),_0xdf846[_0xa0693b(0x185)]&&(await _0x37ec19[_0xa0693b(0x148)]('/universer-api/user/list',{'params':{'userIDs':[..._0xdf846]}}))[_0xa0693b(0x14f)][_0xa0693b(0x1c1)][_0xa0693b(0x1b6)](_0x3a2234=>{const _0x246f0f=_0xa0693b;_0x3a2234&&_0x17a03c[_0x246f0f(0x16e)](_0x3a2234);});};var $=Object[_0x3c8b66(0x1b4)],E=(_0x321705,_0x1f5e41,_0x918f18,_0x307c71)=>{const _0x284cad=_0x3c8b66;for(var _0x355b36=_0x307c71>0x1?void 0x0:_0x307c71?$(_0x1f5e41,_0x918f18):_0x1f5e41,_0x58556e=_0x321705[_0x284cad(0x16d)]-0x1,_0x446f7a;_0x58556e>=0x0;_0x58556e--)(_0x446f7a=_0x321705[_0x58556e])&&(_0x355b36=_0x446f7a(_0x355b36)||_0x355b36);return _0x355b36;},S=(_0x30963c,_0x52f9d0)=>(_0x5e42aa,_0x5ea365)=>_0x52f9d0(_0x5e42aa,_0x5ea365,_0x30963c);let p=class extends c[_0x3c8b66(0x16b)]{constructor(_0x53caf2,_0x39c73b,_0x262e3b,_0x29ca3e){const _0x1dad58=_0x3c8b66;super(),this[_0x1dad58(0x177)]=_0x53caf2,this[_0x1dad58(0x168)]=_0x39c73b,this[_0x1dad58(0x171)]=_0x262e3b,this[_0x1dad58(0x13f)]=_0x29ca3e,this[_0x1dad58(0x198)](),this[_0x1dad58(0x16f)]();}[_0x3c8b66(0x16f)](){const _0x70ecc9=_0x3c8b66;this['disposeWithMe'](this[_0x70ecc9(0x168)][_0x70ecc9(0x156)][_0x70ecc9(0x158)](w[_0x70ecc9(0x179)](0x10))['subscribe'](_0x46e73d=>{const _0x46fdfe=_0x70ecc9,_0xccc340=new Set();_0x46e73d[_0x46fdfe(0x1b6)](_0x451808=>{const _0x2bda4c=_0x46fdfe;switch(_0x451808[_0x2bda4c(0x187)]){case'add':{const _0x351700=_0x451808[_0x2bda4c(0x1ab)][_0x2bda4c(0x18d)];_0xccc340['add'](_0x351700);break;}}}),R(this[_0x46fdfe(0x13f)],_0xccc340);}));}[_0x3c8b66(0x198)](){const _0x53aa33=_0x3c8b66;this[_0x53aa33(0x154)](this[_0x53aa33(0x177)][_0x53aa33(0x156)][_0x53aa33(0x191)](async _0x456cbf=>{const _0x43638e=_0x53aa33;var _0xcd6860,_0x24e7eb,_0x4a1aca,_0x105915;const _0x1ae6b5=(_0xcd6860=this['_threadCommentModel']['getUnit'](_0x456cbf['unitId'])['find'](_0x12ed92=>_0x12ed92[_0x43638e(0x1a7)]===_0x456cbf[_0x43638e(0x1a7)]))==null?void 0x0:_0xcd6860[_0x43638e(0x166)];if(!_0x1ae6b5)return;const {unitId:_0x217629,subUnitId:_0x66a95}=_0x1ae6b5;switch(_0x456cbf[_0x43638e(0x140)]&&this[_0x43638e(0x171)]['addUser'](_0x456cbf[_0x43638e(0x140)]),_0x456cbf[_0x43638e(0x187)]){case v[_0x43638e(0x141)]:break;case v[_0x43638e(0x14c)]:{this[_0x43638e(0x168)]['addComment'](_0x217629,_0x66a95,{'unitId':_0x217629,'subUnitId':_0x66a95,'ref':'','id':_0x456cbf[_0x43638e(0x145)],'dT':f(+_0x456cbf['createTimestamp']),'threadId':_0x456cbf[_0x43638e(0x1a7)],'personId':(_0x4a1aca=(_0x24e7eb=_0x456cbf[_0x43638e(0x140)])==null?void 0x0:_0x24e7eb[_0x43638e(0x164)])!=null?_0x4a1aca:_0x456cbf['userId'],'text':JSON[_0x43638e(0x150)](_0x456cbf[_0x43638e(0x18a)]),'parentId':_0x1ae6b5['id']});break;}case v[_0x43638e(0x152)]:{const _0x40c2dd=this['_threadCommentModel']['getComment'](_0x217629,_0x66a95,_0x456cbf[_0x43638e(0x145)]);_0x40c2dd&&_0x40c2dd['parentId']&&this[_0x43638e(0x168)][_0x43638e(0x1ac)](_0x217629,_0x66a95,_0x456cbf[_0x43638e(0x145)]);break;}case v[_0x43638e(0x1be)]:{this[_0x43638e(0x168)][_0x43638e(0x189)](_0x217629,_0x66a95,{'commentId':_0x456cbf['replyId'],'text':JSON[_0x43638e(0x150)](_0x456cbf['content'])});break;}case v[_0x43638e(0x163)]:{const _0x263346=(_0x105915=this['_threadCommentModel'][_0x43638e(0x19c)](_0x456cbf[_0x43638e(0x17a)])[_0x43638e(0x147)](_0x3bc8fb=>_0x3bc8fb[_0x43638e(0x1a7)]===_0x456cbf[_0x43638e(0x1a7)]))==null?void 0x0:_0x105915[_0x43638e(0x166)];_0x263346&&this[_0x43638e(0x168)][_0x43638e(0x167)](_0x217629,_0x66a95,_0x263346['id'],_0x456cbf[_0x43638e(0x17d)]===I[_0x43638e(0x170)]);break;}}}));}};p=E([S(0x0,c[_0x3c8b66(0x15f)](b[_0x3c8b66(0x159)])),S(0x1,c[_0x3c8b66(0x15f)](M[_0x3c8b66(0x1a1)])),S(0x2,c[_0x3c8b66(0x15f)](c['UserManagerService'])),S(0x3,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3c8b66(0x1b4)],x=(_0x378c8c,_0x958aac,_0x33be85,_0x30f92d)=>{for(var _0x1e80aa=_0x30f92d>0x1?void 0x0:_0x30f92d?A(_0x958aac,_0x33be85):_0x958aac,_0x56fa1f=_0x378c8c['length']-0x1,_0x1202d5;_0x56fa1f>=0x0;_0x56fa1f--)(_0x1202d5=_0x378c8c[_0x56fa1f])&&(_0x1e80aa=_0x1202d5(_0x1e80aa)||_0x1e80aa);return _0x1e80aa;},_=(_0x5c7078,_0x218489)=>(_0xc7f971,_0x47a787)=>_0x218489(_0xc7f971,_0x47a787,_0x5c7078);function Y(_0x301775,_0x2356da){const _0x26dd51=_0x3c8b66,_0x91c055=_0x301775[_0x26dd51(0x17b)][0x0];return{..._0x2356da,'id':_0x91c055[_0x26dd51(0x145)],'resolved':_0x301775[_0x26dd51(0x17d)]===0x1,'dT':f(_0x91c055[_0x26dd51(0x19a)]),'personId':_0x91c055[_0x26dd51(0x1b5)],'threadId':_0x91c055[_0x26dd51(0x1a7)]};}function G(_0x2df7b1,_0x21915f,_0x4280ba){const _0x3d5210=_0x3c8b66;var _0x1a69f3,_0xd979ba;if(((_0xd979ba=(_0x1a69f3=_0x2df7b1==null?void 0x0:_0x2df7b1['replies'])==null?void 0x0:_0x1a69f3['length'])!=null?_0xd979ba:0x0)>0x0){const _0x59f9ae=(_0x46f068,_0x22e181)=>({'id':_0x46f068[_0x3d5210(0x145)],'threadId':_0x46f068[_0x3d5210(0x1a7)],'dT':f(_0x46f068[_0x3d5210(0x19a)]),'personId':_0x46f068[_0x3d5210(0x1b5)],'resolved':_0x2df7b1['solved']===I['Solved'],'unitId':_0x21915f,'subUnitId':_0x4280ba,'text':JSON[_0x3d5210(0x150)](_0x46f068[_0x3d5210(0x18a)]),'parentId':_0x22e181}),_0x2baa7c=_0x59f9ae(_0x2df7b1['replies'][0x0]);return{..._0x2baa7c,'children':_0x2df7b1['replies'][_0x3d5210(0x13e)](0x1)[_0x3d5210(0x17c)](_0x1d689e=>_0x59f9ae(_0x1d689e,_0x2baa7c['id']))};}return null;}function _0x5db2(_0x41c8c0,_0x474093){const _0x415cfe=_0x415c();return _0x5db2=function(_0x5db2e3,_0x4d31c9){_0x5db2e3=_0x5db2e3-0x13e;let _0x276c15=_0x415cfe[_0x5db2e3];return _0x276c15;},_0x5db2(_0x41c8c0,_0x474093);}let g=class{constructor(_0x2b92d5,_0x1a81f2,_0x841936,_0x362d81){const _0x3363dc=_0x3c8b66;this[_0x3363dc(0x1b3)]=_0x2b92d5,this[_0x3363dc(0x171)]=_0x1a81f2,this[_0x3363dc(0x14a)]=_0x841936,this[_0x3363dc(0x13f)]=_0x362d81;}async[_0x3c8b66(0x178)](_0xab6aa){const _0x555758=_0x3c8b66;var _0x434a80,_0x5dc2fc;const {parentId:_0x2cec01,unitId:_0x28d437,text:_0x3cc834,threadId:_0x15fe13}=_0xab6aa,_0x5bee23=(_0x5dc2fc=(_0x434a80=_0x3cc834[_0x555758(0x193)])==null?void 0x0:_0x434a80['filter'](_0x4f3b3c=>_0x4f3b3c[_0x555758(0x17f)]===c[_0x555758(0x143)][_0x555758(0x19d)])['map'](_0x252373=>_0x252373[_0x555758(0x149)]))!=null?_0x5dc2fc:[],_0x899c37=JSON['stringify'](_0x3cc834),_0x11953c=(await this[_0x555758(0x14a)][_0x555758(0x15d)](_0x28d437))['getMemberID']();if(_0x2cec01){const _0x11931e={'memberId':_0x11953c,'unitId':_0x28d437,'content':_0x899c37,'mention':_0x5bee23,'threadId':_0x15fe13},_0x443046=(await this[_0x555758(0x1b3)][_0x555758(0x190)](_0x555758(0x1bb)+_0x28d437+'/reply',{'body':_0x11931e}))[_0x555758(0x14f)]['reply'];return{..._0xab6aa,'id':_0x443046[_0x555758(0x145)],'dT':c[_0x555758(0x18b)](+_0x443046['createTimestamp'])[_0x555758(0x165)](_0x555758(0x19f)),'personId':_0x443046['userId']};}else{const _0x5f31a0={'memberId':_0x11953c,'unitId':_0x28d437,'content':_0x899c37,'mention':_0x5bee23},_0x4f0208=await this[_0x555758(0x1b3)][_0x555758(0x190)]('/universer-api/comment/unit/'+_0x28d437+_0x555758(0x1ae),{'body':_0x5f31a0});return Y(_0x4f0208[_0x555758(0x14f)][_0x555758(0x160)],_0xab6aa);}}async['updateComment'](_0x3b8ecc){const _0x37b96b=_0x3c8b66;var _0x59da26,_0x55dd9b;const {text:_0x422777,unitId:_0x32bfc8}=_0x3b8ecc,_0x529148=(_0x55dd9b=(_0x59da26=_0x422777[_0x37b96b(0x193)])==null?void 0x0:_0x59da26[_0x37b96b(0x1bc)](_0x2ecceb=>_0x2ecceb[_0x37b96b(0x17f)]===c[_0x37b96b(0x143)][_0x37b96b(0x19d)])['map'](_0x304917=>_0x304917['rangeId']))!=null?_0x55dd9b:[],_0x21fdd5=JSON[_0x37b96b(0x14b)](_0x422777),_0x3955da=_0x3b8ecc['threadId'],_0x5ac084=_0x3b8ecc['id'],_0x547f13={'memberId':(await this[_0x37b96b(0x14a)][_0x37b96b(0x15d)](_0x32bfc8))['getMemberID'](),'unitId':_0x32bfc8,'threadId':_0x3955da,'mention':_0x529148,'content':_0x21fdd5,'replyId':_0x5ac084},_0x32ed6c=await this[_0x37b96b(0x1b3)][_0x37b96b(0x190)]('/universer-api/comment/unit/'+_0x32bfc8+_0x37b96b(0x1c2),{'body':_0x547f13});return!_0x32ed6c['body'][_0x37b96b(0x15e)]||_0x32ed6c[_0x37b96b(0x14f)]['error'][_0x37b96b(0x15c)]===0x1;}async[_0x3c8b66(0x167)](_0x37e049){const _0x323549=_0x3c8b66,{unitId:_0x23af09}=_0x37e049,_0x3f8e95=_0x37e049[_0x323549(0x1a7)],_0x34895d={'memberId':this[_0x323549(0x171)][_0x323549(0x188)]()[_0x323549(0x164)],'unitId':_0x23af09,'threadId':_0x3f8e95,'solved':_0x37e049[_0x323549(0x194)]?I['Solved']:I['OpenOrReOpen']},_0x2846fe=await this['_httpService'][_0x323549(0x190)]('/universer-api/comment/unit/'+_0x23af09+_0x323549(0x1b8),{'body':_0x34895d});return!_0x2846fe['body']['error']||_0x2846fe['body'][_0x323549(0x15e)][_0x323549(0x15c)]===0x1;}async[_0x3c8b66(0x1ac)](_0xdfe78e,_0x2cb208,_0x5acb5a,_0x2ca35a){const _0x36d96d=_0x3c8b66,_0x4f6ca0={'memberId':(await this[_0x36d96d(0x14a)][_0x36d96d(0x15d)](_0xdfe78e))[_0x36d96d(0x181)](),'threadId':_0x5acb5a,'replyId':_0x2ca35a,'unitId':_0xdfe78e},_0x7473a2=await this[_0x36d96d(0x1b3)][_0x36d96d(0x190)](_0x36d96d(0x1bb)+_0xdfe78e+_0x36d96d(0x199),{'body':_0x4f6ca0});return!_0x7473a2['body'][_0x36d96d(0x15e)]||_0x7473a2[_0x36d96d(0x14f)][_0x36d96d(0x15e)]['code']===0x1;}async[_0x3c8b66(0x1b9)](_0x4f67b5,_0x1f6e0e,_0x156235){const _0x2d5c94=_0x3c8b66,_0x36d979={'unitId':_0x4f67b5,'threadId':_0x156235},_0x467fda=await this['_httpService'][_0x2d5c94(0x190)](_0x2d5c94(0x1bb)+_0x4f67b5+_0x2d5c94(0x1ba),{'body':_0x36d979}),_0x326223=_0x156235[_0x2d5c94(0x17c)](_0x497ea4=>G(_0x467fda[_0x2d5c94(0x14f)]['comments'][_0x497ea4],_0x4f67b5,_0x1f6e0e))['filter'](Boolean);return Object[_0x2d5c94(0x1b2)](_0x467fda[_0x2d5c94(0x14f)][_0x2d5c94(0x1c1)])[_0x2d5c94(0x1b6)](_0x23197b=>{const _0xadf8aa=_0x2d5c94;this[_0xadf8aa(0x171)][_0xadf8aa(0x16e)](_0x23197b);}),_0x326223;}[_0x3c8b66(0x151)](_0x36dd2f){const _0x12c146=_0x3c8b66;return{'id':_0x36dd2f['id'],'threadId':_0x36dd2f['threadId'],'ref':_0x36dd2f[_0x12c146(0x186)]};}};g=x([_(0x0,c[_0x3c8b66(0x15f)](P[_0x3c8b66(0x184)])),_(0x1,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x1a0)])),_(0x2,c[_0x3c8b66(0x15f)](b['CollaborationSessionService'])),_(0x3,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x543bff,_0x2881eb,_0x2ad88f,_0x14e6d1)=>{const _0x388fca=_0x3c8b66;for(var _0x1a70c1=_0x14e6d1>0x1?void 0x0:_0x14e6d1?H(_0x2881eb,_0x2ad88f):_0x2881eb,_0x278c07=_0x543bff[_0x388fca(0x16d)]-0x1,_0x10fd1c;_0x278c07>=0x0;_0x278c07--)(_0x10fd1c=_0x543bff[_0x278c07])&&(_0x1a70c1=_0x10fd1c(_0x1a70c1)||_0x1a70c1);return _0x1a70c1;},y=(_0x47614e,_0x2d5053)=>(_0x3cfe32,_0xdeb92)=>_0x2d5053(_0x3cfe32,_0xdeb92,_0x47614e);let C=class extends c[_0x3c8b66(0x16b)]{constructor(_0x362007,_0x269e94){const _0x4351b7=_0x3c8b66;super(),this[_0x4351b7(0x196)]=_0x362007,this[_0x4351b7(0x157)]=_0x269e94,this[_0x4351b7(0x197)]();}[_0x3c8b66(0x197)](){const _0xda70c5=_0x3c8b66;this[_0xda70c5(0x196)][_0xda70c5(0x1af)]=this[_0xda70c5(0x157)],this[_0xda70c5(0x196)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x3c8b66(0x15f)](g))],C);var F=Object[_0x3c8b66(0x1a4)],L=Object[_0x3c8b66(0x1b4)],Z=(_0x3cbd41,_0x1a7602,_0x1360e6)=>_0x1a7602 in _0x3cbd41?F(_0x3cbd41,_0x1a7602,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1360e6}):_0x3cbd41[_0x1a7602]=_0x1360e6,W=(_0x4dde97,_0x2babd6,_0x2147cc,_0x277145)=>{const _0x3b5fee=_0x3c8b66;for(var _0x26f9b5=_0x277145>0x1?void 0x0:_0x277145?L(_0x2babd6,_0x2147cc):_0x2babd6,_0x5d686b=_0x4dde97[_0x3b5fee(0x16d)]-0x1,_0x4bb53d;_0x5d686b>=0x0;_0x5d686b--)(_0x4bb53d=_0x4dde97[_0x5d686b])&&(_0x26f9b5=_0x4bb53d(_0x26f9b5)||_0x26f9b5);return _0x26f9b5;},O=(_0x3501cd,_0x27c99b)=>(_0xe93d86,_0x26f5f2)=>_0x27c99b(_0xe93d86,_0x26f5f2,_0x3501cd),N=(_0x5316a4,_0xe0223b,_0x37c6ff)=>Z(_0x5316a4,typeof _0xe0223b!=_0x3c8b66(0x161)?_0xe0223b+'':_0xe0223b,_0x37c6ff);exports[_0x3c8b66(0x18f)]=class extends c[_0x3c8b66(0x18e)]{constructor(_0x555436=D,_0x27ce0b,_0x29c300){const _0x40c034=_0x3c8b66;super(),this[_0x40c034(0x1bd)]=_0x555436,this['_injector']=_0x27ce0b,this[_0x40c034(0x153)]=_0x29c300;const {..._0x29b08c}=c[_0x40c034(0x1a8)]({},D,this[_0x40c034(0x1bd)]);this[_0x40c034(0x153)][_0x40c034(0x183)](q,_0x29b08c);}[_0x3c8b66(0x19b)](){const _0x547c66=_0x3c8b66;[[g],[C],[p]][_0x547c66(0x1b6)](_0x4e29e9=>{const _0x45b29b=_0x547c66;this['_injector'][_0x45b29b(0x1bf)](_0x4e29e9);});}[_0x3c8b66(0x176)](){const _0x19e5a6=_0x3c8b66;this[_0x19e5a6(0x13f)][_0x19e5a6(0x148)](C),this[_0x19e5a6(0x13f)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c8b66(0x16c),U),N(exports[_0x3c8b66(0x18f)],_0x3c8b66(0x187),c[_0x3c8b66(0x1a2)][_0x3c8b66(0x1a5)]),exports[_0x3c8b66(0x18f)]=W([c[_0x3c8b66(0x173)](j[_0x3c8b66(0x14e)],b[_0x3c8b66(0x15a)],T[_0x3c8b66(0x18c)]),O(0x1,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)])),O(0x2,c[_0x3c8b66(0x15b)])],exports[_0x3c8b66(0x18f)]);
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 _0x2ab71b=_0xe5c9;(function(_0x266013,_0x8de279){const _0x1576c5=_0xe5c9,_0x444791=_0x266013();while(!![]){try{const _0x3e38a0=-parseInt(_0x1576c5(0x146))/0x1+-parseInt(_0x1576c5(0x136))/0x2*(-parseInt(_0x1576c5(0x16c))/0x3)+-parseInt(_0x1576c5(0x13a))/0x4*(-parseInt(_0x1576c5(0x118))/0x5)+parseInt(_0x1576c5(0x161))/0x6+parseInt(_0x1576c5(0x112))/0x7+-parseInt(_0x1576c5(0x157))/0x8*(parseInt(_0x1576c5(0x135))/0x9)+parseInt(_0x1576c5(0x162))/0xa*(parseInt(_0x1576c5(0x129))/0xb);if(_0x3e38a0===_0x8de279)break;else _0x444791['push'](_0x444791['shift']());}catch(_0x2f0eff){_0x444791['push'](_0x444791['shift']());}}}(_0x1f39,0x4d455));import{CommentService as _0x4cdef4,CollaborationSessionService as _0x34e856,UniverCollaborationClientPlugin as _0x49c8f9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x333fa5}from'@univerjs-pro/license';function _0x1f39(){const _0x280914=['error','length','onStarting','/universer-api/comment/unit/','map','775072oYOPNH','_threadCommentDataSourceService','users','_init','Unknown','_sessionService','_threadCommentModel','commentUpdate$','OpenOrReOpen','Reply','3264270kABlkz','200090WOoNxP','_userService','getUser','addComment','_injector','userId','resolveComment','/delete','Edit','pluginName','3lxjtwU','replies','type','parse','Solve','code','saveCommentToSnapshot','Solved','get','972825FpJPmR','/add','_httpService','size','_threadCommentDataSource','getCurrentUser','25RcCvdM','UNIVER_UNKNOWN','/edit','stringify','UNRECOGNIZED','format','getMemberID','createTimestamp','getUnit','replyId','threadId','root','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','post','rangeId','77SuyDdU','disposeWithMe','deleteComment','_config','solved','slice','forEach','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','body','thread-comment-data-source.config','18gzaAnp','21106VaxnFT','resolved','userID','Delete','50476yvSJqQ','getOwnPropertyDescriptor','user','reply','_initDataSource','subscribe','addUser','pipe','add','unitId','find','COMMENT','386462bdhxtr','listComments','dataSource','payload','_initUserSync','_configService','/reply','_commentService','rangeType','updateComment','Add','content'];_0x1f39=function(){return _0x280914;};return _0x1f39();}import{dayjs as _0x3952b6,UserManagerService as _0x3d1032,Inject as _0x785250,Injector as _0x231213,Disposable as _0x607ca7,CustomRangeType as _0x5c9b14,UniverInstanceType as _0x35c6da,DependentOn as _0x5cc80e,IConfigService as _0x49ccea,Plugin as _0x5c0206,merge as _0x4eb6ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b3fcf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2221fd,IThreadCommentDataSourceService as _0x50d9f5}from'@univerjs/thread-comment';import{bufferTime as _0x11dc46}from'rxjs';import{HTTPService as _0x497553}from'@univerjs/network';const W=_0x2ab71b(0x131);var I=(_0x6e12d2=>(_0x6e12d2[_0x6e12d2['OpenOrReOpen']=0x0]=_0x2ab71b(0x15f),_0x6e12d2[_0x6e12d2[_0x2ab71b(0x110)]=0x1]='Solved',_0x6e12d2[_0x6e12d2[_0x2ab71b(0x11c)]=-0x1]=_0x2ab71b(0x11c),_0x6e12d2))(I||{}),v=(_0x34cc17=>(_0x34cc17[_0x34cc17[_0x2ab71b(0x15b)]=0x0]='Unknown',_0x34cc17[_0x34cc17[_0x2ab71b(0x150)]=0x1]=_0x2ab71b(0x150),_0x34cc17[_0x34cc17[_0x2ab71b(0x160)]=0x2]=_0x2ab71b(0x160),_0x34cc17[_0x34cc17[_0x2ab71b(0x16a)]=0x3]=_0x2ab71b(0x16a),_0x34cc17[_0x34cc17[_0x2ab71b(0x139)]=0x4]='Delete',_0x34cc17[_0x34cc17[_0x2ab71b(0x10d)]=0x5]=_0x2ab71b(0x10d),_0x34cc17[_0x34cc17[_0x2ab71b(0x11c)]=-0x1]='UNRECOGNIZED',_0x34cc17))(v||{});const D=_0x2c2d05=>_0x3952b6(new Date(+_0x2c2d05))[_0x2ab71b(0x11d)](_0x2ab71b(0x125)),B=async(_0x192e7d,_0x2c134b)=>{const _0x452283=_0x2ab71b,_0x222c4b=_0x192e7d['get'](_0x3d1032),_0x1b0172=_0x192e7d[_0x452283(0x111)](_0x497553);_0x2c134b[_0x452283(0x12f)](_0x407d1a=>{const _0x3deb70=_0x452283;_0x222c4b[_0x3deb70(0x164)](_0x407d1a)&&_0x2c134b['delete'](_0x407d1a);}),_0x2c134b[_0x452283(0x115)]&&(await _0x1b0172[_0x452283(0x111)](_0x452283(0x124),{'params':{'userIDs':[..._0x2c134b]}}))[_0x452283(0x133)][_0x452283(0x159)][_0x452283(0x12f)](_0x1857f3=>{const _0x44032d=_0x452283;_0x1857f3&&_0x222c4b[_0x44032d(0x140)](_0x1857f3);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2891bd,_0x47c46f,_0x503d76,_0x42d8bc)=>{for(var _0x3924a7=_0x42d8bc>0x1?void 0x0:_0x42d8bc?K(_0x47c46f,_0x503d76):_0x47c46f,_0x181456=_0x2891bd['length']-0x1,_0x4f814c;_0x181456>=0x0;_0x181456--)(_0x4f814c=_0x2891bd[_0x181456])&&(_0x3924a7=_0x4f814c(_0x3924a7)||_0x3924a7);return _0x3924a7;},p=(_0x5450dc,_0x22afae)=>(_0x38f894,_0x29e217)=>_0x22afae(_0x38f894,_0x29e217,_0x5450dc);let S=class extends _0x607ca7{constructor(_0x5e3967,_0x2abae6,_0x262a1b,_0x3234c8){const _0x1e1c99=_0x2ab71b;super(),this['_commentService']=_0x5e3967,this['_threadCommentModel']=_0x2abae6,this[_0x1e1c99(0x163)]=_0x262a1b,this['_injector']=_0x3234c8,this[_0x1e1c99(0x15a)](),this[_0x1e1c99(0x14a)]();}[_0x2ab71b(0x14a)](){const _0x8b4d08=_0x2ab71b;this[_0x8b4d08(0x12a)](this[_0x8b4d08(0x15d)][_0x8b4d08(0x15e)][_0x8b4d08(0x141)](_0x11dc46(0x10))[_0x8b4d08(0x13f)](_0x18f49c=>{const _0x42f5e1=_0x8b4d08,_0x2afc62=new Set();_0x18f49c[_0x42f5e1(0x12f)](_0x3715bf=>{const _0x4ae1ed=_0x42f5e1;switch(_0x3715bf[_0x4ae1ed(0x10b)]){case'add':{const _0x25384f=_0x3715bf[_0x4ae1ed(0x149)]['personId'];_0x2afc62[_0x4ae1ed(0x142)](_0x25384f);break;}}}),B(this[_0x42f5e1(0x166)],_0x2afc62);}));}['_init'](){const _0xb54f3b=_0x2ab71b;this[_0xb54f3b(0x12a)](this[_0xb54f3b(0x14d)][_0xb54f3b(0x15e)][_0xb54f3b(0x13f)](async _0x2c6437=>{const _0x1c0a4a=_0xb54f3b;var _0x55917a,_0x121e41,_0x13a55d,_0x2f825c;const _0x44f035=(_0x55917a=this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x120)](_0x2c6437['unitId'])[_0x1c0a4a(0x144)](_0x519f97=>_0x519f97[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x55917a['root'];if(!_0x44f035)return;const {unitId:_0x510c7a,subUnitId:_0x1a84fa}=_0x44f035;switch(_0x2c6437[_0x1c0a4a(0x13c)]&&this['_userService'][_0x1c0a4a(0x140)](_0x2c6437[_0x1c0a4a(0x13c)]),_0x2c6437['type']){case v[_0x1c0a4a(0x150)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1c0a4a(0x165)](_0x510c7a,_0x1a84fa,{'unitId':_0x510c7a,'subUnitId':_0x1a84fa,'ref':'','id':_0x2c6437[_0x1c0a4a(0x121)],'dT':D(+_0x2c6437[_0x1c0a4a(0x11f)]),'threadId':_0x2c6437[_0x1c0a4a(0x122)],'personId':(_0x13a55d=(_0x121e41=_0x2c6437[_0x1c0a4a(0x13c)])==null?void 0x0:_0x121e41[_0x1c0a4a(0x138)])!=null?_0x13a55d:_0x2c6437[_0x1c0a4a(0x167)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437['content']),'parentId':_0x44f035['id']});break;}case v[_0x1c0a4a(0x139)]:{const _0x35f50c=this[_0x1c0a4a(0x15d)]['getComment'](_0x510c7a,_0x1a84fa,_0x2c6437[_0x1c0a4a(0x121)]);_0x35f50c&&_0x35f50c['parentId']&&this[_0x1c0a4a(0x15d)]['deleteComment'](_0x510c7a,_0x1a84fa,_0x2c6437['replyId']);break;}case v['Edit']:{this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x14f)](_0x510c7a,_0x1a84fa,{'commentId':_0x2c6437[_0x1c0a4a(0x121)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437[_0x1c0a4a(0x151)])});break;}case v[_0x1c0a4a(0x10d)]:{const _0x4bb68e=(_0x2f825c=this['_threadCommentModel'][_0x1c0a4a(0x120)](_0x2c6437[_0x1c0a4a(0x143)])['find'](_0x25ee80=>_0x25ee80[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x2f825c[_0x1c0a4a(0x123)];_0x4bb68e&&this[_0x1c0a4a(0x15d)]['resolveComment'](_0x510c7a,_0x1a84fa,_0x4bb68e['id'],_0x2c6437[_0x1c0a4a(0x12d)]===I[_0x1c0a4a(0x110)]);break;}}}));}};S=V([p(0x0,_0x785250(_0x4cdef4)),p(0x1,_0x785250(_0x2221fd)),p(0x2,_0x785250(_0x3d1032)),p(0x3,_0x785250(_0x231213))],S);const z=_0x2ab71b(0x134),M={};var k=Object[_0x2ab71b(0x13b)],Q=(_0x448413,_0x4dd429,_0x5aba76,_0x458a5a)=>{for(var _0x5a44cb=_0x458a5a>0x1?void 0x0:_0x458a5a?k(_0x4dd429,_0x5aba76):_0x4dd429,_0x3f7c4e=_0x448413['length']-0x1,_0x244627;_0x3f7c4e>=0x0;_0x3f7c4e--)(_0x244627=_0x448413[_0x3f7c4e])&&(_0x5a44cb=_0x244627(_0x5a44cb)||_0x5a44cb);return _0x5a44cb;},_=(_0x431f82,_0x1b328e)=>(_0x7ad1bb,_0x57bcc2)=>_0x1b328e(_0x7ad1bb,_0x57bcc2,_0x431f82);function X(_0x40cec1,_0x23a5da){const _0x37b040=_0x2ab71b,_0x295796=_0x40cec1[_0x37b040(0x10a)][0x0];return{..._0x23a5da,'id':_0x295796[_0x37b040(0x121)],'resolved':_0x40cec1[_0x37b040(0x12d)]===0x1,'dT':D(_0x295796['createTimestamp']),'personId':_0x295796[_0x37b040(0x167)],'threadId':_0x295796['threadId']};}function ee(_0x4bbebc,_0x32121d,_0x31ebe3){const _0x1bac32=_0x2ab71b;var _0x9c239,_0x36553e;if(((_0x36553e=(_0x9c239=_0x4bbebc==null?void 0x0:_0x4bbebc['replies'])==null?void 0x0:_0x9c239[_0x1bac32(0x153)])!=null?_0x36553e:0x0)>0x0){const _0x65048b=(_0xcd6b10,_0x1f5ff8)=>({'id':_0xcd6b10[_0x1bac32(0x121)],'threadId':_0xcd6b10[_0x1bac32(0x122)],'dT':D(_0xcd6b10[_0x1bac32(0x11f)]),'personId':_0xcd6b10[_0x1bac32(0x167)],'resolved':_0x4bbebc[_0x1bac32(0x12d)]===I[_0x1bac32(0x110)],'unitId':_0x32121d,'subUnitId':_0x31ebe3,'text':JSON[_0x1bac32(0x10c)](_0xcd6b10[_0x1bac32(0x151)]),'parentId':_0x1f5ff8}),_0x4fa81a=_0x65048b(_0x4bbebc[_0x1bac32(0x10a)][0x0]);return{..._0x4fa81a,'children':_0x4bbebc[_0x1bac32(0x10a)][_0x1bac32(0x12e)](0x1)[_0x1bac32(0x156)](_0x39c81e=>_0x65048b(_0x39c81e,_0x4fa81a['id']))};}return null;}let f=class{constructor(_0x50369f,_0x1c91d5,_0xf4144b,_0x16a90a){const _0x14d095=_0x2ab71b;this[_0x14d095(0x114)]=_0x50369f,this[_0x14d095(0x163)]=_0x1c91d5,this['_sessionService']=_0xf4144b,this['_injector']=_0x16a90a;}async[_0x2ab71b(0x165)](_0x56f6ce){const _0x5b06c3=_0x2ab71b;var _0x843a9d,_0x4fe080;const {parentId:_0x522ad4,unitId:_0x529dae,text:_0xbc760b,threadId:_0x507d49}=_0x56f6ce,_0x5eaca5=(_0x4fe080=(_0x843a9d=_0xbc760b['customRanges'])==null?void 0x0:_0x843a9d['filter'](_0x338726=>_0x338726[_0x5b06c3(0x14e)]===_0x5c9b14[_0x5b06c3(0x145)])[_0x5b06c3(0x156)](_0x1b674f=>_0x1b674f[_0x5b06c3(0x128)]))!=null?_0x4fe080:[],_0x203908=JSON[_0x5b06c3(0x11b)](_0xbc760b),_0x458c0f=(await this[_0x5b06c3(0x15c)]['requireSession'](_0x529dae))[_0x5b06c3(0x11e)]();if(_0x522ad4){const _0x16eb72={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5,'threadId':_0x507d49},_0x124c02=(await this['_httpService']['post'](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x14c),{'body':_0x16eb72}))[_0x5b06c3(0x133)][_0x5b06c3(0x13d)];return{..._0x56f6ce,'id':_0x124c02[_0x5b06c3(0x121)],'dT':_0x3952b6(+_0x124c02[_0x5b06c3(0x11f)])['format'](_0x5b06c3(0x125)),'personId':_0x124c02[_0x5b06c3(0x167)]};}else{const _0x24321f={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5},_0x19e4e5=await this['_httpService'][_0x5b06c3(0x127)](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x113),{'body':_0x24321f});return X(_0x19e4e5[_0x5b06c3(0x133)]['comment'],_0x56f6ce);}}async[_0x2ab71b(0x14f)](_0x6b2394){const _0xfd8253=_0x2ab71b;var _0x1523fb,_0x1031d6;const {text:_0x546299,unitId:_0x196f86}=_0x6b2394,_0x12f852=(_0x1031d6=(_0x1523fb=_0x546299['customRanges'])==null?void 0x0:_0x1523fb[_0xfd8253(0x132)](_0x3685a5=>_0x3685a5[_0xfd8253(0x14e)]===_0x5c9b14['COMMENT'])[_0xfd8253(0x156)](_0x5f153a=>_0x5f153a[_0xfd8253(0x128)]))!=null?_0x1031d6:[],_0x1ae3dc=JSON[_0xfd8253(0x11b)](_0x546299),_0x5516f2=_0x6b2394[_0xfd8253(0x122)],_0x449577=_0x6b2394['id'],_0x40ea38={'memberId':(await this[_0xfd8253(0x15c)]['requireSession'](_0x196f86))['getMemberID'](),'unitId':_0x196f86,'threadId':_0x5516f2,'mention':_0x12f852,'content':_0x1ae3dc,'replyId':_0x449577},_0x2bf93d=await this[_0xfd8253(0x114)]['post'](_0xfd8253(0x155)+_0x196f86+_0xfd8253(0x11a),{'body':_0x40ea38});return!_0x2bf93d[_0xfd8253(0x133)][_0xfd8253(0x152)]||_0x2bf93d['body'][_0xfd8253(0x152)][_0xfd8253(0x10e)]===0x1;}async[_0x2ab71b(0x168)](_0x4bb8ef){const _0x312e98=_0x2ab71b,{unitId:_0x1dcf95}=_0x4bb8ef,_0x4fd8e4=_0x4bb8ef[_0x312e98(0x122)],_0x268b4d={'memberId':this[_0x312e98(0x163)][_0x312e98(0x117)]()['userID'],'unitId':_0x1dcf95,'threadId':_0x4fd8e4,'solved':_0x4bb8ef[_0x312e98(0x137)]?I['Solved']:I[_0x312e98(0x15f)]},_0x5b2eae=await this['_httpService'][_0x312e98(0x127)](_0x312e98(0x155)+_0x1dcf95+'/solved',{'body':_0x268b4d});return!_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)]||_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)][_0x312e98(0x10e)]===0x1;}async[_0x2ab71b(0x12b)](_0x455186,_0x22db3d,_0x185ec1,_0x4ab50b){const _0x223ee2=_0x2ab71b,_0xafe0e8={'memberId':(await this['_sessionService']['requireSession'](_0x455186))['getMemberID'](),'threadId':_0x185ec1,'replyId':_0x4ab50b,'unitId':_0x455186},_0x1ad951=await this[_0x223ee2(0x114)]['post'](_0x223ee2(0x155)+_0x455186+_0x223ee2(0x169),{'body':_0xafe0e8});return!_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]||_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]['code']===0x1;}async[_0x2ab71b(0x147)](_0xeec0d3,_0x3e733d,_0x47d842){const _0x4e5d07=_0x2ab71b,_0x35d037={'unitId':_0xeec0d3,'threadId':_0x47d842},_0xc7fa44=await this[_0x4e5d07(0x114)][_0x4e5d07(0x127)](_0x4e5d07(0x155)+_0xeec0d3+'/list',{'body':_0x35d037}),_0x36445f=_0x47d842['map'](_0x5c4c53=>ee(_0xc7fa44['body']['comments'][_0x5c4c53],_0xeec0d3,_0x3e733d))['filter'](Boolean);return Object['values'](_0xc7fa44[_0x4e5d07(0x133)]['users'])[_0x4e5d07(0x12f)](_0x23e15c=>{const _0x32b23e=_0x4e5d07;this[_0x32b23e(0x163)][_0x32b23e(0x140)](_0x23e15c);}),_0x36445f;}[_0x2ab71b(0x10f)](_0x1c0d1e){const _0x78531e=_0x2ab71b;return{'id':_0x1c0d1e['id'],'threadId':_0x1c0d1e[_0x78531e(0x122)],'ref':_0x1c0d1e['ref']};}};f=Q([_(0x0,_0x785250(_0x497553)),_(0x1,_0x785250(_0x3d1032)),_(0x2,_0x785250(_0x34e856)),_(0x3,_0x785250(_0x231213))],f);var re=Object[_0x2ab71b(0x13b)],te=(_0xee91bb,_0x235a59,_0x52de03,_0x28f217)=>{const _0x33cd5f=_0x2ab71b;for(var _0x1ddc58=_0x28f217>0x1?void 0x0:_0x28f217?re(_0x235a59,_0x52de03):_0x235a59,_0x46c8dd=_0xee91bb[_0x33cd5f(0x153)]-0x1,_0x5b236d;_0x46c8dd>=0x0;_0x46c8dd--)(_0x5b236d=_0xee91bb[_0x46c8dd])&&(_0x1ddc58=_0x5b236d(_0x1ddc58)||_0x1ddc58);return _0x1ddc58;},N=(_0x3bc0bf,_0x503314)=>(_0x2f4b4a,_0x62c6da)=>_0x503314(_0x2f4b4a,_0x62c6da,_0x3bc0bf);let g=class extends _0x607ca7{constructor(_0x496bfb,_0x18d088){const _0x12107a=_0x2ab71b;super(),this[_0x12107a(0x158)]=_0x496bfb,this[_0x12107a(0x116)]=_0x18d088,this['_initDataSource']();}[_0x2ab71b(0x13e)](){const _0x78f09c=_0x2ab71b;this[_0x78f09c(0x158)][_0x78f09c(0x148)]=this['_threadCommentDataSource'],this[_0x78f09c(0x158)][_0x78f09c(0x126)]=!0x1;}};g=te([N(0x0,_0x50d9f5),N(0x1,_0x785250(f))],g);var se=Object[_0x2ab71b(0x130)],oe=Object[_0x2ab71b(0x13b)],ne=(_0x5afe2e,_0x297d62,_0x4e0b46)=>_0x297d62 in _0x5afe2e?se(_0x5afe2e,_0x297d62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e0b46}):_0x5afe2e[_0x297d62]=_0x4e0b46,ie=(_0x5ccbe7,_0x290ef1,_0x3e4c99,_0x15879e)=>{const _0x541509=_0x2ab71b;for(var _0x98df6b=_0x15879e>0x1?void 0x0:_0x15879e?oe(_0x290ef1,_0x3e4c99):_0x290ef1,_0x5e6139=_0x5ccbe7[_0x541509(0x153)]-0x1,_0x2fba5a;_0x5e6139>=0x0;_0x5e6139--)(_0x2fba5a=_0x5ccbe7[_0x5e6139])&&(_0x98df6b=_0x2fba5a(_0x98df6b)||_0x98df6b);return _0x98df6b;},w=(_0xea0248,_0x358841)=>(_0x3e97ed,_0x58bffa)=>_0x358841(_0x3e97ed,_0x58bffa,_0xea0248),$=(_0x17b0d1,_0x5711cb,_0x4b0b5f)=>ne(_0x17b0d1,typeof _0x5711cb!='symbol'?_0x5711cb+'':_0x5711cb,_0x4b0b5f);function _0xe5c9(_0x4a38c2,_0x8d6108){const _0x1f394c=_0x1f39();return _0xe5c9=function(_0xe5c9ee,_0x7ac369){_0xe5c9ee=_0xe5c9ee-0x10a;let _0x48fc34=_0x1f394c[_0xe5c9ee];return _0x48fc34;},_0xe5c9(_0x4a38c2,_0x8d6108);}let b=class extends _0x5c0206{constructor(_0x495a2a=M,_0x37133d,_0x36f526){const _0x47243e=_0x2ab71b;super(),this['_config']=_0x495a2a,this['_injector']=_0x37133d,this[_0x47243e(0x14b)]=_0x36f526;const {..._0x4ed11a}=_0x4eb6ff({},M,this[_0x47243e(0x12c)]);this['_configService']['setConfig'](z,_0x4ed11a);}[_0x2ab71b(0x154)](){const _0x4bd321=_0x2ab71b;[[f],[g],[S]][_0x4bd321(0x12f)](_0x22db10=>{const _0x353cae=_0x4bd321;this[_0x353cae(0x166)][_0x353cae(0x142)](_0x22db10);});}['onReady'](){const _0x2ef20d=_0x2ab71b;this[_0x2ef20d(0x166)][_0x2ef20d(0x111)](g),this[_0x2ef20d(0x166)]['get'](S);}};$(b,_0x2ab71b(0x16b),W),$(b,_0x2ab71b(0x10b),_0x35c6da[_0x2ab71b(0x119)]),b=ie([_0x5cc80e(_0x5b3fcf,_0x49c8f9,_0x333fa5),w(0x1,_0x785250(_0x231213)),w(0x2,_0x49ccea)],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 _0x2ab71b=_0xe5c9;(function(_0x266013,_0x8de279){const _0x1576c5=_0xe5c9,_0x444791=_0x266013();while(!![]){try{const _0x3e38a0=-parseInt(_0x1576c5(0x146))/0x1+-parseInt(_0x1576c5(0x136))/0x2*(-parseInt(_0x1576c5(0x16c))/0x3)+-parseInt(_0x1576c5(0x13a))/0x4*(-parseInt(_0x1576c5(0x118))/0x5)+parseInt(_0x1576c5(0x161))/0x6+parseInt(_0x1576c5(0x112))/0x7+-parseInt(_0x1576c5(0x157))/0x8*(parseInt(_0x1576c5(0x135))/0x9)+parseInt(_0x1576c5(0x162))/0xa*(parseInt(_0x1576c5(0x129))/0xb);if(_0x3e38a0===_0x8de279)break;else _0x444791['push'](_0x444791['shift']());}catch(_0x2f0eff){_0x444791['push'](_0x444791['shift']());}}}(_0x1f39,0x4d455));import{CommentService as _0x4cdef4,CollaborationSessionService as _0x34e856,UniverCollaborationClientPlugin as _0x49c8f9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x333fa5}from'@univerjs-pro/license';function _0x1f39(){const _0x280914=['error','length','onStarting','/universer-api/comment/unit/','map','775072oYOPNH','_threadCommentDataSourceService','users','_init','Unknown','_sessionService','_threadCommentModel','commentUpdate$','OpenOrReOpen','Reply','3264270kABlkz','200090WOoNxP','_userService','getUser','addComment','_injector','userId','resolveComment','/delete','Edit','pluginName','3lxjtwU','replies','type','parse','Solve','code','saveCommentToSnapshot','Solved','get','972825FpJPmR','/add','_httpService','size','_threadCommentDataSource','getCurrentUser','25RcCvdM','UNIVER_UNKNOWN','/edit','stringify','UNRECOGNIZED','format','getMemberID','createTimestamp','getUnit','replyId','threadId','root','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','post','rangeId','77SuyDdU','disposeWithMe','deleteComment','_config','solved','slice','forEach','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','body','thread-comment-data-source.config','18gzaAnp','21106VaxnFT','resolved','userID','Delete','50476yvSJqQ','getOwnPropertyDescriptor','user','reply','_initDataSource','subscribe','addUser','pipe','add','unitId','find','COMMENT','386462bdhxtr','listComments','dataSource','payload','_initUserSync','_configService','/reply','_commentService','rangeType','updateComment','Add','content'];_0x1f39=function(){return _0x280914;};return _0x1f39();}import{dayjs as _0x3952b6,UserManagerService as _0x3d1032,Inject as _0x785250,Injector as _0x231213,Disposable as _0x607ca7,CustomRangeType as _0x5c9b14,UniverInstanceType as _0x35c6da,DependentOn as _0x5cc80e,IConfigService as _0x49ccea,Plugin as _0x5c0206,merge as _0x4eb6ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b3fcf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2221fd,IThreadCommentDataSourceService as _0x50d9f5}from'@univerjs/thread-comment';import{bufferTime as _0x11dc46}from'rxjs';import{HTTPService as _0x497553}from'@univerjs/network';const W=_0x2ab71b(0x131);var I=(_0x6e12d2=>(_0x6e12d2[_0x6e12d2['OpenOrReOpen']=0x0]=_0x2ab71b(0x15f),_0x6e12d2[_0x6e12d2[_0x2ab71b(0x110)]=0x1]='Solved',_0x6e12d2[_0x6e12d2[_0x2ab71b(0x11c)]=-0x1]=_0x2ab71b(0x11c),_0x6e12d2))(I||{}),v=(_0x34cc17=>(_0x34cc17[_0x34cc17[_0x2ab71b(0x15b)]=0x0]='Unknown',_0x34cc17[_0x34cc17[_0x2ab71b(0x150)]=0x1]=_0x2ab71b(0x150),_0x34cc17[_0x34cc17[_0x2ab71b(0x160)]=0x2]=_0x2ab71b(0x160),_0x34cc17[_0x34cc17[_0x2ab71b(0x16a)]=0x3]=_0x2ab71b(0x16a),_0x34cc17[_0x34cc17[_0x2ab71b(0x139)]=0x4]='Delete',_0x34cc17[_0x34cc17[_0x2ab71b(0x10d)]=0x5]=_0x2ab71b(0x10d),_0x34cc17[_0x34cc17[_0x2ab71b(0x11c)]=-0x1]='UNRECOGNIZED',_0x34cc17))(v||{});const D=_0x2c2d05=>_0x3952b6(new Date(+_0x2c2d05))[_0x2ab71b(0x11d)](_0x2ab71b(0x125)),B=async(_0x192e7d,_0x2c134b)=>{const _0x452283=_0x2ab71b,_0x222c4b=_0x192e7d['get'](_0x3d1032),_0x1b0172=_0x192e7d[_0x452283(0x111)](_0x497553);_0x2c134b[_0x452283(0x12f)](_0x407d1a=>{const _0x3deb70=_0x452283;_0x222c4b[_0x3deb70(0x164)](_0x407d1a)&&_0x2c134b['delete'](_0x407d1a);}),_0x2c134b[_0x452283(0x115)]&&(await _0x1b0172[_0x452283(0x111)](_0x452283(0x124),{'params':{'userIDs':[..._0x2c134b]}}))[_0x452283(0x133)][_0x452283(0x159)][_0x452283(0x12f)](_0x1857f3=>{const _0x44032d=_0x452283;_0x1857f3&&_0x222c4b[_0x44032d(0x140)](_0x1857f3);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2891bd,_0x47c46f,_0x503d76,_0x42d8bc)=>{for(var _0x3924a7=_0x42d8bc>0x1?void 0x0:_0x42d8bc?K(_0x47c46f,_0x503d76):_0x47c46f,_0x181456=_0x2891bd['length']-0x1,_0x4f814c;_0x181456>=0x0;_0x181456--)(_0x4f814c=_0x2891bd[_0x181456])&&(_0x3924a7=_0x4f814c(_0x3924a7)||_0x3924a7);return _0x3924a7;},p=(_0x5450dc,_0x22afae)=>(_0x38f894,_0x29e217)=>_0x22afae(_0x38f894,_0x29e217,_0x5450dc);let S=class extends _0x607ca7{constructor(_0x5e3967,_0x2abae6,_0x262a1b,_0x3234c8){const _0x1e1c99=_0x2ab71b;super(),this['_commentService']=_0x5e3967,this['_threadCommentModel']=_0x2abae6,this[_0x1e1c99(0x163)]=_0x262a1b,this['_injector']=_0x3234c8,this[_0x1e1c99(0x15a)](),this[_0x1e1c99(0x14a)]();}[_0x2ab71b(0x14a)](){const _0x8b4d08=_0x2ab71b;this[_0x8b4d08(0x12a)](this[_0x8b4d08(0x15d)][_0x8b4d08(0x15e)][_0x8b4d08(0x141)](_0x11dc46(0x10))[_0x8b4d08(0x13f)](_0x18f49c=>{const _0x42f5e1=_0x8b4d08,_0x2afc62=new Set();_0x18f49c[_0x42f5e1(0x12f)](_0x3715bf=>{const _0x4ae1ed=_0x42f5e1;switch(_0x3715bf[_0x4ae1ed(0x10b)]){case'add':{const _0x25384f=_0x3715bf[_0x4ae1ed(0x149)]['personId'];_0x2afc62[_0x4ae1ed(0x142)](_0x25384f);break;}}}),B(this[_0x42f5e1(0x166)],_0x2afc62);}));}['_init'](){const _0xb54f3b=_0x2ab71b;this[_0xb54f3b(0x12a)](this[_0xb54f3b(0x14d)][_0xb54f3b(0x15e)][_0xb54f3b(0x13f)](async _0x2c6437=>{const _0x1c0a4a=_0xb54f3b;var _0x55917a,_0x121e41,_0x13a55d,_0x2f825c;const _0x44f035=(_0x55917a=this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x120)](_0x2c6437['unitId'])[_0x1c0a4a(0x144)](_0x519f97=>_0x519f97[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x55917a['root'];if(!_0x44f035)return;const {unitId:_0x510c7a,subUnitId:_0x1a84fa}=_0x44f035;switch(_0x2c6437[_0x1c0a4a(0x13c)]&&this['_userService'][_0x1c0a4a(0x140)](_0x2c6437[_0x1c0a4a(0x13c)]),_0x2c6437['type']){case v[_0x1c0a4a(0x150)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1c0a4a(0x165)](_0x510c7a,_0x1a84fa,{'unitId':_0x510c7a,'subUnitId':_0x1a84fa,'ref':'','id':_0x2c6437[_0x1c0a4a(0x121)],'dT':D(+_0x2c6437[_0x1c0a4a(0x11f)]),'threadId':_0x2c6437[_0x1c0a4a(0x122)],'personId':(_0x13a55d=(_0x121e41=_0x2c6437[_0x1c0a4a(0x13c)])==null?void 0x0:_0x121e41[_0x1c0a4a(0x138)])!=null?_0x13a55d:_0x2c6437[_0x1c0a4a(0x167)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437['content']),'parentId':_0x44f035['id']});break;}case v[_0x1c0a4a(0x139)]:{const _0x35f50c=this[_0x1c0a4a(0x15d)]['getComment'](_0x510c7a,_0x1a84fa,_0x2c6437[_0x1c0a4a(0x121)]);_0x35f50c&&_0x35f50c['parentId']&&this[_0x1c0a4a(0x15d)]['deleteComment'](_0x510c7a,_0x1a84fa,_0x2c6437['replyId']);break;}case v['Edit']:{this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x14f)](_0x510c7a,_0x1a84fa,{'commentId':_0x2c6437[_0x1c0a4a(0x121)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437[_0x1c0a4a(0x151)])});break;}case v[_0x1c0a4a(0x10d)]:{const _0x4bb68e=(_0x2f825c=this['_threadCommentModel'][_0x1c0a4a(0x120)](_0x2c6437[_0x1c0a4a(0x143)])['find'](_0x25ee80=>_0x25ee80[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x2f825c[_0x1c0a4a(0x123)];_0x4bb68e&&this[_0x1c0a4a(0x15d)]['resolveComment'](_0x510c7a,_0x1a84fa,_0x4bb68e['id'],_0x2c6437[_0x1c0a4a(0x12d)]===I[_0x1c0a4a(0x110)]);break;}}}));}};S=V([p(0x0,_0x785250(_0x4cdef4)),p(0x1,_0x785250(_0x2221fd)),p(0x2,_0x785250(_0x3d1032)),p(0x3,_0x785250(_0x231213))],S);const z=_0x2ab71b(0x134),M={};var k=Object[_0x2ab71b(0x13b)],Q=(_0x448413,_0x4dd429,_0x5aba76,_0x458a5a)=>{for(var _0x5a44cb=_0x458a5a>0x1?void 0x0:_0x458a5a?k(_0x4dd429,_0x5aba76):_0x4dd429,_0x3f7c4e=_0x448413['length']-0x1,_0x244627;_0x3f7c4e>=0x0;_0x3f7c4e--)(_0x244627=_0x448413[_0x3f7c4e])&&(_0x5a44cb=_0x244627(_0x5a44cb)||_0x5a44cb);return _0x5a44cb;},_=(_0x431f82,_0x1b328e)=>(_0x7ad1bb,_0x57bcc2)=>_0x1b328e(_0x7ad1bb,_0x57bcc2,_0x431f82);function X(_0x40cec1,_0x23a5da){const _0x37b040=_0x2ab71b,_0x295796=_0x40cec1[_0x37b040(0x10a)][0x0];return{..._0x23a5da,'id':_0x295796[_0x37b040(0x121)],'resolved':_0x40cec1[_0x37b040(0x12d)]===0x1,'dT':D(_0x295796['createTimestamp']),'personId':_0x295796[_0x37b040(0x167)],'threadId':_0x295796['threadId']};}function ee(_0x4bbebc,_0x32121d,_0x31ebe3){const _0x1bac32=_0x2ab71b;var _0x9c239,_0x36553e;if(((_0x36553e=(_0x9c239=_0x4bbebc==null?void 0x0:_0x4bbebc['replies'])==null?void 0x0:_0x9c239[_0x1bac32(0x153)])!=null?_0x36553e:0x0)>0x0){const _0x65048b=(_0xcd6b10,_0x1f5ff8)=>({'id':_0xcd6b10[_0x1bac32(0x121)],'threadId':_0xcd6b10[_0x1bac32(0x122)],'dT':D(_0xcd6b10[_0x1bac32(0x11f)]),'personId':_0xcd6b10[_0x1bac32(0x167)],'resolved':_0x4bbebc[_0x1bac32(0x12d)]===I[_0x1bac32(0x110)],'unitId':_0x32121d,'subUnitId':_0x31ebe3,'text':JSON[_0x1bac32(0x10c)](_0xcd6b10[_0x1bac32(0x151)]),'parentId':_0x1f5ff8}),_0x4fa81a=_0x65048b(_0x4bbebc[_0x1bac32(0x10a)][0x0]);return{..._0x4fa81a,'children':_0x4bbebc[_0x1bac32(0x10a)][_0x1bac32(0x12e)](0x1)[_0x1bac32(0x156)](_0x39c81e=>_0x65048b(_0x39c81e,_0x4fa81a['id']))};}return null;}let f=class{constructor(_0x50369f,_0x1c91d5,_0xf4144b,_0x16a90a){const _0x14d095=_0x2ab71b;this[_0x14d095(0x114)]=_0x50369f,this[_0x14d095(0x163)]=_0x1c91d5,this['_sessionService']=_0xf4144b,this['_injector']=_0x16a90a;}async[_0x2ab71b(0x165)](_0x56f6ce){const _0x5b06c3=_0x2ab71b;var _0x843a9d,_0x4fe080;const {parentId:_0x522ad4,unitId:_0x529dae,text:_0xbc760b,threadId:_0x507d49}=_0x56f6ce,_0x5eaca5=(_0x4fe080=(_0x843a9d=_0xbc760b['customRanges'])==null?void 0x0:_0x843a9d['filter'](_0x338726=>_0x338726[_0x5b06c3(0x14e)]===_0x5c9b14[_0x5b06c3(0x145)])[_0x5b06c3(0x156)](_0x1b674f=>_0x1b674f[_0x5b06c3(0x128)]))!=null?_0x4fe080:[],_0x203908=JSON[_0x5b06c3(0x11b)](_0xbc760b),_0x458c0f=(await this[_0x5b06c3(0x15c)]['requireSession'](_0x529dae))[_0x5b06c3(0x11e)]();if(_0x522ad4){const _0x16eb72={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5,'threadId':_0x507d49},_0x124c02=(await this['_httpService']['post'](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x14c),{'body':_0x16eb72}))[_0x5b06c3(0x133)][_0x5b06c3(0x13d)];return{..._0x56f6ce,'id':_0x124c02[_0x5b06c3(0x121)],'dT':_0x3952b6(+_0x124c02[_0x5b06c3(0x11f)])['format'](_0x5b06c3(0x125)),'personId':_0x124c02[_0x5b06c3(0x167)]};}else{const _0x24321f={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5},_0x19e4e5=await this['_httpService'][_0x5b06c3(0x127)](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x113),{'body':_0x24321f});return X(_0x19e4e5[_0x5b06c3(0x133)]['comment'],_0x56f6ce);}}async[_0x2ab71b(0x14f)](_0x6b2394){const _0xfd8253=_0x2ab71b;var _0x1523fb,_0x1031d6;const {text:_0x546299,unitId:_0x196f86}=_0x6b2394,_0x12f852=(_0x1031d6=(_0x1523fb=_0x546299['customRanges'])==null?void 0x0:_0x1523fb[_0xfd8253(0x132)](_0x3685a5=>_0x3685a5[_0xfd8253(0x14e)]===_0x5c9b14['COMMENT'])[_0xfd8253(0x156)](_0x5f153a=>_0x5f153a[_0xfd8253(0x128)]))!=null?_0x1031d6:[],_0x1ae3dc=JSON[_0xfd8253(0x11b)](_0x546299),_0x5516f2=_0x6b2394[_0xfd8253(0x122)],_0x449577=_0x6b2394['id'],_0x40ea38={'memberId':(await this[_0xfd8253(0x15c)]['requireSession'](_0x196f86))['getMemberID'](),'unitId':_0x196f86,'threadId':_0x5516f2,'mention':_0x12f852,'content':_0x1ae3dc,'replyId':_0x449577},_0x2bf93d=await this[_0xfd8253(0x114)]['post'](_0xfd8253(0x155)+_0x196f86+_0xfd8253(0x11a),{'body':_0x40ea38});return!_0x2bf93d[_0xfd8253(0x133)][_0xfd8253(0x152)]||_0x2bf93d['body'][_0xfd8253(0x152)][_0xfd8253(0x10e)]===0x1;}async[_0x2ab71b(0x168)](_0x4bb8ef){const _0x312e98=_0x2ab71b,{unitId:_0x1dcf95}=_0x4bb8ef,_0x4fd8e4=_0x4bb8ef[_0x312e98(0x122)],_0x268b4d={'memberId':this[_0x312e98(0x163)][_0x312e98(0x117)]()['userID'],'unitId':_0x1dcf95,'threadId':_0x4fd8e4,'solved':_0x4bb8ef[_0x312e98(0x137)]?I['Solved']:I[_0x312e98(0x15f)]},_0x5b2eae=await this['_httpService'][_0x312e98(0x127)](_0x312e98(0x155)+_0x1dcf95+'/solved',{'body':_0x268b4d});return!_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)]||_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)][_0x312e98(0x10e)]===0x1;}async[_0x2ab71b(0x12b)](_0x455186,_0x22db3d,_0x185ec1,_0x4ab50b){const _0x223ee2=_0x2ab71b,_0xafe0e8={'memberId':(await this['_sessionService']['requireSession'](_0x455186))['getMemberID'](),'threadId':_0x185ec1,'replyId':_0x4ab50b,'unitId':_0x455186},_0x1ad951=await this[_0x223ee2(0x114)]['post'](_0x223ee2(0x155)+_0x455186+_0x223ee2(0x169),{'body':_0xafe0e8});return!_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]||_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]['code']===0x1;}async[_0x2ab71b(0x147)](_0xeec0d3,_0x3e733d,_0x47d842){const _0x4e5d07=_0x2ab71b,_0x35d037={'unitId':_0xeec0d3,'threadId':_0x47d842},_0xc7fa44=await this[_0x4e5d07(0x114)][_0x4e5d07(0x127)](_0x4e5d07(0x155)+_0xeec0d3+'/list',{'body':_0x35d037}),_0x36445f=_0x47d842['map'](_0x5c4c53=>ee(_0xc7fa44['body']['comments'][_0x5c4c53],_0xeec0d3,_0x3e733d))['filter'](Boolean);return Object['values'](_0xc7fa44[_0x4e5d07(0x133)]['users'])[_0x4e5d07(0x12f)](_0x23e15c=>{const _0x32b23e=_0x4e5d07;this[_0x32b23e(0x163)][_0x32b23e(0x140)](_0x23e15c);}),_0x36445f;}[_0x2ab71b(0x10f)](_0x1c0d1e){const _0x78531e=_0x2ab71b;return{'id':_0x1c0d1e['id'],'threadId':_0x1c0d1e[_0x78531e(0x122)],'ref':_0x1c0d1e['ref']};}};f=Q([_(0x0,_0x785250(_0x497553)),_(0x1,_0x785250(_0x3d1032)),_(0x2,_0x785250(_0x34e856)),_(0x3,_0x785250(_0x231213))],f);var re=Object[_0x2ab71b(0x13b)],te=(_0xee91bb,_0x235a59,_0x52de03,_0x28f217)=>{const _0x33cd5f=_0x2ab71b;for(var _0x1ddc58=_0x28f217>0x1?void 0x0:_0x28f217?re(_0x235a59,_0x52de03):_0x235a59,_0x46c8dd=_0xee91bb[_0x33cd5f(0x153)]-0x1,_0x5b236d;_0x46c8dd>=0x0;_0x46c8dd--)(_0x5b236d=_0xee91bb[_0x46c8dd])&&(_0x1ddc58=_0x5b236d(_0x1ddc58)||_0x1ddc58);return _0x1ddc58;},N=(_0x3bc0bf,_0x503314)=>(_0x2f4b4a,_0x62c6da)=>_0x503314(_0x2f4b4a,_0x62c6da,_0x3bc0bf);let g=class extends _0x607ca7{constructor(_0x496bfb,_0x18d088){const _0x12107a=_0x2ab71b;super(),this[_0x12107a(0x158)]=_0x496bfb,this[_0x12107a(0x116)]=_0x18d088,this['_initDataSource']();}[_0x2ab71b(0x13e)](){const _0x78f09c=_0x2ab71b;this[_0x78f09c(0x158)][_0x78f09c(0x148)]=this['_threadCommentDataSource'],this[_0x78f09c(0x158)][_0x78f09c(0x126)]=!0x1;}};g=te([N(0x0,_0x50d9f5),N(0x1,_0x785250(f))],g);var se=Object[_0x2ab71b(0x130)],oe=Object[_0x2ab71b(0x13b)],ne=(_0x5afe2e,_0x297d62,_0x4e0b46)=>_0x297d62 in _0x5afe2e?se(_0x5afe2e,_0x297d62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e0b46}):_0x5afe2e[_0x297d62]=_0x4e0b46,ie=(_0x5ccbe7,_0x290ef1,_0x3e4c99,_0x15879e)=>{const _0x541509=_0x2ab71b;for(var _0x98df6b=_0x15879e>0x1?void 0x0:_0x15879e?oe(_0x290ef1,_0x3e4c99):_0x290ef1,_0x5e6139=_0x5ccbe7[_0x541509(0x153)]-0x1,_0x2fba5a;_0x5e6139>=0x0;_0x5e6139--)(_0x2fba5a=_0x5ccbe7[_0x5e6139])&&(_0x98df6b=_0x2fba5a(_0x98df6b)||_0x98df6b);return _0x98df6b;},w=(_0xea0248,_0x358841)=>(_0x3e97ed,_0x58bffa)=>_0x358841(_0x3e97ed,_0x58bffa,_0xea0248),$=(_0x17b0d1,_0x5711cb,_0x4b0b5f)=>ne(_0x17b0d1,typeof _0x5711cb!='symbol'?_0x5711cb+'':_0x5711cb,_0x4b0b5f);function _0xe5c9(_0x4a38c2,_0x8d6108){const _0x1f394c=_0x1f39();return _0xe5c9=function(_0xe5c9ee,_0x7ac369){_0xe5c9ee=_0xe5c9ee-0x10a;let _0x48fc34=_0x1f394c[_0xe5c9ee];return _0x48fc34;},_0xe5c9(_0x4a38c2,_0x8d6108);}let b=class extends _0x5c0206{constructor(_0x495a2a=M,_0x37133d,_0x36f526){const _0x47243e=_0x2ab71b;super(),this['_config']=_0x495a2a,this['_injector']=_0x37133d,this[_0x47243e(0x14b)]=_0x36f526;const {..._0x4ed11a}=_0x4eb6ff({},M,this[_0x47243e(0x12c)]);this['_configService']['setConfig'](z,_0x4ed11a);}[_0x2ab71b(0x154)](){const _0x4bd321=_0x2ab71b;[[f],[g],[S]][_0x4bd321(0x12f)](_0x22db10=>{const _0x353cae=_0x4bd321;this[_0x353cae(0x166)][_0x353cae(0x142)](_0x22db10);});}['onReady'](){const _0x2ef20d=_0x2ab71b;this[_0x2ef20d(0x166)][_0x2ef20d(0x111)](g),this[_0x2ef20d(0x166)]['get'](S);}};$(b,_0x2ab71b(0x16b),W),$(b,_0x2ab71b(0x10b),_0x35c6da[_0x2ab71b(0x119)]),b=ie([_0x5cc80e(_0x5b3fcf,_0x49c8f9,_0x333fa5),w(0x1,_0x785250(_0x231213)),w(0x2,_0x49ccea)],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 _0x59e9(){const _0x39bcaa=['UniverCollaborationClientPlugin','@univerjs-pro/license','exports','YYYY/MM/DD\x20HH:mm','269316dTaOjj','users','toStringTag','_config','replyId','pipe','OpenOrReOpen','getComment','filter','find','map','createTimestamp','UniverThreadComment','89344mXrBaO','1SgznuY','UniverThreadCommentUIPlugin','getUser','length','syncUpdateMutationToColla','275XSBjWF','Reply','payload','UniverProThreadCommentDatasource','Disposable','size','rxjs','Solved','_commentService','381074REzvYa','123070OBmBXw','getMemberID','listComments','getCurrentUser','onReady','dataSource','reply','user','personId','_init','/universer-api/comment/unit/','_injector','4yjFxvg','HTTPService','dayjs','_initDataSource','12443054arONrH','@univerjs-pro/collaboration-client','Edit','/list','595980gaOFiq','commentUpdate$','resolveComment','ThreadCommentModel','content','Inject','type','solved','forEach','addUser','CustomRangeType','/edit','UNIVER_UNKNOWN','post','ref','values','UNRECOGNIZED','getOwnPropertyDescriptor','defineProperty','comments','addComment','parse','1989474HuByQw','CollaborationSessionService','_threadCommentModel','@univerjs/core','format','get','IConfigService','126hpulVS','Module','saveCommentToSnapshot','customRanges','userId','DependentOn','threadId','UserManagerService','Solve','stringify','unitId','@univerjs/thread-comment','/add','UniverNetwork','add','_userService','requireSession','parentId','getUnit','UniverInstanceType','rangeId','onStarting','userID','UniverProLicense','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','707TLBgLq','@univerjs/thread-comment-ui','body','UniverCore','_initUserSync','_httpService','_sessionService','thread-comment-data-source.config','COMMENT','updateComment','setConfig','Plugin','bufferTime','code','Delete','resolved','replies','Add','190ATBzag','_configService','rangeType','_threadCommentDataSourceService','_threadCommentDataSource','pluginName','error'];_0x59e9=function(){return _0x39bcaa;};return _0x59e9();}function _0x1c13(_0x3a8a1a,_0x4abe03){const _0x59e9e8=_0x59e9();return _0x1c13=function(_0x1c1373,_0x4b811f){_0x1c1373=_0x1c1373-0x170;let _0x4666fd=_0x59e9e8[_0x1c1373];return _0x4666fd;},_0x1c13(_0x3a8a1a,_0x4abe03);}(function(_0x55d524,_0x4b59af){const _0x59de5e=_0x1c13,_0x46b1ce=_0x55d524();while(!![]){try{const _0x2f3464=-parseInt(_0x59de5e(0x1d8))/0x1*(-parseInt(_0x59de5e(0x1e6))/0x2)+-parseInt(_0x59de5e(0x18c))/0x3*(parseInt(_0x59de5e(0x1f3))/0x4)+parseInt(_0x59de5e(0x1e7))/0x5*(parseInt(_0x59de5e(0x193))/0x6)+parseInt(_0x59de5e(0x1ad))/0x7*(parseInt(_0x59de5e(0x1d7))/0x8)+-parseInt(_0x59de5e(0x176))/0x9*(-parseInt(_0x59de5e(0x1bf))/0xa)+parseInt(_0x59de5e(0x1dd))/0xb*(-parseInt(_0x59de5e(0x1ca))/0xc)+-parseInt(_0x59de5e(0x172))/0xd;if(_0x2f3464===_0x4b59af)break;else _0x46b1ce['push'](_0x46b1ce['shift']());}catch(_0x1a6ebd){_0x46b1ce['push'](_0x46b1ce['shift']());}}}(_0x59e9,0xdeb3c),function(_0x36d218,_0x3162b3){const _0x51e6a4=_0x1c13;typeof exports=='object'&&typeof module<'u'?_0x3162b3(exports,require(_0x51e6a4(0x173)),require(_0x51e6a4(0x1c7)),require('@univerjs/core'),require(_0x51e6a4(0x1ae)),require(_0x51e6a4(0x19e)),require(_0x51e6a4(0x1e3)),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x51e6a4(0x1c8),_0x51e6a4(0x173),_0x51e6a4(0x1c7),_0x51e6a4(0x18f),_0x51e6a4(0x1ae),_0x51e6a4(0x19e),'rxjs','@univerjs/network'],_0x3162b3):(_0x36d218=typeof globalThis<'u'?globalThis:_0x36d218||self,_0x3162b3(_0x36d218[_0x51e6a4(0x1e0)]={},_0x36d218['UniverProCollaborationClient'],_0x36d218[_0x51e6a4(0x1aa)],_0x36d218[_0x51e6a4(0x1b0)],_0x36d218['UniverThreadCommentUi'],_0x36d218[_0x51e6a4(0x1d6)],_0x36d218[_0x51e6a4(0x1e3)],_0x36d218[_0x51e6a4(0x1a0)]));}(this,function(_0x4c9c42,_0x56d33,_0x2b8469,_0x4db6d5,_0x573e60,_0x31e269,_0x55c955,_0x21f292){'use strict';const _0x5f2104=_0x1c13;const _0x2e64ca=_0x5f2104(0x1ac);var _0x5f251f=(_0x2fd33c=>(_0x2fd33c[_0x2fd33c[_0x5f2104(0x1d0)]=0x0]='OpenOrReOpen',_0x2fd33c[_0x2fd33c[_0x5f2104(0x1e4)]=0x1]=_0x5f2104(0x1e4),_0x2fd33c[_0x2fd33c[_0x5f2104(0x186)]=-0x1]='UNRECOGNIZED',_0x2fd33c))(_0x5f251f||{}),_0x361f5a=(_0x1f810c=>(_0x1f810c[_0x1f810c['Unknown']=0x0]='Unknown',_0x1f810c[_0x1f810c['Add']=0x1]=_0x5f2104(0x1be),_0x1f810c[_0x1f810c['Reply']=0x2]=_0x5f2104(0x1de),_0x1f810c[_0x1f810c[_0x5f2104(0x174)]=0x3]=_0x5f2104(0x174),_0x1f810c[_0x1f810c[_0x5f2104(0x1bb)]=0x4]=_0x5f2104(0x1bb),_0x1f810c[_0x1f810c[_0x5f2104(0x19b)]=0x5]=_0x5f2104(0x19b),_0x1f810c[_0x1f810c['UNRECOGNIZED']=-0x1]=_0x5f2104(0x186),_0x1f810c))(_0x361f5a||{});const _0x327fff=_0x6952eb=>_0x4db6d5[_0x5f2104(0x170)](new Date(+_0x6952eb))['format'](_0x5f2104(0x1c9)),_0x4e188d=async(_0x4470fb,_0x3f84a5)=>{const _0x383e49=_0x5f2104,_0x1b8327=_0x4470fb[_0x383e49(0x191)](_0x4db6d5[_0x383e49(0x19a)]),_0x123639=_0x4470fb[_0x383e49(0x191)](_0x21f292[_0x383e49(0x1f4)]);_0x3f84a5['forEach'](_0x26273a=>{const _0x2b4e94=_0x383e49;_0x1b8327[_0x2b4e94(0x1da)](_0x26273a)&&_0x3f84a5['delete'](_0x26273a);}),_0x3f84a5[_0x383e49(0x1e2)]&&(await _0x123639[_0x383e49(0x191)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3f84a5]}}))[_0x383e49(0x1af)]['users']['forEach'](_0x4ad094=>{const _0x184f62=_0x383e49;_0x4ad094&&_0x1b8327[_0x184f62(0x17f)](_0x4ad094);});};var _0x5297a1=Object[_0x5f2104(0x187)],_0x1be2c1=(_0x520d8f,_0x39bd46,_0xf4280d,_0x325b48)=>{const _0x5e6f17=_0x5f2104;for(var _0x58e62b=_0x325b48>0x1?void 0x0:_0x325b48?_0x5297a1(_0x39bd46,_0xf4280d):_0x39bd46,_0x1a1ac5=_0x520d8f[_0x5e6f17(0x1db)]-0x1,_0x5574c9;_0x1a1ac5>=0x0;_0x1a1ac5--)(_0x5574c9=_0x520d8f[_0x1a1ac5])&&(_0x58e62b=_0x5574c9(_0x58e62b)||_0x58e62b);return _0x58e62b;},_0x2cd593=(_0x3e4549,_0x4837b5)=>(_0x39afa5,_0x3f0523)=>_0x4837b5(_0x39afa5,_0x3f0523,_0x3e4549);let _0xd04f3c=class extends _0x4db6d5['Disposable']{constructor(_0x4fa6c8,_0x512f0c,_0x50a0e6,_0x1f8dcf){const _0x1ffa0d=_0x5f2104;super(),this[_0x1ffa0d(0x1e5)]=_0x4fa6c8,this['_threadCommentModel']=_0x512f0c,this[_0x1ffa0d(0x1a2)]=_0x50a0e6,this[_0x1ffa0d(0x1f2)]=_0x1f8dcf,this[_0x1ffa0d(0x1f0)](),this[_0x1ffa0d(0x1b1)]();}[_0x5f2104(0x1b1)](){const _0x15171b=_0x5f2104;this['disposeWithMe'](this[_0x15171b(0x18e)][_0x15171b(0x177)][_0x15171b(0x1cf)](_0x55c955[_0x15171b(0x1b9)](0x10))['subscribe'](_0x3b4867=>{const _0x471e3b=_0x15171b,_0x15da93=new Set();_0x3b4867[_0x471e3b(0x17e)](_0x4f936c=>{const _0x2e9dce=_0x471e3b;switch(_0x4f936c['type']){case _0x2e9dce(0x1a1):{const _0x31d3df=_0x4f936c[_0x2e9dce(0x1df)][_0x2e9dce(0x1ef)];_0x15da93[_0x2e9dce(0x1a1)](_0x31d3df);break;}}}),_0x4e188d(this[_0x471e3b(0x1f2)],_0x15da93);}));}[_0x5f2104(0x1f0)](){const _0x12edeb=_0x5f2104;this['disposeWithMe'](this[_0x12edeb(0x1e5)][_0x12edeb(0x177)]['subscribe'](async _0x592ba8=>{const _0x11803b=_0x12edeb;var _0x14f298,_0x519605,_0x18e520,_0x49b2ff;const _0x19bda3=(_0x14f298=this[_0x11803b(0x18e)][_0x11803b(0x1a5)](_0x592ba8[_0x11803b(0x19d)])[_0x11803b(0x1d3)](_0x38b119=>_0x38b119[_0x11803b(0x199)]===_0x592ba8[_0x11803b(0x199)]))==null?void 0x0:_0x14f298['root'];if(!_0x19bda3)return;const {unitId:_0x367e26,subUnitId:_0x221c6a}=_0x19bda3;switch(_0x592ba8[_0x11803b(0x1ee)]&&this[_0x11803b(0x1a2)]['addUser'](_0x592ba8[_0x11803b(0x1ee)]),_0x592ba8[_0x11803b(0x17c)]){case _0x361f5a[_0x11803b(0x1be)]:break;case _0x361f5a[_0x11803b(0x1de)]:{this['_threadCommentModel'][_0x11803b(0x18a)](_0x367e26,_0x221c6a,{'unitId':_0x367e26,'subUnitId':_0x221c6a,'ref':'','id':_0x592ba8[_0x11803b(0x1ce)],'dT':_0x327fff(+_0x592ba8[_0x11803b(0x1d5)]),'threadId':_0x592ba8[_0x11803b(0x199)],'personId':(_0x18e520=(_0x519605=_0x592ba8[_0x11803b(0x1ee)])==null?void 0x0:_0x519605[_0x11803b(0x1a9)])!=null?_0x18e520:_0x592ba8[_0x11803b(0x197)],'text':JSON[_0x11803b(0x18b)](_0x592ba8[_0x11803b(0x17a)]),'parentId':_0x19bda3['id']});break;}case _0x361f5a[_0x11803b(0x1bb)]:{const _0xb65af4=this['_threadCommentModel'][_0x11803b(0x1d1)](_0x367e26,_0x221c6a,_0x592ba8[_0x11803b(0x1ce)]);_0xb65af4&&_0xb65af4[_0x11803b(0x1a4)]&&this['_threadCommentModel']['deleteComment'](_0x367e26,_0x221c6a,_0x592ba8[_0x11803b(0x1ce)]);break;}case _0x361f5a['Edit']:{this[_0x11803b(0x18e)]['updateComment'](_0x367e26,_0x221c6a,{'commentId':_0x592ba8[_0x11803b(0x1ce)],'text':JSON[_0x11803b(0x18b)](_0x592ba8[_0x11803b(0x17a)])});break;}case _0x361f5a[_0x11803b(0x19b)]:{const _0x4332fe=(_0x49b2ff=this[_0x11803b(0x18e)][_0x11803b(0x1a5)](_0x592ba8[_0x11803b(0x19d)])[_0x11803b(0x1d3)](_0x275f57=>_0x275f57[_0x11803b(0x199)]===_0x592ba8[_0x11803b(0x199)]))==null?void 0x0:_0x49b2ff['root'];_0x4332fe&&this[_0x11803b(0x18e)][_0x11803b(0x178)](_0x367e26,_0x221c6a,_0x4332fe['id'],_0x592ba8[_0x11803b(0x17d)]===_0x5f251f[_0x11803b(0x1e4)]);break;}}}));}};_0xd04f3c=_0x1be2c1([_0x2cd593(0x0,_0x4db6d5[_0x5f2104(0x17b)](_0x56d33['CommentService'])),_0x2cd593(0x1,_0x4db6d5[_0x5f2104(0x17b)](_0x31e269[_0x5f2104(0x179)])),_0x2cd593(0x2,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5[_0x5f2104(0x19a)])),_0x2cd593(0x3,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5['Injector']))],_0xd04f3c);const _0x27462f=_0x5f2104(0x1b4),_0x1ebf6a={};var _0x243354=Object[_0x5f2104(0x187)],_0x134bdc=(_0x7f48c2,_0x5a2774,_0x201bad,_0x33a14b)=>{const _0x3a0f25=_0x5f2104;for(var _0x39e1ab=_0x33a14b>0x1?void 0x0:_0x33a14b?_0x243354(_0x5a2774,_0x201bad):_0x5a2774,_0xac2a6b=_0x7f48c2[_0x3a0f25(0x1db)]-0x1,_0x3f0f27;_0xac2a6b>=0x0;_0xac2a6b--)(_0x3f0f27=_0x7f48c2[_0xac2a6b])&&(_0x39e1ab=_0x3f0f27(_0x39e1ab)||_0x39e1ab);return _0x39e1ab;},_0x4d3d7d=(_0x9ea745,_0x4362c6)=>(_0x235375,_0x4fb246)=>_0x4362c6(_0x235375,_0x4fb246,_0x9ea745);function _0x45c655(_0x36e16c,_0x26606e){const _0x31fd6f=_0x5f2104,_0x2dd0f0=_0x36e16c[_0x31fd6f(0x1bd)][0x0];return{..._0x26606e,'id':_0x2dd0f0['replyId'],'resolved':_0x36e16c[_0x31fd6f(0x17d)]===0x1,'dT':_0x327fff(_0x2dd0f0[_0x31fd6f(0x1d5)]),'personId':_0x2dd0f0['userId'],'threadId':_0x2dd0f0[_0x31fd6f(0x199)]};}function _0x49c2e9(_0x20d3ff,_0x257308,_0x29a1e3){const _0x3f708e=_0x5f2104;var _0x26304f,_0x30142a;if(((_0x30142a=(_0x26304f=_0x20d3ff==null?void 0x0:_0x20d3ff[_0x3f708e(0x1bd)])==null?void 0x0:_0x26304f['length'])!=null?_0x30142a:0x0)>0x0){const _0x143ee6=(_0x4146da,_0x385da6)=>({'id':_0x4146da[_0x3f708e(0x1ce)],'threadId':_0x4146da[_0x3f708e(0x199)],'dT':_0x327fff(_0x4146da['createTimestamp']),'personId':_0x4146da[_0x3f708e(0x197)],'resolved':_0x20d3ff['solved']===_0x5f251f[_0x3f708e(0x1e4)],'unitId':_0x257308,'subUnitId':_0x29a1e3,'text':JSON[_0x3f708e(0x18b)](_0x4146da[_0x3f708e(0x17a)]),'parentId':_0x385da6}),_0x1b8285=_0x143ee6(_0x20d3ff[_0x3f708e(0x1bd)][0x0]);return{..._0x1b8285,'children':_0x20d3ff[_0x3f708e(0x1bd)]['slice'](0x1)[_0x3f708e(0x1d4)](_0x50940e=>_0x143ee6(_0x50940e,_0x1b8285['id']))};}return null;}let _0x4d429c=class{constructor(_0x446249,_0x4ede34,_0x5edbdb,_0x18538b){const _0x4e772f=_0x5f2104;this['_httpService']=_0x446249,this[_0x4e772f(0x1a2)]=_0x4ede34,this[_0x4e772f(0x1b3)]=_0x5edbdb,this[_0x4e772f(0x1f2)]=_0x18538b;}async[_0x5f2104(0x18a)](_0x2fd2d2){const _0x2857c0=_0x5f2104;var _0x25de1c,_0x4f3a62;const {parentId:_0x43986d,unitId:_0x20f1bd,text:_0x3c7dd1,threadId:_0x1d5fcb}=_0x2fd2d2,_0x2f355e=(_0x4f3a62=(_0x25de1c=_0x3c7dd1[_0x2857c0(0x196)])==null?void 0x0:_0x25de1c[_0x2857c0(0x1d2)](_0x1834b4=>_0x1834b4[_0x2857c0(0x1c1)]===_0x4db6d5[_0x2857c0(0x180)]['COMMENT'])['map'](_0x54ea16=>_0x54ea16[_0x2857c0(0x1a7)]))!=null?_0x4f3a62:[],_0x208983=JSON['stringify'](_0x3c7dd1),_0x5ec605=(await this[_0x2857c0(0x1b3)][_0x2857c0(0x1a3)](_0x20f1bd))[_0x2857c0(0x1e8)]();if(_0x43986d){const _0x500862={'memberId':_0x5ec605,'unitId':_0x20f1bd,'content':_0x208983,'mention':_0x2f355e,'threadId':_0x1d5fcb},_0x2a439f=(await this[_0x2857c0(0x1b2)][_0x2857c0(0x183)](_0x2857c0(0x1f1)+_0x20f1bd+'/reply',{'body':_0x500862}))['body'][_0x2857c0(0x1ed)];return{..._0x2fd2d2,'id':_0x2a439f[_0x2857c0(0x1ce)],'dT':_0x4db6d5[_0x2857c0(0x170)](+_0x2a439f[_0x2857c0(0x1d5)])[_0x2857c0(0x190)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2a439f[_0x2857c0(0x197)]};}else{const _0x318f4f={'memberId':_0x5ec605,'unitId':_0x20f1bd,'content':_0x208983,'mention':_0x2f355e},_0x36a39f=await this['_httpService']['post'](_0x2857c0(0x1f1)+_0x20f1bd+_0x2857c0(0x19f),{'body':_0x318f4f});return _0x45c655(_0x36a39f['body']['comment'],_0x2fd2d2);}}async[_0x5f2104(0x1b6)](_0x11b119){const _0x4e464d=_0x5f2104;var _0x1714c7,_0x1ac762;const {text:_0x330f1f,unitId:_0x3c56cb}=_0x11b119,_0x409d6d=(_0x1ac762=(_0x1714c7=_0x330f1f['customRanges'])==null?void 0x0:_0x1714c7[_0x4e464d(0x1d2)](_0x2b30c4=>_0x2b30c4[_0x4e464d(0x1c1)]===_0x4db6d5[_0x4e464d(0x180)][_0x4e464d(0x1b5)])['map'](_0x57c6d5=>_0x57c6d5[_0x4e464d(0x1a7)]))!=null?_0x1ac762:[],_0x5622b7=JSON[_0x4e464d(0x19c)](_0x330f1f),_0x3c5f75=_0x11b119['threadId'],_0x781d40=_0x11b119['id'],_0x3cb78d={'memberId':(await this['_sessionService'][_0x4e464d(0x1a3)](_0x3c56cb))[_0x4e464d(0x1e8)](),'unitId':_0x3c56cb,'threadId':_0x3c5f75,'mention':_0x409d6d,'content':_0x5622b7,'replyId':_0x781d40},_0x592b34=await this[_0x4e464d(0x1b2)][_0x4e464d(0x183)](_0x4e464d(0x1f1)+_0x3c56cb+_0x4e464d(0x181),{'body':_0x3cb78d});return!_0x592b34[_0x4e464d(0x1af)][_0x4e464d(0x1c5)]||_0x592b34[_0x4e464d(0x1af)]['error'][_0x4e464d(0x1ba)]===0x1;}async[_0x5f2104(0x178)](_0x2f358f){const _0x2851af=_0x5f2104,{unitId:_0x3dadca}=_0x2f358f,_0x3a0890=_0x2f358f[_0x2851af(0x199)],_0x264c7a={'memberId':this[_0x2851af(0x1a2)][_0x2851af(0x1ea)]()[_0x2851af(0x1a9)],'unitId':_0x3dadca,'threadId':_0x3a0890,'solved':_0x2f358f[_0x2851af(0x1bc)]?_0x5f251f[_0x2851af(0x1e4)]:_0x5f251f['OpenOrReOpen']},_0x3f9a5b=await this[_0x2851af(0x1b2)]['post']('/universer-api/comment/unit/'+_0x3dadca+'/solved',{'body':_0x264c7a});return!_0x3f9a5b[_0x2851af(0x1af)][_0x2851af(0x1c5)]||_0x3f9a5b[_0x2851af(0x1af)]['error'][_0x2851af(0x1ba)]===0x1;}async['deleteComment'](_0x3ddef4,_0x5713c4,_0x11c287,_0x3dc0bd){const _0x315ad1=_0x5f2104,_0xc8e981={'memberId':(await this[_0x315ad1(0x1b3)][_0x315ad1(0x1a3)](_0x3ddef4))['getMemberID'](),'threadId':_0x11c287,'replyId':_0x3dc0bd,'unitId':_0x3ddef4},_0x4ed3b6=await this['_httpService'][_0x315ad1(0x183)](_0x315ad1(0x1f1)+_0x3ddef4+'/delete',{'body':_0xc8e981});return!_0x4ed3b6[_0x315ad1(0x1af)][_0x315ad1(0x1c5)]||_0x4ed3b6['body'][_0x315ad1(0x1c5)][_0x315ad1(0x1ba)]===0x1;}async[_0x5f2104(0x1e9)](_0x36d149,_0x511748,_0x244dd3){const _0x33fe64=_0x5f2104,_0x3b3463={'unitId':_0x36d149,'threadId':_0x244dd3},_0x1d649f=await this[_0x33fe64(0x1b2)][_0x33fe64(0x183)](_0x33fe64(0x1f1)+_0x36d149+_0x33fe64(0x175),{'body':_0x3b3463}),_0x4cb36c=_0x244dd3[_0x33fe64(0x1d4)](_0x2cee0e=>_0x49c2e9(_0x1d649f[_0x33fe64(0x1af)][_0x33fe64(0x189)][_0x2cee0e],_0x36d149,_0x511748))['filter'](Boolean);return Object[_0x33fe64(0x185)](_0x1d649f[_0x33fe64(0x1af)][_0x33fe64(0x1cb)])[_0x33fe64(0x17e)](_0x37025e=>{const _0x3b4c59=_0x33fe64;this[_0x3b4c59(0x1a2)][_0x3b4c59(0x17f)](_0x37025e);}),_0x4cb36c;}[_0x5f2104(0x195)](_0x118007){const _0x36e9dc=_0x5f2104;return{'id':_0x118007['id'],'threadId':_0x118007[_0x36e9dc(0x199)],'ref':_0x118007[_0x36e9dc(0x184)]};}};_0x4d429c=_0x134bdc([_0x4d3d7d(0x0,_0x4db6d5['Inject'](_0x21f292[_0x5f2104(0x1f4)])),_0x4d3d7d(0x1,_0x4db6d5['Inject'](_0x4db6d5['UserManagerService'])),_0x4d3d7d(0x2,_0x4db6d5[_0x5f2104(0x17b)](_0x56d33[_0x5f2104(0x18d)])),_0x4d3d7d(0x3,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5[_0x5f2104(0x1ab)]))],_0x4d429c);var _0x2a049b=Object['getOwnPropertyDescriptor'],_0x3a82d7=(_0x41ed67,_0x1143ea,_0x226cb4,_0x11a2b3)=>{for(var _0x4da85d=_0x11a2b3>0x1?void 0x0:_0x11a2b3?_0x2a049b(_0x1143ea,_0x226cb4):_0x1143ea,_0x388e6e=_0x41ed67['length']-0x1,_0x2445ba;_0x388e6e>=0x0;_0x388e6e--)(_0x2445ba=_0x41ed67[_0x388e6e])&&(_0x4da85d=_0x2445ba(_0x4da85d)||_0x4da85d);return _0x4da85d;},_0x22ff95=(_0x3a57a7,_0x3a55b1)=>(_0x7b3141,_0x493cae)=>_0x3a55b1(_0x7b3141,_0x493cae,_0x3a57a7);let _0x4a98a2=class extends _0x4db6d5[_0x5f2104(0x1e1)]{constructor(_0x3759b7,_0x3b1c67){const _0x2bbcba=_0x5f2104;super(),this['_threadCommentDataSourceService']=_0x3759b7,this['_threadCommentDataSource']=_0x3b1c67,this[_0x2bbcba(0x171)]();}[_0x5f2104(0x171)](){const _0x27fbb7=_0x5f2104;this[_0x27fbb7(0x1c2)][_0x27fbb7(0x1ec)]=this[_0x27fbb7(0x1c3)],this[_0x27fbb7(0x1c2)][_0x27fbb7(0x1dc)]=!0x1;}};_0x4a98a2=_0x3a82d7([_0x22ff95(0x0,_0x31e269['IThreadCommentDataSourceService']),_0x22ff95(0x1,_0x4db6d5[_0x5f2104(0x17b)](_0x4d429c))],_0x4a98a2);var _0x3aa5bb=Object[_0x5f2104(0x188)],_0x3f72c5=Object[_0x5f2104(0x187)],_0x53bfc8=(_0x10ae59,_0x5ee202,_0x2e8318)=>_0x5ee202 in _0x10ae59?_0x3aa5bb(_0x10ae59,_0x5ee202,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e8318}):_0x10ae59[_0x5ee202]=_0x2e8318,_0x75fa9b=(_0x4177dd,_0x1afc40,_0x4e6862,_0x2b64bb)=>{for(var _0x58fa3a=_0x2b64bb>0x1?void 0x0:_0x2b64bb?_0x3f72c5(_0x1afc40,_0x4e6862):_0x1afc40,_0x16eb59=_0x4177dd['length']-0x1,_0x23017c;_0x16eb59>=0x0;_0x16eb59--)(_0x23017c=_0x4177dd[_0x16eb59])&&(_0x58fa3a=_0x23017c(_0x58fa3a)||_0x58fa3a);return _0x58fa3a;},_0x3fd815=(_0x3d7e18,_0x5d4f4a)=>(_0x1dd298,_0x20c4c2)=>_0x5d4f4a(_0x1dd298,_0x20c4c2,_0x3d7e18),_0x334345=(_0x33d7db,_0x33f734,_0x45b017)=>_0x53bfc8(_0x33d7db,typeof _0x33f734!='symbol'?_0x33f734+'':_0x33f734,_0x45b017);_0x4c9c42['UniverThreadCommentDataSourcePlugin']=class extends _0x4db6d5[_0x5f2104(0x1b8)]{constructor(_0x2622cf=_0x1ebf6a,_0x712a31,_0x56392a){const _0x309d1f=_0x5f2104;super(),this[_0x309d1f(0x1cd)]=_0x2622cf,this[_0x309d1f(0x1f2)]=_0x712a31,this[_0x309d1f(0x1c0)]=_0x56392a;const {..._0x18ca64}=_0x4db6d5['merge']({},_0x1ebf6a,this[_0x309d1f(0x1cd)]);this[_0x309d1f(0x1c0)][_0x309d1f(0x1b7)](_0x27462f,_0x18ca64);}[_0x5f2104(0x1a8)](){const _0x4968fc=_0x5f2104;[[_0x4d429c],[_0x4a98a2],[_0xd04f3c]][_0x4968fc(0x17e)](_0x4d3785=>{const _0x36c76a=_0x4968fc;this[_0x36c76a(0x1f2)][_0x36c76a(0x1a1)](_0x4d3785);});}[_0x5f2104(0x1eb)](){const _0x33a255=_0x5f2104;this[_0x33a255(0x1f2)]['get'](_0x4a98a2),this[_0x33a255(0x1f2)]['get'](_0xd04f3c);}},_0x334345(_0x4c9c42['UniverThreadCommentDataSourcePlugin'],_0x5f2104(0x1c4),_0x2e64ca),_0x334345(_0x4c9c42['UniverThreadCommentDataSourcePlugin'],'type',_0x4db6d5[_0x5f2104(0x1a6)][_0x5f2104(0x182)]),_0x4c9c42['UniverThreadCommentDataSourcePlugin']=_0x75fa9b([_0x4db6d5[_0x5f2104(0x198)](_0x573e60[_0x5f2104(0x1d9)],_0x56d33[_0x5f2104(0x1c6)],_0x2b8469['UniverLicensePlugin']),_0x3fd815(0x1,_0x4db6d5['Inject'](_0x4db6d5[_0x5f2104(0x1ab)])),_0x3fd815(0x2,_0x4db6d5[_0x5f2104(0x192)])],_0x4c9c42['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x4c9c42,Symbol[_0x5f2104(0x1cc)],{'value':_0x5f2104(0x194)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.0-beta.0",
3
+ "version": "0.8.0-nightly.202505261607",
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-beta.0",
49
- "@univerjs-pro/license": "0.8.0-beta.0",
50
- "@univerjs/network": "0.8.0-beta.0",
48
+ "@univerjs-pro/collaboration-client": "0.8.0-nightly.202505261607",
49
+ "@univerjs-pro/license": "0.8.0-nightly.202505261607",
50
+ "@univerjs/core": "0.8.0-nightly.202505261607",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/core": "0.8.0-beta.0",
53
- "@univerjs/thread-comment": "0.8.0-beta.0",
54
- "@univerjs/thread-comment-ui": "0.8.0-beta.0"
52
+ "@univerjs/network": "0.8.0-nightly.202505261607",
53
+ "@univerjs/thread-comment": "0.8.0-nightly.202505261607",
54
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202505261607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",