@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506151606 → 0.8.1-nightly.202506171607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4273bd=_0x2cbf;(function(_0x29cc5b,_0x2f58a2){const _0x4d14dd=_0x2cbf,_0x2a8a56=_0x29cc5b();while(!![]){try{const _0x454db6=parseInt(_0x4d14dd(0x15a))/0x1+parseInt(_0x4d14dd(0x195))/0x2*(-parseInt(_0x4d14dd(0x14a))/0x3)+-parseInt(_0x4d14dd(0x172))/0x4+-parseInt(_0x4d14dd(0x13f))/0x5+-parseInt(_0x4d14dd(0x19c))/0x6*(-parseInt(_0x4d14dd(0x15e))/0x7)+parseInt(_0x4d14dd(0x17f))/0x8*(-parseInt(_0x4d14dd(0x148))/0x9)+parseInt(_0x4d14dd(0x143))/0xa*(parseInt(_0x4d14dd(0x197))/0xb);if(_0x454db6===_0x2f58a2)break;else _0x2a8a56['push'](_0x2a8a56['shift']());}catch(_0x5b8a91){_0x2a8a56['push'](_0x2a8a56['shift']());}}}(_0x17a9,0xee943));Object['defineProperty'](exports,Symbol[_0x4273bd(0x184)],{'value':_0x4273bd(0x160)});const b=require(_0x4273bd(0x17a)),T=require(_0x4273bd(0x1a0)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x4273bd(0x193)),w=require('rxjs'),P=require(_0x4273bd(0x18b)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa0d434=>(_0xa0d434[_0xa0d434[_0x4273bd(0x192)]=0x0]=_0x4273bd(0x192),_0xa0d434[_0xa0d434[_0x4273bd(0x1b9)]=0x1]=_0x4273bd(0x1b9),_0xa0d434[_0xa0d434[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0xa0d434))(I||{}),v=(_0x84d24e=>(_0x84d24e[_0x84d24e[_0x4273bd(0x173)]=0x0]=_0x4273bd(0x173),_0x84d24e[_0x84d24e[_0x4273bd(0x142)]=0x1]=_0x4273bd(0x142),_0x84d24e[_0x84d24e[_0x4273bd(0x1b4)]=0x2]=_0x4273bd(0x1b4),_0x84d24e[_0x84d24e[_0x4273bd(0x169)]=0x3]=_0x4273bd(0x169),_0x84d24e[_0x84d24e['Delete']=0x4]=_0x4273bd(0x151),_0x84d24e[_0x84d24e[_0x4273bd(0x13d)]=0x5]=_0x4273bd(0x13d),_0x84d24e[_0x84d24e[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0x84d24e))(v||{});function _0x17a9(){const _0x20b6cc=['CommentService','replies','OpenOrReOpen','@univerjs/thread-comment','threadId','2PXpWfn','/list','6167953iGjqGb','unitId','updateComment','/universer-api/comment/unit/','type','326958QOjHVX','thread-comment-data-source.config','size','CustomRangeType','@univerjs-pro/license','pluginName','add','post','listComments','content','length','UniverCollaborationClientPlugin','stringify','slice','_threadCommentModel','defineProperty','_threadCommentDataSource','format','addUser','/add','userID','UniverInstanceType','replyId','COMMENT','Reply','IThreadCommentDataSourceService','rangeId','delete','getOwnPropertyDescriptor','Solved','deleteComment','getComment','/reply','Solve','addComment','1633630IQHajo','user','customRanges','Add','20pTyODt','dataSource','Inject','reply','values','27eahPCu','merge','4257717NAMSyC','resolveComment','filter','UniverThreadCommentUIPlugin','_configService','Disposable','saveCommentToSnapshot','Delete','getMemberID','_initUserSync','parse','UserManagerService','onStarting','Injector','YYYY/MM/DD\x20HH:mm','root','1371983ZtqkGd','personId','_threadCommentDataSourceService','HTTPService','154tMbmhp','_injector','Module','userId','forEach','UNRECOGNIZED','map','/solved','_userService','comments','/edit','Edit','_sessionService','solved','find','bufferTime','_init','dayjs','setConfig','getUnit','3508600eoTWEO','Unknown','ref','body','createTimestamp','getUser','symbol','subscribe','@univerjs-pro/collaboration-client','disposeWithMe','_commentService','users','code','245176TtbPNs','commentUpdate$','_initDataSource','comment','/universer-api/user/list','toStringTag','/delete','requireSession','error','UniverThreadCommentDataSourcePlugin','getCurrentUser','pipe','@univerjs/network','onReady','_httpService','CollaborationSessionService','get'];_0x17a9=function(){return _0x20b6cc;};return _0x17a9();}function _0x2cbf(_0x287195,_0x38ddd4){const _0x17a997=_0x17a9();return _0x2cbf=function(_0x2cbfa2,_0x2aa9e7){_0x2cbfa2=_0x2cbfa2-0x13a;let _0x1fb4e6=_0x17a997[_0x2cbfa2];return _0x1fb4e6;},_0x2cbf(_0x287195,_0x38ddd4);}const f=_0x2b3911=>c[_0x4273bd(0x16f)](new Date(+_0x2b3911))[_0x4273bd(0x1ad)](_0x4273bd(0x158)),R=async(_0x230799,_0x4d9cba)=>{const _0x36fb89=_0x4273bd,_0x19ae31=_0x230799[_0x36fb89(0x18f)](c[_0x36fb89(0x155)]),_0x11fed7=_0x230799[_0x36fb89(0x18f)](P[_0x36fb89(0x15d)]);_0x4d9cba[_0x36fb89(0x162)](_0x47e4a2=>{const _0x2eac18=_0x36fb89;_0x19ae31[_0x2eac18(0x177)](_0x47e4a2)&&_0x4d9cba[_0x2eac18(0x1b7)](_0x47e4a2);}),_0x4d9cba[_0x36fb89(0x19e)]&&(await _0x11fed7[_0x36fb89(0x18f)](_0x36fb89(0x183),{'params':{'userIDs':[..._0x4d9cba]}}))[_0x36fb89(0x175)]['users']['forEach'](_0x2f5f93=>{const _0x3a38e1=_0x36fb89;_0x2f5f93&&_0x19ae31[_0x3a38e1(0x1ae)](_0x2f5f93);});};var $=Object[_0x4273bd(0x1b8)],E=(_0x4bf83a,_0x2a48c5,_0x42bc98,_0x2fc269)=>{const _0x3a769d=_0x4273bd;for(var _0xafc864=_0x2fc269>0x1?void 0x0:_0x2fc269?$(_0x2a48c5,_0x42bc98):_0x2a48c5,_0x57594f=_0x4bf83a[_0x3a769d(0x1a6)]-0x1,_0x541465;_0x57594f>=0x0;_0x57594f--)(_0x541465=_0x4bf83a[_0x57594f])&&(_0xafc864=_0x541465(_0xafc864)||_0xafc864);return _0xafc864;},S=(_0x44fc3f,_0x4852ba)=>(_0x19cdcf,_0x33ab5b)=>_0x4852ba(_0x19cdcf,_0x33ab5b,_0x44fc3f);let p=class extends c['Disposable']{constructor(_0x264886,_0x1061f3,_0x48eb89,_0x1df609){const _0x57795b=_0x4273bd;super(),this[_0x57795b(0x17c)]=_0x264886,this[_0x57795b(0x1aa)]=_0x1061f3,this['_userService']=_0x48eb89,this['_injector']=_0x1df609,this[_0x57795b(0x16e)](),this['_initUserSync']();}[_0x4273bd(0x153)](){const _0x2b11ca=_0x4273bd;this['disposeWithMe'](this[_0x2b11ca(0x1aa)][_0x2b11ca(0x180)][_0x2b11ca(0x18a)](w[_0x2b11ca(0x16d)](0x10))[_0x2b11ca(0x179)](_0x115cd3=>{const _0x35e97a=_0x2b11ca,_0x2a8831=new Set();_0x115cd3[_0x35e97a(0x162)](_0x532699=>{const _0x4e0ff6=_0x35e97a;switch(_0x532699[_0x4e0ff6(0x19b)]){case _0x4e0ff6(0x1a2):{const _0x44ffd3=_0x532699['payload'][_0x4e0ff6(0x15b)];_0x2a8831[_0x4e0ff6(0x1a2)](_0x44ffd3);break;}}}),R(this[_0x35e97a(0x15f)],_0x2a8831);}));}[_0x4273bd(0x16e)](){const _0xd0d3e1=_0x4273bd;this[_0xd0d3e1(0x17b)](this[_0xd0d3e1(0x17c)][_0xd0d3e1(0x180)][_0xd0d3e1(0x179)](async _0x19d04a=>{const _0x74aaba=_0xd0d3e1;var _0x1149c7,_0x3553ea,_0x1d705f,_0x5480a4;const _0x37be08=(_0x1149c7=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x5d3c96=>_0x5d3c96[_0x74aaba(0x194)]===_0x19d04a[_0x74aaba(0x194)]))==null?void 0x0:_0x1149c7[_0x74aaba(0x159)];if(!_0x37be08)return;const {unitId:_0x1a8772,subUnitId:_0x18443a}=_0x37be08;switch(_0x19d04a[_0x74aaba(0x140)]&&this[_0x74aaba(0x166)][_0x74aaba(0x1ae)](_0x19d04a[_0x74aaba(0x140)]),_0x19d04a[_0x74aaba(0x19b)]){case v['Add']:break;case v[_0x74aaba(0x1b4)]:{this['_threadCommentModel'][_0x74aaba(0x13e)](_0x1a8772,_0x18443a,{'unitId':_0x1a8772,'subUnitId':_0x18443a,'ref':'','id':_0x19d04a[_0x74aaba(0x1b2)],'dT':f(+_0x19d04a['createTimestamp']),'threadId':_0x19d04a['threadId'],'personId':(_0x1d705f=(_0x3553ea=_0x19d04a[_0x74aaba(0x140)])==null?void 0x0:_0x3553ea[_0x74aaba(0x1b0)])!=null?_0x1d705f:_0x19d04a[_0x74aaba(0x161)],'text':JSON['parse'](_0x19d04a[_0x74aaba(0x1a5)]),'parentId':_0x37be08['id']});break;}case v[_0x74aaba(0x151)]:{const _0x3c6d6a=this['_threadCommentModel'][_0x74aaba(0x13b)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);_0x3c6d6a&&_0x3c6d6a['parentId']&&this[_0x74aaba(0x1aa)][_0x74aaba(0x13a)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);break;}case v[_0x74aaba(0x169)]:{this[_0x74aaba(0x1aa)][_0x74aaba(0x199)](_0x1a8772,_0x18443a,{'commentId':_0x19d04a[_0x74aaba(0x1b2)],'text':JSON[_0x74aaba(0x154)](_0x19d04a[_0x74aaba(0x1a5)])});break;}case v[_0x74aaba(0x13d)]:{const _0x479c2a=(_0x5480a4=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x4bea40=>_0x4bea40[_0x74aaba(0x194)]===_0x19d04a['threadId']))==null?void 0x0:_0x5480a4[_0x74aaba(0x159)];_0x479c2a&&this[_0x74aaba(0x1aa)][_0x74aaba(0x14b)](_0x1a8772,_0x18443a,_0x479c2a['id'],_0x19d04a[_0x74aaba(0x16b)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4273bd(0x145)](b[_0x4273bd(0x190)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),S(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],p);const q=_0x4273bd(0x19d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x468ad3,_0x392c31,_0x274bea,_0x32493d)=>{const _0x2a0b14=_0x4273bd;for(var _0x6fe643=_0x32493d>0x1?void 0x0:_0x32493d?A(_0x392c31,_0x274bea):_0x392c31,_0x2eebe1=_0x468ad3[_0x2a0b14(0x1a6)]-0x1,_0x22217f;_0x2eebe1>=0x0;_0x2eebe1--)(_0x22217f=_0x468ad3[_0x2eebe1])&&(_0x6fe643=_0x22217f(_0x6fe643)||_0x6fe643);return _0x6fe643;},_=(_0x5a1818,_0x13defc)=>(_0x3ae528,_0xa1c54c)=>_0x13defc(_0x3ae528,_0xa1c54c,_0x5a1818);function Y(_0x5bc337,_0x5d4108){const _0x44a02f=_0x4273bd,_0xf1f264=_0x5bc337[_0x44a02f(0x191)][0x0];return{..._0x5d4108,'id':_0xf1f264[_0x44a02f(0x1b2)],'resolved':_0x5bc337['solved']===0x1,'dT':f(_0xf1f264[_0x44a02f(0x176)]),'personId':_0xf1f264[_0x44a02f(0x161)],'threadId':_0xf1f264[_0x44a02f(0x194)]};}function G(_0x23e508,_0xad24cd,_0x37a589){const _0x2b55ef=_0x4273bd;var _0x12cd8b,_0x17fead;if(((_0x17fead=(_0x12cd8b=_0x23e508==null?void 0x0:_0x23e508[_0x2b55ef(0x191)])==null?void 0x0:_0x12cd8b['length'])!=null?_0x17fead:0x0)>0x0){const _0x593c7a=(_0x58b718,_0x7d408b)=>({'id':_0x58b718[_0x2b55ef(0x1b2)],'threadId':_0x58b718['threadId'],'dT':f(_0x58b718[_0x2b55ef(0x176)]),'personId':_0x58b718[_0x2b55ef(0x161)],'resolved':_0x23e508[_0x2b55ef(0x16b)]===I[_0x2b55ef(0x1b9)],'unitId':_0xad24cd,'subUnitId':_0x37a589,'text':JSON[_0x2b55ef(0x154)](_0x58b718[_0x2b55ef(0x1a5)]),'parentId':_0x7d408b}),_0x8b9e48=_0x593c7a(_0x23e508[_0x2b55ef(0x191)][0x0]);return{..._0x8b9e48,'children':_0x23e508['replies'][_0x2b55ef(0x1a9)](0x1)[_0x2b55ef(0x164)](_0x284e00=>_0x593c7a(_0x284e00,_0x8b9e48['id']))};}return null;}let g=class{constructor(_0x2a456d,_0x249a61,_0x5771c6,_0x4e62c2){const _0x215154=_0x4273bd;this[_0x215154(0x18d)]=_0x2a456d,this[_0x215154(0x166)]=_0x249a61,this[_0x215154(0x16a)]=_0x5771c6,this[_0x215154(0x15f)]=_0x4e62c2;}async['addComment'](_0x2e8cef){const _0x26b1ec=_0x4273bd;var _0x577014,_0x3ee63c;const {parentId:_0x4f7f9f,unitId:_0x38c36c,text:_0x1c2e21,threadId:_0x57a25b}=_0x2e8cef,_0x1938fb=(_0x3ee63c=(_0x577014=_0x1c2e21[_0x26b1ec(0x141)])==null?void 0x0:_0x577014[_0x26b1ec(0x14c)](_0x15f923=>_0x15f923['rangeType']===c[_0x26b1ec(0x19f)][_0x26b1ec(0x1b3)])['map'](_0x1c65f4=>_0x1c65f4['rangeId']))!=null?_0x3ee63c:[],_0x224608=JSON[_0x26b1ec(0x1a8)](_0x1c2e21),_0x4d3e72=(await this[_0x26b1ec(0x16a)][_0x26b1ec(0x186)](_0x38c36c))[_0x26b1ec(0x152)]();if(_0x4f7f9f){const _0xdd3ea8={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb,'threadId':_0x57a25b},_0x3126c3=(await this[_0x26b1ec(0x18d)]['post'](_0x26b1ec(0x19a)+_0x38c36c+_0x26b1ec(0x13c),{'body':_0xdd3ea8}))['body'][_0x26b1ec(0x146)];return{..._0x2e8cef,'id':_0x3126c3[_0x26b1ec(0x1b2)],'dT':c['dayjs'](+_0x3126c3[_0x26b1ec(0x176)])[_0x26b1ec(0x1ad)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3126c3[_0x26b1ec(0x161)]};}else{const _0x55b603={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb},_0x51b327=await this[_0x26b1ec(0x18d)][_0x26b1ec(0x1a3)]('/universer-api/comment/unit/'+_0x38c36c+_0x26b1ec(0x1af),{'body':_0x55b603});return Y(_0x51b327[_0x26b1ec(0x175)][_0x26b1ec(0x182)],_0x2e8cef);}}async[_0x4273bd(0x199)](_0x403483){const _0x177b82=_0x4273bd;var _0x24e9ac,_0x45df38;const {text:_0x2a8d1b,unitId:_0x1ba52d}=_0x403483,_0x315fc7=(_0x45df38=(_0x24e9ac=_0x2a8d1b[_0x177b82(0x141)])==null?void 0x0:_0x24e9ac[_0x177b82(0x14c)](_0x2e710d=>_0x2e710d['rangeType']===c[_0x177b82(0x19f)][_0x177b82(0x1b3)])[_0x177b82(0x164)](_0x22c69e=>_0x22c69e[_0x177b82(0x1b6)]))!=null?_0x45df38:[],_0xfcff2c=JSON[_0x177b82(0x1a8)](_0x2a8d1b),_0x2bc939=_0x403483[_0x177b82(0x194)],_0x4f6e0a=_0x403483['id'],_0x10405={'memberId':(await this[_0x177b82(0x16a)][_0x177b82(0x186)](_0x1ba52d))[_0x177b82(0x152)](),'unitId':_0x1ba52d,'threadId':_0x2bc939,'mention':_0x315fc7,'content':_0xfcff2c,'replyId':_0x4f6e0a},_0x1f9903=await this[_0x177b82(0x18d)][_0x177b82(0x1a3)](_0x177b82(0x19a)+_0x1ba52d+_0x177b82(0x168),{'body':_0x10405});return!_0x1f9903['body'][_0x177b82(0x187)]||_0x1f9903['body'][_0x177b82(0x187)][_0x177b82(0x17e)]===0x1;}async[_0x4273bd(0x14b)](_0x1cbcf2){const _0x11715f=_0x4273bd,{unitId:_0x447ddd}=_0x1cbcf2,_0x3c7d41=_0x1cbcf2[_0x11715f(0x194)],_0x2fb78d={'memberId':this['_userService'][_0x11715f(0x189)]()[_0x11715f(0x1b0)],'unitId':_0x447ddd,'threadId':_0x3c7d41,'solved':_0x1cbcf2['resolved']?I[_0x11715f(0x1b9)]:I[_0x11715f(0x192)]},_0x29bae8=await this[_0x11715f(0x18d)][_0x11715f(0x1a3)](_0x11715f(0x19a)+_0x447ddd+_0x11715f(0x165),{'body':_0x2fb78d});return!_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)]||_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)][_0x11715f(0x17e)]===0x1;}async[_0x4273bd(0x13a)](_0x21cd4f,_0x4adb5f,_0x34f2e9,_0x10d016){const _0x52c0f4=_0x4273bd,_0xa677d1={'memberId':(await this[_0x52c0f4(0x16a)]['requireSession'](_0x21cd4f))[_0x52c0f4(0x152)](),'threadId':_0x34f2e9,'replyId':_0x10d016,'unitId':_0x21cd4f},_0x3a1c65=await this[_0x52c0f4(0x18d)]['post']('/universer-api/comment/unit/'+_0x21cd4f+_0x52c0f4(0x185),{'body':_0xa677d1});return!_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)]||_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)][_0x52c0f4(0x17e)]===0x1;}async[_0x4273bd(0x1a4)](_0x2d7023,_0x21a88f,_0x429aeb){const _0x15af0e=_0x4273bd,_0x222050={'unitId':_0x2d7023,'threadId':_0x429aeb},_0x58df2f=await this['_httpService']['post'](_0x15af0e(0x19a)+_0x2d7023+_0x15af0e(0x196),{'body':_0x222050}),_0x383f12=_0x429aeb[_0x15af0e(0x164)](_0x3940c8=>G(_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x167)][_0x3940c8],_0x2d7023,_0x21a88f))['filter'](Boolean);return Object[_0x15af0e(0x147)](_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x17d)])[_0x15af0e(0x162)](_0x17aa39=>{const _0xd50f0a=_0x15af0e;this[_0xd50f0a(0x166)][_0xd50f0a(0x1ae)](_0x17aa39);}),_0x383f12;}[_0x4273bd(0x150)](_0x5664a5){const _0x3976ce=_0x4273bd;return{'id':_0x5664a5['id'],'threadId':_0x5664a5[_0x3976ce(0x194)],'ref':_0x5664a5[_0x3976ce(0x174)]};}};g=x([_(0x0,c['Inject'](P[_0x4273bd(0x15d)])),_(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),_(0x2,c[_0x4273bd(0x145)](b[_0x4273bd(0x18e)])),_(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],g);var H=Object[_0x4273bd(0x1b8)],J=(_0x2d4c5a,_0x1346f6,_0x59959c,_0x57c7c9)=>{const _0x386148=_0x4273bd;for(var _0x527f88=_0x57c7c9>0x1?void 0x0:_0x57c7c9?H(_0x1346f6,_0x59959c):_0x1346f6,_0x470177=_0x2d4c5a[_0x386148(0x1a6)]-0x1,_0x536093;_0x470177>=0x0;_0x470177--)(_0x536093=_0x2d4c5a[_0x470177])&&(_0x527f88=_0x536093(_0x527f88)||_0x527f88);return _0x527f88;},y=(_0x23f083,_0x118a7b)=>(_0x2a12dc,_0x23789f)=>_0x118a7b(_0x2a12dc,_0x23789f,_0x23f083);let C=class extends c[_0x4273bd(0x14f)]{constructor(_0x5cf0f7,_0x1ef115){const _0xa669b7=_0x4273bd;super(),this[_0xa669b7(0x15c)]=_0x5cf0f7,this[_0xa669b7(0x1ac)]=_0x1ef115,this[_0xa669b7(0x181)]();}[_0x4273bd(0x181)](){const _0x55a005=_0x4273bd;this['_threadCommentDataSourceService'][_0x55a005(0x144)]=this[_0x55a005(0x1ac)],this[_0x55a005(0x15c)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4273bd(0x1b5)]),y(0x1,c[_0x4273bd(0x145)](g))],C);var F=Object[_0x4273bd(0x1ab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x44b245,_0xf05778,_0x3f2f95)=>_0xf05778 in _0x44b245?F(_0x44b245,_0xf05778,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f2f95}):_0x44b245[_0xf05778]=_0x3f2f95,W=(_0x3a2a48,_0x2e6c7d,_0x6224ae,_0x52ed1c)=>{const _0x51eb37=_0x4273bd;for(var _0x199fe1=_0x52ed1c>0x1?void 0x0:_0x52ed1c?L(_0x2e6c7d,_0x6224ae):_0x2e6c7d,_0x210c62=_0x3a2a48[_0x51eb37(0x1a6)]-0x1,_0x2fb75e;_0x210c62>=0x0;_0x210c62--)(_0x2fb75e=_0x3a2a48[_0x210c62])&&(_0x199fe1=_0x2fb75e(_0x199fe1)||_0x199fe1);return _0x199fe1;},O=(_0x32b971,_0x20afa0)=>(_0x27169c,_0x4ad8c9)=>_0x20afa0(_0x27169c,_0x4ad8c9,_0x32b971),N=(_0x2fed45,_0x39c880,_0x440ab7)=>Z(_0x2fed45,typeof _0x39c880!=_0x4273bd(0x178)?_0x39c880+'':_0x39c880,_0x440ab7);exports[_0x4273bd(0x188)]=class extends c['Plugin']{constructor(_0x1a8e45=D,_0x1bb74e,_0x40b548){const _0x44e55a=_0x4273bd;super(),this['_config']=_0x1a8e45,this[_0x44e55a(0x15f)]=_0x1bb74e,this[_0x44e55a(0x14e)]=_0x40b548;const {..._0x5688df}=c[_0x44e55a(0x149)]({},D,this['_config']);this['_configService'][_0x44e55a(0x170)](q,_0x5688df);}[_0x4273bd(0x156)](){const _0x535a00=_0x4273bd;[[g],[C],[p]][_0x535a00(0x162)](_0x32ec85=>{const _0x4a16b7=_0x535a00;this[_0x4a16b7(0x15f)]['add'](_0x32ec85);});}[_0x4273bd(0x18c)](){const _0x235d4d=_0x4273bd;this[_0x235d4d(0x15f)]['get'](C),this[_0x235d4d(0x15f)][_0x235d4d(0x18f)](p);}},N(exports[_0x4273bd(0x188)],_0x4273bd(0x1a1),U),N(exports[_0x4273bd(0x188)],_0x4273bd(0x19b),c[_0x4273bd(0x1b1)]['UNIVER_UNKNOWN']),exports[_0x4273bd(0x188)]=W([c['DependentOn'](j[_0x4273bd(0x14d)],b[_0x4273bd(0x1a7)],T['UniverLicensePlugin']),O(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)])),O(0x2,c['IConfigService'])],exports[_0x4273bd(0x188)]);
|
|
1
|
+
'use strict';const _0x423b2e=_0x50e2;(function(_0x4c442f,_0x243b0a){const _0x16428a=_0x50e2,_0x5baaea=_0x4c442f();while(!![]){try{const _0x3e976a=-parseInt(_0x16428a(0x1e6))/0x1*(parseInt(_0x16428a(0x19e))/0x2)+-parseInt(_0x16428a(0x19c))/0x3*(-parseInt(_0x16428a(0x1eb))/0x4)+-parseInt(_0x16428a(0x1ef))/0x5*(-parseInt(_0x16428a(0x1d4))/0x6)+parseInt(_0x16428a(0x1da))/0x7+parseInt(_0x16428a(0x1c3))/0x8+-parseInt(_0x16428a(0x1b1))/0x9*(parseInt(_0x16428a(0x1c8))/0xa)+-parseInt(_0x16428a(0x1b6))/0xb;if(_0x3e976a===_0x243b0a)break;else _0x5baaea['push'](_0x5baaea['shift']());}catch(_0x39d6f9){_0x5baaea['push'](_0x5baaea['shift']());}}}(_0x295e,0xc03ef));Object[_0x423b2e(0x1d7)](exports,Symbol['toStringTag'],{'value':_0x423b2e(0x200)});const b=require(_0x423b2e(0x198)),T=require(_0x423b2e(0x191)),c=require(_0x423b2e(0x1e5)),j=require(_0x423b2e(0x1c0)),M=require('@univerjs/thread-comment'),w=require(_0x423b2e(0x1f4)),P=require(_0x423b2e(0x1af)),U=_0x423b2e(0x1c4);var I=(_0x69f9b7=>(_0x69f9b7[_0x69f9b7['OpenOrReOpen']=0x0]=_0x423b2e(0x1d6),_0x69f9b7[_0x69f9b7[_0x423b2e(0x1f2)]=0x1]=_0x423b2e(0x1f2),_0x69f9b7[_0x69f9b7[_0x423b2e(0x208)]=-0x1]=_0x423b2e(0x208),_0x69f9b7))(I||{}),v=(_0x3074c7=>(_0x3074c7[_0x3074c7[_0x423b2e(0x1b2)]=0x0]='Unknown',_0x3074c7[_0x3074c7[_0x423b2e(0x1f0)]=0x1]='Add',_0x3074c7[_0x3074c7[_0x423b2e(0x1ac)]=0x2]=_0x423b2e(0x1ac),_0x3074c7[_0x3074c7[_0x423b2e(0x1e1)]=0x3]='Edit',_0x3074c7[_0x3074c7['Delete']=0x4]='Delete',_0x3074c7[_0x3074c7['Solve']=0x5]='Solve',_0x3074c7[_0x3074c7[_0x423b2e(0x208)]=-0x1]=_0x423b2e(0x208),_0x3074c7))(v||{});const f=_0x124e59=>c[_0x423b2e(0x1a0)](new Date(+_0x124e59))[_0x423b2e(0x1e2)](_0x423b2e(0x202)),R=async(_0x2734b5,_0x857f34)=>{const _0x1bfc47=_0x423b2e,_0x11bfaa=_0x2734b5['get'](c[_0x1bfc47(0x196)]),_0x2424ad=_0x2734b5[_0x1bfc47(0x1c9)](P[_0x1bfc47(0x199)]);_0x857f34[_0x1bfc47(0x1ca)](_0x57036b=>{const _0x5707f6=_0x1bfc47;_0x11bfaa[_0x5707f6(0x1f8)](_0x57036b)&&_0x857f34[_0x5707f6(0x1dc)](_0x57036b);}),_0x857f34['size']&&(await _0x2424ad[_0x1bfc47(0x1c9)](_0x1bfc47(0x1db),{'params':{'userIDs':[..._0x857f34]}}))[_0x1bfc47(0x207)][_0x1bfc47(0x19b)][_0x1bfc47(0x1ca)](_0xb070ee=>{_0xb070ee&&_0x11bfaa['addUser'](_0xb070ee);});};function _0x295e(){const _0x3835d1=['unitId','IThreadCommentDataSourceService','values','Delete','symbol','Reply','Plugin','createTimestamp','@univerjs/network','rangeType','2937177KLOhNk','Unknown','getMemberID','find','threadId','4224385vyWEZs','subscribe','rangeId','error','_initUserSync','/list','IConfigService','_config','post','solved','@univerjs/thread-comment-ui','map','content','10000904BOYAVm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','merge','parentId','stringify','30BYVpak','get','forEach','code','_injector','root','commentUpdate$','addComment','Disposable','onReady','replyId','requireSession','1374942qSEtWY','addUser','OpenOrReOpen','defineProperty','userID','reply','10008194HguDWg','/universer-api/user/list','delete','DependentOn','ThreadCommentModel','userId','listComments','Edit','format','personId','_sessionService','@univerjs/core','3OKzvMy','type','syncUpdateMutationToColla','_configService','getOwnPropertyDescriptor','3504Bsbzis','_init','/universer-api/comment/unit/','deleteComment','10KRDzlk','Add','ref','Solved','UNIVER_UNKNOWN','rxjs','COMMENT','updateComment','parse','getUser','Inject','resolveComment','comments','_commentService','filter','UniverInstanceType','UniverThreadCommentDataSourcePlugin','Module','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','customRanges','_threadCommentModel','add','slice','body','UNRECOGNIZED','/edit','disposeWithMe','_threadCommentDataSourceService','_httpService','resolved','getUnit','pluginName','@univerjs-pro/license','_threadCommentDataSource','replies','/solved','Injector','UserManagerService','payload','@univerjs-pro/collaboration-client','HTTPService','UniverLicensePlugin','users','1632sHUkCW','CustomRangeType','976120GhnDjW','length','dayjs','onStarting','CommentService','saveCommentToSnapshot','_userService','user','_initDataSource'];_0x295e=function(){return _0x3835d1;};return _0x295e();}var $=Object['getOwnPropertyDescriptor'],E=(_0x44ee6d,_0x34d3ae,_0x316b06,_0x39c346)=>{for(var _0xce63d0=_0x39c346>0x1?void 0x0:_0x39c346?$(_0x34d3ae,_0x316b06):_0x34d3ae,_0x574781=_0x44ee6d['length']-0x1,_0x375b5e;_0x574781>=0x0;_0x574781--)(_0x375b5e=_0x44ee6d[_0x574781])&&(_0xce63d0=_0x375b5e(_0xce63d0)||_0xce63d0);return _0xce63d0;},S=(_0x312074,_0x5afbe3)=>(_0x5018d0,_0x529bce)=>_0x5afbe3(_0x5018d0,_0x529bce,_0x312074);let p=class extends c[_0x423b2e(0x1d0)]{constructor(_0x13edf3,_0xf8e0c6,_0x1d9b2c,_0x4799f6){const _0x543a13=_0x423b2e;super(),this[_0x543a13(0x1fc)]=_0x13edf3,this['_threadCommentModel']=_0xf8e0c6,this[_0x543a13(0x1a4)]=_0x1d9b2c,this[_0x543a13(0x1cc)]=_0x4799f6,this[_0x543a13(0x1ec)](),this[_0x543a13(0x1ba)]();}[_0x423b2e(0x1ba)](){const _0xacb164=_0x423b2e;this['disposeWithMe'](this[_0xacb164(0x204)][_0xacb164(0x1ce)]['pipe'](w['bufferTime'](0x10))[_0xacb164(0x1b7)](_0x3d47c2=>{const _0x339846=_0xacb164,_0xf71e29=new Set();_0x3d47c2['forEach'](_0xeadd17=>{const _0x261c94=_0x50e2;switch(_0xeadd17[_0x261c94(0x1e7)]){case _0x261c94(0x205):{const _0x57a410=_0xeadd17[_0x261c94(0x197)][_0x261c94(0x1e3)];_0xf71e29['add'](_0x57a410);break;}}}),R(this[_0x339846(0x1cc)],_0xf71e29);}));}[_0x423b2e(0x1ec)](){const _0x4f43c1=_0x423b2e;this[_0x4f43c1(0x20a)](this[_0x4f43c1(0x1fc)][_0x4f43c1(0x1ce)]['subscribe'](async _0x32dbf8=>{const _0xccf069=_0x4f43c1;var _0x2a3379,_0x207ce9,_0xc45812,_0x3e27cb;const _0x186a77=(_0x2a3379=this[_0xccf069(0x204)][_0xccf069(0x18f)](_0x32dbf8[_0xccf069(0x1a7)])['find'](_0x14e1da=>_0x14e1da[_0xccf069(0x1b5)]===_0x32dbf8[_0xccf069(0x1b5)]))==null?void 0x0:_0x2a3379[_0xccf069(0x1cd)];if(!_0x186a77)return;const {unitId:_0x363dac,subUnitId:_0x207ec6}=_0x186a77;switch(_0x32dbf8[_0xccf069(0x1a5)]&&this[_0xccf069(0x1a4)][_0xccf069(0x1d5)](_0x32dbf8[_0xccf069(0x1a5)]),_0x32dbf8['type']){case v['Add']:break;case v['Reply']:{this[_0xccf069(0x204)]['addComment'](_0x363dac,_0x207ec6,{'unitId':_0x363dac,'subUnitId':_0x207ec6,'ref':'','id':_0x32dbf8[_0xccf069(0x1d2)],'dT':f(+_0x32dbf8[_0xccf069(0x1ae)]),'threadId':_0x32dbf8['threadId'],'personId':(_0xc45812=(_0x207ce9=_0x32dbf8[_0xccf069(0x1a5)])==null?void 0x0:_0x207ce9[_0xccf069(0x1d8)])!=null?_0xc45812:_0x32dbf8[_0xccf069(0x1df)],'text':JSON[_0xccf069(0x1f7)](_0x32dbf8[_0xccf069(0x1c2)]),'parentId':_0x186a77['id']});break;}case v[_0xccf069(0x1aa)]:{const _0x146e4a=this[_0xccf069(0x204)]['getComment'](_0x363dac,_0x207ec6,_0x32dbf8[_0xccf069(0x1d2)]);_0x146e4a&&_0x146e4a[_0xccf069(0x1c6)]&&this[_0xccf069(0x204)][_0xccf069(0x1ee)](_0x363dac,_0x207ec6,_0x32dbf8[_0xccf069(0x1d2)]);break;}case v[_0xccf069(0x1e1)]:{this['_threadCommentModel'][_0xccf069(0x1f6)](_0x363dac,_0x207ec6,{'commentId':_0x32dbf8[_0xccf069(0x1d2)],'text':JSON[_0xccf069(0x1f7)](_0x32dbf8[_0xccf069(0x1c2)])});break;}case v['Solve']:{const _0x92f9c0=(_0x3e27cb=this[_0xccf069(0x204)]['getUnit'](_0x32dbf8[_0xccf069(0x1a7)])[_0xccf069(0x1b4)](_0x5bc6e1=>_0x5bc6e1['threadId']===_0x32dbf8['threadId']))==null?void 0x0:_0x3e27cb[_0xccf069(0x1cd)];_0x92f9c0&&this[_0xccf069(0x204)][_0xccf069(0x1fa)](_0x363dac,_0x207ec6,_0x92f9c0['id'],_0x32dbf8[_0xccf069(0x1bf)]===I[_0xccf069(0x1f2)]);break;}}}));}};p=E([S(0x0,c[_0x423b2e(0x1f9)](b[_0x423b2e(0x1a2)])),S(0x1,c[_0x423b2e(0x1f9)](M[_0x423b2e(0x1de)])),S(0x2,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x196)])),S(0x3,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x195)]))],p);const q='thread-comment-data-source.config',D={};function _0x50e2(_0x38f2c0,_0x3bee8b){const _0x295e61=_0x295e();return _0x50e2=function(_0x50e23e,_0xa9261d){_0x50e23e=_0x50e23e-0x18c;let _0xf3efc3=_0x295e61[_0x50e23e];return _0xf3efc3;},_0x50e2(_0x38f2c0,_0x3bee8b);}var A=Object[_0x423b2e(0x1ea)],x=(_0x165d6f,_0x3f9239,_0x113931,_0x2f695a)=>{const _0x2be4b5=_0x423b2e;for(var _0x3d8590=_0x2f695a>0x1?void 0x0:_0x2f695a?A(_0x3f9239,_0x113931):_0x3f9239,_0x49c512=_0x165d6f[_0x2be4b5(0x19f)]-0x1,_0x5a96be;_0x49c512>=0x0;_0x49c512--)(_0x5a96be=_0x165d6f[_0x49c512])&&(_0x3d8590=_0x5a96be(_0x3d8590)||_0x3d8590);return _0x3d8590;},_=(_0x480c3e,_0x49ea83)=>(_0x281878,_0x59c50c)=>_0x49ea83(_0x281878,_0x59c50c,_0x480c3e);function Y(_0x8dcb6b,_0x572c7a){const _0x2c94e6=_0x423b2e,_0x1ec727=_0x8dcb6b[_0x2c94e6(0x193)][0x0];return{..._0x572c7a,'id':_0x1ec727[_0x2c94e6(0x1d2)],'resolved':_0x8dcb6b[_0x2c94e6(0x1bf)]===0x1,'dT':f(_0x1ec727[_0x2c94e6(0x1ae)]),'personId':_0x1ec727[_0x2c94e6(0x1df)],'threadId':_0x1ec727['threadId']};}function G(_0x1219a3,_0x5d08b8,_0x204369){const _0x156f16=_0x423b2e;var _0x3bb440,_0x4d72b8;if(((_0x4d72b8=(_0x3bb440=_0x1219a3==null?void 0x0:_0x1219a3[_0x156f16(0x193)])==null?void 0x0:_0x3bb440[_0x156f16(0x19f)])!=null?_0x4d72b8:0x0)>0x0){const _0xa45b22=(_0x5df743,_0x3114a5)=>({'id':_0x5df743[_0x156f16(0x1d2)],'threadId':_0x5df743[_0x156f16(0x1b5)],'dT':f(_0x5df743['createTimestamp']),'personId':_0x5df743[_0x156f16(0x1df)],'resolved':_0x1219a3[_0x156f16(0x1bf)]===I[_0x156f16(0x1f2)],'unitId':_0x5d08b8,'subUnitId':_0x204369,'text':JSON['parse'](_0x5df743['content']),'parentId':_0x3114a5}),_0xb9ae43=_0xa45b22(_0x1219a3[_0x156f16(0x193)][0x0]);return{..._0xb9ae43,'children':_0x1219a3['replies'][_0x156f16(0x206)](0x1)[_0x156f16(0x1c1)](_0x487edc=>_0xa45b22(_0x487edc,_0xb9ae43['id']))};}return null;}let g=class{constructor(_0x47b7d3,_0x5e8683,_0x1340f3,_0x3bc2a7){const _0x823bbf=_0x423b2e;this['_httpService']=_0x47b7d3,this[_0x823bbf(0x1a4)]=_0x5e8683,this['_sessionService']=_0x1340f3,this[_0x823bbf(0x1cc)]=_0x3bc2a7;}async[_0x423b2e(0x1cf)](_0x5e0822){const _0xf03f13=_0x423b2e;var _0xea50c1,_0x1bdf8e;const {parentId:_0x30c70e,unitId:_0xbab247,text:_0x35a00c,threadId:_0x161729}=_0x5e0822,_0x1d13d3=(_0x1bdf8e=(_0xea50c1=_0x35a00c[_0xf03f13(0x203)])==null?void 0x0:_0xea50c1[_0xf03f13(0x1fd)](_0x3f1b2d=>_0x3f1b2d[_0xf03f13(0x1b0)]===c[_0xf03f13(0x19d)]['COMMENT'])[_0xf03f13(0x1c1)](_0x1c0093=>_0x1c0093['rangeId']))!=null?_0x1bdf8e:[],_0x3d059a=JSON['stringify'](_0x35a00c),_0x193c25=(await this[_0xf03f13(0x1e4)][_0xf03f13(0x1d3)](_0xbab247))[_0xf03f13(0x1b3)]();if(_0x30c70e){const _0x7b4ef1={'memberId':_0x193c25,'unitId':_0xbab247,'content':_0x3d059a,'mention':_0x1d13d3,'threadId':_0x161729},_0x409a37=(await this[_0xf03f13(0x18d)][_0xf03f13(0x1be)](_0xf03f13(0x1ed)+_0xbab247+'/reply',{'body':_0x7b4ef1}))['body'][_0xf03f13(0x1d9)];return{..._0x5e0822,'id':_0x409a37['replyId'],'dT':c['dayjs'](+_0x409a37[_0xf03f13(0x1ae)])['format'](_0xf03f13(0x202)),'personId':_0x409a37[_0xf03f13(0x1df)]};}else{const _0x1e0dc8={'memberId':_0x193c25,'unitId':_0xbab247,'content':_0x3d059a,'mention':_0x1d13d3},_0x2141d5=await this[_0xf03f13(0x18d)][_0xf03f13(0x1be)](_0xf03f13(0x1ed)+_0xbab247+'/add',{'body':_0x1e0dc8});return Y(_0x2141d5[_0xf03f13(0x207)]['comment'],_0x5e0822);}}async[_0x423b2e(0x1f6)](_0x5a545e){const _0x1185ad=_0x423b2e;var _0x1b479f,_0x1a0b18;const {text:_0x9b641f,unitId:_0x5dba18}=_0x5a545e,_0x54c8a8=(_0x1a0b18=(_0x1b479f=_0x9b641f['customRanges'])==null?void 0x0:_0x1b479f[_0x1185ad(0x1fd)](_0x26c5a1=>_0x26c5a1[_0x1185ad(0x1b0)]===c[_0x1185ad(0x19d)][_0x1185ad(0x1f5)])[_0x1185ad(0x1c1)](_0x348e49=>_0x348e49[_0x1185ad(0x1b8)]))!=null?_0x1a0b18:[],_0x2a86b3=JSON[_0x1185ad(0x1c7)](_0x9b641f),_0x2ef3cd=_0x5a545e[_0x1185ad(0x1b5)],_0x262916=_0x5a545e['id'],_0x340ab5={'memberId':(await this[_0x1185ad(0x1e4)][_0x1185ad(0x1d3)](_0x5dba18))[_0x1185ad(0x1b3)](),'unitId':_0x5dba18,'threadId':_0x2ef3cd,'mention':_0x54c8a8,'content':_0x2a86b3,'replyId':_0x262916},_0x41cf37=await this['_httpService'][_0x1185ad(0x1be)](_0x1185ad(0x1ed)+_0x5dba18+_0x1185ad(0x209),{'body':_0x340ab5});return!_0x41cf37[_0x1185ad(0x207)][_0x1185ad(0x1b9)]||_0x41cf37[_0x1185ad(0x207)][_0x1185ad(0x1b9)]['code']===0x1;}async[_0x423b2e(0x1fa)](_0x151f7a){const _0xb5ed5b=_0x423b2e,{unitId:_0x1c1381}=_0x151f7a,_0x23b245=_0x151f7a['threadId'],_0x29f3a4={'memberId':this[_0xb5ed5b(0x1a4)]['getCurrentUser']()[_0xb5ed5b(0x1d8)],'unitId':_0x1c1381,'threadId':_0x23b245,'solved':_0x151f7a[_0xb5ed5b(0x18e)]?I[_0xb5ed5b(0x1f2)]:I[_0xb5ed5b(0x1d6)]},_0x3473a2=await this[_0xb5ed5b(0x18d)][_0xb5ed5b(0x1be)]('/universer-api/comment/unit/'+_0x1c1381+_0xb5ed5b(0x194),{'body':_0x29f3a4});return!_0x3473a2[_0xb5ed5b(0x207)]['error']||_0x3473a2['body'][_0xb5ed5b(0x1b9)][_0xb5ed5b(0x1cb)]===0x1;}async[_0x423b2e(0x1ee)](_0x15c639,_0xdb1752,_0x2cf6c8,_0x341cbd){const _0x2f6242=_0x423b2e,_0x2f3750={'memberId':(await this[_0x2f6242(0x1e4)][_0x2f6242(0x1d3)](_0x15c639))[_0x2f6242(0x1b3)](),'threadId':_0x2cf6c8,'replyId':_0x341cbd,'unitId':_0x15c639},_0xc268a=await this['_httpService'][_0x2f6242(0x1be)](_0x2f6242(0x1ed)+_0x15c639+'/delete',{'body':_0x2f3750});return!_0xc268a[_0x2f6242(0x207)][_0x2f6242(0x1b9)]||_0xc268a['body'][_0x2f6242(0x1b9)]['code']===0x1;}async[_0x423b2e(0x1e0)](_0x2b14ed,_0x40d748,_0x503826){const _0x38e25b=_0x423b2e,_0x3960c1={'unitId':_0x2b14ed,'threadId':_0x503826},_0x18d6b6=await this['_httpService'][_0x38e25b(0x1be)](_0x38e25b(0x1ed)+_0x2b14ed+_0x38e25b(0x1bb),{'body':_0x3960c1}),_0x10a41b=_0x503826[_0x38e25b(0x1c1)](_0x4ae1ee=>G(_0x18d6b6[_0x38e25b(0x207)][_0x38e25b(0x1fb)][_0x4ae1ee],_0x2b14ed,_0x40d748))['filter'](Boolean);return Object[_0x38e25b(0x1a9)](_0x18d6b6[_0x38e25b(0x207)][_0x38e25b(0x19b)])['forEach'](_0x4047fc=>{const _0x22c347=_0x38e25b;this[_0x22c347(0x1a4)]['addUser'](_0x4047fc);}),_0x10a41b;}[_0x423b2e(0x1a3)](_0x5c5174){const _0x1aea9c=_0x423b2e;return{'id':_0x5c5174['id'],'threadId':_0x5c5174[_0x1aea9c(0x1b5)],'ref':_0x5c5174[_0x1aea9c(0x1f1)]};}};g=x([_(0x0,c[_0x423b2e(0x1f9)](P[_0x423b2e(0x199)])),_(0x1,c[_0x423b2e(0x1f9)](c['UserManagerService'])),_(0x2,c[_0x423b2e(0x1f9)](b[_0x423b2e(0x201)])),_(0x3,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x195)]))],g);var H=Object[_0x423b2e(0x1ea)],J=(_0x49b545,_0x4e7f0f,_0x2d384a,_0x2fde4b)=>{const _0x3f4474=_0x423b2e;for(var _0x30472b=_0x2fde4b>0x1?void 0x0:_0x2fde4b?H(_0x4e7f0f,_0x2d384a):_0x4e7f0f,_0x372321=_0x49b545[_0x3f4474(0x19f)]-0x1,_0x3d0178;_0x372321>=0x0;_0x372321--)(_0x3d0178=_0x49b545[_0x372321])&&(_0x30472b=_0x3d0178(_0x30472b)||_0x30472b);return _0x30472b;},y=(_0xe9c683,_0x5da431)=>(_0x41b4c7,_0x32d73f)=>_0x5da431(_0x41b4c7,_0x32d73f,_0xe9c683);let C=class extends c[_0x423b2e(0x1d0)]{constructor(_0x6ec03c,_0x57e70e){const _0x133f5f=_0x423b2e;super(),this['_threadCommentDataSourceService']=_0x6ec03c,this[_0x133f5f(0x192)]=_0x57e70e,this[_0x133f5f(0x1a6)]();}['_initDataSource'](){const _0x476039=_0x423b2e;this[_0x476039(0x18c)]['dataSource']=this[_0x476039(0x192)],this[_0x476039(0x18c)][_0x476039(0x1e8)]=!0x1;}};C=J([y(0x0,M[_0x423b2e(0x1a8)]),y(0x1,c[_0x423b2e(0x1f9)](g))],C);var F=Object[_0x423b2e(0x1d7)],L=Object[_0x423b2e(0x1ea)],Z=(_0x1cd2ff,_0x1a7920,_0x265a07)=>_0x1a7920 in _0x1cd2ff?F(_0x1cd2ff,_0x1a7920,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x265a07}):_0x1cd2ff[_0x1a7920]=_0x265a07,W=(_0x162a3f,_0x4cd38e,_0x5eb2eb,_0x4cba4c)=>{const _0x5c2e4e=_0x423b2e;for(var _0xf6b3fb=_0x4cba4c>0x1?void 0x0:_0x4cba4c?L(_0x4cd38e,_0x5eb2eb):_0x4cd38e,_0x1c0545=_0x162a3f[_0x5c2e4e(0x19f)]-0x1,_0x199f31;_0x1c0545>=0x0;_0x1c0545--)(_0x199f31=_0x162a3f[_0x1c0545])&&(_0xf6b3fb=_0x199f31(_0xf6b3fb)||_0xf6b3fb);return _0xf6b3fb;},O=(_0x1d244e,_0x5e85e2)=>(_0x220a0a,_0x3068a5)=>_0x5e85e2(_0x220a0a,_0x3068a5,_0x1d244e),N=(_0x7f7a20,_0x42b7ac,_0x179dbd)=>Z(_0x7f7a20,typeof _0x42b7ac!=_0x423b2e(0x1ab)?_0x42b7ac+'':_0x42b7ac,_0x179dbd);exports[_0x423b2e(0x1ff)]=class extends c[_0x423b2e(0x1ad)]{constructor(_0x19ba7b=D,_0x2b97da,_0x4e03fc){const _0x28770e=_0x423b2e;super(),this[_0x28770e(0x1bd)]=_0x19ba7b,this[_0x28770e(0x1cc)]=_0x2b97da,this[_0x28770e(0x1e9)]=_0x4e03fc;const {..._0x42fc72}=c[_0x28770e(0x1c5)]({},D,this['_config']);this[_0x28770e(0x1e9)]['setConfig'](q,_0x42fc72);}[_0x423b2e(0x1a1)](){const _0x41369d=_0x423b2e;[[g],[C],[p]][_0x41369d(0x1ca)](_0xa02cfb=>{const _0x5d2c51=_0x41369d;this['_injector'][_0x5d2c51(0x205)](_0xa02cfb);});}[_0x423b2e(0x1d1)](){const _0x43f829=_0x423b2e;this[_0x43f829(0x1cc)][_0x43f829(0x1c9)](C),this['_injector'][_0x43f829(0x1c9)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x423b2e(0x190),U),N(exports[_0x423b2e(0x1ff)],_0x423b2e(0x1e7),c[_0x423b2e(0x1fe)][_0x423b2e(0x1f3)]),exports[_0x423b2e(0x1ff)]=W([c[_0x423b2e(0x1dd)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x423b2e(0x19a)]),O(0x1,c[_0x423b2e(0x1f9)](c['Injector'])),O(0x2,c[_0x423b2e(0x1bc)])],exports[_0x423b2e(0x1ff)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3c5135=_0x3870;(function(_0xf589c2,_0x1e5a0f){const _0x1da3c8=_0x3870,_0x39f498=_0xf589c2();while(!![]){try{const _0x5e72cd=-parseInt(_0x1da3c8(0x1ea))/0x1+-parseInt(_0x1da3c8(0x1df))/0x2+-parseInt(_0x1da3c8(0x20d))/0x3*(-parseInt(_0x1da3c8(0x1e8))/0x4)+parseInt(_0x1da3c8(0x1ec))/0x5*(-parseInt(_0x1da3c8(0x205))/0x6)+-parseInt(_0x1da3c8(0x213))/0x7+-parseInt(_0x1da3c8(0x21d))/0x8*(parseInt(_0x1da3c8(0x1fb))/0x9)+-parseInt(_0x1da3c8(0x1dc))/0xa*(-parseInt(_0x1da3c8(0x239))/0xb);if(_0x5e72cd===_0x1e5a0f)break;else _0x39f498['push'](_0x39f498['shift']());}catch(_0x3ad3c3){_0x39f498['push'](_0x39f498['shift']());}}}(_0x589f,0xbdb36));import{CommentService as _0x88e89,CollaborationSessionService as _0x5838b0,UniverCollaborationClientPlugin as _0x3a92c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x527155}from'@univerjs-pro/license';import{dayjs as _0x4b45c4,UserManagerService as _0x186a88,Inject as _0x32221b,Injector as _0x111326,Disposable as _0x2d16e4,CustomRangeType as _0x59243c,UniverInstanceType as _0x128927,DependentOn as _0xb3f9ba,IConfigService as _0x4900d6,Plugin as _0x56778d,merge as _0x524225}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29173f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x403e63,IThreadCommentDataSourceService as _0x4c88ca}from'@univerjs/thread-comment';import{bufferTime as _0x52175c}from'rxjs';import{HTTPService as _0xaaaee1}from'@univerjs/network';const W=_0x3c5135(0x1f9);var I=(_0x4fa48b=>(_0x4fa48b[_0x4fa48b['OpenOrReOpen']=0x0]=_0x3c5135(0x1e9),_0x4fa48b[_0x4fa48b[_0x3c5135(0x214)]=0x1]='Solved',_0x4fa48b[_0x4fa48b[_0x3c5135(0x20f)]=-0x1]='UNRECOGNIZED',_0x4fa48b))(I||{}),v=(_0x1d24bb=>(_0x1d24bb[_0x1d24bb['Unknown']=0x0]=_0x3c5135(0x233),_0x1d24bb[_0x1d24bb[_0x3c5135(0x228)]=0x1]=_0x3c5135(0x228),_0x1d24bb[_0x1d24bb[_0x3c5135(0x1f7)]=0x2]=_0x3c5135(0x1f7),_0x1d24bb[_0x1d24bb[_0x3c5135(0x21b)]=0x3]=_0x3c5135(0x21b),_0x1d24bb[_0x1d24bb[_0x3c5135(0x235)]=0x4]='Delete',_0x1d24bb[_0x1d24bb[_0x3c5135(0x234)]=0x5]=_0x3c5135(0x234),_0x1d24bb[_0x1d24bb[_0x3c5135(0x20f)]=-0x1]=_0x3c5135(0x20f),_0x1d24bb))(v||{});const D=_0x4f7e37=>_0x4b45c4(new Date(+_0x4f7e37))[_0x3c5135(0x1f5)](_0x3c5135(0x226)),B=async(_0x440d64,_0x4db659)=>{const _0x4d1164=_0x3c5135,_0x24ee7e=_0x440d64[_0x4d1164(0x222)](_0x186a88),_0x126f20=_0x440d64[_0x4d1164(0x222)](_0xaaaee1);_0x4db659[_0x4d1164(0x212)](_0x5c10f8=>{const _0x348397=_0x4d1164;_0x24ee7e['getUser'](_0x5c10f8)&&_0x4db659[_0x348397(0x1fd)](_0x5c10f8);}),_0x4db659[_0x4d1164(0x230)]&&(await _0x126f20[_0x4d1164(0x222)](_0x4d1164(0x215),{'params':{'userIDs':[..._0x4db659]}}))[_0x4d1164(0x238)][_0x4d1164(0x1e6)][_0x4d1164(0x212)](_0x67e1c5=>{_0x67e1c5&&_0x24ee7e['addUser'](_0x67e1c5);});};var K=Object[_0x3c5135(0x1e4)],V=(_0x45df26,_0x3ffa4c,_0x52d654,_0x38ab98)=>{for(var _0x4e462d=_0x38ab98>0x1?void 0x0:_0x38ab98?K(_0x3ffa4c,_0x52d654):_0x3ffa4c,_0x1ae012=_0x45df26['length']-0x1,_0x1d22f1;_0x1ae012>=0x0;_0x1ae012--)(_0x1d22f1=_0x45df26[_0x1ae012])&&(_0x4e462d=_0x1d22f1(_0x4e462d)||_0x4e462d);return _0x4e462d;},p=(_0x21a251,_0x3a5b5e)=>(_0x12860a,_0x1f6bc1)=>_0x3a5b5e(_0x12860a,_0x1f6bc1,_0x21a251);let S=class extends _0x2d16e4{constructor(_0x5aaff0,_0x4b6645,_0x61df03,_0x3a243f){const _0x4ed865=_0x3c5135;super(),this[_0x4ed865(0x1ed)]=_0x5aaff0,this['_threadCommentModel']=_0x4b6645,this['_userService']=_0x61df03,this['_injector']=_0x3a243f,this[_0x4ed865(0x21f)](),this[_0x4ed865(0x20c)]();}[_0x3c5135(0x20c)](){const _0x1fa245=_0x3c5135;this[_0x1fa245(0x223)](this['_threadCommentModel']['commentUpdate$'][_0x1fa245(0x1ff)](_0x52175c(0x10))[_0x1fa245(0x1eb)](_0x564dd8=>{const _0x19e818=_0x1fa245,_0x29f946=new Set();_0x564dd8[_0x19e818(0x212)](_0x29cd07=>{const _0x286ef6=_0x19e818;switch(_0x29cd07[_0x286ef6(0x227)]){case _0x286ef6(0x200):{const _0x43116b=_0x29cd07['payload']['personId'];_0x29f946[_0x286ef6(0x200)](_0x43116b);break;}}}),B(this[_0x19e818(0x1fc)],_0x29f946);}));}[_0x3c5135(0x21f)](){const _0x2ed653=_0x3c5135;this['disposeWithMe'](this[_0x2ed653(0x1ed)][_0x2ed653(0x1f1)][_0x2ed653(0x1eb)](async _0x6c9454=>{const _0x4ef2e9=_0x2ed653;var _0x3c4d5d,_0xe53c3c,_0x2fda70,_0x159ea0;const _0x485b9a=(_0x3c4d5d=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])['find'](_0x210648=>_0x210648[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x3c4d5d[_0x4ef2e9(0x237)];if(!_0x485b9a)return;const {unitId:_0x344f7e,subUnitId:_0x2b07bb}=_0x485b9a;switch(_0x6c9454['user']&&this[_0x4ef2e9(0x217)]['addUser'](_0x6c9454['user']),_0x6c9454[_0x4ef2e9(0x227)]){case v['Add']:break;case v[_0x4ef2e9(0x1f7)]:{this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x232)](_0x344f7e,_0x2b07bb,{'unitId':_0x344f7e,'subUnitId':_0x2b07bb,'ref':'','id':_0x6c9454[_0x4ef2e9(0x219)],'dT':D(+_0x6c9454[_0x4ef2e9(0x22b)]),'threadId':_0x6c9454[_0x4ef2e9(0x21a)],'personId':(_0x2fda70=(_0xe53c3c=_0x6c9454['user'])==null?void 0x0:_0xe53c3c[_0x4ef2e9(0x22f)])!=null?_0x2fda70:_0x6c9454['userId'],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454[_0x4ef2e9(0x22e)]),'parentId':_0x485b9a['id']});break;}case v[_0x4ef2e9(0x235)]:{const _0x153564=this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x1e0)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);_0x153564&&_0x153564[_0x4ef2e9(0x1f3)]&&this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x216)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);break;}case v[_0x4ef2e9(0x21b)]:{this['_threadCommentModel'][_0x4ef2e9(0x23a)](_0x344f7e,_0x2b07bb,{'commentId':_0x6c9454[_0x4ef2e9(0x219)],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454['content'])});break;}case v[_0x4ef2e9(0x234)]:{const _0x51609b=(_0x159ea0=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])[_0x4ef2e9(0x224)](_0x458776=>_0x458776[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x159ea0['root'];_0x51609b&&this[_0x4ef2e9(0x1d9)]['resolveComment'](_0x344f7e,_0x2b07bb,_0x51609b['id'],_0x6c9454[_0x4ef2e9(0x1dd)]===I[_0x4ef2e9(0x214)]);break;}}}));}};S=V([p(0x0,_0x32221b(_0x88e89)),p(0x1,_0x32221b(_0x403e63)),p(0x2,_0x32221b(_0x186a88)),p(0x3,_0x32221b(_0x111326))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3c5135(0x1e4)],Q=(_0x1eb943,_0xfcac3c,_0x2075fe,_0x5ec63c)=>{for(var _0x2407cb=_0x5ec63c>0x1?void 0x0:_0x5ec63c?k(_0xfcac3c,_0x2075fe):_0xfcac3c,_0x8c097d=_0x1eb943['length']-0x1,_0x43c4f3;_0x8c097d>=0x0;_0x8c097d--)(_0x43c4f3=_0x1eb943[_0x8c097d])&&(_0x2407cb=_0x43c4f3(_0x2407cb)||_0x2407cb);return _0x2407cb;},_=(_0x512a06,_0x1144dc)=>(_0x27bd91,_0x29ad3f)=>_0x1144dc(_0x27bd91,_0x29ad3f,_0x512a06);function X(_0x19bf28,_0xab95db){const _0x1888b7=_0x3c5135,_0x15718b=_0x19bf28[_0x1888b7(0x202)][0x0];return{..._0xab95db,'id':_0x15718b[_0x1888b7(0x219)],'resolved':_0x19bf28['solved']===0x1,'dT':D(_0x15718b[_0x1888b7(0x22b)]),'personId':_0x15718b[_0x1888b7(0x1db)],'threadId':_0x15718b[_0x1888b7(0x21a)]};}function ee(_0x284771,_0x1a3f74,_0x4cd71d){const _0x27bb6=_0x3c5135;var _0x9fbd9d,_0x3dd20c;if(((_0x3dd20c=(_0x9fbd9d=_0x284771==null?void 0x0:_0x284771[_0x27bb6(0x202)])==null?void 0x0:_0x9fbd9d[_0x27bb6(0x20b)])!=null?_0x3dd20c:0x0)>0x0){const _0x5bfdfb=(_0x1e7ce7,_0x3d27a4)=>({'id':_0x1e7ce7[_0x27bb6(0x219)],'threadId':_0x1e7ce7[_0x27bb6(0x21a)],'dT':D(_0x1e7ce7[_0x27bb6(0x22b)]),'personId':_0x1e7ce7['userId'],'resolved':_0x284771[_0x27bb6(0x1dd)]===I['Solved'],'unitId':_0x1a3f74,'subUnitId':_0x4cd71d,'text':JSON[_0x27bb6(0x22c)](_0x1e7ce7[_0x27bb6(0x22e)]),'parentId':_0x3d27a4}),_0x40935b=_0x5bfdfb(_0x284771[_0x27bb6(0x202)][0x0]);return{..._0x40935b,'children':_0x284771[_0x27bb6(0x202)][_0x27bb6(0x1de)](0x1)[_0x27bb6(0x1f0)](_0x4d7dd6=>_0x5bfdfb(_0x4d7dd6,_0x40935b['id']))};}return null;}let f=class{constructor(_0x4a253c,_0x365c6d,_0x2feb75,_0x41793b){const _0x307d6a=_0x3c5135;this[_0x307d6a(0x1f4)]=_0x4a253c,this[_0x307d6a(0x217)]=_0x365c6d,this[_0x307d6a(0x1fa)]=_0x2feb75,this[_0x307d6a(0x1fc)]=_0x41793b;}async['addComment'](_0x263d3b){const _0x47d3a1=_0x3c5135;var _0x267c22,_0x2464e8;const {parentId:_0x211f52,unitId:_0x5a4f06,text:_0x11f849,threadId:_0x3ae703}=_0x263d3b,_0x4b0efd=(_0x2464e8=(_0x267c22=_0x11f849[_0x47d3a1(0x208)])==null?void 0x0:_0x267c22[_0x47d3a1(0x220)](_0x3d4fe0=>_0x3d4fe0[_0x47d3a1(0x236)]===_0x59243c['COMMENT'])['map'](_0x27206b=>_0x27206b['rangeId']))!=null?_0x2464e8:[],_0x143abe=JSON[_0x47d3a1(0x221)](_0x11f849),_0x4b3d4e=(await this[_0x47d3a1(0x1fa)][_0x47d3a1(0x1d8)](_0x5a4f06))[_0x47d3a1(0x203)]();if(_0x211f52){const _0x3dee42={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd,'threadId':_0x3ae703},_0x20e76c=(await this[_0x47d3a1(0x1f4)]['post'](_0x47d3a1(0x225)+_0x5a4f06+_0x47d3a1(0x1e3),{'body':_0x3dee42}))['body'][_0x47d3a1(0x1fe)];return{..._0x263d3b,'id':_0x20e76c[_0x47d3a1(0x219)],'dT':_0x4b45c4(+_0x20e76c[_0x47d3a1(0x22b)])[_0x47d3a1(0x1f5)](_0x47d3a1(0x226)),'personId':_0x20e76c[_0x47d3a1(0x1db)]};}else{const _0x34046d={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd},_0x2bb1cb=await this[_0x47d3a1(0x1f4)][_0x47d3a1(0x22d)]('/universer-api/comment/unit/'+_0x5a4f06+_0x47d3a1(0x22a),{'body':_0x34046d});return X(_0x2bb1cb[_0x47d3a1(0x238)][_0x47d3a1(0x1e7)],_0x263d3b);}}async[_0x3c5135(0x23a)](_0x575b70){const _0x16f867=_0x3c5135;var _0xa0702b,_0x14f95a;const {text:_0xa10731,unitId:_0x482b56}=_0x575b70,_0x1bf26e=(_0x14f95a=(_0xa0702b=_0xa10731['customRanges'])==null?void 0x0:_0xa0702b['filter'](_0x1b0ae6=>_0x1b0ae6['rangeType']===_0x59243c[_0x16f867(0x231)])[_0x16f867(0x1f0)](_0x102622=>_0x102622[_0x16f867(0x21e)]))!=null?_0x14f95a:[],_0x2dcc5e=JSON['stringify'](_0xa10731),_0x358060=_0x575b70[_0x16f867(0x21a)],_0x41bce4=_0x575b70['id'],_0x19de1e={'memberId':(await this['_sessionService'][_0x16f867(0x1d8)](_0x482b56))['getMemberID'](),'unitId':_0x482b56,'threadId':_0x358060,'mention':_0x1bf26e,'content':_0x2dcc5e,'replyId':_0x41bce4},_0x38025a=await this[_0x16f867(0x1f4)][_0x16f867(0x22d)](_0x16f867(0x225)+_0x482b56+_0x16f867(0x1f2),{'body':_0x19de1e});return!_0x38025a[_0x16f867(0x238)]['error']||_0x38025a['body'][_0x16f867(0x1f8)][_0x16f867(0x1e2)]===0x1;}async['resolveComment'](_0x3524a5){const _0x6d14be=_0x3c5135,{unitId:_0x550cc3}=_0x3524a5,_0xcc439d=_0x3524a5['threadId'],_0x257b07={'memberId':this['_userService'][_0x6d14be(0x1e5)]()[_0x6d14be(0x22f)],'unitId':_0x550cc3,'threadId':_0xcc439d,'solved':_0x3524a5[_0x6d14be(0x204)]?I[_0x6d14be(0x214)]:I[_0x6d14be(0x1e9)]},_0x1877d0=await this[_0x6d14be(0x1f4)][_0x6d14be(0x22d)](_0x6d14be(0x225)+_0x550cc3+_0x6d14be(0x209),{'body':_0x257b07});return!_0x1877d0[_0x6d14be(0x238)][_0x6d14be(0x1f8)]||_0x1877d0['body'][_0x6d14be(0x1f8)]['code']===0x1;}async[_0x3c5135(0x216)](_0x21826a,_0x5e0e6f,_0x5cc12d,_0x46a834){const _0xe9ab3f=_0x3c5135,_0xa17c5f={'memberId':(await this[_0xe9ab3f(0x1fa)][_0xe9ab3f(0x1d8)](_0x21826a))[_0xe9ab3f(0x203)](),'threadId':_0x5cc12d,'replyId':_0x46a834,'unitId':_0x21826a},_0x2c5599=await this[_0xe9ab3f(0x1f4)]['post'](_0xe9ab3f(0x225)+_0x21826a+_0xe9ab3f(0x20a),{'body':_0xa17c5f});return!_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)]||_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)][_0xe9ab3f(0x1e2)]===0x1;}async['listComments'](_0x2ed9a2,_0x10777e,_0x309b90){const _0x12da2f=_0x3c5135,_0x42c74f={'unitId':_0x2ed9a2,'threadId':_0x309b90},_0x1c353f=await this['_httpService'][_0x12da2f(0x22d)]('/universer-api/comment/unit/'+_0x2ed9a2+'/list',{'body':_0x42c74f}),_0x27dfae=_0x309b90[_0x12da2f(0x1f0)](_0x23c509=>ee(_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x21c)][_0x23c509],_0x2ed9a2,_0x10777e))[_0x12da2f(0x220)](Boolean);return Object[_0x12da2f(0x1e1)](_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x1e6)])[_0x12da2f(0x212)](_0x2b12ba=>{const _0x1cff92=_0x12da2f;this[_0x1cff92(0x217)]['addUser'](_0x2b12ba);}),_0x27dfae;}[_0x3c5135(0x1da)](_0x393ea6){const _0x233567=_0x3c5135;return{'id':_0x393ea6['id'],'threadId':_0x393ea6[_0x233567(0x21a)],'ref':_0x393ea6[_0x233567(0x1ee)]};}};f=Q([_(0x0,_0x32221b(_0xaaaee1)),_(0x1,_0x32221b(_0x186a88)),_(0x2,_0x32221b(_0x5838b0)),_(0x3,_0x32221b(_0x111326))],f);function _0x3870(_0x43a9b4,_0x424a26){const _0x589fd6=_0x589f();return _0x3870=function(_0x387005,_0x2f0107){_0x387005=_0x387005-0x1d8;let _0x3860e3=_0x589fd6[_0x387005];return _0x3860e3;},_0x3870(_0x43a9b4,_0x424a26);}var re=Object[_0x3c5135(0x1e4)],te=(_0xfecb85,_0x46e1d9,_0x2fe99e,_0x271384)=>{const _0xc5a04f=_0x3c5135;for(var _0x4cd31b=_0x271384>0x1?void 0x0:_0x271384?re(_0x46e1d9,_0x2fe99e):_0x46e1d9,_0x4f4796=_0xfecb85[_0xc5a04f(0x20b)]-0x1,_0x209202;_0x4f4796>=0x0;_0x4f4796--)(_0x209202=_0xfecb85[_0x4f4796])&&(_0x4cd31b=_0x209202(_0x4cd31b)||_0x4cd31b);return _0x4cd31b;},N=(_0x54ca7e,_0x35e2d7)=>(_0x36458b,_0x37f854)=>_0x35e2d7(_0x36458b,_0x37f854,_0x54ca7e);function _0x589f(){const _0x5c334a=['_userService','syncUpdateMutationToColla','replyId','threadId','Edit','comments','938104xjftjs','rangeId','_init','filter','stringify','get','disposeWithMe','find','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','type','Add','_initDataSource','/add','createTimestamp','parse','post','content','userID','size','COMMENT','addComment','Unknown','Solve','Delete','rangeType','root','body','979BgLDQe','updateComment','requireSession','_threadCommentModel','saveCommentToSnapshot','userId','537310cGEEAh','solved','slice','2872600lnARKO','getComment','values','code','/reply','getOwnPropertyDescriptor','getCurrentUser','users','comment','17708fVpgfC','OpenOrReOpen','955603zhCTqZ','subscribe','10kmFZmZ','_commentService','ref','UNIVER_UNKNOWN','map','commentUpdate$','/edit','parentId','_httpService','format','_threadCommentDataSourceService','Reply','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','99GPqoOj','_injector','delete','reply','pipe','add','unitId','replies','getMemberID','resolved','1805172nORszm','_config','getUnit','customRanges','/solved','/delete','length','_initUserSync','681FaUQtb','_threadCommentDataSource','UNRECOGNIZED','_configService','defineProperty','forEach','5085178klzQsT','Solved','/universer-api/user/list','deleteComment'];_0x589f=function(){return _0x5c334a;};return _0x589f();}let g=class extends _0x2d16e4{constructor(_0x18ada6,_0x2f1b0a){const _0x50fd59=_0x3c5135;super(),this[_0x50fd59(0x1f6)]=_0x18ada6,this['_threadCommentDataSource']=_0x2f1b0a,this[_0x50fd59(0x229)]();}[_0x3c5135(0x229)](){const _0x2f89fc=_0x3c5135;this[_0x2f89fc(0x1f6)]['dataSource']=this[_0x2f89fc(0x20e)],this['_threadCommentDataSourceService'][_0x2f89fc(0x218)]=!0x1;}};g=te([N(0x0,_0x4c88ca),N(0x1,_0x32221b(f))],g);var se=Object[_0x3c5135(0x211)],oe=Object[_0x3c5135(0x1e4)],ne=(_0x36138f,_0x4a24d2,_0x61eabb)=>_0x4a24d2 in _0x36138f?se(_0x36138f,_0x4a24d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x61eabb}):_0x36138f[_0x4a24d2]=_0x61eabb,ie=(_0x5afa63,_0x3c3311,_0x3ac9ed,_0xb96dba)=>{for(var _0x20b8ba=_0xb96dba>0x1?void 0x0:_0xb96dba?oe(_0x3c3311,_0x3ac9ed):_0x3c3311,_0xf9471=_0x5afa63['length']-0x1,_0x3d76f5;_0xf9471>=0x0;_0xf9471--)(_0x3d76f5=_0x5afa63[_0xf9471])&&(_0x20b8ba=_0x3d76f5(_0x20b8ba)||_0x20b8ba);return _0x20b8ba;},w=(_0x2dc217,_0x2dffd2)=>(_0x3c6bed,_0x4fcfdf)=>_0x2dffd2(_0x3c6bed,_0x4fcfdf,_0x2dc217),$=(_0x4f9efc,_0x3ace6a,_0x2308a6)=>ne(_0x4f9efc,typeof _0x3ace6a!='symbol'?_0x3ace6a+'':_0x3ace6a,_0x2308a6);let b=class extends _0x56778d{constructor(_0x56ec22=M,_0x41831b,_0x274651){const _0x413e0f=_0x3c5135;super(),this[_0x413e0f(0x206)]=_0x56ec22,this[_0x413e0f(0x1fc)]=_0x41831b,this['_configService']=_0x274651;const {..._0x1fb9e8}=_0x524225({},M,this['_config']);this[_0x413e0f(0x210)]['setConfig'](z,_0x1fb9e8);}['onStarting'](){const _0x19186e=_0x3c5135;[[f],[g],[S]][_0x19186e(0x212)](_0x2229ac=>{const _0x58642e=_0x19186e;this[_0x58642e(0x1fc)]['add'](_0x2229ac);});}['onReady'](){const _0x4ed5a4=_0x3c5135;this['_injector'][_0x4ed5a4(0x222)](g),this[_0x4ed5a4(0x1fc)][_0x4ed5a4(0x222)](S);}};$(b,'pluginName',W),$(b,_0x3c5135(0x227),_0x128927[_0x3c5135(0x1ef)]),b=ie([_0xb3f9ba(_0x29173f,_0x3a92c5,_0x527155),w(0x1,_0x32221b(_0x111326)),w(0x2,_0x4900d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3c5135=_0x3870;(function(_0xf589c2,_0x1e5a0f){const _0x1da3c8=_0x3870,_0x39f498=_0xf589c2();while(!![]){try{const _0x5e72cd=-parseInt(_0x1da3c8(0x1ea))/0x1+-parseInt(_0x1da3c8(0x1df))/0x2+-parseInt(_0x1da3c8(0x20d))/0x3*(-parseInt(_0x1da3c8(0x1e8))/0x4)+parseInt(_0x1da3c8(0x1ec))/0x5*(-parseInt(_0x1da3c8(0x205))/0x6)+-parseInt(_0x1da3c8(0x213))/0x7+-parseInt(_0x1da3c8(0x21d))/0x8*(parseInt(_0x1da3c8(0x1fb))/0x9)+-parseInt(_0x1da3c8(0x1dc))/0xa*(-parseInt(_0x1da3c8(0x239))/0xb);if(_0x5e72cd===_0x1e5a0f)break;else _0x39f498['push'](_0x39f498['shift']());}catch(_0x3ad3c3){_0x39f498['push'](_0x39f498['shift']());}}}(_0x589f,0xbdb36));import{CommentService as _0x88e89,CollaborationSessionService as _0x5838b0,UniverCollaborationClientPlugin as _0x3a92c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x527155}from'@univerjs-pro/license';import{dayjs as _0x4b45c4,UserManagerService as _0x186a88,Inject as _0x32221b,Injector as _0x111326,Disposable as _0x2d16e4,CustomRangeType as _0x59243c,UniverInstanceType as _0x128927,DependentOn as _0xb3f9ba,IConfigService as _0x4900d6,Plugin as _0x56778d,merge as _0x524225}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29173f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x403e63,IThreadCommentDataSourceService as _0x4c88ca}from'@univerjs/thread-comment';import{bufferTime as _0x52175c}from'rxjs';import{HTTPService as _0xaaaee1}from'@univerjs/network';const W=_0x3c5135(0x1f9);var I=(_0x4fa48b=>(_0x4fa48b[_0x4fa48b['OpenOrReOpen']=0x0]=_0x3c5135(0x1e9),_0x4fa48b[_0x4fa48b[_0x3c5135(0x214)]=0x1]='Solved',_0x4fa48b[_0x4fa48b[_0x3c5135(0x20f)]=-0x1]='UNRECOGNIZED',_0x4fa48b))(I||{}),v=(_0x1d24bb=>(_0x1d24bb[_0x1d24bb['Unknown']=0x0]=_0x3c5135(0x233),_0x1d24bb[_0x1d24bb[_0x3c5135(0x228)]=0x1]=_0x3c5135(0x228),_0x1d24bb[_0x1d24bb[_0x3c5135(0x1f7)]=0x2]=_0x3c5135(0x1f7),_0x1d24bb[_0x1d24bb[_0x3c5135(0x21b)]=0x3]=_0x3c5135(0x21b),_0x1d24bb[_0x1d24bb[_0x3c5135(0x235)]=0x4]='Delete',_0x1d24bb[_0x1d24bb[_0x3c5135(0x234)]=0x5]=_0x3c5135(0x234),_0x1d24bb[_0x1d24bb[_0x3c5135(0x20f)]=-0x1]=_0x3c5135(0x20f),_0x1d24bb))(v||{});const D=_0x4f7e37=>_0x4b45c4(new Date(+_0x4f7e37))[_0x3c5135(0x1f5)](_0x3c5135(0x226)),B=async(_0x440d64,_0x4db659)=>{const _0x4d1164=_0x3c5135,_0x24ee7e=_0x440d64[_0x4d1164(0x222)](_0x186a88),_0x126f20=_0x440d64[_0x4d1164(0x222)](_0xaaaee1);_0x4db659[_0x4d1164(0x212)](_0x5c10f8=>{const _0x348397=_0x4d1164;_0x24ee7e['getUser'](_0x5c10f8)&&_0x4db659[_0x348397(0x1fd)](_0x5c10f8);}),_0x4db659[_0x4d1164(0x230)]&&(await _0x126f20[_0x4d1164(0x222)](_0x4d1164(0x215),{'params':{'userIDs':[..._0x4db659]}}))[_0x4d1164(0x238)][_0x4d1164(0x1e6)][_0x4d1164(0x212)](_0x67e1c5=>{_0x67e1c5&&_0x24ee7e['addUser'](_0x67e1c5);});};var K=Object[_0x3c5135(0x1e4)],V=(_0x45df26,_0x3ffa4c,_0x52d654,_0x38ab98)=>{for(var _0x4e462d=_0x38ab98>0x1?void 0x0:_0x38ab98?K(_0x3ffa4c,_0x52d654):_0x3ffa4c,_0x1ae012=_0x45df26['length']-0x1,_0x1d22f1;_0x1ae012>=0x0;_0x1ae012--)(_0x1d22f1=_0x45df26[_0x1ae012])&&(_0x4e462d=_0x1d22f1(_0x4e462d)||_0x4e462d);return _0x4e462d;},p=(_0x21a251,_0x3a5b5e)=>(_0x12860a,_0x1f6bc1)=>_0x3a5b5e(_0x12860a,_0x1f6bc1,_0x21a251);let S=class extends _0x2d16e4{constructor(_0x5aaff0,_0x4b6645,_0x61df03,_0x3a243f){const _0x4ed865=_0x3c5135;super(),this[_0x4ed865(0x1ed)]=_0x5aaff0,this['_threadCommentModel']=_0x4b6645,this['_userService']=_0x61df03,this['_injector']=_0x3a243f,this[_0x4ed865(0x21f)](),this[_0x4ed865(0x20c)]();}[_0x3c5135(0x20c)](){const _0x1fa245=_0x3c5135;this[_0x1fa245(0x223)](this['_threadCommentModel']['commentUpdate$'][_0x1fa245(0x1ff)](_0x52175c(0x10))[_0x1fa245(0x1eb)](_0x564dd8=>{const _0x19e818=_0x1fa245,_0x29f946=new Set();_0x564dd8[_0x19e818(0x212)](_0x29cd07=>{const _0x286ef6=_0x19e818;switch(_0x29cd07[_0x286ef6(0x227)]){case _0x286ef6(0x200):{const _0x43116b=_0x29cd07['payload']['personId'];_0x29f946[_0x286ef6(0x200)](_0x43116b);break;}}}),B(this[_0x19e818(0x1fc)],_0x29f946);}));}[_0x3c5135(0x21f)](){const _0x2ed653=_0x3c5135;this['disposeWithMe'](this[_0x2ed653(0x1ed)][_0x2ed653(0x1f1)][_0x2ed653(0x1eb)](async _0x6c9454=>{const _0x4ef2e9=_0x2ed653;var _0x3c4d5d,_0xe53c3c,_0x2fda70,_0x159ea0;const _0x485b9a=(_0x3c4d5d=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])['find'](_0x210648=>_0x210648[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x3c4d5d[_0x4ef2e9(0x237)];if(!_0x485b9a)return;const {unitId:_0x344f7e,subUnitId:_0x2b07bb}=_0x485b9a;switch(_0x6c9454['user']&&this[_0x4ef2e9(0x217)]['addUser'](_0x6c9454['user']),_0x6c9454[_0x4ef2e9(0x227)]){case v['Add']:break;case v[_0x4ef2e9(0x1f7)]:{this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x232)](_0x344f7e,_0x2b07bb,{'unitId':_0x344f7e,'subUnitId':_0x2b07bb,'ref':'','id':_0x6c9454[_0x4ef2e9(0x219)],'dT':D(+_0x6c9454[_0x4ef2e9(0x22b)]),'threadId':_0x6c9454[_0x4ef2e9(0x21a)],'personId':(_0x2fda70=(_0xe53c3c=_0x6c9454['user'])==null?void 0x0:_0xe53c3c[_0x4ef2e9(0x22f)])!=null?_0x2fda70:_0x6c9454['userId'],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454[_0x4ef2e9(0x22e)]),'parentId':_0x485b9a['id']});break;}case v[_0x4ef2e9(0x235)]:{const _0x153564=this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x1e0)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);_0x153564&&_0x153564[_0x4ef2e9(0x1f3)]&&this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x216)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);break;}case v[_0x4ef2e9(0x21b)]:{this['_threadCommentModel'][_0x4ef2e9(0x23a)](_0x344f7e,_0x2b07bb,{'commentId':_0x6c9454[_0x4ef2e9(0x219)],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454['content'])});break;}case v[_0x4ef2e9(0x234)]:{const _0x51609b=(_0x159ea0=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])[_0x4ef2e9(0x224)](_0x458776=>_0x458776[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x159ea0['root'];_0x51609b&&this[_0x4ef2e9(0x1d9)]['resolveComment'](_0x344f7e,_0x2b07bb,_0x51609b['id'],_0x6c9454[_0x4ef2e9(0x1dd)]===I[_0x4ef2e9(0x214)]);break;}}}));}};S=V([p(0x0,_0x32221b(_0x88e89)),p(0x1,_0x32221b(_0x403e63)),p(0x2,_0x32221b(_0x186a88)),p(0x3,_0x32221b(_0x111326))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3c5135(0x1e4)],Q=(_0x1eb943,_0xfcac3c,_0x2075fe,_0x5ec63c)=>{for(var _0x2407cb=_0x5ec63c>0x1?void 0x0:_0x5ec63c?k(_0xfcac3c,_0x2075fe):_0xfcac3c,_0x8c097d=_0x1eb943['length']-0x1,_0x43c4f3;_0x8c097d>=0x0;_0x8c097d--)(_0x43c4f3=_0x1eb943[_0x8c097d])&&(_0x2407cb=_0x43c4f3(_0x2407cb)||_0x2407cb);return _0x2407cb;},_=(_0x512a06,_0x1144dc)=>(_0x27bd91,_0x29ad3f)=>_0x1144dc(_0x27bd91,_0x29ad3f,_0x512a06);function X(_0x19bf28,_0xab95db){const _0x1888b7=_0x3c5135,_0x15718b=_0x19bf28[_0x1888b7(0x202)][0x0];return{..._0xab95db,'id':_0x15718b[_0x1888b7(0x219)],'resolved':_0x19bf28['solved']===0x1,'dT':D(_0x15718b[_0x1888b7(0x22b)]),'personId':_0x15718b[_0x1888b7(0x1db)],'threadId':_0x15718b[_0x1888b7(0x21a)]};}function ee(_0x284771,_0x1a3f74,_0x4cd71d){const _0x27bb6=_0x3c5135;var _0x9fbd9d,_0x3dd20c;if(((_0x3dd20c=(_0x9fbd9d=_0x284771==null?void 0x0:_0x284771[_0x27bb6(0x202)])==null?void 0x0:_0x9fbd9d[_0x27bb6(0x20b)])!=null?_0x3dd20c:0x0)>0x0){const _0x5bfdfb=(_0x1e7ce7,_0x3d27a4)=>({'id':_0x1e7ce7[_0x27bb6(0x219)],'threadId':_0x1e7ce7[_0x27bb6(0x21a)],'dT':D(_0x1e7ce7[_0x27bb6(0x22b)]),'personId':_0x1e7ce7['userId'],'resolved':_0x284771[_0x27bb6(0x1dd)]===I['Solved'],'unitId':_0x1a3f74,'subUnitId':_0x4cd71d,'text':JSON[_0x27bb6(0x22c)](_0x1e7ce7[_0x27bb6(0x22e)]),'parentId':_0x3d27a4}),_0x40935b=_0x5bfdfb(_0x284771[_0x27bb6(0x202)][0x0]);return{..._0x40935b,'children':_0x284771[_0x27bb6(0x202)][_0x27bb6(0x1de)](0x1)[_0x27bb6(0x1f0)](_0x4d7dd6=>_0x5bfdfb(_0x4d7dd6,_0x40935b['id']))};}return null;}let f=class{constructor(_0x4a253c,_0x365c6d,_0x2feb75,_0x41793b){const _0x307d6a=_0x3c5135;this[_0x307d6a(0x1f4)]=_0x4a253c,this[_0x307d6a(0x217)]=_0x365c6d,this[_0x307d6a(0x1fa)]=_0x2feb75,this[_0x307d6a(0x1fc)]=_0x41793b;}async['addComment'](_0x263d3b){const _0x47d3a1=_0x3c5135;var _0x267c22,_0x2464e8;const {parentId:_0x211f52,unitId:_0x5a4f06,text:_0x11f849,threadId:_0x3ae703}=_0x263d3b,_0x4b0efd=(_0x2464e8=(_0x267c22=_0x11f849[_0x47d3a1(0x208)])==null?void 0x0:_0x267c22[_0x47d3a1(0x220)](_0x3d4fe0=>_0x3d4fe0[_0x47d3a1(0x236)]===_0x59243c['COMMENT'])['map'](_0x27206b=>_0x27206b['rangeId']))!=null?_0x2464e8:[],_0x143abe=JSON[_0x47d3a1(0x221)](_0x11f849),_0x4b3d4e=(await this[_0x47d3a1(0x1fa)][_0x47d3a1(0x1d8)](_0x5a4f06))[_0x47d3a1(0x203)]();if(_0x211f52){const _0x3dee42={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd,'threadId':_0x3ae703},_0x20e76c=(await this[_0x47d3a1(0x1f4)]['post'](_0x47d3a1(0x225)+_0x5a4f06+_0x47d3a1(0x1e3),{'body':_0x3dee42}))['body'][_0x47d3a1(0x1fe)];return{..._0x263d3b,'id':_0x20e76c[_0x47d3a1(0x219)],'dT':_0x4b45c4(+_0x20e76c[_0x47d3a1(0x22b)])[_0x47d3a1(0x1f5)](_0x47d3a1(0x226)),'personId':_0x20e76c[_0x47d3a1(0x1db)]};}else{const _0x34046d={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd},_0x2bb1cb=await this[_0x47d3a1(0x1f4)][_0x47d3a1(0x22d)]('/universer-api/comment/unit/'+_0x5a4f06+_0x47d3a1(0x22a),{'body':_0x34046d});return X(_0x2bb1cb[_0x47d3a1(0x238)][_0x47d3a1(0x1e7)],_0x263d3b);}}async[_0x3c5135(0x23a)](_0x575b70){const _0x16f867=_0x3c5135;var _0xa0702b,_0x14f95a;const {text:_0xa10731,unitId:_0x482b56}=_0x575b70,_0x1bf26e=(_0x14f95a=(_0xa0702b=_0xa10731['customRanges'])==null?void 0x0:_0xa0702b['filter'](_0x1b0ae6=>_0x1b0ae6['rangeType']===_0x59243c[_0x16f867(0x231)])[_0x16f867(0x1f0)](_0x102622=>_0x102622[_0x16f867(0x21e)]))!=null?_0x14f95a:[],_0x2dcc5e=JSON['stringify'](_0xa10731),_0x358060=_0x575b70[_0x16f867(0x21a)],_0x41bce4=_0x575b70['id'],_0x19de1e={'memberId':(await this['_sessionService'][_0x16f867(0x1d8)](_0x482b56))['getMemberID'](),'unitId':_0x482b56,'threadId':_0x358060,'mention':_0x1bf26e,'content':_0x2dcc5e,'replyId':_0x41bce4},_0x38025a=await this[_0x16f867(0x1f4)][_0x16f867(0x22d)](_0x16f867(0x225)+_0x482b56+_0x16f867(0x1f2),{'body':_0x19de1e});return!_0x38025a[_0x16f867(0x238)]['error']||_0x38025a['body'][_0x16f867(0x1f8)][_0x16f867(0x1e2)]===0x1;}async['resolveComment'](_0x3524a5){const _0x6d14be=_0x3c5135,{unitId:_0x550cc3}=_0x3524a5,_0xcc439d=_0x3524a5['threadId'],_0x257b07={'memberId':this['_userService'][_0x6d14be(0x1e5)]()[_0x6d14be(0x22f)],'unitId':_0x550cc3,'threadId':_0xcc439d,'solved':_0x3524a5[_0x6d14be(0x204)]?I[_0x6d14be(0x214)]:I[_0x6d14be(0x1e9)]},_0x1877d0=await this[_0x6d14be(0x1f4)][_0x6d14be(0x22d)](_0x6d14be(0x225)+_0x550cc3+_0x6d14be(0x209),{'body':_0x257b07});return!_0x1877d0[_0x6d14be(0x238)][_0x6d14be(0x1f8)]||_0x1877d0['body'][_0x6d14be(0x1f8)]['code']===0x1;}async[_0x3c5135(0x216)](_0x21826a,_0x5e0e6f,_0x5cc12d,_0x46a834){const _0xe9ab3f=_0x3c5135,_0xa17c5f={'memberId':(await this[_0xe9ab3f(0x1fa)][_0xe9ab3f(0x1d8)](_0x21826a))[_0xe9ab3f(0x203)](),'threadId':_0x5cc12d,'replyId':_0x46a834,'unitId':_0x21826a},_0x2c5599=await this[_0xe9ab3f(0x1f4)]['post'](_0xe9ab3f(0x225)+_0x21826a+_0xe9ab3f(0x20a),{'body':_0xa17c5f});return!_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)]||_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)][_0xe9ab3f(0x1e2)]===0x1;}async['listComments'](_0x2ed9a2,_0x10777e,_0x309b90){const _0x12da2f=_0x3c5135,_0x42c74f={'unitId':_0x2ed9a2,'threadId':_0x309b90},_0x1c353f=await this['_httpService'][_0x12da2f(0x22d)]('/universer-api/comment/unit/'+_0x2ed9a2+'/list',{'body':_0x42c74f}),_0x27dfae=_0x309b90[_0x12da2f(0x1f0)](_0x23c509=>ee(_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x21c)][_0x23c509],_0x2ed9a2,_0x10777e))[_0x12da2f(0x220)](Boolean);return Object[_0x12da2f(0x1e1)](_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x1e6)])[_0x12da2f(0x212)](_0x2b12ba=>{const _0x1cff92=_0x12da2f;this[_0x1cff92(0x217)]['addUser'](_0x2b12ba);}),_0x27dfae;}[_0x3c5135(0x1da)](_0x393ea6){const _0x233567=_0x3c5135;return{'id':_0x393ea6['id'],'threadId':_0x393ea6[_0x233567(0x21a)],'ref':_0x393ea6[_0x233567(0x1ee)]};}};f=Q([_(0x0,_0x32221b(_0xaaaee1)),_(0x1,_0x32221b(_0x186a88)),_(0x2,_0x32221b(_0x5838b0)),_(0x3,_0x32221b(_0x111326))],f);function _0x3870(_0x43a9b4,_0x424a26){const _0x589fd6=_0x589f();return _0x3870=function(_0x387005,_0x2f0107){_0x387005=_0x387005-0x1d8;let _0x3860e3=_0x589fd6[_0x387005];return _0x3860e3;},_0x3870(_0x43a9b4,_0x424a26);}var re=Object[_0x3c5135(0x1e4)],te=(_0xfecb85,_0x46e1d9,_0x2fe99e,_0x271384)=>{const _0xc5a04f=_0x3c5135;for(var _0x4cd31b=_0x271384>0x1?void 0x0:_0x271384?re(_0x46e1d9,_0x2fe99e):_0x46e1d9,_0x4f4796=_0xfecb85[_0xc5a04f(0x20b)]-0x1,_0x209202;_0x4f4796>=0x0;_0x4f4796--)(_0x209202=_0xfecb85[_0x4f4796])&&(_0x4cd31b=_0x209202(_0x4cd31b)||_0x4cd31b);return _0x4cd31b;},N=(_0x54ca7e,_0x35e2d7)=>(_0x36458b,_0x37f854)=>_0x35e2d7(_0x36458b,_0x37f854,_0x54ca7e);function _0x589f(){const _0x5c334a=['_userService','syncUpdateMutationToColla','replyId','threadId','Edit','comments','938104xjftjs','rangeId','_init','filter','stringify','get','disposeWithMe','find','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','type','Add','_initDataSource','/add','createTimestamp','parse','post','content','userID','size','COMMENT','addComment','Unknown','Solve','Delete','rangeType','root','body','979BgLDQe','updateComment','requireSession','_threadCommentModel','saveCommentToSnapshot','userId','537310cGEEAh','solved','slice','2872600lnARKO','getComment','values','code','/reply','getOwnPropertyDescriptor','getCurrentUser','users','comment','17708fVpgfC','OpenOrReOpen','955603zhCTqZ','subscribe','10kmFZmZ','_commentService','ref','UNIVER_UNKNOWN','map','commentUpdate$','/edit','parentId','_httpService','format','_threadCommentDataSourceService','Reply','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','99GPqoOj','_injector','delete','reply','pipe','add','unitId','replies','getMemberID','resolved','1805172nORszm','_config','getUnit','customRanges','/solved','/delete','length','_initUserSync','681FaUQtb','_threadCommentDataSource','UNRECOGNIZED','_configService','defineProperty','forEach','5085178klzQsT','Solved','/universer-api/user/list','deleteComment'];_0x589f=function(){return _0x5c334a;};return _0x589f();}let g=class extends _0x2d16e4{constructor(_0x18ada6,_0x2f1b0a){const _0x50fd59=_0x3c5135;super(),this[_0x50fd59(0x1f6)]=_0x18ada6,this['_threadCommentDataSource']=_0x2f1b0a,this[_0x50fd59(0x229)]();}[_0x3c5135(0x229)](){const _0x2f89fc=_0x3c5135;this[_0x2f89fc(0x1f6)]['dataSource']=this[_0x2f89fc(0x20e)],this['_threadCommentDataSourceService'][_0x2f89fc(0x218)]=!0x1;}};g=te([N(0x0,_0x4c88ca),N(0x1,_0x32221b(f))],g);var se=Object[_0x3c5135(0x211)],oe=Object[_0x3c5135(0x1e4)],ne=(_0x36138f,_0x4a24d2,_0x61eabb)=>_0x4a24d2 in _0x36138f?se(_0x36138f,_0x4a24d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x61eabb}):_0x36138f[_0x4a24d2]=_0x61eabb,ie=(_0x5afa63,_0x3c3311,_0x3ac9ed,_0xb96dba)=>{for(var _0x20b8ba=_0xb96dba>0x1?void 0x0:_0xb96dba?oe(_0x3c3311,_0x3ac9ed):_0x3c3311,_0xf9471=_0x5afa63['length']-0x1,_0x3d76f5;_0xf9471>=0x0;_0xf9471--)(_0x3d76f5=_0x5afa63[_0xf9471])&&(_0x20b8ba=_0x3d76f5(_0x20b8ba)||_0x20b8ba);return _0x20b8ba;},w=(_0x2dc217,_0x2dffd2)=>(_0x3c6bed,_0x4fcfdf)=>_0x2dffd2(_0x3c6bed,_0x4fcfdf,_0x2dc217),$=(_0x4f9efc,_0x3ace6a,_0x2308a6)=>ne(_0x4f9efc,typeof _0x3ace6a!='symbol'?_0x3ace6a+'':_0x3ace6a,_0x2308a6);let b=class extends _0x56778d{constructor(_0x56ec22=M,_0x41831b,_0x274651){const _0x413e0f=_0x3c5135;super(),this[_0x413e0f(0x206)]=_0x56ec22,this[_0x413e0f(0x1fc)]=_0x41831b,this['_configService']=_0x274651;const {..._0x1fb9e8}=_0x524225({},M,this['_config']);this[_0x413e0f(0x210)]['setConfig'](z,_0x1fb9e8);}['onStarting'](){const _0x19186e=_0x3c5135;[[f],[g],[S]][_0x19186e(0x212)](_0x2229ac=>{const _0x58642e=_0x19186e;this[_0x58642e(0x1fc)]['add'](_0x2229ac);});}['onReady'](){const _0x4ed5a4=_0x3c5135;this['_injector'][_0x4ed5a4(0x222)](g),this[_0x4ed5a4(0x1fc)][_0x4ed5a4(0x222)](S);}};$(b,'pluginName',W),$(b,_0x3c5135(0x227),_0x128927[_0x3c5135(0x1ef)]),b=ie([_0xb3f9ba(_0x29173f,_0x3a92c5,_0x527155),w(0x1,_0x32221b(_0x111326)),w(0x2,_0x4900d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4eca(_0x34fa58,_0xf5b468){const _0x11d81d=_0x11d8();return _0x4eca=function(_0x4eca21,_0x4b2832){_0x4eca21=_0x4eca21-0x7d;let _0x59270b=_0x11d81d[_0x4eca21];return _0x59270b;},_0x4eca(_0x34fa58,_0xf5b468);}function _0x11d8(){const _0x42e031=['/edit','/universer-api/user/list','_initUserSync','length','211073nhOHYa','ref','root','_threadCommentDataSourceService','pluginName','solved','_httpService','Delete','userId','stringify','resolveComment','2010584LOgIHc','3222486ndozNI','map','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCore','commentUpdate$','Inject','UserManagerService','@univerjs/network','Disposable','getUnit','UniverNetwork','comment','_initDataSource','_injector','merge','disposeWithMe','payload','exports','userID','OpenOrReOpen','size','toStringTag','defineProperty','filter','_configService','10eFlLHO','UniverLicensePlugin','get','values','replyId','2689785guTgGi','/reply','_commentService','Solved','Edit','rangeId','UniverProThreadCommentDatasource','/delete','content','_sessionService','@univerjs-pro/license','_threadCommentModel','UNIVER_UNKNOWN','rangeType','unitId','CommentService','forEach','UniverProCollaborationClient','error','format','onReady','@univerjs-pro/collaboration-client','subscribe','Module','Injector','UniverThreadCommentUi','Add','135492JNDXCi','UniverThreadCommentDataSourcePlugin','thread-comment-data-source.config','getOwnPropertyDescriptor','getUser','addComment','body','addUser','getMemberID','rxjs','6qWktUz','@univerjs/thread-comment','parentId','onStarting','dayjs','_init','Plugin','COMMENT','getComment','parse','users','UniverCollaborationClientPlugin','HTTPService','listComments','UNRECOGNIZED','requireSession','UniverProLicense','/universer-api/comment/unit/','_userService','syncUpdateMutationToColla','Reply','bufferTime','YYYY/MM/DD\x20HH:mm','createTimestamp','CustomRangeType','code','saveCommentToSnapshot','find','35nEfPjc','_config','1136241BnqeUl','updateComment','user','post','UniverInstanceType','ThreadCommentModel','symbol','amd','/list','add','IConfigService','1070996SFHObn','Unknown','UniverThreadComment','getCurrentUser','Solve','@univerjs/thread-comment-ui','type','@univerjs/core','deleteComment','replies','setConfig'];_0x11d8=function(){return _0x42e031;};return _0x11d8();}(function(_0x322a3a,_0x2aebe){const _0xe2f5d2=_0x4eca,_0x53b4d5=_0x322a3a();while(!![]){try{const _0x586fc4=parseInt(_0xe2f5d2(0x104))/0x1+-parseInt(_0xe2f5d2(0xf5))/0x2+-parseInt(_0xe2f5d2(0xea))/0x3+parseInt(_0xe2f5d2(0xc2))/0x4*(parseInt(_0xe2f5d2(0xe8))/0x5)+-parseInt(_0xe2f5d2(0xcc))/0x6*(-parseInt(_0xe2f5d2(0xa7))/0x7)+parseInt(_0xe2f5d2(0x87))/0x8+-parseInt(_0xe2f5d2(0x88))/0x9*(-parseInt(_0xe2f5d2(0xa2))/0xa);if(_0x586fc4===_0x2aebe)break;else _0x53b4d5['push'](_0x53b4d5['shift']());}catch(_0x47a6e1){_0x53b4d5['push'](_0x53b4d5['shift']());}}}(_0x11d8,0x80cd3),function(_0x593c7e,_0x522d16){const _0x461ab2=_0x4eca;typeof exports=='object'&&typeof module<'u'?_0x522d16(exports,require(_0x461ab2(0xbc)),require(_0x461ab2(0xb1)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x461ab2(0xcd)),require(_0x461ab2(0xcb)),require(_0x461ab2(0x90))):typeof define=='function'&&define[_0x461ab2(0xf1)]?define([_0x461ab2(0x9a),_0x461ab2(0xbc),_0x461ab2(0xb1),_0x461ab2(0xfc),_0x461ab2(0xfa),_0x461ab2(0xcd),'rxjs',_0x461ab2(0x90)],_0x522d16):(_0x593c7e=typeof globalThis<'u'?globalThis:_0x593c7e||self,_0x522d16(_0x593c7e[_0x461ab2(0xad)]={},_0x593c7e[_0x461ab2(0xb8)],_0x593c7e[_0x461ab2(0xdc)],_0x593c7e[_0x461ab2(0x8c)],_0x593c7e[_0x461ab2(0xc0)],_0x593c7e[_0x461ab2(0xf7)],_0x593c7e['rxjs'],_0x593c7e[_0x461ab2(0x93)]));}(this,function(_0x1285c5,_0x42ac7c,_0x331109,_0xe19bdc,_0x3d9925,_0x48b03f,_0x1ca3a4,_0x240138){'use strict';const _0x3ecfc6=_0x4eca;const _0x4320c7=_0x3ecfc6(0x8b);var _0x3c6c6a=(_0x2ed066=>(_0x2ed066[_0x2ed066[_0x3ecfc6(0x9c)]=0x0]=_0x3ecfc6(0x9c),_0x2ed066[_0x2ed066[_0x3ecfc6(0xaa)]=0x1]=_0x3ecfc6(0xaa),_0x2ed066[_0x2ed066[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x2ed066))(_0x3c6c6a||{}),_0x126599=(_0x3cd0f3=>(_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf6)]=0x0]=_0x3ecfc6(0xf6),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xc1)]=0x1]=_0x3ecfc6(0xc1),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xe0)]=0x2]=_0x3ecfc6(0xe0),_0x3cd0f3[_0x3cd0f3['Edit']=0x3]=_0x3ecfc6(0xab),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0x83)]=0x4]='Delete',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf9)]=0x5]='Solve',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x3cd0f3))(_0x126599||{});const _0x41f94d=_0x7512e2=>_0xe19bdc['dayjs'](new Date(+_0x7512e2))['format'](_0x3ecfc6(0xe2)),_0x5b122b=async(_0x524e44,_0x5733ad)=>{const _0x1fb942=_0x3ecfc6,_0x5ed1a1=_0x524e44[_0x1fb942(0xa4)](_0xe19bdc[_0x1fb942(0x8f)]),_0x58f846=_0x524e44['get'](_0x240138['HTTPService']);_0x5733ad[_0x1fb942(0xb7)](_0x126365=>{const _0x4c9976=_0x1fb942;_0x5ed1a1[_0x4c9976(0xc6)](_0x126365)&&_0x5733ad['delete'](_0x126365);}),_0x5733ad[_0x1fb942(0x9d)]&&(await _0x58f846[_0x1fb942(0xa4)](_0x1fb942(0x101),{'params':{'userIDs':[..._0x5733ad]}}))['body'][_0x1fb942(0xd6)][_0x1fb942(0xb7)](_0xea531d=>{const _0x3bd979=_0x1fb942;_0xea531d&&_0x5ed1a1[_0x3bd979(0xc9)](_0xea531d);});};var _0x2900b6=Object[_0x3ecfc6(0xc5)],_0x2b0e65=(_0x377e4c,_0x2f400b,_0x1f36f7,_0x1f2127)=>{for(var _0x2a0466=_0x1f2127>0x1?void 0x0:_0x1f2127?_0x2900b6(_0x2f400b,_0x1f36f7):_0x2f400b,_0x204e3f=_0x377e4c['length']-0x1,_0x58ca82;_0x204e3f>=0x0;_0x204e3f--)(_0x58ca82=_0x377e4c[_0x204e3f])&&(_0x2a0466=_0x58ca82(_0x2a0466)||_0x2a0466);return _0x2a0466;},_0x462b4c=(_0x35fc37,_0x70c0ed)=>(_0x69be17,_0x274cab)=>_0x70c0ed(_0x69be17,_0x274cab,_0x35fc37);let _0x44cf48=class extends _0xe19bdc['Disposable']{constructor(_0x4ff232,_0x77b183,_0x55771b,_0x442f60){const _0x579fb6=_0x3ecfc6;super(),this[_0x579fb6(0xa9)]=_0x4ff232,this['_threadCommentModel']=_0x77b183,this[_0x579fb6(0xde)]=_0x55771b,this[_0x579fb6(0x96)]=_0x442f60,this[_0x579fb6(0xd1)](),this[_0x579fb6(0x102)]();}[_0x3ecfc6(0x102)](){const _0x562d30=_0x3ecfc6;this[_0x562d30(0x98)](this[_0x562d30(0xb2)][_0x562d30(0x8d)]['pipe'](_0x1ca3a4[_0x562d30(0xe1)](0x10))[_0x562d30(0xbd)](_0x4c1c2e=>{const _0x3990f5=_0x562d30,_0x19d5ae=new Set();_0x4c1c2e[_0x3990f5(0xb7)](_0x5e85eb=>{const _0x5dc5cd=_0x3990f5;switch(_0x5e85eb[_0x5dc5cd(0xfb)]){case _0x5dc5cd(0xf3):{const _0x34be63=_0x5e85eb[_0x5dc5cd(0x99)]['personId'];_0x19d5ae['add'](_0x34be63);break;}}}),_0x5b122b(this[_0x3990f5(0x96)],_0x19d5ae);}));}[_0x3ecfc6(0xd1)](){const _0x347b11=_0x3ecfc6;this[_0x347b11(0x98)](this[_0x347b11(0xa9)]['commentUpdate$'][_0x347b11(0xbd)](async _0x3b7b13=>{const _0x44593b=_0x347b11;var _0x92457e,_0x1bf9cd,_0x43f4cc,_0x16d269;const _0xbeed1b=(_0x92457e=this['_threadCommentModel']['getUnit'](_0x3b7b13['unitId'])[_0x44593b(0xe7)](_0x1d76fe=>_0x1d76fe[_0x44593b(0x8a)]===_0x3b7b13['threadId']))==null?void 0x0:_0x92457e[_0x44593b(0x7e)];if(!_0xbeed1b)return;const {unitId:_0x48733a,subUnitId:_0x4def0d}=_0xbeed1b;switch(_0x3b7b13[_0x44593b(0xec)]&&this[_0x44593b(0xde)][_0x44593b(0xc9)](_0x3b7b13[_0x44593b(0xec)]),_0x3b7b13[_0x44593b(0xfb)]){case _0x126599['Add']:break;case _0x126599[_0x44593b(0xe0)]:{this[_0x44593b(0xb2)][_0x44593b(0xc7)](_0x48733a,_0x4def0d,{'unitId':_0x48733a,'subUnitId':_0x4def0d,'ref':'','id':_0x3b7b13[_0x44593b(0xa6)],'dT':_0x41f94d(+_0x3b7b13[_0x44593b(0xe3)]),'threadId':_0x3b7b13[_0x44593b(0x8a)],'personId':(_0x43f4cc=(_0x1bf9cd=_0x3b7b13['user'])==null?void 0x0:_0x1bf9cd[_0x44593b(0x9b)])!=null?_0x43f4cc:_0x3b7b13[_0x44593b(0x84)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13['content']),'parentId':_0xbeed1b['id']});break;}case _0x126599[_0x44593b(0x83)]:{const _0x365702=this[_0x44593b(0xb2)][_0x44593b(0xd4)](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);_0x365702&&_0x365702[_0x44593b(0xce)]&&this['_threadCommentModel']['deleteComment'](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);break;}case _0x126599[_0x44593b(0xab)]:{this[_0x44593b(0xb2)][_0x44593b(0xeb)](_0x48733a,_0x4def0d,{'commentId':_0x3b7b13[_0x44593b(0xa6)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13[_0x44593b(0xaf)])});break;}case _0x126599['Solve']:{const _0x58317b=(_0x16d269=this['_threadCommentModel'][_0x44593b(0x92)](_0x3b7b13[_0x44593b(0xb5)])[_0x44593b(0xe7)](_0x4337a3=>_0x4337a3['threadId']===_0x3b7b13[_0x44593b(0x8a)]))==null?void 0x0:_0x16d269[_0x44593b(0x7e)];_0x58317b&&this[_0x44593b(0xb2)][_0x44593b(0x86)](_0x48733a,_0x4def0d,_0x58317b['id'],_0x3b7b13[_0x44593b(0x81)]===_0x3c6c6a[_0x44593b(0xaa)]);break;}}}));}};_0x44cf48=_0x2b0e65([_0x462b4c(0x0,_0xe19bdc[_0x3ecfc6(0x8e)](_0x42ac7c[_0x3ecfc6(0xb6)])),_0x462b4c(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x48b03f[_0x3ecfc6(0xef)])),_0x462b4c(0x2,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['UserManagerService'])),_0x462b4c(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['Injector']))],_0x44cf48);const _0x39cf89=_0x3ecfc6(0xc4),_0xa038f5={};var _0x2080b7=Object['getOwnPropertyDescriptor'],_0x590b87=(_0x5f4aa0,_0x283aa4,_0x23b549,_0x380cb1)=>{const _0x8c04a4=_0x3ecfc6;for(var _0x3d7915=_0x380cb1>0x1?void 0x0:_0x380cb1?_0x2080b7(_0x283aa4,_0x23b549):_0x283aa4,_0x2b64bd=_0x5f4aa0[_0x8c04a4(0x103)]-0x1,_0x516463;_0x2b64bd>=0x0;_0x2b64bd--)(_0x516463=_0x5f4aa0[_0x2b64bd])&&(_0x3d7915=_0x516463(_0x3d7915)||_0x3d7915);return _0x3d7915;},_0x38591f=(_0x2e4948,_0x55d888)=>(_0x38f5b0,_0x307ca2)=>_0x55d888(_0x38f5b0,_0x307ca2,_0x2e4948);function _0x51d544(_0x83065d,_0x2301e2){const _0x25467b=_0x3ecfc6,_0x2120b6=_0x83065d[_0x25467b(0xfe)][0x0];return{..._0x2301e2,'id':_0x2120b6[_0x25467b(0xa6)],'resolved':_0x83065d['solved']===0x1,'dT':_0x41f94d(_0x2120b6[_0x25467b(0xe3)]),'personId':_0x2120b6[_0x25467b(0x84)],'threadId':_0x2120b6[_0x25467b(0x8a)]};}function _0x3aebd2(_0x360c45,_0x454b6f,_0x7c9e9a){const _0x851f89=_0x3ecfc6;var _0x2ad367,_0x258762;if(((_0x258762=(_0x2ad367=_0x360c45==null?void 0x0:_0x360c45[_0x851f89(0xfe)])==null?void 0x0:_0x2ad367[_0x851f89(0x103)])!=null?_0x258762:0x0)>0x0){const _0x38826e=(_0x1ec1b2,_0x2d6a74)=>({'id':_0x1ec1b2[_0x851f89(0xa6)],'threadId':_0x1ec1b2[_0x851f89(0x8a)],'dT':_0x41f94d(_0x1ec1b2['createTimestamp']),'personId':_0x1ec1b2[_0x851f89(0x84)],'resolved':_0x360c45[_0x851f89(0x81)]===_0x3c6c6a[_0x851f89(0xaa)],'unitId':_0x454b6f,'subUnitId':_0x7c9e9a,'text':JSON[_0x851f89(0xd5)](_0x1ec1b2['content']),'parentId':_0x2d6a74}),_0x4778b1=_0x38826e(_0x360c45[_0x851f89(0xfe)][0x0]);return{..._0x4778b1,'children':_0x360c45['replies']['slice'](0x1)[_0x851f89(0x89)](_0x58b574=>_0x38826e(_0x58b574,_0x4778b1['id']))};}return null;}let _0x3e92a6=class{constructor(_0x54aa4e,_0x55f44d,_0x379886,_0xa101a6){const _0x3de947=_0x3ecfc6;this[_0x3de947(0x82)]=_0x54aa4e,this['_userService']=_0x55f44d,this[_0x3de947(0xb0)]=_0x379886,this[_0x3de947(0x96)]=_0xa101a6;}async[_0x3ecfc6(0xc7)](_0x52429a){const _0xd267e2=_0x3ecfc6;var _0x27b5d0,_0x16e07f;const {parentId:_0x259e7d,unitId:_0x5b087f,text:_0x5d24e6,threadId:_0xb20cf5}=_0x52429a,_0x228e3e=(_0x16e07f=(_0x27b5d0=_0x5d24e6['customRanges'])==null?void 0x0:_0x27b5d0[_0xd267e2(0xa0)](_0x3881ee=>_0x3881ee[_0xd267e2(0xb4)]===_0xe19bdc[_0xd267e2(0xe4)][_0xd267e2(0xd3)])[_0xd267e2(0x89)](_0x5a9a96=>_0x5a9a96[_0xd267e2(0xac)]))!=null?_0x16e07f:[],_0x1ce385=JSON[_0xd267e2(0x85)](_0x5d24e6),_0x24a185=(await this['_sessionService'][_0xd267e2(0xdb)](_0x5b087f))['getMemberID']();if(_0x259e7d){const _0x39ba1c={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e,'threadId':_0xb20cf5},_0x2f32ae=(await this['_httpService'][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+_0xd267e2(0xa8),{'body':_0x39ba1c}))[_0xd267e2(0xc8)]['reply'];return{..._0x52429a,'id':_0x2f32ae['replyId'],'dT':_0xe19bdc[_0xd267e2(0xd0)](+_0x2f32ae['createTimestamp'])[_0xd267e2(0xba)](_0xd267e2(0xe2)),'personId':_0x2f32ae['userId']};}else{const _0x532c3f={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e},_0x4dda61=await this[_0xd267e2(0x82)][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+'/add',{'body':_0x532c3f});return _0x51d544(_0x4dda61[_0xd267e2(0xc8)][_0xd267e2(0x94)],_0x52429a);}}async[_0x3ecfc6(0xeb)](_0x4f99c4){const _0x4234e9=_0x3ecfc6;var _0x2c7cc3,_0x4bb915;const {text:_0x40fe80,unitId:_0x3d8bd3}=_0x4f99c4,_0x316937=(_0x4bb915=(_0x2c7cc3=_0x40fe80['customRanges'])==null?void 0x0:_0x2c7cc3['filter'](_0x395933=>_0x395933[_0x4234e9(0xb4)]===_0xe19bdc['CustomRangeType'][_0x4234e9(0xd3)])['map'](_0x337fb8=>_0x337fb8[_0x4234e9(0xac)]))!=null?_0x4bb915:[],_0x3ef974=JSON[_0x4234e9(0x85)](_0x40fe80),_0x11b4d2=_0x4f99c4[_0x4234e9(0x8a)],_0x53f1bb=_0x4f99c4['id'],_0x5ee485={'memberId':(await this[_0x4234e9(0xb0)][_0x4234e9(0xdb)](_0x3d8bd3))[_0x4234e9(0xca)](),'unitId':_0x3d8bd3,'threadId':_0x11b4d2,'mention':_0x316937,'content':_0x3ef974,'replyId':_0x53f1bb},_0x1b4622=await this[_0x4234e9(0x82)][_0x4234e9(0xed)](_0x4234e9(0xdd)+_0x3d8bd3+_0x4234e9(0x100),{'body':_0x5ee485});return!_0x1b4622[_0x4234e9(0xc8)][_0x4234e9(0xb9)]||_0x1b4622['body'][_0x4234e9(0xb9)][_0x4234e9(0xe5)]===0x1;}async['resolveComment'](_0x24693a){const _0xb1945e=_0x3ecfc6,{unitId:_0x404101}=_0x24693a,_0x2e27ab=_0x24693a[_0xb1945e(0x8a)],_0x33ec05={'memberId':this[_0xb1945e(0xde)][_0xb1945e(0xf8)]()[_0xb1945e(0x9b)],'unitId':_0x404101,'threadId':_0x2e27ab,'solved':_0x24693a['resolved']?_0x3c6c6a[_0xb1945e(0xaa)]:_0x3c6c6a[_0xb1945e(0x9c)]},_0x8f5e84=await this[_0xb1945e(0x82)][_0xb1945e(0xed)](_0xb1945e(0xdd)+_0x404101+'/solved',{'body':_0x33ec05});return!_0x8f5e84[_0xb1945e(0xc8)][_0xb1945e(0xb9)]||_0x8f5e84[_0xb1945e(0xc8)]['error'][_0xb1945e(0xe5)]===0x1;}async[_0x3ecfc6(0xfd)](_0x1badd3,_0x49d44c,_0x4eca3d,_0x2a43e3){const _0x5e1dd8=_0x3ecfc6,_0x2fbf68={'memberId':(await this[_0x5e1dd8(0xb0)][_0x5e1dd8(0xdb)](_0x1badd3))['getMemberID'](),'threadId':_0x4eca3d,'replyId':_0x2a43e3,'unitId':_0x1badd3},_0x4c3cfe=await this[_0x5e1dd8(0x82)][_0x5e1dd8(0xed)](_0x5e1dd8(0xdd)+_0x1badd3+_0x5e1dd8(0xae),{'body':_0x2fbf68});return!_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)]||_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)][_0x5e1dd8(0xe5)]===0x1;}async[_0x3ecfc6(0xd9)](_0x3f424e,_0x197c6b,_0x3f5448){const _0x4d612b=_0x3ecfc6,_0x5612f8={'unitId':_0x3f424e,'threadId':_0x3f5448},_0x32c609=await this[_0x4d612b(0x82)][_0x4d612b(0xed)]('/universer-api/comment/unit/'+_0x3f424e+_0x4d612b(0xf2),{'body':_0x5612f8}),_0x20374=_0x3f5448[_0x4d612b(0x89)](_0x34d9ce=>_0x3aebd2(_0x32c609[_0x4d612b(0xc8)]['comments'][_0x34d9ce],_0x3f424e,_0x197c6b))[_0x4d612b(0xa0)](Boolean);return Object[_0x4d612b(0xa5)](_0x32c609[_0x4d612b(0xc8)][_0x4d612b(0xd6)])[_0x4d612b(0xb7)](_0x1f0b45=>{const _0x245e51=_0x4d612b;this[_0x245e51(0xde)][_0x245e51(0xc9)](_0x1f0b45);}),_0x20374;}[_0x3ecfc6(0xe6)](_0x7186b5){const _0x1c76c3=_0x3ecfc6;return{'id':_0x7186b5['id'],'threadId':_0x7186b5[_0x1c76c3(0x8a)],'ref':_0x7186b5[_0x1c76c3(0x7d)]};}};_0x3e92a6=_0x590b87([_0x38591f(0x0,_0xe19bdc['Inject'](_0x240138[_0x3ecfc6(0xd8)])),_0x38591f(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0x8f)])),_0x38591f(0x2,_0xe19bdc['Inject'](_0x42ac7c['CollaborationSessionService'])),_0x38591f(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)]))],_0x3e92a6);var _0x19a746=Object[_0x3ecfc6(0xc5)],_0x48d7d8=(_0x975b71,_0x57a3a7,_0x12500d,_0x500f91)=>{const _0x48a84e=_0x3ecfc6;for(var _0x231d6b=_0x500f91>0x1?void 0x0:_0x500f91?_0x19a746(_0x57a3a7,_0x12500d):_0x57a3a7,_0x3970f8=_0x975b71[_0x48a84e(0x103)]-0x1,_0x3f33ff;_0x3970f8>=0x0;_0x3970f8--)(_0x3f33ff=_0x975b71[_0x3970f8])&&(_0x231d6b=_0x3f33ff(_0x231d6b)||_0x231d6b);return _0x231d6b;},_0x2095e7=(_0x57a947,_0x34b9b6)=>(_0x29a9b5,_0x5b502b)=>_0x34b9b6(_0x29a9b5,_0x5b502b,_0x57a947);let _0x435457=class extends _0xe19bdc[_0x3ecfc6(0x91)]{constructor(_0x33c791,_0x5d37d9){const _0x22fd8b=_0x3ecfc6;super(),this[_0x22fd8b(0x7f)]=_0x33c791,this['_threadCommentDataSource']=_0x5d37d9,this[_0x22fd8b(0x95)]();}[_0x3ecfc6(0x95)](){const _0x3072ea=_0x3ecfc6;this[_0x3072ea(0x7f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3072ea(0xdf)]=!0x1;}};_0x435457=_0x48d7d8([_0x2095e7(0x0,_0x48b03f['IThreadCommentDataSourceService']),_0x2095e7(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x3e92a6))],_0x435457);var _0x1ebdb8=Object['defineProperty'],_0xa6bd07=Object['getOwnPropertyDescriptor'],_0x57c022=(_0x394866,_0x46f1e0,_0x8783bd)=>_0x46f1e0 in _0x394866?_0x1ebdb8(_0x394866,_0x46f1e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8783bd}):_0x394866[_0x46f1e0]=_0x8783bd,_0xf3f16d=(_0x2ecb46,_0x2f6e21,_0x595f90,_0x2b07f0)=>{for(var _0x4695af=_0x2b07f0>0x1?void 0x0:_0x2b07f0?_0xa6bd07(_0x2f6e21,_0x595f90):_0x2f6e21,_0xf4733c=_0x2ecb46['length']-0x1,_0x4c74e5;_0xf4733c>=0x0;_0xf4733c--)(_0x4c74e5=_0x2ecb46[_0xf4733c])&&(_0x4695af=_0x4c74e5(_0x4695af)||_0x4695af);return _0x4695af;},_0x20deea=(_0x232c8d,_0x3b32ce)=>(_0x241533,_0x2ca6fe)=>_0x3b32ce(_0x241533,_0x2ca6fe,_0x232c8d),_0x4307bc=(_0x3e8e35,_0x486fe0,_0x2011f8)=>_0x57c022(_0x3e8e35,typeof _0x486fe0!=_0x3ecfc6(0xf0)?_0x486fe0+'':_0x486fe0,_0x2011f8);_0x1285c5[_0x3ecfc6(0xc3)]=class extends _0xe19bdc[_0x3ecfc6(0xd2)]{constructor(_0x228de5=_0xa038f5,_0x3082b4,_0x84d2d7){const _0x3a3753=_0x3ecfc6;super(),this[_0x3a3753(0xe9)]=_0x228de5,this[_0x3a3753(0x96)]=_0x3082b4,this['_configService']=_0x84d2d7;const {..._0x4ba125}=_0xe19bdc[_0x3a3753(0x97)]({},_0xa038f5,this['_config']);this[_0x3a3753(0xa1)][_0x3a3753(0xff)](_0x39cf89,_0x4ba125);}[_0x3ecfc6(0xcf)](){const _0x23e4eb=_0x3ecfc6;[[_0x3e92a6],[_0x435457],[_0x44cf48]][_0x23e4eb(0xb7)](_0x2c1906=>{const _0x1db15c=_0x23e4eb;this[_0x1db15c(0x96)][_0x1db15c(0xf3)](_0x2c1906);});}[_0x3ecfc6(0xbb)](){const _0x44b80c=_0x3ecfc6;this['_injector'][_0x44b80c(0xa4)](_0x435457),this[_0x44b80c(0x96)][_0x44b80c(0xa4)](_0x44cf48);}},_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0x80),_0x4320c7),_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0xfb),_0xe19bdc[_0x3ecfc6(0xee)][_0x3ecfc6(0xb3)]),_0x1285c5[_0x3ecfc6(0xc3)]=_0xf3f16d([_0xe19bdc['DependentOn'](_0x3d9925['UniverThreadCommentUIPlugin'],_0x42ac7c[_0x3ecfc6(0xd7)],_0x331109[_0x3ecfc6(0xa3)]),_0x20deea(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)])),_0x20deea(0x2,_0xe19bdc[_0x3ecfc6(0xf4)])],_0x1285c5['UniverThreadCommentDataSourcePlugin']),Object[_0x3ecfc6(0x9f)](_0x1285c5,Symbol[_0x3ecfc6(0x9e)],{'value':_0x3ecfc6(0xbe)});}));
|
|
1
|
+
function _0x4ed8(){const _0x39b5c9=['1800189FEZlii','DependentOn','Add','format','47047avbLeC','_sessionService','@univerjs-pro/collaboration-client','rangeId','error','forEach','userId','root','resolveComment','_initUserSync','unitId','2076879dLdPVG','object','/universer-api/user/list','/list','threadId','users','thread-comment-data-source.config','stringify','/solved','dataSource','requireSession','post','_initDataSource','Edit','subscribe','298671OheraZ','length','solved','89228OYDmMC','Disposable','addComment','body','parentId','UniverLicensePlugin','personId','reply','type','/reply','getMemberID','YYYY/MM/DD\x20HH:mm','Solve','CollaborationSessionService','@univerjs-pro/license','Solved','deleteComment','size','@univerjs/thread-comment-ui','8ARuAgR','UserManagerService','UniverInstanceType','1870446JUBfCC','/add','_config','content','code','Delete','UniverCore','OpenOrReOpen','_configService','map','516524QNJctx','_httpService','Module','getCurrentUser','replyId','@univerjs/network','/edit','getOwnPropertyDescriptor','replies','addUser','Injector','_threadCommentDataSourceService','onStarting','commentUpdate$','rangeType','Inject','amd','IThreadCommentDataSourceService','defineProperty','UNRECOGNIZED','syncUpdateMutationToColla','/delete','CustomRangeType','filter','delete','getUnit','find','@univerjs/thread-comment','COMMENT','parse','user','add','HTTPService','_commentService','_threadCommentModel','Plugin','disposeWithMe','listComments','rxjs','65EOTbVL','function','_userService','UniverNetwork','UniverThreadCommentUIPlugin','get','updateComment','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','pluginName','Unknown','createTimestamp','getUser','/universer-api/comment/unit/','comments','exports','UniverThreadComment','IConfigService','UniverProThreadCommentDatasource','dayjs','_init','_injector','bufferTime','UniverThreadCommentDataSourcePlugin'];_0x4ed8=function(){return _0x39b5c9;};return _0x4ed8();}function _0x1d5a(_0x573fae,_0x331d25){const _0x4ed850=_0x4ed8();return _0x1d5a=function(_0x1d5aad,_0x1f48cb){_0x1d5aad=_0x1d5aad-0x9c;let _0xd6ed26=_0x4ed850[_0x1d5aad];return _0xd6ed26;},_0x1d5a(_0x573fae,_0x331d25);}(function(_0x152de4,_0x22dc36){const _0x227d0a=_0x1d5a,_0x467f22=_0x152de4();while(!![]){try{const _0x5d9bde=-parseInt(_0x227d0a(0x114))/0x1+parseInt(_0x227d0a(0xd0))/0x2+parseInt(_0x227d0a(0xad))/0x3+-parseInt(_0x227d0a(0xb0))/0x4*(parseInt(_0x227d0a(0xf7))/0x5)+-parseInt(_0x227d0a(0xc6))/0x6+parseInt(_0x227d0a(0x9e))/0x7*(parseInt(_0x227d0a(0xc3))/0x8)+parseInt(_0x227d0a(0x110))/0x9;if(_0x5d9bde===_0x22dc36)break;else _0x467f22['push'](_0x467f22['shift']());}catch(_0x28d5a3){_0x467f22['push'](_0x467f22['shift']());}}}(_0x4ed8,0x323be),function(_0x25a8e0,_0xbbc4ab){const _0x355418=_0x1d5a;typeof exports==_0x355418(0x9f)&&typeof module<'u'?_0xbbc4ab(exports,require(_0x355418(0x116)),require('@univerjs-pro/license'),require(_0x355418(0x100)),require('@univerjs/thread-comment-ui'),require(_0x355418(0xeb)),require(_0x355418(0xf6)),require(_0x355418(0xd5))):typeof define==_0x355418(0xf8)&&define[_0x355418(0xe0)]?define([_0x355418(0x107),'@univerjs-pro/collaboration-client',_0x355418(0xbe),'@univerjs/core',_0x355418(0xc2),'@univerjs/thread-comment',_0x355418(0xf6),'@univerjs/network'],_0xbbc4ab):(_0x25a8e0=typeof globalThis<'u'?globalThis:_0x25a8e0||self,_0xbbc4ab(_0x25a8e0[_0x355418(0x10a)]={},_0x25a8e0['UniverProCollaborationClient'],_0x25a8e0['UniverProLicense'],_0x25a8e0[_0x355418(0xcc)],_0x25a8e0['UniverThreadCommentUi'],_0x25a8e0[_0x355418(0x108)],_0x25a8e0[_0x355418(0xf6)],_0x25a8e0[_0x355418(0xfa)]));}(this,function(_0x8187aa,_0x1765f4,_0x3d651f,_0x4c4d36,_0x2c95e6,_0x10f783,_0x5166ce,_0x34a951){'use strict';const _0x3f7229=_0x1d5a;const _0x22324a=_0x3f7229(0xff);var _0x13ea5d=(_0x4b79ff=>(_0x4b79ff[_0x4b79ff[_0x3f7229(0xcd)]=0x0]='OpenOrReOpen',_0x4b79ff[_0x4b79ff[_0x3f7229(0xbf)]=0x1]=_0x3f7229(0xbf),_0x4b79ff[_0x4b79ff[_0x3f7229(0xe3)]=-0x1]='UNRECOGNIZED',_0x4b79ff))(_0x13ea5d||{}),_0x3efbb5=(_0x2056be=>(_0x2056be[_0x2056be[_0x3f7229(0x102)]=0x0]=_0x3f7229(0x102),_0x2056be[_0x2056be['Add']=0x1]='Add',_0x2056be[_0x2056be['Reply']=0x2]='Reply',_0x2056be[_0x2056be[_0x3f7229(0xab)]=0x3]=_0x3f7229(0xab),_0x2056be[_0x2056be['Delete']=0x4]=_0x3f7229(0xcb),_0x2056be[_0x2056be[_0x3f7229(0xbc)]=0x5]=_0x3f7229(0xbc),_0x2056be[_0x2056be[_0x3f7229(0xe3)]=-0x1]='UNRECOGNIZED',_0x2056be))(_0x3efbb5||{});const _0x53b4fb=_0x3c34c5=>_0x4c4d36[_0x3f7229(0x10b)](new Date(+_0x3c34c5))[_0x3f7229(0x113)](_0x3f7229(0xbb)),_0x1b0836=async(_0xa086a,_0x6a9cd6)=>{const _0x3b0615=_0x3f7229,_0x2bde16=_0xa086a['get'](_0x4c4d36[_0x3b0615(0xc4)]),_0x4f104d=_0xa086a[_0x3b0615(0xfc)](_0x34a951[_0x3b0615(0xf0)]);_0x6a9cd6['forEach'](_0x2cfee2=>{const _0x2b9e31=_0x3b0615;_0x2bde16[_0x2b9e31(0x104)](_0x2cfee2)&&_0x6a9cd6[_0x2b9e31(0xe8)](_0x2cfee2);}),_0x6a9cd6[_0x3b0615(0xc1)]&&(await _0x4f104d[_0x3b0615(0xfc)](_0x3b0615(0xa0),{'params':{'userIDs':[..._0x6a9cd6]}}))[_0x3b0615(0xb3)][_0x3b0615(0xa3)][_0x3b0615(0x119)](_0xac267e=>{const _0x265049=_0x3b0615;_0xac267e&&_0x2bde16[_0x265049(0xd9)](_0xac267e);});};var _0x3fd38d=Object[_0x3f7229(0xd7)],_0x3a156b=(_0x3f02ed,_0x305ea8,_0x182cbf,_0x522e7b)=>{for(var _0x260381=_0x522e7b>0x1?void 0x0:_0x522e7b?_0x3fd38d(_0x305ea8,_0x182cbf):_0x305ea8,_0x33db2b=_0x3f02ed['length']-0x1,_0x331c40;_0x33db2b>=0x0;_0x33db2b--)(_0x331c40=_0x3f02ed[_0x33db2b])&&(_0x260381=_0x331c40(_0x260381)||_0x260381);return _0x260381;},_0x191102=(_0x566650,_0x34edf3)=>(_0x1ba545,_0x36aaf0)=>_0x34edf3(_0x1ba545,_0x36aaf0,_0x566650);let _0x2c0684=class extends _0x4c4d36[_0x3f7229(0xb1)]{constructor(_0x5dbe4d,_0x4ef742,_0x57b5ee,_0x2e69a8){const _0x9d130f=_0x3f7229;super(),this[_0x9d130f(0xf1)]=_0x5dbe4d,this[_0x9d130f(0xf2)]=_0x4ef742,this['_userService']=_0x57b5ee,this[_0x9d130f(0x10d)]=_0x2e69a8,this[_0x9d130f(0x10c)](),this[_0x9d130f(0x9c)]();}[_0x3f7229(0x9c)](){const _0x56e782=_0x3f7229;this[_0x56e782(0xf4)](this[_0x56e782(0xf2)][_0x56e782(0xdd)]['pipe'](_0x5166ce[_0x56e782(0x10e)](0x10))[_0x56e782(0xac)](_0x3ec44c=>{const _0x5b4e4d=_0x56e782,_0xd43d61=new Set();_0x3ec44c[_0x5b4e4d(0x119)](_0x1da153=>{const _0x506aa9=_0x5b4e4d;switch(_0x1da153[_0x506aa9(0xb8)]){case _0x506aa9(0xef):{const _0x439b3c=_0x1da153['payload'][_0x506aa9(0xb6)];_0xd43d61['add'](_0x439b3c);break;}}}),_0x1b0836(this['_injector'],_0xd43d61);}));}[_0x3f7229(0x10c)](){const _0x2917ab=_0x3f7229;this[_0x2917ab(0xf4)](this[_0x2917ab(0xf1)][_0x2917ab(0xdd)][_0x2917ab(0xac)](async _0x406edf=>{const _0x1e04ce=_0x2917ab;var _0x3de239,_0x36cb99,_0x11621e,_0x263e72;const _0xb27700=(_0x3de239=this[_0x1e04ce(0xf2)][_0x1e04ce(0xe9)](_0x406edf['unitId'])['find'](_0x408560=>_0x408560['threadId']===_0x406edf[_0x1e04ce(0xa2)]))==null?void 0x0:_0x3de239[_0x1e04ce(0x11b)];if(!_0xb27700)return;const {unitId:_0x1eefa5,subUnitId:_0x4db26a}=_0xb27700;switch(_0x406edf[_0x1e04ce(0xee)]&&this[_0x1e04ce(0xf9)][_0x1e04ce(0xd9)](_0x406edf['user']),_0x406edf['type']){case _0x3efbb5[_0x1e04ce(0x112)]:break;case _0x3efbb5['Reply']:{this[_0x1e04ce(0xf2)][_0x1e04ce(0xb2)](_0x1eefa5,_0x4db26a,{'unitId':_0x1eefa5,'subUnitId':_0x4db26a,'ref':'','id':_0x406edf[_0x1e04ce(0xd4)],'dT':_0x53b4fb(+_0x406edf[_0x1e04ce(0x103)]),'threadId':_0x406edf[_0x1e04ce(0xa2)],'personId':(_0x11621e=(_0x36cb99=_0x406edf[_0x1e04ce(0xee)])==null?void 0x0:_0x36cb99['userID'])!=null?_0x11621e:_0x406edf['userId'],'text':JSON[_0x1e04ce(0xed)](_0x406edf['content']),'parentId':_0xb27700['id']});break;}case _0x3efbb5[_0x1e04ce(0xcb)]:{const _0x50b5c6=this[_0x1e04ce(0xf2)]['getComment'](_0x1eefa5,_0x4db26a,_0x406edf[_0x1e04ce(0xd4)]);_0x50b5c6&&_0x50b5c6[_0x1e04ce(0xb4)]&&this[_0x1e04ce(0xf2)][_0x1e04ce(0xc0)](_0x1eefa5,_0x4db26a,_0x406edf[_0x1e04ce(0xd4)]);break;}case _0x3efbb5['Edit']:{this[_0x1e04ce(0xf2)]['updateComment'](_0x1eefa5,_0x4db26a,{'commentId':_0x406edf[_0x1e04ce(0xd4)],'text':JSON[_0x1e04ce(0xed)](_0x406edf[_0x1e04ce(0xc9)])});break;}case _0x3efbb5['Solve']:{const _0x2f6f7a=(_0x263e72=this[_0x1e04ce(0xf2)][_0x1e04ce(0xe9)](_0x406edf[_0x1e04ce(0x9d)])[_0x1e04ce(0xea)](_0x1e5513=>_0x1e5513['threadId']===_0x406edf[_0x1e04ce(0xa2)]))==null?void 0x0:_0x263e72[_0x1e04ce(0x11b)];_0x2f6f7a&&this['_threadCommentModel'][_0x1e04ce(0x11c)](_0x1eefa5,_0x4db26a,_0x2f6f7a['id'],_0x406edf[_0x1e04ce(0xaf)]===_0x13ea5d[_0x1e04ce(0xbf)]);break;}}}));}};_0x2c0684=_0x3a156b([_0x191102(0x0,_0x4c4d36[_0x3f7229(0xdf)](_0x1765f4['CommentService'])),_0x191102(0x1,_0x4c4d36['Inject'](_0x10f783['ThreadCommentModel'])),_0x191102(0x2,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xc4)])),_0x191102(0x3,_0x4c4d36['Inject'](_0x4c4d36['Injector']))],_0x2c0684);const _0xb24609=_0x3f7229(0xa4),_0x57b0be={};var _0x131d39=Object[_0x3f7229(0xd7)],_0x2dae21=(_0x2ec1bd,_0x1a0477,_0x27421d,_0x564929)=>{const _0x2360aa=_0x3f7229;for(var _0x2a6205=_0x564929>0x1?void 0x0:_0x564929?_0x131d39(_0x1a0477,_0x27421d):_0x1a0477,_0x356875=_0x2ec1bd[_0x2360aa(0xae)]-0x1,_0x4c62ed;_0x356875>=0x0;_0x356875--)(_0x4c62ed=_0x2ec1bd[_0x356875])&&(_0x2a6205=_0x4c62ed(_0x2a6205)||_0x2a6205);return _0x2a6205;},_0x232d9f=(_0x50a518,_0x4b852b)=>(_0x3b2823,_0x3e04e3)=>_0x4b852b(_0x3b2823,_0x3e04e3,_0x50a518);function _0x166fc4(_0x30eaa8,_0x5031cb){const _0x5750fd=_0x3f7229,_0x42ac7f=_0x30eaa8[_0x5750fd(0xd8)][0x0];return{..._0x5031cb,'id':_0x42ac7f[_0x5750fd(0xd4)],'resolved':_0x30eaa8[_0x5750fd(0xaf)]===0x1,'dT':_0x53b4fb(_0x42ac7f['createTimestamp']),'personId':_0x42ac7f[_0x5750fd(0x11a)],'threadId':_0x42ac7f['threadId']};}function _0x561575(_0x33f0d,_0x453546,_0x57f832){const _0x2f2b70=_0x3f7229;var _0x112636,_0x5852de;if(((_0x5852de=(_0x112636=_0x33f0d==null?void 0x0:_0x33f0d['replies'])==null?void 0x0:_0x112636[_0x2f2b70(0xae)])!=null?_0x5852de:0x0)>0x0){const _0x1aee37=(_0x12f6ff,_0x18fcb0)=>({'id':_0x12f6ff[_0x2f2b70(0xd4)],'threadId':_0x12f6ff[_0x2f2b70(0xa2)],'dT':_0x53b4fb(_0x12f6ff[_0x2f2b70(0x103)]),'personId':_0x12f6ff[_0x2f2b70(0x11a)],'resolved':_0x33f0d[_0x2f2b70(0xaf)]===_0x13ea5d['Solved'],'unitId':_0x453546,'subUnitId':_0x57f832,'text':JSON['parse'](_0x12f6ff[_0x2f2b70(0xc9)]),'parentId':_0x18fcb0}),_0x3444c4=_0x1aee37(_0x33f0d[_0x2f2b70(0xd8)][0x0]);return{..._0x3444c4,'children':_0x33f0d[_0x2f2b70(0xd8)]['slice'](0x1)[_0x2f2b70(0xcf)](_0x31d5c2=>_0x1aee37(_0x31d5c2,_0x3444c4['id']))};}return null;}let _0xf28e41=class{constructor(_0x44c719,_0x51c78f,_0x168dd0,_0x3baf8c){const _0x1a8909=_0x3f7229;this[_0x1a8909(0xd1)]=_0x44c719,this['_userService']=_0x51c78f,this[_0x1a8909(0x115)]=_0x168dd0,this[_0x1a8909(0x10d)]=_0x3baf8c;}async[_0x3f7229(0xb2)](_0x9084d7){const _0x1db296=_0x3f7229;var _0x551f65,_0x153e21;const {parentId:_0x2bed9a,unitId:_0x341eb0,text:_0x56a5fc,threadId:_0x312e07}=_0x9084d7,_0x596b2c=(_0x153e21=(_0x551f65=_0x56a5fc['customRanges'])==null?void 0x0:_0x551f65[_0x1db296(0xe7)](_0x2ec8a2=>_0x2ec8a2[_0x1db296(0xde)]===_0x4c4d36[_0x1db296(0xe6)][_0x1db296(0xec)])[_0x1db296(0xcf)](_0x247038=>_0x247038['rangeId']))!=null?_0x153e21:[],_0x3dc6de=JSON[_0x1db296(0xa5)](_0x56a5fc),_0x5155e2=(await this[_0x1db296(0x115)][_0x1db296(0xa8)](_0x341eb0))[_0x1db296(0xba)]();if(_0x2bed9a){const _0x13bf60={'memberId':_0x5155e2,'unitId':_0x341eb0,'content':_0x3dc6de,'mention':_0x596b2c,'threadId':_0x312e07},_0x549991=(await this[_0x1db296(0xd1)]['post']('/universer-api/comment/unit/'+_0x341eb0+_0x1db296(0xb9),{'body':_0x13bf60}))[_0x1db296(0xb3)][_0x1db296(0xb7)];return{..._0x9084d7,'id':_0x549991['replyId'],'dT':_0x4c4d36['dayjs'](+_0x549991[_0x1db296(0x103)])[_0x1db296(0x113)](_0x1db296(0xbb)),'personId':_0x549991['userId']};}else{const _0x4458a8={'memberId':_0x5155e2,'unitId':_0x341eb0,'content':_0x3dc6de,'mention':_0x596b2c},_0x53c45f=await this[_0x1db296(0xd1)][_0x1db296(0xa9)](_0x1db296(0x105)+_0x341eb0+_0x1db296(0xc7),{'body':_0x4458a8});return _0x166fc4(_0x53c45f[_0x1db296(0xb3)]['comment'],_0x9084d7);}}async[_0x3f7229(0xfd)](_0x2a8990){const _0x470688=_0x3f7229;var _0x65e54,_0x3563d6;const {text:_0x492357,unitId:_0x59a8b5}=_0x2a8990,_0x448b2b=(_0x3563d6=(_0x65e54=_0x492357['customRanges'])==null?void 0x0:_0x65e54[_0x470688(0xe7)](_0x481427=>_0x481427[_0x470688(0xde)]===_0x4c4d36['CustomRangeType'][_0x470688(0xec)])[_0x470688(0xcf)](_0x298003=>_0x298003[_0x470688(0x117)]))!=null?_0x3563d6:[],_0x2c4a92=JSON['stringify'](_0x492357),_0x4675bc=_0x2a8990[_0x470688(0xa2)],_0x4762b6=_0x2a8990['id'],_0x46a475={'memberId':(await this[_0x470688(0x115)]['requireSession'](_0x59a8b5))[_0x470688(0xba)](),'unitId':_0x59a8b5,'threadId':_0x4675bc,'mention':_0x448b2b,'content':_0x2c4a92,'replyId':_0x4762b6},_0x447809=await this[_0x470688(0xd1)][_0x470688(0xa9)](_0x470688(0x105)+_0x59a8b5+_0x470688(0xd6),{'body':_0x46a475});return!_0x447809[_0x470688(0xb3)][_0x470688(0x118)]||_0x447809[_0x470688(0xb3)]['error']['code']===0x1;}async[_0x3f7229(0x11c)](_0x60059a){const _0x1930c5=_0x3f7229,{unitId:_0x535d43}=_0x60059a,_0x29e50f=_0x60059a[_0x1930c5(0xa2)],_0x4cab42={'memberId':this['_userService'][_0x1930c5(0xd3)]()['userID'],'unitId':_0x535d43,'threadId':_0x29e50f,'solved':_0x60059a['resolved']?_0x13ea5d[_0x1930c5(0xbf)]:_0x13ea5d[_0x1930c5(0xcd)]},_0x472e33=await this[_0x1930c5(0xd1)][_0x1930c5(0xa9)](_0x1930c5(0x105)+_0x535d43+_0x1930c5(0xa6),{'body':_0x4cab42});return!_0x472e33[_0x1930c5(0xb3)]['error']||_0x472e33['body'][_0x1930c5(0x118)][_0x1930c5(0xca)]===0x1;}async[_0x3f7229(0xc0)](_0x4d0f98,_0x4f5041,_0x3222bc,_0x221ae9){const _0x30c071=_0x3f7229,_0x4246a4={'memberId':(await this[_0x30c071(0x115)][_0x30c071(0xa8)](_0x4d0f98))[_0x30c071(0xba)](),'threadId':_0x3222bc,'replyId':_0x221ae9,'unitId':_0x4d0f98},_0x568f9b=await this[_0x30c071(0xd1)][_0x30c071(0xa9)](_0x30c071(0x105)+_0x4d0f98+_0x30c071(0xe5),{'body':_0x4246a4});return!_0x568f9b['body']['error']||_0x568f9b[_0x30c071(0xb3)]['error'][_0x30c071(0xca)]===0x1;}async[_0x3f7229(0xf5)](_0x24671f,_0x403964,_0x4a8658){const _0x14aa00=_0x3f7229,_0x126f17={'unitId':_0x24671f,'threadId':_0x4a8658},_0x42763=await this[_0x14aa00(0xd1)][_0x14aa00(0xa9)](_0x14aa00(0x105)+_0x24671f+_0x14aa00(0xa1),{'body':_0x126f17}),_0x2a1a7f=_0x4a8658['map'](_0x47b5e7=>_0x561575(_0x42763[_0x14aa00(0xb3)][_0x14aa00(0x106)][_0x47b5e7],_0x24671f,_0x403964))[_0x14aa00(0xe7)](Boolean);return Object['values'](_0x42763[_0x14aa00(0xb3)][_0x14aa00(0xa3)])['forEach'](_0x5ae7fe=>{const _0x4607ec=_0x14aa00;this[_0x4607ec(0xf9)][_0x4607ec(0xd9)](_0x5ae7fe);}),_0x2a1a7f;}['saveCommentToSnapshot'](_0x43296c){const _0x63b4d1=_0x3f7229;return{'id':_0x43296c['id'],'threadId':_0x43296c[_0x63b4d1(0xa2)],'ref':_0x43296c['ref']};}};_0xf28e41=_0x2dae21([_0x232d9f(0x0,_0x4c4d36[_0x3f7229(0xdf)](_0x34a951[_0x3f7229(0xf0)])),_0x232d9f(0x1,_0x4c4d36['Inject'](_0x4c4d36['UserManagerService'])),_0x232d9f(0x2,_0x4c4d36[_0x3f7229(0xdf)](_0x1765f4[_0x3f7229(0xbd)])),_0x232d9f(0x3,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xda)]))],_0xf28e41);var _0x5f043c=Object['getOwnPropertyDescriptor'],_0x552284=(_0x4652eb,_0x2e8228,_0x3b8235,_0x48b6a0)=>{for(var _0x334ce3=_0x48b6a0>0x1?void 0x0:_0x48b6a0?_0x5f043c(_0x2e8228,_0x3b8235):_0x2e8228,_0x1cc624=_0x4652eb['length']-0x1,_0x3994a2;_0x1cc624>=0x0;_0x1cc624--)(_0x3994a2=_0x4652eb[_0x1cc624])&&(_0x334ce3=_0x3994a2(_0x334ce3)||_0x334ce3);return _0x334ce3;},_0x5d661f=(_0x1da13e,_0x1c0f52)=>(_0x32feb8,_0x3b907d)=>_0x1c0f52(_0x32feb8,_0x3b907d,_0x1da13e);let _0x308a4a=class extends _0x4c4d36[_0x3f7229(0xb1)]{constructor(_0x643285,_0x490b8d){const _0x1ebc4b=_0x3f7229;super(),this[_0x1ebc4b(0xdb)]=_0x643285,this['_threadCommentDataSource']=_0x490b8d,this[_0x1ebc4b(0xaa)]();}[_0x3f7229(0xaa)](){const _0x3542bf=_0x3f7229;this['_threadCommentDataSourceService'][_0x3542bf(0xa7)]=this['_threadCommentDataSource'],this[_0x3542bf(0xdb)][_0x3542bf(0xe4)]=!0x1;}};_0x308a4a=_0x552284([_0x5d661f(0x0,_0x10f783[_0x3f7229(0xe1)]),_0x5d661f(0x1,_0x4c4d36[_0x3f7229(0xdf)](_0xf28e41))],_0x308a4a);var _0x9edc54=Object[_0x3f7229(0xe2)],_0x549f00=Object['getOwnPropertyDescriptor'],_0xfa7958=(_0x16815e,_0x4157a5,_0x3f521c)=>_0x4157a5 in _0x16815e?_0x9edc54(_0x16815e,_0x4157a5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f521c}):_0x16815e[_0x4157a5]=_0x3f521c,_0x5efc43=(_0x1cb7b4,_0x2f7ad0,_0x26aeb3,_0x545d8b)=>{for(var _0x70cee5=_0x545d8b>0x1?void 0x0:_0x545d8b?_0x549f00(_0x2f7ad0,_0x26aeb3):_0x2f7ad0,_0x4bd5c2=_0x1cb7b4['length']-0x1,_0x2a2ff0;_0x4bd5c2>=0x0;_0x4bd5c2--)(_0x2a2ff0=_0x1cb7b4[_0x4bd5c2])&&(_0x70cee5=_0x2a2ff0(_0x70cee5)||_0x70cee5);return _0x70cee5;},_0x35b380=(_0x567b96,_0xd74ee7)=>(_0x485317,_0x569991)=>_0xd74ee7(_0x485317,_0x569991,_0x567b96),_0x663ba8=(_0x8b9e1b,_0x363f91,_0x1535fb)=>_0xfa7958(_0x8b9e1b,typeof _0x363f91!='symbol'?_0x363f91+'':_0x363f91,_0x1535fb);_0x8187aa[_0x3f7229(0x10f)]=class extends _0x4c4d36[_0x3f7229(0xf3)]{constructor(_0x3b748b=_0x57b0be,_0x294b8d,_0x397a11){const _0x5187a0=_0x3f7229;super(),this[_0x5187a0(0xc8)]=_0x3b748b,this[_0x5187a0(0x10d)]=_0x294b8d,this[_0x5187a0(0xce)]=_0x397a11;const {..._0x5a72b8}=_0x4c4d36['merge']({},_0x57b0be,this[_0x5187a0(0xc8)]);this[_0x5187a0(0xce)]['setConfig'](_0xb24609,_0x5a72b8);}[_0x3f7229(0xdc)](){[[_0xf28e41],[_0x308a4a],[_0x2c0684]]['forEach'](_0x49dce5=>{this['_injector']['add'](_0x49dce5);});}[_0x3f7229(0xfe)](){const _0x150cfa=_0x3f7229;this['_injector']['get'](_0x308a4a),this[_0x150cfa(0x10d)][_0x150cfa(0xfc)](_0x2c0684);}},_0x663ba8(_0x8187aa[_0x3f7229(0x10f)],_0x3f7229(0x101),_0x22324a),_0x663ba8(_0x8187aa[_0x3f7229(0x10f)],'type',_0x4c4d36[_0x3f7229(0xc5)]['UNIVER_UNKNOWN']),_0x8187aa[_0x3f7229(0x10f)]=_0x5efc43([_0x4c4d36[_0x3f7229(0x111)](_0x2c95e6[_0x3f7229(0xfb)],_0x1765f4['UniverCollaborationClientPlugin'],_0x3d651f[_0x3f7229(0xb5)]),_0x35b380(0x1,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xda)])),_0x35b380(0x2,_0x4c4d36[_0x3f7229(0x109)])],_0x8187aa[_0x3f7229(0x10f)]),Object[_0x3f7229(0xe2)](_0x8187aa,Symbol['toStringTag'],{'value':_0x3f7229(0xd2)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.1-nightly.
|
|
3
|
+
"version": "0.8.1-nightly.202506171607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.1-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.1-nightly.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.1-nightly.202506171607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.1-nightly.202506171607",
|
|
50
|
+
"@univerjs/network": "0.8.1-nightly.202506171607",
|
|
51
|
+
"@univerjs/core": "0.8.1-nightly.202506171607",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.8.1-nightly.
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506171607",
|
|
54
|
+
"@univerjs/thread-comment": "0.8.1-nightly.202506171607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|