@univerjs-pro/thread-comment-datasource 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x537e25=_0x28fc;(function(_0x3d7770,_0x3ca40f){const _0x1b99c0=_0x28fc,_0x5735e2=_0x3d7770();while(!![]){try{const _0x569e07=parseInt(_0x1b99c0(0xc0))/0x1*(parseInt(_0x1b99c0(0x10e))/0x2)+-parseInt(_0x1b99c0(0xbf))/0x3*(parseInt(_0x1b99c0(0x11b))/0x4)+-parseInt(_0x1b99c0(0x123))/0x5+-parseInt(_0x1b99c0(0x116))/0x6*(parseInt(_0x1b99c0(0xdb))/0x7)+parseInt(_0x1b99c0(0x105))/0x8*(parseInt(_0x1b99c0(0xd9))/0x9)+parseInt(_0x1b99c0(0x10c))/0xa+parseInt(_0x1b99c0(0xf7))/0xb*(parseInt(_0x1b99c0(0x103))/0xc);if(_0x569e07===_0x3ca40f)break;else _0x5735e2['push'](_0x5735e2['shift']());}catch(_0x36b8a1){_0x5735e2['push'](_0x5735e2['shift']());}}}(_0x43e7,0x57a5f));Object[_0x537e25(0xaf)](exports,Symbol[_0x537e25(0x111)],{'value':_0x537e25(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x537e25(0xb0);var I=(_0x2f6e2b=>(_0x2f6e2b[_0x2f6e2b['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f6e2b[_0x2f6e2b[_0x537e25(0xac)]=0x1]=_0x537e25(0xac),_0x2f6e2b[_0x2f6e2b['UNRECOGNIZED']=-0x1]=_0x537e25(0xf2),_0x2f6e2b))(I||{}),v=(_0x241dc0=>(_0x241dc0[_0x241dc0[_0x537e25(0x114)]=0x0]='Unknown',_0x241dc0[_0x241dc0['Add']=0x1]=_0x537e25(0xd4),_0x241dc0[_0x241dc0[_0x537e25(0x102)]=0x2]=_0x537e25(0x102),_0x241dc0[_0x241dc0[_0x537e25(0xc9)]=0x3]=_0x537e25(0xc9),_0x241dc0[_0x241dc0[_0x537e25(0x119)]=0x4]=_0x537e25(0x119),_0x241dc0[_0x241dc0['Solve']=0x5]='Solve',_0x241dc0[_0x241dc0[_0x537e25(0xf2)]=-0x1]=_0x537e25(0xf2),_0x241dc0))(v||{});const f=_0x599bf6=>c[_0x537e25(0xe1)](new Date(+_0x599bf6))['format'](_0x537e25(0xff)),R=async(_0x5b01e5,_0x554425)=>{const _0x148884=_0x537e25,_0x55092e=_0x5b01e5['get'](c[_0x148884(0xd7)]),_0xe91d8f=_0x5b01e5[_0x148884(0x109)](P['HTTPService']);_0x554425[_0x148884(0xe9)](_0x223e37=>{const _0x3e35c0=_0x148884;_0x55092e[_0x3e35c0(0xf9)](_0x223e37)&&_0x554425[_0x3e35c0(0x104)](_0x223e37);}),_0x554425[_0x148884(0x124)]&&(await _0xe91d8f[_0x148884(0x109)](_0x148884(0xd0),{'params':{'userIDs':[..._0x554425]}}))[_0x148884(0xe0)][_0x148884(0xf8)][_0x148884(0xe9)](_0x4b8757=>{const _0x99ae40=_0x148884;_0x4b8757&&_0x55092e[_0x99ae40(0xe3)](_0x4b8757);});};function _0x43e7(){const _0x52e6c0=['_initUserSync','getComment','UserManagerService','stringify','289287aIFvOA','userId','29869IdMftz','_config','root','add','rangeType','body','dayjs','getUnit','addUser','pluginName','unitId','map','UNIVER_UNKNOWN','replies','forEach','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','user','/edit','/reply','replyId','/universer-api/comment/unit/','type','UNRECOGNIZED','OpenOrReOpen','IConfigService','_init','parentId','303039LlFzFk','users','getUser','_userService','values','HTTPService','find','_httpService','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','getOwnPropertyDescriptor','Reply','120xZqsxX','delete','8FlbzwJ','/solved','error','CommentService','get','payload','_commentService','6406120vdakte','merge','159754qOyxDF','customRanges','Disposable','toStringTag','resolved','rangeId','Unknown','Inject','318OksRSt','threadId','createTimestamp','Delete','subscribe','36oLTbjz','code','Solve','DependentOn','length','COMMENT','reply','disposeWithMe','1569295LGTVjU','size','UniverThreadCommentDataSourcePlugin','Module','Solved','addComment','content','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','_sessionService','onReady','resolveComment','userID','_injector','post','IThreadCommentDataSourceService','personId','bufferTime','slice','comments','pipe','setConfig','43035RSFaRi','1WklhnS','thread-comment-data-source.config','updateComment','/add','/delete','onStarting','ThreadCommentModel','getCurrentUser','parse','Edit','_configService','saveCommentToSnapshot','_initDataSource','filter','comment','requireSession','/universer-api/user/list','getMemberID','_threadCommentModel','solved','Add'];_0x43e7=function(){return _0x52e6c0;};return _0x43e7();}var $=Object[_0x537e25(0x101)],E=(_0x25f78d,_0x345e63,_0x26fe70,_0x338327)=>{const _0x22f9f1=_0x537e25;for(var _0x2fa20a=_0x338327>0x1?void 0x0:_0x338327?$(_0x345e63,_0x26fe70):_0x345e63,_0x4f2d5d=_0x25f78d[_0x22f9f1(0x11f)]-0x1,_0x3b679f;_0x4f2d5d>=0x0;_0x4f2d5d--)(_0x3b679f=_0x25f78d[_0x4f2d5d])&&(_0x2fa20a=_0x3b679f(_0x2fa20a)||_0x2fa20a);return _0x2fa20a;},S=(_0x3f8610,_0x3ab7f2)=>(_0x3c4136,_0x5c7990)=>_0x3ab7f2(_0x3c4136,_0x5c7990,_0x3f8610);function _0x28fc(_0x20aa04,_0x196297){const _0x43e73e=_0x43e7();return _0x28fc=function(_0x28fce2,_0x502005){_0x28fce2=_0x28fce2-0xac;let _0x143b90=_0x43e73e[_0x28fce2];return _0x143b90;},_0x28fc(_0x20aa04,_0x196297);}let p=class extends c['Disposable']{constructor(_0x436a32,_0x791b2f,_0x32ea79,_0x146f5e){const _0x1dec4b=_0x537e25;super(),this[_0x1dec4b(0x10b)]=_0x436a32,this[_0x1dec4b(0xd2)]=_0x791b2f,this[_0x1dec4b(0xfa)]=_0x32ea79,this[_0x1dec4b(0xb6)]=_0x146f5e,this[_0x1dec4b(0xf5)](),this[_0x1dec4b(0xd5)]();}[_0x537e25(0xd5)](){const _0x25c184=_0x537e25;this[_0x25c184(0x122)](this[_0x25c184(0xd2)]['commentUpdate$'][_0x25c184(0xbd)](w[_0x25c184(0xba)](0x10))[_0x25c184(0x11a)](_0x1044c0=>{const _0x45a007=_0x25c184,_0x53159b=new Set();_0x1044c0[_0x45a007(0xe9)](_0x48357a=>{const _0x287f3e=_0x45a007;switch(_0x48357a['type']){case _0x287f3e(0xde):{const _0x24bb2b=_0x48357a[_0x287f3e(0x10a)][_0x287f3e(0xb9)];_0x53159b[_0x287f3e(0xde)](_0x24bb2b);break;}}}),R(this[_0x45a007(0xb6)],_0x53159b);}));}[_0x537e25(0xf5)](){const _0x6b0ae6=_0x537e25;this[_0x6b0ae6(0x122)](this[_0x6b0ae6(0x10b)]['commentUpdate$'][_0x6b0ae6(0x11a)](async _0x2413c2=>{const _0x118ca4=_0x6b0ae6;var _0x291608,_0x56fc14,_0x3b23d7,_0x24e08f;const _0x29f28a=(_0x291608=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2[_0x118ca4(0xe5)])[_0x118ca4(0xfd)](_0x2847a5=>_0x2847a5[_0x118ca4(0x117)]===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x291608[_0x118ca4(0xdd)];if(!_0x29f28a)return;const {unitId:_0x52d860,subUnitId:_0x56b0ff}=_0x29f28a;switch(_0x2413c2[_0x118ca4(0xec)]&&this[_0x118ca4(0xfa)][_0x118ca4(0xe3)](_0x2413c2[_0x118ca4(0xec)]),_0x2413c2[_0x118ca4(0xf1)]){case v[_0x118ca4(0xd4)]:break;case v['Reply']:{this[_0x118ca4(0xd2)][_0x118ca4(0xad)](_0x52d860,_0x56b0ff,{'unitId':_0x52d860,'subUnitId':_0x56b0ff,'ref':'','id':_0x2413c2[_0x118ca4(0xef)],'dT':f(+_0x2413c2[_0x118ca4(0x118)]),'threadId':_0x2413c2['threadId'],'personId':(_0x3b23d7=(_0x56fc14=_0x2413c2[_0x118ca4(0xec)])==null?void 0x0:_0x56fc14[_0x118ca4(0xb5)])!=null?_0x3b23d7:_0x2413c2['userId'],'text':JSON['parse'](_0x2413c2[_0x118ca4(0xae)]),'parentId':_0x29f28a['id']});break;}case v[_0x118ca4(0x119)]:{const _0x1a7c0c=this[_0x118ca4(0xd2)][_0x118ca4(0xd6)](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);_0x1a7c0c&&_0x1a7c0c[_0x118ca4(0xf6)]&&this[_0x118ca4(0xd2)]['deleteComment'](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x118ca4(0xc2)](_0x52d860,_0x56b0ff,{'commentId':_0x2413c2[_0x118ca4(0xef)],'text':JSON[_0x118ca4(0xc8)](_0x2413c2['content'])});break;}case v[_0x118ca4(0x11d)]:{const _0x33134f=(_0x24e08f=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2['unitId'])['find'](_0x483573=>_0x483573['threadId']===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x24e08f[_0x118ca4(0xdd)];_0x33134f&&this['_threadCommentModel'][_0x118ca4(0xb4)](_0x52d860,_0x56b0ff,_0x33134f['id'],_0x2413c2[_0x118ca4(0xd3)]===I[_0x118ca4(0xac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x537e25(0x108)])),S(0x1,c[_0x537e25(0x115)](M[_0x537e25(0xc6)])),S(0x2,c[_0x537e25(0x115)](c['UserManagerService'])),S(0x3,c[_0x537e25(0x115)](c['Injector']))],p);const q=_0x537e25(0xc1),D={};var A=Object[_0x537e25(0x101)],x=(_0x46b23a,_0x183003,_0x378d78,_0x5ac0e8)=>{for(var _0x2236a4=_0x5ac0e8>0x1?void 0x0:_0x5ac0e8?A(_0x183003,_0x378d78):_0x183003,_0x3e3f30=_0x46b23a['length']-0x1,_0x496946;_0x3e3f30>=0x0;_0x3e3f30--)(_0x496946=_0x46b23a[_0x3e3f30])&&(_0x2236a4=_0x496946(_0x2236a4)||_0x2236a4);return _0x2236a4;},_=(_0x544788,_0x59d85b)=>(_0x460181,_0xe5bcea)=>_0x59d85b(_0x460181,_0xe5bcea,_0x544788);function Y(_0xa4b98b,_0x17c63d){const _0x24f4b6=_0x537e25,_0x361ce3=_0xa4b98b[_0x24f4b6(0xe8)][0x0];return{..._0x17c63d,'id':_0x361ce3['replyId'],'resolved':_0xa4b98b[_0x24f4b6(0xd3)]===0x1,'dT':f(_0x361ce3[_0x24f4b6(0x118)]),'personId':_0x361ce3[_0x24f4b6(0xda)],'threadId':_0x361ce3[_0x24f4b6(0x117)]};}function G(_0xd166dc,_0x15ae85,_0x10ad5e){const _0x4bbde8=_0x537e25;var _0xbb440e,_0x480962;if(((_0x480962=(_0xbb440e=_0xd166dc==null?void 0x0:_0xd166dc['replies'])==null?void 0x0:_0xbb440e['length'])!=null?_0x480962:0x0)>0x0){const _0x18cefd=(_0x598173,_0x2a7359)=>({'id':_0x598173[_0x4bbde8(0xef)],'threadId':_0x598173['threadId'],'dT':f(_0x598173[_0x4bbde8(0x118)]),'personId':_0x598173['userId'],'resolved':_0xd166dc[_0x4bbde8(0xd3)]===I[_0x4bbde8(0xac)],'unitId':_0x15ae85,'subUnitId':_0x10ad5e,'text':JSON[_0x4bbde8(0xc8)](_0x598173[_0x4bbde8(0xae)]),'parentId':_0x2a7359}),_0x2e59fe=_0x18cefd(_0xd166dc[_0x4bbde8(0xe8)][0x0]);return{..._0x2e59fe,'children':_0xd166dc[_0x4bbde8(0xe8)][_0x4bbde8(0xbb)](0x1)[_0x4bbde8(0xe6)](_0x279bf7=>_0x18cefd(_0x279bf7,_0x2e59fe['id']))};}return null;}let g=class{constructor(_0x4fb84d,_0x4b9d39,_0x17ab6a,_0x2d5e5c){const _0x343df8=_0x537e25;this['_httpService']=_0x4fb84d,this[_0x343df8(0xfa)]=_0x4b9d39,this[_0x343df8(0xb2)]=_0x17ab6a,this[_0x343df8(0xb6)]=_0x2d5e5c;}async[_0x537e25(0xad)](_0xc35956){const _0x2d4571=_0x537e25;var _0x37dfe7,_0x9b3a4c;const {parentId:_0x52fdf0,unitId:_0x1ad11d,text:_0x3c89cb,threadId:_0x3a5c6f}=_0xc35956,_0x5a26c4=(_0x9b3a4c=(_0x37dfe7=_0x3c89cb['customRanges'])==null?void 0x0:_0x37dfe7['filter'](_0x5bdf15=>_0x5bdf15['rangeType']===c['CustomRangeType'][_0x2d4571(0x120)])[_0x2d4571(0xe6)](_0x4ae2a9=>_0x4ae2a9[_0x2d4571(0x113)]))!=null?_0x9b3a4c:[],_0x253c2e=JSON['stringify'](_0x3c89cb),_0x1c84ba=(await this[_0x2d4571(0xb2)][_0x2d4571(0xcf)](_0x1ad11d))[_0x2d4571(0xd1)]();if(_0x52fdf0){const _0x5aefae={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4,'threadId':_0x3a5c6f},_0x200713=(await this[_0x2d4571(0xfe)]['post'](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xee),{'body':_0x5aefae}))['body'][_0x2d4571(0x121)];return{..._0xc35956,'id':_0x200713['replyId'],'dT':c[_0x2d4571(0xe1)](+_0x200713[_0x2d4571(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x200713['userId']};}else{const _0x297e05={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4},_0x5163bb=await this[_0x2d4571(0xfe)][_0x2d4571(0xb7)](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xc3),{'body':_0x297e05});return Y(_0x5163bb[_0x2d4571(0xe0)][_0x2d4571(0xce)],_0xc35956);}}async[_0x537e25(0xc2)](_0x106ec9){const _0x2d6a23=_0x537e25;var _0x457b86,_0x4aa8f7;const {text:_0x3ae864,unitId:_0x482cc4}=_0x106ec9,_0x5eecc1=(_0x4aa8f7=(_0x457b86=_0x3ae864[_0x2d6a23(0x10f)])==null?void 0x0:_0x457b86[_0x2d6a23(0xcd)](_0x1e2b3c=>_0x1e2b3c[_0x2d6a23(0xdf)]===c['CustomRangeType'][_0x2d6a23(0x120)])['map'](_0x213ae3=>_0x213ae3[_0x2d6a23(0x113)]))!=null?_0x4aa8f7:[],_0x2274a0=JSON[_0x2d6a23(0xd8)](_0x3ae864),_0x551287=_0x106ec9['threadId'],_0x37e2b3=_0x106ec9['id'],_0x36fafc={'memberId':(await this[_0x2d6a23(0xb2)][_0x2d6a23(0xcf)](_0x482cc4))[_0x2d6a23(0xd1)](),'unitId':_0x482cc4,'threadId':_0x551287,'mention':_0x5eecc1,'content':_0x2274a0,'replyId':_0x37e2b3},_0x10f10a=await this['_httpService'][_0x2d6a23(0xb7)](_0x2d6a23(0xf0)+_0x482cc4+_0x2d6a23(0xed),{'body':_0x36fafc});return!_0x10f10a[_0x2d6a23(0xe0)][_0x2d6a23(0x107)]||_0x10f10a[_0x2d6a23(0xe0)]['error'][_0x2d6a23(0x11c)]===0x1;}async['resolveComment'](_0x38c9a9){const _0x3d63d8=_0x537e25,{unitId:_0x4444d6}=_0x38c9a9,_0x219343=_0x38c9a9[_0x3d63d8(0x117)],_0x44f15c={'memberId':this['_userService'][_0x3d63d8(0xc7)]()[_0x3d63d8(0xb5)],'unitId':_0x4444d6,'threadId':_0x219343,'solved':_0x38c9a9[_0x3d63d8(0x112)]?I[_0x3d63d8(0xac)]:I[_0x3d63d8(0xf3)]},_0x1351d7=await this[_0x3d63d8(0xfe)]['post'](_0x3d63d8(0xf0)+_0x4444d6+_0x3d63d8(0x106),{'body':_0x44f15c});return!_0x1351d7[_0x3d63d8(0xe0)][_0x3d63d8(0x107)]||_0x1351d7[_0x3d63d8(0xe0)]['error']['code']===0x1;}async['deleteComment'](_0xb0cb48,_0xf5b0fd,_0x33803c,_0x44fa68){const _0x3a4ec4=_0x537e25,_0x16431a={'memberId':(await this[_0x3a4ec4(0xb2)][_0x3a4ec4(0xcf)](_0xb0cb48))[_0x3a4ec4(0xd1)](),'threadId':_0x33803c,'replyId':_0x44fa68,'unitId':_0xb0cb48},_0x58318=await this[_0x3a4ec4(0xfe)][_0x3a4ec4(0xb7)](_0x3a4ec4(0xf0)+_0xb0cb48+_0x3a4ec4(0xc4),{'body':_0x16431a});return!_0x58318['body'][_0x3a4ec4(0x107)]||_0x58318[_0x3a4ec4(0xe0)][_0x3a4ec4(0x107)][_0x3a4ec4(0x11c)]===0x1;}async['listComments'](_0x2c4ad8,_0x4a695b,_0x5ed734){const _0x4f82ad=_0x537e25,_0x53023c={'unitId':_0x2c4ad8,'threadId':_0x5ed734},_0x30a8bc=await this['_httpService'][_0x4f82ad(0xb7)](_0x4f82ad(0xf0)+_0x2c4ad8+'/list',{'body':_0x53023c}),_0x44a6d9=_0x5ed734[_0x4f82ad(0xe6)](_0xe1820=>G(_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xbc)][_0xe1820],_0x2c4ad8,_0x4a695b))[_0x4f82ad(0xcd)](Boolean);return Object[_0x4f82ad(0xfb)](_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xf8)])[_0x4f82ad(0xe9)](_0x418acb=>{const _0x570462=_0x4f82ad;this[_0x570462(0xfa)]['addUser'](_0x418acb);}),_0x44a6d9;}[_0x537e25(0xcb)](_0x591586){return{'id':_0x591586['id'],'threadId':_0x591586['threadId'],'ref':_0x591586['ref']};}};g=x([_(0x0,c[_0x537e25(0x115)](P[_0x537e25(0xfc)])),_(0x1,c[_0x537e25(0x115)](c[_0x537e25(0xd7)])),_(0x2,c[_0x537e25(0x115)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x537e25(0x101)],J=(_0xca9081,_0x393739,_0x4926a6,_0x1e62ec)=>{for(var _0x1f3bd=_0x1e62ec>0x1?void 0x0:_0x1e62ec?H(_0x393739,_0x4926a6):_0x393739,_0x3e06ed=_0xca9081['length']-0x1,_0x3f1fb1;_0x3e06ed>=0x0;_0x3e06ed--)(_0x3f1fb1=_0xca9081[_0x3e06ed])&&(_0x1f3bd=_0x3f1fb1(_0x1f3bd)||_0x1f3bd);return _0x1f3bd;},y=(_0x510d14,_0xe382f1)=>(_0x5bc488,_0x5aba03)=>_0xe382f1(_0x5bc488,_0x5aba03,_0x510d14);let C=class extends c[_0x537e25(0x110)]{constructor(_0x41313a,_0xcf6f00){const _0x38f279=_0x537e25;super(),this['_threadCommentDataSourceService']=_0x41313a,this['_threadCommentDataSource']=_0xcf6f00,this[_0x38f279(0xcc)]();}[_0x537e25(0xcc)](){const _0x43fcdf=_0x537e25;this[_0x43fcdf(0xeb)][_0x43fcdf(0xb1)]=this['_threadCommentDataSource'],this[_0x43fcdf(0xeb)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x537e25(0xb8)]),y(0x1,c[_0x537e25(0x115)](g))],C);var F=Object[_0x537e25(0xaf)],L=Object[_0x537e25(0x101)],Z=(_0x483c4c,_0x561605,_0x19c3c9)=>_0x561605 in _0x483c4c?F(_0x483c4c,_0x561605,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c3c9}):_0x483c4c[_0x561605]=_0x19c3c9,W=(_0x1dccb7,_0x2e8fcc,_0x548089,_0x3429dd)=>{for(var _0x3e8f5b=_0x3429dd>0x1?void 0x0:_0x3429dd?L(_0x2e8fcc,_0x548089):_0x2e8fcc,_0x97b84d=_0x1dccb7['length']-0x1,_0x129f1c;_0x97b84d>=0x0;_0x97b84d--)(_0x129f1c=_0x1dccb7[_0x97b84d])&&(_0x3e8f5b=_0x129f1c(_0x3e8f5b)||_0x3e8f5b);return _0x3e8f5b;},O=(_0x21ef7d,_0x5e11d9)=>(_0x4acc8c,_0x3ad932)=>_0x5e11d9(_0x4acc8c,_0x3ad932,_0x21ef7d),N=(_0x3901bf,_0x503a5d,_0x155087)=>Z(_0x3901bf,typeof _0x503a5d!='symbol'?_0x503a5d+'':_0x503a5d,_0x155087);exports[_0x537e25(0x125)]=class extends c['Plugin']{constructor(_0x182ebd=D,_0x2608c8,_0x5840d8){const _0xf15156=_0x537e25;super(),this[_0xf15156(0xdc)]=_0x182ebd,this[_0xf15156(0xb6)]=_0x2608c8,this[_0xf15156(0xca)]=_0x5840d8;const {..._0xf23c28}=c[_0xf15156(0x10d)]({},D,this[_0xf15156(0xdc)]);this[_0xf15156(0xca)][_0xf15156(0xbe)](q,_0xf23c28);}[_0x537e25(0xc5)](){[[g],[C],[p]]['forEach'](_0x216b4e=>{const _0x185a8d=_0x28fc;this['_injector'][_0x185a8d(0xde)](_0x216b4e);});}[_0x537e25(0xb3)](){const _0xcf05d9=_0x537e25;this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](C),this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](p);}},N(exports[_0x537e25(0x125)],_0x537e25(0xe4),U),N(exports[_0x537e25(0x125)],_0x537e25(0xf1),c['UniverInstanceType'][_0x537e25(0xe7)]),exports[_0x537e25(0x125)]=W([c[_0x537e25(0x11e)](j[_0x537e25(0xea)],b['UniverCollaborationClientPlugin'],T[_0x537e25(0x100)]),O(0x1,c[_0x537e25(0x115)](c['Injector'])),O(0x2,c[_0x537e25(0xf4)])],exports[_0x537e25(0x125)]);
|
|
1
|
+
'use strict';function _0x161a(){const _0x396c16=['Module','getUnit','/universer-api/user/list','76QeXvsQ','getMemberID','/solved','_commentService','UniverThreadCommentUIPlugin','_userService','/delete','createTimestamp','syncUpdateMutationToColla','addComment','userId','updateComment','Solved','thread-comment-data-source.config','saveCommentToSnapshot','symbol','IConfigService','86218GrvNys','_config','parse','587322JFLxHr','replies','unitId','getUser','solved','subscribe','UniverInstanceType','Plugin','format','pluginName','payload','UniverCollaborationClientPlugin','defineProperty','toStringTag','post','filter','UniverLicensePlugin','parentId','UserManagerService','threadId','resolved','get','Disposable','bufferTime','/list','UniverThreadCommentDataSourcePlugin','DependentOn','COMMENT','map','values','HTTPService','CustomRangeType','IThreadCommentDataSourceService','_initDataSource','_threadCommentDataSource','546423jIQSHV','code','onReady','deleteComment','requireSession','_initUserSync','45feJDYl','add','forEach','353978NvHrrU','getComment','rangeType','userID','Injector','_threadCommentDataSourceService','UNIVER_UNKNOWN','rangeId','replyId','OpenOrReOpen','/universer-api/comment/unit/','1fOkwle','length','_injector','Add','error','_init','173440JnsrCI','330XzqxHD','content','/add','resolveComment','/reply','Reply','size','_threadCommentModel','body','merge','Edit','find','root','dayjs','Delete','addUser','getOwnPropertyDescriptor','Unknown','UNRECOGNIZED','_httpService','customRanges','user','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','56395IMAMil','commentUpdate$','disposeWithMe','listComments','217665yxKsAE','comment','comments','type','Inject','getCurrentUser','_sessionService','stringify'];_0x161a=function(){return _0x396c16;};return _0x161a();}const _0x45f004=_0x11a1;(function(_0x426e38,_0x5342ed){const _0x4a0224=_0x11a1,_0x4d3b0b=_0x426e38();while(!![]){try{const _0x42a89b=parseInt(_0x4a0224(0xbc))/0x1*(parseInt(_0x4a0224(0xb1))/0x2)+parseInt(_0x4a0224(0xa8))/0x3+-parseInt(_0x4a0224(0xeb))/0x4*(-parseInt(_0x4a0224(0xdc))/0x5)+-parseInt(_0x4a0224(0x85))/0x6+parseInt(_0x4a0224(0xe0))/0x7+-parseInt(_0x4a0224(0xc2))/0x8*(parseInt(_0x4a0224(0xae))/0x9)+-parseInt(_0x4a0224(0xc3))/0xa*(parseInt(_0x4a0224(0x82))/0xb);if(_0x42a89b===_0x5342ed)break;else _0x4d3b0b['push'](_0x4d3b0b['shift']());}catch(_0x245303){_0x4d3b0b['push'](_0x4d3b0b['shift']());}}}(_0x161a,0x22141));function _0x11a1(_0x344031,_0x1ae23e){const _0x161a2f=_0x161a();return _0x11a1=function(_0x11a159,_0x242ace){_0x11a159=_0x11a159-0x7b;let _0x8d27b7=_0x161a2f[_0x11a159];return _0x8d27b7;},_0x11a1(_0x344031,_0x1ae23e);}Object[_0x45f004(0x91)](exports,Symbol[_0x45f004(0x92)],{'value':_0x45f004(0xe8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x45f004(0xda);var I=(_0x408f74=>(_0x408f74[_0x408f74[_0x45f004(0xba)]=0x0]=_0x45f004(0xba),_0x408f74[_0x408f74[_0x45f004(0x7d)]=0x1]=_0x45f004(0x7d),_0x408f74[_0x408f74[_0x45f004(0xd5)]=-0x1]=_0x45f004(0xd5),_0x408f74))(I||{}),v=(_0x44637e=>(_0x44637e[_0x44637e[_0x45f004(0xd4)]=0x0]=_0x45f004(0xd4),_0x44637e[_0x44637e[_0x45f004(0xbf)]=0x1]=_0x45f004(0xbf),_0x44637e[_0x44637e[_0x45f004(0xc8)]=0x2]=_0x45f004(0xc8),_0x44637e[_0x44637e[_0x45f004(0xcd)]=0x3]=_0x45f004(0xcd),_0x44637e[_0x44637e[_0x45f004(0xd1)]=0x4]='Delete',_0x44637e[_0x44637e['Solve']=0x5]=_0x45f004(0xd9),_0x44637e[_0x44637e[_0x45f004(0xd5)]=-0x1]='UNRECOGNIZED',_0x44637e))(v||{});const f=_0x52dc62=>c[_0x45f004(0xd0)](new Date(+_0x52dc62))[_0x45f004(0x8d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3b5a92,_0x30e8ed)=>{const _0x5530e3=_0x45f004,_0x5d4117=_0x3b5a92[_0x5530e3(0x9a)](c[_0x5530e3(0x97)]),_0x1e6e9f=_0x3b5a92[_0x5530e3(0x9a)](P[_0x5530e3(0xa3)]);_0x30e8ed['forEach'](_0x1ca309=>{const _0x27de68=_0x5530e3;_0x5d4117[_0x27de68(0x88)](_0x1ca309)&&_0x30e8ed['delete'](_0x1ca309);}),_0x30e8ed[_0x5530e3(0xc9)]&&(await _0x1e6e9f[_0x5530e3(0x9a)](_0x5530e3(0xea),{'params':{'userIDs':[..._0x30e8ed]}}))[_0x5530e3(0xcb)]['users'][_0x5530e3(0xb0)](_0x34e684=>{_0x34e684&&_0x5d4117['addUser'](_0x34e684);});};var $=Object[_0x45f004(0xd3)],E=(_0x466644,_0x577342,_0x49d696,_0x11ac6f)=>{const _0x52bdcb=_0x45f004;for(var _0x1c652c=_0x11ac6f>0x1?void 0x0:_0x11ac6f?$(_0x577342,_0x49d696):_0x577342,_0xd8bbef=_0x466644[_0x52bdcb(0xbd)]-0x1,_0x134a63;_0xd8bbef>=0x0;_0xd8bbef--)(_0x134a63=_0x466644[_0xd8bbef])&&(_0x1c652c=_0x134a63(_0x1c652c)||_0x1c652c);return _0x1c652c;},S=(_0x2c3a04,_0x57ddfb)=>(_0x14e24a,_0x544d67)=>_0x57ddfb(_0x14e24a,_0x544d67,_0x2c3a04);let p=class extends c[_0x45f004(0x9b)]{constructor(_0x1b6107,_0x143260,_0x43021c,_0x56d6f9){const _0x34feb2=_0x45f004;super(),this[_0x34feb2(0xee)]=_0x1b6107,this[_0x34feb2(0xca)]=_0x143260,this[_0x34feb2(0xf0)]=_0x43021c,this[_0x34feb2(0xbe)]=_0x56d6f9,this[_0x34feb2(0xc1)](),this[_0x34feb2(0xad)]();}[_0x45f004(0xad)](){const _0x4fbb3b=_0x45f004;this[_0x4fbb3b(0xde)](this[_0x4fbb3b(0xca)]['commentUpdate$']['pipe'](w[_0x4fbb3b(0x9c)](0x10))['subscribe'](_0x5cd6d9=>{const _0x2a90ab=_0x4fbb3b,_0x3f6805=new Set();_0x5cd6d9[_0x2a90ab(0xb0)](_0x386b45=>{const _0x1b1107=_0x2a90ab;switch(_0x386b45['type']){case _0x1b1107(0xaf):{const _0x38c2ef=_0x386b45[_0x1b1107(0x8f)]['personId'];_0x3f6805[_0x1b1107(0xaf)](_0x38c2ef);break;}}}),R(this[_0x2a90ab(0xbe)],_0x3f6805);}));}['_init'](){const _0x4874d6=_0x45f004;this[_0x4874d6(0xde)](this[_0x4874d6(0xee)][_0x4874d6(0xdd)][_0x4874d6(0x8a)](async _0x28488=>{const _0x3c5907=_0x4874d6;var _0x2348f9,_0x12466a,_0x10fee9,_0x164b19;const _0x3a8554=(_0x2348f9=this[_0x3c5907(0xca)][_0x3c5907(0xe9)](_0x28488['unitId'])[_0x3c5907(0xce)](_0x45a80d=>_0x45a80d['threadId']===_0x28488[_0x3c5907(0x98)]))==null?void 0x0:_0x2348f9[_0x3c5907(0xcf)];if(!_0x3a8554)return;const {unitId:_0x4386cb,subUnitId:_0x3fe8ad}=_0x3a8554;switch(_0x28488['user']&&this[_0x3c5907(0xf0)][_0x3c5907(0xd2)](_0x28488['user']),_0x28488[_0x3c5907(0xe3)]){case v['Add']:break;case v[_0x3c5907(0xc8)]:{this[_0x3c5907(0xca)][_0x3c5907(0xf4)](_0x4386cb,_0x3fe8ad,{'unitId':_0x4386cb,'subUnitId':_0x3fe8ad,'ref':'','id':_0x28488[_0x3c5907(0xb9)],'dT':f(+_0x28488[_0x3c5907(0xf2)]),'threadId':_0x28488[_0x3c5907(0x98)],'personId':(_0x10fee9=(_0x12466a=_0x28488[_0x3c5907(0xd8)])==null?void 0x0:_0x12466a['userID'])!=null?_0x10fee9:_0x28488[_0x3c5907(0x7b)],'text':JSON[_0x3c5907(0x84)](_0x28488[_0x3c5907(0xc4)]),'parentId':_0x3a8554['id']});break;}case v['Delete']:{const _0x16fb91=this[_0x3c5907(0xca)][_0x3c5907(0xb2)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);_0x16fb91&&_0x16fb91[_0x3c5907(0x96)]&&this['_threadCommentModel'][_0x3c5907(0xab)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);break;}case v[_0x3c5907(0xcd)]:{this[_0x3c5907(0xca)][_0x3c5907(0x7c)](_0x4386cb,_0x3fe8ad,{'commentId':_0x28488[_0x3c5907(0xb9)],'text':JSON['parse'](_0x28488[_0x3c5907(0xc4)])});break;}case v[_0x3c5907(0xd9)]:{const _0x291e34=(_0x164b19=this['_threadCommentModel'][_0x3c5907(0xe9)](_0x28488[_0x3c5907(0x87)])['find'](_0x2840c7=>_0x2840c7['threadId']===_0x28488['threadId']))==null?void 0x0:_0x164b19['root'];_0x291e34&&this[_0x3c5907(0xca)][_0x3c5907(0xc6)](_0x4386cb,_0x3fe8ad,_0x291e34['id'],_0x28488[_0x3c5907(0x89)]===I[_0x3c5907(0x7d)]);break;}}}));}};p=E([S(0x0,c[_0x45f004(0xe4)](b['CommentService'])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x45f004(0xe4)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x45f004(0xb5)]))],p);const q=_0x45f004(0x7e),D={};var A=Object[_0x45f004(0xd3)],x=(_0x2c2da9,_0x4c4d10,_0x5d78d3,_0x49f4e1)=>{const _0x32e890=_0x45f004;for(var _0x338b86=_0x49f4e1>0x1?void 0x0:_0x49f4e1?A(_0x4c4d10,_0x5d78d3):_0x4c4d10,_0x14909f=_0x2c2da9[_0x32e890(0xbd)]-0x1,_0x21e484;_0x14909f>=0x0;_0x14909f--)(_0x21e484=_0x2c2da9[_0x14909f])&&(_0x338b86=_0x21e484(_0x338b86)||_0x338b86);return _0x338b86;},_=(_0xc3b227,_0xddc7a2)=>(_0x455fdb,_0x10d649)=>_0xddc7a2(_0x455fdb,_0x10d649,_0xc3b227);function Y(_0x5b5fc2,_0x18cf83){const _0x10ddc6=_0x45f004,_0x2e1446=_0x5b5fc2[_0x10ddc6(0x86)][0x0];return{..._0x18cf83,'id':_0x2e1446[_0x10ddc6(0xb9)],'resolved':_0x5b5fc2[_0x10ddc6(0x89)]===0x1,'dT':f(_0x2e1446[_0x10ddc6(0xf2)]),'personId':_0x2e1446[_0x10ddc6(0x7b)],'threadId':_0x2e1446[_0x10ddc6(0x98)]};}function G(_0x25b3de,_0x10bfa2,_0x592d0f){const _0x5b5b12=_0x45f004;var _0xb4e3b1,_0x588c61;if(((_0x588c61=(_0xb4e3b1=_0x25b3de==null?void 0x0:_0x25b3de[_0x5b5b12(0x86)])==null?void 0x0:_0xb4e3b1['length'])!=null?_0x588c61:0x0)>0x0){const _0x42c4ed=(_0x33632b,_0x425921)=>({'id':_0x33632b[_0x5b5b12(0xb9)],'threadId':_0x33632b[_0x5b5b12(0x98)],'dT':f(_0x33632b[_0x5b5b12(0xf2)]),'personId':_0x33632b[_0x5b5b12(0x7b)],'resolved':_0x25b3de['solved']===I['Solved'],'unitId':_0x10bfa2,'subUnitId':_0x592d0f,'text':JSON['parse'](_0x33632b['content']),'parentId':_0x425921}),_0x2ebe19=_0x42c4ed(_0x25b3de[_0x5b5b12(0x86)][0x0]);return{..._0x2ebe19,'children':_0x25b3de['replies']['slice'](0x1)[_0x5b5b12(0xa1)](_0x20b1f6=>_0x42c4ed(_0x20b1f6,_0x2ebe19['id']))};}return null;}let g=class{constructor(_0x319ebb,_0x41dec7,_0x10b267,_0x1fa59b){const _0x1c14a0=_0x45f004;this[_0x1c14a0(0xd6)]=_0x319ebb,this['_userService']=_0x41dec7,this[_0x1c14a0(0xe6)]=_0x10b267,this[_0x1c14a0(0xbe)]=_0x1fa59b;}async[_0x45f004(0xf4)](_0x420e19){const _0x33fe8e=_0x45f004;var _0x147650,_0x39bc88;const {parentId:_0x123431,unitId:_0x404fcb,text:_0x54fda5,threadId:_0x3efc96}=_0x420e19,_0x144c40=(_0x39bc88=(_0x147650=_0x54fda5[_0x33fe8e(0xd7)])==null?void 0x0:_0x147650[_0x33fe8e(0x94)](_0x73ffbc=>_0x73ffbc['rangeType']===c['CustomRangeType'][_0x33fe8e(0xa0)])[_0x33fe8e(0xa1)](_0x3af34f=>_0x3af34f['rangeId']))!=null?_0x39bc88:[],_0x14b138=JSON[_0x33fe8e(0xe7)](_0x54fda5),_0xcff443=(await this[_0x33fe8e(0xe6)]['requireSession'](_0x404fcb))[_0x33fe8e(0xec)]();if(_0x123431){const _0x2c7397={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40,'threadId':_0x3efc96},_0x2d5409=(await this[_0x33fe8e(0xd6)][_0x33fe8e(0x93)](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc7),{'body':_0x2c7397}))[_0x33fe8e(0xcb)]['reply'];return{..._0x420e19,'id':_0x2d5409['replyId'],'dT':c[_0x33fe8e(0xd0)](+_0x2d5409[_0x33fe8e(0xf2)])[_0x33fe8e(0x8d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d5409[_0x33fe8e(0x7b)]};}else{const _0x4c0541={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40},_0x1e9726=await this[_0x33fe8e(0xd6)]['post'](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc5),{'body':_0x4c0541});return Y(_0x1e9726[_0x33fe8e(0xcb)][_0x33fe8e(0xe1)],_0x420e19);}}async[_0x45f004(0x7c)](_0x4ec422){const _0x28498d=_0x45f004;var _0x47252a,_0xe56b3a;const {text:_0x2e2e1e,unitId:_0x21a944}=_0x4ec422,_0x3e433f=(_0xe56b3a=(_0x47252a=_0x2e2e1e['customRanges'])==null?void 0x0:_0x47252a[_0x28498d(0x94)](_0x2feefc=>_0x2feefc[_0x28498d(0xb3)]===c[_0x28498d(0xa4)]['COMMENT'])[_0x28498d(0xa1)](_0x17899f=>_0x17899f[_0x28498d(0xb8)]))!=null?_0xe56b3a:[],_0x187191=JSON['stringify'](_0x2e2e1e),_0x4e9969=_0x4ec422['threadId'],_0xdc7a90=_0x4ec422['id'],_0x9b3369={'memberId':(await this['_sessionService'][_0x28498d(0xac)](_0x21a944))[_0x28498d(0xec)](),'unitId':_0x21a944,'threadId':_0x4e9969,'mention':_0x3e433f,'content':_0x187191,'replyId':_0xdc7a90},_0x5aa58a=await this['_httpService']['post'](_0x28498d(0xbb)+_0x21a944+'/edit',{'body':_0x9b3369});return!_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)]||_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)][_0x28498d(0xa9)]===0x1;}async[_0x45f004(0xc6)](_0x29a8ec){const _0x4d3342=_0x45f004,{unitId:_0x36b580}=_0x29a8ec,_0x33932e=_0x29a8ec['threadId'],_0x5bc336={'memberId':this['_userService'][_0x4d3342(0xe5)]()[_0x4d3342(0xb4)],'unitId':_0x36b580,'threadId':_0x33932e,'solved':_0x29a8ec[_0x4d3342(0x99)]?I['Solved']:I[_0x4d3342(0xba)]},_0x27aa3f=await this['_httpService'][_0x4d3342(0x93)](_0x4d3342(0xbb)+_0x36b580+_0x4d3342(0xed),{'body':_0x5bc336});return!_0x27aa3f[_0x4d3342(0xcb)]['error']||_0x27aa3f[_0x4d3342(0xcb)]['error'][_0x4d3342(0xa9)]===0x1;}async[_0x45f004(0xab)](_0x21fae9,_0x2e880c,_0x4d5103,_0x4da26b){const _0xfbcf7f=_0x45f004,_0x3333ea={'memberId':(await this[_0xfbcf7f(0xe6)]['requireSession'](_0x21fae9))[_0xfbcf7f(0xec)](),'threadId':_0x4d5103,'replyId':_0x4da26b,'unitId':_0x21fae9},_0x124be7=await this[_0xfbcf7f(0xd6)][_0xfbcf7f(0x93)](_0xfbcf7f(0xbb)+_0x21fae9+_0xfbcf7f(0xf1),{'body':_0x3333ea});return!_0x124be7['body'][_0xfbcf7f(0xc0)]||_0x124be7[_0xfbcf7f(0xcb)]['error'][_0xfbcf7f(0xa9)]===0x1;}async[_0x45f004(0xdf)](_0x44b512,_0x7d40d9,_0x45a5d0){const _0xbfbd37=_0x45f004,_0x5e9819={'unitId':_0x44b512,'threadId':_0x45a5d0},_0x205e30=await this[_0xbfbd37(0xd6)][_0xbfbd37(0x93)](_0xbfbd37(0xbb)+_0x44b512+_0xbfbd37(0x9d),{'body':_0x5e9819}),_0x45374b=_0x45a5d0['map'](_0x47cd05=>G(_0x205e30[_0xbfbd37(0xcb)][_0xbfbd37(0xe2)][_0x47cd05],_0x44b512,_0x7d40d9))[_0xbfbd37(0x94)](Boolean);return Object[_0xbfbd37(0xa2)](_0x205e30[_0xbfbd37(0xcb)]['users'])[_0xbfbd37(0xb0)](_0x27d128=>{const _0x472d98=_0xbfbd37;this[_0x472d98(0xf0)][_0x472d98(0xd2)](_0x27d128);}),_0x45374b;}[_0x45f004(0x7f)](_0x5ae77){const _0x2aa8dd=_0x45f004;return{'id':_0x5ae77['id'],'threadId':_0x5ae77[_0x2aa8dd(0x98)],'ref':_0x5ae77['ref']};}};g=x([_(0x0,c[_0x45f004(0xe4)](P[_0x45f004(0xa3)])),_(0x1,c[_0x45f004(0xe4)](c[_0x45f004(0x97)])),_(0x2,c[_0x45f004(0xe4)](b['CollaborationSessionService'])),_(0x3,c[_0x45f004(0xe4)](c[_0x45f004(0xb5)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x216b7d,_0x5ed629,_0x8aa81d,_0x20d2b1)=>{const _0x6d5dd1=_0x45f004;for(var _0x167002=_0x20d2b1>0x1?void 0x0:_0x20d2b1?H(_0x5ed629,_0x8aa81d):_0x5ed629,_0x1a64a8=_0x216b7d[_0x6d5dd1(0xbd)]-0x1,_0x5a7c70;_0x1a64a8>=0x0;_0x1a64a8--)(_0x5a7c70=_0x216b7d[_0x1a64a8])&&(_0x167002=_0x5a7c70(_0x167002)||_0x167002);return _0x167002;},y=(_0x9846a8,_0x27ab5f)=>(_0x56c8dd,_0x5bd9c6)=>_0x27ab5f(_0x56c8dd,_0x5bd9c6,_0x9846a8);let C=class extends c[_0x45f004(0x9b)]{constructor(_0x14102a,_0x117b0c){const _0x5e9d47=_0x45f004;super(),this[_0x5e9d47(0xb6)]=_0x14102a,this[_0x5e9d47(0xa7)]=_0x117b0c,this[_0x5e9d47(0xa6)]();}[_0x45f004(0xa6)](){const _0x416390=_0x45f004;this[_0x416390(0xb6)]['dataSource']=this['_threadCommentDataSource'],this[_0x416390(0xb6)][_0x416390(0xf3)]=!0x1;}};C=J([y(0x0,M[_0x45f004(0xa5)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x45f004(0x91)],L=Object[_0x45f004(0xd3)],Z=(_0x11508b,_0x281916,_0x198f3b)=>_0x281916 in _0x11508b?F(_0x11508b,_0x281916,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x198f3b}):_0x11508b[_0x281916]=_0x198f3b,W=(_0x30b714,_0x3bd9a3,_0x584ff2,_0x4acd62)=>{const _0x423d81=_0x45f004;for(var _0x5abfde=_0x4acd62>0x1?void 0x0:_0x4acd62?L(_0x3bd9a3,_0x584ff2):_0x3bd9a3,_0x205bfb=_0x30b714[_0x423d81(0xbd)]-0x1,_0x4a5c8c;_0x205bfb>=0x0;_0x205bfb--)(_0x4a5c8c=_0x30b714[_0x205bfb])&&(_0x5abfde=_0x4a5c8c(_0x5abfde)||_0x5abfde);return _0x5abfde;},O=(_0x71d156,_0x2cdc90)=>(_0xa0b083,_0x45d4c1)=>_0x2cdc90(_0xa0b083,_0x45d4c1,_0x71d156),N=(_0x37eff9,_0x518455,_0x25f0ed)=>Z(_0x37eff9,typeof _0x518455!=_0x45f004(0x80)?_0x518455+'':_0x518455,_0x25f0ed);exports[_0x45f004(0x9e)]=class extends c[_0x45f004(0x8c)]{constructor(_0x1fcd64=D,_0x36f918,_0x515292){const _0x1a87b0=_0x45f004;super(),this[_0x1a87b0(0x83)]=_0x1fcd64,this['_injector']=_0x36f918,this['_configService']=_0x515292;const {..._0x5b32d3}=c[_0x1a87b0(0xcc)]({},D,this['_config']);this['_configService'][_0x1a87b0(0xdb)](q,_0x5b32d3);}['onStarting'](){const _0x230676=_0x45f004;[[g],[C],[p]][_0x230676(0xb0)](_0x5a86a6=>{const _0x99c7d=_0x230676;this[_0x99c7d(0xbe)]['add'](_0x5a86a6);});}[_0x45f004(0xaa)](){const _0x1bcf0e=_0x45f004;this['_injector'][_0x1bcf0e(0x9a)](C),this[_0x1bcf0e(0xbe)][_0x1bcf0e(0x9a)](p);}},N(exports[_0x45f004(0x9e)],_0x45f004(0x8e),U),N(exports[_0x45f004(0x9e)],_0x45f004(0xe3),c[_0x45f004(0x8b)][_0x45f004(0xb7)]),exports[_0x45f004(0x9e)]=W([c[_0x45f004(0x9f)](j[_0x45f004(0xef)],b[_0x45f004(0x90)],T[_0x45f004(0x95)]),O(0x1,c['Inject'](c[_0x45f004(0xb5)])),O(0x2,c[_0x45f004(0x81)])],exports[_0x45f004(0x9e)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xac8b(_0x349f53,_0x1b7620){const _0x210c8d=_0x210c();return _0xac8b=function(_0xac8bb9,_0x4e2e7b){_0xac8bb9=_0xac8bb9-0xa4;let _0x235519=_0x210c8d[_0xac8bb9];return _0x235519;},_0xac8b(_0x349f53,_0x1b7620);}(function(_0x38003a,_0x17c3e0){const _0x5ed62e=_0xac8b,_0x231e73=_0x38003a();while(!![]){try{const _0x3e5fc9=parseInt(_0x5ed62e(0x11f))/0x1*(parseInt(_0x5ed62e(0xd8))/0x2)+parseInt(_0x5ed62e(0xcf))/0x3+parseInt(_0x5ed62e(0xd0))/0x4*(parseInt(_0x5ed62e(0xc2))/0x5)+-parseInt(_0x5ed62e(0xe5))/0x6+-parseInt(_0x5ed62e(0xbd))/0x7*(-parseInt(_0x5ed62e(0xb4))/0x8)+-parseInt(_0x5ed62e(0xe3))/0x9*(parseInt(_0x5ed62e(0xf7))/0xa)+-parseInt(_0x5ed62e(0x103))/0xb;if(_0x3e5fc9===_0x17c3e0)break;else _0x231e73['push'](_0x231e73['shift']());}catch(_0xb42b70){_0x231e73['push'](_0x231e73['shift']());}}}(_0x210c,0x78ea9),function(_0x472981,_0x10d18d){const _0x24b9d0=_0xac8b;typeof exports==_0x24b9d0(0xbf)&&typeof module<'u'?_0x10d18d(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[_0x24b9d0(0x116)]?define([_0x24b9d0(0xda),_0x24b9d0(0x122),_0x24b9d0(0xe4),_0x24b9d0(0xa9),_0x24b9d0(0xba),'@univerjs/thread-comment',_0x24b9d0(0xd5),_0x24b9d0(0xd7)],_0x10d18d):(_0x472981=typeof globalThis<'u'?globalThis:_0x472981||self,_0x10d18d(_0x472981[_0x24b9d0(0xc1)]={},_0x472981[_0x24b9d0(0xdb)],_0x472981[_0x24b9d0(0xa8)],_0x472981['UniverCore'],_0x472981[_0x24b9d0(0x110)],_0x472981[_0x24b9d0(0xb9)],_0x472981[_0x24b9d0(0xd5)],_0x472981[_0x24b9d0(0x121)]));}(this,function(_0x3f28f9,_0x464d37,_0x3841b4,_0x4175d3,_0x14644c,_0x391618,_0x399f04,_0x3c568e){'use strict';const _0x3e564b=_0xac8b;const _0x3eb321=_0x3e564b(0x10e);var _0x58b7cb=(_0x3b7cf9=>(_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe7)]=0x0]='OpenOrReOpen',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xf5)]=0x1]='Solved',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x3b7cf9))(_0x58b7cb||{}),_0x3503fc=(_0x506305=>(_0x506305[_0x506305[_0x3e564b(0x120)]=0x0]=_0x3e564b(0x120),_0x506305[_0x506305[_0x3e564b(0xc9)]=0x1]=_0x3e564b(0xc9),_0x506305[_0x506305['Reply']=0x2]=_0x3e564b(0xd4),_0x506305[_0x506305[_0x3e564b(0xbc)]=0x3]=_0x3e564b(0xbc),_0x506305[_0x506305[_0x3e564b(0xff)]=0x4]=_0x3e564b(0xff),_0x506305[_0x506305[_0x3e564b(0xf1)]=0x5]=_0x3e564b(0xf1),_0x506305[_0x506305[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x506305))(_0x3503fc||{});const _0x658574=_0x3819c9=>_0x4175d3[_0x3e564b(0x109)](new Date(+_0x3819c9))['format']('YYYY/MM/DD\x20HH:mm'),_0x3ecf13=async(_0x4f5c70,_0x3b711f)=>{const _0x2d7db1=_0x3e564b,_0x5c4c6e=_0x4f5c70[_0x2d7db1(0x10f)](_0x4175d3[_0x2d7db1(0x10a)]),_0x540302=_0x4f5c70['get'](_0x3c568e[_0x2d7db1(0xcd)]);_0x3b711f[_0x2d7db1(0xcc)](_0xfbe496=>{const _0x4347a0=_0x2d7db1;_0x5c4c6e[_0x4347a0(0x119)](_0xfbe496)&&_0x3b711f[_0x4347a0(0xf0)](_0xfbe496);}),_0x3b711f[_0x2d7db1(0x11e)]&&(await _0x540302[_0x2d7db1(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b711f]}}))[_0x2d7db1(0xd2)]['users'][_0x2d7db1(0xcc)](_0x35314e=>{const _0x1dc96a=_0x2d7db1;_0x35314e&&_0x5c4c6e[_0x1dc96a(0xfb)](_0x35314e);});};var _0x47a7c6=Object[_0x3e564b(0xc8)],_0x2cd025=(_0x90ba7d,_0x564a02,_0x5d5e0c,_0x2eb20e)=>{const _0x28d1a6=_0x3e564b;for(var _0x35cd4c=_0x2eb20e>0x1?void 0x0:_0x2eb20e?_0x47a7c6(_0x564a02,_0x5d5e0c):_0x564a02,_0x362b74=_0x90ba7d[_0x28d1a6(0xc7)]-0x1,_0x5ca26b;_0x362b74>=0x0;_0x362b74--)(_0x5ca26b=_0x90ba7d[_0x362b74])&&(_0x35cd4c=_0x5ca26b(_0x35cd4c)||_0x35cd4c);return _0x35cd4c;},_0x52f777=(_0x3a51d2,_0x5527f1)=>(_0x1537b4,_0x105b2c)=>_0x5527f1(_0x1537b4,_0x105b2c,_0x3a51d2);let _0x96850c=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x20d0f9,_0x287d0b,_0x32c68d,_0x36ff36){const _0x2e2b96=_0x3e564b;super(),this[_0x2e2b96(0xf9)]=_0x20d0f9,this['_threadCommentModel']=_0x287d0b,this[_0x2e2b96(0xdc)]=_0x32c68d,this[_0x2e2b96(0xdd)]=_0x36ff36,this['_init'](),this[_0x2e2b96(0x108)]();}['_initUserSync'](){const _0x36c5c6=_0x3e564b;this['disposeWithMe'](this['_threadCommentModel'][_0x36c5c6(0xf3)][_0x36c5c6(0xab)](_0x399f04[_0x36c5c6(0x101)](0x10))[_0x36c5c6(0x11a)](_0x2c3fcc=>{const _0x595183=_0x36c5c6,_0x5d52f2=new Set();_0x2c3fcc[_0x595183(0xcc)](_0x268d27=>{const _0x3fd078=_0x595183;switch(_0x268d27[_0x3fd078(0x115)]){case _0x3fd078(0xa5):{const _0x556f0a=_0x268d27[_0x3fd078(0xaf)][_0x3fd078(0xfa)];_0x5d52f2[_0x3fd078(0xa5)](_0x556f0a);break;}}}),_0x3ecf13(this[_0x595183(0xdd)],_0x5d52f2);}));}[_0x3e564b(0xec)](){const _0x29fdf2=_0x3e564b;this[_0x29fdf2(0x10c)](this[_0x29fdf2(0xf9)]['commentUpdate$'][_0x29fdf2(0x11a)](async _0x5a13c6=>{const _0x5c4bb2=_0x29fdf2;var _0x5b570e,_0x4a6f68,_0x3e6bf4,_0x25353c;const _0x131a71=(_0x5b570e=this[_0x5c4bb2(0xae)]['getUnit'](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x85e900=>_0x85e900[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x5b570e[_0x5c4bb2(0xad)];if(!_0x131a71)return;const {unitId:_0x9f94a6,subUnitId:_0x21bc47}=_0x131a71;switch(_0x5a13c6[_0x5c4bb2(0xf6)]&&this['_userService']['addUser'](_0x5a13c6[_0x5c4bb2(0xf6)]),_0x5a13c6[_0x5c4bb2(0x115)]){case _0x3503fc[_0x5c4bb2(0xc9)]:break;case _0x3503fc[_0x5c4bb2(0xd4)]:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0x104)](_0x9f94a6,_0x21bc47,{'unitId':_0x9f94a6,'subUnitId':_0x21bc47,'ref':'','id':_0x5a13c6[_0x5c4bb2(0xce)],'dT':_0x658574(+_0x5a13c6[_0x5c4bb2(0xd9)]),'threadId':_0x5a13c6[_0x5c4bb2(0xf8)],'personId':(_0x3e6bf4=(_0x4a6f68=_0x5a13c6['user'])==null?void 0x0:_0x4a6f68[_0x5c4bb2(0x10b)])!=null?_0x3e6bf4:_0x5a13c6[_0x5c4bb2(0x11c)],'text':JSON[_0x5c4bb2(0xc5)](_0x5a13c6[_0x5c4bb2(0x118)]),'parentId':_0x131a71['id']});break;}case _0x3503fc[_0x5c4bb2(0xff)]:{const _0x259ad8=this[_0x5c4bb2(0xae)]['getComment'](_0x9f94a6,_0x21bc47,_0x5a13c6['replyId']);_0x259ad8&&_0x259ad8[_0x5c4bb2(0x11b)]&&this[_0x5c4bb2(0xae)]['deleteComment'](_0x9f94a6,_0x21bc47,_0x5a13c6[_0x5c4bb2(0xce)]);break;}case _0x3503fc['Edit']:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0xd6)](_0x9f94a6,_0x21bc47,{'commentId':_0x5a13c6[_0x5c4bb2(0xce)],'text':JSON['parse'](_0x5a13c6[_0x5c4bb2(0x118)])});break;}case _0x3503fc['Solve']:{const _0x34e606=(_0x25353c=this[_0x5c4bb2(0xae)][_0x5c4bb2(0xb1)](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x2afe88=>_0x2afe88[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x25353c[_0x5c4bb2(0xad)];_0x34e606&&this[_0x5c4bb2(0xae)][_0x5c4bb2(0xcb)](_0x9f94a6,_0x21bc47,_0x34e606['id'],_0x5a13c6[_0x5c4bb2(0xfe)]===_0x58b7cb[_0x5c4bb2(0xf5)]);break;}}}));}};_0x96850c=_0x2cd025([_0x52f777(0x0,_0x4175d3[_0x3e564b(0xca)](_0x464d37[_0x3e564b(0xe8)])),_0x52f777(0x1,_0x4175d3[_0x3e564b(0xca)](_0x391618[_0x3e564b(0xea)])),_0x52f777(0x2,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x52f777(0x3,_0x4175d3['Inject'](_0x4175d3[_0x3e564b(0x113)]))],_0x96850c);const _0x7b069a='thread-comment-data-source.config',_0x4dbde8={};var _0x467f3a=Object[_0x3e564b(0xc8)],_0x287e6a=(_0xcf2adb,_0x3ee68e,_0x41a483,_0x5d5741)=>{for(var _0x30e891=_0x5d5741>0x1?void 0x0:_0x5d5741?_0x467f3a(_0x3ee68e,_0x41a483):_0x3ee68e,_0x52e78e=_0xcf2adb['length']-0x1,_0x3824a7;_0x52e78e>=0x0;_0x52e78e--)(_0x3824a7=_0xcf2adb[_0x52e78e])&&(_0x30e891=_0x3824a7(_0x30e891)||_0x30e891);return _0x30e891;},_0x46a99e=(_0x222e6d,_0x5a5a22)=>(_0x32f9ae,_0x2e5302)=>_0x5a5a22(_0x32f9ae,_0x2e5302,_0x222e6d);function _0x1fe52e(_0x302cd0,_0x4c4c81){const _0x7e5952=_0x3e564b,_0x3ba1de=_0x302cd0['replies'][0x0];return{..._0x4c4c81,'id':_0x3ba1de['replyId'],'resolved':_0x302cd0[_0x7e5952(0xfe)]===0x1,'dT':_0x658574(_0x3ba1de[_0x7e5952(0xd9)]),'personId':_0x3ba1de['userId'],'threadId':_0x3ba1de[_0x7e5952(0xf8)]};}function _0x22ae1d(_0x2a93d1,_0x2129dd,_0x35f1ce){const _0x17a96a=_0x3e564b;var _0x9be277,_0xc8a0fc;if(((_0xc8a0fc=(_0x9be277=_0x2a93d1==null?void 0x0:_0x2a93d1['replies'])==null?void 0x0:_0x9be277[_0x17a96a(0xc7)])!=null?_0xc8a0fc:0x0)>0x0){const _0x3ff6e4=(_0xe02805,_0x40a35c)=>({'id':_0xe02805['replyId'],'threadId':_0xe02805[_0x17a96a(0xf8)],'dT':_0x658574(_0xe02805[_0x17a96a(0xd9)]),'personId':_0xe02805[_0x17a96a(0x11c)],'resolved':_0x2a93d1[_0x17a96a(0xfe)]===_0x58b7cb[_0x17a96a(0xf5)],'unitId':_0x2129dd,'subUnitId':_0x35f1ce,'text':JSON['parse'](_0xe02805[_0x17a96a(0x118)]),'parentId':_0x40a35c}),_0xd27222=_0x3ff6e4(_0x2a93d1[_0x17a96a(0x10d)][0x0]);return{..._0xd27222,'children':_0x2a93d1[_0x17a96a(0x10d)][_0x17a96a(0x106)](0x1)[_0x17a96a(0xb8)](_0x2db525=>_0x3ff6e4(_0x2db525,_0xd27222['id']))};}return null;}let _0x369bbe=class{constructor(_0x46a5b0,_0x42e198,_0x2c2bab,_0x411807){const _0x3080ff=_0x3e564b;this[_0x3080ff(0xde)]=_0x46a5b0,this[_0x3080ff(0xdc)]=_0x42e198,this[_0x3080ff(0x100)]=_0x2c2bab,this[_0x3080ff(0xdd)]=_0x411807;}async[_0x3e564b(0x104)](_0x51c8fe){const _0x3e00c5=_0x3e564b;var _0x227dd3,_0x38417a;const {parentId:_0x249894,unitId:_0xe80e5a,text:_0x3dfb2b,threadId:_0x42adc3}=_0x51c8fe,_0x1904a4=(_0x38417a=(_0x227dd3=_0x3dfb2b['customRanges'])==null?void 0x0:_0x227dd3[_0x3e00c5(0x111)](_0x1f54d0=>_0x1f54d0[_0x3e00c5(0xd1)]===_0x4175d3[_0x3e00c5(0x102)][_0x3e00c5(0x125)])[_0x3e00c5(0xb8)](_0x58aa17=>_0x58aa17[_0x3e00c5(0xfc)]))!=null?_0x38417a:[],_0x12bb57=JSON[_0x3e00c5(0x11d)](_0x3dfb2b),_0x233b85=(await this[_0x3e00c5(0x100)]['requireSession'](_0xe80e5a))[_0x3e00c5(0xe6)]();if(_0x249894){const _0x35f514={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4,'threadId':_0x42adc3},_0x36eb4b=(await this['_httpService'][_0x3e00c5(0xf4)]('/universer-api/comment/unit/'+_0xe80e5a+'/reply',{'body':_0x35f514}))['body']['reply'];return{..._0x51c8fe,'id':_0x36eb4b[_0x3e00c5(0xce)],'dT':_0x4175d3[_0x3e00c5(0x109)](+_0x36eb4b[_0x3e00c5(0xd9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36eb4b['userId']};}else{const _0x1d0074={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4},_0x4bc478=await this[_0x3e00c5(0xde)]['post'](_0x3e00c5(0xeb)+_0xe80e5a+_0x3e00c5(0xac),{'body':_0x1d0074});return _0x1fe52e(_0x4bc478['body']['comment'],_0x51c8fe);}}async[_0x3e564b(0xd6)](_0x244ca8){const _0x32d504=_0x3e564b;var _0x3aef65,_0x309d8b;const {text:_0x24f84e,unitId:_0x122036}=_0x244ca8,_0x136274=(_0x309d8b=(_0x3aef65=_0x24f84e['customRanges'])==null?void 0x0:_0x3aef65[_0x32d504(0x111)](_0x176e2b=>_0x176e2b[_0x32d504(0xd1)]===_0x4175d3[_0x32d504(0x102)]['COMMENT'])['map'](_0x20881b=>_0x20881b[_0x32d504(0xfc)]))!=null?_0x309d8b:[],_0x436414=JSON[_0x32d504(0x11d)](_0x24f84e),_0x821e43=_0x244ca8[_0x32d504(0xf8)],_0x171a8a=_0x244ca8['id'],_0x40fe34={'memberId':(await this['_sessionService'][_0x32d504(0x117)](_0x122036))[_0x32d504(0xe6)](),'unitId':_0x122036,'threadId':_0x821e43,'mention':_0x136274,'content':_0x436414,'replyId':_0x171a8a},_0x1f8d4f=await this[_0x32d504(0xde)][_0x32d504(0xf4)](_0x32d504(0xeb)+_0x122036+_0x32d504(0xe1),{'body':_0x40fe34});return!_0x1f8d4f[_0x32d504(0xd2)]['error']||_0x1f8d4f[_0x32d504(0xd2)][_0x32d504(0xc6)][_0x32d504(0xb5)]===0x1;}async[_0x3e564b(0xcb)](_0x5dfd00){const _0x3d360f=_0x3e564b,{unitId:_0x2ca0b6}=_0x5dfd00,_0x1a2cc4=_0x5dfd00[_0x3d360f(0xf8)],_0x4f80f1={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2ca0b6,'threadId':_0x1a2cc4,'solved':_0x5dfd00['resolved']?_0x58b7cb[_0x3d360f(0xf5)]:_0x58b7cb[_0x3d360f(0xe7)]},_0x915efb=await this[_0x3d360f(0xde)][_0x3d360f(0xf4)](_0x3d360f(0xeb)+_0x2ca0b6+_0x3d360f(0xb0),{'body':_0x4f80f1});return!_0x915efb[_0x3d360f(0xd2)][_0x3d360f(0xc6)]||_0x915efb[_0x3d360f(0xd2)]['error'][_0x3d360f(0xb5)]===0x1;}async[_0x3e564b(0xd3)](_0x42d30a,_0x2d39af,_0x2b96ec,_0x4fdefd){const _0x86e240=_0x3e564b,_0x41cb9b={'memberId':(await this[_0x86e240(0x100)]['requireSession'](_0x42d30a))['getMemberID'](),'threadId':_0x2b96ec,'replyId':_0x4fdefd,'unitId':_0x42d30a},_0x29a43c=await this['_httpService'][_0x86e240(0xf4)](_0x86e240(0xeb)+_0x42d30a+_0x86e240(0xee),{'body':_0x41cb9b});return!_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)]||_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)][_0x86e240(0xb5)]===0x1;}async[_0x3e564b(0xed)](_0x395c90,_0x1d13a1,_0x70230e){const _0x1366cd=_0x3e564b,_0x13e976={'unitId':_0x395c90,'threadId':_0x70230e},_0x18e67c=await this['_httpService'][_0x1366cd(0xf4)]('/universer-api/comment/unit/'+_0x395c90+_0x1366cd(0xc0),{'body':_0x13e976}),_0x32f4da=_0x70230e[_0x1366cd(0xb8)](_0x595a0d=>_0x22ae1d(_0x18e67c[_0x1366cd(0xd2)]['comments'][_0x595a0d],_0x395c90,_0x1d13a1))['filter'](Boolean);return Object[_0x1366cd(0xc3)](_0x18e67c['body']['users'])[_0x1366cd(0xcc)](_0x682e37=>{const _0x1fb726=_0x1366cd;this['_userService'][_0x1fb726(0xfb)](_0x682e37);}),_0x32f4da;}[_0x3e564b(0xc4)](_0x47ae3c){const _0x1cb56e=_0x3e564b;return{'id':_0x47ae3c['id'],'threadId':_0x47ae3c['threadId'],'ref':_0x47ae3c[_0x1cb56e(0x114)]};}};_0x369bbe=_0x287e6a([_0x46a99e(0x0,_0x4175d3[_0x3e564b(0xca)](_0x3c568e[_0x3e564b(0xcd)])),_0x46a99e(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x46a99e(0x2,_0x4175d3[_0x3e564b(0xca)](_0x464d37['CollaborationSessionService'])),_0x46a99e(0x3,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)]))],_0x369bbe);var _0x2bc4de=Object[_0x3e564b(0xc8)],_0x371cfc=(_0x5a0b52,_0x26efad,_0x46baf9,_0x2e57e0)=>{const _0x156372=_0x3e564b;for(var _0x1e2c62=_0x2e57e0>0x1?void 0x0:_0x2e57e0?_0x2bc4de(_0x26efad,_0x46baf9):_0x26efad,_0x4708e9=_0x5a0b52[_0x156372(0xc7)]-0x1,_0x511da0;_0x4708e9>=0x0;_0x4708e9--)(_0x511da0=_0x5a0b52[_0x4708e9])&&(_0x1e2c62=_0x511da0(_0x1e2c62)||_0x1e2c62);return _0x1e2c62;},_0x95ec7b=(_0x240974,_0x366164)=>(_0x1a7414,_0x1c7fd7)=>_0x366164(_0x1a7414,_0x1c7fd7,_0x240974);let _0x360983=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x3d6a10,_0x1ff145){const _0x3f06eb=_0x3e564b;super(),this[_0x3f06eb(0xe9)]=_0x3d6a10,this[_0x3f06eb(0xbb)]=_0x1ff145,this[_0x3f06eb(0xa7)]();}[_0x3e564b(0xa7)](){const _0x16958f=_0x3e564b;this[_0x16958f(0xe9)]['dataSource']=this[_0x16958f(0xbb)],this[_0x16958f(0xe9)][_0x16958f(0x105)]=!0x1;}};_0x360983=_0x371cfc([_0x95ec7b(0x0,_0x391618['IThreadCommentDataSourceService']),_0x95ec7b(0x1,_0x4175d3[_0x3e564b(0xca)](_0x369bbe))],_0x360983);var _0x2a9408=Object[_0x3e564b(0x107)],_0x1361a4=Object[_0x3e564b(0xc8)],_0x4fb667=(_0x2d3bd2,_0x984f08,_0x2eceb6)=>_0x984f08 in _0x2d3bd2?_0x2a9408(_0x2d3bd2,_0x984f08,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eceb6}):_0x2d3bd2[_0x984f08]=_0x2eceb6,_0x5055dc=(_0x1aa075,_0x1ee6c1,_0x3b7c90,_0x616a0b)=>{const _0x43b492=_0x3e564b;for(var _0x5a47cc=_0x616a0b>0x1?void 0x0:_0x616a0b?_0x1361a4(_0x1ee6c1,_0x3b7c90):_0x1ee6c1,_0x12ba76=_0x1aa075[_0x43b492(0xc7)]-0x1,_0x25bf1a;_0x12ba76>=0x0;_0x12ba76--)(_0x25bf1a=_0x1aa075[_0x12ba76])&&(_0x5a47cc=_0x25bf1a(_0x5a47cc)||_0x5a47cc);return _0x5a47cc;},_0x1f8e79=(_0x310d99,_0x59d82a)=>(_0x2c9bdc,_0x3cb947)=>_0x59d82a(_0x2c9bdc,_0x3cb947,_0x310d99),_0x593af9=(_0x578f18,_0x45fa19,_0x58abc8)=>_0x4fb667(_0x578f18,typeof _0x45fa19!='symbol'?_0x45fa19+'':_0x45fa19,_0x58abc8);_0x3f28f9[_0x3e564b(0xaa)]=class extends _0x4175d3[_0x3e564b(0xa4)]{constructor(_0x25447d=_0x4dbde8,_0x5d657a,_0x90cca0){const _0x778fd=_0x3e564b;super(),this[_0x778fd(0xbe)]=_0x25447d,this[_0x778fd(0xdd)]=_0x5d657a,this[_0x778fd(0xef)]=_0x90cca0;const {..._0x47ef4e}=_0x4175d3[_0x778fd(0xe2)]({},_0x4dbde8,this[_0x778fd(0xbe)]);this[_0x778fd(0xef)][_0x778fd(0xb2)](_0x7b069a,_0x47ef4e);}[_0x3e564b(0x123)](){const _0x5b5ef7=_0x3e564b;[[_0x369bbe],[_0x360983],[_0x96850c]][_0x5b5ef7(0xcc)](_0x456643=>{const _0x262ea1=_0x5b5ef7;this['_injector'][_0x262ea1(0xa5)](_0x456643);});}['onReady'](){const _0x4b108c=_0x3e564b;this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x360983),this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x96850c);}},_0x593af9(_0x3f28f9[_0x3e564b(0xaa)],_0x3e564b(0xb3),_0x3eb321),_0x593af9(_0x3f28f9['UniverThreadCommentDataSourcePlugin'],_0x3e564b(0x115),_0x4175d3[_0x3e564b(0xb6)]['UNIVER_UNKNOWN']),_0x3f28f9[_0x3e564b(0xaa)]=_0x5055dc([_0x4175d3['DependentOn'](_0x14644c['UniverThreadCommentUIPlugin'],_0x464d37[_0x3e564b(0xfd)],_0x3841b4[_0x3e564b(0xdf)]),_0x1f8e79(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)])),_0x1f8e79(0x2,_0x4175d3[_0x3e564b(0xf2)])],_0x3f28f9[_0x3e564b(0xaa)]),Object[_0x3e564b(0x107)](_0x3f28f9,Symbol[_0x3e564b(0x112)],{'value':'Module'});}));function _0x210c(){const _0x267a4a=['userId','stringify','size','1091MCqtuA','Unknown','UniverNetwork','@univerjs-pro/collaboration-client','onStarting','Disposable','COMMENT','Plugin','add','unitId','_initDataSource','UniverProLicense','@univerjs/core','UniverThreadCommentDataSourcePlugin','pipe','/add','root','_threadCommentModel','payload','/solved','getUnit','setConfig','pluginName','70664OmCdrq','code','UniverInstanceType','find','map','UniverThreadComment','@univerjs/thread-comment-ui','_threadCommentDataSource','Edit','7YUqZoz','_config','object','/list','UniverProThreadCommentDatasource','185buNbAc','values','saveCommentToSnapshot','parse','error','length','getOwnPropertyDescriptor','Add','Inject','resolveComment','forEach','HTTPService','replyId','2592711cDDvxi','31368VamJlx','rangeType','body','deleteComment','Reply','rxjs','updateComment','@univerjs/network','1074UZXkCH','createTimestamp','exports','UniverProCollaborationClient','_userService','_injector','_httpService','UniverLicensePlugin','UNRECOGNIZED','/edit','merge','162VtWLJt','@univerjs-pro/license','4738914HFaisk','getMemberID','OpenOrReOpen','CommentService','_threadCommentDataSourceService','ThreadCommentModel','/universer-api/comment/unit/','_init','listComments','/delete','_configService','delete','Solve','IConfigService','commentUpdate$','post','Solved','user','243670fLqxUZ','threadId','_commentService','personId','addUser','rangeId','UniverCollaborationClientPlugin','solved','Delete','_sessionService','bufferTime','CustomRangeType','279323UhsFrU','addComment','syncUpdateMutationToColla','slice','defineProperty','_initUserSync','dayjs','UserManagerService','userID','disposeWithMe','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','UniverThreadCommentUi','filter','toStringTag','Injector','ref','type','amd','requireSession','content','getUser','subscribe','parentId'];_0x210c=function(){return _0x267a4a;};return _0x210c();}
|
|
1
|
+
function _0x161f(_0x46cc66,_0x2893f4){const _0x3e1c43=_0x3e1c();return _0x161f=function(_0x161ff1,_0x135c09){_0x161ff1=_0x161ff1-0x70;let _0x3044c5=_0x3e1c43[_0x161ff1];return _0x3044c5;},_0x161f(_0x46cc66,_0x2893f4);}function _0x3e1c(){const _0x5c2c97=['UniverThreadCommentDataSourcePlugin','type','length','subscribe','filter','getOwnPropertyDescriptor','Plugin','_config','UniverThreadCommentUIPlugin','rangeId','createTimestamp','values','unitId','/delete','post','stringify','find','_initUserSync','CollaborationSessionService','function','forEach','getMemberID','UniverCollaborationClientPlugin','format','user','_httpService','body','HTTPService','getUser','DependentOn','_initDataSource','comment','Reply','addComment','bufferTime','rangeType','getComment','pluginName','_threadCommentDataSourceService','threadId','/solved','UniverNetwork','UserManagerService','Unknown','rxjs','_threadCommentDataSource','Module','Solve','commentUpdate$','replies','customRanges','getCurrentUser','_userService','UniverCore','setConfig','@univerjs/thread-comment-ui','replyId','Injector','code','addUser','disposeWithMe','_threadCommentModel','129210glUyXt','_injector','dayjs','_sessionService','onReady','UniverProThreadCommentDatasource','UniverLicensePlugin','IThreadCommentDataSourceService','exports','1828314pyUBmw','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','updateComment','deleteComment','1611kgZDLj','@univerjs-pro/license','map','userID','ref','Add','listComments','UniverProCollaborationClient','resolveComment','requireSession','parentId','root','/universer-api/comment/unit/','amd','Inject','42FbalBH','userId','YYYY/MM/DD\x20HH:mm','toStringTag','3150706TLdBog','payload','users','143032KoYKzF','solved','10618632SRnYqA','size','UniverInstanceType','Disposable','defineProperty','_configService','slice','getUnit','1964410RNPTjQ','@univerjs/network','OpenOrReOpen','personId','Delete','_commentService','@univerjs/thread-comment','object','@univerjs/core','parse','error','resolved','UNRECOGNIZED','Solved','content','add','reply','/universer-api/user/list','COMMENT','Edit','comments','CustomRangeType','1485569Aktfnq','pipe','@univerjs-pro/collaboration-client','UniverProLicense','129BkTHvs','get','onStarting'];_0x3e1c=function(){return _0x5c2c97;};return _0x3e1c();}(function(_0x5e73a6,_0x46c5fe){const _0x11736a=_0x161f,_0x309197=_0x5e73a6();while(!![]){try{const _0x4b1b55=-parseInt(_0x11736a(0x70))/0x1+parseInt(_0x11736a(0xd7))/0x2+-parseInt(_0x11736a(0x74))/0x3*(parseInt(_0x11736a(0xda))/0x4)+-parseInt(_0x11736a(0xe4))/0x5+-parseInt(_0x11736a(0xbe))/0x6*(-parseInt(_0x11736a(0xd3))/0x7)+-parseInt(_0x11736a(0xdc))/0x8+-parseInt(_0x11736a(0xc4))/0x9*(-parseInt(_0x11736a(0xb5))/0xa);if(_0x4b1b55===_0x46c5fe)break;else _0x309197['push'](_0x309197['shift']());}catch(_0x24c12d){_0x309197['push'](_0x309197['shift']());}}}(_0x3e1c,0xed960),function(_0x33beb2,_0x2b2eb5){const _0x4052b6=_0x161f;typeof exports==_0x4052b6(0xeb)&&typeof module<'u'?_0x2b2eb5(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==_0x4052b6(0x8a)&&define[_0x4052b6(0xd1)]?define([_0x4052b6(0xbd),_0x4052b6(0x72),_0x4052b6(0xc5),_0x4052b6(0xec),_0x4052b6(0xae),_0x4052b6(0xea),'rxjs',_0x4052b6(0xe5)],_0x2b2eb5):(_0x33beb2=typeof globalThis<'u'?globalThis:_0x33beb2||self,_0x2b2eb5(_0x33beb2[_0x4052b6(0xba)]={},_0x33beb2[_0x4052b6(0xcb)],_0x33beb2[_0x4052b6(0x73)],_0x33beb2[_0x4052b6(0xac)],_0x33beb2['UniverThreadCommentUi'],_0x33beb2['UniverThreadComment'],_0x33beb2[_0x4052b6(0xa3)],_0x33beb2[_0x4052b6(0xa0)]));}(this,function(_0x5062d6,_0x10cc09,_0x6d9789,_0x155477,_0x13a88a,_0xaa109b,_0x1afae6,_0x29013c){'use strict';const _0x54280a=_0x161f;const _0xfc6d01=_0x54280a(0xc0);var _0x4702e4=(_0xe2c95f=>(_0xe2c95f[_0xe2c95f['OpenOrReOpen']=0x0]=_0x54280a(0xe6),_0xe2c95f[_0xe2c95f[_0x54280a(0xf1)]=0x1]=_0x54280a(0xf1),_0xe2c95f[_0xe2c95f[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0xe2c95f))(_0x4702e4||{}),_0xfe74f0=(_0x95d014=>(_0x95d014[_0x95d014[_0x54280a(0xa2)]=0x0]='Unknown',_0x95d014[_0x95d014[_0x54280a(0xc9)]=0x1]='Add',_0x95d014[_0x95d014['Reply']=0x2]='Reply',_0x95d014[_0x95d014[_0x54280a(0xf7)]=0x3]='Edit',_0x95d014[_0x95d014['Delete']=0x4]=_0x54280a(0xe8),_0x95d014[_0x95d014[_0x54280a(0xa6)]=0x5]='Solve',_0x95d014[_0x95d014[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0x95d014))(_0xfe74f0||{});const _0x4eb31d=_0x31c2d6=>_0x155477[_0x54280a(0xb7)](new Date(+_0x31c2d6))[_0x54280a(0x8e)](_0x54280a(0xd5)),_0x81cda4=async(_0x22d8a8,_0x181f8f)=>{const _0x5209bd=_0x54280a,_0x17f479=_0x22d8a8[_0x5209bd(0x75)](_0x155477[_0x5209bd(0xa1)]),_0x149832=_0x22d8a8[_0x5209bd(0x75)](_0x29013c[_0x5209bd(0x92)]);_0x181f8f[_0x5209bd(0x8b)](_0x5e61c3=>{const _0x193275=_0x5209bd;_0x17f479[_0x193275(0x93)](_0x5e61c3)&&_0x181f8f['delete'](_0x5e61c3);}),_0x181f8f[_0x5209bd(0xdd)]&&(await _0x149832['get'](_0x5209bd(0xf5),{'params':{'userIDs':[..._0x181f8f]}}))['body'][_0x5209bd(0xd9)][_0x5209bd(0x8b)](_0x26e43b=>{_0x26e43b&&_0x17f479['addUser'](_0x26e43b);});};var _0x53e184=Object[_0x54280a(0x7c)],_0x18f646=(_0x411241,_0x2dabd1,_0x9e114d,_0x2c197b)=>{for(var _0x235ea9=_0x2c197b>0x1?void 0x0:_0x2c197b?_0x53e184(_0x2dabd1,_0x9e114d):_0x2dabd1,_0x12dc86=_0x411241['length']-0x1,_0x22ce09;_0x12dc86>=0x0;_0x12dc86--)(_0x22ce09=_0x411241[_0x12dc86])&&(_0x235ea9=_0x22ce09(_0x235ea9)||_0x235ea9);return _0x235ea9;},_0x54dd7a=(_0x2e552f,_0x154f37)=>(_0x543864,_0x4c1556)=>_0x154f37(_0x543864,_0x4c1556,_0x2e552f);let _0x52bd67=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x555059,_0x6ddecd,_0x35bc2f,_0x5f4660){const _0x37c0d2=_0x54280a;super(),this['_commentService']=_0x555059,this[_0x37c0d2(0xb4)]=_0x6ddecd,this[_0x37c0d2(0xab)]=_0x35bc2f,this['_injector']=_0x5f4660,this[_0x37c0d2(0xbf)](),this['_initUserSync']();}[_0x54280a(0x88)](){const _0x55b616=_0x54280a;this[_0x55b616(0xb3)](this[_0x55b616(0xb4)][_0x55b616(0xa7)][_0x55b616(0x71)](_0x1afae6[_0x55b616(0x99)](0x10))[_0x55b616(0x7a)](_0x3d1357=>{const _0xd3902d=_0x55b616,_0x5256bd=new Set();_0x3d1357[_0xd3902d(0x8b)](_0x35fd3b=>{const _0x4dd887=_0xd3902d;switch(_0x35fd3b[_0x4dd887(0x78)]){case _0x4dd887(0xf3):{const _0x5c194d=_0x35fd3b[_0x4dd887(0xd8)][_0x4dd887(0xe7)];_0x5256bd[_0x4dd887(0xf3)](_0x5c194d);break;}}}),_0x81cda4(this[_0xd3902d(0xb6)],_0x5256bd);}));}[_0x54280a(0xbf)](){const _0x481194=_0x54280a;this[_0x481194(0xb3)](this[_0x481194(0xe9)][_0x481194(0xa7)][_0x481194(0x7a)](async _0x521ef3=>{const _0x2702b1=_0x481194;var _0x5bbf92,_0x48a5ad,_0x4b8e98,_0x2d50ad;const _0x4dd3cb=(_0x5bbf92=this[_0x2702b1(0xb4)]['getUnit'](_0x521ef3[_0x2702b1(0x83)])['find'](_0x1cf9d6=>_0x1cf9d6['threadId']===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x5bbf92[_0x2702b1(0xcf)];if(!_0x4dd3cb)return;const {unitId:_0x951d91,subUnitId:_0x7dfaa5}=_0x4dd3cb;switch(_0x521ef3['user']&&this[_0x2702b1(0xab)]['addUser'](_0x521ef3[_0x2702b1(0x8f)]),_0x521ef3[_0x2702b1(0x78)]){case _0xfe74f0[_0x2702b1(0xc9)]:break;case _0xfe74f0[_0x2702b1(0x97)]:{this[_0x2702b1(0xb4)][_0x2702b1(0x98)](_0x951d91,_0x7dfaa5,{'unitId':_0x951d91,'subUnitId':_0x7dfaa5,'ref':'','id':_0x521ef3[_0x2702b1(0xaf)],'dT':_0x4eb31d(+_0x521ef3[_0x2702b1(0x81)]),'threadId':_0x521ef3[_0x2702b1(0x9e)],'personId':(_0x4b8e98=(_0x48a5ad=_0x521ef3[_0x2702b1(0x8f)])==null?void 0x0:_0x48a5ad[_0x2702b1(0xc7)])!=null?_0x4b8e98:_0x521ef3[_0x2702b1(0xd4)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)]),'parentId':_0x4dd3cb['id']});break;}case _0xfe74f0[_0x2702b1(0xe8)]:{const _0x3d6b76=this[_0x2702b1(0xb4)][_0x2702b1(0x9b)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);_0x3d6b76&&_0x3d6b76[_0x2702b1(0xce)]&&this[_0x2702b1(0xb4)][_0x2702b1(0xc3)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);break;}case _0xfe74f0[_0x2702b1(0xf7)]:{this[_0x2702b1(0xb4)][_0x2702b1(0xc2)](_0x951d91,_0x7dfaa5,{'commentId':_0x521ef3[_0x2702b1(0xaf)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)])});break;}case _0xfe74f0[_0x2702b1(0xa6)]:{const _0x517477=(_0x2d50ad=this[_0x2702b1(0xb4)][_0x2702b1(0xe3)](_0x521ef3[_0x2702b1(0x83)])[_0x2702b1(0x87)](_0x9b4ced=>_0x9b4ced[_0x2702b1(0x9e)]===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x2d50ad[_0x2702b1(0xcf)];_0x517477&&this['_threadCommentModel'][_0x2702b1(0xcc)](_0x951d91,_0x7dfaa5,_0x517477['id'],_0x521ef3['solved']===_0x4702e4['Solved']);break;}}}));}};_0x52bd67=_0x18f646([_0x54dd7a(0x0,_0x155477[_0x54280a(0xd2)](_0x10cc09['CommentService'])),_0x54dd7a(0x1,_0x155477[_0x54280a(0xd2)](_0xaa109b['ThreadCommentModel'])),_0x54dd7a(0x2,_0x155477[_0x54280a(0xd2)](_0x155477['UserManagerService'])),_0x54dd7a(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x52bd67);const _0x1b0463='thread-comment-data-source.config',_0x20e99e={};var _0x1b7d61=Object[_0x54280a(0x7c)],_0x2c02cd=(_0x350ec4,_0x4f975d,_0x488d8e,_0x4440fe)=>{for(var _0x5c8c17=_0x4440fe>0x1?void 0x0:_0x4440fe?_0x1b7d61(_0x4f975d,_0x488d8e):_0x4f975d,_0x17af34=_0x350ec4['length']-0x1,_0x2f6e4e;_0x17af34>=0x0;_0x17af34--)(_0x2f6e4e=_0x350ec4[_0x17af34])&&(_0x5c8c17=_0x2f6e4e(_0x5c8c17)||_0x5c8c17);return _0x5c8c17;},_0x35e91b=(_0x36cf38,_0x3bffeb)=>(_0x512e57,_0x51a03c)=>_0x3bffeb(_0x512e57,_0x51a03c,_0x36cf38);function _0x18874f(_0x2d8733,_0x4d8501){const _0x4aa46a=_0x54280a,_0x25c341=_0x2d8733[_0x4aa46a(0xa8)][0x0];return{..._0x4d8501,'id':_0x25c341[_0x4aa46a(0xaf)],'resolved':_0x2d8733[_0x4aa46a(0xdb)]===0x1,'dT':_0x4eb31d(_0x25c341[_0x4aa46a(0x81)]),'personId':_0x25c341['userId'],'threadId':_0x25c341['threadId']};}function _0x50e719(_0x391164,_0x12889a,_0x5f5698){const _0x2a9657=_0x54280a;var _0x3e72b0,_0x5e5294;if(((_0x5e5294=(_0x3e72b0=_0x391164==null?void 0x0:_0x391164['replies'])==null?void 0x0:_0x3e72b0[_0x2a9657(0x79)])!=null?_0x5e5294:0x0)>0x0){const _0x29e469=(_0x315870,_0x5d6e3c)=>({'id':_0x315870[_0x2a9657(0xaf)],'threadId':_0x315870['threadId'],'dT':_0x4eb31d(_0x315870[_0x2a9657(0x81)]),'personId':_0x315870['userId'],'resolved':_0x391164['solved']===_0x4702e4['Solved'],'unitId':_0x12889a,'subUnitId':_0x5f5698,'text':JSON['parse'](_0x315870['content']),'parentId':_0x5d6e3c}),_0x50b2b5=_0x29e469(_0x391164[_0x2a9657(0xa8)][0x0]);return{..._0x50b2b5,'children':_0x391164[_0x2a9657(0xa8)][_0x2a9657(0xe2)](0x1)[_0x2a9657(0xc6)](_0x39000c=>_0x29e469(_0x39000c,_0x50b2b5['id']))};}return null;}let _0x435ad0=class{constructor(_0x2936d5,_0x4bc1f7,_0x43c247,_0x2f20ef){const _0x5be9f6=_0x54280a;this[_0x5be9f6(0x90)]=_0x2936d5,this[_0x5be9f6(0xab)]=_0x4bc1f7,this[_0x5be9f6(0xb8)]=_0x43c247,this[_0x5be9f6(0xb6)]=_0x2f20ef;}async['addComment'](_0x8321d1){const _0x2c69ed=_0x54280a;var _0x47c9d1,_0x5dc5c8;const {parentId:_0x4fdd4f,unitId:_0x173097,text:_0x540e5c,threadId:_0x3c02aa}=_0x8321d1,_0x20cfb4=(_0x5dc5c8=(_0x47c9d1=_0x540e5c[_0x2c69ed(0xa9)])==null?void 0x0:_0x47c9d1[_0x2c69ed(0x7b)](_0x6ecb6=>_0x6ecb6[_0x2c69ed(0x9a)]===_0x155477[_0x2c69ed(0xf9)][_0x2c69ed(0xf6)])[_0x2c69ed(0xc6)](_0x1185e3=>_0x1185e3[_0x2c69ed(0x80)]))!=null?_0x5dc5c8:[],_0x5f0f82=JSON[_0x2c69ed(0x86)](_0x540e5c),_0x344b03=(await this[_0x2c69ed(0xb8)][_0x2c69ed(0xcd)](_0x173097))[_0x2c69ed(0x8c)]();if(_0x4fdd4f){const _0x133803={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4,'threadId':_0x3c02aa},_0x3e4ada=(await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)](_0x2c69ed(0xd0)+_0x173097+'/reply',{'body':_0x133803}))[_0x2c69ed(0x91)][_0x2c69ed(0xf4)];return{..._0x8321d1,'id':_0x3e4ada['replyId'],'dT':_0x155477['dayjs'](+_0x3e4ada['createTimestamp'])[_0x2c69ed(0x8e)](_0x2c69ed(0xd5)),'personId':_0x3e4ada['userId']};}else{const _0x4f50f1={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4},_0x2bb52f=await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)]('/universer-api/comment/unit/'+_0x173097+'/add',{'body':_0x4f50f1});return _0x18874f(_0x2bb52f['body'][_0x2c69ed(0x96)],_0x8321d1);}}async[_0x54280a(0xc2)](_0x52df13){const _0x6eb2d7=_0x54280a;var _0x45fa9a,_0x563c8f;const {text:_0x438d83,unitId:_0x1693c9}=_0x52df13,_0x7ffdc5=(_0x563c8f=(_0x45fa9a=_0x438d83[_0x6eb2d7(0xa9)])==null?void 0x0:_0x45fa9a[_0x6eb2d7(0x7b)](_0x2585ee=>_0x2585ee['rangeType']===_0x155477[_0x6eb2d7(0xf9)][_0x6eb2d7(0xf6)])[_0x6eb2d7(0xc6)](_0x5ee9c1=>_0x5ee9c1['rangeId']))!=null?_0x563c8f:[],_0x301161=JSON[_0x6eb2d7(0x86)](_0x438d83),_0xb0512=_0x52df13[_0x6eb2d7(0x9e)],_0xbaed01=_0x52df13['id'],_0x3ebcdb={'memberId':(await this['_sessionService'][_0x6eb2d7(0xcd)](_0x1693c9))[_0x6eb2d7(0x8c)](),'unitId':_0x1693c9,'threadId':_0xb0512,'mention':_0x7ffdc5,'content':_0x301161,'replyId':_0xbaed01},_0x5e4477=await this[_0x6eb2d7(0x90)]['post'](_0x6eb2d7(0xd0)+_0x1693c9+'/edit',{'body':_0x3ebcdb});return!_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)]||_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)][_0x6eb2d7(0xb1)]===0x1;}async[_0x54280a(0xcc)](_0x260be2){const _0x25c6fd=_0x54280a,{unitId:_0x195731}=_0x260be2,_0x11d939=_0x260be2[_0x25c6fd(0x9e)],_0x7143ee={'memberId':this[_0x25c6fd(0xab)][_0x25c6fd(0xaa)]()[_0x25c6fd(0xc7)],'unitId':_0x195731,'threadId':_0x11d939,'solved':_0x260be2[_0x25c6fd(0xef)]?_0x4702e4[_0x25c6fd(0xf1)]:_0x4702e4[_0x25c6fd(0xe6)]},_0x47f985=await this[_0x25c6fd(0x90)][_0x25c6fd(0x85)](_0x25c6fd(0xd0)+_0x195731+_0x25c6fd(0x9f),{'body':_0x7143ee});return!_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)]||_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)][_0x25c6fd(0xb1)]===0x1;}async[_0x54280a(0xc3)](_0x16d2bd,_0x1daad8,_0x3afb71,_0x2ddda7){const _0x31fb01=_0x54280a,_0x3dfd87={'memberId':(await this[_0x31fb01(0xb8)][_0x31fb01(0xcd)](_0x16d2bd))[_0x31fb01(0x8c)](),'threadId':_0x3afb71,'replyId':_0x2ddda7,'unitId':_0x16d2bd},_0x1def29=await this[_0x31fb01(0x90)][_0x31fb01(0x85)]('/universer-api/comment/unit/'+_0x16d2bd+_0x31fb01(0x84),{'body':_0x3dfd87});return!_0x1def29[_0x31fb01(0x91)]['error']||_0x1def29[_0x31fb01(0x91)]['error'][_0x31fb01(0xb1)]===0x1;}async[_0x54280a(0xca)](_0x505f87,_0x30dfdf,_0x4a057c){const _0x7f85e6=_0x54280a,_0x244092={'unitId':_0x505f87,'threadId':_0x4a057c},_0xb732=await this[_0x7f85e6(0x90)][_0x7f85e6(0x85)](_0x7f85e6(0xd0)+_0x505f87+'/list',{'body':_0x244092}),_0x3d2d8b=_0x4a057c['map'](_0xd898c5=>_0x50e719(_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xf8)][_0xd898c5],_0x505f87,_0x30dfdf))[_0x7f85e6(0x7b)](Boolean);return Object[_0x7f85e6(0x82)](_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xd9)])[_0x7f85e6(0x8b)](_0x1e714c=>{const _0x519363=_0x7f85e6;this['_userService'][_0x519363(0xb2)](_0x1e714c);}),_0x3d2d8b;}['saveCommentToSnapshot'](_0x332034){const _0x20fbe0=_0x54280a;return{'id':_0x332034['id'],'threadId':_0x332034[_0x20fbe0(0x9e)],'ref':_0x332034[_0x20fbe0(0xc8)]};}};_0x435ad0=_0x2c02cd([_0x35e91b(0x0,_0x155477['Inject'](_0x29013c[_0x54280a(0x92)])),_0x35e91b(0x1,_0x155477['Inject'](_0x155477['UserManagerService'])),_0x35e91b(0x2,_0x155477[_0x54280a(0xd2)](_0x10cc09[_0x54280a(0x89)])),_0x35e91b(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x435ad0);var _0x33969e=Object[_0x54280a(0x7c)],_0xc29a1a=(_0x3fa3a6,_0xd663ae,_0x5eee14,_0x2dea23)=>{const _0x590b99=_0x54280a;for(var _0x5c50a4=_0x2dea23>0x1?void 0x0:_0x2dea23?_0x33969e(_0xd663ae,_0x5eee14):_0xd663ae,_0x8a5c5f=_0x3fa3a6[_0x590b99(0x79)]-0x1,_0x24c2c5;_0x8a5c5f>=0x0;_0x8a5c5f--)(_0x24c2c5=_0x3fa3a6[_0x8a5c5f])&&(_0x5c50a4=_0x24c2c5(_0x5c50a4)||_0x5c50a4);return _0x5c50a4;},_0x3d82fe=(_0x4f5138,_0x37909c)=>(_0x2a06b8,_0x3c1f57)=>_0x37909c(_0x2a06b8,_0x3c1f57,_0x4f5138);let _0x439afd=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x48a3a7,_0x5eb756){const _0x3dea8f=_0x54280a;super(),this[_0x3dea8f(0x9d)]=_0x48a3a7,this[_0x3dea8f(0xa4)]=_0x5eb756,this[_0x3dea8f(0x95)]();}[_0x54280a(0x95)](){const _0x938d00=_0x54280a;this[_0x938d00(0x9d)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x938d00(0xc1)]=!0x1;}};_0x439afd=_0xc29a1a([_0x3d82fe(0x0,_0xaa109b[_0x54280a(0xbc)]),_0x3d82fe(0x1,_0x155477[_0x54280a(0xd2)](_0x435ad0))],_0x439afd);var _0x68a8b7=Object[_0x54280a(0xe0)],_0x418fc3=Object['getOwnPropertyDescriptor'],_0x49e276=(_0x2d6119,_0xea048c,_0xe8c98d)=>_0xea048c in _0x2d6119?_0x68a8b7(_0x2d6119,_0xea048c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8c98d}):_0x2d6119[_0xea048c]=_0xe8c98d,_0x4fc447=(_0x51498d,_0x20cb20,_0x296805,_0x45a730)=>{const _0x266480=_0x54280a;for(var _0x46ebb8=_0x45a730>0x1?void 0x0:_0x45a730?_0x418fc3(_0x20cb20,_0x296805):_0x20cb20,_0x6d53b6=_0x51498d[_0x266480(0x79)]-0x1,_0x174a89;_0x6d53b6>=0x0;_0x6d53b6--)(_0x174a89=_0x51498d[_0x6d53b6])&&(_0x46ebb8=_0x174a89(_0x46ebb8)||_0x46ebb8);return _0x46ebb8;},_0x221996=(_0x5064,_0x4ca1e4)=>(_0x5b2568,_0x36addd)=>_0x4ca1e4(_0x5b2568,_0x36addd,_0x5064),_0xd315ca=(_0x3a3317,_0x34b027,_0x3aeebc)=>_0x49e276(_0x3a3317,typeof _0x34b027!='symbol'?_0x34b027+'':_0x34b027,_0x3aeebc);_0x5062d6['UniverThreadCommentDataSourcePlugin']=class extends _0x155477[_0x54280a(0x7d)]{constructor(_0x4c93b3=_0x20e99e,_0x31ba94,_0x334be8){const _0x4dbec8=_0x54280a;super(),this[_0x4dbec8(0x7e)]=_0x4c93b3,this[_0x4dbec8(0xb6)]=_0x31ba94,this[_0x4dbec8(0xe1)]=_0x334be8;const {..._0x1d0e7d}=_0x155477['merge']({},_0x20e99e,this[_0x4dbec8(0x7e)]);this[_0x4dbec8(0xe1)][_0x4dbec8(0xad)](_0x1b0463,_0x1d0e7d);}[_0x54280a(0x76)](){const _0x1f16dd=_0x54280a;[[_0x435ad0],[_0x439afd],[_0x52bd67]][_0x1f16dd(0x8b)](_0xbcf224=>{const _0x425656=_0x1f16dd;this[_0x425656(0xb6)]['add'](_0xbcf224);});}[_0x54280a(0xb9)](){const _0x38be9d=_0x54280a;this['_injector'][_0x38be9d(0x75)](_0x439afd),this[_0x38be9d(0xb6)][_0x38be9d(0x75)](_0x52bd67);}},_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x9c),_0xfc6d01),_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x78),_0x155477[_0x54280a(0xde)]['UNIVER_UNKNOWN']),_0x5062d6[_0x54280a(0x77)]=_0x4fc447([_0x155477[_0x54280a(0x94)](_0x13a88a[_0x54280a(0x7f)],_0x10cc09[_0x54280a(0x8d)],_0x6d9789[_0x54280a(0xbb)]),_0x221996(0x1,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)])),_0x221996(0x2,_0x155477['IConfigService'])],_0x5062d6[_0x54280a(0x77)]),Object[_0x54280a(0xe0)](_0x5062d6,Symbol[_0x54280a(0xd6)],{'value':_0x54280a(0xa5)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
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.9.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/network": "0.9.
|
|
51
|
-
"@univerjs/thread-comment": "0.9.3",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.4",
|
|
49
|
+
"@univerjs-pro/license": "0.9.4",
|
|
50
|
+
"@univerjs/network": "0.9.4",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.9.
|
|
54
|
-
"@univerjs-
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.9.4",
|
|
53
|
+
"@univerjs/thread-comment": "0.9.4",
|
|
54
|
+
"@univerjs/core": "0.9.4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^7.0.5",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.9.
|
|
61
|
+
"@univerjs-infra/shared": "0.9.4"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|