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

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 _0x4978c9=_0x3d3e;(function(_0x2ccb2f,_0xbc4746){const _0x9d60f5=_0x3d3e,_0xa0d428=_0x2ccb2f();while(!![]){try{const _0x5bbbc4=-parseInt(_0x9d60f5(0x127))/0x1+parseInt(_0x9d60f5(0x144))/0x2+parseInt(_0x9d60f5(0x163))/0x3+-parseInt(_0x9d60f5(0x114))/0x4*(parseInt(_0x9d60f5(0x157))/0x5)+parseInt(_0x9d60f5(0x13f))/0x6*(parseInt(_0x9d60f5(0x130))/0x7)+parseInt(_0x9d60f5(0x138))/0x8*(-parseInt(_0x9d60f5(0x111))/0x9)+-parseInt(_0x9d60f5(0x113))/0xa*(-parseInt(_0x9d60f5(0x11d))/0xb);if(_0x5bbbc4===_0xbc4746)break;else _0xa0d428['push'](_0xa0d428['shift']());}catch(_0x4846be){_0xa0d428['push'](_0xa0d428['shift']());}}}(_0x3a3e,0x783df));Object[_0x4978c9(0xfb)](exports,Symbol[_0x4978c9(0x12f)],{'value':_0x4978c9(0xfe)});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=_0x4978c9(0x171);function _0x3d3e(_0x5b6ce2,_0x5e9623){const _0x3a3e6c=_0x3a3e();return _0x3d3e=function(_0x3d3e32,_0xbf01e5){_0x3d3e32=_0x3d3e32-0xfb;let _0x57ddb3=_0x3a3e6c[_0x3d3e32];return _0x57ddb3;},_0x3d3e(_0x5b6ce2,_0x5e9623);}var I=(_0x33f390=>(_0x33f390[_0x33f390[_0x4978c9(0x137)]=0x0]=_0x4978c9(0x137),_0x33f390[_0x33f390[_0x4978c9(0x148)]=0x1]=_0x4978c9(0x148),_0x33f390[_0x33f390[_0x4978c9(0x16b)]=-0x1]='UNRECOGNIZED',_0x33f390))(I||{}),v=(_0x251ded=>(_0x251ded[_0x251ded[_0x4978c9(0x140)]=0x0]='Unknown',_0x251ded[_0x251ded[_0x4978c9(0x105)]=0x1]=_0x4978c9(0x105),_0x251ded[_0x251ded[_0x4978c9(0x10f)]=0x2]=_0x4978c9(0x10f),_0x251ded[_0x251ded[_0x4978c9(0x135)]=0x3]=_0x4978c9(0x135),_0x251ded[_0x251ded['Delete']=0x4]=_0x4978c9(0x155),_0x251ded[_0x251ded[_0x4978c9(0x14e)]=0x5]='Solve',_0x251ded[_0x251ded[_0x4978c9(0x16b)]=-0x1]='UNRECOGNIZED',_0x251ded))(v||{});function _0x3a3e(){const _0x460965=['Add','pluginName','_configService','getMemberID','IConfigService','UserManagerService','Plugin','_threadCommentDataSourceService','syncUpdateMutationToColla','parse','Reply','createTimestamp','4293eSpuEw','getUnit','14210440RnMvZf','4IgMwTS','resolveComment','getUser','/solved','delete','subscribe','_config','requireSession','format','11MqKdDy','_threadCommentDataSource','Disposable','customRanges','Inject','rangeId','threadId','IThreadCommentDataSourceService','dayjs','_init','738651vfMOYE','/delete','error','dataSource','type','userID','UniverThreadCommentUIPlugin','/universer-api/comment/unit/','toStringTag','14cbdzcw','_sessionService','_injector','size','length','Edit','HTTPService','OpenOrReOpen','8448rgyanL','addComment','setConfig','add','resolved','content','_initDataSource','563952fBeFht','Unknown','rangeType','Injector','symbol','1207600pSEbky','replyId','find','post','Solved','root','disposeWithMe','/reply','filter','deleteComment','Solve','onStarting','_userService','getCurrentUser','unitId','_httpService','slice','Delete','/add','4017635ZPmVGr','values','reply','user','/edit','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','merge','_commentService','get','replies','getOwnPropertyDescriptor','976719ymRuqE','forEach','COMMENT','listComments','stringify','map','UniverCollaborationClientPlugin','users','UNRECOGNIZED','parentId','bufferTime','userId','CustomRangeType','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','code','/universer-api/user/list','personId','solved','ThreadCommentModel','comment','defineProperty','_initUserSync','_threadCommentModel','Module','/list','UniverLicensePlugin','body','onReady','UNIVER_UNKNOWN','addUser'];_0x3a3e=function(){return _0x460965;};return _0x3a3e();}const f=_0x12a6df=>c[_0x4978c9(0x125)](new Date(+_0x12a6df))['format'](_0x4978c9(0x15c)),R=async(_0x34e305,_0x4f99e1)=>{const _0x3cc7e2=_0x4978c9,_0x1cd485=_0x34e305[_0x3cc7e2(0x160)](c[_0x3cc7e2(0x10a)]),_0x4534da=_0x34e305[_0x3cc7e2(0x160)](P[_0x3cc7e2(0x136)]);_0x4f99e1[_0x3cc7e2(0x164)](_0x315ccd=>{const _0x3d61ef=_0x3cc7e2;_0x1cd485[_0x3d61ef(0x116)](_0x315ccd)&&_0x4f99e1[_0x3d61ef(0x118)](_0x315ccd);}),_0x4f99e1[_0x3cc7e2(0x133)]&&(await _0x4534da[_0x3cc7e2(0x160)](_0x3cc7e2(0x174),{'params':{'userIDs':[..._0x4f99e1]}}))[_0x3cc7e2(0x101)][_0x3cc7e2(0x16a)]['forEach'](_0x197316=>{_0x197316&&_0x1cd485['addUser'](_0x197316);});};var $=Object[_0x4978c9(0x162)],E=(_0xe8c6c0,_0x58f604,_0x6b4baa,_0x518847)=>{const _0x4d94f7=_0x4978c9;for(var _0x202da7=_0x518847>0x1?void 0x0:_0x518847?$(_0x58f604,_0x6b4baa):_0x58f604,_0x477a67=_0xe8c6c0[_0x4d94f7(0x134)]-0x1,_0x1645c0;_0x477a67>=0x0;_0x477a67--)(_0x1645c0=_0xe8c6c0[_0x477a67])&&(_0x202da7=_0x1645c0(_0x202da7)||_0x202da7);return _0x202da7;},S=(_0x13403a,_0x2417ce)=>(_0x4ada13,_0x43d6d0)=>_0x2417ce(_0x4ada13,_0x43d6d0,_0x13403a);let p=class extends c[_0x4978c9(0x11f)]{constructor(_0x1facba,_0x2254d0,_0x3be2b9,_0x44b7dd){const _0x518849=_0x4978c9;super(),this[_0x518849(0x15f)]=_0x1facba,this[_0x518849(0xfd)]=_0x2254d0,this[_0x518849(0x150)]=_0x3be2b9,this[_0x518849(0x132)]=_0x44b7dd,this[_0x518849(0x126)](),this[_0x518849(0xfc)]();}['_initUserSync'](){const _0x4f690e=_0x4978c9;this['disposeWithMe'](this['_threadCommentModel'][_0x4f690e(0x170)]['pipe'](w[_0x4f690e(0x16d)](0x10))[_0x4f690e(0x119)](_0x14b02f=>{const _0x5c3ae8=_0x4f690e,_0x45e962=new Set();_0x14b02f[_0x5c3ae8(0x164)](_0x295e1b=>{const _0x48d2aa=_0x5c3ae8;switch(_0x295e1b[_0x48d2aa(0x12b)]){case _0x48d2aa(0x13b):{const _0x5d2605=_0x295e1b['payload'][_0x48d2aa(0x175)];_0x45e962[_0x48d2aa(0x13b)](_0x5d2605);break;}}}),R(this[_0x5c3ae8(0x132)],_0x45e962);}));}[_0x4978c9(0x126)](){const _0x2633e9=_0x4978c9;this[_0x2633e9(0x14a)](this[_0x2633e9(0x15f)][_0x2633e9(0x170)][_0x2633e9(0x119)](async _0x3f6ae0=>{const _0x2a45ea=_0x2633e9;var _0xd5be7e,_0x38329e,_0x23aef8,_0x213fe8;const _0x1db7b4=(_0xd5be7e=this[_0x2a45ea(0xfd)][_0x2a45ea(0x112)](_0x3f6ae0[_0x2a45ea(0x152)])[_0x2a45ea(0x146)](_0xa22f78=>_0xa22f78['threadId']===_0x3f6ae0[_0x2a45ea(0x123)]))==null?void 0x0:_0xd5be7e[_0x2a45ea(0x149)];if(!_0x1db7b4)return;const {unitId:_0x116089,subUnitId:_0x342479}=_0x1db7b4;switch(_0x3f6ae0['user']&&this[_0x2a45ea(0x150)][_0x2a45ea(0x104)](_0x3f6ae0[_0x2a45ea(0x15a)]),_0x3f6ae0[_0x2a45ea(0x12b)]){case v['Add']:break;case v[_0x2a45ea(0x10f)]:{this[_0x2a45ea(0xfd)][_0x2a45ea(0x139)](_0x116089,_0x342479,{'unitId':_0x116089,'subUnitId':_0x342479,'ref':'','id':_0x3f6ae0['replyId'],'dT':f(+_0x3f6ae0[_0x2a45ea(0x110)]),'threadId':_0x3f6ae0[_0x2a45ea(0x123)],'personId':(_0x23aef8=(_0x38329e=_0x3f6ae0[_0x2a45ea(0x15a)])==null?void 0x0:_0x38329e[_0x2a45ea(0x12c)])!=null?_0x23aef8:_0x3f6ae0[_0x2a45ea(0x16e)],'text':JSON[_0x2a45ea(0x10e)](_0x3f6ae0[_0x2a45ea(0x13d)]),'parentId':_0x1db7b4['id']});break;}case v[_0x2a45ea(0x155)]:{const _0x4b3a8b=this[_0x2a45ea(0xfd)]['getComment'](_0x116089,_0x342479,_0x3f6ae0[_0x2a45ea(0x145)]);_0x4b3a8b&&_0x4b3a8b[_0x2a45ea(0x16c)]&&this[_0x2a45ea(0xfd)][_0x2a45ea(0x14d)](_0x116089,_0x342479,_0x3f6ae0[_0x2a45ea(0x145)]);break;}case v[_0x2a45ea(0x135)]:{this[_0x2a45ea(0xfd)][_0x2a45ea(0x172)](_0x116089,_0x342479,{'commentId':_0x3f6ae0['replyId'],'text':JSON[_0x2a45ea(0x10e)](_0x3f6ae0[_0x2a45ea(0x13d)])});break;}case v[_0x2a45ea(0x14e)]:{const _0x5d7fe5=(_0x213fe8=this[_0x2a45ea(0xfd)][_0x2a45ea(0x112)](_0x3f6ae0[_0x2a45ea(0x152)])[_0x2a45ea(0x146)](_0x2b9954=>_0x2b9954['threadId']===_0x3f6ae0[_0x2a45ea(0x123)]))==null?void 0x0:_0x213fe8[_0x2a45ea(0x149)];_0x5d7fe5&&this['_threadCommentModel'][_0x2a45ea(0x115)](_0x116089,_0x342479,_0x5d7fe5['id'],_0x3f6ae0[_0x2a45ea(0x176)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4978c9(0x121)](b['CommentService'])),S(0x1,c[_0x4978c9(0x121)](M[_0x4978c9(0x177)])),S(0x2,c['Inject'](c[_0x4978c9(0x10a)])),S(0x3,c[_0x4978c9(0x121)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4978c9(0x162)],x=(_0x4ef648,_0x1e01c6,_0x3503e7,_0x592adc)=>{const _0x5c2571=_0x4978c9;for(var _0x34b17b=_0x592adc>0x1?void 0x0:_0x592adc?A(_0x1e01c6,_0x3503e7):_0x1e01c6,_0x2ecce5=_0x4ef648[_0x5c2571(0x134)]-0x1,_0x341cd7;_0x2ecce5>=0x0;_0x2ecce5--)(_0x341cd7=_0x4ef648[_0x2ecce5])&&(_0x34b17b=_0x341cd7(_0x34b17b)||_0x34b17b);return _0x34b17b;},_=(_0x385c18,_0x9f6b58)=>(_0x52be1f,_0x59c0a1)=>_0x9f6b58(_0x52be1f,_0x59c0a1,_0x385c18);function Y(_0x472588,_0x4ea424){const _0x43e0e8=_0x4978c9,_0x1d6edb=_0x472588[_0x43e0e8(0x161)][0x0];return{..._0x4ea424,'id':_0x1d6edb[_0x43e0e8(0x145)],'resolved':_0x472588[_0x43e0e8(0x176)]===0x1,'dT':f(_0x1d6edb[_0x43e0e8(0x110)]),'personId':_0x1d6edb[_0x43e0e8(0x16e)],'threadId':_0x1d6edb[_0x43e0e8(0x123)]};}function G(_0x2f2b2e,_0x9fca51,_0x4219d3){const _0x377a4b=_0x4978c9;var _0x533cd6,_0x1c5f3d;if(((_0x1c5f3d=(_0x533cd6=_0x2f2b2e==null?void 0x0:_0x2f2b2e[_0x377a4b(0x161)])==null?void 0x0:_0x533cd6[_0x377a4b(0x134)])!=null?_0x1c5f3d:0x0)>0x0){const _0x4ac8c8=(_0x56f899,_0x8c76b3)=>({'id':_0x56f899[_0x377a4b(0x145)],'threadId':_0x56f899['threadId'],'dT':f(_0x56f899[_0x377a4b(0x110)]),'personId':_0x56f899[_0x377a4b(0x16e)],'resolved':_0x2f2b2e['solved']===I[_0x377a4b(0x148)],'unitId':_0x9fca51,'subUnitId':_0x4219d3,'text':JSON['parse'](_0x56f899[_0x377a4b(0x13d)]),'parentId':_0x8c76b3}),_0x5858ca=_0x4ac8c8(_0x2f2b2e['replies'][0x0]);return{..._0x5858ca,'children':_0x2f2b2e[_0x377a4b(0x161)][_0x377a4b(0x154)](0x1)[_0x377a4b(0x168)](_0x42e5bf=>_0x4ac8c8(_0x42e5bf,_0x5858ca['id']))};}return null;}let g=class{constructor(_0x3ba5a6,_0x49bfba,_0x2fd6db,_0x3391c7){const _0x1a3440=_0x4978c9;this['_httpService']=_0x3ba5a6,this['_userService']=_0x49bfba,this[_0x1a3440(0x131)]=_0x2fd6db,this[_0x1a3440(0x132)]=_0x3391c7;}async['addComment'](_0x5674e2){const _0x4fe61f=_0x4978c9;var _0xd7803f,_0x512811;const {parentId:_0x2fb662,unitId:_0x29c70a,text:_0x405067,threadId:_0x11ef2a}=_0x5674e2,_0x1e24dc=(_0x512811=(_0xd7803f=_0x405067[_0x4fe61f(0x120)])==null?void 0x0:_0xd7803f[_0x4fe61f(0x14c)](_0x552c46=>_0x552c46[_0x4fe61f(0x141)]===c[_0x4fe61f(0x16f)][_0x4fe61f(0x165)])[_0x4fe61f(0x168)](_0x365388=>_0x365388[_0x4fe61f(0x122)]))!=null?_0x512811:[],_0x5c3b16=JSON['stringify'](_0x405067),_0x4313bd=(await this[_0x4fe61f(0x131)][_0x4fe61f(0x11b)](_0x29c70a))[_0x4fe61f(0x108)]();if(_0x2fb662){const _0x3886e9={'memberId':_0x4313bd,'unitId':_0x29c70a,'content':_0x5c3b16,'mention':_0x1e24dc,'threadId':_0x11ef2a},_0x45bcfc=(await this[_0x4fe61f(0x153)][_0x4fe61f(0x147)]('/universer-api/comment/unit/'+_0x29c70a+_0x4fe61f(0x14b),{'body':_0x3886e9}))['body'][_0x4fe61f(0x159)];return{..._0x5674e2,'id':_0x45bcfc['replyId'],'dT':c[_0x4fe61f(0x125)](+_0x45bcfc[_0x4fe61f(0x110)])[_0x4fe61f(0x11c)](_0x4fe61f(0x15c)),'personId':_0x45bcfc['userId']};}else{const _0x5768e6={'memberId':_0x4313bd,'unitId':_0x29c70a,'content':_0x5c3b16,'mention':_0x1e24dc},_0x14b182=await this[_0x4fe61f(0x153)]['post'](_0x4fe61f(0x12e)+_0x29c70a+_0x4fe61f(0x156),{'body':_0x5768e6});return Y(_0x14b182[_0x4fe61f(0x101)][_0x4fe61f(0x178)],_0x5674e2);}}async[_0x4978c9(0x172)](_0x1513fc){const _0x23d485=_0x4978c9;var _0x590634,_0x451014;const {text:_0x340ea5,unitId:_0x15aeea}=_0x1513fc,_0x3f8d47=(_0x451014=(_0x590634=_0x340ea5[_0x23d485(0x120)])==null?void 0x0:_0x590634['filter'](_0x3c6510=>_0x3c6510[_0x23d485(0x141)]===c[_0x23d485(0x16f)][_0x23d485(0x165)])[_0x23d485(0x168)](_0x3a7e03=>_0x3a7e03['rangeId']))!=null?_0x451014:[],_0x4a5052=JSON[_0x23d485(0x167)](_0x340ea5),_0x47d781=_0x1513fc[_0x23d485(0x123)],_0x5a88e9=_0x1513fc['id'],_0x4467ac={'memberId':(await this[_0x23d485(0x131)]['requireSession'](_0x15aeea))[_0x23d485(0x108)](),'unitId':_0x15aeea,'threadId':_0x47d781,'mention':_0x3f8d47,'content':_0x4a5052,'replyId':_0x5a88e9},_0x2fb354=await this[_0x23d485(0x153)][_0x23d485(0x147)](_0x23d485(0x12e)+_0x15aeea+_0x23d485(0x15b),{'body':_0x4467ac});return!_0x2fb354[_0x23d485(0x101)][_0x23d485(0x129)]||_0x2fb354[_0x23d485(0x101)][_0x23d485(0x129)][_0x23d485(0x173)]===0x1;}async[_0x4978c9(0x115)](_0x31e066){const _0x5659cb=_0x4978c9,{unitId:_0x308229}=_0x31e066,_0x5190e5=_0x31e066[_0x5659cb(0x123)],_0x58e40d={'memberId':this[_0x5659cb(0x150)][_0x5659cb(0x151)]()[_0x5659cb(0x12c)],'unitId':_0x308229,'threadId':_0x5190e5,'solved':_0x31e066[_0x5659cb(0x13c)]?I[_0x5659cb(0x148)]:I[_0x5659cb(0x137)]},_0x16c7a2=await this[_0x5659cb(0x153)]['post'](_0x5659cb(0x12e)+_0x308229+_0x5659cb(0x117),{'body':_0x58e40d});return!_0x16c7a2[_0x5659cb(0x101)][_0x5659cb(0x129)]||_0x16c7a2[_0x5659cb(0x101)][_0x5659cb(0x129)][_0x5659cb(0x173)]===0x1;}async[_0x4978c9(0x14d)](_0x33b302,_0x558b2a,_0x266c6f,_0x3b0423){const _0x2f7b1b=_0x4978c9,_0xdd8334={'memberId':(await this['_sessionService'][_0x2f7b1b(0x11b)](_0x33b302))[_0x2f7b1b(0x108)](),'threadId':_0x266c6f,'replyId':_0x3b0423,'unitId':_0x33b302},_0xb8af38=await this[_0x2f7b1b(0x153)][_0x2f7b1b(0x147)](_0x2f7b1b(0x12e)+_0x33b302+_0x2f7b1b(0x128),{'body':_0xdd8334});return!_0xb8af38['body'][_0x2f7b1b(0x129)]||_0xb8af38[_0x2f7b1b(0x101)][_0x2f7b1b(0x129)]['code']===0x1;}async[_0x4978c9(0x166)](_0x50aa12,_0xb566f3,_0x3cf8e6){const _0x538c12=_0x4978c9,_0x148f9c={'unitId':_0x50aa12,'threadId':_0x3cf8e6},_0x38aabb=await this['_httpService']['post'](_0x538c12(0x12e)+_0x50aa12+_0x538c12(0xff),{'body':_0x148f9c}),_0x52765a=_0x3cf8e6[_0x538c12(0x168)](_0x267940=>G(_0x38aabb[_0x538c12(0x101)]['comments'][_0x267940],_0x50aa12,_0xb566f3))['filter'](Boolean);return Object[_0x538c12(0x158)](_0x38aabb[_0x538c12(0x101)][_0x538c12(0x16a)])['forEach'](_0x2f610a=>{const _0x39f790=_0x538c12;this['_userService'][_0x39f790(0x104)](_0x2f610a);}),_0x52765a;}['saveCommentToSnapshot'](_0x143713){return{'id':_0x143713['id'],'threadId':_0x143713['threadId'],'ref':_0x143713['ref']};}};g=x([_(0x0,c[_0x4978c9(0x121)](P[_0x4978c9(0x136)])),_(0x1,c[_0x4978c9(0x121)](c[_0x4978c9(0x10a)])),_(0x2,c[_0x4978c9(0x121)](b['CollaborationSessionService'])),_(0x3,c[_0x4978c9(0x121)](c[_0x4978c9(0x142)]))],g);var H=Object[_0x4978c9(0x162)],J=(_0x3d5903,_0x3afe1d,_0x559ad1,_0x16dff6)=>{for(var _0x24fc45=_0x16dff6>0x1?void 0x0:_0x16dff6?H(_0x3afe1d,_0x559ad1):_0x3afe1d,_0x10e252=_0x3d5903['length']-0x1,_0x21de2a;_0x10e252>=0x0;_0x10e252--)(_0x21de2a=_0x3d5903[_0x10e252])&&(_0x24fc45=_0x21de2a(_0x24fc45)||_0x24fc45);return _0x24fc45;},y=(_0x290a18,_0x372fb7)=>(_0x15c999,_0x57dfdd)=>_0x372fb7(_0x15c999,_0x57dfdd,_0x290a18);let C=class extends c[_0x4978c9(0x11f)]{constructor(_0x3269bf,_0x4eff56){const _0xe98401=_0x4978c9;super(),this[_0xe98401(0x10c)]=_0x3269bf,this['_threadCommentDataSource']=_0x4eff56,this['_initDataSource']();}[_0x4978c9(0x13e)](){const _0x33d11f=_0x4978c9;this[_0x33d11f(0x10c)][_0x33d11f(0x12a)]=this[_0x33d11f(0x11e)],this['_threadCommentDataSourceService'][_0x33d11f(0x10d)]=!0x1;}};C=J([y(0x0,M[_0x4978c9(0x124)]),y(0x1,c[_0x4978c9(0x121)](g))],C);var F=Object[_0x4978c9(0xfb)],L=Object[_0x4978c9(0x162)],Z=(_0x2f7d75,_0x12f5c3,_0x4d6663)=>_0x12f5c3 in _0x2f7d75?F(_0x2f7d75,_0x12f5c3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d6663}):_0x2f7d75[_0x12f5c3]=_0x4d6663,W=(_0x39f886,_0x3b9eb0,_0x2b1f3a,_0x1c224c)=>{const _0x15ef8e=_0x4978c9;for(var _0x33e028=_0x1c224c>0x1?void 0x0:_0x1c224c?L(_0x3b9eb0,_0x2b1f3a):_0x3b9eb0,_0x4630bb=_0x39f886[_0x15ef8e(0x134)]-0x1,_0x806916;_0x4630bb>=0x0;_0x4630bb--)(_0x806916=_0x39f886[_0x4630bb])&&(_0x33e028=_0x806916(_0x33e028)||_0x33e028);return _0x33e028;},O=(_0x5c242e,_0x335c43)=>(_0x2e24b9,_0x56485c)=>_0x335c43(_0x2e24b9,_0x56485c,_0x5c242e),N=(_0x16db2e,_0x5dee43,_0x1a265c)=>Z(_0x16db2e,typeof _0x5dee43!=_0x4978c9(0x143)?_0x5dee43+'':_0x5dee43,_0x1a265c);exports[_0x4978c9(0x15d)]=class extends c[_0x4978c9(0x10b)]{constructor(_0x4136e4=D,_0x3d2e02,_0x173eab){const _0x447366=_0x4978c9;super(),this[_0x447366(0x11a)]=_0x4136e4,this[_0x447366(0x132)]=_0x3d2e02,this[_0x447366(0x107)]=_0x173eab;const {..._0xb0972}=c[_0x447366(0x15e)]({},D,this['_config']);this['_configService'][_0x447366(0x13a)](q,_0xb0972);}[_0x4978c9(0x14f)](){const _0x48c5d8=_0x4978c9;[[g],[C],[p]][_0x48c5d8(0x164)](_0x3f5a24=>{const _0x47429d=_0x48c5d8;this[_0x47429d(0x132)]['add'](_0x3f5a24);});}[_0x4978c9(0x102)](){const _0x29221a=_0x4978c9;this[_0x29221a(0x132)][_0x29221a(0x160)](C),this['_injector'][_0x29221a(0x160)](p);}},N(exports[_0x4978c9(0x15d)],_0x4978c9(0x106),U),N(exports[_0x4978c9(0x15d)],_0x4978c9(0x12b),c['UniverInstanceType'][_0x4978c9(0x103)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x4978c9(0x12d)],b[_0x4978c9(0x169)],T[_0x4978c9(0x100)]),O(0x1,c['Inject'](c[_0x4978c9(0x142)])),O(0x2,c[_0x4978c9(0x109)])],exports[_0x4978c9(0x15d)]);
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 _0x4fa63f=_0x44bb;(function(_0x396371,_0x3f884e){const _0x4962c4=_0x44bb,_0x18bb2d=_0x396371();while(!![]){try{const _0x5e8278=parseInt(_0x4962c4(0x14a))/0x1+parseInt(_0x4962c4(0x13d))/0x2*(parseInt(_0x4962c4(0x13f))/0x3)+-parseInt(_0x4962c4(0x174))/0x4+-parseInt(_0x4962c4(0x142))/0x5*(-parseInt(_0x4962c4(0x168))/0x6)+-parseInt(_0x4962c4(0x139))/0x7+parseInt(_0x4962c4(0x16c))/0x8+parseInt(_0x4962c4(0x160))/0x9;if(_0x5e8278===_0x3f884e)break;else _0x18bb2d['push'](_0x18bb2d['shift']());}catch(_0xf8a481){_0x18bb2d['push'](_0x18bb2d['shift']());}}}(_0x2941,0x4debc));import{CommentService as _0x1eb02c,CollaborationSessionService as _0x16db22,UniverCollaborationClientPlugin as _0x87c461}from'@univerjs-pro/collaboration-client';function _0x44bb(_0x52d54d,_0x36b918){const _0x294197=_0x2941();return _0x44bb=function(_0x44bb62,_0x370668){_0x44bb62=_0x44bb62-0x134;let _0x3b8ce0=_0x294197[_0x44bb62];return _0x3b8ce0;},_0x44bb(_0x52d54d,_0x36b918);}import{UniverLicensePlugin as _0x1801ee}from'@univerjs-pro/license';import{dayjs as _0x480dc5,UserManagerService as _0x2991de,Inject as _0x2c392c,Injector as _0x114727,Disposable as _0x2a87b6,CustomRangeType as _0x4d9a95,UniverInstanceType as _0x479d0c,DependentOn as _0x5b7360,IConfigService as _0x1cfb99,Plugin as _0xfe02e8,merge as _0xd962df}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xda4de0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f0ad4,IThreadCommentDataSourceService as _0x3343f8}from'@univerjs/thread-comment';import{bufferTime as _0x1a377e}from'rxjs';import{HTTPService as _0x4577f2}from'@univerjs/network';const W=_0x4fa63f(0x18a);var I=(_0x310ffe=>(_0x310ffe[_0x310ffe[_0x4fa63f(0x163)]=0x0]=_0x4fa63f(0x163),_0x310ffe[_0x310ffe[_0x4fa63f(0x136)]=0x1]='Solved',_0x310ffe[_0x310ffe['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x310ffe))(I||{}),v=(_0x20e07b=>(_0x20e07b[_0x20e07b[_0x4fa63f(0x155)]=0x0]=_0x4fa63f(0x155),_0x20e07b[_0x20e07b[_0x4fa63f(0x172)]=0x1]=_0x4fa63f(0x172),_0x20e07b[_0x20e07b[_0x4fa63f(0x189)]=0x2]=_0x4fa63f(0x189),_0x20e07b[_0x20e07b['Edit']=0x3]=_0x4fa63f(0x17c),_0x20e07b[_0x20e07b[_0x4fa63f(0x17a)]=0x4]=_0x4fa63f(0x17a),_0x20e07b[_0x20e07b[_0x4fa63f(0x14f)]=0x5]=_0x4fa63f(0x14f),_0x20e07b[_0x20e07b[_0x4fa63f(0x190)]=-0x1]='UNRECOGNIZED',_0x20e07b))(v||{});const D=_0x260e43=>_0x480dc5(new Date(+_0x260e43))['format'](_0x4fa63f(0x145)),B=async(_0x19f126,_0xf060a)=>{const _0x29313b=_0x4fa63f,_0x3b1a02=_0x19f126[_0x29313b(0x157)](_0x2991de),_0x301327=_0x19f126['get'](_0x4577f2);_0xf060a[_0x29313b(0x14c)](_0x4d8b3f=>{const _0x4d736b=_0x29313b;_0x3b1a02[_0x4d736b(0x17d)](_0x4d8b3f)&&_0xf060a[_0x4d736b(0x13a)](_0x4d8b3f);}),_0xf060a[_0x29313b(0x15d)]&&(await _0x301327[_0x29313b(0x157)]('/universer-api/user/list',{'params':{'userIDs':[..._0xf060a]}}))[_0x29313b(0x179)][_0x29313b(0x18e)][_0x29313b(0x14c)](_0x12a01d=>{const _0x47de77=_0x29313b;_0x12a01d&&_0x3b1a02[_0x47de77(0x170)](_0x12a01d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x279274,_0x156357,_0x334ddf,_0x579463)=>{for(var _0x2df564=_0x579463>0x1?void 0x0:_0x579463?K(_0x156357,_0x334ddf):_0x156357,_0x168ace=_0x279274['length']-0x1,_0x537a09;_0x168ace>=0x0;_0x168ace--)(_0x537a09=_0x279274[_0x168ace])&&(_0x2df564=_0x537a09(_0x2df564)||_0x2df564);return _0x2df564;},p=(_0x2d88d4,_0x4dbf1c)=>(_0x49e07d,_0x49d999)=>_0x4dbf1c(_0x49e07d,_0x49d999,_0x2d88d4);let S=class extends _0x2a87b6{constructor(_0x4824e3,_0x56a606,_0x36bf50,_0xb9200){const _0x264ca9=_0x4fa63f;super(),this[_0x264ca9(0x192)]=_0x4824e3,this[_0x264ca9(0x162)]=_0x56a606,this[_0x264ca9(0x180)]=_0x36bf50,this[_0x264ca9(0x183)]=_0xb9200,this['_init'](),this[_0x264ca9(0x181)]();}[_0x4fa63f(0x181)](){const _0x3a6c16=_0x4fa63f;this[_0x3a6c16(0x16f)](this[_0x3a6c16(0x162)][_0x3a6c16(0x137)]['pipe'](_0x1a377e(0x10))[_0x3a6c16(0x193)](_0x20401f=>{const _0x578f61=_0x3a6c16,_0x24c8f0=new Set();_0x20401f[_0x578f61(0x14c)](_0x58b8c3=>{const _0x3926ff=_0x578f61;switch(_0x58b8c3[_0x3926ff(0x140)]){case _0x3926ff(0x18d):{const _0x2a090c=_0x58b8c3['payload']['personId'];_0x24c8f0[_0x3926ff(0x18d)](_0x2a090c);break;}}}),B(this[_0x578f61(0x183)],_0x24c8f0);}));}[_0x4fa63f(0x15b)](){const _0xe3f4eb=_0x4fa63f;this['disposeWithMe'](this['_commentService'][_0xe3f4eb(0x137)][_0xe3f4eb(0x193)](async _0x1b2aca=>{const _0x46af08=_0xe3f4eb;var _0x10d1d0,_0x2f6e9e,_0x111f51,_0x426e2a;const _0x58fd44=(_0x10d1d0=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x1eea29=>_0x1eea29[_0x46af08(0x169)]===_0x1b2aca['threadId']))==null?void 0x0:_0x10d1d0[_0x46af08(0x15f)];if(!_0x58fd44)return;const {unitId:_0x349c8c,subUnitId:_0x450566}=_0x58fd44;switch(_0x1b2aca['user']&&this['_userService']['addUser'](_0x1b2aca[_0x46af08(0x148)]),_0x1b2aca[_0x46af08(0x140)]){case v['Add']:break;case v['Reply']:{this[_0x46af08(0x162)]['addComment'](_0x349c8c,_0x450566,{'unitId':_0x349c8c,'subUnitId':_0x450566,'ref':'','id':_0x1b2aca[_0x46af08(0x159)],'dT':D(+_0x1b2aca['createTimestamp']),'threadId':_0x1b2aca['threadId'],'personId':(_0x111f51=(_0x2f6e9e=_0x1b2aca[_0x46af08(0x148)])==null?void 0x0:_0x2f6e9e['userID'])!=null?_0x111f51:_0x1b2aca[_0x46af08(0x166)],'text':JSON[_0x46af08(0x15e)](_0x1b2aca[_0x46af08(0x152)]),'parentId':_0x58fd44['id']});break;}case v['Delete']:{const _0x31e814=this[_0x46af08(0x162)][_0x46af08(0x17b)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);_0x31e814&&_0x31e814[_0x46af08(0x161)]&&this[_0x46af08(0x162)][_0x46af08(0x16a)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);break;}case v['Edit']:{this[_0x46af08(0x162)]['updateComment'](_0x349c8c,_0x450566,{'commentId':_0x1b2aca[_0x46af08(0x159)],'text':JSON['parse'](_0x1b2aca[_0x46af08(0x152)])});break;}case v[_0x46af08(0x14f)]:{const _0x2c5751=(_0x426e2a=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x35884b=>_0x35884b[_0x46af08(0x169)]===_0x1b2aca[_0x46af08(0x169)]))==null?void 0x0:_0x426e2a[_0x46af08(0x15f)];_0x2c5751&&this['_threadCommentModel']['resolveComment'](_0x349c8c,_0x450566,_0x2c5751['id'],_0x1b2aca[_0x46af08(0x195)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2c392c(_0x1eb02c)),p(0x1,_0x2c392c(_0x4f0ad4)),p(0x2,_0x2c392c(_0x2991de)),p(0x3,_0x2c392c(_0x114727))],S);const z=_0x4fa63f(0x150),M={};var k=Object[_0x4fa63f(0x171)],Q=(_0x2fbe82,_0x2a654d,_0x581523,_0x10c447)=>{const _0x13e588=_0x4fa63f;for(var _0x464ac1=_0x10c447>0x1?void 0x0:_0x10c447?k(_0x2a654d,_0x581523):_0x2a654d,_0x5a75b0=_0x2fbe82[_0x13e588(0x156)]-0x1,_0x45f7c8;_0x5a75b0>=0x0;_0x5a75b0--)(_0x45f7c8=_0x2fbe82[_0x5a75b0])&&(_0x464ac1=_0x45f7c8(_0x464ac1)||_0x464ac1);return _0x464ac1;},_=(_0x3ab12c,_0xaac9b5)=>(_0x10854b,_0x10ba0c)=>_0xaac9b5(_0x10854b,_0x10ba0c,_0x3ab12c);function X(_0x4d46ab,_0x596345){const _0x4f611f=_0x4fa63f,_0x373c2a=_0x4d46ab[_0x4f611f(0x14e)][0x0];return{..._0x596345,'id':_0x373c2a[_0x4f611f(0x159)],'resolved':_0x4d46ab[_0x4f611f(0x195)]===0x1,'dT':D(_0x373c2a[_0x4f611f(0x146)]),'personId':_0x373c2a[_0x4f611f(0x166)],'threadId':_0x373c2a[_0x4f611f(0x169)]};}function ee(_0x36e51a,_0x5eb9c7,_0xc72475){const _0x3c7b56=_0x4fa63f;var _0x4d6276,_0x371935;if(((_0x371935=(_0x4d6276=_0x36e51a==null?void 0x0:_0x36e51a['replies'])==null?void 0x0:_0x4d6276[_0x3c7b56(0x156)])!=null?_0x371935:0x0)>0x0){const _0x27a489=(_0x176eee,_0x3598b3)=>({'id':_0x176eee['replyId'],'threadId':_0x176eee[_0x3c7b56(0x169)],'dT':D(_0x176eee[_0x3c7b56(0x146)]),'personId':_0x176eee[_0x3c7b56(0x166)],'resolved':_0x36e51a[_0x3c7b56(0x195)]===I['Solved'],'unitId':_0x5eb9c7,'subUnitId':_0xc72475,'text':JSON['parse'](_0x176eee[_0x3c7b56(0x152)]),'parentId':_0x3598b3}),_0x2af274=_0x27a489(_0x36e51a['replies'][0x0]);return{..._0x2af274,'children':_0x36e51a[_0x3c7b56(0x14e)][_0x3c7b56(0x14d)](0x1)[_0x3c7b56(0x158)](_0x397d55=>_0x27a489(_0x397d55,_0x2af274['id']))};}return null;}let f=class{constructor(_0x3e18e7,_0x6c75b4,_0x507908,_0x3d50dd){const _0x270a70=_0x4fa63f;this['_httpService']=_0x3e18e7,this[_0x270a70(0x180)]=_0x6c75b4,this['_sessionService']=_0x507908,this['_injector']=_0x3d50dd;}async['addComment'](_0x14ea74){const _0xf87d96=_0x4fa63f;var _0x58d459,_0x176e79;const {parentId:_0x5589d3,unitId:_0x2d244d,text:_0xb90a6f,threadId:_0x1aaa86}=_0x14ea74,_0x5a36b4=(_0x176e79=(_0x58d459=_0xb90a6f['customRanges'])==null?void 0x0:_0x58d459['filter'](_0x3a1907=>_0x3a1907[_0xf87d96(0x187)]===_0x4d9a95[_0xf87d96(0x144)])[_0xf87d96(0x158)](_0x3fab85=>_0x3fab85[_0xf87d96(0x175)]))!=null?_0x176e79:[],_0x3dca7a=JSON[_0xf87d96(0x167)](_0xb90a6f),_0xc551cf=(await this['_sessionService']['requireSession'](_0x2d244d))[_0xf87d96(0x16e)]();if(_0x5589d3){const _0x2ca50e={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4,'threadId':_0x1aaa86},_0x4ecd05=(await this[_0xf87d96(0x13c)]['post'](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x134),{'body':_0x2ca50e}))[_0xf87d96(0x179)][_0xf87d96(0x15a)];return{..._0x14ea74,'id':_0x4ecd05[_0xf87d96(0x159)],'dT':_0x480dc5(+_0x4ecd05[_0xf87d96(0x146)])['format'](_0xf87d96(0x145)),'personId':_0x4ecd05[_0xf87d96(0x166)]};}else{const _0x1573c0={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4},_0x1e0275=await this['_httpService'][_0xf87d96(0x13b)](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x14b),{'body':_0x1573c0});return X(_0x1e0275[_0xf87d96(0x179)][_0xf87d96(0x184)],_0x14ea74);}}async[_0x4fa63f(0x17e)](_0x490e14){const _0x583578=_0x4fa63f;var _0x5557fd,_0x244b89;const {text:_0x445822,unitId:_0x40db82}=_0x490e14,_0x3b94e9=(_0x244b89=(_0x5557fd=_0x445822[_0x583578(0x149)])==null?void 0x0:_0x5557fd[_0x583578(0x16d)](_0x430240=>_0x430240[_0x583578(0x187)]===_0x4d9a95['COMMENT'])[_0x583578(0x158)](_0x47b2aa=>_0x47b2aa['rangeId']))!=null?_0x244b89:[],_0x5cbc2e=JSON[_0x583578(0x167)](_0x445822),_0x357d36=_0x490e14[_0x583578(0x169)],_0x47c093=_0x490e14['id'],_0x15ec24={'memberId':(await this[_0x583578(0x185)]['requireSession'](_0x40db82))[_0x583578(0x16e)](),'unitId':_0x40db82,'threadId':_0x357d36,'mention':_0x3b94e9,'content':_0x5cbc2e,'replyId':_0x47c093},_0x44f555=await this[_0x583578(0x13c)][_0x583578(0x13b)](_0x583578(0x182)+_0x40db82+'/edit',{'body':_0x15ec24});return!_0x44f555['body'][_0x583578(0x154)]||_0x44f555[_0x583578(0x179)][_0x583578(0x154)]['code']===0x1;}async[_0x4fa63f(0x153)](_0x124eea){const _0x160ce3=_0x4fa63f,{unitId:_0x3ccd6b}=_0x124eea,_0x310b4d=_0x124eea[_0x160ce3(0x169)],_0x4ec1cd={'memberId':this[_0x160ce3(0x180)]['getCurrentUser']()[_0x160ce3(0x191)],'unitId':_0x3ccd6b,'threadId':_0x310b4d,'solved':_0x124eea[_0x160ce3(0x18c)]?I[_0x160ce3(0x136)]:I[_0x160ce3(0x163)]},_0x4ea5e6=await this[_0x160ce3(0x13c)][_0x160ce3(0x13b)](_0x160ce3(0x182)+_0x3ccd6b+_0x160ce3(0x186),{'body':_0x4ec1cd});return!_0x4ea5e6['body']['error']||_0x4ea5e6[_0x160ce3(0x179)][_0x160ce3(0x154)][_0x160ce3(0x164)]===0x1;}async[_0x4fa63f(0x16a)](_0x260310,_0x171069,_0x4c9701,_0x544d7c){const _0x31555e=_0x4fa63f,_0x283497={'memberId':(await this['_sessionService'][_0x31555e(0x143)](_0x260310))[_0x31555e(0x16e)](),'threadId':_0x4c9701,'replyId':_0x544d7c,'unitId':_0x260310},_0x59c685=await this[_0x31555e(0x13c)][_0x31555e(0x13b)](_0x31555e(0x182)+_0x260310+'/delete',{'body':_0x283497});return!_0x59c685['body'][_0x31555e(0x154)]||_0x59c685['body']['error'][_0x31555e(0x164)]===0x1;}async[_0x4fa63f(0x194)](_0x3e6582,_0x2dab70,_0x27196a){const _0x3ebc04=_0x4fa63f,_0x4a5aca={'unitId':_0x3e6582,'threadId':_0x27196a},_0x585171=await this['_httpService'][_0x3ebc04(0x13b)](_0x3ebc04(0x182)+_0x3e6582+'/list',{'body':_0x4a5aca}),_0x5504f6=_0x27196a[_0x3ebc04(0x158)](_0x6c50e4=>ee(_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x173)][_0x6c50e4],_0x3e6582,_0x2dab70))[_0x3ebc04(0x16d)](Boolean);return Object['values'](_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x18e)])[_0x3ebc04(0x14c)](_0x30d0ff=>{const _0x4c7d64=_0x3ebc04;this['_userService'][_0x4c7d64(0x170)](_0x30d0ff);}),_0x5504f6;}['saveCommentToSnapshot'](_0x2c169c){const _0x587810=_0x4fa63f;return{'id':_0x2c169c['id'],'threadId':_0x2c169c[_0x587810(0x169)],'ref':_0x2c169c[_0x587810(0x17f)]};}};f=Q([_(0x0,_0x2c392c(_0x4577f2)),_(0x1,_0x2c392c(_0x2991de)),_(0x2,_0x2c392c(_0x16db22)),_(0x3,_0x2c392c(_0x114727))],f);var re=Object[_0x4fa63f(0x171)],te=(_0x1b99c2,_0x1a13e8,_0xecd51d,_0x1274a0)=>{const _0x1be127=_0x4fa63f;for(var _0x3b2eda=_0x1274a0>0x1?void 0x0:_0x1274a0?re(_0x1a13e8,_0xecd51d):_0x1a13e8,_0x3235ed=_0x1b99c2[_0x1be127(0x156)]-0x1,_0x3db552;_0x3235ed>=0x0;_0x3235ed--)(_0x3db552=_0x1b99c2[_0x3235ed])&&(_0x3b2eda=_0x3db552(_0x3b2eda)||_0x3b2eda);return _0x3b2eda;},N=(_0x5715bf,_0x3b3d80)=>(_0x2d8265,_0x54ace6)=>_0x3b3d80(_0x2d8265,_0x54ace6,_0x5715bf);function _0x2941(){const _0x39ca0c=['get','map','replyId','reply','_init','setConfig','size','parse','root','2837250iPetyY','parentId','_threadCommentModel','OpenOrReOpen','code','_config','userId','stringify','503742VCEueg','threadId','deleteComment','dataSource','1277600XwVAOF','filter','getMemberID','disposeWithMe','addUser','getOwnPropertyDescriptor','Add','comments','966412HwqXnU','rangeId','symbol','_configService','_threadCommentDataSourceService','body','Delete','getComment','Edit','getUser','updateComment','ref','_userService','_initUserSync','/universer-api/comment/unit/','_injector','comment','_sessionService','/solved','rangeType','onReady','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','resolved','add','users','_initDataSource','UNRECOGNIZED','userID','_commentService','subscribe','listComments','solved','/reply','getUnit','Solved','commentUpdate$','unitId','3977890QZHMfo','delete','post','_httpService','6598MpSibx','pluginName','129MUxCDe','type','onStarting','20DcKLMW','requireSession','COMMENT','YYYY/MM/DD\x20HH:mm','createTimestamp','find','user','customRanges','176402sHRsRE','/add','forEach','slice','replies','Solve','thread-comment-data-source.config','UNIVER_UNKNOWN','content','resolveComment','error','Unknown','length'];_0x2941=function(){return _0x39ca0c;};return _0x2941();}let g=class extends _0x2a87b6{constructor(_0x37079f,_0xb2d9da){const _0x890789=_0x4fa63f;super(),this[_0x890789(0x178)]=_0x37079f,this[_0x890789(0x18b)]=_0xb2d9da,this[_0x890789(0x18f)]();}[_0x4fa63f(0x18f)](){const _0x6fc715=_0x4fa63f;this['_threadCommentDataSourceService'][_0x6fc715(0x16b)]=this[_0x6fc715(0x18b)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x3343f8),N(0x1,_0x2c392c(f))],g);var se=Object['defineProperty'],oe=Object[_0x4fa63f(0x171)],ne=(_0x4ae391,_0x213768,_0x355cb2)=>_0x213768 in _0x4ae391?se(_0x4ae391,_0x213768,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x355cb2}):_0x4ae391[_0x213768]=_0x355cb2,ie=(_0x2ec98f,_0x18cf9f,_0x46748e,_0x42cbe1)=>{const _0x1cb995=_0x4fa63f;for(var _0x115882=_0x42cbe1>0x1?void 0x0:_0x42cbe1?oe(_0x18cf9f,_0x46748e):_0x18cf9f,_0xa6acdf=_0x2ec98f[_0x1cb995(0x156)]-0x1,_0x1923bf;_0xa6acdf>=0x0;_0xa6acdf--)(_0x1923bf=_0x2ec98f[_0xa6acdf])&&(_0x115882=_0x1923bf(_0x115882)||_0x115882);return _0x115882;},w=(_0x320333,_0x3ab90b)=>(_0x32db0c,_0x18f4aa)=>_0x3ab90b(_0x32db0c,_0x18f4aa,_0x320333),$=(_0x42ae05,_0x2076ee,_0x4f500a)=>ne(_0x42ae05,typeof _0x2076ee!=_0x4fa63f(0x176)?_0x2076ee+'':_0x2076ee,_0x4f500a);let b=class extends _0xfe02e8{constructor(_0x29fc04=M,_0x32fa88,_0x404bd3){const _0xf420b7=_0x4fa63f;super(),this[_0xf420b7(0x165)]=_0x29fc04,this[_0xf420b7(0x183)]=_0x32fa88,this[_0xf420b7(0x177)]=_0x404bd3;const {..._0x40133f}=_0xd962df({},M,this['_config']);this[_0xf420b7(0x177)][_0xf420b7(0x15c)](z,_0x40133f);}[_0x4fa63f(0x141)](){const _0x12c2ca=_0x4fa63f;[[f],[g],[S]][_0x12c2ca(0x14c)](_0x25d63a=>{const _0x1436bb=_0x12c2ca;this['_injector'][_0x1436bb(0x18d)](_0x25d63a);});}[_0x4fa63f(0x188)](){const _0x1e694f=_0x4fa63f;this[_0x1e694f(0x183)][_0x1e694f(0x157)](g),this[_0x1e694f(0x183)]['get'](S);}};$(b,_0x4fa63f(0x13e),W),$(b,_0x4fa63f(0x140),_0x479d0c[_0x4fa63f(0x151)]),b=ie([_0x5b7360(_0xda4de0,_0x87c461,_0x1801ee),w(0x1,_0x2c392c(_0x114727)),w(0x2,_0x1cfb99)],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 _0x4fa63f=_0x44bb;(function(_0x396371,_0x3f884e){const _0x4962c4=_0x44bb,_0x18bb2d=_0x396371();while(!![]){try{const _0x5e8278=parseInt(_0x4962c4(0x14a))/0x1+parseInt(_0x4962c4(0x13d))/0x2*(parseInt(_0x4962c4(0x13f))/0x3)+-parseInt(_0x4962c4(0x174))/0x4+-parseInt(_0x4962c4(0x142))/0x5*(-parseInt(_0x4962c4(0x168))/0x6)+-parseInt(_0x4962c4(0x139))/0x7+parseInt(_0x4962c4(0x16c))/0x8+parseInt(_0x4962c4(0x160))/0x9;if(_0x5e8278===_0x3f884e)break;else _0x18bb2d['push'](_0x18bb2d['shift']());}catch(_0xf8a481){_0x18bb2d['push'](_0x18bb2d['shift']());}}}(_0x2941,0x4debc));import{CommentService as _0x1eb02c,CollaborationSessionService as _0x16db22,UniverCollaborationClientPlugin as _0x87c461}from'@univerjs-pro/collaboration-client';function _0x44bb(_0x52d54d,_0x36b918){const _0x294197=_0x2941();return _0x44bb=function(_0x44bb62,_0x370668){_0x44bb62=_0x44bb62-0x134;let _0x3b8ce0=_0x294197[_0x44bb62];return _0x3b8ce0;},_0x44bb(_0x52d54d,_0x36b918);}import{UniverLicensePlugin as _0x1801ee}from'@univerjs-pro/license';import{dayjs as _0x480dc5,UserManagerService as _0x2991de,Inject as _0x2c392c,Injector as _0x114727,Disposable as _0x2a87b6,CustomRangeType as _0x4d9a95,UniverInstanceType as _0x479d0c,DependentOn as _0x5b7360,IConfigService as _0x1cfb99,Plugin as _0xfe02e8,merge as _0xd962df}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xda4de0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f0ad4,IThreadCommentDataSourceService as _0x3343f8}from'@univerjs/thread-comment';import{bufferTime as _0x1a377e}from'rxjs';import{HTTPService as _0x4577f2}from'@univerjs/network';const W=_0x4fa63f(0x18a);var I=(_0x310ffe=>(_0x310ffe[_0x310ffe[_0x4fa63f(0x163)]=0x0]=_0x4fa63f(0x163),_0x310ffe[_0x310ffe[_0x4fa63f(0x136)]=0x1]='Solved',_0x310ffe[_0x310ffe['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x310ffe))(I||{}),v=(_0x20e07b=>(_0x20e07b[_0x20e07b[_0x4fa63f(0x155)]=0x0]=_0x4fa63f(0x155),_0x20e07b[_0x20e07b[_0x4fa63f(0x172)]=0x1]=_0x4fa63f(0x172),_0x20e07b[_0x20e07b[_0x4fa63f(0x189)]=0x2]=_0x4fa63f(0x189),_0x20e07b[_0x20e07b['Edit']=0x3]=_0x4fa63f(0x17c),_0x20e07b[_0x20e07b[_0x4fa63f(0x17a)]=0x4]=_0x4fa63f(0x17a),_0x20e07b[_0x20e07b[_0x4fa63f(0x14f)]=0x5]=_0x4fa63f(0x14f),_0x20e07b[_0x20e07b[_0x4fa63f(0x190)]=-0x1]='UNRECOGNIZED',_0x20e07b))(v||{});const D=_0x260e43=>_0x480dc5(new Date(+_0x260e43))['format'](_0x4fa63f(0x145)),B=async(_0x19f126,_0xf060a)=>{const _0x29313b=_0x4fa63f,_0x3b1a02=_0x19f126[_0x29313b(0x157)](_0x2991de),_0x301327=_0x19f126['get'](_0x4577f2);_0xf060a[_0x29313b(0x14c)](_0x4d8b3f=>{const _0x4d736b=_0x29313b;_0x3b1a02[_0x4d736b(0x17d)](_0x4d8b3f)&&_0xf060a[_0x4d736b(0x13a)](_0x4d8b3f);}),_0xf060a[_0x29313b(0x15d)]&&(await _0x301327[_0x29313b(0x157)]('/universer-api/user/list',{'params':{'userIDs':[..._0xf060a]}}))[_0x29313b(0x179)][_0x29313b(0x18e)][_0x29313b(0x14c)](_0x12a01d=>{const _0x47de77=_0x29313b;_0x12a01d&&_0x3b1a02[_0x47de77(0x170)](_0x12a01d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x279274,_0x156357,_0x334ddf,_0x579463)=>{for(var _0x2df564=_0x579463>0x1?void 0x0:_0x579463?K(_0x156357,_0x334ddf):_0x156357,_0x168ace=_0x279274['length']-0x1,_0x537a09;_0x168ace>=0x0;_0x168ace--)(_0x537a09=_0x279274[_0x168ace])&&(_0x2df564=_0x537a09(_0x2df564)||_0x2df564);return _0x2df564;},p=(_0x2d88d4,_0x4dbf1c)=>(_0x49e07d,_0x49d999)=>_0x4dbf1c(_0x49e07d,_0x49d999,_0x2d88d4);let S=class extends _0x2a87b6{constructor(_0x4824e3,_0x56a606,_0x36bf50,_0xb9200){const _0x264ca9=_0x4fa63f;super(),this[_0x264ca9(0x192)]=_0x4824e3,this[_0x264ca9(0x162)]=_0x56a606,this[_0x264ca9(0x180)]=_0x36bf50,this[_0x264ca9(0x183)]=_0xb9200,this['_init'](),this[_0x264ca9(0x181)]();}[_0x4fa63f(0x181)](){const _0x3a6c16=_0x4fa63f;this[_0x3a6c16(0x16f)](this[_0x3a6c16(0x162)][_0x3a6c16(0x137)]['pipe'](_0x1a377e(0x10))[_0x3a6c16(0x193)](_0x20401f=>{const _0x578f61=_0x3a6c16,_0x24c8f0=new Set();_0x20401f[_0x578f61(0x14c)](_0x58b8c3=>{const _0x3926ff=_0x578f61;switch(_0x58b8c3[_0x3926ff(0x140)]){case _0x3926ff(0x18d):{const _0x2a090c=_0x58b8c3['payload']['personId'];_0x24c8f0[_0x3926ff(0x18d)](_0x2a090c);break;}}}),B(this[_0x578f61(0x183)],_0x24c8f0);}));}[_0x4fa63f(0x15b)](){const _0xe3f4eb=_0x4fa63f;this['disposeWithMe'](this['_commentService'][_0xe3f4eb(0x137)][_0xe3f4eb(0x193)](async _0x1b2aca=>{const _0x46af08=_0xe3f4eb;var _0x10d1d0,_0x2f6e9e,_0x111f51,_0x426e2a;const _0x58fd44=(_0x10d1d0=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x1eea29=>_0x1eea29[_0x46af08(0x169)]===_0x1b2aca['threadId']))==null?void 0x0:_0x10d1d0[_0x46af08(0x15f)];if(!_0x58fd44)return;const {unitId:_0x349c8c,subUnitId:_0x450566}=_0x58fd44;switch(_0x1b2aca['user']&&this['_userService']['addUser'](_0x1b2aca[_0x46af08(0x148)]),_0x1b2aca[_0x46af08(0x140)]){case v['Add']:break;case v['Reply']:{this[_0x46af08(0x162)]['addComment'](_0x349c8c,_0x450566,{'unitId':_0x349c8c,'subUnitId':_0x450566,'ref':'','id':_0x1b2aca[_0x46af08(0x159)],'dT':D(+_0x1b2aca['createTimestamp']),'threadId':_0x1b2aca['threadId'],'personId':(_0x111f51=(_0x2f6e9e=_0x1b2aca[_0x46af08(0x148)])==null?void 0x0:_0x2f6e9e['userID'])!=null?_0x111f51:_0x1b2aca[_0x46af08(0x166)],'text':JSON[_0x46af08(0x15e)](_0x1b2aca[_0x46af08(0x152)]),'parentId':_0x58fd44['id']});break;}case v['Delete']:{const _0x31e814=this[_0x46af08(0x162)][_0x46af08(0x17b)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);_0x31e814&&_0x31e814[_0x46af08(0x161)]&&this[_0x46af08(0x162)][_0x46af08(0x16a)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);break;}case v['Edit']:{this[_0x46af08(0x162)]['updateComment'](_0x349c8c,_0x450566,{'commentId':_0x1b2aca[_0x46af08(0x159)],'text':JSON['parse'](_0x1b2aca[_0x46af08(0x152)])});break;}case v[_0x46af08(0x14f)]:{const _0x2c5751=(_0x426e2a=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x35884b=>_0x35884b[_0x46af08(0x169)]===_0x1b2aca[_0x46af08(0x169)]))==null?void 0x0:_0x426e2a[_0x46af08(0x15f)];_0x2c5751&&this['_threadCommentModel']['resolveComment'](_0x349c8c,_0x450566,_0x2c5751['id'],_0x1b2aca[_0x46af08(0x195)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2c392c(_0x1eb02c)),p(0x1,_0x2c392c(_0x4f0ad4)),p(0x2,_0x2c392c(_0x2991de)),p(0x3,_0x2c392c(_0x114727))],S);const z=_0x4fa63f(0x150),M={};var k=Object[_0x4fa63f(0x171)],Q=(_0x2fbe82,_0x2a654d,_0x581523,_0x10c447)=>{const _0x13e588=_0x4fa63f;for(var _0x464ac1=_0x10c447>0x1?void 0x0:_0x10c447?k(_0x2a654d,_0x581523):_0x2a654d,_0x5a75b0=_0x2fbe82[_0x13e588(0x156)]-0x1,_0x45f7c8;_0x5a75b0>=0x0;_0x5a75b0--)(_0x45f7c8=_0x2fbe82[_0x5a75b0])&&(_0x464ac1=_0x45f7c8(_0x464ac1)||_0x464ac1);return _0x464ac1;},_=(_0x3ab12c,_0xaac9b5)=>(_0x10854b,_0x10ba0c)=>_0xaac9b5(_0x10854b,_0x10ba0c,_0x3ab12c);function X(_0x4d46ab,_0x596345){const _0x4f611f=_0x4fa63f,_0x373c2a=_0x4d46ab[_0x4f611f(0x14e)][0x0];return{..._0x596345,'id':_0x373c2a[_0x4f611f(0x159)],'resolved':_0x4d46ab[_0x4f611f(0x195)]===0x1,'dT':D(_0x373c2a[_0x4f611f(0x146)]),'personId':_0x373c2a[_0x4f611f(0x166)],'threadId':_0x373c2a[_0x4f611f(0x169)]};}function ee(_0x36e51a,_0x5eb9c7,_0xc72475){const _0x3c7b56=_0x4fa63f;var _0x4d6276,_0x371935;if(((_0x371935=(_0x4d6276=_0x36e51a==null?void 0x0:_0x36e51a['replies'])==null?void 0x0:_0x4d6276[_0x3c7b56(0x156)])!=null?_0x371935:0x0)>0x0){const _0x27a489=(_0x176eee,_0x3598b3)=>({'id':_0x176eee['replyId'],'threadId':_0x176eee[_0x3c7b56(0x169)],'dT':D(_0x176eee[_0x3c7b56(0x146)]),'personId':_0x176eee[_0x3c7b56(0x166)],'resolved':_0x36e51a[_0x3c7b56(0x195)]===I['Solved'],'unitId':_0x5eb9c7,'subUnitId':_0xc72475,'text':JSON['parse'](_0x176eee[_0x3c7b56(0x152)]),'parentId':_0x3598b3}),_0x2af274=_0x27a489(_0x36e51a['replies'][0x0]);return{..._0x2af274,'children':_0x36e51a[_0x3c7b56(0x14e)][_0x3c7b56(0x14d)](0x1)[_0x3c7b56(0x158)](_0x397d55=>_0x27a489(_0x397d55,_0x2af274['id']))};}return null;}let f=class{constructor(_0x3e18e7,_0x6c75b4,_0x507908,_0x3d50dd){const _0x270a70=_0x4fa63f;this['_httpService']=_0x3e18e7,this[_0x270a70(0x180)]=_0x6c75b4,this['_sessionService']=_0x507908,this['_injector']=_0x3d50dd;}async['addComment'](_0x14ea74){const _0xf87d96=_0x4fa63f;var _0x58d459,_0x176e79;const {parentId:_0x5589d3,unitId:_0x2d244d,text:_0xb90a6f,threadId:_0x1aaa86}=_0x14ea74,_0x5a36b4=(_0x176e79=(_0x58d459=_0xb90a6f['customRanges'])==null?void 0x0:_0x58d459['filter'](_0x3a1907=>_0x3a1907[_0xf87d96(0x187)]===_0x4d9a95[_0xf87d96(0x144)])[_0xf87d96(0x158)](_0x3fab85=>_0x3fab85[_0xf87d96(0x175)]))!=null?_0x176e79:[],_0x3dca7a=JSON[_0xf87d96(0x167)](_0xb90a6f),_0xc551cf=(await this['_sessionService']['requireSession'](_0x2d244d))[_0xf87d96(0x16e)]();if(_0x5589d3){const _0x2ca50e={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4,'threadId':_0x1aaa86},_0x4ecd05=(await this[_0xf87d96(0x13c)]['post'](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x134),{'body':_0x2ca50e}))[_0xf87d96(0x179)][_0xf87d96(0x15a)];return{..._0x14ea74,'id':_0x4ecd05[_0xf87d96(0x159)],'dT':_0x480dc5(+_0x4ecd05[_0xf87d96(0x146)])['format'](_0xf87d96(0x145)),'personId':_0x4ecd05[_0xf87d96(0x166)]};}else{const _0x1573c0={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4},_0x1e0275=await this['_httpService'][_0xf87d96(0x13b)](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x14b),{'body':_0x1573c0});return X(_0x1e0275[_0xf87d96(0x179)][_0xf87d96(0x184)],_0x14ea74);}}async[_0x4fa63f(0x17e)](_0x490e14){const _0x583578=_0x4fa63f;var _0x5557fd,_0x244b89;const {text:_0x445822,unitId:_0x40db82}=_0x490e14,_0x3b94e9=(_0x244b89=(_0x5557fd=_0x445822[_0x583578(0x149)])==null?void 0x0:_0x5557fd[_0x583578(0x16d)](_0x430240=>_0x430240[_0x583578(0x187)]===_0x4d9a95['COMMENT'])[_0x583578(0x158)](_0x47b2aa=>_0x47b2aa['rangeId']))!=null?_0x244b89:[],_0x5cbc2e=JSON[_0x583578(0x167)](_0x445822),_0x357d36=_0x490e14[_0x583578(0x169)],_0x47c093=_0x490e14['id'],_0x15ec24={'memberId':(await this[_0x583578(0x185)]['requireSession'](_0x40db82))[_0x583578(0x16e)](),'unitId':_0x40db82,'threadId':_0x357d36,'mention':_0x3b94e9,'content':_0x5cbc2e,'replyId':_0x47c093},_0x44f555=await this[_0x583578(0x13c)][_0x583578(0x13b)](_0x583578(0x182)+_0x40db82+'/edit',{'body':_0x15ec24});return!_0x44f555['body'][_0x583578(0x154)]||_0x44f555[_0x583578(0x179)][_0x583578(0x154)]['code']===0x1;}async[_0x4fa63f(0x153)](_0x124eea){const _0x160ce3=_0x4fa63f,{unitId:_0x3ccd6b}=_0x124eea,_0x310b4d=_0x124eea[_0x160ce3(0x169)],_0x4ec1cd={'memberId':this[_0x160ce3(0x180)]['getCurrentUser']()[_0x160ce3(0x191)],'unitId':_0x3ccd6b,'threadId':_0x310b4d,'solved':_0x124eea[_0x160ce3(0x18c)]?I[_0x160ce3(0x136)]:I[_0x160ce3(0x163)]},_0x4ea5e6=await this[_0x160ce3(0x13c)][_0x160ce3(0x13b)](_0x160ce3(0x182)+_0x3ccd6b+_0x160ce3(0x186),{'body':_0x4ec1cd});return!_0x4ea5e6['body']['error']||_0x4ea5e6[_0x160ce3(0x179)][_0x160ce3(0x154)][_0x160ce3(0x164)]===0x1;}async[_0x4fa63f(0x16a)](_0x260310,_0x171069,_0x4c9701,_0x544d7c){const _0x31555e=_0x4fa63f,_0x283497={'memberId':(await this['_sessionService'][_0x31555e(0x143)](_0x260310))[_0x31555e(0x16e)](),'threadId':_0x4c9701,'replyId':_0x544d7c,'unitId':_0x260310},_0x59c685=await this[_0x31555e(0x13c)][_0x31555e(0x13b)](_0x31555e(0x182)+_0x260310+'/delete',{'body':_0x283497});return!_0x59c685['body'][_0x31555e(0x154)]||_0x59c685['body']['error'][_0x31555e(0x164)]===0x1;}async[_0x4fa63f(0x194)](_0x3e6582,_0x2dab70,_0x27196a){const _0x3ebc04=_0x4fa63f,_0x4a5aca={'unitId':_0x3e6582,'threadId':_0x27196a},_0x585171=await this['_httpService'][_0x3ebc04(0x13b)](_0x3ebc04(0x182)+_0x3e6582+'/list',{'body':_0x4a5aca}),_0x5504f6=_0x27196a[_0x3ebc04(0x158)](_0x6c50e4=>ee(_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x173)][_0x6c50e4],_0x3e6582,_0x2dab70))[_0x3ebc04(0x16d)](Boolean);return Object['values'](_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x18e)])[_0x3ebc04(0x14c)](_0x30d0ff=>{const _0x4c7d64=_0x3ebc04;this['_userService'][_0x4c7d64(0x170)](_0x30d0ff);}),_0x5504f6;}['saveCommentToSnapshot'](_0x2c169c){const _0x587810=_0x4fa63f;return{'id':_0x2c169c['id'],'threadId':_0x2c169c[_0x587810(0x169)],'ref':_0x2c169c[_0x587810(0x17f)]};}};f=Q([_(0x0,_0x2c392c(_0x4577f2)),_(0x1,_0x2c392c(_0x2991de)),_(0x2,_0x2c392c(_0x16db22)),_(0x3,_0x2c392c(_0x114727))],f);var re=Object[_0x4fa63f(0x171)],te=(_0x1b99c2,_0x1a13e8,_0xecd51d,_0x1274a0)=>{const _0x1be127=_0x4fa63f;for(var _0x3b2eda=_0x1274a0>0x1?void 0x0:_0x1274a0?re(_0x1a13e8,_0xecd51d):_0x1a13e8,_0x3235ed=_0x1b99c2[_0x1be127(0x156)]-0x1,_0x3db552;_0x3235ed>=0x0;_0x3235ed--)(_0x3db552=_0x1b99c2[_0x3235ed])&&(_0x3b2eda=_0x3db552(_0x3b2eda)||_0x3b2eda);return _0x3b2eda;},N=(_0x5715bf,_0x3b3d80)=>(_0x2d8265,_0x54ace6)=>_0x3b3d80(_0x2d8265,_0x54ace6,_0x5715bf);function _0x2941(){const _0x39ca0c=['get','map','replyId','reply','_init','setConfig','size','parse','root','2837250iPetyY','parentId','_threadCommentModel','OpenOrReOpen','code','_config','userId','stringify','503742VCEueg','threadId','deleteComment','dataSource','1277600XwVAOF','filter','getMemberID','disposeWithMe','addUser','getOwnPropertyDescriptor','Add','comments','966412HwqXnU','rangeId','symbol','_configService','_threadCommentDataSourceService','body','Delete','getComment','Edit','getUser','updateComment','ref','_userService','_initUserSync','/universer-api/comment/unit/','_injector','comment','_sessionService','/solved','rangeType','onReady','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','resolved','add','users','_initDataSource','UNRECOGNIZED','userID','_commentService','subscribe','listComments','solved','/reply','getUnit','Solved','commentUpdate$','unitId','3977890QZHMfo','delete','post','_httpService','6598MpSibx','pluginName','129MUxCDe','type','onStarting','20DcKLMW','requireSession','COMMENT','YYYY/MM/DD\x20HH:mm','createTimestamp','find','user','customRanges','176402sHRsRE','/add','forEach','slice','replies','Solve','thread-comment-data-source.config','UNIVER_UNKNOWN','content','resolveComment','error','Unknown','length'];_0x2941=function(){return _0x39ca0c;};return _0x2941();}let g=class extends _0x2a87b6{constructor(_0x37079f,_0xb2d9da){const _0x890789=_0x4fa63f;super(),this[_0x890789(0x178)]=_0x37079f,this[_0x890789(0x18b)]=_0xb2d9da,this[_0x890789(0x18f)]();}[_0x4fa63f(0x18f)](){const _0x6fc715=_0x4fa63f;this['_threadCommentDataSourceService'][_0x6fc715(0x16b)]=this[_0x6fc715(0x18b)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x3343f8),N(0x1,_0x2c392c(f))],g);var se=Object['defineProperty'],oe=Object[_0x4fa63f(0x171)],ne=(_0x4ae391,_0x213768,_0x355cb2)=>_0x213768 in _0x4ae391?se(_0x4ae391,_0x213768,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x355cb2}):_0x4ae391[_0x213768]=_0x355cb2,ie=(_0x2ec98f,_0x18cf9f,_0x46748e,_0x42cbe1)=>{const _0x1cb995=_0x4fa63f;for(var _0x115882=_0x42cbe1>0x1?void 0x0:_0x42cbe1?oe(_0x18cf9f,_0x46748e):_0x18cf9f,_0xa6acdf=_0x2ec98f[_0x1cb995(0x156)]-0x1,_0x1923bf;_0xa6acdf>=0x0;_0xa6acdf--)(_0x1923bf=_0x2ec98f[_0xa6acdf])&&(_0x115882=_0x1923bf(_0x115882)||_0x115882);return _0x115882;},w=(_0x320333,_0x3ab90b)=>(_0x32db0c,_0x18f4aa)=>_0x3ab90b(_0x32db0c,_0x18f4aa,_0x320333),$=(_0x42ae05,_0x2076ee,_0x4f500a)=>ne(_0x42ae05,typeof _0x2076ee!=_0x4fa63f(0x176)?_0x2076ee+'':_0x2076ee,_0x4f500a);let b=class extends _0xfe02e8{constructor(_0x29fc04=M,_0x32fa88,_0x404bd3){const _0xf420b7=_0x4fa63f;super(),this[_0xf420b7(0x165)]=_0x29fc04,this[_0xf420b7(0x183)]=_0x32fa88,this[_0xf420b7(0x177)]=_0x404bd3;const {..._0x40133f}=_0xd962df({},M,this['_config']);this[_0xf420b7(0x177)][_0xf420b7(0x15c)](z,_0x40133f);}[_0x4fa63f(0x141)](){const _0x12c2ca=_0x4fa63f;[[f],[g],[S]][_0x12c2ca(0x14c)](_0x25d63a=>{const _0x1436bb=_0x12c2ca;this['_injector'][_0x1436bb(0x18d)](_0x25d63a);});}[_0x4fa63f(0x188)](){const _0x1e694f=_0x4fa63f;this[_0x1e694f(0x183)][_0x1e694f(0x157)](g),this[_0x1e694f(0x183)]['get'](S);}};$(b,_0x4fa63f(0x13e),W),$(b,_0x4fa63f(0x140),_0x479d0c[_0x4fa63f(0x151)]),b=ie([_0x5b7360(_0xda4de0,_0x87c461,_0x1801ee),w(0x1,_0x2c392c(_0x114727)),w(0x2,_0x1cfb99)],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 _0x17fe(){const _0xc355f0=['body','parse','/delete','10ZVGnUc','deleteComment','get','replies','syncUpdateMutationToColla','unitId','pipe','parentId','getCurrentUser','3286448UxaMVd','toStringTag','find','rangeId','format','UniverThreadCommentUi','rangeType','CommentService','UniverInstanceType','object','Plugin','864995ukbDvh','104134evAyZG','merge','UniverCore','Add','_threadCommentModel','_threadCommentDataSource','UserManagerService','_initUserSync','Disposable','UniverNetwork','2167376aAwnnJ','delete','user','thread-comment-data-source.config','302764zxOrcR','6oiYtWQ','300596GtMtek','Unknown','Solved','_httpService','_config','ref','symbol','UniverThreadCommentUIPlugin','/universer-api/user/list','/reply','requireSession','threadId','Edit','replyId','@univerjs/network','addUser','@univerjs/thread-comment-ui','COMMENT','stringify','post','solved','/list','filter','dayjs','reply','addComment','resolveComment','getComment','_configService','userId','OpenOrReOpen','subscribe','_commentService','Delete','rxjs','createTimestamp','_initDataSource','Injector','getUnit','3aLwSjo','function','customRanges','DependentOn','values','commentUpdate$','HTTPService','bufferTime','UniverProCollaborationClient','/edit','getMemberID','type','UniverThreadComment','comments','code','personId','updateComment','onReady','defineProperty','root','_userService','/add','map','error','length','UniverThreadCommentDataSourcePlugin','content','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','exports','amd','size','_sessionService','Reply','/universer-api/comment/unit/','UniverProLicense','userID','1936422hsDnhT','disposeWithMe','_injector','getUser','getOwnPropertyDescriptor','users','Solve','IConfigService','comment','4kEojdb','payload','UniverLicensePlugin','forEach','CollaborationSessionService','saveCommentToSnapshot','UniverProThreadCommentDatasource','onStarting','slice','UNRECOGNIZED','@univerjs/thread-comment','Inject','@univerjs-pro/collaboration-client'];_0x17fe=function(){return _0xc355f0;};return _0x17fe();}function _0xefcd(_0x9efce8,_0x4261d5){const _0x17fef4=_0x17fe();return _0xefcd=function(_0xefcdc,_0x37d226){_0xefcdc=_0xefcdc-0x192;let _0xcb20b2=_0x17fef4[_0xefcdc];return _0xcb20b2;},_0xefcd(_0x9efce8,_0x4261d5);}(function(_0xaf0cb1,_0x1765ff){const _0xa008ca=_0xefcd,_0x304f16=_0xaf0cb1();while(!![]){try{const _0x519598=parseInt(_0xa008ca(0x21b))/0x1*(parseInt(_0xa008ca(0x1b4))/0x2)+-parseInt(_0xa008ca(0x1eb))/0x3*(-parseInt(_0xa008ca(0x1c4))/0x4)+-parseInt(_0xa008ca(0x1b3))/0x5*(-parseInt(_0xa008ca(0x1c3))/0x6)+-parseInt(_0xa008ca(0x1c2))/0x7+parseInt(_0xa008ca(0x1be))/0x8+-parseInt(_0xa008ca(0x212))/0x9+-parseInt(_0xa008ca(0x19f))/0xa*(parseInt(_0xa008ca(0x1a8))/0xb);if(_0x519598===_0x1765ff)break;else _0x304f16['push'](_0x304f16['shift']());}catch(_0x5686c4){_0x304f16['push'](_0x304f16['shift']());}}}(_0x17fe,0x298b0),function(_0x39bddc,_0x538340){const _0x2e2034=_0xefcd;typeof exports==_0x2e2034(0x1b1)&&typeof module<'u'?_0x538340(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==_0x2e2034(0x1ec)&&define[_0x2e2034(0x20b)]?define([_0x2e2034(0x20a),_0x2e2034(0x19b),'@univerjs-pro/license','@univerjs/core',_0x2e2034(0x1d4),_0x2e2034(0x199),_0x2e2034(0x1e6),_0x2e2034(0x1d2)],_0x538340):(_0x39bddc=typeof globalThis<'u'?globalThis:_0x39bddc||self,_0x538340(_0x39bddc[_0x2e2034(0x195)]={},_0x39bddc[_0x2e2034(0x1f3)],_0x39bddc[_0x2e2034(0x210)],_0x39bddc[_0x2e2034(0x1b6)],_0x39bddc[_0x2e2034(0x1ad)],_0x39bddc[_0x2e2034(0x1f7)],_0x39bddc[_0x2e2034(0x1e6)],_0x39bddc[_0x2e2034(0x1bd)]));}(this,function(_0x374dba,_0x33849b,_0x8f02c1,_0x1efb3c,_0x2e3e25,_0x3c4d09,_0x20e18a,_0x2f9148){'use strict';const _0x22442c=_0xefcd;const _0x1331fb=_0x22442c(0x207);var _0x241564=(_0x1b5bfb=>(_0x1b5bfb[_0x1b5bfb[_0x22442c(0x1e2)]=0x0]='OpenOrReOpen',_0x1b5bfb[_0x1b5bfb[_0x22442c(0x1c6)]=0x1]=_0x22442c(0x1c6),_0x1b5bfb[_0x1b5bfb[_0x22442c(0x198)]=-0x1]='UNRECOGNIZED',_0x1b5bfb))(_0x241564||{}),_0x4c1b79=(_0x2dc863=>(_0x2dc863[_0x2dc863[_0x22442c(0x1c5)]=0x0]='Unknown',_0x2dc863[_0x2dc863[_0x22442c(0x1b7)]=0x1]='Add',_0x2dc863[_0x2dc863['Reply']=0x2]=_0x22442c(0x20e),_0x2dc863[_0x2dc863[_0x22442c(0x1d0)]=0x3]=_0x22442c(0x1d0),_0x2dc863[_0x2dc863[_0x22442c(0x1e5)]=0x4]=_0x22442c(0x1e5),_0x2dc863[_0x2dc863[_0x22442c(0x218)]=0x5]=_0x22442c(0x218),_0x2dc863[_0x2dc863[_0x22442c(0x198)]=-0x1]=_0x22442c(0x198),_0x2dc863))(_0x4c1b79||{});const _0x5b9c7e=_0x23bca9=>_0x1efb3c[_0x22442c(0x1db)](new Date(+_0x23bca9))[_0x22442c(0x1ac)](_0x22442c(0x209)),_0x341fda=async(_0x55da6f,_0x166513)=>{const _0x468cbe=_0x22442c,_0x2e4070=_0x55da6f[_0x468cbe(0x1a1)](_0x1efb3c[_0x468cbe(0x1ba)]),_0x4a9d92=_0x55da6f[_0x468cbe(0x1a1)](_0x2f9148[_0x468cbe(0x1f1)]);_0x166513[_0x468cbe(0x192)](_0x560321=>{const _0x4a35e0=_0x468cbe;_0x2e4070[_0x4a35e0(0x215)](_0x560321)&&_0x166513[_0x4a35e0(0x1bf)](_0x560321);}),_0x166513[_0x468cbe(0x20c)]&&(await _0x4a9d92[_0x468cbe(0x1a1)](_0x468cbe(0x1cc),{'params':{'userIDs':[..._0x166513]}}))[_0x468cbe(0x19c)][_0x468cbe(0x217)][_0x468cbe(0x192)](_0x12d983=>{_0x12d983&&_0x2e4070['addUser'](_0x12d983);});};var _0x519d65=Object['getOwnPropertyDescriptor'],_0x4375b8=(_0x3acf8f,_0x1e693c,_0x4780aa,_0x722920)=>{const _0x374fd0=_0x22442c;for(var _0x5ecece=_0x722920>0x1?void 0x0:_0x722920?_0x519d65(_0x1e693c,_0x4780aa):_0x1e693c,_0x52af0c=_0x3acf8f[_0x374fd0(0x203)]-0x1,_0x3ff420;_0x52af0c>=0x0;_0x52af0c--)(_0x3ff420=_0x3acf8f[_0x52af0c])&&(_0x5ecece=_0x3ff420(_0x5ecece)||_0x5ecece);return _0x5ecece;},_0x303ca2=(_0x40325c,_0x4627b7)=>(_0x2a706d,_0x4427c)=>_0x4627b7(_0x2a706d,_0x4427c,_0x40325c);let _0x2ec182=class extends _0x1efb3c[_0x22442c(0x1bc)]{constructor(_0x225011,_0x5f4b9e,_0x5934be,_0x19d9f8){const _0x1bcf6a=_0x22442c;super(),this['_commentService']=_0x225011,this[_0x1bcf6a(0x1b8)]=_0x5f4b9e,this[_0x1bcf6a(0x1ff)]=_0x5934be,this['_injector']=_0x19d9f8,this['_init'](),this['_initUserSync']();}[_0x22442c(0x1bb)](){const _0x355a5d=_0x22442c;this['disposeWithMe'](this['_threadCommentModel'][_0x355a5d(0x1f0)][_0x355a5d(0x1a5)](_0x20e18a[_0x355a5d(0x1f2)](0x10))[_0x355a5d(0x1e3)](_0x236c54=>{const _0x360f8f=_0x355a5d,_0x15d2fa=new Set();_0x236c54[_0x360f8f(0x192)](_0x65a13b=>{const _0x1be4ee=_0x360f8f;switch(_0x65a13b[_0x1be4ee(0x1f6)]){case _0x1be4ee(0x208):{const _0x3d0349=_0x65a13b[_0x1be4ee(0x21c)][_0x1be4ee(0x1fa)];_0x15d2fa['add'](_0x3d0349);break;}}}),_0x341fda(this[_0x360f8f(0x214)],_0x15d2fa);}));}['_init'](){const _0x2e103f=_0x22442c;this[_0x2e103f(0x213)](this[_0x2e103f(0x1e4)][_0x2e103f(0x1f0)][_0x2e103f(0x1e3)](async _0x418bcc=>{const _0x4b70e0=_0x2e103f;var _0x25e27b,_0x5555b3,_0x47805f,_0xbb3654;const _0x34684a=(_0x25e27b=this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1ea)](_0x418bcc[_0x4b70e0(0x1a4)])[_0x4b70e0(0x1aa)](_0x1dad88=>_0x1dad88['threadId']===_0x418bcc[_0x4b70e0(0x1cf)]))==null?void 0x0:_0x25e27b['root'];if(!_0x34684a)return;const {unitId:_0x5c8be8,subUnitId:_0x53b1fa}=_0x34684a;switch(_0x418bcc[_0x4b70e0(0x1c0)]&&this[_0x4b70e0(0x1ff)][_0x4b70e0(0x1d3)](_0x418bcc[_0x4b70e0(0x1c0)]),_0x418bcc[_0x4b70e0(0x1f6)]){case _0x4c1b79['Add']:break;case _0x4c1b79[_0x4b70e0(0x20e)]:{this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1dd)](_0x5c8be8,_0x53b1fa,{'unitId':_0x5c8be8,'subUnitId':_0x53b1fa,'ref':'','id':_0x418bcc[_0x4b70e0(0x1d1)],'dT':_0x5b9c7e(+_0x418bcc[_0x4b70e0(0x1e7)]),'threadId':_0x418bcc['threadId'],'personId':(_0x47805f=(_0x5555b3=_0x418bcc['user'])==null?void 0x0:_0x5555b3[_0x4b70e0(0x211)])!=null?_0x47805f:_0x418bcc[_0x4b70e0(0x1e1)],'text':JSON[_0x4b70e0(0x19d)](_0x418bcc[_0x4b70e0(0x205)]),'parentId':_0x34684a['id']});break;}case _0x4c1b79[_0x4b70e0(0x1e5)]:{const _0x2be811=this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1df)](_0x5c8be8,_0x53b1fa,_0x418bcc['replyId']);_0x2be811&&_0x2be811[_0x4b70e0(0x1a6)]&&this[_0x4b70e0(0x1b8)]['deleteComment'](_0x5c8be8,_0x53b1fa,_0x418bcc['replyId']);break;}case _0x4c1b79[_0x4b70e0(0x1d0)]:{this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1fb)](_0x5c8be8,_0x53b1fa,{'commentId':_0x418bcc[_0x4b70e0(0x1d1)],'text':JSON['parse'](_0x418bcc[_0x4b70e0(0x205)])});break;}case _0x4c1b79[_0x4b70e0(0x218)]:{const _0x5c6f18=(_0xbb3654=this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1ea)](_0x418bcc[_0x4b70e0(0x1a4)])['find'](_0x19108c=>_0x19108c['threadId']===_0x418bcc['threadId']))==null?void 0x0:_0xbb3654[_0x4b70e0(0x1fe)];_0x5c6f18&&this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1de)](_0x5c8be8,_0x53b1fa,_0x5c6f18['id'],_0x418bcc[_0x4b70e0(0x1d8)]===_0x241564['Solved']);break;}}}));}};_0x2ec182=_0x4375b8([_0x303ca2(0x0,_0x1efb3c[_0x22442c(0x19a)](_0x33849b[_0x22442c(0x1af)])),_0x303ca2(0x1,_0x1efb3c[_0x22442c(0x19a)](_0x3c4d09['ThreadCommentModel'])),_0x303ca2(0x2,_0x1efb3c[_0x22442c(0x19a)](_0x1efb3c[_0x22442c(0x1ba)])),_0x303ca2(0x3,_0x1efb3c[_0x22442c(0x19a)](_0x1efb3c[_0x22442c(0x1e9)]))],_0x2ec182);const _0x4baf23=_0x22442c(0x1c1),_0x1b4ed2={};var _0x2fbf50=Object[_0x22442c(0x216)],_0xb57221=(_0x27a3a5,_0x2538a9,_0x5f13df,_0x2de93f)=>{const _0x45d511=_0x22442c;for(var _0x334f8a=_0x2de93f>0x1?void 0x0:_0x2de93f?_0x2fbf50(_0x2538a9,_0x5f13df):_0x2538a9,_0x2bd060=_0x27a3a5[_0x45d511(0x203)]-0x1,_0x42dd0f;_0x2bd060>=0x0;_0x2bd060--)(_0x42dd0f=_0x27a3a5[_0x2bd060])&&(_0x334f8a=_0x42dd0f(_0x334f8a)||_0x334f8a);return _0x334f8a;},_0x398be4=(_0x466825,_0x3db138)=>(_0x340caa,_0x5cc0bb)=>_0x3db138(_0x340caa,_0x5cc0bb,_0x466825);function _0x132565(_0x11932a,_0x123b32){const _0x22a71e=_0x22442c,_0xef9385=_0x11932a['replies'][0x0];return{..._0x123b32,'id':_0xef9385['replyId'],'resolved':_0x11932a[_0x22a71e(0x1d8)]===0x1,'dT':_0x5b9c7e(_0xef9385[_0x22a71e(0x1e7)]),'personId':_0xef9385[_0x22a71e(0x1e1)],'threadId':_0xef9385['threadId']};}function _0x49d447(_0x472148,_0x209515,_0x1c840a){const _0x4a0a12=_0x22442c;var _0x4c5c10,_0x9d7d8;if(((_0x9d7d8=(_0x4c5c10=_0x472148==null?void 0x0:_0x472148['replies'])==null?void 0x0:_0x4c5c10[_0x4a0a12(0x203)])!=null?_0x9d7d8:0x0)>0x0){const _0x3c683c=(_0x5c8651,_0x5c67c0)=>({'id':_0x5c8651['replyId'],'threadId':_0x5c8651[_0x4a0a12(0x1cf)],'dT':_0x5b9c7e(_0x5c8651[_0x4a0a12(0x1e7)]),'personId':_0x5c8651[_0x4a0a12(0x1e1)],'resolved':_0x472148[_0x4a0a12(0x1d8)]===_0x241564[_0x4a0a12(0x1c6)],'unitId':_0x209515,'subUnitId':_0x1c840a,'text':JSON[_0x4a0a12(0x19d)](_0x5c8651[_0x4a0a12(0x205)]),'parentId':_0x5c67c0}),_0x2867d3=_0x3c683c(_0x472148[_0x4a0a12(0x1a2)][0x0]);return{..._0x2867d3,'children':_0x472148[_0x4a0a12(0x1a2)][_0x4a0a12(0x197)](0x1)[_0x4a0a12(0x201)](_0xe1218f=>_0x3c683c(_0xe1218f,_0x2867d3['id']))};}return null;}let _0x4df6bc=class{constructor(_0x5c9c2c,_0x362409,_0x24af9f,_0x1b76b9){const _0x945ba9=_0x22442c;this[_0x945ba9(0x1c7)]=_0x5c9c2c,this[_0x945ba9(0x1ff)]=_0x362409,this[_0x945ba9(0x20d)]=_0x24af9f,this[_0x945ba9(0x214)]=_0x1b76b9;}async[_0x22442c(0x1dd)](_0x2b2556){const _0x9555b4=_0x22442c;var _0x55c87b,_0x420ad7;const {parentId:_0x5b44a0,unitId:_0x4f0a8e,text:_0x88ed3,threadId:_0x49b013}=_0x2b2556,_0x466f9f=(_0x420ad7=(_0x55c87b=_0x88ed3[_0x9555b4(0x1ed)])==null?void 0x0:_0x55c87b[_0x9555b4(0x1da)](_0xd9dc89=>_0xd9dc89['rangeType']===_0x1efb3c['CustomRangeType'][_0x9555b4(0x1d5)])[_0x9555b4(0x201)](_0x16d180=>_0x16d180[_0x9555b4(0x1ab)]))!=null?_0x420ad7:[],_0x26e49e=JSON['stringify'](_0x88ed3),_0x2d5c75=(await this[_0x9555b4(0x20d)][_0x9555b4(0x1ce)](_0x4f0a8e))[_0x9555b4(0x1f5)]();if(_0x5b44a0){const _0xa5d922={'memberId':_0x2d5c75,'unitId':_0x4f0a8e,'content':_0x26e49e,'mention':_0x466f9f,'threadId':_0x49b013},_0x3a2e29=(await this[_0x9555b4(0x1c7)]['post'](_0x9555b4(0x20f)+_0x4f0a8e+_0x9555b4(0x1cd),{'body':_0xa5d922}))[_0x9555b4(0x19c)][_0x9555b4(0x1dc)];return{..._0x2b2556,'id':_0x3a2e29[_0x9555b4(0x1d1)],'dT':_0x1efb3c['dayjs'](+_0x3a2e29['createTimestamp'])[_0x9555b4(0x1ac)](_0x9555b4(0x209)),'personId':_0x3a2e29[_0x9555b4(0x1e1)]};}else{const _0x50b654={'memberId':_0x2d5c75,'unitId':_0x4f0a8e,'content':_0x26e49e,'mention':_0x466f9f},_0x29be41=await this[_0x9555b4(0x1c7)]['post'](_0x9555b4(0x20f)+_0x4f0a8e+_0x9555b4(0x200),{'body':_0x50b654});return _0x132565(_0x29be41[_0x9555b4(0x19c)][_0x9555b4(0x21a)],_0x2b2556);}}async[_0x22442c(0x1fb)](_0x4e0940){const _0x22e418=_0x22442c;var _0x35e7fc,_0x1e9db3;const {text:_0xbab508,unitId:_0x4604c8}=_0x4e0940,_0x2a2760=(_0x1e9db3=(_0x35e7fc=_0xbab508[_0x22e418(0x1ed)])==null?void 0x0:_0x35e7fc[_0x22e418(0x1da)](_0x125540=>_0x125540[_0x22e418(0x1ae)]===_0x1efb3c['CustomRangeType'][_0x22e418(0x1d5)])[_0x22e418(0x201)](_0x23dabf=>_0x23dabf['rangeId']))!=null?_0x1e9db3:[],_0x208821=JSON[_0x22e418(0x1d6)](_0xbab508),_0x50c0e7=_0x4e0940[_0x22e418(0x1cf)],_0x5e126a=_0x4e0940['id'],_0x44baf8={'memberId':(await this[_0x22e418(0x20d)][_0x22e418(0x1ce)](_0x4604c8))[_0x22e418(0x1f5)](),'unitId':_0x4604c8,'threadId':_0x50c0e7,'mention':_0x2a2760,'content':_0x208821,'replyId':_0x5e126a},_0x4600aa=await this[_0x22e418(0x1c7)][_0x22e418(0x1d7)](_0x22e418(0x20f)+_0x4604c8+_0x22e418(0x1f4),{'body':_0x44baf8});return!_0x4600aa[_0x22e418(0x19c)][_0x22e418(0x202)]||_0x4600aa[_0x22e418(0x19c)][_0x22e418(0x202)][_0x22e418(0x1f9)]===0x1;}async[_0x22442c(0x1de)](_0x58f34e){const _0x3a5925=_0x22442c,{unitId:_0x2315b9}=_0x58f34e,_0x2f3b47=_0x58f34e[_0x3a5925(0x1cf)],_0x4ade7d={'memberId':this['_userService'][_0x3a5925(0x1a7)]()[_0x3a5925(0x211)],'unitId':_0x2315b9,'threadId':_0x2f3b47,'solved':_0x58f34e['resolved']?_0x241564[_0x3a5925(0x1c6)]:_0x241564[_0x3a5925(0x1e2)]},_0x5ec2a9=await this[_0x3a5925(0x1c7)][_0x3a5925(0x1d7)]('/universer-api/comment/unit/'+_0x2315b9+'/solved',{'body':_0x4ade7d});return!_0x5ec2a9[_0x3a5925(0x19c)][_0x3a5925(0x202)]||_0x5ec2a9[_0x3a5925(0x19c)]['error'][_0x3a5925(0x1f9)]===0x1;}async[_0x22442c(0x1a0)](_0x36138c,_0x3fb287,_0x2cd683,_0x17d712){const _0x3bb10b=_0x22442c,_0x377f74={'memberId':(await this['_sessionService'][_0x3bb10b(0x1ce)](_0x36138c))[_0x3bb10b(0x1f5)](),'threadId':_0x2cd683,'replyId':_0x17d712,'unitId':_0x36138c},_0x2eace7=await this[_0x3bb10b(0x1c7)][_0x3bb10b(0x1d7)](_0x3bb10b(0x20f)+_0x36138c+_0x3bb10b(0x19e),{'body':_0x377f74});return!_0x2eace7['body'][_0x3bb10b(0x202)]||_0x2eace7[_0x3bb10b(0x19c)]['error'][_0x3bb10b(0x1f9)]===0x1;}async['listComments'](_0x591770,_0x446ac8,_0x9e9216){const _0x128f5b=_0x22442c,_0x5a4698={'unitId':_0x591770,'threadId':_0x9e9216},_0x3114d3=await this[_0x128f5b(0x1c7)][_0x128f5b(0x1d7)](_0x128f5b(0x20f)+_0x591770+_0x128f5b(0x1d9),{'body':_0x5a4698}),_0x58a73c=_0x9e9216[_0x128f5b(0x201)](_0x13768c=>_0x49d447(_0x3114d3['body'][_0x128f5b(0x1f8)][_0x13768c],_0x591770,_0x446ac8))[_0x128f5b(0x1da)](Boolean);return Object[_0x128f5b(0x1ef)](_0x3114d3['body'][_0x128f5b(0x217)])[_0x128f5b(0x192)](_0x450880=>{const _0x28beb9=_0x128f5b;this[_0x28beb9(0x1ff)][_0x28beb9(0x1d3)](_0x450880);}),_0x58a73c;}[_0x22442c(0x194)](_0x25ee36){const _0xaa665b=_0x22442c;return{'id':_0x25ee36['id'],'threadId':_0x25ee36['threadId'],'ref':_0x25ee36[_0xaa665b(0x1c9)]};}};_0x4df6bc=_0xb57221([_0x398be4(0x0,_0x1efb3c[_0x22442c(0x19a)](_0x2f9148[_0x22442c(0x1f1)])),_0x398be4(0x1,_0x1efb3c['Inject'](_0x1efb3c[_0x22442c(0x1ba)])),_0x398be4(0x2,_0x1efb3c[_0x22442c(0x19a)](_0x33849b[_0x22442c(0x193)])),_0x398be4(0x3,_0x1efb3c['Inject'](_0x1efb3c['Injector']))],_0x4df6bc);var _0x57740e=Object[_0x22442c(0x216)],_0x222f0e=(_0x6e4c11,_0x539e29,_0x502c10,_0x5cb180)=>{const _0x19f701=_0x22442c;for(var _0x593d1f=_0x5cb180>0x1?void 0x0:_0x5cb180?_0x57740e(_0x539e29,_0x502c10):_0x539e29,_0x42e250=_0x6e4c11[_0x19f701(0x203)]-0x1,_0x5cf4be;_0x42e250>=0x0;_0x42e250--)(_0x5cf4be=_0x6e4c11[_0x42e250])&&(_0x593d1f=_0x5cf4be(_0x593d1f)||_0x593d1f);return _0x593d1f;},_0x27e585=(_0x34a8b0,_0x32e3e1)=>(_0x14657f,_0x5d8d3c)=>_0x32e3e1(_0x14657f,_0x5d8d3c,_0x34a8b0);let _0xfe7158=class extends _0x1efb3c[_0x22442c(0x1bc)]{constructor(_0x13122d,_0x791d9f){const _0x1be153=_0x22442c;super(),this['_threadCommentDataSourceService']=_0x13122d,this[_0x1be153(0x1b9)]=_0x791d9f,this['_initDataSource']();}[_0x22442c(0x1e8)](){const _0x539e26=_0x22442c;this[_0x539e26(0x206)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x539e26(0x1a3)]=!0x1;}};_0xfe7158=_0x222f0e([_0x27e585(0x0,_0x3c4d09['IThreadCommentDataSourceService']),_0x27e585(0x1,_0x1efb3c['Inject'](_0x4df6bc))],_0xfe7158);var _0x8d551d=Object[_0x22442c(0x1fd)],_0x1c2ee5=Object[_0x22442c(0x216)],_0x1749fb=(_0xba12bb,_0x3a5161,_0x4eb3b6)=>_0x3a5161 in _0xba12bb?_0x8d551d(_0xba12bb,_0x3a5161,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4eb3b6}):_0xba12bb[_0x3a5161]=_0x4eb3b6,_0x4bd5a0=(_0x31cfed,_0x29c2e6,_0x181a2d,_0x164275)=>{for(var _0x5e1d80=_0x164275>0x1?void 0x0:_0x164275?_0x1c2ee5(_0x29c2e6,_0x181a2d):_0x29c2e6,_0x232dc1=_0x31cfed['length']-0x1,_0x265c8d;_0x232dc1>=0x0;_0x232dc1--)(_0x265c8d=_0x31cfed[_0x232dc1])&&(_0x5e1d80=_0x265c8d(_0x5e1d80)||_0x5e1d80);return _0x5e1d80;},_0xff5c6d=(_0x3554eb,_0x1722d9)=>(_0x91d2b5,_0x228e00)=>_0x1722d9(_0x91d2b5,_0x228e00,_0x3554eb),_0x315123=(_0x2f219a,_0x376c8f,_0x5b17f1)=>_0x1749fb(_0x2f219a,typeof _0x376c8f!=_0x22442c(0x1ca)?_0x376c8f+'':_0x376c8f,_0x5b17f1);_0x374dba[_0x22442c(0x204)]=class extends _0x1efb3c[_0x22442c(0x1b2)]{constructor(_0x183f6f=_0x1b4ed2,_0x58ddbb,_0x210eaf){const _0x22a275=_0x22442c;super(),this[_0x22a275(0x1c8)]=_0x183f6f,this[_0x22a275(0x214)]=_0x58ddbb,this[_0x22a275(0x1e0)]=_0x210eaf;const {..._0x2954aa}=_0x1efb3c[_0x22a275(0x1b5)]({},_0x1b4ed2,this['_config']);this[_0x22a275(0x1e0)]['setConfig'](_0x4baf23,_0x2954aa);}[_0x22442c(0x196)](){const _0x55a527=_0x22442c;[[_0x4df6bc],[_0xfe7158],[_0x2ec182]][_0x55a527(0x192)](_0x52906a=>{const _0x3aaa14=_0x55a527;this[_0x3aaa14(0x214)][_0x3aaa14(0x208)](_0x52906a);});}[_0x22442c(0x1fc)](){const _0x57f661=_0x22442c;this['_injector'][_0x57f661(0x1a1)](_0xfe7158),this[_0x57f661(0x214)][_0x57f661(0x1a1)](_0x2ec182);}},_0x315123(_0x374dba['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1331fb),_0x315123(_0x374dba['UniverThreadCommentDataSourcePlugin'],_0x22442c(0x1f6),_0x1efb3c[_0x22442c(0x1b0)]['UNIVER_UNKNOWN']),_0x374dba[_0x22442c(0x204)]=_0x4bd5a0([_0x1efb3c[_0x22442c(0x1ee)](_0x2e3e25[_0x22442c(0x1cb)],_0x33849b['UniverCollaborationClientPlugin'],_0x8f02c1[_0x22442c(0x21d)]),_0xff5c6d(0x1,_0x1efb3c[_0x22442c(0x19a)](_0x1efb3c[_0x22442c(0x1e9)])),_0xff5c6d(0x2,_0x1efb3c[_0x22442c(0x219)])],_0x374dba[_0x22442c(0x204)]),Object[_0x22442c(0x1fd)](_0x374dba,Symbol[_0x22442c(0x1a9)],{'value':'Module'});}));
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.202507101607",
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.202507101607",
49
+ "@univerjs-pro/license": "0.9.1-nightly.202507101607",
50
+ "@univerjs/core": "0.9.1-nightly.202507101607",
51
+ "@univerjs/network": "0.9.1-nightly.202507101607",
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.202507101607",
54
+ "@univerjs/thread-comment-ui": "0.9.1-nightly.202507101607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",