@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20251227-453e4ff → 0.15.0-insiders.20251227-c108ce3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1e522b=_0x4117;(function(_0x56d183,_0x30f1a2){const _0x5848f3=_0x4117,_0x4a55d1=_0x56d183();while(!![]){try{const _0x4749be=-parseInt(_0x5848f3(0xc6))/0x1*(parseInt(_0x5848f3(0xdb))/0x2)+parseInt(_0x5848f3(0xd8))/0x3+-parseInt(_0x5848f3(0xc8))/0x4*(-parseInt(_0x5848f3(0xcc))/0x5)+parseInt(_0x5848f3(0x11f))/0x6+-parseInt(_0x5848f3(0xc9))/0x7+-parseInt(_0x5848f3(0x122))/0x8*(parseInt(_0x5848f3(0xec))/0x9)+parseInt(_0x5848f3(0x11e))/0xa*(parseInt(_0x5848f3(0x128))/0xb);if(_0x4749be===_0x30f1a2)break;else _0x4a55d1['push'](_0x4a55d1['shift']());}catch(_0x52a918){_0x4a55d1['push'](_0x4a55d1['shift']());}}}(_0x510a,0xd36b6));Object[_0x1e522b(0xf1)](exports,Symbol['toStringTag'],{'value':_0x1e522b(0x101)});function _0x510a(){const _0x8fe7af=['Reply','updateComment','length','getUnit','onStarting','userId','personId','addUser','user','getMemberID','UniverThreadCommentDataSourcePlugin','2294292FiefWx','UniverLicensePlugin','rangeType','1014KfOvVq','_injector','Delete','listComments','Unknown','add','Edit','_threadCommentDataSource','Add','bufferTime','/universer-api/comment/unit/','commentUpdate$','disposeWithMe','CustomRangeType','/list','merge','map','3307464xumwnN','userID','saveCommentToSnapshot','dataSource','root','defineProperty','resolved','_threadCommentDataSourceService','slice','requireSession','get','getCurrentUser','_threadCommentModel','UserManagerService','_initUserSync','solved','getUser','_configService','content','Injector','IThreadCommentDataSourceService','Module','comment','YYYY/MM/DD\x20HH:mm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CommentService','UniverInstanceType','type','Disposable','customRanges','onReady','_config','/add','getComment','UniverCollaborationClientPlugin','values','addComment','replies','COMMENT','users','createTimestamp','UNRECOGNIZED','getOwnPropertyDescriptor','resolveComment','rangeId','post','thread-comment-data-source.config','deleteComment','OpenOrReOpen','Solved','30gUieOH','5802954ekIMan','find','subscribe','32IIKVkd','delete','parse','forEach','stringify','comments','3547907nKxHDu','_httpService','/solved','threadId','filter','_userService','syncUpdateMutationToColla','dayjs','CollaborationSessionService','HTTPService','Solve','replyId','format','error','_initDataSource','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','code','_sessionService','parentId','236TSpuza','body','3056IPYAVe','7846972qxvcJf','Inject','size','5740HGSixx'];_0x510a=function(){return _0x8fe7af;};return _0x510a();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1e522b(0x104);var I=(_0x110166=>(_0x110166[_0x110166[_0x1e522b(0x11c)]=0x0]=_0x1e522b(0x11c),_0x110166[_0x110166[_0x1e522b(0x11d)]=0x1]='Solved',_0x110166[_0x110166['UNRECOGNIZED']=-0x1]=_0x1e522b(0x115),_0x110166))(I||{}),v=(_0x406134=>(_0x406134[_0x406134[_0x1e522b(0xdf)]=0x0]=_0x1e522b(0xdf),_0x406134[_0x406134[_0x1e522b(0xe3)]=0x1]=_0x1e522b(0xe3),_0x406134[_0x406134[_0x1e522b(0xcd)]=0x2]='Reply',_0x406134[_0x406134[_0x1e522b(0xe1)]=0x3]=_0x1e522b(0xe1),_0x406134[_0x406134['Delete']=0x4]=_0x1e522b(0xdd),_0x406134[_0x406134[_0x1e522b(0xbc)]=0x5]=_0x1e522b(0xbc),_0x406134[_0x406134[_0x1e522b(0x115)]=-0x1]=_0x1e522b(0x115),_0x406134))(v||{});const f=_0x3b57f2=>c[_0x1e522b(0xb9)](new Date(+_0x3b57f2))[_0x1e522b(0xbe)](_0x1e522b(0x103)),R=async(_0x396b6e,_0x210e65)=>{const _0x2b0ee9=_0x1e522b,_0x297a2e=_0x396b6e[_0x2b0ee9(0xf6)](c[_0x2b0ee9(0xf9)]),_0x3b085f=_0x396b6e['get'](P['HTTPService']);_0x210e65[_0x2b0ee9(0x125)](_0x1cd3d7=>{const _0x52153f=_0x2b0ee9;_0x297a2e[_0x52153f(0xfc)](_0x1cd3d7)&&_0x210e65[_0x52153f(0x123)](_0x1cd3d7);}),_0x210e65[_0x2b0ee9(0xcb)]&&(await _0x3b085f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x210e65]}}))[_0x2b0ee9(0xc7)][_0x2b0ee9(0x113)][_0x2b0ee9(0x125)](_0x46ef70=>{const _0x228dae=_0x2b0ee9;_0x46ef70&&_0x297a2e[_0x228dae(0xd4)](_0x46ef70);});};var $=Object[_0x1e522b(0x116)],E=(_0x2015d9,_0x773162,_0x251cbd,_0x26324b)=>{const _0x41c383=_0x1e522b;for(var _0x5a8521=_0x26324b>0x1?void 0x0:_0x26324b?$(_0x773162,_0x251cbd):_0x773162,_0xf29172=_0x2015d9[_0x41c383(0xcf)]-0x1,_0x398c72;_0xf29172>=0x0;_0xf29172--)(_0x398c72=_0x2015d9[_0xf29172])&&(_0x5a8521=_0x398c72(_0x5a8521)||_0x5a8521);return _0x5a8521;},S=(_0x5c1f7b,_0x47c392)=>(_0x344bee,_0x2674cb)=>_0x47c392(_0x344bee,_0x2674cb,_0x5c1f7b);let _=class extends c[_0x1e522b(0x108)]{constructor(_0x4966e9,_0x13d24f,_0x5be808,_0x22cf8d){const _0x4e181f=_0x1e522b;super(),this['_commentService']=_0x4966e9,this[_0x4e181f(0xf8)]=_0x13d24f,this[_0x4e181f(0x12d)]=_0x5be808,this[_0x4e181f(0xdc)]=_0x22cf8d,this['_init'](),this['_initUserSync']();}[_0x1e522b(0xfa)](){const _0x4ed48f=_0x1e522b;this[_0x4ed48f(0xe7)](this['_threadCommentModel'][_0x4ed48f(0xe6)]['pipe'](j[_0x4ed48f(0xe4)](0x10))[_0x4ed48f(0x121)](_0x489938=>{const _0x377a06=_0x4ed48f,_0x4a6f25=new Set();_0x489938[_0x377a06(0x125)](_0x55bf33=>{const _0xaf6108=_0x377a06;if(_0x55bf33['type']===_0xaf6108(0xe0)){const _0x2b01e2=_0x55bf33['payload'][_0xaf6108(0xd3)];_0x4a6f25[_0xaf6108(0xe0)](_0x2b01e2);}}),R(this['_injector'],_0x4a6f25);}));}['_init'](){const _0x1dddb8=_0x1e522b;this[_0x1dddb8(0xe7)](this['_commentService'][_0x1dddb8(0xe6)][_0x1dddb8(0x121)](async _0x27bbcd=>{const _0x2d8fbb=_0x1dddb8;var _0x2fd092,_0x3e6e04,_0x39f5c0,_0x265e84;const _0x5785a2=(_0x2fd092=this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xd0)](_0x27bbcd['unitId'])['find'](_0x812114=>_0x812114[_0x2d8fbb(0x12b)]===_0x27bbcd[_0x2d8fbb(0x12b)]))==null?void 0x0:_0x2fd092[_0x2d8fbb(0xf0)];if(!_0x5785a2)return;const {unitId:_0x595653,subUnitId:_0x452fb6}=_0x5785a2;switch(_0x27bbcd[_0x2d8fbb(0xd5)]&&this[_0x2d8fbb(0x12d)]['addUser'](_0x27bbcd[_0x2d8fbb(0xd5)]),_0x27bbcd[_0x2d8fbb(0x107)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x2d8fbb(0x110)](_0x595653,_0x452fb6,{'unitId':_0x595653,'subUnitId':_0x452fb6,'ref':'','id':_0x27bbcd[_0x2d8fbb(0xbd)],'dT':f(+_0x27bbcd[_0x2d8fbb(0x114)]),'threadId':_0x27bbcd['threadId'],'personId':(_0x39f5c0=(_0x3e6e04=_0x27bbcd[_0x2d8fbb(0xd5)])==null?void 0x0:_0x3e6e04[_0x2d8fbb(0xed)])!=null?_0x39f5c0:_0x27bbcd[_0x2d8fbb(0xd2)],'text':JSON[_0x2d8fbb(0x124)](_0x27bbcd[_0x2d8fbb(0xfe)]),'parentId':_0x5785a2['id']});break;}case v['Delete']:{const _0x49ed17=this['_threadCommentModel'][_0x2d8fbb(0x10d)](_0x595653,_0x452fb6,_0x27bbcd[_0x2d8fbb(0xbd)]);_0x49ed17&&_0x49ed17[_0x2d8fbb(0xc5)]&&this[_0x2d8fbb(0xf8)][_0x2d8fbb(0x11b)](_0x595653,_0x452fb6,_0x27bbcd[_0x2d8fbb(0xbd)]);break;}case v[_0x2d8fbb(0xe1)]:{this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xce)](_0x595653,_0x452fb6,{'commentId':_0x27bbcd[_0x2d8fbb(0xbd)],'text':JSON[_0x2d8fbb(0x124)](_0x27bbcd['content'])});break;}case v[_0x2d8fbb(0xbc)]:{const _0x806aa8=(_0x265e84=this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xd0)](_0x27bbcd['unitId'])[_0x2d8fbb(0x120)](_0x29b41f=>_0x29b41f[_0x2d8fbb(0x12b)]===_0x27bbcd['threadId']))==null?void 0x0:_0x265e84[_0x2d8fbb(0xf0)];_0x806aa8&&this[_0x2d8fbb(0xf8)][_0x2d8fbb(0x117)](_0x595653,_0x452fb6,_0x806aa8['id'],_0x27bbcd[_0x2d8fbb(0xfb)]===I[_0x2d8fbb(0x11d)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x1e522b(0x105)])),S(0x1,c[_0x1e522b(0xca)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x1e522b(0xf9)])),S(0x3,c[_0x1e522b(0xca)](c['Injector']))],_);const q=_0x1e522b(0x11a),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xdd4f4d,_0x21126e,_0x1bca17,_0x3553bb)=>{const _0x3d6607=_0x1e522b;for(var _0x44144b=_0x3553bb>0x1?void 0x0:_0x3553bb?A(_0x21126e,_0x1bca17):_0x21126e,_0x110af6=_0xdd4f4d[_0x3d6607(0xcf)]-0x1,_0x143032;_0x110af6>=0x0;_0x110af6--)(_0x143032=_0xdd4f4d[_0x110af6])&&(_0x44144b=_0x143032(_0x44144b)||_0x44144b);return _0x44144b;},C=(_0x52675f,_0x4dd336)=>(_0x5564cd,_0x53a7ac)=>_0x4dd336(_0x5564cd,_0x53a7ac,_0x52675f);function Y(_0xa3b25a,_0x47906a){const _0x34fd91=_0x1e522b,_0x3b435e=_0xa3b25a[_0x34fd91(0x111)][0x0];return{..._0x47906a,'id':_0x3b435e[_0x34fd91(0xbd)],'resolved':_0xa3b25a[_0x34fd91(0xfb)]===0x1,'dT':f(_0x3b435e[_0x34fd91(0x114)]),'personId':_0x3b435e[_0x34fd91(0xd2)],'threadId':_0x3b435e[_0x34fd91(0x12b)]};}function G(_0x2e5f87,_0x2e8d3d,_0x4449eb){const _0x4bbc99=_0x1e522b;var _0x18fe74,_0x18c4c1;if(((_0x18c4c1=(_0x18fe74=_0x2e5f87==null?void 0x0:_0x2e5f87[_0x4bbc99(0x111)])==null?void 0x0:_0x18fe74['length'])!=null?_0x18c4c1:0x0)>0x0){const _0x416c34=(_0xc7224,_0x17c9b9)=>({'id':_0xc7224[_0x4bbc99(0xbd)],'threadId':_0xc7224[_0x4bbc99(0x12b)],'dT':f(_0xc7224['createTimestamp']),'personId':_0xc7224[_0x4bbc99(0xd2)],'resolved':_0x2e5f87[_0x4bbc99(0xfb)]===I[_0x4bbc99(0x11d)],'unitId':_0x2e8d3d,'subUnitId':_0x4449eb,'text':JSON[_0x4bbc99(0x124)](_0xc7224[_0x4bbc99(0xfe)]),'parentId':_0x17c9b9}),_0x1a9bae=_0x416c34(_0x2e5f87[_0x4bbc99(0x111)][0x0]);return{..._0x1a9bae,'children':_0x2e5f87[_0x4bbc99(0x111)][_0x4bbc99(0xf4)](0x1)[_0x4bbc99(0xeb)](_0xcfb727=>_0x416c34(_0xcfb727,_0x1a9bae['id']))};}return null;}let p=class{constructor(_0x52febe,_0x2137c4,_0x39c7f1){const _0xa89b80=_0x1e522b;this[_0xa89b80(0x129)]=_0x52febe,this['_userService']=_0x2137c4,this[_0xa89b80(0xc4)]=_0x39c7f1;}async[_0x1e522b(0x110)](_0x4e2806){const _0x237ec8=_0x1e522b;var _0x4a2adc,_0x499338;const {parentId:_0x60b6b8,unitId:_0x4a9bc5,text:_0x3ac54c,threadId:_0x47bd12}=_0x4e2806,_0x5cd939=(_0x499338=(_0x4a2adc=_0x3ac54c[_0x237ec8(0x109)])==null?void 0x0:_0x4a2adc['filter'](_0x27dd20=>_0x27dd20[_0x237ec8(0xda)]===c[_0x237ec8(0xe8)][_0x237ec8(0x112)])[_0x237ec8(0xeb)](_0x343212=>_0x343212[_0x237ec8(0x118)]))!=null?_0x499338:[],_0x45ce81=JSON[_0x237ec8(0x126)](_0x3ac54c),_0x1949ba=(await this[_0x237ec8(0xc4)][_0x237ec8(0xf5)](_0x4a9bc5))[_0x237ec8(0xd6)]();if(_0x60b6b8){const _0x47ea7d={'memberId':_0x1949ba,'unitId':_0x4a9bc5,'content':_0x45ce81,'mention':_0x5cd939,'threadId':_0x47bd12},_0x2fabc6=(await this['_httpService'][_0x237ec8(0x119)](_0x237ec8(0xe5)+_0x4a9bc5+'/reply',{'body':_0x47ea7d}))[_0x237ec8(0xc7)]['reply'];return{..._0x4e2806,'id':_0x2fabc6[_0x237ec8(0xbd)],'dT':c[_0x237ec8(0xb9)](+_0x2fabc6['createTimestamp'])[_0x237ec8(0xbe)](_0x237ec8(0x103)),'personId':_0x2fabc6[_0x237ec8(0xd2)]};}else{const _0x3d2250={'memberId':_0x1949ba,'unitId':_0x4a9bc5,'content':_0x45ce81,'mention':_0x5cd939},_0x28e8d6=await this[_0x237ec8(0x129)][_0x237ec8(0x119)](_0x237ec8(0xe5)+_0x4a9bc5+_0x237ec8(0x10c),{'body':_0x3d2250});return Y(_0x28e8d6['body'][_0x237ec8(0x102)],_0x4e2806);}}async[_0x1e522b(0xce)](_0x10c0c0){const _0x564860=_0x1e522b;var _0x3ee5cb,_0xd7e3b5;const {text:_0x14bce6,unitId:_0x3b5a23}=_0x10c0c0,_0x5772b7=(_0xd7e3b5=(_0x3ee5cb=_0x14bce6[_0x564860(0x109)])==null?void 0x0:_0x3ee5cb[_0x564860(0x12c)](_0x2a4857=>_0x2a4857[_0x564860(0xda)]===c['CustomRangeType'][_0x564860(0x112)])['map'](_0x4dd0a5=>_0x4dd0a5[_0x564860(0x118)]))!=null?_0xd7e3b5:[],_0x8c7466=JSON[_0x564860(0x126)](_0x14bce6),_0x23ae68=_0x10c0c0[_0x564860(0x12b)],_0x570890=_0x10c0c0['id'],_0x2d2c3={'memberId':(await this[_0x564860(0xc4)][_0x564860(0xf5)](_0x3b5a23))[_0x564860(0xd6)](),'unitId':_0x3b5a23,'threadId':_0x23ae68,'mention':_0x5772b7,'content':_0x8c7466,'replyId':_0x570890},_0x58eb7c=await this[_0x564860(0x129)][_0x564860(0x119)](_0x564860(0xe5)+_0x3b5a23+'/edit',{'body':_0x2d2c3});return!_0x58eb7c[_0x564860(0xc7)][_0x564860(0xbf)]||_0x58eb7c[_0x564860(0xc7)]['error'][_0x564860(0xc3)]===0x1;}async['resolveComment'](_0x1743fe){const _0x4e3e3f=_0x1e522b,{unitId:_0x419b34}=_0x1743fe,_0x5d2566=_0x1743fe['threadId'],_0x3493e3={'memberId':this[_0x4e3e3f(0x12d)][_0x4e3e3f(0xf7)]()[_0x4e3e3f(0xed)],'unitId':_0x419b34,'threadId':_0x5d2566,'solved':_0x1743fe[_0x4e3e3f(0xf2)]?I['Solved']:I['OpenOrReOpen']},_0xfe9359=await this['_httpService'][_0x4e3e3f(0x119)](_0x4e3e3f(0xe5)+_0x419b34+_0x4e3e3f(0x12a),{'body':_0x3493e3});return!_0xfe9359[_0x4e3e3f(0xc7)][_0x4e3e3f(0xbf)]||_0xfe9359[_0x4e3e3f(0xc7)][_0x4e3e3f(0xbf)][_0x4e3e3f(0xc3)]===0x1;}async[_0x1e522b(0x11b)](_0xef69b5,_0x571b35,_0x7947bd,_0x59656f){const _0x371656=_0x1e522b,_0xc98568={'memberId':(await this[_0x371656(0xc4)][_0x371656(0xf5)](_0xef69b5))['getMemberID'](),'threadId':_0x7947bd,'replyId':_0x59656f,'unitId':_0xef69b5},_0x3bff21=await this[_0x371656(0x129)][_0x371656(0x119)](_0x371656(0xe5)+_0xef69b5+'/delete',{'body':_0xc98568});return!_0x3bff21[_0x371656(0xc7)]['error']||_0x3bff21['body'][_0x371656(0xbf)][_0x371656(0xc3)]===0x1;}async[_0x1e522b(0xde)](_0x3f8b6e,_0x56055f,_0x1e9144){const _0x2469e5=_0x1e522b,_0x31d71a={'unitId':_0x3f8b6e,'threadId':_0x1e9144},_0x416016=await this[_0x2469e5(0x129)][_0x2469e5(0x119)]('/universer-api/comment/unit/'+_0x3f8b6e+_0x2469e5(0xe9),{'body':_0x31d71a}),_0x2c8b84=_0x1e9144[_0x2469e5(0xeb)](_0x236830=>G(_0x416016[_0x2469e5(0xc7)][_0x2469e5(0x127)][_0x236830],_0x3f8b6e,_0x56055f))[_0x2469e5(0x12c)](Boolean);return Object[_0x2469e5(0x10f)](_0x416016[_0x2469e5(0xc7)][_0x2469e5(0x113)])[_0x2469e5(0x125)](_0x4e6d97=>{const _0x52ec9b=_0x2469e5;this[_0x52ec9b(0x12d)]['addUser'](_0x4e6d97);}),_0x2c8b84;}[_0x1e522b(0xee)](_0x326db1){return{'id':_0x326db1['id'],'threadId':_0x326db1['threadId'],'ref':_0x326db1['ref']};}};p=x([C(0x0,c['Inject'](P[_0x1e522b(0xbb)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1e522b(0xca)](b[_0x1e522b(0xba)]))],p);var H=Object[_0x1e522b(0x116)],J=(_0x21bd68,_0x3eb8c1,_0x269252,_0x5562c4)=>{const _0x3dbd67=_0x1e522b;for(var _0x3a65cf=_0x5562c4>0x1?void 0x0:_0x5562c4?H(_0x3eb8c1,_0x269252):_0x3eb8c1,_0x4e4e2a=_0x21bd68[_0x3dbd67(0xcf)]-0x1,_0x95d0f4;_0x4e4e2a>=0x0;_0x4e4e2a--)(_0x95d0f4=_0x21bd68[_0x4e4e2a])&&(_0x3a65cf=_0x95d0f4(_0x3a65cf)||_0x3a65cf);return _0x3a65cf;},y=(_0x4cf990,_0x37ec0)=>(_0x8dfa54,_0x1597f4)=>_0x37ec0(_0x8dfa54,_0x1597f4,_0x4cf990);let g=class extends c[_0x1e522b(0x108)]{constructor(_0x502e40,_0x496369){const _0x119d76=_0x1e522b;super(),this[_0x119d76(0xf3)]=_0x502e40,this[_0x119d76(0xe2)]=_0x496369,this[_0x119d76(0xc0)]();}['_initDataSource'](){const _0x5678d6=_0x1e522b;this['_threadCommentDataSourceService'][_0x5678d6(0xef)]=this[_0x5678d6(0xe2)],this[_0x5678d6(0xf3)][_0x5678d6(0x12e)]=!0x1;}};g=J([y(0x0,M[_0x1e522b(0x100)]),y(0x1,c['Inject'](p))],g);function _0x4117(_0x3c872d,_0x44989d){_0x3c872d=_0x3c872d-0xb9;const _0x510aad=_0x510a();let _0x411747=_0x510aad[_0x3c872d];return _0x411747;}var F=Object[_0x1e522b(0xf1)],L=Object[_0x1e522b(0x116)],Z=(_0x2358c7,_0x55fa76,_0x4a04ad)=>_0x55fa76 in _0x2358c7?F(_0x2358c7,_0x55fa76,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a04ad}):_0x2358c7[_0x55fa76]=_0x4a04ad,W=(_0x2cdbce,_0x558daa,_0x2ee825,_0x43c979)=>{const _0x3027a9=_0x1e522b;for(var _0x10d8e4=_0x43c979>0x1?void 0x0:_0x43c979?L(_0x558daa,_0x2ee825):_0x558daa,_0x4d8e2e=_0x2cdbce[_0x3027a9(0xcf)]-0x1,_0x236cfd;_0x4d8e2e>=0x0;_0x4d8e2e--)(_0x236cfd=_0x2cdbce[_0x4d8e2e])&&(_0x10d8e4=_0x236cfd(_0x10d8e4)||_0x10d8e4);return _0x10d8e4;},O=(_0x76693b,_0x218b86)=>(_0x43de39,_0x2c58ff)=>_0x218b86(_0x43de39,_0x2c58ff,_0x76693b),N=(_0x4ba8d5,_0x232e7b,_0x12a61b)=>Z(_0x4ba8d5,typeof _0x232e7b!='symbol'?_0x232e7b+'':_0x232e7b,_0x12a61b);exports[_0x1e522b(0xd7)]=class extends c['Plugin']{constructor(_0x1e632c=D,_0x6c973d,_0x509f66){const _0x4f4724=_0x1e522b;super(),this[_0x4f4724(0x10b)]=_0x1e632c,this['_injector']=_0x6c973d,this[_0x4f4724(0xfd)]=_0x509f66;const {..._0x43d04a}=c[_0x4f4724(0xea)]({},D,this[_0x4f4724(0x10b)]);this[_0x4f4724(0xfd)]['setConfig'](q,_0x43d04a);}[_0x1e522b(0xd1)](){const _0x265734=_0x1e522b;[[p],[g],[_]][_0x265734(0x125)](_0x432823=>{const _0x23f18b=_0x265734;this[_0x23f18b(0xdc)][_0x23f18b(0xe0)](_0x432823);});}[_0x1e522b(0x10a)](){const _0x124f52=_0x1e522b;this['_injector'][_0x124f52(0xf6)](g),this[_0x124f52(0xdc)][_0x124f52(0xf6)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x1e522b(0xd7)],_0x1e522b(0x107),c[_0x1e522b(0x106)][_0x1e522b(0xc2)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x1e522b(0xc1)],b[_0x1e522b(0x10e)],T[_0x1e522b(0xd9)]),O(0x1,c[_0x1e522b(0xca)](c[_0x1e522b(0xff)])),O(0x2,c['IConfigService'])],exports[_0x1e522b(0xd7)]);
|
|
1
|
+
'use strict';const _0xcd5c17=_0x307f;function _0x307f(_0x5ba607,_0x4c34ca){_0x5ba607=_0x5ba607-0x186;const _0x2dee79=_0x2dee();let _0x307f63=_0x2dee79[_0x5ba607];return _0x307f63;}(function(_0x3e19d1,_0x2da014){const _0x1530aa=_0x307f,_0x2f34b8=_0x3e19d1();while(!![]){try{const _0x33fbc2=-parseInt(_0x1530aa(0x1d0))/0x1*(parseInt(_0x1530aa(0x1b3))/0x2)+parseInt(_0x1530aa(0x186))/0x3*(-parseInt(_0x1530aa(0x1d1))/0x4)+parseInt(_0x1530aa(0x1b1))/0x5*(-parseInt(_0x1530aa(0x1b9))/0x6)+-parseInt(_0x1530aa(0x1ee))/0x7*(-parseInt(_0x1530aa(0x202))/0x8)+parseInt(_0x1530aa(0x1d4))/0x9+-parseInt(_0x1530aa(0x1ad))/0xa*(-parseInt(_0x1530aa(0x1bf))/0xb)+-parseInt(_0x1530aa(0x1a5))/0xc*(-parseInt(_0x1530aa(0x1e3))/0xd);if(_0x33fbc2===_0x2da014)break;else _0x2f34b8['push'](_0x2f34b8['shift']());}catch(_0x4b6b71){_0x2f34b8['push'](_0x2f34b8['shift']());}}}(_0x2dee,0x88c5f));function _0x2dee(){const _0x550460=['/delete','/list','11Dlhabk','Plugin','Solved','rangeId','createTimestamp','dayjs','map','/reply','requireSession','Delete','Inject','listComments','parse','replies','_userService','userID','Edit','8266jJKAlw','52rafhmD','rangeType','find','6180543ZRasFW','comments','CustomRangeType','YYYY/MM/DD\x20HH:mm','Reply','error','userId','symbol','users','_injector','getCurrentUser','format','Solve','dataSource','thread-comment-data-source.config','13jhoytF','ThreadCommentModel','bufferTime','_commentService','ref','content','_initDataSource','root','unitId','_httpService','Unknown','546847kKqOpA','size','pluginName','getOwnPropertyDescriptor','_config','threadId','add','Disposable','COMMENT','resolveComment','_threadCommentModel','replyId','_initUserSync','type','commentUpdate$','updateComment','IThreadCommentDataSourceService','/edit','/universer-api/comment/unit/','user','96PViIid','getComment','174918Gftloo','toStringTag','UniverCollaborationClientPlugin','_threadCommentDataSourceService','UNRECOGNIZED','HTTPService','forEach','_configService','addUser','body','Add','setConfig','CollaborationSessionService','length','deleteComment','stringify','disposeWithMe','/add','/solved','merge','comment','values','defineProperty','resolved','get','_sessionService','addComment','_threadCommentDataSource','parentId','IConfigService','pipe','7886988JUUdVd','UniverThreadCommentUIPlugin','post','DependentOn','Injector','filter','getUser','slice','5314340yRbWdM','subscribe','solved','_init','4786855fccKQI','OpenOrReOpen','130ZMqGlu','customRanges','UserManagerService','UniverThreadCommentDataSourcePlugin','onStarting','UNIVER_UNKNOWN','6SvwaSj','getMemberID','code','getUnit'];_0x2dee=function(){return _0x550460;};return _0x2dee();}Object[_0xcd5c17(0x19c)](exports,Symbol[_0xcd5c17(0x187)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5d4770=>(_0x5d4770[_0x5d4770[_0xcd5c17(0x1b2)]=0x0]=_0xcd5c17(0x1b2),_0x5d4770[_0x5d4770[_0xcd5c17(0x1c1)]=0x1]=_0xcd5c17(0x1c1),_0x5d4770[_0x5d4770[_0xcd5c17(0x18a)]=-0x1]=_0xcd5c17(0x18a),_0x5d4770))(I||{}),v=(_0x3e4702=>(_0x3e4702[_0x3e4702[_0xcd5c17(0x1ed)]=0x0]=_0xcd5c17(0x1ed),_0x3e4702[_0x3e4702[_0xcd5c17(0x190)]=0x1]='Add',_0x3e4702[_0x3e4702[_0xcd5c17(0x1d8)]=0x2]='Reply',_0x3e4702[_0x3e4702['Edit']=0x3]='Edit',_0x3e4702[_0x3e4702[_0xcd5c17(0x1c8)]=0x4]=_0xcd5c17(0x1c8),_0x3e4702[_0x3e4702[_0xcd5c17(0x1e0)]=0x5]=_0xcd5c17(0x1e0),_0x3e4702[_0x3e4702[_0xcd5c17(0x18a)]=-0x1]=_0xcd5c17(0x18a),_0x3e4702))(v||{});const f=_0x1ce7c4=>c[_0xcd5c17(0x1c4)](new Date(+_0x1ce7c4))[_0xcd5c17(0x1df)](_0xcd5c17(0x1d7)),R=async(_0x44319e,_0x2b7e98)=>{const _0x7737f2=_0xcd5c17,_0x5a0d76=_0x44319e[_0x7737f2(0x19e)](c[_0x7737f2(0x1b5)]),_0x4d4bed=_0x44319e[_0x7737f2(0x19e)](P[_0x7737f2(0x18b)]);_0x2b7e98[_0x7737f2(0x18c)](_0x457bfc=>{const _0x1c15f1=_0x7737f2;_0x5a0d76[_0x1c15f1(0x1ab)](_0x457bfc)&&_0x2b7e98['delete'](_0x457bfc);}),_0x2b7e98[_0x7737f2(0x1ef)]&&(await _0x4d4bed['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2b7e98]}}))['body'][_0x7737f2(0x1dc)][_0x7737f2(0x18c)](_0x4423cd=>{const _0x4f8e26=_0x7737f2;_0x4423cd&&_0x5a0d76[_0x4f8e26(0x18e)](_0x4423cd);});};var $=Object[_0xcd5c17(0x1f1)],E=(_0x1ff179,_0x55a2c4,_0x180d5d,_0x1e621d)=>{const _0x5b5bd3=_0xcd5c17;for(var _0x116613=_0x1e621d>0x1?void 0x0:_0x1e621d?$(_0x55a2c4,_0x180d5d):_0x55a2c4,_0x25961b=_0x1ff179[_0x5b5bd3(0x193)]-0x1,_0x168d5e;_0x25961b>=0x0;_0x25961b--)(_0x168d5e=_0x1ff179[_0x25961b])&&(_0x116613=_0x168d5e(_0x116613)||_0x116613);return _0x116613;},S=(_0x266d33,_0x1a6762)=>(_0x1bf5d3,_0x19fa41)=>_0x1a6762(_0x1bf5d3,_0x19fa41,_0x266d33);let _=class extends c[_0xcd5c17(0x1f5)]{constructor(_0x50d08d,_0x1e6815,_0x215aeb,_0xb5275a){const _0x100fb3=_0xcd5c17;super(),this[_0x100fb3(0x1e6)]=_0x50d08d,this[_0x100fb3(0x1f8)]=_0x1e6815,this['_userService']=_0x215aeb,this[_0x100fb3(0x1dd)]=_0xb5275a,this[_0x100fb3(0x1b0)](),this['_initUserSync']();}[_0xcd5c17(0x1fa)](){const _0x50d7d4=_0xcd5c17;this[_0x50d7d4(0x196)](this[_0x50d7d4(0x1f8)][_0x50d7d4(0x1fc)][_0x50d7d4(0x1a4)](j[_0x50d7d4(0x1e5)](0x10))[_0x50d7d4(0x1ae)](_0x3fc6de=>{const _0x267fa1=_0x50d7d4,_0x10c0d0=new Set();_0x3fc6de[_0x267fa1(0x18c)](_0x5a0599=>{const _0x3de4ba=_0x267fa1;if(_0x5a0599[_0x3de4ba(0x1fb)]===_0x3de4ba(0x1f4)){const _0x111d05=_0x5a0599['payload']['personId'];_0x10c0d0[_0x3de4ba(0x1f4)](_0x111d05);}}),R(this[_0x267fa1(0x1dd)],_0x10c0d0);}));}[_0xcd5c17(0x1b0)](){const _0x3c6add=_0xcd5c17;this[_0x3c6add(0x196)](this['_commentService'][_0x3c6add(0x1fc)][_0x3c6add(0x1ae)](async _0x2776a1=>{const _0x492bb3=_0x3c6add;var _0x44bf1f,_0x33e75a,_0x55bc65,_0x489210;const _0x27b5cf=(_0x44bf1f=this[_0x492bb3(0x1f8)][_0x492bb3(0x1bc)](_0x2776a1[_0x492bb3(0x1eb)])[_0x492bb3(0x1d3)](_0x4425ec=>_0x4425ec[_0x492bb3(0x1f3)]===_0x2776a1[_0x492bb3(0x1f3)]))==null?void 0x0:_0x44bf1f[_0x492bb3(0x1ea)];if(!_0x27b5cf)return;const {unitId:_0x1da771,subUnitId:_0x3c824c}=_0x27b5cf;switch(_0x2776a1[_0x492bb3(0x201)]&&this['_userService']['addUser'](_0x2776a1['user']),_0x2776a1[_0x492bb3(0x1fb)]){case v[_0x492bb3(0x190)]:break;case v[_0x492bb3(0x1d8)]:{this[_0x492bb3(0x1f8)][_0x492bb3(0x1a0)](_0x1da771,_0x3c824c,{'unitId':_0x1da771,'subUnitId':_0x3c824c,'ref':'','id':_0x2776a1[_0x492bb3(0x1f9)],'dT':f(+_0x2776a1[_0x492bb3(0x1c3)]),'threadId':_0x2776a1[_0x492bb3(0x1f3)],'personId':(_0x55bc65=(_0x33e75a=_0x2776a1[_0x492bb3(0x201)])==null?void 0x0:_0x33e75a[_0x492bb3(0x1ce)])!=null?_0x55bc65:_0x2776a1[_0x492bb3(0x1da)],'text':JSON[_0x492bb3(0x1cb)](_0x2776a1[_0x492bb3(0x1e8)]),'parentId':_0x27b5cf['id']});break;}case v[_0x492bb3(0x1c8)]:{const _0x192863=this[_0x492bb3(0x1f8)][_0x492bb3(0x203)](_0x1da771,_0x3c824c,_0x2776a1[_0x492bb3(0x1f9)]);_0x192863&&_0x192863[_0x492bb3(0x1a2)]&&this[_0x492bb3(0x1f8)][_0x492bb3(0x194)](_0x1da771,_0x3c824c,_0x2776a1['replyId']);break;}case v[_0x492bb3(0x1cf)]:{this[_0x492bb3(0x1f8)][_0x492bb3(0x1fd)](_0x1da771,_0x3c824c,{'commentId':_0x2776a1[_0x492bb3(0x1f9)],'text':JSON[_0x492bb3(0x1cb)](_0x2776a1[_0x492bb3(0x1e8)])});break;}case v[_0x492bb3(0x1e0)]:{const _0x3919fa=(_0x489210=this[_0x492bb3(0x1f8)]['getUnit'](_0x2776a1[_0x492bb3(0x1eb)])['find'](_0x4caa30=>_0x4caa30['threadId']===_0x2776a1[_0x492bb3(0x1f3)]))==null?void 0x0:_0x489210[_0x492bb3(0x1ea)];_0x3919fa&&this[_0x492bb3(0x1f8)][_0x492bb3(0x1f7)](_0x1da771,_0x3c824c,_0x3919fa['id'],_0x2776a1['solved']===I[_0x492bb3(0x1c1)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c['Inject'](M[_0xcd5c17(0x1e4)])),S(0x2,c[_0xcd5c17(0x1c9)](c[_0xcd5c17(0x1b5)])),S(0x3,c[_0xcd5c17(0x1c9)](c[_0xcd5c17(0x1a9)]))],_);const q=_0xcd5c17(0x1e2),D={};var A=Object[_0xcd5c17(0x1f1)],x=(_0x488c3a,_0x5e874d,_0xa27e07,_0x4b9b4e)=>{const _0x2ca24b=_0xcd5c17;for(var _0x1faece=_0x4b9b4e>0x1?void 0x0:_0x4b9b4e?A(_0x5e874d,_0xa27e07):_0x5e874d,_0x5de8ef=_0x488c3a[_0x2ca24b(0x193)]-0x1,_0x547815;_0x5de8ef>=0x0;_0x5de8ef--)(_0x547815=_0x488c3a[_0x5de8ef])&&(_0x1faece=_0x547815(_0x1faece)||_0x1faece);return _0x1faece;},C=(_0x43f89c,_0x178627)=>(_0x5e5652,_0x1138e6)=>_0x178627(_0x5e5652,_0x1138e6,_0x43f89c);function Y(_0x470972,_0x40af3b){const _0x11cb90=_0xcd5c17,_0x353b72=_0x470972[_0x11cb90(0x1cc)][0x0];return{..._0x40af3b,'id':_0x353b72[_0x11cb90(0x1f9)],'resolved':_0x470972[_0x11cb90(0x1af)]===0x1,'dT':f(_0x353b72[_0x11cb90(0x1c3)]),'personId':_0x353b72[_0x11cb90(0x1da)],'threadId':_0x353b72[_0x11cb90(0x1f3)]};}function G(_0x587fe3,_0xc21c59,_0x314c27){const _0x4aa660=_0xcd5c17;var _0x34ae0b,_0xfbe8d1;if(((_0xfbe8d1=(_0x34ae0b=_0x587fe3==null?void 0x0:_0x587fe3[_0x4aa660(0x1cc)])==null?void 0x0:_0x34ae0b[_0x4aa660(0x193)])!=null?_0xfbe8d1:0x0)>0x0){const _0x10b53d=(_0x584eff,_0x6a5bce)=>({'id':_0x584eff[_0x4aa660(0x1f9)],'threadId':_0x584eff[_0x4aa660(0x1f3)],'dT':f(_0x584eff['createTimestamp']),'personId':_0x584eff['userId'],'resolved':_0x587fe3['solved']===I['Solved'],'unitId':_0xc21c59,'subUnitId':_0x314c27,'text':JSON[_0x4aa660(0x1cb)](_0x584eff['content']),'parentId':_0x6a5bce}),_0x146d1b=_0x10b53d(_0x587fe3['replies'][0x0]);return{..._0x146d1b,'children':_0x587fe3[_0x4aa660(0x1cc)][_0x4aa660(0x1ac)](0x1)[_0x4aa660(0x1c5)](_0x1b70ba=>_0x10b53d(_0x1b70ba,_0x146d1b['id']))};}return null;}let p=class{constructor(_0x2e8e97,_0x3518f0,_0x540405){const _0x10d554=_0xcd5c17;this[_0x10d554(0x1ec)]=_0x2e8e97,this['_userService']=_0x3518f0,this['_sessionService']=_0x540405;}async[_0xcd5c17(0x1a0)](_0x33af2c){const _0x3a1841=_0xcd5c17;var _0x5d66c1,_0x28bfed;const {parentId:_0x2b7d9e,unitId:_0x1949f4,text:_0x57539e,threadId:_0x1bde0b}=_0x33af2c,_0x583ab4=(_0x28bfed=(_0x5d66c1=_0x57539e['customRanges'])==null?void 0x0:_0x5d66c1[_0x3a1841(0x1aa)](_0x532ea2=>_0x532ea2[_0x3a1841(0x1d2)]===c['CustomRangeType'][_0x3a1841(0x1f6)])['map'](_0x5fd3d8=>_0x5fd3d8['rangeId']))!=null?_0x28bfed:[],_0x2e8233=JSON[_0x3a1841(0x195)](_0x57539e),_0x3399c9=(await this[_0x3a1841(0x19f)][_0x3a1841(0x1c7)](_0x1949f4))[_0x3a1841(0x1ba)]();if(_0x2b7d9e){const _0x1c1726={'memberId':_0x3399c9,'unitId':_0x1949f4,'content':_0x2e8233,'mention':_0x583ab4,'threadId':_0x1bde0b},_0x35908c=(await this['_httpService'][_0x3a1841(0x1a7)](_0x3a1841(0x200)+_0x1949f4+_0x3a1841(0x1c6),{'body':_0x1c1726}))['body']['reply'];return{..._0x33af2c,'id':_0x35908c[_0x3a1841(0x1f9)],'dT':c['dayjs'](+_0x35908c['createTimestamp'])[_0x3a1841(0x1df)](_0x3a1841(0x1d7)),'personId':_0x35908c[_0x3a1841(0x1da)]};}else{const _0x3dbfe0={'memberId':_0x3399c9,'unitId':_0x1949f4,'content':_0x2e8233,'mention':_0x583ab4},_0x2fda86=await this['_httpService'][_0x3a1841(0x1a7)](_0x3a1841(0x200)+_0x1949f4+_0x3a1841(0x197),{'body':_0x3dbfe0});return Y(_0x2fda86[_0x3a1841(0x18f)][_0x3a1841(0x19a)],_0x33af2c);}}async[_0xcd5c17(0x1fd)](_0x14321d){const _0x32e9f3=_0xcd5c17;var _0x3a6249,_0xf6920a;const {text:_0xdabe38,unitId:_0x18487e}=_0x14321d,_0x2fbd14=(_0xf6920a=(_0x3a6249=_0xdabe38[_0x32e9f3(0x1b4)])==null?void 0x0:_0x3a6249[_0x32e9f3(0x1aa)](_0x44d4f0=>_0x44d4f0[_0x32e9f3(0x1d2)]===c[_0x32e9f3(0x1d6)][_0x32e9f3(0x1f6)])[_0x32e9f3(0x1c5)](_0x5cc699=>_0x5cc699[_0x32e9f3(0x1c2)]))!=null?_0xf6920a:[],_0x714962=JSON['stringify'](_0xdabe38),_0x3e121c=_0x14321d[_0x32e9f3(0x1f3)],_0x66f17e=_0x14321d['id'],_0x1016f3={'memberId':(await this['_sessionService'][_0x32e9f3(0x1c7)](_0x18487e))[_0x32e9f3(0x1ba)](),'unitId':_0x18487e,'threadId':_0x3e121c,'mention':_0x2fbd14,'content':_0x714962,'replyId':_0x66f17e},_0x51be60=await this[_0x32e9f3(0x1ec)]['post']('/universer-api/comment/unit/'+_0x18487e+_0x32e9f3(0x1ff),{'body':_0x1016f3});return!_0x51be60[_0x32e9f3(0x18f)][_0x32e9f3(0x1d9)]||_0x51be60[_0x32e9f3(0x18f)]['error'][_0x32e9f3(0x1bb)]===0x1;}async[_0xcd5c17(0x1f7)](_0xbf063b){const _0x4b4e01=_0xcd5c17,{unitId:_0x5863af}=_0xbf063b,_0x4d4807=_0xbf063b['threadId'],_0x4f5bfc={'memberId':this[_0x4b4e01(0x1cd)][_0x4b4e01(0x1de)]()[_0x4b4e01(0x1ce)],'unitId':_0x5863af,'threadId':_0x4d4807,'solved':_0xbf063b[_0x4b4e01(0x19d)]?I[_0x4b4e01(0x1c1)]:I[_0x4b4e01(0x1b2)]},_0x2bed84=await this[_0x4b4e01(0x1ec)][_0x4b4e01(0x1a7)]('/universer-api/comment/unit/'+_0x5863af+_0x4b4e01(0x198),{'body':_0x4f5bfc});return!_0x2bed84[_0x4b4e01(0x18f)][_0x4b4e01(0x1d9)]||_0x2bed84[_0x4b4e01(0x18f)][_0x4b4e01(0x1d9)][_0x4b4e01(0x1bb)]===0x1;}async[_0xcd5c17(0x194)](_0x33b2ff,_0x14dc12,_0x1fc9c4,_0x435ded){const _0xc60575=_0xcd5c17,_0x2e1763={'memberId':(await this[_0xc60575(0x19f)][_0xc60575(0x1c7)](_0x33b2ff))[_0xc60575(0x1ba)](),'threadId':_0x1fc9c4,'replyId':_0x435ded,'unitId':_0x33b2ff},_0xebee78=await this[_0xc60575(0x1ec)][_0xc60575(0x1a7)]('/universer-api/comment/unit/'+_0x33b2ff+_0xc60575(0x1bd),{'body':_0x2e1763});return!_0xebee78[_0xc60575(0x18f)]['error']||_0xebee78[_0xc60575(0x18f)][_0xc60575(0x1d9)][_0xc60575(0x1bb)]===0x1;}async[_0xcd5c17(0x1ca)](_0x333a4b,_0x34af85,_0x47fbc5){const _0x1f533c=_0xcd5c17,_0x11ea04={'unitId':_0x333a4b,'threadId':_0x47fbc5},_0xf745ab=await this[_0x1f533c(0x1ec)][_0x1f533c(0x1a7)]('/universer-api/comment/unit/'+_0x333a4b+_0x1f533c(0x1be),{'body':_0x11ea04}),_0x31e3f9=_0x47fbc5[_0x1f533c(0x1c5)](_0x2e5d47=>G(_0xf745ab[_0x1f533c(0x18f)][_0x1f533c(0x1d5)][_0x2e5d47],_0x333a4b,_0x34af85))['filter'](Boolean);return Object[_0x1f533c(0x19b)](_0xf745ab[_0x1f533c(0x18f)][_0x1f533c(0x1dc)])['forEach'](_0x5df662=>{const _0x2b7cb1=_0x1f533c;this[_0x2b7cb1(0x1cd)][_0x2b7cb1(0x18e)](_0x5df662);}),_0x31e3f9;}['saveCommentToSnapshot'](_0x588c94){const _0x4da9f1=_0xcd5c17;return{'id':_0x588c94['id'],'threadId':_0x588c94['threadId'],'ref':_0x588c94[_0x4da9f1(0x1e7)]};}};p=x([C(0x0,c[_0xcd5c17(0x1c9)](P['HTTPService'])),C(0x1,c['Inject'](c[_0xcd5c17(0x1b5)])),C(0x2,c['Inject'](b[_0xcd5c17(0x192)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x343991,_0x4e978f,_0x56ad61,_0x30fd45)=>{const _0x404734=_0xcd5c17;for(var _0x289344=_0x30fd45>0x1?void 0x0:_0x30fd45?H(_0x4e978f,_0x56ad61):_0x4e978f,_0x814698=_0x343991[_0x404734(0x193)]-0x1,_0x5f0883;_0x814698>=0x0;_0x814698--)(_0x5f0883=_0x343991[_0x814698])&&(_0x289344=_0x5f0883(_0x289344)||_0x289344);return _0x289344;},y=(_0x16ff44,_0x411ab3)=>(_0x1b5a90,_0x3ccf96)=>_0x411ab3(_0x1b5a90,_0x3ccf96,_0x16ff44);let g=class extends c['Disposable']{constructor(_0x975802,_0x580d66){const _0x21e107=_0xcd5c17;super(),this[_0x21e107(0x189)]=_0x975802,this['_threadCommentDataSource']=_0x580d66,this['_initDataSource']();}[_0xcd5c17(0x1e9)](){const _0x110168=_0xcd5c17;this[_0x110168(0x189)][_0x110168(0x1e1)]=this[_0x110168(0x1a1)],this[_0x110168(0x189)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0xcd5c17(0x1fe)]),y(0x1,c[_0xcd5c17(0x1c9)](p))],g);var F=Object[_0xcd5c17(0x19c)],L=Object['getOwnPropertyDescriptor'],Z=(_0x121840,_0x3279c9,_0x1638f4)=>_0x3279c9 in _0x121840?F(_0x121840,_0x3279c9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1638f4}):_0x121840[_0x3279c9]=_0x1638f4,W=(_0xcd165b,_0xab43ae,_0x2c12f3,_0x2380ef)=>{for(var _0x9b98db=_0x2380ef>0x1?void 0x0:_0x2380ef?L(_0xab43ae,_0x2c12f3):_0xab43ae,_0x2fee7c=_0xcd165b['length']-0x1,_0x53139a;_0x2fee7c>=0x0;_0x2fee7c--)(_0x53139a=_0xcd165b[_0x2fee7c])&&(_0x9b98db=_0x53139a(_0x9b98db)||_0x9b98db);return _0x9b98db;},O=(_0x4849d7,_0x2568e7)=>(_0x181c75,_0x3c2f8b)=>_0x2568e7(_0x181c75,_0x3c2f8b,_0x4849d7),N=(_0x259560,_0x2e145d,_0x148e9e)=>Z(_0x259560,typeof _0x2e145d!=_0xcd5c17(0x1db)?_0x2e145d+'':_0x2e145d,_0x148e9e);exports[_0xcd5c17(0x1b6)]=class extends c[_0xcd5c17(0x1c0)]{constructor(_0xdb8da4=D,_0x571cb,_0x3e8abd){const _0xf84a24=_0xcd5c17;super(),this[_0xf84a24(0x1f2)]=_0xdb8da4,this[_0xf84a24(0x1dd)]=_0x571cb,this[_0xf84a24(0x18d)]=_0x3e8abd;const {..._0x8cadb6}=c[_0xf84a24(0x199)]({},D,this[_0xf84a24(0x1f2)]);this['_configService'][_0xf84a24(0x191)](q,_0x8cadb6);}[_0xcd5c17(0x1b7)](){const _0x32aa3b=_0xcd5c17;[[p],[g],[_]][_0x32aa3b(0x18c)](_0x5a6d3d=>{const _0xfc9909=_0x32aa3b;this[_0xfc9909(0x1dd)][_0xfc9909(0x1f4)](_0x5a6d3d);});}['onReady'](){const _0x49ec99=_0xcd5c17;this[_0x49ec99(0x1dd)]['get'](g),this['_injector'][_0x49ec99(0x19e)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xcd5c17(0x1f0),U),N(exports[_0xcd5c17(0x1b6)],_0xcd5c17(0x1fb),c['UniverInstanceType'][_0xcd5c17(0x1b8)]),exports[_0xcd5c17(0x1b6)]=W([c[_0xcd5c17(0x1a8)](w[_0xcd5c17(0x1a6)],b[_0xcd5c17(0x188)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0xcd5c17(0x1a3)])],exports[_0xcd5c17(0x1b6)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f63da=_0x4fd3;(function(_0x251443,_0x30a4a7){const _0x14167c=_0x4fd3,_0x4ef987=_0x251443();while(!![]){try{const _0x428008=parseInt(_0x14167c(0x184))/0x1*(-parseInt(_0x14167c(0x19d))/0x2)+-parseInt(_0x14167c(0x147))/0x3+-parseInt(_0x14167c(0x159))/0x4*(-parseInt(_0x14167c(0x14f))/0x5)+-parseInt(_0x14167c(0x16c))/0x6+-parseInt(_0x14167c(0x171))/0x7*(parseInt(_0x14167c(0x164))/0x8)+-parseInt(_0x14167c(0x1a3))/0x9*(parseInt(_0x14167c(0x163))/0xa)+parseInt(_0x14167c(0x190))/0xb*(parseInt(_0x14167c(0x186))/0xc);if(_0x428008===_0x30a4a7)break;else _0x4ef987['push'](_0x4ef987['shift']());}catch(_0x4e52fa){_0x4ef987['push'](_0x4ef987['shift']());}}}(_0x1b76,0xa06f5));import{CommentService as _0x496dbb,CollaborationSessionService as _0x2c5e4c,UniverCollaborationClientPlugin as _0x3a685b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x586010}from'@univerjs-pro/license';import{dayjs as _0x28ba39,UserManagerService as _0x388990,Inject as _0x4bd280,Injector as _0x249295,Disposable as _0x391d46,CustomRangeType as _0x51ffb1,UniverInstanceType as _0x35e782,DependentOn as _0x25b0c6,IConfigService as _0x55aae9,Plugin as _0x14a1a2,merge as _0x21e87f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d91a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d3082,IThreadCommentDataSourceService as _0x2f9f28}from'@univerjs/thread-comment';import{bufferTime as _0x316e50}from'rxjs';import{HTTPService as _0x16abd7}from'@univerjs/network';const W=_0x3f63da(0x17c);var I=(_0x5890c0=>(_0x5890c0[_0x5890c0[_0x3f63da(0x16e)]=0x0]='OpenOrReOpen',_0x5890c0[_0x5890c0['Solved']=0x1]='Solved',_0x5890c0[_0x5890c0[_0x3f63da(0x185)]=-0x1]=_0x3f63da(0x185),_0x5890c0))(I||{}),v=(_0x3d4d9d=>(_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x18a)]=0x0]='Unknown',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x17a)]=0x1]='Add',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x19a)]=0x2]=_0x3f63da(0x19a),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x198)]=0x3]='Edit',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x149)]=0x4]=_0x3f63da(0x149),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x1a6)]=0x5]='Solve',_0x3d4d9d[_0x3d4d9d['UNRECOGNIZED']=-0x1]=_0x3f63da(0x185),_0x3d4d9d))(v||{});const y=_0x1416c3=>_0x28ba39(new Date(+_0x1416c3))[_0x3f63da(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3258a6,_0x1eaeba)=>{const _0x370a20=_0x3f63da,_0x2fff28=_0x3258a6[_0x370a20(0x14e)](_0x388990),_0x3566a7=_0x3258a6['get'](_0x16abd7);_0x1eaeba[_0x370a20(0x197)](_0x3e621b=>{const _0x901d45=_0x370a20;_0x2fff28[_0x901d45(0x192)](_0x3e621b)&&_0x1eaeba[_0x901d45(0x170)](_0x3e621b);}),_0x1eaeba['size']&&(await _0x3566a7[_0x370a20(0x14e)](_0x370a20(0x18e),{'params':{'userIDs':[..._0x1eaeba]}}))[_0x370a20(0x145)][_0x370a20(0x17b)][_0x370a20(0x197)](_0x13115c=>{const _0x39e410=_0x370a20;_0x13115c&&_0x2fff28[_0x39e410(0x153)](_0x13115c);});};var K=Object[_0x3f63da(0x1aa)],V=(_0x3accf5,_0x9c9acd,_0x29efc7,_0x3623a7)=>{const _0x3b9bb5=_0x3f63da;for(var _0x40db44=_0x3623a7>0x1?void 0x0:_0x3623a7?K(_0x9c9acd,_0x29efc7):_0x9c9acd,_0x5170bb=_0x3accf5[_0x3b9bb5(0x1a1)]-0x1,_0x132f41;_0x5170bb>=0x0;_0x5170bb--)(_0x132f41=_0x3accf5[_0x5170bb])&&(_0x40db44=_0x132f41(_0x40db44)||_0x40db44);return _0x40db44;},p=(_0x129962,_0x2bc81e)=>(_0x26cd2a,_0x58c1d0)=>_0x2bc81e(_0x26cd2a,_0x58c1d0,_0x129962);let _=class extends _0x391d46{constructor(_0x277360,_0x471aa6,_0x570188,_0x16573e){const _0x5e6ea2=_0x3f63da;super(),this[_0x5e6ea2(0x168)]=_0x277360,this['_threadCommentModel']=_0x471aa6,this[_0x5e6ea2(0x17f)]=_0x570188,this[_0x5e6ea2(0x175)]=_0x16573e,this[_0x5e6ea2(0x176)](),this[_0x5e6ea2(0x156)]();}['_initUserSync'](){const _0x2394b4=_0x3f63da;this[_0x2394b4(0x187)](this['_threadCommentModel']['commentUpdate$'][_0x2394b4(0x18c)](_0x316e50(0x10))['subscribe'](_0x1a15ba=>{const _0x961bef=_0x2394b4,_0x588321=new Set();_0x1a15ba[_0x961bef(0x197)](_0x177bef=>{const _0xe6be29=_0x961bef;if(_0x177bef['type']==='add'){const _0x3addec=_0x177bef[_0xe6be29(0x14d)][_0xe6be29(0x144)];_0x588321[_0xe6be29(0x199)](_0x3addec);}}),B(this[_0x961bef(0x175)],_0x588321);}));}[_0x3f63da(0x176)](){const _0x2ed88e=_0x3f63da;this[_0x2ed88e(0x187)](this[_0x2ed88e(0x168)][_0x2ed88e(0x146)][_0x2ed88e(0x155)](async _0x41429a=>{const _0x346ce0=_0x2ed88e;var _0x20cb01,_0x5adcc7,_0x2b684e,_0x4b7fb0;const _0x510c45=(_0x20cb01=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a[_0x346ce0(0x143)])[_0x346ce0(0x1a2)](_0x195d56=>_0x195d56[_0x346ce0(0x1a7)]===_0x41429a['threadId']))==null?void 0x0:_0x20cb01['root'];if(!_0x510c45)return;const {unitId:_0x15ecc2,subUnitId:_0x299f45}=_0x510c45;switch(_0x41429a['user']&&this[_0x346ce0(0x17f)]['addUser'](_0x41429a[_0x346ce0(0x16a)]),_0x41429a[_0x346ce0(0x15d)]){case v[_0x346ce0(0x17a)]:break;case v[_0x346ce0(0x19a)]:{this[_0x346ce0(0x178)]['addComment'](_0x15ecc2,_0x299f45,{'unitId':_0x15ecc2,'subUnitId':_0x299f45,'ref':'','id':_0x41429a['replyId'],'dT':y(+_0x41429a[_0x346ce0(0x1a4)]),'threadId':_0x41429a[_0x346ce0(0x1a7)],'personId':(_0x2b684e=(_0x5adcc7=_0x41429a[_0x346ce0(0x16a)])==null?void 0x0:_0x5adcc7['userID'])!=null?_0x2b684e:_0x41429a[_0x346ce0(0x19c)],'text':JSON[_0x346ce0(0x151)](_0x41429a['content']),'parentId':_0x510c45['id']});break;}case v[_0x346ce0(0x149)]:{const _0x529631=this[_0x346ce0(0x178)][_0x346ce0(0x165)](_0x15ecc2,_0x299f45,_0x41429a[_0x346ce0(0x161)]);_0x529631&&_0x529631['parentId']&&this[_0x346ce0(0x178)]['deleteComment'](_0x15ecc2,_0x299f45,_0x41429a['replyId']);break;}case v[_0x346ce0(0x198)]:{this[_0x346ce0(0x178)][_0x346ce0(0x183)](_0x15ecc2,_0x299f45,{'commentId':_0x41429a[_0x346ce0(0x161)],'text':JSON['parse'](_0x41429a['content'])});break;}case v['Solve']:{const _0x25c421=(_0x4b7fb0=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a['unitId'])['find'](_0x4de646=>_0x4de646[_0x346ce0(0x1a7)]===_0x41429a[_0x346ce0(0x1a7)]))==null?void 0x0:_0x4b7fb0[_0x346ce0(0x167)];_0x25c421&&this[_0x346ce0(0x178)][_0x346ce0(0x150)](_0x15ecc2,_0x299f45,_0x25c421['id'],_0x41429a['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4bd280(_0x496dbb)),p(0x1,_0x4bd280(_0x5d3082)),p(0x2,_0x4bd280(_0x388990)),p(0x3,_0x4bd280(_0x249295))],_);function _0x4fd3(_0x502c48,_0x24f8ce){_0x502c48=_0x502c48-0x143;const _0x1b7602=_0x1b76();let _0x4fd326=_0x1b7602[_0x502c48];return _0x4fd326;}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x38373b,_0x25bacf,_0x49f8d6,_0x132edb)=>{const _0x5ac149=_0x3f63da;for(var _0x2e1628=_0x132edb>0x1?void 0x0:_0x132edb?k(_0x25bacf,_0x49f8d6):_0x25bacf,_0x26fc15=_0x38373b[_0x5ac149(0x1a1)]-0x1,_0x28c166;_0x26fc15>=0x0;_0x26fc15--)(_0x28c166=_0x38373b[_0x26fc15])&&(_0x2e1628=_0x28c166(_0x2e1628)||_0x2e1628);return _0x2e1628;},b=(_0x143ecd,_0x4531c2)=>(_0x2df912,_0x39fd54)=>_0x4531c2(_0x2df912,_0x39fd54,_0x143ecd);function X(_0x3c675c,_0x5b4311){const _0x293743=_0x3f63da,_0x5e557b=_0x3c675c[_0x293743(0x173)][0x0];return{..._0x5b4311,'id':_0x5e557b[_0x293743(0x161)],'resolved':_0x3c675c[_0x293743(0x1a8)]===0x1,'dT':y(_0x5e557b[_0x293743(0x1a4)]),'personId':_0x5e557b[_0x293743(0x19c)],'threadId':_0x5e557b['threadId']};}function ee(_0x3dd8d8,_0x5781cc,_0x357123){const _0x41ad8d=_0x3f63da;var _0x380787,_0x2020ed;if(((_0x2020ed=(_0x380787=_0x3dd8d8==null?void 0x0:_0x3dd8d8[_0x41ad8d(0x173)])==null?void 0x0:_0x380787[_0x41ad8d(0x1a1)])!=null?_0x2020ed:0x0)>0x0){const _0x529d8a=(_0x42e7eb,_0x2e8018)=>({'id':_0x42e7eb['replyId'],'threadId':_0x42e7eb[_0x41ad8d(0x1a7)],'dT':y(_0x42e7eb['createTimestamp']),'personId':_0x42e7eb['userId'],'resolved':_0x3dd8d8[_0x41ad8d(0x1a8)]===I[_0x41ad8d(0x193)],'unitId':_0x5781cc,'subUnitId':_0x357123,'text':JSON[_0x41ad8d(0x151)](_0x42e7eb[_0x41ad8d(0x1a9)]),'parentId':_0x2e8018}),_0x17cc45=_0x529d8a(_0x3dd8d8[_0x41ad8d(0x173)][0x0]);return{..._0x17cc45,'children':_0x3dd8d8[_0x41ad8d(0x173)][_0x41ad8d(0x17d)](0x1)[_0x41ad8d(0x18b)](_0x16c60d=>_0x529d8a(_0x16c60d,_0x17cc45['id']))};}return null;}let S=class{constructor(_0x44c1b8,_0xb48d13,_0x3577cf){const _0x3c8f03=_0x3f63da;this[_0x3c8f03(0x15c)]=_0x44c1b8,this['_userService']=_0xb48d13,this[_0x3c8f03(0x195)]=_0x3577cf;}async['addComment'](_0x445902){const _0x598007=_0x3f63da;var _0x217d86,_0x5a3f4d;const {parentId:_0x38c24d,unitId:_0x53f572,text:_0x370955,threadId:_0x4bd308}=_0x445902,_0x41a74f=(_0x5a3f4d=(_0x217d86=_0x370955['customRanges'])==null?void 0x0:_0x217d86[_0x598007(0x157)](_0x5d311b=>_0x5d311b['rangeType']===_0x51ffb1['COMMENT'])[_0x598007(0x18b)](_0x22d42b=>_0x22d42b[_0x598007(0x148)]))!=null?_0x5a3f4d:[],_0x44b320=JSON[_0x598007(0x160)](_0x370955),_0x49db91=(await this[_0x598007(0x195)][_0x598007(0x16d)](_0x53f572))[_0x598007(0x191)]();if(_0x38c24d){const _0x4bd247={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f,'threadId':_0x4bd308},_0x164bfb=(await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+'/reply',{'body':_0x4bd247}))['body'][_0x598007(0x16f)];return{..._0x445902,'id':_0x164bfb[_0x598007(0x161)],'dT':_0x28ba39(+_0x164bfb[_0x598007(0x1a4)])['format'](_0x598007(0x152)),'personId':_0x164bfb[_0x598007(0x19c)]};}else{const _0x44c0ab={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f},_0x669843=await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+_0x598007(0x17e),{'body':_0x44c0ab});return X(_0x669843[_0x598007(0x145)][_0x598007(0x166)],_0x445902);}}async[_0x3f63da(0x183)](_0x1ac438){const _0x5d4e12=_0x3f63da;var _0x3de0f7,_0x148e67;const {text:_0x37c0e2,unitId:_0x17e8cb}=_0x1ac438,_0x3fa4a2=(_0x148e67=(_0x3de0f7=_0x37c0e2[_0x5d4e12(0x177)])==null?void 0x0:_0x3de0f7[_0x5d4e12(0x157)](_0x3978f8=>_0x3978f8[_0x5d4e12(0x1a5)]===_0x51ffb1[_0x5d4e12(0x196)])[_0x5d4e12(0x18b)](_0x106213=>_0x106213['rangeId']))!=null?_0x148e67:[],_0x39a5de=JSON[_0x5d4e12(0x160)](_0x37c0e2),_0x3b82a3=_0x1ac438[_0x5d4e12(0x1a7)],_0x305af8=_0x1ac438['id'],_0x111643={'memberId':(await this['_sessionService'][_0x5d4e12(0x16d)](_0x17e8cb))['getMemberID'](),'unitId':_0x17e8cb,'threadId':_0x3b82a3,'mention':_0x3fa4a2,'content':_0x39a5de,'replyId':_0x305af8},_0x2a5caf=await this['_httpService'][_0x5d4e12(0x15b)](_0x5d4e12(0x19e)+_0x17e8cb+'/edit',{'body':_0x111643});return!_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)]||_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)][_0x5d4e12(0x19f)]===0x1;}async[_0x3f63da(0x150)](_0x22c1af){const _0x391918=_0x3f63da,{unitId:_0x394fd3}=_0x22c1af,_0x52fa84=_0x22c1af[_0x391918(0x1a7)],_0x2c94af={'memberId':this[_0x391918(0x17f)][_0x391918(0x14a)]()[_0x391918(0x18d)],'unitId':_0x394fd3,'threadId':_0x52fa84,'solved':_0x22c1af[_0x391918(0x18f)]?I['Solved']:I[_0x391918(0x16e)]},_0x3d29c1=await this['_httpService'][_0x391918(0x15b)](_0x391918(0x19e)+_0x394fd3+'/solved',{'body':_0x2c94af});return!_0x3d29c1[_0x391918(0x145)][_0x391918(0x188)]||_0x3d29c1['body']['error']['code']===0x1;}async[_0x3f63da(0x14c)](_0xb74be6,_0x5f5b57,_0x536da1,_0x4cdb1d){const _0x1353bb=_0x3f63da,_0x56fa6e={'memberId':(await this[_0x1353bb(0x195)][_0x1353bb(0x16d)](_0xb74be6))[_0x1353bb(0x191)](),'threadId':_0x536da1,'replyId':_0x4cdb1d,'unitId':_0xb74be6},_0x2c324b=await this[_0x1353bb(0x15c)]['post'](_0x1353bb(0x19e)+_0xb74be6+_0x1353bb(0x172),{'body':_0x56fa6e});return!_0x2c324b[_0x1353bb(0x145)][_0x1353bb(0x188)]||_0x2c324b['body'][_0x1353bb(0x188)][_0x1353bb(0x19f)]===0x1;}async[_0x3f63da(0x15e)](_0x3846dd,_0xa5fafd,_0x355c55){const _0x42d450=_0x3f63da,_0x417290={'unitId':_0x3846dd,'threadId':_0x355c55},_0x1595d=await this['_httpService']['post'](_0x42d450(0x19e)+_0x3846dd+'/list',{'body':_0x417290}),_0x197870=_0x355c55[_0x42d450(0x18b)](_0x37bd38=>ee(_0x1595d[_0x42d450(0x145)][_0x42d450(0x15a)][_0x37bd38],_0x3846dd,_0xa5fafd))[_0x42d450(0x157)](Boolean);return Object[_0x42d450(0x182)](_0x1595d[_0x42d450(0x145)][_0x42d450(0x17b)])[_0x42d450(0x197)](_0x39cf1a=>{const _0x1a2901=_0x42d450;this[_0x1a2901(0x17f)][_0x1a2901(0x153)](_0x39cf1a);}),_0x197870;}[_0x3f63da(0x189)](_0x49a50c){const _0x5cb2c6=_0x3f63da;return{'id':_0x49a50c['id'],'threadId':_0x49a50c[_0x5cb2c6(0x1a7)],'ref':_0x49a50c[_0x5cb2c6(0x16b)]};}};function _0x1b76(){const _0x3fdba0=['_httpService','type','listComments','_threadCommentDataSourceService','stringify','replyId','_configService','3703220iXLVEV','8XvKUcU','getComment','comment','root','_commentService','_initDataSource','user','ref','2616942ITFNRR','requireSession','OpenOrReOpen','reply','delete','5700331wfInQT','/delete','replies','getUnit','_injector','_init','customRanges','_threadCommentModel','_threadCommentDataSource','Add','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','/add','_userService','_config','format','values','updateComment','1GDNkXl','UNRECOGNIZED','167160cmkBfK','disposeWithMe','error','saveCommentToSnapshot','Unknown','map','pipe','userID','/universer-api/user/list','resolved','2750tJfpJw','getMemberID','getUser','Solved','defineProperty','_sessionService','COMMENT','forEach','Edit','add','Reply','syncUpdateMutationToColla','userId','450688TADXBX','/universer-api/comment/unit/','code','onReady','length','find','18ZWEusn','createTimestamp','rangeType','Solve','threadId','solved','content','getOwnPropertyDescriptor','unitId','personId','body','commentUpdate$','3754998TggIOg','rangeId','Delete','getCurrentUser','pluginName','deleteComment','payload','get','1595pVRxMl','resolveComment','parse','YYYY/MM/DD\x20HH:mm','addUser','dataSource','subscribe','_initUserSync','filter','setConfig','8060yAyonb','comments','post'];_0x1b76=function(){return _0x3fdba0;};return _0x1b76();}S=Q([b(0x0,_0x4bd280(_0x16abd7)),b(0x1,_0x4bd280(_0x388990)),b(0x2,_0x4bd280(_0x2c5e4c))],S);var re=Object[_0x3f63da(0x1aa)],te=(_0x2de3ba,_0x627aa8,_0x34506d,_0x28971f)=>{const _0x59e1fe=_0x3f63da;for(var _0x9c9fac=_0x28971f>0x1?void 0x0:_0x28971f?re(_0x627aa8,_0x34506d):_0x627aa8,_0x221e15=_0x2de3ba[_0x59e1fe(0x1a1)]-0x1,_0x1f4b27;_0x221e15>=0x0;_0x221e15--)(_0x1f4b27=_0x2de3ba[_0x221e15])&&(_0x9c9fac=_0x1f4b27(_0x9c9fac)||_0x9c9fac);return _0x9c9fac;},M=(_0x1919e9,_0x294a12)=>(_0x30db81,_0xbebaf1)=>_0x294a12(_0x30db81,_0xbebaf1,_0x1919e9);let f=class extends _0x391d46{constructor(_0x3b163c,_0x3e48dc){const _0x5ad643=_0x3f63da;super(),this[_0x5ad643(0x15f)]=_0x3b163c,this[_0x5ad643(0x179)]=_0x3e48dc,this[_0x5ad643(0x169)]();}['_initDataSource'](){const _0x25edef=_0x3f63da;this[_0x25edef(0x15f)][_0x25edef(0x154)]=this[_0x25edef(0x179)],this[_0x25edef(0x15f)][_0x25edef(0x19b)]=!0x1;}};f=te([M(0x0,_0x2f9f28),M(0x1,_0x4bd280(S))],f);var se=Object[_0x3f63da(0x194)],oe=Object[_0x3f63da(0x1aa)],ne=(_0x2fe6fd,_0x590c24,_0x3b632a)=>_0x590c24 in _0x2fe6fd?se(_0x2fe6fd,_0x590c24,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b632a}):_0x2fe6fd[_0x590c24]=_0x3b632a,ie=(_0x42b5a3,_0x588d56,_0x1e4d7d,_0x25b3b7)=>{const _0x1d860e=_0x3f63da;for(var _0x24b614=_0x25b3b7>0x1?void 0x0:_0x25b3b7?oe(_0x588d56,_0x1e4d7d):_0x588d56,_0x316b48=_0x42b5a3[_0x1d860e(0x1a1)]-0x1,_0xf82413;_0x316b48>=0x0;_0x316b48--)(_0xf82413=_0x42b5a3[_0x316b48])&&(_0x24b614=_0xf82413(_0x24b614)||_0x24b614);return _0x24b614;},N=(_0x243842,_0xb7b003)=>(_0x4301f7,_0x1a0bc2)=>_0xb7b003(_0x4301f7,_0x1a0bc2,_0x243842),$=(_0x265a4d,_0x3c2f1f,_0x4d5696)=>ne(_0x265a4d,typeof _0x3c2f1f!='symbol'?_0x3c2f1f+'':_0x3c2f1f,_0x4d5696);let g=class extends _0x14a1a2{constructor(_0x576930=O,_0x394901,_0xed77a7){const _0x2a4fcb=_0x3f63da;super(),this[_0x2a4fcb(0x180)]=_0x576930,this[_0x2a4fcb(0x175)]=_0x394901,this['_configService']=_0xed77a7;const {..._0x4b66d0}=_0x21e87f({},O,this[_0x2a4fcb(0x180)]);this[_0x2a4fcb(0x162)][_0x2a4fcb(0x158)](z,_0x4b66d0);}['onStarting'](){const _0x499287=_0x3f63da;[[S],[f],[_]][_0x499287(0x197)](_0x79f8f=>{const _0x209775=_0x499287;this[_0x209775(0x175)][_0x209775(0x199)](_0x79f8f);});}[_0x3f63da(0x1a0)](){const _0x2583cd=_0x3f63da;this[_0x2583cd(0x175)][_0x2583cd(0x14e)](f),this[_0x2583cd(0x175)][_0x2583cd(0x14e)](_);}};$(g,_0x3f63da(0x14b),W),$(g,_0x3f63da(0x15d),_0x35e782['UNIVER_UNKNOWN']),g=ie([_0x25b0c6(_0x1d91a2,_0x3a685b,_0x586010),N(0x1,_0x4bd280(_0x249295)),N(0x2,_0x55aae9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3cc1dc=_0x2047;(function(_0x3bc121,_0x4ccc60){const _0x6b650f=_0x2047,_0x141983=_0x3bc121();while(!![]){try{const _0x14eaac=-parseInt(_0x6b650f(0xdb))/0x1*(-parseInt(_0x6b650f(0xa1))/0x2)+parseInt(_0x6b650f(0x95))/0x3+-parseInt(_0x6b650f(0xda))/0x4+-parseInt(_0x6b650f(0x82))/0x5*(-parseInt(_0x6b650f(0xcd))/0x6)+-parseInt(_0x6b650f(0xb1))/0x7*(-parseInt(_0x6b650f(0x88))/0x8)+-parseInt(_0x6b650f(0x98))/0x9+-parseInt(_0x6b650f(0x85))/0xa;if(_0x14eaac===_0x4ccc60)break;else _0x141983['push'](_0x141983['shift']());}catch(_0x32bd99){_0x141983['push'](_0x141983['shift']());}}}(_0x4fd3,0x216ad));import{CommentService as _0x389d36,CollaborationSessionService as _0x79848b,UniverCollaborationClientPlugin as _0x43a148}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1ff463}from'@univerjs-pro/license';import{dayjs as _0x541853,UserManagerService as _0x4ad1d0,Inject as _0x4aa1d4,Injector as _0x258a62,Disposable as _0x2054e7,CustomRangeType as _0x5bf78f,UniverInstanceType as _0x51d13b,DependentOn as _0x42cae3,IConfigService as _0x2b93e2,Plugin as _0x16fb20,merge as _0x272650}from'@univerjs/core';function _0x4fd3(){const _0x1a4b9b=['resolveComment','/universer-api/comment/unit/','saveCommentToSnapshot','parentId','Unknown','_sessionService','replyId','deleteComment','stringify','updateComment','solved','setConfig','_httpService','symbol','Edit','users','personId','_threadCommentDataSource','code','type','body','132agjfQF','userID','post','YYYY/MM/DD\x20HH:mm','_init','/solved','customRanges','requireSession','replies','get','getUnit','find','format','541392SuzNXh','449XEppgC','root','Add','commentUpdate$','dataSource','pluginName','onStarting','subscribe','parse','/universer-api/user/list','_config','forEach','15585NWcVSR','Solved','getComment','1946640mrFaFH','onReady','listComments','99368piJKHX','_initUserSync','unitId','Reply','/delete','_commentService','disposeWithMe','getUser','resolved','_userService','delete','content','getMemberID','705990dDjXsB','_threadCommentModel','getOwnPropertyDescriptor','875484rPBlQV','error','addUser','threadId','rangeId','rangeType','Delete','user','Solve','772rBJvNi','UNIVER_UNKNOWN','comment','UNRECOGNIZED','add','length','size','userId','createTimestamp','/reply','_configService','comments','_initDataSource','_injector','ref','COMMENT','49yOfMQj','addComment','filter','map','slice','thread-comment-data-source.config','_threadCommentDataSourceService'];_0x4fd3=function(){return _0x1a4b9b;};return _0x4fd3();}import{UniverThreadCommentUIPlugin as _0x2da2c7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43ddf6,IThreadCommentDataSourceService as _0xc9477f}from'@univerjs/thread-comment';import{bufferTime as _0x4cb116}from'rxjs';function _0x2047(_0x5be91e,_0x60f931){_0x5be91e=_0x5be91e-0x7c;const _0x4fd34d=_0x4fd3();let _0x2047fd=_0x4fd34d[_0x5be91e];return _0x2047fd;}import{HTTPService as _0x279eb0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17f676=>(_0x17f676[_0x17f676['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x17f676[_0x17f676[_0x3cc1dc(0x83)]=0x1]=_0x3cc1dc(0x83),_0x17f676[_0x17f676[_0x3cc1dc(0xa4)]=-0x1]='UNRECOGNIZED',_0x17f676))(I||{}),v=(_0x4f71b9=>(_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xbc)]=0x0]=_0x3cc1dc(0xbc),_0x4f71b9[_0x4f71b9['Add']=0x1]=_0x3cc1dc(0xdd),_0x4f71b9[_0x4f71b9[_0x3cc1dc(0x8b)]=0x2]=_0x3cc1dc(0x8b),_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xc6)]=0x3]='Edit',_0x4f71b9[_0x4f71b9['Delete']=0x4]=_0x3cc1dc(0x9e),_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xa0)]=0x5]='Solve',_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xa4)]=-0x1]=_0x3cc1dc(0xa4),_0x4f71b9))(v||{});const y=_0x45dd39=>_0x541853(new Date(+_0x45dd39))[_0x3cc1dc(0xd9)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e2110,_0x4019ed)=>{const _0x5b3665=_0x3cc1dc,_0x4b54de=_0x3e2110[_0x5b3665(0xd6)](_0x4ad1d0),_0xb1a28b=_0x3e2110[_0x5b3665(0xd6)](_0x279eb0);_0x4019ed[_0x5b3665(0x81)](_0x5eb254=>{const _0x39dcdd=_0x5b3665;_0x4b54de[_0x39dcdd(0x8f)](_0x5eb254)&&_0x4019ed[_0x39dcdd(0x92)](_0x5eb254);}),_0x4019ed[_0x5b3665(0xa7)]&&(await _0xb1a28b[_0x5b3665(0xd6)](_0x5b3665(0x7f),{'params':{'userIDs':[..._0x4019ed]}}))[_0x5b3665(0xcc)]['users'][_0x5b3665(0x81)](_0x4baaa5=>{const _0x9a68cd=_0x5b3665;_0x4baaa5&&_0x4b54de[_0x9a68cd(0x9a)](_0x4baaa5);});};var K=Object[_0x3cc1dc(0x97)],V=(_0x2eb3a3,_0xd283f7,_0x3095c6,_0x28442e)=>{const _0x43f03e=_0x3cc1dc;for(var _0x377a52=_0x28442e>0x1?void 0x0:_0x28442e?K(_0xd283f7,_0x3095c6):_0xd283f7,_0x563b58=_0x2eb3a3[_0x43f03e(0xa6)]-0x1,_0x22cb14;_0x563b58>=0x0;_0x563b58--)(_0x22cb14=_0x2eb3a3[_0x563b58])&&(_0x377a52=_0x22cb14(_0x377a52)||_0x377a52);return _0x377a52;},p=(_0x18ba2a,_0x7f5fe5)=>(_0x157268,_0x1c092c)=>_0x7f5fe5(_0x157268,_0x1c092c,_0x18ba2a);let _=class extends _0x2054e7{constructor(_0x3fad25,_0x33caa6,_0x2df4f7,_0x2778f5){const _0x108d25=_0x3cc1dc;super(),this[_0x108d25(0x8d)]=_0x3fad25,this['_threadCommentModel']=_0x33caa6,this[_0x108d25(0x91)]=_0x2df4f7,this[_0x108d25(0xae)]=_0x2778f5,this[_0x108d25(0xd1)](),this[_0x108d25(0x89)]();}['_initUserSync'](){const _0x4476d8=_0x3cc1dc;this[_0x4476d8(0x8e)](this[_0x4476d8(0x96)][_0x4476d8(0xde)]['pipe'](_0x4cb116(0x10))[_0x4476d8(0x7d)](_0x182665=>{const _0x23b13f=_0x4476d8,_0x5b8f40=new Set();_0x182665[_0x23b13f(0x81)](_0x37ff5f=>{const _0x147237=_0x23b13f;if(_0x37ff5f['type']===_0x147237(0xa5)){const _0x4b988e=_0x37ff5f['payload'][_0x147237(0xc8)];_0x5b8f40['add'](_0x4b988e);}}),B(this['_injector'],_0x5b8f40);}));}['_init'](){const _0xa743af=_0x3cc1dc;this[_0xa743af(0x8e)](this[_0xa743af(0x8d)][_0xa743af(0xde)]['subscribe'](async _0x6eede0=>{const _0x582948=_0xa743af;var _0x56b62a,_0x42b0a9,_0x2f55ee,_0x3e791e;const _0x537a8b=(_0x56b62a=this[_0x582948(0x96)][_0x582948(0xd7)](_0x6eede0[_0x582948(0x8a)])['find'](_0x11ad2d=>_0x11ad2d['threadId']===_0x6eede0[_0x582948(0x9b)]))==null?void 0x0:_0x56b62a[_0x582948(0xdc)];if(!_0x537a8b)return;const {unitId:_0x5bdb61,subUnitId:_0x228db1}=_0x537a8b;switch(_0x6eede0['user']&&this[_0x582948(0x91)][_0x582948(0x9a)](_0x6eede0['user']),_0x6eede0[_0x582948(0xcb)]){case v[_0x582948(0xdd)]:break;case v[_0x582948(0x8b)]:{this[_0x582948(0x96)][_0x582948(0xb2)](_0x5bdb61,_0x228db1,{'unitId':_0x5bdb61,'subUnitId':_0x228db1,'ref':'','id':_0x6eede0[_0x582948(0xbe)],'dT':y(+_0x6eede0['createTimestamp']),'threadId':_0x6eede0[_0x582948(0x9b)],'personId':(_0x2f55ee=(_0x42b0a9=_0x6eede0[_0x582948(0x9f)])==null?void 0x0:_0x42b0a9[_0x582948(0xce)])!=null?_0x2f55ee:_0x6eede0[_0x582948(0xa8)],'text':JSON[_0x582948(0x7e)](_0x6eede0[_0x582948(0x93)]),'parentId':_0x537a8b['id']});break;}case v[_0x582948(0x9e)]:{const _0x5686fb=this['_threadCommentModel'][_0x582948(0x84)](_0x5bdb61,_0x228db1,_0x6eede0['replyId']);_0x5686fb&&_0x5686fb[_0x582948(0xbb)]&&this[_0x582948(0x96)][_0x582948(0xbf)](_0x5bdb61,_0x228db1,_0x6eede0[_0x582948(0xbe)]);break;}case v['Edit']:{this[_0x582948(0x96)][_0x582948(0xc1)](_0x5bdb61,_0x228db1,{'commentId':_0x6eede0['replyId'],'text':JSON[_0x582948(0x7e)](_0x6eede0[_0x582948(0x93)])});break;}case v[_0x582948(0xa0)]:{const _0x11227e=(_0x3e791e=this[_0x582948(0x96)][_0x582948(0xd7)](_0x6eede0['unitId'])[_0x582948(0xd8)](_0x2beec5=>_0x2beec5[_0x582948(0x9b)]===_0x6eede0['threadId']))==null?void 0x0:_0x3e791e[_0x582948(0xdc)];_0x11227e&&this[_0x582948(0x96)][_0x582948(0xb8)](_0x5bdb61,_0x228db1,_0x11227e['id'],_0x6eede0['solved']===I[_0x582948(0x83)]);break;}}}));}};_=V([p(0x0,_0x4aa1d4(_0x389d36)),p(0x1,_0x4aa1d4(_0x43ddf6)),p(0x2,_0x4aa1d4(_0x4ad1d0)),p(0x3,_0x4aa1d4(_0x258a62))],_);const z=_0x3cc1dc(0xb6),O={};var k=Object[_0x3cc1dc(0x97)],Q=(_0x294650,_0x4a0adb,_0x8dbf9d,_0x35e23c)=>{for(var _0x4dac40=_0x35e23c>0x1?void 0x0:_0x35e23c?k(_0x4a0adb,_0x8dbf9d):_0x4a0adb,_0x16db01=_0x294650['length']-0x1,_0xab183c;_0x16db01>=0x0;_0x16db01--)(_0xab183c=_0x294650[_0x16db01])&&(_0x4dac40=_0xab183c(_0x4dac40)||_0x4dac40);return _0x4dac40;},b=(_0x15582b,_0x56c83a)=>(_0x1bdcec,_0x3eb8be)=>_0x56c83a(_0x1bdcec,_0x3eb8be,_0x15582b);function X(_0x2c63f0,_0x4bd3b4){const _0x63d826=_0x3cc1dc,_0x2adeb0=_0x2c63f0[_0x63d826(0xd5)][0x0];return{..._0x4bd3b4,'id':_0x2adeb0['replyId'],'resolved':_0x2c63f0['solved']===0x1,'dT':y(_0x2adeb0[_0x63d826(0xa9)]),'personId':_0x2adeb0[_0x63d826(0xa8)],'threadId':_0x2adeb0[_0x63d826(0x9b)]};}function ee(_0x48cf72,_0x2f8c52,_0x5f16e1){const _0x3f96b0=_0x3cc1dc;var _0x3b24a1,_0x2494bf;if(((_0x2494bf=(_0x3b24a1=_0x48cf72==null?void 0x0:_0x48cf72['replies'])==null?void 0x0:_0x3b24a1['length'])!=null?_0x2494bf:0x0)>0x0){const _0x44b878=(_0x432908,_0x22a14c)=>({'id':_0x432908[_0x3f96b0(0xbe)],'threadId':_0x432908[_0x3f96b0(0x9b)],'dT':y(_0x432908['createTimestamp']),'personId':_0x432908[_0x3f96b0(0xa8)],'resolved':_0x48cf72[_0x3f96b0(0xc2)]===I[_0x3f96b0(0x83)],'unitId':_0x2f8c52,'subUnitId':_0x5f16e1,'text':JSON[_0x3f96b0(0x7e)](_0x432908[_0x3f96b0(0x93)]),'parentId':_0x22a14c}),_0x5bbaf6=_0x44b878(_0x48cf72['replies'][0x0]);return{..._0x5bbaf6,'children':_0x48cf72[_0x3f96b0(0xd5)][_0x3f96b0(0xb5)](0x1)[_0x3f96b0(0xb4)](_0x45a0f5=>_0x44b878(_0x45a0f5,_0x5bbaf6['id']))};}return null;}let S=class{constructor(_0x451f22,_0x344ff8,_0x24179d){const _0x3f045d=_0x3cc1dc;this['_httpService']=_0x451f22,this[_0x3f045d(0x91)]=_0x344ff8,this[_0x3f045d(0xbd)]=_0x24179d;}async[_0x3cc1dc(0xb2)](_0x3cb8fa){const _0x2a890c=_0x3cc1dc;var _0x2d2a8f,_0x174f42;const {parentId:_0x551a02,unitId:_0x22df7e,text:_0x171514,threadId:_0x3a2c28}=_0x3cb8fa,_0x3d20e0=(_0x174f42=(_0x2d2a8f=_0x171514[_0x2a890c(0xd3)])==null?void 0x0:_0x2d2a8f['filter'](_0x2e7c01=>_0x2e7c01[_0x2a890c(0x9d)]===_0x5bf78f[_0x2a890c(0xb0)])[_0x2a890c(0xb4)](_0x58e565=>_0x58e565[_0x2a890c(0x9c)]))!=null?_0x174f42:[],_0xcda1f2=JSON[_0x2a890c(0xc0)](_0x171514),_0x12f352=(await this['_sessionService']['requireSession'](_0x22df7e))[_0x2a890c(0x94)]();if(_0x551a02){const _0x2b5d63={'memberId':_0x12f352,'unitId':_0x22df7e,'content':_0xcda1f2,'mention':_0x3d20e0,'threadId':_0x3a2c28},_0x51ad38=(await this[_0x2a890c(0xc4)][_0x2a890c(0xcf)](_0x2a890c(0xb9)+_0x22df7e+_0x2a890c(0xaa),{'body':_0x2b5d63}))[_0x2a890c(0xcc)]['reply'];return{..._0x3cb8fa,'id':_0x51ad38[_0x2a890c(0xbe)],'dT':_0x541853(+_0x51ad38['createTimestamp'])[_0x2a890c(0xd9)](_0x2a890c(0xd0)),'personId':_0x51ad38['userId']};}else{const _0x3a956c={'memberId':_0x12f352,'unitId':_0x22df7e,'content':_0xcda1f2,'mention':_0x3d20e0},_0x3e6410=await this['_httpService'][_0x2a890c(0xcf)](_0x2a890c(0xb9)+_0x22df7e+'/add',{'body':_0x3a956c});return X(_0x3e6410['body'][_0x2a890c(0xa3)],_0x3cb8fa);}}async[_0x3cc1dc(0xc1)](_0x2724b4){const _0x202c86=_0x3cc1dc;var _0x466a73,_0x5d8349;const {text:_0x281f7d,unitId:_0x288351}=_0x2724b4,_0x432b14=(_0x5d8349=(_0x466a73=_0x281f7d[_0x202c86(0xd3)])==null?void 0x0:_0x466a73['filter'](_0x5310a4=>_0x5310a4[_0x202c86(0x9d)]===_0x5bf78f[_0x202c86(0xb0)])[_0x202c86(0xb4)](_0x2e67b6=>_0x2e67b6[_0x202c86(0x9c)]))!=null?_0x5d8349:[],_0x49132e=JSON[_0x202c86(0xc0)](_0x281f7d),_0x3b9a01=_0x2724b4[_0x202c86(0x9b)],_0x4940cc=_0x2724b4['id'],_0x596fda={'memberId':(await this['_sessionService'][_0x202c86(0xd4)](_0x288351))[_0x202c86(0x94)](),'unitId':_0x288351,'threadId':_0x3b9a01,'mention':_0x432b14,'content':_0x49132e,'replyId':_0x4940cc},_0x2eff95=await this[_0x202c86(0xc4)]['post'](_0x202c86(0xb9)+_0x288351+'/edit',{'body':_0x596fda});return!_0x2eff95['body'][_0x202c86(0x99)]||_0x2eff95['body'][_0x202c86(0x99)]['code']===0x1;}async['resolveComment'](_0xcd8242){const _0x4b5c6e=_0x3cc1dc,{unitId:_0x5d774d}=_0xcd8242,_0x4be2b5=_0xcd8242[_0x4b5c6e(0x9b)],_0x4a43f7={'memberId':this['_userService']['getCurrentUser']()[_0x4b5c6e(0xce)],'unitId':_0x5d774d,'threadId':_0x4be2b5,'solved':_0xcd8242[_0x4b5c6e(0x90)]?I[_0x4b5c6e(0x83)]:I['OpenOrReOpen']},_0x16817a=await this['_httpService'][_0x4b5c6e(0xcf)]('/universer-api/comment/unit/'+_0x5d774d+_0x4b5c6e(0xd2),{'body':_0x4a43f7});return!_0x16817a[_0x4b5c6e(0xcc)][_0x4b5c6e(0x99)]||_0x16817a[_0x4b5c6e(0xcc)][_0x4b5c6e(0x99)][_0x4b5c6e(0xca)]===0x1;}async[_0x3cc1dc(0xbf)](_0x205ac3,_0x1d77f1,_0x14d46a,_0x24a762){const _0x3a15c3=_0x3cc1dc,_0xddf989={'memberId':(await this[_0x3a15c3(0xbd)]['requireSession'](_0x205ac3))[_0x3a15c3(0x94)](),'threadId':_0x14d46a,'replyId':_0x24a762,'unitId':_0x205ac3},_0x313f89=await this[_0x3a15c3(0xc4)][_0x3a15c3(0xcf)](_0x3a15c3(0xb9)+_0x205ac3+_0x3a15c3(0x8c),{'body':_0xddf989});return!_0x313f89[_0x3a15c3(0xcc)][_0x3a15c3(0x99)]||_0x313f89['body'][_0x3a15c3(0x99)][_0x3a15c3(0xca)]===0x1;}async[_0x3cc1dc(0x87)](_0x185d23,_0x6e6061,_0x3580d7){const _0x1bb4c6=_0x3cc1dc,_0x2a2755={'unitId':_0x185d23,'threadId':_0x3580d7},_0x7c9b38=await this['_httpService'][_0x1bb4c6(0xcf)]('/universer-api/comment/unit/'+_0x185d23+'/list',{'body':_0x2a2755}),_0x5f51d3=_0x3580d7[_0x1bb4c6(0xb4)](_0x354934=>ee(_0x7c9b38[_0x1bb4c6(0xcc)][_0x1bb4c6(0xac)][_0x354934],_0x185d23,_0x6e6061))[_0x1bb4c6(0xb3)](Boolean);return Object['values'](_0x7c9b38[_0x1bb4c6(0xcc)][_0x1bb4c6(0xc7)])['forEach'](_0x39f11d=>{const _0xd4d780=_0x1bb4c6;this[_0xd4d780(0x91)][_0xd4d780(0x9a)](_0x39f11d);}),_0x5f51d3;}[_0x3cc1dc(0xba)](_0x356d6d){const _0x367ade=_0x3cc1dc;return{'id':_0x356d6d['id'],'threadId':_0x356d6d[_0x367ade(0x9b)],'ref':_0x356d6d[_0x367ade(0xaf)]};}};S=Q([b(0x0,_0x4aa1d4(_0x279eb0)),b(0x1,_0x4aa1d4(_0x4ad1d0)),b(0x2,_0x4aa1d4(_0x79848b))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x1dc784,_0x332422,_0x1d7bda,_0x5f543b)=>{const _0x11bb9d=_0x3cc1dc;for(var _0x2c0433=_0x5f543b>0x1?void 0x0:_0x5f543b?re(_0x332422,_0x1d7bda):_0x332422,_0x18bd93=_0x1dc784[_0x11bb9d(0xa6)]-0x1,_0x38d883;_0x18bd93>=0x0;_0x18bd93--)(_0x38d883=_0x1dc784[_0x18bd93])&&(_0x2c0433=_0x38d883(_0x2c0433)||_0x2c0433);return _0x2c0433;},M=(_0x5ce7a9,_0x270bcb)=>(_0x17a6d4,_0x16b1e5)=>_0x270bcb(_0x17a6d4,_0x16b1e5,_0x5ce7a9);let f=class extends _0x2054e7{constructor(_0x49e8d1,_0x5c8a9e){const _0x44f299=_0x3cc1dc;super(),this[_0x44f299(0xb7)]=_0x49e8d1,this[_0x44f299(0xc9)]=_0x5c8a9e,this[_0x44f299(0xad)]();}[_0x3cc1dc(0xad)](){const _0x47f950=_0x3cc1dc;this[_0x47f950(0xb7)][_0x47f950(0xdf)]=this[_0x47f950(0xc9)],this[_0x47f950(0xb7)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0xc9477f),M(0x1,_0x4aa1d4(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x601f78,_0x3aa8a3,_0x46938b)=>_0x3aa8a3 in _0x601f78?se(_0x601f78,_0x3aa8a3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46938b}):_0x601f78[_0x3aa8a3]=_0x46938b,ie=(_0x273747,_0x30ea46,_0x12e407,_0x5a0141)=>{const _0x127e99=_0x3cc1dc;for(var _0x465db5=_0x5a0141>0x1?void 0x0:_0x5a0141?oe(_0x30ea46,_0x12e407):_0x30ea46,_0x48ed50=_0x273747[_0x127e99(0xa6)]-0x1,_0x4143a6;_0x48ed50>=0x0;_0x48ed50--)(_0x4143a6=_0x273747[_0x48ed50])&&(_0x465db5=_0x4143a6(_0x465db5)||_0x465db5);return _0x465db5;},N=(_0x4cc6a8,_0x45d86a)=>(_0x445cf8,_0xf94019)=>_0x45d86a(_0x445cf8,_0xf94019,_0x4cc6a8),$=(_0x27cf14,_0x22c0d8,_0x159117)=>ne(_0x27cf14,typeof _0x22c0d8!=_0x3cc1dc(0xc5)?_0x22c0d8+'':_0x22c0d8,_0x159117);let g=class extends _0x16fb20{constructor(_0x1ef9a4=O,_0x40a035,_0x48e5b9){const _0x16b6a0=_0x3cc1dc;super(),this['_config']=_0x1ef9a4,this[_0x16b6a0(0xae)]=_0x40a035,this[_0x16b6a0(0xab)]=_0x48e5b9;const {..._0x2e4536}=_0x272650({},O,this[_0x16b6a0(0x80)]);this[_0x16b6a0(0xab)][_0x16b6a0(0xc3)](z,_0x2e4536);}[_0x3cc1dc(0x7c)](){const _0x74067c=_0x3cc1dc;[[S],[f],[_]][_0x74067c(0x81)](_0xaa2228=>{const _0x49abc2=_0x74067c;this[_0x49abc2(0xae)][_0x49abc2(0xa5)](_0xaa2228);});}[_0x3cc1dc(0x86)](){const _0x174dda=_0x3cc1dc;this['_injector'][_0x174dda(0xd6)](f),this['_injector'][_0x174dda(0xd6)](_);}};$(g,_0x3cc1dc(0xe0),W),$(g,_0x3cc1dc(0xcb),_0x51d13b[_0x3cc1dc(0xa2)]),g=ie([_0x42cae3(_0x2da2c7,_0x43a148,_0x1ff463),N(0x1,_0x4aa1d4(_0x258a62)),N(0x2,_0x2b93e2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f63da=_0x4fd3;(function(_0x251443,_0x30a4a7){const _0x14167c=_0x4fd3,_0x4ef987=_0x251443();while(!![]){try{const _0x428008=parseInt(_0x14167c(0x184))/0x1*(-parseInt(_0x14167c(0x19d))/0x2)+-parseInt(_0x14167c(0x147))/0x3+-parseInt(_0x14167c(0x159))/0x4*(-parseInt(_0x14167c(0x14f))/0x5)+-parseInt(_0x14167c(0x16c))/0x6+-parseInt(_0x14167c(0x171))/0x7*(parseInt(_0x14167c(0x164))/0x8)+-parseInt(_0x14167c(0x1a3))/0x9*(parseInt(_0x14167c(0x163))/0xa)+parseInt(_0x14167c(0x190))/0xb*(parseInt(_0x14167c(0x186))/0xc);if(_0x428008===_0x30a4a7)break;else _0x4ef987['push'](_0x4ef987['shift']());}catch(_0x4e52fa){_0x4ef987['push'](_0x4ef987['shift']());}}}(_0x1b76,0xa06f5));import{CommentService as _0x496dbb,CollaborationSessionService as _0x2c5e4c,UniverCollaborationClientPlugin as _0x3a685b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x586010}from'@univerjs-pro/license';import{dayjs as _0x28ba39,UserManagerService as _0x388990,Inject as _0x4bd280,Injector as _0x249295,Disposable as _0x391d46,CustomRangeType as _0x51ffb1,UniverInstanceType as _0x35e782,DependentOn as _0x25b0c6,IConfigService as _0x55aae9,Plugin as _0x14a1a2,merge as _0x21e87f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d91a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d3082,IThreadCommentDataSourceService as _0x2f9f28}from'@univerjs/thread-comment';import{bufferTime as _0x316e50}from'rxjs';import{HTTPService as _0x16abd7}from'@univerjs/network';const W=_0x3f63da(0x17c);var I=(_0x5890c0=>(_0x5890c0[_0x5890c0[_0x3f63da(0x16e)]=0x0]='OpenOrReOpen',_0x5890c0[_0x5890c0['Solved']=0x1]='Solved',_0x5890c0[_0x5890c0[_0x3f63da(0x185)]=-0x1]=_0x3f63da(0x185),_0x5890c0))(I||{}),v=(_0x3d4d9d=>(_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x18a)]=0x0]='Unknown',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x17a)]=0x1]='Add',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x19a)]=0x2]=_0x3f63da(0x19a),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x198)]=0x3]='Edit',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x149)]=0x4]=_0x3f63da(0x149),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x1a6)]=0x5]='Solve',_0x3d4d9d[_0x3d4d9d['UNRECOGNIZED']=-0x1]=_0x3f63da(0x185),_0x3d4d9d))(v||{});const y=_0x1416c3=>_0x28ba39(new Date(+_0x1416c3))[_0x3f63da(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3258a6,_0x1eaeba)=>{const _0x370a20=_0x3f63da,_0x2fff28=_0x3258a6[_0x370a20(0x14e)](_0x388990),_0x3566a7=_0x3258a6['get'](_0x16abd7);_0x1eaeba[_0x370a20(0x197)](_0x3e621b=>{const _0x901d45=_0x370a20;_0x2fff28[_0x901d45(0x192)](_0x3e621b)&&_0x1eaeba[_0x901d45(0x170)](_0x3e621b);}),_0x1eaeba['size']&&(await _0x3566a7[_0x370a20(0x14e)](_0x370a20(0x18e),{'params':{'userIDs':[..._0x1eaeba]}}))[_0x370a20(0x145)][_0x370a20(0x17b)][_0x370a20(0x197)](_0x13115c=>{const _0x39e410=_0x370a20;_0x13115c&&_0x2fff28[_0x39e410(0x153)](_0x13115c);});};var K=Object[_0x3f63da(0x1aa)],V=(_0x3accf5,_0x9c9acd,_0x29efc7,_0x3623a7)=>{const _0x3b9bb5=_0x3f63da;for(var _0x40db44=_0x3623a7>0x1?void 0x0:_0x3623a7?K(_0x9c9acd,_0x29efc7):_0x9c9acd,_0x5170bb=_0x3accf5[_0x3b9bb5(0x1a1)]-0x1,_0x132f41;_0x5170bb>=0x0;_0x5170bb--)(_0x132f41=_0x3accf5[_0x5170bb])&&(_0x40db44=_0x132f41(_0x40db44)||_0x40db44);return _0x40db44;},p=(_0x129962,_0x2bc81e)=>(_0x26cd2a,_0x58c1d0)=>_0x2bc81e(_0x26cd2a,_0x58c1d0,_0x129962);let _=class extends _0x391d46{constructor(_0x277360,_0x471aa6,_0x570188,_0x16573e){const _0x5e6ea2=_0x3f63da;super(),this[_0x5e6ea2(0x168)]=_0x277360,this['_threadCommentModel']=_0x471aa6,this[_0x5e6ea2(0x17f)]=_0x570188,this[_0x5e6ea2(0x175)]=_0x16573e,this[_0x5e6ea2(0x176)](),this[_0x5e6ea2(0x156)]();}['_initUserSync'](){const _0x2394b4=_0x3f63da;this[_0x2394b4(0x187)](this['_threadCommentModel']['commentUpdate$'][_0x2394b4(0x18c)](_0x316e50(0x10))['subscribe'](_0x1a15ba=>{const _0x961bef=_0x2394b4,_0x588321=new Set();_0x1a15ba[_0x961bef(0x197)](_0x177bef=>{const _0xe6be29=_0x961bef;if(_0x177bef['type']==='add'){const _0x3addec=_0x177bef[_0xe6be29(0x14d)][_0xe6be29(0x144)];_0x588321[_0xe6be29(0x199)](_0x3addec);}}),B(this[_0x961bef(0x175)],_0x588321);}));}[_0x3f63da(0x176)](){const _0x2ed88e=_0x3f63da;this[_0x2ed88e(0x187)](this[_0x2ed88e(0x168)][_0x2ed88e(0x146)][_0x2ed88e(0x155)](async _0x41429a=>{const _0x346ce0=_0x2ed88e;var _0x20cb01,_0x5adcc7,_0x2b684e,_0x4b7fb0;const _0x510c45=(_0x20cb01=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a[_0x346ce0(0x143)])[_0x346ce0(0x1a2)](_0x195d56=>_0x195d56[_0x346ce0(0x1a7)]===_0x41429a['threadId']))==null?void 0x0:_0x20cb01['root'];if(!_0x510c45)return;const {unitId:_0x15ecc2,subUnitId:_0x299f45}=_0x510c45;switch(_0x41429a['user']&&this[_0x346ce0(0x17f)]['addUser'](_0x41429a[_0x346ce0(0x16a)]),_0x41429a[_0x346ce0(0x15d)]){case v[_0x346ce0(0x17a)]:break;case v[_0x346ce0(0x19a)]:{this[_0x346ce0(0x178)]['addComment'](_0x15ecc2,_0x299f45,{'unitId':_0x15ecc2,'subUnitId':_0x299f45,'ref':'','id':_0x41429a['replyId'],'dT':y(+_0x41429a[_0x346ce0(0x1a4)]),'threadId':_0x41429a[_0x346ce0(0x1a7)],'personId':(_0x2b684e=(_0x5adcc7=_0x41429a[_0x346ce0(0x16a)])==null?void 0x0:_0x5adcc7['userID'])!=null?_0x2b684e:_0x41429a[_0x346ce0(0x19c)],'text':JSON[_0x346ce0(0x151)](_0x41429a['content']),'parentId':_0x510c45['id']});break;}case v[_0x346ce0(0x149)]:{const _0x529631=this[_0x346ce0(0x178)][_0x346ce0(0x165)](_0x15ecc2,_0x299f45,_0x41429a[_0x346ce0(0x161)]);_0x529631&&_0x529631['parentId']&&this[_0x346ce0(0x178)]['deleteComment'](_0x15ecc2,_0x299f45,_0x41429a['replyId']);break;}case v[_0x346ce0(0x198)]:{this[_0x346ce0(0x178)][_0x346ce0(0x183)](_0x15ecc2,_0x299f45,{'commentId':_0x41429a[_0x346ce0(0x161)],'text':JSON['parse'](_0x41429a['content'])});break;}case v['Solve']:{const _0x25c421=(_0x4b7fb0=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a['unitId'])['find'](_0x4de646=>_0x4de646[_0x346ce0(0x1a7)]===_0x41429a[_0x346ce0(0x1a7)]))==null?void 0x0:_0x4b7fb0[_0x346ce0(0x167)];_0x25c421&&this[_0x346ce0(0x178)][_0x346ce0(0x150)](_0x15ecc2,_0x299f45,_0x25c421['id'],_0x41429a['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4bd280(_0x496dbb)),p(0x1,_0x4bd280(_0x5d3082)),p(0x2,_0x4bd280(_0x388990)),p(0x3,_0x4bd280(_0x249295))],_);function _0x4fd3(_0x502c48,_0x24f8ce){_0x502c48=_0x502c48-0x143;const _0x1b7602=_0x1b76();let _0x4fd326=_0x1b7602[_0x502c48];return _0x4fd326;}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x38373b,_0x25bacf,_0x49f8d6,_0x132edb)=>{const _0x5ac149=_0x3f63da;for(var _0x2e1628=_0x132edb>0x1?void 0x0:_0x132edb?k(_0x25bacf,_0x49f8d6):_0x25bacf,_0x26fc15=_0x38373b[_0x5ac149(0x1a1)]-0x1,_0x28c166;_0x26fc15>=0x0;_0x26fc15--)(_0x28c166=_0x38373b[_0x26fc15])&&(_0x2e1628=_0x28c166(_0x2e1628)||_0x2e1628);return _0x2e1628;},b=(_0x143ecd,_0x4531c2)=>(_0x2df912,_0x39fd54)=>_0x4531c2(_0x2df912,_0x39fd54,_0x143ecd);function X(_0x3c675c,_0x5b4311){const _0x293743=_0x3f63da,_0x5e557b=_0x3c675c[_0x293743(0x173)][0x0];return{..._0x5b4311,'id':_0x5e557b[_0x293743(0x161)],'resolved':_0x3c675c[_0x293743(0x1a8)]===0x1,'dT':y(_0x5e557b[_0x293743(0x1a4)]),'personId':_0x5e557b[_0x293743(0x19c)],'threadId':_0x5e557b['threadId']};}function ee(_0x3dd8d8,_0x5781cc,_0x357123){const _0x41ad8d=_0x3f63da;var _0x380787,_0x2020ed;if(((_0x2020ed=(_0x380787=_0x3dd8d8==null?void 0x0:_0x3dd8d8[_0x41ad8d(0x173)])==null?void 0x0:_0x380787[_0x41ad8d(0x1a1)])!=null?_0x2020ed:0x0)>0x0){const _0x529d8a=(_0x42e7eb,_0x2e8018)=>({'id':_0x42e7eb['replyId'],'threadId':_0x42e7eb[_0x41ad8d(0x1a7)],'dT':y(_0x42e7eb['createTimestamp']),'personId':_0x42e7eb['userId'],'resolved':_0x3dd8d8[_0x41ad8d(0x1a8)]===I[_0x41ad8d(0x193)],'unitId':_0x5781cc,'subUnitId':_0x357123,'text':JSON[_0x41ad8d(0x151)](_0x42e7eb[_0x41ad8d(0x1a9)]),'parentId':_0x2e8018}),_0x17cc45=_0x529d8a(_0x3dd8d8[_0x41ad8d(0x173)][0x0]);return{..._0x17cc45,'children':_0x3dd8d8[_0x41ad8d(0x173)][_0x41ad8d(0x17d)](0x1)[_0x41ad8d(0x18b)](_0x16c60d=>_0x529d8a(_0x16c60d,_0x17cc45['id']))};}return null;}let S=class{constructor(_0x44c1b8,_0xb48d13,_0x3577cf){const _0x3c8f03=_0x3f63da;this[_0x3c8f03(0x15c)]=_0x44c1b8,this['_userService']=_0xb48d13,this[_0x3c8f03(0x195)]=_0x3577cf;}async['addComment'](_0x445902){const _0x598007=_0x3f63da;var _0x217d86,_0x5a3f4d;const {parentId:_0x38c24d,unitId:_0x53f572,text:_0x370955,threadId:_0x4bd308}=_0x445902,_0x41a74f=(_0x5a3f4d=(_0x217d86=_0x370955['customRanges'])==null?void 0x0:_0x217d86[_0x598007(0x157)](_0x5d311b=>_0x5d311b['rangeType']===_0x51ffb1['COMMENT'])[_0x598007(0x18b)](_0x22d42b=>_0x22d42b[_0x598007(0x148)]))!=null?_0x5a3f4d:[],_0x44b320=JSON[_0x598007(0x160)](_0x370955),_0x49db91=(await this[_0x598007(0x195)][_0x598007(0x16d)](_0x53f572))[_0x598007(0x191)]();if(_0x38c24d){const _0x4bd247={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f,'threadId':_0x4bd308},_0x164bfb=(await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+'/reply',{'body':_0x4bd247}))['body'][_0x598007(0x16f)];return{..._0x445902,'id':_0x164bfb[_0x598007(0x161)],'dT':_0x28ba39(+_0x164bfb[_0x598007(0x1a4)])['format'](_0x598007(0x152)),'personId':_0x164bfb[_0x598007(0x19c)]};}else{const _0x44c0ab={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f},_0x669843=await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+_0x598007(0x17e),{'body':_0x44c0ab});return X(_0x669843[_0x598007(0x145)][_0x598007(0x166)],_0x445902);}}async[_0x3f63da(0x183)](_0x1ac438){const _0x5d4e12=_0x3f63da;var _0x3de0f7,_0x148e67;const {text:_0x37c0e2,unitId:_0x17e8cb}=_0x1ac438,_0x3fa4a2=(_0x148e67=(_0x3de0f7=_0x37c0e2[_0x5d4e12(0x177)])==null?void 0x0:_0x3de0f7[_0x5d4e12(0x157)](_0x3978f8=>_0x3978f8[_0x5d4e12(0x1a5)]===_0x51ffb1[_0x5d4e12(0x196)])[_0x5d4e12(0x18b)](_0x106213=>_0x106213['rangeId']))!=null?_0x148e67:[],_0x39a5de=JSON[_0x5d4e12(0x160)](_0x37c0e2),_0x3b82a3=_0x1ac438[_0x5d4e12(0x1a7)],_0x305af8=_0x1ac438['id'],_0x111643={'memberId':(await this['_sessionService'][_0x5d4e12(0x16d)](_0x17e8cb))['getMemberID'](),'unitId':_0x17e8cb,'threadId':_0x3b82a3,'mention':_0x3fa4a2,'content':_0x39a5de,'replyId':_0x305af8},_0x2a5caf=await this['_httpService'][_0x5d4e12(0x15b)](_0x5d4e12(0x19e)+_0x17e8cb+'/edit',{'body':_0x111643});return!_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)]||_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)][_0x5d4e12(0x19f)]===0x1;}async[_0x3f63da(0x150)](_0x22c1af){const _0x391918=_0x3f63da,{unitId:_0x394fd3}=_0x22c1af,_0x52fa84=_0x22c1af[_0x391918(0x1a7)],_0x2c94af={'memberId':this[_0x391918(0x17f)][_0x391918(0x14a)]()[_0x391918(0x18d)],'unitId':_0x394fd3,'threadId':_0x52fa84,'solved':_0x22c1af[_0x391918(0x18f)]?I['Solved']:I[_0x391918(0x16e)]},_0x3d29c1=await this['_httpService'][_0x391918(0x15b)](_0x391918(0x19e)+_0x394fd3+'/solved',{'body':_0x2c94af});return!_0x3d29c1[_0x391918(0x145)][_0x391918(0x188)]||_0x3d29c1['body']['error']['code']===0x1;}async[_0x3f63da(0x14c)](_0xb74be6,_0x5f5b57,_0x536da1,_0x4cdb1d){const _0x1353bb=_0x3f63da,_0x56fa6e={'memberId':(await this[_0x1353bb(0x195)][_0x1353bb(0x16d)](_0xb74be6))[_0x1353bb(0x191)](),'threadId':_0x536da1,'replyId':_0x4cdb1d,'unitId':_0xb74be6},_0x2c324b=await this[_0x1353bb(0x15c)]['post'](_0x1353bb(0x19e)+_0xb74be6+_0x1353bb(0x172),{'body':_0x56fa6e});return!_0x2c324b[_0x1353bb(0x145)][_0x1353bb(0x188)]||_0x2c324b['body'][_0x1353bb(0x188)][_0x1353bb(0x19f)]===0x1;}async[_0x3f63da(0x15e)](_0x3846dd,_0xa5fafd,_0x355c55){const _0x42d450=_0x3f63da,_0x417290={'unitId':_0x3846dd,'threadId':_0x355c55},_0x1595d=await this['_httpService']['post'](_0x42d450(0x19e)+_0x3846dd+'/list',{'body':_0x417290}),_0x197870=_0x355c55[_0x42d450(0x18b)](_0x37bd38=>ee(_0x1595d[_0x42d450(0x145)][_0x42d450(0x15a)][_0x37bd38],_0x3846dd,_0xa5fafd))[_0x42d450(0x157)](Boolean);return Object[_0x42d450(0x182)](_0x1595d[_0x42d450(0x145)][_0x42d450(0x17b)])[_0x42d450(0x197)](_0x39cf1a=>{const _0x1a2901=_0x42d450;this[_0x1a2901(0x17f)][_0x1a2901(0x153)](_0x39cf1a);}),_0x197870;}[_0x3f63da(0x189)](_0x49a50c){const _0x5cb2c6=_0x3f63da;return{'id':_0x49a50c['id'],'threadId':_0x49a50c[_0x5cb2c6(0x1a7)],'ref':_0x49a50c[_0x5cb2c6(0x16b)]};}};function _0x1b76(){const _0x3fdba0=['_httpService','type','listComments','_threadCommentDataSourceService','stringify','replyId','_configService','3703220iXLVEV','8XvKUcU','getComment','comment','root','_commentService','_initDataSource','user','ref','2616942ITFNRR','requireSession','OpenOrReOpen','reply','delete','5700331wfInQT','/delete','replies','getUnit','_injector','_init','customRanges','_threadCommentModel','_threadCommentDataSource','Add','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','/add','_userService','_config','format','values','updateComment','1GDNkXl','UNRECOGNIZED','167160cmkBfK','disposeWithMe','error','saveCommentToSnapshot','Unknown','map','pipe','userID','/universer-api/user/list','resolved','2750tJfpJw','getMemberID','getUser','Solved','defineProperty','_sessionService','COMMENT','forEach','Edit','add','Reply','syncUpdateMutationToColla','userId','450688TADXBX','/universer-api/comment/unit/','code','onReady','length','find','18ZWEusn','createTimestamp','rangeType','Solve','threadId','solved','content','getOwnPropertyDescriptor','unitId','personId','body','commentUpdate$','3754998TggIOg','rangeId','Delete','getCurrentUser','pluginName','deleteComment','payload','get','1595pVRxMl','resolveComment','parse','YYYY/MM/DD\x20HH:mm','addUser','dataSource','subscribe','_initUserSync','filter','setConfig','8060yAyonb','comments','post'];_0x1b76=function(){return _0x3fdba0;};return _0x1b76();}S=Q([b(0x0,_0x4bd280(_0x16abd7)),b(0x1,_0x4bd280(_0x388990)),b(0x2,_0x4bd280(_0x2c5e4c))],S);var re=Object[_0x3f63da(0x1aa)],te=(_0x2de3ba,_0x627aa8,_0x34506d,_0x28971f)=>{const _0x59e1fe=_0x3f63da;for(var _0x9c9fac=_0x28971f>0x1?void 0x0:_0x28971f?re(_0x627aa8,_0x34506d):_0x627aa8,_0x221e15=_0x2de3ba[_0x59e1fe(0x1a1)]-0x1,_0x1f4b27;_0x221e15>=0x0;_0x221e15--)(_0x1f4b27=_0x2de3ba[_0x221e15])&&(_0x9c9fac=_0x1f4b27(_0x9c9fac)||_0x9c9fac);return _0x9c9fac;},M=(_0x1919e9,_0x294a12)=>(_0x30db81,_0xbebaf1)=>_0x294a12(_0x30db81,_0xbebaf1,_0x1919e9);let f=class extends _0x391d46{constructor(_0x3b163c,_0x3e48dc){const _0x5ad643=_0x3f63da;super(),this[_0x5ad643(0x15f)]=_0x3b163c,this[_0x5ad643(0x179)]=_0x3e48dc,this[_0x5ad643(0x169)]();}['_initDataSource'](){const _0x25edef=_0x3f63da;this[_0x25edef(0x15f)][_0x25edef(0x154)]=this[_0x25edef(0x179)],this[_0x25edef(0x15f)][_0x25edef(0x19b)]=!0x1;}};f=te([M(0x0,_0x2f9f28),M(0x1,_0x4bd280(S))],f);var se=Object[_0x3f63da(0x194)],oe=Object[_0x3f63da(0x1aa)],ne=(_0x2fe6fd,_0x590c24,_0x3b632a)=>_0x590c24 in _0x2fe6fd?se(_0x2fe6fd,_0x590c24,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b632a}):_0x2fe6fd[_0x590c24]=_0x3b632a,ie=(_0x42b5a3,_0x588d56,_0x1e4d7d,_0x25b3b7)=>{const _0x1d860e=_0x3f63da;for(var _0x24b614=_0x25b3b7>0x1?void 0x0:_0x25b3b7?oe(_0x588d56,_0x1e4d7d):_0x588d56,_0x316b48=_0x42b5a3[_0x1d860e(0x1a1)]-0x1,_0xf82413;_0x316b48>=0x0;_0x316b48--)(_0xf82413=_0x42b5a3[_0x316b48])&&(_0x24b614=_0xf82413(_0x24b614)||_0x24b614);return _0x24b614;},N=(_0x243842,_0xb7b003)=>(_0x4301f7,_0x1a0bc2)=>_0xb7b003(_0x4301f7,_0x1a0bc2,_0x243842),$=(_0x265a4d,_0x3c2f1f,_0x4d5696)=>ne(_0x265a4d,typeof _0x3c2f1f!='symbol'?_0x3c2f1f+'':_0x3c2f1f,_0x4d5696);let g=class extends _0x14a1a2{constructor(_0x576930=O,_0x394901,_0xed77a7){const _0x2a4fcb=_0x3f63da;super(),this[_0x2a4fcb(0x180)]=_0x576930,this[_0x2a4fcb(0x175)]=_0x394901,this['_configService']=_0xed77a7;const {..._0x4b66d0}=_0x21e87f({},O,this[_0x2a4fcb(0x180)]);this[_0x2a4fcb(0x162)][_0x2a4fcb(0x158)](z,_0x4b66d0);}['onStarting'](){const _0x499287=_0x3f63da;[[S],[f],[_]][_0x499287(0x197)](_0x79f8f=>{const _0x209775=_0x499287;this[_0x209775(0x175)][_0x209775(0x199)](_0x79f8f);});}[_0x3f63da(0x1a0)](){const _0x2583cd=_0x3f63da;this[_0x2583cd(0x175)][_0x2583cd(0x14e)](f),this[_0x2583cd(0x175)][_0x2583cd(0x14e)](_);}};$(g,_0x3f63da(0x14b),W),$(g,_0x3f63da(0x15d),_0x35e782['UNIVER_UNKNOWN']),g=ie([_0x25b0c6(_0x1d91a2,_0x3a685b,_0x586010),N(0x1,_0x4bd280(_0x249295)),N(0x2,_0x55aae9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3cc1dc=_0x2047;(function(_0x3bc121,_0x4ccc60){const _0x6b650f=_0x2047,_0x141983=_0x3bc121();while(!![]){try{const _0x14eaac=-parseInt(_0x6b650f(0xdb))/0x1*(-parseInt(_0x6b650f(0xa1))/0x2)+parseInt(_0x6b650f(0x95))/0x3+-parseInt(_0x6b650f(0xda))/0x4+-parseInt(_0x6b650f(0x82))/0x5*(-parseInt(_0x6b650f(0xcd))/0x6)+-parseInt(_0x6b650f(0xb1))/0x7*(-parseInt(_0x6b650f(0x88))/0x8)+-parseInt(_0x6b650f(0x98))/0x9+-parseInt(_0x6b650f(0x85))/0xa;if(_0x14eaac===_0x4ccc60)break;else _0x141983['push'](_0x141983['shift']());}catch(_0x32bd99){_0x141983['push'](_0x141983['shift']());}}}(_0x4fd3,0x216ad));import{CommentService as _0x389d36,CollaborationSessionService as _0x79848b,UniverCollaborationClientPlugin as _0x43a148}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1ff463}from'@univerjs-pro/license';import{dayjs as _0x541853,UserManagerService as _0x4ad1d0,Inject as _0x4aa1d4,Injector as _0x258a62,Disposable as _0x2054e7,CustomRangeType as _0x5bf78f,UniverInstanceType as _0x51d13b,DependentOn as _0x42cae3,IConfigService as _0x2b93e2,Plugin as _0x16fb20,merge as _0x272650}from'@univerjs/core';function _0x4fd3(){const _0x1a4b9b=['resolveComment','/universer-api/comment/unit/','saveCommentToSnapshot','parentId','Unknown','_sessionService','replyId','deleteComment','stringify','updateComment','solved','setConfig','_httpService','symbol','Edit','users','personId','_threadCommentDataSource','code','type','body','132agjfQF','userID','post','YYYY/MM/DD\x20HH:mm','_init','/solved','customRanges','requireSession','replies','get','getUnit','find','format','541392SuzNXh','449XEppgC','root','Add','commentUpdate$','dataSource','pluginName','onStarting','subscribe','parse','/universer-api/user/list','_config','forEach','15585NWcVSR','Solved','getComment','1946640mrFaFH','onReady','listComments','99368piJKHX','_initUserSync','unitId','Reply','/delete','_commentService','disposeWithMe','getUser','resolved','_userService','delete','content','getMemberID','705990dDjXsB','_threadCommentModel','getOwnPropertyDescriptor','875484rPBlQV','error','addUser','threadId','rangeId','rangeType','Delete','user','Solve','772rBJvNi','UNIVER_UNKNOWN','comment','UNRECOGNIZED','add','length','size','userId','createTimestamp','/reply','_configService','comments','_initDataSource','_injector','ref','COMMENT','49yOfMQj','addComment','filter','map','slice','thread-comment-data-source.config','_threadCommentDataSourceService'];_0x4fd3=function(){return _0x1a4b9b;};return _0x4fd3();}import{UniverThreadCommentUIPlugin as _0x2da2c7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43ddf6,IThreadCommentDataSourceService as _0xc9477f}from'@univerjs/thread-comment';import{bufferTime as _0x4cb116}from'rxjs';function _0x2047(_0x5be91e,_0x60f931){_0x5be91e=_0x5be91e-0x7c;const _0x4fd34d=_0x4fd3();let _0x2047fd=_0x4fd34d[_0x5be91e];return _0x2047fd;}import{HTTPService as _0x279eb0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17f676=>(_0x17f676[_0x17f676['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x17f676[_0x17f676[_0x3cc1dc(0x83)]=0x1]=_0x3cc1dc(0x83),_0x17f676[_0x17f676[_0x3cc1dc(0xa4)]=-0x1]='UNRECOGNIZED',_0x17f676))(I||{}),v=(_0x4f71b9=>(_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xbc)]=0x0]=_0x3cc1dc(0xbc),_0x4f71b9[_0x4f71b9['Add']=0x1]=_0x3cc1dc(0xdd),_0x4f71b9[_0x4f71b9[_0x3cc1dc(0x8b)]=0x2]=_0x3cc1dc(0x8b),_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xc6)]=0x3]='Edit',_0x4f71b9[_0x4f71b9['Delete']=0x4]=_0x3cc1dc(0x9e),_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xa0)]=0x5]='Solve',_0x4f71b9[_0x4f71b9[_0x3cc1dc(0xa4)]=-0x1]=_0x3cc1dc(0xa4),_0x4f71b9))(v||{});const y=_0x45dd39=>_0x541853(new Date(+_0x45dd39))[_0x3cc1dc(0xd9)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e2110,_0x4019ed)=>{const _0x5b3665=_0x3cc1dc,_0x4b54de=_0x3e2110[_0x5b3665(0xd6)](_0x4ad1d0),_0xb1a28b=_0x3e2110[_0x5b3665(0xd6)](_0x279eb0);_0x4019ed[_0x5b3665(0x81)](_0x5eb254=>{const _0x39dcdd=_0x5b3665;_0x4b54de[_0x39dcdd(0x8f)](_0x5eb254)&&_0x4019ed[_0x39dcdd(0x92)](_0x5eb254);}),_0x4019ed[_0x5b3665(0xa7)]&&(await _0xb1a28b[_0x5b3665(0xd6)](_0x5b3665(0x7f),{'params':{'userIDs':[..._0x4019ed]}}))[_0x5b3665(0xcc)]['users'][_0x5b3665(0x81)](_0x4baaa5=>{const _0x9a68cd=_0x5b3665;_0x4baaa5&&_0x4b54de[_0x9a68cd(0x9a)](_0x4baaa5);});};var K=Object[_0x3cc1dc(0x97)],V=(_0x2eb3a3,_0xd283f7,_0x3095c6,_0x28442e)=>{const _0x43f03e=_0x3cc1dc;for(var _0x377a52=_0x28442e>0x1?void 0x0:_0x28442e?K(_0xd283f7,_0x3095c6):_0xd283f7,_0x563b58=_0x2eb3a3[_0x43f03e(0xa6)]-0x1,_0x22cb14;_0x563b58>=0x0;_0x563b58--)(_0x22cb14=_0x2eb3a3[_0x563b58])&&(_0x377a52=_0x22cb14(_0x377a52)||_0x377a52);return _0x377a52;},p=(_0x18ba2a,_0x7f5fe5)=>(_0x157268,_0x1c092c)=>_0x7f5fe5(_0x157268,_0x1c092c,_0x18ba2a);let _=class extends _0x2054e7{constructor(_0x3fad25,_0x33caa6,_0x2df4f7,_0x2778f5){const _0x108d25=_0x3cc1dc;super(),this[_0x108d25(0x8d)]=_0x3fad25,this['_threadCommentModel']=_0x33caa6,this[_0x108d25(0x91)]=_0x2df4f7,this[_0x108d25(0xae)]=_0x2778f5,this[_0x108d25(0xd1)](),this[_0x108d25(0x89)]();}['_initUserSync'](){const _0x4476d8=_0x3cc1dc;this[_0x4476d8(0x8e)](this[_0x4476d8(0x96)][_0x4476d8(0xde)]['pipe'](_0x4cb116(0x10))[_0x4476d8(0x7d)](_0x182665=>{const _0x23b13f=_0x4476d8,_0x5b8f40=new Set();_0x182665[_0x23b13f(0x81)](_0x37ff5f=>{const _0x147237=_0x23b13f;if(_0x37ff5f['type']===_0x147237(0xa5)){const _0x4b988e=_0x37ff5f['payload'][_0x147237(0xc8)];_0x5b8f40['add'](_0x4b988e);}}),B(this['_injector'],_0x5b8f40);}));}['_init'](){const _0xa743af=_0x3cc1dc;this[_0xa743af(0x8e)](this[_0xa743af(0x8d)][_0xa743af(0xde)]['subscribe'](async _0x6eede0=>{const _0x582948=_0xa743af;var _0x56b62a,_0x42b0a9,_0x2f55ee,_0x3e791e;const _0x537a8b=(_0x56b62a=this[_0x582948(0x96)][_0x582948(0xd7)](_0x6eede0[_0x582948(0x8a)])['find'](_0x11ad2d=>_0x11ad2d['threadId']===_0x6eede0[_0x582948(0x9b)]))==null?void 0x0:_0x56b62a[_0x582948(0xdc)];if(!_0x537a8b)return;const {unitId:_0x5bdb61,subUnitId:_0x228db1}=_0x537a8b;switch(_0x6eede0['user']&&this[_0x582948(0x91)][_0x582948(0x9a)](_0x6eede0['user']),_0x6eede0[_0x582948(0xcb)]){case v[_0x582948(0xdd)]:break;case v[_0x582948(0x8b)]:{this[_0x582948(0x96)][_0x582948(0xb2)](_0x5bdb61,_0x228db1,{'unitId':_0x5bdb61,'subUnitId':_0x228db1,'ref':'','id':_0x6eede0[_0x582948(0xbe)],'dT':y(+_0x6eede0['createTimestamp']),'threadId':_0x6eede0[_0x582948(0x9b)],'personId':(_0x2f55ee=(_0x42b0a9=_0x6eede0[_0x582948(0x9f)])==null?void 0x0:_0x42b0a9[_0x582948(0xce)])!=null?_0x2f55ee:_0x6eede0[_0x582948(0xa8)],'text':JSON[_0x582948(0x7e)](_0x6eede0[_0x582948(0x93)]),'parentId':_0x537a8b['id']});break;}case v[_0x582948(0x9e)]:{const _0x5686fb=this['_threadCommentModel'][_0x582948(0x84)](_0x5bdb61,_0x228db1,_0x6eede0['replyId']);_0x5686fb&&_0x5686fb[_0x582948(0xbb)]&&this[_0x582948(0x96)][_0x582948(0xbf)](_0x5bdb61,_0x228db1,_0x6eede0[_0x582948(0xbe)]);break;}case v['Edit']:{this[_0x582948(0x96)][_0x582948(0xc1)](_0x5bdb61,_0x228db1,{'commentId':_0x6eede0['replyId'],'text':JSON[_0x582948(0x7e)](_0x6eede0[_0x582948(0x93)])});break;}case v[_0x582948(0xa0)]:{const _0x11227e=(_0x3e791e=this[_0x582948(0x96)][_0x582948(0xd7)](_0x6eede0['unitId'])[_0x582948(0xd8)](_0x2beec5=>_0x2beec5[_0x582948(0x9b)]===_0x6eede0['threadId']))==null?void 0x0:_0x3e791e[_0x582948(0xdc)];_0x11227e&&this[_0x582948(0x96)][_0x582948(0xb8)](_0x5bdb61,_0x228db1,_0x11227e['id'],_0x6eede0['solved']===I[_0x582948(0x83)]);break;}}}));}};_=V([p(0x0,_0x4aa1d4(_0x389d36)),p(0x1,_0x4aa1d4(_0x43ddf6)),p(0x2,_0x4aa1d4(_0x4ad1d0)),p(0x3,_0x4aa1d4(_0x258a62))],_);const z=_0x3cc1dc(0xb6),O={};var k=Object[_0x3cc1dc(0x97)],Q=(_0x294650,_0x4a0adb,_0x8dbf9d,_0x35e23c)=>{for(var _0x4dac40=_0x35e23c>0x1?void 0x0:_0x35e23c?k(_0x4a0adb,_0x8dbf9d):_0x4a0adb,_0x16db01=_0x294650['length']-0x1,_0xab183c;_0x16db01>=0x0;_0x16db01--)(_0xab183c=_0x294650[_0x16db01])&&(_0x4dac40=_0xab183c(_0x4dac40)||_0x4dac40);return _0x4dac40;},b=(_0x15582b,_0x56c83a)=>(_0x1bdcec,_0x3eb8be)=>_0x56c83a(_0x1bdcec,_0x3eb8be,_0x15582b);function X(_0x2c63f0,_0x4bd3b4){const _0x63d826=_0x3cc1dc,_0x2adeb0=_0x2c63f0[_0x63d826(0xd5)][0x0];return{..._0x4bd3b4,'id':_0x2adeb0['replyId'],'resolved':_0x2c63f0['solved']===0x1,'dT':y(_0x2adeb0[_0x63d826(0xa9)]),'personId':_0x2adeb0[_0x63d826(0xa8)],'threadId':_0x2adeb0[_0x63d826(0x9b)]};}function ee(_0x48cf72,_0x2f8c52,_0x5f16e1){const _0x3f96b0=_0x3cc1dc;var _0x3b24a1,_0x2494bf;if(((_0x2494bf=(_0x3b24a1=_0x48cf72==null?void 0x0:_0x48cf72['replies'])==null?void 0x0:_0x3b24a1['length'])!=null?_0x2494bf:0x0)>0x0){const _0x44b878=(_0x432908,_0x22a14c)=>({'id':_0x432908[_0x3f96b0(0xbe)],'threadId':_0x432908[_0x3f96b0(0x9b)],'dT':y(_0x432908['createTimestamp']),'personId':_0x432908[_0x3f96b0(0xa8)],'resolved':_0x48cf72[_0x3f96b0(0xc2)]===I[_0x3f96b0(0x83)],'unitId':_0x2f8c52,'subUnitId':_0x5f16e1,'text':JSON[_0x3f96b0(0x7e)](_0x432908[_0x3f96b0(0x93)]),'parentId':_0x22a14c}),_0x5bbaf6=_0x44b878(_0x48cf72['replies'][0x0]);return{..._0x5bbaf6,'children':_0x48cf72[_0x3f96b0(0xd5)][_0x3f96b0(0xb5)](0x1)[_0x3f96b0(0xb4)](_0x45a0f5=>_0x44b878(_0x45a0f5,_0x5bbaf6['id']))};}return null;}let S=class{constructor(_0x451f22,_0x344ff8,_0x24179d){const _0x3f045d=_0x3cc1dc;this['_httpService']=_0x451f22,this[_0x3f045d(0x91)]=_0x344ff8,this[_0x3f045d(0xbd)]=_0x24179d;}async[_0x3cc1dc(0xb2)](_0x3cb8fa){const _0x2a890c=_0x3cc1dc;var _0x2d2a8f,_0x174f42;const {parentId:_0x551a02,unitId:_0x22df7e,text:_0x171514,threadId:_0x3a2c28}=_0x3cb8fa,_0x3d20e0=(_0x174f42=(_0x2d2a8f=_0x171514[_0x2a890c(0xd3)])==null?void 0x0:_0x2d2a8f['filter'](_0x2e7c01=>_0x2e7c01[_0x2a890c(0x9d)]===_0x5bf78f[_0x2a890c(0xb0)])[_0x2a890c(0xb4)](_0x58e565=>_0x58e565[_0x2a890c(0x9c)]))!=null?_0x174f42:[],_0xcda1f2=JSON[_0x2a890c(0xc0)](_0x171514),_0x12f352=(await this['_sessionService']['requireSession'](_0x22df7e))[_0x2a890c(0x94)]();if(_0x551a02){const _0x2b5d63={'memberId':_0x12f352,'unitId':_0x22df7e,'content':_0xcda1f2,'mention':_0x3d20e0,'threadId':_0x3a2c28},_0x51ad38=(await this[_0x2a890c(0xc4)][_0x2a890c(0xcf)](_0x2a890c(0xb9)+_0x22df7e+_0x2a890c(0xaa),{'body':_0x2b5d63}))[_0x2a890c(0xcc)]['reply'];return{..._0x3cb8fa,'id':_0x51ad38[_0x2a890c(0xbe)],'dT':_0x541853(+_0x51ad38['createTimestamp'])[_0x2a890c(0xd9)](_0x2a890c(0xd0)),'personId':_0x51ad38['userId']};}else{const _0x3a956c={'memberId':_0x12f352,'unitId':_0x22df7e,'content':_0xcda1f2,'mention':_0x3d20e0},_0x3e6410=await this['_httpService'][_0x2a890c(0xcf)](_0x2a890c(0xb9)+_0x22df7e+'/add',{'body':_0x3a956c});return X(_0x3e6410['body'][_0x2a890c(0xa3)],_0x3cb8fa);}}async[_0x3cc1dc(0xc1)](_0x2724b4){const _0x202c86=_0x3cc1dc;var _0x466a73,_0x5d8349;const {text:_0x281f7d,unitId:_0x288351}=_0x2724b4,_0x432b14=(_0x5d8349=(_0x466a73=_0x281f7d[_0x202c86(0xd3)])==null?void 0x0:_0x466a73['filter'](_0x5310a4=>_0x5310a4[_0x202c86(0x9d)]===_0x5bf78f[_0x202c86(0xb0)])[_0x202c86(0xb4)](_0x2e67b6=>_0x2e67b6[_0x202c86(0x9c)]))!=null?_0x5d8349:[],_0x49132e=JSON[_0x202c86(0xc0)](_0x281f7d),_0x3b9a01=_0x2724b4[_0x202c86(0x9b)],_0x4940cc=_0x2724b4['id'],_0x596fda={'memberId':(await this['_sessionService'][_0x202c86(0xd4)](_0x288351))[_0x202c86(0x94)](),'unitId':_0x288351,'threadId':_0x3b9a01,'mention':_0x432b14,'content':_0x49132e,'replyId':_0x4940cc},_0x2eff95=await this[_0x202c86(0xc4)]['post'](_0x202c86(0xb9)+_0x288351+'/edit',{'body':_0x596fda});return!_0x2eff95['body'][_0x202c86(0x99)]||_0x2eff95['body'][_0x202c86(0x99)]['code']===0x1;}async['resolveComment'](_0xcd8242){const _0x4b5c6e=_0x3cc1dc,{unitId:_0x5d774d}=_0xcd8242,_0x4be2b5=_0xcd8242[_0x4b5c6e(0x9b)],_0x4a43f7={'memberId':this['_userService']['getCurrentUser']()[_0x4b5c6e(0xce)],'unitId':_0x5d774d,'threadId':_0x4be2b5,'solved':_0xcd8242[_0x4b5c6e(0x90)]?I[_0x4b5c6e(0x83)]:I['OpenOrReOpen']},_0x16817a=await this['_httpService'][_0x4b5c6e(0xcf)]('/universer-api/comment/unit/'+_0x5d774d+_0x4b5c6e(0xd2),{'body':_0x4a43f7});return!_0x16817a[_0x4b5c6e(0xcc)][_0x4b5c6e(0x99)]||_0x16817a[_0x4b5c6e(0xcc)][_0x4b5c6e(0x99)][_0x4b5c6e(0xca)]===0x1;}async[_0x3cc1dc(0xbf)](_0x205ac3,_0x1d77f1,_0x14d46a,_0x24a762){const _0x3a15c3=_0x3cc1dc,_0xddf989={'memberId':(await this[_0x3a15c3(0xbd)]['requireSession'](_0x205ac3))[_0x3a15c3(0x94)](),'threadId':_0x14d46a,'replyId':_0x24a762,'unitId':_0x205ac3},_0x313f89=await this[_0x3a15c3(0xc4)][_0x3a15c3(0xcf)](_0x3a15c3(0xb9)+_0x205ac3+_0x3a15c3(0x8c),{'body':_0xddf989});return!_0x313f89[_0x3a15c3(0xcc)][_0x3a15c3(0x99)]||_0x313f89['body'][_0x3a15c3(0x99)][_0x3a15c3(0xca)]===0x1;}async[_0x3cc1dc(0x87)](_0x185d23,_0x6e6061,_0x3580d7){const _0x1bb4c6=_0x3cc1dc,_0x2a2755={'unitId':_0x185d23,'threadId':_0x3580d7},_0x7c9b38=await this['_httpService'][_0x1bb4c6(0xcf)]('/universer-api/comment/unit/'+_0x185d23+'/list',{'body':_0x2a2755}),_0x5f51d3=_0x3580d7[_0x1bb4c6(0xb4)](_0x354934=>ee(_0x7c9b38[_0x1bb4c6(0xcc)][_0x1bb4c6(0xac)][_0x354934],_0x185d23,_0x6e6061))[_0x1bb4c6(0xb3)](Boolean);return Object['values'](_0x7c9b38[_0x1bb4c6(0xcc)][_0x1bb4c6(0xc7)])['forEach'](_0x39f11d=>{const _0xd4d780=_0x1bb4c6;this[_0xd4d780(0x91)][_0xd4d780(0x9a)](_0x39f11d);}),_0x5f51d3;}[_0x3cc1dc(0xba)](_0x356d6d){const _0x367ade=_0x3cc1dc;return{'id':_0x356d6d['id'],'threadId':_0x356d6d[_0x367ade(0x9b)],'ref':_0x356d6d[_0x367ade(0xaf)]};}};S=Q([b(0x0,_0x4aa1d4(_0x279eb0)),b(0x1,_0x4aa1d4(_0x4ad1d0)),b(0x2,_0x4aa1d4(_0x79848b))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x1dc784,_0x332422,_0x1d7bda,_0x5f543b)=>{const _0x11bb9d=_0x3cc1dc;for(var _0x2c0433=_0x5f543b>0x1?void 0x0:_0x5f543b?re(_0x332422,_0x1d7bda):_0x332422,_0x18bd93=_0x1dc784[_0x11bb9d(0xa6)]-0x1,_0x38d883;_0x18bd93>=0x0;_0x18bd93--)(_0x38d883=_0x1dc784[_0x18bd93])&&(_0x2c0433=_0x38d883(_0x2c0433)||_0x2c0433);return _0x2c0433;},M=(_0x5ce7a9,_0x270bcb)=>(_0x17a6d4,_0x16b1e5)=>_0x270bcb(_0x17a6d4,_0x16b1e5,_0x5ce7a9);let f=class extends _0x2054e7{constructor(_0x49e8d1,_0x5c8a9e){const _0x44f299=_0x3cc1dc;super(),this[_0x44f299(0xb7)]=_0x49e8d1,this[_0x44f299(0xc9)]=_0x5c8a9e,this[_0x44f299(0xad)]();}[_0x3cc1dc(0xad)](){const _0x47f950=_0x3cc1dc;this[_0x47f950(0xb7)][_0x47f950(0xdf)]=this[_0x47f950(0xc9)],this[_0x47f950(0xb7)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0xc9477f),M(0x1,_0x4aa1d4(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x601f78,_0x3aa8a3,_0x46938b)=>_0x3aa8a3 in _0x601f78?se(_0x601f78,_0x3aa8a3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46938b}):_0x601f78[_0x3aa8a3]=_0x46938b,ie=(_0x273747,_0x30ea46,_0x12e407,_0x5a0141)=>{const _0x127e99=_0x3cc1dc;for(var _0x465db5=_0x5a0141>0x1?void 0x0:_0x5a0141?oe(_0x30ea46,_0x12e407):_0x30ea46,_0x48ed50=_0x273747[_0x127e99(0xa6)]-0x1,_0x4143a6;_0x48ed50>=0x0;_0x48ed50--)(_0x4143a6=_0x273747[_0x48ed50])&&(_0x465db5=_0x4143a6(_0x465db5)||_0x465db5);return _0x465db5;},N=(_0x4cc6a8,_0x45d86a)=>(_0x445cf8,_0xf94019)=>_0x45d86a(_0x445cf8,_0xf94019,_0x4cc6a8),$=(_0x27cf14,_0x22c0d8,_0x159117)=>ne(_0x27cf14,typeof _0x22c0d8!=_0x3cc1dc(0xc5)?_0x22c0d8+'':_0x22c0d8,_0x159117);let g=class extends _0x16fb20{constructor(_0x1ef9a4=O,_0x40a035,_0x48e5b9){const _0x16b6a0=_0x3cc1dc;super(),this['_config']=_0x1ef9a4,this[_0x16b6a0(0xae)]=_0x40a035,this[_0x16b6a0(0xab)]=_0x48e5b9;const {..._0x2e4536}=_0x272650({},O,this[_0x16b6a0(0x80)]);this[_0x16b6a0(0xab)][_0x16b6a0(0xc3)](z,_0x2e4536);}[_0x3cc1dc(0x7c)](){const _0x74067c=_0x3cc1dc;[[S],[f],[_]][_0x74067c(0x81)](_0xaa2228=>{const _0x49abc2=_0x74067c;this[_0x49abc2(0xae)][_0x49abc2(0xa5)](_0xaa2228);});}[_0x3cc1dc(0x86)](){const _0x174dda=_0x3cc1dc;this['_injector'][_0x174dda(0xd6)](f),this['_injector'][_0x174dda(0xd6)](_);}};$(g,_0x3cc1dc(0xe0),W),$(g,_0x3cc1dc(0xcb),_0x51d13b[_0x3cc1dc(0xa2)]),g=ie([_0x42cae3(_0x2da2c7,_0x43a148,_0x1ff463),N(0x1,_0x4aa1d4(_0x258a62)),N(0x2,_0x2b93e2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x33a348,_0x454e32){const _0x294c06=_0x3b71,_0x104e10=_0x33a348();while(!![]){try{const _0x3a389a=parseInt(_0x294c06(0x1d1))/0x1+-parseInt(_0x294c06(0x1f4))/0x2+-parseInt(_0x294c06(0x1c8))/0x3*(-parseInt(_0x294c06(0x1b5))/0x4)+-parseInt(_0x294c06(0x1be))/0x5+-parseInt(_0x294c06(0x198))/0x6+-parseInt(_0x294c06(0x1a2))/0x7*(-parseInt(_0x294c06(0x1ba))/0x8)+-parseInt(_0x294c06(0x1d7))/0x9;if(_0x3a389a===_0x454e32)break;else _0x104e10['push'](_0x104e10['shift']());}catch(_0x3fd076){_0x104e10['push'](_0x104e10['shift']());}}}(_0x1425,0x5cd9c),function(_0x228318,_0x2e3554){const _0x237aa9=_0x3b71;typeof exports=='object'&&typeof module<'u'?_0x2e3554(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x237aa9(0x200)&&define[_0x237aa9(0x1b0)]?define([_0x237aa9(0x1a6),_0x237aa9(0x1ca),_0x237aa9(0x1dc),_0x237aa9(0x19d),_0x237aa9(0x1aa),_0x237aa9(0x1d0),'rxjs',_0x237aa9(0x1f9)],_0x2e3554):(_0x228318=typeof globalThis<'u'?globalThis:_0x228318||self,_0x2e3554(_0x228318['UniverProThreadCommentDatasource']={},_0x228318['UniverProCollaborationClient'],_0x228318[_0x237aa9(0x1c9)],_0x228318[_0x237aa9(0x1d4)],_0x228318[_0x237aa9(0x1dd)],_0x228318['UniverThreadComment'],_0x228318[_0x237aa9(0x1f1)],_0x228318[_0x237aa9(0x1f8)]));}(this,function(_0x5c66db,_0x3109f9,_0x2c14ba,_0x435600,_0x430df1,_0x43f7e7,_0x15d779,_0x3721b3){'use strict';const _0x1f6fc3=_0x3b71;const _0x4f28d3=_0x1f6fc3(0x202);var _0xfd3de0=(_0x4eeba4=>(_0x4eeba4[_0x4eeba4[_0x1f6fc3(0x1a4)]=0x0]='OpenOrReOpen',_0x4eeba4[_0x4eeba4[_0x1f6fc3(0x1e7)]=0x1]='Solved',_0x4eeba4[_0x4eeba4['UNRECOGNIZED']=-0x1]=_0x1f6fc3(0x1fc),_0x4eeba4))(_0xfd3de0||{}),_0x3560bc=(_0x5656d9=>(_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e9)]=0x0]=_0x1f6fc3(0x1e9),_0x5656d9[_0x5656d9['Add']=0x1]=_0x1f6fc3(0x195),_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e1)]=0x2]=_0x1f6fc3(0x1e1),_0x5656d9[_0x5656d9['Edit']=0x3]=_0x1f6fc3(0x1c3),_0x5656d9[_0x5656d9['Delete']=0x4]=_0x1f6fc3(0x1a3),_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e5)]=0x5]='Solve',_0x5656d9[_0x5656d9[_0x1f6fc3(0x1fc)]=-0x1]=_0x1f6fc3(0x1fc),_0x5656d9))(_0x3560bc||{});const _0x3f665d=_0x540ca2=>_0x435600[_0x1f6fc3(0x201)](new Date(+_0x540ca2))[_0x1f6fc3(0x1b7)](_0x1f6fc3(0x1a8)),_0x4f97e3=async(_0x105a2d,_0x29a122)=>{const _0x5a7909=_0x1f6fc3,_0x16b67f=_0x105a2d['get'](_0x435600['UserManagerService']),_0x2b0a3d=_0x105a2d['get'](_0x3721b3[_0x5a7909(0x19c)]);_0x29a122['forEach'](_0x51a032=>{const _0x15be44=_0x5a7909;_0x16b67f[_0x15be44(0x1bc)](_0x51a032)&&_0x29a122[_0x15be44(0x1e4)](_0x51a032);}),_0x29a122[_0x5a7909(0x1bf)]&&(await _0x2b0a3d[_0x5a7909(0x1f2)](_0x5a7909(0x1d9),{'params':{'userIDs':[..._0x29a122]}}))['body'][_0x5a7909(0x1a7)]['forEach'](_0xf26e0c=>{const _0x49562e=_0x5a7909;_0xf26e0c&&_0x16b67f[_0x49562e(0x196)](_0xf26e0c);});};var _0x9210cd=Object[_0x1f6fc3(0x1e0)],_0x8596ba=(_0x228472,_0x27df00,_0x4495f8,_0xb5d5df)=>{const _0x1e217b=_0x1f6fc3;for(var _0x26dc0d=_0xb5d5df>0x1?void 0x0:_0xb5d5df?_0x9210cd(_0x27df00,_0x4495f8):_0x27df00,_0x2f06cf=_0x228472[_0x1e217b(0x1d5)]-0x1,_0x135bb4;_0x2f06cf>=0x0;_0x2f06cf--)(_0x135bb4=_0x228472[_0x2f06cf])&&(_0x26dc0d=_0x135bb4(_0x26dc0d)||_0x26dc0d);return _0x26dc0d;},_0x242fdb=(_0x14da01,_0x6f6cea)=>(_0x1b04a8,_0x50116c)=>_0x6f6cea(_0x1b04a8,_0x50116c,_0x14da01);let _0x1a82aa=class extends _0x435600[_0x1f6fc3(0x1c1)]{constructor(_0x196161,_0x3743db,_0x33776f,_0xfe1c60){const _0x446a66=_0x1f6fc3;super(),this[_0x446a66(0x20b)]=_0x196161,this['_threadCommentModel']=_0x3743db,this[_0x446a66(0x1cd)]=_0x33776f,this[_0x446a66(0x1df)]=_0xfe1c60,this[_0x446a66(0x1ed)](),this[_0x446a66(0x18e)]();}[_0x1f6fc3(0x18e)](){const _0x39dd85=_0x1f6fc3;this[_0x39dd85(0x1fd)](this['_threadCommentModel']['commentUpdate$'][_0x39dd85(0x1af)](_0x15d779[_0x39dd85(0x207)](0x10))['subscribe'](_0x197ba5=>{const _0x1c1b65=_0x39dd85,_0x18e5fa=new Set();_0x197ba5[_0x1c1b65(0x1b6)](_0x392402=>{const _0x40b0ef=_0x1c1b65;if(_0x392402[_0x40b0ef(0x190)]===_0x40b0ef(0x1b9)){const _0x3821ed=_0x392402['payload'][_0x40b0ef(0x191)];_0x18e5fa[_0x40b0ef(0x1b9)](_0x3821ed);}}),_0x4f97e3(this[_0x1c1b65(0x1df)],_0x18e5fa);}));}[_0x1f6fc3(0x1ed)](){const _0x395fc6=_0x1f6fc3;this['disposeWithMe'](this['_commentService'][_0x395fc6(0x1c6)][_0x395fc6(0x1d3)](async _0x54d038=>{const _0x376946=_0x395fc6;var _0x20e199,_0x5c8d7b,_0x157888,_0x490202;const _0x3cdc69=(_0x20e199=this[_0x376946(0x1a0)]['getUnit'](_0x54d038[_0x376946(0x1ad)])[_0x376946(0x18f)](_0x11b815=>_0x11b815['threadId']===_0x54d038[_0x376946(0x197)]))==null?void 0x0:_0x20e199['root'];if(!_0x3cdc69)return;const {unitId:_0x3e59fe,subUnitId:_0x4ef2da}=_0x3cdc69;switch(_0x54d038[_0x376946(0x1f6)]&&this['_userService'][_0x376946(0x196)](_0x54d038[_0x376946(0x1f6)]),_0x54d038[_0x376946(0x190)]){case _0x3560bc[_0x376946(0x195)]:break;case _0x3560bc[_0x376946(0x1e1)]:{this['_threadCommentModel'][_0x376946(0x194)](_0x3e59fe,_0x4ef2da,{'unitId':_0x3e59fe,'subUnitId':_0x4ef2da,'ref':'','id':_0x54d038[_0x376946(0x1b4)],'dT':_0x3f665d(+_0x54d038[_0x376946(0x1ac)]),'threadId':_0x54d038['threadId'],'personId':(_0x157888=(_0x5c8d7b=_0x54d038[_0x376946(0x1f6)])==null?void 0x0:_0x5c8d7b[_0x376946(0x1c7)])!=null?_0x157888:_0x54d038[_0x376946(0x1ef)],'text':JSON[_0x376946(0x1b1)](_0x54d038[_0x376946(0x1e8)]),'parentId':_0x3cdc69['id']});break;}case _0x3560bc[_0x376946(0x1a3)]:{const _0x57cc53=this[_0x376946(0x1a0)][_0x376946(0x1de)](_0x3e59fe,_0x4ef2da,_0x54d038[_0x376946(0x1b4)]);_0x57cc53&&_0x57cc53['parentId']&&this[_0x376946(0x1a0)]['deleteComment'](_0x3e59fe,_0x4ef2da,_0x54d038[_0x376946(0x1b4)]);break;}case _0x3560bc['Edit']:{this[_0x376946(0x1a0)][_0x376946(0x1ea)](_0x3e59fe,_0x4ef2da,{'commentId':_0x54d038[_0x376946(0x1b4)],'text':JSON[_0x376946(0x1b1)](_0x54d038[_0x376946(0x1e8)])});break;}case _0x3560bc[_0x376946(0x1e5)]:{const _0x1bdc7f=(_0x490202=this[_0x376946(0x1a0)]['getUnit'](_0x54d038[_0x376946(0x1ad)])['find'](_0x513cf3=>_0x513cf3[_0x376946(0x197)]===_0x54d038[_0x376946(0x197)]))==null?void 0x0:_0x490202['root'];_0x1bdc7f&&this[_0x376946(0x1a0)][_0x376946(0x1db)](_0x3e59fe,_0x4ef2da,_0x1bdc7f['id'],_0x54d038[_0x376946(0x1da)]===_0xfd3de0[_0x376946(0x1e7)]);break;}}}));}};_0x1a82aa=_0x8596ba([_0x242fdb(0x0,_0x435600['Inject'](_0x3109f9[_0x1f6fc3(0x1ee)])),_0x242fdb(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x43f7e7[_0x1f6fc3(0x203)])),_0x242fdb(0x2,_0x435600[_0x1f6fc3(0x1fb)](_0x435600[_0x1f6fc3(0x206)])),_0x242fdb(0x3,_0x435600[_0x1f6fc3(0x1fb)](_0x435600['Injector']))],_0x1a82aa);const _0x367050='thread-comment-data-source.config',_0x5cbe9e={};var _0x267b1a=Object[_0x1f6fc3(0x1e0)],_0x164540=(_0x237c81,_0x43bb97,_0xebc046,_0x3bbc18)=>{const _0x4be1fd=_0x1f6fc3;for(var _0x31f367=_0x3bbc18>0x1?void 0x0:_0x3bbc18?_0x267b1a(_0x43bb97,_0xebc046):_0x43bb97,_0x36f177=_0x237c81[_0x4be1fd(0x1d5)]-0x1,_0x1505a8;_0x36f177>=0x0;_0x36f177--)(_0x1505a8=_0x237c81[_0x36f177])&&(_0x31f367=_0x1505a8(_0x31f367)||_0x31f367);return _0x31f367;},_0x32d71d=(_0x1348ea,_0x31d27e)=>(_0x41b405,_0xf98095)=>_0x31d27e(_0x41b405,_0xf98095,_0x1348ea);function _0x4fa0e8(_0x4abbc6,_0x45c9e9){const _0x32de5f=_0x1f6fc3,_0xdd5a42=_0x4abbc6[_0x32de5f(0x1c2)][0x0];return{..._0x45c9e9,'id':_0xdd5a42[_0x32de5f(0x1b4)],'resolved':_0x4abbc6[_0x32de5f(0x1da)]===0x1,'dT':_0x3f665d(_0xdd5a42[_0x32de5f(0x1ac)]),'personId':_0xdd5a42[_0x32de5f(0x1ef)],'threadId':_0xdd5a42[_0x32de5f(0x197)]};}function _0x6db5e8(_0x40ebe0,_0x12c510,_0x5e1d04){const _0x30b713=_0x1f6fc3;var _0x4fca45,_0x32ca64;if(((_0x32ca64=(_0x4fca45=_0x40ebe0==null?void 0x0:_0x40ebe0[_0x30b713(0x1c2)])==null?void 0x0:_0x4fca45[_0x30b713(0x1d5)])!=null?_0x32ca64:0x0)>0x0){const _0x2b1c6b=(_0xdb478c,_0x55e0dc)=>({'id':_0xdb478c['replyId'],'threadId':_0xdb478c[_0x30b713(0x197)],'dT':_0x3f665d(_0xdb478c[_0x30b713(0x1ac)]),'personId':_0xdb478c[_0x30b713(0x1ef)],'resolved':_0x40ebe0[_0x30b713(0x1da)]===_0xfd3de0[_0x30b713(0x1e7)],'unitId':_0x12c510,'subUnitId':_0x5e1d04,'text':JSON[_0x30b713(0x1b1)](_0xdb478c[_0x30b713(0x1e8)]),'parentId':_0x55e0dc}),_0x7afead=_0x2b1c6b(_0x40ebe0[_0x30b713(0x1c2)][0x0]);return{..._0x7afead,'children':_0x40ebe0[_0x30b713(0x1c2)][_0x30b713(0x19e)](0x1)[_0x30b713(0x1c4)](_0x4dd978=>_0x2b1c6b(_0x4dd978,_0x7afead['id']))};}return null;}let _0x3683b8=class{constructor(_0xfaa002,_0x1071b6,_0x50dd41){const _0x26a578=_0x1f6fc3;this['_httpService']=_0xfaa002,this[_0x26a578(0x1cd)]=_0x1071b6,this['_sessionService']=_0x50dd41;}async['addComment'](_0x488df2){const _0x4b4014=_0x1f6fc3;var _0x10fd55,_0x4b095e;const {parentId:_0x1d9de0,unitId:_0x3eaa22,text:_0x2f602e,threadId:_0x2b66e2}=_0x488df2,_0x3df81c=(_0x4b095e=(_0x10fd55=_0x2f602e[_0x4b4014(0x1cb)])==null?void 0x0:_0x10fd55[_0x4b4014(0x1a9)](_0x2f86ea=>_0x2f86ea[_0x4b4014(0x1ab)]===_0x435600[_0x4b4014(0x1d8)]['COMMENT'])[_0x4b4014(0x1c4)](_0x56b1e3=>_0x56b1e3[_0x4b4014(0x1d2)]))!=null?_0x4b095e:[],_0x10eacc=JSON['stringify'](_0x2f602e),_0x2969bb=(await this['_sessionService'][_0x4b4014(0x1f0)](_0x3eaa22))[_0x4b4014(0x1cc)]();if(_0x1d9de0){const _0x25c021={'memberId':_0x2969bb,'unitId':_0x3eaa22,'content':_0x10eacc,'mention':_0x3df81c,'threadId':_0x2b66e2},_0x506b2d=(await this['_httpService'][_0x4b4014(0x19a)](_0x4b4014(0x19f)+_0x3eaa22+'/reply',{'body':_0x25c021}))['body'][_0x4b4014(0x20c)];return{..._0x488df2,'id':_0x506b2d[_0x4b4014(0x1b4)],'dT':_0x435600[_0x4b4014(0x201)](+_0x506b2d[_0x4b4014(0x1ac)])['format'](_0x4b4014(0x1a8)),'personId':_0x506b2d['userId']};}else{const _0x2b146b={'memberId':_0x2969bb,'unitId':_0x3eaa22,'content':_0x10eacc,'mention':_0x3df81c},_0x3b68df=await this['_httpService'][_0x4b4014(0x19a)]('/universer-api/comment/unit/'+_0x3eaa22+'/add',{'body':_0x2b146b});return _0x4fa0e8(_0x3b68df['body'][_0x4b4014(0x208)],_0x488df2);}}async[_0x1f6fc3(0x1ea)](_0x114ae7){const _0x547e6a=_0x1f6fc3;var _0x208f85,_0x309776;const {text:_0x192851,unitId:_0xcdd8d}=_0x114ae7,_0x3393e5=(_0x309776=(_0x208f85=_0x192851[_0x547e6a(0x1cb)])==null?void 0x0:_0x208f85['filter'](_0xe20462=>_0xe20462[_0x547e6a(0x1ab)]===_0x435600[_0x547e6a(0x1d8)]['COMMENT'])[_0x547e6a(0x1c4)](_0x5bc7e3=>_0x5bc7e3['rangeId']))!=null?_0x309776:[],_0x19bed4=JSON[_0x547e6a(0x192)](_0x192851),_0x15a878=_0x114ae7['threadId'],_0x475021=_0x114ae7['id'],_0xa6307c={'memberId':(await this['_sessionService'][_0x547e6a(0x1f0)](_0xcdd8d))[_0x547e6a(0x1cc)](),'unitId':_0xcdd8d,'threadId':_0x15a878,'mention':_0x3393e5,'content':_0x19bed4,'replyId':_0x475021},_0x5c0893=await this[_0x547e6a(0x20e)][_0x547e6a(0x19a)](_0x547e6a(0x19f)+_0xcdd8d+_0x547e6a(0x1f3),{'body':_0xa6307c});return!_0x5c0893[_0x547e6a(0x1f5)]['error']||_0x5c0893[_0x547e6a(0x1f5)][_0x547e6a(0x1eb)]['code']===0x1;}async[_0x1f6fc3(0x1db)](_0x2596e3){const _0x35aee5=_0x1f6fc3,{unitId:_0x91ff31}=_0x2596e3,_0x4289f0=_0x2596e3['threadId'],_0x17835c={'memberId':this[_0x35aee5(0x1cd)][_0x35aee5(0x1ae)]()['userID'],'unitId':_0x91ff31,'threadId':_0x4289f0,'solved':_0x2596e3[_0x35aee5(0x209)]?_0xfd3de0[_0x35aee5(0x1e7)]:_0xfd3de0['OpenOrReOpen']},_0x1ce424=await this[_0x35aee5(0x20e)]['post'](_0x35aee5(0x19f)+_0x91ff31+'/solved',{'body':_0x17835c});return!_0x1ce424[_0x35aee5(0x1f5)]['error']||_0x1ce424[_0x35aee5(0x1f5)]['error'][_0x35aee5(0x1b8)]===0x1;}async[_0x1f6fc3(0x1e3)](_0x2cb1ba,_0x50fde4,_0x11fe0f,_0x158ccd){const _0x3a218a=_0x1f6fc3,_0x1ed6fc={'memberId':(await this[_0x3a218a(0x1c0)][_0x3a218a(0x1f0)](_0x2cb1ba))[_0x3a218a(0x1cc)](),'threadId':_0x11fe0f,'replyId':_0x158ccd,'unitId':_0x2cb1ba},_0x3a8723=await this[_0x3a218a(0x20e)]['post'](_0x3a218a(0x19f)+_0x2cb1ba+'/delete',{'body':_0x1ed6fc});return!_0x3a8723[_0x3a218a(0x1f5)][_0x3a218a(0x1eb)]||_0x3a8723[_0x3a218a(0x1f5)]['error']['code']===0x1;}async[_0x1f6fc3(0x1bd)](_0x33b18e,_0x1742ac,_0x2f4c83){const _0x161296=_0x1f6fc3,_0x173b29={'unitId':_0x33b18e,'threadId':_0x2f4c83},_0x1df30a=await this[_0x161296(0x20e)][_0x161296(0x19a)](_0x161296(0x19f)+_0x33b18e+_0x161296(0x1e6),{'body':_0x173b29}),_0x35fffc=_0x2f4c83[_0x161296(0x1c4)](_0x4bd645=>_0x6db5e8(_0x1df30a[_0x161296(0x1f5)][_0x161296(0x1b2)][_0x4bd645],_0x33b18e,_0x1742ac))[_0x161296(0x1a9)](Boolean);return Object['values'](_0x1df30a['body']['users'])['forEach'](_0x59026e=>{const _0x36e4cc=_0x161296;this[_0x36e4cc(0x1cd)]['addUser'](_0x59026e);}),_0x35fffc;}['saveCommentToSnapshot'](_0x5dee7a){const _0x46b7a6=_0x1f6fc3;return{'id':_0x5dee7a['id'],'threadId':_0x5dee7a['threadId'],'ref':_0x5dee7a[_0x46b7a6(0x20d)]};}};_0x3683b8=_0x164540([_0x32d71d(0x0,_0x435600[_0x1f6fc3(0x1fb)](_0x3721b3['HTTPService'])),_0x32d71d(0x1,_0x435600['Inject'](_0x435600[_0x1f6fc3(0x206)])),_0x32d71d(0x2,_0x435600[_0x1f6fc3(0x1fb)](_0x3109f9['CollaborationSessionService']))],_0x3683b8);var _0x36736f=Object[_0x1f6fc3(0x1e0)],_0x363087=(_0x43af3f,_0x5ca66a,_0x167516,_0x2a49b7)=>{const _0x1e8106=_0x1f6fc3;for(var _0x376fb5=_0x2a49b7>0x1?void 0x0:_0x2a49b7?_0x36736f(_0x5ca66a,_0x167516):_0x5ca66a,_0x3a7055=_0x43af3f[_0x1e8106(0x1d5)]-0x1,_0x27aed9;_0x3a7055>=0x0;_0x3a7055--)(_0x27aed9=_0x43af3f[_0x3a7055])&&(_0x376fb5=_0x27aed9(_0x376fb5)||_0x376fb5);return _0x376fb5;},_0x264034=(_0x1ee23a,_0x449b40)=>(_0x2a71fc,_0x4baf0c)=>_0x449b40(_0x2a71fc,_0x4baf0c,_0x1ee23a);let _0x3aaaac=class extends _0x435600[_0x1f6fc3(0x1c1)]{constructor(_0x24b16a,_0x4b207a){const _0x360c92=_0x1f6fc3;super(),this['_threadCommentDataSourceService']=_0x24b16a,this[_0x360c92(0x1c5)]=_0x4b207a,this[_0x360c92(0x1ce)]();}['_initDataSource'](){const _0x112e0d=_0x1f6fc3;this[_0x112e0d(0x199)][_0x112e0d(0x1fa)]=this[_0x112e0d(0x1c5)],this[_0x112e0d(0x199)][_0x112e0d(0x1ff)]=!0x1;}};_0x3aaaac=_0x363087([_0x264034(0x0,_0x43f7e7['IThreadCommentDataSourceService']),_0x264034(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x3683b8))],_0x3aaaac);var _0x11e073=Object[_0x1f6fc3(0x1b3)],_0x64d474=Object[_0x1f6fc3(0x1e0)],_0x11cf60=(_0x2d45dc,_0x197082,_0x4d0c26)=>_0x197082 in _0x2d45dc?_0x11e073(_0x2d45dc,_0x197082,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d0c26}):_0x2d45dc[_0x197082]=_0x4d0c26,_0x778891=(_0x256d18,_0x47aea8,_0x13411e,_0x4ef87b)=>{const _0x30d350=_0x1f6fc3;for(var _0x5332f1=_0x4ef87b>0x1?void 0x0:_0x4ef87b?_0x64d474(_0x47aea8,_0x13411e):_0x47aea8,_0x515ae3=_0x256d18[_0x30d350(0x1d5)]-0x1,_0x56f13a;_0x515ae3>=0x0;_0x515ae3--)(_0x56f13a=_0x256d18[_0x515ae3])&&(_0x5332f1=_0x56f13a(_0x5332f1)||_0x5332f1);return _0x5332f1;},_0x29bbb5=(_0x340bec,_0x5b218)=>(_0x2f48d7,_0x1e5975)=>_0x5b218(_0x2f48d7,_0x1e5975,_0x340bec),_0x14ff36=(_0x3b13d3,_0xefb412,_0x10dc89)=>_0x11cf60(_0x3b13d3,typeof _0xefb412!=_0x1f6fc3(0x193)?_0xefb412+'':_0xefb412,_0x10dc89);_0x5c66db[_0x1f6fc3(0x19b)]=class extends _0x435600['Plugin']{constructor(_0xe8ec2c=_0x5cbe9e,_0x12ea05,_0x44ec7b){const _0x4feccc=_0x1f6fc3;super(),this[_0x4feccc(0x1f7)]=_0xe8ec2c,this[_0x4feccc(0x1df)]=_0x12ea05,this[_0x4feccc(0x1d6)]=_0x44ec7b;const {..._0xd65366}=_0x435600[_0x4feccc(0x204)]({},_0x5cbe9e,this[_0x4feccc(0x1f7)]);this['_configService'][_0x4feccc(0x18d)](_0x367050,_0xd65366);}[_0x1f6fc3(0x1cf)](){[[_0x3683b8],[_0x3aaaac],[_0x1a82aa]]['forEach'](_0x470452=>{const _0x30e3dc=_0x3b71;this[_0x30e3dc(0x1df)][_0x30e3dc(0x1b9)](_0x470452);});}['onReady'](){const _0x3e9421=_0x1f6fc3;this[_0x3e9421(0x1df)][_0x3e9421(0x1f2)](_0x3aaaac),this['_injector'][_0x3e9421(0x1f2)](_0x1a82aa);}},_0x14ff36(_0x5c66db[_0x1f6fc3(0x19b)],'pluginName',_0x4f28d3),_0x14ff36(_0x5c66db[_0x1f6fc3(0x19b)],'type',_0x435600[_0x1f6fc3(0x205)][_0x1f6fc3(0x1bb)]),_0x5c66db[_0x1f6fc3(0x19b)]=_0x778891([_0x435600[_0x1f6fc3(0x1a1)](_0x430df1['UniverThreadCommentUIPlugin'],_0x3109f9[_0x1f6fc3(0x1a5)],_0x2c14ba[_0x1f6fc3(0x1ec)]),_0x29bbb5(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x435600[_0x1f6fc3(0x20a)])),_0x29bbb5(0x2,_0x435600[_0x1f6fc3(0x18c)])],_0x5c66db[_0x1f6fc3(0x19b)]),Object['defineProperty'](_0x5c66db,Symbol[_0x1f6fc3(0x1e2)],{'value':_0x1f6fc3(0x1fe)});}));function _0x3b71(_0x71f311,_0x4bae76){_0x71f311=_0x71f311-0x18c;const _0x142521=_0x1425();let _0x3b7100=_0x142521[_0x71f311];return _0x3b7100;}function _0x1425(){const _0x1bed01=['YYYY/MM/DD\x20HH:mm','filter','@univerjs/thread-comment-ui','rangeType','createTimestamp','unitId','getCurrentUser','pipe','amd','parse','comments','defineProperty','replyId','48iDhUxt','forEach','format','code','add','191984aIctUD','UNIVER_UNKNOWN','getUser','listComments','1867140cvOXed','size','_sessionService','Disposable','replies','Edit','map','_threadCommentDataSource','commentUpdate$','userID','72354guWpsz','UniverProLicense','@univerjs-pro/collaboration-client','customRanges','getMemberID','_userService','_initDataSource','onStarting','@univerjs/thread-comment','634017GGandI','rangeId','subscribe','UniverCore','length','_configService','321156vhQHDw','CustomRangeType','/universer-api/user/list','solved','resolveComment','@univerjs-pro/license','UniverThreadCommentUi','getComment','_injector','getOwnPropertyDescriptor','Reply','toStringTag','deleteComment','delete','Solve','/list','Solved','content','Unknown','updateComment','error','UniverLicensePlugin','_init','CommentService','userId','requireSession','rxjs','get','/edit','127266njJhfp','body','user','_config','UniverNetwork','@univerjs/network','dataSource','Inject','UNRECOGNIZED','disposeWithMe','Module','syncUpdateMutationToColla','function','dayjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','merge','UniverInstanceType','UserManagerService','bufferTime','comment','resolved','Injector','_commentService','reply','ref','_httpService','IConfigService','setConfig','_initUserSync','find','type','personId','stringify','symbol','addComment','Add','addUser','threadId','3014016pWgcqd','_threadCommentDataSourceService','post','UniverThreadCommentDataSourcePlugin','HTTPService','@univerjs/core','slice','/universer-api/comment/unit/','_threadCommentModel','DependentOn','126IOiHya','Delete','OpenOrReOpen','UniverCollaborationClientPlugin','exports','users'];_0x1425=function(){return _0x1bed01;};return _0x1425();}
|
|
1
|
+
function _0x5b62(_0x221d8a,_0x1d90d6){_0x221d8a=_0x221d8a-0x7a;const _0x5b62ad=_0x9209();let _0x2ef308=_0x5b62ad[_0x221d8a];return _0x2ef308;}function _0x9209(){const _0x27a82b=['code','rangeType','addUser','196bvIIIt','Reply','_configService','requireSession','Module','/universer-api/comment/unit/','exports','UniverThreadCommentUIPlugin','parentId','userID','UniverProLicense','Edit','UniverCore','208kzDaJs','getCurrentUser','Add','Unknown','replyId','type','delete','Inject','UniverThreadCommentDataSourcePlugin','Disposable','_initDataSource','thread-comment-data-source.config','2552862KaeBGH','_threadCommentModel','amd','disposeWithMe','117510hkGdTY','@univerjs/network','_init','COMMENT','@univerjs/thread-comment','get','solved','post','forEach','error','UNRECOGNIZED','10fcuxQP','stringify','getUnit','UniverInstanceType','72OAJeWg','format','toStringTag','parse','content','resolveComment','_httpService','setConfig','getMemberID','CustomRangeType','root','pluginName','map','object','onReady','UserManagerService','OpenOrReOpen','/universer-api/user/list','10awEPGv','find','filter','@univerjs/core','add','_userService','comment','/list','getComment','YYYY/MM/DD\x20HH:mm','_commentService','createTimestamp','@univerjs-pro/license','ThreadCommentModel','dataSource','defineProperty','merge','customRanges','addComment','Injector','CollaborationSessionService','size','subscribe','_threadCommentDataSourceService','rangeId','bufferTime','body','commentUpdate$','UniverThreadComment','662878sPYrZP','getOwnPropertyDescriptor','payload','@univerjs-pro/collaboration-client','deleteComment','_threadCommentDataSource','user','users','HTTPService','length','ref','UniverThreadCommentUi','replies','values','2749016sLpyZm','UniverProCollaborationClient','Delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProThreadCommentDatasource','/edit','Plugin','793592kwSPIP','Solve','_injector','pipe','threadId','userId','symbol','UniverLicensePlugin','Solved','10151647YHiOCH','_sessionService','UniverNetwork','/add','4807632AsNKCG','syncUpdateMutationToColla','updateComment','/solved','CommentService','rxjs','@univerjs/thread-comment-ui','3AfEorN','dayjs','unitId'];_0x9209=function(){return _0x27a82b;};return _0x9209();}(function(_0xd0b899,_0x483a40){const _0xaf5de6=_0x5b62,_0x32fd05=_0xd0b899();while(!![]){try{const _0x5a170c=-parseInt(_0xaf5de6(0xe1))/0x1+parseInt(_0xaf5de6(0x9f))/0x2*(-parseInt(_0xaf5de6(0x80))/0x3)+parseInt(_0xaf5de6(0xef))/0x4*(-parseInt(_0xaf5de6(0xc4))/0x5)+parseInt(_0xaf5de6(0xa3))/0x6*(-parseInt(_0xaf5de6(0x86))/0x7)+-parseInt(_0xaf5de6(0xf6))/0x8*(parseInt(_0xaf5de6(0xb2))/0x9)+-parseInt(_0xaf5de6(0xae))/0xa*(parseInt(_0xaf5de6(0xff))/0xb)+-parseInt(_0xaf5de6(0x103))/0xc*(-parseInt(_0xaf5de6(0x93))/0xd);if(_0x5a170c===_0x483a40)break;else _0x32fd05['push'](_0x32fd05['shift']());}catch(_0x28d3de){_0x32fd05['push'](_0x32fd05['shift']());}}}(_0x9209,0xcb016),function(_0x50750b,_0x4f52fd){const _0x1026a0=_0x5b62;typeof exports==_0x1026a0(0xbf)&&typeof module<'u'?_0x4f52fd(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1026a0(0xa1)]?define([_0x1026a0(0x8c),_0x1026a0(0xe4),_0x1026a0(0xd0),_0x1026a0(0xc7),_0x1026a0(0x7f),_0x1026a0(0xa7),'rxjs',_0x1026a0(0xa4)],_0x4f52fd):(_0x50750b=typeof globalThis<'u'?globalThis:_0x50750b||self,_0x4f52fd(_0x50750b[_0x1026a0(0xf3)]={},_0x50750b[_0x1026a0(0xf0)],_0x50750b[_0x1026a0(0x90)],_0x50750b[_0x1026a0(0x92)],_0x50750b[_0x1026a0(0xec)],_0x50750b[_0x1026a0(0xe0)],_0x50750b[_0x1026a0(0x7e)],_0x50750b[_0x1026a0(0x101)]));}(this,function(_0x57c8ff,_0x6b44e4,_0x39bf55,_0x54fe05,_0x418b98,_0x3833bd,_0x2732ea,_0x33fa56){'use strict';const _0x552be1=_0x5b62;const _0x3bbad9=_0x552be1(0xf2);var _0x544e5d=(_0x2891d7=>(_0x2891d7[_0x2891d7['OpenOrReOpen']=0x0]=_0x552be1(0xc2),_0x2891d7[_0x2891d7[_0x552be1(0xfe)]=0x1]=_0x552be1(0xfe),_0x2891d7[_0x2891d7[_0x552be1(0xad)]=-0x1]='UNRECOGNIZED',_0x2891d7))(_0x544e5d||{}),_0x14c8fe=(_0xffa393=>(_0xffa393[_0xffa393[_0x552be1(0x96)]=0x0]='Unknown',_0xffa393[_0xffa393[_0x552be1(0x95)]=0x1]=_0x552be1(0x95),_0xffa393[_0xffa393[_0x552be1(0x87)]=0x2]=_0x552be1(0x87),_0xffa393[_0xffa393[_0x552be1(0x91)]=0x3]=_0x552be1(0x91),_0xffa393[_0xffa393[_0x552be1(0xf1)]=0x4]='Delete',_0xffa393[_0xffa393['Solve']=0x5]=_0x552be1(0xf7),_0xffa393[_0xffa393[_0x552be1(0xad)]=-0x1]=_0x552be1(0xad),_0xffa393))(_0x14c8fe||{});const _0x54c9d5=_0x59b8c9=>_0x54fe05[_0x552be1(0x81)](new Date(+_0x59b8c9))[_0x552be1(0xb3)](_0x552be1(0xcd)),_0x397bec=async(_0x56089b,_0x5c786e)=>{const _0x412fd9=_0x552be1,_0x121972=_0x56089b[_0x412fd9(0xa8)](_0x54fe05[_0x412fd9(0xc1)]),_0x223cf8=_0x56089b[_0x412fd9(0xa8)](_0x33fa56['HTTPService']);_0x5c786e[_0x412fd9(0xab)](_0x5e37d4=>{const _0x49cf94=_0x412fd9;_0x121972['getUser'](_0x5e37d4)&&_0x5c786e[_0x49cf94(0x99)](_0x5e37d4);}),_0x5c786e[_0x412fd9(0xd9)]&&(await _0x223cf8['get'](_0x412fd9(0xc3),{'params':{'userIDs':[..._0x5c786e]}}))[_0x412fd9(0xde)]['users'][_0x412fd9(0xab)](_0x4be7e8=>{const _0x5ced4a=_0x412fd9;_0x4be7e8&&_0x121972[_0x5ced4a(0x85)](_0x4be7e8);});};var _0x226484=Object[_0x552be1(0xe2)],_0x2f9bf1=(_0x5b27a5,_0x3bfee1,_0x13de28,_0xf8547f)=>{const _0x58f275=_0x552be1;for(var _0x1d4a1f=_0xf8547f>0x1?void 0x0:_0xf8547f?_0x226484(_0x3bfee1,_0x13de28):_0x3bfee1,_0x3eb1e8=_0x5b27a5[_0x58f275(0xea)]-0x1,_0x351537;_0x3eb1e8>=0x0;_0x3eb1e8--)(_0x351537=_0x5b27a5[_0x3eb1e8])&&(_0x1d4a1f=_0x351537(_0x1d4a1f)||_0x1d4a1f);return _0x1d4a1f;},_0x3d4187=(_0x150125,_0x27b6d9)=>(_0x26f609,_0x24fbd8)=>_0x27b6d9(_0x26f609,_0x24fbd8,_0x150125);let _0x2623b8=class extends _0x54fe05[_0x552be1(0x9c)]{constructor(_0x575c5f,_0x2a95a2,_0x384907,_0x2d7c69){const _0x4ddbd6=_0x552be1;super(),this[_0x4ddbd6(0xce)]=_0x575c5f,this[_0x4ddbd6(0xa0)]=_0x2a95a2,this[_0x4ddbd6(0xc9)]=_0x384907,this[_0x4ddbd6(0xf8)]=_0x2d7c69,this[_0x4ddbd6(0xa5)](),this['_initUserSync']();}['_initUserSync'](){const _0x1043f5=_0x552be1;this['disposeWithMe'](this[_0x1043f5(0xa0)][_0x1043f5(0xdf)][_0x1043f5(0xf9)](_0x2732ea[_0x1043f5(0xdd)](0x10))['subscribe'](_0x492442=>{const _0x54185a=_0x1043f5,_0x326d8a=new Set();_0x492442['forEach'](_0x4e0e56=>{const _0xb09845=_0x5b62;if(_0x4e0e56[_0xb09845(0x98)]===_0xb09845(0xc8)){const _0x50205b=_0x4e0e56[_0xb09845(0xe3)]['personId'];_0x326d8a[_0xb09845(0xc8)](_0x50205b);}}),_0x397bec(this[_0x54185a(0xf8)],_0x326d8a);}));}['_init'](){const _0xfcb3ec=_0x552be1;this[_0xfcb3ec(0xa2)](this[_0xfcb3ec(0xce)][_0xfcb3ec(0xdf)][_0xfcb3ec(0xda)](async _0x26f954=>{const _0x2d7783=_0xfcb3ec;var _0x7b3bbc,_0x77b036,_0x395e23,_0x1ab216;const _0x47dc1f=(_0x7b3bbc=this['_threadCommentModel'][_0x2d7783(0xb0)](_0x26f954[_0x2d7783(0x82)])[_0x2d7783(0xc5)](_0x2a2726=>_0x2a2726['threadId']===_0x26f954[_0x2d7783(0xfa)]))==null?void 0x0:_0x7b3bbc['root'];if(!_0x47dc1f)return;const {unitId:_0x16d2ca,subUnitId:_0x56056d}=_0x47dc1f;switch(_0x26f954[_0x2d7783(0xe7)]&&this['_userService'][_0x2d7783(0x85)](_0x26f954[_0x2d7783(0xe7)]),_0x26f954['type']){case _0x14c8fe[_0x2d7783(0x95)]:break;case _0x14c8fe['Reply']:{this['_threadCommentModel']['addComment'](_0x16d2ca,_0x56056d,{'unitId':_0x16d2ca,'subUnitId':_0x56056d,'ref':'','id':_0x26f954[_0x2d7783(0x97)],'dT':_0x54c9d5(+_0x26f954['createTimestamp']),'threadId':_0x26f954[_0x2d7783(0xfa)],'personId':(_0x395e23=(_0x77b036=_0x26f954['user'])==null?void 0x0:_0x77b036[_0x2d7783(0x8f)])!=null?_0x395e23:_0x26f954[_0x2d7783(0xfb)],'text':JSON[_0x2d7783(0xb5)](_0x26f954['content']),'parentId':_0x47dc1f['id']});break;}case _0x14c8fe['Delete']:{const _0x319d9a=this[_0x2d7783(0xa0)][_0x2d7783(0xcc)](_0x16d2ca,_0x56056d,_0x26f954['replyId']);_0x319d9a&&_0x319d9a[_0x2d7783(0x8e)]&&this['_threadCommentModel'][_0x2d7783(0xe5)](_0x16d2ca,_0x56056d,_0x26f954[_0x2d7783(0x97)]);break;}case _0x14c8fe[_0x2d7783(0x91)]:{this['_threadCommentModel']['updateComment'](_0x16d2ca,_0x56056d,{'commentId':_0x26f954[_0x2d7783(0x97)],'text':JSON[_0x2d7783(0xb5)](_0x26f954['content'])});break;}case _0x14c8fe['Solve']:{const _0x304076=(_0x1ab216=this[_0x2d7783(0xa0)]['getUnit'](_0x26f954[_0x2d7783(0x82)])['find'](_0x1131e1=>_0x1131e1['threadId']===_0x26f954[_0x2d7783(0xfa)]))==null?void 0x0:_0x1ab216[_0x2d7783(0xbc)];_0x304076&&this['_threadCommentModel'][_0x2d7783(0xb7)](_0x16d2ca,_0x56056d,_0x304076['id'],_0x26f954[_0x2d7783(0xa9)]===_0x544e5d[_0x2d7783(0xfe)]);break;}}}));}};_0x2623b8=_0x2f9bf1([_0x3d4187(0x0,_0x54fe05[_0x552be1(0x9a)](_0x6b44e4[_0x552be1(0x7d)])),_0x3d4187(0x1,_0x54fe05[_0x552be1(0x9a)](_0x3833bd[_0x552be1(0xd1)])),_0x3d4187(0x2,_0x54fe05[_0x552be1(0x9a)](_0x54fe05[_0x552be1(0xc1)])),_0x3d4187(0x3,_0x54fe05[_0x552be1(0x9a)](_0x54fe05[_0x552be1(0xd7)]))],_0x2623b8);const _0x4a55a0=_0x552be1(0x9e),_0x34fa77={};var _0x31761a=Object[_0x552be1(0xe2)],_0x2ec242=(_0x2662c9,_0x426808,_0xd5e02b,_0x12430a)=>{const _0x52f87e=_0x552be1;for(var _0x2f4f9c=_0x12430a>0x1?void 0x0:_0x12430a?_0x31761a(_0x426808,_0xd5e02b):_0x426808,_0x12b456=_0x2662c9[_0x52f87e(0xea)]-0x1,_0x2b2c1d;_0x12b456>=0x0;_0x12b456--)(_0x2b2c1d=_0x2662c9[_0x12b456])&&(_0x2f4f9c=_0x2b2c1d(_0x2f4f9c)||_0x2f4f9c);return _0x2f4f9c;},_0xeba59=(_0x2b81fd,_0x5513dc)=>(_0x30d954,_0x5931a2)=>_0x5513dc(_0x30d954,_0x5931a2,_0x2b81fd);function _0x3cb046(_0x4efaba,_0x1deeaf){const _0x32a29e=_0x552be1,_0x26116c=_0x4efaba['replies'][0x0];return{..._0x1deeaf,'id':_0x26116c[_0x32a29e(0x97)],'resolved':_0x4efaba[_0x32a29e(0xa9)]===0x1,'dT':_0x54c9d5(_0x26116c['createTimestamp']),'personId':_0x26116c['userId'],'threadId':_0x26116c['threadId']};}function _0x27d957(_0x1a9e22,_0x4e767d,_0x260bfc){const _0x205d47=_0x552be1;var _0x28bbda,_0x4c583f;if(((_0x4c583f=(_0x28bbda=_0x1a9e22==null?void 0x0:_0x1a9e22[_0x205d47(0xed)])==null?void 0x0:_0x28bbda[_0x205d47(0xea)])!=null?_0x4c583f:0x0)>0x0){const _0x31d698=(_0x51e03a,_0x517015)=>({'id':_0x51e03a[_0x205d47(0x97)],'threadId':_0x51e03a['threadId'],'dT':_0x54c9d5(_0x51e03a[_0x205d47(0xcf)]),'personId':_0x51e03a[_0x205d47(0xfb)],'resolved':_0x1a9e22[_0x205d47(0xa9)]===_0x544e5d[_0x205d47(0xfe)],'unitId':_0x4e767d,'subUnitId':_0x260bfc,'text':JSON['parse'](_0x51e03a[_0x205d47(0xb6)]),'parentId':_0x517015}),_0x7f24b2=_0x31d698(_0x1a9e22[_0x205d47(0xed)][0x0]);return{..._0x7f24b2,'children':_0x1a9e22[_0x205d47(0xed)]['slice'](0x1)['map'](_0x48d03d=>_0x31d698(_0x48d03d,_0x7f24b2['id']))};}return null;}let _0xfbf24d=class{constructor(_0x45df55,_0x24f33b,_0x20ed6a){const _0x149bbf=_0x552be1;this[_0x149bbf(0xb8)]=_0x45df55,this['_userService']=_0x24f33b,this[_0x149bbf(0x100)]=_0x20ed6a;}async[_0x552be1(0xd6)](_0x2f6a55){const _0x338445=_0x552be1;var _0x363d58,_0x2a855f;const {parentId:_0x3263ca,unitId:_0x30b2fe,text:_0x5a97b9,threadId:_0x386734}=_0x2f6a55,_0x41d62c=(_0x2a855f=(_0x363d58=_0x5a97b9[_0x338445(0xd5)])==null?void 0x0:_0x363d58[_0x338445(0xc6)](_0x388d7a=>_0x388d7a[_0x338445(0x84)]===_0x54fe05[_0x338445(0xbb)][_0x338445(0xa6)])[_0x338445(0xbe)](_0x25bf48=>_0x25bf48[_0x338445(0xdc)]))!=null?_0x2a855f:[],_0x4bce71=JSON[_0x338445(0xaf)](_0x5a97b9),_0x31d37f=(await this[_0x338445(0x100)][_0x338445(0x89)](_0x30b2fe))['getMemberID']();if(_0x3263ca){const _0x179a16={'memberId':_0x31d37f,'unitId':_0x30b2fe,'content':_0x4bce71,'mention':_0x41d62c,'threadId':_0x386734},_0x3562fc=(await this['_httpService']['post'](_0x338445(0x8b)+_0x30b2fe+'/reply',{'body':_0x179a16}))['body']['reply'];return{..._0x2f6a55,'id':_0x3562fc['replyId'],'dT':_0x54fe05[_0x338445(0x81)](+_0x3562fc[_0x338445(0xcf)])[_0x338445(0xb3)](_0x338445(0xcd)),'personId':_0x3562fc[_0x338445(0xfb)]};}else{const _0x227287={'memberId':_0x31d37f,'unitId':_0x30b2fe,'content':_0x4bce71,'mention':_0x41d62c},_0x51be67=await this['_httpService'][_0x338445(0xaa)](_0x338445(0x8b)+_0x30b2fe+_0x338445(0x102),{'body':_0x227287});return _0x3cb046(_0x51be67[_0x338445(0xde)][_0x338445(0xca)],_0x2f6a55);}}async[_0x552be1(0x7b)](_0x3e8fa7){const _0x54c00b=_0x552be1;var _0x17d4aa,_0x54579c;const {text:_0x304133,unitId:_0x5c4ff9}=_0x3e8fa7,_0xcb67d0=(_0x54579c=(_0x17d4aa=_0x304133['customRanges'])==null?void 0x0:_0x17d4aa['filter'](_0x19fcd3=>_0x19fcd3['rangeType']===_0x54fe05[_0x54c00b(0xbb)][_0x54c00b(0xa6)])[_0x54c00b(0xbe)](_0x1fc756=>_0x1fc756[_0x54c00b(0xdc)]))!=null?_0x54579c:[],_0x4d8889=JSON[_0x54c00b(0xaf)](_0x304133),_0x2a66d0=_0x3e8fa7[_0x54c00b(0xfa)],_0x59a087=_0x3e8fa7['id'],_0x3c70b0={'memberId':(await this[_0x54c00b(0x100)]['requireSession'](_0x5c4ff9))[_0x54c00b(0xba)](),'unitId':_0x5c4ff9,'threadId':_0x2a66d0,'mention':_0xcb67d0,'content':_0x4d8889,'replyId':_0x59a087},_0x23d426=await this[_0x54c00b(0xb8)][_0x54c00b(0xaa)]('/universer-api/comment/unit/'+_0x5c4ff9+_0x54c00b(0xf4),{'body':_0x3c70b0});return!_0x23d426[_0x54c00b(0xde)][_0x54c00b(0xac)]||_0x23d426[_0x54c00b(0xde)][_0x54c00b(0xac)]['code']===0x1;}async[_0x552be1(0xb7)](_0x2cabdb){const _0xaa3e5e=_0x552be1,{unitId:_0x515516}=_0x2cabdb,_0x4de6ec=_0x2cabdb[_0xaa3e5e(0xfa)],_0x5dba6d={'memberId':this[_0xaa3e5e(0xc9)][_0xaa3e5e(0x94)]()[_0xaa3e5e(0x8f)],'unitId':_0x515516,'threadId':_0x4de6ec,'solved':_0x2cabdb['resolved']?_0x544e5d['Solved']:_0x544e5d['OpenOrReOpen']},_0x2f5ad4=await this['_httpService']['post'](_0xaa3e5e(0x8b)+_0x515516+_0xaa3e5e(0x7c),{'body':_0x5dba6d});return!_0x2f5ad4[_0xaa3e5e(0xde)][_0xaa3e5e(0xac)]||_0x2f5ad4['body']['error'][_0xaa3e5e(0x83)]===0x1;}async[_0x552be1(0xe5)](_0x107095,_0x223b93,_0x31a073,_0x2d4a44){const _0x3cc092=_0x552be1,_0x53cd62={'memberId':(await this[_0x3cc092(0x100)][_0x3cc092(0x89)](_0x107095))['getMemberID'](),'threadId':_0x31a073,'replyId':_0x2d4a44,'unitId':_0x107095},_0xeca387=await this[_0x3cc092(0xb8)]['post']('/universer-api/comment/unit/'+_0x107095+'/delete',{'body':_0x53cd62});return!_0xeca387[_0x3cc092(0xde)][_0x3cc092(0xac)]||_0xeca387[_0x3cc092(0xde)]['error'][_0x3cc092(0x83)]===0x1;}async['listComments'](_0x497380,_0x4ceed7,_0x16c2b4){const _0x305ed9=_0x552be1,_0x1667c0={'unitId':_0x497380,'threadId':_0x16c2b4},_0x4ef306=await this[_0x305ed9(0xb8)][_0x305ed9(0xaa)](_0x305ed9(0x8b)+_0x497380+_0x305ed9(0xcb),{'body':_0x1667c0}),_0x4158c6=_0x16c2b4[_0x305ed9(0xbe)](_0x2cc658=>_0x27d957(_0x4ef306['body']['comments'][_0x2cc658],_0x497380,_0x4ceed7))[_0x305ed9(0xc6)](Boolean);return Object[_0x305ed9(0xee)](_0x4ef306[_0x305ed9(0xde)][_0x305ed9(0xe8)])[_0x305ed9(0xab)](_0x4e7414=>{this['_userService']['addUser'](_0x4e7414);}),_0x4158c6;}['saveCommentToSnapshot'](_0x357847){const _0x5e61be=_0x552be1;return{'id':_0x357847['id'],'threadId':_0x357847[_0x5e61be(0xfa)],'ref':_0x357847[_0x5e61be(0xeb)]};}};_0xfbf24d=_0x2ec242([_0xeba59(0x0,_0x54fe05['Inject'](_0x33fa56[_0x552be1(0xe9)])),_0xeba59(0x1,_0x54fe05['Inject'](_0x54fe05[_0x552be1(0xc1)])),_0xeba59(0x2,_0x54fe05['Inject'](_0x6b44e4[_0x552be1(0xd8)]))],_0xfbf24d);var _0x5b5591=Object['getOwnPropertyDescriptor'],_0xe19acc=(_0x232466,_0x2f22bc,_0x3ea64e,_0x43a56a)=>{const _0x5760ee=_0x552be1;for(var _0x36f61b=_0x43a56a>0x1?void 0x0:_0x43a56a?_0x5b5591(_0x2f22bc,_0x3ea64e):_0x2f22bc,_0x11d9a6=_0x232466[_0x5760ee(0xea)]-0x1,_0x3f4f2f;_0x11d9a6>=0x0;_0x11d9a6--)(_0x3f4f2f=_0x232466[_0x11d9a6])&&(_0x36f61b=_0x3f4f2f(_0x36f61b)||_0x36f61b);return _0x36f61b;},_0x189899=(_0x1c15ad,_0x20e2e2)=>(_0x48fe05,_0x495496)=>_0x20e2e2(_0x48fe05,_0x495496,_0x1c15ad);let _0x498877=class extends _0x54fe05['Disposable']{constructor(_0x4fcfa8,_0x510977){const _0x25cea3=_0x552be1;super(),this[_0x25cea3(0xdb)]=_0x4fcfa8,this['_threadCommentDataSource']=_0x510977,this[_0x25cea3(0x9d)]();}[_0x552be1(0x9d)](){const _0x5408a1=_0x552be1;this[_0x5408a1(0xdb)][_0x5408a1(0xd2)]=this[_0x5408a1(0xe6)],this[_0x5408a1(0xdb)][_0x5408a1(0x7a)]=!0x1;}};_0x498877=_0xe19acc([_0x189899(0x0,_0x3833bd['IThreadCommentDataSourceService']),_0x189899(0x1,_0x54fe05[_0x552be1(0x9a)](_0xfbf24d))],_0x498877);var _0x177cfe=Object['defineProperty'],_0x3d7c2f=Object[_0x552be1(0xe2)],_0x24fabd=(_0x438200,_0xbdf0f9,_0xef0816)=>_0xbdf0f9 in _0x438200?_0x177cfe(_0x438200,_0xbdf0f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xef0816}):_0x438200[_0xbdf0f9]=_0xef0816,_0x5ebfd4=(_0x524384,_0xd5d102,_0x324a23,_0x264deb)=>{for(var _0x139461=_0x264deb>0x1?void 0x0:_0x264deb?_0x3d7c2f(_0xd5d102,_0x324a23):_0xd5d102,_0x5f3c30=_0x524384['length']-0x1,_0xd1c9c9;_0x5f3c30>=0x0;_0x5f3c30--)(_0xd1c9c9=_0x524384[_0x5f3c30])&&(_0x139461=_0xd1c9c9(_0x139461)||_0x139461);return _0x139461;},_0x3e836a=(_0x226667,_0x592c20)=>(_0x23dde6,_0x49e740)=>_0x592c20(_0x23dde6,_0x49e740,_0x226667),_0x265ff9=(_0x25af8d,_0x4ad582,_0x3a8cd9)=>_0x24fabd(_0x25af8d,typeof _0x4ad582!=_0x552be1(0xfc)?_0x4ad582+'':_0x4ad582,_0x3a8cd9);_0x57c8ff[_0x552be1(0x9b)]=class extends _0x54fe05[_0x552be1(0xf5)]{constructor(_0x361141=_0x34fa77,_0x26f8d0,_0x13f578){const _0x5f25e4=_0x552be1;super(),this['_config']=_0x361141,this[_0x5f25e4(0xf8)]=_0x26f8d0,this[_0x5f25e4(0x88)]=_0x13f578;const {..._0x40f45c}=_0x54fe05[_0x5f25e4(0xd4)]({},_0x34fa77,this['_config']);this[_0x5f25e4(0x88)][_0x5f25e4(0xb9)](_0x4a55a0,_0x40f45c);}['onStarting'](){[[_0xfbf24d],[_0x498877],[_0x2623b8]]['forEach'](_0x6959e1=>{this['_injector']['add'](_0x6959e1);});}[_0x552be1(0xc0)](){const _0x2d0fde=_0x552be1;this['_injector'][_0x2d0fde(0xa8)](_0x498877),this[_0x2d0fde(0xf8)][_0x2d0fde(0xa8)](_0x2623b8);}},_0x265ff9(_0x57c8ff[_0x552be1(0x9b)],_0x552be1(0xbd),_0x3bbad9),_0x265ff9(_0x57c8ff[_0x552be1(0x9b)],'type',_0x54fe05[_0x552be1(0xb1)]['UNIVER_UNKNOWN']),_0x57c8ff[_0x552be1(0x9b)]=_0x5ebfd4([_0x54fe05['DependentOn'](_0x418b98[_0x552be1(0x8d)],_0x6b44e4['UniverCollaborationClientPlugin'],_0x39bf55[_0x552be1(0xfd)]),_0x3e836a(0x1,_0x54fe05[_0x552be1(0x9a)](_0x54fe05[_0x552be1(0xd7)])),_0x3e836a(0x2,_0x54fe05['IConfigService'])],_0x57c8ff[_0x552be1(0x9b)]),Object[_0x552be1(0xd3)](_0x57c8ff,Symbol[_0x552be1(0xb4)],{'value':_0x552be1(0x8a)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.20251227-
|
|
3
|
+
"version": "0.15.0-insiders.20251227-c108ce3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20251227-
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment
|
|
53
|
-
"@univerjs
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20251227-c108ce3",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20251227-c108ce3",
|
|
50
|
+
"@univerjs/core": "0.15.0-insiders.20251227-c108ce3",
|
|
51
|
+
"@univerjs/network": "0.15.0-insiders.20251227-c108ce3",
|
|
52
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20251227-c108ce3",
|
|
53
|
+
"@univerjs/protocol": "0.1.48",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20251227-c108ce3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.0",
|
|
60
60
|
"vitest": "^4.0.16",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.15.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|