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

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 _0x94cb=_0x13d3;(function(_0x12e7cf,_0x1bad64){const _0x5d3c8c=_0x13d3,_0x30308b=_0x12e7cf();while(!![]){try{const _0x2de8fd=-parseInt(_0x5d3c8c(0x1e1))/0x1+-parseInt(_0x5d3c8c(0x204))/0x2*(parseInt(_0x5d3c8c(0x205))/0x3)+parseInt(_0x5d3c8c(0x1eb))/0x4+-parseInt(_0x5d3c8c(0x1cc))/0x5*(parseInt(_0x5d3c8c(0x1f7))/0x6)+parseInt(_0x5d3c8c(0x1a9))/0x7*(parseInt(_0x5d3c8c(0x1d9))/0x8)+parseInt(_0x5d3c8c(0x1d3))/0x9+parseInt(_0x5d3c8c(0x1dc))/0xa*(-parseInt(_0x5d3c8c(0x1c3))/0xb);if(_0x2de8fd===_0x1bad64)break;else _0x30308b['push'](_0x30308b['shift']());}catch(_0x115423){_0x30308b['push'](_0x30308b['shift']());}}}(_0x5334,0x4fec5));function _0x5334(){const _0x540479=['listComments','updateComment','_commentService','getMemberID','_injector','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','/universer-api/comment/unit/','IConfigService','_userService','replyId','delete','UNIVER_UNKNOWN','reply','payload','filter','_threadCommentDataSourceService','commentUpdate$','CommentService','rangeType','onReady','_threadCommentModel','UserManagerService','rangeId','Add','/edit','_init','parse','@univerjs-pro/license','threadId','UniverThreadCommentUIPlugin','unitId','Injector','Inject','Solved','userID','1257221ZJydFR','@univerjs-pro/collaboration-client','merge','resolveComment','requireSession','_sessionService','DependentOn','error','Module','setConfig','OpenOrReOpen','createTimestamp','length','defineProperty','UniverLicensePlugin','getUser','add','_httpService','type','users','_config','Solve','@univerjs/thread-comment-ui','@univerjs/thread-comment','customRanges','user','11MoOeNf','/delete','COMMENT','/universer-api/user/list','post','/add','_configService','UniverThreadCommentDataSourcePlugin','addUser','455PTUtAN','UniverInstanceType','comment','_initDataSource','_threadCommentDataSource','Edit','/reply','4420125uohuxj','dataSource','slice','_initUserSync','Delete','Disposable','8uCiYdw','forEach','Unknown','73650sVzHNq','format','toStringTag','getComment','@univerjs/network','463554KAMvdA','@univerjs/core','dayjs','UNRECOGNIZED','saveCommentToSnapshot','userId','bufferTime','content','root','YYYY/MM/DD\x20HH:mm','2321140NljVVr','get','stringify','pluginName','/solved','rxjs','CollaborationSessionService','HTTPService','code','getOwnPropertyDescriptor','getCurrentUser','find','7698QMxjIl','/list','Reply','deleteComment','body','onStarting','subscribe','personId','ThreadCommentModel','CustomRangeType','symbol','replies','getUnit','6JsuRnU','335976cGakQq','size','values','solved'];_0x5334=function(){return _0x540479;};return _0x5334();}Object[_0x94cb(0x1b6)](exports,Symbol[_0x94cb(0x1de)],{'value':_0x94cb(0x1b1)});const b=require(_0x94cb(0x1aa)),T=require(_0x94cb(0x1a1)),c=require(_0x94cb(0x1e2)),j=require(_0x94cb(0x1bf)),M=require(_0x94cb(0x1c0)),w=require(_0x94cb(0x1f0)),P=require(_0x94cb(0x1e0)),U=_0x94cb(0x20f);var I=(_0x561841=>(_0x561841[_0x561841['OpenOrReOpen']=0x0]=_0x94cb(0x1b3),_0x561841[_0x561841[_0x94cb(0x1a7)]=0x1]=_0x94cb(0x1a7),_0x561841[_0x561841[_0x94cb(0x1e4)]=-0x1]=_0x94cb(0x1e4),_0x561841))(I||{}),v=(_0x44e34b=>(_0x44e34b[_0x44e34b[_0x94cb(0x1db)]=0x0]='Unknown',_0x44e34b[_0x44e34b[_0x94cb(0x19d)]=0x1]=_0x94cb(0x19d),_0x44e34b[_0x44e34b['Reply']=0x2]=_0x94cb(0x1f9),_0x44e34b[_0x44e34b[_0x94cb(0x1d1)]=0x3]=_0x94cb(0x1d1),_0x44e34b[_0x44e34b[_0x94cb(0x1d7)]=0x4]=_0x94cb(0x1d7),_0x44e34b[_0x44e34b['Solve']=0x5]=_0x94cb(0x1be),_0x44e34b[_0x44e34b[_0x94cb(0x1e4)]=-0x1]=_0x94cb(0x1e4),_0x44e34b))(v||{});const f=_0x42f883=>c[_0x94cb(0x1e3)](new Date(+_0x42f883))[_0x94cb(0x1dd)](_0x94cb(0x1ea)),R=async(_0x3f0364,_0x23d08f)=>{const _0x339351=_0x94cb,_0x3bc391=_0x3f0364['get'](c[_0x339351(0x19b)]),_0x32688d=_0x3f0364['get'](P[_0x339351(0x1f2)]);_0x23d08f[_0x339351(0x1da)](_0x221e9b=>{const _0x3013bc=_0x339351;_0x3bc391[_0x3013bc(0x1b8)](_0x221e9b)&&_0x23d08f[_0x3013bc(0x190)](_0x221e9b);}),_0x23d08f[_0x339351(0x206)]&&(await _0x32688d[_0x339351(0x1ec)](_0x339351(0x1c6),{'params':{'userIDs':[..._0x23d08f]}}))[_0x339351(0x1fb)][_0x339351(0x1bc)][_0x339351(0x1da)](_0x162062=>{const _0x425fe7=_0x339351;_0x162062&&_0x3bc391[_0x425fe7(0x1cb)](_0x162062);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x31747e,_0x401aa3,_0x2b7367,_0x30712f)=>{const _0x4943b9=_0x94cb;for(var _0x3b2331=_0x30712f>0x1?void 0x0:_0x30712f?$(_0x401aa3,_0x2b7367):_0x401aa3,_0x4f3324=_0x31747e[_0x4943b9(0x1b5)]-0x1,_0xa911f3;_0x4f3324>=0x0;_0x4f3324--)(_0xa911f3=_0x31747e[_0x4f3324])&&(_0x3b2331=_0xa911f3(_0x3b2331)||_0x3b2331);return _0x3b2331;},S=(_0x3ab998,_0x52488a)=>(_0x4e7c91,_0x21cbad)=>_0x52488a(_0x4e7c91,_0x21cbad,_0x3ab998);let p=class extends c[_0x94cb(0x1d8)]{constructor(_0x43b1c7,_0x3e6fa9,_0x153621,_0x12f52c){const _0x5282ef=_0x94cb;super(),this['_commentService']=_0x43b1c7,this[_0x5282ef(0x19a)]=_0x3e6fa9,this[_0x5282ef(0x18e)]=_0x153621,this[_0x5282ef(0x20d)]=_0x12f52c,this['_init'](),this[_0x5282ef(0x1d6)]();}[_0x94cb(0x1d6)](){const _0x3eea83=_0x94cb;this['disposeWithMe'](this[_0x3eea83(0x19a)][_0x3eea83(0x196)]['pipe'](w[_0x3eea83(0x1e7)](0x10))[_0x3eea83(0x1fd)](_0x43edf1=>{const _0x4395ee=_0x3eea83,_0x1e7b3d=new Set();_0x43edf1['forEach'](_0xfe44b7=>{const _0x387367=_0x13d3;switch(_0xfe44b7['type']){case _0x387367(0x1b9):{const _0x5a8bbe=_0xfe44b7[_0x387367(0x193)][_0x387367(0x1fe)];_0x1e7b3d[_0x387367(0x1b9)](_0x5a8bbe);break;}}}),R(this[_0x4395ee(0x20d)],_0x1e7b3d);}));}[_0x94cb(0x19f)](){const _0x30226a=_0x94cb;this['disposeWithMe'](this[_0x30226a(0x20b)]['commentUpdate$'][_0x30226a(0x1fd)](async _0x590ac6=>{const _0x43ad8c=_0x30226a;var _0x1c61fd,_0x227b07,_0x45cd07,_0x5d7d77;const _0x5cb885=(_0x1c61fd=this[_0x43ad8c(0x19a)][_0x43ad8c(0x203)](_0x590ac6[_0x43ad8c(0x1a4)])[_0x43ad8c(0x1f6)](_0x3eea96=>_0x3eea96[_0x43ad8c(0x1a2)]===_0x590ac6[_0x43ad8c(0x1a2)]))==null?void 0x0:_0x1c61fd[_0x43ad8c(0x1e9)];if(!_0x5cb885)return;const {unitId:_0x2111de,subUnitId:_0x4c600c}=_0x5cb885;switch(_0x590ac6[_0x43ad8c(0x1c2)]&&this['_userService'][_0x43ad8c(0x1cb)](_0x590ac6[_0x43ad8c(0x1c2)]),_0x590ac6[_0x43ad8c(0x1bb)]){case v[_0x43ad8c(0x19d)]:break;case v[_0x43ad8c(0x1f9)]:{this['_threadCommentModel'][_0x43ad8c(0x20e)](_0x2111de,_0x4c600c,{'unitId':_0x2111de,'subUnitId':_0x4c600c,'ref':'','id':_0x590ac6[_0x43ad8c(0x18f)],'dT':f(+_0x590ac6[_0x43ad8c(0x1b4)]),'threadId':_0x590ac6['threadId'],'personId':(_0x45cd07=(_0x227b07=_0x590ac6['user'])==null?void 0x0:_0x227b07['userID'])!=null?_0x45cd07:_0x590ac6[_0x43ad8c(0x1e6)],'text':JSON[_0x43ad8c(0x1a0)](_0x590ac6['content']),'parentId':_0x5cb885['id']});break;}case v[_0x43ad8c(0x1d7)]:{const _0x51e6ec=this[_0x43ad8c(0x19a)][_0x43ad8c(0x1df)](_0x2111de,_0x4c600c,_0x590ac6['replyId']);_0x51e6ec&&_0x51e6ec['parentId']&&this[_0x43ad8c(0x19a)][_0x43ad8c(0x1fa)](_0x2111de,_0x4c600c,_0x590ac6[_0x43ad8c(0x18f)]);break;}case v[_0x43ad8c(0x1d1)]:{this[_0x43ad8c(0x19a)]['updateComment'](_0x2111de,_0x4c600c,{'commentId':_0x590ac6['replyId'],'text':JSON[_0x43ad8c(0x1a0)](_0x590ac6[_0x43ad8c(0x1e8)])});break;}case v[_0x43ad8c(0x1be)]:{const _0x30de78=(_0x5d7d77=this[_0x43ad8c(0x19a)][_0x43ad8c(0x203)](_0x590ac6[_0x43ad8c(0x1a4)])[_0x43ad8c(0x1f6)](_0x20cdf7=>_0x20cdf7['threadId']===_0x590ac6[_0x43ad8c(0x1a2)]))==null?void 0x0:_0x5d7d77[_0x43ad8c(0x1e9)];_0x30de78&&this[_0x43ad8c(0x19a)]['resolveComment'](_0x2111de,_0x4c600c,_0x30de78['id'],_0x590ac6['solved']===I[_0x43ad8c(0x1a7)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x94cb(0x197)])),S(0x1,c['Inject'](M[_0x94cb(0x1ff)])),S(0x2,c['Inject'](c[_0x94cb(0x19b)])),S(0x3,c[_0x94cb(0x1a6)](c[_0x94cb(0x1a5)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x94cb(0x1f4)],x=(_0x36b502,_0x542d4d,_0x210e5b,_0x1d7d71)=>{const _0x133ddc=_0x94cb;for(var _0x25f680=_0x1d7d71>0x1?void 0x0:_0x1d7d71?A(_0x542d4d,_0x210e5b):_0x542d4d,_0x1c6a2d=_0x36b502[_0x133ddc(0x1b5)]-0x1,_0x525b5e;_0x1c6a2d>=0x0;_0x1c6a2d--)(_0x525b5e=_0x36b502[_0x1c6a2d])&&(_0x25f680=_0x525b5e(_0x25f680)||_0x25f680);return _0x25f680;},_=(_0x10d198,_0x40cd61)=>(_0x387f2e,_0x380939)=>_0x40cd61(_0x387f2e,_0x380939,_0x10d198);function Y(_0x51af42,_0x452008){const _0x18a3a4=_0x94cb,_0x28ad28=_0x51af42[_0x18a3a4(0x202)][0x0];return{..._0x452008,'id':_0x28ad28[_0x18a3a4(0x18f)],'resolved':_0x51af42[_0x18a3a4(0x208)]===0x1,'dT':f(_0x28ad28[_0x18a3a4(0x1b4)]),'personId':_0x28ad28['userId'],'threadId':_0x28ad28[_0x18a3a4(0x1a2)]};}function G(_0x3059b4,_0x3e8437,_0x1531ec){const _0x4536ad=_0x94cb;var _0x49a4ed,_0x35b767;if(((_0x35b767=(_0x49a4ed=_0x3059b4==null?void 0x0:_0x3059b4[_0x4536ad(0x202)])==null?void 0x0:_0x49a4ed[_0x4536ad(0x1b5)])!=null?_0x35b767:0x0)>0x0){const _0x3e6062=(_0x5d9b8d,_0x5dba8b)=>({'id':_0x5d9b8d[_0x4536ad(0x18f)],'threadId':_0x5d9b8d[_0x4536ad(0x1a2)],'dT':f(_0x5d9b8d[_0x4536ad(0x1b4)]),'personId':_0x5d9b8d[_0x4536ad(0x1e6)],'resolved':_0x3059b4[_0x4536ad(0x208)]===I[_0x4536ad(0x1a7)],'unitId':_0x3e8437,'subUnitId':_0x1531ec,'text':JSON[_0x4536ad(0x1a0)](_0x5d9b8d[_0x4536ad(0x1e8)]),'parentId':_0x5dba8b}),_0x3bfb64=_0x3e6062(_0x3059b4[_0x4536ad(0x202)][0x0]);return{..._0x3bfb64,'children':_0x3059b4['replies'][_0x4536ad(0x1d5)](0x1)[_0x4536ad(0x18b)](_0x394daf=>_0x3e6062(_0x394daf,_0x3bfb64['id']))};}return null;}let g=class{constructor(_0x57c615,_0x46ec7d,_0x55b693,_0x274742){const _0x36d2d0=_0x94cb;this[_0x36d2d0(0x1ba)]=_0x57c615,this[_0x36d2d0(0x18e)]=_0x46ec7d,this[_0x36d2d0(0x1ae)]=_0x55b693,this['_injector']=_0x274742;}async[_0x94cb(0x20e)](_0x322787){const _0x25c43e=_0x94cb;var _0x4913d2,_0xfd7fba;const {parentId:_0x34c10c,unitId:_0x45fad6,text:_0x58e7cc,threadId:_0x506a0f}=_0x322787,_0x48dfad=(_0xfd7fba=(_0x4913d2=_0x58e7cc[_0x25c43e(0x1c1)])==null?void 0x0:_0x4913d2[_0x25c43e(0x194)](_0xf4b935=>_0xf4b935[_0x25c43e(0x198)]===c['CustomRangeType'][_0x25c43e(0x1c5)])[_0x25c43e(0x18b)](_0x477d9c=>_0x477d9c['rangeId']))!=null?_0xfd7fba:[],_0x225e0b=JSON[_0x25c43e(0x1ed)](_0x58e7cc),_0x1348e8=(await this[_0x25c43e(0x1ae)][_0x25c43e(0x1ad)](_0x45fad6))['getMemberID']();if(_0x34c10c){const _0x42be41={'memberId':_0x1348e8,'unitId':_0x45fad6,'content':_0x225e0b,'mention':_0x48dfad,'threadId':_0x506a0f},_0x4dd84f=(await this[_0x25c43e(0x1ba)][_0x25c43e(0x1c7)](_0x25c43e(0x18c)+_0x45fad6+_0x25c43e(0x1d2),{'body':_0x42be41}))[_0x25c43e(0x1fb)][_0x25c43e(0x192)];return{..._0x322787,'id':_0x4dd84f[_0x25c43e(0x18f)],'dT':c[_0x25c43e(0x1e3)](+_0x4dd84f['createTimestamp'])[_0x25c43e(0x1dd)](_0x25c43e(0x1ea)),'personId':_0x4dd84f['userId']};}else{const _0x512cb4={'memberId':_0x1348e8,'unitId':_0x45fad6,'content':_0x225e0b,'mention':_0x48dfad},_0x5ea6e5=await this[_0x25c43e(0x1ba)][_0x25c43e(0x1c7)]('/universer-api/comment/unit/'+_0x45fad6+_0x25c43e(0x1c8),{'body':_0x512cb4});return Y(_0x5ea6e5[_0x25c43e(0x1fb)][_0x25c43e(0x1ce)],_0x322787);}}async[_0x94cb(0x20a)](_0x196866){const _0x238cf3=_0x94cb;var _0x392716,_0x242128;const {text:_0x4302fc,unitId:_0x3c121b}=_0x196866,_0x4117e7=(_0x242128=(_0x392716=_0x4302fc[_0x238cf3(0x1c1)])==null?void 0x0:_0x392716['filter'](_0x184cd2=>_0x184cd2[_0x238cf3(0x198)]===c[_0x238cf3(0x200)]['COMMENT'])[_0x238cf3(0x18b)](_0x47f43c=>_0x47f43c[_0x238cf3(0x19c)]))!=null?_0x242128:[],_0x1806af=JSON[_0x238cf3(0x1ed)](_0x4302fc),_0x3c9105=_0x196866[_0x238cf3(0x1a2)],_0x5a69f2=_0x196866['id'],_0x649c17={'memberId':(await this[_0x238cf3(0x1ae)][_0x238cf3(0x1ad)](_0x3c121b))[_0x238cf3(0x20c)](),'unitId':_0x3c121b,'threadId':_0x3c9105,'mention':_0x4117e7,'content':_0x1806af,'replyId':_0x5a69f2},_0xe03d03=await this['_httpService'][_0x238cf3(0x1c7)]('/universer-api/comment/unit/'+_0x3c121b+_0x238cf3(0x19e),{'body':_0x649c17});return!_0xe03d03[_0x238cf3(0x1fb)][_0x238cf3(0x1b0)]||_0xe03d03[_0x238cf3(0x1fb)][_0x238cf3(0x1b0)][_0x238cf3(0x1f3)]===0x1;}async[_0x94cb(0x1ac)](_0x48bac6){const _0x1dc1b3=_0x94cb,{unitId:_0x59229b}=_0x48bac6,_0x26fd64=_0x48bac6['threadId'],_0x496d8f={'memberId':this[_0x1dc1b3(0x18e)][_0x1dc1b3(0x1f5)]()[_0x1dc1b3(0x1a8)],'unitId':_0x59229b,'threadId':_0x26fd64,'solved':_0x48bac6['resolved']?I[_0x1dc1b3(0x1a7)]:I[_0x1dc1b3(0x1b3)]},_0x5e31c5=await this['_httpService'][_0x1dc1b3(0x1c7)](_0x1dc1b3(0x18c)+_0x59229b+_0x1dc1b3(0x1ef),{'body':_0x496d8f});return!_0x5e31c5[_0x1dc1b3(0x1fb)][_0x1dc1b3(0x1b0)]||_0x5e31c5[_0x1dc1b3(0x1fb)][_0x1dc1b3(0x1b0)][_0x1dc1b3(0x1f3)]===0x1;}async['deleteComment'](_0x339d98,_0x2089ca,_0x93ea30,_0x10f678){const _0xd64242=_0x94cb,_0x20c7d9={'memberId':(await this[_0xd64242(0x1ae)][_0xd64242(0x1ad)](_0x339d98))[_0xd64242(0x20c)](),'threadId':_0x93ea30,'replyId':_0x10f678,'unitId':_0x339d98},_0x5b6e09=await this[_0xd64242(0x1ba)]['post']('/universer-api/comment/unit/'+_0x339d98+_0xd64242(0x1c4),{'body':_0x20c7d9});return!_0x5b6e09['body']['error']||_0x5b6e09[_0xd64242(0x1fb)][_0xd64242(0x1b0)]['code']===0x1;}async[_0x94cb(0x209)](_0x2aeaab,_0x540c51,_0x22a40c){const _0x3d5bc6=_0x94cb,_0x2f4e6c={'unitId':_0x2aeaab,'threadId':_0x22a40c},_0x5a783e=await this[_0x3d5bc6(0x1ba)][_0x3d5bc6(0x1c7)](_0x3d5bc6(0x18c)+_0x2aeaab+_0x3d5bc6(0x1f8),{'body':_0x2f4e6c}),_0x5ebf13=_0x22a40c[_0x3d5bc6(0x18b)](_0x1c5d56=>G(_0x5a783e['body']['comments'][_0x1c5d56],_0x2aeaab,_0x540c51))[_0x3d5bc6(0x194)](Boolean);return Object[_0x3d5bc6(0x207)](_0x5a783e[_0x3d5bc6(0x1fb)][_0x3d5bc6(0x1bc)])['forEach'](_0x4e16be=>{const _0x5ecf10=_0x3d5bc6;this[_0x5ecf10(0x18e)][_0x5ecf10(0x1cb)](_0x4e16be);}),_0x5ebf13;}[_0x94cb(0x1e5)](_0x2b3938){const _0x282558=_0x94cb;return{'id':_0x2b3938['id'],'threadId':_0x2b3938[_0x282558(0x1a2)],'ref':_0x2b3938['ref']};}};g=x([_(0x0,c[_0x94cb(0x1a6)](P[_0x94cb(0x1f2)])),_(0x1,c[_0x94cb(0x1a6)](c[_0x94cb(0x19b)])),_(0x2,c[_0x94cb(0x1a6)](b[_0x94cb(0x1f1)])),_(0x3,c[_0x94cb(0x1a6)](c[_0x94cb(0x1a5)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xfe289f,_0x1f02be,_0x33ab3d,_0xc4386c)=>{const _0x1d172a=_0x94cb;for(var _0x2d5562=_0xc4386c>0x1?void 0x0:_0xc4386c?H(_0x1f02be,_0x33ab3d):_0x1f02be,_0x2fbbaf=_0xfe289f[_0x1d172a(0x1b5)]-0x1,_0x1a1e64;_0x2fbbaf>=0x0;_0x2fbbaf--)(_0x1a1e64=_0xfe289f[_0x2fbbaf])&&(_0x2d5562=_0x1a1e64(_0x2d5562)||_0x2d5562);return _0x2d5562;},y=(_0x81462,_0x2024d6)=>(_0x2162fd,_0x216256)=>_0x2024d6(_0x2162fd,_0x216256,_0x81462);let C=class extends c['Disposable']{constructor(_0x337c80,_0x2d0054){const _0x168655=_0x94cb;super(),this[_0x168655(0x195)]=_0x337c80,this[_0x168655(0x1d0)]=_0x2d0054,this[_0x168655(0x1cf)]();}[_0x94cb(0x1cf)](){const _0x219c91=_0x94cb;this[_0x219c91(0x195)][_0x219c91(0x1d4)]=this[_0x219c91(0x1d0)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x94cb(0x1a6)](g))],C);function _0x13d3(_0x1fe216,_0x2cf518){const _0x53345e=_0x5334();return _0x13d3=function(_0x13d32e,_0xcfc9ee){_0x13d32e=_0x13d32e-0x18b;let _0x178037=_0x53345e[_0x13d32e];return _0x178037;},_0x13d3(_0x1fe216,_0x2cf518);}var F=Object[_0x94cb(0x1b6)],L=Object[_0x94cb(0x1f4)],Z=(_0x448291,_0x2b3e2a,_0x5d9b9e)=>_0x2b3e2a in _0x448291?F(_0x448291,_0x2b3e2a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d9b9e}):_0x448291[_0x2b3e2a]=_0x5d9b9e,W=(_0x371a69,_0x4ed720,_0x34c76e,_0x489b69)=>{for(var _0x3c347a=_0x489b69>0x1?void 0x0:_0x489b69?L(_0x4ed720,_0x34c76e):_0x4ed720,_0x12a079=_0x371a69['length']-0x1,_0x29e14a;_0x12a079>=0x0;_0x12a079--)(_0x29e14a=_0x371a69[_0x12a079])&&(_0x3c347a=_0x29e14a(_0x3c347a)||_0x3c347a);return _0x3c347a;},O=(_0x261a16,_0x111bd3)=>(_0x1dc48a,_0x3a7bb9)=>_0x111bd3(_0x1dc48a,_0x3a7bb9,_0x261a16),N=(_0xda924b,_0x4d2c8,_0x14065f)=>Z(_0xda924b,typeof _0x4d2c8!=_0x94cb(0x201)?_0x4d2c8+'':_0x4d2c8,_0x14065f);exports[_0x94cb(0x1ca)]=class extends c['Plugin']{constructor(_0x182748=D,_0x5b5d63,_0x71d87){const _0x111b2f=_0x94cb;super(),this[_0x111b2f(0x1bd)]=_0x182748,this[_0x111b2f(0x20d)]=_0x5b5d63,this[_0x111b2f(0x1c9)]=_0x71d87;const {..._0x121c76}=c[_0x111b2f(0x1ab)]({},D,this[_0x111b2f(0x1bd)]);this[_0x111b2f(0x1c9)][_0x111b2f(0x1b2)](q,_0x121c76);}[_0x94cb(0x1fc)](){[[g],[C],[p]]['forEach'](_0x54ff66=>{const _0x4c708d=_0x13d3;this[_0x4c708d(0x20d)][_0x4c708d(0x1b9)](_0x54ff66);});}[_0x94cb(0x199)](){const _0x496ee0=_0x94cb;this[_0x496ee0(0x20d)][_0x496ee0(0x1ec)](C),this['_injector'][_0x496ee0(0x1ec)](p);}},N(exports[_0x94cb(0x1ca)],_0x94cb(0x1ee),U),N(exports[_0x94cb(0x1ca)],_0x94cb(0x1bb),c[_0x94cb(0x1cd)][_0x94cb(0x191)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x94cb(0x1af)](j[_0x94cb(0x1a3)],b['UniverCollaborationClientPlugin'],T[_0x94cb(0x1b7)]),O(0x1,c[_0x94cb(0x1a6)](c[_0x94cb(0x1a5)])),O(0x2,c[_0x94cb(0x18d)])],exports[_0x94cb(0x1ca)]);
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 _0x579c20=_0x39bc;(function(_0x3a19ec,_0x5306c6){const _0x2664d2=_0x39bc,_0x268996=_0x3a19ec();while(!![]){try{const _0x3f9853=parseInt(_0x2664d2(0x220))/0x1+parseInt(_0x2664d2(0x211))/0x2*(parseInt(_0x2664d2(0x202))/0x3)+parseInt(_0x2664d2(0x1e9))/0x4*(parseInt(_0x2664d2(0x1f6))/0x5)+-parseInt(_0x2664d2(0x203))/0x6+parseInt(_0x2664d2(0x1c7))/0x7*(-parseInt(_0x2664d2(0x21c))/0x8)+parseInt(_0x2664d2(0x1d7))/0x9*(-parseInt(_0x2664d2(0x1ff))/0xa)+-parseInt(_0x2664d2(0x1c6))/0xb*(-parseInt(_0x2664d2(0x1d9))/0xc);if(_0x3f9853===_0x5306c6)break;else _0x268996['push'](_0x268996['shift']());}catch(_0x4ed346){_0x268996['push'](_0x268996['shift']());}}}(_0x85a0,0x9dc99));import{CommentService as _0x17d1ba,CollaborationSessionService as _0x3d9f93,UniverCollaborationClientPlugin as _0x3f9f09}from'@univerjs-pro/collaboration-client';function _0x85a0(){const _0x23b890=['1152846YEebpZ','_threadCommentModel','deleteComment','dataSource','getMemberID','COMMENT','pipe','createTimestamp','threadId','stringify','Solved','addComment','_initDataSource','/universer-api/user/list','74090PUGJzW','slice','format','commentUpdate$','resolved','rangeType','values','/edit','UNIVER_UNKNOWN','code','_threadCommentDataSource','6836056sdzMYR','requireSession','content','body','1911xgmooL','Solve','resolveComment','user','_configService','parentId','type','syncUpdateMutationToColla','OpenOrReOpen','replyId','_threadCommentDataSourceService','_userService','11dLCfjx','7KaHFZX','YYYY/MM/DD\x20HH:mm','Unknown','length','getUnit','_config','_init','ref','/reply','parse','users','pluginName','Add','getCurrentUser','rangeId','_injector','3447HhwEZh','get','12416328JjxfRu','/delete','find','replies','UNRECOGNIZED','post','/solved','forEach','disposeWithMe','/add','/universer-api/comment/unit/','customRanges','onStarting','comments','Reply','root','196vpWGWV','saveCommentToSnapshot','_commentService','onReady','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','userID','Delete','_httpService','map','userId','thread-comment-data-source.config','20765CGQOgh','_sessionService','unitId','_initUserSync','listComments','updateComment','getOwnPropertyDescriptor','filter','error','11390eGnfNt','reply','add','72HHGHsh'];_0x85a0=function(){return _0x23b890;};return _0x85a0();}import{UniverLicensePlugin as _0x3fe27b}from'@univerjs-pro/license';import{dayjs as _0x56f7b2,UserManagerService as _0x30db64,Inject as _0xfdb629,Injector as _0xedefd5,Disposable as _0x5476f6,CustomRangeType as _0x66063e,UniverInstanceType as _0x13d77a,DependentOn as _0x18fc2e,IConfigService as _0x23ffae,Plugin as _0x212ef2,merge as _0x4e9d07}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ff4fb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x11e319,IThreadCommentDataSourceService as _0x4c2afb}from'@univerjs/thread-comment';import{bufferTime as _0x455ea8}from'rxjs';import{HTTPService as _0x217d03}from'@univerjs/network';const W=_0x579c20(0x1ee);var I=(_0x59fdc0=>(_0x59fdc0[_0x59fdc0[_0x579c20(0x1c2)]=0x0]='OpenOrReOpen',_0x59fdc0[_0x59fdc0[_0x579c20(0x20d)]=0x1]='Solved',_0x59fdc0[_0x59fdc0[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x59fdc0))(I||{}),v=(_0x10764b=>(_0x10764b[_0x10764b['Unknown']=0x0]=_0x579c20(0x1c9),_0x10764b[_0x10764b[_0x579c20(0x1d3)]=0x1]='Add',_0x10764b[_0x10764b[_0x579c20(0x1e7)]=0x2]=_0x579c20(0x1e7),_0x10764b[_0x10764b['Edit']=0x3]='Edit',_0x10764b[_0x10764b[_0x579c20(0x1f1)]=0x4]=_0x579c20(0x1f1),_0x10764b[_0x10764b[_0x579c20(0x221)]=0x5]='Solve',_0x10764b[_0x10764b[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x10764b))(v||{});const D=_0x1f6663=>_0x56f7b2(new Date(+_0x1f6663))[_0x579c20(0x213)](_0x579c20(0x1c8)),B=async(_0x52cf66,_0xc588d6)=>{const _0x157aac=_0x579c20,_0x34b893=_0x52cf66[_0x157aac(0x1d8)](_0x30db64),_0x5e686a=_0x52cf66[_0x157aac(0x1d8)](_0x217d03);_0xc588d6['forEach'](_0x1070a3=>{const _0x2569a2=_0x157aac;_0x34b893[_0x2569a2(0x1ed)](_0x1070a3)&&_0xc588d6['delete'](_0x1070a3);}),_0xc588d6['size']&&(await _0x5e686a['get'](_0x157aac(0x210),{'params':{'userIDs':[..._0xc588d6]}}))['body']['users'][_0x157aac(0x1e0)](_0x4f887b=>{_0x4f887b&&_0x34b893['addUser'](_0x4f887b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x471545,_0x355b95,_0x544974,_0x5c2582)=>{for(var _0x639c80=_0x5c2582>0x1?void 0x0:_0x5c2582?K(_0x355b95,_0x544974):_0x355b95,_0x28907e=_0x471545['length']-0x1,_0x57ce86;_0x28907e>=0x0;_0x28907e--)(_0x57ce86=_0x471545[_0x28907e])&&(_0x639c80=_0x57ce86(_0x639c80)||_0x639c80);return _0x639c80;},p=(_0x246949,_0x2da074)=>(_0x310f8d,_0x267e27)=>_0x2da074(_0x310f8d,_0x267e27,_0x246949);let S=class extends _0x5476f6{constructor(_0x46fa63,_0x4910d4,_0x23c7c9,_0x577ad3){const _0x495860=_0x579c20;super(),this[_0x495860(0x1eb)]=_0x46fa63,this[_0x495860(0x204)]=_0x4910d4,this[_0x495860(0x1c5)]=_0x23c7c9,this['_injector']=_0x577ad3,this['_init'](),this[_0x495860(0x1f9)]();}['_initUserSync'](){const _0x4de8c5=_0x579c20;this[_0x4de8c5(0x1e1)](this[_0x4de8c5(0x204)]['commentUpdate$'][_0x4de8c5(0x209)](_0x455ea8(0x10))['subscribe'](_0xb58bdd=>{const _0x47733c=_0x4de8c5,_0x25dbd1=new Set();_0xb58bdd[_0x47733c(0x1e0)](_0x29b037=>{const _0x3e359e=_0x47733c;switch(_0x29b037['type']){case _0x3e359e(0x201):{const _0x2eaa73=_0x29b037['payload']['personId'];_0x25dbd1[_0x3e359e(0x201)](_0x2eaa73);break;}}}),B(this['_injector'],_0x25dbd1);}));}[_0x579c20(0x1cd)](){const _0x460773=_0x579c20;this['disposeWithMe'](this[_0x460773(0x1eb)][_0x460773(0x214)]['subscribe'](async _0x4ba53a=>{const _0x1ed2ee=_0x460773;var _0x368fcb,_0x5cba2e,_0x21609b,_0x49b8ee;const _0x4c8df3=(_0x368fcb=this[_0x1ed2ee(0x204)]['getUnit'](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0x43bc58=>_0x43bc58[_0x1ed2ee(0x20b)]===_0x4ba53a['threadId']))==null?void 0x0:_0x368fcb['root'];if(!_0x4c8df3)return;const {unitId:_0x3b6135,subUnitId:_0x44d7d8}=_0x4c8df3;switch(_0x4ba53a[_0x1ed2ee(0x223)]&&this[_0x1ed2ee(0x1c5)]['addUser'](_0x4ba53a['user']),_0x4ba53a[_0x1ed2ee(0x1c0)]){case v[_0x1ed2ee(0x1d3)]:break;case v[_0x1ed2ee(0x1e7)]:{this[_0x1ed2ee(0x204)]['addComment'](_0x3b6135,_0x44d7d8,{'unitId':_0x3b6135,'subUnitId':_0x44d7d8,'ref':'','id':_0x4ba53a[_0x1ed2ee(0x1c3)],'dT':D(+_0x4ba53a['createTimestamp']),'threadId':_0x4ba53a['threadId'],'personId':(_0x21609b=(_0x5cba2e=_0x4ba53a[_0x1ed2ee(0x223)])==null?void 0x0:_0x5cba2e['userID'])!=null?_0x21609b:_0x4ba53a[_0x1ed2ee(0x1f4)],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)]),'parentId':_0x4c8df3['id']});break;}case v[_0x1ed2ee(0x1f1)]:{const _0x2c852d=this[_0x1ed2ee(0x204)]['getComment'](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);_0x2c852d&&_0x2c852d[_0x1ed2ee(0x1bf)]&&this['_threadCommentModel'][_0x1ed2ee(0x205)](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);break;}case v['Edit']:{this[_0x1ed2ee(0x204)]['updateComment'](_0x3b6135,_0x44d7d8,{'commentId':_0x4ba53a['replyId'],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)])});break;}case v[_0x1ed2ee(0x221)]:{const _0x3b3ec1=(_0x49b8ee=this['_threadCommentModel'][_0x1ed2ee(0x1cb)](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0xa80e7e=>_0xa80e7e['threadId']===_0x4ba53a[_0x1ed2ee(0x20b)]))==null?void 0x0:_0x49b8ee[_0x1ed2ee(0x1e8)];_0x3b3ec1&&this[_0x1ed2ee(0x204)][_0x1ed2ee(0x222)](_0x3b6135,_0x44d7d8,_0x3b3ec1['id'],_0x4ba53a[_0x1ed2ee(0x1ef)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xfdb629(_0x17d1ba)),p(0x1,_0xfdb629(_0x11e319)),p(0x2,_0xfdb629(_0x30db64)),p(0x3,_0xfdb629(_0xedefd5))],S);const z=_0x579c20(0x1f5),M={};var k=Object[_0x579c20(0x1fc)],Q=(_0x45808e,_0x378876,_0x1225a5,_0x35ea91)=>{const _0x1c3714=_0x579c20;for(var _0x393660=_0x35ea91>0x1?void 0x0:_0x35ea91?k(_0x378876,_0x1225a5):_0x378876,_0x402094=_0x45808e[_0x1c3714(0x1ca)]-0x1,_0x4a44b6;_0x402094>=0x0;_0x402094--)(_0x4a44b6=_0x45808e[_0x402094])&&(_0x393660=_0x4a44b6(_0x393660)||_0x393660);return _0x393660;},_=(_0x4260b9,_0x171e20)=>(_0x41ff99,_0x40dd70)=>_0x171e20(_0x41ff99,_0x40dd70,_0x4260b9);function X(_0x160899,_0x40a24e){const _0x53d479=_0x579c20,_0x343f8e=_0x160899[_0x53d479(0x1dc)][0x0];return{..._0x40a24e,'id':_0x343f8e['replyId'],'resolved':_0x160899['solved']===0x1,'dT':D(_0x343f8e[_0x53d479(0x20a)]),'personId':_0x343f8e[_0x53d479(0x1f4)],'threadId':_0x343f8e[_0x53d479(0x20b)]};}function ee(_0x4dd358,_0x3ff13e,_0x8679ab){const _0x1e2857=_0x579c20;var _0x498072,_0x45c7ef;if(((_0x45c7ef=(_0x498072=_0x4dd358==null?void 0x0:_0x4dd358[_0x1e2857(0x1dc)])==null?void 0x0:_0x498072[_0x1e2857(0x1ca)])!=null?_0x45c7ef:0x0)>0x0){const _0x368b88=(_0x140ee5,_0x3d05c4)=>({'id':_0x140ee5['replyId'],'threadId':_0x140ee5[_0x1e2857(0x20b)],'dT':D(_0x140ee5[_0x1e2857(0x20a)]),'personId':_0x140ee5['userId'],'resolved':_0x4dd358[_0x1e2857(0x1ef)]===I[_0x1e2857(0x20d)],'unitId':_0x3ff13e,'subUnitId':_0x8679ab,'text':JSON[_0x1e2857(0x1d0)](_0x140ee5[_0x1e2857(0x21e)]),'parentId':_0x3d05c4}),_0x5247d3=_0x368b88(_0x4dd358['replies'][0x0]);return{..._0x5247d3,'children':_0x4dd358['replies'][_0x1e2857(0x212)](0x1)[_0x1e2857(0x1f3)](_0x143baf=>_0x368b88(_0x143baf,_0x5247d3['id']))};}return null;}let f=class{constructor(_0x44616f,_0x564672,_0x1f2950,_0x105c12){const _0x71c10c=_0x579c20;this['_httpService']=_0x44616f,this[_0x71c10c(0x1c5)]=_0x564672,this[_0x71c10c(0x1f7)]=_0x1f2950,this[_0x71c10c(0x1d6)]=_0x105c12;}async[_0x579c20(0x20e)](_0x67785c){const _0xe58fbb=_0x579c20;var _0x3cf550,_0x4279c2;const {parentId:_0x3acf03,unitId:_0x27ccc9,text:_0x5de64d,threadId:_0x31deac}=_0x67785c,_0x4de088=(_0x4279c2=(_0x3cf550=_0x5de64d[_0xe58fbb(0x1e4)])==null?void 0x0:_0x3cf550['filter'](_0x4618fe=>_0x4618fe[_0xe58fbb(0x216)]===_0x66063e['COMMENT'])[_0xe58fbb(0x1f3)](_0xace37b=>_0xace37b[_0xe58fbb(0x1d5)]))!=null?_0x4279c2:[],_0x5c91aa=JSON[_0xe58fbb(0x20c)](_0x5de64d),_0x508a97=(await this[_0xe58fbb(0x1f7)][_0xe58fbb(0x21d)](_0x27ccc9))[_0xe58fbb(0x207)]();if(_0x3acf03){const _0xbf7634={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088,'threadId':_0x31deac},_0x4a6a9b=(await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1cf),{'body':_0xbf7634}))['body'][_0xe58fbb(0x200)];return{..._0x67785c,'id':_0x4a6a9b['replyId'],'dT':_0x56f7b2(+_0x4a6a9b['createTimestamp'])[_0xe58fbb(0x213)](_0xe58fbb(0x1c8)),'personId':_0x4a6a9b[_0xe58fbb(0x1f4)]};}else{const _0x504773={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088},_0x4ab39b=await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1e2),{'body':_0x504773});return X(_0x4ab39b['body']['comment'],_0x67785c);}}async[_0x579c20(0x1fb)](_0x2e6699){const _0x235ad8=_0x579c20;var _0x3bee31,_0x307ca7;const {text:_0x594a8c,unitId:_0x47721b}=_0x2e6699,_0x323b34=(_0x307ca7=(_0x3bee31=_0x594a8c[_0x235ad8(0x1e4)])==null?void 0x0:_0x3bee31[_0x235ad8(0x1fd)](_0x56de4d=>_0x56de4d[_0x235ad8(0x216)]===_0x66063e[_0x235ad8(0x208)])[_0x235ad8(0x1f3)](_0x445f87=>_0x445f87[_0x235ad8(0x1d5)]))!=null?_0x307ca7:[],_0x5bbde7=JSON[_0x235ad8(0x20c)](_0x594a8c),_0x3cc976=_0x2e6699[_0x235ad8(0x20b)],_0xbe3082=_0x2e6699['id'],_0x4e5ee1={'memberId':(await this[_0x235ad8(0x1f7)][_0x235ad8(0x21d)](_0x47721b))[_0x235ad8(0x207)](),'unitId':_0x47721b,'threadId':_0x3cc976,'mention':_0x323b34,'content':_0x5bbde7,'replyId':_0xbe3082},_0x18cbd3=await this[_0x235ad8(0x1f2)]['post'](_0x235ad8(0x1e3)+_0x47721b+_0x235ad8(0x218),{'body':_0x4e5ee1});return!_0x18cbd3[_0x235ad8(0x21f)]['error']||_0x18cbd3[_0x235ad8(0x21f)][_0x235ad8(0x1fe)][_0x235ad8(0x21a)]===0x1;}async['resolveComment'](_0x36078d){const _0x2d9aca=_0x579c20,{unitId:_0x100167}=_0x36078d,_0x32bf6e=_0x36078d['threadId'],_0x5bebd4={'memberId':this[_0x2d9aca(0x1c5)][_0x2d9aca(0x1d4)]()[_0x2d9aca(0x1f0)],'unitId':_0x100167,'threadId':_0x32bf6e,'solved':_0x36078d[_0x2d9aca(0x215)]?I[_0x2d9aca(0x20d)]:I[_0x2d9aca(0x1c2)]},_0x2666cb=await this[_0x2d9aca(0x1f2)][_0x2d9aca(0x1de)]('/universer-api/comment/unit/'+_0x100167+_0x2d9aca(0x1df),{'body':_0x5bebd4});return!_0x2666cb[_0x2d9aca(0x21f)]['error']||_0x2666cb[_0x2d9aca(0x21f)][_0x2d9aca(0x1fe)][_0x2d9aca(0x21a)]===0x1;}async[_0x579c20(0x205)](_0x23bb7f,_0x3bc849,_0x518143,_0x2da63b){const _0x6b13e4=_0x579c20,_0x1581f0={'memberId':(await this[_0x6b13e4(0x1f7)][_0x6b13e4(0x21d)](_0x23bb7f))[_0x6b13e4(0x207)](),'threadId':_0x518143,'replyId':_0x2da63b,'unitId':_0x23bb7f},_0x3b0528=await this[_0x6b13e4(0x1f2)][_0x6b13e4(0x1de)](_0x6b13e4(0x1e3)+_0x23bb7f+_0x6b13e4(0x1da),{'body':_0x1581f0});return!_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)]||_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)][_0x6b13e4(0x21a)]===0x1;}async[_0x579c20(0x1fa)](_0x2a457a,_0x1d4d0f,_0x2116de){const _0x4393b5=_0x579c20,_0x591d79={'unitId':_0x2a457a,'threadId':_0x2116de},_0x5142e4=await this[_0x4393b5(0x1f2)][_0x4393b5(0x1de)]('/universer-api/comment/unit/'+_0x2a457a+'/list',{'body':_0x591d79}),_0x5f4f08=_0x2116de[_0x4393b5(0x1f3)](_0x34fb65=>ee(_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1e6)][_0x34fb65],_0x2a457a,_0x1d4d0f))[_0x4393b5(0x1fd)](Boolean);return Object[_0x4393b5(0x217)](_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1d1)])[_0x4393b5(0x1e0)](_0x2bde33=>{const _0xce8f5d=_0x4393b5;this[_0xce8f5d(0x1c5)]['addUser'](_0x2bde33);}),_0x5f4f08;}[_0x579c20(0x1ea)](_0x3bcc79){const _0x53f3fc=_0x579c20;return{'id':_0x3bcc79['id'],'threadId':_0x3bcc79[_0x53f3fc(0x20b)],'ref':_0x3bcc79[_0x53f3fc(0x1ce)]};}};f=Q([_(0x0,_0xfdb629(_0x217d03)),_(0x1,_0xfdb629(_0x30db64)),_(0x2,_0xfdb629(_0x3d9f93)),_(0x3,_0xfdb629(_0xedefd5))],f);var re=Object[_0x579c20(0x1fc)],te=(_0x587487,_0x1f62be,_0xb70b67,_0x5cd8b3)=>{const _0x277c93=_0x579c20;for(var _0x11fa97=_0x5cd8b3>0x1?void 0x0:_0x5cd8b3?re(_0x1f62be,_0xb70b67):_0x1f62be,_0xe14a36=_0x587487[_0x277c93(0x1ca)]-0x1,_0x3bc5a6;_0xe14a36>=0x0;_0xe14a36--)(_0x3bc5a6=_0x587487[_0xe14a36])&&(_0x11fa97=_0x3bc5a6(_0x11fa97)||_0x11fa97);return _0x11fa97;},N=(_0x52e3cc,_0x42075c)=>(_0x7dcf59,_0x2492a6)=>_0x42075c(_0x7dcf59,_0x2492a6,_0x52e3cc);let g=class extends _0x5476f6{constructor(_0x324ac6,_0x23324d){const _0x2e4ab1=_0x579c20;super(),this[_0x2e4ab1(0x1c4)]=_0x324ac6,this[_0x2e4ab1(0x21b)]=_0x23324d,this[_0x2e4ab1(0x20f)]();}[_0x579c20(0x20f)](){const _0x3b1990=_0x579c20;this[_0x3b1990(0x1c4)][_0x3b1990(0x206)]=this['_threadCommentDataSource'],this[_0x3b1990(0x1c4)][_0x3b1990(0x1c1)]=!0x1;}};function _0x39bc(_0x4d073d,_0x11e396){const _0x85a08a=_0x85a0();return _0x39bc=function(_0x39bce5,_0x47fb34){_0x39bce5=_0x39bce5-0x1be;let _0x54f029=_0x85a08a[_0x39bce5];return _0x54f029;},_0x39bc(_0x4d073d,_0x11e396);}g=te([N(0x0,_0x4c2afb),N(0x1,_0xfdb629(f))],g);var se=Object['defineProperty'],oe=Object[_0x579c20(0x1fc)],ne=(_0xd66e01,_0x5efc0b,_0xfa577a)=>_0x5efc0b in _0xd66e01?se(_0xd66e01,_0x5efc0b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfa577a}):_0xd66e01[_0x5efc0b]=_0xfa577a,ie=(_0x251592,_0x2e5e7c,_0x343cbe,_0x290471)=>{const _0xf3ac10=_0x579c20;for(var _0x5de1e3=_0x290471>0x1?void 0x0:_0x290471?oe(_0x2e5e7c,_0x343cbe):_0x2e5e7c,_0x3ea5f7=_0x251592[_0xf3ac10(0x1ca)]-0x1,_0x290db2;_0x3ea5f7>=0x0;_0x3ea5f7--)(_0x290db2=_0x251592[_0x3ea5f7])&&(_0x5de1e3=_0x290db2(_0x5de1e3)||_0x5de1e3);return _0x5de1e3;},w=(_0x2930c4,_0x5f4643)=>(_0x3eba81,_0x3cab6a)=>_0x5f4643(_0x3eba81,_0x3cab6a,_0x2930c4),$=(_0x2cb69e,_0x46b1b0,_0x42b110)=>ne(_0x2cb69e,typeof _0x46b1b0!='symbol'?_0x46b1b0+'':_0x46b1b0,_0x42b110);let b=class extends _0x212ef2{constructor(_0x381505=M,_0xd639ad,_0x5e9cb6){const _0xb7ed8d=_0x579c20;super(),this[_0xb7ed8d(0x1cc)]=_0x381505,this[_0xb7ed8d(0x1d6)]=_0xd639ad,this[_0xb7ed8d(0x1be)]=_0x5e9cb6;const {..._0x4b1085}=_0x4e9d07({},M,this[_0xb7ed8d(0x1cc)]);this[_0xb7ed8d(0x1be)]['setConfig'](z,_0x4b1085);}[_0x579c20(0x1e5)](){const _0x4f45b9=_0x579c20;[[f],[g],[S]][_0x4f45b9(0x1e0)](_0x41d14e=>{const _0xa47dc9=_0x4f45b9;this['_injector'][_0xa47dc9(0x201)](_0x41d14e);});}[_0x579c20(0x1ec)](){const _0x26f858=_0x579c20;this[_0x26f858(0x1d6)][_0x26f858(0x1d8)](g),this['_injector'][_0x26f858(0x1d8)](S);}};$(b,_0x579c20(0x1d2),W),$(b,_0x579c20(0x1c0),_0x13d77a[_0x579c20(0x219)]),b=ie([_0x18fc2e(_0x1ff4fb,_0x3f9f09,_0x3fe27b),w(0x1,_0xfdb629(_0xedefd5)),w(0x2,_0x23ffae)],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 _0x579c20=_0x39bc;(function(_0x3a19ec,_0x5306c6){const _0x2664d2=_0x39bc,_0x268996=_0x3a19ec();while(!![]){try{const _0x3f9853=parseInt(_0x2664d2(0x220))/0x1+parseInt(_0x2664d2(0x211))/0x2*(parseInt(_0x2664d2(0x202))/0x3)+parseInt(_0x2664d2(0x1e9))/0x4*(parseInt(_0x2664d2(0x1f6))/0x5)+-parseInt(_0x2664d2(0x203))/0x6+parseInt(_0x2664d2(0x1c7))/0x7*(-parseInt(_0x2664d2(0x21c))/0x8)+parseInt(_0x2664d2(0x1d7))/0x9*(-parseInt(_0x2664d2(0x1ff))/0xa)+-parseInt(_0x2664d2(0x1c6))/0xb*(-parseInt(_0x2664d2(0x1d9))/0xc);if(_0x3f9853===_0x5306c6)break;else _0x268996['push'](_0x268996['shift']());}catch(_0x4ed346){_0x268996['push'](_0x268996['shift']());}}}(_0x85a0,0x9dc99));import{CommentService as _0x17d1ba,CollaborationSessionService as _0x3d9f93,UniverCollaborationClientPlugin as _0x3f9f09}from'@univerjs-pro/collaboration-client';function _0x85a0(){const _0x23b890=['1152846YEebpZ','_threadCommentModel','deleteComment','dataSource','getMemberID','COMMENT','pipe','createTimestamp','threadId','stringify','Solved','addComment','_initDataSource','/universer-api/user/list','74090PUGJzW','slice','format','commentUpdate$','resolved','rangeType','values','/edit','UNIVER_UNKNOWN','code','_threadCommentDataSource','6836056sdzMYR','requireSession','content','body','1911xgmooL','Solve','resolveComment','user','_configService','parentId','type','syncUpdateMutationToColla','OpenOrReOpen','replyId','_threadCommentDataSourceService','_userService','11dLCfjx','7KaHFZX','YYYY/MM/DD\x20HH:mm','Unknown','length','getUnit','_config','_init','ref','/reply','parse','users','pluginName','Add','getCurrentUser','rangeId','_injector','3447HhwEZh','get','12416328JjxfRu','/delete','find','replies','UNRECOGNIZED','post','/solved','forEach','disposeWithMe','/add','/universer-api/comment/unit/','customRanges','onStarting','comments','Reply','root','196vpWGWV','saveCommentToSnapshot','_commentService','onReady','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','userID','Delete','_httpService','map','userId','thread-comment-data-source.config','20765CGQOgh','_sessionService','unitId','_initUserSync','listComments','updateComment','getOwnPropertyDescriptor','filter','error','11390eGnfNt','reply','add','72HHGHsh'];_0x85a0=function(){return _0x23b890;};return _0x85a0();}import{UniverLicensePlugin as _0x3fe27b}from'@univerjs-pro/license';import{dayjs as _0x56f7b2,UserManagerService as _0x30db64,Inject as _0xfdb629,Injector as _0xedefd5,Disposable as _0x5476f6,CustomRangeType as _0x66063e,UniverInstanceType as _0x13d77a,DependentOn as _0x18fc2e,IConfigService as _0x23ffae,Plugin as _0x212ef2,merge as _0x4e9d07}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ff4fb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x11e319,IThreadCommentDataSourceService as _0x4c2afb}from'@univerjs/thread-comment';import{bufferTime as _0x455ea8}from'rxjs';import{HTTPService as _0x217d03}from'@univerjs/network';const W=_0x579c20(0x1ee);var I=(_0x59fdc0=>(_0x59fdc0[_0x59fdc0[_0x579c20(0x1c2)]=0x0]='OpenOrReOpen',_0x59fdc0[_0x59fdc0[_0x579c20(0x20d)]=0x1]='Solved',_0x59fdc0[_0x59fdc0[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x59fdc0))(I||{}),v=(_0x10764b=>(_0x10764b[_0x10764b['Unknown']=0x0]=_0x579c20(0x1c9),_0x10764b[_0x10764b[_0x579c20(0x1d3)]=0x1]='Add',_0x10764b[_0x10764b[_0x579c20(0x1e7)]=0x2]=_0x579c20(0x1e7),_0x10764b[_0x10764b['Edit']=0x3]='Edit',_0x10764b[_0x10764b[_0x579c20(0x1f1)]=0x4]=_0x579c20(0x1f1),_0x10764b[_0x10764b[_0x579c20(0x221)]=0x5]='Solve',_0x10764b[_0x10764b[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x10764b))(v||{});const D=_0x1f6663=>_0x56f7b2(new Date(+_0x1f6663))[_0x579c20(0x213)](_0x579c20(0x1c8)),B=async(_0x52cf66,_0xc588d6)=>{const _0x157aac=_0x579c20,_0x34b893=_0x52cf66[_0x157aac(0x1d8)](_0x30db64),_0x5e686a=_0x52cf66[_0x157aac(0x1d8)](_0x217d03);_0xc588d6['forEach'](_0x1070a3=>{const _0x2569a2=_0x157aac;_0x34b893[_0x2569a2(0x1ed)](_0x1070a3)&&_0xc588d6['delete'](_0x1070a3);}),_0xc588d6['size']&&(await _0x5e686a['get'](_0x157aac(0x210),{'params':{'userIDs':[..._0xc588d6]}}))['body']['users'][_0x157aac(0x1e0)](_0x4f887b=>{_0x4f887b&&_0x34b893['addUser'](_0x4f887b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x471545,_0x355b95,_0x544974,_0x5c2582)=>{for(var _0x639c80=_0x5c2582>0x1?void 0x0:_0x5c2582?K(_0x355b95,_0x544974):_0x355b95,_0x28907e=_0x471545['length']-0x1,_0x57ce86;_0x28907e>=0x0;_0x28907e--)(_0x57ce86=_0x471545[_0x28907e])&&(_0x639c80=_0x57ce86(_0x639c80)||_0x639c80);return _0x639c80;},p=(_0x246949,_0x2da074)=>(_0x310f8d,_0x267e27)=>_0x2da074(_0x310f8d,_0x267e27,_0x246949);let S=class extends _0x5476f6{constructor(_0x46fa63,_0x4910d4,_0x23c7c9,_0x577ad3){const _0x495860=_0x579c20;super(),this[_0x495860(0x1eb)]=_0x46fa63,this[_0x495860(0x204)]=_0x4910d4,this[_0x495860(0x1c5)]=_0x23c7c9,this['_injector']=_0x577ad3,this['_init'](),this[_0x495860(0x1f9)]();}['_initUserSync'](){const _0x4de8c5=_0x579c20;this[_0x4de8c5(0x1e1)](this[_0x4de8c5(0x204)]['commentUpdate$'][_0x4de8c5(0x209)](_0x455ea8(0x10))['subscribe'](_0xb58bdd=>{const _0x47733c=_0x4de8c5,_0x25dbd1=new Set();_0xb58bdd[_0x47733c(0x1e0)](_0x29b037=>{const _0x3e359e=_0x47733c;switch(_0x29b037['type']){case _0x3e359e(0x201):{const _0x2eaa73=_0x29b037['payload']['personId'];_0x25dbd1[_0x3e359e(0x201)](_0x2eaa73);break;}}}),B(this['_injector'],_0x25dbd1);}));}[_0x579c20(0x1cd)](){const _0x460773=_0x579c20;this['disposeWithMe'](this[_0x460773(0x1eb)][_0x460773(0x214)]['subscribe'](async _0x4ba53a=>{const _0x1ed2ee=_0x460773;var _0x368fcb,_0x5cba2e,_0x21609b,_0x49b8ee;const _0x4c8df3=(_0x368fcb=this[_0x1ed2ee(0x204)]['getUnit'](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0x43bc58=>_0x43bc58[_0x1ed2ee(0x20b)]===_0x4ba53a['threadId']))==null?void 0x0:_0x368fcb['root'];if(!_0x4c8df3)return;const {unitId:_0x3b6135,subUnitId:_0x44d7d8}=_0x4c8df3;switch(_0x4ba53a[_0x1ed2ee(0x223)]&&this[_0x1ed2ee(0x1c5)]['addUser'](_0x4ba53a['user']),_0x4ba53a[_0x1ed2ee(0x1c0)]){case v[_0x1ed2ee(0x1d3)]:break;case v[_0x1ed2ee(0x1e7)]:{this[_0x1ed2ee(0x204)]['addComment'](_0x3b6135,_0x44d7d8,{'unitId':_0x3b6135,'subUnitId':_0x44d7d8,'ref':'','id':_0x4ba53a[_0x1ed2ee(0x1c3)],'dT':D(+_0x4ba53a['createTimestamp']),'threadId':_0x4ba53a['threadId'],'personId':(_0x21609b=(_0x5cba2e=_0x4ba53a[_0x1ed2ee(0x223)])==null?void 0x0:_0x5cba2e['userID'])!=null?_0x21609b:_0x4ba53a[_0x1ed2ee(0x1f4)],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)]),'parentId':_0x4c8df3['id']});break;}case v[_0x1ed2ee(0x1f1)]:{const _0x2c852d=this[_0x1ed2ee(0x204)]['getComment'](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);_0x2c852d&&_0x2c852d[_0x1ed2ee(0x1bf)]&&this['_threadCommentModel'][_0x1ed2ee(0x205)](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);break;}case v['Edit']:{this[_0x1ed2ee(0x204)]['updateComment'](_0x3b6135,_0x44d7d8,{'commentId':_0x4ba53a['replyId'],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)])});break;}case v[_0x1ed2ee(0x221)]:{const _0x3b3ec1=(_0x49b8ee=this['_threadCommentModel'][_0x1ed2ee(0x1cb)](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0xa80e7e=>_0xa80e7e['threadId']===_0x4ba53a[_0x1ed2ee(0x20b)]))==null?void 0x0:_0x49b8ee[_0x1ed2ee(0x1e8)];_0x3b3ec1&&this[_0x1ed2ee(0x204)][_0x1ed2ee(0x222)](_0x3b6135,_0x44d7d8,_0x3b3ec1['id'],_0x4ba53a[_0x1ed2ee(0x1ef)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xfdb629(_0x17d1ba)),p(0x1,_0xfdb629(_0x11e319)),p(0x2,_0xfdb629(_0x30db64)),p(0x3,_0xfdb629(_0xedefd5))],S);const z=_0x579c20(0x1f5),M={};var k=Object[_0x579c20(0x1fc)],Q=(_0x45808e,_0x378876,_0x1225a5,_0x35ea91)=>{const _0x1c3714=_0x579c20;for(var _0x393660=_0x35ea91>0x1?void 0x0:_0x35ea91?k(_0x378876,_0x1225a5):_0x378876,_0x402094=_0x45808e[_0x1c3714(0x1ca)]-0x1,_0x4a44b6;_0x402094>=0x0;_0x402094--)(_0x4a44b6=_0x45808e[_0x402094])&&(_0x393660=_0x4a44b6(_0x393660)||_0x393660);return _0x393660;},_=(_0x4260b9,_0x171e20)=>(_0x41ff99,_0x40dd70)=>_0x171e20(_0x41ff99,_0x40dd70,_0x4260b9);function X(_0x160899,_0x40a24e){const _0x53d479=_0x579c20,_0x343f8e=_0x160899[_0x53d479(0x1dc)][0x0];return{..._0x40a24e,'id':_0x343f8e['replyId'],'resolved':_0x160899['solved']===0x1,'dT':D(_0x343f8e[_0x53d479(0x20a)]),'personId':_0x343f8e[_0x53d479(0x1f4)],'threadId':_0x343f8e[_0x53d479(0x20b)]};}function ee(_0x4dd358,_0x3ff13e,_0x8679ab){const _0x1e2857=_0x579c20;var _0x498072,_0x45c7ef;if(((_0x45c7ef=(_0x498072=_0x4dd358==null?void 0x0:_0x4dd358[_0x1e2857(0x1dc)])==null?void 0x0:_0x498072[_0x1e2857(0x1ca)])!=null?_0x45c7ef:0x0)>0x0){const _0x368b88=(_0x140ee5,_0x3d05c4)=>({'id':_0x140ee5['replyId'],'threadId':_0x140ee5[_0x1e2857(0x20b)],'dT':D(_0x140ee5[_0x1e2857(0x20a)]),'personId':_0x140ee5['userId'],'resolved':_0x4dd358[_0x1e2857(0x1ef)]===I[_0x1e2857(0x20d)],'unitId':_0x3ff13e,'subUnitId':_0x8679ab,'text':JSON[_0x1e2857(0x1d0)](_0x140ee5[_0x1e2857(0x21e)]),'parentId':_0x3d05c4}),_0x5247d3=_0x368b88(_0x4dd358['replies'][0x0]);return{..._0x5247d3,'children':_0x4dd358['replies'][_0x1e2857(0x212)](0x1)[_0x1e2857(0x1f3)](_0x143baf=>_0x368b88(_0x143baf,_0x5247d3['id']))};}return null;}let f=class{constructor(_0x44616f,_0x564672,_0x1f2950,_0x105c12){const _0x71c10c=_0x579c20;this['_httpService']=_0x44616f,this[_0x71c10c(0x1c5)]=_0x564672,this[_0x71c10c(0x1f7)]=_0x1f2950,this[_0x71c10c(0x1d6)]=_0x105c12;}async[_0x579c20(0x20e)](_0x67785c){const _0xe58fbb=_0x579c20;var _0x3cf550,_0x4279c2;const {parentId:_0x3acf03,unitId:_0x27ccc9,text:_0x5de64d,threadId:_0x31deac}=_0x67785c,_0x4de088=(_0x4279c2=(_0x3cf550=_0x5de64d[_0xe58fbb(0x1e4)])==null?void 0x0:_0x3cf550['filter'](_0x4618fe=>_0x4618fe[_0xe58fbb(0x216)]===_0x66063e['COMMENT'])[_0xe58fbb(0x1f3)](_0xace37b=>_0xace37b[_0xe58fbb(0x1d5)]))!=null?_0x4279c2:[],_0x5c91aa=JSON[_0xe58fbb(0x20c)](_0x5de64d),_0x508a97=(await this[_0xe58fbb(0x1f7)][_0xe58fbb(0x21d)](_0x27ccc9))[_0xe58fbb(0x207)]();if(_0x3acf03){const _0xbf7634={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088,'threadId':_0x31deac},_0x4a6a9b=(await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1cf),{'body':_0xbf7634}))['body'][_0xe58fbb(0x200)];return{..._0x67785c,'id':_0x4a6a9b['replyId'],'dT':_0x56f7b2(+_0x4a6a9b['createTimestamp'])[_0xe58fbb(0x213)](_0xe58fbb(0x1c8)),'personId':_0x4a6a9b[_0xe58fbb(0x1f4)]};}else{const _0x504773={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088},_0x4ab39b=await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1e2),{'body':_0x504773});return X(_0x4ab39b['body']['comment'],_0x67785c);}}async[_0x579c20(0x1fb)](_0x2e6699){const _0x235ad8=_0x579c20;var _0x3bee31,_0x307ca7;const {text:_0x594a8c,unitId:_0x47721b}=_0x2e6699,_0x323b34=(_0x307ca7=(_0x3bee31=_0x594a8c[_0x235ad8(0x1e4)])==null?void 0x0:_0x3bee31[_0x235ad8(0x1fd)](_0x56de4d=>_0x56de4d[_0x235ad8(0x216)]===_0x66063e[_0x235ad8(0x208)])[_0x235ad8(0x1f3)](_0x445f87=>_0x445f87[_0x235ad8(0x1d5)]))!=null?_0x307ca7:[],_0x5bbde7=JSON[_0x235ad8(0x20c)](_0x594a8c),_0x3cc976=_0x2e6699[_0x235ad8(0x20b)],_0xbe3082=_0x2e6699['id'],_0x4e5ee1={'memberId':(await this[_0x235ad8(0x1f7)][_0x235ad8(0x21d)](_0x47721b))[_0x235ad8(0x207)](),'unitId':_0x47721b,'threadId':_0x3cc976,'mention':_0x323b34,'content':_0x5bbde7,'replyId':_0xbe3082},_0x18cbd3=await this[_0x235ad8(0x1f2)]['post'](_0x235ad8(0x1e3)+_0x47721b+_0x235ad8(0x218),{'body':_0x4e5ee1});return!_0x18cbd3[_0x235ad8(0x21f)]['error']||_0x18cbd3[_0x235ad8(0x21f)][_0x235ad8(0x1fe)][_0x235ad8(0x21a)]===0x1;}async['resolveComment'](_0x36078d){const _0x2d9aca=_0x579c20,{unitId:_0x100167}=_0x36078d,_0x32bf6e=_0x36078d['threadId'],_0x5bebd4={'memberId':this[_0x2d9aca(0x1c5)][_0x2d9aca(0x1d4)]()[_0x2d9aca(0x1f0)],'unitId':_0x100167,'threadId':_0x32bf6e,'solved':_0x36078d[_0x2d9aca(0x215)]?I[_0x2d9aca(0x20d)]:I[_0x2d9aca(0x1c2)]},_0x2666cb=await this[_0x2d9aca(0x1f2)][_0x2d9aca(0x1de)]('/universer-api/comment/unit/'+_0x100167+_0x2d9aca(0x1df),{'body':_0x5bebd4});return!_0x2666cb[_0x2d9aca(0x21f)]['error']||_0x2666cb[_0x2d9aca(0x21f)][_0x2d9aca(0x1fe)][_0x2d9aca(0x21a)]===0x1;}async[_0x579c20(0x205)](_0x23bb7f,_0x3bc849,_0x518143,_0x2da63b){const _0x6b13e4=_0x579c20,_0x1581f0={'memberId':(await this[_0x6b13e4(0x1f7)][_0x6b13e4(0x21d)](_0x23bb7f))[_0x6b13e4(0x207)](),'threadId':_0x518143,'replyId':_0x2da63b,'unitId':_0x23bb7f},_0x3b0528=await this[_0x6b13e4(0x1f2)][_0x6b13e4(0x1de)](_0x6b13e4(0x1e3)+_0x23bb7f+_0x6b13e4(0x1da),{'body':_0x1581f0});return!_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)]||_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)][_0x6b13e4(0x21a)]===0x1;}async[_0x579c20(0x1fa)](_0x2a457a,_0x1d4d0f,_0x2116de){const _0x4393b5=_0x579c20,_0x591d79={'unitId':_0x2a457a,'threadId':_0x2116de},_0x5142e4=await this[_0x4393b5(0x1f2)][_0x4393b5(0x1de)]('/universer-api/comment/unit/'+_0x2a457a+'/list',{'body':_0x591d79}),_0x5f4f08=_0x2116de[_0x4393b5(0x1f3)](_0x34fb65=>ee(_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1e6)][_0x34fb65],_0x2a457a,_0x1d4d0f))[_0x4393b5(0x1fd)](Boolean);return Object[_0x4393b5(0x217)](_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1d1)])[_0x4393b5(0x1e0)](_0x2bde33=>{const _0xce8f5d=_0x4393b5;this[_0xce8f5d(0x1c5)]['addUser'](_0x2bde33);}),_0x5f4f08;}[_0x579c20(0x1ea)](_0x3bcc79){const _0x53f3fc=_0x579c20;return{'id':_0x3bcc79['id'],'threadId':_0x3bcc79[_0x53f3fc(0x20b)],'ref':_0x3bcc79[_0x53f3fc(0x1ce)]};}};f=Q([_(0x0,_0xfdb629(_0x217d03)),_(0x1,_0xfdb629(_0x30db64)),_(0x2,_0xfdb629(_0x3d9f93)),_(0x3,_0xfdb629(_0xedefd5))],f);var re=Object[_0x579c20(0x1fc)],te=(_0x587487,_0x1f62be,_0xb70b67,_0x5cd8b3)=>{const _0x277c93=_0x579c20;for(var _0x11fa97=_0x5cd8b3>0x1?void 0x0:_0x5cd8b3?re(_0x1f62be,_0xb70b67):_0x1f62be,_0xe14a36=_0x587487[_0x277c93(0x1ca)]-0x1,_0x3bc5a6;_0xe14a36>=0x0;_0xe14a36--)(_0x3bc5a6=_0x587487[_0xe14a36])&&(_0x11fa97=_0x3bc5a6(_0x11fa97)||_0x11fa97);return _0x11fa97;},N=(_0x52e3cc,_0x42075c)=>(_0x7dcf59,_0x2492a6)=>_0x42075c(_0x7dcf59,_0x2492a6,_0x52e3cc);let g=class extends _0x5476f6{constructor(_0x324ac6,_0x23324d){const _0x2e4ab1=_0x579c20;super(),this[_0x2e4ab1(0x1c4)]=_0x324ac6,this[_0x2e4ab1(0x21b)]=_0x23324d,this[_0x2e4ab1(0x20f)]();}[_0x579c20(0x20f)](){const _0x3b1990=_0x579c20;this[_0x3b1990(0x1c4)][_0x3b1990(0x206)]=this['_threadCommentDataSource'],this[_0x3b1990(0x1c4)][_0x3b1990(0x1c1)]=!0x1;}};function _0x39bc(_0x4d073d,_0x11e396){const _0x85a08a=_0x85a0();return _0x39bc=function(_0x39bce5,_0x47fb34){_0x39bce5=_0x39bce5-0x1be;let _0x54f029=_0x85a08a[_0x39bce5];return _0x54f029;},_0x39bc(_0x4d073d,_0x11e396);}g=te([N(0x0,_0x4c2afb),N(0x1,_0xfdb629(f))],g);var se=Object['defineProperty'],oe=Object[_0x579c20(0x1fc)],ne=(_0xd66e01,_0x5efc0b,_0xfa577a)=>_0x5efc0b in _0xd66e01?se(_0xd66e01,_0x5efc0b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfa577a}):_0xd66e01[_0x5efc0b]=_0xfa577a,ie=(_0x251592,_0x2e5e7c,_0x343cbe,_0x290471)=>{const _0xf3ac10=_0x579c20;for(var _0x5de1e3=_0x290471>0x1?void 0x0:_0x290471?oe(_0x2e5e7c,_0x343cbe):_0x2e5e7c,_0x3ea5f7=_0x251592[_0xf3ac10(0x1ca)]-0x1,_0x290db2;_0x3ea5f7>=0x0;_0x3ea5f7--)(_0x290db2=_0x251592[_0x3ea5f7])&&(_0x5de1e3=_0x290db2(_0x5de1e3)||_0x5de1e3);return _0x5de1e3;},w=(_0x2930c4,_0x5f4643)=>(_0x3eba81,_0x3cab6a)=>_0x5f4643(_0x3eba81,_0x3cab6a,_0x2930c4),$=(_0x2cb69e,_0x46b1b0,_0x42b110)=>ne(_0x2cb69e,typeof _0x46b1b0!='symbol'?_0x46b1b0+'':_0x46b1b0,_0x42b110);let b=class extends _0x212ef2{constructor(_0x381505=M,_0xd639ad,_0x5e9cb6){const _0xb7ed8d=_0x579c20;super(),this[_0xb7ed8d(0x1cc)]=_0x381505,this[_0xb7ed8d(0x1d6)]=_0xd639ad,this[_0xb7ed8d(0x1be)]=_0x5e9cb6;const {..._0x4b1085}=_0x4e9d07({},M,this[_0xb7ed8d(0x1cc)]);this[_0xb7ed8d(0x1be)]['setConfig'](z,_0x4b1085);}[_0x579c20(0x1e5)](){const _0x4f45b9=_0x579c20;[[f],[g],[S]][_0x4f45b9(0x1e0)](_0x41d14e=>{const _0xa47dc9=_0x4f45b9;this['_injector'][_0xa47dc9(0x201)](_0x41d14e);});}[_0x579c20(0x1ec)](){const _0x26f858=_0x579c20;this[_0x26f858(0x1d6)][_0x26f858(0x1d8)](g),this['_injector'][_0x26f858(0x1d8)](S);}};$(b,_0x579c20(0x1d2),W),$(b,_0x579c20(0x1c0),_0x13d77a[_0x579c20(0x219)]),b=ie([_0x18fc2e(_0x1ff4fb,_0x3f9f09,_0x3fe27b),w(0x1,_0xfdb629(_0xedefd5)),w(0x2,_0x23ffae)],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 _0x392a(_0xf444fd,_0xbe4c17){const _0x6500ad=_0x6500();return _0x392a=function(_0x392ac1,_0x4b1473){_0x392ac1=_0x392ac1-0x1f1;let _0x42ca68=_0x6500ad[_0x392ac1];return _0x42ca68;},_0x392a(_0xf444fd,_0xbe4c17);}(function(_0x265e52,_0x314283){const _0x3106c5=_0x392a,_0x3b7971=_0x265e52();while(!![]){try{const _0x365ff6=parseInt(_0x3106c5(0x207))/0x1+parseInt(_0x3106c5(0x228))/0x2*(parseInt(_0x3106c5(0x269))/0x3)+-parseInt(_0x3106c5(0x24f))/0x4+parseInt(_0x3106c5(0x25b))/0x5*(-parseInt(_0x3106c5(0x23c))/0x6)+parseInt(_0x3106c5(0x232))/0x7+parseInt(_0x3106c5(0x238))/0x8+-parseInt(_0x3106c5(0x25d))/0x9;if(_0x365ff6===_0x314283)break;else _0x3b7971['push'](_0x3b7971['shift']());}catch(_0x315c7d){_0x3b7971['push'](_0x3b7971['shift']());}}}(_0x6500,0xf3e2a),function(_0x4acc0e,_0x5d6fb5){const _0x511481=_0x392a;typeof exports=='object'&&typeof module<'u'?_0x5d6fb5(exports,require(_0x511481(0x247)),require('@univerjs-pro/license'),require(_0x511481(0x21e)),require(_0x511481(0x221)),require(_0x511481(0x23a)),require('rxjs'),require('@univerjs/network')):typeof define==_0x511481(0x257)&&define[_0x511481(0x1f2)]?define([_0x511481(0x208),_0x511481(0x247),'@univerjs-pro/license',_0x511481(0x21e),_0x511481(0x221),_0x511481(0x23a),_0x511481(0x242),'@univerjs/network'],_0x5d6fb5):(_0x4acc0e=typeof globalThis<'u'?globalThis:_0x4acc0e||self,_0x5d6fb5(_0x4acc0e[_0x511481(0x1fb)]={},_0x4acc0e[_0x511481(0x258)],_0x4acc0e[_0x511481(0x22e)],_0x4acc0e[_0x511481(0x25a)],_0x4acc0e['UniverThreadCommentUi'],_0x4acc0e['UniverThreadComment'],_0x4acc0e['rxjs'],_0x4acc0e['UniverNetwork']));}(this,function(_0x3b57cb,_0x20292e,_0x1f61df,_0x45dac1,_0x543281,_0x1b4bea,_0x13baeb,_0x5f2cf7){'use strict';const _0x43c8d5=_0x392a;const _0x12920e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x256af4=(_0x4f23e2=>(_0x4f23e2[_0x4f23e2[_0x43c8d5(0x229)]=0x0]='OpenOrReOpen',_0x4f23e2[_0x4f23e2['Solved']=0x1]=_0x43c8d5(0x1fe),_0x4f23e2[_0x4f23e2[_0x43c8d5(0x25f)]=-0x1]='UNRECOGNIZED',_0x4f23e2))(_0x256af4||{}),_0x848303=(_0x36e891=>(_0x36e891[_0x36e891[_0x43c8d5(0x234)]=0x0]=_0x43c8d5(0x234),_0x36e891[_0x36e891['Add']=0x1]=_0x43c8d5(0x218),_0x36e891[_0x36e891[_0x43c8d5(0x243)]=0x2]=_0x43c8d5(0x243),_0x36e891[_0x36e891[_0x43c8d5(0x20d)]=0x3]=_0x43c8d5(0x20d),_0x36e891[_0x36e891[_0x43c8d5(0x21d)]=0x4]=_0x43c8d5(0x21d),_0x36e891[_0x36e891['Solve']=0x5]=_0x43c8d5(0x24b),_0x36e891[_0x36e891[_0x43c8d5(0x25f)]=-0x1]='UNRECOGNIZED',_0x36e891))(_0x848303||{});const _0x348e67=_0x411bda=>_0x45dac1[_0x43c8d5(0x20c)](new Date(+_0x411bda))['format'](_0x43c8d5(0x25c)),_0x27a07e=async(_0x315624,_0x24c8bb)=>{const _0xa81314=_0x43c8d5,_0x3ecbbe=_0x315624[_0xa81314(0x249)](_0x45dac1[_0xa81314(0x231)]),_0xb96d7d=_0x315624[_0xa81314(0x249)](_0x5f2cf7[_0xa81314(0x1f3)]);_0x24c8bb[_0xa81314(0x240)](_0x5f4fe6=>{const _0x1f208c=_0xa81314;_0x3ecbbe['getUser'](_0x5f4fe6)&&_0x24c8bb[_0x1f208c(0x263)](_0x5f4fe6);}),_0x24c8bb[_0xa81314(0x262)]&&(await _0xb96d7d[_0xa81314(0x249)](_0xa81314(0x202),{'params':{'userIDs':[..._0x24c8bb]}}))[_0xa81314(0x214)]['users'][_0xa81314(0x240)](_0x5e0368=>{_0x5e0368&&_0x3ecbbe['addUser'](_0x5e0368);});};var _0x7623a1=Object['getOwnPropertyDescriptor'],_0x115631=(_0x5811f5,_0x33ab8a,_0x61da1e,_0x17a435)=>{for(var _0x2e2485=_0x17a435>0x1?void 0x0:_0x17a435?_0x7623a1(_0x33ab8a,_0x61da1e):_0x33ab8a,_0x52eb8d=_0x5811f5['length']-0x1,_0x350591;_0x52eb8d>=0x0;_0x52eb8d--)(_0x350591=_0x5811f5[_0x52eb8d])&&(_0x2e2485=_0x350591(_0x2e2485)||_0x2e2485);return _0x2e2485;},_0x3e3b62=(_0x33506d,_0x4885dd)=>(_0x3f4bb7,_0x54aabd)=>_0x4885dd(_0x3f4bb7,_0x54aabd,_0x33506d);let _0x122c86=class extends _0x45dac1[_0x43c8d5(0x220)]{constructor(_0x3fa75c,_0x75ac37,_0xe09823,_0x936548){const _0x4d6971=_0x43c8d5;super(),this[_0x4d6971(0x259)]=_0x3fa75c,this['_threadCommentModel']=_0x75ac37,this[_0x4d6971(0x251)]=_0xe09823,this[_0x4d6971(0x1f9)]=_0x936548,this[_0x4d6971(0x200)](),this[_0x4d6971(0x23f)]();}[_0x43c8d5(0x23f)](){const _0x188488=_0x43c8d5;this[_0x188488(0x24e)](this['_threadCommentModel']['commentUpdate$'][_0x188488(0x1fd)](_0x13baeb[_0x188488(0x268)](0x10))[_0x188488(0x261)](_0x31dba5=>{const _0x2b1f91=_0x188488,_0x1953ee=new Set();_0x31dba5[_0x2b1f91(0x240)](_0xc8847d=>{const _0x383110=_0x2b1f91;switch(_0xc8847d['type']){case _0x383110(0x203):{const _0x9eb82a=_0xc8847d['payload'][_0x383110(0x225)];_0x1953ee[_0x383110(0x203)](_0x9eb82a);break;}}}),_0x27a07e(this[_0x2b1f91(0x1f9)],_0x1953ee);}));}[_0x43c8d5(0x200)](){const _0x188ee9=_0x43c8d5;this['disposeWithMe'](this[_0x188ee9(0x259)][_0x188ee9(0x22f)][_0x188ee9(0x261)](async _0x30f39c=>{const _0x5cd481=_0x188ee9;var _0x2b1635,_0x3a02f1,_0x1d4090,_0x4f9f9e;const _0x4cec82=(_0x2b1635=this[_0x5cd481(0x236)][_0x5cd481(0x237)](_0x30f39c[_0x5cd481(0x25e)])['find'](_0x41d039=>_0x41d039[_0x5cd481(0x241)]===_0x30f39c[_0x5cd481(0x241)]))==null?void 0x0:_0x2b1635[_0x5cd481(0x23e)];if(!_0x4cec82)return;const {unitId:_0x481aaf,subUnitId:_0x43352d}=_0x4cec82;switch(_0x30f39c['user']&&this[_0x5cd481(0x251)][_0x5cd481(0x211)](_0x30f39c[_0x5cd481(0x22c)]),_0x30f39c['type']){case _0x848303['Add']:break;case _0x848303[_0x5cd481(0x243)]:{this[_0x5cd481(0x236)][_0x5cd481(0x26f)](_0x481aaf,_0x43352d,{'unitId':_0x481aaf,'subUnitId':_0x43352d,'ref':'','id':_0x30f39c[_0x5cd481(0x254)],'dT':_0x348e67(+_0x30f39c[_0x5cd481(0x26c)]),'threadId':_0x30f39c[_0x5cd481(0x241)],'personId':(_0x1d4090=(_0x3a02f1=_0x30f39c['user'])==null?void 0x0:_0x3a02f1['userID'])!=null?_0x1d4090:_0x30f39c['userId'],'text':JSON['parse'](_0x30f39c[_0x5cd481(0x264)]),'parentId':_0x4cec82['id']});break;}case _0x848303['Delete']:{const _0x723ddb=this[_0x5cd481(0x236)][_0x5cd481(0x1f1)](_0x481aaf,_0x43352d,_0x30f39c[_0x5cd481(0x254)]);_0x723ddb&&_0x723ddb[_0x5cd481(0x23b)]&&this[_0x5cd481(0x236)][_0x5cd481(0x20b)](_0x481aaf,_0x43352d,_0x30f39c[_0x5cd481(0x254)]);break;}case _0x848303[_0x5cd481(0x20d)]:{this['_threadCommentModel'][_0x5cd481(0x224)](_0x481aaf,_0x43352d,{'commentId':_0x30f39c[_0x5cd481(0x254)],'text':JSON['parse'](_0x30f39c[_0x5cd481(0x264)])});break;}case _0x848303['Solve']:{const _0x288c41=(_0x4f9f9e=this['_threadCommentModel'][_0x5cd481(0x237)](_0x30f39c[_0x5cd481(0x25e)])['find'](_0x3a8d54=>_0x3a8d54[_0x5cd481(0x241)]===_0x30f39c[_0x5cd481(0x241)]))==null?void 0x0:_0x4f9f9e[_0x5cd481(0x23e)];_0x288c41&&this['_threadCommentModel'][_0x5cd481(0x206)](_0x481aaf,_0x43352d,_0x288c41['id'],_0x30f39c['solved']===_0x256af4[_0x5cd481(0x1fe)]);break;}}}));}};_0x122c86=_0x115631([_0x3e3b62(0x0,_0x45dac1[_0x43c8d5(0x230)](_0x20292e['CommentService'])),_0x3e3b62(0x1,_0x45dac1[_0x43c8d5(0x230)](_0x1b4bea[_0x43c8d5(0x244)])),_0x3e3b62(0x2,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1[_0x43c8d5(0x231)])),_0x3e3b62(0x3,_0x45dac1['Inject'](_0x45dac1[_0x43c8d5(0x24d)]))],_0x122c86);const _0x1475c2=_0x43c8d5(0x213),_0x3f892e={};var _0x268684=Object[_0x43c8d5(0x22a)],_0x13f40d=(_0x2a3933,_0x4101e4,_0x9012c3,_0x200fa8)=>{const _0x4a4aee=_0x43c8d5;for(var _0x3738ed=_0x200fa8>0x1?void 0x0:_0x200fa8?_0x268684(_0x4101e4,_0x9012c3):_0x4101e4,_0x2bfc8f=_0x2a3933[_0x4a4aee(0x267)]-0x1,_0x2379bd;_0x2bfc8f>=0x0;_0x2bfc8f--)(_0x2379bd=_0x2a3933[_0x2bfc8f])&&(_0x3738ed=_0x2379bd(_0x3738ed)||_0x3738ed);return _0x3738ed;},_0x537edf=(_0x9ea23f,_0x1d2bf3)=>(_0x2f4488,_0x95f62d)=>_0x1d2bf3(_0x2f4488,_0x95f62d,_0x9ea23f);function _0x5aba47(_0x5951b2,_0x1737df){const _0x23f38f=_0x43c8d5,_0x4ec2f7=_0x5951b2[_0x23f38f(0x21c)][0x0];return{..._0x1737df,'id':_0x4ec2f7[_0x23f38f(0x254)],'resolved':_0x5951b2[_0x23f38f(0x26a)]===0x1,'dT':_0x348e67(_0x4ec2f7[_0x23f38f(0x26c)]),'personId':_0x4ec2f7['userId'],'threadId':_0x4ec2f7[_0x23f38f(0x241)]};}function _0x32480c(_0x9d5992,_0x4ddfe8,_0x1a3d4a){const _0x183cea=_0x43c8d5;var _0x1195fd,_0x28fe7c;if(((_0x28fe7c=(_0x1195fd=_0x9d5992==null?void 0x0:_0x9d5992[_0x183cea(0x21c)])==null?void 0x0:_0x1195fd[_0x183cea(0x267)])!=null?_0x28fe7c:0x0)>0x0){const _0x242aa1=(_0x41a684,_0xc6b308)=>({'id':_0x41a684['replyId'],'threadId':_0x41a684[_0x183cea(0x241)],'dT':_0x348e67(_0x41a684['createTimestamp']),'personId':_0x41a684[_0x183cea(0x201)],'resolved':_0x9d5992['solved']===_0x256af4[_0x183cea(0x1fe)],'unitId':_0x4ddfe8,'subUnitId':_0x1a3d4a,'text':JSON['parse'](_0x41a684['content']),'parentId':_0xc6b308}),_0x33cc4d=_0x242aa1(_0x9d5992['replies'][0x0]);return{..._0x33cc4d,'children':_0x9d5992[_0x183cea(0x21c)][_0x183cea(0x216)](0x1)[_0x183cea(0x222)](_0x55d85b=>_0x242aa1(_0x55d85b,_0x33cc4d['id']))};}return null;}let _0x2effbb=class{constructor(_0x40414f,_0x234134,_0x465af0,_0x4ffa00){const _0x472688=_0x43c8d5;this[_0x472688(0x256)]=_0x40414f,this[_0x472688(0x251)]=_0x234134,this['_sessionService']=_0x465af0,this[_0x472688(0x1f9)]=_0x4ffa00;}async[_0x43c8d5(0x26f)](_0x24e985){const _0x2f7a4d=_0x43c8d5;var _0x5bf9f9,_0x4e06b2;const {parentId:_0x489aa3,unitId:_0x32180c,text:_0x217af8,threadId:_0x4c0a62}=_0x24e985,_0x1403ee=(_0x4e06b2=(_0x5bf9f9=_0x217af8[_0x2f7a4d(0x1f4)])==null?void 0x0:_0x5bf9f9[_0x2f7a4d(0x1f6)](_0x4aa1ac=>_0x4aa1ac[_0x2f7a4d(0x255)]===_0x45dac1['CustomRangeType']['COMMENT'])[_0x2f7a4d(0x222)](_0x331b13=>_0x331b13[_0x2f7a4d(0x26d)]))!=null?_0x4e06b2:[],_0x464b7a=JSON['stringify'](_0x217af8),_0x504694=(await this[_0x2f7a4d(0x20f)][_0x2f7a4d(0x24c)](_0x32180c))[_0x2f7a4d(0x219)]();if(_0x489aa3){const _0x49bc97={'memberId':_0x504694,'unitId':_0x32180c,'content':_0x464b7a,'mention':_0x1403ee,'threadId':_0x4c0a62},_0x58f1bd=(await this[_0x2f7a4d(0x256)][_0x2f7a4d(0x21f)]('/universer-api/comment/unit/'+_0x32180c+_0x2f7a4d(0x1f7),{'body':_0x49bc97}))['body'][_0x2f7a4d(0x23d)];return{..._0x24e985,'id':_0x58f1bd['replyId'],'dT':_0x45dac1[_0x2f7a4d(0x20c)](+_0x58f1bd['createTimestamp'])['format'](_0x2f7a4d(0x25c)),'personId':_0x58f1bd['userId']};}else{const _0x531bf0={'memberId':_0x504694,'unitId':_0x32180c,'content':_0x464b7a,'mention':_0x1403ee},_0x520fc9=await this[_0x2f7a4d(0x256)][_0x2f7a4d(0x21f)](_0x2f7a4d(0x215)+_0x32180c+_0x2f7a4d(0x26e),{'body':_0x531bf0});return _0x5aba47(_0x520fc9[_0x2f7a4d(0x214)][_0x2f7a4d(0x20e)],_0x24e985);}}async[_0x43c8d5(0x224)](_0x272235){const _0x4ce700=_0x43c8d5;var _0x22eb65,_0x5c52e3;const {text:_0x49555f,unitId:_0x47d720}=_0x272235,_0x21768c=(_0x5c52e3=(_0x22eb65=_0x49555f[_0x4ce700(0x1f4)])==null?void 0x0:_0x22eb65[_0x4ce700(0x1f6)](_0x29a33d=>_0x29a33d[_0x4ce700(0x255)]===_0x45dac1[_0x4ce700(0x239)][_0x4ce700(0x205)])[_0x4ce700(0x222)](_0x31c9c8=>_0x31c9c8[_0x4ce700(0x26d)]))!=null?_0x5c52e3:[],_0x49512d=JSON[_0x4ce700(0x210)](_0x49555f),_0x817af3=_0x272235[_0x4ce700(0x241)],_0xadbf69=_0x272235['id'],_0x3dc6c9={'memberId':(await this['_sessionService'][_0x4ce700(0x24c)](_0x47d720))[_0x4ce700(0x219)](),'unitId':_0x47d720,'threadId':_0x817af3,'mention':_0x21768c,'content':_0x49512d,'replyId':_0xadbf69},_0x458b70=await this[_0x4ce700(0x256)][_0x4ce700(0x21f)]('/universer-api/comment/unit/'+_0x47d720+'/edit',{'body':_0x3dc6c9});return!_0x458b70[_0x4ce700(0x214)][_0x4ce700(0x233)]||_0x458b70[_0x4ce700(0x214)][_0x4ce700(0x233)][_0x4ce700(0x227)]===0x1;}async[_0x43c8d5(0x206)](_0xbee941){const _0x28b6cb=_0x43c8d5,{unitId:_0x503409}=_0xbee941,_0x5d85de=_0xbee941[_0x28b6cb(0x241)],_0x15da00={'memberId':this[_0x28b6cb(0x251)]['getCurrentUser']()[_0x28b6cb(0x212)],'unitId':_0x503409,'threadId':_0x5d85de,'solved':_0xbee941[_0x28b6cb(0x217)]?_0x256af4[_0x28b6cb(0x1fe)]:_0x256af4['OpenOrReOpen']},_0x365fc3=await this[_0x28b6cb(0x256)]['post'](_0x28b6cb(0x215)+_0x503409+_0x28b6cb(0x26b),{'body':_0x15da00});return!_0x365fc3[_0x28b6cb(0x214)][_0x28b6cb(0x233)]||_0x365fc3['body'][_0x28b6cb(0x233)][_0x28b6cb(0x227)]===0x1;}async['deleteComment'](_0x83f89f,_0x50fd51,_0x501a90,_0x5cae6f){const _0x4642ca=_0x43c8d5,_0x295f6f={'memberId':(await this['_sessionService'][_0x4642ca(0x24c)](_0x83f89f))[_0x4642ca(0x219)](),'threadId':_0x501a90,'replyId':_0x5cae6f,'unitId':_0x83f89f},_0x1df292=await this[_0x4642ca(0x256)][_0x4642ca(0x21f)](_0x4642ca(0x215)+_0x83f89f+_0x4642ca(0x1f8),{'body':_0x295f6f});return!_0x1df292[_0x4642ca(0x214)]['error']||_0x1df292['body']['error'][_0x4642ca(0x227)]===0x1;}async['listComments'](_0x143512,_0x141d69,_0x26c043){const _0x3be000=_0x43c8d5,_0xb81dd2={'unitId':_0x143512,'threadId':_0x26c043},_0x576c67=await this[_0x3be000(0x256)][_0x3be000(0x21f)]('/universer-api/comment/unit/'+_0x143512+_0x3be000(0x252),{'body':_0xb81dd2}),_0x1b91ec=_0x26c043['map'](_0x3c4584=>_0x32480c(_0x576c67['body']['comments'][_0x3c4584],_0x143512,_0x141d69))[_0x3be000(0x1f6)](Boolean);return Object['values'](_0x576c67[_0x3be000(0x214)]['users'])[_0x3be000(0x240)](_0x273753=>{const _0x5bea42=_0x3be000;this['_userService'][_0x5bea42(0x211)](_0x273753);}),_0x1b91ec;}['saveCommentToSnapshot'](_0x2ef3ce){const _0x3e31c5=_0x43c8d5;return{'id':_0x2ef3ce['id'],'threadId':_0x2ef3ce[_0x3e31c5(0x241)],'ref':_0x2ef3ce[_0x3e31c5(0x246)]};}};_0x2effbb=_0x13f40d([_0x537edf(0x0,_0x45dac1[_0x43c8d5(0x230)](_0x5f2cf7[_0x43c8d5(0x1f3)])),_0x537edf(0x1,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1[_0x43c8d5(0x231)])),_0x537edf(0x2,_0x45dac1[_0x43c8d5(0x230)](_0x20292e[_0x43c8d5(0x1ff)])),_0x537edf(0x3,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1[_0x43c8d5(0x24d)]))],_0x2effbb);var _0x286cca=Object[_0x43c8d5(0x22a)],_0x41b44c=(_0x43ab10,_0xf4878a,_0x44df48,_0x2e0ac7)=>{for(var _0x440531=_0x2e0ac7>0x1?void 0x0:_0x2e0ac7?_0x286cca(_0xf4878a,_0x44df48):_0xf4878a,_0xeb2a25=_0x43ab10['length']-0x1,_0x305fe2;_0xeb2a25>=0x0;_0xeb2a25--)(_0x305fe2=_0x43ab10[_0xeb2a25])&&(_0x440531=_0x305fe2(_0x440531)||_0x440531);return _0x440531;},_0x168c7b=(_0x930d72,_0x37a9a9)=>(_0x1f5b5f,_0x371a18)=>_0x37a9a9(_0x1f5b5f,_0x371a18,_0x930d72);let _0x5076d7=class extends _0x45dac1['Disposable']{constructor(_0x22318c,_0x332822){const _0x438e6e=_0x43c8d5;super(),this[_0x438e6e(0x24a)]=_0x22318c,this['_threadCommentDataSource']=_0x332822,this[_0x438e6e(0x250)]();}[_0x43c8d5(0x250)](){const _0x49b4fe=_0x43c8d5;this[_0x49b4fe(0x24a)]['dataSource']=this['_threadCommentDataSource'],this[_0x49b4fe(0x24a)][_0x49b4fe(0x21b)]=!0x1;}};_0x5076d7=_0x41b44c([_0x168c7b(0x0,_0x1b4bea[_0x43c8d5(0x248)]),_0x168c7b(0x1,_0x45dac1['Inject'](_0x2effbb))],_0x5076d7);var _0x2c224c=Object[_0x43c8d5(0x260)],_0x5a3310=Object[_0x43c8d5(0x22a)],_0x39c18f=(_0x5e33a9,_0x56761f,_0x5c1cf8)=>_0x56761f in _0x5e33a9?_0x2c224c(_0x5e33a9,_0x56761f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c1cf8}):_0x5e33a9[_0x56761f]=_0x5c1cf8,_0x32fb9d=(_0x4d9862,_0x3388df,_0x5a05b3,_0x6ad1e1)=>{for(var _0xe6288b=_0x6ad1e1>0x1?void 0x0:_0x6ad1e1?_0x5a3310(_0x3388df,_0x5a05b3):_0x3388df,_0x1346b2=_0x4d9862['length']-0x1,_0x49525a;_0x1346b2>=0x0;_0x1346b2--)(_0x49525a=_0x4d9862[_0x1346b2])&&(_0xe6288b=_0x49525a(_0xe6288b)||_0xe6288b);return _0xe6288b;},_0x2d5542=(_0x97e8b9,_0x5c8763)=>(_0x5bc52b,_0x71eccc)=>_0x5c8763(_0x5bc52b,_0x71eccc,_0x97e8b9),_0x2de679=(_0x26b9ea,_0x7d6040,_0x2d884a)=>_0x39c18f(_0x26b9ea,typeof _0x7d6040!=_0x43c8d5(0x265)?_0x7d6040+'':_0x7d6040,_0x2d884a);_0x3b57cb[_0x43c8d5(0x226)]=class extends _0x45dac1['Plugin']{constructor(_0x159389=_0x3f892e,_0x3eb83c,_0x46f085){const _0x1c0ebd=_0x43c8d5;super(),this[_0x1c0ebd(0x1f5)]=_0x159389,this['_injector']=_0x3eb83c,this[_0x1c0ebd(0x235)]=_0x46f085;const {..._0x551fc7}=_0x45dac1[_0x1c0ebd(0x1fc)]({},_0x3f892e,this[_0x1c0ebd(0x1f5)]);this[_0x1c0ebd(0x235)][_0x1c0ebd(0x209)](_0x1475c2,_0x551fc7);}[_0x43c8d5(0x253)](){const _0x563179=_0x43c8d5;[[_0x2effbb],[_0x5076d7],[_0x122c86]][_0x563179(0x240)](_0x404963=>{const _0x40a409=_0x563179;this[_0x40a409(0x1f9)][_0x40a409(0x203)](_0x404963);});}[_0x43c8d5(0x245)](){const _0x3c8458=_0x43c8d5;this[_0x3c8458(0x1f9)][_0x3c8458(0x249)](_0x5076d7),this[_0x3c8458(0x1f9)][_0x3c8458(0x249)](_0x122c86);}},_0x2de679(_0x3b57cb[_0x43c8d5(0x226)],_0x43c8d5(0x22b),_0x12920e),_0x2de679(_0x3b57cb[_0x43c8d5(0x226)],_0x43c8d5(0x1fa),_0x45dac1[_0x43c8d5(0x223)]['UNIVER_UNKNOWN']),_0x3b57cb['UniverThreadCommentDataSourcePlugin']=_0x32fb9d([_0x45dac1[_0x43c8d5(0x20a)](_0x543281['UniverThreadCommentUIPlugin'],_0x20292e[_0x43c8d5(0x22d)],_0x1f61df[_0x43c8d5(0x204)]),_0x2d5542(0x1,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1['Injector'])),_0x2d5542(0x2,_0x45dac1[_0x43c8d5(0x21a)])],_0x3b57cb[_0x43c8d5(0x226)]),Object[_0x43c8d5(0x260)](_0x3b57cb,Symbol[_0x43c8d5(0x266)],{'value':'Module'});}));function _0x6500(){const _0xf884a3=['IThreadCommentDataSourceService','get','_threadCommentDataSourceService','Solve','requireSession','Injector','disposeWithMe','816408ZaytVo','_initDataSource','_userService','/list','onStarting','replyId','rangeType','_httpService','function','UniverProCollaborationClient','_commentService','UniverCore','16405grtzuv','YYYY/MM/DD\x20HH:mm','22028310ecTEFF','unitId','UNRECOGNIZED','defineProperty','subscribe','size','delete','content','symbol','toStringTag','length','bufferTime','5663577erkXHy','solved','/solved','createTimestamp','rangeId','/add','addComment','getComment','amd','HTTPService','customRanges','_config','filter','/reply','/delete','_injector','type','UniverProThreadCommentDatasource','merge','pipe','Solved','CollaborationSessionService','_init','userId','/universer-api/user/list','add','UniverLicensePlugin','COMMENT','resolveComment','1280438jSexmt','exports','setConfig','DependentOn','deleteComment','dayjs','Edit','comment','_sessionService','stringify','addUser','userID','thread-comment-data-source.config','body','/universer-api/comment/unit/','slice','resolved','Add','getMemberID','IConfigService','syncUpdateMutationToColla','replies','Delete','@univerjs/core','post','Disposable','@univerjs/thread-comment-ui','map','UniverInstanceType','updateComment','personId','UniverThreadCommentDataSourcePlugin','code','2HQlNZS','OpenOrReOpen','getOwnPropertyDescriptor','pluginName','user','UniverCollaborationClientPlugin','UniverProLicense','commentUpdate$','Inject','UserManagerService','407449puuOzR','error','Unknown','_configService','_threadCommentModel','getUnit','15047248oECUNo','CustomRangeType','@univerjs/thread-comment','parentId','2664OEbzKz','reply','root','_initUserSync','forEach','threadId','rxjs','Reply','ThreadCommentModel','onReady','ref','@univerjs-pro/collaboration-client'];_0x6500=function(){return _0xf884a3;};return _0x6500();}
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.202504171607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.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/license": "0.6.10-nightly.202504171607",
49
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504171607",
50
+ "@univerjs/core": "0.6.10-nightly.202504171607",
51
+ "@univerjs/network": "0.6.10-nightly.202504171607",
52
+ "@univerjs/thread-comment": "0.6.10-nightly.202504171607",
53
53
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504161609"
54
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504171607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",