@univerjs-pro/thread-comment-datasource 1.0.0-alpha.1 → 1.0.0-alpha.3
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/README.md +3 -3
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# @univerjs-pro/thread-comment-datasource
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.com/package/@univerjs-pro/thread-comment-datasource)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/thread-comment-datasource)
|
|
4
5
|
[](https://npmjs.com/package/@univerjs-pro/thread-comment-datasource)
|
|
5
6
|
|
|
6
|
-
`@univerjs-pro/thread-comment-datasource`
|
|
7
|
+
`@univerjs-pro/thread-comment-datasource` is part of Univer Pro. Remote data source integration for Univer thread comments.
|
|
7
8
|
|
|
8
9
|
## Package Overview
|
|
9
10
|
|
|
@@ -31,10 +32,9 @@ univer.registerPlugin(UniverThreadCommentDataSourcePlugin);
|
|
|
31
32
|
|
|
32
33
|
## Integration Notes
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
- Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
|
|
35
36
|
|
|
36
37
|
## Resources
|
|
37
38
|
|
|
38
39
|
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
39
40
|
- [NPM package](https://npmjs.com/package/@univerjs-pro/thread-comment-datasource)
|
|
40
|
-
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1e471b=_0x4310;function _0x1e8f(){const _0x29d2ff=['add','536qpmEjc','filter','_initUserSync','createTimestamp','52lpyEPQ','personId','COMMENT','function','UserManagerService','resolveComment','get','slice','string','comments','pipe','_httpService','toStringTag','CommentUpdateEventType','pluginName','size','15OdWAWP','saveCommentToSnapshot','5961680HDdUxr','375935AMGOtb','_commentService','payload','IConfigService','getComment','symbol','/universer-api/comment/unit/','threadId','replies','23191BVAiFZ','type','length','defineProperty','merge','_sessionService','constructor','requireSession','ThreadCommentModel','Solve','decorate','forEach','replyId','version','userId','_config','1626957YanHGz','37338GcOKAj','CommentSolvedStatus','syncUpdateMutationToColla','UniverThreadCommentDataSourcePlugin','root','_init','HTTPService','dataSource','Plugin','stringify','onStarting','_threadCommentModel','addComment','IThreadCommentDataSourceService','6483YwLuIT','reply','body','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UniverCollaborationClientPlugin','listComments','DependentOn','unitId','dateKit','/edit','customRanges','_threadCommentDataSource','addUser','deleteComment','code','Disposable','parentId','content','CollaborationSessionService','/delete','/list','error','updateComment','Injector','find','getCurrentUser','Module','toPrimitive','call','OpenOrReOpen','_injector','getMemberID','980244KSgwnR','post','UniverThreadCommentUIPlugin','user','/solved','Inject','getUnit','default','format','users','solved','_configService','_initDataSource','1.0.0-alpha.1','setConfig','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','userID','Edit','ref','onReady','map','object','Solved','_userService','rangeType','parse','commentUpdate$','disposeWithMe','CustomRangeType'];_0x1e8f=function(){return _0x29d2ff;};return _0x1e8f();}(function(_0x36a7fa,_0x3b5f25){const _0x471af3=_0x4310,_0x1758ba=_0x36a7fa();while(!![]){try{const _0x4dbfae=-parseInt(_0x471af3(0x11a))/0x1+parseInt(_0x471af3(0x134))/0x2+parseInt(_0x471af3(0x142))/0x3*(parseInt(_0x471af3(0x107))/0x4)+-parseInt(_0x471af3(0x117))/0x5*(-parseInt(_0x471af3(0xe4))/0x6)+-parseInt(_0x471af3(0x123))/0x7*(parseInt(_0x471af3(0x103))/0x8)+-parseInt(_0x471af3(0x133))/0x9+parseInt(_0x471af3(0x119))/0xa;if(_0x4dbfae===_0x3b5f25)break;else _0x1758ba['push'](_0x1758ba['shift']());}catch(_0x183556){_0x1758ba['push'](_0x1758ba['shift']());}}}(_0x1e8f,0x56845),Object[_0x1e471b(0x126)](exports,Symbol[_0x1e471b(0x113)],{'value':_0x1e471b(0xde)}));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 _0x4310(_0x146c74,_0x115503){_0x146c74=_0x146c74-0xc8;const _0x1e8fc8=_0x1e8f();let _0x43109b=_0x1e8fc8[_0x146c74];return _0x43109b;}var c='@univerjs-pro/thread-comment-datasource',l=_0x1e471b(0xf1);const u=_0x177f2b=>(0x0,n[_0x1e471b(0xcc)])(new Date(+_0x177f2b))[_0x1e471b(0xec)](_0x1e471b(0xf3)),d=async(_0x3a4f52,_0x522637)=>{const _0x2c9838=_0x1e471b;let _0x4c4fde=_0x3a4f52[_0x2c9838(0x10d)](n['UserManagerService']),_0x5d80b3=_0x3a4f52[_0x2c9838(0x10d)](s[_0x2c9838(0x13a)]);_0x522637[_0x2c9838(0x12e)](_0xa03cd4=>{_0x4c4fde['getUser'](_0xa03cd4)&&_0x522637['delete'](_0xa03cd4);}),_0x522637[_0x2c9838(0x116)]&&(await _0x5d80b3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x522637]}}))['body'][_0x2c9838(0xed)]['forEach'](_0x2e3021=>{const _0x7bc311=_0x2c9838;_0x2e3021&&_0x4c4fde[_0x7bc311(0xd0)](_0x2e3021);});};function f(_0x4a2e0a,_0x13589e){return function(_0x48419c,_0x5a883d){_0x13589e(_0x48419c,_0x5a883d,_0x4a2e0a);};}function p(_0x3c07d3,_0x3913bf,_0x5d901f,_0x3e1eac){const _0xa4d4e7=_0x1e471b;var _0x3d794a=arguments['length'],_0x49e39b=_0x3d794a<0x3?_0x3913bf:_0x3e1eac===null?_0x3e1eac=Object['getOwnPropertyDescriptor'](_0x3913bf,_0x5d901f):_0x3e1eac,_0x38084d;if(typeof Reflect==_0xa4d4e7(0xfa)&&typeof Reflect[_0xa4d4e7(0x12d)]==_0xa4d4e7(0x10a))_0x49e39b=Reflect[_0xa4d4e7(0x12d)](_0x3c07d3,_0x3913bf,_0x5d901f,_0x3e1eac);else{for(var _0x5bd8fb=_0x3c07d3[_0xa4d4e7(0x125)]-0x1;_0x5bd8fb>=0x0;_0x5bd8fb--)(_0x38084d=_0x3c07d3[_0x5bd8fb])&&(_0x49e39b=(_0x3d794a<0x3?_0x38084d(_0x49e39b):_0x3d794a>0x3?_0x38084d(_0x3913bf,_0x5d901f,_0x49e39b):_0x38084d(_0x3913bf,_0x5d901f))||_0x49e39b);}return _0x3d794a>0x3&&_0x49e39b&&Object[_0xa4d4e7(0x126)](_0x3913bf,_0x5d901f,_0x49e39b),_0x49e39b;}let m=class extends n[_0x1e471b(0xd3)]{constructor(_0x6670cf,_0x54945b,_0x5f5d64,_0x453217){const _0x2cf7f8=_0x1e471b;super(),this[_0x2cf7f8(0x11b)]=_0x6670cf,this[_0x2cf7f8(0x13f)]=_0x54945b,this['_userService']=_0x5f5d64,this[_0x2cf7f8(0xe2)]=_0x453217,this[_0x2cf7f8(0x139)](),this[_0x2cf7f8(0x105)]();}[_0x1e471b(0x105)](){const _0x2de9e1=_0x1e471b;this['disposeWithMe'](this[_0x2de9e1(0x13f)]['commentUpdate$'][_0x2de9e1(0x111)]((0x0,o['bufferTime'])(0x10))['subscribe'](_0x12f29e=>{const _0x41ec16=_0x2de9e1;let _0x19248f=new Set();_0x12f29e[_0x41ec16(0x12e)](_0x36daf5=>{const _0x454598=_0x41ec16;switch(_0x36daf5[_0x454598(0x124)]){case _0x454598(0x102):{let _0x48e85b=_0x36daf5[_0x454598(0x11c)][_0x454598(0x108)];_0x19248f[_0x454598(0x102)](_0x48e85b);break;}default:break;}}),d(this['_injector'],_0x19248f);}));}[_0x1e471b(0x139)](){const _0x2e8d73=_0x1e471b;this[_0x2e8d73(0x100)](this[_0x2e8d73(0x11b)][_0x2e8d73(0xff)]['subscribe'](async _0xf63bef=>{const _0x531b25=_0x2e8d73;var _0x425452;let _0x8e6875=(_0x425452=this['_threadCommentModel'][_0x531b25(0xea)](_0xf63bef[_0x531b25(0xcb)])[_0x531b25(0xdc)](_0x509a96=>_0x509a96[_0x531b25(0x121)]===_0xf63bef[_0x531b25(0x121)]))==null?void 0x0:_0x425452[_0x531b25(0x138)];if(!_0x8e6875)return;let {unitId:_0x45fcfc,subUnitId:_0x1dd4a3}=_0x8e6875;switch(_0xf63bef[_0x531b25(0xe7)]&&this[_0x531b25(0xfc)][_0x531b25(0xd0)](_0xf63bef[_0x531b25(0xe7)]),_0xf63bef[_0x531b25(0x124)]){case i['CommentUpdateEventType']['Add']:break;case i[_0x531b25(0x114)]['Reply']:var _0x3f7521,_0x401bc0;this['_threadCommentModel'][_0x531b25(0x140)](_0x45fcfc,_0x1dd4a3,{'unitId':_0x45fcfc,'subUnitId':_0x1dd4a3,'ref':'','id':_0xf63bef[_0x531b25(0x12f)],'dT':u(+_0xf63bef[_0x531b25(0x106)]),'threadId':_0xf63bef[_0x531b25(0x121)],'personId':(_0x3f7521=(_0x401bc0=_0xf63bef['user'])==null?void 0x0:_0x401bc0[_0x531b25(0xf5)])==null?_0xf63bef[_0x531b25(0x131)]:_0x3f7521,'text':JSON[_0x531b25(0xfe)](_0xf63bef[_0x531b25(0xd5)]),'parentId':_0x8e6875['id']});break;case i[_0x531b25(0x114)]['Delete']:{let _0xcdc09d=this['_threadCommentModel'][_0x531b25(0x11e)](_0x45fcfc,_0x1dd4a3,_0xf63bef['replyId']);_0xcdc09d&&_0xcdc09d[_0x531b25(0xd4)]&&this[_0x531b25(0x13f)][_0x531b25(0xd1)](_0x45fcfc,_0x1dd4a3,_0xf63bef['replyId']);break;}case i[_0x531b25(0x114)][_0x531b25(0xf6)]:this[_0x531b25(0x13f)][_0x531b25(0xda)](_0x45fcfc,_0x1dd4a3,{'commentId':_0xf63bef[_0x531b25(0x12f)],'text':JSON['parse'](_0xf63bef[_0x531b25(0xd5)])});break;case i['CommentUpdateEventType'][_0x531b25(0x12c)]:{var _0x39ef67;let _0x9fbb90=(_0x39ef67=this[_0x531b25(0x13f)][_0x531b25(0xea)](_0xf63bef[_0x531b25(0xcb)])[_0x531b25(0xdc)](_0x358a21=>_0x358a21[_0x531b25(0x121)]===_0xf63bef[_0x531b25(0x121)]))==null?void 0x0:_0x39ef67[_0x531b25(0x138)];_0x9fbb90&&this['_threadCommentModel'][_0x531b25(0x10c)](_0x45fcfc,_0x1dd4a3,_0x9fbb90['id'],_0xf63bef[_0x531b25(0xee)]===i[_0x531b25(0x135)][_0x531b25(0xfb)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x1e471b(0xe9)])(e['CommentService'])),f(0x1,(0x0,n[_0x1e471b(0xe9)])(a[_0x1e471b(0x12b)])),f(0x2,(0x0,n[_0x1e471b(0xe9)])(n['UserManagerService'])),f(0x3,(0x0,n[_0x1e471b(0xe9)])(n[_0x1e471b(0xdb)]))],m);const h={};function g(_0x367897,_0x1e5f64){const _0x5901a0=_0x1e471b;let _0x14a42f=_0x367897['replies'][0x0];return{..._0x1e5f64,'id':_0x14a42f['replyId'],'resolved':_0x367897[_0x5901a0(0xee)]===0x1,'dT':u(_0x14a42f[_0x5901a0(0x106)]),'personId':_0x14a42f[_0x5901a0(0x131)],'threadId':_0x14a42f[_0x5901a0(0x121)]};}function _(_0x5090d8,_0x8a9f06,_0x38e498){const _0xb5e5c8=_0x1e471b;var _0x56ed10,_0x26fa46;if(((_0x56ed10=_0x5090d8==null||(_0x26fa46=_0x5090d8[_0xb5e5c8(0x122)])==null?void 0x0:_0x26fa46[_0xb5e5c8(0x125)])==null?0x0:_0x56ed10)>0x0){let _0x424988=(_0x2f7e10,_0x342469)=>({'id':_0x2f7e10[_0xb5e5c8(0x12f)],'threadId':_0x2f7e10[_0xb5e5c8(0x121)],'dT':u(_0x2f7e10[_0xb5e5c8(0x106)]),'personId':_0x2f7e10[_0xb5e5c8(0x131)],'resolved':_0x5090d8[_0xb5e5c8(0xee)]===i[_0xb5e5c8(0x135)][_0xb5e5c8(0xfb)],'unitId':_0x8a9f06,'subUnitId':_0x38e498,'text':JSON[_0xb5e5c8(0xfe)](_0x2f7e10['content']),'parentId':_0x342469}),_0x4dc022=_0x424988(_0x5090d8[_0xb5e5c8(0x122)][0x0]);return{..._0x4dc022,'children':_0x5090d8[_0xb5e5c8(0x122)][_0xb5e5c8(0x10e)](0x1)[_0xb5e5c8(0xf9)](_0x273e87=>_0x424988(_0x273e87,_0x4dc022['id']))};}return null;}let v=class{constructor(_0x302d1c,_0x2c8eef,_0x22b355){const _0x23ebac=_0x1e471b;this[_0x23ebac(0x112)]=_0x302d1c,this['_userService']=_0x2c8eef,this['_sessionService']=_0x22b355;}async['addComment'](_0x368aa2){const _0x3c91e2=_0x1e471b;var _0x1a1cee,_0x499601;let {parentId:_0x17169b,unitId:_0x3282e9,text:_0x351446,threadId:_0x940a5e}=_0x368aa2,_0xecfdb1=(_0x1a1cee=(_0x499601=_0x351446[_0x3c91e2(0xce)])==null?void 0x0:_0x499601[_0x3c91e2(0x104)](_0x4507b5=>_0x4507b5[_0x3c91e2(0xfd)]===n['CustomRangeType'][_0x3c91e2(0x109)])['map'](_0x3c8073=>_0x3c8073['rangeId']))==null?[]:_0x1a1cee,_0x19f776=JSON[_0x3c91e2(0x13d)](_0x351446),_0xc20af6=(await this[_0x3c91e2(0x128)][_0x3c91e2(0x12a)](_0x3282e9))[_0x3c91e2(0xe3)]();if(_0x17169b){let _0x1f8ad8={'memberId':_0xc20af6,'unitId':_0x3282e9,'content':_0x19f776,'mention':_0xecfdb1,'threadId':_0x940a5e},_0x31da6d=(await this['_httpService'][_0x3c91e2(0xe5)](_0x3c91e2(0x120)+_0x3282e9+'/reply',{'body':_0x1f8ad8}))[_0x3c91e2(0x144)][_0x3c91e2(0x143)];return{..._0x368aa2,'id':_0x31da6d[_0x3c91e2(0x12f)],'dT':(0x0,n[_0x3c91e2(0xcc)])(+_0x31da6d[_0x3c91e2(0x106)])['format'](_0x3c91e2(0xf3)),'personId':_0x31da6d[_0x3c91e2(0x131)]};}else{let _0x249d90={'memberId':_0xc20af6,'unitId':_0x3282e9,'content':_0x19f776,'mention':_0xecfdb1};return g((await this[_0x3c91e2(0x112)][_0x3c91e2(0xe5)](_0x3c91e2(0x120)+_0x3282e9+'/add',{'body':_0x249d90}))['body']['comment'],_0x368aa2);}}async[_0x1e471b(0xda)](_0xa739e2){const _0x2f305b=_0x1e471b;var _0x191190,_0x268e8b;let {text:_0x31e078,unitId:_0x228bba}=_0xa739e2,_0x26746c=(_0x191190=(_0x268e8b=_0x31e078[_0x2f305b(0xce)])==null?void 0x0:_0x268e8b[_0x2f305b(0x104)](_0x5d7c3c=>_0x5d7c3c[_0x2f305b(0xfd)]===n[_0x2f305b(0x101)][_0x2f305b(0x109)])[_0x2f305b(0xf9)](_0x4661ed=>_0x4661ed['rangeId']))==null?[]:_0x191190,_0x5cd3cc=JSON['stringify'](_0x31e078),_0x53c384=_0xa739e2[_0x2f305b(0x121)],_0x10adaf=_0xa739e2['id'],_0x42d46a={'memberId':(await this[_0x2f305b(0x128)]['requireSession'](_0x228bba))[_0x2f305b(0xe3)](),'unitId':_0x228bba,'threadId':_0x53c384,'mention':_0x26746c,'content':_0x5cd3cc,'replyId':_0x10adaf},_0x4ecfab=await this[_0x2f305b(0x112)][_0x2f305b(0xe5)](_0x2f305b(0x120)+_0x228bba+_0x2f305b(0xcd),{'body':_0x42d46a});return!_0x4ecfab[_0x2f305b(0x144)][_0x2f305b(0xd9)]||_0x4ecfab[_0x2f305b(0x144)][_0x2f305b(0xd9)][_0x2f305b(0xd2)]===0x1;}async[_0x1e471b(0x10c)](_0x38c97f){const _0x1e1e21=_0x1e471b;let {unitId:_0x12d7ac}=_0x38c97f,_0x3fb898=_0x38c97f[_0x1e1e21(0x121)],_0x3938a3={'memberId':this[_0x1e1e21(0xfc)][_0x1e1e21(0xdd)]()['userID'],'unitId':_0x12d7ac,'threadId':_0x3fb898,'solved':_0x38c97f['resolved']?i[_0x1e1e21(0x135)][_0x1e1e21(0xfb)]:i['CommentSolvedStatus'][_0x1e1e21(0xe1)]},_0x4b5fbc=await this[_0x1e1e21(0x112)]['post'](_0x1e1e21(0x120)+_0x12d7ac+_0x1e1e21(0xe8),{'body':_0x3938a3});return!_0x4b5fbc[_0x1e1e21(0x144)][_0x1e1e21(0xd9)]||_0x4b5fbc['body']['error'][_0x1e1e21(0xd2)]===0x1;}async[_0x1e471b(0xd1)](_0x4ac599,_0x152518,_0x1e2965,_0x1f422d){const _0x30d63c=_0x1e471b;let _0x51e649={'memberId':(await this['_sessionService'][_0x30d63c(0x12a)](_0x4ac599))[_0x30d63c(0xe3)](),'threadId':_0x1e2965,'replyId':_0x1f422d,'unitId':_0x4ac599},_0x20a481=await this[_0x30d63c(0x112)][_0x30d63c(0xe5)](_0x30d63c(0x120)+_0x4ac599+_0x30d63c(0xd7),{'body':_0x51e649});return!_0x20a481[_0x30d63c(0x144)][_0x30d63c(0xd9)]||_0x20a481[_0x30d63c(0x144)]['error'][_0x30d63c(0xd2)]===0x1;}async[_0x1e471b(0xc9)](_0x133ec3,_0x289a01,_0x4bfa7b){const _0x2e1fbc=_0x1e471b;let _0x4c6052={'unitId':_0x133ec3,'threadId':_0x4bfa7b},_0xea1fd8=await this['_httpService'][_0x2e1fbc(0xe5)]('/universer-api/comment/unit/'+_0x133ec3+_0x2e1fbc(0xd8),{'body':_0x4c6052}),_0x3048a0=_0x4bfa7b[_0x2e1fbc(0xf9)](_0x373c08=>_(_0xea1fd8[_0x2e1fbc(0x144)][_0x2e1fbc(0x110)][_0x373c08],_0x133ec3,_0x289a01))['filter'](Boolean);return Object['values'](_0xea1fd8['body']['users'])[_0x2e1fbc(0x12e)](_0x48cb1c=>{const _0x4ae511=_0x2e1fbc;this[_0x4ae511(0xfc)][_0x4ae511(0xd0)](_0x48cb1c);}),_0x3048a0;}[_0x1e471b(0x118)](_0x494f97){const _0x52878d=_0x1e471b;return{'id':_0x494f97['id'],'threadId':_0x494f97[_0x52878d(0x121)],'ref':_0x494f97[_0x52878d(0xf7)]};}};v=p([f(0x0,(0x0,n['Inject'])(s['HTTPService'])),f(0x1,(0x0,n[_0x1e471b(0xe9)])(n[_0x1e471b(0x10b)])),f(0x2,(0x0,n[_0x1e471b(0xe9)])(e[_0x1e471b(0xd6)]))],v);let y=class extends n[_0x1e471b(0xd3)]{constructor(_0x34c979,_0x1ba149){const _0x3bd011=_0x1e471b;super(),this[_0x3bd011(0xf4)]=_0x34c979,this[_0x3bd011(0xcf)]=_0x1ba149,this[_0x3bd011(0xf0)]();}['_initDataSource'](){const _0x48eb4e=_0x1e471b;this[_0x48eb4e(0xf4)][_0x48eb4e(0x13b)]=this['_threadCommentDataSource'],this[_0x48eb4e(0xf4)][_0x48eb4e(0x136)]=!0x1;}};y=p([f(0x0,a[_0x1e471b(0x141)]),f(0x1,(0x0,n[_0x1e471b(0xe9)])(v))],y);function b(_0x584aab){'@babel/helpers - typeof';const _0x216868=_0x1e471b;return b=typeof Symbol==_0x216868(0x10a)&&typeof Symbol['iterator']=='symbol'?function(_0x139f61){return typeof _0x139f61;}:function(_0x38415f){const _0x5204d2=_0x216868;return _0x38415f&&typeof Symbol=='function'&&_0x38415f[_0x5204d2(0x129)]===Symbol&&_0x38415f!==Symbol['prototype']?'symbol':typeof _0x38415f;},b(_0x584aab);}function x(_0x2ef6eb,_0x1d733c){const _0x4bf79f=_0x1e471b;if(b(_0x2ef6eb)!=_0x4bf79f(0xfa)||!_0x2ef6eb)return _0x2ef6eb;var _0x53867d=_0x2ef6eb[Symbol[_0x4bf79f(0xdf)]];if(_0x53867d!==void 0x0){var _0x563dc1=_0x53867d[_0x4bf79f(0xe0)](_0x2ef6eb,_0x1d733c||_0x4bf79f(0xeb));if(b(_0x563dc1)!=_0x4bf79f(0xfa))return _0x563dc1;throw TypeError(_0x4bf79f(0x145));}return(_0x1d733c===_0x4bf79f(0x10f)?String:Number)(_0x2ef6eb);}function S(_0x183f9f){const _0x3d642a=_0x1e471b;var _0x1a0835=x(_0x183f9f,_0x3d642a(0x10f));return b(_0x1a0835)==_0x3d642a(0x11f)?_0x1a0835:_0x1a0835+'';}function C(_0x3ed7ec,_0x53660c,_0x37a809){const _0xd09e11=_0x1e471b;return(_0x53660c=S(_0x53660c))in _0x3ed7ec?Object[_0xd09e11(0x126)](_0x3ed7ec,_0x53660c,{'value':_0x37a809,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ed7ec[_0x53660c]=_0x37a809,_0x3ed7ec;}let w=class extends n[_0x1e471b(0x13c)]{constructor(_0x595ac3=h,_0x1abe27,_0x33cc39){const _0x33eb62=_0x1e471b;super(),this[_0x33eb62(0x132)]=_0x595ac3,this[_0x33eb62(0xe2)]=_0x1abe27,this['_configService']=_0x33cc39;let {..._0x3e9094}=(0x0,n[_0x33eb62(0x127)])({},h,this[_0x33eb62(0x132)]);this[_0x33eb62(0xef)][_0x33eb62(0xf2)]('thread-comment-data-source.config',_0x3e9094);}[_0x1e471b(0x13e)](){[[v],[y],[m]]['forEach'](_0x3b5235=>{const _0x19b69f=_0x4310;this[_0x19b69f(0xe2)][_0x19b69f(0x102)](_0x3b5235);});}[_0x1e471b(0xf8)](){const _0x2f6ca8=_0x1e471b;this[_0x2f6ca8(0xe2)][_0x2f6ca8(0x10d)](y),this[_0x2f6ca8(0xe2)][_0x2f6ca8(0x10d)](m);}};C(w,_0x1e471b(0x115),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),C(w,'packageName',c),C(w,_0x1e471b(0x130),l),w=p([(0x0,n[_0x1e471b(0xca)])(r[_0x1e471b(0xe6)],e[_0x1e471b(0xc8)],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x1e471b(0xe9)])(n[_0x1e471b(0xdb)])),f(0x2,n[_0x1e471b(0x11d)])],w),Object['defineProperty'](exports,_0x1e471b(0x137),{'enumerable':!0x0,'get':function(){return w;}});
|
|
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;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5863(){const _0x47dcd2=['getOwnPropertyDescriptor','/universer-api/comment/unit/','95iizQNo','addUser','content','1.0.0-alpha.1','_configService','commentUpdate$','_initDataSource','prototype','object','_threadCommentDataSourceService','rangeType','OpenOrReOpen','disposeWithMe','unitId','/delete','error','post','stringify','pipe','/edit','_threadCommentDataSource','8963235sUySJb','replyId','/add','Solve','saveCommentToSnapshot','_init','/reply','version','format','pluginName','createTimestamp','decorate','comments','addComment','filter','add','delete','_httpService','length','239271zxfzvb','find','deleteComment','getUnit','defineProperty','call','onReady','YYYY/MM/DD\x20HH:mm','_userService','dataSource','parentId','resolveComment','@univerjs-pro/thread-comment-datasource','get','parse','_injector','34iXmOzb','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','user','values','/universer-api/user/list','_sessionService','getCurrentUser','threadId','COMMENT','264668pFBOvM','comment','rangeId','requireSession','code','ref','symbol','48QItkQd','replies','function','solved','root','getComment','5888930GsMGfR','Delete','onStarting','_config','10030200xbmnDp','userID','customRanges','getMemberID','Solved','resolved','138761ywDOTr','listComments','setConfig','constructor','_threadCommentModel','personId','684060EsifXW','map','subscribe','string','toPrimitive','type','users','payload','userId','slice','/list','_commentService'];_0x5863=function(){return _0x47dcd2;};return _0x5863();}const _0xd15b79=_0x5542;(function(_0x123280,_0x478ef4){const _0x1b9fbe=_0x5542,_0x1c2850=_0x123280();while(!![]){try{const _0x23232c=-parseInt(_0x1b9fbe(0x11e))/0x1+parseInt(_0x1b9fbe(0x164))/0x2*(-parseInt(_0x1b9fbe(0x154))/0x3)+parseInt(_0x1b9fbe(0x16f))/0x4*(parseInt(_0x1b9fbe(0x12c))/0x5)+-parseInt(_0x1b9fbe(0x176))/0x6*(parseInt(_0x1b9fbe(0x118))/0x7)+parseInt(_0x1b9fbe(0x112))/0x8+parseInt(_0x1b9fbe(0x141))/0x9+-parseInt(_0x1b9fbe(0x10e))/0xa;if(_0x23232c===_0x478ef4)break;else _0x1c2850['push'](_0x1c2850['shift']());}catch(_0x2d44fb){_0x1c2850['push'](_0x1c2850['shift']());}}}(_0x5863,0xafa61));import{CollaborationSessionService as _0x5d52fa,CommentService as _0x25f6af,UniverCollaborationClientPlugin as _0x457666}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1afcd4}from'@univerjs-pro/license';function _0x5542(_0x4c9a49,_0x5d4972){_0x4c9a49=_0x4c9a49-0x10b;const _0x5863b3=_0x5863();let _0x55427b=_0x5863b3[_0x4c9a49];return _0x55427b;}import{CustomRangeType as _0x57416f,DependentOn as _0x2c6682,Disposable as _0x964a78,IConfigService as _0x5a4188,Inject as _0x5882d4,Injector as _0x43fc57,Plugin as _0x12c11e,UserManagerService as _0x3c2081,dateKit as _0x41cc06,merge as _0xa513a0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ab3d2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x377cc0,CommentUpdateEventType as _0x22b8b2}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x59905f,ThreadCommentModel as _0x51f282}from'@univerjs/thread-comment';import{bufferTime as _0x487a59}from'rxjs';import{HTTPService as _0x4965c2}from'@univerjs/network';var x=_0xd15b79(0x160),S=_0xd15b79(0x12f);const C=_0x21fb7c=>_0x41cc06(new Date(+_0x21fb7c))[_0xd15b79(0x149)]('YYYY/MM/DD\x20HH:mm'),w=async(_0x13db5e,_0x5327aa)=>{const _0x26961f=_0xd15b79;let _0x447f1d=_0x13db5e[_0x26961f(0x161)](_0x3c2081),_0x15807e=_0x13db5e['get'](_0x4965c2);_0x5327aa[_0x26961f(0x165)](_0x1579c6=>{const _0x1b81cb=_0x26961f;_0x447f1d['getUser'](_0x1579c6)&&_0x5327aa[_0x1b81cb(0x151)](_0x1579c6);}),_0x5327aa['size']&&(await _0x15807e[_0x26961f(0x161)](_0x26961f(0x16a),{'params':{'userIDs':[..._0x5327aa]}}))[_0x26961f(0x167)][_0x26961f(0x124)][_0x26961f(0x165)](_0x1b8b45=>{const _0x1053f3=_0x26961f;_0x1b8b45&&_0x447f1d[_0x1053f3(0x12d)](_0x1b8b45);});};function T(_0x38e7b9,_0xd296b5){return function(_0x38d60a,_0x55f28a){_0xd296b5(_0x38d60a,_0x55f28a,_0x38e7b9);};}function E(_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6){const _0x42b769=_0xd15b79;var _0xaa7867=arguments['length'],_0xce857d=_0xaa7867<0x3?_0x5f11b6:_0x304bc6===null?_0x304bc6=Object[_0x42b769(0x12a)](_0x5f11b6,_0x4cff74):_0x304bc6,_0x3dd5f4;if(typeof Reflect==_0x42b769(0x134)&&typeof Reflect[_0x42b769(0x14c)]=='function')_0xce857d=Reflect[_0x42b769(0x14c)](_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6);else{for(var _0x1c2dc2=_0x2a2cfe[_0x42b769(0x153)]-0x1;_0x1c2dc2>=0x0;_0x1c2dc2--)(_0x3dd5f4=_0x2a2cfe[_0x1c2dc2])&&(_0xce857d=(_0xaa7867<0x3?_0x3dd5f4(_0xce857d):_0xaa7867>0x3?_0x3dd5f4(_0x5f11b6,_0x4cff74,_0xce857d):_0x3dd5f4(_0x5f11b6,_0x4cff74))||_0xce857d);}return _0xaa7867>0x3&&_0xce857d&&Object[_0x42b769(0x158)](_0x5f11b6,_0x4cff74,_0xce857d),_0xce857d;}let D=class extends _0x964a78{constructor(_0x248389,_0x4b2280,_0x481f59,_0x345168){const _0x65c9b7=_0xd15b79;super(),this[_0x65c9b7(0x129)]=_0x248389,this[_0x65c9b7(0x11c)]=_0x4b2280,this[_0x65c9b7(0x15c)]=_0x481f59,this[_0x65c9b7(0x163)]=_0x345168,this[_0x65c9b7(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x19022e=_0xd15b79;this[_0x19022e(0x138)](this[_0x19022e(0x11c)][_0x19022e(0x131)][_0x19022e(0x13e)](_0x487a59(0x10))[_0x19022e(0x120)](_0x50f22c=>{const _0x2fb1f5=_0x19022e;let _0xea3f22=new Set();_0x50f22c['forEach'](_0x38c9c7=>{const _0x4f178f=_0x5542;switch(_0x38c9c7[_0x4f178f(0x123)]){case _0x4f178f(0x150):{let _0x32020c=_0x38c9c7[_0x4f178f(0x125)][_0x4f178f(0x11d)];_0xea3f22[_0x4f178f(0x150)](_0x32020c);break;}default:break;}}),w(this[_0x2fb1f5(0x163)],_0xea3f22);}));}['_init'](){const _0x176ef9=_0xd15b79;this['disposeWithMe'](this[_0x176ef9(0x129)]['commentUpdate$'][_0x176ef9(0x120)](async _0x542773=>{const _0x5c100e=_0x176ef9;var _0x12b9a9;let _0x53a8a0=(_0x12b9a9=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x46e00d=>_0x46e00d['threadId']===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x12b9a9['root'];if(!_0x53a8a0)return;let {unitId:_0x557afb,subUnitId:_0x527440}=_0x53a8a0;switch(_0x542773[_0x5c100e(0x168)]&&this[_0x5c100e(0x15c)][_0x5c100e(0x12d)](_0x542773[_0x5c100e(0x168)]),_0x542773[_0x5c100e(0x123)]){case _0x22b8b2['Add']:break;case _0x22b8b2['Reply']:var _0x177a11,_0x2d2d75;this[_0x5c100e(0x11c)][_0x5c100e(0x14e)](_0x557afb,_0x527440,{'unitId':_0x557afb,'subUnitId':_0x527440,'ref':'','id':_0x542773['replyId'],'dT':C(+_0x542773['createTimestamp']),'threadId':_0x542773[_0x5c100e(0x16d)],'personId':(_0x177a11=(_0x2d2d75=_0x542773['user'])==null?void 0x0:_0x2d2d75[_0x5c100e(0x113)])==null?_0x542773[_0x5c100e(0x126)]:_0x177a11,'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)]),'parentId':_0x53a8a0['id']});break;case _0x22b8b2[_0x5c100e(0x10f)]:{let _0x4bf8e2=this[_0x5c100e(0x11c)][_0x5c100e(0x10d)](_0x557afb,_0x527440,_0x542773['replyId']);_0x4bf8e2&&_0x4bf8e2[_0x5c100e(0x15e)]&&this[_0x5c100e(0x11c)][_0x5c100e(0x156)](_0x557afb,_0x527440,_0x542773[_0x5c100e(0x142)]);break;}case _0x22b8b2['Edit']:this['_threadCommentModel']['updateComment'](_0x557afb,_0x527440,{'commentId':_0x542773['replyId'],'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)])});break;case _0x22b8b2[_0x5c100e(0x144)]:{var _0x138db3;let _0x3c0b89=(_0x138db3=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x6c76cb=>_0x6c76cb[_0x5c100e(0x16d)]===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x138db3[_0x5c100e(0x10c)];_0x3c0b89&&this[_0x5c100e(0x11c)][_0x5c100e(0x15f)](_0x557afb,_0x527440,_0x3c0b89['id'],_0x542773[_0x5c100e(0x10b)]===_0x377cc0['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x5882d4(_0x25f6af)),T(0x1,_0x5882d4(_0x51f282)),T(0x2,_0x5882d4(_0x3c2081)),T(0x3,_0x5882d4(_0x43fc57))],D);const O={};function k(_0xa841da,_0x196f2d){const _0x378891=_0xd15b79;let _0x3ba332=_0xa841da[_0x378891(0x177)][0x0];return{..._0x196f2d,'id':_0x3ba332['replyId'],'resolved':_0xa841da[_0x378891(0x10b)]===0x1,'dT':C(_0x3ba332[_0x378891(0x14b)]),'personId':_0x3ba332['userId'],'threadId':_0x3ba332['threadId']};}function A(_0x2e3ae1,_0x3fd916,_0x4aad09){const _0x5b8a4f=_0xd15b79;var _0x26cbaa,_0xddab36;if(((_0x26cbaa=_0x2e3ae1==null||(_0xddab36=_0x2e3ae1[_0x5b8a4f(0x177)])==null?void 0x0:_0xddab36[_0x5b8a4f(0x153)])==null?0x0:_0x26cbaa)>0x0){let _0x11a96d=(_0x1fe7e9,_0x44b4ac)=>({'id':_0x1fe7e9[_0x5b8a4f(0x142)],'threadId':_0x1fe7e9[_0x5b8a4f(0x16d)],'dT':C(_0x1fe7e9[_0x5b8a4f(0x14b)]),'personId':_0x1fe7e9[_0x5b8a4f(0x126)],'resolved':_0x2e3ae1[_0x5b8a4f(0x10b)]===_0x377cc0[_0x5b8a4f(0x116)],'unitId':_0x3fd916,'subUnitId':_0x4aad09,'text':JSON[_0x5b8a4f(0x162)](_0x1fe7e9[_0x5b8a4f(0x12e)]),'parentId':_0x44b4ac}),_0x58779e=_0x11a96d(_0x2e3ae1['replies'][0x0]);return{..._0x58779e,'children':_0x2e3ae1[_0x5b8a4f(0x177)][_0x5b8a4f(0x127)](0x1)[_0x5b8a4f(0x11f)](_0x4a1301=>_0x11a96d(_0x4a1301,_0x58779e['id']))};}return null;}let j=class{constructor(_0x4ac3e3,_0x40942b,_0xb86c1c){const _0x2574c5=_0xd15b79;this[_0x2574c5(0x152)]=_0x4ac3e3,this[_0x2574c5(0x15c)]=_0x40942b,this[_0x2574c5(0x16b)]=_0xb86c1c;}async['addComment'](_0x2c59de){const _0x1151a0=_0xd15b79;var _0x51a82c,_0x592397;let {parentId:_0x1650bb,unitId:_0x504390,text:_0x61dcf5,threadId:_0x4639d2}=_0x2c59de,_0xf6285a=(_0x51a82c=(_0x592397=_0x61dcf5[_0x1151a0(0x114)])==null?void 0x0:_0x592397['filter'](_0x2a064b=>_0x2a064b[_0x1151a0(0x136)]===_0x57416f[_0x1151a0(0x16e)])[_0x1151a0(0x11f)](_0x2fbc02=>_0x2fbc02[_0x1151a0(0x171)]))==null?[]:_0x51a82c,_0x125694=JSON[_0x1151a0(0x13d)](_0x61dcf5),_0x394d61=(await this['_sessionService'][_0x1151a0(0x172)](_0x504390))['getMemberID']();if(_0x1650bb){let _0x7d7930={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a,'threadId':_0x4639d2},_0x49e559=(await this[_0x1151a0(0x152)]['post'](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x147),{'body':_0x7d7930}))[_0x1151a0(0x167)]['reply'];return{..._0x2c59de,'id':_0x49e559[_0x1151a0(0x142)],'dT':_0x41cc06(+_0x49e559[_0x1151a0(0x14b)])[_0x1151a0(0x149)](_0x1151a0(0x15b)),'personId':_0x49e559[_0x1151a0(0x126)]};}else{let _0x6b35ad={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a};return k((await this[_0x1151a0(0x152)][_0x1151a0(0x13c)](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x143),{'body':_0x6b35ad}))['body'][_0x1151a0(0x170)],_0x2c59de);}}async['updateComment'](_0x2fcb08){const _0x1c017a=_0xd15b79;var _0x166e26,_0xd26345;let {text:_0x1f9092,unitId:_0x2bc514}=_0x2fcb08,_0x389fc3=(_0x166e26=(_0xd26345=_0x1f9092[_0x1c017a(0x114)])==null?void 0x0:_0xd26345[_0x1c017a(0x14f)](_0x22bbdf=>_0x22bbdf['rangeType']===_0x57416f[_0x1c017a(0x16e)])['map'](_0x400104=>_0x400104[_0x1c017a(0x171)]))==null?[]:_0x166e26,_0x296eb6=JSON[_0x1c017a(0x13d)](_0x1f9092),_0xaf692f=_0x2fcb08[_0x1c017a(0x16d)],_0xf9b763=_0x2fcb08['id'],_0x75df5f={'memberId':(await this['_sessionService']['requireSession'](_0x2bc514))[_0x1c017a(0x115)](),'unitId':_0x2bc514,'threadId':_0xaf692f,'mention':_0x389fc3,'content':_0x296eb6,'replyId':_0xf9b763},_0x321219=await this[_0x1c017a(0x152)][_0x1c017a(0x13c)](_0x1c017a(0x12b)+_0x2bc514+_0x1c017a(0x13f),{'body':_0x75df5f});return!_0x321219[_0x1c017a(0x167)][_0x1c017a(0x13b)]||_0x321219[_0x1c017a(0x167)]['error']['code']===0x1;}async[_0xd15b79(0x15f)](_0x5e34b1){const _0x32da46=_0xd15b79;let {unitId:_0x16388b}=_0x5e34b1,_0x16d222=_0x5e34b1['threadId'],_0x33b25c={'memberId':this[_0x32da46(0x15c)][_0x32da46(0x16c)]()[_0x32da46(0x113)],'unitId':_0x16388b,'threadId':_0x16d222,'solved':_0x5e34b1[_0x32da46(0x117)]?_0x377cc0['Solved']:_0x377cc0[_0x32da46(0x137)]},_0x120a92=await this[_0x32da46(0x152)][_0x32da46(0x13c)]('/universer-api/comment/unit/'+_0x16388b+'/solved',{'body':_0x33b25c});return!_0x120a92['body'][_0x32da46(0x13b)]||_0x120a92[_0x32da46(0x167)][_0x32da46(0x13b)][_0x32da46(0x173)]===0x1;}async[_0xd15b79(0x156)](_0x3993a9,_0x1b0dc3,_0x201f54,_0x34dcd4){const _0x2bbb08=_0xd15b79;let _0x23f612={'memberId':(await this[_0x2bbb08(0x16b)][_0x2bbb08(0x172)](_0x3993a9))[_0x2bbb08(0x115)](),'threadId':_0x201f54,'replyId':_0x34dcd4,'unitId':_0x3993a9},_0xe32e47=await this[_0x2bbb08(0x152)][_0x2bbb08(0x13c)](_0x2bbb08(0x12b)+_0x3993a9+_0x2bbb08(0x13a),{'body':_0x23f612});return!_0xe32e47['body'][_0x2bbb08(0x13b)]||_0xe32e47[_0x2bbb08(0x167)][_0x2bbb08(0x13b)][_0x2bbb08(0x173)]===0x1;}async[_0xd15b79(0x119)](_0x5242fa,_0x5838d3,_0x556e31){const _0x2c49c2=_0xd15b79;let _0x2f89aa={'unitId':_0x5242fa,'threadId':_0x556e31},_0x2f6f0c=await this[_0x2c49c2(0x152)]['post'](_0x2c49c2(0x12b)+_0x5242fa+_0x2c49c2(0x128),{'body':_0x2f89aa}),_0x248ecb=_0x556e31[_0x2c49c2(0x11f)](_0x3de4ce=>A(_0x2f6f0c[_0x2c49c2(0x167)][_0x2c49c2(0x14d)][_0x3de4ce],_0x5242fa,_0x5838d3))[_0x2c49c2(0x14f)](Boolean);return Object[_0x2c49c2(0x169)](_0x2f6f0c['body']['users'])[_0x2c49c2(0x165)](_0x3b6694=>{const _0x151045=_0x2c49c2;this[_0x151045(0x15c)]['addUser'](_0x3b6694);}),_0x248ecb;}[_0xd15b79(0x145)](_0x25fe57){const _0x503dbf=_0xd15b79;return{'id':_0x25fe57['id'],'threadId':_0x25fe57[_0x503dbf(0x16d)],'ref':_0x25fe57[_0x503dbf(0x174)]};}};j=E([T(0x0,_0x5882d4(_0x4965c2)),T(0x1,_0x5882d4(_0x3c2081)),T(0x2,_0x5882d4(_0x5d52fa))],j);let M=class extends _0x964a78{constructor(_0x49a199,_0x44691d){const _0x240d7d=_0xd15b79;super(),this[_0x240d7d(0x135)]=_0x49a199,this[_0x240d7d(0x140)]=_0x44691d,this[_0x240d7d(0x132)]();}[_0xd15b79(0x132)](){const _0x132133=_0xd15b79;this[_0x132133(0x135)][_0x132133(0x15d)]=this['_threadCommentDataSource'],this[_0x132133(0x135)]['syncUpdateMutationToColla']=!0x1;}};M=E([T(0x0,_0x59905f),T(0x1,_0x5882d4(j))],M);function N(_0x313aff){'@babel/helpers - typeof';const _0x5eb410=_0xd15b79;return N=typeof Symbol==_0x5eb410(0x178)&&typeof Symbol['iterator']==_0x5eb410(0x175)?function(_0x309e2f){return typeof _0x309e2f;}:function(_0xe99024){const _0x3107ed=_0x5eb410;return _0xe99024&&typeof Symbol==_0x3107ed(0x178)&&_0xe99024[_0x3107ed(0x11b)]===Symbol&&_0xe99024!==Symbol[_0x3107ed(0x133)]?_0x3107ed(0x175):typeof _0xe99024;},N(_0x313aff);}function P(_0x5b59e0,_0x1e32fe){const _0x2beae5=_0xd15b79;if(N(_0x5b59e0)!=_0x2beae5(0x134)||!_0x5b59e0)return _0x5b59e0;var _0xd577e4=_0x5b59e0[Symbol[_0x2beae5(0x122)]];if(_0xd577e4!==void 0x0){var _0x47a6d5=_0xd577e4[_0x2beae5(0x159)](_0x5b59e0,_0x1e32fe||'default');if(N(_0x47a6d5)!=_0x2beae5(0x134))return _0x47a6d5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x1e32fe==='string'?String:Number)(_0x5b59e0);}function F(_0x46591e){const _0x4fb0f4=_0xd15b79;var _0x2afe7b=P(_0x46591e,_0x4fb0f4(0x121));return N(_0x2afe7b)==_0x4fb0f4(0x175)?_0x2afe7b:_0x2afe7b+'';}function I(_0x1160f3,_0x3bd374,_0x23cee7){const _0x13746c=_0xd15b79;return(_0x3bd374=F(_0x3bd374))in _0x1160f3?Object[_0x13746c(0x158)](_0x1160f3,_0x3bd374,{'value':_0x23cee7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1160f3[_0x3bd374]=_0x23cee7,_0x1160f3;}let L=class extends _0x12c11e{constructor(_0x1896df=O,_0x19f372,_0x13f453){const _0x3cedf0=_0xd15b79;super(),this[_0x3cedf0(0x111)]=_0x1896df,this[_0x3cedf0(0x163)]=_0x19f372,this[_0x3cedf0(0x130)]=_0x13f453;let {..._0x3dd6bb}=_0xa513a0({},O,this[_0x3cedf0(0x111)]);this[_0x3cedf0(0x130)][_0x3cedf0(0x11a)]('thread-comment-data-source.config',_0x3dd6bb);}[_0xd15b79(0x110)](){[[j],[M],[D]]['forEach'](_0x45ac52=>{const _0x473b14=_0x5542;this[_0x473b14(0x163)][_0x473b14(0x150)](_0x45ac52);});}[_0xd15b79(0x15a)](){const _0x5bab25=_0xd15b79;this[_0x5bab25(0x163)][_0x5bab25(0x161)](M),this[_0x5bab25(0x163)][_0x5bab25(0x161)](D);}};I(L,_0xd15b79(0x14a),_0xd15b79(0x166)),I(L,'packageName',x),I(L,_0xd15b79(0x148),S),L=E([_0x2c6682(_0x5ab3d2,_0x457666,_0x1afcd4),T(0x1,_0x5882d4(_0x43fc57)),T(0x2,_0x5a4188)],L);export{L as UniverThreadCommentDataSourcePlugin};
|
|
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};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5863(){const _0x47dcd2=['getOwnPropertyDescriptor','/universer-api/comment/unit/','95iizQNo','addUser','content','1.0.0-alpha.1','_configService','commentUpdate$','_initDataSource','prototype','object','_threadCommentDataSourceService','rangeType','OpenOrReOpen','disposeWithMe','unitId','/delete','error','post','stringify','pipe','/edit','_threadCommentDataSource','8963235sUySJb','replyId','/add','Solve','saveCommentToSnapshot','_init','/reply','version','format','pluginName','createTimestamp','decorate','comments','addComment','filter','add','delete','_httpService','length','239271zxfzvb','find','deleteComment','getUnit','defineProperty','call','onReady','YYYY/MM/DD\x20HH:mm','_userService','dataSource','parentId','resolveComment','@univerjs-pro/thread-comment-datasource','get','parse','_injector','34iXmOzb','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','user','values','/universer-api/user/list','_sessionService','getCurrentUser','threadId','COMMENT','264668pFBOvM','comment','rangeId','requireSession','code','ref','symbol','48QItkQd','replies','function','solved','root','getComment','5888930GsMGfR','Delete','onStarting','_config','10030200xbmnDp','userID','customRanges','getMemberID','Solved','resolved','138761ywDOTr','listComments','setConfig','constructor','_threadCommentModel','personId','684060EsifXW','map','subscribe','string','toPrimitive','type','users','payload','userId','slice','/list','_commentService'];_0x5863=function(){return _0x47dcd2;};return _0x5863();}const _0xd15b79=_0x5542;(function(_0x123280,_0x478ef4){const _0x1b9fbe=_0x5542,_0x1c2850=_0x123280();while(!![]){try{const _0x23232c=-parseInt(_0x1b9fbe(0x11e))/0x1+parseInt(_0x1b9fbe(0x164))/0x2*(-parseInt(_0x1b9fbe(0x154))/0x3)+parseInt(_0x1b9fbe(0x16f))/0x4*(parseInt(_0x1b9fbe(0x12c))/0x5)+-parseInt(_0x1b9fbe(0x176))/0x6*(parseInt(_0x1b9fbe(0x118))/0x7)+parseInt(_0x1b9fbe(0x112))/0x8+parseInt(_0x1b9fbe(0x141))/0x9+-parseInt(_0x1b9fbe(0x10e))/0xa;if(_0x23232c===_0x478ef4)break;else _0x1c2850['push'](_0x1c2850['shift']());}catch(_0x2d44fb){_0x1c2850['push'](_0x1c2850['shift']());}}}(_0x5863,0xafa61));import{CollaborationSessionService as _0x5d52fa,CommentService as _0x25f6af,UniverCollaborationClientPlugin as _0x457666}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1afcd4}from'@univerjs-pro/license';function _0x5542(_0x4c9a49,_0x5d4972){_0x4c9a49=_0x4c9a49-0x10b;const _0x5863b3=_0x5863();let _0x55427b=_0x5863b3[_0x4c9a49];return _0x55427b;}import{CustomRangeType as _0x57416f,DependentOn as _0x2c6682,Disposable as _0x964a78,IConfigService as _0x5a4188,Inject as _0x5882d4,Injector as _0x43fc57,Plugin as _0x12c11e,UserManagerService as _0x3c2081,dateKit as _0x41cc06,merge as _0xa513a0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ab3d2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x377cc0,CommentUpdateEventType as _0x22b8b2}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x59905f,ThreadCommentModel as _0x51f282}from'@univerjs/thread-comment';import{bufferTime as _0x487a59}from'rxjs';import{HTTPService as _0x4965c2}from'@univerjs/network';var x=_0xd15b79(0x160),S=_0xd15b79(0x12f);const C=_0x21fb7c=>_0x41cc06(new Date(+_0x21fb7c))[_0xd15b79(0x149)]('YYYY/MM/DD\x20HH:mm'),w=async(_0x13db5e,_0x5327aa)=>{const _0x26961f=_0xd15b79;let _0x447f1d=_0x13db5e[_0x26961f(0x161)](_0x3c2081),_0x15807e=_0x13db5e['get'](_0x4965c2);_0x5327aa[_0x26961f(0x165)](_0x1579c6=>{const _0x1b81cb=_0x26961f;_0x447f1d['getUser'](_0x1579c6)&&_0x5327aa[_0x1b81cb(0x151)](_0x1579c6);}),_0x5327aa['size']&&(await _0x15807e[_0x26961f(0x161)](_0x26961f(0x16a),{'params':{'userIDs':[..._0x5327aa]}}))[_0x26961f(0x167)][_0x26961f(0x124)][_0x26961f(0x165)](_0x1b8b45=>{const _0x1053f3=_0x26961f;_0x1b8b45&&_0x447f1d[_0x1053f3(0x12d)](_0x1b8b45);});};function T(_0x38e7b9,_0xd296b5){return function(_0x38d60a,_0x55f28a){_0xd296b5(_0x38d60a,_0x55f28a,_0x38e7b9);};}function E(_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6){const _0x42b769=_0xd15b79;var _0xaa7867=arguments['length'],_0xce857d=_0xaa7867<0x3?_0x5f11b6:_0x304bc6===null?_0x304bc6=Object[_0x42b769(0x12a)](_0x5f11b6,_0x4cff74):_0x304bc6,_0x3dd5f4;if(typeof Reflect==_0x42b769(0x134)&&typeof Reflect[_0x42b769(0x14c)]=='function')_0xce857d=Reflect[_0x42b769(0x14c)](_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6);else{for(var _0x1c2dc2=_0x2a2cfe[_0x42b769(0x153)]-0x1;_0x1c2dc2>=0x0;_0x1c2dc2--)(_0x3dd5f4=_0x2a2cfe[_0x1c2dc2])&&(_0xce857d=(_0xaa7867<0x3?_0x3dd5f4(_0xce857d):_0xaa7867>0x3?_0x3dd5f4(_0x5f11b6,_0x4cff74,_0xce857d):_0x3dd5f4(_0x5f11b6,_0x4cff74))||_0xce857d);}return _0xaa7867>0x3&&_0xce857d&&Object[_0x42b769(0x158)](_0x5f11b6,_0x4cff74,_0xce857d),_0xce857d;}let D=class extends _0x964a78{constructor(_0x248389,_0x4b2280,_0x481f59,_0x345168){const _0x65c9b7=_0xd15b79;super(),this[_0x65c9b7(0x129)]=_0x248389,this[_0x65c9b7(0x11c)]=_0x4b2280,this[_0x65c9b7(0x15c)]=_0x481f59,this[_0x65c9b7(0x163)]=_0x345168,this[_0x65c9b7(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x19022e=_0xd15b79;this[_0x19022e(0x138)](this[_0x19022e(0x11c)][_0x19022e(0x131)][_0x19022e(0x13e)](_0x487a59(0x10))[_0x19022e(0x120)](_0x50f22c=>{const _0x2fb1f5=_0x19022e;let _0xea3f22=new Set();_0x50f22c['forEach'](_0x38c9c7=>{const _0x4f178f=_0x5542;switch(_0x38c9c7[_0x4f178f(0x123)]){case _0x4f178f(0x150):{let _0x32020c=_0x38c9c7[_0x4f178f(0x125)][_0x4f178f(0x11d)];_0xea3f22[_0x4f178f(0x150)](_0x32020c);break;}default:break;}}),w(this[_0x2fb1f5(0x163)],_0xea3f22);}));}['_init'](){const _0x176ef9=_0xd15b79;this['disposeWithMe'](this[_0x176ef9(0x129)]['commentUpdate$'][_0x176ef9(0x120)](async _0x542773=>{const _0x5c100e=_0x176ef9;var _0x12b9a9;let _0x53a8a0=(_0x12b9a9=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x46e00d=>_0x46e00d['threadId']===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x12b9a9['root'];if(!_0x53a8a0)return;let {unitId:_0x557afb,subUnitId:_0x527440}=_0x53a8a0;switch(_0x542773[_0x5c100e(0x168)]&&this[_0x5c100e(0x15c)][_0x5c100e(0x12d)](_0x542773[_0x5c100e(0x168)]),_0x542773[_0x5c100e(0x123)]){case _0x22b8b2['Add']:break;case _0x22b8b2['Reply']:var _0x177a11,_0x2d2d75;this[_0x5c100e(0x11c)][_0x5c100e(0x14e)](_0x557afb,_0x527440,{'unitId':_0x557afb,'subUnitId':_0x527440,'ref':'','id':_0x542773['replyId'],'dT':C(+_0x542773['createTimestamp']),'threadId':_0x542773[_0x5c100e(0x16d)],'personId':(_0x177a11=(_0x2d2d75=_0x542773['user'])==null?void 0x0:_0x2d2d75[_0x5c100e(0x113)])==null?_0x542773[_0x5c100e(0x126)]:_0x177a11,'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)]),'parentId':_0x53a8a0['id']});break;case _0x22b8b2[_0x5c100e(0x10f)]:{let _0x4bf8e2=this[_0x5c100e(0x11c)][_0x5c100e(0x10d)](_0x557afb,_0x527440,_0x542773['replyId']);_0x4bf8e2&&_0x4bf8e2[_0x5c100e(0x15e)]&&this[_0x5c100e(0x11c)][_0x5c100e(0x156)](_0x557afb,_0x527440,_0x542773[_0x5c100e(0x142)]);break;}case _0x22b8b2['Edit']:this['_threadCommentModel']['updateComment'](_0x557afb,_0x527440,{'commentId':_0x542773['replyId'],'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)])});break;case _0x22b8b2[_0x5c100e(0x144)]:{var _0x138db3;let _0x3c0b89=(_0x138db3=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x6c76cb=>_0x6c76cb[_0x5c100e(0x16d)]===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x138db3[_0x5c100e(0x10c)];_0x3c0b89&&this[_0x5c100e(0x11c)][_0x5c100e(0x15f)](_0x557afb,_0x527440,_0x3c0b89['id'],_0x542773[_0x5c100e(0x10b)]===_0x377cc0['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x5882d4(_0x25f6af)),T(0x1,_0x5882d4(_0x51f282)),T(0x2,_0x5882d4(_0x3c2081)),T(0x3,_0x5882d4(_0x43fc57))],D);const O={};function k(_0xa841da,_0x196f2d){const _0x378891=_0xd15b79;let _0x3ba332=_0xa841da[_0x378891(0x177)][0x0];return{..._0x196f2d,'id':_0x3ba332['replyId'],'resolved':_0xa841da[_0x378891(0x10b)]===0x1,'dT':C(_0x3ba332[_0x378891(0x14b)]),'personId':_0x3ba332['userId'],'threadId':_0x3ba332['threadId']};}function A(_0x2e3ae1,_0x3fd916,_0x4aad09){const _0x5b8a4f=_0xd15b79;var _0x26cbaa,_0xddab36;if(((_0x26cbaa=_0x2e3ae1==null||(_0xddab36=_0x2e3ae1[_0x5b8a4f(0x177)])==null?void 0x0:_0xddab36[_0x5b8a4f(0x153)])==null?0x0:_0x26cbaa)>0x0){let _0x11a96d=(_0x1fe7e9,_0x44b4ac)=>({'id':_0x1fe7e9[_0x5b8a4f(0x142)],'threadId':_0x1fe7e9[_0x5b8a4f(0x16d)],'dT':C(_0x1fe7e9[_0x5b8a4f(0x14b)]),'personId':_0x1fe7e9[_0x5b8a4f(0x126)],'resolved':_0x2e3ae1[_0x5b8a4f(0x10b)]===_0x377cc0[_0x5b8a4f(0x116)],'unitId':_0x3fd916,'subUnitId':_0x4aad09,'text':JSON[_0x5b8a4f(0x162)](_0x1fe7e9[_0x5b8a4f(0x12e)]),'parentId':_0x44b4ac}),_0x58779e=_0x11a96d(_0x2e3ae1['replies'][0x0]);return{..._0x58779e,'children':_0x2e3ae1[_0x5b8a4f(0x177)][_0x5b8a4f(0x127)](0x1)[_0x5b8a4f(0x11f)](_0x4a1301=>_0x11a96d(_0x4a1301,_0x58779e['id']))};}return null;}let j=class{constructor(_0x4ac3e3,_0x40942b,_0xb86c1c){const _0x2574c5=_0xd15b79;this[_0x2574c5(0x152)]=_0x4ac3e3,this[_0x2574c5(0x15c)]=_0x40942b,this[_0x2574c5(0x16b)]=_0xb86c1c;}async['addComment'](_0x2c59de){const _0x1151a0=_0xd15b79;var _0x51a82c,_0x592397;let {parentId:_0x1650bb,unitId:_0x504390,text:_0x61dcf5,threadId:_0x4639d2}=_0x2c59de,_0xf6285a=(_0x51a82c=(_0x592397=_0x61dcf5[_0x1151a0(0x114)])==null?void 0x0:_0x592397['filter'](_0x2a064b=>_0x2a064b[_0x1151a0(0x136)]===_0x57416f[_0x1151a0(0x16e)])[_0x1151a0(0x11f)](_0x2fbc02=>_0x2fbc02[_0x1151a0(0x171)]))==null?[]:_0x51a82c,_0x125694=JSON[_0x1151a0(0x13d)](_0x61dcf5),_0x394d61=(await this['_sessionService'][_0x1151a0(0x172)](_0x504390))['getMemberID']();if(_0x1650bb){let _0x7d7930={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a,'threadId':_0x4639d2},_0x49e559=(await this[_0x1151a0(0x152)]['post'](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x147),{'body':_0x7d7930}))[_0x1151a0(0x167)]['reply'];return{..._0x2c59de,'id':_0x49e559[_0x1151a0(0x142)],'dT':_0x41cc06(+_0x49e559[_0x1151a0(0x14b)])[_0x1151a0(0x149)](_0x1151a0(0x15b)),'personId':_0x49e559[_0x1151a0(0x126)]};}else{let _0x6b35ad={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a};return k((await this[_0x1151a0(0x152)][_0x1151a0(0x13c)](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x143),{'body':_0x6b35ad}))['body'][_0x1151a0(0x170)],_0x2c59de);}}async['updateComment'](_0x2fcb08){const _0x1c017a=_0xd15b79;var _0x166e26,_0xd26345;let {text:_0x1f9092,unitId:_0x2bc514}=_0x2fcb08,_0x389fc3=(_0x166e26=(_0xd26345=_0x1f9092[_0x1c017a(0x114)])==null?void 0x0:_0xd26345[_0x1c017a(0x14f)](_0x22bbdf=>_0x22bbdf['rangeType']===_0x57416f[_0x1c017a(0x16e)])['map'](_0x400104=>_0x400104[_0x1c017a(0x171)]))==null?[]:_0x166e26,_0x296eb6=JSON[_0x1c017a(0x13d)](_0x1f9092),_0xaf692f=_0x2fcb08[_0x1c017a(0x16d)],_0xf9b763=_0x2fcb08['id'],_0x75df5f={'memberId':(await this['_sessionService']['requireSession'](_0x2bc514))[_0x1c017a(0x115)](),'unitId':_0x2bc514,'threadId':_0xaf692f,'mention':_0x389fc3,'content':_0x296eb6,'replyId':_0xf9b763},_0x321219=await this[_0x1c017a(0x152)][_0x1c017a(0x13c)](_0x1c017a(0x12b)+_0x2bc514+_0x1c017a(0x13f),{'body':_0x75df5f});return!_0x321219[_0x1c017a(0x167)][_0x1c017a(0x13b)]||_0x321219[_0x1c017a(0x167)]['error']['code']===0x1;}async[_0xd15b79(0x15f)](_0x5e34b1){const _0x32da46=_0xd15b79;let {unitId:_0x16388b}=_0x5e34b1,_0x16d222=_0x5e34b1['threadId'],_0x33b25c={'memberId':this[_0x32da46(0x15c)][_0x32da46(0x16c)]()[_0x32da46(0x113)],'unitId':_0x16388b,'threadId':_0x16d222,'solved':_0x5e34b1[_0x32da46(0x117)]?_0x377cc0['Solved']:_0x377cc0[_0x32da46(0x137)]},_0x120a92=await this[_0x32da46(0x152)][_0x32da46(0x13c)]('/universer-api/comment/unit/'+_0x16388b+'/solved',{'body':_0x33b25c});return!_0x120a92['body'][_0x32da46(0x13b)]||_0x120a92[_0x32da46(0x167)][_0x32da46(0x13b)][_0x32da46(0x173)]===0x1;}async[_0xd15b79(0x156)](_0x3993a9,_0x1b0dc3,_0x201f54,_0x34dcd4){const _0x2bbb08=_0xd15b79;let _0x23f612={'memberId':(await this[_0x2bbb08(0x16b)][_0x2bbb08(0x172)](_0x3993a9))[_0x2bbb08(0x115)](),'threadId':_0x201f54,'replyId':_0x34dcd4,'unitId':_0x3993a9},_0xe32e47=await this[_0x2bbb08(0x152)][_0x2bbb08(0x13c)](_0x2bbb08(0x12b)+_0x3993a9+_0x2bbb08(0x13a),{'body':_0x23f612});return!_0xe32e47['body'][_0x2bbb08(0x13b)]||_0xe32e47[_0x2bbb08(0x167)][_0x2bbb08(0x13b)][_0x2bbb08(0x173)]===0x1;}async[_0xd15b79(0x119)](_0x5242fa,_0x5838d3,_0x556e31){const _0x2c49c2=_0xd15b79;let _0x2f89aa={'unitId':_0x5242fa,'threadId':_0x556e31},_0x2f6f0c=await this[_0x2c49c2(0x152)]['post'](_0x2c49c2(0x12b)+_0x5242fa+_0x2c49c2(0x128),{'body':_0x2f89aa}),_0x248ecb=_0x556e31[_0x2c49c2(0x11f)](_0x3de4ce=>A(_0x2f6f0c[_0x2c49c2(0x167)][_0x2c49c2(0x14d)][_0x3de4ce],_0x5242fa,_0x5838d3))[_0x2c49c2(0x14f)](Boolean);return Object[_0x2c49c2(0x169)](_0x2f6f0c['body']['users'])[_0x2c49c2(0x165)](_0x3b6694=>{const _0x151045=_0x2c49c2;this[_0x151045(0x15c)]['addUser'](_0x3b6694);}),_0x248ecb;}[_0xd15b79(0x145)](_0x25fe57){const _0x503dbf=_0xd15b79;return{'id':_0x25fe57['id'],'threadId':_0x25fe57[_0x503dbf(0x16d)],'ref':_0x25fe57[_0x503dbf(0x174)]};}};j=E([T(0x0,_0x5882d4(_0x4965c2)),T(0x1,_0x5882d4(_0x3c2081)),T(0x2,_0x5882d4(_0x5d52fa))],j);let M=class extends _0x964a78{constructor(_0x49a199,_0x44691d){const _0x240d7d=_0xd15b79;super(),this[_0x240d7d(0x135)]=_0x49a199,this[_0x240d7d(0x140)]=_0x44691d,this[_0x240d7d(0x132)]();}[_0xd15b79(0x132)](){const _0x132133=_0xd15b79;this[_0x132133(0x135)][_0x132133(0x15d)]=this['_threadCommentDataSource'],this[_0x132133(0x135)]['syncUpdateMutationToColla']=!0x1;}};M=E([T(0x0,_0x59905f),T(0x1,_0x5882d4(j))],M);function N(_0x313aff){'@babel/helpers - typeof';const _0x5eb410=_0xd15b79;return N=typeof Symbol==_0x5eb410(0x178)&&typeof Symbol['iterator']==_0x5eb410(0x175)?function(_0x309e2f){return typeof _0x309e2f;}:function(_0xe99024){const _0x3107ed=_0x5eb410;return _0xe99024&&typeof Symbol==_0x3107ed(0x178)&&_0xe99024[_0x3107ed(0x11b)]===Symbol&&_0xe99024!==Symbol[_0x3107ed(0x133)]?_0x3107ed(0x175):typeof _0xe99024;},N(_0x313aff);}function P(_0x5b59e0,_0x1e32fe){const _0x2beae5=_0xd15b79;if(N(_0x5b59e0)!=_0x2beae5(0x134)||!_0x5b59e0)return _0x5b59e0;var _0xd577e4=_0x5b59e0[Symbol[_0x2beae5(0x122)]];if(_0xd577e4!==void 0x0){var _0x47a6d5=_0xd577e4[_0x2beae5(0x159)](_0x5b59e0,_0x1e32fe||'default');if(N(_0x47a6d5)!=_0x2beae5(0x134))return _0x47a6d5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x1e32fe==='string'?String:Number)(_0x5b59e0);}function F(_0x46591e){const _0x4fb0f4=_0xd15b79;var _0x2afe7b=P(_0x46591e,_0x4fb0f4(0x121));return N(_0x2afe7b)==_0x4fb0f4(0x175)?_0x2afe7b:_0x2afe7b+'';}function I(_0x1160f3,_0x3bd374,_0x23cee7){const _0x13746c=_0xd15b79;return(_0x3bd374=F(_0x3bd374))in _0x1160f3?Object[_0x13746c(0x158)](_0x1160f3,_0x3bd374,{'value':_0x23cee7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1160f3[_0x3bd374]=_0x23cee7,_0x1160f3;}let L=class extends _0x12c11e{constructor(_0x1896df=O,_0x19f372,_0x13f453){const _0x3cedf0=_0xd15b79;super(),this[_0x3cedf0(0x111)]=_0x1896df,this[_0x3cedf0(0x163)]=_0x19f372,this[_0x3cedf0(0x130)]=_0x13f453;let {..._0x3dd6bb}=_0xa513a0({},O,this[_0x3cedf0(0x111)]);this[_0x3cedf0(0x130)][_0x3cedf0(0x11a)]('thread-comment-data-source.config',_0x3dd6bb);}[_0xd15b79(0x110)](){[[j],[M],[D]]['forEach'](_0x45ac52=>{const _0x473b14=_0x5542;this[_0x473b14(0x163)][_0x473b14(0x150)](_0x45ac52);});}[_0xd15b79(0x15a)](){const _0x5bab25=_0xd15b79;this[_0x5bab25(0x163)][_0x5bab25(0x161)](M),this[_0x5bab25(0x163)][_0x5bab25(0x161)](D);}};I(L,_0xd15b79(0x14a),_0xd15b79(0x166)),I(L,'packageName',x),I(L,_0xd15b79(0x148),S),L=E([_0x2c6682(_0x5ab3d2,_0x457666,_0x1afcd4),T(0x1,_0x5882d4(_0x43fc57)),T(0x2,_0x5a4188)],L);export{L as UniverThreadCommentDataSourcePlugin};
|
|
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};
|
package/lib/types/index.d.ts
CHANGED
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x17a8(){const _0x3560dd=['OpenOrReOpen','UniverThreadCommentUi','@univerjs-pro/license','filter','amd','COMMENT','getUser','Injector','error','_initDataSource','content','default','defineProperty','requireSession','IConfigService','Solve','/add','reply','exports','HTTPService','28820BZsRFy','2704597ITALhF','replies','3716184wptFNE','userId','CollaborationSessionService','getMemberID','pluginName','ref','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','@univerjs-pro/thread-comment-datasource','rangeType','call','YYYY/MM/DD\x20HH:mm','code','getUnit','/universer-api/comment/unit/','40456juJbYO','packageName','subscribe','1.0.0-alpha.1','rangeId','bufferTime','userID','resolveComment','forEach','ThreadCommentModel','UniverThreadComment','1378431RssmNY','deleteComment','getComment','dateKit','get','addComment','pipe','4232464oFclFk','comments','syncUpdateMutationToColla','Solved','_userService','@univerjs-pro/collaboration-client','Module','@univerjs/protocol','UniverLicensePlugin','4jewsgJ','disposeWithMe','root','@univerjs/network','_threadCommentModel','slice','length','Edit','15FeiYjY','add','comment','_httpService','replyId','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Inject','body','getOwnPropertyDescriptor','@univerjs/core','/delete','onReady','_sessionService','41570RbFykR','function','size','decorate','solved','find','rxjs','createTimestamp','737cHopEF','payload','type','iterator','/solved','prototype','/list','thread-comment-data-source.config','CustomRangeType','Reply','delete','getCurrentUser','_config','setConfig','post','stringify','UniverThreadCommentUIPlugin','commentUpdate$','Add','CommentUpdateEventType','dataSource','Delete','updateComment','/universer-api/user/list','symbol','users','onStarting','UserManagerService','user','string','_configService','CommentSolvedStatus','Plugin','customRanges','_initUserSync','9EMixOh','UniverProCollaborationClient','parentId','_threadCommentDataSourceService','threadId','map','addUser','Disposable','_commentService','object','UniverNetwork','unitId','@univerjs/thread-comment'];_0x17a8=function(){return _0x3560dd;};return _0x17a8();}function _0x40c8(_0x2c7970,_0xb51c37){_0x2c7970=_0x2c7970-0x109;const _0x17a8f8=_0x17a8();let _0x40c86a=_0x17a8f8[_0x2c7970];return _0x40c86a;}(function(_0x2d6561,_0x4a2640){const _0x3b4e56=_0x40c8,_0x5639dc=_0x2d6561();while(!![]){try{const _0x38e116=-parseInt(_0x3b4e56(0x151))/0x1*(-parseInt(_0x3b4e56(0x16c))/0x2)+parseInt(_0x3b4e56(0x15c))/0x3+-parseInt(_0x3b4e56(0x13e))/0x4*(parseInt(_0x3b4e56(0x174))/0x5)+-parseInt(_0x3b4e56(0x141))/0x6+-parseInt(_0x3b4e56(0x13f))/0x7+-parseInt(_0x3b4e56(0x163))/0x8*(-parseInt(_0x3b4e56(0x11d))/0x9)+parseInt(_0x3b4e56(0x181))/0xa*(parseInt(_0x3b4e56(0x189))/0xb);if(_0x38e116===_0x4a2640)break;else _0x5639dc['push'](_0x5639dc['shift']());}catch(_0x4b2998){_0x5639dc['push'](_0x5639dc['shift']());}}}(_0x17a8,0x4e468),function(_0x254997,_0x1952ef){const _0x4e357e=_0x40c8;typeof exports==_0x4e357e(0x126)&&typeof module<'u'?_0x1952ef(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==_0x4e357e(0x182)&&define[_0x4e357e(0x12e)]?define([_0x4e357e(0x13c),_0x4e357e(0x168),_0x4e357e(0x12c),_0x4e357e(0x17d),'@univerjs/thread-comment-ui',_0x4e357e(0x16a),_0x4e357e(0x129),_0x4e357e(0x187),_0x4e357e(0x16f)],_0x1952ef):(_0x254997=typeof globalThis<'u'?globalThis:_0x254997||self,_0x1952ef(_0x254997['UniverProThreadCommentDatasource']={},_0x254997[_0x4e357e(0x11e)],_0x254997['UniverProLicense'],_0x254997['UniverCore'],_0x254997[_0x4e357e(0x12b)],_0x254997['UniverProtocol'],_0x254997[_0x4e357e(0x15b)],_0x254997['rxjs'],_0x254997[_0x4e357e(0x127)]));}(this,function(_0xe16ac3,_0x19c609,_0x5bb6b3,_0x56fec2,_0x4ee8fc,_0x5aaa67,_0x4edabe,_0x10b5fd,_0x52e141){const _0x3e11c3=_0x40c8;Object['defineProperty'](_0xe16ac3,Symbol['toStringTag'],{'value':_0x3e11c3(0x169)});var _0x28ccec=_0x3e11c3(0x14a),_0x29db91=_0x3e11c3(0x154);let _0x1a5763=_0x3d65d8=>(0x0,_0x56fec2['dateKit'])(new Date(+_0x3d65d8))[_0x3e11c3(0x149)]('YYYY/MM/DD\x20HH:mm'),_0x181f09=async(_0x2e6e19,_0x12707a)=>{const _0x2784ba=_0x3e11c3;let _0x2a6b05=_0x2e6e19['get'](_0x56fec2[_0x2784ba(0x115)]),_0xf93607=_0x2e6e19['get'](_0x52e141['HTTPService']);_0x12707a[_0x2784ba(0x159)](_0x3c6791=>{const _0x188480=_0x2784ba;_0x2a6b05[_0x188480(0x130)](_0x3c6791)&&_0x12707a[_0x188480(0x193)](_0x3c6791);}),_0x12707a[_0x2784ba(0x183)]&&(await _0xf93607[_0x2784ba(0x160)](_0x2784ba(0x111),{'params':{'userIDs':[..._0x12707a]}}))[_0x2784ba(0x17b)]['users'][_0x2784ba(0x159)](_0x19ef73=>{const _0x35d105=_0x2784ba;_0x19ef73&&_0x2a6b05[_0x35d105(0x123)](_0x19ef73);});};function _0x57d8a5(_0x213afb,_0x1fbd2a){return function(_0x4d5b7f,_0x18d316){_0x1fbd2a(_0x4d5b7f,_0x18d316,_0x213afb);};}function _0x30face(_0x3d5e38,_0x23b615,_0x1736c0,_0x255cdd){const _0x4b08c3=_0x3e11c3;var _0x30d70a=arguments['length'],_0x527467=_0x30d70a<0x3?_0x23b615:_0x255cdd===null?_0x255cdd=Object[_0x4b08c3(0x17c)](_0x23b615,_0x1736c0):_0x255cdd,_0x24898a;if(typeof Reflect=='object'&&typeof Reflect[_0x4b08c3(0x184)]==_0x4b08c3(0x182))_0x527467=Reflect[_0x4b08c3(0x184)](_0x3d5e38,_0x23b615,_0x1736c0,_0x255cdd);else{for(var _0x30f683=_0x3d5e38['length']-0x1;_0x30f683>=0x0;_0x30f683--)(_0x24898a=_0x3d5e38[_0x30f683])&&(_0x527467=(_0x30d70a<0x3?_0x24898a(_0x527467):_0x30d70a>0x3?_0x24898a(_0x23b615,_0x1736c0,_0x527467):_0x24898a(_0x23b615,_0x1736c0))||_0x527467);}return _0x30d70a>0x3&&_0x527467&&Object[_0x4b08c3(0x136)](_0x23b615,_0x1736c0,_0x527467),_0x527467;}let _0x44056e=class extends _0x56fec2[_0x3e11c3(0x124)]{constructor(_0xe3cefc,_0x2cb2fd,_0x395a17,_0x725013){const _0x1e4d4a=_0x3e11c3;super(),this[_0x1e4d4a(0x125)]=_0xe3cefc,this[_0x1e4d4a(0x170)]=_0x2cb2fd,this[_0x1e4d4a(0x167)]=_0x395a17,this[_0x1e4d4a(0x147)]=_0x725013,this['_init'](),this['_initUserSync']();}[_0x3e11c3(0x11c)](){const _0x18aeda=_0x3e11c3;this[_0x18aeda(0x16d)](this[_0x18aeda(0x170)][_0x18aeda(0x10b)][_0x18aeda(0x162)]((0x0,_0x10b5fd[_0x18aeda(0x156)])(0x10))[_0x18aeda(0x153)](_0x3cc7cc=>{const _0x5a354c=_0x18aeda;let _0x396087=new Set();_0x3cc7cc[_0x5a354c(0x159)](_0x246c7e=>{const _0x2229dc=_0x5a354c;switch(_0x246c7e[_0x2229dc(0x18b)]){case'add':{let _0x243cfb=_0x246c7e[_0x2229dc(0x18a)]['personId'];_0x396087['add'](_0x243cfb);break;}default:break;}}),_0x181f09(this['_injector'],_0x396087);}));}['_init'](){const _0x371361=_0x3e11c3;this[_0x371361(0x16d)](this['_commentService'][_0x371361(0x10b)][_0x371361(0x153)](async _0x362e51=>{const _0x46d2de=_0x371361;var _0x158454;let _0x19a828=(_0x158454=this['_threadCommentModel'][_0x46d2de(0x14f)](_0x362e51[_0x46d2de(0x128)])[_0x46d2de(0x186)](_0x3a3357=>_0x3a3357[_0x46d2de(0x121)]===_0x362e51[_0x46d2de(0x121)]))==null?void 0x0:_0x158454[_0x46d2de(0x16e)];if(!_0x19a828)return;let {unitId:_0x17a550,subUnitId:_0x5342b9}=_0x19a828;switch(_0x362e51['user']&&this[_0x46d2de(0x167)]['addUser'](_0x362e51[_0x46d2de(0x116)]),_0x362e51[_0x46d2de(0x18b)]){case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x10c)]:break;case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x192)]:var _0x471e8a,_0x52b450;this[_0x46d2de(0x170)][_0x46d2de(0x161)](_0x17a550,_0x5342b9,{'unitId':_0x17a550,'subUnitId':_0x5342b9,'ref':'','id':_0x362e51[_0x46d2de(0x178)],'dT':_0x1a5763(+_0x362e51['createTimestamp']),'threadId':_0x362e51[_0x46d2de(0x121)],'personId':(_0x471e8a=(_0x52b450=_0x362e51[_0x46d2de(0x116)])==null?void 0x0:_0x52b450[_0x46d2de(0x157)])==null?_0x362e51[_0x46d2de(0x142)]:_0x471e8a,'text':JSON['parse'](_0x362e51[_0x46d2de(0x134)]),'parentId':_0x19a828['id']});break;case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x10f)]:{let _0x44c9f3=this[_0x46d2de(0x170)][_0x46d2de(0x15e)](_0x17a550,_0x5342b9,_0x362e51[_0x46d2de(0x178)]);_0x44c9f3&&_0x44c9f3[_0x46d2de(0x11f)]&&this['_threadCommentModel'][_0x46d2de(0x15d)](_0x17a550,_0x5342b9,_0x362e51[_0x46d2de(0x178)]);break;}case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x173)]:this[_0x46d2de(0x170)][_0x46d2de(0x110)](_0x17a550,_0x5342b9,{'commentId':_0x362e51[_0x46d2de(0x178)],'text':JSON['parse'](_0x362e51[_0x46d2de(0x134)])});break;case _0x5aaa67['CommentUpdateEventType'][_0x46d2de(0x139)]:{var _0x13ef4e;let _0x2f7baa=(_0x13ef4e=this[_0x46d2de(0x170)][_0x46d2de(0x14f)](_0x362e51[_0x46d2de(0x128)])[_0x46d2de(0x186)](_0x197ca8=>_0x197ca8[_0x46d2de(0x121)]===_0x362e51[_0x46d2de(0x121)]))==null?void 0x0:_0x13ef4e[_0x46d2de(0x16e)];_0x2f7baa&&this[_0x46d2de(0x170)][_0x46d2de(0x158)](_0x17a550,_0x5342b9,_0x2f7baa['id'],_0x362e51['solved']===_0x5aaa67[_0x46d2de(0x119)]['Solved']);break;}default:break;}}));}};_0x44056e=_0x30face([_0x57d8a5(0x0,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x19c609['CommentService'])),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x4edabe[_0x3e11c3(0x15a)])),_0x57d8a5(0x2,(0x0,_0x56fec2['Inject'])(_0x56fec2['UserManagerService'])),_0x57d8a5(0x3,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x56fec2[_0x3e11c3(0x131)]))],_0x44056e);let _0x168d87={};function _0x2749ac(_0xfa36e3,_0x190a06){const _0x38c669=_0x3e11c3;let _0x3a3eda=_0xfa36e3[_0x38c669(0x140)][0x0];return{..._0x190a06,'id':_0x3a3eda[_0x38c669(0x178)],'resolved':_0xfa36e3[_0x38c669(0x185)]===0x1,'dT':_0x1a5763(_0x3a3eda['createTimestamp']),'personId':_0x3a3eda[_0x38c669(0x142)],'threadId':_0x3a3eda[_0x38c669(0x121)]};}function _0x40a562(_0x15d969,_0x102953,_0x17c763){const _0x29e0e8=_0x3e11c3;var _0x4214f4,_0x3246c4;if(((_0x4214f4=_0x15d969==null||(_0x3246c4=_0x15d969['replies'])==null?void 0x0:_0x3246c4[_0x29e0e8(0x172)])==null?0x0:_0x4214f4)>0x0){let _0x3cc84b=(_0x1c3eb2,_0x1e5945)=>({'id':_0x1c3eb2[_0x29e0e8(0x178)],'threadId':_0x1c3eb2[_0x29e0e8(0x121)],'dT':_0x1a5763(_0x1c3eb2[_0x29e0e8(0x188)]),'personId':_0x1c3eb2[_0x29e0e8(0x142)],'resolved':_0x15d969[_0x29e0e8(0x185)]===_0x5aaa67[_0x29e0e8(0x119)][_0x29e0e8(0x166)],'unitId':_0x102953,'subUnitId':_0x17c763,'text':JSON['parse'](_0x1c3eb2[_0x29e0e8(0x134)]),'parentId':_0x1e5945}),_0x2b257f=_0x3cc84b(_0x15d969[_0x29e0e8(0x140)][0x0]);return{..._0x2b257f,'children':_0x15d969[_0x29e0e8(0x140)][_0x29e0e8(0x171)](0x1)[_0x29e0e8(0x122)](_0x4dfa50=>_0x3cc84b(_0x4dfa50,_0x2b257f['id']))};}return null;}let _0x2a4a40=class{constructor(_0x28fb39,_0x4147df,_0x4127bf){const _0x481b9d=_0x3e11c3;this[_0x481b9d(0x177)]=_0x28fb39,this[_0x481b9d(0x167)]=_0x4147df,this[_0x481b9d(0x180)]=_0x4127bf;}async[_0x3e11c3(0x161)](_0x3ee1ed){const _0x2a1d3=_0x3e11c3;var _0x334fd5,_0x2dc991;let {parentId:_0x2a7ed8,unitId:_0x3fc052,text:_0x5c5a02,threadId:_0x3aeb71}=_0x3ee1ed,_0x50d204=(_0x334fd5=(_0x2dc991=_0x5c5a02[_0x2a1d3(0x11b)])==null?void 0x0:_0x2dc991[_0x2a1d3(0x12d)](_0x46fccd=>_0x46fccd[_0x2a1d3(0x14b)]===_0x56fec2[_0x2a1d3(0x191)][_0x2a1d3(0x12f)])[_0x2a1d3(0x122)](_0x2655c9=>_0x2655c9[_0x2a1d3(0x155)]))==null?[]:_0x334fd5,_0x4e6829=JSON['stringify'](_0x5c5a02),_0x959f16=(await this['_sessionService'][_0x2a1d3(0x137)](_0x3fc052))[_0x2a1d3(0x144)]();if(_0x2a7ed8){let _0x188ab6={'memberId':_0x959f16,'unitId':_0x3fc052,'content':_0x4e6829,'mention':_0x50d204,'threadId':_0x3aeb71},_0x140591=(await this[_0x2a1d3(0x177)][_0x2a1d3(0x197)]('/universer-api/comment/unit/'+_0x3fc052+'/reply',{'body':_0x188ab6}))[_0x2a1d3(0x17b)][_0x2a1d3(0x13b)];return{..._0x3ee1ed,'id':_0x140591['replyId'],'dT':(0x0,_0x56fec2[_0x2a1d3(0x15f)])(+_0x140591['createTimestamp'])[_0x2a1d3(0x149)](_0x2a1d3(0x14d)),'personId':_0x140591[_0x2a1d3(0x142)]};}else{let _0x39df19={'memberId':_0x959f16,'unitId':_0x3fc052,'content':_0x4e6829,'mention':_0x50d204};return _0x2749ac((await this[_0x2a1d3(0x177)][_0x2a1d3(0x197)]('/universer-api/comment/unit/'+_0x3fc052+_0x2a1d3(0x13a),{'body':_0x39df19}))[_0x2a1d3(0x17b)][_0x2a1d3(0x176)],_0x3ee1ed);}}async[_0x3e11c3(0x110)](_0x17cfff){const _0xb3eeed=_0x3e11c3;var _0x31fd22,_0x4b25a1;let {text:_0xd73e94,unitId:_0x5ebdfa}=_0x17cfff,_0x446dec=(_0x31fd22=(_0x4b25a1=_0xd73e94[_0xb3eeed(0x11b)])==null?void 0x0:_0x4b25a1['filter'](_0x45d75e=>_0x45d75e['rangeType']===_0x56fec2[_0xb3eeed(0x191)][_0xb3eeed(0x12f)])['map'](_0x761a27=>_0x761a27[_0xb3eeed(0x155)]))==null?[]:_0x31fd22,_0xf88174=JSON[_0xb3eeed(0x109)](_0xd73e94),_0x17c0b3=_0x17cfff[_0xb3eeed(0x121)],_0x2474e5=_0x17cfff['id'],_0x54e578={'memberId':(await this[_0xb3eeed(0x180)][_0xb3eeed(0x137)](_0x5ebdfa))[_0xb3eeed(0x144)](),'unitId':_0x5ebdfa,'threadId':_0x17c0b3,'mention':_0x446dec,'content':_0xf88174,'replyId':_0x2474e5},_0x5ddd3e=await this[_0xb3eeed(0x177)]['post']('/universer-api/comment/unit/'+_0x5ebdfa+'/edit',{'body':_0x54e578});return!_0x5ddd3e[_0xb3eeed(0x17b)][_0xb3eeed(0x132)]||_0x5ddd3e[_0xb3eeed(0x17b)][_0xb3eeed(0x132)][_0xb3eeed(0x14e)]===0x1;}async[_0x3e11c3(0x158)](_0x40c9ef){const _0x419c64=_0x3e11c3;let {unitId:_0x575ed5}=_0x40c9ef,_0x33c580=_0x40c9ef[_0x419c64(0x121)],_0x5c1a4e={'memberId':this['_userService'][_0x419c64(0x194)]()[_0x419c64(0x157)],'unitId':_0x575ed5,'threadId':_0x33c580,'solved':_0x40c9ef['resolved']?_0x5aaa67[_0x419c64(0x119)][_0x419c64(0x166)]:_0x5aaa67[_0x419c64(0x119)][_0x419c64(0x12a)]},_0x15b27f=await this[_0x419c64(0x177)][_0x419c64(0x197)](_0x419c64(0x150)+_0x575ed5+_0x419c64(0x18d),{'body':_0x5c1a4e});return!_0x15b27f[_0x419c64(0x17b)][_0x419c64(0x132)]||_0x15b27f['body'][_0x419c64(0x132)][_0x419c64(0x14e)]===0x1;}async['deleteComment'](_0x4bd8c7,_0x3ff2a0,_0x487d77,_0x1bfeca){const _0x5c2a47=_0x3e11c3;let _0x585e49={'memberId':(await this[_0x5c2a47(0x180)][_0x5c2a47(0x137)](_0x4bd8c7))['getMemberID'](),'threadId':_0x487d77,'replyId':_0x1bfeca,'unitId':_0x4bd8c7},_0x52aabd=await this[_0x5c2a47(0x177)][_0x5c2a47(0x197)](_0x5c2a47(0x150)+_0x4bd8c7+_0x5c2a47(0x17e),{'body':_0x585e49});return!_0x52aabd[_0x5c2a47(0x17b)][_0x5c2a47(0x132)]||_0x52aabd['body'][_0x5c2a47(0x132)]['code']===0x1;}async['listComments'](_0x4d1105,_0x59b239,_0x4f1cba){const _0x3a093d=_0x3e11c3;let _0x348755={'unitId':_0x4d1105,'threadId':_0x4f1cba},_0x4ff23c=await this['_httpService']['post'](_0x3a093d(0x150)+_0x4d1105+_0x3a093d(0x18f),{'body':_0x348755}),_0x440e08=_0x4f1cba['map'](_0x1ef926=>_0x40a562(_0x4ff23c['body'][_0x3a093d(0x164)][_0x1ef926],_0x4d1105,_0x59b239))[_0x3a093d(0x12d)](Boolean);return Object['values'](_0x4ff23c['body'][_0x3a093d(0x113)])['forEach'](_0x1a0a41=>{const _0x3e2c37=_0x3a093d;this[_0x3e2c37(0x167)][_0x3e2c37(0x123)](_0x1a0a41);}),_0x440e08;}['saveCommentToSnapshot'](_0x14bff9){const _0x381cd1=_0x3e11c3;return{'id':_0x14bff9['id'],'threadId':_0x14bff9[_0x381cd1(0x121)],'ref':_0x14bff9[_0x381cd1(0x146)]};}};_0x2a4a40=_0x30face([_0x57d8a5(0x0,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x52e141[_0x3e11c3(0x13d)])),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x56fec2[_0x3e11c3(0x115)])),_0x57d8a5(0x2,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x19c609[_0x3e11c3(0x143)]))],_0x2a4a40);let _0x5c5a47=class extends _0x56fec2[_0x3e11c3(0x124)]{constructor(_0x45304f,_0x309052){const _0xcc3f32=_0x3e11c3;super(),this[_0xcc3f32(0x120)]=_0x45304f,this['_threadCommentDataSource']=_0x309052,this[_0xcc3f32(0x133)]();}[_0x3e11c3(0x133)](){const _0x44d043=_0x3e11c3;this[_0x44d043(0x120)][_0x44d043(0x10e)]=this['_threadCommentDataSource'],this[_0x44d043(0x120)][_0x44d043(0x165)]=!0x1;}};_0x5c5a47=_0x30face([_0x57d8a5(0x0,_0x4edabe['IThreadCommentDataSourceService']),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x2a4a40))],_0x5c5a47);function _0x535b59(_0x21df6c){'@babel/helpers - typeof';const _0x480529=_0x3e11c3;return _0x535b59=typeof Symbol=='function'&&typeof Symbol[_0x480529(0x18c)]==_0x480529(0x112)?function(_0x233b86){return typeof _0x233b86;}:function(_0x3c69c4){const _0x8c8e42=_0x480529;return _0x3c69c4&&typeof Symbol=='function'&&_0x3c69c4['constructor']===Symbol&&_0x3c69c4!==Symbol[_0x8c8e42(0x18e)]?'symbol':typeof _0x3c69c4;},_0x535b59(_0x21df6c);}function _0x5dcd6f(_0x32bcf1,_0x5151ea){const _0x3f1be3=_0x3e11c3;if(_0x535b59(_0x32bcf1)!=_0x3f1be3(0x126)||!_0x32bcf1)return _0x32bcf1;var _0x164732=_0x32bcf1[Symbol['toPrimitive']];if(_0x164732!==void 0x0){var _0x263e46=_0x164732[_0x3f1be3(0x14c)](_0x32bcf1,_0x5151ea||_0x3f1be3(0x135));if(_0x535b59(_0x263e46)!=_0x3f1be3(0x126))return _0x263e46;throw TypeError(_0x3f1be3(0x179));}return(_0x5151ea==='string'?String:Number)(_0x32bcf1);}function _0x47c5c2(_0x51605f){const _0x3e5400=_0x3e11c3;var _0x27bf0f=_0x5dcd6f(_0x51605f,_0x3e5400(0x117));return _0x535b59(_0x27bf0f)==_0x3e5400(0x112)?_0x27bf0f:_0x27bf0f+'';}function _0x2a2722(_0x454a76,_0x303f17,_0x3c6d0b){return(_0x303f17=_0x47c5c2(_0x303f17))in _0x454a76?Object['defineProperty'](_0x454a76,_0x303f17,{'value':_0x3c6d0b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x454a76[_0x303f17]=_0x3c6d0b,_0x454a76;}let _0x12bf40=class extends _0x56fec2[_0x3e11c3(0x11a)]{constructor(_0x300596=_0x168d87,_0x2b7570,_0xedb30d){const _0x1414d3=_0x3e11c3;super(),this['_config']=_0x300596,this[_0x1414d3(0x147)]=_0x2b7570,this['_configService']=_0xedb30d;let {..._0x1692fd}=(0x0,_0x56fec2['merge'])({},_0x168d87,this[_0x1414d3(0x195)]);this[_0x1414d3(0x118)][_0x1414d3(0x196)](_0x1414d3(0x190),_0x1692fd);}[_0x3e11c3(0x114)](){[[_0x2a4a40],[_0x5c5a47],[_0x44056e]]['forEach'](_0x5485c6=>{const _0x49c08c=_0x40c8;this[_0x49c08c(0x147)][_0x49c08c(0x175)](_0x5485c6);});}[_0x3e11c3(0x17f)](){const _0x32d627=_0x3e11c3;this[_0x32d627(0x147)][_0x32d627(0x160)](_0x5c5a47),this[_0x32d627(0x147)][_0x32d627(0x160)](_0x44056e);}};_0x2a2722(_0x12bf40,_0x3e11c3(0x145),_0x3e11c3(0x148)),_0x2a2722(_0x12bf40,_0x3e11c3(0x152),_0x28ccec),_0x2a2722(_0x12bf40,'version',_0x29db91),_0x12bf40=_0x30face([(0x0,_0x56fec2['DependentOn'])(_0x4ee8fc[_0x3e11c3(0x10a)],_0x19c609['UniverCollaborationClientPlugin'],_0x5bb6b3[_0x3e11c3(0x16b)]),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x56fec2[_0x3e11c3(0x131)])),_0x57d8a5(0x2,_0x56fec2[_0x3e11c3(0x138)])],_0x12bf40),Object['defineProperty'](_0xe16ac3,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return _0x12bf40;}});}));
|
|
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();}
|
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.3",
|
|
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/
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/
|
|
54
|
+
"@univerjs-pro/collaboration-client": "1.0.0-alpha.3",
|
|
55
|
+
"@univerjs/core": "1.0.0-alpha.3",
|
|
56
|
+
"@univerjs/protocol": "1.0.0-alpha.3",
|
|
57
|
+
"@univerjs/thread-comment-ui": "1.0.0-alpha.3",
|
|
58
|
+
"@univerjs/thread-comment": "1.0.0-alpha.3",
|
|
59
|
+
"@univerjs/network": "1.0.0-alpha.3",
|
|
60
|
+
"@univerjs-pro/license": "1.0.0-alpha.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"rxjs": "7.8.2",
|
|
64
64
|
"typescript": "^6.0.3",
|
|
65
|
-
"vitest": "^4.1.
|
|
66
|
-
"@univerjs-infra/shared": "1.0.0-alpha.
|
|
65
|
+
"vitest": "^4.1.10",
|
|
66
|
+
"@univerjs-infra/shared": "1.0.0-alpha.3"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"test": "vitest run",
|