@univerjs-pro/thread-comment-datasource 1.0.0-alpha.3 → 1.0.0-alpha.5

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 _0x96b8fd=_0x404d;(function(_0x319c6e,_0x3e56dd){const _0x353c4a=_0x404d,_0x4ff8ae=_0x319c6e();while(!![]){try{const _0xedb761=-parseInt(_0x353c4a(0xd7))/0x1*(parseInt(_0x353c4a(0x10e))/0x2)+parseInt(_0x353c4a(0xce))/0x3+parseInt(_0x353c4a(0x118))/0x4*(-parseInt(_0x353c4a(0xfc))/0x5)+-parseInt(_0x353c4a(0x101))/0x6*(parseInt(_0x353c4a(0xb2))/0x7)+-parseInt(_0x353c4a(0x124))/0x8*(-parseInt(_0x353c4a(0x132))/0x9)+-parseInt(_0x353c4a(0xe6))/0xa*(-parseInt(_0x353c4a(0x119))/0xb)+parseInt(_0x353c4a(0xca))/0xc;if(_0xedb761===_0x3e56dd)break;else _0x4ff8ae['push'](_0x4ff8ae['shift']());}catch(_0x50a3ec){_0x4ff8ae['push'](_0x4ff8ae['shift']());}}}(_0x4ab9,0xcafb8),Object[_0x96b8fd(0x128)](exports,Symbol[_0x96b8fd(0x125)],{'value':'Module'}));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');function _0x404d(_0x28fe46,_0x1d57a8){_0x28fe46=_0x28fe46-0xb0;const _0x4ab94a=_0x4ab9();let _0x404daa=_0x4ab94a[_0x28fe46];return _0x404daa;}var c=_0x96b8fd(0xf5),l=_0x96b8fd(0x104);const u={},d=_0x470ca0=>(0x0,n[_0x96b8fd(0xfa)])(new Date(+_0x470ca0))['format'](_0x96b8fd(0xee)),f=async(_0x566398,_0x310626)=>{const _0x35f3ec=_0x96b8fd;let _0x4d3851=_0x566398['get'](n['UserManagerService']),_0x4c4d6d=_0x566398[_0x35f3ec(0x120)](s[_0x35f3ec(0xdb)]);_0x310626[_0x35f3ec(0x135)](_0x237702=>{const _0x40d4bc=_0x35f3ec;_0x4d3851[_0x40d4bc(0xf6)](_0x237702)&&_0x310626[_0x40d4bc(0x133)](_0x237702);}),_0x310626[_0x35f3ec(0x12d)]&&(await _0x4c4d6d['get'](_0x35f3ec(0xcf),{'params':{'userIDs':[..._0x310626]}}))['body'][_0x35f3ec(0xfb)][_0x35f3ec(0x135)](_0x27d8f8=>{const _0x2f0324=_0x35f3ec;_0x27d8f8&&_0x4d3851[_0x2f0324(0xb0)](_0x27d8f8);});};function p(_0x7f3845,_0x1d02b9){return function(_0x3ec428,_0x2a007c){_0x1d02b9(_0x3ec428,_0x2a007c,_0x7f3845);};}function _0x4ab9(){const _0x5e7a82=['IConfigService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','IThreadCommentDataSourceService','HTTPService','CommentService','_initDataSource','_threadCommentDataSourceService','comments','UniverThreadCommentUIPlugin','post','/list','values','syncUpdateMutationToColla','onStarting','10IWWZom','filter','comment','_config','userId','_userService','_sessionService','/edit','YYYY/MM/DD\x20HH:mm','Injector','packageName','toPrimitive','CustomRangeType','body','CollaborationSessionService','@univerjs-pro/thread-comment-datasource','getUser','setConfig','Inject','getOwnPropertyDescriptor','dateKit','users','860LaicEI','resolveComment','getCurrentUser','_commentService','bufferTime','6930372JJNveK','Disposable','userID','1.0.0-alpha.3','Solved','version','iterator','rangeId','string','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','decorate','pipe','UserManagerService','132428OYUmeu','ThreadCommentModel','addComment','Solve','slice','format','createTimestamp','parentId','CommentUpdateEventType','type','25060OSgaTY','7508974jGOYEJ','unitId','dataSource','_init','parse','ref','listComments','get','Delete','default','customRanges','40qSYcXt','toStringTag','object','getComment','defineProperty','map','_httpService','OpenOrReOpen','UniverCollaborationClientPlugin','size','subscribe','requireSession','threadId','user','1109646sRjqBR','delete','COMMENT','forEach','addUser','Plugin','7urDLbY','error','DependentOn','replies','onReady','code','symbol','_threadCommentDataSource','commentUpdate$','personId','prototype','/universer-api/comment/unit/','deleteComment','/solved','updateComment','stringify','content','_injector','UniverThreadCommentDataSourcePlugin','replyId','solved','/delete','getUnit','Edit','28906524RrtRmZ','add','rangeType','getMemberID','2239713zyVeqj','/universer-api/user/list','_threadCommentModel','_configService','pluginName','disposeWithMe','CommentSolvedStatus','resolved','function','21cVAugW'];_0x4ab9=function(){return _0x5e7a82;};return _0x4ab9();}function m(_0x4933f0,_0x140832,_0x190173,_0x157a84){const _0xbfd435=_0x96b8fd;var _0x30dae0=arguments['length'],_0x471b66=_0x30dae0<0x3?_0x140832:_0x157a84===null?_0x157a84=Object[_0xbfd435(0xf9)](_0x140832,_0x190173):_0x157a84,_0x306c6a;if(typeof Reflect==_0xbfd435(0x126)&&typeof Reflect[_0xbfd435(0x10b)]==_0xbfd435(0xd6))_0x471b66=Reflect['decorate'](_0x4933f0,_0x140832,_0x190173,_0x157a84);else{for(var _0x2a020c=_0x4933f0['length']-0x1;_0x2a020c>=0x0;_0x2a020c--)(_0x306c6a=_0x4933f0[_0x2a020c])&&(_0x471b66=(_0x30dae0<0x3?_0x306c6a(_0x471b66):_0x30dae0>0x3?_0x306c6a(_0x140832,_0x190173,_0x471b66):_0x306c6a(_0x140832,_0x190173))||_0x471b66);}return _0x30dae0>0x3&&_0x471b66&&Object[_0xbfd435(0x128)](_0x140832,_0x190173,_0x471b66),_0x471b66;}let h=class extends n['Disposable']{constructor(_0x43b692,_0x4ba4bc,_0x5b503b,_0x177d87){const _0x455795=_0x96b8fd;super(),this[_0x455795(0xff)]=_0x43b692,this['_threadCommentModel']=_0x4ba4bc,this[_0x455795(0xeb)]=_0x5b503b,this[_0x455795(0xc3)]=_0x177d87,this[_0x455795(0x11c)](),this['_initUserSync']();}['_initUserSync'](){const _0x4f079d=_0x96b8fd;this[_0x4f079d(0xd3)](this[_0x4f079d(0xd0)]['commentUpdate$'][_0x4f079d(0x10c)]((0x0,o[_0x4f079d(0x100)])(0x10))[_0x4f079d(0x12e)](_0x3dd7f4=>{const _0x13c325=_0x4f079d;let _0x1433d3=new Set();_0x3dd7f4[_0x13c325(0x135)](_0x2a78b3=>{const _0x50ff36=_0x13c325;switch(_0x2a78b3[_0x50ff36(0x117)]){case _0x50ff36(0xcb):{let _0x56d253=_0x2a78b3['payload'][_0x50ff36(0xbb)];_0x1433d3[_0x50ff36(0xcb)](_0x56d253);break;}default:break;}}),f(this[_0x13c325(0xc3)],_0x1433d3);}));}[_0x96b8fd(0x11c)](){const _0x59c89a=_0x96b8fd;this['disposeWithMe'](this[_0x59c89a(0xff)][_0x59c89a(0xba)][_0x59c89a(0x12e)](async _0x139380=>{const _0x20138d=_0x59c89a;var _0x486261;let _0x1b166d=(_0x486261=this[_0x20138d(0xd0)][_0x20138d(0xc8)](_0x139380[_0x20138d(0x11a)])['find'](_0x566227=>_0x566227[_0x20138d(0x130)]===_0x139380[_0x20138d(0x130)]))==null?void 0x0:_0x486261['root'];if(!_0x1b166d)return;let {unitId:_0x395093,subUnitId:_0x41a54f}=_0x1b166d;switch(_0x139380[_0x20138d(0x131)]&&this[_0x20138d(0xeb)][_0x20138d(0xb0)](_0x139380[_0x20138d(0x131)]),_0x139380[_0x20138d(0x117)]){case i[_0x20138d(0x116)]['Add']:break;case i[_0x20138d(0x116)]['Reply']:var _0x3b6adc,_0x183d47;this['_threadCommentModel'][_0x20138d(0x110)](_0x395093,_0x41a54f,{'unitId':_0x395093,'subUnitId':_0x41a54f,'ref':'','id':_0x139380[_0x20138d(0xc5)],'dT':d(+_0x139380[_0x20138d(0x114)]),'threadId':_0x139380[_0x20138d(0x130)],'personId':(_0x3b6adc=(_0x183d47=_0x139380[_0x20138d(0x131)])==null?void 0x0:_0x183d47[_0x20138d(0x103)])==null?_0x139380[_0x20138d(0xea)]:_0x3b6adc,'text':JSON[_0x20138d(0x11d)](_0x139380[_0x20138d(0xc2)]),'parentId':_0x1b166d['id']});break;case i[_0x20138d(0x116)][_0x20138d(0x121)]:{let _0x5e7150=this[_0x20138d(0xd0)][_0x20138d(0x127)](_0x395093,_0x41a54f,_0x139380[_0x20138d(0xc5)]);_0x5e7150&&_0x5e7150[_0x20138d(0x115)]&&this[_0x20138d(0xd0)][_0x20138d(0xbe)](_0x395093,_0x41a54f,_0x139380[_0x20138d(0xc5)]);break;}case i[_0x20138d(0x116)][_0x20138d(0xc9)]:this['_threadCommentModel'][_0x20138d(0xc0)](_0x395093,_0x41a54f,{'commentId':_0x139380['replyId'],'text':JSON[_0x20138d(0x11d)](_0x139380[_0x20138d(0xc2)])});break;case i[_0x20138d(0x116)][_0x20138d(0x111)]:{var _0xfee572;let _0x5ed53b=(_0xfee572=this[_0x20138d(0xd0)]['getUnit'](_0x139380[_0x20138d(0x11a)])['find'](_0x38f3c6=>_0x38f3c6[_0x20138d(0x130)]===_0x139380[_0x20138d(0x130)]))==null?void 0x0:_0xfee572['root'];_0x5ed53b&&this['_threadCommentModel']['resolveComment'](_0x395093,_0x41a54f,_0x5ed53b['id'],_0x139380['solved']===i[_0x20138d(0xd4)][_0x20138d(0x105)]);break;}default:break;}}));}};h=m([p(0x0,(0x0,n[_0x96b8fd(0xf8)])(e[_0x96b8fd(0xdc)])),p(0x1,(0x0,n[_0x96b8fd(0xf8)])(a[_0x96b8fd(0x10f)])),p(0x2,(0x0,n['Inject'])(n[_0x96b8fd(0x10d)])),p(0x3,(0x0,n['Inject'])(n[_0x96b8fd(0xef)]))],h);function g(_0x44250f,_0xf46710){const _0x1eca3a=_0x96b8fd;let _0x15e6d1=_0x44250f[_0x1eca3a(0xb5)][0x0];return{..._0xf46710,'id':_0x15e6d1[_0x1eca3a(0xc5)],'resolved':_0x44250f[_0x1eca3a(0xc6)]===0x1,'dT':d(_0x15e6d1[_0x1eca3a(0x114)]),'personId':_0x15e6d1[_0x1eca3a(0xea)],'threadId':_0x15e6d1[_0x1eca3a(0x130)]};}function _(_0x311f1e,_0x5821a9,_0x4d9724){const _0x40c5f6=_0x96b8fd;var _0x3e31b1,_0x5da43c;if(((_0x3e31b1=_0x311f1e==null||(_0x5da43c=_0x311f1e[_0x40c5f6(0xb5)])==null?void 0x0:_0x5da43c['length'])==null?0x0:_0x3e31b1)>0x0){let _0x18067=(_0x118741,_0x31546b)=>({'id':_0x118741[_0x40c5f6(0xc5)],'threadId':_0x118741['threadId'],'dT':d(_0x118741[_0x40c5f6(0x114)]),'personId':_0x118741[_0x40c5f6(0xea)],'resolved':_0x311f1e[_0x40c5f6(0xc6)]===i['CommentSolvedStatus'][_0x40c5f6(0x105)],'unitId':_0x5821a9,'subUnitId':_0x4d9724,'text':JSON[_0x40c5f6(0x11d)](_0x118741[_0x40c5f6(0xc2)]),'parentId':_0x31546b}),_0x9a7e5d=_0x18067(_0x311f1e['replies'][0x0]);return{..._0x9a7e5d,'children':_0x311f1e[_0x40c5f6(0xb5)][_0x40c5f6(0x112)](0x1)[_0x40c5f6(0x129)](_0x43c6fc=>_0x18067(_0x43c6fc,_0x9a7e5d['id']))};}return null;}let v=class{constructor(_0x12d242,_0x520726,_0x4743b2){const _0x3f2df2=_0x96b8fd;this[_0x3f2df2(0x12a)]=_0x12d242,this[_0x3f2df2(0xeb)]=_0x520726,this[_0x3f2df2(0xec)]=_0x4743b2;}async[_0x96b8fd(0x110)](_0x5abf77){const _0x12904d=_0x96b8fd;var _0x37b22e,_0x4eead9;let {parentId:_0xbb5545,unitId:_0x1d3867,text:_0x5eecd8,threadId:_0x52a1a3}=_0x5abf77,_0x4dbcb3=(_0x37b22e=(_0x4eead9=_0x5eecd8[_0x12904d(0x123)])==null?void 0x0:_0x4eead9['filter'](_0x41b406=>_0x41b406[_0x12904d(0xcc)]===n[_0x12904d(0xf2)][_0x12904d(0x134)])['map'](_0x569bb6=>_0x569bb6[_0x12904d(0x108)]))==null?[]:_0x37b22e,_0x5ddb0b=JSON['stringify'](_0x5eecd8),_0x13f8a6=(await this['_sessionService']['requireSession'](_0x1d3867))[_0x12904d(0xcd)]();if(_0xbb5545){let _0x1bad87={'memberId':_0x13f8a6,'unitId':_0x1d3867,'content':_0x5ddb0b,'mention':_0x4dbcb3,'threadId':_0x52a1a3},_0x276c2d=(await this[_0x12904d(0x12a)]['post']('/universer-api/comment/unit/'+_0x1d3867+'/reply',{'body':_0x1bad87}))[_0x12904d(0xf3)]['reply'];return{..._0x5abf77,'id':_0x276c2d['replyId'],'dT':(0x0,n[_0x12904d(0xfa)])(+_0x276c2d[_0x12904d(0x114)])[_0x12904d(0x113)](_0x12904d(0xee)),'personId':_0x276c2d[_0x12904d(0xea)]};}else{let _0x441f3e={'memberId':_0x13f8a6,'unitId':_0x1d3867,'content':_0x5ddb0b,'mention':_0x4dbcb3};return g((await this[_0x12904d(0x12a)]['post'](_0x12904d(0xbd)+_0x1d3867+'/add',{'body':_0x441f3e}))[_0x12904d(0xf3)][_0x12904d(0xe8)],_0x5abf77);}}async[_0x96b8fd(0xc0)](_0x5988bc){const _0x195d19=_0x96b8fd;var _0xc3d5fc,_0x2c9fda;let {text:_0xae25d6,unitId:_0x54b2fc}=_0x5988bc,_0x1fbee3=(_0xc3d5fc=(_0x2c9fda=_0xae25d6[_0x195d19(0x123)])==null?void 0x0:_0x2c9fda[_0x195d19(0xe7)](_0x2b3daa=>_0x2b3daa['rangeType']===n['CustomRangeType'][_0x195d19(0x134)])['map'](_0x1f4878=>_0x1f4878['rangeId']))==null?[]:_0xc3d5fc,_0x1ffa76=JSON[_0x195d19(0xc1)](_0xae25d6),_0x2fdc6c=_0x5988bc[_0x195d19(0x130)],_0x3c222a=_0x5988bc['id'],_0x5d5bd5={'memberId':(await this[_0x195d19(0xec)][_0x195d19(0x12f)](_0x54b2fc))['getMemberID'](),'unitId':_0x54b2fc,'threadId':_0x2fdc6c,'mention':_0x1fbee3,'content':_0x1ffa76,'replyId':_0x3c222a},_0x3c4a2d=await this[_0x195d19(0x12a)][_0x195d19(0xe1)](_0x195d19(0xbd)+_0x54b2fc+_0x195d19(0xed),{'body':_0x5d5bd5});return!_0x3c4a2d[_0x195d19(0xf3)]['error']||_0x3c4a2d[_0x195d19(0xf3)][_0x195d19(0xb3)][_0x195d19(0xb7)]===0x1;}async[_0x96b8fd(0xfd)](_0x3ab980){const _0x18d396=_0x96b8fd;let {unitId:_0x314c89}=_0x3ab980,_0x4b6ec0=_0x3ab980[_0x18d396(0x130)],_0xc46e6f={'memberId':this[_0x18d396(0xeb)][_0x18d396(0xfe)]()[_0x18d396(0x103)],'unitId':_0x314c89,'threadId':_0x4b6ec0,'solved':_0x3ab980[_0x18d396(0xd5)]?i['CommentSolvedStatus'][_0x18d396(0x105)]:i[_0x18d396(0xd4)][_0x18d396(0x12b)]},_0x2a74cd=await this[_0x18d396(0x12a)][_0x18d396(0xe1)](_0x18d396(0xbd)+_0x314c89+_0x18d396(0xbf),{'body':_0xc46e6f});return!_0x2a74cd[_0x18d396(0xf3)]['error']||_0x2a74cd['body'][_0x18d396(0xb3)][_0x18d396(0xb7)]===0x1;}async['deleteComment'](_0x13817b,_0x14f232,_0x1308f7,_0x5c3cc3){const _0x36ddc5=_0x96b8fd;let _0x5f0b6d={'memberId':(await this[_0x36ddc5(0xec)][_0x36ddc5(0x12f)](_0x13817b))[_0x36ddc5(0xcd)](),'threadId':_0x1308f7,'replyId':_0x5c3cc3,'unitId':_0x13817b},_0x22f165=await this[_0x36ddc5(0x12a)]['post']('/universer-api/comment/unit/'+_0x13817b+_0x36ddc5(0xc7),{'body':_0x5f0b6d});return!_0x22f165[_0x36ddc5(0xf3)][_0x36ddc5(0xb3)]||_0x22f165['body'][_0x36ddc5(0xb3)][_0x36ddc5(0xb7)]===0x1;}async[_0x96b8fd(0x11f)](_0x295224,_0xf252f,_0x2c31ef){const _0x5c2aac=_0x96b8fd;let _0x133f0d={'unitId':_0x295224,'threadId':_0x2c31ef},_0x4af7ae=await this[_0x5c2aac(0x12a)][_0x5c2aac(0xe1)](_0x5c2aac(0xbd)+_0x295224+_0x5c2aac(0xe2),{'body':_0x133f0d}),_0x165d5e=_0x2c31ef[_0x5c2aac(0x129)](_0x137a00=>_(_0x4af7ae[_0x5c2aac(0xf3)][_0x5c2aac(0xdf)][_0x137a00],_0x295224,_0xf252f))[_0x5c2aac(0xe7)](Boolean);return Object[_0x5c2aac(0xe3)](_0x4af7ae[_0x5c2aac(0xf3)][_0x5c2aac(0xfb)])[_0x5c2aac(0x135)](_0x23085d=>{const _0x16306f=_0x5c2aac;this[_0x16306f(0xeb)][_0x16306f(0xb0)](_0x23085d);}),_0x165d5e;}['saveCommentToSnapshot'](_0x2f58a5){const _0x221526=_0x96b8fd;return{'id':_0x2f58a5['id'],'threadId':_0x2f58a5['threadId'],'ref':_0x2f58a5[_0x221526(0x11e)]};}};v=m([p(0x0,(0x0,n[_0x96b8fd(0xf8)])(s[_0x96b8fd(0xdb)])),p(0x1,(0x0,n['Inject'])(n[_0x96b8fd(0x10d)])),p(0x2,(0x0,n[_0x96b8fd(0xf8)])(e[_0x96b8fd(0xf4)]))],v);let y=class extends n[_0x96b8fd(0x102)]{constructor(_0x1601de,_0x52a342){const _0x4141fe=_0x96b8fd;super(),this[_0x4141fe(0xde)]=_0x1601de,this['_threadCommentDataSource']=_0x52a342,this[_0x4141fe(0xdd)]();}[_0x96b8fd(0xdd)](){const _0x7a472=_0x96b8fd;this[_0x7a472(0xde)][_0x7a472(0x11b)]=this[_0x7a472(0xb9)],this[_0x7a472(0xde)][_0x7a472(0xe4)]=!0x1;}};y=m([p(0x0,a[_0x96b8fd(0xda)]),p(0x1,(0x0,n['Inject'])(v))],y);function b(_0x491587){'@babel/helpers - typeof';const _0x161b7c=_0x96b8fd;return b=typeof Symbol==_0x161b7c(0xd6)&&typeof Symbol[_0x161b7c(0x107)]=='symbol'?function(_0x427b8c){return typeof _0x427b8c;}:function(_0x34a3a6){const _0x4c4f4d=_0x161b7c;return _0x34a3a6&&typeof Symbol==_0x4c4f4d(0xd6)&&_0x34a3a6['constructor']===Symbol&&_0x34a3a6!==Symbol[_0x4c4f4d(0xbc)]?'symbol':typeof _0x34a3a6;},b(_0x491587);}function x(_0xe3bf9f,_0x3a99b8){const _0x306348=_0x96b8fd;if(b(_0xe3bf9f)!=_0x306348(0x126)||!_0xe3bf9f)return _0xe3bf9f;var _0x6d5393=_0xe3bf9f[Symbol[_0x306348(0xf1)]];if(_0x6d5393!==void 0x0){var _0x323268=_0x6d5393['call'](_0xe3bf9f,_0x3a99b8||_0x306348(0x122));if(b(_0x323268)!=_0x306348(0x126))return _0x323268;throw TypeError(_0x306348(0xd9));}return(_0x3a99b8===_0x306348(0x109)?String:Number)(_0xe3bf9f);}function S(_0x233aaf){const _0x639b7=_0x96b8fd;var _0x1c8453=x(_0x233aaf,_0x639b7(0x109));return b(_0x1c8453)==_0x639b7(0xb8)?_0x1c8453:_0x1c8453+'';}function C(_0x2fa8a6,_0x1017ea,_0x120d36){const _0x31dfea=_0x96b8fd;return(_0x1017ea=S(_0x1017ea))in _0x2fa8a6?Object[_0x31dfea(0x128)](_0x2fa8a6,_0x1017ea,{'value':_0x120d36,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2fa8a6[_0x1017ea]=_0x120d36,_0x2fa8a6;}let w=class extends n[_0x96b8fd(0xb1)]{constructor(_0x3bcfa8=u,_0x5a7f06,_0x450965){const _0x36ecc4=_0x96b8fd;super(),this[_0x36ecc4(0xe9)]=_0x3bcfa8,this[_0x36ecc4(0xc3)]=_0x5a7f06,this[_0x36ecc4(0xd1)]=_0x450965;let {..._0x267efb}=(0x0,n['merge'])({},u,this['_config']);this[_0x36ecc4(0xd1)][_0x36ecc4(0xf7)]('thread-comment-data-source.config',_0x267efb);}[_0x96b8fd(0xe5)](){const _0x3100d3=_0x96b8fd;[[v],[y],[h]][_0x3100d3(0x135)](_0x16184b=>{const _0x46107f=_0x3100d3;this[_0x46107f(0xc3)][_0x46107f(0xcb)](_0x16184b);});}[_0x96b8fd(0xb6)](){const _0x5a397e=_0x96b8fd;this['_injector'][_0x5a397e(0x120)](y),this['_injector']['get'](h);}};C(w,_0x96b8fd(0xd2),_0x96b8fd(0x10a)),C(w,_0x96b8fd(0xf0),c),C(w,_0x96b8fd(0x106),l),w=m([(0x0,n[_0x96b8fd(0xb4)])(r[_0x96b8fd(0xe0)],e[_0x96b8fd(0x12c)],t['UniverLicensePlugin']),p(0x1,(0x0,n[_0x96b8fd(0xf8)])(n[_0x96b8fd(0xef)])),p(0x2,n[_0x96b8fd(0xd8)])],w),Object['defineProperty'](exports,_0x96b8fd(0xc4),{'enumerable':!0x0,'get':function(){return w;}});
1
+ const _0x31cfb2=_0x7901;(function(_0xaebdbb,_0x267d1c){const _0x3a9edf=_0x7901,_0x10c3d0=_0xaebdbb();while(!![]){try{const _0x39da26=parseInt(_0x3a9edf(0x87))/0x1*(parseInt(_0x3a9edf(0xb6))/0x2)+parseInt(_0x3a9edf(0x72))/0x3*(parseInt(_0x3a9edf(0xc4))/0x4)+parseInt(_0x3a9edf(0xaf))/0x5*(-parseInt(_0x3a9edf(0xc3))/0x6)+parseInt(_0x3a9edf(0xce))/0x7+-parseInt(_0x3a9edf(0x8d))/0x8*(parseInt(_0x3a9edf(0xee))/0x9)+-parseInt(_0x3a9edf(0x96))/0xa+-parseInt(_0x3a9edf(0x9d))/0xb;if(_0x39da26===_0x267d1c)break;else _0x10c3d0['push'](_0x10c3d0['shift']());}catch(_0x19936f){_0x10c3d0['push'](_0x10c3d0['shift']());}}}(_0x2594,0xcb404),Object[_0x31cfb2(0x81)](exports,Symbol[_0x31cfb2(0xeb)],{'value':_0x31cfb2(0x7c)}));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=_0x31cfb2(0x7e),l=_0x31cfb2(0xa5);const u={},d=_0x58e73f=>(0x0,n['dateKit'])(new Date(+_0x58e73f))[_0x31cfb2(0xef)](_0x31cfb2(0xcc)),f=async(_0x7ce3be,_0x457a45)=>{const _0x1c5535=_0x31cfb2;let _0x2cd011=_0x7ce3be[_0x1c5535(0x8c)](n['UserManagerService']),_0x2913e3=_0x7ce3be[_0x1c5535(0x8c)](s['HTTPService']);_0x457a45[_0x1c5535(0xc1)](_0xd808fa=>{const _0x27bb49=_0x1c5535;_0x2cd011[_0x27bb49(0xab)](_0xd808fa)&&_0x457a45['delete'](_0xd808fa);}),_0x457a45[_0x1c5535(0xb0)]&&(await _0x2913e3[_0x1c5535(0x8c)](_0x1c5535(0xc2),{'params':{'userIDs':[..._0x457a45]}}))[_0x1c5535(0x75)][_0x1c5535(0xe4)][_0x1c5535(0xc1)](_0x383148=>{_0x383148&&_0x2cd011['addUser'](_0x383148);});};function p(_0x37c658,_0x227bac){return function(_0x38bbec,_0x1ab8b4){_0x227bac(_0x38bbec,_0x1ab8b4,_0x37c658);};}function _0x7901(_0x2ed633,_0x2b1c6a){_0x2ed633=_0x2ed633-0x72;const _0x25948f=_0x2594();let _0x790115=_0x25948f[_0x2ed633];return _0x790115;}function m(_0x7c896b,_0x27e0bb,_0x2ee9a0,_0xa9afc0){const _0x3122af=_0x31cfb2;var _0x87244d=arguments[_0x3122af(0xec)],_0x24700d=_0x87244d<0x3?_0x27e0bb:_0xa9afc0===null?_0xa9afc0=Object[_0x3122af(0x97)](_0x27e0bb,_0x2ee9a0):_0xa9afc0,_0x5c7e21;if(typeof Reflect==_0x3122af(0x9b)&&typeof Reflect[_0x3122af(0xc7)]==_0x3122af(0xd8))_0x24700d=Reflect['decorate'](_0x7c896b,_0x27e0bb,_0x2ee9a0,_0xa9afc0);else{for(var _0x1b3620=_0x7c896b[_0x3122af(0xec)]-0x1;_0x1b3620>=0x0;_0x1b3620--)(_0x5c7e21=_0x7c896b[_0x1b3620])&&(_0x24700d=(_0x87244d<0x3?_0x5c7e21(_0x24700d):_0x87244d>0x3?_0x5c7e21(_0x27e0bb,_0x2ee9a0,_0x24700d):_0x5c7e21(_0x27e0bb,_0x2ee9a0))||_0x24700d);}return _0x87244d>0x3&&_0x24700d&&Object['defineProperty'](_0x27e0bb,_0x2ee9a0,_0x24700d),_0x24700d;}let h=class extends n[_0x31cfb2(0xc6)]{constructor(_0x35c79d,_0x420df4,_0x4b06c7,_0x4500ea){const _0x4ea765=_0x31cfb2;super(),this[_0x4ea765(0x8e)]=_0x35c79d,this[_0x4ea765(0xe7)]=_0x420df4,this['_userService']=_0x4b06c7,this[_0x4ea765(0x7b)]=_0x4500ea,this[_0x4ea765(0xd4)](),this[_0x4ea765(0xbe)]();}[_0x31cfb2(0xbe)](){const _0x56ff14=_0x31cfb2;this[_0x56ff14(0xaa)](this[_0x56ff14(0xe7)][_0x56ff14(0xa7)][_0x56ff14(0xf2)]((0x0,o[_0x56ff14(0xa6)])(0x10))[_0x56ff14(0xe5)](_0x4a16c2=>{const _0x42fdd9=_0x56ff14;let _0x3e6c99=new Set();_0x4a16c2[_0x42fdd9(0xc1)](_0x550f58=>{const _0x1488ee=_0x42fdd9;switch(_0x550f58[_0x1488ee(0xa9)]){case _0x1488ee(0x77):{let _0x54804e=_0x550f58[_0x1488ee(0xdf)][_0x1488ee(0xd3)];_0x3e6c99[_0x1488ee(0x77)](_0x54804e);break;}default:break;}}),f(this[_0x42fdd9(0x7b)],_0x3e6c99);}));}['_init'](){const _0x1c6b77=_0x31cfb2;this[_0x1c6b77(0xaa)](this[_0x1c6b77(0x8e)][_0x1c6b77(0xa7)][_0x1c6b77(0xe5)](async _0x187413=>{const _0x42afce=_0x1c6b77;var _0x2f04a2;let _0x1a3862=(_0x2f04a2=this[_0x42afce(0xe7)][_0x42afce(0xbd)](_0x187413[_0x42afce(0xe9)])[_0x42afce(0xd9)](_0x1ae5ba=>_0x1ae5ba[_0x42afce(0xe8)]===_0x187413[_0x42afce(0xe8)]))==null?void 0x0:_0x2f04a2['root'];if(!_0x1a3862)return;let {unitId:_0xe8529d,subUnitId:_0x1773d8}=_0x1a3862;switch(_0x187413[_0x42afce(0xa3)]&&this[_0x42afce(0xac)][_0x42afce(0x76)](_0x187413[_0x42afce(0xa3)]),_0x187413['type']){case i[_0x42afce(0xae)][_0x42afce(0xd2)]:break;case i[_0x42afce(0xae)]['Reply']:var _0x3ef065,_0x2a11d0;this['_threadCommentModel'][_0x42afce(0x82)](_0xe8529d,_0x1773d8,{'unitId':_0xe8529d,'subUnitId':_0x1773d8,'ref':'','id':_0x187413[_0x42afce(0xcb)],'dT':d(+_0x187413[_0x42afce(0xda)]),'threadId':_0x187413[_0x42afce(0xe8)],'personId':(_0x3ef065=(_0x2a11d0=_0x187413[_0x42afce(0xa3)])==null?void 0x0:_0x2a11d0[_0x42afce(0x86)])==null?_0x187413['userId']:_0x3ef065,'text':JSON['parse'](_0x187413['content']),'parentId':_0x1a3862['id']});break;case i[_0x42afce(0xae)]['Delete']:{let _0x4c4a8d=this[_0x42afce(0xe7)]['getComment'](_0xe8529d,_0x1773d8,_0x187413[_0x42afce(0xcb)]);_0x4c4a8d&&_0x4c4a8d[_0x42afce(0x7f)]&&this[_0x42afce(0xe7)][_0x42afce(0x88)](_0xe8529d,_0x1773d8,_0x187413[_0x42afce(0xcb)]);break;}case i[_0x42afce(0xae)][_0x42afce(0xcf)]:this['_threadCommentModel'][_0x42afce(0xca)](_0xe8529d,_0x1773d8,{'commentId':_0x187413[_0x42afce(0xcb)],'text':JSON[_0x42afce(0xbf)](_0x187413[_0x42afce(0x7d)])});break;case i['CommentUpdateEventType'][_0x42afce(0xf3)]:{var _0x376fa6;let _0x4b91db=(_0x376fa6=this['_threadCommentModel'][_0x42afce(0xbd)](_0x187413[_0x42afce(0xe9)])[_0x42afce(0xd9)](_0x170bf3=>_0x170bf3[_0x42afce(0xe8)]===_0x187413['threadId']))==null?void 0x0:_0x376fa6[_0x42afce(0x83)];_0x4b91db&&this[_0x42afce(0xe7)][_0x42afce(0x73)](_0xe8529d,_0x1773d8,_0x4b91db['id'],_0x187413['solved']===i[_0x42afce(0xf6)][_0x42afce(0xde)]);break;}default:break;}}));}};h=m([p(0x0,(0x0,n['Inject'])(e[_0x31cfb2(0x80)])),p(0x1,(0x0,n['Inject'])(a[_0x31cfb2(0xe3)])),p(0x2,(0x0,n[_0x31cfb2(0xb8)])(n[_0x31cfb2(0xa1)])),p(0x3,(0x0,n[_0x31cfb2(0xb8)])(n[_0x31cfb2(0xe1)]))],h);function g(_0x390918,_0x3d4d2a){const _0x34cc98=_0x31cfb2;let _0x372615=_0x390918[_0x34cc98(0xdd)][0x0];return{..._0x3d4d2a,'id':_0x372615[_0x34cc98(0xcb)],'resolved':_0x390918[_0x34cc98(0xd7)]===0x1,'dT':d(_0x372615[_0x34cc98(0xda)]),'personId':_0x372615[_0x34cc98(0xb3)],'threadId':_0x372615[_0x34cc98(0xe8)]};}function _(_0x5de178,_0x16ff02,_0x306203){const _0xf747da=_0x31cfb2;var _0x28ac61,_0x5847bd;if(((_0x28ac61=_0x5de178==null||(_0x5847bd=_0x5de178[_0xf747da(0xdd)])==null?void 0x0:_0x5847bd[_0xf747da(0xec)])==null?0x0:_0x28ac61)>0x0){let _0x4b8176=(_0x5b2758,_0x2cd32d)=>({'id':_0x5b2758[_0xf747da(0xcb)],'threadId':_0x5b2758[_0xf747da(0xe8)],'dT':d(_0x5b2758[_0xf747da(0xda)]),'personId':_0x5b2758[_0xf747da(0xb3)],'resolved':_0x5de178[_0xf747da(0xd7)]===i['CommentSolvedStatus'][_0xf747da(0xde)],'unitId':_0x16ff02,'subUnitId':_0x306203,'text':JSON[_0xf747da(0xbf)](_0x5b2758[_0xf747da(0x7d)]),'parentId':_0x2cd32d}),_0x5c91b0=_0x4b8176(_0x5de178[_0xf747da(0xdd)][0x0]);return{..._0x5c91b0,'children':_0x5de178[_0xf747da(0xdd)][_0xf747da(0xd0)](0x1)[_0xf747da(0xf5)](_0x443e9f=>_0x4b8176(_0x443e9f,_0x5c91b0['id']))};}return null;}let v=class{constructor(_0x277742,_0x386c18,_0x3c507d){const _0xaf1bff=_0x31cfb2;this[_0xaf1bff(0x8a)]=_0x277742,this['_userService']=_0x386c18,this['_sessionService']=_0x3c507d;}async[_0x31cfb2(0x82)](_0xbb0c84){const _0x5dd3d6=_0x31cfb2;var _0x37ba2f,_0x5c3941;let {parentId:_0xbeadfb,unitId:_0x54d754,text:_0x42331d,threadId:_0x3c15ef}=_0xbb0c84,_0x3b1a55=(_0x37ba2f=(_0x5c3941=_0x42331d['customRanges'])==null?void 0x0:_0x5c3941[_0x5dd3d6(0x98)](_0x32800e=>_0x32800e['rangeType']===n[_0x5dd3d6(0xf8)][_0x5dd3d6(0xb9)])[_0x5dd3d6(0xf5)](_0x4f2c13=>_0x4f2c13[_0x5dd3d6(0xcd)]))==null?[]:_0x37ba2f,_0x395606=JSON[_0x5dd3d6(0x89)](_0x42331d),_0x3225fb=(await this[_0x5dd3d6(0xe0)]['requireSession'](_0x54d754))[_0x5dd3d6(0x79)]();if(_0xbeadfb){let _0xb25927={'memberId':_0x3225fb,'unitId':_0x54d754,'content':_0x395606,'mention':_0x3b1a55,'threadId':_0x3c15ef},_0x88739b=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x54d754+'/reply',{'body':_0xb25927}))['body']['reply'];return{..._0xbb0c84,'id':_0x88739b[_0x5dd3d6(0xcb)],'dT':(0x0,n[_0x5dd3d6(0xf7)])(+_0x88739b['createTimestamp'])[_0x5dd3d6(0xef)](_0x5dd3d6(0xcc)),'personId':_0x88739b['userId']};}else{let _0x234d28={'memberId':_0x3225fb,'unitId':_0x54d754,'content':_0x395606,'mention':_0x3b1a55};return g((await this[_0x5dd3d6(0x8a)][_0x5dd3d6(0xb7)](_0x5dd3d6(0x95)+_0x54d754+_0x5dd3d6(0xd1),{'body':_0x234d28}))[_0x5dd3d6(0x75)][_0x5dd3d6(0x85)],_0xbb0c84);}}async[_0x31cfb2(0xca)](_0x34107d){const _0x28148e=_0x31cfb2;var _0x14b274,_0x43f0de;let {text:_0x386ef6,unitId:_0x4f4f9f}=_0x34107d,_0x31f1ba=(_0x14b274=(_0x43f0de=_0x386ef6[_0x28148e(0xb2)])==null?void 0x0:_0x43f0de[_0x28148e(0x98)](_0x34b923=>_0x34b923[_0x28148e(0xd6)]===n['CustomRangeType']['COMMENT'])[_0x28148e(0xf5)](_0x11e0a7=>_0x11e0a7[_0x28148e(0xcd)]))==null?[]:_0x14b274,_0x14039a=JSON[_0x28148e(0x89)](_0x386ef6),_0x139f39=_0x34107d['threadId'],_0x4beaed=_0x34107d['id'],_0x3c0bf2={'memberId':(await this[_0x28148e(0xe0)]['requireSession'](_0x4f4f9f))[_0x28148e(0x79)](),'unitId':_0x4f4f9f,'threadId':_0x139f39,'mention':_0x31f1ba,'content':_0x14039a,'replyId':_0x4beaed},_0x3f21a0=await this['_httpService'][_0x28148e(0xb7)](_0x28148e(0x95)+_0x4f4f9f+_0x28148e(0xb1),{'body':_0x3c0bf2});return!_0x3f21a0[_0x28148e(0x75)][_0x28148e(0x9a)]||_0x3f21a0['body'][_0x28148e(0x9a)][_0x28148e(0xc5)]===0x1;}async['resolveComment'](_0x2b053d){const _0x26014e=_0x31cfb2;let {unitId:_0x5bb4bf}=_0x2b053d,_0x5b243d=_0x2b053d[_0x26014e(0xe8)],_0x3b4758={'memberId':this[_0x26014e(0xac)][_0x26014e(0xb5)]()[_0x26014e(0x86)],'unitId':_0x5bb4bf,'threadId':_0x5b243d,'solved':_0x2b053d['resolved']?i[_0x26014e(0xf6)][_0x26014e(0xde)]:i[_0x26014e(0xf6)][_0x26014e(0x8b)]},_0x3f5b22=await this[_0x26014e(0x8a)]['post'](_0x26014e(0x95)+_0x5bb4bf+_0x26014e(0xdb),{'body':_0x3b4758});return!_0x3f5b22[_0x26014e(0x75)]['error']||_0x3f5b22[_0x26014e(0x75)][_0x26014e(0x9a)][_0x26014e(0xc5)]===0x1;}async['deleteComment'](_0x1ef432,_0x578caf,_0xb125a8,_0x89904e){const _0xd2bc65=_0x31cfb2;let _0x10154d={'memberId':(await this[_0xd2bc65(0xe0)][_0xd2bc65(0xe2)](_0x1ef432))[_0xd2bc65(0x79)](),'threadId':_0xb125a8,'replyId':_0x89904e,'unitId':_0x1ef432},_0x2b6d32=await this['_httpService']['post'](_0xd2bc65(0x95)+_0x1ef432+_0xd2bc65(0xf0),{'body':_0x10154d});return!_0x2b6d32['body'][_0xd2bc65(0x9a)]||_0x2b6d32[_0xd2bc65(0x75)][_0xd2bc65(0x9a)][_0xd2bc65(0xc5)]===0x1;}async[_0x31cfb2(0xf4)](_0x3e3fec,_0xea6a7f,_0xe0a096){const _0x4e861a=_0x31cfb2;let _0x50aa9d={'unitId':_0x3e3fec,'threadId':_0xe0a096},_0x3576d2=await this[_0x4e861a(0x8a)][_0x4e861a(0xb7)](_0x4e861a(0x95)+_0x3e3fec+'/list',{'body':_0x50aa9d}),_0x130a2e=_0xe0a096[_0x4e861a(0xf5)](_0x21c167=>_(_0x3576d2[_0x4e861a(0x75)][_0x4e861a(0xf1)][_0x21c167],_0x3e3fec,_0xea6a7f))['filter'](Boolean);return Object['values'](_0x3576d2[_0x4e861a(0x75)][_0x4e861a(0xe4)])[_0x4e861a(0xc1)](_0x230e62=>{this['_userService']['addUser'](_0x230e62);}),_0x130a2e;}[_0x31cfb2(0x91)](_0x4c25bd){const _0x1e4e6d=_0x31cfb2;return{'id':_0x4c25bd['id'],'threadId':_0x4c25bd[_0x1e4e6d(0xe8)],'ref':_0x4c25bd[_0x1e4e6d(0xf9)]};}};function _0x2594(){const _0xd8c75=['UniverLicensePlugin','8012619zWcJpR','format','/delete','comments','pipe','Solve','listComments','map','CommentSolvedStatus','dateKit','CustomRangeType','ref','3856731SulUaY','resolveComment','thread-comment-data-source.config','body','addUser','add','onReady','getMemberID','syncUpdateMutationToColla','_injector','Module','content','@univerjs-pro/thread-comment-datasource','parentId','CommentService','defineProperty','addComment','root','setConfig','comment','userID','10mWvsnO','deleteComment','stringify','_httpService','OpenOrReOpen','get','8vEKrWu','_commentService','_initDataSource','_threadCommentDataSource','saveCommentToSnapshot','toPrimitive','constructor','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','1471050NRDapi','getOwnPropertyDescriptor','filter','merge','error','object','UniverCollaborationClientPlugin','11852434PpiFpR','call','onStarting','string','UserManagerService','symbol','user','CollaborationSessionService','1.0.0-alpha.5','bufferTime','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','disposeWithMe','getUser','_userService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','CommentUpdateEventType','45zicOar','size','/edit','customRanges','userId','DependentOn','getCurrentUser','270268HszrZx','post','Inject','COMMENT','_threadCommentDataSourceService','pluginName','default','getUnit','_initUserSync','parse','IThreadCommentDataSourceService','forEach','/universer-api/user/list','235698qerhgJ','4PZkrUM','code','Disposable','decorate','_configService','UniverThreadCommentUIPlugin','updateComment','replyId','YYYY/MM/DD\x20HH:mm','rangeId','4648252eCHGGy','Edit','slice','/add','Add','personId','_init','Plugin','rangeType','solved','function','find','createTimestamp','/solved','version','replies','Solved','payload','_sessionService','Injector','requireSession','ThreadCommentModel','users','subscribe','iterator','_threadCommentModel','threadId','unitId','dataSource','toStringTag','length'];_0x2594=function(){return _0xd8c75;};return _0x2594();}v=m([p(0x0,(0x0,n['Inject'])(s['HTTPService'])),p(0x1,(0x0,n[_0x31cfb2(0xb8)])(n[_0x31cfb2(0xa1)])),p(0x2,(0x0,n[_0x31cfb2(0xb8)])(e[_0x31cfb2(0xa4)]))],v);let y=class extends n[_0x31cfb2(0xc6)]{constructor(_0x55b788,_0x119e72){const _0x52e511=_0x31cfb2;super(),this[_0x52e511(0xba)]=_0x55b788,this[_0x52e511(0x90)]=_0x119e72,this[_0x52e511(0x8f)]();}[_0x31cfb2(0x8f)](){const _0x3db76a=_0x31cfb2;this[_0x3db76a(0xba)][_0x3db76a(0xea)]=this[_0x3db76a(0x90)],this['_threadCommentDataSourceService'][_0x3db76a(0x7a)]=!0x1;}};y=m([p(0x0,a[_0x31cfb2(0xc0)]),p(0x1,(0x0,n[_0x31cfb2(0xb8)])(v))],y);function b(_0x3fc0ab){'@babel/helpers - typeof';const _0x5562d7=_0x31cfb2;return b=typeof Symbol==_0x5562d7(0xd8)&&typeof Symbol[_0x5562d7(0xe6)]=='symbol'?function(_0x51edd6){return typeof _0x51edd6;}:function(_0x1c08df){const _0x500219=_0x5562d7;return _0x1c08df&&typeof Symbol==_0x500219(0xd8)&&_0x1c08df[_0x500219(0x93)]===Symbol&&_0x1c08df!==Symbol['prototype']?_0x500219(0xa2):typeof _0x1c08df;},b(_0x3fc0ab);}function x(_0x2f1095,_0x5c98a2){const _0x3ca0d7=_0x31cfb2;if(b(_0x2f1095)!=_0x3ca0d7(0x9b)||!_0x2f1095)return _0x2f1095;var _0x2853af=_0x2f1095[Symbol[_0x3ca0d7(0x92)]];if(_0x2853af!==void 0x0){var _0x29f5ec=_0x2853af[_0x3ca0d7(0x9e)](_0x2f1095,_0x5c98a2||_0x3ca0d7(0xbc));if(b(_0x29f5ec)!=_0x3ca0d7(0x9b))return _0x29f5ec;throw TypeError(_0x3ca0d7(0xad));}return(_0x5c98a2===_0x3ca0d7(0xa0)?String:Number)(_0x2f1095);}function S(_0x4048b6){const _0x2e11a3=_0x31cfb2;var _0x200fb3=x(_0x4048b6,_0x2e11a3(0xa0));return b(_0x200fb3)==_0x2e11a3(0xa2)?_0x200fb3:_0x200fb3+'';}function C(_0x103e79,_0x18ee34,_0x233b50){const _0x29c405=_0x31cfb2;return(_0x18ee34=S(_0x18ee34))in _0x103e79?Object[_0x29c405(0x81)](_0x103e79,_0x18ee34,{'value':_0x233b50,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x103e79[_0x18ee34]=_0x233b50,_0x103e79;}let w=class extends n[_0x31cfb2(0xd5)]{constructor(_0x104f0b=u,_0x5e76b2,_0x8678b6){const _0x39e5b0=_0x31cfb2;super(),this['_config']=_0x104f0b,this['_injector']=_0x5e76b2,this[_0x39e5b0(0xc8)]=_0x8678b6;let {..._0x3cbe9c}=(0x0,n[_0x39e5b0(0x99)])({},u,this['_config']);this['_configService'][_0x39e5b0(0x84)](_0x39e5b0(0x74),_0x3cbe9c);}[_0x31cfb2(0x9f)](){const _0xf7b215=_0x31cfb2;[[v],[y],[h]][_0xf7b215(0xc1)](_0xf85ee0=>{const _0x5a1825=_0xf7b215;this[_0x5a1825(0x7b)][_0x5a1825(0x77)](_0xf85ee0);});}[_0x31cfb2(0x78)](){const _0x29c314=_0x31cfb2;this[_0x29c314(0x7b)][_0x29c314(0x8c)](y),this[_0x29c314(0x7b)]['get'](h);}};C(w,_0x31cfb2(0xbb),_0x31cfb2(0xa8)),C(w,'packageName',c),C(w,_0x31cfb2(0xdc),l),w=m([(0x0,n[_0x31cfb2(0xb4)])(r[_0x31cfb2(0xc9)],e[_0x31cfb2(0x9c)],t[_0x31cfb2(0xed)]),p(0x1,(0x0,n[_0x31cfb2(0xb8)])(n[_0x31cfb2(0xe1)])),p(0x2,n['IConfigService'])],w),Object[_0x31cfb2(0x81)](exports,_0x31cfb2(0x94),{'enumerable':!0x0,'get':function(){return w;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2bf071=_0x2e04;(function(_0x53ffe2,_0x554073){const _0x1d2027=_0x2e04,_0x362acf=_0x53ffe2();while(!![]){try{const _0x2bcea9=parseInt(_0x1d2027(0xc2))/0x1*(parseInt(_0x1d2027(0xc4))/0x2)+parseInt(_0x1d2027(0xe2))/0x3+-parseInt(_0x1d2027(0xa7))/0x4+parseInt(_0x1d2027(0xab))/0x5+-parseInt(_0x1d2027(0x98))/0x6*(parseInt(_0x1d2027(0xc3))/0x7)+parseInt(_0x1d2027(0xa8))/0x8*(-parseInt(_0x1d2027(0xda))/0x9)+parseInt(_0x1d2027(0xb8))/0xa*(parseInt(_0x1d2027(0xc0))/0xb);if(_0x2bcea9===_0x554073)break;else _0x362acf['push'](_0x362acf['shift']());}catch(_0x1ebd6a){_0x362acf['push'](_0x362acf['shift']());}}}(_0x3e8a,0x33dc2));import{CollaborationSessionService as _0x57e2d4,CommentService as _0x587643,UniverCollaborationClientPlugin as _0x274af5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x239c9c}from'@univerjs-pro/license';import{CustomRangeType as _0x5a195a,DependentOn as _0x91861d,Disposable as _0x4779d9,IConfigService as _0x7b49f5,Inject as _0x46a0e3,Injector as _0x1404d1,Plugin as _0x1a2f1d,UserManagerService as _0x3bad2a,dateKit as _0x20410a,merge as _0x37fe87}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c4fd2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x539f3c,CommentUpdateEventType as _0x292590}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x34873a,ThreadCommentModel as _0x30174f}from'@univerjs/thread-comment';import{bufferTime as _0x46ad19}from'rxjs';import{HTTPService as _0x114486}from'@univerjs/network';var x=_0x2bf071(0xa4),S=_0x2bf071(0x88);const C={},w=_0x5da229=>_0x20410a(new Date(+_0x5da229))[_0x2bf071(0xf2)]('YYYY/MM/DD\x20HH:mm'),T=async(_0x535434,_0x3df526)=>{const _0x4794b5=_0x2bf071;let _0x15513f=_0x535434['get'](_0x3bad2a),_0x55a98a=_0x535434[_0x4794b5(0xdf)](_0x114486);_0x3df526[_0x4794b5(0xcf)](_0x922347=>{const _0x290670=_0x4794b5;_0x15513f[_0x290670(0xca)](_0x922347)&&_0x3df526[_0x290670(0x9b)](_0x922347);}),_0x3df526['size']&&(await _0x55a98a[_0x4794b5(0xdf)](_0x4794b5(0xe1),{'params':{'userIDs':[..._0x3df526]}}))[_0x4794b5(0xa9)][_0x4794b5(0x9f)]['forEach'](_0x3a3c8b=>{const _0x48ad69=_0x4794b5;_0x3a3c8b&&_0x15513f[_0x48ad69(0xb7)](_0x3a3c8b);});};function E(_0x14f858,_0x3f2718){return function(_0x3a5ff6,_0x3dd4e2){_0x3f2718(_0x3a5ff6,_0x3dd4e2,_0x14f858);};}function D(_0xeeba13,_0x359e9d,_0x3f3070,_0x28cc68){const _0x50cee3=_0x2bf071;var _0x227b82=arguments[_0x50cee3(0x9c)],_0x45f8bc=_0x227b82<0x3?_0x359e9d:_0x28cc68===null?_0x28cc68=Object[_0x50cee3(0xa5)](_0x359e9d,_0x3f3070):_0x28cc68,_0x2176ab;if(typeof Reflect==_0x50cee3(0xee)&&typeof Reflect[_0x50cee3(0xa2)]==_0x50cee3(0xd8))_0x45f8bc=Reflect[_0x50cee3(0xa2)](_0xeeba13,_0x359e9d,_0x3f3070,_0x28cc68);else{for(var _0x4a8f32=_0xeeba13[_0x50cee3(0x9c)]-0x1;_0x4a8f32>=0x0;_0x4a8f32--)(_0x2176ab=_0xeeba13[_0x4a8f32])&&(_0x45f8bc=(_0x227b82<0x3?_0x2176ab(_0x45f8bc):_0x227b82>0x3?_0x2176ab(_0x359e9d,_0x3f3070,_0x45f8bc):_0x2176ab(_0x359e9d,_0x3f3070))||_0x45f8bc);}return _0x227b82>0x3&&_0x45f8bc&&Object['defineProperty'](_0x359e9d,_0x3f3070,_0x45f8bc),_0x45f8bc;}let O=class extends _0x4779d9{constructor(_0xf66233,_0x13ab6f,_0x400415,_0xbaf923){const _0x4a7ca0=_0x2bf071;super(),this['_commentService']=_0xf66233,this[_0x4a7ca0(0xad)]=_0x13ab6f,this[_0x4a7ca0(0x95)]=_0x400415,this['_injector']=_0xbaf923,this['_init'](),this[_0x4a7ca0(0x9a)]();}[_0x2bf071(0x9a)](){const _0x1eb7a1=_0x2bf071;this['disposeWithMe'](this[_0x1eb7a1(0xad)][_0x1eb7a1(0x99)][_0x1eb7a1(0xdd)](_0x46ad19(0x10))[_0x1eb7a1(0x85)](_0x4c4fc1=>{const _0x3fc5f9=_0x1eb7a1;let _0x3d1376=new Set();_0x4c4fc1[_0x3fc5f9(0xcf)](_0x1ab0b8=>{const _0x46c719=_0x3fc5f9;switch(_0x1ab0b8[_0x46c719(0xa1)]){case _0x46c719(0xcb):{let _0x243590=_0x1ab0b8[_0x46c719(0xe9)]['personId'];_0x3d1376[_0x46c719(0xcb)](_0x243590);break;}default:break;}}),T(this[_0x3fc5f9(0xaa)],_0x3d1376);}));}[_0x2bf071(0xf7)](){const _0x2f1483=_0x2bf071;this['disposeWithMe'](this[_0x2f1483(0xf6)][_0x2f1483(0x99)][_0x2f1483(0x85)](async _0x5c35c0=>{const _0x451e05=_0x2f1483;var _0x362066;let _0x1620d3=(_0x362066=this[_0x451e05(0xad)][_0x451e05(0xb6)](_0x5c35c0[_0x451e05(0x96)])[_0x451e05(0xdc)](_0x28e8fd=>_0x28e8fd[_0x451e05(0x8e)]===_0x5c35c0['threadId']))==null?void 0x0:_0x362066['root'];if(!_0x1620d3)return;let {unitId:_0x5b2b82,subUnitId:_0x6f7ebe}=_0x1620d3;switch(_0x5c35c0[_0x451e05(0x97)]&&this[_0x451e05(0x95)][_0x451e05(0xb7)](_0x5c35c0[_0x451e05(0x97)]),_0x5c35c0[_0x451e05(0xa1)]){case _0x292590[_0x451e05(0xe5)]:break;case _0x292590[_0x451e05(0xa6)]:var _0x525f5f,_0x3bf43f;this[_0x451e05(0xad)]['addComment'](_0x5b2b82,_0x6f7ebe,{'unitId':_0x5b2b82,'subUnitId':_0x6f7ebe,'ref':'','id':_0x5c35c0[_0x451e05(0xbc)],'dT':w(+_0x5c35c0[_0x451e05(0xd7)]),'threadId':_0x5c35c0[_0x451e05(0x8e)],'personId':(_0x525f5f=(_0x3bf43f=_0x5c35c0[_0x451e05(0x97)])==null?void 0x0:_0x3bf43f['userID'])==null?_0x5c35c0['userId']:_0x525f5f,'text':JSON[_0x451e05(0xe6)](_0x5c35c0['content']),'parentId':_0x1620d3['id']});break;case _0x292590[_0x451e05(0xed)]:{let _0x5b1451=this[_0x451e05(0xad)][_0x451e05(0xaf)](_0x5b2b82,_0x6f7ebe,_0x5c35c0['replyId']);_0x5b1451&&_0x5b1451[_0x451e05(0xd6)]&&this[_0x451e05(0xad)][_0x451e05(0xd4)](_0x5b2b82,_0x6f7ebe,_0x5c35c0[_0x451e05(0xbc)]);break;}case _0x292590[_0x451e05(0xec)]:this[_0x451e05(0xad)][_0x451e05(0xc7)](_0x5b2b82,_0x6f7ebe,{'commentId':_0x5c35c0[_0x451e05(0xbc)],'text':JSON[_0x451e05(0xe6)](_0x5c35c0[_0x451e05(0x9e)])});break;case _0x292590[_0x451e05(0x93)]:{var _0xbe141b;let _0x4e9001=(_0xbe141b=this[_0x451e05(0xad)][_0x451e05(0xb6)](_0x5c35c0['unitId'])[_0x451e05(0xdc)](_0x38daa8=>_0x38daa8[_0x451e05(0x8e)]===_0x5c35c0[_0x451e05(0x8e)]))==null?void 0x0:_0xbe141b[_0x451e05(0xbb)];_0x4e9001&&this[_0x451e05(0xad)][_0x451e05(0xba)](_0x5b2b82,_0x6f7ebe,_0x4e9001['id'],_0x5c35c0[_0x451e05(0xeb)]===_0x539f3c[_0x451e05(0xf8)]);break;}default:break;}}));}};O=D([E(0x0,_0x46a0e3(_0x587643)),E(0x1,_0x46a0e3(_0x30174f)),E(0x2,_0x46a0e3(_0x3bad2a)),E(0x3,_0x46a0e3(_0x1404d1))],O);function _0x3e8a(){const _0x34fd4b=['/list','get','syncUpdateMutationToColla','/universer-api/user/list','71880sVarcg','iterator','addComment','Add','parse','onStarting','requireSession','payload','YYYY/MM/DD\x20HH:mm','solved','Edit','Delete','object','setConfig','symbol','stringify','format','/universer-api/comment/unit/','version','getMemberID','_commentService','_init','Solved','subscribe','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1.0.0-alpha.3','_httpService','_threadCommentDataSourceService','values','dataSource','comments','threadId','resolved','prototype','rangeId','packageName','Solve','thread-comment-data-source.config','_userService','unitId','user','624bDvEhq','commentUpdate$','_initUserSync','delete','length','comment','content','users','_config','type','decorate','customRanges','@univerjs-pro/thread-comment-datasource','getOwnPropertyDescriptor','Reply','112084thwGhr','8mWjmAV','body','_injector','441510LOQNHA','defineProperty','_threadCommentModel','string','getComment','reply','_threadCommentDataSource','userId','ref','/delete','rangeType','getUnit','addUser','112370kmzgKW','_initDataSource','resolveComment','root','replyId','toPrimitive','pluginName','replies','418zIfQeK','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','115037MktKdQ','21903ErTGiE','4aOJVrF','onReady','post','updateComment','_sessionService','call','getUser','add','constructor','saveCommentToSnapshot','/solved','forEach','OpenOrReOpen','/reply','error','filter','deleteComment','map','parentId','createTimestamp','function','/edit','1831383htdTdl','code','find','pipe'];_0x3e8a=function(){return _0x34fd4b;};return _0x3e8a();}function k(_0x4b94ce,_0x11e247){const _0x5a9f6f=_0x2bf071;let _0x1934a4=_0x4b94ce['replies'][0x0];return{..._0x11e247,'id':_0x1934a4[_0x5a9f6f(0xbc)],'resolved':_0x4b94ce[_0x5a9f6f(0xeb)]===0x1,'dT':w(_0x1934a4[_0x5a9f6f(0xd7)]),'personId':_0x1934a4['userId'],'threadId':_0x1934a4[_0x5a9f6f(0x8e)]};}function A(_0x22d2fe,_0x30ecfd,_0x13c9f4){const _0x5b5f5d=_0x2bf071;var _0x5efec0,_0x373c51;if(((_0x5efec0=_0x22d2fe==null||(_0x373c51=_0x22d2fe[_0x5b5f5d(0xbf)])==null?void 0x0:_0x373c51[_0x5b5f5d(0x9c)])==null?0x0:_0x5efec0)>0x0){let _0xebe4d4=(_0x4552e2,_0x232ebd)=>({'id':_0x4552e2[_0x5b5f5d(0xbc)],'threadId':_0x4552e2[_0x5b5f5d(0x8e)],'dT':w(_0x4552e2[_0x5b5f5d(0xd7)]),'personId':_0x4552e2[_0x5b5f5d(0xb2)],'resolved':_0x22d2fe[_0x5b5f5d(0xeb)]===_0x539f3c[_0x5b5f5d(0xf8)],'unitId':_0x30ecfd,'subUnitId':_0x13c9f4,'text':JSON[_0x5b5f5d(0xe6)](_0x4552e2['content']),'parentId':_0x232ebd}),_0x50eb34=_0xebe4d4(_0x22d2fe[_0x5b5f5d(0xbf)][0x0]);return{..._0x50eb34,'children':_0x22d2fe[_0x5b5f5d(0xbf)]['slice'](0x1)['map'](_0x3bb607=>_0xebe4d4(_0x3bb607,_0x50eb34['id']))};}return null;}let j=class{constructor(_0x4d1d4a,_0x4e8d7e,_0x184cd1){const _0xa3a19b=_0x2bf071;this[_0xa3a19b(0x89)]=_0x4d1d4a,this[_0xa3a19b(0x95)]=_0x4e8d7e,this[_0xa3a19b(0xc8)]=_0x184cd1;}async[_0x2bf071(0xe4)](_0x1ec8f3){const _0x3e0928=_0x2bf071;var _0x2ed4bd,_0x4d6c8b;let {parentId:_0x3f3684,unitId:_0x18e571,text:_0x381136,threadId:_0x5dd1be}=_0x1ec8f3,_0x1ba29f=(_0x2ed4bd=(_0x4d6c8b=_0x381136['customRanges'])==null?void 0x0:_0x4d6c8b[_0x3e0928(0xd3)](_0x223d1a=>_0x223d1a[_0x3e0928(0xb5)]===_0x5a195a['COMMENT'])[_0x3e0928(0xd5)](_0x3e61b9=>_0x3e61b9['rangeId']))==null?[]:_0x2ed4bd,_0x5d5cef=JSON[_0x3e0928(0xf1)](_0x381136),_0x2ce5bd=(await this[_0x3e0928(0xc8)][_0x3e0928(0xe8)](_0x18e571))[_0x3e0928(0xf5)]();if(_0x3f3684){let _0x24eb87={'memberId':_0x2ce5bd,'unitId':_0x18e571,'content':_0x5d5cef,'mention':_0x1ba29f,'threadId':_0x5dd1be},_0x5e1b0f=(await this[_0x3e0928(0x89)][_0x3e0928(0xc6)](_0x3e0928(0xf3)+_0x18e571+_0x3e0928(0xd1),{'body':_0x24eb87}))[_0x3e0928(0xa9)][_0x3e0928(0xb0)];return{..._0x1ec8f3,'id':_0x5e1b0f[_0x3e0928(0xbc)],'dT':_0x20410a(+_0x5e1b0f['createTimestamp'])[_0x3e0928(0xf2)](_0x3e0928(0xea)),'personId':_0x5e1b0f[_0x3e0928(0xb2)]};}else{let _0x3f20bd={'memberId':_0x2ce5bd,'unitId':_0x18e571,'content':_0x5d5cef,'mention':_0x1ba29f};return k((await this[_0x3e0928(0x89)][_0x3e0928(0xc6)](_0x3e0928(0xf3)+_0x18e571+'/add',{'body':_0x3f20bd}))[_0x3e0928(0xa9)][_0x3e0928(0x9d)],_0x1ec8f3);}}async['updateComment'](_0x1e2ca0){const _0x44add0=_0x2bf071;var _0x2020e8,_0x26fcfc;let {text:_0x5fbe9a,unitId:_0x14cf30}=_0x1e2ca0,_0x29d220=(_0x2020e8=(_0x26fcfc=_0x5fbe9a[_0x44add0(0xa3)])==null?void 0x0:_0x26fcfc['filter'](_0xbba013=>_0xbba013[_0x44add0(0xb5)]===_0x5a195a['COMMENT'])[_0x44add0(0xd5)](_0x516afa=>_0x516afa[_0x44add0(0x91)]))==null?[]:_0x2020e8,_0x5207ba=JSON['stringify'](_0x5fbe9a),_0xa2738=_0x1e2ca0[_0x44add0(0x8e)],_0x4b3ace=_0x1e2ca0['id'],_0x2b6031={'memberId':(await this['_sessionService'][_0x44add0(0xe8)](_0x14cf30))[_0x44add0(0xf5)](),'unitId':_0x14cf30,'threadId':_0xa2738,'mention':_0x29d220,'content':_0x5207ba,'replyId':_0x4b3ace},_0x181b5e=await this[_0x44add0(0x89)][_0x44add0(0xc6)]('/universer-api/comment/unit/'+_0x14cf30+_0x44add0(0xd9),{'body':_0x2b6031});return!_0x181b5e[_0x44add0(0xa9)]['error']||_0x181b5e['body'][_0x44add0(0xd2)][_0x44add0(0xdb)]===0x1;}async[_0x2bf071(0xba)](_0x599cec){const _0xbf3fca=_0x2bf071;let {unitId:_0x248489}=_0x599cec,_0x105faa=_0x599cec[_0xbf3fca(0x8e)],_0x55e8d0={'memberId':this[_0xbf3fca(0x95)]['getCurrentUser']()['userID'],'unitId':_0x248489,'threadId':_0x105faa,'solved':_0x599cec[_0xbf3fca(0x8f)]?_0x539f3c[_0xbf3fca(0xf8)]:_0x539f3c[_0xbf3fca(0xd0)]},_0x18ec71=await this[_0xbf3fca(0x89)][_0xbf3fca(0xc6)](_0xbf3fca(0xf3)+_0x248489+_0xbf3fca(0xce),{'body':_0x55e8d0});return!_0x18ec71[_0xbf3fca(0xa9)][_0xbf3fca(0xd2)]||_0x18ec71[_0xbf3fca(0xa9)][_0xbf3fca(0xd2)][_0xbf3fca(0xdb)]===0x1;}async['deleteComment'](_0x39464f,_0x493147,_0x1a398e,_0xbbb2a){const _0x4c3305=_0x2bf071;let _0x5b920e={'memberId':(await this[_0x4c3305(0xc8)][_0x4c3305(0xe8)](_0x39464f))[_0x4c3305(0xf5)](),'threadId':_0x1a398e,'replyId':_0xbbb2a,'unitId':_0x39464f},_0x4410d7=await this[_0x4c3305(0x89)][_0x4c3305(0xc6)](_0x4c3305(0xf3)+_0x39464f+_0x4c3305(0xb4),{'body':_0x5b920e});return!_0x4410d7[_0x4c3305(0xa9)][_0x4c3305(0xd2)]||_0x4410d7[_0x4c3305(0xa9)][_0x4c3305(0xd2)][_0x4c3305(0xdb)]===0x1;}async['listComments'](_0x2462a1,_0x3d83aa,_0x3bc3d1){const _0x4c2fc9=_0x2bf071;let _0x59dac3={'unitId':_0x2462a1,'threadId':_0x3bc3d1},_0x242b71=await this[_0x4c2fc9(0x89)][_0x4c2fc9(0xc6)](_0x4c2fc9(0xf3)+_0x2462a1+_0x4c2fc9(0xde),{'body':_0x59dac3}),_0x4e7392=_0x3bc3d1[_0x4c2fc9(0xd5)](_0x3254cd=>A(_0x242b71[_0x4c2fc9(0xa9)][_0x4c2fc9(0x8d)][_0x3254cd],_0x2462a1,_0x3d83aa))[_0x4c2fc9(0xd3)](Boolean);return Object[_0x4c2fc9(0x8b)](_0x242b71[_0x4c2fc9(0xa9)]['users'])['forEach'](_0x1bc151=>{const _0x3da313=_0x4c2fc9;this[_0x3da313(0x95)][_0x3da313(0xb7)](_0x1bc151);}),_0x4e7392;}[_0x2bf071(0xcd)](_0x215525){const _0x64b256=_0x2bf071;return{'id':_0x215525['id'],'threadId':_0x215525['threadId'],'ref':_0x215525[_0x64b256(0xb3)]};}};j=D([E(0x0,_0x46a0e3(_0x114486)),E(0x1,_0x46a0e3(_0x3bad2a)),E(0x2,_0x46a0e3(_0x57e2d4))],j);let M=class extends _0x4779d9{constructor(_0x1ab369,_0x36be48){const _0x42c535=_0x2bf071;super(),this[_0x42c535(0x8a)]=_0x1ab369,this[_0x42c535(0xb1)]=_0x36be48,this[_0x42c535(0xb9)]();}[_0x2bf071(0xb9)](){const _0x4bd81a=_0x2bf071;this[_0x4bd81a(0x8a)][_0x4bd81a(0x8c)]=this[_0x4bd81a(0xb1)],this[_0x4bd81a(0x8a)][_0x4bd81a(0xe0)]=!0x1;}};M=D([E(0x0,_0x34873a),E(0x1,_0x46a0e3(j))],M);function _0x2e04(_0x22868c,_0x56ecdd){_0x22868c=_0x22868c-0x85;const _0x3e8a24=_0x3e8a();let _0x2e04f2=_0x3e8a24[_0x22868c];return _0x2e04f2;}function N(_0x33f07f){'@babel/helpers - typeof';const _0xee0da2=_0x2bf071;return N=typeof Symbol==_0xee0da2(0xd8)&&typeof Symbol[_0xee0da2(0xe3)]==_0xee0da2(0xf0)?function(_0x3d20eb){return typeof _0x3d20eb;}:function(_0x1b31da){const _0x30934f=_0xee0da2;return _0x1b31da&&typeof Symbol==_0x30934f(0xd8)&&_0x1b31da[_0x30934f(0xcc)]===Symbol&&_0x1b31da!==Symbol[_0x30934f(0x90)]?_0x30934f(0xf0):typeof _0x1b31da;},N(_0x33f07f);}function P(_0x25c40a,_0x3bd756){const _0x574de5=_0x2bf071;if(N(_0x25c40a)!=_0x574de5(0xee)||!_0x25c40a)return _0x25c40a;var _0xa7e120=_0x25c40a[Symbol[_0x574de5(0xbd)]];if(_0xa7e120!==void 0x0){var _0x38e7ef=_0xa7e120[_0x574de5(0xc9)](_0x25c40a,_0x3bd756||'default');if(N(_0x38e7ef)!='object')return _0x38e7ef;throw TypeError(_0x574de5(0xc1));}return(_0x3bd756===_0x574de5(0xae)?String:Number)(_0x25c40a);}function F(_0x8f2e76){const _0x5a7522=_0x2bf071;var _0x40b58f=P(_0x8f2e76,_0x5a7522(0xae));return N(_0x40b58f)=='symbol'?_0x40b58f:_0x40b58f+'';}function I(_0x1d33b2,_0x2323c2,_0x166793){const _0xa1aa8f=_0x2bf071;return(_0x2323c2=F(_0x2323c2))in _0x1d33b2?Object[_0xa1aa8f(0xac)](_0x1d33b2,_0x2323c2,{'value':_0x166793,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1d33b2[_0x2323c2]=_0x166793,_0x1d33b2;}let L=class extends _0x1a2f1d{constructor(_0x156cac=C,_0x8dd30c,_0x5cef1a){const _0x3642b0=_0x2bf071;super(),this[_0x3642b0(0xa0)]=_0x156cac,this[_0x3642b0(0xaa)]=_0x8dd30c,this[_0x3642b0(0x86)]=_0x5cef1a;let {..._0x14af15}=_0x37fe87({},C,this['_config']);this[_0x3642b0(0x86)][_0x3642b0(0xef)](_0x3642b0(0x94),_0x14af15);}[_0x2bf071(0xe7)](){const _0x56fcaa=_0x2bf071;[[j],[M],[O]][_0x56fcaa(0xcf)](_0x50087b=>{const _0x238e7c=_0x56fcaa;this[_0x238e7c(0xaa)][_0x238e7c(0xcb)](_0x50087b);});}[_0x2bf071(0xc5)](){const _0x439966=_0x2bf071;this[_0x439966(0xaa)][_0x439966(0xdf)](M),this[_0x439966(0xaa)][_0x439966(0xdf)](O);}};I(L,_0x2bf071(0xbe),_0x2bf071(0x87)),I(L,_0x2bf071(0x92),x),I(L,_0x2bf071(0xf4),S),L=D([_0x91861d(_0x4c4fd2,_0x274af5,_0x239c9c),E(0x1,_0x46a0e3(_0x1404d1)),E(0x2,_0x7b49f5)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ const _0xdb916c=_0x4b90;(function(_0xd57d59,_0x47880c){const _0x3289ed=_0x4b90,_0x136041=_0xd57d59();while(!![]){try{const _0x29ecfa=parseInt(_0x3289ed(0x1d3))/0x1*(parseInt(_0x3289ed(0x186))/0x2)+-parseInt(_0x3289ed(0x184))/0x3*(-parseInt(_0x3289ed(0x187))/0x4)+-parseInt(_0x3289ed(0x195))/0x5+parseInt(_0x3289ed(0x1a0))/0x6*(parseInt(_0x3289ed(0x1e4))/0x7)+parseInt(_0x3289ed(0x198))/0x8*(parseInt(_0x3289ed(0x1a4))/0x9)+parseInt(_0x3289ed(0x1d1))/0xa+-parseInt(_0x3289ed(0x1a8))/0xb;if(_0x29ecfa===_0x47880c)break;else _0x136041['push'](_0x136041['shift']());}catch(_0x1ecc96){_0x136041['push'](_0x136041['shift']());}}}(_0x5be0,0xa85f4));import{CollaborationSessionService as _0x1a712a,CommentService as _0x165000,UniverCollaborationClientPlugin as _0x1cda46}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x33efd4}from'@univerjs-pro/license';import{CustomRangeType as _0x597cc7,DependentOn as _0x28ebe0,Disposable as _0x3b174f,IConfigService as _0x4409b2,Inject as _0x511ab3,Injector as _0x2deea2,Plugin as _0x23d328,UserManagerService as _0x49fdc5,dateKit as _0x5bc808,merge as _0x18c0bf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x556559}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x3cbbfe,CommentUpdateEventType as _0x138e45}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x15d0d0,ThreadCommentModel as _0x1809a2}from'@univerjs/thread-comment';import{bufferTime as _0xa2b47}from'rxjs';import{HTTPService as _0x28c65c}from'@univerjs/network';var x=_0xdb916c(0x1a7),S='1.0.0-alpha.5';const C={},w=_0x197b5f=>_0x5bc808(new Date(+_0x197b5f))[_0xdb916c(0x1bb)](_0xdb916c(0x1bc)),T=async(_0x48e32b,_0x380810)=>{const _0x132a94=_0xdb916c;let _0x23d592=_0x48e32b[_0x132a94(0x1cf)](_0x49fdc5),_0x1ac2d2=_0x48e32b[_0x132a94(0x1cf)](_0x28c65c);_0x380810[_0x132a94(0x1b0)](_0xf287fd=>{const _0x31cd6a=_0x132a94;_0x23d592[_0x31cd6a(0x1ac)](_0xf287fd)&&_0x380810[_0x31cd6a(0x18f)](_0xf287fd);}),_0x380810[_0x132a94(0x1c8)]&&(await _0x1ac2d2['get'](_0x132a94(0x1b5),{'params':{'userIDs':[..._0x380810]}}))[_0x132a94(0x19a)][_0x132a94(0x1e1)][_0x132a94(0x1b0)](_0x209290=>{const _0x2682c2=_0x132a94;_0x209290&&_0x23d592[_0x2682c2(0x18a)](_0x209290);});};function E(_0x48f54b,_0x4bc891){return function(_0x1b6a66,_0x42a2b5){_0x4bc891(_0x1b6a66,_0x42a2b5,_0x48f54b);};}function D(_0x3fff96,_0x1bc742,_0x1a90b8,_0x22ce73){const _0x519f50=_0xdb916c;var _0x2c7031=arguments[_0x519f50(0x1d4)],_0x2d364f=_0x2c7031<0x3?_0x1bc742:_0x22ce73===null?_0x22ce73=Object['getOwnPropertyDescriptor'](_0x1bc742,_0x1a90b8):_0x22ce73,_0x3098ac;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x519f50(0x1c5))_0x2d364f=Reflect['decorate'](_0x3fff96,_0x1bc742,_0x1a90b8,_0x22ce73);else{for(var _0x1dfe2c=_0x3fff96[_0x519f50(0x1d4)]-0x1;_0x1dfe2c>=0x0;_0x1dfe2c--)(_0x3098ac=_0x3fff96[_0x1dfe2c])&&(_0x2d364f=(_0x2c7031<0x3?_0x3098ac(_0x2d364f):_0x2c7031>0x3?_0x3098ac(_0x1bc742,_0x1a90b8,_0x2d364f):_0x3098ac(_0x1bc742,_0x1a90b8))||_0x2d364f);}return _0x2c7031>0x3&&_0x2d364f&&Object[_0x519f50(0x1ae)](_0x1bc742,_0x1a90b8,_0x2d364f),_0x2d364f;}let O=class extends _0x3b174f{constructor(_0x310647,_0x455a8f,_0x279bea,_0x4daf61){const _0x2dc41e=_0xdb916c;super(),this['_commentService']=_0x310647,this[_0x2dc41e(0x1c2)]=_0x455a8f,this[_0x2dc41e(0x1e3)]=_0x279bea,this[_0x2dc41e(0x180)]=_0x4daf61,this[_0x2dc41e(0x1aa)](),this['_initUserSync']();}[_0xdb916c(0x1a6)](){const _0x177650=_0xdb916c;this[_0x177650(0x1e6)](this[_0x177650(0x1c2)][_0x177650(0x1d2)]['pipe'](_0xa2b47(0x10))[_0x177650(0x19f)](_0x3a1b73=>{let _0x45f3b0=new Set();_0x3a1b73['forEach'](_0x1dfb79=>{const _0x1712e0=_0x4b90;switch(_0x1dfb79[_0x1712e0(0x1cb)]){case _0x1712e0(0x1b6):{let _0x5144d0=_0x1dfb79[_0x1712e0(0x1c6)][_0x1712e0(0x1b1)];_0x45f3b0['add'](_0x5144d0);break;}default:break;}}),T(this['_injector'],_0x45f3b0);}));}[_0xdb916c(0x1aa)](){const _0x404bd0=_0xdb916c;this[_0x404bd0(0x1e6)](this[_0x404bd0(0x18d)][_0x404bd0(0x1d2)][_0x404bd0(0x19f)](async _0x38a576=>{const _0x247783=_0x404bd0;var _0x29ebfb;let _0x4ed3b8=(_0x29ebfb=this[_0x247783(0x1c2)][_0x247783(0x1c4)](_0x38a576[_0x247783(0x1b9)])[_0x247783(0x1db)](_0x57666f=>_0x57666f[_0x247783(0x1da)]===_0x38a576[_0x247783(0x1da)]))==null?void 0x0:_0x29ebfb[_0x247783(0x1dd)];if(!_0x4ed3b8)return;let {unitId:_0x48518e,subUnitId:_0x3a2468}=_0x4ed3b8;switch(_0x38a576['user']&&this['_userService'][_0x247783(0x18a)](_0x38a576['user']),_0x38a576['type']){case _0x138e45[_0x247783(0x1b2)]:break;case _0x138e45[_0x247783(0x197)]:var _0xaaffd6,_0xb3235c;this[_0x247783(0x1c2)][_0x247783(0x1b8)](_0x48518e,_0x3a2468,{'unitId':_0x48518e,'subUnitId':_0x3a2468,'ref':'','id':_0x38a576['replyId'],'dT':w(+_0x38a576[_0x247783(0x1dc)]),'threadId':_0x38a576[_0x247783(0x1da)],'personId':(_0xaaffd6=(_0xb3235c=_0x38a576[_0x247783(0x1c0)])==null?void 0x0:_0xb3235c['userID'])==null?_0x38a576[_0x247783(0x1ba)]:_0xaaffd6,'text':JSON[_0x247783(0x193)](_0x38a576[_0x247783(0x1a2)]),'parentId':_0x4ed3b8['id']});break;case _0x138e45[_0x247783(0x181)]:{let _0xca251=this[_0x247783(0x1c2)]['getComment'](_0x48518e,_0x3a2468,_0x38a576['replyId']);_0xca251&&_0xca251[_0x247783(0x183)]&&this[_0x247783(0x1c2)][_0x247783(0x1a5)](_0x48518e,_0x3a2468,_0x38a576[_0x247783(0x1ad)]);break;}case _0x138e45['Edit']:this[_0x247783(0x1c2)][_0x247783(0x1c1)](_0x48518e,_0x3a2468,{'commentId':_0x38a576[_0x247783(0x1ad)],'text':JSON[_0x247783(0x193)](_0x38a576[_0x247783(0x1a2)])});break;case _0x138e45[_0x247783(0x185)]:{var _0x4b5b82;let _0x398d38=(_0x4b5b82=this[_0x247783(0x1c2)][_0x247783(0x1c4)](_0x38a576['unitId'])[_0x247783(0x1db)](_0x261060=>_0x261060[_0x247783(0x1da)]===_0x38a576[_0x247783(0x1da)]))==null?void 0x0:_0x4b5b82[_0x247783(0x1dd)];_0x398d38&&this[_0x247783(0x1c2)][_0x247783(0x188)](_0x48518e,_0x3a2468,_0x398d38['id'],_0x38a576[_0x247783(0x1ca)]===_0x3cbbfe['Solved']);break;}default:break;}}));}};function _0x5be0(){const _0x1793c4=['_threadCommentDataSourceService','size','toPrimitive','solved','type','setConfig','filter','resolved','get','/solved','10374470KnfOOl','commentUpdate$','1691wbEybr','length','reply','/delete','COMMENT','packageName','default','threadId','find','createTimestamp','root','stringify','syncUpdateMutationToColla','symbol','users','post','_userService','4156040wwZYGx','rangeType','disposeWithMe','/list','map','_injector','Delete','version','parentId','546720XudLzK','Solve','354mquOXg','8nIoYAG','resolveComment','error','addUser','ref','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commentService','saveCommentToSnapshot','delete','_httpService','customRanges','onReady','parse','comments','404210rPHcvL','dataSource','Reply','16iHhEQp','call','body','_threadCommentDataSource','_sessionService','code','Solved','subscribe','6jcXRNr','_config','content','thread-comment-data-source.config','1443375ZVzEAv','deleteComment','_initUserSync','@univerjs-pro/thread-comment-datasource','20297310iLwjSh','_configService','_init','constructor','getUser','replyId','defineProperty','/edit','forEach','personId','Add','replies','getMemberID','/universer-api/user/list','add','requireSession','addComment','unitId','userId','format','YYYY/MM/DD\x20HH:mm','prototype','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','user','updateComment','_threadCommentModel','_initDataSource','getUnit','function','payload'];_0x5be0=function(){return _0x1793c4;};return _0x5be0();}O=D([E(0x0,_0x511ab3(_0x165000)),E(0x1,_0x511ab3(_0x1809a2)),E(0x2,_0x511ab3(_0x49fdc5)),E(0x3,_0x511ab3(_0x2deea2))],O);function k(_0x1e58fc,_0x1cbf7c){const _0x2c3129=_0xdb916c;let _0x28107e=_0x1e58fc[_0x2c3129(0x1b3)][0x0];return{..._0x1cbf7c,'id':_0x28107e[_0x2c3129(0x1ad)],'resolved':_0x1e58fc[_0x2c3129(0x1ca)]===0x1,'dT':w(_0x28107e['createTimestamp']),'personId':_0x28107e[_0x2c3129(0x1ba)],'threadId':_0x28107e[_0x2c3129(0x1da)]};}function A(_0x5a76bc,_0x5e29dc,_0x19ad91){const _0x3a2c13=_0xdb916c;var _0x3c1b32,_0x44aa2e;if(((_0x3c1b32=_0x5a76bc==null||(_0x44aa2e=_0x5a76bc['replies'])==null?void 0x0:_0x44aa2e[_0x3a2c13(0x1d4)])==null?0x0:_0x3c1b32)>0x0){let _0x5397d3=(_0x521379,_0x5ed585)=>({'id':_0x521379[_0x3a2c13(0x1ad)],'threadId':_0x521379[_0x3a2c13(0x1da)],'dT':w(_0x521379[_0x3a2c13(0x1dc)]),'personId':_0x521379[_0x3a2c13(0x1ba)],'resolved':_0x5a76bc['solved']===_0x3cbbfe[_0x3a2c13(0x19e)],'unitId':_0x5e29dc,'subUnitId':_0x19ad91,'text':JSON[_0x3a2c13(0x193)](_0x521379[_0x3a2c13(0x1a2)]),'parentId':_0x5ed585}),_0x2f964d=_0x5397d3(_0x5a76bc[_0x3a2c13(0x1b3)][0x0]);return{..._0x2f964d,'children':_0x5a76bc['replies']['slice'](0x1)[_0x3a2c13(0x17f)](_0x50e0ad=>_0x5397d3(_0x50e0ad,_0x2f964d['id']))};}return null;}let j=class{constructor(_0x5e764a,_0x7d2ffb,_0x2c5e7f){const _0x4d4037=_0xdb916c;this[_0x4d4037(0x190)]=_0x5e764a,this[_0x4d4037(0x1e3)]=_0x7d2ffb,this['_sessionService']=_0x2c5e7f;}async[_0xdb916c(0x1b8)](_0x59a649){const _0x468ea5=_0xdb916c;var _0x4aa06a,_0x56a71b;let {parentId:_0x3187ee,unitId:_0x210f94,text:_0x54a14d,threadId:_0x287bb2}=_0x59a649,_0x29afff=(_0x4aa06a=(_0x56a71b=_0x54a14d['customRanges'])==null?void 0x0:_0x56a71b['filter'](_0x154f07=>_0x154f07['rangeType']===_0x597cc7[_0x468ea5(0x1d7)])[_0x468ea5(0x17f)](_0x2b9c46=>_0x2b9c46['rangeId']))==null?[]:_0x4aa06a,_0x113f47=JSON[_0x468ea5(0x1de)](_0x54a14d),_0x1b9156=(await this['_sessionService'][_0x468ea5(0x1b7)](_0x210f94))[_0x468ea5(0x1b4)]();if(_0x3187ee){let _0x4fc21e={'memberId':_0x1b9156,'unitId':_0x210f94,'content':_0x113f47,'mention':_0x29afff,'threadId':_0x287bb2},_0x2494a0=(await this[_0x468ea5(0x190)][_0x468ea5(0x1e2)]('/universer-api/comment/unit/'+_0x210f94+'/reply',{'body':_0x4fc21e}))[_0x468ea5(0x19a)][_0x468ea5(0x1d5)];return{..._0x59a649,'id':_0x2494a0['replyId'],'dT':_0x5bc808(+_0x2494a0['createTimestamp'])[_0x468ea5(0x1bb)](_0x468ea5(0x1bc)),'personId':_0x2494a0[_0x468ea5(0x1ba)]};}else{let _0x369514={'memberId':_0x1b9156,'unitId':_0x210f94,'content':_0x113f47,'mention':_0x29afff};return k((await this[_0x468ea5(0x190)]['post']('/universer-api/comment/unit/'+_0x210f94+'/add',{'body':_0x369514}))[_0x468ea5(0x19a)]['comment'],_0x59a649);}}async[_0xdb916c(0x1c1)](_0xaf8197){const _0x15fc08=_0xdb916c;var _0xf2b31,_0x5387c4;let {text:_0x9c7921,unitId:_0x5a89ef}=_0xaf8197,_0x1bb67b=(_0xf2b31=(_0x5387c4=_0x9c7921[_0x15fc08(0x191)])==null?void 0x0:_0x5387c4[_0x15fc08(0x1cd)](_0x38371d=>_0x38371d[_0x15fc08(0x1e5)]===_0x597cc7[_0x15fc08(0x1d7)])['map'](_0x4aaa92=>_0x4aaa92['rangeId']))==null?[]:_0xf2b31,_0x3a0ac3=JSON[_0x15fc08(0x1de)](_0x9c7921),_0x3f42d6=_0xaf8197[_0x15fc08(0x1da)],_0x57c26a=_0xaf8197['id'],_0x5b0bfe={'memberId':(await this[_0x15fc08(0x19c)]['requireSession'](_0x5a89ef))['getMemberID'](),'unitId':_0x5a89ef,'threadId':_0x3f42d6,'mention':_0x1bb67b,'content':_0x3a0ac3,'replyId':_0x57c26a},_0x1223f8=await this[_0x15fc08(0x190)][_0x15fc08(0x1e2)](_0x15fc08(0x1bf)+_0x5a89ef+_0x15fc08(0x1af),{'body':_0x5b0bfe});return!_0x1223f8[_0x15fc08(0x19a)][_0x15fc08(0x189)]||_0x1223f8[_0x15fc08(0x19a)]['error'][_0x15fc08(0x19d)]===0x1;}async[_0xdb916c(0x188)](_0x257817){const _0x19f6c5=_0xdb916c;let {unitId:_0x155c43}=_0x257817,_0x267810=_0x257817['threadId'],_0x579a58={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x155c43,'threadId':_0x267810,'solved':_0x257817[_0x19f6c5(0x1ce)]?_0x3cbbfe['Solved']:_0x3cbbfe['OpenOrReOpen']},_0xf38f12=await this[_0x19f6c5(0x190)][_0x19f6c5(0x1e2)](_0x19f6c5(0x1bf)+_0x155c43+_0x19f6c5(0x1d0),{'body':_0x579a58});return!_0xf38f12[_0x19f6c5(0x19a)][_0x19f6c5(0x189)]||_0xf38f12['body'][_0x19f6c5(0x189)][_0x19f6c5(0x19d)]===0x1;}async[_0xdb916c(0x1a5)](_0x41c3a7,_0x2fbb9a,_0x506bd8,_0x5b69cf){const _0x1b247a=_0xdb916c;let _0x459d56={'memberId':(await this['_sessionService']['requireSession'](_0x41c3a7))[_0x1b247a(0x1b4)](),'threadId':_0x506bd8,'replyId':_0x5b69cf,'unitId':_0x41c3a7},_0x5b0364=await this[_0x1b247a(0x190)][_0x1b247a(0x1e2)](_0x1b247a(0x1bf)+_0x41c3a7+_0x1b247a(0x1d6),{'body':_0x459d56});return!_0x5b0364[_0x1b247a(0x19a)][_0x1b247a(0x189)]||_0x5b0364['body'][_0x1b247a(0x189)][_0x1b247a(0x19d)]===0x1;}async['listComments'](_0x3427d2,_0x133f8d,_0x26f03d){const _0x687068=_0xdb916c;let _0x5080e5={'unitId':_0x3427d2,'threadId':_0x26f03d},_0x3ca7e8=await this[_0x687068(0x190)][_0x687068(0x1e2)](_0x687068(0x1bf)+_0x3427d2+_0x687068(0x17e),{'body':_0x5080e5}),_0x482b6b=_0x26f03d['map'](_0x3e79c1=>A(_0x3ca7e8['body'][_0x687068(0x194)][_0x3e79c1],_0x3427d2,_0x133f8d))[_0x687068(0x1cd)](Boolean);return Object['values'](_0x3ca7e8[_0x687068(0x19a)][_0x687068(0x1e1)])['forEach'](_0x1d34af=>{const _0x5cddb8=_0x687068;this[_0x5cddb8(0x1e3)][_0x5cddb8(0x18a)](_0x1d34af);}),_0x482b6b;}[_0xdb916c(0x18e)](_0x138b74){const _0x20809f=_0xdb916c;return{'id':_0x138b74['id'],'threadId':_0x138b74[_0x20809f(0x1da)],'ref':_0x138b74[_0x20809f(0x18b)]};}};j=D([E(0x0,_0x511ab3(_0x28c65c)),E(0x1,_0x511ab3(_0x49fdc5)),E(0x2,_0x511ab3(_0x1a712a))],j);let M=class extends _0x3b174f{constructor(_0x3a9496,_0x1b94f6){const _0x2e6264=_0xdb916c;super(),this['_threadCommentDataSourceService']=_0x3a9496,this[_0x2e6264(0x19b)]=_0x1b94f6,this['_initDataSource']();}[_0xdb916c(0x1c3)](){const _0x16dac9=_0xdb916c;this['_threadCommentDataSourceService'][_0x16dac9(0x196)]=this[_0x16dac9(0x19b)],this[_0x16dac9(0x1c7)][_0x16dac9(0x1df)]=!0x1;}};M=D([E(0x0,_0x15d0d0),E(0x1,_0x511ab3(j))],M);function N(_0x2de986){'@babel/helpers - typeof';const _0x2fb6c2=_0xdb916c;return N=typeof Symbol==_0x2fb6c2(0x1c5)&&typeof Symbol['iterator']==_0x2fb6c2(0x1e0)?function(_0x236c78){return typeof _0x236c78;}:function(_0xe94ed1){const _0x2b7782=_0x2fb6c2;return _0xe94ed1&&typeof Symbol==_0x2b7782(0x1c5)&&_0xe94ed1[_0x2b7782(0x1ab)]===Symbol&&_0xe94ed1!==Symbol[_0x2b7782(0x1bd)]?_0x2b7782(0x1e0):typeof _0xe94ed1;},N(_0x2de986);}function P(_0x4ba659,_0x46f6cd){const _0x20b501=_0xdb916c;if(N(_0x4ba659)!='object'||!_0x4ba659)return _0x4ba659;var _0x252cc3=_0x4ba659[Symbol[_0x20b501(0x1c9)]];if(_0x252cc3!==void 0x0){var _0x4889ac=_0x252cc3[_0x20b501(0x199)](_0x4ba659,_0x46f6cd||_0x20b501(0x1d9));if(N(_0x4889ac)!='object')return _0x4889ac;throw TypeError(_0x20b501(0x18c));}return(_0x46f6cd==='string'?String:Number)(_0x4ba659);}function F(_0x306573){const _0x3d8b66=_0xdb916c;var _0x2b3d50=P(_0x306573,'string');return N(_0x2b3d50)==_0x3d8b66(0x1e0)?_0x2b3d50:_0x2b3d50+'';}function I(_0xe1de15,_0x33f699,_0x4a4412){const _0x1fc796=_0xdb916c;return(_0x33f699=F(_0x33f699))in _0xe1de15?Object[_0x1fc796(0x1ae)](_0xe1de15,_0x33f699,{'value':_0x4a4412,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xe1de15[_0x33f699]=_0x4a4412,_0xe1de15;}function _0x4b90(_0xd25387,_0x5d89f3){_0xd25387=_0xd25387-0x17e;const _0x5be082=_0x5be0();let _0x4b908a=_0x5be082[_0xd25387];return _0x4b908a;}let L=class extends _0x23d328{constructor(_0x1c5739=C,_0x11d3b5,_0x161079){const _0x5c23e4=_0xdb916c;super(),this[_0x5c23e4(0x1a1)]=_0x1c5739,this['_injector']=_0x11d3b5,this[_0x5c23e4(0x1a9)]=_0x161079;let {..._0x1a20b0}=_0x18c0bf({},C,this['_config']);this['_configService'][_0x5c23e4(0x1cc)](_0x5c23e4(0x1a3),_0x1a20b0);}['onStarting'](){const _0x136651=_0xdb916c;[[j],[M],[O]][_0x136651(0x1b0)](_0x49a285=>{const _0x55d26e=_0x136651;this[_0x55d26e(0x180)][_0x55d26e(0x1b6)](_0x49a285);});}[_0xdb916c(0x192)](){const _0x150e69=_0xdb916c;this[_0x150e69(0x180)][_0x150e69(0x1cf)](M),this[_0x150e69(0x180)][_0x150e69(0x1cf)](O);}};I(L,'pluginName',_0xdb916c(0x1be)),I(L,_0xdb916c(0x1d8),x),I(L,_0xdb916c(0x182),S),L=D([_0x28ebe0(_0x556559,_0x1cda46,_0x33efd4),E(0x1,_0x511ab3(_0x2deea2)),E(0x2,_0x4409b2)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2bf071=_0x2e04;(function(_0x53ffe2,_0x554073){const _0x1d2027=_0x2e04,_0x362acf=_0x53ffe2();while(!![]){try{const _0x2bcea9=parseInt(_0x1d2027(0xc2))/0x1*(parseInt(_0x1d2027(0xc4))/0x2)+parseInt(_0x1d2027(0xe2))/0x3+-parseInt(_0x1d2027(0xa7))/0x4+parseInt(_0x1d2027(0xab))/0x5+-parseInt(_0x1d2027(0x98))/0x6*(parseInt(_0x1d2027(0xc3))/0x7)+parseInt(_0x1d2027(0xa8))/0x8*(-parseInt(_0x1d2027(0xda))/0x9)+parseInt(_0x1d2027(0xb8))/0xa*(parseInt(_0x1d2027(0xc0))/0xb);if(_0x2bcea9===_0x554073)break;else _0x362acf['push'](_0x362acf['shift']());}catch(_0x1ebd6a){_0x362acf['push'](_0x362acf['shift']());}}}(_0x3e8a,0x33dc2));import{CollaborationSessionService as _0x57e2d4,CommentService as _0x587643,UniverCollaborationClientPlugin as _0x274af5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x239c9c}from'@univerjs-pro/license';import{CustomRangeType as _0x5a195a,DependentOn as _0x91861d,Disposable as _0x4779d9,IConfigService as _0x7b49f5,Inject as _0x46a0e3,Injector as _0x1404d1,Plugin as _0x1a2f1d,UserManagerService as _0x3bad2a,dateKit as _0x20410a,merge as _0x37fe87}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c4fd2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x539f3c,CommentUpdateEventType as _0x292590}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x34873a,ThreadCommentModel as _0x30174f}from'@univerjs/thread-comment';import{bufferTime as _0x46ad19}from'rxjs';import{HTTPService as _0x114486}from'@univerjs/network';var x=_0x2bf071(0xa4),S=_0x2bf071(0x88);const C={},w=_0x5da229=>_0x20410a(new Date(+_0x5da229))[_0x2bf071(0xf2)]('YYYY/MM/DD\x20HH:mm'),T=async(_0x535434,_0x3df526)=>{const _0x4794b5=_0x2bf071;let _0x15513f=_0x535434['get'](_0x3bad2a),_0x55a98a=_0x535434[_0x4794b5(0xdf)](_0x114486);_0x3df526[_0x4794b5(0xcf)](_0x922347=>{const _0x290670=_0x4794b5;_0x15513f[_0x290670(0xca)](_0x922347)&&_0x3df526[_0x290670(0x9b)](_0x922347);}),_0x3df526['size']&&(await _0x55a98a[_0x4794b5(0xdf)](_0x4794b5(0xe1),{'params':{'userIDs':[..._0x3df526]}}))[_0x4794b5(0xa9)][_0x4794b5(0x9f)]['forEach'](_0x3a3c8b=>{const _0x48ad69=_0x4794b5;_0x3a3c8b&&_0x15513f[_0x48ad69(0xb7)](_0x3a3c8b);});};function E(_0x14f858,_0x3f2718){return function(_0x3a5ff6,_0x3dd4e2){_0x3f2718(_0x3a5ff6,_0x3dd4e2,_0x14f858);};}function D(_0xeeba13,_0x359e9d,_0x3f3070,_0x28cc68){const _0x50cee3=_0x2bf071;var _0x227b82=arguments[_0x50cee3(0x9c)],_0x45f8bc=_0x227b82<0x3?_0x359e9d:_0x28cc68===null?_0x28cc68=Object[_0x50cee3(0xa5)](_0x359e9d,_0x3f3070):_0x28cc68,_0x2176ab;if(typeof Reflect==_0x50cee3(0xee)&&typeof Reflect[_0x50cee3(0xa2)]==_0x50cee3(0xd8))_0x45f8bc=Reflect[_0x50cee3(0xa2)](_0xeeba13,_0x359e9d,_0x3f3070,_0x28cc68);else{for(var _0x4a8f32=_0xeeba13[_0x50cee3(0x9c)]-0x1;_0x4a8f32>=0x0;_0x4a8f32--)(_0x2176ab=_0xeeba13[_0x4a8f32])&&(_0x45f8bc=(_0x227b82<0x3?_0x2176ab(_0x45f8bc):_0x227b82>0x3?_0x2176ab(_0x359e9d,_0x3f3070,_0x45f8bc):_0x2176ab(_0x359e9d,_0x3f3070))||_0x45f8bc);}return _0x227b82>0x3&&_0x45f8bc&&Object['defineProperty'](_0x359e9d,_0x3f3070,_0x45f8bc),_0x45f8bc;}let O=class extends _0x4779d9{constructor(_0xf66233,_0x13ab6f,_0x400415,_0xbaf923){const _0x4a7ca0=_0x2bf071;super(),this['_commentService']=_0xf66233,this[_0x4a7ca0(0xad)]=_0x13ab6f,this[_0x4a7ca0(0x95)]=_0x400415,this['_injector']=_0xbaf923,this['_init'](),this[_0x4a7ca0(0x9a)]();}[_0x2bf071(0x9a)](){const _0x1eb7a1=_0x2bf071;this['disposeWithMe'](this[_0x1eb7a1(0xad)][_0x1eb7a1(0x99)][_0x1eb7a1(0xdd)](_0x46ad19(0x10))[_0x1eb7a1(0x85)](_0x4c4fc1=>{const _0x3fc5f9=_0x1eb7a1;let _0x3d1376=new Set();_0x4c4fc1[_0x3fc5f9(0xcf)](_0x1ab0b8=>{const _0x46c719=_0x3fc5f9;switch(_0x1ab0b8[_0x46c719(0xa1)]){case _0x46c719(0xcb):{let _0x243590=_0x1ab0b8[_0x46c719(0xe9)]['personId'];_0x3d1376[_0x46c719(0xcb)](_0x243590);break;}default:break;}}),T(this[_0x3fc5f9(0xaa)],_0x3d1376);}));}[_0x2bf071(0xf7)](){const _0x2f1483=_0x2bf071;this['disposeWithMe'](this[_0x2f1483(0xf6)][_0x2f1483(0x99)][_0x2f1483(0x85)](async _0x5c35c0=>{const _0x451e05=_0x2f1483;var _0x362066;let _0x1620d3=(_0x362066=this[_0x451e05(0xad)][_0x451e05(0xb6)](_0x5c35c0[_0x451e05(0x96)])[_0x451e05(0xdc)](_0x28e8fd=>_0x28e8fd[_0x451e05(0x8e)]===_0x5c35c0['threadId']))==null?void 0x0:_0x362066['root'];if(!_0x1620d3)return;let {unitId:_0x5b2b82,subUnitId:_0x6f7ebe}=_0x1620d3;switch(_0x5c35c0[_0x451e05(0x97)]&&this[_0x451e05(0x95)][_0x451e05(0xb7)](_0x5c35c0[_0x451e05(0x97)]),_0x5c35c0[_0x451e05(0xa1)]){case _0x292590[_0x451e05(0xe5)]:break;case _0x292590[_0x451e05(0xa6)]:var _0x525f5f,_0x3bf43f;this[_0x451e05(0xad)]['addComment'](_0x5b2b82,_0x6f7ebe,{'unitId':_0x5b2b82,'subUnitId':_0x6f7ebe,'ref':'','id':_0x5c35c0[_0x451e05(0xbc)],'dT':w(+_0x5c35c0[_0x451e05(0xd7)]),'threadId':_0x5c35c0[_0x451e05(0x8e)],'personId':(_0x525f5f=(_0x3bf43f=_0x5c35c0[_0x451e05(0x97)])==null?void 0x0:_0x3bf43f['userID'])==null?_0x5c35c0['userId']:_0x525f5f,'text':JSON[_0x451e05(0xe6)](_0x5c35c0['content']),'parentId':_0x1620d3['id']});break;case _0x292590[_0x451e05(0xed)]:{let _0x5b1451=this[_0x451e05(0xad)][_0x451e05(0xaf)](_0x5b2b82,_0x6f7ebe,_0x5c35c0['replyId']);_0x5b1451&&_0x5b1451[_0x451e05(0xd6)]&&this[_0x451e05(0xad)][_0x451e05(0xd4)](_0x5b2b82,_0x6f7ebe,_0x5c35c0[_0x451e05(0xbc)]);break;}case _0x292590[_0x451e05(0xec)]:this[_0x451e05(0xad)][_0x451e05(0xc7)](_0x5b2b82,_0x6f7ebe,{'commentId':_0x5c35c0[_0x451e05(0xbc)],'text':JSON[_0x451e05(0xe6)](_0x5c35c0[_0x451e05(0x9e)])});break;case _0x292590[_0x451e05(0x93)]:{var _0xbe141b;let _0x4e9001=(_0xbe141b=this[_0x451e05(0xad)][_0x451e05(0xb6)](_0x5c35c0['unitId'])[_0x451e05(0xdc)](_0x38daa8=>_0x38daa8[_0x451e05(0x8e)]===_0x5c35c0[_0x451e05(0x8e)]))==null?void 0x0:_0xbe141b[_0x451e05(0xbb)];_0x4e9001&&this[_0x451e05(0xad)][_0x451e05(0xba)](_0x5b2b82,_0x6f7ebe,_0x4e9001['id'],_0x5c35c0[_0x451e05(0xeb)]===_0x539f3c[_0x451e05(0xf8)]);break;}default:break;}}));}};O=D([E(0x0,_0x46a0e3(_0x587643)),E(0x1,_0x46a0e3(_0x30174f)),E(0x2,_0x46a0e3(_0x3bad2a)),E(0x3,_0x46a0e3(_0x1404d1))],O);function _0x3e8a(){const _0x34fd4b=['/list','get','syncUpdateMutationToColla','/universer-api/user/list','71880sVarcg','iterator','addComment','Add','parse','onStarting','requireSession','payload','YYYY/MM/DD\x20HH:mm','solved','Edit','Delete','object','setConfig','symbol','stringify','format','/universer-api/comment/unit/','version','getMemberID','_commentService','_init','Solved','subscribe','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1.0.0-alpha.3','_httpService','_threadCommentDataSourceService','values','dataSource','comments','threadId','resolved','prototype','rangeId','packageName','Solve','thread-comment-data-source.config','_userService','unitId','user','624bDvEhq','commentUpdate$','_initUserSync','delete','length','comment','content','users','_config','type','decorate','customRanges','@univerjs-pro/thread-comment-datasource','getOwnPropertyDescriptor','Reply','112084thwGhr','8mWjmAV','body','_injector','441510LOQNHA','defineProperty','_threadCommentModel','string','getComment','reply','_threadCommentDataSource','userId','ref','/delete','rangeType','getUnit','addUser','112370kmzgKW','_initDataSource','resolveComment','root','replyId','toPrimitive','pluginName','replies','418zIfQeK','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','115037MktKdQ','21903ErTGiE','4aOJVrF','onReady','post','updateComment','_sessionService','call','getUser','add','constructor','saveCommentToSnapshot','/solved','forEach','OpenOrReOpen','/reply','error','filter','deleteComment','map','parentId','createTimestamp','function','/edit','1831383htdTdl','code','find','pipe'];_0x3e8a=function(){return _0x34fd4b;};return _0x3e8a();}function k(_0x4b94ce,_0x11e247){const _0x5a9f6f=_0x2bf071;let _0x1934a4=_0x4b94ce['replies'][0x0];return{..._0x11e247,'id':_0x1934a4[_0x5a9f6f(0xbc)],'resolved':_0x4b94ce[_0x5a9f6f(0xeb)]===0x1,'dT':w(_0x1934a4[_0x5a9f6f(0xd7)]),'personId':_0x1934a4['userId'],'threadId':_0x1934a4[_0x5a9f6f(0x8e)]};}function A(_0x22d2fe,_0x30ecfd,_0x13c9f4){const _0x5b5f5d=_0x2bf071;var _0x5efec0,_0x373c51;if(((_0x5efec0=_0x22d2fe==null||(_0x373c51=_0x22d2fe[_0x5b5f5d(0xbf)])==null?void 0x0:_0x373c51[_0x5b5f5d(0x9c)])==null?0x0:_0x5efec0)>0x0){let _0xebe4d4=(_0x4552e2,_0x232ebd)=>({'id':_0x4552e2[_0x5b5f5d(0xbc)],'threadId':_0x4552e2[_0x5b5f5d(0x8e)],'dT':w(_0x4552e2[_0x5b5f5d(0xd7)]),'personId':_0x4552e2[_0x5b5f5d(0xb2)],'resolved':_0x22d2fe[_0x5b5f5d(0xeb)]===_0x539f3c[_0x5b5f5d(0xf8)],'unitId':_0x30ecfd,'subUnitId':_0x13c9f4,'text':JSON[_0x5b5f5d(0xe6)](_0x4552e2['content']),'parentId':_0x232ebd}),_0x50eb34=_0xebe4d4(_0x22d2fe[_0x5b5f5d(0xbf)][0x0]);return{..._0x50eb34,'children':_0x22d2fe[_0x5b5f5d(0xbf)]['slice'](0x1)['map'](_0x3bb607=>_0xebe4d4(_0x3bb607,_0x50eb34['id']))};}return null;}let j=class{constructor(_0x4d1d4a,_0x4e8d7e,_0x184cd1){const _0xa3a19b=_0x2bf071;this[_0xa3a19b(0x89)]=_0x4d1d4a,this[_0xa3a19b(0x95)]=_0x4e8d7e,this[_0xa3a19b(0xc8)]=_0x184cd1;}async[_0x2bf071(0xe4)](_0x1ec8f3){const _0x3e0928=_0x2bf071;var _0x2ed4bd,_0x4d6c8b;let {parentId:_0x3f3684,unitId:_0x18e571,text:_0x381136,threadId:_0x5dd1be}=_0x1ec8f3,_0x1ba29f=(_0x2ed4bd=(_0x4d6c8b=_0x381136['customRanges'])==null?void 0x0:_0x4d6c8b[_0x3e0928(0xd3)](_0x223d1a=>_0x223d1a[_0x3e0928(0xb5)]===_0x5a195a['COMMENT'])[_0x3e0928(0xd5)](_0x3e61b9=>_0x3e61b9['rangeId']))==null?[]:_0x2ed4bd,_0x5d5cef=JSON[_0x3e0928(0xf1)](_0x381136),_0x2ce5bd=(await this[_0x3e0928(0xc8)][_0x3e0928(0xe8)](_0x18e571))[_0x3e0928(0xf5)]();if(_0x3f3684){let _0x24eb87={'memberId':_0x2ce5bd,'unitId':_0x18e571,'content':_0x5d5cef,'mention':_0x1ba29f,'threadId':_0x5dd1be},_0x5e1b0f=(await this[_0x3e0928(0x89)][_0x3e0928(0xc6)](_0x3e0928(0xf3)+_0x18e571+_0x3e0928(0xd1),{'body':_0x24eb87}))[_0x3e0928(0xa9)][_0x3e0928(0xb0)];return{..._0x1ec8f3,'id':_0x5e1b0f[_0x3e0928(0xbc)],'dT':_0x20410a(+_0x5e1b0f['createTimestamp'])[_0x3e0928(0xf2)](_0x3e0928(0xea)),'personId':_0x5e1b0f[_0x3e0928(0xb2)]};}else{let _0x3f20bd={'memberId':_0x2ce5bd,'unitId':_0x18e571,'content':_0x5d5cef,'mention':_0x1ba29f};return k((await this[_0x3e0928(0x89)][_0x3e0928(0xc6)](_0x3e0928(0xf3)+_0x18e571+'/add',{'body':_0x3f20bd}))[_0x3e0928(0xa9)][_0x3e0928(0x9d)],_0x1ec8f3);}}async['updateComment'](_0x1e2ca0){const _0x44add0=_0x2bf071;var _0x2020e8,_0x26fcfc;let {text:_0x5fbe9a,unitId:_0x14cf30}=_0x1e2ca0,_0x29d220=(_0x2020e8=(_0x26fcfc=_0x5fbe9a[_0x44add0(0xa3)])==null?void 0x0:_0x26fcfc['filter'](_0xbba013=>_0xbba013[_0x44add0(0xb5)]===_0x5a195a['COMMENT'])[_0x44add0(0xd5)](_0x516afa=>_0x516afa[_0x44add0(0x91)]))==null?[]:_0x2020e8,_0x5207ba=JSON['stringify'](_0x5fbe9a),_0xa2738=_0x1e2ca0[_0x44add0(0x8e)],_0x4b3ace=_0x1e2ca0['id'],_0x2b6031={'memberId':(await this['_sessionService'][_0x44add0(0xe8)](_0x14cf30))[_0x44add0(0xf5)](),'unitId':_0x14cf30,'threadId':_0xa2738,'mention':_0x29d220,'content':_0x5207ba,'replyId':_0x4b3ace},_0x181b5e=await this[_0x44add0(0x89)][_0x44add0(0xc6)]('/universer-api/comment/unit/'+_0x14cf30+_0x44add0(0xd9),{'body':_0x2b6031});return!_0x181b5e[_0x44add0(0xa9)]['error']||_0x181b5e['body'][_0x44add0(0xd2)][_0x44add0(0xdb)]===0x1;}async[_0x2bf071(0xba)](_0x599cec){const _0xbf3fca=_0x2bf071;let {unitId:_0x248489}=_0x599cec,_0x105faa=_0x599cec[_0xbf3fca(0x8e)],_0x55e8d0={'memberId':this[_0xbf3fca(0x95)]['getCurrentUser']()['userID'],'unitId':_0x248489,'threadId':_0x105faa,'solved':_0x599cec[_0xbf3fca(0x8f)]?_0x539f3c[_0xbf3fca(0xf8)]:_0x539f3c[_0xbf3fca(0xd0)]},_0x18ec71=await this[_0xbf3fca(0x89)][_0xbf3fca(0xc6)](_0xbf3fca(0xf3)+_0x248489+_0xbf3fca(0xce),{'body':_0x55e8d0});return!_0x18ec71[_0xbf3fca(0xa9)][_0xbf3fca(0xd2)]||_0x18ec71[_0xbf3fca(0xa9)][_0xbf3fca(0xd2)][_0xbf3fca(0xdb)]===0x1;}async['deleteComment'](_0x39464f,_0x493147,_0x1a398e,_0xbbb2a){const _0x4c3305=_0x2bf071;let _0x5b920e={'memberId':(await this[_0x4c3305(0xc8)][_0x4c3305(0xe8)](_0x39464f))[_0x4c3305(0xf5)](),'threadId':_0x1a398e,'replyId':_0xbbb2a,'unitId':_0x39464f},_0x4410d7=await this[_0x4c3305(0x89)][_0x4c3305(0xc6)](_0x4c3305(0xf3)+_0x39464f+_0x4c3305(0xb4),{'body':_0x5b920e});return!_0x4410d7[_0x4c3305(0xa9)][_0x4c3305(0xd2)]||_0x4410d7[_0x4c3305(0xa9)][_0x4c3305(0xd2)][_0x4c3305(0xdb)]===0x1;}async['listComments'](_0x2462a1,_0x3d83aa,_0x3bc3d1){const _0x4c2fc9=_0x2bf071;let _0x59dac3={'unitId':_0x2462a1,'threadId':_0x3bc3d1},_0x242b71=await this[_0x4c2fc9(0x89)][_0x4c2fc9(0xc6)](_0x4c2fc9(0xf3)+_0x2462a1+_0x4c2fc9(0xde),{'body':_0x59dac3}),_0x4e7392=_0x3bc3d1[_0x4c2fc9(0xd5)](_0x3254cd=>A(_0x242b71[_0x4c2fc9(0xa9)][_0x4c2fc9(0x8d)][_0x3254cd],_0x2462a1,_0x3d83aa))[_0x4c2fc9(0xd3)](Boolean);return Object[_0x4c2fc9(0x8b)](_0x242b71[_0x4c2fc9(0xa9)]['users'])['forEach'](_0x1bc151=>{const _0x3da313=_0x4c2fc9;this[_0x3da313(0x95)][_0x3da313(0xb7)](_0x1bc151);}),_0x4e7392;}[_0x2bf071(0xcd)](_0x215525){const _0x64b256=_0x2bf071;return{'id':_0x215525['id'],'threadId':_0x215525['threadId'],'ref':_0x215525[_0x64b256(0xb3)]};}};j=D([E(0x0,_0x46a0e3(_0x114486)),E(0x1,_0x46a0e3(_0x3bad2a)),E(0x2,_0x46a0e3(_0x57e2d4))],j);let M=class extends _0x4779d9{constructor(_0x1ab369,_0x36be48){const _0x42c535=_0x2bf071;super(),this[_0x42c535(0x8a)]=_0x1ab369,this[_0x42c535(0xb1)]=_0x36be48,this[_0x42c535(0xb9)]();}[_0x2bf071(0xb9)](){const _0x4bd81a=_0x2bf071;this[_0x4bd81a(0x8a)][_0x4bd81a(0x8c)]=this[_0x4bd81a(0xb1)],this[_0x4bd81a(0x8a)][_0x4bd81a(0xe0)]=!0x1;}};M=D([E(0x0,_0x34873a),E(0x1,_0x46a0e3(j))],M);function _0x2e04(_0x22868c,_0x56ecdd){_0x22868c=_0x22868c-0x85;const _0x3e8a24=_0x3e8a();let _0x2e04f2=_0x3e8a24[_0x22868c];return _0x2e04f2;}function N(_0x33f07f){'@babel/helpers - typeof';const _0xee0da2=_0x2bf071;return N=typeof Symbol==_0xee0da2(0xd8)&&typeof Symbol[_0xee0da2(0xe3)]==_0xee0da2(0xf0)?function(_0x3d20eb){return typeof _0x3d20eb;}:function(_0x1b31da){const _0x30934f=_0xee0da2;return _0x1b31da&&typeof Symbol==_0x30934f(0xd8)&&_0x1b31da[_0x30934f(0xcc)]===Symbol&&_0x1b31da!==Symbol[_0x30934f(0x90)]?_0x30934f(0xf0):typeof _0x1b31da;},N(_0x33f07f);}function P(_0x25c40a,_0x3bd756){const _0x574de5=_0x2bf071;if(N(_0x25c40a)!=_0x574de5(0xee)||!_0x25c40a)return _0x25c40a;var _0xa7e120=_0x25c40a[Symbol[_0x574de5(0xbd)]];if(_0xa7e120!==void 0x0){var _0x38e7ef=_0xa7e120[_0x574de5(0xc9)](_0x25c40a,_0x3bd756||'default');if(N(_0x38e7ef)!='object')return _0x38e7ef;throw TypeError(_0x574de5(0xc1));}return(_0x3bd756===_0x574de5(0xae)?String:Number)(_0x25c40a);}function F(_0x8f2e76){const _0x5a7522=_0x2bf071;var _0x40b58f=P(_0x8f2e76,_0x5a7522(0xae));return N(_0x40b58f)=='symbol'?_0x40b58f:_0x40b58f+'';}function I(_0x1d33b2,_0x2323c2,_0x166793){const _0xa1aa8f=_0x2bf071;return(_0x2323c2=F(_0x2323c2))in _0x1d33b2?Object[_0xa1aa8f(0xac)](_0x1d33b2,_0x2323c2,{'value':_0x166793,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1d33b2[_0x2323c2]=_0x166793,_0x1d33b2;}let L=class extends _0x1a2f1d{constructor(_0x156cac=C,_0x8dd30c,_0x5cef1a){const _0x3642b0=_0x2bf071;super(),this[_0x3642b0(0xa0)]=_0x156cac,this[_0x3642b0(0xaa)]=_0x8dd30c,this[_0x3642b0(0x86)]=_0x5cef1a;let {..._0x14af15}=_0x37fe87({},C,this['_config']);this[_0x3642b0(0x86)][_0x3642b0(0xef)](_0x3642b0(0x94),_0x14af15);}[_0x2bf071(0xe7)](){const _0x56fcaa=_0x2bf071;[[j],[M],[O]][_0x56fcaa(0xcf)](_0x50087b=>{const _0x238e7c=_0x56fcaa;this[_0x238e7c(0xaa)][_0x238e7c(0xcb)](_0x50087b);});}[_0x2bf071(0xc5)](){const _0x439966=_0x2bf071;this[_0x439966(0xaa)][_0x439966(0xdf)](M),this[_0x439966(0xaa)][_0x439966(0xdf)](O);}};I(L,_0x2bf071(0xbe),_0x2bf071(0x87)),I(L,_0x2bf071(0x92),x),I(L,_0x2bf071(0xf4),S),L=D([_0x91861d(_0x4c4fd2,_0x274af5,_0x239c9c),E(0x1,_0x46a0e3(_0x1404d1)),E(0x2,_0x7b49f5)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ const _0xdb916c=_0x4b90;(function(_0xd57d59,_0x47880c){const _0x3289ed=_0x4b90,_0x136041=_0xd57d59();while(!![]){try{const _0x29ecfa=parseInt(_0x3289ed(0x1d3))/0x1*(parseInt(_0x3289ed(0x186))/0x2)+-parseInt(_0x3289ed(0x184))/0x3*(-parseInt(_0x3289ed(0x187))/0x4)+-parseInt(_0x3289ed(0x195))/0x5+parseInt(_0x3289ed(0x1a0))/0x6*(parseInt(_0x3289ed(0x1e4))/0x7)+parseInt(_0x3289ed(0x198))/0x8*(parseInt(_0x3289ed(0x1a4))/0x9)+parseInt(_0x3289ed(0x1d1))/0xa+-parseInt(_0x3289ed(0x1a8))/0xb;if(_0x29ecfa===_0x47880c)break;else _0x136041['push'](_0x136041['shift']());}catch(_0x1ecc96){_0x136041['push'](_0x136041['shift']());}}}(_0x5be0,0xa85f4));import{CollaborationSessionService as _0x1a712a,CommentService as _0x165000,UniverCollaborationClientPlugin as _0x1cda46}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x33efd4}from'@univerjs-pro/license';import{CustomRangeType as _0x597cc7,DependentOn as _0x28ebe0,Disposable as _0x3b174f,IConfigService as _0x4409b2,Inject as _0x511ab3,Injector as _0x2deea2,Plugin as _0x23d328,UserManagerService as _0x49fdc5,dateKit as _0x5bc808,merge as _0x18c0bf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x556559}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x3cbbfe,CommentUpdateEventType as _0x138e45}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x15d0d0,ThreadCommentModel as _0x1809a2}from'@univerjs/thread-comment';import{bufferTime as _0xa2b47}from'rxjs';import{HTTPService as _0x28c65c}from'@univerjs/network';var x=_0xdb916c(0x1a7),S='1.0.0-alpha.5';const C={},w=_0x197b5f=>_0x5bc808(new Date(+_0x197b5f))[_0xdb916c(0x1bb)](_0xdb916c(0x1bc)),T=async(_0x48e32b,_0x380810)=>{const _0x132a94=_0xdb916c;let _0x23d592=_0x48e32b[_0x132a94(0x1cf)](_0x49fdc5),_0x1ac2d2=_0x48e32b[_0x132a94(0x1cf)](_0x28c65c);_0x380810[_0x132a94(0x1b0)](_0xf287fd=>{const _0x31cd6a=_0x132a94;_0x23d592[_0x31cd6a(0x1ac)](_0xf287fd)&&_0x380810[_0x31cd6a(0x18f)](_0xf287fd);}),_0x380810[_0x132a94(0x1c8)]&&(await _0x1ac2d2['get'](_0x132a94(0x1b5),{'params':{'userIDs':[..._0x380810]}}))[_0x132a94(0x19a)][_0x132a94(0x1e1)][_0x132a94(0x1b0)](_0x209290=>{const _0x2682c2=_0x132a94;_0x209290&&_0x23d592[_0x2682c2(0x18a)](_0x209290);});};function E(_0x48f54b,_0x4bc891){return function(_0x1b6a66,_0x42a2b5){_0x4bc891(_0x1b6a66,_0x42a2b5,_0x48f54b);};}function D(_0x3fff96,_0x1bc742,_0x1a90b8,_0x22ce73){const _0x519f50=_0xdb916c;var _0x2c7031=arguments[_0x519f50(0x1d4)],_0x2d364f=_0x2c7031<0x3?_0x1bc742:_0x22ce73===null?_0x22ce73=Object['getOwnPropertyDescriptor'](_0x1bc742,_0x1a90b8):_0x22ce73,_0x3098ac;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x519f50(0x1c5))_0x2d364f=Reflect['decorate'](_0x3fff96,_0x1bc742,_0x1a90b8,_0x22ce73);else{for(var _0x1dfe2c=_0x3fff96[_0x519f50(0x1d4)]-0x1;_0x1dfe2c>=0x0;_0x1dfe2c--)(_0x3098ac=_0x3fff96[_0x1dfe2c])&&(_0x2d364f=(_0x2c7031<0x3?_0x3098ac(_0x2d364f):_0x2c7031>0x3?_0x3098ac(_0x1bc742,_0x1a90b8,_0x2d364f):_0x3098ac(_0x1bc742,_0x1a90b8))||_0x2d364f);}return _0x2c7031>0x3&&_0x2d364f&&Object[_0x519f50(0x1ae)](_0x1bc742,_0x1a90b8,_0x2d364f),_0x2d364f;}let O=class extends _0x3b174f{constructor(_0x310647,_0x455a8f,_0x279bea,_0x4daf61){const _0x2dc41e=_0xdb916c;super(),this['_commentService']=_0x310647,this[_0x2dc41e(0x1c2)]=_0x455a8f,this[_0x2dc41e(0x1e3)]=_0x279bea,this[_0x2dc41e(0x180)]=_0x4daf61,this[_0x2dc41e(0x1aa)](),this['_initUserSync']();}[_0xdb916c(0x1a6)](){const _0x177650=_0xdb916c;this[_0x177650(0x1e6)](this[_0x177650(0x1c2)][_0x177650(0x1d2)]['pipe'](_0xa2b47(0x10))[_0x177650(0x19f)](_0x3a1b73=>{let _0x45f3b0=new Set();_0x3a1b73['forEach'](_0x1dfb79=>{const _0x1712e0=_0x4b90;switch(_0x1dfb79[_0x1712e0(0x1cb)]){case _0x1712e0(0x1b6):{let _0x5144d0=_0x1dfb79[_0x1712e0(0x1c6)][_0x1712e0(0x1b1)];_0x45f3b0['add'](_0x5144d0);break;}default:break;}}),T(this['_injector'],_0x45f3b0);}));}[_0xdb916c(0x1aa)](){const _0x404bd0=_0xdb916c;this[_0x404bd0(0x1e6)](this[_0x404bd0(0x18d)][_0x404bd0(0x1d2)][_0x404bd0(0x19f)](async _0x38a576=>{const _0x247783=_0x404bd0;var _0x29ebfb;let _0x4ed3b8=(_0x29ebfb=this[_0x247783(0x1c2)][_0x247783(0x1c4)](_0x38a576[_0x247783(0x1b9)])[_0x247783(0x1db)](_0x57666f=>_0x57666f[_0x247783(0x1da)]===_0x38a576[_0x247783(0x1da)]))==null?void 0x0:_0x29ebfb[_0x247783(0x1dd)];if(!_0x4ed3b8)return;let {unitId:_0x48518e,subUnitId:_0x3a2468}=_0x4ed3b8;switch(_0x38a576['user']&&this['_userService'][_0x247783(0x18a)](_0x38a576['user']),_0x38a576['type']){case _0x138e45[_0x247783(0x1b2)]:break;case _0x138e45[_0x247783(0x197)]:var _0xaaffd6,_0xb3235c;this[_0x247783(0x1c2)][_0x247783(0x1b8)](_0x48518e,_0x3a2468,{'unitId':_0x48518e,'subUnitId':_0x3a2468,'ref':'','id':_0x38a576['replyId'],'dT':w(+_0x38a576[_0x247783(0x1dc)]),'threadId':_0x38a576[_0x247783(0x1da)],'personId':(_0xaaffd6=(_0xb3235c=_0x38a576[_0x247783(0x1c0)])==null?void 0x0:_0xb3235c['userID'])==null?_0x38a576[_0x247783(0x1ba)]:_0xaaffd6,'text':JSON[_0x247783(0x193)](_0x38a576[_0x247783(0x1a2)]),'parentId':_0x4ed3b8['id']});break;case _0x138e45[_0x247783(0x181)]:{let _0xca251=this[_0x247783(0x1c2)]['getComment'](_0x48518e,_0x3a2468,_0x38a576['replyId']);_0xca251&&_0xca251[_0x247783(0x183)]&&this[_0x247783(0x1c2)][_0x247783(0x1a5)](_0x48518e,_0x3a2468,_0x38a576[_0x247783(0x1ad)]);break;}case _0x138e45['Edit']:this[_0x247783(0x1c2)][_0x247783(0x1c1)](_0x48518e,_0x3a2468,{'commentId':_0x38a576[_0x247783(0x1ad)],'text':JSON[_0x247783(0x193)](_0x38a576[_0x247783(0x1a2)])});break;case _0x138e45[_0x247783(0x185)]:{var _0x4b5b82;let _0x398d38=(_0x4b5b82=this[_0x247783(0x1c2)][_0x247783(0x1c4)](_0x38a576['unitId'])[_0x247783(0x1db)](_0x261060=>_0x261060[_0x247783(0x1da)]===_0x38a576[_0x247783(0x1da)]))==null?void 0x0:_0x4b5b82[_0x247783(0x1dd)];_0x398d38&&this[_0x247783(0x1c2)][_0x247783(0x188)](_0x48518e,_0x3a2468,_0x398d38['id'],_0x38a576[_0x247783(0x1ca)]===_0x3cbbfe['Solved']);break;}default:break;}}));}};function _0x5be0(){const _0x1793c4=['_threadCommentDataSourceService','size','toPrimitive','solved','type','setConfig','filter','resolved','get','/solved','10374470KnfOOl','commentUpdate$','1691wbEybr','length','reply','/delete','COMMENT','packageName','default','threadId','find','createTimestamp','root','stringify','syncUpdateMutationToColla','symbol','users','post','_userService','4156040wwZYGx','rangeType','disposeWithMe','/list','map','_injector','Delete','version','parentId','546720XudLzK','Solve','354mquOXg','8nIoYAG','resolveComment','error','addUser','ref','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commentService','saveCommentToSnapshot','delete','_httpService','customRanges','onReady','parse','comments','404210rPHcvL','dataSource','Reply','16iHhEQp','call','body','_threadCommentDataSource','_sessionService','code','Solved','subscribe','6jcXRNr','_config','content','thread-comment-data-source.config','1443375ZVzEAv','deleteComment','_initUserSync','@univerjs-pro/thread-comment-datasource','20297310iLwjSh','_configService','_init','constructor','getUser','replyId','defineProperty','/edit','forEach','personId','Add','replies','getMemberID','/universer-api/user/list','add','requireSession','addComment','unitId','userId','format','YYYY/MM/DD\x20HH:mm','prototype','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','user','updateComment','_threadCommentModel','_initDataSource','getUnit','function','payload'];_0x5be0=function(){return _0x1793c4;};return _0x5be0();}O=D([E(0x0,_0x511ab3(_0x165000)),E(0x1,_0x511ab3(_0x1809a2)),E(0x2,_0x511ab3(_0x49fdc5)),E(0x3,_0x511ab3(_0x2deea2))],O);function k(_0x1e58fc,_0x1cbf7c){const _0x2c3129=_0xdb916c;let _0x28107e=_0x1e58fc[_0x2c3129(0x1b3)][0x0];return{..._0x1cbf7c,'id':_0x28107e[_0x2c3129(0x1ad)],'resolved':_0x1e58fc[_0x2c3129(0x1ca)]===0x1,'dT':w(_0x28107e['createTimestamp']),'personId':_0x28107e[_0x2c3129(0x1ba)],'threadId':_0x28107e[_0x2c3129(0x1da)]};}function A(_0x5a76bc,_0x5e29dc,_0x19ad91){const _0x3a2c13=_0xdb916c;var _0x3c1b32,_0x44aa2e;if(((_0x3c1b32=_0x5a76bc==null||(_0x44aa2e=_0x5a76bc['replies'])==null?void 0x0:_0x44aa2e[_0x3a2c13(0x1d4)])==null?0x0:_0x3c1b32)>0x0){let _0x5397d3=(_0x521379,_0x5ed585)=>({'id':_0x521379[_0x3a2c13(0x1ad)],'threadId':_0x521379[_0x3a2c13(0x1da)],'dT':w(_0x521379[_0x3a2c13(0x1dc)]),'personId':_0x521379[_0x3a2c13(0x1ba)],'resolved':_0x5a76bc['solved']===_0x3cbbfe[_0x3a2c13(0x19e)],'unitId':_0x5e29dc,'subUnitId':_0x19ad91,'text':JSON[_0x3a2c13(0x193)](_0x521379[_0x3a2c13(0x1a2)]),'parentId':_0x5ed585}),_0x2f964d=_0x5397d3(_0x5a76bc[_0x3a2c13(0x1b3)][0x0]);return{..._0x2f964d,'children':_0x5a76bc['replies']['slice'](0x1)[_0x3a2c13(0x17f)](_0x50e0ad=>_0x5397d3(_0x50e0ad,_0x2f964d['id']))};}return null;}let j=class{constructor(_0x5e764a,_0x7d2ffb,_0x2c5e7f){const _0x4d4037=_0xdb916c;this[_0x4d4037(0x190)]=_0x5e764a,this[_0x4d4037(0x1e3)]=_0x7d2ffb,this['_sessionService']=_0x2c5e7f;}async[_0xdb916c(0x1b8)](_0x59a649){const _0x468ea5=_0xdb916c;var _0x4aa06a,_0x56a71b;let {parentId:_0x3187ee,unitId:_0x210f94,text:_0x54a14d,threadId:_0x287bb2}=_0x59a649,_0x29afff=(_0x4aa06a=(_0x56a71b=_0x54a14d['customRanges'])==null?void 0x0:_0x56a71b['filter'](_0x154f07=>_0x154f07['rangeType']===_0x597cc7[_0x468ea5(0x1d7)])[_0x468ea5(0x17f)](_0x2b9c46=>_0x2b9c46['rangeId']))==null?[]:_0x4aa06a,_0x113f47=JSON[_0x468ea5(0x1de)](_0x54a14d),_0x1b9156=(await this['_sessionService'][_0x468ea5(0x1b7)](_0x210f94))[_0x468ea5(0x1b4)]();if(_0x3187ee){let _0x4fc21e={'memberId':_0x1b9156,'unitId':_0x210f94,'content':_0x113f47,'mention':_0x29afff,'threadId':_0x287bb2},_0x2494a0=(await this[_0x468ea5(0x190)][_0x468ea5(0x1e2)]('/universer-api/comment/unit/'+_0x210f94+'/reply',{'body':_0x4fc21e}))[_0x468ea5(0x19a)][_0x468ea5(0x1d5)];return{..._0x59a649,'id':_0x2494a0['replyId'],'dT':_0x5bc808(+_0x2494a0['createTimestamp'])[_0x468ea5(0x1bb)](_0x468ea5(0x1bc)),'personId':_0x2494a0[_0x468ea5(0x1ba)]};}else{let _0x369514={'memberId':_0x1b9156,'unitId':_0x210f94,'content':_0x113f47,'mention':_0x29afff};return k((await this[_0x468ea5(0x190)]['post']('/universer-api/comment/unit/'+_0x210f94+'/add',{'body':_0x369514}))[_0x468ea5(0x19a)]['comment'],_0x59a649);}}async[_0xdb916c(0x1c1)](_0xaf8197){const _0x15fc08=_0xdb916c;var _0xf2b31,_0x5387c4;let {text:_0x9c7921,unitId:_0x5a89ef}=_0xaf8197,_0x1bb67b=(_0xf2b31=(_0x5387c4=_0x9c7921[_0x15fc08(0x191)])==null?void 0x0:_0x5387c4[_0x15fc08(0x1cd)](_0x38371d=>_0x38371d[_0x15fc08(0x1e5)]===_0x597cc7[_0x15fc08(0x1d7)])['map'](_0x4aaa92=>_0x4aaa92['rangeId']))==null?[]:_0xf2b31,_0x3a0ac3=JSON[_0x15fc08(0x1de)](_0x9c7921),_0x3f42d6=_0xaf8197[_0x15fc08(0x1da)],_0x57c26a=_0xaf8197['id'],_0x5b0bfe={'memberId':(await this[_0x15fc08(0x19c)]['requireSession'](_0x5a89ef))['getMemberID'](),'unitId':_0x5a89ef,'threadId':_0x3f42d6,'mention':_0x1bb67b,'content':_0x3a0ac3,'replyId':_0x57c26a},_0x1223f8=await this[_0x15fc08(0x190)][_0x15fc08(0x1e2)](_0x15fc08(0x1bf)+_0x5a89ef+_0x15fc08(0x1af),{'body':_0x5b0bfe});return!_0x1223f8[_0x15fc08(0x19a)][_0x15fc08(0x189)]||_0x1223f8[_0x15fc08(0x19a)]['error'][_0x15fc08(0x19d)]===0x1;}async[_0xdb916c(0x188)](_0x257817){const _0x19f6c5=_0xdb916c;let {unitId:_0x155c43}=_0x257817,_0x267810=_0x257817['threadId'],_0x579a58={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x155c43,'threadId':_0x267810,'solved':_0x257817[_0x19f6c5(0x1ce)]?_0x3cbbfe['Solved']:_0x3cbbfe['OpenOrReOpen']},_0xf38f12=await this[_0x19f6c5(0x190)][_0x19f6c5(0x1e2)](_0x19f6c5(0x1bf)+_0x155c43+_0x19f6c5(0x1d0),{'body':_0x579a58});return!_0xf38f12[_0x19f6c5(0x19a)][_0x19f6c5(0x189)]||_0xf38f12['body'][_0x19f6c5(0x189)][_0x19f6c5(0x19d)]===0x1;}async[_0xdb916c(0x1a5)](_0x41c3a7,_0x2fbb9a,_0x506bd8,_0x5b69cf){const _0x1b247a=_0xdb916c;let _0x459d56={'memberId':(await this['_sessionService']['requireSession'](_0x41c3a7))[_0x1b247a(0x1b4)](),'threadId':_0x506bd8,'replyId':_0x5b69cf,'unitId':_0x41c3a7},_0x5b0364=await this[_0x1b247a(0x190)][_0x1b247a(0x1e2)](_0x1b247a(0x1bf)+_0x41c3a7+_0x1b247a(0x1d6),{'body':_0x459d56});return!_0x5b0364[_0x1b247a(0x19a)][_0x1b247a(0x189)]||_0x5b0364['body'][_0x1b247a(0x189)][_0x1b247a(0x19d)]===0x1;}async['listComments'](_0x3427d2,_0x133f8d,_0x26f03d){const _0x687068=_0xdb916c;let _0x5080e5={'unitId':_0x3427d2,'threadId':_0x26f03d},_0x3ca7e8=await this[_0x687068(0x190)][_0x687068(0x1e2)](_0x687068(0x1bf)+_0x3427d2+_0x687068(0x17e),{'body':_0x5080e5}),_0x482b6b=_0x26f03d['map'](_0x3e79c1=>A(_0x3ca7e8['body'][_0x687068(0x194)][_0x3e79c1],_0x3427d2,_0x133f8d))[_0x687068(0x1cd)](Boolean);return Object['values'](_0x3ca7e8[_0x687068(0x19a)][_0x687068(0x1e1)])['forEach'](_0x1d34af=>{const _0x5cddb8=_0x687068;this[_0x5cddb8(0x1e3)][_0x5cddb8(0x18a)](_0x1d34af);}),_0x482b6b;}[_0xdb916c(0x18e)](_0x138b74){const _0x20809f=_0xdb916c;return{'id':_0x138b74['id'],'threadId':_0x138b74[_0x20809f(0x1da)],'ref':_0x138b74[_0x20809f(0x18b)]};}};j=D([E(0x0,_0x511ab3(_0x28c65c)),E(0x1,_0x511ab3(_0x49fdc5)),E(0x2,_0x511ab3(_0x1a712a))],j);let M=class extends _0x3b174f{constructor(_0x3a9496,_0x1b94f6){const _0x2e6264=_0xdb916c;super(),this['_threadCommentDataSourceService']=_0x3a9496,this[_0x2e6264(0x19b)]=_0x1b94f6,this['_initDataSource']();}[_0xdb916c(0x1c3)](){const _0x16dac9=_0xdb916c;this['_threadCommentDataSourceService'][_0x16dac9(0x196)]=this[_0x16dac9(0x19b)],this[_0x16dac9(0x1c7)][_0x16dac9(0x1df)]=!0x1;}};M=D([E(0x0,_0x15d0d0),E(0x1,_0x511ab3(j))],M);function N(_0x2de986){'@babel/helpers - typeof';const _0x2fb6c2=_0xdb916c;return N=typeof Symbol==_0x2fb6c2(0x1c5)&&typeof Symbol['iterator']==_0x2fb6c2(0x1e0)?function(_0x236c78){return typeof _0x236c78;}:function(_0xe94ed1){const _0x2b7782=_0x2fb6c2;return _0xe94ed1&&typeof Symbol==_0x2b7782(0x1c5)&&_0xe94ed1[_0x2b7782(0x1ab)]===Symbol&&_0xe94ed1!==Symbol[_0x2b7782(0x1bd)]?_0x2b7782(0x1e0):typeof _0xe94ed1;},N(_0x2de986);}function P(_0x4ba659,_0x46f6cd){const _0x20b501=_0xdb916c;if(N(_0x4ba659)!='object'||!_0x4ba659)return _0x4ba659;var _0x252cc3=_0x4ba659[Symbol[_0x20b501(0x1c9)]];if(_0x252cc3!==void 0x0){var _0x4889ac=_0x252cc3[_0x20b501(0x199)](_0x4ba659,_0x46f6cd||_0x20b501(0x1d9));if(N(_0x4889ac)!='object')return _0x4889ac;throw TypeError(_0x20b501(0x18c));}return(_0x46f6cd==='string'?String:Number)(_0x4ba659);}function F(_0x306573){const _0x3d8b66=_0xdb916c;var _0x2b3d50=P(_0x306573,'string');return N(_0x2b3d50)==_0x3d8b66(0x1e0)?_0x2b3d50:_0x2b3d50+'';}function I(_0xe1de15,_0x33f699,_0x4a4412){const _0x1fc796=_0xdb916c;return(_0x33f699=F(_0x33f699))in _0xe1de15?Object[_0x1fc796(0x1ae)](_0xe1de15,_0x33f699,{'value':_0x4a4412,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xe1de15[_0x33f699]=_0x4a4412,_0xe1de15;}function _0x4b90(_0xd25387,_0x5d89f3){_0xd25387=_0xd25387-0x17e;const _0x5be082=_0x5be0();let _0x4b908a=_0x5be082[_0xd25387];return _0x4b908a;}let L=class extends _0x23d328{constructor(_0x1c5739=C,_0x11d3b5,_0x161079){const _0x5c23e4=_0xdb916c;super(),this[_0x5c23e4(0x1a1)]=_0x1c5739,this['_injector']=_0x11d3b5,this[_0x5c23e4(0x1a9)]=_0x161079;let {..._0x1a20b0}=_0x18c0bf({},C,this['_config']);this['_configService'][_0x5c23e4(0x1cc)](_0x5c23e4(0x1a3),_0x1a20b0);}['onStarting'](){const _0x136651=_0xdb916c;[[j],[M],[O]][_0x136651(0x1b0)](_0x49a285=>{const _0x55d26e=_0x136651;this[_0x55d26e(0x180)][_0x55d26e(0x1b6)](_0x49a285);});}[_0xdb916c(0x192)](){const _0x150e69=_0xdb916c;this[_0x150e69(0x180)][_0x150e69(0x1cf)](M),this[_0x150e69(0x180)][_0x150e69(0x1cf)](O);}};I(L,'pluginName',_0xdb916c(0x1be)),I(L,_0xdb916c(0x1d8),x),I(L,_0xdb916c(0x182),S),L=D([_0x28ebe0(_0x556559,_0x1cda46,_0x33efd4),E(0x1,_0x511ab3(_0x2deea2)),E(0x2,_0x4409b2)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3621(_0x2382ed,_0x417e4d){_0x2382ed=_0x2382ed-0x1d6;const _0x1bc067=_0x1bc0();let _0x36214b=_0x1bc067[_0x2382ed];return _0x36214b;}(function(_0x4173bc,_0x129385){const _0x553980=_0x3621,_0x3145a3=_0x4173bc();while(!![]){try{const _0x4d81e9=parseInt(_0x553980(0x258))/0x1+parseInt(_0x553980(0x1e5))/0x2*(parseInt(_0x553980(0x251))/0x3)+parseInt(_0x553980(0x20d))/0x4+-parseInt(_0x553980(0x225))/0x5+parseInt(_0x553980(0x202))/0x6*(parseInt(_0x553980(0x1fb))/0x7)+-parseInt(_0x553980(0x227))/0x8+-parseInt(_0x553980(0x21f))/0x9*(parseInt(_0x553980(0x25b))/0xa);if(_0x4d81e9===_0x129385)break;else _0x3145a3['push'](_0x3145a3['shift']());}catch(_0x3c1e78){_0x3145a3['push'](_0x3145a3['shift']());}}}(_0x1bc0,0x1bcf7),function(_0x3fb22a,_0x5af42d){const _0x54f887=_0x3621;typeof exports==_0x54f887(0x1f2)&&typeof module<'u'?_0x5af42d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x54f887(0x223)&&define[_0x54f887(0x1d8)]?define([_0x54f887(0x21b),_0x54f887(0x238),_0x54f887(0x222),_0x54f887(0x24f),_0x54f887(0x224),_0x54f887(0x20f),'@univerjs/thread-comment',_0x54f887(0x212),_0x54f887(0x25f)],_0x5af42d):(_0x3fb22a=typeof globalThis<'u'?globalThis:_0x3fb22a||self,_0x5af42d(_0x3fb22a[_0x54f887(0x249)]={},_0x3fb22a[_0x54f887(0x25a)],_0x3fb22a[_0x54f887(0x211)],_0x3fb22a[_0x54f887(0x205)],_0x3fb22a[_0x54f887(0x253)],_0x3fb22a['UniverProtocol'],_0x3fb22a[_0x54f887(0x25e)],_0x3fb22a['rxjs'],_0x3fb22a[_0x54f887(0x1ed)]));}(this,function(_0x12a69f,_0x2e378a,_0x35c489,_0x579a25,_0x3a4fb4,_0x47b348,_0x132505,_0x6ca5d4,_0x903e43){const _0x210f5c=_0x3621;Object['defineProperty'](_0x12a69f,Symbol[_0x210f5c(0x1dc)],{'value':'Module'});var _0x20eeeb=_0x210f5c(0x206),_0x24c283='1.0.0-alpha.3';let _0x538f41={},_0x1873da=_0x1ee369=>(0x0,_0x579a25[_0x210f5c(0x231)])(new Date(+_0x1ee369))[_0x210f5c(0x266)](_0x210f5c(0x1fd)),_0x229e68=async(_0x5c53ea,_0x544d4d)=>{const _0x3b6405=_0x210f5c;let _0x5219e7=_0x5c53ea[_0x3b6405(0x260)](_0x579a25[_0x3b6405(0x252)]),_0x261797=_0x5c53ea[_0x3b6405(0x260)](_0x903e43[_0x3b6405(0x210)]);_0x544d4d['forEach'](_0x2c28b4=>{const _0x14a0c2=_0x3b6405;_0x5219e7[_0x14a0c2(0x235)](_0x2c28b4)&&_0x544d4d[_0x14a0c2(0x242)](_0x2c28b4);}),_0x544d4d[_0x3b6405(0x216)]&&(await _0x261797[_0x3b6405(0x260)](_0x3b6405(0x263),{'params':{'userIDs':[..._0x544d4d]}}))[_0x3b6405(0x22f)][_0x3b6405(0x1e3)][_0x3b6405(0x1e6)](_0x52b0b9=>{const _0x498b37=_0x3b6405;_0x52b0b9&&_0x5219e7[_0x498b37(0x1df)](_0x52b0b9);});};function _0x4da42c(_0x2fa35b,_0x3174a4){return function(_0x44ed67,_0x4e039d){_0x3174a4(_0x44ed67,_0x4e039d,_0x2fa35b);};}function _0x3ad348(_0x386047,_0x2e7670,_0x155feb,_0x2a07c5){const _0x51148f=_0x210f5c;var _0x2a7e9e=arguments[_0x51148f(0x1ef)],_0x48e50d=_0x2a7e9e<0x3?_0x2e7670:_0x2a07c5===null?_0x2a07c5=Object[_0x51148f(0x1f4)](_0x2e7670,_0x155feb):_0x2a07c5,_0x1e94a6;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x48e50d=Reflect[_0x51148f(0x22e)](_0x386047,_0x2e7670,_0x155feb,_0x2a07c5);else{for(var _0x5a1b5f=_0x386047[_0x51148f(0x1ef)]-0x1;_0x5a1b5f>=0x0;_0x5a1b5f--)(_0x1e94a6=_0x386047[_0x5a1b5f])&&(_0x48e50d=(_0x2a7e9e<0x3?_0x1e94a6(_0x48e50d):_0x2a7e9e>0x3?_0x1e94a6(_0x2e7670,_0x155feb,_0x48e50d):_0x1e94a6(_0x2e7670,_0x155feb))||_0x48e50d);}return _0x2a7e9e>0x3&&_0x48e50d&&Object['defineProperty'](_0x2e7670,_0x155feb,_0x48e50d),_0x48e50d;}let _0x4399f3=class extends _0x579a25[_0x210f5c(0x262)]{constructor(_0x316ca8,_0x4d6258,_0x4186c8,_0x19b655){const _0x52fff3=_0x210f5c;super(),this['_commentService']=_0x316ca8,this[_0x52fff3(0x1e1)]=_0x4d6258,this[_0x52fff3(0x256)]=_0x4186c8,this[_0x52fff3(0x239)]=_0x19b655,this[_0x52fff3(0x23a)](),this[_0x52fff3(0x23f)]();}[_0x210f5c(0x23f)](){const _0xb3d323=_0x210f5c;this[_0xb3d323(0x1ea)](this[_0xb3d323(0x1e1)][_0xb3d323(0x230)]['pipe']((0x0,_0x6ca5d4[_0xb3d323(0x1e2)])(0x10))['subscribe'](_0x5cf5f9=>{const _0x2501c4=_0xb3d323;let _0x33053d=new Set();_0x5cf5f9[_0x2501c4(0x1e6)](_0x409cf8=>{const _0x315bb1=_0x2501c4;switch(_0x409cf8['type']){case _0x315bb1(0x1db):{let _0x3bffe3=_0x409cf8['payload'][_0x315bb1(0x21a)];_0x33053d['add'](_0x3bffe3);break;}default:break;}}),_0x229e68(this[_0x2501c4(0x239)],_0x33053d);}));}['_init'](){const _0x5c0b9c=_0x210f5c;this['disposeWithMe'](this[_0x5c0b9c(0x217)][_0x5c0b9c(0x230)][_0x5c0b9c(0x1fe)](async _0x3d28bf=>{const _0x3b139a=_0x5c0b9c;var _0x1154b9;let _0x146954=(_0x1154b9=this['_threadCommentModel'][_0x3b139a(0x1f7)](_0x3d28bf['unitId'])[_0x3b139a(0x1f6)](_0x3f3da3=>_0x3f3da3[_0x3b139a(0x1de)]===_0x3d28bf['threadId']))==null?void 0x0:_0x1154b9[_0x3b139a(0x1eb)];if(!_0x146954)return;let {unitId:_0x208aae,subUnitId:_0x45eab6}=_0x146954;switch(_0x3d28bf[_0x3b139a(0x20e)]&&this[_0x3b139a(0x256)][_0x3b139a(0x1df)](_0x3d28bf[_0x3b139a(0x20e)]),_0x3d28bf[_0x3b139a(0x1f3)]){case _0x47b348[_0x3b139a(0x209)][_0x3b139a(0x201)]:break;case _0x47b348[_0x3b139a(0x209)][_0x3b139a(0x265)]:var _0x45314f,_0x5435ea;this[_0x3b139a(0x1e1)][_0x3b139a(0x245)](_0x208aae,_0x45eab6,{'unitId':_0x208aae,'subUnitId':_0x45eab6,'ref':'','id':_0x3d28bf[_0x3b139a(0x1f9)],'dT':_0x1873da(+_0x3d28bf[_0x3b139a(0x25d)]),'threadId':_0x3d28bf['threadId'],'personId':(_0x45314f=(_0x5435ea=_0x3d28bf[_0x3b139a(0x20e)])==null?void 0x0:_0x5435ea[_0x3b139a(0x1e8)])==null?_0x3d28bf[_0x3b139a(0x261)]:_0x45314f,'text':JSON[_0x3b139a(0x244)](_0x3d28bf[_0x3b139a(0x24a)]),'parentId':_0x146954['id']});break;case _0x47b348['CommentUpdateEventType']['Delete']:{let _0x326727=this[_0x3b139a(0x1e1)][_0x3b139a(0x24e)](_0x208aae,_0x45eab6,_0x3d28bf[_0x3b139a(0x1f9)]);_0x326727&&_0x326727[_0x3b139a(0x23b)]&&this[_0x3b139a(0x1e1)]['deleteComment'](_0x208aae,_0x45eab6,_0x3d28bf[_0x3b139a(0x1f9)]);break;}case _0x47b348['CommentUpdateEventType'][_0x3b139a(0x20c)]:this[_0x3b139a(0x1e1)]['updateComment'](_0x208aae,_0x45eab6,{'commentId':_0x3d28bf[_0x3b139a(0x1f9)],'text':JSON['parse'](_0x3d28bf['content'])});break;case _0x47b348[_0x3b139a(0x209)][_0x3b139a(0x24d)]:{var _0xc3b466;let _0x4e2bc5=(_0xc3b466=this[_0x3b139a(0x1e1)][_0x3b139a(0x1f7)](_0x3d28bf['unitId'])[_0x3b139a(0x1f6)](_0x228249=>_0x228249[_0x3b139a(0x1de)]===_0x3d28bf[_0x3b139a(0x1de)]))==null?void 0x0:_0xc3b466[_0x3b139a(0x1eb)];_0x4e2bc5&&this[_0x3b139a(0x1e1)]['resolveComment'](_0x208aae,_0x45eab6,_0x4e2bc5['id'],_0x3d28bf['solved']===_0x47b348[_0x3b139a(0x22d)][_0x3b139a(0x21e)]);break;}default:break;}}));}};_0x4399f3=_0x3ad348([_0x4da42c(0x0,(0x0,_0x579a25['Inject'])(_0x2e378a[_0x210f5c(0x1ff)])),_0x4da42c(0x1,(0x0,_0x579a25[_0x210f5c(0x1da)])(_0x132505[_0x210f5c(0x226)])),_0x4da42c(0x2,(0x0,_0x579a25['Inject'])(_0x579a25[_0x210f5c(0x252)])),_0x4da42c(0x3,(0x0,_0x579a25[_0x210f5c(0x1da)])(_0x579a25[_0x210f5c(0x20a)]))],_0x4399f3);function _0x29ac7c(_0x536ce5,_0x161900){const _0x5af66e=_0x210f5c;let _0x35de5e=_0x536ce5[_0x5af66e(0x22c)][0x0];return{..._0x161900,'id':_0x35de5e[_0x5af66e(0x1f9)],'resolved':_0x536ce5[_0x5af66e(0x248)]===0x1,'dT':_0x1873da(_0x35de5e['createTimestamp']),'personId':_0x35de5e[_0x5af66e(0x261)],'threadId':_0x35de5e[_0x5af66e(0x1de)]};}function _0x36d570(_0x4ef99e,_0x6b5628,_0x395499){const _0x26378a=_0x210f5c;var _0x1a4d3b,_0xd90058;if(((_0x1a4d3b=_0x4ef99e==null||(_0xd90058=_0x4ef99e[_0x26378a(0x22c)])==null?void 0x0:_0xd90058[_0x26378a(0x1ef)])==null?0x0:_0x1a4d3b)>0x0){let _0x539066=(_0x20b7d0,_0x29e4c1)=>({'id':_0x20b7d0[_0x26378a(0x1f9)],'threadId':_0x20b7d0['threadId'],'dT':_0x1873da(_0x20b7d0[_0x26378a(0x25d)]),'personId':_0x20b7d0['userId'],'resolved':_0x4ef99e[_0x26378a(0x248)]===_0x47b348['CommentSolvedStatus'][_0x26378a(0x21e)],'unitId':_0x6b5628,'subUnitId':_0x395499,'text':JSON[_0x26378a(0x244)](_0x20b7d0[_0x26378a(0x24a)]),'parentId':_0x29e4c1}),_0x4be0ef=_0x539066(_0x4ef99e[_0x26378a(0x22c)][0x0]);return{..._0x4be0ef,'children':_0x4ef99e[_0x26378a(0x22c)][_0x26378a(0x200)](0x1)[_0x26378a(0x233)](_0x6b70d3=>_0x539066(_0x6b70d3,_0x4be0ef['id']))};}return null;}let _0x5b8e88=class{constructor(_0x316900,_0x5a80b1,_0x2e1ce9){const _0x431e12=_0x210f5c;this[_0x431e12(0x267)]=_0x316900,this[_0x431e12(0x256)]=_0x5a80b1,this['_sessionService']=_0x2e1ce9;}async[_0x210f5c(0x245)](_0x11e4b3){const _0x2a79ac=_0x210f5c;var _0x5d9ba7,_0x1fd0d9;let {parentId:_0x1bbf75,unitId:_0x1b4ae0,text:_0x3f7e7e,threadId:_0x372445}=_0x11e4b3,_0xdd7f26=(_0x5d9ba7=(_0x1fd0d9=_0x3f7e7e['customRanges'])==null?void 0x0:_0x1fd0d9['filter'](_0x2e7508=>_0x2e7508['rangeType']===_0x579a25[_0x2a79ac(0x1d6)][_0x2a79ac(0x257)])['map'](_0x99bf8=>_0x99bf8[_0x2a79ac(0x1dd)]))==null?[]:_0x5d9ba7,_0x1b2a06=JSON['stringify'](_0x3f7e7e),_0x4ba81a=(await this['_sessionService']['requireSession'](_0x1b4ae0))[_0x2a79ac(0x232)]();if(_0x1bbf75){let _0x4c651b={'memberId':_0x4ba81a,'unitId':_0x1b4ae0,'content':_0x1b2a06,'mention':_0xdd7f26,'threadId':_0x372445},_0x590073=(await this['_httpService']['post'](_0x2a79ac(0x22a)+_0x1b4ae0+'/reply',{'body':_0x4c651b}))[_0x2a79ac(0x22f)]['reply'];return{..._0x11e4b3,'id':_0x590073['replyId'],'dT':(0x0,_0x579a25[_0x2a79ac(0x231)])(+_0x590073[_0x2a79ac(0x25d)])[_0x2a79ac(0x266)](_0x2a79ac(0x1fd)),'personId':_0x590073[_0x2a79ac(0x261)]};}else{let _0xd48997={'memberId':_0x4ba81a,'unitId':_0x1b4ae0,'content':_0x1b2a06,'mention':_0xdd7f26};return _0x29ac7c((await this[_0x2a79ac(0x267)]['post'](_0x2a79ac(0x22a)+_0x1b4ae0+_0x2a79ac(0x243),{'body':_0xd48997}))[_0x2a79ac(0x22f)][_0x2a79ac(0x259)],_0x11e4b3);}}async['updateComment'](_0x1159f8){const _0x51c141=_0x210f5c;var _0x535b74,_0x559fc2;let {text:_0x2659a8,unitId:_0x251a2f}=_0x1159f8,_0x4db74=(_0x535b74=(_0x559fc2=_0x2659a8[_0x51c141(0x24b)])==null?void 0x0:_0x559fc2[_0x51c141(0x247)](_0x23cc68=>_0x23cc68[_0x51c141(0x229)]===_0x579a25['CustomRangeType'][_0x51c141(0x257)])[_0x51c141(0x233)](_0x44c795=>_0x44c795[_0x51c141(0x1dd)]))==null?[]:_0x535b74,_0x2f6fce=JSON[_0x51c141(0x23d)](_0x2659a8),_0x18524d=_0x1159f8[_0x51c141(0x1de)],_0x3a4ee9=_0x1159f8['id'],_0x2b96cc={'memberId':(await this[_0x51c141(0x24c)][_0x51c141(0x25c)](_0x251a2f))[_0x51c141(0x232)](),'unitId':_0x251a2f,'threadId':_0x18524d,'mention':_0x4db74,'content':_0x2f6fce,'replyId':_0x3a4ee9},_0x4db110=await this[_0x51c141(0x267)][_0x51c141(0x213)]('/universer-api/comment/unit/'+_0x251a2f+_0x51c141(0x203),{'body':_0x2b96cc});return!_0x4db110[_0x51c141(0x22f)][_0x51c141(0x241)]||_0x4db110[_0x51c141(0x22f)]['error'][_0x51c141(0x221)]===0x1;}async['resolveComment'](_0x38279a){const _0x104a70=_0x210f5c;let {unitId:_0x438dba}=_0x38279a,_0x3d1891=_0x38279a[_0x104a70(0x1de)],_0x416a17={'memberId':this[_0x104a70(0x256)]['getCurrentUser']()['userID'],'unitId':_0x438dba,'threadId':_0x3d1891,'solved':_0x38279a[_0x104a70(0x22b)]?_0x47b348['CommentSolvedStatus'][_0x104a70(0x21e)]:_0x47b348[_0x104a70(0x22d)][_0x104a70(0x215)]},_0xdac54f=await this[_0x104a70(0x267)][_0x104a70(0x213)](_0x104a70(0x22a)+_0x438dba+_0x104a70(0x254),{'body':_0x416a17});return!_0xdac54f[_0x104a70(0x22f)][_0x104a70(0x241)]||_0xdac54f[_0x104a70(0x22f)][_0x104a70(0x241)]['code']===0x1;}async['deleteComment'](_0x46fa10,_0x34dcd4,_0x353a36,_0x113441){const _0x3bc121=_0x210f5c;let _0x1307cc={'memberId':(await this[_0x3bc121(0x24c)][_0x3bc121(0x25c)](_0x46fa10))[_0x3bc121(0x232)](),'threadId':_0x353a36,'replyId':_0x113441,'unitId':_0x46fa10},_0x34e833=await this[_0x3bc121(0x267)][_0x3bc121(0x213)](_0x3bc121(0x22a)+_0x46fa10+_0x3bc121(0x264),{'body':_0x1307cc});return!_0x34e833[_0x3bc121(0x22f)]['error']||_0x34e833['body'][_0x3bc121(0x241)][_0x3bc121(0x221)]===0x1;}async[_0x210f5c(0x234)](_0x4f35b6,_0x1fdfb5,_0x2fd0cd){const _0x44617a=_0x210f5c;let _0x248752={'unitId':_0x4f35b6,'threadId':_0x2fd0cd},_0x30fd98=await this[_0x44617a(0x267)][_0x44617a(0x213)](_0x44617a(0x22a)+_0x4f35b6+_0x44617a(0x1f0),{'body':_0x248752}),_0x30ea1f=_0x2fd0cd[_0x44617a(0x233)](_0x13c28a=>_0x36d570(_0x30fd98[_0x44617a(0x22f)][_0x44617a(0x1e0)][_0x13c28a],_0x4f35b6,_0x1fdfb5))['filter'](Boolean);return Object[_0x44617a(0x250)](_0x30fd98[_0x44617a(0x22f)][_0x44617a(0x1e3)])['forEach'](_0x47d1fa=>{const _0x318f66=_0x44617a;this['_userService'][_0x318f66(0x1df)](_0x47d1fa);}),_0x30ea1f;}['saveCommentToSnapshot'](_0x1490df){const _0x3f25ed=_0x210f5c;return{'id':_0x1490df['id'],'threadId':_0x1490df['threadId'],'ref':_0x1490df[_0x3f25ed(0x1e7)]};}};_0x5b8e88=_0x3ad348([_0x4da42c(0x0,(0x0,_0x579a25['Inject'])(_0x903e43['HTTPService'])),_0x4da42c(0x1,(0x0,_0x579a25[_0x210f5c(0x1da)])(_0x579a25[_0x210f5c(0x252)])),_0x4da42c(0x2,(0x0,_0x579a25['Inject'])(_0x2e378a['CollaborationSessionService']))],_0x5b8e88);let _0x37287b=class extends _0x579a25[_0x210f5c(0x262)]{constructor(_0x1a6e53,_0x483219){const _0x7b581c=_0x210f5c;super(),this[_0x7b581c(0x1ee)]=_0x1a6e53,this['_threadCommentDataSource']=_0x483219,this['_initDataSource']();}[_0x210f5c(0x240)](){const _0xce1205=_0x210f5c;this[_0xce1205(0x1ee)][_0xce1205(0x219)]=this[_0xce1205(0x237)],this[_0xce1205(0x1ee)][_0xce1205(0x1d9)]=!0x1;}};_0x37287b=_0x3ad348([_0x4da42c(0x0,_0x132505[_0x210f5c(0x208)]),_0x4da42c(0x1,(0x0,_0x579a25[_0x210f5c(0x1da)])(_0x5b8e88))],_0x37287b);function _0x5438f8(_0x3adb41){'@babel/helpers - typeof';return _0x5438f8=typeof Symbol=='function'&&typeof Symbol['iterator']=='symbol'?function(_0x3e4609){return typeof _0x3e4609;}:function(_0x267bcb){const _0x4680aa=_0x3621;return _0x267bcb&&typeof Symbol==_0x4680aa(0x223)&&_0x267bcb[_0x4680aa(0x207)]===Symbol&&_0x267bcb!==Symbol[_0x4680aa(0x1d7)]?_0x4680aa(0x1fc):typeof _0x267bcb;},_0x5438f8(_0x3adb41);}function _0x5e3403(_0x37acd5,_0x83da8d){const _0x584a9f=_0x210f5c;if(_0x5438f8(_0x37acd5)!=_0x584a9f(0x1f2)||!_0x37acd5)return _0x37acd5;var _0x4402a1=_0x37acd5[Symbol[_0x584a9f(0x220)]];if(_0x4402a1!==void 0x0){var _0x5bd3f9=_0x4402a1['call'](_0x37acd5,_0x83da8d||_0x584a9f(0x1f1));if(_0x5438f8(_0x5bd3f9)!=_0x584a9f(0x1f2))return _0x5bd3f9;throw TypeError(_0x584a9f(0x21c));}return(_0x83da8d===_0x584a9f(0x1ec)?String:Number)(_0x37acd5);}function _0x1ed14d(_0x217d8c){var _0xb378c7=_0x5e3403(_0x217d8c,'string');return _0x5438f8(_0xb378c7)=='symbol'?_0xb378c7:_0xb378c7+'';}function _0xc6ec92(_0x5dce89,_0x393249,_0x22f6f8){const _0x141871=_0x210f5c;return(_0x393249=_0x1ed14d(_0x393249))in _0x5dce89?Object[_0x141871(0x20b)](_0x5dce89,_0x393249,{'value':_0x22f6f8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5dce89[_0x393249]=_0x22f6f8,_0x5dce89;}let _0x8f8dc4=class extends _0x579a25[_0x210f5c(0x268)]{constructor(_0x3e338b=_0x538f41,_0xc41399,_0x1a6d3d){const _0x390b77=_0x210f5c;super(),this['_config']=_0x3e338b,this[_0x390b77(0x239)]=_0xc41399,this[_0x390b77(0x23c)]=_0x1a6d3d;let {..._0xcfc99}=(0x0,_0x579a25[_0x390b77(0x21d)])({},_0x538f41,this[_0x390b77(0x1f5)]);this[_0x390b77(0x23c)][_0x390b77(0x204)](_0x390b77(0x236),_0xcfc99);}[_0x210f5c(0x255)](){const _0x14841e=_0x210f5c;[[_0x5b8e88],[_0x37287b],[_0x4399f3]][_0x14841e(0x1e6)](_0x5c5797=>{const _0x10b340=_0x14841e;this['_injector'][_0x10b340(0x1db)](_0x5c5797);});}['onReady'](){const _0x1d5353=_0x210f5c;this[_0x1d5353(0x239)][_0x1d5353(0x260)](_0x37287b),this['_injector']['get'](_0x4399f3);}};_0xc6ec92(_0x8f8dc4,_0x210f5c(0x228),_0x210f5c(0x1e4)),_0xc6ec92(_0x8f8dc4,_0x210f5c(0x214),_0x20eeeb),_0xc6ec92(_0x8f8dc4,_0x210f5c(0x246),_0x24c283),_0x8f8dc4=_0x3ad348([(0x0,_0x579a25['DependentOn'])(_0x3a4fb4[_0x210f5c(0x23e)],_0x2e378a[_0x210f5c(0x218)],_0x35c489[_0x210f5c(0x1fa)]),_0x4da42c(0x1,(0x0,_0x579a25['Inject'])(_0x579a25[_0x210f5c(0x20a)])),_0x4da42c(0x2,_0x579a25[_0x210f5c(0x1e9)])],_0x8f8dc4),Object[_0x210f5c(0x20b)](_0x12a69f,_0x210f5c(0x1f8),{'enumerable':!0x0,'get':function(){return _0x8f8dc4;}});}));function _0x1bc0(){const _0x3fc571=['/add','parse','addComment','version','filter','solved','UniverProThreadCommentDatasource','content','customRanges','_sessionService','Solve','getComment','@univerjs/core','values','105276SQjnDl','UserManagerService','UniverThreadCommentUi','/solved','onStarting','_userService','COMMENT','21288DJLVot','comment','UniverProCollaborationClient','4170rJTitQ','requireSession','createTimestamp','UniverThreadComment','@univerjs/network','get','userId','Disposable','/universer-api/user/list','/delete','Reply','format','_httpService','Plugin','CustomRangeType','prototype','amd','syncUpdateMutationToColla','Inject','add','toStringTag','rangeId','threadId','addUser','comments','_threadCommentModel','bufferTime','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','10IsGvMb','forEach','ref','userID','IConfigService','disposeWithMe','root','string','UniverNetwork','_threadCommentDataSourceService','length','/list','default','object','type','getOwnPropertyDescriptor','_config','find','getUnit','UniverThreadCommentDataSourcePlugin','replyId','UniverLicensePlugin','182mMBOIT','symbol','YYYY/MM/DD\x20HH:mm','subscribe','CommentService','slice','Add','6iMSjMk','/edit','setConfig','UniverCore','@univerjs-pro/thread-comment-datasource','constructor','IThreadCommentDataSourceService','CommentUpdateEventType','Injector','defineProperty','Edit','822124rBZVoc','user','@univerjs/protocol','HTTPService','UniverProLicense','rxjs','post','packageName','OpenOrReOpen','size','_commentService','UniverCollaborationClientPlugin','dataSource','personId','exports','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','merge','Solved','1899SxBIYs','toPrimitive','code','@univerjs-pro/license','function','@univerjs/thread-comment-ui','98545tSvGSh','ThreadCommentModel','1445584pwljTd','pluginName','rangeType','/universer-api/comment/unit/','resolved','replies','CommentSolvedStatus','decorate','body','commentUpdate$','dateKit','getMemberID','map','listComments','getUser','thread-comment-data-source.config','_threadCommentDataSource','@univerjs-pro/collaboration-client','_injector','_init','parentId','_configService','stringify','UniverThreadCommentUIPlugin','_initUserSync','_initDataSource','error','delete'];_0x1bc0=function(){return _0x3fc571;};return _0x1bc0();}
1
+ function _0x65ac(_0x3c141e,_0x4d7bb1){_0x3c141e=_0x3c141e-0x6f;const _0x5f4e39=_0x5f4e();let _0x65ac9c=_0x5f4e39[_0x3c141e];return _0x65ac9c;}(function(_0x4026e4,_0x454ade){const _0x7e04aa=_0x65ac,_0x4014d=_0x4026e4();while(!![]){try{const _0x40c60d=parseInt(_0x7e04aa(0x73))/0x1+-parseInt(_0x7e04aa(0xd1))/0x2+-parseInt(_0x7e04aa(0xe9))/0x3*(parseInt(_0x7e04aa(0x80))/0x4)+parseInt(_0x7e04aa(0x6f))/0x5+parseInt(_0x7e04aa(0x76))/0x6*(parseInt(_0x7e04aa(0xf0))/0x7)+parseInt(_0x7e04aa(0xab))/0x8*(-parseInt(_0x7e04aa(0xfc))/0x9)+parseInt(_0x7e04aa(0xd2))/0xa;if(_0x40c60d===_0x454ade)break;else _0x4014d['push'](_0x4014d['shift']());}catch(_0x2e7ab5){_0x4014d['push'](_0x4014d['shift']());}}}(_0x5f4e,0xbb88b),function(_0x295628,_0x50196a){const _0x3804ad=_0x65ac;typeof exports=='object'&&typeof module<'u'?_0x50196a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3804ad(0x93)&&define[_0x3804ad(0x100)]?define([_0x3804ad(0xda),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x3804ad(0xe3),_0x3804ad(0x7d),_0x3804ad(0xa2),_0x3804ad(0xa9),'@univerjs/network'],_0x50196a):(_0x295628=typeof globalThis<'u'?globalThis:_0x295628||self,_0x50196a(_0x295628['UniverProThreadCommentDatasource']={},_0x295628[_0x3804ad(0xad)],_0x295628[_0x3804ad(0x81)],_0x295628[_0x3804ad(0xa6)],_0x295628[_0x3804ad(0x7a)],_0x295628[_0x3804ad(0xb3)],_0x295628[_0x3804ad(0x77)],_0x295628['rxjs'],_0x295628[_0x3804ad(0x74)]));}(this,function(_0x143b71,_0xf96abe,_0x42d079,_0x2b856c,_0x4d7e1b,_0x2e4b1f,_0x5d9275,_0x5920d2,_0x38c71b){const _0x38c3a7=_0x65ac;Object[_0x38c3a7(0xcd)](_0x143b71,Symbol[_0x38c3a7(0x8e)],{'value':_0x38c3a7(0xb1)});var _0xc801fb='@univerjs-pro/thread-comment-datasource',_0x29128d=_0x38c3a7(0x97);let _0x4cfe8e={},_0x62c87a=_0x1dd400=>(0x0,_0x2b856c[_0x38c3a7(0xa4)])(new Date(+_0x1dd400))[_0x38c3a7(0xa8)]('YYYY/MM/DD\x20HH:mm'),_0x44a76c=async(_0x3cf1a0,_0x5ea073)=>{const _0x4040a3=_0x38c3a7;let _0x1d987c=_0x3cf1a0[_0x4040a3(0xb8)](_0x2b856c[_0x4040a3(0xbc)]),_0xfdf7a3=_0x3cf1a0[_0x4040a3(0xb8)](_0x38c71b[_0x4040a3(0x87)]);_0x5ea073[_0x4040a3(0xc7)](_0x4f8a9f=>{const _0x45d801=_0x4040a3;_0x1d987c[_0x45d801(0x95)](_0x4f8a9f)&&_0x5ea073['delete'](_0x4f8a9f);}),_0x5ea073[_0x4040a3(0xf5)]&&(await _0xfdf7a3[_0x4040a3(0xb8)](_0x4040a3(0x75),{'params':{'userIDs':[..._0x5ea073]}}))[_0x4040a3(0xe6)][_0x4040a3(0xb4)]['forEach'](_0x353470=>{_0x353470&&_0x1d987c['addUser'](_0x353470);});};function _0x5819df(_0x143995,_0x553f0c){return function(_0x270eae,_0x1d697d){_0x553f0c(_0x270eae,_0x1d697d,_0x143995);};}function _0x5877b2(_0x307ba1,_0x45a0e2,_0x38f86e,_0xbae317){const _0x9a96ee=_0x38c3a7;var _0x3fd9c3=arguments[_0x9a96ee(0x79)],_0x5ac4dd=_0x3fd9c3<0x3?_0x45a0e2:_0xbae317===null?_0xbae317=Object[_0x9a96ee(0xae)](_0x45a0e2,_0x38f86e):_0xbae317,_0x44589b;if(typeof Reflect==_0x9a96ee(0xcb)&&typeof Reflect['decorate']==_0x9a96ee(0x93))_0x5ac4dd=Reflect['decorate'](_0x307ba1,_0x45a0e2,_0x38f86e,_0xbae317);else{for(var _0x1752d1=_0x307ba1[_0x9a96ee(0x79)]-0x1;_0x1752d1>=0x0;_0x1752d1--)(_0x44589b=_0x307ba1[_0x1752d1])&&(_0x5ac4dd=(_0x3fd9c3<0x3?_0x44589b(_0x5ac4dd):_0x3fd9c3>0x3?_0x44589b(_0x45a0e2,_0x38f86e,_0x5ac4dd):_0x44589b(_0x45a0e2,_0x38f86e))||_0x5ac4dd);}return _0x3fd9c3>0x3&&_0x5ac4dd&&Object['defineProperty'](_0x45a0e2,_0x38f86e,_0x5ac4dd),_0x5ac4dd;}let _0x40c711=class extends _0x2b856c[_0x38c3a7(0x8a)]{constructor(_0x25afee,_0xaf14f2,_0x4bb21c,_0xbd68b2){const _0x3dea1e=_0x38c3a7;super(),this[_0x3dea1e(0xeb)]=_0x25afee,this[_0x3dea1e(0x72)]=_0xaf14f2,this['_userService']=_0x4bb21c,this[_0x3dea1e(0x98)]=_0xbd68b2,this[_0x3dea1e(0x9d)](),this[_0x3dea1e(0xdf)]();}[_0x38c3a7(0xdf)](){const _0xd4d143=_0x38c3a7;this[_0xd4d143(0xb6)](this[_0xd4d143(0x72)][_0xd4d143(0xa1)][_0xd4d143(0xb5)]((0x0,_0x5920d2[_0xd4d143(0xd8)])(0x10))[_0xd4d143(0x8f)](_0x38a1cc=>{const _0x1f27f4=_0xd4d143;let _0x5d0cfb=new Set();_0x38a1cc[_0x1f27f4(0xc7)](_0x474ffd=>{const _0x4d39aa=_0x1f27f4;switch(_0x474ffd[_0x4d39aa(0xce)]){case _0x4d39aa(0x71):{let _0x2f6bf5=_0x474ffd[_0x4d39aa(0x88)][_0x4d39aa(0x96)];_0x5d0cfb['add'](_0x2f6bf5);break;}default:break;}}),_0x44a76c(this[_0x1f27f4(0x98)],_0x5d0cfb);}));}[_0x38c3a7(0x9d)](){const _0x496854=_0x38c3a7;this[_0x496854(0xb6)](this['_commentService'][_0x496854(0xa1)][_0x496854(0x8f)](async _0x1c4edd=>{const _0x2d1a4a=_0x496854;var _0x2d68b1;let _0x2ca8e9=(_0x2d68b1=this['_threadCommentModel'][_0x2d1a4a(0xe0)](_0x1c4edd[_0x2d1a4a(0xbf)])['find'](_0x2d7412=>_0x2d7412[_0x2d1a4a(0xc4)]===_0x1c4edd[_0x2d1a4a(0xc4)]))==null?void 0x0:_0x2d68b1['root'];if(!_0x2ca8e9)return;let {unitId:_0x472d90,subUnitId:_0x202611}=_0x2ca8e9;switch(_0x1c4edd[_0x2d1a4a(0x9a)]&&this['_userService']['addUser'](_0x1c4edd[_0x2d1a4a(0x9a)]),_0x1c4edd[_0x2d1a4a(0xce)]){case _0x2e4b1f[_0x2d1a4a(0xc3)][_0x2d1a4a(0xee)]:break;case _0x2e4b1f[_0x2d1a4a(0xc3)][_0x2d1a4a(0xb0)]:var _0x23b7ce,_0x25801b;this['_threadCommentModel']['addComment'](_0x472d90,_0x202611,{'unitId':_0x472d90,'subUnitId':_0x202611,'ref':'','id':_0x1c4edd[_0x2d1a4a(0xd5)],'dT':_0x62c87a(+_0x1c4edd['createTimestamp']),'threadId':_0x1c4edd[_0x2d1a4a(0xc4)],'personId':(_0x23b7ce=(_0x25801b=_0x1c4edd[_0x2d1a4a(0x9a)])==null?void 0x0:_0x25801b[_0x2d1a4a(0x7b)])==null?_0x1c4edd[_0x2d1a4a(0x84)]:_0x23b7ce,'text':JSON[_0x2d1a4a(0x94)](_0x1c4edd[_0x2d1a4a(0xfe)]),'parentId':_0x2ca8e9['id']});break;case _0x2e4b1f[_0x2d1a4a(0xc3)][_0x2d1a4a(0x8b)]:{let _0xee80=this[_0x2d1a4a(0x72)][_0x2d1a4a(0x85)](_0x472d90,_0x202611,_0x1c4edd[_0x2d1a4a(0xd5)]);_0xee80&&_0xee80[_0x2d1a4a(0x8c)]&&this[_0x2d1a4a(0x72)][_0x2d1a4a(0xba)](_0x472d90,_0x202611,_0x1c4edd['replyId']);break;}case _0x2e4b1f[_0x2d1a4a(0xc3)][_0x2d1a4a(0xaf)]:this[_0x2d1a4a(0x72)]['updateComment'](_0x472d90,_0x202611,{'commentId':_0x1c4edd['replyId'],'text':JSON[_0x2d1a4a(0x94)](_0x1c4edd[_0x2d1a4a(0xfe)])});break;case _0x2e4b1f[_0x2d1a4a(0xc3)][_0x2d1a4a(0xc6)]:{var _0x11e448;let _0x5f36cd=(_0x11e448=this['_threadCommentModel'][_0x2d1a4a(0xe0)](_0x1c4edd['unitId'])[_0x2d1a4a(0x89)](_0x286569=>_0x286569[_0x2d1a4a(0xc4)]===_0x1c4edd[_0x2d1a4a(0xc4)]))==null?void 0x0:_0x11e448[_0x2d1a4a(0xcf)];_0x5f36cd&&this['_threadCommentModel']['resolveComment'](_0x472d90,_0x202611,_0x5f36cd['id'],_0x1c4edd['solved']===_0x2e4b1f[_0x2d1a4a(0x82)][_0x2d1a4a(0xf2)]);break;}default:break;}}));}};_0x40c711=_0x5877b2([_0x5819df(0x0,(0x0,_0x2b856c['Inject'])(_0xf96abe[_0x38c3a7(0x78)])),_0x5819df(0x1,(0x0,_0x2b856c['Inject'])(_0x5d9275[_0x38c3a7(0x90)])),_0x5819df(0x2,(0x0,_0x2b856c['Inject'])(_0x2b856c[_0x38c3a7(0xbc)])),_0x5819df(0x3,(0x0,_0x2b856c[_0x38c3a7(0xf3)])(_0x2b856c[_0x38c3a7(0xd3)]))],_0x40c711);function _0x5405f7(_0x340097,_0x21bf3d){const _0x537988=_0x38c3a7;let _0x35a7ad=_0x340097['replies'][0x0];return{..._0x21bf3d,'id':_0x35a7ad['replyId'],'resolved':_0x340097[_0x537988(0x99)]===0x1,'dT':_0x62c87a(_0x35a7ad[_0x537988(0x9e)]),'personId':_0x35a7ad[_0x537988(0x84)],'threadId':_0x35a7ad[_0x537988(0xc4)]};}function _0x273897(_0x2106cd,_0x24a54d,_0x33537f){const _0x344a08=_0x38c3a7;var _0x405649,_0x187681;if(((_0x405649=_0x2106cd==null||(_0x187681=_0x2106cd['replies'])==null?void 0x0:_0x187681[_0x344a08(0x79)])==null?0x0:_0x405649)>0x0){let _0x39d2a9=(_0x182ee3,_0x2b270)=>({'id':_0x182ee3[_0x344a08(0xd5)],'threadId':_0x182ee3['threadId'],'dT':_0x62c87a(_0x182ee3[_0x344a08(0x9e)]),'personId':_0x182ee3['userId'],'resolved':_0x2106cd[_0x344a08(0x99)]===_0x2e4b1f[_0x344a08(0x82)][_0x344a08(0xf2)],'unitId':_0x24a54d,'subUnitId':_0x33537f,'text':JSON['parse'](_0x182ee3[_0x344a08(0xfe)]),'parentId':_0x2b270}),_0x19459c=_0x39d2a9(_0x2106cd[_0x344a08(0xc1)][0x0]);return{..._0x19459c,'children':_0x2106cd[_0x344a08(0xc1)][_0x344a08(0xe8)](0x1)[_0x344a08(0x9f)](_0x214014=>_0x39d2a9(_0x214014,_0x19459c['id']))};}return null;}let _0x148e07=class{constructor(_0x524cda,_0x4cdc56,_0xbc8755){const _0x24d45b=_0x38c3a7;this['_httpService']=_0x524cda,this[_0x24d45b(0xa0)]=_0x4cdc56,this[_0x24d45b(0x7f)]=_0xbc8755;}async[_0x38c3a7(0xfb)](_0x2da2e1){const _0x364915=_0x38c3a7;var _0x3d5b5d,_0x5eca92;let {parentId:_0x2b671a,unitId:_0xee8a3f,text:_0x9e526e,threadId:_0x1c2796}=_0x2da2e1,_0x4234bb=(_0x3d5b5d=(_0x5eca92=_0x9e526e[_0x364915(0xfa)])==null?void 0x0:_0x5eca92[_0x364915(0x9c)](_0x1339c2=>_0x1339c2[_0x364915(0x70)]===_0x2b856c[_0x364915(0xcc)][_0x364915(0x7c)])[_0x364915(0x9f)](_0x2bb981=>_0x2bb981[_0x364915(0xb7)]))==null?[]:_0x3d5b5d,_0x4624d7=JSON[_0x364915(0xea)](_0x9e526e),_0x394f44=(await this['_sessionService'][_0x364915(0x91)](_0xee8a3f))[_0x364915(0xc0)]();if(_0x2b671a){let _0x417360={'memberId':_0x394f44,'unitId':_0xee8a3f,'content':_0x4624d7,'mention':_0x4234bb,'threadId':_0x1c2796},_0x503a13=(await this['_httpService'][_0x364915(0x8d)]('/universer-api/comment/unit/'+_0xee8a3f+_0x364915(0xc5),{'body':_0x417360}))['body'][_0x364915(0xf1)];return{..._0x2da2e1,'id':_0x503a13[_0x364915(0xd5)],'dT':(0x0,_0x2b856c['dateKit'])(+_0x503a13[_0x364915(0x9e)])[_0x364915(0xa8)](_0x364915(0xd7)),'personId':_0x503a13['userId']};}else{let _0x2104f6={'memberId':_0x394f44,'unitId':_0xee8a3f,'content':_0x4624d7,'mention':_0x4234bb};return _0x5405f7((await this['_httpService'][_0x364915(0x8d)](_0x364915(0xb2)+_0xee8a3f+_0x364915(0xf7),{'body':_0x2104f6}))[_0x364915(0xe6)][_0x364915(0xbe)],_0x2da2e1);}}async[_0x38c3a7(0xd0)](_0x4293ff){const _0x50b267=_0x38c3a7;var _0x1ff55a,_0x2859c8;let {text:_0x3668e7,unitId:_0x38515d}=_0x4293ff,_0x4078db=(_0x1ff55a=(_0x2859c8=_0x3668e7[_0x50b267(0xfa)])==null?void 0x0:_0x2859c8['filter'](_0x53dde8=>_0x53dde8[_0x50b267(0x70)]===_0x2b856c[_0x50b267(0xcc)][_0x50b267(0x7c)])['map'](_0x2a6a65=>_0x2a6a65[_0x50b267(0xb7)]))==null?[]:_0x1ff55a,_0x3a2321=JSON[_0x50b267(0xea)](_0x3668e7),_0xd02c51=_0x4293ff['threadId'],_0x802655=_0x4293ff['id'],_0x1716de={'memberId':(await this['_sessionService']['requireSession'](_0x38515d))[_0x50b267(0xc0)](),'unitId':_0x38515d,'threadId':_0xd02c51,'mention':_0x4078db,'content':_0x3a2321,'replyId':_0x802655},_0x287bf0=await this[_0x50b267(0xfd)][_0x50b267(0x8d)](_0x50b267(0xb2)+_0x38515d+_0x50b267(0xe7),{'body':_0x1716de});return!_0x287bf0[_0x50b267(0xe6)][_0x50b267(0xa7)]||_0x287bf0[_0x50b267(0xe6)][_0x50b267(0xa7)][_0x50b267(0xdd)]===0x1;}async['resolveComment'](_0x130b24){const _0x4b1565=_0x38c3a7;let {unitId:_0x763422}=_0x130b24,_0x89fa10=_0x130b24[_0x4b1565(0xc4)],_0x4e55bf={'memberId':this['_userService'][_0x4b1565(0xd9)]()[_0x4b1565(0x7b)],'unitId':_0x763422,'threadId':_0x89fa10,'solved':_0x130b24[_0x4b1565(0xaa)]?_0x2e4b1f[_0x4b1565(0x82)][_0x4b1565(0xf2)]:_0x2e4b1f[_0x4b1565(0x82)][_0x4b1565(0xf9)]},_0x2dc35a=await this[_0x4b1565(0xfd)][_0x4b1565(0x8d)](_0x4b1565(0xb2)+_0x763422+_0x4b1565(0xa3),{'body':_0x4e55bf});return!_0x2dc35a[_0x4b1565(0xe6)][_0x4b1565(0xa7)]||_0x2dc35a[_0x4b1565(0xe6)]['error'][_0x4b1565(0xdd)]===0x1;}async[_0x38c3a7(0xba)](_0x4fac89,_0x1e18b2,_0x4b9256,_0x2fb0cd){const _0x2a6bc7=_0x38c3a7;let _0x164853={'memberId':(await this['_sessionService'][_0x2a6bc7(0x91)](_0x4fac89))[_0x2a6bc7(0xc0)](),'threadId':_0x4b9256,'replyId':_0x2fb0cd,'unitId':_0x4fac89},_0x23dbd5=await this[_0x2a6bc7(0xfd)][_0x2a6bc7(0x8d)](_0x2a6bc7(0xb2)+_0x4fac89+'/delete',{'body':_0x164853});return!_0x23dbd5[_0x2a6bc7(0xe6)]['error']||_0x23dbd5[_0x2a6bc7(0xe6)][_0x2a6bc7(0xa7)]['code']===0x1;}async['listComments'](_0x2c14fd,_0x523474,_0x3b06e2){const _0x5b5b8f=_0x38c3a7;let _0x344df0={'unitId':_0x2c14fd,'threadId':_0x3b06e2},_0x1a9257=await this['_httpService'][_0x5b5b8f(0x8d)]('/universer-api/comment/unit/'+_0x2c14fd+'/list',{'body':_0x344df0}),_0x5d39d2=_0x3b06e2[_0x5b5b8f(0x9f)](_0x30c564=>_0x273897(_0x1a9257[_0x5b5b8f(0xe6)][_0x5b5b8f(0xe2)][_0x30c564],_0x2c14fd,_0x523474))[_0x5b5b8f(0x9c)](Boolean);return Object['values'](_0x1a9257[_0x5b5b8f(0xe6)][_0x5b5b8f(0xb4)])[_0x5b5b8f(0xc7)](_0x32398e=>{const _0x2df299=_0x5b5b8f;this[_0x2df299(0xa0)]['addUser'](_0x32398e);}),_0x5d39d2;}[_0x38c3a7(0xc2)](_0x1d6cc5){const _0x2a8e52=_0x38c3a7;return{'id':_0x1d6cc5['id'],'threadId':_0x1d6cc5['threadId'],'ref':_0x1d6cc5[_0x2a8e52(0xec)]};}};_0x148e07=_0x5877b2([_0x5819df(0x0,(0x0,_0x2b856c[_0x38c3a7(0xf3)])(_0x38c71b[_0x38c3a7(0x87)])),_0x5819df(0x1,(0x0,_0x2b856c[_0x38c3a7(0xf3)])(_0x2b856c[_0x38c3a7(0xbc)])),_0x5819df(0x2,(0x0,_0x2b856c[_0x38c3a7(0xf3)])(_0xf96abe['CollaborationSessionService']))],_0x148e07);let _0xb1ec9e=class extends _0x2b856c['Disposable']{constructor(_0xfdd336,_0x3f00ab){const _0x3c7c4a=_0x38c3a7;super(),this['_threadCommentDataSourceService']=_0xfdd336,this[_0x3c7c4a(0xf4)]=_0x3f00ab,this[_0x3c7c4a(0xef)]();}[_0x38c3a7(0xef)](){const _0x34c75a=_0x38c3a7;this[_0x34c75a(0xed)][_0x34c75a(0x7e)]=this[_0x34c75a(0xf4)],this[_0x34c75a(0xed)]['syncUpdateMutationToColla']=!0x1;}};_0xb1ec9e=_0x5877b2([_0x5819df(0x0,_0x5d9275[_0x38c3a7(0xbb)]),_0x5819df(0x1,(0x0,_0x2b856c['Inject'])(_0x148e07))],_0xb1ec9e);function _0x4692b0(_0x3b88d6){'@babel/helpers - typeof';const _0x4c099a=_0x38c3a7;return _0x4692b0=typeof Symbol==_0x4c099a(0x93)&&typeof Symbol[_0x4c099a(0xdb)]==_0x4c099a(0x86)?function(_0x4c7fda){return typeof _0x4c7fda;}:function(_0x30aae6){const _0x5c1741=_0x4c099a;return _0x30aae6&&typeof Symbol=='function'&&_0x30aae6[_0x5c1741(0xe1)]===Symbol&&_0x30aae6!==Symbol[_0x5c1741(0x9b)]?_0x5c1741(0x86):typeof _0x30aae6;},_0x4692b0(_0x3b88d6);}function _0x8dcd8e(_0x343982,_0x5d3159){const _0x321dab=_0x38c3a7;if(_0x4692b0(_0x343982)!=_0x321dab(0xcb)||!_0x343982)return _0x343982;var _0x406e94=_0x343982[Symbol['toPrimitive']];if(_0x406e94!==void 0x0){var _0x23d3ac=_0x406e94['call'](_0x343982,_0x5d3159||_0x321dab(0xe5));if(_0x4692b0(_0x23d3ac)!=_0x321dab(0xcb))return _0x23d3ac;throw TypeError(_0x321dab(0xf8));}return(_0x5d3159===_0x321dab(0xca)?String:Number)(_0x343982);}function _0xb0cbc8(_0x781f38){const _0x344b41=_0x38c3a7;var _0x521ccc=_0x8dcd8e(_0x781f38,'string');return _0x4692b0(_0x521ccc)==_0x344b41(0x86)?_0x521ccc:_0x521ccc+'';}function _0x2cc502(_0x59ad86,_0xc0c793,_0x3e584a){const _0x117d4d=_0x38c3a7;return(_0xc0c793=_0xb0cbc8(_0xc0c793))in _0x59ad86?Object[_0x117d4d(0xcd)](_0x59ad86,_0xc0c793,{'value':_0x3e584a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x59ad86[_0xc0c793]=_0x3e584a,_0x59ad86;}let _0x5b5956=class extends _0x2b856c[_0x38c3a7(0xd4)]{constructor(_0x1d729b=_0x4cfe8e,_0x43bd5e,_0x4bb9e2){const _0x580699=_0x38c3a7;super(),this['_config']=_0x1d729b,this['_injector']=_0x43bd5e,this[_0x580699(0xff)]=_0x4bb9e2;let {..._0x421509}=(0x0,_0x2b856c[_0x580699(0xde)])({},_0x4cfe8e,this[_0x580699(0xc9)]);this[_0x580699(0xff)][_0x580699(0x83)](_0x580699(0x92),_0x421509);}[_0x38c3a7(0xf6)](){const _0x1a91a8=_0x38c3a7;[[_0x148e07],[_0xb1ec9e],[_0x40c711]][_0x1a91a8(0xc7)](_0x45aca7=>{const _0x26f4cd=_0x1a91a8;this[_0x26f4cd(0x98)][_0x26f4cd(0x71)](_0x45aca7);});}['onReady'](){const _0x5c84c1=_0x38c3a7;this[_0x5c84c1(0x98)][_0x5c84c1(0xb8)](_0xb1ec9e),this[_0x5c84c1(0x98)]['get'](_0x40c711);}};_0x2cc502(_0x5b5956,_0x38c3a7(0xb9),_0x38c3a7(0xbd)),_0x2cc502(_0x5b5956,'packageName',_0xc801fb),_0x2cc502(_0x5b5956,_0x38c3a7(0xd6),_0x29128d),_0x5b5956=_0x5877b2([(0x0,_0x2b856c['DependentOn'])(_0x4d7e1b[_0x38c3a7(0xac)],_0xf96abe[_0x38c3a7(0xe4)],_0x42d079[_0x38c3a7(0xdc)]),_0x5819df(0x1,(0x0,_0x2b856c[_0x38c3a7(0xf3)])(_0x2b856c[_0x38c3a7(0xd3)])),_0x5819df(0x2,_0x2b856c[_0x38c3a7(0xa5)])],_0x5b5956),Object[_0x38c3a7(0xcd)](_0x143b71,_0x38c3a7(0xc8),{'enumerable':!0x0,'get':function(){return _0x5b5956;}});}));function _0x5f4e(){const _0x13fe03=['subscribe','ThreadCommentModel','requireSession','thread-comment-data-source.config','function','parse','getUser','personId','1.0.0-alpha.5','_injector','solved','user','prototype','filter','_init','createTimestamp','map','_userService','commentUpdate$','@univerjs/thread-comment','/solved','dateKit','IConfigService','UniverCore','error','format','rxjs','resolved','8bFUrrm','UniverThreadCommentUIPlugin','UniverProCollaborationClient','getOwnPropertyDescriptor','Edit','Reply','Module','/universer-api/comment/unit/','UniverProtocol','users','pipe','disposeWithMe','rangeId','get','pluginName','deleteComment','IThreadCommentDataSourceService','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','unitId','getMemberID','replies','saveCommentToSnapshot','CommentUpdateEventType','threadId','/reply','Solve','forEach','UniverThreadCommentDataSourcePlugin','_config','string','object','CustomRangeType','defineProperty','type','root','updateComment','2598738zqpjJu','13334940UHvzsf','Injector','Plugin','replyId','version','YYYY/MM/DD\x20HH:mm','bufferTime','getCurrentUser','exports','iterator','UniverLicensePlugin','code','merge','_initUserSync','getUnit','constructor','comments','@univerjs/thread-comment-ui','UniverCollaborationClientPlugin','default','body','/edit','slice','57xnTuSo','stringify','_commentService','ref','_threadCommentDataSourceService','Add','_initDataSource','112XJaqPU','reply','Solved','Inject','_threadCommentDataSource','size','onStarting','/add','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','OpenOrReOpen','customRanges','addComment','12652407RgByQu','_httpService','content','_configService','amd','835465ksXLSs','rangeType','add','_threadCommentModel','1133995PoQKHC','UniverNetwork','/universer-api/user/list','396732tBPXeX','UniverThreadComment','CommentService','length','UniverThreadCommentUi','userID','COMMENT','@univerjs/protocol','dataSource','_sessionService','46148JvKHVJ','UniverProLicense','CommentSolvedStatus','setConfig','userId','getComment','symbol','HTTPService','payload','find','Disposable','Delete','parentId','post','toStringTag'];_0x5f4e=function(){return _0x13fe03;};return _0x5f4e();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "private": false,
5
5
  "description": "Remote data source integration for Univer thread comments.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -51,19 +51,19 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@univerjs-pro/collaboration-client": "1.0.0-alpha.3",
55
- "@univerjs/core": "1.0.0-alpha.3",
56
- "@univerjs/protocol": "1.0.0-alpha.3",
57
- "@univerjs/thread-comment-ui": "1.0.0-alpha.3",
58
- "@univerjs/thread-comment": "1.0.0-alpha.3",
59
- "@univerjs/network": "1.0.0-alpha.3",
60
- "@univerjs-pro/license": "1.0.0-alpha.3"
54
+ "@univerjs/core": "1.0.0-alpha.5",
55
+ "@univerjs-pro/collaboration-client": "1.0.0-alpha.5",
56
+ "@univerjs/protocol": "1.0.0-alpha.5",
57
+ "@univerjs/thread-comment": "1.0.0-alpha.5",
58
+ "@univerjs/thread-comment-ui": "1.0.0-alpha.5",
59
+ "@univerjs-pro/license": "1.0.0-alpha.5",
60
+ "@univerjs/network": "1.0.0-alpha.5"
61
61
  },
62
62
  "devDependencies": {
63
63
  "rxjs": "7.8.2",
64
64
  "typescript": "^6.0.3",
65
65
  "vitest": "^4.1.10",
66
- "@univerjs-infra/shared": "1.0.0-alpha.3"
66
+ "@univerjs-infra/shared": "1.0.0-alpha.5"
67
67
  },
68
68
  "scripts": {
69
69
  "test": "vitest run",