@univerjs-pro/thread-comment-datasource 0.10.12-nightly.202510251119 → 0.10.13

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 _0x4a9a54=_0x13fa;(function(_0x2ef9e8,_0x4c4b0d){const _0x3ff78d=_0x13fa,_0x227fb1=_0x2ef9e8();while(!![]){try{const _0x1885a2=parseInt(_0x3ff78d(0x1d1))/0x1+-parseInt(_0x3ff78d(0x1f7))/0x2*(-parseInt(_0x3ff78d(0x208))/0x3)+parseInt(_0x3ff78d(0x202))/0x4*(parseInt(_0x3ff78d(0x1e4))/0x5)+-parseInt(_0x3ff78d(0x219))/0x6+parseInt(_0x3ff78d(0x209))/0x7+parseInt(_0x3ff78d(0x1e9))/0x8+-parseInt(_0x3ff78d(0x22e))/0x9;if(_0x1885a2===_0x4c4b0d)break;else _0x227fb1['push'](_0x227fb1['shift']());}catch(_0x273ef0){_0x227fb1['push'](_0x227fb1['shift']());}}}(_0x50ee,0x59a59));function _0x13fa(_0x1979b7,_0x1bfe10){const _0x50eef6=_0x50ee();return _0x13fa=function(_0x13faa9,_0x45481f){_0x13faa9=_0x13faa9-0x1c3;let _0x29d4e9=_0x50eef6[_0x13faa9];return _0x29d4e9;},_0x13fa(_0x1979b7,_0x1bfe10);}Object[_0x4a9a54(0x230)](exports,Symbol[_0x4a9a54(0x221)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4a9a54(0x21e);var I=(_0x209ae6=>(_0x209ae6[_0x209ae6[_0x4a9a54(0x229)]=0x0]=_0x4a9a54(0x229),_0x209ae6[_0x209ae6[_0x4a9a54(0x222)]=0x1]=_0x4a9a54(0x222),_0x209ae6[_0x209ae6['UNRECOGNIZED']=-0x1]=_0x4a9a54(0x1f5),_0x209ae6))(I||{}),v=(_0x3643db=>(_0x3643db[_0x3643db[_0x4a9a54(0x1fa)]=0x0]=_0x4a9a54(0x1fa),_0x3643db[_0x3643db[_0x4a9a54(0x1f0)]=0x1]=_0x4a9a54(0x1f0),_0x3643db[_0x3643db['Reply']=0x2]=_0x4a9a54(0x238),_0x3643db[_0x3643db[_0x4a9a54(0x203)]=0x3]='Edit',_0x3643db[_0x3643db[_0x4a9a54(0x213)]=0x4]=_0x4a9a54(0x213),_0x3643db[_0x3643db[_0x4a9a54(0x1d5)]=0x5]=_0x4a9a54(0x1d5),_0x3643db[_0x3643db[_0x4a9a54(0x1f5)]=-0x1]='UNRECOGNIZED',_0x3643db))(v||{});const f=_0x5cb21b=>c[_0x4a9a54(0x1c8)](new Date(+_0x5cb21b))[_0x4a9a54(0x20a)](_0x4a9a54(0x223)),R=async(_0x45e7d3,_0x3c4498)=>{const _0x55fbd0=_0x4a9a54,_0x2686c5=_0x45e7d3['get'](c['UserManagerService']),_0x322d3c=_0x45e7d3[_0x55fbd0(0x218)](P[_0x55fbd0(0x1ed)]);_0x3c4498[_0x55fbd0(0x22c)](_0x1cef8a=>{const _0x3725b3=_0x55fbd0;_0x2686c5['getUser'](_0x1cef8a)&&_0x3c4498[_0x3725b3(0x215)](_0x1cef8a);}),_0x3c4498['size']&&(await _0x322d3c[_0x55fbd0(0x218)](_0x55fbd0(0x234),{'params':{'userIDs':[..._0x3c4498]}}))[_0x55fbd0(0x1da)]['users']['forEach'](_0xae2b1f=>{const _0x2c57ca=_0x55fbd0;_0xae2b1f&&_0x2686c5[_0x2c57ca(0x20e)](_0xae2b1f);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x512964,_0x39768f,_0x4dda2b,_0x2ad907)=>{for(var _0x5e44a8=_0x2ad907>0x1?void 0x0:_0x2ad907?$(_0x39768f,_0x4dda2b):_0x39768f,_0x220350=_0x512964['length']-0x1,_0x232a00;_0x220350>=0x0;_0x220350--)(_0x232a00=_0x512964[_0x220350])&&(_0x5e44a8=_0x232a00(_0x5e44a8)||_0x5e44a8);return _0x5e44a8;},S=(_0x1340de,_0x50b041)=>(_0x5a1cfa,_0x1391dc)=>_0x50b041(_0x5a1cfa,_0x1391dc,_0x1340de);let _=class extends c[_0x4a9a54(0x210)]{constructor(_0x399823,_0x2fe3e8,_0x241e4b,_0x2ca313){const _0x57f83e=_0x4a9a54;super(),this[_0x57f83e(0x1cf)]=_0x399823,this[_0x57f83e(0x1ee)]=_0x2fe3e8,this['_userService']=_0x241e4b,this[_0x57f83e(0x20f)]=_0x2ca313,this[_0x57f83e(0x1e0)](),this[_0x57f83e(0x1f1)]();}[_0x4a9a54(0x1f1)](){const _0x39e832=_0x4a9a54;this['disposeWithMe'](this[_0x39e832(0x1ee)][_0x39e832(0x1cb)][_0x39e832(0x1ce)](j[_0x39e832(0x1fd)](0x10))['subscribe'](_0xa1486=>{const _0xceccee=_0x39e832,_0x1a39d0=new Set();_0xa1486[_0xceccee(0x22c)](_0x51444d=>{const _0x30eef4=_0xceccee;switch(_0x51444d[_0x30eef4(0x22a)]){case _0x30eef4(0x20d):{const _0x390660=_0x51444d[_0x30eef4(0x231)]['personId'];_0x1a39d0['add'](_0x390660);break;}}}),R(this['_injector'],_0x1a39d0);}));}[_0x4a9a54(0x1e0)](){const _0x2077be=_0x4a9a54;this['disposeWithMe'](this['_commentService'][_0x2077be(0x1cb)][_0x2077be(0x22b)](async _0x51c4ea=>{const _0x2b76a2=_0x2077be;var _0x36d745,_0x52a7e4,_0x56dc98,_0x7e148e;const _0x3db83e=(_0x36d745=this['_threadCommentModel']['getUnit'](_0x51c4ea[_0x2b76a2(0x227)])['find'](_0x3a495f=>_0x3a495f['threadId']===_0x51c4ea[_0x2b76a2(0x21d)]))==null?void 0x0:_0x36d745[_0x2b76a2(0x1ea)];if(!_0x3db83e)return;const {unitId:_0xbfb9c8,subUnitId:_0x15acc3}=_0x3db83e;switch(_0x51c4ea[_0x2b76a2(0x1f4)]&&this['_userService']['addUser'](_0x51c4ea['user']),_0x51c4ea[_0x2b76a2(0x22a)]){case v[_0x2b76a2(0x1f0)]:break;case v[_0x2b76a2(0x238)]:{this['_threadCommentModel'][_0x2b76a2(0x1ec)](_0xbfb9c8,_0x15acc3,{'unitId':_0xbfb9c8,'subUnitId':_0x15acc3,'ref':'','id':_0x51c4ea[_0x2b76a2(0x217)],'dT':f(+_0x51c4ea['createTimestamp']),'threadId':_0x51c4ea[_0x2b76a2(0x21d)],'personId':(_0x56dc98=(_0x52a7e4=_0x51c4ea[_0x2b76a2(0x1f4)])==null?void 0x0:_0x52a7e4[_0x2b76a2(0x1d3)])!=null?_0x56dc98:_0x51c4ea[_0x2b76a2(0x1e3)],'text':JSON[_0x2b76a2(0x1de)](_0x51c4ea[_0x2b76a2(0x1df)]),'parentId':_0x3db83e['id']});break;}case v['Delete']:{const _0x3cf96e=this['_threadCommentModel'][_0x2b76a2(0x1d6)](_0xbfb9c8,_0x15acc3,_0x51c4ea[_0x2b76a2(0x217)]);_0x3cf96e&&_0x3cf96e['parentId']&&this[_0x2b76a2(0x1ee)][_0x2b76a2(0x205)](_0xbfb9c8,_0x15acc3,_0x51c4ea[_0x2b76a2(0x217)]);break;}case v[_0x2b76a2(0x203)]:{this['_threadCommentModel'][_0x2b76a2(0x224)](_0xbfb9c8,_0x15acc3,{'commentId':_0x51c4ea['replyId'],'text':JSON[_0x2b76a2(0x1de)](_0x51c4ea[_0x2b76a2(0x1df)])});break;}case v[_0x2b76a2(0x1d5)]:{const _0x5872c7=(_0x7e148e=this[_0x2b76a2(0x1ee)][_0x2b76a2(0x220)](_0x51c4ea[_0x2b76a2(0x227)])[_0x2b76a2(0x1cc)](_0x469073=>_0x469073[_0x2b76a2(0x21d)]===_0x51c4ea['threadId']))==null?void 0x0:_0x7e148e['root'];_0x5872c7&&this[_0x2b76a2(0x1ee)][_0x2b76a2(0x1c5)](_0xbfb9c8,_0x15acc3,_0x5872c7['id'],_0x51c4ea[_0x2b76a2(0x1fe)]===I[_0x2b76a2(0x222)]);break;}}}));}};_=E([S(0x0,c[_0x4a9a54(0x1e5)](b[_0x4a9a54(0x21a)])),S(0x1,c[_0x4a9a54(0x1e5)](M[_0x4a9a54(0x1db)])),S(0x2,c[_0x4a9a54(0x1e5)](c['UserManagerService'])),S(0x3,c[_0x4a9a54(0x1e5)](c['Injector']))],_);const q=_0x4a9a54(0x1c4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x458437,_0x2d5ab9,_0x1b77bb,_0x285f72)=>{const _0x53b19f=_0x4a9a54;for(var _0x4d04db=_0x285f72>0x1?void 0x0:_0x285f72?A(_0x2d5ab9,_0x1b77bb):_0x2d5ab9,_0x2c4c56=_0x458437[_0x53b19f(0x1d0)]-0x1,_0x147d9d;_0x2c4c56>=0x0;_0x2c4c56--)(_0x147d9d=_0x458437[_0x2c4c56])&&(_0x4d04db=_0x147d9d(_0x4d04db)||_0x4d04db);return _0x4d04db;},C=(_0x243a2a,_0xc5e37f)=>(_0x40c329,_0x536dac)=>_0xc5e37f(_0x40c329,_0x536dac,_0x243a2a);function _0x50ee(){const _0x387671=['_httpService','13407831TDcWXD','_initDataSource','defineProperty','payload','_userService','UniverCollaborationClientPlugin','/universer-api/user/list','onStarting','UniverLicensePlugin','reply','Reply','getOwnPropertyDescriptor','thread-comment-data-source.config','resolveComment','createTimestamp','rangeType','dayjs','_threadCommentDataSourceService','UNIVER_UNKNOWN','commentUpdate$','find','post','pipe','_commentService','length','337508xwwCSq','CollaborationSessionService','userID','slice','Solve','getComment','Plugin','CustomRangeType','_threadCommentDataSource','body','ThreadCommentModel','UniverThreadCommentDataSourcePlugin','getMemberID','parse','content','_init','getCurrentUser','/universer-api/comment/unit/','userId','994030AflakW','Inject','symbol','_config','customRanges','3935592ZVYPzJ','root','merge','addComment','HTTPService','_threadCommentModel','/list','Add','_initUserSync','error','/delete','user','UNRECOGNIZED','code','414424KDLtug','stringify','UniverInstanceType','Unknown','UserManagerService','/reply','bufferTime','solved','Injector','DependentOn','users','12lSdKcU','Edit','COMMENT','deleteComment','map','rangeId','9KtMCnP','1610994efteAS','format','setConfig','_sessionService','add','addUser','_injector','Disposable','/add','filter','Delete','requireSession','delete','/solved','replyId','get','2524206wrbiUt','CommentService','_configService','replies','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','getUnit','toStringTag','Solved','YYYY/MM/DD\x20HH:mm','updateComment','onReady','/edit','unitId','IConfigService','OpenOrReOpen','type','subscribe','forEach'];_0x50ee=function(){return _0x387671;};return _0x50ee();}function Y(_0x119537,_0x2633ad){const _0x540028=_0x4a9a54,_0x540492=_0x119537['replies'][0x0];return{..._0x2633ad,'id':_0x540492[_0x540028(0x217)],'resolved':_0x119537[_0x540028(0x1fe)]===0x1,'dT':f(_0x540492[_0x540028(0x1c6)]),'personId':_0x540492[_0x540028(0x1e3)],'threadId':_0x540492[_0x540028(0x21d)]};}function G(_0x10dbfd,_0x2474ef,_0xb63dbc){const _0x3146c2=_0x4a9a54;var _0x2107f0,_0xf2f680;if(((_0xf2f680=(_0x2107f0=_0x10dbfd==null?void 0x0:_0x10dbfd[_0x3146c2(0x21c)])==null?void 0x0:_0x2107f0['length'])!=null?_0xf2f680:0x0)>0x0){const _0xfed38=(_0x52d105,_0x5c5a4b)=>({'id':_0x52d105[_0x3146c2(0x217)],'threadId':_0x52d105[_0x3146c2(0x21d)],'dT':f(_0x52d105[_0x3146c2(0x1c6)]),'personId':_0x52d105[_0x3146c2(0x1e3)],'resolved':_0x10dbfd['solved']===I['Solved'],'unitId':_0x2474ef,'subUnitId':_0xb63dbc,'text':JSON[_0x3146c2(0x1de)](_0x52d105[_0x3146c2(0x1df)]),'parentId':_0x5c5a4b}),_0x43c64e=_0xfed38(_0x10dbfd['replies'][0x0]);return{..._0x43c64e,'children':_0x10dbfd[_0x3146c2(0x21c)][_0x3146c2(0x1d4)](0x1)[_0x3146c2(0x206)](_0x2dd548=>_0xfed38(_0x2dd548,_0x43c64e['id']))};}return null;}let p=class{constructor(_0x41b40e,_0x5ca185,_0x5d9f7d){const _0x2fb18a=_0x4a9a54;this['_httpService']=_0x41b40e,this[_0x2fb18a(0x232)]=_0x5ca185,this[_0x2fb18a(0x20c)]=_0x5d9f7d;}async['addComment'](_0x39d018){const _0x55c04a=_0x4a9a54;var _0xe38d7c,_0x2ac8fb;const {parentId:_0x2f18e1,unitId:_0x3a26d8,text:_0x5807a4,threadId:_0x83ea35}=_0x39d018,_0x30312e=(_0x2ac8fb=(_0xe38d7c=_0x5807a4[_0x55c04a(0x1e8)])==null?void 0x0:_0xe38d7c[_0x55c04a(0x212)](_0x55b3a4=>_0x55b3a4[_0x55c04a(0x1c7)]===c[_0x55c04a(0x1d8)]['COMMENT'])[_0x55c04a(0x206)](_0x10c8d4=>_0x10c8d4[_0x55c04a(0x207)]))!=null?_0x2ac8fb:[],_0x49ae4a=JSON['stringify'](_0x5807a4),_0x5b958c=(await this[_0x55c04a(0x20c)][_0x55c04a(0x214)](_0x3a26d8))[_0x55c04a(0x1dd)]();if(_0x2f18e1){const _0x6b099={'memberId':_0x5b958c,'unitId':_0x3a26d8,'content':_0x49ae4a,'mention':_0x30312e,'threadId':_0x83ea35},_0x57b828=(await this[_0x55c04a(0x22d)][_0x55c04a(0x1cd)](_0x55c04a(0x1e2)+_0x3a26d8+_0x55c04a(0x1fc),{'body':_0x6b099}))[_0x55c04a(0x1da)][_0x55c04a(0x237)];return{..._0x39d018,'id':_0x57b828[_0x55c04a(0x217)],'dT':c['dayjs'](+_0x57b828[_0x55c04a(0x1c6)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x57b828[_0x55c04a(0x1e3)]};}else{const _0x4e7abd={'memberId':_0x5b958c,'unitId':_0x3a26d8,'content':_0x49ae4a,'mention':_0x30312e},_0x4bcb32=await this['_httpService'][_0x55c04a(0x1cd)](_0x55c04a(0x1e2)+_0x3a26d8+_0x55c04a(0x211),{'body':_0x4e7abd});return Y(_0x4bcb32[_0x55c04a(0x1da)]['comment'],_0x39d018);}}async[_0x4a9a54(0x224)](_0x42a80a){const _0x3701f5=_0x4a9a54;var _0x379e35,_0x4491ff;const {text:_0xb8d727,unitId:_0x151d6e}=_0x42a80a,_0x210bb7=(_0x4491ff=(_0x379e35=_0xb8d727['customRanges'])==null?void 0x0:_0x379e35['filter'](_0x557661=>_0x557661[_0x3701f5(0x1c7)]===c[_0x3701f5(0x1d8)][_0x3701f5(0x204)])[_0x3701f5(0x206)](_0x168d25=>_0x168d25['rangeId']))!=null?_0x4491ff:[],_0x10f9a9=JSON[_0x3701f5(0x1f8)](_0xb8d727),_0x1ed447=_0x42a80a[_0x3701f5(0x21d)],_0x15b7f7=_0x42a80a['id'],_0x3a246c={'memberId':(await this[_0x3701f5(0x20c)]['requireSession'](_0x151d6e))[_0x3701f5(0x1dd)](),'unitId':_0x151d6e,'threadId':_0x1ed447,'mention':_0x210bb7,'content':_0x10f9a9,'replyId':_0x15b7f7},_0x21e4eb=await this['_httpService'][_0x3701f5(0x1cd)](_0x3701f5(0x1e2)+_0x151d6e+_0x3701f5(0x226),{'body':_0x3a246c});return!_0x21e4eb[_0x3701f5(0x1da)][_0x3701f5(0x1f2)]||_0x21e4eb[_0x3701f5(0x1da)][_0x3701f5(0x1f2)][_0x3701f5(0x1f6)]===0x1;}async[_0x4a9a54(0x1c5)](_0x5f3b3a){const _0x1ab9d3=_0x4a9a54,{unitId:_0x140cde}=_0x5f3b3a,_0x102b03=_0x5f3b3a[_0x1ab9d3(0x21d)],_0x2f72a0={'memberId':this[_0x1ab9d3(0x232)][_0x1ab9d3(0x1e1)]()[_0x1ab9d3(0x1d3)],'unitId':_0x140cde,'threadId':_0x102b03,'solved':_0x5f3b3a['resolved']?I[_0x1ab9d3(0x222)]:I[_0x1ab9d3(0x229)]},_0xb56488=await this[_0x1ab9d3(0x22d)][_0x1ab9d3(0x1cd)]('/universer-api/comment/unit/'+_0x140cde+_0x1ab9d3(0x216),{'body':_0x2f72a0});return!_0xb56488[_0x1ab9d3(0x1da)][_0x1ab9d3(0x1f2)]||_0xb56488[_0x1ab9d3(0x1da)][_0x1ab9d3(0x1f2)][_0x1ab9d3(0x1f6)]===0x1;}async[_0x4a9a54(0x205)](_0x149169,_0xc21a67,_0x549cad,_0xb546ec){const _0x237744=_0x4a9a54,_0x3238d3={'memberId':(await this[_0x237744(0x20c)][_0x237744(0x214)](_0x149169))[_0x237744(0x1dd)](),'threadId':_0x549cad,'replyId':_0xb546ec,'unitId':_0x149169},_0x34f99a=await this['_httpService'][_0x237744(0x1cd)](_0x237744(0x1e2)+_0x149169+_0x237744(0x1f3),{'body':_0x3238d3});return!_0x34f99a[_0x237744(0x1da)][_0x237744(0x1f2)]||_0x34f99a['body'][_0x237744(0x1f2)][_0x237744(0x1f6)]===0x1;}async['listComments'](_0xd6f766,_0x21ebf3,_0x36f9eb){const _0x12614b=_0x4a9a54,_0xfb54e9={'unitId':_0xd6f766,'threadId':_0x36f9eb},_0x2dbfe5=await this[_0x12614b(0x22d)][_0x12614b(0x1cd)](_0x12614b(0x1e2)+_0xd6f766+_0x12614b(0x1ef),{'body':_0xfb54e9}),_0x3509a1=_0x36f9eb['map'](_0x33d159=>G(_0x2dbfe5['body']['comments'][_0x33d159],_0xd6f766,_0x21ebf3))['filter'](Boolean);return Object['values'](_0x2dbfe5[_0x12614b(0x1da)][_0x12614b(0x201)])[_0x12614b(0x22c)](_0x1cce45=>{const _0x46e296=_0x12614b;this['_userService'][_0x46e296(0x20e)](_0x1cce45);}),_0x3509a1;}['saveCommentToSnapshot'](_0xdbd7f5){const _0x485de3=_0x4a9a54;return{'id':_0xdbd7f5['id'],'threadId':_0xdbd7f5[_0x485de3(0x21d)],'ref':_0xdbd7f5['ref']};}};p=x([C(0x0,c[_0x4a9a54(0x1e5)](P[_0x4a9a54(0x1ed)])),C(0x1,c[_0x4a9a54(0x1e5)](c[_0x4a9a54(0x1fb)])),C(0x2,c[_0x4a9a54(0x1e5)](b[_0x4a9a54(0x1d2)]))],p);var H=Object[_0x4a9a54(0x1c3)],J=(_0x4f6475,_0x53ac70,_0x3517cc,_0x59f18b)=>{const _0x1efdfd=_0x4a9a54;for(var _0x21c7d8=_0x59f18b>0x1?void 0x0:_0x59f18b?H(_0x53ac70,_0x3517cc):_0x53ac70,_0x53f276=_0x4f6475[_0x1efdfd(0x1d0)]-0x1,_0x742c0a;_0x53f276>=0x0;_0x53f276--)(_0x742c0a=_0x4f6475[_0x53f276])&&(_0x21c7d8=_0x742c0a(_0x21c7d8)||_0x21c7d8);return _0x21c7d8;},y=(_0x5e242c,_0x1172e2)=>(_0xc10c1a,_0x532831)=>_0x1172e2(_0xc10c1a,_0x532831,_0x5e242c);let g=class extends c['Disposable']{constructor(_0x615531,_0x202c40){const _0x13c480=_0x4a9a54;super(),this[_0x13c480(0x1c9)]=_0x615531,this[_0x13c480(0x1d9)]=_0x202c40,this[_0x13c480(0x22f)]();}['_initDataSource'](){const _0x57ee4c=_0x4a9a54;this[_0x57ee4c(0x1c9)]['dataSource']=this['_threadCommentDataSource'],this[_0x57ee4c(0x1c9)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4a9a54(0x21f)]),y(0x1,c[_0x4a9a54(0x1e5)](p))],g);var F=Object[_0x4a9a54(0x230)],L=Object[_0x4a9a54(0x1c3)],Z=(_0x4378f1,_0x1ccd4f,_0x4733f6)=>_0x1ccd4f in _0x4378f1?F(_0x4378f1,_0x1ccd4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4733f6}):_0x4378f1[_0x1ccd4f]=_0x4733f6,W=(_0x4a5808,_0x9ebb17,_0x29865c,_0x4c2b38)=>{const _0x259b31=_0x4a9a54;for(var _0x54b789=_0x4c2b38>0x1?void 0x0:_0x4c2b38?L(_0x9ebb17,_0x29865c):_0x9ebb17,_0x52bdc7=_0x4a5808[_0x259b31(0x1d0)]-0x1,_0x2329ce;_0x52bdc7>=0x0;_0x52bdc7--)(_0x2329ce=_0x4a5808[_0x52bdc7])&&(_0x54b789=_0x2329ce(_0x54b789)||_0x54b789);return _0x54b789;},O=(_0x501e49,_0x4910f7)=>(_0x4fdb9b,_0x52ab56)=>_0x4910f7(_0x4fdb9b,_0x52ab56,_0x501e49),N=(_0xbf693b,_0x297a25,_0x3a8107)=>Z(_0xbf693b,typeof _0x297a25!=_0x4a9a54(0x1e6)?_0x297a25+'':_0x297a25,_0x3a8107);exports[_0x4a9a54(0x1dc)]=class extends c[_0x4a9a54(0x1d7)]{constructor(_0x8084e6=D,_0x1a04dd,_0x18f468){const _0x4290b3=_0x4a9a54;super(),this[_0x4290b3(0x1e7)]=_0x8084e6,this['_injector']=_0x1a04dd,this[_0x4290b3(0x21b)]=_0x18f468;const {..._0x2ab8e0}=c[_0x4290b3(0x1eb)]({},D,this[_0x4290b3(0x1e7)]);this[_0x4290b3(0x21b)][_0x4290b3(0x20b)](q,_0x2ab8e0);}[_0x4a9a54(0x235)](){const _0x43aee7=_0x4a9a54;[[p],[g],[_]][_0x43aee7(0x22c)](_0x54839c=>{const _0x16a994=_0x43aee7;this['_injector'][_0x16a994(0x20d)](_0x54839c);});}[_0x4a9a54(0x225)](){const _0x1b761f=_0x4a9a54;this[_0x1b761f(0x20f)][_0x1b761f(0x218)](g),this[_0x1b761f(0x20f)][_0x1b761f(0x218)](_);}},N(exports[_0x4a9a54(0x1dc)],'pluginName',U),N(exports[_0x4a9a54(0x1dc)],_0x4a9a54(0x22a),c[_0x4a9a54(0x1f9)][_0x4a9a54(0x1ca)]),exports[_0x4a9a54(0x1dc)]=W([c[_0x4a9a54(0x200)](w['UniverThreadCommentUIPlugin'],b[_0x4a9a54(0x233)],T[_0x4a9a54(0x236)]),O(0x1,c[_0x4a9a54(0x1e5)](c[_0x4a9a54(0x1ff)])),O(0x2,c[_0x4a9a54(0x228)])],exports[_0x4a9a54(0x1dc)]);
1
+ 'use strict';const _0x3dcb94=_0x537f;(function(_0x58d913,_0x23bde1){const _0x294a91=_0x537f,_0xc7f612=_0x58d913();while(!![]){try{const _0x47a73f=parseInt(_0x294a91(0x15e))/0x1*(-parseInt(_0x294a91(0x163))/0x2)+-parseInt(_0x294a91(0x1a2))/0x3*(parseInt(_0x294a91(0x179))/0x4)+-parseInt(_0x294a91(0x17a))/0x5+parseInt(_0x294a91(0x149))/0x6*(-parseInt(_0x294a91(0x170))/0x7)+-parseInt(_0x294a91(0x17f))/0x8*(-parseInt(_0x294a91(0x16a))/0x9)+parseInt(_0x294a91(0x189))/0xa+parseInt(_0x294a91(0x1af))/0xb;if(_0x47a73f===_0x23bde1)break;else _0xc7f612['push'](_0xc7f612['shift']());}catch(_0x2addbd){_0xc7f612['push'](_0xc7f612['shift']());}}}(_0x59bc,0x9e0a5));Object[_0x3dcb94(0x158)](exports,Symbol[_0x3dcb94(0x145)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2795e4=>(_0x2795e4[_0x2795e4[_0x3dcb94(0x16b)]=0x0]=_0x3dcb94(0x16b),_0x2795e4[_0x2795e4[_0x3dcb94(0x183)]=0x1]=_0x3dcb94(0x183),_0x2795e4[_0x2795e4[_0x3dcb94(0x1ae)]=-0x1]=_0x3dcb94(0x1ae),_0x2795e4))(I||{}),v=(_0x121bc6=>(_0x121bc6[_0x121bc6[_0x3dcb94(0x160)]=0x0]=_0x3dcb94(0x160),_0x121bc6[_0x121bc6['Add']=0x1]=_0x3dcb94(0x140),_0x121bc6[_0x121bc6[_0x3dcb94(0x14f)]=0x2]='Reply',_0x121bc6[_0x121bc6[_0x3dcb94(0x15f)]=0x3]=_0x3dcb94(0x15f),_0x121bc6[_0x121bc6['Delete']=0x4]=_0x3dcb94(0x16e),_0x121bc6[_0x121bc6['Solve']=0x5]=_0x3dcb94(0x187),_0x121bc6[_0x121bc6[_0x3dcb94(0x1ae)]=-0x1]=_0x3dcb94(0x1ae),_0x121bc6))(v||{});const f=_0x4b4ddc=>c[_0x3dcb94(0x1a1)](new Date(+_0x4b4ddc))[_0x3dcb94(0x141)](_0x3dcb94(0x177)),R=async(_0xa8388d,_0x45085b)=>{const _0x58e4d=_0x3dcb94,_0x2d6d76=_0xa8388d['get'](c[_0x58e4d(0x181)]),_0x28c654=_0xa8388d[_0x58e4d(0x150)](P[_0x58e4d(0x178)]);_0x45085b['forEach'](_0x4a7d5b=>{const _0x5b2c08=_0x58e4d;_0x2d6d76[_0x5b2c08(0x148)](_0x4a7d5b)&&_0x45085b[_0x5b2c08(0x13f)](_0x4a7d5b);}),_0x45085b[_0x58e4d(0x172)]&&(await _0x28c654[_0x58e4d(0x150)](_0x58e4d(0x1b0),{'params':{'userIDs':[..._0x45085b]}}))[_0x58e4d(0x1a6)]['users'][_0x58e4d(0x1ab)](_0xd6d266=>{const _0x472a5c=_0x58e4d;_0xd6d266&&_0x2d6d76[_0x472a5c(0x157)](_0xd6d266);});};function _0x59bc(){const _0x193253=['34213BNCZsM','Edit','Unknown','_threadCommentDataSourceService','parentId','74nAOgdS','userID','find','deleteComment','content','UniverLicensePlugin','onStarting','6417jQtMFb','OpenOrReOpen','threadId','userId','Delete','/add','8035174rjtxDM','rangeId','size','add','DependentOn','/solved','requireSession','YYYY/MM/DD\x20HH:mm','HTTPService','88492GfzqnC','1339010iAtAzY','getCurrentUser','getMemberID','onReady','ThreadCommentModel','3456xahHte','_configService','UserManagerService','personId','Solved','/universer-api/comment/unit/','pipe','slice','Solve','_initDataSource','10213940kumHPv','comment','CollaborationSessionService','comments','resolveComment','filter','length','getComment','getUnit','IConfigService','_init','map','symbol','UniverThreadCommentDataSourcePlugin','user','merge','rangeType','subscribe','root','UniverInstanceType','code','customRanges','/edit','reply','dayjs','84rnhAqw','_injector','_userService','solved','body','UniverThreadCommentUIPlugin','_commentService','_httpService','UNIVER_UNKNOWN','forEach','values','/delete','UNRECOGNIZED','28808252pniULH','/universer-api/user/list','error','getOwnPropertyDescriptor','parse','_sessionService','COMMENT','disposeWithMe','delete','Add','format','Injector','replies','_threadCommentModel','toStringTag','commentUpdate$','updateComment','getUser','6FTeDcW','CustomRangeType','setConfig','addComment','bufferTime','Inject','Reply','get','Disposable','replyId','stringify','syncUpdateMutationToColla','createTimestamp','_config','addUser','defineProperty','unitId','saveCommentToSnapshot','_threadCommentDataSource','post','type'];_0x59bc=function(){return _0x193253;};return _0x59bc();}var $=Object[_0x3dcb94(0x1b2)],E=(_0x5af5b1,_0x14ff0b,_0x35f6b8,_0x25f776)=>{const _0x31732d=_0x3dcb94;for(var _0x28f086=_0x25f776>0x1?void 0x0:_0x25f776?$(_0x14ff0b,_0x35f6b8):_0x14ff0b,_0xc1bfae=_0x5af5b1[_0x31732d(0x18f)]-0x1,_0x52a720;_0xc1bfae>=0x0;_0xc1bfae--)(_0x52a720=_0x5af5b1[_0xc1bfae])&&(_0x28f086=_0x52a720(_0x28f086)||_0x28f086);return _0x28f086;},S=(_0x3f0ddd,_0x301afc)=>(_0x12aa8f,_0xd41606)=>_0x301afc(_0x12aa8f,_0xd41606,_0x3f0ddd);let _=class extends c[_0x3dcb94(0x151)]{constructor(_0x239896,_0x32303d,_0x310d25,_0x2bc5e9){const _0x5e2a3a=_0x3dcb94;super(),this[_0x5e2a3a(0x1a8)]=_0x239896,this['_threadCommentModel']=_0x32303d,this[_0x5e2a3a(0x1a4)]=_0x310d25,this[_0x5e2a3a(0x1a3)]=_0x2bc5e9,this[_0x5e2a3a(0x193)](),this['_initUserSync']();}['_initUserSync'](){const _0x247bca=_0x3dcb94;this[_0x247bca(0x13e)](this[_0x247bca(0x144)][_0x247bca(0x146)][_0x247bca(0x185)](j[_0x247bca(0x14d)](0x10))[_0x247bca(0x19a)](_0x23b25b=>{const _0xeec6ce=_0x247bca,_0x2b545a=new Set();_0x23b25b[_0xeec6ce(0x1ab)](_0xffd541=>{const _0xe01cbb=_0xeec6ce;switch(_0xffd541[_0xe01cbb(0x15d)]){case _0xe01cbb(0x173):{const _0x4ddaa0=_0xffd541['payload'][_0xe01cbb(0x182)];_0x2b545a[_0xe01cbb(0x173)](_0x4ddaa0);break;}}}),R(this['_injector'],_0x2b545a);}));}[_0x3dcb94(0x193)](){const _0x49800a=_0x3dcb94;this['disposeWithMe'](this[_0x49800a(0x1a8)][_0x49800a(0x146)][_0x49800a(0x19a)](async _0xa7db20=>{const _0x306810=_0x49800a;var _0x7f5c6f,_0x2c9687,_0x1cb43b,_0x3cd200;const _0x5617f4=(_0x7f5c6f=this['_threadCommentModel'][_0x306810(0x191)](_0xa7db20['unitId'])[_0x306810(0x165)](_0x4fbc48=>_0x4fbc48[_0x306810(0x16c)]===_0xa7db20['threadId']))==null?void 0x0:_0x7f5c6f[_0x306810(0x19b)];if(!_0x5617f4)return;const {unitId:_0x579c8e,subUnitId:_0x436294}=_0x5617f4;switch(_0xa7db20[_0x306810(0x197)]&&this[_0x306810(0x1a4)]['addUser'](_0xa7db20[_0x306810(0x197)]),_0xa7db20[_0x306810(0x15d)]){case v['Add']:break;case v['Reply']:{this[_0x306810(0x144)][_0x306810(0x14c)](_0x579c8e,_0x436294,{'unitId':_0x579c8e,'subUnitId':_0x436294,'ref':'','id':_0xa7db20[_0x306810(0x152)],'dT':f(+_0xa7db20[_0x306810(0x155)]),'threadId':_0xa7db20[_0x306810(0x16c)],'personId':(_0x1cb43b=(_0x2c9687=_0xa7db20[_0x306810(0x197)])==null?void 0x0:_0x2c9687[_0x306810(0x164)])!=null?_0x1cb43b:_0xa7db20['userId'],'text':JSON[_0x306810(0x1b3)](_0xa7db20[_0x306810(0x167)]),'parentId':_0x5617f4['id']});break;}case v[_0x306810(0x16e)]:{const _0x101364=this[_0x306810(0x144)][_0x306810(0x190)](_0x579c8e,_0x436294,_0xa7db20[_0x306810(0x152)]);_0x101364&&_0x101364[_0x306810(0x162)]&&this[_0x306810(0x144)][_0x306810(0x166)](_0x579c8e,_0x436294,_0xa7db20[_0x306810(0x152)]);break;}case v[_0x306810(0x15f)]:{this[_0x306810(0x144)]['updateComment'](_0x579c8e,_0x436294,{'commentId':_0xa7db20['replyId'],'text':JSON['parse'](_0xa7db20['content'])});break;}case v[_0x306810(0x187)]:{const _0x124cd5=(_0x3cd200=this[_0x306810(0x144)][_0x306810(0x191)](_0xa7db20[_0x306810(0x159)])[_0x306810(0x165)](_0x5d5e5f=>_0x5d5e5f[_0x306810(0x16c)]===_0xa7db20[_0x306810(0x16c)]))==null?void 0x0:_0x3cd200[_0x306810(0x19b)];_0x124cd5&&this[_0x306810(0x144)][_0x306810(0x18d)](_0x579c8e,_0x436294,_0x124cd5['id'],_0xa7db20[_0x306810(0x1a5)]===I[_0x306810(0x183)]);break;}}}));}};_=E([S(0x0,c[_0x3dcb94(0x14e)](b['CommentService'])),S(0x1,c[_0x3dcb94(0x14e)](M[_0x3dcb94(0x17e)])),S(0x2,c[_0x3dcb94(0x14e)](c[_0x3dcb94(0x181)])),S(0x3,c['Inject'](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x3dcb94(0x1b2)],x=(_0x477f1f,_0x575c47,_0x4f8447,_0x4be4ef)=>{for(var _0x272274=_0x4be4ef>0x1?void 0x0:_0x4be4ef?A(_0x575c47,_0x4f8447):_0x575c47,_0x33990c=_0x477f1f['length']-0x1,_0x384843;_0x33990c>=0x0;_0x33990c--)(_0x384843=_0x477f1f[_0x33990c])&&(_0x272274=_0x384843(_0x272274)||_0x272274);return _0x272274;},C=(_0x213e67,_0x20f971)=>(_0x164dc0,_0x37dce9)=>_0x20f971(_0x164dc0,_0x37dce9,_0x213e67);function Y(_0xd10ef2,_0x231b01){const _0xdbc1b6=_0x3dcb94,_0x20d2ac=_0xd10ef2[_0xdbc1b6(0x143)][0x0];return{..._0x231b01,'id':_0x20d2ac[_0xdbc1b6(0x152)],'resolved':_0xd10ef2[_0xdbc1b6(0x1a5)]===0x1,'dT':f(_0x20d2ac[_0xdbc1b6(0x155)]),'personId':_0x20d2ac[_0xdbc1b6(0x16d)],'threadId':_0x20d2ac[_0xdbc1b6(0x16c)]};}function G(_0x15c062,_0x24c0b4,_0x8947f4){const _0x1f25a9=_0x3dcb94;var _0x49613e,_0x4d70ee;if(((_0x4d70ee=(_0x49613e=_0x15c062==null?void 0x0:_0x15c062[_0x1f25a9(0x143)])==null?void 0x0:_0x49613e[_0x1f25a9(0x18f)])!=null?_0x4d70ee:0x0)>0x0){const _0x541fa7=(_0x1d3dfb,_0x50a180)=>({'id':_0x1d3dfb[_0x1f25a9(0x152)],'threadId':_0x1d3dfb[_0x1f25a9(0x16c)],'dT':f(_0x1d3dfb[_0x1f25a9(0x155)]),'personId':_0x1d3dfb[_0x1f25a9(0x16d)],'resolved':_0x15c062[_0x1f25a9(0x1a5)]===I['Solved'],'unitId':_0x24c0b4,'subUnitId':_0x8947f4,'text':JSON[_0x1f25a9(0x1b3)](_0x1d3dfb['content']),'parentId':_0x50a180}),_0x25aef2=_0x541fa7(_0x15c062[_0x1f25a9(0x143)][0x0]);return{..._0x25aef2,'children':_0x15c062['replies'][_0x1f25a9(0x186)](0x1)[_0x1f25a9(0x194)](_0x406a18=>_0x541fa7(_0x406a18,_0x25aef2['id']))};}return null;}let p=class{constructor(_0x53b126,_0x46abd0,_0x3199cf){const _0x5d1bc2=_0x3dcb94;this[_0x5d1bc2(0x1a9)]=_0x53b126,this['_userService']=_0x46abd0,this[_0x5d1bc2(0x1b4)]=_0x3199cf;}async[_0x3dcb94(0x14c)](_0x3b4f75){const _0x105b6a=_0x3dcb94;var _0x4d54ff,_0x4b3c6d;const {parentId:_0x102f47,unitId:_0x4c4606,text:_0x323e33,threadId:_0xbe047a}=_0x3b4f75,_0xa57db=(_0x4b3c6d=(_0x4d54ff=_0x323e33[_0x105b6a(0x19e)])==null?void 0x0:_0x4d54ff['filter'](_0x8cc614=>_0x8cc614[_0x105b6a(0x199)]===c['CustomRangeType'][_0x105b6a(0x1b5)])['map'](_0xdc3dd9=>_0xdc3dd9['rangeId']))!=null?_0x4b3c6d:[],_0x3dd83e=JSON[_0x105b6a(0x153)](_0x323e33),_0x19636a=(await this['_sessionService']['requireSession'](_0x4c4606))[_0x105b6a(0x17c)]();if(_0x102f47){const _0x7b30ea={'memberId':_0x19636a,'unitId':_0x4c4606,'content':_0x3dd83e,'mention':_0xa57db,'threadId':_0xbe047a},_0x172b7b=(await this[_0x105b6a(0x1a9)]['post'](_0x105b6a(0x184)+_0x4c4606+'/reply',{'body':_0x7b30ea}))[_0x105b6a(0x1a6)][_0x105b6a(0x1a0)];return{..._0x3b4f75,'id':_0x172b7b[_0x105b6a(0x152)],'dT':c[_0x105b6a(0x1a1)](+_0x172b7b[_0x105b6a(0x155)])[_0x105b6a(0x141)](_0x105b6a(0x177)),'personId':_0x172b7b['userId']};}else{const _0x155ab7={'memberId':_0x19636a,'unitId':_0x4c4606,'content':_0x3dd83e,'mention':_0xa57db},_0xb2eeda=await this[_0x105b6a(0x1a9)][_0x105b6a(0x15c)]('/universer-api/comment/unit/'+_0x4c4606+_0x105b6a(0x16f),{'body':_0x155ab7});return Y(_0xb2eeda['body'][_0x105b6a(0x18a)],_0x3b4f75);}}async[_0x3dcb94(0x147)](_0x5d0c4a){const _0x3d57a4=_0x3dcb94;var _0x57f276,_0x5727a3;const {text:_0x4e6c4e,unitId:_0x285acf}=_0x5d0c4a,_0x1de2ca=(_0x5727a3=(_0x57f276=_0x4e6c4e[_0x3d57a4(0x19e)])==null?void 0x0:_0x57f276[_0x3d57a4(0x18e)](_0x3c478d=>_0x3c478d['rangeType']===c[_0x3d57a4(0x14a)][_0x3d57a4(0x1b5)])['map'](_0x398f15=>_0x398f15[_0x3d57a4(0x171)]))!=null?_0x5727a3:[],_0x476c4e=JSON[_0x3d57a4(0x153)](_0x4e6c4e),_0x31bcab=_0x5d0c4a[_0x3d57a4(0x16c)],_0x51f55e=_0x5d0c4a['id'],_0x2e648f={'memberId':(await this['_sessionService']['requireSession'](_0x285acf))['getMemberID'](),'unitId':_0x285acf,'threadId':_0x31bcab,'mention':_0x1de2ca,'content':_0x476c4e,'replyId':_0x51f55e},_0x2527b0=await this[_0x3d57a4(0x1a9)][_0x3d57a4(0x15c)](_0x3d57a4(0x184)+_0x285acf+_0x3d57a4(0x19f),{'body':_0x2e648f});return!_0x2527b0[_0x3d57a4(0x1a6)][_0x3d57a4(0x1b1)]||_0x2527b0[_0x3d57a4(0x1a6)]['error'][_0x3d57a4(0x19d)]===0x1;}async[_0x3dcb94(0x18d)](_0x1f5865){const _0x2d5a7b=_0x3dcb94,{unitId:_0x5cf80c}=_0x1f5865,_0x2e4c5a=_0x1f5865['threadId'],_0x16fe0b={'memberId':this[_0x2d5a7b(0x1a4)][_0x2d5a7b(0x17b)]()[_0x2d5a7b(0x164)],'unitId':_0x5cf80c,'threadId':_0x2e4c5a,'solved':_0x1f5865['resolved']?I[_0x2d5a7b(0x183)]:I[_0x2d5a7b(0x16b)]},_0x4add96=await this[_0x2d5a7b(0x1a9)]['post'](_0x2d5a7b(0x184)+_0x5cf80c+_0x2d5a7b(0x175),{'body':_0x16fe0b});return!_0x4add96[_0x2d5a7b(0x1a6)][_0x2d5a7b(0x1b1)]||_0x4add96[_0x2d5a7b(0x1a6)]['error'][_0x2d5a7b(0x19d)]===0x1;}async[_0x3dcb94(0x166)](_0x30ab70,_0x4ad5a6,_0x423fb7,_0x3929c5){const _0x1b3157=_0x3dcb94,_0x84ccff={'memberId':(await this[_0x1b3157(0x1b4)][_0x1b3157(0x176)](_0x30ab70))[_0x1b3157(0x17c)](),'threadId':_0x423fb7,'replyId':_0x3929c5,'unitId':_0x30ab70},_0x4a1969=await this[_0x1b3157(0x1a9)]['post'](_0x1b3157(0x184)+_0x30ab70+_0x1b3157(0x1ad),{'body':_0x84ccff});return!_0x4a1969['body'][_0x1b3157(0x1b1)]||_0x4a1969[_0x1b3157(0x1a6)][_0x1b3157(0x1b1)][_0x1b3157(0x19d)]===0x1;}async['listComments'](_0x2d29d9,_0x2511db,_0x3ab4c9){const _0x898a6a=_0x3dcb94,_0x34786d={'unitId':_0x2d29d9,'threadId':_0x3ab4c9},_0x5d3121=await this[_0x898a6a(0x1a9)]['post'](_0x898a6a(0x184)+_0x2d29d9+'/list',{'body':_0x34786d}),_0x431145=_0x3ab4c9[_0x898a6a(0x194)](_0x5a42dc=>G(_0x5d3121[_0x898a6a(0x1a6)][_0x898a6a(0x18c)][_0x5a42dc],_0x2d29d9,_0x2511db))[_0x898a6a(0x18e)](Boolean);return Object[_0x898a6a(0x1ac)](_0x5d3121[_0x898a6a(0x1a6)]['users'])[_0x898a6a(0x1ab)](_0x2776e5=>{const _0x3f49b6=_0x898a6a;this[_0x3f49b6(0x1a4)][_0x3f49b6(0x157)](_0x2776e5);}),_0x431145;}[_0x3dcb94(0x15a)](_0x5e3b32){const _0x4a19f0=_0x3dcb94;return{'id':_0x5e3b32['id'],'threadId':_0x5e3b32[_0x4a19f0(0x16c)],'ref':_0x5e3b32['ref']};}};p=x([C(0x0,c[_0x3dcb94(0x14e)](P[_0x3dcb94(0x178)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x3dcb94(0x18b)]))],p);function _0x537f(_0x86ae62,_0x3368e2){const _0x59bcb4=_0x59bc();return _0x537f=function(_0x537f94,_0x487414){_0x537f94=_0x537f94-0x13e;let _0x481777=_0x59bcb4[_0x537f94];return _0x481777;},_0x537f(_0x86ae62,_0x3368e2);}var H=Object['getOwnPropertyDescriptor'],J=(_0xbf39c6,_0x18f43e,_0x2c68a4,_0x43c528)=>{const _0x47cb58=_0x3dcb94;for(var _0x487bad=_0x43c528>0x1?void 0x0:_0x43c528?H(_0x18f43e,_0x2c68a4):_0x18f43e,_0x1e61ad=_0xbf39c6[_0x47cb58(0x18f)]-0x1,_0x1a2533;_0x1e61ad>=0x0;_0x1e61ad--)(_0x1a2533=_0xbf39c6[_0x1e61ad])&&(_0x487bad=_0x1a2533(_0x487bad)||_0x487bad);return _0x487bad;},y=(_0x531a08,_0x5a6282)=>(_0xe26a38,_0x4d6a89)=>_0x5a6282(_0xe26a38,_0x4d6a89,_0x531a08);let g=class extends c[_0x3dcb94(0x151)]{constructor(_0x514fcf,_0x2634ef){const _0x226897=_0x3dcb94;super(),this[_0x226897(0x161)]=_0x514fcf,this[_0x226897(0x15b)]=_0x2634ef,this[_0x226897(0x188)]();}[_0x3dcb94(0x188)](){const _0x436007=_0x3dcb94;this[_0x436007(0x161)]['dataSource']=this['_threadCommentDataSource'],this[_0x436007(0x161)][_0x436007(0x154)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x3dcb94(0x14e)](p))],g);var F=Object['defineProperty'],L=Object[_0x3dcb94(0x1b2)],Z=(_0xbf484c,_0x4755d0,_0x5e48e8)=>_0x4755d0 in _0xbf484c?F(_0xbf484c,_0x4755d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e48e8}):_0xbf484c[_0x4755d0]=_0x5e48e8,W=(_0x450bbc,_0x3fdb7b,_0x5d4614,_0x2b2dec)=>{for(var _0x4d3cd9=_0x2b2dec>0x1?void 0x0:_0x2b2dec?L(_0x3fdb7b,_0x5d4614):_0x3fdb7b,_0x5898d7=_0x450bbc['length']-0x1,_0x2ace87;_0x5898d7>=0x0;_0x5898d7--)(_0x2ace87=_0x450bbc[_0x5898d7])&&(_0x4d3cd9=_0x2ace87(_0x4d3cd9)||_0x4d3cd9);return _0x4d3cd9;},O=(_0x5cd1f1,_0x1ac29d)=>(_0x5e1f61,_0x4ec3d7)=>_0x1ac29d(_0x5e1f61,_0x4ec3d7,_0x5cd1f1),N=(_0x222569,_0x45d00e,_0x3c76c7)=>Z(_0x222569,typeof _0x45d00e!=_0x3dcb94(0x195)?_0x45d00e+'':_0x45d00e,_0x3c76c7);exports[_0x3dcb94(0x196)]=class extends c['Plugin']{constructor(_0xd43cc=D,_0x954d7c,_0x4139cc){const _0x1ea1d1=_0x3dcb94;super(),this[_0x1ea1d1(0x156)]=_0xd43cc,this['_injector']=_0x954d7c,this[_0x1ea1d1(0x180)]=_0x4139cc;const {..._0x1fb425}=c[_0x1ea1d1(0x198)]({},D,this[_0x1ea1d1(0x156)]);this['_configService'][_0x1ea1d1(0x14b)](q,_0x1fb425);}[_0x3dcb94(0x169)](){const _0x357d3d=_0x3dcb94;[[p],[g],[_]][_0x357d3d(0x1ab)](_0x39317c=>{const _0x5eec45=_0x357d3d;this[_0x5eec45(0x1a3)]['add'](_0x39317c);});}[_0x3dcb94(0x17d)](){const _0x13cb0e=_0x3dcb94;this[_0x13cb0e(0x1a3)]['get'](g),this[_0x13cb0e(0x1a3)][_0x13cb0e(0x150)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x3dcb94(0x196)],_0x3dcb94(0x15d),c[_0x3dcb94(0x19c)][_0x3dcb94(0x1aa)]),exports[_0x3dcb94(0x196)]=W([c[_0x3dcb94(0x174)](w[_0x3dcb94(0x1a7)],b['UniverCollaborationClientPlugin'],T[_0x3dcb94(0x168)]),O(0x1,c[_0x3dcb94(0x14e)](c[_0x3dcb94(0x142)])),O(0x2,c[_0x3dcb94(0x192)])],exports[_0x3dcb94(0x196)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x25faa0=_0x30b4;(function(_0xa99cc1,_0x52040a){const _0x17ca33=_0x30b4,_0x4a215d=_0xa99cc1();while(!![]){try{const _0x59f580=parseInt(_0x17ca33(0x1e7))/0x1+-parseInt(_0x17ca33(0x202))/0x2*(parseInt(_0x17ca33(0x22f))/0x3)+parseInt(_0x17ca33(0x21c))/0x4*(parseInt(_0x17ca33(0x232))/0x5)+-parseInt(_0x17ca33(0x223))/0x6*(parseInt(_0x17ca33(0x248))/0x7)+parseInt(_0x17ca33(0x1ec))/0x8*(-parseInt(_0x17ca33(0x23e))/0x9)+-parseInt(_0x17ca33(0x20b))/0xa+parseInt(_0x17ca33(0x249))/0xb;if(_0x59f580===_0x52040a)break;else _0x4a215d['push'](_0x4a215d['shift']());}catch(_0x176779){_0x4a215d['push'](_0x4a215d['shift']());}}}(_0x34aa,0x9e461));import{CommentService as _0xa2ebfd,CollaborationSessionService as _0x6ebfb5,UniverCollaborationClientPlugin as _0x4d0826}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6f90f6}from'@univerjs-pro/license';import{dayjs as _0x5f5b37,UserManagerService as _0x3f7db5,Inject as _0xc9741e,Injector as _0x54bd73,Disposable as _0x25aa90,CustomRangeType as _0x2b4870,UniverInstanceType as _0x4e65bc,DependentOn as _0x125195,IConfigService as _0x4521b1,Plugin as _0x542bcc,merge as _0x7d8ac9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d4016}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a9473,IThreadCommentDataSourceService as _0x18a375}from'@univerjs/thread-comment';import{bufferTime as _0x5e308e}from'rxjs';function _0x30b4(_0x43136d,_0x4460d4){const _0x34aaeb=_0x34aa();return _0x30b4=function(_0x30b47b,_0x4ee0b0){_0x30b47b=_0x30b47b-0x1de;let _0x18f0ad=_0x34aaeb[_0x30b47b];return _0x18f0ad;},_0x30b4(_0x43136d,_0x4460d4);}import{HTTPService as _0x3bbb43}from'@univerjs/network';const W=_0x25faa0(0x235);var I=(_0x3b8563=>(_0x3b8563[_0x3b8563[_0x25faa0(0x1fd)]=0x0]='OpenOrReOpen',_0x3b8563[_0x3b8563['Solved']=0x1]='Solved',_0x3b8563[_0x3b8563[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x3b8563))(I||{}),v=(_0x42e44f=>(_0x42e44f[_0x42e44f[_0x25faa0(0x227)]=0x0]=_0x25faa0(0x227),_0x42e44f[_0x42e44f['Add']=0x1]='Add',_0x42e44f[_0x42e44f[_0x25faa0(0x215)]=0x2]=_0x25faa0(0x215),_0x42e44f[_0x42e44f[_0x25faa0(0x216)]=0x3]=_0x25faa0(0x216),_0x42e44f[_0x42e44f['Delete']=0x4]=_0x25faa0(0x236),_0x42e44f[_0x42e44f[_0x25faa0(0x22e)]=0x5]=_0x25faa0(0x22e),_0x42e44f[_0x42e44f[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x42e44f))(v||{});const y=_0x58a32e=>_0x5f5b37(new Date(+_0x58a32e))[_0x25faa0(0x1e0)](_0x25faa0(0x1ed)),B=async(_0x17e8ed,_0x4b6bc6)=>{const _0x4faf91=_0x25faa0,_0x25123a=_0x17e8ed[_0x4faf91(0x1f8)](_0x3f7db5),_0xe17c12=_0x17e8ed[_0x4faf91(0x1f8)](_0x3bbb43);_0x4b6bc6['forEach'](_0x33f45b=>{const _0x42367f=_0x4faf91;_0x25123a[_0x42367f(0x22c)](_0x33f45b)&&_0x4b6bc6[_0x42367f(0x1e5)](_0x33f45b);}),_0x4b6bc6['size']&&(await _0xe17c12['get'](_0x4faf91(0x237),{'params':{'userIDs':[..._0x4b6bc6]}}))['body'][_0x4faf91(0x1e6)][_0x4faf91(0x1e8)](_0xe32af3=>{_0xe32af3&&_0x25123a['addUser'](_0xe32af3);});};var K=Object[_0x25faa0(0x238)],V=(_0xe86f59,_0x4c6ffc,_0x2c840c,_0x1cf7d3)=>{const _0x321d21=_0x25faa0;for(var _0x294a54=_0x1cf7d3>0x1?void 0x0:_0x1cf7d3?K(_0x4c6ffc,_0x2c840c):_0x4c6ffc,_0x5ba2a1=_0xe86f59[_0x321d21(0x203)]-0x1,_0x5511db;_0x5ba2a1>=0x0;_0x5ba2a1--)(_0x5511db=_0xe86f59[_0x5ba2a1])&&(_0x294a54=_0x5511db(_0x294a54)||_0x294a54);return _0x294a54;},p=(_0x3e5f7e,_0x199364)=>(_0x3a7908,_0x2fbc3b)=>_0x199364(_0x3a7908,_0x2fbc3b,_0x3e5f7e);let _=class extends _0x25aa90{constructor(_0x3a14b5,_0x366f0a,_0x2ecc78,_0x5a5439){const _0x3d6cd7=_0x25faa0;super(),this[_0x3d6cd7(0x243)]=_0x3a14b5,this[_0x3d6cd7(0x20e)]=_0x366f0a,this['_userService']=_0x2ecc78,this[_0x3d6cd7(0x22a)]=_0x5a5439,this[_0x3d6cd7(0x1f6)](),this[_0x3d6cd7(0x1f3)]();}[_0x25faa0(0x1f3)](){const _0x4968e3=_0x25faa0;this[_0x4968e3(0x1fb)](this['_threadCommentModel'][_0x4968e3(0x1f2)][_0x4968e3(0x229)](_0x5e308e(0x10))['subscribe'](_0x2ec4b6=>{const _0x564076=_0x4968e3,_0x4bdbca=new Set();_0x2ec4b6[_0x564076(0x1e8)](_0x28b5ac=>{const _0x1320b0=_0x564076;switch(_0x28b5ac[_0x1320b0(0x22b)]){case _0x1320b0(0x23d):{const _0x3f7d51=_0x28b5ac[_0x1320b0(0x219)][_0x1320b0(0x23c)];_0x4bdbca[_0x1320b0(0x23d)](_0x3f7d51);break;}}}),B(this[_0x564076(0x22a)],_0x4bdbca);}));}[_0x25faa0(0x1f6)](){const _0x3be1d6=_0x25faa0;this['disposeWithMe'](this[_0x3be1d6(0x243)][_0x3be1d6(0x1f2)][_0x3be1d6(0x209)](async _0x33ac03=>{const _0x4ed2bc=_0x3be1d6;var _0x4706d3,_0x40a8e1,_0x51b853,_0x28f354;const _0x5ae392=(_0x4706d3=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0x13c896=>_0x13c896[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x4706d3[_0x4ed2bc(0x23b)];if(!_0x5ae392)return;const {unitId:_0x54b011,subUnitId:_0x20a96c}=_0x5ae392;switch(_0x33ac03[_0x4ed2bc(0x212)]&&this[_0x4ed2bc(0x225)]['addUser'](_0x33ac03['user']),_0x33ac03[_0x4ed2bc(0x22b)]){case v[_0x4ed2bc(0x246)]:break;case v[_0x4ed2bc(0x215)]:{this['_threadCommentModel']['addComment'](_0x54b011,_0x20a96c,{'unitId':_0x54b011,'subUnitId':_0x20a96c,'ref':'','id':_0x33ac03[_0x4ed2bc(0x21d)],'dT':y(+_0x33ac03['createTimestamp']),'threadId':_0x33ac03[_0x4ed2bc(0x245)],'personId':(_0x51b853=(_0x40a8e1=_0x33ac03[_0x4ed2bc(0x212)])==null?void 0x0:_0x40a8e1[_0x4ed2bc(0x1f0)])!=null?_0x51b853:_0x33ac03[_0x4ed2bc(0x1de)],'text':JSON['parse'](_0x33ac03['content']),'parentId':_0x5ae392['id']});break;}case v[_0x4ed2bc(0x236)]:{const _0x4f5fdb=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x234)](_0x54b011,_0x20a96c,_0x33ac03['replyId']);_0x4f5fdb&&_0x4f5fdb[_0x4ed2bc(0x1fa)]&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x21e)](_0x54b011,_0x20a96c,_0x33ac03[_0x4ed2bc(0x21d)]);break;}case v['Edit']:{this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x210)](_0x54b011,_0x20a96c,{'commentId':_0x33ac03[_0x4ed2bc(0x21d)],'text':JSON[_0x4ed2bc(0x201)](_0x33ac03[_0x4ed2bc(0x230)])});break;}case v['Solve']:{const _0x40bb85=(_0x28f354=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0xf82527=>_0xf82527[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x28f354[_0x4ed2bc(0x23b)];_0x40bb85&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x213)](_0x54b011,_0x20a96c,_0x40bb85['id'],_0x33ac03['solved']===I[_0x4ed2bc(0x1f4)]);break;}}}));}};_=V([p(0x0,_0xc9741e(_0xa2ebfd)),p(0x1,_0xc9741e(_0x5a9473)),p(0x2,_0xc9741e(_0x3f7db5)),p(0x3,_0xc9741e(_0x54bd73))],_);const z=_0x25faa0(0x221),O={};var k=Object[_0x25faa0(0x238)],Q=(_0x50458b,_0x2cfa27,_0x165052,_0x2cb40f)=>{const _0x561009=_0x25faa0;for(var _0x1ebc4e=_0x2cb40f>0x1?void 0x0:_0x2cb40f?k(_0x2cfa27,_0x165052):_0x2cfa27,_0x1459c9=_0x50458b[_0x561009(0x203)]-0x1,_0x5e1865;_0x1459c9>=0x0;_0x1459c9--)(_0x5e1865=_0x50458b[_0x1459c9])&&(_0x1ebc4e=_0x5e1865(_0x1ebc4e)||_0x1ebc4e);return _0x1ebc4e;},b=(_0x8caf4f,_0x5dcebf)=>(_0x42d5bd,_0x135186)=>_0x5dcebf(_0x42d5bd,_0x135186,_0x8caf4f);function X(_0x1abb62,_0x242971){const _0x4cd15f=_0x25faa0,_0x159188=_0x1abb62[_0x4cd15f(0x208)][0x0];return{..._0x242971,'id':_0x159188[_0x4cd15f(0x21d)],'resolved':_0x1abb62[_0x4cd15f(0x1f7)]===0x1,'dT':y(_0x159188[_0x4cd15f(0x1f5)]),'personId':_0x159188[_0x4cd15f(0x1de)],'threadId':_0x159188[_0x4cd15f(0x245)]};}function ee(_0x9ab101,_0x20675e,_0x219a65){const _0xb1361e=_0x25faa0;var _0xda8d60,_0x1308cf;if(((_0x1308cf=(_0xda8d60=_0x9ab101==null?void 0x0:_0x9ab101[_0xb1361e(0x208)])==null?void 0x0:_0xda8d60['length'])!=null?_0x1308cf:0x0)>0x0){const _0x3d84ab=(_0x5e253c,_0x260acc)=>({'id':_0x5e253c[_0xb1361e(0x21d)],'threadId':_0x5e253c[_0xb1361e(0x245)],'dT':y(_0x5e253c['createTimestamp']),'personId':_0x5e253c['userId'],'resolved':_0x9ab101[_0xb1361e(0x1f7)]===I[_0xb1361e(0x1f4)],'unitId':_0x20675e,'subUnitId':_0x219a65,'text':JSON[_0xb1361e(0x201)](_0x5e253c[_0xb1361e(0x230)]),'parentId':_0x260acc}),_0x516cad=_0x3d84ab(_0x9ab101[_0xb1361e(0x208)][0x0]);return{..._0x516cad,'children':_0x9ab101[_0xb1361e(0x208)][_0xb1361e(0x1fe)](0x1)[_0xb1361e(0x204)](_0x19c60b=>_0x3d84ab(_0x19c60b,_0x516cad['id']))};}return null;}let S=class{constructor(_0x5163d6,_0x1c96ab,_0x54eac6){const _0x1a4021=_0x25faa0;this[_0x1a4021(0x220)]=_0x5163d6,this[_0x1a4021(0x225)]=_0x1c96ab,this['_sessionService']=_0x54eac6;}async[_0x25faa0(0x1df)](_0xb52cc5){const _0x5cbebd=_0x25faa0;var _0x2b7bf9,_0x3a4fa9;const {parentId:_0x2a52a4,unitId:_0x2a5aa8,text:_0x37759b,threadId:_0x3a0471}=_0xb52cc5,_0x2a485a=(_0x3a4fa9=(_0x2b7bf9=_0x37759b[_0x5cbebd(0x23f)])==null?void 0x0:_0x2b7bf9[_0x5cbebd(0x233)](_0x22af43=>_0x22af43[_0x5cbebd(0x1fc)]===_0x2b4870[_0x5cbebd(0x226)])[_0x5cbebd(0x204)](_0x67caea=>_0x67caea[_0x5cbebd(0x207)]))!=null?_0x3a4fa9:[],_0x462f99=JSON[_0x5cbebd(0x23a)](_0x37759b),_0x14b7c0=(await this[_0x5cbebd(0x200)][_0x5cbebd(0x1ea)](_0x2a5aa8))['getMemberID']();if(_0x2a52a4){const _0x5141e0={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a,'threadId':_0x3a0471},_0x3231c2=(await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+_0x5cbebd(0x1ee),{'body':_0x5141e0}))[_0x5cbebd(0x247)][_0x5cbebd(0x217)];return{..._0xb52cc5,'id':_0x3231c2[_0x5cbebd(0x21d)],'dT':_0x5f5b37(+_0x3231c2['createTimestamp'])[_0x5cbebd(0x1e0)](_0x5cbebd(0x1ed)),'personId':_0x3231c2['userId']};}else{const _0x1d36f4={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a},_0x1b2cd8=await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+'/add',{'body':_0x1d36f4});return X(_0x1b2cd8[_0x5cbebd(0x247)][_0x5cbebd(0x242)],_0xb52cc5);}}async[_0x25faa0(0x210)](_0x25c88c){const _0x2e7441=_0x25faa0;var _0x154a7a,_0x5d039e;const {text:_0x35c186,unitId:_0x2a417d}=_0x25c88c,_0x68aa8=(_0x5d039e=(_0x154a7a=_0x35c186[_0x2e7441(0x23f)])==null?void 0x0:_0x154a7a['filter'](_0x19a6bc=>_0x19a6bc[_0x2e7441(0x1fc)]===_0x2b4870[_0x2e7441(0x226)])['map'](_0x562c31=>_0x562c31[_0x2e7441(0x207)]))!=null?_0x5d039e:[],_0x566172=JSON[_0x2e7441(0x23a)](_0x35c186),_0x3651dd=_0x25c88c[_0x2e7441(0x245)],_0x2e4d32=_0x25c88c['id'],_0x3cf0f3={'memberId':(await this[_0x2e7441(0x200)]['requireSession'](_0x2a417d))[_0x2e7441(0x22d)](),'unitId':_0x2a417d,'threadId':_0x3651dd,'mention':_0x68aa8,'content':_0x566172,'replyId':_0x2e4d32},_0x25d94a=await this[_0x2e7441(0x220)][_0x2e7441(0x1f9)](_0x2e7441(0x20a)+_0x2a417d+_0x2e7441(0x1e1),{'body':_0x3cf0f3});return!_0x25d94a[_0x2e7441(0x247)]['error']||_0x25d94a['body'][_0x2e7441(0x1e2)][_0x2e7441(0x214)]===0x1;}async[_0x25faa0(0x213)](_0x2e00fb){const _0x4d500b=_0x25faa0,{unitId:_0xd4084a}=_0x2e00fb,_0x139da7=_0x2e00fb[_0x4d500b(0x245)],_0xf4632={'memberId':this[_0x4d500b(0x225)][_0x4d500b(0x1ef)]()[_0x4d500b(0x1f0)],'unitId':_0xd4084a,'threadId':_0x139da7,'solved':_0x2e00fb[_0x4d500b(0x224)]?I[_0x4d500b(0x1f4)]:I[_0x4d500b(0x1fd)]},_0x4bed30=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd4084a+_0x4d500b(0x21a),{'body':_0xf4632});return!_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]||_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]['code']===0x1;}async[_0x25faa0(0x21e)](_0x4657da,_0x5219b2,_0x3709a2,_0x91b25b){const _0x502ce2=_0x25faa0,_0x134b6d={'memberId':(await this[_0x502ce2(0x200)][_0x502ce2(0x1ea)](_0x4657da))[_0x502ce2(0x22d)](),'threadId':_0x3709a2,'replyId':_0x91b25b,'unitId':_0x4657da},_0x1404d8=await this[_0x502ce2(0x220)][_0x502ce2(0x1f9)](_0x502ce2(0x20a)+_0x4657da+_0x502ce2(0x239),{'body':_0x134b6d});return!_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]||_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]['code']===0x1;}async[_0x25faa0(0x206)](_0x24b97c,_0x2dc250,_0x242496){const _0x38b732=_0x25faa0,_0x41e338={'unitId':_0x24b97c,'threadId':_0x242496},_0x352d02=await this[_0x38b732(0x220)]['post'](_0x38b732(0x20a)+_0x24b97c+_0x38b732(0x211),{'body':_0x41e338}),_0x242e84=_0x242496[_0x38b732(0x204)](_0x564114=>ee(_0x352d02[_0x38b732(0x247)][_0x38b732(0x20f)][_0x564114],_0x24b97c,_0x2dc250))[_0x38b732(0x233)](Boolean);return Object[_0x38b732(0x222)](_0x352d02[_0x38b732(0x247)][_0x38b732(0x1e6)])[_0x38b732(0x1e8)](_0x1013da=>{const _0x136fe6=_0x38b732;this[_0x136fe6(0x225)]['addUser'](_0x1013da);}),_0x242e84;}[_0x25faa0(0x218)](_0x241013){const _0x474e19=_0x25faa0;return{'id':_0x241013['id'],'threadId':_0x241013['threadId'],'ref':_0x241013[_0x474e19(0x1f1)]};}};S=Q([b(0x0,_0xc9741e(_0x3bbb43)),b(0x1,_0xc9741e(_0x3f7db5)),b(0x2,_0xc9741e(_0x6ebfb5))],S);var re=Object[_0x25faa0(0x238)],te=(_0x35be7e,_0x5219d3,_0x59eb15,_0x552ca1)=>{const _0x14fbef=_0x25faa0;for(var _0x5a7101=_0x552ca1>0x1?void 0x0:_0x552ca1?re(_0x5219d3,_0x59eb15):_0x5219d3,_0x486000=_0x35be7e[_0x14fbef(0x203)]-0x1,_0x344a87;_0x486000>=0x0;_0x486000--)(_0x344a87=_0x35be7e[_0x486000])&&(_0x5a7101=_0x344a87(_0x5a7101)||_0x5a7101);return _0x5a7101;},M=(_0x49bb4f,_0x6e02e1)=>(_0x5e1e70,_0x5c86c0)=>_0x6e02e1(_0x5e1e70,_0x5c86c0,_0x49bb4f);let f=class extends _0x25aa90{constructor(_0x54fbfa,_0x5e24da){const _0x119e83=_0x25faa0;super(),this[_0x119e83(0x228)]=_0x54fbfa,this['_threadCommentDataSource']=_0x5e24da,this[_0x119e83(0x21f)]();}[_0x25faa0(0x21f)](){const _0x38512b=_0x25faa0;this[_0x38512b(0x228)][_0x38512b(0x240)]=this['_threadCommentDataSource'],this[_0x38512b(0x228)][_0x38512b(0x20c)]=!0x1;}};f=te([M(0x0,_0x18a375),M(0x1,_0xc9741e(S))],f);var se=Object[_0x25faa0(0x1eb)],oe=Object[_0x25faa0(0x238)],ne=(_0x2f075d,_0x407807,_0x5bdfad)=>_0x407807 in _0x2f075d?se(_0x2f075d,_0x407807,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdfad}):_0x2f075d[_0x407807]=_0x5bdfad,ie=(_0x5425e8,_0x43c3fc,_0x473feb,_0x289190)=>{for(var _0x21f9a4=_0x289190>0x1?void 0x0:_0x289190?oe(_0x43c3fc,_0x473feb):_0x43c3fc,_0x5caa96=_0x5425e8['length']-0x1,_0x2f59b6;_0x5caa96>=0x0;_0x5caa96--)(_0x2f59b6=_0x5425e8[_0x5caa96])&&(_0x21f9a4=_0x2f59b6(_0x21f9a4)||_0x21f9a4);return _0x21f9a4;},N=(_0x288a79,_0xea4ffc)=>(_0x1e91e2,_0x3d09ec)=>_0xea4ffc(_0x1e91e2,_0x3d09ec,_0x288a79),$=(_0x57b778,_0x3c5bce,_0x418876)=>ne(_0x57b778,typeof _0x3c5bce!=_0x25faa0(0x21b)?_0x3c5bce+'':_0x3c5bce,_0x418876);let g=class extends _0x542bcc{constructor(_0x7c60fc=O,_0x1077ab,_0x34158d){const _0x414784=_0x25faa0;super(),this['_config']=_0x7c60fc,this[_0x414784(0x22a)]=_0x1077ab,this[_0x414784(0x1e3)]=_0x34158d;const {..._0x5d39e9}=_0x7d8ac9({},O,this[_0x414784(0x244)]);this[_0x414784(0x1e3)][_0x414784(0x24a)](z,_0x5d39e9);}[_0x25faa0(0x205)](){[[S],[f],[_]]['forEach'](_0x4e1af1=>{this['_injector']['add'](_0x4e1af1);});}['onReady'](){const _0x4b9be4=_0x25faa0;this[_0x4b9be4(0x22a)]['get'](f),this[_0x4b9be4(0x22a)][_0x4b9be4(0x1f8)](_);}};$(g,_0x25faa0(0x1e9),W),$(g,'type',_0x4e65bc[_0x25faa0(0x1ff)]),g=ie([_0x125195(_0x2d4016,_0x4d0826,_0x6f90f6),N(0x1,_0xc9741e(_0x54bd73)),N(0x2,_0x4521b1)],g);function _0x34aa(){const _0x106170=['/universer-api/comment/unit/','10330120zRyNlM','syncUpdateMutationToColla','find','_threadCommentModel','comments','updateComment','/list','user','resolveComment','code','Reply','Edit','reply','saveCommentToSnapshot','payload','/solved','symbol','36FfdlLu','replyId','deleteComment','_initDataSource','_httpService','thread-comment-data-source.config','values','848622irycZg','resolved','_userService','COMMENT','Unknown','_threadCommentDataSourceService','pipe','_injector','type','getUser','getMemberID','Solve','241950cRwsKf','content','getUnit','234380oiXcum','filter','getComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','/universer-api/user/list','getOwnPropertyDescriptor','/delete','stringify','root','personId','add','10771263tWvpGA','customRanges','dataSource','UNRECOGNIZED','comment','_commentService','_config','threadId','Add','body','7vUjGug','27992800iMJhhj','setConfig','userId','addComment','format','/edit','error','_configService','unitId','delete','users','778711NYDhET','forEach','pluginName','requireSession','defineProperty','8ZTkmMd','YYYY/MM/DD\x20HH:mm','/reply','getCurrentUser','userID','ref','commentUpdate$','_initUserSync','Solved','createTimestamp','_init','solved','get','post','parentId','disposeWithMe','rangeType','OpenOrReOpen','slice','UNIVER_UNKNOWN','_sessionService','parse','18dcFmTs','length','map','onStarting','listComments','rangeId','replies','subscribe'];_0x34aa=function(){return _0x106170;};return _0x34aa();}export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xfce04a=_0x44da;(function(_0x5eb61f,_0xb4aefa){const _0x12c3b8=_0x44da,_0xd0860b=_0x5eb61f();while(!![]){try{const _0x3efb4d=-parseInt(_0x12c3b8(0x108))/0x1+parseInt(_0x12c3b8(0x121))/0x2*(-parseInt(_0x12c3b8(0xf3))/0x3)+parseInt(_0x12c3b8(0x12a))/0x4*(-parseInt(_0x12c3b8(0x13d))/0x5)+-parseInt(_0x12c3b8(0x137))/0x6+-parseInt(_0x12c3b8(0xe6))/0x7*(parseInt(_0x12c3b8(0xe9))/0x8)+-parseInt(_0x12c3b8(0xf5))/0x9*(parseInt(_0x12c3b8(0x144))/0xa)+parseInt(_0x12c3b8(0xfd))/0xb;if(_0x3efb4d===_0xb4aefa)break;else _0xd0860b['push'](_0xd0860b['shift']());}catch(_0x499787){_0xd0860b['push'](_0xd0860b['shift']());}}}(_0x2561,0xdd1ea));import{CommentService as _0x1a73fd,CollaborationSessionService as _0x25d635,UniverCollaborationClientPlugin as _0x394080}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fff8}from'@univerjs-pro/license';function _0x44da(_0x4894c3,_0x599ff1){const _0x2561f6=_0x2561();return _0x44da=function(_0x44da48,_0x436ad0){_0x44da48=_0x44da48-0xe3;let _0x5a8a9a=_0x2561f6[_0x44da48];return _0x5a8a9a;},_0x44da(_0x4894c3,_0x599ff1);}import{dayjs as _0x310155,UserManagerService as _0x45e780,Inject as _0x4f3041,Injector as _0x469122,Disposable as _0x5b77e0,CustomRangeType as _0x5bad6a,UniverInstanceType as _0xe3d688,DependentOn as _0x1e1d9f,IConfigService as _0x41d53f,Plugin as _0x136f78,merge as _0x4dae59}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ca99e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25e01c,IThreadCommentDataSourceService as _0x531f6f}from'@univerjs/thread-comment';import{bufferTime as _0x43b0ed}from'rxjs';import{HTTPService as _0xb56acb}from'@univerjs/network';const W=_0xfce04a(0x12c);var I=(_0x34b9a3=>(_0x34b9a3[_0x34b9a3[_0xfce04a(0x141)]=0x0]='OpenOrReOpen',_0x34b9a3[_0x34b9a3[_0xfce04a(0x13a)]=0x1]=_0xfce04a(0x13a),_0x34b9a3[_0x34b9a3[_0xfce04a(0x136)]=-0x1]='UNRECOGNIZED',_0x34b9a3))(I||{}),v=(_0x51a35e=>(_0x51a35e[_0x51a35e[_0xfce04a(0x140)]=0x0]=_0xfce04a(0x140),_0x51a35e[_0x51a35e[_0xfce04a(0xf1)]=0x1]=_0xfce04a(0xf1),_0x51a35e[_0x51a35e[_0xfce04a(0x135)]=0x2]=_0xfce04a(0x135),_0x51a35e[_0x51a35e['Edit']=0x3]=_0xfce04a(0x109),_0x51a35e[_0x51a35e[_0xfce04a(0x142)]=0x4]=_0xfce04a(0x142),_0x51a35e[_0x51a35e[_0xfce04a(0x11b)]=0x5]=_0xfce04a(0x11b),_0x51a35e[_0x51a35e[_0xfce04a(0x136)]=-0x1]=_0xfce04a(0x136),_0x51a35e))(v||{});const y=_0x5a0b4a=>_0x310155(new Date(+_0x5a0b4a))['format'](_0xfce04a(0xe7)),B=async(_0x1efee0,_0xcf15e)=>{const _0x15e55c=_0xfce04a,_0x56e63b=_0x1efee0['get'](_0x45e780),_0x500652=_0x1efee0['get'](_0xb56acb);_0xcf15e[_0x15e55c(0x115)](_0x5d614d=>{_0x56e63b['getUser'](_0x5d614d)&&_0xcf15e['delete'](_0x5d614d);}),_0xcf15e[_0x15e55c(0xeb)]&&(await _0x500652[_0x15e55c(0x123)]('/universer-api/user/list',{'params':{'userIDs':[..._0xcf15e]}}))['body'][_0x15e55c(0xf0)][_0x15e55c(0x115)](_0x2e7cc9=>{const _0x348e5a=_0x15e55c;_0x2e7cc9&&_0x56e63b[_0x348e5a(0x13e)](_0x2e7cc9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5d78c8,_0x3e640a,_0x1c5602,_0x1be3de)=>{const _0x49826b=_0xfce04a;for(var _0x293aea=_0x1be3de>0x1?void 0x0:_0x1be3de?K(_0x3e640a,_0x1c5602):_0x3e640a,_0x525357=_0x5d78c8[_0x49826b(0x10c)]-0x1,_0x187481;_0x525357>=0x0;_0x525357--)(_0x187481=_0x5d78c8[_0x525357])&&(_0x293aea=_0x187481(_0x293aea)||_0x293aea);return _0x293aea;},p=(_0x2db76a,_0x3e55da)=>(_0x2dd75a,_0x2d90e5)=>_0x3e55da(_0x2dd75a,_0x2d90e5,_0x2db76a);let _=class extends _0x5b77e0{constructor(_0x3259a6,_0xaad8a7,_0x2d9d87,_0x4f7122){const _0xf2ad53=_0xfce04a;super(),this[_0xf2ad53(0x127)]=_0x3259a6,this[_0xf2ad53(0x13b)]=_0xaad8a7,this[_0xf2ad53(0x129)]=_0x2d9d87,this['_injector']=_0x4f7122,this['_init'](),this[_0xf2ad53(0xec)]();}['_initUserSync'](){const _0x596faa=_0xfce04a;this[_0x596faa(0xf8)](this[_0x596faa(0x13b)][_0x596faa(0x119)][_0x596faa(0x11e)](_0x43b0ed(0x10))[_0x596faa(0x10f)](_0x44652c=>{const _0x496fe8=_0x596faa,_0x1a5253=new Set();_0x44652c[_0x496fe8(0x115)](_0x3f16a5=>{const _0xda20b7=_0x496fe8;switch(_0x3f16a5[_0xda20b7(0xf2)]){case _0xda20b7(0xf4):{const _0x5e2be9=_0x3f16a5['payload']['personId'];_0x1a5253['add'](_0x5e2be9);break;}}}),B(this[_0x496fe8(0x102)],_0x1a5253);}));}[_0xfce04a(0x12d)](){const _0x401292=_0xfce04a;this[_0x401292(0xf8)](this[_0x401292(0x127)][_0x401292(0x119)]['subscribe'](async _0x1e8622=>{const _0x50b91e=_0x401292;var _0x30e0a3,_0x319517,_0x4ae273,_0x43fb3d;const _0x4e5315=(_0x30e0a3=this['_threadCommentModel']['getUnit'](_0x1e8622['unitId'])[_0x50b91e(0x145)](_0x3e846b=>_0x3e846b[_0x50b91e(0x10e)]===_0x1e8622[_0x50b91e(0x10e)]))==null?void 0x0:_0x30e0a3[_0x50b91e(0x12f)];if(!_0x4e5315)return;const {unitId:_0x2f393e,subUnitId:_0xe63792}=_0x4e5315;switch(_0x1e8622['user']&&this[_0x50b91e(0x129)][_0x50b91e(0x13e)](_0x1e8622[_0x50b91e(0x12b)]),_0x1e8622[_0x50b91e(0xf2)]){case v[_0x50b91e(0xf1)]:break;case v[_0x50b91e(0x135)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x148)](_0x2f393e,_0xe63792,{'unitId':_0x2f393e,'subUnitId':_0xe63792,'ref':'','id':_0x1e8622[_0x50b91e(0x12e)],'dT':y(+_0x1e8622[_0x50b91e(0x13f)]),'threadId':_0x1e8622[_0x50b91e(0x10e)],'personId':(_0x4ae273=(_0x319517=_0x1e8622['user'])==null?void 0x0:_0x319517['userID'])!=null?_0x4ae273:_0x1e8622[_0x50b91e(0x146)],'text':JSON['parse'](_0x1e8622[_0x50b91e(0x10d)]),'parentId':_0x4e5315['id']});break;}case v[_0x50b91e(0x142)]:{const _0x3b5945=this[_0x50b91e(0x13b)][_0x50b91e(0x11c)](_0x2f393e,_0xe63792,_0x1e8622[_0x50b91e(0x12e)]);_0x3b5945&&_0x3b5945[_0x50b91e(0x11f)]&&this[_0x50b91e(0x13b)][_0x50b91e(0x11a)](_0x2f393e,_0xe63792,_0x1e8622['replyId']);break;}case v[_0x50b91e(0x109)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x124)](_0x2f393e,_0xe63792,{'commentId':_0x1e8622['replyId'],'text':JSON['parse'](_0x1e8622['content'])});break;}case v['Solve']:{const _0x21962a=(_0x43fb3d=this[_0x50b91e(0x13b)][_0x50b91e(0x13c)](_0x1e8622[_0x50b91e(0x101)])[_0x50b91e(0x145)](_0x5058f1=>_0x5058f1[_0x50b91e(0x10e)]===_0x1e8622['threadId']))==null?void 0x0:_0x43fb3d[_0x50b91e(0x12f)];_0x21962a&&this[_0x50b91e(0x13b)][_0x50b91e(0x120)](_0x2f393e,_0xe63792,_0x21962a['id'],_0x1e8622[_0x50b91e(0xee)]===I[_0x50b91e(0x13a)]);break;}}}));}};_=V([p(0x0,_0x4f3041(_0x1a73fd)),p(0x1,_0x4f3041(_0x25e01c)),p(0x2,_0x4f3041(_0x45e780)),p(0x3,_0x4f3041(_0x469122))],_);const z=_0xfce04a(0x104),O={};var k=Object[_0xfce04a(0x10b)],Q=(_0x43f854,_0x52f480,_0x19696c,_0x54c902)=>{const _0x105099=_0xfce04a;for(var _0x8336ad=_0x54c902>0x1?void 0x0:_0x54c902?k(_0x52f480,_0x19696c):_0x52f480,_0x2a4917=_0x43f854[_0x105099(0x10c)]-0x1,_0x39def6;_0x2a4917>=0x0;_0x2a4917--)(_0x39def6=_0x43f854[_0x2a4917])&&(_0x8336ad=_0x39def6(_0x8336ad)||_0x8336ad);return _0x8336ad;},b=(_0x4a7c78,_0x3fc807)=>(_0x35db81,_0x36105d)=>_0x3fc807(_0x35db81,_0x36105d,_0x4a7c78);function X(_0x1e1a4f,_0x3a2f0a){const _0x54ba00=_0xfce04a,_0x3c0f65=_0x1e1a4f[_0x54ba00(0x10a)][0x0];return{..._0x3a2f0a,'id':_0x3c0f65[_0x54ba00(0x12e)],'resolved':_0x1e1a4f[_0x54ba00(0xee)]===0x1,'dT':y(_0x3c0f65[_0x54ba00(0x13f)]),'personId':_0x3c0f65[_0x54ba00(0x146)],'threadId':_0x3c0f65[_0x54ba00(0x10e)]};}function ee(_0x176ed9,_0x515e79,_0x19e687){const _0x16633e=_0xfce04a;var _0x1f3c92,_0x3eb2e1;if(((_0x3eb2e1=(_0x1f3c92=_0x176ed9==null?void 0x0:_0x176ed9[_0x16633e(0x10a)])==null?void 0x0:_0x1f3c92[_0x16633e(0x10c)])!=null?_0x3eb2e1:0x0)>0x0){const _0x57ac3c=(_0x1d0bb8,_0x2f5028)=>({'id':_0x1d0bb8['replyId'],'threadId':_0x1d0bb8[_0x16633e(0x10e)],'dT':y(_0x1d0bb8[_0x16633e(0x13f)]),'personId':_0x1d0bb8[_0x16633e(0x146)],'resolved':_0x176ed9[_0x16633e(0xee)]===I[_0x16633e(0x13a)],'unitId':_0x515e79,'subUnitId':_0x19e687,'text':JSON['parse'](_0x1d0bb8[_0x16633e(0x10d)]),'parentId':_0x2f5028}),_0x121b9d=_0x57ac3c(_0x176ed9[_0x16633e(0x10a)][0x0]);return{..._0x121b9d,'children':_0x176ed9['replies']['slice'](0x1)['map'](_0x4c4fcb=>_0x57ac3c(_0x4c4fcb,_0x121b9d['id']))};}return null;}let S=class{constructor(_0x47bfcc,_0x2e7e3a,_0x47c544){const _0xd59b18=_0xfce04a;this[_0xd59b18(0xe8)]=_0x47bfcc,this[_0xd59b18(0x129)]=_0x2e7e3a,this[_0xd59b18(0xe3)]=_0x47c544;}async[_0xfce04a(0x148)](_0x3ac375){const _0x4eef5a=_0xfce04a;var _0x7db16e,_0x1b66df;const {parentId:_0x4dc1df,unitId:_0x3b03f0,text:_0x376c0e,threadId:_0x401386}=_0x3ac375,_0x29a784=(_0x1b66df=(_0x7db16e=_0x376c0e['customRanges'])==null?void 0x0:_0x7db16e[_0x4eef5a(0x113)](_0x344bf5=>_0x344bf5[_0x4eef5a(0x134)]===_0x5bad6a[_0x4eef5a(0x118)])[_0x4eef5a(0xea)](_0x4c3701=>_0x4c3701[_0x4eef5a(0xfb)]))!=null?_0x1b66df:[],_0x4bedb7=JSON[_0x4eef5a(0xe5)](_0x376c0e),_0x11b06c=(await this['_sessionService'][_0x4eef5a(0x139)](_0x3b03f0))[_0x4eef5a(0x125)]();if(_0x4dc1df){const _0x343405={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784,'threadId':_0x401386},_0x2c51ea=(await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xfa),{'body':_0x343405}))[_0x4eef5a(0x130)][_0x4eef5a(0x133)];return{..._0x3ac375,'id':_0x2c51ea[_0x4eef5a(0x12e)],'dT':_0x310155(+_0x2c51ea[_0x4eef5a(0x13f)])[_0x4eef5a(0x111)](_0x4eef5a(0xe7)),'personId':_0x2c51ea[_0x4eef5a(0x146)]};}else{const _0x11a7f8={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784},_0x58767b=await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xe4),{'body':_0x11a7f8});return X(_0x58767b[_0x4eef5a(0x130)][_0x4eef5a(0x114)],_0x3ac375);}}async['updateComment'](_0x24ff34){const _0x12fd98=_0xfce04a;var _0x5689b6,_0x262679;const {text:_0x408f33,unitId:_0x2e9f92}=_0x24ff34,_0x171db3=(_0x262679=(_0x5689b6=_0x408f33['customRanges'])==null?void 0x0:_0x5689b6['filter'](_0x238e9d=>_0x238e9d[_0x12fd98(0x134)]===_0x5bad6a[_0x12fd98(0x118)])['map'](_0x2667ef=>_0x2667ef[_0x12fd98(0xfb)]))!=null?_0x262679:[],_0x1a3948=JSON[_0x12fd98(0xe5)](_0x408f33),_0x3ac0ac=_0x24ff34['threadId'],_0x344e76=_0x24ff34['id'],_0x29066b={'memberId':(await this['_sessionService']['requireSession'](_0x2e9f92))[_0x12fd98(0x125)](),'unitId':_0x2e9f92,'threadId':_0x3ac0ac,'mention':_0x171db3,'content':_0x1a3948,'replyId':_0x344e76},_0x436b50=await this[_0x12fd98(0xe8)][_0x12fd98(0x106)](_0x12fd98(0xf9)+_0x2e9f92+_0x12fd98(0xff),{'body':_0x29066b});return!_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]||_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]['code']===0x1;}async['resolveComment'](_0x17cd0c){const _0x438939=_0xfce04a,{unitId:_0x5cc292}=_0x17cd0c,_0x40f8f8=_0x17cd0c[_0x438939(0x10e)],_0x199d53={'memberId':this[_0x438939(0x129)][_0x438939(0x126)]()[_0x438939(0x103)],'unitId':_0x5cc292,'threadId':_0x40f8f8,'solved':_0x17cd0c[_0x438939(0x132)]?I['Solved']:I[_0x438939(0x141)]},_0x5c1059=await this[_0x438939(0xe8)][_0x438939(0x106)]('/universer-api/comment/unit/'+_0x5cc292+_0x438939(0x110),{'body':_0x199d53});return!_0x5c1059[_0x438939(0x130)][_0x438939(0xed)]||_0x5c1059['body']['error']['code']===0x1;}async[_0xfce04a(0x11a)](_0x25400c,_0x2305ac,_0x53de3f,_0x467589){const _0x109957=_0xfce04a,_0xabcd3c={'memberId':(await this[_0x109957(0xe3)][_0x109957(0x139)](_0x25400c))[_0x109957(0x125)](),'threadId':_0x53de3f,'replyId':_0x467589,'unitId':_0x25400c},_0x3d842c=await this[_0x109957(0xe8)][_0x109957(0x106)](_0x109957(0xf9)+_0x25400c+_0x109957(0x112),{'body':_0xabcd3c});return!_0x3d842c[_0x109957(0x130)][_0x109957(0xed)]||_0x3d842c['body'][_0x109957(0xed)][_0x109957(0x122)]===0x1;}async[_0xfce04a(0x116)](_0x558cf9,_0x54c594,_0x14512d){const _0xa3d2ee=_0xfce04a,_0x46344b={'unitId':_0x558cf9,'threadId':_0x14512d},_0x1a902d=await this[_0xa3d2ee(0xe8)][_0xa3d2ee(0x106)](_0xa3d2ee(0xf9)+_0x558cf9+'/list',{'body':_0x46344b}),_0x174c1d=_0x14512d[_0xa3d2ee(0xea)](_0x1b05f7=>ee(_0x1a902d['body'][_0xa3d2ee(0x131)][_0x1b05f7],_0x558cf9,_0x54c594))[_0xa3d2ee(0x113)](Boolean);return Object['values'](_0x1a902d[_0xa3d2ee(0x130)][_0xa3d2ee(0xf0)])[_0xa3d2ee(0x115)](_0x1130c1=>{const _0x133ece=_0xa3d2ee;this[_0x133ece(0x129)][_0x133ece(0x13e)](_0x1130c1);}),_0x174c1d;}[_0xfce04a(0x107)](_0x34e21e){const _0x7a85f=_0xfce04a;return{'id':_0x34e21e['id'],'threadId':_0x34e21e[_0x7a85f(0x10e)],'ref':_0x34e21e['ref']};}};S=Q([b(0x0,_0x4f3041(_0xb56acb)),b(0x1,_0x4f3041(_0x45e780)),b(0x2,_0x4f3041(_0x25d635))],S);var re=Object[_0xfce04a(0x10b)],te=(_0x1c7f8d,_0x42264b,_0x350777,_0x2e4869)=>{for(var _0x5cdc33=_0x2e4869>0x1?void 0x0:_0x2e4869?re(_0x42264b,_0x350777):_0x42264b,_0x1a278c=_0x1c7f8d['length']-0x1,_0x8b9ed7;_0x1a278c>=0x0;_0x1a278c--)(_0x8b9ed7=_0x1c7f8d[_0x1a278c])&&(_0x5cdc33=_0x8b9ed7(_0x5cdc33)||_0x5cdc33);return _0x5cdc33;},M=(_0x13e3b8,_0x36edb2)=>(_0xe13d49,_0x10222c)=>_0x36edb2(_0xe13d49,_0x10222c,_0x13e3b8);let f=class extends _0x5b77e0{constructor(_0x592708,_0x356a42){const _0x1879e5=_0xfce04a;super(),this[_0x1879e5(0xf7)]=_0x592708,this['_threadCommentDataSource']=_0x356a42,this[_0x1879e5(0x128)]();}[_0xfce04a(0x128)](){const _0xad93d5=_0xfce04a;this[_0xad93d5(0xf7)][_0xad93d5(0xef)]=this[_0xad93d5(0x11d)],this[_0xad93d5(0xf7)][_0xad93d5(0xf6)]=!0x1;}};f=te([M(0x0,_0x531f6f),M(0x1,_0x4f3041(S))],f);var se=Object[_0xfce04a(0x143)],oe=Object[_0xfce04a(0x10b)],ne=(_0x593f4b,_0x4d9402,_0xc1a9c5)=>_0x4d9402 in _0x593f4b?se(_0x593f4b,_0x4d9402,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc1a9c5}):_0x593f4b[_0x4d9402]=_0xc1a9c5,ie=(_0x432568,_0x379bde,_0x4cd714,_0x39df3)=>{const _0x3ff5ea=_0xfce04a;for(var _0x21585e=_0x39df3>0x1?void 0x0:_0x39df3?oe(_0x379bde,_0x4cd714):_0x379bde,_0x3d4ac9=_0x432568[_0x3ff5ea(0x10c)]-0x1,_0x266903;_0x3d4ac9>=0x0;_0x3d4ac9--)(_0x266903=_0x432568[_0x3d4ac9])&&(_0x21585e=_0x266903(_0x21585e)||_0x21585e);return _0x21585e;},N=(_0x4e479d,_0x5c4729)=>(_0x187777,_0x12412f)=>_0x5c4729(_0x187777,_0x12412f,_0x4e479d),$=(_0x26c7de,_0x197688,_0x34228a)=>ne(_0x26c7de,typeof _0x197688!=_0xfce04a(0xfe)?_0x197688+'':_0x197688,_0x34228a);function _0x2561(){const _0x3f4ba6=['filter','comment','forEach','listComments','pluginName','COMMENT','commentUpdate$','deleteComment','Solve','getComment','_threadCommentDataSource','pipe','parentId','resolveComment','965348zKaUjl','code','get','updateComment','getMemberID','getCurrentUser','_commentService','_initDataSource','_userService','4oteoTq','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','replyId','root','body','comments','resolved','reply','rangeType','Reply','UNRECOGNIZED','7376622OZvKwv','setConfig','requireSession','Solved','_threadCommentModel','getUnit','1430215EjBWlI','addUser','createTimestamp','Unknown','OpenOrReOpen','Delete','defineProperty','10BjApbN','find','userId','onStarting','addComment','_sessionService','/add','stringify','7njZvMo','YYYY/MM/DD\x20HH:mm','_httpService','11323960zsCFin','map','size','_initUserSync','error','solved','dataSource','users','Add','type','3KFeIhe','add','15509007qJHcMb','syncUpdateMutationToColla','_threadCommentDataSourceService','disposeWithMe','/universer-api/comment/unit/','/reply','rangeId','_configService','75079433KqMMMf','symbol','/edit','_config','unitId','_injector','userID','thread-comment-data-source.config','onReady','post','saveCommentToSnapshot','782825qScoOv','Edit','replies','getOwnPropertyDescriptor','length','content','threadId','subscribe','/solved','format','/delete'];_0x2561=function(){return _0x3f4ba6;};return _0x2561();}let g=class extends _0x136f78{constructor(_0x1d60af=O,_0x8433a8,_0x5ca261){const _0x3c2235=_0xfce04a;super(),this[_0x3c2235(0x100)]=_0x1d60af,this[_0x3c2235(0x102)]=_0x8433a8,this[_0x3c2235(0xfc)]=_0x5ca261;const {..._0x197bc4}=_0x4dae59({},O,this[_0x3c2235(0x100)]);this['_configService'][_0x3c2235(0x138)](z,_0x197bc4);}[_0xfce04a(0x147)](){[[S],[f],[_]]['forEach'](_0x51e02=>{const _0x10d7b1=_0x44da;this[_0x10d7b1(0x102)][_0x10d7b1(0xf4)](_0x51e02);});}[_0xfce04a(0x105)](){const _0x20b7f1=_0xfce04a;this[_0x20b7f1(0x102)]['get'](f),this['_injector']['get'](_);}};$(g,_0xfce04a(0x117),W),$(g,_0xfce04a(0xf2),_0xe3d688['UNIVER_UNKNOWN']),g=ie([_0x1e1d9f(_0x5ca99e,_0x394080,_0x50fff8),N(0x1,_0x4f3041(_0x469122)),N(0x2,_0x41d53f)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x25faa0=_0x30b4;(function(_0xa99cc1,_0x52040a){const _0x17ca33=_0x30b4,_0x4a215d=_0xa99cc1();while(!![]){try{const _0x59f580=parseInt(_0x17ca33(0x1e7))/0x1+-parseInt(_0x17ca33(0x202))/0x2*(parseInt(_0x17ca33(0x22f))/0x3)+parseInt(_0x17ca33(0x21c))/0x4*(parseInt(_0x17ca33(0x232))/0x5)+-parseInt(_0x17ca33(0x223))/0x6*(parseInt(_0x17ca33(0x248))/0x7)+parseInt(_0x17ca33(0x1ec))/0x8*(-parseInt(_0x17ca33(0x23e))/0x9)+-parseInt(_0x17ca33(0x20b))/0xa+parseInt(_0x17ca33(0x249))/0xb;if(_0x59f580===_0x52040a)break;else _0x4a215d['push'](_0x4a215d['shift']());}catch(_0x176779){_0x4a215d['push'](_0x4a215d['shift']());}}}(_0x34aa,0x9e461));import{CommentService as _0xa2ebfd,CollaborationSessionService as _0x6ebfb5,UniverCollaborationClientPlugin as _0x4d0826}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6f90f6}from'@univerjs-pro/license';import{dayjs as _0x5f5b37,UserManagerService as _0x3f7db5,Inject as _0xc9741e,Injector as _0x54bd73,Disposable as _0x25aa90,CustomRangeType as _0x2b4870,UniverInstanceType as _0x4e65bc,DependentOn as _0x125195,IConfigService as _0x4521b1,Plugin as _0x542bcc,merge as _0x7d8ac9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d4016}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a9473,IThreadCommentDataSourceService as _0x18a375}from'@univerjs/thread-comment';import{bufferTime as _0x5e308e}from'rxjs';function _0x30b4(_0x43136d,_0x4460d4){const _0x34aaeb=_0x34aa();return _0x30b4=function(_0x30b47b,_0x4ee0b0){_0x30b47b=_0x30b47b-0x1de;let _0x18f0ad=_0x34aaeb[_0x30b47b];return _0x18f0ad;},_0x30b4(_0x43136d,_0x4460d4);}import{HTTPService as _0x3bbb43}from'@univerjs/network';const W=_0x25faa0(0x235);var I=(_0x3b8563=>(_0x3b8563[_0x3b8563[_0x25faa0(0x1fd)]=0x0]='OpenOrReOpen',_0x3b8563[_0x3b8563['Solved']=0x1]='Solved',_0x3b8563[_0x3b8563[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x3b8563))(I||{}),v=(_0x42e44f=>(_0x42e44f[_0x42e44f[_0x25faa0(0x227)]=0x0]=_0x25faa0(0x227),_0x42e44f[_0x42e44f['Add']=0x1]='Add',_0x42e44f[_0x42e44f[_0x25faa0(0x215)]=0x2]=_0x25faa0(0x215),_0x42e44f[_0x42e44f[_0x25faa0(0x216)]=0x3]=_0x25faa0(0x216),_0x42e44f[_0x42e44f['Delete']=0x4]=_0x25faa0(0x236),_0x42e44f[_0x42e44f[_0x25faa0(0x22e)]=0x5]=_0x25faa0(0x22e),_0x42e44f[_0x42e44f[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x42e44f))(v||{});const y=_0x58a32e=>_0x5f5b37(new Date(+_0x58a32e))[_0x25faa0(0x1e0)](_0x25faa0(0x1ed)),B=async(_0x17e8ed,_0x4b6bc6)=>{const _0x4faf91=_0x25faa0,_0x25123a=_0x17e8ed[_0x4faf91(0x1f8)](_0x3f7db5),_0xe17c12=_0x17e8ed[_0x4faf91(0x1f8)](_0x3bbb43);_0x4b6bc6['forEach'](_0x33f45b=>{const _0x42367f=_0x4faf91;_0x25123a[_0x42367f(0x22c)](_0x33f45b)&&_0x4b6bc6[_0x42367f(0x1e5)](_0x33f45b);}),_0x4b6bc6['size']&&(await _0xe17c12['get'](_0x4faf91(0x237),{'params':{'userIDs':[..._0x4b6bc6]}}))['body'][_0x4faf91(0x1e6)][_0x4faf91(0x1e8)](_0xe32af3=>{_0xe32af3&&_0x25123a['addUser'](_0xe32af3);});};var K=Object[_0x25faa0(0x238)],V=(_0xe86f59,_0x4c6ffc,_0x2c840c,_0x1cf7d3)=>{const _0x321d21=_0x25faa0;for(var _0x294a54=_0x1cf7d3>0x1?void 0x0:_0x1cf7d3?K(_0x4c6ffc,_0x2c840c):_0x4c6ffc,_0x5ba2a1=_0xe86f59[_0x321d21(0x203)]-0x1,_0x5511db;_0x5ba2a1>=0x0;_0x5ba2a1--)(_0x5511db=_0xe86f59[_0x5ba2a1])&&(_0x294a54=_0x5511db(_0x294a54)||_0x294a54);return _0x294a54;},p=(_0x3e5f7e,_0x199364)=>(_0x3a7908,_0x2fbc3b)=>_0x199364(_0x3a7908,_0x2fbc3b,_0x3e5f7e);let _=class extends _0x25aa90{constructor(_0x3a14b5,_0x366f0a,_0x2ecc78,_0x5a5439){const _0x3d6cd7=_0x25faa0;super(),this[_0x3d6cd7(0x243)]=_0x3a14b5,this[_0x3d6cd7(0x20e)]=_0x366f0a,this['_userService']=_0x2ecc78,this[_0x3d6cd7(0x22a)]=_0x5a5439,this[_0x3d6cd7(0x1f6)](),this[_0x3d6cd7(0x1f3)]();}[_0x25faa0(0x1f3)](){const _0x4968e3=_0x25faa0;this[_0x4968e3(0x1fb)](this['_threadCommentModel'][_0x4968e3(0x1f2)][_0x4968e3(0x229)](_0x5e308e(0x10))['subscribe'](_0x2ec4b6=>{const _0x564076=_0x4968e3,_0x4bdbca=new Set();_0x2ec4b6[_0x564076(0x1e8)](_0x28b5ac=>{const _0x1320b0=_0x564076;switch(_0x28b5ac[_0x1320b0(0x22b)]){case _0x1320b0(0x23d):{const _0x3f7d51=_0x28b5ac[_0x1320b0(0x219)][_0x1320b0(0x23c)];_0x4bdbca[_0x1320b0(0x23d)](_0x3f7d51);break;}}}),B(this[_0x564076(0x22a)],_0x4bdbca);}));}[_0x25faa0(0x1f6)](){const _0x3be1d6=_0x25faa0;this['disposeWithMe'](this[_0x3be1d6(0x243)][_0x3be1d6(0x1f2)][_0x3be1d6(0x209)](async _0x33ac03=>{const _0x4ed2bc=_0x3be1d6;var _0x4706d3,_0x40a8e1,_0x51b853,_0x28f354;const _0x5ae392=(_0x4706d3=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0x13c896=>_0x13c896[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x4706d3[_0x4ed2bc(0x23b)];if(!_0x5ae392)return;const {unitId:_0x54b011,subUnitId:_0x20a96c}=_0x5ae392;switch(_0x33ac03[_0x4ed2bc(0x212)]&&this[_0x4ed2bc(0x225)]['addUser'](_0x33ac03['user']),_0x33ac03[_0x4ed2bc(0x22b)]){case v[_0x4ed2bc(0x246)]:break;case v[_0x4ed2bc(0x215)]:{this['_threadCommentModel']['addComment'](_0x54b011,_0x20a96c,{'unitId':_0x54b011,'subUnitId':_0x20a96c,'ref':'','id':_0x33ac03[_0x4ed2bc(0x21d)],'dT':y(+_0x33ac03['createTimestamp']),'threadId':_0x33ac03[_0x4ed2bc(0x245)],'personId':(_0x51b853=(_0x40a8e1=_0x33ac03[_0x4ed2bc(0x212)])==null?void 0x0:_0x40a8e1[_0x4ed2bc(0x1f0)])!=null?_0x51b853:_0x33ac03[_0x4ed2bc(0x1de)],'text':JSON['parse'](_0x33ac03['content']),'parentId':_0x5ae392['id']});break;}case v[_0x4ed2bc(0x236)]:{const _0x4f5fdb=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x234)](_0x54b011,_0x20a96c,_0x33ac03['replyId']);_0x4f5fdb&&_0x4f5fdb[_0x4ed2bc(0x1fa)]&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x21e)](_0x54b011,_0x20a96c,_0x33ac03[_0x4ed2bc(0x21d)]);break;}case v['Edit']:{this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x210)](_0x54b011,_0x20a96c,{'commentId':_0x33ac03[_0x4ed2bc(0x21d)],'text':JSON[_0x4ed2bc(0x201)](_0x33ac03[_0x4ed2bc(0x230)])});break;}case v['Solve']:{const _0x40bb85=(_0x28f354=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0xf82527=>_0xf82527[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x28f354[_0x4ed2bc(0x23b)];_0x40bb85&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x213)](_0x54b011,_0x20a96c,_0x40bb85['id'],_0x33ac03['solved']===I[_0x4ed2bc(0x1f4)]);break;}}}));}};_=V([p(0x0,_0xc9741e(_0xa2ebfd)),p(0x1,_0xc9741e(_0x5a9473)),p(0x2,_0xc9741e(_0x3f7db5)),p(0x3,_0xc9741e(_0x54bd73))],_);const z=_0x25faa0(0x221),O={};var k=Object[_0x25faa0(0x238)],Q=(_0x50458b,_0x2cfa27,_0x165052,_0x2cb40f)=>{const _0x561009=_0x25faa0;for(var _0x1ebc4e=_0x2cb40f>0x1?void 0x0:_0x2cb40f?k(_0x2cfa27,_0x165052):_0x2cfa27,_0x1459c9=_0x50458b[_0x561009(0x203)]-0x1,_0x5e1865;_0x1459c9>=0x0;_0x1459c9--)(_0x5e1865=_0x50458b[_0x1459c9])&&(_0x1ebc4e=_0x5e1865(_0x1ebc4e)||_0x1ebc4e);return _0x1ebc4e;},b=(_0x8caf4f,_0x5dcebf)=>(_0x42d5bd,_0x135186)=>_0x5dcebf(_0x42d5bd,_0x135186,_0x8caf4f);function X(_0x1abb62,_0x242971){const _0x4cd15f=_0x25faa0,_0x159188=_0x1abb62[_0x4cd15f(0x208)][0x0];return{..._0x242971,'id':_0x159188[_0x4cd15f(0x21d)],'resolved':_0x1abb62[_0x4cd15f(0x1f7)]===0x1,'dT':y(_0x159188[_0x4cd15f(0x1f5)]),'personId':_0x159188[_0x4cd15f(0x1de)],'threadId':_0x159188[_0x4cd15f(0x245)]};}function ee(_0x9ab101,_0x20675e,_0x219a65){const _0xb1361e=_0x25faa0;var _0xda8d60,_0x1308cf;if(((_0x1308cf=(_0xda8d60=_0x9ab101==null?void 0x0:_0x9ab101[_0xb1361e(0x208)])==null?void 0x0:_0xda8d60['length'])!=null?_0x1308cf:0x0)>0x0){const _0x3d84ab=(_0x5e253c,_0x260acc)=>({'id':_0x5e253c[_0xb1361e(0x21d)],'threadId':_0x5e253c[_0xb1361e(0x245)],'dT':y(_0x5e253c['createTimestamp']),'personId':_0x5e253c['userId'],'resolved':_0x9ab101[_0xb1361e(0x1f7)]===I[_0xb1361e(0x1f4)],'unitId':_0x20675e,'subUnitId':_0x219a65,'text':JSON[_0xb1361e(0x201)](_0x5e253c[_0xb1361e(0x230)]),'parentId':_0x260acc}),_0x516cad=_0x3d84ab(_0x9ab101[_0xb1361e(0x208)][0x0]);return{..._0x516cad,'children':_0x9ab101[_0xb1361e(0x208)][_0xb1361e(0x1fe)](0x1)[_0xb1361e(0x204)](_0x19c60b=>_0x3d84ab(_0x19c60b,_0x516cad['id']))};}return null;}let S=class{constructor(_0x5163d6,_0x1c96ab,_0x54eac6){const _0x1a4021=_0x25faa0;this[_0x1a4021(0x220)]=_0x5163d6,this[_0x1a4021(0x225)]=_0x1c96ab,this['_sessionService']=_0x54eac6;}async[_0x25faa0(0x1df)](_0xb52cc5){const _0x5cbebd=_0x25faa0;var _0x2b7bf9,_0x3a4fa9;const {parentId:_0x2a52a4,unitId:_0x2a5aa8,text:_0x37759b,threadId:_0x3a0471}=_0xb52cc5,_0x2a485a=(_0x3a4fa9=(_0x2b7bf9=_0x37759b[_0x5cbebd(0x23f)])==null?void 0x0:_0x2b7bf9[_0x5cbebd(0x233)](_0x22af43=>_0x22af43[_0x5cbebd(0x1fc)]===_0x2b4870[_0x5cbebd(0x226)])[_0x5cbebd(0x204)](_0x67caea=>_0x67caea[_0x5cbebd(0x207)]))!=null?_0x3a4fa9:[],_0x462f99=JSON[_0x5cbebd(0x23a)](_0x37759b),_0x14b7c0=(await this[_0x5cbebd(0x200)][_0x5cbebd(0x1ea)](_0x2a5aa8))['getMemberID']();if(_0x2a52a4){const _0x5141e0={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a,'threadId':_0x3a0471},_0x3231c2=(await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+_0x5cbebd(0x1ee),{'body':_0x5141e0}))[_0x5cbebd(0x247)][_0x5cbebd(0x217)];return{..._0xb52cc5,'id':_0x3231c2[_0x5cbebd(0x21d)],'dT':_0x5f5b37(+_0x3231c2['createTimestamp'])[_0x5cbebd(0x1e0)](_0x5cbebd(0x1ed)),'personId':_0x3231c2['userId']};}else{const _0x1d36f4={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a},_0x1b2cd8=await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+'/add',{'body':_0x1d36f4});return X(_0x1b2cd8[_0x5cbebd(0x247)][_0x5cbebd(0x242)],_0xb52cc5);}}async[_0x25faa0(0x210)](_0x25c88c){const _0x2e7441=_0x25faa0;var _0x154a7a,_0x5d039e;const {text:_0x35c186,unitId:_0x2a417d}=_0x25c88c,_0x68aa8=(_0x5d039e=(_0x154a7a=_0x35c186[_0x2e7441(0x23f)])==null?void 0x0:_0x154a7a['filter'](_0x19a6bc=>_0x19a6bc[_0x2e7441(0x1fc)]===_0x2b4870[_0x2e7441(0x226)])['map'](_0x562c31=>_0x562c31[_0x2e7441(0x207)]))!=null?_0x5d039e:[],_0x566172=JSON[_0x2e7441(0x23a)](_0x35c186),_0x3651dd=_0x25c88c[_0x2e7441(0x245)],_0x2e4d32=_0x25c88c['id'],_0x3cf0f3={'memberId':(await this[_0x2e7441(0x200)]['requireSession'](_0x2a417d))[_0x2e7441(0x22d)](),'unitId':_0x2a417d,'threadId':_0x3651dd,'mention':_0x68aa8,'content':_0x566172,'replyId':_0x2e4d32},_0x25d94a=await this[_0x2e7441(0x220)][_0x2e7441(0x1f9)](_0x2e7441(0x20a)+_0x2a417d+_0x2e7441(0x1e1),{'body':_0x3cf0f3});return!_0x25d94a[_0x2e7441(0x247)]['error']||_0x25d94a['body'][_0x2e7441(0x1e2)][_0x2e7441(0x214)]===0x1;}async[_0x25faa0(0x213)](_0x2e00fb){const _0x4d500b=_0x25faa0,{unitId:_0xd4084a}=_0x2e00fb,_0x139da7=_0x2e00fb[_0x4d500b(0x245)],_0xf4632={'memberId':this[_0x4d500b(0x225)][_0x4d500b(0x1ef)]()[_0x4d500b(0x1f0)],'unitId':_0xd4084a,'threadId':_0x139da7,'solved':_0x2e00fb[_0x4d500b(0x224)]?I[_0x4d500b(0x1f4)]:I[_0x4d500b(0x1fd)]},_0x4bed30=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd4084a+_0x4d500b(0x21a),{'body':_0xf4632});return!_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]||_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]['code']===0x1;}async[_0x25faa0(0x21e)](_0x4657da,_0x5219b2,_0x3709a2,_0x91b25b){const _0x502ce2=_0x25faa0,_0x134b6d={'memberId':(await this[_0x502ce2(0x200)][_0x502ce2(0x1ea)](_0x4657da))[_0x502ce2(0x22d)](),'threadId':_0x3709a2,'replyId':_0x91b25b,'unitId':_0x4657da},_0x1404d8=await this[_0x502ce2(0x220)][_0x502ce2(0x1f9)](_0x502ce2(0x20a)+_0x4657da+_0x502ce2(0x239),{'body':_0x134b6d});return!_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]||_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]['code']===0x1;}async[_0x25faa0(0x206)](_0x24b97c,_0x2dc250,_0x242496){const _0x38b732=_0x25faa0,_0x41e338={'unitId':_0x24b97c,'threadId':_0x242496},_0x352d02=await this[_0x38b732(0x220)]['post'](_0x38b732(0x20a)+_0x24b97c+_0x38b732(0x211),{'body':_0x41e338}),_0x242e84=_0x242496[_0x38b732(0x204)](_0x564114=>ee(_0x352d02[_0x38b732(0x247)][_0x38b732(0x20f)][_0x564114],_0x24b97c,_0x2dc250))[_0x38b732(0x233)](Boolean);return Object[_0x38b732(0x222)](_0x352d02[_0x38b732(0x247)][_0x38b732(0x1e6)])[_0x38b732(0x1e8)](_0x1013da=>{const _0x136fe6=_0x38b732;this[_0x136fe6(0x225)]['addUser'](_0x1013da);}),_0x242e84;}[_0x25faa0(0x218)](_0x241013){const _0x474e19=_0x25faa0;return{'id':_0x241013['id'],'threadId':_0x241013['threadId'],'ref':_0x241013[_0x474e19(0x1f1)]};}};S=Q([b(0x0,_0xc9741e(_0x3bbb43)),b(0x1,_0xc9741e(_0x3f7db5)),b(0x2,_0xc9741e(_0x6ebfb5))],S);var re=Object[_0x25faa0(0x238)],te=(_0x35be7e,_0x5219d3,_0x59eb15,_0x552ca1)=>{const _0x14fbef=_0x25faa0;for(var _0x5a7101=_0x552ca1>0x1?void 0x0:_0x552ca1?re(_0x5219d3,_0x59eb15):_0x5219d3,_0x486000=_0x35be7e[_0x14fbef(0x203)]-0x1,_0x344a87;_0x486000>=0x0;_0x486000--)(_0x344a87=_0x35be7e[_0x486000])&&(_0x5a7101=_0x344a87(_0x5a7101)||_0x5a7101);return _0x5a7101;},M=(_0x49bb4f,_0x6e02e1)=>(_0x5e1e70,_0x5c86c0)=>_0x6e02e1(_0x5e1e70,_0x5c86c0,_0x49bb4f);let f=class extends _0x25aa90{constructor(_0x54fbfa,_0x5e24da){const _0x119e83=_0x25faa0;super(),this[_0x119e83(0x228)]=_0x54fbfa,this['_threadCommentDataSource']=_0x5e24da,this[_0x119e83(0x21f)]();}[_0x25faa0(0x21f)](){const _0x38512b=_0x25faa0;this[_0x38512b(0x228)][_0x38512b(0x240)]=this['_threadCommentDataSource'],this[_0x38512b(0x228)][_0x38512b(0x20c)]=!0x1;}};f=te([M(0x0,_0x18a375),M(0x1,_0xc9741e(S))],f);var se=Object[_0x25faa0(0x1eb)],oe=Object[_0x25faa0(0x238)],ne=(_0x2f075d,_0x407807,_0x5bdfad)=>_0x407807 in _0x2f075d?se(_0x2f075d,_0x407807,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdfad}):_0x2f075d[_0x407807]=_0x5bdfad,ie=(_0x5425e8,_0x43c3fc,_0x473feb,_0x289190)=>{for(var _0x21f9a4=_0x289190>0x1?void 0x0:_0x289190?oe(_0x43c3fc,_0x473feb):_0x43c3fc,_0x5caa96=_0x5425e8['length']-0x1,_0x2f59b6;_0x5caa96>=0x0;_0x5caa96--)(_0x2f59b6=_0x5425e8[_0x5caa96])&&(_0x21f9a4=_0x2f59b6(_0x21f9a4)||_0x21f9a4);return _0x21f9a4;},N=(_0x288a79,_0xea4ffc)=>(_0x1e91e2,_0x3d09ec)=>_0xea4ffc(_0x1e91e2,_0x3d09ec,_0x288a79),$=(_0x57b778,_0x3c5bce,_0x418876)=>ne(_0x57b778,typeof _0x3c5bce!=_0x25faa0(0x21b)?_0x3c5bce+'':_0x3c5bce,_0x418876);let g=class extends _0x542bcc{constructor(_0x7c60fc=O,_0x1077ab,_0x34158d){const _0x414784=_0x25faa0;super(),this['_config']=_0x7c60fc,this[_0x414784(0x22a)]=_0x1077ab,this[_0x414784(0x1e3)]=_0x34158d;const {..._0x5d39e9}=_0x7d8ac9({},O,this[_0x414784(0x244)]);this[_0x414784(0x1e3)][_0x414784(0x24a)](z,_0x5d39e9);}[_0x25faa0(0x205)](){[[S],[f],[_]]['forEach'](_0x4e1af1=>{this['_injector']['add'](_0x4e1af1);});}['onReady'](){const _0x4b9be4=_0x25faa0;this[_0x4b9be4(0x22a)]['get'](f),this[_0x4b9be4(0x22a)][_0x4b9be4(0x1f8)](_);}};$(g,_0x25faa0(0x1e9),W),$(g,'type',_0x4e65bc[_0x25faa0(0x1ff)]),g=ie([_0x125195(_0x2d4016,_0x4d0826,_0x6f90f6),N(0x1,_0xc9741e(_0x54bd73)),N(0x2,_0x4521b1)],g);function _0x34aa(){const _0x106170=['/universer-api/comment/unit/','10330120zRyNlM','syncUpdateMutationToColla','find','_threadCommentModel','comments','updateComment','/list','user','resolveComment','code','Reply','Edit','reply','saveCommentToSnapshot','payload','/solved','symbol','36FfdlLu','replyId','deleteComment','_initDataSource','_httpService','thread-comment-data-source.config','values','848622irycZg','resolved','_userService','COMMENT','Unknown','_threadCommentDataSourceService','pipe','_injector','type','getUser','getMemberID','Solve','241950cRwsKf','content','getUnit','234380oiXcum','filter','getComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','/universer-api/user/list','getOwnPropertyDescriptor','/delete','stringify','root','personId','add','10771263tWvpGA','customRanges','dataSource','UNRECOGNIZED','comment','_commentService','_config','threadId','Add','body','7vUjGug','27992800iMJhhj','setConfig','userId','addComment','format','/edit','error','_configService','unitId','delete','users','778711NYDhET','forEach','pluginName','requireSession','defineProperty','8ZTkmMd','YYYY/MM/DD\x20HH:mm','/reply','getCurrentUser','userID','ref','commentUpdate$','_initUserSync','Solved','createTimestamp','_init','solved','get','post','parentId','disposeWithMe','rangeType','OpenOrReOpen','slice','UNIVER_UNKNOWN','_sessionService','parse','18dcFmTs','length','map','onStarting','listComments','rangeId','replies','subscribe'];_0x34aa=function(){return _0x106170;};return _0x34aa();}export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xfce04a=_0x44da;(function(_0x5eb61f,_0xb4aefa){const _0x12c3b8=_0x44da,_0xd0860b=_0x5eb61f();while(!![]){try{const _0x3efb4d=-parseInt(_0x12c3b8(0x108))/0x1+parseInt(_0x12c3b8(0x121))/0x2*(-parseInt(_0x12c3b8(0xf3))/0x3)+parseInt(_0x12c3b8(0x12a))/0x4*(-parseInt(_0x12c3b8(0x13d))/0x5)+-parseInt(_0x12c3b8(0x137))/0x6+-parseInt(_0x12c3b8(0xe6))/0x7*(parseInt(_0x12c3b8(0xe9))/0x8)+-parseInt(_0x12c3b8(0xf5))/0x9*(parseInt(_0x12c3b8(0x144))/0xa)+parseInt(_0x12c3b8(0xfd))/0xb;if(_0x3efb4d===_0xb4aefa)break;else _0xd0860b['push'](_0xd0860b['shift']());}catch(_0x499787){_0xd0860b['push'](_0xd0860b['shift']());}}}(_0x2561,0xdd1ea));import{CommentService as _0x1a73fd,CollaborationSessionService as _0x25d635,UniverCollaborationClientPlugin as _0x394080}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fff8}from'@univerjs-pro/license';function _0x44da(_0x4894c3,_0x599ff1){const _0x2561f6=_0x2561();return _0x44da=function(_0x44da48,_0x436ad0){_0x44da48=_0x44da48-0xe3;let _0x5a8a9a=_0x2561f6[_0x44da48];return _0x5a8a9a;},_0x44da(_0x4894c3,_0x599ff1);}import{dayjs as _0x310155,UserManagerService as _0x45e780,Inject as _0x4f3041,Injector as _0x469122,Disposable as _0x5b77e0,CustomRangeType as _0x5bad6a,UniverInstanceType as _0xe3d688,DependentOn as _0x1e1d9f,IConfigService as _0x41d53f,Plugin as _0x136f78,merge as _0x4dae59}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ca99e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25e01c,IThreadCommentDataSourceService as _0x531f6f}from'@univerjs/thread-comment';import{bufferTime as _0x43b0ed}from'rxjs';import{HTTPService as _0xb56acb}from'@univerjs/network';const W=_0xfce04a(0x12c);var I=(_0x34b9a3=>(_0x34b9a3[_0x34b9a3[_0xfce04a(0x141)]=0x0]='OpenOrReOpen',_0x34b9a3[_0x34b9a3[_0xfce04a(0x13a)]=0x1]=_0xfce04a(0x13a),_0x34b9a3[_0x34b9a3[_0xfce04a(0x136)]=-0x1]='UNRECOGNIZED',_0x34b9a3))(I||{}),v=(_0x51a35e=>(_0x51a35e[_0x51a35e[_0xfce04a(0x140)]=0x0]=_0xfce04a(0x140),_0x51a35e[_0x51a35e[_0xfce04a(0xf1)]=0x1]=_0xfce04a(0xf1),_0x51a35e[_0x51a35e[_0xfce04a(0x135)]=0x2]=_0xfce04a(0x135),_0x51a35e[_0x51a35e['Edit']=0x3]=_0xfce04a(0x109),_0x51a35e[_0x51a35e[_0xfce04a(0x142)]=0x4]=_0xfce04a(0x142),_0x51a35e[_0x51a35e[_0xfce04a(0x11b)]=0x5]=_0xfce04a(0x11b),_0x51a35e[_0x51a35e[_0xfce04a(0x136)]=-0x1]=_0xfce04a(0x136),_0x51a35e))(v||{});const y=_0x5a0b4a=>_0x310155(new Date(+_0x5a0b4a))['format'](_0xfce04a(0xe7)),B=async(_0x1efee0,_0xcf15e)=>{const _0x15e55c=_0xfce04a,_0x56e63b=_0x1efee0['get'](_0x45e780),_0x500652=_0x1efee0['get'](_0xb56acb);_0xcf15e[_0x15e55c(0x115)](_0x5d614d=>{_0x56e63b['getUser'](_0x5d614d)&&_0xcf15e['delete'](_0x5d614d);}),_0xcf15e[_0x15e55c(0xeb)]&&(await _0x500652[_0x15e55c(0x123)]('/universer-api/user/list',{'params':{'userIDs':[..._0xcf15e]}}))['body'][_0x15e55c(0xf0)][_0x15e55c(0x115)](_0x2e7cc9=>{const _0x348e5a=_0x15e55c;_0x2e7cc9&&_0x56e63b[_0x348e5a(0x13e)](_0x2e7cc9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5d78c8,_0x3e640a,_0x1c5602,_0x1be3de)=>{const _0x49826b=_0xfce04a;for(var _0x293aea=_0x1be3de>0x1?void 0x0:_0x1be3de?K(_0x3e640a,_0x1c5602):_0x3e640a,_0x525357=_0x5d78c8[_0x49826b(0x10c)]-0x1,_0x187481;_0x525357>=0x0;_0x525357--)(_0x187481=_0x5d78c8[_0x525357])&&(_0x293aea=_0x187481(_0x293aea)||_0x293aea);return _0x293aea;},p=(_0x2db76a,_0x3e55da)=>(_0x2dd75a,_0x2d90e5)=>_0x3e55da(_0x2dd75a,_0x2d90e5,_0x2db76a);let _=class extends _0x5b77e0{constructor(_0x3259a6,_0xaad8a7,_0x2d9d87,_0x4f7122){const _0xf2ad53=_0xfce04a;super(),this[_0xf2ad53(0x127)]=_0x3259a6,this[_0xf2ad53(0x13b)]=_0xaad8a7,this[_0xf2ad53(0x129)]=_0x2d9d87,this['_injector']=_0x4f7122,this['_init'](),this[_0xf2ad53(0xec)]();}['_initUserSync'](){const _0x596faa=_0xfce04a;this[_0x596faa(0xf8)](this[_0x596faa(0x13b)][_0x596faa(0x119)][_0x596faa(0x11e)](_0x43b0ed(0x10))[_0x596faa(0x10f)](_0x44652c=>{const _0x496fe8=_0x596faa,_0x1a5253=new Set();_0x44652c[_0x496fe8(0x115)](_0x3f16a5=>{const _0xda20b7=_0x496fe8;switch(_0x3f16a5[_0xda20b7(0xf2)]){case _0xda20b7(0xf4):{const _0x5e2be9=_0x3f16a5['payload']['personId'];_0x1a5253['add'](_0x5e2be9);break;}}}),B(this[_0x496fe8(0x102)],_0x1a5253);}));}[_0xfce04a(0x12d)](){const _0x401292=_0xfce04a;this[_0x401292(0xf8)](this[_0x401292(0x127)][_0x401292(0x119)]['subscribe'](async _0x1e8622=>{const _0x50b91e=_0x401292;var _0x30e0a3,_0x319517,_0x4ae273,_0x43fb3d;const _0x4e5315=(_0x30e0a3=this['_threadCommentModel']['getUnit'](_0x1e8622['unitId'])[_0x50b91e(0x145)](_0x3e846b=>_0x3e846b[_0x50b91e(0x10e)]===_0x1e8622[_0x50b91e(0x10e)]))==null?void 0x0:_0x30e0a3[_0x50b91e(0x12f)];if(!_0x4e5315)return;const {unitId:_0x2f393e,subUnitId:_0xe63792}=_0x4e5315;switch(_0x1e8622['user']&&this[_0x50b91e(0x129)][_0x50b91e(0x13e)](_0x1e8622[_0x50b91e(0x12b)]),_0x1e8622[_0x50b91e(0xf2)]){case v[_0x50b91e(0xf1)]:break;case v[_0x50b91e(0x135)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x148)](_0x2f393e,_0xe63792,{'unitId':_0x2f393e,'subUnitId':_0xe63792,'ref':'','id':_0x1e8622[_0x50b91e(0x12e)],'dT':y(+_0x1e8622[_0x50b91e(0x13f)]),'threadId':_0x1e8622[_0x50b91e(0x10e)],'personId':(_0x4ae273=(_0x319517=_0x1e8622['user'])==null?void 0x0:_0x319517['userID'])!=null?_0x4ae273:_0x1e8622[_0x50b91e(0x146)],'text':JSON['parse'](_0x1e8622[_0x50b91e(0x10d)]),'parentId':_0x4e5315['id']});break;}case v[_0x50b91e(0x142)]:{const _0x3b5945=this[_0x50b91e(0x13b)][_0x50b91e(0x11c)](_0x2f393e,_0xe63792,_0x1e8622[_0x50b91e(0x12e)]);_0x3b5945&&_0x3b5945[_0x50b91e(0x11f)]&&this[_0x50b91e(0x13b)][_0x50b91e(0x11a)](_0x2f393e,_0xe63792,_0x1e8622['replyId']);break;}case v[_0x50b91e(0x109)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x124)](_0x2f393e,_0xe63792,{'commentId':_0x1e8622['replyId'],'text':JSON['parse'](_0x1e8622['content'])});break;}case v['Solve']:{const _0x21962a=(_0x43fb3d=this[_0x50b91e(0x13b)][_0x50b91e(0x13c)](_0x1e8622[_0x50b91e(0x101)])[_0x50b91e(0x145)](_0x5058f1=>_0x5058f1[_0x50b91e(0x10e)]===_0x1e8622['threadId']))==null?void 0x0:_0x43fb3d[_0x50b91e(0x12f)];_0x21962a&&this[_0x50b91e(0x13b)][_0x50b91e(0x120)](_0x2f393e,_0xe63792,_0x21962a['id'],_0x1e8622[_0x50b91e(0xee)]===I[_0x50b91e(0x13a)]);break;}}}));}};_=V([p(0x0,_0x4f3041(_0x1a73fd)),p(0x1,_0x4f3041(_0x25e01c)),p(0x2,_0x4f3041(_0x45e780)),p(0x3,_0x4f3041(_0x469122))],_);const z=_0xfce04a(0x104),O={};var k=Object[_0xfce04a(0x10b)],Q=(_0x43f854,_0x52f480,_0x19696c,_0x54c902)=>{const _0x105099=_0xfce04a;for(var _0x8336ad=_0x54c902>0x1?void 0x0:_0x54c902?k(_0x52f480,_0x19696c):_0x52f480,_0x2a4917=_0x43f854[_0x105099(0x10c)]-0x1,_0x39def6;_0x2a4917>=0x0;_0x2a4917--)(_0x39def6=_0x43f854[_0x2a4917])&&(_0x8336ad=_0x39def6(_0x8336ad)||_0x8336ad);return _0x8336ad;},b=(_0x4a7c78,_0x3fc807)=>(_0x35db81,_0x36105d)=>_0x3fc807(_0x35db81,_0x36105d,_0x4a7c78);function X(_0x1e1a4f,_0x3a2f0a){const _0x54ba00=_0xfce04a,_0x3c0f65=_0x1e1a4f[_0x54ba00(0x10a)][0x0];return{..._0x3a2f0a,'id':_0x3c0f65[_0x54ba00(0x12e)],'resolved':_0x1e1a4f[_0x54ba00(0xee)]===0x1,'dT':y(_0x3c0f65[_0x54ba00(0x13f)]),'personId':_0x3c0f65[_0x54ba00(0x146)],'threadId':_0x3c0f65[_0x54ba00(0x10e)]};}function ee(_0x176ed9,_0x515e79,_0x19e687){const _0x16633e=_0xfce04a;var _0x1f3c92,_0x3eb2e1;if(((_0x3eb2e1=(_0x1f3c92=_0x176ed9==null?void 0x0:_0x176ed9[_0x16633e(0x10a)])==null?void 0x0:_0x1f3c92[_0x16633e(0x10c)])!=null?_0x3eb2e1:0x0)>0x0){const _0x57ac3c=(_0x1d0bb8,_0x2f5028)=>({'id':_0x1d0bb8['replyId'],'threadId':_0x1d0bb8[_0x16633e(0x10e)],'dT':y(_0x1d0bb8[_0x16633e(0x13f)]),'personId':_0x1d0bb8[_0x16633e(0x146)],'resolved':_0x176ed9[_0x16633e(0xee)]===I[_0x16633e(0x13a)],'unitId':_0x515e79,'subUnitId':_0x19e687,'text':JSON['parse'](_0x1d0bb8[_0x16633e(0x10d)]),'parentId':_0x2f5028}),_0x121b9d=_0x57ac3c(_0x176ed9[_0x16633e(0x10a)][0x0]);return{..._0x121b9d,'children':_0x176ed9['replies']['slice'](0x1)['map'](_0x4c4fcb=>_0x57ac3c(_0x4c4fcb,_0x121b9d['id']))};}return null;}let S=class{constructor(_0x47bfcc,_0x2e7e3a,_0x47c544){const _0xd59b18=_0xfce04a;this[_0xd59b18(0xe8)]=_0x47bfcc,this[_0xd59b18(0x129)]=_0x2e7e3a,this[_0xd59b18(0xe3)]=_0x47c544;}async[_0xfce04a(0x148)](_0x3ac375){const _0x4eef5a=_0xfce04a;var _0x7db16e,_0x1b66df;const {parentId:_0x4dc1df,unitId:_0x3b03f0,text:_0x376c0e,threadId:_0x401386}=_0x3ac375,_0x29a784=(_0x1b66df=(_0x7db16e=_0x376c0e['customRanges'])==null?void 0x0:_0x7db16e[_0x4eef5a(0x113)](_0x344bf5=>_0x344bf5[_0x4eef5a(0x134)]===_0x5bad6a[_0x4eef5a(0x118)])[_0x4eef5a(0xea)](_0x4c3701=>_0x4c3701[_0x4eef5a(0xfb)]))!=null?_0x1b66df:[],_0x4bedb7=JSON[_0x4eef5a(0xe5)](_0x376c0e),_0x11b06c=(await this['_sessionService'][_0x4eef5a(0x139)](_0x3b03f0))[_0x4eef5a(0x125)]();if(_0x4dc1df){const _0x343405={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784,'threadId':_0x401386},_0x2c51ea=(await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xfa),{'body':_0x343405}))[_0x4eef5a(0x130)][_0x4eef5a(0x133)];return{..._0x3ac375,'id':_0x2c51ea[_0x4eef5a(0x12e)],'dT':_0x310155(+_0x2c51ea[_0x4eef5a(0x13f)])[_0x4eef5a(0x111)](_0x4eef5a(0xe7)),'personId':_0x2c51ea[_0x4eef5a(0x146)]};}else{const _0x11a7f8={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784},_0x58767b=await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xe4),{'body':_0x11a7f8});return X(_0x58767b[_0x4eef5a(0x130)][_0x4eef5a(0x114)],_0x3ac375);}}async['updateComment'](_0x24ff34){const _0x12fd98=_0xfce04a;var _0x5689b6,_0x262679;const {text:_0x408f33,unitId:_0x2e9f92}=_0x24ff34,_0x171db3=(_0x262679=(_0x5689b6=_0x408f33['customRanges'])==null?void 0x0:_0x5689b6['filter'](_0x238e9d=>_0x238e9d[_0x12fd98(0x134)]===_0x5bad6a[_0x12fd98(0x118)])['map'](_0x2667ef=>_0x2667ef[_0x12fd98(0xfb)]))!=null?_0x262679:[],_0x1a3948=JSON[_0x12fd98(0xe5)](_0x408f33),_0x3ac0ac=_0x24ff34['threadId'],_0x344e76=_0x24ff34['id'],_0x29066b={'memberId':(await this['_sessionService']['requireSession'](_0x2e9f92))[_0x12fd98(0x125)](),'unitId':_0x2e9f92,'threadId':_0x3ac0ac,'mention':_0x171db3,'content':_0x1a3948,'replyId':_0x344e76},_0x436b50=await this[_0x12fd98(0xe8)][_0x12fd98(0x106)](_0x12fd98(0xf9)+_0x2e9f92+_0x12fd98(0xff),{'body':_0x29066b});return!_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]||_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]['code']===0x1;}async['resolveComment'](_0x17cd0c){const _0x438939=_0xfce04a,{unitId:_0x5cc292}=_0x17cd0c,_0x40f8f8=_0x17cd0c[_0x438939(0x10e)],_0x199d53={'memberId':this[_0x438939(0x129)][_0x438939(0x126)]()[_0x438939(0x103)],'unitId':_0x5cc292,'threadId':_0x40f8f8,'solved':_0x17cd0c[_0x438939(0x132)]?I['Solved']:I[_0x438939(0x141)]},_0x5c1059=await this[_0x438939(0xe8)][_0x438939(0x106)]('/universer-api/comment/unit/'+_0x5cc292+_0x438939(0x110),{'body':_0x199d53});return!_0x5c1059[_0x438939(0x130)][_0x438939(0xed)]||_0x5c1059['body']['error']['code']===0x1;}async[_0xfce04a(0x11a)](_0x25400c,_0x2305ac,_0x53de3f,_0x467589){const _0x109957=_0xfce04a,_0xabcd3c={'memberId':(await this[_0x109957(0xe3)][_0x109957(0x139)](_0x25400c))[_0x109957(0x125)](),'threadId':_0x53de3f,'replyId':_0x467589,'unitId':_0x25400c},_0x3d842c=await this[_0x109957(0xe8)][_0x109957(0x106)](_0x109957(0xf9)+_0x25400c+_0x109957(0x112),{'body':_0xabcd3c});return!_0x3d842c[_0x109957(0x130)][_0x109957(0xed)]||_0x3d842c['body'][_0x109957(0xed)][_0x109957(0x122)]===0x1;}async[_0xfce04a(0x116)](_0x558cf9,_0x54c594,_0x14512d){const _0xa3d2ee=_0xfce04a,_0x46344b={'unitId':_0x558cf9,'threadId':_0x14512d},_0x1a902d=await this[_0xa3d2ee(0xe8)][_0xa3d2ee(0x106)](_0xa3d2ee(0xf9)+_0x558cf9+'/list',{'body':_0x46344b}),_0x174c1d=_0x14512d[_0xa3d2ee(0xea)](_0x1b05f7=>ee(_0x1a902d['body'][_0xa3d2ee(0x131)][_0x1b05f7],_0x558cf9,_0x54c594))[_0xa3d2ee(0x113)](Boolean);return Object['values'](_0x1a902d[_0xa3d2ee(0x130)][_0xa3d2ee(0xf0)])[_0xa3d2ee(0x115)](_0x1130c1=>{const _0x133ece=_0xa3d2ee;this[_0x133ece(0x129)][_0x133ece(0x13e)](_0x1130c1);}),_0x174c1d;}[_0xfce04a(0x107)](_0x34e21e){const _0x7a85f=_0xfce04a;return{'id':_0x34e21e['id'],'threadId':_0x34e21e[_0x7a85f(0x10e)],'ref':_0x34e21e['ref']};}};S=Q([b(0x0,_0x4f3041(_0xb56acb)),b(0x1,_0x4f3041(_0x45e780)),b(0x2,_0x4f3041(_0x25d635))],S);var re=Object[_0xfce04a(0x10b)],te=(_0x1c7f8d,_0x42264b,_0x350777,_0x2e4869)=>{for(var _0x5cdc33=_0x2e4869>0x1?void 0x0:_0x2e4869?re(_0x42264b,_0x350777):_0x42264b,_0x1a278c=_0x1c7f8d['length']-0x1,_0x8b9ed7;_0x1a278c>=0x0;_0x1a278c--)(_0x8b9ed7=_0x1c7f8d[_0x1a278c])&&(_0x5cdc33=_0x8b9ed7(_0x5cdc33)||_0x5cdc33);return _0x5cdc33;},M=(_0x13e3b8,_0x36edb2)=>(_0xe13d49,_0x10222c)=>_0x36edb2(_0xe13d49,_0x10222c,_0x13e3b8);let f=class extends _0x5b77e0{constructor(_0x592708,_0x356a42){const _0x1879e5=_0xfce04a;super(),this[_0x1879e5(0xf7)]=_0x592708,this['_threadCommentDataSource']=_0x356a42,this[_0x1879e5(0x128)]();}[_0xfce04a(0x128)](){const _0xad93d5=_0xfce04a;this[_0xad93d5(0xf7)][_0xad93d5(0xef)]=this[_0xad93d5(0x11d)],this[_0xad93d5(0xf7)][_0xad93d5(0xf6)]=!0x1;}};f=te([M(0x0,_0x531f6f),M(0x1,_0x4f3041(S))],f);var se=Object[_0xfce04a(0x143)],oe=Object[_0xfce04a(0x10b)],ne=(_0x593f4b,_0x4d9402,_0xc1a9c5)=>_0x4d9402 in _0x593f4b?se(_0x593f4b,_0x4d9402,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc1a9c5}):_0x593f4b[_0x4d9402]=_0xc1a9c5,ie=(_0x432568,_0x379bde,_0x4cd714,_0x39df3)=>{const _0x3ff5ea=_0xfce04a;for(var _0x21585e=_0x39df3>0x1?void 0x0:_0x39df3?oe(_0x379bde,_0x4cd714):_0x379bde,_0x3d4ac9=_0x432568[_0x3ff5ea(0x10c)]-0x1,_0x266903;_0x3d4ac9>=0x0;_0x3d4ac9--)(_0x266903=_0x432568[_0x3d4ac9])&&(_0x21585e=_0x266903(_0x21585e)||_0x21585e);return _0x21585e;},N=(_0x4e479d,_0x5c4729)=>(_0x187777,_0x12412f)=>_0x5c4729(_0x187777,_0x12412f,_0x4e479d),$=(_0x26c7de,_0x197688,_0x34228a)=>ne(_0x26c7de,typeof _0x197688!=_0xfce04a(0xfe)?_0x197688+'':_0x197688,_0x34228a);function _0x2561(){const _0x3f4ba6=['filter','comment','forEach','listComments','pluginName','COMMENT','commentUpdate$','deleteComment','Solve','getComment','_threadCommentDataSource','pipe','parentId','resolveComment','965348zKaUjl','code','get','updateComment','getMemberID','getCurrentUser','_commentService','_initDataSource','_userService','4oteoTq','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','replyId','root','body','comments','resolved','reply','rangeType','Reply','UNRECOGNIZED','7376622OZvKwv','setConfig','requireSession','Solved','_threadCommentModel','getUnit','1430215EjBWlI','addUser','createTimestamp','Unknown','OpenOrReOpen','Delete','defineProperty','10BjApbN','find','userId','onStarting','addComment','_sessionService','/add','stringify','7njZvMo','YYYY/MM/DD\x20HH:mm','_httpService','11323960zsCFin','map','size','_initUserSync','error','solved','dataSource','users','Add','type','3KFeIhe','add','15509007qJHcMb','syncUpdateMutationToColla','_threadCommentDataSourceService','disposeWithMe','/universer-api/comment/unit/','/reply','rangeId','_configService','75079433KqMMMf','symbol','/edit','_config','unitId','_injector','userID','thread-comment-data-source.config','onReady','post','saveCommentToSnapshot','782825qScoOv','Edit','replies','getOwnPropertyDescriptor','length','content','threadId','subscribe','/solved','format','/delete'];_0x2561=function(){return _0x3f4ba6;};return _0x2561();}let g=class extends _0x136f78{constructor(_0x1d60af=O,_0x8433a8,_0x5ca261){const _0x3c2235=_0xfce04a;super(),this[_0x3c2235(0x100)]=_0x1d60af,this[_0x3c2235(0x102)]=_0x8433a8,this[_0x3c2235(0xfc)]=_0x5ca261;const {..._0x197bc4}=_0x4dae59({},O,this[_0x3c2235(0x100)]);this['_configService'][_0x3c2235(0x138)](z,_0x197bc4);}[_0xfce04a(0x147)](){[[S],[f],[_]]['forEach'](_0x51e02=>{const _0x10d7b1=_0x44da;this[_0x10d7b1(0x102)][_0x10d7b1(0xf4)](_0x51e02);});}[_0xfce04a(0x105)](){const _0x20b7f1=_0xfce04a;this[_0x20b7f1(0x102)]['get'](f),this['_injector']['get'](_);}};$(g,_0xfce04a(0x117),W),$(g,_0xfce04a(0xf2),_0xe3d688['UNIVER_UNKNOWN']),g=ie([_0x1e1d9f(_0x5ca99e,_0x394080,_0x50fff8),N(0x1,_0x4f3041(_0x469122)),N(0x2,_0x41d53f)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x96eb(_0x49654c,_0x43fa56){const _0x4bda23=_0x4bda();return _0x96eb=function(_0x96ebb8,_0xb274af){_0x96ebb8=_0x96ebb8-0xc4;let _0x32fbaa=_0x4bda23[_0x96ebb8];return _0x32fbaa;},_0x96eb(_0x49654c,_0x43fa56);}(function(_0x329836,_0x469880){const _0x39aa07=_0x96eb,_0x5b32ad=_0x329836();while(!![]){try{const _0x10e229=parseInt(_0x39aa07(0x147))/0x1*(-parseInt(_0x39aa07(0xde))/0x2)+parseInt(_0x39aa07(0x10d))/0x3*(-parseInt(_0x39aa07(0xfc))/0x4)+parseInt(_0x39aa07(0x149))/0x5*(parseInt(_0x39aa07(0x13d))/0x6)+parseInt(_0x39aa07(0x112))/0x7*(-parseInt(_0x39aa07(0xe4))/0x8)+parseInt(_0x39aa07(0x116))/0x9*(-parseInt(_0x39aa07(0x12e))/0xa)+parseInt(_0x39aa07(0x13c))/0xb*(parseInt(_0x39aa07(0xfd))/0xc)+parseInt(_0x39aa07(0x114))/0xd;if(_0x10e229===_0x469880)break;else _0x5b32ad['push'](_0x5b32ad['shift']());}catch(_0x455e17){_0x5b32ad['push'](_0x5b32ad['shift']());}}}(_0x4bda,0x80c0f),function(_0x183ca1,_0x5605ba){const _0x240a1e=_0x96eb;typeof exports==_0x240a1e(0xd3)&&typeof module<'u'?_0x5605ba(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x240a1e(0x109)]?define([_0x240a1e(0x148),_0x240a1e(0xcb),_0x240a1e(0x12a),'@univerjs/core',_0x240a1e(0x10b),_0x240a1e(0xe7),'rxjs',_0x240a1e(0xd4)],_0x5605ba):(_0x183ca1=typeof globalThis<'u'?globalThis:_0x183ca1||self,_0x5605ba(_0x183ca1[_0x240a1e(0x11a)]={},_0x183ca1[_0x240a1e(0xe1)],_0x183ca1[_0x240a1e(0x131)],_0x183ca1[_0x240a1e(0xf8)],_0x183ca1[_0x240a1e(0x10f)],_0x183ca1[_0x240a1e(0x12b)],_0x183ca1[_0x240a1e(0xe3)],_0x183ca1['UniverNetwork']));}(this,function(_0x43a127,_0x22aec6,_0x5392ce,_0x339162,_0xd7cca9,_0x4f90b6,_0x5b0053,_0x24ec67){'use strict';const _0x517094=_0x96eb;const _0x310541=_0x517094(0xd6);var _0x33b650=(_0x5eefde=>(_0x5eefde[_0x5eefde[_0x517094(0x106)]=0x0]=_0x517094(0x106),_0x5eefde[_0x5eefde['Solved']=0x1]=_0x517094(0xfa),_0x5eefde[_0x5eefde[_0x517094(0x123)]=-0x1]=_0x517094(0x123),_0x5eefde))(_0x33b650||{}),_0x1d3786=(_0x206741=>(_0x206741[_0x206741[_0x517094(0xf5)]=0x0]=_0x517094(0xf5),_0x206741[_0x206741[_0x517094(0xe2)]=0x1]='Add',_0x206741[_0x206741[_0x517094(0x108)]=0x2]=_0x517094(0x108),_0x206741[_0x206741[_0x517094(0x10c)]=0x3]='Edit',_0x206741[_0x206741[_0x517094(0x140)]=0x4]=_0x517094(0x140),_0x206741[_0x206741[_0x517094(0x137)]=0x5]=_0x517094(0x137),_0x206741[_0x206741[_0x517094(0x123)]=-0x1]=_0x517094(0x123),_0x206741))(_0x1d3786||{});const _0xb22aaa=_0x1ee189=>_0x339162[_0x517094(0xdd)](new Date(+_0x1ee189))[_0x517094(0xdb)](_0x517094(0x12f)),_0x305acc=async(_0x33d787,_0x3903d3)=>{const _0x2522cc=_0x517094,_0x53704a=_0x33d787[_0x2522cc(0x132)](_0x339162[_0x2522cc(0x113)]),_0x54e8ca=_0x33d787[_0x2522cc(0x132)](_0x24ec67[_0x2522cc(0xe8)]);_0x3903d3[_0x2522cc(0xd8)](_0x38e3f2=>{const _0x3a8c96=_0x2522cc;_0x53704a[_0x3a8c96(0x102)](_0x38e3f2)&&_0x3903d3[_0x3a8c96(0x115)](_0x38e3f2);}),_0x3903d3[_0x2522cc(0xf7)]&&(await _0x54e8ca['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3903d3]}}))[_0x2522cc(0x144)][_0x2522cc(0x13a)][_0x2522cc(0xd8)](_0x4da101=>{const _0x2463a6=_0x2522cc;_0x4da101&&_0x53704a[_0x2463a6(0xf4)](_0x4da101);});};var _0x5f4cd3=Object[_0x517094(0xda)],_0x34ba7e=(_0x144819,_0x388a83,_0x2e758e,_0x1cee1e)=>{for(var _0x24bd5f=_0x1cee1e>0x1?void 0x0:_0x1cee1e?_0x5f4cd3(_0x388a83,_0x2e758e):_0x388a83,_0xd86d55=_0x144819['length']-0x1,_0x1d1cab;_0xd86d55>=0x0;_0xd86d55--)(_0x1d1cab=_0x144819[_0xd86d55])&&(_0x24bd5f=_0x1d1cab(_0x24bd5f)||_0x24bd5f);return _0x24bd5f;},_0x44b08a=(_0x386fca,_0x9015fd)=>(_0x270943,_0x3dd393)=>_0x9015fd(_0x270943,_0x3dd393,_0x386fca);let _0x1078ee=class extends _0x339162[_0x517094(0xf6)]{constructor(_0x16f25f,_0x44d592,_0x47eb77,_0x184e2c){const _0xdf17b9=_0x517094;super(),this[_0xdf17b9(0x145)]=_0x16f25f,this[_0xdf17b9(0x11e)]=_0x44d592,this['_userService']=_0x47eb77,this[_0xdf17b9(0xce)]=_0x184e2c,this[_0xdf17b9(0x110)](),this[_0xdf17b9(0x136)]();}['_initUserSync'](){const _0x456f7e=_0x517094;this['disposeWithMe'](this[_0x456f7e(0x11e)][_0x456f7e(0x107)][_0x456f7e(0x135)](_0x5b0053['bufferTime'](0x10))['subscribe'](_0x1185a2=>{const _0x57ec5c=_0x456f7e,_0x9af9b1=new Set();_0x1185a2[_0x57ec5c(0xd8)](_0x4684fd=>{const _0x2f93b7=_0x57ec5c;switch(_0x4684fd[_0x2f93b7(0x143)]){case _0x2f93b7(0x141):{const _0x1b17b8=_0x4684fd['payload'][_0x2f93b7(0xf2)];_0x9af9b1[_0x2f93b7(0x141)](_0x1b17b8);break;}}}),_0x305acc(this[_0x57ec5c(0xce)],_0x9af9b1);}));}[_0x517094(0x110)](){const _0x869240=_0x517094;this[_0x869240(0xcc)](this[_0x869240(0x145)][_0x869240(0x107)][_0x869240(0xf0)](async _0x53c024=>{const _0x311dcf=_0x869240;var _0x39861d,_0x1ebb01,_0x1a2185,_0x358fba;const _0x1f9a91=(_0x39861d=this['_threadCommentModel'][_0x311dcf(0xd0)](_0x53c024['unitId'])[_0x311dcf(0x129)](_0x40907d=>_0x40907d[_0x311dcf(0xe6)]===_0x53c024['threadId']))==null?void 0x0:_0x39861d[_0x311dcf(0xdf)];if(!_0x1f9a91)return;const {unitId:_0x330fc6,subUnitId:_0x106ecc}=_0x1f9a91;switch(_0x53c024[_0x311dcf(0xe5)]&&this[_0x311dcf(0x11f)]['addUser'](_0x53c024['user']),_0x53c024[_0x311dcf(0x143)]){case _0x1d3786[_0x311dcf(0xe2)]:break;case _0x1d3786[_0x311dcf(0x108)]:{this[_0x311dcf(0x11e)][_0x311dcf(0x111)](_0x330fc6,_0x106ecc,{'unitId':_0x330fc6,'subUnitId':_0x106ecc,'ref':'','id':_0x53c024[_0x311dcf(0xff)],'dT':_0xb22aaa(+_0x53c024[_0x311dcf(0xf1)]),'threadId':_0x53c024[_0x311dcf(0xe6)],'personId':(_0x1a2185=(_0x1ebb01=_0x53c024[_0x311dcf(0xe5)])==null?void 0x0:_0x1ebb01[_0x311dcf(0xc6)])!=null?_0x1a2185:_0x53c024[_0x311dcf(0x105)],'text':JSON['parse'](_0x53c024[_0x311dcf(0x127)]),'parentId':_0x1f9a91['id']});break;}case _0x1d3786[_0x311dcf(0x140)]:{const _0xbbce7d=this['_threadCommentModel'][_0x311dcf(0xca)](_0x330fc6,_0x106ecc,_0x53c024['replyId']);_0xbbce7d&&_0xbbce7d[_0x311dcf(0x120)]&&this[_0x311dcf(0x11e)][_0x311dcf(0x10e)](_0x330fc6,_0x106ecc,_0x53c024[_0x311dcf(0xff)]);break;}case _0x1d3786[_0x311dcf(0x10c)]:{this[_0x311dcf(0x11e)][_0x311dcf(0x14b)](_0x330fc6,_0x106ecc,{'commentId':_0x53c024['replyId'],'text':JSON[_0x311dcf(0x13e)](_0x53c024[_0x311dcf(0x127)])});break;}case _0x1d3786[_0x311dcf(0x137)]:{const _0x416ad9=(_0x358fba=this[_0x311dcf(0x11e)][_0x311dcf(0xd0)](_0x53c024[_0x311dcf(0x130)])['find'](_0x16eca5=>_0x16eca5[_0x311dcf(0xe6)]===_0x53c024['threadId']))==null?void 0x0:_0x358fba[_0x311dcf(0xdf)];_0x416ad9&&this['_threadCommentModel']['resolveComment'](_0x330fc6,_0x106ecc,_0x416ad9['id'],_0x53c024[_0x311dcf(0x124)]===_0x33b650[_0x311dcf(0xfa)]);break;}}}));}};_0x1078ee=_0x34ba7e([_0x44b08a(0x0,_0x339162['Inject'](_0x22aec6[_0x517094(0x118)])),_0x44b08a(0x1,_0x339162[_0x517094(0x122)](_0x4f90b6[_0x517094(0xc9)])),_0x44b08a(0x2,_0x339162['Inject'](_0x339162[_0x517094(0x113)])),_0x44b08a(0x3,_0x339162[_0x517094(0x122)](_0x339162[_0x517094(0x121)]))],_0x1078ee);const _0x449652=_0x517094(0x13b),_0xa6a9d5={};var _0x186994=Object[_0x517094(0xda)],_0x2c9fcc=(_0x3a0cd7,_0x2c4c34,_0x5d426f,_0x2b5891)=>{const _0x36edfa=_0x517094;for(var _0x4bae73=_0x2b5891>0x1?void 0x0:_0x2b5891?_0x186994(_0x2c4c34,_0x5d426f):_0x2c4c34,_0x56cb47=_0x3a0cd7[_0x36edfa(0x11b)]-0x1,_0x3cc40b;_0x56cb47>=0x0;_0x56cb47--)(_0x3cc40b=_0x3a0cd7[_0x56cb47])&&(_0x4bae73=_0x3cc40b(_0x4bae73)||_0x4bae73);return _0x4bae73;},_0x2a0068=(_0x36293a,_0x872fd3)=>(_0xc81ca2,_0x58559d)=>_0x872fd3(_0xc81ca2,_0x58559d,_0x36293a);function _0xabd89c(_0x369e81,_0x3c7c31){const _0x2bebd7=_0x517094,_0x2fbc8f=_0x369e81['replies'][0x0];return{..._0x3c7c31,'id':_0x2fbc8f[_0x2bebd7(0xff)],'resolved':_0x369e81['solved']===0x1,'dT':_0xb22aaa(_0x2fbc8f[_0x2bebd7(0xf1)]),'personId':_0x2fbc8f[_0x2bebd7(0x105)],'threadId':_0x2fbc8f[_0x2bebd7(0xe6)]};}function _0x4956a3(_0x444a04,_0x47895b,_0x559210){const _0x356a92=_0x517094;var _0x12b408,_0x5636dd;if(((_0x5636dd=(_0x12b408=_0x444a04==null?void 0x0:_0x444a04[_0x356a92(0x11c)])==null?void 0x0:_0x12b408['length'])!=null?_0x5636dd:0x0)>0x0){const _0x113f82=(_0x157ebe,_0x526280)=>({'id':_0x157ebe[_0x356a92(0xff)],'threadId':_0x157ebe[_0x356a92(0xe6)],'dT':_0xb22aaa(_0x157ebe['createTimestamp']),'personId':_0x157ebe[_0x356a92(0x105)],'resolved':_0x444a04[_0x356a92(0x124)]===_0x33b650[_0x356a92(0xfa)],'unitId':_0x47895b,'subUnitId':_0x559210,'text':JSON[_0x356a92(0x13e)](_0x157ebe[_0x356a92(0x127)]),'parentId':_0x526280}),_0x43c6af=_0x113f82(_0x444a04[_0x356a92(0x11c)][0x0]);return{..._0x43c6af,'children':_0x444a04[_0x356a92(0x11c)]['slice'](0x1)[_0x356a92(0xed)](_0x27bc5d=>_0x113f82(_0x27bc5d,_0x43c6af['id']))};}return null;}let _0x8da111=class{constructor(_0x11c497,_0x30b3ab,_0x749187){const _0x47fbdb=_0x517094;this[_0x47fbdb(0xee)]=_0x11c497,this[_0x47fbdb(0x11f)]=_0x30b3ab,this[_0x47fbdb(0xeb)]=_0x749187;}async[_0x517094(0x111)](_0x118937){const _0x1eeeb2=_0x517094;var _0x47524a,_0x4efc4c;const {parentId:_0x100520,unitId:_0x27d536,text:_0x1b1223,threadId:_0x5b18d5}=_0x118937,_0x2b2c25=(_0x4efc4c=(_0x47524a=_0x1b1223[_0x1eeeb2(0xd9)])==null?void 0x0:_0x47524a[_0x1eeeb2(0xfe)](_0x4cd704=>_0x4cd704[_0x1eeeb2(0xcf)]===_0x339162[_0x1eeeb2(0x103)][_0x1eeeb2(0x13f)])['map'](_0x380bde=>_0x380bde[_0x1eeeb2(0xe0)]))!=null?_0x4efc4c:[],_0x1a3548=JSON[_0x1eeeb2(0x12d)](_0x1b1223),_0x48c984=(await this[_0x1eeeb2(0xeb)][_0x1eeeb2(0x126)](_0x27d536))['getMemberID']();if(_0x100520){const _0x42786f={'memberId':_0x48c984,'unitId':_0x27d536,'content':_0x1a3548,'mention':_0x2b2c25,'threadId':_0x5b18d5},_0x362430=(await this['_httpService'][_0x1eeeb2(0xec)](_0x1eeeb2(0x134)+_0x27d536+'/reply',{'body':_0x42786f}))[_0x1eeeb2(0x144)][_0x1eeeb2(0xc8)];return{..._0x118937,'id':_0x362430[_0x1eeeb2(0xff)],'dT':_0x339162[_0x1eeeb2(0xdd)](+_0x362430['createTimestamp'])[_0x1eeeb2(0xdb)](_0x1eeeb2(0x12f)),'personId':_0x362430[_0x1eeeb2(0x105)]};}else{const _0x25f1b3={'memberId':_0x48c984,'unitId':_0x27d536,'content':_0x1a3548,'mention':_0x2b2c25},_0xfa56d3=await this[_0x1eeeb2(0xee)]['post'](_0x1eeeb2(0x134)+_0x27d536+_0x1eeeb2(0xea),{'body':_0x25f1b3});return _0xabd89c(_0xfa56d3[_0x1eeeb2(0x144)]['comment'],_0x118937);}}async[_0x517094(0x14b)](_0x20fc19){const _0x391b20=_0x517094;var _0x254f18,_0x4e238b;const {text:_0x2a8562,unitId:_0x1e2135}=_0x20fc19,_0x496aa5=(_0x4e238b=(_0x254f18=_0x2a8562[_0x391b20(0xd9)])==null?void 0x0:_0x254f18[_0x391b20(0xfe)](_0x19227a=>_0x19227a[_0x391b20(0xcf)]===_0x339162[_0x391b20(0x103)][_0x391b20(0x13f)])['map'](_0x328c88=>_0x328c88['rangeId']))!=null?_0x4e238b:[],_0x49945e=JSON[_0x391b20(0x12d)](_0x2a8562),_0x409af6=_0x20fc19[_0x391b20(0xe6)],_0x5dc326=_0x20fc19['id'],_0x51165b={'memberId':(await this[_0x391b20(0xeb)][_0x391b20(0x126)](_0x1e2135))[_0x391b20(0x117)](),'unitId':_0x1e2135,'threadId':_0x409af6,'mention':_0x496aa5,'content':_0x49945e,'replyId':_0x5dc326},_0x36edbb=await this[_0x391b20(0xee)]['post'](_0x391b20(0x134)+_0x1e2135+_0x391b20(0xd7),{'body':_0x51165b});return!_0x36edbb[_0x391b20(0x144)]['error']||_0x36edbb[_0x391b20(0x144)][_0x391b20(0xfb)][_0x391b20(0xdc)]===0x1;}async['resolveComment'](_0x3d9054){const _0x54ab83=_0x517094,{unitId:_0x470a18}=_0x3d9054,_0x273209=_0x3d9054[_0x54ab83(0xe6)],_0x2505d8={'memberId':this[_0x54ab83(0x11f)][_0x54ab83(0x104)]()['userID'],'unitId':_0x470a18,'threadId':_0x273209,'solved':_0x3d9054['resolved']?_0x33b650['Solved']:_0x33b650[_0x54ab83(0x106)]},_0x1ddbfb=await this[_0x54ab83(0xee)][_0x54ab83(0xec)](_0x54ab83(0x134)+_0x470a18+_0x54ab83(0xc4),{'body':_0x2505d8});return!_0x1ddbfb[_0x54ab83(0x144)]['error']||_0x1ddbfb[_0x54ab83(0x144)][_0x54ab83(0xfb)][_0x54ab83(0xdc)]===0x1;}async[_0x517094(0x10e)](_0x5c8d84,_0x620a9,_0x3d713a,_0x1125e0){const _0x3b8daf=_0x517094,_0xf63864={'memberId':(await this[_0x3b8daf(0xeb)][_0x3b8daf(0x126)](_0x5c8d84))[_0x3b8daf(0x117)](),'threadId':_0x3d713a,'replyId':_0x1125e0,'unitId':_0x5c8d84},_0x1bb998=await this[_0x3b8daf(0xee)]['post'](_0x3b8daf(0x134)+_0x5c8d84+_0x3b8daf(0x12c),{'body':_0xf63864});return!_0x1bb998[_0x3b8daf(0x144)][_0x3b8daf(0xfb)]||_0x1bb998[_0x3b8daf(0x144)][_0x3b8daf(0xfb)][_0x3b8daf(0xdc)]===0x1;}async[_0x517094(0x11d)](_0x5e4e6f,_0x418398,_0x2fdef4){const _0x264b77=_0x517094,_0x18b7a6={'unitId':_0x5e4e6f,'threadId':_0x2fdef4},_0x2a81dc=await this[_0x264b77(0xee)][_0x264b77(0xec)]('/universer-api/comment/unit/'+_0x5e4e6f+'/list',{'body':_0x18b7a6}),_0x2b3694=_0x2fdef4[_0x264b77(0xed)](_0xdc3439=>_0x4956a3(_0x2a81dc['body'][_0x264b77(0x133)][_0xdc3439],_0x5e4e6f,_0x418398))[_0x264b77(0xfe)](Boolean);return Object['values'](_0x2a81dc[_0x264b77(0x144)][_0x264b77(0x13a)])[_0x264b77(0xd8)](_0x43aeb1=>{const _0xa45aef=_0x264b77;this[_0xa45aef(0x11f)][_0xa45aef(0xf4)](_0x43aeb1);}),_0x2b3694;}[_0x517094(0x10a)](_0xdcd73d){const _0x228a61=_0x517094;return{'id':_0xdcd73d['id'],'threadId':_0xdcd73d[_0x228a61(0xe6)],'ref':_0xdcd73d[_0x228a61(0xef)]};}};_0x8da111=_0x2c9fcc([_0x2a0068(0x0,_0x339162['Inject'](_0x24ec67[_0x517094(0xe8)])),_0x2a0068(0x1,_0x339162[_0x517094(0x122)](_0x339162[_0x517094(0x113)])),_0x2a0068(0x2,_0x339162[_0x517094(0x122)](_0x22aec6[_0x517094(0x138)]))],_0x8da111);var _0x369d25=Object[_0x517094(0xda)],_0x28b8f2=(_0x2d1738,_0x56f711,_0x1fa7e8,_0x3a9c98)=>{const _0x6f51ea=_0x517094;for(var _0x127ffd=_0x3a9c98>0x1?void 0x0:_0x3a9c98?_0x369d25(_0x56f711,_0x1fa7e8):_0x56f711,_0x453438=_0x2d1738[_0x6f51ea(0x11b)]-0x1,_0x3a64de;_0x453438>=0x0;_0x453438--)(_0x3a64de=_0x2d1738[_0x453438])&&(_0x127ffd=_0x3a64de(_0x127ffd)||_0x127ffd);return _0x127ffd;},_0x5a26af=(_0x127f65,_0x45f51e)=>(_0x373f85,_0x3bed1f)=>_0x45f51e(_0x373f85,_0x3bed1f,_0x127f65);let _0x211922=class extends _0x339162[_0x517094(0xf6)]{constructor(_0x28b507,_0x133971){const _0x367a28=_0x517094;super(),this[_0x367a28(0x139)]=_0x28b507,this['_threadCommentDataSource']=_0x133971,this[_0x367a28(0xc5)]();}[_0x517094(0xc5)](){const _0x484cd9=_0x517094;this[_0x484cd9(0x139)]['dataSource']=this[_0x484cd9(0x101)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x211922=_0x28b8f2([_0x5a26af(0x0,_0x4f90b6['IThreadCommentDataSourceService']),_0x5a26af(0x1,_0x339162[_0x517094(0x122)](_0x8da111))],_0x211922);var _0x1bef80=Object['defineProperty'],_0x5b30ec=Object['getOwnPropertyDescriptor'],_0x2622ef=(_0x5b5cb2,_0x3376b7,_0x4ac799)=>_0x3376b7 in _0x5b5cb2?_0x1bef80(_0x5b5cb2,_0x3376b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ac799}):_0x5b5cb2[_0x3376b7]=_0x4ac799,_0x3af381=(_0x513f47,_0xb2b7dd,_0x4fca76,_0x25cb32)=>{const _0x5dcae9=_0x517094;for(var _0x15f4c8=_0x25cb32>0x1?void 0x0:_0x25cb32?_0x5b30ec(_0xb2b7dd,_0x4fca76):_0xb2b7dd,_0xc1ff84=_0x513f47[_0x5dcae9(0x11b)]-0x1,_0x1c9dfb;_0xc1ff84>=0x0;_0xc1ff84--)(_0x1c9dfb=_0x513f47[_0xc1ff84])&&(_0x15f4c8=_0x1c9dfb(_0x15f4c8)||_0x15f4c8);return _0x15f4c8;},_0x4a5cf2=(_0x3c0c7f,_0xb7ef32)=>(_0x4ad10e,_0x2373d0)=>_0xb7ef32(_0x4ad10e,_0x2373d0,_0x3c0c7f),_0x35a6b1=(_0x1a1397,_0x10f8d8,_0x411162)=>_0x2622ef(_0x1a1397,typeof _0x10f8d8!=_0x517094(0xd5)?_0x10f8d8+'':_0x10f8d8,_0x411162);_0x43a127[_0x517094(0xcd)]=class extends _0x339162[_0x517094(0x100)]{constructor(_0x379a80=_0xa6a9d5,_0x4446a7,_0x58dcc6){const _0x11a133=_0x517094;super(),this[_0x11a133(0x14a)]=_0x379a80,this[_0x11a133(0xce)]=_0x4446a7,this['_configService']=_0x58dcc6;const {..._0x44c93b}=_0x339162[_0x11a133(0xe9)]({},_0xa6a9d5,this[_0x11a133(0x14a)]);this[_0x11a133(0xd1)][_0x11a133(0xc7)](_0x449652,_0x44c93b);}[_0x517094(0xf9)](){const _0x576607=_0x517094;[[_0x8da111],[_0x211922],[_0x1078ee]][_0x576607(0xd8)](_0x15e631=>{const _0xb48e79=_0x576607;this['_injector'][_0xb48e79(0x141)](_0x15e631);});}[_0x517094(0xd2)](){const _0x2eaf53=_0x517094;this[_0x2eaf53(0xce)][_0x2eaf53(0x132)](_0x211922),this[_0x2eaf53(0xce)][_0x2eaf53(0x132)](_0x1078ee);}},_0x35a6b1(_0x43a127[_0x517094(0xcd)],'pluginName',_0x310541),_0x35a6b1(_0x43a127[_0x517094(0xcd)],'type',_0x339162['UniverInstanceType'][_0x517094(0x119)]),_0x43a127['UniverThreadCommentDataSourcePlugin']=_0x3af381([_0x339162['DependentOn'](_0xd7cca9['UniverThreadCommentUIPlugin'],_0x22aec6[_0x517094(0xf3)],_0x5392ce['UniverLicensePlugin']),_0x4a5cf2(0x1,_0x339162[_0x517094(0x122)](_0x339162['Injector'])),_0x4a5cf2(0x2,_0x339162[_0x517094(0x146)])],_0x43a127[_0x517094(0xcd)]),Object[_0x517094(0x128)](_0x43a127,Symbol[_0x517094(0x125)],{'value':_0x517094(0x142)});}));function _0x4bda(){const _0x104909=['ThreadCommentModel','getComment','@univerjs-pro/collaboration-client','disposeWithMe','UniverThreadCommentDataSourcePlugin','_injector','rangeType','getUnit','_configService','onReady','object','@univerjs/network','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','forEach','customRanges','getOwnPropertyDescriptor','format','code','dayjs','1132790YnlePn','root','rangeId','UniverProCollaborationClient','Add','rxjs','292704jSOmWf','user','threadId','@univerjs/thread-comment','HTTPService','merge','/add','_sessionService','post','map','_httpService','ref','subscribe','createTimestamp','personId','UniverCollaborationClientPlugin','addUser','Unknown','Disposable','size','UniverCore','onStarting','Solved','error','60836wVCOne','9444aGLsks','filter','replyId','Plugin','_threadCommentDataSource','getUser','CustomRangeType','getCurrentUser','userId','OpenOrReOpen','commentUpdate$','Reply','amd','saveCommentToSnapshot','@univerjs/thread-comment-ui','Edit','99qcqKAU','deleteComment','UniverThreadCommentUi','_init','addComment','91ouzdnD','UserManagerService','16528304aqKzBD','delete','468bVMMTA','getMemberID','CommentService','UNIVER_UNKNOWN','UniverProThreadCommentDatasource','length','replies','listComments','_threadCommentModel','_userService','parentId','Injector','Inject','UNRECOGNIZED','solved','toStringTag','requireSession','content','defineProperty','find','@univerjs-pro/license','UniverThreadComment','/delete','stringify','49520zkBQgw','YYYY/MM/DD\x20HH:mm','unitId','UniverProLicense','get','comments','/universer-api/comment/unit/','pipe','_initUserSync','Solve','CollaborationSessionService','_threadCommentDataSourceService','users','thread-comment-data-source.config','2189dfbriu','6ilfpPg','parse','COMMENT','Delete','add','Module','type','body','_commentService','IConfigService','1GlVjzT','exports','4503970gRJlIR','_config','updateComment','/solved','_initDataSource','userID','setConfig','reply'];_0x4bda=function(){return _0x104909;};return _0x4bda();}
1
+ function _0x24ff(){const _0x4631d7=['symbol','@univerjs/network','/add','subscribe','_configService','/list','resolved','rangeId','Inject','user','Disposable','listComments','Edit','UniverInstanceType','Plugin','HTTPService','pipe','object','getOwnPropertyDescriptor','UniverNetwork','createTimestamp','forEach','code','/solved','content','comments','thread-comment-data-source.config','setConfig','UniverCollaborationClientPlugin','1242iPRVHi','145896WpYvXk','UniverProLicense','UniverProCollaborationClient','body','parse','1534440QWQQot','Add','/universer-api/user/list','Solved','CommentService','pluginName','371slGdIo','_config','Solve','Unknown','17540fkxsPe','customRanges','384emoEmt','stringify','482996JAlveh','syncUpdateMutationToColla','values','504413qzzBow','replyId','_sessionService','userId','_initUserSync','addUser','replies','comment','/universer-api/comment/unit/','length','addComment','UserManagerService','Delete','requireSession','bufferTime','rxjs','onStarting','335YlbMTD','/reply','dayjs','users','Reply','disposeWithMe','rangeType','deleteComment','2300ZFObBH','_commentService','_initDataSource','updateComment','YYYY/MM/DD\x20HH:mm','error','253RxRonv','defineProperty','_httpService','root','saveCommentToSnapshot','commentUpdate$','4FDpbba','UniverThreadCommentDataSourcePlugin','map','getUnit','@univerjs/thread-comment-ui','getCurrentUser','UniverProThreadCommentDatasource','180tNgOYC','@univerjs-pro/license','_userService','onReady','IConfigService','filter','UNIVER_UNKNOWN','_init','get','exports','COMMENT','reply','Module','find','UniverLicensePlugin','unitId','_injector','_threadCommentDataSourceService','post','type','_threadCommentModel','CustomRangeType','size','format','threadId','amd','resolveComment','@univerjs-pro/collaboration-client','payload','UniverThreadCommentUIPlugin','personId','@univerjs/core','getMemberID','userID','parentId','solved','UNRECOGNIZED','OpenOrReOpen'];_0x24ff=function(){return _0x4631d7;};return _0x24ff();}function _0x29df(_0x94b15c,_0x3ff4c8){const _0x24ffd0=_0x24ff();return _0x29df=function(_0x29df2f,_0x452d07){_0x29df2f=_0x29df2f-0x1c2;let _0x54e486=_0x24ffd0[_0x29df2f];return _0x54e486;},_0x29df(_0x94b15c,_0x3ff4c8);}(function(_0x4be3c7,_0x1e513b){const _0xc3e33c=_0x29df,_0xc37a45=_0x4be3c7();while(!![]){try{const _0x44fa05=parseInt(_0xc3e33c(0x243))/0x1*(-parseInt(_0xc3e33c(0x1e5))/0x2)+-parseInt(_0xc3e33c(0x235))/0x3+parseInt(_0xc3e33c(0x23f))/0x4*(parseInt(_0xc3e33c(0x1d1))/0x5)+parseInt(_0xc3e33c(0x230))/0x6*(parseInt(_0xc3e33c(0x23b))/0x7)+-parseInt(_0xc3e33c(0x241))/0x8*(-parseInt(_0xc3e33c(0x22f))/0x9)+parseInt(_0xc3e33c(0x1d9))/0xa*(-parseInt(_0xc3e33c(0x1df))/0xb)+-parseInt(_0xc3e33c(0x1ec))/0xc*(-parseInt(_0xc3e33c(0x246))/0xd);if(_0x44fa05===_0x1e513b)break;else _0xc37a45['push'](_0xc37a45['shift']());}catch(_0xec27ad){_0xc37a45['push'](_0xc37a45['shift']());}}}(_0x24ff,0xa8124),function(_0x31153f,_0x51d7f7){const _0x3f52c4=_0x29df;typeof exports==_0x3f52c4(0x223)&&typeof module<'u'?_0x51d7f7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x3f52c4(0x205)]?define([_0x3f52c4(0x1f5),_0x3f52c4(0x207),_0x3f52c4(0x1ed),_0x3f52c4(0x20b),_0x3f52c4(0x1e9),'@univerjs/thread-comment','rxjs',_0x3f52c4(0x213)],_0x51d7f7):(_0x31153f=typeof globalThis<'u'?globalThis:_0x31153f||self,_0x51d7f7(_0x31153f[_0x3f52c4(0x1eb)]={},_0x31153f[_0x3f52c4(0x232)],_0x31153f[_0x3f52c4(0x231)],_0x31153f['UniverCore'],_0x31153f['UniverThreadCommentUi'],_0x31153f['UniverThreadComment'],_0x31153f[_0x3f52c4(0x1cf)],_0x31153f[_0x3f52c4(0x225)]));}(this,function(_0x3188c5,_0x32ad6d,_0x38464e,_0x458bb5,_0x47786a,_0xfb4f33,_0x4b2743,_0x221283){'use strict';const _0x340648=_0x29df;const _0x39cd8a='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x323cf3=(_0x292234=>(_0x292234[_0x292234['OpenOrReOpen']=0x0]=_0x340648(0x211),_0x292234[_0x292234['Solved']=0x1]=_0x340648(0x238),_0x292234[_0x292234[_0x340648(0x210)]=-0x1]=_0x340648(0x210),_0x292234))(_0x323cf3||{}),_0x5b91b4=(_0x308a5b=>(_0x308a5b[_0x308a5b[_0x340648(0x23e)]=0x0]=_0x340648(0x23e),_0x308a5b[_0x308a5b[_0x340648(0x236)]=0x1]='Add',_0x308a5b[_0x308a5b[_0x340648(0x1d5)]=0x2]=_0x340648(0x1d5),_0x308a5b[_0x308a5b[_0x340648(0x21e)]=0x3]=_0x340648(0x21e),_0x308a5b[_0x308a5b[_0x340648(0x1cc)]=0x4]=_0x340648(0x1cc),_0x308a5b[_0x308a5b[_0x340648(0x23d)]=0x5]=_0x340648(0x23d),_0x308a5b[_0x308a5b['UNRECOGNIZED']=-0x1]=_0x340648(0x210),_0x308a5b))(_0x5b91b4||{});const _0x23bde2=_0x186af7=>_0x458bb5['dayjs'](new Date(+_0x186af7))[_0x340648(0x203)](_0x340648(0x1dd)),_0x2dd3be=async(_0x395b65,_0x4d6fdf)=>{const _0x37ce5e=_0x340648,_0x4d14ca=_0x395b65[_0x37ce5e(0x1f4)](_0x458bb5[_0x37ce5e(0x1cb)]),_0x404548=_0x395b65[_0x37ce5e(0x1f4)](_0x221283[_0x37ce5e(0x221)]);_0x4d6fdf[_0x37ce5e(0x227)](_0x4f1be3=>{_0x4d14ca['getUser'](_0x4f1be3)&&_0x4d6fdf['delete'](_0x4f1be3);}),_0x4d6fdf[_0x37ce5e(0x202)]&&(await _0x404548[_0x37ce5e(0x1f4)](_0x37ce5e(0x237),{'params':{'userIDs':[..._0x4d6fdf]}}))['body'][_0x37ce5e(0x1d4)][_0x37ce5e(0x227)](_0x3b5915=>{const _0x50aefd=_0x37ce5e;_0x3b5915&&_0x4d14ca[_0x50aefd(0x1c5)](_0x3b5915);});};var _0x4752ff=Object['getOwnPropertyDescriptor'],_0x44d914=(_0x53104a,_0x4c14bc,_0x4f12b9,_0x11a82a)=>{for(var _0x12aadc=_0x11a82a>0x1?void 0x0:_0x11a82a?_0x4752ff(_0x4c14bc,_0x4f12b9):_0x4c14bc,_0x1fd1b4=_0x53104a['length']-0x1,_0x41d8df;_0x1fd1b4>=0x0;_0x1fd1b4--)(_0x41d8df=_0x53104a[_0x1fd1b4])&&(_0x12aadc=_0x41d8df(_0x12aadc)||_0x12aadc);return _0x12aadc;},_0x1dd67f=(_0xdb5f25,_0x5adf80)=>(_0x11a7e3,_0x1d4220)=>_0x5adf80(_0x11a7e3,_0x1d4220,_0xdb5f25);let _0x348a71=class extends _0x458bb5[_0x340648(0x21c)]{constructor(_0x1baf0a,_0x336c23,_0x33459f,_0x517a06){const _0x2c3108=_0x340648;super(),this[_0x2c3108(0x1da)]=_0x1baf0a,this[_0x2c3108(0x200)]=_0x336c23,this[_0x2c3108(0x1ee)]=_0x33459f,this['_injector']=_0x517a06,this[_0x2c3108(0x1f3)](),this[_0x2c3108(0x1c4)]();}['_initUserSync'](){const _0xb85a46=_0x340648;this[_0xb85a46(0x1d6)](this[_0xb85a46(0x200)][_0xb85a46(0x1e4)][_0xb85a46(0x222)](_0x4b2743[_0xb85a46(0x1ce)](0x10))[_0xb85a46(0x215)](_0x2c9304=>{const _0x20d7d7=_0xb85a46,_0x28e10e=new Set();_0x2c9304[_0x20d7d7(0x227)](_0x2365fa=>{const _0x4614e4=_0x20d7d7;switch(_0x2365fa['type']){case'add':{const _0x803aed=_0x2365fa[_0x4614e4(0x208)][_0x4614e4(0x20a)];_0x28e10e['add'](_0x803aed);break;}}}),_0x2dd3be(this[_0x20d7d7(0x1fc)],_0x28e10e);}));}[_0x340648(0x1f3)](){const _0x1c3e82=_0x340648;this[_0x1c3e82(0x1d6)](this[_0x1c3e82(0x1da)]['commentUpdate$'][_0x1c3e82(0x215)](async _0x3b821d=>{const _0x2fbedd=_0x1c3e82;var _0x5c1618,_0x13165a,_0x2713f3,_0x3e85c2;const _0x1d4e48=(_0x5c1618=this[_0x2fbedd(0x200)][_0x2fbedd(0x1e8)](_0x3b821d[_0x2fbedd(0x1fb)])[_0x2fbedd(0x1f9)](_0x405574=>_0x405574[_0x2fbedd(0x204)]===_0x3b821d[_0x2fbedd(0x204)]))==null?void 0x0:_0x5c1618[_0x2fbedd(0x1e2)];if(!_0x1d4e48)return;const {unitId:_0x6784f1,subUnitId:_0x2bfdef}=_0x1d4e48;switch(_0x3b821d[_0x2fbedd(0x21b)]&&this[_0x2fbedd(0x1ee)][_0x2fbedd(0x1c5)](_0x3b821d['user']),_0x3b821d[_0x2fbedd(0x1ff)]){case _0x5b91b4[_0x2fbedd(0x236)]:break;case _0x5b91b4[_0x2fbedd(0x1d5)]:{this[_0x2fbedd(0x200)][_0x2fbedd(0x1ca)](_0x6784f1,_0x2bfdef,{'unitId':_0x6784f1,'subUnitId':_0x2bfdef,'ref':'','id':_0x3b821d[_0x2fbedd(0x247)],'dT':_0x23bde2(+_0x3b821d[_0x2fbedd(0x226)]),'threadId':_0x3b821d[_0x2fbedd(0x204)],'personId':(_0x2713f3=(_0x13165a=_0x3b821d['user'])==null?void 0x0:_0x13165a[_0x2fbedd(0x20d)])!=null?_0x2713f3:_0x3b821d[_0x2fbedd(0x1c3)],'text':JSON[_0x2fbedd(0x234)](_0x3b821d[_0x2fbedd(0x22a)]),'parentId':_0x1d4e48['id']});break;}case _0x5b91b4[_0x2fbedd(0x1cc)]:{const _0x2190d5=this[_0x2fbedd(0x200)]['getComment'](_0x6784f1,_0x2bfdef,_0x3b821d[_0x2fbedd(0x247)]);_0x2190d5&&_0x2190d5[_0x2fbedd(0x20e)]&&this[_0x2fbedd(0x200)][_0x2fbedd(0x1d8)](_0x6784f1,_0x2bfdef,_0x3b821d[_0x2fbedd(0x247)]);break;}case _0x5b91b4[_0x2fbedd(0x21e)]:{this[_0x2fbedd(0x200)][_0x2fbedd(0x1dc)](_0x6784f1,_0x2bfdef,{'commentId':_0x3b821d[_0x2fbedd(0x247)],'text':JSON['parse'](_0x3b821d[_0x2fbedd(0x22a)])});break;}case _0x5b91b4[_0x2fbedd(0x23d)]:{const _0x559b5a=(_0x3e85c2=this[_0x2fbedd(0x200)][_0x2fbedd(0x1e8)](_0x3b821d['unitId'])[_0x2fbedd(0x1f9)](_0x578f88=>_0x578f88['threadId']===_0x3b821d[_0x2fbedd(0x204)]))==null?void 0x0:_0x3e85c2['root'];_0x559b5a&&this['_threadCommentModel']['resolveComment'](_0x6784f1,_0x2bfdef,_0x559b5a['id'],_0x3b821d[_0x2fbedd(0x20f)]===_0x323cf3['Solved']);break;}}}));}};_0x348a71=_0x44d914([_0x1dd67f(0x0,_0x458bb5[_0x340648(0x21a)](_0x32ad6d[_0x340648(0x239)])),_0x1dd67f(0x1,_0x458bb5[_0x340648(0x21a)](_0xfb4f33['ThreadCommentModel'])),_0x1dd67f(0x2,_0x458bb5[_0x340648(0x21a)](_0x458bb5['UserManagerService'])),_0x1dd67f(0x3,_0x458bb5[_0x340648(0x21a)](_0x458bb5['Injector']))],_0x348a71);const _0x142f24=_0x340648(0x22c),_0x3abd2a={};var _0x58757c=Object[_0x340648(0x224)],_0x13c1bd=(_0x2d35ff,_0x124d28,_0x1580e6,_0x5e81c4)=>{const _0x17aa06=_0x340648;for(var _0x405273=_0x5e81c4>0x1?void 0x0:_0x5e81c4?_0x58757c(_0x124d28,_0x1580e6):_0x124d28,_0x1f4b07=_0x2d35ff[_0x17aa06(0x1c9)]-0x1,_0x8b523f;_0x1f4b07>=0x0;_0x1f4b07--)(_0x8b523f=_0x2d35ff[_0x1f4b07])&&(_0x405273=_0x8b523f(_0x405273)||_0x405273);return _0x405273;},_0x3e547f=(_0x435dce,_0x2b8c23)=>(_0x173946,_0x2657b3)=>_0x2b8c23(_0x173946,_0x2657b3,_0x435dce);function _0xbb19a3(_0x2082ee,_0x33af49){const _0x122013=_0x340648,_0x4b888d=_0x2082ee[_0x122013(0x1c6)][0x0];return{..._0x33af49,'id':_0x4b888d[_0x122013(0x247)],'resolved':_0x2082ee[_0x122013(0x20f)]===0x1,'dT':_0x23bde2(_0x4b888d[_0x122013(0x226)]),'personId':_0x4b888d['userId'],'threadId':_0x4b888d[_0x122013(0x204)]};}function _0x373208(_0x2d9743,_0x217348,_0x2192af){const _0x3cfb63=_0x340648;var _0xb16320,_0x2580b4;if(((_0x2580b4=(_0xb16320=_0x2d9743==null?void 0x0:_0x2d9743['replies'])==null?void 0x0:_0xb16320[_0x3cfb63(0x1c9)])!=null?_0x2580b4:0x0)>0x0){const _0x292465=(_0x39220c,_0x3e656f)=>({'id':_0x39220c[_0x3cfb63(0x247)],'threadId':_0x39220c[_0x3cfb63(0x204)],'dT':_0x23bde2(_0x39220c[_0x3cfb63(0x226)]),'personId':_0x39220c['userId'],'resolved':_0x2d9743['solved']===_0x323cf3[_0x3cfb63(0x238)],'unitId':_0x217348,'subUnitId':_0x2192af,'text':JSON[_0x3cfb63(0x234)](_0x39220c[_0x3cfb63(0x22a)]),'parentId':_0x3e656f}),_0x329509=_0x292465(_0x2d9743[_0x3cfb63(0x1c6)][0x0]);return{..._0x329509,'children':_0x2d9743[_0x3cfb63(0x1c6)]['slice'](0x1)['map'](_0x549d59=>_0x292465(_0x549d59,_0x329509['id']))};}return null;}let _0x418641=class{constructor(_0x1b3781,_0x3bea40,_0x40af09){const _0x5da181=_0x340648;this['_httpService']=_0x1b3781,this['_userService']=_0x3bea40,this[_0x5da181(0x1c2)]=_0x40af09;}async[_0x340648(0x1ca)](_0x1f38ff){const _0x5aeca1=_0x340648;var _0x2c5510,_0x31af85;const {parentId:_0x117d3a,unitId:_0x226126,text:_0x447096,threadId:_0x22183d}=_0x1f38ff,_0x57c55e=(_0x31af85=(_0x2c5510=_0x447096[_0x5aeca1(0x240)])==null?void 0x0:_0x2c5510[_0x5aeca1(0x1f1)](_0x811feb=>_0x811feb[_0x5aeca1(0x1d7)]===_0x458bb5[_0x5aeca1(0x201)][_0x5aeca1(0x1f6)])[_0x5aeca1(0x1e7)](_0x34a2d1=>_0x34a2d1['rangeId']))!=null?_0x31af85:[],_0x1411ee=JSON['stringify'](_0x447096),_0x24412c=(await this[_0x5aeca1(0x1c2)]['requireSession'](_0x226126))[_0x5aeca1(0x20c)]();if(_0x117d3a){const _0x24474c={'memberId':_0x24412c,'unitId':_0x226126,'content':_0x1411ee,'mention':_0x57c55e,'threadId':_0x22183d},_0x196638=(await this[_0x5aeca1(0x1e1)][_0x5aeca1(0x1fe)]('/universer-api/comment/unit/'+_0x226126+_0x5aeca1(0x1d2),{'body':_0x24474c}))[_0x5aeca1(0x233)][_0x5aeca1(0x1f7)];return{..._0x1f38ff,'id':_0x196638[_0x5aeca1(0x247)],'dT':_0x458bb5[_0x5aeca1(0x1d3)](+_0x196638[_0x5aeca1(0x226)])['format'](_0x5aeca1(0x1dd)),'personId':_0x196638[_0x5aeca1(0x1c3)]};}else{const _0xf660e9={'memberId':_0x24412c,'unitId':_0x226126,'content':_0x1411ee,'mention':_0x57c55e},_0x5898db=await this['_httpService'][_0x5aeca1(0x1fe)](_0x5aeca1(0x1c8)+_0x226126+_0x5aeca1(0x214),{'body':_0xf660e9});return _0xbb19a3(_0x5898db['body'][_0x5aeca1(0x1c7)],_0x1f38ff);}}async[_0x340648(0x1dc)](_0x25aedc){const _0x63b0ad=_0x340648;var _0x4dff73,_0x5b048d;const {text:_0x400031,unitId:_0x310cd9}=_0x25aedc,_0x2c1114=(_0x5b048d=(_0x4dff73=_0x400031[_0x63b0ad(0x240)])==null?void 0x0:_0x4dff73['filter'](_0x127314=>_0x127314[_0x63b0ad(0x1d7)]===_0x458bb5[_0x63b0ad(0x201)]['COMMENT'])['map'](_0x18d204=>_0x18d204[_0x63b0ad(0x219)]))!=null?_0x5b048d:[],_0x5cb815=JSON[_0x63b0ad(0x242)](_0x400031),_0x4b8d9b=_0x25aedc['threadId'],_0x18ed8c=_0x25aedc['id'],_0x5246b7={'memberId':(await this[_0x63b0ad(0x1c2)][_0x63b0ad(0x1cd)](_0x310cd9))[_0x63b0ad(0x20c)](),'unitId':_0x310cd9,'threadId':_0x4b8d9b,'mention':_0x2c1114,'content':_0x5cb815,'replyId':_0x18ed8c},_0x85b265=await this[_0x63b0ad(0x1e1)][_0x63b0ad(0x1fe)]('/universer-api/comment/unit/'+_0x310cd9+'/edit',{'body':_0x5246b7});return!_0x85b265[_0x63b0ad(0x233)]['error']||_0x85b265[_0x63b0ad(0x233)][_0x63b0ad(0x1de)][_0x63b0ad(0x228)]===0x1;}async[_0x340648(0x206)](_0x54083d){const _0x1a669c=_0x340648,{unitId:_0x3415a3}=_0x54083d,_0x36bdde=_0x54083d[_0x1a669c(0x204)],_0x5818c4={'memberId':this['_userService'][_0x1a669c(0x1ea)]()[_0x1a669c(0x20d)],'unitId':_0x3415a3,'threadId':_0x36bdde,'solved':_0x54083d[_0x1a669c(0x218)]?_0x323cf3[_0x1a669c(0x238)]:_0x323cf3[_0x1a669c(0x211)]},_0x35d8fa=await this['_httpService'][_0x1a669c(0x1fe)](_0x1a669c(0x1c8)+_0x3415a3+_0x1a669c(0x229),{'body':_0x5818c4});return!_0x35d8fa['body'][_0x1a669c(0x1de)]||_0x35d8fa['body']['error'][_0x1a669c(0x228)]===0x1;}async['deleteComment'](_0x464603,_0x3881d4,_0x56f4ff,_0x2c7df6){const _0x3230e3=_0x340648,_0x1a4996={'memberId':(await this[_0x3230e3(0x1c2)]['requireSession'](_0x464603))['getMemberID'](),'threadId':_0x56f4ff,'replyId':_0x2c7df6,'unitId':_0x464603},_0x5211e2=await this[_0x3230e3(0x1e1)][_0x3230e3(0x1fe)](_0x3230e3(0x1c8)+_0x464603+'/delete',{'body':_0x1a4996});return!_0x5211e2[_0x3230e3(0x233)][_0x3230e3(0x1de)]||_0x5211e2[_0x3230e3(0x233)][_0x3230e3(0x1de)][_0x3230e3(0x228)]===0x1;}async[_0x340648(0x21d)](_0x1aea59,_0x730cf4,_0x48bc9d){const _0x2d180c=_0x340648,_0x171503={'unitId':_0x1aea59,'threadId':_0x48bc9d},_0x149970=await this[_0x2d180c(0x1e1)]['post'](_0x2d180c(0x1c8)+_0x1aea59+_0x2d180c(0x217),{'body':_0x171503}),_0x32df85=_0x48bc9d[_0x2d180c(0x1e7)](_0x446b5d=>_0x373208(_0x149970[_0x2d180c(0x233)][_0x2d180c(0x22b)][_0x446b5d],_0x1aea59,_0x730cf4))['filter'](Boolean);return Object[_0x2d180c(0x245)](_0x149970['body'][_0x2d180c(0x1d4)])[_0x2d180c(0x227)](_0x394a2f=>{const _0x3ba7d5=_0x2d180c;this[_0x3ba7d5(0x1ee)][_0x3ba7d5(0x1c5)](_0x394a2f);}),_0x32df85;}[_0x340648(0x1e3)](_0xf1ca29){const _0x34ca6a=_0x340648;return{'id':_0xf1ca29['id'],'threadId':_0xf1ca29[_0x34ca6a(0x204)],'ref':_0xf1ca29['ref']};}};_0x418641=_0x13c1bd([_0x3e547f(0x0,_0x458bb5[_0x340648(0x21a)](_0x221283[_0x340648(0x221)])),_0x3e547f(0x1,_0x458bb5[_0x340648(0x21a)](_0x458bb5[_0x340648(0x1cb)])),_0x3e547f(0x2,_0x458bb5[_0x340648(0x21a)](_0x32ad6d['CollaborationSessionService']))],_0x418641);var _0x55e23b=Object[_0x340648(0x224)],_0x3218d0=(_0x102584,_0x6fb656,_0x13e10d,_0x45cd62)=>{const _0x307e4a=_0x340648;for(var _0x43cfee=_0x45cd62>0x1?void 0x0:_0x45cd62?_0x55e23b(_0x6fb656,_0x13e10d):_0x6fb656,_0x39227a=_0x102584[_0x307e4a(0x1c9)]-0x1,_0x4fda48;_0x39227a>=0x0;_0x39227a--)(_0x4fda48=_0x102584[_0x39227a])&&(_0x43cfee=_0x4fda48(_0x43cfee)||_0x43cfee);return _0x43cfee;},_0x1e07db=(_0x1a6996,_0xdc0d8)=>(_0x4e97fc,_0xe44141)=>_0xdc0d8(_0x4e97fc,_0xe44141,_0x1a6996);let _0xe5db44=class extends _0x458bb5[_0x340648(0x21c)]{constructor(_0x204cd6,_0x4ca9e0){const _0x369ed8=_0x340648;super(),this[_0x369ed8(0x1fd)]=_0x204cd6,this['_threadCommentDataSource']=_0x4ca9e0,this['_initDataSource']();}[_0x340648(0x1db)](){const _0x2b2416=_0x340648;this[_0x2b2416(0x1fd)]['dataSource']=this['_threadCommentDataSource'],this[_0x2b2416(0x1fd)][_0x2b2416(0x244)]=!0x1;}};_0xe5db44=_0x3218d0([_0x1e07db(0x0,_0xfb4f33['IThreadCommentDataSourceService']),_0x1e07db(0x1,_0x458bb5['Inject'](_0x418641))],_0xe5db44);var _0x4351d5=Object[_0x340648(0x1e0)],_0x3f3083=Object[_0x340648(0x224)],_0x212858=(_0x2aac1a,_0x2c9a22,_0x1855b4)=>_0x2c9a22 in _0x2aac1a?_0x4351d5(_0x2aac1a,_0x2c9a22,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1855b4}):_0x2aac1a[_0x2c9a22]=_0x1855b4,_0x3514bb=(_0x5228a6,_0x504ae1,_0x18b963,_0x2c7d90)=>{const _0xfa47ff=_0x340648;for(var _0x145724=_0x2c7d90>0x1?void 0x0:_0x2c7d90?_0x3f3083(_0x504ae1,_0x18b963):_0x504ae1,_0x2d687a=_0x5228a6[_0xfa47ff(0x1c9)]-0x1,_0x54eb8c;_0x2d687a>=0x0;_0x2d687a--)(_0x54eb8c=_0x5228a6[_0x2d687a])&&(_0x145724=_0x54eb8c(_0x145724)||_0x145724);return _0x145724;},_0x321a4c=(_0x50597e,_0x12e0a3)=>(_0x568e0d,_0x430cb2)=>_0x12e0a3(_0x568e0d,_0x430cb2,_0x50597e),_0x216f0f=(_0x52e394,_0x2d85be,_0x251d2e)=>_0x212858(_0x52e394,typeof _0x2d85be!=_0x340648(0x212)?_0x2d85be+'':_0x2d85be,_0x251d2e);_0x3188c5[_0x340648(0x1e6)]=class extends _0x458bb5[_0x340648(0x220)]{constructor(_0x1412a1=_0x3abd2a,_0x55ff4,_0x556e1a){const _0x245f06=_0x340648;super(),this[_0x245f06(0x23c)]=_0x1412a1,this[_0x245f06(0x1fc)]=_0x55ff4,this[_0x245f06(0x216)]=_0x556e1a;const {..._0x484d36}=_0x458bb5['merge']({},_0x3abd2a,this['_config']);this['_configService'][_0x245f06(0x22d)](_0x142f24,_0x484d36);}[_0x340648(0x1d0)](){const _0x211023=_0x340648;[[_0x418641],[_0xe5db44],[_0x348a71]][_0x211023(0x227)](_0x4b943c=>{const _0x2aa3e9=_0x211023;this[_0x2aa3e9(0x1fc)]['add'](_0x4b943c);});}[_0x340648(0x1ef)](){const _0x5ce8b4=_0x340648;this[_0x5ce8b4(0x1fc)]['get'](_0xe5db44),this[_0x5ce8b4(0x1fc)][_0x5ce8b4(0x1f4)](_0x348a71);}},_0x216f0f(_0x3188c5[_0x340648(0x1e6)],_0x340648(0x23a),_0x39cd8a),_0x216f0f(_0x3188c5[_0x340648(0x1e6)],'type',_0x458bb5[_0x340648(0x21f)][_0x340648(0x1f2)]),_0x3188c5[_0x340648(0x1e6)]=_0x3514bb([_0x458bb5['DependentOn'](_0x47786a[_0x340648(0x209)],_0x32ad6d[_0x340648(0x22e)],_0x38464e[_0x340648(0x1fa)]),_0x321a4c(0x1,_0x458bb5[_0x340648(0x21a)](_0x458bb5['Injector'])),_0x321a4c(0x2,_0x458bb5[_0x340648(0x1f0)])],_0x3188c5[_0x340648(0x1e6)]),Object[_0x340648(0x1e0)](_0x3188c5,Symbol['toStringTag'],{'value':_0x340648(0x1f8)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.12-nightly.202510251119",
3
+ "version": "0.10.13",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.12-nightly.202510251119",
49
- "@univerjs-pro/license": "0.10.12-nightly.202510251119",
50
- "@univerjs/core": "0.10.12-nightly.202510251119",
48
+ "@univerjs-pro/collaboration-client": "0.10.13",
49
+ "@univerjs/network": "0.10.13",
50
+ "@univerjs/core": "0.10.13",
51
+ "@univerjs-pro/license": "0.10.13",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.10.12-nightly.202510251119",
53
- "@univerjs/thread-comment-ui": "0.10.12-nightly.202510251119",
54
- "@univerjs/network": "0.10.12-nightly.202510251119"
53
+ "@univerjs/thread-comment-ui": "0.10.13",
54
+ "@univerjs/thread-comment": "0.10.13"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.1.10",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.12"
61
+ "@univerjs-infra/shared": "0.10.13"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",