@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507081607 → 0.9.1-nightly.202507091606

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 _0x2a77bb=_0x5c4e;(function(_0x3abd5a,_0x57add2){const _0x5e0cbe=_0x5c4e,_0x453fec=_0x3abd5a();while(!![]){try{const _0xfff239=parseInt(_0x5e0cbe(0x137))/0x1+parseInt(_0x5e0cbe(0x176))/0x2*(parseInt(_0x5e0cbe(0x135))/0x3)+parseInt(_0x5e0cbe(0x175))/0x4+-parseInt(_0x5e0cbe(0x198))/0x5*(parseInt(_0x5e0cbe(0x15c))/0x6)+parseInt(_0x5e0cbe(0x152))/0x7+-parseInt(_0x5e0cbe(0x155))/0x8+parseInt(_0x5e0cbe(0x13b))/0x9;if(_0xfff239===_0x57add2)break;else _0x453fec['push'](_0x453fec['shift']());}catch(_0x6439c1){_0x453fec['push'](_0x453fec['shift']());}}}(_0x38b2,0x78a71));function _0x5c4e(_0x1758a2,_0x33e103){const _0x38b217=_0x38b2();return _0x5c4e=function(_0x5c4ebc,_0x3ee2d5){_0x5c4ebc=_0x5c4ebc-0x126;let _0x49a869=_0x38b217[_0x5c4ebc];return _0x49a869;},_0x5c4e(_0x1758a2,_0x33e103);}Object[_0x2a77bb(0x16d)](exports,Symbol[_0x2a77bb(0x12a)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x2a77bb(0x179);var I=(_0x343e5b=>(_0x343e5b[_0x343e5b['OpenOrReOpen']=0x0]=_0x2a77bb(0x17d),_0x343e5b[_0x343e5b[_0x2a77bb(0x12e)]=0x1]=_0x2a77bb(0x12e),_0x343e5b[_0x343e5b[_0x2a77bb(0x193)]=-0x1]=_0x2a77bb(0x193),_0x343e5b))(I||{}),v=(_0x49740d=>(_0x49740d[_0x49740d[_0x2a77bb(0x14e)]=0x0]=_0x2a77bb(0x14e),_0x49740d[_0x49740d[_0x2a77bb(0x148)]=0x1]=_0x2a77bb(0x148),_0x49740d[_0x49740d['Reply']=0x2]=_0x2a77bb(0x13f),_0x49740d[_0x49740d[_0x2a77bb(0x192)]=0x3]='Edit',_0x49740d[_0x49740d[_0x2a77bb(0x162)]=0x4]=_0x2a77bb(0x162),_0x49740d[_0x49740d[_0x2a77bb(0x138)]=0x5]=_0x2a77bb(0x138),_0x49740d[_0x49740d[_0x2a77bb(0x193)]=-0x1]='UNRECOGNIZED',_0x49740d))(v||{});const f=_0x4d7cb1=>c[_0x2a77bb(0x149)](new Date(+_0x4d7cb1))[_0x2a77bb(0x169)](_0x2a77bb(0x145)),R=async(_0x58c7de,_0x177058)=>{const _0x8a7c7=_0x2a77bb,_0x20ee01=_0x58c7de[_0x8a7c7(0x15f)](c['UserManagerService']),_0x5e6703=_0x58c7de['get'](P[_0x8a7c7(0x17b)]);_0x177058[_0x8a7c7(0x15a)](_0x34940a=>{const _0x47b016=_0x8a7c7;_0x20ee01[_0x47b016(0x12d)](_0x34940a)&&_0x177058[_0x47b016(0x180)](_0x34940a);}),_0x177058[_0x8a7c7(0x196)]&&(await _0x5e6703[_0x8a7c7(0x15f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x177058]}}))[_0x8a7c7(0x15b)]['users']['forEach'](_0x5b8870=>{_0x5b8870&&_0x20ee01['addUser'](_0x5b8870);});};var $=Object[_0x2a77bb(0x139)],E=(_0x3388da,_0x7fbebf,_0x5d40db,_0x3fa9ef)=>{for(var _0x17a4a4=_0x3fa9ef>0x1?void 0x0:_0x3fa9ef?$(_0x7fbebf,_0x5d40db):_0x7fbebf,_0x34d908=_0x3388da['length']-0x1,_0xf46f14;_0x34d908>=0x0;_0x34d908--)(_0xf46f14=_0x3388da[_0x34d908])&&(_0x17a4a4=_0xf46f14(_0x17a4a4)||_0x17a4a4);return _0x17a4a4;},S=(_0x4e691d,_0x19dd04)=>(_0x17fc73,_0x4122a0)=>_0x19dd04(_0x17fc73,_0x4122a0,_0x4e691d);let p=class extends c[_0x2a77bb(0x185)]{constructor(_0x1b8010,_0x1c7eaf,_0x4f8e3b,_0x29205c){const _0x2767c9=_0x2a77bb;super(),this[_0x2767c9(0x12f)]=_0x1b8010,this[_0x2767c9(0x150)]=_0x1c7eaf,this[_0x2767c9(0x18d)]=_0x4f8e3b,this[_0x2767c9(0x136)]=_0x29205c,this['_init'](),this[_0x2767c9(0x161)]();}[_0x2a77bb(0x161)](){const _0x1bef63=_0x2a77bb;this[_0x1bef63(0x17a)](this['_threadCommentModel'][_0x1bef63(0x157)][_0x1bef63(0x130)](w[_0x1bef63(0x151)](0x10))[_0x1bef63(0x186)](_0x3cf95d=>{const _0x46dd8b=_0x1bef63,_0x2e943d=new Set();_0x3cf95d[_0x46dd8b(0x15a)](_0x2c8347=>{const _0x80363a=_0x46dd8b;switch(_0x2c8347[_0x80363a(0x132)]){case _0x80363a(0x14c):{const _0x2a78b3=_0x2c8347['payload']['personId'];_0x2e943d[_0x80363a(0x14c)](_0x2a78b3);break;}}}),R(this[_0x46dd8b(0x136)],_0x2e943d);}));}[_0x2a77bb(0x167)](){const _0x128b02=_0x2a77bb;this['disposeWithMe'](this[_0x128b02(0x12f)][_0x128b02(0x157)][_0x128b02(0x186)](async _0x285f84=>{const _0x1eb6a5=_0x128b02;var _0x362d6b,_0x2210b2,_0x2b40b6,_0x405fd1;const _0x4c7303=(_0x362d6b=this[_0x1eb6a5(0x150)][_0x1eb6a5(0x184)](_0x285f84['unitId'])['find'](_0xc7d598=>_0xc7d598[_0x1eb6a5(0x156)]===_0x285f84[_0x1eb6a5(0x156)]))==null?void 0x0:_0x362d6b[_0x1eb6a5(0x183)];if(!_0x4c7303)return;const {unitId:_0x550dd3,subUnitId:_0x53659a}=_0x4c7303;switch(_0x285f84[_0x1eb6a5(0x18e)]&&this[_0x1eb6a5(0x18d)]['addUser'](_0x285f84[_0x1eb6a5(0x18e)]),_0x285f84[_0x1eb6a5(0x132)]){case v[_0x1eb6a5(0x148)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1eb6a5(0x174)](_0x550dd3,_0x53659a,{'unitId':_0x550dd3,'subUnitId':_0x53659a,'ref':'','id':_0x285f84[_0x1eb6a5(0x158)],'dT':f(+_0x285f84[_0x1eb6a5(0x13d)]),'threadId':_0x285f84[_0x1eb6a5(0x156)],'personId':(_0x2b40b6=(_0x2210b2=_0x285f84['user'])==null?void 0x0:_0x2210b2['userID'])!=null?_0x2b40b6:_0x285f84[_0x1eb6a5(0x188)],'text':JSON['parse'](_0x285f84[_0x1eb6a5(0x16f)]),'parentId':_0x4c7303['id']});break;}case v[_0x1eb6a5(0x162)]:{const _0x19e423=this[_0x1eb6a5(0x150)]['getComment'](_0x550dd3,_0x53659a,_0x285f84[_0x1eb6a5(0x158)]);_0x19e423&&_0x19e423['parentId']&&this[_0x1eb6a5(0x150)][_0x1eb6a5(0x160)](_0x550dd3,_0x53659a,_0x285f84['replyId']);break;}case v[_0x1eb6a5(0x192)]:{this[_0x1eb6a5(0x150)][_0x1eb6a5(0x144)](_0x550dd3,_0x53659a,{'commentId':_0x285f84[_0x1eb6a5(0x158)],'text':JSON[_0x1eb6a5(0x191)](_0x285f84[_0x1eb6a5(0x16f)])});break;}case v[_0x1eb6a5(0x138)]:{const _0x8991f0=(_0x405fd1=this['_threadCommentModel']['getUnit'](_0x285f84['unitId'])[_0x1eb6a5(0x173)](_0x55a37b=>_0x55a37b[_0x1eb6a5(0x156)]===_0x285f84['threadId']))==null?void 0x0:_0x405fd1['root'];_0x8991f0&&this[_0x1eb6a5(0x150)][_0x1eb6a5(0x190)](_0x550dd3,_0x53659a,_0x8991f0['id'],_0x285f84[_0x1eb6a5(0x128)]===I[_0x1eb6a5(0x12e)]);break;}}}));}};p=E([S(0x0,c[_0x2a77bb(0x171)](b['CommentService'])),S(0x1,c[_0x2a77bb(0x171)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x2a77bb(0x159)])),S(0x3,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x13a)]))],p);const q=_0x2a77bb(0x131),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x17d02a,_0x4bfbc8,_0x326024,_0x56d0ac)=>{const _0x51eb1d=_0x2a77bb;for(var _0x549d64=_0x56d0ac>0x1?void 0x0:_0x56d0ac?A(_0x4bfbc8,_0x326024):_0x4bfbc8,_0x42f3cf=_0x17d02a[_0x51eb1d(0x165)]-0x1,_0x42ff5b;_0x42f3cf>=0x0;_0x42f3cf--)(_0x42ff5b=_0x17d02a[_0x42f3cf])&&(_0x549d64=_0x42ff5b(_0x549d64)||_0x549d64);return _0x549d64;},_=(_0x58b11c,_0xee4746)=>(_0x455f40,_0x1eacf4)=>_0xee4746(_0x455f40,_0x1eacf4,_0x58b11c);function Y(_0x504577,_0x4659b1){const _0x58867d=_0x2a77bb,_0x216169=_0x504577['replies'][0x0];return{..._0x4659b1,'id':_0x216169['replyId'],'resolved':_0x504577[_0x58867d(0x128)]===0x1,'dT':f(_0x216169[_0x58867d(0x13d)]),'personId':_0x216169[_0x58867d(0x188)],'threadId':_0x216169['threadId']};}function G(_0x240a1a,_0x1a5b93,_0x433010){const _0xea12c2=_0x2a77bb;var _0x186bcb,_0x1dec4e;if(((_0x1dec4e=(_0x186bcb=_0x240a1a==null?void 0x0:_0x240a1a[_0xea12c2(0x14f)])==null?void 0x0:_0x186bcb['length'])!=null?_0x1dec4e:0x0)>0x0){const _0x2e1877=(_0x290821,_0xce7be3)=>({'id':_0x290821[_0xea12c2(0x158)],'threadId':_0x290821[_0xea12c2(0x156)],'dT':f(_0x290821[_0xea12c2(0x13d)]),'personId':_0x290821[_0xea12c2(0x188)],'resolved':_0x240a1a[_0xea12c2(0x128)]===I[_0xea12c2(0x12e)],'unitId':_0x1a5b93,'subUnitId':_0x433010,'text':JSON['parse'](_0x290821[_0xea12c2(0x16f)]),'parentId':_0xce7be3}),_0x43e347=_0x2e1877(_0x240a1a['replies'][0x0]);return{..._0x43e347,'children':_0x240a1a['replies'][_0xea12c2(0x164)](0x1)['map'](_0x1a35ee=>_0x2e1877(_0x1a35ee,_0x43e347['id']))};}return null;}let g=class{constructor(_0x2f49cb,_0xacf922,_0x41f658,_0x3d967a){const _0x5c51c8=_0x2a77bb;this['_httpService']=_0x2f49cb,this[_0x5c51c8(0x18d)]=_0xacf922,this[_0x5c51c8(0x182)]=_0x41f658,this[_0x5c51c8(0x136)]=_0x3d967a;}async[_0x2a77bb(0x174)](_0x1b955e){const _0x224934=_0x2a77bb;var _0x5929be,_0x224a81;const {parentId:_0xbe48ec,unitId:_0x4fd90c,text:_0x4a0d83,threadId:_0x16999d}=_0x1b955e,_0x3f09fd=(_0x224a81=(_0x5929be=_0x4a0d83[_0x224934(0x18c)])==null?void 0x0:_0x5929be[_0x224934(0x16a)](_0x5e89c1=>_0x5e89c1['rangeType']===c[_0x224934(0x16e)][_0x224934(0x18b)])[_0x224934(0x18a)](_0x56f536=>_0x56f536[_0x224934(0x133)]))!=null?_0x224a81:[],_0x384b6c=JSON[_0x224934(0x168)](_0x4a0d83),_0x17741e=(await this[_0x224934(0x182)][_0x224934(0x195)](_0x4fd90c))[_0x224934(0x142)]();if(_0xbe48ec){const _0x5976ed={'memberId':_0x17741e,'unitId':_0x4fd90c,'content':_0x384b6c,'mention':_0x3f09fd,'threadId':_0x16999d},_0x139b57=(await this[_0x224934(0x178)][_0x224934(0x194)](_0x224934(0x154)+_0x4fd90c+_0x224934(0x14d),{'body':_0x5976ed}))[_0x224934(0x15b)][_0x224934(0x18f)];return{..._0x1b955e,'id':_0x139b57[_0x224934(0x158)],'dT':c[_0x224934(0x149)](+_0x139b57[_0x224934(0x13d)])['format'](_0x224934(0x145)),'personId':_0x139b57[_0x224934(0x188)]};}else{const _0x483192={'memberId':_0x17741e,'unitId':_0x4fd90c,'content':_0x384b6c,'mention':_0x3f09fd},_0x1f3c3d=await this[_0x224934(0x178)][_0x224934(0x194)]('/universer-api/comment/unit/'+_0x4fd90c+'/add',{'body':_0x483192});return Y(_0x1f3c3d['body'][_0x224934(0x15e)],_0x1b955e);}}async[_0x2a77bb(0x144)](_0x3f41ae){const _0x35f311=_0x2a77bb;var _0x2330a6,_0x42c74d;const {text:_0x51bf49,unitId:_0x58a509}=_0x3f41ae,_0x1534ac=(_0x42c74d=(_0x2330a6=_0x51bf49['customRanges'])==null?void 0x0:_0x2330a6[_0x35f311(0x16a)](_0x3bfc5b=>_0x3bfc5b[_0x35f311(0x17e)]===c[_0x35f311(0x16e)][_0x35f311(0x18b)])[_0x35f311(0x18a)](_0x57558d=>_0x57558d['rangeId']))!=null?_0x42c74d:[],_0x2bbe0c=JSON['stringify'](_0x51bf49),_0x4b33ec=_0x3f41ae[_0x35f311(0x156)],_0x2a5f23=_0x3f41ae['id'],_0x51a6e1={'memberId':(await this['_sessionService'][_0x35f311(0x195)](_0x58a509))[_0x35f311(0x142)](),'unitId':_0x58a509,'threadId':_0x4b33ec,'mention':_0x1534ac,'content':_0x2bbe0c,'replyId':_0x2a5f23},_0x2d087f=await this['_httpService']['post'](_0x35f311(0x154)+_0x58a509+_0x35f311(0x163),{'body':_0x51a6e1});return!_0x2d087f[_0x35f311(0x15b)][_0x35f311(0x14b)]||_0x2d087f[_0x35f311(0x15b)][_0x35f311(0x14b)][_0x35f311(0x146)]===0x1;}async[_0x2a77bb(0x190)](_0x41fa4f){const _0x5f0c13=_0x2a77bb,{unitId:_0x5f4df3}=_0x41fa4f,_0x32b662=_0x41fa4f[_0x5f0c13(0x156)],_0xdb7848={'memberId':this[_0x5f0c13(0x18d)][_0x5f0c13(0x127)]()[_0x5f0c13(0x134)],'unitId':_0x5f4df3,'threadId':_0x32b662,'solved':_0x41fa4f[_0x5f0c13(0x16b)]?I[_0x5f0c13(0x12e)]:I['OpenOrReOpen']},_0x30de6e=await this[_0x5f0c13(0x178)][_0x5f0c13(0x194)](_0x5f0c13(0x154)+_0x5f4df3+_0x5f0c13(0x143),{'body':_0xdb7848});return!_0x30de6e[_0x5f0c13(0x15b)][_0x5f0c13(0x14b)]||_0x30de6e['body'][_0x5f0c13(0x14b)][_0x5f0c13(0x146)]===0x1;}async[_0x2a77bb(0x160)](_0x4ef91e,_0x2d5a21,_0x4faa4a,_0x274a75){const _0x34d361=_0x2a77bb,_0x3f4310={'memberId':(await this[_0x34d361(0x182)]['requireSession'](_0x4ef91e))[_0x34d361(0x142)](),'threadId':_0x4faa4a,'replyId':_0x274a75,'unitId':_0x4ef91e},_0x32ce91=await this['_httpService']['post'](_0x34d361(0x154)+_0x4ef91e+_0x34d361(0x197),{'body':_0x3f4310});return!_0x32ce91[_0x34d361(0x15b)]['error']||_0x32ce91[_0x34d361(0x15b)]['error']['code']===0x1;}async[_0x2a77bb(0x189)](_0x38d430,_0x46b484,_0x5a4927){const _0x34c878=_0x2a77bb,_0x106d4f={'unitId':_0x38d430,'threadId':_0x5a4927},_0x170061=await this[_0x34c878(0x178)][_0x34c878(0x194)]('/universer-api/comment/unit/'+_0x38d430+_0x34c878(0x12b),{'body':_0x106d4f}),_0x4389ee=_0x5a4927[_0x34c878(0x18a)](_0x84d348=>G(_0x170061[_0x34c878(0x15b)][_0x34c878(0x140)][_0x84d348],_0x38d430,_0x46b484))[_0x34c878(0x16a)](Boolean);return Object[_0x34c878(0x181)](_0x170061['body']['users'])[_0x34c878(0x15a)](_0x5f3469=>{const _0x14d44c=_0x34c878;this[_0x14d44c(0x18d)][_0x14d44c(0x13e)](_0x5f3469);}),_0x4389ee;}[_0x2a77bb(0x14a)](_0x4d63e7){const _0x77ef2=_0x2a77bb;return{'id':_0x4d63e7['id'],'threadId':_0x4d63e7['threadId'],'ref':_0x4d63e7[_0x77ef2(0x15d)]};}};g=x([_(0x0,c[_0x2a77bb(0x171)](P[_0x2a77bb(0x17b)])),_(0x1,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x159)])),_(0x2,c[_0x2a77bb(0x171)](b[_0x2a77bb(0x153)])),_(0x3,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x13a)]))],g);var H=Object[_0x2a77bb(0x139)],J=(_0x4177ee,_0x4247be,_0x5b3993,_0x51d784)=>{const _0x419cd9=_0x2a77bb;for(var _0x43b43c=_0x51d784>0x1?void 0x0:_0x51d784?H(_0x4247be,_0x5b3993):_0x4247be,_0x3590c4=_0x4177ee[_0x419cd9(0x165)]-0x1,_0x1bbe9d;_0x3590c4>=0x0;_0x3590c4--)(_0x1bbe9d=_0x4177ee[_0x3590c4])&&(_0x43b43c=_0x1bbe9d(_0x43b43c)||_0x43b43c);return _0x43b43c;},y=(_0x34f6f3,_0x3b3600)=>(_0x33f73a,_0x35e480)=>_0x3b3600(_0x33f73a,_0x35e480,_0x34f6f3);function _0x38b2(){const _0x486d49=['add','/reply','Unknown','replies','_threadCommentModel','bufferTime','347907dLPcVx','CollaborationSessionService','/universer-api/comment/unit/','4398256iebtWU','threadId','commentUpdate$','replyId','UserManagerService','forEach','body','22746VKSAxq','ref','comment','get','deleteComment','_initUserSync','Delete','/edit','slice','length','_config','_init','stringify','format','filter','resolved','UniverCollaborationClientPlugin','defineProperty','CustomRangeType','content','symbol','Inject','_initDataSource','find','addComment','3283712eLjbev','296206uierJc','_configService','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','HTTPService','_threadCommentDataSource','OpenOrReOpen','rangeType','syncUpdateMutationToColla','delete','values','_sessionService','root','getUnit','Disposable','subscribe','setConfig','userId','listComments','map','COMMENT','customRanges','_userService','user','reply','resolveComment','parse','Edit','UNRECOGNIZED','post','requireSession','size','/delete','815cURpFM','UNIVER_UNKNOWN','getCurrentUser','solved','IConfigService','toStringTag','/list','dataSource','getUser','Solved','_commentService','pipe','thread-comment-data-source.config','type','rangeId','userID','9OSkQFo','_injector','103963ebxvso','Solve','getOwnPropertyDescriptor','Injector','2187063ppFTGg','UniverThreadCommentDataSourcePlugin','createTimestamp','addUser','Reply','comments','pluginName','getMemberID','/solved','updateComment','YYYY/MM/DD\x20HH:mm','code','UniverThreadCommentUIPlugin','Add','dayjs','saveCommentToSnapshot','error'];_0x38b2=function(){return _0x486d49;};return _0x38b2();}let C=class extends c[_0x2a77bb(0x185)]{constructor(_0xc46163,_0xf27941){const _0x3401b6=_0x2a77bb;super(),this['_threadCommentDataSourceService']=_0xc46163,this[_0x3401b6(0x17c)]=_0xf27941,this[_0x3401b6(0x172)]();}[_0x2a77bb(0x172)](){const _0x16c5cf=_0x2a77bb;this['_threadCommentDataSourceService'][_0x16c5cf(0x12c)]=this[_0x16c5cf(0x17c)],this['_threadCommentDataSourceService'][_0x16c5cf(0x17f)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x2a77bb(0x16d)],L=Object[_0x2a77bb(0x139)],Z=(_0xb921a4,_0x189203,_0x55c66d)=>_0x189203 in _0xb921a4?F(_0xb921a4,_0x189203,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55c66d}):_0xb921a4[_0x189203]=_0x55c66d,W=(_0x2be208,_0x3db1e2,_0x520f4e,_0x1b9d56)=>{const _0x490b89=_0x2a77bb;for(var _0x8c3cc=_0x1b9d56>0x1?void 0x0:_0x1b9d56?L(_0x3db1e2,_0x520f4e):_0x3db1e2,_0x57e60c=_0x2be208[_0x490b89(0x165)]-0x1,_0x163d3e;_0x57e60c>=0x0;_0x57e60c--)(_0x163d3e=_0x2be208[_0x57e60c])&&(_0x8c3cc=_0x163d3e(_0x8c3cc)||_0x8c3cc);return _0x8c3cc;},O=(_0x5b94a7,_0x3530e2)=>(_0x3598d9,_0x3550b7)=>_0x3530e2(_0x3598d9,_0x3550b7,_0x5b94a7),N=(_0x176dee,_0x5653b2,_0x2c5d74)=>Z(_0x176dee,typeof _0x5653b2!=_0x2a77bb(0x170)?_0x5653b2+'':_0x5653b2,_0x2c5d74);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x4adfb8=D,_0x11f0ac,_0x54e396){const _0x1eeca8=_0x2a77bb;super(),this['_config']=_0x4adfb8,this[_0x1eeca8(0x136)]=_0x11f0ac,this[_0x1eeca8(0x177)]=_0x54e396;const {..._0x2d1e05}=c['merge']({},D,this[_0x1eeca8(0x166)]);this['_configService'][_0x1eeca8(0x187)](q,_0x2d1e05);}['onStarting'](){const _0x59b32e=_0x2a77bb;[[g],[C],[p]][_0x59b32e(0x15a)](_0x26f876=>{const _0x2609c6=_0x59b32e;this[_0x2609c6(0x136)][_0x2609c6(0x14c)](_0x26f876);});}['onReady'](){const _0x52a84f=_0x2a77bb;this['_injector'][_0x52a84f(0x15f)](C),this[_0x52a84f(0x136)]['get'](p);}},N(exports[_0x2a77bb(0x13c)],_0x2a77bb(0x141),U),N(exports[_0x2a77bb(0x13c)],_0x2a77bb(0x132),c['UniverInstanceType'][_0x2a77bb(0x126)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x2a77bb(0x147)],b[_0x2a77bb(0x16c)],T['UniverLicensePlugin']),O(0x1,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x13a)])),O(0x2,c[_0x2a77bb(0x129)])],exports[_0x2a77bb(0x13c)]);
1
+ 'use strict';const _0x154b14=_0x564f;(function(_0xb69453,_0x11b739){const _0x4abf1c=_0x564f,_0x550e06=_0xb69453();while(!![]){try{const _0x393fae=parseInt(_0x4abf1c(0x85))/0x1*(-parseInt(_0x4abf1c(0xbf))/0x2)+-parseInt(_0x4abf1c(0xee))/0x3+parseInt(_0x4abf1c(0x97))/0x4+-parseInt(_0x4abf1c(0xdc))/0x5*(parseInt(_0x4abf1c(0xf9))/0x6)+parseInt(_0x4abf1c(0xe1))/0x7*(parseInt(_0x4abf1c(0xb7))/0x8)+-parseInt(_0x4abf1c(0xb2))/0x9*(parseInt(_0x4abf1c(0xc6))/0xa)+parseInt(_0x4abf1c(0x8e))/0xb*(parseInt(_0x4abf1c(0xd0))/0xc);if(_0x393fae===_0x11b739)break;else _0x550e06['push'](_0x550e06['shift']());}catch(_0x2e06eb){_0x550e06['push'](_0x550e06['shift']());}}}(_0x161b,0x5bdac));Object[_0x154b14(0xcf)](exports,Symbol[_0x154b14(0x8f)],{'value':_0x154b14(0xd4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x154b14(0xa1);var I=(_0x135fff=>(_0x135fff[_0x135fff[_0x154b14(0x9c)]=0x0]=_0x154b14(0x9c),_0x135fff[_0x135fff[_0x154b14(0xd6)]=0x1]=_0x154b14(0xd6),_0x135fff[_0x135fff[_0x154b14(0xf8)]=-0x1]=_0x154b14(0xf8),_0x135fff))(I||{}),v=(_0x324633=>(_0x324633[_0x324633[_0x154b14(0x9e)]=0x0]=_0x154b14(0x9e),_0x324633[_0x324633[_0x154b14(0xa4)]=0x1]='Add',_0x324633[_0x324633['Reply']=0x2]=_0x154b14(0x7d),_0x324633[_0x324633['Edit']=0x3]=_0x154b14(0xc3),_0x324633[_0x324633[_0x154b14(0xbd)]=0x4]=_0x154b14(0xbd),_0x324633[_0x324633[_0x154b14(0x91)]=0x5]=_0x154b14(0x91),_0x324633[_0x324633[_0x154b14(0xf8)]=-0x1]=_0x154b14(0xf8),_0x324633))(v||{});const f=_0x1734ea=>c[_0x154b14(0x83)](new Date(+_0x1734ea))[_0x154b14(0x98)](_0x154b14(0xed)),R=async(_0x2320f0,_0x226446)=>{const _0x5349ca=_0x154b14,_0x147428=_0x2320f0['get'](c['UserManagerService']),_0x5dcbf4=_0x2320f0[_0x5349ca(0x82)](P['HTTPService']);_0x226446[_0x5349ca(0xc8)](_0x2958c5=>{const _0x1e0ed8=_0x5349ca;_0x147428[_0x1e0ed8(0xcd)](_0x2958c5)&&_0x226446[_0x1e0ed8(0xda)](_0x2958c5);}),_0x226446[_0x5349ca(0x89)]&&(await _0x5dcbf4[_0x5349ca(0x82)](_0x5349ca(0x87),{'params':{'userIDs':[..._0x226446]}}))[_0x5349ca(0xa3)]['users'][_0x5349ca(0xc8)](_0x5009f2=>{_0x5009f2&&_0x147428['addUser'](_0x5009f2);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x57340d,_0x37616a,_0x48a955,_0x51b887)=>{const _0x44e352=_0x154b14;for(var _0x22d6b4=_0x51b887>0x1?void 0x0:_0x51b887?$(_0x37616a,_0x48a955):_0x37616a,_0x41bd04=_0x57340d[_0x44e352(0x9b)]-0x1,_0x4ad376;_0x41bd04>=0x0;_0x41bd04--)(_0x4ad376=_0x57340d[_0x41bd04])&&(_0x22d6b4=_0x4ad376(_0x22d6b4)||_0x22d6b4);return _0x22d6b4;},S=(_0x1de6cc,_0x36eefe)=>(_0x40e026,_0x437d9e)=>_0x36eefe(_0x40e026,_0x437d9e,_0x1de6cc);let p=class extends c[_0x154b14(0xd2)]{constructor(_0x5cf7cf,_0x3ef836,_0x27157a,_0x48ba70){const _0x2ec671=_0x154b14;super(),this[_0x2ec671(0xb9)]=_0x5cf7cf,this[_0x2ec671(0xbe)]=_0x3ef836,this[_0x2ec671(0xb0)]=_0x27157a,this[_0x2ec671(0xc5)]=_0x48ba70,this['_init'](),this[_0x2ec671(0xb6)]();}[_0x154b14(0xb6)](){const _0x47c80a=_0x154b14;this['disposeWithMe'](this[_0x47c80a(0xbe)][_0x47c80a(0x7c)][_0x47c80a(0xa8)](w[_0x47c80a(0xb8)](0x10))[_0x47c80a(0xd5)](_0x205331=>{const _0x4d0200=_0x47c80a,_0x3d62dc=new Set();_0x205331[_0x4d0200(0xc8)](_0x3df591=>{const _0x29006f=_0x4d0200;switch(_0x3df591[_0x29006f(0x88)]){case _0x29006f(0xcb):{const _0xc667b2=_0x3df591[_0x29006f(0xf2)][_0x29006f(0xef)];_0x3d62dc[_0x29006f(0xcb)](_0xc667b2);break;}}}),R(this[_0x4d0200(0xc5)],_0x3d62dc);}));}[_0x154b14(0xba)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x200fc7=>{const _0x5b3869=_0x564f;var _0x616792,_0x2792ad,_0x4665e2,_0x1c2262;const _0xf185ae=(_0x616792=this[_0x5b3869(0xbe)][_0x5b3869(0x86)](_0x200fc7[_0x5b3869(0xec)])[_0x5b3869(0xf6)](_0x4388c0=>_0x4388c0['threadId']===_0x200fc7[_0x5b3869(0xeb)]))==null?void 0x0:_0x616792['root'];if(!_0xf185ae)return;const {unitId:_0x42d20f,subUnitId:_0x3f7174}=_0xf185ae;switch(_0x200fc7['user']&&this['_userService'][_0x5b3869(0x95)](_0x200fc7['user']),_0x200fc7[_0x5b3869(0x88)]){case v['Add']:break;case v[_0x5b3869(0x7d)]:{this['_threadCommentModel'][_0x5b3869(0xf4)](_0x42d20f,_0x3f7174,{'unitId':_0x42d20f,'subUnitId':_0x3f7174,'ref':'','id':_0x200fc7[_0x5b3869(0xab)],'dT':f(+_0x200fc7[_0x5b3869(0xe6)]),'threadId':_0x200fc7[_0x5b3869(0xeb)],'personId':(_0x4665e2=(_0x2792ad=_0x200fc7[_0x5b3869(0x9a)])==null?void 0x0:_0x2792ad['userID'])!=null?_0x4665e2:_0x200fc7[_0x5b3869(0xd9)],'text':JSON[_0x5b3869(0xb1)](_0x200fc7[_0x5b3869(0xe2)]),'parentId':_0xf185ae['id']});break;}case v[_0x5b3869(0xbd)]:{const _0x40439f=this[_0x5b3869(0xbe)][_0x5b3869(0xc2)](_0x42d20f,_0x3f7174,_0x200fc7[_0x5b3869(0xab)]);_0x40439f&&_0x40439f['parentId']&&this[_0x5b3869(0xbe)][_0x5b3869(0xdd)](_0x42d20f,_0x3f7174,_0x200fc7[_0x5b3869(0xab)]);break;}case v[_0x5b3869(0xc3)]:{this[_0x5b3869(0xbe)][_0x5b3869(0x7b)](_0x42d20f,_0x3f7174,{'commentId':_0x200fc7[_0x5b3869(0xab)],'text':JSON[_0x5b3869(0xb1)](_0x200fc7[_0x5b3869(0xe2)])});break;}case v['Solve']:{const _0x56f5b8=(_0x1c2262=this[_0x5b3869(0xbe)]['getUnit'](_0x200fc7[_0x5b3869(0xec)])[_0x5b3869(0xf6)](_0x98094f=>_0x98094f[_0x5b3869(0xeb)]===_0x200fc7[_0x5b3869(0xeb)]))==null?void 0x0:_0x1c2262['root'];_0x56f5b8&&this[_0x5b3869(0xbe)][_0x5b3869(0xf0)](_0x42d20f,_0x3f7174,_0x56f5b8['id'],_0x200fc7['solved']===I[_0x5b3869(0xd6)]);break;}}}));}};p=E([S(0x0,c[_0x154b14(0x8c)](b[_0x154b14(0xce)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x154b14(0x8c)](c[_0x154b14(0xa7)])),S(0x3,c['Inject'](c[_0x154b14(0xb3)]))],p);const q=_0x154b14(0x94),D={};var A=Object[_0x154b14(0xa6)],x=(_0x4978bc,_0x1b1807,_0x3ec0ab,_0x13f0f3)=>{const _0x5bf1dd=_0x154b14;for(var _0x1f8df4=_0x13f0f3>0x1?void 0x0:_0x13f0f3?A(_0x1b1807,_0x3ec0ab):_0x1b1807,_0x1b75cc=_0x4978bc[_0x5bf1dd(0x9b)]-0x1,_0x87a7d2;_0x1b75cc>=0x0;_0x1b75cc--)(_0x87a7d2=_0x4978bc[_0x1b75cc])&&(_0x1f8df4=_0x87a7d2(_0x1f8df4)||_0x1f8df4);return _0x1f8df4;},_=(_0x1fb64e,_0x1264f4)=>(_0x20bcfc,_0x41d5ad)=>_0x1264f4(_0x20bcfc,_0x41d5ad,_0x1fb64e);function Y(_0x270151,_0x49a0d4){const _0x8f66ab=_0x154b14,_0x52f5cd=_0x270151[_0x8f66ab(0xa0)][0x0];return{..._0x49a0d4,'id':_0x52f5cd[_0x8f66ab(0xab)],'resolved':_0x270151['solved']===0x1,'dT':f(_0x52f5cd[_0x8f66ab(0xe6)]),'personId':_0x52f5cd[_0x8f66ab(0xd9)],'threadId':_0x52f5cd[_0x8f66ab(0xeb)]};}function G(_0x23d365,_0x5e7d6d,_0x4b51fd){const _0x43b1dd=_0x154b14;var _0x25818f,_0xe56e10;if(((_0xe56e10=(_0x25818f=_0x23d365==null?void 0x0:_0x23d365[_0x43b1dd(0xa0)])==null?void 0x0:_0x25818f['length'])!=null?_0xe56e10:0x0)>0x0){const _0x446cfa=(_0x5160d3,_0x52cb3b)=>({'id':_0x5160d3[_0x43b1dd(0xab)],'threadId':_0x5160d3['threadId'],'dT':f(_0x5160d3[_0x43b1dd(0xe6)]),'personId':_0x5160d3[_0x43b1dd(0xd9)],'resolved':_0x23d365[_0x43b1dd(0xd3)]===I['Solved'],'unitId':_0x5e7d6d,'subUnitId':_0x4b51fd,'text':JSON[_0x43b1dd(0xb1)](_0x5160d3[_0x43b1dd(0xe2)]),'parentId':_0x52cb3b}),_0x2e3609=_0x446cfa(_0x23d365[_0x43b1dd(0xa0)][0x0]);return{..._0x2e3609,'children':_0x23d365['replies'][_0x43b1dd(0xc4)](0x1)[_0x43b1dd(0xca)](_0x302bf9=>_0x446cfa(_0x302bf9,_0x2e3609['id']))};}return null;}let g=class{constructor(_0x54d2f8,_0x1c872a,_0x5f247e,_0x521cb6){const _0x4fbf71=_0x154b14;this[_0x4fbf71(0xdf)]=_0x54d2f8,this[_0x4fbf71(0xb0)]=_0x1c872a,this[_0x4fbf71(0xcc)]=_0x5f247e,this['_injector']=_0x521cb6;}async[_0x154b14(0xf4)](_0x4979b3){const _0x1c14c7=_0x154b14;var _0x409371,_0x30643d;const {parentId:_0x3c49fe,unitId:_0x2d2899,text:_0x4bb6d1,threadId:_0x146cd4}=_0x4979b3,_0x572adf=(_0x30643d=(_0x409371=_0x4bb6d1[_0x1c14c7(0x96)])==null?void 0x0:_0x409371[_0x1c14c7(0x90)](_0x7dc6d6=>_0x7dc6d6[_0x1c14c7(0xaf)]===c[_0x1c14c7(0xe5)][_0x1c14c7(0x84)])[_0x1c14c7(0xca)](_0x4e94e1=>_0x4e94e1['rangeId']))!=null?_0x30643d:[],_0x2403f2=JSON[_0x1c14c7(0xe9)](_0x4bb6d1),_0x1e59a1=(await this['_sessionService'][_0x1c14c7(0xa2)](_0x2d2899))[_0x1c14c7(0x8d)]();if(_0x3c49fe){const _0x57e8f1={'memberId':_0x1e59a1,'unitId':_0x2d2899,'content':_0x2403f2,'mention':_0x572adf,'threadId':_0x146cd4},_0x5b992c=(await this[_0x1c14c7(0xdf)][_0x1c14c7(0xe3)](_0x1c14c7(0xbb)+_0x2d2899+_0x1c14c7(0x92),{'body':_0x57e8f1}))[_0x1c14c7(0xa3)]['reply'];return{..._0x4979b3,'id':_0x5b992c[_0x1c14c7(0xab)],'dT':c[_0x1c14c7(0x83)](+_0x5b992c[_0x1c14c7(0xe6)])[_0x1c14c7(0x98)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5b992c[_0x1c14c7(0xd9)]};}else{const _0x1f978d={'memberId':_0x1e59a1,'unitId':_0x2d2899,'content':_0x2403f2,'mention':_0x572adf},_0x228c06=await this[_0x1c14c7(0xdf)][_0x1c14c7(0xe3)](_0x1c14c7(0xbb)+_0x2d2899+_0x1c14c7(0xa5),{'body':_0x1f978d});return Y(_0x228c06[_0x1c14c7(0xa3)][_0x1c14c7(0xac)],_0x4979b3);}}async[_0x154b14(0x7b)](_0x51be92){const _0xd235ce=_0x154b14;var _0x7bb15c,_0x221d36;const {text:_0x2d2ca3,unitId:_0x246841}=_0x51be92,_0xb83352=(_0x221d36=(_0x7bb15c=_0x2d2ca3[_0xd235ce(0x96)])==null?void 0x0:_0x7bb15c[_0xd235ce(0x90)](_0x40341c=>_0x40341c['rangeType']===c['CustomRangeType']['COMMENT'])['map'](_0x4fec7e=>_0x4fec7e[_0xd235ce(0x93)]))!=null?_0x221d36:[],_0x4b8bb2=JSON['stringify'](_0x2d2ca3),_0x59e06e=_0x51be92['threadId'],_0x541794=_0x51be92['id'],_0x5bff25={'memberId':(await this[_0xd235ce(0xcc)][_0xd235ce(0xa2)](_0x246841))[_0xd235ce(0x8d)](),'unitId':_0x246841,'threadId':_0x59e06e,'mention':_0xb83352,'content':_0x4b8bb2,'replyId':_0x541794},_0x3914f1=await this['_httpService'][_0xd235ce(0xe3)]('/universer-api/comment/unit/'+_0x246841+_0xd235ce(0xc0),{'body':_0x5bff25});return!_0x3914f1['body'][_0xd235ce(0xb4)]||_0x3914f1['body'][_0xd235ce(0xb4)][_0xd235ce(0xd1)]===0x1;}async[_0x154b14(0xf0)](_0x8bb49){const _0x1f7ca3=_0x154b14,{unitId:_0x1020de}=_0x8bb49,_0x305d22=_0x8bb49[_0x1f7ca3(0xeb)],_0x31e66d={'memberId':this[_0x1f7ca3(0xb0)][_0x1f7ca3(0xf5)]()[_0x1f7ca3(0xaa)],'unitId':_0x1020de,'threadId':_0x305d22,'solved':_0x8bb49[_0x1f7ca3(0xd7)]?I[_0x1f7ca3(0xd6)]:I[_0x1f7ca3(0x9c)]},_0x5361f3=await this[_0x1f7ca3(0xdf)][_0x1f7ca3(0xe3)](_0x1f7ca3(0xbb)+_0x1020de+_0x1f7ca3(0xc1),{'body':_0x31e66d});return!_0x5361f3[_0x1f7ca3(0xa3)][_0x1f7ca3(0xb4)]||_0x5361f3[_0x1f7ca3(0xa3)][_0x1f7ca3(0xb4)]['code']===0x1;}async[_0x154b14(0xdd)](_0x3efb08,_0x533869,_0x40b513,_0x11bd1f){const _0x56b8e8=_0x154b14,_0x29b9e5={'memberId':(await this['_sessionService'][_0x56b8e8(0xa2)](_0x3efb08))[_0x56b8e8(0x8d)](),'threadId':_0x40b513,'replyId':_0x11bd1f,'unitId':_0x3efb08},_0x3cd4a4=await this['_httpService'][_0x56b8e8(0xe3)](_0x56b8e8(0xbb)+_0x3efb08+_0x56b8e8(0xc9),{'body':_0x29b9e5});return!_0x3cd4a4[_0x56b8e8(0xa3)][_0x56b8e8(0xb4)]||_0x3cd4a4[_0x56b8e8(0xa3)]['error'][_0x56b8e8(0xd1)]===0x1;}async['listComments'](_0x4f03c5,_0x264324,_0x4a02e0){const _0x58eec9=_0x154b14,_0x1a870a={'unitId':_0x4f03c5,'threadId':_0x4a02e0},_0x1221e5=await this[_0x58eec9(0xdf)][_0x58eec9(0xe3)](_0x58eec9(0xbb)+_0x4f03c5+_0x58eec9(0xe7),{'body':_0x1a870a}),_0x5f01ef=_0x4a02e0[_0x58eec9(0xca)](_0x15aa01=>G(_0x1221e5[_0x58eec9(0xa3)][_0x58eec9(0xae)][_0x15aa01],_0x4f03c5,_0x264324))[_0x58eec9(0x90)](Boolean);return Object[_0x58eec9(0xf7)](_0x1221e5[_0x58eec9(0xa3)][_0x58eec9(0xea)])['forEach'](_0x43cbd5=>{const _0x32a49a=_0x58eec9;this['_userService'][_0x32a49a(0x95)](_0x43cbd5);}),_0x5f01ef;}[_0x154b14(0xc7)](_0xe800fb){const _0x532cbd=_0x154b14;return{'id':_0xe800fb['id'],'threadId':_0xe800fb[_0x532cbd(0xeb)],'ref':_0xe800fb[_0x532cbd(0x8b)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c['Inject'](c[_0x154b14(0xa7)])),_(0x2,c['Inject'](b[_0x154b14(0xe0)])),_(0x3,c[_0x154b14(0x8c)](c[_0x154b14(0xb3)]))],g);var H=Object[_0x154b14(0xa6)],J=(_0x1bbc9f,_0x5e45c8,_0x587c59,_0x1bf8df)=>{const _0x5c614b=_0x154b14;for(var _0x1eb476=_0x1bf8df>0x1?void 0x0:_0x1bf8df?H(_0x5e45c8,_0x587c59):_0x5e45c8,_0x4f6948=_0x1bbc9f[_0x5c614b(0x9b)]-0x1,_0x5a0833;_0x4f6948>=0x0;_0x4f6948--)(_0x5a0833=_0x1bbc9f[_0x4f6948])&&(_0x1eb476=_0x5a0833(_0x1eb476)||_0x1eb476);return _0x1eb476;},y=(_0x4a2f58,_0x17cb58)=>(_0xc34804,_0x1d023d)=>_0x17cb58(_0xc34804,_0x1d023d,_0x4a2f58);function _0x161b(){const _0x1ddcc3=['_config','stringify','users','threadId','unitId','YYYY/MM/DD\x20HH:mm','245199KAGVFw','personId','resolveComment','onReady','payload','_threadCommentDataSourceService','addComment','getCurrentUser','find','values','UNRECOGNIZED','6rTbveV','updateComment','commentUpdate$','Reply','UniverThreadCommentDataSourcePlugin','Plugin','_initDataSource','pluginName','get','dayjs','COMMENT','417572uEnvxD','getUnit','/universer-api/user/list','type','size','UNIVER_UNKNOWN','ref','Inject','getMemberID','6115307vjaejL','toStringTag','filter','Solve','/reply','rangeId','thread-comment-data-source.config','addUser','customRanges','1358416tbnIzF','format','syncUpdateMutationToColla','user','length','OpenOrReOpen','UniverInstanceType','Unknown','_threadCommentDataSource','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','body','Add','/add','getOwnPropertyDescriptor','UserManagerService','pipe','IConfigService','userID','replyId','comment','_configService','comments','rangeType','_userService','parse','5004crahpg','Injector','error','setConfig','_initUserSync','1263400ROCJyl','bufferTime','_commentService','_init','/universer-api/comment/unit/','DependentOn','Delete','_threadCommentModel','2iMAOms','/edit','/solved','getComment','Edit','slice','_injector','12630UWgptm','saveCommentToSnapshot','forEach','/delete','map','add','_sessionService','getUser','CommentService','defineProperty','24ZYnCTG','code','Disposable','solved','Module','subscribe','Solved','resolved','symbol','userId','delete','onStarting','158170PaXlYo','deleteComment','IThreadCommentDataSourceService','_httpService','CollaborationSessionService','7ZJlPiT','content','post','dataSource','CustomRangeType','createTimestamp','/list'];_0x161b=function(){return _0x1ddcc3;};return _0x161b();}let C=class extends c[_0x154b14(0xd2)]{constructor(_0xe67c77,_0x47e08d){const _0x319675=_0x154b14;super(),this[_0x319675(0xf3)]=_0xe67c77,this[_0x319675(0x9f)]=_0x47e08d,this[_0x319675(0x80)]();}[_0x154b14(0x80)](){const _0x4cccf9=_0x154b14;this[_0x4cccf9(0xf3)][_0x4cccf9(0xe4)]=this[_0x4cccf9(0x9f)],this[_0x4cccf9(0xf3)][_0x4cccf9(0x99)]=!0x1;}};C=J([y(0x0,M[_0x154b14(0xde)]),y(0x1,c[_0x154b14(0x8c)](g))],C);function _0x564f(_0xa4f6a1,_0x2c1d8a){const _0x161bb8=_0x161b();return _0x564f=function(_0x564f20,_0x141af0){_0x564f20=_0x564f20-0x7b;let _0x311d27=_0x161bb8[_0x564f20];return _0x311d27;},_0x564f(_0xa4f6a1,_0x2c1d8a);}var F=Object['defineProperty'],L=Object[_0x154b14(0xa6)],Z=(_0x367e03,_0x538d92,_0x440c6c)=>_0x538d92 in _0x367e03?F(_0x367e03,_0x538d92,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x440c6c}):_0x367e03[_0x538d92]=_0x440c6c,W=(_0x34fc6a,_0x569e25,_0x265150,_0x3cc707)=>{for(var _0x459a2a=_0x3cc707>0x1?void 0x0:_0x3cc707?L(_0x569e25,_0x265150):_0x569e25,_0x52918d=_0x34fc6a['length']-0x1,_0x1adba5;_0x52918d>=0x0;_0x52918d--)(_0x1adba5=_0x34fc6a[_0x52918d])&&(_0x459a2a=_0x1adba5(_0x459a2a)||_0x459a2a);return _0x459a2a;},O=(_0x6b3010,_0x1e0751)=>(_0x28b390,_0x1ee3c3)=>_0x1e0751(_0x28b390,_0x1ee3c3,_0x6b3010),N=(_0x2b8ad8,_0x23d88b,_0x34f8e0)=>Z(_0x2b8ad8,typeof _0x23d88b!=_0x154b14(0xd8)?_0x23d88b+'':_0x23d88b,_0x34f8e0);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x154b14(0x7f)]{constructor(_0x369f7e=D,_0x5260bd,_0x37eefa){const _0x41613e=_0x154b14;super(),this['_config']=_0x369f7e,this[_0x41613e(0xc5)]=_0x5260bd,this[_0x41613e(0xad)]=_0x37eefa;const {..._0x10a37c}=c['merge']({},D,this[_0x41613e(0xe8)]);this['_configService'][_0x41613e(0xb5)](q,_0x10a37c);}[_0x154b14(0xdb)](){const _0x215003=_0x154b14;[[g],[C],[p]][_0x215003(0xc8)](_0x26cde9=>{const _0x48a2eb=_0x215003;this['_injector'][_0x48a2eb(0xcb)](_0x26cde9);});}[_0x154b14(0xf1)](){const _0x55ee9e=_0x154b14;this[_0x55ee9e(0xc5)][_0x55ee9e(0x82)](C),this[_0x55ee9e(0xc5)][_0x55ee9e(0x82)](p);}},N(exports[_0x154b14(0x7e)],_0x154b14(0x81),U),N(exports[_0x154b14(0x7e)],_0x154b14(0x88),c[_0x154b14(0x9d)][_0x154b14(0x8a)]),exports[_0x154b14(0x7e)]=W([c[_0x154b14(0xbc)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x154b14(0x8c)](c['Injector'])),O(0x2,c[_0x154b14(0xa9)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ed600=_0x3490;(function(_0x12b8f5,_0x4b1007){const _0x383f1f=_0x3490,_0x395414=_0x12b8f5();while(!![]){try{const _0x4b5141=parseInt(_0x383f1f(0x131))/0x1+parseInt(_0x383f1f(0x186))/0x2+parseInt(_0x383f1f(0x183))/0x3+-parseInt(_0x383f1f(0x15d))/0x4*(parseInt(_0x383f1f(0x18e))/0x5)+parseInt(_0x383f1f(0x18f))/0x6*(parseInt(_0x383f1f(0x173))/0x7)+-parseInt(_0x383f1f(0x15f))/0x8+parseInt(_0x383f1f(0x149))/0x9;if(_0x4b5141===_0x4b1007)break;else _0x395414['push'](_0x395414['shift']());}catch(_0x4ea9fd){_0x395414['push'](_0x395414['shift']());}}}(_0x49c6,0xda12d));import{CommentService as _0x5b774a,CollaborationSessionService as _0x57b786,UniverCollaborationClientPlugin as _0x5eccf1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x453405}from'@univerjs-pro/license';import{dayjs as _0x2a6e6e,UserManagerService as _0x2f6d8e,Inject as _0x2a9343,Injector as _0x3d4cc6,Disposable as _0xdbb1b8,CustomRangeType as _0x482cff,UniverInstanceType as _0x59e337,DependentOn as _0x97169e,IConfigService as _0x596e4c,Plugin as _0x199264,merge as _0x36a755}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e203f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x337b2d,IThreadCommentDataSourceService as _0x18421a}from'@univerjs/thread-comment';import{bufferTime as _0x7138be}from'rxjs';import{HTTPService as _0x1ba376}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x27b2f0=>(_0x27b2f0[_0x27b2f0[_0x1ed600(0x175)]=0x0]=_0x1ed600(0x175),_0x27b2f0[_0x27b2f0['Solved']=0x1]='Solved',_0x27b2f0[_0x27b2f0[_0x1ed600(0x138)]=-0x1]=_0x1ed600(0x138),_0x27b2f0))(I||{}),v=(_0x5c0868=>(_0x5c0868[_0x5c0868[_0x1ed600(0x158)]=0x0]=_0x1ed600(0x158),_0x5c0868[_0x5c0868['Add']=0x1]=_0x1ed600(0x160),_0x5c0868[_0x5c0868[_0x1ed600(0x14f)]=0x2]=_0x1ed600(0x14f),_0x5c0868[_0x5c0868[_0x1ed600(0x161)]=0x3]=_0x1ed600(0x161),_0x5c0868[_0x5c0868[_0x1ed600(0x15e)]=0x4]='Delete',_0x5c0868[_0x5c0868[_0x1ed600(0x18a)]=0x5]=_0x1ed600(0x18a),_0x5c0868[_0x5c0868[_0x1ed600(0x138)]=-0x1]='UNRECOGNIZED',_0x5c0868))(v||{});const D=_0x34dbc0=>_0x2a6e6e(new Date(+_0x34dbc0))[_0x1ed600(0x143)](_0x1ed600(0x147)),B=async(_0x425e26,_0x558d61)=>{const _0x16b7ab=_0x1ed600,_0x513ebd=_0x425e26[_0x16b7ab(0x16e)](_0x2f6d8e),_0x5de6d9=_0x425e26['get'](_0x1ba376);_0x558d61['forEach'](_0x260823=>{const _0x483426=_0x16b7ab;_0x513ebd['getUser'](_0x260823)&&_0x558d61[_0x483426(0x179)](_0x260823);}),_0x558d61[_0x16b7ab(0x135)]&&(await _0x5de6d9[_0x16b7ab(0x16e)](_0x16b7ab(0x159),{'params':{'userIDs':[..._0x558d61]}}))[_0x16b7ab(0x13f)][_0x16b7ab(0x16d)][_0x16b7ab(0x150)](_0x423dba=>{const _0x36d783=_0x16b7ab;_0x423dba&&_0x513ebd[_0x36d783(0x17a)](_0x423dba);});};var K=Object[_0x1ed600(0x15b)],V=(_0x1824f8,_0x1b1472,_0x44487e,_0x39ac28)=>{const _0x3a07db=_0x1ed600;for(var _0x203d88=_0x39ac28>0x1?void 0x0:_0x39ac28?K(_0x1b1472,_0x44487e):_0x1b1472,_0x1193f2=_0x1824f8[_0x3a07db(0x174)]-0x1,_0x4b3abb;_0x1193f2>=0x0;_0x1193f2--)(_0x4b3abb=_0x1824f8[_0x1193f2])&&(_0x203d88=_0x4b3abb(_0x203d88)||_0x203d88);return _0x203d88;},p=(_0x11fb9f,_0x1cf7ac)=>(_0x2aa3b8,_0x21e9c9)=>_0x1cf7ac(_0x2aa3b8,_0x21e9c9,_0x11fb9f);let S=class extends _0xdbb1b8{constructor(_0x23be5c,_0x1bae32,_0x45fe33,_0x39f60f){const _0x4d3b3a=_0x1ed600;super(),this['_commentService']=_0x23be5c,this[_0x4d3b3a(0x165)]=_0x1bae32,this['_userService']=_0x45fe33,this[_0x4d3b3a(0x17c)]=_0x39f60f,this[_0x4d3b3a(0x153)](),this[_0x4d3b3a(0x18c)]();}['_initUserSync'](){const _0x34d650=_0x1ed600;this[_0x34d650(0x171)](this['_threadCommentModel'][_0x34d650(0x15c)][_0x34d650(0x142)](_0x7138be(0x10))[_0x34d650(0x12f)](_0x5daca6=>{const _0xd062d2=_0x34d650,_0x10efe1=new Set();_0x5daca6['forEach'](_0x31094c=>{const _0x24ec77=_0x3490;switch(_0x31094c['type']){case _0x24ec77(0x13e):{const _0x4f26aa=_0x31094c['payload'][_0x24ec77(0x176)];_0x10efe1[_0x24ec77(0x13e)](_0x4f26aa);break;}}}),B(this[_0xd062d2(0x17c)],_0x10efe1);}));}[_0x1ed600(0x153)](){const _0x22eae8=_0x1ed600;this[_0x22eae8(0x171)](this[_0x22eae8(0x16a)][_0x22eae8(0x15c)][_0x22eae8(0x12f)](async _0x2f820a=>{const _0xc689f3=_0x22eae8;var _0x39a21a,_0x4a4828,_0xbba37d,_0x59e0e5;const _0x5e2de8=(_0x39a21a=this[_0xc689f3(0x165)][_0xc689f3(0x164)](_0x2f820a[_0xc689f3(0x12d)])[_0xc689f3(0x181)](_0x1c3695=>_0x1c3695[_0xc689f3(0x132)]===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x39a21a[_0xc689f3(0x18b)];if(!_0x5e2de8)return;const {unitId:_0x2b8338,subUnitId:_0x4965e7}=_0x5e2de8;switch(_0x2f820a['user']&&this[_0xc689f3(0x146)]['addUser'](_0x2f820a[_0xc689f3(0x16c)]),_0x2f820a[_0xc689f3(0x178)]){case v[_0xc689f3(0x160)]:break;case v[_0xc689f3(0x14f)]:{this['_threadCommentModel']['addComment'](_0x2b8338,_0x4965e7,{'unitId':_0x2b8338,'subUnitId':_0x4965e7,'ref':'','id':_0x2f820a[_0xc689f3(0x167)],'dT':D(+_0x2f820a[_0xc689f3(0x148)]),'threadId':_0x2f820a['threadId'],'personId':(_0xbba37d=(_0x4a4828=_0x2f820a[_0xc689f3(0x16c)])==null?void 0x0:_0x4a4828[_0xc689f3(0x156)])!=null?_0xbba37d:_0x2f820a[_0xc689f3(0x17e)],'text':JSON['parse'](_0x2f820a[_0xc689f3(0x18d)]),'parentId':_0x5e2de8['id']});break;}case v['Delete']:{const _0x6d39e0=this[_0xc689f3(0x165)][_0xc689f3(0x154)](_0x2b8338,_0x4965e7,_0x2f820a['replyId']);_0x6d39e0&&_0x6d39e0['parentId']&&this[_0xc689f3(0x165)][_0xc689f3(0x14c)](_0x2b8338,_0x4965e7,_0x2f820a[_0xc689f3(0x167)]);break;}case v[_0xc689f3(0x161)]:{this[_0xc689f3(0x165)][_0xc689f3(0x16b)](_0x2b8338,_0x4965e7,{'commentId':_0x2f820a[_0xc689f3(0x167)],'text':JSON[_0xc689f3(0x133)](_0x2f820a[_0xc689f3(0x18d)])});break;}case v[_0xc689f3(0x18a)]:{const _0x592a40=(_0x59e0e5=this['_threadCommentModel']['getUnit'](_0x2f820a['unitId'])[_0xc689f3(0x181)](_0x1fc849=>_0x1fc849['threadId']===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x59e0e5[_0xc689f3(0x18b)];_0x592a40&&this[_0xc689f3(0x165)]['resolveComment'](_0x2b8338,_0x4965e7,_0x592a40['id'],_0x2f820a[_0xc689f3(0x13c)]===I[_0xc689f3(0x140)]);break;}}}));}};S=V([p(0x0,_0x2a9343(_0x5b774a)),p(0x1,_0x2a9343(_0x337b2d)),p(0x2,_0x2a9343(_0x2f6d8e)),p(0x3,_0x2a9343(_0x3d4cc6))],S);const z=_0x1ed600(0x189),M={};var k=Object[_0x1ed600(0x15b)],Q=(_0x9281a3,_0x30c0ef,_0x28579a,_0x46e18d)=>{const _0x77b759=_0x1ed600;for(var _0x364382=_0x46e18d>0x1?void 0x0:_0x46e18d?k(_0x30c0ef,_0x28579a):_0x30c0ef,_0x2a19e7=_0x9281a3[_0x77b759(0x174)]-0x1,_0x3c4a08;_0x2a19e7>=0x0;_0x2a19e7--)(_0x3c4a08=_0x9281a3[_0x2a19e7])&&(_0x364382=_0x3c4a08(_0x364382)||_0x364382);return _0x364382;},_=(_0xa89a8a,_0x92d4ed)=>(_0x560a47,_0x1d9102)=>_0x92d4ed(_0x560a47,_0x1d9102,_0xa89a8a);function X(_0x1112a4,_0x1c0fee){const _0x38d044=_0x1ed600,_0x212046=_0x1112a4[_0x38d044(0x166)][0x0];return{..._0x1c0fee,'id':_0x212046['replyId'],'resolved':_0x1112a4[_0x38d044(0x13c)]===0x1,'dT':D(_0x212046['createTimestamp']),'personId':_0x212046[_0x38d044(0x17e)],'threadId':_0x212046[_0x38d044(0x132)]};}function ee(_0x387b07,_0x4daa99,_0x2fb9bb){const _0x8f9a37=_0x1ed600;var _0x324dd8,_0x4be283;if(((_0x4be283=(_0x324dd8=_0x387b07==null?void 0x0:_0x387b07[_0x8f9a37(0x166)])==null?void 0x0:_0x324dd8['length'])!=null?_0x4be283:0x0)>0x0){const _0x1616bd=(_0x6242df,_0x201f75)=>({'id':_0x6242df[_0x8f9a37(0x167)],'threadId':_0x6242df[_0x8f9a37(0x132)],'dT':D(_0x6242df['createTimestamp']),'personId':_0x6242df['userId'],'resolved':_0x387b07[_0x8f9a37(0x13c)]===I['Solved'],'unitId':_0x4daa99,'subUnitId':_0x2fb9bb,'text':JSON[_0x8f9a37(0x133)](_0x6242df[_0x8f9a37(0x18d)]),'parentId':_0x201f75}),_0x30704b=_0x1616bd(_0x387b07[_0x8f9a37(0x166)][0x0]);return{..._0x30704b,'children':_0x387b07[_0x8f9a37(0x166)][_0x8f9a37(0x141)](0x1)[_0x8f9a37(0x17f)](_0x55940f=>_0x1616bd(_0x55940f,_0x30704b['id']))};}return null;}let f=class{constructor(_0x2fc876,_0x1bba5a,_0x183766,_0x14801d){const _0x4070f2=_0x1ed600;this[_0x4070f2(0x17d)]=_0x2fc876,this[_0x4070f2(0x146)]=_0x1bba5a,this['_sessionService']=_0x183766,this[_0x4070f2(0x17c)]=_0x14801d;}async[_0x1ed600(0x13a)](_0x166bde){const _0x2041db=_0x1ed600;var _0x5c1515,_0xbd4d96;const {parentId:_0x3af102,unitId:_0x467252,text:_0x12559d,threadId:_0x20d3e0}=_0x166bde,_0x43cab8=(_0xbd4d96=(_0x5c1515=_0x12559d[_0x2041db(0x137)])==null?void 0x0:_0x5c1515[_0x2041db(0x14b)](_0x36f6fc=>_0x36f6fc[_0x2041db(0x185)]===_0x482cff[_0x2041db(0x134)])[_0x2041db(0x17f)](_0x545215=>_0x545215['rangeId']))!=null?_0xbd4d96:[],_0x19566a=JSON[_0x2041db(0x170)](_0x12559d),_0x3384e7=(await this[_0x2041db(0x145)][_0x2041db(0x130)](_0x467252))[_0x2041db(0x14e)]();if(_0x3af102){const _0x1ed23e={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8,'threadId':_0x20d3e0},_0x33ac57=(await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x144),{'body':_0x1ed23e}))[_0x2041db(0x13f)][_0x2041db(0x190)];return{..._0x166bde,'id':_0x33ac57[_0x2041db(0x167)],'dT':_0x2a6e6e(+_0x33ac57[_0x2041db(0x148)])[_0x2041db(0x143)](_0x2041db(0x147)),'personId':_0x33ac57[_0x2041db(0x17e)]};}else{const _0x1e19f7={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8},_0x5ebb8a=await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x15a),{'body':_0x1e19f7});return X(_0x5ebb8a[_0x2041db(0x13f)][_0x2041db(0x17b)],_0x166bde);}}async[_0x1ed600(0x16b)](_0x3711f3){const _0xf7b8c=_0x1ed600;var _0x403f4d,_0x9d2039;const {text:_0x5b43a3,unitId:_0x1aafd9}=_0x3711f3,_0x571a94=(_0x9d2039=(_0x403f4d=_0x5b43a3['customRanges'])==null?void 0x0:_0x403f4d['filter'](_0x3df4da=>_0x3df4da['rangeType']===_0x482cff[_0xf7b8c(0x134)])[_0xf7b8c(0x17f)](_0x5a7b79=>_0x5a7b79[_0xf7b8c(0x162)]))!=null?_0x9d2039:[],_0x38544f=JSON[_0xf7b8c(0x170)](_0x5b43a3),_0x2f56fd=_0x3711f3[_0xf7b8c(0x132)],_0x135189=_0x3711f3['id'],_0x10b6f9={'memberId':(await this[_0xf7b8c(0x145)][_0xf7b8c(0x130)](_0x1aafd9))['getMemberID'](),'unitId':_0x1aafd9,'threadId':_0x2f56fd,'mention':_0x571a94,'content':_0x38544f,'replyId':_0x135189},_0x1be9a8=await this[_0xf7b8c(0x17d)][_0xf7b8c(0x139)](_0xf7b8c(0x168)+_0x1aafd9+_0xf7b8c(0x14a),{'body':_0x10b6f9});return!_0x1be9a8['body'][_0xf7b8c(0x12e)]||_0x1be9a8['body'][_0xf7b8c(0x12e)]['code']===0x1;}async['resolveComment'](_0xdfe9c5){const _0x463072=_0x1ed600,{unitId:_0x1c7316}=_0xdfe9c5,_0x56781c=_0xdfe9c5[_0x463072(0x132)],_0x333d11={'memberId':this[_0x463072(0x146)][_0x463072(0x13b)]()[_0x463072(0x156)],'unitId':_0x1c7316,'threadId':_0x56781c,'solved':_0xdfe9c5[_0x463072(0x188)]?I[_0x463072(0x140)]:I[_0x463072(0x175)]},_0x4543ff=await this['_httpService']['post'](_0x463072(0x168)+_0x1c7316+_0x463072(0x184),{'body':_0x333d11});return!_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]||_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]['code']===0x1;}async[_0x1ed600(0x14c)](_0x483430,_0x29690e,_0x3266d4,_0x4b1388){const _0x4f0448=_0x1ed600,_0x321720={'memberId':(await this[_0x4f0448(0x145)][_0x4f0448(0x130)](_0x483430))[_0x4f0448(0x14e)](),'threadId':_0x3266d4,'replyId':_0x4b1388,'unitId':_0x483430},_0x431519=await this[_0x4f0448(0x17d)]['post'](_0x4f0448(0x168)+_0x483430+_0x4f0448(0x155),{'body':_0x321720});return!_0x431519[_0x4f0448(0x13f)][_0x4f0448(0x12e)]||_0x431519['body'][_0x4f0448(0x12e)]['code']===0x1;}async['listComments'](_0x2b7d31,_0x18e59b,_0xcdaaaf){const _0x356b10=_0x1ed600,_0x3114cc={'unitId':_0x2b7d31,'threadId':_0xcdaaaf},_0x470fcf=await this[_0x356b10(0x17d)]['post'](_0x356b10(0x168)+_0x2b7d31+_0x356b10(0x14d),{'body':_0x3114cc}),_0x34bbd2=_0xcdaaaf[_0x356b10(0x17f)](_0x518a74=>ee(_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x157)][_0x518a74],_0x2b7d31,_0x18e59b))[_0x356b10(0x14b)](Boolean);return Object[_0x356b10(0x182)](_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x16d)])[_0x356b10(0x150)](_0x8f8e46=>{const _0x556fc4=_0x356b10;this[_0x556fc4(0x146)]['addUser'](_0x8f8e46);}),_0x34bbd2;}['saveCommentToSnapshot'](_0x92e8bc){const _0x2efc7c=_0x1ed600;return{'id':_0x92e8bc['id'],'threadId':_0x92e8bc['threadId'],'ref':_0x92e8bc[_0x2efc7c(0x187)]};}};f=Q([_(0x0,_0x2a9343(_0x1ba376)),_(0x1,_0x2a9343(_0x2f6d8e)),_(0x2,_0x2a9343(_0x57b786)),_(0x3,_0x2a9343(_0x3d4cc6))],f);function _0x3490(_0x5c9541,_0x1f613f){const _0x49c67a=_0x49c6();return _0x3490=function(_0x3490ae,_0x15fb01){_0x3490ae=_0x3490ae-0x12d;let _0x588f54=_0x49c67a[_0x3490ae];return _0x588f54;},_0x3490(_0x5c9541,_0x1f613f);}var re=Object[_0x1ed600(0x15b)],te=(_0x5fe07d,_0x4b4fb0,_0x33f062,_0x284796)=>{for(var _0x4da168=_0x284796>0x1?void 0x0:_0x284796?re(_0x4b4fb0,_0x33f062):_0x4b4fb0,_0x272b28=_0x5fe07d['length']-0x1,_0x5415d5;_0x272b28>=0x0;_0x272b28--)(_0x5415d5=_0x5fe07d[_0x272b28])&&(_0x4da168=_0x5415d5(_0x4da168)||_0x4da168);return _0x4da168;},N=(_0x28b7e4,_0x1e53c1)=>(_0x26a9cf,_0x57b27f)=>_0x1e53c1(_0x26a9cf,_0x57b27f,_0x28b7e4);function _0x49c6(){const _0x240421=['pipe','format','/reply','_sessionService','_userService','YYYY/MM/DD\x20HH:mm','createTimestamp','3155400AZsktE','/edit','filter','deleteComment','/list','getMemberID','Reply','forEach','onStarting','pluginName','_init','getComment','/delete','userID','comments','Unknown','/universer-api/user/list','/add','getOwnPropertyDescriptor','commentUpdate$','2542796UJwTdK','Delete','14275320uucMez','Add','Edit','rangeId','_initDataSource','getUnit','_threadCommentModel','replies','replyId','/universer-api/comment/unit/','dataSource','_commentService','updateComment','user','users','get','_threadCommentDataSourceService','stringify','disposeWithMe','setConfig','7VBgKFz','length','OpenOrReOpen','personId','_configService','type','delete','addUser','comment','_injector','_httpService','userId','map','syncUpdateMutationToColla','find','values','4044471gSiUVA','/solved','rangeType','917202rtjbey','ref','resolved','thread-comment-data-source.config','Solve','root','_initUserSync','content','10qEpwPg','2880330mDPZPB','reply','unitId','error','subscribe','requireSession','1311629PFAvTM','threadId','parse','COMMENT','size','defineProperty','customRanges','UNRECOGNIZED','post','addComment','getCurrentUser','solved','_threadCommentDataSource','add','body','Solved','slice'];_0x49c6=function(){return _0x240421;};return _0x49c6();}let g=class extends _0xdbb1b8{constructor(_0x256151,_0xff7432){const _0x24a9ea=_0x1ed600;super(),this[_0x24a9ea(0x16f)]=_0x256151,this[_0x24a9ea(0x13d)]=_0xff7432,this[_0x24a9ea(0x163)]();}[_0x1ed600(0x163)](){const _0x2797a2=_0x1ed600;this[_0x2797a2(0x16f)][_0x2797a2(0x169)]=this[_0x2797a2(0x13d)],this[_0x2797a2(0x16f)][_0x2797a2(0x180)]=!0x1;}};g=te([N(0x0,_0x18421a),N(0x1,_0x2a9343(f))],g);var se=Object[_0x1ed600(0x136)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x55fb26,_0x46013c,_0x3522e2)=>_0x46013c in _0x55fb26?se(_0x55fb26,_0x46013c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3522e2}):_0x55fb26[_0x46013c]=_0x3522e2,ie=(_0x32891a,_0x1316e6,_0x2c0cc3,_0x22736b)=>{const _0x40664d=_0x1ed600;for(var _0x4e5973=_0x22736b>0x1?void 0x0:_0x22736b?oe(_0x1316e6,_0x2c0cc3):_0x1316e6,_0x232ffd=_0x32891a[_0x40664d(0x174)]-0x1,_0x111ef2;_0x232ffd>=0x0;_0x232ffd--)(_0x111ef2=_0x32891a[_0x232ffd])&&(_0x4e5973=_0x111ef2(_0x4e5973)||_0x4e5973);return _0x4e5973;},w=(_0xa4abe8,_0x44cccb)=>(_0x411bb5,_0x166067)=>_0x44cccb(_0x411bb5,_0x166067,_0xa4abe8),$=(_0x54000e,_0x412f11,_0x2421a9)=>ne(_0x54000e,typeof _0x412f11!='symbol'?_0x412f11+'':_0x412f11,_0x2421a9);let b=class extends _0x199264{constructor(_0x4877fe=M,_0x28972e,_0x2cf9aa){const _0x1d3ceb=_0x1ed600;super(),this['_config']=_0x4877fe,this['_injector']=_0x28972e,this[_0x1d3ceb(0x177)]=_0x2cf9aa;const {..._0x1dcb03}=_0x36a755({},M,this['_config']);this[_0x1d3ceb(0x177)][_0x1d3ceb(0x172)](z,_0x1dcb03);}[_0x1ed600(0x151)](){const _0x5d50f0=_0x1ed600;[[f],[g],[S]][_0x5d50f0(0x150)](_0x103467=>{const _0x3447d5=_0x5d50f0;this['_injector'][_0x3447d5(0x13e)](_0x103467);});}['onReady'](){const _0x21a4a4=_0x1ed600;this[_0x21a4a4(0x17c)][_0x21a4a4(0x16e)](g),this[_0x21a4a4(0x17c)]['get'](S);}};$(b,_0x1ed600(0x152),W),$(b,_0x1ed600(0x178),_0x59e337['UNIVER_UNKNOWN']),b=ie([_0x97169e(_0x5e203f,_0x5eccf1,_0x453405),w(0x1,_0x2a9343(_0x3d4cc6)),w(0x2,_0x596e4c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4c386b=_0x4dee;(function(_0x57fd8a,_0x48aa77){const _0x30643a=_0x4dee,_0x1171ab=_0x57fd8a();while(!![]){try{const _0x5dfee9=-parseInt(_0x30643a(0x117))/0x1+-parseInt(_0x30643a(0x10a))/0x2+parseInt(_0x30643a(0x103))/0x3*(parseInt(_0x30643a(0xe9))/0x4)+-parseInt(_0x30643a(0x10c))/0x5+parseInt(_0x30643a(0xe6))/0x6*(parseInt(_0x30643a(0x13a))/0x7)+-parseInt(_0x30643a(0x112))/0x8*(parseInt(_0x30643a(0xf7))/0x9)+parseInt(_0x30643a(0x124))/0xa;if(_0x5dfee9===_0x48aa77)break;else _0x1171ab['push'](_0x1171ab['shift']());}catch(_0x5b0cd7){_0x1171ab['push'](_0x1171ab['shift']());}}}(_0x51eb,0x81956));import{CommentService as _0x557342,CollaborationSessionService as _0xfb639f,UniverCollaborationClientPlugin as _0x308f6a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x295138}from'@univerjs-pro/license';import{dayjs as _0x386800,UserManagerService as _0x2d6bfb,Inject as _0x5df9cf,Injector as _0x366845,Disposable as _0x2cf2a6,CustomRangeType as _0x3596ea,UniverInstanceType as _0x2a606d,DependentOn as _0x335001,IConfigService as _0x48a89e,Plugin as _0x449e4b,merge as _0xfbe004}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2680ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x277e92,IThreadCommentDataSourceService as _0x14ca09}from'@univerjs/thread-comment';import{bufferTime as _0x2fb0ee}from'rxjs';import{HTTPService as _0x135e04}from'@univerjs/network';const W=_0x4c386b(0x136);var I=(_0x4e5b48=>(_0x4e5b48[_0x4e5b48[_0x4c386b(0x101)]=0x0]=_0x4c386b(0x101),_0x4e5b48[_0x4e5b48[_0x4c386b(0x10f)]=0x1]=_0x4c386b(0x10f),_0x4e5b48[_0x4e5b48[_0x4c386b(0xfd)]=-0x1]='UNRECOGNIZED',_0x4e5b48))(I||{}),v=(_0x7f0e7e=>(_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x11f)]=0x0]=_0x4c386b(0x11f),_0x7f0e7e[_0x7f0e7e['Add']=0x1]=_0x4c386b(0xdc),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf4)]=0x2]='Reply',_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x13f)]=0x3]=_0x4c386b(0x13f),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf9)]=0x4]=_0x4c386b(0xf9),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x111)]=0x5]=_0x4c386b(0x111),_0x7f0e7e[_0x7f0e7e['UNRECOGNIZED']=-0x1]=_0x4c386b(0xfd),_0x7f0e7e))(v||{});const D=_0x4579c4=>_0x386800(new Date(+_0x4579c4))[_0x4c386b(0x119)](_0x4c386b(0xe5)),B=async(_0x151372,_0x472bbe)=>{const _0x3c76e5=_0x4c386b,_0x1b13a5=_0x151372[_0x3c76e5(0x11a)](_0x2d6bfb),_0x1f2ac9=_0x151372['get'](_0x135e04);_0x472bbe[_0x3c76e5(0x133)](_0x1fd6b5=>{const _0x1adac6=_0x3c76e5;_0x1b13a5[_0x1adac6(0x10e)](_0x1fd6b5)&&_0x472bbe[_0x1adac6(0x10b)](_0x1fd6b5);}),_0x472bbe[_0x3c76e5(0x11b)]&&(await _0x1f2ac9[_0x3c76e5(0x11a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x472bbe]}}))['body']['users']['forEach'](_0x5c993e=>{_0x5c993e&&_0x1b13a5['addUser'](_0x5c993e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1f2a83,_0xa3729c,_0x32b37d,_0x3d45ed)=>{const _0x45988d=_0x4c386b;for(var _0x2fe9b3=_0x3d45ed>0x1?void 0x0:_0x3d45ed?K(_0xa3729c,_0x32b37d):_0xa3729c,_0x45350d=_0x1f2a83[_0x45988d(0x100)]-0x1,_0x516c64;_0x45350d>=0x0;_0x45350d--)(_0x516c64=_0x1f2a83[_0x45350d])&&(_0x2fe9b3=_0x516c64(_0x2fe9b3)||_0x2fe9b3);return _0x2fe9b3;},p=(_0x5e9155,_0x4ddd73)=>(_0x4ee9a8,_0x40939c)=>_0x4ddd73(_0x4ee9a8,_0x40939c,_0x5e9155);let S=class extends _0x2cf2a6{constructor(_0x2b4079,_0x12f057,_0x52694f,_0x2ca9f0){const _0x2d0650=_0x4c386b;super(),this['_commentService']=_0x2b4079,this[_0x2d0650(0x12e)]=_0x12f057,this[_0x2d0650(0xfc)]=_0x52694f,this[_0x2d0650(0xf6)]=_0x2ca9f0,this[_0x2d0650(0x12f)](),this[_0x2d0650(0x106)]();}[_0x4c386b(0x106)](){const _0x2b70e9=_0x4c386b;this[_0x2b70e9(0x11c)](this[_0x2b70e9(0x12e)][_0x2b70e9(0x107)][_0x2b70e9(0x13c)](_0x2fb0ee(0x10))[_0x2b70e9(0x12c)](_0xf653fe=>{const _0x181918=_0x2b70e9,_0x32f2b3=new Set();_0xf653fe['forEach'](_0x1e7d8d=>{const _0x218316=_0x4dee;switch(_0x1e7d8d[_0x218316(0x127)]){case'add':{const _0x53b211=_0x1e7d8d[_0x218316(0xec)][_0x218316(0x118)];_0x32f2b3[_0x218316(0x142)](_0x53b211);break;}}}),B(this[_0x181918(0xf6)],_0x32f2b3);}));}['_init'](){const _0x4121c9=_0x4c386b;this[_0x4121c9(0x11c)](this[_0x4121c9(0xfa)][_0x4121c9(0x107)][_0x4121c9(0x12c)](async _0x1b4d67=>{const _0x7b8ee3=_0x4121c9;var _0x18355b,_0x513aa8,_0x374449,_0x362e91;const _0x4e774b=(_0x18355b=this['_threadCommentModel']['getUnit'](_0x1b4d67[_0x7b8ee3(0x132)])['find'](_0x3e0849=>_0x3e0849[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x18355b[_0x7b8ee3(0xf2)];if(!_0x4e774b)return;const {unitId:_0x1478e8,subUnitId:_0x16cc52}=_0x4e774b;switch(_0x1b4d67[_0x7b8ee3(0xe0)]&&this['_userService'][_0x7b8ee3(0xe7)](_0x1b4d67[_0x7b8ee3(0xe0)]),_0x1b4d67[_0x7b8ee3(0x127)]){case v[_0x7b8ee3(0xdc)]:break;case v['Reply']:{this['_threadCommentModel'][_0x7b8ee3(0x110)](_0x1478e8,_0x16cc52,{'unitId':_0x1478e8,'subUnitId':_0x16cc52,'ref':'','id':_0x1b4d67[_0x7b8ee3(0x128)],'dT':D(+_0x1b4d67[_0x7b8ee3(0x116)]),'threadId':_0x1b4d67[_0x7b8ee3(0x126)],'personId':(_0x374449=(_0x513aa8=_0x1b4d67[_0x7b8ee3(0xe0)])==null?void 0x0:_0x513aa8['userID'])!=null?_0x374449:_0x1b4d67[_0x7b8ee3(0x12a)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67['content']),'parentId':_0x4e774b['id']});break;}case v[_0x7b8ee3(0xf9)]:{const _0x3d54b2=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xde)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);_0x3d54b2&&_0x3d54b2[_0x7b8ee3(0xf1)]&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xfe)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);break;}case v[_0x7b8ee3(0x13f)]:{this['_threadCommentModel'][_0x7b8ee3(0x130)](_0x1478e8,_0x16cc52,{'commentId':_0x1b4d67[_0x7b8ee3(0x128)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67[_0x7b8ee3(0x102)])});break;}case v[_0x7b8ee3(0x111)]:{const _0x5abdfc=(_0x362e91=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xed)](_0x1b4d67[_0x7b8ee3(0x132)])[_0x7b8ee3(0xe4)](_0x5dd4b8=>_0x5dd4b8[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x362e91['root'];_0x5abdfc&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0x141)](_0x1478e8,_0x16cc52,_0x5abdfc['id'],_0x1b4d67[_0x7b8ee3(0x11e)]===I[_0x7b8ee3(0x10f)]);break;}}}));}};function _0x4dee(_0x72d138,_0x34f66d){const _0x51eb80=_0x51eb();return _0x4dee=function(_0x4dee1f,_0xa9f298){_0x4dee1f=_0x4dee1f-0xdc;let _0x318b8e=_0x51eb80[_0x4dee1f];return _0x318b8e;},_0x4dee(_0x72d138,_0x34f66d);}S=V([p(0x0,_0x5df9cf(_0x557342)),p(0x1,_0x5df9cf(_0x277e92)),p(0x2,_0x5df9cf(_0x2d6bfb)),p(0x3,_0x5df9cf(_0x366845))],S);const z=_0x4c386b(0x120),M={};var k=Object[_0x4c386b(0xdf)],Q=(_0x1dcd15,_0x3ad3e5,_0x12b5d6,_0x3d0907)=>{const _0x1267a8=_0x4c386b;for(var _0x400c65=_0x3d0907>0x1?void 0x0:_0x3d0907?k(_0x3ad3e5,_0x12b5d6):_0x3ad3e5,_0x13a468=_0x1dcd15[_0x1267a8(0x100)]-0x1,_0x549d8f;_0x13a468>=0x0;_0x13a468--)(_0x549d8f=_0x1dcd15[_0x13a468])&&(_0x400c65=_0x549d8f(_0x400c65)||_0x400c65);return _0x400c65;},_=(_0x45bdc9,_0x3998c6)=>(_0xc4775,_0x28f405)=>_0x3998c6(_0xc4775,_0x28f405,_0x45bdc9);function X(_0x7cb4e6,_0x4daa2a){const _0x2dadc2=_0x4c386b,_0x54ef10=_0x7cb4e6[_0x2dadc2(0x135)][0x0];return{..._0x4daa2a,'id':_0x54ef10[_0x2dadc2(0x128)],'resolved':_0x7cb4e6[_0x2dadc2(0x11e)]===0x1,'dT':D(_0x54ef10[_0x2dadc2(0x116)]),'personId':_0x54ef10['userId'],'threadId':_0x54ef10[_0x2dadc2(0x126)]};}function ee(_0x97973e,_0x4eec2e,_0x1ed8db){const _0x585081=_0x4c386b;var _0x387e6c,_0x2b625b;if(((_0x2b625b=(_0x387e6c=_0x97973e==null?void 0x0:_0x97973e[_0x585081(0x135)])==null?void 0x0:_0x387e6c[_0x585081(0x100)])!=null?_0x2b625b:0x0)>0x0){const _0x3f1644=(_0x248b0c,_0x380295)=>({'id':_0x248b0c[_0x585081(0x128)],'threadId':_0x248b0c[_0x585081(0x126)],'dT':D(_0x248b0c['createTimestamp']),'personId':_0x248b0c[_0x585081(0x12a)],'resolved':_0x97973e['solved']===I[_0x585081(0x10f)],'unitId':_0x4eec2e,'subUnitId':_0x1ed8db,'text':JSON[_0x585081(0x125)](_0x248b0c[_0x585081(0x102)]),'parentId':_0x380295}),_0x104c1f=_0x3f1644(_0x97973e[_0x585081(0x135)][0x0]);return{..._0x104c1f,'children':_0x97973e[_0x585081(0x135)][_0x585081(0xfb)](0x1)[_0x585081(0xf8)](_0x1734e5=>_0x3f1644(_0x1734e5,_0x104c1f['id']))};}return null;}let f=class{constructor(_0x56f777,_0x2401af,_0x54ebd0,_0x2f4216){const _0x206103=_0x4c386b;this[_0x206103(0x123)]=_0x56f777,this['_userService']=_0x2401af,this[_0x206103(0x140)]=_0x54ebd0,this[_0x206103(0xf6)]=_0x2f4216;}async[_0x4c386b(0x110)](_0x2f1641){const _0x29e658=_0x4c386b;var _0xd18f35,_0x177461;const {parentId:_0x5003cd,unitId:_0x47a4a9,text:_0x380d4b,threadId:_0x5058c0}=_0x2f1641,_0x3b5011=(_0x177461=(_0xd18f35=_0x380d4b[_0x29e658(0xee)])==null?void 0x0:_0xd18f35[_0x29e658(0xdd)](_0x22f5d1=>_0x22f5d1[_0x29e658(0x108)]===_0x3596ea['COMMENT'])['map'](_0x37d606=>_0x37d606['rangeId']))!=null?_0x177461:[],_0x4c66ce=JSON[_0x29e658(0x12d)](_0x380d4b),_0x985712=(await this[_0x29e658(0x140)][_0x29e658(0x114)](_0x47a4a9))[_0x29e658(0x109)]();if(_0x5003cd){const _0x1f72ef={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011,'threadId':_0x5058c0},_0x5a92c6=(await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0xe3),{'body':_0x1f72ef}))[_0x29e658(0x129)][_0x29e658(0xf5)];return{..._0x2f1641,'id':_0x5a92c6['replyId'],'dT':_0x386800(+_0x5a92c6[_0x29e658(0x116)])[_0x29e658(0x119)](_0x29e658(0xe5)),'personId':_0x5a92c6['userId']};}else{const _0x4d8b5e={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011},_0x3eecc0=await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0x10d),{'body':_0x4d8b5e});return X(_0x3eecc0[_0x29e658(0x129)][_0x29e658(0x105)],_0x2f1641);}}async[_0x4c386b(0x130)](_0x6b1ff0){const _0xede77=_0x4c386b;var _0xfa6d02,_0x7abad5;const {text:_0x1d1359,unitId:_0x18f6b0}=_0x6b1ff0,_0x1ef9f5=(_0x7abad5=(_0xfa6d02=_0x1d1359[_0xede77(0xee)])==null?void 0x0:_0xfa6d02[_0xede77(0xdd)](_0x4f2917=>_0x4f2917[_0xede77(0x108)]===_0x3596ea['COMMENT'])[_0xede77(0xf8)](_0x1bd702=>_0x1bd702[_0xede77(0xf0)]))!=null?_0x7abad5:[],_0x85fbcb=JSON['stringify'](_0x1d1359),_0x586508=_0x6b1ff0[_0xede77(0x126)],_0x139876=_0x6b1ff0['id'],_0x41d304={'memberId':(await this['_sessionService'][_0xede77(0x114)](_0x18f6b0))[_0xede77(0x109)](),'unitId':_0x18f6b0,'threadId':_0x586508,'mention':_0x1ef9f5,'content':_0x85fbcb,'replyId':_0x139876},_0x58f33c=await this['_httpService'][_0xede77(0x115)](_0xede77(0xe8)+_0x18f6b0+_0xede77(0xf3),{'body':_0x41d304});return!_0x58f33c[_0xede77(0x129)][_0xede77(0x122)]||_0x58f33c[_0xede77(0x129)][_0xede77(0x122)][_0xede77(0xeb)]===0x1;}async[_0x4c386b(0x141)](_0x2e18d6){const _0x189f40=_0x4c386b,{unitId:_0x59f1ea}=_0x2e18d6,_0x4b4b32=_0x2e18d6[_0x189f40(0x126)],_0x5c8b45={'memberId':this['_userService'][_0x189f40(0x13b)]()[_0x189f40(0x12b)],'unitId':_0x59f1ea,'threadId':_0x4b4b32,'solved':_0x2e18d6['resolved']?I[_0x189f40(0x10f)]:I['OpenOrReOpen']},_0x3b5ca6=await this[_0x189f40(0x123)][_0x189f40(0x115)]('/universer-api/comment/unit/'+_0x59f1ea+'/solved',{'body':_0x5c8b45});return!_0x3b5ca6[_0x189f40(0x129)]['error']||_0x3b5ca6[_0x189f40(0x129)]['error'][_0x189f40(0xeb)]===0x1;}async[_0x4c386b(0xfe)](_0x55a318,_0x1d7f89,_0x57da0f,_0x1f6080){const _0x48f581=_0x4c386b,_0x114565={'memberId':(await this[_0x48f581(0x140)]['requireSession'](_0x55a318))[_0x48f581(0x109)](),'threadId':_0x57da0f,'replyId':_0x1f6080,'unitId':_0x55a318},_0x412a0a=await this['_httpService'][_0x48f581(0x115)](_0x48f581(0xe8)+_0x55a318+_0x48f581(0x13e),{'body':_0x114565});return!_0x412a0a[_0x48f581(0x129)]['error']||_0x412a0a[_0x48f581(0x129)][_0x48f581(0x122)][_0x48f581(0xeb)]===0x1;}async[_0x4c386b(0x104)](_0x56c76f,_0xed8875,_0x517f33){const _0x546ea5=_0x4c386b,_0x15c93e={'unitId':_0x56c76f,'threadId':_0x517f33},_0x1a715d=await this[_0x546ea5(0x123)][_0x546ea5(0x115)](_0x546ea5(0xe8)+_0x56c76f+'/list',{'body':_0x15c93e}),_0x34cc2c=_0x517f33[_0x546ea5(0xf8)](_0x3b24a0=>ee(_0x1a715d['body'][_0x546ea5(0xff)][_0x3b24a0],_0x56c76f,_0xed8875))[_0x546ea5(0xdd)](Boolean);return Object[_0x546ea5(0x137)](_0x1a715d[_0x546ea5(0x129)][_0x546ea5(0x11d)])[_0x546ea5(0x133)](_0x84f9fc=>{const _0x4ee4c6=_0x546ea5;this[_0x4ee4c6(0xfc)][_0x4ee4c6(0xe7)](_0x84f9fc);}),_0x34cc2c;}['saveCommentToSnapshot'](_0x2eb497){const _0x229f5c=_0x4c386b;return{'id':_0x2eb497['id'],'threadId':_0x2eb497[_0x229f5c(0x126)],'ref':_0x2eb497[_0x229f5c(0xe2)]};}};f=Q([_(0x0,_0x5df9cf(_0x135e04)),_(0x1,_0x5df9cf(_0x2d6bfb)),_(0x2,_0x5df9cf(_0xfb639f)),_(0x3,_0x5df9cf(_0x366845))],f);function _0x51eb(){const _0x45239f=['_initUserSync','commentUpdate$','rangeType','getMemberID','642480GKohPC','delete','3501355IejjYN','/add','getUser','Solved','addComment','Solve','9928IndejH','pluginName','requireSession','post','createTimestamp','278267EuUymt','personId','format','get','size','disposeWithMe','users','solved','Unknown','thread-comment-data-source.config','_configService','error','_httpService','6364550NGNurC','parse','threadId','type','replyId','body','userId','userID','subscribe','stringify','_threadCommentModel','_init','updateComment','UNIVER_UNKNOWN','unitId','forEach','syncUpdateMutationToColla','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','onReady','onStarting','7vjKFZU','getCurrentUser','pipe','_initDataSource','/delete','Edit','_sessionService','resolveComment','add','Add','filter','getComment','getOwnPropertyDescriptor','user','defineProperty','ref','/reply','find','YYYY/MM/DD\x20HH:mm','2848722boPpBw','addUser','/universer-api/comment/unit/','4uOXOXy','_config','code','payload','getUnit','customRanges','_threadCommentDataSourceService','rangeId','parentId','root','/edit','Reply','reply','_injector','1674VRKktY','map','Delete','_commentService','slice','_userService','UNRECOGNIZED','deleteComment','comments','length','OpenOrReOpen','content','2850408AilNxk','listComments','comment'];_0x51eb=function(){return _0x45239f;};return _0x51eb();}var re=Object['getOwnPropertyDescriptor'],te=(_0x29f780,_0x17ac51,_0x227c71,_0x9142da)=>{const _0x4c1417=_0x4c386b;for(var _0x4cdf62=_0x9142da>0x1?void 0x0:_0x9142da?re(_0x17ac51,_0x227c71):_0x17ac51,_0x592e48=_0x29f780[_0x4c1417(0x100)]-0x1,_0xafaac0;_0x592e48>=0x0;_0x592e48--)(_0xafaac0=_0x29f780[_0x592e48])&&(_0x4cdf62=_0xafaac0(_0x4cdf62)||_0x4cdf62);return _0x4cdf62;},N=(_0x593e02,_0xf03de6)=>(_0x2e4d79,_0x5bf062)=>_0xf03de6(_0x2e4d79,_0x5bf062,_0x593e02);let g=class extends _0x2cf2a6{constructor(_0x5c0094,_0xc013d9){const _0x9991dd=_0x4c386b;super(),this[_0x9991dd(0xef)]=_0x5c0094,this['_threadCommentDataSource']=_0xc013d9,this[_0x9991dd(0x13d)]();}[_0x4c386b(0x13d)](){const _0x232b66=_0x4c386b;this[_0x232b66(0xef)]['dataSource']=this['_threadCommentDataSource'],this[_0x232b66(0xef)][_0x232b66(0x134)]=!0x1;}};g=te([N(0x0,_0x14ca09),N(0x1,_0x5df9cf(f))],g);var se=Object[_0x4c386b(0xe1)],oe=Object[_0x4c386b(0xdf)],ne=(_0xbe5566,_0x34011f,_0x56fa3c)=>_0x34011f in _0xbe5566?se(_0xbe5566,_0x34011f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56fa3c}):_0xbe5566[_0x34011f]=_0x56fa3c,ie=(_0x3ec7f2,_0x502340,_0x5d02ca,_0x149f89)=>{for(var _0xe23d6e=_0x149f89>0x1?void 0x0:_0x149f89?oe(_0x502340,_0x5d02ca):_0x502340,_0x2c4c55=_0x3ec7f2['length']-0x1,_0x43dadb;_0x2c4c55>=0x0;_0x2c4c55--)(_0x43dadb=_0x3ec7f2[_0x2c4c55])&&(_0xe23d6e=_0x43dadb(_0xe23d6e)||_0xe23d6e);return _0xe23d6e;},w=(_0x1a7be5,_0x58392f)=>(_0x207bfc,_0x1eff2d)=>_0x58392f(_0x207bfc,_0x1eff2d,_0x1a7be5),$=(_0x3adf8b,_0x1369f5,_0x5d3284)=>ne(_0x3adf8b,typeof _0x1369f5!='symbol'?_0x1369f5+'':_0x1369f5,_0x5d3284);let b=class extends _0x449e4b{constructor(_0x2b942c=M,_0x523c88,_0x80ea4d){const _0x48385e=_0x4c386b;super(),this[_0x48385e(0xea)]=_0x2b942c,this[_0x48385e(0xf6)]=_0x523c88,this[_0x48385e(0x121)]=_0x80ea4d;const {..._0x45d3b2}=_0xfbe004({},M,this[_0x48385e(0xea)]);this['_configService']['setConfig'](z,_0x45d3b2);}[_0x4c386b(0x139)](){const _0x33ae6d=_0x4c386b;[[f],[g],[S]][_0x33ae6d(0x133)](_0x66a21a=>{const _0x491afd=_0x33ae6d;this[_0x491afd(0xf6)][_0x491afd(0x142)](_0x66a21a);});}[_0x4c386b(0x138)](){const _0x202216=_0x4c386b;this[_0x202216(0xf6)][_0x202216(0x11a)](g),this[_0x202216(0xf6)][_0x202216(0x11a)](S);}};$(b,_0x4c386b(0x113),W),$(b,_0x4c386b(0x127),_0x2a606d[_0x4c386b(0x131)]),b=ie([_0x335001(_0x2680ad,_0x308f6a,_0x295138),w(0x1,_0x5df9cf(_0x366845)),w(0x2,_0x48a89e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ed600=_0x3490;(function(_0x12b8f5,_0x4b1007){const _0x383f1f=_0x3490,_0x395414=_0x12b8f5();while(!![]){try{const _0x4b5141=parseInt(_0x383f1f(0x131))/0x1+parseInt(_0x383f1f(0x186))/0x2+parseInt(_0x383f1f(0x183))/0x3+-parseInt(_0x383f1f(0x15d))/0x4*(parseInt(_0x383f1f(0x18e))/0x5)+parseInt(_0x383f1f(0x18f))/0x6*(parseInt(_0x383f1f(0x173))/0x7)+-parseInt(_0x383f1f(0x15f))/0x8+parseInt(_0x383f1f(0x149))/0x9;if(_0x4b5141===_0x4b1007)break;else _0x395414['push'](_0x395414['shift']());}catch(_0x4ea9fd){_0x395414['push'](_0x395414['shift']());}}}(_0x49c6,0xda12d));import{CommentService as _0x5b774a,CollaborationSessionService as _0x57b786,UniverCollaborationClientPlugin as _0x5eccf1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x453405}from'@univerjs-pro/license';import{dayjs as _0x2a6e6e,UserManagerService as _0x2f6d8e,Inject as _0x2a9343,Injector as _0x3d4cc6,Disposable as _0xdbb1b8,CustomRangeType as _0x482cff,UniverInstanceType as _0x59e337,DependentOn as _0x97169e,IConfigService as _0x596e4c,Plugin as _0x199264,merge as _0x36a755}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e203f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x337b2d,IThreadCommentDataSourceService as _0x18421a}from'@univerjs/thread-comment';import{bufferTime as _0x7138be}from'rxjs';import{HTTPService as _0x1ba376}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x27b2f0=>(_0x27b2f0[_0x27b2f0[_0x1ed600(0x175)]=0x0]=_0x1ed600(0x175),_0x27b2f0[_0x27b2f0['Solved']=0x1]='Solved',_0x27b2f0[_0x27b2f0[_0x1ed600(0x138)]=-0x1]=_0x1ed600(0x138),_0x27b2f0))(I||{}),v=(_0x5c0868=>(_0x5c0868[_0x5c0868[_0x1ed600(0x158)]=0x0]=_0x1ed600(0x158),_0x5c0868[_0x5c0868['Add']=0x1]=_0x1ed600(0x160),_0x5c0868[_0x5c0868[_0x1ed600(0x14f)]=0x2]=_0x1ed600(0x14f),_0x5c0868[_0x5c0868[_0x1ed600(0x161)]=0x3]=_0x1ed600(0x161),_0x5c0868[_0x5c0868[_0x1ed600(0x15e)]=0x4]='Delete',_0x5c0868[_0x5c0868[_0x1ed600(0x18a)]=0x5]=_0x1ed600(0x18a),_0x5c0868[_0x5c0868[_0x1ed600(0x138)]=-0x1]='UNRECOGNIZED',_0x5c0868))(v||{});const D=_0x34dbc0=>_0x2a6e6e(new Date(+_0x34dbc0))[_0x1ed600(0x143)](_0x1ed600(0x147)),B=async(_0x425e26,_0x558d61)=>{const _0x16b7ab=_0x1ed600,_0x513ebd=_0x425e26[_0x16b7ab(0x16e)](_0x2f6d8e),_0x5de6d9=_0x425e26['get'](_0x1ba376);_0x558d61['forEach'](_0x260823=>{const _0x483426=_0x16b7ab;_0x513ebd['getUser'](_0x260823)&&_0x558d61[_0x483426(0x179)](_0x260823);}),_0x558d61[_0x16b7ab(0x135)]&&(await _0x5de6d9[_0x16b7ab(0x16e)](_0x16b7ab(0x159),{'params':{'userIDs':[..._0x558d61]}}))[_0x16b7ab(0x13f)][_0x16b7ab(0x16d)][_0x16b7ab(0x150)](_0x423dba=>{const _0x36d783=_0x16b7ab;_0x423dba&&_0x513ebd[_0x36d783(0x17a)](_0x423dba);});};var K=Object[_0x1ed600(0x15b)],V=(_0x1824f8,_0x1b1472,_0x44487e,_0x39ac28)=>{const _0x3a07db=_0x1ed600;for(var _0x203d88=_0x39ac28>0x1?void 0x0:_0x39ac28?K(_0x1b1472,_0x44487e):_0x1b1472,_0x1193f2=_0x1824f8[_0x3a07db(0x174)]-0x1,_0x4b3abb;_0x1193f2>=0x0;_0x1193f2--)(_0x4b3abb=_0x1824f8[_0x1193f2])&&(_0x203d88=_0x4b3abb(_0x203d88)||_0x203d88);return _0x203d88;},p=(_0x11fb9f,_0x1cf7ac)=>(_0x2aa3b8,_0x21e9c9)=>_0x1cf7ac(_0x2aa3b8,_0x21e9c9,_0x11fb9f);let S=class extends _0xdbb1b8{constructor(_0x23be5c,_0x1bae32,_0x45fe33,_0x39f60f){const _0x4d3b3a=_0x1ed600;super(),this['_commentService']=_0x23be5c,this[_0x4d3b3a(0x165)]=_0x1bae32,this['_userService']=_0x45fe33,this[_0x4d3b3a(0x17c)]=_0x39f60f,this[_0x4d3b3a(0x153)](),this[_0x4d3b3a(0x18c)]();}['_initUserSync'](){const _0x34d650=_0x1ed600;this[_0x34d650(0x171)](this['_threadCommentModel'][_0x34d650(0x15c)][_0x34d650(0x142)](_0x7138be(0x10))[_0x34d650(0x12f)](_0x5daca6=>{const _0xd062d2=_0x34d650,_0x10efe1=new Set();_0x5daca6['forEach'](_0x31094c=>{const _0x24ec77=_0x3490;switch(_0x31094c['type']){case _0x24ec77(0x13e):{const _0x4f26aa=_0x31094c['payload'][_0x24ec77(0x176)];_0x10efe1[_0x24ec77(0x13e)](_0x4f26aa);break;}}}),B(this[_0xd062d2(0x17c)],_0x10efe1);}));}[_0x1ed600(0x153)](){const _0x22eae8=_0x1ed600;this[_0x22eae8(0x171)](this[_0x22eae8(0x16a)][_0x22eae8(0x15c)][_0x22eae8(0x12f)](async _0x2f820a=>{const _0xc689f3=_0x22eae8;var _0x39a21a,_0x4a4828,_0xbba37d,_0x59e0e5;const _0x5e2de8=(_0x39a21a=this[_0xc689f3(0x165)][_0xc689f3(0x164)](_0x2f820a[_0xc689f3(0x12d)])[_0xc689f3(0x181)](_0x1c3695=>_0x1c3695[_0xc689f3(0x132)]===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x39a21a[_0xc689f3(0x18b)];if(!_0x5e2de8)return;const {unitId:_0x2b8338,subUnitId:_0x4965e7}=_0x5e2de8;switch(_0x2f820a['user']&&this[_0xc689f3(0x146)]['addUser'](_0x2f820a[_0xc689f3(0x16c)]),_0x2f820a[_0xc689f3(0x178)]){case v[_0xc689f3(0x160)]:break;case v[_0xc689f3(0x14f)]:{this['_threadCommentModel']['addComment'](_0x2b8338,_0x4965e7,{'unitId':_0x2b8338,'subUnitId':_0x4965e7,'ref':'','id':_0x2f820a[_0xc689f3(0x167)],'dT':D(+_0x2f820a[_0xc689f3(0x148)]),'threadId':_0x2f820a['threadId'],'personId':(_0xbba37d=(_0x4a4828=_0x2f820a[_0xc689f3(0x16c)])==null?void 0x0:_0x4a4828[_0xc689f3(0x156)])!=null?_0xbba37d:_0x2f820a[_0xc689f3(0x17e)],'text':JSON['parse'](_0x2f820a[_0xc689f3(0x18d)]),'parentId':_0x5e2de8['id']});break;}case v['Delete']:{const _0x6d39e0=this[_0xc689f3(0x165)][_0xc689f3(0x154)](_0x2b8338,_0x4965e7,_0x2f820a['replyId']);_0x6d39e0&&_0x6d39e0['parentId']&&this[_0xc689f3(0x165)][_0xc689f3(0x14c)](_0x2b8338,_0x4965e7,_0x2f820a[_0xc689f3(0x167)]);break;}case v[_0xc689f3(0x161)]:{this[_0xc689f3(0x165)][_0xc689f3(0x16b)](_0x2b8338,_0x4965e7,{'commentId':_0x2f820a[_0xc689f3(0x167)],'text':JSON[_0xc689f3(0x133)](_0x2f820a[_0xc689f3(0x18d)])});break;}case v[_0xc689f3(0x18a)]:{const _0x592a40=(_0x59e0e5=this['_threadCommentModel']['getUnit'](_0x2f820a['unitId'])[_0xc689f3(0x181)](_0x1fc849=>_0x1fc849['threadId']===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x59e0e5[_0xc689f3(0x18b)];_0x592a40&&this[_0xc689f3(0x165)]['resolveComment'](_0x2b8338,_0x4965e7,_0x592a40['id'],_0x2f820a[_0xc689f3(0x13c)]===I[_0xc689f3(0x140)]);break;}}}));}};S=V([p(0x0,_0x2a9343(_0x5b774a)),p(0x1,_0x2a9343(_0x337b2d)),p(0x2,_0x2a9343(_0x2f6d8e)),p(0x3,_0x2a9343(_0x3d4cc6))],S);const z=_0x1ed600(0x189),M={};var k=Object[_0x1ed600(0x15b)],Q=(_0x9281a3,_0x30c0ef,_0x28579a,_0x46e18d)=>{const _0x77b759=_0x1ed600;for(var _0x364382=_0x46e18d>0x1?void 0x0:_0x46e18d?k(_0x30c0ef,_0x28579a):_0x30c0ef,_0x2a19e7=_0x9281a3[_0x77b759(0x174)]-0x1,_0x3c4a08;_0x2a19e7>=0x0;_0x2a19e7--)(_0x3c4a08=_0x9281a3[_0x2a19e7])&&(_0x364382=_0x3c4a08(_0x364382)||_0x364382);return _0x364382;},_=(_0xa89a8a,_0x92d4ed)=>(_0x560a47,_0x1d9102)=>_0x92d4ed(_0x560a47,_0x1d9102,_0xa89a8a);function X(_0x1112a4,_0x1c0fee){const _0x38d044=_0x1ed600,_0x212046=_0x1112a4[_0x38d044(0x166)][0x0];return{..._0x1c0fee,'id':_0x212046['replyId'],'resolved':_0x1112a4[_0x38d044(0x13c)]===0x1,'dT':D(_0x212046['createTimestamp']),'personId':_0x212046[_0x38d044(0x17e)],'threadId':_0x212046[_0x38d044(0x132)]};}function ee(_0x387b07,_0x4daa99,_0x2fb9bb){const _0x8f9a37=_0x1ed600;var _0x324dd8,_0x4be283;if(((_0x4be283=(_0x324dd8=_0x387b07==null?void 0x0:_0x387b07[_0x8f9a37(0x166)])==null?void 0x0:_0x324dd8['length'])!=null?_0x4be283:0x0)>0x0){const _0x1616bd=(_0x6242df,_0x201f75)=>({'id':_0x6242df[_0x8f9a37(0x167)],'threadId':_0x6242df[_0x8f9a37(0x132)],'dT':D(_0x6242df['createTimestamp']),'personId':_0x6242df['userId'],'resolved':_0x387b07[_0x8f9a37(0x13c)]===I['Solved'],'unitId':_0x4daa99,'subUnitId':_0x2fb9bb,'text':JSON[_0x8f9a37(0x133)](_0x6242df[_0x8f9a37(0x18d)]),'parentId':_0x201f75}),_0x30704b=_0x1616bd(_0x387b07[_0x8f9a37(0x166)][0x0]);return{..._0x30704b,'children':_0x387b07[_0x8f9a37(0x166)][_0x8f9a37(0x141)](0x1)[_0x8f9a37(0x17f)](_0x55940f=>_0x1616bd(_0x55940f,_0x30704b['id']))};}return null;}let f=class{constructor(_0x2fc876,_0x1bba5a,_0x183766,_0x14801d){const _0x4070f2=_0x1ed600;this[_0x4070f2(0x17d)]=_0x2fc876,this[_0x4070f2(0x146)]=_0x1bba5a,this['_sessionService']=_0x183766,this[_0x4070f2(0x17c)]=_0x14801d;}async[_0x1ed600(0x13a)](_0x166bde){const _0x2041db=_0x1ed600;var _0x5c1515,_0xbd4d96;const {parentId:_0x3af102,unitId:_0x467252,text:_0x12559d,threadId:_0x20d3e0}=_0x166bde,_0x43cab8=(_0xbd4d96=(_0x5c1515=_0x12559d[_0x2041db(0x137)])==null?void 0x0:_0x5c1515[_0x2041db(0x14b)](_0x36f6fc=>_0x36f6fc[_0x2041db(0x185)]===_0x482cff[_0x2041db(0x134)])[_0x2041db(0x17f)](_0x545215=>_0x545215['rangeId']))!=null?_0xbd4d96:[],_0x19566a=JSON[_0x2041db(0x170)](_0x12559d),_0x3384e7=(await this[_0x2041db(0x145)][_0x2041db(0x130)](_0x467252))[_0x2041db(0x14e)]();if(_0x3af102){const _0x1ed23e={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8,'threadId':_0x20d3e0},_0x33ac57=(await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x144),{'body':_0x1ed23e}))[_0x2041db(0x13f)][_0x2041db(0x190)];return{..._0x166bde,'id':_0x33ac57[_0x2041db(0x167)],'dT':_0x2a6e6e(+_0x33ac57[_0x2041db(0x148)])[_0x2041db(0x143)](_0x2041db(0x147)),'personId':_0x33ac57[_0x2041db(0x17e)]};}else{const _0x1e19f7={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8},_0x5ebb8a=await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x15a),{'body':_0x1e19f7});return X(_0x5ebb8a[_0x2041db(0x13f)][_0x2041db(0x17b)],_0x166bde);}}async[_0x1ed600(0x16b)](_0x3711f3){const _0xf7b8c=_0x1ed600;var _0x403f4d,_0x9d2039;const {text:_0x5b43a3,unitId:_0x1aafd9}=_0x3711f3,_0x571a94=(_0x9d2039=(_0x403f4d=_0x5b43a3['customRanges'])==null?void 0x0:_0x403f4d['filter'](_0x3df4da=>_0x3df4da['rangeType']===_0x482cff[_0xf7b8c(0x134)])[_0xf7b8c(0x17f)](_0x5a7b79=>_0x5a7b79[_0xf7b8c(0x162)]))!=null?_0x9d2039:[],_0x38544f=JSON[_0xf7b8c(0x170)](_0x5b43a3),_0x2f56fd=_0x3711f3[_0xf7b8c(0x132)],_0x135189=_0x3711f3['id'],_0x10b6f9={'memberId':(await this[_0xf7b8c(0x145)][_0xf7b8c(0x130)](_0x1aafd9))['getMemberID'](),'unitId':_0x1aafd9,'threadId':_0x2f56fd,'mention':_0x571a94,'content':_0x38544f,'replyId':_0x135189},_0x1be9a8=await this[_0xf7b8c(0x17d)][_0xf7b8c(0x139)](_0xf7b8c(0x168)+_0x1aafd9+_0xf7b8c(0x14a),{'body':_0x10b6f9});return!_0x1be9a8['body'][_0xf7b8c(0x12e)]||_0x1be9a8['body'][_0xf7b8c(0x12e)]['code']===0x1;}async['resolveComment'](_0xdfe9c5){const _0x463072=_0x1ed600,{unitId:_0x1c7316}=_0xdfe9c5,_0x56781c=_0xdfe9c5[_0x463072(0x132)],_0x333d11={'memberId':this[_0x463072(0x146)][_0x463072(0x13b)]()[_0x463072(0x156)],'unitId':_0x1c7316,'threadId':_0x56781c,'solved':_0xdfe9c5[_0x463072(0x188)]?I[_0x463072(0x140)]:I[_0x463072(0x175)]},_0x4543ff=await this['_httpService']['post'](_0x463072(0x168)+_0x1c7316+_0x463072(0x184),{'body':_0x333d11});return!_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]||_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]['code']===0x1;}async[_0x1ed600(0x14c)](_0x483430,_0x29690e,_0x3266d4,_0x4b1388){const _0x4f0448=_0x1ed600,_0x321720={'memberId':(await this[_0x4f0448(0x145)][_0x4f0448(0x130)](_0x483430))[_0x4f0448(0x14e)](),'threadId':_0x3266d4,'replyId':_0x4b1388,'unitId':_0x483430},_0x431519=await this[_0x4f0448(0x17d)]['post'](_0x4f0448(0x168)+_0x483430+_0x4f0448(0x155),{'body':_0x321720});return!_0x431519[_0x4f0448(0x13f)][_0x4f0448(0x12e)]||_0x431519['body'][_0x4f0448(0x12e)]['code']===0x1;}async['listComments'](_0x2b7d31,_0x18e59b,_0xcdaaaf){const _0x356b10=_0x1ed600,_0x3114cc={'unitId':_0x2b7d31,'threadId':_0xcdaaaf},_0x470fcf=await this[_0x356b10(0x17d)]['post'](_0x356b10(0x168)+_0x2b7d31+_0x356b10(0x14d),{'body':_0x3114cc}),_0x34bbd2=_0xcdaaaf[_0x356b10(0x17f)](_0x518a74=>ee(_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x157)][_0x518a74],_0x2b7d31,_0x18e59b))[_0x356b10(0x14b)](Boolean);return Object[_0x356b10(0x182)](_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x16d)])[_0x356b10(0x150)](_0x8f8e46=>{const _0x556fc4=_0x356b10;this[_0x556fc4(0x146)]['addUser'](_0x8f8e46);}),_0x34bbd2;}['saveCommentToSnapshot'](_0x92e8bc){const _0x2efc7c=_0x1ed600;return{'id':_0x92e8bc['id'],'threadId':_0x92e8bc['threadId'],'ref':_0x92e8bc[_0x2efc7c(0x187)]};}};f=Q([_(0x0,_0x2a9343(_0x1ba376)),_(0x1,_0x2a9343(_0x2f6d8e)),_(0x2,_0x2a9343(_0x57b786)),_(0x3,_0x2a9343(_0x3d4cc6))],f);function _0x3490(_0x5c9541,_0x1f613f){const _0x49c67a=_0x49c6();return _0x3490=function(_0x3490ae,_0x15fb01){_0x3490ae=_0x3490ae-0x12d;let _0x588f54=_0x49c67a[_0x3490ae];return _0x588f54;},_0x3490(_0x5c9541,_0x1f613f);}var re=Object[_0x1ed600(0x15b)],te=(_0x5fe07d,_0x4b4fb0,_0x33f062,_0x284796)=>{for(var _0x4da168=_0x284796>0x1?void 0x0:_0x284796?re(_0x4b4fb0,_0x33f062):_0x4b4fb0,_0x272b28=_0x5fe07d['length']-0x1,_0x5415d5;_0x272b28>=0x0;_0x272b28--)(_0x5415d5=_0x5fe07d[_0x272b28])&&(_0x4da168=_0x5415d5(_0x4da168)||_0x4da168);return _0x4da168;},N=(_0x28b7e4,_0x1e53c1)=>(_0x26a9cf,_0x57b27f)=>_0x1e53c1(_0x26a9cf,_0x57b27f,_0x28b7e4);function _0x49c6(){const _0x240421=['pipe','format','/reply','_sessionService','_userService','YYYY/MM/DD\x20HH:mm','createTimestamp','3155400AZsktE','/edit','filter','deleteComment','/list','getMemberID','Reply','forEach','onStarting','pluginName','_init','getComment','/delete','userID','comments','Unknown','/universer-api/user/list','/add','getOwnPropertyDescriptor','commentUpdate$','2542796UJwTdK','Delete','14275320uucMez','Add','Edit','rangeId','_initDataSource','getUnit','_threadCommentModel','replies','replyId','/universer-api/comment/unit/','dataSource','_commentService','updateComment','user','users','get','_threadCommentDataSourceService','stringify','disposeWithMe','setConfig','7VBgKFz','length','OpenOrReOpen','personId','_configService','type','delete','addUser','comment','_injector','_httpService','userId','map','syncUpdateMutationToColla','find','values','4044471gSiUVA','/solved','rangeType','917202rtjbey','ref','resolved','thread-comment-data-source.config','Solve','root','_initUserSync','content','10qEpwPg','2880330mDPZPB','reply','unitId','error','subscribe','requireSession','1311629PFAvTM','threadId','parse','COMMENT','size','defineProperty','customRanges','UNRECOGNIZED','post','addComment','getCurrentUser','solved','_threadCommentDataSource','add','body','Solved','slice'];_0x49c6=function(){return _0x240421;};return _0x49c6();}let g=class extends _0xdbb1b8{constructor(_0x256151,_0xff7432){const _0x24a9ea=_0x1ed600;super(),this[_0x24a9ea(0x16f)]=_0x256151,this[_0x24a9ea(0x13d)]=_0xff7432,this[_0x24a9ea(0x163)]();}[_0x1ed600(0x163)](){const _0x2797a2=_0x1ed600;this[_0x2797a2(0x16f)][_0x2797a2(0x169)]=this[_0x2797a2(0x13d)],this[_0x2797a2(0x16f)][_0x2797a2(0x180)]=!0x1;}};g=te([N(0x0,_0x18421a),N(0x1,_0x2a9343(f))],g);var se=Object[_0x1ed600(0x136)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x55fb26,_0x46013c,_0x3522e2)=>_0x46013c in _0x55fb26?se(_0x55fb26,_0x46013c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3522e2}):_0x55fb26[_0x46013c]=_0x3522e2,ie=(_0x32891a,_0x1316e6,_0x2c0cc3,_0x22736b)=>{const _0x40664d=_0x1ed600;for(var _0x4e5973=_0x22736b>0x1?void 0x0:_0x22736b?oe(_0x1316e6,_0x2c0cc3):_0x1316e6,_0x232ffd=_0x32891a[_0x40664d(0x174)]-0x1,_0x111ef2;_0x232ffd>=0x0;_0x232ffd--)(_0x111ef2=_0x32891a[_0x232ffd])&&(_0x4e5973=_0x111ef2(_0x4e5973)||_0x4e5973);return _0x4e5973;},w=(_0xa4abe8,_0x44cccb)=>(_0x411bb5,_0x166067)=>_0x44cccb(_0x411bb5,_0x166067,_0xa4abe8),$=(_0x54000e,_0x412f11,_0x2421a9)=>ne(_0x54000e,typeof _0x412f11!='symbol'?_0x412f11+'':_0x412f11,_0x2421a9);let b=class extends _0x199264{constructor(_0x4877fe=M,_0x28972e,_0x2cf9aa){const _0x1d3ceb=_0x1ed600;super(),this['_config']=_0x4877fe,this['_injector']=_0x28972e,this[_0x1d3ceb(0x177)]=_0x2cf9aa;const {..._0x1dcb03}=_0x36a755({},M,this['_config']);this[_0x1d3ceb(0x177)][_0x1d3ceb(0x172)](z,_0x1dcb03);}[_0x1ed600(0x151)](){const _0x5d50f0=_0x1ed600;[[f],[g],[S]][_0x5d50f0(0x150)](_0x103467=>{const _0x3447d5=_0x5d50f0;this['_injector'][_0x3447d5(0x13e)](_0x103467);});}['onReady'](){const _0x21a4a4=_0x1ed600;this[_0x21a4a4(0x17c)][_0x21a4a4(0x16e)](g),this[_0x21a4a4(0x17c)]['get'](S);}};$(b,_0x1ed600(0x152),W),$(b,_0x1ed600(0x178),_0x59e337['UNIVER_UNKNOWN']),b=ie([_0x97169e(_0x5e203f,_0x5eccf1,_0x453405),w(0x1,_0x2a9343(_0x3d4cc6)),w(0x2,_0x596e4c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4c386b=_0x4dee;(function(_0x57fd8a,_0x48aa77){const _0x30643a=_0x4dee,_0x1171ab=_0x57fd8a();while(!![]){try{const _0x5dfee9=-parseInt(_0x30643a(0x117))/0x1+-parseInt(_0x30643a(0x10a))/0x2+parseInt(_0x30643a(0x103))/0x3*(parseInt(_0x30643a(0xe9))/0x4)+-parseInt(_0x30643a(0x10c))/0x5+parseInt(_0x30643a(0xe6))/0x6*(parseInt(_0x30643a(0x13a))/0x7)+-parseInt(_0x30643a(0x112))/0x8*(parseInt(_0x30643a(0xf7))/0x9)+parseInt(_0x30643a(0x124))/0xa;if(_0x5dfee9===_0x48aa77)break;else _0x1171ab['push'](_0x1171ab['shift']());}catch(_0x5b0cd7){_0x1171ab['push'](_0x1171ab['shift']());}}}(_0x51eb,0x81956));import{CommentService as _0x557342,CollaborationSessionService as _0xfb639f,UniverCollaborationClientPlugin as _0x308f6a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x295138}from'@univerjs-pro/license';import{dayjs as _0x386800,UserManagerService as _0x2d6bfb,Inject as _0x5df9cf,Injector as _0x366845,Disposable as _0x2cf2a6,CustomRangeType as _0x3596ea,UniverInstanceType as _0x2a606d,DependentOn as _0x335001,IConfigService as _0x48a89e,Plugin as _0x449e4b,merge as _0xfbe004}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2680ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x277e92,IThreadCommentDataSourceService as _0x14ca09}from'@univerjs/thread-comment';import{bufferTime as _0x2fb0ee}from'rxjs';import{HTTPService as _0x135e04}from'@univerjs/network';const W=_0x4c386b(0x136);var I=(_0x4e5b48=>(_0x4e5b48[_0x4e5b48[_0x4c386b(0x101)]=0x0]=_0x4c386b(0x101),_0x4e5b48[_0x4e5b48[_0x4c386b(0x10f)]=0x1]=_0x4c386b(0x10f),_0x4e5b48[_0x4e5b48[_0x4c386b(0xfd)]=-0x1]='UNRECOGNIZED',_0x4e5b48))(I||{}),v=(_0x7f0e7e=>(_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x11f)]=0x0]=_0x4c386b(0x11f),_0x7f0e7e[_0x7f0e7e['Add']=0x1]=_0x4c386b(0xdc),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf4)]=0x2]='Reply',_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x13f)]=0x3]=_0x4c386b(0x13f),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf9)]=0x4]=_0x4c386b(0xf9),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x111)]=0x5]=_0x4c386b(0x111),_0x7f0e7e[_0x7f0e7e['UNRECOGNIZED']=-0x1]=_0x4c386b(0xfd),_0x7f0e7e))(v||{});const D=_0x4579c4=>_0x386800(new Date(+_0x4579c4))[_0x4c386b(0x119)](_0x4c386b(0xe5)),B=async(_0x151372,_0x472bbe)=>{const _0x3c76e5=_0x4c386b,_0x1b13a5=_0x151372[_0x3c76e5(0x11a)](_0x2d6bfb),_0x1f2ac9=_0x151372['get'](_0x135e04);_0x472bbe[_0x3c76e5(0x133)](_0x1fd6b5=>{const _0x1adac6=_0x3c76e5;_0x1b13a5[_0x1adac6(0x10e)](_0x1fd6b5)&&_0x472bbe[_0x1adac6(0x10b)](_0x1fd6b5);}),_0x472bbe[_0x3c76e5(0x11b)]&&(await _0x1f2ac9[_0x3c76e5(0x11a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x472bbe]}}))['body']['users']['forEach'](_0x5c993e=>{_0x5c993e&&_0x1b13a5['addUser'](_0x5c993e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1f2a83,_0xa3729c,_0x32b37d,_0x3d45ed)=>{const _0x45988d=_0x4c386b;for(var _0x2fe9b3=_0x3d45ed>0x1?void 0x0:_0x3d45ed?K(_0xa3729c,_0x32b37d):_0xa3729c,_0x45350d=_0x1f2a83[_0x45988d(0x100)]-0x1,_0x516c64;_0x45350d>=0x0;_0x45350d--)(_0x516c64=_0x1f2a83[_0x45350d])&&(_0x2fe9b3=_0x516c64(_0x2fe9b3)||_0x2fe9b3);return _0x2fe9b3;},p=(_0x5e9155,_0x4ddd73)=>(_0x4ee9a8,_0x40939c)=>_0x4ddd73(_0x4ee9a8,_0x40939c,_0x5e9155);let S=class extends _0x2cf2a6{constructor(_0x2b4079,_0x12f057,_0x52694f,_0x2ca9f0){const _0x2d0650=_0x4c386b;super(),this['_commentService']=_0x2b4079,this[_0x2d0650(0x12e)]=_0x12f057,this[_0x2d0650(0xfc)]=_0x52694f,this[_0x2d0650(0xf6)]=_0x2ca9f0,this[_0x2d0650(0x12f)](),this[_0x2d0650(0x106)]();}[_0x4c386b(0x106)](){const _0x2b70e9=_0x4c386b;this[_0x2b70e9(0x11c)](this[_0x2b70e9(0x12e)][_0x2b70e9(0x107)][_0x2b70e9(0x13c)](_0x2fb0ee(0x10))[_0x2b70e9(0x12c)](_0xf653fe=>{const _0x181918=_0x2b70e9,_0x32f2b3=new Set();_0xf653fe['forEach'](_0x1e7d8d=>{const _0x218316=_0x4dee;switch(_0x1e7d8d[_0x218316(0x127)]){case'add':{const _0x53b211=_0x1e7d8d[_0x218316(0xec)][_0x218316(0x118)];_0x32f2b3[_0x218316(0x142)](_0x53b211);break;}}}),B(this[_0x181918(0xf6)],_0x32f2b3);}));}['_init'](){const _0x4121c9=_0x4c386b;this[_0x4121c9(0x11c)](this[_0x4121c9(0xfa)][_0x4121c9(0x107)][_0x4121c9(0x12c)](async _0x1b4d67=>{const _0x7b8ee3=_0x4121c9;var _0x18355b,_0x513aa8,_0x374449,_0x362e91;const _0x4e774b=(_0x18355b=this['_threadCommentModel']['getUnit'](_0x1b4d67[_0x7b8ee3(0x132)])['find'](_0x3e0849=>_0x3e0849[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x18355b[_0x7b8ee3(0xf2)];if(!_0x4e774b)return;const {unitId:_0x1478e8,subUnitId:_0x16cc52}=_0x4e774b;switch(_0x1b4d67[_0x7b8ee3(0xe0)]&&this['_userService'][_0x7b8ee3(0xe7)](_0x1b4d67[_0x7b8ee3(0xe0)]),_0x1b4d67[_0x7b8ee3(0x127)]){case v[_0x7b8ee3(0xdc)]:break;case v['Reply']:{this['_threadCommentModel'][_0x7b8ee3(0x110)](_0x1478e8,_0x16cc52,{'unitId':_0x1478e8,'subUnitId':_0x16cc52,'ref':'','id':_0x1b4d67[_0x7b8ee3(0x128)],'dT':D(+_0x1b4d67[_0x7b8ee3(0x116)]),'threadId':_0x1b4d67[_0x7b8ee3(0x126)],'personId':(_0x374449=(_0x513aa8=_0x1b4d67[_0x7b8ee3(0xe0)])==null?void 0x0:_0x513aa8['userID'])!=null?_0x374449:_0x1b4d67[_0x7b8ee3(0x12a)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67['content']),'parentId':_0x4e774b['id']});break;}case v[_0x7b8ee3(0xf9)]:{const _0x3d54b2=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xde)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);_0x3d54b2&&_0x3d54b2[_0x7b8ee3(0xf1)]&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xfe)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);break;}case v[_0x7b8ee3(0x13f)]:{this['_threadCommentModel'][_0x7b8ee3(0x130)](_0x1478e8,_0x16cc52,{'commentId':_0x1b4d67[_0x7b8ee3(0x128)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67[_0x7b8ee3(0x102)])});break;}case v[_0x7b8ee3(0x111)]:{const _0x5abdfc=(_0x362e91=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xed)](_0x1b4d67[_0x7b8ee3(0x132)])[_0x7b8ee3(0xe4)](_0x5dd4b8=>_0x5dd4b8[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x362e91['root'];_0x5abdfc&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0x141)](_0x1478e8,_0x16cc52,_0x5abdfc['id'],_0x1b4d67[_0x7b8ee3(0x11e)]===I[_0x7b8ee3(0x10f)]);break;}}}));}};function _0x4dee(_0x72d138,_0x34f66d){const _0x51eb80=_0x51eb();return _0x4dee=function(_0x4dee1f,_0xa9f298){_0x4dee1f=_0x4dee1f-0xdc;let _0x318b8e=_0x51eb80[_0x4dee1f];return _0x318b8e;},_0x4dee(_0x72d138,_0x34f66d);}S=V([p(0x0,_0x5df9cf(_0x557342)),p(0x1,_0x5df9cf(_0x277e92)),p(0x2,_0x5df9cf(_0x2d6bfb)),p(0x3,_0x5df9cf(_0x366845))],S);const z=_0x4c386b(0x120),M={};var k=Object[_0x4c386b(0xdf)],Q=(_0x1dcd15,_0x3ad3e5,_0x12b5d6,_0x3d0907)=>{const _0x1267a8=_0x4c386b;for(var _0x400c65=_0x3d0907>0x1?void 0x0:_0x3d0907?k(_0x3ad3e5,_0x12b5d6):_0x3ad3e5,_0x13a468=_0x1dcd15[_0x1267a8(0x100)]-0x1,_0x549d8f;_0x13a468>=0x0;_0x13a468--)(_0x549d8f=_0x1dcd15[_0x13a468])&&(_0x400c65=_0x549d8f(_0x400c65)||_0x400c65);return _0x400c65;},_=(_0x45bdc9,_0x3998c6)=>(_0xc4775,_0x28f405)=>_0x3998c6(_0xc4775,_0x28f405,_0x45bdc9);function X(_0x7cb4e6,_0x4daa2a){const _0x2dadc2=_0x4c386b,_0x54ef10=_0x7cb4e6[_0x2dadc2(0x135)][0x0];return{..._0x4daa2a,'id':_0x54ef10[_0x2dadc2(0x128)],'resolved':_0x7cb4e6[_0x2dadc2(0x11e)]===0x1,'dT':D(_0x54ef10[_0x2dadc2(0x116)]),'personId':_0x54ef10['userId'],'threadId':_0x54ef10[_0x2dadc2(0x126)]};}function ee(_0x97973e,_0x4eec2e,_0x1ed8db){const _0x585081=_0x4c386b;var _0x387e6c,_0x2b625b;if(((_0x2b625b=(_0x387e6c=_0x97973e==null?void 0x0:_0x97973e[_0x585081(0x135)])==null?void 0x0:_0x387e6c[_0x585081(0x100)])!=null?_0x2b625b:0x0)>0x0){const _0x3f1644=(_0x248b0c,_0x380295)=>({'id':_0x248b0c[_0x585081(0x128)],'threadId':_0x248b0c[_0x585081(0x126)],'dT':D(_0x248b0c['createTimestamp']),'personId':_0x248b0c[_0x585081(0x12a)],'resolved':_0x97973e['solved']===I[_0x585081(0x10f)],'unitId':_0x4eec2e,'subUnitId':_0x1ed8db,'text':JSON[_0x585081(0x125)](_0x248b0c[_0x585081(0x102)]),'parentId':_0x380295}),_0x104c1f=_0x3f1644(_0x97973e[_0x585081(0x135)][0x0]);return{..._0x104c1f,'children':_0x97973e[_0x585081(0x135)][_0x585081(0xfb)](0x1)[_0x585081(0xf8)](_0x1734e5=>_0x3f1644(_0x1734e5,_0x104c1f['id']))};}return null;}let f=class{constructor(_0x56f777,_0x2401af,_0x54ebd0,_0x2f4216){const _0x206103=_0x4c386b;this[_0x206103(0x123)]=_0x56f777,this['_userService']=_0x2401af,this[_0x206103(0x140)]=_0x54ebd0,this[_0x206103(0xf6)]=_0x2f4216;}async[_0x4c386b(0x110)](_0x2f1641){const _0x29e658=_0x4c386b;var _0xd18f35,_0x177461;const {parentId:_0x5003cd,unitId:_0x47a4a9,text:_0x380d4b,threadId:_0x5058c0}=_0x2f1641,_0x3b5011=(_0x177461=(_0xd18f35=_0x380d4b[_0x29e658(0xee)])==null?void 0x0:_0xd18f35[_0x29e658(0xdd)](_0x22f5d1=>_0x22f5d1[_0x29e658(0x108)]===_0x3596ea['COMMENT'])['map'](_0x37d606=>_0x37d606['rangeId']))!=null?_0x177461:[],_0x4c66ce=JSON[_0x29e658(0x12d)](_0x380d4b),_0x985712=(await this[_0x29e658(0x140)][_0x29e658(0x114)](_0x47a4a9))[_0x29e658(0x109)]();if(_0x5003cd){const _0x1f72ef={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011,'threadId':_0x5058c0},_0x5a92c6=(await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0xe3),{'body':_0x1f72ef}))[_0x29e658(0x129)][_0x29e658(0xf5)];return{..._0x2f1641,'id':_0x5a92c6['replyId'],'dT':_0x386800(+_0x5a92c6[_0x29e658(0x116)])[_0x29e658(0x119)](_0x29e658(0xe5)),'personId':_0x5a92c6['userId']};}else{const _0x4d8b5e={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011},_0x3eecc0=await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0x10d),{'body':_0x4d8b5e});return X(_0x3eecc0[_0x29e658(0x129)][_0x29e658(0x105)],_0x2f1641);}}async[_0x4c386b(0x130)](_0x6b1ff0){const _0xede77=_0x4c386b;var _0xfa6d02,_0x7abad5;const {text:_0x1d1359,unitId:_0x18f6b0}=_0x6b1ff0,_0x1ef9f5=(_0x7abad5=(_0xfa6d02=_0x1d1359[_0xede77(0xee)])==null?void 0x0:_0xfa6d02[_0xede77(0xdd)](_0x4f2917=>_0x4f2917[_0xede77(0x108)]===_0x3596ea['COMMENT'])[_0xede77(0xf8)](_0x1bd702=>_0x1bd702[_0xede77(0xf0)]))!=null?_0x7abad5:[],_0x85fbcb=JSON['stringify'](_0x1d1359),_0x586508=_0x6b1ff0[_0xede77(0x126)],_0x139876=_0x6b1ff0['id'],_0x41d304={'memberId':(await this['_sessionService'][_0xede77(0x114)](_0x18f6b0))[_0xede77(0x109)](),'unitId':_0x18f6b0,'threadId':_0x586508,'mention':_0x1ef9f5,'content':_0x85fbcb,'replyId':_0x139876},_0x58f33c=await this['_httpService'][_0xede77(0x115)](_0xede77(0xe8)+_0x18f6b0+_0xede77(0xf3),{'body':_0x41d304});return!_0x58f33c[_0xede77(0x129)][_0xede77(0x122)]||_0x58f33c[_0xede77(0x129)][_0xede77(0x122)][_0xede77(0xeb)]===0x1;}async[_0x4c386b(0x141)](_0x2e18d6){const _0x189f40=_0x4c386b,{unitId:_0x59f1ea}=_0x2e18d6,_0x4b4b32=_0x2e18d6[_0x189f40(0x126)],_0x5c8b45={'memberId':this['_userService'][_0x189f40(0x13b)]()[_0x189f40(0x12b)],'unitId':_0x59f1ea,'threadId':_0x4b4b32,'solved':_0x2e18d6['resolved']?I[_0x189f40(0x10f)]:I['OpenOrReOpen']},_0x3b5ca6=await this[_0x189f40(0x123)][_0x189f40(0x115)]('/universer-api/comment/unit/'+_0x59f1ea+'/solved',{'body':_0x5c8b45});return!_0x3b5ca6[_0x189f40(0x129)]['error']||_0x3b5ca6[_0x189f40(0x129)]['error'][_0x189f40(0xeb)]===0x1;}async[_0x4c386b(0xfe)](_0x55a318,_0x1d7f89,_0x57da0f,_0x1f6080){const _0x48f581=_0x4c386b,_0x114565={'memberId':(await this[_0x48f581(0x140)]['requireSession'](_0x55a318))[_0x48f581(0x109)](),'threadId':_0x57da0f,'replyId':_0x1f6080,'unitId':_0x55a318},_0x412a0a=await this['_httpService'][_0x48f581(0x115)](_0x48f581(0xe8)+_0x55a318+_0x48f581(0x13e),{'body':_0x114565});return!_0x412a0a[_0x48f581(0x129)]['error']||_0x412a0a[_0x48f581(0x129)][_0x48f581(0x122)][_0x48f581(0xeb)]===0x1;}async[_0x4c386b(0x104)](_0x56c76f,_0xed8875,_0x517f33){const _0x546ea5=_0x4c386b,_0x15c93e={'unitId':_0x56c76f,'threadId':_0x517f33},_0x1a715d=await this[_0x546ea5(0x123)][_0x546ea5(0x115)](_0x546ea5(0xe8)+_0x56c76f+'/list',{'body':_0x15c93e}),_0x34cc2c=_0x517f33[_0x546ea5(0xf8)](_0x3b24a0=>ee(_0x1a715d['body'][_0x546ea5(0xff)][_0x3b24a0],_0x56c76f,_0xed8875))[_0x546ea5(0xdd)](Boolean);return Object[_0x546ea5(0x137)](_0x1a715d[_0x546ea5(0x129)][_0x546ea5(0x11d)])[_0x546ea5(0x133)](_0x84f9fc=>{const _0x4ee4c6=_0x546ea5;this[_0x4ee4c6(0xfc)][_0x4ee4c6(0xe7)](_0x84f9fc);}),_0x34cc2c;}['saveCommentToSnapshot'](_0x2eb497){const _0x229f5c=_0x4c386b;return{'id':_0x2eb497['id'],'threadId':_0x2eb497[_0x229f5c(0x126)],'ref':_0x2eb497[_0x229f5c(0xe2)]};}};f=Q([_(0x0,_0x5df9cf(_0x135e04)),_(0x1,_0x5df9cf(_0x2d6bfb)),_(0x2,_0x5df9cf(_0xfb639f)),_(0x3,_0x5df9cf(_0x366845))],f);function _0x51eb(){const _0x45239f=['_initUserSync','commentUpdate$','rangeType','getMemberID','642480GKohPC','delete','3501355IejjYN','/add','getUser','Solved','addComment','Solve','9928IndejH','pluginName','requireSession','post','createTimestamp','278267EuUymt','personId','format','get','size','disposeWithMe','users','solved','Unknown','thread-comment-data-source.config','_configService','error','_httpService','6364550NGNurC','parse','threadId','type','replyId','body','userId','userID','subscribe','stringify','_threadCommentModel','_init','updateComment','UNIVER_UNKNOWN','unitId','forEach','syncUpdateMutationToColla','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','onReady','onStarting','7vjKFZU','getCurrentUser','pipe','_initDataSource','/delete','Edit','_sessionService','resolveComment','add','Add','filter','getComment','getOwnPropertyDescriptor','user','defineProperty','ref','/reply','find','YYYY/MM/DD\x20HH:mm','2848722boPpBw','addUser','/universer-api/comment/unit/','4uOXOXy','_config','code','payload','getUnit','customRanges','_threadCommentDataSourceService','rangeId','parentId','root','/edit','Reply','reply','_injector','1674VRKktY','map','Delete','_commentService','slice','_userService','UNRECOGNIZED','deleteComment','comments','length','OpenOrReOpen','content','2850408AilNxk','listComments','comment'];_0x51eb=function(){return _0x45239f;};return _0x51eb();}var re=Object['getOwnPropertyDescriptor'],te=(_0x29f780,_0x17ac51,_0x227c71,_0x9142da)=>{const _0x4c1417=_0x4c386b;for(var _0x4cdf62=_0x9142da>0x1?void 0x0:_0x9142da?re(_0x17ac51,_0x227c71):_0x17ac51,_0x592e48=_0x29f780[_0x4c1417(0x100)]-0x1,_0xafaac0;_0x592e48>=0x0;_0x592e48--)(_0xafaac0=_0x29f780[_0x592e48])&&(_0x4cdf62=_0xafaac0(_0x4cdf62)||_0x4cdf62);return _0x4cdf62;},N=(_0x593e02,_0xf03de6)=>(_0x2e4d79,_0x5bf062)=>_0xf03de6(_0x2e4d79,_0x5bf062,_0x593e02);let g=class extends _0x2cf2a6{constructor(_0x5c0094,_0xc013d9){const _0x9991dd=_0x4c386b;super(),this[_0x9991dd(0xef)]=_0x5c0094,this['_threadCommentDataSource']=_0xc013d9,this[_0x9991dd(0x13d)]();}[_0x4c386b(0x13d)](){const _0x232b66=_0x4c386b;this[_0x232b66(0xef)]['dataSource']=this['_threadCommentDataSource'],this[_0x232b66(0xef)][_0x232b66(0x134)]=!0x1;}};g=te([N(0x0,_0x14ca09),N(0x1,_0x5df9cf(f))],g);var se=Object[_0x4c386b(0xe1)],oe=Object[_0x4c386b(0xdf)],ne=(_0xbe5566,_0x34011f,_0x56fa3c)=>_0x34011f in _0xbe5566?se(_0xbe5566,_0x34011f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56fa3c}):_0xbe5566[_0x34011f]=_0x56fa3c,ie=(_0x3ec7f2,_0x502340,_0x5d02ca,_0x149f89)=>{for(var _0xe23d6e=_0x149f89>0x1?void 0x0:_0x149f89?oe(_0x502340,_0x5d02ca):_0x502340,_0x2c4c55=_0x3ec7f2['length']-0x1,_0x43dadb;_0x2c4c55>=0x0;_0x2c4c55--)(_0x43dadb=_0x3ec7f2[_0x2c4c55])&&(_0xe23d6e=_0x43dadb(_0xe23d6e)||_0xe23d6e);return _0xe23d6e;},w=(_0x1a7be5,_0x58392f)=>(_0x207bfc,_0x1eff2d)=>_0x58392f(_0x207bfc,_0x1eff2d,_0x1a7be5),$=(_0x3adf8b,_0x1369f5,_0x5d3284)=>ne(_0x3adf8b,typeof _0x1369f5!='symbol'?_0x1369f5+'':_0x1369f5,_0x5d3284);let b=class extends _0x449e4b{constructor(_0x2b942c=M,_0x523c88,_0x80ea4d){const _0x48385e=_0x4c386b;super(),this[_0x48385e(0xea)]=_0x2b942c,this[_0x48385e(0xf6)]=_0x523c88,this[_0x48385e(0x121)]=_0x80ea4d;const {..._0x45d3b2}=_0xfbe004({},M,this[_0x48385e(0xea)]);this['_configService']['setConfig'](z,_0x45d3b2);}[_0x4c386b(0x139)](){const _0x33ae6d=_0x4c386b;[[f],[g],[S]][_0x33ae6d(0x133)](_0x66a21a=>{const _0x491afd=_0x33ae6d;this[_0x491afd(0xf6)][_0x491afd(0x142)](_0x66a21a);});}[_0x4c386b(0x138)](){const _0x202216=_0x4c386b;this[_0x202216(0xf6)][_0x202216(0x11a)](g),this[_0x202216(0xf6)][_0x202216(0x11a)](S);}};$(b,_0x4c386b(0x113),W),$(b,_0x4c386b(0x127),_0x2a606d[_0x4c386b(0x131)]),b=ie([_0x335001(_0x2680ad,_0x308f6a,_0x295138),w(0x1,_0x5df9cf(_0x366845)),w(0x2,_0x48a89e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2729b4,_0x201f7b){const _0x3dbf76=_0xf5d2,_0x432190=_0x2729b4();while(!![]){try{const _0x1d396e=parseInt(_0x3dbf76(0x20a))/0x1+-parseInt(_0x3dbf76(0x258))/0x2*(parseInt(_0x3dbf76(0x25d))/0x3)+-parseInt(_0x3dbf76(0x24a))/0x4+parseInt(_0x3dbf76(0x254))/0x5+parseInt(_0x3dbf76(0x242))/0x6+parseInt(_0x3dbf76(0x1de))/0x7+-parseInt(_0x3dbf76(0x244))/0x8;if(_0x1d396e===_0x201f7b)break;else _0x432190['push'](_0x432190['shift']());}catch(_0x54cbff){_0x432190['push'](_0x432190['shift']());}}}(_0x3d2e,0x9d711),function(_0x4bcffb,_0x760eec){const _0x1708f6=_0xf5d2;typeof exports=='object'&&typeof module<'u'?_0x760eec(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==_0x1708f6(0x237)&&define[_0x1708f6(0x1f4)]?define([_0x1708f6(0x259),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x1708f6(0x22a),_0x1708f6(0x239),_0x1708f6(0x1f3),_0x1708f6(0x255),_0x1708f6(0x1e3)],_0x760eec):(_0x4bcffb=typeof globalThis<'u'?globalThis:_0x4bcffb||self,_0x760eec(_0x4bcffb['UniverProThreadCommentDatasource']={},_0x4bcffb[_0x1708f6(0x245)],_0x4bcffb[_0x1708f6(0x1dc)],_0x4bcffb[_0x1708f6(0x1e8)],_0x4bcffb[_0x1708f6(0x1e5)],_0x4bcffb[_0x1708f6(0x24b)],_0x4bcffb[_0x1708f6(0x255)],_0x4bcffb[_0x1708f6(0x25a)]));}(this,function(_0x326b84,_0x13c7fc,_0xc9f437,_0x2b7b26,_0x49389b,_0x581cc2,_0x4926bf,_0x17bd88){'use strict';const _0x1fa8bf=_0xf5d2;const _0x4f78f8=_0x1fa8bf(0x25b);var _0x11b727=(_0x4b345b=>(_0x4b345b[_0x4b345b['OpenOrReOpen']=0x0]=_0x1fa8bf(0x248),_0x4b345b[_0x4b345b[_0x1fa8bf(0x224)]=0x1]=_0x1fa8bf(0x224),_0x4b345b[_0x4b345b[_0x1fa8bf(0x246)]=-0x1]=_0x1fa8bf(0x246),_0x4b345b))(_0x11b727||{}),_0x2d2ad4=(_0x18da0d=>(_0x18da0d[_0x18da0d['Unknown']=0x0]=_0x1fa8bf(0x23b),_0x18da0d[_0x18da0d[_0x1fa8bf(0x24c)]=0x1]=_0x1fa8bf(0x24c),_0x18da0d[_0x18da0d[_0x1fa8bf(0x1f9)]=0x2]=_0x1fa8bf(0x1f9),_0x18da0d[_0x18da0d[_0x1fa8bf(0x221)]=0x3]=_0x1fa8bf(0x221),_0x18da0d[_0x18da0d[_0x1fa8bf(0x1f0)]=0x4]=_0x1fa8bf(0x1f0),_0x18da0d[_0x18da0d['Solve']=0x5]=_0x1fa8bf(0x21e),_0x18da0d[_0x18da0d[_0x1fa8bf(0x246)]=-0x1]='UNRECOGNIZED',_0x18da0d))(_0x2d2ad4||{});const _0x1a9150=_0x67bfc5=>_0x2b7b26['dayjs'](new Date(+_0x67bfc5))[_0x1fa8bf(0x226)]('YYYY/MM/DD\x20HH:mm'),_0x55a38f=async(_0x24a7d2,_0x1d9161)=>{const _0x553bb1=_0x1fa8bf,_0x16412c=_0x24a7d2[_0x553bb1(0x20e)](_0x2b7b26['UserManagerService']),_0x2ba8e9=_0x24a7d2['get'](_0x17bd88[_0x553bb1(0x23a)]);_0x1d9161['forEach'](_0x3f7334=>{const _0xd41889=_0x553bb1;_0x16412c[_0xd41889(0x230)](_0x3f7334)&&_0x1d9161[_0xd41889(0x24d)](_0x3f7334);}),_0x1d9161[_0x553bb1(0x1fc)]&&(await _0x2ba8e9[_0x553bb1(0x20e)](_0x553bb1(0x208),{'params':{'userIDs':[..._0x1d9161]}}))[_0x553bb1(0x243)][_0x553bb1(0x210)][_0x553bb1(0x1ff)](_0x234818=>{const _0x23d590=_0x553bb1;_0x234818&&_0x16412c[_0x23d590(0x1e1)](_0x234818);});};var _0xd1e5df=Object[_0x1fa8bf(0x1ea)],_0x499480=(_0x5b76af,_0x3b7004,_0x24afb4,_0x322418)=>{for(var _0x212e06=_0x322418>0x1?void 0x0:_0x322418?_0xd1e5df(_0x3b7004,_0x24afb4):_0x3b7004,_0x2b3f27=_0x5b76af['length']-0x1,_0x5ae62d;_0x2b3f27>=0x0;_0x2b3f27--)(_0x5ae62d=_0x5b76af[_0x2b3f27])&&(_0x212e06=_0x5ae62d(_0x212e06)||_0x212e06);return _0x212e06;},_0x53d8e8=(_0x1c772e,_0x103248)=>(_0x52e093,_0x3f9101)=>_0x103248(_0x52e093,_0x3f9101,_0x1c772e);let _0x41b846=class extends _0x2b7b26[_0x1fa8bf(0x214)]{constructor(_0x25075f,_0x3e78a6,_0x497f13,_0x4a97eb){const _0x3338c1=_0x1fa8bf;super(),this[_0x3338c1(0x251)]=_0x25075f,this[_0x3338c1(0x22e)]=_0x3e78a6,this[_0x3338c1(0x1f1)]=_0x497f13,this[_0x3338c1(0x249)]=_0x4a97eb,this[_0x3338c1(0x1f8)](),this[_0x3338c1(0x1e9)]();}[_0x1fa8bf(0x1e9)](){const _0x500775=_0x1fa8bf;this[_0x500775(0x20c)](this[_0x500775(0x22e)][_0x500775(0x203)][_0x500775(0x24f)](_0x4926bf[_0x500775(0x256)](0x10))[_0x500775(0x23e)](_0x2aa8a6=>{const _0x29df71=new Set();_0x2aa8a6['forEach'](_0xdb4d7b=>{const _0x56887d=_0xf5d2;switch(_0xdb4d7b[_0x56887d(0x236)]){case'add':{const _0x976016=_0xdb4d7b[_0x56887d(0x22b)][_0x56887d(0x1ec)];_0x29df71[_0x56887d(0x235)](_0x976016);break;}}}),_0x55a38f(this['_injector'],_0x29df71);}));}[_0x1fa8bf(0x1f8)](){const _0x50712f=_0x1fa8bf;this[_0x50712f(0x20c)](this[_0x50712f(0x251)][_0x50712f(0x203)]['subscribe'](async _0x2d8452=>{const _0x4344ce=_0x50712f;var _0x6a502,_0x5eade0,_0x1c286f,_0x545575;const _0x18ea10=(_0x6a502=this['_threadCommentModel'][_0x4344ce(0x1e0)](_0x2d8452['unitId'])[_0x4344ce(0x1f5)](_0x275227=>_0x275227['threadId']===_0x2d8452[_0x4344ce(0x1eb)]))==null?void 0x0:_0x6a502[_0x4344ce(0x219)];if(!_0x18ea10)return;const {unitId:_0x22ce29,subUnitId:_0x5de082}=_0x18ea10;switch(_0x2d8452['user']&&this[_0x4344ce(0x1f1)][_0x4344ce(0x1e1)](_0x2d8452[_0x4344ce(0x22d)]),_0x2d8452[_0x4344ce(0x236)]){case _0x2d2ad4[_0x4344ce(0x24c)]:break;case _0x2d2ad4[_0x4344ce(0x1f9)]:{this[_0x4344ce(0x22e)]['addComment'](_0x22ce29,_0x5de082,{'unitId':_0x22ce29,'subUnitId':_0x5de082,'ref':'','id':_0x2d8452[_0x4344ce(0x1f6)],'dT':_0x1a9150(+_0x2d8452[_0x4344ce(0x247)]),'threadId':_0x2d8452['threadId'],'personId':(_0x1c286f=(_0x5eade0=_0x2d8452[_0x4344ce(0x22d)])==null?void 0x0:_0x5eade0[_0x4344ce(0x20b)])!=null?_0x1c286f:_0x2d8452[_0x4344ce(0x209)],'text':JSON['parse'](_0x2d8452['content']),'parentId':_0x18ea10['id']});break;}case _0x2d2ad4['Delete']:{const _0x5cdacf=this[_0x4344ce(0x22e)][_0x4344ce(0x238)](_0x22ce29,_0x5de082,_0x2d8452[_0x4344ce(0x1f6)]);_0x5cdacf&&_0x5cdacf[_0x4344ce(0x240)]&&this['_threadCommentModel'][_0x4344ce(0x202)](_0x22ce29,_0x5de082,_0x2d8452[_0x4344ce(0x1f6)]);break;}case _0x2d2ad4[_0x4344ce(0x221)]:{this[_0x4344ce(0x22e)][_0x4344ce(0x232)](_0x22ce29,_0x5de082,{'commentId':_0x2d8452[_0x4344ce(0x1f6)],'text':JSON['parse'](_0x2d8452[_0x4344ce(0x204)])});break;}case _0x2d2ad4[_0x4344ce(0x21e)]:{const _0x1577a5=(_0x545575=this[_0x4344ce(0x22e)][_0x4344ce(0x1e0)](_0x2d8452['unitId'])[_0x4344ce(0x1f5)](_0x598ef6=>_0x598ef6[_0x4344ce(0x1eb)]===_0x2d8452['threadId']))==null?void 0x0:_0x545575[_0x4344ce(0x219)];_0x1577a5&&this[_0x4344ce(0x22e)]['resolveComment'](_0x22ce29,_0x5de082,_0x1577a5['id'],_0x2d8452['solved']===_0x11b727[_0x4344ce(0x224)]);break;}}}));}};_0x41b846=_0x499480([_0x53d8e8(0x0,_0x2b7b26[_0x1fa8bf(0x21b)](_0x13c7fc[_0x1fa8bf(0x215)])),_0x53d8e8(0x1,_0x2b7b26[_0x1fa8bf(0x21b)](_0x581cc2[_0x1fa8bf(0x205)])),_0x53d8e8(0x2,_0x2b7b26[_0x1fa8bf(0x21b)](_0x2b7b26['UserManagerService'])),_0x53d8e8(0x3,_0x2b7b26[_0x1fa8bf(0x21b)](_0x2b7b26[_0x1fa8bf(0x1da)]))],_0x41b846);const _0x523f96=_0x1fa8bf(0x253),_0x4926f3={};var _0xfcc148=Object[_0x1fa8bf(0x1ea)],_0x18d461=(_0x4aef11,_0x436eec,_0x5d560a,_0x13ad5e)=>{const _0x25d71d=_0x1fa8bf;for(var _0x528f96=_0x13ad5e>0x1?void 0x0:_0x13ad5e?_0xfcc148(_0x436eec,_0x5d560a):_0x436eec,_0x16f624=_0x4aef11[_0x25d71d(0x21d)]-0x1,_0xf35302;_0x16f624>=0x0;_0x16f624--)(_0xf35302=_0x4aef11[_0x16f624])&&(_0x528f96=_0xf35302(_0x528f96)||_0x528f96);return _0x528f96;},_0x5453f0=(_0x18b657,_0x3922b2)=>(_0x54044f,_0x206e4e)=>_0x3922b2(_0x54044f,_0x206e4e,_0x18b657);function _0x21d1e1(_0x3ce8fb,_0x230efd){const _0x2c609f=_0x1fa8bf,_0x12c3ce=_0x3ce8fb[_0x2c609f(0x1fd)][0x0];return{..._0x230efd,'id':_0x12c3ce['replyId'],'resolved':_0x3ce8fb[_0x2c609f(0x22f)]===0x1,'dT':_0x1a9150(_0x12c3ce['createTimestamp']),'personId':_0x12c3ce['userId'],'threadId':_0x12c3ce[_0x2c609f(0x1eb)]};}function _0x277774(_0x3c0166,_0x2df6fe,_0x43c052){const _0x5d0691=_0x1fa8bf;var _0xc8db16,_0x4f0497;if(((_0x4f0497=(_0xc8db16=_0x3c0166==null?void 0x0:_0x3c0166[_0x5d0691(0x1fd)])==null?void 0x0:_0xc8db16['length'])!=null?_0x4f0497:0x0)>0x0){const _0xa88eca=(_0x57da30,_0x152f2a)=>({'id':_0x57da30['replyId'],'threadId':_0x57da30['threadId'],'dT':_0x1a9150(_0x57da30['createTimestamp']),'personId':_0x57da30[_0x5d0691(0x209)],'resolved':_0x3c0166[_0x5d0691(0x22f)]===_0x11b727['Solved'],'unitId':_0x2df6fe,'subUnitId':_0x43c052,'text':JSON[_0x5d0691(0x1ee)](_0x57da30[_0x5d0691(0x204)]),'parentId':_0x152f2a}),_0x29698d=_0xa88eca(_0x3c0166['replies'][0x0]);return{..._0x29698d,'children':_0x3c0166[_0x5d0691(0x1fd)]['slice'](0x1)[_0x5d0691(0x212)](_0x20b36c=>_0xa88eca(_0x20b36c,_0x29698d['id']))};}return null;}let _0x4e6ec2=class{constructor(_0x3cf3d0,_0x3ccb0e,_0x27cc87,_0x564e2d){const _0x174df2=_0x1fa8bf;this[_0x174df2(0x223)]=_0x3cf3d0,this['_userService']=_0x3ccb0e,this[_0x174df2(0x228)]=_0x27cc87,this[_0x174df2(0x249)]=_0x564e2d;}async[_0x1fa8bf(0x21a)](_0x191ff1){const _0x3696f8=_0x1fa8bf;var _0x186113,_0x16593d;const {parentId:_0x303e53,unitId:_0x437b1c,text:_0x4192cc,threadId:_0x51f30c}=_0x191ff1,_0x11d646=(_0x16593d=(_0x186113=_0x4192cc[_0x3696f8(0x257)])==null?void 0x0:_0x186113[_0x3696f8(0x207)](_0x582fb0=>_0x582fb0[_0x3696f8(0x220)]===_0x2b7b26['CustomRangeType'][_0x3696f8(0x216)])[_0x3696f8(0x212)](_0x5ead75=>_0x5ead75[_0x3696f8(0x252)]))!=null?_0x16593d:[],_0x4f88e3=JSON[_0x3696f8(0x20f)](_0x4192cc),_0x3d82b3=(await this['_sessionService'][_0x3696f8(0x23c)](_0x437b1c))[_0x3696f8(0x24e)]();if(_0x303e53){const _0x110f07={'memberId':_0x3d82b3,'unitId':_0x437b1c,'content':_0x4f88e3,'mention':_0x11d646,'threadId':_0x51f30c},_0x9c6600=(await this[_0x3696f8(0x223)]['post'](_0x3696f8(0x21f)+_0x437b1c+'/reply',{'body':_0x110f07}))[_0x3696f8(0x243)][_0x3696f8(0x1dd)];return{..._0x191ff1,'id':_0x9c6600['replyId'],'dT':_0x2b7b26[_0x3696f8(0x233)](+_0x9c6600['createTimestamp'])['format'](_0x3696f8(0x225)),'personId':_0x9c6600[_0x3696f8(0x209)]};}else{const _0x25ae66={'memberId':_0x3d82b3,'unitId':_0x437b1c,'content':_0x4f88e3,'mention':_0x11d646},_0x11c76e=await this[_0x3696f8(0x223)][_0x3696f8(0x1e4)](_0x3696f8(0x21f)+_0x437b1c+_0x3696f8(0x218),{'body':_0x25ae66});return _0x21d1e1(_0x11c76e[_0x3696f8(0x243)][_0x3696f8(0x222)],_0x191ff1);}}async[_0x1fa8bf(0x232)](_0x54b5ad){const _0x252980=_0x1fa8bf;var _0x2fb337,_0x3e88b4;const {text:_0x308ead,unitId:_0x40f86c}=_0x54b5ad,_0x403f4a=(_0x3e88b4=(_0x2fb337=_0x308ead[_0x252980(0x257)])==null?void 0x0:_0x2fb337[_0x252980(0x207)](_0x19cc95=>_0x19cc95[_0x252980(0x220)]===_0x2b7b26['CustomRangeType'][_0x252980(0x216)])[_0x252980(0x212)](_0x5b5bad=>_0x5b5bad['rangeId']))!=null?_0x3e88b4:[],_0x394df9=JSON[_0x252980(0x20f)](_0x308ead),_0x1d460c=_0x54b5ad[_0x252980(0x1eb)],_0x22b598=_0x54b5ad['id'],_0x4f8e9f={'memberId':(await this[_0x252980(0x228)]['requireSession'](_0x40f86c))['getMemberID'](),'unitId':_0x40f86c,'threadId':_0x1d460c,'mention':_0x403f4a,'content':_0x394df9,'replyId':_0x22b598},_0x36318d=await this[_0x252980(0x223)][_0x252980(0x1e4)]('/universer-api/comment/unit/'+_0x40f86c+'/edit',{'body':_0x4f8e9f});return!_0x36318d[_0x252980(0x243)][_0x252980(0x231)]||_0x36318d[_0x252980(0x243)][_0x252980(0x231)]['code']===0x1;}async['resolveComment'](_0xd5606b){const _0x447602=_0x1fa8bf,{unitId:_0x5b906e}=_0xd5606b,_0x284bfc=_0xd5606b['threadId'],_0x93c1d5={'memberId':this[_0x447602(0x1f1)][_0x447602(0x22c)]()[_0x447602(0x20b)],'unitId':_0x5b906e,'threadId':_0x284bfc,'solved':_0xd5606b['resolved']?_0x11b727[_0x447602(0x224)]:_0x11b727['OpenOrReOpen']},_0x4c031e=await this[_0x447602(0x223)][_0x447602(0x1e4)](_0x447602(0x21f)+_0x5b906e+_0x447602(0x21c),{'body':_0x93c1d5});return!_0x4c031e[_0x447602(0x243)]['error']||_0x4c031e[_0x447602(0x243)][_0x447602(0x231)][_0x447602(0x200)]===0x1;}async[_0x1fa8bf(0x202)](_0x43130f,_0x54ae11,_0x13edfa,_0x1e99a3){const _0x3d9c4c=_0x1fa8bf,_0x287229={'memberId':(await this[_0x3d9c4c(0x228)][_0x3d9c4c(0x23c)](_0x43130f))[_0x3d9c4c(0x24e)](),'threadId':_0x13edfa,'replyId':_0x1e99a3,'unitId':_0x43130f},_0xeb46f3=await this[_0x3d9c4c(0x223)][_0x3d9c4c(0x1e4)](_0x3d9c4c(0x21f)+_0x43130f+_0x3d9c4c(0x1ef),{'body':_0x287229});return!_0xeb46f3[_0x3d9c4c(0x243)][_0x3d9c4c(0x231)]||_0xeb46f3['body'][_0x3d9c4c(0x231)][_0x3d9c4c(0x200)]===0x1;}async['listComments'](_0x432cf1,_0x58e646,_0x447f7c){const _0x55cc34=_0x1fa8bf,_0x58ce35={'unitId':_0x432cf1,'threadId':_0x447f7c},_0x4a7547=await this[_0x55cc34(0x223)]['post'](_0x55cc34(0x21f)+_0x432cf1+_0x55cc34(0x229),{'body':_0x58ce35}),_0x1a6b12=_0x447f7c[_0x55cc34(0x212)](_0x285d11=>_0x277774(_0x4a7547[_0x55cc34(0x243)][_0x55cc34(0x1f2)][_0x285d11],_0x432cf1,_0x58e646))[_0x55cc34(0x207)](Boolean);return Object[_0x55cc34(0x1ed)](_0x4a7547[_0x55cc34(0x243)][_0x55cc34(0x210)])[_0x55cc34(0x1ff)](_0x419d15=>{const _0x461dfa=_0x55cc34;this['_userService'][_0x461dfa(0x1e1)](_0x419d15);}),_0x1a6b12;}['saveCommentToSnapshot'](_0x34eb2a){const _0x3e8c1e=_0x1fa8bf;return{'id':_0x34eb2a['id'],'threadId':_0x34eb2a['threadId'],'ref':_0x34eb2a[_0x3e8c1e(0x206)]};}};_0x4e6ec2=_0x18d461([_0x5453f0(0x0,_0x2b7b26[_0x1fa8bf(0x21b)](_0x17bd88[_0x1fa8bf(0x23a)])),_0x5453f0(0x1,_0x2b7b26['Inject'](_0x2b7b26['UserManagerService'])),_0x5453f0(0x2,_0x2b7b26[_0x1fa8bf(0x21b)](_0x13c7fc[_0x1fa8bf(0x1fa)])),_0x5453f0(0x3,_0x2b7b26[_0x1fa8bf(0x21b)](_0x2b7b26[_0x1fa8bf(0x1da)]))],_0x4e6ec2);var _0x2604bc=Object['getOwnPropertyDescriptor'],_0x4c2ad8=(_0x3d8694,_0x56d3f1,_0x304277,_0x1fdefb)=>{const _0x2e8d4c=_0x1fa8bf;for(var _0x2bde80=_0x1fdefb>0x1?void 0x0:_0x1fdefb?_0x2604bc(_0x56d3f1,_0x304277):_0x56d3f1,_0x3d1618=_0x3d8694[_0x2e8d4c(0x21d)]-0x1,_0x43f1a7;_0x3d1618>=0x0;_0x3d1618--)(_0x43f1a7=_0x3d8694[_0x3d1618])&&(_0x2bde80=_0x43f1a7(_0x2bde80)||_0x2bde80);return _0x2bde80;},_0x2783fa=(_0x12d78c,_0x25f955)=>(_0x2b31f3,_0x194e7b)=>_0x25f955(_0x2b31f3,_0x194e7b,_0x12d78c);let _0x7f1a3c=class extends _0x2b7b26['Disposable']{constructor(_0x3e513c,_0x13e02){const _0x65f25e=_0x1fa8bf;super(),this['_threadCommentDataSourceService']=_0x3e513c,this[_0x65f25e(0x1e6)]=_0x13e02,this[_0x65f25e(0x1e2)]();}[_0x1fa8bf(0x1e2)](){const _0x1aae67=_0x1fa8bf;this[_0x1aae67(0x217)][_0x1aae67(0x1fe)]=this['_threadCommentDataSource'],this[_0x1aae67(0x217)][_0x1aae67(0x211)]=!0x1;}};_0x7f1a3c=_0x4c2ad8([_0x2783fa(0x0,_0x581cc2[_0x1fa8bf(0x234)]),_0x2783fa(0x1,_0x2b7b26['Inject'](_0x4e6ec2))],_0x7f1a3c);var _0x4fa740=Object[_0x1fa8bf(0x20d)],_0x3f20ba=Object[_0x1fa8bf(0x1ea)],_0x5b9bb1=(_0x4d52fe,_0x23ed6f,_0x56ce40)=>_0x23ed6f in _0x4d52fe?_0x4fa740(_0x4d52fe,_0x23ed6f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56ce40}):_0x4d52fe[_0x23ed6f]=_0x56ce40,_0x5a150c=(_0x5362e2,_0xb3f031,_0x4b3843,_0xc6acb5)=>{const _0x178a90=_0x1fa8bf;for(var _0x4f2200=_0xc6acb5>0x1?void 0x0:_0xc6acb5?_0x3f20ba(_0xb3f031,_0x4b3843):_0xb3f031,_0x2a7849=_0x5362e2[_0x178a90(0x21d)]-0x1,_0x39135f;_0x2a7849>=0x0;_0x2a7849--)(_0x39135f=_0x5362e2[_0x2a7849])&&(_0x4f2200=_0x39135f(_0x4f2200)||_0x4f2200);return _0x4f2200;},_0x30ad2f=(_0x5ca67b,_0x199c12)=>(_0x258afa,_0x16ad3f)=>_0x199c12(_0x258afa,_0x16ad3f,_0x5ca67b),_0x14d77c=(_0x20034a,_0x3ced7e,_0x23edf6)=>_0x5b9bb1(_0x20034a,typeof _0x3ced7e!='symbol'?_0x3ced7e+'':_0x3ced7e,_0x23edf6);_0x326b84[_0x1fa8bf(0x1e7)]=class extends _0x2b7b26['Plugin']{constructor(_0x10723d=_0x4926f3,_0x5e5404,_0xdf4f73){const _0x30297e=_0x1fa8bf;super(),this[_0x30297e(0x227)]=_0x10723d,this[_0x30297e(0x249)]=_0x5e5404,this['_configService']=_0xdf4f73;const {..._0x16aac5}=_0x2b7b26[_0x30297e(0x213)]({},_0x4926f3,this['_config']);this[_0x30297e(0x23d)]['setConfig'](_0x523f96,_0x16aac5);}[_0x1fa8bf(0x23f)](){[[_0x4e6ec2],[_0x7f1a3c],[_0x41b846]]['forEach'](_0x40b976=>{const _0xdbddb3=_0xf5d2;this[_0xdbddb3(0x249)]['add'](_0x40b976);});}[_0x1fa8bf(0x241)](){const _0x11ea7a=_0x1fa8bf;this['_injector'][_0x11ea7a(0x20e)](_0x7f1a3c),this[_0x11ea7a(0x249)][_0x11ea7a(0x20e)](_0x41b846);}},_0x14d77c(_0x326b84['UniverThreadCommentDataSourcePlugin'],_0x1fa8bf(0x1df),_0x4f78f8),_0x14d77c(_0x326b84[_0x1fa8bf(0x1e7)],_0x1fa8bf(0x236),_0x2b7b26['UniverInstanceType'][_0x1fa8bf(0x1fb)]),_0x326b84[_0x1fa8bf(0x1e7)]=_0x5a150c([_0x2b7b26[_0x1fa8bf(0x25c)](_0x49389b['UniverThreadCommentUIPlugin'],_0x13c7fc[_0x1fa8bf(0x1f7)],_0xc9f437['UniverLicensePlugin']),_0x30ad2f(0x1,_0x2b7b26['Inject'](_0x2b7b26['Injector'])),_0x30ad2f(0x2,_0x2b7b26[_0x1fa8bf(0x250)])],_0x326b84[_0x1fa8bf(0x1e7)]),Object[_0x1fa8bf(0x20d)](_0x326b84,Symbol[_0x1fa8bf(0x201)],{'value':_0x1fa8bf(0x1db)});}));function _0xf5d2(_0x528d24,_0x242d73){const _0x3d2ee0=_0x3d2e();return _0xf5d2=function(_0xf5d2cc,_0x4bd414){_0xf5d2cc=_0xf5d2cc-0x1da;let _0x11ecfa=_0x3d2ee0[_0xf5d2cc];return _0x11ecfa;},_0xf5d2(_0x528d24,_0x242d73);}function _0x3d2e(){const _0x76e7b5=['body','5798336DKweax','UniverProCollaborationClient','UNRECOGNIZED','createTimestamp','OpenOrReOpen','_injector','1673052izwGPf','UniverThreadComment','Add','delete','getMemberID','pipe','IConfigService','_commentService','rangeId','thread-comment-data-source.config','3473975nprMhA','rxjs','bufferTime','customRanges','674lLmHdT','exports','UniverNetwork','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','10407xfesoy','Injector','Module','UniverProLicense','reply','5237253PoGCkO','pluginName','getUnit','addUser','_initDataSource','@univerjs/network','post','UniverThreadCommentUi','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','UniverCore','_initUserSync','getOwnPropertyDescriptor','threadId','personId','values','parse','/delete','Delete','_userService','comments','@univerjs/thread-comment','amd','find','replyId','UniverCollaborationClientPlugin','_init','Reply','CollaborationSessionService','UNIVER_UNKNOWN','size','replies','dataSource','forEach','code','toStringTag','deleteComment','commentUpdate$','content','ThreadCommentModel','ref','filter','/universer-api/user/list','userId','1105948uiERxh','userID','disposeWithMe','defineProperty','get','stringify','users','syncUpdateMutationToColla','map','merge','Disposable','CommentService','COMMENT','_threadCommentDataSourceService','/add','root','addComment','Inject','/solved','length','Solve','/universer-api/comment/unit/','rangeType','Edit','comment','_httpService','Solved','YYYY/MM/DD\x20HH:mm','format','_config','_sessionService','/list','@univerjs/core','payload','getCurrentUser','user','_threadCommentModel','solved','getUser','error','updateComment','dayjs','IThreadCommentDataSourceService','add','type','function','getComment','@univerjs/thread-comment-ui','HTTPService','Unknown','requireSession','_configService','subscribe','onStarting','parentId','onReady','2448402KDRxyZ'];_0x3d2e=function(){return _0x76e7b5;};return _0x3d2e();}
1
+ function _0x2459(){const _0x57dd7e=['map','dayjs','DependentOn','stringify','/list','/universer-api/comment/unit/','UniverProLicense','comments','UniverNetwork','onReady','@univerjs/core','getUnit','parse','error','rangeId','saveCommentToSnapshot','_userService','getComment','UniverThreadCommentUIPlugin','Injector','userId','exports','getUser','listComments','COMMENT','Module','getMemberID','Delete','HTTPService','UNRECOGNIZED','slice','symbol','CommentService','/delete','_config','parentId','_sessionService','replies','rangeType','users','UNIVER_UNKNOWN','IThreadCommentDataSourceService','482386wCIDmb','_injector','post','addUser','UniverThreadCommentDataSourcePlugin','toStringTag','filter','pipe','728664kmXQMt','_commentService','thread-comment-data-source.config','resolveComment','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','values','UserManagerService','@univerjs-pro/collaboration-client','_initUserSync','@univerjs-pro/license','Solved','payload','4240313eYbUDX','root','Inject','Disposable','setConfig','_init','merge','IConfigService','_threadCommentDataSourceService','UniverProCollaborationClient','body','_httpService','customRanges','threadId','delete','_initDataSource','updateComment','comment','/universer-api/user/list','24wKIEqW','content','pluginName','/solved','ThreadCommentModel','commentUpdate$','ref','9943704QaDnSC','OpenOrReOpen','get','code','12712912JpkpRB','_threadCommentDataSource','unitId','createTimestamp','@univerjs/thread-comment-ui','getCurrentUser','amd','UniverThreadComment','Edit','defineProperty','type','UniverProThreadCommentDatasource','Add','5jPYalI','1393286aWqKXe','requireSession','add','rxjs','addComment','Solve','format','size','_threadCommentModel','forEach','_configService','CollaborationSessionService','UniverCore','user','resolved','subscribe','3917556XlHxzA','solved','syncUpdateMutationToColla','deleteComment','reply','/reply','userID','disposeWithMe','onStarting','length','getOwnPropertyDescriptor','bufferTime','Reply','find','Unknown','replyId'];_0x2459=function(){return _0x57dd7e;};return _0x2459();}function _0x5808(_0x1f92e2,_0x2a98bb){const _0x24594e=_0x2459();return _0x5808=function(_0x580833,_0x35d2d8){_0x580833=_0x580833-0x1dc;let _0x46c27a=_0x24594e[_0x580833];return _0x46c27a;},_0x5808(_0x1f92e2,_0x2a98bb);}(function(_0x3e389f,_0x19f43a){const _0x52effb=_0x5808,_0x17eb8c=_0x3e389f();while(!![]){try{const _0x15d312=-parseInt(_0x52effb(0x1f2))/0x1+-parseInt(_0x52effb(0x23c))/0x2+parseInt(_0x52effb(0x264))/0x3*(parseInt(_0x52effb(0x244))/0x4)+parseInt(_0x52effb(0x1f1))/0x5*(parseInt(_0x52effb(0x1e0))/0x6)+parseInt(_0x52effb(0x251))/0x7+-parseInt(_0x52effb(0x1e4))/0x8+parseInt(_0x52effb(0x202))/0x9;if(_0x15d312===_0x19f43a)break;else _0x17eb8c['push'](_0x17eb8c['shift']());}catch(_0x5d059e){_0x17eb8c['push'](_0x17eb8c['shift']());}}}(_0x2459,0xe38de),function(_0xe76928,_0x305acc){const _0x286e4b=_0x5808;typeof exports=='object'&&typeof module<'u'?_0x305acc(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x286e4b(0x1ea)]?define([_0x286e4b(0x227),_0x286e4b(0x24c),_0x286e4b(0x24e),_0x286e4b(0x21c),_0x286e4b(0x1e8),'@univerjs/thread-comment',_0x286e4b(0x1f5),'@univerjs/network'],_0x305acc):(_0xe76928=typeof globalThis<'u'?globalThis:_0xe76928||self,_0x305acc(_0xe76928[_0x286e4b(0x1ef)]={},_0xe76928[_0x286e4b(0x25a)],_0xe76928[_0x286e4b(0x218)],_0xe76928[_0x286e4b(0x1fe)],_0xe76928['UniverThreadCommentUi'],_0xe76928[_0x286e4b(0x1eb)],_0xe76928[_0x286e4b(0x1f5)],_0xe76928[_0x286e4b(0x21a)]));}(this,function(_0x2bb25f,_0x16a5d5,_0x49481d,_0x55170a,_0x41bf77,_0x229cda,_0x409949,_0x2ab838){'use strict';const _0x677f04=_0x5808;const _0x59e29c='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3972c1=(_0x3c7bfb=>(_0x3c7bfb[_0x3c7bfb[_0x677f04(0x1e1)]=0x0]='OpenOrReOpen',_0x3c7bfb[_0x3c7bfb['Solved']=0x1]=_0x677f04(0x24f),_0x3c7bfb[_0x3c7bfb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3c7bfb))(_0x3972c1||{}),_0x2f7755=(_0x32d046=>(_0x32d046[_0x32d046[_0x677f04(0x210)]=0x0]=_0x677f04(0x210),_0x32d046[_0x32d046['Add']=0x1]=_0x677f04(0x1f0),_0x32d046[_0x32d046[_0x677f04(0x20e)]=0x2]=_0x677f04(0x20e),_0x32d046[_0x32d046[_0x677f04(0x1ec)]=0x3]=_0x677f04(0x1ec),_0x32d046[_0x32d046[_0x677f04(0x22d)]=0x4]='Delete',_0x32d046[_0x32d046['Solve']=0x5]=_0x677f04(0x1f7),_0x32d046[_0x32d046[_0x677f04(0x22f)]=-0x1]='UNRECOGNIZED',_0x32d046))(_0x2f7755||{});const _0x5d25af=_0x1b7d3e=>_0x55170a[_0x677f04(0x213)](new Date(+_0x1b7d3e))[_0x677f04(0x1f8)](_0x677f04(0x249)),_0x1a2cf2=async(_0x3adf8b,_0x1e7fec)=>{const _0x4fc4ce=_0x677f04,_0x4a92bf=_0x3adf8b[_0x4fc4ce(0x1e2)](_0x55170a[_0x4fc4ce(0x24b)]),_0x35af33=_0x3adf8b[_0x4fc4ce(0x1e2)](_0x2ab838[_0x4fc4ce(0x22e)]);_0x1e7fec[_0x4fc4ce(0x1fb)](_0x253085=>{const _0x38cca5=_0x4fc4ce;_0x4a92bf[_0x38cca5(0x228)](_0x253085)&&_0x1e7fec[_0x38cca5(0x25f)](_0x253085);}),_0x1e7fec[_0x4fc4ce(0x1f9)]&&(await _0x35af33[_0x4fc4ce(0x1e2)](_0x4fc4ce(0x263),{'params':{'userIDs':[..._0x1e7fec]}}))['body'][_0x4fc4ce(0x239)]['forEach'](_0x43f49c=>{const _0x9ad891=_0x4fc4ce;_0x43f49c&&_0x4a92bf[_0x9ad891(0x23f)](_0x43f49c);});};var _0x357315=Object[_0x677f04(0x20c)],_0x12d80f=(_0x5238f7,_0x3ce488,_0x2e3d8d,_0x22d7be)=>{for(var _0x50c2d8=_0x22d7be>0x1?void 0x0:_0x22d7be?_0x357315(_0x3ce488,_0x2e3d8d):_0x3ce488,_0x49bc66=_0x5238f7['length']-0x1,_0x4023a7;_0x49bc66>=0x0;_0x49bc66--)(_0x4023a7=_0x5238f7[_0x49bc66])&&(_0x50c2d8=_0x4023a7(_0x50c2d8)||_0x50c2d8);return _0x50c2d8;},_0x2c2403=(_0x447b95,_0x3f051c)=>(_0x3355fb,_0x3d9e65)=>_0x3f051c(_0x3355fb,_0x3d9e65,_0x447b95);let _0x2b08e9=class extends _0x55170a[_0x677f04(0x254)]{constructor(_0xb448f8,_0x4b7434,_0x4ce51a,_0x362e02){const _0x18f46e=_0x677f04;super(),this[_0x18f46e(0x245)]=_0xb448f8,this[_0x18f46e(0x1fa)]=_0x4b7434,this[_0x18f46e(0x222)]=_0x4ce51a,this[_0x18f46e(0x23d)]=_0x362e02,this['_init'](),this['_initUserSync']();}[_0x677f04(0x24d)](){const _0x545aa1=_0x677f04;this['disposeWithMe'](this[_0x545aa1(0x1fa)][_0x545aa1(0x1de)][_0x545aa1(0x243)](_0x409949[_0x545aa1(0x20d)](0x10))[_0x545aa1(0x201)](_0x28097c=>{const _0x159ec6=_0x545aa1,_0xeb604a=new Set();_0x28097c['forEach'](_0x210b25=>{const _0x28d110=_0x5808;switch(_0x210b25[_0x28d110(0x1ee)]){case _0x28d110(0x1f4):{const _0x211fd8=_0x210b25[_0x28d110(0x250)]['personId'];_0xeb604a[_0x28d110(0x1f4)](_0x211fd8);break;}}}),_0x1a2cf2(this[_0x159ec6(0x23d)],_0xeb604a);}));}[_0x677f04(0x256)](){const _0x2b76ce=_0x677f04;this[_0x2b76ce(0x209)](this['_commentService'][_0x2b76ce(0x1de)][_0x2b76ce(0x201)](async _0x1b5af8=>{const _0x1cadd8=_0x2b76ce;var _0x505cd3,_0x9855d6,_0x3785b1,_0x531daf;const _0x30a111=(_0x505cd3=this[_0x1cadd8(0x1fa)][_0x1cadd8(0x21d)](_0x1b5af8[_0x1cadd8(0x1e6)])[_0x1cadd8(0x20f)](_0x2affdc=>_0x2affdc[_0x1cadd8(0x25e)]===_0x1b5af8[_0x1cadd8(0x25e)]))==null?void 0x0:_0x505cd3['root'];if(!_0x30a111)return;const {unitId:_0x4996ac,subUnitId:_0x36a355}=_0x30a111;switch(_0x1b5af8[_0x1cadd8(0x1ff)]&&this[_0x1cadd8(0x222)][_0x1cadd8(0x23f)](_0x1b5af8[_0x1cadd8(0x1ff)]),_0x1b5af8[_0x1cadd8(0x1ee)]){case _0x2f7755[_0x1cadd8(0x1f0)]:break;case _0x2f7755[_0x1cadd8(0x20e)]:{this[_0x1cadd8(0x1fa)][_0x1cadd8(0x1f6)](_0x4996ac,_0x36a355,{'unitId':_0x4996ac,'subUnitId':_0x36a355,'ref':'','id':_0x1b5af8[_0x1cadd8(0x211)],'dT':_0x5d25af(+_0x1b5af8[_0x1cadd8(0x1e7)]),'threadId':_0x1b5af8['threadId'],'personId':(_0x3785b1=(_0x9855d6=_0x1b5af8[_0x1cadd8(0x1ff)])==null?void 0x0:_0x9855d6[_0x1cadd8(0x208)])!=null?_0x3785b1:_0x1b5af8[_0x1cadd8(0x226)],'text':JSON[_0x1cadd8(0x21e)](_0x1b5af8[_0x1cadd8(0x265)]),'parentId':_0x30a111['id']});break;}case _0x2f7755[_0x1cadd8(0x22d)]:{const _0x4c66eb=this[_0x1cadd8(0x1fa)][_0x1cadd8(0x223)](_0x4996ac,_0x36a355,_0x1b5af8['replyId']);_0x4c66eb&&_0x4c66eb[_0x1cadd8(0x235)]&&this[_0x1cadd8(0x1fa)][_0x1cadd8(0x205)](_0x4996ac,_0x36a355,_0x1b5af8[_0x1cadd8(0x211)]);break;}case _0x2f7755[_0x1cadd8(0x1ec)]:{this[_0x1cadd8(0x1fa)][_0x1cadd8(0x261)](_0x4996ac,_0x36a355,{'commentId':_0x1b5af8[_0x1cadd8(0x211)],'text':JSON[_0x1cadd8(0x21e)](_0x1b5af8[_0x1cadd8(0x265)])});break;}case _0x2f7755[_0x1cadd8(0x1f7)]:{const _0x2dd4f5=(_0x531daf=this[_0x1cadd8(0x1fa)]['getUnit'](_0x1b5af8[_0x1cadd8(0x1e6)])[_0x1cadd8(0x20f)](_0x4a427a=>_0x4a427a['threadId']===_0x1b5af8[_0x1cadd8(0x25e)]))==null?void 0x0:_0x531daf[_0x1cadd8(0x252)];_0x2dd4f5&&this[_0x1cadd8(0x1fa)][_0x1cadd8(0x247)](_0x4996ac,_0x36a355,_0x2dd4f5['id'],_0x1b5af8[_0x1cadd8(0x203)]===_0x3972c1[_0x1cadd8(0x24f)]);break;}}}));}};_0x2b08e9=_0x12d80f([_0x2c2403(0x0,_0x55170a[_0x677f04(0x253)](_0x16a5d5[_0x677f04(0x232)])),_0x2c2403(0x1,_0x55170a[_0x677f04(0x253)](_0x229cda[_0x677f04(0x1dd)])),_0x2c2403(0x2,_0x55170a[_0x677f04(0x253)](_0x55170a['UserManagerService'])),_0x2c2403(0x3,_0x55170a[_0x677f04(0x253)](_0x55170a[_0x677f04(0x225)]))],_0x2b08e9);const _0x238f63=_0x677f04(0x246),_0x2df36f={};var _0x40d3f1=Object[_0x677f04(0x20c)],_0x172d33=(_0x190034,_0x2bd088,_0x2002c0,_0x30e9e9)=>{const _0x56bb8e=_0x677f04;for(var _0x5295b4=_0x30e9e9>0x1?void 0x0:_0x30e9e9?_0x40d3f1(_0x2bd088,_0x2002c0):_0x2bd088,_0x2bedc8=_0x190034[_0x56bb8e(0x20b)]-0x1,_0x33f639;_0x2bedc8>=0x0;_0x2bedc8--)(_0x33f639=_0x190034[_0x2bedc8])&&(_0x5295b4=_0x33f639(_0x5295b4)||_0x5295b4);return _0x5295b4;},_0x87d388=(_0x7e920d,_0x164075)=>(_0x4c0f44,_0x4f023d)=>_0x164075(_0x4c0f44,_0x4f023d,_0x7e920d);function _0x5dbb96(_0x44203e,_0x12312b){const _0x50371a=_0x677f04,_0x2be319=_0x44203e[_0x50371a(0x237)][0x0];return{..._0x12312b,'id':_0x2be319[_0x50371a(0x211)],'resolved':_0x44203e[_0x50371a(0x203)]===0x1,'dT':_0x5d25af(_0x2be319['createTimestamp']),'personId':_0x2be319['userId'],'threadId':_0x2be319['threadId']};}function _0x5bfb4c(_0x2b37bd,_0x48ea91,_0x1d97e6){const _0x3c8160=_0x677f04;var _0xd34e5f,_0x16396e;if(((_0x16396e=(_0xd34e5f=_0x2b37bd==null?void 0x0:_0x2b37bd['replies'])==null?void 0x0:_0xd34e5f[_0x3c8160(0x20b)])!=null?_0x16396e:0x0)>0x0){const _0x5eddd3=(_0x48a0e2,_0x206f72)=>({'id':_0x48a0e2[_0x3c8160(0x211)],'threadId':_0x48a0e2[_0x3c8160(0x25e)],'dT':_0x5d25af(_0x48a0e2['createTimestamp']),'personId':_0x48a0e2['userId'],'resolved':_0x2b37bd[_0x3c8160(0x203)]===_0x3972c1[_0x3c8160(0x24f)],'unitId':_0x48ea91,'subUnitId':_0x1d97e6,'text':JSON['parse'](_0x48a0e2[_0x3c8160(0x265)]),'parentId':_0x206f72}),_0x959663=_0x5eddd3(_0x2b37bd['replies'][0x0]);return{..._0x959663,'children':_0x2b37bd[_0x3c8160(0x237)][_0x3c8160(0x230)](0x1)[_0x3c8160(0x212)](_0x16cc29=>_0x5eddd3(_0x16cc29,_0x959663['id']))};}return null;}let _0x4cd70d=class{constructor(_0x4639c0,_0x27f082,_0x294e5f,_0xf8e09){const _0x406dd2=_0x677f04;this[_0x406dd2(0x25c)]=_0x4639c0,this[_0x406dd2(0x222)]=_0x27f082,this[_0x406dd2(0x236)]=_0x294e5f,this['_injector']=_0xf8e09;}async[_0x677f04(0x1f6)](_0x2ca706){const _0x4c86d6=_0x677f04;var _0x33c5e8,_0x3d5803;const {parentId:_0x2a4248,unitId:_0x31e494,text:_0x3de8c4,threadId:_0x149cb3}=_0x2ca706,_0x27257b=(_0x3d5803=(_0x33c5e8=_0x3de8c4[_0x4c86d6(0x25d)])==null?void 0x0:_0x33c5e8['filter'](_0x20e5fc=>_0x20e5fc[_0x4c86d6(0x238)]===_0x55170a['CustomRangeType'][_0x4c86d6(0x22a)])[_0x4c86d6(0x212)](_0x339925=>_0x339925[_0x4c86d6(0x220)]))!=null?_0x3d5803:[],_0x4b8d8b=JSON[_0x4c86d6(0x215)](_0x3de8c4),_0x318f6d=(await this[_0x4c86d6(0x236)]['requireSession'](_0x31e494))[_0x4c86d6(0x22c)]();if(_0x2a4248){const _0x2ff053={'memberId':_0x318f6d,'unitId':_0x31e494,'content':_0x4b8d8b,'mention':_0x27257b,'threadId':_0x149cb3},_0x116916=(await this[_0x4c86d6(0x25c)]['post'](_0x4c86d6(0x217)+_0x31e494+_0x4c86d6(0x207),{'body':_0x2ff053}))[_0x4c86d6(0x25b)][_0x4c86d6(0x206)];return{..._0x2ca706,'id':_0x116916['replyId'],'dT':_0x55170a[_0x4c86d6(0x213)](+_0x116916[_0x4c86d6(0x1e7)])[_0x4c86d6(0x1f8)](_0x4c86d6(0x249)),'personId':_0x116916[_0x4c86d6(0x226)]};}else{const _0x3dd902={'memberId':_0x318f6d,'unitId':_0x31e494,'content':_0x4b8d8b,'mention':_0x27257b},_0x29c623=await this[_0x4c86d6(0x25c)][_0x4c86d6(0x23e)](_0x4c86d6(0x217)+_0x31e494+'/add',{'body':_0x3dd902});return _0x5dbb96(_0x29c623['body'][_0x4c86d6(0x262)],_0x2ca706);}}async[_0x677f04(0x261)](_0x4c5a3e){const _0xa88396=_0x677f04;var _0x279150,_0x21be5d;const {text:_0x4403ff,unitId:_0x14742b}=_0x4c5a3e,_0x4955d9=(_0x21be5d=(_0x279150=_0x4403ff[_0xa88396(0x25d)])==null?void 0x0:_0x279150[_0xa88396(0x242)](_0x370f72=>_0x370f72[_0xa88396(0x238)]===_0x55170a['CustomRangeType']['COMMENT'])[_0xa88396(0x212)](_0x5d6ba1=>_0x5d6ba1[_0xa88396(0x220)]))!=null?_0x21be5d:[],_0x49b758=JSON[_0xa88396(0x215)](_0x4403ff),_0x5c5262=_0x4c5a3e['threadId'],_0x12add6=_0x4c5a3e['id'],_0x6dfd9e={'memberId':(await this[_0xa88396(0x236)][_0xa88396(0x1f3)](_0x14742b))[_0xa88396(0x22c)](),'unitId':_0x14742b,'threadId':_0x5c5262,'mention':_0x4955d9,'content':_0x49b758,'replyId':_0x12add6},_0x2c43f6=await this['_httpService'][_0xa88396(0x23e)]('/universer-api/comment/unit/'+_0x14742b+'/edit',{'body':_0x6dfd9e});return!_0x2c43f6[_0xa88396(0x25b)]['error']||_0x2c43f6[_0xa88396(0x25b)][_0xa88396(0x21f)][_0xa88396(0x1e3)]===0x1;}async[_0x677f04(0x247)](_0x5b1aa1){const _0x1cf1cf=_0x677f04,{unitId:_0x38a473}=_0x5b1aa1,_0x3a80a6=_0x5b1aa1[_0x1cf1cf(0x25e)],_0x1f5045={'memberId':this[_0x1cf1cf(0x222)][_0x1cf1cf(0x1e9)]()['userID'],'unitId':_0x38a473,'threadId':_0x3a80a6,'solved':_0x5b1aa1[_0x1cf1cf(0x200)]?_0x3972c1[_0x1cf1cf(0x24f)]:_0x3972c1[_0x1cf1cf(0x1e1)]},_0x356e64=await this[_0x1cf1cf(0x25c)][_0x1cf1cf(0x23e)]('/universer-api/comment/unit/'+_0x38a473+_0x1cf1cf(0x1dc),{'body':_0x1f5045});return!_0x356e64[_0x1cf1cf(0x25b)][_0x1cf1cf(0x21f)]||_0x356e64['body']['error'][_0x1cf1cf(0x1e3)]===0x1;}async['deleteComment'](_0x3cea75,_0x256790,_0x351a00,_0x5cb5fb){const _0x4267ea=_0x677f04,_0x172919={'memberId':(await this[_0x4267ea(0x236)][_0x4267ea(0x1f3)](_0x3cea75))[_0x4267ea(0x22c)](),'threadId':_0x351a00,'replyId':_0x5cb5fb,'unitId':_0x3cea75},_0x5fcc9a=await this[_0x4267ea(0x25c)][_0x4267ea(0x23e)](_0x4267ea(0x217)+_0x3cea75+_0x4267ea(0x233),{'body':_0x172919});return!_0x5fcc9a[_0x4267ea(0x25b)][_0x4267ea(0x21f)]||_0x5fcc9a[_0x4267ea(0x25b)][_0x4267ea(0x21f)][_0x4267ea(0x1e3)]===0x1;}async[_0x677f04(0x229)](_0x1c8cb8,_0x395aca,_0x1b75e8){const _0x34de5e=_0x677f04,_0x3bcc8d={'unitId':_0x1c8cb8,'threadId':_0x1b75e8},_0x451d20=await this[_0x34de5e(0x25c)][_0x34de5e(0x23e)](_0x34de5e(0x217)+_0x1c8cb8+_0x34de5e(0x216),{'body':_0x3bcc8d}),_0x28749b=_0x1b75e8[_0x34de5e(0x212)](_0x56f9b8=>_0x5bfb4c(_0x451d20[_0x34de5e(0x25b)][_0x34de5e(0x219)][_0x56f9b8],_0x1c8cb8,_0x395aca))[_0x34de5e(0x242)](Boolean);return Object[_0x34de5e(0x24a)](_0x451d20[_0x34de5e(0x25b)][_0x34de5e(0x239)])[_0x34de5e(0x1fb)](_0x1fdbfc=>{const _0x37ecf1=_0x34de5e;this[_0x37ecf1(0x222)]['addUser'](_0x1fdbfc);}),_0x28749b;}[_0x677f04(0x221)](_0x2cca80){const _0x32302a=_0x677f04;return{'id':_0x2cca80['id'],'threadId':_0x2cca80[_0x32302a(0x25e)],'ref':_0x2cca80[_0x32302a(0x1df)]};}};_0x4cd70d=_0x172d33([_0x87d388(0x0,_0x55170a[_0x677f04(0x253)](_0x2ab838['HTTPService'])),_0x87d388(0x1,_0x55170a[_0x677f04(0x253)](_0x55170a[_0x677f04(0x24b)])),_0x87d388(0x2,_0x55170a['Inject'](_0x16a5d5[_0x677f04(0x1fd)])),_0x87d388(0x3,_0x55170a['Inject'](_0x55170a[_0x677f04(0x225)]))],_0x4cd70d);var _0x381e7b=Object[_0x677f04(0x20c)],_0x3035e8=(_0x1a31a7,_0x226152,_0x16b5ab,_0x4c093f)=>{const _0x43f727=_0x677f04;for(var _0x478322=_0x4c093f>0x1?void 0x0:_0x4c093f?_0x381e7b(_0x226152,_0x16b5ab):_0x226152,_0x5cdfa1=_0x1a31a7[_0x43f727(0x20b)]-0x1,_0xb28325;_0x5cdfa1>=0x0;_0x5cdfa1--)(_0xb28325=_0x1a31a7[_0x5cdfa1])&&(_0x478322=_0xb28325(_0x478322)||_0x478322);return _0x478322;},_0x5439a1=(_0x383df9,_0x59e1a0)=>(_0x3c856b,_0x441754)=>_0x59e1a0(_0x3c856b,_0x441754,_0x383df9);let _0x1466eb=class extends _0x55170a[_0x677f04(0x254)]{constructor(_0xadac9e,_0x2c01d4){const _0x1eadb2=_0x677f04;super(),this[_0x1eadb2(0x259)]=_0xadac9e,this[_0x1eadb2(0x1e5)]=_0x2c01d4,this[_0x1eadb2(0x260)]();}['_initDataSource'](){const _0x268c93=_0x677f04;this[_0x268c93(0x259)]['dataSource']=this[_0x268c93(0x1e5)],this[_0x268c93(0x259)][_0x268c93(0x204)]=!0x1;}};_0x1466eb=_0x3035e8([_0x5439a1(0x0,_0x229cda[_0x677f04(0x23b)]),_0x5439a1(0x1,_0x55170a[_0x677f04(0x253)](_0x4cd70d))],_0x1466eb);var _0x2f09f8=Object['defineProperty'],_0x16bb81=Object[_0x677f04(0x20c)],_0xc34ba8=(_0x230293,_0x24692e,_0x59f67f)=>_0x24692e in _0x230293?_0x2f09f8(_0x230293,_0x24692e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f67f}):_0x230293[_0x24692e]=_0x59f67f,_0x58cf89=(_0x4d2ced,_0x50ada5,_0x929143,_0x4498ad)=>{for(var _0x15c302=_0x4498ad>0x1?void 0x0:_0x4498ad?_0x16bb81(_0x50ada5,_0x929143):_0x50ada5,_0x1b4911=_0x4d2ced['length']-0x1,_0x4dc434;_0x1b4911>=0x0;_0x1b4911--)(_0x4dc434=_0x4d2ced[_0x1b4911])&&(_0x15c302=_0x4dc434(_0x15c302)||_0x15c302);return _0x15c302;},_0x3ff931=(_0x1ff3e5,_0x55f4c1)=>(_0x961f46,_0x440b10)=>_0x55f4c1(_0x961f46,_0x440b10,_0x1ff3e5),_0x2a8ec6=(_0x3386ee,_0x2eaea5,_0x525547)=>_0xc34ba8(_0x3386ee,typeof _0x2eaea5!=_0x677f04(0x231)?_0x2eaea5+'':_0x2eaea5,_0x525547);_0x2bb25f[_0x677f04(0x240)]=class extends _0x55170a['Plugin']{constructor(_0x2d3368=_0x2df36f,_0x5e67d7,_0x261ffc){const _0x248f0c=_0x677f04;super(),this[_0x248f0c(0x234)]=_0x2d3368,this[_0x248f0c(0x23d)]=_0x5e67d7,this[_0x248f0c(0x1fc)]=_0x261ffc;const {..._0x15393e}=_0x55170a[_0x248f0c(0x257)]({},_0x2df36f,this[_0x248f0c(0x234)]);this['_configService'][_0x248f0c(0x255)](_0x238f63,_0x15393e);}[_0x677f04(0x20a)](){const _0x35bbe0=_0x677f04;[[_0x4cd70d],[_0x1466eb],[_0x2b08e9]][_0x35bbe0(0x1fb)](_0x4b889f=>{const _0x19072e=_0x35bbe0;this[_0x19072e(0x23d)]['add'](_0x4b889f);});}[_0x677f04(0x21b)](){const _0x55ddeb=_0x677f04;this[_0x55ddeb(0x23d)]['get'](_0x1466eb),this[_0x55ddeb(0x23d)][_0x55ddeb(0x1e2)](_0x2b08e9);}},_0x2a8ec6(_0x2bb25f['UniverThreadCommentDataSourcePlugin'],_0x677f04(0x266),_0x59e29c),_0x2a8ec6(_0x2bb25f[_0x677f04(0x240)],_0x677f04(0x1ee),_0x55170a['UniverInstanceType'][_0x677f04(0x23a)]),_0x2bb25f[_0x677f04(0x240)]=_0x58cf89([_0x55170a[_0x677f04(0x214)](_0x41bf77[_0x677f04(0x224)],_0x16a5d5['UniverCollaborationClientPlugin'],_0x49481d[_0x677f04(0x248)]),_0x3ff931(0x1,_0x55170a[_0x677f04(0x253)](_0x55170a[_0x677f04(0x225)])),_0x3ff931(0x2,_0x55170a[_0x677f04(0x258)])],_0x2bb25f[_0x677f04(0x240)]),Object[_0x677f04(0x1ed)](_0x2bb25f,Symbol[_0x677f04(0x241)],{'value':_0x677f04(0x22b)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1-nightly.202507081607",
3
+ "version": "0.9.1-nightly.202507091606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507081607",
49
- "@univerjs-pro/license": "0.9.1-nightly.202507081607",
50
- "@univerjs/core": "0.9.1-nightly.202507081607",
51
- "@univerjs/thread-comment": "0.9.1-nightly.202507081607",
52
- "@univerjs/network": "0.9.1-nightly.202507081607",
48
+ "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507091606",
49
+ "@univerjs-pro/license": "0.9.1-nightly.202507091606",
50
+ "@univerjs/core": "0.9.1-nightly.202507091606",
51
+ "@univerjs/network": "0.9.1-nightly.202507091606",
53
52
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.9.1-nightly.202507081607"
53
+ "@univerjs/thread-comment": "0.9.1-nightly.202507091606",
54
+ "@univerjs/thread-comment-ui": "0.9.1-nightly.202507091606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",