@univerjs-pro/thread-comment-datasource 0.12.4 → 0.13.0

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 _0x53e49a=_0x3226;(function(_0x3bacf5,_0x30bd23){const _0x5d184f=_0x3226,_0x1c0d8=_0x3bacf5();while(!![]){try{const _0x50f836=-parseInt(_0x5d184f(0x1d6))/0x1*(parseInt(_0x5d184f(0x1ee))/0x2)+parseInt(_0x5d184f(0x1f1))/0x3+-parseInt(_0x5d184f(0x1b5))/0x4+-parseInt(_0x5d184f(0x1b9))/0x5+-parseInt(_0x5d184f(0x20a))/0x6+parseInt(_0x5d184f(0x1af))/0x7+parseInt(_0x5d184f(0x1b7))/0x8;if(_0x50f836===_0x30bd23)break;else _0x1c0d8['push'](_0x1c0d8['shift']());}catch(_0x41ac5d){_0x1c0d8['push'](_0x1c0d8['shift']());}}}(_0xec14,0xd1ddf));Object[_0x53e49a(0x211)](exports,Symbol['toStringTag'],{'value':_0x53e49a(0x20e)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x53e49a(0x1be);var I=(_0x3d920c=>(_0x3d920c[_0x3d920c[_0x53e49a(0x205)]=0x0]=_0x53e49a(0x205),_0x3d920c[_0x3d920c[_0x53e49a(0x1f8)]=0x1]=_0x53e49a(0x1f8),_0x3d920c[_0x3d920c[_0x53e49a(0x1ef)]=-0x1]=_0x53e49a(0x1ef),_0x3d920c))(I||{}),v=(_0x10c702=>(_0x10c702[_0x10c702['Unknown']=0x0]=_0x53e49a(0x20f),_0x10c702[_0x10c702['Add']=0x1]=_0x53e49a(0x1c4),_0x10c702[_0x10c702[_0x53e49a(0x20d)]=0x2]=_0x53e49a(0x20d),_0x10c702[_0x10c702['Edit']=0x3]=_0x53e49a(0x1e0),_0x10c702[_0x10c702[_0x53e49a(0x1b0)]=0x4]=_0x53e49a(0x1b0),_0x10c702[_0x10c702[_0x53e49a(0x214)]=0x5]=_0x53e49a(0x214),_0x10c702[_0x10c702[_0x53e49a(0x1ef)]=-0x1]=_0x53e49a(0x1ef),_0x10c702))(v||{});const f=_0x73de0b=>c[_0x53e49a(0x1d3)](new Date(+_0x73de0b))['format'](_0x53e49a(0x1d2)),R=async(_0x5546e0,_0x3f9998)=>{const _0x1ee178=_0x53e49a,_0x45b799=_0x5546e0[_0x1ee178(0x1cf)](c[_0x1ee178(0x1c0)]),_0x30d42d=_0x5546e0[_0x1ee178(0x1cf)](P[_0x1ee178(0x1a9)]);_0x3f9998[_0x1ee178(0x1e9)](_0x7ad3ca=>{const _0x3e126e=_0x1ee178;_0x45b799['getUser'](_0x7ad3ca)&&_0x3f9998[_0x3e126e(0x1bf)](_0x7ad3ca);}),_0x3f9998[_0x1ee178(0x20c)]&&(await _0x30d42d[_0x1ee178(0x1cf)](_0x1ee178(0x1de),{'params':{'userIDs':[..._0x3f9998]}}))[_0x1ee178(0x1dc)]['users'][_0x1ee178(0x1e9)](_0xf35d75=>{const _0x78f612=_0x1ee178;_0xf35d75&&_0x45b799[_0x78f612(0x1a3)](_0xf35d75);});};var $=Object[_0x53e49a(0x1c2)],E=(_0x26b516,_0x2109cc,_0x2c3b36,_0x5a88ee)=>{const _0x29cee5=_0x53e49a;for(var _0xa3e246=_0x5a88ee>0x1?void 0x0:_0x5a88ee?$(_0x2109cc,_0x2c3b36):_0x2109cc,_0x360547=_0x26b516[_0x29cee5(0x206)]-0x1,_0x2dc4dd;_0x360547>=0x0;_0x360547--)(_0x2dc4dd=_0x26b516[_0x360547])&&(_0xa3e246=_0x2dc4dd(_0xa3e246)||_0xa3e246);return _0xa3e246;},S=(_0x5693a7,_0x1e02a7)=>(_0x5e718a,_0x58a494)=>_0x1e02a7(_0x5e718a,_0x58a494,_0x5693a7);let _=class extends c[_0x53e49a(0x1a7)]{constructor(_0x2268b1,_0x32bdb8,_0x4682b0,_0x263c6c){const _0xcaf5c=_0x53e49a;super(),this[_0xcaf5c(0x1dd)]=_0x2268b1,this[_0xcaf5c(0x1f4)]=_0x32bdb8,this[_0xcaf5c(0x210)]=_0x4682b0,this[_0xcaf5c(0x201)]=_0x263c6c,this['_init'](),this[_0xcaf5c(0x1e2)]();}[_0x53e49a(0x1e2)](){const _0x32b79f=_0x53e49a;this[_0x32b79f(0x1ec)](this[_0x32b79f(0x1f4)][_0x32b79f(0x1e3)][_0x32b79f(0x1f0)](j['bufferTime'](0x10))[_0x32b79f(0x1aa)](_0x68294f=>{const _0x2f2b25=_0x32b79f,_0x144515=new Set();_0x68294f['forEach'](_0x45777c=>{const _0x2cabe0=_0x3226;switch(_0x45777c['type']){case _0x2cabe0(0x217):{const _0xaa1546=_0x45777c[_0x2cabe0(0x1f2)][_0x2cabe0(0x216)];_0x144515[_0x2cabe0(0x217)](_0xaa1546);break;}}}),R(this[_0x2f2b25(0x201)],_0x144515);}));}['_init'](){const _0x509911=_0x53e49a;this[_0x509911(0x1ec)](this['_commentService'][_0x509911(0x1e3)]['subscribe'](async _0x283973=>{const _0x1204df=_0x509911;var _0x22801b,_0x326422,_0x319e7c,_0x205600;const _0x4cef91=(_0x22801b=this[_0x1204df(0x1f4)][_0x1204df(0x1bc)](_0x283973[_0x1204df(0x1b3)])[_0x1204df(0x1f6)](_0x360030=>_0x360030[_0x1204df(0x1ad)]===_0x283973[_0x1204df(0x1ad)]))==null?void 0x0:_0x22801b['root'];if(!_0x4cef91)return;const {unitId:_0x2f3ec5,subUnitId:_0x68d722}=_0x4cef91;switch(_0x283973[_0x1204df(0x1e4)]&&this[_0x1204df(0x210)][_0x1204df(0x1a3)](_0x283973['user']),_0x283973['type']){case v[_0x1204df(0x1c4)]:break;case v[_0x1204df(0x20d)]:{this[_0x1204df(0x1f4)][_0x1204df(0x1b6)](_0x2f3ec5,_0x68d722,{'unitId':_0x2f3ec5,'subUnitId':_0x68d722,'ref':'','id':_0x283973[_0x1204df(0x1ea)],'dT':f(+_0x283973[_0x1204df(0x1fb)]),'threadId':_0x283973[_0x1204df(0x1ad)],'personId':(_0x319e7c=(_0x326422=_0x283973['user'])==null?void 0x0:_0x326422['userID'])!=null?_0x319e7c:_0x283973[_0x1204df(0x204)],'text':JSON[_0x1204df(0x1ab)](_0x283973[_0x1204df(0x1c6)]),'parentId':_0x4cef91['id']});break;}case v[_0x1204df(0x1b0)]:{const _0x3a7afb=this[_0x1204df(0x1f4)]['getComment'](_0x2f3ec5,_0x68d722,_0x283973[_0x1204df(0x1ea)]);_0x3a7afb&&_0x3a7afb[_0x1204df(0x1d0)]&&this[_0x1204df(0x1f4)][_0x1204df(0x1e1)](_0x2f3ec5,_0x68d722,_0x283973[_0x1204df(0x1ea)]);break;}case v[_0x1204df(0x1e0)]:{this[_0x1204df(0x1f4)][_0x1204df(0x1d5)](_0x2f3ec5,_0x68d722,{'commentId':_0x283973[_0x1204df(0x1ea)],'text':JSON[_0x1204df(0x1ab)](_0x283973[_0x1204df(0x1c6)])});break;}case v[_0x1204df(0x214)]:{const _0x1abecd=(_0x205600=this[_0x1204df(0x1f4)][_0x1204df(0x1bc)](_0x283973[_0x1204df(0x1b3)])['find'](_0xa8a218=>_0xa8a218[_0x1204df(0x1ad)]===_0x283973[_0x1204df(0x1ad)]))==null?void 0x0:_0x205600[_0x1204df(0x1fa)];_0x1abecd&&this[_0x1204df(0x1f4)]['resolveComment'](_0x2f3ec5,_0x68d722,_0x1abecd['id'],_0x283973['solved']===I[_0x1204df(0x1f8)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x53e49a(0x1d8)])),S(0x1,c[_0x53e49a(0x1d4)](M[_0x53e49a(0x1fe)])),S(0x2,c[_0x53e49a(0x1d4)](c['UserManagerService'])),S(0x3,c[_0x53e49a(0x1d4)](c['Injector']))],_);const q=_0x53e49a(0x1db),D={};var A=Object[_0x53e49a(0x1c2)],x=(_0x48cc9a,_0x2c5554,_0x400077,_0x10ab37)=>{for(var _0x5cf5f0=_0x10ab37>0x1?void 0x0:_0x10ab37?A(_0x2c5554,_0x400077):_0x2c5554,_0x24d939=_0x48cc9a['length']-0x1,_0x1e6bb6;_0x24d939>=0x0;_0x24d939--)(_0x1e6bb6=_0x48cc9a[_0x24d939])&&(_0x5cf5f0=_0x1e6bb6(_0x5cf5f0)||_0x5cf5f0);return _0x5cf5f0;},C=(_0x1d5c92,_0x57ef8d)=>(_0x498cde,_0x1e728a)=>_0x57ef8d(_0x498cde,_0x1e728a,_0x1d5c92);function _0xec14(){const _0x4b7853=['Reply','Module','Unknown','_userService','defineProperty','map','format','Solve','code','personId','add','/edit','IConfigService','addUser','UniverCollaborationClientPlugin','users','IThreadCommentDataSourceService','Disposable','_initDataSource','HTTPService','subscribe','parse','rangeType','threadId','customRanges','6675977CbdwyO','Delete','values','onReady','unitId','saveCommentToSnapshot','2189748jwpNxG','addComment','23081168IMqJoU','/add','3283195MePvXw','DependentOn','onStarting','getUnit','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','UserManagerService','getMemberID','getOwnPropertyDescriptor','resolveComment','Add','getCurrentUser','content','_threadCommentDataSource','pluginName','CollaborationSessionService','UniverThreadCommentDataSourcePlugin','post','comment','COMMENT','_sessionService','get','parentId','UniverInstanceType','YYYY/MM/DD\x20HH:mm','dayjs','Inject','updateComment','3004aPnNlQ','_threadCommentDataSourceService','CommentService','Injector','replies','thread-comment-data-source.config','body','_commentService','/universer-api/user/list','requireSession','Edit','deleteComment','_initUserSync','commentUpdate$','user','listComments','_httpService','dataSource','/solved','forEach','replyId','/universer-api/comment/unit/','disposeWithMe','rangeId','450sMOIYL','UNRECOGNIZED','pipe','212865oiDWXy','payload','/delete','_threadCommentModel','/reply','find','type','Solved','error','root','createTimestamp','symbol','resolved','ThreadCommentModel','CustomRangeType','slice','_injector','filter','solved','userId','OpenOrReOpen','length','comments','syncUpdateMutationToColla','ref','7021326evgElO','setConfig','size'];_0xec14=function(){return _0x4b7853;};return _0xec14();}function _0x3226(_0xf119c1,_0x257ff4){_0xf119c1=_0xf119c1-0x1a3;const _0xec141=_0xec14();let _0x322652=_0xec141[_0xf119c1];return _0x322652;}function Y(_0x565dc7,_0x26665e){const _0x13ae2f=_0x53e49a,_0x5016c9=_0x565dc7[_0x13ae2f(0x1da)][0x0];return{..._0x26665e,'id':_0x5016c9[_0x13ae2f(0x1ea)],'resolved':_0x565dc7['solved']===0x1,'dT':f(_0x5016c9[_0x13ae2f(0x1fb)]),'personId':_0x5016c9[_0x13ae2f(0x204)],'threadId':_0x5016c9[_0x13ae2f(0x1ad)]};}function G(_0x34e2d9,_0x1a5036,_0x20753c){const _0x1dc9e1=_0x53e49a;var _0x13755d,_0x59839d;if(((_0x59839d=(_0x13755d=_0x34e2d9==null?void 0x0:_0x34e2d9[_0x1dc9e1(0x1da)])==null?void 0x0:_0x13755d[_0x1dc9e1(0x206)])!=null?_0x59839d:0x0)>0x0){const _0x2bf14e=(_0xda958c,_0x4f7b98)=>({'id':_0xda958c[_0x1dc9e1(0x1ea)],'threadId':_0xda958c[_0x1dc9e1(0x1ad)],'dT':f(_0xda958c[_0x1dc9e1(0x1fb)]),'personId':_0xda958c[_0x1dc9e1(0x204)],'resolved':_0x34e2d9[_0x1dc9e1(0x203)]===I[_0x1dc9e1(0x1f8)],'unitId':_0x1a5036,'subUnitId':_0x20753c,'text':JSON[_0x1dc9e1(0x1ab)](_0xda958c[_0x1dc9e1(0x1c6)]),'parentId':_0x4f7b98}),_0x7d71d9=_0x2bf14e(_0x34e2d9[_0x1dc9e1(0x1da)][0x0]);return{..._0x7d71d9,'children':_0x34e2d9['replies'][_0x1dc9e1(0x200)](0x1)[_0x1dc9e1(0x212)](_0x306ab5=>_0x2bf14e(_0x306ab5,_0x7d71d9['id']))};}return null;}let p=class{constructor(_0x452242,_0x10f9e0,_0x5b2560){const _0x37073a=_0x53e49a;this[_0x37073a(0x1e6)]=_0x452242,this['_userService']=_0x10f9e0,this[_0x37073a(0x1ce)]=_0x5b2560;}async[_0x53e49a(0x1b6)](_0x47373b){const _0x5c1fc3=_0x53e49a;var _0x2f314b,_0x371f1c;const {parentId:_0x278c05,unitId:_0xe3dcb,text:_0x26c610,threadId:_0x54f67c}=_0x47373b,_0x2a6372=(_0x371f1c=(_0x2f314b=_0x26c610[_0x5c1fc3(0x1ae)])==null?void 0x0:_0x2f314b['filter'](_0x3e0294=>_0x3e0294[_0x5c1fc3(0x1ac)]===c[_0x5c1fc3(0x1ff)][_0x5c1fc3(0x1cd)])['map'](_0x4d3a18=>_0x4d3a18[_0x5c1fc3(0x1ed)]))!=null?_0x371f1c:[],_0x4be59f=JSON['stringify'](_0x26c610),_0x546495=(await this[_0x5c1fc3(0x1ce)][_0x5c1fc3(0x1df)](_0xe3dcb))[_0x5c1fc3(0x1c1)]();if(_0x278c05){const _0x398f99={'memberId':_0x546495,'unitId':_0xe3dcb,'content':_0x4be59f,'mention':_0x2a6372,'threadId':_0x54f67c},_0x2136b0=(await this['_httpService'][_0x5c1fc3(0x1cb)](_0x5c1fc3(0x1eb)+_0xe3dcb+_0x5c1fc3(0x1f5),{'body':_0x398f99}))[_0x5c1fc3(0x1dc)]['reply'];return{..._0x47373b,'id':_0x2136b0[_0x5c1fc3(0x1ea)],'dT':c[_0x5c1fc3(0x1d3)](+_0x2136b0[_0x5c1fc3(0x1fb)])[_0x5c1fc3(0x213)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2136b0['userId']};}else{const _0x3f3fbf={'memberId':_0x546495,'unitId':_0xe3dcb,'content':_0x4be59f,'mention':_0x2a6372},_0x360f2f=await this['_httpService'][_0x5c1fc3(0x1cb)](_0x5c1fc3(0x1eb)+_0xe3dcb+_0x5c1fc3(0x1b8),{'body':_0x3f3fbf});return Y(_0x360f2f['body'][_0x5c1fc3(0x1cc)],_0x47373b);}}async[_0x53e49a(0x1d5)](_0x89ec9b){const _0x8d0684=_0x53e49a;var _0x5828fa,_0x13cef5;const {text:_0x45df44,unitId:_0x28058b}=_0x89ec9b,_0x6c8449=(_0x13cef5=(_0x5828fa=_0x45df44[_0x8d0684(0x1ae)])==null?void 0x0:_0x5828fa[_0x8d0684(0x202)](_0x21c30c=>_0x21c30c['rangeType']===c[_0x8d0684(0x1ff)]['COMMENT'])[_0x8d0684(0x212)](_0xab7ca9=>_0xab7ca9[_0x8d0684(0x1ed)]))!=null?_0x13cef5:[],_0x54c508=JSON['stringify'](_0x45df44),_0x40b464=_0x89ec9b['threadId'],_0x1de4c4=_0x89ec9b['id'],_0x3cae40={'memberId':(await this[_0x8d0684(0x1ce)]['requireSession'](_0x28058b))['getMemberID'](),'unitId':_0x28058b,'threadId':_0x40b464,'mention':_0x6c8449,'content':_0x54c508,'replyId':_0x1de4c4},_0x1e3885=await this[_0x8d0684(0x1e6)][_0x8d0684(0x1cb)]('/universer-api/comment/unit/'+_0x28058b+_0x8d0684(0x218),{'body':_0x3cae40});return!_0x1e3885['body'][_0x8d0684(0x1f9)]||_0x1e3885[_0x8d0684(0x1dc)][_0x8d0684(0x1f9)][_0x8d0684(0x215)]===0x1;}async[_0x53e49a(0x1c3)](_0x265beb){const _0x2f8f74=_0x53e49a,{unitId:_0x500e4d}=_0x265beb,_0x19bfa6=_0x265beb[_0x2f8f74(0x1ad)],_0x4a2eed={'memberId':this[_0x2f8f74(0x210)][_0x2f8f74(0x1c5)]()['userID'],'unitId':_0x500e4d,'threadId':_0x19bfa6,'solved':_0x265beb[_0x2f8f74(0x1fd)]?I[_0x2f8f74(0x1f8)]:I['OpenOrReOpen']},_0x10b86e=await this[_0x2f8f74(0x1e6)][_0x2f8f74(0x1cb)](_0x2f8f74(0x1eb)+_0x500e4d+_0x2f8f74(0x1e8),{'body':_0x4a2eed});return!_0x10b86e[_0x2f8f74(0x1dc)]['error']||_0x10b86e[_0x2f8f74(0x1dc)][_0x2f8f74(0x1f9)][_0x2f8f74(0x215)]===0x1;}async[_0x53e49a(0x1e1)](_0x3ed37a,_0x54767c,_0x59435a,_0x2f2431){const _0x1e6aad=_0x53e49a,_0x14ebc9={'memberId':(await this[_0x1e6aad(0x1ce)][_0x1e6aad(0x1df)](_0x3ed37a))[_0x1e6aad(0x1c1)](),'threadId':_0x59435a,'replyId':_0x2f2431,'unitId':_0x3ed37a},_0x4fb07b=await this[_0x1e6aad(0x1e6)][_0x1e6aad(0x1cb)](_0x1e6aad(0x1eb)+_0x3ed37a+_0x1e6aad(0x1f3),{'body':_0x14ebc9});return!_0x4fb07b['body'][_0x1e6aad(0x1f9)]||_0x4fb07b['body'][_0x1e6aad(0x1f9)][_0x1e6aad(0x215)]===0x1;}async[_0x53e49a(0x1e5)](_0x3f239e,_0x3d9e9f,_0x52d8f9){const _0x57028f=_0x53e49a,_0x58b21b={'unitId':_0x3f239e,'threadId':_0x52d8f9},_0x5edad7=await this[_0x57028f(0x1e6)]['post'](_0x57028f(0x1eb)+_0x3f239e+'/list',{'body':_0x58b21b}),_0x58a738=_0x52d8f9[_0x57028f(0x212)](_0x5be7c8=>G(_0x5edad7[_0x57028f(0x1dc)][_0x57028f(0x207)][_0x5be7c8],_0x3f239e,_0x3d9e9f))[_0x57028f(0x202)](Boolean);return Object[_0x57028f(0x1b1)](_0x5edad7[_0x57028f(0x1dc)][_0x57028f(0x1a5)])['forEach'](_0x5590b0=>{const _0x3de309=_0x57028f;this[_0x3de309(0x210)][_0x3de309(0x1a3)](_0x5590b0);}),_0x58a738;}[_0x53e49a(0x1b4)](_0x1aea97){const _0x1d7a7c=_0x53e49a;return{'id':_0x1aea97['id'],'threadId':_0x1aea97[_0x1d7a7c(0x1ad)],'ref':_0x1aea97[_0x1d7a7c(0x209)]};}};p=x([C(0x0,c[_0x53e49a(0x1d4)](P[_0x53e49a(0x1a9)])),C(0x1,c[_0x53e49a(0x1d4)](c[_0x53e49a(0x1c0)])),C(0x2,c[_0x53e49a(0x1d4)](b[_0x53e49a(0x1c9)]))],p);var H=Object[_0x53e49a(0x1c2)],J=(_0x20b79e,_0x500646,_0x4cd513,_0x5d9f41)=>{for(var _0x590116=_0x5d9f41>0x1?void 0x0:_0x5d9f41?H(_0x500646,_0x4cd513):_0x500646,_0xe4f35d=_0x20b79e['length']-0x1,_0x2c1905;_0xe4f35d>=0x0;_0xe4f35d--)(_0x2c1905=_0x20b79e[_0xe4f35d])&&(_0x590116=_0x2c1905(_0x590116)||_0x590116);return _0x590116;},y=(_0xe1d2b0,_0x507cea)=>(_0x23b7d1,_0x3e14e5)=>_0x507cea(_0x23b7d1,_0x3e14e5,_0xe1d2b0);let g=class extends c[_0x53e49a(0x1a7)]{constructor(_0x33e792,_0x45a273){const _0x1ad514=_0x53e49a;super(),this[_0x1ad514(0x1d7)]=_0x33e792,this[_0x1ad514(0x1c7)]=_0x45a273,this[_0x1ad514(0x1a8)]();}[_0x53e49a(0x1a8)](){const _0x3da989=_0x53e49a;this[_0x3da989(0x1d7)][_0x3da989(0x1e7)]=this[_0x3da989(0x1c7)],this[_0x3da989(0x1d7)][_0x3da989(0x208)]=!0x1;}};g=J([y(0x0,M[_0x53e49a(0x1a6)]),y(0x1,c[_0x53e49a(0x1d4)](p))],g);var F=Object[_0x53e49a(0x211)],L=Object[_0x53e49a(0x1c2)],Z=(_0x5e049a,_0x215259,_0x5f1048)=>_0x215259 in _0x5e049a?F(_0x5e049a,_0x215259,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f1048}):_0x5e049a[_0x215259]=_0x5f1048,W=(_0x386f84,_0x47c617,_0x21da70,_0x3a7fb6)=>{const _0x28dee7=_0x53e49a;for(var _0x28938b=_0x3a7fb6>0x1?void 0x0:_0x3a7fb6?L(_0x47c617,_0x21da70):_0x47c617,_0xbe0146=_0x386f84[_0x28dee7(0x206)]-0x1,_0x764f6b;_0xbe0146>=0x0;_0xbe0146--)(_0x764f6b=_0x386f84[_0xbe0146])&&(_0x28938b=_0x764f6b(_0x28938b)||_0x28938b);return _0x28938b;},O=(_0x4ba098,_0x422b33)=>(_0x796f42,_0x3c8f72)=>_0x422b33(_0x796f42,_0x3c8f72,_0x4ba098),N=(_0x44cd35,_0x1973aa,_0x518eff)=>Z(_0x44cd35,typeof _0x1973aa!=_0x53e49a(0x1fc)?_0x1973aa+'':_0x1973aa,_0x518eff);exports[_0x53e49a(0x1ca)]=class extends c['Plugin']{constructor(_0x40614f=D,_0x5b9632,_0x38d209){const _0x5273df=_0x53e49a;super(),this['_config']=_0x40614f,this[_0x5273df(0x201)]=_0x5b9632,this['_configService']=_0x38d209;const {..._0x850019}=c['merge']({},D,this['_config']);this['_configService'][_0x5273df(0x20b)](q,_0x850019);}[_0x53e49a(0x1bb)](){const _0x17cbfe=_0x53e49a;[[p],[g],[_]][_0x17cbfe(0x1e9)](_0x3002b3=>{const _0xafaf1f=_0x17cbfe;this[_0xafaf1f(0x201)]['add'](_0x3002b3);});}[_0x53e49a(0x1b2)](){const _0x48cd52=_0x53e49a;this[_0x48cd52(0x201)][_0x48cd52(0x1cf)](g),this[_0x48cd52(0x201)][_0x48cd52(0x1cf)](_);}},N(exports[_0x53e49a(0x1ca)],_0x53e49a(0x1c8),U),N(exports[_0x53e49a(0x1ca)],_0x53e49a(0x1f7),c[_0x53e49a(0x1d1)][_0x53e49a(0x1bd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x53e49a(0x1ba)](w['UniverThreadCommentUIPlugin'],b[_0x53e49a(0x1a4)],T['UniverLicensePlugin']),O(0x1,c[_0x53e49a(0x1d4)](c[_0x53e49a(0x1d9)])),O(0x2,c[_0x53e49a(0x219)])],exports[_0x53e49a(0x1ca)]);
1
+ 'use strict';const _0x7bec1e=_0x272e;(function(_0x21dc3e,_0x5acea1){const _0x3a6ae=_0x272e,_0x176ee1=_0x21dc3e();while(!![]){try{const _0x22bdd6=-parseInt(_0x3a6ae(0xb2))/0x1*(parseInt(_0x3a6ae(0xec))/0x2)+parseInt(_0x3a6ae(0xaa))/0x3+parseInt(_0x3a6ae(0xc8))/0x4+-parseInt(_0x3a6ae(0xe8))/0x5*(parseInt(_0x3a6ae(0xbe))/0x6)+-parseInt(_0x3a6ae(0xdd))/0x7+parseInt(_0x3a6ae(0xf3))/0x8+parseInt(_0x3a6ae(0xfd))/0x9*(parseInt(_0x3a6ae(0xd7))/0xa);if(_0x22bdd6===_0x5acea1)break;else _0x176ee1['push'](_0x176ee1['shift']());}catch(_0x43f514){_0x176ee1['push'](_0x176ee1['shift']());}}}(_0x6aee,0x47b47));function _0x6aee(){const _0x18a716=['root','customRanges','_configService','102594ChmHos','body','getMemberID','HTTPService','/edit','_initDataSource','Unknown','length','onStarting','format','79992mEHWUA','commentUpdate$','Injector','subscribe','YYYY/MM/DD\x20HH:mm','createTimestamp','_injector','_userService','content','stringify','filter','deleteComment','_initUserSync','addComment','CustomRangeType','620HMWqOf','Solved','Reply','map','UserManagerService','personId','1489509xfeAHH','_init','dataSource','COMMENT','find','getCurrentUser','UniverLicensePlugin','Add','thread-comment-data-source.config','rangeId','IConfigService','20uHeaez','_threadCommentDataSource','replies','OpenOrReOpen','14542NxphhR','comment','resolveComment','UNRECOGNIZED','add','parse','_httpService','1426088DLGGWC','ThreadCommentModel','_threadCommentDataSourceService','getUser','CommentService','code','replyId','solved','userID','threadId','85518HyATbU','Edit','Inject','onReady','CollaborationSessionService','saveCommentToSnapshot','unitId','/add','_threadCommentModel','/universer-api/comment/unit/','setConfig','_config','/delete','size','updateComment','dayjs','defineProperty','UniverCollaborationClientPlugin','forEach','listComments','merge','bufferTime','Module','Solve','type','get','_commentService','_sessionService','values','error','Disposable','slice','disposeWithMe','453159BrmFbe','symbol','Delete','addUser','users','rangeType','user','syncUpdateMutationToColla','50drWlpm','post','IThreadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','getOwnPropertyDescriptor','requireSession','DependentOn','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x6aee=function(){return _0x18a716;};return _0x6aee();}Object[_0x7bec1e(0x99)](exports,Symbol['toStringTag'],{'value':_0x7bec1e(0x9f)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x7bec1e(0xba);var I=(_0x52ad51=>(_0x52ad51[_0x52ad51[_0x7bec1e(0xeb)]=0x0]=_0x7bec1e(0xeb),_0x52ad51[_0x52ad51[_0x7bec1e(0xd8)]=0x1]=_0x7bec1e(0xd8),_0x52ad51[_0x52ad51['UNRECOGNIZED']=-0x1]=_0x7bec1e(0xef),_0x52ad51))(I||{}),v=(_0x2a5428=>(_0x2a5428[_0x2a5428[_0x7bec1e(0xc4)]=0x0]=_0x7bec1e(0xc4),_0x2a5428[_0x2a5428[_0x7bec1e(0xe4)]=0x1]=_0x7bec1e(0xe4),_0x2a5428[_0x2a5428[_0x7bec1e(0xd9)]=0x2]='Reply',_0x2a5428[_0x2a5428[_0x7bec1e(0xfe)]=0x3]=_0x7bec1e(0xfe),_0x2a5428[_0x2a5428[_0x7bec1e(0xac)]=0x4]=_0x7bec1e(0xac),_0x2a5428[_0x2a5428[_0x7bec1e(0xa0)]=0x5]='Solve',_0x2a5428[_0x2a5428[_0x7bec1e(0xef)]=-0x1]=_0x7bec1e(0xef),_0x2a5428))(v||{});const f=_0xfa1796=>c[_0x7bec1e(0x98)](new Date(+_0xfa1796))['format'](_0x7bec1e(0xcc)),R=async(_0x4e0526,_0x342d5a)=>{const _0x427f24=_0x7bec1e,_0x1079c0=_0x4e0526[_0x427f24(0xa2)](c['UserManagerService']),_0x438a90=_0x4e0526[_0x427f24(0xa2)](P['HTTPService']);_0x342d5a['forEach'](_0x44c515=>{const _0x4be342=_0x427f24;_0x1079c0[_0x4be342(0xf6)](_0x44c515)&&_0x342d5a['delete'](_0x44c515);}),_0x342d5a[_0x427f24(0x96)]&&(await _0x438a90[_0x427f24(0xa2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x342d5a]}}))[_0x427f24(0xbf)]['users'][_0x427f24(0x9b)](_0x267e3f=>{_0x267e3f&&_0x1079c0['addUser'](_0x267e3f);});};var $=Object[_0x7bec1e(0xb6)],E=(_0x2aa9ba,_0x2ad740,_0x726af1,_0x346b0b)=>{for(var _0x4bff96=_0x346b0b>0x1?void 0x0:_0x346b0b?$(_0x2ad740,_0x726af1):_0x2ad740,_0x416884=_0x2aa9ba['length']-0x1,_0x59ddb8;_0x416884>=0x0;_0x416884--)(_0x59ddb8=_0x2aa9ba[_0x416884])&&(_0x4bff96=_0x59ddb8(_0x4bff96)||_0x4bff96);return _0x4bff96;},S=(_0x3750fb,_0x5859e8)=>(_0x4b77d9,_0x7971af)=>_0x5859e8(_0x4b77d9,_0x7971af,_0x3750fb);let _=class extends c[_0x7bec1e(0xa7)]{constructor(_0x39ef2a,_0x291013,_0x504e28,_0x2f26b2){const _0x21536f=_0x7bec1e;super(),this[_0x21536f(0xa3)]=_0x39ef2a,this[_0x21536f(0x91)]=_0x291013,this[_0x21536f(0xcf)]=_0x504e28,this[_0x21536f(0xce)]=_0x2f26b2,this[_0x21536f(0xde)](),this[_0x21536f(0xd4)]();}[_0x7bec1e(0xd4)](){const _0x15194f=_0x7bec1e;this[_0x15194f(0xa9)](this[_0x15194f(0x91)][_0x15194f(0xc9)]['pipe'](j[_0x15194f(0x9e)](0x10))[_0x15194f(0xcb)](_0x2e12fd=>{const _0x43e5f9=_0x15194f,_0x1b4d0f=new Set();_0x2e12fd[_0x43e5f9(0x9b)](_0x17847f=>{const _0x33ac7c=_0x43e5f9;switch(_0x17847f['type']){case _0x33ac7c(0xf0):{const _0x2495bc=_0x17847f['payload'][_0x33ac7c(0xdc)];_0x1b4d0f[_0x33ac7c(0xf0)](_0x2495bc);break;}}}),R(this[_0x43e5f9(0xce)],_0x1b4d0f);}));}[_0x7bec1e(0xde)](){const _0x27d8e4=_0x7bec1e;this[_0x27d8e4(0xa9)](this['_commentService'][_0x27d8e4(0xc9)]['subscribe'](async _0x355483=>{const _0x5e3dda=_0x27d8e4;var _0x5ee4a4,_0x3ed14a,_0x37a4f8,_0x14c153;const _0x4bc227=(_0x5ee4a4=this['_threadCommentModel']['getUnit'](_0x355483[_0x5e3dda(0x8f)])['find'](_0x1a3458=>_0x1a3458[_0x5e3dda(0xfc)]===_0x355483[_0x5e3dda(0xfc)]))==null?void 0x0:_0x5ee4a4[_0x5e3dda(0xbb)];if(!_0x4bc227)return;const {unitId:_0x943426,subUnitId:_0x3ade67}=_0x4bc227;switch(_0x355483[_0x5e3dda(0xb0)]&&this['_userService']['addUser'](_0x355483[_0x5e3dda(0xb0)]),_0x355483[_0x5e3dda(0xa1)]){case v['Add']:break;case v[_0x5e3dda(0xd9)]:{this[_0x5e3dda(0x91)][_0x5e3dda(0xd5)](_0x943426,_0x3ade67,{'unitId':_0x943426,'subUnitId':_0x3ade67,'ref':'','id':_0x355483[_0x5e3dda(0xf9)],'dT':f(+_0x355483[_0x5e3dda(0xcd)]),'threadId':_0x355483[_0x5e3dda(0xfc)],'personId':(_0x37a4f8=(_0x3ed14a=_0x355483[_0x5e3dda(0xb0)])==null?void 0x0:_0x3ed14a[_0x5e3dda(0xfb)])!=null?_0x37a4f8:_0x355483[_0x5e3dda(0xb9)],'text':JSON[_0x5e3dda(0xf1)](_0x355483[_0x5e3dda(0xd0)]),'parentId':_0x4bc227['id']});break;}case v['Delete']:{const _0xba6cfc=this[_0x5e3dda(0x91)]['getComment'](_0x943426,_0x3ade67,_0x355483[_0x5e3dda(0xf9)]);_0xba6cfc&&_0xba6cfc['parentId']&&this[_0x5e3dda(0x91)]['deleteComment'](_0x943426,_0x3ade67,_0x355483[_0x5e3dda(0xf9)]);break;}case v[_0x5e3dda(0xfe)]:{this[_0x5e3dda(0x91)][_0x5e3dda(0x97)](_0x943426,_0x3ade67,{'commentId':_0x355483['replyId'],'text':JSON[_0x5e3dda(0xf1)](_0x355483[_0x5e3dda(0xd0)])});break;}case v['Solve']:{const _0x61ffee=(_0x14c153=this[_0x5e3dda(0x91)]['getUnit'](_0x355483[_0x5e3dda(0x8f)])[_0x5e3dda(0xe1)](_0x2a42e4=>_0x2a42e4[_0x5e3dda(0xfc)]===_0x355483[_0x5e3dda(0xfc)]))==null?void 0x0:_0x14c153[_0x5e3dda(0xbb)];_0x61ffee&&this[_0x5e3dda(0x91)][_0x5e3dda(0xee)](_0x943426,_0x3ade67,_0x61ffee['id'],_0x355483[_0x5e3dda(0xfa)]===I[_0x5e3dda(0xd8)]);break;}}}));}};function _0x272e(_0x18f2fa,_0x139de9){_0x18f2fa=_0x18f2fa-0x8b;const _0x6aee2d=_0x6aee();let _0x272e46=_0x6aee2d[_0x18f2fa];return _0x272e46;}_=E([S(0x0,c[_0x7bec1e(0x8b)](b[_0x7bec1e(0xf7)])),S(0x1,c[_0x7bec1e(0x8b)](M[_0x7bec1e(0xf4)])),S(0x2,c['Inject'](c[_0x7bec1e(0xdb)])),S(0x3,c[_0x7bec1e(0x8b)](c[_0x7bec1e(0xca)]))],_);const q=_0x7bec1e(0xe5),D={};var A=Object[_0x7bec1e(0xb6)],x=(_0x5835fe,_0x3a49a0,_0x384267,_0x2319df)=>{const _0x3d85d5=_0x7bec1e;for(var _0x46b917=_0x2319df>0x1?void 0x0:_0x2319df?A(_0x3a49a0,_0x384267):_0x3a49a0,_0x4b57ec=_0x5835fe[_0x3d85d5(0xc5)]-0x1,_0x3762b3;_0x4b57ec>=0x0;_0x4b57ec--)(_0x3762b3=_0x5835fe[_0x4b57ec])&&(_0x46b917=_0x3762b3(_0x46b917)||_0x46b917);return _0x46b917;},C=(_0x4f72ec,_0x37dd6d)=>(_0x5b5483,_0x478530)=>_0x37dd6d(_0x5b5483,_0x478530,_0x4f72ec);function Y(_0x3bea5c,_0x3aee60){const _0x389dfb=_0x7bec1e,_0x283e48=_0x3bea5c['replies'][0x0];return{..._0x3aee60,'id':_0x283e48[_0x389dfb(0xf9)],'resolved':_0x3bea5c[_0x389dfb(0xfa)]===0x1,'dT':f(_0x283e48[_0x389dfb(0xcd)]),'personId':_0x283e48[_0x389dfb(0xb9)],'threadId':_0x283e48[_0x389dfb(0xfc)]};}function G(_0x30b80f,_0x23001f,_0x323984){const _0x46baee=_0x7bec1e;var _0x28abbc,_0x57eb17;if(((_0x57eb17=(_0x28abbc=_0x30b80f==null?void 0x0:_0x30b80f[_0x46baee(0xea)])==null?void 0x0:_0x28abbc[_0x46baee(0xc5)])!=null?_0x57eb17:0x0)>0x0){const _0x418916=(_0xfcc8e0,_0x213060)=>({'id':_0xfcc8e0['replyId'],'threadId':_0xfcc8e0[_0x46baee(0xfc)],'dT':f(_0xfcc8e0[_0x46baee(0xcd)]),'personId':_0xfcc8e0['userId'],'resolved':_0x30b80f['solved']===I[_0x46baee(0xd8)],'unitId':_0x23001f,'subUnitId':_0x323984,'text':JSON[_0x46baee(0xf1)](_0xfcc8e0[_0x46baee(0xd0)]),'parentId':_0x213060}),_0x1cea45=_0x418916(_0x30b80f[_0x46baee(0xea)][0x0]);return{..._0x1cea45,'children':_0x30b80f[_0x46baee(0xea)][_0x46baee(0xa8)](0x1)[_0x46baee(0xda)](_0x42bee7=>_0x418916(_0x42bee7,_0x1cea45['id']))};}return null;}let p=class{constructor(_0x49c647,_0x441e71,_0x1c37a9){const _0x2e3d61=_0x7bec1e;this[_0x2e3d61(0xf2)]=_0x49c647,this[_0x2e3d61(0xcf)]=_0x441e71,this[_0x2e3d61(0xa4)]=_0x1c37a9;}async[_0x7bec1e(0xd5)](_0xe447ec){const _0x288c6e=_0x7bec1e;var _0x411176,_0x1155b1;const {parentId:_0x237eb1,unitId:_0x223aa5,text:_0x16a255,threadId:_0x10431b}=_0xe447ec,_0x93b022=(_0x1155b1=(_0x411176=_0x16a255[_0x288c6e(0xbc)])==null?void 0x0:_0x411176[_0x288c6e(0xd2)](_0x85c108=>_0x85c108[_0x288c6e(0xaf)]===c[_0x288c6e(0xd6)]['COMMENT'])['map'](_0x2eadde=>_0x2eadde[_0x288c6e(0xe6)]))!=null?_0x1155b1:[],_0x3818e3=JSON[_0x288c6e(0xd1)](_0x16a255),_0x22700b=(await this[_0x288c6e(0xa4)][_0x288c6e(0xb7)](_0x223aa5))[_0x288c6e(0xc0)]();if(_0x237eb1){const _0x2c7d81={'memberId':_0x22700b,'unitId':_0x223aa5,'content':_0x3818e3,'mention':_0x93b022,'threadId':_0x10431b},_0xffeda4=(await this['_httpService'][_0x288c6e(0xb3)](_0x288c6e(0x92)+_0x223aa5+'/reply',{'body':_0x2c7d81}))['body']['reply'];return{..._0xe447ec,'id':_0xffeda4[_0x288c6e(0xf9)],'dT':c[_0x288c6e(0x98)](+_0xffeda4[_0x288c6e(0xcd)])[_0x288c6e(0xc7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xffeda4[_0x288c6e(0xb9)]};}else{const _0x1bd12e={'memberId':_0x22700b,'unitId':_0x223aa5,'content':_0x3818e3,'mention':_0x93b022},_0x3c1abf=await this[_0x288c6e(0xf2)]['post']('/universer-api/comment/unit/'+_0x223aa5+_0x288c6e(0x90),{'body':_0x1bd12e});return Y(_0x3c1abf[_0x288c6e(0xbf)][_0x288c6e(0xed)],_0xe447ec);}}async['updateComment'](_0x4e97d3){const _0x1330de=_0x7bec1e;var _0x14f9dd,_0x159173;const {text:_0x182d01,unitId:_0x2d52fe}=_0x4e97d3,_0x3a612d=(_0x159173=(_0x14f9dd=_0x182d01[_0x1330de(0xbc)])==null?void 0x0:_0x14f9dd[_0x1330de(0xd2)](_0x4ba4ae=>_0x4ba4ae['rangeType']===c[_0x1330de(0xd6)][_0x1330de(0xe0)])[_0x1330de(0xda)](_0x570421=>_0x570421[_0x1330de(0xe6)]))!=null?_0x159173:[],_0x402bd6=JSON[_0x1330de(0xd1)](_0x182d01),_0x5ef40e=_0x4e97d3['threadId'],_0x2f2516=_0x4e97d3['id'],_0x547892={'memberId':(await this['_sessionService'][_0x1330de(0xb7)](_0x2d52fe))[_0x1330de(0xc0)](),'unitId':_0x2d52fe,'threadId':_0x5ef40e,'mention':_0x3a612d,'content':_0x402bd6,'replyId':_0x2f2516},_0x434d2b=await this[_0x1330de(0xf2)]['post'](_0x1330de(0x92)+_0x2d52fe+_0x1330de(0xc2),{'body':_0x547892});return!_0x434d2b[_0x1330de(0xbf)]['error']||_0x434d2b[_0x1330de(0xbf)]['error'][_0x1330de(0xf8)]===0x1;}async[_0x7bec1e(0xee)](_0x48dc08){const _0x4348ef=_0x7bec1e,{unitId:_0x14805f}=_0x48dc08,_0x4a7185=_0x48dc08[_0x4348ef(0xfc)],_0x16599a={'memberId':this['_userService'][_0x4348ef(0xe2)]()[_0x4348ef(0xfb)],'unitId':_0x14805f,'threadId':_0x4a7185,'solved':_0x48dc08['resolved']?I[_0x4348ef(0xd8)]:I['OpenOrReOpen']},_0x3633da=await this['_httpService'][_0x4348ef(0xb3)]('/universer-api/comment/unit/'+_0x14805f+'/solved',{'body':_0x16599a});return!_0x3633da[_0x4348ef(0xbf)][_0x4348ef(0xa6)]||_0x3633da[_0x4348ef(0xbf)][_0x4348ef(0xa6)][_0x4348ef(0xf8)]===0x1;}async[_0x7bec1e(0xd3)](_0x27b333,_0x3b225b,_0x18e068,_0x3eb13){const _0x3cd213=_0x7bec1e,_0x492e4e={'memberId':(await this['_sessionService']['requireSession'](_0x27b333))['getMemberID'](),'threadId':_0x18e068,'replyId':_0x3eb13,'unitId':_0x27b333},_0x20cdcc=await this[_0x3cd213(0xf2)][_0x3cd213(0xb3)](_0x3cd213(0x92)+_0x27b333+_0x3cd213(0x95),{'body':_0x492e4e});return!_0x20cdcc[_0x3cd213(0xbf)]['error']||_0x20cdcc[_0x3cd213(0xbf)][_0x3cd213(0xa6)][_0x3cd213(0xf8)]===0x1;}async[_0x7bec1e(0x9c)](_0x480e49,_0x29a746,_0x44c7bf){const _0x46de06=_0x7bec1e,_0x2429c9={'unitId':_0x480e49,'threadId':_0x44c7bf},_0x3c4f20=await this[_0x46de06(0xf2)][_0x46de06(0xb3)](_0x46de06(0x92)+_0x480e49+'/list',{'body':_0x2429c9}),_0x48ca3a=_0x44c7bf['map'](_0x15ee71=>G(_0x3c4f20[_0x46de06(0xbf)]['comments'][_0x15ee71],_0x480e49,_0x29a746))[_0x46de06(0xd2)](Boolean);return Object[_0x46de06(0xa5)](_0x3c4f20[_0x46de06(0xbf)][_0x46de06(0xae)])['forEach'](_0x5a8967=>{const _0x215ade=_0x46de06;this[_0x215ade(0xcf)][_0x215ade(0xad)](_0x5a8967);}),_0x48ca3a;}[_0x7bec1e(0x8e)](_0x32e4a0){const _0x23acb8=_0x7bec1e;return{'id':_0x32e4a0['id'],'threadId':_0x32e4a0[_0x23acb8(0xfc)],'ref':_0x32e4a0['ref']};}};p=x([C(0x0,c[_0x7bec1e(0x8b)](P[_0x7bec1e(0xc1)])),C(0x1,c[_0x7bec1e(0x8b)](c[_0x7bec1e(0xdb)])),C(0x2,c[_0x7bec1e(0x8b)](b[_0x7bec1e(0x8d)]))],p);var H=Object[_0x7bec1e(0xb6)],J=(_0x57971a,_0x1c3ce2,_0x2e41b2,_0x1420b2)=>{for(var _0x8ad958=_0x1420b2>0x1?void 0x0:_0x1420b2?H(_0x1c3ce2,_0x2e41b2):_0x1c3ce2,_0x314aef=_0x57971a['length']-0x1,_0xe16af1;_0x314aef>=0x0;_0x314aef--)(_0xe16af1=_0x57971a[_0x314aef])&&(_0x8ad958=_0xe16af1(_0x8ad958)||_0x8ad958);return _0x8ad958;},y=(_0x5530af,_0x486635)=>(_0x115daa,_0x54a1a0)=>_0x486635(_0x115daa,_0x54a1a0,_0x5530af);let g=class extends c['Disposable']{constructor(_0x2185c4,_0xbfbf80){const _0x5d7a92=_0x7bec1e;super(),this[_0x5d7a92(0xf5)]=_0x2185c4,this[_0x5d7a92(0xe9)]=_0xbfbf80,this[_0x5d7a92(0xc3)]();}[_0x7bec1e(0xc3)](){const _0x3d1c79=_0x7bec1e;this[_0x3d1c79(0xf5)][_0x3d1c79(0xdf)]=this[_0x3d1c79(0xe9)],this[_0x3d1c79(0xf5)][_0x3d1c79(0xb1)]=!0x1;}};g=J([y(0x0,M[_0x7bec1e(0xb4)]),y(0x1,c[_0x7bec1e(0x8b)](p))],g);var F=Object[_0x7bec1e(0x99)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3f18c8,_0x1e5d23,_0x486380)=>_0x1e5d23 in _0x3f18c8?F(_0x3f18c8,_0x1e5d23,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x486380}):_0x3f18c8[_0x1e5d23]=_0x486380,W=(_0x3636f3,_0x59a530,_0x25f26e,_0x36c2ef)=>{const _0xae6da8=_0x7bec1e;for(var _0x5db238=_0x36c2ef>0x1?void 0x0:_0x36c2ef?L(_0x59a530,_0x25f26e):_0x59a530,_0x5b9dc7=_0x3636f3[_0xae6da8(0xc5)]-0x1,_0x4fe4de;_0x5b9dc7>=0x0;_0x5b9dc7--)(_0x4fe4de=_0x3636f3[_0x5b9dc7])&&(_0x5db238=_0x4fe4de(_0x5db238)||_0x5db238);return _0x5db238;},O=(_0x1f4736,_0x51a816)=>(_0x30aeaf,_0x28fb5b)=>_0x51a816(_0x30aeaf,_0x28fb5b,_0x1f4736),N=(_0x2f45e5,_0x389855,_0x43d209)=>Z(_0x2f45e5,typeof _0x389855!=_0x7bec1e(0xab)?_0x389855+'':_0x389855,_0x43d209);exports[_0x7bec1e(0xb5)]=class extends c['Plugin']{constructor(_0x52b592=D,_0x2f730d,_0x3dc872){const _0x3d1802=_0x7bec1e;super(),this[_0x3d1802(0x94)]=_0x52b592,this[_0x3d1802(0xce)]=_0x2f730d,this[_0x3d1802(0xbd)]=_0x3dc872;const {..._0x3e2e42}=c[_0x3d1802(0x9d)]({},D,this[_0x3d1802(0x94)]);this[_0x3d1802(0xbd)][_0x3d1802(0x93)](q,_0x3e2e42);}[_0x7bec1e(0xc6)](){const _0x4db63f=_0x7bec1e;[[p],[g],[_]][_0x4db63f(0x9b)](_0x1df4aa=>{const _0x29b8f3=_0x4db63f;this[_0x29b8f3(0xce)][_0x29b8f3(0xf0)](_0x1df4aa);});}[_0x7bec1e(0x8c)](){const _0x1e636d=_0x7bec1e;this[_0x1e636d(0xce)][_0x1e636d(0xa2)](g),this[_0x1e636d(0xce)][_0x1e636d(0xa2)](_);}},N(exports[_0x7bec1e(0xb5)],'pluginName',U),N(exports[_0x7bec1e(0xb5)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x7bec1e(0xb8)](w['UniverThreadCommentUIPlugin'],b[_0x7bec1e(0x9a)],T[_0x7bec1e(0xe3)]),O(0x1,c[_0x7bec1e(0x8b)](c[_0x7bec1e(0xca)])),O(0x2,c[_0x7bec1e(0xe7)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x427b0c=_0x2010;(function(_0x57dbff,_0x2de5b2){const _0x2736c7=_0x2010,_0x32937e=_0x57dbff();while(!![]){try{const _0x436f77=-parseInt(_0x2736c7(0x12f))/0x1*(parseInt(_0x2736c7(0x101))/0x2)+-parseInt(_0x2736c7(0x118))/0x3+parseInt(_0x2736c7(0x146))/0x4+parseInt(_0x2736c7(0x127))/0x5+-parseInt(_0x2736c7(0x115))/0x6+-parseInt(_0x2736c7(0x110))/0x7+parseInt(_0x2736c7(0x12b))/0x8;if(_0x436f77===_0x2de5b2)break;else _0x32937e['push'](_0x32937e['shift']());}catch(_0x306f43){_0x32937e['push'](_0x32937e['shift']());}}}(_0x377c,0x64619));import{CommentService as _0x406774,CollaborationSessionService as _0x264c29,UniverCollaborationClientPlugin as _0x4f9fad}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e191e}from'@univerjs-pro/license';import{dayjs as _0x13fc8d,UserManagerService as _0x42c2f7,Inject as _0x51d02a,Injector as _0x440100,Disposable as _0x5a35c7,CustomRangeType as _0x38fd19,UniverInstanceType as _0x5c6fb1,DependentOn as _0x475c39,IConfigService as _0x2959e9,Plugin as _0x834bcd,merge as _0x523a0c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9a2f36}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x335932,IThreadCommentDataSourceService as _0x2621a6}from'@univerjs/thread-comment';import{bufferTime as _0xe21b99}from'rxjs';import{HTTPService as _0x39ec00}from'@univerjs/network';const W=_0x427b0c(0x108);var I=(_0x2055aa=>(_0x2055aa[_0x2055aa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2055aa[_0x2055aa[_0x427b0c(0x141)]=0x1]=_0x427b0c(0x141),_0x2055aa[_0x2055aa[_0x427b0c(0x10c)]=-0x1]='UNRECOGNIZED',_0x2055aa))(I||{}),v=(_0x137c97=>(_0x137c97[_0x137c97['Unknown']=0x0]=_0x427b0c(0x113),_0x137c97[_0x137c97[_0x427b0c(0x12a)]=0x1]=_0x427b0c(0x12a),_0x137c97[_0x137c97['Reply']=0x2]=_0x427b0c(0x11b),_0x137c97[_0x137c97['Edit']=0x3]='Edit',_0x137c97[_0x137c97['Delete']=0x4]=_0x427b0c(0x11f),_0x137c97[_0x137c97[_0x427b0c(0x121)]=0x5]=_0x427b0c(0x121),_0x137c97[_0x137c97['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x137c97))(v||{});const y=_0x5f0fc8=>_0x13fc8d(new Date(+_0x5f0fc8))[_0x427b0c(0x10f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x117742,_0x51f65e)=>{const _0x2e406f=_0x427b0c,_0x2b1424=_0x117742[_0x2e406f(0x11a)](_0x42c2f7),_0x5c5a4e=_0x117742[_0x2e406f(0x11a)](_0x39ec00);_0x51f65e[_0x2e406f(0x138)](_0x292d66=>{const _0x3f56a2=_0x2e406f;_0x2b1424[_0x3f56a2(0x11c)](_0x292d66)&&_0x51f65e[_0x3f56a2(0x13a)](_0x292d66);}),_0x51f65e[_0x2e406f(0x124)]&&(await _0x5c5a4e['get'](_0x2e406f(0x123),{'params':{'userIDs':[..._0x51f65e]}}))['body']['users'][_0x2e406f(0x138)](_0x365945=>{const _0x1ccd51=_0x2e406f;_0x365945&&_0x2b1424[_0x1ccd51(0x139)](_0x365945);});};var K=Object[_0x427b0c(0xe3)],V=(_0x18cb91,_0x497cbd,_0x5172e7,_0x4f1811)=>{const _0x33c830=_0x427b0c;for(var _0x24d2e6=_0x4f1811>0x1?void 0x0:_0x4f1811?K(_0x497cbd,_0x5172e7):_0x497cbd,_0x35a105=_0x18cb91[_0x33c830(0x13f)]-0x1,_0x5a17c1;_0x35a105>=0x0;_0x35a105--)(_0x5a17c1=_0x18cb91[_0x35a105])&&(_0x24d2e6=_0x5a17c1(_0x24d2e6)||_0x24d2e6);return _0x24d2e6;},p=(_0x175fb0,_0x35d032)=>(_0x3c588c,_0x5140d4)=>_0x35d032(_0x3c588c,_0x5140d4,_0x175fb0);let _=class extends _0x5a35c7{constructor(_0x108c68,_0xaf91c1,_0x30e61c,_0x2775fe){const _0x12bb0c=_0x427b0c;super(),this[_0x12bb0c(0x10d)]=_0x108c68,this[_0x12bb0c(0x102)]=_0xaf91c1,this[_0x12bb0c(0x12e)]=_0x30e61c,this[_0x12bb0c(0xe9)]=_0x2775fe,this[_0x12bb0c(0x130)](),this[_0x12bb0c(0x131)]();}['_initUserSync'](){const _0x5e4cab=_0x427b0c;this[_0x5e4cab(0x145)](this[_0x5e4cab(0x102)]['commentUpdate$']['pipe'](_0xe21b99(0x10))[_0x5e4cab(0xe8)](_0x15a592=>{const _0x550844=_0x5e4cab,_0x4bfbf8=new Set();_0x15a592[_0x550844(0x138)](_0x1fc900=>{const _0x36377f=_0x550844;switch(_0x1fc900[_0x36377f(0x13d)]){case _0x36377f(0xe2):{const _0x40004f=_0x1fc900['payload'][_0x36377f(0xe6)];_0x4bfbf8['add'](_0x40004f);break;}}}),B(this[_0x550844(0xe9)],_0x4bfbf8);}));}['_init'](){const _0x1a1608=_0x427b0c;this[_0x1a1608(0x145)](this[_0x1a1608(0x10d)][_0x1a1608(0x111)][_0x1a1608(0xe8)](async _0xba0dc1=>{const _0x43699d=_0x1a1608;var _0x2b91b9,_0x11f085,_0x5a1f92,_0x33a5c3;const _0x597b9b=(_0x2b91b9=this[_0x43699d(0x102)][_0x43699d(0xef)](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x42e84a=>_0x42e84a[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x2b91b9['root'];if(!_0x597b9b)return;const {unitId:_0x5b66cb,subUnitId:_0xa79809}=_0x597b9b;switch(_0xba0dc1[_0x43699d(0xf6)]&&this[_0x43699d(0x12e)][_0x43699d(0x139)](_0xba0dc1[_0x43699d(0xf6)]),_0xba0dc1[_0x43699d(0x13d)]){case v['Add']:break;case v[_0x43699d(0x11b)]:{this[_0x43699d(0x102)][_0x43699d(0xeb)](_0x5b66cb,_0xa79809,{'unitId':_0x5b66cb,'subUnitId':_0xa79809,'ref':'','id':_0xba0dc1[_0x43699d(0xfe)],'dT':y(+_0xba0dc1[_0x43699d(0x11e)]),'threadId':_0xba0dc1[_0x43699d(0xfa)],'personId':(_0x5a1f92=(_0x11f085=_0xba0dc1[_0x43699d(0xf6)])==null?void 0x0:_0x11f085[_0x43699d(0x100)])!=null?_0x5a1f92:_0xba0dc1['userId'],'text':JSON[_0x43699d(0xf7)](_0xba0dc1[_0x43699d(0x137)]),'parentId':_0x597b9b['id']});break;}case v[_0x43699d(0x11f)]:{const _0x5c1884=this[_0x43699d(0x102)]['getComment'](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);_0x5c1884&&_0x5c1884['parentId']&&this[_0x43699d(0x102)][_0x43699d(0x103)](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);break;}case v[_0x43699d(0x116)]:{this[_0x43699d(0x102)][_0x43699d(0x106)](_0x5b66cb,_0xa79809,{'commentId':_0xba0dc1[_0x43699d(0xfe)],'text':JSON['parse'](_0xba0dc1['content'])});break;}case v[_0x43699d(0x121)]:{const _0x2c178c=(_0x33a5c3=this[_0x43699d(0x102)]['getUnit'](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x57e23e=>_0x57e23e[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x33a5c3[_0x43699d(0xff)];_0x2c178c&&this[_0x43699d(0x102)][_0x43699d(0x11d)](_0x5b66cb,_0xa79809,_0x2c178c['id'],_0xba0dc1[_0x43699d(0x126)]===I[_0x43699d(0x141)]);break;}}}));}};_=V([p(0x0,_0x51d02a(_0x406774)),p(0x1,_0x51d02a(_0x335932)),p(0x2,_0x51d02a(_0x42c2f7)),p(0x3,_0x51d02a(_0x440100))],_);const z=_0x427b0c(0x129),O={};function _0x2010(_0x10d55b,_0x1006c1){_0x10d55b=_0x10d55b-0xe2;const _0x377c65=_0x377c();let _0x201066=_0x377c65[_0x10d55b];return _0x201066;}var k=Object[_0x427b0c(0xe3)],Q=(_0x4acb78,_0x3af339,_0x1465f0,_0x544465)=>{const _0x27a7e3=_0x427b0c;for(var _0x394834=_0x544465>0x1?void 0x0:_0x544465?k(_0x3af339,_0x1465f0):_0x3af339,_0x3320d6=_0x4acb78[_0x27a7e3(0x13f)]-0x1,_0x398335;_0x3320d6>=0x0;_0x3320d6--)(_0x398335=_0x4acb78[_0x3320d6])&&(_0x394834=_0x398335(_0x394834)||_0x394834);return _0x394834;},b=(_0x14c0d8,_0x98e02f)=>(_0xd323c7,_0x23bd47)=>_0x98e02f(_0xd323c7,_0x23bd47,_0x14c0d8);function X(_0x30d4e1,_0x3ddc67){const _0x5c4e94=_0x427b0c,_0x5b82be=_0x30d4e1[_0x5c4e94(0x132)][0x0];return{..._0x3ddc67,'id':_0x5b82be[_0x5c4e94(0xfe)],'resolved':_0x30d4e1[_0x5c4e94(0x126)]===0x1,'dT':y(_0x5b82be[_0x5c4e94(0x11e)]),'personId':_0x5b82be[_0x5c4e94(0xea)],'threadId':_0x5b82be['threadId']};}function _0x377c(){const _0x29caea=['body','unitId','onStarting','UNRECOGNIZED','_commentService','users','format','4723691KfrHJO','commentUpdate$','stringify','Unknown','rangeId','2042082JQQjaV','Edit','_config','1047003xsDrhE','/list','get','Reply','getUser','resolveComment','createTimestamp','Delete','onReady','Solve','syncUpdateMutationToColla','/universer-api/user/list','size','_httpService','solved','11710BRLVuU','_threadCommentDataSourceService','thread-comment-data-source.config','Add','17399304PGPVsW','/solved','COMMENT','_userService','10eVrVCL','_init','_initUserSync','replies','_sessionService','_threadCommentDataSource','find','_initDataSource','content','forEach','addUser','delete','/reply','UNIVER_UNKNOWN','type','/edit','length','values','Solved','saveCommentToSnapshot','setConfig','requireSession','disposeWithMe','132948EvmXrq','slice','add','getOwnPropertyDescriptor','ref','filter','personId','dataSource','subscribe','_injector','userId','addComment','code','customRanges','error','getUnit','/add','symbol','_configService','/universer-api/comment/unit/','OpenOrReOpen','getMemberID','user','parse','reply','resolved','threadId','post','getCurrentUser','map','replyId','root','userID','87034iRoCtl','_threadCommentModel','deleteComment','comment','rangeType','updateComment','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x377c=function(){return _0x29caea;};return _0x377c();}function ee(_0x2f8ffc,_0x5477d3,_0x2acd17){const _0x79548c=_0x427b0c;var _0x4e3de5,_0x5b958e;if(((_0x5b958e=(_0x4e3de5=_0x2f8ffc==null?void 0x0:_0x2f8ffc['replies'])==null?void 0x0:_0x4e3de5[_0x79548c(0x13f)])!=null?_0x5b958e:0x0)>0x0){const _0x202afc=(_0x3c3e3f,_0x2f2657)=>({'id':_0x3c3e3f['replyId'],'threadId':_0x3c3e3f[_0x79548c(0xfa)],'dT':y(_0x3c3e3f[_0x79548c(0x11e)]),'personId':_0x3c3e3f[_0x79548c(0xea)],'resolved':_0x2f8ffc['solved']===I['Solved'],'unitId':_0x5477d3,'subUnitId':_0x2acd17,'text':JSON['parse'](_0x3c3e3f[_0x79548c(0x137)]),'parentId':_0x2f2657}),_0x2e4d9c=_0x202afc(_0x2f8ffc['replies'][0x0]);return{..._0x2e4d9c,'children':_0x2f8ffc[_0x79548c(0x132)][_0x79548c(0x147)](0x1)[_0x79548c(0xfd)](_0x5c3140=>_0x202afc(_0x5c3140,_0x2e4d9c['id']))};}return null;}let S=class{constructor(_0x38dbdc,_0x444e35,_0x4e70aa){const _0x1c0ea3=_0x427b0c;this[_0x1c0ea3(0x125)]=_0x38dbdc,this[_0x1c0ea3(0x12e)]=_0x444e35,this[_0x1c0ea3(0x133)]=_0x4e70aa;}async[_0x427b0c(0xeb)](_0x206698){const _0x2e40a4=_0x427b0c;var _0x508dc9,_0x20a1b8;const {parentId:_0x11b922,unitId:_0x328d09,text:_0x22f7d5,threadId:_0xad0233}=_0x206698,_0xb9714c=(_0x20a1b8=(_0x508dc9=_0x22f7d5['customRanges'])==null?void 0x0:_0x508dc9[_0x2e40a4(0xe5)](_0x47d84c=>_0x47d84c[_0x2e40a4(0x105)]===_0x38fd19[_0x2e40a4(0x12d)])[_0x2e40a4(0xfd)](_0x43d2bf=>_0x43d2bf[_0x2e40a4(0x114)]))!=null?_0x20a1b8:[],_0x3c8cbc=JSON[_0x2e40a4(0x112)](_0x22f7d5),_0x128309=(await this[_0x2e40a4(0x133)][_0x2e40a4(0x144)](_0x328d09))[_0x2e40a4(0xf5)]();if(_0x11b922){const _0x35e7a0={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c,'threadId':_0xad0233},_0x29b5c2=(await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0x13b),{'body':_0x35e7a0}))['body'][_0x2e40a4(0xf8)];return{..._0x206698,'id':_0x29b5c2[_0x2e40a4(0xfe)],'dT':_0x13fc8d(+_0x29b5c2[_0x2e40a4(0x11e)])[_0x2e40a4(0x10f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x29b5c2['userId']};}else{const _0x573964={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c},_0x40e359=await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0xf0),{'body':_0x573964});return X(_0x40e359[_0x2e40a4(0x109)][_0x2e40a4(0x104)],_0x206698);}}async[_0x427b0c(0x106)](_0x3ee8dc){const _0x5e84d0=_0x427b0c;var _0x1638a8,_0x1440b;const {text:_0x26a911,unitId:_0x54dc3b}=_0x3ee8dc,_0x1c5ccb=(_0x1440b=(_0x1638a8=_0x26a911[_0x5e84d0(0xed)])==null?void 0x0:_0x1638a8[_0x5e84d0(0xe5)](_0x3971b8=>_0x3971b8[_0x5e84d0(0x105)]===_0x38fd19[_0x5e84d0(0x12d)])['map'](_0x5b5ca=>_0x5b5ca[_0x5e84d0(0x114)]))!=null?_0x1440b:[],_0x128f84=JSON['stringify'](_0x26a911),_0x51fc9e=_0x3ee8dc[_0x5e84d0(0xfa)],_0x4c3c7d=_0x3ee8dc['id'],_0xe0460f={'memberId':(await this['_sessionService'][_0x5e84d0(0x144)](_0x54dc3b))[_0x5e84d0(0xf5)](),'unitId':_0x54dc3b,'threadId':_0x51fc9e,'mention':_0x1c5ccb,'content':_0x128f84,'replyId':_0x4c3c7d},_0x1b9a85=await this[_0x5e84d0(0x125)][_0x5e84d0(0xfb)](_0x5e84d0(0xf3)+_0x54dc3b+_0x5e84d0(0x13e),{'body':_0xe0460f});return!_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]||_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]['code']===0x1;}async[_0x427b0c(0x11d)](_0x4fd442){const _0x42f27b=_0x427b0c,{unitId:_0x26f2f3}=_0x4fd442,_0x2a72f9=_0x4fd442[_0x42f27b(0xfa)],_0x961c14={'memberId':this[_0x42f27b(0x12e)][_0x42f27b(0xfc)]()[_0x42f27b(0x100)],'unitId':_0x26f2f3,'threadId':_0x2a72f9,'solved':_0x4fd442[_0x42f27b(0xf9)]?I[_0x42f27b(0x141)]:I[_0x42f27b(0xf4)]},_0x5f05c3=await this['_httpService'][_0x42f27b(0xfb)](_0x42f27b(0xf3)+_0x26f2f3+_0x42f27b(0x12c),{'body':_0x961c14});return!_0x5f05c3[_0x42f27b(0x109)][_0x42f27b(0xee)]||_0x5f05c3['body'][_0x42f27b(0xee)]['code']===0x1;}async[_0x427b0c(0x103)](_0x149f25,_0x4c1764,_0x2d3785,_0x1fcb69){const _0x5e63ee=_0x427b0c,_0xd18266={'memberId':(await this[_0x5e63ee(0x133)][_0x5e63ee(0x144)](_0x149f25))[_0x5e63ee(0xf5)](),'threadId':_0x2d3785,'replyId':_0x1fcb69,'unitId':_0x149f25},_0x5e7f8a=await this[_0x5e63ee(0x125)]['post'](_0x5e63ee(0xf3)+_0x149f25+'/delete',{'body':_0xd18266});return!_0x5e7f8a['body'][_0x5e63ee(0xee)]||_0x5e7f8a['body'][_0x5e63ee(0xee)][_0x5e63ee(0xec)]===0x1;}async['listComments'](_0x15f8d9,_0x3f392a,_0x4d90bf){const _0x229810=_0x427b0c,_0x588957={'unitId':_0x15f8d9,'threadId':_0x4d90bf},_0x3d822c=await this[_0x229810(0x125)]['post'](_0x229810(0xf3)+_0x15f8d9+_0x229810(0x119),{'body':_0x588957}),_0x38873f=_0x4d90bf[_0x229810(0xfd)](_0x555d5a=>ee(_0x3d822c[_0x229810(0x109)]['comments'][_0x555d5a],_0x15f8d9,_0x3f392a))[_0x229810(0xe5)](Boolean);return Object[_0x229810(0x140)](_0x3d822c[_0x229810(0x109)][_0x229810(0x10e)])['forEach'](_0x29f32b=>{const _0x301e58=_0x229810;this[_0x301e58(0x12e)]['addUser'](_0x29f32b);}),_0x38873f;}[_0x427b0c(0x142)](_0x521fe3){const _0x3dceac=_0x427b0c;return{'id':_0x521fe3['id'],'threadId':_0x521fe3[_0x3dceac(0xfa)],'ref':_0x521fe3[_0x3dceac(0xe4)]};}};S=Q([b(0x0,_0x51d02a(_0x39ec00)),b(0x1,_0x51d02a(_0x42c2f7)),b(0x2,_0x51d02a(_0x264c29))],S);var re=Object[_0x427b0c(0xe3)],te=(_0x3cf17f,_0x45659a,_0x177ff7,_0x77219c)=>{for(var _0x43e22d=_0x77219c>0x1?void 0x0:_0x77219c?re(_0x45659a,_0x177ff7):_0x45659a,_0x2790ad=_0x3cf17f['length']-0x1,_0x36fb3f;_0x2790ad>=0x0;_0x2790ad--)(_0x36fb3f=_0x3cf17f[_0x2790ad])&&(_0x43e22d=_0x36fb3f(_0x43e22d)||_0x43e22d);return _0x43e22d;},M=(_0x10ddbb,_0x26a2ed)=>(_0x3224c4,_0x34821d)=>_0x26a2ed(_0x3224c4,_0x34821d,_0x10ddbb);let f=class extends _0x5a35c7{constructor(_0x120284,_0x4e1185){const _0x127e87=_0x427b0c;super(),this[_0x127e87(0x128)]=_0x120284,this[_0x127e87(0x134)]=_0x4e1185,this[_0x127e87(0x136)]();}[_0x427b0c(0x136)](){const _0x4e53ff=_0x427b0c;this['_threadCommentDataSourceService'][_0x4e53ff(0xe7)]=this[_0x4e53ff(0x134)],this[_0x4e53ff(0x128)][_0x4e53ff(0x122)]=!0x1;}};f=te([M(0x0,_0x2621a6),M(0x1,_0x51d02a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2e3b18,_0x3e1d4b,_0xf82d82)=>_0x3e1d4b in _0x2e3b18?se(_0x2e3b18,_0x3e1d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf82d82}):_0x2e3b18[_0x3e1d4b]=_0xf82d82,ie=(_0xa75447,_0x3c4f30,_0x4383ac,_0x1cbeba)=>{const _0x190e10=_0x427b0c;for(var _0x5ec70f=_0x1cbeba>0x1?void 0x0:_0x1cbeba?oe(_0x3c4f30,_0x4383ac):_0x3c4f30,_0x1050fb=_0xa75447[_0x190e10(0x13f)]-0x1,_0x24f5c7;_0x1050fb>=0x0;_0x1050fb--)(_0x24f5c7=_0xa75447[_0x1050fb])&&(_0x5ec70f=_0x24f5c7(_0x5ec70f)||_0x5ec70f);return _0x5ec70f;},N=(_0x3ffbc3,_0x54bb51)=>(_0x56a5b8,_0x5c234f)=>_0x54bb51(_0x56a5b8,_0x5c234f,_0x3ffbc3),$=(_0x13d40f,_0x3e79b0,_0x45cdff)=>ne(_0x13d40f,typeof _0x3e79b0!=_0x427b0c(0xf1)?_0x3e79b0+'':_0x3e79b0,_0x45cdff);let g=class extends _0x834bcd{constructor(_0x2f76d2=O,_0x40b013,_0x3b0b8e){const _0x2328b2=_0x427b0c;super(),this[_0x2328b2(0x117)]=_0x2f76d2,this[_0x2328b2(0xe9)]=_0x40b013,this[_0x2328b2(0xf2)]=_0x3b0b8e;const {..._0x5a5d0c}=_0x523a0c({},O,this['_config']);this[_0x2328b2(0xf2)][_0x2328b2(0x143)](z,_0x5a5d0c);}[_0x427b0c(0x10b)](){const _0x40431b=_0x427b0c;[[S],[f],[_]][_0x40431b(0x138)](_0x104ee1=>{const _0xfb3871=_0x40431b;this[_0xfb3871(0xe9)][_0xfb3871(0xe2)](_0x104ee1);});}[_0x427b0c(0x120)](){const _0x4f823c=_0x427b0c;this['_injector'][_0x4f823c(0x11a)](f),this[_0x4f823c(0xe9)][_0x4f823c(0x11a)](_);}};$(g,_0x427b0c(0x107),W),$(g,_0x427b0c(0x13d),_0x5c6fb1[_0x427b0c(0x13c)]),g=ie([_0x475c39(_0x9a2f36,_0x4f9fad,_0x5e191e),N(0x1,_0x51d02a(_0x440100)),N(0x2,_0x2959e9)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x346c01=_0x20bd;(function(_0x5dc717,_0x5c4d83){const _0x5da85f=_0x20bd,_0x420ef4=_0x5dc717();while(!![]){try{const _0x3bfba5=-parseInt(_0x5da85f(0x8f))/0x1*(-parseInt(_0x5da85f(0xc9))/0x2)+-parseInt(_0x5da85f(0xa2))/0x3*(parseInt(_0x5da85f(0xbe))/0x4)+parseInt(_0x5da85f(0xb0))/0x5+parseInt(_0x5da85f(0xc1))/0x6*(parseInt(_0x5da85f(0x9f))/0x7)+parseInt(_0x5da85f(0x78))/0x8+parseInt(_0x5da85f(0x72))/0x9+-parseInt(_0x5da85f(0xaf))/0xa;if(_0x3bfba5===_0x5c4d83)break;else _0x420ef4['push'](_0x420ef4['shift']());}catch(_0x18f05c){_0x420ef4['push'](_0x420ef4['shift']());}}}(_0x2baf,0x7fe3f));import{CommentService as _0x2e07b6,CollaborationSessionService as _0x1a17a2,UniverCollaborationClientPlugin as _0xf6d2e9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42d43b}from'@univerjs-pro/license';function _0x2baf(){const _0x1a7801=['1718074lvTLBQ','body','userID','onReady','content','reply','delete','_initUserSync','type','replyId','updateComment','post','5532759enDFKt','ref','setConfig','_userService','users','_threadCommentModel','3322904nXkQHW','deleteComment','getCurrentUser','get','Solve','commentUpdate$','getComment','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','Unknown','/universer-api/user/list','createTimestamp','_init','stringify','_sessionService','_injector','root','unitId','saveCommentToSnapshot','customRanges','_initDataSource','subscribe','UNRECOGNIZED','1bUqMje','userId','/reply','getMemberID','/add','OpenOrReOpen','parse','pluginName','comment','Add','threadId','_threadCommentDataSourceService','_commentService','rangeType','add','error','16639VxrFQy','UNIVER_UNKNOWN','user','3yWUwUj','filter','values','find','/edit','payload','getUnit','requireSession','comments','length','Reply','Edit','disposeWithMe','11291220fAIXPl','1268465xcFOJD','rangeId','replies','_configService','forEach','_threadCommentDataSource','code','Delete','map','addUser','resolveComment','/universer-api/comment/unit/','slice','defineProperty','2092644lsBGaE','thread-comment-data-source.config','solved','84AcMiEJ','pipe','Solved','/solved','_httpService','COMMENT','format','onStarting'];_0x2baf=function(){return _0x1a7801;};return _0x2baf();}import{dayjs as _0x40a0bb,UserManagerService as _0x98ac35,Inject as _0x11b788,Injector as _0x48aa04,Disposable as _0x3e2a71,CustomRangeType as _0x3950fb,UniverInstanceType as _0x39fdf4,DependentOn as _0x2c6c28,IConfigService as _0x39fab1,Plugin as _0x2f68f0,merge as _0x4f8531}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x289211}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d80a6,IThreadCommentDataSourceService as _0x172d22}from'@univerjs/thread-comment';import{bufferTime as _0x8b8400}from'rxjs';import{HTTPService as _0x4aa355}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x374a11=>(_0x374a11[_0x374a11[_0x346c01(0x94)]=0x0]=_0x346c01(0x94),_0x374a11[_0x374a11[_0x346c01(0xc3)]=0x1]=_0x346c01(0xc3),_0x374a11[_0x374a11[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0x374a11))(I||{}),v=(_0xb47590=>(_0xb47590[_0xb47590[_0x346c01(0x81)]=0x0]=_0x346c01(0x81),_0xb47590[_0xb47590['Add']=0x1]=_0x346c01(0x98),_0xb47590[_0xb47590[_0x346c01(0xac)]=0x2]='Reply',_0xb47590[_0xb47590['Edit']=0x3]=_0x346c01(0xad),_0xb47590[_0xb47590[_0x346c01(0xb7)]=0x4]=_0x346c01(0xb7),_0xb47590[_0xb47590[_0x346c01(0x7c)]=0x5]=_0x346c01(0x7c),_0xb47590[_0xb47590[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0xb47590))(v||{});const y=_0x337506=>_0x40a0bb(new Date(+_0x337506))[_0x346c01(0xc7)](_0x346c01(0x7f)),B=async(_0x18e88d,_0x2e2497)=>{const _0x2c68a9=_0x346c01,_0x5309f8=_0x18e88d[_0x2c68a9(0x7b)](_0x98ac35),_0x37d775=_0x18e88d[_0x2c68a9(0x7b)](_0x4aa355);_0x2e2497[_0x2c68a9(0xb4)](_0x3ac00e=>{const _0x456b97=_0x2c68a9;_0x5309f8['getUser'](_0x3ac00e)&&_0x2e2497[_0x456b97(0xcf)](_0x3ac00e);}),_0x2e2497['size']&&(await _0x37d775[_0x2c68a9(0x7b)](_0x2c68a9(0x82),{'params':{'userIDs':[..._0x2e2497]}}))[_0x2c68a9(0xca)]['users'][_0x2c68a9(0xb4)](_0x4295ae=>{const _0x329d85=_0x2c68a9;_0x4295ae&&_0x5309f8[_0x329d85(0xb9)](_0x4295ae);});};var K=Object[_0x346c01(0x80)],V=(_0x2f5395,_0x30d6b4,_0x1b22d5,_0x2fd57f)=>{for(var _0x4e9a43=_0x2fd57f>0x1?void 0x0:_0x2fd57f?K(_0x30d6b4,_0x1b22d5):_0x30d6b4,_0x782629=_0x2f5395['length']-0x1,_0x58477d;_0x782629>=0x0;_0x782629--)(_0x58477d=_0x2f5395[_0x782629])&&(_0x4e9a43=_0x58477d(_0x4e9a43)||_0x4e9a43);return _0x4e9a43;},p=(_0x194e23,_0x187248)=>(_0x3f2326,_0x4a0ed9)=>_0x187248(_0x3f2326,_0x4a0ed9,_0x194e23);let _=class extends _0x3e2a71{constructor(_0x5f57ed,_0x320383,_0x47bd0b,_0x26330c){const _0x383d88=_0x346c01;super(),this[_0x383d88(0x9b)]=_0x5f57ed,this['_threadCommentModel']=_0x320383,this['_userService']=_0x47bd0b,this[_0x383d88(0x87)]=_0x26330c,this['_init'](),this[_0x383d88(0xd0)]();}[_0x346c01(0xd0)](){const _0x266681=_0x346c01;this[_0x266681(0xae)](this[_0x266681(0x77)][_0x266681(0x7d)][_0x266681(0xc2)](_0x8b8400(0x10))[_0x266681(0x8d)](_0x3414a7=>{const _0x3c12bd=_0x266681,_0x4eeb2b=new Set();_0x3414a7[_0x3c12bd(0xb4)](_0x5e2a35=>{const _0x5bc542=_0x3c12bd;switch(_0x5e2a35[_0x5bc542(0xd1)]){case _0x5bc542(0x9d):{const _0xd52e42=_0x5e2a35[_0x5bc542(0xa7)]['personId'];_0x4eeb2b[_0x5bc542(0x9d)](_0xd52e42);break;}}}),B(this[_0x3c12bd(0x87)],_0x4eeb2b);}));}[_0x346c01(0x84)](){const _0x252611=_0x346c01;this[_0x252611(0xae)](this[_0x252611(0x9b)][_0x252611(0x7d)][_0x252611(0x8d)](async _0x490f74=>{const _0x4d9ea8=_0x252611;var _0x1e3c51,_0x31b780,_0x25a9b9,_0x24d614;const _0x235870=(_0x1e3c51=this['_threadCommentModel']['getUnit'](_0x490f74['unitId'])[_0x4d9ea8(0xa5)](_0x2430b3=>_0x2430b3['threadId']===_0x490f74[_0x4d9ea8(0x99)]))==null?void 0x0:_0x1e3c51['root'];if(!_0x235870)return;const {unitId:_0x384050,subUnitId:_0x52e0b0}=_0x235870;switch(_0x490f74[_0x4d9ea8(0xa1)]&&this[_0x4d9ea8(0x75)][_0x4d9ea8(0xb9)](_0x490f74[_0x4d9ea8(0xa1)]),_0x490f74['type']){case v[_0x4d9ea8(0x98)]:break;case v[_0x4d9ea8(0xac)]:{this[_0x4d9ea8(0x77)]['addComment'](_0x384050,_0x52e0b0,{'unitId':_0x384050,'subUnitId':_0x52e0b0,'ref':'','id':_0x490f74['replyId'],'dT':y(+_0x490f74[_0x4d9ea8(0x83)]),'threadId':_0x490f74['threadId'],'personId':(_0x25a9b9=(_0x31b780=_0x490f74['user'])==null?void 0x0:_0x31b780[_0x4d9ea8(0xcb)])!=null?_0x25a9b9:_0x490f74[_0x4d9ea8(0x90)],'text':JSON[_0x4d9ea8(0x95)](_0x490f74['content']),'parentId':_0x235870['id']});break;}case v['Delete']:{const _0x70f05a=this[_0x4d9ea8(0x77)][_0x4d9ea8(0x7e)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);_0x70f05a&&_0x70f05a['parentId']&&this['_threadCommentModel'][_0x4d9ea8(0x79)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);break;}case v['Edit']:{this[_0x4d9ea8(0x77)][_0x4d9ea8(0xd3)](_0x384050,_0x52e0b0,{'commentId':_0x490f74[_0x4d9ea8(0xd2)],'text':JSON['parse'](_0x490f74[_0x4d9ea8(0xcd)])});break;}case v['Solve']:{const _0x303013=(_0x24d614=this['_threadCommentModel'][_0x4d9ea8(0xa8)](_0x490f74[_0x4d9ea8(0x89)])[_0x4d9ea8(0xa5)](_0x49c758=>_0x49c758[_0x4d9ea8(0x99)]===_0x490f74['threadId']))==null?void 0x0:_0x24d614[_0x4d9ea8(0x88)];_0x303013&&this[_0x4d9ea8(0x77)]['resolveComment'](_0x384050,_0x52e0b0,_0x303013['id'],_0x490f74[_0x4d9ea8(0xc0)]===I[_0x4d9ea8(0xc3)]);break;}}}));}};function _0x20bd(_0x5a3802,_0x4edb0b){_0x5a3802=_0x5a3802-0x71;const _0x2baff6=_0x2baf();let _0x20bd65=_0x2baff6[_0x5a3802];return _0x20bd65;}_=V([p(0x0,_0x11b788(_0x2e07b6)),p(0x1,_0x11b788(_0x2d80a6)),p(0x2,_0x11b788(_0x98ac35)),p(0x3,_0x11b788(_0x48aa04))],_);const z=_0x346c01(0xbf),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bbbac,_0x7febd7,_0x3ef3b2,_0x59447a)=>{const _0x4939da=_0x346c01;for(var _0x6d3d95=_0x59447a>0x1?void 0x0:_0x59447a?k(_0x7febd7,_0x3ef3b2):_0x7febd7,_0x3f9e19=_0x5bbbac[_0x4939da(0xab)]-0x1,_0x2fe5d0;_0x3f9e19>=0x0;_0x3f9e19--)(_0x2fe5d0=_0x5bbbac[_0x3f9e19])&&(_0x6d3d95=_0x2fe5d0(_0x6d3d95)||_0x6d3d95);return _0x6d3d95;},b=(_0x4d9e10,_0x3a2c3f)=>(_0x240b1c,_0x4d0792)=>_0x3a2c3f(_0x240b1c,_0x4d0792,_0x4d9e10);function X(_0x47ea2c,_0x48bbc9){const _0x2ff5d4=_0x346c01,_0x435354=_0x47ea2c[_0x2ff5d4(0xb2)][0x0];return{..._0x48bbc9,'id':_0x435354['replyId'],'resolved':_0x47ea2c[_0x2ff5d4(0xc0)]===0x1,'dT':y(_0x435354['createTimestamp']),'personId':_0x435354[_0x2ff5d4(0x90)],'threadId':_0x435354[_0x2ff5d4(0x99)]};}function ee(_0x2c2e50,_0x550a55,_0x551cdd){const _0x1d7290=_0x346c01;var _0x268b87,_0x25c576;if(((_0x25c576=(_0x268b87=_0x2c2e50==null?void 0x0:_0x2c2e50['replies'])==null?void 0x0:_0x268b87[_0x1d7290(0xab)])!=null?_0x25c576:0x0)>0x0){const _0x470e1b=(_0x5b6c62,_0x47b96f)=>({'id':_0x5b6c62[_0x1d7290(0xd2)],'threadId':_0x5b6c62[_0x1d7290(0x99)],'dT':y(_0x5b6c62['createTimestamp']),'personId':_0x5b6c62[_0x1d7290(0x90)],'resolved':_0x2c2e50[_0x1d7290(0xc0)]===I[_0x1d7290(0xc3)],'unitId':_0x550a55,'subUnitId':_0x551cdd,'text':JSON[_0x1d7290(0x95)](_0x5b6c62['content']),'parentId':_0x47b96f}),_0x23e531=_0x470e1b(_0x2c2e50[_0x1d7290(0xb2)][0x0]);return{..._0x23e531,'children':_0x2c2e50[_0x1d7290(0xb2)][_0x1d7290(0xbc)](0x1)[_0x1d7290(0xb8)](_0x1ecfd=>_0x470e1b(_0x1ecfd,_0x23e531['id']))};}return null;}let S=class{constructor(_0x361dd6,_0x5e1ce7,_0x3e0a67){const _0x1d4f69=_0x346c01;this[_0x1d4f69(0xc5)]=_0x361dd6,this[_0x1d4f69(0x75)]=_0x5e1ce7,this['_sessionService']=_0x3e0a67;}async['addComment'](_0x5328fd){const _0x36201f=_0x346c01;var _0xe1e5b8,_0xe288b;const {parentId:_0x4ebf2d,unitId:_0x25f1bc,text:_0x34563f,threadId:_0x1e4a86}=_0x5328fd,_0x18f2af=(_0xe288b=(_0xe1e5b8=_0x34563f[_0x36201f(0x8b)])==null?void 0x0:_0xe1e5b8[_0x36201f(0xa3)](_0x44046c=>_0x44046c[_0x36201f(0x9c)]===_0x3950fb['COMMENT'])[_0x36201f(0xb8)](_0x1105b8=>_0x1105b8[_0x36201f(0xb1)]))!=null?_0xe288b:[],_0x257409=JSON[_0x36201f(0x85)](_0x34563f),_0x50be42=(await this[_0x36201f(0x86)][_0x36201f(0xa9)](_0x25f1bc))[_0x36201f(0x92)]();if(_0x4ebf2d){const _0x66eb79={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af,'threadId':_0x1e4a86},_0x2aeeec=(await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x91),{'body':_0x66eb79}))[_0x36201f(0xca)][_0x36201f(0xce)];return{..._0x5328fd,'id':_0x2aeeec['replyId'],'dT':_0x40a0bb(+_0x2aeeec[_0x36201f(0x83)])[_0x36201f(0xc7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2aeeec[_0x36201f(0x90)]};}else{const _0x416d0a={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af},_0x543479=await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x93),{'body':_0x416d0a});return X(_0x543479[_0x36201f(0xca)][_0x36201f(0x97)],_0x5328fd);}}async[_0x346c01(0xd3)](_0x33fa54){const _0x1c6eb3=_0x346c01;var _0x2e712d,_0x368d98;const {text:_0xe54e6b,unitId:_0x16354b}=_0x33fa54,_0x5edfa1=(_0x368d98=(_0x2e712d=_0xe54e6b[_0x1c6eb3(0x8b)])==null?void 0x0:_0x2e712d[_0x1c6eb3(0xa3)](_0x595b7e=>_0x595b7e['rangeType']===_0x3950fb[_0x1c6eb3(0xc6)])['map'](_0x5a7c7a=>_0x5a7c7a[_0x1c6eb3(0xb1)]))!=null?_0x368d98:[],_0x530eff=JSON[_0x1c6eb3(0x85)](_0xe54e6b),_0x4558be=_0x33fa54['threadId'],_0x23ebb9=_0x33fa54['id'],_0x1236bd={'memberId':(await this[_0x1c6eb3(0x86)]['requireSession'](_0x16354b))['getMemberID'](),'unitId':_0x16354b,'threadId':_0x4558be,'mention':_0x5edfa1,'content':_0x530eff,'replyId':_0x23ebb9},_0x586242=await this[_0x1c6eb3(0xc5)][_0x1c6eb3(0x71)](_0x1c6eb3(0xbb)+_0x16354b+_0x1c6eb3(0xa6),{'body':_0x1236bd});return!_0x586242[_0x1c6eb3(0xca)][_0x1c6eb3(0x9e)]||_0x586242[_0x1c6eb3(0xca)]['error'][_0x1c6eb3(0xb6)]===0x1;}async[_0x346c01(0xba)](_0x42d17a){const _0x21fa54=_0x346c01,{unitId:_0x40f4ef}=_0x42d17a,_0x17cd03=_0x42d17a[_0x21fa54(0x99)],_0x5d00c5={'memberId':this[_0x21fa54(0x75)][_0x21fa54(0x7a)]()[_0x21fa54(0xcb)],'unitId':_0x40f4ef,'threadId':_0x17cd03,'solved':_0x42d17a['resolved']?I['Solved']:I[_0x21fa54(0x94)]},_0x526a65=await this[_0x21fa54(0xc5)][_0x21fa54(0x71)](_0x21fa54(0xbb)+_0x40f4ef+_0x21fa54(0xc4),{'body':_0x5d00c5});return!_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)]||_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)][_0x21fa54(0xb6)]===0x1;}async['deleteComment'](_0x155fcd,_0x36d3c4,_0xfe86bc,_0x541000){const _0x364317=_0x346c01,_0x997a13={'memberId':(await this['_sessionService'][_0x364317(0xa9)](_0x155fcd))['getMemberID'](),'threadId':_0xfe86bc,'replyId':_0x541000,'unitId':_0x155fcd},_0x133ba9=await this['_httpService'][_0x364317(0x71)](_0x364317(0xbb)+_0x155fcd+'/delete',{'body':_0x997a13});return!_0x133ba9[_0x364317(0xca)][_0x364317(0x9e)]||_0x133ba9[_0x364317(0xca)]['error'][_0x364317(0xb6)]===0x1;}async['listComments'](_0x30e676,_0x53256c,_0x5eed7a){const _0x4ea13f=_0x346c01,_0x1c3059={'unitId':_0x30e676,'threadId':_0x5eed7a},_0x28d9ee=await this[_0x4ea13f(0xc5)][_0x4ea13f(0x71)](_0x4ea13f(0xbb)+_0x30e676+'/list',{'body':_0x1c3059}),_0x38196a=_0x5eed7a[_0x4ea13f(0xb8)](_0x1ec921=>ee(_0x28d9ee[_0x4ea13f(0xca)][_0x4ea13f(0xaa)][_0x1ec921],_0x30e676,_0x53256c))['filter'](Boolean);return Object[_0x4ea13f(0xa4)](_0x28d9ee['body'][_0x4ea13f(0x76)])[_0x4ea13f(0xb4)](_0x24bea4=>{const _0x4c8678=_0x4ea13f;this[_0x4c8678(0x75)][_0x4c8678(0xb9)](_0x24bea4);}),_0x38196a;}[_0x346c01(0x8a)](_0x4a6d54){const _0xad4055=_0x346c01;return{'id':_0x4a6d54['id'],'threadId':_0x4a6d54[_0xad4055(0x99)],'ref':_0x4a6d54[_0xad4055(0x73)]};}};S=Q([b(0x0,_0x11b788(_0x4aa355)),b(0x1,_0x11b788(_0x98ac35)),b(0x2,_0x11b788(_0x1a17a2))],S);var re=Object[_0x346c01(0x80)],te=(_0x52d795,_0x32ea0d,_0x31b957,_0x254cb3)=>{const _0x1295dc=_0x346c01;for(var _0x5eac4a=_0x254cb3>0x1?void 0x0:_0x254cb3?re(_0x32ea0d,_0x31b957):_0x32ea0d,_0x224a0f=_0x52d795[_0x1295dc(0xab)]-0x1,_0x3d983d;_0x224a0f>=0x0;_0x224a0f--)(_0x3d983d=_0x52d795[_0x224a0f])&&(_0x5eac4a=_0x3d983d(_0x5eac4a)||_0x5eac4a);return _0x5eac4a;},M=(_0x77704a,_0x51b57f)=>(_0x4f3cbb,_0xb3440c)=>_0x51b57f(_0x4f3cbb,_0xb3440c,_0x77704a);let f=class extends _0x3e2a71{constructor(_0x1f0973,_0x2b8468){const _0x2fb279=_0x346c01;super(),this[_0x2fb279(0x9a)]=_0x1f0973,this[_0x2fb279(0xb5)]=_0x2b8468,this['_initDataSource']();}[_0x346c01(0x8c)](){const _0x57fbac=_0x346c01;this[_0x57fbac(0x9a)]['dataSource']=this[_0x57fbac(0xb5)],this[_0x57fbac(0x9a)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x172d22),M(0x1,_0x11b788(S))],f);var se=Object[_0x346c01(0xbd)],oe=Object[_0x346c01(0x80)],ne=(_0x39e76f,_0x1d61dc,_0x454d31)=>_0x1d61dc in _0x39e76f?se(_0x39e76f,_0x1d61dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x454d31}):_0x39e76f[_0x1d61dc]=_0x454d31,ie=(_0x12744d,_0x25a524,_0x311cb6,_0x5b0b45)=>{const _0x28507f=_0x346c01;for(var _0x3534f3=_0x5b0b45>0x1?void 0x0:_0x5b0b45?oe(_0x25a524,_0x311cb6):_0x25a524,_0x1d0e64=_0x12744d[_0x28507f(0xab)]-0x1,_0x2f034e;_0x1d0e64>=0x0;_0x1d0e64--)(_0x2f034e=_0x12744d[_0x1d0e64])&&(_0x3534f3=_0x2f034e(_0x3534f3)||_0x3534f3);return _0x3534f3;},N=(_0xc6180a,_0x48d421)=>(_0x2c4418,_0x35689c)=>_0x48d421(_0x2c4418,_0x35689c,_0xc6180a),$=(_0x4162fb,_0x1231c3,_0x402efb)=>ne(_0x4162fb,typeof _0x1231c3!='symbol'?_0x1231c3+'':_0x1231c3,_0x402efb);let g=class extends _0x2f68f0{constructor(_0x1fc071=O,_0x17f145,_0x1fc28a){const _0x4be81e=_0x346c01;super(),this['_config']=_0x1fc071,this[_0x4be81e(0x87)]=_0x17f145,this[_0x4be81e(0xb3)]=_0x1fc28a;const {..._0x419664}=_0x4f8531({},O,this['_config']);this['_configService'][_0x4be81e(0x74)](z,_0x419664);}[_0x346c01(0xc8)](){[[S],[f],[_]]['forEach'](_0x3626b1=>{const _0x2bff57=_0x20bd;this['_injector'][_0x2bff57(0x9d)](_0x3626b1);});}[_0x346c01(0xcc)](){const _0x2d0632=_0x346c01;this[_0x2d0632(0x87)][_0x2d0632(0x7b)](f),this[_0x2d0632(0x87)][_0x2d0632(0x7b)](_);}};$(g,_0x346c01(0x96),W),$(g,_0x346c01(0xd1),_0x39fdf4[_0x346c01(0xa0)]),g=ie([_0x2c6c28(_0x289211,_0xf6d2e9,_0x42d43b),N(0x1,_0x11b788(_0x48aa04)),N(0x2,_0x39fab1)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x427b0c=_0x2010;(function(_0x57dbff,_0x2de5b2){const _0x2736c7=_0x2010,_0x32937e=_0x57dbff();while(!![]){try{const _0x436f77=-parseInt(_0x2736c7(0x12f))/0x1*(parseInt(_0x2736c7(0x101))/0x2)+-parseInt(_0x2736c7(0x118))/0x3+parseInt(_0x2736c7(0x146))/0x4+parseInt(_0x2736c7(0x127))/0x5+-parseInt(_0x2736c7(0x115))/0x6+-parseInt(_0x2736c7(0x110))/0x7+parseInt(_0x2736c7(0x12b))/0x8;if(_0x436f77===_0x2de5b2)break;else _0x32937e['push'](_0x32937e['shift']());}catch(_0x306f43){_0x32937e['push'](_0x32937e['shift']());}}}(_0x377c,0x64619));import{CommentService as _0x406774,CollaborationSessionService as _0x264c29,UniverCollaborationClientPlugin as _0x4f9fad}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e191e}from'@univerjs-pro/license';import{dayjs as _0x13fc8d,UserManagerService as _0x42c2f7,Inject as _0x51d02a,Injector as _0x440100,Disposable as _0x5a35c7,CustomRangeType as _0x38fd19,UniverInstanceType as _0x5c6fb1,DependentOn as _0x475c39,IConfigService as _0x2959e9,Plugin as _0x834bcd,merge as _0x523a0c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9a2f36}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x335932,IThreadCommentDataSourceService as _0x2621a6}from'@univerjs/thread-comment';import{bufferTime as _0xe21b99}from'rxjs';import{HTTPService as _0x39ec00}from'@univerjs/network';const W=_0x427b0c(0x108);var I=(_0x2055aa=>(_0x2055aa[_0x2055aa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2055aa[_0x2055aa[_0x427b0c(0x141)]=0x1]=_0x427b0c(0x141),_0x2055aa[_0x2055aa[_0x427b0c(0x10c)]=-0x1]='UNRECOGNIZED',_0x2055aa))(I||{}),v=(_0x137c97=>(_0x137c97[_0x137c97['Unknown']=0x0]=_0x427b0c(0x113),_0x137c97[_0x137c97[_0x427b0c(0x12a)]=0x1]=_0x427b0c(0x12a),_0x137c97[_0x137c97['Reply']=0x2]=_0x427b0c(0x11b),_0x137c97[_0x137c97['Edit']=0x3]='Edit',_0x137c97[_0x137c97['Delete']=0x4]=_0x427b0c(0x11f),_0x137c97[_0x137c97[_0x427b0c(0x121)]=0x5]=_0x427b0c(0x121),_0x137c97[_0x137c97['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x137c97))(v||{});const y=_0x5f0fc8=>_0x13fc8d(new Date(+_0x5f0fc8))[_0x427b0c(0x10f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x117742,_0x51f65e)=>{const _0x2e406f=_0x427b0c,_0x2b1424=_0x117742[_0x2e406f(0x11a)](_0x42c2f7),_0x5c5a4e=_0x117742[_0x2e406f(0x11a)](_0x39ec00);_0x51f65e[_0x2e406f(0x138)](_0x292d66=>{const _0x3f56a2=_0x2e406f;_0x2b1424[_0x3f56a2(0x11c)](_0x292d66)&&_0x51f65e[_0x3f56a2(0x13a)](_0x292d66);}),_0x51f65e[_0x2e406f(0x124)]&&(await _0x5c5a4e['get'](_0x2e406f(0x123),{'params':{'userIDs':[..._0x51f65e]}}))['body']['users'][_0x2e406f(0x138)](_0x365945=>{const _0x1ccd51=_0x2e406f;_0x365945&&_0x2b1424[_0x1ccd51(0x139)](_0x365945);});};var K=Object[_0x427b0c(0xe3)],V=(_0x18cb91,_0x497cbd,_0x5172e7,_0x4f1811)=>{const _0x33c830=_0x427b0c;for(var _0x24d2e6=_0x4f1811>0x1?void 0x0:_0x4f1811?K(_0x497cbd,_0x5172e7):_0x497cbd,_0x35a105=_0x18cb91[_0x33c830(0x13f)]-0x1,_0x5a17c1;_0x35a105>=0x0;_0x35a105--)(_0x5a17c1=_0x18cb91[_0x35a105])&&(_0x24d2e6=_0x5a17c1(_0x24d2e6)||_0x24d2e6);return _0x24d2e6;},p=(_0x175fb0,_0x35d032)=>(_0x3c588c,_0x5140d4)=>_0x35d032(_0x3c588c,_0x5140d4,_0x175fb0);let _=class extends _0x5a35c7{constructor(_0x108c68,_0xaf91c1,_0x30e61c,_0x2775fe){const _0x12bb0c=_0x427b0c;super(),this[_0x12bb0c(0x10d)]=_0x108c68,this[_0x12bb0c(0x102)]=_0xaf91c1,this[_0x12bb0c(0x12e)]=_0x30e61c,this[_0x12bb0c(0xe9)]=_0x2775fe,this[_0x12bb0c(0x130)](),this[_0x12bb0c(0x131)]();}['_initUserSync'](){const _0x5e4cab=_0x427b0c;this[_0x5e4cab(0x145)](this[_0x5e4cab(0x102)]['commentUpdate$']['pipe'](_0xe21b99(0x10))[_0x5e4cab(0xe8)](_0x15a592=>{const _0x550844=_0x5e4cab,_0x4bfbf8=new Set();_0x15a592[_0x550844(0x138)](_0x1fc900=>{const _0x36377f=_0x550844;switch(_0x1fc900[_0x36377f(0x13d)]){case _0x36377f(0xe2):{const _0x40004f=_0x1fc900['payload'][_0x36377f(0xe6)];_0x4bfbf8['add'](_0x40004f);break;}}}),B(this[_0x550844(0xe9)],_0x4bfbf8);}));}['_init'](){const _0x1a1608=_0x427b0c;this[_0x1a1608(0x145)](this[_0x1a1608(0x10d)][_0x1a1608(0x111)][_0x1a1608(0xe8)](async _0xba0dc1=>{const _0x43699d=_0x1a1608;var _0x2b91b9,_0x11f085,_0x5a1f92,_0x33a5c3;const _0x597b9b=(_0x2b91b9=this[_0x43699d(0x102)][_0x43699d(0xef)](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x42e84a=>_0x42e84a[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x2b91b9['root'];if(!_0x597b9b)return;const {unitId:_0x5b66cb,subUnitId:_0xa79809}=_0x597b9b;switch(_0xba0dc1[_0x43699d(0xf6)]&&this[_0x43699d(0x12e)][_0x43699d(0x139)](_0xba0dc1[_0x43699d(0xf6)]),_0xba0dc1[_0x43699d(0x13d)]){case v['Add']:break;case v[_0x43699d(0x11b)]:{this[_0x43699d(0x102)][_0x43699d(0xeb)](_0x5b66cb,_0xa79809,{'unitId':_0x5b66cb,'subUnitId':_0xa79809,'ref':'','id':_0xba0dc1[_0x43699d(0xfe)],'dT':y(+_0xba0dc1[_0x43699d(0x11e)]),'threadId':_0xba0dc1[_0x43699d(0xfa)],'personId':(_0x5a1f92=(_0x11f085=_0xba0dc1[_0x43699d(0xf6)])==null?void 0x0:_0x11f085[_0x43699d(0x100)])!=null?_0x5a1f92:_0xba0dc1['userId'],'text':JSON[_0x43699d(0xf7)](_0xba0dc1[_0x43699d(0x137)]),'parentId':_0x597b9b['id']});break;}case v[_0x43699d(0x11f)]:{const _0x5c1884=this[_0x43699d(0x102)]['getComment'](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);_0x5c1884&&_0x5c1884['parentId']&&this[_0x43699d(0x102)][_0x43699d(0x103)](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);break;}case v[_0x43699d(0x116)]:{this[_0x43699d(0x102)][_0x43699d(0x106)](_0x5b66cb,_0xa79809,{'commentId':_0xba0dc1[_0x43699d(0xfe)],'text':JSON['parse'](_0xba0dc1['content'])});break;}case v[_0x43699d(0x121)]:{const _0x2c178c=(_0x33a5c3=this[_0x43699d(0x102)]['getUnit'](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x57e23e=>_0x57e23e[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x33a5c3[_0x43699d(0xff)];_0x2c178c&&this[_0x43699d(0x102)][_0x43699d(0x11d)](_0x5b66cb,_0xa79809,_0x2c178c['id'],_0xba0dc1[_0x43699d(0x126)]===I[_0x43699d(0x141)]);break;}}}));}};_=V([p(0x0,_0x51d02a(_0x406774)),p(0x1,_0x51d02a(_0x335932)),p(0x2,_0x51d02a(_0x42c2f7)),p(0x3,_0x51d02a(_0x440100))],_);const z=_0x427b0c(0x129),O={};function _0x2010(_0x10d55b,_0x1006c1){_0x10d55b=_0x10d55b-0xe2;const _0x377c65=_0x377c();let _0x201066=_0x377c65[_0x10d55b];return _0x201066;}var k=Object[_0x427b0c(0xe3)],Q=(_0x4acb78,_0x3af339,_0x1465f0,_0x544465)=>{const _0x27a7e3=_0x427b0c;for(var _0x394834=_0x544465>0x1?void 0x0:_0x544465?k(_0x3af339,_0x1465f0):_0x3af339,_0x3320d6=_0x4acb78[_0x27a7e3(0x13f)]-0x1,_0x398335;_0x3320d6>=0x0;_0x3320d6--)(_0x398335=_0x4acb78[_0x3320d6])&&(_0x394834=_0x398335(_0x394834)||_0x394834);return _0x394834;},b=(_0x14c0d8,_0x98e02f)=>(_0xd323c7,_0x23bd47)=>_0x98e02f(_0xd323c7,_0x23bd47,_0x14c0d8);function X(_0x30d4e1,_0x3ddc67){const _0x5c4e94=_0x427b0c,_0x5b82be=_0x30d4e1[_0x5c4e94(0x132)][0x0];return{..._0x3ddc67,'id':_0x5b82be[_0x5c4e94(0xfe)],'resolved':_0x30d4e1[_0x5c4e94(0x126)]===0x1,'dT':y(_0x5b82be[_0x5c4e94(0x11e)]),'personId':_0x5b82be[_0x5c4e94(0xea)],'threadId':_0x5b82be['threadId']};}function _0x377c(){const _0x29caea=['body','unitId','onStarting','UNRECOGNIZED','_commentService','users','format','4723691KfrHJO','commentUpdate$','stringify','Unknown','rangeId','2042082JQQjaV','Edit','_config','1047003xsDrhE','/list','get','Reply','getUser','resolveComment','createTimestamp','Delete','onReady','Solve','syncUpdateMutationToColla','/universer-api/user/list','size','_httpService','solved','11710BRLVuU','_threadCommentDataSourceService','thread-comment-data-source.config','Add','17399304PGPVsW','/solved','COMMENT','_userService','10eVrVCL','_init','_initUserSync','replies','_sessionService','_threadCommentDataSource','find','_initDataSource','content','forEach','addUser','delete','/reply','UNIVER_UNKNOWN','type','/edit','length','values','Solved','saveCommentToSnapshot','setConfig','requireSession','disposeWithMe','132948EvmXrq','slice','add','getOwnPropertyDescriptor','ref','filter','personId','dataSource','subscribe','_injector','userId','addComment','code','customRanges','error','getUnit','/add','symbol','_configService','/universer-api/comment/unit/','OpenOrReOpen','getMemberID','user','parse','reply','resolved','threadId','post','getCurrentUser','map','replyId','root','userID','87034iRoCtl','_threadCommentModel','deleteComment','comment','rangeType','updateComment','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x377c=function(){return _0x29caea;};return _0x377c();}function ee(_0x2f8ffc,_0x5477d3,_0x2acd17){const _0x79548c=_0x427b0c;var _0x4e3de5,_0x5b958e;if(((_0x5b958e=(_0x4e3de5=_0x2f8ffc==null?void 0x0:_0x2f8ffc['replies'])==null?void 0x0:_0x4e3de5[_0x79548c(0x13f)])!=null?_0x5b958e:0x0)>0x0){const _0x202afc=(_0x3c3e3f,_0x2f2657)=>({'id':_0x3c3e3f['replyId'],'threadId':_0x3c3e3f[_0x79548c(0xfa)],'dT':y(_0x3c3e3f[_0x79548c(0x11e)]),'personId':_0x3c3e3f[_0x79548c(0xea)],'resolved':_0x2f8ffc['solved']===I['Solved'],'unitId':_0x5477d3,'subUnitId':_0x2acd17,'text':JSON['parse'](_0x3c3e3f[_0x79548c(0x137)]),'parentId':_0x2f2657}),_0x2e4d9c=_0x202afc(_0x2f8ffc['replies'][0x0]);return{..._0x2e4d9c,'children':_0x2f8ffc[_0x79548c(0x132)][_0x79548c(0x147)](0x1)[_0x79548c(0xfd)](_0x5c3140=>_0x202afc(_0x5c3140,_0x2e4d9c['id']))};}return null;}let S=class{constructor(_0x38dbdc,_0x444e35,_0x4e70aa){const _0x1c0ea3=_0x427b0c;this[_0x1c0ea3(0x125)]=_0x38dbdc,this[_0x1c0ea3(0x12e)]=_0x444e35,this[_0x1c0ea3(0x133)]=_0x4e70aa;}async[_0x427b0c(0xeb)](_0x206698){const _0x2e40a4=_0x427b0c;var _0x508dc9,_0x20a1b8;const {parentId:_0x11b922,unitId:_0x328d09,text:_0x22f7d5,threadId:_0xad0233}=_0x206698,_0xb9714c=(_0x20a1b8=(_0x508dc9=_0x22f7d5['customRanges'])==null?void 0x0:_0x508dc9[_0x2e40a4(0xe5)](_0x47d84c=>_0x47d84c[_0x2e40a4(0x105)]===_0x38fd19[_0x2e40a4(0x12d)])[_0x2e40a4(0xfd)](_0x43d2bf=>_0x43d2bf[_0x2e40a4(0x114)]))!=null?_0x20a1b8:[],_0x3c8cbc=JSON[_0x2e40a4(0x112)](_0x22f7d5),_0x128309=(await this[_0x2e40a4(0x133)][_0x2e40a4(0x144)](_0x328d09))[_0x2e40a4(0xf5)]();if(_0x11b922){const _0x35e7a0={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c,'threadId':_0xad0233},_0x29b5c2=(await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0x13b),{'body':_0x35e7a0}))['body'][_0x2e40a4(0xf8)];return{..._0x206698,'id':_0x29b5c2[_0x2e40a4(0xfe)],'dT':_0x13fc8d(+_0x29b5c2[_0x2e40a4(0x11e)])[_0x2e40a4(0x10f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x29b5c2['userId']};}else{const _0x573964={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c},_0x40e359=await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0xf0),{'body':_0x573964});return X(_0x40e359[_0x2e40a4(0x109)][_0x2e40a4(0x104)],_0x206698);}}async[_0x427b0c(0x106)](_0x3ee8dc){const _0x5e84d0=_0x427b0c;var _0x1638a8,_0x1440b;const {text:_0x26a911,unitId:_0x54dc3b}=_0x3ee8dc,_0x1c5ccb=(_0x1440b=(_0x1638a8=_0x26a911[_0x5e84d0(0xed)])==null?void 0x0:_0x1638a8[_0x5e84d0(0xe5)](_0x3971b8=>_0x3971b8[_0x5e84d0(0x105)]===_0x38fd19[_0x5e84d0(0x12d)])['map'](_0x5b5ca=>_0x5b5ca[_0x5e84d0(0x114)]))!=null?_0x1440b:[],_0x128f84=JSON['stringify'](_0x26a911),_0x51fc9e=_0x3ee8dc[_0x5e84d0(0xfa)],_0x4c3c7d=_0x3ee8dc['id'],_0xe0460f={'memberId':(await this['_sessionService'][_0x5e84d0(0x144)](_0x54dc3b))[_0x5e84d0(0xf5)](),'unitId':_0x54dc3b,'threadId':_0x51fc9e,'mention':_0x1c5ccb,'content':_0x128f84,'replyId':_0x4c3c7d},_0x1b9a85=await this[_0x5e84d0(0x125)][_0x5e84d0(0xfb)](_0x5e84d0(0xf3)+_0x54dc3b+_0x5e84d0(0x13e),{'body':_0xe0460f});return!_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]||_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]['code']===0x1;}async[_0x427b0c(0x11d)](_0x4fd442){const _0x42f27b=_0x427b0c,{unitId:_0x26f2f3}=_0x4fd442,_0x2a72f9=_0x4fd442[_0x42f27b(0xfa)],_0x961c14={'memberId':this[_0x42f27b(0x12e)][_0x42f27b(0xfc)]()[_0x42f27b(0x100)],'unitId':_0x26f2f3,'threadId':_0x2a72f9,'solved':_0x4fd442[_0x42f27b(0xf9)]?I[_0x42f27b(0x141)]:I[_0x42f27b(0xf4)]},_0x5f05c3=await this['_httpService'][_0x42f27b(0xfb)](_0x42f27b(0xf3)+_0x26f2f3+_0x42f27b(0x12c),{'body':_0x961c14});return!_0x5f05c3[_0x42f27b(0x109)][_0x42f27b(0xee)]||_0x5f05c3['body'][_0x42f27b(0xee)]['code']===0x1;}async[_0x427b0c(0x103)](_0x149f25,_0x4c1764,_0x2d3785,_0x1fcb69){const _0x5e63ee=_0x427b0c,_0xd18266={'memberId':(await this[_0x5e63ee(0x133)][_0x5e63ee(0x144)](_0x149f25))[_0x5e63ee(0xf5)](),'threadId':_0x2d3785,'replyId':_0x1fcb69,'unitId':_0x149f25},_0x5e7f8a=await this[_0x5e63ee(0x125)]['post'](_0x5e63ee(0xf3)+_0x149f25+'/delete',{'body':_0xd18266});return!_0x5e7f8a['body'][_0x5e63ee(0xee)]||_0x5e7f8a['body'][_0x5e63ee(0xee)][_0x5e63ee(0xec)]===0x1;}async['listComments'](_0x15f8d9,_0x3f392a,_0x4d90bf){const _0x229810=_0x427b0c,_0x588957={'unitId':_0x15f8d9,'threadId':_0x4d90bf},_0x3d822c=await this[_0x229810(0x125)]['post'](_0x229810(0xf3)+_0x15f8d9+_0x229810(0x119),{'body':_0x588957}),_0x38873f=_0x4d90bf[_0x229810(0xfd)](_0x555d5a=>ee(_0x3d822c[_0x229810(0x109)]['comments'][_0x555d5a],_0x15f8d9,_0x3f392a))[_0x229810(0xe5)](Boolean);return Object[_0x229810(0x140)](_0x3d822c[_0x229810(0x109)][_0x229810(0x10e)])['forEach'](_0x29f32b=>{const _0x301e58=_0x229810;this[_0x301e58(0x12e)]['addUser'](_0x29f32b);}),_0x38873f;}[_0x427b0c(0x142)](_0x521fe3){const _0x3dceac=_0x427b0c;return{'id':_0x521fe3['id'],'threadId':_0x521fe3[_0x3dceac(0xfa)],'ref':_0x521fe3[_0x3dceac(0xe4)]};}};S=Q([b(0x0,_0x51d02a(_0x39ec00)),b(0x1,_0x51d02a(_0x42c2f7)),b(0x2,_0x51d02a(_0x264c29))],S);var re=Object[_0x427b0c(0xe3)],te=(_0x3cf17f,_0x45659a,_0x177ff7,_0x77219c)=>{for(var _0x43e22d=_0x77219c>0x1?void 0x0:_0x77219c?re(_0x45659a,_0x177ff7):_0x45659a,_0x2790ad=_0x3cf17f['length']-0x1,_0x36fb3f;_0x2790ad>=0x0;_0x2790ad--)(_0x36fb3f=_0x3cf17f[_0x2790ad])&&(_0x43e22d=_0x36fb3f(_0x43e22d)||_0x43e22d);return _0x43e22d;},M=(_0x10ddbb,_0x26a2ed)=>(_0x3224c4,_0x34821d)=>_0x26a2ed(_0x3224c4,_0x34821d,_0x10ddbb);let f=class extends _0x5a35c7{constructor(_0x120284,_0x4e1185){const _0x127e87=_0x427b0c;super(),this[_0x127e87(0x128)]=_0x120284,this[_0x127e87(0x134)]=_0x4e1185,this[_0x127e87(0x136)]();}[_0x427b0c(0x136)](){const _0x4e53ff=_0x427b0c;this['_threadCommentDataSourceService'][_0x4e53ff(0xe7)]=this[_0x4e53ff(0x134)],this[_0x4e53ff(0x128)][_0x4e53ff(0x122)]=!0x1;}};f=te([M(0x0,_0x2621a6),M(0x1,_0x51d02a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2e3b18,_0x3e1d4b,_0xf82d82)=>_0x3e1d4b in _0x2e3b18?se(_0x2e3b18,_0x3e1d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf82d82}):_0x2e3b18[_0x3e1d4b]=_0xf82d82,ie=(_0xa75447,_0x3c4f30,_0x4383ac,_0x1cbeba)=>{const _0x190e10=_0x427b0c;for(var _0x5ec70f=_0x1cbeba>0x1?void 0x0:_0x1cbeba?oe(_0x3c4f30,_0x4383ac):_0x3c4f30,_0x1050fb=_0xa75447[_0x190e10(0x13f)]-0x1,_0x24f5c7;_0x1050fb>=0x0;_0x1050fb--)(_0x24f5c7=_0xa75447[_0x1050fb])&&(_0x5ec70f=_0x24f5c7(_0x5ec70f)||_0x5ec70f);return _0x5ec70f;},N=(_0x3ffbc3,_0x54bb51)=>(_0x56a5b8,_0x5c234f)=>_0x54bb51(_0x56a5b8,_0x5c234f,_0x3ffbc3),$=(_0x13d40f,_0x3e79b0,_0x45cdff)=>ne(_0x13d40f,typeof _0x3e79b0!=_0x427b0c(0xf1)?_0x3e79b0+'':_0x3e79b0,_0x45cdff);let g=class extends _0x834bcd{constructor(_0x2f76d2=O,_0x40b013,_0x3b0b8e){const _0x2328b2=_0x427b0c;super(),this[_0x2328b2(0x117)]=_0x2f76d2,this[_0x2328b2(0xe9)]=_0x40b013,this[_0x2328b2(0xf2)]=_0x3b0b8e;const {..._0x5a5d0c}=_0x523a0c({},O,this['_config']);this[_0x2328b2(0xf2)][_0x2328b2(0x143)](z,_0x5a5d0c);}[_0x427b0c(0x10b)](){const _0x40431b=_0x427b0c;[[S],[f],[_]][_0x40431b(0x138)](_0x104ee1=>{const _0xfb3871=_0x40431b;this[_0xfb3871(0xe9)][_0xfb3871(0xe2)](_0x104ee1);});}[_0x427b0c(0x120)](){const _0x4f823c=_0x427b0c;this['_injector'][_0x4f823c(0x11a)](f),this[_0x4f823c(0xe9)][_0x4f823c(0x11a)](_);}};$(g,_0x427b0c(0x107),W),$(g,_0x427b0c(0x13d),_0x5c6fb1[_0x427b0c(0x13c)]),g=ie([_0x475c39(_0x9a2f36,_0x4f9fad,_0x5e191e),N(0x1,_0x51d02a(_0x440100)),N(0x2,_0x2959e9)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x346c01=_0x20bd;(function(_0x5dc717,_0x5c4d83){const _0x5da85f=_0x20bd,_0x420ef4=_0x5dc717();while(!![]){try{const _0x3bfba5=-parseInt(_0x5da85f(0x8f))/0x1*(-parseInt(_0x5da85f(0xc9))/0x2)+-parseInt(_0x5da85f(0xa2))/0x3*(parseInt(_0x5da85f(0xbe))/0x4)+parseInt(_0x5da85f(0xb0))/0x5+parseInt(_0x5da85f(0xc1))/0x6*(parseInt(_0x5da85f(0x9f))/0x7)+parseInt(_0x5da85f(0x78))/0x8+parseInt(_0x5da85f(0x72))/0x9+-parseInt(_0x5da85f(0xaf))/0xa;if(_0x3bfba5===_0x5c4d83)break;else _0x420ef4['push'](_0x420ef4['shift']());}catch(_0x18f05c){_0x420ef4['push'](_0x420ef4['shift']());}}}(_0x2baf,0x7fe3f));import{CommentService as _0x2e07b6,CollaborationSessionService as _0x1a17a2,UniverCollaborationClientPlugin as _0xf6d2e9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42d43b}from'@univerjs-pro/license';function _0x2baf(){const _0x1a7801=['1718074lvTLBQ','body','userID','onReady','content','reply','delete','_initUserSync','type','replyId','updateComment','post','5532759enDFKt','ref','setConfig','_userService','users','_threadCommentModel','3322904nXkQHW','deleteComment','getCurrentUser','get','Solve','commentUpdate$','getComment','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','Unknown','/universer-api/user/list','createTimestamp','_init','stringify','_sessionService','_injector','root','unitId','saveCommentToSnapshot','customRanges','_initDataSource','subscribe','UNRECOGNIZED','1bUqMje','userId','/reply','getMemberID','/add','OpenOrReOpen','parse','pluginName','comment','Add','threadId','_threadCommentDataSourceService','_commentService','rangeType','add','error','16639VxrFQy','UNIVER_UNKNOWN','user','3yWUwUj','filter','values','find','/edit','payload','getUnit','requireSession','comments','length','Reply','Edit','disposeWithMe','11291220fAIXPl','1268465xcFOJD','rangeId','replies','_configService','forEach','_threadCommentDataSource','code','Delete','map','addUser','resolveComment','/universer-api/comment/unit/','slice','defineProperty','2092644lsBGaE','thread-comment-data-source.config','solved','84AcMiEJ','pipe','Solved','/solved','_httpService','COMMENT','format','onStarting'];_0x2baf=function(){return _0x1a7801;};return _0x2baf();}import{dayjs as _0x40a0bb,UserManagerService as _0x98ac35,Inject as _0x11b788,Injector as _0x48aa04,Disposable as _0x3e2a71,CustomRangeType as _0x3950fb,UniverInstanceType as _0x39fdf4,DependentOn as _0x2c6c28,IConfigService as _0x39fab1,Plugin as _0x2f68f0,merge as _0x4f8531}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x289211}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d80a6,IThreadCommentDataSourceService as _0x172d22}from'@univerjs/thread-comment';import{bufferTime as _0x8b8400}from'rxjs';import{HTTPService as _0x4aa355}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x374a11=>(_0x374a11[_0x374a11[_0x346c01(0x94)]=0x0]=_0x346c01(0x94),_0x374a11[_0x374a11[_0x346c01(0xc3)]=0x1]=_0x346c01(0xc3),_0x374a11[_0x374a11[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0x374a11))(I||{}),v=(_0xb47590=>(_0xb47590[_0xb47590[_0x346c01(0x81)]=0x0]=_0x346c01(0x81),_0xb47590[_0xb47590['Add']=0x1]=_0x346c01(0x98),_0xb47590[_0xb47590[_0x346c01(0xac)]=0x2]='Reply',_0xb47590[_0xb47590['Edit']=0x3]=_0x346c01(0xad),_0xb47590[_0xb47590[_0x346c01(0xb7)]=0x4]=_0x346c01(0xb7),_0xb47590[_0xb47590[_0x346c01(0x7c)]=0x5]=_0x346c01(0x7c),_0xb47590[_0xb47590[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0xb47590))(v||{});const y=_0x337506=>_0x40a0bb(new Date(+_0x337506))[_0x346c01(0xc7)](_0x346c01(0x7f)),B=async(_0x18e88d,_0x2e2497)=>{const _0x2c68a9=_0x346c01,_0x5309f8=_0x18e88d[_0x2c68a9(0x7b)](_0x98ac35),_0x37d775=_0x18e88d[_0x2c68a9(0x7b)](_0x4aa355);_0x2e2497[_0x2c68a9(0xb4)](_0x3ac00e=>{const _0x456b97=_0x2c68a9;_0x5309f8['getUser'](_0x3ac00e)&&_0x2e2497[_0x456b97(0xcf)](_0x3ac00e);}),_0x2e2497['size']&&(await _0x37d775[_0x2c68a9(0x7b)](_0x2c68a9(0x82),{'params':{'userIDs':[..._0x2e2497]}}))[_0x2c68a9(0xca)]['users'][_0x2c68a9(0xb4)](_0x4295ae=>{const _0x329d85=_0x2c68a9;_0x4295ae&&_0x5309f8[_0x329d85(0xb9)](_0x4295ae);});};var K=Object[_0x346c01(0x80)],V=(_0x2f5395,_0x30d6b4,_0x1b22d5,_0x2fd57f)=>{for(var _0x4e9a43=_0x2fd57f>0x1?void 0x0:_0x2fd57f?K(_0x30d6b4,_0x1b22d5):_0x30d6b4,_0x782629=_0x2f5395['length']-0x1,_0x58477d;_0x782629>=0x0;_0x782629--)(_0x58477d=_0x2f5395[_0x782629])&&(_0x4e9a43=_0x58477d(_0x4e9a43)||_0x4e9a43);return _0x4e9a43;},p=(_0x194e23,_0x187248)=>(_0x3f2326,_0x4a0ed9)=>_0x187248(_0x3f2326,_0x4a0ed9,_0x194e23);let _=class extends _0x3e2a71{constructor(_0x5f57ed,_0x320383,_0x47bd0b,_0x26330c){const _0x383d88=_0x346c01;super(),this[_0x383d88(0x9b)]=_0x5f57ed,this['_threadCommentModel']=_0x320383,this['_userService']=_0x47bd0b,this[_0x383d88(0x87)]=_0x26330c,this['_init'](),this[_0x383d88(0xd0)]();}[_0x346c01(0xd0)](){const _0x266681=_0x346c01;this[_0x266681(0xae)](this[_0x266681(0x77)][_0x266681(0x7d)][_0x266681(0xc2)](_0x8b8400(0x10))[_0x266681(0x8d)](_0x3414a7=>{const _0x3c12bd=_0x266681,_0x4eeb2b=new Set();_0x3414a7[_0x3c12bd(0xb4)](_0x5e2a35=>{const _0x5bc542=_0x3c12bd;switch(_0x5e2a35[_0x5bc542(0xd1)]){case _0x5bc542(0x9d):{const _0xd52e42=_0x5e2a35[_0x5bc542(0xa7)]['personId'];_0x4eeb2b[_0x5bc542(0x9d)](_0xd52e42);break;}}}),B(this[_0x3c12bd(0x87)],_0x4eeb2b);}));}[_0x346c01(0x84)](){const _0x252611=_0x346c01;this[_0x252611(0xae)](this[_0x252611(0x9b)][_0x252611(0x7d)][_0x252611(0x8d)](async _0x490f74=>{const _0x4d9ea8=_0x252611;var _0x1e3c51,_0x31b780,_0x25a9b9,_0x24d614;const _0x235870=(_0x1e3c51=this['_threadCommentModel']['getUnit'](_0x490f74['unitId'])[_0x4d9ea8(0xa5)](_0x2430b3=>_0x2430b3['threadId']===_0x490f74[_0x4d9ea8(0x99)]))==null?void 0x0:_0x1e3c51['root'];if(!_0x235870)return;const {unitId:_0x384050,subUnitId:_0x52e0b0}=_0x235870;switch(_0x490f74[_0x4d9ea8(0xa1)]&&this[_0x4d9ea8(0x75)][_0x4d9ea8(0xb9)](_0x490f74[_0x4d9ea8(0xa1)]),_0x490f74['type']){case v[_0x4d9ea8(0x98)]:break;case v[_0x4d9ea8(0xac)]:{this[_0x4d9ea8(0x77)]['addComment'](_0x384050,_0x52e0b0,{'unitId':_0x384050,'subUnitId':_0x52e0b0,'ref':'','id':_0x490f74['replyId'],'dT':y(+_0x490f74[_0x4d9ea8(0x83)]),'threadId':_0x490f74['threadId'],'personId':(_0x25a9b9=(_0x31b780=_0x490f74['user'])==null?void 0x0:_0x31b780[_0x4d9ea8(0xcb)])!=null?_0x25a9b9:_0x490f74[_0x4d9ea8(0x90)],'text':JSON[_0x4d9ea8(0x95)](_0x490f74['content']),'parentId':_0x235870['id']});break;}case v['Delete']:{const _0x70f05a=this[_0x4d9ea8(0x77)][_0x4d9ea8(0x7e)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);_0x70f05a&&_0x70f05a['parentId']&&this['_threadCommentModel'][_0x4d9ea8(0x79)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);break;}case v['Edit']:{this[_0x4d9ea8(0x77)][_0x4d9ea8(0xd3)](_0x384050,_0x52e0b0,{'commentId':_0x490f74[_0x4d9ea8(0xd2)],'text':JSON['parse'](_0x490f74[_0x4d9ea8(0xcd)])});break;}case v['Solve']:{const _0x303013=(_0x24d614=this['_threadCommentModel'][_0x4d9ea8(0xa8)](_0x490f74[_0x4d9ea8(0x89)])[_0x4d9ea8(0xa5)](_0x49c758=>_0x49c758[_0x4d9ea8(0x99)]===_0x490f74['threadId']))==null?void 0x0:_0x24d614[_0x4d9ea8(0x88)];_0x303013&&this[_0x4d9ea8(0x77)]['resolveComment'](_0x384050,_0x52e0b0,_0x303013['id'],_0x490f74[_0x4d9ea8(0xc0)]===I[_0x4d9ea8(0xc3)]);break;}}}));}};function _0x20bd(_0x5a3802,_0x4edb0b){_0x5a3802=_0x5a3802-0x71;const _0x2baff6=_0x2baf();let _0x20bd65=_0x2baff6[_0x5a3802];return _0x20bd65;}_=V([p(0x0,_0x11b788(_0x2e07b6)),p(0x1,_0x11b788(_0x2d80a6)),p(0x2,_0x11b788(_0x98ac35)),p(0x3,_0x11b788(_0x48aa04))],_);const z=_0x346c01(0xbf),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bbbac,_0x7febd7,_0x3ef3b2,_0x59447a)=>{const _0x4939da=_0x346c01;for(var _0x6d3d95=_0x59447a>0x1?void 0x0:_0x59447a?k(_0x7febd7,_0x3ef3b2):_0x7febd7,_0x3f9e19=_0x5bbbac[_0x4939da(0xab)]-0x1,_0x2fe5d0;_0x3f9e19>=0x0;_0x3f9e19--)(_0x2fe5d0=_0x5bbbac[_0x3f9e19])&&(_0x6d3d95=_0x2fe5d0(_0x6d3d95)||_0x6d3d95);return _0x6d3d95;},b=(_0x4d9e10,_0x3a2c3f)=>(_0x240b1c,_0x4d0792)=>_0x3a2c3f(_0x240b1c,_0x4d0792,_0x4d9e10);function X(_0x47ea2c,_0x48bbc9){const _0x2ff5d4=_0x346c01,_0x435354=_0x47ea2c[_0x2ff5d4(0xb2)][0x0];return{..._0x48bbc9,'id':_0x435354['replyId'],'resolved':_0x47ea2c[_0x2ff5d4(0xc0)]===0x1,'dT':y(_0x435354['createTimestamp']),'personId':_0x435354[_0x2ff5d4(0x90)],'threadId':_0x435354[_0x2ff5d4(0x99)]};}function ee(_0x2c2e50,_0x550a55,_0x551cdd){const _0x1d7290=_0x346c01;var _0x268b87,_0x25c576;if(((_0x25c576=(_0x268b87=_0x2c2e50==null?void 0x0:_0x2c2e50['replies'])==null?void 0x0:_0x268b87[_0x1d7290(0xab)])!=null?_0x25c576:0x0)>0x0){const _0x470e1b=(_0x5b6c62,_0x47b96f)=>({'id':_0x5b6c62[_0x1d7290(0xd2)],'threadId':_0x5b6c62[_0x1d7290(0x99)],'dT':y(_0x5b6c62['createTimestamp']),'personId':_0x5b6c62[_0x1d7290(0x90)],'resolved':_0x2c2e50[_0x1d7290(0xc0)]===I[_0x1d7290(0xc3)],'unitId':_0x550a55,'subUnitId':_0x551cdd,'text':JSON[_0x1d7290(0x95)](_0x5b6c62['content']),'parentId':_0x47b96f}),_0x23e531=_0x470e1b(_0x2c2e50[_0x1d7290(0xb2)][0x0]);return{..._0x23e531,'children':_0x2c2e50[_0x1d7290(0xb2)][_0x1d7290(0xbc)](0x1)[_0x1d7290(0xb8)](_0x1ecfd=>_0x470e1b(_0x1ecfd,_0x23e531['id']))};}return null;}let S=class{constructor(_0x361dd6,_0x5e1ce7,_0x3e0a67){const _0x1d4f69=_0x346c01;this[_0x1d4f69(0xc5)]=_0x361dd6,this[_0x1d4f69(0x75)]=_0x5e1ce7,this['_sessionService']=_0x3e0a67;}async['addComment'](_0x5328fd){const _0x36201f=_0x346c01;var _0xe1e5b8,_0xe288b;const {parentId:_0x4ebf2d,unitId:_0x25f1bc,text:_0x34563f,threadId:_0x1e4a86}=_0x5328fd,_0x18f2af=(_0xe288b=(_0xe1e5b8=_0x34563f[_0x36201f(0x8b)])==null?void 0x0:_0xe1e5b8[_0x36201f(0xa3)](_0x44046c=>_0x44046c[_0x36201f(0x9c)]===_0x3950fb['COMMENT'])[_0x36201f(0xb8)](_0x1105b8=>_0x1105b8[_0x36201f(0xb1)]))!=null?_0xe288b:[],_0x257409=JSON[_0x36201f(0x85)](_0x34563f),_0x50be42=(await this[_0x36201f(0x86)][_0x36201f(0xa9)](_0x25f1bc))[_0x36201f(0x92)]();if(_0x4ebf2d){const _0x66eb79={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af,'threadId':_0x1e4a86},_0x2aeeec=(await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x91),{'body':_0x66eb79}))[_0x36201f(0xca)][_0x36201f(0xce)];return{..._0x5328fd,'id':_0x2aeeec['replyId'],'dT':_0x40a0bb(+_0x2aeeec[_0x36201f(0x83)])[_0x36201f(0xc7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2aeeec[_0x36201f(0x90)]};}else{const _0x416d0a={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af},_0x543479=await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x93),{'body':_0x416d0a});return X(_0x543479[_0x36201f(0xca)][_0x36201f(0x97)],_0x5328fd);}}async[_0x346c01(0xd3)](_0x33fa54){const _0x1c6eb3=_0x346c01;var _0x2e712d,_0x368d98;const {text:_0xe54e6b,unitId:_0x16354b}=_0x33fa54,_0x5edfa1=(_0x368d98=(_0x2e712d=_0xe54e6b[_0x1c6eb3(0x8b)])==null?void 0x0:_0x2e712d[_0x1c6eb3(0xa3)](_0x595b7e=>_0x595b7e['rangeType']===_0x3950fb[_0x1c6eb3(0xc6)])['map'](_0x5a7c7a=>_0x5a7c7a[_0x1c6eb3(0xb1)]))!=null?_0x368d98:[],_0x530eff=JSON[_0x1c6eb3(0x85)](_0xe54e6b),_0x4558be=_0x33fa54['threadId'],_0x23ebb9=_0x33fa54['id'],_0x1236bd={'memberId':(await this[_0x1c6eb3(0x86)]['requireSession'](_0x16354b))['getMemberID'](),'unitId':_0x16354b,'threadId':_0x4558be,'mention':_0x5edfa1,'content':_0x530eff,'replyId':_0x23ebb9},_0x586242=await this[_0x1c6eb3(0xc5)][_0x1c6eb3(0x71)](_0x1c6eb3(0xbb)+_0x16354b+_0x1c6eb3(0xa6),{'body':_0x1236bd});return!_0x586242[_0x1c6eb3(0xca)][_0x1c6eb3(0x9e)]||_0x586242[_0x1c6eb3(0xca)]['error'][_0x1c6eb3(0xb6)]===0x1;}async[_0x346c01(0xba)](_0x42d17a){const _0x21fa54=_0x346c01,{unitId:_0x40f4ef}=_0x42d17a,_0x17cd03=_0x42d17a[_0x21fa54(0x99)],_0x5d00c5={'memberId':this[_0x21fa54(0x75)][_0x21fa54(0x7a)]()[_0x21fa54(0xcb)],'unitId':_0x40f4ef,'threadId':_0x17cd03,'solved':_0x42d17a['resolved']?I['Solved']:I[_0x21fa54(0x94)]},_0x526a65=await this[_0x21fa54(0xc5)][_0x21fa54(0x71)](_0x21fa54(0xbb)+_0x40f4ef+_0x21fa54(0xc4),{'body':_0x5d00c5});return!_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)]||_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)][_0x21fa54(0xb6)]===0x1;}async['deleteComment'](_0x155fcd,_0x36d3c4,_0xfe86bc,_0x541000){const _0x364317=_0x346c01,_0x997a13={'memberId':(await this['_sessionService'][_0x364317(0xa9)](_0x155fcd))['getMemberID'](),'threadId':_0xfe86bc,'replyId':_0x541000,'unitId':_0x155fcd},_0x133ba9=await this['_httpService'][_0x364317(0x71)](_0x364317(0xbb)+_0x155fcd+'/delete',{'body':_0x997a13});return!_0x133ba9[_0x364317(0xca)][_0x364317(0x9e)]||_0x133ba9[_0x364317(0xca)]['error'][_0x364317(0xb6)]===0x1;}async['listComments'](_0x30e676,_0x53256c,_0x5eed7a){const _0x4ea13f=_0x346c01,_0x1c3059={'unitId':_0x30e676,'threadId':_0x5eed7a},_0x28d9ee=await this[_0x4ea13f(0xc5)][_0x4ea13f(0x71)](_0x4ea13f(0xbb)+_0x30e676+'/list',{'body':_0x1c3059}),_0x38196a=_0x5eed7a[_0x4ea13f(0xb8)](_0x1ec921=>ee(_0x28d9ee[_0x4ea13f(0xca)][_0x4ea13f(0xaa)][_0x1ec921],_0x30e676,_0x53256c))['filter'](Boolean);return Object[_0x4ea13f(0xa4)](_0x28d9ee['body'][_0x4ea13f(0x76)])[_0x4ea13f(0xb4)](_0x24bea4=>{const _0x4c8678=_0x4ea13f;this[_0x4c8678(0x75)][_0x4c8678(0xb9)](_0x24bea4);}),_0x38196a;}[_0x346c01(0x8a)](_0x4a6d54){const _0xad4055=_0x346c01;return{'id':_0x4a6d54['id'],'threadId':_0x4a6d54[_0xad4055(0x99)],'ref':_0x4a6d54[_0xad4055(0x73)]};}};S=Q([b(0x0,_0x11b788(_0x4aa355)),b(0x1,_0x11b788(_0x98ac35)),b(0x2,_0x11b788(_0x1a17a2))],S);var re=Object[_0x346c01(0x80)],te=(_0x52d795,_0x32ea0d,_0x31b957,_0x254cb3)=>{const _0x1295dc=_0x346c01;for(var _0x5eac4a=_0x254cb3>0x1?void 0x0:_0x254cb3?re(_0x32ea0d,_0x31b957):_0x32ea0d,_0x224a0f=_0x52d795[_0x1295dc(0xab)]-0x1,_0x3d983d;_0x224a0f>=0x0;_0x224a0f--)(_0x3d983d=_0x52d795[_0x224a0f])&&(_0x5eac4a=_0x3d983d(_0x5eac4a)||_0x5eac4a);return _0x5eac4a;},M=(_0x77704a,_0x51b57f)=>(_0x4f3cbb,_0xb3440c)=>_0x51b57f(_0x4f3cbb,_0xb3440c,_0x77704a);let f=class extends _0x3e2a71{constructor(_0x1f0973,_0x2b8468){const _0x2fb279=_0x346c01;super(),this[_0x2fb279(0x9a)]=_0x1f0973,this[_0x2fb279(0xb5)]=_0x2b8468,this['_initDataSource']();}[_0x346c01(0x8c)](){const _0x57fbac=_0x346c01;this[_0x57fbac(0x9a)]['dataSource']=this[_0x57fbac(0xb5)],this[_0x57fbac(0x9a)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x172d22),M(0x1,_0x11b788(S))],f);var se=Object[_0x346c01(0xbd)],oe=Object[_0x346c01(0x80)],ne=(_0x39e76f,_0x1d61dc,_0x454d31)=>_0x1d61dc in _0x39e76f?se(_0x39e76f,_0x1d61dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x454d31}):_0x39e76f[_0x1d61dc]=_0x454d31,ie=(_0x12744d,_0x25a524,_0x311cb6,_0x5b0b45)=>{const _0x28507f=_0x346c01;for(var _0x3534f3=_0x5b0b45>0x1?void 0x0:_0x5b0b45?oe(_0x25a524,_0x311cb6):_0x25a524,_0x1d0e64=_0x12744d[_0x28507f(0xab)]-0x1,_0x2f034e;_0x1d0e64>=0x0;_0x1d0e64--)(_0x2f034e=_0x12744d[_0x1d0e64])&&(_0x3534f3=_0x2f034e(_0x3534f3)||_0x3534f3);return _0x3534f3;},N=(_0xc6180a,_0x48d421)=>(_0x2c4418,_0x35689c)=>_0x48d421(_0x2c4418,_0x35689c,_0xc6180a),$=(_0x4162fb,_0x1231c3,_0x402efb)=>ne(_0x4162fb,typeof _0x1231c3!='symbol'?_0x1231c3+'':_0x1231c3,_0x402efb);let g=class extends _0x2f68f0{constructor(_0x1fc071=O,_0x17f145,_0x1fc28a){const _0x4be81e=_0x346c01;super(),this['_config']=_0x1fc071,this[_0x4be81e(0x87)]=_0x17f145,this[_0x4be81e(0xb3)]=_0x1fc28a;const {..._0x419664}=_0x4f8531({},O,this['_config']);this['_configService'][_0x4be81e(0x74)](z,_0x419664);}[_0x346c01(0xc8)](){[[S],[f],[_]]['forEach'](_0x3626b1=>{const _0x2bff57=_0x20bd;this['_injector'][_0x2bff57(0x9d)](_0x3626b1);});}[_0x346c01(0xcc)](){const _0x2d0632=_0x346c01;this[_0x2d0632(0x87)][_0x2d0632(0x7b)](f),this[_0x2d0632(0x87)][_0x2d0632(0x7b)](_);}};$(g,_0x346c01(0x96),W),$(g,_0x346c01(0xd1),_0x39fdf4[_0x346c01(0xa0)]),g=ie([_0x2c6c28(_0x289211,_0xf6d2e9,_0x42d43b),N(0x1,_0x11b788(_0x48aa04)),N(0x2,_0x39fab1)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1151(_0x2b2155,_0x4121c4){_0x2b2155=_0x2b2155-0xd8;const _0x975761=_0x9757();let _0x115190=_0x975761[_0x2b2155];return _0x115190;}(function(_0xb54e4e,_0x2a06dc){const _0x361048=_0x1151,_0x10f70b=_0xb54e4e();while(!![]){try{const _0x1dc94d=parseInt(_0x361048(0x10e))/0x1*(-parseInt(_0x361048(0x11e))/0x2)+-parseInt(_0x361048(0xf9))/0x3+parseInt(_0x361048(0x11c))/0x4*(-parseInt(_0x361048(0x10c))/0x5)+parseInt(_0x361048(0x14d))/0x6*(-parseInt(_0x361048(0xf8))/0x7)+-parseInt(_0x361048(0xeb))/0x8+parseInt(_0x361048(0x12b))/0x9+parseInt(_0x361048(0x122))/0xa*(parseInt(_0x361048(0x100))/0xb);if(_0x1dc94d===_0x2a06dc)break;else _0x10f70b['push'](_0x10f70b['shift']());}catch(_0x5dc0ae){_0x10f70b['push'](_0x10f70b['shift']());}}}(_0x9757,0x85107),function(_0x18b9e3,_0x5a11b3){const _0x135924=_0x1151;typeof exports=='object'&&typeof module<'u'?_0x5a11b3(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==_0x135924(0xfe)&&define[_0x135924(0x13c)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x135924(0x154),_0x135924(0xfb),_0x135924(0xf7),'rxjs',_0x135924(0xf5)],_0x5a11b3):(_0x18b9e3=typeof globalThis<'u'?globalThis:_0x18b9e3||self,_0x5a11b3(_0x18b9e3[_0x135924(0x14b)]={},_0x18b9e3[_0x135924(0x12e)],_0x18b9e3['UniverProLicense'],_0x18b9e3[_0x135924(0x12d)],_0x18b9e3['UniverThreadCommentUi'],_0x18b9e3[_0x135924(0x14f)],_0x18b9e3[_0x135924(0x121)],_0x18b9e3[_0x135924(0x13d)]));}(this,function(_0x4295a0,_0x3869c4,_0x43efe2,_0x38b33b,_0x1d7685,_0xd1e86d,_0xbcfdf6,_0x338ad3){'use strict';const _0x7566ed=_0x1151;const _0x40d9a5='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4e36fd=(_0xf91b4e=>(_0xf91b4e[_0xf91b4e[_0x7566ed(0x109)]=0x0]=_0x7566ed(0x109),_0xf91b4e[_0xf91b4e[_0x7566ed(0xf2)]=0x1]=_0x7566ed(0xf2),_0xf91b4e[_0xf91b4e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf91b4e))(_0x4e36fd||{}),_0x54f0e3=(_0x2e35ee=>(_0x2e35ee[_0x2e35ee[_0x7566ed(0x136)]=0x0]=_0x7566ed(0x136),_0x2e35ee[_0x2e35ee[_0x7566ed(0x113)]=0x1]='Add',_0x2e35ee[_0x2e35ee[_0x7566ed(0xd8)]=0x2]=_0x7566ed(0xd8),_0x2e35ee[_0x2e35ee[_0x7566ed(0x10a)]=0x3]=_0x7566ed(0x10a),_0x2e35ee[_0x2e35ee[_0x7566ed(0x152)]=0x4]=_0x7566ed(0x152),_0x2e35ee[_0x2e35ee['Solve']=0x5]=_0x7566ed(0x128),_0x2e35ee[_0x2e35ee[_0x7566ed(0x11b)]=-0x1]=_0x7566ed(0x11b),_0x2e35ee))(_0x54f0e3||{});const _0xb02b86=_0x54b4dc=>_0x38b33b['dayjs'](new Date(+_0x54b4dc))[_0x7566ed(0xff)](_0x7566ed(0x103)),_0x306f5e=async(_0x21c48a,_0x2648ea)=>{const _0x33ecf3=_0x7566ed,_0xe1ce90=_0x21c48a[_0x33ecf3(0x11d)](_0x38b33b[_0x33ecf3(0x14e)]),_0x2f6b2b=_0x21c48a[_0x33ecf3(0x11d)](_0x338ad3[_0x33ecf3(0xe1)]);_0x2648ea[_0x33ecf3(0xe5)](_0x1cde4b=>{const _0x271d24=_0x33ecf3;_0xe1ce90[_0x271d24(0x10b)](_0x1cde4b)&&_0x2648ea[_0x271d24(0x137)](_0x1cde4b);}),_0x2648ea[_0x33ecf3(0xfc)]&&(await _0x2f6b2b['get'](_0x33ecf3(0x102),{'params':{'userIDs':[..._0x2648ea]}}))[_0x33ecf3(0xf1)]['users'][_0x33ecf3(0xe5)](_0x37ffc1=>{const _0x216fa9=_0x33ecf3;_0x37ffc1&&_0xe1ce90[_0x216fa9(0x104)](_0x37ffc1);});};var _0x149953=Object[_0x7566ed(0xe6)],_0x421834=(_0x54caf2,_0x40ab93,_0x31acb1,_0x5e95d2)=>{const _0xe5eea7=_0x7566ed;for(var _0x4090ed=_0x5e95d2>0x1?void 0x0:_0x5e95d2?_0x149953(_0x40ab93,_0x31acb1):_0x40ab93,_0x82175d=_0x54caf2[_0xe5eea7(0x149)]-0x1,_0x1dfea0;_0x82175d>=0x0;_0x82175d--)(_0x1dfea0=_0x54caf2[_0x82175d])&&(_0x4090ed=_0x1dfea0(_0x4090ed)||_0x4090ed);return _0x4090ed;},_0x22545f=(_0x12c7ba,_0x3c2391)=>(_0x1be9b9,_0x322fb7)=>_0x3c2391(_0x1be9b9,_0x322fb7,_0x12c7ba);let _0x1a821a=class extends _0x38b33b[_0x7566ed(0x129)]{constructor(_0x50b406,_0x53ce12,_0x2590a9,_0x1bab27){const _0x8d8246=_0x7566ed;super(),this['_commentService']=_0x50b406,this[_0x8d8246(0x148)]=_0x53ce12,this[_0x8d8246(0x118)]=_0x2590a9,this[_0x8d8246(0x123)]=_0x1bab27,this['_init'](),this['_initUserSync']();}[_0x7566ed(0x139)](){const _0x29c23d=_0x7566ed;this[_0x29c23d(0xf6)](this['_threadCommentModel'][_0x29c23d(0x144)][_0x29c23d(0xdf)](_0xbcfdf6[_0x29c23d(0x138)](0x10))['subscribe'](_0x5a32c9=>{const _0x1697a7=_0x29c23d,_0x17c3af=new Set();_0x5a32c9[_0x1697a7(0xe5)](_0x4ef9df=>{const _0x4fe433=_0x1697a7;switch(_0x4ef9df['type']){case'add':{const _0x5bfdfc=_0x4ef9df[_0x4fe433(0x106)][_0x4fe433(0x101)];_0x17c3af[_0x4fe433(0x11a)](_0x5bfdfc);break;}}}),_0x306f5e(this['_injector'],_0x17c3af);}));}['_init'](){const _0x4bd3ef=_0x7566ed;this[_0x4bd3ef(0xf6)](this[_0x4bd3ef(0xda)][_0x4bd3ef(0x144)]['subscribe'](async _0x5ce2c8=>{const _0xb50706=_0x4bd3ef;var _0x37e263,_0x1d733c,_0x540c4c,_0x4ba011;const _0x569f59=(_0x37e263=this[_0xb50706(0x148)][_0xb50706(0x150)](_0x5ce2c8[_0xb50706(0x13e)])[_0xb50706(0xfa)](_0x4a010e=>_0x4a010e['threadId']===_0x5ce2c8['threadId']))==null?void 0x0:_0x37e263[_0xb50706(0xd9)];if(!_0x569f59)return;const {unitId:_0x92b9f9,subUnitId:_0x58253d}=_0x569f59;switch(_0x5ce2c8['user']&&this['_userService']['addUser'](_0x5ce2c8[_0xb50706(0x14a)]),_0x5ce2c8[_0xb50706(0x140)]){case _0x54f0e3[_0xb50706(0x113)]:break;case _0x54f0e3[_0xb50706(0xd8)]:{this[_0xb50706(0x148)]['addComment'](_0x92b9f9,_0x58253d,{'unitId':_0x92b9f9,'subUnitId':_0x58253d,'ref':'','id':_0x5ce2c8[_0xb50706(0xf0)],'dT':_0xb02b86(+_0x5ce2c8['createTimestamp']),'threadId':_0x5ce2c8['threadId'],'personId':(_0x540c4c=(_0x1d733c=_0x5ce2c8[_0xb50706(0x14a)])==null?void 0x0:_0x1d733c[_0xb50706(0x110)])!=null?_0x540c4c:_0x5ce2c8['userId'],'text':JSON[_0xb50706(0x116)](_0x5ce2c8['content']),'parentId':_0x569f59['id']});break;}case _0x54f0e3[_0xb50706(0x152)]:{const _0x15c54f=this[_0xb50706(0x148)][_0xb50706(0xf3)](_0x92b9f9,_0x58253d,_0x5ce2c8[_0xb50706(0xf0)]);_0x15c54f&&_0x15c54f[_0xb50706(0x108)]&&this['_threadCommentModel'][_0xb50706(0x111)](_0x92b9f9,_0x58253d,_0x5ce2c8['replyId']);break;}case _0x54f0e3[_0xb50706(0x10a)]:{this[_0xb50706(0x148)][_0xb50706(0x12a)](_0x92b9f9,_0x58253d,{'commentId':_0x5ce2c8['replyId'],'text':JSON['parse'](_0x5ce2c8[_0xb50706(0x13f)])});break;}case _0x54f0e3[_0xb50706(0x128)]:{const _0x35b503=(_0x4ba011=this[_0xb50706(0x148)][_0xb50706(0x150)](_0x5ce2c8['unitId'])[_0xb50706(0xfa)](_0x2e1922=>_0x2e1922[_0xb50706(0xef)]===_0x5ce2c8['threadId']))==null?void 0x0:_0x4ba011['root'];_0x35b503&&this[_0xb50706(0x148)][_0xb50706(0xe3)](_0x92b9f9,_0x58253d,_0x35b503['id'],_0x5ce2c8[_0xb50706(0xe9)]===_0x4e36fd[_0xb50706(0xf2)]);break;}}}));}};_0x1a821a=_0x421834([_0x22545f(0x0,_0x38b33b[_0x7566ed(0x151)](_0x3869c4[_0x7566ed(0x135)])),_0x22545f(0x1,_0x38b33b[_0x7566ed(0x151)](_0xd1e86d[_0x7566ed(0xfd)])),_0x22545f(0x2,_0x38b33b[_0x7566ed(0x151)](_0x38b33b[_0x7566ed(0x14e)])),_0x22545f(0x3,_0x38b33b[_0x7566ed(0x151)](_0x38b33b[_0x7566ed(0x14c)]))],_0x1a821a);const _0x14b2d4=_0x7566ed(0x156),_0x490158={};var _0x2d7ff8=Object['getOwnPropertyDescriptor'],_0x5009c7=(_0x2cedfc,_0x32abc7,_0x623da,_0x4a5083)=>{for(var _0xea5fc=_0x4a5083>0x1?void 0x0:_0x4a5083?_0x2d7ff8(_0x32abc7,_0x623da):_0x32abc7,_0x29b5c5=_0x2cedfc['length']-0x1,_0x5ac627;_0x29b5c5>=0x0;_0x29b5c5--)(_0x5ac627=_0x2cedfc[_0x29b5c5])&&(_0xea5fc=_0x5ac627(_0xea5fc)||_0xea5fc);return _0xea5fc;},_0x4eeee0=(_0x56349b,_0x5e6c6a)=>(_0x4e9ec5,_0x48d6ee)=>_0x5e6c6a(_0x4e9ec5,_0x48d6ee,_0x56349b);function _0x11e423(_0x5d03ce,_0x18cf29){const _0x111204=_0x7566ed,_0x8b2422=_0x5d03ce['replies'][0x0];return{..._0x18cf29,'id':_0x8b2422[_0x111204(0xf0)],'resolved':_0x5d03ce[_0x111204(0xe9)]===0x1,'dT':_0xb02b86(_0x8b2422[_0x111204(0xed)]),'personId':_0x8b2422[_0x111204(0xe4)],'threadId':_0x8b2422['threadId']};}function _0x479d4e(_0x26fa9f,_0x3bcdc3,_0x4b4ce6){const _0x24bdde=_0x7566ed;var _0x1ea1a5,_0x2a6793;if(((_0x2a6793=(_0x1ea1a5=_0x26fa9f==null?void 0x0:_0x26fa9f[_0x24bdde(0x10d)])==null?void 0x0:_0x1ea1a5[_0x24bdde(0x149)])!=null?_0x2a6793:0x0)>0x0){const _0x24aad2=(_0x4a0dbe,_0x1c07ed)=>({'id':_0x4a0dbe[_0x24bdde(0xf0)],'threadId':_0x4a0dbe[_0x24bdde(0xef)],'dT':_0xb02b86(_0x4a0dbe[_0x24bdde(0xed)]),'personId':_0x4a0dbe[_0x24bdde(0xe4)],'resolved':_0x26fa9f[_0x24bdde(0xe9)]===_0x4e36fd['Solved'],'unitId':_0x3bcdc3,'subUnitId':_0x4b4ce6,'text':JSON['parse'](_0x4a0dbe[_0x24bdde(0x13f)]),'parentId':_0x1c07ed}),_0x4a9e3c=_0x24aad2(_0x26fa9f[_0x24bdde(0x10d)][0x0]);return{..._0x4a9e3c,'children':_0x26fa9f[_0x24bdde(0x10d)][_0x24bdde(0x13a)](0x1)[_0x24bdde(0x155)](_0x17f466=>_0x24aad2(_0x17f466,_0x4a9e3c['id']))};}return null;}let _0x19ffd9=class{constructor(_0x206045,_0x32358a,_0x53eda4){const _0x10e758=_0x7566ed;this[_0x10e758(0x132)]=_0x206045,this[_0x10e758(0x118)]=_0x32358a,this[_0x10e758(0xdc)]=_0x53eda4;}async[_0x7566ed(0x134)](_0x21cef8){const _0x47becd=_0x7566ed;var _0x2aa013,_0xf27626;const {parentId:_0x38c518,unitId:_0x5a560f,text:_0x5571a8,threadId:_0x5dfaf9}=_0x21cef8,_0x888524=(_0xf27626=(_0x2aa013=_0x5571a8['customRanges'])==null?void 0x0:_0x2aa013['filter'](_0x7d3907=>_0x7d3907[_0x47becd(0x127)]===_0x38b33b[_0x47becd(0x12f)][_0x47becd(0xee)])[_0x47becd(0x155)](_0x20a340=>_0x20a340[_0x47becd(0x13b)]))!=null?_0xf27626:[],_0x389840=JSON[_0x47becd(0x131)](_0x5571a8),_0x37483b=(await this[_0x47becd(0xdc)]['requireSession'](_0x5a560f))['getMemberID']();if(_0x38c518){const _0x8e03fd={'memberId':_0x37483b,'unitId':_0x5a560f,'content':_0x389840,'mention':_0x888524,'threadId':_0x5dfaf9},_0x1e506b=(await this[_0x47becd(0x132)][_0x47becd(0xe8)](_0x47becd(0xde)+_0x5a560f+'/reply',{'body':_0x8e03fd}))[_0x47becd(0xf1)]['reply'];return{..._0x21cef8,'id':_0x1e506b[_0x47becd(0xf0)],'dT':_0x38b33b[_0x47becd(0x10f)](+_0x1e506b[_0x47becd(0xed)])['format'](_0x47becd(0x103)),'personId':_0x1e506b['userId']};}else{const _0x2c4372={'memberId':_0x37483b,'unitId':_0x5a560f,'content':_0x389840,'mention':_0x888524},_0x3e2ca0=await this['_httpService'][_0x47becd(0xe8)]('/universer-api/comment/unit/'+_0x5a560f+_0x47becd(0x112),{'body':_0x2c4372});return _0x11e423(_0x3e2ca0[_0x47becd(0xf1)]['comment'],_0x21cef8);}}async[_0x7566ed(0x12a)](_0x1b4e2f){const _0x3512b1=_0x7566ed;var _0x4cf22c,_0x244e9b;const {text:_0x32e00f,unitId:_0x6753f8}=_0x1b4e2f,_0x29c3cf=(_0x244e9b=(_0x4cf22c=_0x32e00f[_0x3512b1(0x125)])==null?void 0x0:_0x4cf22c['filter'](_0x43ea83=>_0x43ea83[_0x3512b1(0x127)]===_0x38b33b[_0x3512b1(0x12f)][_0x3512b1(0xee)])[_0x3512b1(0x155)](_0x3a0b24=>_0x3a0b24['rangeId']))!=null?_0x244e9b:[],_0x16aa9e=JSON['stringify'](_0x32e00f),_0x369923=_0x1b4e2f[_0x3512b1(0xef)],_0x311891=_0x1b4e2f['id'],_0x29f99={'memberId':(await this[_0x3512b1(0xdc)][_0x3512b1(0xea)](_0x6753f8))[_0x3512b1(0x143)](),'unitId':_0x6753f8,'threadId':_0x369923,'mention':_0x29c3cf,'content':_0x16aa9e,'replyId':_0x311891},_0x52b594=await this[_0x3512b1(0x132)][_0x3512b1(0xe8)](_0x3512b1(0xde)+_0x6753f8+_0x3512b1(0x158),{'body':_0x29f99});return!_0x52b594[_0x3512b1(0xf1)][_0x3512b1(0x145)]||_0x52b594[_0x3512b1(0xf1)][_0x3512b1(0x145)]['code']===0x1;}async[_0x7566ed(0xe3)](_0x20bc7f){const _0x2f61fd=_0x7566ed,{unitId:_0x4fb01a}=_0x20bc7f,_0x24d828=_0x20bc7f[_0x2f61fd(0xef)],_0x347896={'memberId':this[_0x2f61fd(0x118)][_0x2f61fd(0xdd)]()[_0x2f61fd(0x110)],'unitId':_0x4fb01a,'threadId':_0x24d828,'solved':_0x20bc7f['resolved']?_0x4e36fd[_0x2f61fd(0xf2)]:_0x4e36fd[_0x2f61fd(0x109)]},_0x264e6c=await this['_httpService']['post'](_0x2f61fd(0xde)+_0x4fb01a+'/solved',{'body':_0x347896});return!_0x264e6c['body'][_0x2f61fd(0x145)]||_0x264e6c['body']['error']['code']===0x1;}async[_0x7566ed(0x111)](_0x4e5e1c,_0x4dff25,_0x2c2413,_0x498e1d){const _0xd12c08=_0x7566ed,_0x5365b5={'memberId':(await this[_0xd12c08(0xdc)][_0xd12c08(0xea)](_0x4e5e1c))[_0xd12c08(0x143)](),'threadId':_0x2c2413,'replyId':_0x498e1d,'unitId':_0x4e5e1c},_0x499774=await this[_0xd12c08(0x132)]['post']('/universer-api/comment/unit/'+_0x4e5e1c+_0xd12c08(0x130),{'body':_0x5365b5});return!_0x499774['body']['error']||_0x499774[_0xd12c08(0xf1)][_0xd12c08(0x145)][_0xd12c08(0x124)]===0x1;}async[_0x7566ed(0x153)](_0x11b66b,_0x23db09,_0x3c4841){const _0x3914a7=_0x7566ed,_0x28fc33={'unitId':_0x11b66b,'threadId':_0x3c4841},_0x343255=await this[_0x3914a7(0x132)]['post'](_0x3914a7(0xde)+_0x11b66b+_0x3914a7(0x105),{'body':_0x28fc33}),_0x476e7b=_0x3c4841['map'](_0x5d25c9=>_0x479d4e(_0x343255[_0x3914a7(0xf1)][_0x3914a7(0xe7)][_0x5d25c9],_0x11b66b,_0x23db09))[_0x3914a7(0x11f)](Boolean);return Object[_0x3914a7(0x12c)](_0x343255[_0x3914a7(0xf1)][_0x3914a7(0x120)])[_0x3914a7(0xe5)](_0x5beab5=>{const _0x4470a1=_0x3914a7;this[_0x4470a1(0x118)]['addUser'](_0x5beab5);}),_0x476e7b;}[_0x7566ed(0xe2)](_0x3ee35d){const _0x3ff782=_0x7566ed;return{'id':_0x3ee35d['id'],'threadId':_0x3ee35d[_0x3ff782(0xef)],'ref':_0x3ee35d['ref']};}};_0x19ffd9=_0x5009c7([_0x4eeee0(0x0,_0x38b33b[_0x7566ed(0x151)](_0x338ad3[_0x7566ed(0xe1)])),_0x4eeee0(0x1,_0x38b33b['Inject'](_0x38b33b[_0x7566ed(0x14e)])),_0x4eeee0(0x2,_0x38b33b['Inject'](_0x3869c4[_0x7566ed(0x115)]))],_0x19ffd9);var _0x463857=Object[_0x7566ed(0xe6)],_0x5d5ef0=(_0x80451a,_0x5205e0,_0x27d68d,_0x9c4edd)=>{for(var _0x4e9055=_0x9c4edd>0x1?void 0x0:_0x9c4edd?_0x463857(_0x5205e0,_0x27d68d):_0x5205e0,_0x59af36=_0x80451a['length']-0x1,_0x2fe65b;_0x59af36>=0x0;_0x59af36--)(_0x2fe65b=_0x80451a[_0x59af36])&&(_0x4e9055=_0x2fe65b(_0x4e9055)||_0x4e9055);return _0x4e9055;},_0x24a9ff=(_0x5e54fa,_0xbde856)=>(_0x3210c3,_0x7f7a63)=>_0xbde856(_0x3210c3,_0x7f7a63,_0x5e54fa);let _0x1e18ca=class extends _0x38b33b['Disposable']{constructor(_0x499364,_0x259bcb){const _0x4c119b=_0x7566ed;super(),this[_0x4c119b(0x133)]=_0x499364,this['_threadCommentDataSource']=_0x259bcb,this[_0x4c119b(0x117)]();}['_initDataSource'](){const _0x9f20a2=_0x7566ed;this[_0x9f20a2(0x133)]['dataSource']=this[_0x9f20a2(0x114)],this['_threadCommentDataSourceService'][_0x9f20a2(0x157)]=!0x1;}};_0x1e18ca=_0x5d5ef0([_0x24a9ff(0x0,_0xd1e86d[_0x7566ed(0x159)]),_0x24a9ff(0x1,_0x38b33b[_0x7566ed(0x151)](_0x19ffd9))],_0x1e18ca);var _0x210831=Object[_0x7566ed(0x141)],_0x638d1f=Object[_0x7566ed(0xe6)],_0x27d730=(_0x220b8d,_0x58a65b,_0x561b4d)=>_0x58a65b in _0x220b8d?_0x210831(_0x220b8d,_0x58a65b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x561b4d}):_0x220b8d[_0x58a65b]=_0x561b4d,_0x60a6f9=(_0x103685,_0x2b4abc,_0x43b3dd,_0x2e908a)=>{for(var _0x3ded88=_0x2e908a>0x1?void 0x0:_0x2e908a?_0x638d1f(_0x2b4abc,_0x43b3dd):_0x2b4abc,_0x47313a=_0x103685['length']-0x1,_0x49bcba;_0x47313a>=0x0;_0x47313a--)(_0x49bcba=_0x103685[_0x47313a])&&(_0x3ded88=_0x49bcba(_0x3ded88)||_0x3ded88);return _0x3ded88;},_0x1dc24c=(_0x528a11,_0x360a31)=>(_0x3c38f6,_0xb230a5)=>_0x360a31(_0x3c38f6,_0xb230a5,_0x528a11),_0x253d3c=(_0xaa0d34,_0x4b7a73,_0x4a2163)=>_0x27d730(_0xaa0d34,typeof _0x4b7a73!=_0x7566ed(0x126)?_0x4b7a73+'':_0x4b7a73,_0x4a2163);_0x4295a0[_0x7566ed(0xe0)]=class extends _0x38b33b[_0x7566ed(0xec)]{constructor(_0x389efb=_0x490158,_0x263bcc,_0x3a2ed2){const _0x1a8312=_0x7566ed;super(),this['_config']=_0x389efb,this[_0x1a8312(0x123)]=_0x263bcc,this['_configService']=_0x3a2ed2;const {..._0x173e13}=_0x38b33b['merge']({},_0x490158,this['_config']);this['_configService'][_0x1a8312(0x119)](_0x14b2d4,_0x173e13);}['onStarting'](){[[_0x19ffd9],[_0x1e18ca],[_0x1a821a]]['forEach'](_0x1c63bb=>{const _0xc269e=_0x1151;this[_0xc269e(0x123)][_0xc269e(0x11a)](_0x1c63bb);});}[_0x7566ed(0x107)](){const _0x1fb29a=_0x7566ed;this['_injector'][_0x1fb29a(0x11d)](_0x1e18ca),this[_0x1fb29a(0x123)]['get'](_0x1a821a);}},_0x253d3c(_0x4295a0[_0x7566ed(0xe0)],_0x7566ed(0x146),_0x40d9a5),_0x253d3c(_0x4295a0[_0x7566ed(0xe0)],'type',_0x38b33b[_0x7566ed(0x142)]['UNIVER_UNKNOWN']),_0x4295a0[_0x7566ed(0xe0)]=_0x60a6f9([_0x38b33b[_0x7566ed(0xf4)](_0x1d7685[_0x7566ed(0xdb)],_0x3869c4['UniverCollaborationClientPlugin'],_0x43efe2['UniverLicensePlugin']),_0x1dc24c(0x1,_0x38b33b[_0x7566ed(0x151)](_0x38b33b['Injector'])),_0x1dc24c(0x2,_0x38b33b[_0x7566ed(0x147)])],_0x4295a0[_0x7566ed(0xe0)]),Object['defineProperty'](_0x4295a0,Symbol['toStringTag'],{'value':'Module'});}));function _0x9757(){const _0xe9cf6c=['userID','deleteComment','/add','Add','_threadCommentDataSource','CollaborationSessionService','parse','_initDataSource','_userService','setConfig','add','UNRECOGNIZED','514100RoIvWT','get','2083154TFExDQ','filter','users','rxjs','1610QAHDIC','_injector','code','customRanges','symbol','rangeType','Solve','Disposable','updateComment','8529678gOIuom','values','UniverCore','UniverProCollaborationClient','CustomRangeType','/delete','stringify','_httpService','_threadCommentDataSourceService','addComment','CommentService','Unknown','delete','bufferTime','_initUserSync','slice','rangeId','amd','UniverNetwork','unitId','content','type','defineProperty','UniverInstanceType','getMemberID','commentUpdate$','error','pluginName','IConfigService','_threadCommentModel','length','user','UniverProThreadCommentDatasource','Injector','3781230PdFfZn','UserManagerService','UniverThreadComment','getUnit','Inject','Delete','listComments','@univerjs/core','map','thread-comment-data-source.config','syncUpdateMutationToColla','/edit','IThreadCommentDataSourceService','Reply','root','_commentService','UniverThreadCommentUIPlugin','_sessionService','getCurrentUser','/universer-api/comment/unit/','pipe','UniverThreadCommentDataSourcePlugin','HTTPService','saveCommentToSnapshot','resolveComment','userId','forEach','getOwnPropertyDescriptor','comments','post','solved','requireSession','1508664DoJItd','Plugin','createTimestamp','COMMENT','threadId','replyId','body','Solved','getComment','DependentOn','@univerjs/network','disposeWithMe','@univerjs/thread-comment','7tmrEgN','1770294DNLnXU','find','@univerjs/thread-comment-ui','size','ThreadCommentModel','function','format','201377mmCRVo','personId','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addUser','/list','payload','onReady','parentId','OpenOrReOpen','Edit','getUser','35sANlOj','replies','1EhhbFm','dayjs'];_0x9757=function(){return _0xe9cf6c;};return _0x9757();}
1
+ function _0x18b0(_0x1ec00d,_0x3b5982){_0x1ec00d=_0x1ec00d-0x185;const _0x3622e8=_0x3622();let _0x18b049=_0x3622e8[_0x1ec00d];return _0x18b049;}function _0x3622(){const _0x3c3b84=['29613fEgKHx','onStarting','personId','threadId','Unknown','Disposable','getOwnPropertyDescriptor','disposeWithMe','@univerjs/thread-comment','UserManagerService','getUnit','UniverProCollaborationClient','DependentOn','parse','rangeType','commentUpdate$','forEach','amd','_sessionService','UniverLicensePlugin','addUser','type','UniverNetwork','12PGfQKe','customRanges','UniverThreadCommentUIPlugin','rxjs','Inject','userId','831572DWBWNC','thread-comment-data-source.config','ThreadCommentModel','/delete','defineProperty','CollaborationSessionService','Add','Delete','createTimestamp','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','replyId','@univerjs/network','filter','rangeId','comment','pipe','setConfig','_config','Injector','deleteComment','dayjs','_initDataSource','getCurrentUser','code','replies','payload','UniverCore','requireSession','/universer-api/user/list','solved','UniverThreadCommentDataSourcePlugin','get','updateComment','listComments','map','dataSource','delete','UniverProLicense','parentId','onReady','OpenOrReOpen','_userService','_httpService','UniverCollaborationClientPlugin','length','500255bBQFkB','UniverProThreadCommentDatasource','4185990qpDAAJ','userID','UniverThreadComment','addComment','Solve','content','YYYY/MM/DD\x20HH:mm','exports','HTTPService','120960WyKeVI','resolved','/solved','resolveComment','Module','/edit','CustomRangeType','/list','399468ArMHUu','comments','Plugin','_initUserSync','UNIVER_UNKNOWN','6QHUDgb','_threadCommentDataSourceService','UniverThreadCommentUi','/universer-api/comment/unit/','size','object','IThreadCommentDataSourceService','_injector','subscribe','getMemberID','users','user','toStringTag','Edit','ref','CommentService','stringify','getUser','_threadCommentDataSource','bufferTime','find','post','slice','saveCommentToSnapshot','add','9hnwlhD','/add','@univerjs/thread-comment-ui','_init','body','error','UNRECOGNIZED','Solved','@univerjs-pro/collaboration-client','Reply','merge','230315FCnqoe','symbol','root','UniverInstanceType','format'];_0x3622=function(){return _0x3c3b84;};return _0x3622();}(function(_0x5f5b8f,_0x15cb68){const _0x4e7a7f=_0x18b0,_0x31e5db=_0x5f5b8f();while(!![]){try{const _0x38bb55=-parseInt(_0x4e7a7f(0x1fb))/0x1+parseInt(_0x4e7a7f(0x1d2))/0x2+-parseInt(_0x4e7a7f(0x200))/0x3*(parseInt(_0x4e7a7f(0x18a))/0x4)+parseInt(_0x4e7a7f(0x1bf))/0x5*(-parseInt(_0x4e7a7f(0x1d7))/0x6)+-parseInt(_0x4e7a7f(0x190))/0x7+-parseInt(_0x4e7a7f(0x1ca))/0x8+-parseInt(_0x4e7a7f(0x1f0))/0x9*(-parseInt(_0x4e7a7f(0x1c1))/0xa);if(_0x38bb55===_0x15cb68)break;else _0x31e5db['push'](_0x31e5db['shift']());}catch(_0x2dce46){_0x31e5db['push'](_0x31e5db['shift']());}}}(_0x3622,0x1e616),function(_0x4a2aa7,_0x2aa239){const _0x1c4f84=_0x18b0;typeof exports==_0x1c4f84(0x1dc)&&typeof module<'u'?_0x2aa239(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1c4f84(0x211)]?define([_0x1c4f84(0x1c8),_0x1c4f84(0x1f8),'@univerjs-pro/license',_0x1c4f84(0x199),_0x1c4f84(0x1f2),_0x1c4f84(0x208),_0x1c4f84(0x18d),_0x1c4f84(0x19d)],_0x2aa239):(_0x4a2aa7=typeof globalThis<'u'?globalThis:_0x4a2aa7||self,_0x2aa239(_0x4a2aa7[_0x1c4f84(0x1c0)]={},_0x4a2aa7[_0x1c4f84(0x20b)],_0x4a2aa7[_0x1c4f84(0x1b7)],_0x4a2aa7[_0x1c4f84(0x1ac)],_0x4a2aa7[_0x1c4f84(0x1d9)],_0x4a2aa7[_0x1c4f84(0x1c3)],_0x4a2aa7[_0x1c4f84(0x18d)],_0x4a2aa7[_0x1c4f84(0x189)]));}(this,function(_0xb2817b,_0xaf304a,_0x4c4188,_0x5782bb,_0x40ae93,_0x4a4df5,_0x411842,_0xb23ab1){'use strict';const _0x4017a5=_0x18b0;const _0x26fd59=_0x4017a5(0x19a);var _0x35d217=(_0x574a77=>(_0x574a77[_0x574a77[_0x4017a5(0x1ba)]=0x0]=_0x4017a5(0x1ba),_0x574a77[_0x574a77[_0x4017a5(0x1f7)]=0x1]='Solved',_0x574a77[_0x574a77[_0x4017a5(0x1f6)]=-0x1]=_0x4017a5(0x1f6),_0x574a77))(_0x35d217||{}),_0x4e7287=(_0x2e1ec9=>(_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x204)]=0x0]=_0x4017a5(0x204),_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x196)]=0x1]='Add',_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x1f9)]=0x2]=_0x4017a5(0x1f9),_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x1e4)]=0x3]='Edit',_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x197)]=0x4]='Delete',_0x2e1ec9[_0x2e1ec9['Solve']=0x5]=_0x4017a5(0x1c5),_0x2e1ec9[_0x2e1ec9['UNRECOGNIZED']=-0x1]=_0x4017a5(0x1f6),_0x2e1ec9))(_0x4e7287||{});const _0xb252d2=_0x384d21=>_0x5782bb[_0x4017a5(0x1a6)](new Date(+_0x384d21))['format']('YYYY/MM/DD\x20HH:mm'),_0x427da7=async(_0x24a72f,_0x3ef125)=>{const _0x321261=_0x4017a5,_0x5decae=_0x24a72f[_0x321261(0x1b1)](_0x5782bb['UserManagerService']),_0x2e20bf=_0x24a72f[_0x321261(0x1b1)](_0xb23ab1['HTTPService']);_0x3ef125[_0x321261(0x210)](_0x1764af=>{const _0x4aa549=_0x321261;_0x5decae[_0x4aa549(0x1e8)](_0x1764af)&&_0x3ef125[_0x4aa549(0x1b6)](_0x1764af);}),_0x3ef125[_0x321261(0x1db)]&&(await _0x2e20bf[_0x321261(0x1b1)](_0x321261(0x1ae),{'params':{'userIDs':[..._0x3ef125]}}))[_0x321261(0x1f4)][_0x321261(0x1e1)][_0x321261(0x210)](_0x501385=>{const _0x24df85=_0x321261;_0x501385&&_0x5decae[_0x24df85(0x187)](_0x501385);});};var _0x565ea6=Object[_0x4017a5(0x206)],_0x933df3=(_0x357fe0,_0x25d264,_0x49ad4d,_0x50805e)=>{for(var _0x1a6d51=_0x50805e>0x1?void 0x0:_0x50805e?_0x565ea6(_0x25d264,_0x49ad4d):_0x25d264,_0x1dd498=_0x357fe0['length']-0x1,_0x213334;_0x1dd498>=0x0;_0x1dd498--)(_0x213334=_0x357fe0[_0x1dd498])&&(_0x1a6d51=_0x213334(_0x1a6d51)||_0x1a6d51);return _0x1a6d51;},_0x22e093=(_0x124f19,_0x51fe04)=>(_0x239aa2,_0x23a631)=>_0x51fe04(_0x239aa2,_0x23a631,_0x124f19);let _0x3b27b7=class extends _0x5782bb[_0x4017a5(0x205)]{constructor(_0x5d0d1b,_0x3f5a62,_0x189eaa,_0x28a113){const _0x365845=_0x4017a5;super(),this['_commentService']=_0x5d0d1b,this[_0x365845(0x19b)]=_0x3f5a62,this[_0x365845(0x1bb)]=_0x189eaa,this['_injector']=_0x28a113,this[_0x365845(0x1f3)](),this[_0x365845(0x1d5)]();}['_initUserSync'](){const _0x300c65=_0x4017a5;this[_0x300c65(0x207)](this[_0x300c65(0x19b)][_0x300c65(0x20f)][_0x300c65(0x1a1)](_0x411842[_0x300c65(0x1ea)](0x10))[_0x300c65(0x1df)](_0x501d51=>{const _0xf9c3b1=_0x300c65,_0x4b12f8=new Set();_0x501d51[_0xf9c3b1(0x210)](_0xc2adb9=>{const _0x7f60de=_0xf9c3b1;switch(_0xc2adb9[_0x7f60de(0x188)]){case _0x7f60de(0x1ef):{const _0x30421e=_0xc2adb9[_0x7f60de(0x1ab)][_0x7f60de(0x202)];_0x4b12f8[_0x7f60de(0x1ef)](_0x30421e);break;}}}),_0x427da7(this[_0xf9c3b1(0x1de)],_0x4b12f8);}));}[_0x4017a5(0x1f3)](){const _0x596bc6=_0x4017a5;this[_0x596bc6(0x207)](this['_commentService'][_0x596bc6(0x20f)][_0x596bc6(0x1df)](async _0xb44414=>{const _0x145c60=_0x596bc6;var _0x27754e,_0x1d2158,_0x2a51d4,_0x24df04;const _0x458a97=(_0x27754e=this['_threadCommentModel'][_0x145c60(0x20a)](_0xb44414['unitId'])[_0x145c60(0x1eb)](_0x18de5b=>_0x18de5b[_0x145c60(0x203)]===_0xb44414[_0x145c60(0x203)]))==null?void 0x0:_0x27754e[_0x145c60(0x1fd)];if(!_0x458a97)return;const {unitId:_0x50fb31,subUnitId:_0xc5c080}=_0x458a97;switch(_0xb44414[_0x145c60(0x1e2)]&&this['_userService'][_0x145c60(0x187)](_0xb44414[_0x145c60(0x1e2)]),_0xb44414[_0x145c60(0x188)]){case _0x4e7287['Add']:break;case _0x4e7287['Reply']:{this[_0x145c60(0x19b)][_0x145c60(0x1c4)](_0x50fb31,_0xc5c080,{'unitId':_0x50fb31,'subUnitId':_0xc5c080,'ref':'','id':_0xb44414[_0x145c60(0x19c)],'dT':_0xb252d2(+_0xb44414[_0x145c60(0x198)]),'threadId':_0xb44414[_0x145c60(0x203)],'personId':(_0x2a51d4=(_0x1d2158=_0xb44414[_0x145c60(0x1e2)])==null?void 0x0:_0x1d2158[_0x145c60(0x1c2)])!=null?_0x2a51d4:_0xb44414[_0x145c60(0x18f)],'text':JSON['parse'](_0xb44414['content']),'parentId':_0x458a97['id']});break;}case _0x4e7287[_0x145c60(0x197)]:{const _0x42cf49=this['_threadCommentModel']['getComment'](_0x50fb31,_0xc5c080,_0xb44414[_0x145c60(0x19c)]);_0x42cf49&&_0x42cf49[_0x145c60(0x1b8)]&&this[_0x145c60(0x19b)][_0x145c60(0x1a5)](_0x50fb31,_0xc5c080,_0xb44414[_0x145c60(0x19c)]);break;}case _0x4e7287[_0x145c60(0x1e4)]:{this['_threadCommentModel'][_0x145c60(0x1b2)](_0x50fb31,_0xc5c080,{'commentId':_0xb44414[_0x145c60(0x19c)],'text':JSON['parse'](_0xb44414[_0x145c60(0x1c6)])});break;}case _0x4e7287[_0x145c60(0x1c5)]:{const _0x4bde90=(_0x24df04=this[_0x145c60(0x19b)][_0x145c60(0x20a)](_0xb44414['unitId'])[_0x145c60(0x1eb)](_0x3db378=>_0x3db378[_0x145c60(0x203)]===_0xb44414[_0x145c60(0x203)]))==null?void 0x0:_0x24df04[_0x145c60(0x1fd)];_0x4bde90&&this[_0x145c60(0x19b)][_0x145c60(0x1cd)](_0x50fb31,_0xc5c080,_0x4bde90['id'],_0xb44414[_0x145c60(0x1af)]===_0x35d217[_0x145c60(0x1f7)]);break;}}}));}};_0x3b27b7=_0x933df3([_0x22e093(0x0,_0x5782bb['Inject'](_0xaf304a[_0x4017a5(0x1e6)])),_0x22e093(0x1,_0x5782bb[_0x4017a5(0x18e)](_0x4a4df5[_0x4017a5(0x192)])),_0x22e093(0x2,_0x5782bb['Inject'](_0x5782bb['UserManagerService'])),_0x22e093(0x3,_0x5782bb[_0x4017a5(0x18e)](_0x5782bb[_0x4017a5(0x1a4)]))],_0x3b27b7);const _0x2102fc=_0x4017a5(0x191),_0x52b3a3={};var _0x44d9ef=Object[_0x4017a5(0x206)],_0x263079=(_0x258dda,_0x49c627,_0x460536,_0x4fcfbc)=>{const _0x4d8c30=_0x4017a5;for(var _0x380414=_0x4fcfbc>0x1?void 0x0:_0x4fcfbc?_0x44d9ef(_0x49c627,_0x460536):_0x49c627,_0xd4eb07=_0x258dda[_0x4d8c30(0x1be)]-0x1,_0x51773b;_0xd4eb07>=0x0;_0xd4eb07--)(_0x51773b=_0x258dda[_0xd4eb07])&&(_0x380414=_0x51773b(_0x380414)||_0x380414);return _0x380414;},_0x522ed8=(_0x1ca3b1,_0xb234d1)=>(_0x1aeef9,_0x292541)=>_0xb234d1(_0x1aeef9,_0x292541,_0x1ca3b1);function _0x329ac0(_0x3060a4,_0x5576f4){const _0x395cc7=_0x4017a5,_0x520a9d=_0x3060a4[_0x395cc7(0x1aa)][0x0];return{..._0x5576f4,'id':_0x520a9d[_0x395cc7(0x19c)],'resolved':_0x3060a4[_0x395cc7(0x1af)]===0x1,'dT':_0xb252d2(_0x520a9d[_0x395cc7(0x198)]),'personId':_0x520a9d[_0x395cc7(0x18f)],'threadId':_0x520a9d['threadId']};}function _0x1108cd(_0x552f9e,_0x445d35,_0x347f85){const _0x543702=_0x4017a5;var _0x490535,_0x4e3e5d;if(((_0x4e3e5d=(_0x490535=_0x552f9e==null?void 0x0:_0x552f9e[_0x543702(0x1aa)])==null?void 0x0:_0x490535['length'])!=null?_0x4e3e5d:0x0)>0x0){const _0x515919=(_0x447227,_0x4af93c)=>({'id':_0x447227[_0x543702(0x19c)],'threadId':_0x447227[_0x543702(0x203)],'dT':_0xb252d2(_0x447227[_0x543702(0x198)]),'personId':_0x447227[_0x543702(0x18f)],'resolved':_0x552f9e[_0x543702(0x1af)]===_0x35d217[_0x543702(0x1f7)],'unitId':_0x445d35,'subUnitId':_0x347f85,'text':JSON[_0x543702(0x20d)](_0x447227['content']),'parentId':_0x4af93c}),_0xb4fa02=_0x515919(_0x552f9e[_0x543702(0x1aa)][0x0]);return{..._0xb4fa02,'children':_0x552f9e[_0x543702(0x1aa)][_0x543702(0x1ed)](0x1)['map'](_0x4c1ab5=>_0x515919(_0x4c1ab5,_0xb4fa02['id']))};}return null;}let _0x46ea66=class{constructor(_0x3ceaea,_0x541ec0,_0x59aff1){const _0x242a19=_0x4017a5;this[_0x242a19(0x1bc)]=_0x3ceaea,this['_userService']=_0x541ec0,this[_0x242a19(0x185)]=_0x59aff1;}async['addComment'](_0x4cb6be){const _0x49803b=_0x4017a5;var _0x1407f0,_0x1f95c1;const {parentId:_0x19065d,unitId:_0x55e396,text:_0x37d09a,threadId:_0x20779f}=_0x4cb6be,_0x4caadd=(_0x1f95c1=(_0x1407f0=_0x37d09a[_0x49803b(0x18b)])==null?void 0x0:_0x1407f0['filter'](_0x188b2d=>_0x188b2d[_0x49803b(0x20e)]===_0x5782bb[_0x49803b(0x1d0)]['COMMENT'])[_0x49803b(0x1b4)](_0x56a740=>_0x56a740[_0x49803b(0x19f)]))!=null?_0x1f95c1:[],_0x39d418=JSON[_0x49803b(0x1e7)](_0x37d09a),_0xed6bbb=(await this[_0x49803b(0x185)][_0x49803b(0x1ad)](_0x55e396))['getMemberID']();if(_0x19065d){const _0x1e192a={'memberId':_0xed6bbb,'unitId':_0x55e396,'content':_0x39d418,'mention':_0x4caadd,'threadId':_0x20779f},_0x262721=(await this[_0x49803b(0x1bc)][_0x49803b(0x1ec)](_0x49803b(0x1da)+_0x55e396+'/reply',{'body':_0x1e192a}))[_0x49803b(0x1f4)]['reply'];return{..._0x4cb6be,'id':_0x262721[_0x49803b(0x19c)],'dT':_0x5782bb[_0x49803b(0x1a6)](+_0x262721['createTimestamp'])[_0x49803b(0x1ff)](_0x49803b(0x1c7)),'personId':_0x262721[_0x49803b(0x18f)]};}else{const _0x3e50be={'memberId':_0xed6bbb,'unitId':_0x55e396,'content':_0x39d418,'mention':_0x4caadd},_0x57d599=await this[_0x49803b(0x1bc)][_0x49803b(0x1ec)](_0x49803b(0x1da)+_0x55e396+_0x49803b(0x1f1),{'body':_0x3e50be});return _0x329ac0(_0x57d599[_0x49803b(0x1f4)][_0x49803b(0x1a0)],_0x4cb6be);}}async['updateComment'](_0x141952){const _0x360348=_0x4017a5;var _0x44883e,_0xaacbd3;const {text:_0x1fb287,unitId:_0x8119b8}=_0x141952,_0x1f5c43=(_0xaacbd3=(_0x44883e=_0x1fb287[_0x360348(0x18b)])==null?void 0x0:_0x44883e[_0x360348(0x19e)](_0x52d976=>_0x52d976['rangeType']===_0x5782bb['CustomRangeType']['COMMENT'])[_0x360348(0x1b4)](_0x3c93c7=>_0x3c93c7['rangeId']))!=null?_0xaacbd3:[],_0x43664d=JSON[_0x360348(0x1e7)](_0x1fb287),_0x3f3e83=_0x141952[_0x360348(0x203)],_0x4e3cd7=_0x141952['id'],_0x5b3b76={'memberId':(await this[_0x360348(0x185)][_0x360348(0x1ad)](_0x8119b8))[_0x360348(0x1e0)](),'unitId':_0x8119b8,'threadId':_0x3f3e83,'mention':_0x1f5c43,'content':_0x43664d,'replyId':_0x4e3cd7},_0x7ceeab=await this[_0x360348(0x1bc)]['post'](_0x360348(0x1da)+_0x8119b8+_0x360348(0x1cf),{'body':_0x5b3b76});return!_0x7ceeab[_0x360348(0x1f4)][_0x360348(0x1f5)]||_0x7ceeab[_0x360348(0x1f4)]['error'][_0x360348(0x1a9)]===0x1;}async['resolveComment'](_0x442e6c){const _0x100c74=_0x4017a5,{unitId:_0x180406}=_0x442e6c,_0x346b0d=_0x442e6c[_0x100c74(0x203)],_0x2e83ed={'memberId':this[_0x100c74(0x1bb)][_0x100c74(0x1a8)]()[_0x100c74(0x1c2)],'unitId':_0x180406,'threadId':_0x346b0d,'solved':_0x442e6c[_0x100c74(0x1cb)]?_0x35d217[_0x100c74(0x1f7)]:_0x35d217['OpenOrReOpen']},_0x3d60a9=await this[_0x100c74(0x1bc)][_0x100c74(0x1ec)](_0x100c74(0x1da)+_0x180406+_0x100c74(0x1cc),{'body':_0x2e83ed});return!_0x3d60a9[_0x100c74(0x1f4)][_0x100c74(0x1f5)]||_0x3d60a9[_0x100c74(0x1f4)][_0x100c74(0x1f5)]['code']===0x1;}async['deleteComment'](_0x16b542,_0x65fd1e,_0x53199f,_0x3091c0){const _0x36ed42=_0x4017a5,_0x1fa18f={'memberId':(await this[_0x36ed42(0x185)][_0x36ed42(0x1ad)](_0x16b542))[_0x36ed42(0x1e0)](),'threadId':_0x53199f,'replyId':_0x3091c0,'unitId':_0x16b542},_0xe55428=await this[_0x36ed42(0x1bc)][_0x36ed42(0x1ec)]('/universer-api/comment/unit/'+_0x16b542+_0x36ed42(0x193),{'body':_0x1fa18f});return!_0xe55428['body'][_0x36ed42(0x1f5)]||_0xe55428[_0x36ed42(0x1f4)][_0x36ed42(0x1f5)]['code']===0x1;}async[_0x4017a5(0x1b3)](_0x48a293,_0xd925c7,_0x251810){const _0x1bb8e0=_0x4017a5,_0x13a262={'unitId':_0x48a293,'threadId':_0x251810},_0x29d719=await this[_0x1bb8e0(0x1bc)][_0x1bb8e0(0x1ec)](_0x1bb8e0(0x1da)+_0x48a293+_0x1bb8e0(0x1d1),{'body':_0x13a262}),_0x53810c=_0x251810[_0x1bb8e0(0x1b4)](_0x3c4114=>_0x1108cd(_0x29d719[_0x1bb8e0(0x1f4)][_0x1bb8e0(0x1d3)][_0x3c4114],_0x48a293,_0xd925c7))['filter'](Boolean);return Object['values'](_0x29d719['body'][_0x1bb8e0(0x1e1)])[_0x1bb8e0(0x210)](_0x540032=>{const _0x1a5468=_0x1bb8e0;this['_userService'][_0x1a5468(0x187)](_0x540032);}),_0x53810c;}[_0x4017a5(0x1ee)](_0x2c2dd7){const _0x5c1f5b=_0x4017a5;return{'id':_0x2c2dd7['id'],'threadId':_0x2c2dd7['threadId'],'ref':_0x2c2dd7[_0x5c1f5b(0x1e5)]};}};_0x46ea66=_0x263079([_0x522ed8(0x0,_0x5782bb[_0x4017a5(0x18e)](_0xb23ab1[_0x4017a5(0x1c9)])),_0x522ed8(0x1,_0x5782bb[_0x4017a5(0x18e)](_0x5782bb[_0x4017a5(0x209)])),_0x522ed8(0x2,_0x5782bb['Inject'](_0xaf304a[_0x4017a5(0x195)]))],_0x46ea66);var _0x31695f=Object[_0x4017a5(0x206)],_0x44bea1=(_0x1ad962,_0x11d1e6,_0x205401,_0x4ba5f0)=>{for(var _0x2dd686=_0x4ba5f0>0x1?void 0x0:_0x4ba5f0?_0x31695f(_0x11d1e6,_0x205401):_0x11d1e6,_0x1887e7=_0x1ad962['length']-0x1,_0x3cdf11;_0x1887e7>=0x0;_0x1887e7--)(_0x3cdf11=_0x1ad962[_0x1887e7])&&(_0x2dd686=_0x3cdf11(_0x2dd686)||_0x2dd686);return _0x2dd686;},_0x3f9d81=(_0x12cc11,_0x3dc467)=>(_0x56d6cc,_0x392a37)=>_0x3dc467(_0x56d6cc,_0x392a37,_0x12cc11);let _0x242293=class extends _0x5782bb[_0x4017a5(0x205)]{constructor(_0x31a7eb,_0x25a3bf){const _0x51c6ae=_0x4017a5;super(),this[_0x51c6ae(0x1d8)]=_0x31a7eb,this[_0x51c6ae(0x1e9)]=_0x25a3bf,this[_0x51c6ae(0x1a7)]();}[_0x4017a5(0x1a7)](){const _0xf4dd0f=_0x4017a5;this[_0xf4dd0f(0x1d8)][_0xf4dd0f(0x1b5)]=this[_0xf4dd0f(0x1e9)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x242293=_0x44bea1([_0x3f9d81(0x0,_0x4a4df5[_0x4017a5(0x1dd)]),_0x3f9d81(0x1,_0x5782bb[_0x4017a5(0x18e)](_0x46ea66))],_0x242293);var _0x301ded=Object[_0x4017a5(0x194)],_0x18118a=Object[_0x4017a5(0x206)],_0x3efadd=(_0x238042,_0x237492,_0x29a87b)=>_0x237492 in _0x238042?_0x301ded(_0x238042,_0x237492,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29a87b}):_0x238042[_0x237492]=_0x29a87b,_0x95330e=(_0xfa2a46,_0x4d9aae,_0x1e59b2,_0x14ddeb)=>{const _0x34bdd5=_0x4017a5;for(var _0x238b15=_0x14ddeb>0x1?void 0x0:_0x14ddeb?_0x18118a(_0x4d9aae,_0x1e59b2):_0x4d9aae,_0x586886=_0xfa2a46[_0x34bdd5(0x1be)]-0x1,_0x238d10;_0x586886>=0x0;_0x586886--)(_0x238d10=_0xfa2a46[_0x586886])&&(_0x238b15=_0x238d10(_0x238b15)||_0x238b15);return _0x238b15;},_0x149a4d=(_0x4f9cac,_0x1e5b41)=>(_0x416a17,_0x14dbde)=>_0x1e5b41(_0x416a17,_0x14dbde,_0x4f9cac),_0x5605c7=(_0x5f5d84,_0x88fe98,_0x413525)=>_0x3efadd(_0x5f5d84,typeof _0x88fe98!=_0x4017a5(0x1fc)?_0x88fe98+'':_0x88fe98,_0x413525);_0xb2817b['UniverThreadCommentDataSourcePlugin']=class extends _0x5782bb[_0x4017a5(0x1d4)]{constructor(_0x1e6ddb=_0x52b3a3,_0x25bde3,_0x413e82){const _0x7d4b46=_0x4017a5;super(),this[_0x7d4b46(0x1a3)]=_0x1e6ddb,this['_injector']=_0x25bde3,this['_configService']=_0x413e82;const {..._0xf267a6}=_0x5782bb[_0x7d4b46(0x1fa)]({},_0x52b3a3,this[_0x7d4b46(0x1a3)]);this['_configService'][_0x7d4b46(0x1a2)](_0x2102fc,_0xf267a6);}[_0x4017a5(0x201)](){const _0x244b34=_0x4017a5;[[_0x46ea66],[_0x242293],[_0x3b27b7]][_0x244b34(0x210)](_0x27394d=>{const _0x5d384b=_0x244b34;this[_0x5d384b(0x1de)][_0x5d384b(0x1ef)](_0x27394d);});}[_0x4017a5(0x1b9)](){const _0x2ea985=_0x4017a5;this[_0x2ea985(0x1de)]['get'](_0x242293),this[_0x2ea985(0x1de)][_0x2ea985(0x1b1)](_0x3b27b7);}},_0x5605c7(_0xb2817b[_0x4017a5(0x1b0)],'pluginName',_0x26fd59),_0x5605c7(_0xb2817b[_0x4017a5(0x1b0)],_0x4017a5(0x188),_0x5782bb[_0x4017a5(0x1fe)][_0x4017a5(0x1d6)]),_0xb2817b[_0x4017a5(0x1b0)]=_0x95330e([_0x5782bb[_0x4017a5(0x20c)](_0x40ae93[_0x4017a5(0x18c)],_0xaf304a[_0x4017a5(0x1bd)],_0x4c4188[_0x4017a5(0x186)]),_0x149a4d(0x1,_0x5782bb['Inject'](_0x5782bb[_0x4017a5(0x1a4)])),_0x149a4d(0x2,_0x5782bb['IConfigService'])],_0xb2817b[_0x4017a5(0x1b0)]),Object['defineProperty'](_0xb2817b,Symbol[_0x4017a5(0x1e3)],{'value':_0x4017a5(0x1ce)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4",
3
+ "version": "0.13.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.4",
49
- "@univerjs/core": "0.12.4",
50
- "@univerjs/network": "0.12.4",
48
+ "@univerjs-pro/collaboration-client": "0.13.0",
49
+ "@univerjs-pro/license": "0.13.0",
50
+ "@univerjs/core": "0.13.0",
51
+ "@univerjs/thread-comment": "0.13.0",
51
52
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/thread-comment": "0.12.4",
53
- "@univerjs/thread-comment-ui": "0.12.4",
54
- "@univerjs-pro/license": "0.12.4"
53
+ "@univerjs/thread-comment-ui": "0.13.0",
54
+ "@univerjs/network": "0.13.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.2.6",
59
+ "vite": "^7.2.7",
60
60
  "vitest": "^4.0.15",
61
- "@univerjs-infra/shared": "0.12.4"
61
+ "@univerjs-infra/shared": "0.13.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",