@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251216-1519cb7 → 0.13.0-insiders.20251220-0a5ea4d

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 _0xc938f6=_0x8491;function _0x20d3(){const _0x5c8d0d=['Module','ref','getCurrentUser','140576yFGDmw','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','syncUpdateMutationToColla','Edit','error','_initUserSync','_commentService','pipe','_httpService','replyId','_threadCommentModel','resolveComment','stringify','requireSession','commentUpdate$','resolved','Plugin','rangeType','values','dayjs','_userService','12WJQEWI','forEach','addComment','deleteComment','length','/universer-api/user/list','users','body','find','UserManagerService','Disposable','16340HbVQvg','parentId','_sessionService','user','thread-comment-data-source.config','pluginName','userId','parse','OpenOrReOpen','7842888SwZCBP','HTTPService','addUser','YYYY/MM/DD\x20HH:mm','map','post','onReady','_threadCommentDataSource','Solved','CommentService','Delete','userID','reply','replies','getUser','subscribe','updateComment','createTimestamp','IThreadCommentDataSourceService','threadId','UniverInstanceType','UNRECOGNIZED','getOwnPropertyDescriptor','size','2250915vfKTLD','customRanges','payload','2853NqKUzn','Unknown','Inject','slice','Solve','_config','filter','_injector','rangeId','4600085cQvugu','bufferTime','_initDataSource','/reply','setConfig','UniverLicensePlugin','get','CustomRangeType','add','defineProperty','Add','getMemberID','/universer-api/comment/unit/','solved','/edit','type','Reply','/add','code','/list','getUnit','17740uKnzyi','103WqtgiW','unitId','content','disposeWithMe','root','Injector','onStarting','966275wurAUZ','comment','COMMENT','format','merge','_init','/solved'];_0x20d3=function(){return _0x5c8d0d;};return _0x20d3();}(function(_0x2b328e,_0x178ad5){const _0x4fd283=_0x8491,_0x4321ac=_0x2b328e();while(!![]){try{const _0x57c3d8=-parseInt(_0x4fd283(0x18d))/0x1*(parseInt(_0x4fd283(0x1bf))/0x2)+parseInt(_0x4fd283(0x16b))/0x3+-parseInt(_0x4fd283(0x19e))/0x4+-parseInt(_0x4fd283(0x194))/0x5*(parseInt(_0x4fd283(0x1b4))/0x6)+parseInt(_0x4fd283(0x177))/0x7+parseInt(_0x4fd283(0x1c8))/0x8+parseInt(_0x4fd283(0x16e))/0x9*(-parseInt(_0x4fd283(0x18c))/0xa);if(_0x57c3d8===_0x178ad5)break;else _0x4321ac['push'](_0x4321ac['shift']());}catch(_0x525b05){_0x4321ac['push'](_0x4321ac['shift']());}}}(_0x20d3,0x8947b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xc938f6(0x19b)});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=(_0x5488a6=>(_0x5488a6[_0x5488a6['OpenOrReOpen']=0x0]=_0xc938f6(0x1c7),_0x5488a6[_0x5488a6['Solved']=0x1]=_0xc938f6(0x1d0),_0x5488a6[_0x5488a6[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5488a6))(I||{}),v=(_0x5ae9aa=>(_0x5ae9aa[_0x5ae9aa['Unknown']=0x0]=_0xc938f6(0x16f),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x181)]=0x1]=_0xc938f6(0x181),_0x5ae9aa[_0x5ae9aa['Reply']=0x2]='Reply',_0x5ae9aa[_0x5ae9aa['Edit']=0x3]=_0xc938f6(0x1a2),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1d2)]=0x4]='Delete',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x172)]=0x5]='Solve',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5ae9aa))(v||{});const f=_0x45fc74=>c[_0xc938f6(0x1b2)](new Date(+_0x45fc74))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a0dcf,_0x47fa32)=>{const _0x47702c=_0xc938f6,_0x454292=_0x5a0dcf[_0x47702c(0x17d)](c[_0x47702c(0x1bd)]),_0x4db2a6=_0x5a0dcf[_0x47702c(0x17d)](P[_0x47702c(0x1c9)]);_0x47fa32[_0x47702c(0x1b5)](_0x3b56c2=>{const _0xf4a364=_0x47702c;_0x454292[_0xf4a364(0x1d6)](_0x3b56c2)&&_0x47fa32['delete'](_0x3b56c2);}),_0x47fa32[_0x47702c(0x1df)]&&(await _0x4db2a6[_0x47702c(0x17d)](_0x47702c(0x1b9),{'params':{'userIDs':[..._0x47fa32]}}))[_0x47702c(0x1bb)][_0x47702c(0x1ba)][_0x47702c(0x1b5)](_0x1bcead=>{const _0x2a2f04=_0x47702c;_0x1bcead&&_0x454292[_0x2a2f04(0x1ca)](_0x1bcead);});};var $=Object[_0xc938f6(0x1de)],E=(_0x2dd839,_0x4e4ebf,_0x497fa5,_0x36a496)=>{const _0x33596a=_0xc938f6;for(var _0x5b39dc=_0x36a496>0x1?void 0x0:_0x36a496?$(_0x4e4ebf,_0x497fa5):_0x4e4ebf,_0x5804f4=_0x2dd839[_0x33596a(0x1b8)]-0x1,_0xb1fd18;_0x5804f4>=0x0;_0x5804f4--)(_0xb1fd18=_0x2dd839[_0x5804f4])&&(_0x5b39dc=_0xb1fd18(_0x5b39dc)||_0x5b39dc);return _0x5b39dc;},S=(_0x3c214f,_0x336ae0)=>(_0x54d317,_0x2d6c91)=>_0x336ae0(_0x54d317,_0x2d6c91,_0x3c214f);let _=class extends c['Disposable']{constructor(_0x14fbc2,_0x3c66b9,_0x49333b,_0x334664){const _0x37044f=_0xc938f6;super(),this[_0x37044f(0x1a5)]=_0x14fbc2,this[_0x37044f(0x1a9)]=_0x3c66b9,this[_0x37044f(0x1b3)]=_0x49333b,this['_injector']=_0x334664,this[_0x37044f(0x199)](),this[_0x37044f(0x1a4)]();}[_0xc938f6(0x1a4)](){const _0x56fb75=_0xc938f6;this['disposeWithMe'](this[_0x56fb75(0x1a9)][_0x56fb75(0x1ad)][_0x56fb75(0x1a6)](j[_0x56fb75(0x178)](0x10))[_0x56fb75(0x1d7)](_0x314b38=>{const _0x56ad65=_0x56fb75,_0x212d68=new Set();_0x314b38['forEach'](_0x1ba8c1=>{const _0x16a9ec=_0x8491;switch(_0x1ba8c1[_0x16a9ec(0x186)]){case'add':{const _0x832905=_0x1ba8c1[_0x16a9ec(0x16d)]['personId'];_0x212d68[_0x16a9ec(0x17f)](_0x832905);break;}}}),R(this[_0x56ad65(0x175)],_0x212d68);}));}['_init'](){const _0x552728=_0xc938f6;this[_0x552728(0x190)](this[_0x552728(0x1a5)][_0x552728(0x1ad)][_0x552728(0x1d7)](async _0xdec365=>{const _0x1dea13=_0x552728;var _0x2e3baa,_0x374bdb,_0x2ea446,_0x1a0cef;const _0x125826=(_0x2e3baa=this['_threadCommentModel'][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])['find'](_0x106f5b=>_0x106f5b['threadId']===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x2e3baa[_0x1dea13(0x191)];if(!_0x125826)return;const {unitId:_0x38ed06,subUnitId:_0x145f9f}=_0x125826;switch(_0xdec365[_0x1dea13(0x1c2)]&&this[_0x1dea13(0x1b3)]['addUser'](_0xdec365[_0x1dea13(0x1c2)]),_0xdec365[_0x1dea13(0x186)]){case v[_0x1dea13(0x181)]:break;case v[_0x1dea13(0x187)]:{this[_0x1dea13(0x1a9)][_0x1dea13(0x1b6)](_0x38ed06,_0x145f9f,{'unitId':_0x38ed06,'subUnitId':_0x145f9f,'ref':'','id':_0xdec365[_0x1dea13(0x1a8)],'dT':f(+_0xdec365[_0x1dea13(0x1d9)]),'threadId':_0xdec365[_0x1dea13(0x1db)],'personId':(_0x2ea446=(_0x374bdb=_0xdec365['user'])==null?void 0x0:_0x374bdb[_0x1dea13(0x1d3)])!=null?_0x2ea446:_0xdec365['userId'],'text':JSON[_0x1dea13(0x1c6)](_0xdec365[_0x1dea13(0x18f)]),'parentId':_0x125826['id']});break;}case v[_0x1dea13(0x1d2)]:{const _0x31480f=this[_0x1dea13(0x1a9)]['getComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);_0x31480f&&_0x31480f[_0x1dea13(0x1c0)]&&this['_threadCommentModel']['deleteComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);break;}case v[_0x1dea13(0x1a2)]:{this['_threadCommentModel'][_0x1dea13(0x1d8)](_0x38ed06,_0x145f9f,{'commentId':_0xdec365['replyId'],'text':JSON['parse'](_0xdec365[_0x1dea13(0x18f)])});break;}case v['Solve']:{const _0x56e1a8=(_0x1a0cef=this[_0x1dea13(0x1a9)][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])[_0x1dea13(0x1bc)](_0x51863c=>_0x51863c[_0x1dea13(0x1db)]===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x1a0cef[_0x1dea13(0x191)];_0x56e1a8&&this['_threadCommentModel'][_0x1dea13(0x1aa)](_0x38ed06,_0x145f9f,_0x56e1a8['id'],_0xdec365[_0x1dea13(0x184)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0xc938f6(0x170)](b[_0xc938f6(0x1d1)])),S(0x1,c[_0xc938f6(0x170)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0xc938f6(0x1bd)])),S(0x3,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)]))],_);const q=_0xc938f6(0x1c3),D={};var A=Object[_0xc938f6(0x1de)],x=(_0x2e59d2,_0x2a8880,_0x32971c,_0x8de674)=>{for(var _0x3e0e3d=_0x8de674>0x1?void 0x0:_0x8de674?A(_0x2a8880,_0x32971c):_0x2a8880,_0x449b6d=_0x2e59d2['length']-0x1,_0x375ebd;_0x449b6d>=0x0;_0x449b6d--)(_0x375ebd=_0x2e59d2[_0x449b6d])&&(_0x3e0e3d=_0x375ebd(_0x3e0e3d)||_0x3e0e3d);return _0x3e0e3d;},C=(_0x2cdd2a,_0x419280)=>(_0x162afc,_0x6f4162)=>_0x419280(_0x162afc,_0x6f4162,_0x2cdd2a);function Y(_0x14b0c7,_0x2caea1){const _0x37659b=_0xc938f6,_0x3c5896=_0x14b0c7['replies'][0x0];return{..._0x2caea1,'id':_0x3c5896[_0x37659b(0x1a8)],'resolved':_0x14b0c7['solved']===0x1,'dT':f(_0x3c5896[_0x37659b(0x1d9)]),'personId':_0x3c5896[_0x37659b(0x1c5)],'threadId':_0x3c5896[_0x37659b(0x1db)]};}function G(_0x49f81e,_0x2ee5e4,_0x279b52){const _0x4dfa78=_0xc938f6;var _0xd84fec,_0x9545bb;if(((_0x9545bb=(_0xd84fec=_0x49f81e==null?void 0x0:_0x49f81e[_0x4dfa78(0x1d5)])==null?void 0x0:_0xd84fec[_0x4dfa78(0x1b8)])!=null?_0x9545bb:0x0)>0x0){const _0x4da43=(_0x195289,_0x403a51)=>({'id':_0x195289[_0x4dfa78(0x1a8)],'threadId':_0x195289[_0x4dfa78(0x1db)],'dT':f(_0x195289[_0x4dfa78(0x1d9)]),'personId':_0x195289['userId'],'resolved':_0x49f81e[_0x4dfa78(0x184)]===I['Solved'],'unitId':_0x2ee5e4,'subUnitId':_0x279b52,'text':JSON[_0x4dfa78(0x1c6)](_0x195289['content']),'parentId':_0x403a51}),_0x5ebaa6=_0x4da43(_0x49f81e[_0x4dfa78(0x1d5)][0x0]);return{..._0x5ebaa6,'children':_0x49f81e[_0x4dfa78(0x1d5)][_0x4dfa78(0x171)](0x1)[_0x4dfa78(0x1cc)](_0x2f854a=>_0x4da43(_0x2f854a,_0x5ebaa6['id']))};}return null;}function _0x8491(_0x2aadaf,_0xf7eb6b){_0x2aadaf=_0x2aadaf-0x16b;const _0x20d329=_0x20d3();let _0x849192=_0x20d329[_0x2aadaf];return _0x849192;}let p=class{constructor(_0x322e62,_0x30dbf2,_0x1cb237){const _0xb07b1f=_0xc938f6;this[_0xb07b1f(0x1a7)]=_0x322e62,this[_0xb07b1f(0x1b3)]=_0x30dbf2,this['_sessionService']=_0x1cb237;}async[_0xc938f6(0x1b6)](_0x2d2307){const _0x39368c=_0xc938f6;var _0x49a2bc,_0x170b07;const {parentId:_0x43a7e8,unitId:_0x15e98f,text:_0x57e494,threadId:_0x945762}=_0x2d2307,_0x389c75=(_0x170b07=(_0x49a2bc=_0x57e494[_0x39368c(0x16c)])==null?void 0x0:_0x49a2bc[_0x39368c(0x174)](_0x40fba9=>_0x40fba9[_0x39368c(0x1b0)]===c[_0x39368c(0x17e)][_0x39368c(0x196)])[_0x39368c(0x1cc)](_0x33eb48=>_0x33eb48[_0x39368c(0x176)]))!=null?_0x170b07:[],_0x2d5cb7=JSON[_0x39368c(0x1ab)](_0x57e494),_0x948412=(await this[_0x39368c(0x1c1)][_0x39368c(0x1ac)](_0x15e98f))[_0x39368c(0x182)]();if(_0x43a7e8){const _0x49c24a={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75,'threadId':_0x945762},_0x57bb46=(await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)]('/universer-api/comment/unit/'+_0x15e98f+_0x39368c(0x17a),{'body':_0x49c24a}))['body'][_0x39368c(0x1d4)];return{..._0x2d2307,'id':_0x57bb46[_0x39368c(0x1a8)],'dT':c[_0x39368c(0x1b2)](+_0x57bb46[_0x39368c(0x1d9)])[_0x39368c(0x197)](_0x39368c(0x1cb)),'personId':_0x57bb46['userId']};}else{const _0x252706={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75},_0x57a920=await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)](_0x39368c(0x183)+_0x15e98f+_0x39368c(0x188),{'body':_0x252706});return Y(_0x57a920['body'][_0x39368c(0x195)],_0x2d2307);}}async[_0xc938f6(0x1d8)](_0x48dde){const _0x3f0c09=_0xc938f6;var _0x5f155a,_0x4ef511;const {text:_0xc7f607,unitId:_0x38441d}=_0x48dde,_0x597b05=(_0x4ef511=(_0x5f155a=_0xc7f607[_0x3f0c09(0x16c)])==null?void 0x0:_0x5f155a[_0x3f0c09(0x174)](_0x2fc186=>_0x2fc186[_0x3f0c09(0x1b0)]===c[_0x3f0c09(0x17e)][_0x3f0c09(0x196)])[_0x3f0c09(0x1cc)](_0x3ffa49=>_0x3ffa49[_0x3f0c09(0x176)]))!=null?_0x4ef511:[],_0x165cef=JSON[_0x3f0c09(0x1ab)](_0xc7f607),_0xb9e493=_0x48dde['threadId'],_0x2034e8=_0x48dde['id'],_0x20bb42={'memberId':(await this[_0x3f0c09(0x1c1)][_0x3f0c09(0x1ac)](_0x38441d))[_0x3f0c09(0x182)](),'unitId':_0x38441d,'threadId':_0xb9e493,'mention':_0x597b05,'content':_0x165cef,'replyId':_0x2034e8},_0x10509a=await this['_httpService'][_0x3f0c09(0x1cd)](_0x3f0c09(0x183)+_0x38441d+_0x3f0c09(0x185),{'body':_0x20bb42});return!_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)]||_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)][_0x3f0c09(0x189)]===0x1;}async[_0xc938f6(0x1aa)](_0x413f5d){const _0x1918ff=_0xc938f6,{unitId:_0x109b99}=_0x413f5d,_0xe38934=_0x413f5d[_0x1918ff(0x1db)],_0x5ba7e1={'memberId':this[_0x1918ff(0x1b3)][_0x1918ff(0x19d)]()[_0x1918ff(0x1d3)],'unitId':_0x109b99,'threadId':_0xe38934,'solved':_0x413f5d[_0x1918ff(0x1ae)]?I['Solved']:I['OpenOrReOpen']},_0x2418b7=await this['_httpService'][_0x1918ff(0x1cd)](_0x1918ff(0x183)+_0x109b99+_0x1918ff(0x19a),{'body':_0x5ba7e1});return!_0x2418b7[_0x1918ff(0x1bb)]['error']||_0x2418b7['body'][_0x1918ff(0x1a3)]['code']===0x1;}async[_0xc938f6(0x1b7)](_0x149d78,_0x309eee,_0x5a4e72,_0x2bd597){const _0x1869ed=_0xc938f6,_0x545a09={'memberId':(await this[_0x1869ed(0x1c1)][_0x1869ed(0x1ac)](_0x149d78))[_0x1869ed(0x182)](),'threadId':_0x5a4e72,'replyId':_0x2bd597,'unitId':_0x149d78},_0x2a2c8b=await this['_httpService'][_0x1869ed(0x1cd)]('/universer-api/comment/unit/'+_0x149d78+'/delete',{'body':_0x545a09});return!_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]||_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]['code']===0x1;}async['listComments'](_0x5dd740,_0x14b4d7,_0x370340){const _0x1752b8=_0xc938f6,_0x349306={'unitId':_0x5dd740,'threadId':_0x370340},_0x1c8c24=await this[_0x1752b8(0x1a7)][_0x1752b8(0x1cd)]('/universer-api/comment/unit/'+_0x5dd740+_0x1752b8(0x18a),{'body':_0x349306}),_0x21eaa3=_0x370340['map'](_0xc4f9e0=>G(_0x1c8c24[_0x1752b8(0x1bb)]['comments'][_0xc4f9e0],_0x5dd740,_0x14b4d7))['filter'](Boolean);return Object[_0x1752b8(0x1b1)](_0x1c8c24['body']['users'])[_0x1752b8(0x1b5)](_0x527b66=>{const _0x2d134c=_0x1752b8;this[_0x2d134c(0x1b3)][_0x2d134c(0x1ca)](_0x527b66);}),_0x21eaa3;}['saveCommentToSnapshot'](_0x1dffdc){const _0x2a4fc2=_0xc938f6;return{'id':_0x1dffdc['id'],'threadId':_0x1dffdc[_0x2a4fc2(0x1db)],'ref':_0x1dffdc[_0x2a4fc2(0x19c)]};}};p=x([C(0x0,c['Inject'](P[_0xc938f6(0x1c9)])),C(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x1bd)])),C(0x2,c[_0xc938f6(0x170)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x139876,_0x48d523,_0xd2761d,_0x5cf572)=>{const _0x10c811=_0xc938f6;for(var _0x430aa9=_0x5cf572>0x1?void 0x0:_0x5cf572?H(_0x48d523,_0xd2761d):_0x48d523,_0xbea806=_0x139876[_0x10c811(0x1b8)]-0x1,_0x357772;_0xbea806>=0x0;_0xbea806--)(_0x357772=_0x139876[_0xbea806])&&(_0x430aa9=_0x357772(_0x430aa9)||_0x430aa9);return _0x430aa9;},y=(_0x1d098b,_0x5a5648)=>(_0x4264c1,_0x234146)=>_0x5a5648(_0x4264c1,_0x234146,_0x1d098b);let g=class extends c[_0xc938f6(0x1be)]{constructor(_0xf4143a,_0x343dd5){const _0x4188e3=_0xc938f6;super(),this['_threadCommentDataSourceService']=_0xf4143a,this[_0x4188e3(0x1cf)]=_0x343dd5,this[_0x4188e3(0x179)]();}[_0xc938f6(0x179)](){const _0x292c9f=_0xc938f6;this['_threadCommentDataSourceService']['dataSource']=this[_0x292c9f(0x1cf)],this['_threadCommentDataSourceService'][_0x292c9f(0x1a1)]=!0x1;}};g=J([y(0x0,M[_0xc938f6(0x1da)]),y(0x1,c[_0xc938f6(0x170)](p))],g);var F=Object[_0xc938f6(0x180)],L=Object[_0xc938f6(0x1de)],Z=(_0x4d478d,_0x15b119,_0x6fa78)=>_0x15b119 in _0x4d478d?F(_0x4d478d,_0x15b119,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6fa78}):_0x4d478d[_0x15b119]=_0x6fa78,W=(_0x4e6a11,_0x30c5a2,_0x35a54e,_0xc67c9f)=>{const _0x2dce32=_0xc938f6;for(var _0x42e268=_0xc67c9f>0x1?void 0x0:_0xc67c9f?L(_0x30c5a2,_0x35a54e):_0x30c5a2,_0x3023a9=_0x4e6a11[_0x2dce32(0x1b8)]-0x1,_0x2462c2;_0x3023a9>=0x0;_0x3023a9--)(_0x2462c2=_0x4e6a11[_0x3023a9])&&(_0x42e268=_0x2462c2(_0x42e268)||_0x42e268);return _0x42e268;},O=(_0x5d4f95,_0x5b3ca6)=>(_0x440f74,_0x8db732)=>_0x5b3ca6(_0x440f74,_0x8db732,_0x5d4f95),N=(_0x2a7795,_0xbe8efa,_0x1e76b0)=>Z(_0x2a7795,typeof _0xbe8efa!='symbol'?_0xbe8efa+'':_0xbe8efa,_0x1e76b0);exports[_0xc938f6(0x1a0)]=class extends c[_0xc938f6(0x1af)]{constructor(_0x2e1ad5=D,_0xda7095,_0x537453){const _0x4c8f50=_0xc938f6;super(),this[_0x4c8f50(0x173)]=_0x2e1ad5,this['_injector']=_0xda7095,this['_configService']=_0x537453;const {..._0x26d0d7}=c[_0x4c8f50(0x198)]({},D,this[_0x4c8f50(0x173)]);this['_configService'][_0x4c8f50(0x17b)](q,_0x26d0d7);}[_0xc938f6(0x193)](){const _0x4c6dc0=_0xc938f6;[[p],[g],[_]][_0x4c6dc0(0x1b5)](_0x36cf9d=>{const _0x25667a=_0x4c6dc0;this[_0x25667a(0x175)]['add'](_0x36cf9d);});}[_0xc938f6(0x1ce)](){const _0x15bb24=_0xc938f6;this[_0x15bb24(0x175)]['get'](g),this[_0x15bb24(0x175)][_0x15bb24(0x17d)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xc938f6(0x1c4),U),N(exports[_0xc938f6(0x1a0)],_0xc938f6(0x186),c[_0xc938f6(0x1dc)]['UNIVER_UNKNOWN']),exports[_0xc938f6(0x1a0)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0xc938f6(0x19f)],T[_0xc938f6(0x17c)]),O(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)])),O(0x2,c['IConfigService'])],exports[_0xc938f6(0x1a0)]);
1
+ 'use strict';const _0x579d36=_0x2c37;(function(_0x70311e,_0x481417){const _0x5c06fd=_0x2c37,_0x92ca55=_0x70311e();while(!![]){try{const _0x427b68=parseInt(_0x5c06fd(0xf2))/0x1+parseInt(_0x5c06fd(0x140))/0x2*(-parseInt(_0x5c06fd(0x139))/0x3)+-parseInt(_0x5c06fd(0x14e))/0x4*(parseInt(_0x5c06fd(0x11c))/0x5)+-parseInt(_0x5c06fd(0x136))/0x6*(parseInt(_0x5c06fd(0x144))/0x7)+parseInt(_0x5c06fd(0xfc))/0x8*(-parseInt(_0x5c06fd(0x129))/0x9)+-parseInt(_0x5c06fd(0x146))/0xa*(-parseInt(_0x5c06fd(0x162))/0xb)+parseInt(_0x5c06fd(0x13d))/0xc*(parseInt(_0x5c06fd(0x138))/0xd);if(_0x427b68===_0x481417)break;else _0x92ca55['push'](_0x92ca55['shift']());}catch(_0x4a74b6){_0x92ca55['push'](_0x92ca55['shift']());}}}(_0x4aa6,0xd160a));function _0x2c37(_0x1f4cb5,_0x5311ee){_0x1f4cb5=_0x1f4cb5-0xea;const _0x4aa675=_0x4aa6();let _0x2c3753=_0x4aa675[_0x1f4cb5];return _0x2c3753;}Object[_0x579d36(0x131)](exports,Symbol[_0x579d36(0x143)],{'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=_0x579d36(0x13c);var I=(_0x2c43fc=>(_0x2c43fc[_0x2c43fc[_0x579d36(0x164)]=0x0]=_0x579d36(0x164),_0x2c43fc[_0x2c43fc[_0x579d36(0x115)]=0x1]=_0x579d36(0x115),_0x2c43fc[_0x2c43fc[_0x579d36(0x159)]=-0x1]=_0x579d36(0x159),_0x2c43fc))(I||{}),v=(_0x316183=>(_0x316183[_0x316183[_0x579d36(0x102)]=0x0]=_0x579d36(0x102),_0x316183[_0x316183['Add']=0x1]=_0x579d36(0x111),_0x316183[_0x316183['Reply']=0x2]=_0x579d36(0x14f),_0x316183[_0x316183[_0x579d36(0xec)]=0x3]=_0x579d36(0xec),_0x316183[_0x316183[_0x579d36(0x126)]=0x4]=_0x579d36(0x126),_0x316183[_0x316183[_0x579d36(0x121)]=0x5]=_0x579d36(0x121),_0x316183[_0x316183[_0x579d36(0x159)]=-0x1]=_0x579d36(0x159),_0x316183))(v||{});const f=_0x31cac4=>c[_0x579d36(0xef)](new Date(+_0x31cac4))[_0x579d36(0x120)](_0x579d36(0xf8)),R=async(_0x119942,_0x9ecdd1)=>{const _0x148fe9=_0x579d36,_0x47d908=_0x119942[_0x148fe9(0x110)](c[_0x148fe9(0x118)]),_0x2b52e2=_0x119942[_0x148fe9(0x110)](P[_0x148fe9(0xfb)]);_0x9ecdd1[_0x148fe9(0x156)](_0x4cde72=>{const _0x214b72=_0x148fe9;_0x47d908['getUser'](_0x4cde72)&&_0x9ecdd1[_0x214b72(0xf5)](_0x4cde72);}),_0x9ecdd1['size']&&(await _0x2b52e2['get'](_0x148fe9(0x10a),{'params':{'userIDs':[..._0x9ecdd1]}}))[_0x148fe9(0xfe)][_0x148fe9(0x11a)]['forEach'](_0x1caba3=>{const _0x4505da=_0x148fe9;_0x1caba3&&_0x47d908[_0x4505da(0xf1)](_0x1caba3);});};var $=Object[_0x579d36(0x124)],E=(_0x14c572,_0x5de675,_0x211fe4,_0x4b1226)=>{const _0x12cb16=_0x579d36;for(var _0x26d32b=_0x4b1226>0x1?void 0x0:_0x4b1226?$(_0x5de675,_0x211fe4):_0x5de675,_0x15a9f5=_0x14c572[_0x12cb16(0x116)]-0x1,_0xa46c3c;_0x15a9f5>=0x0;_0x15a9f5--)(_0xa46c3c=_0x14c572[_0x15a9f5])&&(_0x26d32b=_0xa46c3c(_0x26d32b)||_0x26d32b);return _0x26d32b;},S=(_0x155510,_0x2661fa)=>(_0x26516d,_0x3742b4)=>_0x2661fa(_0x26516d,_0x3742b4,_0x155510);let _=class extends c['Disposable']{constructor(_0x478b1e,_0x54ef11,_0x9eb02,_0x15f325){const _0x2110fa=_0x579d36;super(),this['_commentService']=_0x478b1e,this[_0x2110fa(0x113)]=_0x54ef11,this['_userService']=_0x9eb02,this[_0x2110fa(0xf0)]=_0x15f325,this[_0x2110fa(0xf9)](),this[_0x2110fa(0x12a)]();}[_0x579d36(0x12a)](){const _0x4ad663=_0x579d36;this['disposeWithMe'](this[_0x4ad663(0x113)][_0x4ad663(0x12d)][_0x4ad663(0x114)](j[_0x4ad663(0x13f)](0x10))[_0x4ad663(0x142)](_0x1d894f=>{const _0x49f28b=_0x4ad663,_0x485091=new Set();_0x1d894f['forEach'](_0x24c8c2=>{const _0x1470b1=_0x2c37;switch(_0x24c8c2[_0x1470b1(0x154)]){case _0x1470b1(0x100):{const _0x203025=_0x24c8c2['payload']['personId'];_0x485091[_0x1470b1(0x100)](_0x203025);break;}}}),R(this[_0x49f28b(0xf0)],_0x485091);}));}['_init'](){const _0x35ed19=_0x579d36;this[_0x35ed19(0x141)](this['_commentService'][_0x35ed19(0x12d)][_0x35ed19(0x142)](async _0x268292=>{const _0x168c97=_0x35ed19;var _0x48f1e5,_0x3dd079,_0x1315fc,_0x5dec41;const _0x4dcf5e=(_0x48f1e5=this['_threadCommentModel'][_0x168c97(0xf6)](_0x268292['unitId'])[_0x168c97(0x109)](_0x5b7db5=>_0x5b7db5[_0x168c97(0x133)]===_0x268292[_0x168c97(0x133)]))==null?void 0x0:_0x48f1e5[_0x168c97(0x105)];if(!_0x4dcf5e)return;const {unitId:_0xe56ff3,subUnitId:_0x54c728}=_0x4dcf5e;switch(_0x268292[_0x168c97(0x163)]&&this['_userService'][_0x168c97(0xf1)](_0x268292[_0x168c97(0x163)]),_0x268292[_0x168c97(0x154)]){case v['Add']:break;case v[_0x168c97(0x14f)]:{this[_0x168c97(0x113)][_0x168c97(0x147)](_0xe56ff3,_0x54c728,{'unitId':_0xe56ff3,'subUnitId':_0x54c728,'ref':'','id':_0x268292[_0x168c97(0x13b)],'dT':f(+_0x268292[_0x168c97(0x11d)]),'threadId':_0x268292[_0x168c97(0x133)],'personId':(_0x1315fc=(_0x3dd079=_0x268292[_0x168c97(0x163)])==null?void 0x0:_0x3dd079['userID'])!=null?_0x1315fc:_0x268292['userId'],'text':JSON[_0x168c97(0x149)](_0x268292[_0x168c97(0x12c)]),'parentId':_0x4dcf5e['id']});break;}case v[_0x168c97(0x126)]:{const _0x1853e0=this[_0x168c97(0x113)][_0x168c97(0x15f)](_0xe56ff3,_0x54c728,_0x268292['replyId']);_0x1853e0&&_0x1853e0['parentId']&&this[_0x168c97(0x113)]['deleteComment'](_0xe56ff3,_0x54c728,_0x268292[_0x168c97(0x13b)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x168c97(0x13e)](_0xe56ff3,_0x54c728,{'commentId':_0x268292[_0x168c97(0x13b)],'text':JSON[_0x168c97(0x149)](_0x268292[_0x168c97(0x12c)])});break;}case v[_0x168c97(0x121)]:{const _0x37548e=(_0x5dec41=this[_0x168c97(0x113)]['getUnit'](_0x268292['unitId'])[_0x168c97(0x109)](_0x930446=>_0x930446['threadId']===_0x268292[_0x168c97(0x133)]))==null?void 0x0:_0x5dec41[_0x168c97(0x105)];_0x37548e&&this[_0x168c97(0x113)][_0x168c97(0x13a)](_0xe56ff3,_0x54c728,_0x37548e['id'],_0x268292[_0x168c97(0x132)]===I[_0x168c97(0x115)]);break;}}}));}};_=E([S(0x0,c[_0x579d36(0x12b)](b[_0x579d36(0xf7)])),S(0x1,c[_0x579d36(0x12b)](M[_0x579d36(0x161)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x579d36(0x12b)](c[_0x579d36(0xee)]))],_);const q=_0x579d36(0x160),D={};var A=Object[_0x579d36(0x124)],x=(_0x130124,_0x58fa8b,_0x258828,_0x517956)=>{const _0x48f25a=_0x579d36;for(var _0x54c9ef=_0x517956>0x1?void 0x0:_0x517956?A(_0x58fa8b,_0x258828):_0x58fa8b,_0x430d47=_0x130124[_0x48f25a(0x116)]-0x1,_0x36d640;_0x430d47>=0x0;_0x430d47--)(_0x36d640=_0x130124[_0x430d47])&&(_0x54c9ef=_0x36d640(_0x54c9ef)||_0x54c9ef);return _0x54c9ef;},C=(_0x4e2857,_0x3de859)=>(_0x189736,_0x2d32a3)=>_0x3de859(_0x189736,_0x2d32a3,_0x4e2857);function Y(_0x5a246b,_0x1ddbd7){const _0x5e6954=_0x579d36,_0x5b69ca=_0x5a246b[_0x5e6954(0xfa)][0x0];return{..._0x1ddbd7,'id':_0x5b69ca[_0x5e6954(0x13b)],'resolved':_0x5a246b[_0x5e6954(0x132)]===0x1,'dT':f(_0x5b69ca[_0x5e6954(0x11d)]),'personId':_0x5b69ca[_0x5e6954(0x150)],'threadId':_0x5b69ca[_0x5e6954(0x133)]};}function G(_0x15e7f6,_0x1775e3,_0x349546){const _0x1f4c8e=_0x579d36;var _0x517e64,_0x2cccb2;if(((_0x2cccb2=(_0x517e64=_0x15e7f6==null?void 0x0:_0x15e7f6['replies'])==null?void 0x0:_0x517e64[_0x1f4c8e(0x116)])!=null?_0x2cccb2:0x0)>0x0){const _0x2a0d73=(_0x448027,_0xa0032f)=>({'id':_0x448027[_0x1f4c8e(0x13b)],'threadId':_0x448027[_0x1f4c8e(0x133)],'dT':f(_0x448027['createTimestamp']),'personId':_0x448027[_0x1f4c8e(0x150)],'resolved':_0x15e7f6[_0x1f4c8e(0x132)]===I[_0x1f4c8e(0x115)],'unitId':_0x1775e3,'subUnitId':_0x349546,'text':JSON[_0x1f4c8e(0x149)](_0x448027[_0x1f4c8e(0x12c)]),'parentId':_0xa0032f}),_0x56aae1=_0x2a0d73(_0x15e7f6[_0x1f4c8e(0xfa)][0x0]);return{..._0x56aae1,'children':_0x15e7f6[_0x1f4c8e(0xfa)][_0x1f4c8e(0x14c)](0x1)[_0x1f4c8e(0x10e)](_0x19801a=>_0x2a0d73(_0x19801a,_0x56aae1['id']))};}return null;}let p=class{constructor(_0x23a5f4,_0x36af16,_0x360710){const _0x179fb1=_0x579d36;this['_httpService']=_0x23a5f4,this[_0x179fb1(0x158)]=_0x36af16,this['_sessionService']=_0x360710;}async[_0x579d36(0x147)](_0xd5ddff){const _0x120447=_0x579d36;var _0x2c0585,_0x1818cb;const {parentId:_0x2b8784,unitId:_0x964da6,text:_0x1f6479,threadId:_0x3dfe86}=_0xd5ddff,_0xfab8d=(_0x1818cb=(_0x2c0585=_0x1f6479[_0x120447(0x14d)])==null?void 0x0:_0x2c0585[_0x120447(0x117)](_0x111dd7=>_0x111dd7[_0x120447(0xf3)]===c[_0x120447(0xea)][_0x120447(0x123)])[_0x120447(0x10e)](_0x3c92e5=>_0x3c92e5['rangeId']))!=null?_0x1818cb:[],_0x596832=JSON['stringify'](_0x1f6479),_0x59d07f=(await this[_0x120447(0x119)][_0x120447(0xff)](_0x964da6))[_0x120447(0x15b)]();if(_0x2b8784){const _0x4e9df4={'memberId':_0x59d07f,'unitId':_0x964da6,'content':_0x596832,'mention':_0xfab8d,'threadId':_0x3dfe86},_0x264146=(await this['_httpService'][_0x120447(0x101)](_0x120447(0x127)+_0x964da6+_0x120447(0x137),{'body':_0x4e9df4}))[_0x120447(0xfe)][_0x120447(0x128)];return{..._0xd5ddff,'id':_0x264146[_0x120447(0x13b)],'dT':c[_0x120447(0xef)](+_0x264146['createTimestamp'])[_0x120447(0x120)](_0x120447(0xf8)),'personId':_0x264146[_0x120447(0x150)]};}else{const _0x570ec4={'memberId':_0x59d07f,'unitId':_0x964da6,'content':_0x596832,'mention':_0xfab8d},_0x4c8c8e=await this[_0x120447(0x10c)]['post'](_0x120447(0x127)+_0x964da6+'/add',{'body':_0x570ec4});return Y(_0x4c8c8e[_0x120447(0xfe)]['comment'],_0xd5ddff);}}async['updateComment'](_0x6faaf7){const _0x2d0b0d=_0x579d36;var _0x3d5738,_0xdc934b;const {text:_0x1c3dcb,unitId:_0x5ea334}=_0x6faaf7,_0x5db2f0=(_0xdc934b=(_0x3d5738=_0x1c3dcb['customRanges'])==null?void 0x0:_0x3d5738[_0x2d0b0d(0x117)](_0x325776=>_0x325776[_0x2d0b0d(0xf3)]===c[_0x2d0b0d(0xea)][_0x2d0b0d(0x123)])[_0x2d0b0d(0x10e)](_0x174845=>_0x174845[_0x2d0b0d(0x125)]))!=null?_0xdc934b:[],_0x345717=JSON[_0x2d0b0d(0x14a)](_0x1c3dcb),_0x47f90a=_0x6faaf7[_0x2d0b0d(0x133)],_0x445235=_0x6faaf7['id'],_0x2d1c81={'memberId':(await this[_0x2d0b0d(0x119)]['requireSession'](_0x5ea334))[_0x2d0b0d(0x15b)](),'unitId':_0x5ea334,'threadId':_0x47f90a,'mention':_0x5db2f0,'content':_0x345717,'replyId':_0x445235},_0x9e0abb=await this[_0x2d0b0d(0x10c)]['post']('/universer-api/comment/unit/'+_0x5ea334+_0x2d0b0d(0x10f),{'body':_0x2d1c81});return!_0x9e0abb[_0x2d0b0d(0xfe)][_0x2d0b0d(0x107)]||_0x9e0abb[_0x2d0b0d(0xfe)][_0x2d0b0d(0x107)][_0x2d0b0d(0x106)]===0x1;}async[_0x579d36(0x13a)](_0x48c1a9){const _0x159941=_0x579d36,{unitId:_0x5c97b1}=_0x48c1a9,_0x8c5afb=_0x48c1a9[_0x159941(0x133)],_0x215055={'memberId':this[_0x159941(0x158)][_0x159941(0x122)]()[_0x159941(0x112)],'unitId':_0x5c97b1,'threadId':_0x8c5afb,'solved':_0x48c1a9[_0x159941(0x10d)]?I[_0x159941(0x115)]:I['OpenOrReOpen']},_0x199009=await this[_0x159941(0x10c)][_0x159941(0x101)]('/universer-api/comment/unit/'+_0x5c97b1+_0x159941(0x145),{'body':_0x215055});return!_0x199009[_0x159941(0xfe)][_0x159941(0x107)]||_0x199009[_0x159941(0xfe)]['error']['code']===0x1;}async['deleteComment'](_0x1ae354,_0x52ef47,_0x466947,_0x437135){const _0x1ce337=_0x579d36,_0x4d8c7b={'memberId':(await this['_sessionService'][_0x1ce337(0xff)](_0x1ae354))[_0x1ce337(0x15b)](),'threadId':_0x466947,'replyId':_0x437135,'unitId':_0x1ae354},_0x52c5f2=await this[_0x1ce337(0x10c)][_0x1ce337(0x101)]('/universer-api/comment/unit/'+_0x1ae354+_0x1ce337(0x15c),{'body':_0x4d8c7b});return!_0x52c5f2[_0x1ce337(0xfe)][_0x1ce337(0x107)]||_0x52c5f2['body'][_0x1ce337(0x107)][_0x1ce337(0x106)]===0x1;}async[_0x579d36(0x10b)](_0x3bb621,_0x31ef14,_0xabdd5d){const _0x40736b=_0x579d36,_0x37e54f={'unitId':_0x3bb621,'threadId':_0xabdd5d},_0x5ee48d=await this[_0x40736b(0x10c)][_0x40736b(0x101)](_0x40736b(0x127)+_0x3bb621+_0x40736b(0x15a),{'body':_0x37e54f}),_0x171397=_0xabdd5d[_0x40736b(0x10e)](_0x6da049=>G(_0x5ee48d['body'][_0x40736b(0x14b)][_0x6da049],_0x3bb621,_0x31ef14))['filter'](Boolean);return Object[_0x40736b(0xfd)](_0x5ee48d[_0x40736b(0xfe)][_0x40736b(0x11a)])[_0x40736b(0x156)](_0x48e7db=>{const _0x2d6db1=_0x40736b;this[_0x2d6db1(0x158)][_0x2d6db1(0xf1)](_0x48e7db);}),_0x171397;}[_0x579d36(0xed)](_0x5b032b){const _0xa0ec64=_0x579d36;return{'id':_0x5b032b['id'],'threadId':_0x5b032b[_0xa0ec64(0x133)],'ref':_0x5b032b[_0xa0ec64(0x130)]};}};p=x([C(0x0,c[_0x579d36(0x12b)](P[_0x579d36(0xfb)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x579d36(0x12b)](b[_0x579d36(0x155)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x4553ad,_0x25e457,_0x343005,_0x1d8840)=>{const _0x19a47e=_0x579d36;for(var _0x140a81=_0x1d8840>0x1?void 0x0:_0x1d8840?H(_0x25e457,_0x343005):_0x25e457,_0x5ee7d0=_0x4553ad[_0x19a47e(0x116)]-0x1,_0x65c084;_0x5ee7d0>=0x0;_0x5ee7d0--)(_0x65c084=_0x4553ad[_0x5ee7d0])&&(_0x140a81=_0x65c084(_0x140a81)||_0x140a81);return _0x140a81;},y=(_0x58ec2b,_0x247d69)=>(_0x34d1fa,_0x2a2f39)=>_0x247d69(_0x34d1fa,_0x2a2f39,_0x58ec2b);let g=class extends c['Disposable']{constructor(_0x1b5e3d,_0x533e1d){const _0x1cdc09=_0x579d36;super(),this[_0x1cdc09(0x152)]=_0x1b5e3d,this[_0x1cdc09(0x11b)]=_0x533e1d,this[_0x1cdc09(0x104)]();}[_0x579d36(0x104)](){const _0x1ef151=_0x579d36;this[_0x1ef151(0x152)][_0x1ef151(0xf4)]=this[_0x1ef151(0x11b)],this[_0x1ef151(0x152)][_0x1ef151(0x151)]=!0x1;}};g=J([y(0x0,M[_0x579d36(0x108)]),y(0x1,c[_0x579d36(0x12b)](p))],g);var F=Object['defineProperty'],L=Object[_0x579d36(0x124)],Z=(_0x5089f8,_0x1be0c1,_0x5f45d0)=>_0x1be0c1 in _0x5089f8?F(_0x5089f8,_0x1be0c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f45d0}):_0x5089f8[_0x1be0c1]=_0x5f45d0,W=(_0x3b0802,_0x11a667,_0x146210,_0x3835dd)=>{const _0x331ca6=_0x579d36;for(var _0x57676a=_0x3835dd>0x1?void 0x0:_0x3835dd?L(_0x11a667,_0x146210):_0x11a667,_0x1fb751=_0x3b0802[_0x331ca6(0x116)]-0x1,_0x4eccec;_0x1fb751>=0x0;_0x1fb751--)(_0x4eccec=_0x3b0802[_0x1fb751])&&(_0x57676a=_0x4eccec(_0x57676a)||_0x57676a);return _0x57676a;},O=(_0x5741d7,_0x27ad9b)=>(_0x18cce0,_0x4a4992)=>_0x27ad9b(_0x18cce0,_0x4a4992,_0x5741d7),N=(_0x1929c7,_0x37e28d,_0x17697b)=>Z(_0x1929c7,typeof _0x37e28d!=_0x579d36(0x11e)?_0x37e28d+'':_0x37e28d,_0x17697b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x579d36(0x135)]{constructor(_0x135806=D,_0x42a264,_0x5e7e3f){const _0x57a479=_0x579d36;super(),this[_0x57a479(0x11f)]=_0x135806,this[_0x57a479(0xf0)]=_0x42a264,this[_0x57a479(0x12f)]=_0x5e7e3f;const {..._0x3ee6e2}=c[_0x57a479(0x148)]({},D,this['_config']);this['_configService'][_0x57a479(0x134)](q,_0x3ee6e2);}[_0x579d36(0xeb)](){const _0x3e4fe2=_0x579d36;[[p],[g],[_]][_0x3e4fe2(0x156)](_0x37344f=>{const _0x466d64=_0x3e4fe2;this[_0x466d64(0xf0)][_0x466d64(0x100)](_0x37344f);});}['onReady'](){const _0x521309=_0x579d36;this[_0x521309(0xf0)][_0x521309(0x110)](g),this[_0x521309(0xf0)]['get'](_);}},N(exports[_0x579d36(0x12e)],_0x579d36(0x15d),U),N(exports[_0x579d36(0x12e)],_0x579d36(0x154),c[_0x579d36(0x153)][_0x579d36(0x157)]),exports[_0x579d36(0x12e)]=W([c[_0x579d36(0x103)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x579d36(0x12b)](c['Injector'])),O(0x2,c[_0x579d36(0x15e)])],exports[_0x579d36(0x12e)]);function _0x4aa6(){const _0x2d71f0=['get','Add','userID','_threadCommentModel','pipe','Solved','length','filter','UserManagerService','_sessionService','users','_threadCommentDataSource','5NTzrMz','createTimestamp','symbol','_config','format','Solve','getCurrentUser','COMMENT','getOwnPropertyDescriptor','rangeId','Delete','/universer-api/comment/unit/','reply','2974644qLtDnS','_initUserSync','Inject','content','commentUpdate$','UniverThreadCommentDataSourcePlugin','_configService','ref','defineProperty','solved','threadId','setConfig','Plugin','414qZReTx','/reply','50278046vnCATG','16278MeXQto','resolveComment','replyId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','12zJBquM','updateComment','bufferTime','326PdEmJw','disposeWithMe','subscribe','toStringTag','153559FWyKFc','/solved','20dUTUOX','addComment','merge','parse','stringify','comments','slice','customRanges','6717324dxiDHM','Reply','userId','syncUpdateMutationToColla','_threadCommentDataSourceService','UniverInstanceType','type','CollaborationSessionService','forEach','UNIVER_UNKNOWN','_userService','UNRECOGNIZED','/list','getMemberID','/delete','pluginName','IConfigService','getComment','thread-comment-data-source.config','ThreadCommentModel','5956379uvxpFG','user','OpenOrReOpen','CustomRangeType','onStarting','Edit','saveCommentToSnapshot','Injector','dayjs','_injector','addUser','1637092eahgcp','rangeType','dataSource','delete','getUnit','CommentService','YYYY/MM/DD\x20HH:mm','_init','replies','HTTPService','40eusHbF','values','body','requireSession','add','post','Unknown','DependentOn','_initDataSource','root','code','error','IThreadCommentDataSourceService','find','/universer-api/user/list','listComments','_httpService','resolved','map','/edit'];_0x4aa6=function(){return _0x2d71f0;};return _0x4aa6();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3cd8c3=_0x5246;(function(_0x303c41,_0x5ab185){const _0x3c7fba=_0x5246,_0x4c0178=_0x303c41();while(!![]){try{const _0x53092c=-parseInt(_0x3c7fba(0xec))/0x1*(parseInt(_0x3c7fba(0x128))/0x2)+parseInt(_0x3c7fba(0x113))/0x3+-parseInt(_0x3c7fba(0xfb))/0x4*(-parseInt(_0x3c7fba(0x115))/0x5)+-parseInt(_0x3c7fba(0x10b))/0x6*(-parseInt(_0x3c7fba(0xe3))/0x7)+parseInt(_0x3c7fba(0x102))/0x8+parseInt(_0x3c7fba(0x11c))/0x9*(parseInt(_0x3c7fba(0x13e))/0xa)+-parseInt(_0x3c7fba(0xee))/0xb;if(_0x53092c===_0x5ab185)break;else _0x4c0178['push'](_0x4c0178['shift']());}catch(_0x49af91){_0x4c0178['push'](_0x4c0178['shift']());}}}(_0xd3eb,0x6e342));import{CommentService as _0x12372b,CollaborationSessionService as _0x13af67,UniverCollaborationClientPlugin as _0xebf8a9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x27609b}from'@univerjs-pro/license';import{dayjs as _0x1bdee6,UserManagerService as _0x948e73,Inject as _0x25eae3,Injector as _0x245dbf,Disposable as _0x2250bd,CustomRangeType as _0x438108,UniverInstanceType as _0x3622ec,DependentOn as _0x4a67e7,IConfigService as _0x3d1f60,Plugin as _0x11527a,merge as _0xfb99a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x167a39}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25573b,IThreadCommentDataSourceService as _0x2d1481}from'@univerjs/thread-comment';import{bufferTime as _0x5b44d5}from'rxjs';import{HTTPService as _0x290f9b}from'@univerjs/network';const W=_0x3cd8c3(0x11f);var I=(_0x4343d7=>(_0x4343d7[_0x4343d7['OpenOrReOpen']=0x0]=_0x3cd8c3(0x140),_0x4343d7[_0x4343d7['Solved']=0x1]=_0x3cd8c3(0x122),_0x4343d7[_0x4343d7['UNRECOGNIZED']=-0x1]=_0x3cd8c3(0x10c),_0x4343d7))(I||{}),v=(_0x57c5df=>(_0x57c5df[_0x57c5df[_0x3cd8c3(0xe9)]=0x0]=_0x3cd8c3(0xe9),_0x57c5df[_0x57c5df[_0x3cd8c3(0x11a)]=0x1]=_0x3cd8c3(0x11a),_0x57c5df[_0x57c5df['Reply']=0x2]=_0x3cd8c3(0xf6),_0x57c5df[_0x57c5df[_0x3cd8c3(0xf1)]=0x3]=_0x3cd8c3(0xf1),_0x57c5df[_0x57c5df[_0x3cd8c3(0xeb)]=0x4]=_0x3cd8c3(0xeb),_0x57c5df[_0x57c5df['Solve']=0x5]=_0x3cd8c3(0xe6),_0x57c5df[_0x57c5df[_0x3cd8c3(0x10c)]=-0x1]=_0x3cd8c3(0x10c),_0x57c5df))(v||{});const y=_0xbaf0a7=>_0x1bdee6(new Date(+_0xbaf0a7))[_0x3cd8c3(0x144)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bf735,_0x268c59)=>{const _0x2d1f71=_0x3cd8c3,_0x32c3f0=_0x3bf735['get'](_0x948e73),_0x5207ca=_0x3bf735[_0x2d1f71(0x11d)](_0x290f9b);_0x268c59[_0x2d1f71(0x145)](_0x31cd7b=>{const _0x469caa=_0x2d1f71;_0x32c3f0[_0x469caa(0x126)](_0x31cd7b)&&_0x268c59[_0x469caa(0x134)](_0x31cd7b);}),_0x268c59['size']&&(await _0x5207ca[_0x2d1f71(0x11d)](_0x2d1f71(0x124),{'params':{'userIDs':[..._0x268c59]}}))[_0x2d1f71(0x106)]['users'][_0x2d1f71(0x145)](_0x265ec3=>{const _0x346896=_0x2d1f71;_0x265ec3&&_0x32c3f0[_0x346896(0x137)](_0x265ec3);});};var K=Object[_0x3cd8c3(0x121)],V=(_0x8001a2,_0x42a89b,_0x3525f8,_0x4714e4)=>{const _0x4d6f24=_0x3cd8c3;for(var _0x1620bb=_0x4714e4>0x1?void 0x0:_0x4714e4?K(_0x42a89b,_0x3525f8):_0x42a89b,_0x4ff418=_0x8001a2[_0x4d6f24(0x10a)]-0x1,_0xaff0fb;_0x4ff418>=0x0;_0x4ff418--)(_0xaff0fb=_0x8001a2[_0x4ff418])&&(_0x1620bb=_0xaff0fb(_0x1620bb)||_0x1620bb);return _0x1620bb;},p=(_0x2cf1db,_0x394f2d)=>(_0x1dfb0e,_0xc385c6)=>_0x394f2d(_0x1dfb0e,_0xc385c6,_0x2cf1db);let _=class extends _0x2250bd{constructor(_0x664652,_0x1eba39,_0x364cc6,_0x5a46e6){const _0x3af1b2=_0x3cd8c3;super(),this[_0x3af1b2(0x111)]=_0x664652,this[_0x3af1b2(0xe7)]=_0x1eba39,this[_0x3af1b2(0x112)]=_0x364cc6,this['_injector']=_0x5a46e6,this[_0x3af1b2(0xea)](),this[_0x3af1b2(0x109)]();}[_0x3cd8c3(0x109)](){const _0xf568b1=_0x3cd8c3;this['disposeWithMe'](this[_0xf568b1(0xe7)][_0xf568b1(0x133)][_0xf568b1(0x103)](_0x5b44d5(0x10))[_0xf568b1(0x13d)](_0x1f84c9=>{const _0x1c7740=_0xf568b1,_0x548c18=new Set();_0x1f84c9[_0x1c7740(0x145)](_0xce5b0d=>{const _0x3eb078=_0x1c7740;switch(_0xce5b0d[_0x3eb078(0x138)]){case _0x3eb078(0x132):{const _0x3cbbd5=_0xce5b0d[_0x3eb078(0x116)][_0x3eb078(0x149)];_0x548c18[_0x3eb078(0x132)](_0x3cbbd5);break;}}}),B(this[_0x1c7740(0x139)],_0x548c18);}));}[_0x3cd8c3(0xea)](){const _0x3d9c45=_0x3cd8c3;this[_0x3d9c45(0xfa)](this[_0x3d9c45(0x111)][_0x3d9c45(0x133)][_0x3d9c45(0x13d)](async _0x49c116=>{const _0xd97adc=_0x3d9c45;var _0x1a6c15,_0x19e6f9,_0x7f824c,_0x3301c1;const _0x2889a3=(_0x1a6c15=this[_0xd97adc(0xe7)]['getUnit'](_0x49c116[_0xd97adc(0x117)])['find'](_0x36866c=>_0x36866c['threadId']===_0x49c116[_0xd97adc(0x119)]))==null?void 0x0:_0x1a6c15[_0xd97adc(0xf7)];if(!_0x2889a3)return;const {unitId:_0x870ed,subUnitId:_0x3b12ee}=_0x2889a3;switch(_0x49c116[_0xd97adc(0x10d)]&&this[_0xd97adc(0x112)][_0xd97adc(0x137)](_0x49c116[_0xd97adc(0x10d)]),_0x49c116[_0xd97adc(0x138)]){case v[_0xd97adc(0x11a)]:break;case v[_0xd97adc(0xf6)]:{this['_threadCommentModel'][_0xd97adc(0x10f)](_0x870ed,_0x3b12ee,{'unitId':_0x870ed,'subUnitId':_0x3b12ee,'ref':'','id':_0x49c116[_0xd97adc(0x13f)],'dT':y(+_0x49c116[_0xd97adc(0x13a)]),'threadId':_0x49c116[_0xd97adc(0x119)],'personId':(_0x7f824c=(_0x19e6f9=_0x49c116[_0xd97adc(0x10d)])==null?void 0x0:_0x19e6f9['userID'])!=null?_0x7f824c:_0x49c116['userId'],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)]),'parentId':_0x2889a3['id']});break;}case v[_0xd97adc(0xeb)]:{const _0x4e455e=this[_0xd97adc(0xe7)][_0xd97adc(0x108)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);_0x4e455e&&_0x4e455e[_0xd97adc(0x100)]&&this[_0xd97adc(0xe7)][_0xd97adc(0x110)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);break;}case v[_0xd97adc(0xf1)]:{this[_0xd97adc(0xe7)]['updateComment'](_0x870ed,_0x3b12ee,{'commentId':_0x49c116[_0xd97adc(0x13f)],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)])});break;}case v[_0xd97adc(0xe6)]:{const _0x20112e=(_0x3301c1=this[_0xd97adc(0xe7)][_0xd97adc(0x129)](_0x49c116['unitId'])['find'](_0x4d40c3=>_0x4d40c3[_0xd97adc(0x119)]===_0x49c116['threadId']))==null?void 0x0:_0x3301c1[_0xd97adc(0xf7)];_0x20112e&&this[_0xd97adc(0xe7)]['resolveComment'](_0x870ed,_0x3b12ee,_0x20112e['id'],_0x49c116[_0xd97adc(0x11b)]===I[_0xd97adc(0x122)]);break;}}}));}};_=V([p(0x0,_0x25eae3(_0x12372b)),p(0x1,_0x25eae3(_0x25573b)),p(0x2,_0x25eae3(_0x948e73)),p(0x3,_0x25eae3(_0x245dbf))],_);function _0x5246(_0x329e47,_0x18a5bb){_0x329e47=_0x329e47-0xe2;const _0xd3eba=_0xd3eb();let _0x52460b=_0xd3eba[_0x329e47];return _0x52460b;}const z=_0x3cd8c3(0x141),O={};var k=Object[_0x3cd8c3(0x121)],Q=(_0x546993,_0x3b008f,_0x5d2cd9,_0x3b0c37)=>{const _0x5edb3f=_0x3cd8c3;for(var _0x79483b=_0x3b0c37>0x1?void 0x0:_0x3b0c37?k(_0x3b008f,_0x5d2cd9):_0x3b008f,_0x58fad3=_0x546993[_0x5edb3f(0x10a)]-0x1,_0x534c47;_0x58fad3>=0x0;_0x58fad3--)(_0x534c47=_0x546993[_0x58fad3])&&(_0x79483b=_0x534c47(_0x79483b)||_0x79483b);return _0x79483b;},b=(_0xa55114,_0x19c916)=>(_0x2bb6d7,_0x4a650d)=>_0x19c916(_0x2bb6d7,_0x4a650d,_0xa55114);function X(_0x1dd8c2,_0x41b9c6){const _0xd7b116=_0x3cd8c3,_0x4d703c=_0x1dd8c2[_0xd7b116(0xfe)][0x0];return{..._0x41b9c6,'id':_0x4d703c[_0xd7b116(0x13f)],'resolved':_0x1dd8c2[_0xd7b116(0x11b)]===0x1,'dT':y(_0x4d703c[_0xd7b116(0x13a)]),'personId':_0x4d703c[_0xd7b116(0xf5)],'threadId':_0x4d703c[_0xd7b116(0x119)]};}function ee(_0x2c613b,_0x46cb6d,_0x3546e4){const _0x4b4906=_0x3cd8c3;var _0x491973,_0x2b84de;if(((_0x2b84de=(_0x491973=_0x2c613b==null?void 0x0:_0x2c613b[_0x4b4906(0xfe)])==null?void 0x0:_0x491973[_0x4b4906(0x10a)])!=null?_0x2b84de:0x0)>0x0){const _0x531dce=(_0x34a178,_0x40ba87)=>({'id':_0x34a178[_0x4b4906(0x13f)],'threadId':_0x34a178[_0x4b4906(0x119)],'dT':y(_0x34a178[_0x4b4906(0x13a)]),'personId':_0x34a178['userId'],'resolved':_0x2c613b[_0x4b4906(0x11b)]===I[_0x4b4906(0x122)],'unitId':_0x46cb6d,'subUnitId':_0x3546e4,'text':JSON[_0x4b4906(0x148)](_0x34a178[_0x4b4906(0x125)]),'parentId':_0x40ba87}),_0x4d8f36=_0x531dce(_0x2c613b[_0x4b4906(0xfe)][0x0]);return{..._0x4d8f36,'children':_0x2c613b['replies'][_0x4b4906(0x142)](0x1)[_0x4b4906(0xff)](_0x5a5063=>_0x531dce(_0x5a5063,_0x4d8f36['id']))};}return null;}let S=class{constructor(_0x435483,_0x551482,_0x45502d){const _0x1ef87e=_0x3cd8c3;this[_0x1ef87e(0xf3)]=_0x435483,this['_userService']=_0x551482,this[_0x1ef87e(0x11e)]=_0x45502d;}async['addComment'](_0x4c6bc6){const _0x405b9c=_0x3cd8c3;var _0x23a6e3,_0xf3bcee;const {parentId:_0x8c6f0b,unitId:_0x254788,text:_0x2e842c,threadId:_0x3981aa}=_0x4c6bc6,_0x838d6=(_0xf3bcee=(_0x23a6e3=_0x2e842c['customRanges'])==null?void 0x0:_0x23a6e3['filter'](_0x59f64b=>_0x59f64b[_0x405b9c(0x118)]===_0x438108[_0x405b9c(0x131)])[_0x405b9c(0xff)](_0x16df6c=>_0x16df6c[_0x405b9c(0xf9)]))!=null?_0xf3bcee:[],_0x4cc774=JSON['stringify'](_0x2e842c),_0xa5c1be=(await this[_0x405b9c(0x11e)][_0x405b9c(0x13b)](_0x254788))[_0x405b9c(0x10e)]();if(_0x8c6f0b){const _0x2cab31={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6,'threadId':_0x3981aa},_0xb13c66=(await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x130),{'body':_0x2cab31}))[_0x405b9c(0x106)][_0x405b9c(0x12b)];return{..._0x4c6bc6,'id':_0xb13c66['replyId'],'dT':_0x1bdee6(+_0xb13c66[_0x405b9c(0x13a)])[_0x405b9c(0x144)](_0x405b9c(0x146)),'personId':_0xb13c66[_0x405b9c(0xf5)]};}else{const _0x46c38b={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6},_0x6f9736=await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x114),{'body':_0x46c38b});return X(_0x6f9736['body']['comment'],_0x4c6bc6);}}async[_0x3cd8c3(0xf2)](_0x570f80){const _0x4aac2f=_0x3cd8c3;var _0x3f0bdd,_0x5cb2c7;const {text:_0x188382,unitId:_0x2132d0}=_0x570f80,_0x177849=(_0x5cb2c7=(_0x3f0bdd=_0x188382[_0x4aac2f(0x120)])==null?void 0x0:_0x3f0bdd[_0x4aac2f(0xfd)](_0x51a59d=>_0x51a59d[_0x4aac2f(0x118)]===_0x438108['COMMENT'])[_0x4aac2f(0xff)](_0x599114=>_0x599114['rangeId']))!=null?_0x5cb2c7:[],_0x469ce6=JSON[_0x4aac2f(0x123)](_0x188382),_0x272a73=_0x570f80['threadId'],_0x6b428b=_0x570f80['id'],_0x3a9c89={'memberId':(await this[_0x4aac2f(0x11e)][_0x4aac2f(0x13b)](_0x2132d0))[_0x4aac2f(0x10e)](),'unitId':_0x2132d0,'threadId':_0x272a73,'mention':_0x177849,'content':_0x469ce6,'replyId':_0x6b428b},_0x738c07=await this[_0x4aac2f(0xf3)][_0x4aac2f(0xef)](_0x4aac2f(0xed)+_0x2132d0+'/edit',{'body':_0x3a9c89});return!_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)]||_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)][_0x4aac2f(0xfc)]===0x1;}async[_0x3cd8c3(0x101)](_0xbc399d){const _0x391083=_0x3cd8c3,{unitId:_0x3a39c8}=_0xbc399d,_0x532295=_0xbc399d['threadId'],_0x222aa5={'memberId':this[_0x391083(0x112)][_0x391083(0x136)]()[_0x391083(0xe8)],'unitId':_0x3a39c8,'threadId':_0x532295,'solved':_0xbc399d['resolved']?I[_0x391083(0x122)]:I['OpenOrReOpen']},_0x262844=await this[_0x391083(0xf3)][_0x391083(0xef)](_0x391083(0xed)+_0x3a39c8+_0x391083(0x12e),{'body':_0x222aa5});return!_0x262844['body'][_0x391083(0x12c)]||_0x262844[_0x391083(0x106)]['error']['code']===0x1;}async[_0x3cd8c3(0x110)](_0x3ded6d,_0x89f6b6,_0x10231c,_0x1f5ee0){const _0x1e3340=_0x3cd8c3,_0x5c2ca8={'memberId':(await this[_0x1e3340(0x11e)]['requireSession'](_0x3ded6d))[_0x1e3340(0x10e)](),'threadId':_0x10231c,'replyId':_0x1f5ee0,'unitId':_0x3ded6d},_0x29f922=await this['_httpService'][_0x1e3340(0xef)]('/universer-api/comment/unit/'+_0x3ded6d+_0x1e3340(0x12f),{'body':_0x5c2ca8});return!_0x29f922['body'][_0x1e3340(0x12c)]||_0x29f922[_0x1e3340(0x106)]['error'][_0x1e3340(0xfc)]===0x1;}async[_0x3cd8c3(0x107)](_0x3f6d3b,_0x586d2c,_0x5de6ca){const _0x2745a4=_0x3cd8c3,_0x318762={'unitId':_0x3f6d3b,'threadId':_0x5de6ca},_0x124747=await this['_httpService'][_0x2745a4(0xef)](_0x2745a4(0xed)+_0x3f6d3b+_0x2745a4(0xf0),{'body':_0x318762}),_0x565892=_0x5de6ca['map'](_0x11d7cd=>ee(_0x124747['body'][_0x2745a4(0x12d)][_0x11d7cd],_0x3f6d3b,_0x586d2c))[_0x2745a4(0xfd)](Boolean);return Object[_0x2745a4(0xe5)](_0x124747[_0x2745a4(0x106)]['users'])[_0x2745a4(0x145)](_0x668c04=>{const _0x123a2f=_0x2745a4;this[_0x123a2f(0x112)][_0x123a2f(0x137)](_0x668c04);}),_0x565892;}[_0x3cd8c3(0x135)](_0x4f1e54){const _0xebaec5=_0x3cd8c3;return{'id':_0x4f1e54['id'],'threadId':_0x4f1e54['threadId'],'ref':_0x4f1e54[_0xebaec5(0x12a)]};}};S=Q([b(0x0,_0x25eae3(_0x290f9b)),b(0x1,_0x25eae3(_0x948e73)),b(0x2,_0x25eae3(_0x13af67))],S);var re=Object[_0x3cd8c3(0x121)],te=(_0x2e49b8,_0x22cc17,_0x21ff40,_0x4e8be2)=>{const _0x469c92=_0x3cd8c3;for(var _0x5b659f=_0x4e8be2>0x1?void 0x0:_0x4e8be2?re(_0x22cc17,_0x21ff40):_0x22cc17,_0x2f87d4=_0x2e49b8[_0x469c92(0x10a)]-0x1,_0x37c24f;_0x2f87d4>=0x0;_0x2f87d4--)(_0x37c24f=_0x2e49b8[_0x2f87d4])&&(_0x5b659f=_0x37c24f(_0x5b659f)||_0x5b659f);return _0x5b659f;},M=(_0x86d5f,_0x4edead)=>(_0x47073b,_0x3bbe96)=>_0x4edead(_0x47073b,_0x3bbe96,_0x86d5f);let f=class extends _0x2250bd{constructor(_0x1c7893,_0x4c7bb5){const _0xd2d9e8=_0x3cd8c3;super(),this[_0xd2d9e8(0xf8)]=_0x1c7893,this[_0xd2d9e8(0x105)]=_0x4c7bb5,this[_0xd2d9e8(0xe4)]();}['_initDataSource'](){const _0xd6b21a=_0x3cd8c3;this[_0xd6b21a(0xf8)]['dataSource']=this[_0xd6b21a(0x105)],this['_threadCommentDataSourceService'][_0xd6b21a(0x127)]=!0x1;}};f=te([M(0x0,_0x2d1481),M(0x1,_0x25eae3(S))],f);function _0xd3eb(){const _0x52cab1=['subscribe','244300ewILnb','replyId','OpenOrReOpen','thread-comment-data-source.config','slice','onReady','format','forEach','YYYY/MM/DD\x20HH:mm','defineProperty','parse','personId','UNIVER_UNKNOWN','_config','onStarting','91SWajyh','_initDataSource','values','Solve','_threadCommentModel','userID','Unknown','_init','Delete','97IDVpED','/universer-api/comment/unit/','16767102EuaCYq','post','/list','Edit','updateComment','_httpService','_configService','userId','Reply','root','_threadCommentDataSourceService','rangeId','disposeWithMe','5532lGRfIj','code','filter','replies','map','parentId','resolveComment','1919384qMOqnD','pipe','pluginName','_threadCommentDataSource','body','listComments','getComment','_initUserSync','length','17670OGMWpP','UNRECOGNIZED','user','getMemberID','addComment','deleteComment','_commentService','_userService','2036673tARMGN','/add','1510UHdoqN','payload','unitId','rangeType','threadId','Add','solved','252eRLTxr','get','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','getOwnPropertyDescriptor','Solved','stringify','/universer-api/user/list','content','getUser','syncUpdateMutationToColla','1714uNUbsM','getUnit','ref','reply','error','comments','/solved','/delete','/reply','COMMENT','add','commentUpdate$','delete','saveCommentToSnapshot','getCurrentUser','addUser','type','_injector','createTimestamp','requireSession','setConfig'];_0xd3eb=function(){return _0x52cab1;};return _0xd3eb();}var se=Object[_0x3cd8c3(0x147)],oe=Object[_0x3cd8c3(0x121)],ne=(_0x21232c,_0x2eb2ea,_0x3a12ba)=>_0x2eb2ea in _0x21232c?se(_0x21232c,_0x2eb2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a12ba}):_0x21232c[_0x2eb2ea]=_0x3a12ba,ie=(_0x51797e,_0x2ea2bb,_0x3cd3a0,_0x425d8d)=>{const _0x3b4a94=_0x3cd8c3;for(var _0x5e97b7=_0x425d8d>0x1?void 0x0:_0x425d8d?oe(_0x2ea2bb,_0x3cd3a0):_0x2ea2bb,_0x25ca92=_0x51797e[_0x3b4a94(0x10a)]-0x1,_0x327cb5;_0x25ca92>=0x0;_0x25ca92--)(_0x327cb5=_0x51797e[_0x25ca92])&&(_0x5e97b7=_0x327cb5(_0x5e97b7)||_0x5e97b7);return _0x5e97b7;},N=(_0x1f42f0,_0x22cda6)=>(_0x1d375b,_0x5258d2)=>_0x22cda6(_0x1d375b,_0x5258d2,_0x1f42f0),$=(_0x5567c1,_0x180cf1,_0xd130e9)=>ne(_0x5567c1,typeof _0x180cf1!='symbol'?_0x180cf1+'':_0x180cf1,_0xd130e9);let g=class extends _0x11527a{constructor(_0x1b9e80=O,_0x766dd9,_0x3561c1){const _0x12294b=_0x3cd8c3;super(),this['_config']=_0x1b9e80,this[_0x12294b(0x139)]=_0x766dd9,this[_0x12294b(0xf4)]=_0x3561c1;const {..._0x25b780}=_0xfb99a3({},O,this[_0x12294b(0x14b)]);this[_0x12294b(0xf4)][_0x12294b(0x13c)](z,_0x25b780);}[_0x3cd8c3(0xe2)](){const _0x4e82fe=_0x3cd8c3;[[S],[f],[_]][_0x4e82fe(0x145)](_0x43197d=>{const _0x3ce87a=_0x4e82fe;this[_0x3ce87a(0x139)][_0x3ce87a(0x132)](_0x43197d);});}[_0x3cd8c3(0x143)](){const _0x2cd861=_0x3cd8c3;this['_injector'][_0x2cd861(0x11d)](f),this['_injector']['get'](_);}};$(g,_0x3cd8c3(0x104),W),$(g,_0x3cd8c3(0x138),_0x3622ec[_0x3cd8c3(0x14a)]),g=ie([_0x4a67e7(_0x167a39,_0xebf8a9,_0x27609b),N(0x1,_0x25eae3(_0x245dbf)),N(0x2,_0x3d1f60)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3cd8c3=_0x5246;(function(_0x303c41,_0x5ab185){const _0x3c7fba=_0x5246,_0x4c0178=_0x303c41();while(!![]){try{const _0x53092c=-parseInt(_0x3c7fba(0xec))/0x1*(parseInt(_0x3c7fba(0x128))/0x2)+parseInt(_0x3c7fba(0x113))/0x3+-parseInt(_0x3c7fba(0xfb))/0x4*(-parseInt(_0x3c7fba(0x115))/0x5)+-parseInt(_0x3c7fba(0x10b))/0x6*(-parseInt(_0x3c7fba(0xe3))/0x7)+parseInt(_0x3c7fba(0x102))/0x8+parseInt(_0x3c7fba(0x11c))/0x9*(parseInt(_0x3c7fba(0x13e))/0xa)+-parseInt(_0x3c7fba(0xee))/0xb;if(_0x53092c===_0x5ab185)break;else _0x4c0178['push'](_0x4c0178['shift']());}catch(_0x49af91){_0x4c0178['push'](_0x4c0178['shift']());}}}(_0xd3eb,0x6e342));import{CommentService as _0x12372b,CollaborationSessionService as _0x13af67,UniverCollaborationClientPlugin as _0xebf8a9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x27609b}from'@univerjs-pro/license';import{dayjs as _0x1bdee6,UserManagerService as _0x948e73,Inject as _0x25eae3,Injector as _0x245dbf,Disposable as _0x2250bd,CustomRangeType as _0x438108,UniverInstanceType as _0x3622ec,DependentOn as _0x4a67e7,IConfigService as _0x3d1f60,Plugin as _0x11527a,merge as _0xfb99a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x167a39}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25573b,IThreadCommentDataSourceService as _0x2d1481}from'@univerjs/thread-comment';import{bufferTime as _0x5b44d5}from'rxjs';import{HTTPService as _0x290f9b}from'@univerjs/network';const W=_0x3cd8c3(0x11f);var I=(_0x4343d7=>(_0x4343d7[_0x4343d7['OpenOrReOpen']=0x0]=_0x3cd8c3(0x140),_0x4343d7[_0x4343d7['Solved']=0x1]=_0x3cd8c3(0x122),_0x4343d7[_0x4343d7['UNRECOGNIZED']=-0x1]=_0x3cd8c3(0x10c),_0x4343d7))(I||{}),v=(_0x57c5df=>(_0x57c5df[_0x57c5df[_0x3cd8c3(0xe9)]=0x0]=_0x3cd8c3(0xe9),_0x57c5df[_0x57c5df[_0x3cd8c3(0x11a)]=0x1]=_0x3cd8c3(0x11a),_0x57c5df[_0x57c5df['Reply']=0x2]=_0x3cd8c3(0xf6),_0x57c5df[_0x57c5df[_0x3cd8c3(0xf1)]=0x3]=_0x3cd8c3(0xf1),_0x57c5df[_0x57c5df[_0x3cd8c3(0xeb)]=0x4]=_0x3cd8c3(0xeb),_0x57c5df[_0x57c5df['Solve']=0x5]=_0x3cd8c3(0xe6),_0x57c5df[_0x57c5df[_0x3cd8c3(0x10c)]=-0x1]=_0x3cd8c3(0x10c),_0x57c5df))(v||{});const y=_0xbaf0a7=>_0x1bdee6(new Date(+_0xbaf0a7))[_0x3cd8c3(0x144)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bf735,_0x268c59)=>{const _0x2d1f71=_0x3cd8c3,_0x32c3f0=_0x3bf735['get'](_0x948e73),_0x5207ca=_0x3bf735[_0x2d1f71(0x11d)](_0x290f9b);_0x268c59[_0x2d1f71(0x145)](_0x31cd7b=>{const _0x469caa=_0x2d1f71;_0x32c3f0[_0x469caa(0x126)](_0x31cd7b)&&_0x268c59[_0x469caa(0x134)](_0x31cd7b);}),_0x268c59['size']&&(await _0x5207ca[_0x2d1f71(0x11d)](_0x2d1f71(0x124),{'params':{'userIDs':[..._0x268c59]}}))[_0x2d1f71(0x106)]['users'][_0x2d1f71(0x145)](_0x265ec3=>{const _0x346896=_0x2d1f71;_0x265ec3&&_0x32c3f0[_0x346896(0x137)](_0x265ec3);});};var K=Object[_0x3cd8c3(0x121)],V=(_0x8001a2,_0x42a89b,_0x3525f8,_0x4714e4)=>{const _0x4d6f24=_0x3cd8c3;for(var _0x1620bb=_0x4714e4>0x1?void 0x0:_0x4714e4?K(_0x42a89b,_0x3525f8):_0x42a89b,_0x4ff418=_0x8001a2[_0x4d6f24(0x10a)]-0x1,_0xaff0fb;_0x4ff418>=0x0;_0x4ff418--)(_0xaff0fb=_0x8001a2[_0x4ff418])&&(_0x1620bb=_0xaff0fb(_0x1620bb)||_0x1620bb);return _0x1620bb;},p=(_0x2cf1db,_0x394f2d)=>(_0x1dfb0e,_0xc385c6)=>_0x394f2d(_0x1dfb0e,_0xc385c6,_0x2cf1db);let _=class extends _0x2250bd{constructor(_0x664652,_0x1eba39,_0x364cc6,_0x5a46e6){const _0x3af1b2=_0x3cd8c3;super(),this[_0x3af1b2(0x111)]=_0x664652,this[_0x3af1b2(0xe7)]=_0x1eba39,this[_0x3af1b2(0x112)]=_0x364cc6,this['_injector']=_0x5a46e6,this[_0x3af1b2(0xea)](),this[_0x3af1b2(0x109)]();}[_0x3cd8c3(0x109)](){const _0xf568b1=_0x3cd8c3;this['disposeWithMe'](this[_0xf568b1(0xe7)][_0xf568b1(0x133)][_0xf568b1(0x103)](_0x5b44d5(0x10))[_0xf568b1(0x13d)](_0x1f84c9=>{const _0x1c7740=_0xf568b1,_0x548c18=new Set();_0x1f84c9[_0x1c7740(0x145)](_0xce5b0d=>{const _0x3eb078=_0x1c7740;switch(_0xce5b0d[_0x3eb078(0x138)]){case _0x3eb078(0x132):{const _0x3cbbd5=_0xce5b0d[_0x3eb078(0x116)][_0x3eb078(0x149)];_0x548c18[_0x3eb078(0x132)](_0x3cbbd5);break;}}}),B(this[_0x1c7740(0x139)],_0x548c18);}));}[_0x3cd8c3(0xea)](){const _0x3d9c45=_0x3cd8c3;this[_0x3d9c45(0xfa)](this[_0x3d9c45(0x111)][_0x3d9c45(0x133)][_0x3d9c45(0x13d)](async _0x49c116=>{const _0xd97adc=_0x3d9c45;var _0x1a6c15,_0x19e6f9,_0x7f824c,_0x3301c1;const _0x2889a3=(_0x1a6c15=this[_0xd97adc(0xe7)]['getUnit'](_0x49c116[_0xd97adc(0x117)])['find'](_0x36866c=>_0x36866c['threadId']===_0x49c116[_0xd97adc(0x119)]))==null?void 0x0:_0x1a6c15[_0xd97adc(0xf7)];if(!_0x2889a3)return;const {unitId:_0x870ed,subUnitId:_0x3b12ee}=_0x2889a3;switch(_0x49c116[_0xd97adc(0x10d)]&&this[_0xd97adc(0x112)][_0xd97adc(0x137)](_0x49c116[_0xd97adc(0x10d)]),_0x49c116[_0xd97adc(0x138)]){case v[_0xd97adc(0x11a)]:break;case v[_0xd97adc(0xf6)]:{this['_threadCommentModel'][_0xd97adc(0x10f)](_0x870ed,_0x3b12ee,{'unitId':_0x870ed,'subUnitId':_0x3b12ee,'ref':'','id':_0x49c116[_0xd97adc(0x13f)],'dT':y(+_0x49c116[_0xd97adc(0x13a)]),'threadId':_0x49c116[_0xd97adc(0x119)],'personId':(_0x7f824c=(_0x19e6f9=_0x49c116[_0xd97adc(0x10d)])==null?void 0x0:_0x19e6f9['userID'])!=null?_0x7f824c:_0x49c116['userId'],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)]),'parentId':_0x2889a3['id']});break;}case v[_0xd97adc(0xeb)]:{const _0x4e455e=this[_0xd97adc(0xe7)][_0xd97adc(0x108)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);_0x4e455e&&_0x4e455e[_0xd97adc(0x100)]&&this[_0xd97adc(0xe7)][_0xd97adc(0x110)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);break;}case v[_0xd97adc(0xf1)]:{this[_0xd97adc(0xe7)]['updateComment'](_0x870ed,_0x3b12ee,{'commentId':_0x49c116[_0xd97adc(0x13f)],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)])});break;}case v[_0xd97adc(0xe6)]:{const _0x20112e=(_0x3301c1=this[_0xd97adc(0xe7)][_0xd97adc(0x129)](_0x49c116['unitId'])['find'](_0x4d40c3=>_0x4d40c3[_0xd97adc(0x119)]===_0x49c116['threadId']))==null?void 0x0:_0x3301c1[_0xd97adc(0xf7)];_0x20112e&&this[_0xd97adc(0xe7)]['resolveComment'](_0x870ed,_0x3b12ee,_0x20112e['id'],_0x49c116[_0xd97adc(0x11b)]===I[_0xd97adc(0x122)]);break;}}}));}};_=V([p(0x0,_0x25eae3(_0x12372b)),p(0x1,_0x25eae3(_0x25573b)),p(0x2,_0x25eae3(_0x948e73)),p(0x3,_0x25eae3(_0x245dbf))],_);function _0x5246(_0x329e47,_0x18a5bb){_0x329e47=_0x329e47-0xe2;const _0xd3eba=_0xd3eb();let _0x52460b=_0xd3eba[_0x329e47];return _0x52460b;}const z=_0x3cd8c3(0x141),O={};var k=Object[_0x3cd8c3(0x121)],Q=(_0x546993,_0x3b008f,_0x5d2cd9,_0x3b0c37)=>{const _0x5edb3f=_0x3cd8c3;for(var _0x79483b=_0x3b0c37>0x1?void 0x0:_0x3b0c37?k(_0x3b008f,_0x5d2cd9):_0x3b008f,_0x58fad3=_0x546993[_0x5edb3f(0x10a)]-0x1,_0x534c47;_0x58fad3>=0x0;_0x58fad3--)(_0x534c47=_0x546993[_0x58fad3])&&(_0x79483b=_0x534c47(_0x79483b)||_0x79483b);return _0x79483b;},b=(_0xa55114,_0x19c916)=>(_0x2bb6d7,_0x4a650d)=>_0x19c916(_0x2bb6d7,_0x4a650d,_0xa55114);function X(_0x1dd8c2,_0x41b9c6){const _0xd7b116=_0x3cd8c3,_0x4d703c=_0x1dd8c2[_0xd7b116(0xfe)][0x0];return{..._0x41b9c6,'id':_0x4d703c[_0xd7b116(0x13f)],'resolved':_0x1dd8c2[_0xd7b116(0x11b)]===0x1,'dT':y(_0x4d703c[_0xd7b116(0x13a)]),'personId':_0x4d703c[_0xd7b116(0xf5)],'threadId':_0x4d703c[_0xd7b116(0x119)]};}function ee(_0x2c613b,_0x46cb6d,_0x3546e4){const _0x4b4906=_0x3cd8c3;var _0x491973,_0x2b84de;if(((_0x2b84de=(_0x491973=_0x2c613b==null?void 0x0:_0x2c613b[_0x4b4906(0xfe)])==null?void 0x0:_0x491973[_0x4b4906(0x10a)])!=null?_0x2b84de:0x0)>0x0){const _0x531dce=(_0x34a178,_0x40ba87)=>({'id':_0x34a178[_0x4b4906(0x13f)],'threadId':_0x34a178[_0x4b4906(0x119)],'dT':y(_0x34a178[_0x4b4906(0x13a)]),'personId':_0x34a178['userId'],'resolved':_0x2c613b[_0x4b4906(0x11b)]===I[_0x4b4906(0x122)],'unitId':_0x46cb6d,'subUnitId':_0x3546e4,'text':JSON[_0x4b4906(0x148)](_0x34a178[_0x4b4906(0x125)]),'parentId':_0x40ba87}),_0x4d8f36=_0x531dce(_0x2c613b[_0x4b4906(0xfe)][0x0]);return{..._0x4d8f36,'children':_0x2c613b['replies'][_0x4b4906(0x142)](0x1)[_0x4b4906(0xff)](_0x5a5063=>_0x531dce(_0x5a5063,_0x4d8f36['id']))};}return null;}let S=class{constructor(_0x435483,_0x551482,_0x45502d){const _0x1ef87e=_0x3cd8c3;this[_0x1ef87e(0xf3)]=_0x435483,this['_userService']=_0x551482,this[_0x1ef87e(0x11e)]=_0x45502d;}async['addComment'](_0x4c6bc6){const _0x405b9c=_0x3cd8c3;var _0x23a6e3,_0xf3bcee;const {parentId:_0x8c6f0b,unitId:_0x254788,text:_0x2e842c,threadId:_0x3981aa}=_0x4c6bc6,_0x838d6=(_0xf3bcee=(_0x23a6e3=_0x2e842c['customRanges'])==null?void 0x0:_0x23a6e3['filter'](_0x59f64b=>_0x59f64b[_0x405b9c(0x118)]===_0x438108[_0x405b9c(0x131)])[_0x405b9c(0xff)](_0x16df6c=>_0x16df6c[_0x405b9c(0xf9)]))!=null?_0xf3bcee:[],_0x4cc774=JSON['stringify'](_0x2e842c),_0xa5c1be=(await this[_0x405b9c(0x11e)][_0x405b9c(0x13b)](_0x254788))[_0x405b9c(0x10e)]();if(_0x8c6f0b){const _0x2cab31={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6,'threadId':_0x3981aa},_0xb13c66=(await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x130),{'body':_0x2cab31}))[_0x405b9c(0x106)][_0x405b9c(0x12b)];return{..._0x4c6bc6,'id':_0xb13c66['replyId'],'dT':_0x1bdee6(+_0xb13c66[_0x405b9c(0x13a)])[_0x405b9c(0x144)](_0x405b9c(0x146)),'personId':_0xb13c66[_0x405b9c(0xf5)]};}else{const _0x46c38b={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6},_0x6f9736=await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x114),{'body':_0x46c38b});return X(_0x6f9736['body']['comment'],_0x4c6bc6);}}async[_0x3cd8c3(0xf2)](_0x570f80){const _0x4aac2f=_0x3cd8c3;var _0x3f0bdd,_0x5cb2c7;const {text:_0x188382,unitId:_0x2132d0}=_0x570f80,_0x177849=(_0x5cb2c7=(_0x3f0bdd=_0x188382[_0x4aac2f(0x120)])==null?void 0x0:_0x3f0bdd[_0x4aac2f(0xfd)](_0x51a59d=>_0x51a59d[_0x4aac2f(0x118)]===_0x438108['COMMENT'])[_0x4aac2f(0xff)](_0x599114=>_0x599114['rangeId']))!=null?_0x5cb2c7:[],_0x469ce6=JSON[_0x4aac2f(0x123)](_0x188382),_0x272a73=_0x570f80['threadId'],_0x6b428b=_0x570f80['id'],_0x3a9c89={'memberId':(await this[_0x4aac2f(0x11e)][_0x4aac2f(0x13b)](_0x2132d0))[_0x4aac2f(0x10e)](),'unitId':_0x2132d0,'threadId':_0x272a73,'mention':_0x177849,'content':_0x469ce6,'replyId':_0x6b428b},_0x738c07=await this[_0x4aac2f(0xf3)][_0x4aac2f(0xef)](_0x4aac2f(0xed)+_0x2132d0+'/edit',{'body':_0x3a9c89});return!_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)]||_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)][_0x4aac2f(0xfc)]===0x1;}async[_0x3cd8c3(0x101)](_0xbc399d){const _0x391083=_0x3cd8c3,{unitId:_0x3a39c8}=_0xbc399d,_0x532295=_0xbc399d['threadId'],_0x222aa5={'memberId':this[_0x391083(0x112)][_0x391083(0x136)]()[_0x391083(0xe8)],'unitId':_0x3a39c8,'threadId':_0x532295,'solved':_0xbc399d['resolved']?I[_0x391083(0x122)]:I['OpenOrReOpen']},_0x262844=await this[_0x391083(0xf3)][_0x391083(0xef)](_0x391083(0xed)+_0x3a39c8+_0x391083(0x12e),{'body':_0x222aa5});return!_0x262844['body'][_0x391083(0x12c)]||_0x262844[_0x391083(0x106)]['error']['code']===0x1;}async[_0x3cd8c3(0x110)](_0x3ded6d,_0x89f6b6,_0x10231c,_0x1f5ee0){const _0x1e3340=_0x3cd8c3,_0x5c2ca8={'memberId':(await this[_0x1e3340(0x11e)]['requireSession'](_0x3ded6d))[_0x1e3340(0x10e)](),'threadId':_0x10231c,'replyId':_0x1f5ee0,'unitId':_0x3ded6d},_0x29f922=await this['_httpService'][_0x1e3340(0xef)]('/universer-api/comment/unit/'+_0x3ded6d+_0x1e3340(0x12f),{'body':_0x5c2ca8});return!_0x29f922['body'][_0x1e3340(0x12c)]||_0x29f922[_0x1e3340(0x106)]['error'][_0x1e3340(0xfc)]===0x1;}async[_0x3cd8c3(0x107)](_0x3f6d3b,_0x586d2c,_0x5de6ca){const _0x2745a4=_0x3cd8c3,_0x318762={'unitId':_0x3f6d3b,'threadId':_0x5de6ca},_0x124747=await this['_httpService'][_0x2745a4(0xef)](_0x2745a4(0xed)+_0x3f6d3b+_0x2745a4(0xf0),{'body':_0x318762}),_0x565892=_0x5de6ca['map'](_0x11d7cd=>ee(_0x124747['body'][_0x2745a4(0x12d)][_0x11d7cd],_0x3f6d3b,_0x586d2c))[_0x2745a4(0xfd)](Boolean);return Object[_0x2745a4(0xe5)](_0x124747[_0x2745a4(0x106)]['users'])[_0x2745a4(0x145)](_0x668c04=>{const _0x123a2f=_0x2745a4;this[_0x123a2f(0x112)][_0x123a2f(0x137)](_0x668c04);}),_0x565892;}[_0x3cd8c3(0x135)](_0x4f1e54){const _0xebaec5=_0x3cd8c3;return{'id':_0x4f1e54['id'],'threadId':_0x4f1e54['threadId'],'ref':_0x4f1e54[_0xebaec5(0x12a)]};}};S=Q([b(0x0,_0x25eae3(_0x290f9b)),b(0x1,_0x25eae3(_0x948e73)),b(0x2,_0x25eae3(_0x13af67))],S);var re=Object[_0x3cd8c3(0x121)],te=(_0x2e49b8,_0x22cc17,_0x21ff40,_0x4e8be2)=>{const _0x469c92=_0x3cd8c3;for(var _0x5b659f=_0x4e8be2>0x1?void 0x0:_0x4e8be2?re(_0x22cc17,_0x21ff40):_0x22cc17,_0x2f87d4=_0x2e49b8[_0x469c92(0x10a)]-0x1,_0x37c24f;_0x2f87d4>=0x0;_0x2f87d4--)(_0x37c24f=_0x2e49b8[_0x2f87d4])&&(_0x5b659f=_0x37c24f(_0x5b659f)||_0x5b659f);return _0x5b659f;},M=(_0x86d5f,_0x4edead)=>(_0x47073b,_0x3bbe96)=>_0x4edead(_0x47073b,_0x3bbe96,_0x86d5f);let f=class extends _0x2250bd{constructor(_0x1c7893,_0x4c7bb5){const _0xd2d9e8=_0x3cd8c3;super(),this[_0xd2d9e8(0xf8)]=_0x1c7893,this[_0xd2d9e8(0x105)]=_0x4c7bb5,this[_0xd2d9e8(0xe4)]();}['_initDataSource'](){const _0xd6b21a=_0x3cd8c3;this[_0xd6b21a(0xf8)]['dataSource']=this[_0xd6b21a(0x105)],this['_threadCommentDataSourceService'][_0xd6b21a(0x127)]=!0x1;}};f=te([M(0x0,_0x2d1481),M(0x1,_0x25eae3(S))],f);function _0xd3eb(){const _0x52cab1=['subscribe','244300ewILnb','replyId','OpenOrReOpen','thread-comment-data-source.config','slice','onReady','format','forEach','YYYY/MM/DD\x20HH:mm','defineProperty','parse','personId','UNIVER_UNKNOWN','_config','onStarting','91SWajyh','_initDataSource','values','Solve','_threadCommentModel','userID','Unknown','_init','Delete','97IDVpED','/universer-api/comment/unit/','16767102EuaCYq','post','/list','Edit','updateComment','_httpService','_configService','userId','Reply','root','_threadCommentDataSourceService','rangeId','disposeWithMe','5532lGRfIj','code','filter','replies','map','parentId','resolveComment','1919384qMOqnD','pipe','pluginName','_threadCommentDataSource','body','listComments','getComment','_initUserSync','length','17670OGMWpP','UNRECOGNIZED','user','getMemberID','addComment','deleteComment','_commentService','_userService','2036673tARMGN','/add','1510UHdoqN','payload','unitId','rangeType','threadId','Add','solved','252eRLTxr','get','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','getOwnPropertyDescriptor','Solved','stringify','/universer-api/user/list','content','getUser','syncUpdateMutationToColla','1714uNUbsM','getUnit','ref','reply','error','comments','/solved','/delete','/reply','COMMENT','add','commentUpdate$','delete','saveCommentToSnapshot','getCurrentUser','addUser','type','_injector','createTimestamp','requireSession','setConfig'];_0xd3eb=function(){return _0x52cab1;};return _0xd3eb();}var se=Object[_0x3cd8c3(0x147)],oe=Object[_0x3cd8c3(0x121)],ne=(_0x21232c,_0x2eb2ea,_0x3a12ba)=>_0x2eb2ea in _0x21232c?se(_0x21232c,_0x2eb2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a12ba}):_0x21232c[_0x2eb2ea]=_0x3a12ba,ie=(_0x51797e,_0x2ea2bb,_0x3cd3a0,_0x425d8d)=>{const _0x3b4a94=_0x3cd8c3;for(var _0x5e97b7=_0x425d8d>0x1?void 0x0:_0x425d8d?oe(_0x2ea2bb,_0x3cd3a0):_0x2ea2bb,_0x25ca92=_0x51797e[_0x3b4a94(0x10a)]-0x1,_0x327cb5;_0x25ca92>=0x0;_0x25ca92--)(_0x327cb5=_0x51797e[_0x25ca92])&&(_0x5e97b7=_0x327cb5(_0x5e97b7)||_0x5e97b7);return _0x5e97b7;},N=(_0x1f42f0,_0x22cda6)=>(_0x1d375b,_0x5258d2)=>_0x22cda6(_0x1d375b,_0x5258d2,_0x1f42f0),$=(_0x5567c1,_0x180cf1,_0xd130e9)=>ne(_0x5567c1,typeof _0x180cf1!='symbol'?_0x180cf1+'':_0x180cf1,_0xd130e9);let g=class extends _0x11527a{constructor(_0x1b9e80=O,_0x766dd9,_0x3561c1){const _0x12294b=_0x3cd8c3;super(),this['_config']=_0x1b9e80,this[_0x12294b(0x139)]=_0x766dd9,this[_0x12294b(0xf4)]=_0x3561c1;const {..._0x25b780}=_0xfb99a3({},O,this[_0x12294b(0x14b)]);this[_0x12294b(0xf4)][_0x12294b(0x13c)](z,_0x25b780);}[_0x3cd8c3(0xe2)](){const _0x4e82fe=_0x3cd8c3;[[S],[f],[_]][_0x4e82fe(0x145)](_0x43197d=>{const _0x3ce87a=_0x4e82fe;this[_0x3ce87a(0x139)][_0x3ce87a(0x132)](_0x43197d);});}[_0x3cd8c3(0x143)](){const _0x2cd861=_0x3cd8c3;this['_injector'][_0x2cd861(0x11d)](f),this['_injector']['get'](_);}};$(g,_0x3cd8c3(0x104),W),$(g,_0x3cd8c3(0x138),_0x3622ec[_0x3cd8c3(0x14a)]),g=ie([_0x4a67e7(_0x167a39,_0xebf8a9,_0x27609b),N(0x1,_0x25eae3(_0x245dbf)),N(0x2,_0x3d1f60)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4672(_0x1d5ae6,_0x56513a){_0x1d5ae6=_0x1d5ae6-0x110;const _0x1614a2=_0x1614();let _0x4672b2=_0x1614a2[_0x1d5ae6];return _0x4672b2;}function _0x1614(){const _0x47a312=['_init','/universer-api/comment/unit/','Unknown','addComment','onReady','code','reply','addUser','512916Xozhhd','UniverThreadCommentUIPlugin','UniverProCollaborationClient','@univerjs/thread-comment-ui','exports','deleteComment','user','onStarting','Solve','replyId','users','_configService','/list','listComments','map','CustomRangeType','357362cUVnfv','error','userID','@univerjs/thread-comment','find','OpenOrReOpen','UNRECOGNIZED','_commentService','thread-comment-data-source.config','commentUpdate$','userId','content','_sessionService','getUnit','comments','@univerjs/network','resolved','rangeId','_initDataSource','values','/reply','Plugin','object','Solved','get','customRanges','_config','bufferTime','getUser','rangeType','function','COMMENT','getCurrentUser','getMemberID','52262qQhFYc','_userService','merge','body','UNIVER_UNKNOWN','delete','/universer-api/user/list','ThreadCommentModel','disposeWithMe','CommentService','payload','post','UniverProLicense','createTimestamp','IConfigService','Injector','resolveComment','format','threadId','2940543MXdWPK','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','Reply','_threadCommentDataSource','10gZgeuw','syncUpdateMutationToColla','/add','_threadCommentDataSourceService','dayjs','unitId','_httpService','HTTPService','getComment','/solved','UniverCore','size','IThreadCommentDataSourceService','pipe','subscribe','replies','UniverThreadCommentUi','saveCommentToSnapshot','55sUnDDu','add','DependentOn','UniverCollaborationClientPlugin','_injector','parse','stringify','solved','_threadCommentModel','defineProperty','pluginName','filter','1285023HBayaJ','Inject','type','ref','dataSource','updateComment','12936fDzsBv','@univerjs-pro/collaboration-client','Delete','getOwnPropertyDescriptor','Add','624580DZhnER','parentId','symbol','comment','rxjs','UniverNetwork','/delete','setConfig','personId','UserManagerService','forEach','UniverThreadCommentDataSourcePlugin','Edit','amd','272aSAqNd','root','requireSession'];_0x1614=function(){return _0x47a312;};return _0x1614();}(function(_0x34c7bd,_0x478576){const _0x39a45f=_0x4672,_0x4a38c3=_0x34c7bd();while(!![]){try{const _0x6ebd02=-parseInt(_0x39a45f(0x12e))/0x1+-parseInt(_0x39a45f(0x192))/0x2+parseInt(_0x39a45f(0x187))/0x3+-parseInt(_0x39a45f(0x18d))/0x4*(parseInt(_0x39a45f(0x17b))/0x5)+-parseInt(_0x39a45f(0x11e))/0x6+-parseInt(_0x39a45f(0x150))/0x7*(-parseInt(_0x39a45f(0x113))/0x8)+parseInt(_0x39a45f(0x163))/0x9*(parseInt(_0x39a45f(0x169))/0xa);if(_0x6ebd02===_0x478576)break;else _0x4a38c3['push'](_0x4a38c3['shift']());}catch(_0x562851){_0x4a38c3['push'](_0x4a38c3['shift']());}}}(_0x1614,0x35458),function(_0x19cdfa,_0x4dbf30){const _0x19a694=_0x4672;typeof exports==_0x19a694(0x144)&&typeof module<'u'?_0x4dbf30(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==_0x19a694(0x14c)&&define[_0x19a694(0x112)]?define([_0x19a694(0x122),_0x19a694(0x18e),'@univerjs-pro/license','@univerjs/core',_0x19a694(0x121),_0x19a694(0x131),_0x19a694(0x196),_0x19a694(0x13d)],_0x4dbf30):(_0x19cdfa=typeof globalThis<'u'?globalThis:_0x19cdfa||self,_0x4dbf30(_0x19cdfa['UniverProThreadCommentDatasource']={},_0x19cdfa[_0x19a694(0x120)],_0x19cdfa[_0x19a694(0x15c)],_0x19cdfa[_0x19a694(0x173)],_0x19cdfa[_0x19a694(0x179)],_0x19cdfa['UniverThreadComment'],_0x19cdfa[_0x19a694(0x196)],_0x19cdfa[_0x19a694(0x197)]));}(this,function(_0x3d14b1,_0x39b4a1,_0x338502,_0x782fd0,_0x145a2a,_0x1a5ffb,_0x325b90,_0x1743c9){'use strict';const _0x39bac6=_0x4672;const _0x13e2de=_0x39bac6(0x165);var _0x164965=(_0x5bcc62=>(_0x5bcc62[_0x5bcc62[_0x39bac6(0x133)]=0x0]=_0x39bac6(0x133),_0x5bcc62[_0x5bcc62[_0x39bac6(0x145)]=0x1]='Solved',_0x5bcc62[_0x5bcc62[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x5bcc62))(_0x164965||{}),_0x121c0c=(_0x3f73e1=>(_0x3f73e1[_0x3f73e1[_0x39bac6(0x118)]=0x0]='Unknown',_0x3f73e1[_0x3f73e1[_0x39bac6(0x191)]=0x1]='Add',_0x3f73e1[_0x3f73e1[_0x39bac6(0x167)]=0x2]=_0x39bac6(0x167),_0x3f73e1[_0x3f73e1['Edit']=0x3]=_0x39bac6(0x111),_0x3f73e1[_0x3f73e1[_0x39bac6(0x18f)]=0x4]=_0x39bac6(0x18f),_0x3f73e1[_0x3f73e1[_0x39bac6(0x126)]=0x5]=_0x39bac6(0x126),_0x3f73e1[_0x3f73e1[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x3f73e1))(_0x121c0c||{});const _0x12611a=_0x4b0ef6=>_0x782fd0[_0x39bac6(0x16d)](new Date(+_0x4b0ef6))[_0x39bac6(0x161)]('YYYY/MM/DD\x20HH:mm'),_0x43d62f=async(_0x3e0d4a,_0x349a23)=>{const _0x34e526=_0x39bac6,_0x40c71f=_0x3e0d4a['get'](_0x782fd0[_0x34e526(0x19b)]),_0x4845bf=_0x3e0d4a['get'](_0x1743c9[_0x34e526(0x170)]);_0x349a23[_0x34e526(0x19c)](_0x1e8930=>{const _0x35ad8b=_0x34e526;_0x40c71f[_0x35ad8b(0x14a)](_0x1e8930)&&_0x349a23[_0x35ad8b(0x155)](_0x1e8930);}),_0x349a23[_0x34e526(0x174)]&&(await _0x4845bf['get'](_0x34e526(0x156),{'params':{'userIDs':[..._0x349a23]}}))[_0x34e526(0x153)][_0x34e526(0x128)]['forEach'](_0x4e4156=>{const _0x4345d8=_0x34e526;_0x4e4156&&_0x40c71f[_0x4345d8(0x11d)](_0x4e4156);});};var _0x10a481=Object[_0x39bac6(0x190)],_0x23ddd7=(_0x33d954,_0x3ccbf0,_0x26231c,_0x132d78)=>{for(var _0x232ff0=_0x132d78>0x1?void 0x0:_0x132d78?_0x10a481(_0x3ccbf0,_0x26231c):_0x3ccbf0,_0x3d2cd2=_0x33d954['length']-0x1,_0x41e040;_0x3d2cd2>=0x0;_0x3d2cd2--)(_0x41e040=_0x33d954[_0x3d2cd2])&&(_0x232ff0=_0x41e040(_0x232ff0)||_0x232ff0);return _0x232ff0;},_0x102341=(_0x52ef4b,_0x364e06)=>(_0x4e89da,_0x2cd7f1)=>_0x364e06(_0x4e89da,_0x2cd7f1,_0x52ef4b);let _0x621e03=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x1f3a4d,_0x3b11a6,_0x2bacbe,_0x1250be){const _0x527f42=_0x39bac6;super(),this[_0x527f42(0x135)]=_0x1f3a4d,this[_0x527f42(0x183)]=_0x3b11a6,this[_0x527f42(0x151)]=_0x2bacbe,this[_0x527f42(0x17f)]=_0x1250be,this[_0x527f42(0x116)](),this['_initUserSync']();}['_initUserSync'](){const _0x22cd0f=_0x39bac6;this[_0x22cd0f(0x158)](this[_0x22cd0f(0x183)][_0x22cd0f(0x137)][_0x22cd0f(0x176)](_0x325b90[_0x22cd0f(0x149)](0x10))[_0x22cd0f(0x177)](_0x390d04=>{const _0x1d100e=_0x22cd0f,_0x5f0131=new Set();_0x390d04[_0x1d100e(0x19c)](_0x21bc3b=>{const _0xebd611=_0x1d100e;switch(_0x21bc3b[_0xebd611(0x189)]){case _0xebd611(0x17c):{const _0xd75310=_0x21bc3b[_0xebd611(0x15a)][_0xebd611(0x19a)];_0x5f0131[_0xebd611(0x17c)](_0xd75310);break;}}}),_0x43d62f(this[_0x1d100e(0x17f)],_0x5f0131);}));}[_0x39bac6(0x116)](){const _0x51ef0a=_0x39bac6;this['disposeWithMe'](this[_0x51ef0a(0x135)][_0x51ef0a(0x137)]['subscribe'](async _0x5f2877=>{const _0x31d188=_0x51ef0a;var _0x4e93bc,_0x50aa02,_0x57f041,_0x54d130;const _0x1fddcc=(_0x4e93bc=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x744047=>_0x744047['threadId']===_0x5f2877['threadId']))==null?void 0x0:_0x4e93bc['root'];if(!_0x1fddcc)return;const {unitId:_0x3bfe9b,subUnitId:_0x3c67a0}=_0x1fddcc;switch(_0x5f2877['user']&&this['_userService'][_0x31d188(0x11d)](_0x5f2877[_0x31d188(0x124)]),_0x5f2877[_0x31d188(0x189)]){case _0x121c0c[_0x31d188(0x191)]:break;case _0x121c0c[_0x31d188(0x167)]:{this[_0x31d188(0x183)][_0x31d188(0x119)](_0x3bfe9b,_0x3c67a0,{'unitId':_0x3bfe9b,'subUnitId':_0x3c67a0,'ref':'','id':_0x5f2877[_0x31d188(0x127)],'dT':_0x12611a(+_0x5f2877['createTimestamp']),'threadId':_0x5f2877[_0x31d188(0x162)],'personId':(_0x57f041=(_0x50aa02=_0x5f2877[_0x31d188(0x124)])==null?void 0x0:_0x50aa02['userID'])!=null?_0x57f041:_0x5f2877[_0x31d188(0x138)],'text':JSON[_0x31d188(0x180)](_0x5f2877['content']),'parentId':_0x1fddcc['id']});break;}case _0x121c0c[_0x31d188(0x18f)]:{const _0x3895d4=this[_0x31d188(0x183)][_0x31d188(0x171)](_0x3bfe9b,_0x3c67a0,_0x5f2877['replyId']);_0x3895d4&&_0x3895d4[_0x31d188(0x193)]&&this['_threadCommentModel']['deleteComment'](_0x3bfe9b,_0x3c67a0,_0x5f2877[_0x31d188(0x127)]);break;}case _0x121c0c['Edit']:{this[_0x31d188(0x183)][_0x31d188(0x18c)](_0x3bfe9b,_0x3c67a0,{'commentId':_0x5f2877[_0x31d188(0x127)],'text':JSON[_0x31d188(0x180)](_0x5f2877[_0x31d188(0x139)])});break;}case _0x121c0c[_0x31d188(0x126)]:{const _0x4792f9=(_0x54d130=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x1c1f72=>_0x1c1f72[_0x31d188(0x162)]===_0x5f2877[_0x31d188(0x162)]))==null?void 0x0:_0x54d130[_0x31d188(0x114)];_0x4792f9&&this['_threadCommentModel'][_0x31d188(0x160)](_0x3bfe9b,_0x3c67a0,_0x4792f9['id'],_0x5f2877[_0x31d188(0x182)]===_0x164965['Solved']);break;}}}));}};_0x621e03=_0x23ddd7([_0x102341(0x0,_0x782fd0[_0x39bac6(0x188)](_0x39b4a1[_0x39bac6(0x159)])),_0x102341(0x1,_0x782fd0['Inject'](_0x1a5ffb[_0x39bac6(0x157)])),_0x102341(0x2,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x19b)])),_0x102341(0x3,_0x782fd0['Inject'](_0x782fd0['Injector']))],_0x621e03);const _0x6fb472=_0x39bac6(0x136),_0xb8b559={};var _0x5b95e3=Object[_0x39bac6(0x190)],_0x341482=(_0x421932,_0x319b86,_0x5866ae,_0x5740a1)=>{const _0x14b1cd=_0x39bac6;for(var _0x4a4cfa=_0x5740a1>0x1?void 0x0:_0x5740a1?_0x5b95e3(_0x319b86,_0x5866ae):_0x319b86,_0x512360=_0x421932[_0x14b1cd(0x166)]-0x1,_0x25af2e;_0x512360>=0x0;_0x512360--)(_0x25af2e=_0x421932[_0x512360])&&(_0x4a4cfa=_0x25af2e(_0x4a4cfa)||_0x4a4cfa);return _0x4a4cfa;},_0x54e373=(_0x1725c3,_0x31925e)=>(_0x47fc08,_0x569687)=>_0x31925e(_0x47fc08,_0x569687,_0x1725c3);function _0x920e66(_0x38876b,_0x51bfe3){const _0x118e88=_0x39bac6,_0x15e564=_0x38876b['replies'][0x0];return{..._0x51bfe3,'id':_0x15e564[_0x118e88(0x127)],'resolved':_0x38876b[_0x118e88(0x182)]===0x1,'dT':_0x12611a(_0x15e564[_0x118e88(0x15d)]),'personId':_0x15e564[_0x118e88(0x138)],'threadId':_0x15e564[_0x118e88(0x162)]};}function _0x457631(_0x1ffea8,_0x1ad0b1,_0x43e436){const _0x37814b=_0x39bac6;var _0x5618ae,_0xcca847;if(((_0xcca847=(_0x5618ae=_0x1ffea8==null?void 0x0:_0x1ffea8[_0x37814b(0x178)])==null?void 0x0:_0x5618ae[_0x37814b(0x166)])!=null?_0xcca847:0x0)>0x0){const _0x445749=(_0x258523,_0x16f5a3)=>({'id':_0x258523[_0x37814b(0x127)],'threadId':_0x258523[_0x37814b(0x162)],'dT':_0x12611a(_0x258523['createTimestamp']),'personId':_0x258523['userId'],'resolved':_0x1ffea8[_0x37814b(0x182)]===_0x164965[_0x37814b(0x145)],'unitId':_0x1ad0b1,'subUnitId':_0x43e436,'text':JSON['parse'](_0x258523['content']),'parentId':_0x16f5a3}),_0x1d6c9d=_0x445749(_0x1ffea8[_0x37814b(0x178)][0x0]);return{..._0x1d6c9d,'children':_0x1ffea8[_0x37814b(0x178)]['slice'](0x1)[_0x37814b(0x12c)](_0x20f24c=>_0x445749(_0x20f24c,_0x1d6c9d['id']))};}return null;}let _0xdaded3=class{constructor(_0x260e02,_0x4f3ca9,_0x233e2b){const _0x376e7b=_0x39bac6;this[_0x376e7b(0x16f)]=_0x260e02,this[_0x376e7b(0x151)]=_0x4f3ca9,this['_sessionService']=_0x233e2b;}async[_0x39bac6(0x119)](_0x308b98){const _0x10482e=_0x39bac6;var _0xb3dbeb,_0x106803;const {parentId:_0x26caab,unitId:_0x169a57,text:_0x378339,threadId:_0x19bd27}=_0x308b98,_0x3bcb37=(_0x106803=(_0xb3dbeb=_0x378339[_0x10482e(0x147)])==null?void 0x0:_0xb3dbeb[_0x10482e(0x186)](_0x5a671f=>_0x5a671f[_0x10482e(0x14b)]===_0x782fd0['CustomRangeType']['COMMENT'])[_0x10482e(0x12c)](_0x3c7d7f=>_0x3c7d7f[_0x10482e(0x13f)]))!=null?_0x106803:[],_0x506106=JSON[_0x10482e(0x181)](_0x378339),_0x139885=(await this[_0x10482e(0x13a)][_0x10482e(0x115)](_0x169a57))[_0x10482e(0x14f)]();if(_0x26caab){const _0x5d7a3f={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37,'threadId':_0x19bd27},_0x350feb=(await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x142),{'body':_0x5d7a3f}))[_0x10482e(0x153)][_0x10482e(0x11c)];return{..._0x308b98,'id':_0x350feb[_0x10482e(0x127)],'dT':_0x782fd0['dayjs'](+_0x350feb[_0x10482e(0x15d)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x350feb[_0x10482e(0x138)]};}else{const _0x3e3f56={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37},_0x3fe384=await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x16b),{'body':_0x3e3f56});return _0x920e66(_0x3fe384[_0x10482e(0x153)][_0x10482e(0x195)],_0x308b98);}}async[_0x39bac6(0x18c)](_0x8b9b46){const _0xb450c3=_0x39bac6;var _0x8625a4,_0xa71be4;const {text:_0x4a68e6,unitId:_0x106438}=_0x8b9b46,_0xde822a=(_0xa71be4=(_0x8625a4=_0x4a68e6[_0xb450c3(0x147)])==null?void 0x0:_0x8625a4[_0xb450c3(0x186)](_0xd9a070=>_0xd9a070[_0xb450c3(0x14b)]===_0x782fd0[_0xb450c3(0x12d)][_0xb450c3(0x14d)])[_0xb450c3(0x12c)](_0x4f40c7=>_0x4f40c7['rangeId']))!=null?_0xa71be4:[],_0x242bb9=JSON[_0xb450c3(0x181)](_0x4a68e6),_0x35b175=_0x8b9b46[_0xb450c3(0x162)],_0x208f13=_0x8b9b46['id'],_0x2d3823={'memberId':(await this[_0xb450c3(0x13a)][_0xb450c3(0x115)](_0x106438))[_0xb450c3(0x14f)](),'unitId':_0x106438,'threadId':_0x35b175,'mention':_0xde822a,'content':_0x242bb9,'replyId':_0x208f13},_0x893a3a=await this[_0xb450c3(0x16f)][_0xb450c3(0x15b)](_0xb450c3(0x117)+_0x106438+'/edit',{'body':_0x2d3823});return!_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)]||_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)][_0xb450c3(0x11b)]===0x1;}async[_0x39bac6(0x160)](_0x21de49){const _0x232b94=_0x39bac6,{unitId:_0x1a0153}=_0x21de49,_0xecdddd=_0x21de49[_0x232b94(0x162)],_0x5dea95={'memberId':this[_0x232b94(0x151)][_0x232b94(0x14e)]()[_0x232b94(0x130)],'unitId':_0x1a0153,'threadId':_0xecdddd,'solved':_0x21de49[_0x232b94(0x13e)]?_0x164965['Solved']:_0x164965[_0x232b94(0x133)]},_0x3af354=await this[_0x232b94(0x16f)]['post'](_0x232b94(0x117)+_0x1a0153+_0x232b94(0x172),{'body':_0x5dea95});return!_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)]||_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)][_0x232b94(0x11b)]===0x1;}async[_0x39bac6(0x123)](_0xadd8cf,_0x4c5b3e,_0x30661a,_0x3ef511){const _0x2daa3d=_0x39bac6,_0x140414={'memberId':(await this['_sessionService'][_0x2daa3d(0x115)](_0xadd8cf))['getMemberID'](),'threadId':_0x30661a,'replyId':_0x3ef511,'unitId':_0xadd8cf},_0x10ecf8=await this['_httpService'][_0x2daa3d(0x15b)](_0x2daa3d(0x117)+_0xadd8cf+_0x2daa3d(0x198),{'body':_0x140414});return!_0x10ecf8['body']['error']||_0x10ecf8['body'][_0x2daa3d(0x12f)][_0x2daa3d(0x11b)]===0x1;}async[_0x39bac6(0x12b)](_0x2a789e,_0x3993fc,_0x24fa13){const _0x8c7613=_0x39bac6,_0x323aba={'unitId':_0x2a789e,'threadId':_0x24fa13},_0x42c927=await this[_0x8c7613(0x16f)]['post'](_0x8c7613(0x117)+_0x2a789e+_0x8c7613(0x12a),{'body':_0x323aba}),_0x53285a=_0x24fa13[_0x8c7613(0x12c)](_0x495b07=>_0x457631(_0x42c927['body'][_0x8c7613(0x13c)][_0x495b07],_0x2a789e,_0x3993fc))[_0x8c7613(0x186)](Boolean);return Object[_0x8c7613(0x141)](_0x42c927['body'][_0x8c7613(0x128)])['forEach'](_0x317cb1=>{const _0xcf96d4=_0x8c7613;this[_0xcf96d4(0x151)]['addUser'](_0x317cb1);}),_0x53285a;}[_0x39bac6(0x17a)](_0x12cf9d){const _0x5eb4ed=_0x39bac6;return{'id':_0x12cf9d['id'],'threadId':_0x12cf9d[_0x5eb4ed(0x162)],'ref':_0x12cf9d[_0x5eb4ed(0x18a)]};}};_0xdaded3=_0x341482([_0x54e373(0x0,_0x782fd0['Inject'](_0x1743c9[_0x39bac6(0x170)])),_0x54e373(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0['UserManagerService'])),_0x54e373(0x2,_0x782fd0['Inject'](_0x39b4a1['CollaborationSessionService']))],_0xdaded3);var _0x35e2d3=Object[_0x39bac6(0x190)],_0x251c6c=(_0x39b604,_0x16e532,_0x3ceee9,_0x544e1f)=>{const _0x4bf264=_0x39bac6;for(var _0x189f22=_0x544e1f>0x1?void 0x0:_0x544e1f?_0x35e2d3(_0x16e532,_0x3ceee9):_0x16e532,_0xa21c5f=_0x39b604[_0x4bf264(0x166)]-0x1,_0x8a23ef;_0xa21c5f>=0x0;_0xa21c5f--)(_0x8a23ef=_0x39b604[_0xa21c5f])&&(_0x189f22=_0x8a23ef(_0x189f22)||_0x189f22);return _0x189f22;},_0xc5bf0a=(_0x4b8646,_0x3c378f)=>(_0x58a946,_0x3e73f9)=>_0x3c378f(_0x58a946,_0x3e73f9,_0x4b8646);let _0x5e86a5=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x5339b6,_0x5edd86){const _0x553597=_0x39bac6;super(),this['_threadCommentDataSourceService']=_0x5339b6,this[_0x553597(0x168)]=_0x5edd86,this[_0x553597(0x140)]();}[_0x39bac6(0x140)](){const _0x5e3ad4=_0x39bac6;this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x18b)]=this[_0x5e3ad4(0x168)],this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x16a)]=!0x1;}};_0x5e86a5=_0x251c6c([_0xc5bf0a(0x0,_0x1a5ffb[_0x39bac6(0x175)]),_0xc5bf0a(0x1,_0x782fd0[_0x39bac6(0x188)](_0xdaded3))],_0x5e86a5);var _0x3e7616=Object[_0x39bac6(0x184)],_0x1478eb=Object['getOwnPropertyDescriptor'],_0x5c00e3=(_0xa5e157,_0x56122d,_0x2608fa)=>_0x56122d in _0xa5e157?_0x3e7616(_0xa5e157,_0x56122d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2608fa}):_0xa5e157[_0x56122d]=_0x2608fa,_0x37846f=(_0x47f843,_0x989710,_0x51a3ce,_0xc9d341)=>{const _0x26911c=_0x39bac6;for(var _0x30c813=_0xc9d341>0x1?void 0x0:_0xc9d341?_0x1478eb(_0x989710,_0x51a3ce):_0x989710,_0x5496bb=_0x47f843[_0x26911c(0x166)]-0x1,_0x4810a4;_0x5496bb>=0x0;_0x5496bb--)(_0x4810a4=_0x47f843[_0x5496bb])&&(_0x30c813=_0x4810a4(_0x30c813)||_0x30c813);return _0x30c813;},_0x31ad66=(_0x4ba811,_0x45e0a8)=>(_0x5a3f4a,_0x12e7c)=>_0x45e0a8(_0x5a3f4a,_0x12e7c,_0x4ba811),_0x44b548=(_0x460ab4,_0x1cc7a1,_0x371345)=>_0x5c00e3(_0x460ab4,typeof _0x1cc7a1!=_0x39bac6(0x194)?_0x1cc7a1+'':_0x1cc7a1,_0x371345);_0x3d14b1[_0x39bac6(0x110)]=class extends _0x782fd0[_0x39bac6(0x143)]{constructor(_0x30c588=_0xb8b559,_0x282a78,_0x18f083){const _0xb35703=_0x39bac6;super(),this[_0xb35703(0x148)]=_0x30c588,this[_0xb35703(0x17f)]=_0x282a78,this[_0xb35703(0x129)]=_0x18f083;const {..._0x5e7252}=_0x782fd0[_0xb35703(0x152)]({},_0xb8b559,this['_config']);this[_0xb35703(0x129)][_0xb35703(0x199)](_0x6fb472,_0x5e7252);}[_0x39bac6(0x125)](){const _0x56a516=_0x39bac6;[[_0xdaded3],[_0x5e86a5],[_0x621e03]][_0x56a516(0x19c)](_0x208c3d=>{const _0x500d5e=_0x56a516;this['_injector'][_0x500d5e(0x17c)](_0x208c3d);});}[_0x39bac6(0x11a)](){const _0x455048=_0x39bac6;this[_0x455048(0x17f)][_0x455048(0x146)](_0x5e86a5),this[_0x455048(0x17f)]['get'](_0x621e03);}},_0x44b548(_0x3d14b1['UniverThreadCommentDataSourcePlugin'],_0x39bac6(0x185),_0x13e2de),_0x44b548(_0x3d14b1[_0x39bac6(0x110)],_0x39bac6(0x189),_0x782fd0['UniverInstanceType'][_0x39bac6(0x154)]),_0x3d14b1['UniverThreadCommentDataSourcePlugin']=_0x37846f([_0x782fd0[_0x39bac6(0x17d)](_0x145a2a[_0x39bac6(0x11f)],_0x39b4a1[_0x39bac6(0x17e)],_0x338502['UniverLicensePlugin']),_0x31ad66(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x15f)])),_0x31ad66(0x2,_0x782fd0[_0x39bac6(0x15e)])],_0x3d14b1[_0x39bac6(0x110)]),Object[_0x39bac6(0x184)](_0x3d14b1,Symbol['toStringTag'],{'value':'Module'});}));
1
+ (function(_0x33b233,_0x595fad){const _0x47d44a=_0x3c7e,_0x3eab5d=_0x33b233();while(!![]){try{const _0x47fa08=parseInt(_0x47d44a(0x243))/0x1+-parseInt(_0x47d44a(0x23d))/0x2*(parseInt(_0x47d44a(0x23b))/0x3)+parseInt(_0x47d44a(0x1e3))/0x4+parseInt(_0x47d44a(0x1e1))/0x5*(-parseInt(_0x47d44a(0x1fd))/0x6)+-parseInt(_0x47d44a(0x22d))/0x7+-parseInt(_0x47d44a(0x225))/0x8*(-parseInt(_0x47d44a(0x1eb))/0x9)+-parseInt(_0x47d44a(0x217))/0xa;if(_0x47fa08===_0x595fad)break;else _0x3eab5d['push'](_0x3eab5d['shift']());}catch(_0x13d2fb){_0x3eab5d['push'](_0x3eab5d['shift']());}}}(_0x1668,0x19d57),function(_0x42ed06,_0xf28392){const _0x133241=_0x3c7e;typeof exports==_0x133241(0x209)&&typeof module<'u'?_0xf28392(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==_0x133241(0x1fa)&&define[_0x133241(0x1d0)]?define(['exports',_0x133241(0x1f9),_0x133241(0x20f),_0x133241(0x252),_0x133241(0x242),'@univerjs/thread-comment',_0x133241(0x24a),_0x133241(0x1ee)],_0xf28392):(_0x42ed06=typeof globalThis<'u'?globalThis:_0x42ed06||self,_0xf28392(_0x42ed06['UniverProThreadCommentDatasource']={},_0x42ed06['UniverProCollaborationClient'],_0x42ed06[_0x133241(0x1fc)],_0x42ed06[_0x133241(0x1e7)],_0x42ed06[_0x133241(0x230)],_0x42ed06['UniverThreadComment'],_0x42ed06[_0x133241(0x24a)],_0x42ed06['UniverNetwork']));}(this,function(_0x4a3a80,_0x13648d,_0x4340f9,_0x525483,_0x279728,_0x406360,_0x1c3b9f,_0x2f6d70){'use strict';const _0x56720d=_0x3c7e;const _0x254eb9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x197c1e=(_0x469a84=>(_0x469a84[_0x469a84[_0x56720d(0x1e4)]=0x0]=_0x56720d(0x1e4),_0x469a84[_0x469a84[_0x56720d(0x1df)]=0x1]='Solved',_0x469a84[_0x469a84[_0x56720d(0x215)]=-0x1]=_0x56720d(0x215),_0x469a84))(_0x197c1e||{}),_0x40483b=(_0x4f3def=>(_0x4f3def[_0x4f3def[_0x56720d(0x1d9)]=0x0]=_0x56720d(0x1d9),_0x4f3def[_0x4f3def[_0x56720d(0x1e2)]=0x1]=_0x56720d(0x1e2),_0x4f3def[_0x4f3def['Reply']=0x2]=_0x56720d(0x233),_0x4f3def[_0x4f3def[_0x56720d(0x234)]=0x3]=_0x56720d(0x234),_0x4f3def[_0x4f3def[_0x56720d(0x229)]=0x4]=_0x56720d(0x229),_0x4f3def[_0x4f3def[_0x56720d(0x1d6)]=0x5]=_0x56720d(0x1d6),_0x4f3def[_0x4f3def[_0x56720d(0x215)]=-0x1]=_0x56720d(0x215),_0x4f3def))(_0x40483b||{});const _0x422562=_0x4d103c=>_0x525483[_0x56720d(0x221)](new Date(+_0x4d103c))[_0x56720d(0x1f8)](_0x56720d(0x211)),_0x1d94d9=async(_0x6458b0,_0x27319d)=>{const _0x1b3fb2=_0x56720d,_0xf9010a=_0x6458b0['get'](_0x525483['UserManagerService']),_0x4691e6=_0x6458b0[_0x1b3fb2(0x1dc)](_0x2f6d70[_0x1b3fb2(0x236)]);_0x27319d[_0x1b3fb2(0x1d1)](_0x19d661=>{const _0x531414=_0x1b3fb2;_0xf9010a[_0x531414(0x22b)](_0x19d661)&&_0x27319d[_0x531414(0x21b)](_0x19d661);}),_0x27319d[_0x1b3fb2(0x1e0)]&&(await _0x4691e6['get'](_0x1b3fb2(0x249),{'params':{'userIDs':[..._0x27319d]}}))['body']['users'][_0x1b3fb2(0x1d1)](_0x55006a=>{const _0xadc46f=_0x1b3fb2;_0x55006a&&_0xf9010a[_0xadc46f(0x21c)](_0x55006a);});};var _0x588554=Object[_0x56720d(0x1f5)],_0x4cd362=(_0x2b4e83,_0x2815c2,_0x17fb1e,_0x40ea6b)=>{for(var _0x24465e=_0x40ea6b>0x1?void 0x0:_0x40ea6b?_0x588554(_0x2815c2,_0x17fb1e):_0x2815c2,_0x2f78d7=_0x2b4e83['length']-0x1,_0x1e2c96;_0x2f78d7>=0x0;_0x2f78d7--)(_0x1e2c96=_0x2b4e83[_0x2f78d7])&&(_0x24465e=_0x1e2c96(_0x24465e)||_0x24465e);return _0x24465e;},_0x482da6=(_0x2347d3,_0x5011dc)=>(_0x18bc3c,_0xa61c3)=>_0x5011dc(_0x18bc3c,_0xa61c3,_0x2347d3);let _0x45e3f1=class extends _0x525483[_0x56720d(0x24f)]{constructor(_0x1611c0,_0x1e2be9,_0x22aa0c,_0x45580c){const _0x2aa815=_0x56720d;super(),this[_0x2aa815(0x1e8)]=_0x1611c0,this[_0x2aa815(0x228)]=_0x1e2be9,this[_0x2aa815(0x1d2)]=_0x22aa0c,this[_0x2aa815(0x205)]=_0x45580c,this[_0x2aa815(0x21f)](),this[_0x2aa815(0x1fe)]();}['_initUserSync'](){const _0x213c4d=_0x56720d;this[_0x213c4d(0x23e)](this[_0x213c4d(0x228)]['commentUpdate$']['pipe'](_0x1c3b9f[_0x213c4d(0x1f7)](0x10))['subscribe'](_0x485a5a=>{const _0x482df1=_0x213c4d,_0x1d0179=new Set();_0x485a5a['forEach'](_0x1bd32c=>{const _0x3b1c10=_0x3c7e;switch(_0x1bd32c[_0x3b1c10(0x21d)]){case _0x3b1c10(0x23c):{const _0x2be03a=_0x1bd32c[_0x3b1c10(0x238)][_0x3b1c10(0x200)];_0x1d0179[_0x3b1c10(0x23c)](_0x2be03a);break;}}}),_0x1d94d9(this[_0x482df1(0x205)],_0x1d0179);}));}[_0x56720d(0x21f)](){const _0x510d15=_0x56720d;this[_0x510d15(0x23e)](this[_0x510d15(0x1e8)]['commentUpdate$'][_0x510d15(0x1f0)](async _0x51fcf9=>{const _0x3b811f=_0x510d15;var _0xdcce89,_0x1b7082,_0x229f22,_0x3aa6d1;const _0x433b82=(_0xdcce89=this[_0x3b811f(0x228)]['getUnit'](_0x51fcf9['unitId'])['find'](_0x57d6a8=>_0x57d6a8[_0x3b811f(0x206)]===_0x51fcf9[_0x3b811f(0x206)]))==null?void 0x0:_0xdcce89['root'];if(!_0x433b82)return;const {unitId:_0x54bebc,subUnitId:_0x18f27b}=_0x433b82;switch(_0x51fcf9['user']&&this['_userService']['addUser'](_0x51fcf9[_0x3b811f(0x1d7)]),_0x51fcf9['type']){case _0x40483b[_0x3b811f(0x1e2)]:break;case _0x40483b[_0x3b811f(0x233)]:{this[_0x3b811f(0x228)][_0x3b811f(0x247)](_0x54bebc,_0x18f27b,{'unitId':_0x54bebc,'subUnitId':_0x18f27b,'ref':'','id':_0x51fcf9[_0x3b811f(0x1e5)],'dT':_0x422562(+_0x51fcf9[_0x3b811f(0x239)]),'threadId':_0x51fcf9[_0x3b811f(0x206)],'personId':(_0x229f22=(_0x1b7082=_0x51fcf9[_0x3b811f(0x1d7)])==null?void 0x0:_0x1b7082[_0x3b811f(0x22c)])!=null?_0x229f22:_0x51fcf9['userId'],'text':JSON[_0x3b811f(0x237)](_0x51fcf9[_0x3b811f(0x251)]),'parentId':_0x433b82['id']});break;}case _0x40483b['Delete']:{const _0x726599=this['_threadCommentModel']['getComment'](_0x54bebc,_0x18f27b,_0x51fcf9[_0x3b811f(0x1e5)]);_0x726599&&_0x726599[_0x3b811f(0x241)]&&this['_threadCommentModel'][_0x3b811f(0x250)](_0x54bebc,_0x18f27b,_0x51fcf9[_0x3b811f(0x1e5)]);break;}case _0x40483b['Edit']:{this[_0x3b811f(0x228)][_0x3b811f(0x1d3)](_0x54bebc,_0x18f27b,{'commentId':_0x51fcf9[_0x3b811f(0x1e5)],'text':JSON[_0x3b811f(0x237)](_0x51fcf9[_0x3b811f(0x251)])});break;}case _0x40483b[_0x3b811f(0x1d6)]:{const _0xfd4cc0=(_0x3aa6d1=this['_threadCommentModel']['getUnit'](_0x51fcf9['unitId'])[_0x3b811f(0x1f1)](_0x481a58=>_0x481a58[_0x3b811f(0x206)]===_0x51fcf9[_0x3b811f(0x206)]))==null?void 0x0:_0x3aa6d1[_0x3b811f(0x1d4)];_0xfd4cc0&&this[_0x3b811f(0x228)]['resolveComment'](_0x54bebc,_0x18f27b,_0xfd4cc0['id'],_0x51fcf9[_0x3b811f(0x203)]===_0x197c1e[_0x3b811f(0x1df)]);break;}}}));}};_0x45e3f1=_0x4cd362([_0x482da6(0x0,_0x525483[_0x56720d(0x1e9)](_0x13648d[_0x56720d(0x1dd)])),_0x482da6(0x1,_0x525483[_0x56720d(0x1e9)](_0x406360[_0x56720d(0x235)])),_0x482da6(0x2,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x22e)])),_0x482da6(0x3,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x218)]))],_0x45e3f1);const _0x3d21c7=_0x56720d(0x1e6),_0x3a391f={};var _0x313121=Object[_0x56720d(0x1f5)],_0x4843bd=(_0x51788b,_0xfdd25c,_0x45a249,_0x222c5a)=>{const _0x31a43f=_0x56720d;for(var _0x3a4eb3=_0x222c5a>0x1?void 0x0:_0x222c5a?_0x313121(_0xfdd25c,_0x45a249):_0xfdd25c,_0x536e2e=_0x51788b[_0x31a43f(0x224)]-0x1,_0x5508de;_0x536e2e>=0x0;_0x536e2e--)(_0x5508de=_0x51788b[_0x536e2e])&&(_0x3a4eb3=_0x5508de(_0x3a4eb3)||_0x3a4eb3);return _0x3a4eb3;},_0x9e8b73=(_0x2c5472,_0x5c7e84)=>(_0x5cf7ef,_0x5e4e4b)=>_0x5c7e84(_0x5cf7ef,_0x5e4e4b,_0x2c5472);function _0x3fcce9(_0x23829c,_0x337b78){const _0x5c69b8=_0x56720d,_0x249598=_0x23829c[_0x5c69b8(0x22f)][0x0];return{..._0x337b78,'id':_0x249598['replyId'],'resolved':_0x23829c[_0x5c69b8(0x203)]===0x1,'dT':_0x422562(_0x249598[_0x5c69b8(0x239)]),'personId':_0x249598[_0x5c69b8(0x207)],'threadId':_0x249598[_0x5c69b8(0x206)]};}function _0x1bc301(_0xd82791,_0x34e3c4,_0xaff656){const _0x2d84c2=_0x56720d;var _0x2e295b,_0x29cd24;if(((_0x29cd24=(_0x2e295b=_0xd82791==null?void 0x0:_0xd82791[_0x2d84c2(0x22f)])==null?void 0x0:_0x2e295b[_0x2d84c2(0x224)])!=null?_0x29cd24:0x0)>0x0){const _0x495c0b=(_0x424264,_0x5e3a8b)=>({'id':_0x424264[_0x2d84c2(0x1e5)],'threadId':_0x424264[_0x2d84c2(0x206)],'dT':_0x422562(_0x424264[_0x2d84c2(0x239)]),'personId':_0x424264[_0x2d84c2(0x207)],'resolved':_0xd82791[_0x2d84c2(0x203)]===_0x197c1e[_0x2d84c2(0x1df)],'unitId':_0x34e3c4,'subUnitId':_0xaff656,'text':JSON[_0x2d84c2(0x237)](_0x424264['content']),'parentId':_0x5e3a8b}),_0x87f0c1=_0x495c0b(_0xd82791['replies'][0x0]);return{..._0x87f0c1,'children':_0xd82791['replies'][_0x2d84c2(0x1ed)](0x1)[_0x2d84c2(0x219)](_0x1eb1d7=>_0x495c0b(_0x1eb1d7,_0x87f0c1['id']))};}return null;}let _0x4b7ec2=class{constructor(_0x55d2c5,_0x4b4022,_0xc7cd55){const _0x1b0f6d=_0x56720d;this[_0x1b0f6d(0x24d)]=_0x55d2c5,this[_0x1b0f6d(0x1d2)]=_0x4b4022,this[_0x1b0f6d(0x1f2)]=_0xc7cd55;}async[_0x56720d(0x247)](_0xe46b6){const _0x3b8478=_0x56720d;var _0xa2ede3,_0x4b9b05;const {parentId:_0x45fada,unitId:_0xecdb20,text:_0x3da925,threadId:_0x37dd08}=_0xe46b6,_0x1e43bb=(_0x4b9b05=(_0xa2ede3=_0x3da925['customRanges'])==null?void 0x0:_0xa2ede3[_0x3b8478(0x212)](_0x5bacb2=>_0x5bacb2['rangeType']===_0x525483['CustomRangeType']['COMMENT'])[_0x3b8478(0x219)](_0x2e291b=>_0x2e291b['rangeId']))!=null?_0x4b9b05:[],_0x49056b=JSON[_0x3b8478(0x21a)](_0x3da925),_0x1b833b=(await this[_0x3b8478(0x1f2)][_0x3b8478(0x231)](_0xecdb20))[_0x3b8478(0x214)]();if(_0x45fada){const _0x36ef92={'memberId':_0x1b833b,'unitId':_0xecdb20,'content':_0x49056b,'mention':_0x1e43bb,'threadId':_0x37dd08},_0x255746=(await this[_0x3b8478(0x24d)][_0x3b8478(0x22a)](_0x3b8478(0x1d8)+_0xecdb20+_0x3b8478(0x1f6),{'body':_0x36ef92}))[_0x3b8478(0x240)]['reply'];return{..._0xe46b6,'id':_0x255746['replyId'],'dT':_0x525483[_0x3b8478(0x221)](+_0x255746[_0x3b8478(0x239)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x255746[_0x3b8478(0x207)]};}else{const _0x10cb84={'memberId':_0x1b833b,'unitId':_0xecdb20,'content':_0x49056b,'mention':_0x1e43bb},_0xe39c60=await this['_httpService'][_0x3b8478(0x22a)]('/universer-api/comment/unit/'+_0xecdb20+'/add',{'body':_0x10cb84});return _0x3fcce9(_0xe39c60[_0x3b8478(0x240)][_0x3b8478(0x21e)],_0xe46b6);}}async['updateComment'](_0x3ae6df){const _0x291882=_0x56720d;var _0x561349,_0x120dd7;const {text:_0x160ca0,unitId:_0x1631ec}=_0x3ae6df,_0x446cc7=(_0x120dd7=(_0x561349=_0x160ca0[_0x291882(0x24e)])==null?void 0x0:_0x561349[_0x291882(0x212)](_0x1f35f3=>_0x1f35f3[_0x291882(0x20b)]===_0x525483[_0x291882(0x210)][_0x291882(0x201)])[_0x291882(0x219)](_0x54d797=>_0x54d797[_0x291882(0x216)]))!=null?_0x120dd7:[],_0x108ebe=JSON[_0x291882(0x21a)](_0x160ca0),_0x301fa8=_0x3ae6df['threadId'],_0x58f747=_0x3ae6df['id'],_0x1c2384={'memberId':(await this['_sessionService'][_0x291882(0x231)](_0x1631ec))['getMemberID'](),'unitId':_0x1631ec,'threadId':_0x301fa8,'mention':_0x446cc7,'content':_0x108ebe,'replyId':_0x58f747},_0x266e4a=await this[_0x291882(0x24d)][_0x291882(0x22a)]('/universer-api/comment/unit/'+_0x1631ec+_0x291882(0x1ef),{'body':_0x1c2384});return!_0x266e4a[_0x291882(0x240)][_0x291882(0x23f)]||_0x266e4a[_0x291882(0x240)][_0x291882(0x23f)][_0x291882(0x222)]===0x1;}async['resolveComment'](_0x3735b3){const _0x35f812=_0x56720d,{unitId:_0x15fbdc}=_0x3735b3,_0x292503=_0x3735b3[_0x35f812(0x206)],_0x1558a5={'memberId':this[_0x35f812(0x1d2)]['getCurrentUser']()[_0x35f812(0x22c)],'unitId':_0x15fbdc,'threadId':_0x292503,'solved':_0x3735b3[_0x35f812(0x1f4)]?_0x197c1e['Solved']:_0x197c1e[_0x35f812(0x1e4)]},_0x5533e2=await this[_0x35f812(0x24d)][_0x35f812(0x22a)]('/universer-api/comment/unit/'+_0x15fbdc+'/solved',{'body':_0x1558a5});return!_0x5533e2[_0x35f812(0x240)][_0x35f812(0x23f)]||_0x5533e2[_0x35f812(0x240)][_0x35f812(0x23f)][_0x35f812(0x222)]===0x1;}async[_0x56720d(0x250)](_0x5cdd16,_0x588338,_0x8b0468,_0x355aa2){const _0x3b57f5=_0x56720d,_0x4609bd={'memberId':(await this[_0x3b57f5(0x1f2)][_0x3b57f5(0x231)](_0x5cdd16))[_0x3b57f5(0x214)](),'threadId':_0x8b0468,'replyId':_0x355aa2,'unitId':_0x5cdd16},_0x540056=await this[_0x3b57f5(0x24d)][_0x3b57f5(0x22a)]('/universer-api/comment/unit/'+_0x5cdd16+_0x3b57f5(0x24c),{'body':_0x4609bd});return!_0x540056[_0x3b57f5(0x240)][_0x3b57f5(0x23f)]||_0x540056[_0x3b57f5(0x240)][_0x3b57f5(0x23f)][_0x3b57f5(0x222)]===0x1;}async[_0x56720d(0x23a)](_0x2ee95a,_0x3f39e7,_0x11d80f){const _0x5b712f=_0x56720d,_0x1d872b={'unitId':_0x2ee95a,'threadId':_0x11d80f},_0x136202=await this[_0x5b712f(0x24d)][_0x5b712f(0x22a)](_0x5b712f(0x1d8)+_0x2ee95a+_0x5b712f(0x226),{'body':_0x1d872b}),_0x241951=_0x11d80f['map'](_0xee2461=>_0x1bc301(_0x136202['body'][_0x5b712f(0x202)][_0xee2461],_0x2ee95a,_0x3f39e7))[_0x5b712f(0x212)](Boolean);return Object[_0x5b712f(0x1fb)](_0x136202[_0x5b712f(0x240)][_0x5b712f(0x20a)])[_0x5b712f(0x1d1)](_0x3c4173=>{const _0x4e09d9=_0x5b712f;this['_userService'][_0x4e09d9(0x21c)](_0x3c4173);}),_0x241951;}['saveCommentToSnapshot'](_0x1a7087){const _0x32538d=_0x56720d;return{'id':_0x1a7087['id'],'threadId':_0x1a7087[_0x32538d(0x206)],'ref':_0x1a7087[_0x32538d(0x20d)]};}};_0x4b7ec2=_0x4843bd([_0x9e8b73(0x0,_0x525483['Inject'](_0x2f6d70[_0x56720d(0x236)])),_0x9e8b73(0x1,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x22e)])),_0x9e8b73(0x2,_0x525483[_0x56720d(0x1e9)](_0x13648d[_0x56720d(0x1f3)]))],_0x4b7ec2);var _0x23cff4=Object[_0x56720d(0x1f5)],_0x3de4e7=(_0x223fbe,_0x2eed46,_0x65505,_0x819511)=>{for(var _0x3b8f8f=_0x819511>0x1?void 0x0:_0x819511?_0x23cff4(_0x2eed46,_0x65505):_0x2eed46,_0x110c5d=_0x223fbe['length']-0x1,_0x55c55b;_0x110c5d>=0x0;_0x110c5d--)(_0x55c55b=_0x223fbe[_0x110c5d])&&(_0x3b8f8f=_0x55c55b(_0x3b8f8f)||_0x3b8f8f);return _0x3b8f8f;},_0xf86572=(_0x50a455,_0x3819ce)=>(_0x32402b,_0x156cf9)=>_0x3819ce(_0x32402b,_0x156cf9,_0x50a455);let _0x15e92f=class extends _0x525483[_0x56720d(0x24f)]{constructor(_0x48c599,_0x4ef969){const _0x99bfd9=_0x56720d;super(),this['_threadCommentDataSourceService']=_0x48c599,this[_0x99bfd9(0x1da)]=_0x4ef969,this[_0x99bfd9(0x220)]();}[_0x56720d(0x220)](){const _0x489895=_0x56720d;this[_0x489895(0x20e)]['dataSource']=this[_0x489895(0x1da)],this[_0x489895(0x20e)][_0x489895(0x204)]=!0x1;}};_0x15e92f=_0x3de4e7([_0xf86572(0x0,_0x406360[_0x56720d(0x208)]),_0xf86572(0x1,_0x525483[_0x56720d(0x1e9)](_0x4b7ec2))],_0x15e92f);var _0x3d2a86=Object[_0x56720d(0x1ff)],_0x1e27fc=Object[_0x56720d(0x1f5)],_0x5bc067=(_0x52c961,_0x49036a,_0x445c36)=>_0x49036a in _0x52c961?_0x3d2a86(_0x52c961,_0x49036a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x445c36}):_0x52c961[_0x49036a]=_0x445c36,_0x11e518=(_0x57dff6,_0x1239a6,_0x16931a,_0xcbef54)=>{const _0x148383=_0x56720d;for(var _0x5ebe72=_0xcbef54>0x1?void 0x0:_0xcbef54?_0x1e27fc(_0x1239a6,_0x16931a):_0x1239a6,_0x502a22=_0x57dff6[_0x148383(0x224)]-0x1,_0xfb6169;_0x502a22>=0x0;_0x502a22--)(_0xfb6169=_0x57dff6[_0x502a22])&&(_0x5ebe72=_0xfb6169(_0x5ebe72)||_0x5ebe72);return _0x5ebe72;},_0x2d76a7=(_0x4db5f4,_0x44713f)=>(_0x135f74,_0x44752f)=>_0x44713f(_0x135f74,_0x44752f,_0x4db5f4),_0x4f3453=(_0x3f4477,_0x2eff1d,_0x3e69aa)=>_0x5bc067(_0x3f4477,typeof _0x2eff1d!=_0x56720d(0x1d5)?_0x2eff1d+'':_0x2eff1d,_0x3e69aa);_0x4a3a80['UniverThreadCommentDataSourcePlugin']=class extends _0x525483[_0x56720d(0x245)]{constructor(_0x1e9495=_0x3a391f,_0x2a2573,_0x3c24ab){const _0x3d067d=_0x56720d;super(),this[_0x3d067d(0x227)]=_0x1e9495,this[_0x3d067d(0x205)]=_0x2a2573,this['_configService']=_0x3c24ab;const {..._0x568af9}=_0x525483[_0x3d067d(0x232)]({},_0x3a391f,this['_config']);this[_0x3d067d(0x248)][_0x3d067d(0x1ea)](_0x3d21c7,_0x568af9);}[_0x56720d(0x1cf)](){const _0x2704aa=_0x56720d;[[_0x4b7ec2],[_0x15e92f],[_0x45e3f1]][_0x2704aa(0x1d1)](_0x15501a=>{const _0xe8a46b=_0x2704aa;this[_0xe8a46b(0x205)]['add'](_0x15501a);});}[_0x56720d(0x1ec)](){const _0x325ce1=_0x56720d;this[_0x325ce1(0x205)]['get'](_0x15e92f),this[_0x325ce1(0x205)]['get'](_0x45e3f1);}},_0x4f3453(_0x4a3a80[_0x56720d(0x1de)],'pluginName',_0x254eb9),_0x4f3453(_0x4a3a80[_0x56720d(0x1de)],_0x56720d(0x21d),_0x525483[_0x56720d(0x223)]['UNIVER_UNKNOWN']),_0x4a3a80[_0x56720d(0x1de)]=_0x11e518([_0x525483[_0x56720d(0x213)](_0x279728[_0x56720d(0x24b)],_0x13648d['UniverCollaborationClientPlugin'],_0x4340f9[_0x56720d(0x246)]),_0x2d76a7(0x1,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x218)])),_0x2d76a7(0x2,_0x525483[_0x56720d(0x20c)])],_0x4a3a80['UniverThreadCommentDataSourcePlugin']),Object[_0x56720d(0x1ff)](_0x4a3a80,Symbol[_0x56720d(0x244)],{'value':_0x56720d(0x1db)});}));function _0x3c7e(_0x126814,_0x4c2150){_0x126814=_0x126814-0x1cf;const _0x16682f=_0x1668();let _0x3c7e6b=_0x16682f[_0x126814];return _0x3c7e6b;}function _0x1668(){const _0x23b250=['add','68078cQgqPU','disposeWithMe','error','body','parentId','@univerjs/thread-comment-ui','135021ZzXVXw','toStringTag','Plugin','UniverLicensePlugin','addComment','_configService','/universer-api/user/list','rxjs','UniverThreadCommentUIPlugin','/delete','_httpService','customRanges','Disposable','deleteComment','content','@univerjs/core','onStarting','amd','forEach','_userService','updateComment','root','symbol','Solve','user','/universer-api/comment/unit/','Unknown','_threadCommentDataSource','Module','get','CommentService','UniverThreadCommentDataSourcePlugin','Solved','size','5yotmLN','Add','353380VlZeqe','OpenOrReOpen','replyId','thread-comment-data-source.config','UniverCore','_commentService','Inject','setConfig','9BHqcFW','onReady','slice','@univerjs/network','/edit','subscribe','find','_sessionService','CollaborationSessionService','resolved','getOwnPropertyDescriptor','/reply','bufferTime','format','@univerjs-pro/collaboration-client','function','values','UniverProLicense','150882gdtVIN','_initUserSync','defineProperty','personId','COMMENT','comments','solved','syncUpdateMutationToColla','_injector','threadId','userId','IThreadCommentDataSourceService','object','users','rangeType','IConfigService','ref','_threadCommentDataSourceService','@univerjs-pro/license','CustomRangeType','YYYY/MM/DD\x20HH:mm','filter','DependentOn','getMemberID','UNRECOGNIZED','rangeId','679630lgBCSF','Injector','map','stringify','delete','addUser','type','comment','_init','_initDataSource','dayjs','code','UniverInstanceType','length','1622384liTaje','/list','_config','_threadCommentModel','Delete','post','getUser','userID','1352400euSnkm','UserManagerService','replies','UniverThreadCommentUi','requireSession','merge','Reply','Edit','ThreadCommentModel','HTTPService','parse','payload','createTimestamp','listComments','3wwWMuX'];_0x1668=function(){return _0x23b250;};return _0x1668();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251216-1519cb7",
3
+ "version": "0.13.0-insiders.20251220-0a5ea4d",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.13.0-insiders.20251216-1519cb7",
49
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251216-1519cb7",
48
+ "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251220-0a5ea4d",
49
+ "@univerjs-pro/license": "0.13.0-insiders.20251220-0a5ea4d",
50
50
  "@univerjs/protocol": "0.1.47",
51
- "@univerjs/network": "0.13.0-insiders.20251216-1519cb7",
52
- "@univerjs/core": "0.13.0-insiders.20251216-1519cb7",
53
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251216-1519cb7",
54
- "@univerjs/thread-comment": "0.13.0-insiders.20251216-1519cb7"
51
+ "@univerjs/thread-comment": "0.13.0-insiders.20251220-0a5ea4d",
52
+ "@univerjs/network": "0.13.0-insiders.20251220-0a5ea4d",
53
+ "@univerjs/thread-comment-ui": "0.13.0-insiders.20251220-0a5ea4d",
54
+ "@univerjs/core": "0.13.0-insiders.20251220-0a5ea4d"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",