@univerjs-pro/thread-comment-datasource 0.10.3 → 0.10.4

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';function _0x2a51(){const _0x3a7f75=['getCurrentUser','ref','format','UNRECOGNIZED','addUser','bufferTime','requireSession','CustomRangeType','/universer-api/comment/unit/','Injector','updateComment','filter','saveCommentToSnapshot','body','stringify','code','find','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','user','getMemberID','pipe','Edit','resolved','content','_config','_threadCommentDataSourceService','HTTPService','2035SMGDAd','forEach','CommentService','onReady','Reply','Inject','63nKdDoV','_httpService','getUnit','UniverThreadCommentUIPlugin','listComments','solved','defineProperty','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','values','parse','rangeType','/delete','userID','_userService','size','OpenOrReOpen','unitId','pluginName','_initUserSync','/universer-api/user/list','Add','rangeId','77PLliPq','Solved','628215YEqbNN','7486272PVyLHq','length','3867230ydicbG','/add','add','replyId','get','/edit','threadId','root','COMMENT','thread-comment-data-source.config','type','disposeWithMe','getComment','14850hSROId','payload','Plugin','_commentService','symbol','YYYY/MM/DD\x20HH:mm','_sessionService','getOwnPropertyDescriptor','slice','10DdwUvA','customRanges','Solve','personId','post','_threadCommentDataSource','Delete','commentUpdate$','subscribe','replies','IThreadCommentDataSourceService','dayjs','/solved','502713KHAMep','DependentOn','_threadCommentModel','createTimestamp','error','userId','Disposable','_injector','addComment','CollaborationSessionService','onStarting','map','/reply','56968mjXscp','IConfigService','_initDataSource','resolveComment','_init','deleteComment','640392EkSqYU'];_0x2a51=function(){return _0x3a7f75;};return _0x2a51();}const _0x1711b1=_0x3c2f;(function(_0x18f6a1,_0x408d59){const _0x44536d=_0x3c2f,_0x42b3b1=_0x18f6a1();while(!![]){try{const _0x2b8305=parseInt(_0x44536d(0x168))/0x1+parseInt(_0x44536d(0x15b))/0x2*(-parseInt(_0x44536d(0x1b8))/0x3)+parseInt(_0x44536d(0x17b))/0x4+parseInt(_0x44536d(0x198))/0x5*(-parseInt(_0x44536d(0x1c8))/0x6)+parseInt(_0x44536d(0x19e))/0x7*(parseInt(_0x44536d(0x175))/0x8)+-parseInt(_0x44536d(0x1b9))/0x9+-parseInt(_0x44536d(0x1bb))/0xa*(-parseInt(_0x44536d(0x1b6))/0xb);if(_0x2b8305===_0x408d59)break;else _0x42b3b1['push'](_0x42b3b1['shift']());}catch(_0x560e21){_0x42b3b1['push'](_0x42b3b1['shift']());}}}(_0x2a51,0x85bdb));Object[_0x1711b1(0x1a4)](exports,Symbol['toStringTag'],{'value':'Module'});function _0x3c2f(_0x34a29a,_0x497203){const _0x2a51c2=_0x2a51();return _0x3c2f=function(_0x3c2fc0,_0x486e3f){_0x3c2fc0=_0x3c2fc0-0x154;let _0xbdfd4e=_0x2a51c2[_0x3c2fc0];return _0xbdfd4e;},_0x3c2f(_0x34a29a,_0x497203);}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=_0x1711b1(0x1a6);var I=(_0x415f4a=>(_0x415f4a[_0x415f4a[_0x1711b1(0x1af)]=0x0]='OpenOrReOpen',_0x415f4a[_0x415f4a[_0x1711b1(0x1b7)]=0x1]=_0x1711b1(0x1b7),_0x415f4a[_0x415f4a[_0x1711b1(0x17f)]=-0x1]=_0x1711b1(0x17f),_0x415f4a))(I||{}),v=(_0x61fca5=>(_0x61fca5[_0x61fca5['Unknown']=0x0]='Unknown',_0x61fca5[_0x61fca5[_0x1711b1(0x1b4)]=0x1]=_0x1711b1(0x1b4),_0x61fca5[_0x61fca5[_0x1711b1(0x19c)]=0x2]=_0x1711b1(0x19c),_0x61fca5[_0x61fca5[_0x1711b1(0x192)]=0x3]='Edit',_0x61fca5[_0x61fca5['Delete']=0x4]='Delete',_0x61fca5[_0x61fca5[_0x1711b1(0x15d)]=0x5]='Solve',_0x61fca5[_0x61fca5['UNRECOGNIZED']=-0x1]=_0x1711b1(0x17f),_0x61fca5))(v||{});const f=_0xf78796=>c[_0x1711b1(0x166)](new Date(+_0xf78796))[_0x1711b1(0x17e)](_0x1711b1(0x157)),R=async(_0x3a2a61,_0x5ca398)=>{const _0x2936aa=_0x1711b1,_0x50ec47=_0x3a2a61[_0x2936aa(0x1bf)](c[_0x2936aa(0x1a5)]),_0x5ee29f=_0x3a2a61[_0x2936aa(0x1bf)](P[_0x2936aa(0x197)]);_0x5ca398[_0x2936aa(0x199)](_0x3d2e7f=>{_0x50ec47['getUser'](_0x3d2e7f)&&_0x5ca398['delete'](_0x3d2e7f);}),_0x5ca398[_0x2936aa(0x1ae)]&&(await _0x5ee29f['get'](_0x2936aa(0x1b3),{'params':{'userIDs':[..._0x5ca398]}}))[_0x2936aa(0x189)]['users'][_0x2936aa(0x199)](_0x282986=>{const _0x241f9a=_0x2936aa;_0x282986&&_0x50ec47[_0x241f9a(0x180)](_0x282986);});};var $=Object[_0x1711b1(0x159)],E=(_0xef388f,_0x3a40ce,_0x59b633,_0x6bc5dd)=>{for(var _0x558293=_0x6bc5dd>0x1?void 0x0:_0x6bc5dd?$(_0x3a40ce,_0x59b633):_0x3a40ce,_0x41ba97=_0xef388f['length']-0x1,_0x3a47fc;_0x41ba97>=0x0;_0x41ba97--)(_0x3a47fc=_0xef388f[_0x41ba97])&&(_0x558293=_0x3a47fc(_0x558293)||_0x558293);return _0x558293;},S=(_0x321b7e,_0x203c3e)=>(_0x59715a,_0xf8953d)=>_0x203c3e(_0x59715a,_0xf8953d,_0x321b7e);let _=class extends c[_0x1711b1(0x16e)]{constructor(_0x9498c3,_0x55e1a4,_0x1aa37b,_0x14f672){const _0x23de65=_0x1711b1;super(),this[_0x23de65(0x155)]=_0x9498c3,this[_0x23de65(0x16a)]=_0x55e1a4,this['_userService']=_0x1aa37b,this['_injector']=_0x14f672,this[_0x23de65(0x179)](),this[_0x23de65(0x1b2)]();}[_0x1711b1(0x1b2)](){const _0x195511=_0x1711b1;this[_0x195511(0x1c6)](this[_0x195511(0x16a)]['commentUpdate$'][_0x195511(0x191)](j[_0x195511(0x181)](0x10))[_0x195511(0x163)](_0xb9a9d=>{const _0x25cfc6=_0x195511,_0x35bacc=new Set();_0xb9a9d[_0x25cfc6(0x199)](_0x24fd55=>{const _0x3e69c0=_0x25cfc6;switch(_0x24fd55[_0x3e69c0(0x1c5)]){case _0x3e69c0(0x1bd):{const _0x300d3d=_0x24fd55[_0x3e69c0(0x1c9)][_0x3e69c0(0x15e)];_0x35bacc[_0x3e69c0(0x1bd)](_0x300d3d);break;}}}),R(this['_injector'],_0x35bacc);}));}[_0x1711b1(0x179)](){const _0x2f5462=_0x1711b1;this[_0x2f5462(0x1c6)](this['_commentService'][_0x2f5462(0x162)][_0x2f5462(0x163)](async _0x128f7e=>{const _0x3497fe=_0x2f5462;var _0x308b4e,_0x235322,_0x1e450f,_0x171e91;const _0x43888e=(_0x308b4e=this[_0x3497fe(0x16a)]['getUnit'](_0x128f7e[_0x3497fe(0x1b0)])['find'](_0xcf1cc8=>_0xcf1cc8['threadId']===_0x128f7e[_0x3497fe(0x1c1)]))==null?void 0x0:_0x308b4e[_0x3497fe(0x1c2)];if(!_0x43888e)return;const {unitId:_0x1030b5,subUnitId:_0x21e84c}=_0x43888e;switch(_0x128f7e[_0x3497fe(0x18f)]&&this[_0x3497fe(0x1ad)][_0x3497fe(0x180)](_0x128f7e['user']),_0x128f7e[_0x3497fe(0x1c5)]){case v['Add']:break;case v['Reply']:{this[_0x3497fe(0x16a)][_0x3497fe(0x170)](_0x1030b5,_0x21e84c,{'unitId':_0x1030b5,'subUnitId':_0x21e84c,'ref':'','id':_0x128f7e[_0x3497fe(0x1be)],'dT':f(+_0x128f7e['createTimestamp']),'threadId':_0x128f7e[_0x3497fe(0x1c1)],'personId':(_0x1e450f=(_0x235322=_0x128f7e['user'])==null?void 0x0:_0x235322[_0x3497fe(0x1ac)])!=null?_0x1e450f:_0x128f7e[_0x3497fe(0x16d)],'text':JSON[_0x3497fe(0x1a9)](_0x128f7e['content']),'parentId':_0x43888e['id']});break;}case v[_0x3497fe(0x161)]:{const _0x13387e=this['_threadCommentModel'][_0x3497fe(0x1c7)](_0x1030b5,_0x21e84c,_0x128f7e[_0x3497fe(0x1be)]);_0x13387e&&_0x13387e['parentId']&&this['_threadCommentModel'][_0x3497fe(0x17a)](_0x1030b5,_0x21e84c,_0x128f7e[_0x3497fe(0x1be)]);break;}case v[_0x3497fe(0x192)]:{this[_0x3497fe(0x16a)]['updateComment'](_0x1030b5,_0x21e84c,{'commentId':_0x128f7e[_0x3497fe(0x1be)],'text':JSON[_0x3497fe(0x1a9)](_0x128f7e[_0x3497fe(0x194)])});break;}case v[_0x3497fe(0x15d)]:{const _0x1aca4c=(_0x171e91=this['_threadCommentModel'][_0x3497fe(0x1a0)](_0x128f7e[_0x3497fe(0x1b0)])[_0x3497fe(0x18c)](_0xcacfb5=>_0xcacfb5[_0x3497fe(0x1c1)]===_0x128f7e[_0x3497fe(0x1c1)]))==null?void 0x0:_0x171e91[_0x3497fe(0x1c2)];_0x1aca4c&&this[_0x3497fe(0x16a)]['resolveComment'](_0x1030b5,_0x21e84c,_0x1aca4c['id'],_0x128f7e[_0x3497fe(0x1a3)]===I[_0x3497fe(0x1b7)]);break;}}}));}};_=E([S(0x0,c[_0x1711b1(0x19d)](b[_0x1711b1(0x19a)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x1711b1(0x19d)](c[_0x1711b1(0x1a5)])),S(0x3,c[_0x1711b1(0x19d)](c[_0x1711b1(0x185)]))],_);const q=_0x1711b1(0x1c4),D={};var A=Object[_0x1711b1(0x159)],x=(_0x900f76,_0x3885de,_0x381e98,_0x41e216)=>{const _0xb88a88=_0x1711b1;for(var _0x5553dd=_0x41e216>0x1?void 0x0:_0x41e216?A(_0x3885de,_0x381e98):_0x3885de,_0x4ff19c=_0x900f76[_0xb88a88(0x1ba)]-0x1,_0x440579;_0x4ff19c>=0x0;_0x4ff19c--)(_0x440579=_0x900f76[_0x4ff19c])&&(_0x5553dd=_0x440579(_0x5553dd)||_0x5553dd);return _0x5553dd;},C=(_0x365d65,_0x1a33c4)=>(_0x31754c,_0x28642c)=>_0x1a33c4(_0x31754c,_0x28642c,_0x365d65);function Y(_0xdb57b5,_0x35f831){const _0x57192d=_0x1711b1,_0x431c99=_0xdb57b5[_0x57192d(0x164)][0x0];return{..._0x35f831,'id':_0x431c99['replyId'],'resolved':_0xdb57b5[_0x57192d(0x1a3)]===0x1,'dT':f(_0x431c99[_0x57192d(0x16b)]),'personId':_0x431c99['userId'],'threadId':_0x431c99[_0x57192d(0x1c1)]};}function G(_0x34f283,_0x2ddcbc,_0x11bbeb){const _0x1b5837=_0x1711b1;var _0x289590,_0x221a2d;if(((_0x221a2d=(_0x289590=_0x34f283==null?void 0x0:_0x34f283[_0x1b5837(0x164)])==null?void 0x0:_0x289590[_0x1b5837(0x1ba)])!=null?_0x221a2d:0x0)>0x0){const _0x3730e0=(_0x3d9658,_0xf2cf38)=>({'id':_0x3d9658[_0x1b5837(0x1be)],'threadId':_0x3d9658[_0x1b5837(0x1c1)],'dT':f(_0x3d9658[_0x1b5837(0x16b)]),'personId':_0x3d9658['userId'],'resolved':_0x34f283[_0x1b5837(0x1a3)]===I[_0x1b5837(0x1b7)],'unitId':_0x2ddcbc,'subUnitId':_0x11bbeb,'text':JSON[_0x1b5837(0x1a9)](_0x3d9658[_0x1b5837(0x194)]),'parentId':_0xf2cf38}),_0x5bcf0f=_0x3730e0(_0x34f283[_0x1b5837(0x164)][0x0]);return{..._0x5bcf0f,'children':_0x34f283[_0x1b5837(0x164)][_0x1b5837(0x15a)](0x1)['map'](_0x2f5582=>_0x3730e0(_0x2f5582,_0x5bcf0f['id']))};}return null;}let p=class{constructor(_0x59149c,_0x4bc74f,_0x4ab30c){const _0x23eb30=_0x1711b1;this[_0x23eb30(0x19f)]=_0x59149c,this[_0x23eb30(0x1ad)]=_0x4bc74f,this[_0x23eb30(0x158)]=_0x4ab30c;}async[_0x1711b1(0x170)](_0x5bb616){const _0x22f246=_0x1711b1;var _0x5e5447,_0x3b9dfe;const {parentId:_0x3488f7,unitId:_0x779af4,text:_0x5d433f,threadId:_0x5e47ad}=_0x5bb616,_0x479172=(_0x3b9dfe=(_0x5e5447=_0x5d433f[_0x22f246(0x15c)])==null?void 0x0:_0x5e5447[_0x22f246(0x187)](_0x5b0b39=>_0x5b0b39['rangeType']===c[_0x22f246(0x183)][_0x22f246(0x1c3)])[_0x22f246(0x173)](_0x5cd35b=>_0x5cd35b[_0x22f246(0x1b5)]))!=null?_0x3b9dfe:[],_0xa2391a=JSON[_0x22f246(0x18a)](_0x5d433f),_0x105e26=(await this[_0x22f246(0x158)]['requireSession'](_0x779af4))[_0x22f246(0x190)]();if(_0x3488f7){const _0x504796={'memberId':_0x105e26,'unitId':_0x779af4,'content':_0xa2391a,'mention':_0x479172,'threadId':_0x5e47ad},_0x1231bd=(await this[_0x22f246(0x19f)][_0x22f246(0x15f)](_0x22f246(0x184)+_0x779af4+_0x22f246(0x174),{'body':_0x504796}))[_0x22f246(0x189)]['reply'];return{..._0x5bb616,'id':_0x1231bd[_0x22f246(0x1be)],'dT':c[_0x22f246(0x166)](+_0x1231bd[_0x22f246(0x16b)])[_0x22f246(0x17e)](_0x22f246(0x157)),'personId':_0x1231bd[_0x22f246(0x16d)]};}else{const _0x2ba190={'memberId':_0x105e26,'unitId':_0x779af4,'content':_0xa2391a,'mention':_0x479172},_0x17f343=await this[_0x22f246(0x19f)][_0x22f246(0x15f)]('/universer-api/comment/unit/'+_0x779af4+_0x22f246(0x1bc),{'body':_0x2ba190});return Y(_0x17f343['body']['comment'],_0x5bb616);}}async[_0x1711b1(0x186)](_0x30f127){const _0x459ffa=_0x1711b1;var _0x7801c8,_0x351b98;const {text:_0x7fa7fe,unitId:_0x4e9197}=_0x30f127,_0x171869=(_0x351b98=(_0x7801c8=_0x7fa7fe[_0x459ffa(0x15c)])==null?void 0x0:_0x7801c8[_0x459ffa(0x187)](_0x1e3f48=>_0x1e3f48[_0x459ffa(0x1aa)]===c[_0x459ffa(0x183)][_0x459ffa(0x1c3)])['map'](_0x9fe86d=>_0x9fe86d['rangeId']))!=null?_0x351b98:[],_0xf7f4a5=JSON['stringify'](_0x7fa7fe),_0x5f2f32=_0x30f127[_0x459ffa(0x1c1)],_0x5b52c6=_0x30f127['id'],_0x109cc2={'memberId':(await this[_0x459ffa(0x158)][_0x459ffa(0x182)](_0x4e9197))[_0x459ffa(0x190)](),'unitId':_0x4e9197,'threadId':_0x5f2f32,'mention':_0x171869,'content':_0xf7f4a5,'replyId':_0x5b52c6},_0x526ef3=await this['_httpService'][_0x459ffa(0x15f)](_0x459ffa(0x184)+_0x4e9197+_0x459ffa(0x1c0),{'body':_0x109cc2});return!_0x526ef3[_0x459ffa(0x189)][_0x459ffa(0x16c)]||_0x526ef3[_0x459ffa(0x189)]['error'][_0x459ffa(0x18b)]===0x1;}async[_0x1711b1(0x178)](_0x35dc77){const _0x171c89=_0x1711b1,{unitId:_0x1e2154}=_0x35dc77,_0x1e7cfd=_0x35dc77[_0x171c89(0x1c1)],_0xb01bd7={'memberId':this[_0x171c89(0x1ad)][_0x171c89(0x17c)]()['userID'],'unitId':_0x1e2154,'threadId':_0x1e7cfd,'solved':_0x35dc77[_0x171c89(0x193)]?I['Solved']:I[_0x171c89(0x1af)]},_0x57d77a=await this[_0x171c89(0x19f)][_0x171c89(0x15f)]('/universer-api/comment/unit/'+_0x1e2154+_0x171c89(0x167),{'body':_0xb01bd7});return!_0x57d77a[_0x171c89(0x189)][_0x171c89(0x16c)]||_0x57d77a['body'][_0x171c89(0x16c)]['code']===0x1;}async[_0x1711b1(0x17a)](_0xe86cf3,_0x3c2723,_0x1495b0,_0x445c47){const _0x45415c=_0x1711b1,_0x1051b7={'memberId':(await this[_0x45415c(0x158)]['requireSession'](_0xe86cf3))[_0x45415c(0x190)](),'threadId':_0x1495b0,'replyId':_0x445c47,'unitId':_0xe86cf3},_0x51bb98=await this[_0x45415c(0x19f)]['post'](_0x45415c(0x184)+_0xe86cf3+_0x45415c(0x1ab),{'body':_0x1051b7});return!_0x51bb98[_0x45415c(0x189)][_0x45415c(0x16c)]||_0x51bb98[_0x45415c(0x189)][_0x45415c(0x16c)]['code']===0x1;}async[_0x1711b1(0x1a2)](_0x24ef67,_0x436e83,_0x353724){const _0x24214b=_0x1711b1,_0x15febc={'unitId':_0x24ef67,'threadId':_0x353724},_0x3c322d=await this[_0x24214b(0x19f)]['post'](_0x24214b(0x184)+_0x24ef67+'/list',{'body':_0x15febc}),_0x4e0624=_0x353724[_0x24214b(0x173)](_0x30ccba=>G(_0x3c322d[_0x24214b(0x189)]['comments'][_0x30ccba],_0x24ef67,_0x436e83))[_0x24214b(0x187)](Boolean);return Object[_0x24214b(0x1a8)](_0x3c322d[_0x24214b(0x189)]['users'])[_0x24214b(0x199)](_0x4d65b2=>{const _0x2f9340=_0x24214b;this[_0x2f9340(0x1ad)]['addUser'](_0x4d65b2);}),_0x4e0624;}[_0x1711b1(0x188)](_0x3bf901){const _0xa582c3=_0x1711b1;return{'id':_0x3bf901['id'],'threadId':_0x3bf901[_0xa582c3(0x1c1)],'ref':_0x3bf901[_0xa582c3(0x17d)]};}};p=x([C(0x0,c[_0x1711b1(0x19d)](P[_0x1711b1(0x197)])),C(0x1,c[_0x1711b1(0x19d)](c[_0x1711b1(0x1a5)])),C(0x2,c['Inject'](b[_0x1711b1(0x171)]))],p);var H=Object[_0x1711b1(0x159)],J=(_0x3bbb7f,_0x4ac6bd,_0x2693c1,_0xbafc76)=>{const _0x26d945=_0x1711b1;for(var _0x11e824=_0xbafc76>0x1?void 0x0:_0xbafc76?H(_0x4ac6bd,_0x2693c1):_0x4ac6bd,_0x419a32=_0x3bbb7f[_0x26d945(0x1ba)]-0x1,_0x3d105d;_0x419a32>=0x0;_0x419a32--)(_0x3d105d=_0x3bbb7f[_0x419a32])&&(_0x11e824=_0x3d105d(_0x11e824)||_0x11e824);return _0x11e824;},y=(_0x29dbe8,_0x271248)=>(_0x3eb838,_0x1d2964)=>_0x271248(_0x3eb838,_0x1d2964,_0x29dbe8);let g=class extends c['Disposable']{constructor(_0x352e87,_0x438f09){const _0x302460=_0x1711b1;super(),this[_0x302460(0x196)]=_0x352e87,this[_0x302460(0x160)]=_0x438f09,this[_0x302460(0x177)]();}[_0x1711b1(0x177)](){const _0x3efa9f=_0x1711b1;this['_threadCommentDataSourceService']['dataSource']=this[_0x3efa9f(0x160)],this[_0x3efa9f(0x196)][_0x3efa9f(0x1a7)]=!0x1;}};g=J([y(0x0,M[_0x1711b1(0x165)]),y(0x1,c[_0x1711b1(0x19d)](p))],g);var F=Object[_0x1711b1(0x1a4)],L=Object[_0x1711b1(0x159)],Z=(_0x20b530,_0x11c0d5,_0x585c1e)=>_0x11c0d5 in _0x20b530?F(_0x20b530,_0x11c0d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x585c1e}):_0x20b530[_0x11c0d5]=_0x585c1e,W=(_0x9da826,_0x3658d4,_0x35404a,_0x566510)=>{const _0x2ecaff=_0x1711b1;for(var _0x3b994f=_0x566510>0x1?void 0x0:_0x566510?L(_0x3658d4,_0x35404a):_0x3658d4,_0x3fed54=_0x9da826[_0x2ecaff(0x1ba)]-0x1,_0x3b8e38;_0x3fed54>=0x0;_0x3fed54--)(_0x3b8e38=_0x9da826[_0x3fed54])&&(_0x3b994f=_0x3b8e38(_0x3b994f)||_0x3b994f);return _0x3b994f;},O=(_0x3dc583,_0x1c97d2)=>(_0x137b00,_0xfd92cc)=>_0x1c97d2(_0x137b00,_0xfd92cc,_0x3dc583),N=(_0x157f02,_0x3e60d7,_0x54fbb4)=>Z(_0x157f02,typeof _0x3e60d7!=_0x1711b1(0x156)?_0x3e60d7+'':_0x3e60d7,_0x54fbb4);exports[_0x1711b1(0x18d)]=class extends c[_0x1711b1(0x154)]{constructor(_0x53d111=D,_0xd122d6,_0x3b92f5){const _0x283e74=_0x1711b1;super(),this['_config']=_0x53d111,this[_0x283e74(0x16f)]=_0xd122d6,this['_configService']=_0x3b92f5;const {..._0x588059}=c['merge']({},D,this[_0x283e74(0x195)]);this['_configService']['setConfig'](q,_0x588059);}[_0x1711b1(0x172)](){const _0x394c41=_0x1711b1;[[p],[g],[_]][_0x394c41(0x199)](_0x34e875=>{const _0x5efc41=_0x394c41;this[_0x5efc41(0x16f)]['add'](_0x34e875);});}[_0x1711b1(0x19b)](){const _0x398bd8=_0x1711b1;this['_injector']['get'](g),this[_0x398bd8(0x16f)]['get'](_);}},N(exports[_0x1711b1(0x18d)],_0x1711b1(0x1b1),U),N(exports[_0x1711b1(0x18d)],_0x1711b1(0x1c5),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1711b1(0x169)](w[_0x1711b1(0x1a1)],b[_0x1711b1(0x18e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x1711b1(0x185)])),O(0x2,c[_0x1711b1(0x176)])],exports[_0x1711b1(0x18d)]);
1
+ 'use strict';const _0x160246=_0x14ee;(function(_0x7f3510,_0xc15499){const _0x3c8db8=_0x14ee,_0x4a7be3=_0x7f3510();while(!![]){try{const _0x244453=parseInt(_0x3c8db8(0x121))/0x1*(parseInt(_0x3c8db8(0x115))/0x2)+-parseInt(_0x3c8db8(0xff))/0x3+-parseInt(_0x3c8db8(0x151))/0x4+-parseInt(_0x3c8db8(0x137))/0x5*(-parseInt(_0x3c8db8(0x124))/0x6)+parseInt(_0x3c8db8(0x16b))/0x7+-parseInt(_0x3c8db8(0x12f))/0x8+-parseInt(_0x3c8db8(0xf7))/0x9*(parseInt(_0x3c8db8(0x105))/0xa);if(_0x244453===_0xc15499)break;else _0x4a7be3['push'](_0x4a7be3['shift']());}catch(_0x482d83){_0x4a7be3['push'](_0x4a7be3['shift']());}}}(_0x5966,0xc4b30));Object['defineProperty'](exports,Symbol[_0x160246(0x10c)],{'value':_0x160246(0x125)});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=_0x160246(0x148);var I=(_0x4bfd3b=>(_0x4bfd3b[_0x4bfd3b[_0x160246(0x127)]=0x0]='OpenOrReOpen',_0x4bfd3b[_0x4bfd3b[_0x160246(0x143)]=0x1]=_0x160246(0x143),_0x4bfd3b[_0x4bfd3b[_0x160246(0x141)]=-0x1]='UNRECOGNIZED',_0x4bfd3b))(I||{}),v=(_0x2fa134=>(_0x2fa134[_0x2fa134['Unknown']=0x0]=_0x160246(0x167),_0x2fa134[_0x2fa134['Add']=0x1]=_0x160246(0x112),_0x2fa134[_0x2fa134[_0x160246(0x104)]=0x2]=_0x160246(0x104),_0x2fa134[_0x2fa134[_0x160246(0x118)]=0x3]=_0x160246(0x118),_0x2fa134[_0x2fa134[_0x160246(0x153)]=0x4]='Delete',_0x2fa134[_0x2fa134[_0x160246(0x10a)]=0x5]=_0x160246(0x10a),_0x2fa134[_0x2fa134[_0x160246(0x141)]=-0x1]=_0x160246(0x141),_0x2fa134))(v||{});const f=_0x8d1d73=>c[_0x160246(0x13b)](new Date(+_0x8d1d73))[_0x160246(0x133)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x16d754,_0x3f2782)=>{const _0x1b299f=_0x160246,_0x18111a=_0x16d754['get'](c[_0x1b299f(0x157)]),_0x5b099e=_0x16d754[_0x1b299f(0x11d)](P[_0x1b299f(0x11f)]);_0x3f2782[_0x1b299f(0x117)](_0x284019=>{const _0x32add5=_0x1b299f;_0x18111a[_0x32add5(0x16a)](_0x284019)&&_0x3f2782['delete'](_0x284019);}),_0x3f2782[_0x1b299f(0x146)]&&(await _0x5b099e[_0x1b299f(0x11d)](_0x1b299f(0x10b),{'params':{'userIDs':[..._0x3f2782]}}))['body'][_0x1b299f(0x136)][_0x1b299f(0x117)](_0x26ace4=>{const _0x181c96=_0x1b299f;_0x26ace4&&_0x18111a[_0x181c96(0xf6)](_0x26ace4);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x301fef,_0x1bf904,_0x12d62b,_0x470527)=>{const _0x51dbb0=_0x160246;for(var _0x80a061=_0x470527>0x1?void 0x0:_0x470527?$(_0x1bf904,_0x12d62b):_0x1bf904,_0x2a1c6b=_0x301fef[_0x51dbb0(0x14e)]-0x1,_0x2589a4;_0x2a1c6b>=0x0;_0x2a1c6b--)(_0x2589a4=_0x301fef[_0x2a1c6b])&&(_0x80a061=_0x2589a4(_0x80a061)||_0x80a061);return _0x80a061;},S=(_0x242c7d,_0x5f0004)=>(_0x225251,_0x4d1f5f)=>_0x5f0004(_0x225251,_0x4d1f5f,_0x242c7d);function _0x5966(){const _0x405089=['/delete','/universer-api/comment/unit/','Injector','length','listComments','IConfigService','6269816BVSNJs','ThreadCommentModel','Delete','COMMENT','CustomRangeType','_threadCommentDataSourceService','UserManagerService','map','userId','code','UniverThreadCommentUIPlugin','_injector','root','threadId','_commentService','defineProperty','payload','UniverLicensePlugin','_initUserSync','_userService','error','setConfig','Unknown','add','post','getUser','3934238cqaCzb','replyId','getUnit','addUser','3700287lawVRq','dataSource','_threadCommentModel','user','filter','comment','_config','UniverCollaborationClientPlugin','524286TFPInK','customRanges','UniverInstanceType','Inject','getOwnPropertyDescriptor','Reply','10whGJLz','getCurrentUser','_init','deleteComment','subscribe','Solve','/universer-api/user/list','toStringTag','onStarting','pluginName','/solved','UniverThreadCommentDataSourcePlugin','rangeType','Add','personId','_threadCommentDataSource','2SUPQqx','Disposable','forEach','Edit','find','onReady','/reply','resolved','get','solved','HTTPService','_configService','1261812NwmUbV','commentUpdate$','rangeId','30NgznJY','Module','resolveComment','OpenOrReOpen','merge','thread-comment-data-source.config','addComment','getComment','getMemberID','reply','createTimestamp','3072256qiQpbw','disposeWithMe','_sessionService','DependentOn','format','requireSession','bufferTime','users','1519225kgSVgZ','body','IThreadCommentDataSourceService','userID','dayjs','Plugin','CommentService','_httpService','stringify','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','syncUpdateMutationToColla','Solved','unitId','parse','size','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','content'];_0x5966=function(){return _0x405089;};return _0x5966();}let _=class extends c[_0x160246(0x116)]{constructor(_0x3ea0cb,_0x32bdb1,_0x56e76b,_0x428746){const _0x13ceae=_0x160246;super(),this['_commentService']=_0x3ea0cb,this[_0x13ceae(0xf9)]=_0x32bdb1,this[_0x13ceae(0x164)]=_0x56e76b,this[_0x13ceae(0x15c)]=_0x428746,this[_0x13ceae(0x107)](),this[_0x13ceae(0x163)]();}[_0x160246(0x163)](){const _0x195e3=_0x160246;this['disposeWithMe'](this[_0x195e3(0xf9)][_0x195e3(0x122)]['pipe'](j[_0x195e3(0x135)](0x10))[_0x195e3(0x109)](_0x1021d9=>{const _0x20b88f=_0x195e3,_0x643596=new Set();_0x1021d9[_0x20b88f(0x117)](_0x48d411=>{const _0x57a260=_0x20b88f;switch(_0x48d411[_0x57a260(0x147)]){case _0x57a260(0x168):{const _0x22e78e=_0x48d411[_0x57a260(0x161)][_0x57a260(0x113)];_0x643596[_0x57a260(0x168)](_0x22e78e);break;}}}),R(this[_0x20b88f(0x15c)],_0x643596);}));}[_0x160246(0x107)](){const _0x1304ea=_0x160246;this[_0x1304ea(0x130)](this[_0x1304ea(0x15f)][_0x1304ea(0x122)][_0x1304ea(0x109)](async _0x402da2=>{const _0x2c4b1f=_0x1304ea;var _0x753108,_0x12395b,_0x4d6f6a,_0x4575a1;const _0x1b5e44=(_0x753108=this['_threadCommentModel'][_0x2c4b1f(0xf5)](_0x402da2[_0x2c4b1f(0x144)])[_0x2c4b1f(0x119)](_0x2ca21e=>_0x2ca21e['threadId']===_0x402da2[_0x2c4b1f(0x15e)]))==null?void 0x0:_0x753108['root'];if(!_0x1b5e44)return;const {unitId:_0x134023,subUnitId:_0x149572}=_0x1b5e44;switch(_0x402da2[_0x2c4b1f(0xfa)]&&this[_0x2c4b1f(0x164)][_0x2c4b1f(0xf6)](_0x402da2[_0x2c4b1f(0xfa)]),_0x402da2[_0x2c4b1f(0x147)]){case v[_0x2c4b1f(0x112)]:break;case v[_0x2c4b1f(0x104)]:{this['_threadCommentModel'][_0x2c4b1f(0x12a)](_0x134023,_0x149572,{'unitId':_0x134023,'subUnitId':_0x149572,'ref':'','id':_0x402da2[_0x2c4b1f(0x16c)],'dT':f(+_0x402da2[_0x2c4b1f(0x12e)]),'threadId':_0x402da2[_0x2c4b1f(0x15e)],'personId':(_0x4d6f6a=(_0x12395b=_0x402da2[_0x2c4b1f(0xfa)])==null?void 0x0:_0x12395b[_0x2c4b1f(0x13a)])!=null?_0x4d6f6a:_0x402da2[_0x2c4b1f(0x159)],'text':JSON[_0x2c4b1f(0x145)](_0x402da2[_0x2c4b1f(0x14a)]),'parentId':_0x1b5e44['id']});break;}case v[_0x2c4b1f(0x153)]:{const _0x2ead06=this['_threadCommentModel'][_0x2c4b1f(0x12b)](_0x134023,_0x149572,_0x402da2[_0x2c4b1f(0x16c)]);_0x2ead06&&_0x2ead06['parentId']&&this['_threadCommentModel'][_0x2c4b1f(0x108)](_0x134023,_0x149572,_0x402da2[_0x2c4b1f(0x16c)]);break;}case v[_0x2c4b1f(0x118)]:{this[_0x2c4b1f(0xf9)]['updateComment'](_0x134023,_0x149572,{'commentId':_0x402da2[_0x2c4b1f(0x16c)],'text':JSON[_0x2c4b1f(0x145)](_0x402da2[_0x2c4b1f(0x14a)])});break;}case v[_0x2c4b1f(0x10a)]:{const _0x4df749=(_0x4575a1=this[_0x2c4b1f(0xf9)][_0x2c4b1f(0xf5)](_0x402da2[_0x2c4b1f(0x144)])[_0x2c4b1f(0x119)](_0x4fc042=>_0x4fc042[_0x2c4b1f(0x15e)]===_0x402da2['threadId']))==null?void 0x0:_0x4575a1[_0x2c4b1f(0x15d)];_0x4df749&&this['_threadCommentModel'][_0x2c4b1f(0x126)](_0x134023,_0x149572,_0x4df749['id'],_0x402da2['solved']===I[_0x2c4b1f(0x143)]);break;}}}));}};_=E([S(0x0,c[_0x160246(0x102)](b[_0x160246(0x13d)])),S(0x1,c[_0x160246(0x102)](M[_0x160246(0x152)])),S(0x2,c[_0x160246(0x102)](c[_0x160246(0x157)])),S(0x3,c[_0x160246(0x102)](c[_0x160246(0x14d)]))],_);const q=_0x160246(0x129),D={};var A=Object[_0x160246(0x103)],x=(_0x1ec01f,_0xc38319,_0x169307,_0x5e68c3)=>{const _0xdebd9b=_0x160246;for(var _0x307573=_0x5e68c3>0x1?void 0x0:_0x5e68c3?A(_0xc38319,_0x169307):_0xc38319,_0x2a5695=_0x1ec01f[_0xdebd9b(0x14e)]-0x1,_0x2512fb;_0x2a5695>=0x0;_0x2a5695--)(_0x2512fb=_0x1ec01f[_0x2a5695])&&(_0x307573=_0x2512fb(_0x307573)||_0x307573);return _0x307573;},C=(_0x4c2b06,_0x40bcb8)=>(_0x87b131,_0x36de04)=>_0x40bcb8(_0x87b131,_0x36de04,_0x4c2b06);function Y(_0x570d27,_0x39bf6b){const _0x2b7c70=_0x160246,_0x32463f=_0x570d27[_0x2b7c70(0x149)][0x0];return{..._0x39bf6b,'id':_0x32463f[_0x2b7c70(0x16c)],'resolved':_0x570d27[_0x2b7c70(0x11e)]===0x1,'dT':f(_0x32463f[_0x2b7c70(0x12e)]),'personId':_0x32463f[_0x2b7c70(0x159)],'threadId':_0x32463f['threadId']};}function G(_0x16b94f,_0x554507,_0x3c79c1){const _0x28468e=_0x160246;var _0x50fef3,_0x1a48c0;if(((_0x1a48c0=(_0x50fef3=_0x16b94f==null?void 0x0:_0x16b94f[_0x28468e(0x149)])==null?void 0x0:_0x50fef3[_0x28468e(0x14e)])!=null?_0x1a48c0:0x0)>0x0){const _0x622544=(_0x3d1ba6,_0x3e2b1c)=>({'id':_0x3d1ba6[_0x28468e(0x16c)],'threadId':_0x3d1ba6['threadId'],'dT':f(_0x3d1ba6[_0x28468e(0x12e)]),'personId':_0x3d1ba6[_0x28468e(0x159)],'resolved':_0x16b94f['solved']===I['Solved'],'unitId':_0x554507,'subUnitId':_0x3c79c1,'text':JSON[_0x28468e(0x145)](_0x3d1ba6['content']),'parentId':_0x3e2b1c}),_0x272e06=_0x622544(_0x16b94f[_0x28468e(0x149)][0x0]);return{..._0x272e06,'children':_0x16b94f['replies']['slice'](0x1)[_0x28468e(0x158)](_0x34207f=>_0x622544(_0x34207f,_0x272e06['id']))};}return null;}let p=class{constructor(_0x27ddbd,_0xbc92a3,_0x49c3eb){const _0x2c19f0=_0x160246;this[_0x2c19f0(0x13e)]=_0x27ddbd,this[_0x2c19f0(0x164)]=_0xbc92a3,this[_0x2c19f0(0x131)]=_0x49c3eb;}async[_0x160246(0x12a)](_0x56da60){const _0xe59f3e=_0x160246;var _0x1003cc,_0x5e12d9;const {parentId:_0x3f8470,unitId:_0x4ae093,text:_0x16b997,threadId:_0x581270}=_0x56da60,_0x457696=(_0x5e12d9=(_0x1003cc=_0x16b997[_0xe59f3e(0x100)])==null?void 0x0:_0x1003cc[_0xe59f3e(0xfb)](_0x27b806=>_0x27b806[_0xe59f3e(0x111)]===c[_0xe59f3e(0x155)][_0xe59f3e(0x154)])[_0xe59f3e(0x158)](_0x357565=>_0x357565[_0xe59f3e(0x123)]))!=null?_0x5e12d9:[],_0x449f9d=JSON[_0xe59f3e(0x13f)](_0x16b997),_0x39811f=(await this[_0xe59f3e(0x131)][_0xe59f3e(0x134)](_0x4ae093))['getMemberID']();if(_0x3f8470){const _0x388c66={'memberId':_0x39811f,'unitId':_0x4ae093,'content':_0x449f9d,'mention':_0x457696,'threadId':_0x581270},_0x4632fc=(await this[_0xe59f3e(0x13e)][_0xe59f3e(0x169)](_0xe59f3e(0x14c)+_0x4ae093+_0xe59f3e(0x11b),{'body':_0x388c66}))['body'][_0xe59f3e(0x12d)];return{..._0x56da60,'id':_0x4632fc[_0xe59f3e(0x16c)],'dT':c[_0xe59f3e(0x13b)](+_0x4632fc[_0xe59f3e(0x12e)])['format'](_0xe59f3e(0x140)),'personId':_0x4632fc[_0xe59f3e(0x159)]};}else{const _0x267375={'memberId':_0x39811f,'unitId':_0x4ae093,'content':_0x449f9d,'mention':_0x457696},_0x4219b8=await this[_0xe59f3e(0x13e)][_0xe59f3e(0x169)](_0xe59f3e(0x14c)+_0x4ae093+'/add',{'body':_0x267375});return Y(_0x4219b8['body'][_0xe59f3e(0xfc)],_0x56da60);}}async['updateComment'](_0x499448){const _0x4f9f48=_0x160246;var _0x412d94,_0x13fad7;const {text:_0x126f1a,unitId:_0x5e1a7a}=_0x499448,_0x2a0476=(_0x13fad7=(_0x412d94=_0x126f1a['customRanges'])==null?void 0x0:_0x412d94['filter'](_0x3ab46d=>_0x3ab46d[_0x4f9f48(0x111)]===c[_0x4f9f48(0x155)][_0x4f9f48(0x154)])[_0x4f9f48(0x158)](_0x51f620=>_0x51f620[_0x4f9f48(0x123)]))!=null?_0x13fad7:[],_0x2af9c6=JSON[_0x4f9f48(0x13f)](_0x126f1a),_0x1a61f2=_0x499448[_0x4f9f48(0x15e)],_0x238735=_0x499448['id'],_0x50cff9={'memberId':(await this[_0x4f9f48(0x131)][_0x4f9f48(0x134)](_0x5e1a7a))[_0x4f9f48(0x12c)](),'unitId':_0x5e1a7a,'threadId':_0x1a61f2,'mention':_0x2a0476,'content':_0x2af9c6,'replyId':_0x238735},_0x2b6c78=await this[_0x4f9f48(0x13e)]['post'](_0x4f9f48(0x14c)+_0x5e1a7a+'/edit',{'body':_0x50cff9});return!_0x2b6c78[_0x4f9f48(0x138)][_0x4f9f48(0x165)]||_0x2b6c78[_0x4f9f48(0x138)][_0x4f9f48(0x165)][_0x4f9f48(0x15a)]===0x1;}async[_0x160246(0x126)](_0x1643f1){const _0x8b7900=_0x160246,{unitId:_0x66fde4}=_0x1643f1,_0xa4ca85=_0x1643f1[_0x8b7900(0x15e)],_0x329331={'memberId':this[_0x8b7900(0x164)][_0x8b7900(0x106)]()[_0x8b7900(0x13a)],'unitId':_0x66fde4,'threadId':_0xa4ca85,'solved':_0x1643f1[_0x8b7900(0x11c)]?I[_0x8b7900(0x143)]:I[_0x8b7900(0x127)]},_0x451097=await this[_0x8b7900(0x13e)]['post']('/universer-api/comment/unit/'+_0x66fde4+_0x8b7900(0x10f),{'body':_0x329331});return!_0x451097['body'][_0x8b7900(0x165)]||_0x451097[_0x8b7900(0x138)][_0x8b7900(0x165)]['code']===0x1;}async['deleteComment'](_0x3c44c4,_0x215a73,_0x4d7dea,_0x59fb20){const _0x5b875b=_0x160246,_0x133097={'memberId':(await this[_0x5b875b(0x131)][_0x5b875b(0x134)](_0x3c44c4))[_0x5b875b(0x12c)](),'threadId':_0x4d7dea,'replyId':_0x59fb20,'unitId':_0x3c44c4},_0x4a0e85=await this[_0x5b875b(0x13e)][_0x5b875b(0x169)](_0x5b875b(0x14c)+_0x3c44c4+_0x5b875b(0x14b),{'body':_0x133097});return!_0x4a0e85[_0x5b875b(0x138)][_0x5b875b(0x165)]||_0x4a0e85[_0x5b875b(0x138)][_0x5b875b(0x165)][_0x5b875b(0x15a)]===0x1;}async[_0x160246(0x14f)](_0x19aa03,_0x1585b0,_0x4a1dcd){const _0x58dfaa=_0x160246,_0x42f6b0={'unitId':_0x19aa03,'threadId':_0x4a1dcd},_0x483f2d=await this[_0x58dfaa(0x13e)][_0x58dfaa(0x169)](_0x58dfaa(0x14c)+_0x19aa03+'/list',{'body':_0x42f6b0}),_0x3edb62=_0x4a1dcd[_0x58dfaa(0x158)](_0x5b389f=>G(_0x483f2d[_0x58dfaa(0x138)]['comments'][_0x5b389f],_0x19aa03,_0x1585b0))[_0x58dfaa(0xfb)](Boolean);return Object['values'](_0x483f2d['body'][_0x58dfaa(0x136)])[_0x58dfaa(0x117)](_0x445022=>{const _0x217882=_0x58dfaa;this[_0x217882(0x164)]['addUser'](_0x445022);}),_0x3edb62;}['saveCommentToSnapshot'](_0x5a946f){return{'id':_0x5a946f['id'],'threadId':_0x5a946f['threadId'],'ref':_0x5a946f['ref']};}};function _0x14ee(_0x23d1bd,_0xadf7ec){const _0x5966b0=_0x5966();return _0x14ee=function(_0x14eeaa,_0x4d9861){_0x14eeaa=_0x14eeaa-0xf5;let _0x135ea2=_0x5966b0[_0x14eeaa];return _0x135ea2;},_0x14ee(_0x23d1bd,_0xadf7ec);}p=x([C(0x0,c[_0x160246(0x102)](P[_0x160246(0x11f)])),C(0x1,c[_0x160246(0x102)](c[_0x160246(0x157)])),C(0x2,c[_0x160246(0x102)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5923bc,_0xea9f63,_0x27de2c,_0x3adc75)=>{const _0x2b377e=_0x160246;for(var _0x23e196=_0x3adc75>0x1?void 0x0:_0x3adc75?H(_0xea9f63,_0x27de2c):_0xea9f63,_0x22e8db=_0x5923bc[_0x2b377e(0x14e)]-0x1,_0x3de8e8;_0x22e8db>=0x0;_0x22e8db--)(_0x3de8e8=_0x5923bc[_0x22e8db])&&(_0x23e196=_0x3de8e8(_0x23e196)||_0x23e196);return _0x23e196;},y=(_0x582289,_0x289416)=>(_0x4d3c00,_0x45c004)=>_0x289416(_0x4d3c00,_0x45c004,_0x582289);let g=class extends c[_0x160246(0x116)]{constructor(_0x2378d9,_0x3dcf47){const _0x7127c0=_0x160246;super(),this[_0x7127c0(0x156)]=_0x2378d9,this[_0x7127c0(0x114)]=_0x3dcf47,this['_initDataSource']();}['_initDataSource'](){const _0x27e22f=_0x160246;this[_0x27e22f(0x156)][_0x27e22f(0xf8)]=this[_0x27e22f(0x114)],this[_0x27e22f(0x156)][_0x27e22f(0x142)]=!0x1;}};g=J([y(0x0,M[_0x160246(0x139)]),y(0x1,c[_0x160246(0x102)](p))],g);var F=Object[_0x160246(0x160)],L=Object[_0x160246(0x103)],Z=(_0x4272d3,_0x57b29e,_0x488d69)=>_0x57b29e in _0x4272d3?F(_0x4272d3,_0x57b29e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x488d69}):_0x4272d3[_0x57b29e]=_0x488d69,W=(_0x34eaac,_0x6f1155,_0xd62a72,_0x24da76)=>{for(var _0x24d431=_0x24da76>0x1?void 0x0:_0x24da76?L(_0x6f1155,_0xd62a72):_0x6f1155,_0x4ec8bf=_0x34eaac['length']-0x1,_0x2b1113;_0x4ec8bf>=0x0;_0x4ec8bf--)(_0x2b1113=_0x34eaac[_0x4ec8bf])&&(_0x24d431=_0x2b1113(_0x24d431)||_0x24d431);return _0x24d431;},O=(_0x77ed69,_0x2a6b7d)=>(_0x3720f8,_0x2c2e10)=>_0x2a6b7d(_0x3720f8,_0x2c2e10,_0x77ed69),N=(_0x3b095b,_0x5e00dd,_0x10ae7d)=>Z(_0x3b095b,typeof _0x5e00dd!='symbol'?_0x5e00dd+'':_0x5e00dd,_0x10ae7d);exports[_0x160246(0x110)]=class extends c[_0x160246(0x13c)]{constructor(_0x1fbddb=D,_0x1bc861,_0x3bbd8d){const _0x4cb4f9=_0x160246;super(),this[_0x4cb4f9(0xfd)]=_0x1fbddb,this[_0x4cb4f9(0x15c)]=_0x1bc861,this[_0x4cb4f9(0x120)]=_0x3bbd8d;const {..._0x4387ab}=c[_0x4cb4f9(0x128)]({},D,this[_0x4cb4f9(0xfd)]);this[_0x4cb4f9(0x120)][_0x4cb4f9(0x166)](q,_0x4387ab);}[_0x160246(0x10d)](){const _0x41b1b0=_0x160246;[[p],[g],[_]][_0x41b1b0(0x117)](_0x198228=>{const _0x4b00ca=_0x41b1b0;this[_0x4b00ca(0x15c)][_0x4b00ca(0x168)](_0x198228);});}[_0x160246(0x11a)](){const _0x29ea0c=_0x160246;this[_0x29ea0c(0x15c)][_0x29ea0c(0x11d)](g),this[_0x29ea0c(0x15c)][_0x29ea0c(0x11d)](_);}},N(exports[_0x160246(0x110)],_0x160246(0x10e),U),N(exports[_0x160246(0x110)],_0x160246(0x147),c[_0x160246(0x101)]['UNIVER_UNKNOWN']),exports[_0x160246(0x110)]=W([c[_0x160246(0x132)](w[_0x160246(0x15b)],b[_0x160246(0xfe)],T[_0x160246(0x162)]),O(0x1,c[_0x160246(0x102)](c[_0x160246(0x14d)])),O(0x2,c[_0x160246(0x150)])],exports[_0x160246(0x110)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2eef12=_0x3ac0;(function(_0x5ca0be,_0x2b8dc5){const _0x414b43=_0x3ac0,_0x1e144e=_0x5ca0be();while(!![]){try{const _0x971d3=-parseInt(_0x414b43(0xea))/0x1+parseInt(_0x414b43(0x13e))/0x2*(parseInt(_0x414b43(0x106))/0x3)+-parseInt(_0x414b43(0x112))/0x4*(-parseInt(_0x414b43(0x10e))/0x5)+-parseInt(_0x414b43(0xe7))/0x6*(-parseInt(_0x414b43(0xff))/0x7)+parseInt(_0x414b43(0x10b))/0x8+-parseInt(_0x414b43(0xe0))/0x9+-parseInt(_0x414b43(0x10f))/0xa;if(_0x971d3===_0x2b8dc5)break;else _0x1e144e['push'](_0x1e144e['shift']());}catch(_0x46d877){_0x1e144e['push'](_0x1e144e['shift']());}}}(_0x111e,0xec664));import{CommentService as _0x2bbc6d,CollaborationSessionService as _0x4c7cf5,UniverCollaborationClientPlugin as _0x38e73d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5bd1f2}from'@univerjs-pro/license';import{dayjs as _0x2dfe01,UserManagerService as _0x3bcf6d,Inject as _0x51f539,Injector as _0x49a014,Disposable as _0x1eadb0,CustomRangeType as _0x4e5a59,UniverInstanceType as _0x5ae215,DependentOn as _0x53b593,IConfigService as _0x3d287c,Plugin as _0xe80fdb,merge as _0x40caf7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x367b4a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x193832,IThreadCommentDataSourceService as _0x1dee9e}from'@univerjs/thread-comment';import{bufferTime as _0x524005}from'rxjs';import{HTTPService as _0x54e875}from'@univerjs/network';function _0x3ac0(_0x11d5f2,_0x56cf98){const _0x111e49=_0x111e();return _0x3ac0=function(_0x3ac0ad,_0x3d0e6c){_0x3ac0ad=_0x3ac0ad-0xdb;let _0x3dc94f=_0x111e49[_0x3ac0ad];return _0x3dc94f;},_0x3ac0(_0x11d5f2,_0x56cf98);}const W=_0x2eef12(0x13b);var I=(_0x1ab049=>(_0x1ab049[_0x1ab049[_0x2eef12(0x135)]=0x0]=_0x2eef12(0x135),_0x1ab049[_0x1ab049[_0x2eef12(0xe5)]=0x1]=_0x2eef12(0xe5),_0x1ab049[_0x1ab049['UNRECOGNIZED']=-0x1]=_0x2eef12(0xfb),_0x1ab049))(I||{}),v=(_0x4b1549=>(_0x4b1549[_0x4b1549[_0x2eef12(0x128)]=0x0]=_0x2eef12(0x128),_0x4b1549[_0x4b1549[_0x2eef12(0xed)]=0x1]='Add',_0x4b1549[_0x4b1549['Reply']=0x2]=_0x2eef12(0x129),_0x4b1549[_0x4b1549['Edit']=0x3]=_0x2eef12(0x102),_0x4b1549[_0x4b1549['Delete']=0x4]='Delete',_0x4b1549[_0x4b1549[_0x2eef12(0x138)]=0x5]='Solve',_0x4b1549[_0x4b1549[_0x2eef12(0xfb)]=-0x1]=_0x2eef12(0xfb),_0x4b1549))(v||{});const y=_0x60b238=>_0x2dfe01(new Date(+_0x60b238))[_0x2eef12(0x104)](_0x2eef12(0x13c)),B=async(_0x508834,_0x31b81e)=>{const _0x1dba0a=_0x2eef12,_0x2b0816=_0x508834[_0x1dba0a(0x121)](_0x3bcf6d),_0x772615=_0x508834[_0x1dba0a(0x121)](_0x54e875);_0x31b81e[_0x1dba0a(0xee)](_0x12fec9=>{const _0x3dbe18=_0x1dba0a;_0x2b0816[_0x3dbe18(0xeb)](_0x12fec9)&&_0x31b81e['delete'](_0x12fec9);}),_0x31b81e[_0x1dba0a(0xe2)]&&(await _0x772615[_0x1dba0a(0x121)](_0x1dba0a(0x11d),{'params':{'userIDs':[..._0x31b81e]}}))[_0x1dba0a(0xf4)]['users']['forEach'](_0x205e6b=>{const _0x26bc37=_0x1dba0a;_0x205e6b&&_0x2b0816[_0x26bc37(0xf2)](_0x205e6b);});};var K=Object[_0x2eef12(0x101)],V=(_0x5e3d73,_0xeaaff0,_0x5157e4,_0x1c8c39)=>{for(var _0x439cce=_0x1c8c39>0x1?void 0x0:_0x1c8c39?K(_0xeaaff0,_0x5157e4):_0xeaaff0,_0xf25f98=_0x5e3d73['length']-0x1,_0x33acc9;_0xf25f98>=0x0;_0xf25f98--)(_0x33acc9=_0x5e3d73[_0xf25f98])&&(_0x439cce=_0x33acc9(_0x439cce)||_0x439cce);return _0x439cce;},p=(_0x879671,_0x110246)=>(_0x54cd6a,_0x15b714)=>_0x110246(_0x54cd6a,_0x15b714,_0x879671);let _=class extends _0x1eadb0{constructor(_0x2324b3,_0x2a384c,_0x3a84e5,_0xf109bb){const _0x32bb24=_0x2eef12;super(),this[_0x32bb24(0x117)]=_0x2324b3,this[_0x32bb24(0x103)]=_0x2a384c,this['_userService']=_0x3a84e5,this[_0x32bb24(0xdd)]=_0xf109bb,this['_init'](),this['_initUserSync']();}[_0x2eef12(0xf7)](){const _0x2dd98f=_0x2eef12;this[_0x2dd98f(0x139)](this[_0x2dd98f(0x103)][_0x2dd98f(0x11b)]['pipe'](_0x524005(0x10))[_0x2dd98f(0x122)](_0x5d281e=>{const _0xf48a40=_0x2dd98f,_0x541d5a=new Set();_0x5d281e['forEach'](_0x91f8f6=>{const _0x3eb865=_0x3ac0;switch(_0x91f8f6[_0x3eb865(0xfa)]){case _0x3eb865(0x114):{const _0x4bbd64=_0x91f8f6[_0x3eb865(0xe6)][_0x3eb865(0x11c)];_0x541d5a[_0x3eb865(0x114)](_0x4bbd64);break;}}}),B(this[_0xf48a40(0xdd)],_0x541d5a);}));}['_init'](){const _0x234fe9=_0x2eef12;this[_0x234fe9(0x139)](this['_commentService']['commentUpdate$'][_0x234fe9(0x122)](async _0x1abff3=>{const _0xf62c7=_0x234fe9;var _0x38eb0e,_0x5d1dcf,_0x5f0374,_0x2ad4ea;const _0x1c1d1b=(_0x38eb0e=this[_0xf62c7(0x103)][_0xf62c7(0x126)](_0x1abff3['unitId'])[_0xf62c7(0xe4)](_0x5746b8=>_0x5746b8['threadId']===_0x1abff3['threadId']))==null?void 0x0:_0x38eb0e[_0xf62c7(0x132)];if(!_0x1c1d1b)return;const {unitId:_0x1e9c09,subUnitId:_0x3b51a3}=_0x1c1d1b;switch(_0x1abff3[_0xf62c7(0x111)]&&this[_0xf62c7(0x12f)]['addUser'](_0x1abff3['user']),_0x1abff3['type']){case v[_0xf62c7(0xed)]:break;case v['Reply']:{this[_0xf62c7(0x103)][_0xf62c7(0x11a)](_0x1e9c09,_0x3b51a3,{'unitId':_0x1e9c09,'subUnitId':_0x3b51a3,'ref':'','id':_0x1abff3[_0xf62c7(0x100)],'dT':y(+_0x1abff3['createTimestamp']),'threadId':_0x1abff3[_0xf62c7(0x108)],'personId':(_0x5f0374=(_0x5d1dcf=_0x1abff3[_0xf62c7(0x111)])==null?void 0x0:_0x5d1dcf[_0xf62c7(0xe1)])!=null?_0x5f0374:_0x1abff3[_0xf62c7(0xf6)],'text':JSON[_0xf62c7(0x124)](_0x1abff3[_0xf62c7(0xf8)]),'parentId':_0x1c1d1b['id']});break;}case v['Delete']:{const _0x5deb2e=this[_0xf62c7(0x103)]['getComment'](_0x1e9c09,_0x3b51a3,_0x1abff3[_0xf62c7(0x100)]);_0x5deb2e&&_0x5deb2e[_0xf62c7(0xdb)]&&this['_threadCommentModel'][_0xf62c7(0x12b)](_0x1e9c09,_0x3b51a3,_0x1abff3[_0xf62c7(0x100)]);break;}case v[_0xf62c7(0x102)]:{this[_0xf62c7(0x103)][_0xf62c7(0x10c)](_0x1e9c09,_0x3b51a3,{'commentId':_0x1abff3['replyId'],'text':JSON[_0xf62c7(0x124)](_0x1abff3[_0xf62c7(0xf8)])});break;}case v[_0xf62c7(0x138)]:{const _0x2e9546=(_0x2ad4ea=this[_0xf62c7(0x103)][_0xf62c7(0x126)](_0x1abff3[_0xf62c7(0xde)])['find'](_0x256b9d=>_0x256b9d[_0xf62c7(0x108)]===_0x1abff3[_0xf62c7(0x108)]))==null?void 0x0:_0x2ad4ea[_0xf62c7(0x132)];_0x2e9546&&this[_0xf62c7(0x103)][_0xf62c7(0x116)](_0x1e9c09,_0x3b51a3,_0x2e9546['id'],_0x1abff3[_0xf62c7(0x119)]===I[_0xf62c7(0xe5)]);break;}}}));}};_=V([p(0x0,_0x51f539(_0x2bbc6d)),p(0x1,_0x51f539(_0x193832)),p(0x2,_0x51f539(_0x3bcf6d)),p(0x3,_0x51f539(_0x49a014))],_);const z=_0x2eef12(0x120),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x27325c,_0xe953a8,_0x47a3e9,_0x439068)=>{const _0x4f65c2=_0x2eef12;for(var _0x184b19=_0x439068>0x1?void 0x0:_0x439068?k(_0xe953a8,_0x47a3e9):_0xe953a8,_0x501084=_0x27325c[_0x4f65c2(0xe8)]-0x1,_0x3a1557;_0x501084>=0x0;_0x501084--)(_0x3a1557=_0x27325c[_0x501084])&&(_0x184b19=_0x3a1557(_0x184b19)||_0x184b19);return _0x184b19;},b=(_0x2f413d,_0x56dd3c)=>(_0x31b201,_0x2f31d5)=>_0x56dd3c(_0x31b201,_0x2f31d5,_0x2f413d);function X(_0x1881cc,_0x2508e7){const _0x27e537=_0x2eef12,_0x1cb7ad=_0x1881cc['replies'][0x0];return{..._0x2508e7,'id':_0x1cb7ad[_0x27e537(0x100)],'resolved':_0x1881cc['solved']===0x1,'dT':y(_0x1cb7ad[_0x27e537(0x12c)]),'personId':_0x1cb7ad[_0x27e537(0xf6)],'threadId':_0x1cb7ad[_0x27e537(0x108)]};}function ee(_0x30345f,_0x5d14e6,_0x29c5e9){const _0x15f6d8=_0x2eef12;var _0x3296b8,_0x3e37cc;if(((_0x3e37cc=(_0x3296b8=_0x30345f==null?void 0x0:_0x30345f[_0x15f6d8(0x110)])==null?void 0x0:_0x3296b8[_0x15f6d8(0xe8)])!=null?_0x3e37cc:0x0)>0x0){const _0x3d0eb2=(_0x3de5e0,_0x3e3c0e)=>({'id':_0x3de5e0[_0x15f6d8(0x100)],'threadId':_0x3de5e0[_0x15f6d8(0x108)],'dT':y(_0x3de5e0['createTimestamp']),'personId':_0x3de5e0[_0x15f6d8(0xf6)],'resolved':_0x30345f[_0x15f6d8(0x119)]===I['Solved'],'unitId':_0x5d14e6,'subUnitId':_0x29c5e9,'text':JSON['parse'](_0x3de5e0[_0x15f6d8(0xf8)]),'parentId':_0x3e3c0e}),_0x5287c5=_0x3d0eb2(_0x30345f[_0x15f6d8(0x110)][0x0]);return{..._0x5287c5,'children':_0x30345f['replies'][_0x15f6d8(0xf5)](0x1)[_0x15f6d8(0x12d)](_0x17ecc9=>_0x3d0eb2(_0x17ecc9,_0x5287c5['id']))};}return null;}let S=class{constructor(_0x371eaf,_0x4950cc,_0x1edbe8){const _0x2b98a2=_0x2eef12;this['_httpService']=_0x371eaf,this['_userService']=_0x4950cc,this[_0x2b98a2(0xf1)]=_0x1edbe8;}async[_0x2eef12(0x11a)](_0x539520){const _0x449397=_0x2eef12;var _0x5b6290,_0x41ebac;const {parentId:_0x34d7c1,unitId:_0x1e0bf6,text:_0x3de7a0,threadId:_0x44b6ac}=_0x539520,_0x218135=(_0x41ebac=(_0x5b6290=_0x3de7a0[_0x449397(0x127)])==null?void 0x0:_0x5b6290[_0x449397(0x12e)](_0xeb03c5=>_0xeb03c5[_0x449397(0x118)]===_0x4e5a59[_0x449397(0x115)])[_0x449397(0x12d)](_0x1e2d79=>_0x1e2d79['rangeId']))!=null?_0x41ebac:[],_0xecfe3b=JSON['stringify'](_0x3de7a0),_0x4eb734=(await this[_0x449397(0xf1)][_0x449397(0x136)](_0x1e0bf6))[_0x449397(0x125)]();if(_0x34d7c1){const _0x3196d0={'memberId':_0x4eb734,'unitId':_0x1e0bf6,'content':_0xecfe3b,'mention':_0x218135,'threadId':_0x44b6ac},_0x3c26c2=(await this['_httpService'][_0x449397(0x107)](_0x449397(0xef)+_0x1e0bf6+_0x449397(0x13d),{'body':_0x3196d0}))[_0x449397(0xf4)][_0x449397(0xf0)];return{..._0x539520,'id':_0x3c26c2[_0x449397(0x100)],'dT':_0x2dfe01(+_0x3c26c2[_0x449397(0x12c)])['format'](_0x449397(0x13c)),'personId':_0x3c26c2[_0x449397(0xf6)]};}else{const _0x399c08={'memberId':_0x4eb734,'unitId':_0x1e0bf6,'content':_0xecfe3b,'mention':_0x218135},_0x205333=await this[_0x449397(0xdc)]['post'](_0x449397(0xef)+_0x1e0bf6+_0x449397(0xdf),{'body':_0x399c08});return X(_0x205333[_0x449397(0xf4)][_0x449397(0x130)],_0x539520);}}async[_0x2eef12(0x10c)](_0x5c4d24){const _0x525802=_0x2eef12;var _0x366846,_0x123baa;const {text:_0x24e764,unitId:_0x500704}=_0x5c4d24,_0x34e149=(_0x123baa=(_0x366846=_0x24e764[_0x525802(0x127)])==null?void 0x0:_0x366846[_0x525802(0x12e)](_0x408829=>_0x408829['rangeType']===_0x4e5a59[_0x525802(0x115)])[_0x525802(0x12d)](_0x12e554=>_0x12e554['rangeId']))!=null?_0x123baa:[],_0x6f6cb3=JSON['stringify'](_0x24e764),_0x421b3f=_0x5c4d24[_0x525802(0x108)],_0x32006a=_0x5c4d24['id'],_0x252b56={'memberId':(await this[_0x525802(0xf1)][_0x525802(0x136)](_0x500704))[_0x525802(0x125)](),'unitId':_0x500704,'threadId':_0x421b3f,'mention':_0x34e149,'content':_0x6f6cb3,'replyId':_0x32006a},_0x533c0a=await this[_0x525802(0xdc)][_0x525802(0x107)](_0x525802(0xef)+_0x500704+_0x525802(0x137),{'body':_0x252b56});return!_0x533c0a['body'][_0x525802(0x10d)]||_0x533c0a[_0x525802(0xf4)][_0x525802(0x10d)][_0x525802(0x113)]===0x1;}async[_0x2eef12(0x116)](_0x17e069){const _0x30e4c5=_0x2eef12,{unitId:_0x12dad1}=_0x17e069,_0x4b2679=_0x17e069[_0x30e4c5(0x108)],_0x4d06a8={'memberId':this[_0x30e4c5(0x12f)]['getCurrentUser']()[_0x30e4c5(0xe1)],'unitId':_0x12dad1,'threadId':_0x4b2679,'solved':_0x17e069[_0x30e4c5(0x10a)]?I['Solved']:I[_0x30e4c5(0x135)]},_0x3198f2=await this[_0x30e4c5(0xdc)][_0x30e4c5(0x107)](_0x30e4c5(0xef)+_0x12dad1+'/solved',{'body':_0x4d06a8});return!_0x3198f2['body'][_0x30e4c5(0x10d)]||_0x3198f2['body'][_0x30e4c5(0x10d)]['code']===0x1;}async[_0x2eef12(0x12b)](_0x4bcd83,_0x47462a,_0x28c60a,_0x399abc){const _0x10e6c8=_0x2eef12,_0x292d40={'memberId':(await this[_0x10e6c8(0xf1)][_0x10e6c8(0x136)](_0x4bcd83))[_0x10e6c8(0x125)](),'threadId':_0x28c60a,'replyId':_0x399abc,'unitId':_0x4bcd83},_0x207519=await this[_0x10e6c8(0xdc)]['post'](_0x10e6c8(0xef)+_0x4bcd83+_0x10e6c8(0x109),{'body':_0x292d40});return!_0x207519[_0x10e6c8(0xf4)][_0x10e6c8(0x10d)]||_0x207519[_0x10e6c8(0xf4)][_0x10e6c8(0x10d)]['code']===0x1;}async[_0x2eef12(0x13a)](_0x55e5c0,_0x10269b,_0x16efc1){const _0x653a62=_0x2eef12,_0x47181f={'unitId':_0x55e5c0,'threadId':_0x16efc1},_0x2daaaf=await this[_0x653a62(0xdc)]['post'](_0x653a62(0xef)+_0x55e5c0+'/list',{'body':_0x47181f}),_0x6c74d5=_0x16efc1[_0x653a62(0x12d)](_0x449910=>ee(_0x2daaaf[_0x653a62(0xf4)]['comments'][_0x449910],_0x55e5c0,_0x10269b))[_0x653a62(0x12e)](Boolean);return Object[_0x653a62(0xe3)](_0x2daaaf['body'][_0x653a62(0xfe)])[_0x653a62(0xee)](_0x119520=>{this['_userService']['addUser'](_0x119520);}),_0x6c74d5;}['saveCommentToSnapshot'](_0x5cb793){const _0x66a7cf=_0x2eef12;return{'id':_0x5cb793['id'],'threadId':_0x5cb793[_0x66a7cf(0x108)],'ref':_0x5cb793[_0x66a7cf(0xe9)]};}};S=Q([b(0x0,_0x51f539(_0x54e875)),b(0x1,_0x51f539(_0x3bcf6d)),b(0x2,_0x51f539(_0x4c7cf5))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x7afbd8,_0x56525e,_0xd4e74e,_0x4ee1a5)=>{const _0xae2314=_0x2eef12;for(var _0x22780c=_0x4ee1a5>0x1?void 0x0:_0x4ee1a5?re(_0x56525e,_0xd4e74e):_0x56525e,_0x415570=_0x7afbd8[_0xae2314(0xe8)]-0x1,_0x20b5ba;_0x415570>=0x0;_0x415570--)(_0x20b5ba=_0x7afbd8[_0x415570])&&(_0x22780c=_0x20b5ba(_0x22780c)||_0x22780c);return _0x22780c;},M=(_0x1ac234,_0x5d7904)=>(_0x3ea6b7,_0x1ad0e1)=>_0x5d7904(_0x3ea6b7,_0x1ad0e1,_0x1ac234);let f=class extends _0x1eadb0{constructor(_0x19dc4e,_0x5a2f3b){const _0x4cff36=_0x2eef12;super(),this[_0x4cff36(0xfd)]=_0x19dc4e,this[_0x4cff36(0x134)]=_0x5a2f3b,this[_0x4cff36(0x105)]();}[_0x2eef12(0x105)](){const _0x1742c3=_0x2eef12;this[_0x1742c3(0xfd)][_0x1742c3(0xec)]=this[_0x1742c3(0x134)],this['_threadCommentDataSourceService'][_0x1742c3(0x123)]=!0x1;}};f=te([M(0x0,_0x1dee9e),M(0x1,_0x51f539(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4b5816,_0x18a23e,_0x39c7fc)=>_0x18a23e in _0x4b5816?se(_0x4b5816,_0x18a23e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fc}):_0x4b5816[_0x18a23e]=_0x39c7fc,ie=(_0x2fa9cf,_0x78042b,_0x69de72,_0x397a07)=>{for(var _0x5c6502=_0x397a07>0x1?void 0x0:_0x397a07?oe(_0x78042b,_0x69de72):_0x78042b,_0x10cb54=_0x2fa9cf['length']-0x1,_0x7b69fa;_0x10cb54>=0x0;_0x10cb54--)(_0x7b69fa=_0x2fa9cf[_0x10cb54])&&(_0x5c6502=_0x7b69fa(_0x5c6502)||_0x5c6502);return _0x5c6502;},N=(_0x124bf4,_0x3ea5a9)=>(_0x58d478,_0x4fa8f7)=>_0x3ea5a9(_0x58d478,_0x4fa8f7,_0x124bf4),$=(_0x13c247,_0x4bc98b,_0x127fdf)=>ne(_0x13c247,typeof _0x4bc98b!=_0x2eef12(0x11e)?_0x4bc98b+'':_0x4bc98b,_0x127fdf);let g=class extends _0xe80fdb{constructor(_0x57d708=O,_0x456968,_0x2d789e){const _0x466ac4=_0x2eef12;super(),this[_0x466ac4(0xf3)]=_0x57d708,this['_injector']=_0x456968,this[_0x466ac4(0x133)]=_0x2d789e;const {..._0x245b00}=_0x40caf7({},O,this[_0x466ac4(0xf3)]);this[_0x466ac4(0x133)][_0x466ac4(0x11f)](z,_0x245b00);}[_0x2eef12(0xf9)](){const _0x4073f1=_0x2eef12;[[S],[f],[_]][_0x4073f1(0xee)](_0x23040c=>{const _0x1e4190=_0x4073f1;this[_0x1e4190(0xdd)][_0x1e4190(0x114)](_0x23040c);});}[_0x2eef12(0xfc)](){const _0xd7ebcc=_0x2eef12;this[_0xd7ebcc(0xdd)][_0xd7ebcc(0x121)](f),this[_0xd7ebcc(0xdd)]['get'](_);}};function _0x111e(){const _0x16d291=['payload','6zByaOw','length','ref','1098069nXmtDP','getUser','dataSource','Add','forEach','/universer-api/comment/unit/','reply','_sessionService','addUser','_config','body','slice','userId','_initUserSync','content','onStarting','type','UNRECOGNIZED','onReady','_threadCommentDataSourceService','users','12539086cDQBTk','replyId','getOwnPropertyDescriptor','Edit','_threadCommentModel','format','_initDataSource','3dPAhNq','post','threadId','/delete','resolved','15369312RKLAbO','updateComment','error','20qJHMmJ','12730090RHcqBC','replies','user','1050352uZbMPH','code','add','COMMENT','resolveComment','_commentService','rangeType','solved','addComment','commentUpdate$','personId','/universer-api/user/list','symbol','setConfig','thread-comment-data-source.config','get','subscribe','syncUpdateMutationToColla','parse','getMemberID','getUnit','customRanges','Unknown','Reply','pluginName','deleteComment','createTimestamp','map','filter','_userService','comment','UNIVER_UNKNOWN','root','_configService','_threadCommentDataSource','OpenOrReOpen','requireSession','/edit','Solve','disposeWithMe','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','/reply','499364ULRuPg','parentId','_httpService','_injector','unitId','/add','15058134mMdHIC','userID','size','values','find','Solved'];_0x111e=function(){return _0x16d291;};return _0x111e();}$(g,_0x2eef12(0x12a),W),$(g,'type',_0x5ae215[_0x2eef12(0x131)]),g=ie([_0x53b593(_0x367b4a,_0x38e73d,_0x5bd1f2),N(0x1,_0x51f539(_0x49a014)),N(0x2,_0x3d287c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x10bff5=_0x21bb;(function(_0x285a34,_0x32f08f){const _0x1dd46c=_0x21bb,_0x53c875=_0x285a34();while(!![]){try{const _0x587b42=-parseInt(_0x1dd46c(0x1e3))/0x1*(parseInt(_0x1dd46c(0x216))/0x2)+-parseInt(_0x1dd46c(0x1ee))/0x3+-parseInt(_0x1dd46c(0x1fe))/0x4+parseInt(_0x1dd46c(0x206))/0x5*(-parseInt(_0x1dd46c(0x22c))/0x6)+-parseInt(_0x1dd46c(0x1d6))/0x7*(-parseInt(_0x1dd46c(0x1e1))/0x8)+-parseInt(_0x1dd46c(0x205))/0x9*(parseInt(_0x1dd46c(0x22e))/0xa)+-parseInt(_0x1dd46c(0x1d1))/0xb*(-parseInt(_0x1dd46c(0x1d5))/0xc);if(_0x587b42===_0x32f08f)break;else _0x53c875['push'](_0x53c875['shift']());}catch(_0x68118d){_0x53c875['push'](_0x53c875['shift']());}}}(_0x2126,0x9dafd));import{CommentService as _0x18e6ec,CollaborationSessionService as _0x524314,UniverCollaborationClientPlugin as _0x288191}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46bf69}from'@univerjs-pro/license';import{dayjs as _0x1e783b,UserManagerService as _0xc08702,Inject as _0x346acf,Injector as _0x542fad,Disposable as _0x2b6fd7,CustomRangeType as _0x236405,UniverInstanceType as _0x1eb642,DependentOn as _0x50acbf,IConfigService as _0x194b79,Plugin as _0x44e740,merge as _0x544057}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b94fa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x46dddc,IThreadCommentDataSourceService as _0x4edee4}from'@univerjs/thread-comment';import{bufferTime as _0x272284}from'rxjs';import{HTTPService as _0x1851b4}from'@univerjs/network';const W=_0x10bff5(0x209);function _0x21bb(_0x55305d,_0x2a1559){const _0x212694=_0x2126();return _0x21bb=function(_0x21bbc9,_0x21615f){_0x21bbc9=_0x21bbc9-0x1ca;let _0x3485e6=_0x212694[_0x21bbc9];return _0x3485e6;},_0x21bb(_0x55305d,_0x2a1559);}var I=(_0x56f932=>(_0x56f932[_0x56f932[_0x10bff5(0x21a)]=0x0]=_0x10bff5(0x21a),_0x56f932[_0x56f932[_0x10bff5(0x1d0)]=0x1]=_0x10bff5(0x1d0),_0x56f932[_0x56f932[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x56f932))(I||{}),v=(_0x3a7062=>(_0x3a7062[_0x3a7062[_0x10bff5(0x1e8)]=0x0]=_0x10bff5(0x1e8),_0x3a7062[_0x3a7062['Add']=0x1]=_0x10bff5(0x1ca),_0x3a7062[_0x3a7062['Reply']=0x2]='Reply',_0x3a7062[_0x3a7062[_0x10bff5(0x1e7)]=0x3]='Edit',_0x3a7062[_0x3a7062['Delete']=0x4]=_0x10bff5(0x211),_0x3a7062[_0x3a7062['Solve']=0x5]='Solve',_0x3a7062[_0x3a7062[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x3a7062))(v||{});const y=_0x543274=>_0x1e783b(new Date(+_0x543274))[_0x10bff5(0x1ff)](_0x10bff5(0x204)),B=async(_0x385d36,_0xf7ce8a)=>{const _0x5e2e44=_0x10bff5,_0x27b137=_0x385d36[_0x5e2e44(0x218)](_0xc08702),_0x2cab8d=_0x385d36['get'](_0x1851b4);_0xf7ce8a[_0x5e2e44(0x1f0)](_0x724427=>{const _0x13f80e=_0x5e2e44;_0x27b137[_0x13f80e(0x213)](_0x724427)&&_0xf7ce8a[_0x13f80e(0x21e)](_0x724427);}),_0xf7ce8a[_0x5e2e44(0x21f)]&&(await _0x2cab8d[_0x5e2e44(0x218)](_0x5e2e44(0x1de),{'params':{'userIDs':[..._0xf7ce8a]}}))['body'][_0x5e2e44(0x203)]['forEach'](_0x474e6c=>{const _0x20b3be=_0x5e2e44;_0x474e6c&&_0x27b137[_0x20b3be(0x20f)](_0x474e6c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x469777,_0x39d587,_0x4707e0,_0x38a992)=>{const _0x421c96=_0x10bff5;for(var _0x48f97e=_0x38a992>0x1?void 0x0:_0x38a992?K(_0x39d587,_0x4707e0):_0x39d587,_0x55019e=_0x469777[_0x421c96(0x1f7)]-0x1,_0x11b8ef;_0x55019e>=0x0;_0x55019e--)(_0x11b8ef=_0x469777[_0x55019e])&&(_0x48f97e=_0x11b8ef(_0x48f97e)||_0x48f97e);return _0x48f97e;},p=(_0x5ee64,_0x5c7b7e)=>(_0x53b028,_0x1970b7)=>_0x5c7b7e(_0x53b028,_0x1970b7,_0x5ee64);let _=class extends _0x2b6fd7{constructor(_0x29c931,_0x2fcd85,_0x2eaf60,_0x3ebd69){const _0x3366eb=_0x10bff5;super(),this[_0x3366eb(0x21c)]=_0x29c931,this[_0x3366eb(0x20d)]=_0x2fcd85,this['_userService']=_0x2eaf60,this['_injector']=_0x3ebd69,this[_0x3366eb(0x1e4)](),this['_initUserSync']();}[_0x10bff5(0x207)](){const _0x334203=_0x10bff5;this[_0x334203(0x1e9)](this[_0x334203(0x20d)][_0x334203(0x1ce)][_0x334203(0x1fc)](_0x272284(0x10))['subscribe'](_0x1fb4f4=>{const _0x6f3543=_0x334203,_0x1309e5=new Set();_0x1fb4f4[_0x6f3543(0x1f0)](_0x16f268=>{const _0x31b3ca=_0x6f3543;switch(_0x16f268['type']){case _0x31b3ca(0x1f5):{const _0x16bbaf=_0x16f268[_0x31b3ca(0x20e)][_0x31b3ca(0x208)];_0x1309e5[_0x31b3ca(0x1f5)](_0x16bbaf);break;}}}),B(this[_0x6f3543(0x228)],_0x1309e5);}));}[_0x10bff5(0x1e4)](){const _0x10e29b=_0x10bff5;this[_0x10e29b(0x1e9)](this['_commentService']['commentUpdate$'][_0x10e29b(0x1fd)](async _0xbbdf65=>{const _0x370088=_0x10e29b;var _0x840651,_0x2de963,_0x2cc4f3,_0x1ed5b8;const _0x1fcd33=(_0x840651=this[_0x370088(0x20d)]['getUnit'](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x482723=>_0x482723[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x840651[_0x370088(0x1d9)];if(!_0x1fcd33)return;const {unitId:_0x39b3f7,subUnitId:_0x16b354}=_0x1fcd33;switch(_0xbbdf65['user']&&this[_0x370088(0x1d2)][_0x370088(0x20f)](_0xbbdf65['user']),_0xbbdf65[_0x370088(0x200)]){case v[_0x370088(0x1ca)]:break;case v[_0x370088(0x212)]:{this['_threadCommentModel']['addComment'](_0x39b3f7,_0x16b354,{'unitId':_0x39b3f7,'subUnitId':_0x16b354,'ref':'','id':_0xbbdf65[_0x370088(0x219)],'dT':y(+_0xbbdf65[_0x370088(0x1dd)]),'threadId':_0xbbdf65[_0x370088(0x1e2)],'personId':(_0x2cc4f3=(_0x2de963=_0xbbdf65[_0x370088(0x1df)])==null?void 0x0:_0x2de963[_0x370088(0x230)])!=null?_0x2cc4f3:_0xbbdf65[_0x370088(0x1cd)],'text':JSON[_0x370088(0x231)](_0xbbdf65[_0x370088(0x224)]),'parentId':_0x1fcd33['id']});break;}case v[_0x370088(0x211)]:{const _0x38e15d=this['_threadCommentModel'][_0x370088(0x1fb)](_0x39b3f7,_0x16b354,_0xbbdf65['replyId']);_0x38e15d&&_0x38e15d['parentId']&&this[_0x370088(0x20d)][_0x370088(0x1cb)](_0x39b3f7,_0x16b354,_0xbbdf65[_0x370088(0x219)]);break;}case v[_0x370088(0x1e7)]:{this['_threadCommentModel'][_0x370088(0x1f1)](_0x39b3f7,_0x16b354,{'commentId':_0xbbdf65[_0x370088(0x219)],'text':JSON[_0x370088(0x231)](_0xbbdf65['content'])});break;}case v['Solve']:{const _0x19f1dc=(_0x1ed5b8=this[_0x370088(0x20d)][_0x370088(0x226)](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x5957d2=>_0x5957d2[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x1ed5b8['root'];_0x19f1dc&&this['_threadCommentModel']['resolveComment'](_0x39b3f7,_0x16b354,_0x19f1dc['id'],_0xbbdf65[_0x370088(0x227)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x346acf(_0x18e6ec)),p(0x1,_0x346acf(_0x46dddc)),p(0x2,_0x346acf(_0xc08702)),p(0x3,_0x346acf(_0x542fad))],_);const z=_0x10bff5(0x1cf),O={};var k=Object[_0x10bff5(0x20b)],Q=(_0x1e1833,_0x47f973,_0x4428cf,_0x3cdf79)=>{for(var _0x50dfc0=_0x3cdf79>0x1?void 0x0:_0x3cdf79?k(_0x47f973,_0x4428cf):_0x47f973,_0x179b46=_0x1e1833['length']-0x1,_0x4f9773;_0x179b46>=0x0;_0x179b46--)(_0x4f9773=_0x1e1833[_0x179b46])&&(_0x50dfc0=_0x4f9773(_0x50dfc0)||_0x50dfc0);return _0x50dfc0;},b=(_0x13d331,_0x19ce6e)=>(_0x2bf489,_0x2dee88)=>_0x19ce6e(_0x2bf489,_0x2dee88,_0x13d331);function X(_0x9649af,_0x54948b){const _0x41b52a=_0x10bff5,_0x55275a=_0x9649af[_0x41b52a(0x1db)][0x0];return{..._0x54948b,'id':_0x55275a['replyId'],'resolved':_0x9649af[_0x41b52a(0x227)]===0x1,'dT':y(_0x55275a[_0x41b52a(0x1dd)]),'personId':_0x55275a[_0x41b52a(0x1cd)],'threadId':_0x55275a[_0x41b52a(0x1e2)]};}function ee(_0x5f5350,_0x5e16dd,_0x151115){const _0x2a4b8a=_0x10bff5;var _0x1e31f3,_0x108149;if(((_0x108149=(_0x1e31f3=_0x5f5350==null?void 0x0:_0x5f5350['replies'])==null?void 0x0:_0x1e31f3[_0x2a4b8a(0x1f7)])!=null?_0x108149:0x0)>0x0){const _0xebdfe8=(_0x3809eb,_0x431bcd)=>({'id':_0x3809eb[_0x2a4b8a(0x219)],'threadId':_0x3809eb[_0x2a4b8a(0x1e2)],'dT':y(_0x3809eb['createTimestamp']),'personId':_0x3809eb[_0x2a4b8a(0x1cd)],'resolved':_0x5f5350[_0x2a4b8a(0x227)]===I[_0x2a4b8a(0x1d0)],'unitId':_0x5e16dd,'subUnitId':_0x151115,'text':JSON[_0x2a4b8a(0x231)](_0x3809eb[_0x2a4b8a(0x224)]),'parentId':_0x431bcd}),_0x5d52b6=_0xebdfe8(_0x5f5350[_0x2a4b8a(0x1db)][0x0]);return{..._0x5d52b6,'children':_0x5f5350[_0x2a4b8a(0x1db)][_0x2a4b8a(0x210)](0x1)[_0x2a4b8a(0x1ec)](_0x400af1=>_0xebdfe8(_0x400af1,_0x5d52b6['id']))};}return null;}let S=class{constructor(_0x1a9962,_0x1f911a,_0x28f3d7){const _0x26ef9e=_0x10bff5;this['_httpService']=_0x1a9962,this[_0x26ef9e(0x1d2)]=_0x1f911a,this[_0x26ef9e(0x202)]=_0x28f3d7;}async[_0x10bff5(0x1f4)](_0x32867f){const _0x4886e6=_0x10bff5;var _0x5668ec,_0x1db651;const {parentId:_0x1733a,unitId:_0x13b78f,text:_0x56ecf9,threadId:_0x6849db}=_0x32867f,_0x2e4719=(_0x1db651=(_0x5668ec=_0x56ecf9[_0x4886e6(0x232)])==null?void 0x0:_0x5668ec[_0x4886e6(0x223)](_0xffc7f8=>_0xffc7f8[_0x4886e6(0x1ed)]===_0x236405[_0x4886e6(0x215)])[_0x4886e6(0x1ec)](_0x11fc2b=>_0x11fc2b['rangeId']))!=null?_0x1db651:[],_0x3a9ec4=JSON['stringify'](_0x56ecf9),_0x3c20f9=(await this[_0x4886e6(0x202)][_0x4886e6(0x21d)](_0x13b78f))[_0x4886e6(0x234)]();if(_0x1733a){const _0xd162e8={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719,'threadId':_0x6849db},_0x1d1cd2=(await this[_0x4886e6(0x22d)]['post']('/universer-api/comment/unit/'+_0x13b78f+_0x4886e6(0x1dc),{'body':_0xd162e8}))[_0x4886e6(0x1f3)][_0x4886e6(0x221)];return{..._0x32867f,'id':_0x1d1cd2[_0x4886e6(0x219)],'dT':_0x1e783b(+_0x1d1cd2[_0x4886e6(0x1dd)])[_0x4886e6(0x1ff)](_0x4886e6(0x204)),'personId':_0x1d1cd2[_0x4886e6(0x1cd)]};}else{const _0x151524={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719},_0x410ada=await this[_0x4886e6(0x22d)][_0x4886e6(0x1ea)](_0x4886e6(0x1d8)+_0x13b78f+_0x4886e6(0x1eb),{'body':_0x151524});return X(_0x410ada[_0x4886e6(0x1f3)][_0x4886e6(0x214)],_0x32867f);}}async[_0x10bff5(0x1f1)](_0x3c4b74){const _0x311ed7=_0x10bff5;var _0xe96652,_0x338ca0;const {text:_0x4fbd12,unitId:_0x5c9aea}=_0x3c4b74,_0x41929b=(_0x338ca0=(_0xe96652=_0x4fbd12[_0x311ed7(0x232)])==null?void 0x0:_0xe96652['filter'](_0x3f0236=>_0x3f0236[_0x311ed7(0x1ed)]===_0x236405['COMMENT'])[_0x311ed7(0x1ec)](_0x15a562=>_0x15a562[_0x311ed7(0x21b)]))!=null?_0x338ca0:[],_0x80689a=JSON[_0x311ed7(0x1f8)](_0x4fbd12),_0xad2581=_0x3c4b74[_0x311ed7(0x1e2)],_0x543bb5=_0x3c4b74['id'],_0x1ecd3f={'memberId':(await this['_sessionService']['requireSession'](_0x5c9aea))[_0x311ed7(0x234)](),'unitId':_0x5c9aea,'threadId':_0xad2581,'mention':_0x41929b,'content':_0x80689a,'replyId':_0x543bb5},_0x203d09=await this['_httpService']['post'](_0x311ed7(0x1d8)+_0x5c9aea+'/edit',{'body':_0x1ecd3f});return!_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)]||_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)][_0x311ed7(0x225)]===0x1;}async[_0x10bff5(0x1d4)](_0x28eec4){const _0x582462=_0x10bff5,{unitId:_0x3b7a11}=_0x28eec4,_0x4e39b9=_0x28eec4[_0x582462(0x1e2)],_0x47d274={'memberId':this[_0x582462(0x1d2)]['getCurrentUser']()[_0x582462(0x230)],'unitId':_0x3b7a11,'threadId':_0x4e39b9,'solved':_0x28eec4[_0x582462(0x220)]?I[_0x582462(0x1d0)]:I['OpenOrReOpen']},_0x2919a4=await this[_0x582462(0x22d)][_0x582462(0x1ea)](_0x582462(0x1d8)+_0x3b7a11+_0x582462(0x1cc),{'body':_0x47d274});return!_0x2919a4[_0x582462(0x1f3)][_0x582462(0x222)]||_0x2919a4[_0x582462(0x1f3)]['error'][_0x582462(0x225)]===0x1;}async[_0x10bff5(0x1cb)](_0x4a593c,_0x261dce,_0x1cf9ac,_0x5af762){const _0xea7756=_0x10bff5,_0x3a233f={'memberId':(await this['_sessionService'][_0xea7756(0x21d)](_0x4a593c))['getMemberID'](),'threadId':_0x1cf9ac,'replyId':_0x5af762,'unitId':_0x4a593c},_0x463a2d=await this['_httpService'][_0xea7756(0x1ea)]('/universer-api/comment/unit/'+_0x4a593c+_0xea7756(0x20a),{'body':_0x3a233f});return!_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]||_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]['code']===0x1;}async[_0x10bff5(0x22a)](_0x42fbcd,_0x4a621a,_0x5a46e4){const _0x1f92b8=_0x10bff5,_0x517c3f={'unitId':_0x42fbcd,'threadId':_0x5a46e4},_0x238857=await this[_0x1f92b8(0x22d)]['post']('/universer-api/comment/unit/'+_0x42fbcd+_0x1f92b8(0x1d7),{'body':_0x517c3f}),_0x534d3a=_0x5a46e4[_0x1f92b8(0x1ec)](_0x153410=>ee(_0x238857['body']['comments'][_0x153410],_0x42fbcd,_0x4a621a))[_0x1f92b8(0x223)](Boolean);return Object[_0x1f92b8(0x1e5)](_0x238857['body']['users'])[_0x1f92b8(0x1f0)](_0x8c6a55=>{const _0x2de03e=_0x1f92b8;this[_0x2de03e(0x1d2)]['addUser'](_0x8c6a55);}),_0x534d3a;}[_0x10bff5(0x1da)](_0x2f9a72){const _0x52ccff=_0x10bff5;return{'id':_0x2f9a72['id'],'threadId':_0x2f9a72[_0x52ccff(0x1e2)],'ref':_0x2f9a72['ref']};}};S=Q([b(0x0,_0x346acf(_0x1851b4)),b(0x1,_0x346acf(_0xc08702)),b(0x2,_0x346acf(_0x524314))],S);function _0x2126(){const _0x1c0020=['/reply','createTimestamp','/universer-api/user/list','user','find','76984RvQZSl','threadId','43rnLkqh','_init','values','onReady','Edit','Unknown','disposeWithMe','post','/add','map','rangeType','1150347VqGkfJ','_threadCommentDataSourceService','forEach','updateComment','unitId','body','addComment','add','onStarting','length','stringify','dataSource','pluginName','getComment','pipe','subscribe','4069420kIYKqH','format','type','UNRECOGNIZED','_sessionService','users','YYYY/MM/DD\x20HH:mm','306CGtIkH','78745dDkuNJ','_initUserSync','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','getOwnPropertyDescriptor','symbol','_threadCommentModel','payload','addUser','slice','Delete','Reply','getUser','comment','COMMENT','2706BxiulY','defineProperty','get','replyId','OpenOrReOpen','rangeId','_commentService','requireSession','delete','size','resolved','reply','error','filter','content','code','getUnit','solved','_injector','_configService','listComments','_initDataSource','438iNvQia','_httpService','241510ZxmgPo','_config','userID','parse','customRanges','_threadCommentDataSource','getMemberID','Add','deleteComment','/solved','userId','commentUpdate$','thread-comment-data-source.config','Solved','110WanZFg','_userService','UNIVER_UNKNOWN','resolveComment','4163316QMDDNO','441fUEliH','/list','/universer-api/comment/unit/','root','saveCommentToSnapshot','replies'];_0x2126=function(){return _0x1c0020;};return _0x2126();}var re=Object[_0x10bff5(0x20b)],te=(_0x5afbba,_0xed95f5,_0x54d474,_0x2e01b1)=>{const _0x3e3155=_0x10bff5;for(var _0x304b91=_0x2e01b1>0x1?void 0x0:_0x2e01b1?re(_0xed95f5,_0x54d474):_0xed95f5,_0x82b4a3=_0x5afbba[_0x3e3155(0x1f7)]-0x1,_0x4ec756;_0x82b4a3>=0x0;_0x82b4a3--)(_0x4ec756=_0x5afbba[_0x82b4a3])&&(_0x304b91=_0x4ec756(_0x304b91)||_0x304b91);return _0x304b91;},M=(_0xfce24b,_0xed2172)=>(_0x1d1c74,_0x3b89a6)=>_0xed2172(_0x1d1c74,_0x3b89a6,_0xfce24b);let f=class extends _0x2b6fd7{constructor(_0x14ab74,_0x10ca7c){const _0x348c19=_0x10bff5;super(),this[_0x348c19(0x1ef)]=_0x14ab74,this['_threadCommentDataSource']=_0x10ca7c,this[_0x348c19(0x22b)]();}['_initDataSource'](){const _0x59a133=_0x10bff5;this[_0x59a133(0x1ef)][_0x59a133(0x1f9)]=this[_0x59a133(0x233)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4edee4),M(0x1,_0x346acf(S))],f);var se=Object[_0x10bff5(0x217)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1c5fb8,_0x5f14a6,_0x436d5b)=>_0x5f14a6 in _0x1c5fb8?se(_0x1c5fb8,_0x5f14a6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x436d5b}):_0x1c5fb8[_0x5f14a6]=_0x436d5b,ie=(_0x55e766,_0x2e623b,_0x3dd359,_0x2c7791)=>{const _0x22f9bf=_0x10bff5;for(var _0x274cce=_0x2c7791>0x1?void 0x0:_0x2c7791?oe(_0x2e623b,_0x3dd359):_0x2e623b,_0x25970f=_0x55e766[_0x22f9bf(0x1f7)]-0x1,_0x2a5639;_0x25970f>=0x0;_0x25970f--)(_0x2a5639=_0x55e766[_0x25970f])&&(_0x274cce=_0x2a5639(_0x274cce)||_0x274cce);return _0x274cce;},N=(_0x2b0485,_0x18646e)=>(_0x22d13d,_0x2b0701)=>_0x18646e(_0x22d13d,_0x2b0701,_0x2b0485),$=(_0x4fbad8,_0x4c4206,_0x15091a)=>ne(_0x4fbad8,typeof _0x4c4206!=_0x10bff5(0x20c)?_0x4c4206+'':_0x4c4206,_0x15091a);let g=class extends _0x44e740{constructor(_0x1d993c=O,_0x2a5fe6,_0x4536d4){const _0x44cd9e=_0x10bff5;super(),this[_0x44cd9e(0x22f)]=_0x1d993c,this[_0x44cd9e(0x228)]=_0x2a5fe6,this[_0x44cd9e(0x229)]=_0x4536d4;const {..._0x37486c}=_0x544057({},O,this['_config']);this[_0x44cd9e(0x229)]['setConfig'](z,_0x37486c);}[_0x10bff5(0x1f6)](){const _0x1bcc0c=_0x10bff5;[[S],[f],[_]][_0x1bcc0c(0x1f0)](_0x2faefa=>{const _0x5e8ece=_0x1bcc0c;this[_0x5e8ece(0x228)][_0x5e8ece(0x1f5)](_0x2faefa);});}[_0x10bff5(0x1e6)](){const _0x4943f4=_0x10bff5;this['_injector'][_0x4943f4(0x218)](f),this[_0x4943f4(0x228)][_0x4943f4(0x218)](_);}};$(g,_0x10bff5(0x1fa),W),$(g,_0x10bff5(0x200),_0x1eb642[_0x10bff5(0x1d3)]),g=ie([_0x50acbf(_0x1b94fa,_0x288191,_0x46bf69),N(0x1,_0x346acf(_0x542fad)),N(0x2,_0x194b79)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2eef12=_0x3ac0;(function(_0x5ca0be,_0x2b8dc5){const _0x414b43=_0x3ac0,_0x1e144e=_0x5ca0be();while(!![]){try{const _0x971d3=-parseInt(_0x414b43(0xea))/0x1+parseInt(_0x414b43(0x13e))/0x2*(parseInt(_0x414b43(0x106))/0x3)+-parseInt(_0x414b43(0x112))/0x4*(-parseInt(_0x414b43(0x10e))/0x5)+-parseInt(_0x414b43(0xe7))/0x6*(-parseInt(_0x414b43(0xff))/0x7)+parseInt(_0x414b43(0x10b))/0x8+-parseInt(_0x414b43(0xe0))/0x9+-parseInt(_0x414b43(0x10f))/0xa;if(_0x971d3===_0x2b8dc5)break;else _0x1e144e['push'](_0x1e144e['shift']());}catch(_0x46d877){_0x1e144e['push'](_0x1e144e['shift']());}}}(_0x111e,0xec664));import{CommentService as _0x2bbc6d,CollaborationSessionService as _0x4c7cf5,UniverCollaborationClientPlugin as _0x38e73d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5bd1f2}from'@univerjs-pro/license';import{dayjs as _0x2dfe01,UserManagerService as _0x3bcf6d,Inject as _0x51f539,Injector as _0x49a014,Disposable as _0x1eadb0,CustomRangeType as _0x4e5a59,UniverInstanceType as _0x5ae215,DependentOn as _0x53b593,IConfigService as _0x3d287c,Plugin as _0xe80fdb,merge as _0x40caf7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x367b4a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x193832,IThreadCommentDataSourceService as _0x1dee9e}from'@univerjs/thread-comment';import{bufferTime as _0x524005}from'rxjs';import{HTTPService as _0x54e875}from'@univerjs/network';function _0x3ac0(_0x11d5f2,_0x56cf98){const _0x111e49=_0x111e();return _0x3ac0=function(_0x3ac0ad,_0x3d0e6c){_0x3ac0ad=_0x3ac0ad-0xdb;let _0x3dc94f=_0x111e49[_0x3ac0ad];return _0x3dc94f;},_0x3ac0(_0x11d5f2,_0x56cf98);}const W=_0x2eef12(0x13b);var I=(_0x1ab049=>(_0x1ab049[_0x1ab049[_0x2eef12(0x135)]=0x0]=_0x2eef12(0x135),_0x1ab049[_0x1ab049[_0x2eef12(0xe5)]=0x1]=_0x2eef12(0xe5),_0x1ab049[_0x1ab049['UNRECOGNIZED']=-0x1]=_0x2eef12(0xfb),_0x1ab049))(I||{}),v=(_0x4b1549=>(_0x4b1549[_0x4b1549[_0x2eef12(0x128)]=0x0]=_0x2eef12(0x128),_0x4b1549[_0x4b1549[_0x2eef12(0xed)]=0x1]='Add',_0x4b1549[_0x4b1549['Reply']=0x2]=_0x2eef12(0x129),_0x4b1549[_0x4b1549['Edit']=0x3]=_0x2eef12(0x102),_0x4b1549[_0x4b1549['Delete']=0x4]='Delete',_0x4b1549[_0x4b1549[_0x2eef12(0x138)]=0x5]='Solve',_0x4b1549[_0x4b1549[_0x2eef12(0xfb)]=-0x1]=_0x2eef12(0xfb),_0x4b1549))(v||{});const y=_0x60b238=>_0x2dfe01(new Date(+_0x60b238))[_0x2eef12(0x104)](_0x2eef12(0x13c)),B=async(_0x508834,_0x31b81e)=>{const _0x1dba0a=_0x2eef12,_0x2b0816=_0x508834[_0x1dba0a(0x121)](_0x3bcf6d),_0x772615=_0x508834[_0x1dba0a(0x121)](_0x54e875);_0x31b81e[_0x1dba0a(0xee)](_0x12fec9=>{const _0x3dbe18=_0x1dba0a;_0x2b0816[_0x3dbe18(0xeb)](_0x12fec9)&&_0x31b81e['delete'](_0x12fec9);}),_0x31b81e[_0x1dba0a(0xe2)]&&(await _0x772615[_0x1dba0a(0x121)](_0x1dba0a(0x11d),{'params':{'userIDs':[..._0x31b81e]}}))[_0x1dba0a(0xf4)]['users']['forEach'](_0x205e6b=>{const _0x26bc37=_0x1dba0a;_0x205e6b&&_0x2b0816[_0x26bc37(0xf2)](_0x205e6b);});};var K=Object[_0x2eef12(0x101)],V=(_0x5e3d73,_0xeaaff0,_0x5157e4,_0x1c8c39)=>{for(var _0x439cce=_0x1c8c39>0x1?void 0x0:_0x1c8c39?K(_0xeaaff0,_0x5157e4):_0xeaaff0,_0xf25f98=_0x5e3d73['length']-0x1,_0x33acc9;_0xf25f98>=0x0;_0xf25f98--)(_0x33acc9=_0x5e3d73[_0xf25f98])&&(_0x439cce=_0x33acc9(_0x439cce)||_0x439cce);return _0x439cce;},p=(_0x879671,_0x110246)=>(_0x54cd6a,_0x15b714)=>_0x110246(_0x54cd6a,_0x15b714,_0x879671);let _=class extends _0x1eadb0{constructor(_0x2324b3,_0x2a384c,_0x3a84e5,_0xf109bb){const _0x32bb24=_0x2eef12;super(),this[_0x32bb24(0x117)]=_0x2324b3,this[_0x32bb24(0x103)]=_0x2a384c,this['_userService']=_0x3a84e5,this[_0x32bb24(0xdd)]=_0xf109bb,this['_init'](),this['_initUserSync']();}[_0x2eef12(0xf7)](){const _0x2dd98f=_0x2eef12;this[_0x2dd98f(0x139)](this[_0x2dd98f(0x103)][_0x2dd98f(0x11b)]['pipe'](_0x524005(0x10))[_0x2dd98f(0x122)](_0x5d281e=>{const _0xf48a40=_0x2dd98f,_0x541d5a=new Set();_0x5d281e['forEach'](_0x91f8f6=>{const _0x3eb865=_0x3ac0;switch(_0x91f8f6[_0x3eb865(0xfa)]){case _0x3eb865(0x114):{const _0x4bbd64=_0x91f8f6[_0x3eb865(0xe6)][_0x3eb865(0x11c)];_0x541d5a[_0x3eb865(0x114)](_0x4bbd64);break;}}}),B(this[_0xf48a40(0xdd)],_0x541d5a);}));}['_init'](){const _0x234fe9=_0x2eef12;this[_0x234fe9(0x139)](this['_commentService']['commentUpdate$'][_0x234fe9(0x122)](async _0x1abff3=>{const _0xf62c7=_0x234fe9;var _0x38eb0e,_0x5d1dcf,_0x5f0374,_0x2ad4ea;const _0x1c1d1b=(_0x38eb0e=this[_0xf62c7(0x103)][_0xf62c7(0x126)](_0x1abff3['unitId'])[_0xf62c7(0xe4)](_0x5746b8=>_0x5746b8['threadId']===_0x1abff3['threadId']))==null?void 0x0:_0x38eb0e[_0xf62c7(0x132)];if(!_0x1c1d1b)return;const {unitId:_0x1e9c09,subUnitId:_0x3b51a3}=_0x1c1d1b;switch(_0x1abff3[_0xf62c7(0x111)]&&this[_0xf62c7(0x12f)]['addUser'](_0x1abff3['user']),_0x1abff3['type']){case v[_0xf62c7(0xed)]:break;case v['Reply']:{this[_0xf62c7(0x103)][_0xf62c7(0x11a)](_0x1e9c09,_0x3b51a3,{'unitId':_0x1e9c09,'subUnitId':_0x3b51a3,'ref':'','id':_0x1abff3[_0xf62c7(0x100)],'dT':y(+_0x1abff3['createTimestamp']),'threadId':_0x1abff3[_0xf62c7(0x108)],'personId':(_0x5f0374=(_0x5d1dcf=_0x1abff3[_0xf62c7(0x111)])==null?void 0x0:_0x5d1dcf[_0xf62c7(0xe1)])!=null?_0x5f0374:_0x1abff3[_0xf62c7(0xf6)],'text':JSON[_0xf62c7(0x124)](_0x1abff3[_0xf62c7(0xf8)]),'parentId':_0x1c1d1b['id']});break;}case v['Delete']:{const _0x5deb2e=this[_0xf62c7(0x103)]['getComment'](_0x1e9c09,_0x3b51a3,_0x1abff3[_0xf62c7(0x100)]);_0x5deb2e&&_0x5deb2e[_0xf62c7(0xdb)]&&this['_threadCommentModel'][_0xf62c7(0x12b)](_0x1e9c09,_0x3b51a3,_0x1abff3[_0xf62c7(0x100)]);break;}case v[_0xf62c7(0x102)]:{this[_0xf62c7(0x103)][_0xf62c7(0x10c)](_0x1e9c09,_0x3b51a3,{'commentId':_0x1abff3['replyId'],'text':JSON[_0xf62c7(0x124)](_0x1abff3[_0xf62c7(0xf8)])});break;}case v[_0xf62c7(0x138)]:{const _0x2e9546=(_0x2ad4ea=this[_0xf62c7(0x103)][_0xf62c7(0x126)](_0x1abff3[_0xf62c7(0xde)])['find'](_0x256b9d=>_0x256b9d[_0xf62c7(0x108)]===_0x1abff3[_0xf62c7(0x108)]))==null?void 0x0:_0x2ad4ea[_0xf62c7(0x132)];_0x2e9546&&this[_0xf62c7(0x103)][_0xf62c7(0x116)](_0x1e9c09,_0x3b51a3,_0x2e9546['id'],_0x1abff3[_0xf62c7(0x119)]===I[_0xf62c7(0xe5)]);break;}}}));}};_=V([p(0x0,_0x51f539(_0x2bbc6d)),p(0x1,_0x51f539(_0x193832)),p(0x2,_0x51f539(_0x3bcf6d)),p(0x3,_0x51f539(_0x49a014))],_);const z=_0x2eef12(0x120),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x27325c,_0xe953a8,_0x47a3e9,_0x439068)=>{const _0x4f65c2=_0x2eef12;for(var _0x184b19=_0x439068>0x1?void 0x0:_0x439068?k(_0xe953a8,_0x47a3e9):_0xe953a8,_0x501084=_0x27325c[_0x4f65c2(0xe8)]-0x1,_0x3a1557;_0x501084>=0x0;_0x501084--)(_0x3a1557=_0x27325c[_0x501084])&&(_0x184b19=_0x3a1557(_0x184b19)||_0x184b19);return _0x184b19;},b=(_0x2f413d,_0x56dd3c)=>(_0x31b201,_0x2f31d5)=>_0x56dd3c(_0x31b201,_0x2f31d5,_0x2f413d);function X(_0x1881cc,_0x2508e7){const _0x27e537=_0x2eef12,_0x1cb7ad=_0x1881cc['replies'][0x0];return{..._0x2508e7,'id':_0x1cb7ad[_0x27e537(0x100)],'resolved':_0x1881cc['solved']===0x1,'dT':y(_0x1cb7ad[_0x27e537(0x12c)]),'personId':_0x1cb7ad[_0x27e537(0xf6)],'threadId':_0x1cb7ad[_0x27e537(0x108)]};}function ee(_0x30345f,_0x5d14e6,_0x29c5e9){const _0x15f6d8=_0x2eef12;var _0x3296b8,_0x3e37cc;if(((_0x3e37cc=(_0x3296b8=_0x30345f==null?void 0x0:_0x30345f[_0x15f6d8(0x110)])==null?void 0x0:_0x3296b8[_0x15f6d8(0xe8)])!=null?_0x3e37cc:0x0)>0x0){const _0x3d0eb2=(_0x3de5e0,_0x3e3c0e)=>({'id':_0x3de5e0[_0x15f6d8(0x100)],'threadId':_0x3de5e0[_0x15f6d8(0x108)],'dT':y(_0x3de5e0['createTimestamp']),'personId':_0x3de5e0[_0x15f6d8(0xf6)],'resolved':_0x30345f[_0x15f6d8(0x119)]===I['Solved'],'unitId':_0x5d14e6,'subUnitId':_0x29c5e9,'text':JSON['parse'](_0x3de5e0[_0x15f6d8(0xf8)]),'parentId':_0x3e3c0e}),_0x5287c5=_0x3d0eb2(_0x30345f[_0x15f6d8(0x110)][0x0]);return{..._0x5287c5,'children':_0x30345f['replies'][_0x15f6d8(0xf5)](0x1)[_0x15f6d8(0x12d)](_0x17ecc9=>_0x3d0eb2(_0x17ecc9,_0x5287c5['id']))};}return null;}let S=class{constructor(_0x371eaf,_0x4950cc,_0x1edbe8){const _0x2b98a2=_0x2eef12;this['_httpService']=_0x371eaf,this['_userService']=_0x4950cc,this[_0x2b98a2(0xf1)]=_0x1edbe8;}async[_0x2eef12(0x11a)](_0x539520){const _0x449397=_0x2eef12;var _0x5b6290,_0x41ebac;const {parentId:_0x34d7c1,unitId:_0x1e0bf6,text:_0x3de7a0,threadId:_0x44b6ac}=_0x539520,_0x218135=(_0x41ebac=(_0x5b6290=_0x3de7a0[_0x449397(0x127)])==null?void 0x0:_0x5b6290[_0x449397(0x12e)](_0xeb03c5=>_0xeb03c5[_0x449397(0x118)]===_0x4e5a59[_0x449397(0x115)])[_0x449397(0x12d)](_0x1e2d79=>_0x1e2d79['rangeId']))!=null?_0x41ebac:[],_0xecfe3b=JSON['stringify'](_0x3de7a0),_0x4eb734=(await this[_0x449397(0xf1)][_0x449397(0x136)](_0x1e0bf6))[_0x449397(0x125)]();if(_0x34d7c1){const _0x3196d0={'memberId':_0x4eb734,'unitId':_0x1e0bf6,'content':_0xecfe3b,'mention':_0x218135,'threadId':_0x44b6ac},_0x3c26c2=(await this['_httpService'][_0x449397(0x107)](_0x449397(0xef)+_0x1e0bf6+_0x449397(0x13d),{'body':_0x3196d0}))[_0x449397(0xf4)][_0x449397(0xf0)];return{..._0x539520,'id':_0x3c26c2[_0x449397(0x100)],'dT':_0x2dfe01(+_0x3c26c2[_0x449397(0x12c)])['format'](_0x449397(0x13c)),'personId':_0x3c26c2[_0x449397(0xf6)]};}else{const _0x399c08={'memberId':_0x4eb734,'unitId':_0x1e0bf6,'content':_0xecfe3b,'mention':_0x218135},_0x205333=await this[_0x449397(0xdc)]['post'](_0x449397(0xef)+_0x1e0bf6+_0x449397(0xdf),{'body':_0x399c08});return X(_0x205333[_0x449397(0xf4)][_0x449397(0x130)],_0x539520);}}async[_0x2eef12(0x10c)](_0x5c4d24){const _0x525802=_0x2eef12;var _0x366846,_0x123baa;const {text:_0x24e764,unitId:_0x500704}=_0x5c4d24,_0x34e149=(_0x123baa=(_0x366846=_0x24e764[_0x525802(0x127)])==null?void 0x0:_0x366846[_0x525802(0x12e)](_0x408829=>_0x408829['rangeType']===_0x4e5a59[_0x525802(0x115)])[_0x525802(0x12d)](_0x12e554=>_0x12e554['rangeId']))!=null?_0x123baa:[],_0x6f6cb3=JSON['stringify'](_0x24e764),_0x421b3f=_0x5c4d24[_0x525802(0x108)],_0x32006a=_0x5c4d24['id'],_0x252b56={'memberId':(await this[_0x525802(0xf1)][_0x525802(0x136)](_0x500704))[_0x525802(0x125)](),'unitId':_0x500704,'threadId':_0x421b3f,'mention':_0x34e149,'content':_0x6f6cb3,'replyId':_0x32006a},_0x533c0a=await this[_0x525802(0xdc)][_0x525802(0x107)](_0x525802(0xef)+_0x500704+_0x525802(0x137),{'body':_0x252b56});return!_0x533c0a['body'][_0x525802(0x10d)]||_0x533c0a[_0x525802(0xf4)][_0x525802(0x10d)][_0x525802(0x113)]===0x1;}async[_0x2eef12(0x116)](_0x17e069){const _0x30e4c5=_0x2eef12,{unitId:_0x12dad1}=_0x17e069,_0x4b2679=_0x17e069[_0x30e4c5(0x108)],_0x4d06a8={'memberId':this[_0x30e4c5(0x12f)]['getCurrentUser']()[_0x30e4c5(0xe1)],'unitId':_0x12dad1,'threadId':_0x4b2679,'solved':_0x17e069[_0x30e4c5(0x10a)]?I['Solved']:I[_0x30e4c5(0x135)]},_0x3198f2=await this[_0x30e4c5(0xdc)][_0x30e4c5(0x107)](_0x30e4c5(0xef)+_0x12dad1+'/solved',{'body':_0x4d06a8});return!_0x3198f2['body'][_0x30e4c5(0x10d)]||_0x3198f2['body'][_0x30e4c5(0x10d)]['code']===0x1;}async[_0x2eef12(0x12b)](_0x4bcd83,_0x47462a,_0x28c60a,_0x399abc){const _0x10e6c8=_0x2eef12,_0x292d40={'memberId':(await this[_0x10e6c8(0xf1)][_0x10e6c8(0x136)](_0x4bcd83))[_0x10e6c8(0x125)](),'threadId':_0x28c60a,'replyId':_0x399abc,'unitId':_0x4bcd83},_0x207519=await this[_0x10e6c8(0xdc)]['post'](_0x10e6c8(0xef)+_0x4bcd83+_0x10e6c8(0x109),{'body':_0x292d40});return!_0x207519[_0x10e6c8(0xf4)][_0x10e6c8(0x10d)]||_0x207519[_0x10e6c8(0xf4)][_0x10e6c8(0x10d)]['code']===0x1;}async[_0x2eef12(0x13a)](_0x55e5c0,_0x10269b,_0x16efc1){const _0x653a62=_0x2eef12,_0x47181f={'unitId':_0x55e5c0,'threadId':_0x16efc1},_0x2daaaf=await this[_0x653a62(0xdc)]['post'](_0x653a62(0xef)+_0x55e5c0+'/list',{'body':_0x47181f}),_0x6c74d5=_0x16efc1[_0x653a62(0x12d)](_0x449910=>ee(_0x2daaaf[_0x653a62(0xf4)]['comments'][_0x449910],_0x55e5c0,_0x10269b))[_0x653a62(0x12e)](Boolean);return Object[_0x653a62(0xe3)](_0x2daaaf['body'][_0x653a62(0xfe)])[_0x653a62(0xee)](_0x119520=>{this['_userService']['addUser'](_0x119520);}),_0x6c74d5;}['saveCommentToSnapshot'](_0x5cb793){const _0x66a7cf=_0x2eef12;return{'id':_0x5cb793['id'],'threadId':_0x5cb793[_0x66a7cf(0x108)],'ref':_0x5cb793[_0x66a7cf(0xe9)]};}};S=Q([b(0x0,_0x51f539(_0x54e875)),b(0x1,_0x51f539(_0x3bcf6d)),b(0x2,_0x51f539(_0x4c7cf5))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x7afbd8,_0x56525e,_0xd4e74e,_0x4ee1a5)=>{const _0xae2314=_0x2eef12;for(var _0x22780c=_0x4ee1a5>0x1?void 0x0:_0x4ee1a5?re(_0x56525e,_0xd4e74e):_0x56525e,_0x415570=_0x7afbd8[_0xae2314(0xe8)]-0x1,_0x20b5ba;_0x415570>=0x0;_0x415570--)(_0x20b5ba=_0x7afbd8[_0x415570])&&(_0x22780c=_0x20b5ba(_0x22780c)||_0x22780c);return _0x22780c;},M=(_0x1ac234,_0x5d7904)=>(_0x3ea6b7,_0x1ad0e1)=>_0x5d7904(_0x3ea6b7,_0x1ad0e1,_0x1ac234);let f=class extends _0x1eadb0{constructor(_0x19dc4e,_0x5a2f3b){const _0x4cff36=_0x2eef12;super(),this[_0x4cff36(0xfd)]=_0x19dc4e,this[_0x4cff36(0x134)]=_0x5a2f3b,this[_0x4cff36(0x105)]();}[_0x2eef12(0x105)](){const _0x1742c3=_0x2eef12;this[_0x1742c3(0xfd)][_0x1742c3(0xec)]=this[_0x1742c3(0x134)],this['_threadCommentDataSourceService'][_0x1742c3(0x123)]=!0x1;}};f=te([M(0x0,_0x1dee9e),M(0x1,_0x51f539(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4b5816,_0x18a23e,_0x39c7fc)=>_0x18a23e in _0x4b5816?se(_0x4b5816,_0x18a23e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fc}):_0x4b5816[_0x18a23e]=_0x39c7fc,ie=(_0x2fa9cf,_0x78042b,_0x69de72,_0x397a07)=>{for(var _0x5c6502=_0x397a07>0x1?void 0x0:_0x397a07?oe(_0x78042b,_0x69de72):_0x78042b,_0x10cb54=_0x2fa9cf['length']-0x1,_0x7b69fa;_0x10cb54>=0x0;_0x10cb54--)(_0x7b69fa=_0x2fa9cf[_0x10cb54])&&(_0x5c6502=_0x7b69fa(_0x5c6502)||_0x5c6502);return _0x5c6502;},N=(_0x124bf4,_0x3ea5a9)=>(_0x58d478,_0x4fa8f7)=>_0x3ea5a9(_0x58d478,_0x4fa8f7,_0x124bf4),$=(_0x13c247,_0x4bc98b,_0x127fdf)=>ne(_0x13c247,typeof _0x4bc98b!=_0x2eef12(0x11e)?_0x4bc98b+'':_0x4bc98b,_0x127fdf);let g=class extends _0xe80fdb{constructor(_0x57d708=O,_0x456968,_0x2d789e){const _0x466ac4=_0x2eef12;super(),this[_0x466ac4(0xf3)]=_0x57d708,this['_injector']=_0x456968,this[_0x466ac4(0x133)]=_0x2d789e;const {..._0x245b00}=_0x40caf7({},O,this[_0x466ac4(0xf3)]);this[_0x466ac4(0x133)][_0x466ac4(0x11f)](z,_0x245b00);}[_0x2eef12(0xf9)](){const _0x4073f1=_0x2eef12;[[S],[f],[_]][_0x4073f1(0xee)](_0x23040c=>{const _0x1e4190=_0x4073f1;this[_0x1e4190(0xdd)][_0x1e4190(0x114)](_0x23040c);});}[_0x2eef12(0xfc)](){const _0xd7ebcc=_0x2eef12;this[_0xd7ebcc(0xdd)][_0xd7ebcc(0x121)](f),this[_0xd7ebcc(0xdd)]['get'](_);}};function _0x111e(){const _0x16d291=['payload','6zByaOw','length','ref','1098069nXmtDP','getUser','dataSource','Add','forEach','/universer-api/comment/unit/','reply','_sessionService','addUser','_config','body','slice','userId','_initUserSync','content','onStarting','type','UNRECOGNIZED','onReady','_threadCommentDataSourceService','users','12539086cDQBTk','replyId','getOwnPropertyDescriptor','Edit','_threadCommentModel','format','_initDataSource','3dPAhNq','post','threadId','/delete','resolved','15369312RKLAbO','updateComment','error','20qJHMmJ','12730090RHcqBC','replies','user','1050352uZbMPH','code','add','COMMENT','resolveComment','_commentService','rangeType','solved','addComment','commentUpdate$','personId','/universer-api/user/list','symbol','setConfig','thread-comment-data-source.config','get','subscribe','syncUpdateMutationToColla','parse','getMemberID','getUnit','customRanges','Unknown','Reply','pluginName','deleteComment','createTimestamp','map','filter','_userService','comment','UNIVER_UNKNOWN','root','_configService','_threadCommentDataSource','OpenOrReOpen','requireSession','/edit','Solve','disposeWithMe','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','/reply','499364ULRuPg','parentId','_httpService','_injector','unitId','/add','15058134mMdHIC','userID','size','values','find','Solved'];_0x111e=function(){return _0x16d291;};return _0x111e();}$(g,_0x2eef12(0x12a),W),$(g,'type',_0x5ae215[_0x2eef12(0x131)]),g=ie([_0x53b593(_0x367b4a,_0x38e73d,_0x5bd1f2),N(0x1,_0x51f539(_0x49a014)),N(0x2,_0x3d287c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x10bff5=_0x21bb;(function(_0x285a34,_0x32f08f){const _0x1dd46c=_0x21bb,_0x53c875=_0x285a34();while(!![]){try{const _0x587b42=-parseInt(_0x1dd46c(0x1e3))/0x1*(parseInt(_0x1dd46c(0x216))/0x2)+-parseInt(_0x1dd46c(0x1ee))/0x3+-parseInt(_0x1dd46c(0x1fe))/0x4+parseInt(_0x1dd46c(0x206))/0x5*(-parseInt(_0x1dd46c(0x22c))/0x6)+-parseInt(_0x1dd46c(0x1d6))/0x7*(-parseInt(_0x1dd46c(0x1e1))/0x8)+-parseInt(_0x1dd46c(0x205))/0x9*(parseInt(_0x1dd46c(0x22e))/0xa)+-parseInt(_0x1dd46c(0x1d1))/0xb*(-parseInt(_0x1dd46c(0x1d5))/0xc);if(_0x587b42===_0x32f08f)break;else _0x53c875['push'](_0x53c875['shift']());}catch(_0x68118d){_0x53c875['push'](_0x53c875['shift']());}}}(_0x2126,0x9dafd));import{CommentService as _0x18e6ec,CollaborationSessionService as _0x524314,UniverCollaborationClientPlugin as _0x288191}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46bf69}from'@univerjs-pro/license';import{dayjs as _0x1e783b,UserManagerService as _0xc08702,Inject as _0x346acf,Injector as _0x542fad,Disposable as _0x2b6fd7,CustomRangeType as _0x236405,UniverInstanceType as _0x1eb642,DependentOn as _0x50acbf,IConfigService as _0x194b79,Plugin as _0x44e740,merge as _0x544057}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b94fa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x46dddc,IThreadCommentDataSourceService as _0x4edee4}from'@univerjs/thread-comment';import{bufferTime as _0x272284}from'rxjs';import{HTTPService as _0x1851b4}from'@univerjs/network';const W=_0x10bff5(0x209);function _0x21bb(_0x55305d,_0x2a1559){const _0x212694=_0x2126();return _0x21bb=function(_0x21bbc9,_0x21615f){_0x21bbc9=_0x21bbc9-0x1ca;let _0x3485e6=_0x212694[_0x21bbc9];return _0x3485e6;},_0x21bb(_0x55305d,_0x2a1559);}var I=(_0x56f932=>(_0x56f932[_0x56f932[_0x10bff5(0x21a)]=0x0]=_0x10bff5(0x21a),_0x56f932[_0x56f932[_0x10bff5(0x1d0)]=0x1]=_0x10bff5(0x1d0),_0x56f932[_0x56f932[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x56f932))(I||{}),v=(_0x3a7062=>(_0x3a7062[_0x3a7062[_0x10bff5(0x1e8)]=0x0]=_0x10bff5(0x1e8),_0x3a7062[_0x3a7062['Add']=0x1]=_0x10bff5(0x1ca),_0x3a7062[_0x3a7062['Reply']=0x2]='Reply',_0x3a7062[_0x3a7062[_0x10bff5(0x1e7)]=0x3]='Edit',_0x3a7062[_0x3a7062['Delete']=0x4]=_0x10bff5(0x211),_0x3a7062[_0x3a7062['Solve']=0x5]='Solve',_0x3a7062[_0x3a7062[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x3a7062))(v||{});const y=_0x543274=>_0x1e783b(new Date(+_0x543274))[_0x10bff5(0x1ff)](_0x10bff5(0x204)),B=async(_0x385d36,_0xf7ce8a)=>{const _0x5e2e44=_0x10bff5,_0x27b137=_0x385d36[_0x5e2e44(0x218)](_0xc08702),_0x2cab8d=_0x385d36['get'](_0x1851b4);_0xf7ce8a[_0x5e2e44(0x1f0)](_0x724427=>{const _0x13f80e=_0x5e2e44;_0x27b137[_0x13f80e(0x213)](_0x724427)&&_0xf7ce8a[_0x13f80e(0x21e)](_0x724427);}),_0xf7ce8a[_0x5e2e44(0x21f)]&&(await _0x2cab8d[_0x5e2e44(0x218)](_0x5e2e44(0x1de),{'params':{'userIDs':[..._0xf7ce8a]}}))['body'][_0x5e2e44(0x203)]['forEach'](_0x474e6c=>{const _0x20b3be=_0x5e2e44;_0x474e6c&&_0x27b137[_0x20b3be(0x20f)](_0x474e6c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x469777,_0x39d587,_0x4707e0,_0x38a992)=>{const _0x421c96=_0x10bff5;for(var _0x48f97e=_0x38a992>0x1?void 0x0:_0x38a992?K(_0x39d587,_0x4707e0):_0x39d587,_0x55019e=_0x469777[_0x421c96(0x1f7)]-0x1,_0x11b8ef;_0x55019e>=0x0;_0x55019e--)(_0x11b8ef=_0x469777[_0x55019e])&&(_0x48f97e=_0x11b8ef(_0x48f97e)||_0x48f97e);return _0x48f97e;},p=(_0x5ee64,_0x5c7b7e)=>(_0x53b028,_0x1970b7)=>_0x5c7b7e(_0x53b028,_0x1970b7,_0x5ee64);let _=class extends _0x2b6fd7{constructor(_0x29c931,_0x2fcd85,_0x2eaf60,_0x3ebd69){const _0x3366eb=_0x10bff5;super(),this[_0x3366eb(0x21c)]=_0x29c931,this[_0x3366eb(0x20d)]=_0x2fcd85,this['_userService']=_0x2eaf60,this['_injector']=_0x3ebd69,this[_0x3366eb(0x1e4)](),this['_initUserSync']();}[_0x10bff5(0x207)](){const _0x334203=_0x10bff5;this[_0x334203(0x1e9)](this[_0x334203(0x20d)][_0x334203(0x1ce)][_0x334203(0x1fc)](_0x272284(0x10))['subscribe'](_0x1fb4f4=>{const _0x6f3543=_0x334203,_0x1309e5=new Set();_0x1fb4f4[_0x6f3543(0x1f0)](_0x16f268=>{const _0x31b3ca=_0x6f3543;switch(_0x16f268['type']){case _0x31b3ca(0x1f5):{const _0x16bbaf=_0x16f268[_0x31b3ca(0x20e)][_0x31b3ca(0x208)];_0x1309e5[_0x31b3ca(0x1f5)](_0x16bbaf);break;}}}),B(this[_0x6f3543(0x228)],_0x1309e5);}));}[_0x10bff5(0x1e4)](){const _0x10e29b=_0x10bff5;this[_0x10e29b(0x1e9)](this['_commentService']['commentUpdate$'][_0x10e29b(0x1fd)](async _0xbbdf65=>{const _0x370088=_0x10e29b;var _0x840651,_0x2de963,_0x2cc4f3,_0x1ed5b8;const _0x1fcd33=(_0x840651=this[_0x370088(0x20d)]['getUnit'](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x482723=>_0x482723[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x840651[_0x370088(0x1d9)];if(!_0x1fcd33)return;const {unitId:_0x39b3f7,subUnitId:_0x16b354}=_0x1fcd33;switch(_0xbbdf65['user']&&this[_0x370088(0x1d2)][_0x370088(0x20f)](_0xbbdf65['user']),_0xbbdf65[_0x370088(0x200)]){case v[_0x370088(0x1ca)]:break;case v[_0x370088(0x212)]:{this['_threadCommentModel']['addComment'](_0x39b3f7,_0x16b354,{'unitId':_0x39b3f7,'subUnitId':_0x16b354,'ref':'','id':_0xbbdf65[_0x370088(0x219)],'dT':y(+_0xbbdf65[_0x370088(0x1dd)]),'threadId':_0xbbdf65[_0x370088(0x1e2)],'personId':(_0x2cc4f3=(_0x2de963=_0xbbdf65[_0x370088(0x1df)])==null?void 0x0:_0x2de963[_0x370088(0x230)])!=null?_0x2cc4f3:_0xbbdf65[_0x370088(0x1cd)],'text':JSON[_0x370088(0x231)](_0xbbdf65[_0x370088(0x224)]),'parentId':_0x1fcd33['id']});break;}case v[_0x370088(0x211)]:{const _0x38e15d=this['_threadCommentModel'][_0x370088(0x1fb)](_0x39b3f7,_0x16b354,_0xbbdf65['replyId']);_0x38e15d&&_0x38e15d['parentId']&&this[_0x370088(0x20d)][_0x370088(0x1cb)](_0x39b3f7,_0x16b354,_0xbbdf65[_0x370088(0x219)]);break;}case v[_0x370088(0x1e7)]:{this['_threadCommentModel'][_0x370088(0x1f1)](_0x39b3f7,_0x16b354,{'commentId':_0xbbdf65[_0x370088(0x219)],'text':JSON[_0x370088(0x231)](_0xbbdf65['content'])});break;}case v['Solve']:{const _0x19f1dc=(_0x1ed5b8=this[_0x370088(0x20d)][_0x370088(0x226)](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x5957d2=>_0x5957d2[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x1ed5b8['root'];_0x19f1dc&&this['_threadCommentModel']['resolveComment'](_0x39b3f7,_0x16b354,_0x19f1dc['id'],_0xbbdf65[_0x370088(0x227)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x346acf(_0x18e6ec)),p(0x1,_0x346acf(_0x46dddc)),p(0x2,_0x346acf(_0xc08702)),p(0x3,_0x346acf(_0x542fad))],_);const z=_0x10bff5(0x1cf),O={};var k=Object[_0x10bff5(0x20b)],Q=(_0x1e1833,_0x47f973,_0x4428cf,_0x3cdf79)=>{for(var _0x50dfc0=_0x3cdf79>0x1?void 0x0:_0x3cdf79?k(_0x47f973,_0x4428cf):_0x47f973,_0x179b46=_0x1e1833['length']-0x1,_0x4f9773;_0x179b46>=0x0;_0x179b46--)(_0x4f9773=_0x1e1833[_0x179b46])&&(_0x50dfc0=_0x4f9773(_0x50dfc0)||_0x50dfc0);return _0x50dfc0;},b=(_0x13d331,_0x19ce6e)=>(_0x2bf489,_0x2dee88)=>_0x19ce6e(_0x2bf489,_0x2dee88,_0x13d331);function X(_0x9649af,_0x54948b){const _0x41b52a=_0x10bff5,_0x55275a=_0x9649af[_0x41b52a(0x1db)][0x0];return{..._0x54948b,'id':_0x55275a['replyId'],'resolved':_0x9649af[_0x41b52a(0x227)]===0x1,'dT':y(_0x55275a[_0x41b52a(0x1dd)]),'personId':_0x55275a[_0x41b52a(0x1cd)],'threadId':_0x55275a[_0x41b52a(0x1e2)]};}function ee(_0x5f5350,_0x5e16dd,_0x151115){const _0x2a4b8a=_0x10bff5;var _0x1e31f3,_0x108149;if(((_0x108149=(_0x1e31f3=_0x5f5350==null?void 0x0:_0x5f5350['replies'])==null?void 0x0:_0x1e31f3[_0x2a4b8a(0x1f7)])!=null?_0x108149:0x0)>0x0){const _0xebdfe8=(_0x3809eb,_0x431bcd)=>({'id':_0x3809eb[_0x2a4b8a(0x219)],'threadId':_0x3809eb[_0x2a4b8a(0x1e2)],'dT':y(_0x3809eb['createTimestamp']),'personId':_0x3809eb[_0x2a4b8a(0x1cd)],'resolved':_0x5f5350[_0x2a4b8a(0x227)]===I[_0x2a4b8a(0x1d0)],'unitId':_0x5e16dd,'subUnitId':_0x151115,'text':JSON[_0x2a4b8a(0x231)](_0x3809eb[_0x2a4b8a(0x224)]),'parentId':_0x431bcd}),_0x5d52b6=_0xebdfe8(_0x5f5350[_0x2a4b8a(0x1db)][0x0]);return{..._0x5d52b6,'children':_0x5f5350[_0x2a4b8a(0x1db)][_0x2a4b8a(0x210)](0x1)[_0x2a4b8a(0x1ec)](_0x400af1=>_0xebdfe8(_0x400af1,_0x5d52b6['id']))};}return null;}let S=class{constructor(_0x1a9962,_0x1f911a,_0x28f3d7){const _0x26ef9e=_0x10bff5;this['_httpService']=_0x1a9962,this[_0x26ef9e(0x1d2)]=_0x1f911a,this[_0x26ef9e(0x202)]=_0x28f3d7;}async[_0x10bff5(0x1f4)](_0x32867f){const _0x4886e6=_0x10bff5;var _0x5668ec,_0x1db651;const {parentId:_0x1733a,unitId:_0x13b78f,text:_0x56ecf9,threadId:_0x6849db}=_0x32867f,_0x2e4719=(_0x1db651=(_0x5668ec=_0x56ecf9[_0x4886e6(0x232)])==null?void 0x0:_0x5668ec[_0x4886e6(0x223)](_0xffc7f8=>_0xffc7f8[_0x4886e6(0x1ed)]===_0x236405[_0x4886e6(0x215)])[_0x4886e6(0x1ec)](_0x11fc2b=>_0x11fc2b['rangeId']))!=null?_0x1db651:[],_0x3a9ec4=JSON['stringify'](_0x56ecf9),_0x3c20f9=(await this[_0x4886e6(0x202)][_0x4886e6(0x21d)](_0x13b78f))[_0x4886e6(0x234)]();if(_0x1733a){const _0xd162e8={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719,'threadId':_0x6849db},_0x1d1cd2=(await this[_0x4886e6(0x22d)]['post']('/universer-api/comment/unit/'+_0x13b78f+_0x4886e6(0x1dc),{'body':_0xd162e8}))[_0x4886e6(0x1f3)][_0x4886e6(0x221)];return{..._0x32867f,'id':_0x1d1cd2[_0x4886e6(0x219)],'dT':_0x1e783b(+_0x1d1cd2[_0x4886e6(0x1dd)])[_0x4886e6(0x1ff)](_0x4886e6(0x204)),'personId':_0x1d1cd2[_0x4886e6(0x1cd)]};}else{const _0x151524={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719},_0x410ada=await this[_0x4886e6(0x22d)][_0x4886e6(0x1ea)](_0x4886e6(0x1d8)+_0x13b78f+_0x4886e6(0x1eb),{'body':_0x151524});return X(_0x410ada[_0x4886e6(0x1f3)][_0x4886e6(0x214)],_0x32867f);}}async[_0x10bff5(0x1f1)](_0x3c4b74){const _0x311ed7=_0x10bff5;var _0xe96652,_0x338ca0;const {text:_0x4fbd12,unitId:_0x5c9aea}=_0x3c4b74,_0x41929b=(_0x338ca0=(_0xe96652=_0x4fbd12[_0x311ed7(0x232)])==null?void 0x0:_0xe96652['filter'](_0x3f0236=>_0x3f0236[_0x311ed7(0x1ed)]===_0x236405['COMMENT'])[_0x311ed7(0x1ec)](_0x15a562=>_0x15a562[_0x311ed7(0x21b)]))!=null?_0x338ca0:[],_0x80689a=JSON[_0x311ed7(0x1f8)](_0x4fbd12),_0xad2581=_0x3c4b74[_0x311ed7(0x1e2)],_0x543bb5=_0x3c4b74['id'],_0x1ecd3f={'memberId':(await this['_sessionService']['requireSession'](_0x5c9aea))[_0x311ed7(0x234)](),'unitId':_0x5c9aea,'threadId':_0xad2581,'mention':_0x41929b,'content':_0x80689a,'replyId':_0x543bb5},_0x203d09=await this['_httpService']['post'](_0x311ed7(0x1d8)+_0x5c9aea+'/edit',{'body':_0x1ecd3f});return!_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)]||_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)][_0x311ed7(0x225)]===0x1;}async[_0x10bff5(0x1d4)](_0x28eec4){const _0x582462=_0x10bff5,{unitId:_0x3b7a11}=_0x28eec4,_0x4e39b9=_0x28eec4[_0x582462(0x1e2)],_0x47d274={'memberId':this[_0x582462(0x1d2)]['getCurrentUser']()[_0x582462(0x230)],'unitId':_0x3b7a11,'threadId':_0x4e39b9,'solved':_0x28eec4[_0x582462(0x220)]?I[_0x582462(0x1d0)]:I['OpenOrReOpen']},_0x2919a4=await this[_0x582462(0x22d)][_0x582462(0x1ea)](_0x582462(0x1d8)+_0x3b7a11+_0x582462(0x1cc),{'body':_0x47d274});return!_0x2919a4[_0x582462(0x1f3)][_0x582462(0x222)]||_0x2919a4[_0x582462(0x1f3)]['error'][_0x582462(0x225)]===0x1;}async[_0x10bff5(0x1cb)](_0x4a593c,_0x261dce,_0x1cf9ac,_0x5af762){const _0xea7756=_0x10bff5,_0x3a233f={'memberId':(await this['_sessionService'][_0xea7756(0x21d)](_0x4a593c))['getMemberID'](),'threadId':_0x1cf9ac,'replyId':_0x5af762,'unitId':_0x4a593c},_0x463a2d=await this['_httpService'][_0xea7756(0x1ea)]('/universer-api/comment/unit/'+_0x4a593c+_0xea7756(0x20a),{'body':_0x3a233f});return!_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]||_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]['code']===0x1;}async[_0x10bff5(0x22a)](_0x42fbcd,_0x4a621a,_0x5a46e4){const _0x1f92b8=_0x10bff5,_0x517c3f={'unitId':_0x42fbcd,'threadId':_0x5a46e4},_0x238857=await this[_0x1f92b8(0x22d)]['post']('/universer-api/comment/unit/'+_0x42fbcd+_0x1f92b8(0x1d7),{'body':_0x517c3f}),_0x534d3a=_0x5a46e4[_0x1f92b8(0x1ec)](_0x153410=>ee(_0x238857['body']['comments'][_0x153410],_0x42fbcd,_0x4a621a))[_0x1f92b8(0x223)](Boolean);return Object[_0x1f92b8(0x1e5)](_0x238857['body']['users'])[_0x1f92b8(0x1f0)](_0x8c6a55=>{const _0x2de03e=_0x1f92b8;this[_0x2de03e(0x1d2)]['addUser'](_0x8c6a55);}),_0x534d3a;}[_0x10bff5(0x1da)](_0x2f9a72){const _0x52ccff=_0x10bff5;return{'id':_0x2f9a72['id'],'threadId':_0x2f9a72[_0x52ccff(0x1e2)],'ref':_0x2f9a72['ref']};}};S=Q([b(0x0,_0x346acf(_0x1851b4)),b(0x1,_0x346acf(_0xc08702)),b(0x2,_0x346acf(_0x524314))],S);function _0x2126(){const _0x1c0020=['/reply','createTimestamp','/universer-api/user/list','user','find','76984RvQZSl','threadId','43rnLkqh','_init','values','onReady','Edit','Unknown','disposeWithMe','post','/add','map','rangeType','1150347VqGkfJ','_threadCommentDataSourceService','forEach','updateComment','unitId','body','addComment','add','onStarting','length','stringify','dataSource','pluginName','getComment','pipe','subscribe','4069420kIYKqH','format','type','UNRECOGNIZED','_sessionService','users','YYYY/MM/DD\x20HH:mm','306CGtIkH','78745dDkuNJ','_initUserSync','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','getOwnPropertyDescriptor','symbol','_threadCommentModel','payload','addUser','slice','Delete','Reply','getUser','comment','COMMENT','2706BxiulY','defineProperty','get','replyId','OpenOrReOpen','rangeId','_commentService','requireSession','delete','size','resolved','reply','error','filter','content','code','getUnit','solved','_injector','_configService','listComments','_initDataSource','438iNvQia','_httpService','241510ZxmgPo','_config','userID','parse','customRanges','_threadCommentDataSource','getMemberID','Add','deleteComment','/solved','userId','commentUpdate$','thread-comment-data-source.config','Solved','110WanZFg','_userService','UNIVER_UNKNOWN','resolveComment','4163316QMDDNO','441fUEliH','/list','/universer-api/comment/unit/','root','saveCommentToSnapshot','replies'];_0x2126=function(){return _0x1c0020;};return _0x2126();}var re=Object[_0x10bff5(0x20b)],te=(_0x5afbba,_0xed95f5,_0x54d474,_0x2e01b1)=>{const _0x3e3155=_0x10bff5;for(var _0x304b91=_0x2e01b1>0x1?void 0x0:_0x2e01b1?re(_0xed95f5,_0x54d474):_0xed95f5,_0x82b4a3=_0x5afbba[_0x3e3155(0x1f7)]-0x1,_0x4ec756;_0x82b4a3>=0x0;_0x82b4a3--)(_0x4ec756=_0x5afbba[_0x82b4a3])&&(_0x304b91=_0x4ec756(_0x304b91)||_0x304b91);return _0x304b91;},M=(_0xfce24b,_0xed2172)=>(_0x1d1c74,_0x3b89a6)=>_0xed2172(_0x1d1c74,_0x3b89a6,_0xfce24b);let f=class extends _0x2b6fd7{constructor(_0x14ab74,_0x10ca7c){const _0x348c19=_0x10bff5;super(),this[_0x348c19(0x1ef)]=_0x14ab74,this['_threadCommentDataSource']=_0x10ca7c,this[_0x348c19(0x22b)]();}['_initDataSource'](){const _0x59a133=_0x10bff5;this[_0x59a133(0x1ef)][_0x59a133(0x1f9)]=this[_0x59a133(0x233)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4edee4),M(0x1,_0x346acf(S))],f);var se=Object[_0x10bff5(0x217)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1c5fb8,_0x5f14a6,_0x436d5b)=>_0x5f14a6 in _0x1c5fb8?se(_0x1c5fb8,_0x5f14a6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x436d5b}):_0x1c5fb8[_0x5f14a6]=_0x436d5b,ie=(_0x55e766,_0x2e623b,_0x3dd359,_0x2c7791)=>{const _0x22f9bf=_0x10bff5;for(var _0x274cce=_0x2c7791>0x1?void 0x0:_0x2c7791?oe(_0x2e623b,_0x3dd359):_0x2e623b,_0x25970f=_0x55e766[_0x22f9bf(0x1f7)]-0x1,_0x2a5639;_0x25970f>=0x0;_0x25970f--)(_0x2a5639=_0x55e766[_0x25970f])&&(_0x274cce=_0x2a5639(_0x274cce)||_0x274cce);return _0x274cce;},N=(_0x2b0485,_0x18646e)=>(_0x22d13d,_0x2b0701)=>_0x18646e(_0x22d13d,_0x2b0701,_0x2b0485),$=(_0x4fbad8,_0x4c4206,_0x15091a)=>ne(_0x4fbad8,typeof _0x4c4206!=_0x10bff5(0x20c)?_0x4c4206+'':_0x4c4206,_0x15091a);let g=class extends _0x44e740{constructor(_0x1d993c=O,_0x2a5fe6,_0x4536d4){const _0x44cd9e=_0x10bff5;super(),this[_0x44cd9e(0x22f)]=_0x1d993c,this[_0x44cd9e(0x228)]=_0x2a5fe6,this[_0x44cd9e(0x229)]=_0x4536d4;const {..._0x37486c}=_0x544057({},O,this['_config']);this[_0x44cd9e(0x229)]['setConfig'](z,_0x37486c);}[_0x10bff5(0x1f6)](){const _0x1bcc0c=_0x10bff5;[[S],[f],[_]][_0x1bcc0c(0x1f0)](_0x2faefa=>{const _0x5e8ece=_0x1bcc0c;this[_0x5e8ece(0x228)][_0x5e8ece(0x1f5)](_0x2faefa);});}[_0x10bff5(0x1e6)](){const _0x4943f4=_0x10bff5;this['_injector'][_0x4943f4(0x218)](f),this[_0x4943f4(0x228)][_0x4943f4(0x218)](_);}};$(g,_0x10bff5(0x1fa),W),$(g,_0x10bff5(0x200),_0x1eb642[_0x10bff5(0x1d3)]),g=ie([_0x50acbf(_0x1b94fa,_0x288191,_0x46bf69),N(0x1,_0x346acf(_0x542fad)),N(0x2,_0x194b79)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4749(_0x11d5f7,_0x405080){const _0x1afe76=_0x1afe();return _0x4749=function(_0x474982,_0x161dcf){_0x474982=_0x474982-0x9d;let _0x4222ee=_0x1afe76[_0x474982];return _0x4222ee;},_0x4749(_0x11d5f7,_0x405080);}function _0x1afe(){const _0x1806af=['user','Edit','UserManagerService','code','addComment','requireSession','userID','_init','UniverNetwork','dayjs','disposeWithMe','getOwnPropertyDescriptor','find','customRanges','content','_threadCommentDataSource','updateComment','rangeType','UniverThreadComment','UniverThreadCommentUi','dataSource','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','/edit','4119318tHHzOB','UniverThreadCommentDataSourcePlugin','5375710ajSYVA','Solved','Disposable','solved','reply','symbol','_initDataSource','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','subscribe','6408nSRmWM','/list','@univerjs/thread-comment','filter','UniverProCollaborationClient','object','248028CbQbSV','merge','replies','delete','forEach','threadId','_userService','comment','@univerjs/thread-comment-ui','Unknown','toStringTag','error','getMemberID','pluginName','16427279OqvZll','1dKexzn','CustomRangeType','parse','getUnit','Plugin','ThreadCommentModel','userId','getUser','rxjs','_httpService','getCurrentUser','Reply','createTimestamp','commentUpdate$','UniverThreadCommentUIPlugin','CollaborationSessionService','replyId','resolved','onReady','@univerjs-pro/collaboration-client','personId','Add','post','amd','_configService','deleteComment','/universer-api/comment/unit/','COMMENT','format','_commentService','setConfig','get','function','defineProperty','_threadCommentDataSourceService','root','add','Solve','DependentOn','@univerjs/network','@univerjs-pro/license','_initUserSync','Delete','users','/delete','306JLwEND','_sessionService','9YixySq','UNIVER_UNKNOWN','HTTPService','payload','unitId','bufferTime','ref','Inject','/universer-api/user/list','rangeId','_injector','comments','268864JMaMND','UniverLicensePlugin','thread-comment-data-source.config','UniverInstanceType','1108034EEXcJQ','map','resolveComment','40akuzWt','addUser','size','length','body','_config'];_0x1afe=function(){return _0x1806af;};return _0x1afe();}(function(_0x6f9af9,_0x4bf71b){const _0x1e7045=_0x4749,_0x3eb5ac=_0x6f9af9();while(!![]){try{const _0x4b6abb=parseInt(_0x1e7045(0xe8))/0x1*(-parseInt(_0x1e7045(0xa4))/0x2)+-parseInt(_0x1e7045(0x115))/0x3*(-parseInt(_0x1e7045(0xd3))/0x4)+parseInt(_0x1e7045(0xa7))/0x5*(parseInt(_0x1e7045(0xd9))/0x6)+-parseInt(_0x1e7045(0xc6))/0x7+parseInt(_0x1e7045(0xa0))/0x8+-parseInt(_0x1e7045(0x117))/0x9*(parseInt(_0x1e7045(0xc8))/0xa)+parseInt(_0x1e7045(0xe7))/0xb;if(_0x4b6abb===_0x4bf71b)break;else _0x3eb5ac['push'](_0x3eb5ac['shift']());}catch(_0x51d6ac){_0x3eb5ac['push'](_0x3eb5ac['shift']());}}}(_0x1afe,0x53433),function(_0x47fca5,_0x344929){const _0x131536=_0x4749;typeof exports==_0x131536(0xd8)&&typeof module<'u'?_0x344929(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==_0x131536(0x108)&&define[_0x131536(0xff)]?define(['exports',_0x131536(0xfb),_0x131536(0x110),'@univerjs/core',_0x131536(0xe1),_0x131536(0xd5),_0x131536(0xf0),_0x131536(0x10f)],_0x344929):(_0x47fca5=typeof globalThis<'u'?globalThis:_0x47fca5||self,_0x344929(_0x47fca5['UniverProThreadCommentDatasource']={},_0x47fca5[_0x131536(0xd7)],_0x47fca5['UniverProLicense'],_0x47fca5['UniverCore'],_0x47fca5[_0x131536(0xc0)],_0x47fca5[_0x131536(0xbf)],_0x47fca5['rxjs'],_0x47fca5[_0x131536(0xb5)]));}(this,function(_0x44f229,_0x247a09,_0x512198,_0x3d69f3,_0x5e416b,_0x305787,_0x3f0e7b,_0x2a118a){'use strict';const _0x359028=_0x4749;const _0x25e5e5=_0x359028(0xd0);var _0x46d848=(_0x5191b0=>(_0x5191b0[_0x5191b0[_0x359028(0xc2)]=0x0]='OpenOrReOpen',_0x5191b0[_0x5191b0[_0x359028(0xc9)]=0x1]=_0x359028(0xc9),_0x5191b0[_0x5191b0[_0x359028(0xc4)]=-0x1]='UNRECOGNIZED',_0x5191b0))(_0x46d848||{}),_0x2454aa=(_0x476225=>(_0x476225[_0x476225[_0x359028(0xe2)]=0x0]=_0x359028(0xe2),_0x476225[_0x476225[_0x359028(0xfd)]=0x1]=_0x359028(0xfd),_0x476225[_0x476225[_0x359028(0xf3)]=0x2]=_0x359028(0xf3),_0x476225[_0x476225[_0x359028(0xae)]=0x3]=_0x359028(0xae),_0x476225[_0x476225['Delete']=0x4]='Delete',_0x476225[_0x476225[_0x359028(0x10d)]=0x5]=_0x359028(0x10d),_0x476225[_0x476225['UNRECOGNIZED']=-0x1]=_0x359028(0xc4),_0x476225))(_0x2454aa||{});const _0x177088=_0x355232=>_0x3d69f3['dayjs'](new Date(+_0x355232))[_0x359028(0x104)](_0x359028(0xc3)),_0x3e0ae0=async(_0xbefa8a,_0x4652ec)=>{const _0xc57bac=_0x359028,_0x3c22b7=_0xbefa8a['get'](_0x3d69f3[_0xc57bac(0xaf)]),_0x509d1e=_0xbefa8a[_0xc57bac(0x107)](_0x2a118a[_0xc57bac(0x119)]);_0x4652ec['forEach'](_0x11110c=>{const _0x5571f8=_0xc57bac;_0x3c22b7[_0x5571f8(0xef)](_0x11110c)&&_0x4652ec[_0x5571f8(0xdc)](_0x11110c);}),_0x4652ec[_0xc57bac(0xa9)]&&(await _0x509d1e['get'](_0xc57bac(0x11f),{'params':{'userIDs':[..._0x4652ec]}}))['body'][_0xc57bac(0x113)][_0xc57bac(0xdd)](_0x47dcf0=>{_0x47dcf0&&_0x3c22b7['addUser'](_0x47dcf0);});};var _0x4bd4a9=Object[_0x359028(0xb8)],_0x553ebc=(_0x53032f,_0x54395b,_0x46f67a,_0x12a78e)=>{const _0x5b637d=_0x359028;for(var _0x16adee=_0x12a78e>0x1?void 0x0:_0x12a78e?_0x4bd4a9(_0x54395b,_0x46f67a):_0x54395b,_0x430bc4=_0x53032f[_0x5b637d(0xaa)]-0x1,_0x48140f;_0x430bc4>=0x0;_0x430bc4--)(_0x48140f=_0x53032f[_0x430bc4])&&(_0x16adee=_0x48140f(_0x16adee)||_0x16adee);return _0x16adee;},_0x505060=(_0x102521,_0x115ca)=>(_0x12640e,_0x52df96)=>_0x115ca(_0x12640e,_0x52df96,_0x102521);let _0x12bd18=class extends _0x3d69f3[_0x359028(0xca)]{constructor(_0x3e3404,_0x3fae62,_0x15d175,_0x5a1816){const _0x5bba4b=_0x359028;super(),this[_0x5bba4b(0x105)]=_0x3e3404,this['_threadCommentModel']=_0x3fae62,this[_0x5bba4b(0xdf)]=_0x15d175,this['_injector']=_0x5a1816,this[_0x5bba4b(0xb4)](),this[_0x5bba4b(0x111)]();}[_0x359028(0x111)](){const _0x4125f9=_0x359028;this[_0x4125f9(0xb7)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x3f0e7b[_0x4125f9(0x11c)](0x10))[_0x4125f9(0xd2)](_0x1fde32=>{const _0x29fd05=_0x4125f9,_0x1d85f=new Set();_0x1fde32[_0x29fd05(0xdd)](_0x56426d=>{const _0x5df98a=_0x29fd05;switch(_0x56426d['type']){case'add':{const _0x3d8fa5=_0x56426d[_0x5df98a(0x11a)][_0x5df98a(0xfc)];_0x1d85f[_0x5df98a(0x10c)](_0x3d8fa5);break;}}}),_0x3e0ae0(this[_0x29fd05(0x9e)],_0x1d85f);}));}[_0x359028(0xb4)](){const _0x2f7ab4=_0x359028;this[_0x2f7ab4(0xb7)](this[_0x2f7ab4(0x105)][_0x2f7ab4(0xf5)][_0x2f7ab4(0xd2)](async _0x5646bf=>{const _0x4cccc6=_0x2f7ab4;var _0x2c18c9,_0x811507,_0x493490,_0x4f56a5;const _0xc836e2=(_0x2c18c9=this[_0x4cccc6(0xd1)][_0x4cccc6(0xeb)](_0x5646bf[_0x4cccc6(0x11b)])[_0x4cccc6(0xb9)](_0x33bcf5=>_0x33bcf5[_0x4cccc6(0xde)]===_0x5646bf[_0x4cccc6(0xde)]))==null?void 0x0:_0x2c18c9[_0x4cccc6(0x10b)];if(!_0xc836e2)return;const {unitId:_0x124e76,subUnitId:_0x7cfa8}=_0xc836e2;switch(_0x5646bf[_0x4cccc6(0xad)]&&this[_0x4cccc6(0xdf)][_0x4cccc6(0xa8)](_0x5646bf[_0x4cccc6(0xad)]),_0x5646bf['type']){case _0x2454aa[_0x4cccc6(0xfd)]:break;case _0x2454aa[_0x4cccc6(0xf3)]:{this[_0x4cccc6(0xd1)][_0x4cccc6(0xb1)](_0x124e76,_0x7cfa8,{'unitId':_0x124e76,'subUnitId':_0x7cfa8,'ref':'','id':_0x5646bf[_0x4cccc6(0xf8)],'dT':_0x177088(+_0x5646bf[_0x4cccc6(0xf4)]),'threadId':_0x5646bf[_0x4cccc6(0xde)],'personId':(_0x493490=(_0x811507=_0x5646bf[_0x4cccc6(0xad)])==null?void 0x0:_0x811507[_0x4cccc6(0xb3)])!=null?_0x493490:_0x5646bf[_0x4cccc6(0xee)],'text':JSON[_0x4cccc6(0xea)](_0x5646bf[_0x4cccc6(0xbb)]),'parentId':_0xc836e2['id']});break;}case _0x2454aa[_0x4cccc6(0x112)]:{const _0x1847e2=this['_threadCommentModel']['getComment'](_0x124e76,_0x7cfa8,_0x5646bf['replyId']);_0x1847e2&&_0x1847e2['parentId']&&this[_0x4cccc6(0xd1)]['deleteComment'](_0x124e76,_0x7cfa8,_0x5646bf[_0x4cccc6(0xf8)]);break;}case _0x2454aa[_0x4cccc6(0xae)]:{this['_threadCommentModel'][_0x4cccc6(0xbd)](_0x124e76,_0x7cfa8,{'commentId':_0x5646bf[_0x4cccc6(0xf8)],'text':JSON[_0x4cccc6(0xea)](_0x5646bf[_0x4cccc6(0xbb)])});break;}case _0x2454aa['Solve']:{const _0x2c6d10=(_0x4f56a5=this[_0x4cccc6(0xd1)][_0x4cccc6(0xeb)](_0x5646bf[_0x4cccc6(0x11b)])[_0x4cccc6(0xb9)](_0xdb51fd=>_0xdb51fd['threadId']===_0x5646bf[_0x4cccc6(0xde)]))==null?void 0x0:_0x4f56a5[_0x4cccc6(0x10b)];_0x2c6d10&&this[_0x4cccc6(0xd1)][_0x4cccc6(0xa6)](_0x124e76,_0x7cfa8,_0x2c6d10['id'],_0x5646bf[_0x4cccc6(0xcb)]===_0x46d848[_0x4cccc6(0xc9)]);break;}}}));}};_0x12bd18=_0x553ebc([_0x505060(0x0,_0x3d69f3[_0x359028(0x11e)](_0x247a09['CommentService'])),_0x505060(0x1,_0x3d69f3['Inject'](_0x305787[_0x359028(0xed)])),_0x505060(0x2,_0x3d69f3['Inject'](_0x3d69f3[_0x359028(0xaf)])),_0x505060(0x3,_0x3d69f3[_0x359028(0x11e)](_0x3d69f3[_0x359028(0xcf)]))],_0x12bd18);const _0x54b6cf=_0x359028(0xa2),_0x4b2d5d={};var _0xd2e796=Object['getOwnPropertyDescriptor'],_0x165dd2=(_0x55df29,_0xb3413e,_0x210318,_0x1036ba)=>{const _0x40ef06=_0x359028;for(var _0x2bb7ef=_0x1036ba>0x1?void 0x0:_0x1036ba?_0xd2e796(_0xb3413e,_0x210318):_0xb3413e,_0x5c8a44=_0x55df29[_0x40ef06(0xaa)]-0x1,_0x153606;_0x5c8a44>=0x0;_0x5c8a44--)(_0x153606=_0x55df29[_0x5c8a44])&&(_0x2bb7ef=_0x153606(_0x2bb7ef)||_0x2bb7ef);return _0x2bb7ef;},_0x57e924=(_0x18c0b7,_0x116979)=>(_0x15ba05,_0x2d40d5)=>_0x116979(_0x15ba05,_0x2d40d5,_0x18c0b7);function _0xf18e7a(_0xe2481d,_0x3c7284){const _0x29b121=_0x359028,_0x3b3838=_0xe2481d[_0x29b121(0xdb)][0x0];return{..._0x3c7284,'id':_0x3b3838[_0x29b121(0xf8)],'resolved':_0xe2481d[_0x29b121(0xcb)]===0x1,'dT':_0x177088(_0x3b3838[_0x29b121(0xf4)]),'personId':_0x3b3838[_0x29b121(0xee)],'threadId':_0x3b3838['threadId']};}function _0xf0298b(_0x49251d,_0x4e9aed,_0x390144){const _0x5eb949=_0x359028;var _0xb00421,_0x3e564f;if(((_0x3e564f=(_0xb00421=_0x49251d==null?void 0x0:_0x49251d[_0x5eb949(0xdb)])==null?void 0x0:_0xb00421[_0x5eb949(0xaa)])!=null?_0x3e564f:0x0)>0x0){const _0x1677b0=(_0x1eea94,_0x461fdc)=>({'id':_0x1eea94[_0x5eb949(0xf8)],'threadId':_0x1eea94[_0x5eb949(0xde)],'dT':_0x177088(_0x1eea94[_0x5eb949(0xf4)]),'personId':_0x1eea94[_0x5eb949(0xee)],'resolved':_0x49251d['solved']===_0x46d848[_0x5eb949(0xc9)],'unitId':_0x4e9aed,'subUnitId':_0x390144,'text':JSON['parse'](_0x1eea94[_0x5eb949(0xbb)]),'parentId':_0x461fdc}),_0x1f2ea1=_0x1677b0(_0x49251d[_0x5eb949(0xdb)][0x0]);return{..._0x1f2ea1,'children':_0x49251d[_0x5eb949(0xdb)]['slice'](0x1)[_0x5eb949(0xa5)](_0x4855cb=>_0x1677b0(_0x4855cb,_0x1f2ea1['id']))};}return null;}let _0xba76d8=class{constructor(_0xf3d592,_0x44fe28,_0x5183cb){const _0x40d794=_0x359028;this[_0x40d794(0xf1)]=_0xf3d592,this[_0x40d794(0xdf)]=_0x44fe28,this['_sessionService']=_0x5183cb;}async[_0x359028(0xb1)](_0x54fb24){const _0x439fcb=_0x359028;var _0x2e70b3,_0x2ec117;const {parentId:_0x254e84,unitId:_0x573ff2,text:_0xb2bfd9,threadId:_0x67fe4}=_0x54fb24,_0x5b284d=(_0x2ec117=(_0x2e70b3=_0xb2bfd9[_0x439fcb(0xba)])==null?void 0x0:_0x2e70b3[_0x439fcb(0xd6)](_0x574b94=>_0x574b94[_0x439fcb(0xbe)]===_0x3d69f3[_0x439fcb(0xe9)]['COMMENT'])['map'](_0x4c4ff6=>_0x4c4ff6[_0x439fcb(0x9d)]))!=null?_0x2ec117:[],_0x2b9154=JSON['stringify'](_0xb2bfd9),_0x3bce0f=(await this[_0x439fcb(0x116)][_0x439fcb(0xb2)](_0x573ff2))['getMemberID']();if(_0x254e84){const _0x2fe735={'memberId':_0x3bce0f,'unitId':_0x573ff2,'content':_0x2b9154,'mention':_0x5b284d,'threadId':_0x67fe4},_0x48f0ad=(await this[_0x439fcb(0xf1)][_0x439fcb(0xfe)](_0x439fcb(0x102)+_0x573ff2+'/reply',{'body':_0x2fe735}))['body'][_0x439fcb(0xcc)];return{..._0x54fb24,'id':_0x48f0ad[_0x439fcb(0xf8)],'dT':_0x3d69f3[_0x439fcb(0xb6)](+_0x48f0ad[_0x439fcb(0xf4)])[_0x439fcb(0x104)](_0x439fcb(0xc3)),'personId':_0x48f0ad[_0x439fcb(0xee)]};}else{const _0x1a6603={'memberId':_0x3bce0f,'unitId':_0x573ff2,'content':_0x2b9154,'mention':_0x5b284d},_0x4e6c84=await this[_0x439fcb(0xf1)]['post']('/universer-api/comment/unit/'+_0x573ff2+'/add',{'body':_0x1a6603});return _0xf18e7a(_0x4e6c84[_0x439fcb(0xab)][_0x439fcb(0xe0)],_0x54fb24);}}async[_0x359028(0xbd)](_0x56ab59){const _0x3d4870=_0x359028;var _0x50cbab,_0xbba8e;const {text:_0x231465,unitId:_0x2ca411}=_0x56ab59,_0x2b564e=(_0xbba8e=(_0x50cbab=_0x231465[_0x3d4870(0xba)])==null?void 0x0:_0x50cbab[_0x3d4870(0xd6)](_0x32037c=>_0x32037c[_0x3d4870(0xbe)]===_0x3d69f3[_0x3d4870(0xe9)][_0x3d4870(0x103)])['map'](_0x908dcb=>_0x908dcb[_0x3d4870(0x9d)]))!=null?_0xbba8e:[],_0x338fbf=JSON['stringify'](_0x231465),_0xc2788=_0x56ab59[_0x3d4870(0xde)],_0xbeef5a=_0x56ab59['id'],_0x499471={'memberId':(await this['_sessionService'][_0x3d4870(0xb2)](_0x2ca411))[_0x3d4870(0xe5)](),'unitId':_0x2ca411,'threadId':_0xc2788,'mention':_0x2b564e,'content':_0x338fbf,'replyId':_0xbeef5a},_0x3ef2be=await this[_0x3d4870(0xf1)][_0x3d4870(0xfe)](_0x3d4870(0x102)+_0x2ca411+_0x3d4870(0xc5),{'body':_0x499471});return!_0x3ef2be[_0x3d4870(0xab)][_0x3d4870(0xe4)]||_0x3ef2be['body'][_0x3d4870(0xe4)][_0x3d4870(0xb0)]===0x1;}async[_0x359028(0xa6)](_0x245a15){const _0x5a3323=_0x359028,{unitId:_0x1aef6d}=_0x245a15,_0x901be9=_0x245a15[_0x5a3323(0xde)],_0x1a663f={'memberId':this['_userService'][_0x5a3323(0xf2)]()[_0x5a3323(0xb3)],'unitId':_0x1aef6d,'threadId':_0x901be9,'solved':_0x245a15[_0x5a3323(0xf9)]?_0x46d848['Solved']:_0x46d848[_0x5a3323(0xc2)]},_0x4ccd30=await this[_0x5a3323(0xf1)][_0x5a3323(0xfe)](_0x5a3323(0x102)+_0x1aef6d+'/solved',{'body':_0x1a663f});return!_0x4ccd30[_0x5a3323(0xab)][_0x5a3323(0xe4)]||_0x4ccd30['body']['error'][_0x5a3323(0xb0)]===0x1;}async[_0x359028(0x101)](_0x57a2cd,_0x510076,_0x30d060,_0x5a7a88){const _0x32e2d9=_0x359028,_0x55903b={'memberId':(await this[_0x32e2d9(0x116)][_0x32e2d9(0xb2)](_0x57a2cd))[_0x32e2d9(0xe5)](),'threadId':_0x30d060,'replyId':_0x5a7a88,'unitId':_0x57a2cd},_0x1344cd=await this[_0x32e2d9(0xf1)]['post'](_0x32e2d9(0x102)+_0x57a2cd+_0x32e2d9(0x114),{'body':_0x55903b});return!_0x1344cd[_0x32e2d9(0xab)][_0x32e2d9(0xe4)]||_0x1344cd['body']['error'][_0x32e2d9(0xb0)]===0x1;}async['listComments'](_0x2075c9,_0xf53012,_0x3bb210){const _0x370a98=_0x359028,_0x850c0={'unitId':_0x2075c9,'threadId':_0x3bb210},_0x247f94=await this[_0x370a98(0xf1)][_0x370a98(0xfe)](_0x370a98(0x102)+_0x2075c9+_0x370a98(0xd4),{'body':_0x850c0}),_0x26a786=_0x3bb210[_0x370a98(0xa5)](_0xaf6e3b=>_0xf0298b(_0x247f94[_0x370a98(0xab)][_0x370a98(0x9f)][_0xaf6e3b],_0x2075c9,_0xf53012))['filter'](Boolean);return Object['values'](_0x247f94[_0x370a98(0xab)]['users'])[_0x370a98(0xdd)](_0x149cfa=>{const _0x2dff4f=_0x370a98;this[_0x2dff4f(0xdf)][_0x2dff4f(0xa8)](_0x149cfa);}),_0x26a786;}['saveCommentToSnapshot'](_0x3bf97d){const _0x216db6=_0x359028;return{'id':_0x3bf97d['id'],'threadId':_0x3bf97d[_0x216db6(0xde)],'ref':_0x3bf97d[_0x216db6(0x11d)]};}};_0xba76d8=_0x165dd2([_0x57e924(0x0,_0x3d69f3['Inject'](_0x2a118a['HTTPService'])),_0x57e924(0x1,_0x3d69f3[_0x359028(0x11e)](_0x3d69f3[_0x359028(0xaf)])),_0x57e924(0x2,_0x3d69f3['Inject'](_0x247a09[_0x359028(0xf7)]))],_0xba76d8);var _0x20ad25=Object[_0x359028(0xb8)],_0x283804=(_0x4cf1a2,_0x3ad3ee,_0x563fad,_0x22e975)=>{const _0x5dc8c7=_0x359028;for(var _0x4980d1=_0x22e975>0x1?void 0x0:_0x22e975?_0x20ad25(_0x3ad3ee,_0x563fad):_0x3ad3ee,_0x432db7=_0x4cf1a2[_0x5dc8c7(0xaa)]-0x1,_0x412269;_0x432db7>=0x0;_0x432db7--)(_0x412269=_0x4cf1a2[_0x432db7])&&(_0x4980d1=_0x412269(_0x4980d1)||_0x4980d1);return _0x4980d1;},_0x3523ae=(_0x429ac2,_0x1e59b4)=>(_0x388999,_0x3be50e)=>_0x1e59b4(_0x388999,_0x3be50e,_0x429ac2);let _0x369598=class extends _0x3d69f3[_0x359028(0xca)]{constructor(_0x5f4489,_0x577cb5){const _0x56ce08=_0x359028;super(),this[_0x56ce08(0x10a)]=_0x5f4489,this[_0x56ce08(0xbc)]=_0x577cb5,this[_0x56ce08(0xce)]();}[_0x359028(0xce)](){const _0x3faa4b=_0x359028;this[_0x3faa4b(0x10a)][_0x3faa4b(0xc1)]=this[_0x3faa4b(0xbc)],this[_0x3faa4b(0x10a)]['syncUpdateMutationToColla']=!0x1;}};_0x369598=_0x283804([_0x3523ae(0x0,_0x305787['IThreadCommentDataSourceService']),_0x3523ae(0x1,_0x3d69f3[_0x359028(0x11e)](_0xba76d8))],_0x369598);var _0x1d7082=Object['defineProperty'],_0x59c8da=Object[_0x359028(0xb8)],_0x17a7db=(_0x48c078,_0x547993,_0x3ae9ea)=>_0x547993 in _0x48c078?_0x1d7082(_0x48c078,_0x547993,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ae9ea}):_0x48c078[_0x547993]=_0x3ae9ea,_0x524889=(_0x270be3,_0x344a1d,_0x28d63d,_0x1043fb)=>{const _0x3bff43=_0x359028;for(var _0x1dd6fd=_0x1043fb>0x1?void 0x0:_0x1043fb?_0x59c8da(_0x344a1d,_0x28d63d):_0x344a1d,_0x2f148c=_0x270be3[_0x3bff43(0xaa)]-0x1,_0x5ce082;_0x2f148c>=0x0;_0x2f148c--)(_0x5ce082=_0x270be3[_0x2f148c])&&(_0x1dd6fd=_0x5ce082(_0x1dd6fd)||_0x1dd6fd);return _0x1dd6fd;},_0x4a0824=(_0x4894f0,_0xbb0430)=>(_0x44bd88,_0x52f444)=>_0xbb0430(_0x44bd88,_0x52f444,_0x4894f0),_0x4fce02=(_0x1b3b5b,_0xc84d7a,_0x2c5514)=>_0x17a7db(_0x1b3b5b,typeof _0xc84d7a!=_0x359028(0xcd)?_0xc84d7a+'':_0xc84d7a,_0x2c5514);_0x44f229[_0x359028(0xc7)]=class extends _0x3d69f3[_0x359028(0xec)]{constructor(_0x58efab=_0x4b2d5d,_0x5ed035,_0x166364){const _0x5b2602=_0x359028;super(),this[_0x5b2602(0xac)]=_0x58efab,this[_0x5b2602(0x9e)]=_0x5ed035,this['_configService']=_0x166364;const {..._0x7fe762}=_0x3d69f3[_0x5b2602(0xda)]({},_0x4b2d5d,this['_config']);this[_0x5b2602(0x100)][_0x5b2602(0x106)](_0x54b6cf,_0x7fe762);}['onStarting'](){const _0x206704=_0x359028;[[_0xba76d8],[_0x369598],[_0x12bd18]][_0x206704(0xdd)](_0x1ce583=>{const _0x21bc84=_0x206704;this[_0x21bc84(0x9e)][_0x21bc84(0x10c)](_0x1ce583);});}[_0x359028(0xfa)](){const _0x267195=_0x359028;this[_0x267195(0x9e)]['get'](_0x369598),this[_0x267195(0x9e)][_0x267195(0x107)](_0x12bd18);}},_0x4fce02(_0x44f229[_0x359028(0xc7)],_0x359028(0xe6),_0x25e5e5),_0x4fce02(_0x44f229[_0x359028(0xc7)],'type',_0x3d69f3[_0x359028(0xa3)][_0x359028(0x118)]),_0x44f229[_0x359028(0xc7)]=_0x524889([_0x3d69f3[_0x359028(0x10e)](_0x5e416b[_0x359028(0xf6)],_0x247a09['UniverCollaborationClientPlugin'],_0x512198[_0x359028(0xa1)]),_0x4a0824(0x1,_0x3d69f3[_0x359028(0x11e)](_0x3d69f3[_0x359028(0xcf)])),_0x4a0824(0x2,_0x3d69f3['IConfigService'])],_0x44f229['UniverThreadCommentDataSourcePlugin']),Object[_0x359028(0x109)](_0x44f229,Symbol[_0x359028(0xe3)],{'value':'Module'});}));
1
+ function _0x3bda(_0x1f4b9c,_0x4d4933){const _0xbbe09d=_0xbbe0();return _0x3bda=function(_0x3bda6d,_0xd95ae0){_0x3bda6d=_0x3bda6d-0x86;let _0x1ac592=_0xbbe09d[_0x3bda6d];return _0x1ac592;},_0x3bda(_0x1f4b9c,_0x4d4933);}(function(_0x232ea9,_0x1f3334){const _0x187027=_0x3bda,_0x253d5e=_0x232ea9();while(!![]){try{const _0xb566fd=parseInt(_0x187027(0x105))/0x1*(-parseInt(_0x187027(0x10a))/0x2)+parseInt(_0x187027(0x102))/0x3+parseInt(_0x187027(0xaa))/0x4+-parseInt(_0x187027(0x90))/0x5+parseInt(_0x187027(0xbf))/0x6+-parseInt(_0x187027(0x107))/0x7+parseInt(_0x187027(0xd7))/0x8*(parseInt(_0x187027(0xeb))/0x9);if(_0xb566fd===_0x1f3334)break;else _0x253d5e['push'](_0x253d5e['shift']());}catch(_0x161e1d){_0x253d5e['push'](_0x253d5e['shift']());}}}(_0xbbe0,0x8d5c7),function(_0x514d10,_0x41c46b){const _0x47e924=_0x3bda;typeof exports==_0x47e924(0xae)&&typeof module<'u'?_0x41c46b(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==_0x47e924(0xd4)&&define['amd']?define([_0x47e924(0xa4),_0x47e924(0xaf),'@univerjs-pro/license',_0x47e924(0xb9),_0x47e924(0x97),_0x47e924(0xff),_0x47e924(0x109),_0x47e924(0x88)],_0x41c46b):(_0x514d10=typeof globalThis<'u'?globalThis:_0x514d10||self,_0x41c46b(_0x514d10[_0x47e924(0xf4)]={},_0x514d10['UniverProCollaborationClient'],_0x514d10[_0x47e924(0xbb)],_0x514d10[_0x47e924(0x94)],_0x514d10[_0x47e924(0xa5)],_0x514d10['UniverThreadComment'],_0x514d10[_0x47e924(0x109)],_0x514d10[_0x47e924(0x101)]));}(this,function(_0x450926,_0xcd18a1,_0x117662,_0x5d1429,_0x204bdc,_0x4ed01c,_0x720727,_0x47a8d6){'use strict';const _0x2f1ae2=_0x3bda;const _0x12413d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x37cba8=(_0x449b5c=>(_0x449b5c[_0x449b5c[_0x2f1ae2(0xcf)]=0x0]=_0x2f1ae2(0xcf),_0x449b5c[_0x449b5c[_0x2f1ae2(0xd8)]=0x1]='Solved',_0x449b5c[_0x449b5c['UNRECOGNIZED']=-0x1]=_0x2f1ae2(0xfe),_0x449b5c))(_0x37cba8||{}),_0x2b5700=(_0xd4b4bc=>(_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xfc)]=0x0]=_0x2f1ae2(0xfc),_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xd3)]=0x1]=_0x2f1ae2(0xd3),_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xab)]=0x2]=_0x2f1ae2(0xab),_0xd4b4bc[_0xd4b4bc['Edit']=0x3]=_0x2f1ae2(0x9b),_0xd4b4bc[_0xd4b4bc['Delete']=0x4]=_0x2f1ae2(0x8b),_0xd4b4bc[_0xd4b4bc['Solve']=0x5]='Solve',_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xfe)]=-0x1]='UNRECOGNIZED',_0xd4b4bc))(_0x2b5700||{});const _0x2e50e9=_0x478a54=>_0x5d1429[_0x2f1ae2(0x96)](new Date(+_0x478a54))[_0x2f1ae2(0xde)](_0x2f1ae2(0x89)),_0x2bf517=async(_0x513c5f,_0x117d11)=>{const _0x2bde99=_0x2f1ae2,_0x3eeb8a=_0x513c5f['get'](_0x5d1429[_0x2bde99(0xc2)]),_0x5d3e53=_0x513c5f['get'](_0x47a8d6[_0x2bde99(0xb7)]);_0x117d11['forEach'](_0x26e727=>{const _0x4ee7d9=_0x2bde99;_0x3eeb8a[_0x4ee7d9(0xf0)](_0x26e727)&&_0x117d11['delete'](_0x26e727);}),_0x117d11[_0x2bde99(0xc8)]&&(await _0x5d3e53[_0x2bde99(0xd2)](_0x2bde99(0xb1),{'params':{'userIDs':[..._0x117d11]}}))[_0x2bde99(0xc1)][_0x2bde99(0xa3)][_0x2bde99(0x8a)](_0x4ac3ed=>{_0x4ac3ed&&_0x3eeb8a['addUser'](_0x4ac3ed);});};var _0x475384=Object['getOwnPropertyDescriptor'],_0x200f85=(_0x5e102d,_0x377f31,_0x1ead54,_0x39d095)=>{const _0x28abad=_0x2f1ae2;for(var _0x1ff3de=_0x39d095>0x1?void 0x0:_0x39d095?_0x475384(_0x377f31,_0x1ead54):_0x377f31,_0x521e37=_0x5e102d[_0x28abad(0xf6)]-0x1,_0x4b049b;_0x521e37>=0x0;_0x521e37--)(_0x4b049b=_0x5e102d[_0x521e37])&&(_0x1ff3de=_0x4b049b(_0x1ff3de)||_0x1ff3de);return _0x1ff3de;},_0x256868=(_0x189df8,_0x271622)=>(_0x1429c0,_0x36f871)=>_0x271622(_0x1429c0,_0x36f871,_0x189df8);let _0x11972=class extends _0x5d1429[_0x2f1ae2(0xb2)]{constructor(_0x2b9df1,_0xa0e33d,_0x891fde,_0x59ecd7){const _0x151fee=_0x2f1ae2;super(),this['_commentService']=_0x2b9df1,this['_threadCommentModel']=_0xa0e33d,this[_0x151fee(0xa1)]=_0x891fde,this[_0x151fee(0xee)]=_0x59ecd7,this[_0x151fee(0x103)](),this[_0x151fee(0xb0)]();}['_initUserSync'](){const _0x1ed2d6=_0x2f1ae2;this[_0x1ed2d6(0x8d)](this['_threadCommentModel'][_0x1ed2d6(0xcc)][_0x1ed2d6(0xa9)](_0x720727['bufferTime'](0x10))[_0x1ed2d6(0xdf)](_0x3dd7da=>{const _0x36932a=_0x1ed2d6,_0x28b9ae=new Set();_0x3dd7da[_0x36932a(0x8a)](_0x36a546=>{const _0x16dfc8=_0x36932a;switch(_0x36a546[_0x16dfc8(0xf3)]){case'add':{const _0x37b5f7=_0x36a546[_0x16dfc8(0xf9)][_0x16dfc8(0xe2)];_0x28b9ae[_0x16dfc8(0xb8)](_0x37b5f7);break;}}}),_0x2bf517(this[_0x36932a(0xee)],_0x28b9ae);}));}[_0x2f1ae2(0x103)](){const _0x2b4f29=_0x2f1ae2;this['disposeWithMe'](this[_0x2b4f29(0x95)][_0x2b4f29(0xcc)][_0x2b4f29(0xdf)](async _0x394082=>{const _0x3a8ae0=_0x2b4f29;var _0x17adae,_0x4e7327,_0x5df5d8,_0x4fee2d;const _0x476e7b=(_0x17adae=this['_threadCommentModel']['getUnit'](_0x394082[_0x3a8ae0(0xf2)])[_0x3a8ae0(0x8c)](_0xb966d7=>_0xb966d7['threadId']===_0x394082['threadId']))==null?void 0x0:_0x17adae['root'];if(!_0x476e7b)return;const {unitId:_0x32ffe8,subUnitId:_0x1dd871}=_0x476e7b;switch(_0x394082['user']&&this[_0x3a8ae0(0xa1)][_0x3a8ae0(0xec)](_0x394082[_0x3a8ae0(0xe0)]),_0x394082['type']){case _0x2b5700[_0x3a8ae0(0xd3)]:break;case _0x2b5700[_0x3a8ae0(0xab)]:{this['_threadCommentModel']['addComment'](_0x32ffe8,_0x1dd871,{'unitId':_0x32ffe8,'subUnitId':_0x1dd871,'ref':'','id':_0x394082[_0x3a8ae0(0xe5)],'dT':_0x2e50e9(+_0x394082[_0x3a8ae0(0x106)]),'threadId':_0x394082['threadId'],'personId':(_0x5df5d8=(_0x4e7327=_0x394082[_0x3a8ae0(0xe0)])==null?void 0x0:_0x4e7327[_0x3a8ae0(0x108)])!=null?_0x5df5d8:_0x394082[_0x3a8ae0(0xe3)],'text':JSON[_0x3a8ae0(0xea)](_0x394082['content']),'parentId':_0x476e7b['id']});break;}case _0x2b5700[_0x3a8ae0(0x8b)]:{const _0x3155af=this[_0x3a8ae0(0xc7)]['getComment'](_0x32ffe8,_0x1dd871,_0x394082[_0x3a8ae0(0xe5)]);_0x3155af&&_0x3155af[_0x3a8ae0(0xb6)]&&this[_0x3a8ae0(0xc7)]['deleteComment'](_0x32ffe8,_0x1dd871,_0x394082[_0x3a8ae0(0xe5)]);break;}case _0x2b5700[_0x3a8ae0(0x9b)]:{this[_0x3a8ae0(0xc7)][_0x3a8ae0(0xcb)](_0x32ffe8,_0x1dd871,{'commentId':_0x394082['replyId'],'text':JSON[_0x3a8ae0(0xea)](_0x394082['content'])});break;}case _0x2b5700[_0x3a8ae0(0xba)]:{const _0x18f43e=(_0x4fee2d=this[_0x3a8ae0(0xc7)][_0x3a8ae0(0x87)](_0x394082[_0x3a8ae0(0xf2)])[_0x3a8ae0(0x8c)](_0x2e1ef1=>_0x2e1ef1['threadId']===_0x394082[_0x3a8ae0(0x98)]))==null?void 0x0:_0x4fee2d[_0x3a8ae0(0x9f)];_0x18f43e&&this[_0x3a8ae0(0xc7)][_0x3a8ae0(0xda)](_0x32ffe8,_0x1dd871,_0x18f43e['id'],_0x394082[_0x3a8ae0(0x9e)]===_0x37cba8[_0x3a8ae0(0xd8)]);break;}}}));}};_0x11972=_0x200f85([_0x256868(0x0,_0x5d1429['Inject'](_0xcd18a1['CommentService'])),_0x256868(0x1,_0x5d1429[_0x2f1ae2(0xca)](_0x4ed01c['ThreadCommentModel'])),_0x256868(0x2,_0x5d1429[_0x2f1ae2(0xca)](_0x5d1429[_0x2f1ae2(0xc2)])),_0x256868(0x3,_0x5d1429['Inject'](_0x5d1429[_0x2f1ae2(0xe7)]))],_0x11972);const _0x438073=_0x2f1ae2(0xa8),_0x476311={};var _0x43fa23=Object[_0x2f1ae2(0xd6)],_0x2d9ca7=(_0x36c88a,_0x365c32,_0x5af34b,_0x29e56d)=>{const _0x2b9de5=_0x2f1ae2;for(var _0x410083=_0x29e56d>0x1?void 0x0:_0x29e56d?_0x43fa23(_0x365c32,_0x5af34b):_0x365c32,_0x15500d=_0x36c88a[_0x2b9de5(0xf6)]-0x1,_0x30a387;_0x15500d>=0x0;_0x15500d--)(_0x30a387=_0x36c88a[_0x15500d])&&(_0x410083=_0x30a387(_0x410083)||_0x410083);return _0x410083;},_0x2f4617=(_0x48b2f9,_0x421569)=>(_0xb7bfb,_0x2416e6)=>_0x421569(_0xb7bfb,_0x2416e6,_0x48b2f9);function _0x1601e5(_0x4326cc,_0x1604a1){const _0x3c1236=_0x2f1ae2,_0x1ddb13=_0x4326cc['replies'][0x0];return{..._0x1604a1,'id':_0x1ddb13[_0x3c1236(0xe5)],'resolved':_0x4326cc[_0x3c1236(0x9e)]===0x1,'dT':_0x2e50e9(_0x1ddb13[_0x3c1236(0x106)]),'personId':_0x1ddb13['userId'],'threadId':_0x1ddb13['threadId']};}function _0x12ae86(_0x2ba24f,_0x3a398b,_0x444b52){const _0x44203e=_0x2f1ae2;var _0x39b3bc,_0x32ea41;if(((_0x32ea41=(_0x39b3bc=_0x2ba24f==null?void 0x0:_0x2ba24f[_0x44203e(0xbd)])==null?void 0x0:_0x39b3bc['length'])!=null?_0x32ea41:0x0)>0x0){const _0x12b4f5=(_0x16b121,_0x2ddead)=>({'id':_0x16b121['replyId'],'threadId':_0x16b121[_0x44203e(0x98)],'dT':_0x2e50e9(_0x16b121[_0x44203e(0x106)]),'personId':_0x16b121['userId'],'resolved':_0x2ba24f[_0x44203e(0x9e)]===_0x37cba8[_0x44203e(0xd8)],'unitId':_0x3a398b,'subUnitId':_0x444b52,'text':JSON['parse'](_0x16b121[_0x44203e(0xc3)]),'parentId':_0x2ddead}),_0x346f66=_0x12b4f5(_0x2ba24f[_0x44203e(0xbd)][0x0]);return{..._0x346f66,'children':_0x2ba24f[_0x44203e(0xbd)][_0x44203e(0xf8)](0x1)[_0x44203e(0xdd)](_0x5667d4=>_0x12b4f5(_0x5667d4,_0x346f66['id']))};}return null;}let _0x49299c=class{constructor(_0x55a1bb,_0x59d909,_0x9938a1){const _0x5454cc=_0x2f1ae2;this[_0x5454cc(0x86)]=_0x55a1bb,this[_0x5454cc(0xa1)]=_0x59d909,this[_0x5454cc(0xbe)]=_0x9938a1;}async['addComment'](_0x23a30b){const _0x271b9d=_0x2f1ae2;var _0xce81b3,_0x57ba73;const {parentId:_0x29b591,unitId:_0xde2928,text:_0x500ff9,threadId:_0x49f1f3}=_0x23a30b,_0x3dfdd7=(_0x57ba73=(_0xce81b3=_0x500ff9[_0x271b9d(0xef)])==null?void 0x0:_0xce81b3[_0x271b9d(0xcd)](_0x2ab7ae=>_0x2ab7ae[_0x271b9d(0x9d)]===_0x5d1429[_0x271b9d(0xb5)][_0x271b9d(0xe1)])[_0x271b9d(0xdd)](_0x49894c=>_0x49894c['rangeId']))!=null?_0x57ba73:[],_0x226d31=JSON[_0x271b9d(0x8e)](_0x500ff9),_0x175a2d=(await this['_sessionService'][_0x271b9d(0xa2)](_0xde2928))['getMemberID']();if(_0x29b591){const _0x326464={'memberId':_0x175a2d,'unitId':_0xde2928,'content':_0x226d31,'mention':_0x3dfdd7,'threadId':_0x49f1f3},_0x2823da=(await this[_0x271b9d(0x86)][_0x271b9d(0xd5)]('/universer-api/comment/unit/'+_0xde2928+_0x271b9d(0xc0),{'body':_0x326464}))['body']['reply'];return{..._0x23a30b,'id':_0x2823da[_0x271b9d(0xe5)],'dT':_0x5d1429['dayjs'](+_0x2823da[_0x271b9d(0x106)])[_0x271b9d(0xde)](_0x271b9d(0x89)),'personId':_0x2823da[_0x271b9d(0xe3)]};}else{const _0xbd94e1={'memberId':_0x175a2d,'unitId':_0xde2928,'content':_0x226d31,'mention':_0x3dfdd7},_0x32c168=await this['_httpService'][_0x271b9d(0xd5)]('/universer-api/comment/unit/'+_0xde2928+_0x271b9d(0xd1),{'body':_0xbd94e1});return _0x1601e5(_0x32c168[_0x271b9d(0xc1)]['comment'],_0x23a30b);}}async[_0x2f1ae2(0xcb)](_0x4dba57){const _0x5e792a=_0x2f1ae2;var _0x1dfdb6,_0x525b4d;const {text:_0x2e8819,unitId:_0x173c1e}=_0x4dba57,_0x3b3a1e=(_0x525b4d=(_0x1dfdb6=_0x2e8819['customRanges'])==null?void 0x0:_0x1dfdb6['filter'](_0x38f608=>_0x38f608[_0x5e792a(0x9d)]===_0x5d1429['CustomRangeType'][_0x5e792a(0xe1)])[_0x5e792a(0xdd)](_0xae4a5d=>_0xae4a5d[_0x5e792a(0xf1)]))!=null?_0x525b4d:[],_0x13294d=JSON[_0x5e792a(0x8e)](_0x2e8819),_0x5f5cdc=_0x4dba57[_0x5e792a(0x98)],_0xd0fbef=_0x4dba57['id'],_0x5d891e={'memberId':(await this[_0x5e792a(0xbe)][_0x5e792a(0xa2)](_0x173c1e))[_0x5e792a(0x91)](),'unitId':_0x173c1e,'threadId':_0x5f5cdc,'mention':_0x3b3a1e,'content':_0x13294d,'replyId':_0xd0fbef},_0x53a241=await this[_0x5e792a(0x86)][_0x5e792a(0xd5)](_0x5e792a(0xfd)+_0x173c1e+_0x5e792a(0xa0),{'body':_0x5d891e});return!_0x53a241[_0x5e792a(0xc1)][_0x5e792a(0xc5)]||_0x53a241[_0x5e792a(0xc1)][_0x5e792a(0xc5)][_0x5e792a(0xd0)]===0x1;}async[_0x2f1ae2(0xda)](_0x5efc61){const _0xdd6696=_0x2f1ae2,{unitId:_0x183eb4}=_0x5efc61,_0x459cb5=_0x5efc61['threadId'],_0x5655f8={'memberId':this[_0xdd6696(0xa1)][_0xdd6696(0xa7)]()['userID'],'unitId':_0x183eb4,'threadId':_0x459cb5,'solved':_0x5efc61[_0xdd6696(0xfb)]?_0x37cba8['Solved']:_0x37cba8[_0xdd6696(0xcf)]},_0x2c9245=await this[_0xdd6696(0x86)]['post'](_0xdd6696(0xfd)+_0x183eb4+_0xdd6696(0xbc),{'body':_0x5655f8});return!_0x2c9245['body']['error']||_0x2c9245[_0xdd6696(0xc1)][_0xdd6696(0xc5)][_0xdd6696(0xd0)]===0x1;}async[_0x2f1ae2(0xc4)](_0x3a5d92,_0x3a26e7,_0x558956,_0x2895c3){const _0x5d7f47=_0x2f1ae2,_0x20f6a3={'memberId':(await this['_sessionService'][_0x5d7f47(0xa2)](_0x3a5d92))[_0x5d7f47(0x91)](),'threadId':_0x558956,'replyId':_0x2895c3,'unitId':_0x3a5d92},_0x3c1a45=await this[_0x5d7f47(0x86)][_0x5d7f47(0xd5)]('/universer-api/comment/unit/'+_0x3a5d92+'/delete',{'body':_0x20f6a3});return!_0x3c1a45[_0x5d7f47(0xc1)][_0x5d7f47(0xc5)]||_0x3c1a45[_0x5d7f47(0xc1)][_0x5d7f47(0xc5)][_0x5d7f47(0xd0)]===0x1;}async[_0x2f1ae2(0xdb)](_0x252926,_0x5dba2e,_0x47b342){const _0x180d57=_0x2f1ae2,_0x52405e={'unitId':_0x252926,'threadId':_0x47b342},_0x427398=await this[_0x180d57(0x86)][_0x180d57(0xd5)](_0x180d57(0xfd)+_0x252926+_0x180d57(0xa6),{'body':_0x52405e}),_0x1eb320=_0x47b342[_0x180d57(0xdd)](_0x4c3653=>_0x12ae86(_0x427398[_0x180d57(0xc1)][_0x180d57(0x8f)][_0x4c3653],_0x252926,_0x5dba2e))[_0x180d57(0xcd)](Boolean);return Object['values'](_0x427398['body'][_0x180d57(0xa3)])['forEach'](_0x43d5de=>{const _0x544962=_0x180d57;this[_0x544962(0xa1)][_0x544962(0xec)](_0x43d5de);}),_0x1eb320;}[_0x2f1ae2(0xe4)](_0x33bf69){const _0x333d75=_0x2f1ae2;return{'id':_0x33bf69['id'],'threadId':_0x33bf69[_0x333d75(0x98)],'ref':_0x33bf69[_0x333d75(0xe8)]};}};_0x49299c=_0x2d9ca7([_0x2f4617(0x0,_0x5d1429[_0x2f1ae2(0xca)](_0x47a8d6[_0x2f1ae2(0xb7)])),_0x2f4617(0x1,_0x5d1429[_0x2f1ae2(0xca)](_0x5d1429[_0x2f1ae2(0xc2)])),_0x2f4617(0x2,_0x5d1429[_0x2f1ae2(0xca)](_0xcd18a1[_0x2f1ae2(0xc6)]))],_0x49299c);var _0x265d4e=Object[_0x2f1ae2(0xd6)],_0x3c5648=(_0x52506f,_0x5041aa,_0xf3f0b7,_0xdd09da)=>{const _0x2885ba=_0x2f1ae2;for(var _0x54fe59=_0xdd09da>0x1?void 0x0:_0xdd09da?_0x265d4e(_0x5041aa,_0xf3f0b7):_0x5041aa,_0x17abe1=_0x52506f[_0x2885ba(0xf6)]-0x1,_0xe28b09;_0x17abe1>=0x0;_0x17abe1--)(_0xe28b09=_0x52506f[_0x17abe1])&&(_0x54fe59=_0xe28b09(_0x54fe59)||_0x54fe59);return _0x54fe59;},_0x1b6664=(_0x28bd14,_0x58027c)=>(_0x52383c,_0x359673)=>_0x58027c(_0x52383c,_0x359673,_0x28bd14);let _0x537e51=class extends _0x5d1429['Disposable']{constructor(_0x7352e6,_0xacdada){const _0x42fa08=_0x2f1ae2;super(),this[_0x42fa08(0x9c)]=_0x7352e6,this[_0x42fa08(0xd9)]=_0xacdada,this[_0x42fa08(0xce)]();}[_0x2f1ae2(0xce)](){const _0x1b1b23=_0x2f1ae2;this[_0x1b1b23(0x9c)][_0x1b1b23(0x92)]=this[_0x1b1b23(0xd9)],this[_0x1b1b23(0x9c)][_0x1b1b23(0x99)]=!0x1;}};_0x537e51=_0x3c5648([_0x1b6664(0x0,_0x4ed01c[_0x2f1ae2(0xb3)]),_0x1b6664(0x1,_0x5d1429['Inject'](_0x49299c))],_0x537e51);var _0x133c27=Object[_0x2f1ae2(0xdc)],_0x5421f9=Object[_0x2f1ae2(0xd6)],_0x31bb98=(_0xb35bd5,_0x12f1a7,_0x8399ee)=>_0x12f1a7 in _0xb35bd5?_0x133c27(_0xb35bd5,_0x12f1a7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8399ee}):_0xb35bd5[_0x12f1a7]=_0x8399ee,_0x25ba04=(_0x3f5ddf,_0x44b035,_0x46d47a,_0x15f412)=>{for(var _0xf83149=_0x15f412>0x1?void 0x0:_0x15f412?_0x5421f9(_0x44b035,_0x46d47a):_0x44b035,_0x30b343=_0x3f5ddf['length']-0x1,_0x327659;_0x30b343>=0x0;_0x30b343--)(_0x327659=_0x3f5ddf[_0x30b343])&&(_0xf83149=_0x327659(_0xf83149)||_0xf83149);return _0xf83149;},_0x1440ac=(_0x348edd,_0x337d9b)=>(_0x1c33e5,_0x26452a)=>_0x337d9b(_0x1c33e5,_0x26452a,_0x348edd),_0x46c92f=(_0x34335b,_0xd47703,_0x487880)=>_0x31bb98(_0x34335b,typeof _0xd47703!=_0x2f1ae2(0x100)?_0xd47703+'':_0xd47703,_0x487880);_0x450926[_0x2f1ae2(0xad)]=class extends _0x5d1429[_0x2f1ae2(0xfa)]{constructor(_0x1a0b40=_0x476311,_0x528004,_0x86a858){const _0x4dbd39=_0x2f1ae2;super(),this['_config']=_0x1a0b40,this[_0x4dbd39(0xee)]=_0x528004,this[_0x4dbd39(0xf7)]=_0x86a858;const {..._0x57f1f9}=_0x5d1429['merge']({},_0x476311,this[_0x4dbd39(0xc9)]);this[_0x4dbd39(0xf7)]['setConfig'](_0x438073,_0x57f1f9);}[_0x2f1ae2(0xac)](){const _0xd8e515=_0x2f1ae2;[[_0x49299c],[_0x537e51],[_0x11972]][_0xd8e515(0x8a)](_0x515bb8=>{this['_injector']['add'](_0x515bb8);});}['onReady'](){const _0x54ab27=_0x2f1ae2;this[_0x54ab27(0xee)][_0x54ab27(0xd2)](_0x537e51),this['_injector'][_0x54ab27(0xd2)](_0x11972);}},_0x46c92f(_0x450926['UniverThreadCommentDataSourcePlugin'],_0x2f1ae2(0xed),_0x12413d),_0x46c92f(_0x450926['UniverThreadCommentDataSourcePlugin'],'type',_0x5d1429[_0x2f1ae2(0xb4)]['UNIVER_UNKNOWN']),_0x450926[_0x2f1ae2(0xad)]=_0x25ba04([_0x5d1429[_0x2f1ae2(0xe6)](_0x204bdc[_0x2f1ae2(0xf5)],_0xcd18a1[_0x2f1ae2(0x104)],_0x117662['UniverLicensePlugin']),_0x1440ac(0x1,_0x5d1429[_0x2f1ae2(0xca)](_0x5d1429['Injector'])),_0x1440ac(0x2,_0x5d1429[_0x2f1ae2(0xe9)])],_0x450926[_0x2f1ae2(0xad)]),Object[_0x2f1ae2(0xdc)](_0x450926,Symbol[_0x2f1ae2(0x93)],{'value':_0x2f1ae2(0x9a)});}));function _0xbbe0(){const _0x29c1a4=['size','_config','Inject','updateComment','commentUpdate$','filter','_initDataSource','OpenOrReOpen','code','/add','get','Add','function','post','getOwnPropertyDescriptor','25150632sBpaju','Solved','_threadCommentDataSource','resolveComment','listComments','defineProperty','map','format','subscribe','user','COMMENT','personId','userId','saveCommentToSnapshot','replyId','DependentOn','Injector','ref','IConfigService','parse','9RXcGjv','addUser','pluginName','_injector','customRanges','getUser','rangeId','unitId','type','UniverProThreadCommentDatasource','UniverThreadCommentUIPlugin','length','_configService','slice','payload','Plugin','resolved','Unknown','/universer-api/comment/unit/','UNRECOGNIZED','@univerjs/thread-comment','symbol','UniverNetwork','193818OgzSAk','_init','UniverCollaborationClientPlugin','817951seMovm','createTimestamp','7195727uXyqNi','userID','rxjs','2PGDSiE','_httpService','getUnit','@univerjs/network','YYYY/MM/DD\x20HH:mm','forEach','Delete','find','disposeWithMe','stringify','comments','5012735YtSRvB','getMemberID','dataSource','toStringTag','UniverCore','_commentService','dayjs','@univerjs/thread-comment-ui','threadId','syncUpdateMutationToColla','Module','Edit','_threadCommentDataSourceService','rangeType','solved','root','/edit','_userService','requireSession','users','exports','UniverThreadCommentUi','/list','getCurrentUser','thread-comment-data-source.config','pipe','542852lDCvJe','Reply','onStarting','UniverThreadCommentDataSourcePlugin','object','@univerjs-pro/collaboration-client','_initUserSync','/universer-api/user/list','Disposable','IThreadCommentDataSourceService','UniverInstanceType','CustomRangeType','parentId','HTTPService','add','@univerjs/core','Solve','UniverProLicense','/solved','replies','_sessionService','499956gQsCxS','/reply','body','UserManagerService','content','deleteComment','error','CollaborationSessionService','_threadCommentModel'];_0xbbe0=function(){return _0x29c1a4;};return _0xbbe0();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.3",
49
- "@univerjs-pro/license": "0.10.3",
50
- "@univerjs/core": "0.10.3",
51
- "@univerjs/network": "0.10.3",
48
+ "@univerjs-pro/collaboration-client": "0.10.4",
49
+ "@univerjs-pro/license": "0.10.4",
50
+ "@univerjs/network": "0.10.4",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment-ui": "0.10.3",
54
- "@univerjs/thread-comment": "0.10.3"
52
+ "@univerjs/core": "0.10.4",
53
+ "@univerjs/thread-comment": "0.10.4",
54
+ "@univerjs/thread-comment-ui": "0.10.4"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.3"
61
+ "@univerjs-infra/shared": "0.10.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",