@univerjs-pro/thread-comment-datasource 0.10.7-nightly.202509080357 → 0.10.7-nightly.202509130618

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 _0x3afe(){const _0x3600b2=['_initUserSync','COMMENT','length','commentUpdate$','requireSession','reply','Add','CollaborationSessionService','user','userID','15273LgjXSu','size','threadId','_httpService','onStarting','add','_threadCommentModel','comments','UniverInstanceType','2856476ZfJZXy','userId','356894BCrNAy','UniverThreadCommentDataSourcePlugin','getUnit','post','map','UniverCollaborationClientPlugin','users','stringify','YYYY/MM/DD\x20HH:mm','get','subscribe','content','3703592eiZEus','Solve','_configService','rangeType','type','comment','payload','CustomRangeType','_init','Reply','OpenOrReOpen','defineProperty','error','Injector','1028615woyXin','Delete','disposeWithMe','/list','code','_config','_injector','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','Edit','toStringTag','ThreadCommentModel','slice','pipe','Solved','2BlxJKB','_commentService','getCurrentUser','saveCommentToSnapshot','Module','parse','resolveComment','values','Unknown','format','addComment','_userService','root','createTimestamp','4iVZujz','Plugin','_initDataSource','30267dJlJKq','_threadCommentDataSource','delete','HTTPService','getComment','Disposable','body','merge','Inject','solved','getOwnPropertyDescriptor','parentId','getMemberID','/solved','replies','updateComment','_threadCommentDataSourceService','UserManagerService','deleteComment','/edit','personId','find','UniverThreadCommentUIPlugin','IThreadCommentDataSourceService','UNRECOGNIZED','forEach','replyId','/add','/universer-api/user/list','/reply','_sessionService','/universer-api/comment/unit/','IConfigService','customRanges','rangeId','dataSource','onReady','addUser','2369412ulreiO','unitId'];_0x3afe=function(){return _0x3600b2;};return _0x3afe();}const _0x300e0a=_0x348a;(function(_0x52214c,_0x28b1ae){const _0x31d062=_0x348a,_0x4fafb6=_0x52214c();while(!![]){try{const _0x4775ce=-parseInt(_0x31d062(0x1d6))/0x1*(-parseInt(_0x31d062(0x200))/0x2)+-parseInt(_0x31d062(0x211))/0x3*(-parseInt(_0x31d062(0x20e))/0x4)+parseInt(_0x31d062(0x1f0))/0x5+-parseInt(_0x31d062(0x1bf))/0x6+-parseInt(_0x31d062(0x1d4))/0x7+parseInt(_0x31d062(0x1e2))/0x8+parseInt(_0x31d062(0x1cb))/0x9;if(_0x4775ce===_0x28b1ae)break;else _0x4fafb6['push'](_0x4fafb6['shift']());}catch(_0x269886){_0x4fafb6['push'](_0x4fafb6['shift']());}}}(_0x3afe,0x3938e));Object['defineProperty'](exports,Symbol[_0x300e0a(0x1fb)],{'value':_0x300e0a(0x204)});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=_0x300e0a(0x1f8);var I=(_0x5390ea=>(_0x5390ea[_0x5390ea[_0x300e0a(0x1ec)]=0x0]=_0x300e0a(0x1ec),_0x5390ea[_0x5390ea['Solved']=0x1]='Solved',_0x5390ea[_0x5390ea[_0x300e0a(0x229)]=-0x1]=_0x300e0a(0x229),_0x5390ea))(I||{}),v=(_0x17686a=>(_0x17686a[_0x17686a[_0x300e0a(0x208)]=0x0]=_0x300e0a(0x208),_0x17686a[_0x17686a[_0x300e0a(0x1c7)]=0x1]=_0x300e0a(0x1c7),_0x17686a[_0x17686a['Reply']=0x2]='Reply',_0x17686a[_0x17686a[_0x300e0a(0x1fa)]=0x3]='Edit',_0x17686a[_0x17686a[_0x300e0a(0x1f1)]=0x4]=_0x300e0a(0x1f1),_0x17686a[_0x17686a[_0x300e0a(0x1e3)]=0x5]='Solve',_0x17686a[_0x17686a[_0x300e0a(0x229)]=-0x1]='UNRECOGNIZED',_0x17686a))(v||{});const f=_0x18e788=>c['dayjs'](new Date(+_0x18e788))[_0x300e0a(0x209)](_0x300e0a(0x1de)),R=async(_0x38591b,_0x5c9a7d)=>{const _0x45f0ef=_0x300e0a,_0x340b4d=_0x38591b[_0x45f0ef(0x1df)](c['UserManagerService']),_0x2e6123=_0x38591b[_0x45f0ef(0x1df)](P[_0x45f0ef(0x214)]);_0x5c9a7d[_0x45f0ef(0x22a)](_0x3ce15b=>{const _0x3f5ef5=_0x45f0ef;_0x340b4d['getUser'](_0x3ce15b)&&_0x5c9a7d[_0x3f5ef5(0x213)](_0x3ce15b);}),_0x5c9a7d[_0x45f0ef(0x1cc)]&&(await _0x2e6123[_0x45f0ef(0x1df)](_0x45f0ef(0x22d),{'params':{'userIDs':[..._0x5c9a7d]}}))[_0x45f0ef(0x217)][_0x45f0ef(0x1dc)][_0x45f0ef(0x22a)](_0x11ec0d=>{_0x11ec0d&&_0x340b4d['addUser'](_0x11ec0d);});};function _0x348a(_0x123476,_0x146e36){const _0x3afe9a=_0x3afe();return _0x348a=function(_0x348a40,_0x214faf){_0x348a40=_0x348a40-0x1b8;let _0x511e96=_0x3afe9a[_0x348a40];return _0x511e96;},_0x348a(_0x123476,_0x146e36);}var $=Object['getOwnPropertyDescriptor'],E=(_0x1f1c8b,_0xdbc63d,_0x141966,_0xac9ace)=>{for(var _0x154264=_0xac9ace>0x1?void 0x0:_0xac9ace?$(_0xdbc63d,_0x141966):_0xdbc63d,_0x329369=_0x1f1c8b['length']-0x1,_0x456013;_0x329369>=0x0;_0x329369--)(_0x456013=_0x1f1c8b[_0x329369])&&(_0x154264=_0x456013(_0x154264)||_0x154264);return _0x154264;},S=(_0x40c6aa,_0x2e0bd1)=>(_0x31e944,_0x3ce9e2)=>_0x2e0bd1(_0x31e944,_0x3ce9e2,_0x40c6aa);let _=class extends c[_0x300e0a(0x216)]{constructor(_0x95c8b4,_0x49aa3f,_0x57a532,_0xd4f2cd){const _0x3829c2=_0x300e0a;super(),this[_0x3829c2(0x201)]=_0x95c8b4,this[_0x3829c2(0x1d1)]=_0x49aa3f,this[_0x3829c2(0x20b)]=_0x57a532,this[_0x3829c2(0x1f6)]=_0xd4f2cd,this[_0x3829c2(0x1ea)](),this[_0x3829c2(0x1c1)]();}[_0x300e0a(0x1c1)](){const _0x4d3005=_0x300e0a;this[_0x4d3005(0x1f2)](this[_0x4d3005(0x1d1)]['commentUpdate$'][_0x4d3005(0x1fe)](j['bufferTime'](0x10))[_0x4d3005(0x1e0)](_0x4403b6=>{const _0x22d446=_0x4d3005,_0x4688ae=new Set();_0x4403b6[_0x22d446(0x22a)](_0x31e765=>{const _0x152666=_0x22d446;switch(_0x31e765['type']){case _0x152666(0x1d0):{const _0x1752ad=_0x31e765[_0x152666(0x1e8)][_0x152666(0x225)];_0x4688ae[_0x152666(0x1d0)](_0x1752ad);break;}}}),R(this[_0x22d446(0x1f6)],_0x4688ae);}));}[_0x300e0a(0x1ea)](){const _0x292eb2=_0x300e0a;this[_0x292eb2(0x1f2)](this['_commentService'][_0x292eb2(0x1c4)][_0x292eb2(0x1e0)](async _0x271a17=>{const _0x1d33a9=_0x292eb2;var _0x1b56b4,_0x2b3028,_0x3cc175,_0xa791c6;const _0x48477a=(_0x1b56b4=this[_0x1d33a9(0x1d1)][_0x1d33a9(0x1d8)](_0x271a17[_0x1d33a9(0x1c0)])[_0x1d33a9(0x226)](_0x3a43fb=>_0x3a43fb['threadId']===_0x271a17['threadId']))==null?void 0x0:_0x1b56b4[_0x1d33a9(0x20c)];if(!_0x48477a)return;const {unitId:_0x278814,subUnitId:_0x5d6866}=_0x48477a;switch(_0x271a17[_0x1d33a9(0x1c9)]&&this[_0x1d33a9(0x20b)][_0x1d33a9(0x1be)](_0x271a17['user']),_0x271a17[_0x1d33a9(0x1e6)]){case v[_0x1d33a9(0x1c7)]:break;case v[_0x1d33a9(0x1eb)]:{this[_0x1d33a9(0x1d1)]['addComment'](_0x278814,_0x5d6866,{'unitId':_0x278814,'subUnitId':_0x5d6866,'ref':'','id':_0x271a17[_0x1d33a9(0x22b)],'dT':f(+_0x271a17[_0x1d33a9(0x20d)]),'threadId':_0x271a17[_0x1d33a9(0x1cd)],'personId':(_0x3cc175=(_0x2b3028=_0x271a17['user'])==null?void 0x0:_0x2b3028[_0x1d33a9(0x1ca)])!=null?_0x3cc175:_0x271a17[_0x1d33a9(0x1d5)],'text':JSON['parse'](_0x271a17['content']),'parentId':_0x48477a['id']});break;}case v['Delete']:{const _0x25c4e1=this[_0x1d33a9(0x1d1)][_0x1d33a9(0x215)](_0x278814,_0x5d6866,_0x271a17[_0x1d33a9(0x22b)]);_0x25c4e1&&_0x25c4e1[_0x1d33a9(0x21c)]&&this[_0x1d33a9(0x1d1)][_0x1d33a9(0x223)](_0x278814,_0x5d6866,_0x271a17['replyId']);break;}case v['Edit']:{this[_0x1d33a9(0x1d1)][_0x1d33a9(0x220)](_0x278814,_0x5d6866,{'commentId':_0x271a17[_0x1d33a9(0x22b)],'text':JSON[_0x1d33a9(0x205)](_0x271a17['content'])});break;}case v[_0x1d33a9(0x1e3)]:{const _0x33385c=(_0xa791c6=this[_0x1d33a9(0x1d1)]['getUnit'](_0x271a17[_0x1d33a9(0x1c0)])[_0x1d33a9(0x226)](_0x6e0a86=>_0x6e0a86[_0x1d33a9(0x1cd)]===_0x271a17['threadId']))==null?void 0x0:_0xa791c6[_0x1d33a9(0x20c)];_0x33385c&&this[_0x1d33a9(0x1d1)][_0x1d33a9(0x206)](_0x278814,_0x5d6866,_0x33385c['id'],_0x271a17[_0x1d33a9(0x21a)]===I[_0x1d33a9(0x1ff)]);break;}}}));}};_=E([S(0x0,c[_0x300e0a(0x219)](b['CommentService'])),S(0x1,c[_0x300e0a(0x219)](M[_0x300e0a(0x1fc)])),S(0x2,c[_0x300e0a(0x219)](c[_0x300e0a(0x222)])),S(0x3,c['Inject'](c[_0x300e0a(0x1ef)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x300e0a(0x21b)],x=(_0x114a06,_0x323332,_0x3daec0,_0x7bdbaf)=>{const _0x34f03b=_0x300e0a;for(var _0x912969=_0x7bdbaf>0x1?void 0x0:_0x7bdbaf?A(_0x323332,_0x3daec0):_0x323332,_0x14ac2a=_0x114a06[_0x34f03b(0x1c3)]-0x1,_0x1778bd;_0x14ac2a>=0x0;_0x14ac2a--)(_0x1778bd=_0x114a06[_0x14ac2a])&&(_0x912969=_0x1778bd(_0x912969)||_0x912969);return _0x912969;},C=(_0x31e250,_0x5e1b81)=>(_0x300849,_0x3e692f)=>_0x5e1b81(_0x300849,_0x3e692f,_0x31e250);function Y(_0x1ef541,_0x12e108){const _0x37856b=_0x300e0a,_0x4e91e8=_0x1ef541[_0x37856b(0x21f)][0x0];return{..._0x12e108,'id':_0x4e91e8[_0x37856b(0x22b)],'resolved':_0x1ef541['solved']===0x1,'dT':f(_0x4e91e8[_0x37856b(0x20d)]),'personId':_0x4e91e8[_0x37856b(0x1d5)],'threadId':_0x4e91e8[_0x37856b(0x1cd)]};}function G(_0x72275,_0x48ac56,_0x2891d4){const _0x112563=_0x300e0a;var _0x136c6f,_0x106fb2;if(((_0x106fb2=(_0x136c6f=_0x72275==null?void 0x0:_0x72275[_0x112563(0x21f)])==null?void 0x0:_0x136c6f[_0x112563(0x1c3)])!=null?_0x106fb2:0x0)>0x0){const _0x29c282=(_0x46a0c7,_0x1f603)=>({'id':_0x46a0c7[_0x112563(0x22b)],'threadId':_0x46a0c7['threadId'],'dT':f(_0x46a0c7[_0x112563(0x20d)]),'personId':_0x46a0c7[_0x112563(0x1d5)],'resolved':_0x72275[_0x112563(0x21a)]===I[_0x112563(0x1ff)],'unitId':_0x48ac56,'subUnitId':_0x2891d4,'text':JSON[_0x112563(0x205)](_0x46a0c7[_0x112563(0x1e1)]),'parentId':_0x1f603}),_0x472acf=_0x29c282(_0x72275[_0x112563(0x21f)][0x0]);return{..._0x472acf,'children':_0x72275[_0x112563(0x21f)][_0x112563(0x1fd)](0x1)[_0x112563(0x1da)](_0x56c207=>_0x29c282(_0x56c207,_0x472acf['id']))};}return null;}let p=class{constructor(_0x16b74f,_0x12c5f3,_0x31990f){const _0x148329=_0x300e0a;this[_0x148329(0x1ce)]=_0x16b74f,this[_0x148329(0x20b)]=_0x12c5f3,this[_0x148329(0x22f)]=_0x31990f;}async[_0x300e0a(0x20a)](_0x71d3ee){const _0x5f47ba=_0x300e0a;var _0x248ec7,_0x4d9e8e;const {parentId:_0x1d6c6e,unitId:_0x127510,text:_0x4d8666,threadId:_0x3d23f1}=_0x71d3ee,_0xa43f2e=(_0x4d9e8e=(_0x248ec7=_0x4d8666['customRanges'])==null?void 0x0:_0x248ec7['filter'](_0x4c0d27=>_0x4c0d27['rangeType']===c[_0x5f47ba(0x1e9)][_0x5f47ba(0x1c2)])[_0x5f47ba(0x1da)](_0x4f4b2d=>_0x4f4b2d[_0x5f47ba(0x1bb)]))!=null?_0x4d9e8e:[],_0x5abb95=JSON[_0x5f47ba(0x1dd)](_0x4d8666),_0x5e9bdd=(await this[_0x5f47ba(0x22f)][_0x5f47ba(0x1c5)](_0x127510))[_0x5f47ba(0x21d)]();if(_0x1d6c6e){const _0x4e51b3={'memberId':_0x5e9bdd,'unitId':_0x127510,'content':_0x5abb95,'mention':_0xa43f2e,'threadId':_0x3d23f1},_0x1272f2=(await this[_0x5f47ba(0x1ce)][_0x5f47ba(0x1d9)](_0x5f47ba(0x1b8)+_0x127510+_0x5f47ba(0x22e),{'body':_0x4e51b3}))['body'][_0x5f47ba(0x1c6)];return{..._0x71d3ee,'id':_0x1272f2[_0x5f47ba(0x22b)],'dT':c['dayjs'](+_0x1272f2[_0x5f47ba(0x20d)])[_0x5f47ba(0x209)](_0x5f47ba(0x1de)),'personId':_0x1272f2[_0x5f47ba(0x1d5)]};}else{const _0x443170={'memberId':_0x5e9bdd,'unitId':_0x127510,'content':_0x5abb95,'mention':_0xa43f2e},_0x326888=await this['_httpService'][_0x5f47ba(0x1d9)](_0x5f47ba(0x1b8)+_0x127510+_0x5f47ba(0x22c),{'body':_0x443170});return Y(_0x326888[_0x5f47ba(0x217)][_0x5f47ba(0x1e7)],_0x71d3ee);}}async[_0x300e0a(0x220)](_0x7abe64){const _0x3c9877=_0x300e0a;var _0x228ca2,_0xf03c63;const {text:_0x2fffff,unitId:_0x1f6703}=_0x7abe64,_0x2db836=(_0xf03c63=(_0x228ca2=_0x2fffff[_0x3c9877(0x1ba)])==null?void 0x0:_0x228ca2['filter'](_0x29244a=>_0x29244a[_0x3c9877(0x1e5)]===c[_0x3c9877(0x1e9)][_0x3c9877(0x1c2)])[_0x3c9877(0x1da)](_0x3fabaf=>_0x3fabaf[_0x3c9877(0x1bb)]))!=null?_0xf03c63:[],_0x993550=JSON[_0x3c9877(0x1dd)](_0x2fffff),_0x17e14a=_0x7abe64[_0x3c9877(0x1cd)],_0x87eb26=_0x7abe64['id'],_0x54c5dc={'memberId':(await this[_0x3c9877(0x22f)][_0x3c9877(0x1c5)](_0x1f6703))['getMemberID'](),'unitId':_0x1f6703,'threadId':_0x17e14a,'mention':_0x2db836,'content':_0x993550,'replyId':_0x87eb26},_0x122717=await this['_httpService']['post'](_0x3c9877(0x1b8)+_0x1f6703+_0x3c9877(0x224),{'body':_0x54c5dc});return!_0x122717[_0x3c9877(0x217)]['error']||_0x122717[_0x3c9877(0x217)][_0x3c9877(0x1ee)][_0x3c9877(0x1f4)]===0x1;}async[_0x300e0a(0x206)](_0x43fb38){const _0x1e44f6=_0x300e0a,{unitId:_0x57766b}=_0x43fb38,_0x361add=_0x43fb38[_0x1e44f6(0x1cd)],_0x343c90={'memberId':this['_userService'][_0x1e44f6(0x202)]()[_0x1e44f6(0x1ca)],'unitId':_0x57766b,'threadId':_0x361add,'solved':_0x43fb38['resolved']?I[_0x1e44f6(0x1ff)]:I[_0x1e44f6(0x1ec)]},_0x2cd0d8=await this[_0x1e44f6(0x1ce)][_0x1e44f6(0x1d9)](_0x1e44f6(0x1b8)+_0x57766b+_0x1e44f6(0x21e),{'body':_0x343c90});return!_0x2cd0d8['body'][_0x1e44f6(0x1ee)]||_0x2cd0d8[_0x1e44f6(0x217)]['error'][_0x1e44f6(0x1f4)]===0x1;}async[_0x300e0a(0x223)](_0xc21a5d,_0x11c264,_0x522375,_0x3bb0f4){const _0x1928f0=_0x300e0a,_0x3acf89={'memberId':(await this['_sessionService'][_0x1928f0(0x1c5)](_0xc21a5d))[_0x1928f0(0x21d)](),'threadId':_0x522375,'replyId':_0x3bb0f4,'unitId':_0xc21a5d},_0x53fc98=await this[_0x1928f0(0x1ce)]['post']('/universer-api/comment/unit/'+_0xc21a5d+'/delete',{'body':_0x3acf89});return!_0x53fc98['body']['error']||_0x53fc98['body'][_0x1928f0(0x1ee)][_0x1928f0(0x1f4)]===0x1;}async['listComments'](_0x338cfb,_0x4f5630,_0x26a182){const _0x416e25=_0x300e0a,_0x3584e7={'unitId':_0x338cfb,'threadId':_0x26a182},_0x3394f2=await this['_httpService'][_0x416e25(0x1d9)]('/universer-api/comment/unit/'+_0x338cfb+_0x416e25(0x1f3),{'body':_0x3584e7}),_0x3f669e=_0x26a182[_0x416e25(0x1da)](_0x172b7a=>G(_0x3394f2[_0x416e25(0x217)][_0x416e25(0x1d2)][_0x172b7a],_0x338cfb,_0x4f5630))['filter'](Boolean);return Object[_0x416e25(0x207)](_0x3394f2[_0x416e25(0x217)][_0x416e25(0x1dc)])[_0x416e25(0x22a)](_0x16ae48=>{const _0x40b230=_0x416e25;this[_0x40b230(0x20b)][_0x40b230(0x1be)](_0x16ae48);}),_0x3f669e;}[_0x300e0a(0x203)](_0x2d638d){const _0x5a054b=_0x300e0a;return{'id':_0x2d638d['id'],'threadId':_0x2d638d[_0x5a054b(0x1cd)],'ref':_0x2d638d['ref']};}};p=x([C(0x0,c[_0x300e0a(0x219)](P[_0x300e0a(0x214)])),C(0x1,c['Inject'](c[_0x300e0a(0x222)])),C(0x2,c[_0x300e0a(0x219)](b[_0x300e0a(0x1c8)]))],p);var H=Object[_0x300e0a(0x21b)],J=(_0x4df243,_0x2c336e,_0x3232de,_0x16199c)=>{for(var _0x2c8d4b=_0x16199c>0x1?void 0x0:_0x16199c?H(_0x2c336e,_0x3232de):_0x2c336e,_0x4846b5=_0x4df243['length']-0x1,_0x498dea;_0x4846b5>=0x0;_0x4846b5--)(_0x498dea=_0x4df243[_0x4846b5])&&(_0x2c8d4b=_0x498dea(_0x2c8d4b)||_0x2c8d4b);return _0x2c8d4b;},y=(_0x557a78,_0x35ba0d)=>(_0x52e5dd,_0x2cc517)=>_0x35ba0d(_0x52e5dd,_0x2cc517,_0x557a78);let g=class extends c[_0x300e0a(0x216)]{constructor(_0x1cbed1,_0x2fa0ab){const _0x106779=_0x300e0a;super(),this[_0x106779(0x221)]=_0x1cbed1,this[_0x106779(0x212)]=_0x2fa0ab,this[_0x106779(0x210)]();}['_initDataSource'](){const _0x178a98=_0x300e0a;this['_threadCommentDataSourceService'][_0x178a98(0x1bc)]=this['_threadCommentDataSource'],this[_0x178a98(0x221)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x300e0a(0x228)]),y(0x1,c[_0x300e0a(0x219)](p))],g);var F=Object[_0x300e0a(0x1ed)],L=Object[_0x300e0a(0x21b)],Z=(_0x4f9909,_0x76e972,_0x5efbf0)=>_0x76e972 in _0x4f9909?F(_0x4f9909,_0x76e972,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5efbf0}):_0x4f9909[_0x76e972]=_0x5efbf0,W=(_0x14f27f,_0x23d8c8,_0x2474c0,_0x26b405)=>{const _0x469156=_0x300e0a;for(var _0xe89b11=_0x26b405>0x1?void 0x0:_0x26b405?L(_0x23d8c8,_0x2474c0):_0x23d8c8,_0xa39baf=_0x14f27f[_0x469156(0x1c3)]-0x1,_0x4f503c;_0xa39baf>=0x0;_0xa39baf--)(_0x4f503c=_0x14f27f[_0xa39baf])&&(_0xe89b11=_0x4f503c(_0xe89b11)||_0xe89b11);return _0xe89b11;},O=(_0x24ba6f,_0x524d81)=>(_0x5aa416,_0x176a55)=>_0x524d81(_0x5aa416,_0x176a55,_0x24ba6f),N=(_0x3787f2,_0x12288e,_0x407093)=>Z(_0x3787f2,typeof _0x12288e!='symbol'?_0x12288e+'':_0x12288e,_0x407093);exports[_0x300e0a(0x1d7)]=class extends c[_0x300e0a(0x20f)]{constructor(_0x46466c=D,_0xb4517f,_0x5d1930){const _0x220c72=_0x300e0a;super(),this[_0x220c72(0x1f5)]=_0x46466c,this[_0x220c72(0x1f6)]=_0xb4517f,this[_0x220c72(0x1e4)]=_0x5d1930;const {..._0x4ba59c}=c[_0x220c72(0x218)]({},D,this[_0x220c72(0x1f5)]);this[_0x220c72(0x1e4)]['setConfig'](q,_0x4ba59c);}[_0x300e0a(0x1cf)](){const _0x2a5cda=_0x300e0a;[[p],[g],[_]][_0x2a5cda(0x22a)](_0x10b2ca=>{const _0x20efd=_0x2a5cda;this['_injector'][_0x20efd(0x1d0)](_0x10b2ca);});}[_0x300e0a(0x1bd)](){const _0x2944d1=_0x300e0a;this[_0x2944d1(0x1f6)]['get'](g),this[_0x2944d1(0x1f6)][_0x2944d1(0x1df)](_);}},N(exports[_0x300e0a(0x1d7)],_0x300e0a(0x1f7),U),N(exports[_0x300e0a(0x1d7)],'type',c[_0x300e0a(0x1d3)]['UNIVER_UNKNOWN']),exports[_0x300e0a(0x1d7)]=W([c[_0x300e0a(0x1f9)](w[_0x300e0a(0x227)],b[_0x300e0a(0x1db)],T['UniverLicensePlugin']),O(0x1,c[_0x300e0a(0x219)](c[_0x300e0a(0x1ef)])),O(0x2,c[_0x300e0a(0x1b9)])],exports[_0x300e0a(0x1d7)]);
1
+ 'use strict';const _0x22b0fc=_0x2e9b;(function(_0x1bfecf,_0x1f000c){const _0x5e8af1=_0x2e9b,_0x444723=_0x1bfecf();while(!![]){try{const _0x115f45=parseInt(_0x5e8af1(0x9d))/0x1*(-parseInt(_0x5e8af1(0x71))/0x2)+parseInt(_0x5e8af1(0xab))/0x3+-parseInt(_0x5e8af1(0x76))/0x4*(-parseInt(_0x5e8af1(0x8b))/0x5)+parseInt(_0x5e8af1(0xa1))/0x6*(parseInt(_0x5e8af1(0xe2))/0x7)+-parseInt(_0x5e8af1(0xe1))/0x8+parseInt(_0x5e8af1(0x89))/0x9*(-parseInt(_0x5e8af1(0xb1))/0xa)+parseInt(_0x5e8af1(0xda))/0xb;if(_0x115f45===_0x1f000c)break;else _0x444723['push'](_0x444723['shift']());}catch(_0x187edc){_0x444723['push'](_0x444723['shift']());}}}(_0x21d3,0xac78e));Object[_0x22b0fc(0x6f)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x13566e=>(_0x13566e[_0x13566e[_0x22b0fc(0x8e)]=0x0]=_0x22b0fc(0x8e),_0x13566e[_0x13566e['Solved']=0x1]=_0x22b0fc(0x7a),_0x13566e[_0x13566e[_0x22b0fc(0xdb)]=-0x1]='UNRECOGNIZED',_0x13566e))(I||{}),v=(_0x41c27d=>(_0x41c27d[_0x41c27d['Unknown']=0x0]=_0x22b0fc(0x7c),_0x41c27d[_0x41c27d[_0x22b0fc(0x78)]=0x1]=_0x22b0fc(0x78),_0x41c27d[_0x41c27d[_0x22b0fc(0xb6)]=0x2]='Reply',_0x41c27d[_0x41c27d[_0x22b0fc(0xa2)]=0x3]=_0x22b0fc(0xa2),_0x41c27d[_0x41c27d[_0x22b0fc(0x70)]=0x4]=_0x22b0fc(0x70),_0x41c27d[_0x41c27d[_0x22b0fc(0x91)]=0x5]=_0x22b0fc(0x91),_0x41c27d[_0x41c27d[_0x22b0fc(0xdb)]=-0x1]=_0x22b0fc(0xdb),_0x41c27d))(v||{});const f=_0x1662c4=>c[_0x22b0fc(0x9b)](new Date(+_0x1662c4))[_0x22b0fc(0xa5)](_0x22b0fc(0xc9)),R=async(_0xf1341d,_0x3abd40)=>{const _0x22536a=_0x22b0fc,_0x53b1b6=_0xf1341d[_0x22536a(0xc3)](c[_0x22536a(0x9f)]),_0x191aeb=_0xf1341d[_0x22536a(0xc3)](P[_0x22536a(0x73)]);_0x3abd40[_0x22536a(0xdd)](_0x495087=>{const _0x13da5c=_0x22536a;_0x53b1b6[_0x13da5c(0xd9)](_0x495087)&&_0x3abd40[_0x13da5c(0x7f)](_0x495087);}),_0x3abd40[_0x22536a(0x8a)]&&(await _0x191aeb['get'](_0x22536a(0x7e),{'params':{'userIDs':[..._0x3abd40]}}))['body'][_0x22536a(0xb8)][_0x22536a(0xdd)](_0x2573c1=>{_0x2573c1&&_0x53b1b6['addUser'](_0x2573c1);});};function _0x2e9b(_0x2ecc66,_0x53c78d){const _0x21d3f7=_0x21d3();return _0x2e9b=function(_0x2e9bc1,_0x14f065){_0x2e9bc1=_0x2e9bc1-0x6a;let _0x4e0a89=_0x21d3f7[_0x2e9bc1];return _0x4e0a89;},_0x2e9b(_0x2ecc66,_0x53c78d);}var $=Object[_0x22b0fc(0x94)],E=(_0x28efad,_0x57d508,_0x5a28e0,_0x49d627)=>{const _0x3ee7dd=_0x22b0fc;for(var _0x57f96f=_0x49d627>0x1?void 0x0:_0x49d627?$(_0x57d508,_0x5a28e0):_0x57d508,_0x11ec4f=_0x28efad[_0x3ee7dd(0xa0)]-0x1,_0x466e89;_0x11ec4f>=0x0;_0x11ec4f--)(_0x466e89=_0x28efad[_0x11ec4f])&&(_0x57f96f=_0x466e89(_0x57f96f)||_0x57f96f);return _0x57f96f;},S=(_0x4e463b,_0x3deff3)=>(_0x3c9bc8,_0x1f3ffa)=>_0x3deff3(_0x3c9bc8,_0x1f3ffa,_0x4e463b);let _=class extends c['Disposable']{constructor(_0x676dd5,_0x44718c,_0x44c84b,_0x4aad3b){const _0x26bd3b=_0x22b0fc;super(),this[_0x26bd3b(0x6b)]=_0x676dd5,this[_0x26bd3b(0xca)]=_0x44718c,this[_0x26bd3b(0xa6)]=_0x44c84b,this[_0x26bd3b(0xa9)]=_0x4aad3b,this[_0x26bd3b(0xba)](),this[_0x26bd3b(0xaa)]();}['_initUserSync'](){const _0x4dd5ae=_0x22b0fc;this['disposeWithMe'](this['_threadCommentModel'][_0x4dd5ae(0xd6)][_0x4dd5ae(0xdc)](j[_0x4dd5ae(0xc0)](0x10))[_0x4dd5ae(0xd7)](_0x1b7526=>{const _0x4ea2a2=_0x4dd5ae,_0x3b152d=new Set();_0x1b7526[_0x4ea2a2(0xdd)](_0x1dd5e1=>{const _0x4ffb5d=_0x4ea2a2;switch(_0x1dd5e1[_0x4ffb5d(0x81)]){case _0x4ffb5d(0xb7):{const _0xe8703b=_0x1dd5e1[_0x4ffb5d(0x99)]['personId'];_0x3b152d[_0x4ffb5d(0xb7)](_0xe8703b);break;}}}),R(this[_0x4ea2a2(0xa9)],_0x3b152d);}));}[_0x22b0fc(0xba)](){const _0x4d8492=_0x22b0fc;this['disposeWithMe'](this[_0x4d8492(0x6b)][_0x4d8492(0xd6)][_0x4d8492(0xd7)](async _0x351f51=>{const _0x4dee7c=_0x4d8492;var _0x20dbe7,_0x15b0f3,_0x16ceb6,_0x159a6c;const _0x32a2f3=(_0x20dbe7=this[_0x4dee7c(0xca)][_0x4dee7c(0x92)](_0x351f51[_0x4dee7c(0xd1)])[_0x4dee7c(0xe0)](_0x4daa34=>_0x4daa34[_0x4dee7c(0xac)]===_0x351f51[_0x4dee7c(0xac)]))==null?void 0x0:_0x20dbe7[_0x4dee7c(0xc5)];if(!_0x32a2f3)return;const {unitId:_0x4f6a98,subUnitId:_0x58b07c}=_0x32a2f3;switch(_0x351f51[_0x4dee7c(0xde)]&&this['_userService'][_0x4dee7c(0xd0)](_0x351f51['user']),_0x351f51[_0x4dee7c(0x81)]){case v['Add']:break;case v[_0x4dee7c(0xb6)]:{this['_threadCommentModel'][_0x4dee7c(0x85)](_0x4f6a98,_0x58b07c,{'unitId':_0x4f6a98,'subUnitId':_0x58b07c,'ref':'','id':_0x351f51[_0x4dee7c(0x82)],'dT':f(+_0x351f51[_0x4dee7c(0xaf)]),'threadId':_0x351f51['threadId'],'personId':(_0x16ceb6=(_0x15b0f3=_0x351f51[_0x4dee7c(0xde)])==null?void 0x0:_0x15b0f3[_0x4dee7c(0xb2)])!=null?_0x16ceb6:_0x351f51['userId'],'text':JSON[_0x4dee7c(0xa7)](_0x351f51[_0x4dee7c(0x6d)]),'parentId':_0x32a2f3['id']});break;}case v[_0x4dee7c(0x70)]:{const _0x23384c=this['_threadCommentModel'][_0x4dee7c(0xd3)](_0x4f6a98,_0x58b07c,_0x351f51[_0x4dee7c(0x82)]);_0x23384c&&_0x23384c[_0x4dee7c(0xae)]&&this[_0x4dee7c(0xca)]['deleteComment'](_0x4f6a98,_0x58b07c,_0x351f51['replyId']);break;}case v[_0x4dee7c(0xa2)]:{this[_0x4dee7c(0xca)][_0x4dee7c(0x90)](_0x4f6a98,_0x58b07c,{'commentId':_0x351f51['replyId'],'text':JSON[_0x4dee7c(0xa7)](_0x351f51[_0x4dee7c(0x6d)])});break;}case v[_0x4dee7c(0x91)]:{const _0xa3fb9a=(_0x159a6c=this[_0x4dee7c(0xca)]['getUnit'](_0x351f51[_0x4dee7c(0xd1)])[_0x4dee7c(0xe0)](_0x14839e=>_0x14839e[_0x4dee7c(0xac)]===_0x351f51['threadId']))==null?void 0x0:_0x159a6c['root'];_0xa3fb9a&&this[_0x4dee7c(0xca)]['resolveComment'](_0x4f6a98,_0x58b07c,_0xa3fb9a['id'],_0x351f51[_0x4dee7c(0x7b)]===I[_0x4dee7c(0x7a)]);break;}}}));}};_=E([S(0x0,c[_0x22b0fc(0xd2)](b[_0x22b0fc(0x72)])),S(0x1,c[_0x22b0fc(0xd2)](M[_0x22b0fc(0x98)])),S(0x2,c['Inject'](c[_0x22b0fc(0x9f)])),S(0x3,c['Inject'](c[_0x22b0fc(0x7d)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x22b0fc(0x94)],x=(_0x2eb70e,_0x12b6ce,_0x534eeb,_0x671dc0)=>{for(var _0x509b4a=_0x671dc0>0x1?void 0x0:_0x671dc0?A(_0x12b6ce,_0x534eeb):_0x12b6ce,_0x1bbb0d=_0x2eb70e['length']-0x1,_0x367757;_0x1bbb0d>=0x0;_0x1bbb0d--)(_0x367757=_0x2eb70e[_0x1bbb0d])&&(_0x509b4a=_0x367757(_0x509b4a)||_0x509b4a);return _0x509b4a;},C=(_0x2cd3d3,_0xeb3e20)=>(_0x26e704,_0x3f4787)=>_0xeb3e20(_0x26e704,_0x3f4787,_0x2cd3d3);function Y(_0x445138,_0x504f4b){const _0x5b60c8=_0x22b0fc,_0x5a547e=_0x445138[_0x5b60c8(0x87)][0x0];return{..._0x504f4b,'id':_0x5a547e['replyId'],'resolved':_0x445138[_0x5b60c8(0x7b)]===0x1,'dT':f(_0x5a547e[_0x5b60c8(0xaf)]),'personId':_0x5a547e[_0x5b60c8(0xbe)],'threadId':_0x5a547e[_0x5b60c8(0xac)]};}function _0x21d3(){const _0x2e58d7=['users','saveCommentToSnapshot','_init','COMMENT','code','deleteComment','userId','/reply','bufferTime','comments','filter','get','stringify','root','UniverThreadCommentDataSourcePlugin','customRanges','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','_threadCommentModel','onReady','error','reply','_sessionService','rangeId','addUser','unitId','Inject','getComment','Plugin','/list','commentUpdate$','subscribe','UniverLicensePlugin','getUser','3767786FmFmtf','UNRECOGNIZED','pipe','forEach','user','/delete','find','4466976ogxkbu','486829JddnUg','getMemberID','requireSession','_commentService','_initDataSource','content','symbol','defineProperty','Delete','3238syNWwN','CommentService','HTTPService','_httpService','IThreadCommentDataSourceService','668uiEmmR','/universer-api/comment/unit/','Add','_threadCommentDataSource','Solved','solved','Unknown','Injector','/universer-api/user/list','delete','values','type','replyId','/add','ref','addComment','pluginName','replies','_threadCommentDataSourceService','56529lHPpFy','size','13045kgUrNd','/edit','map','OpenOrReOpen','CustomRangeType','updateComment','Solve','getUnit','_configService','getOwnPropertyDescriptor','UNIVER_UNKNOWN','rangeType','listComments','ThreadCommentModel','payload','body','dayjs','onStarting','245citjGS','resolveComment','UserManagerService','length','6PDcpoN','Edit','merge','UniverInstanceType','format','_userService','parse','Disposable','_injector','_initUserSync','4005060YgKKKE','threadId','post','parentId','createTimestamp','IConfigService','830HCJnFI','userID','setConfig','_config','DependentOn','Reply','add'];_0x21d3=function(){return _0x2e58d7;};return _0x21d3();}function G(_0x213e12,_0x2f33e2,_0x2b48b4){const _0x211bf2=_0x22b0fc;var _0x30cfe8,_0x18acee;if(((_0x18acee=(_0x30cfe8=_0x213e12==null?void 0x0:_0x213e12[_0x211bf2(0x87)])==null?void 0x0:_0x30cfe8['length'])!=null?_0x18acee:0x0)>0x0){const _0x439be5=(_0x44e1c8,_0x2e0d72)=>({'id':_0x44e1c8[_0x211bf2(0x82)],'threadId':_0x44e1c8[_0x211bf2(0xac)],'dT':f(_0x44e1c8[_0x211bf2(0xaf)]),'personId':_0x44e1c8[_0x211bf2(0xbe)],'resolved':_0x213e12[_0x211bf2(0x7b)]===I[_0x211bf2(0x7a)],'unitId':_0x2f33e2,'subUnitId':_0x2b48b4,'text':JSON[_0x211bf2(0xa7)](_0x44e1c8[_0x211bf2(0x6d)]),'parentId':_0x2e0d72}),_0x857a73=_0x439be5(_0x213e12[_0x211bf2(0x87)][0x0]);return{..._0x857a73,'children':_0x213e12[_0x211bf2(0x87)]['slice'](0x1)['map'](_0x149ff9=>_0x439be5(_0x149ff9,_0x857a73['id']))};}return null;}let p=class{constructor(_0x173f9b,_0x10773b,_0x5288ea){const _0x1e3ad3=_0x22b0fc;this[_0x1e3ad3(0x74)]=_0x173f9b,this['_userService']=_0x10773b,this[_0x1e3ad3(0xce)]=_0x5288ea;}async[_0x22b0fc(0x85)](_0x204b40){const _0xe8a276=_0x22b0fc;var _0x545ba6,_0x20b72a;const {parentId:_0x55330b,unitId:_0xddb54f,text:_0x53e1f0,threadId:_0x26a76e}=_0x204b40,_0x1f14fe=(_0x20b72a=(_0x545ba6=_0x53e1f0[_0xe8a276(0xc7)])==null?void 0x0:_0x545ba6[_0xe8a276(0xc2)](_0x399ebd=>_0x399ebd[_0xe8a276(0x96)]===c[_0xe8a276(0x8f)]['COMMENT'])[_0xe8a276(0x8d)](_0x16ef26=>_0x16ef26[_0xe8a276(0xcf)]))!=null?_0x20b72a:[],_0x4de280=JSON[_0xe8a276(0xc4)](_0x53e1f0),_0x36141f=(await this['_sessionService'][_0xe8a276(0x6a)](_0xddb54f))[_0xe8a276(0xe3)]();if(_0x55330b){const _0x1385c7={'memberId':_0x36141f,'unitId':_0xddb54f,'content':_0x4de280,'mention':_0x1f14fe,'threadId':_0x26a76e},_0x3a8ce1=(await this[_0xe8a276(0x74)][_0xe8a276(0xad)]('/universer-api/comment/unit/'+_0xddb54f+_0xe8a276(0xbf),{'body':_0x1385c7}))[_0xe8a276(0x9a)][_0xe8a276(0xcd)];return{..._0x204b40,'id':_0x3a8ce1[_0xe8a276(0x82)],'dT':c['dayjs'](+_0x3a8ce1[_0xe8a276(0xaf)])[_0xe8a276(0xa5)](_0xe8a276(0xc9)),'personId':_0x3a8ce1[_0xe8a276(0xbe)]};}else{const _0xae6467={'memberId':_0x36141f,'unitId':_0xddb54f,'content':_0x4de280,'mention':_0x1f14fe},_0x295ca2=await this[_0xe8a276(0x74)][_0xe8a276(0xad)](_0xe8a276(0x77)+_0xddb54f+_0xe8a276(0x83),{'body':_0xae6467});return Y(_0x295ca2[_0xe8a276(0x9a)]['comment'],_0x204b40);}}async[_0x22b0fc(0x90)](_0x1310b3){const _0x375aa5=_0x22b0fc;var _0x276180,_0x20c638;const {text:_0x5e8e8d,unitId:_0x17d11f}=_0x1310b3,_0x32b86a=(_0x20c638=(_0x276180=_0x5e8e8d[_0x375aa5(0xc7)])==null?void 0x0:_0x276180[_0x375aa5(0xc2)](_0x1d01bc=>_0x1d01bc[_0x375aa5(0x96)]===c['CustomRangeType'][_0x375aa5(0xbb)])[_0x375aa5(0x8d)](_0xfdd556=>_0xfdd556[_0x375aa5(0xcf)]))!=null?_0x20c638:[],_0x2442b0=JSON[_0x375aa5(0xc4)](_0x5e8e8d),_0x13b700=_0x1310b3[_0x375aa5(0xac)],_0xca9d08=_0x1310b3['id'],_0x43ddc5={'memberId':(await this[_0x375aa5(0xce)][_0x375aa5(0x6a)](_0x17d11f))[_0x375aa5(0xe3)](),'unitId':_0x17d11f,'threadId':_0x13b700,'mention':_0x32b86a,'content':_0x2442b0,'replyId':_0xca9d08},_0x4f88d4=await this['_httpService'][_0x375aa5(0xad)](_0x375aa5(0x77)+_0x17d11f+_0x375aa5(0x8c),{'body':_0x43ddc5});return!_0x4f88d4[_0x375aa5(0x9a)][_0x375aa5(0xcc)]||_0x4f88d4['body']['error'][_0x375aa5(0xbc)]===0x1;}async[_0x22b0fc(0x9e)](_0x53193f){const _0xfd830b=_0x22b0fc,{unitId:_0x5bc07e}=_0x53193f,_0x42e7a3=_0x53193f[_0xfd830b(0xac)],_0x2123df={'memberId':this[_0xfd830b(0xa6)]['getCurrentUser']()[_0xfd830b(0xb2)],'unitId':_0x5bc07e,'threadId':_0x42e7a3,'solved':_0x53193f['resolved']?I[_0xfd830b(0x7a)]:I[_0xfd830b(0x8e)]},_0x178b47=await this[_0xfd830b(0x74)][_0xfd830b(0xad)]('/universer-api/comment/unit/'+_0x5bc07e+'/solved',{'body':_0x2123df});return!_0x178b47['body']['error']||_0x178b47[_0xfd830b(0x9a)][_0xfd830b(0xcc)][_0xfd830b(0xbc)]===0x1;}async[_0x22b0fc(0xbd)](_0x49eae1,_0xd2950c,_0x3bd6bb,_0x3a7cd1){const _0x336a44=_0x22b0fc,_0x27a6bc={'memberId':(await this[_0x336a44(0xce)][_0x336a44(0x6a)](_0x49eae1))['getMemberID'](),'threadId':_0x3bd6bb,'replyId':_0x3a7cd1,'unitId':_0x49eae1},_0x45a4be=await this[_0x336a44(0x74)]['post'](_0x336a44(0x77)+_0x49eae1+_0x336a44(0xdf),{'body':_0x27a6bc});return!_0x45a4be[_0x336a44(0x9a)]['error']||_0x45a4be[_0x336a44(0x9a)][_0x336a44(0xcc)]['code']===0x1;}async[_0x22b0fc(0x97)](_0x258cb9,_0x4dc32a,_0x465a04){const _0x496cb4=_0x22b0fc,_0x39a3a2={'unitId':_0x258cb9,'threadId':_0x465a04},_0x527010=await this[_0x496cb4(0x74)][_0x496cb4(0xad)](_0x496cb4(0x77)+_0x258cb9+_0x496cb4(0xd5),{'body':_0x39a3a2}),_0x213c3d=_0x465a04[_0x496cb4(0x8d)](_0x268422=>G(_0x527010[_0x496cb4(0x9a)][_0x496cb4(0xc1)][_0x268422],_0x258cb9,_0x4dc32a))[_0x496cb4(0xc2)](Boolean);return Object[_0x496cb4(0x80)](_0x527010['body'][_0x496cb4(0xb8)])[_0x496cb4(0xdd)](_0x5e0b50=>{this['_userService']['addUser'](_0x5e0b50);}),_0x213c3d;}[_0x22b0fc(0xb9)](_0x463578){const _0x3f5eee=_0x22b0fc;return{'id':_0x463578['id'],'threadId':_0x463578[_0x3f5eee(0xac)],'ref':_0x463578[_0x3f5eee(0x84)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x22b0fc(0xd2)](c[_0x22b0fc(0x9f)])),C(0x2,c[_0x22b0fc(0xd2)](b['CollaborationSessionService']))],p);var H=Object[_0x22b0fc(0x94)],J=(_0x3cb001,_0x5e3420,_0x1bbf30,_0x1e3c0b)=>{for(var _0x126550=_0x1e3c0b>0x1?void 0x0:_0x1e3c0b?H(_0x5e3420,_0x1bbf30):_0x5e3420,_0x37f2d4=_0x3cb001['length']-0x1,_0x9bee4a;_0x37f2d4>=0x0;_0x37f2d4--)(_0x9bee4a=_0x3cb001[_0x37f2d4])&&(_0x126550=_0x9bee4a(_0x126550)||_0x126550);return _0x126550;},y=(_0x5c2892,_0x1d9976)=>(_0x1dd07c,_0x56fe89)=>_0x1d9976(_0x1dd07c,_0x56fe89,_0x5c2892);let g=class extends c[_0x22b0fc(0xa8)]{constructor(_0x1951ad,_0x45256c){const _0x44a84c=_0x22b0fc;super(),this[_0x44a84c(0x88)]=_0x1951ad,this[_0x44a84c(0x79)]=_0x45256c,this[_0x44a84c(0x6c)]();}[_0x22b0fc(0x6c)](){const _0x49715d=_0x22b0fc;this[_0x49715d(0x88)]['dataSource']=this['_threadCommentDataSource'],this[_0x49715d(0x88)][_0x49715d(0xc8)]=!0x1;}};g=J([y(0x0,M[_0x22b0fc(0x75)]),y(0x1,c[_0x22b0fc(0xd2)](p))],g);var F=Object[_0x22b0fc(0x6f)],L=Object[_0x22b0fc(0x94)],Z=(_0x28b540,_0x6d818a,_0x5f3256)=>_0x6d818a in _0x28b540?F(_0x28b540,_0x6d818a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f3256}):_0x28b540[_0x6d818a]=_0x5f3256,W=(_0x12f8f4,_0x2daa4f,_0x2ee54e,_0x202a07)=>{const _0x1becb9=_0x22b0fc;for(var _0x2c2626=_0x202a07>0x1?void 0x0:_0x202a07?L(_0x2daa4f,_0x2ee54e):_0x2daa4f,_0x43ee2a=_0x12f8f4[_0x1becb9(0xa0)]-0x1,_0x383167;_0x43ee2a>=0x0;_0x43ee2a--)(_0x383167=_0x12f8f4[_0x43ee2a])&&(_0x2c2626=_0x383167(_0x2c2626)||_0x2c2626);return _0x2c2626;},O=(_0x40b431,_0x1dcaeb)=>(_0x434a8e,_0x4d9101)=>_0x1dcaeb(_0x434a8e,_0x4d9101,_0x40b431),N=(_0x57ca8b,_0x392674,_0x29e06c)=>Z(_0x57ca8b,typeof _0x392674!=_0x22b0fc(0x6e)?_0x392674+'':_0x392674,_0x29e06c);exports[_0x22b0fc(0xc6)]=class extends c[_0x22b0fc(0xd4)]{constructor(_0x2db676=D,_0x125fb4,_0x495fd3){const _0x5160ea=_0x22b0fc;super(),this[_0x5160ea(0xb4)]=_0x2db676,this[_0x5160ea(0xa9)]=_0x125fb4,this[_0x5160ea(0x93)]=_0x495fd3;const {..._0xd0b2a7}=c[_0x5160ea(0xa3)]({},D,this['_config']);this['_configService'][_0x5160ea(0xb3)](q,_0xd0b2a7);}[_0x22b0fc(0x9c)](){const _0x71e3bc=_0x22b0fc;[[p],[g],[_]][_0x71e3bc(0xdd)](_0x36ea8=>{const _0x124393=_0x71e3bc;this[_0x124393(0xa9)][_0x124393(0xb7)](_0x36ea8);});}[_0x22b0fc(0xcb)](){const _0x274e1f=_0x22b0fc;this[_0x274e1f(0xa9)]['get'](g),this[_0x274e1f(0xa9)][_0x274e1f(0xc3)](_);}},N(exports[_0x22b0fc(0xc6)],_0x22b0fc(0x86),U),N(exports[_0x22b0fc(0xc6)],'type',c[_0x22b0fc(0xa4)][_0x22b0fc(0x95)]),exports[_0x22b0fc(0xc6)]=W([c[_0x22b0fc(0xb5)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x22b0fc(0xd8)]),O(0x1,c[_0x22b0fc(0xd2)](c['Injector'])),O(0x2,c[_0x22b0fc(0xb0)])],exports[_0x22b0fc(0xc6)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ebeec=_0x5475;(function(_0x5ac0e8,_0x1dd9f3){const _0x38ec79=_0x5475,_0x443fd8=_0x5ac0e8();while(!![]){try{const _0x49e857=-parseInt(_0x38ec79(0x21d))/0x1+parseInt(_0x38ec79(0x1e8))/0x2*(parseInt(_0x38ec79(0x1fb))/0x3)+parseInt(_0x38ec79(0x1e7))/0x4+-parseInt(_0x38ec79(0x207))/0x5+parseInt(_0x38ec79(0x1e1))/0x6+-parseInt(_0x38ec79(0x1df))/0x7+parseInt(_0x38ec79(0x1f2))/0x8;if(_0x49e857===_0x1dd9f3)break;else _0x443fd8['push'](_0x443fd8['shift']());}catch(_0x44a183){_0x443fd8['push'](_0x443fd8['shift']());}}}(_0x5c5a,0xa90bb));import{CommentService as _0x1f6c58,CollaborationSessionService as _0x504872,UniverCollaborationClientPlugin as _0x34845c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5499db}from'@univerjs-pro/license';import{dayjs as _0x4976ce,UserManagerService as _0x27743c,Inject as _0x5b1114,Injector as _0x304f84,Disposable as _0x235f20,CustomRangeType as _0x355712,UniverInstanceType as _0x26b6b5,DependentOn as _0x3e5e37,IConfigService as _0x3f1145,Plugin as _0x1bdb37,merge as _0x4ebb47}from'@univerjs/core';function _0x5c5a(){const _0x599780=['user','values','/universer-api/comment/unit/','Delete','subscribe','Reply','forEach','createTimestamp','36903uMlpUe','getUnit','requireSession','resolveComment','add','userID','/reply','pluginName','/list','map','thread-comment-data-source.config','comment','118980VqCiPM','_httpService','format','getCurrentUser','Solve','/solved','replyId','root','getUser','solved','saveCommentToSnapshot','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','replies','_configService','_init','users','_sessionService','YYYY/MM/DD\x20HH:mm','customRanges','getComment','950893MlWCRP','post','syncUpdateMutationToColla','_userService','type','_injector','onReady','_threadCommentModel','setConfig','length','Solved','size','get','_config','filter','UNIVER_UNKNOWN','body','getOwnPropertyDescriptor','parse','personId','updateComment','dataSource','deleteComment','/universer-api/user/list','addComment','COMMENT','content','stringify','userId','error','getMemberID','_threadCommentDataSource','9657298qFnhmA','Edit','6398526SBnUlG','disposeWithMe','addUser','find','Unknown','_commentService','5006576GPjDNK','14hmNIUf','parentId','code','OpenOrReOpen','UNRECOGNIZED','threadId','_initDataSource','reply','listComments','commentUpdate$','5140336edVlmL'];_0x5c5a=function(){return _0x599780;};return _0x5c5a();}import{UniverThreadCommentUIPlugin as _0x305dda}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ae424,IThreadCommentDataSourceService as _0x5b1ce4}from'@univerjs/thread-comment';import{bufferTime as _0x4f4405}from'rxjs';import{HTTPService as _0x44202b}from'@univerjs/network';const W=_0x1ebeec(0x213);var I=(_0x464222=>(_0x464222[_0x464222['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x464222[_0x464222['Solved']=0x1]=_0x1ebeec(0x1c9),_0x464222[_0x464222[_0x1ebeec(0x1ec)]=-0x1]='UNRECOGNIZED',_0x464222))(I||{}),v=(_0xb1ae7a=>(_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e5)]=0x0]='Unknown',_0xb1ae7a[_0xb1ae7a['Add']=0x1]='Add',_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1f8)]=0x2]=_0x1ebeec(0x1f8),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e0)]=0x3]=_0x1ebeec(0x1e0),_0xb1ae7a[_0xb1ae7a['Delete']=0x4]=_0x1ebeec(0x1f6),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x20b)]=0x5]=_0x1ebeec(0x20b),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1ec)]=-0x1]=_0x1ebeec(0x1ec),_0xb1ae7a))(v||{});function _0x5475(_0x23ca5e,_0x3823d6){const _0x5c5a75=_0x5c5a();return _0x5475=function(_0x5475d8,_0x1ed63f){_0x5475d8=_0x5475d8-0x1c6;let _0x56ff3d=_0x5c5a75[_0x5475d8];return _0x56ff3d;},_0x5475(_0x23ca5e,_0x3823d6);}const y=_0x93684b=>_0x4976ce(new Date(+_0x93684b))[_0x1ebeec(0x209)](_0x1ebeec(0x21a)),B=async(_0x2236a4,_0x26b189)=>{const _0x5a0aa3=_0x1ebeec,_0xfd806d=_0x2236a4[_0x5a0aa3(0x1cb)](_0x27743c),_0x27e736=_0x2236a4[_0x5a0aa3(0x1cb)](_0x44202b);_0x26b189[_0x5a0aa3(0x1f9)](_0x5730cf=>{const _0x555ef4=_0x5a0aa3;_0xfd806d[_0x555ef4(0x20f)](_0x5730cf)&&_0x26b189['delete'](_0x5730cf);}),_0x26b189[_0x5a0aa3(0x1ca)]&&(await _0x27e736[_0x5a0aa3(0x1cb)](_0x5a0aa3(0x1d6),{'params':{'userIDs':[..._0x26b189]}}))[_0x5a0aa3(0x1cf)]['users'][_0x5a0aa3(0x1f9)](_0x2ad441=>{const _0x2a6bbc=_0x5a0aa3;_0x2ad441&&_0xfd806d[_0x2a6bbc(0x1e3)](_0x2ad441);});};var K=Object[_0x1ebeec(0x1d0)],V=(_0x3c9e85,_0x32ed69,_0x1a4663,_0x135aa1)=>{const _0x327a45=_0x1ebeec;for(var _0x2e23a8=_0x135aa1>0x1?void 0x0:_0x135aa1?K(_0x32ed69,_0x1a4663):_0x32ed69,_0x5be39b=_0x3c9e85[_0x327a45(0x1c8)]-0x1,_0x3aca5f;_0x5be39b>=0x0;_0x5be39b--)(_0x3aca5f=_0x3c9e85[_0x5be39b])&&(_0x2e23a8=_0x3aca5f(_0x2e23a8)||_0x2e23a8);return _0x2e23a8;},p=(_0x4565cc,_0x25d65c)=>(_0x49a79c,_0x3008ee)=>_0x25d65c(_0x49a79c,_0x3008ee,_0x4565cc);let _=class extends _0x235f20{constructor(_0x13960,_0x515205,_0x11c552,_0x1f7cd8){const _0x5a938f=_0x1ebeec;super(),this[_0x5a938f(0x1e6)]=_0x13960,this[_0x5a938f(0x1c6)]=_0x515205,this[_0x5a938f(0x220)]=_0x11c552,this[_0x5a938f(0x222)]=_0x1f7cd8,this['_init'](),this[_0x5a938f(0x212)]();}[_0x1ebeec(0x212)](){const _0x593313=_0x1ebeec;this[_0x593313(0x1e2)](this[_0x593313(0x1c6)][_0x593313(0x1f1)]['pipe'](_0x4f4405(0x10))[_0x593313(0x1f7)](_0xfae94d=>{const _0x3fa5ea=_0x593313,_0x8fdcf8=new Set();_0xfae94d[_0x3fa5ea(0x1f9)](_0x3dae33=>{const _0x25abab=_0x3fa5ea;switch(_0x3dae33['type']){case _0x25abab(0x1ff):{const _0x249728=_0x3dae33['payload'][_0x25abab(0x1d2)];_0x8fdcf8['add'](_0x249728);break;}}}),B(this[_0x3fa5ea(0x222)],_0x8fdcf8);}));}[_0x1ebeec(0x217)](){const _0x27cddb=_0x1ebeec;this[_0x27cddb(0x1e2)](this[_0x27cddb(0x1e6)]['commentUpdate$'][_0x27cddb(0x1f7)](async _0x3a4d5a=>{const _0xeaeb04=_0x27cddb;var _0x3464bc,_0x30309a,_0x2c1aca,_0x1b9c7b;const _0x1f273f=(_0x3464bc=this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1fc)](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x2a487f=>_0x2a487f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x3464bc[_0xeaeb04(0x20e)];if(!_0x1f273f)return;const {unitId:_0x2064b3,subUnitId:_0x2d39a0}=_0x1f273f;switch(_0x3a4d5a[_0xeaeb04(0x1f3)]&&this['_userService'][_0xeaeb04(0x1e3)](_0x3a4d5a['user']),_0x3a4d5a[_0xeaeb04(0x221)]){case v['Add']:break;case v[_0xeaeb04(0x1f8)]:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d7)](_0x2064b3,_0x2d39a0,{'unitId':_0x2064b3,'subUnitId':_0x2d39a0,'ref':'','id':_0x3a4d5a[_0xeaeb04(0x20d)],'dT':y(+_0x3a4d5a[_0xeaeb04(0x1fa)]),'threadId':_0x3a4d5a[_0xeaeb04(0x1ed)],'personId':(_0x2c1aca=(_0x30309a=_0x3a4d5a[_0xeaeb04(0x1f3)])==null?void 0x0:_0x30309a[_0xeaeb04(0x200)])!=null?_0x2c1aca:_0x3a4d5a[_0xeaeb04(0x1db)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)]),'parentId':_0x1f273f['id']});break;}case v[_0xeaeb04(0x1f6)]:{const _0x1affaa=this['_threadCommentModel'][_0xeaeb04(0x21c)](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);_0x1affaa&&_0x1affaa[_0xeaeb04(0x1e9)]&&this[_0xeaeb04(0x1c6)]['deleteComment'](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);break;}case v['Edit']:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d3)](_0x2064b3,_0x2d39a0,{'commentId':_0x3a4d5a[_0xeaeb04(0x20d)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)])});break;}case v[_0xeaeb04(0x20b)]:{const _0x48e008=(_0x1b9c7b=this[_0xeaeb04(0x1c6)]['getUnit'](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x13d12f=>_0x13d12f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x1b9c7b[_0xeaeb04(0x20e)];_0x48e008&&this['_threadCommentModel'][_0xeaeb04(0x1fe)](_0x2064b3,_0x2d39a0,_0x48e008['id'],_0x3a4d5a[_0xeaeb04(0x210)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x5b1114(_0x1f6c58)),p(0x1,_0x5b1114(_0x1ae424)),p(0x2,_0x5b1114(_0x27743c)),p(0x3,_0x5b1114(_0x304f84))],_);const z=_0x1ebeec(0x205),O={};var k=Object[_0x1ebeec(0x1d0)],Q=(_0x4d3120,_0x56219d,_0x52e629,_0x12f9f7)=>{const _0x498c32=_0x1ebeec;for(var _0x1e2d99=_0x12f9f7>0x1?void 0x0:_0x12f9f7?k(_0x56219d,_0x52e629):_0x56219d,_0x39c0c3=_0x4d3120[_0x498c32(0x1c8)]-0x1,_0x3e1e6f;_0x39c0c3>=0x0;_0x39c0c3--)(_0x3e1e6f=_0x4d3120[_0x39c0c3])&&(_0x1e2d99=_0x3e1e6f(_0x1e2d99)||_0x1e2d99);return _0x1e2d99;},b=(_0x17d262,_0x144e4a)=>(_0xbba05b,_0x1a2d83)=>_0x144e4a(_0xbba05b,_0x1a2d83,_0x17d262);function X(_0xfe1494,_0x4d17d3){const _0x1e0dfa=_0x1ebeec,_0x2f06ea=_0xfe1494['replies'][0x0];return{..._0x4d17d3,'id':_0x2f06ea[_0x1e0dfa(0x20d)],'resolved':_0xfe1494['solved']===0x1,'dT':y(_0x2f06ea[_0x1e0dfa(0x1fa)]),'personId':_0x2f06ea['userId'],'threadId':_0x2f06ea[_0x1e0dfa(0x1ed)]};}function ee(_0x2c12ff,_0x14feb3,_0x4caa87){const _0x3dae58=_0x1ebeec;var _0x392c76,_0x2bb3e3;if(((_0x2bb3e3=(_0x392c76=_0x2c12ff==null?void 0x0:_0x2c12ff[_0x3dae58(0x215)])==null?void 0x0:_0x392c76['length'])!=null?_0x2bb3e3:0x0)>0x0){const _0x409538=(_0x5b1863,_0x558c71)=>({'id':_0x5b1863[_0x3dae58(0x20d)],'threadId':_0x5b1863[_0x3dae58(0x1ed)],'dT':y(_0x5b1863[_0x3dae58(0x1fa)]),'personId':_0x5b1863[_0x3dae58(0x1db)],'resolved':_0x2c12ff['solved']===I[_0x3dae58(0x1c9)],'unitId':_0x14feb3,'subUnitId':_0x4caa87,'text':JSON['parse'](_0x5b1863[_0x3dae58(0x1d9)]),'parentId':_0x558c71}),_0x59e06b=_0x409538(_0x2c12ff['replies'][0x0]);return{..._0x59e06b,'children':_0x2c12ff['replies']['slice'](0x1)[_0x3dae58(0x204)](_0x40a8a7=>_0x409538(_0x40a8a7,_0x59e06b['id']))};}return null;}let S=class{constructor(_0x44135f,_0x5eed35,_0x3b60be){const _0x2609b1=_0x1ebeec;this['_httpService']=_0x44135f,this['_userService']=_0x5eed35,this[_0x2609b1(0x219)]=_0x3b60be;}async[_0x1ebeec(0x1d7)](_0x8bc38b){const _0xfad78e=_0x1ebeec;var _0x37436e,_0x9a8707;const {parentId:_0x3f2ae5,unitId:_0x134922,text:_0x48d726,threadId:_0x18da6b}=_0x8bc38b,_0x40f900=(_0x9a8707=(_0x37436e=_0x48d726[_0xfad78e(0x21b)])==null?void 0x0:_0x37436e[_0xfad78e(0x1cd)](_0x3076d8=>_0x3076d8['rangeType']===_0x355712[_0xfad78e(0x1d8)])['map'](_0x279ed5=>_0x279ed5['rangeId']))!=null?_0x9a8707:[],_0x262413=JSON[_0xfad78e(0x1da)](_0x48d726),_0xd0663d=(await this['_sessionService'][_0xfad78e(0x1fd)](_0x134922))[_0xfad78e(0x1dd)]();if(_0x3f2ae5){const _0x5afc3e={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900,'threadId':_0x18da6b},_0x51aae4=(await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+_0xfad78e(0x201),{'body':_0x5afc3e}))[_0xfad78e(0x1cf)][_0xfad78e(0x1ef)];return{..._0x8bc38b,'id':_0x51aae4['replyId'],'dT':_0x4976ce(+_0x51aae4['createTimestamp'])[_0xfad78e(0x209)](_0xfad78e(0x21a)),'personId':_0x51aae4[_0xfad78e(0x1db)]};}else{const _0x30f488={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900},_0x17647a=await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+'/add',{'body':_0x30f488});return X(_0x17647a[_0xfad78e(0x1cf)][_0xfad78e(0x206)],_0x8bc38b);}}async[_0x1ebeec(0x1d3)](_0x551d08){const _0x56ee19=_0x1ebeec;var _0x37dbe7,_0x1af5ec;const {text:_0x1e1223,unitId:_0x54376f}=_0x551d08,_0x360311=(_0x1af5ec=(_0x37dbe7=_0x1e1223[_0x56ee19(0x21b)])==null?void 0x0:_0x37dbe7[_0x56ee19(0x1cd)](_0xbd864a=>_0xbd864a['rangeType']===_0x355712[_0x56ee19(0x1d8)])[_0x56ee19(0x204)](_0x24bb7d=>_0x24bb7d['rangeId']))!=null?_0x1af5ec:[],_0x46cd63=JSON[_0x56ee19(0x1da)](_0x1e1223),_0x8202a6=_0x551d08[_0x56ee19(0x1ed)],_0x3cf6ee=_0x551d08['id'],_0x337145={'memberId':(await this[_0x56ee19(0x219)]['requireSession'](_0x54376f))[_0x56ee19(0x1dd)](),'unitId':_0x54376f,'threadId':_0x8202a6,'mention':_0x360311,'content':_0x46cd63,'replyId':_0x3cf6ee},_0x23aff4=await this[_0x56ee19(0x208)][_0x56ee19(0x21e)](_0x56ee19(0x1f5)+_0x54376f+'/edit',{'body':_0x337145});return!_0x23aff4['body'][_0x56ee19(0x1dc)]||_0x23aff4[_0x56ee19(0x1cf)][_0x56ee19(0x1dc)][_0x56ee19(0x1ea)]===0x1;}async['resolveComment'](_0x17d2a4){const _0x7c84c4=_0x1ebeec,{unitId:_0x522862}=_0x17d2a4,_0x11876a=_0x17d2a4[_0x7c84c4(0x1ed)],_0xdb98cc={'memberId':this[_0x7c84c4(0x220)][_0x7c84c4(0x20a)]()[_0x7c84c4(0x200)],'unitId':_0x522862,'threadId':_0x11876a,'solved':_0x17d2a4['resolved']?I[_0x7c84c4(0x1c9)]:I[_0x7c84c4(0x1eb)]},_0x4b8528=await this[_0x7c84c4(0x208)][_0x7c84c4(0x21e)](_0x7c84c4(0x1f5)+_0x522862+_0x7c84c4(0x20c),{'body':_0xdb98cc});return!_0x4b8528[_0x7c84c4(0x1cf)]['error']||_0x4b8528[_0x7c84c4(0x1cf)][_0x7c84c4(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1d5)](_0xe0a60a,_0x5b64f3,_0x5d787e,_0x6849d){const _0x2ea290=_0x1ebeec,_0x413ea={'memberId':(await this[_0x2ea290(0x219)]['requireSession'](_0xe0a60a))['getMemberID'](),'threadId':_0x5d787e,'replyId':_0x6849d,'unitId':_0xe0a60a},_0xb6ef78=await this['_httpService'][_0x2ea290(0x21e)](_0x2ea290(0x1f5)+_0xe0a60a+'/delete',{'body':_0x413ea});return!_0xb6ef78[_0x2ea290(0x1cf)]['error']||_0xb6ef78[_0x2ea290(0x1cf)][_0x2ea290(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1f0)](_0x5c81c2,_0x57d614,_0x124094){const _0x35b33b=_0x1ebeec,_0x3e297d={'unitId':_0x5c81c2,'threadId':_0x124094},_0x1f540b=await this['_httpService'][_0x35b33b(0x21e)](_0x35b33b(0x1f5)+_0x5c81c2+_0x35b33b(0x203),{'body':_0x3e297d}),_0x232b4a=_0x124094[_0x35b33b(0x204)](_0xd1ca3=>ee(_0x1f540b[_0x35b33b(0x1cf)]['comments'][_0xd1ca3],_0x5c81c2,_0x57d614))['filter'](Boolean);return Object[_0x35b33b(0x1f4)](_0x1f540b['body'][_0x35b33b(0x218)])[_0x35b33b(0x1f9)](_0x4a4490=>{const _0x369498=_0x35b33b;this[_0x369498(0x220)][_0x369498(0x1e3)](_0x4a4490);}),_0x232b4a;}[_0x1ebeec(0x211)](_0x33f25b){return{'id':_0x33f25b['id'],'threadId':_0x33f25b['threadId'],'ref':_0x33f25b['ref']};}};S=Q([b(0x0,_0x5b1114(_0x44202b)),b(0x1,_0x5b1114(_0x27743c)),b(0x2,_0x5b1114(_0x504872))],S);var re=Object[_0x1ebeec(0x1d0)],te=(_0xf894b3,_0x4c4e9c,_0x6ea4a3,_0x4e5227)=>{const _0x19260b=_0x1ebeec;for(var _0x5af636=_0x4e5227>0x1?void 0x0:_0x4e5227?re(_0x4c4e9c,_0x6ea4a3):_0x4c4e9c,_0x2a4ea2=_0xf894b3[_0x19260b(0x1c8)]-0x1,_0x1581c7;_0x2a4ea2>=0x0;_0x2a4ea2--)(_0x1581c7=_0xf894b3[_0x2a4ea2])&&(_0x5af636=_0x1581c7(_0x5af636)||_0x5af636);return _0x5af636;},M=(_0x731712,_0x404def)=>(_0x2dd236,_0x18d032)=>_0x404def(_0x2dd236,_0x18d032,_0x731712);let f=class extends _0x235f20{constructor(_0x1566db,_0x5aaf05){const _0x4a990d=_0x1ebeec;super(),this['_threadCommentDataSourceService']=_0x1566db,this[_0x4a990d(0x1de)]=_0x5aaf05,this['_initDataSource']();}[_0x1ebeec(0x1ee)](){const _0x5423a6=_0x1ebeec;this[_0x5423a6(0x214)][_0x5423a6(0x1d4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5423a6(0x21f)]=!0x1;}};f=te([M(0x0,_0x5b1ce4),M(0x1,_0x5b1114(S))],f);var se=Object['defineProperty'],oe=Object[_0x1ebeec(0x1d0)],ne=(_0x3cc3f5,_0x35adc4,_0x43690c)=>_0x35adc4 in _0x3cc3f5?se(_0x3cc3f5,_0x35adc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43690c}):_0x3cc3f5[_0x35adc4]=_0x43690c,ie=(_0x959023,_0xd5c245,_0x2cf4bc,_0x492d6e)=>{const _0x1d530f=_0x1ebeec;for(var _0x4ab28d=_0x492d6e>0x1?void 0x0:_0x492d6e?oe(_0xd5c245,_0x2cf4bc):_0xd5c245,_0x419ee1=_0x959023[_0x1d530f(0x1c8)]-0x1,_0x763aac;_0x419ee1>=0x0;_0x419ee1--)(_0x763aac=_0x959023[_0x419ee1])&&(_0x4ab28d=_0x763aac(_0x4ab28d)||_0x4ab28d);return _0x4ab28d;},N=(_0x34f2a1,_0x156dcc)=>(_0x41c232,_0x400982)=>_0x156dcc(_0x41c232,_0x400982,_0x34f2a1),$=(_0x5494fe,_0x51502f,_0x42d85e)=>ne(_0x5494fe,typeof _0x51502f!='symbol'?_0x51502f+'':_0x51502f,_0x42d85e);let g=class extends _0x1bdb37{constructor(_0x4e6ccf=O,_0x2b80db,_0x412cfb){const _0x28f2c0=_0x1ebeec;super(),this['_config']=_0x4e6ccf,this[_0x28f2c0(0x222)]=_0x2b80db,this[_0x28f2c0(0x216)]=_0x412cfb;const {..._0x225fe3}=_0x4ebb47({},O,this[_0x28f2c0(0x1cc)]);this[_0x28f2c0(0x216)][_0x28f2c0(0x1c7)](z,_0x225fe3);}['onStarting'](){const _0x576f12=_0x1ebeec;[[S],[f],[_]][_0x576f12(0x1f9)](_0x5ab9c2=>{const _0x3dac2e=_0x576f12;this[_0x3dac2e(0x222)]['add'](_0x5ab9c2);});}[_0x1ebeec(0x223)](){const _0x1414f1=_0x1ebeec;this['_injector']['get'](f),this[_0x1414f1(0x222)]['get'](_);}};$(g,_0x1ebeec(0x202),W),$(g,'type',_0x26b6b5[_0x1ebeec(0x1ce)]),g=ie([_0x3e5e37(_0x305dda,_0x34845c,_0x5499db),N(0x1,_0x5b1114(_0x304f84)),N(0x2,_0x3f1145)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1d05bf=_0x1614;(function(_0x468413,_0x3d6942){const _0x4e9982=_0x1614,_0xb5c747=_0x468413();while(!![]){try{const _0x50621b=parseInt(_0x4e9982(0xb3))/0x1+parseInt(_0x4e9982(0x93))/0x2+parseInt(_0x4e9982(0xea))/0x3+parseInt(_0x4e9982(0xee))/0x4*(parseInt(_0x4e9982(0xd6))/0x5)+-parseInt(_0x4e9982(0xa6))/0x6*(parseInt(_0x4e9982(0xbe))/0x7)+-parseInt(_0x4e9982(0x9d))/0x8*(-parseInt(_0x4e9982(0xd2))/0x9)+-parseInt(_0x4e9982(0x91))/0xa*(parseInt(_0x4e9982(0xae))/0xb);if(_0x50621b===_0x3d6942)break;else _0xb5c747['push'](_0xb5c747['shift']());}catch(_0x453d69){_0xb5c747['push'](_0xb5c747['shift']());}}}(_0x3060,0x2b2f9));import{CommentService as _0xc41ade,CollaborationSessionService as _0x5c2147,UniverCollaborationClientPlugin as _0x2f4ea6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d88f5}from'@univerjs-pro/license';import{dayjs as _0x4cfb05,UserManagerService as _0xb203b6,Inject as _0x3b9053,Injector as _0x4549a3,Disposable as _0x32b8e3,CustomRangeType as _0x1261ad,UniverInstanceType as _0x7f2fa9,DependentOn as _0x339bdc,IConfigService as _0x50a798,Plugin as _0x761510,merge as _0x543ebe}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x272b59}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d8efc,IThreadCommentDataSourceService as _0x475030}from'@univerjs/thread-comment';import{bufferTime as _0x5d647c}from'rxjs';function _0x3060(){const _0x3e01f8=['comments','replyId','parentId','6jskLda','replies','format','subscribe','/add','deleteComment','_threadCommentDataSource','updateComment','4051993vRwCdP','syncUpdateMutationToColla','_httpService','Edit','Solve','222690GyNWrq','userID','slice','_configService','resolveComment','map','body','requireSession','_initUserSync','/universer-api/comment/unit/','Unknown','2278073ThaHyO','onStarting','getUser','rangeType','thread-comment-data-source.config','rangeId','user','_injector','getCurrentUser','content','UNRECOGNIZED','addComment','getComment','customRanges','OpenOrReOpen','code','size','COMMENT','pipe','_config','18wmfYTi','Solved','users','onReady','955ZEOBRj','find','userId','getOwnPropertyDescriptor','disposeWithMe','dataSource','commentUpdate$','symbol','reply','comment','/reply','_commentService','stringify','_sessionService','ref','filter','YYYY/MM/DD\x20HH:mm','_init','add','listComments','425169cewfbg','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','6672GHnHcr','post','error','personId','solved','Reply','get','payload','type','delete','Delete','_threadCommentModel','/edit','length','/solved','20wIAcdZ','createTimestamp','437214QTAmXA','_threadCommentDataSourceService','_initDataSource','setConfig','getMemberID','addUser','UNIVER_UNKNOWN','unitId','Add','root','1349784WoytNb','getUnit','forEach','parse','saveCommentToSnapshot','threadId'];_0x3060=function(){return _0x3e01f8;};return _0x3060();}import{HTTPService as _0x5340ca}from'@univerjs/network';const W=_0x1d05bf(0xec);var I=(_0x47c7b3=>(_0x47c7b3[_0x47c7b3[_0x1d05bf(0xcc)]=0x0]='OpenOrReOpen',_0x47c7b3[_0x47c7b3[_0x1d05bf(0xd3)]=0x1]=_0x1d05bf(0xd3),_0x47c7b3[_0x47c7b3['UNRECOGNIZED']=-0x1]=_0x1d05bf(0xc8),_0x47c7b3))(I||{}),v=(_0x1de5ba=>(_0x1de5ba[_0x1de5ba[_0x1d05bf(0xbd)]=0x0]=_0x1d05bf(0xbd),_0x1de5ba[_0x1de5ba['Add']=0x1]=_0x1d05bf(0x9b),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x87)]=0x2]=_0x1d05bf(0x87),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb1)]=0x3]=_0x1d05bf(0xb1),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x8c)]=0x4]='Delete',_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb2)]=0x5]=_0x1d05bf(0xb2),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xc8)]=-0x1]=_0x1d05bf(0xc8),_0x1de5ba))(v||{});const y=_0x2925b2=>_0x4cfb05(new Date(+_0x2925b2))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x43d4ee,_0x47fb2a)=>{const _0x13b4b0=_0x1d05bf,_0x145c7f=_0x43d4ee[_0x13b4b0(0x88)](_0xb203b6),_0x146d31=_0x43d4ee[_0x13b4b0(0x88)](_0x5340ca);_0x47fb2a[_0x13b4b0(0x9f)](_0x51042a=>{const _0x2aac36=_0x13b4b0;_0x145c7f[_0x2aac36(0xc0)](_0x51042a)&&_0x47fb2a[_0x2aac36(0x8b)](_0x51042a);}),_0x47fb2a[_0x13b4b0(0xce)]&&(await _0x146d31[_0x13b4b0(0x88)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47fb2a]}}))[_0x13b4b0(0xb9)]['users'][_0x13b4b0(0x9f)](_0x1681cf=>{const _0x47352c=_0x13b4b0;_0x1681cf&&_0x145c7f[_0x47352c(0x98)](_0x1681cf);});};var K=Object[_0x1d05bf(0xd9)],V=(_0x4ffec8,_0x2afed1,_0xb8b63a,_0x2d28ee)=>{const _0x36c5c1=_0x1d05bf;for(var _0x531233=_0x2d28ee>0x1?void 0x0:_0x2d28ee?K(_0x2afed1,_0xb8b63a):_0x2afed1,_0x8142fd=_0x4ffec8[_0x36c5c1(0x8f)]-0x1,_0x4a42f4;_0x8142fd>=0x0;_0x8142fd--)(_0x4a42f4=_0x4ffec8[_0x8142fd])&&(_0x531233=_0x4a42f4(_0x531233)||_0x531233);return _0x531233;},p=(_0x706be9,_0x3c18e5)=>(_0x500355,_0x590d3f)=>_0x3c18e5(_0x500355,_0x590d3f,_0x706be9);let _=class extends _0x32b8e3{constructor(_0x4df39a,_0x56c8b8,_0x5d1126,_0x39f5cb){const _0x49e8c2=_0x1d05bf;super(),this[_0x49e8c2(0xe1)]=_0x4df39a,this[_0x49e8c2(0x8d)]=_0x56c8b8,this['_userService']=_0x5d1126,this[_0x49e8c2(0xc5)]=_0x39f5cb,this[_0x49e8c2(0xe7)](),this['_initUserSync']();}[_0x1d05bf(0xbb)](){const _0x479467=_0x1d05bf;this[_0x479467(0xda)](this[_0x479467(0x8d)][_0x479467(0xdc)][_0x479467(0xd0)](_0x5d647c(0x10))[_0x479467(0xa9)](_0x2ef42a=>{const _0x36113d=_0x479467,_0x3ba742=new Set();_0x2ef42a[_0x36113d(0x9f)](_0x27c8da=>{const _0x20f412=_0x36113d;switch(_0x27c8da['type']){case _0x20f412(0xe8):{const _0x28cd09=_0x27c8da[_0x20f412(0x89)][_0x20f412(0x85)];_0x3ba742[_0x20f412(0xe8)](_0x28cd09);break;}}}),B(this['_injector'],_0x3ba742);}));}[_0x1d05bf(0xe7)](){const _0x36e8a6=_0x1d05bf;this['disposeWithMe'](this[_0x36e8a6(0xe1)][_0x36e8a6(0xdc)][_0x36e8a6(0xa9)](async _0x13612f=>{const _0x463596=_0x36e8a6;var _0x4e005d,_0x5a4114,_0x5bd525,_0x2f784b;const _0x20a774=(_0x4e005d=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f['unitId'])[_0x463596(0xd7)](_0x41cbbb=>_0x41cbbb['threadId']===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x4e005d['root'];if(!_0x20a774)return;const {unitId:_0x2e532b,subUnitId:_0x430e89}=_0x20a774;switch(_0x13612f[_0x463596(0xc4)]&&this[_0x463596(0xeb)][_0x463596(0x98)](_0x13612f[_0x463596(0xc4)]),_0x13612f[_0x463596(0x8a)]){case v['Add']:break;case v[_0x463596(0x87)]:{this[_0x463596(0x8d)][_0x463596(0xc9)](_0x2e532b,_0x430e89,{'unitId':_0x2e532b,'subUnitId':_0x430e89,'ref':'','id':_0x13612f['replyId'],'dT':y(+_0x13612f[_0x463596(0x92)]),'threadId':_0x13612f['threadId'],'personId':(_0x5bd525=(_0x5a4114=_0x13612f[_0x463596(0xc4)])==null?void 0x0:_0x5a4114[_0x463596(0xb4)])!=null?_0x5bd525:_0x13612f['userId'],'text':JSON[_0x463596(0xa0)](_0x13612f['content']),'parentId':_0x20a774['id']});break;}case v[_0x463596(0x8c)]:{const _0x14c9cb=this[_0x463596(0x8d)][_0x463596(0xca)](_0x2e532b,_0x430e89,_0x13612f['replyId']);_0x14c9cb&&_0x14c9cb[_0x463596(0xa5)]&&this[_0x463596(0x8d)][_0x463596(0xab)](_0x2e532b,_0x430e89,_0x13612f['replyId']);break;}case v[_0x463596(0xb1)]:{this[_0x463596(0x8d)][_0x463596(0xad)](_0x2e532b,_0x430e89,{'commentId':_0x13612f[_0x463596(0xa4)],'text':JSON[_0x463596(0xa0)](_0x13612f['content'])});break;}case v[_0x463596(0xb2)]:{const _0x25f141=(_0x2f784b=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f[_0x463596(0x9a)])[_0x463596(0xd7)](_0x58ff72=>_0x58ff72[_0x463596(0xa2)]===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x2f784b[_0x463596(0x9c)];_0x25f141&&this['_threadCommentModel'][_0x463596(0xb7)](_0x2e532b,_0x430e89,_0x25f141['id'],_0x13612f['solved']===I[_0x463596(0xd3)]);break;}}}));}};_=V([p(0x0,_0x3b9053(_0xc41ade)),p(0x1,_0x3b9053(_0x1d8efc)),p(0x2,_0x3b9053(_0xb203b6)),p(0x3,_0x3b9053(_0x4549a3))],_);const z=_0x1d05bf(0xc2),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1b2c33,_0x291cef,_0x31cb1b,_0x1d4640)=>{const _0x36bb4b=_0x1d05bf;for(var _0x2121ce=_0x1d4640>0x1?void 0x0:_0x1d4640?k(_0x291cef,_0x31cb1b):_0x291cef,_0x28d029=_0x1b2c33[_0x36bb4b(0x8f)]-0x1,_0x24eeaf;_0x28d029>=0x0;_0x28d029--)(_0x24eeaf=_0x1b2c33[_0x28d029])&&(_0x2121ce=_0x24eeaf(_0x2121ce)||_0x2121ce);return _0x2121ce;},b=(_0x337f7b,_0x2e5471)=>(_0x1729cf,_0x581d0a)=>_0x2e5471(_0x1729cf,_0x581d0a,_0x337f7b);function X(_0x158da1,_0x171913){const _0x36b8bf=_0x1d05bf,_0x3ad962=_0x158da1[_0x36b8bf(0xa7)][0x0];return{..._0x171913,'id':_0x3ad962[_0x36b8bf(0xa4)],'resolved':_0x158da1[_0x36b8bf(0x86)]===0x1,'dT':y(_0x3ad962[_0x36b8bf(0x92)]),'personId':_0x3ad962[_0x36b8bf(0xd8)],'threadId':_0x3ad962[_0x36b8bf(0xa2)]};}function ee(_0x3f4517,_0x12368f,_0x11aae5){const _0xea2705=_0x1d05bf;var _0x3d11ed,_0xc7c0be;if(((_0xc7c0be=(_0x3d11ed=_0x3f4517==null?void 0x0:_0x3f4517['replies'])==null?void 0x0:_0x3d11ed[_0xea2705(0x8f)])!=null?_0xc7c0be:0x0)>0x0){const _0x3ca1af=(_0x419f24,_0x39e44d)=>({'id':_0x419f24[_0xea2705(0xa4)],'threadId':_0x419f24['threadId'],'dT':y(_0x419f24[_0xea2705(0x92)]),'personId':_0x419f24[_0xea2705(0xd8)],'resolved':_0x3f4517['solved']===I[_0xea2705(0xd3)],'unitId':_0x12368f,'subUnitId':_0x11aae5,'text':JSON[_0xea2705(0xa0)](_0x419f24[_0xea2705(0xc7)]),'parentId':_0x39e44d}),_0x2c2e01=_0x3ca1af(_0x3f4517[_0xea2705(0xa7)][0x0]);return{..._0x2c2e01,'children':_0x3f4517[_0xea2705(0xa7)][_0xea2705(0xb5)](0x1)[_0xea2705(0xb8)](_0x31892a=>_0x3ca1af(_0x31892a,_0x2c2e01['id']))};}return null;}let S=class{constructor(_0x3e765b,_0x8ccd56,_0x4b77ad){const _0xdf602e=_0x1d05bf;this['_httpService']=_0x3e765b,this[_0xdf602e(0xeb)]=_0x8ccd56,this['_sessionService']=_0x4b77ad;}async['addComment'](_0x3bee76){const _0x1be0ae=_0x1d05bf;var _0x11747e,_0x3dce07;const {parentId:_0x3e833a,unitId:_0x53d1a2,text:_0xf64010,threadId:_0x23862b}=_0x3bee76,_0x1ea204=(_0x3dce07=(_0x11747e=_0xf64010[_0x1be0ae(0xcb)])==null?void 0x0:_0x11747e[_0x1be0ae(0xe5)](_0x2a9eb4=>_0x2a9eb4[_0x1be0ae(0xc1)]===_0x1261ad[_0x1be0ae(0xcf)])[_0x1be0ae(0xb8)](_0x255f2f=>_0x255f2f[_0x1be0ae(0xc3)]))!=null?_0x3dce07:[],_0x1d777b=JSON[_0x1be0ae(0xe2)](_0xf64010),_0x28265c=(await this[_0x1be0ae(0xe3)][_0x1be0ae(0xba)](_0x53d1a2))['getMemberID']();if(_0x3e833a){const _0x1ee11a={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204,'threadId':_0x23862b},_0x84b2a9=(await this['_httpService'][_0x1be0ae(0xef)](_0x1be0ae(0xbc)+_0x53d1a2+_0x1be0ae(0xe0),{'body':_0x1ee11a}))[_0x1be0ae(0xb9)][_0x1be0ae(0xde)];return{..._0x3bee76,'id':_0x84b2a9[_0x1be0ae(0xa4)],'dT':_0x4cfb05(+_0x84b2a9[_0x1be0ae(0x92)])[_0x1be0ae(0xa8)](_0x1be0ae(0xe6)),'personId':_0x84b2a9[_0x1be0ae(0xd8)]};}else{const _0x51088d={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204},_0x4cedb0=await this[_0x1be0ae(0xb0)][_0x1be0ae(0xef)]('/universer-api/comment/unit/'+_0x53d1a2+_0x1be0ae(0xaa),{'body':_0x51088d});return X(_0x4cedb0[_0x1be0ae(0xb9)][_0x1be0ae(0xdf)],_0x3bee76);}}async['updateComment'](_0x1e586c){const _0x41853e=_0x1d05bf;var _0x14bb53,_0x78657f;const {text:_0x1bb852,unitId:_0x35928a}=_0x1e586c,_0x497da7=(_0x78657f=(_0x14bb53=_0x1bb852[_0x41853e(0xcb)])==null?void 0x0:_0x14bb53['filter'](_0x3b10b0=>_0x3b10b0['rangeType']===_0x1261ad['COMMENT'])[_0x41853e(0xb8)](_0x1cd22b=>_0x1cd22b[_0x41853e(0xc3)]))!=null?_0x78657f:[],_0x4a1d15=JSON['stringify'](_0x1bb852),_0x4d1d04=_0x1e586c[_0x41853e(0xa2)],_0x58dd89=_0x1e586c['id'],_0x1eb283={'memberId':(await this['_sessionService']['requireSession'](_0x35928a))['getMemberID'](),'unitId':_0x35928a,'threadId':_0x4d1d04,'mention':_0x497da7,'content':_0x4a1d15,'replyId':_0x58dd89},_0x36fc1f=await this['_httpService'][_0x41853e(0xef)](_0x41853e(0xbc)+_0x35928a+_0x41853e(0x8e),{'body':_0x1eb283});return!_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)]||_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)][_0x41853e(0xcd)]===0x1;}async[_0x1d05bf(0xb7)](_0x5c7e00){const _0x520e6e=_0x1d05bf,{unitId:_0x557e5d}=_0x5c7e00,_0x5bd458=_0x5c7e00['threadId'],_0x25bd74={'memberId':this[_0x520e6e(0xeb)][_0x520e6e(0xc6)]()[_0x520e6e(0xb4)],'unitId':_0x557e5d,'threadId':_0x5bd458,'solved':_0x5c7e00[_0x520e6e(0xed)]?I[_0x520e6e(0xd3)]:I[_0x520e6e(0xcc)]},_0x4dc98f=await this[_0x520e6e(0xb0)][_0x520e6e(0xef)](_0x520e6e(0xbc)+_0x557e5d+_0x520e6e(0x90),{'body':_0x25bd74});return!_0x4dc98f[_0x520e6e(0xb9)][_0x520e6e(0xf0)]||_0x4dc98f['body']['error'][_0x520e6e(0xcd)]===0x1;}async[_0x1d05bf(0xab)](_0x46df38,_0x4d353c,_0x484bda,_0x54a0a7){const _0x3bb1ba=_0x1d05bf,_0x213741={'memberId':(await this[_0x3bb1ba(0xe3)][_0x3bb1ba(0xba)](_0x46df38))[_0x3bb1ba(0x97)](),'threadId':_0x484bda,'replyId':_0x54a0a7,'unitId':_0x46df38},_0x1f9673=await this[_0x3bb1ba(0xb0)][_0x3bb1ba(0xef)](_0x3bb1ba(0xbc)+_0x46df38+'/delete',{'body':_0x213741});return!_0x1f9673['body']['error']||_0x1f9673[_0x3bb1ba(0xb9)]['error'][_0x3bb1ba(0xcd)]===0x1;}async[_0x1d05bf(0xe9)](_0x3ff60a,_0x4650fe,_0x1f84df){const _0x463748=_0x1d05bf,_0x41b776={'unitId':_0x3ff60a,'threadId':_0x1f84df},_0x3eee08=await this['_httpService'][_0x463748(0xef)](_0x463748(0xbc)+_0x3ff60a+'/list',{'body':_0x41b776}),_0x23cddc=_0x1f84df[_0x463748(0xb8)](_0xdfc450=>ee(_0x3eee08[_0x463748(0xb9)][_0x463748(0xa3)][_0xdfc450],_0x3ff60a,_0x4650fe))[_0x463748(0xe5)](Boolean);return Object['values'](_0x3eee08[_0x463748(0xb9)][_0x463748(0xd4)])['forEach'](_0x30e281=>{const _0x4128d5=_0x463748;this[_0x4128d5(0xeb)][_0x4128d5(0x98)](_0x30e281);}),_0x23cddc;}[_0x1d05bf(0xa1)](_0x2d238f){const _0x545ded=_0x1d05bf;return{'id':_0x2d238f['id'],'threadId':_0x2d238f['threadId'],'ref':_0x2d238f[_0x545ded(0xe4)]};}};S=Q([b(0x0,_0x3b9053(_0x5340ca)),b(0x1,_0x3b9053(_0xb203b6)),b(0x2,_0x3b9053(_0x5c2147))],S);var re=Object[_0x1d05bf(0xd9)],te=(_0x19ae1f,_0x54ecdb,_0x418547,_0x1af9d3)=>{const _0x58e1ae=_0x1d05bf;for(var _0x49187f=_0x1af9d3>0x1?void 0x0:_0x1af9d3?re(_0x54ecdb,_0x418547):_0x54ecdb,_0x23662e=_0x19ae1f[_0x58e1ae(0x8f)]-0x1,_0x2d8c94;_0x23662e>=0x0;_0x23662e--)(_0x2d8c94=_0x19ae1f[_0x23662e])&&(_0x49187f=_0x2d8c94(_0x49187f)||_0x49187f);return _0x49187f;},M=(_0x20867b,_0x453886)=>(_0x13aeff,_0xaedf7c)=>_0x453886(_0x13aeff,_0xaedf7c,_0x20867b);let f=class extends _0x32b8e3{constructor(_0x467a1c,_0x4f55b3){const _0x294d00=_0x1d05bf;super(),this[_0x294d00(0x94)]=_0x467a1c,this[_0x294d00(0xac)]=_0x4f55b3,this['_initDataSource']();}[_0x1d05bf(0x95)](){const _0x258a41=_0x1d05bf;this[_0x258a41(0x94)][_0x258a41(0xdb)]=this[_0x258a41(0xac)],this[_0x258a41(0x94)][_0x258a41(0xaf)]=!0x1;}};function _0x1614(_0x560cc3,_0x36bcbe){const _0x306061=_0x3060();return _0x1614=function(_0x1614e5,_0x213d5c){_0x1614e5=_0x1614e5-0x85;let _0x3a4b59=_0x306061[_0x1614e5];return _0x3a4b59;},_0x1614(_0x560cc3,_0x36bcbe);}f=te([M(0x0,_0x475030),M(0x1,_0x3b9053(S))],f);var se=Object['defineProperty'],oe=Object[_0x1d05bf(0xd9)],ne=(_0x53ed3f,_0x26f62b,_0x37cbce)=>_0x26f62b in _0x53ed3f?se(_0x53ed3f,_0x26f62b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37cbce}):_0x53ed3f[_0x26f62b]=_0x37cbce,ie=(_0x4e74a3,_0xcc66af,_0x4497fb,_0x2457b0)=>{const _0x3bb833=_0x1d05bf;for(var _0x5eb94e=_0x2457b0>0x1?void 0x0:_0x2457b0?oe(_0xcc66af,_0x4497fb):_0xcc66af,_0x6c53c=_0x4e74a3[_0x3bb833(0x8f)]-0x1,_0x57ad1b;_0x6c53c>=0x0;_0x6c53c--)(_0x57ad1b=_0x4e74a3[_0x6c53c])&&(_0x5eb94e=_0x57ad1b(_0x5eb94e)||_0x5eb94e);return _0x5eb94e;},N=(_0x274db6,_0xe865a)=>(_0x3c7f22,_0x2162d7)=>_0xe865a(_0x3c7f22,_0x2162d7,_0x274db6),$=(_0x5dfb6a,_0x5357ae,_0xda1b01)=>ne(_0x5dfb6a,typeof _0x5357ae!=_0x1d05bf(0xdd)?_0x5357ae+'':_0x5357ae,_0xda1b01);let g=class extends _0x761510{constructor(_0x4cbcbc=O,_0x258eb8,_0x30a2ba){const _0x1eb225=_0x1d05bf;super(),this[_0x1eb225(0xd1)]=_0x4cbcbc,this[_0x1eb225(0xc5)]=_0x258eb8,this[_0x1eb225(0xb6)]=_0x30a2ba;const {..._0x63e336}=_0x543ebe({},O,this[_0x1eb225(0xd1)]);this[_0x1eb225(0xb6)][_0x1eb225(0x96)](z,_0x63e336);}[_0x1d05bf(0xbf)](){const _0x506780=_0x1d05bf;[[S],[f],[_]][_0x506780(0x9f)](_0x5f452e=>{const _0x1efee8=_0x506780;this[_0x1efee8(0xc5)][_0x1efee8(0xe8)](_0x5f452e);});}[_0x1d05bf(0xd5)](){const _0x419e4f=_0x1d05bf;this[_0x419e4f(0xc5)][_0x419e4f(0x88)](f),this[_0x419e4f(0xc5)]['get'](_);}};$(g,'pluginName',W),$(g,_0x1d05bf(0x8a),_0x7f2fa9[_0x1d05bf(0x99)]),g=ie([_0x339bdc(_0x272b59,_0x2f4ea6,_0x5d88f5),N(0x1,_0x3b9053(_0x4549a3)),N(0x2,_0x50a798)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ebeec=_0x5475;(function(_0x5ac0e8,_0x1dd9f3){const _0x38ec79=_0x5475,_0x443fd8=_0x5ac0e8();while(!![]){try{const _0x49e857=-parseInt(_0x38ec79(0x21d))/0x1+parseInt(_0x38ec79(0x1e8))/0x2*(parseInt(_0x38ec79(0x1fb))/0x3)+parseInt(_0x38ec79(0x1e7))/0x4+-parseInt(_0x38ec79(0x207))/0x5+parseInt(_0x38ec79(0x1e1))/0x6+-parseInt(_0x38ec79(0x1df))/0x7+parseInt(_0x38ec79(0x1f2))/0x8;if(_0x49e857===_0x1dd9f3)break;else _0x443fd8['push'](_0x443fd8['shift']());}catch(_0x44a183){_0x443fd8['push'](_0x443fd8['shift']());}}}(_0x5c5a,0xa90bb));import{CommentService as _0x1f6c58,CollaborationSessionService as _0x504872,UniverCollaborationClientPlugin as _0x34845c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5499db}from'@univerjs-pro/license';import{dayjs as _0x4976ce,UserManagerService as _0x27743c,Inject as _0x5b1114,Injector as _0x304f84,Disposable as _0x235f20,CustomRangeType as _0x355712,UniverInstanceType as _0x26b6b5,DependentOn as _0x3e5e37,IConfigService as _0x3f1145,Plugin as _0x1bdb37,merge as _0x4ebb47}from'@univerjs/core';function _0x5c5a(){const _0x599780=['user','values','/universer-api/comment/unit/','Delete','subscribe','Reply','forEach','createTimestamp','36903uMlpUe','getUnit','requireSession','resolveComment','add','userID','/reply','pluginName','/list','map','thread-comment-data-source.config','comment','118980VqCiPM','_httpService','format','getCurrentUser','Solve','/solved','replyId','root','getUser','solved','saveCommentToSnapshot','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','replies','_configService','_init','users','_sessionService','YYYY/MM/DD\x20HH:mm','customRanges','getComment','950893MlWCRP','post','syncUpdateMutationToColla','_userService','type','_injector','onReady','_threadCommentModel','setConfig','length','Solved','size','get','_config','filter','UNIVER_UNKNOWN','body','getOwnPropertyDescriptor','parse','personId','updateComment','dataSource','deleteComment','/universer-api/user/list','addComment','COMMENT','content','stringify','userId','error','getMemberID','_threadCommentDataSource','9657298qFnhmA','Edit','6398526SBnUlG','disposeWithMe','addUser','find','Unknown','_commentService','5006576GPjDNK','14hmNIUf','parentId','code','OpenOrReOpen','UNRECOGNIZED','threadId','_initDataSource','reply','listComments','commentUpdate$','5140336edVlmL'];_0x5c5a=function(){return _0x599780;};return _0x5c5a();}import{UniverThreadCommentUIPlugin as _0x305dda}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ae424,IThreadCommentDataSourceService as _0x5b1ce4}from'@univerjs/thread-comment';import{bufferTime as _0x4f4405}from'rxjs';import{HTTPService as _0x44202b}from'@univerjs/network';const W=_0x1ebeec(0x213);var I=(_0x464222=>(_0x464222[_0x464222['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x464222[_0x464222['Solved']=0x1]=_0x1ebeec(0x1c9),_0x464222[_0x464222[_0x1ebeec(0x1ec)]=-0x1]='UNRECOGNIZED',_0x464222))(I||{}),v=(_0xb1ae7a=>(_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e5)]=0x0]='Unknown',_0xb1ae7a[_0xb1ae7a['Add']=0x1]='Add',_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1f8)]=0x2]=_0x1ebeec(0x1f8),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e0)]=0x3]=_0x1ebeec(0x1e0),_0xb1ae7a[_0xb1ae7a['Delete']=0x4]=_0x1ebeec(0x1f6),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x20b)]=0x5]=_0x1ebeec(0x20b),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1ec)]=-0x1]=_0x1ebeec(0x1ec),_0xb1ae7a))(v||{});function _0x5475(_0x23ca5e,_0x3823d6){const _0x5c5a75=_0x5c5a();return _0x5475=function(_0x5475d8,_0x1ed63f){_0x5475d8=_0x5475d8-0x1c6;let _0x56ff3d=_0x5c5a75[_0x5475d8];return _0x56ff3d;},_0x5475(_0x23ca5e,_0x3823d6);}const y=_0x93684b=>_0x4976ce(new Date(+_0x93684b))[_0x1ebeec(0x209)](_0x1ebeec(0x21a)),B=async(_0x2236a4,_0x26b189)=>{const _0x5a0aa3=_0x1ebeec,_0xfd806d=_0x2236a4[_0x5a0aa3(0x1cb)](_0x27743c),_0x27e736=_0x2236a4[_0x5a0aa3(0x1cb)](_0x44202b);_0x26b189[_0x5a0aa3(0x1f9)](_0x5730cf=>{const _0x555ef4=_0x5a0aa3;_0xfd806d[_0x555ef4(0x20f)](_0x5730cf)&&_0x26b189['delete'](_0x5730cf);}),_0x26b189[_0x5a0aa3(0x1ca)]&&(await _0x27e736[_0x5a0aa3(0x1cb)](_0x5a0aa3(0x1d6),{'params':{'userIDs':[..._0x26b189]}}))[_0x5a0aa3(0x1cf)]['users'][_0x5a0aa3(0x1f9)](_0x2ad441=>{const _0x2a6bbc=_0x5a0aa3;_0x2ad441&&_0xfd806d[_0x2a6bbc(0x1e3)](_0x2ad441);});};var K=Object[_0x1ebeec(0x1d0)],V=(_0x3c9e85,_0x32ed69,_0x1a4663,_0x135aa1)=>{const _0x327a45=_0x1ebeec;for(var _0x2e23a8=_0x135aa1>0x1?void 0x0:_0x135aa1?K(_0x32ed69,_0x1a4663):_0x32ed69,_0x5be39b=_0x3c9e85[_0x327a45(0x1c8)]-0x1,_0x3aca5f;_0x5be39b>=0x0;_0x5be39b--)(_0x3aca5f=_0x3c9e85[_0x5be39b])&&(_0x2e23a8=_0x3aca5f(_0x2e23a8)||_0x2e23a8);return _0x2e23a8;},p=(_0x4565cc,_0x25d65c)=>(_0x49a79c,_0x3008ee)=>_0x25d65c(_0x49a79c,_0x3008ee,_0x4565cc);let _=class extends _0x235f20{constructor(_0x13960,_0x515205,_0x11c552,_0x1f7cd8){const _0x5a938f=_0x1ebeec;super(),this[_0x5a938f(0x1e6)]=_0x13960,this[_0x5a938f(0x1c6)]=_0x515205,this[_0x5a938f(0x220)]=_0x11c552,this[_0x5a938f(0x222)]=_0x1f7cd8,this['_init'](),this[_0x5a938f(0x212)]();}[_0x1ebeec(0x212)](){const _0x593313=_0x1ebeec;this[_0x593313(0x1e2)](this[_0x593313(0x1c6)][_0x593313(0x1f1)]['pipe'](_0x4f4405(0x10))[_0x593313(0x1f7)](_0xfae94d=>{const _0x3fa5ea=_0x593313,_0x8fdcf8=new Set();_0xfae94d[_0x3fa5ea(0x1f9)](_0x3dae33=>{const _0x25abab=_0x3fa5ea;switch(_0x3dae33['type']){case _0x25abab(0x1ff):{const _0x249728=_0x3dae33['payload'][_0x25abab(0x1d2)];_0x8fdcf8['add'](_0x249728);break;}}}),B(this[_0x3fa5ea(0x222)],_0x8fdcf8);}));}[_0x1ebeec(0x217)](){const _0x27cddb=_0x1ebeec;this[_0x27cddb(0x1e2)](this[_0x27cddb(0x1e6)]['commentUpdate$'][_0x27cddb(0x1f7)](async _0x3a4d5a=>{const _0xeaeb04=_0x27cddb;var _0x3464bc,_0x30309a,_0x2c1aca,_0x1b9c7b;const _0x1f273f=(_0x3464bc=this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1fc)](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x2a487f=>_0x2a487f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x3464bc[_0xeaeb04(0x20e)];if(!_0x1f273f)return;const {unitId:_0x2064b3,subUnitId:_0x2d39a0}=_0x1f273f;switch(_0x3a4d5a[_0xeaeb04(0x1f3)]&&this['_userService'][_0xeaeb04(0x1e3)](_0x3a4d5a['user']),_0x3a4d5a[_0xeaeb04(0x221)]){case v['Add']:break;case v[_0xeaeb04(0x1f8)]:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d7)](_0x2064b3,_0x2d39a0,{'unitId':_0x2064b3,'subUnitId':_0x2d39a0,'ref':'','id':_0x3a4d5a[_0xeaeb04(0x20d)],'dT':y(+_0x3a4d5a[_0xeaeb04(0x1fa)]),'threadId':_0x3a4d5a[_0xeaeb04(0x1ed)],'personId':(_0x2c1aca=(_0x30309a=_0x3a4d5a[_0xeaeb04(0x1f3)])==null?void 0x0:_0x30309a[_0xeaeb04(0x200)])!=null?_0x2c1aca:_0x3a4d5a[_0xeaeb04(0x1db)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)]),'parentId':_0x1f273f['id']});break;}case v[_0xeaeb04(0x1f6)]:{const _0x1affaa=this['_threadCommentModel'][_0xeaeb04(0x21c)](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);_0x1affaa&&_0x1affaa[_0xeaeb04(0x1e9)]&&this[_0xeaeb04(0x1c6)]['deleteComment'](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);break;}case v['Edit']:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d3)](_0x2064b3,_0x2d39a0,{'commentId':_0x3a4d5a[_0xeaeb04(0x20d)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)])});break;}case v[_0xeaeb04(0x20b)]:{const _0x48e008=(_0x1b9c7b=this[_0xeaeb04(0x1c6)]['getUnit'](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x13d12f=>_0x13d12f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x1b9c7b[_0xeaeb04(0x20e)];_0x48e008&&this['_threadCommentModel'][_0xeaeb04(0x1fe)](_0x2064b3,_0x2d39a0,_0x48e008['id'],_0x3a4d5a[_0xeaeb04(0x210)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x5b1114(_0x1f6c58)),p(0x1,_0x5b1114(_0x1ae424)),p(0x2,_0x5b1114(_0x27743c)),p(0x3,_0x5b1114(_0x304f84))],_);const z=_0x1ebeec(0x205),O={};var k=Object[_0x1ebeec(0x1d0)],Q=(_0x4d3120,_0x56219d,_0x52e629,_0x12f9f7)=>{const _0x498c32=_0x1ebeec;for(var _0x1e2d99=_0x12f9f7>0x1?void 0x0:_0x12f9f7?k(_0x56219d,_0x52e629):_0x56219d,_0x39c0c3=_0x4d3120[_0x498c32(0x1c8)]-0x1,_0x3e1e6f;_0x39c0c3>=0x0;_0x39c0c3--)(_0x3e1e6f=_0x4d3120[_0x39c0c3])&&(_0x1e2d99=_0x3e1e6f(_0x1e2d99)||_0x1e2d99);return _0x1e2d99;},b=(_0x17d262,_0x144e4a)=>(_0xbba05b,_0x1a2d83)=>_0x144e4a(_0xbba05b,_0x1a2d83,_0x17d262);function X(_0xfe1494,_0x4d17d3){const _0x1e0dfa=_0x1ebeec,_0x2f06ea=_0xfe1494['replies'][0x0];return{..._0x4d17d3,'id':_0x2f06ea[_0x1e0dfa(0x20d)],'resolved':_0xfe1494['solved']===0x1,'dT':y(_0x2f06ea[_0x1e0dfa(0x1fa)]),'personId':_0x2f06ea['userId'],'threadId':_0x2f06ea[_0x1e0dfa(0x1ed)]};}function ee(_0x2c12ff,_0x14feb3,_0x4caa87){const _0x3dae58=_0x1ebeec;var _0x392c76,_0x2bb3e3;if(((_0x2bb3e3=(_0x392c76=_0x2c12ff==null?void 0x0:_0x2c12ff[_0x3dae58(0x215)])==null?void 0x0:_0x392c76['length'])!=null?_0x2bb3e3:0x0)>0x0){const _0x409538=(_0x5b1863,_0x558c71)=>({'id':_0x5b1863[_0x3dae58(0x20d)],'threadId':_0x5b1863[_0x3dae58(0x1ed)],'dT':y(_0x5b1863[_0x3dae58(0x1fa)]),'personId':_0x5b1863[_0x3dae58(0x1db)],'resolved':_0x2c12ff['solved']===I[_0x3dae58(0x1c9)],'unitId':_0x14feb3,'subUnitId':_0x4caa87,'text':JSON['parse'](_0x5b1863[_0x3dae58(0x1d9)]),'parentId':_0x558c71}),_0x59e06b=_0x409538(_0x2c12ff['replies'][0x0]);return{..._0x59e06b,'children':_0x2c12ff['replies']['slice'](0x1)[_0x3dae58(0x204)](_0x40a8a7=>_0x409538(_0x40a8a7,_0x59e06b['id']))};}return null;}let S=class{constructor(_0x44135f,_0x5eed35,_0x3b60be){const _0x2609b1=_0x1ebeec;this['_httpService']=_0x44135f,this['_userService']=_0x5eed35,this[_0x2609b1(0x219)]=_0x3b60be;}async[_0x1ebeec(0x1d7)](_0x8bc38b){const _0xfad78e=_0x1ebeec;var _0x37436e,_0x9a8707;const {parentId:_0x3f2ae5,unitId:_0x134922,text:_0x48d726,threadId:_0x18da6b}=_0x8bc38b,_0x40f900=(_0x9a8707=(_0x37436e=_0x48d726[_0xfad78e(0x21b)])==null?void 0x0:_0x37436e[_0xfad78e(0x1cd)](_0x3076d8=>_0x3076d8['rangeType']===_0x355712[_0xfad78e(0x1d8)])['map'](_0x279ed5=>_0x279ed5['rangeId']))!=null?_0x9a8707:[],_0x262413=JSON[_0xfad78e(0x1da)](_0x48d726),_0xd0663d=(await this['_sessionService'][_0xfad78e(0x1fd)](_0x134922))[_0xfad78e(0x1dd)]();if(_0x3f2ae5){const _0x5afc3e={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900,'threadId':_0x18da6b},_0x51aae4=(await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+_0xfad78e(0x201),{'body':_0x5afc3e}))[_0xfad78e(0x1cf)][_0xfad78e(0x1ef)];return{..._0x8bc38b,'id':_0x51aae4['replyId'],'dT':_0x4976ce(+_0x51aae4['createTimestamp'])[_0xfad78e(0x209)](_0xfad78e(0x21a)),'personId':_0x51aae4[_0xfad78e(0x1db)]};}else{const _0x30f488={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900},_0x17647a=await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+'/add',{'body':_0x30f488});return X(_0x17647a[_0xfad78e(0x1cf)][_0xfad78e(0x206)],_0x8bc38b);}}async[_0x1ebeec(0x1d3)](_0x551d08){const _0x56ee19=_0x1ebeec;var _0x37dbe7,_0x1af5ec;const {text:_0x1e1223,unitId:_0x54376f}=_0x551d08,_0x360311=(_0x1af5ec=(_0x37dbe7=_0x1e1223[_0x56ee19(0x21b)])==null?void 0x0:_0x37dbe7[_0x56ee19(0x1cd)](_0xbd864a=>_0xbd864a['rangeType']===_0x355712[_0x56ee19(0x1d8)])[_0x56ee19(0x204)](_0x24bb7d=>_0x24bb7d['rangeId']))!=null?_0x1af5ec:[],_0x46cd63=JSON[_0x56ee19(0x1da)](_0x1e1223),_0x8202a6=_0x551d08[_0x56ee19(0x1ed)],_0x3cf6ee=_0x551d08['id'],_0x337145={'memberId':(await this[_0x56ee19(0x219)]['requireSession'](_0x54376f))[_0x56ee19(0x1dd)](),'unitId':_0x54376f,'threadId':_0x8202a6,'mention':_0x360311,'content':_0x46cd63,'replyId':_0x3cf6ee},_0x23aff4=await this[_0x56ee19(0x208)][_0x56ee19(0x21e)](_0x56ee19(0x1f5)+_0x54376f+'/edit',{'body':_0x337145});return!_0x23aff4['body'][_0x56ee19(0x1dc)]||_0x23aff4[_0x56ee19(0x1cf)][_0x56ee19(0x1dc)][_0x56ee19(0x1ea)]===0x1;}async['resolveComment'](_0x17d2a4){const _0x7c84c4=_0x1ebeec,{unitId:_0x522862}=_0x17d2a4,_0x11876a=_0x17d2a4[_0x7c84c4(0x1ed)],_0xdb98cc={'memberId':this[_0x7c84c4(0x220)][_0x7c84c4(0x20a)]()[_0x7c84c4(0x200)],'unitId':_0x522862,'threadId':_0x11876a,'solved':_0x17d2a4['resolved']?I[_0x7c84c4(0x1c9)]:I[_0x7c84c4(0x1eb)]},_0x4b8528=await this[_0x7c84c4(0x208)][_0x7c84c4(0x21e)](_0x7c84c4(0x1f5)+_0x522862+_0x7c84c4(0x20c),{'body':_0xdb98cc});return!_0x4b8528[_0x7c84c4(0x1cf)]['error']||_0x4b8528[_0x7c84c4(0x1cf)][_0x7c84c4(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1d5)](_0xe0a60a,_0x5b64f3,_0x5d787e,_0x6849d){const _0x2ea290=_0x1ebeec,_0x413ea={'memberId':(await this[_0x2ea290(0x219)]['requireSession'](_0xe0a60a))['getMemberID'](),'threadId':_0x5d787e,'replyId':_0x6849d,'unitId':_0xe0a60a},_0xb6ef78=await this['_httpService'][_0x2ea290(0x21e)](_0x2ea290(0x1f5)+_0xe0a60a+'/delete',{'body':_0x413ea});return!_0xb6ef78[_0x2ea290(0x1cf)]['error']||_0xb6ef78[_0x2ea290(0x1cf)][_0x2ea290(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1f0)](_0x5c81c2,_0x57d614,_0x124094){const _0x35b33b=_0x1ebeec,_0x3e297d={'unitId':_0x5c81c2,'threadId':_0x124094},_0x1f540b=await this['_httpService'][_0x35b33b(0x21e)](_0x35b33b(0x1f5)+_0x5c81c2+_0x35b33b(0x203),{'body':_0x3e297d}),_0x232b4a=_0x124094[_0x35b33b(0x204)](_0xd1ca3=>ee(_0x1f540b[_0x35b33b(0x1cf)]['comments'][_0xd1ca3],_0x5c81c2,_0x57d614))['filter'](Boolean);return Object[_0x35b33b(0x1f4)](_0x1f540b['body'][_0x35b33b(0x218)])[_0x35b33b(0x1f9)](_0x4a4490=>{const _0x369498=_0x35b33b;this[_0x369498(0x220)][_0x369498(0x1e3)](_0x4a4490);}),_0x232b4a;}[_0x1ebeec(0x211)](_0x33f25b){return{'id':_0x33f25b['id'],'threadId':_0x33f25b['threadId'],'ref':_0x33f25b['ref']};}};S=Q([b(0x0,_0x5b1114(_0x44202b)),b(0x1,_0x5b1114(_0x27743c)),b(0x2,_0x5b1114(_0x504872))],S);var re=Object[_0x1ebeec(0x1d0)],te=(_0xf894b3,_0x4c4e9c,_0x6ea4a3,_0x4e5227)=>{const _0x19260b=_0x1ebeec;for(var _0x5af636=_0x4e5227>0x1?void 0x0:_0x4e5227?re(_0x4c4e9c,_0x6ea4a3):_0x4c4e9c,_0x2a4ea2=_0xf894b3[_0x19260b(0x1c8)]-0x1,_0x1581c7;_0x2a4ea2>=0x0;_0x2a4ea2--)(_0x1581c7=_0xf894b3[_0x2a4ea2])&&(_0x5af636=_0x1581c7(_0x5af636)||_0x5af636);return _0x5af636;},M=(_0x731712,_0x404def)=>(_0x2dd236,_0x18d032)=>_0x404def(_0x2dd236,_0x18d032,_0x731712);let f=class extends _0x235f20{constructor(_0x1566db,_0x5aaf05){const _0x4a990d=_0x1ebeec;super(),this['_threadCommentDataSourceService']=_0x1566db,this[_0x4a990d(0x1de)]=_0x5aaf05,this['_initDataSource']();}[_0x1ebeec(0x1ee)](){const _0x5423a6=_0x1ebeec;this[_0x5423a6(0x214)][_0x5423a6(0x1d4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5423a6(0x21f)]=!0x1;}};f=te([M(0x0,_0x5b1ce4),M(0x1,_0x5b1114(S))],f);var se=Object['defineProperty'],oe=Object[_0x1ebeec(0x1d0)],ne=(_0x3cc3f5,_0x35adc4,_0x43690c)=>_0x35adc4 in _0x3cc3f5?se(_0x3cc3f5,_0x35adc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43690c}):_0x3cc3f5[_0x35adc4]=_0x43690c,ie=(_0x959023,_0xd5c245,_0x2cf4bc,_0x492d6e)=>{const _0x1d530f=_0x1ebeec;for(var _0x4ab28d=_0x492d6e>0x1?void 0x0:_0x492d6e?oe(_0xd5c245,_0x2cf4bc):_0xd5c245,_0x419ee1=_0x959023[_0x1d530f(0x1c8)]-0x1,_0x763aac;_0x419ee1>=0x0;_0x419ee1--)(_0x763aac=_0x959023[_0x419ee1])&&(_0x4ab28d=_0x763aac(_0x4ab28d)||_0x4ab28d);return _0x4ab28d;},N=(_0x34f2a1,_0x156dcc)=>(_0x41c232,_0x400982)=>_0x156dcc(_0x41c232,_0x400982,_0x34f2a1),$=(_0x5494fe,_0x51502f,_0x42d85e)=>ne(_0x5494fe,typeof _0x51502f!='symbol'?_0x51502f+'':_0x51502f,_0x42d85e);let g=class extends _0x1bdb37{constructor(_0x4e6ccf=O,_0x2b80db,_0x412cfb){const _0x28f2c0=_0x1ebeec;super(),this['_config']=_0x4e6ccf,this[_0x28f2c0(0x222)]=_0x2b80db,this[_0x28f2c0(0x216)]=_0x412cfb;const {..._0x225fe3}=_0x4ebb47({},O,this[_0x28f2c0(0x1cc)]);this[_0x28f2c0(0x216)][_0x28f2c0(0x1c7)](z,_0x225fe3);}['onStarting'](){const _0x576f12=_0x1ebeec;[[S],[f],[_]][_0x576f12(0x1f9)](_0x5ab9c2=>{const _0x3dac2e=_0x576f12;this[_0x3dac2e(0x222)]['add'](_0x5ab9c2);});}[_0x1ebeec(0x223)](){const _0x1414f1=_0x1ebeec;this['_injector']['get'](f),this[_0x1414f1(0x222)]['get'](_);}};$(g,_0x1ebeec(0x202),W),$(g,'type',_0x26b6b5[_0x1ebeec(0x1ce)]),g=ie([_0x3e5e37(_0x305dda,_0x34845c,_0x5499db),N(0x1,_0x5b1114(_0x304f84)),N(0x2,_0x3f1145)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1d05bf=_0x1614;(function(_0x468413,_0x3d6942){const _0x4e9982=_0x1614,_0xb5c747=_0x468413();while(!![]){try{const _0x50621b=parseInt(_0x4e9982(0xb3))/0x1+parseInt(_0x4e9982(0x93))/0x2+parseInt(_0x4e9982(0xea))/0x3+parseInt(_0x4e9982(0xee))/0x4*(parseInt(_0x4e9982(0xd6))/0x5)+-parseInt(_0x4e9982(0xa6))/0x6*(parseInt(_0x4e9982(0xbe))/0x7)+-parseInt(_0x4e9982(0x9d))/0x8*(-parseInt(_0x4e9982(0xd2))/0x9)+-parseInt(_0x4e9982(0x91))/0xa*(parseInt(_0x4e9982(0xae))/0xb);if(_0x50621b===_0x3d6942)break;else _0xb5c747['push'](_0xb5c747['shift']());}catch(_0x453d69){_0xb5c747['push'](_0xb5c747['shift']());}}}(_0x3060,0x2b2f9));import{CommentService as _0xc41ade,CollaborationSessionService as _0x5c2147,UniverCollaborationClientPlugin as _0x2f4ea6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d88f5}from'@univerjs-pro/license';import{dayjs as _0x4cfb05,UserManagerService as _0xb203b6,Inject as _0x3b9053,Injector as _0x4549a3,Disposable as _0x32b8e3,CustomRangeType as _0x1261ad,UniverInstanceType as _0x7f2fa9,DependentOn as _0x339bdc,IConfigService as _0x50a798,Plugin as _0x761510,merge as _0x543ebe}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x272b59}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d8efc,IThreadCommentDataSourceService as _0x475030}from'@univerjs/thread-comment';import{bufferTime as _0x5d647c}from'rxjs';function _0x3060(){const _0x3e01f8=['comments','replyId','parentId','6jskLda','replies','format','subscribe','/add','deleteComment','_threadCommentDataSource','updateComment','4051993vRwCdP','syncUpdateMutationToColla','_httpService','Edit','Solve','222690GyNWrq','userID','slice','_configService','resolveComment','map','body','requireSession','_initUserSync','/universer-api/comment/unit/','Unknown','2278073ThaHyO','onStarting','getUser','rangeType','thread-comment-data-source.config','rangeId','user','_injector','getCurrentUser','content','UNRECOGNIZED','addComment','getComment','customRanges','OpenOrReOpen','code','size','COMMENT','pipe','_config','18wmfYTi','Solved','users','onReady','955ZEOBRj','find','userId','getOwnPropertyDescriptor','disposeWithMe','dataSource','commentUpdate$','symbol','reply','comment','/reply','_commentService','stringify','_sessionService','ref','filter','YYYY/MM/DD\x20HH:mm','_init','add','listComments','425169cewfbg','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','6672GHnHcr','post','error','personId','solved','Reply','get','payload','type','delete','Delete','_threadCommentModel','/edit','length','/solved','20wIAcdZ','createTimestamp','437214QTAmXA','_threadCommentDataSourceService','_initDataSource','setConfig','getMemberID','addUser','UNIVER_UNKNOWN','unitId','Add','root','1349784WoytNb','getUnit','forEach','parse','saveCommentToSnapshot','threadId'];_0x3060=function(){return _0x3e01f8;};return _0x3060();}import{HTTPService as _0x5340ca}from'@univerjs/network';const W=_0x1d05bf(0xec);var I=(_0x47c7b3=>(_0x47c7b3[_0x47c7b3[_0x1d05bf(0xcc)]=0x0]='OpenOrReOpen',_0x47c7b3[_0x47c7b3[_0x1d05bf(0xd3)]=0x1]=_0x1d05bf(0xd3),_0x47c7b3[_0x47c7b3['UNRECOGNIZED']=-0x1]=_0x1d05bf(0xc8),_0x47c7b3))(I||{}),v=(_0x1de5ba=>(_0x1de5ba[_0x1de5ba[_0x1d05bf(0xbd)]=0x0]=_0x1d05bf(0xbd),_0x1de5ba[_0x1de5ba['Add']=0x1]=_0x1d05bf(0x9b),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x87)]=0x2]=_0x1d05bf(0x87),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb1)]=0x3]=_0x1d05bf(0xb1),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x8c)]=0x4]='Delete',_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb2)]=0x5]=_0x1d05bf(0xb2),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xc8)]=-0x1]=_0x1d05bf(0xc8),_0x1de5ba))(v||{});const y=_0x2925b2=>_0x4cfb05(new Date(+_0x2925b2))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x43d4ee,_0x47fb2a)=>{const _0x13b4b0=_0x1d05bf,_0x145c7f=_0x43d4ee[_0x13b4b0(0x88)](_0xb203b6),_0x146d31=_0x43d4ee[_0x13b4b0(0x88)](_0x5340ca);_0x47fb2a[_0x13b4b0(0x9f)](_0x51042a=>{const _0x2aac36=_0x13b4b0;_0x145c7f[_0x2aac36(0xc0)](_0x51042a)&&_0x47fb2a[_0x2aac36(0x8b)](_0x51042a);}),_0x47fb2a[_0x13b4b0(0xce)]&&(await _0x146d31[_0x13b4b0(0x88)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47fb2a]}}))[_0x13b4b0(0xb9)]['users'][_0x13b4b0(0x9f)](_0x1681cf=>{const _0x47352c=_0x13b4b0;_0x1681cf&&_0x145c7f[_0x47352c(0x98)](_0x1681cf);});};var K=Object[_0x1d05bf(0xd9)],V=(_0x4ffec8,_0x2afed1,_0xb8b63a,_0x2d28ee)=>{const _0x36c5c1=_0x1d05bf;for(var _0x531233=_0x2d28ee>0x1?void 0x0:_0x2d28ee?K(_0x2afed1,_0xb8b63a):_0x2afed1,_0x8142fd=_0x4ffec8[_0x36c5c1(0x8f)]-0x1,_0x4a42f4;_0x8142fd>=0x0;_0x8142fd--)(_0x4a42f4=_0x4ffec8[_0x8142fd])&&(_0x531233=_0x4a42f4(_0x531233)||_0x531233);return _0x531233;},p=(_0x706be9,_0x3c18e5)=>(_0x500355,_0x590d3f)=>_0x3c18e5(_0x500355,_0x590d3f,_0x706be9);let _=class extends _0x32b8e3{constructor(_0x4df39a,_0x56c8b8,_0x5d1126,_0x39f5cb){const _0x49e8c2=_0x1d05bf;super(),this[_0x49e8c2(0xe1)]=_0x4df39a,this[_0x49e8c2(0x8d)]=_0x56c8b8,this['_userService']=_0x5d1126,this[_0x49e8c2(0xc5)]=_0x39f5cb,this[_0x49e8c2(0xe7)](),this['_initUserSync']();}[_0x1d05bf(0xbb)](){const _0x479467=_0x1d05bf;this[_0x479467(0xda)](this[_0x479467(0x8d)][_0x479467(0xdc)][_0x479467(0xd0)](_0x5d647c(0x10))[_0x479467(0xa9)](_0x2ef42a=>{const _0x36113d=_0x479467,_0x3ba742=new Set();_0x2ef42a[_0x36113d(0x9f)](_0x27c8da=>{const _0x20f412=_0x36113d;switch(_0x27c8da['type']){case _0x20f412(0xe8):{const _0x28cd09=_0x27c8da[_0x20f412(0x89)][_0x20f412(0x85)];_0x3ba742[_0x20f412(0xe8)](_0x28cd09);break;}}}),B(this['_injector'],_0x3ba742);}));}[_0x1d05bf(0xe7)](){const _0x36e8a6=_0x1d05bf;this['disposeWithMe'](this[_0x36e8a6(0xe1)][_0x36e8a6(0xdc)][_0x36e8a6(0xa9)](async _0x13612f=>{const _0x463596=_0x36e8a6;var _0x4e005d,_0x5a4114,_0x5bd525,_0x2f784b;const _0x20a774=(_0x4e005d=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f['unitId'])[_0x463596(0xd7)](_0x41cbbb=>_0x41cbbb['threadId']===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x4e005d['root'];if(!_0x20a774)return;const {unitId:_0x2e532b,subUnitId:_0x430e89}=_0x20a774;switch(_0x13612f[_0x463596(0xc4)]&&this[_0x463596(0xeb)][_0x463596(0x98)](_0x13612f[_0x463596(0xc4)]),_0x13612f[_0x463596(0x8a)]){case v['Add']:break;case v[_0x463596(0x87)]:{this[_0x463596(0x8d)][_0x463596(0xc9)](_0x2e532b,_0x430e89,{'unitId':_0x2e532b,'subUnitId':_0x430e89,'ref':'','id':_0x13612f['replyId'],'dT':y(+_0x13612f[_0x463596(0x92)]),'threadId':_0x13612f['threadId'],'personId':(_0x5bd525=(_0x5a4114=_0x13612f[_0x463596(0xc4)])==null?void 0x0:_0x5a4114[_0x463596(0xb4)])!=null?_0x5bd525:_0x13612f['userId'],'text':JSON[_0x463596(0xa0)](_0x13612f['content']),'parentId':_0x20a774['id']});break;}case v[_0x463596(0x8c)]:{const _0x14c9cb=this[_0x463596(0x8d)][_0x463596(0xca)](_0x2e532b,_0x430e89,_0x13612f['replyId']);_0x14c9cb&&_0x14c9cb[_0x463596(0xa5)]&&this[_0x463596(0x8d)][_0x463596(0xab)](_0x2e532b,_0x430e89,_0x13612f['replyId']);break;}case v[_0x463596(0xb1)]:{this[_0x463596(0x8d)][_0x463596(0xad)](_0x2e532b,_0x430e89,{'commentId':_0x13612f[_0x463596(0xa4)],'text':JSON[_0x463596(0xa0)](_0x13612f['content'])});break;}case v[_0x463596(0xb2)]:{const _0x25f141=(_0x2f784b=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f[_0x463596(0x9a)])[_0x463596(0xd7)](_0x58ff72=>_0x58ff72[_0x463596(0xa2)]===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x2f784b[_0x463596(0x9c)];_0x25f141&&this['_threadCommentModel'][_0x463596(0xb7)](_0x2e532b,_0x430e89,_0x25f141['id'],_0x13612f['solved']===I[_0x463596(0xd3)]);break;}}}));}};_=V([p(0x0,_0x3b9053(_0xc41ade)),p(0x1,_0x3b9053(_0x1d8efc)),p(0x2,_0x3b9053(_0xb203b6)),p(0x3,_0x3b9053(_0x4549a3))],_);const z=_0x1d05bf(0xc2),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1b2c33,_0x291cef,_0x31cb1b,_0x1d4640)=>{const _0x36bb4b=_0x1d05bf;for(var _0x2121ce=_0x1d4640>0x1?void 0x0:_0x1d4640?k(_0x291cef,_0x31cb1b):_0x291cef,_0x28d029=_0x1b2c33[_0x36bb4b(0x8f)]-0x1,_0x24eeaf;_0x28d029>=0x0;_0x28d029--)(_0x24eeaf=_0x1b2c33[_0x28d029])&&(_0x2121ce=_0x24eeaf(_0x2121ce)||_0x2121ce);return _0x2121ce;},b=(_0x337f7b,_0x2e5471)=>(_0x1729cf,_0x581d0a)=>_0x2e5471(_0x1729cf,_0x581d0a,_0x337f7b);function X(_0x158da1,_0x171913){const _0x36b8bf=_0x1d05bf,_0x3ad962=_0x158da1[_0x36b8bf(0xa7)][0x0];return{..._0x171913,'id':_0x3ad962[_0x36b8bf(0xa4)],'resolved':_0x158da1[_0x36b8bf(0x86)]===0x1,'dT':y(_0x3ad962[_0x36b8bf(0x92)]),'personId':_0x3ad962[_0x36b8bf(0xd8)],'threadId':_0x3ad962[_0x36b8bf(0xa2)]};}function ee(_0x3f4517,_0x12368f,_0x11aae5){const _0xea2705=_0x1d05bf;var _0x3d11ed,_0xc7c0be;if(((_0xc7c0be=(_0x3d11ed=_0x3f4517==null?void 0x0:_0x3f4517['replies'])==null?void 0x0:_0x3d11ed[_0xea2705(0x8f)])!=null?_0xc7c0be:0x0)>0x0){const _0x3ca1af=(_0x419f24,_0x39e44d)=>({'id':_0x419f24[_0xea2705(0xa4)],'threadId':_0x419f24['threadId'],'dT':y(_0x419f24[_0xea2705(0x92)]),'personId':_0x419f24[_0xea2705(0xd8)],'resolved':_0x3f4517['solved']===I[_0xea2705(0xd3)],'unitId':_0x12368f,'subUnitId':_0x11aae5,'text':JSON[_0xea2705(0xa0)](_0x419f24[_0xea2705(0xc7)]),'parentId':_0x39e44d}),_0x2c2e01=_0x3ca1af(_0x3f4517[_0xea2705(0xa7)][0x0]);return{..._0x2c2e01,'children':_0x3f4517[_0xea2705(0xa7)][_0xea2705(0xb5)](0x1)[_0xea2705(0xb8)](_0x31892a=>_0x3ca1af(_0x31892a,_0x2c2e01['id']))};}return null;}let S=class{constructor(_0x3e765b,_0x8ccd56,_0x4b77ad){const _0xdf602e=_0x1d05bf;this['_httpService']=_0x3e765b,this[_0xdf602e(0xeb)]=_0x8ccd56,this['_sessionService']=_0x4b77ad;}async['addComment'](_0x3bee76){const _0x1be0ae=_0x1d05bf;var _0x11747e,_0x3dce07;const {parentId:_0x3e833a,unitId:_0x53d1a2,text:_0xf64010,threadId:_0x23862b}=_0x3bee76,_0x1ea204=(_0x3dce07=(_0x11747e=_0xf64010[_0x1be0ae(0xcb)])==null?void 0x0:_0x11747e[_0x1be0ae(0xe5)](_0x2a9eb4=>_0x2a9eb4[_0x1be0ae(0xc1)]===_0x1261ad[_0x1be0ae(0xcf)])[_0x1be0ae(0xb8)](_0x255f2f=>_0x255f2f[_0x1be0ae(0xc3)]))!=null?_0x3dce07:[],_0x1d777b=JSON[_0x1be0ae(0xe2)](_0xf64010),_0x28265c=(await this[_0x1be0ae(0xe3)][_0x1be0ae(0xba)](_0x53d1a2))['getMemberID']();if(_0x3e833a){const _0x1ee11a={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204,'threadId':_0x23862b},_0x84b2a9=(await this['_httpService'][_0x1be0ae(0xef)](_0x1be0ae(0xbc)+_0x53d1a2+_0x1be0ae(0xe0),{'body':_0x1ee11a}))[_0x1be0ae(0xb9)][_0x1be0ae(0xde)];return{..._0x3bee76,'id':_0x84b2a9[_0x1be0ae(0xa4)],'dT':_0x4cfb05(+_0x84b2a9[_0x1be0ae(0x92)])[_0x1be0ae(0xa8)](_0x1be0ae(0xe6)),'personId':_0x84b2a9[_0x1be0ae(0xd8)]};}else{const _0x51088d={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204},_0x4cedb0=await this[_0x1be0ae(0xb0)][_0x1be0ae(0xef)]('/universer-api/comment/unit/'+_0x53d1a2+_0x1be0ae(0xaa),{'body':_0x51088d});return X(_0x4cedb0[_0x1be0ae(0xb9)][_0x1be0ae(0xdf)],_0x3bee76);}}async['updateComment'](_0x1e586c){const _0x41853e=_0x1d05bf;var _0x14bb53,_0x78657f;const {text:_0x1bb852,unitId:_0x35928a}=_0x1e586c,_0x497da7=(_0x78657f=(_0x14bb53=_0x1bb852[_0x41853e(0xcb)])==null?void 0x0:_0x14bb53['filter'](_0x3b10b0=>_0x3b10b0['rangeType']===_0x1261ad['COMMENT'])[_0x41853e(0xb8)](_0x1cd22b=>_0x1cd22b[_0x41853e(0xc3)]))!=null?_0x78657f:[],_0x4a1d15=JSON['stringify'](_0x1bb852),_0x4d1d04=_0x1e586c[_0x41853e(0xa2)],_0x58dd89=_0x1e586c['id'],_0x1eb283={'memberId':(await this['_sessionService']['requireSession'](_0x35928a))['getMemberID'](),'unitId':_0x35928a,'threadId':_0x4d1d04,'mention':_0x497da7,'content':_0x4a1d15,'replyId':_0x58dd89},_0x36fc1f=await this['_httpService'][_0x41853e(0xef)](_0x41853e(0xbc)+_0x35928a+_0x41853e(0x8e),{'body':_0x1eb283});return!_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)]||_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)][_0x41853e(0xcd)]===0x1;}async[_0x1d05bf(0xb7)](_0x5c7e00){const _0x520e6e=_0x1d05bf,{unitId:_0x557e5d}=_0x5c7e00,_0x5bd458=_0x5c7e00['threadId'],_0x25bd74={'memberId':this[_0x520e6e(0xeb)][_0x520e6e(0xc6)]()[_0x520e6e(0xb4)],'unitId':_0x557e5d,'threadId':_0x5bd458,'solved':_0x5c7e00[_0x520e6e(0xed)]?I[_0x520e6e(0xd3)]:I[_0x520e6e(0xcc)]},_0x4dc98f=await this[_0x520e6e(0xb0)][_0x520e6e(0xef)](_0x520e6e(0xbc)+_0x557e5d+_0x520e6e(0x90),{'body':_0x25bd74});return!_0x4dc98f[_0x520e6e(0xb9)][_0x520e6e(0xf0)]||_0x4dc98f['body']['error'][_0x520e6e(0xcd)]===0x1;}async[_0x1d05bf(0xab)](_0x46df38,_0x4d353c,_0x484bda,_0x54a0a7){const _0x3bb1ba=_0x1d05bf,_0x213741={'memberId':(await this[_0x3bb1ba(0xe3)][_0x3bb1ba(0xba)](_0x46df38))[_0x3bb1ba(0x97)](),'threadId':_0x484bda,'replyId':_0x54a0a7,'unitId':_0x46df38},_0x1f9673=await this[_0x3bb1ba(0xb0)][_0x3bb1ba(0xef)](_0x3bb1ba(0xbc)+_0x46df38+'/delete',{'body':_0x213741});return!_0x1f9673['body']['error']||_0x1f9673[_0x3bb1ba(0xb9)]['error'][_0x3bb1ba(0xcd)]===0x1;}async[_0x1d05bf(0xe9)](_0x3ff60a,_0x4650fe,_0x1f84df){const _0x463748=_0x1d05bf,_0x41b776={'unitId':_0x3ff60a,'threadId':_0x1f84df},_0x3eee08=await this['_httpService'][_0x463748(0xef)](_0x463748(0xbc)+_0x3ff60a+'/list',{'body':_0x41b776}),_0x23cddc=_0x1f84df[_0x463748(0xb8)](_0xdfc450=>ee(_0x3eee08[_0x463748(0xb9)][_0x463748(0xa3)][_0xdfc450],_0x3ff60a,_0x4650fe))[_0x463748(0xe5)](Boolean);return Object['values'](_0x3eee08[_0x463748(0xb9)][_0x463748(0xd4)])['forEach'](_0x30e281=>{const _0x4128d5=_0x463748;this[_0x4128d5(0xeb)][_0x4128d5(0x98)](_0x30e281);}),_0x23cddc;}[_0x1d05bf(0xa1)](_0x2d238f){const _0x545ded=_0x1d05bf;return{'id':_0x2d238f['id'],'threadId':_0x2d238f['threadId'],'ref':_0x2d238f[_0x545ded(0xe4)]};}};S=Q([b(0x0,_0x3b9053(_0x5340ca)),b(0x1,_0x3b9053(_0xb203b6)),b(0x2,_0x3b9053(_0x5c2147))],S);var re=Object[_0x1d05bf(0xd9)],te=(_0x19ae1f,_0x54ecdb,_0x418547,_0x1af9d3)=>{const _0x58e1ae=_0x1d05bf;for(var _0x49187f=_0x1af9d3>0x1?void 0x0:_0x1af9d3?re(_0x54ecdb,_0x418547):_0x54ecdb,_0x23662e=_0x19ae1f[_0x58e1ae(0x8f)]-0x1,_0x2d8c94;_0x23662e>=0x0;_0x23662e--)(_0x2d8c94=_0x19ae1f[_0x23662e])&&(_0x49187f=_0x2d8c94(_0x49187f)||_0x49187f);return _0x49187f;},M=(_0x20867b,_0x453886)=>(_0x13aeff,_0xaedf7c)=>_0x453886(_0x13aeff,_0xaedf7c,_0x20867b);let f=class extends _0x32b8e3{constructor(_0x467a1c,_0x4f55b3){const _0x294d00=_0x1d05bf;super(),this[_0x294d00(0x94)]=_0x467a1c,this[_0x294d00(0xac)]=_0x4f55b3,this['_initDataSource']();}[_0x1d05bf(0x95)](){const _0x258a41=_0x1d05bf;this[_0x258a41(0x94)][_0x258a41(0xdb)]=this[_0x258a41(0xac)],this[_0x258a41(0x94)][_0x258a41(0xaf)]=!0x1;}};function _0x1614(_0x560cc3,_0x36bcbe){const _0x306061=_0x3060();return _0x1614=function(_0x1614e5,_0x213d5c){_0x1614e5=_0x1614e5-0x85;let _0x3a4b59=_0x306061[_0x1614e5];return _0x3a4b59;},_0x1614(_0x560cc3,_0x36bcbe);}f=te([M(0x0,_0x475030),M(0x1,_0x3b9053(S))],f);var se=Object['defineProperty'],oe=Object[_0x1d05bf(0xd9)],ne=(_0x53ed3f,_0x26f62b,_0x37cbce)=>_0x26f62b in _0x53ed3f?se(_0x53ed3f,_0x26f62b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37cbce}):_0x53ed3f[_0x26f62b]=_0x37cbce,ie=(_0x4e74a3,_0xcc66af,_0x4497fb,_0x2457b0)=>{const _0x3bb833=_0x1d05bf;for(var _0x5eb94e=_0x2457b0>0x1?void 0x0:_0x2457b0?oe(_0xcc66af,_0x4497fb):_0xcc66af,_0x6c53c=_0x4e74a3[_0x3bb833(0x8f)]-0x1,_0x57ad1b;_0x6c53c>=0x0;_0x6c53c--)(_0x57ad1b=_0x4e74a3[_0x6c53c])&&(_0x5eb94e=_0x57ad1b(_0x5eb94e)||_0x5eb94e);return _0x5eb94e;},N=(_0x274db6,_0xe865a)=>(_0x3c7f22,_0x2162d7)=>_0xe865a(_0x3c7f22,_0x2162d7,_0x274db6),$=(_0x5dfb6a,_0x5357ae,_0xda1b01)=>ne(_0x5dfb6a,typeof _0x5357ae!=_0x1d05bf(0xdd)?_0x5357ae+'':_0x5357ae,_0xda1b01);let g=class extends _0x761510{constructor(_0x4cbcbc=O,_0x258eb8,_0x30a2ba){const _0x1eb225=_0x1d05bf;super(),this[_0x1eb225(0xd1)]=_0x4cbcbc,this[_0x1eb225(0xc5)]=_0x258eb8,this[_0x1eb225(0xb6)]=_0x30a2ba;const {..._0x63e336}=_0x543ebe({},O,this[_0x1eb225(0xd1)]);this[_0x1eb225(0xb6)][_0x1eb225(0x96)](z,_0x63e336);}[_0x1d05bf(0xbf)](){const _0x506780=_0x1d05bf;[[S],[f],[_]][_0x506780(0x9f)](_0x5f452e=>{const _0x1efee8=_0x506780;this[_0x1efee8(0xc5)][_0x1efee8(0xe8)](_0x5f452e);});}[_0x1d05bf(0xd5)](){const _0x419e4f=_0x1d05bf;this[_0x419e4f(0xc5)][_0x419e4f(0x88)](f),this[_0x419e4f(0xc5)]['get'](_);}};$(g,'pluginName',W),$(g,_0x1d05bf(0x8a),_0x7f2fa9[_0x1d05bf(0x99)]),g=ie([_0x339bdc(_0x272b59,_0x2f4ea6,_0x5d88f5),N(0x1,_0x3b9053(_0x4549a3)),N(0x2,_0x50a798)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1797(_0x5d10fa,_0x3955cc){const _0x4b3ddd=_0x4b3d();return _0x1797=function(_0x1797c1,_0x26d2b5){_0x1797c1=_0x1797c1-0x7b;let _0x320585=_0x4b3ddd[_0x1797c1];return _0x320585;},_0x1797(_0x5d10fa,_0x3955cc);}(function(_0x5715ea,_0x4a0bd9){const _0xa7c0b2=_0x1797,_0x2f9f17=_0x5715ea();while(!![]){try{const _0x5cd247=-parseInt(_0xa7c0b2(0xd1))/0x1*(-parseInt(_0xa7c0b2(0xe5))/0x2)+-parseInt(_0xa7c0b2(0xc8))/0x3+parseInt(_0xa7c0b2(0xff))/0x4*(-parseInt(_0xa7c0b2(0x91))/0x5)+parseInt(_0xa7c0b2(0x100))/0x6+parseInt(_0xa7c0b2(0xbc))/0x7+-parseInt(_0xa7c0b2(0xee))/0x8*(-parseInt(_0xa7c0b2(0x7b))/0x9)+-parseInt(_0xa7c0b2(0xf3))/0xa;if(_0x5cd247===_0x4a0bd9)break;else _0x2f9f17['push'](_0x2f9f17['shift']());}catch(_0x419f3e){_0x2f9f17['push'](_0x2f9f17['shift']());}}}(_0x4b3d,0x4112d),function(_0x1320a6,_0x354e40){const _0x3b7550=_0x1797;typeof exports==_0x3b7550(0x96)&&typeof module<'u'?_0x354e40(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==_0x3b7550(0xb6)&&define[_0x3b7550(0xb3)]?define([_0x3b7550(0xd8),'@univerjs-pro/collaboration-client',_0x3b7550(0x9f),_0x3b7550(0x85),_0x3b7550(0x9e),'@univerjs/thread-comment',_0x3b7550(0xc9),'@univerjs/network'],_0x354e40):(_0x1320a6=typeof globalThis<'u'?globalThis:_0x1320a6||self,_0x354e40(_0x1320a6[_0x3b7550(0xef)]={},_0x1320a6[_0x3b7550(0xc0)],_0x1320a6['UniverProLicense'],_0x1320a6[_0x3b7550(0xf2)],_0x1320a6[_0x3b7550(0xa1)],_0x1320a6[_0x3b7550(0xec)],_0x1320a6['rxjs'],_0x1320a6['UniverNetwork']));}(this,function(_0x4886da,_0x205b1b,_0x241fc0,_0x326302,_0x2650af,_0x1afa27,_0x212acc,_0x160ae3){'use strict';const _0x441350=_0x1797;const _0x2140d3=_0x441350(0xb5);var _0x298f21=(_0x51bc7f=>(_0x51bc7f[_0x51bc7f[_0x441350(0x101)]=0x0]='OpenOrReOpen',_0x51bc7f[_0x51bc7f[_0x441350(0x80)]=0x1]=_0x441350(0x80),_0x51bc7f[_0x51bc7f['UNRECOGNIZED']=-0x1]=_0x441350(0xa6),_0x51bc7f))(_0x298f21||{}),_0x4bdaff=(_0x55c09e=>(_0x55c09e[_0x55c09e[_0x441350(0xf1)]=0x0]=_0x441350(0xf1),_0x55c09e[_0x55c09e[_0x441350(0xcf)]=0x1]=_0x441350(0xcf),_0x55c09e[_0x55c09e[_0x441350(0x87)]=0x2]=_0x441350(0x87),_0x55c09e[_0x55c09e[_0x441350(0xba)]=0x3]=_0x441350(0xba),_0x55c09e[_0x55c09e[_0x441350(0xe7)]=0x4]=_0x441350(0xe7),_0x55c09e[_0x55c09e[_0x441350(0xf0)]=0x5]=_0x441350(0xf0),_0x55c09e[_0x55c09e[_0x441350(0xa6)]=-0x1]='UNRECOGNIZED',_0x55c09e))(_0x4bdaff||{});const _0x12aa1d=_0xf83225=>_0x326302[_0x441350(0xd3)](new Date(+_0xf83225))[_0x441350(0xa4)]('YYYY/MM/DD\x20HH:mm'),_0x44883e=async(_0x401639,_0x4996e6)=>{const _0x258022=_0x441350,_0x50f8ed=_0x401639['get'](_0x326302[_0x258022(0x94)]),_0x550484=_0x401639[_0x258022(0xaa)](_0x160ae3[_0x258022(0x9b)]);_0x4996e6[_0x258022(0xfc)](_0x4e329b=>{const _0x1f0045=_0x258022;_0x50f8ed[_0x1f0045(0x7c)](_0x4e329b)&&_0x4996e6['delete'](_0x4e329b);}),_0x4996e6['size']&&(await _0x550484['get'](_0x258022(0xa2),{'params':{'userIDs':[..._0x4996e6]}}))[_0x258022(0x89)][_0x258022(0x8d)][_0x258022(0xfc)](_0x4635a5=>{const _0x5583d6=_0x258022;_0x4635a5&&_0x50f8ed[_0x5583d6(0xc3)](_0x4635a5);});};var _0x2a06c5=Object[_0x441350(0xfe)],_0x24f560=(_0x4682d9,_0x52ac04,_0x300525,_0x3ef1c5)=>{for(var _0x64bf2=_0x3ef1c5>0x1?void 0x0:_0x3ef1c5?_0x2a06c5(_0x52ac04,_0x300525):_0x52ac04,_0x2af4db=_0x4682d9['length']-0x1,_0x4cd148;_0x2af4db>=0x0;_0x2af4db--)(_0x4cd148=_0x4682d9[_0x2af4db])&&(_0x64bf2=_0x4cd148(_0x64bf2)||_0x64bf2);return _0x64bf2;},_0x234abc=(_0xc3daaf,_0x567eba)=>(_0x513cb8,_0x1b3138)=>_0x567eba(_0x513cb8,_0x1b3138,_0xc3daaf);let _0x42818c=class extends _0x326302['Disposable']{constructor(_0x2851b4,_0x3c8c47,_0xe1c92a,_0x24f8b9){const _0x1ce608=_0x441350;super(),this[_0x1ce608(0x93)]=_0x2851b4,this[_0x1ce608(0xdd)]=_0x3c8c47,this[_0x1ce608(0xe8)]=_0xe1c92a,this[_0x1ce608(0xc5)]=_0x24f8b9,this[_0x1ce608(0xea)](),this[_0x1ce608(0xe3)]();}[_0x441350(0xe3)](){const _0x529cca=_0x441350;this[_0x529cca(0xa0)](this[_0x529cca(0xdd)][_0x529cca(0xcd)][_0x529cca(0xcc)](_0x212acc[_0x529cca(0x82)](0x10))['subscribe'](_0xc3e228=>{const _0x5e2de7=_0x529cca,_0x518c33=new Set();_0xc3e228['forEach'](_0x49a8fa=>{const _0x311d3e=_0x1797;switch(_0x49a8fa['type']){case _0x311d3e(0xde):{const _0x2f1433=_0x49a8fa[_0x311d3e(0x9c)][_0x311d3e(0xf6)];_0x518c33[_0x311d3e(0xde)](_0x2f1433);break;}}}),_0x44883e(this[_0x5e2de7(0xc5)],_0x518c33);}));}[_0x441350(0xea)](){const _0x44c446=_0x441350;this[_0x44c446(0xa0)](this[_0x44c446(0x93)][_0x44c446(0xcd)][_0x44c446(0xc2)](async _0x256839=>{const _0x3973be=_0x44c446;var _0x5f8773,_0x4aa248,_0x473dcf,_0x560483;const _0x241493=(_0x5f8773=this[_0x3973be(0xdd)][_0x3973be(0xf8)](_0x256839['unitId'])[_0x3973be(0xf4)](_0x346bde=>_0x346bde[_0x3973be(0x95)]===_0x256839[_0x3973be(0x95)]))==null?void 0x0:_0x5f8773['root'];if(!_0x241493)return;const {unitId:_0x1c2e2f,subUnitId:_0x10ab9d}=_0x241493;switch(_0x256839[_0x3973be(0xdc)]&&this[_0x3973be(0xe8)]['addUser'](_0x256839['user']),_0x256839[_0x3973be(0xac)]){case _0x4bdaff['Add']:break;case _0x4bdaff[_0x3973be(0x87)]:{this[_0x3973be(0xdd)][_0x3973be(0x8f)](_0x1c2e2f,_0x10ab9d,{'unitId':_0x1c2e2f,'subUnitId':_0x10ab9d,'ref':'','id':_0x256839['replyId'],'dT':_0x12aa1d(+_0x256839[_0x3973be(0xbe)]),'threadId':_0x256839[_0x3973be(0x95)],'personId':(_0x473dcf=(_0x4aa248=_0x256839[_0x3973be(0xdc)])==null?void 0x0:_0x4aa248['userID'])!=null?_0x473dcf:_0x256839[_0x3973be(0xcb)],'text':JSON[_0x3973be(0x7e)](_0x256839[_0x3973be(0xed)]),'parentId':_0x241493['id']});break;}case _0x4bdaff[_0x3973be(0xe7)]:{const _0x55725a=this[_0x3973be(0xdd)][_0x3973be(0xc7)](_0x1c2e2f,_0x10ab9d,_0x256839[_0x3973be(0xa7)]);_0x55725a&&_0x55725a[_0x3973be(0xda)]&&this[_0x3973be(0xdd)][_0x3973be(0x99)](_0x1c2e2f,_0x10ab9d,_0x256839[_0x3973be(0xa7)]);break;}case _0x4bdaff['Edit']:{this[_0x3973be(0xdd)][_0x3973be(0xdf)](_0x1c2e2f,_0x10ab9d,{'commentId':_0x256839[_0x3973be(0xa7)],'text':JSON['parse'](_0x256839['content'])});break;}case _0x4bdaff[_0x3973be(0xf0)]:{const _0x5d7ba7=(_0x560483=this['_threadCommentModel'][_0x3973be(0xf8)](_0x256839[_0x3973be(0xe2)])['find'](_0x55fb33=>_0x55fb33[_0x3973be(0x95)]===_0x256839[_0x3973be(0x95)]))==null?void 0x0:_0x560483[_0x3973be(0xfb)];_0x5d7ba7&&this[_0x3973be(0xdd)][_0x3973be(0xb0)](_0x1c2e2f,_0x10ab9d,_0x5d7ba7['id'],_0x256839[_0x3973be(0xb8)]===_0x298f21['Solved']);break;}}}));}};_0x42818c=_0x24f560([_0x234abc(0x0,_0x326302[_0x441350(0xd4)](_0x205b1b[_0x441350(0x8a)])),_0x234abc(0x1,_0x326302[_0x441350(0xd4)](_0x1afa27[_0x441350(0xd7)])),_0x234abc(0x2,_0x326302[_0x441350(0xd4)](_0x326302[_0x441350(0x94)])),_0x234abc(0x3,_0x326302[_0x441350(0xd4)](_0x326302[_0x441350(0xd2)]))],_0x42818c);const _0x5bb60d=_0x441350(0xf7),_0x25957c={};var _0x1684d5=Object[_0x441350(0xfe)],_0x320ae0=(_0x462cca,_0x59817b,_0x272810,_0x407ea2)=>{const _0x613ab4=_0x441350;for(var _0x3b9ef5=_0x407ea2>0x1?void 0x0:_0x407ea2?_0x1684d5(_0x59817b,_0x272810):_0x59817b,_0x40de9a=_0x462cca[_0x613ab4(0x90)]-0x1,_0x1b8829;_0x40de9a>=0x0;_0x40de9a--)(_0x1b8829=_0x462cca[_0x40de9a])&&(_0x3b9ef5=_0x1b8829(_0x3b9ef5)||_0x3b9ef5);return _0x3b9ef5;},_0x1e8f6c=(_0x18bfcf,_0x55c7df)=>(_0x472eba,_0xb5ed9d)=>_0x55c7df(_0x472eba,_0xb5ed9d,_0x18bfcf);function _0x11a06b(_0x28a055,_0x2b84bd){const _0x43defc=_0x441350,_0x35da7e=_0x28a055[_0x43defc(0xd9)][0x0];return{..._0x2b84bd,'id':_0x35da7e[_0x43defc(0xa7)],'resolved':_0x28a055['solved']===0x1,'dT':_0x12aa1d(_0x35da7e['createTimestamp']),'personId':_0x35da7e[_0x43defc(0xcb)],'threadId':_0x35da7e['threadId']};}function _0x2fe6b4(_0x506f77,_0x4e9f25,_0x23464a){const _0x531aa1=_0x441350;var _0x5a9f85,_0x2ceaf0;if(((_0x2ceaf0=(_0x5a9f85=_0x506f77==null?void 0x0:_0x506f77[_0x531aa1(0xd9)])==null?void 0x0:_0x5a9f85[_0x531aa1(0x90)])!=null?_0x2ceaf0:0x0)>0x0){const _0x4d1c99=(_0x2d6bd6,_0x19f1d2)=>({'id':_0x2d6bd6[_0x531aa1(0xa7)],'threadId':_0x2d6bd6[_0x531aa1(0x95)],'dT':_0x12aa1d(_0x2d6bd6['createTimestamp']),'personId':_0x2d6bd6[_0x531aa1(0xcb)],'resolved':_0x506f77['solved']===_0x298f21[_0x531aa1(0x80)],'unitId':_0x4e9f25,'subUnitId':_0x23464a,'text':JSON[_0x531aa1(0x7e)](_0x2d6bd6[_0x531aa1(0xed)]),'parentId':_0x19f1d2}),_0xf883d0=_0x4d1c99(_0x506f77['replies'][0x0]);return{..._0xf883d0,'children':_0x506f77[_0x531aa1(0xd9)][_0x531aa1(0xa9)](0x1)[_0x531aa1(0xc4)](_0x494851=>_0x4d1c99(_0x494851,_0xf883d0['id']))};}return null;}let _0x4f7999=class{constructor(_0x381866,_0x51a8fa,_0x5bfa3f){const _0x4adfae=_0x441350;this[_0x4adfae(0xb7)]=_0x381866,this['_userService']=_0x51a8fa,this[_0x4adfae(0xae)]=_0x5bfa3f;}async[_0x441350(0x8f)](_0x1123d8){const _0xf7e7dd=_0x441350;var _0x3f5417,_0x4bffc8;const {parentId:_0x312dda,unitId:_0x30fae7,text:_0x3c2581,threadId:_0x38e3e7}=_0x1123d8,_0x19a0ad=(_0x4bffc8=(_0x3f5417=_0x3c2581[_0xf7e7dd(0x102)])==null?void 0x0:_0x3f5417['filter'](_0x993427=>_0x993427[_0xf7e7dd(0xf5)]===_0x326302[_0xf7e7dd(0xe0)][_0xf7e7dd(0x92)])[_0xf7e7dd(0xc4)](_0x2fd8a0=>_0x2fd8a0[_0xf7e7dd(0xdb)]))!=null?_0x4bffc8:[],_0x5d013e=JSON[_0xf7e7dd(0x83)](_0x3c2581),_0x6830c7=(await this[_0xf7e7dd(0xae)][_0xf7e7dd(0xb4)](_0x30fae7))[_0xf7e7dd(0x98)]();if(_0x312dda){const _0x4d7f2e={'memberId':_0x6830c7,'unitId':_0x30fae7,'content':_0x5d013e,'mention':_0x19a0ad,'threadId':_0x38e3e7},_0x59a206=(await this[_0xf7e7dd(0xb7)]['post'](_0xf7e7dd(0x97)+_0x30fae7+'/reply',{'body':_0x4d7f2e}))[_0xf7e7dd(0x89)][_0xf7e7dd(0x81)];return{..._0x1123d8,'id':_0x59a206[_0xf7e7dd(0xa7)],'dT':_0x326302[_0xf7e7dd(0xd3)](+_0x59a206[_0xf7e7dd(0xbe)])[_0xf7e7dd(0xa4)](_0xf7e7dd(0xe9)),'personId':_0x59a206[_0xf7e7dd(0xcb)]};}else{const _0x40b627={'memberId':_0x6830c7,'unitId':_0x30fae7,'content':_0x5d013e,'mention':_0x19a0ad},_0x53538b=await this[_0xf7e7dd(0xb7)][_0xf7e7dd(0xb9)](_0xf7e7dd(0x97)+_0x30fae7+_0xf7e7dd(0x103),{'body':_0x40b627});return _0x11a06b(_0x53538b[_0xf7e7dd(0x89)][_0xf7e7dd(0xeb)],_0x1123d8);}}async[_0x441350(0xdf)](_0x16f701){const _0x23d335=_0x441350;var _0x3ee163,_0x415e6c;const {text:_0x5ca392,unitId:_0x12af4f}=_0x16f701,_0x1916b1=(_0x415e6c=(_0x3ee163=_0x5ca392[_0x23d335(0x102)])==null?void 0x0:_0x3ee163[_0x23d335(0xaf)](_0x40c41f=>_0x40c41f['rangeType']===_0x326302[_0x23d335(0xe0)]['COMMENT'])[_0x23d335(0xc4)](_0x8cfc19=>_0x8cfc19['rangeId']))!=null?_0x415e6c:[],_0x482b67=JSON[_0x23d335(0x83)](_0x5ca392),_0xb75c6d=_0x16f701[_0x23d335(0x95)],_0x361934=_0x16f701['id'],_0x7fd17d={'memberId':(await this[_0x23d335(0xae)][_0x23d335(0xb4)](_0x12af4f))[_0x23d335(0x98)](),'unitId':_0x12af4f,'threadId':_0xb75c6d,'mention':_0x1916b1,'content':_0x482b67,'replyId':_0x361934},_0x44773a=await this[_0x23d335(0xb7)]['post'](_0x23d335(0x97)+_0x12af4f+_0x23d335(0xa5),{'body':_0x7fd17d});return!_0x44773a[_0x23d335(0x89)][_0x23d335(0xbd)]||_0x44773a[_0x23d335(0x89)][_0x23d335(0xbd)]['code']===0x1;}async[_0x441350(0xb0)](_0x40acc6){const _0x56a2bf=_0x441350,{unitId:_0x173ec5}=_0x40acc6,_0x281cfe=_0x40acc6[_0x56a2bf(0x95)],_0x2833d6={'memberId':this[_0x56a2bf(0xe8)]['getCurrentUser']()[_0x56a2bf(0x104)],'unitId':_0x173ec5,'threadId':_0x281cfe,'solved':_0x40acc6['resolved']?_0x298f21['Solved']:_0x298f21[_0x56a2bf(0x101)]},_0x9563a9=await this['_httpService'][_0x56a2bf(0xb9)](_0x56a2bf(0x97)+_0x173ec5+_0x56a2bf(0xad),{'body':_0x2833d6});return!_0x9563a9['body'][_0x56a2bf(0xbd)]||_0x9563a9[_0x56a2bf(0x89)]['error'][_0x56a2bf(0xd0)]===0x1;}async[_0x441350(0x99)](_0x51dd34,_0x4416bb,_0x3f8437,_0x1452c9){const _0x3a1f0f=_0x441350,_0x323513={'memberId':(await this[_0x3a1f0f(0xae)][_0x3a1f0f(0xb4)](_0x51dd34))['getMemberID'](),'threadId':_0x3f8437,'replyId':_0x1452c9,'unitId':_0x51dd34},_0x149c24=await this[_0x3a1f0f(0xb7)]['post'](_0x3a1f0f(0x97)+_0x51dd34+_0x3a1f0f(0xab),{'body':_0x323513});return!_0x149c24['body'][_0x3a1f0f(0xbd)]||_0x149c24['body'][_0x3a1f0f(0xbd)][_0x3a1f0f(0xd0)]===0x1;}async[_0x441350(0x88)](_0x6d6ece,_0x38ffef,_0x417635){const _0x55ae7e=_0x441350,_0x59b81b={'unitId':_0x6d6ece,'threadId':_0x417635},_0x4c2fc4=await this[_0x55ae7e(0xb7)]['post'](_0x55ae7e(0x97)+_0x6d6ece+_0x55ae7e(0x9a),{'body':_0x59b81b}),_0x3984c9=_0x417635[_0x55ae7e(0xc4)](_0x341892=>_0x2fe6b4(_0x4c2fc4[_0x55ae7e(0x89)][_0x55ae7e(0xfd)][_0x341892],_0x6d6ece,_0x38ffef))['filter'](Boolean);return Object[_0x55ae7e(0xbb)](_0x4c2fc4[_0x55ae7e(0x89)][_0x55ae7e(0x8d)])['forEach'](_0x40fc1f=>{const _0x2bb49d=_0x55ae7e;this[_0x2bb49d(0xe8)]['addUser'](_0x40fc1f);}),_0x3984c9;}[_0x441350(0x7f)](_0x34965c){const _0x540bdc=_0x441350;return{'id':_0x34965c['id'],'threadId':_0x34965c[_0x540bdc(0x95)],'ref':_0x34965c[_0x540bdc(0xbf)]};}};_0x4f7999=_0x320ae0([_0x1e8f6c(0x0,_0x326302[_0x441350(0xd4)](_0x160ae3[_0x441350(0x9b)])),_0x1e8f6c(0x1,_0x326302[_0x441350(0xd4)](_0x326302[_0x441350(0x94)])),_0x1e8f6c(0x2,_0x326302[_0x441350(0xd4)](_0x205b1b[_0x441350(0xa8)]))],_0x4f7999);var _0x2d7ee3=Object[_0x441350(0xfe)],_0x3d7e92=(_0x31fff1,_0x268b4d,_0x4b7960,_0x14cb63)=>{const _0x3bc65b=_0x441350;for(var _0x4d6852=_0x14cb63>0x1?void 0x0:_0x14cb63?_0x2d7ee3(_0x268b4d,_0x4b7960):_0x268b4d,_0x270c0e=_0x31fff1[_0x3bc65b(0x90)]-0x1,_0x5055e6;_0x270c0e>=0x0;_0x270c0e--)(_0x5055e6=_0x31fff1[_0x270c0e])&&(_0x4d6852=_0x5055e6(_0x4d6852)||_0x4d6852);return _0x4d6852;},_0x628af6=(_0x2bea67,_0x53035d)=>(_0x38bd5e,_0x9852d)=>_0x53035d(_0x38bd5e,_0x9852d,_0x2bea67);let _0x270d22=class extends _0x326302[_0x441350(0xf9)]{constructor(_0x70d4e4,_0xa95d6a){const _0x48c58e=_0x441350;super(),this['_threadCommentDataSourceService']=_0x70d4e4,this[_0x48c58e(0xd5)]=_0xa95d6a,this[_0x48c58e(0x8b)]();}[_0x441350(0x8b)](){const _0x1e86b9=_0x441350;this[_0x1e86b9(0x9d)]['dataSource']=this[_0x1e86b9(0xd5)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x270d22=_0x3d7e92([_0x628af6(0x0,_0x1afa27['IThreadCommentDataSourceService']),_0x628af6(0x1,_0x326302['Inject'](_0x4f7999))],_0x270d22);var _0x2beaf7=Object[_0x441350(0xa3)],_0x3cb341=Object[_0x441350(0xfe)],_0x3f6a47=(_0x150b5d,_0x40640d,_0x4c6d6a)=>_0x40640d in _0x150b5d?_0x2beaf7(_0x150b5d,_0x40640d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c6d6a}):_0x150b5d[_0x40640d]=_0x4c6d6a,_0x4eb8f1=(_0x56a05b,_0x5e03ef,_0x4f97c1,_0x3a8f94)=>{const _0x422b9a=_0x441350;for(var _0x21448b=_0x3a8f94>0x1?void 0x0:_0x3a8f94?_0x3cb341(_0x5e03ef,_0x4f97c1):_0x5e03ef,_0xb66109=_0x56a05b[_0x422b9a(0x90)]-0x1,_0x472069;_0xb66109>=0x0;_0xb66109--)(_0x472069=_0x56a05b[_0xb66109])&&(_0x21448b=_0x472069(_0x21448b)||_0x21448b);return _0x21448b;},_0x48e5d5=(_0x321bfa,_0x167d61)=>(_0x535700,_0x23b4c3)=>_0x167d61(_0x535700,_0x23b4c3,_0x321bfa),_0x4c18c1=(_0x1a15e4,_0x4e3f38,_0x1e62cf)=>_0x3f6a47(_0x1a15e4,typeof _0x4e3f38!='symbol'?_0x4e3f38+'':_0x4e3f38,_0x1e62cf);_0x4886da[_0x441350(0xe4)]=class extends _0x326302[_0x441350(0x84)]{constructor(_0x404a8d=_0x25957c,_0x4a3309,_0x556318){const _0x39209e=_0x441350;super(),this[_0x39209e(0x7d)]=_0x404a8d,this[_0x39209e(0xc5)]=_0x4a3309,this[_0x39209e(0xd6)]=_0x556318;const {..._0xd3c02}=_0x326302[_0x39209e(0xb1)]({},_0x25957c,this[_0x39209e(0x7d)]);this[_0x39209e(0xd6)][_0x39209e(0xe1)](_0x5bb60d,_0xd3c02);}[_0x441350(0xe6)](){[[_0x4f7999],[_0x270d22],[_0x42818c]]['forEach'](_0x31f2c0=>{const _0x1913b5=_0x1797;this[_0x1913b5(0xc5)][_0x1913b5(0xde)](_0x31f2c0);});}[_0x441350(0xc1)](){const _0x46b590=_0x441350;this[_0x46b590(0xc5)][_0x46b590(0xaa)](_0x270d22),this[_0x46b590(0xc5)][_0x46b590(0xaa)](_0x42818c);}},_0x4c18c1(_0x4886da['UniverThreadCommentDataSourcePlugin'],_0x441350(0x8c),_0x2140d3),_0x4c18c1(_0x4886da[_0x441350(0xe4)],_0x441350(0xac),_0x326302[_0x441350(0xfa)]['UNIVER_UNKNOWN']),_0x4886da[_0x441350(0xe4)]=_0x4eb8f1([_0x326302[_0x441350(0xc6)](_0x2650af[_0x441350(0x86)],_0x205b1b['UniverCollaborationClientPlugin'],_0x241fc0[_0x441350(0xb2)]),_0x48e5d5(0x1,_0x326302[_0x441350(0xd4)](_0x326302['Injector'])),_0x48e5d5(0x2,_0x326302[_0x441350(0x8e)])],_0x4886da[_0x441350(0xe4)]),Object['defineProperty'](_0x4886da,Symbol[_0x441350(0xce)],{'value':_0x441350(0xca)});}));function _0x4b3d(){const _0x3e2e7f=['pluginName','users','IConfigService','addComment','length','25cjckdP','COMMENT','_commentService','UserManagerService','threadId','object','/universer-api/comment/unit/','getMemberID','deleteComment','/list','HTTPService','payload','_threadCommentDataSourceService','@univerjs/thread-comment-ui','@univerjs-pro/license','disposeWithMe','UniverThreadCommentUi','/universer-api/user/list','defineProperty','format','/edit','UNRECOGNIZED','replyId','CollaborationSessionService','slice','get','/delete','type','/solved','_sessionService','filter','resolveComment','merge','UniverLicensePlugin','amd','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','_httpService','solved','post','Edit','values','113057tOdlVp','error','createTimestamp','ref','UniverProCollaborationClient','onReady','subscribe','addUser','map','_injector','DependentOn','getComment','775929gDCVUG','rxjs','Module','userId','pipe','commentUpdate$','toStringTag','Add','code','43ZaovyD','Injector','dayjs','Inject','_threadCommentDataSource','_configService','ThreadCommentModel','exports','replies','parentId','rangeId','user','_threadCommentModel','add','updateComment','CustomRangeType','setConfig','unitId','_initUserSync','UniverThreadCommentDataSourcePlugin','194JpqIbE','onStarting','Delete','_userService','YYYY/MM/DD\x20HH:mm','_init','comment','UniverThreadComment','content','8qqVWsy','UniverProThreadCommentDatasource','Solve','Unknown','UniverCore','522540mvgsLs','find','rangeType','personId','thread-comment-data-source.config','getUnit','Disposable','UniverInstanceType','root','forEach','comments','getOwnPropertyDescriptor','84944tUfbds','1538754PLyGkq','OpenOrReOpen','customRanges','/add','userID','3661533peQuxk','getUser','_config','parse','saveCommentToSnapshot','Solved','reply','bufferTime','stringify','Plugin','@univerjs/core','UniverThreadCommentUIPlugin','Reply','listComments','body','CommentService','_initDataSource'];_0x4b3d=function(){return _0x3e2e7f;};return _0x4b3d();}
1
+ (function(_0x221015,_0x274dc2){const _0x2a0dc0=_0x39d9,_0x4e0a51=_0x221015();while(!![]){try{const _0x36d4ec=-parseInt(_0x2a0dc0(0x117))/0x1*(-parseInt(_0x2a0dc0(0x112))/0x2)+-parseInt(_0x2a0dc0(0xa4))/0x3+parseInt(_0x2a0dc0(0x113))/0x4+-parseInt(_0x2a0dc0(0x94))/0x5+-parseInt(_0x2a0dc0(0x115))/0x6*(-parseInt(_0x2a0dc0(0xcf))/0x7)+parseInt(_0x2a0dc0(0xea))/0x8+-parseInt(_0x2a0dc0(0xf9))/0x9;if(_0x36d4ec===_0x274dc2)break;else _0x4e0a51['push'](_0x4e0a51['shift']());}catch(_0xa1c719){_0x4e0a51['push'](_0x4e0a51['shift']());}}}(_0x33b0,0xdf1b3),function(_0x1e41ce,_0x356193){const _0xfde7d=_0x39d9;typeof exports==_0xfde7d(0xa8)&&typeof module<'u'?_0x356193(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==_0xfde7d(0xb7)&&define[_0xfde7d(0xfc)]?define([_0xfde7d(0xf1),_0xfde7d(0x10d),_0xfde7d(0xa9),_0xfde7d(0xfd),_0xfde7d(0xab),_0xfde7d(0x9c),_0xfde7d(0xe5),_0xfde7d(0xee)],_0x356193):(_0x1e41ce=typeof globalThis<'u'?globalThis:_0x1e41ce||self,_0x356193(_0x1e41ce[_0xfde7d(0xc2)]={},_0x1e41ce[_0xfde7d(0x10f)],_0x1e41ce[_0xfde7d(0xcd)],_0x1e41ce[_0xfde7d(0x106)],_0x1e41ce[_0xfde7d(0xa6)],_0x1e41ce[_0xfde7d(0x114)],_0x1e41ce[_0xfde7d(0xe5)],_0x1e41ce['UniverNetwork']));}(this,function(_0x50a725,_0x1800eb,_0x234c9c,_0x385f71,_0x408d76,_0x5ea113,_0x42a611,_0x27fdcc){'use strict';const _0x2f43e9=_0x39d9;const _0x487e4a=_0x2f43e9(0x101);var _0x4670dc=(_0x1e87ac=>(_0x1e87ac[_0x1e87ac[_0x2f43e9(0x107)]=0x0]='OpenOrReOpen',_0x1e87ac[_0x1e87ac[_0x2f43e9(0xe8)]=0x1]='Solved',_0x1e87ac[_0x1e87ac['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1e87ac))(_0x4670dc||{}),_0x225ca4=(_0x4d34c7=>(_0x4d34c7[_0x4d34c7['Unknown']=0x0]=_0x2f43e9(0xbb),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xa1)]=0x1]=_0x2f43e9(0xa1),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xc4)]=0x2]=_0x2f43e9(0xc4),_0x4d34c7[_0x4d34c7['Edit']=0x3]=_0x2f43e9(0xc8),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xdb)]=0x4]=_0x2f43e9(0xdb),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xa0)]=0x5]='Solve',_0x4d34c7[_0x4d34c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4d34c7))(_0x225ca4||{});const _0x1bfd26=_0x23997b=>_0x385f71[_0x2f43e9(0xe4)](new Date(+_0x23997b))[_0x2f43e9(0xbf)](_0x2f43e9(0xac)),_0x454b7b=async(_0x3b6732,_0x7af99e)=>{const _0x2d5e9a=_0x2f43e9,_0x428c27=_0x3b6732[_0x2d5e9a(0xe2)](_0x385f71[_0x2d5e9a(0x98)]),_0x4dc65d=_0x3b6732[_0x2d5e9a(0xe2)](_0x27fdcc['HTTPService']);_0x7af99e[_0x2d5e9a(0xc1)](_0x355706=>{const _0x441c83=_0x2d5e9a;_0x428c27['getUser'](_0x355706)&&_0x7af99e[_0x441c83(0xd0)](_0x355706);}),_0x7af99e['size']&&(await _0x4dc65d['get'](_0x2d5e9a(0xb8),{'params':{'userIDs':[..._0x7af99e]}}))[_0x2d5e9a(0xb0)]['users'][_0x2d5e9a(0xc1)](_0x359fef=>{_0x359fef&&_0x428c27['addUser'](_0x359fef);});};var _0x27ad4a=Object[_0x2f43e9(0xdc)],_0x54597d=(_0x3e5ff2,_0x140ebf,_0xa4db3,_0x370ece)=>{const _0x378323=_0x2f43e9;for(var _0xc09479=_0x370ece>0x1?void 0x0:_0x370ece?_0x27ad4a(_0x140ebf,_0xa4db3):_0x140ebf,_0x2b862b=_0x3e5ff2[_0x378323(0xe6)]-0x1,_0x434e49;_0x2b862b>=0x0;_0x2b862b--)(_0x434e49=_0x3e5ff2[_0x2b862b])&&(_0xc09479=_0x434e49(_0xc09479)||_0xc09479);return _0xc09479;},_0x84d6f=(_0x54d136,_0xb669ed)=>(_0x52866f,_0x2690d3)=>_0xb669ed(_0x52866f,_0x2690d3,_0x54d136);let _0x2917f5=class extends _0x385f71['Disposable']{constructor(_0x48ce46,_0x73a341,_0x259841,_0x58278b){const _0x16889d=_0x2f43e9;super(),this[_0x16889d(0x10a)]=_0x48ce46,this[_0x16889d(0x9b)]=_0x73a341,this[_0x16889d(0xbd)]=_0x259841,this[_0x16889d(0xd2)]=_0x58278b,this['_init'](),this[_0x16889d(0xa2)]();}[_0x2f43e9(0xa2)](){const _0x1c7c17=_0x2f43e9;this[_0x1c7c17(0xd6)](this[_0x1c7c17(0x9b)][_0x1c7c17(0xa3)][_0x1c7c17(0x93)](_0x42a611[_0x1c7c17(0xfa)](0x10))[_0x1c7c17(0xd5)](_0x343491=>{const _0x58a054=_0x1c7c17,_0x269eba=new Set();_0x343491[_0x58a054(0xc1)](_0x201c9b=>{const _0x348b37=_0x58a054;switch(_0x201c9b[_0x348b37(0xbc)]){case _0x348b37(0xdf):{const _0x31c504=_0x201c9b[_0x348b37(0x104)][_0x348b37(0xe0)];_0x269eba[_0x348b37(0xdf)](_0x31c504);break;}}}),_0x454b7b(this['_injector'],_0x269eba);}));}[_0x2f43e9(0xf5)](){const _0x1053c4=_0x2f43e9;this['disposeWithMe'](this['_commentService'][_0x1053c4(0xa3)][_0x1053c4(0xd5)](async _0x492d4b=>{const _0x554c34=_0x1053c4;var _0x8307e7,_0xbe2b7b,_0x39c307,_0x19c1f6;const _0x198f3d=(_0x8307e7=this[_0x554c34(0x9b)][_0x554c34(0xcc)](_0x492d4b[_0x554c34(0x103)])[_0x554c34(0xf8)](_0x518afc=>_0x518afc[_0x554c34(0xa5)]===_0x492d4b[_0x554c34(0xa5)]))==null?void 0x0:_0x8307e7[_0x554c34(0x97)];if(!_0x198f3d)return;const {unitId:_0x56a1bf,subUnitId:_0x2c8f50}=_0x198f3d;switch(_0x492d4b[_0x554c34(0xb2)]&&this[_0x554c34(0xbd)]['addUser'](_0x492d4b[_0x554c34(0xb2)]),_0x492d4b[_0x554c34(0xbc)]){case _0x225ca4['Add']:break;case _0x225ca4['Reply']:{this['_threadCommentModel']['addComment'](_0x56a1bf,_0x2c8f50,{'unitId':_0x56a1bf,'subUnitId':_0x2c8f50,'ref':'','id':_0x492d4b[_0x554c34(0xec)],'dT':_0x1bfd26(+_0x492d4b['createTimestamp']),'threadId':_0x492d4b['threadId'],'personId':(_0x39c307=(_0xbe2b7b=_0x492d4b[_0x554c34(0xb2)])==null?void 0x0:_0xbe2b7b[_0x554c34(0xcb)])!=null?_0x39c307:_0x492d4b[_0x554c34(0xc6)],'text':JSON['parse'](_0x492d4b[_0x554c34(0x119)]),'parentId':_0x198f3d['id']});break;}case _0x225ca4['Delete']:{const _0x3387a1=this['_threadCommentModel'][_0x554c34(0xb1)](_0x56a1bf,_0x2c8f50,_0x492d4b[_0x554c34(0xec)]);_0x3387a1&&_0x3387a1[_0x554c34(0xc9)]&&this[_0x554c34(0x9b)][_0x554c34(0x96)](_0x56a1bf,_0x2c8f50,_0x492d4b[_0x554c34(0xec)]);break;}case _0x225ca4[_0x554c34(0xc8)]:{this[_0x554c34(0x9b)][_0x554c34(0xaa)](_0x56a1bf,_0x2c8f50,{'commentId':_0x492d4b[_0x554c34(0xec)],'text':JSON[_0x554c34(0x10c)](_0x492d4b['content'])});break;}case _0x225ca4[_0x554c34(0xa0)]:{const _0xd35ea0=(_0x19c1f6=this[_0x554c34(0x9b)][_0x554c34(0xcc)](_0x492d4b[_0x554c34(0x103)])[_0x554c34(0xf8)](_0x5a5389=>_0x5a5389[_0x554c34(0xa5)]===_0x492d4b[_0x554c34(0xa5)]))==null?void 0x0:_0x19c1f6[_0x554c34(0x97)];_0xd35ea0&&this[_0x554c34(0x9b)]['resolveComment'](_0x56a1bf,_0x2c8f50,_0xd35ea0['id'],_0x492d4b[_0x554c34(0xf4)]===_0x4670dc['Solved']);break;}}}));}};_0x2917f5=_0x54597d([_0x84d6f(0x0,_0x385f71[_0x2f43e9(0xeb)](_0x1800eb['CommentService'])),_0x84d6f(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x5ea113[_0x2f43e9(0x100)])),_0x84d6f(0x2,_0x385f71[_0x2f43e9(0xeb)](_0x385f71['UserManagerService'])),_0x84d6f(0x3,_0x385f71[_0x2f43e9(0xeb)](_0x385f71[_0x2f43e9(0xd1)]))],_0x2917f5);const _0x2b72e3=_0x2f43e9(0xba),_0x15c51c={};var _0x5e02fd=Object[_0x2f43e9(0xdc)],_0x36444b=(_0x36935c,_0x5cc7fe,_0x478ce3,_0x48cbed)=>{for(var _0x3cefa1=_0x48cbed>0x1?void 0x0:_0x48cbed?_0x5e02fd(_0x5cc7fe,_0x478ce3):_0x5cc7fe,_0x369300=_0x36935c['length']-0x1,_0x916936;_0x369300>=0x0;_0x369300--)(_0x916936=_0x36935c[_0x369300])&&(_0x3cefa1=_0x916936(_0x3cefa1)||_0x3cefa1);return _0x3cefa1;},_0x4d20f3=(_0x164f51,_0x667ade)=>(_0x5a6688,_0x2ea8eb)=>_0x667ade(_0x5a6688,_0x2ea8eb,_0x164f51);function _0x27eaa5(_0x1cb6b2,_0xad2d87){const _0x18fd34=_0x2f43e9,_0x5e5ca4=_0x1cb6b2['replies'][0x0];return{..._0xad2d87,'id':_0x5e5ca4[_0x18fd34(0xec)],'resolved':_0x1cb6b2[_0x18fd34(0xf4)]===0x1,'dT':_0x1bfd26(_0x5e5ca4[_0x18fd34(0xed)]),'personId':_0x5e5ca4[_0x18fd34(0xc6)],'threadId':_0x5e5ca4[_0x18fd34(0xa5)]};}function _0x3b5816(_0xf387b4,_0xb5d2d,_0x48f463){const _0x38c825=_0x2f43e9;var _0x4a051e,_0x535659;if(((_0x535659=(_0x4a051e=_0xf387b4==null?void 0x0:_0xf387b4[_0x38c825(0x108)])==null?void 0x0:_0x4a051e[_0x38c825(0xe6)])!=null?_0x535659:0x0)>0x0){const _0x295d69=(_0x360558,_0x17ac82)=>({'id':_0x360558[_0x38c825(0xec)],'threadId':_0x360558[_0x38c825(0xa5)],'dT':_0x1bfd26(_0x360558[_0x38c825(0xed)]),'personId':_0x360558['userId'],'resolved':_0xf387b4[_0x38c825(0xf4)]===_0x4670dc[_0x38c825(0xe8)],'unitId':_0xb5d2d,'subUnitId':_0x48f463,'text':JSON[_0x38c825(0x10c)](_0x360558[_0x38c825(0x119)]),'parentId':_0x17ac82}),_0x59cfe7=_0x295d69(_0xf387b4['replies'][0x0]);return{..._0x59cfe7,'children':_0xf387b4[_0x38c825(0x108)][_0x38c825(0x92)](0x1)[_0x38c825(0xce)](_0x1dfbc2=>_0x295d69(_0x1dfbc2,_0x59cfe7['id']))};}return null;}let _0x3398d1=class{constructor(_0x4f1414,_0x9066b8,_0x3f2789){const _0x26910c=_0x2f43e9;this['_httpService']=_0x4f1414,this[_0x26910c(0xbd)]=_0x9066b8,this[_0x26910c(0x9d)]=_0x3f2789;}async['addComment'](_0x1599d2){const _0x2c179e=_0x2f43e9;var _0x322001,_0x327411;const {parentId:_0x151eb7,unitId:_0x40e3c6,text:_0x211764,threadId:_0x29d074}=_0x1599d2,_0x1b25f1=(_0x327411=(_0x322001=_0x211764[_0x2c179e(0xa7)])==null?void 0x0:_0x322001[_0x2c179e(0xae)](_0x2b071c=>_0x2b071c[_0x2c179e(0xff)]===_0x385f71[_0x2c179e(0xb6)]['COMMENT'])['map'](_0x255cb=>_0x255cb[_0x2c179e(0xb4)]))!=null?_0x327411:[],_0x32596d=JSON['stringify'](_0x211764),_0x4c67bc=(await this[_0x2c179e(0x9d)][_0x2c179e(0xc7)](_0x40e3c6))[_0x2c179e(0xf6)]();if(_0x151eb7){const _0x30fff3={'memberId':_0x4c67bc,'unitId':_0x40e3c6,'content':_0x32596d,'mention':_0x1b25f1,'threadId':_0x29d074},_0x31e117=(await this[_0x2c179e(0xda)][_0x2c179e(0xf2)](_0x2c179e(0x109)+_0x40e3c6+_0x2c179e(0xf3),{'body':_0x30fff3}))[_0x2c179e(0xb0)][_0x2c179e(0xbe)];return{..._0x1599d2,'id':_0x31e117[_0x2c179e(0xec)],'dT':_0x385f71[_0x2c179e(0xe4)](+_0x31e117[_0x2c179e(0xed)])[_0x2c179e(0xbf)](_0x2c179e(0xac)),'personId':_0x31e117[_0x2c179e(0xc6)]};}else{const _0x5a4778={'memberId':_0x4c67bc,'unitId':_0x40e3c6,'content':_0x32596d,'mention':_0x1b25f1},_0xae0121=await this[_0x2c179e(0xda)]['post'](_0x2c179e(0x109)+_0x40e3c6+'/add',{'body':_0x5a4778});return _0x27eaa5(_0xae0121[_0x2c179e(0xb0)]['comment'],_0x1599d2);}}async[_0x2f43e9(0xaa)](_0x496248){const _0x4b94c9=_0x2f43e9;var _0x39092f,_0x2fe993;const {text:_0x2902bc,unitId:_0x2e9896}=_0x496248,_0x5c822e=(_0x2fe993=(_0x39092f=_0x2902bc[_0x4b94c9(0xa7)])==null?void 0x0:_0x39092f[_0x4b94c9(0xae)](_0x1e0996=>_0x1e0996[_0x4b94c9(0xff)]===_0x385f71[_0x4b94c9(0xb6)]['COMMENT'])['map'](_0x252301=>_0x252301[_0x4b94c9(0xb4)]))!=null?_0x2fe993:[],_0x49645e=JSON['stringify'](_0x2902bc),_0x2b387c=_0x496248['threadId'],_0x2bd5cb=_0x496248['id'],_0x35f1f8={'memberId':(await this[_0x4b94c9(0x9d)][_0x4b94c9(0xc7)](_0x2e9896))[_0x4b94c9(0xf6)](),'unitId':_0x2e9896,'threadId':_0x2b387c,'mention':_0x5c822e,'content':_0x49645e,'replyId':_0x2bd5cb},_0x5aec7b=await this[_0x4b94c9(0xda)][_0x4b94c9(0xf2)]('/universer-api/comment/unit/'+_0x2e9896+'/edit',{'body':_0x35f1f8});return!_0x5aec7b['body'][_0x4b94c9(0x102)]||_0x5aec7b['body']['error'][_0x4b94c9(0xad)]===0x1;}async[_0x2f43e9(0x9f)](_0xdb741e){const _0x3e66c3=_0x2f43e9,{unitId:_0x2c09ae}=_0xdb741e,_0x5945ac=_0xdb741e[_0x3e66c3(0xa5)],_0x5e5e43={'memberId':this[_0x3e66c3(0xbd)][_0x3e66c3(0x95)]()[_0x3e66c3(0xcb)],'unitId':_0x2c09ae,'threadId':_0x5945ac,'solved':_0xdb741e[_0x3e66c3(0x99)]?_0x4670dc['Solved']:_0x4670dc[_0x3e66c3(0x107)]},_0x6b75bc=await this[_0x3e66c3(0xda)][_0x3e66c3(0xf2)](_0x3e66c3(0x109)+_0x2c09ae+_0x3e66c3(0xb5),{'body':_0x5e5e43});return!_0x6b75bc['body']['error']||_0x6b75bc[_0x3e66c3(0xb0)][_0x3e66c3(0x102)][_0x3e66c3(0xad)]===0x1;}async[_0x2f43e9(0x96)](_0x3d0f0b,_0x588a71,_0x1dfb7c,_0x3aafcc){const _0x53e1d2=_0x2f43e9,_0x3a6420={'memberId':(await this[_0x53e1d2(0x9d)][_0x53e1d2(0xc7)](_0x3d0f0b))['getMemberID'](),'threadId':_0x1dfb7c,'replyId':_0x3aafcc,'unitId':_0x3d0f0b},_0x277167=await this[_0x53e1d2(0xda)][_0x53e1d2(0xf2)]('/universer-api/comment/unit/'+_0x3d0f0b+_0x53e1d2(0x111),{'body':_0x3a6420});return!_0x277167[_0x53e1d2(0xb0)][_0x53e1d2(0x102)]||_0x277167[_0x53e1d2(0xb0)][_0x53e1d2(0x102)]['code']===0x1;}async[_0x2f43e9(0xc5)](_0x3ce481,_0x50d0ca,_0x207dec){const _0x2de14a=_0x2f43e9,_0x16ed75={'unitId':_0x3ce481,'threadId':_0x207dec},_0x5d52f3=await this[_0x2de14a(0xda)]['post'](_0x2de14a(0x109)+_0x3ce481+_0x2de14a(0xd7),{'body':_0x16ed75}),_0x16fac9=_0x207dec['map'](_0x24b9cf=>_0x3b5816(_0x5d52f3[_0x2de14a(0xb0)][_0x2de14a(0x110)][_0x24b9cf],_0x3ce481,_0x50d0ca))['filter'](Boolean);return Object[_0x2de14a(0xd3)](_0x5d52f3[_0x2de14a(0xb0)][_0x2de14a(0xdd)])[_0x2de14a(0xc1)](_0x2e29f0=>{const _0x497282=_0x2de14a;this['_userService'][_0x497282(0xb9)](_0x2e29f0);}),_0x16fac9;}['saveCommentToSnapshot'](_0x5a3545){const _0x4aa04e=_0x2f43e9;return{'id':_0x5a3545['id'],'threadId':_0x5a3545[_0x4aa04e(0xa5)],'ref':_0x5a3545[_0x4aa04e(0xd9)]};}};_0x3398d1=_0x36444b([_0x4d20f3(0x0,_0x385f71['Inject'](_0x27fdcc['HTTPService'])),_0x4d20f3(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x385f71[_0x2f43e9(0x98)])),_0x4d20f3(0x2,_0x385f71[_0x2f43e9(0xeb)](_0x1800eb[_0x2f43e9(0x10e)]))],_0x3398d1);var _0x9c63b2=Object[_0x2f43e9(0xdc)],_0x1daee5=(_0x36e8e6,_0x382c28,_0x38951c,_0x1c390b)=>{const _0x4f1d11=_0x2f43e9;for(var _0x3c8250=_0x1c390b>0x1?void 0x0:_0x1c390b?_0x9c63b2(_0x382c28,_0x38951c):_0x382c28,_0x33ccff=_0x36e8e6[_0x4f1d11(0xe6)]-0x1,_0x5a394d;_0x33ccff>=0x0;_0x33ccff--)(_0x5a394d=_0x36e8e6[_0x33ccff])&&(_0x3c8250=_0x5a394d(_0x3c8250)||_0x3c8250);return _0x3c8250;},_0x2e1e91=(_0x520705,_0x35ba7c)=>(_0x54ce0d,_0x53c73a)=>_0x35ba7c(_0x54ce0d,_0x53c73a,_0x520705);let _0x4ed1ef=class extends _0x385f71[_0x2f43e9(0xde)]{constructor(_0x183ac6,_0x44c444){const _0x23020f=_0x2f43e9;super(),this[_0x23020f(0xfe)]=_0x183ac6,this[_0x23020f(0xf7)]=_0x44c444,this[_0x23020f(0xe9)]();}[_0x2f43e9(0xe9)](){const _0x5d4dfb=_0x2f43e9;this[_0x5d4dfb(0xfe)][_0x5d4dfb(0x10b)]=this[_0x5d4dfb(0xf7)],this['_threadCommentDataSourceService'][_0x5d4dfb(0xe1)]=!0x1;}};_0x4ed1ef=_0x1daee5([_0x2e1e91(0x0,_0x5ea113[_0x2f43e9(0xe3)]),_0x2e1e91(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x3398d1))],_0x4ed1ef);var _0x48fed5=Object[_0x2f43e9(0x105)],_0x96e566=Object[_0x2f43e9(0xdc)],_0x67f825=(_0x5a3492,_0x19461b,_0x5b1330)=>_0x19461b in _0x5a3492?_0x48fed5(_0x5a3492,_0x19461b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b1330}):_0x5a3492[_0x19461b]=_0x5b1330,_0x5a5b65=(_0x1bc3ca,_0x4310c4,_0x135bf7,_0x1983fa)=>{for(var _0xc735ec=_0x1983fa>0x1?void 0x0:_0x1983fa?_0x96e566(_0x4310c4,_0x135bf7):_0x4310c4,_0x335300=_0x1bc3ca['length']-0x1,_0x926c5c;_0x335300>=0x0;_0x335300--)(_0x926c5c=_0x1bc3ca[_0x335300])&&(_0xc735ec=_0x926c5c(_0xc735ec)||_0xc735ec);return _0xc735ec;},_0x166177=(_0x580e90,_0x596dca)=>(_0x30bc59,_0x3ae5a7)=>_0x596dca(_0x30bc59,_0x3ae5a7,_0x580e90),_0x12972f=(_0x22d24c,_0x1ac218,_0x2af2b3)=>_0x67f825(_0x22d24c,typeof _0x1ac218!=_0x2f43e9(0xfb)?_0x1ac218+'':_0x1ac218,_0x2af2b3);_0x50a725[_0x2f43e9(0x9a)]=class extends _0x385f71[_0x2f43e9(0xd4)]{constructor(_0xfaa410=_0x15c51c,_0xcbbd78,_0x114020){const _0x2c6337=_0x2f43e9;super(),this['_config']=_0xfaa410,this[_0x2c6337(0xd2)]=_0xcbbd78,this[_0x2c6337(0xaf)]=_0x114020;const {..._0x42f5c5}=_0x385f71['merge']({},_0x15c51c,this[_0x2c6337(0xd8)]);this[_0x2c6337(0xaf)][_0x2c6337(0x9e)](_0x2b72e3,_0x42f5c5);}['onStarting'](){[[_0x3398d1],[_0x4ed1ef],[_0x2917f5]]['forEach'](_0x28a94c=>{this['_injector']['add'](_0x28a94c);});}[_0x2f43e9(0xf0)](){const _0x8d1490=_0x2f43e9;this[_0x8d1490(0xd2)][_0x8d1490(0xe2)](_0x4ed1ef),this['_injector'][_0x8d1490(0xe2)](_0x2917f5);}},_0x12972f(_0x50a725[_0x2f43e9(0x9a)],_0x2f43e9(0xe7),_0x487e4a),_0x12972f(_0x50a725[_0x2f43e9(0x9a)],_0x2f43e9(0xbc),_0x385f71[_0x2f43e9(0xef)]['UNIVER_UNKNOWN']),_0x50a725[_0x2f43e9(0x9a)]=_0x5a5b65([_0x385f71[_0x2f43e9(0xca)](_0x408d76[_0x2f43e9(0x116)],_0x1800eb[_0x2f43e9(0xc3)],_0x234c9c['UniverLicensePlugin']),_0x166177(0x1,_0x385f71['Inject'](_0x385f71[_0x2f43e9(0xd1)])),_0x166177(0x2,_0x385f71[_0x2f43e9(0xb3)])],_0x50a725[_0x2f43e9(0x9a)]),Object[_0x2f43e9(0x105)](_0x50a725,Symbol[_0x2f43e9(0x118)],{'value':_0x2f43e9(0xc0)});}));function _0x39d9(_0x537991,_0x1645eb){const _0x33b081=_0x33b0();return _0x39d9=function(_0x39d98e,_0x384786){_0x39d98e=_0x39d98e-0x92;let _0x38172c=_0x33b081[_0x39d98e];return _0x38172c;},_0x39d9(_0x537991,_0x1645eb);}function _0x33b0(){const _0x189583=['UniverProLicense','map','707XZrTfU','delete','Injector','_injector','values','Plugin','subscribe','disposeWithMe','/list','_config','ref','_httpService','Delete','getOwnPropertyDescriptor','users','Disposable','add','personId','syncUpdateMutationToColla','get','IThreadCommentDataSourceService','dayjs','rxjs','length','pluginName','Solved','_initDataSource','8211712fWHJBK','Inject','replyId','createTimestamp','@univerjs/network','UniverInstanceType','onReady','exports','post','/reply','solved','_init','getMemberID','_threadCommentDataSource','find','6234615CeeCpf','bufferTime','symbol','amd','@univerjs/core','_threadCommentDataSourceService','rangeType','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','unitId','payload','defineProperty','UniverCore','OpenOrReOpen','replies','/universer-api/comment/unit/','_commentService','dataSource','parse','@univerjs-pro/collaboration-client','CollaborationSessionService','UniverProCollaborationClient','comments','/delete','1492vdjJxt','5845712OMkSFE','UniverThreadComment','31602uFLrmp','UniverThreadCommentUIPlugin','1735EBncaO','toStringTag','content','slice','pipe','7008700JKKdCA','getCurrentUser','deleteComment','root','UserManagerService','resolved','UniverThreadCommentDataSourcePlugin','_threadCommentModel','@univerjs/thread-comment','_sessionService','setConfig','resolveComment','Solve','Add','_initUserSync','commentUpdate$','3917553zmzYDd','threadId','UniverThreadCommentUi','customRanges','object','@univerjs-pro/license','updateComment','@univerjs/thread-comment-ui','YYYY/MM/DD\x20HH:mm','code','filter','_configService','body','getComment','user','IConfigService','rangeId','/solved','CustomRangeType','function','/universer-api/user/list','addUser','thread-comment-data-source.config','Unknown','type','_userService','reply','format','Module','forEach','UniverProThreadCommentDatasource','UniverCollaborationClientPlugin','Reply','listComments','userId','requireSession','Edit','parentId','DependentOn','userID','getUnit'];_0x33b0=function(){return _0x189583;};return _0x33b0();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.7-nightly.202509080357",
3
+ "version": "0.10.7-nightly.202509130618",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.7-nightly.202509080357",
49
- "@univerjs-pro/license": "0.10.7-nightly.202509080357",
48
+ "@univerjs-pro/collaboration-client": "0.10.7-nightly.202509130618",
49
+ "@univerjs-pro/license": "0.10.7-nightly.202509130618",
50
+ "@univerjs/network": "0.10.7-nightly.202509130618",
51
+ "@univerjs/core": "0.10.7-nightly.202509130618",
50
52
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/core": "0.10.7-nightly.202509080357",
52
- "@univerjs/network": "0.10.7-nightly.202509080357",
53
- "@univerjs/thread-comment": "0.10.7-nightly.202509080357",
54
- "@univerjs/thread-comment-ui": "0.10.7-nightly.202509080357"
53
+ "@univerjs/thread-comment": "0.10.7-nightly.202509130618",
54
+ "@univerjs/thread-comment-ui": "0.10.7-nightly.202509130618"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",