@univerjs-pro/thread-comment-datasource 0.20.0-insiders.20260411-27a8c24 → 0.20.1

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
- const _0x3ed7a6=_0x9fc2;(function(_0x420814,_0x4c1e68){const _0x3ad642=_0x9fc2,_0x5231fa=_0x420814();while(!![]){try{const _0x3f91b3=parseInt(_0x3ad642(0xcf))/0x1+-parseInt(_0x3ad642(0x85))/0x2*(parseInt(_0x3ad642(0xb0))/0x3)+parseInt(_0x3ad642(0xe3))/0x4+-parseInt(_0x3ad642(0x79))/0x5*(-parseInt(_0x3ad642(0xd9))/0x6)+-parseInt(_0x3ad642(0xee))/0x7*(parseInt(_0x3ad642(0x94))/0x8)+-parseInt(_0x3ad642(0xa6))/0x9+parseInt(_0x3ad642(0xe0))/0xa;if(_0x3f91b3===_0x4c1e68)break;else _0x5231fa['push'](_0x5231fa['shift']());}catch(_0xd0a8f2){_0x5231fa['push'](_0x5231fa['shift']());}}}(_0x5bce,0xcb246),Object[_0x3ed7a6(0xbb)](exports,Symbol[_0x3ed7a6(0x8a)],{'value':_0x3ed7a6(0xad)}));let e=require(`@univerjs-pro/collaboration-client`),t=require(`@univerjs-pro/license`),n=require(`@univerjs/core`),r=require(`@univerjs/thread-comment-ui`),i=require(`@univerjs/protocol`),a=require(`@univerjs/thread-comment`),o=require(`rxjs`),s=require(`@univerjs/network`);var c=_0x3ed7a6(0xea),l=_0x3ed7a6(0xb8);const u=_0x156e75=>(0x0,n[_0x3ed7a6(0x9c)])(new Date(+_0x156e75))['format'](_0x3ed7a6(0xaa)),d=async(_0x5d38dd,_0x28d2ce)=>{const _0x8b9882=_0x3ed7a6;let _0x3488f4=_0x5d38dd[_0x8b9882(0x9f)](n[_0x8b9882(0xa9)]),_0x411d2a=_0x5d38dd[_0x8b9882(0x9f)](s['HTTPService']);_0x28d2ce[_0x8b9882(0xec)](_0x1e788c=>{const _0x3ac7b7=_0x8b9882;_0x3488f4[_0x3ac7b7(0x96)](_0x1e788c)&&_0x28d2ce[_0x3ac7b7(0xd3)](_0x1e788c);}),_0x28d2ce['size']&&(await _0x411d2a[_0x8b9882(0x9f)](_0x8b9882(0xe8),{'params':{'userIDs':[..._0x28d2ce]}}))[_0x8b9882(0xd0)]['users']['forEach'](_0x42e43f=>{const _0x2df5a4=_0x8b9882;_0x42e43f&&_0x3488f4[_0x2df5a4(0xf0)](_0x42e43f);});};function f(_0x4463b8,_0xb0b04b){return function(_0x3612bf,_0x479bf7){_0xb0b04b(_0x3612bf,_0x479bf7,_0x4463b8);};}function p(_0x5eab24,_0x2a50b0,_0x35ced4,_0x3e6980){const _0x21ac15=_0x3ed7a6;var _0x1b8dbb=arguments[_0x21ac15(0xf2)],_0x18bfbb=_0x1b8dbb<0x3?_0x2a50b0:_0x3e6980===null?_0x3e6980=Object[_0x21ac15(0x98)](_0x2a50b0,_0x35ced4):_0x3e6980,_0x4554a7;if(typeof Reflect==_0x21ac15(0xd4)&&typeof Reflect[_0x21ac15(0xf5)]=='function')_0x18bfbb=Reflect['decorate'](_0x5eab24,_0x2a50b0,_0x35ced4,_0x3e6980);else{for(var _0x583dc8=_0x5eab24[_0x21ac15(0xf2)]-0x1;_0x583dc8>=0x0;_0x583dc8--)(_0x4554a7=_0x5eab24[_0x583dc8])&&(_0x18bfbb=(_0x1b8dbb<0x3?_0x4554a7(_0x18bfbb):_0x1b8dbb>0x3?_0x4554a7(_0x2a50b0,_0x35ced4,_0x18bfbb):_0x4554a7(_0x2a50b0,_0x35ced4))||_0x18bfbb);}return _0x1b8dbb>0x3&&_0x18bfbb&&Object['defineProperty'](_0x2a50b0,_0x35ced4,_0x18bfbb),_0x18bfbb;}let m=class extends n['Disposable']{constructor(_0x4cb105,_0x3dd6c2,_0x4de432,_0x243f64){const _0x3524d7=_0x3ed7a6;super(),this['_commentService']=_0x4cb105,this['_threadCommentModel']=_0x3dd6c2,this[_0x3524d7(0xde)]=_0x4de432,this[_0x3524d7(0x81)]=_0x243f64,this[_0x3524d7(0xae)](),this[_0x3524d7(0x80)]();}[_0x3ed7a6(0x80)](){const _0x492f7b=_0x3ed7a6;this[_0x492f7b(0x8d)](this[_0x492f7b(0xdb)]['commentUpdate$'][_0x492f7b(0xdf)]((0x0,o[_0x492f7b(0x7a)])(0x10))[_0x492f7b(0xd6)](_0x2e3a02=>{const _0x4a72b1=_0x492f7b;let _0x30b66a=new Set();_0x2e3a02[_0x4a72b1(0xec)](_0x542bd=>{const _0x23c08e=_0x4a72b1;switch(_0x542bd[_0x23c08e(0x7f)]){case _0x23c08e(0xbd):{let _0x295b79=_0x542bd[_0x23c08e(0xf4)][_0x23c08e(0xcc)];_0x30b66a[_0x23c08e(0xbd)](_0x295b79);break;}default:break;}}),d(this[_0x4a72b1(0x81)],_0x30b66a);}));}['_init'](){const _0x3971c1=_0x3ed7a6;this['disposeWithMe'](this[_0x3971c1(0xd2)][_0x3971c1(0xbe)]['subscribe'](async _0x2cb0b7=>{const _0x217486=_0x3971c1;var _0x351ab6;let _0x4946d1=(_0x351ab6=this[_0x217486(0xdb)]['getUnit'](_0x2cb0b7['unitId'])[_0x217486(0xc4)](_0x56e4e1=>_0x56e4e1[_0x217486(0xc0)]===_0x2cb0b7[_0x217486(0xc0)]))==null?void 0x0:_0x351ab6[_0x217486(0xa8)];if(!_0x4946d1)return;let {unitId:_0x5e5432,subUnitId:_0x528055}=_0x4946d1;switch(_0x2cb0b7[_0x217486(0x97)]&&this[_0x217486(0xde)][_0x217486(0xf0)](_0x2cb0b7[_0x217486(0x97)]),_0x2cb0b7[_0x217486(0x7f)]){case i[_0x217486(0xe7)][_0x217486(0xd7)]:break;case i[_0x217486(0xe7)]['Reply']:var _0x4c33a0,_0x58e2db;this[_0x217486(0xdb)]['addComment'](_0x5e5432,_0x528055,{'unitId':_0x5e5432,'subUnitId':_0x528055,'ref':'','id':_0x2cb0b7[_0x217486(0xca)],'dT':u(+_0x2cb0b7[_0x217486(0xbc)]),'threadId':_0x2cb0b7[_0x217486(0xc0)],'personId':(_0x4c33a0=(_0x58e2db=_0x2cb0b7[_0x217486(0x97)])==null?void 0x0:_0x58e2db[_0x217486(0x84)])==null?_0x2cb0b7['userId']:_0x4c33a0,'text':JSON[_0x217486(0xb5)](_0x2cb0b7['content']),'parentId':_0x4946d1['id']});break;case i[_0x217486(0xe7)][_0x217486(0xc6)]:{let _0x5c09f1=this[_0x217486(0xdb)][_0x217486(0x82)](_0x5e5432,_0x528055,_0x2cb0b7[_0x217486(0xca)]);_0x5c09f1&&_0x5c09f1[_0x217486(0xc7)]&&this[_0x217486(0xdb)][_0x217486(0xa5)](_0x5e5432,_0x528055,_0x2cb0b7[_0x217486(0xca)]);break;}case i[_0x217486(0xe7)][_0x217486(0x89)]:this[_0x217486(0xdb)]['updateComment'](_0x5e5432,_0x528055,{'commentId':_0x2cb0b7[_0x217486(0xca)],'text':JSON['parse'](_0x2cb0b7[_0x217486(0x8e)])});break;case i[_0x217486(0xe7)]['Solve']:{var _0x19de0e;let _0x52f050=(_0x19de0e=this['_threadCommentModel'][_0x217486(0x9a)](_0x2cb0b7[_0x217486(0xa4)])[_0x217486(0xc4)](_0x5404e8=>_0x5404e8['threadId']===_0x2cb0b7[_0x217486(0xc0)]))==null?void 0x0:_0x19de0e[_0x217486(0xa8)];_0x52f050&&this[_0x217486(0xdb)][_0x217486(0x87)](_0x5e5432,_0x528055,_0x52f050['id'],_0x2cb0b7[_0x217486(0xb2)]===i[_0x217486(0xaf)][_0x217486(0x7d)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x3ed7a6(0x78)])(e['CommentService'])),f(0x1,(0x0,n['Inject'])(a[_0x3ed7a6(0x7b)])),f(0x2,(0x0,n[_0x3ed7a6(0x78)])(n[_0x3ed7a6(0xa9)])),f(0x3,(0x0,n[_0x3ed7a6(0x78)])(n[_0x3ed7a6(0xa2)]))],m);const h=_0x3ed7a6(0xb4);Symbol(h);const g={};function _(_0x5c9190,_0x28b876){const _0x4ce88f=_0x3ed7a6;let _0x191a39=_0x5c9190[_0x4ce88f(0xa7)][0x0];return{..._0x28b876,'id':_0x191a39['replyId'],'resolved':_0x5c9190[_0x4ce88f(0xb2)]===0x1,'dT':u(_0x191a39['createTimestamp']),'personId':_0x191a39['userId'],'threadId':_0x191a39[_0x4ce88f(0xc0)]};}function v(_0x3f0ab9,_0xc4933a,_0x16eb0a){const _0x2e7b3d=_0x3ed7a6;var _0x4c6a23,_0x531f8f;if(((_0x4c6a23=_0x3f0ab9==null||(_0x531f8f=_0x3f0ab9[_0x2e7b3d(0xa7)])==null?void 0x0:_0x531f8f[_0x2e7b3d(0xf2)])==null?0x0:_0x4c6a23)>0x0){let _0x157a45=(_0x94beb1,_0x549df3)=>({'id':_0x94beb1[_0x2e7b3d(0xca)],'threadId':_0x94beb1['threadId'],'dT':u(_0x94beb1[_0x2e7b3d(0xbc)]),'personId':_0x94beb1[_0x2e7b3d(0xba)],'resolved':_0x3f0ab9[_0x2e7b3d(0xb2)]===i['CommentSolvedStatus'][_0x2e7b3d(0x7d)],'unitId':_0xc4933a,'subUnitId':_0x16eb0a,'text':JSON['parse'](_0x94beb1[_0x2e7b3d(0x8e)]),'parentId':_0x549df3}),_0x5def9e=_0x157a45(_0x3f0ab9[_0x2e7b3d(0xa7)][0x0]);return{..._0x5def9e,'children':_0x3f0ab9[_0x2e7b3d(0xa7)][_0x2e7b3d(0xdd)](0x1)[_0x2e7b3d(0xb6)](_0x481f82=>_0x157a45(_0x481f82,_0x5def9e['id']))};}return null;}let y=class{constructor(_0x44e79f,_0xf79e30,_0x1c3836){const _0x289f24=_0x3ed7a6;this[_0x289f24(0xe6)]=_0x44e79f,this[_0x289f24(0xde)]=_0xf79e30,this['_sessionService']=_0x1c3836;}async[_0x3ed7a6(0xcb)](_0x3dd213){const _0xfd7f2a=_0x3ed7a6;var _0x28d2dd,_0x4361ba;let {parentId:_0x273acc,unitId:_0x3ad63f,text:_0x5c044a,threadId:_0x5b87ed}=_0x3dd213,_0x2bd09e=(_0x28d2dd=(_0x4361ba=_0x5c044a[_0xfd7f2a(0x91)])==null?void 0x0:_0x4361ba[_0xfd7f2a(0x9b)](_0x534bed=>_0x534bed['rangeType']===n['CustomRangeType'][_0xfd7f2a(0xbf)])[_0xfd7f2a(0xb6)](_0x11a09a=>_0x11a09a[_0xfd7f2a(0xe4)]))==null?[]:_0x28d2dd,_0x38cf60=JSON[_0xfd7f2a(0xc3)](_0x5c044a),_0x5c163a=(await this[_0xfd7f2a(0x93)][_0xfd7f2a(0xb9)](_0x3ad63f))[_0xfd7f2a(0x86)]();if(_0x273acc){let _0xaa5d59={'memberId':_0x5c163a,'unitId':_0x3ad63f,'content':_0x38cf60,'mention':_0x2bd09e,'threadId':_0x5b87ed},_0x21c22d=(await this['_httpService'][_0xfd7f2a(0x76)](_0xfd7f2a(0x7c)+_0x3ad63f+_0xfd7f2a(0xd5),{'body':_0xaa5d59}))['body'][_0xfd7f2a(0xac)];return{..._0x3dd213,'id':_0x21c22d['replyId'],'dT':(0x0,n[_0xfd7f2a(0x9c)])(+_0x21c22d[_0xfd7f2a(0xbc)])[_0xfd7f2a(0xa1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x21c22d[_0xfd7f2a(0xba)]};}else{let _0x3f42f7={'memberId':_0x5c163a,'unitId':_0x3ad63f,'content':_0x38cf60,'mention':_0x2bd09e};return _((await this[_0xfd7f2a(0xe6)][_0xfd7f2a(0x76)](_0xfd7f2a(0x7c)+_0x3ad63f+_0xfd7f2a(0x95),{'body':_0x3f42f7}))[_0xfd7f2a(0xd0)][_0xfd7f2a(0xcd)],_0x3dd213);}}async['updateComment'](_0x2c742b){const _0x2b8d28=_0x3ed7a6;var _0x43cfaa,_0x593d53;let {text:_0x5f538b,unitId:_0x1f9241}=_0x2c742b,_0x19f832=(_0x43cfaa=(_0x593d53=_0x5f538b[_0x2b8d28(0x91)])==null?void 0x0:_0x593d53['filter'](_0x388e20=>_0x388e20[_0x2b8d28(0xe5)]===n[_0x2b8d28(0x8b)][_0x2b8d28(0xbf)])[_0x2b8d28(0xb6)](_0x157c84=>_0x157c84[_0x2b8d28(0xe4)]))==null?[]:_0x43cfaa,_0x2fa470=JSON[_0x2b8d28(0xc3)](_0x5f538b),_0x1fdc64=_0x2c742b[_0x2b8d28(0xc0)],_0x41f0de=_0x2c742b['id'],_0x435525={'memberId':(await this[_0x2b8d28(0x93)][_0x2b8d28(0xb9)](_0x1f9241))[_0x2b8d28(0x86)](),'unitId':_0x1f9241,'threadId':_0x1fdc64,'mention':_0x19f832,'content':_0x2fa470,'replyId':_0x41f0de},_0x4411f8=await this[_0x2b8d28(0xe6)][_0x2b8d28(0x76)]('/universer-api/comment/unit/'+_0x1f9241+_0x2b8d28(0x88),{'body':_0x435525});return!_0x4411f8[_0x2b8d28(0xd0)][_0x2b8d28(0xce)]||_0x4411f8[_0x2b8d28(0xd0)]['error']['code']===0x1;}async[_0x3ed7a6(0x87)](_0x14764b){const _0x58e697=_0x3ed7a6;let {unitId:_0x5c8db2}=_0x14764b,_0x195a87=_0x14764b[_0x58e697(0xc0)],_0x15f538={'memberId':this[_0x58e697(0xde)]['getCurrentUser']()[_0x58e697(0x84)],'unitId':_0x5c8db2,'threadId':_0x195a87,'solved':_0x14764b[_0x58e697(0x90)]?i['CommentSolvedStatus']['Solved']:i[_0x58e697(0xaf)][_0x58e697(0x77)]},_0x2ccb40=await this[_0x58e697(0xe6)][_0x58e697(0x76)](_0x58e697(0x7c)+_0x5c8db2+'/solved',{'body':_0x15f538});return!_0x2ccb40['body'][_0x58e697(0xce)]||_0x2ccb40[_0x58e697(0xd0)][_0x58e697(0xce)]['code']===0x1;}async[_0x3ed7a6(0xa5)](_0x150ffc,_0x4e7a9c,_0x4944ad,_0x34b7bd){const _0x12353f=_0x3ed7a6;let _0x4473e5={'memberId':(await this['_sessionService'][_0x12353f(0xb9)](_0x150ffc))['getMemberID'](),'threadId':_0x4944ad,'replyId':_0x34b7bd,'unitId':_0x150ffc},_0x1e8e1c=await this[_0x12353f(0xe6)][_0x12353f(0x76)](_0x12353f(0x7c)+_0x150ffc+_0x12353f(0xef),{'body':_0x4473e5});return!_0x1e8e1c[_0x12353f(0xd0)][_0x12353f(0xce)]||_0x1e8e1c[_0x12353f(0xd0)]['error'][_0x12353f(0x9e)]===0x1;}async[_0x3ed7a6(0xda)](_0x3e5b97,_0xe5c64c,_0x18febe){const _0x57ce68=_0x3ed7a6;let _0x40d6d4={'unitId':_0x3e5b97,'threadId':_0x18febe},_0x480cdc=await this[_0x57ce68(0xe6)]['post'](_0x57ce68(0x7c)+_0x3e5b97+'/list',{'body':_0x40d6d4}),_0x10c45e=_0x18febe['map'](_0x3803c9=>v(_0x480cdc[_0x57ce68(0xd0)]['comments'][_0x3803c9],_0x3e5b97,_0xe5c64c))[_0x57ce68(0x9b)](Boolean);return Object['values'](_0x480cdc[_0x57ce68(0xd0)][_0x57ce68(0x8c)])['forEach'](_0x22d1e2=>{const _0xd45057=_0x57ce68;this[_0xd45057(0xde)]['addUser'](_0x22d1e2);}),_0x10c45e;}['saveCommentToSnapshot'](_0xd598a9){const _0x41b90e=_0x3ed7a6;return{'id':_0xd598a9['id'],'threadId':_0xd598a9[_0x41b90e(0xc0)],'ref':_0xd598a9[_0x41b90e(0x83)]};}};y=p([f(0x0,(0x0,n['Inject'])(s['HTTPService'])),f(0x1,(0x0,n['Inject'])(n[_0x3ed7a6(0xa9)])),f(0x2,(0x0,n['Inject'])(e['CollaborationSessionService']))],y);let b=class extends n[_0x3ed7a6(0xc8)]{constructor(_0x6a31c,_0x1d39f1){const _0x3e659c=_0x3ed7a6;super(),this[_0x3e659c(0x92)]=_0x6a31c,this[_0x3e659c(0xdc)]=_0x1d39f1,this[_0x3e659c(0xd1)]();}[_0x3ed7a6(0xd1)](){const _0x131467=_0x3ed7a6;this['_threadCommentDataSourceService'][_0x131467(0xd8)]=this['_threadCommentDataSource'],this[_0x131467(0x92)][_0x131467(0xe2)]=!0x1;}};b=p([f(0x0,a[_0x3ed7a6(0xc5)]),f(0x1,(0x0,n['Inject'])(y))],b);function x(_0x3a2722){'@babel/helpers - typeof';const _0x24e60b=_0x3ed7a6;return x=typeof Symbol==_0x24e60b(0xf1)&&typeof Symbol[_0x24e60b(0x7e)]==_0x24e60b(0xe1)?function(_0x509193){return typeof _0x509193;}:function(_0x5788e9){const _0xe82f8f=_0x24e60b;return _0x5788e9&&typeof Symbol=='function'&&_0x5788e9[_0xe82f8f(0xab)]===Symbol&&_0x5788e9!==Symbol[_0xe82f8f(0x8f)]?_0xe82f8f(0xe1):typeof _0x5788e9;},x(_0x3a2722);}function _0x5bce(){const _0x5a1ffc=['CommentSolvedStatus','3aZWscT','setConfig','solved','pluginName','thread-comment-data-source.config','parse','map','UniverLicensePlugin','0.20.0-insiders.20260411-27a8c24','requireSession','userId','defineProperty','createTimestamp','add','commentUpdate$','COMMENT','threadId','default','UniverCollaborationClientPlugin','stringify','find','IThreadCommentDataSourceService','Delete','parentId','Disposable','_config','replyId','addComment','personId','comment','error','1566825IRQdXC','body','_initDataSource','_commentService','delete','object','/reply','subscribe','Add','dataSource','770964WkHcEs','listComments','_threadCommentModel','_threadCommentDataSource','slice','_userService','pipe','4022620eeAQaR','symbol','syncUpdateMutationToColla','3551352tgccWg','rangeId','rangeType','_httpService','CommentUpdateEventType','/universer-api/user/list','toPrimitive','@univerjs-pro/thread-comment-datasource','Plugin','forEach','_configService','4051257xEWkfW','/delete','addUser','function','length','IConfigService','payload','decorate','post','OpenOrReOpen','Inject','50BCzFky','bufferTime','ThreadCommentModel','/universer-api/comment/unit/','Solved','iterator','type','_initUserSync','_injector','getComment','ref','userID','1645486TqmSdm','getMemberID','resolveComment','/edit','Edit','toStringTag','CustomRangeType','users','disposeWithMe','content','prototype','resolved','customRanges','_threadCommentDataSourceService','_sessionService','16ARJyYO','/add','getUser','user','getOwnPropertyDescriptor','call','getUnit','filter','dateKit','packageName','code','get','string','format','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','deleteComment','11965950UebdMY','replies','root','UserManagerService','YYYY/MM/DD\x20HH:mm','constructor','reply','Module','_init'];_0x5bce=function(){return _0x5a1ffc;};return _0x5bce();}function S(_0x5d7a5e,_0x430289){const _0x125606=_0x3ed7a6;if(x(_0x5d7a5e)!=_0x125606(0xd4)||!_0x5d7a5e)return _0x5d7a5e;var _0x393559=_0x5d7a5e[Symbol[_0x125606(0xe9)]];if(_0x393559!==void 0x0){var _0x8d754a=_0x393559[_0x125606(0x99)](_0x5d7a5e,_0x430289||_0x125606(0xc1));if(x(_0x8d754a)!=_0x125606(0xd4))return _0x8d754a;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x430289===_0x125606(0xa0)?String:Number)(_0x5d7a5e);}function _0x9fc2(_0x2fc0e6,_0x352f69){_0x2fc0e6=_0x2fc0e6-0x76;const _0x5bce6a=_0x5bce();let _0x9fc2e=_0x5bce6a[_0x2fc0e6];return _0x9fc2e;}function C(_0x14a28a){const _0x5e456a=_0x3ed7a6;var _0x52d784=S(_0x14a28a,_0x5e456a(0xa0));return x(_0x52d784)==_0x5e456a(0xe1)?_0x52d784:_0x52d784+'';}function w(_0x4d479d,_0xddd8ec,_0x5c0042){const _0x5ea036=_0x3ed7a6;return(_0xddd8ec=C(_0xddd8ec))in _0x4d479d?Object[_0x5ea036(0xbb)](_0x4d479d,_0xddd8ec,{'value':_0x5c0042,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4d479d[_0xddd8ec]=_0x5c0042,_0x4d479d;}let T=class extends n[_0x3ed7a6(0xeb)]{constructor(_0x4eacf4=g,_0x9316a7,_0x2bd355){const _0x6cc9fb=_0x3ed7a6;super(),this[_0x6cc9fb(0xc9)]=_0x4eacf4,this[_0x6cc9fb(0x81)]=_0x9316a7,this[_0x6cc9fb(0xed)]=_0x2bd355;let {..._0xf1d12f}=(0x0,n['merge'])({},g,this[_0x6cc9fb(0xc9)]);this[_0x6cc9fb(0xed)][_0x6cc9fb(0xb1)](h,_0xf1d12f);}['onStarting'](){[[y],[b],[m]]['forEach'](_0x13e712=>{const _0x310718=_0x9fc2;this[_0x310718(0x81)][_0x310718(0xbd)](_0x13e712);});}['onReady'](){const _0x3baa9d=_0x3ed7a6;this['_injector']['get'](b),this[_0x3baa9d(0x81)][_0x3baa9d(0x9f)](m);}};w(T,_0x3ed7a6(0xb3),_0x3ed7a6(0xa3)),w(T,_0x3ed7a6(0x9d),c),w(T,'version',l),T=p([(0x0,n['DependentOn'])(r['UniverThreadCommentUIPlugin'],e[_0x3ed7a6(0xc2)],t[_0x3ed7a6(0xb7)]),f(0x1,(0x0,n[_0x3ed7a6(0x78)])(n[_0x3ed7a6(0xa2)])),f(0x2,n[_0x3ed7a6(0xf3)])],T),Object['defineProperty'](exports,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return T;}});
1
+ const _0x4b5f63=_0x1896;(function(_0x30e081,_0x185532){const _0x8d2e06=_0x1896,_0x3202ec=_0x30e081();while(!![]){try{const _0x7a0561=-parseInt(_0x8d2e06(0x8d))/0x1+parseInt(_0x8d2e06(0xa2))/0x2+-parseInt(_0x8d2e06(0xe0))/0x3*(-parseInt(_0x8d2e06(0xb0))/0x4)+parseInt(_0x8d2e06(0xde))/0x5+parseInt(_0x8d2e06(0xeb))/0x6+parseInt(_0x8d2e06(0xe1))/0x7*(parseInt(_0x8d2e06(0xe2))/0x8)+parseInt(_0x8d2e06(0x84))/0x9*(-parseInt(_0x8d2e06(0xd8))/0xa);if(_0x7a0561===_0x185532)break;else _0x3202ec['push'](_0x3202ec['shift']());}catch(_0x564097){_0x3202ec['push'](_0x3202ec['shift']());}}}(_0x1976,0x55ce6),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4b5f63(0xb8)}));let e=require(`@univerjs-pro/collaboration-client`),t=require(`@univerjs-pro/license`),n=require(`@univerjs/core`),r=require(`@univerjs/thread-comment-ui`),i=require(`@univerjs/protocol`),a=require(`@univerjs/thread-comment`),o=require(`rxjs`),s=require(`@univerjs/network`);var c=_0x4b5f63(0x79),l=_0x4b5f63(0x87);const u=_0x23ffa2=>(0x0,n['dateKit'])(new Date(+_0x23ffa2))[_0x4b5f63(0xd5)](_0x4b5f63(0xc2)),d=async(_0x73b858,_0x3de90c)=>{const _0x528d08=_0x4b5f63;let _0x1c9880=_0x73b858[_0x528d08(0xea)](n[_0x528d08(0x7d)]),_0x385e62=_0x73b858['get'](s[_0x528d08(0x72)]);_0x3de90c[_0x528d08(0xe6)](_0x433b4e=>{const _0x218eb0=_0x528d08;_0x1c9880[_0x218eb0(0x7b)](_0x433b4e)&&_0x3de90c[_0x218eb0(0x7c)](_0x433b4e);}),_0x3de90c[_0x528d08(0xbc)]&&(await _0x385e62[_0x528d08(0xea)](_0x528d08(0x6f),{'params':{'userIDs':[..._0x3de90c]}}))[_0x528d08(0xef)][_0x528d08(0x76)][_0x528d08(0xe6)](_0x4dad6b=>{const _0x5813e1=_0x528d08;_0x4dad6b&&_0x1c9880[_0x5813e1(0xec)](_0x4dad6b);});};function f(_0x12b8ea,_0xce3859){return function(_0x4b2256,_0x19d6f2){_0xce3859(_0x4b2256,_0x19d6f2,_0x12b8ea);};}function p(_0x4cac21,_0xbf1f1f,_0x2211ab,_0x3d538a){const _0x3a370d=_0x4b5f63;var _0x1b8b7a=arguments[_0x3a370d(0xc6)],_0x39670b=_0x1b8b7a<0x3?_0xbf1f1f:_0x3d538a===null?_0x3d538a=Object[_0x3a370d(0x70)](_0xbf1f1f,_0x2211ab):_0x3d538a,_0x2d88df;if(typeof Reflect==_0x3a370d(0x9d)&&typeof Reflect[_0x3a370d(0x9b)]=='function')_0x39670b=Reflect['decorate'](_0x4cac21,_0xbf1f1f,_0x2211ab,_0x3d538a);else{for(var _0x3b0d21=_0x4cac21[_0x3a370d(0xc6)]-0x1;_0x3b0d21>=0x0;_0x3b0d21--)(_0x2d88df=_0x4cac21[_0x3b0d21])&&(_0x39670b=(_0x1b8b7a<0x3?_0x2d88df(_0x39670b):_0x1b8b7a>0x3?_0x2d88df(_0xbf1f1f,_0x2211ab,_0x39670b):_0x2d88df(_0xbf1f1f,_0x2211ab))||_0x39670b);}return _0x1b8b7a>0x3&&_0x39670b&&Object['defineProperty'](_0xbf1f1f,_0x2211ab,_0x39670b),_0x39670b;}let m=class extends n[_0x4b5f63(0xe7)]{constructor(_0x2a764c,_0x2fad5c,_0x353d01,_0x3ecb9f){const _0x425214=_0x4b5f63;super(),this['_commentService']=_0x2a764c,this[_0x425214(0xa7)]=_0x2fad5c,this[_0x425214(0x9e)]=_0x353d01,this[_0x425214(0x7f)]=_0x3ecb9f,this[_0x425214(0xd7)](),this[_0x425214(0xbb)]();}[_0x4b5f63(0xbb)](){const _0x2b260a=_0x4b5f63;this[_0x2b260a(0xb3)](this[_0x2b260a(0xa7)][_0x2b260a(0xb6)][_0x2b260a(0xc7)]((0x0,o[_0x2b260a(0xc8)])(0x10))['subscribe'](_0x3cab33=>{const _0x5bc57f=_0x2b260a;let _0x3cf3c8=new Set();_0x3cab33[_0x5bc57f(0xe6)](_0x33a7fc=>{const _0x1ee7b7=_0x5bc57f;switch(_0x33a7fc[_0x1ee7b7(0xc4)]){case _0x1ee7b7(0x95):{let _0x402d9f=_0x33a7fc[_0x1ee7b7(0x8a)][_0x1ee7b7(0xd3)];_0x3cf3c8['add'](_0x402d9f);break;}default:break;}}),d(this['_injector'],_0x3cf3c8);}));}[_0x4b5f63(0xd7)](){const _0x5a7e33=_0x4b5f63;this[_0x5a7e33(0xb3)](this[_0x5a7e33(0xd0)][_0x5a7e33(0xb6)][_0x5a7e33(0xc0)](async _0x5b2652=>{const _0x24eac8=_0x5a7e33;var _0x2b6c54;let _0x592dd6=(_0x2b6c54=this[_0x24eac8(0xa7)][_0x24eac8(0xa1)](_0x5b2652[_0x24eac8(0xc5)])[_0x24eac8(0xdb)](_0x1f4b56=>_0x1f4b56[_0x24eac8(0xa3)]===_0x5b2652['threadId']))==null?void 0x0:_0x2b6c54[_0x24eac8(0xcc)];if(!_0x592dd6)return;let {unitId:_0x4522cd,subUnitId:_0x1e3829}=_0x592dd6;switch(_0x5b2652[_0x24eac8(0x80)]&&this['_userService'][_0x24eac8(0xec)](_0x5b2652['user']),_0x5b2652[_0x24eac8(0xc4)]){case i[_0x24eac8(0x9a)][_0x24eac8(0x6e)]:break;case i[_0x24eac8(0x9a)][_0x24eac8(0xe5)]:var _0x476a40,_0x4e1b24;this['_threadCommentModel'][_0x24eac8(0xcf)](_0x4522cd,_0x1e3829,{'unitId':_0x4522cd,'subUnitId':_0x1e3829,'ref':'','id':_0x5b2652[_0x24eac8(0x93)],'dT':u(+_0x5b2652[_0x24eac8(0xdd)]),'threadId':_0x5b2652['threadId'],'personId':(_0x476a40=(_0x4e1b24=_0x5b2652['user'])==null?void 0x0:_0x4e1b24['userID'])==null?_0x5b2652[_0x24eac8(0xdf)]:_0x476a40,'text':JSON['parse'](_0x5b2652[_0x24eac8(0xce)]),'parentId':_0x592dd6['id']});break;case i[_0x24eac8(0x9a)]['Delete']:{let _0x9100c0=this[_0x24eac8(0xa7)][_0x24eac8(0x96)](_0x4522cd,_0x1e3829,_0x5b2652[_0x24eac8(0x93)]);_0x9100c0&&_0x9100c0[_0x24eac8(0xd2)]&&this[_0x24eac8(0xa7)][_0x24eac8(0xae)](_0x4522cd,_0x1e3829,_0x5b2652[_0x24eac8(0x93)]);break;}case i[_0x24eac8(0x9a)]['Edit']:this[_0x24eac8(0xa7)][_0x24eac8(0xee)](_0x4522cd,_0x1e3829,{'commentId':_0x5b2652[_0x24eac8(0x93)],'text':JSON[_0x24eac8(0xa9)](_0x5b2652[_0x24eac8(0xce)])});break;case i[_0x24eac8(0x9a)][_0x24eac8(0xbd)]:{var _0x46729b;let _0x500af9=(_0x46729b=this[_0x24eac8(0xa7)][_0x24eac8(0xa1)](_0x5b2652[_0x24eac8(0xc5)])[_0x24eac8(0xdb)](_0x12d5e9=>_0x12d5e9['threadId']===_0x5b2652[_0x24eac8(0xa3)]))==null?void 0x0:_0x46729b[_0x24eac8(0xcc)];_0x500af9&&this[_0x24eac8(0xa7)][_0x24eac8(0x98)](_0x4522cd,_0x1e3829,_0x500af9['id'],_0x5b2652['solved']===i[_0x24eac8(0xa6)][_0x24eac8(0xad)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x4b5f63(0xd9)])(e[_0x4b5f63(0x82)])),f(0x1,(0x0,n[_0x4b5f63(0xd9)])(a[_0x4b5f63(0x91)])),f(0x2,(0x0,n[_0x4b5f63(0xd9)])(n['UserManagerService'])),f(0x3,(0x0,n[_0x4b5f63(0xd9)])(n['Injector']))],m);const h='thread-comment-data-source.config';Symbol(h);function _0x1976(){const _0x4ee848=['_commentService','constructor','parentId','personId','call','format','/solved','_init','1125330HaTnhy','Inject','_threadCommentDataSource','find','merge','createTimestamp','659675cwAtMH','userId','3HlEJqR','259RmzweL','12880wowdDH','defineProperty','error','Reply','forEach','Disposable','version','onStarting','get','374916XXqtji','addUser','toPrimitive','updateComment','body','_configService','replies','syncUpdateMutationToColla','Add','/universer-api/user/list','getOwnPropertyDescriptor','prototype','HTTPService','listComments','resolved','comments','users','string','getMemberID','@univerjs-pro/thread-comment-datasource','_initDataSource','getUser','delete','UserManagerService','IConfigService','_injector','user','CollaborationSessionService','CommentService','_config','27hryhHh','filter','_httpService','0.20.1','packageName','requireSession','payload','post','map','347716UQHSQP','code','solved','/reply','ThreadCommentModel','CustomRangeType','replyId','OpenOrReOpen','add','getComment','/universer-api/comment/unit/','resolveComment','comment','CommentUpdateEventType','decorate','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','object','_userService','_threadCommentDataSourceService','reply','getUnit','583042PeLScX','threadId','rangeType','customRanges','CommentSolvedStatus','_threadCommentModel','Plugin','parse','ref','rangeId','_sessionService','Solved','deleteComment','/list','1965060nyHWxr','stringify','COMMENT','disposeWithMe','dateKit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','commentUpdate$','UniverThreadCommentDataSourcePlugin','Module','IThreadCommentDataSourceService','Injector','_initUserSync','size','Solve','UniverThreadCommentUIPlugin','symbol','subscribe','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','setConfig','type','unitId','length','pipe','bufferTime','function','saveCommentToSnapshot','iterator','root','/edit','content','addComment'];_0x1976=function(){return _0x4ee848;};return _0x1976();}const g={};function _(_0x450416,_0x5f15c1){const _0x34d0b3=_0x4b5f63;let _0x2c40c9=_0x450416[_0x34d0b3(0x6c)][0x0];return{..._0x5f15c1,'id':_0x2c40c9['replyId'],'resolved':_0x450416['solved']===0x1,'dT':u(_0x2c40c9[_0x34d0b3(0xdd)]),'personId':_0x2c40c9[_0x34d0b3(0xdf)],'threadId':_0x2c40c9[_0x34d0b3(0xa3)]};}function v(_0x578147,_0x493e64,_0x6ed6c5){const _0x28e14a=_0x4b5f63;var _0x3655e0,_0x20be75;if(((_0x3655e0=_0x578147==null||(_0x20be75=_0x578147[_0x28e14a(0x6c)])==null?void 0x0:_0x20be75[_0x28e14a(0xc6)])==null?0x0:_0x3655e0)>0x0){let _0x33462c=(_0x8f3f01,_0x592dc2)=>({'id':_0x8f3f01['replyId'],'threadId':_0x8f3f01[_0x28e14a(0xa3)],'dT':u(_0x8f3f01['createTimestamp']),'personId':_0x8f3f01[_0x28e14a(0xdf)],'resolved':_0x578147[_0x28e14a(0x8f)]===i[_0x28e14a(0xa6)][_0x28e14a(0xad)],'unitId':_0x493e64,'subUnitId':_0x6ed6c5,'text':JSON[_0x28e14a(0xa9)](_0x8f3f01[_0x28e14a(0xce)]),'parentId':_0x592dc2}),_0x20979c=_0x33462c(_0x578147[_0x28e14a(0x6c)][0x0]);return{..._0x20979c,'children':_0x578147[_0x28e14a(0x6c)]['slice'](0x1)[_0x28e14a(0x8c)](_0x4ffa90=>_0x33462c(_0x4ffa90,_0x20979c['id']))};}return null;}let y=class{constructor(_0x1adb70,_0x5629e8,_0x2df124){const _0x5e62b0=_0x4b5f63;this[_0x5e62b0(0x86)]=_0x1adb70,this[_0x5e62b0(0x9e)]=_0x5629e8,this['_sessionService']=_0x2df124;}async[_0x4b5f63(0xcf)](_0x1dab41){const _0x1c809d=_0x4b5f63;var _0x446c93,_0x312fea;let {parentId:_0x2c1b87,unitId:_0x40075d,text:_0x4e91fa,threadId:_0x318c76}=_0x1dab41,_0x10365e=(_0x446c93=(_0x312fea=_0x4e91fa[_0x1c809d(0xa5)])==null?void 0x0:_0x312fea['filter'](_0x16fe3b=>_0x16fe3b['rangeType']===n[_0x1c809d(0x92)]['COMMENT'])[_0x1c809d(0x8c)](_0x5f125d=>_0x5f125d[_0x1c809d(0xab)]))==null?[]:_0x446c93,_0x59155a=JSON[_0x1c809d(0xb1)](_0x4e91fa),_0x3e707a=(await this[_0x1c809d(0xac)][_0x1c809d(0x89)](_0x40075d))['getMemberID']();if(_0x2c1b87){let _0x505290={'memberId':_0x3e707a,'unitId':_0x40075d,'content':_0x59155a,'mention':_0x10365e,'threadId':_0x318c76},_0x5a3dbd=(await this[_0x1c809d(0x86)][_0x1c809d(0x8b)](_0x1c809d(0x97)+_0x40075d+_0x1c809d(0x90),{'body':_0x505290}))[_0x1c809d(0xef)][_0x1c809d(0xa0)];return{..._0x1dab41,'id':_0x5a3dbd[_0x1c809d(0x93)],'dT':(0x0,n[_0x1c809d(0xb4)])(+_0x5a3dbd[_0x1c809d(0xdd)])[_0x1c809d(0xd5)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a3dbd[_0x1c809d(0xdf)]};}else{let _0x283598={'memberId':_0x3e707a,'unitId':_0x40075d,'content':_0x59155a,'mention':_0x10365e};return _((await this[_0x1c809d(0x86)][_0x1c809d(0x8b)]('/universer-api/comment/unit/'+_0x40075d+'/add',{'body':_0x283598}))[_0x1c809d(0xef)][_0x1c809d(0x99)],_0x1dab41);}}async[_0x4b5f63(0xee)](_0x4ab65a){const _0x269498=_0x4b5f63;var _0xf25737,_0x3b1908;let {text:_0x34cac4,unitId:_0x5488ba}=_0x4ab65a,_0x15ec32=(_0xf25737=(_0x3b1908=_0x34cac4['customRanges'])==null?void 0x0:_0x3b1908[_0x269498(0x85)](_0x22bbaf=>_0x22bbaf[_0x269498(0xa4)]===n[_0x269498(0x92)][_0x269498(0xb2)])[_0x269498(0x8c)](_0x3b099a=>_0x3b099a['rangeId']))==null?[]:_0xf25737,_0x1fc603=JSON[_0x269498(0xb1)](_0x34cac4),_0x178111=_0x4ab65a['threadId'],_0x4a5881=_0x4ab65a['id'],_0x1c93d5={'memberId':(await this['_sessionService']['requireSession'](_0x5488ba))[_0x269498(0x78)](),'unitId':_0x5488ba,'threadId':_0x178111,'mention':_0x15ec32,'content':_0x1fc603,'replyId':_0x4a5881},_0x1c3745=await this[_0x269498(0x86)][_0x269498(0x8b)](_0x269498(0x97)+_0x5488ba+_0x269498(0xcd),{'body':_0x1c93d5});return!_0x1c3745[_0x269498(0xef)][_0x269498(0xe4)]||_0x1c3745[_0x269498(0xef)][_0x269498(0xe4)][_0x269498(0x8e)]===0x1;}async[_0x4b5f63(0x98)](_0x3838a0){const _0x50b148=_0x4b5f63;let {unitId:_0x1b85b1}=_0x3838a0,_0x1889d3=_0x3838a0[_0x50b148(0xa3)],_0x175643={'memberId':this[_0x50b148(0x9e)]['getCurrentUser']()['userID'],'unitId':_0x1b85b1,'threadId':_0x1889d3,'solved':_0x3838a0[_0x50b148(0x74)]?i[_0x50b148(0xa6)][_0x50b148(0xad)]:i['CommentSolvedStatus'][_0x50b148(0x94)]},_0x3d4fe8=await this[_0x50b148(0x86)][_0x50b148(0x8b)](_0x50b148(0x97)+_0x1b85b1+_0x50b148(0xd6),{'body':_0x175643});return!_0x3d4fe8[_0x50b148(0xef)][_0x50b148(0xe4)]||_0x3d4fe8[_0x50b148(0xef)][_0x50b148(0xe4)][_0x50b148(0x8e)]===0x1;}async[_0x4b5f63(0xae)](_0x46618c,_0x4d23f9,_0x288066,_0x11de8a){const _0x3a10b7=_0x4b5f63;let _0x51a698={'memberId':(await this['_sessionService'][_0x3a10b7(0x89)](_0x46618c))[_0x3a10b7(0x78)](),'threadId':_0x288066,'replyId':_0x11de8a,'unitId':_0x46618c},_0x1d59cf=await this[_0x3a10b7(0x86)]['post'](_0x3a10b7(0x97)+_0x46618c+'/delete',{'body':_0x51a698});return!_0x1d59cf['body']['error']||_0x1d59cf['body']['error'][_0x3a10b7(0x8e)]===0x1;}async[_0x4b5f63(0x73)](_0x752200,_0xc70c88,_0x23b2d4){const _0x552847=_0x4b5f63;let _0x27f0b0={'unitId':_0x752200,'threadId':_0x23b2d4},_0x32abd3=await this[_0x552847(0x86)]['post'](_0x552847(0x97)+_0x752200+_0x552847(0xaf),{'body':_0x27f0b0}),_0x2487b2=_0x23b2d4[_0x552847(0x8c)](_0x4427f2=>v(_0x32abd3[_0x552847(0xef)][_0x552847(0x75)][_0x4427f2],_0x752200,_0xc70c88))[_0x552847(0x85)](Boolean);return Object['values'](_0x32abd3[_0x552847(0xef)][_0x552847(0x76)])['forEach'](_0x360add=>{const _0x32f93d=_0x552847;this[_0x32f93d(0x9e)][_0x32f93d(0xec)](_0x360add);}),_0x2487b2;}[_0x4b5f63(0xca)](_0x2479f8){const _0x285011=_0x4b5f63;return{'id':_0x2479f8['id'],'threadId':_0x2479f8[_0x285011(0xa3)],'ref':_0x2479f8[_0x285011(0xaa)]};}};function _0x1896(_0xe6a4b9,_0x4a1f34){_0xe6a4b9=_0xe6a4b9-0x6c;const _0x197608=_0x1976();let _0x189668=_0x197608[_0xe6a4b9];return _0x189668;}y=p([f(0x0,(0x0,n[_0x4b5f63(0xd9)])(s[_0x4b5f63(0x72)])),f(0x1,(0x0,n[_0x4b5f63(0xd9)])(n[_0x4b5f63(0x7d)])),f(0x2,(0x0,n['Inject'])(e[_0x4b5f63(0x81)]))],y);let b=class extends n[_0x4b5f63(0xe7)]{constructor(_0x5eb869,_0x1adfcd){const _0x4aa966=_0x4b5f63;super(),this['_threadCommentDataSourceService']=_0x5eb869,this[_0x4aa966(0xda)]=_0x1adfcd,this['_initDataSource']();}[_0x4b5f63(0x7a)](){const _0x452ef2=_0x4b5f63;this[_0x452ef2(0x9f)]['dataSource']=this[_0x452ef2(0xda)],this[_0x452ef2(0x9f)][_0x452ef2(0x6d)]=!0x1;}};b=p([f(0x0,a[_0x4b5f63(0xb9)]),f(0x1,(0x0,n[_0x4b5f63(0xd9)])(y))],b);function x(_0x262a92){'@babel/helpers - typeof';const _0x33f4b8=_0x4b5f63;return x=typeof Symbol==_0x33f4b8(0xc9)&&typeof Symbol[_0x33f4b8(0xcb)]==_0x33f4b8(0xbf)?function(_0x486630){return typeof _0x486630;}:function(_0x51e354){const _0x44ff8e=_0x33f4b8;return _0x51e354&&typeof Symbol==_0x44ff8e(0xc9)&&_0x51e354[_0x44ff8e(0xd1)]===Symbol&&_0x51e354!==Symbol[_0x44ff8e(0x71)]?'symbol':typeof _0x51e354;},x(_0x262a92);}function S(_0xd02bb9,_0x46ab65){const _0x21ec37=_0x4b5f63;if(x(_0xd02bb9)!=_0x21ec37(0x9d)||!_0xd02bb9)return _0xd02bb9;var _0x4406d4=_0xd02bb9[Symbol[_0x21ec37(0xed)]];if(_0x4406d4!==void 0x0){var _0x457e7d=_0x4406d4[_0x21ec37(0xd4)](_0xd02bb9,_0x46ab65||'default');if(x(_0x457e7d)!=_0x21ec37(0x9d))return _0x457e7d;throw TypeError(_0x21ec37(0x9c));}return(_0x46ab65===_0x21ec37(0x77)?String:Number)(_0xd02bb9);}function C(_0x43c20b){const _0x4432e4=_0x4b5f63;var _0x278431=S(_0x43c20b,_0x4432e4(0x77));return x(_0x278431)==_0x4432e4(0xbf)?_0x278431:_0x278431+'';}function w(_0x33006d,_0x5e0da7,_0x5dcca7){const _0x235be9=_0x4b5f63;return(_0x5e0da7=C(_0x5e0da7))in _0x33006d?Object[_0x235be9(0xe3)](_0x33006d,_0x5e0da7,{'value':_0x5dcca7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x33006d[_0x5e0da7]=_0x5dcca7,_0x33006d;}let T=class extends n[_0x4b5f63(0xa8)]{constructor(_0x5e7ab5=g,_0x1067b8,_0x4d608c){const _0x4b1c93=_0x4b5f63;super(),this[_0x4b1c93(0x83)]=_0x5e7ab5,this[_0x4b1c93(0x7f)]=_0x1067b8,this['_configService']=_0x4d608c;let {..._0x389217}=(0x0,n[_0x4b1c93(0xdc)])({},g,this[_0x4b1c93(0x83)]);this[_0x4b1c93(0xf0)][_0x4b1c93(0xc3)](h,_0x389217);}[_0x4b5f63(0xe9)](){const _0x3ffeb2=_0x4b5f63;[[y],[b],[m]][_0x3ffeb2(0xe6)](_0x6b801e=>{const _0x5e08fe=_0x3ffeb2;this[_0x5e08fe(0x7f)][_0x5e08fe(0x95)](_0x6b801e);});}['onReady'](){const _0x54b292=_0x4b5f63;this[_0x54b292(0x7f)][_0x54b292(0xea)](b),this[_0x54b292(0x7f)][_0x54b292(0xea)](m);}};w(T,'pluginName',_0x4b5f63(0xb5)),w(T,_0x4b5f63(0x88),c),w(T,_0x4b5f63(0xe8),l),T=p([(0x0,n['DependentOn'])(r[_0x4b5f63(0xbe)],e['UniverCollaborationClientPlugin'],t[_0x4b5f63(0xc1)]),f(0x1,(0x0,n[_0x4b5f63(0xd9)])(n[_0x4b5f63(0xba)])),f(0x2,n[_0x4b5f63(0x7e)])],T),Object['defineProperty'](exports,_0x4b5f63(0xb7),{'enumerable':!0x0,'get':function(){return T;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4a3c9a=_0xd81a;(function(_0x166e5f,_0x543c04){const _0x9ba6c8=_0xd81a,_0x2c6031=_0x166e5f();while(!![]){try{const _0x39fad9=parseInt(_0x9ba6c8(0x1d0))/0x1*(-parseInt(_0x9ba6c8(0x230))/0x2)+parseInt(_0x9ba6c8(0x205))/0x3+-parseInt(_0x9ba6c8(0x1fe))/0x4*(-parseInt(_0x9ba6c8(0x221))/0x5)+-parseInt(_0x9ba6c8(0x1d7))/0x6*(-parseInt(_0x9ba6c8(0x220))/0x7)+-parseInt(_0x9ba6c8(0x22a))/0x8+-parseInt(_0x9ba6c8(0x207))/0x9+-parseInt(_0x9ba6c8(0x1ee))/0xa*(-parseInt(_0x9ba6c8(0x200))/0xb);if(_0x39fad9===_0x543c04)break;else _0x2c6031['push'](_0x2c6031['shift']());}catch(_0x24d210){_0x2c6031['push'](_0x2c6031['shift']());}}}(_0x7d69,0xdc20a));function _0xd81a(_0x4b9f74,_0x351e1d){_0x4b9f74=_0x4b9f74-0x1cd;const _0x7d6946=_0x7d69();let _0xd81a7a=_0x7d6946[_0x4b9f74];return _0xd81a7a;}import{CollaborationSessionService as _0x1dfa69,CommentService as _0x2985f0,UniverCollaborationClientPlugin as _0xa60d66}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2f35d1}from'@univerjs-pro/license';import{CustomRangeType as _0x4c52d2,DependentOn as _0x3f45f6,Disposable as _0x4ef94e,IConfigService as _0x21f34e,Inject as _0x5eaa2a,Injector as _0x2f5371,Plugin as _0x226b65,UserManagerService as _0x4a077a,dateKit as _0x9de1f6,merge as _0x26220a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2fd18a}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x59a7b4,CommentUpdateEventType as _0x1fad40}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x33df62,ThreadCommentModel as _0x46bc71}from'@univerjs/thread-comment';import{bufferTime as _0x3c2718}from'rxjs';import{HTTPService as _0xdcde9f}from'@univerjs/network';var x=_0x4a3c9a(0x1e1),S=_0x4a3c9a(0x222);const C=_0x19cd1d=>_0x9de1f6(new Date(+_0x19cd1d))[_0x4a3c9a(0x21f)](_0x4a3c9a(0x215)),w=async(_0x3ae556,_0x462835)=>{const _0x5226af=_0x4a3c9a;let _0x4cf02d=_0x3ae556[_0x5226af(0x1fd)](_0x4a077a),_0x4dd646=_0x3ae556[_0x5226af(0x1fd)](_0xdcde9f);_0x462835[_0x5226af(0x1fc)](_0x156f66=>{const _0x404755=_0x5226af;_0x4cf02d[_0x404755(0x22b)](_0x156f66)&&_0x462835[_0x404755(0x225)](_0x156f66);}),_0x462835[_0x5226af(0x1d9)]&&(await _0x4dd646['get'](_0x5226af(0x1df),{'params':{'userIDs':[..._0x462835]}}))[_0x5226af(0x1d1)][_0x5226af(0x239)][_0x5226af(0x1fc)](_0x430083=>{_0x430083&&_0x4cf02d['addUser'](_0x430083);});};function T(_0x28628c,_0x5419fc){return function(_0x457b6e,_0x3f186f){_0x5419fc(_0x457b6e,_0x3f186f,_0x28628c);};}function E(_0x20c7c1,_0x28f14e,_0x44ea40,_0x3d830c){const _0x5bbdc8=_0x4a3c9a;var _0x1da066=arguments[_0x5bbdc8(0x1f1)],_0x12e60c=_0x1da066<0x3?_0x28f14e:_0x3d830c===null?_0x3d830c=Object[_0x5bbdc8(0x233)](_0x28f14e,_0x44ea40):_0x3d830c,_0x5061be;if(typeof Reflect==_0x5bbdc8(0x214)&&typeof Reflect[_0x5bbdc8(0x1e3)]=='function')_0x12e60c=Reflect[_0x5bbdc8(0x1e3)](_0x20c7c1,_0x28f14e,_0x44ea40,_0x3d830c);else{for(var _0x489e52=_0x20c7c1[_0x5bbdc8(0x1f1)]-0x1;_0x489e52>=0x0;_0x489e52--)(_0x5061be=_0x20c7c1[_0x489e52])&&(_0x12e60c=(_0x1da066<0x3?_0x5061be(_0x12e60c):_0x1da066>0x3?_0x5061be(_0x28f14e,_0x44ea40,_0x12e60c):_0x5061be(_0x28f14e,_0x44ea40))||_0x12e60c);}return _0x1da066>0x3&&_0x12e60c&&Object[_0x5bbdc8(0x1eb)](_0x28f14e,_0x44ea40,_0x12e60c),_0x12e60c;}function _0x7d69(){const _0x57c650=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','/list','getCurrentUser','filter','replies','user','getMemberID','listComments','values','resolved','object','YYYY/MM/DD\x20HH:mm','/add','OpenOrReOpen','setConfig','toPrimitive','content','customRanges','syncUpdateMutationToColla','_config','string','format','98UtuvRa','25QGqFqP','0.20.0-insiders.20260411-27a8c24','/delete','pluginName','delete','replyId','/reply','subscribe','function','11865368ijgPhP','getUser','requireSession','payload','_threadCommentDataSourceService','/universer-api/comment/unit/','2RLGHwq','post','default','getOwnPropertyDescriptor','call','commentUpdate$','/solved','_init','error','users','_injector','rangeType','userId','map','870613ouIZHR','body','addUser','disposeWithMe','unitId','_threadCommentModel','_userService','501780GfgRih','Solve','size','personId','rangeId','_sessionService','_initUserSync','saveCommentToSnapshot','/universer-api/user/list','solved','@univerjs-pro/thread-comment-datasource','Solved','decorate','_commentService','userID','resolveComment','Add','stringify','comments','find','defineProperty','version','type','20LiHlyF','getUnit','Edit','length','constructor','createTimestamp','_configService','root','threadId','pipe','getComment','_httpService','slice','comment','forEach','get','737268QnsRax','deleteComment','5220534TmzgOZ','onReady','add','_initDataSource','code','1695474iyHbyb','updateComment','3161925OiwGoI','parse'];_0x7d69=function(){return _0x57c650;};return _0x7d69();}let D=class extends _0x4ef94e{constructor(_0x3f9d0d,_0x1b547b,_0x3854cf,_0x221568){const _0x24b7ff=_0x4a3c9a;super(),this[_0x24b7ff(0x1e4)]=_0x3f9d0d,this[_0x24b7ff(0x1d5)]=_0x1b547b,this['_userService']=_0x3854cf,this[_0x24b7ff(0x23a)]=_0x221568,this[_0x24b7ff(0x237)](),this[_0x24b7ff(0x1dd)]();}[_0x4a3c9a(0x1dd)](){const _0x2abc28=_0x4a3c9a;this[_0x2abc28(0x1d3)](this[_0x2abc28(0x1d5)]['commentUpdate$'][_0x2abc28(0x1f7)](_0x3c2718(0x10))[_0x2abc28(0x228)](_0x541658=>{const _0x126413=_0x2abc28;let _0x190444=new Set();_0x541658[_0x126413(0x1fc)](_0x3b8177=>{const _0x3c4f20=_0x126413;switch(_0x3b8177[_0x3c4f20(0x1ed)]){case _0x3c4f20(0x202):{let _0x2420c6=_0x3b8177[_0x3c4f20(0x22d)][_0x3c4f20(0x1da)];_0x190444['add'](_0x2420c6);break;}default:break;}}),w(this[_0x126413(0x23a)],_0x190444);}));}[_0x4a3c9a(0x237)](){const _0x2416d2=_0x4a3c9a;this[_0x2416d2(0x1d3)](this[_0x2416d2(0x1e4)][_0x2416d2(0x235)]['subscribe'](async _0x127214=>{const _0x2fba7e=_0x2416d2;var _0x525d22;let _0x5c4f0d=(_0x525d22=this['_threadCommentModel'][_0x2fba7e(0x1ef)](_0x127214[_0x2fba7e(0x1d4)])[_0x2fba7e(0x1ea)](_0xe5dfd4=>_0xe5dfd4['threadId']===_0x127214[_0x2fba7e(0x1f6)]))==null?void 0x0:_0x525d22[_0x2fba7e(0x1f5)];if(!_0x5c4f0d)return;let {unitId:_0x3e91f4,subUnitId:_0x13f0fb}=_0x5c4f0d;switch(_0x127214[_0x2fba7e(0x20f)]&&this[_0x2fba7e(0x1d6)][_0x2fba7e(0x1d2)](_0x127214[_0x2fba7e(0x20f)]),_0x127214[_0x2fba7e(0x1ed)]){case _0x1fad40[_0x2fba7e(0x1e7)]:break;case _0x1fad40['Reply']:var _0x5f3f52,_0xb88abb;this['_threadCommentModel']['addComment'](_0x3e91f4,_0x13f0fb,{'unitId':_0x3e91f4,'subUnitId':_0x13f0fb,'ref':'','id':_0x127214['replyId'],'dT':C(+_0x127214[_0x2fba7e(0x1f3)]),'threadId':_0x127214[_0x2fba7e(0x1f6)],'personId':(_0x5f3f52=(_0xb88abb=_0x127214[_0x2fba7e(0x20f)])==null?void 0x0:_0xb88abb['userID'])==null?_0x127214[_0x2fba7e(0x1ce)]:_0x5f3f52,'text':JSON[_0x2fba7e(0x208)](_0x127214[_0x2fba7e(0x21a)]),'parentId':_0x5c4f0d['id']});break;case _0x1fad40['Delete']:{let _0x3e81d4=this[_0x2fba7e(0x1d5)][_0x2fba7e(0x1f8)](_0x3e91f4,_0x13f0fb,_0x127214[_0x2fba7e(0x226)]);_0x3e81d4&&_0x3e81d4['parentId']&&this[_0x2fba7e(0x1d5)][_0x2fba7e(0x1ff)](_0x3e91f4,_0x13f0fb,_0x127214[_0x2fba7e(0x226)]);break;}case _0x1fad40[_0x2fba7e(0x1f0)]:this[_0x2fba7e(0x1d5)][_0x2fba7e(0x206)](_0x3e91f4,_0x13f0fb,{'commentId':_0x127214[_0x2fba7e(0x226)],'text':JSON['parse'](_0x127214[_0x2fba7e(0x21a)])});break;case _0x1fad40[_0x2fba7e(0x1d8)]:{var _0x1b4083;let _0x5e793a=(_0x1b4083=this[_0x2fba7e(0x1d5)]['getUnit'](_0x127214[_0x2fba7e(0x1d4)])['find'](_0xf9b640=>_0xf9b640[_0x2fba7e(0x1f6)]===_0x127214[_0x2fba7e(0x1f6)]))==null?void 0x0:_0x1b4083['root'];_0x5e793a&&this['_threadCommentModel'][_0x2fba7e(0x1e6)](_0x3e91f4,_0x13f0fb,_0x5e793a['id'],_0x127214[_0x2fba7e(0x1e0)]===_0x59a7b4[_0x2fba7e(0x1e2)]);break;}default:break;}}));}};D=E([T(0x0,_0x5eaa2a(_0x2985f0)),T(0x1,_0x5eaa2a(_0x46bc71)),T(0x2,_0x5eaa2a(_0x4a077a)),T(0x3,_0x5eaa2a(_0x2f5371))],D);const O='thread-comment-data-source.config';Symbol(O);const k={};function A(_0xf78244,_0x59966b){const _0x262ce9=_0x4a3c9a;let _0x460049=_0xf78244[_0x262ce9(0x20e)][0x0];return{..._0x59966b,'id':_0x460049['replyId'],'resolved':_0xf78244['solved']===0x1,'dT':C(_0x460049[_0x262ce9(0x1f3)]),'personId':_0x460049[_0x262ce9(0x1ce)],'threadId':_0x460049['threadId']};}function j(_0x4ecb88,_0x348124,_0x267d3c){const _0x3f021c=_0x4a3c9a;var _0x2c1910,_0xfd336f;if(((_0x2c1910=_0x4ecb88==null||(_0xfd336f=_0x4ecb88['replies'])==null?void 0x0:_0xfd336f['length'])==null?0x0:_0x2c1910)>0x0){let _0x5ce29b=(_0x28b727,_0xa819bc)=>({'id':_0x28b727['replyId'],'threadId':_0x28b727['threadId'],'dT':C(_0x28b727[_0x3f021c(0x1f3)]),'personId':_0x28b727[_0x3f021c(0x1ce)],'resolved':_0x4ecb88['solved']===_0x59a7b4['Solved'],'unitId':_0x348124,'subUnitId':_0x267d3c,'text':JSON['parse'](_0x28b727['content']),'parentId':_0xa819bc}),_0x5b51e3=_0x5ce29b(_0x4ecb88['replies'][0x0]);return{..._0x5b51e3,'children':_0x4ecb88[_0x3f021c(0x20e)][_0x3f021c(0x1fa)](0x1)[_0x3f021c(0x1cf)](_0x4a8b44=>_0x5ce29b(_0x4a8b44,_0x5b51e3['id']))};}return null;}let M=class{constructor(_0xb23846,_0x571d35,_0x563a9c){const _0x1e8597=_0x4a3c9a;this[_0x1e8597(0x1f9)]=_0xb23846,this[_0x1e8597(0x1d6)]=_0x571d35,this[_0x1e8597(0x1dc)]=_0x563a9c;}async['addComment'](_0x3c51db){const _0x45cacc=_0x4a3c9a;var _0x370860,_0x204922;let {parentId:_0x471d84,unitId:_0x47ea9f,text:_0x3a948c,threadId:_0x516234}=_0x3c51db,_0x1c3171=(_0x370860=(_0x204922=_0x3a948c[_0x45cacc(0x21b)])==null?void 0x0:_0x204922[_0x45cacc(0x20d)](_0xedbad=>_0xedbad[_0x45cacc(0x1cd)]===_0x4c52d2['COMMENT'])[_0x45cacc(0x1cf)](_0x294a86=>_0x294a86[_0x45cacc(0x1db)]))==null?[]:_0x370860,_0xab2033=JSON[_0x45cacc(0x1e8)](_0x3a948c),_0x50c4b3=(await this[_0x45cacc(0x1dc)][_0x45cacc(0x22c)](_0x47ea9f))[_0x45cacc(0x210)]();if(_0x471d84){let _0x1e1002={'memberId':_0x50c4b3,'unitId':_0x47ea9f,'content':_0xab2033,'mention':_0x1c3171,'threadId':_0x516234},_0x4ada6a=(await this[_0x45cacc(0x1f9)][_0x45cacc(0x231)](_0x45cacc(0x22f)+_0x47ea9f+_0x45cacc(0x227),{'body':_0x1e1002}))[_0x45cacc(0x1d1)]['reply'];return{..._0x3c51db,'id':_0x4ada6a[_0x45cacc(0x226)],'dT':_0x9de1f6(+_0x4ada6a[_0x45cacc(0x1f3)])[_0x45cacc(0x21f)](_0x45cacc(0x215)),'personId':_0x4ada6a['userId']};}else{let _0x1c30c6={'memberId':_0x50c4b3,'unitId':_0x47ea9f,'content':_0xab2033,'mention':_0x1c3171};return A((await this['_httpService']['post'](_0x45cacc(0x22f)+_0x47ea9f+_0x45cacc(0x216),{'body':_0x1c30c6}))[_0x45cacc(0x1d1)][_0x45cacc(0x1fb)],_0x3c51db);}}async[_0x4a3c9a(0x206)](_0x1be88e){const _0x194fb2=_0x4a3c9a;var _0x4a957a,_0x391e5c;let {text:_0x7f5298,unitId:_0x1bfffc}=_0x1be88e,_0x5400d4=(_0x4a957a=(_0x391e5c=_0x7f5298[_0x194fb2(0x21b)])==null?void 0x0:_0x391e5c[_0x194fb2(0x20d)](_0x357ac3=>_0x357ac3['rangeType']===_0x4c52d2['COMMENT'])[_0x194fb2(0x1cf)](_0x69db74=>_0x69db74[_0x194fb2(0x1db)]))==null?[]:_0x4a957a,_0x29ae3c=JSON[_0x194fb2(0x1e8)](_0x7f5298),_0x5b90a0=_0x1be88e[_0x194fb2(0x1f6)],_0xc171b6=_0x1be88e['id'],_0x31ee94={'memberId':(await this[_0x194fb2(0x1dc)][_0x194fb2(0x22c)](_0x1bfffc))[_0x194fb2(0x210)](),'unitId':_0x1bfffc,'threadId':_0x5b90a0,'mention':_0x5400d4,'content':_0x29ae3c,'replyId':_0xc171b6},_0x45be61=await this[_0x194fb2(0x1f9)][_0x194fb2(0x231)]('/universer-api/comment/unit/'+_0x1bfffc+'/edit',{'body':_0x31ee94});return!_0x45be61['body']['error']||_0x45be61[_0x194fb2(0x1d1)]['error'][_0x194fb2(0x204)]===0x1;}async['resolveComment'](_0x243c24){const _0x1372de=_0x4a3c9a;let {unitId:_0x1a6935}=_0x243c24,_0x890173=_0x243c24['threadId'],_0x1833b1={'memberId':this[_0x1372de(0x1d6)][_0x1372de(0x20c)]()[_0x1372de(0x1e5)],'unitId':_0x1a6935,'threadId':_0x890173,'solved':_0x243c24[_0x1372de(0x213)]?_0x59a7b4['Solved']:_0x59a7b4[_0x1372de(0x217)]},_0x4ee626=await this[_0x1372de(0x1f9)][_0x1372de(0x231)]('/universer-api/comment/unit/'+_0x1a6935+_0x1372de(0x236),{'body':_0x1833b1});return!_0x4ee626[_0x1372de(0x1d1)]['error']||_0x4ee626[_0x1372de(0x1d1)][_0x1372de(0x238)][_0x1372de(0x204)]===0x1;}async[_0x4a3c9a(0x1ff)](_0xc446e0,_0x571a03,_0x294270,_0x22d77b){const _0x9ff3d1=_0x4a3c9a;let _0x20c49e={'memberId':(await this[_0x9ff3d1(0x1dc)][_0x9ff3d1(0x22c)](_0xc446e0))['getMemberID'](),'threadId':_0x294270,'replyId':_0x22d77b,'unitId':_0xc446e0},_0x320d34=await this[_0x9ff3d1(0x1f9)][_0x9ff3d1(0x231)](_0x9ff3d1(0x22f)+_0xc446e0+_0x9ff3d1(0x223),{'body':_0x20c49e});return!_0x320d34['body'][_0x9ff3d1(0x238)]||_0x320d34[_0x9ff3d1(0x1d1)][_0x9ff3d1(0x238)]['code']===0x1;}async[_0x4a3c9a(0x211)](_0x5115be,_0x560b05,_0x136b02){const _0x16765c=_0x4a3c9a;let _0x2511da={'unitId':_0x5115be,'threadId':_0x136b02},_0x45718a=await this[_0x16765c(0x1f9)]['post'](_0x16765c(0x22f)+_0x5115be+_0x16765c(0x20b),{'body':_0x2511da}),_0x5de90d=_0x136b02[_0x16765c(0x1cf)](_0x12b921=>j(_0x45718a[_0x16765c(0x1d1)][_0x16765c(0x1e9)][_0x12b921],_0x5115be,_0x560b05))[_0x16765c(0x20d)](Boolean);return Object[_0x16765c(0x212)](_0x45718a[_0x16765c(0x1d1)]['users'])[_0x16765c(0x1fc)](_0x3c131a=>{const _0xa03308=_0x16765c;this['_userService'][_0xa03308(0x1d2)](_0x3c131a);}),_0x5de90d;}[_0x4a3c9a(0x1de)](_0x4a6695){const _0x2b55f1=_0x4a3c9a;return{'id':_0x4a6695['id'],'threadId':_0x4a6695[_0x2b55f1(0x1f6)],'ref':_0x4a6695['ref']};}};M=E([T(0x0,_0x5eaa2a(_0xdcde9f)),T(0x1,_0x5eaa2a(_0x4a077a)),T(0x2,_0x5eaa2a(_0x1dfa69))],M);let N=class extends _0x4ef94e{constructor(_0xd8502d,_0x2eeafd){const _0x364b64=_0x4a3c9a;super(),this[_0x364b64(0x22e)]=_0xd8502d,this['_threadCommentDataSource']=_0x2eeafd,this[_0x364b64(0x203)]();}[_0x4a3c9a(0x203)](){const _0x308607=_0x4a3c9a;this[_0x308607(0x22e)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x308607(0x21c)]=!0x1;}};N=E([T(0x0,_0x33df62),T(0x1,_0x5eaa2a(M))],N);function P(_0x373025){'@babel/helpers - typeof';const _0x820a02=_0x4a3c9a;return P=typeof Symbol==_0x820a02(0x229)&&typeof Symbol['iterator']=='symbol'?function(_0x1ab59b){return typeof _0x1ab59b;}:function(_0x57a15d){const _0x1644ec=_0x820a02;return _0x57a15d&&typeof Symbol=='function'&&_0x57a15d[_0x1644ec(0x1f2)]===Symbol&&_0x57a15d!==Symbol['prototype']?_0x1644ec(0x20a):typeof _0x57a15d;},P(_0x373025);}function F(_0x21f91c,_0x5de5ae){const _0x31d0c2=_0x4a3c9a;if(P(_0x21f91c)!=_0x31d0c2(0x214)||!_0x21f91c)return _0x21f91c;var _0xce75df=_0x21f91c[Symbol[_0x31d0c2(0x219)]];if(_0xce75df!==void 0x0){var _0x33df1e=_0xce75df[_0x31d0c2(0x234)](_0x21f91c,_0x5de5ae||_0x31d0c2(0x232));if(P(_0x33df1e)!=_0x31d0c2(0x214))return _0x33df1e;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5de5ae===_0x31d0c2(0x21e)?String:Number)(_0x21f91c);}function I(_0x4e31d7){var _0x5bd5bb=F(_0x4e31d7,'string');return P(_0x5bd5bb)=='symbol'?_0x5bd5bb:_0x5bd5bb+'';}function L(_0x37130f,_0x429080,_0x3309f9){const _0x4de57e=_0x4a3c9a;return(_0x429080=I(_0x429080))in _0x37130f?Object[_0x4de57e(0x1eb)](_0x37130f,_0x429080,{'value':_0x3309f9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x37130f[_0x429080]=_0x3309f9,_0x37130f;}let R=class extends _0x226b65{constructor(_0xbccaa5=k,_0x548d4c,_0x3bfa2e){const _0x22c1b9=_0x4a3c9a;super(),this[_0x22c1b9(0x21d)]=_0xbccaa5,this[_0x22c1b9(0x23a)]=_0x548d4c,this[_0x22c1b9(0x1f4)]=_0x3bfa2e;let {..._0x3e5805}=_0x26220a({},k,this[_0x22c1b9(0x21d)]);this[_0x22c1b9(0x1f4)][_0x22c1b9(0x218)](O,_0x3e5805);}['onStarting'](){const _0x2c40b=_0x4a3c9a;[[M],[N],[D]][_0x2c40b(0x1fc)](_0x101e8e=>{const _0x3d1ce9=_0x2c40b;this[_0x3d1ce9(0x23a)][_0x3d1ce9(0x202)](_0x101e8e);});}[_0x4a3c9a(0x201)](){const _0x24dcf6=_0x4a3c9a;this[_0x24dcf6(0x23a)][_0x24dcf6(0x1fd)](N),this['_injector'][_0x24dcf6(0x1fd)](D);}};L(R,_0x4a3c9a(0x224),_0x4a3c9a(0x209)),L(R,'packageName',x),L(R,_0x4a3c9a(0x1ec),S),R=E([_0x3f45f6(_0x2fd18a,_0xa60d66,_0x2f35d1),T(0x1,_0x5eaa2a(_0x2f5371)),T(0x2,_0x21f34e)],R);export{R as UniverThreadCommentDataSourcePlugin};
1
+ const _0x443cdb=_0x7314;(function(_0x328f1a,_0x108fca){const _0x49adf0=_0x7314,_0x36b649=_0x328f1a();while(!![]){try{const _0x58839e=-parseInt(_0x49adf0(0xa4))/0x1+-parseInt(_0x49adf0(0x71))/0x2+-parseInt(_0x49adf0(0xad))/0x3*(-parseInt(_0x49adf0(0x99))/0x4)+parseInt(_0x49adf0(0x83))/0x5*(-parseInt(_0x49adf0(0x91))/0x6)+parseInt(_0x49adf0(0x88))/0x7*(-parseInt(_0x49adf0(0x75))/0x8)+parseInt(_0x49adf0(0xb8))/0x9*(parseInt(_0x49adf0(0x6e))/0xa)+parseInt(_0x49adf0(0xbb))/0xb*(parseInt(_0x49adf0(0xb2))/0xc);if(_0x58839e===_0x108fca)break;else _0x36b649['push'](_0x36b649['shift']());}catch(_0x412756){_0x36b649['push'](_0x36b649['shift']());}}}(_0x304c,0xdcdce));import{CollaborationSessionService as _0x35863e,CommentService as _0x17a934,UniverCollaborationClientPlugin as _0x446d41}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4223a1}from'@univerjs-pro/license';import{CustomRangeType as _0x2ce30f,DependentOn as _0x3f8556,Disposable as _0x254aab,IConfigService as _0xbae266,Inject as _0x4ea8b7,Injector as _0x5bc231,Plugin as _0x53ad5d,UserManagerService as _0x3c93c8,dateKit as _0x41bf95,merge as _0x33f364}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2e03}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x463330,CommentUpdateEventType as _0x2b7aa6}from'@univerjs/protocol';function _0x7314(_0x5352b7,_0x3fc3be){_0x5352b7=_0x5352b7-0x66;const _0x304cf6=_0x304c();let _0x7314bb=_0x304cf6[_0x5352b7];return _0x7314bb;}import{IThreadCommentDataSourceService as _0x3a855d,ThreadCommentModel as _0x53f8fc}from'@univerjs/thread-comment';import{bufferTime as _0x51635e}from'rxjs';import{HTTPService as _0x52ac61}from'@univerjs/network';var x=_0x443cdb(0x72),S=_0x443cdb(0x76);const C=_0x35f573=>_0x41bf95(new Date(+_0x35f573))['format']('YYYY/MM/DD\x20HH:mm'),w=async(_0x47ac5b,_0x2ad46c)=>{const _0x126736=_0x443cdb;let _0x1a42cf=_0x47ac5b[_0x126736(0xa9)](_0x3c93c8),_0x47981f=_0x47ac5b[_0x126736(0xa9)](_0x52ac61);_0x2ad46c[_0x126736(0xc3)](_0x4dd7d2=>{const _0x358728=_0x126736;_0x1a42cf['getUser'](_0x4dd7d2)&&_0x2ad46c[_0x358728(0x6c)](_0x4dd7d2);}),_0x2ad46c['size']&&(await _0x47981f['get'](_0x126736(0xa0),{'params':{'userIDs':[..._0x2ad46c]}}))[_0x126736(0x86)][_0x126736(0x85)]['forEach'](_0x3ddea1=>{const _0xc4f814=_0x126736;_0x3ddea1&&_0x1a42cf[_0xc4f814(0xa1)](_0x3ddea1);});};function T(_0x15658a,_0xb6c25c){return function(_0x5bcbe8,_0x8aea52){_0xb6c25c(_0x5bcbe8,_0x8aea52,_0x15658a);};}function E(_0x4313a2,_0x2ca4e3,_0x4d0a9a,_0x5bdc5f){const _0x5ed679=_0x443cdb;var _0xe98d52=arguments[_0x5ed679(0x70)],_0x178a6f=_0xe98d52<0x3?_0x2ca4e3:_0x5bdc5f===null?_0x5bdc5f=Object[_0x5ed679(0x9f)](_0x2ca4e3,_0x4d0a9a):_0x5bdc5f,_0xfc6599;if(typeof Reflect=='object'&&typeof Reflect[_0x5ed679(0xc7)]==_0x5ed679(0xa6))_0x178a6f=Reflect[_0x5ed679(0xc7)](_0x4313a2,_0x2ca4e3,_0x4d0a9a,_0x5bdc5f);else{for(var _0x47aa8e=_0x4313a2[_0x5ed679(0x70)]-0x1;_0x47aa8e>=0x0;_0x47aa8e--)(_0xfc6599=_0x4313a2[_0x47aa8e])&&(_0x178a6f=(_0xe98d52<0x3?_0xfc6599(_0x178a6f):_0xe98d52>0x3?_0xfc6599(_0x2ca4e3,_0x4d0a9a,_0x178a6f):_0xfc6599(_0x2ca4e3,_0x4d0a9a))||_0x178a6f);}return _0xe98d52>0x3&&_0x178a6f&&Object[_0x5ed679(0xab)](_0x2ca4e3,_0x4d0a9a,_0x178a6f),_0x178a6f;}let D=class extends _0x254aab{constructor(_0x37d199,_0x5c407d,_0x2bf7c0,_0x138d1d){const _0x56a1be=_0x443cdb;super(),this['_commentService']=_0x37d199,this[_0x56a1be(0x9a)]=_0x5c407d,this[_0x56a1be(0x90)]=_0x2bf7c0,this[_0x56a1be(0x82)]=_0x138d1d,this[_0x56a1be(0xc9)](),this['_initUserSync']();}['_initUserSync'](){const _0x3fa9f3=_0x443cdb;this['disposeWithMe'](this[_0x3fa9f3(0x9a)][_0x3fa9f3(0x8f)][_0x3fa9f3(0x95)](_0x51635e(0x10))[_0x3fa9f3(0x79)](_0x2badcb=>{const _0x1ef24f=_0x3fa9f3;let _0x312d3c=new Set();_0x2badcb[_0x1ef24f(0xc3)](_0x3ee4eb=>{const _0xc2c557=_0x1ef24f;switch(_0x3ee4eb[_0xc2c557(0x98)]){case _0xc2c557(0xa8):{let _0x47a650=_0x3ee4eb['payload'][_0xc2c557(0x87)];_0x312d3c[_0xc2c557(0xa8)](_0x47a650);break;}default:break;}}),w(this[_0x1ef24f(0x82)],_0x312d3c);}));}[_0x443cdb(0xc9)](){const _0x3f84ec=_0x443cdb;this[_0x3f84ec(0x9d)](this[_0x3f84ec(0x84)][_0x3f84ec(0x8f)]['subscribe'](async _0x4ee0a9=>{const _0x45c871=_0x3f84ec;var _0x3118c0;let _0x221b1d=(_0x3118c0=this[_0x45c871(0x9a)][_0x45c871(0x7a)](_0x4ee0a9[_0x45c871(0xc1)])[_0x45c871(0x8c)](_0x48e0e=>_0x48e0e[_0x45c871(0xaa)]===_0x4ee0a9[_0x45c871(0xaa)]))==null?void 0x0:_0x3118c0['root'];if(!_0x221b1d)return;let {unitId:_0x24d8b0,subUnitId:_0x213746}=_0x221b1d;switch(_0x4ee0a9['user']&&this[_0x45c871(0x90)][_0x45c871(0xa1)](_0x4ee0a9[_0x45c871(0xa7)]),_0x4ee0a9[_0x45c871(0x98)]){case _0x2b7aa6[_0x45c871(0x66)]:break;case _0x2b7aa6['Reply']:var _0x9fb08a,_0x3036d7;this[_0x45c871(0x9a)]['addComment'](_0x24d8b0,_0x213746,{'unitId':_0x24d8b0,'subUnitId':_0x213746,'ref':'','id':_0x4ee0a9[_0x45c871(0x69)],'dT':C(+_0x4ee0a9[_0x45c871(0xcd)]),'threadId':_0x4ee0a9[_0x45c871(0xaa)],'personId':(_0x9fb08a=(_0x3036d7=_0x4ee0a9[_0x45c871(0xa7)])==null?void 0x0:_0x3036d7[_0x45c871(0x6a)])==null?_0x4ee0a9['userId']:_0x9fb08a,'text':JSON[_0x45c871(0x8a)](_0x4ee0a9[_0x45c871(0xba)]),'parentId':_0x221b1d['id']});break;case _0x2b7aa6[_0x45c871(0x67)]:{let _0x46b79d=this[_0x45c871(0x9a)]['getComment'](_0x24d8b0,_0x213746,_0x4ee0a9[_0x45c871(0x69)]);_0x46b79d&&_0x46b79d[_0x45c871(0xb1)]&&this[_0x45c871(0x9a)][_0x45c871(0x97)](_0x24d8b0,_0x213746,_0x4ee0a9['replyId']);break;}case _0x2b7aa6['Edit']:this[_0x45c871(0x9a)][_0x45c871(0xbf)](_0x24d8b0,_0x213746,{'commentId':_0x4ee0a9['replyId'],'text':JSON[_0x45c871(0x8a)](_0x4ee0a9['content'])});break;case _0x2b7aa6[_0x45c871(0x92)]:{var _0x53d19b;let _0x558dda=(_0x53d19b=this[_0x45c871(0x9a)][_0x45c871(0x7a)](_0x4ee0a9[_0x45c871(0xc1)])[_0x45c871(0x8c)](_0x4cbd58=>_0x4cbd58['threadId']===_0x4ee0a9[_0x45c871(0xaa)]))==null?void 0x0:_0x53d19b['root'];_0x558dda&&this[_0x45c871(0x9a)][_0x45c871(0xb4)](_0x24d8b0,_0x213746,_0x558dda['id'],_0x4ee0a9[_0x45c871(0x6b)]===_0x463330['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x4ea8b7(_0x17a934)),T(0x1,_0x4ea8b7(_0x53f8fc)),T(0x2,_0x4ea8b7(_0x3c93c8)),T(0x3,_0x4ea8b7(_0x5bc231))],D);const O=_0x443cdb(0x80);Symbol(O);const k={};function A(_0x4e5755,_0x48f161){const _0x5f396e=_0x443cdb;let _0x56cd5d=_0x4e5755[_0x5f396e(0xb7)][0x0];return{..._0x48f161,'id':_0x56cd5d['replyId'],'resolved':_0x4e5755['solved']===0x1,'dT':C(_0x56cd5d[_0x5f396e(0xcd)]),'personId':_0x56cd5d[_0x5f396e(0xb6)],'threadId':_0x56cd5d['threadId']};}function j(_0x313f72,_0x4a9202,_0x407154){const _0x37d8af=_0x443cdb;var _0xcc105a,_0x46f289;if(((_0xcc105a=_0x313f72==null||(_0x46f289=_0x313f72[_0x37d8af(0xb7)])==null?void 0x0:_0x46f289[_0x37d8af(0x70)])==null?0x0:_0xcc105a)>0x0){let _0x545f2e=(_0x5e88c1,_0x2c57b0)=>({'id':_0x5e88c1[_0x37d8af(0x69)],'threadId':_0x5e88c1['threadId'],'dT':C(_0x5e88c1[_0x37d8af(0xcd)]),'personId':_0x5e88c1[_0x37d8af(0xb6)],'resolved':_0x313f72['solved']===_0x463330[_0x37d8af(0xc5)],'unitId':_0x4a9202,'subUnitId':_0x407154,'text':JSON['parse'](_0x5e88c1[_0x37d8af(0xba)]),'parentId':_0x2c57b0}),_0xd2824d=_0x545f2e(_0x313f72[_0x37d8af(0xb7)][0x0]);return{..._0xd2824d,'children':_0x313f72['replies'][_0x37d8af(0x7c)](0x1)[_0x37d8af(0x73)](_0x52ddab=>_0x545f2e(_0x52ddab,_0xd2824d['id']))};}return null;}let M=class{constructor(_0x30f1fd,_0x28ff6e,_0x4bd235){const _0x3e4e95=_0x443cdb;this['_httpService']=_0x30f1fd,this[_0x3e4e95(0x90)]=_0x28ff6e,this[_0x3e4e95(0xac)]=_0x4bd235;}async['addComment'](_0x3961cb){const _0x3451c0=_0x443cdb;var _0x5db400,_0xf99cb1;let {parentId:_0x2c37dc,unitId:_0xd59d1,text:_0x1c5614,threadId:_0x17f011}=_0x3961cb,_0x19cb80=(_0x5db400=(_0xf99cb1=_0x1c5614[_0x3451c0(0xbd)])==null?void 0x0:_0xf99cb1['filter'](_0x3b4b9a=>_0x3b4b9a['rangeType']===_0x2ce30f[_0x3451c0(0xce)])[_0x3451c0(0x73)](_0x3065c8=>_0x3065c8[_0x3451c0(0x74)]))==null?[]:_0x5db400,_0x1b3db5=JSON[_0x3451c0(0xa5)](_0x1c5614),_0x39892a=(await this['_sessionService'][_0x3451c0(0xa2)](_0xd59d1))[_0x3451c0(0x78)]();if(_0x2c37dc){let _0x203b2b={'memberId':_0x39892a,'unitId':_0xd59d1,'content':_0x1b3db5,'mention':_0x19cb80,'threadId':_0x17f011},_0x3ed6df=(await this[_0x3451c0(0xc4)][_0x3451c0(0xb3)](_0x3451c0(0x6d)+_0xd59d1+_0x3451c0(0xca),{'body':_0x203b2b}))[_0x3451c0(0x86)][_0x3451c0(0x7d)];return{..._0x3961cb,'id':_0x3ed6df[_0x3451c0(0x69)],'dT':_0x41bf95(+_0x3ed6df['createTimestamp'])[_0x3451c0(0xbc)](_0x3451c0(0x93)),'personId':_0x3ed6df['userId']};}else{let _0x787d45={'memberId':_0x39892a,'unitId':_0xd59d1,'content':_0x1b3db5,'mention':_0x19cb80};return A((await this['_httpService'][_0x3451c0(0xb3)]('/universer-api/comment/unit/'+_0xd59d1+'/add',{'body':_0x787d45}))[_0x3451c0(0x86)]['comment'],_0x3961cb);}}async[_0x443cdb(0xbf)](_0xd8fbfe){const _0x40359d=_0x443cdb;var _0x237928,_0x316f04;let {text:_0x44c3b9,unitId:_0x22e896}=_0xd8fbfe,_0x42d35d=(_0x237928=(_0x316f04=_0x44c3b9[_0x40359d(0xbd)])==null?void 0x0:_0x316f04[_0x40359d(0x8e)](_0x26986e=>_0x26986e[_0x40359d(0x6f)]===_0x2ce30f[_0x40359d(0xce)])['map'](_0x34c0b5=>_0x34c0b5[_0x40359d(0x74)]))==null?[]:_0x237928,_0x1bdb85=JSON[_0x40359d(0xa5)](_0x44c3b9),_0x48af85=_0xd8fbfe[_0x40359d(0xaa)],_0x486cfd=_0xd8fbfe['id'],_0x578a89={'memberId':(await this[_0x40359d(0xac)][_0x40359d(0xa2)](_0x22e896))['getMemberID'](),'unitId':_0x22e896,'threadId':_0x48af85,'mention':_0x42d35d,'content':_0x1bdb85,'replyId':_0x486cfd},_0x1acb47=await this[_0x40359d(0xc4)][_0x40359d(0xb3)](_0x40359d(0x6d)+_0x22e896+'/edit',{'body':_0x578a89});return!_0x1acb47['body'][_0x40359d(0xc2)]||_0x1acb47[_0x40359d(0x86)]['error'][_0x40359d(0x94)]===0x1;}async[_0x443cdb(0xb4)](_0x2c50bc){const _0x24c5e1=_0x443cdb;let {unitId:_0x4f489e}=_0x2c50bc,_0x3f43cc=_0x2c50bc[_0x24c5e1(0xaa)],_0x108661={'memberId':this[_0x24c5e1(0x90)][_0x24c5e1(0xcb)]()[_0x24c5e1(0x6a)],'unitId':_0x4f489e,'threadId':_0x3f43cc,'solved':_0x2c50bc[_0x24c5e1(0x8b)]?_0x463330[_0x24c5e1(0xc5)]:_0x463330[_0x24c5e1(0x9b)]},_0x5cae7f=await this['_httpService'][_0x24c5e1(0xb3)](_0x24c5e1(0x6d)+_0x4f489e+_0x24c5e1(0x77),{'body':_0x108661});return!_0x5cae7f[_0x24c5e1(0x86)][_0x24c5e1(0xc2)]||_0x5cae7f[_0x24c5e1(0x86)][_0x24c5e1(0xc2)][_0x24c5e1(0x94)]===0x1;}async['deleteComment'](_0x15a7ad,_0xb2fc88,_0x23fba3,_0x24a802){const _0x359966=_0x443cdb;let _0x16c4aa={'memberId':(await this[_0x359966(0xac)][_0x359966(0xa2)](_0x15a7ad))[_0x359966(0x78)](),'threadId':_0x23fba3,'replyId':_0x24a802,'unitId':_0x15a7ad},_0x1ad066=await this[_0x359966(0xc4)][_0x359966(0xb3)](_0x359966(0x6d)+_0x15a7ad+_0x359966(0xa3),{'body':_0x16c4aa});return!_0x1ad066[_0x359966(0x86)][_0x359966(0xc2)]||_0x1ad066[_0x359966(0x86)][_0x359966(0xc2)][_0x359966(0x94)]===0x1;}async[_0x443cdb(0xae)](_0x32e8a3,_0xa64be7,_0xdc33a6){const _0x214701=_0x443cdb;let _0x11052e={'unitId':_0x32e8a3,'threadId':_0xdc33a6},_0x1580cb=await this['_httpService'][_0x214701(0xb3)](_0x214701(0x6d)+_0x32e8a3+_0x214701(0xb0),{'body':_0x11052e}),_0x477b67=_0xdc33a6[_0x214701(0x73)](_0x4b83e6=>j(_0x1580cb[_0x214701(0x86)]['comments'][_0x4b83e6],_0x32e8a3,_0xa64be7))[_0x214701(0x8e)](Boolean);return Object['values'](_0x1580cb[_0x214701(0x86)][_0x214701(0x85)])[_0x214701(0xc3)](_0x1e97e5=>{const _0x1f15e5=_0x214701;this[_0x1f15e5(0x90)]['addUser'](_0x1e97e5);}),_0x477b67;}['saveCommentToSnapshot'](_0x3419f2){const _0x511057=_0x443cdb;return{'id':_0x3419f2['id'],'threadId':_0x3419f2[_0x511057(0xaa)],'ref':_0x3419f2[_0x511057(0xcc)]};}};M=E([T(0x0,_0x4ea8b7(_0x52ac61)),T(0x1,_0x4ea8b7(_0x3c93c8)),T(0x2,_0x4ea8b7(_0x35863e))],M);let N=class extends _0x254aab{constructor(_0x43585b,_0x37dfe3){const _0x3ce1e6=_0x443cdb;super(),this[_0x3ce1e6(0x89)]=_0x43585b,this[_0x3ce1e6(0x96)]=_0x37dfe3,this[_0x3ce1e6(0x7b)]();}[_0x443cdb(0x7b)](){const _0x4cd076=_0x443cdb;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x4cd076(0x89)][_0x4cd076(0x68)]=!0x1;}};N=E([T(0x0,_0x3a855d),T(0x1,_0x4ea8b7(M))],N);function P(_0x3e2b68){'@babel/helpers - typeof';const _0x39aaeb=_0x443cdb;return P=typeof Symbol==_0x39aaeb(0xa6)&&typeof Symbol[_0x39aaeb(0xaf)]==_0x39aaeb(0xc6)?function(_0x588fc9){return typeof _0x588fc9;}:function(_0x38dfce){const _0x117632=_0x39aaeb;return _0x38dfce&&typeof Symbol==_0x117632(0xa6)&&_0x38dfce[_0x117632(0x8d)]===Symbol&&_0x38dfce!==Symbol[_0x117632(0x81)]?_0x117632(0xc6):typeof _0x38dfce;},P(_0x3e2b68);}function F(_0x7cec6b,_0x5af9a4){const _0x1fa34d=_0x443cdb;if(P(_0x7cec6b)!='object'||!_0x7cec6b)return _0x7cec6b;var _0x1d6e01=_0x7cec6b[Symbol[_0x1fa34d(0xbe)]];if(_0x1d6e01!==void 0x0){var _0x2e0881=_0x1d6e01['call'](_0x7cec6b,_0x5af9a4||_0x1fa34d(0x7f));if(P(_0x2e0881)!='object')return _0x2e0881;throw TypeError(_0x1fa34d(0x9e));}return(_0x5af9a4==='string'?String:Number)(_0x7cec6b);}function I(_0x323bcf){const _0x3fdc63=_0x443cdb;var _0x531ab8=F(_0x323bcf,_0x3fdc63(0xc0));return P(_0x531ab8)=='symbol'?_0x531ab8:_0x531ab8+'';}function L(_0x48cde3,_0x38ce34,_0x336341){const _0x2c8b93=_0x443cdb;return(_0x38ce34=I(_0x38ce34))in _0x48cde3?Object[_0x2c8b93(0xab)](_0x48cde3,_0x38ce34,{'value':_0x336341,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x48cde3[_0x38ce34]=_0x336341,_0x48cde3;}let R=class extends _0x53ad5d{constructor(_0xad1c99=k,_0x4762cb,_0x2f3869){const _0x5ed0d2=_0x443cdb;super(),this[_0x5ed0d2(0xb5)]=_0xad1c99,this['_injector']=_0x4762cb,this['_configService']=_0x2f3869;let {..._0x2456f1}=_0x33f364({},k,this[_0x5ed0d2(0xb5)]);this['_configService'][_0x5ed0d2(0xc8)](O,_0x2456f1);}['onStarting'](){[[M],[N],[D]]['forEach'](_0x9ccefb=>{const _0x3998c5=_0x7314;this[_0x3998c5(0x82)][_0x3998c5(0xa8)](_0x9ccefb);});}[_0x443cdb(0xb9)](){const _0xd24beb=_0x443cdb;this[_0xd24beb(0x82)][_0xd24beb(0xa9)](N),this[_0xd24beb(0x82)][_0xd24beb(0xa9)](D);}};L(R,'pluginName',_0x443cdb(0x7e)),L(R,_0x443cdb(0x9c),x),L(R,'version',S),R=E([_0x3f8556(_0x3a2e03,_0x446d41,_0x4223a1),T(0x1,_0x4ea8b7(_0x5bc231)),T(0x2,_0xbae266)],R);export{R as UniverThreadCommentDataSourcePlugin};function _0x304c(){const _0x2c6211=['rangeId','4965400ahevTA','0.20.1','/solved','getMemberID','subscribe','getUnit','_initDataSource','slice','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','default','thread-comment-data-source.config','prototype','_injector','3861285ImfZFM','_commentService','users','body','personId','7ASveIN','_threadCommentDataSourceService','parse','resolved','find','constructor','filter','commentUpdate$','_userService','6PDNDZy','Solve','YYYY/MM/DD\x20HH:mm','code','pipe','_threadCommentDataSource','deleteComment','type','68QIohol','_threadCommentModel','OpenOrReOpen','packageName','disposeWithMe','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getOwnPropertyDescriptor','/universer-api/user/list','addUser','requireSession','/delete','191750okBDgS','stringify','function','user','add','get','threadId','defineProperty','_sessionService','159342HkFgZt','listComments','iterator','/list','parentId','20400708BaFXOJ','post','resolveComment','_config','userId','replies','94536fmIMjr','onReady','content','11hLXIJB','format','customRanges','toPrimitive','updateComment','string','unitId','error','forEach','_httpService','Solved','symbol','decorate','setConfig','_init','/reply','getCurrentUser','ref','createTimestamp','COMMENT','Add','Delete','syncUpdateMutationToColla','replyId','userID','solved','delete','/universer-api/comment/unit/','1370LOyRuk','rangeType','length','3105418ZRYQeK','@univerjs-pro/thread-comment-datasource','map'];_0x304c=function(){return _0x2c6211;};return _0x304c();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4a3c9a=_0xd81a;(function(_0x166e5f,_0x543c04){const _0x9ba6c8=_0xd81a,_0x2c6031=_0x166e5f();while(!![]){try{const _0x39fad9=parseInt(_0x9ba6c8(0x1d0))/0x1*(-parseInt(_0x9ba6c8(0x230))/0x2)+parseInt(_0x9ba6c8(0x205))/0x3+-parseInt(_0x9ba6c8(0x1fe))/0x4*(-parseInt(_0x9ba6c8(0x221))/0x5)+-parseInt(_0x9ba6c8(0x1d7))/0x6*(-parseInt(_0x9ba6c8(0x220))/0x7)+-parseInt(_0x9ba6c8(0x22a))/0x8+-parseInt(_0x9ba6c8(0x207))/0x9+-parseInt(_0x9ba6c8(0x1ee))/0xa*(-parseInt(_0x9ba6c8(0x200))/0xb);if(_0x39fad9===_0x543c04)break;else _0x2c6031['push'](_0x2c6031['shift']());}catch(_0x24d210){_0x2c6031['push'](_0x2c6031['shift']());}}}(_0x7d69,0xdc20a));function _0xd81a(_0x4b9f74,_0x351e1d){_0x4b9f74=_0x4b9f74-0x1cd;const _0x7d6946=_0x7d69();let _0xd81a7a=_0x7d6946[_0x4b9f74];return _0xd81a7a;}import{CollaborationSessionService as _0x1dfa69,CommentService as _0x2985f0,UniverCollaborationClientPlugin as _0xa60d66}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2f35d1}from'@univerjs-pro/license';import{CustomRangeType as _0x4c52d2,DependentOn as _0x3f45f6,Disposable as _0x4ef94e,IConfigService as _0x21f34e,Inject as _0x5eaa2a,Injector as _0x2f5371,Plugin as _0x226b65,UserManagerService as _0x4a077a,dateKit as _0x9de1f6,merge as _0x26220a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2fd18a}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x59a7b4,CommentUpdateEventType as _0x1fad40}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x33df62,ThreadCommentModel as _0x46bc71}from'@univerjs/thread-comment';import{bufferTime as _0x3c2718}from'rxjs';import{HTTPService as _0xdcde9f}from'@univerjs/network';var x=_0x4a3c9a(0x1e1),S=_0x4a3c9a(0x222);const C=_0x19cd1d=>_0x9de1f6(new Date(+_0x19cd1d))[_0x4a3c9a(0x21f)](_0x4a3c9a(0x215)),w=async(_0x3ae556,_0x462835)=>{const _0x5226af=_0x4a3c9a;let _0x4cf02d=_0x3ae556[_0x5226af(0x1fd)](_0x4a077a),_0x4dd646=_0x3ae556[_0x5226af(0x1fd)](_0xdcde9f);_0x462835[_0x5226af(0x1fc)](_0x156f66=>{const _0x404755=_0x5226af;_0x4cf02d[_0x404755(0x22b)](_0x156f66)&&_0x462835[_0x404755(0x225)](_0x156f66);}),_0x462835[_0x5226af(0x1d9)]&&(await _0x4dd646['get'](_0x5226af(0x1df),{'params':{'userIDs':[..._0x462835]}}))[_0x5226af(0x1d1)][_0x5226af(0x239)][_0x5226af(0x1fc)](_0x430083=>{_0x430083&&_0x4cf02d['addUser'](_0x430083);});};function T(_0x28628c,_0x5419fc){return function(_0x457b6e,_0x3f186f){_0x5419fc(_0x457b6e,_0x3f186f,_0x28628c);};}function E(_0x20c7c1,_0x28f14e,_0x44ea40,_0x3d830c){const _0x5bbdc8=_0x4a3c9a;var _0x1da066=arguments[_0x5bbdc8(0x1f1)],_0x12e60c=_0x1da066<0x3?_0x28f14e:_0x3d830c===null?_0x3d830c=Object[_0x5bbdc8(0x233)](_0x28f14e,_0x44ea40):_0x3d830c,_0x5061be;if(typeof Reflect==_0x5bbdc8(0x214)&&typeof Reflect[_0x5bbdc8(0x1e3)]=='function')_0x12e60c=Reflect[_0x5bbdc8(0x1e3)](_0x20c7c1,_0x28f14e,_0x44ea40,_0x3d830c);else{for(var _0x489e52=_0x20c7c1[_0x5bbdc8(0x1f1)]-0x1;_0x489e52>=0x0;_0x489e52--)(_0x5061be=_0x20c7c1[_0x489e52])&&(_0x12e60c=(_0x1da066<0x3?_0x5061be(_0x12e60c):_0x1da066>0x3?_0x5061be(_0x28f14e,_0x44ea40,_0x12e60c):_0x5061be(_0x28f14e,_0x44ea40))||_0x12e60c);}return _0x1da066>0x3&&_0x12e60c&&Object[_0x5bbdc8(0x1eb)](_0x28f14e,_0x44ea40,_0x12e60c),_0x12e60c;}function _0x7d69(){const _0x57c650=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','/list','getCurrentUser','filter','replies','user','getMemberID','listComments','values','resolved','object','YYYY/MM/DD\x20HH:mm','/add','OpenOrReOpen','setConfig','toPrimitive','content','customRanges','syncUpdateMutationToColla','_config','string','format','98UtuvRa','25QGqFqP','0.20.0-insiders.20260411-27a8c24','/delete','pluginName','delete','replyId','/reply','subscribe','function','11865368ijgPhP','getUser','requireSession','payload','_threadCommentDataSourceService','/universer-api/comment/unit/','2RLGHwq','post','default','getOwnPropertyDescriptor','call','commentUpdate$','/solved','_init','error','users','_injector','rangeType','userId','map','870613ouIZHR','body','addUser','disposeWithMe','unitId','_threadCommentModel','_userService','501780GfgRih','Solve','size','personId','rangeId','_sessionService','_initUserSync','saveCommentToSnapshot','/universer-api/user/list','solved','@univerjs-pro/thread-comment-datasource','Solved','decorate','_commentService','userID','resolveComment','Add','stringify','comments','find','defineProperty','version','type','20LiHlyF','getUnit','Edit','length','constructor','createTimestamp','_configService','root','threadId','pipe','getComment','_httpService','slice','comment','forEach','get','737268QnsRax','deleteComment','5220534TmzgOZ','onReady','add','_initDataSource','code','1695474iyHbyb','updateComment','3161925OiwGoI','parse'];_0x7d69=function(){return _0x57c650;};return _0x7d69();}let D=class extends _0x4ef94e{constructor(_0x3f9d0d,_0x1b547b,_0x3854cf,_0x221568){const _0x24b7ff=_0x4a3c9a;super(),this[_0x24b7ff(0x1e4)]=_0x3f9d0d,this[_0x24b7ff(0x1d5)]=_0x1b547b,this['_userService']=_0x3854cf,this[_0x24b7ff(0x23a)]=_0x221568,this[_0x24b7ff(0x237)](),this[_0x24b7ff(0x1dd)]();}[_0x4a3c9a(0x1dd)](){const _0x2abc28=_0x4a3c9a;this[_0x2abc28(0x1d3)](this[_0x2abc28(0x1d5)]['commentUpdate$'][_0x2abc28(0x1f7)](_0x3c2718(0x10))[_0x2abc28(0x228)](_0x541658=>{const _0x126413=_0x2abc28;let _0x190444=new Set();_0x541658[_0x126413(0x1fc)](_0x3b8177=>{const _0x3c4f20=_0x126413;switch(_0x3b8177[_0x3c4f20(0x1ed)]){case _0x3c4f20(0x202):{let _0x2420c6=_0x3b8177[_0x3c4f20(0x22d)][_0x3c4f20(0x1da)];_0x190444['add'](_0x2420c6);break;}default:break;}}),w(this[_0x126413(0x23a)],_0x190444);}));}[_0x4a3c9a(0x237)](){const _0x2416d2=_0x4a3c9a;this[_0x2416d2(0x1d3)](this[_0x2416d2(0x1e4)][_0x2416d2(0x235)]['subscribe'](async _0x127214=>{const _0x2fba7e=_0x2416d2;var _0x525d22;let _0x5c4f0d=(_0x525d22=this['_threadCommentModel'][_0x2fba7e(0x1ef)](_0x127214[_0x2fba7e(0x1d4)])[_0x2fba7e(0x1ea)](_0xe5dfd4=>_0xe5dfd4['threadId']===_0x127214[_0x2fba7e(0x1f6)]))==null?void 0x0:_0x525d22[_0x2fba7e(0x1f5)];if(!_0x5c4f0d)return;let {unitId:_0x3e91f4,subUnitId:_0x13f0fb}=_0x5c4f0d;switch(_0x127214[_0x2fba7e(0x20f)]&&this[_0x2fba7e(0x1d6)][_0x2fba7e(0x1d2)](_0x127214[_0x2fba7e(0x20f)]),_0x127214[_0x2fba7e(0x1ed)]){case _0x1fad40[_0x2fba7e(0x1e7)]:break;case _0x1fad40['Reply']:var _0x5f3f52,_0xb88abb;this['_threadCommentModel']['addComment'](_0x3e91f4,_0x13f0fb,{'unitId':_0x3e91f4,'subUnitId':_0x13f0fb,'ref':'','id':_0x127214['replyId'],'dT':C(+_0x127214[_0x2fba7e(0x1f3)]),'threadId':_0x127214[_0x2fba7e(0x1f6)],'personId':(_0x5f3f52=(_0xb88abb=_0x127214[_0x2fba7e(0x20f)])==null?void 0x0:_0xb88abb['userID'])==null?_0x127214[_0x2fba7e(0x1ce)]:_0x5f3f52,'text':JSON[_0x2fba7e(0x208)](_0x127214[_0x2fba7e(0x21a)]),'parentId':_0x5c4f0d['id']});break;case _0x1fad40['Delete']:{let _0x3e81d4=this[_0x2fba7e(0x1d5)][_0x2fba7e(0x1f8)](_0x3e91f4,_0x13f0fb,_0x127214[_0x2fba7e(0x226)]);_0x3e81d4&&_0x3e81d4['parentId']&&this[_0x2fba7e(0x1d5)][_0x2fba7e(0x1ff)](_0x3e91f4,_0x13f0fb,_0x127214[_0x2fba7e(0x226)]);break;}case _0x1fad40[_0x2fba7e(0x1f0)]:this[_0x2fba7e(0x1d5)][_0x2fba7e(0x206)](_0x3e91f4,_0x13f0fb,{'commentId':_0x127214[_0x2fba7e(0x226)],'text':JSON['parse'](_0x127214[_0x2fba7e(0x21a)])});break;case _0x1fad40[_0x2fba7e(0x1d8)]:{var _0x1b4083;let _0x5e793a=(_0x1b4083=this[_0x2fba7e(0x1d5)]['getUnit'](_0x127214[_0x2fba7e(0x1d4)])['find'](_0xf9b640=>_0xf9b640[_0x2fba7e(0x1f6)]===_0x127214[_0x2fba7e(0x1f6)]))==null?void 0x0:_0x1b4083['root'];_0x5e793a&&this['_threadCommentModel'][_0x2fba7e(0x1e6)](_0x3e91f4,_0x13f0fb,_0x5e793a['id'],_0x127214[_0x2fba7e(0x1e0)]===_0x59a7b4[_0x2fba7e(0x1e2)]);break;}default:break;}}));}};D=E([T(0x0,_0x5eaa2a(_0x2985f0)),T(0x1,_0x5eaa2a(_0x46bc71)),T(0x2,_0x5eaa2a(_0x4a077a)),T(0x3,_0x5eaa2a(_0x2f5371))],D);const O='thread-comment-data-source.config';Symbol(O);const k={};function A(_0xf78244,_0x59966b){const _0x262ce9=_0x4a3c9a;let _0x460049=_0xf78244[_0x262ce9(0x20e)][0x0];return{..._0x59966b,'id':_0x460049['replyId'],'resolved':_0xf78244['solved']===0x1,'dT':C(_0x460049[_0x262ce9(0x1f3)]),'personId':_0x460049[_0x262ce9(0x1ce)],'threadId':_0x460049['threadId']};}function j(_0x4ecb88,_0x348124,_0x267d3c){const _0x3f021c=_0x4a3c9a;var _0x2c1910,_0xfd336f;if(((_0x2c1910=_0x4ecb88==null||(_0xfd336f=_0x4ecb88['replies'])==null?void 0x0:_0xfd336f['length'])==null?0x0:_0x2c1910)>0x0){let _0x5ce29b=(_0x28b727,_0xa819bc)=>({'id':_0x28b727['replyId'],'threadId':_0x28b727['threadId'],'dT':C(_0x28b727[_0x3f021c(0x1f3)]),'personId':_0x28b727[_0x3f021c(0x1ce)],'resolved':_0x4ecb88['solved']===_0x59a7b4['Solved'],'unitId':_0x348124,'subUnitId':_0x267d3c,'text':JSON['parse'](_0x28b727['content']),'parentId':_0xa819bc}),_0x5b51e3=_0x5ce29b(_0x4ecb88['replies'][0x0]);return{..._0x5b51e3,'children':_0x4ecb88[_0x3f021c(0x20e)][_0x3f021c(0x1fa)](0x1)[_0x3f021c(0x1cf)](_0x4a8b44=>_0x5ce29b(_0x4a8b44,_0x5b51e3['id']))};}return null;}let M=class{constructor(_0xb23846,_0x571d35,_0x563a9c){const _0x1e8597=_0x4a3c9a;this[_0x1e8597(0x1f9)]=_0xb23846,this[_0x1e8597(0x1d6)]=_0x571d35,this[_0x1e8597(0x1dc)]=_0x563a9c;}async['addComment'](_0x3c51db){const _0x45cacc=_0x4a3c9a;var _0x370860,_0x204922;let {parentId:_0x471d84,unitId:_0x47ea9f,text:_0x3a948c,threadId:_0x516234}=_0x3c51db,_0x1c3171=(_0x370860=(_0x204922=_0x3a948c[_0x45cacc(0x21b)])==null?void 0x0:_0x204922[_0x45cacc(0x20d)](_0xedbad=>_0xedbad[_0x45cacc(0x1cd)]===_0x4c52d2['COMMENT'])[_0x45cacc(0x1cf)](_0x294a86=>_0x294a86[_0x45cacc(0x1db)]))==null?[]:_0x370860,_0xab2033=JSON[_0x45cacc(0x1e8)](_0x3a948c),_0x50c4b3=(await this[_0x45cacc(0x1dc)][_0x45cacc(0x22c)](_0x47ea9f))[_0x45cacc(0x210)]();if(_0x471d84){let _0x1e1002={'memberId':_0x50c4b3,'unitId':_0x47ea9f,'content':_0xab2033,'mention':_0x1c3171,'threadId':_0x516234},_0x4ada6a=(await this[_0x45cacc(0x1f9)][_0x45cacc(0x231)](_0x45cacc(0x22f)+_0x47ea9f+_0x45cacc(0x227),{'body':_0x1e1002}))[_0x45cacc(0x1d1)]['reply'];return{..._0x3c51db,'id':_0x4ada6a[_0x45cacc(0x226)],'dT':_0x9de1f6(+_0x4ada6a[_0x45cacc(0x1f3)])[_0x45cacc(0x21f)](_0x45cacc(0x215)),'personId':_0x4ada6a['userId']};}else{let _0x1c30c6={'memberId':_0x50c4b3,'unitId':_0x47ea9f,'content':_0xab2033,'mention':_0x1c3171};return A((await this['_httpService']['post'](_0x45cacc(0x22f)+_0x47ea9f+_0x45cacc(0x216),{'body':_0x1c30c6}))[_0x45cacc(0x1d1)][_0x45cacc(0x1fb)],_0x3c51db);}}async[_0x4a3c9a(0x206)](_0x1be88e){const _0x194fb2=_0x4a3c9a;var _0x4a957a,_0x391e5c;let {text:_0x7f5298,unitId:_0x1bfffc}=_0x1be88e,_0x5400d4=(_0x4a957a=(_0x391e5c=_0x7f5298[_0x194fb2(0x21b)])==null?void 0x0:_0x391e5c[_0x194fb2(0x20d)](_0x357ac3=>_0x357ac3['rangeType']===_0x4c52d2['COMMENT'])[_0x194fb2(0x1cf)](_0x69db74=>_0x69db74[_0x194fb2(0x1db)]))==null?[]:_0x4a957a,_0x29ae3c=JSON[_0x194fb2(0x1e8)](_0x7f5298),_0x5b90a0=_0x1be88e[_0x194fb2(0x1f6)],_0xc171b6=_0x1be88e['id'],_0x31ee94={'memberId':(await this[_0x194fb2(0x1dc)][_0x194fb2(0x22c)](_0x1bfffc))[_0x194fb2(0x210)](),'unitId':_0x1bfffc,'threadId':_0x5b90a0,'mention':_0x5400d4,'content':_0x29ae3c,'replyId':_0xc171b6},_0x45be61=await this[_0x194fb2(0x1f9)][_0x194fb2(0x231)]('/universer-api/comment/unit/'+_0x1bfffc+'/edit',{'body':_0x31ee94});return!_0x45be61['body']['error']||_0x45be61[_0x194fb2(0x1d1)]['error'][_0x194fb2(0x204)]===0x1;}async['resolveComment'](_0x243c24){const _0x1372de=_0x4a3c9a;let {unitId:_0x1a6935}=_0x243c24,_0x890173=_0x243c24['threadId'],_0x1833b1={'memberId':this[_0x1372de(0x1d6)][_0x1372de(0x20c)]()[_0x1372de(0x1e5)],'unitId':_0x1a6935,'threadId':_0x890173,'solved':_0x243c24[_0x1372de(0x213)]?_0x59a7b4['Solved']:_0x59a7b4[_0x1372de(0x217)]},_0x4ee626=await this[_0x1372de(0x1f9)][_0x1372de(0x231)]('/universer-api/comment/unit/'+_0x1a6935+_0x1372de(0x236),{'body':_0x1833b1});return!_0x4ee626[_0x1372de(0x1d1)]['error']||_0x4ee626[_0x1372de(0x1d1)][_0x1372de(0x238)][_0x1372de(0x204)]===0x1;}async[_0x4a3c9a(0x1ff)](_0xc446e0,_0x571a03,_0x294270,_0x22d77b){const _0x9ff3d1=_0x4a3c9a;let _0x20c49e={'memberId':(await this[_0x9ff3d1(0x1dc)][_0x9ff3d1(0x22c)](_0xc446e0))['getMemberID'](),'threadId':_0x294270,'replyId':_0x22d77b,'unitId':_0xc446e0},_0x320d34=await this[_0x9ff3d1(0x1f9)][_0x9ff3d1(0x231)](_0x9ff3d1(0x22f)+_0xc446e0+_0x9ff3d1(0x223),{'body':_0x20c49e});return!_0x320d34['body'][_0x9ff3d1(0x238)]||_0x320d34[_0x9ff3d1(0x1d1)][_0x9ff3d1(0x238)]['code']===0x1;}async[_0x4a3c9a(0x211)](_0x5115be,_0x560b05,_0x136b02){const _0x16765c=_0x4a3c9a;let _0x2511da={'unitId':_0x5115be,'threadId':_0x136b02},_0x45718a=await this[_0x16765c(0x1f9)]['post'](_0x16765c(0x22f)+_0x5115be+_0x16765c(0x20b),{'body':_0x2511da}),_0x5de90d=_0x136b02[_0x16765c(0x1cf)](_0x12b921=>j(_0x45718a[_0x16765c(0x1d1)][_0x16765c(0x1e9)][_0x12b921],_0x5115be,_0x560b05))[_0x16765c(0x20d)](Boolean);return Object[_0x16765c(0x212)](_0x45718a[_0x16765c(0x1d1)]['users'])[_0x16765c(0x1fc)](_0x3c131a=>{const _0xa03308=_0x16765c;this['_userService'][_0xa03308(0x1d2)](_0x3c131a);}),_0x5de90d;}[_0x4a3c9a(0x1de)](_0x4a6695){const _0x2b55f1=_0x4a3c9a;return{'id':_0x4a6695['id'],'threadId':_0x4a6695[_0x2b55f1(0x1f6)],'ref':_0x4a6695['ref']};}};M=E([T(0x0,_0x5eaa2a(_0xdcde9f)),T(0x1,_0x5eaa2a(_0x4a077a)),T(0x2,_0x5eaa2a(_0x1dfa69))],M);let N=class extends _0x4ef94e{constructor(_0xd8502d,_0x2eeafd){const _0x364b64=_0x4a3c9a;super(),this[_0x364b64(0x22e)]=_0xd8502d,this['_threadCommentDataSource']=_0x2eeafd,this[_0x364b64(0x203)]();}[_0x4a3c9a(0x203)](){const _0x308607=_0x4a3c9a;this[_0x308607(0x22e)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x308607(0x21c)]=!0x1;}};N=E([T(0x0,_0x33df62),T(0x1,_0x5eaa2a(M))],N);function P(_0x373025){'@babel/helpers - typeof';const _0x820a02=_0x4a3c9a;return P=typeof Symbol==_0x820a02(0x229)&&typeof Symbol['iterator']=='symbol'?function(_0x1ab59b){return typeof _0x1ab59b;}:function(_0x57a15d){const _0x1644ec=_0x820a02;return _0x57a15d&&typeof Symbol=='function'&&_0x57a15d[_0x1644ec(0x1f2)]===Symbol&&_0x57a15d!==Symbol['prototype']?_0x1644ec(0x20a):typeof _0x57a15d;},P(_0x373025);}function F(_0x21f91c,_0x5de5ae){const _0x31d0c2=_0x4a3c9a;if(P(_0x21f91c)!=_0x31d0c2(0x214)||!_0x21f91c)return _0x21f91c;var _0xce75df=_0x21f91c[Symbol[_0x31d0c2(0x219)]];if(_0xce75df!==void 0x0){var _0x33df1e=_0xce75df[_0x31d0c2(0x234)](_0x21f91c,_0x5de5ae||_0x31d0c2(0x232));if(P(_0x33df1e)!=_0x31d0c2(0x214))return _0x33df1e;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5de5ae===_0x31d0c2(0x21e)?String:Number)(_0x21f91c);}function I(_0x4e31d7){var _0x5bd5bb=F(_0x4e31d7,'string');return P(_0x5bd5bb)=='symbol'?_0x5bd5bb:_0x5bd5bb+'';}function L(_0x37130f,_0x429080,_0x3309f9){const _0x4de57e=_0x4a3c9a;return(_0x429080=I(_0x429080))in _0x37130f?Object[_0x4de57e(0x1eb)](_0x37130f,_0x429080,{'value':_0x3309f9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x37130f[_0x429080]=_0x3309f9,_0x37130f;}let R=class extends _0x226b65{constructor(_0xbccaa5=k,_0x548d4c,_0x3bfa2e){const _0x22c1b9=_0x4a3c9a;super(),this[_0x22c1b9(0x21d)]=_0xbccaa5,this[_0x22c1b9(0x23a)]=_0x548d4c,this[_0x22c1b9(0x1f4)]=_0x3bfa2e;let {..._0x3e5805}=_0x26220a({},k,this[_0x22c1b9(0x21d)]);this[_0x22c1b9(0x1f4)][_0x22c1b9(0x218)](O,_0x3e5805);}['onStarting'](){const _0x2c40b=_0x4a3c9a;[[M],[N],[D]][_0x2c40b(0x1fc)](_0x101e8e=>{const _0x3d1ce9=_0x2c40b;this[_0x3d1ce9(0x23a)][_0x3d1ce9(0x202)](_0x101e8e);});}[_0x4a3c9a(0x201)](){const _0x24dcf6=_0x4a3c9a;this[_0x24dcf6(0x23a)][_0x24dcf6(0x1fd)](N),this['_injector'][_0x24dcf6(0x1fd)](D);}};L(R,_0x4a3c9a(0x224),_0x4a3c9a(0x209)),L(R,'packageName',x),L(R,_0x4a3c9a(0x1ec),S),R=E([_0x3f45f6(_0x2fd18a,_0xa60d66,_0x2f35d1),T(0x1,_0x5eaa2a(_0x2f5371)),T(0x2,_0x21f34e)],R);export{R as UniverThreadCommentDataSourcePlugin};
1
+ const _0x443cdb=_0x7314;(function(_0x328f1a,_0x108fca){const _0x49adf0=_0x7314,_0x36b649=_0x328f1a();while(!![]){try{const _0x58839e=-parseInt(_0x49adf0(0xa4))/0x1+-parseInt(_0x49adf0(0x71))/0x2+-parseInt(_0x49adf0(0xad))/0x3*(-parseInt(_0x49adf0(0x99))/0x4)+parseInt(_0x49adf0(0x83))/0x5*(-parseInt(_0x49adf0(0x91))/0x6)+parseInt(_0x49adf0(0x88))/0x7*(-parseInt(_0x49adf0(0x75))/0x8)+parseInt(_0x49adf0(0xb8))/0x9*(parseInt(_0x49adf0(0x6e))/0xa)+parseInt(_0x49adf0(0xbb))/0xb*(parseInt(_0x49adf0(0xb2))/0xc);if(_0x58839e===_0x108fca)break;else _0x36b649['push'](_0x36b649['shift']());}catch(_0x412756){_0x36b649['push'](_0x36b649['shift']());}}}(_0x304c,0xdcdce));import{CollaborationSessionService as _0x35863e,CommentService as _0x17a934,UniverCollaborationClientPlugin as _0x446d41}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4223a1}from'@univerjs-pro/license';import{CustomRangeType as _0x2ce30f,DependentOn as _0x3f8556,Disposable as _0x254aab,IConfigService as _0xbae266,Inject as _0x4ea8b7,Injector as _0x5bc231,Plugin as _0x53ad5d,UserManagerService as _0x3c93c8,dateKit as _0x41bf95,merge as _0x33f364}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2e03}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x463330,CommentUpdateEventType as _0x2b7aa6}from'@univerjs/protocol';function _0x7314(_0x5352b7,_0x3fc3be){_0x5352b7=_0x5352b7-0x66;const _0x304cf6=_0x304c();let _0x7314bb=_0x304cf6[_0x5352b7];return _0x7314bb;}import{IThreadCommentDataSourceService as _0x3a855d,ThreadCommentModel as _0x53f8fc}from'@univerjs/thread-comment';import{bufferTime as _0x51635e}from'rxjs';import{HTTPService as _0x52ac61}from'@univerjs/network';var x=_0x443cdb(0x72),S=_0x443cdb(0x76);const C=_0x35f573=>_0x41bf95(new Date(+_0x35f573))['format']('YYYY/MM/DD\x20HH:mm'),w=async(_0x47ac5b,_0x2ad46c)=>{const _0x126736=_0x443cdb;let _0x1a42cf=_0x47ac5b[_0x126736(0xa9)](_0x3c93c8),_0x47981f=_0x47ac5b[_0x126736(0xa9)](_0x52ac61);_0x2ad46c[_0x126736(0xc3)](_0x4dd7d2=>{const _0x358728=_0x126736;_0x1a42cf['getUser'](_0x4dd7d2)&&_0x2ad46c[_0x358728(0x6c)](_0x4dd7d2);}),_0x2ad46c['size']&&(await _0x47981f['get'](_0x126736(0xa0),{'params':{'userIDs':[..._0x2ad46c]}}))[_0x126736(0x86)][_0x126736(0x85)]['forEach'](_0x3ddea1=>{const _0xc4f814=_0x126736;_0x3ddea1&&_0x1a42cf[_0xc4f814(0xa1)](_0x3ddea1);});};function T(_0x15658a,_0xb6c25c){return function(_0x5bcbe8,_0x8aea52){_0xb6c25c(_0x5bcbe8,_0x8aea52,_0x15658a);};}function E(_0x4313a2,_0x2ca4e3,_0x4d0a9a,_0x5bdc5f){const _0x5ed679=_0x443cdb;var _0xe98d52=arguments[_0x5ed679(0x70)],_0x178a6f=_0xe98d52<0x3?_0x2ca4e3:_0x5bdc5f===null?_0x5bdc5f=Object[_0x5ed679(0x9f)](_0x2ca4e3,_0x4d0a9a):_0x5bdc5f,_0xfc6599;if(typeof Reflect=='object'&&typeof Reflect[_0x5ed679(0xc7)]==_0x5ed679(0xa6))_0x178a6f=Reflect[_0x5ed679(0xc7)](_0x4313a2,_0x2ca4e3,_0x4d0a9a,_0x5bdc5f);else{for(var _0x47aa8e=_0x4313a2[_0x5ed679(0x70)]-0x1;_0x47aa8e>=0x0;_0x47aa8e--)(_0xfc6599=_0x4313a2[_0x47aa8e])&&(_0x178a6f=(_0xe98d52<0x3?_0xfc6599(_0x178a6f):_0xe98d52>0x3?_0xfc6599(_0x2ca4e3,_0x4d0a9a,_0x178a6f):_0xfc6599(_0x2ca4e3,_0x4d0a9a))||_0x178a6f);}return _0xe98d52>0x3&&_0x178a6f&&Object[_0x5ed679(0xab)](_0x2ca4e3,_0x4d0a9a,_0x178a6f),_0x178a6f;}let D=class extends _0x254aab{constructor(_0x37d199,_0x5c407d,_0x2bf7c0,_0x138d1d){const _0x56a1be=_0x443cdb;super(),this['_commentService']=_0x37d199,this[_0x56a1be(0x9a)]=_0x5c407d,this[_0x56a1be(0x90)]=_0x2bf7c0,this[_0x56a1be(0x82)]=_0x138d1d,this[_0x56a1be(0xc9)](),this['_initUserSync']();}['_initUserSync'](){const _0x3fa9f3=_0x443cdb;this['disposeWithMe'](this[_0x3fa9f3(0x9a)][_0x3fa9f3(0x8f)][_0x3fa9f3(0x95)](_0x51635e(0x10))[_0x3fa9f3(0x79)](_0x2badcb=>{const _0x1ef24f=_0x3fa9f3;let _0x312d3c=new Set();_0x2badcb[_0x1ef24f(0xc3)](_0x3ee4eb=>{const _0xc2c557=_0x1ef24f;switch(_0x3ee4eb[_0xc2c557(0x98)]){case _0xc2c557(0xa8):{let _0x47a650=_0x3ee4eb['payload'][_0xc2c557(0x87)];_0x312d3c[_0xc2c557(0xa8)](_0x47a650);break;}default:break;}}),w(this[_0x1ef24f(0x82)],_0x312d3c);}));}[_0x443cdb(0xc9)](){const _0x3f84ec=_0x443cdb;this[_0x3f84ec(0x9d)](this[_0x3f84ec(0x84)][_0x3f84ec(0x8f)]['subscribe'](async _0x4ee0a9=>{const _0x45c871=_0x3f84ec;var _0x3118c0;let _0x221b1d=(_0x3118c0=this[_0x45c871(0x9a)][_0x45c871(0x7a)](_0x4ee0a9[_0x45c871(0xc1)])[_0x45c871(0x8c)](_0x48e0e=>_0x48e0e[_0x45c871(0xaa)]===_0x4ee0a9[_0x45c871(0xaa)]))==null?void 0x0:_0x3118c0['root'];if(!_0x221b1d)return;let {unitId:_0x24d8b0,subUnitId:_0x213746}=_0x221b1d;switch(_0x4ee0a9['user']&&this[_0x45c871(0x90)][_0x45c871(0xa1)](_0x4ee0a9[_0x45c871(0xa7)]),_0x4ee0a9[_0x45c871(0x98)]){case _0x2b7aa6[_0x45c871(0x66)]:break;case _0x2b7aa6['Reply']:var _0x9fb08a,_0x3036d7;this[_0x45c871(0x9a)]['addComment'](_0x24d8b0,_0x213746,{'unitId':_0x24d8b0,'subUnitId':_0x213746,'ref':'','id':_0x4ee0a9[_0x45c871(0x69)],'dT':C(+_0x4ee0a9[_0x45c871(0xcd)]),'threadId':_0x4ee0a9[_0x45c871(0xaa)],'personId':(_0x9fb08a=(_0x3036d7=_0x4ee0a9[_0x45c871(0xa7)])==null?void 0x0:_0x3036d7[_0x45c871(0x6a)])==null?_0x4ee0a9['userId']:_0x9fb08a,'text':JSON[_0x45c871(0x8a)](_0x4ee0a9[_0x45c871(0xba)]),'parentId':_0x221b1d['id']});break;case _0x2b7aa6[_0x45c871(0x67)]:{let _0x46b79d=this[_0x45c871(0x9a)]['getComment'](_0x24d8b0,_0x213746,_0x4ee0a9[_0x45c871(0x69)]);_0x46b79d&&_0x46b79d[_0x45c871(0xb1)]&&this[_0x45c871(0x9a)][_0x45c871(0x97)](_0x24d8b0,_0x213746,_0x4ee0a9['replyId']);break;}case _0x2b7aa6['Edit']:this[_0x45c871(0x9a)][_0x45c871(0xbf)](_0x24d8b0,_0x213746,{'commentId':_0x4ee0a9['replyId'],'text':JSON[_0x45c871(0x8a)](_0x4ee0a9['content'])});break;case _0x2b7aa6[_0x45c871(0x92)]:{var _0x53d19b;let _0x558dda=(_0x53d19b=this[_0x45c871(0x9a)][_0x45c871(0x7a)](_0x4ee0a9[_0x45c871(0xc1)])[_0x45c871(0x8c)](_0x4cbd58=>_0x4cbd58['threadId']===_0x4ee0a9[_0x45c871(0xaa)]))==null?void 0x0:_0x53d19b['root'];_0x558dda&&this[_0x45c871(0x9a)][_0x45c871(0xb4)](_0x24d8b0,_0x213746,_0x558dda['id'],_0x4ee0a9[_0x45c871(0x6b)]===_0x463330['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x4ea8b7(_0x17a934)),T(0x1,_0x4ea8b7(_0x53f8fc)),T(0x2,_0x4ea8b7(_0x3c93c8)),T(0x3,_0x4ea8b7(_0x5bc231))],D);const O=_0x443cdb(0x80);Symbol(O);const k={};function A(_0x4e5755,_0x48f161){const _0x5f396e=_0x443cdb;let _0x56cd5d=_0x4e5755[_0x5f396e(0xb7)][0x0];return{..._0x48f161,'id':_0x56cd5d['replyId'],'resolved':_0x4e5755['solved']===0x1,'dT':C(_0x56cd5d[_0x5f396e(0xcd)]),'personId':_0x56cd5d[_0x5f396e(0xb6)],'threadId':_0x56cd5d['threadId']};}function j(_0x313f72,_0x4a9202,_0x407154){const _0x37d8af=_0x443cdb;var _0xcc105a,_0x46f289;if(((_0xcc105a=_0x313f72==null||(_0x46f289=_0x313f72[_0x37d8af(0xb7)])==null?void 0x0:_0x46f289[_0x37d8af(0x70)])==null?0x0:_0xcc105a)>0x0){let _0x545f2e=(_0x5e88c1,_0x2c57b0)=>({'id':_0x5e88c1[_0x37d8af(0x69)],'threadId':_0x5e88c1['threadId'],'dT':C(_0x5e88c1[_0x37d8af(0xcd)]),'personId':_0x5e88c1[_0x37d8af(0xb6)],'resolved':_0x313f72['solved']===_0x463330[_0x37d8af(0xc5)],'unitId':_0x4a9202,'subUnitId':_0x407154,'text':JSON['parse'](_0x5e88c1[_0x37d8af(0xba)]),'parentId':_0x2c57b0}),_0xd2824d=_0x545f2e(_0x313f72[_0x37d8af(0xb7)][0x0]);return{..._0xd2824d,'children':_0x313f72['replies'][_0x37d8af(0x7c)](0x1)[_0x37d8af(0x73)](_0x52ddab=>_0x545f2e(_0x52ddab,_0xd2824d['id']))};}return null;}let M=class{constructor(_0x30f1fd,_0x28ff6e,_0x4bd235){const _0x3e4e95=_0x443cdb;this['_httpService']=_0x30f1fd,this[_0x3e4e95(0x90)]=_0x28ff6e,this[_0x3e4e95(0xac)]=_0x4bd235;}async['addComment'](_0x3961cb){const _0x3451c0=_0x443cdb;var _0x5db400,_0xf99cb1;let {parentId:_0x2c37dc,unitId:_0xd59d1,text:_0x1c5614,threadId:_0x17f011}=_0x3961cb,_0x19cb80=(_0x5db400=(_0xf99cb1=_0x1c5614[_0x3451c0(0xbd)])==null?void 0x0:_0xf99cb1['filter'](_0x3b4b9a=>_0x3b4b9a['rangeType']===_0x2ce30f[_0x3451c0(0xce)])[_0x3451c0(0x73)](_0x3065c8=>_0x3065c8[_0x3451c0(0x74)]))==null?[]:_0x5db400,_0x1b3db5=JSON[_0x3451c0(0xa5)](_0x1c5614),_0x39892a=(await this['_sessionService'][_0x3451c0(0xa2)](_0xd59d1))[_0x3451c0(0x78)]();if(_0x2c37dc){let _0x203b2b={'memberId':_0x39892a,'unitId':_0xd59d1,'content':_0x1b3db5,'mention':_0x19cb80,'threadId':_0x17f011},_0x3ed6df=(await this[_0x3451c0(0xc4)][_0x3451c0(0xb3)](_0x3451c0(0x6d)+_0xd59d1+_0x3451c0(0xca),{'body':_0x203b2b}))[_0x3451c0(0x86)][_0x3451c0(0x7d)];return{..._0x3961cb,'id':_0x3ed6df[_0x3451c0(0x69)],'dT':_0x41bf95(+_0x3ed6df['createTimestamp'])[_0x3451c0(0xbc)](_0x3451c0(0x93)),'personId':_0x3ed6df['userId']};}else{let _0x787d45={'memberId':_0x39892a,'unitId':_0xd59d1,'content':_0x1b3db5,'mention':_0x19cb80};return A((await this['_httpService'][_0x3451c0(0xb3)]('/universer-api/comment/unit/'+_0xd59d1+'/add',{'body':_0x787d45}))[_0x3451c0(0x86)]['comment'],_0x3961cb);}}async[_0x443cdb(0xbf)](_0xd8fbfe){const _0x40359d=_0x443cdb;var _0x237928,_0x316f04;let {text:_0x44c3b9,unitId:_0x22e896}=_0xd8fbfe,_0x42d35d=(_0x237928=(_0x316f04=_0x44c3b9[_0x40359d(0xbd)])==null?void 0x0:_0x316f04[_0x40359d(0x8e)](_0x26986e=>_0x26986e[_0x40359d(0x6f)]===_0x2ce30f[_0x40359d(0xce)])['map'](_0x34c0b5=>_0x34c0b5[_0x40359d(0x74)]))==null?[]:_0x237928,_0x1bdb85=JSON[_0x40359d(0xa5)](_0x44c3b9),_0x48af85=_0xd8fbfe[_0x40359d(0xaa)],_0x486cfd=_0xd8fbfe['id'],_0x578a89={'memberId':(await this[_0x40359d(0xac)][_0x40359d(0xa2)](_0x22e896))['getMemberID'](),'unitId':_0x22e896,'threadId':_0x48af85,'mention':_0x42d35d,'content':_0x1bdb85,'replyId':_0x486cfd},_0x1acb47=await this[_0x40359d(0xc4)][_0x40359d(0xb3)](_0x40359d(0x6d)+_0x22e896+'/edit',{'body':_0x578a89});return!_0x1acb47['body'][_0x40359d(0xc2)]||_0x1acb47[_0x40359d(0x86)]['error'][_0x40359d(0x94)]===0x1;}async[_0x443cdb(0xb4)](_0x2c50bc){const _0x24c5e1=_0x443cdb;let {unitId:_0x4f489e}=_0x2c50bc,_0x3f43cc=_0x2c50bc[_0x24c5e1(0xaa)],_0x108661={'memberId':this[_0x24c5e1(0x90)][_0x24c5e1(0xcb)]()[_0x24c5e1(0x6a)],'unitId':_0x4f489e,'threadId':_0x3f43cc,'solved':_0x2c50bc[_0x24c5e1(0x8b)]?_0x463330[_0x24c5e1(0xc5)]:_0x463330[_0x24c5e1(0x9b)]},_0x5cae7f=await this['_httpService'][_0x24c5e1(0xb3)](_0x24c5e1(0x6d)+_0x4f489e+_0x24c5e1(0x77),{'body':_0x108661});return!_0x5cae7f[_0x24c5e1(0x86)][_0x24c5e1(0xc2)]||_0x5cae7f[_0x24c5e1(0x86)][_0x24c5e1(0xc2)][_0x24c5e1(0x94)]===0x1;}async['deleteComment'](_0x15a7ad,_0xb2fc88,_0x23fba3,_0x24a802){const _0x359966=_0x443cdb;let _0x16c4aa={'memberId':(await this[_0x359966(0xac)][_0x359966(0xa2)](_0x15a7ad))[_0x359966(0x78)](),'threadId':_0x23fba3,'replyId':_0x24a802,'unitId':_0x15a7ad},_0x1ad066=await this[_0x359966(0xc4)][_0x359966(0xb3)](_0x359966(0x6d)+_0x15a7ad+_0x359966(0xa3),{'body':_0x16c4aa});return!_0x1ad066[_0x359966(0x86)][_0x359966(0xc2)]||_0x1ad066[_0x359966(0x86)][_0x359966(0xc2)][_0x359966(0x94)]===0x1;}async[_0x443cdb(0xae)](_0x32e8a3,_0xa64be7,_0xdc33a6){const _0x214701=_0x443cdb;let _0x11052e={'unitId':_0x32e8a3,'threadId':_0xdc33a6},_0x1580cb=await this['_httpService'][_0x214701(0xb3)](_0x214701(0x6d)+_0x32e8a3+_0x214701(0xb0),{'body':_0x11052e}),_0x477b67=_0xdc33a6[_0x214701(0x73)](_0x4b83e6=>j(_0x1580cb[_0x214701(0x86)]['comments'][_0x4b83e6],_0x32e8a3,_0xa64be7))[_0x214701(0x8e)](Boolean);return Object['values'](_0x1580cb[_0x214701(0x86)][_0x214701(0x85)])[_0x214701(0xc3)](_0x1e97e5=>{const _0x1f15e5=_0x214701;this[_0x1f15e5(0x90)]['addUser'](_0x1e97e5);}),_0x477b67;}['saveCommentToSnapshot'](_0x3419f2){const _0x511057=_0x443cdb;return{'id':_0x3419f2['id'],'threadId':_0x3419f2[_0x511057(0xaa)],'ref':_0x3419f2[_0x511057(0xcc)]};}};M=E([T(0x0,_0x4ea8b7(_0x52ac61)),T(0x1,_0x4ea8b7(_0x3c93c8)),T(0x2,_0x4ea8b7(_0x35863e))],M);let N=class extends _0x254aab{constructor(_0x43585b,_0x37dfe3){const _0x3ce1e6=_0x443cdb;super(),this[_0x3ce1e6(0x89)]=_0x43585b,this[_0x3ce1e6(0x96)]=_0x37dfe3,this[_0x3ce1e6(0x7b)]();}[_0x443cdb(0x7b)](){const _0x4cd076=_0x443cdb;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x4cd076(0x89)][_0x4cd076(0x68)]=!0x1;}};N=E([T(0x0,_0x3a855d),T(0x1,_0x4ea8b7(M))],N);function P(_0x3e2b68){'@babel/helpers - typeof';const _0x39aaeb=_0x443cdb;return P=typeof Symbol==_0x39aaeb(0xa6)&&typeof Symbol[_0x39aaeb(0xaf)]==_0x39aaeb(0xc6)?function(_0x588fc9){return typeof _0x588fc9;}:function(_0x38dfce){const _0x117632=_0x39aaeb;return _0x38dfce&&typeof Symbol==_0x117632(0xa6)&&_0x38dfce[_0x117632(0x8d)]===Symbol&&_0x38dfce!==Symbol[_0x117632(0x81)]?_0x117632(0xc6):typeof _0x38dfce;},P(_0x3e2b68);}function F(_0x7cec6b,_0x5af9a4){const _0x1fa34d=_0x443cdb;if(P(_0x7cec6b)!='object'||!_0x7cec6b)return _0x7cec6b;var _0x1d6e01=_0x7cec6b[Symbol[_0x1fa34d(0xbe)]];if(_0x1d6e01!==void 0x0){var _0x2e0881=_0x1d6e01['call'](_0x7cec6b,_0x5af9a4||_0x1fa34d(0x7f));if(P(_0x2e0881)!='object')return _0x2e0881;throw TypeError(_0x1fa34d(0x9e));}return(_0x5af9a4==='string'?String:Number)(_0x7cec6b);}function I(_0x323bcf){const _0x3fdc63=_0x443cdb;var _0x531ab8=F(_0x323bcf,_0x3fdc63(0xc0));return P(_0x531ab8)=='symbol'?_0x531ab8:_0x531ab8+'';}function L(_0x48cde3,_0x38ce34,_0x336341){const _0x2c8b93=_0x443cdb;return(_0x38ce34=I(_0x38ce34))in _0x48cde3?Object[_0x2c8b93(0xab)](_0x48cde3,_0x38ce34,{'value':_0x336341,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x48cde3[_0x38ce34]=_0x336341,_0x48cde3;}let R=class extends _0x53ad5d{constructor(_0xad1c99=k,_0x4762cb,_0x2f3869){const _0x5ed0d2=_0x443cdb;super(),this[_0x5ed0d2(0xb5)]=_0xad1c99,this['_injector']=_0x4762cb,this['_configService']=_0x2f3869;let {..._0x2456f1}=_0x33f364({},k,this[_0x5ed0d2(0xb5)]);this['_configService'][_0x5ed0d2(0xc8)](O,_0x2456f1);}['onStarting'](){[[M],[N],[D]]['forEach'](_0x9ccefb=>{const _0x3998c5=_0x7314;this[_0x3998c5(0x82)][_0x3998c5(0xa8)](_0x9ccefb);});}[_0x443cdb(0xb9)](){const _0xd24beb=_0x443cdb;this[_0xd24beb(0x82)][_0xd24beb(0xa9)](N),this[_0xd24beb(0x82)][_0xd24beb(0xa9)](D);}};L(R,'pluginName',_0x443cdb(0x7e)),L(R,_0x443cdb(0x9c),x),L(R,'version',S),R=E([_0x3f8556(_0x3a2e03,_0x446d41,_0x4223a1),T(0x1,_0x4ea8b7(_0x5bc231)),T(0x2,_0xbae266)],R);export{R as UniverThreadCommentDataSourcePlugin};function _0x304c(){const _0x2c6211=['rangeId','4965400ahevTA','0.20.1','/solved','getMemberID','subscribe','getUnit','_initDataSource','slice','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','default','thread-comment-data-source.config','prototype','_injector','3861285ImfZFM','_commentService','users','body','personId','7ASveIN','_threadCommentDataSourceService','parse','resolved','find','constructor','filter','commentUpdate$','_userService','6PDNDZy','Solve','YYYY/MM/DD\x20HH:mm','code','pipe','_threadCommentDataSource','deleteComment','type','68QIohol','_threadCommentModel','OpenOrReOpen','packageName','disposeWithMe','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getOwnPropertyDescriptor','/universer-api/user/list','addUser','requireSession','/delete','191750okBDgS','stringify','function','user','add','get','threadId','defineProperty','_sessionService','159342HkFgZt','listComments','iterator','/list','parentId','20400708BaFXOJ','post','resolveComment','_config','userId','replies','94536fmIMjr','onReady','content','11hLXIJB','format','customRanges','toPrimitive','updateComment','string','unitId','error','forEach','_httpService','Solved','symbol','decorate','setConfig','_init','/reply','getCurrentUser','ref','createTimestamp','COMMENT','Add','Delete','syncUpdateMutationToColla','replyId','userID','solved','delete','/universer-api/comment/unit/','1370LOyRuk','rangeType','length','3105418ZRYQeK','@univerjs-pro/thread-comment-datasource','map'];_0x304c=function(){return _0x2c6211;};return _0x304c();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x51e8(_0x49eb7b,_0x10525a){_0x49eb7b=_0x49eb7b-0xd4;const _0x52e087=_0x52e0();let _0x51e83e=_0x52e087[_0x49eb7b];return _0x51e83e;}function _0x52e0(){const _0xe6881d=['error','toStringTag','_injector','onReady','@univerjs/network','_commentService','parse','setConfig','decorate','pluginName','CustomRangeType','root','UniverThreadCommentUIPlugin','amd','9019776YFdyBD','getComment','_threadCommentDataSourceService','UserManagerService','/list','userId','getCurrentUser','Edit','subscribe','customRanges','COMMENT','/solved','ref','disposeWithMe','_sessionService','7bEQWAt','replies','@univerjs/thread-comment-ui','UniverCore','saveCommentToSnapshot','syncUpdateMutationToColla','/universer-api/comment/unit/','dateKit','1896032cRAbMf','defineProperty','UniverCollaborationClientPlugin','user','UniverProThreadCommentDatasource','rxjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/thread-comment','_initUserSync','addComment','129660OQKJMk','find','bufferTime','dataSource','34340mHtmyj','@univerjs-pro/license','merge','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getOwnPropertyDescriptor','prototype','unitId','UniverLicensePlugin','post','constructor','Unknown','threadId','content','814068cQSMNV','Add','resolveComment','Disposable','userID','version','Solve','toPrimitive','0.20.0-insiders.20260411-27a8c24','length','2434GTYjvE','HTTPService','commentUpdate$','_threadCommentDataSource','addUser','format','code','@univerjs/core','personId','UNRECOGNIZED','getUnit','CollaborationSessionService','_initDataSource','function','_httpService','OpenOrReOpen','@univerjs-pro/collaboration-client','users','default','CommentService','object','pipe','forEach','@univerjs-pro/thread-comment-datasource','createTimestamp','15gUgIzr','payload','deleteComment','rangeId','replyId','209JsjJmF','type','Delete','Injector','string','symbol','packageName','UniverThreadComment','Inject','UniverThreadCommentUi','stringify','_userService','getMemberID','_configService','Solved','body','filter','map','get','_config','ThreadCommentModel','2133DrutyQ','resolved','requireSession','423655bDFWCL','IThreadCommentDataSourceService','3273GeplRR','/universer-api/user/list','solved','DependentOn','onStarting','updateComment','_init','add','IConfigService','UniverNetwork','/edit','Reply','UniverProLicense','parentId','YYYY/MM/DD\x20HH:mm','rangeType','_threadCommentModel'];_0x52e0=function(){return _0xe6881d;};return _0x52e0();}(function(_0x942d99,_0xb99edf){const _0x4aac06=_0x51e8,_0x3c0bb2=_0x942d99();while(!![]){try{const _0x495c0d=parseInt(_0x4aac06(0x12f))/0x1+parseInt(_0x4aac06(0xf9))/0x2*(-parseInt(_0x4aac06(0x131))/0x3)+parseInt(_0x4aac06(0xef))/0x4*(parseInt(_0x4aac06(0x112))/0x5)+parseInt(_0x4aac06(0x150))/0x6+-parseInt(_0x4aac06(0x15f))/0x7*(-parseInt(_0x4aac06(0xd4))/0x8)+parseInt(_0x4aac06(0x12c))/0x9*(-parseInt(_0x4aac06(0xe2))/0xa)+parseInt(_0x4aac06(0x117))/0xb*(parseInt(_0x4aac06(0xde))/0xc);if(_0x495c0d===_0xb99edf)break;else _0x3c0bb2['push'](_0x3c0bb2['shift']());}catch(_0x4cfb4a){_0x3c0bb2['push'](_0x3c0bb2['shift']());}}}(_0x52e0,0xcca34),function(_0x246d0e,_0x213c3e){const _0x246951=_0x51e8;typeof exports==_0x246951(0x10d)&&typeof module<'u'?_0x213c3e(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==_0x246951(0x106)&&define[_0x246951(0x14f)]?define(['exports',_0x246951(0x109),_0x246951(0xe3),_0x246951(0x100),_0x246951(0x161),_0x246951(0xdb),'rxjs',_0x246951(0x146)],_0x213c3e):(_0x246d0e=typeof globalThis<'u'?globalThis:_0x246d0e||self,_0x213c3e(_0x246d0e[_0x246951(0xd8)]={},_0x246d0e['UniverProCollaborationClient'],_0x246d0e[_0x246951(0x13d)],_0x246d0e[_0x246951(0x162)],_0x246d0e[_0x246951(0x120)],_0x246d0e[_0x246951(0x11e)],_0x246d0e[_0x246951(0xd9)],_0x246d0e[_0x246951(0x13a)]));}(this,function(_0x4edc41,_0x48c976,_0x44308c,_0x5a34d6,_0x1ff30e,_0x47a449,_0x305cd6,_0x35e1ab){const _0x33b448=_0x51e8;Object[_0x33b448(0xd5)](_0x4edc41,Symbol[_0x33b448(0x143)],{'value':'Module'});var _0x145cd6=_0x33b448(0x110),_0x9a84ea=_0x33b448(0xf7);let _0x3f231b=function(_0x372a94){const _0x3d3a75=_0x33b448;return _0x372a94[_0x372a94[_0x3d3a75(0x108)]=0x0]=_0x3d3a75(0x108),_0x372a94[_0x372a94[_0x3d3a75(0x125)]=0x1]=_0x3d3a75(0x125),_0x372a94[_0x372a94[_0x3d3a75(0x102)]=-0x1]='UNRECOGNIZED',_0x372a94;}({}),_0x2d66bb=function(_0x5e53b3){const _0x27bd6f=_0x33b448;return _0x5e53b3[_0x5e53b3[_0x27bd6f(0xec)]=0x0]=_0x27bd6f(0xec),_0x5e53b3[_0x5e53b3[_0x27bd6f(0xf0)]=0x1]=_0x27bd6f(0xf0),_0x5e53b3[_0x5e53b3[_0x27bd6f(0x13c)]=0x2]=_0x27bd6f(0x13c),_0x5e53b3[_0x5e53b3[_0x27bd6f(0x157)]=0x3]='Edit',_0x5e53b3[_0x5e53b3[_0x27bd6f(0x119)]=0x4]=_0x27bd6f(0x119),_0x5e53b3[_0x5e53b3[_0x27bd6f(0xf5)]=0x5]=_0x27bd6f(0xf5),_0x5e53b3[_0x5e53b3[_0x27bd6f(0x102)]=-0x1]='UNRECOGNIZED',_0x5e53b3;}({}),_0x351ee2=_0x4dbbdc=>(0x0,_0x5a34d6[_0x33b448(0x166)])(new Date(+_0x4dbbdc))[_0x33b448(0xfe)](_0x33b448(0x13f)),_0x36e7cd=async(_0x2e1661,_0x10f21d)=>{const _0x1a03e8=_0x33b448;let _0x39dde3=_0x2e1661['get'](_0x5a34d6[_0x1a03e8(0x153)]),_0x9bb660=_0x2e1661[_0x1a03e8(0x129)](_0x35e1ab[_0x1a03e8(0xfa)]);_0x10f21d['forEach'](_0x360289=>{_0x39dde3['getUser'](_0x360289)&&_0x10f21d['delete'](_0x360289);}),_0x10f21d['size']&&(await _0x9bb660[_0x1a03e8(0x129)](_0x1a03e8(0x132),{'params':{'userIDs':[..._0x10f21d]}}))[_0x1a03e8(0x126)][_0x1a03e8(0x10a)]['forEach'](_0x301f4d=>{_0x301f4d&&_0x39dde3['addUser'](_0x301f4d);});};function _0x313382(_0x395656,_0x5be2d7){return function(_0x478590,_0x4e7e5e){_0x5be2d7(_0x478590,_0x4e7e5e,_0x395656);};}function _0x4beb98(_0x38ef9f,_0x59a98b,_0x15bd48,_0x3b64ec){const _0x111550=_0x33b448;var _0x38968e=arguments[_0x111550(0xf8)],_0x368acb=_0x38968e<0x3?_0x59a98b:_0x3b64ec===null?_0x3b64ec=Object[_0x111550(0xe6)](_0x59a98b,_0x15bd48):_0x3b64ec,_0x29f528;if(typeof Reflect==_0x111550(0x10d)&&typeof Reflect[_0x111550(0x14a)]==_0x111550(0x106))_0x368acb=Reflect[_0x111550(0x14a)](_0x38ef9f,_0x59a98b,_0x15bd48,_0x3b64ec);else{for(var _0x15b65d=_0x38ef9f[_0x111550(0xf8)]-0x1;_0x15b65d>=0x0;_0x15b65d--)(_0x29f528=_0x38ef9f[_0x15b65d])&&(_0x368acb=(_0x38968e<0x3?_0x29f528(_0x368acb):_0x38968e>0x3?_0x29f528(_0x59a98b,_0x15bd48,_0x368acb):_0x29f528(_0x59a98b,_0x15bd48))||_0x368acb);}return _0x38968e>0x3&&_0x368acb&&Object[_0x111550(0xd5)](_0x59a98b,_0x15bd48,_0x368acb),_0x368acb;}let _0x4133ce=class extends _0x5a34d6[_0x33b448(0xf2)]{constructor(_0x4e9d5e,_0x43bc50,_0x3fb4c8,_0x16b214){const _0x1a278a=_0x33b448;super(),this[_0x1a278a(0x147)]=_0x4e9d5e,this[_0x1a278a(0x141)]=_0x43bc50,this[_0x1a278a(0x122)]=_0x3fb4c8,this[_0x1a278a(0x144)]=_0x16b214,this[_0x1a278a(0x137)](),this[_0x1a278a(0xdc)]();}[_0x33b448(0xdc)](){const _0x20ff11=_0x33b448;this[_0x20ff11(0x15d)](this[_0x20ff11(0x141)][_0x20ff11(0xfb)][_0x20ff11(0x10e)]((0x0,_0x305cd6[_0x20ff11(0xe0)])(0x10))[_0x20ff11(0x158)](_0x17826d=>{const _0x5a8032=_0x20ff11;let _0x46c53c=new Set();_0x17826d[_0x5a8032(0x10f)](_0x59d078=>{const _0x565d33=_0x5a8032;switch(_0x59d078[_0x565d33(0x118)]){case'add':{let _0x16a1ab=_0x59d078[_0x565d33(0x113)][_0x565d33(0x101)];_0x46c53c[_0x565d33(0x138)](_0x16a1ab);break;}default:break;}}),_0x36e7cd(this[_0x5a8032(0x144)],_0x46c53c);}));}['_init'](){const _0x3681c2=_0x33b448;this['disposeWithMe'](this[_0x3681c2(0x147)][_0x3681c2(0xfb)][_0x3681c2(0x158)](async _0x2fd3f7=>{const _0x11a095=_0x3681c2;var _0x4365f3;let _0x24c513=(_0x4365f3=this[_0x11a095(0x141)]['getUnit'](_0x2fd3f7[_0x11a095(0xe8)])[_0x11a095(0xdf)](_0x4e64ae=>_0x4e64ae['threadId']===_0x2fd3f7[_0x11a095(0xed)]))==null?void 0x0:_0x4365f3[_0x11a095(0x14d)];if(!_0x24c513)return;let {unitId:_0xd6802b,subUnitId:_0x1772b0}=_0x24c513;switch(_0x2fd3f7[_0x11a095(0xd7)]&&this['_userService'][_0x11a095(0xfd)](_0x2fd3f7[_0x11a095(0xd7)]),_0x2fd3f7[_0x11a095(0x118)]){case _0x2d66bb['Add']:break;case _0x2d66bb[_0x11a095(0x13c)]:var _0x2b4de1,_0x1fb108;this[_0x11a095(0x141)][_0x11a095(0xdd)](_0xd6802b,_0x1772b0,{'unitId':_0xd6802b,'subUnitId':_0x1772b0,'ref':'','id':_0x2fd3f7[_0x11a095(0x116)],'dT':_0x351ee2(+_0x2fd3f7[_0x11a095(0x111)]),'threadId':_0x2fd3f7[_0x11a095(0xed)],'personId':(_0x2b4de1=(_0x1fb108=_0x2fd3f7['user'])==null?void 0x0:_0x1fb108[_0x11a095(0xf3)])==null?_0x2fd3f7[_0x11a095(0x155)]:_0x2b4de1,'text':JSON['parse'](_0x2fd3f7['content']),'parentId':_0x24c513['id']});break;case _0x2d66bb['Delete']:{let _0x5b5840=this['_threadCommentModel'][_0x11a095(0x151)](_0xd6802b,_0x1772b0,_0x2fd3f7[_0x11a095(0x116)]);_0x5b5840&&_0x5b5840[_0x11a095(0x13e)]&&this[_0x11a095(0x141)]['deleteComment'](_0xd6802b,_0x1772b0,_0x2fd3f7['replyId']);break;}case _0x2d66bb['Edit']:this[_0x11a095(0x141)][_0x11a095(0x136)](_0xd6802b,_0x1772b0,{'commentId':_0x2fd3f7[_0x11a095(0x116)],'text':JSON[_0x11a095(0x148)](_0x2fd3f7[_0x11a095(0xee)])});break;case _0x2d66bb[_0x11a095(0xf5)]:{var _0x818092;let _0x230c8f=(_0x818092=this[_0x11a095(0x141)][_0x11a095(0x103)](_0x2fd3f7[_0x11a095(0xe8)])[_0x11a095(0xdf)](_0x3a13fa=>_0x3a13fa[_0x11a095(0xed)]===_0x2fd3f7[_0x11a095(0xed)]))==null?void 0x0:_0x818092[_0x11a095(0x14d)];_0x230c8f&&this[_0x11a095(0x141)][_0x11a095(0xf1)](_0xd6802b,_0x1772b0,_0x230c8f['id'],_0x2fd3f7[_0x11a095(0x133)]===_0x3f231b[_0x11a095(0x125)]);break;}default:break;}}));}};_0x4133ce=_0x4beb98([_0x313382(0x0,(0x0,_0x5a34d6[_0x33b448(0x11f)])(_0x48c976[_0x33b448(0x10c)])),_0x313382(0x1,(0x0,_0x5a34d6['Inject'])(_0x47a449[_0x33b448(0x12b)])),_0x313382(0x2,(0x0,_0x5a34d6[_0x33b448(0x11f)])(_0x5a34d6[_0x33b448(0x153)])),_0x313382(0x3,(0x0,_0x5a34d6['Inject'])(_0x5a34d6[_0x33b448(0x11a)]))],_0x4133ce);let _0x37ed8a='thread-comment-data-source.config';Symbol(_0x37ed8a);let _0x1906a1={};function _0x291262(_0x3b6936,_0x550279){const _0x7f113b=_0x33b448;let _0xa248fc=_0x3b6936[_0x7f113b(0x160)][0x0];return{..._0x550279,'id':_0xa248fc['replyId'],'resolved':_0x3b6936[_0x7f113b(0x133)]===0x1,'dT':_0x351ee2(_0xa248fc['createTimestamp']),'personId':_0xa248fc[_0x7f113b(0x155)],'threadId':_0xa248fc[_0x7f113b(0xed)]};}function _0x20f532(_0xd907e7,_0x50e05a,_0x4f78f1){const _0x41dd31=_0x33b448;var _0x505fc1,_0x4acae1;if(((_0x505fc1=_0xd907e7==null||(_0x4acae1=_0xd907e7[_0x41dd31(0x160)])==null?void 0x0:_0x4acae1[_0x41dd31(0xf8)])==null?0x0:_0x505fc1)>0x0){let _0x3d477a=(_0x135590,_0x74fcfc)=>({'id':_0x135590[_0x41dd31(0x116)],'threadId':_0x135590[_0x41dd31(0xed)],'dT':_0x351ee2(_0x135590[_0x41dd31(0x111)]),'personId':_0x135590['userId'],'resolved':_0xd907e7[_0x41dd31(0x133)]===_0x3f231b[_0x41dd31(0x125)],'unitId':_0x50e05a,'subUnitId':_0x4f78f1,'text':JSON[_0x41dd31(0x148)](_0x135590['content']),'parentId':_0x74fcfc}),_0x5af8a3=_0x3d477a(_0xd907e7[_0x41dd31(0x160)][0x0]);return{..._0x5af8a3,'children':_0xd907e7['replies']['slice'](0x1)[_0x41dd31(0x128)](_0x3e8bda=>_0x3d477a(_0x3e8bda,_0x5af8a3['id']))};}return null;}let _0x2fa8a8=class{constructor(_0xae47aa,_0x47fe4b,_0x5ebdc3){const _0x59e2f8=_0x33b448;this[_0x59e2f8(0x107)]=_0xae47aa,this[_0x59e2f8(0x122)]=_0x47fe4b,this[_0x59e2f8(0x15e)]=_0x5ebdc3;}async['addComment'](_0x1ab9e0){const _0x32fc54=_0x33b448;var _0x3317c4,_0xbeb068;let {parentId:_0x3b09a9,unitId:_0x379064,text:_0x1d1f64,threadId:_0x2da963}=_0x1ab9e0,_0x185d30=(_0x3317c4=(_0xbeb068=_0x1d1f64[_0x32fc54(0x159)])==null?void 0x0:_0xbeb068['filter'](_0x314edf=>_0x314edf[_0x32fc54(0x140)]===_0x5a34d6[_0x32fc54(0x14c)][_0x32fc54(0x15a)])[_0x32fc54(0x128)](_0x37d385=>_0x37d385['rangeId']))==null?[]:_0x3317c4,_0xb6466d=JSON[_0x32fc54(0x121)](_0x1d1f64),_0x1c5208=(await this['_sessionService']['requireSession'](_0x379064))[_0x32fc54(0x123)]();if(_0x3b09a9){let _0x3cf429={'memberId':_0x1c5208,'unitId':_0x379064,'content':_0xb6466d,'mention':_0x185d30,'threadId':_0x2da963},_0x34564c=(await this[_0x32fc54(0x107)][_0x32fc54(0xea)](_0x32fc54(0x165)+_0x379064+'/reply',{'body':_0x3cf429}))['body']['reply'];return{..._0x1ab9e0,'id':_0x34564c[_0x32fc54(0x116)],'dT':(0x0,_0x5a34d6[_0x32fc54(0x166)])(+_0x34564c[_0x32fc54(0x111)])['format'](_0x32fc54(0x13f)),'personId':_0x34564c['userId']};}else{let _0x4faf0e={'memberId':_0x1c5208,'unitId':_0x379064,'content':_0xb6466d,'mention':_0x185d30};return _0x291262((await this['_httpService'][_0x32fc54(0xea)]('/universer-api/comment/unit/'+_0x379064+'/add',{'body':_0x4faf0e}))[_0x32fc54(0x126)]['comment'],_0x1ab9e0);}}async[_0x33b448(0x136)](_0x2c21af){const _0x7eb104=_0x33b448;var _0x24ef07,_0x29ac5b;let {text:_0x161493,unitId:_0x287f80}=_0x2c21af,_0x589b08=(_0x24ef07=(_0x29ac5b=_0x161493[_0x7eb104(0x159)])==null?void 0x0:_0x29ac5b[_0x7eb104(0x127)](_0x148a79=>_0x148a79['rangeType']===_0x5a34d6[_0x7eb104(0x14c)][_0x7eb104(0x15a)])[_0x7eb104(0x128)](_0x27cbb8=>_0x27cbb8[_0x7eb104(0x115)]))==null?[]:_0x24ef07,_0x4cf129=JSON[_0x7eb104(0x121)](_0x161493),_0x1e7f5d=_0x2c21af['threadId'],_0x506e6c=_0x2c21af['id'],_0x5df780={'memberId':(await this['_sessionService'][_0x7eb104(0x12e)](_0x287f80))[_0x7eb104(0x123)](),'unitId':_0x287f80,'threadId':_0x1e7f5d,'mention':_0x589b08,'content':_0x4cf129,'replyId':_0x506e6c},_0x2e8636=await this['_httpService'][_0x7eb104(0xea)](_0x7eb104(0x165)+_0x287f80+_0x7eb104(0x13b),{'body':_0x5df780});return!_0x2e8636['body'][_0x7eb104(0x142)]||_0x2e8636['body']['error'][_0x7eb104(0xff)]===0x1;}async[_0x33b448(0xf1)](_0x5c7e65){const _0x504e9f=_0x33b448;let {unitId:_0xd14841}=_0x5c7e65,_0x16a438=_0x5c7e65[_0x504e9f(0xed)],_0xa08571={'memberId':this['_userService'][_0x504e9f(0x156)]()[_0x504e9f(0xf3)],'unitId':_0xd14841,'threadId':_0x16a438,'solved':_0x5c7e65[_0x504e9f(0x12d)]?_0x3f231b[_0x504e9f(0x125)]:_0x3f231b['OpenOrReOpen']},_0x55eb9e=await this[_0x504e9f(0x107)][_0x504e9f(0xea)](_0x504e9f(0x165)+_0xd14841+_0x504e9f(0x15b),{'body':_0xa08571});return!_0x55eb9e[_0x504e9f(0x126)][_0x504e9f(0x142)]||_0x55eb9e['body'][_0x504e9f(0x142)][_0x504e9f(0xff)]===0x1;}async[_0x33b448(0x114)](_0x1327df,_0x29956e,_0x59687f,_0x34d962){const _0x1fe95e=_0x33b448;let _0x30b75b={'memberId':(await this[_0x1fe95e(0x15e)]['requireSession'](_0x1327df))['getMemberID'](),'threadId':_0x59687f,'replyId':_0x34d962,'unitId':_0x1327df},_0x58f13e=await this['_httpService'][_0x1fe95e(0xea)]('/universer-api/comment/unit/'+_0x1327df+'/delete',{'body':_0x30b75b});return!_0x58f13e['body'][_0x1fe95e(0x142)]||_0x58f13e[_0x1fe95e(0x126)]['error'][_0x1fe95e(0xff)]===0x1;}async['listComments'](_0xd83754,_0x5911d5,_0x2845bc){const _0x232fb0=_0x33b448;let _0x21c8d6={'unitId':_0xd83754,'threadId':_0x2845bc},_0x13b4a0=await this[_0x232fb0(0x107)]['post'](_0x232fb0(0x165)+_0xd83754+_0x232fb0(0x154),{'body':_0x21c8d6}),_0x4b3716=_0x2845bc['map'](_0x468084=>_0x20f532(_0x13b4a0[_0x232fb0(0x126)]['comments'][_0x468084],_0xd83754,_0x5911d5))[_0x232fb0(0x127)](Boolean);return Object['values'](_0x13b4a0[_0x232fb0(0x126)][_0x232fb0(0x10a)])[_0x232fb0(0x10f)](_0xd5cd92=>{this['_userService']['addUser'](_0xd5cd92);}),_0x4b3716;}[_0x33b448(0x163)](_0x5c04e7){const _0x249f96=_0x33b448;return{'id':_0x5c04e7['id'],'threadId':_0x5c04e7[_0x249f96(0xed)],'ref':_0x5c04e7[_0x249f96(0x15c)]};}};_0x2fa8a8=_0x4beb98([_0x313382(0x0,(0x0,_0x5a34d6[_0x33b448(0x11f)])(_0x35e1ab[_0x33b448(0xfa)])),_0x313382(0x1,(0x0,_0x5a34d6[_0x33b448(0x11f)])(_0x5a34d6[_0x33b448(0x153)])),_0x313382(0x2,(0x0,_0x5a34d6[_0x33b448(0x11f)])(_0x48c976[_0x33b448(0x104)]))],_0x2fa8a8);let _0x3831fe=class extends _0x5a34d6[_0x33b448(0xf2)]{constructor(_0x5aa917,_0x3ed262){const _0x520243=_0x33b448;super(),this[_0x520243(0x152)]=_0x5aa917,this['_threadCommentDataSource']=_0x3ed262,this[_0x520243(0x105)]();}[_0x33b448(0x105)](){const _0x361a14=_0x33b448;this[_0x361a14(0x152)][_0x361a14(0xe1)]=this[_0x361a14(0xfc)],this[_0x361a14(0x152)][_0x361a14(0x164)]=!0x1;}};_0x3831fe=_0x4beb98([_0x313382(0x0,_0x47a449[_0x33b448(0x130)]),_0x313382(0x1,(0x0,_0x5a34d6[_0x33b448(0x11f)])(_0x2fa8a8))],_0x3831fe);function _0x4193f4(_0x26a33b){'@babel/helpers - typeof';const _0x18328b=_0x33b448;return _0x4193f4=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x18328b(0x11c)?function(_0x17d280){return typeof _0x17d280;}:function(_0x4e9569){const _0x2fba58=_0x18328b;return _0x4e9569&&typeof Symbol==_0x2fba58(0x106)&&_0x4e9569[_0x2fba58(0xeb)]===Symbol&&_0x4e9569!==Symbol[_0x2fba58(0xe7)]?_0x2fba58(0x11c):typeof _0x4e9569;},_0x4193f4(_0x26a33b);}function _0xe2c55b(_0x58091b,_0x4850d6){const _0x240521=_0x33b448;if(_0x4193f4(_0x58091b)!=_0x240521(0x10d)||!_0x58091b)return _0x58091b;var _0x385559=_0x58091b[Symbol[_0x240521(0xf6)]];if(_0x385559!==void 0x0){var _0x49b02b=_0x385559['call'](_0x58091b,_0x4850d6||_0x240521(0x10b));if(_0x4193f4(_0x49b02b)!=_0x240521(0x10d))return _0x49b02b;throw TypeError(_0x240521(0xe5));}return(_0x4850d6===_0x240521(0x11b)?String:Number)(_0x58091b);}function _0xe6353a(_0x3466f9){const _0xb31ed3=_0x33b448;var _0x3c4d20=_0xe2c55b(_0x3466f9,_0xb31ed3(0x11b));return _0x4193f4(_0x3c4d20)==_0xb31ed3(0x11c)?_0x3c4d20:_0x3c4d20+'';}function _0x1e88be(_0x4c2afc,_0x1a75e9,_0x8389e){const _0x6acd9e=_0x33b448;return(_0x1a75e9=_0xe6353a(_0x1a75e9))in _0x4c2afc?Object[_0x6acd9e(0xd5)](_0x4c2afc,_0x1a75e9,{'value':_0x8389e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4c2afc[_0x1a75e9]=_0x8389e,_0x4c2afc;}let _0x18b742=class extends _0x5a34d6['Plugin']{constructor(_0x5e8506=_0x1906a1,_0x31caf1,_0x5e439d){const _0x15fd57=_0x33b448;super(),this[_0x15fd57(0x12a)]=_0x5e8506,this[_0x15fd57(0x144)]=_0x31caf1,this['_configService']=_0x5e439d;let {..._0x56d274}=(0x0,_0x5a34d6[_0x15fd57(0xe4)])({},_0x1906a1,this[_0x15fd57(0x12a)]);this[_0x15fd57(0x124)][_0x15fd57(0x149)](_0x37ed8a,_0x56d274);}[_0x33b448(0x135)](){const _0x4738e2=_0x33b448;[[_0x2fa8a8],[_0x3831fe],[_0x4133ce]][_0x4738e2(0x10f)](_0x106b0d=>{const _0x1de8c2=_0x4738e2;this[_0x1de8c2(0x144)]['add'](_0x106b0d);});}[_0x33b448(0x145)](){const _0x3fbec4=_0x33b448;this[_0x3fbec4(0x144)][_0x3fbec4(0x129)](_0x3831fe),this[_0x3fbec4(0x144)][_0x3fbec4(0x129)](_0x4133ce);}};_0x1e88be(_0x18b742,_0x33b448(0x14b),_0x33b448(0xda)),_0x1e88be(_0x18b742,_0x33b448(0x11d),_0x145cd6),_0x1e88be(_0x18b742,_0x33b448(0xf4),_0x9a84ea),_0x18b742=_0x4beb98([(0x0,_0x5a34d6[_0x33b448(0x134)])(_0x1ff30e[_0x33b448(0x14e)],_0x48c976[_0x33b448(0xd6)],_0x44308c[_0x33b448(0xe9)]),_0x313382(0x1,(0x0,_0x5a34d6['Inject'])(_0x5a34d6[_0x33b448(0x11a)])),_0x313382(0x2,_0x5a34d6[_0x33b448(0x139)])],_0x18b742),Object[_0x33b448(0xd5)](_0x4edc41,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return _0x18b742;}});}));
1
+ function _0x3ff3(){const _0x4fdf01=['commentUpdate$','delete','parse','map','UniverThreadCommentUi','code','UniverLicensePlugin','getMemberID','Inject','Add','_commentService','type','306230zpSUEX','133232WVkpEO','@univerjs-pro/collaboration-client','values','0.20.1','saveCommentToSnapshot','requireSession','getOwnPropertyDescriptor','UniverProThreadCommentDatasource','_config','Edit','UniverThreadCommentUIPlugin','default','UniverNetwork','UniverProCollaborationClient','/solved','pipe','unitId','getCurrentUser','Injector','object','subscribe','userID','merge','rangeId','filter','length','525855aOBITo','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','49xBehGT','get','forEach','1929078aprLBr','rxjs','Plugin','/add','replyId','toStringTag','customRanges','solved','defineProperty','UNRECOGNIZED','stringify','123606QCZvcO','995076YQyzQI','error','listComments','@univerjs/network','string','payload','_injector','onReady','add','CollaborationSessionService','@univerjs/thread-comment-ui','iterator','bufferTime','size','2pIYMNZ','addUser','UniverCore','constructor','users','replies','IThreadCommentDataSourceService','@univerjs/thread-comment','Solve','packageName','symbol','_userService','getComment','getUser','prototype','_init','_configService','@univerjs/core','amd','@univerjs-pro/thread-comment-datasource','exports','/universer-api/comment/unit/','1194070ZEsiZP','updateComment','YYYY/MM/DD\x20HH:mm','ref','decorate','addComment','user','Delete','resolveComment','content','OpenOrReOpen','function','Unknown','_threadCommentDataSource','Module','_sessionService','_httpService','_threadCommentModel','CustomRangeType','toPrimitive','DependentOn','UserManagerService','pluginName','userId','rangeType','find','root','dateKit','post','UniverProLicense','HTTPService','Reply','_initUserSync','_initDataSource','ThreadCommentModel','Solved','reply','comments','setConfig','dataSource','createTimestamp','body'];_0x3ff3=function(){return _0x4fdf01;};return _0x3ff3();}function _0x5351(_0x368f66,_0x5e54ae){_0x368f66=_0x368f66-0x10d;const _0x3ff3d5=_0x3ff3();let _0x5351d3=_0x3ff3d5[_0x368f66];return _0x5351d3;}(function(_0x497d0f,_0x4943ae){const _0x6faafd=_0x5351,_0x4235bf=_0x497d0f();while(!![]){try{const _0x236f8f=-parseInt(_0x6faafd(0x16e))/0x1*(parseInt(_0x6faafd(0x122))/0x2)+parseInt(_0x6faafd(0x189))/0x3+-parseInt(_0x6faafd(0x114))/0x4+parseInt(_0x6faafd(0x138))/0x5+-parseInt(_0x6faafd(0x113))/0x6*(-parseInt(_0x6faafd(0x18d))/0x7)+parseInt(_0x6faafd(0x16f))/0x8+parseInt(_0x6faafd(0x190))/0x9;if(_0x236f8f===_0x4943ae)break;else _0x4235bf['push'](_0x4235bf['shift']());}catch(_0xa5d6d5){_0x4235bf['push'](_0x4235bf['shift']());}}}(_0x3ff3,0x3933f),function(_0x379792,_0x39ab7b){const _0x548867=_0x5351;typeof exports==_0x548867(0x182)&&typeof module<'u'?_0x39ab7b(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs-pro/license`),require(`@univerjs/core`),require(`@univerjs/thread-comment-ui`),require(`@univerjs/thread-comment`),require(`rxjs`),require(`@univerjs/network`)):typeof define=='function'&&define[_0x548867(0x134)]?define([_0x548867(0x136),_0x548867(0x170),'@univerjs-pro/license',_0x548867(0x133),_0x548867(0x11e),_0x548867(0x129),_0x548867(0x191),_0x548867(0x117)],_0x39ab7b):(_0x379792=typeof globalThis<'u'?globalThis:_0x379792||self,_0x39ab7b(_0x379792[_0x548867(0x176)]={},_0x379792[_0x548867(0x17c)],_0x379792[_0x548867(0x155)],_0x379792[_0x548867(0x124)],_0x379792[_0x548867(0x166)],_0x379792['UniverThreadComment'],_0x379792['rxjs'],_0x379792[_0x548867(0x17b)]));}(this,function(_0x1ebd8f,_0x7596e9,_0xce5e77,_0x1849c8,_0x100e72,_0x3f0b21,_0x2c8005,_0x44e0cf){const _0x48a113=_0x5351;Object[_0x48a113(0x110)](_0x1ebd8f,Symbol[_0x48a113(0x10d)],{'value':_0x48a113(0x146)});var _0xf84156=_0x48a113(0x135),_0xefe58c=_0x48a113(0x172);let _0x49a927=function(_0x1de9d0){const _0x5810e9=_0x48a113;return _0x1de9d0[_0x1de9d0['OpenOrReOpen']=0x0]=_0x5810e9(0x142),_0x1de9d0[_0x1de9d0['Solved']=0x1]='Solved',_0x1de9d0[_0x1de9d0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1de9d0;}({}),_0xffc2db=function(_0x21ce89){const _0x13dc72=_0x48a113;return _0x21ce89[_0x21ce89[_0x13dc72(0x144)]=0x0]=_0x13dc72(0x144),_0x21ce89[_0x21ce89[_0x13dc72(0x16b)]=0x1]='Add',_0x21ce89[_0x21ce89[_0x13dc72(0x157)]=0x2]='Reply',_0x21ce89[_0x21ce89[_0x13dc72(0x178)]=0x3]=_0x13dc72(0x178),_0x21ce89[_0x21ce89['Delete']=0x4]=_0x13dc72(0x13f),_0x21ce89[_0x21ce89[_0x13dc72(0x12a)]=0x5]='Solve',_0x21ce89[_0x21ce89[_0x13dc72(0x111)]=-0x1]=_0x13dc72(0x111),_0x21ce89;}({}),_0x5c2408=_0x545e67=>(0x0,_0x1849c8[_0x48a113(0x153)])(new Date(+_0x545e67))[_0x48a113(0x18a)]('YYYY/MM/DD\x20HH:mm'),_0x4d04a2=async(_0x388569,_0xc410d2)=>{const _0x1913bb=_0x48a113;let _0x570b28=_0x388569[_0x1913bb(0x18e)](_0x1849c8[_0x1913bb(0x14d)]),_0x6ab104=_0x388569[_0x1913bb(0x18e)](_0x44e0cf[_0x1913bb(0x156)]);_0xc410d2[_0x1913bb(0x18f)](_0x2338f4=>{const _0x41ad1c=_0x1913bb;_0x570b28[_0x41ad1c(0x12f)](_0x2338f4)&&_0xc410d2[_0x41ad1c(0x163)](_0x2338f4);}),_0xc410d2[_0x1913bb(0x121)]&&(await _0x6ab104[_0x1913bb(0x18e)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc410d2]}}))[_0x1913bb(0x161)][_0x1913bb(0x126)][_0x1913bb(0x18f)](_0x4275dc=>{const _0x32ccd0=_0x1913bb;_0x4275dc&&_0x570b28[_0x32ccd0(0x123)](_0x4275dc);});};function _0x3b2906(_0x47d508,_0x28b233){return function(_0x5bdaf0,_0x17c2ce){_0x28b233(_0x5bdaf0,_0x17c2ce,_0x47d508);};}function _0x3c08e8(_0x318262,_0x10100f,_0x2413c7,_0x581b40){const _0x500b39=_0x48a113;var _0x1e774f=arguments[_0x500b39(0x188)],_0x2590bd=_0x1e774f<0x3?_0x10100f:_0x581b40===null?_0x581b40=Object[_0x500b39(0x175)](_0x10100f,_0x2413c7):_0x581b40,_0x346afb;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x500b39(0x143))_0x2590bd=Reflect[_0x500b39(0x13c)](_0x318262,_0x10100f,_0x2413c7,_0x581b40);else{for(var _0x1a1b4f=_0x318262[_0x500b39(0x188)]-0x1;_0x1a1b4f>=0x0;_0x1a1b4f--)(_0x346afb=_0x318262[_0x1a1b4f])&&(_0x2590bd=(_0x1e774f<0x3?_0x346afb(_0x2590bd):_0x1e774f>0x3?_0x346afb(_0x10100f,_0x2413c7,_0x2590bd):_0x346afb(_0x10100f,_0x2413c7))||_0x2590bd);}return _0x1e774f>0x3&&_0x2590bd&&Object[_0x500b39(0x110)](_0x10100f,_0x2413c7,_0x2590bd),_0x2590bd;}let _0x4b2c91=class extends _0x1849c8['Disposable']{constructor(_0x5f295d,_0xc65b60,_0x4c39b2,_0x570c40){const _0x2b1bf8=_0x48a113;super(),this[_0x2b1bf8(0x16c)]=_0x5f295d,this[_0x2b1bf8(0x149)]=_0xc65b60,this[_0x2b1bf8(0x12d)]=_0x4c39b2,this[_0x2b1bf8(0x11a)]=_0x570c40,this['_init'](),this[_0x2b1bf8(0x158)]();}['_initUserSync'](){const _0x3d1944=_0x48a113;this['disposeWithMe'](this[_0x3d1944(0x149)][_0x3d1944(0x162)][_0x3d1944(0x17e)]((0x0,_0x2c8005[_0x3d1944(0x120)])(0x10))['subscribe'](_0x2ba365=>{const _0x40bfc5=_0x3d1944;let _0x331b48=new Set();_0x2ba365[_0x40bfc5(0x18f)](_0x22cca6=>{const _0x2dd6d6=_0x40bfc5;switch(_0x22cca6['type']){case _0x2dd6d6(0x11c):{let _0xe0735d=_0x22cca6[_0x2dd6d6(0x119)]['personId'];_0x331b48[_0x2dd6d6(0x11c)](_0xe0735d);break;}default:break;}}),_0x4d04a2(this[_0x40bfc5(0x11a)],_0x331b48);}));}[_0x48a113(0x131)](){const _0x56a58f=_0x48a113;this['disposeWithMe'](this[_0x56a58f(0x16c)][_0x56a58f(0x162)][_0x56a58f(0x183)](async _0xf1432a=>{const _0x46b222=_0x56a58f;var _0x559108;let _0x59d366=(_0x559108=this['_threadCommentModel']['getUnit'](_0xf1432a[_0x46b222(0x17f)])[_0x46b222(0x151)](_0x3e4d0e=>_0x3e4d0e[_0x46b222(0x18c)]===_0xf1432a[_0x46b222(0x18c)]))==null?void 0x0:_0x559108['root'];if(!_0x59d366)return;let {unitId:_0x5f3b18,subUnitId:_0xbff6bc}=_0x59d366;switch(_0xf1432a[_0x46b222(0x13e)]&&this[_0x46b222(0x12d)][_0x46b222(0x123)](_0xf1432a['user']),_0xf1432a[_0x46b222(0x16d)]){case _0xffc2db[_0x46b222(0x16b)]:break;case _0xffc2db[_0x46b222(0x157)]:var _0x2bf97c,_0x54ad76;this[_0x46b222(0x149)]['addComment'](_0x5f3b18,_0xbff6bc,{'unitId':_0x5f3b18,'subUnitId':_0xbff6bc,'ref':'','id':_0xf1432a[_0x46b222(0x194)],'dT':_0x5c2408(+_0xf1432a[_0x46b222(0x160)]),'threadId':_0xf1432a[_0x46b222(0x18c)],'personId':(_0x2bf97c=(_0x54ad76=_0xf1432a[_0x46b222(0x13e)])==null?void 0x0:_0x54ad76[_0x46b222(0x184)])==null?_0xf1432a[_0x46b222(0x14f)]:_0x2bf97c,'text':JSON['parse'](_0xf1432a[_0x46b222(0x141)]),'parentId':_0x59d366['id']});break;case _0xffc2db[_0x46b222(0x13f)]:{let _0x64ca58=this['_threadCommentModel'][_0x46b222(0x12e)](_0x5f3b18,_0xbff6bc,_0xf1432a['replyId']);_0x64ca58&&_0x64ca58['parentId']&&this[_0x46b222(0x149)]['deleteComment'](_0x5f3b18,_0xbff6bc,_0xf1432a[_0x46b222(0x194)]);break;}case _0xffc2db[_0x46b222(0x178)]:this['_threadCommentModel'][_0x46b222(0x139)](_0x5f3b18,_0xbff6bc,{'commentId':_0xf1432a[_0x46b222(0x194)],'text':JSON[_0x46b222(0x164)](_0xf1432a[_0x46b222(0x141)])});break;case _0xffc2db[_0x46b222(0x12a)]:{var _0x21b8fe;let _0x5e3f25=(_0x21b8fe=this['_threadCommentModel']['getUnit'](_0xf1432a[_0x46b222(0x17f)])['find'](_0x154ca2=>_0x154ca2[_0x46b222(0x18c)]===_0xf1432a[_0x46b222(0x18c)]))==null?void 0x0:_0x21b8fe[_0x46b222(0x152)];_0x5e3f25&&this[_0x46b222(0x149)][_0x46b222(0x140)](_0x5f3b18,_0xbff6bc,_0x5e3f25['id'],_0xf1432a[_0x46b222(0x10f)]===_0x49a927['Solved']);break;}default:break;}}));}};_0x4b2c91=_0x3c08e8([_0x3b2906(0x0,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x7596e9['CommentService'])),_0x3b2906(0x1,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x3f0b21[_0x48a113(0x15a)])),_0x3b2906(0x2,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x1849c8[_0x48a113(0x14d)])),_0x3b2906(0x3,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x1849c8[_0x48a113(0x181)]))],_0x4b2c91);let _0xbf59f7='thread-comment-data-source.config';Symbol(_0xbf59f7);let _0x467711={};function _0xafdc4a(_0x48c35b,_0xab80b2){const _0x1fe97f=_0x48a113;let _0x468642=_0x48c35b['replies'][0x0];return{..._0xab80b2,'id':_0x468642[_0x1fe97f(0x194)],'resolved':_0x48c35b['solved']===0x1,'dT':_0x5c2408(_0x468642[_0x1fe97f(0x160)]),'personId':_0x468642[_0x1fe97f(0x14f)],'threadId':_0x468642['threadId']};}function _0x1f02a3(_0x44c75a,_0x3a133f,_0x123a38){const _0x59a14f=_0x48a113;var _0xe6fbc4,_0x58b3b0;if(((_0xe6fbc4=_0x44c75a==null||(_0x58b3b0=_0x44c75a['replies'])==null?void 0x0:_0x58b3b0[_0x59a14f(0x188)])==null?0x0:_0xe6fbc4)>0x0){let _0x35526b=(_0x208155,_0x36ed99)=>({'id':_0x208155[_0x59a14f(0x194)],'threadId':_0x208155[_0x59a14f(0x18c)],'dT':_0x5c2408(_0x208155[_0x59a14f(0x160)]),'personId':_0x208155[_0x59a14f(0x14f)],'resolved':_0x44c75a[_0x59a14f(0x10f)]===_0x49a927[_0x59a14f(0x15b)],'unitId':_0x3a133f,'subUnitId':_0x123a38,'text':JSON[_0x59a14f(0x164)](_0x208155[_0x59a14f(0x141)]),'parentId':_0x36ed99}),_0x2923b2=_0x35526b(_0x44c75a[_0x59a14f(0x127)][0x0]);return{..._0x2923b2,'children':_0x44c75a[_0x59a14f(0x127)]['slice'](0x1)[_0x59a14f(0x165)](_0x30658c=>_0x35526b(_0x30658c,_0x2923b2['id']))};}return null;}let _0x3123d3=class{constructor(_0x40bd6f,_0x4831ba,_0x4123b2){const _0x5ba8a3=_0x48a113;this['_httpService']=_0x40bd6f,this[_0x5ba8a3(0x12d)]=_0x4831ba,this[_0x5ba8a3(0x147)]=_0x4123b2;}async[_0x48a113(0x13d)](_0x3c5c4d){const _0x425c1f=_0x48a113;var _0x3ba506,_0x3de056;let {parentId:_0x2251f4,unitId:_0x4cf9a7,text:_0x5d3511,threadId:_0x44dc27}=_0x3c5c4d,_0x408bde=(_0x3ba506=(_0x3de056=_0x5d3511[_0x425c1f(0x10e)])==null?void 0x0:_0x3de056[_0x425c1f(0x187)](_0x410967=>_0x410967['rangeType']===_0x1849c8['CustomRangeType']['COMMENT'])[_0x425c1f(0x165)](_0x549815=>_0x549815['rangeId']))==null?[]:_0x3ba506,_0x417fa2=JSON[_0x425c1f(0x112)](_0x5d3511),_0x59d69c=(await this[_0x425c1f(0x147)][_0x425c1f(0x174)](_0x4cf9a7))['getMemberID']();if(_0x2251f4){let _0xbcb077={'memberId':_0x59d69c,'unitId':_0x4cf9a7,'content':_0x417fa2,'mention':_0x408bde,'threadId':_0x44dc27},_0x2119d2=(await this[_0x425c1f(0x148)][_0x425c1f(0x154)](_0x425c1f(0x137)+_0x4cf9a7+'/reply',{'body':_0xbcb077}))[_0x425c1f(0x161)][_0x425c1f(0x15c)];return{..._0x3c5c4d,'id':_0x2119d2[_0x425c1f(0x194)],'dT':(0x0,_0x1849c8[_0x425c1f(0x153)])(+_0x2119d2[_0x425c1f(0x160)])[_0x425c1f(0x18a)](_0x425c1f(0x13a)),'personId':_0x2119d2[_0x425c1f(0x14f)]};}else{let _0x24e824={'memberId':_0x59d69c,'unitId':_0x4cf9a7,'content':_0x417fa2,'mention':_0x408bde};return _0xafdc4a((await this[_0x425c1f(0x148)][_0x425c1f(0x154)](_0x425c1f(0x137)+_0x4cf9a7+_0x425c1f(0x193),{'body':_0x24e824}))[_0x425c1f(0x161)]['comment'],_0x3c5c4d);}}async[_0x48a113(0x139)](_0x26807f){const _0x2b0eb8=_0x48a113;var _0x4fae7d,_0x2f2f6b;let {text:_0x42d10e,unitId:_0x461b02}=_0x26807f,_0x5d0e52=(_0x4fae7d=(_0x2f2f6b=_0x42d10e['customRanges'])==null?void 0x0:_0x2f2f6b['filter'](_0x4f3327=>_0x4f3327[_0x2b0eb8(0x150)]===_0x1849c8[_0x2b0eb8(0x14a)]['COMMENT'])['map'](_0x44bff3=>_0x44bff3[_0x2b0eb8(0x186)]))==null?[]:_0x4fae7d,_0x508507=JSON[_0x2b0eb8(0x112)](_0x42d10e),_0x253f3d=_0x26807f[_0x2b0eb8(0x18c)],_0x424f92=_0x26807f['id'],_0x52c987={'memberId':(await this[_0x2b0eb8(0x147)][_0x2b0eb8(0x174)](_0x461b02))[_0x2b0eb8(0x169)](),'unitId':_0x461b02,'threadId':_0x253f3d,'mention':_0x5d0e52,'content':_0x508507,'replyId':_0x424f92},_0x398ed4=await this[_0x2b0eb8(0x148)][_0x2b0eb8(0x154)](_0x2b0eb8(0x137)+_0x461b02+'/edit',{'body':_0x52c987});return!_0x398ed4['body']['error']||_0x398ed4[_0x2b0eb8(0x161)][_0x2b0eb8(0x115)][_0x2b0eb8(0x167)]===0x1;}async[_0x48a113(0x140)](_0x2ff972){const _0x171757=_0x48a113;let {unitId:_0x3f77a5}=_0x2ff972,_0x490145=_0x2ff972[_0x171757(0x18c)],_0x43b9a4={'memberId':this[_0x171757(0x12d)][_0x171757(0x180)]()[_0x171757(0x184)],'unitId':_0x3f77a5,'threadId':_0x490145,'solved':_0x2ff972['resolved']?_0x49a927[_0x171757(0x15b)]:_0x49a927[_0x171757(0x142)]},_0x124f69=await this[_0x171757(0x148)][_0x171757(0x154)](_0x171757(0x137)+_0x3f77a5+_0x171757(0x17d),{'body':_0x43b9a4});return!_0x124f69[_0x171757(0x161)][_0x171757(0x115)]||_0x124f69[_0x171757(0x161)][_0x171757(0x115)][_0x171757(0x167)]===0x1;}async['deleteComment'](_0x5a7581,_0x56fc24,_0x47d412,_0x3cbc60){const _0x5f051c=_0x48a113;let _0x591414={'memberId':(await this[_0x5f051c(0x147)][_0x5f051c(0x174)](_0x5a7581))[_0x5f051c(0x169)](),'threadId':_0x47d412,'replyId':_0x3cbc60,'unitId':_0x5a7581},_0x4f86d9=await this['_httpService'][_0x5f051c(0x154)](_0x5f051c(0x137)+_0x5a7581+'/delete',{'body':_0x591414});return!_0x4f86d9['body'][_0x5f051c(0x115)]||_0x4f86d9[_0x5f051c(0x161)][_0x5f051c(0x115)][_0x5f051c(0x167)]===0x1;}async[_0x48a113(0x116)](_0xaf8e1c,_0x2ea247,_0x3ea7aa){const _0x443313=_0x48a113;let _0x1b6f43={'unitId':_0xaf8e1c,'threadId':_0x3ea7aa},_0x4e7c38=await this[_0x443313(0x148)][_0x443313(0x154)](_0x443313(0x137)+_0xaf8e1c+'/list',{'body':_0x1b6f43}),_0x58e3de=_0x3ea7aa[_0x443313(0x165)](_0x1cfa99=>_0x1f02a3(_0x4e7c38[_0x443313(0x161)][_0x443313(0x15d)][_0x1cfa99],_0xaf8e1c,_0x2ea247))[_0x443313(0x187)](Boolean);return Object[_0x443313(0x171)](_0x4e7c38[_0x443313(0x161)][_0x443313(0x126)])[_0x443313(0x18f)](_0x5b67fc=>{const _0x3f129b=_0x443313;this[_0x3f129b(0x12d)][_0x3f129b(0x123)](_0x5b67fc);}),_0x58e3de;}[_0x48a113(0x173)](_0x305769){const _0x36daca=_0x48a113;return{'id':_0x305769['id'],'threadId':_0x305769[_0x36daca(0x18c)],'ref':_0x305769[_0x36daca(0x13b)]};}};_0x3123d3=_0x3c08e8([_0x3b2906(0x0,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x44e0cf['HTTPService'])),_0x3b2906(0x1,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x1849c8[_0x48a113(0x14d)])),_0x3b2906(0x2,(0x0,_0x1849c8['Inject'])(_0x7596e9[_0x48a113(0x11d)]))],_0x3123d3);let _0x1e3333=class extends _0x1849c8['Disposable']{constructor(_0x16687e,_0xdd18f3){const _0x5294ac=_0x48a113;super(),this['_threadCommentDataSourceService']=_0x16687e,this[_0x5294ac(0x145)]=_0xdd18f3,this[_0x5294ac(0x159)]();}[_0x48a113(0x159)](){const _0x561682=_0x48a113;this['_threadCommentDataSourceService'][_0x561682(0x15f)]=this[_0x561682(0x145)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x1e3333=_0x3c08e8([_0x3b2906(0x0,_0x3f0b21[_0x48a113(0x128)]),_0x3b2906(0x1,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x3123d3))],_0x1e3333);function _0x1e120c(_0xbaa73c){'@babel/helpers - typeof';const _0x480eaa=_0x48a113;return _0x1e120c=typeof Symbol=='function'&&typeof Symbol[_0x480eaa(0x11f)]==_0x480eaa(0x12c)?function(_0x4d1ba9){return typeof _0x4d1ba9;}:function(_0x5707da){const _0xa4a5e7=_0x480eaa;return _0x5707da&&typeof Symbol==_0xa4a5e7(0x143)&&_0x5707da[_0xa4a5e7(0x125)]===Symbol&&_0x5707da!==Symbol[_0xa4a5e7(0x130)]?_0xa4a5e7(0x12c):typeof _0x5707da;},_0x1e120c(_0xbaa73c);}function _0x23515(_0x4f40ac,_0xf88ace){const _0x44405f=_0x48a113;if(_0x1e120c(_0x4f40ac)!=_0x44405f(0x182)||!_0x4f40ac)return _0x4f40ac;var _0x5e7484=_0x4f40ac[Symbol[_0x44405f(0x14b)]];if(_0x5e7484!==void 0x0){var _0x3c761d=_0x5e7484['call'](_0x4f40ac,_0xf88ace||_0x44405f(0x17a));if(_0x1e120c(_0x3c761d)!='object')return _0x3c761d;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xf88ace==='string'?String:Number)(_0x4f40ac);}function _0x3a3015(_0x344c8a){const _0x278da3=_0x48a113;var _0x4d258c=_0x23515(_0x344c8a,_0x278da3(0x118));return _0x1e120c(_0x4d258c)==_0x278da3(0x12c)?_0x4d258c:_0x4d258c+'';}function _0x8ae3c7(_0x521cf6,_0x21907d,_0x74238b){const _0x29668b=_0x48a113;return(_0x21907d=_0x3a3015(_0x21907d))in _0x521cf6?Object[_0x29668b(0x110)](_0x521cf6,_0x21907d,{'value':_0x74238b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x521cf6[_0x21907d]=_0x74238b,_0x521cf6;}let _0x5547b0=class extends _0x1849c8[_0x48a113(0x192)]{constructor(_0x47b58f=_0x467711,_0x5bd17d,_0x3c5c42){const _0x5a4361=_0x48a113;super(),this[_0x5a4361(0x177)]=_0x47b58f,this['_injector']=_0x5bd17d,this['_configService']=_0x3c5c42;let {..._0x55ab6d}=(0x0,_0x1849c8[_0x5a4361(0x185)])({},_0x467711,this[_0x5a4361(0x177)]);this[_0x5a4361(0x132)][_0x5a4361(0x15e)](_0xbf59f7,_0x55ab6d);}['onStarting'](){const _0x2c2eb4=_0x48a113;[[_0x3123d3],[_0x1e3333],[_0x4b2c91]][_0x2c2eb4(0x18f)](_0x2e5dd8=>{const _0x1c66cd=_0x2c2eb4;this[_0x1c66cd(0x11a)]['add'](_0x2e5dd8);});}[_0x48a113(0x11b)](){const _0x1eaa9d=_0x48a113;this[_0x1eaa9d(0x11a)][_0x1eaa9d(0x18e)](_0x1e3333),this[_0x1eaa9d(0x11a)][_0x1eaa9d(0x18e)](_0x4b2c91);}};_0x8ae3c7(_0x5547b0,_0x48a113(0x14e),_0x48a113(0x18b)),_0x8ae3c7(_0x5547b0,_0x48a113(0x12b),_0xf84156),_0x8ae3c7(_0x5547b0,'version',_0xefe58c),_0x5547b0=_0x3c08e8([(0x0,_0x1849c8[_0x48a113(0x14c)])(_0x100e72[_0x48a113(0x179)],_0x7596e9['UniverCollaborationClientPlugin'],_0xce5e77[_0x48a113(0x168)]),_0x3b2906(0x1,(0x0,_0x1849c8[_0x48a113(0x16a)])(_0x1849c8['Injector'])),_0x3b2906(0x2,_0x1849c8['IConfigService'])],_0x5547b0),Object[_0x48a113(0x110)](_0x1ebd8f,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return _0x5547b0;}});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.20.0-insiders.20260411-27a8c24",
3
+ "version": "0.20.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.20.0-insiders.20260411-27a8c24",
49
- "@univerjs/core": "0.20.0-insiders.20260411-27a8c24",
50
- "@univerjs-pro/license": "0.20.0-insiders.20260411-27a8c24",
51
- "@univerjs/network": "0.20.0-insiders.20260411-27a8c24",
48
+ "@univerjs-pro/license": "0.20.1",
49
+ "@univerjs-pro/collaboration-client": "0.20.1",
50
+ "@univerjs/core": "0.20.1",
52
51
  "@univerjs/protocol": "0.1.49",
53
- "@univerjs/thread-comment": "0.20.0-insiders.20260411-27a8c24",
54
- "@univerjs/thread-comment-ui": "0.20.0-insiders.20260411-27a8c24"
52
+ "@univerjs/thread-comment": "0.20.1",
53
+ "@univerjs/thread-comment-ui": "0.20.1",
54
+ "@univerjs/network": "0.20.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^6.0.2",
59
59
  "vitest": "^4.1.1",
60
- "@univerjs-infra/shared": "0.20.0"
60
+ "@univerjs-infra/shared": "0.20.1"
61
61
  },
62
62
  "scripts": {
63
63
  "test": "vitest run",