@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504161609 → 0.6.10-nightly.202504181606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x3b22f3=_0x71fa;function _0x71fa(_0xd82213,_0x454498){const _0x4ec559=_0x4ec5();return _0x71fa=function(_0x71fa1e,_0x1e8b3b){_0x71fa1e=_0x71fa1e-0xad;let _0x5af1f5=_0x4ec559[_0x71fa1e];return _0x5af1f5;},_0x71fa(_0xd82213,_0x454498);}(function(_0x9a32a6,_0x31834e){const _0x2ba18c=_0x71fa,_0x1b0e53=_0x9a32a6();while(!![]){try{const _0x18dcca=-parseInt(_0x2ba18c(0x122))/0x1*(parseInt(_0x2ba18c(0xc6))/0x2)+parseInt(_0x2ba18c(0x105))/0x3*(-parseInt(_0x2ba18c(0x118))/0x4)+-parseInt(_0x2ba18c(0x108))/0x5+-parseInt(_0x2ba18c(0xe8))/0x6+-parseInt(_0x2ba18c(0xae))/0x7+-parseInt(_0x2ba18c(0x111))/0x8+parseInt(_0x2ba18c(0xcf))/0x9*(parseInt(_0x2ba18c(0x123))/0xa);if(_0x18dcca===_0x31834e)break;else _0x1b0e53['push'](_0x1b0e53['shift']());}catch(_0x4f0ff9){_0x1b0e53['push'](_0x1b0e53['shift']());}}}(_0x4ec5,0x5de12));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x3b22f3(0xb6)});const b=require(_0x3b22f3(0x10e)),T=require('@univerjs-pro/license'),c=require(_0x3b22f3(0x110)),j=require(_0x3b22f3(0xbe)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x3b22f3(0xe1)),U=_0x3b22f3(0xbb);var I=(_0x3eb959=>(_0x3eb959[_0x3eb959[_0x3b22f3(0xd9)]=0x0]='OpenOrReOpen',_0x3eb959[_0x3eb959[_0x3b22f3(0xb9)]=0x1]=_0x3b22f3(0xb9),_0x3eb959[_0x3eb959['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3eb959))(I||{}),v=(_0x28099f=>(_0x28099f[_0x28099f['Unknown']=0x0]=_0x3b22f3(0xd7),_0x28099f[_0x28099f[_0x3b22f3(0xdd)]=0x1]='Add',_0x28099f[_0x28099f[_0x3b22f3(0xf5)]=0x2]='Reply',_0x28099f[_0x28099f[_0x3b22f3(0xfd)]=0x3]='Edit',_0x28099f[_0x28099f[_0x3b22f3(0xe5)]=0x4]=_0x3b22f3(0xe5),_0x28099f[_0x28099f[_0x3b22f3(0xb8)]=0x5]=_0x3b22f3(0xb8),_0x28099f[_0x28099f[_0x3b22f3(0xb4)]=-0x1]=_0x3b22f3(0xb4),_0x28099f))(v||{});const f=_0x5d1449=>c[_0x3b22f3(0x107)](new Date(+_0x5d1449))['format'](_0x3b22f3(0x103)),R=async(_0xdc93a2,_0x21ec94)=>{const _0x53e0a6=_0x3b22f3,_0x1374a5=_0xdc93a2['get'](c[_0x53e0a6(0x115)]),_0x553545=_0xdc93a2[_0x53e0a6(0xc4)](P[_0x53e0a6(0xfc)]);_0x21ec94[_0x53e0a6(0xcc)](_0x419095=>{const _0x4ab1bb=_0x53e0a6;_0x1374a5[_0x4ab1bb(0xb2)](_0x419095)&&_0x21ec94[_0x4ab1bb(0xe7)](_0x419095);}),_0x21ec94[_0x53e0a6(0xf4)]&&(await _0x553545[_0x53e0a6(0xc4)](_0x53e0a6(0x126),{'params':{'userIDs':[..._0x21ec94]}}))[_0x53e0a6(0x113)]['users'][_0x53e0a6(0xcc)](_0x56a575=>{const _0x4fdb33=_0x53e0a6;_0x56a575&&_0x1374a5[_0x4fdb33(0xcb)](_0x56a575);});};var $=Object['getOwnPropertyDescriptor'],E=(_0xf68bf7,_0x4045eb,_0x231dc7,_0x366575)=>{for(var _0x3ba9c2=_0x366575>0x1?void 0x0:_0x366575?$(_0x4045eb,_0x231dc7):_0x4045eb,_0x444a29=_0xf68bf7['length']-0x1,_0x121ce7;_0x444a29>=0x0;_0x444a29--)(_0x121ce7=_0xf68bf7[_0x444a29])&&(_0x3ba9c2=_0x121ce7(_0x3ba9c2)||_0x3ba9c2);return _0x3ba9c2;},S=(_0x2655d3,_0x4ec943)=>(_0x1a8839,_0x1492ea)=>_0x4ec943(_0x1a8839,_0x1492ea,_0x2655d3);let p=class extends c[_0x3b22f3(0xdb)]{constructor(_0x2cade8,_0x5bec11,_0x59447a,_0xbf18dd){const _0xd5fd9a=_0x3b22f3;super(),this[_0xd5fd9a(0xf9)]=_0x2cade8,this['_threadCommentModel']=_0x5bec11,this[_0xd5fd9a(0x102)]=_0x59447a,this[_0xd5fd9a(0x106)]=_0xbf18dd,this[_0xd5fd9a(0x121)](),this[_0xd5fd9a(0xc7)]();}[_0x3b22f3(0xc7)](){const _0x11611c=_0x3b22f3;this[_0x11611c(0xb5)](this[_0x11611c(0xd6)][_0x11611c(0x109)][_0x11611c(0xe4)](w['bufferTime'](0x10))[_0x11611c(0xcd)](_0x3653d9=>{const _0x9d002a=_0x11611c,_0x556af7=new Set();_0x3653d9[_0x9d002a(0xcc)](_0x1336b9=>{const _0x11beac=_0x9d002a;switch(_0x1336b9[_0x11beac(0x124)]){case _0x11beac(0xf0):{const _0x465cb7=_0x1336b9['payload'][_0x11beac(0xe6)];_0x556af7[_0x11beac(0xf0)](_0x465cb7);break;}}}),R(this['_injector'],_0x556af7);}));}['_init'](){const _0x431ef0=_0x3b22f3;this[_0x431ef0(0xb5)](this['_commentService'][_0x431ef0(0x109)]['subscribe'](async _0x218b28=>{const _0x12f6fb=_0x431ef0;var _0xadf202,_0x344eee,_0x54ad40,_0x31516f;const _0x200991=(_0xadf202=this['_threadCommentModel'][_0x12f6fb(0xc5)](_0x218b28[_0x12f6fb(0xf2)])['find'](_0x1b159e=>_0x1b159e[_0x12f6fb(0x11b)]===_0x218b28['threadId']))==null?void 0x0:_0xadf202[_0x12f6fb(0x10b)];if(!_0x200991)return;const {unitId:_0x2efd13,subUnitId:_0x247e9a}=_0x200991;switch(_0x218b28[_0x12f6fb(0xdf)]&&this[_0x12f6fb(0x102)][_0x12f6fb(0xcb)](_0x218b28[_0x12f6fb(0xdf)]),_0x218b28[_0x12f6fb(0x124)]){case v[_0x12f6fb(0xdd)]:break;case v[_0x12f6fb(0xf5)]:{this[_0x12f6fb(0xd6)][_0x12f6fb(0xde)](_0x2efd13,_0x247e9a,{'unitId':_0x2efd13,'subUnitId':_0x247e9a,'ref':'','id':_0x218b28[_0x12f6fb(0xec)],'dT':f(+_0x218b28[_0x12f6fb(0xe3)]),'threadId':_0x218b28[_0x12f6fb(0x11b)],'personId':(_0x54ad40=(_0x344eee=_0x218b28['user'])==null?void 0x0:_0x344eee[_0x12f6fb(0x112)])!=null?_0x54ad40:_0x218b28[_0x12f6fb(0x125)],'text':JSON[_0x12f6fb(0xdc)](_0x218b28[_0x12f6fb(0xc8)]),'parentId':_0x200991['id']});break;}case v[_0x12f6fb(0xe5)]:{const _0x2acfbf=this[_0x12f6fb(0xd6)]['getComment'](_0x2efd13,_0x247e9a,_0x218b28[_0x12f6fb(0xec)]);_0x2acfbf&&_0x2acfbf[_0x12f6fb(0xda)]&&this[_0x12f6fb(0xd6)][_0x12f6fb(0xb0)](_0x2efd13,_0x247e9a,_0x218b28[_0x12f6fb(0xec)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x12f6fb(0xed)](_0x2efd13,_0x247e9a,{'commentId':_0x218b28[_0x12f6fb(0xec)],'text':JSON[_0x12f6fb(0xdc)](_0x218b28[_0x12f6fb(0xc8)])});break;}case v[_0x12f6fb(0xb8)]:{const _0x48ccf5=(_0x31516f=this[_0x12f6fb(0xd6)]['getUnit'](_0x218b28[_0x12f6fb(0xf2)])[_0x12f6fb(0x11a)](_0x9dace9=>_0x9dace9[_0x12f6fb(0x11b)]===_0x218b28[_0x12f6fb(0x11b)]))==null?void 0x0:_0x31516f[_0x12f6fb(0x10b)];_0x48ccf5&&this[_0x12f6fb(0xd6)][_0x12f6fb(0xbd)](_0x2efd13,_0x247e9a,_0x48ccf5['id'],_0x218b28[_0x12f6fb(0xbf)]===I[_0x12f6fb(0xb9)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3b22f3(0xb1)])),S(0x1,c[_0x3b22f3(0xd0)](M['ThreadCommentModel'])),S(0x2,c[_0x3b22f3(0xd0)](c[_0x3b22f3(0x115)])),S(0x3,c[_0x3b22f3(0xd0)](c['Injector']))],p);const q=_0x3b22f3(0xfe),D={};var A=Object[_0x3b22f3(0x10c)],x=(_0x165636,_0x291d60,_0x3e54f5,_0x8629cd)=>{const _0x25909e=_0x3b22f3;for(var _0x2c4f52=_0x8629cd>0x1?void 0x0:_0x8629cd?A(_0x291d60,_0x3e54f5):_0x291d60,_0x432e1c=_0x165636[_0x25909e(0xb7)]-0x1,_0x23ff40;_0x432e1c>=0x0;_0x432e1c--)(_0x23ff40=_0x165636[_0x432e1c])&&(_0x2c4f52=_0x23ff40(_0x2c4f52)||_0x2c4f52);return _0x2c4f52;},_=(_0x5d16cc,_0x3338d1)=>(_0x17b351,_0x24ad47)=>_0x3338d1(_0x17b351,_0x24ad47,_0x5d16cc);function Y(_0x230df6,_0x2f879b){const _0x4bbf62=_0x3b22f3,_0x17eca0=_0x230df6[_0x4bbf62(0xc1)][0x0];return{..._0x2f879b,'id':_0x17eca0[_0x4bbf62(0xec)],'resolved':_0x230df6[_0x4bbf62(0xbf)]===0x1,'dT':f(_0x17eca0['createTimestamp']),'personId':_0x17eca0['userId'],'threadId':_0x17eca0[_0x4bbf62(0x11b)]};}function G(_0x4ffa34,_0x3dd48e,_0x455b08){const _0x4f72d3=_0x3b22f3;var _0x18c0c4,_0x1ddae8;if(((_0x1ddae8=(_0x18c0c4=_0x4ffa34==null?void 0x0:_0x4ffa34[_0x4f72d3(0xc1)])==null?void 0x0:_0x18c0c4[_0x4f72d3(0xb7)])!=null?_0x1ddae8:0x0)>0x0){const _0x581937=(_0x42ca44,_0x34c7eb)=>({'id':_0x42ca44['replyId'],'threadId':_0x42ca44[_0x4f72d3(0x11b)],'dT':f(_0x42ca44[_0x4f72d3(0xe3)]),'personId':_0x42ca44[_0x4f72d3(0x125)],'resolved':_0x4ffa34[_0x4f72d3(0xbf)]===I['Solved'],'unitId':_0x3dd48e,'subUnitId':_0x455b08,'text':JSON[_0x4f72d3(0xdc)](_0x42ca44[_0x4f72d3(0xc8)]),'parentId':_0x34c7eb}),_0x3b4819=_0x581937(_0x4ffa34[_0x4f72d3(0xc1)][0x0]);return{..._0x3b4819,'children':_0x4ffa34[_0x4f72d3(0xc1)]['slice'](0x1)[_0x4f72d3(0xd8)](_0x26f150=>_0x581937(_0x26f150,_0x3b4819['id']))};}return null;}function _0x4ec5(){const _0x2ddb3e=['/delete','_commentService','getCurrentUser','syncUpdateMutationToColla','HTTPService','Edit','thread-comment-data-source.config','CollaborationSessionService','Plugin','UNIVER_UNKNOWN','_userService','YYYY/MM/DD\x20HH:mm','dataSource','12hnxkEQ','_injector','dayjs','3411430krrGAy','commentUpdate$','rangeId','root','getOwnPropertyDescriptor','comments','@univerjs-pro/collaboration-client','/edit','@univerjs/core','5543160zjxtZi','userID','body','comment','UserManagerService','requireSession','listComments','670504XZGiLV','rangeType','find','threadId','/universer-api/comment/unit/','merge','users','/solved','filter','_init','664252gsbnoO','180GTnXfK','type','userId','/universer-api/user/list','_threadCommentDataSource','_configService','reply','3107846lbOjIi','/add','deleteComment','CommentService','getUser','UniverLicensePlugin','UNRECOGNIZED','disposeWithMe','Module','length','Solve','Solved','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','resolveComment','@univerjs/thread-comment-ui','solved','error','replies','_sessionService','ref','get','getUnit','2muVsxV','_initUserSync','content','Injector','CustomRangeType','addUser','forEach','subscribe','format','2003031aNWDRk','Inject','_initDataSource','_config','IConfigService','onReady','stringify','_threadCommentModel','Unknown','map','OpenOrReOpen','parentId','Disposable','parse','Add','addComment','user','_threadCommentDataSourceService','@univerjs/network','setConfig','createTimestamp','pipe','Delete','personId','delete','2805702WBOHra','onStarting','/list','COMMENT','replyId','updateComment','customRanges','getMemberID','add','_httpService','unitId','IThreadCommentDataSourceService','size','Reply','post','code'];_0x4ec5=function(){return _0x2ddb3e;};return _0x4ec5();}let g=class{constructor(_0x52d356,_0x29fbe8,_0x48c260,_0x1532ac){const _0x465256=_0x3b22f3;this[_0x465256(0xf1)]=_0x52d356,this[_0x465256(0x102)]=_0x29fbe8,this[_0x465256(0xc2)]=_0x48c260,this[_0x465256(0x106)]=_0x1532ac;}async['addComment'](_0x334bf6){const _0x10267c=_0x3b22f3;var _0x45e890,_0x4fc035;const {parentId:_0xa22467,unitId:_0x461964,text:_0x706879,threadId:_0x1bb77d}=_0x334bf6,_0x52b02a=(_0x4fc035=(_0x45e890=_0x706879['customRanges'])==null?void 0x0:_0x45e890[_0x10267c(0x120)](_0x51e3b0=>_0x51e3b0[_0x10267c(0x119)]===c[_0x10267c(0xca)][_0x10267c(0xeb)])['map'](_0x5bcefc=>_0x5bcefc[_0x10267c(0x10a)]))!=null?_0x4fc035:[],_0x226520=JSON[_0x10267c(0xd5)](_0x706879),_0x14b381=(await this['_sessionService'][_0x10267c(0x116)](_0x461964))[_0x10267c(0xef)]();if(_0xa22467){const _0x57eedf={'memberId':_0x14b381,'unitId':_0x461964,'content':_0x226520,'mention':_0x52b02a,'threadId':_0x1bb77d},_0x44105b=(await this[_0x10267c(0xf1)][_0x10267c(0xf6)]('/universer-api/comment/unit/'+_0x461964+'/reply',{'body':_0x57eedf}))[_0x10267c(0x113)][_0x10267c(0xad)];return{..._0x334bf6,'id':_0x44105b[_0x10267c(0xec)],'dT':c[_0x10267c(0x107)](+_0x44105b[_0x10267c(0xe3)])[_0x10267c(0xce)](_0x10267c(0x103)),'personId':_0x44105b['userId']};}else{const _0xb2715b={'memberId':_0x14b381,'unitId':_0x461964,'content':_0x226520,'mention':_0x52b02a},_0x36e6b5=await this[_0x10267c(0xf1)][_0x10267c(0xf6)](_0x10267c(0x11c)+_0x461964+_0x10267c(0xaf),{'body':_0xb2715b});return Y(_0x36e6b5[_0x10267c(0x113)][_0x10267c(0x114)],_0x334bf6);}}async[_0x3b22f3(0xed)](_0x5d40fb){const _0x56399c=_0x3b22f3;var _0x62fe94,_0x4da103;const {text:_0x4eb3d1,unitId:_0x446db8}=_0x5d40fb,_0x624b76=(_0x4da103=(_0x62fe94=_0x4eb3d1[_0x56399c(0xee)])==null?void 0x0:_0x62fe94['filter'](_0x51b3cf=>_0x51b3cf[_0x56399c(0x119)]===c['CustomRangeType'][_0x56399c(0xeb)])[_0x56399c(0xd8)](_0x9db7c2=>_0x9db7c2[_0x56399c(0x10a)]))!=null?_0x4da103:[],_0x38e530=JSON['stringify'](_0x4eb3d1),_0x576ca9=_0x5d40fb[_0x56399c(0x11b)],_0x3a0e08=_0x5d40fb['id'],_0x45d8d2={'memberId':(await this[_0x56399c(0xc2)][_0x56399c(0x116)](_0x446db8))[_0x56399c(0xef)](),'unitId':_0x446db8,'threadId':_0x576ca9,'mention':_0x624b76,'content':_0x38e530,'replyId':_0x3a0e08},_0x339e7c=await this[_0x56399c(0xf1)][_0x56399c(0xf6)](_0x56399c(0x11c)+_0x446db8+_0x56399c(0x10f),{'body':_0x45d8d2});return!_0x339e7c[_0x56399c(0x113)][_0x56399c(0xc0)]||_0x339e7c[_0x56399c(0x113)][_0x56399c(0xc0)]['code']===0x1;}async['resolveComment'](_0x153c3f){const _0x276aaf=_0x3b22f3,{unitId:_0x2845aa}=_0x153c3f,_0x469e57=_0x153c3f[_0x276aaf(0x11b)],_0x2b6929={'memberId':this[_0x276aaf(0x102)][_0x276aaf(0xfa)]()[_0x276aaf(0x112)],'unitId':_0x2845aa,'threadId':_0x469e57,'solved':_0x153c3f['resolved']?I['Solved']:I[_0x276aaf(0xd9)]},_0x434bfc=await this[_0x276aaf(0xf1)]['post'](_0x276aaf(0x11c)+_0x2845aa+_0x276aaf(0x11f),{'body':_0x2b6929});return!_0x434bfc[_0x276aaf(0x113)][_0x276aaf(0xc0)]||_0x434bfc['body'][_0x276aaf(0xc0)][_0x276aaf(0xf7)]===0x1;}async['deleteComment'](_0x1649c3,_0x55b40f,_0x1a0d8a,_0x16aa99){const _0x43e9fa=_0x3b22f3,_0x4e7609={'memberId':(await this[_0x43e9fa(0xc2)][_0x43e9fa(0x116)](_0x1649c3))[_0x43e9fa(0xef)](),'threadId':_0x1a0d8a,'replyId':_0x16aa99,'unitId':_0x1649c3},_0x2e7416=await this[_0x43e9fa(0xf1)][_0x43e9fa(0xf6)](_0x43e9fa(0x11c)+_0x1649c3+_0x43e9fa(0xf8),{'body':_0x4e7609});return!_0x2e7416[_0x43e9fa(0x113)][_0x43e9fa(0xc0)]||_0x2e7416[_0x43e9fa(0x113)][_0x43e9fa(0xc0)][_0x43e9fa(0xf7)]===0x1;}async[_0x3b22f3(0x117)](_0x5fee09,_0x2dff52,_0x376f6e){const _0x37569b=_0x3b22f3,_0x3dadf8={'unitId':_0x5fee09,'threadId':_0x376f6e},_0x4cd51d=await this[_0x37569b(0xf1)]['post'](_0x37569b(0x11c)+_0x5fee09+_0x37569b(0xea),{'body':_0x3dadf8}),_0x3a64c6=_0x376f6e[_0x37569b(0xd8)](_0x3e7bf3=>G(_0x4cd51d[_0x37569b(0x113)][_0x37569b(0x10d)][_0x3e7bf3],_0x5fee09,_0x2dff52))[_0x37569b(0x120)](Boolean);return Object['values'](_0x4cd51d[_0x37569b(0x113)][_0x37569b(0x11e)])['forEach'](_0x1368e0=>{const _0x5118ef=_0x37569b;this[_0x5118ef(0x102)][_0x5118ef(0xcb)](_0x1368e0);}),_0x3a64c6;}['saveCommentToSnapshot'](_0xb2a01d){const _0x4ddec4=_0x3b22f3;return{'id':_0xb2a01d['id'],'threadId':_0xb2a01d[_0x4ddec4(0x11b)],'ref':_0xb2a01d[_0x4ddec4(0xc3)]};}};g=x([_(0x0,c[_0x3b22f3(0xd0)](P[_0x3b22f3(0xfc)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x3b22f3(0xff)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x3b22f3(0x10c)],J=(_0x21c944,_0x2bcd09,_0x342fb1,_0x25b29b)=>{const _0x19c23f=_0x3b22f3;for(var _0x594246=_0x25b29b>0x1?void 0x0:_0x25b29b?H(_0x2bcd09,_0x342fb1):_0x2bcd09,_0x346edc=_0x21c944[_0x19c23f(0xb7)]-0x1,_0x324c43;_0x346edc>=0x0;_0x346edc--)(_0x324c43=_0x21c944[_0x346edc])&&(_0x594246=_0x324c43(_0x594246)||_0x594246);return _0x594246;},y=(_0x2b9b1e,_0x14d127)=>(_0x133f28,_0x52161a)=>_0x14d127(_0x133f28,_0x52161a,_0x2b9b1e);let C=class extends c[_0x3b22f3(0xdb)]{constructor(_0xadeea,_0xeb7e3b){const _0x21057e=_0x3b22f3;super(),this[_0x21057e(0xe0)]=_0xadeea,this[_0x21057e(0x127)]=_0xeb7e3b,this[_0x21057e(0xd1)]();}[_0x3b22f3(0xd1)](){const _0x3adcb5=_0x3b22f3;this[_0x3adcb5(0xe0)][_0x3adcb5(0x104)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3adcb5(0xfb)]=!0x1;}};C=J([y(0x0,M[_0x3b22f3(0xf3)]),y(0x1,c[_0x3b22f3(0xd0)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x1be736,_0x4cddaf,_0x56b4ca)=>_0x4cddaf in _0x1be736?F(_0x1be736,_0x4cddaf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56b4ca}):_0x1be736[_0x4cddaf]=_0x56b4ca,W=(_0x4ffee6,_0x50178c,_0x4841fa,_0x3922c9)=>{for(var _0x392c8c=_0x3922c9>0x1?void 0x0:_0x3922c9?L(_0x50178c,_0x4841fa):_0x50178c,_0x26aa8e=_0x4ffee6['length']-0x1,_0xfafd15;_0x26aa8e>=0x0;_0x26aa8e--)(_0xfafd15=_0x4ffee6[_0x26aa8e])&&(_0x392c8c=_0xfafd15(_0x392c8c)||_0x392c8c);return _0x392c8c;},O=(_0x1bea6f,_0x417882)=>(_0x4cc2f4,_0x3e6407)=>_0x417882(_0x4cc2f4,_0x3e6407,_0x1bea6f),N=(_0x1777c9,_0x12a953,_0x251850)=>Z(_0x1777c9,typeof _0x12a953!='symbol'?_0x12a953+'':_0x12a953,_0x251850);exports[_0x3b22f3(0xbc)]=class extends c[_0x3b22f3(0x100)]{constructor(_0x5a5159=D,_0x548120,_0x523fa5){const _0x45db36=_0x3b22f3;super(),this['_config']=_0x5a5159,this[_0x45db36(0x106)]=_0x548120,this[_0x45db36(0x128)]=_0x523fa5;const {..._0x54c8f2}=c[_0x45db36(0x11d)]({},D,this[_0x45db36(0xd2)]);this['_configService'][_0x45db36(0xe2)](q,_0x54c8f2);}[_0x3b22f3(0xe9)](){const _0x2fcb05=_0x3b22f3;[[g],[C],[p]][_0x2fcb05(0xcc)](_0x44b28c=>{this['_injector']['add'](_0x44b28c);});}[_0x3b22f3(0xd4)](){const _0x34ab38=_0x3b22f3;this[_0x34ab38(0x106)][_0x34ab38(0xc4)](C),this[_0x34ab38(0x106)]['get'](p);}},N(exports[_0x3b22f3(0xbc)],_0x3b22f3(0xba),U),N(exports[_0x3b22f3(0xbc)],'type',c['UniverInstanceType'][_0x3b22f3(0x101)]),exports[_0x3b22f3(0xbc)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x3b22f3(0xb3)]),O(0x1,c[_0x3b22f3(0xd0)](c[_0x3b22f3(0xc9)])),O(0x2,c[_0x3b22f3(0xd3)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x388aec=_0x3e84;(function(_0x114cc8,_0xc8c4f7){const _0x533e00=_0x3e84,_0x3eae97=_0x114cc8();while(!![]){try{const _0x55b011=parseInt(_0x533e00(0x1b3))/0x1*(parseInt(_0x533e00(0x16f))/0x2)+-parseInt(_0x533e00(0x15e))/0x3*(-parseInt(_0x533e00(0x193))/0x4)+-parseInt(_0x533e00(0x168))/0x5+parseInt(_0x533e00(0x194))/0x6+-parseInt(_0x533e00(0x18a))/0x7+parseInt(_0x533e00(0x1a9))/0x8*(parseInt(_0x533e00(0x17b))/0x9)+-parseInt(_0x533e00(0x16e))/0xa;if(_0x55b011===_0xc8c4f7)break;else _0x3eae97['push'](_0x3eae97['shift']());}catch(_0x30b7c1){_0x3eae97['push'](_0x3eae97['shift']());}}}(_0x5285,0xf042c));Object[_0x388aec(0x173)](exports,Symbol[_0x388aec(0x16a)],{'value':_0x388aec(0x13e)});const b=require(_0x388aec(0x172)),T=require('@univerjs-pro/license'),c=require(_0x388aec(0x1ad)),j=require(_0x388aec(0x1ba)),M=require(_0x388aec(0x1a8)),w=require(_0x388aec(0x19c)),P=require(_0x388aec(0x197)),U=_0x388aec(0x148);var I=(_0x2c4b32=>(_0x2c4b32[_0x2c4b32['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2c4b32[_0x2c4b32[_0x388aec(0x147)]=0x1]=_0x388aec(0x147),_0x2c4b32[_0x2c4b32['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2c4b32))(I||{}),v=(_0x4ca27f=>(_0x4ca27f[_0x4ca27f['Unknown']=0x0]='Unknown',_0x4ca27f[_0x4ca27f[_0x388aec(0x161)]=0x1]='Add',_0x4ca27f[_0x4ca27f[_0x388aec(0x1b6)]=0x2]=_0x388aec(0x1b6),_0x4ca27f[_0x4ca27f[_0x388aec(0x1af)]=0x3]=_0x388aec(0x1af),_0x4ca27f[_0x4ca27f[_0x388aec(0x184)]=0x4]=_0x388aec(0x184),_0x4ca27f[_0x4ca27f[_0x388aec(0x189)]=0x5]=_0x388aec(0x189),_0x4ca27f[_0x4ca27f[_0x388aec(0x1b9)]=-0x1]=_0x388aec(0x1b9),_0x4ca27f))(v||{});const f=_0x1304ca=>c['dayjs'](new Date(+_0x1304ca))[_0x388aec(0x13f)](_0x388aec(0x158)),R=async(_0x6d2d23,_0x4975cb)=>{const _0x59bbad=_0x388aec,_0x228f75=_0x6d2d23[_0x59bbad(0x1aa)](c[_0x59bbad(0x178)]),_0xac6127=_0x6d2d23['get'](P[_0x59bbad(0x1b5)]);_0x4975cb[_0x59bbad(0x14a)](_0x449dcd=>{const _0x291c08=_0x59bbad;_0x228f75[_0x291c08(0x195)](_0x449dcd)&&_0x4975cb[_0x291c08(0x171)](_0x449dcd);}),_0x4975cb[_0x59bbad(0x18d)]&&(await _0xac6127[_0x59bbad(0x1aa)](_0x59bbad(0x16b),{'params':{'userIDs':[..._0x4975cb]}}))[_0x59bbad(0x192)][_0x59bbad(0x196)]['forEach'](_0x444b4a=>{const _0x281ee4=_0x59bbad;_0x444b4a&&_0x228f75[_0x281ee4(0x19f)](_0x444b4a);});};var $=Object[_0x388aec(0x1a5)],E=(_0x45c239,_0x4d1bc3,_0x552aad,_0x2b0cf8)=>{const _0x4fea2c=_0x388aec;for(var _0x296acf=_0x2b0cf8>0x1?void 0x0:_0x2b0cf8?$(_0x4d1bc3,_0x552aad):_0x4d1bc3,_0x357276=_0x45c239[_0x4fea2c(0x19a)]-0x1,_0x41befa;_0x357276>=0x0;_0x357276--)(_0x41befa=_0x45c239[_0x357276])&&(_0x296acf=_0x41befa(_0x296acf)||_0x296acf);return _0x296acf;},S=(_0x39d99a,_0x27ff11)=>(_0x2bd6ac,_0x4f51e1)=>_0x27ff11(_0x2bd6ac,_0x4f51e1,_0x39d99a);let p=class extends c[_0x388aec(0x154)]{constructor(_0x4a49bc,_0x3f72fc,_0x379876,_0x20a011){const _0x443840=_0x388aec;super(),this[_0x443840(0x198)]=_0x4a49bc,this[_0x443840(0x13c)]=_0x3f72fc,this[_0x443840(0x15d)]=_0x379876,this['_injector']=_0x20a011,this[_0x443840(0x1b1)](),this[_0x443840(0x19b)]();}[_0x388aec(0x19b)](){const _0x5ab1ed=_0x388aec;this[_0x5ab1ed(0x185)](this[_0x5ab1ed(0x13c)][_0x5ab1ed(0x146)][_0x5ab1ed(0x155)](w[_0x5ab1ed(0x165)](0x10))[_0x5ab1ed(0x14b)](_0x6ce85d=>{const _0x5cd3dc=new Set();_0x6ce85d['forEach'](_0x3c0804=>{const _0x233ca4=_0x3e84;switch(_0x3c0804['type']){case _0x233ca4(0x169):{const _0x987780=_0x3c0804[_0x233ca4(0x160)][_0x233ca4(0x15a)];_0x5cd3dc[_0x233ca4(0x169)](_0x987780);break;}}}),R(this['_injector'],_0x5cd3dc);}));}[_0x388aec(0x1b1)](){const _0x166ab1=_0x388aec;this['disposeWithMe'](this[_0x166ab1(0x198)][_0x166ab1(0x146)][_0x166ab1(0x14b)](async _0x50df74=>{const _0x493a1e=_0x166ab1;var _0x58e99d,_0x4501e7,_0x332815,_0x5de7a2;const _0x36d99b=(_0x58e99d=this['_threadCommentModel']['getUnit'](_0x50df74[_0x493a1e(0x18c)])['find'](_0x2c4aa6=>_0x2c4aa6['threadId']===_0x50df74['threadId']))==null?void 0x0:_0x58e99d['root'];if(!_0x36d99b)return;const {unitId:_0x32b90d,subUnitId:_0x59e12f}=_0x36d99b;switch(_0x50df74[_0x493a1e(0x1a1)]&&this[_0x493a1e(0x15d)][_0x493a1e(0x19f)](_0x50df74[_0x493a1e(0x1a1)]),_0x50df74['type']){case v[_0x493a1e(0x161)]:break;case v['Reply']:{this[_0x493a1e(0x13c)][_0x493a1e(0x164)](_0x32b90d,_0x59e12f,{'unitId':_0x32b90d,'subUnitId':_0x59e12f,'ref':'','id':_0x50df74[_0x493a1e(0x139)],'dT':f(+_0x50df74[_0x493a1e(0x17f)]),'threadId':_0x50df74[_0x493a1e(0x162)],'personId':(_0x332815=(_0x4501e7=_0x50df74[_0x493a1e(0x1a1)])==null?void 0x0:_0x4501e7[_0x493a1e(0x17c)])!=null?_0x332815:_0x50df74[_0x493a1e(0x1b0)],'text':JSON[_0x493a1e(0x14e)](_0x50df74[_0x493a1e(0x149)]),'parentId':_0x36d99b['id']});break;}case v['Delete']:{const _0x116e87=this[_0x493a1e(0x13c)][_0x493a1e(0x18b)](_0x32b90d,_0x59e12f,_0x50df74[_0x493a1e(0x139)]);_0x116e87&&_0x116e87['parentId']&&this[_0x493a1e(0x13c)]['deleteComment'](_0x32b90d,_0x59e12f,_0x50df74[_0x493a1e(0x139)]);break;}case v['Edit']:{this[_0x493a1e(0x13c)]['updateComment'](_0x32b90d,_0x59e12f,{'commentId':_0x50df74[_0x493a1e(0x139)],'text':JSON[_0x493a1e(0x14e)](_0x50df74[_0x493a1e(0x149)])});break;}case v[_0x493a1e(0x189)]:{const _0x435044=(_0x5de7a2=this[_0x493a1e(0x13c)][_0x493a1e(0x186)](_0x50df74['unitId'])['find'](_0x45b6f9=>_0x45b6f9[_0x493a1e(0x162)]===_0x50df74[_0x493a1e(0x162)]))==null?void 0x0:_0x5de7a2['root'];_0x435044&&this[_0x493a1e(0x13c)][_0x493a1e(0x1a3)](_0x32b90d,_0x59e12f,_0x435044['id'],_0x50df74['solved']===I[_0x493a1e(0x147)]);break;}}}));}};p=E([S(0x0,c[_0x388aec(0x19e)](b[_0x388aec(0x166)])),S(0x1,c[_0x388aec(0x19e)](M['ThreadCommentModel'])),S(0x2,c[_0x388aec(0x19e)](c[_0x388aec(0x178)])),S(0x3,c[_0x388aec(0x19e)](c[_0x388aec(0x140)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x388aec(0x1a5)],x=(_0x15f0d5,_0xa98014,_0x330a1b,_0x7445e)=>{for(var _0x18e188=_0x7445e>0x1?void 0x0:_0x7445e?A(_0xa98014,_0x330a1b):_0xa98014,_0x91e0ce=_0x15f0d5['length']-0x1,_0x15465d;_0x91e0ce>=0x0;_0x91e0ce--)(_0x15465d=_0x15f0d5[_0x91e0ce])&&(_0x18e188=_0x15465d(_0x18e188)||_0x18e188);return _0x18e188;},_=(_0x577213,_0x406217)=>(_0x2806c2,_0x11106b)=>_0x406217(_0x2806c2,_0x11106b,_0x577213);function Y(_0x364dcf,_0xac98c){const _0x1e3fb9=_0x388aec,_0x8d5554=_0x364dcf['replies'][0x0];return{..._0xac98c,'id':_0x8d5554[_0x1e3fb9(0x139)],'resolved':_0x364dcf[_0x1e3fb9(0x1a7)]===0x1,'dT':f(_0x8d5554['createTimestamp']),'personId':_0x8d5554['userId'],'threadId':_0x8d5554[_0x1e3fb9(0x162)]};}function G(_0x1b908d,_0x5c674b,_0x3691c8){const _0x2c94cb=_0x388aec;var _0x1c6cb4,_0x2b9a82;if(((_0x2b9a82=(_0x1c6cb4=_0x1b908d==null?void 0x0:_0x1b908d[_0x2c94cb(0x179)])==null?void 0x0:_0x1c6cb4[_0x2c94cb(0x19a)])!=null?_0x2b9a82:0x0)>0x0){const _0x1253a4=(_0x161ad1,_0x518e59)=>({'id':_0x161ad1['replyId'],'threadId':_0x161ad1[_0x2c94cb(0x162)],'dT':f(_0x161ad1[_0x2c94cb(0x17f)]),'personId':_0x161ad1[_0x2c94cb(0x1b0)],'resolved':_0x1b908d[_0x2c94cb(0x1a7)]===I[_0x2c94cb(0x147)],'unitId':_0x5c674b,'subUnitId':_0x3691c8,'text':JSON['parse'](_0x161ad1['content']),'parentId':_0x518e59}),_0x1ded71=_0x1253a4(_0x1b908d[_0x2c94cb(0x179)][0x0]);return{..._0x1ded71,'children':_0x1b908d[_0x2c94cb(0x179)]['slice'](0x1)[_0x2c94cb(0x188)](_0x35885e=>_0x1253a4(_0x35885e,_0x1ded71['id']))};}return null;}let g=class{constructor(_0xdf16f2,_0x255c3a,_0x571b01,_0x360c31){const _0x289c55=_0x388aec;this[_0x289c55(0x14c)]=_0xdf16f2,this['_userService']=_0x255c3a,this['_sessionService']=_0x571b01,this[_0x289c55(0x167)]=_0x360c31;}async[_0x388aec(0x164)](_0x177223){const _0x47e2a4=_0x388aec;var _0x4e2d54,_0x594c1b;const {parentId:_0xe0661d,unitId:_0x313229,text:_0x2b6deb,threadId:_0x22fdfc}=_0x177223,_0x1a4f6b=(_0x594c1b=(_0x4e2d54=_0x2b6deb[_0x47e2a4(0x1a0)])==null?void 0x0:_0x4e2d54[_0x47e2a4(0x15b)](_0x37e032=>_0x37e032[_0x47e2a4(0x181)]===c[_0x47e2a4(0x1a2)][_0x47e2a4(0x177)])[_0x47e2a4(0x188)](_0x4fd371=>_0x4fd371[_0x47e2a4(0x13b)]))!=null?_0x594c1b:[],_0x3e232b=JSON['stringify'](_0x2b6deb),_0x5c1d73=(await this[_0x47e2a4(0x156)][_0x47e2a4(0x13a)](_0x313229))[_0x47e2a4(0x174)]();if(_0xe0661d){const _0x1cb3bf={'memberId':_0x5c1d73,'unitId':_0x313229,'content':_0x3e232b,'mention':_0x1a4f6b,'threadId':_0x22fdfc},_0x21a3e0=(await this[_0x47e2a4(0x14c)][_0x47e2a4(0x1ac)](_0x47e2a4(0x14d)+_0x313229+_0x47e2a4(0x176),{'body':_0x1cb3bf}))[_0x47e2a4(0x192)][_0x47e2a4(0x18e)];return{..._0x177223,'id':_0x21a3e0['replyId'],'dT':c[_0x47e2a4(0x17d)](+_0x21a3e0[_0x47e2a4(0x17f)])[_0x47e2a4(0x13f)](_0x47e2a4(0x158)),'personId':_0x21a3e0[_0x47e2a4(0x1b0)]};}else{const _0x2f3a43={'memberId':_0x5c1d73,'unitId':_0x313229,'content':_0x3e232b,'mention':_0x1a4f6b},_0x1a8799=await this[_0x47e2a4(0x14c)][_0x47e2a4(0x1ac)](_0x47e2a4(0x14d)+_0x313229+_0x47e2a4(0x18f),{'body':_0x2f3a43});return Y(_0x1a8799[_0x47e2a4(0x192)][_0x47e2a4(0x191)],_0x177223);}}async[_0x388aec(0x183)](_0x25e8e1){const _0x303779=_0x388aec;var _0x531808,_0x516959;const {text:_0x1d39c5,unitId:_0x2ed02f}=_0x25e8e1,_0x475977=(_0x516959=(_0x531808=_0x1d39c5[_0x303779(0x1a0)])==null?void 0x0:_0x531808[_0x303779(0x15b)](_0x1da517=>_0x1da517[_0x303779(0x181)]===c['CustomRangeType'][_0x303779(0x177)])['map'](_0x3a5696=>_0x3a5696[_0x303779(0x13b)]))!=null?_0x516959:[],_0x32f77b=JSON[_0x303779(0x143)](_0x1d39c5),_0x45759e=_0x25e8e1['threadId'],_0xcf2024=_0x25e8e1['id'],_0x3caad5={'memberId':(await this[_0x303779(0x156)]['requireSession'](_0x2ed02f))['getMemberID'](),'unitId':_0x2ed02f,'threadId':_0x45759e,'mention':_0x475977,'content':_0x32f77b,'replyId':_0xcf2024},_0x139ed6=await this[_0x303779(0x14c)][_0x303779(0x1ac)](_0x303779(0x14d)+_0x2ed02f+_0x303779(0x1a6),{'body':_0x3caad5});return!_0x139ed6['body'][_0x303779(0x180)]||_0x139ed6[_0x303779(0x192)][_0x303779(0x180)]['code']===0x1;}async['resolveComment'](_0x2a4bcc){const _0x20b2f9=_0x388aec,{unitId:_0x54b38d}=_0x2a4bcc,_0xe27a7f=_0x2a4bcc[_0x20b2f9(0x162)],_0x343ff9={'memberId':this[_0x20b2f9(0x15d)][_0x20b2f9(0x199)]()[_0x20b2f9(0x17c)],'unitId':_0x54b38d,'threadId':_0xe27a7f,'solved':_0x2a4bcc['resolved']?I[_0x20b2f9(0x147)]:I[_0x20b2f9(0x144)]},_0x553be5=await this[_0x20b2f9(0x14c)][_0x20b2f9(0x1ac)](_0x20b2f9(0x14d)+_0x54b38d+_0x20b2f9(0x150),{'body':_0x343ff9});return!_0x553be5[_0x20b2f9(0x192)]['error']||_0x553be5[_0x20b2f9(0x192)][_0x20b2f9(0x180)][_0x20b2f9(0x1a4)]===0x1;}async[_0x388aec(0x1b7)](_0x448da8,_0x3ae590,_0x58d5e0,_0x22cf6d){const _0xab9d4=_0x388aec,_0x5bb21d={'memberId':(await this['_sessionService'][_0xab9d4(0x13a)](_0x448da8))[_0xab9d4(0x174)](),'threadId':_0x58d5e0,'replyId':_0x22cf6d,'unitId':_0x448da8},_0x4c26f6=await this[_0xab9d4(0x14c)][_0xab9d4(0x1ac)]('/universer-api/comment/unit/'+_0x448da8+_0xab9d4(0x19d),{'body':_0x5bb21d});return!_0x4c26f6[_0xab9d4(0x192)][_0xab9d4(0x180)]||_0x4c26f6['body']['error'][_0xab9d4(0x1a4)]===0x1;}async[_0x388aec(0x163)](_0x46f7c0,_0x344489,_0x55e2a8){const _0x35a058=_0x388aec,_0x5c768b={'unitId':_0x46f7c0,'threadId':_0x55e2a8},_0x130548=await this[_0x35a058(0x14c)][_0x35a058(0x1ac)](_0x35a058(0x14d)+_0x46f7c0+_0x35a058(0x15c),{'body':_0x5c768b}),_0x202daa=_0x55e2a8[_0x35a058(0x188)](_0x271d68=>G(_0x130548[_0x35a058(0x192)][_0x35a058(0x1b2)][_0x271d68],_0x46f7c0,_0x344489))[_0x35a058(0x15b)](Boolean);return Object[_0x35a058(0x152)](_0x130548[_0x35a058(0x192)][_0x35a058(0x196)])[_0x35a058(0x14a)](_0x4154dd=>{const _0x21d795=_0x35a058;this[_0x21d795(0x15d)][_0x21d795(0x19f)](_0x4154dd);}),_0x202daa;}[_0x388aec(0x16c)](_0x1a4427){const _0x3ec65a=_0x388aec;return{'id':_0x1a4427['id'],'threadId':_0x1a4427[_0x3ec65a(0x162)],'ref':_0x1a4427[_0x3ec65a(0x13d)]};}};g=x([_(0x0,c[_0x388aec(0x19e)](P[_0x388aec(0x1b5)])),_(0x1,c['Inject'](c[_0x388aec(0x178)])),_(0x2,c[_0x388aec(0x19e)](b[_0x388aec(0x151)])),_(0x3,c[_0x388aec(0x19e)](c[_0x388aec(0x140)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x2dc94,_0x332e0f,_0x16d2f2,_0x2efc6d)=>{const _0x527549=_0x388aec;for(var _0x20910a=_0x2efc6d>0x1?void 0x0:_0x2efc6d?H(_0x332e0f,_0x16d2f2):_0x332e0f,_0x38af90=_0x2dc94[_0x527549(0x19a)]-0x1,_0x350a82;_0x38af90>=0x0;_0x38af90--)(_0x350a82=_0x2dc94[_0x38af90])&&(_0x20910a=_0x350a82(_0x20910a)||_0x20910a);return _0x20910a;},y=(_0x1657a3,_0xc2c48)=>(_0x14ce5a,_0x529eae)=>_0xc2c48(_0x14ce5a,_0x529eae,_0x1657a3);let C=class extends c[_0x388aec(0x154)]{constructor(_0x18cf72,_0x41d77c){const _0x4bab1c=_0x388aec;super(),this[_0x4bab1c(0x15f)]=_0x18cf72,this['_threadCommentDataSource']=_0x41d77c,this[_0x4bab1c(0x14f)]();}[_0x388aec(0x14f)](){const _0x3c7a9c=_0x388aec;this[_0x3c7a9c(0x15f)]['dataSource']=this[_0x3c7a9c(0x190)],this['_threadCommentDataSourceService'][_0x3c7a9c(0x142)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x388aec(0x19e)](g))],C);function _0x3e84(_0x27c014,_0xabae98){const _0x528560=_0x5285();return _0x3e84=function(_0x3e8419,_0x28626f){_0x3e8419=_0x3e8419-0x139;let _0x57b0af=_0x528560[_0x3e8419];return _0x57b0af;},_0x3e84(_0x27c014,_0xabae98);}var F=Object[_0x388aec(0x173)],L=Object['getOwnPropertyDescriptor'],Z=(_0xe2d6c0,_0x5b07f8,_0x47402b)=>_0x5b07f8 in _0xe2d6c0?F(_0xe2d6c0,_0x5b07f8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x47402b}):_0xe2d6c0[_0x5b07f8]=_0x47402b,W=(_0x184848,_0x2b6ec5,_0x2aa825,_0x189e97)=>{const _0x9c65aa=_0x388aec;for(var _0x3ba2bc=_0x189e97>0x1?void 0x0:_0x189e97?L(_0x2b6ec5,_0x2aa825):_0x2b6ec5,_0x119a9e=_0x184848[_0x9c65aa(0x19a)]-0x1,_0xf7c1f4;_0x119a9e>=0x0;_0x119a9e--)(_0xf7c1f4=_0x184848[_0x119a9e])&&(_0x3ba2bc=_0xf7c1f4(_0x3ba2bc)||_0x3ba2bc);return _0x3ba2bc;},O=(_0x4457ad,_0x1238fc)=>(_0x2b59b5,_0x4bbc93)=>_0x1238fc(_0x2b59b5,_0x4bbc93,_0x4457ad),N=(_0x543204,_0xa8f29e,_0x2441d7)=>Z(_0x543204,typeof _0xa8f29e!='symbol'?_0xa8f29e+'':_0xa8f29e,_0x2441d7);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x388aec(0x17a)]{constructor(_0x320a9d=D,_0x4b8996,_0x54c16e){const _0x564e6f=_0x388aec;super(),this[_0x564e6f(0x145)]=_0x320a9d,this[_0x564e6f(0x167)]=_0x4b8996,this[_0x564e6f(0x1b4)]=_0x54c16e;const {..._0x45e990}=c[_0x564e6f(0x170)]({},D,this[_0x564e6f(0x145)]);this['_configService'][_0x564e6f(0x187)](q,_0x45e990);}[_0x388aec(0x175)](){const _0x58bb66=_0x388aec;[[g],[C],[p]][_0x58bb66(0x14a)](_0x29fa9a=>{const _0x3110a1=_0x58bb66;this[_0x3110a1(0x167)][_0x3110a1(0x169)](_0x29fa9a);});}['onReady'](){const _0x581769=_0x388aec;this['_injector'][_0x581769(0x1aa)](C),this['_injector'][_0x581769(0x1aa)](p);}},N(exports[_0x388aec(0x17e)],_0x388aec(0x1ab),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x388aec(0x16d),c[_0x388aec(0x1ae)][_0x388aec(0x141)]),exports[_0x388aec(0x17e)]=W([c[_0x388aec(0x159)](j[_0x388aec(0x1b8)],b[_0x388aec(0x153)],T[_0x388aec(0x157)]),O(0x1,c[_0x388aec(0x19e)](c[_0x388aec(0x140)])),O(0x2,c[_0x388aec(0x182)])],exports[_0x388aec(0x17e)]);function _0x5285(){const _0xf51d3b=['/universer-api/comment/unit/','parse','_initDataSource','/solved','CollaborationSessionService','values','UniverCollaborationClientPlugin','Disposable','pipe','_sessionService','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','DependentOn','personId','filter','/list','_userService','90609cmEZJJ','_threadCommentDataSourceService','payload','Add','threadId','listComments','addComment','bufferTime','CommentService','_injector','3459830MxzWTJ','add','toStringTag','/universer-api/user/list','saveCommentToSnapshot','type','23036040iYmMvN','370870lzkGOK','merge','delete','@univerjs-pro/collaboration-client','defineProperty','getMemberID','onStarting','/reply','COMMENT','UserManagerService','replies','Plugin','657lYabUm','userID','dayjs','UniverThreadCommentDataSourcePlugin','createTimestamp','error','rangeType','IConfigService','updateComment','Delete','disposeWithMe','getUnit','setConfig','map','Solve','4770157jpmtdy','getComment','unitId','size','reply','/add','_threadCommentDataSource','comment','body','156ypxfIq','675564DxHhIS','getUser','users','@univerjs/network','_commentService','getCurrentUser','length','_initUserSync','rxjs','/delete','Inject','addUser','customRanges','user','CustomRangeType','resolveComment','code','getOwnPropertyDescriptor','/edit','solved','@univerjs/thread-comment','186488YsNpcE','get','pluginName','post','@univerjs/core','UniverInstanceType','Edit','userId','_init','comments','9YebXve','_configService','HTTPService','Reply','deleteComment','UniverThreadCommentUIPlugin','UNRECOGNIZED','@univerjs/thread-comment-ui','replyId','requireSession','rangeId','_threadCommentModel','ref','Module','format','Injector','UNIVER_UNKNOWN','syncUpdateMutationToColla','stringify','OpenOrReOpen','_config','commentUpdate$','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','forEach','subscribe','_httpService'];_0x5285=function(){return _0xf51d3b;};return _0x5285();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x88c252=_0x54f6;(function(_0x325260,_0x22d3f1){const _0x4996fb=_0x54f6,_0x2e4316=_0x325260();while(!![]){try{const _0x3be9ae=-parseInt(_0x4996fb(0xd7))/0x1+parseInt(_0x4996fb(0x9d))/0x2+parseInt(_0x4996fb(0xd0))/0x3+parseInt(_0x4996fb(0xe1))/0x4+-parseInt(_0x4996fb(0xdc))/0x5+-parseInt(_0x4996fb(0xac))/0x6*(-parseInt(_0x4996fb(0xa4))/0x7)+parseInt(_0x4996fb(0xb9))/0x8*(-parseInt(_0x4996fb(0xd4))/0x9);if(_0x3be9ae===_0x22d3f1)break;else _0x2e4316['push'](_0x2e4316['shift']());}catch(_0x37d5ba){_0x2e4316['push'](_0x2e4316['shift']());}}}(_0x38dc,0xee8e5));import{CommentService as _0x29a1f1,CollaborationSessionService as _0x2b9727,UniverCollaborationClientPlugin as _0x2f5b82}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x802055}from'@univerjs-pro/license';import{dayjs as _0x587e27,UserManagerService as _0x1d01f8,Inject as _0xff23a0,Injector as _0x145b8a,Disposable as _0x28cf76,CustomRangeType as _0x1c7e16,UniverInstanceType as _0x82bea5,DependentOn as _0x5e7b4e,IConfigService as _0x5904ab,Plugin as _0x249cfc,merge as _0x19b49a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ccc86}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f14f7,IThreadCommentDataSourceService as _0x22d45b}from'@univerjs/thread-comment';import{bufferTime as _0x4a89db}from'rxjs';import{HTTPService as _0x87bad4}from'@univerjs/network';const W=_0x88c252(0xe0);var I=(_0x3ff0bc=>(_0x3ff0bc[_0x3ff0bc[_0x88c252(0xbe)]=0x0]='OpenOrReOpen',_0x3ff0bc[_0x3ff0bc[_0x88c252(0xc4)]=0x1]=_0x88c252(0xc4),_0x3ff0bc[_0x3ff0bc['UNRECOGNIZED']=-0x1]=_0x88c252(0xc7),_0x3ff0bc))(I||{}),v=(_0x2c9027=>(_0x2c9027[_0x2c9027[_0x88c252(0xd2)]=0x0]='Unknown',_0x2c9027[_0x2c9027[_0x88c252(0xe3)]=0x1]=_0x88c252(0xe3),_0x2c9027[_0x2c9027[_0x88c252(0xc8)]=0x2]=_0x88c252(0xc8),_0x2c9027[_0x2c9027[_0x88c252(0xe4)]=0x3]=_0x88c252(0xe4),_0x2c9027[_0x2c9027[_0x88c252(0xd5)]=0x4]=_0x88c252(0xd5),_0x2c9027[_0x2c9027[_0x88c252(0x9c)]=0x5]=_0x88c252(0x9c),_0x2c9027[_0x2c9027[_0x88c252(0xc7)]=-0x1]=_0x88c252(0xc7),_0x2c9027))(v||{});const D=_0x5351ca=>_0x587e27(new Date(+_0x5351ca))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x5a5049,_0x113ab9)=>{const _0x18d92b=_0x88c252,_0x410e72=_0x5a5049['get'](_0x1d01f8),_0x3bab84=_0x5a5049[_0x18d92b(0xe5)](_0x87bad4);_0x113ab9[_0x18d92b(0x93)](_0x2fcdf9=>{const _0x377f91=_0x18d92b;_0x410e72[_0x377f91(0x99)](_0x2fcdf9)&&_0x113ab9[_0x377f91(0xca)](_0x2fcdf9);}),_0x113ab9[_0x18d92b(0xdd)]&&(await _0x3bab84[_0x18d92b(0xe5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x113ab9]}}))['body'][_0x18d92b(0xd8)][_0x18d92b(0x93)](_0xfacd6e=>{const _0xf1e9c=_0x18d92b;_0xfacd6e&&_0x410e72[_0xf1e9c(0xd9)](_0xfacd6e);});};var K=Object[_0x88c252(0xbd)],V=(_0x43cc44,_0x1daacc,_0x1d64d9,_0x44907e)=>{for(var _0x5cbf24=_0x44907e>0x1?void 0x0:_0x44907e?K(_0x1daacc,_0x1d64d9):_0x1daacc,_0x2c4e60=_0x43cc44['length']-0x1,_0x54b9fd;_0x2c4e60>=0x0;_0x2c4e60--)(_0x54b9fd=_0x43cc44[_0x2c4e60])&&(_0x5cbf24=_0x54b9fd(_0x5cbf24)||_0x5cbf24);return _0x5cbf24;},p=(_0x41f21f,_0x1aa085)=>(_0x401d9f,_0x1b4f82)=>_0x1aa085(_0x401d9f,_0x1b4f82,_0x41f21f);function _0x54f6(_0x2fb803,_0x54fd3c){const _0x38dc9d=_0x38dc();return _0x54f6=function(_0x54f66b,_0x425ca8){_0x54f66b=_0x54f66b-0x8a;let _0x5dc8aa=_0x38dc9d[_0x54f66b];return _0x5dc8aa;},_0x54f6(_0x2fb803,_0x54fd3c);}let S=class extends _0x28cf76{constructor(_0x4ac549,_0x1b9672,_0x4dfebe,_0x161a4f){const _0x2a4ead=_0x88c252;super(),this[_0x2a4ead(0xaf)]=_0x4ac549,this['_threadCommentModel']=_0x1b9672,this[_0x2a4ead(0x9a)]=_0x4dfebe,this[_0x2a4ead(0xce)]=_0x161a4f,this[_0x2a4ead(0xbb)](),this['_initUserSync']();}['_initUserSync'](){const _0x1446ae=_0x88c252;this[_0x1446ae(0xc6)](this[_0x1446ae(0xb7)][_0x1446ae(0x95)][_0x1446ae(0xa7)](_0x4a89db(0x10))[_0x1446ae(0x92)](_0x5a81c5=>{const _0x3bf988=_0x1446ae,_0x1722be=new Set();_0x5a81c5[_0x3bf988(0x93)](_0x560be3=>{const _0x27de50=_0x3bf988;switch(_0x560be3[_0x27de50(0xc9)]){case _0x27de50(0xda):{const _0x3e5161=_0x560be3[_0x27de50(0x90)]['personId'];_0x1722be[_0x27de50(0xda)](_0x3e5161);break;}}}),B(this[_0x3bf988(0xce)],_0x1722be);}));}[_0x88c252(0xbb)](){const _0x2b1959=_0x88c252;this[_0x2b1959(0xc6)](this['_commentService']['commentUpdate$'][_0x2b1959(0x92)](async _0x3fd97f=>{const _0x54ac12=_0x2b1959;var _0x394602,_0x32fa22,_0x302bb0,_0x4d800d;const _0x2847ce=(_0x394602=this[_0x54ac12(0xb7)][_0x54ac12(0x9f)](_0x3fd97f['unitId'])[_0x54ac12(0x97)](_0x453d1e=>_0x453d1e[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x394602[_0x54ac12(0xc3)];if(!_0x2847ce)return;const {unitId:_0x2a4d18,subUnitId:_0x1558cd}=_0x2847ce;switch(_0x3fd97f[_0x54ac12(0x98)]&&this[_0x54ac12(0x9a)]['addUser'](_0x3fd97f['user']),_0x3fd97f[_0x54ac12(0xc9)]){case v[_0x54ac12(0xe3)]:break;case v[_0x54ac12(0xc8)]:{this['_threadCommentModel'][_0x54ac12(0xe2)](_0x2a4d18,_0x1558cd,{'unitId':_0x2a4d18,'subUnitId':_0x1558cd,'ref':'','id':_0x3fd97f[_0x54ac12(0xa5)],'dT':D(+_0x3fd97f[_0x54ac12(0xea)]),'threadId':_0x3fd97f[_0x54ac12(0xc2)],'personId':(_0x302bb0=(_0x32fa22=_0x3fd97f[_0x54ac12(0x98)])==null?void 0x0:_0x32fa22[_0x54ac12(0xaa)])!=null?_0x302bb0:_0x3fd97f[_0x54ac12(0xa0)],'text':JSON[_0x54ac12(0x94)](_0x3fd97f[_0x54ac12(0xdf)]),'parentId':_0x2847ce['id']});break;}case v[_0x54ac12(0xd5)]:{const _0x35af6a=this[_0x54ac12(0xb7)][_0x54ac12(0x96)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);_0x35af6a&&_0x35af6a['parentId']&&this[_0x54ac12(0xb7)][_0x54ac12(0xd6)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);break;}case v[_0x54ac12(0xe4)]:{this[_0x54ac12(0xb7)][_0x54ac12(0xcc)](_0x2a4d18,_0x1558cd,{'commentId':_0x3fd97f[_0x54ac12(0xa5)],'text':JSON['parse'](_0x3fd97f['content'])});break;}case v['Solve']:{const _0x33e13b=(_0x4d800d=this['_threadCommentModel'][_0x54ac12(0x9f)](_0x3fd97f[_0x54ac12(0xc5)])['find'](_0x2f6279=>_0x2f6279[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x4d800d[_0x54ac12(0xc3)];_0x33e13b&&this[_0x54ac12(0xb7)][_0x54ac12(0xcb)](_0x2a4d18,_0x1558cd,_0x33e13b['id'],_0x3fd97f[_0x54ac12(0xe6)]===I[_0x54ac12(0xc4)]);break;}}}));}};function _0x38dc(){const _0x1497dc=['map','resolved','_threadCommentModel','onReady','4280rYRgNZ','stringify','_init','ref','getOwnPropertyDescriptor','OpenOrReOpen','COMMENT','body','thread-comment-data-source.config','threadId','root','Solved','unitId','disposeWithMe','UNRECOGNIZED','Reply','type','delete','resolveComment','updateComment','setConfig','_injector','_sessionService','478704LOxVnW','/delete','Unknown','filter','28287nYFRzo','Delete','deleteComment','144137sVfIJx','users','addUser','add','code','7758860qoYhmv','size','error','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2891564dbgNrJ','addComment','Add','Edit','get','solved','syncUpdateMutationToColla','comment','_config','createTimestamp','_initDataSource','getMemberID','slice','getCurrentUser','dataSource','YYYY/MM/DD\x20HH:mm','comments','UNIVER_UNKNOWN','onStarting','values','payload','_threadCommentDataSource','subscribe','forEach','parse','commentUpdate$','getComment','find','user','getUser','_userService','saveCommentToSnapshot','Solve','3589474OGcnEb','symbol','getUnit','userId','_threadCommentDataSourceService','rangeType','reply','7sOBqfV','replyId','_httpService','pipe','/reply','post','userID','/add','10064058jrZtWT','/edit','rangeId','_commentService','_configService','replies','length','requireSession','/universer-api/comment/unit/'];_0x38dc=function(){return _0x1497dc;};return _0x38dc();}S=V([p(0x0,_0xff23a0(_0x29a1f1)),p(0x1,_0xff23a0(_0x3f14f7)),p(0x2,_0xff23a0(_0x1d01f8)),p(0x3,_0xff23a0(_0x145b8a))],S);const z=_0x88c252(0xc1),M={};var k=Object[_0x88c252(0xbd)],Q=(_0x51dfe7,_0x952733,_0x484844,_0xee3faf)=>{for(var _0xbfdf47=_0xee3faf>0x1?void 0x0:_0xee3faf?k(_0x952733,_0x484844):_0x952733,_0x24e4e6=_0x51dfe7['length']-0x1,_0x50321d;_0x24e4e6>=0x0;_0x24e4e6--)(_0x50321d=_0x51dfe7[_0x24e4e6])&&(_0xbfdf47=_0x50321d(_0xbfdf47)||_0xbfdf47);return _0xbfdf47;},_=(_0x46bdd9,_0x57b415)=>(_0x504c69,_0x340846)=>_0x57b415(_0x504c69,_0x340846,_0x46bdd9);function X(_0x4badcb,_0x171569){const _0x62407a=_0x88c252,_0x17d726=_0x4badcb[_0x62407a(0xb1)][0x0];return{..._0x171569,'id':_0x17d726[_0x62407a(0xa5)],'resolved':_0x4badcb[_0x62407a(0xe6)]===0x1,'dT':D(_0x17d726['createTimestamp']),'personId':_0x17d726[_0x62407a(0xa0)],'threadId':_0x17d726['threadId']};}function ee(_0x837349,_0x31038c,_0x245dd8){const _0x2b4d30=_0x88c252;var _0x4f0e35,_0x340f51;if(((_0x340f51=(_0x4f0e35=_0x837349==null?void 0x0:_0x837349['replies'])==null?void 0x0:_0x4f0e35['length'])!=null?_0x340f51:0x0)>0x0){const _0x270fe0=(_0x53a033,_0x196b21)=>({'id':_0x53a033[_0x2b4d30(0xa5)],'threadId':_0x53a033['threadId'],'dT':D(_0x53a033[_0x2b4d30(0xea)]),'personId':_0x53a033[_0x2b4d30(0xa0)],'resolved':_0x837349[_0x2b4d30(0xe6)]===I[_0x2b4d30(0xc4)],'unitId':_0x31038c,'subUnitId':_0x245dd8,'text':JSON[_0x2b4d30(0x94)](_0x53a033[_0x2b4d30(0xdf)]),'parentId':_0x196b21}),_0x435625=_0x270fe0(_0x837349['replies'][0x0]);return{..._0x435625,'children':_0x837349[_0x2b4d30(0xb1)][_0x2b4d30(0xed)](0x1)[_0x2b4d30(0xb5)](_0x2bb9b4=>_0x270fe0(_0x2bb9b4,_0x435625['id']))};}return null;}let f=class{constructor(_0x15a2e6,_0x30053c,_0x2c4f57,_0x44ea1f){const _0x2b48e0=_0x88c252;this[_0x2b48e0(0xa6)]=_0x15a2e6,this[_0x2b48e0(0x9a)]=_0x30053c,this[_0x2b48e0(0xcf)]=_0x2c4f57,this[_0x2b48e0(0xce)]=_0x44ea1f;}async[_0x88c252(0xe2)](_0x40d71d){const _0x3ec8ec=_0x88c252;var _0x283359,_0x26f4c6;const {parentId:_0x4e8f03,unitId:_0x42a1e0,text:_0x58af55,threadId:_0x22446b}=_0x40d71d,_0x506b5f=(_0x26f4c6=(_0x283359=_0x58af55['customRanges'])==null?void 0x0:_0x283359[_0x3ec8ec(0xd3)](_0x531e3e=>_0x531e3e[_0x3ec8ec(0xa2)]===_0x1c7e16['COMMENT'])[_0x3ec8ec(0xb5)](_0x5a1bb0=>_0x5a1bb0['rangeId']))!=null?_0x26f4c6:[],_0x157d09=JSON[_0x3ec8ec(0xba)](_0x58af55),_0x190663=(await this[_0x3ec8ec(0xcf)][_0x3ec8ec(0xb3)](_0x42a1e0))[_0x3ec8ec(0xec)]();if(_0x4e8f03){const _0x33a9a2={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f,'threadId':_0x22446b},_0x535d5a=(await this['_httpService']['post'](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xa8),{'body':_0x33a9a2}))[_0x3ec8ec(0xc0)][_0x3ec8ec(0xa3)];return{..._0x40d71d,'id':_0x535d5a[_0x3ec8ec(0xa5)],'dT':_0x587e27(+_0x535d5a[_0x3ec8ec(0xea)])['format'](_0x3ec8ec(0x8b)),'personId':_0x535d5a['userId']};}else{const _0x42caf5={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f},_0x3efab2=await this[_0x3ec8ec(0xa6)][_0x3ec8ec(0xa9)](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xab),{'body':_0x42caf5});return X(_0x3efab2['body'][_0x3ec8ec(0xe8)],_0x40d71d);}}async[_0x88c252(0xcc)](_0x36b2df){const _0x47d04e=_0x88c252;var _0xdb6bdd,_0x41507d;const {text:_0x18ce6f,unitId:_0x339cff}=_0x36b2df,_0x1b4c44=(_0x41507d=(_0xdb6bdd=_0x18ce6f['customRanges'])==null?void 0x0:_0xdb6bdd['filter'](_0x1fae81=>_0x1fae81['rangeType']===_0x1c7e16[_0x47d04e(0xbf)])[_0x47d04e(0xb5)](_0x364aa4=>_0x364aa4[_0x47d04e(0xae)]))!=null?_0x41507d:[],_0x2147e8=JSON[_0x47d04e(0xba)](_0x18ce6f),_0x337c9b=_0x36b2df[_0x47d04e(0xc2)],_0x4b8025=_0x36b2df['id'],_0x4d3794={'memberId':(await this[_0x47d04e(0xcf)][_0x47d04e(0xb3)](_0x339cff))['getMemberID'](),'unitId':_0x339cff,'threadId':_0x337c9b,'mention':_0x1b4c44,'content':_0x2147e8,'replyId':_0x4b8025},_0x6e95da=await this[_0x47d04e(0xa6)][_0x47d04e(0xa9)](_0x47d04e(0xb4)+_0x339cff+_0x47d04e(0xad),{'body':_0x4d3794});return!_0x6e95da[_0x47d04e(0xc0)]['error']||_0x6e95da[_0x47d04e(0xc0)][_0x47d04e(0xde)][_0x47d04e(0xdb)]===0x1;}async[_0x88c252(0xcb)](_0x34287f){const _0x2de5f9=_0x88c252,{unitId:_0x247581}=_0x34287f,_0x281e5b=_0x34287f[_0x2de5f9(0xc2)],_0x5f03e3={'memberId':this['_userService'][_0x2de5f9(0xee)]()[_0x2de5f9(0xaa)],'unitId':_0x247581,'threadId':_0x281e5b,'solved':_0x34287f[_0x2de5f9(0xb6)]?I[_0x2de5f9(0xc4)]:I[_0x2de5f9(0xbe)]},_0x3703cd=await this[_0x2de5f9(0xa6)][_0x2de5f9(0xa9)](_0x2de5f9(0xb4)+_0x247581+'/solved',{'body':_0x5f03e3});return!_0x3703cd['body'][_0x2de5f9(0xde)]||_0x3703cd[_0x2de5f9(0xc0)][_0x2de5f9(0xde)][_0x2de5f9(0xdb)]===0x1;}async['deleteComment'](_0x3d5139,_0x300ae0,_0xf11501,_0x415f79){const _0x725b03=_0x88c252,_0x2360ad={'memberId':(await this['_sessionService'][_0x725b03(0xb3)](_0x3d5139))[_0x725b03(0xec)](),'threadId':_0xf11501,'replyId':_0x415f79,'unitId':_0x3d5139},_0x1ef26a=await this[_0x725b03(0xa6)]['post'](_0x725b03(0xb4)+_0x3d5139+_0x725b03(0xd1),{'body':_0x2360ad});return!_0x1ef26a[_0x725b03(0xc0)][_0x725b03(0xde)]||_0x1ef26a['body'][_0x725b03(0xde)][_0x725b03(0xdb)]===0x1;}async['listComments'](_0x1e6eb3,_0x1855e6,_0xf622c3){const _0x11afa4=_0x88c252,_0x7ddee8={'unitId':_0x1e6eb3,'threadId':_0xf622c3},_0x20b549=await this[_0x11afa4(0xa6)][_0x11afa4(0xa9)](_0x11afa4(0xb4)+_0x1e6eb3+'/list',{'body':_0x7ddee8}),_0x4a5e53=_0xf622c3[_0x11afa4(0xb5)](_0x4b6aab=>ee(_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0x8c)][_0x4b6aab],_0x1e6eb3,_0x1855e6))[_0x11afa4(0xd3)](Boolean);return Object[_0x11afa4(0x8f)](_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0xd8)])['forEach'](_0x18c960=>{const _0x2d6b4e=_0x11afa4;this[_0x2d6b4e(0x9a)][_0x2d6b4e(0xd9)](_0x18c960);}),_0x4a5e53;}[_0x88c252(0x9b)](_0x65b017){const _0x55c081=_0x88c252;return{'id':_0x65b017['id'],'threadId':_0x65b017[_0x55c081(0xc2)],'ref':_0x65b017[_0x55c081(0xbc)]};}};f=Q([_(0x0,_0xff23a0(_0x87bad4)),_(0x1,_0xff23a0(_0x1d01f8)),_(0x2,_0xff23a0(_0x2b9727)),_(0x3,_0xff23a0(_0x145b8a))],f);var re=Object[_0x88c252(0xbd)],te=(_0x17df79,_0x3383bc,_0x29dd30,_0x553ff7)=>{for(var _0x5d5828=_0x553ff7>0x1?void 0x0:_0x553ff7?re(_0x3383bc,_0x29dd30):_0x3383bc,_0x8956cb=_0x17df79['length']-0x1,_0xce97e5;_0x8956cb>=0x0;_0x8956cb--)(_0xce97e5=_0x17df79[_0x8956cb])&&(_0x5d5828=_0xce97e5(_0x5d5828)||_0x5d5828);return _0x5d5828;},N=(_0x3773fa,_0x44082f)=>(_0x5387e1,_0x127f81)=>_0x44082f(_0x5387e1,_0x127f81,_0x3773fa);let g=class extends _0x28cf76{constructor(_0x34059b,_0x3c9d3f){const _0x2893a6=_0x88c252;super(),this[_0x2893a6(0xa1)]=_0x34059b,this['_threadCommentDataSource']=_0x3c9d3f,this[_0x2893a6(0xeb)]();}['_initDataSource'](){const _0x54b3d3=_0x88c252;this[_0x54b3d3(0xa1)][_0x54b3d3(0x8a)]=this[_0x54b3d3(0x91)],this[_0x54b3d3(0xa1)][_0x54b3d3(0xe7)]=!0x1;}};g=te([N(0x0,_0x22d45b),N(0x1,_0xff23a0(f))],g);var se=Object['defineProperty'],oe=Object[_0x88c252(0xbd)],ne=(_0x4aa71e,_0x20681a,_0x18f496)=>_0x20681a in _0x4aa71e?se(_0x4aa71e,_0x20681a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18f496}):_0x4aa71e[_0x20681a]=_0x18f496,ie=(_0x5393a4,_0x562271,_0xfe57fe,_0x5910e7)=>{const _0x1f59dd=_0x88c252;for(var _0x100e18=_0x5910e7>0x1?void 0x0:_0x5910e7?oe(_0x562271,_0xfe57fe):_0x562271,_0x2b80c0=_0x5393a4[_0x1f59dd(0xb2)]-0x1,_0x50ea37;_0x2b80c0>=0x0;_0x2b80c0--)(_0x50ea37=_0x5393a4[_0x2b80c0])&&(_0x100e18=_0x50ea37(_0x100e18)||_0x100e18);return _0x100e18;},w=(_0x4a066e,_0x47f1c7)=>(_0x444f1e,_0x15ccb2)=>_0x47f1c7(_0x444f1e,_0x15ccb2,_0x4a066e),$=(_0x189ca4,_0x3a9e49,_0x4640a6)=>ne(_0x189ca4,typeof _0x3a9e49!=_0x88c252(0x9e)?_0x3a9e49+'':_0x3a9e49,_0x4640a6);let b=class extends _0x249cfc{constructor(_0x16602f=M,_0x9a0046,_0x5e5071){const _0x14286e=_0x88c252;super(),this[_0x14286e(0xe9)]=_0x16602f,this[_0x14286e(0xce)]=_0x9a0046,this[_0x14286e(0xb0)]=_0x5e5071;const {..._0x338286}=_0x19b49a({},M,this[_0x14286e(0xe9)]);this[_0x14286e(0xb0)][_0x14286e(0xcd)](z,_0x338286);}[_0x88c252(0x8e)](){[[f],[g],[S]]['forEach'](_0x48068e=>{const _0x1e278a=_0x54f6;this[_0x1e278a(0xce)]['add'](_0x48068e);});}[_0x88c252(0xb8)](){const _0x1d9ad9=_0x88c252;this['_injector'][_0x1d9ad9(0xe5)](g),this[_0x1d9ad9(0xce)][_0x1d9ad9(0xe5)](S);}};$(b,'pluginName',W),$(b,_0x88c252(0xc9),_0x82bea5[_0x88c252(0x8d)]),b=ie([_0x5e7b4e(_0x1ccc86,_0x2f5b82,_0x802055),w(0x1,_0xff23a0(_0x145b8a)),w(0x2,_0x5904ab)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x156056=_0x2456;(function(_0x20a7c2,_0x1d5fc3){const _0x68fe54=_0x2456,_0x40f370=_0x20a7c2();while(!![]){try{const _0x5194d3=parseInt(_0x68fe54(0x141))/0x1+parseInt(_0x68fe54(0x114))/0x2*(parseInt(_0x68fe54(0x157))/0x3)+parseInt(_0x68fe54(0x127))/0x4+-parseInt(_0x68fe54(0x168))/0x5+parseInt(_0x68fe54(0x11f))/0x6*(-parseInt(_0x68fe54(0x136))/0x7)+parseInt(_0x68fe54(0x166))/0x8*(parseInt(_0x68fe54(0x149))/0x9)+parseInt(_0x68fe54(0x116))/0xa;if(_0x5194d3===_0x1d5fc3)break;else _0x40f370['push'](_0x40f370['shift']());}catch(_0x16e1bc){_0x40f370['push'](_0x40f370['shift']());}}}(_0xc8e1,0x3ea1e));import{CommentService as _0x585108,CollaborationSessionService as _0x55d06f,UniverCollaborationClientPlugin as _0x2a0e3c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x576c81}from'@univerjs-pro/license';import{dayjs as _0x29a7b8,UserManagerService as _0x3b7c6a,Inject as _0xa1f4a5,Injector as _0x467e49,Disposable as _0x329f5c,CustomRangeType as _0x364f98,UniverInstanceType as _0x5183dd,DependentOn as _0x12fb17,IConfigService as _0x1abcfa,Plugin as _0x239e11,merge as _0x29ada1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x507370}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28d422,IThreadCommentDataSourceService as _0xa48844}from'@univerjs/thread-comment';import{bufferTime as _0x1e78a8}from'rxjs';import{HTTPService as _0x581e56}from'@univerjs/network';const W=_0x156056(0x12f);var I=(_0x1016ca=>(_0x1016ca[_0x1016ca[_0x156056(0x158)]=0x0]=_0x156056(0x158),_0x1016ca[_0x1016ca['Solved']=0x1]=_0x156056(0x11b),_0x1016ca[_0x1016ca[_0x156056(0x15e)]=-0x1]='UNRECOGNIZED',_0x1016ca))(I||{}),v=(_0x37796f=>(_0x37796f[_0x37796f[_0x156056(0x15f)]=0x0]='Unknown',_0x37796f[_0x37796f['Add']=0x1]=_0x156056(0x12c),_0x37796f[_0x37796f['Reply']=0x2]='Reply',_0x37796f[_0x37796f[_0x156056(0x13d)]=0x3]='Edit',_0x37796f[_0x37796f[_0x156056(0x118)]=0x4]=_0x156056(0x118),_0x37796f[_0x37796f[_0x156056(0x162)]=0x5]=_0x156056(0x162),_0x37796f[_0x37796f[_0x156056(0x15e)]=-0x1]=_0x156056(0x15e),_0x37796f))(v||{});const D=_0x43f4de=>_0x29a7b8(new Date(+_0x43f4de))[_0x156056(0x122)](_0x156056(0x129)),B=async(_0x22a29d,_0x13a601)=>{const _0x2a1314=_0x156056,_0x40c388=_0x22a29d[_0x2a1314(0x14e)](_0x3b7c6a),_0x320ab6=_0x22a29d[_0x2a1314(0x14e)](_0x581e56);_0x13a601[_0x2a1314(0x134)](_0x2824b6=>{_0x40c388['getUser'](_0x2824b6)&&_0x13a601['delete'](_0x2824b6);}),_0x13a601[_0x2a1314(0x152)]&&(await _0x320ab6[_0x2a1314(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a601]}}))['body'][_0x2a1314(0x133)][_0x2a1314(0x134)](_0x1c33a0=>{const _0x4e7395=_0x2a1314;_0x1c33a0&&_0x40c388[_0x4e7395(0x161)](_0x1c33a0);});};function _0x2456(_0x4c12e8,_0x3d7bc7){const _0xc8e1ba=_0xc8e1();return _0x2456=function(_0x245614,_0x2ea907){_0x245614=_0x245614-0x10e;let _0x5bb234=_0xc8e1ba[_0x245614];return _0x5bb234;},_0x2456(_0x4c12e8,_0x3d7bc7);}var K=Object[_0x156056(0x167)],V=(_0x3b2791,_0x1609d7,_0x25fe0c,_0x3d6d82)=>{const _0x1c04fb=_0x156056;for(var _0x26ffe0=_0x3d6d82>0x1?void 0x0:_0x3d6d82?K(_0x1609d7,_0x25fe0c):_0x1609d7,_0x445793=_0x3b2791[_0x1c04fb(0x130)]-0x1,_0x4edd96;_0x445793>=0x0;_0x445793--)(_0x4edd96=_0x3b2791[_0x445793])&&(_0x26ffe0=_0x4edd96(_0x26ffe0)||_0x26ffe0);return _0x26ffe0;},p=(_0x3915d1,_0x1f847f)=>(_0x465386,_0x3c9236)=>_0x1f847f(_0x465386,_0x3c9236,_0x3915d1);let S=class extends _0x329f5c{constructor(_0x31b552,_0x1540da,_0x227bf2,_0x3963a1){const _0xe7ef26=_0x156056;super(),this[_0xe7ef26(0x15c)]=_0x31b552,this[_0xe7ef26(0x128)]=_0x1540da,this['_userService']=_0x227bf2,this[_0xe7ef26(0x155)]=_0x3963a1,this[_0xe7ef26(0x132)](),this[_0xe7ef26(0x12d)]();}[_0x156056(0x12d)](){const _0x101168=_0x156056;this[_0x101168(0x165)](this[_0x101168(0x128)][_0x101168(0x111)][_0x101168(0x14b)](_0x1e78a8(0x10))[_0x101168(0x150)](_0x2d5363=>{const _0x39f921=_0x101168,_0x22d89f=new Set();_0x2d5363['forEach'](_0x3ad8bd=>{const _0x26a9f6=_0x2456;switch(_0x3ad8bd[_0x26a9f6(0x117)]){case'add':{const _0x3b1a6d=_0x3ad8bd[_0x26a9f6(0x163)][_0x26a9f6(0x119)];_0x22d89f['add'](_0x3b1a6d);break;}}}),B(this[_0x39f921(0x155)],_0x22d89f);}));}[_0x156056(0x132)](){const _0x29a7f2=_0x156056;this[_0x29a7f2(0x165)](this['_commentService'][_0x29a7f2(0x111)][_0x29a7f2(0x150)](async _0x3aa7b2=>{const _0x20d005=_0x29a7f2;var _0x1aeaab,_0x362222,_0x5e1ce8,_0xdfeded;const _0x389266=(_0x1aeaab=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0x2fc067=>_0x2fc067[_0x20d005(0x121)]===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0x1aeaab[_0x20d005(0x142)];if(!_0x389266)return;const {unitId:_0x560d4b,subUnitId:_0x39f6b0}=_0x389266;switch(_0x3aa7b2['user']&&this[_0x20d005(0x164)][_0x20d005(0x161)](_0x3aa7b2[_0x20d005(0x126)]),_0x3aa7b2['type']){case v[_0x20d005(0x12c)]:break;case v[_0x20d005(0x151)]:{this[_0x20d005(0x128)][_0x20d005(0x147)](_0x560d4b,_0x39f6b0,{'unitId':_0x560d4b,'subUnitId':_0x39f6b0,'ref':'','id':_0x3aa7b2['replyId'],'dT':D(+_0x3aa7b2[_0x20d005(0x160)]),'threadId':_0x3aa7b2['threadId'],'personId':(_0x5e1ce8=(_0x362222=_0x3aa7b2['user'])==null?void 0x0:_0x362222['userID'])!=null?_0x5e1ce8:_0x3aa7b2[_0x20d005(0x12e)],'text':JSON['parse'](_0x3aa7b2['content']),'parentId':_0x389266['id']});break;}case v['Delete']:{const _0x331be0=this[_0x20d005(0x128)][_0x20d005(0x16d)](_0x560d4b,_0x39f6b0,_0x3aa7b2['replyId']);_0x331be0&&_0x331be0[_0x20d005(0x13a)]&&this[_0x20d005(0x128)]['deleteComment'](_0x560d4b,_0x39f6b0,_0x3aa7b2[_0x20d005(0x15a)]);break;}case v[_0x20d005(0x13d)]:{this['_threadCommentModel']['updateComment'](_0x560d4b,_0x39f6b0,{'commentId':_0x3aa7b2[_0x20d005(0x15a)],'text':JSON['parse'](_0x3aa7b2['content'])});break;}case v[_0x20d005(0x162)]:{const _0x12ce01=(_0xdfeded=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0xe352f7=>_0xe352f7['threadId']===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0xdfeded[_0x20d005(0x142)];_0x12ce01&&this[_0x20d005(0x128)][_0x20d005(0x11c)](_0x560d4b,_0x39f6b0,_0x12ce01['id'],_0x3aa7b2[_0x20d005(0x145)]===I[_0x20d005(0x11b)]);break;}}}));}};S=V([p(0x0,_0xa1f4a5(_0x585108)),p(0x1,_0xa1f4a5(_0x28d422)),p(0x2,_0xa1f4a5(_0x3b7c6a)),p(0x3,_0xa1f4a5(_0x467e49))],S);const z='thread-comment-data-source.config',M={};function _0xc8e1(){const _0x39b3f9=['find','pipe','_threadCommentDataSourceService','onStarting','get','/universer-api/comment/unit/','subscribe','Reply','size','slice','getCurrentUser','_injector','_threadCommentDataSource','479097uOfuEm','OpenOrReOpen','comment','replyId','comments','_commentService','rangeType','UNRECOGNIZED','Unknown','createTimestamp','addUser','Solve','payload','_userService','disposeWithMe','3056jNFFfa','getOwnPropertyDescriptor','2266985wAcCtD','ref','customRanges','content','resolved','getComment','symbol','userID','_config','commentUpdate$','add','values','4vrIPwt','unitId','4520230hiDsQq','type','Delete','personId','_httpService','Solved','resolveComment','setConfig','_sessionService','4638ugxPzA','/solved','threadId','format','/add','_initDataSource','getMemberID','user','713124lSpvsP','_threadCommentModel','YYYY/MM/DD\x20HH:mm','filter','rangeId','Add','_initUserSync','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','code','_init','users','forEach','onReady','4354rmFpVS','/delete','_configService','requireSession','parentId','/reply','post','Edit','body','error','replies','142105IfCHxx','root','map','getUnit','solved','stringify','addComment','reply','2331NrhPvQ'];_0xc8e1=function(){return _0x39b3f9;};return _0xc8e1();}var k=Object[_0x156056(0x167)],Q=(_0x1d4abd,_0x55ea39,_0xa2396e,_0x45cc93)=>{const _0x341bf6=_0x156056;for(var _0x2601e6=_0x45cc93>0x1?void 0x0:_0x45cc93?k(_0x55ea39,_0xa2396e):_0x55ea39,_0x463efd=_0x1d4abd[_0x341bf6(0x130)]-0x1,_0x26ffd5;_0x463efd>=0x0;_0x463efd--)(_0x26ffd5=_0x1d4abd[_0x463efd])&&(_0x2601e6=_0x26ffd5(_0x2601e6)||_0x2601e6);return _0x2601e6;},_=(_0x44f823,_0x4e6144)=>(_0x52e865,_0x1a0aec)=>_0x4e6144(_0x52e865,_0x1a0aec,_0x44f823);function X(_0x1c5532,_0x44d280){const _0x299dd1=_0x156056,_0x513332=_0x1c5532['replies'][0x0];return{..._0x44d280,'id':_0x513332[_0x299dd1(0x15a)],'resolved':_0x1c5532[_0x299dd1(0x145)]===0x1,'dT':D(_0x513332[_0x299dd1(0x160)]),'personId':_0x513332[_0x299dd1(0x12e)],'threadId':_0x513332[_0x299dd1(0x121)]};}function ee(_0x1782e9,_0x1aa38b,_0x44d93c){const _0x41a88e=_0x156056;var _0x266e7e,_0x4ccf46;if(((_0x4ccf46=(_0x266e7e=_0x1782e9==null?void 0x0:_0x1782e9[_0x41a88e(0x140)])==null?void 0x0:_0x266e7e[_0x41a88e(0x130)])!=null?_0x4ccf46:0x0)>0x0){const _0x2be37d=(_0x1ac1d6,_0x187c23)=>({'id':_0x1ac1d6['replyId'],'threadId':_0x1ac1d6['threadId'],'dT':D(_0x1ac1d6[_0x41a88e(0x160)]),'personId':_0x1ac1d6['userId'],'resolved':_0x1782e9[_0x41a88e(0x145)]===I['Solved'],'unitId':_0x1aa38b,'subUnitId':_0x44d93c,'text':JSON['parse'](_0x1ac1d6[_0x41a88e(0x16b)]),'parentId':_0x187c23}),_0xfb42ee=_0x2be37d(_0x1782e9[_0x41a88e(0x140)][0x0]);return{..._0xfb42ee,'children':_0x1782e9['replies'][_0x41a88e(0x153)](0x1)[_0x41a88e(0x143)](_0x192254=>_0x2be37d(_0x192254,_0xfb42ee['id']))};}return null;}let f=class{constructor(_0xe36bad,_0x28940f,_0x468e6b,_0x3e00d5){const _0x41b8e8=_0x156056;this[_0x41b8e8(0x11a)]=_0xe36bad,this['_userService']=_0x28940f,this['_sessionService']=_0x468e6b,this[_0x41b8e8(0x155)]=_0x3e00d5;}async[_0x156056(0x147)](_0x41e943){const _0x3f87cb=_0x156056;var _0x26dab2,_0x5b8a0c;const {parentId:_0x1ef24b,unitId:_0x28a974,text:_0x2984a5,threadId:_0x27aa9a}=_0x41e943,_0x3ab062=(_0x5b8a0c=(_0x26dab2=_0x2984a5[_0x3f87cb(0x16a)])==null?void 0x0:_0x26dab2[_0x3f87cb(0x12a)](_0x175e95=>_0x175e95[_0x3f87cb(0x15d)]===_0x364f98['COMMENT'])['map'](_0x517bf9=>_0x517bf9[_0x3f87cb(0x12b)]))!=null?_0x5b8a0c:[],_0x4e47a1=JSON[_0x3f87cb(0x146)](_0x2984a5),_0x37d0f2=(await this[_0x3f87cb(0x11e)][_0x3f87cb(0x139)](_0x28a974))[_0x3f87cb(0x125)]();if(_0x1ef24b){const _0x32edac={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062,'threadId':_0x27aa9a},_0x5e3c83=(await this[_0x3f87cb(0x11a)]['post'](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x13b),{'body':_0x32edac}))[_0x3f87cb(0x13e)][_0x3f87cb(0x148)];return{..._0x41e943,'id':_0x5e3c83[_0x3f87cb(0x15a)],'dT':_0x29a7b8(+_0x5e3c83[_0x3f87cb(0x160)])[_0x3f87cb(0x122)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5e3c83['userId']};}else{const _0x2263db={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062},_0x17a925=await this[_0x3f87cb(0x11a)][_0x3f87cb(0x13c)](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x123),{'body':_0x2263db});return X(_0x17a925[_0x3f87cb(0x13e)][_0x3f87cb(0x159)],_0x41e943);}}async['updateComment'](_0xb833f8){const _0x2e1b21=_0x156056;var _0x5e6b70,_0x9c7b7a;const {text:_0x4da092,unitId:_0x346bf5}=_0xb833f8,_0x5554d4=(_0x9c7b7a=(_0x5e6b70=_0x4da092[_0x2e1b21(0x16a)])==null?void 0x0:_0x5e6b70[_0x2e1b21(0x12a)](_0x249967=>_0x249967['rangeType']===_0x364f98['COMMENT'])[_0x2e1b21(0x143)](_0x4028bc=>_0x4028bc[_0x2e1b21(0x12b)]))!=null?_0x9c7b7a:[],_0x54e6fc=JSON[_0x2e1b21(0x146)](_0x4da092),_0x1e74ca=_0xb833f8[_0x2e1b21(0x121)],_0x4e0a64=_0xb833f8['id'],_0xa7a531={'memberId':(await this[_0x2e1b21(0x11e)][_0x2e1b21(0x139)](_0x346bf5))[_0x2e1b21(0x125)](),'unitId':_0x346bf5,'threadId':_0x1e74ca,'mention':_0x5554d4,'content':_0x54e6fc,'replyId':_0x4e0a64},_0x32f297=await this[_0x2e1b21(0x11a)][_0x2e1b21(0x13c)]('/universer-api/comment/unit/'+_0x346bf5+'/edit',{'body':_0xa7a531});return!_0x32f297['body']['error']||_0x32f297['body'][_0x2e1b21(0x13f)]['code']===0x1;}async['resolveComment'](_0x476469){const _0x14c8f0=_0x156056,{unitId:_0x10b187}=_0x476469,_0x569166=_0x476469[_0x14c8f0(0x121)],_0x59123f={'memberId':this[_0x14c8f0(0x164)][_0x14c8f0(0x154)]()[_0x14c8f0(0x10f)],'unitId':_0x10b187,'threadId':_0x569166,'solved':_0x476469[_0x14c8f0(0x16c)]?I[_0x14c8f0(0x11b)]:I[_0x14c8f0(0x158)]},_0x478d60=await this[_0x14c8f0(0x11a)][_0x14c8f0(0x13c)]('/universer-api/comment/unit/'+_0x10b187+_0x14c8f0(0x120),{'body':_0x59123f});return!_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)]||_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)][_0x14c8f0(0x131)]===0x1;}async['deleteComment'](_0x103939,_0x5d3b85,_0x3a5fca,_0x305080){const _0x167b49=_0x156056,_0x2262bf={'memberId':(await this[_0x167b49(0x11e)][_0x167b49(0x139)](_0x103939))[_0x167b49(0x125)](),'threadId':_0x3a5fca,'replyId':_0x305080,'unitId':_0x103939},_0x5c6d03=await this[_0x167b49(0x11a)][_0x167b49(0x13c)]('/universer-api/comment/unit/'+_0x103939+_0x167b49(0x137),{'body':_0x2262bf});return!_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)]||_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)][_0x167b49(0x131)]===0x1;}async['listComments'](_0x242f39,_0x3770c4,_0x4cc007){const _0x2565fc=_0x156056,_0x373546={'unitId':_0x242f39,'threadId':_0x4cc007},_0x304036=await this[_0x2565fc(0x11a)]['post'](_0x2565fc(0x14f)+_0x242f39+'/list',{'body':_0x373546}),_0x3dd9b9=_0x4cc007[_0x2565fc(0x143)](_0x52a210=>ee(_0x304036[_0x2565fc(0x13e)][_0x2565fc(0x15b)][_0x52a210],_0x242f39,_0x3770c4))['filter'](Boolean);return Object[_0x2565fc(0x113)](_0x304036[_0x2565fc(0x13e)]['users'])[_0x2565fc(0x134)](_0x563f1b=>{const _0x124cd9=_0x2565fc;this['_userService'][_0x124cd9(0x161)](_0x563f1b);}),_0x3dd9b9;}['saveCommentToSnapshot'](_0x38cf18){const _0x187eea=_0x156056;return{'id':_0x38cf18['id'],'threadId':_0x38cf18[_0x187eea(0x121)],'ref':_0x38cf18[_0x187eea(0x169)]};}};f=Q([_(0x0,_0xa1f4a5(_0x581e56)),_(0x1,_0xa1f4a5(_0x3b7c6a)),_(0x2,_0xa1f4a5(_0x55d06f)),_(0x3,_0xa1f4a5(_0x467e49))],f);var re=Object[_0x156056(0x167)],te=(_0x458293,_0x1ca14f,_0x4207b3,_0x46b4a4)=>{const _0x580f09=_0x156056;for(var _0x17d475=_0x46b4a4>0x1?void 0x0:_0x46b4a4?re(_0x1ca14f,_0x4207b3):_0x1ca14f,_0x7153ca=_0x458293[_0x580f09(0x130)]-0x1,_0x10f1b2;_0x7153ca>=0x0;_0x7153ca--)(_0x10f1b2=_0x458293[_0x7153ca])&&(_0x17d475=_0x10f1b2(_0x17d475)||_0x17d475);return _0x17d475;},N=(_0x3c6250,_0x134122)=>(_0x1517f3,_0x3fc326)=>_0x134122(_0x1517f3,_0x3fc326,_0x3c6250);let g=class extends _0x329f5c{constructor(_0xe81fa,_0x2417c9){const _0x4c0951=_0x156056;super(),this[_0x4c0951(0x14c)]=_0xe81fa,this[_0x4c0951(0x156)]=_0x2417c9,this[_0x4c0951(0x124)]();}['_initDataSource'](){const _0x1515a1=_0x156056;this[_0x1515a1(0x14c)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa48844),N(0x1,_0xa1f4a5(f))],g);var se=Object['defineProperty'],oe=Object[_0x156056(0x167)],ne=(_0x1e35b8,_0x3f0a5c,_0x358331)=>_0x3f0a5c in _0x1e35b8?se(_0x1e35b8,_0x3f0a5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x358331}):_0x1e35b8[_0x3f0a5c]=_0x358331,ie=(_0x3619b6,_0xe59082,_0xb271be,_0x1c0fa4)=>{const _0x3328b6=_0x156056;for(var _0x13fa9f=_0x1c0fa4>0x1?void 0x0:_0x1c0fa4?oe(_0xe59082,_0xb271be):_0xe59082,_0x3a80cc=_0x3619b6[_0x3328b6(0x130)]-0x1,_0x349c6e;_0x3a80cc>=0x0;_0x3a80cc--)(_0x349c6e=_0x3619b6[_0x3a80cc])&&(_0x13fa9f=_0x349c6e(_0x13fa9f)||_0x13fa9f);return _0x13fa9f;},w=(_0x39533e,_0x26f6c4)=>(_0x4c2b17,_0xd48a5c)=>_0x26f6c4(_0x4c2b17,_0xd48a5c,_0x39533e),$=(_0x4bbf12,_0x1c041a,_0x2cdcf2)=>ne(_0x4bbf12,typeof _0x1c041a!=_0x156056(0x10e)?_0x1c041a+'':_0x1c041a,_0x2cdcf2);let b=class extends _0x239e11{constructor(_0x45dd26=M,_0x116394,_0x1bfa8a){const _0x2a1210=_0x156056;super(),this['_config']=_0x45dd26,this['_injector']=_0x116394,this[_0x2a1210(0x138)]=_0x1bfa8a;const {..._0x37b173}=_0x29ada1({},M,this[_0x2a1210(0x110)]);this[_0x2a1210(0x138)][_0x2a1210(0x11d)](z,_0x37b173);}[_0x156056(0x14d)](){const _0xfad2c7=_0x156056;[[f],[g],[S]][_0xfad2c7(0x134)](_0x2fbabf=>{const _0x42ca9f=_0xfad2c7;this[_0x42ca9f(0x155)][_0x42ca9f(0x112)](_0x2fbabf);});}[_0x156056(0x135)](){const _0x4d1d01=_0x156056;this[_0x4d1d01(0x155)]['get'](g),this[_0x4d1d01(0x155)][_0x4d1d01(0x14e)](S);}};$(b,'pluginName',W),$(b,_0x156056(0x117),_0x5183dd['UNIVER_UNKNOWN']),b=ie([_0x12fb17(_0x507370,_0x2a0e3c,_0x576c81),w(0x1,_0xa1f4a5(_0x467e49)),w(0x2,_0x1abcfa)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x88c252=_0x54f6;(function(_0x325260,_0x22d3f1){const _0x4996fb=_0x54f6,_0x2e4316=_0x325260();while(!![]){try{const _0x3be9ae=-parseInt(_0x4996fb(0xd7))/0x1+parseInt(_0x4996fb(0x9d))/0x2+parseInt(_0x4996fb(0xd0))/0x3+parseInt(_0x4996fb(0xe1))/0x4+-parseInt(_0x4996fb(0xdc))/0x5+-parseInt(_0x4996fb(0xac))/0x6*(-parseInt(_0x4996fb(0xa4))/0x7)+parseInt(_0x4996fb(0xb9))/0x8*(-parseInt(_0x4996fb(0xd4))/0x9);if(_0x3be9ae===_0x22d3f1)break;else _0x2e4316['push'](_0x2e4316['shift']());}catch(_0x37d5ba){_0x2e4316['push'](_0x2e4316['shift']());}}}(_0x38dc,0xee8e5));import{CommentService as _0x29a1f1,CollaborationSessionService as _0x2b9727,UniverCollaborationClientPlugin as _0x2f5b82}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x802055}from'@univerjs-pro/license';import{dayjs as _0x587e27,UserManagerService as _0x1d01f8,Inject as _0xff23a0,Injector as _0x145b8a,Disposable as _0x28cf76,CustomRangeType as _0x1c7e16,UniverInstanceType as _0x82bea5,DependentOn as _0x5e7b4e,IConfigService as _0x5904ab,Plugin as _0x249cfc,merge as _0x19b49a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ccc86}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f14f7,IThreadCommentDataSourceService as _0x22d45b}from'@univerjs/thread-comment';import{bufferTime as _0x4a89db}from'rxjs';import{HTTPService as _0x87bad4}from'@univerjs/network';const W=_0x88c252(0xe0);var I=(_0x3ff0bc=>(_0x3ff0bc[_0x3ff0bc[_0x88c252(0xbe)]=0x0]='OpenOrReOpen',_0x3ff0bc[_0x3ff0bc[_0x88c252(0xc4)]=0x1]=_0x88c252(0xc4),_0x3ff0bc[_0x3ff0bc['UNRECOGNIZED']=-0x1]=_0x88c252(0xc7),_0x3ff0bc))(I||{}),v=(_0x2c9027=>(_0x2c9027[_0x2c9027[_0x88c252(0xd2)]=0x0]='Unknown',_0x2c9027[_0x2c9027[_0x88c252(0xe3)]=0x1]=_0x88c252(0xe3),_0x2c9027[_0x2c9027[_0x88c252(0xc8)]=0x2]=_0x88c252(0xc8),_0x2c9027[_0x2c9027[_0x88c252(0xe4)]=0x3]=_0x88c252(0xe4),_0x2c9027[_0x2c9027[_0x88c252(0xd5)]=0x4]=_0x88c252(0xd5),_0x2c9027[_0x2c9027[_0x88c252(0x9c)]=0x5]=_0x88c252(0x9c),_0x2c9027[_0x2c9027[_0x88c252(0xc7)]=-0x1]=_0x88c252(0xc7),_0x2c9027))(v||{});const D=_0x5351ca=>_0x587e27(new Date(+_0x5351ca))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x5a5049,_0x113ab9)=>{const _0x18d92b=_0x88c252,_0x410e72=_0x5a5049['get'](_0x1d01f8),_0x3bab84=_0x5a5049[_0x18d92b(0xe5)](_0x87bad4);_0x113ab9[_0x18d92b(0x93)](_0x2fcdf9=>{const _0x377f91=_0x18d92b;_0x410e72[_0x377f91(0x99)](_0x2fcdf9)&&_0x113ab9[_0x377f91(0xca)](_0x2fcdf9);}),_0x113ab9[_0x18d92b(0xdd)]&&(await _0x3bab84[_0x18d92b(0xe5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x113ab9]}}))['body'][_0x18d92b(0xd8)][_0x18d92b(0x93)](_0xfacd6e=>{const _0xf1e9c=_0x18d92b;_0xfacd6e&&_0x410e72[_0xf1e9c(0xd9)](_0xfacd6e);});};var K=Object[_0x88c252(0xbd)],V=(_0x43cc44,_0x1daacc,_0x1d64d9,_0x44907e)=>{for(var _0x5cbf24=_0x44907e>0x1?void 0x0:_0x44907e?K(_0x1daacc,_0x1d64d9):_0x1daacc,_0x2c4e60=_0x43cc44['length']-0x1,_0x54b9fd;_0x2c4e60>=0x0;_0x2c4e60--)(_0x54b9fd=_0x43cc44[_0x2c4e60])&&(_0x5cbf24=_0x54b9fd(_0x5cbf24)||_0x5cbf24);return _0x5cbf24;},p=(_0x41f21f,_0x1aa085)=>(_0x401d9f,_0x1b4f82)=>_0x1aa085(_0x401d9f,_0x1b4f82,_0x41f21f);function _0x54f6(_0x2fb803,_0x54fd3c){const _0x38dc9d=_0x38dc();return _0x54f6=function(_0x54f66b,_0x425ca8){_0x54f66b=_0x54f66b-0x8a;let _0x5dc8aa=_0x38dc9d[_0x54f66b];return _0x5dc8aa;},_0x54f6(_0x2fb803,_0x54fd3c);}let S=class extends _0x28cf76{constructor(_0x4ac549,_0x1b9672,_0x4dfebe,_0x161a4f){const _0x2a4ead=_0x88c252;super(),this[_0x2a4ead(0xaf)]=_0x4ac549,this['_threadCommentModel']=_0x1b9672,this[_0x2a4ead(0x9a)]=_0x4dfebe,this[_0x2a4ead(0xce)]=_0x161a4f,this[_0x2a4ead(0xbb)](),this['_initUserSync']();}['_initUserSync'](){const _0x1446ae=_0x88c252;this[_0x1446ae(0xc6)](this[_0x1446ae(0xb7)][_0x1446ae(0x95)][_0x1446ae(0xa7)](_0x4a89db(0x10))[_0x1446ae(0x92)](_0x5a81c5=>{const _0x3bf988=_0x1446ae,_0x1722be=new Set();_0x5a81c5[_0x3bf988(0x93)](_0x560be3=>{const _0x27de50=_0x3bf988;switch(_0x560be3[_0x27de50(0xc9)]){case _0x27de50(0xda):{const _0x3e5161=_0x560be3[_0x27de50(0x90)]['personId'];_0x1722be[_0x27de50(0xda)](_0x3e5161);break;}}}),B(this[_0x3bf988(0xce)],_0x1722be);}));}[_0x88c252(0xbb)](){const _0x2b1959=_0x88c252;this[_0x2b1959(0xc6)](this['_commentService']['commentUpdate$'][_0x2b1959(0x92)](async _0x3fd97f=>{const _0x54ac12=_0x2b1959;var _0x394602,_0x32fa22,_0x302bb0,_0x4d800d;const _0x2847ce=(_0x394602=this[_0x54ac12(0xb7)][_0x54ac12(0x9f)](_0x3fd97f['unitId'])[_0x54ac12(0x97)](_0x453d1e=>_0x453d1e[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x394602[_0x54ac12(0xc3)];if(!_0x2847ce)return;const {unitId:_0x2a4d18,subUnitId:_0x1558cd}=_0x2847ce;switch(_0x3fd97f[_0x54ac12(0x98)]&&this[_0x54ac12(0x9a)]['addUser'](_0x3fd97f['user']),_0x3fd97f[_0x54ac12(0xc9)]){case v[_0x54ac12(0xe3)]:break;case v[_0x54ac12(0xc8)]:{this['_threadCommentModel'][_0x54ac12(0xe2)](_0x2a4d18,_0x1558cd,{'unitId':_0x2a4d18,'subUnitId':_0x1558cd,'ref':'','id':_0x3fd97f[_0x54ac12(0xa5)],'dT':D(+_0x3fd97f[_0x54ac12(0xea)]),'threadId':_0x3fd97f[_0x54ac12(0xc2)],'personId':(_0x302bb0=(_0x32fa22=_0x3fd97f[_0x54ac12(0x98)])==null?void 0x0:_0x32fa22[_0x54ac12(0xaa)])!=null?_0x302bb0:_0x3fd97f[_0x54ac12(0xa0)],'text':JSON[_0x54ac12(0x94)](_0x3fd97f[_0x54ac12(0xdf)]),'parentId':_0x2847ce['id']});break;}case v[_0x54ac12(0xd5)]:{const _0x35af6a=this[_0x54ac12(0xb7)][_0x54ac12(0x96)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);_0x35af6a&&_0x35af6a['parentId']&&this[_0x54ac12(0xb7)][_0x54ac12(0xd6)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);break;}case v[_0x54ac12(0xe4)]:{this[_0x54ac12(0xb7)][_0x54ac12(0xcc)](_0x2a4d18,_0x1558cd,{'commentId':_0x3fd97f[_0x54ac12(0xa5)],'text':JSON['parse'](_0x3fd97f['content'])});break;}case v['Solve']:{const _0x33e13b=(_0x4d800d=this['_threadCommentModel'][_0x54ac12(0x9f)](_0x3fd97f[_0x54ac12(0xc5)])['find'](_0x2f6279=>_0x2f6279[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x4d800d[_0x54ac12(0xc3)];_0x33e13b&&this[_0x54ac12(0xb7)][_0x54ac12(0xcb)](_0x2a4d18,_0x1558cd,_0x33e13b['id'],_0x3fd97f[_0x54ac12(0xe6)]===I[_0x54ac12(0xc4)]);break;}}}));}};function _0x38dc(){const _0x1497dc=['map','resolved','_threadCommentModel','onReady','4280rYRgNZ','stringify','_init','ref','getOwnPropertyDescriptor','OpenOrReOpen','COMMENT','body','thread-comment-data-source.config','threadId','root','Solved','unitId','disposeWithMe','UNRECOGNIZED','Reply','type','delete','resolveComment','updateComment','setConfig','_injector','_sessionService','478704LOxVnW','/delete','Unknown','filter','28287nYFRzo','Delete','deleteComment','144137sVfIJx','users','addUser','add','code','7758860qoYhmv','size','error','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2891564dbgNrJ','addComment','Add','Edit','get','solved','syncUpdateMutationToColla','comment','_config','createTimestamp','_initDataSource','getMemberID','slice','getCurrentUser','dataSource','YYYY/MM/DD\x20HH:mm','comments','UNIVER_UNKNOWN','onStarting','values','payload','_threadCommentDataSource','subscribe','forEach','parse','commentUpdate$','getComment','find','user','getUser','_userService','saveCommentToSnapshot','Solve','3589474OGcnEb','symbol','getUnit','userId','_threadCommentDataSourceService','rangeType','reply','7sOBqfV','replyId','_httpService','pipe','/reply','post','userID','/add','10064058jrZtWT','/edit','rangeId','_commentService','_configService','replies','length','requireSession','/universer-api/comment/unit/'];_0x38dc=function(){return _0x1497dc;};return _0x38dc();}S=V([p(0x0,_0xff23a0(_0x29a1f1)),p(0x1,_0xff23a0(_0x3f14f7)),p(0x2,_0xff23a0(_0x1d01f8)),p(0x3,_0xff23a0(_0x145b8a))],S);const z=_0x88c252(0xc1),M={};var k=Object[_0x88c252(0xbd)],Q=(_0x51dfe7,_0x952733,_0x484844,_0xee3faf)=>{for(var _0xbfdf47=_0xee3faf>0x1?void 0x0:_0xee3faf?k(_0x952733,_0x484844):_0x952733,_0x24e4e6=_0x51dfe7['length']-0x1,_0x50321d;_0x24e4e6>=0x0;_0x24e4e6--)(_0x50321d=_0x51dfe7[_0x24e4e6])&&(_0xbfdf47=_0x50321d(_0xbfdf47)||_0xbfdf47);return _0xbfdf47;},_=(_0x46bdd9,_0x57b415)=>(_0x504c69,_0x340846)=>_0x57b415(_0x504c69,_0x340846,_0x46bdd9);function X(_0x4badcb,_0x171569){const _0x62407a=_0x88c252,_0x17d726=_0x4badcb[_0x62407a(0xb1)][0x0];return{..._0x171569,'id':_0x17d726[_0x62407a(0xa5)],'resolved':_0x4badcb[_0x62407a(0xe6)]===0x1,'dT':D(_0x17d726['createTimestamp']),'personId':_0x17d726[_0x62407a(0xa0)],'threadId':_0x17d726['threadId']};}function ee(_0x837349,_0x31038c,_0x245dd8){const _0x2b4d30=_0x88c252;var _0x4f0e35,_0x340f51;if(((_0x340f51=(_0x4f0e35=_0x837349==null?void 0x0:_0x837349['replies'])==null?void 0x0:_0x4f0e35['length'])!=null?_0x340f51:0x0)>0x0){const _0x270fe0=(_0x53a033,_0x196b21)=>({'id':_0x53a033[_0x2b4d30(0xa5)],'threadId':_0x53a033['threadId'],'dT':D(_0x53a033[_0x2b4d30(0xea)]),'personId':_0x53a033[_0x2b4d30(0xa0)],'resolved':_0x837349[_0x2b4d30(0xe6)]===I[_0x2b4d30(0xc4)],'unitId':_0x31038c,'subUnitId':_0x245dd8,'text':JSON[_0x2b4d30(0x94)](_0x53a033[_0x2b4d30(0xdf)]),'parentId':_0x196b21}),_0x435625=_0x270fe0(_0x837349['replies'][0x0]);return{..._0x435625,'children':_0x837349[_0x2b4d30(0xb1)][_0x2b4d30(0xed)](0x1)[_0x2b4d30(0xb5)](_0x2bb9b4=>_0x270fe0(_0x2bb9b4,_0x435625['id']))};}return null;}let f=class{constructor(_0x15a2e6,_0x30053c,_0x2c4f57,_0x44ea1f){const _0x2b48e0=_0x88c252;this[_0x2b48e0(0xa6)]=_0x15a2e6,this[_0x2b48e0(0x9a)]=_0x30053c,this[_0x2b48e0(0xcf)]=_0x2c4f57,this[_0x2b48e0(0xce)]=_0x44ea1f;}async[_0x88c252(0xe2)](_0x40d71d){const _0x3ec8ec=_0x88c252;var _0x283359,_0x26f4c6;const {parentId:_0x4e8f03,unitId:_0x42a1e0,text:_0x58af55,threadId:_0x22446b}=_0x40d71d,_0x506b5f=(_0x26f4c6=(_0x283359=_0x58af55['customRanges'])==null?void 0x0:_0x283359[_0x3ec8ec(0xd3)](_0x531e3e=>_0x531e3e[_0x3ec8ec(0xa2)]===_0x1c7e16['COMMENT'])[_0x3ec8ec(0xb5)](_0x5a1bb0=>_0x5a1bb0['rangeId']))!=null?_0x26f4c6:[],_0x157d09=JSON[_0x3ec8ec(0xba)](_0x58af55),_0x190663=(await this[_0x3ec8ec(0xcf)][_0x3ec8ec(0xb3)](_0x42a1e0))[_0x3ec8ec(0xec)]();if(_0x4e8f03){const _0x33a9a2={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f,'threadId':_0x22446b},_0x535d5a=(await this['_httpService']['post'](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xa8),{'body':_0x33a9a2}))[_0x3ec8ec(0xc0)][_0x3ec8ec(0xa3)];return{..._0x40d71d,'id':_0x535d5a[_0x3ec8ec(0xa5)],'dT':_0x587e27(+_0x535d5a[_0x3ec8ec(0xea)])['format'](_0x3ec8ec(0x8b)),'personId':_0x535d5a['userId']};}else{const _0x42caf5={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f},_0x3efab2=await this[_0x3ec8ec(0xa6)][_0x3ec8ec(0xa9)](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xab),{'body':_0x42caf5});return X(_0x3efab2['body'][_0x3ec8ec(0xe8)],_0x40d71d);}}async[_0x88c252(0xcc)](_0x36b2df){const _0x47d04e=_0x88c252;var _0xdb6bdd,_0x41507d;const {text:_0x18ce6f,unitId:_0x339cff}=_0x36b2df,_0x1b4c44=(_0x41507d=(_0xdb6bdd=_0x18ce6f['customRanges'])==null?void 0x0:_0xdb6bdd['filter'](_0x1fae81=>_0x1fae81['rangeType']===_0x1c7e16[_0x47d04e(0xbf)])[_0x47d04e(0xb5)](_0x364aa4=>_0x364aa4[_0x47d04e(0xae)]))!=null?_0x41507d:[],_0x2147e8=JSON[_0x47d04e(0xba)](_0x18ce6f),_0x337c9b=_0x36b2df[_0x47d04e(0xc2)],_0x4b8025=_0x36b2df['id'],_0x4d3794={'memberId':(await this[_0x47d04e(0xcf)][_0x47d04e(0xb3)](_0x339cff))['getMemberID'](),'unitId':_0x339cff,'threadId':_0x337c9b,'mention':_0x1b4c44,'content':_0x2147e8,'replyId':_0x4b8025},_0x6e95da=await this[_0x47d04e(0xa6)][_0x47d04e(0xa9)](_0x47d04e(0xb4)+_0x339cff+_0x47d04e(0xad),{'body':_0x4d3794});return!_0x6e95da[_0x47d04e(0xc0)]['error']||_0x6e95da[_0x47d04e(0xc0)][_0x47d04e(0xde)][_0x47d04e(0xdb)]===0x1;}async[_0x88c252(0xcb)](_0x34287f){const _0x2de5f9=_0x88c252,{unitId:_0x247581}=_0x34287f,_0x281e5b=_0x34287f[_0x2de5f9(0xc2)],_0x5f03e3={'memberId':this['_userService'][_0x2de5f9(0xee)]()[_0x2de5f9(0xaa)],'unitId':_0x247581,'threadId':_0x281e5b,'solved':_0x34287f[_0x2de5f9(0xb6)]?I[_0x2de5f9(0xc4)]:I[_0x2de5f9(0xbe)]},_0x3703cd=await this[_0x2de5f9(0xa6)][_0x2de5f9(0xa9)](_0x2de5f9(0xb4)+_0x247581+'/solved',{'body':_0x5f03e3});return!_0x3703cd['body'][_0x2de5f9(0xde)]||_0x3703cd[_0x2de5f9(0xc0)][_0x2de5f9(0xde)][_0x2de5f9(0xdb)]===0x1;}async['deleteComment'](_0x3d5139,_0x300ae0,_0xf11501,_0x415f79){const _0x725b03=_0x88c252,_0x2360ad={'memberId':(await this['_sessionService'][_0x725b03(0xb3)](_0x3d5139))[_0x725b03(0xec)](),'threadId':_0xf11501,'replyId':_0x415f79,'unitId':_0x3d5139},_0x1ef26a=await this[_0x725b03(0xa6)]['post'](_0x725b03(0xb4)+_0x3d5139+_0x725b03(0xd1),{'body':_0x2360ad});return!_0x1ef26a[_0x725b03(0xc0)][_0x725b03(0xde)]||_0x1ef26a['body'][_0x725b03(0xde)][_0x725b03(0xdb)]===0x1;}async['listComments'](_0x1e6eb3,_0x1855e6,_0xf622c3){const _0x11afa4=_0x88c252,_0x7ddee8={'unitId':_0x1e6eb3,'threadId':_0xf622c3},_0x20b549=await this[_0x11afa4(0xa6)][_0x11afa4(0xa9)](_0x11afa4(0xb4)+_0x1e6eb3+'/list',{'body':_0x7ddee8}),_0x4a5e53=_0xf622c3[_0x11afa4(0xb5)](_0x4b6aab=>ee(_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0x8c)][_0x4b6aab],_0x1e6eb3,_0x1855e6))[_0x11afa4(0xd3)](Boolean);return Object[_0x11afa4(0x8f)](_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0xd8)])['forEach'](_0x18c960=>{const _0x2d6b4e=_0x11afa4;this[_0x2d6b4e(0x9a)][_0x2d6b4e(0xd9)](_0x18c960);}),_0x4a5e53;}[_0x88c252(0x9b)](_0x65b017){const _0x55c081=_0x88c252;return{'id':_0x65b017['id'],'threadId':_0x65b017[_0x55c081(0xc2)],'ref':_0x65b017[_0x55c081(0xbc)]};}};f=Q([_(0x0,_0xff23a0(_0x87bad4)),_(0x1,_0xff23a0(_0x1d01f8)),_(0x2,_0xff23a0(_0x2b9727)),_(0x3,_0xff23a0(_0x145b8a))],f);var re=Object[_0x88c252(0xbd)],te=(_0x17df79,_0x3383bc,_0x29dd30,_0x553ff7)=>{for(var _0x5d5828=_0x553ff7>0x1?void 0x0:_0x553ff7?re(_0x3383bc,_0x29dd30):_0x3383bc,_0x8956cb=_0x17df79['length']-0x1,_0xce97e5;_0x8956cb>=0x0;_0x8956cb--)(_0xce97e5=_0x17df79[_0x8956cb])&&(_0x5d5828=_0xce97e5(_0x5d5828)||_0x5d5828);return _0x5d5828;},N=(_0x3773fa,_0x44082f)=>(_0x5387e1,_0x127f81)=>_0x44082f(_0x5387e1,_0x127f81,_0x3773fa);let g=class extends _0x28cf76{constructor(_0x34059b,_0x3c9d3f){const _0x2893a6=_0x88c252;super(),this[_0x2893a6(0xa1)]=_0x34059b,this['_threadCommentDataSource']=_0x3c9d3f,this[_0x2893a6(0xeb)]();}['_initDataSource'](){const _0x54b3d3=_0x88c252;this[_0x54b3d3(0xa1)][_0x54b3d3(0x8a)]=this[_0x54b3d3(0x91)],this[_0x54b3d3(0xa1)][_0x54b3d3(0xe7)]=!0x1;}};g=te([N(0x0,_0x22d45b),N(0x1,_0xff23a0(f))],g);var se=Object['defineProperty'],oe=Object[_0x88c252(0xbd)],ne=(_0x4aa71e,_0x20681a,_0x18f496)=>_0x20681a in _0x4aa71e?se(_0x4aa71e,_0x20681a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18f496}):_0x4aa71e[_0x20681a]=_0x18f496,ie=(_0x5393a4,_0x562271,_0xfe57fe,_0x5910e7)=>{const _0x1f59dd=_0x88c252;for(var _0x100e18=_0x5910e7>0x1?void 0x0:_0x5910e7?oe(_0x562271,_0xfe57fe):_0x562271,_0x2b80c0=_0x5393a4[_0x1f59dd(0xb2)]-0x1,_0x50ea37;_0x2b80c0>=0x0;_0x2b80c0--)(_0x50ea37=_0x5393a4[_0x2b80c0])&&(_0x100e18=_0x50ea37(_0x100e18)||_0x100e18);return _0x100e18;},w=(_0x4a066e,_0x47f1c7)=>(_0x444f1e,_0x15ccb2)=>_0x47f1c7(_0x444f1e,_0x15ccb2,_0x4a066e),$=(_0x189ca4,_0x3a9e49,_0x4640a6)=>ne(_0x189ca4,typeof _0x3a9e49!=_0x88c252(0x9e)?_0x3a9e49+'':_0x3a9e49,_0x4640a6);let b=class extends _0x249cfc{constructor(_0x16602f=M,_0x9a0046,_0x5e5071){const _0x14286e=_0x88c252;super(),this[_0x14286e(0xe9)]=_0x16602f,this[_0x14286e(0xce)]=_0x9a0046,this[_0x14286e(0xb0)]=_0x5e5071;const {..._0x338286}=_0x19b49a({},M,this[_0x14286e(0xe9)]);this[_0x14286e(0xb0)][_0x14286e(0xcd)](z,_0x338286);}[_0x88c252(0x8e)](){[[f],[g],[S]]['forEach'](_0x48068e=>{const _0x1e278a=_0x54f6;this[_0x1e278a(0xce)]['add'](_0x48068e);});}[_0x88c252(0xb8)](){const _0x1d9ad9=_0x88c252;this['_injector'][_0x1d9ad9(0xe5)](g),this[_0x1d9ad9(0xce)][_0x1d9ad9(0xe5)](S);}};$(b,'pluginName',W),$(b,_0x88c252(0xc9),_0x82bea5[_0x88c252(0x8d)]),b=ie([_0x5e7b4e(_0x1ccc86,_0x2f5b82,_0x802055),w(0x1,_0xff23a0(_0x145b8a)),w(0x2,_0x5904ab)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x156056=_0x2456;(function(_0x20a7c2,_0x1d5fc3){const _0x68fe54=_0x2456,_0x40f370=_0x20a7c2();while(!![]){try{const _0x5194d3=parseInt(_0x68fe54(0x141))/0x1+parseInt(_0x68fe54(0x114))/0x2*(parseInt(_0x68fe54(0x157))/0x3)+parseInt(_0x68fe54(0x127))/0x4+-parseInt(_0x68fe54(0x168))/0x5+parseInt(_0x68fe54(0x11f))/0x6*(-parseInt(_0x68fe54(0x136))/0x7)+parseInt(_0x68fe54(0x166))/0x8*(parseInt(_0x68fe54(0x149))/0x9)+parseInt(_0x68fe54(0x116))/0xa;if(_0x5194d3===_0x1d5fc3)break;else _0x40f370['push'](_0x40f370['shift']());}catch(_0x16e1bc){_0x40f370['push'](_0x40f370['shift']());}}}(_0xc8e1,0x3ea1e));import{CommentService as _0x585108,CollaborationSessionService as _0x55d06f,UniverCollaborationClientPlugin as _0x2a0e3c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x576c81}from'@univerjs-pro/license';import{dayjs as _0x29a7b8,UserManagerService as _0x3b7c6a,Inject as _0xa1f4a5,Injector as _0x467e49,Disposable as _0x329f5c,CustomRangeType as _0x364f98,UniverInstanceType as _0x5183dd,DependentOn as _0x12fb17,IConfigService as _0x1abcfa,Plugin as _0x239e11,merge as _0x29ada1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x507370}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28d422,IThreadCommentDataSourceService as _0xa48844}from'@univerjs/thread-comment';import{bufferTime as _0x1e78a8}from'rxjs';import{HTTPService as _0x581e56}from'@univerjs/network';const W=_0x156056(0x12f);var I=(_0x1016ca=>(_0x1016ca[_0x1016ca[_0x156056(0x158)]=0x0]=_0x156056(0x158),_0x1016ca[_0x1016ca['Solved']=0x1]=_0x156056(0x11b),_0x1016ca[_0x1016ca[_0x156056(0x15e)]=-0x1]='UNRECOGNIZED',_0x1016ca))(I||{}),v=(_0x37796f=>(_0x37796f[_0x37796f[_0x156056(0x15f)]=0x0]='Unknown',_0x37796f[_0x37796f['Add']=0x1]=_0x156056(0x12c),_0x37796f[_0x37796f['Reply']=0x2]='Reply',_0x37796f[_0x37796f[_0x156056(0x13d)]=0x3]='Edit',_0x37796f[_0x37796f[_0x156056(0x118)]=0x4]=_0x156056(0x118),_0x37796f[_0x37796f[_0x156056(0x162)]=0x5]=_0x156056(0x162),_0x37796f[_0x37796f[_0x156056(0x15e)]=-0x1]=_0x156056(0x15e),_0x37796f))(v||{});const D=_0x43f4de=>_0x29a7b8(new Date(+_0x43f4de))[_0x156056(0x122)](_0x156056(0x129)),B=async(_0x22a29d,_0x13a601)=>{const _0x2a1314=_0x156056,_0x40c388=_0x22a29d[_0x2a1314(0x14e)](_0x3b7c6a),_0x320ab6=_0x22a29d[_0x2a1314(0x14e)](_0x581e56);_0x13a601[_0x2a1314(0x134)](_0x2824b6=>{_0x40c388['getUser'](_0x2824b6)&&_0x13a601['delete'](_0x2824b6);}),_0x13a601[_0x2a1314(0x152)]&&(await _0x320ab6[_0x2a1314(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a601]}}))['body'][_0x2a1314(0x133)][_0x2a1314(0x134)](_0x1c33a0=>{const _0x4e7395=_0x2a1314;_0x1c33a0&&_0x40c388[_0x4e7395(0x161)](_0x1c33a0);});};function _0x2456(_0x4c12e8,_0x3d7bc7){const _0xc8e1ba=_0xc8e1();return _0x2456=function(_0x245614,_0x2ea907){_0x245614=_0x245614-0x10e;let _0x5bb234=_0xc8e1ba[_0x245614];return _0x5bb234;},_0x2456(_0x4c12e8,_0x3d7bc7);}var K=Object[_0x156056(0x167)],V=(_0x3b2791,_0x1609d7,_0x25fe0c,_0x3d6d82)=>{const _0x1c04fb=_0x156056;for(var _0x26ffe0=_0x3d6d82>0x1?void 0x0:_0x3d6d82?K(_0x1609d7,_0x25fe0c):_0x1609d7,_0x445793=_0x3b2791[_0x1c04fb(0x130)]-0x1,_0x4edd96;_0x445793>=0x0;_0x445793--)(_0x4edd96=_0x3b2791[_0x445793])&&(_0x26ffe0=_0x4edd96(_0x26ffe0)||_0x26ffe0);return _0x26ffe0;},p=(_0x3915d1,_0x1f847f)=>(_0x465386,_0x3c9236)=>_0x1f847f(_0x465386,_0x3c9236,_0x3915d1);let S=class extends _0x329f5c{constructor(_0x31b552,_0x1540da,_0x227bf2,_0x3963a1){const _0xe7ef26=_0x156056;super(),this[_0xe7ef26(0x15c)]=_0x31b552,this[_0xe7ef26(0x128)]=_0x1540da,this['_userService']=_0x227bf2,this[_0xe7ef26(0x155)]=_0x3963a1,this[_0xe7ef26(0x132)](),this[_0xe7ef26(0x12d)]();}[_0x156056(0x12d)](){const _0x101168=_0x156056;this[_0x101168(0x165)](this[_0x101168(0x128)][_0x101168(0x111)][_0x101168(0x14b)](_0x1e78a8(0x10))[_0x101168(0x150)](_0x2d5363=>{const _0x39f921=_0x101168,_0x22d89f=new Set();_0x2d5363['forEach'](_0x3ad8bd=>{const _0x26a9f6=_0x2456;switch(_0x3ad8bd[_0x26a9f6(0x117)]){case'add':{const _0x3b1a6d=_0x3ad8bd[_0x26a9f6(0x163)][_0x26a9f6(0x119)];_0x22d89f['add'](_0x3b1a6d);break;}}}),B(this[_0x39f921(0x155)],_0x22d89f);}));}[_0x156056(0x132)](){const _0x29a7f2=_0x156056;this[_0x29a7f2(0x165)](this['_commentService'][_0x29a7f2(0x111)][_0x29a7f2(0x150)](async _0x3aa7b2=>{const _0x20d005=_0x29a7f2;var _0x1aeaab,_0x362222,_0x5e1ce8,_0xdfeded;const _0x389266=(_0x1aeaab=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0x2fc067=>_0x2fc067[_0x20d005(0x121)]===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0x1aeaab[_0x20d005(0x142)];if(!_0x389266)return;const {unitId:_0x560d4b,subUnitId:_0x39f6b0}=_0x389266;switch(_0x3aa7b2['user']&&this[_0x20d005(0x164)][_0x20d005(0x161)](_0x3aa7b2[_0x20d005(0x126)]),_0x3aa7b2['type']){case v[_0x20d005(0x12c)]:break;case v[_0x20d005(0x151)]:{this[_0x20d005(0x128)][_0x20d005(0x147)](_0x560d4b,_0x39f6b0,{'unitId':_0x560d4b,'subUnitId':_0x39f6b0,'ref':'','id':_0x3aa7b2['replyId'],'dT':D(+_0x3aa7b2[_0x20d005(0x160)]),'threadId':_0x3aa7b2['threadId'],'personId':(_0x5e1ce8=(_0x362222=_0x3aa7b2['user'])==null?void 0x0:_0x362222['userID'])!=null?_0x5e1ce8:_0x3aa7b2[_0x20d005(0x12e)],'text':JSON['parse'](_0x3aa7b2['content']),'parentId':_0x389266['id']});break;}case v['Delete']:{const _0x331be0=this[_0x20d005(0x128)][_0x20d005(0x16d)](_0x560d4b,_0x39f6b0,_0x3aa7b2['replyId']);_0x331be0&&_0x331be0[_0x20d005(0x13a)]&&this[_0x20d005(0x128)]['deleteComment'](_0x560d4b,_0x39f6b0,_0x3aa7b2[_0x20d005(0x15a)]);break;}case v[_0x20d005(0x13d)]:{this['_threadCommentModel']['updateComment'](_0x560d4b,_0x39f6b0,{'commentId':_0x3aa7b2[_0x20d005(0x15a)],'text':JSON['parse'](_0x3aa7b2['content'])});break;}case v[_0x20d005(0x162)]:{const _0x12ce01=(_0xdfeded=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0xe352f7=>_0xe352f7['threadId']===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0xdfeded[_0x20d005(0x142)];_0x12ce01&&this[_0x20d005(0x128)][_0x20d005(0x11c)](_0x560d4b,_0x39f6b0,_0x12ce01['id'],_0x3aa7b2[_0x20d005(0x145)]===I[_0x20d005(0x11b)]);break;}}}));}};S=V([p(0x0,_0xa1f4a5(_0x585108)),p(0x1,_0xa1f4a5(_0x28d422)),p(0x2,_0xa1f4a5(_0x3b7c6a)),p(0x3,_0xa1f4a5(_0x467e49))],S);const z='thread-comment-data-source.config',M={};function _0xc8e1(){const _0x39b3f9=['find','pipe','_threadCommentDataSourceService','onStarting','get','/universer-api/comment/unit/','subscribe','Reply','size','slice','getCurrentUser','_injector','_threadCommentDataSource','479097uOfuEm','OpenOrReOpen','comment','replyId','comments','_commentService','rangeType','UNRECOGNIZED','Unknown','createTimestamp','addUser','Solve','payload','_userService','disposeWithMe','3056jNFFfa','getOwnPropertyDescriptor','2266985wAcCtD','ref','customRanges','content','resolved','getComment','symbol','userID','_config','commentUpdate$','add','values','4vrIPwt','unitId','4520230hiDsQq','type','Delete','personId','_httpService','Solved','resolveComment','setConfig','_sessionService','4638ugxPzA','/solved','threadId','format','/add','_initDataSource','getMemberID','user','713124lSpvsP','_threadCommentModel','YYYY/MM/DD\x20HH:mm','filter','rangeId','Add','_initUserSync','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','code','_init','users','forEach','onReady','4354rmFpVS','/delete','_configService','requireSession','parentId','/reply','post','Edit','body','error','replies','142105IfCHxx','root','map','getUnit','solved','stringify','addComment','reply','2331NrhPvQ'];_0xc8e1=function(){return _0x39b3f9;};return _0xc8e1();}var k=Object[_0x156056(0x167)],Q=(_0x1d4abd,_0x55ea39,_0xa2396e,_0x45cc93)=>{const _0x341bf6=_0x156056;for(var _0x2601e6=_0x45cc93>0x1?void 0x0:_0x45cc93?k(_0x55ea39,_0xa2396e):_0x55ea39,_0x463efd=_0x1d4abd[_0x341bf6(0x130)]-0x1,_0x26ffd5;_0x463efd>=0x0;_0x463efd--)(_0x26ffd5=_0x1d4abd[_0x463efd])&&(_0x2601e6=_0x26ffd5(_0x2601e6)||_0x2601e6);return _0x2601e6;},_=(_0x44f823,_0x4e6144)=>(_0x52e865,_0x1a0aec)=>_0x4e6144(_0x52e865,_0x1a0aec,_0x44f823);function X(_0x1c5532,_0x44d280){const _0x299dd1=_0x156056,_0x513332=_0x1c5532['replies'][0x0];return{..._0x44d280,'id':_0x513332[_0x299dd1(0x15a)],'resolved':_0x1c5532[_0x299dd1(0x145)]===0x1,'dT':D(_0x513332[_0x299dd1(0x160)]),'personId':_0x513332[_0x299dd1(0x12e)],'threadId':_0x513332[_0x299dd1(0x121)]};}function ee(_0x1782e9,_0x1aa38b,_0x44d93c){const _0x41a88e=_0x156056;var _0x266e7e,_0x4ccf46;if(((_0x4ccf46=(_0x266e7e=_0x1782e9==null?void 0x0:_0x1782e9[_0x41a88e(0x140)])==null?void 0x0:_0x266e7e[_0x41a88e(0x130)])!=null?_0x4ccf46:0x0)>0x0){const _0x2be37d=(_0x1ac1d6,_0x187c23)=>({'id':_0x1ac1d6['replyId'],'threadId':_0x1ac1d6['threadId'],'dT':D(_0x1ac1d6[_0x41a88e(0x160)]),'personId':_0x1ac1d6['userId'],'resolved':_0x1782e9[_0x41a88e(0x145)]===I['Solved'],'unitId':_0x1aa38b,'subUnitId':_0x44d93c,'text':JSON['parse'](_0x1ac1d6[_0x41a88e(0x16b)]),'parentId':_0x187c23}),_0xfb42ee=_0x2be37d(_0x1782e9[_0x41a88e(0x140)][0x0]);return{..._0xfb42ee,'children':_0x1782e9['replies'][_0x41a88e(0x153)](0x1)[_0x41a88e(0x143)](_0x192254=>_0x2be37d(_0x192254,_0xfb42ee['id']))};}return null;}let f=class{constructor(_0xe36bad,_0x28940f,_0x468e6b,_0x3e00d5){const _0x41b8e8=_0x156056;this[_0x41b8e8(0x11a)]=_0xe36bad,this['_userService']=_0x28940f,this['_sessionService']=_0x468e6b,this[_0x41b8e8(0x155)]=_0x3e00d5;}async[_0x156056(0x147)](_0x41e943){const _0x3f87cb=_0x156056;var _0x26dab2,_0x5b8a0c;const {parentId:_0x1ef24b,unitId:_0x28a974,text:_0x2984a5,threadId:_0x27aa9a}=_0x41e943,_0x3ab062=(_0x5b8a0c=(_0x26dab2=_0x2984a5[_0x3f87cb(0x16a)])==null?void 0x0:_0x26dab2[_0x3f87cb(0x12a)](_0x175e95=>_0x175e95[_0x3f87cb(0x15d)]===_0x364f98['COMMENT'])['map'](_0x517bf9=>_0x517bf9[_0x3f87cb(0x12b)]))!=null?_0x5b8a0c:[],_0x4e47a1=JSON[_0x3f87cb(0x146)](_0x2984a5),_0x37d0f2=(await this[_0x3f87cb(0x11e)][_0x3f87cb(0x139)](_0x28a974))[_0x3f87cb(0x125)]();if(_0x1ef24b){const _0x32edac={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062,'threadId':_0x27aa9a},_0x5e3c83=(await this[_0x3f87cb(0x11a)]['post'](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x13b),{'body':_0x32edac}))[_0x3f87cb(0x13e)][_0x3f87cb(0x148)];return{..._0x41e943,'id':_0x5e3c83[_0x3f87cb(0x15a)],'dT':_0x29a7b8(+_0x5e3c83[_0x3f87cb(0x160)])[_0x3f87cb(0x122)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5e3c83['userId']};}else{const _0x2263db={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062},_0x17a925=await this[_0x3f87cb(0x11a)][_0x3f87cb(0x13c)](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x123),{'body':_0x2263db});return X(_0x17a925[_0x3f87cb(0x13e)][_0x3f87cb(0x159)],_0x41e943);}}async['updateComment'](_0xb833f8){const _0x2e1b21=_0x156056;var _0x5e6b70,_0x9c7b7a;const {text:_0x4da092,unitId:_0x346bf5}=_0xb833f8,_0x5554d4=(_0x9c7b7a=(_0x5e6b70=_0x4da092[_0x2e1b21(0x16a)])==null?void 0x0:_0x5e6b70[_0x2e1b21(0x12a)](_0x249967=>_0x249967['rangeType']===_0x364f98['COMMENT'])[_0x2e1b21(0x143)](_0x4028bc=>_0x4028bc[_0x2e1b21(0x12b)]))!=null?_0x9c7b7a:[],_0x54e6fc=JSON[_0x2e1b21(0x146)](_0x4da092),_0x1e74ca=_0xb833f8[_0x2e1b21(0x121)],_0x4e0a64=_0xb833f8['id'],_0xa7a531={'memberId':(await this[_0x2e1b21(0x11e)][_0x2e1b21(0x139)](_0x346bf5))[_0x2e1b21(0x125)](),'unitId':_0x346bf5,'threadId':_0x1e74ca,'mention':_0x5554d4,'content':_0x54e6fc,'replyId':_0x4e0a64},_0x32f297=await this[_0x2e1b21(0x11a)][_0x2e1b21(0x13c)]('/universer-api/comment/unit/'+_0x346bf5+'/edit',{'body':_0xa7a531});return!_0x32f297['body']['error']||_0x32f297['body'][_0x2e1b21(0x13f)]['code']===0x1;}async['resolveComment'](_0x476469){const _0x14c8f0=_0x156056,{unitId:_0x10b187}=_0x476469,_0x569166=_0x476469[_0x14c8f0(0x121)],_0x59123f={'memberId':this[_0x14c8f0(0x164)][_0x14c8f0(0x154)]()[_0x14c8f0(0x10f)],'unitId':_0x10b187,'threadId':_0x569166,'solved':_0x476469[_0x14c8f0(0x16c)]?I[_0x14c8f0(0x11b)]:I[_0x14c8f0(0x158)]},_0x478d60=await this[_0x14c8f0(0x11a)][_0x14c8f0(0x13c)]('/universer-api/comment/unit/'+_0x10b187+_0x14c8f0(0x120),{'body':_0x59123f});return!_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)]||_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)][_0x14c8f0(0x131)]===0x1;}async['deleteComment'](_0x103939,_0x5d3b85,_0x3a5fca,_0x305080){const _0x167b49=_0x156056,_0x2262bf={'memberId':(await this[_0x167b49(0x11e)][_0x167b49(0x139)](_0x103939))[_0x167b49(0x125)](),'threadId':_0x3a5fca,'replyId':_0x305080,'unitId':_0x103939},_0x5c6d03=await this[_0x167b49(0x11a)][_0x167b49(0x13c)]('/universer-api/comment/unit/'+_0x103939+_0x167b49(0x137),{'body':_0x2262bf});return!_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)]||_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)][_0x167b49(0x131)]===0x1;}async['listComments'](_0x242f39,_0x3770c4,_0x4cc007){const _0x2565fc=_0x156056,_0x373546={'unitId':_0x242f39,'threadId':_0x4cc007},_0x304036=await this[_0x2565fc(0x11a)]['post'](_0x2565fc(0x14f)+_0x242f39+'/list',{'body':_0x373546}),_0x3dd9b9=_0x4cc007[_0x2565fc(0x143)](_0x52a210=>ee(_0x304036[_0x2565fc(0x13e)][_0x2565fc(0x15b)][_0x52a210],_0x242f39,_0x3770c4))['filter'](Boolean);return Object[_0x2565fc(0x113)](_0x304036[_0x2565fc(0x13e)]['users'])[_0x2565fc(0x134)](_0x563f1b=>{const _0x124cd9=_0x2565fc;this['_userService'][_0x124cd9(0x161)](_0x563f1b);}),_0x3dd9b9;}['saveCommentToSnapshot'](_0x38cf18){const _0x187eea=_0x156056;return{'id':_0x38cf18['id'],'threadId':_0x38cf18[_0x187eea(0x121)],'ref':_0x38cf18[_0x187eea(0x169)]};}};f=Q([_(0x0,_0xa1f4a5(_0x581e56)),_(0x1,_0xa1f4a5(_0x3b7c6a)),_(0x2,_0xa1f4a5(_0x55d06f)),_(0x3,_0xa1f4a5(_0x467e49))],f);var re=Object[_0x156056(0x167)],te=(_0x458293,_0x1ca14f,_0x4207b3,_0x46b4a4)=>{const _0x580f09=_0x156056;for(var _0x17d475=_0x46b4a4>0x1?void 0x0:_0x46b4a4?re(_0x1ca14f,_0x4207b3):_0x1ca14f,_0x7153ca=_0x458293[_0x580f09(0x130)]-0x1,_0x10f1b2;_0x7153ca>=0x0;_0x7153ca--)(_0x10f1b2=_0x458293[_0x7153ca])&&(_0x17d475=_0x10f1b2(_0x17d475)||_0x17d475);return _0x17d475;},N=(_0x3c6250,_0x134122)=>(_0x1517f3,_0x3fc326)=>_0x134122(_0x1517f3,_0x3fc326,_0x3c6250);let g=class extends _0x329f5c{constructor(_0xe81fa,_0x2417c9){const _0x4c0951=_0x156056;super(),this[_0x4c0951(0x14c)]=_0xe81fa,this[_0x4c0951(0x156)]=_0x2417c9,this[_0x4c0951(0x124)]();}['_initDataSource'](){const _0x1515a1=_0x156056;this[_0x1515a1(0x14c)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa48844),N(0x1,_0xa1f4a5(f))],g);var se=Object['defineProperty'],oe=Object[_0x156056(0x167)],ne=(_0x1e35b8,_0x3f0a5c,_0x358331)=>_0x3f0a5c in _0x1e35b8?se(_0x1e35b8,_0x3f0a5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x358331}):_0x1e35b8[_0x3f0a5c]=_0x358331,ie=(_0x3619b6,_0xe59082,_0xb271be,_0x1c0fa4)=>{const _0x3328b6=_0x156056;for(var _0x13fa9f=_0x1c0fa4>0x1?void 0x0:_0x1c0fa4?oe(_0xe59082,_0xb271be):_0xe59082,_0x3a80cc=_0x3619b6[_0x3328b6(0x130)]-0x1,_0x349c6e;_0x3a80cc>=0x0;_0x3a80cc--)(_0x349c6e=_0x3619b6[_0x3a80cc])&&(_0x13fa9f=_0x349c6e(_0x13fa9f)||_0x13fa9f);return _0x13fa9f;},w=(_0x39533e,_0x26f6c4)=>(_0x4c2b17,_0xd48a5c)=>_0x26f6c4(_0x4c2b17,_0xd48a5c,_0x39533e),$=(_0x4bbf12,_0x1c041a,_0x2cdcf2)=>ne(_0x4bbf12,typeof _0x1c041a!=_0x156056(0x10e)?_0x1c041a+'':_0x1c041a,_0x2cdcf2);let b=class extends _0x239e11{constructor(_0x45dd26=M,_0x116394,_0x1bfa8a){const _0x2a1210=_0x156056;super(),this['_config']=_0x45dd26,this['_injector']=_0x116394,this[_0x2a1210(0x138)]=_0x1bfa8a;const {..._0x37b173}=_0x29ada1({},M,this[_0x2a1210(0x110)]);this[_0x2a1210(0x138)][_0x2a1210(0x11d)](z,_0x37b173);}[_0x156056(0x14d)](){const _0xfad2c7=_0x156056;[[f],[g],[S]][_0xfad2c7(0x134)](_0x2fbabf=>{const _0x42ca9f=_0xfad2c7;this[_0x42ca9f(0x155)][_0x42ca9f(0x112)](_0x2fbabf);});}[_0x156056(0x135)](){const _0x4d1d01=_0x156056;this[_0x4d1d01(0x155)]['get'](g),this[_0x4d1d01(0x155)][_0x4d1d01(0x14e)](S);}};$(b,'pluginName',W),$(b,_0x156056(0x117),_0x5183dd['UNIVER_UNKNOWN']),b=ie([_0x12fb17(_0x507370,_0x2a0e3c,_0x576c81),w(0x1,_0xa1f4a5(_0x467e49)),w(0x2,_0x1abcfa)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x6057(){const _0x133ab9=['_threadCommentDataSource','solved','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','907275iVNiHF','listComments','resolveComment','Delete','setConfig','length','UniverThreadCommentUIPlugin','_config','customRanges','@univerjs-pro/license','Add','@univerjs/thread-comment-ui','threadId','_sessionService','_httpService','reply','/delete','addComment','_threadCommentDataSourceService','error','OpenOrReOpen','saveCommentToSnapshot','UniverProThreadCommentDatasource','root','@univerjs/thread-comment','createTimestamp','UniverInstanceType','parse','function','_userService','Inject','Unknown','@univerjs/core','resolved','getCurrentUser','/list','Injector','pluginName','replyId','Solve','89395yoxRvf','map','UserManagerService','user','pipe','users','13469157PJpxIx','syncUpdateMutationToColla','unitId','replies','HTTPService','CollaborationSessionService','Disposable','UniverNetwork','YYYY/MM/DD\x20HH:mm','subscribe','slice','8FLPaiK','commentUpdate$','_initUserSync','7160480oIGJul','stringify','1374762PaJEtJ','code','UniverProLicense','delete','UniverProCollaborationClient','/universer-api/comment/unit/','userId','_commentService','disposeWithMe','IConfigService','body','getMemberID','addUser','Reply','UniverLicensePlugin','Module','/solved','format','439762TclnXG','thread-comment-data-source.config','deleteComment','userID','3vfwSDl','rxjs','@univerjs-pro/collaboration-client','Solved','rangeId','_threadCommentModel','rangeType','forEach','_init','size','UNRECOGNIZED','type','CommentService','_injector','@univerjs/network','getComment','1391768UGoMxo','UniverThreadCommentDataSourcePlugin','content','values','filter','ThreadCommentModel','personId','UniverThreadCommentUi','Edit','/universer-api/user/list','add','defineProperty','COMMENT','requireSession','UniverCore','getUnit','/edit','exports','onReady','Plugin','ref','comments','get','getOwnPropertyDescriptor'];_0x6057=function(){return _0x133ab9;};return _0x6057();}function _0x5ae5(_0x38d34e,_0x1bcf9){const _0x60571a=_0x6057();return _0x5ae5=function(_0x5ae5c1,_0xe2a48b){_0x5ae5c1=_0x5ae5c1-0xf3;let _0x1ed3ac=_0x60571a[_0x5ae5c1];return _0x1ed3ac;},_0x5ae5(_0x38d34e,_0x1bcf9);}(function(_0x237eef,_0x2bd2a7){const _0x238f37=_0x5ae5,_0x1966c8=_0x237eef();while(!![]){try{const _0x508e4f=parseInt(_0x238f37(0x10f))/0x1*(parseInt(_0x238f37(0x10b))/0x2)+-parseInt(_0x238f37(0x13b))/0x3*(parseInt(_0x238f37(0xf4))/0x4)+parseInt(_0x238f37(0x163))/0x5+-parseInt(_0x238f37(0xf9))/0x6+parseInt(_0x238f37(0x11f))/0x7+-parseInt(_0x238f37(0xf7))/0x8+parseInt(_0x238f37(0x169))/0x9;if(_0x508e4f===_0x2bd2a7)break;else _0x1966c8['push'](_0x1966c8['shift']());}catch(_0x319636){_0x1966c8['push'](_0x1966c8['shift']());}}}(_0x6057,0x9d32a),function(_0x19a642,_0x270093){const _0x5bc7e4=_0x5ae5;typeof exports=='object'&&typeof module<'u'?_0x270093(exports,require(_0x5bc7e4(0x111)),require(_0x5bc7e4(0x144)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x5bc7e4(0x153)),require(_0x5bc7e4(0x110)),require(_0x5bc7e4(0x11d))):typeof define==_0x5bc7e4(0x157)&&define['amd']?define([_0x5bc7e4(0x130),_0x5bc7e4(0x111),_0x5bc7e4(0x144),_0x5bc7e4(0x15b),_0x5bc7e4(0x146),'@univerjs/thread-comment',_0x5bc7e4(0x110),'@univerjs/network'],_0x270093):(_0x19a642=typeof globalThis<'u'?globalThis:_0x19a642||self,_0x270093(_0x19a642[_0x5bc7e4(0x151)]={},_0x19a642[_0x5bc7e4(0xfd)],_0x19a642[_0x5bc7e4(0xfb)],_0x19a642[_0x5bc7e4(0x12d)],_0x19a642[_0x5bc7e4(0x126)],_0x19a642['UniverThreadComment'],_0x19a642[_0x5bc7e4(0x110)],_0x19a642[_0x5bc7e4(0x170)]));}(this,function(_0x4c5a1d,_0x5db40d,_0x49175c,_0x4dad87,_0x363a5d,_0xa8d050,_0x4250f1,_0x3449f0){'use strict';const _0x24d34b=_0x5ae5;const _0x402554=_0x24d34b(0x13a);var _0x3560d6=(_0x58ea7b=>(_0x58ea7b[_0x58ea7b[_0x24d34b(0x14f)]=0x0]='OpenOrReOpen',_0x58ea7b[_0x58ea7b['Solved']=0x1]=_0x24d34b(0x112),_0x58ea7b[_0x58ea7b[_0x24d34b(0x119)]=-0x1]='UNRECOGNIZED',_0x58ea7b))(_0x3560d6||{}),_0x307f58=(_0x8e97c5=>(_0x8e97c5[_0x8e97c5['Unknown']=0x0]=_0x24d34b(0x15a),_0x8e97c5[_0x8e97c5[_0x24d34b(0x145)]=0x1]=_0x24d34b(0x145),_0x8e97c5[_0x8e97c5['Reply']=0x2]=_0x24d34b(0x106),_0x8e97c5[_0x8e97c5[_0x24d34b(0x127)]=0x3]=_0x24d34b(0x127),_0x8e97c5[_0x8e97c5[_0x24d34b(0x13e)]=0x4]=_0x24d34b(0x13e),_0x8e97c5[_0x8e97c5[_0x24d34b(0x162)]=0x5]='Solve',_0x8e97c5[_0x8e97c5[_0x24d34b(0x119)]=-0x1]=_0x24d34b(0x119),_0x8e97c5))(_0x307f58||{});const _0x1e5699=_0x534ad3=>_0x4dad87['dayjs'](new Date(+_0x534ad3))['format']('YYYY/MM/DD\x20HH:mm'),_0x3d55f4=async(_0x401617,_0x1bb1c9)=>{const _0x5b2b8e=_0x24d34b,_0x1610c5=_0x401617['get'](_0x4dad87['UserManagerService']),_0x56f041=_0x401617['get'](_0x3449f0[_0x5b2b8e(0x16d)]);_0x1bb1c9[_0x5b2b8e(0x116)](_0x160b93=>{const _0x578227=_0x5b2b8e;_0x1610c5['getUser'](_0x160b93)&&_0x1bb1c9[_0x578227(0xfc)](_0x160b93);}),_0x1bb1c9[_0x5b2b8e(0x118)]&&(await _0x56f041['get'](_0x5b2b8e(0x128),{'params':{'userIDs':[..._0x1bb1c9]}}))[_0x5b2b8e(0x103)][_0x5b2b8e(0x168)][_0x5b2b8e(0x116)](_0x558ee1=>{const _0x18adb1=_0x5b2b8e;_0x558ee1&&_0x1610c5[_0x18adb1(0x105)](_0x558ee1);});};var _0x3fe12d=Object[_0x24d34b(0x136)],_0x188212=(_0x10285a,_0x5d68f2,_0x5056bf,_0x560009)=>{for(var _0x42e59a=_0x560009>0x1?void 0x0:_0x560009?_0x3fe12d(_0x5d68f2,_0x5056bf):_0x5d68f2,_0x6399fb=_0x10285a['length']-0x1,_0x54e201;_0x6399fb>=0x0;_0x6399fb--)(_0x54e201=_0x10285a[_0x6399fb])&&(_0x42e59a=_0x54e201(_0x42e59a)||_0x42e59a);return _0x42e59a;},_0x2e6f16=(_0x183293,_0x39087b)=>(_0x5cb4e2,_0x19b797)=>_0x39087b(_0x5cb4e2,_0x19b797,_0x183293);let _0x5d559c=class extends _0x4dad87[_0x24d34b(0x16f)]{constructor(_0x469e38,_0x1ac95d,_0x5688d3,_0x3d42c1){const _0x4ae873=_0x24d34b;super(),this[_0x4ae873(0x100)]=_0x469e38,this[_0x4ae873(0x114)]=_0x1ac95d,this['_userService']=_0x5688d3,this[_0x4ae873(0x11c)]=_0x3d42c1,this[_0x4ae873(0x117)](),this[_0x4ae873(0xf6)]();}[_0x24d34b(0xf6)](){const _0xb3fd1=_0x24d34b;this[_0xb3fd1(0x101)](this[_0xb3fd1(0x114)]['commentUpdate$'][_0xb3fd1(0x167)](_0x4250f1['bufferTime'](0x10))[_0xb3fd1(0x172)](_0xd7e23d=>{const _0x5babd1=_0xb3fd1,_0xd27f0b=new Set();_0xd7e23d[_0x5babd1(0x116)](_0x42e423=>{const _0x32d241=_0x5babd1;switch(_0x42e423[_0x32d241(0x11a)]){case'add':{const _0x2181a7=_0x42e423['payload'][_0x32d241(0x125)];_0xd27f0b[_0x32d241(0x129)](_0x2181a7);break;}}}),_0x3d55f4(this['_injector'],_0xd27f0b);}));}[_0x24d34b(0x117)](){const _0x533cc2=_0x24d34b;this[_0x533cc2(0x101)](this[_0x533cc2(0x100)][_0x533cc2(0xf5)]['subscribe'](async _0x518074=>{const _0xab6a48=_0x533cc2;var _0x3a8f38,_0x341156,_0x2cefe5,_0x209ca8;const _0x44fc57=(_0x3a8f38=this[_0xab6a48(0x114)][_0xab6a48(0x12e)](_0x518074[_0xab6a48(0x16b)])['find'](_0x158ee2=>_0x158ee2[_0xab6a48(0x147)]===_0x518074[_0xab6a48(0x147)]))==null?void 0x0:_0x3a8f38[_0xab6a48(0x152)];if(!_0x44fc57)return;const {unitId:_0x94028f,subUnitId:_0x30a0e9}=_0x44fc57;switch(_0x518074[_0xab6a48(0x166)]&&this[_0xab6a48(0x158)]['addUser'](_0x518074[_0xab6a48(0x166)]),_0x518074[_0xab6a48(0x11a)]){case _0x307f58[_0xab6a48(0x145)]:break;case _0x307f58['Reply']:{this[_0xab6a48(0x114)][_0xab6a48(0x14c)](_0x94028f,_0x30a0e9,{'unitId':_0x94028f,'subUnitId':_0x30a0e9,'ref':'','id':_0x518074[_0xab6a48(0x161)],'dT':_0x1e5699(+_0x518074[_0xab6a48(0x154)]),'threadId':_0x518074[_0xab6a48(0x147)],'personId':(_0x2cefe5=(_0x341156=_0x518074[_0xab6a48(0x166)])==null?void 0x0:_0x341156[_0xab6a48(0x10e)])!=null?_0x2cefe5:_0x518074[_0xab6a48(0xff)],'text':JSON[_0xab6a48(0x156)](_0x518074[_0xab6a48(0x121)]),'parentId':_0x44fc57['id']});break;}case _0x307f58[_0xab6a48(0x13e)]:{const _0x34f765=this[_0xab6a48(0x114)][_0xab6a48(0x11e)](_0x94028f,_0x30a0e9,_0x518074[_0xab6a48(0x161)]);_0x34f765&&_0x34f765['parentId']&&this[_0xab6a48(0x114)]['deleteComment'](_0x94028f,_0x30a0e9,_0x518074[_0xab6a48(0x161)]);break;}case _0x307f58[_0xab6a48(0x127)]:{this['_threadCommentModel']['updateComment'](_0x94028f,_0x30a0e9,{'commentId':_0x518074[_0xab6a48(0x161)],'text':JSON[_0xab6a48(0x156)](_0x518074[_0xab6a48(0x121)])});break;}case _0x307f58['Solve']:{const _0x529107=(_0x209ca8=this[_0xab6a48(0x114)][_0xab6a48(0x12e)](_0x518074['unitId'])['find'](_0x4becb6=>_0x4becb6[_0xab6a48(0x147)]===_0x518074[_0xab6a48(0x147)]))==null?void 0x0:_0x209ca8[_0xab6a48(0x152)];_0x529107&&this[_0xab6a48(0x114)][_0xab6a48(0x13d)](_0x94028f,_0x30a0e9,_0x529107['id'],_0x518074[_0xab6a48(0x138)]===_0x3560d6[_0xab6a48(0x112)]);break;}}}));}};_0x5d559c=_0x188212([_0x2e6f16(0x0,_0x4dad87[_0x24d34b(0x159)](_0x5db40d[_0x24d34b(0x11b)])),_0x2e6f16(0x1,_0x4dad87[_0x24d34b(0x159)](_0xa8d050[_0x24d34b(0x124)])),_0x2e6f16(0x2,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x165)])),_0x2e6f16(0x3,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x15f)]))],_0x5d559c);const _0x2e3917=_0x24d34b(0x10c),_0x58d64e={};var _0x20c029=Object['getOwnPropertyDescriptor'],_0x11874d=(_0x45eb13,_0x59d278,_0x752376,_0x503e6f)=>{const _0x11da0a=_0x24d34b;for(var _0x348df2=_0x503e6f>0x1?void 0x0:_0x503e6f?_0x20c029(_0x59d278,_0x752376):_0x59d278,_0x50966d=_0x45eb13[_0x11da0a(0x140)]-0x1,_0x6714f2;_0x50966d>=0x0;_0x50966d--)(_0x6714f2=_0x45eb13[_0x50966d])&&(_0x348df2=_0x6714f2(_0x348df2)||_0x348df2);return _0x348df2;},_0x5527e9=(_0x21e5cb,_0x3f72f0)=>(_0x1ca4c6,_0x2745a9)=>_0x3f72f0(_0x1ca4c6,_0x2745a9,_0x21e5cb);function _0x16da18(_0x4ed909,_0xf64923){const _0xacd31e=_0x24d34b,_0x348853=_0x4ed909[_0xacd31e(0x16c)][0x0];return{..._0xf64923,'id':_0x348853[_0xacd31e(0x161)],'resolved':_0x4ed909[_0xacd31e(0x138)]===0x1,'dT':_0x1e5699(_0x348853[_0xacd31e(0x154)]),'personId':_0x348853[_0xacd31e(0xff)],'threadId':_0x348853[_0xacd31e(0x147)]};}function _0x250e8d(_0x262900,_0x1483ec,_0x4b4420){const _0x3fbddf=_0x24d34b;var _0x2c2202,_0x15242a;if(((_0x15242a=(_0x2c2202=_0x262900==null?void 0x0:_0x262900['replies'])==null?void 0x0:_0x2c2202[_0x3fbddf(0x140)])!=null?_0x15242a:0x0)>0x0){const _0x2e1bc2=(_0x3b13d4,_0x8e57f3)=>({'id':_0x3b13d4['replyId'],'threadId':_0x3b13d4[_0x3fbddf(0x147)],'dT':_0x1e5699(_0x3b13d4['createTimestamp']),'personId':_0x3b13d4['userId'],'resolved':_0x262900[_0x3fbddf(0x138)]===_0x3560d6[_0x3fbddf(0x112)],'unitId':_0x1483ec,'subUnitId':_0x4b4420,'text':JSON['parse'](_0x3b13d4[_0x3fbddf(0x121)]),'parentId':_0x8e57f3}),_0x2df3f2=_0x2e1bc2(_0x262900[_0x3fbddf(0x16c)][0x0]);return{..._0x2df3f2,'children':_0x262900[_0x3fbddf(0x16c)][_0x3fbddf(0xf3)](0x1)['map'](_0x566648=>_0x2e1bc2(_0x566648,_0x2df3f2['id']))};}return null;}let _0x535911=class{constructor(_0x3d26cc,_0x46150c,_0x1bba98,_0x22c7ff){const _0x3223d4=_0x24d34b;this[_0x3223d4(0x149)]=_0x3d26cc,this[_0x3223d4(0x158)]=_0x46150c,this[_0x3223d4(0x148)]=_0x1bba98,this['_injector']=_0x22c7ff;}async[_0x24d34b(0x14c)](_0x514df3){const _0x568633=_0x24d34b;var _0x168eda,_0x477322;const {parentId:_0x298b2b,unitId:_0x4f7afc,text:_0x305c2a,threadId:_0x3803e2}=_0x514df3,_0x12f86c=(_0x477322=(_0x168eda=_0x305c2a[_0x568633(0x143)])==null?void 0x0:_0x168eda[_0x568633(0x123)](_0xfd360c=>_0xfd360c[_0x568633(0x115)]===_0x4dad87['CustomRangeType'][_0x568633(0x12b)])[_0x568633(0x164)](_0x397965=>_0x397965[_0x568633(0x113)]))!=null?_0x477322:[],_0x5da794=JSON[_0x568633(0xf8)](_0x305c2a),_0x2c90fc=(await this[_0x568633(0x148)][_0x568633(0x12c)](_0x4f7afc))[_0x568633(0x104)]();if(_0x298b2b){const _0x4081b5={'memberId':_0x2c90fc,'unitId':_0x4f7afc,'content':_0x5da794,'mention':_0x12f86c,'threadId':_0x3803e2},_0xfa7659=(await this[_0x568633(0x149)][_0x568633(0x139)]('/universer-api/comment/unit/'+_0x4f7afc+'/reply',{'body':_0x4081b5}))[_0x568633(0x103)][_0x568633(0x14a)];return{..._0x514df3,'id':_0xfa7659['replyId'],'dT':_0x4dad87['dayjs'](+_0xfa7659['createTimestamp'])[_0x568633(0x10a)](_0x568633(0x171)),'personId':_0xfa7659[_0x568633(0xff)]};}else{const _0x559aa9={'memberId':_0x2c90fc,'unitId':_0x4f7afc,'content':_0x5da794,'mention':_0x12f86c},_0x4c5b1f=await this['_httpService'][_0x568633(0x139)](_0x568633(0xfe)+_0x4f7afc+'/add',{'body':_0x559aa9});return _0x16da18(_0x4c5b1f[_0x568633(0x103)]['comment'],_0x514df3);}}async['updateComment'](_0xc73557){const _0x520cba=_0x24d34b;var _0x917cdf,_0x13a142;const {text:_0x1eca22,unitId:_0xc40cbb}=_0xc73557,_0x59d2cd=(_0x13a142=(_0x917cdf=_0x1eca22[_0x520cba(0x143)])==null?void 0x0:_0x917cdf[_0x520cba(0x123)](_0x30954c=>_0x30954c[_0x520cba(0x115)]===_0x4dad87['CustomRangeType'][_0x520cba(0x12b)])[_0x520cba(0x164)](_0x172db6=>_0x172db6[_0x520cba(0x113)]))!=null?_0x13a142:[],_0x2d7011=JSON['stringify'](_0x1eca22),_0x1bf5dd=_0xc73557[_0x520cba(0x147)],_0x182b8b=_0xc73557['id'],_0x28c5bd={'memberId':(await this['_sessionService'][_0x520cba(0x12c)](_0xc40cbb))[_0x520cba(0x104)](),'unitId':_0xc40cbb,'threadId':_0x1bf5dd,'mention':_0x59d2cd,'content':_0x2d7011,'replyId':_0x182b8b},_0x544af1=await this[_0x520cba(0x149)][_0x520cba(0x139)](_0x520cba(0xfe)+_0xc40cbb+_0x520cba(0x12f),{'body':_0x28c5bd});return!_0x544af1[_0x520cba(0x103)][_0x520cba(0x14e)]||_0x544af1['body'][_0x520cba(0x14e)][_0x520cba(0xfa)]===0x1;}async[_0x24d34b(0x13d)](_0xae486f){const _0x5ce4d7=_0x24d34b,{unitId:_0xacbe96}=_0xae486f,_0x38e619=_0xae486f[_0x5ce4d7(0x147)],_0x4b459f={'memberId':this['_userService'][_0x5ce4d7(0x15d)]()[_0x5ce4d7(0x10e)],'unitId':_0xacbe96,'threadId':_0x38e619,'solved':_0xae486f[_0x5ce4d7(0x15c)]?_0x3560d6[_0x5ce4d7(0x112)]:_0x3560d6[_0x5ce4d7(0x14f)]},_0x4b0ff3=await this[_0x5ce4d7(0x149)]['post'](_0x5ce4d7(0xfe)+_0xacbe96+_0x5ce4d7(0x109),{'body':_0x4b459f});return!_0x4b0ff3[_0x5ce4d7(0x103)][_0x5ce4d7(0x14e)]||_0x4b0ff3['body']['error'][_0x5ce4d7(0xfa)]===0x1;}async[_0x24d34b(0x10d)](_0x515600,_0x2a6b28,_0x1c9654,_0x7f3971){const _0x568546=_0x24d34b,_0x107f70={'memberId':(await this[_0x568546(0x148)][_0x568546(0x12c)](_0x515600))[_0x568546(0x104)](),'threadId':_0x1c9654,'replyId':_0x7f3971,'unitId':_0x515600},_0x35fec4=await this[_0x568546(0x149)]['post'](_0x568546(0xfe)+_0x515600+_0x568546(0x14b),{'body':_0x107f70});return!_0x35fec4[_0x568546(0x103)][_0x568546(0x14e)]||_0x35fec4[_0x568546(0x103)]['error'][_0x568546(0xfa)]===0x1;}async[_0x24d34b(0x13c)](_0x6e2e26,_0x3fff67,_0x1a9553){const _0x31cf5a=_0x24d34b,_0x25bfcd={'unitId':_0x6e2e26,'threadId':_0x1a9553},_0x5e6c91=await this['_httpService'][_0x31cf5a(0x139)](_0x31cf5a(0xfe)+_0x6e2e26+_0x31cf5a(0x15e),{'body':_0x25bfcd}),_0x461779=_0x1a9553[_0x31cf5a(0x164)](_0x3e3360=>_0x250e8d(_0x5e6c91[_0x31cf5a(0x103)][_0x31cf5a(0x134)][_0x3e3360],_0x6e2e26,_0x3fff67))[_0x31cf5a(0x123)](Boolean);return Object[_0x31cf5a(0x122)](_0x5e6c91['body'][_0x31cf5a(0x168)])['forEach'](_0x178998=>{const _0x213dbb=_0x31cf5a;this[_0x213dbb(0x158)][_0x213dbb(0x105)](_0x178998);}),_0x461779;}[_0x24d34b(0x150)](_0x25d319){const _0x30f6ea=_0x24d34b;return{'id':_0x25d319['id'],'threadId':_0x25d319[_0x30f6ea(0x147)],'ref':_0x25d319[_0x30f6ea(0x133)]};}};_0x535911=_0x11874d([_0x5527e9(0x0,_0x4dad87[_0x24d34b(0x159)](_0x3449f0[_0x24d34b(0x16d)])),_0x5527e9(0x1,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x165)])),_0x5527e9(0x2,_0x4dad87[_0x24d34b(0x159)](_0x5db40d[_0x24d34b(0x16e)])),_0x5527e9(0x3,_0x4dad87[_0x24d34b(0x159)](_0x4dad87['Injector']))],_0x535911);var _0x1bb9de=Object[_0x24d34b(0x136)],_0x3c7974=(_0x5e1cc4,_0x348c2b,_0x3132b6,_0x52a118)=>{const _0x30511a=_0x24d34b;for(var _0x341a2e=_0x52a118>0x1?void 0x0:_0x52a118?_0x1bb9de(_0x348c2b,_0x3132b6):_0x348c2b,_0x232bfe=_0x5e1cc4[_0x30511a(0x140)]-0x1,_0xa50cdc;_0x232bfe>=0x0;_0x232bfe--)(_0xa50cdc=_0x5e1cc4[_0x232bfe])&&(_0x341a2e=_0xa50cdc(_0x341a2e)||_0x341a2e);return _0x341a2e;},_0x4340cf=(_0x29dac1,_0x45b115)=>(_0x51dc86,_0x57096b)=>_0x45b115(_0x51dc86,_0x57096b,_0x29dac1);let _0xe6cef6=class extends _0x4dad87[_0x24d34b(0x16f)]{constructor(_0x562637,_0x57da4f){const _0x4a3cc8=_0x24d34b;super(),this['_threadCommentDataSourceService']=_0x562637,this[_0x4a3cc8(0x137)]=_0x57da4f,this['_initDataSource']();}['_initDataSource'](){const _0x5e2852=_0x24d34b;this['_threadCommentDataSourceService']['dataSource']=this[_0x5e2852(0x137)],this[_0x5e2852(0x14d)][_0x5e2852(0x16a)]=!0x1;}};_0xe6cef6=_0x3c7974([_0x4340cf(0x0,_0xa8d050['IThreadCommentDataSourceService']),_0x4340cf(0x1,_0x4dad87[_0x24d34b(0x159)](_0x535911))],_0xe6cef6);var _0x2fd057=Object[_0x24d34b(0x12a)],_0x5dac66=Object[_0x24d34b(0x136)],_0x50df60=(_0x2f811c,_0x1db823,_0x330916)=>_0x1db823 in _0x2f811c?_0x2fd057(_0x2f811c,_0x1db823,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x330916}):_0x2f811c[_0x1db823]=_0x330916,_0x1fd31e=(_0x49294b,_0x51351a,_0x34f392,_0x101668)=>{const _0x2dcd9c=_0x24d34b;for(var _0x7a0e38=_0x101668>0x1?void 0x0:_0x101668?_0x5dac66(_0x51351a,_0x34f392):_0x51351a,_0xa87f0b=_0x49294b[_0x2dcd9c(0x140)]-0x1,_0x4f561c;_0xa87f0b>=0x0;_0xa87f0b--)(_0x4f561c=_0x49294b[_0xa87f0b])&&(_0x7a0e38=_0x4f561c(_0x7a0e38)||_0x7a0e38);return _0x7a0e38;},_0x4a3b06=(_0x2f3c1b,_0x2c7c12)=>(_0x163be0,_0x5f28de)=>_0x2c7c12(_0x163be0,_0x5f28de,_0x2f3c1b),_0x205de5=(_0x21b01c,_0x8e8a62,_0x4c8259)=>_0x50df60(_0x21b01c,typeof _0x8e8a62!='symbol'?_0x8e8a62+'':_0x8e8a62,_0x4c8259);_0x4c5a1d[_0x24d34b(0x120)]=class extends _0x4dad87[_0x24d34b(0x132)]{constructor(_0x535747=_0x58d64e,_0x55cbe1,_0x117e0f){const _0x29f169=_0x24d34b;super(),this[_0x29f169(0x142)]=_0x535747,this[_0x29f169(0x11c)]=_0x55cbe1,this['_configService']=_0x117e0f;const {..._0x3b139e}=_0x4dad87['merge']({},_0x58d64e,this[_0x29f169(0x142)]);this['_configService'][_0x29f169(0x13f)](_0x2e3917,_0x3b139e);}['onStarting'](){[[_0x535911],[_0xe6cef6],[_0x5d559c]]['forEach'](_0x56f73c=>{const _0x27932a=_0x5ae5;this[_0x27932a(0x11c)][_0x27932a(0x129)](_0x56f73c);});}[_0x24d34b(0x131)](){const _0x7abfa6=_0x24d34b;this[_0x7abfa6(0x11c)][_0x7abfa6(0x135)](_0xe6cef6),this['_injector'][_0x7abfa6(0x135)](_0x5d559c);}},_0x205de5(_0x4c5a1d[_0x24d34b(0x120)],_0x24d34b(0x160),_0x402554),_0x205de5(_0x4c5a1d[_0x24d34b(0x120)],'type',_0x4dad87[_0x24d34b(0x155)]['UNIVER_UNKNOWN']),_0x4c5a1d[_0x24d34b(0x120)]=_0x1fd31e([_0x4dad87['DependentOn'](_0x363a5d[_0x24d34b(0x141)],_0x5db40d['UniverCollaborationClientPlugin'],_0x49175c[_0x24d34b(0x107)]),_0x4a3b06(0x1,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x15f)])),_0x4a3b06(0x2,_0x4dad87[_0x24d34b(0x102)])],_0x4c5a1d[_0x24d34b(0x120)]),Object[_0x24d34b(0x12a)](_0x4c5a1d,Symbol['toStringTag'],{'value':_0x24d34b(0x108)});}));
1
+ (function(_0x1ce650,_0x415dbf){const _0x5a336e=_0x41de,_0x15b7c7=_0x1ce650();while(!![]){try{const _0x1aaf89=-parseInt(_0x5a336e(0x1c7))/0x1*(parseInt(_0x5a336e(0x20d))/0x2)+-parseInt(_0x5a336e(0x237))/0x3+-parseInt(_0x5a336e(0x23d))/0x4*(parseInt(_0x5a336e(0x1d2))/0x5)+parseInt(_0x5a336e(0x206))/0x6*(parseInt(_0x5a336e(0x1fd))/0x7)+parseInt(_0x5a336e(0x1d4))/0x8+-parseInt(_0x5a336e(0x204))/0x9+parseInt(_0x5a336e(0x229))/0xa*(parseInt(_0x5a336e(0x1e7))/0xb);if(_0x1aaf89===_0x415dbf)break;else _0x15b7c7['push'](_0x15b7c7['shift']());}catch(_0x25c2c1){_0x15b7c7['push'](_0x15b7c7['shift']());}}}(_0x1632,0x27e40),function(_0x587f7b,_0x134c09){const _0x1965da=_0x41de;typeof exports==_0x1965da(0x20e)&&typeof module<'u'?_0x134c09(exports,require(_0x1965da(0x223)),require('@univerjs-pro/license'),require(_0x1965da(0x1ff)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x1965da(0x1e1)),require(_0x1965da(0x1fc))):typeof define=='function'&&define['amd']?define(['exports',_0x1965da(0x223),_0x1965da(0x23c),_0x1965da(0x1ff),_0x1965da(0x1e5),_0x1965da(0x1fb),_0x1965da(0x1e1),_0x1965da(0x1fc)],_0x134c09):(_0x587f7b=typeof globalThis<'u'?globalThis:_0x587f7b||self,_0x134c09(_0x587f7b['UniverProThreadCommentDatasource']={},_0x587f7b[_0x1965da(0x1d1)],_0x587f7b['UniverProLicense'],_0x587f7b[_0x1965da(0x215)],_0x587f7b[_0x1965da(0x22f)],_0x587f7b['UniverThreadComment'],_0x587f7b[_0x1965da(0x1e1)],_0x587f7b['UniverNetwork']));}(this,function(_0x2a78b6,_0x32c2f9,_0x3978b6,_0x206fc5,_0x1cd1db,_0x5aad4a,_0x4f8cf8,_0x2a30c3){'use strict';const _0x501570=_0x41de;const _0x206c54=_0x501570(0x1f4);var _0x2a37cd=(_0x2c8a28=>(_0x2c8a28[_0x2c8a28[_0x501570(0x227)]=0x0]=_0x501570(0x227),_0x2c8a28[_0x2c8a28[_0x501570(0x1de)]=0x1]=_0x501570(0x1de),_0x2c8a28[_0x2c8a28[_0x501570(0x1e2)]=-0x1]=_0x501570(0x1e2),_0x2c8a28))(_0x2a37cd||{}),_0x5cfb89=(_0x5d64c2=>(_0x5d64c2[_0x5d64c2[_0x501570(0x207)]=0x0]=_0x501570(0x207),_0x5d64c2[_0x5d64c2[_0x501570(0x22e)]=0x1]=_0x501570(0x22e),_0x5d64c2[_0x5d64c2['Reply']=0x2]='Reply',_0x5d64c2[_0x5d64c2[_0x501570(0x214)]=0x3]=_0x501570(0x214),_0x5d64c2[_0x5d64c2[_0x501570(0x1dd)]=0x4]=_0x501570(0x1dd),_0x5d64c2[_0x5d64c2['Solve']=0x5]=_0x501570(0x225),_0x5d64c2[_0x5d64c2[_0x501570(0x1e2)]=-0x1]=_0x501570(0x1e2),_0x5d64c2))(_0x5cfb89||{});const _0x2568c8=_0x2ba203=>_0x206fc5[_0x501570(0x22a)](new Date(+_0x2ba203))[_0x501570(0x234)](_0x501570(0x1ce)),_0xf4c171=async(_0x142fd7,_0x52a1f3)=>{const _0x419791=_0x501570,_0x17165f=_0x142fd7['get'](_0x206fc5[_0x419791(0x1e4)]),_0x2dbd40=_0x142fd7[_0x419791(0x22b)](_0x2a30c3['HTTPService']);_0x52a1f3['forEach'](_0x10ac8b=>{const _0x31a495=_0x419791;_0x17165f[_0x31a495(0x1d5)](_0x10ac8b)&&_0x52a1f3['delete'](_0x10ac8b);}),_0x52a1f3[_0x419791(0x211)]&&(await _0x2dbd40[_0x419791(0x22b)](_0x419791(0x236),{'params':{'userIDs':[..._0x52a1f3]}}))[_0x419791(0x1ed)]['users']['forEach'](_0x192336=>{_0x192336&&_0x17165f['addUser'](_0x192336);});};var _0x339ea1=Object[_0x501570(0x21c)],_0x490248=(_0x45fb86,_0x50bccb,_0x9a5e78,_0x317ce4)=>{const _0x2e9d66=_0x501570;for(var _0x5ccac9=_0x317ce4>0x1?void 0x0:_0x317ce4?_0x339ea1(_0x50bccb,_0x9a5e78):_0x50bccb,_0x32c796=_0x45fb86[_0x2e9d66(0x1f3)]-0x1,_0x4929ae;_0x32c796>=0x0;_0x32c796--)(_0x4929ae=_0x45fb86[_0x32c796])&&(_0x5ccac9=_0x4929ae(_0x5ccac9)||_0x5ccac9);return _0x5ccac9;},_0x3693a7=(_0x188d13,_0x425ab0)=>(_0x2e5ba2,_0xdca2b9)=>_0x425ab0(_0x2e5ba2,_0xdca2b9,_0x188d13);let _0x1158c2=class extends _0x206fc5[_0x501570(0x1f1)]{constructor(_0x510cca,_0x37c92f,_0x1aca70,_0x3c51e3){const _0x2b0e9d=_0x501570;super(),this[_0x2b0e9d(0x23b)]=_0x510cca,this[_0x2b0e9d(0x21b)]=_0x37c92f,this['_userService']=_0x1aca70,this[_0x2b0e9d(0x1e6)]=_0x3c51e3,this[_0x2b0e9d(0x241)](),this[_0x2b0e9d(0x20b)]();}[_0x501570(0x20b)](){const _0x4ffabd=_0x501570;this[_0x4ffabd(0x245)](this[_0x4ffabd(0x21b)][_0x4ffabd(0x1cd)][_0x4ffabd(0x201)](_0x4f8cf8[_0x4ffabd(0x20a)](0x10))[_0x4ffabd(0x205)](_0x426b75=>{const _0x342b64=_0x4ffabd,_0x23d7e7=new Set();_0x426b75[_0x342b64(0x222)](_0x340654=>{const _0x2a6c81=_0x342b64;switch(_0x340654[_0x2a6c81(0x1db)]){case _0x2a6c81(0x1d8):{const _0x4b0b98=_0x340654['payload'][_0x2a6c81(0x232)];_0x23d7e7[_0x2a6c81(0x1d8)](_0x4b0b98);break;}}}),_0xf4c171(this[_0x342b64(0x1e6)],_0x23d7e7);}));}['_init'](){const _0xb50c82=_0x501570;this[_0xb50c82(0x245)](this[_0xb50c82(0x23b)][_0xb50c82(0x1cd)]['subscribe'](async _0x39453e=>{const _0x537a47=_0xb50c82;var _0x1da1af,_0x398b54,_0x228f14,_0x2c6a53;const _0x1d573c=(_0x1da1af=this['_threadCommentModel'][_0x537a47(0x1d6)](_0x39453e[_0x537a47(0x209)])[_0x537a47(0x23f)](_0x4f5aeb=>_0x4f5aeb[_0x537a47(0x1f0)]===_0x39453e[_0x537a47(0x1f0)]))==null?void 0x0:_0x1da1af[_0x537a47(0x1eb)];if(!_0x1d573c)return;const {unitId:_0x5f355e,subUnitId:_0x478c0a}=_0x1d573c;switch(_0x39453e[_0x537a47(0x1c6)]&&this[_0x537a47(0x239)][_0x537a47(0x1e0)](_0x39453e[_0x537a47(0x1c6)]),_0x39453e[_0x537a47(0x1db)]){case _0x5cfb89[_0x537a47(0x22e)]:break;case _0x5cfb89[_0x537a47(0x1ef)]:{this[_0x537a47(0x21b)]['addComment'](_0x5f355e,_0x478c0a,{'unitId':_0x5f355e,'subUnitId':_0x478c0a,'ref':'','id':_0x39453e[_0x537a47(0x1f2)],'dT':_0x2568c8(+_0x39453e[_0x537a47(0x219)]),'threadId':_0x39453e[_0x537a47(0x1f0)],'personId':(_0x228f14=(_0x398b54=_0x39453e['user'])==null?void 0x0:_0x398b54[_0x537a47(0x221)])!=null?_0x228f14:_0x39453e[_0x537a47(0x235)],'text':JSON[_0x537a47(0x23a)](_0x39453e['content']),'parentId':_0x1d573c['id']});break;}case _0x5cfb89[_0x537a47(0x1dd)]:{const _0x2eb408=this[_0x537a47(0x21b)][_0x537a47(0x1dc)](_0x5f355e,_0x478c0a,_0x39453e['replyId']);_0x2eb408&&_0x2eb408['parentId']&&this[_0x537a47(0x21b)][_0x537a47(0x217)](_0x5f355e,_0x478c0a,_0x39453e[_0x537a47(0x1f2)]);break;}case _0x5cfb89[_0x537a47(0x214)]:{this[_0x537a47(0x21b)][_0x537a47(0x1f7)](_0x5f355e,_0x478c0a,{'commentId':_0x39453e[_0x537a47(0x1f2)],'text':JSON['parse'](_0x39453e[_0x537a47(0x20c)])});break;}case _0x5cfb89[_0x537a47(0x225)]:{const _0x3f9fba=(_0x2c6a53=this[_0x537a47(0x21b)][_0x537a47(0x1d6)](_0x39453e['unitId'])['find'](_0x201f8c=>_0x201f8c[_0x537a47(0x1f0)]===_0x39453e[_0x537a47(0x1f0)]))==null?void 0x0:_0x2c6a53[_0x537a47(0x1eb)];_0x3f9fba&&this['_threadCommentModel']['resolveComment'](_0x5f355e,_0x478c0a,_0x3f9fba['id'],_0x39453e['solved']===_0x2a37cd[_0x537a47(0x1de)]);break;}}}));}};_0x1158c2=_0x490248([_0x3693a7(0x0,_0x206fc5[_0x501570(0x240)](_0x32c2f9['CommentService'])),_0x3693a7(0x1,_0x206fc5[_0x501570(0x240)](_0x5aad4a[_0x501570(0x23e)])),_0x3693a7(0x2,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x1e4)])),_0x3693a7(0x3,_0x206fc5['Inject'](_0x206fc5[_0x501570(0x20f)]))],_0x1158c2);const _0xc7f60='thread-comment-data-source.config',_0x5d6dce={};var _0xc1be93=Object[_0x501570(0x21c)],_0x3169df=(_0x61ad2e,_0x529a05,_0xac5a41,_0x5e171e)=>{for(var _0x35243a=_0x5e171e>0x1?void 0x0:_0x5e171e?_0xc1be93(_0x529a05,_0xac5a41):_0x529a05,_0x32c216=_0x61ad2e['length']-0x1,_0x1a29b5;_0x32c216>=0x0;_0x32c216--)(_0x1a29b5=_0x61ad2e[_0x32c216])&&(_0x35243a=_0x1a29b5(_0x35243a)||_0x35243a);return _0x35243a;},_0x5c41c8=(_0x200986,_0x4aebc5)=>(_0x13f5d2,_0x26fca7)=>_0x4aebc5(_0x13f5d2,_0x26fca7,_0x200986);function _0x408a5d(_0x541e75,_0x12b0b9){const _0x341044=_0x501570,_0xfd5f8f=_0x541e75[_0x341044(0x21e)][0x0];return{..._0x12b0b9,'id':_0xfd5f8f[_0x341044(0x1f2)],'resolved':_0x541e75[_0x341044(0x238)]===0x1,'dT':_0x2568c8(_0xfd5f8f[_0x341044(0x219)]),'personId':_0xfd5f8f[_0x341044(0x235)],'threadId':_0xfd5f8f[_0x341044(0x1f0)]};}function _0x441684(_0x123669,_0x32ef4c,_0x12371c){const _0x3dcb95=_0x501570;var _0x2ce2e1,_0x2bcdec;if(((_0x2bcdec=(_0x2ce2e1=_0x123669==null?void 0x0:_0x123669[_0x3dcb95(0x21e)])==null?void 0x0:_0x2ce2e1[_0x3dcb95(0x1f3)])!=null?_0x2bcdec:0x0)>0x0){const _0x17063c=(_0x5138a6,_0xa6c8cb)=>({'id':_0x5138a6[_0x3dcb95(0x1f2)],'threadId':_0x5138a6[_0x3dcb95(0x1f0)],'dT':_0x2568c8(_0x5138a6[_0x3dcb95(0x219)]),'personId':_0x5138a6[_0x3dcb95(0x235)],'resolved':_0x123669[_0x3dcb95(0x238)]===_0x2a37cd['Solved'],'unitId':_0x32ef4c,'subUnitId':_0x12371c,'text':JSON[_0x3dcb95(0x23a)](_0x5138a6[_0x3dcb95(0x20c)]),'parentId':_0xa6c8cb}),_0x155273=_0x17063c(_0x123669['replies'][0x0]);return{..._0x155273,'children':_0x123669[_0x3dcb95(0x21e)]['slice'](0x1)[_0x3dcb95(0x216)](_0x5d3f90=>_0x17063c(_0x5d3f90,_0x155273['id']))};}return null;}let _0xae0cf=class{constructor(_0x529576,_0x2b021a,_0x38bf44,_0x2c8a04){const _0x464f35=_0x501570;this[_0x464f35(0x1f9)]=_0x529576,this[_0x464f35(0x239)]=_0x2b021a,this[_0x464f35(0x1d7)]=_0x38bf44,this[_0x464f35(0x1e6)]=_0x2c8a04;}async[_0x501570(0x1d0)](_0x14ba2e){const _0x3ed51a=_0x501570;var _0x290a3e,_0x938257;const {parentId:_0x26b850,unitId:_0x56ebce,text:_0x30e842,threadId:_0x126bcb}=_0x14ba2e,_0x348dff=(_0x938257=(_0x290a3e=_0x30e842[_0x3ed51a(0x1fa)])==null?void 0x0:_0x290a3e[_0x3ed51a(0x213)](_0x33f58f=>_0x33f58f[_0x3ed51a(0x1d9)]===_0x206fc5[_0x3ed51a(0x1d3)]['COMMENT'])['map'](_0x41d18c=>_0x41d18c['rangeId']))!=null?_0x938257:[],_0x1ff1c8=JSON[_0x3ed51a(0x1cb)](_0x30e842),_0x9f8d8a=(await this[_0x3ed51a(0x1d7)][_0x3ed51a(0x21f)](_0x56ebce))[_0x3ed51a(0x202)]();if(_0x26b850){const _0x52dd08={'memberId':_0x9f8d8a,'unitId':_0x56ebce,'content':_0x1ff1c8,'mention':_0x348dff,'threadId':_0x126bcb},_0x4d7c17=(await this['_httpService'][_0x3ed51a(0x21d)](_0x3ed51a(0x1fe)+_0x56ebce+_0x3ed51a(0x22c),{'body':_0x52dd08}))[_0x3ed51a(0x1ed)][_0x3ed51a(0x228)];return{..._0x14ba2e,'id':_0x4d7c17['replyId'],'dT':_0x206fc5[_0x3ed51a(0x22a)](+_0x4d7c17[_0x3ed51a(0x219)])[_0x3ed51a(0x234)](_0x3ed51a(0x1ce)),'personId':_0x4d7c17[_0x3ed51a(0x235)]};}else{const _0x1403df={'memberId':_0x9f8d8a,'unitId':_0x56ebce,'content':_0x1ff1c8,'mention':_0x348dff},_0x4cf81a=await this['_httpService'][_0x3ed51a(0x21d)](_0x3ed51a(0x1fe)+_0x56ebce+_0x3ed51a(0x22d),{'body':_0x1403df});return _0x408a5d(_0x4cf81a[_0x3ed51a(0x1ed)]['comment'],_0x14ba2e);}}async[_0x501570(0x1f7)](_0x3a8cb6){const _0x481ede=_0x501570;var _0x1f4bc3,_0x1c6ffb;const {text:_0x27ca5f,unitId:_0x1eff1e}=_0x3a8cb6,_0x40563e=(_0x1c6ffb=(_0x1f4bc3=_0x27ca5f[_0x481ede(0x1fa)])==null?void 0x0:_0x1f4bc3[_0x481ede(0x213)](_0x1cfa59=>_0x1cfa59[_0x481ede(0x1d9)]===_0x206fc5['CustomRangeType'][_0x481ede(0x243)])[_0x481ede(0x216)](_0x2e7e8d=>_0x2e7e8d[_0x481ede(0x218)]))!=null?_0x1c6ffb:[],_0x5c44bb=JSON[_0x481ede(0x1cb)](_0x27ca5f),_0x272248=_0x3a8cb6[_0x481ede(0x1f0)],_0x26dac3=_0x3a8cb6['id'],_0x35ba45={'memberId':(await this[_0x481ede(0x1d7)][_0x481ede(0x21f)](_0x1eff1e))['getMemberID'](),'unitId':_0x1eff1e,'threadId':_0x272248,'mention':_0x40563e,'content':_0x5c44bb,'replyId':_0x26dac3},_0x4570e3=await this[_0x481ede(0x1f9)]['post'](_0x481ede(0x1fe)+_0x1eff1e+_0x481ede(0x1da),{'body':_0x35ba45});return!_0x4570e3[_0x481ede(0x1ed)][_0x481ede(0x1c9)]||_0x4570e3['body']['error'][_0x481ede(0x1f5)]===0x1;}async['resolveComment'](_0x2e5a75){const _0x5be4da=_0x501570,{unitId:_0x323c26}=_0x2e5a75,_0x580042=_0x2e5a75[_0x5be4da(0x1f0)],_0x4d54be={'memberId':this[_0x5be4da(0x239)]['getCurrentUser']()['userID'],'unitId':_0x323c26,'threadId':_0x580042,'solved':_0x2e5a75[_0x5be4da(0x200)]?_0x2a37cd['Solved']:_0x2a37cd[_0x5be4da(0x227)]},_0x519ef6=await this[_0x5be4da(0x1f9)][_0x5be4da(0x21d)](_0x5be4da(0x1fe)+_0x323c26+'/solved',{'body':_0x4d54be});return!_0x519ef6['body'][_0x5be4da(0x1c9)]||_0x519ef6['body'][_0x5be4da(0x1c9)]['code']===0x1;}async['deleteComment'](_0x292cb8,_0x34d7ed,_0x1340d0,_0x908b56){const _0x46cac7=_0x501570,_0x167e90={'memberId':(await this['_sessionService'][_0x46cac7(0x21f)](_0x292cb8))[_0x46cac7(0x202)](),'threadId':_0x1340d0,'replyId':_0x908b56,'unitId':_0x292cb8},_0x3116fe=await this[_0x46cac7(0x1f9)]['post']('/universer-api/comment/unit/'+_0x292cb8+_0x46cac7(0x233),{'body':_0x167e90});return!_0x3116fe[_0x46cac7(0x1ed)][_0x46cac7(0x1c9)]||_0x3116fe[_0x46cac7(0x1ed)][_0x46cac7(0x1c9)][_0x46cac7(0x1f5)]===0x1;}async['listComments'](_0x2df413,_0x5167cf,_0x154168){const _0x8d6a78=_0x501570,_0x26c88b={'unitId':_0x2df413,'threadId':_0x154168},_0x138c14=await this['_httpService'][_0x8d6a78(0x21d)](_0x8d6a78(0x1fe)+_0x2df413+'/list',{'body':_0x26c88b}),_0x162289=_0x154168[_0x8d6a78(0x216)](_0x1fbee3=>_0x441684(_0x138c14[_0x8d6a78(0x1ed)]['comments'][_0x1fbee3],_0x2df413,_0x5167cf))[_0x8d6a78(0x213)](Boolean);return Object[_0x8d6a78(0x246)](_0x138c14[_0x8d6a78(0x1ed)][_0x8d6a78(0x1e3)])[_0x8d6a78(0x222)](_0x297d4e=>{const _0x6cb67=_0x8d6a78;this['_userService'][_0x6cb67(0x1e0)](_0x297d4e);}),_0x162289;}['saveCommentToSnapshot'](_0xaef788){const _0x400d27=_0x501570;return{'id':_0xaef788['id'],'threadId':_0xaef788[_0x400d27(0x1f0)],'ref':_0xaef788[_0x400d27(0x1cf)]};}};_0xae0cf=_0x3169df([_0x5c41c8(0x0,_0x206fc5[_0x501570(0x240)](_0x2a30c3[_0x501570(0x1e8)])),_0x5c41c8(0x1,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x1e4)])),_0x5c41c8(0x2,_0x206fc5[_0x501570(0x240)](_0x32c2f9[_0x501570(0x1e9)])),_0x5c41c8(0x3,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x20f)]))],_0xae0cf);var _0x5b6b1f=Object['getOwnPropertyDescriptor'],_0x562505=(_0x26e933,_0x34ef92,_0x435ab4,_0x53e132)=>{const _0x4bb49a=_0x501570;for(var _0x4ab4ca=_0x53e132>0x1?void 0x0:_0x53e132?_0x5b6b1f(_0x34ef92,_0x435ab4):_0x34ef92,_0x2fbe88=_0x26e933[_0x4bb49a(0x1f3)]-0x1,_0x48d349;_0x2fbe88>=0x0;_0x2fbe88--)(_0x48d349=_0x26e933[_0x2fbe88])&&(_0x4ab4ca=_0x48d349(_0x4ab4ca)||_0x4ab4ca);return _0x4ab4ca;},_0x4b1c23=(_0x4f1852,_0x533385)=>(_0x58b5dc,_0x5f36df)=>_0x533385(_0x58b5dc,_0x5f36df,_0x4f1852);let _0xa301a0=class extends _0x206fc5['Disposable']{constructor(_0x26ccda,_0x10626c){const _0x2e35f5=_0x501570;super(),this['_threadCommentDataSourceService']=_0x26ccda,this[_0x2e35f5(0x231)]=_0x10626c,this[_0x2e35f5(0x1df)]();}['_initDataSource'](){const _0x53463e=_0x501570;this[_0x53463e(0x210)][_0x53463e(0x208)]=this[_0x53463e(0x231)],this[_0x53463e(0x210)][_0x53463e(0x1f6)]=!0x1;}};_0xa301a0=_0x562505([_0x4b1c23(0x0,_0x5aad4a['IThreadCommentDataSourceService']),_0x4b1c23(0x1,_0x206fc5[_0x501570(0x240)](_0xae0cf))],_0xa301a0);var _0x52eb31=Object['defineProperty'],_0x47e13c=Object[_0x501570(0x21c)],_0x3c31c3=(_0x535a42,_0xf50228,_0x1bcbff)=>_0xf50228 in _0x535a42?_0x52eb31(_0x535a42,_0xf50228,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bcbff}):_0x535a42[_0xf50228]=_0x1bcbff,_0x3fc96b=(_0x3b0da6,_0x2862d0,_0x238a46,_0x38c1ef)=>{for(var _0x2aa055=_0x38c1ef>0x1?void 0x0:_0x38c1ef?_0x47e13c(_0x2862d0,_0x238a46):_0x2862d0,_0x4aa9a4=_0x3b0da6['length']-0x1,_0x21d09c;_0x4aa9a4>=0x0;_0x4aa9a4--)(_0x21d09c=_0x3b0da6[_0x4aa9a4])&&(_0x2aa055=_0x21d09c(_0x2aa055)||_0x2aa055);return _0x2aa055;},_0x58a248=(_0x283406,_0x1dd9a3)=>(_0xe3795a,_0xc26a6)=>_0x1dd9a3(_0xe3795a,_0xc26a6,_0x283406),_0x128f1c=(_0x1c7933,_0x311271,_0x4f981f)=>_0x3c31c3(_0x1c7933,typeof _0x311271!='symbol'?_0x311271+'':_0x311271,_0x4f981f);_0x2a78b6[_0x501570(0x212)]=class extends _0x206fc5[_0x501570(0x220)]{constructor(_0x6ad92b=_0x5d6dce,_0x43aabd,_0x25abe7){const _0x1d392a=_0x501570;super(),this[_0x1d392a(0x1cc)]=_0x6ad92b,this['_injector']=_0x43aabd,this['_configService']=_0x25abe7;const {..._0x1b4d3f}=_0x206fc5['merge']({},_0x5d6dce,this[_0x1d392a(0x1cc)]);this[_0x1d392a(0x1ee)][_0x1d392a(0x1f8)](_0xc7f60,_0x1b4d3f);}[_0x501570(0x1ea)](){const _0x2c7493=_0x501570;[[_0xae0cf],[_0xa301a0],[_0x1158c2]][_0x2c7493(0x222)](_0x294e69=>{const _0x3f05ea=_0x2c7493;this['_injector'][_0x3f05ea(0x1d8)](_0x294e69);});}[_0x501570(0x230)](){const _0x430bd9=_0x501570;this['_injector']['get'](_0xa301a0),this[_0x430bd9(0x1e6)][_0x430bd9(0x22b)](_0x1158c2);}},_0x128f1c(_0x2a78b6[_0x501570(0x212)],_0x501570(0x1ca),_0x206c54),_0x128f1c(_0x2a78b6['UniverThreadCommentDataSourcePlugin'],_0x501570(0x1db),_0x206fc5[_0x501570(0x242)][_0x501570(0x1c8)]),_0x2a78b6[_0x501570(0x212)]=_0x3fc96b([_0x206fc5[_0x501570(0x224)](_0x1cd1db['UniverThreadCommentUIPlugin'],_0x32c2f9[_0x501570(0x244)],_0x3978b6[_0x501570(0x1ec)]),_0x58a248(0x1,_0x206fc5['Inject'](_0x206fc5[_0x501570(0x20f)])),_0x58a248(0x2,_0x206fc5[_0x501570(0x21a)])],_0x2a78b6[_0x501570(0x212)]),Object['defineProperty'](_0x2a78b6,Symbol[_0x501570(0x226)],{'value':_0x501570(0x203)});}));function _0x41de(_0x27d1ea,_0x45d9b8){const _0x163271=_0x1632();return _0x41de=function(_0x41deee,_0x3d79c5){_0x41deee=_0x41deee-0x1c6;let _0x167a62=_0x163271[_0x41deee];return _0x167a62;},_0x41de(_0x27d1ea,_0x45d9b8);}function _0x1632(){const _0x5032e4=['ref','addComment','UniverProCollaborationClient','195KbkyBj','CustomRangeType','2611696JeAqEV','getUser','getUnit','_sessionService','add','rangeType','/edit','type','getComment','Delete','Solved','_initDataSource','addUser','rxjs','UNRECOGNIZED','users','UserManagerService','@univerjs/thread-comment-ui','_injector','110682rZjvHp','HTTPService','CollaborationSessionService','onStarting','root','UniverLicensePlugin','body','_configService','Reply','threadId','Disposable','replyId','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','syncUpdateMutationToColla','updateComment','setConfig','_httpService','customRanges','@univerjs/thread-comment','@univerjs/network','2250367iDmaao','/universer-api/comment/unit/','@univerjs/core','resolved','pipe','getMemberID','Module','1303740JeOnPA','subscribe','6SmhGMu','Unknown','dataSource','unitId','bufferTime','_initUserSync','content','553684DzduMJ','object','Injector','_threadCommentDataSourceService','size','UniverThreadCommentDataSourcePlugin','filter','Edit','UniverCore','map','deleteComment','rangeId','createTimestamp','IConfigService','_threadCommentModel','getOwnPropertyDescriptor','post','replies','requireSession','Plugin','userID','forEach','@univerjs-pro/collaboration-client','DependentOn','Solve','toStringTag','OpenOrReOpen','reply','130QeZfui','dayjs','get','/reply','/add','Add','UniverThreadCommentUi','onReady','_threadCommentDataSource','personId','/delete','format','userId','/universer-api/user/list','261438kmZbYz','solved','_userService','parse','_commentService','@univerjs-pro/license','10924eaoPSf','ThreadCommentModel','find','Inject','_init','UniverInstanceType','COMMENT','UniverCollaborationClientPlugin','disposeWithMe','values','user','1RDXGze','UNIVER_UNKNOWN','error','pluginName','stringify','_config','commentUpdate$','YYYY/MM/DD\x20HH:mm'];_0x1632=function(){return _0x5032e4;};return _0x1632();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504161609",
3
+ "version": "0.6.10-nightly.202504181606",
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.6.10-nightly.202504161609",
49
- "@univerjs-pro/license": "0.6.10-nightly.202504161609",
50
- "@univerjs/network": "0.6.10-nightly.202504161609",
51
- "@univerjs/core": "0.6.10-nightly.202504161609",
52
- "@univerjs/thread-comment": "0.6.10-nightly.202504161609",
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504181606",
49
+ "@univerjs-pro/license": "0.6.10-nightly.202504181606",
50
+ "@univerjs/core": "0.6.10-nightly.202504181606",
53
51
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504161609"
52
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504181606",
53
+ "@univerjs/thread-comment": "0.6.10-nightly.202504181606",
54
+ "@univerjs/network": "0.6.10-nightly.202504181606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.0",
60
60
  "vitest": "^3.1.1",
61
- "@univerjs-infra/shared": "0.6.10-alpha.0"
61
+ "@univerjs-infra/shared": "0.6.10"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",