@univerjs-pro/thread-comment-datasource 1.0.0-alpha.3 → 1.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
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 _0x29df79=_0x1d04;(function(_0x289fe5,_0x4d87b5){const _0x1231f4=_0x1d04,_0x4dc93b=_0x289fe5();while(!![]){try{const _0x198fef=-parseInt(_0x1231f4(0x150))/0x1+-parseInt(_0x1231f4(0x10a))/0x2+-parseInt(_0x1231f4(0x10c))/0x3*(-parseInt(_0x1231f4(0x154))/0x4)+parseInt(_0x1231f4(0x135))/0x5+parseInt(_0x1231f4(0xf8))/0x6+parseInt(_0x1231f4(0x13b))/0x7*(-parseInt(_0x1231f4(0x131))/0x8)+parseInt(_0x1231f4(0x14b))/0x9*(-parseInt(_0x1231f4(0x103))/0xa);if(_0x198fef===_0x4d87b5)break;else _0x4dc93b['push'](_0x4dc93b['shift']());}catch(_0x24befc){_0x4dc93b['push'](_0x4dc93b['shift']());}}}(_0x13e6,0x4a9c6),Object[_0x29df79(0x138)](exports,Symbol[_0x29df79(0x157)],{'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');var c=_0x29df79(0x146),l=_0x29df79(0x120);const u={},d=_0x12ace6=>(0x0,n[_0x29df79(0x141)])(new Date(+_0x12ace6))['format'](_0x29df79(0xdb)),f=async(_0x61e075,_0x10563e)=>{const _0x48b8d3=_0x29df79;let _0x48dba1=_0x61e075[_0x48b8d3(0x104)](n['UserManagerService']),_0x15e6a1=_0x61e075[_0x48b8d3(0x104)](s[_0x48b8d3(0x117)]);_0x10563e[_0x48b8d3(0x12d)](_0x5bffc7=>{const _0xa447c6=_0x48b8d3;_0x48dba1[_0xa447c6(0x130)](_0x5bffc7)&&_0x10563e['delete'](_0x5bffc7);}),_0x10563e[_0x48b8d3(0xfc)]&&(await _0x15e6a1[_0x48b8d3(0x104)](_0x48b8d3(0x108),{'params':{'userIDs':[..._0x10563e]}}))[_0x48b8d3(0x127)][_0x48b8d3(0x12e)]['forEach'](_0xd2bf33=>{_0xd2bf33&&_0x48dba1['addUser'](_0xd2bf33);});};function p(_0x1df97b,_0x52809c){return function(_0x127603,_0x5214cd){_0x52809c(_0x127603,_0x5214cd,_0x1df97b);};}function m(_0x2e4dbe,_0x2c0f30,_0x318d26,_0x2b1ea3){const _0x24c4b4=_0x29df79;var _0x365e99=arguments[_0x24c4b4(0x144)],_0x1d25cc=_0x365e99<0x3?_0x2c0f30:_0x2b1ea3===null?_0x2b1ea3=Object['getOwnPropertyDescriptor'](_0x2c0f30,_0x318d26):_0x2b1ea3,_0x5815d4;if(typeof Reflect==_0x24c4b4(0xe6)&&typeof Reflect['decorate']==_0x24c4b4(0xf0))_0x1d25cc=Reflect[_0x24c4b4(0x132)](_0x2e4dbe,_0x2c0f30,_0x318d26,_0x2b1ea3);else{for(var _0x158fd2=_0x2e4dbe[_0x24c4b4(0x144)]-0x1;_0x158fd2>=0x0;_0x158fd2--)(_0x5815d4=_0x2e4dbe[_0x158fd2])&&(_0x1d25cc=(_0x365e99<0x3?_0x5815d4(_0x1d25cc):_0x365e99>0x3?_0x5815d4(_0x2c0f30,_0x318d26,_0x1d25cc):_0x5815d4(_0x2c0f30,_0x318d26))||_0x1d25cc);}return _0x365e99>0x3&&_0x1d25cc&&Object[_0x24c4b4(0x138)](_0x2c0f30,_0x318d26,_0x1d25cc),_0x1d25cc;}let h=class extends n[_0x29df79(0x10d)]{constructor(_0x321801,_0x44942e,_0xdcf90f,_0x3893a0){const _0x3a110e=_0x29df79;super(),this[_0x3a110e(0x156)]=_0x321801,this['_threadCommentModel']=_0x44942e,this['_userService']=_0xdcf90f,this[_0x3a110e(0x123)]=_0x3893a0,this[_0x3a110e(0xe2)](),this[_0x3a110e(0x11f)]();}[_0x29df79(0x11f)](){const _0x6b93f3=_0x29df79;this[_0x6b93f3(0x153)](this[_0x6b93f3(0x116)][_0x6b93f3(0x140)][_0x6b93f3(0xf1)]((0x0,o[_0x6b93f3(0x143)])(0x10))[_0x6b93f3(0x155)](_0x5a5e95=>{const _0x525d65=_0x6b93f3;let _0x385f6f=new Set();_0x5a5e95[_0x525d65(0x12d)](_0x1b3846=>{const _0x357181=_0x525d65;switch(_0x1b3846[_0x357181(0x12c)]){case _0x357181(0xd9):{let _0x42a482=_0x1b3846['payload'][_0x357181(0x124)];_0x385f6f[_0x357181(0xd9)](_0x42a482);break;}default:break;}}),f(this['_injector'],_0x385f6f);}));}[_0x29df79(0xe2)](){const _0x291b00=_0x29df79;this[_0x291b00(0x153)](this[_0x291b00(0x156)][_0x291b00(0x140)]['subscribe'](async _0x26f630=>{const _0x2a596a=_0x291b00;var _0x5cdf6a;let _0x1b5aa7=(_0x5cdf6a=this[_0x2a596a(0x116)][_0x2a596a(0x11b)](_0x26f630[_0x2a596a(0x100)])[_0x2a596a(0xf2)](_0x2db787=>_0x2db787[_0x2a596a(0xde)]===_0x26f630[_0x2a596a(0xde)]))==null?void 0x0:_0x5cdf6a[_0x2a596a(0x128)];if(!_0x1b5aa7)return;let {unitId:_0x4332bf,subUnitId:_0x2eb9fa}=_0x1b5aa7;switch(_0x26f630['user']&&this[_0x2a596a(0x11a)][_0x2a596a(0x125)](_0x26f630[_0x2a596a(0x14c)]),_0x26f630['type']){case i[_0x2a596a(0x13f)][_0x2a596a(0xea)]:break;case i[_0x2a596a(0x13f)][_0x2a596a(0xe3)]:var _0x2283d5,_0x5e46b2;this['_threadCommentModel'][_0x2a596a(0xff)](_0x4332bf,_0x2eb9fa,{'unitId':_0x4332bf,'subUnitId':_0x2eb9fa,'ref':'','id':_0x26f630[_0x2a596a(0xef)],'dT':d(+_0x26f630['createTimestamp']),'threadId':_0x26f630['threadId'],'personId':(_0x2283d5=(_0x5e46b2=_0x26f630[_0x2a596a(0x14c)])==null?void 0x0:_0x5e46b2[_0x2a596a(0x113)])==null?_0x26f630[_0x2a596a(0xed)]:_0x2283d5,'text':JSON[_0x2a596a(0xd7)](_0x26f630[_0x2a596a(0x152)]),'parentId':_0x1b5aa7['id']});break;case i[_0x2a596a(0x13f)][_0x2a596a(0x12a)]:{let _0x1d4f17=this[_0x2a596a(0x116)][_0x2a596a(0xe9)](_0x4332bf,_0x2eb9fa,_0x26f630[_0x2a596a(0xef)]);_0x1d4f17&&_0x1d4f17[_0x2a596a(0xe4)]&&this[_0x2a596a(0x116)][_0x2a596a(0x14a)](_0x4332bf,_0x2eb9fa,_0x26f630['replyId']);break;}case i[_0x2a596a(0x13f)][_0x2a596a(0xf7)]:this[_0x2a596a(0x116)][_0x2a596a(0x118)](_0x4332bf,_0x2eb9fa,{'commentId':_0x26f630[_0x2a596a(0xef)],'text':JSON[_0x2a596a(0xd7)](_0x26f630['content'])});break;case i[_0x2a596a(0x13f)][_0x2a596a(0x139)]:{var _0x357ec7;let _0x27b47b=(_0x357ec7=this[_0x2a596a(0x116)]['getUnit'](_0x26f630[_0x2a596a(0x100)])[_0x2a596a(0xf2)](_0x440ca3=>_0x440ca3[_0x2a596a(0xde)]===_0x26f630[_0x2a596a(0xde)]))==null?void 0x0:_0x357ec7['root'];_0x27b47b&&this['_threadCommentModel'][_0x2a596a(0x111)](_0x4332bf,_0x2eb9fa,_0x27b47b['id'],_0x26f630['solved']===i[_0x2a596a(0xdd)][_0x2a596a(0xe0)]);break;}default:break;}}));}};h=m([p(0x0,(0x0,n[_0x29df79(0x10b)])(e[_0x29df79(0x147)])),p(0x1,(0x0,n['Inject'])(a[_0x29df79(0xee)])),p(0x2,(0x0,n[_0x29df79(0x10b)])(n[_0x29df79(0xdf)])),p(0x3,(0x0,n[_0x29df79(0x10b)])(n['Injector']))],h);function g(_0x37a7f6,_0x20a8cb){const _0x3c231f=_0x29df79;let _0xf2ac9=_0x37a7f6[_0x3c231f(0x114)][0x0];return{..._0x20a8cb,'id':_0xf2ac9[_0x3c231f(0xef)],'resolved':_0x37a7f6['solved']===0x1,'dT':d(_0xf2ac9['createTimestamp']),'personId':_0xf2ac9['userId'],'threadId':_0xf2ac9[_0x3c231f(0xde)]};}function _(_0x36c2ce,_0x42fe0e,_0x42b547){const _0x23f784=_0x29df79;var _0x8c3e27,_0x2ccf5d;if(((_0x8c3e27=_0x36c2ce==null||(_0x2ccf5d=_0x36c2ce[_0x23f784(0x114)])==null?void 0x0:_0x2ccf5d[_0x23f784(0x144)])==null?0x0:_0x8c3e27)>0x0){let _0x2c454c=(_0x2f6932,_0x7b1853)=>({'id':_0x2f6932[_0x23f784(0xef)],'threadId':_0x2f6932['threadId'],'dT':d(_0x2f6932[_0x23f784(0x137)]),'personId':_0x2f6932[_0x23f784(0xed)],'resolved':_0x36c2ce[_0x23f784(0xdc)]===i[_0x23f784(0xdd)][_0x23f784(0xe0)],'unitId':_0x42fe0e,'subUnitId':_0x42b547,'text':JSON[_0x23f784(0xd7)](_0x2f6932[_0x23f784(0x152)]),'parentId':_0x7b1853}),_0x7359db=_0x2c454c(_0x36c2ce[_0x23f784(0x114)][0x0]);return{..._0x7359db,'children':_0x36c2ce[_0x23f784(0x114)]['slice'](0x1)['map'](_0x3aa6ec=>_0x2c454c(_0x3aa6ec,_0x7359db['id']))};}return null;}let v=class{constructor(_0x7a1aed,_0x32192f,_0x8fe15e){const _0x2980e4=_0x29df79;this['_httpService']=_0x7a1aed,this[_0x2980e4(0x11a)]=_0x32192f,this[_0x2980e4(0xd8)]=_0x8fe15e;}async[_0x29df79(0xff)](_0x2bbef9){const _0x22e1f1=_0x29df79;var _0x1a837b,_0x3b309d;let {parentId:_0x21e1f5,unitId:_0x45d576,text:_0x1638cd,threadId:_0x404426}=_0x2bbef9,_0x433e0a=(_0x1a837b=(_0x3b309d=_0x1638cd[_0x22e1f1(0xf6)])==null?void 0x0:_0x3b309d[_0x22e1f1(0x10e)](_0x338eeb=>_0x338eeb[_0x22e1f1(0x145)]===n[_0x22e1f1(0x133)][_0x22e1f1(0x126)])[_0x22e1f1(0xfa)](_0x4abe35=>_0x4abe35[_0x22e1f1(0x12b)]))==null?[]:_0x1a837b,_0x7b811e=JSON['stringify'](_0x1638cd),_0x44117a=(await this['_sessionService'][_0x22e1f1(0x121)](_0x45d576))[_0x22e1f1(0xda)]();if(_0x21e1f5){let _0xdab763={'memberId':_0x44117a,'unitId':_0x45d576,'content':_0x7b811e,'mention':_0x433e0a,'threadId':_0x404426},_0x4552ae=(await this[_0x22e1f1(0xfb)][_0x22e1f1(0x142)]('/universer-api/comment/unit/'+_0x45d576+_0x22e1f1(0x115),{'body':_0xdab763}))['body'][_0x22e1f1(0x129)];return{..._0x2bbef9,'id':_0x4552ae[_0x22e1f1(0xef)],'dT':(0x0,n[_0x22e1f1(0x141)])(+_0x4552ae[_0x22e1f1(0x137)])[_0x22e1f1(0x14f)](_0x22e1f1(0xdb)),'personId':_0x4552ae[_0x22e1f1(0xed)]};}else{let _0xcba0d0={'memberId':_0x44117a,'unitId':_0x45d576,'content':_0x7b811e,'mention':_0x433e0a};return g((await this[_0x22e1f1(0xfb)][_0x22e1f1(0x142)]('/universer-api/comment/unit/'+_0x45d576+_0x22e1f1(0xd6),{'body':_0xcba0d0}))[_0x22e1f1(0x127)][_0x22e1f1(0xe5)],_0x2bbef9);}}async[_0x29df79(0x118)](_0xc36e19){const _0x54ca60=_0x29df79;var _0x49132b,_0x4c2854;let {text:_0x1fd0cf,unitId:_0x535f7d}=_0xc36e19,_0x32e5d3=(_0x49132b=(_0x4c2854=_0x1fd0cf['customRanges'])==null?void 0x0:_0x4c2854[_0x54ca60(0x10e)](_0x540018=>_0x540018[_0x54ca60(0x145)]===n['CustomRangeType']['COMMENT'])[_0x54ca60(0xfa)](_0x4c5938=>_0x4c5938[_0x54ca60(0x12b)]))==null?[]:_0x49132b,_0x1fe4ef=JSON[_0x54ca60(0x14d)](_0x1fd0cf),_0x4fe48c=_0xc36e19[_0x54ca60(0xde)],_0x54a378=_0xc36e19['id'],_0x44105e={'memberId':(await this[_0x54ca60(0xd8)][_0x54ca60(0x121)](_0x535f7d))[_0x54ca60(0xda)](),'unitId':_0x535f7d,'threadId':_0x4fe48c,'mention':_0x32e5d3,'content':_0x1fe4ef,'replyId':_0x54a378},_0x599dbe=await this[_0x54ca60(0xfb)]['post'](_0x54ca60(0xfd)+_0x535f7d+_0x54ca60(0xfe),{'body':_0x44105e});return!_0x599dbe[_0x54ca60(0x127)][_0x54ca60(0xeb)]||_0x599dbe[_0x54ca60(0x127)][_0x54ca60(0xeb)][_0x54ca60(0x14e)]===0x1;}async['resolveComment'](_0xee0ff5){const _0x50bbc9=_0x29df79;let {unitId:_0x5dd6c2}=_0xee0ff5,_0x3e7a2d=_0xee0ff5[_0x50bbc9(0xde)],_0x4ad813={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x5dd6c2,'threadId':_0x3e7a2d,'solved':_0xee0ff5['resolved']?i[_0x50bbc9(0xdd)][_0x50bbc9(0xe0)]:i[_0x50bbc9(0xdd)][_0x50bbc9(0x109)]},_0x362bd3=await this[_0x50bbc9(0xfb)][_0x50bbc9(0x142)](_0x50bbc9(0xfd)+_0x5dd6c2+_0x50bbc9(0x151),{'body':_0x4ad813});return!_0x362bd3[_0x50bbc9(0x127)][_0x50bbc9(0xeb)]||_0x362bd3[_0x50bbc9(0x127)][_0x50bbc9(0xeb)][_0x50bbc9(0x14e)]===0x1;}async[_0x29df79(0x14a)](_0x2c93e3,_0x3c3c03,_0x434887,_0xc6f5){const _0x210df1=_0x29df79;let _0x3bdd57={'memberId':(await this[_0x210df1(0xd8)]['requireSession'](_0x2c93e3))[_0x210df1(0xda)](),'threadId':_0x434887,'replyId':_0xc6f5,'unitId':_0x2c93e3},_0x8c27cb=await this[_0x210df1(0xfb)][_0x210df1(0x142)](_0x210df1(0xfd)+_0x2c93e3+_0x210df1(0x102),{'body':_0x3bdd57});return!_0x8c27cb[_0x210df1(0x127)]['error']||_0x8c27cb[_0x210df1(0x127)][_0x210df1(0xeb)][_0x210df1(0x14e)]===0x1;}async['listComments'](_0x1c9a2a,_0x3d7ce2,_0x7a21fe){const _0x3d9ab9=_0x29df79;let _0x1db374={'unitId':_0x1c9a2a,'threadId':_0x7a21fe},_0x4dbb85=await this[_0x3d9ab9(0xfb)]['post'](_0x3d9ab9(0xfd)+_0x1c9a2a+_0x3d9ab9(0x13d),{'body':_0x1db374}),_0x94963b=_0x7a21fe[_0x3d9ab9(0xfa)](_0x196b29=>_(_0x4dbb85['body']['comments'][_0x196b29],_0x1c9a2a,_0x3d7ce2))['filter'](Boolean);return Object['values'](_0x4dbb85['body'][_0x3d9ab9(0x12e)])['forEach'](_0x3aac38=>{const _0x3b7e8f=_0x3d9ab9;this[_0x3b7e8f(0x11a)][_0x3b7e8f(0x125)](_0x3aac38);}),_0x94963b;}[_0x29df79(0xe8)](_0x562b73){const _0x24425d=_0x29df79;return{'id':_0x562b73['id'],'threadId':_0x562b73[_0x24425d(0xde)],'ref':_0x562b73[_0x24425d(0x107)]};}};v=m([p(0x0,(0x0,n['Inject'])(s[_0x29df79(0x117)])),p(0x1,(0x0,n[_0x29df79(0x10b)])(n[_0x29df79(0xdf)])),p(0x2,(0x0,n[_0x29df79(0x10b)])(e['CollaborationSessionService']))],v);let y=class extends n['Disposable']{constructor(_0x40c5eb,_0x710b55){const _0x3c920e=_0x29df79;super(),this[_0x3c920e(0x119)]=_0x40c5eb,this['_threadCommentDataSource']=_0x710b55,this[_0x3c920e(0x110)]();}[_0x29df79(0x110)](){const _0x24404b=_0x29df79;this[_0x24404b(0x119)][_0x24404b(0x134)]=this[_0x24404b(0x10f)],this[_0x24404b(0x119)]['syncUpdateMutationToColla']=!0x1;}};y=m([p(0x0,a[_0x29df79(0xf5)]),p(0x1,(0x0,n[_0x29df79(0x10b)])(v))],y);function _0x13e6(){const _0x261986=['YYYY/MM/DD\x20HH:mm','solved','CommentSolvedStatus','threadId','UserManagerService','Solved','DependentOn','_init','Reply','parentId','comment','object','symbol','saveCommentToSnapshot','getComment','Add','error','merge','userId','ThreadCommentModel','replyId','function','pipe','find','_configService','_config','IThreadCommentDataSourceService','customRanges','Edit','3485706ghNNpQ','prototype','map','_httpService','size','/universer-api/comment/unit/','/edit','addComment','unitId','string','/delete','17000dsTwAh','get','pluginName','IConfigService','ref','/universer-api/user/list','OpenOrReOpen','75730sPmZyq','Inject','497874tjJNFz','Disposable','filter','_threadCommentDataSource','_initDataSource','resolveComment','call','userID','replies','/reply','_threadCommentModel','HTTPService','updateComment','_threadCommentDataSourceService','_userService','getUnit','UniverLicensePlugin','Injector','UniverThreadCommentUIPlugin','_initUserSync','1.0.0-alpha.4','requireSession','iterator','_injector','personId','addUser','COMMENT','body','root','reply','Delete','rangeId','type','forEach','users','Plugin','getUser','24kYckXP','decorate','CustomRangeType','dataSource','1136835QvQqiS','UniverCollaborationClientPlugin','createTimestamp','defineProperty','Solve','packageName','382263WGndFC','thread-comment-data-source.config','/list','constructor','CommentUpdateEventType','commentUpdate$','dateKit','post','bufferTime','length','rangeType','@univerjs-pro/thread-comment-datasource','CommentService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','deleteComment','2997eojHQN','user','stringify','code','format','232794ZMuoQf','/solved','content','disposeWithMe','12mteMFT','subscribe','_commentService','toStringTag','UniverThreadCommentDataSourcePlugin','/add','parse','_sessionService','add','getMemberID'];_0x13e6=function(){return _0x261986;};return _0x13e6();}function _0x1d04(_0x36395d,_0x3c402b){_0x36395d=_0x36395d-0xd5;const _0x13e6b1=_0x13e6();let _0x1d0478=_0x13e6b1[_0x36395d];return _0x1d0478;}function b(_0x26717f){'@babel/helpers - typeof';const _0x2ac0b2=_0x29df79;return b=typeof Symbol=='function'&&typeof Symbol[_0x2ac0b2(0x122)]==_0x2ac0b2(0xe7)?function(_0x3211fc){return typeof _0x3211fc;}:function(_0x1a18c9){const _0x324817=_0x2ac0b2;return _0x1a18c9&&typeof Symbol==_0x324817(0xf0)&&_0x1a18c9[_0x324817(0x13e)]===Symbol&&_0x1a18c9!==Symbol[_0x324817(0xf9)]?_0x324817(0xe7):typeof _0x1a18c9;},b(_0x26717f);}function x(_0x146c12,_0x38b777){const _0x4f1a02=_0x29df79;if(b(_0x146c12)!=_0x4f1a02(0xe6)||!_0x146c12)return _0x146c12;var _0x516057=_0x146c12[Symbol['toPrimitive']];if(_0x516057!==void 0x0){var _0x159d4e=_0x516057[_0x4f1a02(0x112)](_0x146c12,_0x38b777||'default');if(b(_0x159d4e)!=_0x4f1a02(0xe6))return _0x159d4e;throw TypeError(_0x4f1a02(0x148));}return(_0x38b777===_0x4f1a02(0x101)?String:Number)(_0x146c12);}function S(_0x2480c2){const _0x22a7c5=_0x29df79;var _0x1c6cf8=x(_0x2480c2,_0x22a7c5(0x101));return b(_0x1c6cf8)==_0x22a7c5(0xe7)?_0x1c6cf8:_0x1c6cf8+'';}function C(_0x2e036b,_0x255264,_0x2b6341){const _0x30ac2a=_0x29df79;return(_0x255264=S(_0x255264))in _0x2e036b?Object[_0x30ac2a(0x138)](_0x2e036b,_0x255264,{'value':_0x2b6341,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2e036b[_0x255264]=_0x2b6341,_0x2e036b;}let w=class extends n[_0x29df79(0x12f)]{constructor(_0x17610a=u,_0x2a2f09,_0x201d8c){const _0x1920cf=_0x29df79;super(),this[_0x1920cf(0xf4)]=_0x17610a,this['_injector']=_0x2a2f09,this[_0x1920cf(0xf3)]=_0x201d8c;let {..._0x232827}=(0x0,n[_0x1920cf(0xec)])({},u,this[_0x1920cf(0xf4)]);this[_0x1920cf(0xf3)]['setConfig'](_0x1920cf(0x13c),_0x232827);}['onStarting'](){const _0x268672=_0x29df79;[[v],[y],[h]][_0x268672(0x12d)](_0x27c4b7=>{const _0x202374=_0x268672;this['_injector'][_0x202374(0xd9)](_0x27c4b7);});}['onReady'](){const _0x5843db=_0x29df79;this[_0x5843db(0x123)][_0x5843db(0x104)](y),this[_0x5843db(0x123)][_0x5843db(0x104)](h);}};C(w,_0x29df79(0x105),_0x29df79(0x149)),C(w,_0x29df79(0x13a),c),C(w,'version',l),w=m([(0x0,n[_0x29df79(0xe1)])(r[_0x29df79(0x11e)],e[_0x29df79(0x136)],t[_0x29df79(0x11c)]),p(0x1,(0x0,n[_0x29df79(0x10b)])(n[_0x29df79(0x11d)])),p(0x2,n[_0x29df79(0x106)])],w),Object[_0x29df79(0x138)](exports,_0x29df79(0xd5),{'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 _0x337b22=_0x204e;(function(_0x57afe0,_0x1cbcb2){const _0x4b70aa=_0x204e,_0xc56d21=_0x57afe0();while(!![]){try{const _0x10cec5=-parseInt(_0x4b70aa(0x1b1))/0x1*(parseInt(_0x4b70aa(0x1b5))/0x2)+-parseInt(_0x4b70aa(0x1ce))/0x3+-parseInt(_0x4b70aa(0x1b2))/0x4*(-parseInt(_0x4b70aa(0x1a6))/0x5)+-parseInt(_0x4b70aa(0x1d7))/0x6*(parseInt(_0x4b70aa(0x17d))/0x7)+-parseInt(_0x4b70aa(0x1a4))/0x8+-parseInt(_0x4b70aa(0x187))/0x9+parseInt(_0x4b70aa(0x1a2))/0xa;if(_0x10cec5===_0x1cbcb2)break;else _0xc56d21['push'](_0xc56d21['shift']());}catch(_0x3c5808){_0xc56d21['push'](_0xc56d21['shift']());}}}(_0x2011,0xac680));import{CollaborationSessionService as _0x3c01f3,CommentService as _0x18a52a,UniverCollaborationClientPlugin as _0x16d112}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44d633}from'@univerjs-pro/license';import{CustomRangeType as _0x1a7a7b,DependentOn as _0x14c661,Disposable as _0x234e26,IConfigService as _0x2c9871,Inject as _0x9fa166,Injector as _0x3e71d6,Plugin as _0x22fef3,UserManagerService as _0x234cb1,dateKit as _0x349d36,merge as _0x320d37}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e1137}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x5c0ffc,CommentUpdateEventType as _0x1a35c6}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x4a3cb1,ThreadCommentModel as _0x182ed6}from'@univerjs/thread-comment';import{bufferTime as _0x31d0b0}from'rxjs';import{HTTPService as _0x4ac327}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S=_0x337b22(0x177);const C={},w=_0x2c756a=>_0x349d36(new Date(+_0x2c756a))[_0x337b22(0x197)](_0x337b22(0x196)),T=async(_0x5e4658,_0x738175)=>{const _0x1508f6=_0x337b22;let _0x22f091=_0x5e4658['get'](_0x234cb1),_0x39f555=_0x5e4658[_0x1508f6(0x1bd)](_0x4ac327);_0x738175[_0x1508f6(0x18c)](_0x1ee01d=>{const _0x45cd9f=_0x1508f6;_0x22f091[_0x45cd9f(0x1ad)](_0x1ee01d)&&_0x738175[_0x45cd9f(0x18f)](_0x1ee01d);}),_0x738175[_0x1508f6(0x180)]&&(await _0x39f555[_0x1508f6(0x1bd)]('/universer-api/user/list',{'params':{'userIDs':[..._0x738175]}}))['body'][_0x1508f6(0x1d6)]['forEach'](_0x145814=>{const _0x53f3dd=_0x1508f6;_0x145814&&_0x22f091[_0x53f3dd(0x175)](_0x145814);});};function E(_0x6a850b,_0x423f36){return function(_0x367ef6,_0x4e1245){_0x423f36(_0x367ef6,_0x4e1245,_0x6a850b);};}function D(_0x12c21d,_0x57b9ea,_0x4d7979,_0x5bf9cf){const _0x1881c3=_0x337b22;var _0x16b04e=arguments[_0x1881c3(0x184)],_0x370309=_0x16b04e<0x3?_0x57b9ea:_0x5bf9cf===null?_0x5bf9cf=Object['getOwnPropertyDescriptor'](_0x57b9ea,_0x4d7979):_0x5bf9cf,_0x422b09;if(typeof Reflect==_0x1881c3(0x1b6)&&typeof Reflect[_0x1881c3(0x182)]==_0x1881c3(0x16f))_0x370309=Reflect[_0x1881c3(0x182)](_0x12c21d,_0x57b9ea,_0x4d7979,_0x5bf9cf);else{for(var _0x5717f6=_0x12c21d['length']-0x1;_0x5717f6>=0x0;_0x5717f6--)(_0x422b09=_0x12c21d[_0x5717f6])&&(_0x370309=(_0x16b04e<0x3?_0x422b09(_0x370309):_0x16b04e>0x3?_0x422b09(_0x57b9ea,_0x4d7979,_0x370309):_0x422b09(_0x57b9ea,_0x4d7979))||_0x370309);}return _0x16b04e>0x3&&_0x370309&&Object[_0x1881c3(0x1c3)](_0x57b9ea,_0x4d7979,_0x370309),_0x370309;}let O=class extends _0x234e26{constructor(_0x11b863,_0x5db8be,_0x20d06d,_0x4f1f18){const _0x1366b9=_0x337b22;super(),this[_0x1366b9(0x1cb)]=_0x11b863,this[_0x1366b9(0x1af)]=_0x5db8be,this[_0x1366b9(0x17c)]=_0x20d06d,this[_0x1366b9(0x1ab)]=_0x4f1f18,this[_0x1366b9(0x179)](),this['_initUserSync']();}[_0x337b22(0x1ae)](){const _0x33bb05=_0x337b22;this[_0x33bb05(0x1b7)](this[_0x33bb05(0x1af)]['commentUpdate$']['pipe'](_0x31d0b0(0x10))['subscribe'](_0x1433f9=>{const _0x2446a2=_0x33bb05;let _0x115b8c=new Set();_0x1433f9['forEach'](_0x44bc74=>{const _0x5f4e42=_0x204e;switch(_0x44bc74['type']){case _0x5f4e42(0x18a):{let _0x54fe48=_0x44bc74[_0x5f4e42(0x1a8)][_0x5f4e42(0x176)];_0x115b8c['add'](_0x54fe48);break;}default:break;}}),T(this[_0x2446a2(0x1ab)],_0x115b8c);}));}[_0x337b22(0x179)](){const _0x278ade=_0x337b22;this[_0x278ade(0x1b7)](this['_commentService'][_0x278ade(0x1a3)]['subscribe'](async _0x7a23ed=>{const _0xaf4011=_0x278ade;var _0x4d0834;let _0x3e2b1d=(_0x4d0834=this[_0xaf4011(0x1af)][_0xaf4011(0x174)](_0x7a23ed[_0xaf4011(0x193)])[_0xaf4011(0x1cd)](_0x1d1391=>_0x1d1391['threadId']===_0x7a23ed[_0xaf4011(0x1c0)]))==null?void 0x0:_0x4d0834[_0xaf4011(0x192)];if(!_0x3e2b1d)return;let {unitId:_0x4a9c1d,subUnitId:_0x31a8c0}=_0x3e2b1d;switch(_0x7a23ed[_0xaf4011(0x1cc)]&&this['_userService'][_0xaf4011(0x175)](_0x7a23ed[_0xaf4011(0x1cc)]),_0x7a23ed[_0xaf4011(0x1d2)]){case _0x1a35c6[_0xaf4011(0x183)]:break;case _0x1a35c6[_0xaf4011(0x171)]:var _0x334b4e,_0x26c1b8;this[_0xaf4011(0x1af)][_0xaf4011(0x1c1)](_0x4a9c1d,_0x31a8c0,{'unitId':_0x4a9c1d,'subUnitId':_0x31a8c0,'ref':'','id':_0x7a23ed['replyId'],'dT':w(+_0x7a23ed['createTimestamp']),'threadId':_0x7a23ed[_0xaf4011(0x1c0)],'personId':(_0x334b4e=(_0x26c1b8=_0x7a23ed[_0xaf4011(0x1cc)])==null?void 0x0:_0x26c1b8[_0xaf4011(0x189)])==null?_0x7a23ed[_0xaf4011(0x19c)]:_0x334b4e,'text':JSON[_0xaf4011(0x1d5)](_0x7a23ed['content']),'parentId':_0x3e2b1d['id']});break;case _0x1a35c6['Delete']:{let _0x3c3e51=this[_0xaf4011(0x1af)]['getComment'](_0x4a9c1d,_0x31a8c0,_0x7a23ed['replyId']);_0x3c3e51&&_0x3c3e51[_0xaf4011(0x188)]&&this[_0xaf4011(0x1af)]['deleteComment'](_0x4a9c1d,_0x31a8c0,_0x7a23ed[_0xaf4011(0x16e)]);break;}case _0x1a35c6[_0xaf4011(0x18d)]:this[_0xaf4011(0x1af)][_0xaf4011(0x170)](_0x4a9c1d,_0x31a8c0,{'commentId':_0x7a23ed[_0xaf4011(0x16e)],'text':JSON[_0xaf4011(0x1d5)](_0x7a23ed['content'])});break;case _0x1a35c6[_0xaf4011(0x195)]:{var _0x3d8335;let _0x49dd89=(_0x3d8335=this[_0xaf4011(0x1af)][_0xaf4011(0x174)](_0x7a23ed[_0xaf4011(0x193)])[_0xaf4011(0x1cd)](_0x340984=>_0x340984[_0xaf4011(0x1c0)]===_0x7a23ed['threadId']))==null?void 0x0:_0x3d8335[_0xaf4011(0x192)];_0x49dd89&&this[_0xaf4011(0x1af)][_0xaf4011(0x1ca)](_0x4a9c1d,_0x31a8c0,_0x49dd89['id'],_0x7a23ed[_0xaf4011(0x17a)]===_0x5c0ffc['Solved']);break;}default:break;}}));}};function _0x2011(){const _0x24ec85=['deleteComment','version','stringify','Solved','_config','get','body','content','threadId','addComment','thread-comment-data-source.config','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','saveCommentToSnapshot','rangeType','_configService','post','resolved','resolveComment','_commentService','user','find','169692FPpoiF','/add','comment','getCurrentUser','type','replies','values','parse','users','19182CUvsnq','replyId','function','updateComment','Reply','error','iterator','getUnit','addUser','personId','1.0.0-alpha.4','getMemberID','_init','solved','requireSession','_userService','2233gsMZRO','string','default','size','OpenOrReOpen','decorate','Add','length','filter','_threadCommentDataSourceService','907902oiVkgm','parentId','userID','add','_sessionService','forEach','Edit','listComments','delete','customRanges','_httpService','root','unitId','/reply','Solve','YYYY/MM/DD\x20HH:mm','format','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_initDataSource','onStarting','ref','userId','createTimestamp','rangeId','comments','map','packageName','20776810wCHDeG','commentUpdate$','278840rJurga','/solved','5GLedOE','prototype','payload','symbol','code','_injector','/delete','getUser','_initUserSync','_threadCommentModel','_threadCommentDataSource','1TwQKDm','1265360zpxQJB','/universer-api/comment/unit/','call','951410gTWDkR','object','disposeWithMe'];_0x2011=function(){return _0x24ec85;};return _0x2011();}O=D([E(0x0,_0x9fa166(_0x18a52a)),E(0x1,_0x9fa166(_0x182ed6)),E(0x2,_0x9fa166(_0x234cb1)),E(0x3,_0x9fa166(_0x3e71d6))],O);function k(_0x2ebdbe,_0x1bd8c5){const _0x2e4d66=_0x337b22;let _0x5e7111=_0x2ebdbe['replies'][0x0];return{..._0x1bd8c5,'id':_0x5e7111[_0x2e4d66(0x16e)],'resolved':_0x2ebdbe[_0x2e4d66(0x17a)]===0x1,'dT':w(_0x5e7111[_0x2e4d66(0x19d)]),'personId':_0x5e7111[_0x2e4d66(0x19c)],'threadId':_0x5e7111[_0x2e4d66(0x1c0)]};}function A(_0x166e17,_0x3b2adb,_0x8b9ba5){const _0xa77048=_0x337b22;var _0x400d0a,_0x5248ef;if(((_0x400d0a=_0x166e17==null||(_0x5248ef=_0x166e17[_0xa77048(0x1d3)])==null?void 0x0:_0x5248ef['length'])==null?0x0:_0x400d0a)>0x0){let _0x283459=(_0x414ce8,_0xfdf200)=>({'id':_0x414ce8[_0xa77048(0x16e)],'threadId':_0x414ce8['threadId'],'dT':w(_0x414ce8[_0xa77048(0x19d)]),'personId':_0x414ce8[_0xa77048(0x19c)],'resolved':_0x166e17[_0xa77048(0x17a)]===_0x5c0ffc['Solved'],'unitId':_0x3b2adb,'subUnitId':_0x8b9ba5,'text':JSON['parse'](_0x414ce8[_0xa77048(0x1bf)]),'parentId':_0xfdf200}),_0x235a9c=_0x283459(_0x166e17[_0xa77048(0x1d3)][0x0]);return{..._0x235a9c,'children':_0x166e17[_0xa77048(0x1d3)]['slice'](0x1)[_0xa77048(0x1a0)](_0x313a9e=>_0x283459(_0x313a9e,_0x235a9c['id']))};}return null;}let j=class{constructor(_0x3eb6fc,_0x4f427f,_0x569867){const _0x51f239=_0x337b22;this[_0x51f239(0x191)]=_0x3eb6fc,this['_userService']=_0x4f427f,this['_sessionService']=_0x569867;}async[_0x337b22(0x1c1)](_0x1c6e83){const _0x204d5a=_0x337b22;var _0x412b70,_0x179637;let {parentId:_0x417088,unitId:_0x1d8e29,text:_0x44010e,threadId:_0x5c346}=_0x1c6e83,_0x4c2be3=(_0x412b70=(_0x179637=_0x44010e[_0x204d5a(0x190)])==null?void 0x0:_0x179637[_0x204d5a(0x185)](_0x16802f=>_0x16802f[_0x204d5a(0x1c6)]===_0x1a7a7b['COMMENT'])[_0x204d5a(0x1a0)](_0x23dea2=>_0x23dea2[_0x204d5a(0x19e)]))==null?[]:_0x412b70,_0x296add=JSON[_0x204d5a(0x1ba)](_0x44010e),_0x346a6a=(await this['_sessionService'][_0x204d5a(0x17b)](_0x1d8e29))[_0x204d5a(0x178)]();if(_0x417088){let _0x1b1cf9={'memberId':_0x346a6a,'unitId':_0x1d8e29,'content':_0x296add,'mention':_0x4c2be3,'threadId':_0x5c346},_0x5ac7fb=(await this[_0x204d5a(0x191)][_0x204d5a(0x1c8)](_0x204d5a(0x1b3)+_0x1d8e29+_0x204d5a(0x194),{'body':_0x1b1cf9}))['body']['reply'];return{..._0x1c6e83,'id':_0x5ac7fb[_0x204d5a(0x16e)],'dT':_0x349d36(+_0x5ac7fb[_0x204d5a(0x19d)])['format'](_0x204d5a(0x196)),'personId':_0x5ac7fb[_0x204d5a(0x19c)]};}else{let _0x5d41a2={'memberId':_0x346a6a,'unitId':_0x1d8e29,'content':_0x296add,'mention':_0x4c2be3};return k((await this[_0x204d5a(0x191)][_0x204d5a(0x1c8)](_0x204d5a(0x1b3)+_0x1d8e29+_0x204d5a(0x1cf),{'body':_0x5d41a2}))[_0x204d5a(0x1be)][_0x204d5a(0x1d0)],_0x1c6e83);}}async[_0x337b22(0x170)](_0x3e295e){const _0x29c964=_0x337b22;var _0x1bfa13,_0x4807bc;let {text:_0x3fac96,unitId:_0x6464c6}=_0x3e295e,_0x228f50=(_0x1bfa13=(_0x4807bc=_0x3fac96[_0x29c964(0x190)])==null?void 0x0:_0x4807bc['filter'](_0x28481d=>_0x28481d['rangeType']===_0x1a7a7b['COMMENT'])[_0x29c964(0x1a0)](_0x5c9b96=>_0x5c9b96[_0x29c964(0x19e)]))==null?[]:_0x1bfa13,_0x5b4c2a=JSON[_0x29c964(0x1ba)](_0x3fac96),_0x37b98c=_0x3e295e['threadId'],_0x5dec20=_0x3e295e['id'],_0x1da400={'memberId':(await this[_0x29c964(0x18b)][_0x29c964(0x17b)](_0x6464c6))['getMemberID'](),'unitId':_0x6464c6,'threadId':_0x37b98c,'mention':_0x228f50,'content':_0x5b4c2a,'replyId':_0x5dec20},_0x4ebccd=await this[_0x29c964(0x191)][_0x29c964(0x1c8)](_0x29c964(0x1b3)+_0x6464c6+'/edit',{'body':_0x1da400});return!_0x4ebccd[_0x29c964(0x1be)][_0x29c964(0x172)]||_0x4ebccd[_0x29c964(0x1be)]['error'][_0x29c964(0x1aa)]===0x1;}async[_0x337b22(0x1ca)](_0x41ce17){const _0x31db66=_0x337b22;let {unitId:_0x5d9ce1}=_0x41ce17,_0x46de15=_0x41ce17[_0x31db66(0x1c0)],_0x4ac6be={'memberId':this[_0x31db66(0x17c)][_0x31db66(0x1d1)]()['userID'],'unitId':_0x5d9ce1,'threadId':_0x46de15,'solved':_0x41ce17[_0x31db66(0x1c9)]?_0x5c0ffc[_0x31db66(0x1bb)]:_0x5c0ffc[_0x31db66(0x181)]},_0x158403=await this[_0x31db66(0x191)][_0x31db66(0x1c8)](_0x31db66(0x1b3)+_0x5d9ce1+_0x31db66(0x1a5),{'body':_0x4ac6be});return!_0x158403['body'][_0x31db66(0x172)]||_0x158403[_0x31db66(0x1be)][_0x31db66(0x172)]['code']===0x1;}async[_0x337b22(0x1b8)](_0x2dd27d,_0x4af70c,_0x2be7fe,_0xc170ac){const _0x20cfc3=_0x337b22;let _0x322994={'memberId':(await this['_sessionService'][_0x20cfc3(0x17b)](_0x2dd27d))[_0x20cfc3(0x178)](),'threadId':_0x2be7fe,'replyId':_0xc170ac,'unitId':_0x2dd27d},_0xc3aa52=await this[_0x20cfc3(0x191)][_0x20cfc3(0x1c8)]('/universer-api/comment/unit/'+_0x2dd27d+_0x20cfc3(0x1ac),{'body':_0x322994});return!_0xc3aa52[_0x20cfc3(0x1be)][_0x20cfc3(0x172)]||_0xc3aa52[_0x20cfc3(0x1be)][_0x20cfc3(0x172)][_0x20cfc3(0x1aa)]===0x1;}async[_0x337b22(0x18e)](_0x2a374f,_0x36c8bc,_0x14db05){const _0x25fdf5=_0x337b22;let _0x5cfa6b={'unitId':_0x2a374f,'threadId':_0x14db05},_0x5b8d14=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2a374f+'/list',{'body':_0x5cfa6b}),_0x6e1196=_0x14db05[_0x25fdf5(0x1a0)](_0x7c66a9=>A(_0x5b8d14[_0x25fdf5(0x1be)][_0x25fdf5(0x19f)][_0x7c66a9],_0x2a374f,_0x36c8bc))['filter'](Boolean);return Object[_0x25fdf5(0x1d4)](_0x5b8d14[_0x25fdf5(0x1be)][_0x25fdf5(0x1d6)])[_0x25fdf5(0x18c)](_0x29eb4c=>{const _0x5c4e4b=_0x25fdf5;this[_0x5c4e4b(0x17c)][_0x5c4e4b(0x175)](_0x29eb4c);}),_0x6e1196;}[_0x337b22(0x1c5)](_0x6a229b){const _0x4a34d0=_0x337b22;return{'id':_0x6a229b['id'],'threadId':_0x6a229b[_0x4a34d0(0x1c0)],'ref':_0x6a229b[_0x4a34d0(0x19b)]};}};j=D([E(0x0,_0x9fa166(_0x4ac327)),E(0x1,_0x9fa166(_0x234cb1)),E(0x2,_0x9fa166(_0x3c01f3))],j);let M=class extends _0x234e26{constructor(_0x2cb13d,_0x2bdc97){const _0x35aaa1=_0x337b22;super(),this['_threadCommentDataSourceService']=_0x2cb13d,this[_0x35aaa1(0x1b0)]=_0x2bdc97,this[_0x35aaa1(0x199)]();}[_0x337b22(0x199)](){const _0x1af48b=_0x337b22;this[_0x1af48b(0x186)]['dataSource']=this[_0x1af48b(0x1b0)],this[_0x1af48b(0x186)]['syncUpdateMutationToColla']=!0x1;}};M=D([E(0x0,_0x4a3cb1),E(0x1,_0x9fa166(j))],M);function N(_0x232fe8){'@babel/helpers - typeof';const _0x21f844=_0x337b22;return N=typeof Symbol==_0x21f844(0x16f)&&typeof Symbol[_0x21f844(0x173)]==_0x21f844(0x1a9)?function(_0x5cc61c){return typeof _0x5cc61c;}:function(_0x522cba){const _0x34d53c=_0x21f844;return _0x522cba&&typeof Symbol=='function'&&_0x522cba['constructor']===Symbol&&_0x522cba!==Symbol[_0x34d53c(0x1a7)]?'symbol':typeof _0x522cba;},N(_0x232fe8);}function P(_0x49a001,_0xc7eb33){const _0x342684=_0x337b22;if(N(_0x49a001)!=_0x342684(0x1b6)||!_0x49a001)return _0x49a001;var _0x4a5b02=_0x49a001[Symbol['toPrimitive']];if(_0x4a5b02!==void 0x0){var _0x2079c6=_0x4a5b02[_0x342684(0x1b4)](_0x49a001,_0xc7eb33||_0x342684(0x17f));if(N(_0x2079c6)!=_0x342684(0x1b6))return _0x2079c6;throw TypeError(_0x342684(0x198));}return(_0xc7eb33===_0x342684(0x17e)?String:Number)(_0x49a001);}function F(_0x9e7abf){const _0xc5af5f=_0x337b22;var _0x55f9ec=P(_0x9e7abf,'string');return N(_0x55f9ec)==_0xc5af5f(0x1a9)?_0x55f9ec:_0x55f9ec+'';}function I(_0x4a7fb8,_0x47973e,_0x1432ad){return(_0x47973e=F(_0x47973e))in _0x4a7fb8?Object['defineProperty'](_0x4a7fb8,_0x47973e,{'value':_0x1432ad,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4a7fb8[_0x47973e]=_0x1432ad,_0x4a7fb8;}function _0x204e(_0x2768d4,_0x3ed871){_0x2768d4=_0x2768d4-0x16e;const _0x2011bf=_0x2011();let _0x204e4b=_0x2011bf[_0x2768d4];return _0x204e4b;}let L=class extends _0x22fef3{constructor(_0x2bb856=C,_0x3ebbd1,_0x3a29e6){const _0x2d5541=_0x337b22;super(),this[_0x2d5541(0x1bc)]=_0x2bb856,this[_0x2d5541(0x1ab)]=_0x3ebbd1,this[_0x2d5541(0x1c7)]=_0x3a29e6;let {..._0xca6ec9}=_0x320d37({},C,this[_0x2d5541(0x1bc)]);this['_configService']['setConfig'](_0x2d5541(0x1c2),_0xca6ec9);}[_0x337b22(0x19a)](){const _0x45ef2a=_0x337b22;[[j],[M],[O]][_0x45ef2a(0x18c)](_0xf55d3a=>{const _0x22f9f8=_0x45ef2a;this['_injector'][_0x22f9f8(0x18a)](_0xf55d3a);});}['onReady'](){const _0x50f67b=_0x337b22;this['_injector'][_0x50f67b(0x1bd)](M),this[_0x50f67b(0x1ab)]['get'](O);}};I(L,'pluginName',_0x337b22(0x1c4)),I(L,_0x337b22(0x1a1),x),I(L,_0x337b22(0x1b9),S),L=D([_0x14c661(_0x3e1137,_0x16d112,_0x44d633),E(0x1,_0x9fa166(_0x3e71d6)),E(0x2,_0x2c9871)],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 _0x337b22=_0x204e;(function(_0x57afe0,_0x1cbcb2){const _0x4b70aa=_0x204e,_0xc56d21=_0x57afe0();while(!![]){try{const _0x10cec5=-parseInt(_0x4b70aa(0x1b1))/0x1*(parseInt(_0x4b70aa(0x1b5))/0x2)+-parseInt(_0x4b70aa(0x1ce))/0x3+-parseInt(_0x4b70aa(0x1b2))/0x4*(-parseInt(_0x4b70aa(0x1a6))/0x5)+-parseInt(_0x4b70aa(0x1d7))/0x6*(parseInt(_0x4b70aa(0x17d))/0x7)+-parseInt(_0x4b70aa(0x1a4))/0x8+-parseInt(_0x4b70aa(0x187))/0x9+parseInt(_0x4b70aa(0x1a2))/0xa;if(_0x10cec5===_0x1cbcb2)break;else _0xc56d21['push'](_0xc56d21['shift']());}catch(_0x3c5808){_0xc56d21['push'](_0xc56d21['shift']());}}}(_0x2011,0xac680));import{CollaborationSessionService as _0x3c01f3,CommentService as _0x18a52a,UniverCollaborationClientPlugin as _0x16d112}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44d633}from'@univerjs-pro/license';import{CustomRangeType as _0x1a7a7b,DependentOn as _0x14c661,Disposable as _0x234e26,IConfigService as _0x2c9871,Inject as _0x9fa166,Injector as _0x3e71d6,Plugin as _0x22fef3,UserManagerService as _0x234cb1,dateKit as _0x349d36,merge as _0x320d37}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e1137}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x5c0ffc,CommentUpdateEventType as _0x1a35c6}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x4a3cb1,ThreadCommentModel as _0x182ed6}from'@univerjs/thread-comment';import{bufferTime as _0x31d0b0}from'rxjs';import{HTTPService as _0x4ac327}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S=_0x337b22(0x177);const C={},w=_0x2c756a=>_0x349d36(new Date(+_0x2c756a))[_0x337b22(0x197)](_0x337b22(0x196)),T=async(_0x5e4658,_0x738175)=>{const _0x1508f6=_0x337b22;let _0x22f091=_0x5e4658['get'](_0x234cb1),_0x39f555=_0x5e4658[_0x1508f6(0x1bd)](_0x4ac327);_0x738175[_0x1508f6(0x18c)](_0x1ee01d=>{const _0x45cd9f=_0x1508f6;_0x22f091[_0x45cd9f(0x1ad)](_0x1ee01d)&&_0x738175[_0x45cd9f(0x18f)](_0x1ee01d);}),_0x738175[_0x1508f6(0x180)]&&(await _0x39f555[_0x1508f6(0x1bd)]('/universer-api/user/list',{'params':{'userIDs':[..._0x738175]}}))['body'][_0x1508f6(0x1d6)]['forEach'](_0x145814=>{const _0x53f3dd=_0x1508f6;_0x145814&&_0x22f091[_0x53f3dd(0x175)](_0x145814);});};function E(_0x6a850b,_0x423f36){return function(_0x367ef6,_0x4e1245){_0x423f36(_0x367ef6,_0x4e1245,_0x6a850b);};}function D(_0x12c21d,_0x57b9ea,_0x4d7979,_0x5bf9cf){const _0x1881c3=_0x337b22;var _0x16b04e=arguments[_0x1881c3(0x184)],_0x370309=_0x16b04e<0x3?_0x57b9ea:_0x5bf9cf===null?_0x5bf9cf=Object['getOwnPropertyDescriptor'](_0x57b9ea,_0x4d7979):_0x5bf9cf,_0x422b09;if(typeof Reflect==_0x1881c3(0x1b6)&&typeof Reflect[_0x1881c3(0x182)]==_0x1881c3(0x16f))_0x370309=Reflect[_0x1881c3(0x182)](_0x12c21d,_0x57b9ea,_0x4d7979,_0x5bf9cf);else{for(var _0x5717f6=_0x12c21d['length']-0x1;_0x5717f6>=0x0;_0x5717f6--)(_0x422b09=_0x12c21d[_0x5717f6])&&(_0x370309=(_0x16b04e<0x3?_0x422b09(_0x370309):_0x16b04e>0x3?_0x422b09(_0x57b9ea,_0x4d7979,_0x370309):_0x422b09(_0x57b9ea,_0x4d7979))||_0x370309);}return _0x16b04e>0x3&&_0x370309&&Object[_0x1881c3(0x1c3)](_0x57b9ea,_0x4d7979,_0x370309),_0x370309;}let O=class extends _0x234e26{constructor(_0x11b863,_0x5db8be,_0x20d06d,_0x4f1f18){const _0x1366b9=_0x337b22;super(),this[_0x1366b9(0x1cb)]=_0x11b863,this[_0x1366b9(0x1af)]=_0x5db8be,this[_0x1366b9(0x17c)]=_0x20d06d,this[_0x1366b9(0x1ab)]=_0x4f1f18,this[_0x1366b9(0x179)](),this['_initUserSync']();}[_0x337b22(0x1ae)](){const _0x33bb05=_0x337b22;this[_0x33bb05(0x1b7)](this[_0x33bb05(0x1af)]['commentUpdate$']['pipe'](_0x31d0b0(0x10))['subscribe'](_0x1433f9=>{const _0x2446a2=_0x33bb05;let _0x115b8c=new Set();_0x1433f9['forEach'](_0x44bc74=>{const _0x5f4e42=_0x204e;switch(_0x44bc74['type']){case _0x5f4e42(0x18a):{let _0x54fe48=_0x44bc74[_0x5f4e42(0x1a8)][_0x5f4e42(0x176)];_0x115b8c['add'](_0x54fe48);break;}default:break;}}),T(this[_0x2446a2(0x1ab)],_0x115b8c);}));}[_0x337b22(0x179)](){const _0x278ade=_0x337b22;this[_0x278ade(0x1b7)](this['_commentService'][_0x278ade(0x1a3)]['subscribe'](async _0x7a23ed=>{const _0xaf4011=_0x278ade;var _0x4d0834;let _0x3e2b1d=(_0x4d0834=this[_0xaf4011(0x1af)][_0xaf4011(0x174)](_0x7a23ed[_0xaf4011(0x193)])[_0xaf4011(0x1cd)](_0x1d1391=>_0x1d1391['threadId']===_0x7a23ed[_0xaf4011(0x1c0)]))==null?void 0x0:_0x4d0834[_0xaf4011(0x192)];if(!_0x3e2b1d)return;let {unitId:_0x4a9c1d,subUnitId:_0x31a8c0}=_0x3e2b1d;switch(_0x7a23ed[_0xaf4011(0x1cc)]&&this['_userService'][_0xaf4011(0x175)](_0x7a23ed[_0xaf4011(0x1cc)]),_0x7a23ed[_0xaf4011(0x1d2)]){case _0x1a35c6[_0xaf4011(0x183)]:break;case _0x1a35c6[_0xaf4011(0x171)]:var _0x334b4e,_0x26c1b8;this[_0xaf4011(0x1af)][_0xaf4011(0x1c1)](_0x4a9c1d,_0x31a8c0,{'unitId':_0x4a9c1d,'subUnitId':_0x31a8c0,'ref':'','id':_0x7a23ed['replyId'],'dT':w(+_0x7a23ed['createTimestamp']),'threadId':_0x7a23ed[_0xaf4011(0x1c0)],'personId':(_0x334b4e=(_0x26c1b8=_0x7a23ed[_0xaf4011(0x1cc)])==null?void 0x0:_0x26c1b8[_0xaf4011(0x189)])==null?_0x7a23ed[_0xaf4011(0x19c)]:_0x334b4e,'text':JSON[_0xaf4011(0x1d5)](_0x7a23ed['content']),'parentId':_0x3e2b1d['id']});break;case _0x1a35c6['Delete']:{let _0x3c3e51=this[_0xaf4011(0x1af)]['getComment'](_0x4a9c1d,_0x31a8c0,_0x7a23ed['replyId']);_0x3c3e51&&_0x3c3e51[_0xaf4011(0x188)]&&this[_0xaf4011(0x1af)]['deleteComment'](_0x4a9c1d,_0x31a8c0,_0x7a23ed[_0xaf4011(0x16e)]);break;}case _0x1a35c6[_0xaf4011(0x18d)]:this[_0xaf4011(0x1af)][_0xaf4011(0x170)](_0x4a9c1d,_0x31a8c0,{'commentId':_0x7a23ed[_0xaf4011(0x16e)],'text':JSON[_0xaf4011(0x1d5)](_0x7a23ed['content'])});break;case _0x1a35c6[_0xaf4011(0x195)]:{var _0x3d8335;let _0x49dd89=(_0x3d8335=this[_0xaf4011(0x1af)][_0xaf4011(0x174)](_0x7a23ed[_0xaf4011(0x193)])[_0xaf4011(0x1cd)](_0x340984=>_0x340984[_0xaf4011(0x1c0)]===_0x7a23ed['threadId']))==null?void 0x0:_0x3d8335[_0xaf4011(0x192)];_0x49dd89&&this[_0xaf4011(0x1af)][_0xaf4011(0x1ca)](_0x4a9c1d,_0x31a8c0,_0x49dd89['id'],_0x7a23ed[_0xaf4011(0x17a)]===_0x5c0ffc['Solved']);break;}default:break;}}));}};function _0x2011(){const _0x24ec85=['deleteComment','version','stringify','Solved','_config','get','body','content','threadId','addComment','thread-comment-data-source.config','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','saveCommentToSnapshot','rangeType','_configService','post','resolved','resolveComment','_commentService','user','find','169692FPpoiF','/add','comment','getCurrentUser','type','replies','values','parse','users','19182CUvsnq','replyId','function','updateComment','Reply','error','iterator','getUnit','addUser','personId','1.0.0-alpha.4','getMemberID','_init','solved','requireSession','_userService','2233gsMZRO','string','default','size','OpenOrReOpen','decorate','Add','length','filter','_threadCommentDataSourceService','907902oiVkgm','parentId','userID','add','_sessionService','forEach','Edit','listComments','delete','customRanges','_httpService','root','unitId','/reply','Solve','YYYY/MM/DD\x20HH:mm','format','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_initDataSource','onStarting','ref','userId','createTimestamp','rangeId','comments','map','packageName','20776810wCHDeG','commentUpdate$','278840rJurga','/solved','5GLedOE','prototype','payload','symbol','code','_injector','/delete','getUser','_initUserSync','_threadCommentModel','_threadCommentDataSource','1TwQKDm','1265360zpxQJB','/universer-api/comment/unit/','call','951410gTWDkR','object','disposeWithMe'];_0x2011=function(){return _0x24ec85;};return _0x2011();}O=D([E(0x0,_0x9fa166(_0x18a52a)),E(0x1,_0x9fa166(_0x182ed6)),E(0x2,_0x9fa166(_0x234cb1)),E(0x3,_0x9fa166(_0x3e71d6))],O);function k(_0x2ebdbe,_0x1bd8c5){const _0x2e4d66=_0x337b22;let _0x5e7111=_0x2ebdbe['replies'][0x0];return{..._0x1bd8c5,'id':_0x5e7111[_0x2e4d66(0x16e)],'resolved':_0x2ebdbe[_0x2e4d66(0x17a)]===0x1,'dT':w(_0x5e7111[_0x2e4d66(0x19d)]),'personId':_0x5e7111[_0x2e4d66(0x19c)],'threadId':_0x5e7111[_0x2e4d66(0x1c0)]};}function A(_0x166e17,_0x3b2adb,_0x8b9ba5){const _0xa77048=_0x337b22;var _0x400d0a,_0x5248ef;if(((_0x400d0a=_0x166e17==null||(_0x5248ef=_0x166e17[_0xa77048(0x1d3)])==null?void 0x0:_0x5248ef['length'])==null?0x0:_0x400d0a)>0x0){let _0x283459=(_0x414ce8,_0xfdf200)=>({'id':_0x414ce8[_0xa77048(0x16e)],'threadId':_0x414ce8['threadId'],'dT':w(_0x414ce8[_0xa77048(0x19d)]),'personId':_0x414ce8[_0xa77048(0x19c)],'resolved':_0x166e17[_0xa77048(0x17a)]===_0x5c0ffc['Solved'],'unitId':_0x3b2adb,'subUnitId':_0x8b9ba5,'text':JSON['parse'](_0x414ce8[_0xa77048(0x1bf)]),'parentId':_0xfdf200}),_0x235a9c=_0x283459(_0x166e17[_0xa77048(0x1d3)][0x0]);return{..._0x235a9c,'children':_0x166e17[_0xa77048(0x1d3)]['slice'](0x1)[_0xa77048(0x1a0)](_0x313a9e=>_0x283459(_0x313a9e,_0x235a9c['id']))};}return null;}let j=class{constructor(_0x3eb6fc,_0x4f427f,_0x569867){const _0x51f239=_0x337b22;this[_0x51f239(0x191)]=_0x3eb6fc,this['_userService']=_0x4f427f,this['_sessionService']=_0x569867;}async[_0x337b22(0x1c1)](_0x1c6e83){const _0x204d5a=_0x337b22;var _0x412b70,_0x179637;let {parentId:_0x417088,unitId:_0x1d8e29,text:_0x44010e,threadId:_0x5c346}=_0x1c6e83,_0x4c2be3=(_0x412b70=(_0x179637=_0x44010e[_0x204d5a(0x190)])==null?void 0x0:_0x179637[_0x204d5a(0x185)](_0x16802f=>_0x16802f[_0x204d5a(0x1c6)]===_0x1a7a7b['COMMENT'])[_0x204d5a(0x1a0)](_0x23dea2=>_0x23dea2[_0x204d5a(0x19e)]))==null?[]:_0x412b70,_0x296add=JSON[_0x204d5a(0x1ba)](_0x44010e),_0x346a6a=(await this['_sessionService'][_0x204d5a(0x17b)](_0x1d8e29))[_0x204d5a(0x178)]();if(_0x417088){let _0x1b1cf9={'memberId':_0x346a6a,'unitId':_0x1d8e29,'content':_0x296add,'mention':_0x4c2be3,'threadId':_0x5c346},_0x5ac7fb=(await this[_0x204d5a(0x191)][_0x204d5a(0x1c8)](_0x204d5a(0x1b3)+_0x1d8e29+_0x204d5a(0x194),{'body':_0x1b1cf9}))['body']['reply'];return{..._0x1c6e83,'id':_0x5ac7fb[_0x204d5a(0x16e)],'dT':_0x349d36(+_0x5ac7fb[_0x204d5a(0x19d)])['format'](_0x204d5a(0x196)),'personId':_0x5ac7fb[_0x204d5a(0x19c)]};}else{let _0x5d41a2={'memberId':_0x346a6a,'unitId':_0x1d8e29,'content':_0x296add,'mention':_0x4c2be3};return k((await this[_0x204d5a(0x191)][_0x204d5a(0x1c8)](_0x204d5a(0x1b3)+_0x1d8e29+_0x204d5a(0x1cf),{'body':_0x5d41a2}))[_0x204d5a(0x1be)][_0x204d5a(0x1d0)],_0x1c6e83);}}async[_0x337b22(0x170)](_0x3e295e){const _0x29c964=_0x337b22;var _0x1bfa13,_0x4807bc;let {text:_0x3fac96,unitId:_0x6464c6}=_0x3e295e,_0x228f50=(_0x1bfa13=(_0x4807bc=_0x3fac96[_0x29c964(0x190)])==null?void 0x0:_0x4807bc['filter'](_0x28481d=>_0x28481d['rangeType']===_0x1a7a7b['COMMENT'])[_0x29c964(0x1a0)](_0x5c9b96=>_0x5c9b96[_0x29c964(0x19e)]))==null?[]:_0x1bfa13,_0x5b4c2a=JSON[_0x29c964(0x1ba)](_0x3fac96),_0x37b98c=_0x3e295e['threadId'],_0x5dec20=_0x3e295e['id'],_0x1da400={'memberId':(await this[_0x29c964(0x18b)][_0x29c964(0x17b)](_0x6464c6))['getMemberID'](),'unitId':_0x6464c6,'threadId':_0x37b98c,'mention':_0x228f50,'content':_0x5b4c2a,'replyId':_0x5dec20},_0x4ebccd=await this[_0x29c964(0x191)][_0x29c964(0x1c8)](_0x29c964(0x1b3)+_0x6464c6+'/edit',{'body':_0x1da400});return!_0x4ebccd[_0x29c964(0x1be)][_0x29c964(0x172)]||_0x4ebccd[_0x29c964(0x1be)]['error'][_0x29c964(0x1aa)]===0x1;}async[_0x337b22(0x1ca)](_0x41ce17){const _0x31db66=_0x337b22;let {unitId:_0x5d9ce1}=_0x41ce17,_0x46de15=_0x41ce17[_0x31db66(0x1c0)],_0x4ac6be={'memberId':this[_0x31db66(0x17c)][_0x31db66(0x1d1)]()['userID'],'unitId':_0x5d9ce1,'threadId':_0x46de15,'solved':_0x41ce17[_0x31db66(0x1c9)]?_0x5c0ffc[_0x31db66(0x1bb)]:_0x5c0ffc[_0x31db66(0x181)]},_0x158403=await this[_0x31db66(0x191)][_0x31db66(0x1c8)](_0x31db66(0x1b3)+_0x5d9ce1+_0x31db66(0x1a5),{'body':_0x4ac6be});return!_0x158403['body'][_0x31db66(0x172)]||_0x158403[_0x31db66(0x1be)][_0x31db66(0x172)]['code']===0x1;}async[_0x337b22(0x1b8)](_0x2dd27d,_0x4af70c,_0x2be7fe,_0xc170ac){const _0x20cfc3=_0x337b22;let _0x322994={'memberId':(await this['_sessionService'][_0x20cfc3(0x17b)](_0x2dd27d))[_0x20cfc3(0x178)](),'threadId':_0x2be7fe,'replyId':_0xc170ac,'unitId':_0x2dd27d},_0xc3aa52=await this[_0x20cfc3(0x191)][_0x20cfc3(0x1c8)]('/universer-api/comment/unit/'+_0x2dd27d+_0x20cfc3(0x1ac),{'body':_0x322994});return!_0xc3aa52[_0x20cfc3(0x1be)][_0x20cfc3(0x172)]||_0xc3aa52[_0x20cfc3(0x1be)][_0x20cfc3(0x172)][_0x20cfc3(0x1aa)]===0x1;}async[_0x337b22(0x18e)](_0x2a374f,_0x36c8bc,_0x14db05){const _0x25fdf5=_0x337b22;let _0x5cfa6b={'unitId':_0x2a374f,'threadId':_0x14db05},_0x5b8d14=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2a374f+'/list',{'body':_0x5cfa6b}),_0x6e1196=_0x14db05[_0x25fdf5(0x1a0)](_0x7c66a9=>A(_0x5b8d14[_0x25fdf5(0x1be)][_0x25fdf5(0x19f)][_0x7c66a9],_0x2a374f,_0x36c8bc))['filter'](Boolean);return Object[_0x25fdf5(0x1d4)](_0x5b8d14[_0x25fdf5(0x1be)][_0x25fdf5(0x1d6)])[_0x25fdf5(0x18c)](_0x29eb4c=>{const _0x5c4e4b=_0x25fdf5;this[_0x5c4e4b(0x17c)][_0x5c4e4b(0x175)](_0x29eb4c);}),_0x6e1196;}[_0x337b22(0x1c5)](_0x6a229b){const _0x4a34d0=_0x337b22;return{'id':_0x6a229b['id'],'threadId':_0x6a229b[_0x4a34d0(0x1c0)],'ref':_0x6a229b[_0x4a34d0(0x19b)]};}};j=D([E(0x0,_0x9fa166(_0x4ac327)),E(0x1,_0x9fa166(_0x234cb1)),E(0x2,_0x9fa166(_0x3c01f3))],j);let M=class extends _0x234e26{constructor(_0x2cb13d,_0x2bdc97){const _0x35aaa1=_0x337b22;super(),this['_threadCommentDataSourceService']=_0x2cb13d,this[_0x35aaa1(0x1b0)]=_0x2bdc97,this[_0x35aaa1(0x199)]();}[_0x337b22(0x199)](){const _0x1af48b=_0x337b22;this[_0x1af48b(0x186)]['dataSource']=this[_0x1af48b(0x1b0)],this[_0x1af48b(0x186)]['syncUpdateMutationToColla']=!0x1;}};M=D([E(0x0,_0x4a3cb1),E(0x1,_0x9fa166(j))],M);function N(_0x232fe8){'@babel/helpers - typeof';const _0x21f844=_0x337b22;return N=typeof Symbol==_0x21f844(0x16f)&&typeof Symbol[_0x21f844(0x173)]==_0x21f844(0x1a9)?function(_0x5cc61c){return typeof _0x5cc61c;}:function(_0x522cba){const _0x34d53c=_0x21f844;return _0x522cba&&typeof Symbol=='function'&&_0x522cba['constructor']===Symbol&&_0x522cba!==Symbol[_0x34d53c(0x1a7)]?'symbol':typeof _0x522cba;},N(_0x232fe8);}function P(_0x49a001,_0xc7eb33){const _0x342684=_0x337b22;if(N(_0x49a001)!=_0x342684(0x1b6)||!_0x49a001)return _0x49a001;var _0x4a5b02=_0x49a001[Symbol['toPrimitive']];if(_0x4a5b02!==void 0x0){var _0x2079c6=_0x4a5b02[_0x342684(0x1b4)](_0x49a001,_0xc7eb33||_0x342684(0x17f));if(N(_0x2079c6)!=_0x342684(0x1b6))return _0x2079c6;throw TypeError(_0x342684(0x198));}return(_0xc7eb33===_0x342684(0x17e)?String:Number)(_0x49a001);}function F(_0x9e7abf){const _0xc5af5f=_0x337b22;var _0x55f9ec=P(_0x9e7abf,'string');return N(_0x55f9ec)==_0xc5af5f(0x1a9)?_0x55f9ec:_0x55f9ec+'';}function I(_0x4a7fb8,_0x47973e,_0x1432ad){return(_0x47973e=F(_0x47973e))in _0x4a7fb8?Object['defineProperty'](_0x4a7fb8,_0x47973e,{'value':_0x1432ad,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4a7fb8[_0x47973e]=_0x1432ad,_0x4a7fb8;}function _0x204e(_0x2768d4,_0x3ed871){_0x2768d4=_0x2768d4-0x16e;const _0x2011bf=_0x2011();let _0x204e4b=_0x2011bf[_0x2768d4];return _0x204e4b;}let L=class extends _0x22fef3{constructor(_0x2bb856=C,_0x3ebbd1,_0x3a29e6){const _0x2d5541=_0x337b22;super(),this[_0x2d5541(0x1bc)]=_0x2bb856,this[_0x2d5541(0x1ab)]=_0x3ebbd1,this[_0x2d5541(0x1c7)]=_0x3a29e6;let {..._0xca6ec9}=_0x320d37({},C,this[_0x2d5541(0x1bc)]);this['_configService']['setConfig'](_0x2d5541(0x1c2),_0xca6ec9);}[_0x337b22(0x19a)](){const _0x45ef2a=_0x337b22;[[j],[M],[O]][_0x45ef2a(0x18c)](_0xf55d3a=>{const _0x22f9f8=_0x45ef2a;this['_injector'][_0x22f9f8(0x18a)](_0xf55d3a);});}['onReady'](){const _0x50f67b=_0x337b22;this['_injector'][_0x50f67b(0x1bd)](M),this[_0x50f67b(0x1ab)]['get'](O);}};I(L,'pluginName',_0x337b22(0x1c4)),I(L,_0x337b22(0x1a1),x),I(L,_0x337b22(0x1b9),S),L=D([_0x14c661(_0x3e1137,_0x16d112,_0x44d633),E(0x1,_0x9fa166(_0x3e71d6)),E(0x2,_0x2c9871)],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 _0x198d(){const _0x3db04c=['10mJOHtu','threadId','_threadCommentDataSourceService','length','UniverProtocol','HTTPService','deleteComment','YYYY/MM/DD\x20HH:mm','comment','dataSource','replies','content','46504xiPQcV','toStringTag','defineProperty','setConfig','filter','CommentUpdateEventType','getUnit','prototype','_injector','solved','error','syncUpdateMutationToColla','amd','users','4WKUnZL','/universer-api/user/list','user','2085055qDFpIW','IThreadCommentDataSourceService','rangeId','_userService','1.0.0-alpha.4','getCurrentUser','object','forEach','listComments','call','UniverLicensePlugin','OpenOrReOpen','onReady','UniverCollaborationClientPlugin','ThreadCommentModel','addUser','get','function','parse','_threadCommentModel','disposeWithMe','_initDataSource','_threadCommentDataSource','1249824KpKyyY','size','IConfigService','personId','thread-comment-data-source.config','merge','UserManagerService','requireSession','exports','values','8770MvYoCZ','151629ihjKFl','stringify','resolved','Add','CommentSolvedStatus','_httpService','Delete','Inject','UniverThreadCommentUi','/list','/edit','Edit','_initUserSync','slice','UniverThreadCommentDataSourcePlugin','bufferTime','getOwnPropertyDescriptor','1451712ySGZUm','constructor','dateKit','@univerjs/protocol','userID','pipe','Solved','/reply','UniverProThreadCommentDatasource','format','root','ref','rangeType','getUser','map','unitId','iterator','UniverNetwork','customRanges','_commentService','336754DpccxB','@univerjs-pro/thread-comment-datasource','find','/universer-api/comment/unit/','_config','symbol','_configService','commentUpdate$','parentId','Module','UniverThreadCommentUIPlugin','_sessionService','string','decorate','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','rxjs','CollaborationSessionService','userId','@univerjs-pro/license','3033lTxIre','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','addComment','CustomRangeType','onStarting','comments','delete','UniverProLicense','Injector','default','updateComment','COMMENT','toPrimitive','resolveComment','post','replyId','@univerjs/core','_init','getMemberID','code','type','createTimestamp','Disposable','Solve','UniverProCollaborationClient','/delete','body'];_0x198d=function(){return _0x3db04c;};return _0x198d();}function _0x36b1(_0x9669ff,_0x26b6a4){_0x9669ff=_0x9669ff-0x1e3;const _0x198d4b=_0x198d();let _0x36b1c1=_0x198d4b[_0x9669ff];return _0x36b1c1;}(function(_0x340be9,_0x275387){const _0x5006ae=_0x36b1,_0x201e22=_0x340be9();while(!![]){try{const _0x5e0fa1=-parseInt(_0x5006ae(0x21d))/0x1+parseInt(_0x5006ae(0x266))/0x2*(parseInt(_0x5006ae(0x1f8))/0x3)+-parseInt(_0x5006ae(0x258))/0x4*(-parseInt(_0x5006ae(0x24c))/0x5)+parseInt(_0x5006ae(0x1ed))/0x6+parseInt(_0x5006ae(0x269))/0x7+parseInt(_0x5006ae(0x209))/0x8+parseInt(_0x5006ae(0x231))/0x9*(-parseInt(_0x5006ae(0x1f7))/0xa);if(_0x5e0fa1===_0x275387)break;else _0x201e22['push'](_0x201e22['shift']());}catch(_0x3a8c4f){_0x201e22['push'](_0x201e22['shift']());}}}(_0x198d,0x2bdd4),function(_0x43c64a,_0x15a015){const _0x5217e8=_0x36b1;typeof exports==_0x5217e8(0x26f)&&typeof module<'u'?_0x15a015(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==_0x5217e8(0x1e7)&&define[_0x5217e8(0x264)]?define([_0x5217e8(0x1f5),'@univerjs-pro/collaboration-client',_0x5217e8(0x230),_0x5217e8(0x241),'@univerjs/thread-comment-ui',_0x5217e8(0x20c),'@univerjs/thread-comment',_0x5217e8(0x22d),'@univerjs/network'],_0x15a015):(_0x43c64a=typeof globalThis<'u'?globalThis:_0x43c64a||self,_0x15a015(_0x43c64a[_0x5217e8(0x211)]={},_0x43c64a[_0x5217e8(0x249)],_0x43c64a[_0x5217e8(0x238)],_0x43c64a['UniverCore'],_0x43c64a[_0x5217e8(0x200)],_0x43c64a[_0x5217e8(0x250)],_0x43c64a['UniverThreadComment'],_0x43c64a['rxjs'],_0x43c64a[_0x5217e8(0x21a)]));}(this,function(_0x3186dc,_0xdbb5ff,_0x3d6b4e,_0x1cdf0c,_0x24cfc2,_0x5e6827,_0x40c5e0,_0x2bc959,_0x2692f5){const _0x22e124=_0x36b1;Object[_0x22e124(0x25a)](_0x3186dc,Symbol[_0x22e124(0x259)],{'value':_0x22e124(0x226)});var _0x1cf95a=_0x22e124(0x21e),_0x1c7a85=_0x22e124(0x26d);let _0x52f318={},_0x394be0=_0x1d430f=>(0x0,_0x1cdf0c[_0x22e124(0x20b)])(new Date(+_0x1d430f))['format'](_0x22e124(0x253)),_0x4b7b10=async(_0x2cd1b8,_0x5ae4fc)=>{const _0x345bc4=_0x22e124;let _0x1405fb=_0x2cd1b8['get'](_0x1cdf0c[_0x345bc4(0x1f3)]),_0x5eb36d=_0x2cd1b8['get'](_0x2692f5[_0x345bc4(0x251)]);_0x5ae4fc[_0x345bc4(0x270)](_0xa8d0c5=>{const _0xead327=_0x345bc4;_0x1405fb[_0xead327(0x216)](_0xa8d0c5)&&_0x5ae4fc[_0xead327(0x237)](_0xa8d0c5);}),_0x5ae4fc[_0x345bc4(0x1ee)]&&(await _0x5eb36d[_0x345bc4(0x1e6)](_0x345bc4(0x267),{'params':{'userIDs':[..._0x5ae4fc]}}))[_0x345bc4(0x24b)][_0x345bc4(0x265)]['forEach'](_0x45fbe2=>{const _0x55eb91=_0x345bc4;_0x45fbe2&&_0x1405fb[_0x55eb91(0x1e5)](_0x45fbe2);});};function _0x1e0488(_0x5844c5,_0x387de2){return function(_0x409a85,_0x5c4bc1){_0x387de2(_0x409a85,_0x5c4bc1,_0x5844c5);};}function _0xdbd7cf(_0x80dcfb,_0xe95962,_0x183473,_0x2540d8){const _0xca8f59=_0x22e124;var _0x3b6190=arguments[_0xca8f59(0x24f)],_0x3f8284=_0x3b6190<0x3?_0xe95962:_0x2540d8===null?_0x2540d8=Object[_0xca8f59(0x208)](_0xe95962,_0x183473):_0x2540d8,_0x374ea9;if(typeof Reflect==_0xca8f59(0x26f)&&typeof Reflect[_0xca8f59(0x22a)]=='function')_0x3f8284=Reflect['decorate'](_0x80dcfb,_0xe95962,_0x183473,_0x2540d8);else{for(var _0x110a6d=_0x80dcfb[_0xca8f59(0x24f)]-0x1;_0x110a6d>=0x0;_0x110a6d--)(_0x374ea9=_0x80dcfb[_0x110a6d])&&(_0x3f8284=(_0x3b6190<0x3?_0x374ea9(_0x3f8284):_0x3b6190>0x3?_0x374ea9(_0xe95962,_0x183473,_0x3f8284):_0x374ea9(_0xe95962,_0x183473))||_0x3f8284);}return _0x3b6190>0x3&&_0x3f8284&&Object[_0xca8f59(0x25a)](_0xe95962,_0x183473,_0x3f8284),_0x3f8284;}let _0x4afa20=class extends _0x1cdf0c['Disposable']{constructor(_0x558f4b,_0x5a1fee,_0x23b6f5,_0x3d9d5d){const _0x394b25=_0x22e124;super(),this[_0x394b25(0x21c)]=_0x558f4b,this[_0x394b25(0x1e9)]=_0x5a1fee,this[_0x394b25(0x26c)]=_0x23b6f5,this[_0x394b25(0x260)]=_0x3d9d5d,this[_0x394b25(0x242)](),this[_0x394b25(0x204)]();}[_0x22e124(0x204)](){const _0x190cdd=_0x22e124;this[_0x190cdd(0x1ea)](this[_0x190cdd(0x1e9)]['commentUpdate$'][_0x190cdd(0x20e)]((0x0,_0x2bc959[_0x190cdd(0x207)])(0x10))['subscribe'](_0x313ccd=>{const _0x15dffd=_0x190cdd;let _0x283667=new Set();_0x313ccd[_0x15dffd(0x270)](_0x186282=>{const _0x3ca1c2=_0x15dffd;switch(_0x186282[_0x3ca1c2(0x245)]){case _0x3ca1c2(0x22c):{let _0x202ede=_0x186282['payload'][_0x3ca1c2(0x1f0)];_0x283667[_0x3ca1c2(0x22c)](_0x202ede);break;}default:break;}}),_0x4b7b10(this['_injector'],_0x283667);}));}['_init'](){const _0x555a58=_0x22e124;this[_0x555a58(0x1ea)](this['_commentService'][_0x555a58(0x224)]['subscribe'](async _0x512959=>{const _0x43aa53=_0x555a58;var _0x48abf8;let _0x5a6c14=(_0x48abf8=this[_0x43aa53(0x1e9)][_0x43aa53(0x25e)](_0x512959[_0x43aa53(0x218)])[_0x43aa53(0x21f)](_0x5dd199=>_0x5dd199[_0x43aa53(0x24d)]===_0x512959[_0x43aa53(0x24d)]))==null?void 0x0:_0x48abf8[_0x43aa53(0x213)];if(!_0x5a6c14)return;let {unitId:_0x95f43f,subUnitId:_0x133c9d}=_0x5a6c14;switch(_0x512959[_0x43aa53(0x268)]&&this[_0x43aa53(0x26c)][_0x43aa53(0x1e5)](_0x512959['user']),_0x512959[_0x43aa53(0x245)]){case _0x5e6827['CommentUpdateEventType'][_0x43aa53(0x1fb)]:break;case _0x5e6827['CommentUpdateEventType']['Reply']:var _0x5d1cbc,_0x136ee5;this['_threadCommentModel'][_0x43aa53(0x233)](_0x95f43f,_0x133c9d,{'unitId':_0x95f43f,'subUnitId':_0x133c9d,'ref':'','id':_0x512959[_0x43aa53(0x240)],'dT':_0x394be0(+_0x512959[_0x43aa53(0x246)]),'threadId':_0x512959[_0x43aa53(0x24d)],'personId':(_0x5d1cbc=(_0x136ee5=_0x512959[_0x43aa53(0x268)])==null?void 0x0:_0x136ee5[_0x43aa53(0x20d)])==null?_0x512959[_0x43aa53(0x22f)]:_0x5d1cbc,'text':JSON[_0x43aa53(0x1e8)](_0x512959[_0x43aa53(0x257)]),'parentId':_0x5a6c14['id']});break;case _0x5e6827[_0x43aa53(0x25d)][_0x43aa53(0x1fe)]:{let _0x48706b=this['_threadCommentModel']['getComment'](_0x95f43f,_0x133c9d,_0x512959[_0x43aa53(0x240)]);_0x48706b&&_0x48706b[_0x43aa53(0x225)]&&this[_0x43aa53(0x1e9)][_0x43aa53(0x252)](_0x95f43f,_0x133c9d,_0x512959[_0x43aa53(0x240)]);break;}case _0x5e6827['CommentUpdateEventType'][_0x43aa53(0x203)]:this[_0x43aa53(0x1e9)]['updateComment'](_0x95f43f,_0x133c9d,{'commentId':_0x512959['replyId'],'text':JSON[_0x43aa53(0x1e8)](_0x512959[_0x43aa53(0x257)])});break;case _0x5e6827['CommentUpdateEventType'][_0x43aa53(0x248)]:{var _0x1736ec;let _0x21e170=(_0x1736ec=this[_0x43aa53(0x1e9)][_0x43aa53(0x25e)](_0x512959[_0x43aa53(0x218)])[_0x43aa53(0x21f)](_0x409b7c=>_0x409b7c['threadId']===_0x512959['threadId']))==null?void 0x0:_0x1736ec['root'];_0x21e170&&this[_0x43aa53(0x1e9)][_0x43aa53(0x23e)](_0x95f43f,_0x133c9d,_0x21e170['id'],_0x512959[_0x43aa53(0x261)]===_0x5e6827[_0x43aa53(0x1fc)][_0x43aa53(0x20f)]);break;}default:break;}}));}};_0x4afa20=_0xdbd7cf([_0x1e0488(0x0,(0x0,_0x1cdf0c['Inject'])(_0xdbb5ff['CommentService'])),_0x1e0488(0x1,(0x0,_0x1cdf0c[_0x22e124(0x1ff)])(_0x40c5e0[_0x22e124(0x1e4)])),_0x1e0488(0x2,(0x0,_0x1cdf0c['Inject'])(_0x1cdf0c[_0x22e124(0x1f3)])),_0x1e0488(0x3,(0x0,_0x1cdf0c['Inject'])(_0x1cdf0c[_0x22e124(0x239)]))],_0x4afa20);function _0x529b9f(_0x4e34e4,_0xb06dd3){const _0x4c2cdc=_0x22e124;let _0xe2fc3e=_0x4e34e4[_0x4c2cdc(0x256)][0x0];return{..._0xb06dd3,'id':_0xe2fc3e['replyId'],'resolved':_0x4e34e4['solved']===0x1,'dT':_0x394be0(_0xe2fc3e[_0x4c2cdc(0x246)]),'personId':_0xe2fc3e[_0x4c2cdc(0x22f)],'threadId':_0xe2fc3e[_0x4c2cdc(0x24d)]};}function _0x7f509c(_0x20e31c,_0x59bc7f,_0x3f81e8){const _0x274b94=_0x22e124;var _0x389548,_0x462c02;if(((_0x389548=_0x20e31c==null||(_0x462c02=_0x20e31c[_0x274b94(0x256)])==null?void 0x0:_0x462c02[_0x274b94(0x24f)])==null?0x0:_0x389548)>0x0){let _0x3b69a6=(_0x4afdae,_0x56532e)=>({'id':_0x4afdae['replyId'],'threadId':_0x4afdae[_0x274b94(0x24d)],'dT':_0x394be0(_0x4afdae[_0x274b94(0x246)]),'personId':_0x4afdae['userId'],'resolved':_0x20e31c[_0x274b94(0x261)]===_0x5e6827[_0x274b94(0x1fc)]['Solved'],'unitId':_0x59bc7f,'subUnitId':_0x3f81e8,'text':JSON['parse'](_0x4afdae[_0x274b94(0x257)]),'parentId':_0x56532e}),_0x557ffd=_0x3b69a6(_0x20e31c[_0x274b94(0x256)][0x0]);return{..._0x557ffd,'children':_0x20e31c[_0x274b94(0x256)][_0x274b94(0x205)](0x1)[_0x274b94(0x217)](_0x42699b=>_0x3b69a6(_0x42699b,_0x557ffd['id']))};}return null;}let _0x29b38e=class{constructor(_0x5a8024,_0x18eb35,_0xc9277){const _0x445ea5=_0x22e124;this[_0x445ea5(0x1fd)]=_0x5a8024,this['_userService']=_0x18eb35,this[_0x445ea5(0x228)]=_0xc9277;}async[_0x22e124(0x233)](_0xb2b2c0){const _0x20f0e1=_0x22e124;var _0xa0d685,_0x4e71b8;let {parentId:_0x5e3824,unitId:_0x530fb0,text:_0x1b3c68,threadId:_0x55cc2e}=_0xb2b2c0,_0x13755c=(_0xa0d685=(_0x4e71b8=_0x1b3c68[_0x20f0e1(0x21b)])==null?void 0x0:_0x4e71b8[_0x20f0e1(0x25c)](_0x30e530=>_0x30e530[_0x20f0e1(0x215)]===_0x1cdf0c[_0x20f0e1(0x234)][_0x20f0e1(0x23c)])['map'](_0x2f5e0b=>_0x2f5e0b[_0x20f0e1(0x26b)]))==null?[]:_0xa0d685,_0x2535b1=JSON[_0x20f0e1(0x1f9)](_0x1b3c68),_0x1ae8dc=(await this[_0x20f0e1(0x228)][_0x20f0e1(0x1f4)](_0x530fb0))[_0x20f0e1(0x243)]();if(_0x5e3824){let _0x17e952={'memberId':_0x1ae8dc,'unitId':_0x530fb0,'content':_0x2535b1,'mention':_0x13755c,'threadId':_0x55cc2e},_0x415ead=(await this['_httpService'][_0x20f0e1(0x23f)](_0x20f0e1(0x220)+_0x530fb0+_0x20f0e1(0x210),{'body':_0x17e952}))[_0x20f0e1(0x24b)]['reply'];return{..._0xb2b2c0,'id':_0x415ead[_0x20f0e1(0x240)],'dT':(0x0,_0x1cdf0c[_0x20f0e1(0x20b)])(+_0x415ead[_0x20f0e1(0x246)])[_0x20f0e1(0x212)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x415ead[_0x20f0e1(0x22f)]};}else{let _0x3cc556={'memberId':_0x1ae8dc,'unitId':_0x530fb0,'content':_0x2535b1,'mention':_0x13755c};return _0x529b9f((await this[_0x20f0e1(0x1fd)]['post'](_0x20f0e1(0x220)+_0x530fb0+'/add',{'body':_0x3cc556}))[_0x20f0e1(0x24b)][_0x20f0e1(0x254)],_0xb2b2c0);}}async[_0x22e124(0x23b)](_0x5ec23b){const _0x13539f=_0x22e124;var _0x5b6061,_0x2d8703;let {text:_0x1d3117,unitId:_0x1ea5ad}=_0x5ec23b,_0x42603a=(_0x5b6061=(_0x2d8703=_0x1d3117[_0x13539f(0x21b)])==null?void 0x0:_0x2d8703[_0x13539f(0x25c)](_0x403408=>_0x403408[_0x13539f(0x215)]===_0x1cdf0c[_0x13539f(0x234)][_0x13539f(0x23c)])[_0x13539f(0x217)](_0x13eefd=>_0x13eefd[_0x13539f(0x26b)]))==null?[]:_0x5b6061,_0x11e50c=JSON[_0x13539f(0x1f9)](_0x1d3117),_0x41d1a2=_0x5ec23b[_0x13539f(0x24d)],_0x39206e=_0x5ec23b['id'],_0x19fb90={'memberId':(await this[_0x13539f(0x228)][_0x13539f(0x1f4)](_0x1ea5ad))['getMemberID'](),'unitId':_0x1ea5ad,'threadId':_0x41d1a2,'mention':_0x42603a,'content':_0x11e50c,'replyId':_0x39206e},_0x55ec83=await this['_httpService']['post'](_0x13539f(0x220)+_0x1ea5ad+_0x13539f(0x202),{'body':_0x19fb90});return!_0x55ec83[_0x13539f(0x24b)]['error']||_0x55ec83[_0x13539f(0x24b)]['error']['code']===0x1;}async[_0x22e124(0x23e)](_0x53cb20){const _0x4395a1=_0x22e124;let {unitId:_0x1c4b73}=_0x53cb20,_0x1128ef=_0x53cb20[_0x4395a1(0x24d)],_0x5514f8={'memberId':this['_userService'][_0x4395a1(0x26e)]()[_0x4395a1(0x20d)],'unitId':_0x1c4b73,'threadId':_0x1128ef,'solved':_0x53cb20[_0x4395a1(0x1fa)]?_0x5e6827['CommentSolvedStatus'][_0x4395a1(0x20f)]:_0x5e6827['CommentSolvedStatus'][_0x4395a1(0x274)]},_0x346eaa=await this[_0x4395a1(0x1fd)][_0x4395a1(0x23f)](_0x4395a1(0x220)+_0x1c4b73+'/solved',{'body':_0x5514f8});return!_0x346eaa[_0x4395a1(0x24b)][_0x4395a1(0x262)]||_0x346eaa[_0x4395a1(0x24b)][_0x4395a1(0x262)][_0x4395a1(0x244)]===0x1;}async[_0x22e124(0x252)](_0x2dfc5d,_0x53a23d,_0x46e9f3,_0x327ea9){const _0x2e963f=_0x22e124;let _0x59f886={'memberId':(await this['_sessionService'][_0x2e963f(0x1f4)](_0x2dfc5d))['getMemberID'](),'threadId':_0x46e9f3,'replyId':_0x327ea9,'unitId':_0x2dfc5d},_0x31eee2=await this[_0x2e963f(0x1fd)][_0x2e963f(0x23f)](_0x2e963f(0x220)+_0x2dfc5d+_0x2e963f(0x24a),{'body':_0x59f886});return!_0x31eee2[_0x2e963f(0x24b)][_0x2e963f(0x262)]||_0x31eee2[_0x2e963f(0x24b)][_0x2e963f(0x262)][_0x2e963f(0x244)]===0x1;}async[_0x22e124(0x271)](_0x45f36b,_0x142f3c,_0x253d7b){const _0x490e31=_0x22e124;let _0x318cea={'unitId':_0x45f36b,'threadId':_0x253d7b},_0x180500=await this['_httpService'][_0x490e31(0x23f)](_0x490e31(0x220)+_0x45f36b+_0x490e31(0x201),{'body':_0x318cea}),_0xb6d0ca=_0x253d7b[_0x490e31(0x217)](_0x4a4183=>_0x7f509c(_0x180500[_0x490e31(0x24b)][_0x490e31(0x236)][_0x4a4183],_0x45f36b,_0x142f3c))['filter'](Boolean);return Object[_0x490e31(0x1f6)](_0x180500[_0x490e31(0x24b)]['users'])[_0x490e31(0x270)](_0x3052af=>{const _0x588969=_0x490e31;this['_userService'][_0x588969(0x1e5)](_0x3052af);}),_0xb6d0ca;}['saveCommentToSnapshot'](_0x48aeec){const _0x34ab2e=_0x22e124;return{'id':_0x48aeec['id'],'threadId':_0x48aeec[_0x34ab2e(0x24d)],'ref':_0x48aeec[_0x34ab2e(0x214)]};}};_0x29b38e=_0xdbd7cf([_0x1e0488(0x0,(0x0,_0x1cdf0c[_0x22e124(0x1ff)])(_0x2692f5['HTTPService'])),_0x1e0488(0x1,(0x0,_0x1cdf0c[_0x22e124(0x1ff)])(_0x1cdf0c[_0x22e124(0x1f3)])),_0x1e0488(0x2,(0x0,_0x1cdf0c[_0x22e124(0x1ff)])(_0xdbb5ff[_0x22e124(0x22e)]))],_0x29b38e);let _0x9f37=class extends _0x1cdf0c[_0x22e124(0x247)]{constructor(_0x4e5362,_0x508f8e){const _0x1fdc1b=_0x22e124;super(),this[_0x1fdc1b(0x24e)]=_0x4e5362,this[_0x1fdc1b(0x1ec)]=_0x508f8e,this[_0x1fdc1b(0x1eb)]();}[_0x22e124(0x1eb)](){const _0xb012ff=_0x22e124;this[_0xb012ff(0x24e)][_0xb012ff(0x255)]=this[_0xb012ff(0x1ec)],this[_0xb012ff(0x24e)][_0xb012ff(0x263)]=!0x1;}};_0x9f37=_0xdbd7cf([_0x1e0488(0x0,_0x40c5e0[_0x22e124(0x26a)]),_0x1e0488(0x1,(0x0,_0x1cdf0c[_0x22e124(0x1ff)])(_0x29b38e))],_0x9f37);function _0x51d2ec(_0x20b354){'@babel/helpers - typeof';const _0x11b15f=_0x22e124;return _0x51d2ec=typeof Symbol==_0x11b15f(0x1e7)&&typeof Symbol[_0x11b15f(0x219)]==_0x11b15f(0x222)?function(_0x55fed9){return typeof _0x55fed9;}:function(_0x4a8de1){const _0x14c005=_0x11b15f;return _0x4a8de1&&typeof Symbol==_0x14c005(0x1e7)&&_0x4a8de1[_0x14c005(0x20a)]===Symbol&&_0x4a8de1!==Symbol[_0x14c005(0x25f)]?_0x14c005(0x222):typeof _0x4a8de1;},_0x51d2ec(_0x20b354);}function _0x287222(_0xa9a64b,_0x37185f){const _0x7e4e58=_0x22e124;if(_0x51d2ec(_0xa9a64b)!='object'||!_0xa9a64b)return _0xa9a64b;var _0x20fcbd=_0xa9a64b[Symbol[_0x7e4e58(0x23d)]];if(_0x20fcbd!==void 0x0){var _0xacbba=_0x20fcbd[_0x7e4e58(0x272)](_0xa9a64b,_0x37185f||_0x7e4e58(0x23a));if(_0x51d2ec(_0xacbba)!=_0x7e4e58(0x26f))return _0xacbba;throw TypeError(_0x7e4e58(0x232));}return(_0x37185f===_0x7e4e58(0x229)?String:Number)(_0xa9a64b);}function _0x158679(_0xb79d49){const _0xc03051=_0x22e124;var _0x3c1511=_0x287222(_0xb79d49,'string');return _0x51d2ec(_0x3c1511)==_0xc03051(0x222)?_0x3c1511:_0x3c1511+'';}function _0x30721f(_0x1285ba,_0x2d4c1f,_0x331709){return(_0x2d4c1f=_0x158679(_0x2d4c1f))in _0x1285ba?Object['defineProperty'](_0x1285ba,_0x2d4c1f,{'value':_0x331709,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1285ba[_0x2d4c1f]=_0x331709,_0x1285ba;}let _0x1deaf6=class extends _0x1cdf0c['Plugin']{constructor(_0x742e8d=_0x52f318,_0x292b08,_0x29fa4c){const _0x3f234e=_0x22e124;super(),this[_0x3f234e(0x221)]=_0x742e8d,this[_0x3f234e(0x260)]=_0x292b08,this[_0x3f234e(0x223)]=_0x29fa4c;let {..._0xa86f00}=(0x0,_0x1cdf0c[_0x3f234e(0x1f2)])({},_0x52f318,this['_config']);this[_0x3f234e(0x223)][_0x3f234e(0x25b)](_0x3f234e(0x1f1),_0xa86f00);}[_0x22e124(0x235)](){const _0x6a29ee=_0x22e124;[[_0x29b38e],[_0x9f37],[_0x4afa20]][_0x6a29ee(0x270)](_0x5adc2d=>{const _0x58c3bb=_0x6a29ee;this[_0x58c3bb(0x260)][_0x58c3bb(0x22c)](_0x5adc2d);});}[_0x22e124(0x275)](){const _0x5af946=_0x22e124;this[_0x5af946(0x260)]['get'](_0x9f37),this['_injector'][_0x5af946(0x1e6)](_0x4afa20);}};_0x30721f(_0x1deaf6,'pluginName',_0x22e124(0x22b)),_0x30721f(_0x1deaf6,'packageName',_0x1cf95a),_0x30721f(_0x1deaf6,'version',_0x1c7a85),_0x1deaf6=_0xdbd7cf([(0x0,_0x1cdf0c['DependentOn'])(_0x24cfc2[_0x22e124(0x227)],_0xdbb5ff[_0x22e124(0x1e3)],_0x3d6b4e[_0x22e124(0x273)]),_0x1e0488(0x1,(0x0,_0x1cdf0c[_0x22e124(0x1ff)])(_0x1cdf0c[_0x22e124(0x239)])),_0x1e0488(0x2,_0x1cdf0c[_0x22e124(0x1ef)])],_0x1deaf6),Object['defineProperty'](_0x3186dc,_0x22e124(0x206),{'enumerable':!0x0,'get':function(){return _0x1deaf6;}});}));
|
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
|
+
"version": "1.0.0-alpha.4",
|
|
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.
|
|
55
|
-
"@univerjs/
|
|
56
|
-
"@univerjs/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/thread-comment": "1.0.0-alpha.
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs
|
|
54
|
+
"@univerjs-pro/collaboration-client": "1.0.0-alpha.4",
|
|
55
|
+
"@univerjs-pro/license": "1.0.0-alpha.4",
|
|
56
|
+
"@univerjs/network": "1.0.0-alpha.4",
|
|
57
|
+
"@univerjs/protocol": "1.0.0-alpha.4",
|
|
58
|
+
"@univerjs/thread-comment": "1.0.0-alpha.4",
|
|
59
|
+
"@univerjs/thread-comment-ui": "1.0.0-alpha.4",
|
|
60
|
+
"@univerjs/core": "1.0.0-alpha.4"
|
|
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.
|
|
66
|
+
"@univerjs-infra/shared": "1.0.0-alpha.4"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"test": "vitest run",
|