@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504121606 → 0.6.10-nightly.202504131606
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 _0x2eb3ea=_0x3027;(function(_0x3fa170,_0x4ec17d){const _0x1e27fb=_0x3027,_0x311c3c=_0x3fa170();while(!![]){try{const _0x2fe2bb=parseInt(_0x1e27fb(0xde))/0x1*(parseInt(_0x1e27fb(0xd5))/0x2)+-parseInt(_0x1e27fb(0x105))/0x3*(parseInt(_0x1e27fb(0x10c))/0x4)+parseInt(_0x1e27fb(0xe7))/0x5+-parseInt(_0x1e27fb(0x11c))/0x6*(-parseInt(_0x1e27fb(0x10d))/0x7)+-parseInt(_0x1e27fb(0xa3))/0x8+-parseInt(_0x1e27fb(0x10b))/0x9*(parseInt(_0x1e27fb(0x100))/0xa)+parseInt(_0x1e27fb(0xd1))/0xb;if(_0x2fe2bb===_0x4ec17d)break;else _0x311c3c['push'](_0x311c3c['shift']());}catch(_0x245dd1){_0x311c3c['push'](_0x311c3c['shift']());}}}(_0x2eac,0x2a32f));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x2eb3ea(0xa6)});const b=require(_0x2eb3ea(0xd8)),T=require(_0x2eb3ea(0xa9)),c=require(_0x2eb3ea(0xda)),j=require(_0x2eb3ea(0xfa)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x2eb3ea(0xaa)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6c9f=>(_0x5b6c9f[_0x5b6c9f[_0x2eb3ea(0xa1)]=0x0]=_0x2eb3ea(0xa1),_0x5b6c9f[_0x5b6c9f[_0x2eb3ea(0xb0)]=0x1]=_0x2eb3ea(0xb0),_0x5b6c9f[_0x5b6c9f[_0x2eb3ea(0xe8)]=-0x1]=_0x2eb3ea(0xe8),_0x5b6c9f))(I||{}),v=(_0x17d229=>(_0x17d229[_0x17d229[_0x2eb3ea(0xba)]=0x0]=_0x2eb3ea(0xba),_0x17d229[_0x17d229[_0x2eb3ea(0xe0)]=0x1]='Add',_0x17d229[_0x17d229[_0x2eb3ea(0xcc)]=0x2]=_0x2eb3ea(0xcc),_0x17d229[_0x17d229['Edit']=0x3]=_0x2eb3ea(0xb2),_0x17d229[_0x17d229[_0x2eb3ea(0xea)]=0x4]=_0x2eb3ea(0xea),_0x17d229[_0x17d229[_0x2eb3ea(0xcf)]=0x5]=_0x2eb3ea(0xcf),_0x17d229[_0x17d229['UNRECOGNIZED']=-0x1]=_0x2eb3ea(0xe8),_0x17d229))(v||{});const f=_0xbf85c9=>c[_0x2eb3ea(0xdc)](new Date(+_0xbf85c9))['format'](_0x2eb3ea(0xd9)),R=async(_0x305c2d,_0x2f436d)=>{const _0x5190aa=_0x2eb3ea,_0x4976c0=_0x305c2d[_0x5190aa(0xd7)](c['UserManagerService']),_0xfcb506=_0x305c2d[_0x5190aa(0xd7)](P[_0x5190aa(0xe3)]);_0x2f436d[_0x5190aa(0xb5)](_0x9bf762=>{_0x4976c0['getUser'](_0x9bf762)&&_0x2f436d['delete'](_0x9bf762);}),_0x2f436d[_0x5190aa(0x11b)]&&(await _0xfcb506[_0x5190aa(0xd7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2f436d]}}))[_0x5190aa(0x103)]['users']['forEach'](_0x5ada4a=>{const _0x5f33f2=_0x5190aa;_0x5ada4a&&_0x4976c0[_0x5f33f2(0xf2)](_0x5ada4a);});};var $=Object[_0x2eb3ea(0x114)],E=(_0x530fc8,_0x5e80df,_0x4e1646,_0x533ea9)=>{const _0x186169=_0x2eb3ea;for(var _0x2729e3=_0x533ea9>0x1?void 0x0:_0x533ea9?$(_0x5e80df,_0x4e1646):_0x5e80df,_0x4412c4=_0x530fc8[_0x186169(0x10f)]-0x1,_0x2f9733;_0x4412c4>=0x0;_0x4412c4--)(_0x2f9733=_0x530fc8[_0x4412c4])&&(_0x2729e3=_0x2f9733(_0x2729e3)||_0x2729e3);return _0x2729e3;},S=(_0x50d09c,_0x6a0536)=>(_0x3619b4,_0x4d82e7)=>_0x6a0536(_0x3619b4,_0x4d82e7,_0x50d09c);let p=class extends c[_0x2eb3ea(0xe4)]{constructor(_0x4b25ff,_0x4084e6,_0x49d87d,_0x59a53e){const _0x222b1a=_0x2eb3ea;super(),this[_0x222b1a(0x104)]=_0x4b25ff,this[_0x222b1a(0xeb)]=_0x4084e6,this['_userService']=_0x49d87d,this[_0x222b1a(0xf9)]=_0x59a53e,this[_0x222b1a(0x116)](),this[_0x222b1a(0x111)]();}[_0x2eb3ea(0x111)](){const _0x2d6c27=_0x2eb3ea;this[_0x2d6c27(0xf5)](this['_threadCommentModel'][_0x2d6c27(0xa0)]['pipe'](w[_0x2d6c27(0xee)](0x10))[_0x2d6c27(0xd3)](_0x59f5c6=>{const _0x4977c7=_0x2d6c27,_0x187f62=new Set();_0x59f5c6[_0x4977c7(0xb5)](_0x451fd5=>{const _0xd32b44=_0x4977c7;switch(_0x451fd5['type']){case'add':{const _0x278fbd=_0x451fd5[_0xd32b44(0xe9)][_0xd32b44(0x109)];_0x187f62[_0xd32b44(0xd6)](_0x278fbd);break;}}}),R(this[_0x4977c7(0xf9)],_0x187f62);}));}[_0x2eb3ea(0x116)](){const _0xadc3fd=_0x2eb3ea;this[_0xadc3fd(0xf5)](this[_0xadc3fd(0x104)][_0xadc3fd(0xa0)][_0xadc3fd(0xd3)](async _0x465aeb=>{const _0x196675=_0xadc3fd;var _0x1f38e2,_0xcb4095,_0x4dd2e9,_0x3bf803;const _0x31c985=(_0x1f38e2=this[_0x196675(0xeb)][_0x196675(0xa8)](_0x465aeb['unitId'])[_0x196675(0x112)](_0x259d48=>_0x259d48[_0x196675(0xbc)]===_0x465aeb[_0x196675(0xbc)]))==null?void 0x0:_0x1f38e2[_0x196675(0xc6)];if(!_0x31c985)return;const {unitId:_0x53a018,subUnitId:_0x2a42ab}=_0x31c985;switch(_0x465aeb[_0x196675(0xc0)]&&this[_0x196675(0x9f)][_0x196675(0xf2)](_0x465aeb[_0x196675(0xc0)]),_0x465aeb[_0x196675(0xce)]){case v[_0x196675(0xe0)]:break;case v['Reply']:{this[_0x196675(0xeb)][_0x196675(0xdf)](_0x53a018,_0x2a42ab,{'unitId':_0x53a018,'subUnitId':_0x2a42ab,'ref':'','id':_0x465aeb[_0x196675(0xb8)],'dT':f(+_0x465aeb['createTimestamp']),'threadId':_0x465aeb[_0x196675(0xbc)],'personId':(_0x4dd2e9=(_0xcb4095=_0x465aeb[_0x196675(0xc0)])==null?void 0x0:_0xcb4095[_0x196675(0xec)])!=null?_0x4dd2e9:_0x465aeb['userId'],'text':JSON[_0x196675(0xf7)](_0x465aeb['content']),'parentId':_0x31c985['id']});break;}case v[_0x196675(0xea)]:{const _0xcb16f6=this[_0x196675(0xeb)][_0x196675(0xc9)](_0x53a018,_0x2a42ab,_0x465aeb[_0x196675(0xb8)]);_0xcb16f6&&_0xcb16f6[_0x196675(0xa5)]&&this[_0x196675(0xeb)][_0x196675(0xb4)](_0x53a018,_0x2a42ab,_0x465aeb['replyId']);break;}case v[_0x196675(0xb2)]:{this[_0x196675(0xeb)][_0x196675(0xb3)](_0x53a018,_0x2a42ab,{'commentId':_0x465aeb[_0x196675(0xb8)],'text':JSON[_0x196675(0xf7)](_0x465aeb['content'])});break;}case v[_0x196675(0xcf)]:{const _0x5853ba=(_0x3bf803=this['_threadCommentModel'][_0x196675(0xa8)](_0x465aeb[_0x196675(0x101)])[_0x196675(0x112)](_0xcd6cb1=>_0xcd6cb1['threadId']===_0x465aeb[_0x196675(0xbc)]))==null?void 0x0:_0x3bf803[_0x196675(0xc6)];_0x5853ba&&this[_0x196675(0xeb)][_0x196675(0x110)](_0x53a018,_0x2a42ab,_0x5853ba['id'],_0x465aeb['solved']===I['Solved']);break;}}}));}};function _0x3027(_0x52a7e2,_0x421340){const _0x2eacb8=_0x2eac();return _0x3027=function(_0x302778,_0x1a8edd){_0x302778=_0x302778-0x9e;let _0x13b4f2=_0x2eacb8[_0x302778];return _0x13b4f2;},_0x3027(_0x52a7e2,_0x421340);}p=E([S(0x0,c[_0x2eb3ea(0xc1)](b['CommentService'])),S(0x1,c[_0x2eb3ea(0xc1)](M[_0x2eb3ea(0xf0)])),S(0x2,c[_0x2eb3ea(0xc1)](c[_0x2eb3ea(0xf6)])),S(0x3,c[_0x2eb3ea(0xc1)](c[_0x2eb3ea(0xd2)]))],p);const q=_0x2eb3ea(0xe2),D={};var A=Object[_0x2eb3ea(0x114)],x=(_0x4f6b5a,_0x14d0d9,_0x358530,_0x2c39e8)=>{for(var _0x5e5154=_0x2c39e8>0x1?void 0x0:_0x2c39e8?A(_0x14d0d9,_0x358530):_0x14d0d9,_0x31a03c=_0x4f6b5a['length']-0x1,_0x428916;_0x31a03c>=0x0;_0x31a03c--)(_0x428916=_0x4f6b5a[_0x31a03c])&&(_0x5e5154=_0x428916(_0x5e5154)||_0x5e5154);return _0x5e5154;},_=(_0x118d6d,_0x419f78)=>(_0x5e88e8,_0x5d3ad1)=>_0x419f78(_0x5e88e8,_0x5d3ad1,_0x118d6d);function Y(_0x3917f4,_0x203fb2){const _0x543d28=_0x2eb3ea,_0x51ebae=_0x3917f4[_0x543d28(0xac)][0x0];return{..._0x203fb2,'id':_0x51ebae['replyId'],'resolved':_0x3917f4[_0x543d28(0xfc)]===0x1,'dT':f(_0x51ebae[_0x543d28(0xcd)]),'personId':_0x51ebae['userId'],'threadId':_0x51ebae['threadId']};}function G(_0x3ee560,_0x20001c,_0x236cb2){const _0x536b5b=_0x2eb3ea;var _0x158ad4,_0x2f5562;if(((_0x2f5562=(_0x158ad4=_0x3ee560==null?void 0x0:_0x3ee560[_0x536b5b(0xac)])==null?void 0x0:_0x158ad4[_0x536b5b(0x10f)])!=null?_0x2f5562:0x0)>0x0){const _0x55ea07=(_0x3022cb,_0x53a8c4)=>({'id':_0x3022cb['replyId'],'threadId':_0x3022cb[_0x536b5b(0xbc)],'dT':f(_0x3022cb[_0x536b5b(0xcd)]),'personId':_0x3022cb[_0x536b5b(0xad)],'resolved':_0x3ee560[_0x536b5b(0xfc)]===I[_0x536b5b(0xb0)],'unitId':_0x20001c,'subUnitId':_0x236cb2,'text':JSON['parse'](_0x3022cb[_0x536b5b(0xc3)]),'parentId':_0x53a8c4}),_0x94532f=_0x55ea07(_0x3ee560[_0x536b5b(0xac)][0x0]);return{..._0x94532f,'children':_0x3ee560[_0x536b5b(0xac)]['slice'](0x1)['map'](_0x439df9=>_0x55ea07(_0x439df9,_0x94532f['id']))};}return null;}let g=class{constructor(_0x572461,_0xc27439,_0x1008e4,_0x5e73fc){const _0x2672f6=_0x2eb3ea;this[_0x2672f6(0xff)]=_0x572461,this[_0x2672f6(0x9f)]=_0xc27439,this[_0x2672f6(0xab)]=_0x1008e4,this[_0x2672f6(0xf9)]=_0x5e73fc;}async[_0x2eb3ea(0xdf)](_0x271dd6){const _0x472c2a=_0x2eb3ea;var _0x241477,_0x5f1d5c;const {parentId:_0x346976,unitId:_0x10d48e,text:_0x57c38b,threadId:_0x2e99ca}=_0x271dd6,_0x7e1cc4=(_0x5f1d5c=(_0x241477=_0x57c38b[_0x472c2a(0xa7)])==null?void 0x0:_0x241477[_0x472c2a(0xb7)](_0x1a4297=>_0x1a4297[_0x472c2a(0x113)]===c['CustomRangeType'][_0x472c2a(0xc5)])['map'](_0x3cffce=>_0x3cffce[_0x472c2a(0x9e)]))!=null?_0x5f1d5c:[],_0x284be2=JSON['stringify'](_0x57c38b),_0x533160=(await this[_0x472c2a(0xab)][_0x472c2a(0xa2)](_0x10d48e))[_0x472c2a(0x106)]();if(_0x346976){const _0x130bf8={'memberId':_0x533160,'unitId':_0x10d48e,'content':_0x284be2,'mention':_0x7e1cc4,'threadId':_0x2e99ca},_0x4b4f08=(await this[_0x472c2a(0xff)][_0x472c2a(0xc4)](_0x472c2a(0xca)+_0x10d48e+_0x472c2a(0xae),{'body':_0x130bf8}))['body'][_0x472c2a(0xbe)];return{..._0x271dd6,'id':_0x4b4f08[_0x472c2a(0xb8)],'dT':c['dayjs'](+_0x4b4f08[_0x472c2a(0xcd)])[_0x472c2a(0xfe)](_0x472c2a(0xd9)),'personId':_0x4b4f08[_0x472c2a(0xad)]};}else{const _0x392364={'memberId':_0x533160,'unitId':_0x10d48e,'content':_0x284be2,'mention':_0x7e1cc4},_0x2ec879=await this[_0x472c2a(0xff)][_0x472c2a(0xc4)](_0x472c2a(0xca)+_0x10d48e+_0x472c2a(0xb9),{'body':_0x392364});return Y(_0x2ec879[_0x472c2a(0x103)][_0x472c2a(0xf8)],_0x271dd6);}}async[_0x2eb3ea(0xb3)](_0x1c33d3){const _0x4b5b22=_0x2eb3ea;var _0x252d79,_0x1d343b;const {text:_0x28fec6,unitId:_0x4b7b37}=_0x1c33d3,_0x159d2c=(_0x1d343b=(_0x252d79=_0x28fec6[_0x4b5b22(0xa7)])==null?void 0x0:_0x252d79[_0x4b5b22(0xb7)](_0x228e9a=>_0x228e9a[_0x4b5b22(0x113)]===c[_0x4b5b22(0x102)][_0x4b5b22(0xc5)])[_0x4b5b22(0x117)](_0x1416a0=>_0x1416a0['rangeId']))!=null?_0x1d343b:[],_0x2557ab=JSON['stringify'](_0x28fec6),_0x575cd6=_0x1c33d3[_0x4b5b22(0xbc)],_0x28599c=_0x1c33d3['id'],_0x5aebe6={'memberId':(await this[_0x4b5b22(0xab)][_0x4b5b22(0xa2)](_0x4b7b37))[_0x4b5b22(0x106)](),'unitId':_0x4b7b37,'threadId':_0x575cd6,'mention':_0x159d2c,'content':_0x2557ab,'replyId':_0x28599c},_0x371f0d=await this[_0x4b5b22(0xff)][_0x4b5b22(0xc4)](_0x4b5b22(0xca)+_0x4b7b37+_0x4b5b22(0xf4),{'body':_0x5aebe6});return!_0x371f0d[_0x4b5b22(0x103)][_0x4b5b22(0x119)]||_0x371f0d['body'][_0x4b5b22(0x119)]['code']===0x1;}async[_0x2eb3ea(0x110)](_0x2b1f3a){const _0x48d291=_0x2eb3ea,{unitId:_0x353375}=_0x2b1f3a,_0x5cfc91=_0x2b1f3a[_0x48d291(0xbc)],_0x3596e6={'memberId':this[_0x48d291(0x9f)][_0x48d291(0x10a)]()['userID'],'unitId':_0x353375,'threadId':_0x5cfc91,'solved':_0x2b1f3a[_0x48d291(0xfb)]?I[_0x48d291(0xb0)]:I[_0x48d291(0xa1)]},_0x4b81c9=await this['_httpService'][_0x48d291(0xc4)]('/universer-api/comment/unit/'+_0x353375+_0x48d291(0xe1),{'body':_0x3596e6});return!_0x4b81c9[_0x48d291(0x103)][_0x48d291(0x119)]||_0x4b81c9[_0x48d291(0x103)][_0x48d291(0x119)][_0x48d291(0xf3)]===0x1;}async[_0x2eb3ea(0xb4)](_0x2f0d69,_0x587d43,_0xbed084,_0x293d8a){const _0x2b4576=_0x2eb3ea,_0x477721={'memberId':(await this[_0x2b4576(0xab)][_0x2b4576(0xa2)](_0x2f0d69))['getMemberID'](),'threadId':_0xbed084,'replyId':_0x293d8a,'unitId':_0x2f0d69},_0x24227d=await this['_httpService'][_0x2b4576(0xc4)](_0x2b4576(0xca)+_0x2f0d69+_0x2b4576(0xd4),{'body':_0x477721});return!_0x24227d[_0x2b4576(0x103)][_0x2b4576(0x119)]||_0x24227d[_0x2b4576(0x103)][_0x2b4576(0x119)][_0x2b4576(0xf3)]===0x1;}async[_0x2eb3ea(0xbf)](_0x2d613d,_0x441417,_0x1ad492){const _0x4626c3=_0x2eb3ea,_0x300b20={'unitId':_0x2d613d,'threadId':_0x1ad492},_0x593ece=await this['_httpService'][_0x4626c3(0xc4)](_0x4626c3(0xca)+_0x2d613d+'/list',{'body':_0x300b20}),_0x46df4c=_0x1ad492[_0x4626c3(0x117)](_0xfbc7e=>G(_0x593ece[_0x4626c3(0x103)][_0x4626c3(0xa4)][_0xfbc7e],_0x2d613d,_0x441417))[_0x4626c3(0xb7)](Boolean);return Object['values'](_0x593ece[_0x4626c3(0x103)]['users'])['forEach'](_0x564d0f=>{this['_userService']['addUser'](_0x564d0f);}),_0x46df4c;}[_0x2eb3ea(0x107)](_0x293f1a){const _0x1059ba=_0x2eb3ea;return{'id':_0x293f1a['id'],'threadId':_0x293f1a['threadId'],'ref':_0x293f1a[_0x1059ba(0xd0)]};}};g=x([_(0x0,c['Inject'](P[_0x2eb3ea(0xe3)])),_(0x1,c[_0x2eb3ea(0xc1)](c['UserManagerService'])),_(0x2,c[_0x2eb3ea(0xc1)](b[_0x2eb3ea(0x108)])),_(0x3,c[_0x2eb3ea(0xc1)](c['Injector']))],g);var H=Object[_0x2eb3ea(0x114)],J=(_0x5bc8e0,_0x58aefe,_0x3eafb8,_0x144ac0)=>{const _0x264168=_0x2eb3ea;for(var _0x23386b=_0x144ac0>0x1?void 0x0:_0x144ac0?H(_0x58aefe,_0x3eafb8):_0x58aefe,_0xd2f51b=_0x5bc8e0[_0x264168(0x10f)]-0x1,_0x59af93;_0xd2f51b>=0x0;_0xd2f51b--)(_0x59af93=_0x5bc8e0[_0xd2f51b])&&(_0x23386b=_0x59af93(_0x23386b)||_0x23386b);return _0x23386b;},y=(_0x92463e,_0x1329b9)=>(_0xeab21c,_0x22061d)=>_0x1329b9(_0xeab21c,_0x22061d,_0x92463e);let C=class extends c['Disposable']{constructor(_0x392288,_0x204c23){const _0x2ee320=_0x2eb3ea;super(),this[_0x2ee320(0xc7)]=_0x392288,this['_threadCommentDataSource']=_0x204c23,this[_0x2ee320(0xbd)]();}['_initDataSource'](){const _0x169dda=_0x2eb3ea;this['_threadCommentDataSourceService'][_0x169dda(0xcb)]=this[_0x169dda(0xe6)],this['_threadCommentDataSourceService'][_0x169dda(0xc8)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x2eb3ea(0xbb)],L=Object[_0x2eb3ea(0x114)],Z=(_0x39ddb4,_0x34901b,_0x260fbe)=>_0x34901b in _0x39ddb4?F(_0x39ddb4,_0x34901b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x260fbe}):_0x39ddb4[_0x34901b]=_0x260fbe,W=(_0x41ff37,_0x422eee,_0x5d68d1,_0x5691ac)=>{const _0x5e361c=_0x2eb3ea;for(var _0x2d839d=_0x5691ac>0x1?void 0x0:_0x5691ac?L(_0x422eee,_0x5d68d1):_0x422eee,_0x54002e=_0x41ff37[_0x5e361c(0x10f)]-0x1,_0x2217a9;_0x54002e>=0x0;_0x54002e--)(_0x2217a9=_0x41ff37[_0x54002e])&&(_0x2d839d=_0x2217a9(_0x2d839d)||_0x2d839d);return _0x2d839d;},O=(_0xb1c532,_0x1eeefb)=>(_0x22ca66,_0x595ef5)=>_0x1eeefb(_0x22ca66,_0x595ef5,_0xb1c532),N=(_0x15c002,_0x4fca35,_0x39abd4)=>Z(_0x15c002,typeof _0x4fca35!=_0x2eb3ea(0x11a)?_0x4fca35+'':_0x4fca35,_0x39abd4);exports[_0x2eb3ea(0x10e)]=class extends c[_0x2eb3ea(0xfd)]{constructor(_0x4e901f=D,_0x30bf07,_0x50bcaf){const _0x2e5b4c=_0x2eb3ea;super(),this[_0x2e5b4c(0xaf)]=_0x4e901f,this['_injector']=_0x30bf07,this[_0x2e5b4c(0xdb)]=_0x50bcaf;const {..._0x224e35}=c[_0x2e5b4c(0xf1)]({},D,this[_0x2e5b4c(0xaf)]);this[_0x2e5b4c(0xdb)][_0x2e5b4c(0xdd)](q,_0x224e35);}[_0x2eb3ea(0xe5)](){const _0x9f4503=_0x2eb3ea;[[g],[C],[p]][_0x9f4503(0xb5)](_0xe91332=>{const _0x4189cd=_0x9f4503;this[_0x4189cd(0xf9)]['add'](_0xe91332);});}[_0x2eb3ea(0xed)](){const _0x3991a5=_0x2eb3ea;this[_0x3991a5(0xf9)][_0x3991a5(0xd7)](C),this['_injector'][_0x3991a5(0xd7)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2eb3ea(0xef),U),N(exports[_0x2eb3ea(0x10e)],_0x2eb3ea(0xce),c[_0x2eb3ea(0x115)][_0x2eb3ea(0xc2)]),exports[_0x2eb3ea(0x10e)]=W([c[_0x2eb3ea(0xb1)](j[_0x2eb3ea(0x118)],b['UniverCollaborationClientPlugin'],T[_0x2eb3ea(0xb6)]),O(0x1,c[_0x2eb3ea(0xc1)](c[_0x2eb3ea(0xd2)])),O(0x2,c['IConfigService'])],exports[_0x2eb3ea(0x10e)]);function _0x2eac(){const _0xf6146e=['code','/edit','disposeWithMe','UserManagerService','parse','comment','_injector','@univerjs/thread-comment-ui','resolved','solved','Plugin','format','_httpService','530DpJZSl','unitId','CustomRangeType','body','_commentService','3zHkPJJ','getMemberID','saveCommentToSnapshot','CollaborationSessionService','personId','getCurrentUser','40617fOhiju','234704IfNwKf','7mACjQV','UniverThreadCommentDataSourcePlugin','length','resolveComment','_initUserSync','find','rangeType','getOwnPropertyDescriptor','UniverInstanceType','_init','map','UniverThreadCommentUIPlugin','error','symbol','size','1174626PwiVsX','rangeId','_userService','commentUpdate$','OpenOrReOpen','requireSession','2264864YBLsCC','comments','parentId','Module','customRanges','getUnit','@univerjs-pro/license','@univerjs/network','_sessionService','replies','userId','/reply','_config','Solved','DependentOn','Edit','updateComment','deleteComment','forEach','UniverLicensePlugin','filter','replyId','/add','Unknown','defineProperty','threadId','_initDataSource','reply','listComments','user','Inject','UNIVER_UNKNOWN','content','post','COMMENT','root','_threadCommentDataSourceService','syncUpdateMutationToColla','getComment','/universer-api/comment/unit/','dataSource','Reply','createTimestamp','type','Solve','ref','866833VWNCmq','Injector','subscribe','/delete','353618NCtoSA','add','get','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','@univerjs/core','_configService','dayjs','setConfig','1UdPgqu','addComment','Add','/solved','thread-comment-data-source.config','HTTPService','Disposable','onStarting','_threadCommentDataSource','1512185nNXyiN','UNRECOGNIZED','payload','Delete','_threadCommentModel','userID','onReady','bufferTime','pluginName','ThreadCommentModel','merge','addUser'];_0x2eac=function(){return _0xf6146e;};return _0x2eac();}
|
|
1
|
+
'use strict';const _0x17efba=_0x8360;(function(_0x93dde4,_0x48c20f){const _0x290499=_0x8360,_0x2444b2=_0x93dde4();while(!![]){try{const _0x1b9d28=parseInt(_0x290499(0xde))/0x1+parseInt(_0x290499(0x97))/0x2+-parseInt(_0x290499(0x92))/0x3+parseInt(_0x290499(0xfb))/0x4*(-parseInt(_0x290499(0xb2))/0x5)+-parseInt(_0x290499(0xd3))/0x6+-parseInt(_0x290499(0xa0))/0x7+parseInt(_0x290499(0xbc))/0x8*(parseInt(_0x290499(0xd9))/0x9);if(_0x1b9d28===_0x48c20f)break;else _0x2444b2['push'](_0x2444b2['shift']());}catch(_0x2025ef){_0x2444b2['push'](_0x2444b2['shift']());}}}(_0x4dc9,0x388a6));Object[_0x17efba(0xc8)](exports,Symbol[_0x17efba(0x91)],{'value':_0x17efba(0x8e)});const b=require(_0x17efba(0x93)),T=require(_0x17efba(0xf1)),c=require(_0x17efba(0xca)),j=require(_0x17efba(0xba)),M=require(_0x17efba(0xbd)),w=require(_0x17efba(0xe5)),P=require(_0x17efba(0xa9)),U=_0x17efba(0xe4);var I=(_0x20ee8c=>(_0x20ee8c[_0x20ee8c[_0x17efba(0xf0)]=0x0]='OpenOrReOpen',_0x20ee8c[_0x20ee8c[_0x17efba(0x98)]=0x1]=_0x17efba(0x98),_0x20ee8c[_0x20ee8c[_0x17efba(0x9d)]=-0x1]=_0x17efba(0x9d),_0x20ee8c))(I||{}),v=(_0x285999=>(_0x285999[_0x285999[_0x17efba(0x95)]=0x0]=_0x17efba(0x95),_0x285999[_0x285999['Add']=0x1]=_0x17efba(0xa7),_0x285999[_0x285999[_0x17efba(0xbb)]=0x2]='Reply',_0x285999[_0x285999[_0x17efba(0xf9)]=0x3]='Edit',_0x285999[_0x285999[_0x17efba(0x9c)]=0x4]=_0x17efba(0x9c),_0x285999[_0x285999[_0x17efba(0xb3)]=0x5]='Solve',_0x285999[_0x285999['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x285999))(v||{});const f=_0x27c0e0=>c[_0x17efba(0xe8)](new Date(+_0x27c0e0))[_0x17efba(0xb6)](_0x17efba(0xc7)),R=async(_0x540ff0,_0x445205)=>{const _0x23d014=_0x17efba,_0xd11200=_0x540ff0[_0x23d014(0xb8)](c[_0x23d014(0xf7)]),_0x5f0e6b=_0x540ff0['get'](P[_0x23d014(0xcf)]);_0x445205[_0x23d014(0xab)](_0x5b3a67=>{const _0x4b905d=_0x23d014;_0xd11200[_0x4b905d(0xd7)](_0x5b3a67)&&_0x445205[_0x4b905d(0xee)](_0x5b3a67);}),_0x445205[_0x23d014(0xfe)]&&(await _0x5f0e6b[_0x23d014(0xb8)](_0x23d014(0x8c),{'params':{'userIDs':[..._0x445205]}}))[_0x23d014(0xce)][_0x23d014(0xd0)]['forEach'](_0xeec66b=>{const _0x530bfe=_0x23d014;_0xeec66b&&_0xd11200[_0x530bfe(0xe7)](_0xeec66b);});};var $=Object[_0x17efba(0xdc)],E=(_0x1dd667,_0x4d8e2c,_0x40b7f3,_0xddbdef)=>{const _0x5cf40c=_0x17efba;for(var _0x44af65=_0xddbdef>0x1?void 0x0:_0xddbdef?$(_0x4d8e2c,_0x40b7f3):_0x4d8e2c,_0x499ad1=_0x1dd667[_0x5cf40c(0x8d)]-0x1,_0x45b190;_0x499ad1>=0x0;_0x499ad1--)(_0x45b190=_0x1dd667[_0x499ad1])&&(_0x44af65=_0x45b190(_0x44af65)||_0x44af65);return _0x44af65;},S=(_0x18c979,_0x3e8d34)=>(_0x581094,_0x357665)=>_0x3e8d34(_0x581094,_0x357665,_0x18c979);let p=class extends c[_0x17efba(0xad)]{constructor(_0x3025e1,_0x1ccaf2,_0x4916fc,_0x208f37){const _0x251f3a=_0x17efba;super(),this[_0x251f3a(0xa8)]=_0x3025e1,this[_0x251f3a(0x9e)]=_0x1ccaf2,this[_0x251f3a(0xb1)]=_0x4916fc,this[_0x251f3a(0xcd)]=_0x208f37,this[_0x251f3a(0xfc)](),this['_initUserSync']();}['_initUserSync'](){const _0x434ff8=_0x17efba;this[_0x434ff8(0xeb)](this[_0x434ff8(0x9e)][_0x434ff8(0xac)]['pipe'](w[_0x434ff8(0xb7)](0x10))[_0x434ff8(0x8b)](_0x5d3bb0=>{const _0x28c32d=_0x434ff8,_0x5c4c06=new Set();_0x5d3bb0['forEach'](_0x1f970e=>{const _0x2d400e=_0x8360;switch(_0x1f970e[_0x2d400e(0xa5)]){case _0x2d400e(0xaf):{const _0x4a50de=_0x1f970e['payload']['personId'];_0x5c4c06['add'](_0x4a50de);break;}}}),R(this[_0x28c32d(0xcd)],_0x5c4c06);}));}['_init'](){const _0x5f4da5=_0x17efba;this[_0x5f4da5(0xeb)](this['_commentService'][_0x5f4da5(0xac)][_0x5f4da5(0x8b)](async _0x364093=>{const _0x497804=_0x5f4da5;var _0x38c911,_0x27157f,_0x2ab20e,_0x307476;const _0x46604c=(_0x38c911=this[_0x497804(0x9e)]['getUnit'](_0x364093[_0x497804(0xb5)])[_0x497804(0xa3)](_0x2a55fa=>_0x2a55fa[_0x497804(0xe3)]===_0x364093[_0x497804(0xe3)]))==null?void 0x0:_0x38c911[_0x497804(0xe9)];if(!_0x46604c)return;const {unitId:_0x99c3a6,subUnitId:_0x4fe096}=_0x46604c;switch(_0x364093[_0x497804(0xf3)]&&this[_0x497804(0xb1)][_0x497804(0xe7)](_0x364093[_0x497804(0xf3)]),_0x364093[_0x497804(0xa5)]){case v[_0x497804(0xa7)]:break;case v['Reply']:{this[_0x497804(0x9e)]['addComment'](_0x99c3a6,_0x4fe096,{'unitId':_0x99c3a6,'subUnitId':_0x4fe096,'ref':'','id':_0x364093[_0x497804(0x100)],'dT':f(+_0x364093['createTimestamp']),'threadId':_0x364093[_0x497804(0xe3)],'personId':(_0x2ab20e=(_0x27157f=_0x364093[_0x497804(0xf3)])==null?void 0x0:_0x27157f[_0x497804(0xdd)])!=null?_0x2ab20e:_0x364093['userId'],'text':JSON[_0x497804(0xff)](_0x364093[_0x497804(0xea)]),'parentId':_0x46604c['id']});break;}case v[_0x497804(0x9c)]:{const _0x28bf86=this[_0x497804(0x9e)]['getComment'](_0x99c3a6,_0x4fe096,_0x364093[_0x497804(0x100)]);_0x28bf86&&_0x28bf86[_0x497804(0xc9)]&&this['_threadCommentModel'][_0x497804(0x102)](_0x99c3a6,_0x4fe096,_0x364093[_0x497804(0x100)]);break;}case v['Edit']:{this[_0x497804(0x9e)]['updateComment'](_0x99c3a6,_0x4fe096,{'commentId':_0x364093[_0x497804(0x100)],'text':JSON['parse'](_0x364093[_0x497804(0xea)])});break;}case v[_0x497804(0xb3)]:{const _0x3e0580=(_0x307476=this[_0x497804(0x9e)][_0x497804(0xf8)](_0x364093[_0x497804(0xb5)])['find'](_0x17a16d=>_0x17a16d['threadId']===_0x364093[_0x497804(0xe3)]))==null?void 0x0:_0x307476['root'];_0x3e0580&&this['_threadCommentModel'][_0x497804(0xa2)](_0x99c3a6,_0x4fe096,_0x3e0580['id'],_0x364093[_0x497804(0xc1)]===I[_0x497804(0x98)]);break;}}}));}};p=E([S(0x0,c[_0x17efba(0xe1)](b[_0x17efba(0xed)])),S(0x1,c[_0x17efba(0xe1)](M[_0x17efba(0xc6)])),S(0x2,c[_0x17efba(0xe1)](c[_0x17efba(0xf7)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x17efba(0xd4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x58a692,_0x2bc5a9,_0x413a26,_0x2a0f93)=>{const _0x43bd7c=_0x17efba;for(var _0xe30ef6=_0x2a0f93>0x1?void 0x0:_0x2a0f93?A(_0x2bc5a9,_0x413a26):_0x2bc5a9,_0x5b47a3=_0x58a692[_0x43bd7c(0x8d)]-0x1,_0x42d12d;_0x5b47a3>=0x0;_0x5b47a3--)(_0x42d12d=_0x58a692[_0x5b47a3])&&(_0xe30ef6=_0x42d12d(_0xe30ef6)||_0xe30ef6);return _0xe30ef6;},_=(_0x5d1e98,_0x352eb6)=>(_0x300b94,_0x23c899)=>_0x352eb6(_0x300b94,_0x23c899,_0x5d1e98);function Y(_0x2ce451,_0x28353d){const _0x45e516=_0x17efba,_0x48fe9d=_0x2ce451[_0x45e516(0xd1)][0x0];return{..._0x28353d,'id':_0x48fe9d[_0x45e516(0x100)],'resolved':_0x2ce451[_0x45e516(0xc1)]===0x1,'dT':f(_0x48fe9d[_0x45e516(0x8f)]),'personId':_0x48fe9d[_0x45e516(0x94)],'threadId':_0x48fe9d['threadId']};}function G(_0x4d32e9,_0x392823,_0x23eff1){const _0x19718e=_0x17efba;var _0x38acf6,_0x1aee38;if(((_0x1aee38=(_0x38acf6=_0x4d32e9==null?void 0x0:_0x4d32e9[_0x19718e(0xd1)])==null?void 0x0:_0x38acf6[_0x19718e(0x8d)])!=null?_0x1aee38:0x0)>0x0){const _0x3b6c1b=(_0x754364,_0x4d45d1)=>({'id':_0x754364[_0x19718e(0x100)],'threadId':_0x754364['threadId'],'dT':f(_0x754364['createTimestamp']),'personId':_0x754364[_0x19718e(0x94)],'resolved':_0x4d32e9[_0x19718e(0xc1)]===I['Solved'],'unitId':_0x392823,'subUnitId':_0x23eff1,'text':JSON[_0x19718e(0xff)](_0x754364['content']),'parentId':_0x4d45d1}),_0xc7b63b=_0x3b6c1b(_0x4d32e9['replies'][0x0]);return{..._0xc7b63b,'children':_0x4d32e9[_0x19718e(0xd1)]['slice'](0x1)[_0x19718e(0xc0)](_0x1ab6f8=>_0x3b6c1b(_0x1ab6f8,_0xc7b63b['id']))};}return null;}let g=class{constructor(_0x44f6ef,_0x2501b6,_0x3caf1b,_0x53c18e){const _0x264413=_0x17efba;this[_0x264413(0xa4)]=_0x44f6ef,this[_0x264413(0xb1)]=_0x2501b6,this[_0x264413(0xfd)]=_0x3caf1b,this[_0x264413(0xcd)]=_0x53c18e;}async[_0x17efba(0xbf)](_0x5ed95a){const _0x2c1e7e=_0x17efba;var _0x25e5ac,_0x107c6b;const {parentId:_0xaf32dd,unitId:_0x1344d0,text:_0x500ee9,threadId:_0x28e01a}=_0x5ed95a,_0x48faf9=(_0x107c6b=(_0x25e5ac=_0x500ee9[_0x2c1e7e(0xa6)])==null?void 0x0:_0x25e5ac[_0x2c1e7e(0xf6)](_0x2b2e07=>_0x2b2e07[_0x2c1e7e(0xd8)]===c['CustomRangeType'][_0x2c1e7e(0xec)])[_0x2c1e7e(0xc0)](_0x49aba8=>_0x49aba8[_0x2c1e7e(0xb0)]))!=null?_0x107c6b:[],_0x127797=JSON[_0x2c1e7e(0xb9)](_0x500ee9),_0x1b3394=(await this[_0x2c1e7e(0xfd)]['requireSession'](_0x1344d0))[_0x2c1e7e(0xf2)]();if(_0xaf32dd){const _0x249c7e={'memberId':_0x1b3394,'unitId':_0x1344d0,'content':_0x127797,'mention':_0x48faf9,'threadId':_0x28e01a},_0x549b5d=(await this['_httpService']['post'](_0x2c1e7e(0xae)+_0x1344d0+_0x2c1e7e(0x103),{'body':_0x249c7e}))[_0x2c1e7e(0xce)]['reply'];return{..._0x5ed95a,'id':_0x549b5d[_0x2c1e7e(0x100)],'dT':c['dayjs'](+_0x549b5d['createTimestamp'])[_0x2c1e7e(0xb6)](_0x2c1e7e(0xc7)),'personId':_0x549b5d[_0x2c1e7e(0x94)]};}else{const _0x59493c={'memberId':_0x1b3394,'unitId':_0x1344d0,'content':_0x127797,'mention':_0x48faf9},_0xae7e9d=await this[_0x2c1e7e(0xa4)]['post'](_0x2c1e7e(0xae)+_0x1344d0+'/add',{'body':_0x59493c});return Y(_0xae7e9d[_0x2c1e7e(0xce)][_0x2c1e7e(0x9a)],_0x5ed95a);}}async[_0x17efba(0x96)](_0x497899){const _0x37db67=_0x17efba;var _0x2b826c,_0xf92e46;const {text:_0x3bb05e,unitId:_0x148bb5}=_0x497899,_0x26f48f=(_0xf92e46=(_0x2b826c=_0x3bb05e[_0x37db67(0xa6)])==null?void 0x0:_0x2b826c[_0x37db67(0xf6)](_0x4d8b51=>_0x4d8b51['rangeType']===c[_0x37db67(0xd6)][_0x37db67(0xec)])[_0x37db67(0xc0)](_0x7779bc=>_0x7779bc[_0x37db67(0xb0)]))!=null?_0xf92e46:[],_0x131fff=JSON['stringify'](_0x3bb05e),_0x405e2f=_0x497899[_0x37db67(0xe3)],_0x48e88d=_0x497899['id'],_0x2b1343={'memberId':(await this[_0x37db67(0xfd)][_0x37db67(0x9b)](_0x148bb5))[_0x37db67(0xf2)](),'unitId':_0x148bb5,'threadId':_0x405e2f,'mention':_0x26f48f,'content':_0x131fff,'replyId':_0x48e88d},_0x5cd089=await this[_0x37db67(0xa4)]['post'](_0x37db67(0xae)+_0x148bb5+_0x37db67(0xdb),{'body':_0x2b1343});return!_0x5cd089[_0x37db67(0xce)]['error']||_0x5cd089['body'][_0x37db67(0xb4)][_0x37db67(0xd2)]===0x1;}async[_0x17efba(0xa2)](_0x35b527){const _0x284d70=_0x17efba,{unitId:_0x48df39}=_0x35b527,_0x561ef6=_0x35b527[_0x284d70(0xe3)],_0x21c77b={'memberId':this['_userService'][_0x284d70(0xef)]()[_0x284d70(0xdd)],'unitId':_0x48df39,'threadId':_0x561ef6,'solved':_0x35b527[_0x284d70(0xf4)]?I[_0x284d70(0x98)]:I[_0x284d70(0xf0)]},_0x40413e=await this[_0x284d70(0xa4)][_0x284d70(0xaa)]('/universer-api/comment/unit/'+_0x48df39+'/solved',{'body':_0x21c77b});return!_0x40413e[_0x284d70(0xce)][_0x284d70(0xb4)]||_0x40413e[_0x284d70(0xce)][_0x284d70(0xb4)][_0x284d70(0xd2)]===0x1;}async[_0x17efba(0x102)](_0x4f7540,_0x476718,_0x294eb8,_0x21cb16){const _0x1e773b=_0x17efba,_0x4c4ee8={'memberId':(await this[_0x1e773b(0xfd)][_0x1e773b(0x9b)](_0x4f7540))[_0x1e773b(0xf2)](),'threadId':_0x294eb8,'replyId':_0x21cb16,'unitId':_0x4f7540},_0x16021d=await this['_httpService'][_0x1e773b(0xaa)](_0x1e773b(0xae)+_0x4f7540+'/delete',{'body':_0x4c4ee8});return!_0x16021d['body']['error']||_0x16021d['body'][_0x1e773b(0xb4)][_0x1e773b(0xd2)]===0x1;}async['listComments'](_0x24eea7,_0x1e4662,_0x4cabcd){const _0x35da83=_0x17efba,_0xe0d0f5={'unitId':_0x24eea7,'threadId':_0x4cabcd},_0xe77108=await this[_0x35da83(0xa4)][_0x35da83(0xaa)](_0x35da83(0xae)+_0x24eea7+_0x35da83(0x101),{'body':_0xe0d0f5}),_0x11651a=_0x4cabcd[_0x35da83(0xc0)](_0x4e4f52=>G(_0xe77108[_0x35da83(0xce)][_0x35da83(0xfa)][_0x4e4f52],_0x24eea7,_0x1e4662))[_0x35da83(0xf6)](Boolean);return Object[_0x35da83(0x104)](_0xe77108[_0x35da83(0xce)][_0x35da83(0xd0)])[_0x35da83(0xab)](_0x22e60a=>{const _0x5b7cd7=_0x35da83;this['_userService'][_0x5b7cd7(0xe7)](_0x22e60a);}),_0x11651a;}['saveCommentToSnapshot'](_0x542fe0){const _0x51abec=_0x17efba;return{'id':_0x542fe0['id'],'threadId':_0x542fe0['threadId'],'ref':_0x542fe0[_0x51abec(0xc4)]};}};g=x([_(0x0,c[_0x17efba(0xe1)](P[_0x17efba(0xcf)])),_(0x1,c[_0x17efba(0xe1)](c[_0x17efba(0xf7)])),_(0x2,c[_0x17efba(0xe1)](b[_0x17efba(0xe6)])),_(0x3,c['Inject'](c[_0x17efba(0xc3)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x389455,_0x4eb3db,_0x472f45,_0x203d6e)=>{for(var _0x18eaa9=_0x203d6e>0x1?void 0x0:_0x203d6e?H(_0x4eb3db,_0x472f45):_0x4eb3db,_0x18ba6d=_0x389455['length']-0x1,_0x3da373;_0x18ba6d>=0x0;_0x18ba6d--)(_0x3da373=_0x389455[_0x18ba6d])&&(_0x18eaa9=_0x3da373(_0x18eaa9)||_0x18eaa9);return _0x18eaa9;},y=(_0x3ec538,_0x4f33fc)=>(_0x18f16f,_0x59d7d3)=>_0x4f33fc(_0x18f16f,_0x59d7d3,_0x3ec538);let C=class extends c[_0x17efba(0xad)]{constructor(_0x5197ab,_0x403528){const _0xdf6cab=_0x17efba;super(),this[_0xdf6cab(0xda)]=_0x5197ab,this[_0xdf6cab(0x9f)]=_0x403528,this['_initDataSource']();}['_initDataSource'](){const _0x3a902b=_0x17efba;this[_0x3a902b(0xda)]['dataSource']=this[_0x3a902b(0x9f)],this[_0x3a902b(0xda)][_0x3a902b(0xbe)]=!0x1;}};C=J([y(0x0,M[_0x17efba(0xc2)]),y(0x1,c[_0x17efba(0xe1)](g))],C);var F=Object['defineProperty'],L=Object[_0x17efba(0xdc)],Z=(_0x235b4e,_0x2c93db,_0x504f3c)=>_0x2c93db in _0x235b4e?F(_0x235b4e,_0x2c93db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504f3c}):_0x235b4e[_0x2c93db]=_0x504f3c,W=(_0x3a7649,_0x1200f2,_0x52db86,_0x3d04dd)=>{const _0x1181f2=_0x17efba;for(var _0x5e6d64=_0x3d04dd>0x1?void 0x0:_0x3d04dd?L(_0x1200f2,_0x52db86):_0x1200f2,_0x3581fb=_0x3a7649[_0x1181f2(0x8d)]-0x1,_0x78ccc9;_0x3581fb>=0x0;_0x3581fb--)(_0x78ccc9=_0x3a7649[_0x3581fb])&&(_0x5e6d64=_0x78ccc9(_0x5e6d64)||_0x5e6d64);return _0x5e6d64;},O=(_0x460320,_0x47baed)=>(_0x578133,_0x12656c)=>_0x47baed(_0x578133,_0x12656c,_0x460320),N=(_0x99a608,_0xfbe6af,_0x17aae3)=>Z(_0x99a608,typeof _0xfbe6af!=_0x17efba(0xc5)?_0xfbe6af+'':_0xfbe6af,_0x17aae3);function _0x8360(_0x3f0df2,_0x1291f2){const _0x4dc901=_0x4dc9();return _0x8360=function(_0x8360be,_0x4358b8){_0x8360be=_0x8360be-0x89;let _0x35549b=_0x4dc901[_0x8360be];return _0x35549b;},_0x8360(_0x3f0df2,_0x1291f2);}function _0x4dc9(){const _0x37d2c4=['80zylxnC','Solve','error','unitId','format','bufferTime','get','stringify','@univerjs/thread-comment-ui','Reply','44248Jzsjfo','@univerjs/thread-comment','syncUpdateMutationToColla','addComment','map','solved','IThreadCommentDataSourceService','Injector','ref','symbol','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','defineProperty','parentId','@univerjs/core','Plugin','merge','_injector','body','HTTPService','users','replies','code','2586774ZxvfWh','thread-comment-data-source.config','UNIVER_UNKNOWN','CustomRangeType','getUser','rangeType','1467TGoyJL','_threadCommentDataSourceService','/edit','getOwnPropertyDescriptor','userID','99022pAYURI','UniverThreadCommentDataSourcePlugin','pluginName','Inject','UniverThreadCommentUIPlugin','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rxjs','CollaborationSessionService','addUser','dayjs','root','content','disposeWithMe','COMMENT','CommentService','delete','getCurrentUser','OpenOrReOpen','@univerjs-pro/license','getMemberID','user','resolved','UniverInstanceType','filter','UserManagerService','getUnit','Edit','comments','23768RGFWjx','_init','_sessionService','size','parse','replyId','/list','deleteComment','/reply','values','setConfig','UniverCollaborationClientPlugin','_config','subscribe','/universer-api/user/list','length','Module','createTimestamp','onReady','toStringTag','373734GhKQfC','@univerjs-pro/collaboration-client','userId','Unknown','updateComment','517780GUENwd','Solved','_configService','comment','requireSession','Delete','UNRECOGNIZED','_threadCommentModel','_threadCommentDataSource','2639672UiTyld','IConfigService','resolveComment','find','_httpService','type','customRanges','Add','_commentService','@univerjs/network','post','forEach','commentUpdate$','Disposable','/universer-api/comment/unit/','add','rangeId','_userService'];_0x4dc9=function(){return _0x37d2c4;};return _0x4dc9();}exports[_0x17efba(0xdf)]=class extends c[_0x17efba(0xcb)]{constructor(_0x4c4ecb=D,_0xbafc3d,_0x197192){const _0xef74fc=_0x17efba;super(),this[_0xef74fc(0x8a)]=_0x4c4ecb,this[_0xef74fc(0xcd)]=_0xbafc3d,this[_0xef74fc(0x99)]=_0x197192;const {..._0x22170d}=c[_0xef74fc(0xcc)]({},D,this['_config']);this[_0xef74fc(0x99)][_0xef74fc(0x105)](q,_0x22170d);}['onStarting'](){const _0x3c6a8a=_0x17efba;[[g],[C],[p]][_0x3c6a8a(0xab)](_0xbf18e4=>{const _0x504b37=_0x3c6a8a;this[_0x504b37(0xcd)][_0x504b37(0xaf)](_0xbf18e4);});}[_0x17efba(0x90)](){const _0x3927f3=_0x17efba;this['_injector'][_0x3927f3(0xb8)](C),this[_0x3927f3(0xcd)][_0x3927f3(0xb8)](p);}},N(exports[_0x17efba(0xdf)],_0x17efba(0xe0),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x17efba(0xa5),c[_0x17efba(0xf5)][_0x17efba(0xd5)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x17efba(0xe2)],b[_0x17efba(0x89)],T['UniverLicensePlugin']),O(0x1,c[_0x17efba(0xe1)](c[_0x17efba(0xc3)])),O(0x2,c[_0x17efba(0xa1)])],exports[_0x17efba(0xdf)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x9b09(){const _0x200722=['type','_threadCommentModel','unitId','createTimestamp','pluginName','onStarting','_commentService','add','COMMENT','users','2JMFraH','resolveComment','delete','parse','rangeId','_config','/delete','Solve','getOwnPropertyDescriptor','forEach','_initDataSource','Delete','623ebChUF','comment','commentUpdate$','OpenOrReOpen','1040548JdnpcC','size','userId','slice','addUser','map','_configService','values','dataSource','disposeWithMe','code','_threadCommentDataSourceService','_sessionService','get','user','_userService','getMemberID','format','Unknown','/add','error','userID','/solved','/universer-api/user/list','5278388rTHpjU','69848OBHGoa','_injector','YYYY/MM/DD\x20HH:mm','content','find','threadId','UNRECOGNIZED','getComment','rangeType','onReady','symbol','syncUpdateMutationToColla','Edit','listComments','stringify','length','filter','personId','addComment','_httpService','updateComment','ref','replyId','body','UNIVER_UNKNOWN','getUnit','6002490mUaFPI','reply','Add','requireSession','subscribe','deleteComment','solved','Solved','3710200nZwJep','_threadCommentDataSource','_init','root','/edit','resolved','replies','15389523GsBShh','/reply','post','customRanges','parentId','Reply','2839293lugLGu','_initUserSync','/universer-api/comment/unit/'];_0x9b09=function(){return _0x200722;};return _0x9b09();}const _0x33b663=_0x5414;(function(_0x5c94f6,_0x3782e3){const _0x4fb804=_0x5414,_0x3edc83=_0x5c94f6();while(!![]){try{const _0xbdab8=-parseInt(_0x4fb804(0x8f))/0x1*(parseInt(_0x4fb804(0x7f))/0x2)+parseInt(_0x4fb804(0xd7))/0x3+-parseInt(_0x4fb804(0xa7))/0x4+parseInt(_0x4fb804(0xca))/0x5+-parseInt(_0x4fb804(0xc2))/0x6+parseInt(_0x4fb804(0x8b))/0x7*(parseInt(_0x4fb804(0xa8))/0x8)+parseInt(_0x4fb804(0xd1))/0x9;if(_0xbdab8===_0x3782e3)break;else _0x3edc83['push'](_0x3edc83['shift']());}catch(_0x4ccf36){_0x3edc83['push'](_0x3edc83['shift']());}}}(_0x9b09,0xc6f45));import{CommentService as _0x5292e3,CollaborationSessionService as _0x218050,UniverCollaborationClientPlugin as _0x3bf5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x377907}from'@univerjs-pro/license';import{dayjs as _0x467adf,UserManagerService as _0x92834c,Inject as _0x87e92,Injector as _0xd0cbaa,Disposable as _0x130674,CustomRangeType as _0x15c53f,UniverInstanceType as _0x440175,DependentOn as _0x4a2af0,IConfigService as _0x399a92,Plugin as _0xadfa01,merge as _0x901e41}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59df4e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1787fb,IThreadCommentDataSourceService as _0x5a8293}from'@univerjs/thread-comment';import{bufferTime as _0x52aba1}from'rxjs';import{HTTPService as _0x322cbd}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3669d0=>(_0x3669d0[_0x3669d0['OpenOrReOpen']=0x0]=_0x33b663(0x8e),_0x3669d0[_0x3669d0[_0x33b663(0xc9)]=0x1]='Solved',_0x3669d0[_0x3669d0['UNRECOGNIZED']=-0x1]=_0x33b663(0xae),_0x3669d0))(I||{}),v=(_0x136aed=>(_0x136aed[_0x136aed[_0x33b663(0xa1)]=0x0]=_0x33b663(0xa1),_0x136aed[_0x136aed[_0x33b663(0xc4)]=0x1]=_0x33b663(0xc4),_0x136aed[_0x136aed[_0x33b663(0xd6)]=0x2]=_0x33b663(0xd6),_0x136aed[_0x136aed[_0x33b663(0xb4)]=0x3]=_0x33b663(0xb4),_0x136aed[_0x136aed[_0x33b663(0x8a)]=0x4]=_0x33b663(0x8a),_0x136aed[_0x136aed[_0x33b663(0x86)]=0x5]=_0x33b663(0x86),_0x136aed[_0x136aed['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x136aed))(v||{});const D=_0x5071a1=>_0x467adf(new Date(+_0x5071a1))[_0x33b663(0xa0)](_0x33b663(0xaa)),B=async(_0xbe1c07,_0x4913fc)=>{const _0x3a5b97=_0x33b663,_0x32f913=_0xbe1c07[_0x3a5b97(0x9c)](_0x92834c),_0x34123f=_0xbe1c07[_0x3a5b97(0x9c)](_0x322cbd);_0x4913fc[_0x3a5b97(0x88)](_0x4660a2=>{const _0x359037=_0x3a5b97;_0x32f913['getUser'](_0x4660a2)&&_0x4913fc[_0x359037(0x81)](_0x4660a2);}),_0x4913fc[_0x3a5b97(0x90)]&&(await _0x34123f[_0x3a5b97(0x9c)](_0x3a5b97(0xa6),{'params':{'userIDs':[..._0x4913fc]}}))[_0x3a5b97(0xbf)][_0x3a5b97(0x7e)][_0x3a5b97(0x88)](_0x886a27=>{const _0x34590e=_0x3a5b97;_0x886a27&&_0x32f913[_0x34590e(0x93)](_0x886a27);});};var K=Object[_0x33b663(0x87)],V=(_0x4424bc,_0x19be63,_0x39479d,_0x4d229e)=>{const _0x883b48=_0x33b663;for(var _0x5b30fc=_0x4d229e>0x1?void 0x0:_0x4d229e?K(_0x19be63,_0x39479d):_0x19be63,_0x409fac=_0x4424bc[_0x883b48(0xb7)]-0x1,_0x4753fe;_0x409fac>=0x0;_0x409fac--)(_0x4753fe=_0x4424bc[_0x409fac])&&(_0x5b30fc=_0x4753fe(_0x5b30fc)||_0x5b30fc);return _0x5b30fc;},p=(_0x37f085,_0x293fb6)=>(_0x189c3d,_0x2f091e)=>_0x293fb6(_0x189c3d,_0x2f091e,_0x37f085);let S=class extends _0x130674{constructor(_0x4ceb2f,_0x2c4671,_0x2b83be,_0x52e7d4){const _0x44ee56=_0x33b663;super(),this[_0x44ee56(0x7b)]=_0x4ceb2f,this[_0x44ee56(0xdb)]=_0x2c4671,this['_userService']=_0x2b83be,this['_injector']=_0x52e7d4,this[_0x44ee56(0xcc)](),this[_0x44ee56(0xd8)]();}[_0x33b663(0xd8)](){const _0x25e390=_0x33b663;this[_0x25e390(0x98)](this[_0x25e390(0xdb)][_0x25e390(0x8d)]['pipe'](_0x52aba1(0x10))[_0x25e390(0xc6)](_0x12146c=>{const _0x2742ff=_0x25e390,_0x504a7f=new Set();_0x12146c[_0x2742ff(0x88)](_0x393332=>{const _0x49c0ec=_0x2742ff;switch(_0x393332[_0x49c0ec(0xda)]){case'add':{const _0x29672b=_0x393332['payload'][_0x49c0ec(0xb9)];_0x504a7f[_0x49c0ec(0x7c)](_0x29672b);break;}}}),B(this['_injector'],_0x504a7f);}));}[_0x33b663(0xcc)](){const _0x17f0c8=_0x33b663;this[_0x17f0c8(0x98)](this[_0x17f0c8(0x7b)][_0x17f0c8(0x8d)][_0x17f0c8(0xc6)](async _0x5332cf=>{const _0xb411bc=_0x17f0c8;var _0x21fd35,_0x395ee0,_0x51ed49,_0x1621e3;const _0xb87161=(_0x21fd35=this[_0xb411bc(0xdb)][_0xb411bc(0xc1)](_0x5332cf[_0xb411bc(0x77)])[_0xb411bc(0xac)](_0xe5d8a7=>_0xe5d8a7['threadId']===_0x5332cf[_0xb411bc(0xad)]))==null?void 0x0:_0x21fd35[_0xb411bc(0xcd)];if(!_0xb87161)return;const {unitId:_0x4c171c,subUnitId:_0x466abe}=_0xb87161;switch(_0x5332cf[_0xb411bc(0x9d)]&&this[_0xb411bc(0x9e)][_0xb411bc(0x93)](_0x5332cf[_0xb411bc(0x9d)]),_0x5332cf[_0xb411bc(0xda)]){case v[_0xb411bc(0xc4)]:break;case v[_0xb411bc(0xd6)]:{this[_0xb411bc(0xdb)][_0xb411bc(0xba)](_0x4c171c,_0x466abe,{'unitId':_0x4c171c,'subUnitId':_0x466abe,'ref':'','id':_0x5332cf[_0xb411bc(0xbe)],'dT':D(+_0x5332cf[_0xb411bc(0x78)]),'threadId':_0x5332cf['threadId'],'personId':(_0x51ed49=(_0x395ee0=_0x5332cf[_0xb411bc(0x9d)])==null?void 0x0:_0x395ee0['userID'])!=null?_0x51ed49:_0x5332cf[_0xb411bc(0x91)],'text':JSON[_0xb411bc(0x82)](_0x5332cf['content']),'parentId':_0xb87161['id']});break;}case v[_0xb411bc(0x8a)]:{const _0x2dfe1c=this[_0xb411bc(0xdb)][_0xb411bc(0xaf)](_0x4c171c,_0x466abe,_0x5332cf[_0xb411bc(0xbe)]);_0x2dfe1c&&_0x2dfe1c[_0xb411bc(0xd5)]&&this['_threadCommentModel'][_0xb411bc(0xc7)](_0x4c171c,_0x466abe,_0x5332cf[_0xb411bc(0xbe)]);break;}case v[_0xb411bc(0xb4)]:{this[_0xb411bc(0xdb)][_0xb411bc(0xbc)](_0x4c171c,_0x466abe,{'commentId':_0x5332cf[_0xb411bc(0xbe)],'text':JSON[_0xb411bc(0x82)](_0x5332cf[_0xb411bc(0xab)])});break;}case v['Solve']:{const _0x19b21f=(_0x1621e3=this['_threadCommentModel']['getUnit'](_0x5332cf[_0xb411bc(0x77)])[_0xb411bc(0xac)](_0xfce84a=>_0xfce84a[_0xb411bc(0xad)]===_0x5332cf[_0xb411bc(0xad)]))==null?void 0x0:_0x1621e3[_0xb411bc(0xcd)];_0x19b21f&&this[_0xb411bc(0xdb)]['resolveComment'](_0x4c171c,_0x466abe,_0x19b21f['id'],_0x5332cf[_0xb411bc(0xc8)]===I[_0xb411bc(0xc9)]);break;}}}));}};S=V([p(0x0,_0x87e92(_0x5292e3)),p(0x1,_0x87e92(_0x1787fb)),p(0x2,_0x87e92(_0x92834c)),p(0x3,_0x87e92(_0xd0cbaa))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2dc13f,_0x14dded,_0x1adb39,_0xe9a190)=>{const _0x198ab7=_0x33b663;for(var _0x2af37a=_0xe9a190>0x1?void 0x0:_0xe9a190?k(_0x14dded,_0x1adb39):_0x14dded,_0x218ff5=_0x2dc13f[_0x198ab7(0xb7)]-0x1,_0x29503c;_0x218ff5>=0x0;_0x218ff5--)(_0x29503c=_0x2dc13f[_0x218ff5])&&(_0x2af37a=_0x29503c(_0x2af37a)||_0x2af37a);return _0x2af37a;},_=(_0x4b7361,_0x50ae80)=>(_0x22f396,_0x180244)=>_0x50ae80(_0x22f396,_0x180244,_0x4b7361);function X(_0xc0d29b,_0x4c6dd5){const _0x247179=_0x33b663,_0x4b7f97=_0xc0d29b['replies'][0x0];return{..._0x4c6dd5,'id':_0x4b7f97[_0x247179(0xbe)],'resolved':_0xc0d29b[_0x247179(0xc8)]===0x1,'dT':D(_0x4b7f97[_0x247179(0x78)]),'personId':_0x4b7f97['userId'],'threadId':_0x4b7f97[_0x247179(0xad)]};}function ee(_0x18ece0,_0x37d729,_0x4e8771){const _0x14932b=_0x33b663;var _0x51134e,_0x19b8d4;if(((_0x19b8d4=(_0x51134e=_0x18ece0==null?void 0x0:_0x18ece0[_0x14932b(0xd0)])==null?void 0x0:_0x51134e['length'])!=null?_0x19b8d4:0x0)>0x0){const _0x4f99c5=(_0x3a090b,_0x5da370)=>({'id':_0x3a090b[_0x14932b(0xbe)],'threadId':_0x3a090b['threadId'],'dT':D(_0x3a090b[_0x14932b(0x78)]),'personId':_0x3a090b['userId'],'resolved':_0x18ece0[_0x14932b(0xc8)]===I[_0x14932b(0xc9)],'unitId':_0x37d729,'subUnitId':_0x4e8771,'text':JSON[_0x14932b(0x82)](_0x3a090b[_0x14932b(0xab)]),'parentId':_0x5da370}),_0x446a82=_0x4f99c5(_0x18ece0[_0x14932b(0xd0)][0x0]);return{..._0x446a82,'children':_0x18ece0[_0x14932b(0xd0)][_0x14932b(0x92)](0x1)['map'](_0x56ed32=>_0x4f99c5(_0x56ed32,_0x446a82['id']))};}return null;}function _0x5414(_0x5c0915,_0x47971c){const _0x9b0929=_0x9b09();return _0x5414=function(_0x541470,_0x531f26){_0x541470=_0x541470-0x77;let _0x4b0a80=_0x9b0929[_0x541470];return _0x4b0a80;},_0x5414(_0x5c0915,_0x47971c);}let f=class{constructor(_0x348d9b,_0x437d57,_0x3592f9,_0x11540d){const _0x55e5e9=_0x33b663;this['_httpService']=_0x348d9b,this['_userService']=_0x437d57,this[_0x55e5e9(0x9b)]=_0x3592f9,this['_injector']=_0x11540d;}async[_0x33b663(0xba)](_0x3cb239){const _0x242e4b=_0x33b663;var _0x53007d,_0x40add4;const {parentId:_0x4ee959,unitId:_0x1ebcf5,text:_0x45ce37,threadId:_0x13279a}=_0x3cb239,_0x1a86a0=(_0x40add4=(_0x53007d=_0x45ce37[_0x242e4b(0xd4)])==null?void 0x0:_0x53007d[_0x242e4b(0xb8)](_0x4760c8=>_0x4760c8[_0x242e4b(0xb0)]===_0x15c53f[_0x242e4b(0x7d)])[_0x242e4b(0x94)](_0x44595a=>_0x44595a[_0x242e4b(0x83)]))!=null?_0x40add4:[],_0x4b4e9b=JSON[_0x242e4b(0xb6)](_0x45ce37),_0x3763e6=(await this['_sessionService']['requireSession'](_0x1ebcf5))[_0x242e4b(0x9f)]();if(_0x4ee959){const _0x4c529d={'memberId':_0x3763e6,'unitId':_0x1ebcf5,'content':_0x4b4e9b,'mention':_0x1a86a0,'threadId':_0x13279a},_0x3c07e3=(await this[_0x242e4b(0xbb)][_0x242e4b(0xd3)](_0x242e4b(0xd9)+_0x1ebcf5+_0x242e4b(0xd2),{'body':_0x4c529d}))['body'][_0x242e4b(0xc3)];return{..._0x3cb239,'id':_0x3c07e3[_0x242e4b(0xbe)],'dT':_0x467adf(+_0x3c07e3[_0x242e4b(0x78)])[_0x242e4b(0xa0)](_0x242e4b(0xaa)),'personId':_0x3c07e3['userId']};}else{const _0x337074={'memberId':_0x3763e6,'unitId':_0x1ebcf5,'content':_0x4b4e9b,'mention':_0x1a86a0},_0x1877cf=await this[_0x242e4b(0xbb)]['post'](_0x242e4b(0xd9)+_0x1ebcf5+_0x242e4b(0xa2),{'body':_0x337074});return X(_0x1877cf[_0x242e4b(0xbf)][_0x242e4b(0x8c)],_0x3cb239);}}async['updateComment'](_0x371a7e){const _0x1fb5c3=_0x33b663;var _0x39d454,_0x3c6ebf;const {text:_0x45f09a,unitId:_0x5ddc63}=_0x371a7e,_0x2e3cfe=(_0x3c6ebf=(_0x39d454=_0x45f09a[_0x1fb5c3(0xd4)])==null?void 0x0:_0x39d454[_0x1fb5c3(0xb8)](_0x1daff7=>_0x1daff7[_0x1fb5c3(0xb0)]===_0x15c53f[_0x1fb5c3(0x7d)])[_0x1fb5c3(0x94)](_0x1eb4c4=>_0x1eb4c4[_0x1fb5c3(0x83)]))!=null?_0x3c6ebf:[],_0x45dacd=JSON[_0x1fb5c3(0xb6)](_0x45f09a),_0x4bd605=_0x371a7e[_0x1fb5c3(0xad)],_0x1460ed=_0x371a7e['id'],_0x9dede4={'memberId':(await this[_0x1fb5c3(0x9b)][_0x1fb5c3(0xc5)](_0x5ddc63))['getMemberID'](),'unitId':_0x5ddc63,'threadId':_0x4bd605,'mention':_0x2e3cfe,'content':_0x45dacd,'replyId':_0x1460ed},_0x42f2e6=await this[_0x1fb5c3(0xbb)]['post'](_0x1fb5c3(0xd9)+_0x5ddc63+_0x1fb5c3(0xce),{'body':_0x9dede4});return!_0x42f2e6['body'][_0x1fb5c3(0xa3)]||_0x42f2e6[_0x1fb5c3(0xbf)][_0x1fb5c3(0xa3)][_0x1fb5c3(0x99)]===0x1;}async[_0x33b663(0x80)](_0xddc587){const _0x20dd01=_0x33b663,{unitId:_0x328cad}=_0xddc587,_0x5ae0dd=_0xddc587[_0x20dd01(0xad)],_0x2e449={'memberId':this[_0x20dd01(0x9e)]['getCurrentUser']()[_0x20dd01(0xa4)],'unitId':_0x328cad,'threadId':_0x5ae0dd,'solved':_0xddc587[_0x20dd01(0xcf)]?I[_0x20dd01(0xc9)]:I[_0x20dd01(0x8e)]},_0x22a1de=await this[_0x20dd01(0xbb)][_0x20dd01(0xd3)](_0x20dd01(0xd9)+_0x328cad+_0x20dd01(0xa5),{'body':_0x2e449});return!_0x22a1de['body'][_0x20dd01(0xa3)]||_0x22a1de[_0x20dd01(0xbf)][_0x20dd01(0xa3)][_0x20dd01(0x99)]===0x1;}async[_0x33b663(0xc7)](_0x59d170,_0x51fb09,_0x3a7b35,_0x20e73d){const _0x416806=_0x33b663,_0x5b826e={'memberId':(await this['_sessionService'][_0x416806(0xc5)](_0x59d170))['getMemberID'](),'threadId':_0x3a7b35,'replyId':_0x20e73d,'unitId':_0x59d170},_0xa341f1=await this['_httpService'][_0x416806(0xd3)](_0x416806(0xd9)+_0x59d170+_0x416806(0x85),{'body':_0x5b826e});return!_0xa341f1[_0x416806(0xbf)][_0x416806(0xa3)]||_0xa341f1[_0x416806(0xbf)][_0x416806(0xa3)][_0x416806(0x99)]===0x1;}async[_0x33b663(0xb5)](_0x1dec01,_0x31e33e,_0x5a04c9){const _0x32a3d1=_0x33b663,_0x3cd848={'unitId':_0x1dec01,'threadId':_0x5a04c9},_0x3a78be=await this['_httpService'][_0x32a3d1(0xd3)](_0x32a3d1(0xd9)+_0x1dec01+'/list',{'body':_0x3cd848}),_0x1cd96f=_0x5a04c9['map'](_0x2e1684=>ee(_0x3a78be[_0x32a3d1(0xbf)]['comments'][_0x2e1684],_0x1dec01,_0x31e33e))[_0x32a3d1(0xb8)](Boolean);return Object[_0x32a3d1(0x96)](_0x3a78be[_0x32a3d1(0xbf)][_0x32a3d1(0x7e)])[_0x32a3d1(0x88)](_0xf1a02=>{const _0x477087=_0x32a3d1;this[_0x477087(0x9e)]['addUser'](_0xf1a02);}),_0x1cd96f;}['saveCommentToSnapshot'](_0x51b4e3){const _0x232f69=_0x33b663;return{'id':_0x51b4e3['id'],'threadId':_0x51b4e3[_0x232f69(0xad)],'ref':_0x51b4e3[_0x232f69(0xbd)]};}};f=Q([_(0x0,_0x87e92(_0x322cbd)),_(0x1,_0x87e92(_0x92834c)),_(0x2,_0x87e92(_0x218050)),_(0x3,_0x87e92(_0xd0cbaa))],f);var re=Object[_0x33b663(0x87)],te=(_0x5e5558,_0x2e08e0,_0x5dca7e,_0x285817)=>{const _0x280f05=_0x33b663;for(var _0x5d402d=_0x285817>0x1?void 0x0:_0x285817?re(_0x2e08e0,_0x5dca7e):_0x2e08e0,_0x446928=_0x5e5558[_0x280f05(0xb7)]-0x1,_0x130317;_0x446928>=0x0;_0x446928--)(_0x130317=_0x5e5558[_0x446928])&&(_0x5d402d=_0x130317(_0x5d402d)||_0x5d402d);return _0x5d402d;},N=(_0x1f9978,_0x173625)=>(_0x20987a,_0x53f4e0)=>_0x173625(_0x20987a,_0x53f4e0,_0x1f9978);let g=class extends _0x130674{constructor(_0x8acb77,_0xac0a20){const _0x4ccfe1=_0x33b663;super(),this[_0x4ccfe1(0x9a)]=_0x8acb77,this['_threadCommentDataSource']=_0xac0a20,this['_initDataSource']();}[_0x33b663(0x89)](){const _0x46a22d=_0x33b663;this[_0x46a22d(0x9a)][_0x46a22d(0x97)]=this[_0x46a22d(0xcb)],this[_0x46a22d(0x9a)][_0x46a22d(0xb3)]=!0x1;}};g=te([N(0x0,_0x5a8293),N(0x1,_0x87e92(f))],g);var se=Object['defineProperty'],oe=Object[_0x33b663(0x87)],ne=(_0x303fad,_0x252bda,_0x6e6eea)=>_0x252bda in _0x303fad?se(_0x303fad,_0x252bda,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6e6eea}):_0x303fad[_0x252bda]=_0x6e6eea,ie=(_0x1613e4,_0x38c692,_0x4e3337,_0x2a6ac1)=>{const _0x2b0eb2=_0x33b663;for(var _0x1cf47f=_0x2a6ac1>0x1?void 0x0:_0x2a6ac1?oe(_0x38c692,_0x4e3337):_0x38c692,_0x4d1a7c=_0x1613e4[_0x2b0eb2(0xb7)]-0x1,_0x3ccca3;_0x4d1a7c>=0x0;_0x4d1a7c--)(_0x3ccca3=_0x1613e4[_0x4d1a7c])&&(_0x1cf47f=_0x3ccca3(_0x1cf47f)||_0x1cf47f);return _0x1cf47f;},w=(_0x4fefda,_0x1c30b7)=>(_0x16cffd,_0x5259ec)=>_0x1c30b7(_0x16cffd,_0x5259ec,_0x4fefda),$=(_0x1c885e,_0x320605,_0xd78288)=>ne(_0x1c885e,typeof _0x320605!=_0x33b663(0xb2)?_0x320605+'':_0x320605,_0xd78288);let b=class extends _0xadfa01{constructor(_0x14b42f=M,_0xb00bb6,_0x22ab7b){const _0xd08ce6=_0x33b663;super(),this[_0xd08ce6(0x84)]=_0x14b42f,this[_0xd08ce6(0xa9)]=_0xb00bb6,this[_0xd08ce6(0x95)]=_0x22ab7b;const {..._0x73c8bd}=_0x901e41({},M,this[_0xd08ce6(0x84)]);this['_configService']['setConfig'](z,_0x73c8bd);}[_0x33b663(0x7a)](){[[f],[g],[S]]['forEach'](_0xb5bc68=>{const _0x20802c=_0x5414;this[_0x20802c(0xa9)]['add'](_0xb5bc68);});}[_0x33b663(0xb1)](){const _0x459103=_0x33b663;this['_injector']['get'](g),this[_0x459103(0xa9)][_0x459103(0x9c)](S);}};$(b,_0x33b663(0x79),W),$(b,'type',_0x440175[_0x33b663(0xc0)]),b=ie([_0x4a2af0(_0x59df4e,_0x3bf5fb,_0x377907),w(0x1,_0x87e92(_0xd0cbaa)),w(0x2,_0x399a92)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x46caf4=_0x2d35;(function(_0x3d8aff,_0x1702fb){const _0x4ac3a7=_0x2d35,_0x125092=_0x3d8aff();while(!![]){try{const _0xa81c80=parseInt(_0x4ac3a7(0x1bf))/0x1*(parseInt(_0x4ac3a7(0x1a6))/0x2)+parseInt(_0x4ac3a7(0x17e))/0x3+-parseInt(_0x4ac3a7(0x1a2))/0x4*(parseInt(_0x4ac3a7(0x185))/0x5)+parseInt(_0x4ac3a7(0x1b0))/0x6*(parseInt(_0x4ac3a7(0x1bd))/0x7)+-parseInt(_0x4ac3a7(0x18d))/0x8*(-parseInt(_0x4ac3a7(0x1c5))/0x9)+parseInt(_0x4ac3a7(0x183))/0xa+-parseInt(_0x4ac3a7(0x1c6))/0xb*(-parseInt(_0x4ac3a7(0x1ac))/0xc);if(_0xa81c80===_0x1702fb)break;else _0x125092['push'](_0x125092['shift']());}catch(_0x1be958){_0x125092['push'](_0x125092['shift']());}}}(_0x5f07,0xbde74));import{CommentService as _0x225520,CollaborationSessionService as _0x4ce229,UniverCollaborationClientPlugin as _0x61bf1e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x19e690}from'@univerjs-pro/license';function _0x2d35(_0x28bce9,_0x2abd21){const _0x5f072d=_0x5f07();return _0x2d35=function(_0x2d3553,_0x2801cc){_0x2d3553=_0x2d3553-0x165;let _0x4e1289=_0x5f072d[_0x2d3553];return _0x4e1289;},_0x2d35(_0x28bce9,_0x2abd21);}import{dayjs as _0x45436d,UserManagerService as _0x589a84,Inject as _0x34f522,Injector as _0x1ce2b4,Disposable as _0x48842b,CustomRangeType as _0x4d170c,UniverInstanceType as _0x53ace8,DependentOn as _0x3f3a3a,IConfigService as _0x9f58b,Plugin as _0x39a411,merge as _0x45af3c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1fa3df}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c91f1,IThreadCommentDataSourceService as _0x197300}from'@univerjs/thread-comment';function _0x5f07(){const _0x12039b=['payload','requireSession','get','Edit','/reply','1127436VVGikP','rangeId','Solved','defineProperty','updateComment','10766320ZRbPYR','post','180cGxAZk','getCurrentUser','/universer-api/user/list','rangeType','_initDataSource','_init','code','_commentService','1968GxEFuD','syncUpdateMutationToColla','map','_threadCommentDataSource','COMMENT','subscribe','reply','customRanges','parse','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','user','_injector','userId','threadId','solved','onReady','_sessionService','comments','resolveComment','140552EgAEkZ','setConfig','Add','_initUserSync','30rirIIU','deleteComment','_threadCommentModel','listComments','_config','UNRECOGNIZED','6624tLERyx','_threadCommentDataSourceService','content','/universer-api/comment/unit/','12234PLOGUy','delete','getMemberID','userID','/solved','addUser','root','getUnit','length','error','OpenOrReOpen','getComment','stringify','791yaRVnD','unitId','4901qtgoLq','YYYY/MM/DD\x20HH:mm','symbol','comment','values','Unknown','3573ewhrLO','3762cizWIH','/edit','pluginName','Reply','filter','addComment','_userService','add','replies','Delete','size','UNIVER_UNKNOWN','body','replyId','disposeWithMe','commentUpdate$','users','getOwnPropertyDescriptor','_httpService','_configService','type','slice','Solve','parentId','/delete','createTimestamp'];_0x5f07=function(){return _0x12039b;};return _0x5f07();}import{bufferTime as _0xf37482}from'rxjs';import{HTTPService as _0x2066d0}from'@univerjs/network';const W=_0x46caf4(0x197);var I=(_0x1a8496=>(_0x1a8496[_0x1a8496[_0x46caf4(0x1ba)]=0x0]=_0x46caf4(0x1ba),_0x1a8496[_0x1a8496['Solved']=0x1]=_0x46caf4(0x180),_0x1a8496[_0x1a8496[_0x46caf4(0x1ab)]=-0x1]=_0x46caf4(0x1ab),_0x1a8496))(I||{}),v=(_0x4e9095=>(_0x4e9095[_0x4e9095[_0x46caf4(0x1c4)]=0x0]=_0x46caf4(0x1c4),_0x4e9095[_0x4e9095['Add']=0x1]='Add',_0x4e9095[_0x4e9095[_0x46caf4(0x1c9)]=0x2]=_0x46caf4(0x1c9),_0x4e9095[_0x4e9095[_0x46caf4(0x17c)]=0x3]=_0x46caf4(0x17c),_0x4e9095[_0x4e9095[_0x46caf4(0x168)]=0x4]=_0x46caf4(0x168),_0x4e9095[_0x4e9095[_0x46caf4(0x175)]=0x5]=_0x46caf4(0x175),_0x4e9095[_0x4e9095[_0x46caf4(0x1ab)]=-0x1]=_0x46caf4(0x1ab),_0x4e9095))(v||{});const D=_0x67f80=>_0x45436d(new Date(+_0x67f80))['format'](_0x46caf4(0x1c0)),B=async(_0x3ac7cc,_0x40b3f3)=>{const _0x3440cc=_0x46caf4,_0x238a6a=_0x3ac7cc['get'](_0x589a84),_0x36ff5f=_0x3ac7cc['get'](_0x2066d0);_0x40b3f3[_0x3440cc(0x198)](_0x423b0d=>{const _0x55b80d=_0x3440cc;_0x238a6a['getUser'](_0x423b0d)&&_0x40b3f3[_0x55b80d(0x1b1)](_0x423b0d);}),_0x40b3f3[_0x3440cc(0x169)]&&(await _0x36ff5f['get'](_0x3440cc(0x187),{'params':{'userIDs':[..._0x40b3f3]}}))[_0x3440cc(0x16b)][_0x3440cc(0x16f)]['forEach'](_0x211231=>{_0x211231&&_0x238a6a['addUser'](_0x211231);});};var K=Object[_0x46caf4(0x170)],V=(_0x270d6e,_0x51a48b,_0x594e94,_0x5ab02d)=>{const _0x22b375=_0x46caf4;for(var _0x47e6d0=_0x5ab02d>0x1?void 0x0:_0x5ab02d?K(_0x51a48b,_0x594e94):_0x51a48b,_0x17af35=_0x270d6e[_0x22b375(0x1b8)]-0x1,_0x4ce0ed;_0x17af35>=0x0;_0x17af35--)(_0x4ce0ed=_0x270d6e[_0x17af35])&&(_0x47e6d0=_0x4ce0ed(_0x47e6d0)||_0x47e6d0);return _0x47e6d0;},p=(_0x409744,_0x48f8af)=>(_0x3f80bb,_0x5ea0b1)=>_0x48f8af(_0x3f80bb,_0x5ea0b1,_0x409744);let S=class extends _0x48842b{constructor(_0x572d77,_0x560f79,_0x18508a,_0xde8079){const _0x25966b=_0x46caf4;super(),this[_0x25966b(0x18c)]=_0x572d77,this[_0x25966b(0x1a8)]=_0x560f79,this[_0x25966b(0x165)]=_0x18508a,this[_0x25966b(0x19a)]=_0xde8079,this[_0x25966b(0x18a)](),this[_0x25966b(0x1a5)]();}[_0x46caf4(0x1a5)](){const _0x51e9b6=_0x46caf4;this[_0x51e9b6(0x16d)](this[_0x51e9b6(0x1a8)][_0x51e9b6(0x16e)]['pipe'](_0xf37482(0x10))[_0x51e9b6(0x192)](_0x1de954=>{const _0x3d85df=_0x51e9b6,_0x105a83=new Set();_0x1de954[_0x3d85df(0x198)](_0x463b76=>{const _0x41c229=_0x3d85df;switch(_0x463b76[_0x41c229(0x173)]){case _0x41c229(0x166):{const _0xb5b710=_0x463b76[_0x41c229(0x179)]['personId'];_0x105a83['add'](_0xb5b710);break;}}}),B(this[_0x3d85df(0x19a)],_0x105a83);}));}[_0x46caf4(0x18a)](){const _0x54051a=_0x46caf4;this[_0x54051a(0x16d)](this[_0x54051a(0x18c)][_0x54051a(0x16e)][_0x54051a(0x192)](async _0x46d6c2=>{const _0x2d4bd1=_0x54051a;var _0x11785a,_0x9c97a5,_0x3610a0,_0x3ba5e9;const _0x31fbf5=(_0x11785a=this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1b7)](_0x46d6c2[_0x2d4bd1(0x1be)])['find'](_0x2aafd1=>_0x2aafd1[_0x2d4bd1(0x19c)]===_0x46d6c2[_0x2d4bd1(0x19c)]))==null?void 0x0:_0x11785a[_0x2d4bd1(0x1b6)];if(!_0x31fbf5)return;const {unitId:_0x344268,subUnitId:_0x4ca567}=_0x31fbf5;switch(_0x46d6c2[_0x2d4bd1(0x199)]&&this[_0x2d4bd1(0x165)][_0x2d4bd1(0x1b5)](_0x46d6c2[_0x2d4bd1(0x199)]),_0x46d6c2[_0x2d4bd1(0x173)]){case v[_0x2d4bd1(0x1a4)]:break;case v[_0x2d4bd1(0x1c9)]:{this[_0x2d4bd1(0x1a8)]['addComment'](_0x344268,_0x4ca567,{'unitId':_0x344268,'subUnitId':_0x4ca567,'ref':'','id':_0x46d6c2[_0x2d4bd1(0x16c)],'dT':D(+_0x46d6c2[_0x2d4bd1(0x178)]),'threadId':_0x46d6c2[_0x2d4bd1(0x19c)],'personId':(_0x3610a0=(_0x9c97a5=_0x46d6c2['user'])==null?void 0x0:_0x9c97a5[_0x2d4bd1(0x1b3)])!=null?_0x3610a0:_0x46d6c2[_0x2d4bd1(0x19b)],'text':JSON['parse'](_0x46d6c2['content']),'parentId':_0x31fbf5['id']});break;}case v['Delete']:{const _0x180324=this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1bb)](_0x344268,_0x4ca567,_0x46d6c2['replyId']);_0x180324&&_0x180324[_0x2d4bd1(0x176)]&&this['_threadCommentModel'][_0x2d4bd1(0x1a7)](_0x344268,_0x4ca567,_0x46d6c2['replyId']);break;}case v[_0x2d4bd1(0x17c)]:{this['_threadCommentModel'][_0x2d4bd1(0x182)](_0x344268,_0x4ca567,{'commentId':_0x46d6c2[_0x2d4bd1(0x16c)],'text':JSON['parse'](_0x46d6c2[_0x2d4bd1(0x1ae)])});break;}case v[_0x2d4bd1(0x175)]:{const _0x2ffcfc=(_0x3ba5e9=this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1b7)](_0x46d6c2[_0x2d4bd1(0x1be)])['find'](_0xedcd92=>_0xedcd92['threadId']===_0x46d6c2['threadId']))==null?void 0x0:_0x3ba5e9[_0x2d4bd1(0x1b6)];_0x2ffcfc&&this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1a1)](_0x344268,_0x4ca567,_0x2ffcfc['id'],_0x46d6c2[_0x2d4bd1(0x19d)]===I[_0x2d4bd1(0x180)]);break;}}}));}};S=V([p(0x0,_0x34f522(_0x225520)),p(0x1,_0x34f522(_0x2c91f1)),p(0x2,_0x34f522(_0x589a84)),p(0x3,_0x34f522(_0x1ce2b4))],S);const z=_0x46caf4(0x196),M={};var k=Object[_0x46caf4(0x170)],Q=(_0x27c67b,_0x2c9383,_0x49e130,_0x5ef8e8)=>{const _0x581320=_0x46caf4;for(var _0x2b29ef=_0x5ef8e8>0x1?void 0x0:_0x5ef8e8?k(_0x2c9383,_0x49e130):_0x2c9383,_0x55ebae=_0x27c67b[_0x581320(0x1b8)]-0x1,_0xaedf98;_0x55ebae>=0x0;_0x55ebae--)(_0xaedf98=_0x27c67b[_0x55ebae])&&(_0x2b29ef=_0xaedf98(_0x2b29ef)||_0x2b29ef);return _0x2b29ef;},_=(_0x5cfd39,_0xaf7adf)=>(_0x285c1e,_0x4410c3)=>_0xaf7adf(_0x285c1e,_0x4410c3,_0x5cfd39);function X(_0x370cf4,_0x2f415c){const _0x434a92=_0x46caf4,_0x419f2a=_0x370cf4[_0x434a92(0x167)][0x0];return{..._0x2f415c,'id':_0x419f2a['replyId'],'resolved':_0x370cf4['solved']===0x1,'dT':D(_0x419f2a[_0x434a92(0x178)]),'personId':_0x419f2a[_0x434a92(0x19b)],'threadId':_0x419f2a[_0x434a92(0x19c)]};}function ee(_0x370b7c,_0x2f0d54,_0x43ef5e){const _0x53144d=_0x46caf4;var _0x18cf40,_0x3b10c7;if(((_0x3b10c7=(_0x18cf40=_0x370b7c==null?void 0x0:_0x370b7c[_0x53144d(0x167)])==null?void 0x0:_0x18cf40[_0x53144d(0x1b8)])!=null?_0x3b10c7:0x0)>0x0){const _0xd2236a=(_0x11512f,_0x47e62a)=>({'id':_0x11512f[_0x53144d(0x16c)],'threadId':_0x11512f[_0x53144d(0x19c)],'dT':D(_0x11512f[_0x53144d(0x178)]),'personId':_0x11512f[_0x53144d(0x19b)],'resolved':_0x370b7c[_0x53144d(0x19d)]===I[_0x53144d(0x180)],'unitId':_0x2f0d54,'subUnitId':_0x43ef5e,'text':JSON[_0x53144d(0x195)](_0x11512f['content']),'parentId':_0x47e62a}),_0x49a524=_0xd2236a(_0x370b7c[_0x53144d(0x167)][0x0]);return{..._0x49a524,'children':_0x370b7c[_0x53144d(0x167)][_0x53144d(0x174)](0x1)[_0x53144d(0x18f)](_0x505bbd=>_0xd2236a(_0x505bbd,_0x49a524['id']))};}return null;}let f=class{constructor(_0x53e050,_0xce4dcf,_0x15b234,_0x312798){const _0xe12a6f=_0x46caf4;this['_httpService']=_0x53e050,this[_0xe12a6f(0x165)]=_0xce4dcf,this['_sessionService']=_0x15b234,this[_0xe12a6f(0x19a)]=_0x312798;}async[_0x46caf4(0x1cb)](_0x3d5998){const _0x3f5ffb=_0x46caf4;var _0x7ae77d,_0x407807;const {parentId:_0x3040f4,unitId:_0x45dda4,text:_0x3d8495,threadId:_0x56c05e}=_0x3d5998,_0x3db76f=(_0x407807=(_0x7ae77d=_0x3d8495[_0x3f5ffb(0x194)])==null?void 0x0:_0x7ae77d[_0x3f5ffb(0x1ca)](_0x4d9c53=>_0x4d9c53[_0x3f5ffb(0x188)]===_0x4d170c[_0x3f5ffb(0x191)])[_0x3f5ffb(0x18f)](_0x221c4f=>_0x221c4f[_0x3f5ffb(0x17f)]))!=null?_0x407807:[],_0x3b0e36=JSON[_0x3f5ffb(0x1bc)](_0x3d8495),_0x4e2377=(await this[_0x3f5ffb(0x19f)][_0x3f5ffb(0x17a)](_0x45dda4))['getMemberID']();if(_0x3040f4){const _0x4e8584={'memberId':_0x4e2377,'unitId':_0x45dda4,'content':_0x3b0e36,'mention':_0x3db76f,'threadId':_0x56c05e},_0x19c1fc=(await this['_httpService'][_0x3f5ffb(0x184)](_0x3f5ffb(0x1af)+_0x45dda4+_0x3f5ffb(0x17d),{'body':_0x4e8584}))[_0x3f5ffb(0x16b)][_0x3f5ffb(0x193)];return{..._0x3d5998,'id':_0x19c1fc[_0x3f5ffb(0x16c)],'dT':_0x45436d(+_0x19c1fc[_0x3f5ffb(0x178)])['format'](_0x3f5ffb(0x1c0)),'personId':_0x19c1fc[_0x3f5ffb(0x19b)]};}else{const _0x3c5c4b={'memberId':_0x4e2377,'unitId':_0x45dda4,'content':_0x3b0e36,'mention':_0x3db76f},_0x273de2=await this[_0x3f5ffb(0x171)][_0x3f5ffb(0x184)](_0x3f5ffb(0x1af)+_0x45dda4+'/add',{'body':_0x3c5c4b});return X(_0x273de2[_0x3f5ffb(0x16b)][_0x3f5ffb(0x1c2)],_0x3d5998);}}async['updateComment'](_0x3e20f5){const _0x4c4b31=_0x46caf4;var _0x22af3d,_0x3130b8;const {text:_0x3f9eb1,unitId:_0x5792da}=_0x3e20f5,_0x3c3a47=(_0x3130b8=(_0x22af3d=_0x3f9eb1[_0x4c4b31(0x194)])==null?void 0x0:_0x22af3d[_0x4c4b31(0x1ca)](_0x1778dd=>_0x1778dd[_0x4c4b31(0x188)]===_0x4d170c[_0x4c4b31(0x191)])['map'](_0x4cb864=>_0x4cb864[_0x4c4b31(0x17f)]))!=null?_0x3130b8:[],_0x67a065=JSON[_0x4c4b31(0x1bc)](_0x3f9eb1),_0x4d3241=_0x3e20f5['threadId'],_0x422654=_0x3e20f5['id'],_0x4dafcf={'memberId':(await this[_0x4c4b31(0x19f)][_0x4c4b31(0x17a)](_0x5792da))[_0x4c4b31(0x1b2)](),'unitId':_0x5792da,'threadId':_0x4d3241,'mention':_0x3c3a47,'content':_0x67a065,'replyId':_0x422654},_0x1409a7=await this['_httpService'][_0x4c4b31(0x184)](_0x4c4b31(0x1af)+_0x5792da+_0x4c4b31(0x1c7),{'body':_0x4dafcf});return!_0x1409a7[_0x4c4b31(0x16b)][_0x4c4b31(0x1b9)]||_0x1409a7[_0x4c4b31(0x16b)]['error']['code']===0x1;}async[_0x46caf4(0x1a1)](_0x1849fc){const _0x3a2fff=_0x46caf4,{unitId:_0x444c15}=_0x1849fc,_0x34a4f3=_0x1849fc[_0x3a2fff(0x19c)],_0x3971ae={'memberId':this[_0x3a2fff(0x165)][_0x3a2fff(0x186)]()['userID'],'unitId':_0x444c15,'threadId':_0x34a4f3,'solved':_0x1849fc['resolved']?I[_0x3a2fff(0x180)]:I[_0x3a2fff(0x1ba)]},_0x334cb6=await this['_httpService']['post'](_0x3a2fff(0x1af)+_0x444c15+_0x3a2fff(0x1b4),{'body':_0x3971ae});return!_0x334cb6[_0x3a2fff(0x16b)][_0x3a2fff(0x1b9)]||_0x334cb6[_0x3a2fff(0x16b)][_0x3a2fff(0x1b9)][_0x3a2fff(0x18b)]===0x1;}async[_0x46caf4(0x1a7)](_0x1f9cda,_0x571f88,_0x3f18f9,_0x6b01d9){const _0x2fed2b=_0x46caf4,_0x2aaefe={'memberId':(await this[_0x2fed2b(0x19f)][_0x2fed2b(0x17a)](_0x1f9cda))['getMemberID'](),'threadId':_0x3f18f9,'replyId':_0x6b01d9,'unitId':_0x1f9cda},_0x296ca2=await this[_0x2fed2b(0x171)][_0x2fed2b(0x184)]('/universer-api/comment/unit/'+_0x1f9cda+_0x2fed2b(0x177),{'body':_0x2aaefe});return!_0x296ca2['body'][_0x2fed2b(0x1b9)]||_0x296ca2[_0x2fed2b(0x16b)][_0x2fed2b(0x1b9)][_0x2fed2b(0x18b)]===0x1;}async[_0x46caf4(0x1a9)](_0x351caf,_0x4a2126,_0x3952a5){const _0x1ea2b7=_0x46caf4,_0x4c921f={'unitId':_0x351caf,'threadId':_0x3952a5},_0x1712aa=await this[_0x1ea2b7(0x171)][_0x1ea2b7(0x184)]('/universer-api/comment/unit/'+_0x351caf+'/list',{'body':_0x4c921f}),_0x423d1f=_0x3952a5['map'](_0x2b4bfe=>ee(_0x1712aa['body'][_0x1ea2b7(0x1a0)][_0x2b4bfe],_0x351caf,_0x4a2126))['filter'](Boolean);return Object[_0x1ea2b7(0x1c3)](_0x1712aa['body'][_0x1ea2b7(0x16f)])[_0x1ea2b7(0x198)](_0x4f423c=>{const _0xad95db=_0x1ea2b7;this[_0xad95db(0x165)][_0xad95db(0x1b5)](_0x4f423c);}),_0x423d1f;}['saveCommentToSnapshot'](_0x5d8497){const _0x273b8e=_0x46caf4;return{'id':_0x5d8497['id'],'threadId':_0x5d8497[_0x273b8e(0x19c)],'ref':_0x5d8497['ref']};}};f=Q([_(0x0,_0x34f522(_0x2066d0)),_(0x1,_0x34f522(_0x589a84)),_(0x2,_0x34f522(_0x4ce229)),_(0x3,_0x34f522(_0x1ce2b4))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x14f5c1,_0x374e4a,_0xf7dcd8,_0x210cea)=>{const _0x4f617e=_0x46caf4;for(var _0x216cf0=_0x210cea>0x1?void 0x0:_0x210cea?re(_0x374e4a,_0xf7dcd8):_0x374e4a,_0x3481d0=_0x14f5c1[_0x4f617e(0x1b8)]-0x1,_0x30d3c6;_0x3481d0>=0x0;_0x3481d0--)(_0x30d3c6=_0x14f5c1[_0x3481d0])&&(_0x216cf0=_0x30d3c6(_0x216cf0)||_0x216cf0);return _0x216cf0;},N=(_0x3f18bd,_0x2a769d)=>(_0x3020f6,_0x4c33fd)=>_0x2a769d(_0x3020f6,_0x4c33fd,_0x3f18bd);let g=class extends _0x48842b{constructor(_0x38dafc,_0x3626e5){const _0x476dbf=_0x46caf4;super(),this[_0x476dbf(0x1ad)]=_0x38dafc,this[_0x476dbf(0x190)]=_0x3626e5,this[_0x476dbf(0x189)]();}[_0x46caf4(0x189)](){const _0x3a8a5c=_0x46caf4;this['_threadCommentDataSourceService']['dataSource']=this[_0x3a8a5c(0x190)],this['_threadCommentDataSourceService'][_0x3a8a5c(0x18e)]=!0x1;}};g=te([N(0x0,_0x197300),N(0x1,_0x34f522(f))],g);var se=Object[_0x46caf4(0x181)],oe=Object[_0x46caf4(0x170)],ne=(_0x348437,_0x4f7a96,_0x31e921)=>_0x4f7a96 in _0x348437?se(_0x348437,_0x4f7a96,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31e921}):_0x348437[_0x4f7a96]=_0x31e921,ie=(_0x4ea0d3,_0x2fe1a1,_0x59aa9b,_0x1d39b9)=>{for(var _0x364484=_0x1d39b9>0x1?void 0x0:_0x1d39b9?oe(_0x2fe1a1,_0x59aa9b):_0x2fe1a1,_0x55a883=_0x4ea0d3['length']-0x1,_0x1ef8c1;_0x55a883>=0x0;_0x55a883--)(_0x1ef8c1=_0x4ea0d3[_0x55a883])&&(_0x364484=_0x1ef8c1(_0x364484)||_0x364484);return _0x364484;},w=(_0x1d7258,_0x24b2c6)=>(_0x54f7da,_0x1b3e0b)=>_0x24b2c6(_0x54f7da,_0x1b3e0b,_0x1d7258),$=(_0x292084,_0x5898b5,_0x5a50b8)=>ne(_0x292084,typeof _0x5898b5!=_0x46caf4(0x1c1)?_0x5898b5+'':_0x5898b5,_0x5a50b8);let b=class extends _0x39a411{constructor(_0xfc6301=M,_0x5239a7,_0x3bb632){const _0x12d661=_0x46caf4;super(),this[_0x12d661(0x1aa)]=_0xfc6301,this[_0x12d661(0x19a)]=_0x5239a7,this[_0x12d661(0x172)]=_0x3bb632;const {..._0x3ce46b}=_0x45af3c({},M,this[_0x12d661(0x1aa)]);this[_0x12d661(0x172)][_0x12d661(0x1a3)](z,_0x3ce46b);}['onStarting'](){const _0x34cf71=_0x46caf4;[[f],[g],[S]][_0x34cf71(0x198)](_0x9e707d=>{const _0x29c075=_0x34cf71;this[_0x29c075(0x19a)][_0x29c075(0x166)](_0x9e707d);});}[_0x46caf4(0x19e)](){const _0x2e84d1=_0x46caf4;this[_0x2e84d1(0x19a)][_0x2e84d1(0x17b)](g),this[_0x2e84d1(0x19a)][_0x2e84d1(0x17b)](S);}};$(b,_0x46caf4(0x1c8),W),$(b,_0x46caf4(0x173),_0x53ace8[_0x46caf4(0x16a)]),b=ie([_0x3f3a3a(_0x1fa3df,_0x61bf1e,_0x19e690),w(0x1,_0x34f522(_0x1ce2b4)),w(0x2,_0x9f58b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x9b09(){const _0x200722=['type','_threadCommentModel','unitId','createTimestamp','pluginName','onStarting','_commentService','add','COMMENT','users','2JMFraH','resolveComment','delete','parse','rangeId','_config','/delete','Solve','getOwnPropertyDescriptor','forEach','_initDataSource','Delete','623ebChUF','comment','commentUpdate$','OpenOrReOpen','1040548JdnpcC','size','userId','slice','addUser','map','_configService','values','dataSource','disposeWithMe','code','_threadCommentDataSourceService','_sessionService','get','user','_userService','getMemberID','format','Unknown','/add','error','userID','/solved','/universer-api/user/list','5278388rTHpjU','69848OBHGoa','_injector','YYYY/MM/DD\x20HH:mm','content','find','threadId','UNRECOGNIZED','getComment','rangeType','onReady','symbol','syncUpdateMutationToColla','Edit','listComments','stringify','length','filter','personId','addComment','_httpService','updateComment','ref','replyId','body','UNIVER_UNKNOWN','getUnit','6002490mUaFPI','reply','Add','requireSession','subscribe','deleteComment','solved','Solved','3710200nZwJep','_threadCommentDataSource','_init','root','/edit','resolved','replies','15389523GsBShh','/reply','post','customRanges','parentId','Reply','2839293lugLGu','_initUserSync','/universer-api/comment/unit/'];_0x9b09=function(){return _0x200722;};return _0x9b09();}const _0x33b663=_0x5414;(function(_0x5c94f6,_0x3782e3){const _0x4fb804=_0x5414,_0x3edc83=_0x5c94f6();while(!![]){try{const _0xbdab8=-parseInt(_0x4fb804(0x8f))/0x1*(parseInt(_0x4fb804(0x7f))/0x2)+parseInt(_0x4fb804(0xd7))/0x3+-parseInt(_0x4fb804(0xa7))/0x4+parseInt(_0x4fb804(0xca))/0x5+-parseInt(_0x4fb804(0xc2))/0x6+parseInt(_0x4fb804(0x8b))/0x7*(parseInt(_0x4fb804(0xa8))/0x8)+parseInt(_0x4fb804(0xd1))/0x9;if(_0xbdab8===_0x3782e3)break;else _0x3edc83['push'](_0x3edc83['shift']());}catch(_0x4ccf36){_0x3edc83['push'](_0x3edc83['shift']());}}}(_0x9b09,0xc6f45));import{CommentService as _0x5292e3,CollaborationSessionService as _0x218050,UniverCollaborationClientPlugin as _0x3bf5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x377907}from'@univerjs-pro/license';import{dayjs as _0x467adf,UserManagerService as _0x92834c,Inject as _0x87e92,Injector as _0xd0cbaa,Disposable as _0x130674,CustomRangeType as _0x15c53f,UniverInstanceType as _0x440175,DependentOn as _0x4a2af0,IConfigService as _0x399a92,Plugin as _0xadfa01,merge as _0x901e41}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59df4e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1787fb,IThreadCommentDataSourceService as _0x5a8293}from'@univerjs/thread-comment';import{bufferTime as _0x52aba1}from'rxjs';import{HTTPService as _0x322cbd}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3669d0=>(_0x3669d0[_0x3669d0['OpenOrReOpen']=0x0]=_0x33b663(0x8e),_0x3669d0[_0x3669d0[_0x33b663(0xc9)]=0x1]='Solved',_0x3669d0[_0x3669d0['UNRECOGNIZED']=-0x1]=_0x33b663(0xae),_0x3669d0))(I||{}),v=(_0x136aed=>(_0x136aed[_0x136aed[_0x33b663(0xa1)]=0x0]=_0x33b663(0xa1),_0x136aed[_0x136aed[_0x33b663(0xc4)]=0x1]=_0x33b663(0xc4),_0x136aed[_0x136aed[_0x33b663(0xd6)]=0x2]=_0x33b663(0xd6),_0x136aed[_0x136aed[_0x33b663(0xb4)]=0x3]=_0x33b663(0xb4),_0x136aed[_0x136aed[_0x33b663(0x8a)]=0x4]=_0x33b663(0x8a),_0x136aed[_0x136aed[_0x33b663(0x86)]=0x5]=_0x33b663(0x86),_0x136aed[_0x136aed['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x136aed))(v||{});const D=_0x5071a1=>_0x467adf(new Date(+_0x5071a1))[_0x33b663(0xa0)](_0x33b663(0xaa)),B=async(_0xbe1c07,_0x4913fc)=>{const _0x3a5b97=_0x33b663,_0x32f913=_0xbe1c07[_0x3a5b97(0x9c)](_0x92834c),_0x34123f=_0xbe1c07[_0x3a5b97(0x9c)](_0x322cbd);_0x4913fc[_0x3a5b97(0x88)](_0x4660a2=>{const _0x359037=_0x3a5b97;_0x32f913['getUser'](_0x4660a2)&&_0x4913fc[_0x359037(0x81)](_0x4660a2);}),_0x4913fc[_0x3a5b97(0x90)]&&(await _0x34123f[_0x3a5b97(0x9c)](_0x3a5b97(0xa6),{'params':{'userIDs':[..._0x4913fc]}}))[_0x3a5b97(0xbf)][_0x3a5b97(0x7e)][_0x3a5b97(0x88)](_0x886a27=>{const _0x34590e=_0x3a5b97;_0x886a27&&_0x32f913[_0x34590e(0x93)](_0x886a27);});};var K=Object[_0x33b663(0x87)],V=(_0x4424bc,_0x19be63,_0x39479d,_0x4d229e)=>{const _0x883b48=_0x33b663;for(var _0x5b30fc=_0x4d229e>0x1?void 0x0:_0x4d229e?K(_0x19be63,_0x39479d):_0x19be63,_0x409fac=_0x4424bc[_0x883b48(0xb7)]-0x1,_0x4753fe;_0x409fac>=0x0;_0x409fac--)(_0x4753fe=_0x4424bc[_0x409fac])&&(_0x5b30fc=_0x4753fe(_0x5b30fc)||_0x5b30fc);return _0x5b30fc;},p=(_0x37f085,_0x293fb6)=>(_0x189c3d,_0x2f091e)=>_0x293fb6(_0x189c3d,_0x2f091e,_0x37f085);let S=class extends _0x130674{constructor(_0x4ceb2f,_0x2c4671,_0x2b83be,_0x52e7d4){const _0x44ee56=_0x33b663;super(),this[_0x44ee56(0x7b)]=_0x4ceb2f,this[_0x44ee56(0xdb)]=_0x2c4671,this['_userService']=_0x2b83be,this['_injector']=_0x52e7d4,this[_0x44ee56(0xcc)](),this[_0x44ee56(0xd8)]();}[_0x33b663(0xd8)](){const _0x25e390=_0x33b663;this[_0x25e390(0x98)](this[_0x25e390(0xdb)][_0x25e390(0x8d)]['pipe'](_0x52aba1(0x10))[_0x25e390(0xc6)](_0x12146c=>{const _0x2742ff=_0x25e390,_0x504a7f=new Set();_0x12146c[_0x2742ff(0x88)](_0x393332=>{const _0x49c0ec=_0x2742ff;switch(_0x393332[_0x49c0ec(0xda)]){case'add':{const _0x29672b=_0x393332['payload'][_0x49c0ec(0xb9)];_0x504a7f[_0x49c0ec(0x7c)](_0x29672b);break;}}}),B(this['_injector'],_0x504a7f);}));}[_0x33b663(0xcc)](){const _0x17f0c8=_0x33b663;this[_0x17f0c8(0x98)](this[_0x17f0c8(0x7b)][_0x17f0c8(0x8d)][_0x17f0c8(0xc6)](async _0x5332cf=>{const _0xb411bc=_0x17f0c8;var _0x21fd35,_0x395ee0,_0x51ed49,_0x1621e3;const _0xb87161=(_0x21fd35=this[_0xb411bc(0xdb)][_0xb411bc(0xc1)](_0x5332cf[_0xb411bc(0x77)])[_0xb411bc(0xac)](_0xe5d8a7=>_0xe5d8a7['threadId']===_0x5332cf[_0xb411bc(0xad)]))==null?void 0x0:_0x21fd35[_0xb411bc(0xcd)];if(!_0xb87161)return;const {unitId:_0x4c171c,subUnitId:_0x466abe}=_0xb87161;switch(_0x5332cf[_0xb411bc(0x9d)]&&this[_0xb411bc(0x9e)][_0xb411bc(0x93)](_0x5332cf[_0xb411bc(0x9d)]),_0x5332cf[_0xb411bc(0xda)]){case v[_0xb411bc(0xc4)]:break;case v[_0xb411bc(0xd6)]:{this[_0xb411bc(0xdb)][_0xb411bc(0xba)](_0x4c171c,_0x466abe,{'unitId':_0x4c171c,'subUnitId':_0x466abe,'ref':'','id':_0x5332cf[_0xb411bc(0xbe)],'dT':D(+_0x5332cf[_0xb411bc(0x78)]),'threadId':_0x5332cf['threadId'],'personId':(_0x51ed49=(_0x395ee0=_0x5332cf[_0xb411bc(0x9d)])==null?void 0x0:_0x395ee0['userID'])!=null?_0x51ed49:_0x5332cf[_0xb411bc(0x91)],'text':JSON[_0xb411bc(0x82)](_0x5332cf['content']),'parentId':_0xb87161['id']});break;}case v[_0xb411bc(0x8a)]:{const _0x2dfe1c=this[_0xb411bc(0xdb)][_0xb411bc(0xaf)](_0x4c171c,_0x466abe,_0x5332cf[_0xb411bc(0xbe)]);_0x2dfe1c&&_0x2dfe1c[_0xb411bc(0xd5)]&&this['_threadCommentModel'][_0xb411bc(0xc7)](_0x4c171c,_0x466abe,_0x5332cf[_0xb411bc(0xbe)]);break;}case v[_0xb411bc(0xb4)]:{this[_0xb411bc(0xdb)][_0xb411bc(0xbc)](_0x4c171c,_0x466abe,{'commentId':_0x5332cf[_0xb411bc(0xbe)],'text':JSON[_0xb411bc(0x82)](_0x5332cf[_0xb411bc(0xab)])});break;}case v['Solve']:{const _0x19b21f=(_0x1621e3=this['_threadCommentModel']['getUnit'](_0x5332cf[_0xb411bc(0x77)])[_0xb411bc(0xac)](_0xfce84a=>_0xfce84a[_0xb411bc(0xad)]===_0x5332cf[_0xb411bc(0xad)]))==null?void 0x0:_0x1621e3[_0xb411bc(0xcd)];_0x19b21f&&this[_0xb411bc(0xdb)]['resolveComment'](_0x4c171c,_0x466abe,_0x19b21f['id'],_0x5332cf[_0xb411bc(0xc8)]===I[_0xb411bc(0xc9)]);break;}}}));}};S=V([p(0x0,_0x87e92(_0x5292e3)),p(0x1,_0x87e92(_0x1787fb)),p(0x2,_0x87e92(_0x92834c)),p(0x3,_0x87e92(_0xd0cbaa))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2dc13f,_0x14dded,_0x1adb39,_0xe9a190)=>{const _0x198ab7=_0x33b663;for(var _0x2af37a=_0xe9a190>0x1?void 0x0:_0xe9a190?k(_0x14dded,_0x1adb39):_0x14dded,_0x218ff5=_0x2dc13f[_0x198ab7(0xb7)]-0x1,_0x29503c;_0x218ff5>=0x0;_0x218ff5--)(_0x29503c=_0x2dc13f[_0x218ff5])&&(_0x2af37a=_0x29503c(_0x2af37a)||_0x2af37a);return _0x2af37a;},_=(_0x4b7361,_0x50ae80)=>(_0x22f396,_0x180244)=>_0x50ae80(_0x22f396,_0x180244,_0x4b7361);function X(_0xc0d29b,_0x4c6dd5){const _0x247179=_0x33b663,_0x4b7f97=_0xc0d29b['replies'][0x0];return{..._0x4c6dd5,'id':_0x4b7f97[_0x247179(0xbe)],'resolved':_0xc0d29b[_0x247179(0xc8)]===0x1,'dT':D(_0x4b7f97[_0x247179(0x78)]),'personId':_0x4b7f97['userId'],'threadId':_0x4b7f97[_0x247179(0xad)]};}function ee(_0x18ece0,_0x37d729,_0x4e8771){const _0x14932b=_0x33b663;var _0x51134e,_0x19b8d4;if(((_0x19b8d4=(_0x51134e=_0x18ece0==null?void 0x0:_0x18ece0[_0x14932b(0xd0)])==null?void 0x0:_0x51134e['length'])!=null?_0x19b8d4:0x0)>0x0){const _0x4f99c5=(_0x3a090b,_0x5da370)=>({'id':_0x3a090b[_0x14932b(0xbe)],'threadId':_0x3a090b['threadId'],'dT':D(_0x3a090b[_0x14932b(0x78)]),'personId':_0x3a090b['userId'],'resolved':_0x18ece0[_0x14932b(0xc8)]===I[_0x14932b(0xc9)],'unitId':_0x37d729,'subUnitId':_0x4e8771,'text':JSON[_0x14932b(0x82)](_0x3a090b[_0x14932b(0xab)]),'parentId':_0x5da370}),_0x446a82=_0x4f99c5(_0x18ece0[_0x14932b(0xd0)][0x0]);return{..._0x446a82,'children':_0x18ece0[_0x14932b(0xd0)][_0x14932b(0x92)](0x1)['map'](_0x56ed32=>_0x4f99c5(_0x56ed32,_0x446a82['id']))};}return null;}function _0x5414(_0x5c0915,_0x47971c){const _0x9b0929=_0x9b09();return _0x5414=function(_0x541470,_0x531f26){_0x541470=_0x541470-0x77;let _0x4b0a80=_0x9b0929[_0x541470];return _0x4b0a80;},_0x5414(_0x5c0915,_0x47971c);}let f=class{constructor(_0x348d9b,_0x437d57,_0x3592f9,_0x11540d){const _0x55e5e9=_0x33b663;this['_httpService']=_0x348d9b,this['_userService']=_0x437d57,this[_0x55e5e9(0x9b)]=_0x3592f9,this['_injector']=_0x11540d;}async[_0x33b663(0xba)](_0x3cb239){const _0x242e4b=_0x33b663;var _0x53007d,_0x40add4;const {parentId:_0x4ee959,unitId:_0x1ebcf5,text:_0x45ce37,threadId:_0x13279a}=_0x3cb239,_0x1a86a0=(_0x40add4=(_0x53007d=_0x45ce37[_0x242e4b(0xd4)])==null?void 0x0:_0x53007d[_0x242e4b(0xb8)](_0x4760c8=>_0x4760c8[_0x242e4b(0xb0)]===_0x15c53f[_0x242e4b(0x7d)])[_0x242e4b(0x94)](_0x44595a=>_0x44595a[_0x242e4b(0x83)]))!=null?_0x40add4:[],_0x4b4e9b=JSON[_0x242e4b(0xb6)](_0x45ce37),_0x3763e6=(await this['_sessionService']['requireSession'](_0x1ebcf5))[_0x242e4b(0x9f)]();if(_0x4ee959){const _0x4c529d={'memberId':_0x3763e6,'unitId':_0x1ebcf5,'content':_0x4b4e9b,'mention':_0x1a86a0,'threadId':_0x13279a},_0x3c07e3=(await this[_0x242e4b(0xbb)][_0x242e4b(0xd3)](_0x242e4b(0xd9)+_0x1ebcf5+_0x242e4b(0xd2),{'body':_0x4c529d}))['body'][_0x242e4b(0xc3)];return{..._0x3cb239,'id':_0x3c07e3[_0x242e4b(0xbe)],'dT':_0x467adf(+_0x3c07e3[_0x242e4b(0x78)])[_0x242e4b(0xa0)](_0x242e4b(0xaa)),'personId':_0x3c07e3['userId']};}else{const _0x337074={'memberId':_0x3763e6,'unitId':_0x1ebcf5,'content':_0x4b4e9b,'mention':_0x1a86a0},_0x1877cf=await this[_0x242e4b(0xbb)]['post'](_0x242e4b(0xd9)+_0x1ebcf5+_0x242e4b(0xa2),{'body':_0x337074});return X(_0x1877cf[_0x242e4b(0xbf)][_0x242e4b(0x8c)],_0x3cb239);}}async['updateComment'](_0x371a7e){const _0x1fb5c3=_0x33b663;var _0x39d454,_0x3c6ebf;const {text:_0x45f09a,unitId:_0x5ddc63}=_0x371a7e,_0x2e3cfe=(_0x3c6ebf=(_0x39d454=_0x45f09a[_0x1fb5c3(0xd4)])==null?void 0x0:_0x39d454[_0x1fb5c3(0xb8)](_0x1daff7=>_0x1daff7[_0x1fb5c3(0xb0)]===_0x15c53f[_0x1fb5c3(0x7d)])[_0x1fb5c3(0x94)](_0x1eb4c4=>_0x1eb4c4[_0x1fb5c3(0x83)]))!=null?_0x3c6ebf:[],_0x45dacd=JSON[_0x1fb5c3(0xb6)](_0x45f09a),_0x4bd605=_0x371a7e[_0x1fb5c3(0xad)],_0x1460ed=_0x371a7e['id'],_0x9dede4={'memberId':(await this[_0x1fb5c3(0x9b)][_0x1fb5c3(0xc5)](_0x5ddc63))['getMemberID'](),'unitId':_0x5ddc63,'threadId':_0x4bd605,'mention':_0x2e3cfe,'content':_0x45dacd,'replyId':_0x1460ed},_0x42f2e6=await this[_0x1fb5c3(0xbb)]['post'](_0x1fb5c3(0xd9)+_0x5ddc63+_0x1fb5c3(0xce),{'body':_0x9dede4});return!_0x42f2e6['body'][_0x1fb5c3(0xa3)]||_0x42f2e6[_0x1fb5c3(0xbf)][_0x1fb5c3(0xa3)][_0x1fb5c3(0x99)]===0x1;}async[_0x33b663(0x80)](_0xddc587){const _0x20dd01=_0x33b663,{unitId:_0x328cad}=_0xddc587,_0x5ae0dd=_0xddc587[_0x20dd01(0xad)],_0x2e449={'memberId':this[_0x20dd01(0x9e)]['getCurrentUser']()[_0x20dd01(0xa4)],'unitId':_0x328cad,'threadId':_0x5ae0dd,'solved':_0xddc587[_0x20dd01(0xcf)]?I[_0x20dd01(0xc9)]:I[_0x20dd01(0x8e)]},_0x22a1de=await this[_0x20dd01(0xbb)][_0x20dd01(0xd3)](_0x20dd01(0xd9)+_0x328cad+_0x20dd01(0xa5),{'body':_0x2e449});return!_0x22a1de['body'][_0x20dd01(0xa3)]||_0x22a1de[_0x20dd01(0xbf)][_0x20dd01(0xa3)][_0x20dd01(0x99)]===0x1;}async[_0x33b663(0xc7)](_0x59d170,_0x51fb09,_0x3a7b35,_0x20e73d){const _0x416806=_0x33b663,_0x5b826e={'memberId':(await this['_sessionService'][_0x416806(0xc5)](_0x59d170))['getMemberID'](),'threadId':_0x3a7b35,'replyId':_0x20e73d,'unitId':_0x59d170},_0xa341f1=await this['_httpService'][_0x416806(0xd3)](_0x416806(0xd9)+_0x59d170+_0x416806(0x85),{'body':_0x5b826e});return!_0xa341f1[_0x416806(0xbf)][_0x416806(0xa3)]||_0xa341f1[_0x416806(0xbf)][_0x416806(0xa3)][_0x416806(0x99)]===0x1;}async[_0x33b663(0xb5)](_0x1dec01,_0x31e33e,_0x5a04c9){const _0x32a3d1=_0x33b663,_0x3cd848={'unitId':_0x1dec01,'threadId':_0x5a04c9},_0x3a78be=await this['_httpService'][_0x32a3d1(0xd3)](_0x32a3d1(0xd9)+_0x1dec01+'/list',{'body':_0x3cd848}),_0x1cd96f=_0x5a04c9['map'](_0x2e1684=>ee(_0x3a78be[_0x32a3d1(0xbf)]['comments'][_0x2e1684],_0x1dec01,_0x31e33e))[_0x32a3d1(0xb8)](Boolean);return Object[_0x32a3d1(0x96)](_0x3a78be[_0x32a3d1(0xbf)][_0x32a3d1(0x7e)])[_0x32a3d1(0x88)](_0xf1a02=>{const _0x477087=_0x32a3d1;this[_0x477087(0x9e)]['addUser'](_0xf1a02);}),_0x1cd96f;}['saveCommentToSnapshot'](_0x51b4e3){const _0x232f69=_0x33b663;return{'id':_0x51b4e3['id'],'threadId':_0x51b4e3[_0x232f69(0xad)],'ref':_0x51b4e3[_0x232f69(0xbd)]};}};f=Q([_(0x0,_0x87e92(_0x322cbd)),_(0x1,_0x87e92(_0x92834c)),_(0x2,_0x87e92(_0x218050)),_(0x3,_0x87e92(_0xd0cbaa))],f);var re=Object[_0x33b663(0x87)],te=(_0x5e5558,_0x2e08e0,_0x5dca7e,_0x285817)=>{const _0x280f05=_0x33b663;for(var _0x5d402d=_0x285817>0x1?void 0x0:_0x285817?re(_0x2e08e0,_0x5dca7e):_0x2e08e0,_0x446928=_0x5e5558[_0x280f05(0xb7)]-0x1,_0x130317;_0x446928>=0x0;_0x446928--)(_0x130317=_0x5e5558[_0x446928])&&(_0x5d402d=_0x130317(_0x5d402d)||_0x5d402d);return _0x5d402d;},N=(_0x1f9978,_0x173625)=>(_0x20987a,_0x53f4e0)=>_0x173625(_0x20987a,_0x53f4e0,_0x1f9978);let g=class extends _0x130674{constructor(_0x8acb77,_0xac0a20){const _0x4ccfe1=_0x33b663;super(),this[_0x4ccfe1(0x9a)]=_0x8acb77,this['_threadCommentDataSource']=_0xac0a20,this['_initDataSource']();}[_0x33b663(0x89)](){const _0x46a22d=_0x33b663;this[_0x46a22d(0x9a)][_0x46a22d(0x97)]=this[_0x46a22d(0xcb)],this[_0x46a22d(0x9a)][_0x46a22d(0xb3)]=!0x1;}};g=te([N(0x0,_0x5a8293),N(0x1,_0x87e92(f))],g);var se=Object['defineProperty'],oe=Object[_0x33b663(0x87)],ne=(_0x303fad,_0x252bda,_0x6e6eea)=>_0x252bda in _0x303fad?se(_0x303fad,_0x252bda,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6e6eea}):_0x303fad[_0x252bda]=_0x6e6eea,ie=(_0x1613e4,_0x38c692,_0x4e3337,_0x2a6ac1)=>{const _0x2b0eb2=_0x33b663;for(var _0x1cf47f=_0x2a6ac1>0x1?void 0x0:_0x2a6ac1?oe(_0x38c692,_0x4e3337):_0x38c692,_0x4d1a7c=_0x1613e4[_0x2b0eb2(0xb7)]-0x1,_0x3ccca3;_0x4d1a7c>=0x0;_0x4d1a7c--)(_0x3ccca3=_0x1613e4[_0x4d1a7c])&&(_0x1cf47f=_0x3ccca3(_0x1cf47f)||_0x1cf47f);return _0x1cf47f;},w=(_0x4fefda,_0x1c30b7)=>(_0x16cffd,_0x5259ec)=>_0x1c30b7(_0x16cffd,_0x5259ec,_0x4fefda),$=(_0x1c885e,_0x320605,_0xd78288)=>ne(_0x1c885e,typeof _0x320605!=_0x33b663(0xb2)?_0x320605+'':_0x320605,_0xd78288);let b=class extends _0xadfa01{constructor(_0x14b42f=M,_0xb00bb6,_0x22ab7b){const _0xd08ce6=_0x33b663;super(),this[_0xd08ce6(0x84)]=_0x14b42f,this[_0xd08ce6(0xa9)]=_0xb00bb6,this[_0xd08ce6(0x95)]=_0x22ab7b;const {..._0x73c8bd}=_0x901e41({},M,this[_0xd08ce6(0x84)]);this['_configService']['setConfig'](z,_0x73c8bd);}[_0x33b663(0x7a)](){[[f],[g],[S]]['forEach'](_0xb5bc68=>{const _0x20802c=_0x5414;this[_0x20802c(0xa9)]['add'](_0xb5bc68);});}[_0x33b663(0xb1)](){const _0x459103=_0x33b663;this['_injector']['get'](g),this[_0x459103(0xa9)][_0x459103(0x9c)](S);}};$(b,_0x33b663(0x79),W),$(b,'type',_0x440175[_0x33b663(0xc0)]),b=ie([_0x4a2af0(_0x59df4e,_0x3bf5fb,_0x377907),w(0x1,_0x87e92(_0xd0cbaa)),w(0x2,_0x399a92)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x46caf4=_0x2d35;(function(_0x3d8aff,_0x1702fb){const _0x4ac3a7=_0x2d35,_0x125092=_0x3d8aff();while(!![]){try{const _0xa81c80=parseInt(_0x4ac3a7(0x1bf))/0x1*(parseInt(_0x4ac3a7(0x1a6))/0x2)+parseInt(_0x4ac3a7(0x17e))/0x3+-parseInt(_0x4ac3a7(0x1a2))/0x4*(parseInt(_0x4ac3a7(0x185))/0x5)+parseInt(_0x4ac3a7(0x1b0))/0x6*(parseInt(_0x4ac3a7(0x1bd))/0x7)+-parseInt(_0x4ac3a7(0x18d))/0x8*(-parseInt(_0x4ac3a7(0x1c5))/0x9)+parseInt(_0x4ac3a7(0x183))/0xa+-parseInt(_0x4ac3a7(0x1c6))/0xb*(-parseInt(_0x4ac3a7(0x1ac))/0xc);if(_0xa81c80===_0x1702fb)break;else _0x125092['push'](_0x125092['shift']());}catch(_0x1be958){_0x125092['push'](_0x125092['shift']());}}}(_0x5f07,0xbde74));import{CommentService as _0x225520,CollaborationSessionService as _0x4ce229,UniverCollaborationClientPlugin as _0x61bf1e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x19e690}from'@univerjs-pro/license';function _0x2d35(_0x28bce9,_0x2abd21){const _0x5f072d=_0x5f07();return _0x2d35=function(_0x2d3553,_0x2801cc){_0x2d3553=_0x2d3553-0x165;let _0x4e1289=_0x5f072d[_0x2d3553];return _0x4e1289;},_0x2d35(_0x28bce9,_0x2abd21);}import{dayjs as _0x45436d,UserManagerService as _0x589a84,Inject as _0x34f522,Injector as _0x1ce2b4,Disposable as _0x48842b,CustomRangeType as _0x4d170c,UniverInstanceType as _0x53ace8,DependentOn as _0x3f3a3a,IConfigService as _0x9f58b,Plugin as _0x39a411,merge as _0x45af3c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1fa3df}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c91f1,IThreadCommentDataSourceService as _0x197300}from'@univerjs/thread-comment';function _0x5f07(){const _0x12039b=['payload','requireSession','get','Edit','/reply','1127436VVGikP','rangeId','Solved','defineProperty','updateComment','10766320ZRbPYR','post','180cGxAZk','getCurrentUser','/universer-api/user/list','rangeType','_initDataSource','_init','code','_commentService','1968GxEFuD','syncUpdateMutationToColla','map','_threadCommentDataSource','COMMENT','subscribe','reply','customRanges','parse','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','user','_injector','userId','threadId','solved','onReady','_sessionService','comments','resolveComment','140552EgAEkZ','setConfig','Add','_initUserSync','30rirIIU','deleteComment','_threadCommentModel','listComments','_config','UNRECOGNIZED','6624tLERyx','_threadCommentDataSourceService','content','/universer-api/comment/unit/','12234PLOGUy','delete','getMemberID','userID','/solved','addUser','root','getUnit','length','error','OpenOrReOpen','getComment','stringify','791yaRVnD','unitId','4901qtgoLq','YYYY/MM/DD\x20HH:mm','symbol','comment','values','Unknown','3573ewhrLO','3762cizWIH','/edit','pluginName','Reply','filter','addComment','_userService','add','replies','Delete','size','UNIVER_UNKNOWN','body','replyId','disposeWithMe','commentUpdate$','users','getOwnPropertyDescriptor','_httpService','_configService','type','slice','Solve','parentId','/delete','createTimestamp'];_0x5f07=function(){return _0x12039b;};return _0x5f07();}import{bufferTime as _0xf37482}from'rxjs';import{HTTPService as _0x2066d0}from'@univerjs/network';const W=_0x46caf4(0x197);var I=(_0x1a8496=>(_0x1a8496[_0x1a8496[_0x46caf4(0x1ba)]=0x0]=_0x46caf4(0x1ba),_0x1a8496[_0x1a8496['Solved']=0x1]=_0x46caf4(0x180),_0x1a8496[_0x1a8496[_0x46caf4(0x1ab)]=-0x1]=_0x46caf4(0x1ab),_0x1a8496))(I||{}),v=(_0x4e9095=>(_0x4e9095[_0x4e9095[_0x46caf4(0x1c4)]=0x0]=_0x46caf4(0x1c4),_0x4e9095[_0x4e9095['Add']=0x1]='Add',_0x4e9095[_0x4e9095[_0x46caf4(0x1c9)]=0x2]=_0x46caf4(0x1c9),_0x4e9095[_0x4e9095[_0x46caf4(0x17c)]=0x3]=_0x46caf4(0x17c),_0x4e9095[_0x4e9095[_0x46caf4(0x168)]=0x4]=_0x46caf4(0x168),_0x4e9095[_0x4e9095[_0x46caf4(0x175)]=0x5]=_0x46caf4(0x175),_0x4e9095[_0x4e9095[_0x46caf4(0x1ab)]=-0x1]=_0x46caf4(0x1ab),_0x4e9095))(v||{});const D=_0x67f80=>_0x45436d(new Date(+_0x67f80))['format'](_0x46caf4(0x1c0)),B=async(_0x3ac7cc,_0x40b3f3)=>{const _0x3440cc=_0x46caf4,_0x238a6a=_0x3ac7cc['get'](_0x589a84),_0x36ff5f=_0x3ac7cc['get'](_0x2066d0);_0x40b3f3[_0x3440cc(0x198)](_0x423b0d=>{const _0x55b80d=_0x3440cc;_0x238a6a['getUser'](_0x423b0d)&&_0x40b3f3[_0x55b80d(0x1b1)](_0x423b0d);}),_0x40b3f3[_0x3440cc(0x169)]&&(await _0x36ff5f['get'](_0x3440cc(0x187),{'params':{'userIDs':[..._0x40b3f3]}}))[_0x3440cc(0x16b)][_0x3440cc(0x16f)]['forEach'](_0x211231=>{_0x211231&&_0x238a6a['addUser'](_0x211231);});};var K=Object[_0x46caf4(0x170)],V=(_0x270d6e,_0x51a48b,_0x594e94,_0x5ab02d)=>{const _0x22b375=_0x46caf4;for(var _0x47e6d0=_0x5ab02d>0x1?void 0x0:_0x5ab02d?K(_0x51a48b,_0x594e94):_0x51a48b,_0x17af35=_0x270d6e[_0x22b375(0x1b8)]-0x1,_0x4ce0ed;_0x17af35>=0x0;_0x17af35--)(_0x4ce0ed=_0x270d6e[_0x17af35])&&(_0x47e6d0=_0x4ce0ed(_0x47e6d0)||_0x47e6d0);return _0x47e6d0;},p=(_0x409744,_0x48f8af)=>(_0x3f80bb,_0x5ea0b1)=>_0x48f8af(_0x3f80bb,_0x5ea0b1,_0x409744);let S=class extends _0x48842b{constructor(_0x572d77,_0x560f79,_0x18508a,_0xde8079){const _0x25966b=_0x46caf4;super(),this[_0x25966b(0x18c)]=_0x572d77,this[_0x25966b(0x1a8)]=_0x560f79,this[_0x25966b(0x165)]=_0x18508a,this[_0x25966b(0x19a)]=_0xde8079,this[_0x25966b(0x18a)](),this[_0x25966b(0x1a5)]();}[_0x46caf4(0x1a5)](){const _0x51e9b6=_0x46caf4;this[_0x51e9b6(0x16d)](this[_0x51e9b6(0x1a8)][_0x51e9b6(0x16e)]['pipe'](_0xf37482(0x10))[_0x51e9b6(0x192)](_0x1de954=>{const _0x3d85df=_0x51e9b6,_0x105a83=new Set();_0x1de954[_0x3d85df(0x198)](_0x463b76=>{const _0x41c229=_0x3d85df;switch(_0x463b76[_0x41c229(0x173)]){case _0x41c229(0x166):{const _0xb5b710=_0x463b76[_0x41c229(0x179)]['personId'];_0x105a83['add'](_0xb5b710);break;}}}),B(this[_0x3d85df(0x19a)],_0x105a83);}));}[_0x46caf4(0x18a)](){const _0x54051a=_0x46caf4;this[_0x54051a(0x16d)](this[_0x54051a(0x18c)][_0x54051a(0x16e)][_0x54051a(0x192)](async _0x46d6c2=>{const _0x2d4bd1=_0x54051a;var _0x11785a,_0x9c97a5,_0x3610a0,_0x3ba5e9;const _0x31fbf5=(_0x11785a=this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1b7)](_0x46d6c2[_0x2d4bd1(0x1be)])['find'](_0x2aafd1=>_0x2aafd1[_0x2d4bd1(0x19c)]===_0x46d6c2[_0x2d4bd1(0x19c)]))==null?void 0x0:_0x11785a[_0x2d4bd1(0x1b6)];if(!_0x31fbf5)return;const {unitId:_0x344268,subUnitId:_0x4ca567}=_0x31fbf5;switch(_0x46d6c2[_0x2d4bd1(0x199)]&&this[_0x2d4bd1(0x165)][_0x2d4bd1(0x1b5)](_0x46d6c2[_0x2d4bd1(0x199)]),_0x46d6c2[_0x2d4bd1(0x173)]){case v[_0x2d4bd1(0x1a4)]:break;case v[_0x2d4bd1(0x1c9)]:{this[_0x2d4bd1(0x1a8)]['addComment'](_0x344268,_0x4ca567,{'unitId':_0x344268,'subUnitId':_0x4ca567,'ref':'','id':_0x46d6c2[_0x2d4bd1(0x16c)],'dT':D(+_0x46d6c2[_0x2d4bd1(0x178)]),'threadId':_0x46d6c2[_0x2d4bd1(0x19c)],'personId':(_0x3610a0=(_0x9c97a5=_0x46d6c2['user'])==null?void 0x0:_0x9c97a5[_0x2d4bd1(0x1b3)])!=null?_0x3610a0:_0x46d6c2[_0x2d4bd1(0x19b)],'text':JSON['parse'](_0x46d6c2['content']),'parentId':_0x31fbf5['id']});break;}case v['Delete']:{const _0x180324=this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1bb)](_0x344268,_0x4ca567,_0x46d6c2['replyId']);_0x180324&&_0x180324[_0x2d4bd1(0x176)]&&this['_threadCommentModel'][_0x2d4bd1(0x1a7)](_0x344268,_0x4ca567,_0x46d6c2['replyId']);break;}case v[_0x2d4bd1(0x17c)]:{this['_threadCommentModel'][_0x2d4bd1(0x182)](_0x344268,_0x4ca567,{'commentId':_0x46d6c2[_0x2d4bd1(0x16c)],'text':JSON['parse'](_0x46d6c2[_0x2d4bd1(0x1ae)])});break;}case v[_0x2d4bd1(0x175)]:{const _0x2ffcfc=(_0x3ba5e9=this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1b7)](_0x46d6c2[_0x2d4bd1(0x1be)])['find'](_0xedcd92=>_0xedcd92['threadId']===_0x46d6c2['threadId']))==null?void 0x0:_0x3ba5e9[_0x2d4bd1(0x1b6)];_0x2ffcfc&&this[_0x2d4bd1(0x1a8)][_0x2d4bd1(0x1a1)](_0x344268,_0x4ca567,_0x2ffcfc['id'],_0x46d6c2[_0x2d4bd1(0x19d)]===I[_0x2d4bd1(0x180)]);break;}}}));}};S=V([p(0x0,_0x34f522(_0x225520)),p(0x1,_0x34f522(_0x2c91f1)),p(0x2,_0x34f522(_0x589a84)),p(0x3,_0x34f522(_0x1ce2b4))],S);const z=_0x46caf4(0x196),M={};var k=Object[_0x46caf4(0x170)],Q=(_0x27c67b,_0x2c9383,_0x49e130,_0x5ef8e8)=>{const _0x581320=_0x46caf4;for(var _0x2b29ef=_0x5ef8e8>0x1?void 0x0:_0x5ef8e8?k(_0x2c9383,_0x49e130):_0x2c9383,_0x55ebae=_0x27c67b[_0x581320(0x1b8)]-0x1,_0xaedf98;_0x55ebae>=0x0;_0x55ebae--)(_0xaedf98=_0x27c67b[_0x55ebae])&&(_0x2b29ef=_0xaedf98(_0x2b29ef)||_0x2b29ef);return _0x2b29ef;},_=(_0x5cfd39,_0xaf7adf)=>(_0x285c1e,_0x4410c3)=>_0xaf7adf(_0x285c1e,_0x4410c3,_0x5cfd39);function X(_0x370cf4,_0x2f415c){const _0x434a92=_0x46caf4,_0x419f2a=_0x370cf4[_0x434a92(0x167)][0x0];return{..._0x2f415c,'id':_0x419f2a['replyId'],'resolved':_0x370cf4['solved']===0x1,'dT':D(_0x419f2a[_0x434a92(0x178)]),'personId':_0x419f2a[_0x434a92(0x19b)],'threadId':_0x419f2a[_0x434a92(0x19c)]};}function ee(_0x370b7c,_0x2f0d54,_0x43ef5e){const _0x53144d=_0x46caf4;var _0x18cf40,_0x3b10c7;if(((_0x3b10c7=(_0x18cf40=_0x370b7c==null?void 0x0:_0x370b7c[_0x53144d(0x167)])==null?void 0x0:_0x18cf40[_0x53144d(0x1b8)])!=null?_0x3b10c7:0x0)>0x0){const _0xd2236a=(_0x11512f,_0x47e62a)=>({'id':_0x11512f[_0x53144d(0x16c)],'threadId':_0x11512f[_0x53144d(0x19c)],'dT':D(_0x11512f[_0x53144d(0x178)]),'personId':_0x11512f[_0x53144d(0x19b)],'resolved':_0x370b7c[_0x53144d(0x19d)]===I[_0x53144d(0x180)],'unitId':_0x2f0d54,'subUnitId':_0x43ef5e,'text':JSON[_0x53144d(0x195)](_0x11512f['content']),'parentId':_0x47e62a}),_0x49a524=_0xd2236a(_0x370b7c[_0x53144d(0x167)][0x0]);return{..._0x49a524,'children':_0x370b7c[_0x53144d(0x167)][_0x53144d(0x174)](0x1)[_0x53144d(0x18f)](_0x505bbd=>_0xd2236a(_0x505bbd,_0x49a524['id']))};}return null;}let f=class{constructor(_0x53e050,_0xce4dcf,_0x15b234,_0x312798){const _0xe12a6f=_0x46caf4;this['_httpService']=_0x53e050,this[_0xe12a6f(0x165)]=_0xce4dcf,this['_sessionService']=_0x15b234,this[_0xe12a6f(0x19a)]=_0x312798;}async[_0x46caf4(0x1cb)](_0x3d5998){const _0x3f5ffb=_0x46caf4;var _0x7ae77d,_0x407807;const {parentId:_0x3040f4,unitId:_0x45dda4,text:_0x3d8495,threadId:_0x56c05e}=_0x3d5998,_0x3db76f=(_0x407807=(_0x7ae77d=_0x3d8495[_0x3f5ffb(0x194)])==null?void 0x0:_0x7ae77d[_0x3f5ffb(0x1ca)](_0x4d9c53=>_0x4d9c53[_0x3f5ffb(0x188)]===_0x4d170c[_0x3f5ffb(0x191)])[_0x3f5ffb(0x18f)](_0x221c4f=>_0x221c4f[_0x3f5ffb(0x17f)]))!=null?_0x407807:[],_0x3b0e36=JSON[_0x3f5ffb(0x1bc)](_0x3d8495),_0x4e2377=(await this[_0x3f5ffb(0x19f)][_0x3f5ffb(0x17a)](_0x45dda4))['getMemberID']();if(_0x3040f4){const _0x4e8584={'memberId':_0x4e2377,'unitId':_0x45dda4,'content':_0x3b0e36,'mention':_0x3db76f,'threadId':_0x56c05e},_0x19c1fc=(await this['_httpService'][_0x3f5ffb(0x184)](_0x3f5ffb(0x1af)+_0x45dda4+_0x3f5ffb(0x17d),{'body':_0x4e8584}))[_0x3f5ffb(0x16b)][_0x3f5ffb(0x193)];return{..._0x3d5998,'id':_0x19c1fc[_0x3f5ffb(0x16c)],'dT':_0x45436d(+_0x19c1fc[_0x3f5ffb(0x178)])['format'](_0x3f5ffb(0x1c0)),'personId':_0x19c1fc[_0x3f5ffb(0x19b)]};}else{const _0x3c5c4b={'memberId':_0x4e2377,'unitId':_0x45dda4,'content':_0x3b0e36,'mention':_0x3db76f},_0x273de2=await this[_0x3f5ffb(0x171)][_0x3f5ffb(0x184)](_0x3f5ffb(0x1af)+_0x45dda4+'/add',{'body':_0x3c5c4b});return X(_0x273de2[_0x3f5ffb(0x16b)][_0x3f5ffb(0x1c2)],_0x3d5998);}}async['updateComment'](_0x3e20f5){const _0x4c4b31=_0x46caf4;var _0x22af3d,_0x3130b8;const {text:_0x3f9eb1,unitId:_0x5792da}=_0x3e20f5,_0x3c3a47=(_0x3130b8=(_0x22af3d=_0x3f9eb1[_0x4c4b31(0x194)])==null?void 0x0:_0x22af3d[_0x4c4b31(0x1ca)](_0x1778dd=>_0x1778dd[_0x4c4b31(0x188)]===_0x4d170c[_0x4c4b31(0x191)])['map'](_0x4cb864=>_0x4cb864[_0x4c4b31(0x17f)]))!=null?_0x3130b8:[],_0x67a065=JSON[_0x4c4b31(0x1bc)](_0x3f9eb1),_0x4d3241=_0x3e20f5['threadId'],_0x422654=_0x3e20f5['id'],_0x4dafcf={'memberId':(await this[_0x4c4b31(0x19f)][_0x4c4b31(0x17a)](_0x5792da))[_0x4c4b31(0x1b2)](),'unitId':_0x5792da,'threadId':_0x4d3241,'mention':_0x3c3a47,'content':_0x67a065,'replyId':_0x422654},_0x1409a7=await this['_httpService'][_0x4c4b31(0x184)](_0x4c4b31(0x1af)+_0x5792da+_0x4c4b31(0x1c7),{'body':_0x4dafcf});return!_0x1409a7[_0x4c4b31(0x16b)][_0x4c4b31(0x1b9)]||_0x1409a7[_0x4c4b31(0x16b)]['error']['code']===0x1;}async[_0x46caf4(0x1a1)](_0x1849fc){const _0x3a2fff=_0x46caf4,{unitId:_0x444c15}=_0x1849fc,_0x34a4f3=_0x1849fc[_0x3a2fff(0x19c)],_0x3971ae={'memberId':this[_0x3a2fff(0x165)][_0x3a2fff(0x186)]()['userID'],'unitId':_0x444c15,'threadId':_0x34a4f3,'solved':_0x1849fc['resolved']?I[_0x3a2fff(0x180)]:I[_0x3a2fff(0x1ba)]},_0x334cb6=await this['_httpService']['post'](_0x3a2fff(0x1af)+_0x444c15+_0x3a2fff(0x1b4),{'body':_0x3971ae});return!_0x334cb6[_0x3a2fff(0x16b)][_0x3a2fff(0x1b9)]||_0x334cb6[_0x3a2fff(0x16b)][_0x3a2fff(0x1b9)][_0x3a2fff(0x18b)]===0x1;}async[_0x46caf4(0x1a7)](_0x1f9cda,_0x571f88,_0x3f18f9,_0x6b01d9){const _0x2fed2b=_0x46caf4,_0x2aaefe={'memberId':(await this[_0x2fed2b(0x19f)][_0x2fed2b(0x17a)](_0x1f9cda))['getMemberID'](),'threadId':_0x3f18f9,'replyId':_0x6b01d9,'unitId':_0x1f9cda},_0x296ca2=await this[_0x2fed2b(0x171)][_0x2fed2b(0x184)]('/universer-api/comment/unit/'+_0x1f9cda+_0x2fed2b(0x177),{'body':_0x2aaefe});return!_0x296ca2['body'][_0x2fed2b(0x1b9)]||_0x296ca2[_0x2fed2b(0x16b)][_0x2fed2b(0x1b9)][_0x2fed2b(0x18b)]===0x1;}async[_0x46caf4(0x1a9)](_0x351caf,_0x4a2126,_0x3952a5){const _0x1ea2b7=_0x46caf4,_0x4c921f={'unitId':_0x351caf,'threadId':_0x3952a5},_0x1712aa=await this[_0x1ea2b7(0x171)][_0x1ea2b7(0x184)]('/universer-api/comment/unit/'+_0x351caf+'/list',{'body':_0x4c921f}),_0x423d1f=_0x3952a5['map'](_0x2b4bfe=>ee(_0x1712aa['body'][_0x1ea2b7(0x1a0)][_0x2b4bfe],_0x351caf,_0x4a2126))['filter'](Boolean);return Object[_0x1ea2b7(0x1c3)](_0x1712aa['body'][_0x1ea2b7(0x16f)])[_0x1ea2b7(0x198)](_0x4f423c=>{const _0xad95db=_0x1ea2b7;this[_0xad95db(0x165)][_0xad95db(0x1b5)](_0x4f423c);}),_0x423d1f;}['saveCommentToSnapshot'](_0x5d8497){const _0x273b8e=_0x46caf4;return{'id':_0x5d8497['id'],'threadId':_0x5d8497[_0x273b8e(0x19c)],'ref':_0x5d8497['ref']};}};f=Q([_(0x0,_0x34f522(_0x2066d0)),_(0x1,_0x34f522(_0x589a84)),_(0x2,_0x34f522(_0x4ce229)),_(0x3,_0x34f522(_0x1ce2b4))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x14f5c1,_0x374e4a,_0xf7dcd8,_0x210cea)=>{const _0x4f617e=_0x46caf4;for(var _0x216cf0=_0x210cea>0x1?void 0x0:_0x210cea?re(_0x374e4a,_0xf7dcd8):_0x374e4a,_0x3481d0=_0x14f5c1[_0x4f617e(0x1b8)]-0x1,_0x30d3c6;_0x3481d0>=0x0;_0x3481d0--)(_0x30d3c6=_0x14f5c1[_0x3481d0])&&(_0x216cf0=_0x30d3c6(_0x216cf0)||_0x216cf0);return _0x216cf0;},N=(_0x3f18bd,_0x2a769d)=>(_0x3020f6,_0x4c33fd)=>_0x2a769d(_0x3020f6,_0x4c33fd,_0x3f18bd);let g=class extends _0x48842b{constructor(_0x38dafc,_0x3626e5){const _0x476dbf=_0x46caf4;super(),this[_0x476dbf(0x1ad)]=_0x38dafc,this[_0x476dbf(0x190)]=_0x3626e5,this[_0x476dbf(0x189)]();}[_0x46caf4(0x189)](){const _0x3a8a5c=_0x46caf4;this['_threadCommentDataSourceService']['dataSource']=this[_0x3a8a5c(0x190)],this['_threadCommentDataSourceService'][_0x3a8a5c(0x18e)]=!0x1;}};g=te([N(0x0,_0x197300),N(0x1,_0x34f522(f))],g);var se=Object[_0x46caf4(0x181)],oe=Object[_0x46caf4(0x170)],ne=(_0x348437,_0x4f7a96,_0x31e921)=>_0x4f7a96 in _0x348437?se(_0x348437,_0x4f7a96,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31e921}):_0x348437[_0x4f7a96]=_0x31e921,ie=(_0x4ea0d3,_0x2fe1a1,_0x59aa9b,_0x1d39b9)=>{for(var _0x364484=_0x1d39b9>0x1?void 0x0:_0x1d39b9?oe(_0x2fe1a1,_0x59aa9b):_0x2fe1a1,_0x55a883=_0x4ea0d3['length']-0x1,_0x1ef8c1;_0x55a883>=0x0;_0x55a883--)(_0x1ef8c1=_0x4ea0d3[_0x55a883])&&(_0x364484=_0x1ef8c1(_0x364484)||_0x364484);return _0x364484;},w=(_0x1d7258,_0x24b2c6)=>(_0x54f7da,_0x1b3e0b)=>_0x24b2c6(_0x54f7da,_0x1b3e0b,_0x1d7258),$=(_0x292084,_0x5898b5,_0x5a50b8)=>ne(_0x292084,typeof _0x5898b5!=_0x46caf4(0x1c1)?_0x5898b5+'':_0x5898b5,_0x5a50b8);let b=class extends _0x39a411{constructor(_0xfc6301=M,_0x5239a7,_0x3bb632){const _0x12d661=_0x46caf4;super(),this[_0x12d661(0x1aa)]=_0xfc6301,this[_0x12d661(0x19a)]=_0x5239a7,this[_0x12d661(0x172)]=_0x3bb632;const {..._0x3ce46b}=_0x45af3c({},M,this[_0x12d661(0x1aa)]);this[_0x12d661(0x172)][_0x12d661(0x1a3)](z,_0x3ce46b);}['onStarting'](){const _0x34cf71=_0x46caf4;[[f],[g],[S]][_0x34cf71(0x198)](_0x9e707d=>{const _0x29c075=_0x34cf71;this[_0x29c075(0x19a)][_0x29c075(0x166)](_0x9e707d);});}[_0x46caf4(0x19e)](){const _0x2e84d1=_0x46caf4;this[_0x2e84d1(0x19a)][_0x2e84d1(0x17b)](g),this[_0x2e84d1(0x19a)][_0x2e84d1(0x17b)](S);}};$(b,_0x46caf4(0x1c8),W),$(b,_0x46caf4(0x173),_0x53ace8[_0x46caf4(0x16a)]),b=ie([_0x3f3a3a(_0x1fa3df,_0x61bf1e,_0x19e690),w(0x1,_0x34f522(_0x1ce2b4)),w(0x2,_0x9f58b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x378acf,_0x5c3385){const _0x3705c7=_0x259c,_0x8ab990=_0x378acf();while(!![]){try{const _0x17cd61=-parseInt(_0x3705c7(0x170))/0x1*(parseInt(_0x3705c7(0x181))/0x2)+-parseInt(_0x3705c7(0x130))/0x3*(-parseInt(_0x3705c7(0x16b))/0x4)+parseInt(_0x3705c7(0x15d))/0x5+parseInt(_0x3705c7(0x134))/0x6+-parseInt(_0x3705c7(0x103))/0x7*(-parseInt(_0x3705c7(0x13d))/0x8)+-parseInt(_0x3705c7(0x135))/0x9*(-parseInt(_0x3705c7(0x114))/0xa)+-parseInt(_0x3705c7(0x14d))/0xb;if(_0x17cd61===_0x5c3385)break;else _0x8ab990['push'](_0x8ab990['shift']());}catch(_0x2328af){_0x8ab990['push'](_0x8ab990['shift']());}}}(_0x5c32,0x2f3dd),function(_0x53979d,_0x42d81b){const _0x5c8b00=_0x259c;typeof exports==_0x5c8b00(0x14c)&&typeof module<'u'?_0x42d81b(exports,require(_0x5c8b00(0x12b)),require('@univerjs-pro/license'),require(_0x5c8b00(0x11a)),require(_0x5c8b00(0x140)),require(_0x5c8b00(0x169)),require('rxjs'),require(_0x5c8b00(0x13c))):typeof define==_0x5c8b00(0x16f)&&define['amd']?define([_0x5c8b00(0x17e),_0x5c8b00(0x12b),_0x5c8b00(0x15f),_0x5c8b00(0x11a),'@univerjs/thread-comment-ui','@univerjs/thread-comment',_0x5c8b00(0x128),_0x5c8b00(0x13c)],_0x42d81b):(_0x53979d=typeof globalThis<'u'?globalThis:_0x53979d||self,_0x42d81b(_0x53979d['UniverProThreadCommentDatasource']={},_0x53979d[_0x5c8b00(0x142)],_0x53979d[_0x5c8b00(0x119)],_0x53979d[_0x5c8b00(0x12e)],_0x53979d[_0x5c8b00(0x15c)],_0x53979d[_0x5c8b00(0x17b)],_0x53979d[_0x5c8b00(0x128)],_0x53979d[_0x5c8b00(0x155)]));}(this,function(_0x105b6d,_0x500a5e,_0x9b5869,_0x5aa547,_0xd7a9a8,_0x1a2483,_0x42e939,_0x49d8a4){'use strict';const _0xe7a046=_0x259c;const _0x2ba77d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1a812e=(_0x10f935=>(_0x10f935[_0x10f935[_0xe7a046(0x17f)]=0x0]=_0xe7a046(0x17f),_0x10f935[_0x10f935[_0xe7a046(0x14a)]=0x1]=_0xe7a046(0x14a),_0x10f935[_0x10f935[_0xe7a046(0x159)]=-0x1]=_0xe7a046(0x159),_0x10f935))(_0x1a812e||{}),_0x4e3bfb=(_0x302694=>(_0x302694[_0x302694[_0xe7a046(0x10f)]=0x0]=_0xe7a046(0x10f),_0x302694[_0x302694[_0xe7a046(0x10a)]=0x1]=_0xe7a046(0x10a),_0x302694[_0x302694[_0xe7a046(0x138)]=0x2]='Reply',_0x302694[_0x302694[_0xe7a046(0x188)]=0x3]=_0xe7a046(0x188),_0x302694[_0x302694['Delete']=0x4]=_0xe7a046(0x16e),_0x302694[_0x302694[_0xe7a046(0x18b)]=0x5]=_0xe7a046(0x18b),_0x302694[_0x302694[_0xe7a046(0x159)]=-0x1]=_0xe7a046(0x159),_0x302694))(_0x4e3bfb||{});const _0x3690e2=_0x35a560=>_0x5aa547[_0xe7a046(0x182)](new Date(+_0x35a560))[_0xe7a046(0x180)]('YYYY/MM/DD\x20HH:mm'),_0x19c18b=async(_0x38fdad,_0x195bb5)=>{const _0x1240ef=_0xe7a046,_0x4c86b5=_0x38fdad[_0x1240ef(0x13b)](_0x5aa547[_0x1240ef(0x172)]),_0x7a6c2b=_0x38fdad[_0x1240ef(0x13b)](_0x49d8a4['HTTPService']);_0x195bb5[_0x1240ef(0x146)](_0x280e1e=>{const _0x4ec1f1=_0x1240ef;_0x4c86b5[_0x4ec1f1(0x178)](_0x280e1e)&&_0x195bb5[_0x4ec1f1(0x116)](_0x280e1e);}),_0x195bb5[_0x1240ef(0x153)]&&(await _0x7a6c2b[_0x1240ef(0x13b)](_0x1240ef(0x144),{'params':{'userIDs':[..._0x195bb5]}}))['body'][_0x1240ef(0x16d)][_0x1240ef(0x146)](_0x586c76=>{const _0x5486a5=_0x1240ef;_0x586c76&&_0x4c86b5[_0x5486a5(0x13a)](_0x586c76);});};var _0x4ce023=Object[_0xe7a046(0x15e)],_0x1ad0fd=(_0x228e84,_0x247900,_0x5a326c,_0x1fb923)=>{const _0x3cc239=_0xe7a046;for(var _0x380b88=_0x1fb923>0x1?void 0x0:_0x1fb923?_0x4ce023(_0x247900,_0x5a326c):_0x247900,_0x551cfd=_0x228e84[_0x3cc239(0x11e)]-0x1,_0x20a5d0;_0x551cfd>=0x0;_0x551cfd--)(_0x20a5d0=_0x228e84[_0x551cfd])&&(_0x380b88=_0x20a5d0(_0x380b88)||_0x380b88);return _0x380b88;},_0x322919=(_0x429a5e,_0x1de4b5)=>(_0x3842f6,_0x4fac0a)=>_0x1de4b5(_0x3842f6,_0x4fac0a,_0x429a5e);let _0x19eb1d=class extends _0x5aa547['Disposable']{constructor(_0xe3f1f6,_0x1ac2e2,_0x23496a,_0x19017b){const _0x9be829=_0xe7a046;super(),this[_0x9be829(0x109)]=_0xe3f1f6,this[_0x9be829(0x176)]=_0x1ac2e2,this[_0x9be829(0x160)]=_0x23496a,this[_0x9be829(0x17d)]=_0x19017b,this[_0x9be829(0x157)](),this[_0x9be829(0x171)]();}[_0xe7a046(0x171)](){const _0x37e2a1=_0xe7a046;this[_0x37e2a1(0x10e)](this[_0x37e2a1(0x176)][_0x37e2a1(0x107)][_0x37e2a1(0x156)](_0x42e939[_0x37e2a1(0x112)](0x10))[_0x37e2a1(0x137)](_0x172098=>{const _0x399eab=_0x37e2a1,_0x19b7ad=new Set();_0x172098[_0x399eab(0x146)](_0x135638=>{const _0x122aef=_0x399eab;switch(_0x135638[_0x122aef(0x133)]){case _0x122aef(0x105):{const _0x2e0ccc=_0x135638[_0x122aef(0x12d)]['personId'];_0x19b7ad[_0x122aef(0x105)](_0x2e0ccc);break;}}}),_0x19c18b(this[_0x399eab(0x17d)],_0x19b7ad);}));}[_0xe7a046(0x157)](){const _0x2645dd=_0xe7a046;this['disposeWithMe'](this[_0x2645dd(0x109)][_0x2645dd(0x107)][_0x2645dd(0x137)](async _0x3b2f6=>{const _0x5592f4=_0x2645dd;var _0xdc14a9,_0x19d26b,_0x5eb7d2,_0x5024d1;const _0x239398=(_0xdc14a9=this['_threadCommentModel']['getUnit'](_0x3b2f6[_0x5592f4(0x123)])[_0x5592f4(0x14b)](_0x3a7602=>_0x3a7602[_0x5592f4(0x174)]===_0x3b2f6[_0x5592f4(0x174)]))==null?void 0x0:_0xdc14a9['root'];if(!_0x239398)return;const {unitId:_0x2b06ba,subUnitId:_0x554194}=_0x239398;switch(_0x3b2f6['user']&&this[_0x5592f4(0x160)][_0x5592f4(0x13a)](_0x3b2f6[_0x5592f4(0x10b)]),_0x3b2f6['type']){case _0x4e3bfb['Add']:break;case _0x4e3bfb[_0x5592f4(0x138)]:{this[_0x5592f4(0x176)][_0x5592f4(0x161)](_0x2b06ba,_0x554194,{'unitId':_0x2b06ba,'subUnitId':_0x554194,'ref':'','id':_0x3b2f6[_0x5592f4(0x139)],'dT':_0x3690e2(+_0x3b2f6[_0x5592f4(0x110)]),'threadId':_0x3b2f6[_0x5592f4(0x174)],'personId':(_0x5eb7d2=(_0x19d26b=_0x3b2f6['user'])==null?void 0x0:_0x19d26b[_0x5592f4(0x117)])!=null?_0x5eb7d2:_0x3b2f6[_0x5592f4(0x118)],'text':JSON[_0x5592f4(0x131)](_0x3b2f6[_0x5592f4(0x136)]),'parentId':_0x239398['id']});break;}case _0x4e3bfb['Delete']:{const _0x408f29=this['_threadCommentModel'][_0x5592f4(0x177)](_0x2b06ba,_0x554194,_0x3b2f6[_0x5592f4(0x139)]);_0x408f29&&_0x408f29['parentId']&&this['_threadCommentModel'][_0x5592f4(0x185)](_0x2b06ba,_0x554194,_0x3b2f6[_0x5592f4(0x139)]);break;}case _0x4e3bfb[_0x5592f4(0x188)]:{this['_threadCommentModel'][_0x5592f4(0x124)](_0x2b06ba,_0x554194,{'commentId':_0x3b2f6[_0x5592f4(0x139)],'text':JSON[_0x5592f4(0x131)](_0x3b2f6[_0x5592f4(0x136)])});break;}case _0x4e3bfb[_0x5592f4(0x18b)]:{const _0x1f287d=(_0x5024d1=this['_threadCommentModel'][_0x5592f4(0x149)](_0x3b2f6[_0x5592f4(0x123)])[_0x5592f4(0x14b)](_0x2c7db8=>_0x2c7db8[_0x5592f4(0x174)]===_0x3b2f6[_0x5592f4(0x174)]))==null?void 0x0:_0x5024d1[_0x5592f4(0x132)];_0x1f287d&&this[_0x5592f4(0x176)][_0x5592f4(0x152)](_0x2b06ba,_0x554194,_0x1f287d['id'],_0x3b2f6[_0x5592f4(0x163)]===_0x1a812e['Solved']);break;}}}));}};_0x19eb1d=_0x1ad0fd([_0x322919(0x0,_0x5aa547['Inject'](_0x500a5e['CommentService'])),_0x322919(0x1,_0x5aa547['Inject'](_0x1a2483[_0xe7a046(0x15a)])),_0x322919(0x2,_0x5aa547[_0xe7a046(0x183)](_0x5aa547['UserManagerService'])),_0x322919(0x3,_0x5aa547['Inject'](_0x5aa547[_0xe7a046(0x104)]))],_0x19eb1d);const _0xf88c41=_0xe7a046(0x12c),_0x39f4e7={};var _0x5740d7=Object[_0xe7a046(0x15e)],_0x4e1ec6=(_0x3aa8fa,_0x343aa2,_0x8bde9,_0x1df0b5)=>{const _0x2491c2=_0xe7a046;for(var _0xb735bd=_0x1df0b5>0x1?void 0x0:_0x1df0b5?_0x5740d7(_0x343aa2,_0x8bde9):_0x343aa2,_0x30f430=_0x3aa8fa[_0x2491c2(0x11e)]-0x1,_0x2c407c;_0x30f430>=0x0;_0x30f430--)(_0x2c407c=_0x3aa8fa[_0x30f430])&&(_0xb735bd=_0x2c407c(_0xb735bd)||_0xb735bd);return _0xb735bd;},_0x5202ce=(_0x2fd5d0,_0x1da4ad)=>(_0x2948cc,_0x487193)=>_0x1da4ad(_0x2948cc,_0x487193,_0x2fd5d0);function _0x1d1220(_0x2aecd2,_0x3d66df){const _0x41c7f3=_0xe7a046,_0x2c0f13=_0x2aecd2[_0x41c7f3(0x168)][0x0];return{..._0x3d66df,'id':_0x2c0f13[_0x41c7f3(0x139)],'resolved':_0x2aecd2['solved']===0x1,'dT':_0x3690e2(_0x2c0f13['createTimestamp']),'personId':_0x2c0f13['userId'],'threadId':_0x2c0f13[_0x41c7f3(0x174)]};}function _0x49fbf6(_0x2c65d6,_0x4f24ff,_0x2b1065){const _0x54bf13=_0xe7a046;var _0x509712,_0x149a34;if(((_0x149a34=(_0x509712=_0x2c65d6==null?void 0x0:_0x2c65d6[_0x54bf13(0x168)])==null?void 0x0:_0x509712['length'])!=null?_0x149a34:0x0)>0x0){const _0x4602b2=(_0x588968,_0x1c60ef)=>({'id':_0x588968[_0x54bf13(0x139)],'threadId':_0x588968[_0x54bf13(0x174)],'dT':_0x3690e2(_0x588968['createTimestamp']),'personId':_0x588968[_0x54bf13(0x118)],'resolved':_0x2c65d6[_0x54bf13(0x163)]===_0x1a812e[_0x54bf13(0x14a)],'unitId':_0x4f24ff,'subUnitId':_0x2b1065,'text':JSON[_0x54bf13(0x131)](_0x588968[_0x54bf13(0x136)]),'parentId':_0x1c60ef}),_0x462769=_0x4602b2(_0x2c65d6[_0x54bf13(0x168)][0x0]);return{..._0x462769,'children':_0x2c65d6[_0x54bf13(0x168)][_0x54bf13(0x11c)](0x1)[_0x54bf13(0x11b)](_0x168da5=>_0x4602b2(_0x168da5,_0x462769['id']))};}return null;}let _0x379239=class{constructor(_0x53738f,_0x15d26c,_0xb0d839,_0x4a216a){const _0x5bea42=_0xe7a046;this[_0x5bea42(0x125)]=_0x53738f,this[_0x5bea42(0x160)]=_0x15d26c,this[_0x5bea42(0x122)]=_0xb0d839,this[_0x5bea42(0x17d)]=_0x4a216a;}async['addComment'](_0x741d7){const _0x387d44=_0xe7a046;var _0x38e642,_0x590064;const {parentId:_0x2a3133,unitId:_0x46d900,text:_0x33fd80,threadId:_0x4fe742}=_0x741d7,_0x344c82=(_0x590064=(_0x38e642=_0x33fd80['customRanges'])==null?void 0x0:_0x38e642['filter'](_0x3559d7=>_0x3559d7[_0x387d44(0x147)]===_0x5aa547[_0x387d44(0x13e)][_0x387d44(0x11d)])['map'](_0x236852=>_0x236852[_0x387d44(0x173)]))!=null?_0x590064:[],_0x5cabba=JSON[_0x387d44(0x184)](_0x33fd80),_0xd30486=(await this['_sessionService'][_0x387d44(0x179)](_0x46d900))['getMemberID']();if(_0x2a3133){const _0xa1326={'memberId':_0xd30486,'unitId':_0x46d900,'content':_0x5cabba,'mention':_0x344c82,'threadId':_0x4fe742},_0x1a9c5d=(await this[_0x387d44(0x125)][_0x387d44(0x14f)](_0x387d44(0x10d)+_0x46d900+'/reply',{'body':_0xa1326}))[_0x387d44(0x121)][_0x387d44(0x17c)];return{..._0x741d7,'id':_0x1a9c5d[_0x387d44(0x139)],'dT':_0x5aa547[_0x387d44(0x182)](+_0x1a9c5d[_0x387d44(0x110)])[_0x387d44(0x180)](_0x387d44(0x145)),'personId':_0x1a9c5d[_0x387d44(0x118)]};}else{const _0x359347={'memberId':_0xd30486,'unitId':_0x46d900,'content':_0x5cabba,'mention':_0x344c82},_0x5b6004=await this[_0x387d44(0x125)][_0x387d44(0x14f)](_0x387d44(0x10d)+_0x46d900+_0x387d44(0x16a),{'body':_0x359347});return _0x1d1220(_0x5b6004[_0x387d44(0x121)][_0x387d44(0x186)],_0x741d7);}}async[_0xe7a046(0x124)](_0x36d7a9){const _0x128da1=_0xe7a046;var _0x2a2cae,_0x61595a;const {text:_0x58cf87,unitId:_0x3a604d}=_0x36d7a9,_0x1125e3=(_0x61595a=(_0x2a2cae=_0x58cf87[_0x128da1(0x102)])==null?void 0x0:_0x2a2cae[_0x128da1(0x108)](_0x440126=>_0x440126['rangeType']===_0x5aa547['CustomRangeType'][_0x128da1(0x11d)])[_0x128da1(0x11b)](_0x414839=>_0x414839[_0x128da1(0x173)]))!=null?_0x61595a:[],_0x4d2033=JSON[_0x128da1(0x184)](_0x58cf87),_0x3b888a=_0x36d7a9[_0x128da1(0x174)],_0xcd9d2e=_0x36d7a9['id'],_0xe065a6={'memberId':(await this[_0x128da1(0x122)][_0x128da1(0x179)](_0x3a604d))[_0x128da1(0x151)](),'unitId':_0x3a604d,'threadId':_0x3b888a,'mention':_0x1125e3,'content':_0x4d2033,'replyId':_0xcd9d2e},_0x5a604d=await this[_0x128da1(0x125)][_0x128da1(0x14f)]('/universer-api/comment/unit/'+_0x3a604d+_0x128da1(0x18a),{'body':_0xe065a6});return!_0x5a604d[_0x128da1(0x121)][_0x128da1(0x16c)]||_0x5a604d[_0x128da1(0x121)][_0x128da1(0x16c)][_0x128da1(0x187)]===0x1;}async['resolveComment'](_0x1fe519){const _0x3e7b3c=_0xe7a046,{unitId:_0x30d5c4}=_0x1fe519,_0x5a21fc=_0x1fe519[_0x3e7b3c(0x174)],_0x3dee46={'memberId':this[_0x3e7b3c(0x160)][_0x3e7b3c(0x129)]()[_0x3e7b3c(0x117)],'unitId':_0x30d5c4,'threadId':_0x5a21fc,'solved':_0x1fe519['resolved']?_0x1a812e[_0x3e7b3c(0x14a)]:_0x1a812e[_0x3e7b3c(0x17f)]},_0x594e6e=await this[_0x3e7b3c(0x125)][_0x3e7b3c(0x14f)]('/universer-api/comment/unit/'+_0x30d5c4+_0x3e7b3c(0x13f),{'body':_0x3dee46});return!_0x594e6e[_0x3e7b3c(0x121)][_0x3e7b3c(0x16c)]||_0x594e6e[_0x3e7b3c(0x121)]['error'][_0x3e7b3c(0x187)]===0x1;}async[_0xe7a046(0x185)](_0x16c30a,_0x190756,_0x2e60b7,_0x40d0bc){const _0x3a0a17=_0xe7a046,_0x3823b7={'memberId':(await this[_0x3a0a17(0x122)][_0x3a0a17(0x179)](_0x16c30a))[_0x3a0a17(0x151)](),'threadId':_0x2e60b7,'replyId':_0x40d0bc,'unitId':_0x16c30a},_0x558d31=await this[_0x3a0a17(0x125)][_0x3a0a17(0x14f)](_0x3a0a17(0x10d)+_0x16c30a+_0x3a0a17(0x166),{'body':_0x3823b7});return!_0x558d31[_0x3a0a17(0x121)][_0x3a0a17(0x16c)]||_0x558d31[_0x3a0a17(0x121)][_0x3a0a17(0x16c)][_0x3a0a17(0x187)]===0x1;}async[_0xe7a046(0x127)](_0x18be2c,_0x1ff84e,_0x11cdd2){const _0x4b9c42=_0xe7a046,_0x1c8d44={'unitId':_0x18be2c,'threadId':_0x11cdd2},_0x28710e=await this[_0x4b9c42(0x125)]['post'](_0x4b9c42(0x10d)+_0x18be2c+_0x4b9c42(0x154),{'body':_0x1c8d44}),_0x14ced3=_0x11cdd2[_0x4b9c42(0x11b)](_0x2f80ed=>_0x49fbf6(_0x28710e[_0x4b9c42(0x121)]['comments'][_0x2f80ed],_0x18be2c,_0x1ff84e))[_0x4b9c42(0x108)](Boolean);return Object['values'](_0x28710e[_0x4b9c42(0x121)][_0x4b9c42(0x16d)])[_0x4b9c42(0x146)](_0x407787=>{const _0x197dfe=_0x4b9c42;this[_0x197dfe(0x160)][_0x197dfe(0x13a)](_0x407787);}),_0x14ced3;}[_0xe7a046(0x165)](_0x5a5126){const _0x42afe2=_0xe7a046;return{'id':_0x5a5126['id'],'threadId':_0x5a5126[_0x42afe2(0x174)],'ref':_0x5a5126['ref']};}};_0x379239=_0x4e1ec6([_0x5202ce(0x0,_0x5aa547[_0xe7a046(0x183)](_0x49d8a4[_0xe7a046(0x12a)])),_0x5202ce(0x1,_0x5aa547[_0xe7a046(0x183)](_0x5aa547[_0xe7a046(0x172)])),_0x5202ce(0x2,_0x5aa547[_0xe7a046(0x183)](_0x500a5e['CollaborationSessionService'])),_0x5202ce(0x3,_0x5aa547[_0xe7a046(0x183)](_0x5aa547['Injector']))],_0x379239);var _0x52e22b=Object[_0xe7a046(0x15e)],_0x25cf6b=(_0xabe68a,_0x597366,_0x126e67,_0x72bb79)=>{const _0xaf04a9=_0xe7a046;for(var _0x6ac8b7=_0x72bb79>0x1?void 0x0:_0x72bb79?_0x52e22b(_0x597366,_0x126e67):_0x597366,_0x333a56=_0xabe68a[_0xaf04a9(0x11e)]-0x1,_0x1763e7;_0x333a56>=0x0;_0x333a56--)(_0x1763e7=_0xabe68a[_0x333a56])&&(_0x6ac8b7=_0x1763e7(_0x6ac8b7)||_0x6ac8b7);return _0x6ac8b7;},_0x287b2a=(_0x22cfe8,_0x4a8e80)=>(_0x926b45,_0x850462)=>_0x4a8e80(_0x926b45,_0x850462,_0x22cfe8);let _0x4ae52b=class extends _0x5aa547[_0xe7a046(0x11f)]{constructor(_0x578eec,_0x3ad7da){const _0xb0207e=_0xe7a046;super(),this[_0xb0207e(0x10c)]=_0x578eec,this['_threadCommentDataSource']=_0x3ad7da,this[_0xb0207e(0x189)]();}[_0xe7a046(0x189)](){const _0x2faad5=_0xe7a046;this[_0x2faad5(0x10c)][_0x2faad5(0x111)]=this['_threadCommentDataSource'],this[_0x2faad5(0x10c)][_0x2faad5(0x115)]=!0x1;}};_0x4ae52b=_0x25cf6b([_0x287b2a(0x0,_0x1a2483[_0xe7a046(0x15b)]),_0x287b2a(0x1,_0x5aa547[_0xe7a046(0x183)](_0x379239))],_0x4ae52b);var _0x192995=Object[_0xe7a046(0x12f)],_0x556ff6=Object[_0xe7a046(0x15e)],_0x547bd7=(_0x4c2d69,_0x124642,_0x151907)=>_0x124642 in _0x4c2d69?_0x192995(_0x4c2d69,_0x124642,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x151907}):_0x4c2d69[_0x124642]=_0x151907,_0x300003=(_0x4b518e,_0x5d6d91,_0x22b06b,_0x2173e0)=>{const _0x46aa31=_0xe7a046;for(var _0x39a0aa=_0x2173e0>0x1?void 0x0:_0x2173e0?_0x556ff6(_0x5d6d91,_0x22b06b):_0x5d6d91,_0x17c667=_0x4b518e[_0x46aa31(0x11e)]-0x1,_0xdfb09a;_0x17c667>=0x0;_0x17c667--)(_0xdfb09a=_0x4b518e[_0x17c667])&&(_0x39a0aa=_0xdfb09a(_0x39a0aa)||_0x39a0aa);return _0x39a0aa;},_0x53d444=(_0x3378e2,_0x17f127)=>(_0x5cca2e,_0x4090ae)=>_0x17f127(_0x5cca2e,_0x4090ae,_0x3378e2),_0x260c0f=(_0x548e91,_0x525ada,_0x309ee7)=>_0x547bd7(_0x548e91,typeof _0x525ada!=_0xe7a046(0x175)?_0x525ada+'':_0x525ada,_0x309ee7);_0x105b6d['UniverThreadCommentDataSourcePlugin']=class extends _0x5aa547['Plugin']{constructor(_0x27567c=_0x39f4e7,_0x5e3cc3,_0x4fea60){const _0x439e1a=_0xe7a046;super(),this[_0x439e1a(0x106)]=_0x27567c,this[_0x439e1a(0x17d)]=_0x5e3cc3,this[_0x439e1a(0x143)]=_0x4fea60;const {..._0x50b27e}=_0x5aa547['merge']({},_0x39f4e7,this['_config']);this[_0x439e1a(0x143)][_0x439e1a(0x17a)](_0xf88c41,_0x50b27e);}[_0xe7a046(0x113)](){const _0x56b0d9=_0xe7a046;[[_0x379239],[_0x4ae52b],[_0x19eb1d]][_0x56b0d9(0x146)](_0x2b42f6=>{const _0x15cd1b=_0x56b0d9;this[_0x15cd1b(0x17d)][_0x15cd1b(0x105)](_0x2b42f6);});}[_0xe7a046(0x120)](){const _0x18837a=_0xe7a046;this['_injector'][_0x18837a(0x13b)](_0x4ae52b),this[_0x18837a(0x17d)]['get'](_0x19eb1d);}},_0x260c0f(_0x105b6d['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2ba77d),_0x260c0f(_0x105b6d[_0xe7a046(0x126)],_0xe7a046(0x133),_0x5aa547[_0xe7a046(0x14e)][_0xe7a046(0x164)]),_0x105b6d[_0xe7a046(0x126)]=_0x300003([_0x5aa547[_0xe7a046(0x141)](_0xd7a9a8[_0xe7a046(0x167)],_0x500a5e[_0xe7a046(0x158)],_0x9b5869[_0xe7a046(0x150)]),_0x53d444(0x1,_0x5aa547[_0xe7a046(0x183)](_0x5aa547[_0xe7a046(0x104)])),_0x53d444(0x2,_0x5aa547[_0xe7a046(0x148)])],_0x105b6d[_0xe7a046(0x126)]),Object[_0xe7a046(0x12f)](_0x105b6d,Symbol['toStringTag'],{'value':_0xe7a046(0x162)});}));function _0x259c(_0x760d06,_0x3c84a6){const _0x5c32aa=_0x5c32();return _0x259c=function(_0x259c73,_0x3e8452){_0x259c73=_0x259c73-0x102;let _0x52efb8=_0x5c32aa[_0x259c73];return _0x52efb8;},_0x259c(_0x760d06,_0x3c84a6);}function _0x5c32(){const _0x47842e=['filter','_commentService','Add','user','_threadCommentDataSourceService','/universer-api/comment/unit/','disposeWithMe','Unknown','createTimestamp','dataSource','bufferTime','onStarting','40ArnDlG','syncUpdateMutationToColla','delete','userID','userId','UniverProLicense','@univerjs/core','map','slice','COMMENT','length','Disposable','onReady','body','_sessionService','unitId','updateComment','_httpService','UniverThreadCommentDataSourcePlugin','listComments','rxjs','getCurrentUser','HTTPService','@univerjs-pro/collaboration-client','thread-comment-data-source.config','payload','UniverCore','defineProperty','76209GVAAKr','parse','root','type','1967262ZBmuOY','645939FGzISU','content','subscribe','Reply','replyId','addUser','get','@univerjs/network','64EVaemA','CustomRangeType','/solved','@univerjs/thread-comment-ui','DependentOn','UniverProCollaborationClient','_configService','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','forEach','rangeType','IConfigService','getUnit','Solved','find','object','9658253hGVsdv','UniverInstanceType','post','UniverLicensePlugin','getMemberID','resolveComment','size','/list','UniverNetwork','pipe','_init','UniverCollaborationClientPlugin','UNRECOGNIZED','ThreadCommentModel','IThreadCommentDataSourceService','UniverThreadCommentUi','1812055HZcijn','getOwnPropertyDescriptor','@univerjs-pro/license','_userService','addComment','Module','solved','UNIVER_UNKNOWN','saveCommentToSnapshot','/delete','UniverThreadCommentUIPlugin','replies','@univerjs/thread-comment','/add','8zStCQN','error','users','Delete','function','2xOpfZN','_initUserSync','UserManagerService','rangeId','threadId','symbol','_threadCommentModel','getComment','getUser','requireSession','setConfig','UniverThreadComment','reply','_injector','exports','OpenOrReOpen','format','218382vZKgsh','dayjs','Inject','stringify','deleteComment','comment','code','Edit','_initDataSource','/edit','Solve','customRanges','229012RkYldv','Injector','add','_config','commentUpdate$'];_0x5c32=function(){return _0x47842e;};return _0x5c32();}
|
|
1
|
+
function _0x339b(){const _0x368869=['YYYY/MM/DD\x20HH:mm','UniverCollaborationClientPlugin','@univerjs-pro/collaboration-client','type','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','_threadCommentDataSourceService','1179450XaKnNp','getMemberID','forEach','295863SkKQqX','error','Unknown','post','object','parentId','add','get','rangeType','onStarting','length','_threadCommentDataSource','UNIVER_UNKNOWN','rangeId','HTTPService','19174779ggSFVJ','_threadCommentModel','addUser','_httpService','UniverProLicense','@univerjs/thread-comment','ThreadCommentModel','commentUpdate$','/add','Reply','code','_injector','content','_commentService','requireSession','filter','parse','Delete','8wtWpoQ','4133308KpLwEf','Solve','solved','dayjs','/solved','UniverThreadCommentUi','createTimestamp','getOwnPropertyDescriptor','UniverProCollaborationClient','OpenOrReOpen','format','defineProperty','resolveComment','map','3251052zPKSHE','userId','user','@univerjs/network','UniverProThreadCommentDatasource','UniverCore','syncUpdateMutationToColla','setConfig','Disposable','personId','stringify','unitId','UniverThreadCommentDataSourcePlugin','_sessionService','replies','Module','/list','@univerjs/core','size','find','disposeWithMe','rxjs','UniverLicensePlugin','deleteComment','Add','Edit','UniverNetwork','UniverThreadCommentUIPlugin','_init','getComment','root','IThreadCommentDataSourceService','Inject','updateComment','CommentService','bufferTime','body','@univerjs-pro/license','onReady','listComments','_initUserSync','IConfigService','6XEtmCi','/edit','delete','comments','replyId','saveCommentToSnapshot','userID','2390625EIDSHi','addComment','_configService','DependentOn','threadId','UserManagerService','627912IOTwAG','Injector','getUnit','Plugin','UNRECOGNIZED','ref','symbol','thread-comment-data-source.config','customRanges','payload','subscribe','/universer-api/comment/unit/','getCurrentUser','pluginName','_userService','Solved','COMMENT','_initDataSource','CustomRangeType'];_0x339b=function(){return _0x368869;};return _0x339b();}function _0x175b(_0x445be0,_0x37c7c7){const _0x339b6e=_0x339b();return _0x175b=function(_0x175bd0,_0xcf79dc){_0x175bd0=_0x175bd0-0xb1;let _0x2f8e6a=_0x339b6e[_0x175bd0];return _0x2f8e6a;},_0x175b(_0x445be0,_0x37c7c7);}(function(_0xfad59d,_0x2f3dfa){const _0x273030=_0x175b,_0x455be9=_0xfad59d();while(!![]){try{const _0x69c5c3=-parseInt(_0x273030(0xe5))/0x1+parseInt(_0x273030(0xc7))/0x2+-parseInt(_0x273030(0xc1))/0x3+-parseInt(_0x273030(0x107))/0x4+parseInt(_0x273030(0xe2))/0x5*(-parseInt(_0x273030(0xba))/0x6)+parseInt(_0x273030(0x115))/0x7+parseInt(_0x273030(0x106))/0x8*(parseInt(_0x273030(0xf4))/0x9);if(_0x69c5c3===_0x2f3dfa)break;else _0x455be9['push'](_0x455be9['shift']());}catch(_0x519aff){_0x455be9['push'](_0x455be9['shift']());}}}(_0x339b,0x85898),function(_0x11d2c1,_0x31923c){const _0x1584b1=_0x175b;typeof exports==_0x1584b1(0xe9)&&typeof module<'u'?_0x31923c(exports,require(_0x1584b1(0xdc)),require(_0x1584b1(0xb5)),require(_0x1584b1(0x126)),require('@univerjs/thread-comment-ui'),require(_0x1584b1(0xf9)),require('rxjs'),require(_0x1584b1(0x118))):typeof define=='function'&&define['amd']?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x1584b1(0x126),'@univerjs/thread-comment-ui',_0x1584b1(0xf9),_0x1584b1(0x12a),_0x1584b1(0x118)],_0x31923c):(_0x11d2c1=typeof globalThis<'u'?globalThis:_0x11d2c1||self,_0x31923c(_0x11d2c1[_0x1584b1(0x119)]={},_0x11d2c1[_0x1584b1(0x10f)],_0x11d2c1[_0x1584b1(0xf8)],_0x11d2c1[_0x1584b1(0x11a)],_0x11d2c1[_0x1584b1(0x10c)],_0x11d2c1['UniverThreadComment'],_0x11d2c1[_0x1584b1(0x12a)],_0x11d2c1[_0x1584b1(0x12f)]));}(this,function(_0x1f4def,_0x422d15,_0x44db22,_0x96102a,_0x1f07f6,_0x7fd073,_0x204143,_0x437074){'use strict';const _0x3cd327=_0x175b;const _0x323abe=_0x3cd327(0xdf);var _0xc16ad7=(_0x17acd3=>(_0x17acd3[_0x17acd3[_0x3cd327(0x110)]=0x0]=_0x3cd327(0x110),_0x17acd3[_0x17acd3[_0x3cd327(0xd6)]=0x1]=_0x3cd327(0xd6),_0x17acd3[_0x17acd3[_0x3cd327(0xcb)]=-0x1]=_0x3cd327(0xcb),_0x17acd3))(_0xc16ad7||{}),_0x245eab=(_0x2f23fc=>(_0x2f23fc[_0x2f23fc[_0x3cd327(0xe7)]=0x0]=_0x3cd327(0xe7),_0x2f23fc[_0x2f23fc[_0x3cd327(0x12d)]=0x1]='Add',_0x2f23fc[_0x2f23fc[_0x3cd327(0xfd)]=0x2]='Reply',_0x2f23fc[_0x2f23fc[_0x3cd327(0x12e)]=0x3]=_0x3cd327(0x12e),_0x2f23fc[_0x2f23fc[_0x3cd327(0x105)]=0x4]=_0x3cd327(0x105),_0x2f23fc[_0x2f23fc[_0x3cd327(0x108)]=0x5]=_0x3cd327(0x108),_0x2f23fc[_0x2f23fc['UNRECOGNIZED']=-0x1]=_0x3cd327(0xcb),_0x2f23fc))(_0x245eab||{});const _0xdb057f=_0x1167cb=>_0x96102a[_0x3cd327(0x10a)](new Date(+_0x1167cb))[_0x3cd327(0x111)](_0x3cd327(0xda)),_0x4a1840=async(_0x33603d,_0x3c22f6)=>{const _0x41e82a=_0x3cd327,_0x3535a3=_0x33603d['get'](_0x96102a[_0x41e82a(0xc6)]),_0x59d760=_0x33603d[_0x41e82a(0xec)](_0x437074[_0x41e82a(0xf3)]);_0x3c22f6[_0x41e82a(0xe4)](_0x47de03=>{const _0x4874d6=_0x41e82a;_0x3535a3['getUser'](_0x47de03)&&_0x3c22f6[_0x4874d6(0xbc)](_0x47de03);}),_0x3c22f6[_0x41e82a(0x127)]&&(await _0x59d760[_0x41e82a(0xec)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3c22f6]}}))[_0x41e82a(0xb4)]['users'][_0x41e82a(0xe4)](_0x15b49b=>{const _0x646738=_0x41e82a;_0x15b49b&&_0x3535a3[_0x646738(0xf6)](_0x15b49b);});};var _0x5839bb=Object[_0x3cd327(0x10e)],_0x56d014=(_0x2e54c2,_0x40ed62,_0x158b08,_0x199c97)=>{const _0xacf08e=_0x3cd327;for(var _0x1919ba=_0x199c97>0x1?void 0x0:_0x199c97?_0x5839bb(_0x40ed62,_0x158b08):_0x40ed62,_0x1e8edc=_0x2e54c2[_0xacf08e(0xef)]-0x1,_0x1e4995;_0x1e8edc>=0x0;_0x1e8edc--)(_0x1e4995=_0x2e54c2[_0x1e8edc])&&(_0x1919ba=_0x1e4995(_0x1919ba)||_0x1919ba);return _0x1919ba;},_0x14eed1=(_0x3cce99,_0x2936c2)=>(_0x16d47f,_0x3dc66e)=>_0x2936c2(_0x16d47f,_0x3dc66e,_0x3cce99);let _0x4d60d6=class extends _0x96102a[_0x3cd327(0x11d)]{constructor(_0x50bf51,_0x5b5cca,_0x5d31f3,_0x24aa92){const _0x367951=_0x3cd327;super(),this[_0x367951(0x101)]=_0x50bf51,this[_0x367951(0xf5)]=_0x5b5cca,this[_0x367951(0xd5)]=_0x5d31f3,this[_0x367951(0xff)]=_0x24aa92,this[_0x367951(0x131)](),this[_0x367951(0xb8)]();}[_0x3cd327(0xb8)](){const _0x1d5d76=_0x3cd327;this[_0x1d5d76(0x129)](this[_0x1d5d76(0xf5)][_0x1d5d76(0xfb)]['pipe'](_0x204143[_0x1d5d76(0xb3)](0x10))['subscribe'](_0x1f22e3=>{const _0x1a37f8=_0x1d5d76,_0x3e47f6=new Set();_0x1f22e3[_0x1a37f8(0xe4)](_0x4c8c8=>{const _0x4244b0=_0x1a37f8;switch(_0x4c8c8[_0x4244b0(0xdd)]){case'add':{const _0x35306e=_0x4c8c8[_0x4244b0(0xd0)][_0x4244b0(0x11e)];_0x3e47f6[_0x4244b0(0xeb)](_0x35306e);break;}}}),_0x4a1840(this[_0x1a37f8(0xff)],_0x3e47f6);}));}[_0x3cd327(0x131)](){const _0x330e90=_0x3cd327;this['disposeWithMe'](this[_0x330e90(0x101)]['commentUpdate$'][_0x330e90(0xd1)](async _0x511126=>{const _0x187f75=_0x330e90;var _0x2aee18,_0x3ad216,_0x541d59,_0x1a5a27;const _0x35f183=(_0x2aee18=this['_threadCommentModel'][_0x187f75(0xc9)](_0x511126[_0x187f75(0x120)])[_0x187f75(0x128)](_0x3f0494=>_0x3f0494[_0x187f75(0xc5)]===_0x511126[_0x187f75(0xc5)]))==null?void 0x0:_0x2aee18['root'];if(!_0x35f183)return;const {unitId:_0x7f71a1,subUnitId:_0x24ac0f}=_0x35f183;switch(_0x511126[_0x187f75(0x117)]&&this[_0x187f75(0xd5)][_0x187f75(0xf6)](_0x511126[_0x187f75(0x117)]),_0x511126[_0x187f75(0xdd)]){case _0x245eab['Add']:break;case _0x245eab[_0x187f75(0xfd)]:{this[_0x187f75(0xf5)]['addComment'](_0x7f71a1,_0x24ac0f,{'unitId':_0x7f71a1,'subUnitId':_0x24ac0f,'ref':'','id':_0x511126[_0x187f75(0xbe)],'dT':_0xdb057f(+_0x511126['createTimestamp']),'threadId':_0x511126[_0x187f75(0xc5)],'personId':(_0x541d59=(_0x3ad216=_0x511126[_0x187f75(0x117)])==null?void 0x0:_0x3ad216[_0x187f75(0xc0)])!=null?_0x541d59:_0x511126[_0x187f75(0x116)],'text':JSON[_0x187f75(0x104)](_0x511126[_0x187f75(0x100)]),'parentId':_0x35f183['id']});break;}case _0x245eab[_0x187f75(0x105)]:{const _0x611375=this[_0x187f75(0xf5)][_0x187f75(0x132)](_0x7f71a1,_0x24ac0f,_0x511126[_0x187f75(0xbe)]);_0x611375&&_0x611375[_0x187f75(0xea)]&&this[_0x187f75(0xf5)][_0x187f75(0x12c)](_0x7f71a1,_0x24ac0f,_0x511126[_0x187f75(0xbe)]);break;}case _0x245eab[_0x187f75(0x12e)]:{this['_threadCommentModel'][_0x187f75(0xb1)](_0x7f71a1,_0x24ac0f,{'commentId':_0x511126[_0x187f75(0xbe)],'text':JSON['parse'](_0x511126['content'])});break;}case _0x245eab[_0x187f75(0x108)]:{const _0x4642bf=(_0x1a5a27=this[_0x187f75(0xf5)][_0x187f75(0xc9)](_0x511126['unitId'])[_0x187f75(0x128)](_0x267832=>_0x267832['threadId']===_0x511126['threadId']))==null?void 0x0:_0x1a5a27[_0x187f75(0x133)];_0x4642bf&&this[_0x187f75(0xf5)]['resolveComment'](_0x7f71a1,_0x24ac0f,_0x4642bf['id'],_0x511126[_0x187f75(0x109)]===_0xc16ad7['Solved']);break;}}}));}};_0x4d60d6=_0x56d014([_0x14eed1(0x0,_0x96102a[_0x3cd327(0x135)](_0x422d15[_0x3cd327(0xb2)])),_0x14eed1(0x1,_0x96102a[_0x3cd327(0x135)](_0x7fd073[_0x3cd327(0xfa)])),_0x14eed1(0x2,_0x96102a[_0x3cd327(0x135)](_0x96102a[_0x3cd327(0xc6)])),_0x14eed1(0x3,_0x96102a[_0x3cd327(0x135)](_0x96102a[_0x3cd327(0xc8)]))],_0x4d60d6);const _0x57c4c4=_0x3cd327(0xce),_0x1ee5db={};var _0x224b42=Object[_0x3cd327(0x10e)],_0x526a21=(_0x27f805,_0x367dc0,_0x1505eb,_0x196d5f)=>{const _0x4b2cbb=_0x3cd327;for(var _0x43a4eb=_0x196d5f>0x1?void 0x0:_0x196d5f?_0x224b42(_0x367dc0,_0x1505eb):_0x367dc0,_0x2da704=_0x27f805[_0x4b2cbb(0xef)]-0x1,_0x4a12ec;_0x2da704>=0x0;_0x2da704--)(_0x4a12ec=_0x27f805[_0x2da704])&&(_0x43a4eb=_0x4a12ec(_0x43a4eb)||_0x43a4eb);return _0x43a4eb;},_0x3a87a3=(_0x1704f3,_0x4b1a78)=>(_0x210841,_0x5be26a)=>_0x4b1a78(_0x210841,_0x5be26a,_0x1704f3);function _0x12e08f(_0x4ea9d0,_0x1e58c7){const _0x5decd4=_0x3cd327,_0x1051ac=_0x4ea9d0[_0x5decd4(0x123)][0x0];return{..._0x1e58c7,'id':_0x1051ac[_0x5decd4(0xbe)],'resolved':_0x4ea9d0[_0x5decd4(0x109)]===0x1,'dT':_0xdb057f(_0x1051ac[_0x5decd4(0x10d)]),'personId':_0x1051ac[_0x5decd4(0x116)],'threadId':_0x1051ac[_0x5decd4(0xc5)]};}function _0x3b638b(_0x1b4078,_0x2b36e5,_0x5167b9){const _0x336b88=_0x3cd327;var _0xab235e,_0x467825;if(((_0x467825=(_0xab235e=_0x1b4078==null?void 0x0:_0x1b4078[_0x336b88(0x123)])==null?void 0x0:_0xab235e[_0x336b88(0xef)])!=null?_0x467825:0x0)>0x0){const _0x26d5be=(_0x192ee6,_0x2ce7d6)=>({'id':_0x192ee6[_0x336b88(0xbe)],'threadId':_0x192ee6['threadId'],'dT':_0xdb057f(_0x192ee6[_0x336b88(0x10d)]),'personId':_0x192ee6[_0x336b88(0x116)],'resolved':_0x1b4078[_0x336b88(0x109)]===_0xc16ad7['Solved'],'unitId':_0x2b36e5,'subUnitId':_0x5167b9,'text':JSON[_0x336b88(0x104)](_0x192ee6['content']),'parentId':_0x2ce7d6}),_0x2bfa3f=_0x26d5be(_0x1b4078[_0x336b88(0x123)][0x0]);return{..._0x2bfa3f,'children':_0x1b4078[_0x336b88(0x123)]['slice'](0x1)[_0x336b88(0x114)](_0x468cc6=>_0x26d5be(_0x468cc6,_0x2bfa3f['id']))};}return null;}let _0x7ae0c3=class{constructor(_0x5a352a,_0x18f6c6,_0x15fc98,_0x3b80b2){const _0x5ac313=_0x3cd327;this[_0x5ac313(0xf7)]=_0x5a352a,this[_0x5ac313(0xd5)]=_0x18f6c6,this[_0x5ac313(0x122)]=_0x15fc98,this[_0x5ac313(0xff)]=_0x3b80b2;}async[_0x3cd327(0xc2)](_0x1e6030){const _0xb003d4=_0x3cd327;var _0xae1574,_0x9e0a69;const {parentId:_0x216279,unitId:_0xa6bb85,text:_0x301754,threadId:_0x25f462}=_0x1e6030,_0x1b5cdf=(_0x9e0a69=(_0xae1574=_0x301754[_0xb003d4(0xcf)])==null?void 0x0:_0xae1574['filter'](_0x31ba5d=>_0x31ba5d[_0xb003d4(0xed)]===_0x96102a[_0xb003d4(0xd9)]['COMMENT'])[_0xb003d4(0x114)](_0x9cf1ae=>_0x9cf1ae['rangeId']))!=null?_0x9e0a69:[],_0x55db3f=JSON[_0xb003d4(0x11f)](_0x301754),_0x440dc2=(await this['_sessionService'][_0xb003d4(0x102)](_0xa6bb85))[_0xb003d4(0xe3)]();if(_0x216279){const _0x130ae7={'memberId':_0x440dc2,'unitId':_0xa6bb85,'content':_0x55db3f,'mention':_0x1b5cdf,'threadId':_0x25f462},_0x2e448d=(await this['_httpService'][_0xb003d4(0xe8)](_0xb003d4(0xd2)+_0xa6bb85+'/reply',{'body':_0x130ae7}))[_0xb003d4(0xb4)][_0xb003d4(0xde)];return{..._0x1e6030,'id':_0x2e448d[_0xb003d4(0xbe)],'dT':_0x96102a['dayjs'](+_0x2e448d[_0xb003d4(0x10d)])[_0xb003d4(0x111)](_0xb003d4(0xda)),'personId':_0x2e448d[_0xb003d4(0x116)]};}else{const _0x3e2933={'memberId':_0x440dc2,'unitId':_0xa6bb85,'content':_0x55db3f,'mention':_0x1b5cdf},_0x28c4aa=await this[_0xb003d4(0xf7)][_0xb003d4(0xe8)](_0xb003d4(0xd2)+_0xa6bb85+_0xb003d4(0xfc),{'body':_0x3e2933});return _0x12e08f(_0x28c4aa[_0xb003d4(0xb4)]['comment'],_0x1e6030);}}async[_0x3cd327(0xb1)](_0x1aeea5){const _0x17a561=_0x3cd327;var _0x51f9bc,_0x1fcb3c;const {text:_0x2a3030,unitId:_0x4f603a}=_0x1aeea5,_0x4d58b7=(_0x1fcb3c=(_0x51f9bc=_0x2a3030['customRanges'])==null?void 0x0:_0x51f9bc[_0x17a561(0x103)](_0x54c252=>_0x54c252[_0x17a561(0xed)]===_0x96102a[_0x17a561(0xd9)][_0x17a561(0xd7)])[_0x17a561(0x114)](_0x3004e5=>_0x3004e5[_0x17a561(0xf2)]))!=null?_0x1fcb3c:[],_0x5caa51=JSON[_0x17a561(0x11f)](_0x2a3030),_0x15f3ce=_0x1aeea5[_0x17a561(0xc5)],_0x2a02fc=_0x1aeea5['id'],_0x15871e={'memberId':(await this[_0x17a561(0x122)]['requireSession'](_0x4f603a))[_0x17a561(0xe3)](),'unitId':_0x4f603a,'threadId':_0x15f3ce,'mention':_0x4d58b7,'content':_0x5caa51,'replyId':_0x2a02fc},_0x49ad15=await this[_0x17a561(0xf7)][_0x17a561(0xe8)](_0x17a561(0xd2)+_0x4f603a+_0x17a561(0xbb),{'body':_0x15871e});return!_0x49ad15[_0x17a561(0xb4)][_0x17a561(0xe6)]||_0x49ad15[_0x17a561(0xb4)][_0x17a561(0xe6)][_0x17a561(0xfe)]===0x1;}async[_0x3cd327(0x113)](_0x24729c){const _0x40f4b3=_0x3cd327,{unitId:_0x35f177}=_0x24729c,_0x28d725=_0x24729c[_0x40f4b3(0xc5)],_0x1715b5={'memberId':this['_userService'][_0x40f4b3(0xd3)]()[_0x40f4b3(0xc0)],'unitId':_0x35f177,'threadId':_0x28d725,'solved':_0x24729c['resolved']?_0xc16ad7['Solved']:_0xc16ad7[_0x40f4b3(0x110)]},_0xf7eaae=await this[_0x40f4b3(0xf7)][_0x40f4b3(0xe8)](_0x40f4b3(0xd2)+_0x35f177+_0x40f4b3(0x10b),{'body':_0x1715b5});return!_0xf7eaae['body']['error']||_0xf7eaae[_0x40f4b3(0xb4)][_0x40f4b3(0xe6)][_0x40f4b3(0xfe)]===0x1;}async[_0x3cd327(0x12c)](_0x2c1661,_0x483977,_0x4f76e3,_0x38f50f){const _0xe89e45=_0x3cd327,_0x2ec53f={'memberId':(await this['_sessionService'][_0xe89e45(0x102)](_0x2c1661))['getMemberID'](),'threadId':_0x4f76e3,'replyId':_0x38f50f,'unitId':_0x2c1661},_0x3542fd=await this[_0xe89e45(0xf7)]['post']('/universer-api/comment/unit/'+_0x2c1661+'/delete',{'body':_0x2ec53f});return!_0x3542fd['body'][_0xe89e45(0xe6)]||_0x3542fd['body'][_0xe89e45(0xe6)][_0xe89e45(0xfe)]===0x1;}async[_0x3cd327(0xb7)](_0x1be1e3,_0x4008cc,_0x130c2f){const _0x35406a=_0x3cd327,_0x258355={'unitId':_0x1be1e3,'threadId':_0x130c2f},_0x5c8a49=await this[_0x35406a(0xf7)][_0x35406a(0xe8)](_0x35406a(0xd2)+_0x1be1e3+_0x35406a(0x125),{'body':_0x258355}),_0x4983e5=_0x130c2f['map'](_0x40f7bf=>_0x3b638b(_0x5c8a49[_0x35406a(0xb4)][_0x35406a(0xbd)][_0x40f7bf],_0x1be1e3,_0x4008cc))[_0x35406a(0x103)](Boolean);return Object['values'](_0x5c8a49[_0x35406a(0xb4)]['users'])[_0x35406a(0xe4)](_0x44e0ed=>{const _0x5dfcb7=_0x35406a;this[_0x5dfcb7(0xd5)][_0x5dfcb7(0xf6)](_0x44e0ed);}),_0x4983e5;}[_0x3cd327(0xbf)](_0x52bf88){const _0x2b489e=_0x3cd327;return{'id':_0x52bf88['id'],'threadId':_0x52bf88['threadId'],'ref':_0x52bf88[_0x2b489e(0xcc)]};}};_0x7ae0c3=_0x526a21([_0x3a87a3(0x0,_0x96102a['Inject'](_0x437074[_0x3cd327(0xf3)])),_0x3a87a3(0x1,_0x96102a[_0x3cd327(0x135)](_0x96102a[_0x3cd327(0xc6)])),_0x3a87a3(0x2,_0x96102a[_0x3cd327(0x135)](_0x422d15['CollaborationSessionService'])),_0x3a87a3(0x3,_0x96102a[_0x3cd327(0x135)](_0x96102a[_0x3cd327(0xc8)]))],_0x7ae0c3);var _0x13ec31=Object[_0x3cd327(0x10e)],_0x33d654=(_0x4b82c5,_0x25fb8c,_0x55eab0,_0x1de4c5)=>{const _0x35debe=_0x3cd327;for(var _0x11dfa8=_0x1de4c5>0x1?void 0x0:_0x1de4c5?_0x13ec31(_0x25fb8c,_0x55eab0):_0x25fb8c,_0x5c770b=_0x4b82c5[_0x35debe(0xef)]-0x1,_0x480c22;_0x5c770b>=0x0;_0x5c770b--)(_0x480c22=_0x4b82c5[_0x5c770b])&&(_0x11dfa8=_0x480c22(_0x11dfa8)||_0x11dfa8);return _0x11dfa8;},_0x5e9018=(_0x39bba4,_0x5e47e5)=>(_0x4f6c3b,_0x50f2c3)=>_0x5e47e5(_0x4f6c3b,_0x50f2c3,_0x39bba4);let _0x3f6559=class extends _0x96102a[_0x3cd327(0x11d)]{constructor(_0x6f031b,_0x1c7287){const _0x2bc17a=_0x3cd327;super(),this[_0x2bc17a(0xe1)]=_0x6f031b,this[_0x2bc17a(0xf0)]=_0x1c7287,this[_0x2bc17a(0xd8)]();}[_0x3cd327(0xd8)](){const _0x551558=_0x3cd327;this['_threadCommentDataSourceService'][_0x551558(0xe0)]=this[_0x551558(0xf0)],this['_threadCommentDataSourceService'][_0x551558(0x11b)]=!0x1;}};_0x3f6559=_0x33d654([_0x5e9018(0x0,_0x7fd073[_0x3cd327(0x134)]),_0x5e9018(0x1,_0x96102a[_0x3cd327(0x135)](_0x7ae0c3))],_0x3f6559);var _0x44b8b6=Object[_0x3cd327(0x112)],_0x5bfb5b=Object['getOwnPropertyDescriptor'],_0x854471=(_0x153b3e,_0x24a365,_0x431090)=>_0x24a365 in _0x153b3e?_0x44b8b6(_0x153b3e,_0x24a365,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x431090}):_0x153b3e[_0x24a365]=_0x431090,_0x4349bd=(_0x1e796e,_0x33cdd1,_0xfcf7,_0xeaa978)=>{const _0x203070=_0x3cd327;for(var _0x1cdd5c=_0xeaa978>0x1?void 0x0:_0xeaa978?_0x5bfb5b(_0x33cdd1,_0xfcf7):_0x33cdd1,_0x1d3895=_0x1e796e[_0x203070(0xef)]-0x1,_0x526df6;_0x1d3895>=0x0;_0x1d3895--)(_0x526df6=_0x1e796e[_0x1d3895])&&(_0x1cdd5c=_0x526df6(_0x1cdd5c)||_0x1cdd5c);return _0x1cdd5c;},_0x444648=(_0x30b5bb,_0x44b0af)=>(_0x4b2934,_0x11ca15)=>_0x44b0af(_0x4b2934,_0x11ca15,_0x30b5bb),_0x336af8=(_0x599021,_0x1d99fd,_0x5d107e)=>_0x854471(_0x599021,typeof _0x1d99fd!=_0x3cd327(0xcd)?_0x1d99fd+'':_0x1d99fd,_0x5d107e);_0x1f4def['UniverThreadCommentDataSourcePlugin']=class extends _0x96102a[_0x3cd327(0xca)]{constructor(_0x3a5007=_0x1ee5db,_0x207873,_0x51e505){const _0x481b55=_0x3cd327;super(),this['_config']=_0x3a5007,this[_0x481b55(0xff)]=_0x207873,this[_0x481b55(0xc3)]=_0x51e505;const {..._0x5c5170}=_0x96102a['merge']({},_0x1ee5db,this['_config']);this[_0x481b55(0xc3)][_0x481b55(0x11c)](_0x57c4c4,_0x5c5170);}[_0x3cd327(0xee)](){const _0x254b3a=_0x3cd327;[[_0x7ae0c3],[_0x3f6559],[_0x4d60d6]][_0x254b3a(0xe4)](_0x573100=>{const _0x546d4f=_0x254b3a;this[_0x546d4f(0xff)][_0x546d4f(0xeb)](_0x573100);});}[_0x3cd327(0xb6)](){const _0x55ace0=_0x3cd327;this[_0x55ace0(0xff)][_0x55ace0(0xec)](_0x3f6559),this[_0x55ace0(0xff)]['get'](_0x4d60d6);}},_0x336af8(_0x1f4def[_0x3cd327(0x121)],_0x3cd327(0xd4),_0x323abe),_0x336af8(_0x1f4def[_0x3cd327(0x121)],_0x3cd327(0xdd),_0x96102a['UniverInstanceType'][_0x3cd327(0xf1)]),_0x1f4def[_0x3cd327(0x121)]=_0x4349bd([_0x96102a[_0x3cd327(0xc4)](_0x1f07f6[_0x3cd327(0x130)],_0x422d15[_0x3cd327(0xdb)],_0x44db22[_0x3cd327(0x12b)]),_0x444648(0x1,_0x96102a[_0x3cd327(0x135)](_0x96102a['Injector'])),_0x444648(0x2,_0x96102a[_0x3cd327(0xb9)])],_0x1f4def['UniverThreadCommentDataSourcePlugin']),Object[_0x3cd327(0x112)](_0x1f4def,Symbol['toStringTag'],{'value':_0x3cd327(0x124)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-nightly.
|
|
3
|
+
"version": "0.6.10-nightly.202504131606",
|
|
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.6.10-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.6.10-nightly.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-nightly.202504131606",
|
|
49
|
+
"@univerjs-pro/license": "0.6.10-nightly.202504131606",
|
|
50
|
+
"@univerjs/network": "0.6.10-nightly.202504131606",
|
|
51
|
+
"@univerjs/core": "0.6.10-nightly.202504131606",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.10-nightly.202504131606",
|
|
52
53
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.10-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.10-nightly.202504121606"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.10-nightly.202504131606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|