@univerjs-pro/thread-comment-datasource 0.10.9-nightly.202509260614 → 0.10.10
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5ef928=_0xded3;(function(_0x5dec1c,_0x33ac1f){const _0x2609e4=_0xded3,_0x4318d2=_0x5dec1c();while(!![]){try{const _0x5ab03d=-parseInt(_0x2609e4(0x232))/0x1+parseInt(_0x2609e4(0x1f3))/0x2+parseInt(_0x2609e4(0x23a))/0x3*(parseInt(_0x2609e4(0x252))/0x4)+-parseInt(_0x2609e4(0x250))/0x5+parseInt(_0x2609e4(0x253))/0x6*(-parseInt(_0x2609e4(0x21d))/0x7)+-parseInt(_0x2609e4(0x22e))/0x8*(parseInt(_0x2609e4(0x248))/0x9)+parseInt(_0x2609e4(0x225))/0xa*(parseInt(_0x2609e4(0x21b))/0xb);if(_0x5ab03d===_0x33ac1f)break;else _0x4318d2['push'](_0x4318d2['shift']());}catch(_0x34e717){_0x4318d2['push'](_0x4318d2['shift']());}}}(_0x12fb,0x2c8a5));function _0xded3(_0x146d00,_0x1cd087){const _0x12fba1=_0x12fb();return _0xded3=function(_0xded39d,_0x2379d8){_0xded39d=_0xded39d-0x1f1;let _0x5bfb62=_0x12fba1[_0xded39d];return _0x5bfb62;},_0xded3(_0x146d00,_0x1cd087);}Object[_0x5ef928(0x1f7)](exports,Symbol[_0x5ef928(0x23d)],{'value':_0x5ef928(0x212)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x5ef928(0x235);var I=(_0xc253b3=>(_0xc253b3[_0xc253b3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xc253b3[_0xc253b3[_0x5ef928(0x205)]=0x1]=_0x5ef928(0x205),_0xc253b3[_0xc253b3['UNRECOGNIZED']=-0x1]=_0x5ef928(0x23f),_0xc253b3))(I||{}),v=(_0x41e061=>(_0x41e061[_0x41e061['Unknown']=0x0]='Unknown',_0x41e061[_0x41e061['Add']=0x1]=_0x5ef928(0x251),_0x41e061[_0x41e061[_0x5ef928(0x201)]=0x2]=_0x5ef928(0x201),_0x41e061[_0x41e061[_0x5ef928(0x22a)]=0x3]=_0x5ef928(0x22a),_0x41e061[_0x41e061[_0x5ef928(0x208)]=0x4]=_0x5ef928(0x208),_0x41e061[_0x41e061[_0x5ef928(0x238)]=0x5]='Solve',_0x41e061[_0x41e061[_0x5ef928(0x23f)]=-0x1]='UNRECOGNIZED',_0x41e061))(v||{});const f=_0x11997c=>c[_0x5ef928(0x258)](new Date(+_0x11997c))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x51cee5,_0x527cec)=>{const _0xe1ee10=_0x5ef928,_0x3c92c6=_0x51cee5[_0xe1ee10(0x254)](c[_0xe1ee10(0x21a)]),_0x2c802b=_0x51cee5[_0xe1ee10(0x254)](P['HTTPService']);_0x527cec['forEach'](_0x2623cc=>{const _0x19bbbf=_0xe1ee10;_0x3c92c6[_0x19bbbf(0x209)](_0x2623cc)&&_0x527cec['delete'](_0x2623cc);}),_0x527cec[_0xe1ee10(0x21f)]&&(await _0x2c802b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x527cec]}}))[_0xe1ee10(0x268)][_0xe1ee10(0x1f1)]['forEach'](_0x565254=>{const _0x21ba90=_0xe1ee10;_0x565254&&_0x3c92c6[_0x21ba90(0x22f)](_0x565254);});};var $=Object[_0x5ef928(0x204)],E=(_0x53bf8f,_0x3da7d0,_0x3c0c09,_0x3d00e9)=>{const _0x40f79a=_0x5ef928;for(var _0x4accad=_0x3d00e9>0x1?void 0x0:_0x3d00e9?$(_0x3da7d0,_0x3c0c09):_0x3da7d0,_0x5dbad3=_0x53bf8f[_0x40f79a(0x221)]-0x1,_0x2c9306;_0x5dbad3>=0x0;_0x5dbad3--)(_0x2c9306=_0x53bf8f[_0x5dbad3])&&(_0x4accad=_0x2c9306(_0x4accad)||_0x4accad);return _0x4accad;},S=(_0x50e229,_0x1ea39d)=>(_0x347f63,_0x4751ca)=>_0x1ea39d(_0x347f63,_0x4751ca,_0x50e229);let _=class extends c[_0x5ef928(0x20d)]{constructor(_0x2da301,_0x223496,_0x2926b0,_0x534905){const _0x360458=_0x5ef928;super(),this['_commentService']=_0x2da301,this[_0x360458(0x246)]=_0x223496,this[_0x360458(0x242)]=_0x2926b0,this[_0x360458(0x1ff)]=_0x534905,this[_0x360458(0x23e)](),this[_0x360458(0x228)]();}['_initUserSync'](){const _0x1880ea=_0x5ef928;this[_0x1880ea(0x24c)](this['_threadCommentModel'][_0x1880ea(0x262)][_0x1880ea(0x22d)](j[_0x1880ea(0x267)](0x10))['subscribe'](_0x2bff1e=>{const _0x2b4228=_0x1880ea,_0x27b57b=new Set();_0x2bff1e['forEach'](_0x5a3a65=>{const _0x3a18b3=_0xded3;switch(_0x5a3a65[_0x3a18b3(0x226)]){case _0x3a18b3(0x236):{const _0x7db4a2=_0x5a3a65[_0x3a18b3(0x218)][_0x3a18b3(0x202)];_0x27b57b[_0x3a18b3(0x236)](_0x7db4a2);break;}}}),R(this[_0x2b4228(0x1ff)],_0x27b57b);}));}['_init'](){const _0xfcf78f=_0x5ef928;this[_0xfcf78f(0x24c)](this[_0xfcf78f(0x233)]['commentUpdate$'][_0xfcf78f(0x25b)](async _0x17c9c1=>{const _0x1717a0=_0xfcf78f;var _0x6c768b,_0x27c4e3,_0x59c187,_0x6d146a;const _0x1f68e0=(_0x6c768b=this[_0x1717a0(0x246)][_0x1717a0(0x21e)](_0x17c9c1[_0x1717a0(0x23b)])[_0x1717a0(0x22b)](_0x5a1a52=>_0x5a1a52[_0x1717a0(0x206)]===_0x17c9c1[_0x1717a0(0x206)]))==null?void 0x0:_0x6c768b[_0x1717a0(0x24e)];if(!_0x1f68e0)return;const {unitId:_0xce4635,subUnitId:_0xab47a8}=_0x1f68e0;switch(_0x17c9c1['user']&&this['_userService'][_0x1717a0(0x22f)](_0x17c9c1[_0x1717a0(0x217)]),_0x17c9c1['type']){case v[_0x1717a0(0x251)]:break;case v[_0x1717a0(0x201)]:{this[_0x1717a0(0x246)][_0x1717a0(0x245)](_0xce4635,_0xab47a8,{'unitId':_0xce4635,'subUnitId':_0xab47a8,'ref':'','id':_0x17c9c1[_0x1717a0(0x264)],'dT':f(+_0x17c9c1[_0x1717a0(0x263)]),'threadId':_0x17c9c1['threadId'],'personId':(_0x59c187=(_0x27c4e3=_0x17c9c1[_0x1717a0(0x217)])==null?void 0x0:_0x27c4e3[_0x1717a0(0x269)])!=null?_0x59c187:_0x17c9c1[_0x1717a0(0x256)],'text':JSON[_0x1717a0(0x21c)](_0x17c9c1['content']),'parentId':_0x1f68e0['id']});break;}case v['Delete']:{const _0x330b11=this[_0x1717a0(0x246)][_0x1717a0(0x241)](_0xce4635,_0xab47a8,_0x17c9c1[_0x1717a0(0x264)]);_0x330b11&&_0x330b11['parentId']&&this[_0x1717a0(0x246)][_0x1717a0(0x1f6)](_0xce4635,_0xab47a8,_0x17c9c1['replyId']);break;}case v[_0x1717a0(0x22a)]:{this[_0x1717a0(0x246)][_0x1717a0(0x223)](_0xce4635,_0xab47a8,{'commentId':_0x17c9c1[_0x1717a0(0x264)],'text':JSON[_0x1717a0(0x21c)](_0x17c9c1[_0x1717a0(0x1fe)])});break;}case v[_0x1717a0(0x238)]:{const _0x477dd1=(_0x6d146a=this[_0x1717a0(0x246)]['getUnit'](_0x17c9c1[_0x1717a0(0x23b)])[_0x1717a0(0x22b)](_0x28a9a1=>_0x28a9a1[_0x1717a0(0x206)]===_0x17c9c1['threadId']))==null?void 0x0:_0x6d146a['root'];_0x477dd1&&this[_0x1717a0(0x246)]['resolveComment'](_0xce4635,_0xab47a8,_0x477dd1['id'],_0x17c9c1[_0x1717a0(0x25e)]===I[_0x1717a0(0x205)]);break;}}}));}};_=E([S(0x0,c[_0x5ef928(0x24d)](b[_0x5ef928(0x249)])),S(0x1,c[_0x5ef928(0x24d)](M[_0x5ef928(0x1f9)])),S(0x2,c['Inject'](c[_0x5ef928(0x21a)])),S(0x3,c[_0x5ef928(0x24d)](c[_0x5ef928(0x227)]))],_);const q=_0x5ef928(0x239),D={};var A=Object[_0x5ef928(0x204)],x=(_0x4c6118,_0x5199ae,_0x57ddb6,_0x38df1a)=>{const _0x30e38d=_0x5ef928;for(var _0x206e15=_0x38df1a>0x1?void 0x0:_0x38df1a?A(_0x5199ae,_0x57ddb6):_0x5199ae,_0x4ddf38=_0x4c6118[_0x30e38d(0x221)]-0x1,_0x4639de;_0x4ddf38>=0x0;_0x4ddf38--)(_0x4639de=_0x4c6118[_0x4ddf38])&&(_0x206e15=_0x4639de(_0x206e15)||_0x206e15);return _0x206e15;},C=(_0x3f04d6,_0x2edaf5)=>(_0x38f256,_0x71f14f)=>_0x2edaf5(_0x38f256,_0x71f14f,_0x3f04d6);function Y(_0x5a5663,_0x56b070){const _0x8c18ad=_0x5ef928,_0x15ccbf=_0x5a5663[_0x8c18ad(0x1fa)][0x0];return{..._0x56b070,'id':_0x15ccbf[_0x8c18ad(0x264)],'resolved':_0x5a5663[_0x8c18ad(0x25e)]===0x1,'dT':f(_0x15ccbf[_0x8c18ad(0x263)]),'personId':_0x15ccbf[_0x8c18ad(0x256)],'threadId':_0x15ccbf['threadId']};}function G(_0x4149e2,_0x1fa0cd,_0x1d8d25){const _0x3671f0=_0x5ef928;var _0x3119f0,_0x2174fb;if(((_0x2174fb=(_0x3119f0=_0x4149e2==null?void 0x0:_0x4149e2['replies'])==null?void 0x0:_0x3119f0[_0x3671f0(0x221)])!=null?_0x2174fb:0x0)>0x0){const _0x7785b1=(_0x488d4e,_0x40c781)=>({'id':_0x488d4e['replyId'],'threadId':_0x488d4e['threadId'],'dT':f(_0x488d4e['createTimestamp']),'personId':_0x488d4e[_0x3671f0(0x256)],'resolved':_0x4149e2['solved']===I[_0x3671f0(0x205)],'unitId':_0x1fa0cd,'subUnitId':_0x1d8d25,'text':JSON[_0x3671f0(0x21c)](_0x488d4e[_0x3671f0(0x1fe)]),'parentId':_0x40c781}),_0x6796d8=_0x7785b1(_0x4149e2[_0x3671f0(0x1fa)][0x0]);return{..._0x6796d8,'children':_0x4149e2[_0x3671f0(0x1fa)][_0x3671f0(0x207)](0x1)[_0x3671f0(0x24b)](_0x2e4fc3=>_0x7785b1(_0x2e4fc3,_0x6796d8['id']))};}return null;}let p=class{constructor(_0x239cec,_0x293b25,_0x39be55){const _0x42f5bc=_0x5ef928;this['_httpService']=_0x239cec,this[_0x42f5bc(0x242)]=_0x293b25,this['_sessionService']=_0x39be55;}async[_0x5ef928(0x245)](_0x3577d6){const _0x453c00=_0x5ef928;var _0x101871,_0x59e61c;const {parentId:_0x1d597c,unitId:_0x5818e8,text:_0x2e3e9d,threadId:_0xe51b72}=_0x3577d6,_0x1afe90=(_0x59e61c=(_0x101871=_0x2e3e9d[_0x453c00(0x25a)])==null?void 0x0:_0x101871[_0x453c00(0x24f)](_0x33da4a=>_0x33da4a['rangeType']===c[_0x453c00(0x213)][_0x453c00(0x203)])[_0x453c00(0x24b)](_0x27b0d5=>_0x27b0d5[_0x453c00(0x257)]))!=null?_0x59e61c:[],_0x10da5a=JSON['stringify'](_0x2e3e9d),_0x32b440=(await this[_0x453c00(0x234)]['requireSession'](_0x5818e8))[_0x453c00(0x220)]();if(_0x1d597c){const _0x3ca754={'memberId':_0x32b440,'unitId':_0x5818e8,'content':_0x10da5a,'mention':_0x1afe90,'threadId':_0xe51b72},_0x502fda=(await this[_0x453c00(0x23c)][_0x453c00(0x1f8)](_0x453c00(0x222)+_0x5818e8+'/reply',{'body':_0x3ca754}))[_0x453c00(0x268)]['reply'];return{..._0x3577d6,'id':_0x502fda[_0x453c00(0x264)],'dT':c[_0x453c00(0x258)](+_0x502fda[_0x453c00(0x263)])[_0x453c00(0x247)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x502fda[_0x453c00(0x256)]};}else{const _0x5b3e03={'memberId':_0x32b440,'unitId':_0x5818e8,'content':_0x10da5a,'mention':_0x1afe90},_0x314038=await this[_0x453c00(0x23c)][_0x453c00(0x1f8)](_0x453c00(0x222)+_0x5818e8+_0x453c00(0x215),{'body':_0x5b3e03});return Y(_0x314038['body'][_0x453c00(0x20e)],_0x3577d6);}}async[_0x5ef928(0x223)](_0x5e1bbc){const _0x1d9954=_0x5ef928;var _0x363ad2,_0x3dc8cd;const {text:_0x360d08,unitId:_0x2b2a30}=_0x5e1bbc,_0x4c27d2=(_0x3dc8cd=(_0x363ad2=_0x360d08[_0x1d9954(0x25a)])==null?void 0x0:_0x363ad2[_0x1d9954(0x24f)](_0xf87dbc=>_0xf87dbc[_0x1d9954(0x25f)]===c[_0x1d9954(0x213)][_0x1d9954(0x203)])[_0x1d9954(0x24b)](_0x14641f=>_0x14641f[_0x1d9954(0x257)]))!=null?_0x3dc8cd:[],_0x462227=JSON[_0x1d9954(0x260)](_0x360d08),_0x3dbaf7=_0x5e1bbc[_0x1d9954(0x206)],_0x307a96=_0x5e1bbc['id'],_0x2df64e={'memberId':(await this[_0x1d9954(0x234)][_0x1d9954(0x216)](_0x2b2a30))['getMemberID'](),'unitId':_0x2b2a30,'threadId':_0x3dbaf7,'mention':_0x4c27d2,'content':_0x462227,'replyId':_0x307a96},_0x497961=await this['_httpService'][_0x1d9954(0x1f8)](_0x1d9954(0x222)+_0x2b2a30+_0x1d9954(0x237),{'body':_0x2df64e});return!_0x497961['body'][_0x1d9954(0x1f5)]||_0x497961['body'][_0x1d9954(0x1f5)][_0x1d9954(0x20b)]===0x1;}async['resolveComment'](_0x37cdb7){const _0x4f598a=_0x5ef928,{unitId:_0x5df411}=_0x37cdb7,_0x349ab9=_0x37cdb7[_0x4f598a(0x206)],_0x5aa085={'memberId':this['_userService'][_0x4f598a(0x25c)]()[_0x4f598a(0x269)],'unitId':_0x5df411,'threadId':_0x349ab9,'solved':_0x37cdb7[_0x4f598a(0x266)]?I[_0x4f598a(0x205)]:I[_0x4f598a(0x243)]},_0x2d1d4b=await this['_httpService'][_0x4f598a(0x1f8)](_0x4f598a(0x222)+_0x5df411+_0x4f598a(0x22c),{'body':_0x5aa085});return!_0x2d1d4b[_0x4f598a(0x268)][_0x4f598a(0x1f5)]||_0x2d1d4b['body'][_0x4f598a(0x1f5)]['code']===0x1;}async[_0x5ef928(0x1f6)](_0x44c7c1,_0x4afaa3,_0x1c0531,_0x1a206e){const _0x44190e=_0x5ef928,_0x98497c={'memberId':(await this[_0x44190e(0x234)]['requireSession'](_0x44c7c1))[_0x44190e(0x220)](),'threadId':_0x1c0531,'replyId':_0x1a206e,'unitId':_0x44c7c1},_0x2c21dd=await this[_0x44190e(0x23c)]['post'](_0x44190e(0x222)+_0x44c7c1+_0x44190e(0x24a),{'body':_0x98497c});return!_0x2c21dd[_0x44190e(0x268)][_0x44190e(0x1f5)]||_0x2c21dd[_0x44190e(0x268)][_0x44190e(0x1f5)][_0x44190e(0x20b)]===0x1;}async['listComments'](_0x542e31,_0x29d9bb,_0x109419){const _0x2b8474=_0x5ef928,_0x15f2a9={'unitId':_0x542e31,'threadId':_0x109419},_0x259fcb=await this[_0x2b8474(0x23c)][_0x2b8474(0x1f8)](_0x2b8474(0x222)+_0x542e31+'/list',{'body':_0x15f2a9}),_0x15f134=_0x109419[_0x2b8474(0x24b)](_0x5282a=>G(_0x259fcb[_0x2b8474(0x268)][_0x2b8474(0x200)][_0x5282a],_0x542e31,_0x29d9bb))['filter'](Boolean);return Object[_0x2b8474(0x20f)](_0x259fcb[_0x2b8474(0x268)][_0x2b8474(0x1f1)])[_0x2b8474(0x20a)](_0x56bc07=>{const _0xc1629d=_0x2b8474;this[_0xc1629d(0x242)]['addUser'](_0x56bc07);}),_0x15f134;}['saveCommentToSnapshot'](_0x383318){const _0x21ab27=_0x5ef928;return{'id':_0x383318['id'],'threadId':_0x383318[_0x21ab27(0x206)],'ref':_0x383318[_0x21ab27(0x219)]};}};p=x([C(0x0,c[_0x5ef928(0x24d)](P['HTTPService'])),C(0x1,c[_0x5ef928(0x24d)](c[_0x5ef928(0x21a)])),C(0x2,c[_0x5ef928(0x24d)](b[_0x5ef928(0x244)]))],p);function _0x12fb(){const _0x31480c=['comments','Reply','personId','COMMENT','getOwnPropertyDescriptor','Solved','threadId','slice','Delete','getUser','forEach','code','UniverThreadCommentDataSourcePlugin','Disposable','comment','values','syncUpdateMutationToColla','Plugin','Module','CustomRangeType','onStarting','/add','requireSession','user','payload','ref','UserManagerService','44ZiLvBE','parse','908159fkpwme','getUnit','size','getMemberID','length','/universer-api/comment/unit/','updateComment','onReady','2121850dqBQBo','type','Injector','_initUserSync','_threadCommentDataSource','Edit','find','/solved','pipe','16088VaUtcO','addUser','IThreadCommentDataSourceService','_configService','260297HGQDus','_commentService','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','/edit','Solve','thread-comment-data-source.config','3avzDXL','unitId','_httpService','toStringTag','_init','UNRECOGNIZED','UniverThreadCommentUIPlugin','getComment','_userService','OpenOrReOpen','CollaborationSessionService','addComment','_threadCommentModel','format','801qvlUzD','CommentService','/delete','map','disposeWithMe','Inject','root','filter','1771090aTIPHT','Add','767048voHcyt','12PuelDj','get','IConfigService','userId','rangeId','dayjs','setConfig','customRanges','subscribe','getCurrentUser','_threadCommentDataSourceService','solved','rangeType','stringify','_initDataSource','commentUpdate$','createTimestamp','replyId','UNIVER_UNKNOWN','resolved','bufferTime','body','userID','users','_config','389806eHxUnX','UniverLicensePlugin','error','deleteComment','defineProperty','post','ThreadCommentModel','replies','dataSource','merge','UniverInstanceType','content','_injector'];_0x12fb=function(){return _0x31480c;};return _0x12fb();}var H=Object['getOwnPropertyDescriptor'],J=(_0x2fa159,_0xd46718,_0x50c59e,_0x1c0d11)=>{const _0x33695e=_0x5ef928;for(var _0x389e2f=_0x1c0d11>0x1?void 0x0:_0x1c0d11?H(_0xd46718,_0x50c59e):_0xd46718,_0x43c0a5=_0x2fa159[_0x33695e(0x221)]-0x1,_0x1c3b61;_0x43c0a5>=0x0;_0x43c0a5--)(_0x1c3b61=_0x2fa159[_0x43c0a5])&&(_0x389e2f=_0x1c3b61(_0x389e2f)||_0x389e2f);return _0x389e2f;},y=(_0x3348f3,_0x1572db)=>(_0x1c1a11,_0x141c00)=>_0x1572db(_0x1c1a11,_0x141c00,_0x3348f3);let g=class extends c[_0x5ef928(0x20d)]{constructor(_0x384aff,_0xed0473){const _0x2b153a=_0x5ef928;super(),this[_0x2b153a(0x25d)]=_0x384aff,this['_threadCommentDataSource']=_0xed0473,this[_0x2b153a(0x261)]();}['_initDataSource'](){const _0x4f8144=_0x5ef928;this[_0x4f8144(0x25d)][_0x4f8144(0x1fb)]=this[_0x4f8144(0x229)],this[_0x4f8144(0x25d)][_0x4f8144(0x210)]=!0x1;}};g=J([y(0x0,M[_0x5ef928(0x230)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x776b2f,_0x2af723,_0x492030)=>_0x2af723 in _0x776b2f?F(_0x776b2f,_0x2af723,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x492030}):_0x776b2f[_0x2af723]=_0x492030,W=(_0x417421,_0x5db30a,_0x584b37,_0x1a1dc8)=>{const _0xbcfa4a=_0x5ef928;for(var _0x1a2bc0=_0x1a1dc8>0x1?void 0x0:_0x1a1dc8?L(_0x5db30a,_0x584b37):_0x5db30a,_0x56f44f=_0x417421[_0xbcfa4a(0x221)]-0x1,_0x303c5e;_0x56f44f>=0x0;_0x56f44f--)(_0x303c5e=_0x417421[_0x56f44f])&&(_0x1a2bc0=_0x303c5e(_0x1a2bc0)||_0x1a2bc0);return _0x1a2bc0;},O=(_0x149ae4,_0x82400f)=>(_0x46130c,_0x37c8a6)=>_0x82400f(_0x46130c,_0x37c8a6,_0x149ae4),N=(_0x3795e7,_0x509106,_0x100f57)=>Z(_0x3795e7,typeof _0x509106!='symbol'?_0x509106+'':_0x509106,_0x100f57);exports[_0x5ef928(0x20c)]=class extends c[_0x5ef928(0x211)]{constructor(_0x39c237=D,_0x5185c6,_0x2966f4){const _0x2c06ca=_0x5ef928;super(),this['_config']=_0x39c237,this[_0x2c06ca(0x1ff)]=_0x5185c6,this['_configService']=_0x2966f4;const {..._0x3bfe03}=c[_0x2c06ca(0x1fc)]({},D,this[_0x2c06ca(0x1f2)]);this[_0x2c06ca(0x231)][_0x2c06ca(0x259)](q,_0x3bfe03);}[_0x5ef928(0x214)](){const _0x44a352=_0x5ef928;[[p],[g],[_]][_0x44a352(0x20a)](_0x5b8b19=>{const _0x370673=_0x44a352;this[_0x370673(0x1ff)][_0x370673(0x236)](_0x5b8b19);});}[_0x5ef928(0x224)](){const _0x56c194=_0x5ef928;this[_0x56c194(0x1ff)]['get'](g),this[_0x56c194(0x1ff)][_0x56c194(0x254)](_);}},N(exports[_0x5ef928(0x20c)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x5ef928(0x1fd)][_0x5ef928(0x265)]),exports[_0x5ef928(0x20c)]=W([c['DependentOn'](w[_0x5ef928(0x240)],b['UniverCollaborationClientPlugin'],T[_0x5ef928(0x1f4)]),O(0x1,c['Inject'](c[_0x5ef928(0x227)])),O(0x2,c[_0x5ef928(0x255)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x3f2e8c=_0x5675;function _0x5675(_0x16a61a,_0x45e333){const _0x3bbdc7=_0x3bbd();return _0x5675=function(_0x5675a8,_0x3f3003){_0x5675a8=_0x5675a8-0x12a;let _0x560438=_0x3bbdc7[_0x5675a8];return _0x560438;},_0x5675(_0x16a61a,_0x45e333);}(function(_0x586374,_0x7959){const _0x3f266b=_0x5675,_0x1e90cc=_0x586374();while(!![]){try{const _0x4a7e94=-parseInt(_0x3f266b(0x148))/0x1*(parseInt(_0x3f266b(0x18d))/0x2)+parseInt(_0x3f266b(0x18c))/0x3+parseInt(_0x3f266b(0x19b))/0x4*(-parseInt(_0x3f266b(0x147))/0x5)+-parseInt(_0x3f266b(0x131))/0x6*(parseInt(_0x3f266b(0x155))/0x7)+parseInt(_0x3f266b(0x198))/0x8+parseInt(_0x3f266b(0x152))/0x9+-parseInt(_0x3f266b(0x15c))/0xa;if(_0x4a7e94===_0x7959)break;else _0x1e90cc['push'](_0x1e90cc['shift']());}catch(_0x596b31){_0x1e90cc['push'](_0x1e90cc['shift']());}}}(_0x3bbd,0x25969));Object[_0x3f2e8c(0x186)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3c89fc=>(_0x3c89fc[_0x3c89fc['OpenOrReOpen']=0x0]=_0x3f2e8c(0x177),_0x3c89fc[_0x3c89fc[_0x3f2e8c(0x191)]=0x1]=_0x3f2e8c(0x191),_0x3c89fc[_0x3c89fc[_0x3f2e8c(0x197)]=-0x1]=_0x3f2e8c(0x197),_0x3c89fc))(I||{}),v=(_0x2f572f=>(_0x2f572f[_0x2f572f[_0x3f2e8c(0x158)]=0x0]=_0x3f2e8c(0x158),_0x2f572f[_0x2f572f[_0x3f2e8c(0x17d)]=0x1]='Add',_0x2f572f[_0x2f572f[_0x3f2e8c(0x150)]=0x2]=_0x3f2e8c(0x150),_0x2f572f[_0x2f572f[_0x3f2e8c(0x166)]=0x3]=_0x3f2e8c(0x166),_0x2f572f[_0x2f572f[_0x3f2e8c(0x143)]=0x4]='Delete',_0x2f572f[_0x2f572f[_0x3f2e8c(0x18a)]=0x5]=_0x3f2e8c(0x18a),_0x2f572f[_0x2f572f['UNRECOGNIZED']=-0x1]=_0x3f2e8c(0x197),_0x2f572f))(v||{});const f=_0x222932=>c[_0x3f2e8c(0x16a)](new Date(+_0x222932))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x3b0d23,_0x1c184e)=>{const _0x3bd054=_0x3f2e8c,_0xa098a9=_0x3b0d23[_0x3bd054(0x16d)](c[_0x3bd054(0x156)]),_0x1022fc=_0x3b0d23[_0x3bd054(0x16d)](P[_0x3bd054(0x17f)]);_0x1c184e[_0x3bd054(0x19d)](_0x580c37=>{const _0x146c21=_0x3bd054;_0xa098a9[_0x146c21(0x175)](_0x580c37)&&_0x1c184e[_0x146c21(0x19e)](_0x580c37);}),_0x1c184e['size']&&(await _0x1022fc['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x1c184e]}}))[_0x3bd054(0x176)][_0x3bd054(0x161)][_0x3bd054(0x19d)](_0x4cb1b8=>{const _0x2e553a=_0x3bd054;_0x4cb1b8&&_0xa098a9[_0x2e553a(0x18e)](_0x4cb1b8);});};var $=Object[_0x3f2e8c(0x180)],E=(_0x676033,_0x4369d2,_0x553f3b,_0xc2757a)=>{const _0xf46b4e=_0x3f2e8c;for(var _0x161747=_0xc2757a>0x1?void 0x0:_0xc2757a?$(_0x4369d2,_0x553f3b):_0x4369d2,_0x3a6554=_0x676033[_0xf46b4e(0x132)]-0x1,_0x381711;_0x3a6554>=0x0;_0x3a6554--)(_0x381711=_0x676033[_0x3a6554])&&(_0x161747=_0x381711(_0x161747)||_0x161747);return _0x161747;},S=(_0x4117ec,_0x22f495)=>(_0x34957d,_0x2e3f01)=>_0x22f495(_0x34957d,_0x2e3f01,_0x4117ec);let _=class extends c['Disposable']{constructor(_0x1310e2,_0x552e49,_0x287bd5,_0x6114f4){const _0x5bb7fb=_0x3f2e8c;super(),this['_commentService']=_0x1310e2,this[_0x5bb7fb(0x162)]=_0x552e49,this[_0x5bb7fb(0x12b)]=_0x287bd5,this[_0x5bb7fb(0x15a)]=_0x6114f4,this[_0x5bb7fb(0x13a)](),this[_0x5bb7fb(0x171)]();}['_initUserSync'](){const _0x4747c8=_0x3f2e8c;this['disposeWithMe'](this[_0x4747c8(0x162)][_0x4747c8(0x16b)][_0x4747c8(0x168)](j[_0x4747c8(0x134)](0x10))[_0x4747c8(0x140)](_0x58c355=>{const _0x160a09=_0x4747c8,_0x181377=new Set();_0x58c355[_0x160a09(0x19d)](_0xbe9422=>{const _0x414b1c=_0x160a09;switch(_0xbe9422[_0x414b1c(0x14a)]){case _0x414b1c(0x179):{const _0x5503d3=_0xbe9422['payload'][_0x414b1c(0x172)];_0x181377['add'](_0x5503d3);break;}}}),R(this['_injector'],_0x181377);}));}['_init'](){const _0x4effc3=_0x3f2e8c;this[_0x4effc3(0x182)](this['_commentService'][_0x4effc3(0x16b)][_0x4effc3(0x140)](async _0x50cb02=>{const _0x3729d8=_0x4effc3;var _0x5ca97e,_0x1fd7d3,_0x6402d5,_0x40806f;const _0x2130f9=(_0x5ca97e=this[_0x3729d8(0x162)]['getUnit'](_0x50cb02[_0x3729d8(0x12c)])[_0x3729d8(0x174)](_0x47a1ce=>_0x47a1ce[_0x3729d8(0x12d)]===_0x50cb02[_0x3729d8(0x12d)]))==null?void 0x0:_0x5ca97e[_0x3729d8(0x183)];if(!_0x2130f9)return;const {unitId:_0x4462df,subUnitId:_0x765853}=_0x2130f9;switch(_0x50cb02['user']&&this['_userService'][_0x3729d8(0x18e)](_0x50cb02['user']),_0x50cb02[_0x3729d8(0x14a)]){case v[_0x3729d8(0x17d)]:break;case v[_0x3729d8(0x150)]:{this[_0x3729d8(0x162)][_0x3729d8(0x169)](_0x4462df,_0x765853,{'unitId':_0x4462df,'subUnitId':_0x765853,'ref':'','id':_0x50cb02['replyId'],'dT':f(+_0x50cb02[_0x3729d8(0x196)]),'threadId':_0x50cb02[_0x3729d8(0x12d)],'personId':(_0x6402d5=(_0x1fd7d3=_0x50cb02[_0x3729d8(0x14e)])==null?void 0x0:_0x1fd7d3[_0x3729d8(0x195)])!=null?_0x6402d5:_0x50cb02[_0x3729d8(0x19a)],'text':JSON[_0x3729d8(0x12e)](_0x50cb02[_0x3729d8(0x189)]),'parentId':_0x2130f9['id']});break;}case v[_0x3729d8(0x143)]:{const _0x56c7c8=this[_0x3729d8(0x162)]['getComment'](_0x4462df,_0x765853,_0x50cb02['replyId']);_0x56c7c8&&_0x56c7c8[_0x3729d8(0x163)]&&this[_0x3729d8(0x162)][_0x3729d8(0x157)](_0x4462df,_0x765853,_0x50cb02['replyId']);break;}case v[_0x3729d8(0x166)]:{this[_0x3729d8(0x162)][_0x3729d8(0x138)](_0x4462df,_0x765853,{'commentId':_0x50cb02[_0x3729d8(0x149)],'text':JSON[_0x3729d8(0x12e)](_0x50cb02[_0x3729d8(0x189)])});break;}case v[_0x3729d8(0x18a)]:{const _0x9e62c2=(_0x40806f=this[_0x3729d8(0x162)]['getUnit'](_0x50cb02[_0x3729d8(0x12c)])[_0x3729d8(0x174)](_0x48d7b0=>_0x48d7b0[_0x3729d8(0x12d)]===_0x50cb02[_0x3729d8(0x12d)]))==null?void 0x0:_0x40806f[_0x3729d8(0x183)];_0x9e62c2&&this[_0x3729d8(0x162)][_0x3729d8(0x14b)](_0x4462df,_0x765853,_0x9e62c2['id'],_0x50cb02[_0x3729d8(0x192)]===I[_0x3729d8(0x191)]);break;}}}));}};_=E([S(0x0,c[_0x3f2e8c(0x199)](b[_0x3f2e8c(0x178)])),S(0x1,c[_0x3f2e8c(0x199)](M['ThreadCommentModel'])),S(0x2,c[_0x3f2e8c(0x199)](c[_0x3f2e8c(0x156)])),S(0x3,c['Inject'](c[_0x3f2e8c(0x137)]))],_);const q=_0x3f2e8c(0x153),D={};var A=Object[_0x3f2e8c(0x180)],x=(_0x2850ae,_0x73c04b,_0x5d437b,_0x74c1ed)=>{const _0x47e50e=_0x3f2e8c;for(var _0x311039=_0x74c1ed>0x1?void 0x0:_0x74c1ed?A(_0x73c04b,_0x5d437b):_0x73c04b,_0x426a91=_0x2850ae[_0x47e50e(0x132)]-0x1,_0x14259e;_0x426a91>=0x0;_0x426a91--)(_0x14259e=_0x2850ae[_0x426a91])&&(_0x311039=_0x14259e(_0x311039)||_0x311039);return _0x311039;},C=(_0x232df3,_0x292d02)=>(_0x4870cd,_0x128345)=>_0x292d02(_0x4870cd,_0x128345,_0x232df3);function Y(_0x16607a,_0x56eb53){const _0xedb219=_0x3f2e8c,_0x5a8853=_0x16607a[_0xedb219(0x141)][0x0];return{..._0x56eb53,'id':_0x5a8853['replyId'],'resolved':_0x16607a['solved']===0x1,'dT':f(_0x5a8853[_0xedb219(0x196)]),'personId':_0x5a8853[_0xedb219(0x19a)],'threadId':_0x5a8853[_0xedb219(0x12d)]};}function G(_0x3f2af7,_0x4f0375,_0x46ffc2){const _0x2ca8c5=_0x3f2e8c;var _0x145810,_0x28c57d;if(((_0x28c57d=(_0x145810=_0x3f2af7==null?void 0x0:_0x3f2af7['replies'])==null?void 0x0:_0x145810[_0x2ca8c5(0x132)])!=null?_0x28c57d:0x0)>0x0){const _0x4da385=(_0x1ac5a6,_0x67fe69)=>({'id':_0x1ac5a6[_0x2ca8c5(0x149)],'threadId':_0x1ac5a6[_0x2ca8c5(0x12d)],'dT':f(_0x1ac5a6[_0x2ca8c5(0x196)]),'personId':_0x1ac5a6[_0x2ca8c5(0x19a)],'resolved':_0x3f2af7[_0x2ca8c5(0x192)]===I[_0x2ca8c5(0x191)],'unitId':_0x4f0375,'subUnitId':_0x46ffc2,'text':JSON[_0x2ca8c5(0x12e)](_0x1ac5a6[_0x2ca8c5(0x189)]),'parentId':_0x67fe69}),_0x18463e=_0x4da385(_0x3f2af7[_0x2ca8c5(0x141)][0x0]);return{..._0x18463e,'children':_0x3f2af7[_0x2ca8c5(0x141)][_0x2ca8c5(0x133)](0x1)[_0x2ca8c5(0x13f)](_0x48e1cd=>_0x4da385(_0x48e1cd,_0x18463e['id']))};}return null;}function _0x3bbd(){const _0x1625aa=['_httpService','UniverThreadCommentUIPlugin','Edit','DependentOn','pipe','addComment','dayjs','commentUpdate$','/edit','get','_threadCommentDataSource','_config','stringify','_initUserSync','personId','COMMENT','find','getUser','body','OpenOrReOpen','CommentService','add','syncUpdateMutationToColla','filter','UniverLicensePlugin','Add','resolved','HTTPService','getOwnPropertyDescriptor','post','disposeWithMe','root','IConfigService','onReady','defineProperty','IThreadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','content','Solve','format','914391envQJP','2566zrxgPw','addUser','UNIVER_UNKNOWN','Plugin','Solved','solved','getCurrentUser','rangeId','userID','createTimestamp','UNRECOGNIZED','1652920HmZjqY','Inject','userId','4KbrCqF','requireSession','forEach','delete','values','customRanges','comment','_threadCommentDataSourceService','_userService','unitId','threadId','parse','pluginName','CustomRangeType','417114vwRgcT','length','slice','bufferTime','/delete','/solved','Injector','updateComment','ref','_init','listComments','_initDataSource','error','YYYY/MM/DD\x20HH:mm','map','subscribe','replies','UniverInstanceType','Delete','dataSource','/list','_configService','284910ikoYNa','22azbkks','replyId','type','resolveComment','rangeType','/universer-api/comment/unit/','user','merge','Reply','onStarting','946242NrgQut','thread-comment-data-source.config','/add','7SnGoYq','UserManagerService','deleteComment','Unknown','UniverCollaborationClientPlugin','_injector','_sessionService','3078620qqVXGv','getMemberID','/reply','reply','Disposable','users','_threadCommentModel','parentId'];_0x3bbd=function(){return _0x1625aa;};return _0x3bbd();}let p=class{constructor(_0xd4e7ea,_0x19a241,_0x551510){const _0x2b0a5e=_0x3f2e8c;this[_0x2b0a5e(0x164)]=_0xd4e7ea,this[_0x2b0a5e(0x12b)]=_0x19a241,this[_0x2b0a5e(0x15b)]=_0x551510;}async[_0x3f2e8c(0x169)](_0xe010cd){const _0x3140c3=_0x3f2e8c;var _0x587c66,_0x2fefe5;const {parentId:_0x213c2c,unitId:_0x4e3ce8,text:_0x23706e,threadId:_0x166cda}=_0xe010cd,_0x5ef2e6=(_0x2fefe5=(_0x587c66=_0x23706e[_0x3140c3(0x1a0)])==null?void 0x0:_0x587c66['filter'](_0x34929d=>_0x34929d[_0x3140c3(0x14c)]===c[_0x3140c3(0x130)][_0x3140c3(0x173)])[_0x3140c3(0x13f)](_0x52c771=>_0x52c771[_0x3140c3(0x194)]))!=null?_0x2fefe5:[],_0x3008f5=JSON[_0x3140c3(0x170)](_0x23706e),_0x283202=(await this['_sessionService']['requireSession'](_0x4e3ce8))['getMemberID']();if(_0x213c2c){const _0xe72f97={'memberId':_0x283202,'unitId':_0x4e3ce8,'content':_0x3008f5,'mention':_0x5ef2e6,'threadId':_0x166cda},_0xd349b4=(await this['_httpService'][_0x3140c3(0x181)](_0x3140c3(0x14d)+_0x4e3ce8+_0x3140c3(0x15e),{'body':_0xe72f97}))['body'][_0x3140c3(0x15f)];return{..._0xe010cd,'id':_0xd349b4['replyId'],'dT':c[_0x3140c3(0x16a)](+_0xd349b4[_0x3140c3(0x196)])[_0x3140c3(0x18b)](_0x3140c3(0x13e)),'personId':_0xd349b4[_0x3140c3(0x19a)]};}else{const _0x592d62={'memberId':_0x283202,'unitId':_0x4e3ce8,'content':_0x3008f5,'mention':_0x5ef2e6},_0x506d0f=await this[_0x3140c3(0x164)][_0x3140c3(0x181)](_0x3140c3(0x14d)+_0x4e3ce8+_0x3140c3(0x154),{'body':_0x592d62});return Y(_0x506d0f[_0x3140c3(0x176)][_0x3140c3(0x1a1)],_0xe010cd);}}async[_0x3f2e8c(0x138)](_0x51306b){const _0x4e7b5b=_0x3f2e8c;var _0x2fd154,_0x1d8b52;const {text:_0x36dc8d,unitId:_0x477d4b}=_0x51306b,_0x453b1f=(_0x1d8b52=(_0x2fd154=_0x36dc8d['customRanges'])==null?void 0x0:_0x2fd154[_0x4e7b5b(0x17b)](_0x500364=>_0x500364[_0x4e7b5b(0x14c)]===c[_0x4e7b5b(0x130)]['COMMENT'])[_0x4e7b5b(0x13f)](_0x31ec20=>_0x31ec20['rangeId']))!=null?_0x1d8b52:[],_0x2038b9=JSON[_0x4e7b5b(0x170)](_0x36dc8d),_0x4529f8=_0x51306b['threadId'],_0x36d580=_0x51306b['id'],_0x1a1079={'memberId':(await this['_sessionService'][_0x4e7b5b(0x19c)](_0x477d4b))[_0x4e7b5b(0x15d)](),'unitId':_0x477d4b,'threadId':_0x4529f8,'mention':_0x453b1f,'content':_0x2038b9,'replyId':_0x36d580},_0x348d96=await this[_0x4e7b5b(0x164)]['post'](_0x4e7b5b(0x14d)+_0x477d4b+_0x4e7b5b(0x16c),{'body':_0x1a1079});return!_0x348d96[_0x4e7b5b(0x176)][_0x4e7b5b(0x13d)]||_0x348d96['body'][_0x4e7b5b(0x13d)]['code']===0x1;}async[_0x3f2e8c(0x14b)](_0x321d12){const _0x509806=_0x3f2e8c,{unitId:_0x5e3ddd}=_0x321d12,_0x14b49e=_0x321d12[_0x509806(0x12d)],_0x2bacf2={'memberId':this[_0x509806(0x12b)][_0x509806(0x193)]()['userID'],'unitId':_0x5e3ddd,'threadId':_0x14b49e,'solved':_0x321d12[_0x509806(0x17e)]?I['Solved']:I['OpenOrReOpen']},_0x31b103=await this[_0x509806(0x164)][_0x509806(0x181)](_0x509806(0x14d)+_0x5e3ddd+_0x509806(0x136),{'body':_0x2bacf2});return!_0x31b103[_0x509806(0x176)][_0x509806(0x13d)]||_0x31b103['body'][_0x509806(0x13d)]['code']===0x1;}async['deleteComment'](_0x1ca91c,_0x1db0ff,_0x13778f,_0x3a2e3d){const _0x45db4e=_0x3f2e8c,_0x215d42={'memberId':(await this[_0x45db4e(0x15b)]['requireSession'](_0x1ca91c))[_0x45db4e(0x15d)](),'threadId':_0x13778f,'replyId':_0x3a2e3d,'unitId':_0x1ca91c},_0x3fb0db=await this[_0x45db4e(0x164)][_0x45db4e(0x181)](_0x45db4e(0x14d)+_0x1ca91c+_0x45db4e(0x135),{'body':_0x215d42});return!_0x3fb0db[_0x45db4e(0x176)][_0x45db4e(0x13d)]||_0x3fb0db[_0x45db4e(0x176)][_0x45db4e(0x13d)]['code']===0x1;}async[_0x3f2e8c(0x13b)](_0x4301a4,_0x234b14,_0x8f6b6e){const _0x18505b=_0x3f2e8c,_0x2a8f37={'unitId':_0x4301a4,'threadId':_0x8f6b6e},_0x484a8e=await this[_0x18505b(0x164)][_0x18505b(0x181)](_0x18505b(0x14d)+_0x4301a4+_0x18505b(0x145),{'body':_0x2a8f37}),_0x380e31=_0x8f6b6e[_0x18505b(0x13f)](_0x17881c=>G(_0x484a8e[_0x18505b(0x176)]['comments'][_0x17881c],_0x4301a4,_0x234b14))['filter'](Boolean);return Object[_0x18505b(0x19f)](_0x484a8e[_0x18505b(0x176)][_0x18505b(0x161)])[_0x18505b(0x19d)](_0x453d99=>{const _0x4e6a4d=_0x18505b;this[_0x4e6a4d(0x12b)][_0x4e6a4d(0x18e)](_0x453d99);}),_0x380e31;}['saveCommentToSnapshot'](_0x679a04){const _0x48706d=_0x3f2e8c;return{'id':_0x679a04['id'],'threadId':_0x679a04[_0x48706d(0x12d)],'ref':_0x679a04[_0x48706d(0x139)]};}};p=x([C(0x0,c[_0x3f2e8c(0x199)](P[_0x3f2e8c(0x17f)])),C(0x1,c[_0x3f2e8c(0x199)](c[_0x3f2e8c(0x156)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x31b805,_0x3c8d65,_0x15162f,_0x121738)=>{const _0x330da6=_0x3f2e8c;for(var _0x5b638e=_0x121738>0x1?void 0x0:_0x121738?H(_0x3c8d65,_0x15162f):_0x3c8d65,_0x50f7a6=_0x31b805[_0x330da6(0x132)]-0x1,_0x2a4c21;_0x50f7a6>=0x0;_0x50f7a6--)(_0x2a4c21=_0x31b805[_0x50f7a6])&&(_0x5b638e=_0x2a4c21(_0x5b638e)||_0x5b638e);return _0x5b638e;},y=(_0x4e6cc6,_0x1f95e1)=>(_0x5392e5,_0x39daf9)=>_0x1f95e1(_0x5392e5,_0x39daf9,_0x4e6cc6);let g=class extends c[_0x3f2e8c(0x160)]{constructor(_0x2a36c7,_0x346831){const _0x2b15f0=_0x3f2e8c;super(),this['_threadCommentDataSourceService']=_0x2a36c7,this[_0x2b15f0(0x16e)]=_0x346831,this[_0x2b15f0(0x13c)]();}[_0x3f2e8c(0x13c)](){const _0x550a0a=_0x3f2e8c;this[_0x550a0a(0x12a)][_0x550a0a(0x144)]=this[_0x550a0a(0x16e)],this[_0x550a0a(0x12a)][_0x550a0a(0x17a)]=!0x1;}};g=J([y(0x0,M[_0x3f2e8c(0x187)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x3f2e8c(0x180)],Z=(_0x4d1219,_0x615691,_0x12a143)=>_0x615691 in _0x4d1219?F(_0x4d1219,_0x615691,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12a143}):_0x4d1219[_0x615691]=_0x12a143,W=(_0x1e6544,_0x95c62d,_0x509cdf,_0xb25b8b)=>{const _0x582af2=_0x3f2e8c;for(var _0x2a27be=_0xb25b8b>0x1?void 0x0:_0xb25b8b?L(_0x95c62d,_0x509cdf):_0x95c62d,_0x4aa9af=_0x1e6544[_0x582af2(0x132)]-0x1,_0x152715;_0x4aa9af>=0x0;_0x4aa9af--)(_0x152715=_0x1e6544[_0x4aa9af])&&(_0x2a27be=_0x152715(_0x2a27be)||_0x2a27be);return _0x2a27be;},O=(_0x580b3d,_0x261c6a)=>(_0x359132,_0x1456a7)=>_0x261c6a(_0x359132,_0x1456a7,_0x580b3d),N=(_0x4b00e7,_0x27b019,_0x203909)=>Z(_0x4b00e7,typeof _0x27b019!='symbol'?_0x27b019+'':_0x27b019,_0x203909);exports[_0x3f2e8c(0x188)]=class extends c[_0x3f2e8c(0x190)]{constructor(_0x2b9880=D,_0x21be5c,_0x56a8a8){const _0x53a5c1=_0x3f2e8c;super(),this[_0x53a5c1(0x16f)]=_0x2b9880,this[_0x53a5c1(0x15a)]=_0x21be5c,this[_0x53a5c1(0x146)]=_0x56a8a8;const {..._0x4fb298}=c[_0x53a5c1(0x14f)]({},D,this[_0x53a5c1(0x16f)]);this['_configService']['setConfig'](q,_0x4fb298);}[_0x3f2e8c(0x151)](){const _0x22390b=_0x3f2e8c;[[p],[g],[_]][_0x22390b(0x19d)](_0xf568e4=>{const _0x5e3122=_0x22390b;this['_injector'][_0x5e3122(0x179)](_0xf568e4);});}[_0x3f2e8c(0x185)](){const _0xe3750f=_0x3f2e8c;this[_0xe3750f(0x15a)][_0xe3750f(0x16d)](g),this[_0xe3750f(0x15a)][_0xe3750f(0x16d)](_);}},N(exports[_0x3f2e8c(0x188)],_0x3f2e8c(0x12f),U),N(exports[_0x3f2e8c(0x188)],_0x3f2e8c(0x14a),c[_0x3f2e8c(0x142)][_0x3f2e8c(0x18f)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3f2e8c(0x167)](w[_0x3f2e8c(0x165)],b[_0x3f2e8c(0x159)],T[_0x3f2e8c(0x17c)]),O(0x1,c[_0x3f2e8c(0x199)](c[_0x3f2e8c(0x137)])),O(0x2,c[_0x3f2e8c(0x184)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4814(){const _0x11b246=['onStarting','defineProperty','4710olXwop','771357SbzGWX','_injector','getCurrentUser','462GIGnYj','Reply','format','root','updateComment','subscribe','714649oTjIAe','userID','find','Add','dataSource','payload','getComment','get','_commentService','/delete','error','rangeType','comments','Delete','_userService','addUser','_sessionService','YYYY/MM/DD\x20HH:mm','_config','add','5ivsSam','customRanges','/reply','disposeWithMe','pipe','replies','userId','UNRECOGNIZED','ref','/list','deleteComment','Solve','2569ZTXJVD','8728UUrvCo','map','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','stringify','getMemberID','symbol','_threadCommentDataSourceService','_threadCommentModel','requireSession','60OiUnGh','/edit','/universer-api/user/list','/universer-api/comment/unit/','personId','rangeId','forEach','createTimestamp','8715550UFJJXV','length','Solved','unitId','resolveComment','_initDataSource','_threadCommentDataSource','filter','Edit','20gTmCEM','listComments','_configService','/add','OpenOrReOpen','type','thread-comment-data-source.config','threadId','content','parentId','9wmbglT','size','17006990MEXzbB','post','getUnit','getUser','saveCommentToSnapshot','addComment','8991690WOjqBj','body','commentUpdate$','_init','parse','replyId','COMMENT','getOwnPropertyDescriptor','solved','_httpService','_initUserSync'];_0x4814=function(){return _0x11b246;};return _0x4814();}function _0x218f(_0x4b76e1,_0x413778){const _0x481484=_0x4814();return _0x218f=function(_0x218fc3,_0x3c7f1e){_0x218fc3=_0x218fc3-0x187;let _0x1880be=_0x481484[_0x218fc3];return _0x1880be;},_0x218f(_0x4b76e1,_0x413778);}const _0x15315d=_0x218f;(function(_0x501999,_0x2af538){const _0x203cdd=_0x218f,_0x11f977=_0x501999();while(!![]){try{const _0x1893db=-parseInt(_0x203cdd(0x1d1))/0x1*(parseInt(_0x203cdd(0x1cd))/0x2)+parseInt(_0x203cdd(0x1ce))/0x3*(parseInt(_0x203cdd(0x1ae))/0x4)+-parseInt(_0x203cdd(0x1eb))/0x5*(parseInt(_0x203cdd(0x1c0))/0x6)+parseInt(_0x203cdd(0x191))/0x7*(-parseInt(_0x203cdd(0x192))/0x8)+parseInt(_0x203cdd(0x1b8))/0x9*(parseInt(_0x203cdd(0x1a5))/0xa)+parseInt(_0x203cdd(0x1ba))/0xb+-parseInt(_0x203cdd(0x19d))/0xc*(-parseInt(_0x203cdd(0x1d7))/0xd);if(_0x1893db===_0x2af538)break;else _0x11f977['push'](_0x11f977['shift']());}catch(_0x5add9e){_0x11f977['push'](_0x11f977['shift']());}}}(_0x4814,0xf1f6b));import{CommentService as _0x355e60,CollaborationSessionService as _0x56c3dd,UniverCollaborationClientPlugin as _0x3defc2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c0bae}from'@univerjs-pro/license';import{dayjs as _0x3fdb47,UserManagerService as _0x496983,Inject as _0x258254,Injector as _0x3140ef,Disposable as _0x1bd91a,CustomRangeType as _0x57a38e,UniverInstanceType as _0x1d08b7,DependentOn as _0x52ca66,IConfigService as _0x51fa3a,Plugin as _0xe04b03,merge as _0x4986cb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55dea6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x586c47,IThreadCommentDataSourceService as _0x5953c6}from'@univerjs/thread-comment';import{bufferTime as _0x2c2e5b}from'rxjs';import{HTTPService as _0x42cbce}from'@univerjs/network';const W=_0x15315d(0x195);var I=(_0x1ea0f1=>(_0x1ea0f1[_0x1ea0f1[_0x15315d(0x1b2)]=0x0]=_0x15315d(0x1b2),_0x1ea0f1[_0x1ea0f1[_0x15315d(0x1a7)]=0x1]='Solved',_0x1ea0f1[_0x1ea0f1[_0x15315d(0x18c)]=-0x1]='UNRECOGNIZED',_0x1ea0f1))(I||{}),v=(_0x5479ca=>(_0x5479ca[_0x5479ca['Unknown']=0x0]='Unknown',_0x5479ca[_0x5479ca[_0x15315d(0x1da)]=0x1]=_0x15315d(0x1da),_0x5479ca[_0x5479ca[_0x15315d(0x1d2)]=0x2]=_0x15315d(0x1d2),_0x5479ca[_0x5479ca['Edit']=0x3]='Edit',_0x5479ca[_0x5479ca[_0x15315d(0x1e4)]=0x4]=_0x15315d(0x1e4),_0x5479ca[_0x5479ca[_0x15315d(0x190)]=0x5]=_0x15315d(0x190),_0x5479ca[_0x5479ca[_0x15315d(0x18c)]=-0x1]=_0x15315d(0x18c),_0x5479ca))(v||{});const y=_0x4abd62=>_0x3fdb47(new Date(+_0x4abd62))['format'](_0x15315d(0x1e8)),B=async(_0x5a9daf,_0x560915)=>{const _0x536a4b=_0x15315d,_0x153531=_0x5a9daf[_0x536a4b(0x1de)](_0x496983),_0x5ce420=_0x5a9daf[_0x536a4b(0x1de)](_0x42cbce);_0x560915['forEach'](_0x61e634=>{const _0x14ff7b=_0x536a4b;_0x153531[_0x14ff7b(0x1bd)](_0x61e634)&&_0x560915['delete'](_0x61e634);}),_0x560915[_0x536a4b(0x1b9)]&&(await _0x5ce420[_0x536a4b(0x1de)](_0x536a4b(0x19f),{'params':{'userIDs':[..._0x560915]}}))[_0x536a4b(0x1c1)]['users'][_0x536a4b(0x1a3)](_0x480a84=>{const _0x40990f=_0x536a4b;_0x480a84&&_0x153531[_0x40990f(0x1e6)](_0x480a84);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1dbaed,_0x5dc121,_0x5d98b8,_0x2fec1e)=>{for(var _0x5c157d=_0x2fec1e>0x1?void 0x0:_0x2fec1e?K(_0x5dc121,_0x5d98b8):_0x5dc121,_0x58ff44=_0x1dbaed['length']-0x1,_0x2b057c;_0x58ff44>=0x0;_0x58ff44--)(_0x2b057c=_0x1dbaed[_0x58ff44])&&(_0x5c157d=_0x2b057c(_0x5c157d)||_0x5c157d);return _0x5c157d;},p=(_0x45c2a8,_0x31c84c)=>(_0x31c82,_0x4e8aaa)=>_0x31c84c(_0x31c82,_0x4e8aaa,_0x45c2a8);let _=class extends _0x1bd91a{constructor(_0x40aa42,_0x581c17,_0x41fd70,_0x2bad09){const _0x505a10=_0x15315d;super(),this[_0x505a10(0x1df)]=_0x40aa42,this[_0x505a10(0x19b)]=_0x581c17,this['_userService']=_0x41fd70,this[_0x505a10(0x1cf)]=_0x2bad09,this['_init'](),this[_0x505a10(0x1ca)]();}[_0x15315d(0x1ca)](){const _0x416ef3=_0x15315d;this[_0x416ef3(0x188)](this[_0x416ef3(0x19b)]['commentUpdate$'][_0x416ef3(0x189)](_0x2c2e5b(0x10))['subscribe'](_0x21c475=>{const _0x5a0db4=new Set();_0x21c475['forEach'](_0x526f6c=>{const _0x27fc2b=_0x218f;switch(_0x526f6c[_0x27fc2b(0x1b3)]){case _0x27fc2b(0x1ea):{const _0x596a30=_0x526f6c[_0x27fc2b(0x1dc)][_0x27fc2b(0x1a1)];_0x5a0db4[_0x27fc2b(0x1ea)](_0x596a30);break;}}}),B(this['_injector'],_0x5a0db4);}));}[_0x15315d(0x1c3)](){const _0x3a0953=_0x15315d;this[_0x3a0953(0x188)](this[_0x3a0953(0x1df)][_0x3a0953(0x1c2)][_0x3a0953(0x1d6)](async _0x526e6a=>{const _0x31711f=_0x3a0953;var _0x1efbc9,_0x57aceb,_0x5b47d8,_0x51c6d6;const _0x579b61=(_0x1efbc9=this[_0x31711f(0x19b)][_0x31711f(0x1bc)](_0x526e6a[_0x31711f(0x1a8)])[_0x31711f(0x1d9)](_0x5c2453=>_0x5c2453[_0x31711f(0x1b5)]===_0x526e6a['threadId']))==null?void 0x0:_0x1efbc9[_0x31711f(0x1d4)];if(!_0x579b61)return;const {unitId:_0x58e4e4,subUnitId:_0x4f57f9}=_0x579b61;switch(_0x526e6a[_0x31711f(0x196)]&&this[_0x31711f(0x1e5)][_0x31711f(0x1e6)](_0x526e6a[_0x31711f(0x196)]),_0x526e6a[_0x31711f(0x1b3)]){case v['Add']:break;case v['Reply']:{this[_0x31711f(0x19b)]['addComment'](_0x58e4e4,_0x4f57f9,{'unitId':_0x58e4e4,'subUnitId':_0x4f57f9,'ref':'','id':_0x526e6a[_0x31711f(0x1c5)],'dT':y(+_0x526e6a[_0x31711f(0x1a4)]),'threadId':_0x526e6a[_0x31711f(0x1b5)],'personId':(_0x5b47d8=(_0x57aceb=_0x526e6a['user'])==null?void 0x0:_0x57aceb['userID'])!=null?_0x5b47d8:_0x526e6a[_0x31711f(0x18b)],'text':JSON[_0x31711f(0x1c4)](_0x526e6a['content']),'parentId':_0x579b61['id']});break;}case v[_0x31711f(0x1e4)]:{const _0x69f0a9=this[_0x31711f(0x19b)][_0x31711f(0x1dd)](_0x58e4e4,_0x4f57f9,_0x526e6a[_0x31711f(0x1c5)]);_0x69f0a9&&_0x69f0a9[_0x31711f(0x1b7)]&&this['_threadCommentModel'][_0x31711f(0x18f)](_0x58e4e4,_0x4f57f9,_0x526e6a['replyId']);break;}case v[_0x31711f(0x1ad)]:{this['_threadCommentModel'][_0x31711f(0x1d5)](_0x58e4e4,_0x4f57f9,{'commentId':_0x526e6a[_0x31711f(0x1c5)],'text':JSON[_0x31711f(0x1c4)](_0x526e6a[_0x31711f(0x1b6)])});break;}case v[_0x31711f(0x190)]:{const _0xbb4158=(_0x51c6d6=this[_0x31711f(0x19b)][_0x31711f(0x1bc)](_0x526e6a[_0x31711f(0x1a8)])['find'](_0x5a6551=>_0x5a6551['threadId']===_0x526e6a['threadId']))==null?void 0x0:_0x51c6d6[_0x31711f(0x1d4)];_0xbb4158&&this['_threadCommentModel'][_0x31711f(0x1a9)](_0x58e4e4,_0x4f57f9,_0xbb4158['id'],_0x526e6a[_0x31711f(0x1c8)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x258254(_0x355e60)),p(0x1,_0x258254(_0x586c47)),p(0x2,_0x258254(_0x496983)),p(0x3,_0x258254(_0x3140ef))],_);const z=_0x15315d(0x1b4),O={};var k=Object[_0x15315d(0x1c7)],Q=(_0x5543b0,_0x519ee5,_0x5d7b2b,_0x2c996f)=>{for(var _0x4a6a24=_0x2c996f>0x1?void 0x0:_0x2c996f?k(_0x519ee5,_0x5d7b2b):_0x519ee5,_0x1b93fb=_0x5543b0['length']-0x1,_0x1c8f62;_0x1b93fb>=0x0;_0x1b93fb--)(_0x1c8f62=_0x5543b0[_0x1b93fb])&&(_0x4a6a24=_0x1c8f62(_0x4a6a24)||_0x4a6a24);return _0x4a6a24;},b=(_0x351afe,_0x24a24d)=>(_0x4ba1ec,_0x497c38)=>_0x24a24d(_0x4ba1ec,_0x497c38,_0x351afe);function X(_0x5464cb,_0x34ef2f){const _0x33e879=_0x15315d,_0x4a143e=_0x5464cb[_0x33e879(0x18a)][0x0];return{..._0x34ef2f,'id':_0x4a143e[_0x33e879(0x1c5)],'resolved':_0x5464cb['solved']===0x1,'dT':y(_0x4a143e[_0x33e879(0x1a4)]),'personId':_0x4a143e[_0x33e879(0x18b)],'threadId':_0x4a143e[_0x33e879(0x1b5)]};}function ee(_0x1f72dc,_0x414c28,_0x1c646d){const _0x25699b=_0x15315d;var _0x3afacc,_0x274da7;if(((_0x274da7=(_0x3afacc=_0x1f72dc==null?void 0x0:_0x1f72dc[_0x25699b(0x18a)])==null?void 0x0:_0x3afacc[_0x25699b(0x1a6)])!=null?_0x274da7:0x0)>0x0){const _0x152f9b=(_0x2a905d,_0x1c6597)=>({'id':_0x2a905d[_0x25699b(0x1c5)],'threadId':_0x2a905d[_0x25699b(0x1b5)],'dT':y(_0x2a905d['createTimestamp']),'personId':_0x2a905d['userId'],'resolved':_0x1f72dc['solved']===I['Solved'],'unitId':_0x414c28,'subUnitId':_0x1c646d,'text':JSON[_0x25699b(0x1c4)](_0x2a905d[_0x25699b(0x1b6)]),'parentId':_0x1c6597}),_0x571833=_0x152f9b(_0x1f72dc[_0x25699b(0x18a)][0x0]);return{..._0x571833,'children':_0x1f72dc[_0x25699b(0x18a)]['slice'](0x1)[_0x25699b(0x193)](_0x1983ff=>_0x152f9b(_0x1983ff,_0x571833['id']))};}return null;}let S=class{constructor(_0x43be9b,_0x224d37,_0x102c9d){const _0x415645=_0x15315d;this[_0x415645(0x1c9)]=_0x43be9b,this[_0x415645(0x1e5)]=_0x224d37,this[_0x415645(0x1e7)]=_0x102c9d;}async[_0x15315d(0x1bf)](_0x371c17){const _0x553ed5=_0x15315d;var _0x156fd0,_0x11ed9b;const {parentId:_0x371566,unitId:_0x4b3e77,text:_0x394640,threadId:_0x497195}=_0x371c17,_0x4bd00a=(_0x11ed9b=(_0x156fd0=_0x394640['customRanges'])==null?void 0x0:_0x156fd0[_0x553ed5(0x1ac)](_0x4d4620=>_0x4d4620[_0x553ed5(0x1e2)]===_0x57a38e[_0x553ed5(0x1c6)])['map'](_0x3c2f54=>_0x3c2f54[_0x553ed5(0x1a2)]))!=null?_0x11ed9b:[],_0x3dddc8=JSON[_0x553ed5(0x197)](_0x394640),_0x10eb35=(await this['_sessionService'][_0x553ed5(0x19c)](_0x4b3e77))[_0x553ed5(0x198)]();if(_0x371566){const _0x2bc2d9={'memberId':_0x10eb35,'unitId':_0x4b3e77,'content':_0x3dddc8,'mention':_0x4bd00a,'threadId':_0x497195},_0x221504=(await this[_0x553ed5(0x1c9)][_0x553ed5(0x1bb)](_0x553ed5(0x1a0)+_0x4b3e77+_0x553ed5(0x187),{'body':_0x2bc2d9}))[_0x553ed5(0x1c1)]['reply'];return{..._0x371c17,'id':_0x221504[_0x553ed5(0x1c5)],'dT':_0x3fdb47(+_0x221504['createTimestamp'])[_0x553ed5(0x1d3)](_0x553ed5(0x1e8)),'personId':_0x221504[_0x553ed5(0x18b)]};}else{const _0x379a69={'memberId':_0x10eb35,'unitId':_0x4b3e77,'content':_0x3dddc8,'mention':_0x4bd00a},_0x55d802=await this['_httpService'][_0x553ed5(0x1bb)](_0x553ed5(0x1a0)+_0x4b3e77+_0x553ed5(0x1b1),{'body':_0x379a69});return X(_0x55d802[_0x553ed5(0x1c1)]['comment'],_0x371c17);}}async[_0x15315d(0x1d5)](_0x34ade3){const _0x30c780=_0x15315d;var _0x572fc2,_0x5977df;const {text:_0xd9874d,unitId:_0xe1dfff}=_0x34ade3,_0x34e1d1=(_0x5977df=(_0x572fc2=_0xd9874d[_0x30c780(0x1ec)])==null?void 0x0:_0x572fc2[_0x30c780(0x1ac)](_0x7a5635=>_0x7a5635[_0x30c780(0x1e2)]===_0x57a38e['COMMENT'])['map'](_0x5cf7ae=>_0x5cf7ae[_0x30c780(0x1a2)]))!=null?_0x5977df:[],_0x2c94bd=JSON['stringify'](_0xd9874d),_0x4cc80a=_0x34ade3[_0x30c780(0x1b5)],_0x5ed18f=_0x34ade3['id'],_0x1f113f={'memberId':(await this[_0x30c780(0x1e7)]['requireSession'](_0xe1dfff))['getMemberID'](),'unitId':_0xe1dfff,'threadId':_0x4cc80a,'mention':_0x34e1d1,'content':_0x2c94bd,'replyId':_0x5ed18f},_0x5bc678=await this[_0x30c780(0x1c9)]['post'](_0x30c780(0x1a0)+_0xe1dfff+_0x30c780(0x19e),{'body':_0x1f113f});return!_0x5bc678[_0x30c780(0x1c1)]['error']||_0x5bc678[_0x30c780(0x1c1)]['error']['code']===0x1;}async[_0x15315d(0x1a9)](_0x1b69cc){const _0x19af3e=_0x15315d,{unitId:_0x528dc1}=_0x1b69cc,_0x6de91d=_0x1b69cc[_0x19af3e(0x1b5)],_0x4c8fd8={'memberId':this[_0x19af3e(0x1e5)][_0x19af3e(0x1d0)]()[_0x19af3e(0x1d8)],'unitId':_0x528dc1,'threadId':_0x6de91d,'solved':_0x1b69cc['resolved']?I['Solved']:I[_0x19af3e(0x1b2)]},_0x33e91f=await this['_httpService'][_0x19af3e(0x1bb)](_0x19af3e(0x1a0)+_0x528dc1+'/solved',{'body':_0x4c8fd8});return!_0x33e91f[_0x19af3e(0x1c1)]['error']||_0x33e91f['body'][_0x19af3e(0x1e1)]['code']===0x1;}async['deleteComment'](_0x257694,_0x1304a2,_0x367827,_0x44fcb8){const _0x284c02=_0x15315d,_0x10d6dd={'memberId':(await this[_0x284c02(0x1e7)][_0x284c02(0x19c)](_0x257694))[_0x284c02(0x198)](),'threadId':_0x367827,'replyId':_0x44fcb8,'unitId':_0x257694},_0xcb9066=await this[_0x284c02(0x1c9)]['post'](_0x284c02(0x1a0)+_0x257694+_0x284c02(0x1e0),{'body':_0x10d6dd});return!_0xcb9066[_0x284c02(0x1c1)]['error']||_0xcb9066[_0x284c02(0x1c1)][_0x284c02(0x1e1)]['code']===0x1;}async[_0x15315d(0x1af)](_0x1d2f3b,_0x2fe700,_0x2b8315){const _0x380a1f=_0x15315d,_0x44a29f={'unitId':_0x1d2f3b,'threadId':_0x2b8315},_0x2ce158=await this[_0x380a1f(0x1c9)][_0x380a1f(0x1bb)](_0x380a1f(0x1a0)+_0x1d2f3b+_0x380a1f(0x18e),{'body':_0x44a29f}),_0x5e89ae=_0x2b8315[_0x380a1f(0x193)](_0x32c3b9=>ee(_0x2ce158[_0x380a1f(0x1c1)][_0x380a1f(0x1e3)][_0x32c3b9],_0x1d2f3b,_0x2fe700))[_0x380a1f(0x1ac)](Boolean);return Object[_0x380a1f(0x194)](_0x2ce158[_0x380a1f(0x1c1)]['users'])[_0x380a1f(0x1a3)](_0x23cfbb=>{const _0x5899b6=_0x380a1f;this[_0x5899b6(0x1e5)]['addUser'](_0x23cfbb);}),_0x5e89ae;}[_0x15315d(0x1be)](_0x5ee151){const _0x101feb=_0x15315d;return{'id':_0x5ee151['id'],'threadId':_0x5ee151[_0x101feb(0x1b5)],'ref':_0x5ee151[_0x101feb(0x18d)]};}};S=Q([b(0x0,_0x258254(_0x42cbce)),b(0x1,_0x258254(_0x496983)),b(0x2,_0x258254(_0x56c3dd))],S);var re=Object[_0x15315d(0x1c7)],te=(_0x3ef702,_0x1d303e,_0x1f6914,_0x524f3a)=>{const _0x1665ee=_0x15315d;for(var _0x9276dc=_0x524f3a>0x1?void 0x0:_0x524f3a?re(_0x1d303e,_0x1f6914):_0x1d303e,_0x5062a5=_0x3ef702[_0x1665ee(0x1a6)]-0x1,_0x538bc8;_0x5062a5>=0x0;_0x5062a5--)(_0x538bc8=_0x3ef702[_0x5062a5])&&(_0x9276dc=_0x538bc8(_0x9276dc)||_0x9276dc);return _0x9276dc;},M=(_0x537622,_0x55775a)=>(_0x7299ff,_0x59319a)=>_0x55775a(_0x7299ff,_0x59319a,_0x537622);let f=class extends _0x1bd91a{constructor(_0x2a6927,_0x1cc7a1){const _0x580a8d=_0x15315d;super(),this['_threadCommentDataSourceService']=_0x2a6927,this[_0x580a8d(0x1ab)]=_0x1cc7a1,this[_0x580a8d(0x1aa)]();}[_0x15315d(0x1aa)](){const _0x1e99ee=_0x15315d;this['_threadCommentDataSourceService'][_0x1e99ee(0x1db)]=this[_0x1e99ee(0x1ab)],this[_0x1e99ee(0x19a)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x5953c6),M(0x1,_0x258254(S))],f);var se=Object[_0x15315d(0x1cc)],oe=Object[_0x15315d(0x1c7)],ne=(_0x123487,_0x39be32,_0x48deaf)=>_0x39be32 in _0x123487?se(_0x123487,_0x39be32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48deaf}):_0x123487[_0x39be32]=_0x48deaf,ie=(_0x47b22a,_0x259e6b,_0x514b98,_0x2de420)=>{const _0x26c0ae=_0x15315d;for(var _0x37f9df=_0x2de420>0x1?void 0x0:_0x2de420?oe(_0x259e6b,_0x514b98):_0x259e6b,_0xaf4ec4=_0x47b22a[_0x26c0ae(0x1a6)]-0x1,_0x49ed7e;_0xaf4ec4>=0x0;_0xaf4ec4--)(_0x49ed7e=_0x47b22a[_0xaf4ec4])&&(_0x37f9df=_0x49ed7e(_0x37f9df)||_0x37f9df);return _0x37f9df;},N=(_0x40819c,_0x85ee9c)=>(_0x1385a0,_0x545c44)=>_0x85ee9c(_0x1385a0,_0x545c44,_0x40819c),$=(_0x1775f3,_0xe37353,_0x271f5c)=>ne(_0x1775f3,typeof _0xe37353!=_0x15315d(0x199)?_0xe37353+'':_0xe37353,_0x271f5c);let g=class extends _0xe04b03{constructor(_0x7b6ecd=O,_0x3b3ea8,_0x4b9520){const _0x508da4=_0x15315d;super(),this[_0x508da4(0x1e9)]=_0x7b6ecd,this[_0x508da4(0x1cf)]=_0x3b3ea8,this[_0x508da4(0x1b0)]=_0x4b9520;const {..._0x2aa7ae}=_0x4986cb({},O,this[_0x508da4(0x1e9)]);this[_0x508da4(0x1b0)]['setConfig'](z,_0x2aa7ae);}[_0x15315d(0x1cb)](){[[S],[f],[_]]['forEach'](_0x55105=>{const _0x298ea6=_0x218f;this['_injector'][_0x298ea6(0x1ea)](_0x55105);});}['onReady'](){const _0x2dbc11=_0x15315d;this[_0x2dbc11(0x1cf)][_0x2dbc11(0x1de)](f),this['_injector'][_0x2dbc11(0x1de)](_);}};$(g,'pluginName',W),$(g,_0x15315d(0x1b3),_0x1d08b7['UNIVER_UNKNOWN']),g=ie([_0x52ca66(_0x55dea6,_0x3defc2,_0x4c0bae),N(0x1,_0x258254(_0x3140ef)),N(0x2,_0x51fa3a)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1654f6=_0x50e3;(function(_0x53c3ac,_0x583819){const _0xeaa62a=_0x50e3,_0x1be22b=_0x53c3ac();while(!![]){try{const _0x279cc6=parseInt(_0xeaa62a(0x1a4))/0x1+parseInt(_0xeaa62a(0x177))/0x2+-parseInt(_0xeaa62a(0x170))/0x3+-parseInt(_0xeaa62a(0x18a))/0x4*(-parseInt(_0xeaa62a(0x165))/0x5)+-parseInt(_0xeaa62a(0x1a6))/0x6+parseInt(_0xeaa62a(0x18f))/0x7*(-parseInt(_0xeaa62a(0x153))/0x8)+parseInt(_0xeaa62a(0x162))/0x9;if(_0x279cc6===_0x583819)break;else _0x1be22b['push'](_0x1be22b['shift']());}catch(_0x36b141){_0x1be22b['push'](_0x1be22b['shift']());}}}(_0x2e3d,0x6bf2b));import{CommentService as _0x21c8a1,CollaborationSessionService as _0x5cf12a,UniverCollaborationClientPlugin as _0xd71383}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1717b0}from'@univerjs-pro/license';import{dayjs as _0x5879de,UserManagerService as _0x5212c7,Inject as _0x57f171,Injector as _0x4d8ec4,Disposable as _0x141799,CustomRangeType as _0x5bccc8,UniverInstanceType as _0x339391,DependentOn as _0x4aa3bb,IConfigService as _0x3d9e11,Plugin as _0x146c0a,merge as _0x4677bf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4d6a33}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd0bbc7,IThreadCommentDataSourceService as _0x3d5f8a}from'@univerjs/thread-comment';function _0x2e3d(){const _0x2cfc57=['65GjZKiI','OpenOrReOpen','replyId','_commentService','onReady','deleteComment','resolved','user','parse','type','threadId','2450322nktakI','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','body','UNRECOGNIZED','_userService','1341780uCsgai','updateComment','parentId','_threadCommentDataSourceService','Solved','ref','comments','subscribe','solved','syncUpdateMutationToColla','_httpService','userId','/universer-api/comment/unit/','thread-comment-data-source.config','_sessionService','customRanges','root','commentUpdate$','_config','56012KYEXWB','_initDataSource','COMMENT','getMemberID','length','7qhKtSY','_threadCommentModel','onStarting','Unknown','format','Delete','getOwnPropertyDescriptor','dataSource','/edit','setConfig','add','_threadCommentDataSource','unitId','rangeType','find','disposeWithMe','payload','replies','addComment','content','addUser','349873oyKGNv','/add','3990582AOiUiZ','get','resolveComment','listComments','stringify','/list','_initUserSync','map','/delete','requireSession','YYYY/MM/DD\x20HH:mm','slice','forEach','_init','Add','1918168rzOSVJ','userID','getUnit','code','saveCommentToSnapshot','UNIVER_UNKNOWN','error','rangeId','getUser','Edit','_configService','_injector','getCurrentUser','values','post','8648955taJmED','Solve','filter'];_0x2e3d=function(){return _0x2cfc57;};return _0x2e3d();}import{bufferTime as _0x4d4422}from'rxjs';import{HTTPService as _0x201c5c}from'@univerjs/network';function _0x50e3(_0x49a090,_0x13c583){const _0x2e3d19=_0x2e3d();return _0x50e3=function(_0x50e3e6,_0x4440d1){_0x50e3e6=_0x50e3e6-0x153;let _0x490880=_0x2e3d19[_0x50e3e6];return _0x490880;},_0x50e3(_0x49a090,_0x13c583);}const W=_0x1654f6(0x172);var I=(_0x4be17b=>(_0x4be17b[_0x4be17b['OpenOrReOpen']=0x0]=_0x1654f6(0x166),_0x4be17b[_0x4be17b[_0x1654f6(0x17b)]=0x1]='Solved',_0x4be17b[_0x4be17b[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x4be17b))(I||{}),v=(_0x10b0b9=>(_0x10b0b9[_0x10b0b9[_0x1654f6(0x192)]=0x0]='Unknown',_0x10b0b9[_0x10b0b9['Add']=0x1]=_0x1654f6(0x1b4),_0x10b0b9[_0x10b0b9[_0x1654f6(0x173)]=0x2]=_0x1654f6(0x173),_0x10b0b9[_0x10b0b9[_0x1654f6(0x15c)]=0x3]=_0x1654f6(0x15c),_0x10b0b9[_0x10b0b9[_0x1654f6(0x194)]=0x4]='Delete',_0x10b0b9[_0x10b0b9[_0x1654f6(0x163)]=0x5]=_0x1654f6(0x163),_0x10b0b9[_0x10b0b9[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x10b0b9))(v||{});const y=_0x3fcad2=>_0x5879de(new Date(+_0x3fcad2))[_0x1654f6(0x193)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4dcf10,_0x4839be)=>{const _0x47f3e0=_0x1654f6,_0x22f65e=_0x4dcf10[_0x47f3e0(0x1a7)](_0x5212c7),_0x4b8bb0=_0x4dcf10[_0x47f3e0(0x1a7)](_0x201c5c);_0x4839be[_0x47f3e0(0x1b2)](_0x361dec=>{const _0x4c4e8=_0x47f3e0;_0x22f65e[_0x4c4e8(0x15b)](_0x361dec)&&_0x4839be['delete'](_0x361dec);}),_0x4839be['size']&&(await _0x4b8bb0[_0x47f3e0(0x1a7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4839be]}}))['body']['users'][_0x47f3e0(0x1b2)](_0x15d8ee=>{const _0x54230f=_0x47f3e0;_0x15d8ee&&_0x22f65e[_0x54230f(0x1a3)](_0x15d8ee);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x57327c,_0x17db6e,_0x144616,_0x12ce7a)=>{const _0x2bb1f3=_0x1654f6;for(var _0x2ddc0e=_0x12ce7a>0x1?void 0x0:_0x12ce7a?K(_0x17db6e,_0x144616):_0x17db6e,_0x49e2be=_0x57327c[_0x2bb1f3(0x18e)]-0x1,_0x351454;_0x49e2be>=0x0;_0x49e2be--)(_0x351454=_0x57327c[_0x49e2be])&&(_0x2ddc0e=_0x351454(_0x2ddc0e)||_0x2ddc0e);return _0x2ddc0e;},p=(_0x2c87de,_0x86ea50)=>(_0x42fcb3,_0xd20120)=>_0x86ea50(_0x42fcb3,_0xd20120,_0x2c87de);let _=class extends _0x141799{constructor(_0x3300ad,_0x5e15dc,_0x2dc805,_0x50f644){const _0x1cfcd5=_0x1654f6;super(),this[_0x1cfcd5(0x168)]=_0x3300ad,this[_0x1cfcd5(0x190)]=_0x5e15dc,this[_0x1cfcd5(0x176)]=_0x2dc805,this['_injector']=_0x50f644,this[_0x1cfcd5(0x1b3)](),this[_0x1cfcd5(0x1ac)]();}[_0x1654f6(0x1ac)](){const _0x7f1c24=_0x1654f6;this[_0x7f1c24(0x19e)](this['_threadCommentModel'][_0x7f1c24(0x188)]['pipe'](_0x4d4422(0x10))['subscribe'](_0x36c886=>{const _0x15750f=_0x7f1c24,_0x431e21=new Set();_0x36c886['forEach'](_0x489d9b=>{const _0x1f99b6=_0x50e3;switch(_0x489d9b['type']){case'add':{const _0x481590=_0x489d9b[_0x1f99b6(0x19f)]['personId'];_0x431e21[_0x1f99b6(0x199)](_0x481590);break;}}}),B(this[_0x15750f(0x15e)],_0x431e21);}));}['_init'](){const _0x377d54=_0x1654f6;this[_0x377d54(0x19e)](this[_0x377d54(0x168)]['commentUpdate$'][_0x377d54(0x17e)](async _0x4a1933=>{const _0x2b28f8=_0x377d54;var _0x4ab35e,_0x1e26fc,_0x461e0b,_0x24bb66;const _0x126e4c=(_0x4ab35e=this['_threadCommentModel']['getUnit'](_0x4a1933['unitId'])['find'](_0x49f2df=>_0x49f2df[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x4ab35e[_0x2b28f8(0x187)];if(!_0x126e4c)return;const {unitId:_0x1c9db1,subUnitId:_0x256ac5}=_0x126e4c;switch(_0x4a1933[_0x2b28f8(0x16c)]&&this[_0x2b28f8(0x176)][_0x2b28f8(0x1a3)](_0x4a1933[_0x2b28f8(0x16c)]),_0x4a1933[_0x2b28f8(0x16e)]){case v[_0x2b28f8(0x1b4)]:break;case v[_0x2b28f8(0x173)]:{this[_0x2b28f8(0x190)]['addComment'](_0x1c9db1,_0x256ac5,{'unitId':_0x1c9db1,'subUnitId':_0x256ac5,'ref':'','id':_0x4a1933[_0x2b28f8(0x167)],'dT':y(+_0x4a1933['createTimestamp']),'threadId':_0x4a1933[_0x2b28f8(0x16f)],'personId':(_0x461e0b=(_0x1e26fc=_0x4a1933['user'])==null?void 0x0:_0x1e26fc[_0x2b28f8(0x154)])!=null?_0x461e0b:_0x4a1933['userId'],'text':JSON[_0x2b28f8(0x16d)](_0x4a1933[_0x2b28f8(0x1a2)]),'parentId':_0x126e4c['id']});break;}case v[_0x2b28f8(0x194)]:{const _0xe2a6f3=this[_0x2b28f8(0x190)]['getComment'](_0x1c9db1,_0x256ac5,_0x4a1933[_0x2b28f8(0x167)]);_0xe2a6f3&&_0xe2a6f3[_0x2b28f8(0x179)]&&this[_0x2b28f8(0x190)][_0x2b28f8(0x16a)](_0x1c9db1,_0x256ac5,_0x4a1933['replyId']);break;}case v[_0x2b28f8(0x15c)]:{this[_0x2b28f8(0x190)][_0x2b28f8(0x178)](_0x1c9db1,_0x256ac5,{'commentId':_0x4a1933[_0x2b28f8(0x167)],'text':JSON['parse'](_0x4a1933[_0x2b28f8(0x1a2)])});break;}case v[_0x2b28f8(0x163)]:{const _0x1d6afa=(_0x24bb66=this[_0x2b28f8(0x190)][_0x2b28f8(0x155)](_0x4a1933[_0x2b28f8(0x19b)])[_0x2b28f8(0x19d)](_0x4752d6=>_0x4752d6[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x24bb66['root'];_0x1d6afa&&this['_threadCommentModel'][_0x2b28f8(0x1a8)](_0x1c9db1,_0x256ac5,_0x1d6afa['id'],_0x4a1933['solved']===I[_0x2b28f8(0x17b)]);break;}}}));}};_=V([p(0x0,_0x57f171(_0x21c8a1)),p(0x1,_0x57f171(_0xd0bbc7)),p(0x2,_0x57f171(_0x5212c7)),p(0x3,_0x57f171(_0x4d8ec4))],_);const z=_0x1654f6(0x184),O={};var k=Object[_0x1654f6(0x195)],Q=(_0x1943b1,_0x3a9f24,_0x2e6aa2,_0x2a8666)=>{const _0x2a3259=_0x1654f6;for(var _0x3d03ba=_0x2a8666>0x1?void 0x0:_0x2a8666?k(_0x3a9f24,_0x2e6aa2):_0x3a9f24,_0x3c0ad9=_0x1943b1[_0x2a3259(0x18e)]-0x1,_0x1a9562;_0x3c0ad9>=0x0;_0x3c0ad9--)(_0x1a9562=_0x1943b1[_0x3c0ad9])&&(_0x3d03ba=_0x1a9562(_0x3d03ba)||_0x3d03ba);return _0x3d03ba;},b=(_0x2d906e,_0x40354f)=>(_0x3fe29f,_0x4c0852)=>_0x40354f(_0x3fe29f,_0x4c0852,_0x2d906e);function X(_0x5573db,_0x191d8e){const _0x44bbd5=_0x1654f6,_0x389af4=_0x5573db[_0x44bbd5(0x1a0)][0x0];return{..._0x191d8e,'id':_0x389af4['replyId'],'resolved':_0x5573db[_0x44bbd5(0x17f)]===0x1,'dT':y(_0x389af4['createTimestamp']),'personId':_0x389af4[_0x44bbd5(0x182)],'threadId':_0x389af4[_0x44bbd5(0x16f)]};}function ee(_0x3fa525,_0x44496,_0x1db221){const _0x59a81a=_0x1654f6;var _0xdeacd7,_0x21ba3c;if(((_0x21ba3c=(_0xdeacd7=_0x3fa525==null?void 0x0:_0x3fa525[_0x59a81a(0x1a0)])==null?void 0x0:_0xdeacd7['length'])!=null?_0x21ba3c:0x0)>0x0){const _0x2609ed=(_0x2c18fa,_0x3c426b)=>({'id':_0x2c18fa[_0x59a81a(0x167)],'threadId':_0x2c18fa[_0x59a81a(0x16f)],'dT':y(_0x2c18fa['createTimestamp']),'personId':_0x2c18fa['userId'],'resolved':_0x3fa525[_0x59a81a(0x17f)]===I[_0x59a81a(0x17b)],'unitId':_0x44496,'subUnitId':_0x1db221,'text':JSON[_0x59a81a(0x16d)](_0x2c18fa[_0x59a81a(0x1a2)]),'parentId':_0x3c426b}),_0x32d122=_0x2609ed(_0x3fa525['replies'][0x0]);return{..._0x32d122,'children':_0x3fa525[_0x59a81a(0x1a0)][_0x59a81a(0x1b1)](0x1)[_0x59a81a(0x1ad)](_0x24fadf=>_0x2609ed(_0x24fadf,_0x32d122['id']))};}return null;}let S=class{constructor(_0x3d415f,_0x5d36e8,_0x3e71d0){const _0x29c780=_0x1654f6;this[_0x29c780(0x181)]=_0x3d415f,this[_0x29c780(0x176)]=_0x5d36e8,this[_0x29c780(0x185)]=_0x3e71d0;}async[_0x1654f6(0x1a1)](_0x109b31){const _0x2d4bbb=_0x1654f6;var _0x439cc8,_0x396137;const {parentId:_0x34d57e,unitId:_0x53925c,text:_0xde9c8e,threadId:_0x51018c}=_0x109b31,_0x3da9ff=(_0x396137=(_0x439cc8=_0xde9c8e[_0x2d4bbb(0x186)])==null?void 0x0:_0x439cc8[_0x2d4bbb(0x164)](_0x2416f0=>_0x2416f0[_0x2d4bbb(0x19c)]===_0x5bccc8[_0x2d4bbb(0x18c)])[_0x2d4bbb(0x1ad)](_0x142295=>_0x142295[_0x2d4bbb(0x15a)]))!=null?_0x396137:[],_0x4c05e8=JSON['stringify'](_0xde9c8e),_0x2e52e5=(await this[_0x2d4bbb(0x185)][_0x2d4bbb(0x1af)](_0x53925c))['getMemberID']();if(_0x34d57e){const _0x934fc9={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff,'threadId':_0x51018c},_0x46f0ae=(await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)](_0x2d4bbb(0x183)+_0x53925c+'/reply',{'body':_0x934fc9}))[_0x2d4bbb(0x174)]['reply'];return{..._0x109b31,'id':_0x46f0ae[_0x2d4bbb(0x167)],'dT':_0x5879de(+_0x46f0ae['createTimestamp'])[_0x2d4bbb(0x193)](_0x2d4bbb(0x1b0)),'personId':_0x46f0ae[_0x2d4bbb(0x182)]};}else{const _0x4b0150={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff},_0x5bafc4=await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)]('/universer-api/comment/unit/'+_0x53925c+_0x2d4bbb(0x1a5),{'body':_0x4b0150});return X(_0x5bafc4[_0x2d4bbb(0x174)]['comment'],_0x109b31);}}async['updateComment'](_0x451b78){const _0x344980=_0x1654f6;var _0x5a53ca,_0x14a9d0;const {text:_0x29f0cd,unitId:_0x378bfa}=_0x451b78,_0xebe613=(_0x14a9d0=(_0x5a53ca=_0x29f0cd[_0x344980(0x186)])==null?void 0x0:_0x5a53ca['filter'](_0x77597e=>_0x77597e['rangeType']===_0x5bccc8[_0x344980(0x18c)])['map'](_0x17d46c=>_0x17d46c[_0x344980(0x15a)]))!=null?_0x14a9d0:[],_0x4b9c40=JSON[_0x344980(0x1aa)](_0x29f0cd),_0x1feec1=_0x451b78['threadId'],_0x4bc086=_0x451b78['id'],_0x462c9d={'memberId':(await this[_0x344980(0x185)]['requireSession'](_0x378bfa))[_0x344980(0x18d)](),'unitId':_0x378bfa,'threadId':_0x1feec1,'mention':_0xebe613,'content':_0x4b9c40,'replyId':_0x4bc086},_0x2277e6=await this[_0x344980(0x181)][_0x344980(0x161)]('/universer-api/comment/unit/'+_0x378bfa+_0x344980(0x197),{'body':_0x462c9d});return!_0x2277e6['body'][_0x344980(0x159)]||_0x2277e6[_0x344980(0x174)][_0x344980(0x159)]['code']===0x1;}async['resolveComment'](_0x3f9edf){const _0x184c34=_0x1654f6,{unitId:_0x3b2e58}=_0x3f9edf,_0x231975=_0x3f9edf[_0x184c34(0x16f)],_0x341c41={'memberId':this[_0x184c34(0x176)][_0x184c34(0x15f)]()[_0x184c34(0x154)],'unitId':_0x3b2e58,'threadId':_0x231975,'solved':_0x3f9edf[_0x184c34(0x16b)]?I[_0x184c34(0x17b)]:I['OpenOrReOpen']},_0x275c85=await this[_0x184c34(0x181)]['post']('/universer-api/comment/unit/'+_0x3b2e58+_0x184c34(0x171),{'body':_0x341c41});return!_0x275c85[_0x184c34(0x174)]['error']||_0x275c85[_0x184c34(0x174)][_0x184c34(0x159)][_0x184c34(0x156)]===0x1;}async[_0x1654f6(0x16a)](_0x5a86cf,_0x26b9e7,_0x1abeff,_0xd126c6){const _0x2b667=_0x1654f6,_0x4ccfa5={'memberId':(await this['_sessionService'][_0x2b667(0x1af)](_0x5a86cf))['getMemberID'](),'threadId':_0x1abeff,'replyId':_0xd126c6,'unitId':_0x5a86cf},_0x1751a8=await this[_0x2b667(0x181)]['post'](_0x2b667(0x183)+_0x5a86cf+_0x2b667(0x1ae),{'body':_0x4ccfa5});return!_0x1751a8[_0x2b667(0x174)][_0x2b667(0x159)]||_0x1751a8['body']['error'][_0x2b667(0x156)]===0x1;}async[_0x1654f6(0x1a9)](_0x3c19fb,_0x3806de,_0xbd4dac){const _0xac09c8=_0x1654f6,_0x51c3f4={'unitId':_0x3c19fb,'threadId':_0xbd4dac},_0x14013f=await this[_0xac09c8(0x181)][_0xac09c8(0x161)](_0xac09c8(0x183)+_0x3c19fb+_0xac09c8(0x1ab),{'body':_0x51c3f4}),_0x5bcafe=_0xbd4dac[_0xac09c8(0x1ad)](_0x40c7cf=>ee(_0x14013f[_0xac09c8(0x174)][_0xac09c8(0x17d)][_0x40c7cf],_0x3c19fb,_0x3806de))['filter'](Boolean);return Object[_0xac09c8(0x160)](_0x14013f[_0xac09c8(0x174)]['users'])[_0xac09c8(0x1b2)](_0x54e425=>{const _0x3e8d2a=_0xac09c8;this['_userService'][_0x3e8d2a(0x1a3)](_0x54e425);}),_0x5bcafe;}[_0x1654f6(0x157)](_0x298a67){const _0x30c429=_0x1654f6;return{'id':_0x298a67['id'],'threadId':_0x298a67[_0x30c429(0x16f)],'ref':_0x298a67[_0x30c429(0x17c)]};}};S=Q([b(0x0,_0x57f171(_0x201c5c)),b(0x1,_0x57f171(_0x5212c7)),b(0x2,_0x57f171(_0x5cf12a))],S);var re=Object[_0x1654f6(0x195)],te=(_0x554c20,_0x5b9a43,_0x29b099,_0x403688)=>{const _0xd2dc28=_0x1654f6;for(var _0x34f861=_0x403688>0x1?void 0x0:_0x403688?re(_0x5b9a43,_0x29b099):_0x5b9a43,_0x5b6400=_0x554c20[_0xd2dc28(0x18e)]-0x1,_0x1781db;_0x5b6400>=0x0;_0x5b6400--)(_0x1781db=_0x554c20[_0x5b6400])&&(_0x34f861=_0x1781db(_0x34f861)||_0x34f861);return _0x34f861;},M=(_0xdfbe1,_0x5df061)=>(_0x11807e,_0x506eb2)=>_0x5df061(_0x11807e,_0x506eb2,_0xdfbe1);let f=class extends _0x141799{constructor(_0x3082d5,_0x32cb0e){const _0x3a5515=_0x1654f6;super(),this['_threadCommentDataSourceService']=_0x3082d5,this['_threadCommentDataSource']=_0x32cb0e,this[_0x3a5515(0x18b)]();}[_0x1654f6(0x18b)](){const _0x67f481=_0x1654f6;this[_0x67f481(0x17a)][_0x67f481(0x196)]=this[_0x67f481(0x19a)],this[_0x67f481(0x17a)][_0x67f481(0x180)]=!0x1;}};f=te([M(0x0,_0x3d5f8a),M(0x1,_0x57f171(S))],f);var se=Object['defineProperty'],oe=Object[_0x1654f6(0x195)],ne=(_0x544dac,_0x490b13,_0x11d8f4)=>_0x490b13 in _0x544dac?se(_0x544dac,_0x490b13,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11d8f4}):_0x544dac[_0x490b13]=_0x11d8f4,ie=(_0x3fbc4a,_0x51f5d6,_0x28d8cf,_0x4dce95)=>{for(var _0x3ff36a=_0x4dce95>0x1?void 0x0:_0x4dce95?oe(_0x51f5d6,_0x28d8cf):_0x51f5d6,_0x4cded3=_0x3fbc4a['length']-0x1,_0x3f0f5b;_0x4cded3>=0x0;_0x4cded3--)(_0x3f0f5b=_0x3fbc4a[_0x4cded3])&&(_0x3ff36a=_0x3f0f5b(_0x3ff36a)||_0x3ff36a);return _0x3ff36a;},N=(_0x5a1c09,_0x48d1e3)=>(_0x41a498,_0xaafe49)=>_0x48d1e3(_0x41a498,_0xaafe49,_0x5a1c09),$=(_0x3b9493,_0x4b78a5,_0x5eab98)=>ne(_0x3b9493,typeof _0x4b78a5!='symbol'?_0x4b78a5+'':_0x4b78a5,_0x5eab98);let g=class extends _0x146c0a{constructor(_0x4bb7f0=O,_0x5a7622,_0x2d7da7){const _0x47c73c=_0x1654f6;super(),this[_0x47c73c(0x189)]=_0x4bb7f0,this[_0x47c73c(0x15e)]=_0x5a7622,this[_0x47c73c(0x15d)]=_0x2d7da7;const {..._0x29ac18}=_0x4677bf({},O,this[_0x47c73c(0x189)]);this[_0x47c73c(0x15d)][_0x47c73c(0x198)](z,_0x29ac18);}[_0x1654f6(0x191)](){const _0x508150=_0x1654f6;[[S],[f],[_]][_0x508150(0x1b2)](_0x5a1af1=>{const _0x260fa7=_0x508150;this['_injector'][_0x260fa7(0x199)](_0x5a1af1);});}[_0x1654f6(0x169)](){const _0x5891d6=_0x1654f6;this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](f),this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](_);}};$(g,'pluginName',W),$(g,_0x1654f6(0x16e),_0x339391[_0x1654f6(0x158)]),g=ie([_0x4aa3bb(_0x4d6a33,_0xd71383,_0x1717b0),N(0x1,_0x57f171(_0x4d8ec4)),N(0x2,_0x3d9e11)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4814(){const _0x11b246=['onStarting','defineProperty','4710olXwop','771357SbzGWX','_injector','getCurrentUser','462GIGnYj','Reply','format','root','updateComment','subscribe','714649oTjIAe','userID','find','Add','dataSource','payload','getComment','get','_commentService','/delete','error','rangeType','comments','Delete','_userService','addUser','_sessionService','YYYY/MM/DD\x20HH:mm','_config','add','5ivsSam','customRanges','/reply','disposeWithMe','pipe','replies','userId','UNRECOGNIZED','ref','/list','deleteComment','Solve','2569ZTXJVD','8728UUrvCo','map','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','stringify','getMemberID','symbol','_threadCommentDataSourceService','_threadCommentModel','requireSession','60OiUnGh','/edit','/universer-api/user/list','/universer-api/comment/unit/','personId','rangeId','forEach','createTimestamp','8715550UFJJXV','length','Solved','unitId','resolveComment','_initDataSource','_threadCommentDataSource','filter','Edit','20gTmCEM','listComments','_configService','/add','OpenOrReOpen','type','thread-comment-data-source.config','threadId','content','parentId','9wmbglT','size','17006990MEXzbB','post','getUnit','getUser','saveCommentToSnapshot','addComment','8991690WOjqBj','body','commentUpdate$','_init','parse','replyId','COMMENT','getOwnPropertyDescriptor','solved','_httpService','_initUserSync'];_0x4814=function(){return _0x11b246;};return _0x4814();}function _0x218f(_0x4b76e1,_0x413778){const _0x481484=_0x4814();return _0x218f=function(_0x218fc3,_0x3c7f1e){_0x218fc3=_0x218fc3-0x187;let _0x1880be=_0x481484[_0x218fc3];return _0x1880be;},_0x218f(_0x4b76e1,_0x413778);}const _0x15315d=_0x218f;(function(_0x501999,_0x2af538){const _0x203cdd=_0x218f,_0x11f977=_0x501999();while(!![]){try{const _0x1893db=-parseInt(_0x203cdd(0x1d1))/0x1*(parseInt(_0x203cdd(0x1cd))/0x2)+parseInt(_0x203cdd(0x1ce))/0x3*(parseInt(_0x203cdd(0x1ae))/0x4)+-parseInt(_0x203cdd(0x1eb))/0x5*(parseInt(_0x203cdd(0x1c0))/0x6)+parseInt(_0x203cdd(0x191))/0x7*(-parseInt(_0x203cdd(0x192))/0x8)+parseInt(_0x203cdd(0x1b8))/0x9*(parseInt(_0x203cdd(0x1a5))/0xa)+parseInt(_0x203cdd(0x1ba))/0xb+-parseInt(_0x203cdd(0x19d))/0xc*(-parseInt(_0x203cdd(0x1d7))/0xd);if(_0x1893db===_0x2af538)break;else _0x11f977['push'](_0x11f977['shift']());}catch(_0x5add9e){_0x11f977['push'](_0x11f977['shift']());}}}(_0x4814,0xf1f6b));import{CommentService as _0x355e60,CollaborationSessionService as _0x56c3dd,UniverCollaborationClientPlugin as _0x3defc2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c0bae}from'@univerjs-pro/license';import{dayjs as _0x3fdb47,UserManagerService as _0x496983,Inject as _0x258254,Injector as _0x3140ef,Disposable as _0x1bd91a,CustomRangeType as _0x57a38e,UniverInstanceType as _0x1d08b7,DependentOn as _0x52ca66,IConfigService as _0x51fa3a,Plugin as _0xe04b03,merge as _0x4986cb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55dea6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x586c47,IThreadCommentDataSourceService as _0x5953c6}from'@univerjs/thread-comment';import{bufferTime as _0x2c2e5b}from'rxjs';import{HTTPService as _0x42cbce}from'@univerjs/network';const W=_0x15315d(0x195);var I=(_0x1ea0f1=>(_0x1ea0f1[_0x1ea0f1[_0x15315d(0x1b2)]=0x0]=_0x15315d(0x1b2),_0x1ea0f1[_0x1ea0f1[_0x15315d(0x1a7)]=0x1]='Solved',_0x1ea0f1[_0x1ea0f1[_0x15315d(0x18c)]=-0x1]='UNRECOGNIZED',_0x1ea0f1))(I||{}),v=(_0x5479ca=>(_0x5479ca[_0x5479ca['Unknown']=0x0]='Unknown',_0x5479ca[_0x5479ca[_0x15315d(0x1da)]=0x1]=_0x15315d(0x1da),_0x5479ca[_0x5479ca[_0x15315d(0x1d2)]=0x2]=_0x15315d(0x1d2),_0x5479ca[_0x5479ca['Edit']=0x3]='Edit',_0x5479ca[_0x5479ca[_0x15315d(0x1e4)]=0x4]=_0x15315d(0x1e4),_0x5479ca[_0x5479ca[_0x15315d(0x190)]=0x5]=_0x15315d(0x190),_0x5479ca[_0x5479ca[_0x15315d(0x18c)]=-0x1]=_0x15315d(0x18c),_0x5479ca))(v||{});const y=_0x4abd62=>_0x3fdb47(new Date(+_0x4abd62))['format'](_0x15315d(0x1e8)),B=async(_0x5a9daf,_0x560915)=>{const _0x536a4b=_0x15315d,_0x153531=_0x5a9daf[_0x536a4b(0x1de)](_0x496983),_0x5ce420=_0x5a9daf[_0x536a4b(0x1de)](_0x42cbce);_0x560915['forEach'](_0x61e634=>{const _0x14ff7b=_0x536a4b;_0x153531[_0x14ff7b(0x1bd)](_0x61e634)&&_0x560915['delete'](_0x61e634);}),_0x560915[_0x536a4b(0x1b9)]&&(await _0x5ce420[_0x536a4b(0x1de)](_0x536a4b(0x19f),{'params':{'userIDs':[..._0x560915]}}))[_0x536a4b(0x1c1)]['users'][_0x536a4b(0x1a3)](_0x480a84=>{const _0x40990f=_0x536a4b;_0x480a84&&_0x153531[_0x40990f(0x1e6)](_0x480a84);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1dbaed,_0x5dc121,_0x5d98b8,_0x2fec1e)=>{for(var _0x5c157d=_0x2fec1e>0x1?void 0x0:_0x2fec1e?K(_0x5dc121,_0x5d98b8):_0x5dc121,_0x58ff44=_0x1dbaed['length']-0x1,_0x2b057c;_0x58ff44>=0x0;_0x58ff44--)(_0x2b057c=_0x1dbaed[_0x58ff44])&&(_0x5c157d=_0x2b057c(_0x5c157d)||_0x5c157d);return _0x5c157d;},p=(_0x45c2a8,_0x31c84c)=>(_0x31c82,_0x4e8aaa)=>_0x31c84c(_0x31c82,_0x4e8aaa,_0x45c2a8);let _=class extends _0x1bd91a{constructor(_0x40aa42,_0x581c17,_0x41fd70,_0x2bad09){const _0x505a10=_0x15315d;super(),this[_0x505a10(0x1df)]=_0x40aa42,this[_0x505a10(0x19b)]=_0x581c17,this['_userService']=_0x41fd70,this[_0x505a10(0x1cf)]=_0x2bad09,this['_init'](),this[_0x505a10(0x1ca)]();}[_0x15315d(0x1ca)](){const _0x416ef3=_0x15315d;this[_0x416ef3(0x188)](this[_0x416ef3(0x19b)]['commentUpdate$'][_0x416ef3(0x189)](_0x2c2e5b(0x10))['subscribe'](_0x21c475=>{const _0x5a0db4=new Set();_0x21c475['forEach'](_0x526f6c=>{const _0x27fc2b=_0x218f;switch(_0x526f6c[_0x27fc2b(0x1b3)]){case _0x27fc2b(0x1ea):{const _0x596a30=_0x526f6c[_0x27fc2b(0x1dc)][_0x27fc2b(0x1a1)];_0x5a0db4[_0x27fc2b(0x1ea)](_0x596a30);break;}}}),B(this['_injector'],_0x5a0db4);}));}[_0x15315d(0x1c3)](){const _0x3a0953=_0x15315d;this[_0x3a0953(0x188)](this[_0x3a0953(0x1df)][_0x3a0953(0x1c2)][_0x3a0953(0x1d6)](async _0x526e6a=>{const _0x31711f=_0x3a0953;var _0x1efbc9,_0x57aceb,_0x5b47d8,_0x51c6d6;const _0x579b61=(_0x1efbc9=this[_0x31711f(0x19b)][_0x31711f(0x1bc)](_0x526e6a[_0x31711f(0x1a8)])[_0x31711f(0x1d9)](_0x5c2453=>_0x5c2453[_0x31711f(0x1b5)]===_0x526e6a['threadId']))==null?void 0x0:_0x1efbc9[_0x31711f(0x1d4)];if(!_0x579b61)return;const {unitId:_0x58e4e4,subUnitId:_0x4f57f9}=_0x579b61;switch(_0x526e6a[_0x31711f(0x196)]&&this[_0x31711f(0x1e5)][_0x31711f(0x1e6)](_0x526e6a[_0x31711f(0x196)]),_0x526e6a[_0x31711f(0x1b3)]){case v['Add']:break;case v['Reply']:{this[_0x31711f(0x19b)]['addComment'](_0x58e4e4,_0x4f57f9,{'unitId':_0x58e4e4,'subUnitId':_0x4f57f9,'ref':'','id':_0x526e6a[_0x31711f(0x1c5)],'dT':y(+_0x526e6a[_0x31711f(0x1a4)]),'threadId':_0x526e6a[_0x31711f(0x1b5)],'personId':(_0x5b47d8=(_0x57aceb=_0x526e6a['user'])==null?void 0x0:_0x57aceb['userID'])!=null?_0x5b47d8:_0x526e6a[_0x31711f(0x18b)],'text':JSON[_0x31711f(0x1c4)](_0x526e6a['content']),'parentId':_0x579b61['id']});break;}case v[_0x31711f(0x1e4)]:{const _0x69f0a9=this[_0x31711f(0x19b)][_0x31711f(0x1dd)](_0x58e4e4,_0x4f57f9,_0x526e6a[_0x31711f(0x1c5)]);_0x69f0a9&&_0x69f0a9[_0x31711f(0x1b7)]&&this['_threadCommentModel'][_0x31711f(0x18f)](_0x58e4e4,_0x4f57f9,_0x526e6a['replyId']);break;}case v[_0x31711f(0x1ad)]:{this['_threadCommentModel'][_0x31711f(0x1d5)](_0x58e4e4,_0x4f57f9,{'commentId':_0x526e6a[_0x31711f(0x1c5)],'text':JSON[_0x31711f(0x1c4)](_0x526e6a[_0x31711f(0x1b6)])});break;}case v[_0x31711f(0x190)]:{const _0xbb4158=(_0x51c6d6=this[_0x31711f(0x19b)][_0x31711f(0x1bc)](_0x526e6a[_0x31711f(0x1a8)])['find'](_0x5a6551=>_0x5a6551['threadId']===_0x526e6a['threadId']))==null?void 0x0:_0x51c6d6[_0x31711f(0x1d4)];_0xbb4158&&this['_threadCommentModel'][_0x31711f(0x1a9)](_0x58e4e4,_0x4f57f9,_0xbb4158['id'],_0x526e6a[_0x31711f(0x1c8)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x258254(_0x355e60)),p(0x1,_0x258254(_0x586c47)),p(0x2,_0x258254(_0x496983)),p(0x3,_0x258254(_0x3140ef))],_);const z=_0x15315d(0x1b4),O={};var k=Object[_0x15315d(0x1c7)],Q=(_0x5543b0,_0x519ee5,_0x5d7b2b,_0x2c996f)=>{for(var _0x4a6a24=_0x2c996f>0x1?void 0x0:_0x2c996f?k(_0x519ee5,_0x5d7b2b):_0x519ee5,_0x1b93fb=_0x5543b0['length']-0x1,_0x1c8f62;_0x1b93fb>=0x0;_0x1b93fb--)(_0x1c8f62=_0x5543b0[_0x1b93fb])&&(_0x4a6a24=_0x1c8f62(_0x4a6a24)||_0x4a6a24);return _0x4a6a24;},b=(_0x351afe,_0x24a24d)=>(_0x4ba1ec,_0x497c38)=>_0x24a24d(_0x4ba1ec,_0x497c38,_0x351afe);function X(_0x5464cb,_0x34ef2f){const _0x33e879=_0x15315d,_0x4a143e=_0x5464cb[_0x33e879(0x18a)][0x0];return{..._0x34ef2f,'id':_0x4a143e[_0x33e879(0x1c5)],'resolved':_0x5464cb['solved']===0x1,'dT':y(_0x4a143e[_0x33e879(0x1a4)]),'personId':_0x4a143e[_0x33e879(0x18b)],'threadId':_0x4a143e[_0x33e879(0x1b5)]};}function ee(_0x1f72dc,_0x414c28,_0x1c646d){const _0x25699b=_0x15315d;var _0x3afacc,_0x274da7;if(((_0x274da7=(_0x3afacc=_0x1f72dc==null?void 0x0:_0x1f72dc[_0x25699b(0x18a)])==null?void 0x0:_0x3afacc[_0x25699b(0x1a6)])!=null?_0x274da7:0x0)>0x0){const _0x152f9b=(_0x2a905d,_0x1c6597)=>({'id':_0x2a905d[_0x25699b(0x1c5)],'threadId':_0x2a905d[_0x25699b(0x1b5)],'dT':y(_0x2a905d['createTimestamp']),'personId':_0x2a905d['userId'],'resolved':_0x1f72dc['solved']===I['Solved'],'unitId':_0x414c28,'subUnitId':_0x1c646d,'text':JSON[_0x25699b(0x1c4)](_0x2a905d[_0x25699b(0x1b6)]),'parentId':_0x1c6597}),_0x571833=_0x152f9b(_0x1f72dc[_0x25699b(0x18a)][0x0]);return{..._0x571833,'children':_0x1f72dc[_0x25699b(0x18a)]['slice'](0x1)[_0x25699b(0x193)](_0x1983ff=>_0x152f9b(_0x1983ff,_0x571833['id']))};}return null;}let S=class{constructor(_0x43be9b,_0x224d37,_0x102c9d){const _0x415645=_0x15315d;this[_0x415645(0x1c9)]=_0x43be9b,this[_0x415645(0x1e5)]=_0x224d37,this[_0x415645(0x1e7)]=_0x102c9d;}async[_0x15315d(0x1bf)](_0x371c17){const _0x553ed5=_0x15315d;var _0x156fd0,_0x11ed9b;const {parentId:_0x371566,unitId:_0x4b3e77,text:_0x394640,threadId:_0x497195}=_0x371c17,_0x4bd00a=(_0x11ed9b=(_0x156fd0=_0x394640['customRanges'])==null?void 0x0:_0x156fd0[_0x553ed5(0x1ac)](_0x4d4620=>_0x4d4620[_0x553ed5(0x1e2)]===_0x57a38e[_0x553ed5(0x1c6)])['map'](_0x3c2f54=>_0x3c2f54[_0x553ed5(0x1a2)]))!=null?_0x11ed9b:[],_0x3dddc8=JSON[_0x553ed5(0x197)](_0x394640),_0x10eb35=(await this['_sessionService'][_0x553ed5(0x19c)](_0x4b3e77))[_0x553ed5(0x198)]();if(_0x371566){const _0x2bc2d9={'memberId':_0x10eb35,'unitId':_0x4b3e77,'content':_0x3dddc8,'mention':_0x4bd00a,'threadId':_0x497195},_0x221504=(await this[_0x553ed5(0x1c9)][_0x553ed5(0x1bb)](_0x553ed5(0x1a0)+_0x4b3e77+_0x553ed5(0x187),{'body':_0x2bc2d9}))[_0x553ed5(0x1c1)]['reply'];return{..._0x371c17,'id':_0x221504[_0x553ed5(0x1c5)],'dT':_0x3fdb47(+_0x221504['createTimestamp'])[_0x553ed5(0x1d3)](_0x553ed5(0x1e8)),'personId':_0x221504[_0x553ed5(0x18b)]};}else{const _0x379a69={'memberId':_0x10eb35,'unitId':_0x4b3e77,'content':_0x3dddc8,'mention':_0x4bd00a},_0x55d802=await this['_httpService'][_0x553ed5(0x1bb)](_0x553ed5(0x1a0)+_0x4b3e77+_0x553ed5(0x1b1),{'body':_0x379a69});return X(_0x55d802[_0x553ed5(0x1c1)]['comment'],_0x371c17);}}async[_0x15315d(0x1d5)](_0x34ade3){const _0x30c780=_0x15315d;var _0x572fc2,_0x5977df;const {text:_0xd9874d,unitId:_0xe1dfff}=_0x34ade3,_0x34e1d1=(_0x5977df=(_0x572fc2=_0xd9874d[_0x30c780(0x1ec)])==null?void 0x0:_0x572fc2[_0x30c780(0x1ac)](_0x7a5635=>_0x7a5635[_0x30c780(0x1e2)]===_0x57a38e['COMMENT'])['map'](_0x5cf7ae=>_0x5cf7ae[_0x30c780(0x1a2)]))!=null?_0x5977df:[],_0x2c94bd=JSON['stringify'](_0xd9874d),_0x4cc80a=_0x34ade3[_0x30c780(0x1b5)],_0x5ed18f=_0x34ade3['id'],_0x1f113f={'memberId':(await this[_0x30c780(0x1e7)]['requireSession'](_0xe1dfff))['getMemberID'](),'unitId':_0xe1dfff,'threadId':_0x4cc80a,'mention':_0x34e1d1,'content':_0x2c94bd,'replyId':_0x5ed18f},_0x5bc678=await this[_0x30c780(0x1c9)]['post'](_0x30c780(0x1a0)+_0xe1dfff+_0x30c780(0x19e),{'body':_0x1f113f});return!_0x5bc678[_0x30c780(0x1c1)]['error']||_0x5bc678[_0x30c780(0x1c1)]['error']['code']===0x1;}async[_0x15315d(0x1a9)](_0x1b69cc){const _0x19af3e=_0x15315d,{unitId:_0x528dc1}=_0x1b69cc,_0x6de91d=_0x1b69cc[_0x19af3e(0x1b5)],_0x4c8fd8={'memberId':this[_0x19af3e(0x1e5)][_0x19af3e(0x1d0)]()[_0x19af3e(0x1d8)],'unitId':_0x528dc1,'threadId':_0x6de91d,'solved':_0x1b69cc['resolved']?I['Solved']:I[_0x19af3e(0x1b2)]},_0x33e91f=await this['_httpService'][_0x19af3e(0x1bb)](_0x19af3e(0x1a0)+_0x528dc1+'/solved',{'body':_0x4c8fd8});return!_0x33e91f[_0x19af3e(0x1c1)]['error']||_0x33e91f['body'][_0x19af3e(0x1e1)]['code']===0x1;}async['deleteComment'](_0x257694,_0x1304a2,_0x367827,_0x44fcb8){const _0x284c02=_0x15315d,_0x10d6dd={'memberId':(await this[_0x284c02(0x1e7)][_0x284c02(0x19c)](_0x257694))[_0x284c02(0x198)](),'threadId':_0x367827,'replyId':_0x44fcb8,'unitId':_0x257694},_0xcb9066=await this[_0x284c02(0x1c9)]['post'](_0x284c02(0x1a0)+_0x257694+_0x284c02(0x1e0),{'body':_0x10d6dd});return!_0xcb9066[_0x284c02(0x1c1)]['error']||_0xcb9066[_0x284c02(0x1c1)][_0x284c02(0x1e1)]['code']===0x1;}async[_0x15315d(0x1af)](_0x1d2f3b,_0x2fe700,_0x2b8315){const _0x380a1f=_0x15315d,_0x44a29f={'unitId':_0x1d2f3b,'threadId':_0x2b8315},_0x2ce158=await this[_0x380a1f(0x1c9)][_0x380a1f(0x1bb)](_0x380a1f(0x1a0)+_0x1d2f3b+_0x380a1f(0x18e),{'body':_0x44a29f}),_0x5e89ae=_0x2b8315[_0x380a1f(0x193)](_0x32c3b9=>ee(_0x2ce158[_0x380a1f(0x1c1)][_0x380a1f(0x1e3)][_0x32c3b9],_0x1d2f3b,_0x2fe700))[_0x380a1f(0x1ac)](Boolean);return Object[_0x380a1f(0x194)](_0x2ce158[_0x380a1f(0x1c1)]['users'])[_0x380a1f(0x1a3)](_0x23cfbb=>{const _0x5899b6=_0x380a1f;this[_0x5899b6(0x1e5)]['addUser'](_0x23cfbb);}),_0x5e89ae;}[_0x15315d(0x1be)](_0x5ee151){const _0x101feb=_0x15315d;return{'id':_0x5ee151['id'],'threadId':_0x5ee151[_0x101feb(0x1b5)],'ref':_0x5ee151[_0x101feb(0x18d)]};}};S=Q([b(0x0,_0x258254(_0x42cbce)),b(0x1,_0x258254(_0x496983)),b(0x2,_0x258254(_0x56c3dd))],S);var re=Object[_0x15315d(0x1c7)],te=(_0x3ef702,_0x1d303e,_0x1f6914,_0x524f3a)=>{const _0x1665ee=_0x15315d;for(var _0x9276dc=_0x524f3a>0x1?void 0x0:_0x524f3a?re(_0x1d303e,_0x1f6914):_0x1d303e,_0x5062a5=_0x3ef702[_0x1665ee(0x1a6)]-0x1,_0x538bc8;_0x5062a5>=0x0;_0x5062a5--)(_0x538bc8=_0x3ef702[_0x5062a5])&&(_0x9276dc=_0x538bc8(_0x9276dc)||_0x9276dc);return _0x9276dc;},M=(_0x537622,_0x55775a)=>(_0x7299ff,_0x59319a)=>_0x55775a(_0x7299ff,_0x59319a,_0x537622);let f=class extends _0x1bd91a{constructor(_0x2a6927,_0x1cc7a1){const _0x580a8d=_0x15315d;super(),this['_threadCommentDataSourceService']=_0x2a6927,this[_0x580a8d(0x1ab)]=_0x1cc7a1,this[_0x580a8d(0x1aa)]();}[_0x15315d(0x1aa)](){const _0x1e99ee=_0x15315d;this['_threadCommentDataSourceService'][_0x1e99ee(0x1db)]=this[_0x1e99ee(0x1ab)],this[_0x1e99ee(0x19a)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x5953c6),M(0x1,_0x258254(S))],f);var se=Object[_0x15315d(0x1cc)],oe=Object[_0x15315d(0x1c7)],ne=(_0x123487,_0x39be32,_0x48deaf)=>_0x39be32 in _0x123487?se(_0x123487,_0x39be32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48deaf}):_0x123487[_0x39be32]=_0x48deaf,ie=(_0x47b22a,_0x259e6b,_0x514b98,_0x2de420)=>{const _0x26c0ae=_0x15315d;for(var _0x37f9df=_0x2de420>0x1?void 0x0:_0x2de420?oe(_0x259e6b,_0x514b98):_0x259e6b,_0xaf4ec4=_0x47b22a[_0x26c0ae(0x1a6)]-0x1,_0x49ed7e;_0xaf4ec4>=0x0;_0xaf4ec4--)(_0x49ed7e=_0x47b22a[_0xaf4ec4])&&(_0x37f9df=_0x49ed7e(_0x37f9df)||_0x37f9df);return _0x37f9df;},N=(_0x40819c,_0x85ee9c)=>(_0x1385a0,_0x545c44)=>_0x85ee9c(_0x1385a0,_0x545c44,_0x40819c),$=(_0x1775f3,_0xe37353,_0x271f5c)=>ne(_0x1775f3,typeof _0xe37353!=_0x15315d(0x199)?_0xe37353+'':_0xe37353,_0x271f5c);let g=class extends _0xe04b03{constructor(_0x7b6ecd=O,_0x3b3ea8,_0x4b9520){const _0x508da4=_0x15315d;super(),this[_0x508da4(0x1e9)]=_0x7b6ecd,this[_0x508da4(0x1cf)]=_0x3b3ea8,this[_0x508da4(0x1b0)]=_0x4b9520;const {..._0x2aa7ae}=_0x4986cb({},O,this[_0x508da4(0x1e9)]);this[_0x508da4(0x1b0)]['setConfig'](z,_0x2aa7ae);}[_0x15315d(0x1cb)](){[[S],[f],[_]]['forEach'](_0x55105=>{const _0x298ea6=_0x218f;this['_injector'][_0x298ea6(0x1ea)](_0x55105);});}['onReady'](){const _0x2dbc11=_0x15315d;this[_0x2dbc11(0x1cf)][_0x2dbc11(0x1de)](f),this['_injector'][_0x2dbc11(0x1de)](_);}};$(g,'pluginName',W),$(g,_0x15315d(0x1b3),_0x1d08b7['UNIVER_UNKNOWN']),g=ie([_0x52ca66(_0x55dea6,_0x3defc2,_0x4c0bae),N(0x1,_0x258254(_0x3140ef)),N(0x2,_0x51fa3a)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1654f6=_0x50e3;(function(_0x53c3ac,_0x583819){const _0xeaa62a=_0x50e3,_0x1be22b=_0x53c3ac();while(!![]){try{const _0x279cc6=parseInt(_0xeaa62a(0x1a4))/0x1+parseInt(_0xeaa62a(0x177))/0x2+-parseInt(_0xeaa62a(0x170))/0x3+-parseInt(_0xeaa62a(0x18a))/0x4*(-parseInt(_0xeaa62a(0x165))/0x5)+-parseInt(_0xeaa62a(0x1a6))/0x6+parseInt(_0xeaa62a(0x18f))/0x7*(-parseInt(_0xeaa62a(0x153))/0x8)+parseInt(_0xeaa62a(0x162))/0x9;if(_0x279cc6===_0x583819)break;else _0x1be22b['push'](_0x1be22b['shift']());}catch(_0x36b141){_0x1be22b['push'](_0x1be22b['shift']());}}}(_0x2e3d,0x6bf2b));import{CommentService as _0x21c8a1,CollaborationSessionService as _0x5cf12a,UniverCollaborationClientPlugin as _0xd71383}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1717b0}from'@univerjs-pro/license';import{dayjs as _0x5879de,UserManagerService as _0x5212c7,Inject as _0x57f171,Injector as _0x4d8ec4,Disposable as _0x141799,CustomRangeType as _0x5bccc8,UniverInstanceType as _0x339391,DependentOn as _0x4aa3bb,IConfigService as _0x3d9e11,Plugin as _0x146c0a,merge as _0x4677bf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4d6a33}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd0bbc7,IThreadCommentDataSourceService as _0x3d5f8a}from'@univerjs/thread-comment';function _0x2e3d(){const _0x2cfc57=['65GjZKiI','OpenOrReOpen','replyId','_commentService','onReady','deleteComment','resolved','user','parse','type','threadId','2450322nktakI','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','body','UNRECOGNIZED','_userService','1341780uCsgai','updateComment','parentId','_threadCommentDataSourceService','Solved','ref','comments','subscribe','solved','syncUpdateMutationToColla','_httpService','userId','/universer-api/comment/unit/','thread-comment-data-source.config','_sessionService','customRanges','root','commentUpdate$','_config','56012KYEXWB','_initDataSource','COMMENT','getMemberID','length','7qhKtSY','_threadCommentModel','onStarting','Unknown','format','Delete','getOwnPropertyDescriptor','dataSource','/edit','setConfig','add','_threadCommentDataSource','unitId','rangeType','find','disposeWithMe','payload','replies','addComment','content','addUser','349873oyKGNv','/add','3990582AOiUiZ','get','resolveComment','listComments','stringify','/list','_initUserSync','map','/delete','requireSession','YYYY/MM/DD\x20HH:mm','slice','forEach','_init','Add','1918168rzOSVJ','userID','getUnit','code','saveCommentToSnapshot','UNIVER_UNKNOWN','error','rangeId','getUser','Edit','_configService','_injector','getCurrentUser','values','post','8648955taJmED','Solve','filter'];_0x2e3d=function(){return _0x2cfc57;};return _0x2e3d();}import{bufferTime as _0x4d4422}from'rxjs';import{HTTPService as _0x201c5c}from'@univerjs/network';function _0x50e3(_0x49a090,_0x13c583){const _0x2e3d19=_0x2e3d();return _0x50e3=function(_0x50e3e6,_0x4440d1){_0x50e3e6=_0x50e3e6-0x153;let _0x490880=_0x2e3d19[_0x50e3e6];return _0x490880;},_0x50e3(_0x49a090,_0x13c583);}const W=_0x1654f6(0x172);var I=(_0x4be17b=>(_0x4be17b[_0x4be17b['OpenOrReOpen']=0x0]=_0x1654f6(0x166),_0x4be17b[_0x4be17b[_0x1654f6(0x17b)]=0x1]='Solved',_0x4be17b[_0x4be17b[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x4be17b))(I||{}),v=(_0x10b0b9=>(_0x10b0b9[_0x10b0b9[_0x1654f6(0x192)]=0x0]='Unknown',_0x10b0b9[_0x10b0b9['Add']=0x1]=_0x1654f6(0x1b4),_0x10b0b9[_0x10b0b9[_0x1654f6(0x173)]=0x2]=_0x1654f6(0x173),_0x10b0b9[_0x10b0b9[_0x1654f6(0x15c)]=0x3]=_0x1654f6(0x15c),_0x10b0b9[_0x10b0b9[_0x1654f6(0x194)]=0x4]='Delete',_0x10b0b9[_0x10b0b9[_0x1654f6(0x163)]=0x5]=_0x1654f6(0x163),_0x10b0b9[_0x10b0b9[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x10b0b9))(v||{});const y=_0x3fcad2=>_0x5879de(new Date(+_0x3fcad2))[_0x1654f6(0x193)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4dcf10,_0x4839be)=>{const _0x47f3e0=_0x1654f6,_0x22f65e=_0x4dcf10[_0x47f3e0(0x1a7)](_0x5212c7),_0x4b8bb0=_0x4dcf10[_0x47f3e0(0x1a7)](_0x201c5c);_0x4839be[_0x47f3e0(0x1b2)](_0x361dec=>{const _0x4c4e8=_0x47f3e0;_0x22f65e[_0x4c4e8(0x15b)](_0x361dec)&&_0x4839be['delete'](_0x361dec);}),_0x4839be['size']&&(await _0x4b8bb0[_0x47f3e0(0x1a7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4839be]}}))['body']['users'][_0x47f3e0(0x1b2)](_0x15d8ee=>{const _0x54230f=_0x47f3e0;_0x15d8ee&&_0x22f65e[_0x54230f(0x1a3)](_0x15d8ee);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x57327c,_0x17db6e,_0x144616,_0x12ce7a)=>{const _0x2bb1f3=_0x1654f6;for(var _0x2ddc0e=_0x12ce7a>0x1?void 0x0:_0x12ce7a?K(_0x17db6e,_0x144616):_0x17db6e,_0x49e2be=_0x57327c[_0x2bb1f3(0x18e)]-0x1,_0x351454;_0x49e2be>=0x0;_0x49e2be--)(_0x351454=_0x57327c[_0x49e2be])&&(_0x2ddc0e=_0x351454(_0x2ddc0e)||_0x2ddc0e);return _0x2ddc0e;},p=(_0x2c87de,_0x86ea50)=>(_0x42fcb3,_0xd20120)=>_0x86ea50(_0x42fcb3,_0xd20120,_0x2c87de);let _=class extends _0x141799{constructor(_0x3300ad,_0x5e15dc,_0x2dc805,_0x50f644){const _0x1cfcd5=_0x1654f6;super(),this[_0x1cfcd5(0x168)]=_0x3300ad,this[_0x1cfcd5(0x190)]=_0x5e15dc,this[_0x1cfcd5(0x176)]=_0x2dc805,this['_injector']=_0x50f644,this[_0x1cfcd5(0x1b3)](),this[_0x1cfcd5(0x1ac)]();}[_0x1654f6(0x1ac)](){const _0x7f1c24=_0x1654f6;this[_0x7f1c24(0x19e)](this['_threadCommentModel'][_0x7f1c24(0x188)]['pipe'](_0x4d4422(0x10))['subscribe'](_0x36c886=>{const _0x15750f=_0x7f1c24,_0x431e21=new Set();_0x36c886['forEach'](_0x489d9b=>{const _0x1f99b6=_0x50e3;switch(_0x489d9b['type']){case'add':{const _0x481590=_0x489d9b[_0x1f99b6(0x19f)]['personId'];_0x431e21[_0x1f99b6(0x199)](_0x481590);break;}}}),B(this[_0x15750f(0x15e)],_0x431e21);}));}['_init'](){const _0x377d54=_0x1654f6;this[_0x377d54(0x19e)](this[_0x377d54(0x168)]['commentUpdate$'][_0x377d54(0x17e)](async _0x4a1933=>{const _0x2b28f8=_0x377d54;var _0x4ab35e,_0x1e26fc,_0x461e0b,_0x24bb66;const _0x126e4c=(_0x4ab35e=this['_threadCommentModel']['getUnit'](_0x4a1933['unitId'])['find'](_0x49f2df=>_0x49f2df[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x4ab35e[_0x2b28f8(0x187)];if(!_0x126e4c)return;const {unitId:_0x1c9db1,subUnitId:_0x256ac5}=_0x126e4c;switch(_0x4a1933[_0x2b28f8(0x16c)]&&this[_0x2b28f8(0x176)][_0x2b28f8(0x1a3)](_0x4a1933[_0x2b28f8(0x16c)]),_0x4a1933[_0x2b28f8(0x16e)]){case v[_0x2b28f8(0x1b4)]:break;case v[_0x2b28f8(0x173)]:{this[_0x2b28f8(0x190)]['addComment'](_0x1c9db1,_0x256ac5,{'unitId':_0x1c9db1,'subUnitId':_0x256ac5,'ref':'','id':_0x4a1933[_0x2b28f8(0x167)],'dT':y(+_0x4a1933['createTimestamp']),'threadId':_0x4a1933[_0x2b28f8(0x16f)],'personId':(_0x461e0b=(_0x1e26fc=_0x4a1933['user'])==null?void 0x0:_0x1e26fc[_0x2b28f8(0x154)])!=null?_0x461e0b:_0x4a1933['userId'],'text':JSON[_0x2b28f8(0x16d)](_0x4a1933[_0x2b28f8(0x1a2)]),'parentId':_0x126e4c['id']});break;}case v[_0x2b28f8(0x194)]:{const _0xe2a6f3=this[_0x2b28f8(0x190)]['getComment'](_0x1c9db1,_0x256ac5,_0x4a1933[_0x2b28f8(0x167)]);_0xe2a6f3&&_0xe2a6f3[_0x2b28f8(0x179)]&&this[_0x2b28f8(0x190)][_0x2b28f8(0x16a)](_0x1c9db1,_0x256ac5,_0x4a1933['replyId']);break;}case v[_0x2b28f8(0x15c)]:{this[_0x2b28f8(0x190)][_0x2b28f8(0x178)](_0x1c9db1,_0x256ac5,{'commentId':_0x4a1933[_0x2b28f8(0x167)],'text':JSON['parse'](_0x4a1933[_0x2b28f8(0x1a2)])});break;}case v[_0x2b28f8(0x163)]:{const _0x1d6afa=(_0x24bb66=this[_0x2b28f8(0x190)][_0x2b28f8(0x155)](_0x4a1933[_0x2b28f8(0x19b)])[_0x2b28f8(0x19d)](_0x4752d6=>_0x4752d6[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x24bb66['root'];_0x1d6afa&&this['_threadCommentModel'][_0x2b28f8(0x1a8)](_0x1c9db1,_0x256ac5,_0x1d6afa['id'],_0x4a1933['solved']===I[_0x2b28f8(0x17b)]);break;}}}));}};_=V([p(0x0,_0x57f171(_0x21c8a1)),p(0x1,_0x57f171(_0xd0bbc7)),p(0x2,_0x57f171(_0x5212c7)),p(0x3,_0x57f171(_0x4d8ec4))],_);const z=_0x1654f6(0x184),O={};var k=Object[_0x1654f6(0x195)],Q=(_0x1943b1,_0x3a9f24,_0x2e6aa2,_0x2a8666)=>{const _0x2a3259=_0x1654f6;for(var _0x3d03ba=_0x2a8666>0x1?void 0x0:_0x2a8666?k(_0x3a9f24,_0x2e6aa2):_0x3a9f24,_0x3c0ad9=_0x1943b1[_0x2a3259(0x18e)]-0x1,_0x1a9562;_0x3c0ad9>=0x0;_0x3c0ad9--)(_0x1a9562=_0x1943b1[_0x3c0ad9])&&(_0x3d03ba=_0x1a9562(_0x3d03ba)||_0x3d03ba);return _0x3d03ba;},b=(_0x2d906e,_0x40354f)=>(_0x3fe29f,_0x4c0852)=>_0x40354f(_0x3fe29f,_0x4c0852,_0x2d906e);function X(_0x5573db,_0x191d8e){const _0x44bbd5=_0x1654f6,_0x389af4=_0x5573db[_0x44bbd5(0x1a0)][0x0];return{..._0x191d8e,'id':_0x389af4['replyId'],'resolved':_0x5573db[_0x44bbd5(0x17f)]===0x1,'dT':y(_0x389af4['createTimestamp']),'personId':_0x389af4[_0x44bbd5(0x182)],'threadId':_0x389af4[_0x44bbd5(0x16f)]};}function ee(_0x3fa525,_0x44496,_0x1db221){const _0x59a81a=_0x1654f6;var _0xdeacd7,_0x21ba3c;if(((_0x21ba3c=(_0xdeacd7=_0x3fa525==null?void 0x0:_0x3fa525[_0x59a81a(0x1a0)])==null?void 0x0:_0xdeacd7['length'])!=null?_0x21ba3c:0x0)>0x0){const _0x2609ed=(_0x2c18fa,_0x3c426b)=>({'id':_0x2c18fa[_0x59a81a(0x167)],'threadId':_0x2c18fa[_0x59a81a(0x16f)],'dT':y(_0x2c18fa['createTimestamp']),'personId':_0x2c18fa['userId'],'resolved':_0x3fa525[_0x59a81a(0x17f)]===I[_0x59a81a(0x17b)],'unitId':_0x44496,'subUnitId':_0x1db221,'text':JSON[_0x59a81a(0x16d)](_0x2c18fa[_0x59a81a(0x1a2)]),'parentId':_0x3c426b}),_0x32d122=_0x2609ed(_0x3fa525['replies'][0x0]);return{..._0x32d122,'children':_0x3fa525[_0x59a81a(0x1a0)][_0x59a81a(0x1b1)](0x1)[_0x59a81a(0x1ad)](_0x24fadf=>_0x2609ed(_0x24fadf,_0x32d122['id']))};}return null;}let S=class{constructor(_0x3d415f,_0x5d36e8,_0x3e71d0){const _0x29c780=_0x1654f6;this[_0x29c780(0x181)]=_0x3d415f,this[_0x29c780(0x176)]=_0x5d36e8,this[_0x29c780(0x185)]=_0x3e71d0;}async[_0x1654f6(0x1a1)](_0x109b31){const _0x2d4bbb=_0x1654f6;var _0x439cc8,_0x396137;const {parentId:_0x34d57e,unitId:_0x53925c,text:_0xde9c8e,threadId:_0x51018c}=_0x109b31,_0x3da9ff=(_0x396137=(_0x439cc8=_0xde9c8e[_0x2d4bbb(0x186)])==null?void 0x0:_0x439cc8[_0x2d4bbb(0x164)](_0x2416f0=>_0x2416f0[_0x2d4bbb(0x19c)]===_0x5bccc8[_0x2d4bbb(0x18c)])[_0x2d4bbb(0x1ad)](_0x142295=>_0x142295[_0x2d4bbb(0x15a)]))!=null?_0x396137:[],_0x4c05e8=JSON['stringify'](_0xde9c8e),_0x2e52e5=(await this[_0x2d4bbb(0x185)][_0x2d4bbb(0x1af)](_0x53925c))['getMemberID']();if(_0x34d57e){const _0x934fc9={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff,'threadId':_0x51018c},_0x46f0ae=(await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)](_0x2d4bbb(0x183)+_0x53925c+'/reply',{'body':_0x934fc9}))[_0x2d4bbb(0x174)]['reply'];return{..._0x109b31,'id':_0x46f0ae[_0x2d4bbb(0x167)],'dT':_0x5879de(+_0x46f0ae['createTimestamp'])[_0x2d4bbb(0x193)](_0x2d4bbb(0x1b0)),'personId':_0x46f0ae[_0x2d4bbb(0x182)]};}else{const _0x4b0150={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff},_0x5bafc4=await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)]('/universer-api/comment/unit/'+_0x53925c+_0x2d4bbb(0x1a5),{'body':_0x4b0150});return X(_0x5bafc4[_0x2d4bbb(0x174)]['comment'],_0x109b31);}}async['updateComment'](_0x451b78){const _0x344980=_0x1654f6;var _0x5a53ca,_0x14a9d0;const {text:_0x29f0cd,unitId:_0x378bfa}=_0x451b78,_0xebe613=(_0x14a9d0=(_0x5a53ca=_0x29f0cd[_0x344980(0x186)])==null?void 0x0:_0x5a53ca['filter'](_0x77597e=>_0x77597e['rangeType']===_0x5bccc8[_0x344980(0x18c)])['map'](_0x17d46c=>_0x17d46c[_0x344980(0x15a)]))!=null?_0x14a9d0:[],_0x4b9c40=JSON[_0x344980(0x1aa)](_0x29f0cd),_0x1feec1=_0x451b78['threadId'],_0x4bc086=_0x451b78['id'],_0x462c9d={'memberId':(await this[_0x344980(0x185)]['requireSession'](_0x378bfa))[_0x344980(0x18d)](),'unitId':_0x378bfa,'threadId':_0x1feec1,'mention':_0xebe613,'content':_0x4b9c40,'replyId':_0x4bc086},_0x2277e6=await this[_0x344980(0x181)][_0x344980(0x161)]('/universer-api/comment/unit/'+_0x378bfa+_0x344980(0x197),{'body':_0x462c9d});return!_0x2277e6['body'][_0x344980(0x159)]||_0x2277e6[_0x344980(0x174)][_0x344980(0x159)]['code']===0x1;}async['resolveComment'](_0x3f9edf){const _0x184c34=_0x1654f6,{unitId:_0x3b2e58}=_0x3f9edf,_0x231975=_0x3f9edf[_0x184c34(0x16f)],_0x341c41={'memberId':this[_0x184c34(0x176)][_0x184c34(0x15f)]()[_0x184c34(0x154)],'unitId':_0x3b2e58,'threadId':_0x231975,'solved':_0x3f9edf[_0x184c34(0x16b)]?I[_0x184c34(0x17b)]:I['OpenOrReOpen']},_0x275c85=await this[_0x184c34(0x181)]['post']('/universer-api/comment/unit/'+_0x3b2e58+_0x184c34(0x171),{'body':_0x341c41});return!_0x275c85[_0x184c34(0x174)]['error']||_0x275c85[_0x184c34(0x174)][_0x184c34(0x159)][_0x184c34(0x156)]===0x1;}async[_0x1654f6(0x16a)](_0x5a86cf,_0x26b9e7,_0x1abeff,_0xd126c6){const _0x2b667=_0x1654f6,_0x4ccfa5={'memberId':(await this['_sessionService'][_0x2b667(0x1af)](_0x5a86cf))['getMemberID'](),'threadId':_0x1abeff,'replyId':_0xd126c6,'unitId':_0x5a86cf},_0x1751a8=await this[_0x2b667(0x181)]['post'](_0x2b667(0x183)+_0x5a86cf+_0x2b667(0x1ae),{'body':_0x4ccfa5});return!_0x1751a8[_0x2b667(0x174)][_0x2b667(0x159)]||_0x1751a8['body']['error'][_0x2b667(0x156)]===0x1;}async[_0x1654f6(0x1a9)](_0x3c19fb,_0x3806de,_0xbd4dac){const _0xac09c8=_0x1654f6,_0x51c3f4={'unitId':_0x3c19fb,'threadId':_0xbd4dac},_0x14013f=await this[_0xac09c8(0x181)][_0xac09c8(0x161)](_0xac09c8(0x183)+_0x3c19fb+_0xac09c8(0x1ab),{'body':_0x51c3f4}),_0x5bcafe=_0xbd4dac[_0xac09c8(0x1ad)](_0x40c7cf=>ee(_0x14013f[_0xac09c8(0x174)][_0xac09c8(0x17d)][_0x40c7cf],_0x3c19fb,_0x3806de))['filter'](Boolean);return Object[_0xac09c8(0x160)](_0x14013f[_0xac09c8(0x174)]['users'])[_0xac09c8(0x1b2)](_0x54e425=>{const _0x3e8d2a=_0xac09c8;this['_userService'][_0x3e8d2a(0x1a3)](_0x54e425);}),_0x5bcafe;}[_0x1654f6(0x157)](_0x298a67){const _0x30c429=_0x1654f6;return{'id':_0x298a67['id'],'threadId':_0x298a67[_0x30c429(0x16f)],'ref':_0x298a67[_0x30c429(0x17c)]};}};S=Q([b(0x0,_0x57f171(_0x201c5c)),b(0x1,_0x57f171(_0x5212c7)),b(0x2,_0x57f171(_0x5cf12a))],S);var re=Object[_0x1654f6(0x195)],te=(_0x554c20,_0x5b9a43,_0x29b099,_0x403688)=>{const _0xd2dc28=_0x1654f6;for(var _0x34f861=_0x403688>0x1?void 0x0:_0x403688?re(_0x5b9a43,_0x29b099):_0x5b9a43,_0x5b6400=_0x554c20[_0xd2dc28(0x18e)]-0x1,_0x1781db;_0x5b6400>=0x0;_0x5b6400--)(_0x1781db=_0x554c20[_0x5b6400])&&(_0x34f861=_0x1781db(_0x34f861)||_0x34f861);return _0x34f861;},M=(_0xdfbe1,_0x5df061)=>(_0x11807e,_0x506eb2)=>_0x5df061(_0x11807e,_0x506eb2,_0xdfbe1);let f=class extends _0x141799{constructor(_0x3082d5,_0x32cb0e){const _0x3a5515=_0x1654f6;super(),this['_threadCommentDataSourceService']=_0x3082d5,this['_threadCommentDataSource']=_0x32cb0e,this[_0x3a5515(0x18b)]();}[_0x1654f6(0x18b)](){const _0x67f481=_0x1654f6;this[_0x67f481(0x17a)][_0x67f481(0x196)]=this[_0x67f481(0x19a)],this[_0x67f481(0x17a)][_0x67f481(0x180)]=!0x1;}};f=te([M(0x0,_0x3d5f8a),M(0x1,_0x57f171(S))],f);var se=Object['defineProperty'],oe=Object[_0x1654f6(0x195)],ne=(_0x544dac,_0x490b13,_0x11d8f4)=>_0x490b13 in _0x544dac?se(_0x544dac,_0x490b13,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11d8f4}):_0x544dac[_0x490b13]=_0x11d8f4,ie=(_0x3fbc4a,_0x51f5d6,_0x28d8cf,_0x4dce95)=>{for(var _0x3ff36a=_0x4dce95>0x1?void 0x0:_0x4dce95?oe(_0x51f5d6,_0x28d8cf):_0x51f5d6,_0x4cded3=_0x3fbc4a['length']-0x1,_0x3f0f5b;_0x4cded3>=0x0;_0x4cded3--)(_0x3f0f5b=_0x3fbc4a[_0x4cded3])&&(_0x3ff36a=_0x3f0f5b(_0x3ff36a)||_0x3ff36a);return _0x3ff36a;},N=(_0x5a1c09,_0x48d1e3)=>(_0x41a498,_0xaafe49)=>_0x48d1e3(_0x41a498,_0xaafe49,_0x5a1c09),$=(_0x3b9493,_0x4b78a5,_0x5eab98)=>ne(_0x3b9493,typeof _0x4b78a5!='symbol'?_0x4b78a5+'':_0x4b78a5,_0x5eab98);let g=class extends _0x146c0a{constructor(_0x4bb7f0=O,_0x5a7622,_0x2d7da7){const _0x47c73c=_0x1654f6;super(),this[_0x47c73c(0x189)]=_0x4bb7f0,this[_0x47c73c(0x15e)]=_0x5a7622,this[_0x47c73c(0x15d)]=_0x2d7da7;const {..._0x29ac18}=_0x4677bf({},O,this[_0x47c73c(0x189)]);this[_0x47c73c(0x15d)][_0x47c73c(0x198)](z,_0x29ac18);}[_0x1654f6(0x191)](){const _0x508150=_0x1654f6;[[S],[f],[_]][_0x508150(0x1b2)](_0x5a1af1=>{const _0x260fa7=_0x508150;this['_injector'][_0x260fa7(0x199)](_0x5a1af1);});}[_0x1654f6(0x169)](){const _0x5891d6=_0x1654f6;this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](f),this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](_);}};$(g,'pluginName',W),$(g,_0x1654f6(0x16e),_0x339391[_0x1654f6(0x158)]),g=ie([_0x4aa3bb(_0x4d6a33,_0xd71383,_0x1717b0),N(0x1,_0x57f171(_0x4d8ec4)),N(0x2,_0x3d9e11)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x27e5(_0xc1bb41,_0x3ee4f0){const _0x57f2ba=_0x57f2();return _0x27e5=function(_0x27e5ea,_0x2e9597){_0x27e5ea=_0x27e5ea-0x1f2;let _0x83842=_0x57f2ba[_0x27e5ea];return _0x83842;},_0x27e5(_0xc1bb41,_0x3ee4f0);}function _0x57f2(){const _0x591ac9=['_initUserSync','toStringTag','syncUpdateMutationToColla','UniverThreadCommentUi','UniverThreadCommentUIPlugin','/solved','Add','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','9cRsNTd','dataSource','_injector','user','UniverCollaborationClientPlugin','stringify','Reply','rangeType','UniverProLicense','requireSession','getMemberID','replies','getUnit','455jJodjy','getCurrentUser','@univerjs-pro/license','/reply','@univerjs/thread-comment','disposeWithMe','Plugin','listComments','11CLQZYD','symbol','@univerjs/network','Solve','_threadCommentModel','_userService','body','88JCbvEu','844921XiJiWN','3005580jAFChV','CommentService','UniverThreadComment','_initDataSource','_threadCommentDataSourceService','Disposable','UniverProCollaborationClient','customRanges','userId','exports','unitId','personId','getUser','/add','1104585alDYlQ','root','Delete','comment','replyId','filter','comments','error','function','_sessionService','_httpService','post','UniverThreadCommentDataSourcePlugin','addComment','82626oatkii','solved','IConfigService','code','defineProperty','bufferTime','IThreadCommentDataSourceService','CustomRangeType','resolveComment','Inject','rangeId','updateComment','commentUpdate$','add','delete','_commentService','createTimestamp','UNRECOGNIZED','/edit','UniverInstanceType','_configService','onReady','Edit','saveCommentToSnapshot','type','61615752bDiQRf','parse','map','HTTPService','deleteComment','Unknown','parentId','UserManagerService','@univerjs/thread-comment-ui','find','_threadCommentDataSource','get','resolved','_config','threadId','subscribe','1536744IKXqaS','/universer-api/comment/unit/','/universer-api/user/list','pluginName','addUser','Solved','/delete','rxjs','users','@univerjs-pro/collaboration-client','length','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Injector','forEach','_init','10361630GFkqRm','@univerjs/core','/list','amd','reply','thread-comment-data-source.config','size','content','merge','6CYTPog'];_0x57f2=function(){return _0x591ac9;};return _0x57f2();}(function(_0x3f43d8,_0x54fa82){const _0x4457e2=_0x27e5,_0x1a9067=_0x3f43d8();while(!![]){try{const _0x373490=-parseInt(_0x4457e2(0x224))/0x1+-parseInt(_0x4457e2(0x25b))/0x2+parseInt(_0x4457e2(0x275))/0x3*(-parseInt(_0x4457e2(0x216))/0x4)+parseInt(_0x4457e2(0x205))/0x5*(-parseInt(_0x4457e2(0x232))/0x6)+parseInt(_0x4457e2(0x215))/0x7*(parseInt(_0x4457e2(0x214))/0x8)+-parseInt(_0x4457e2(0x1f8))/0x9*(parseInt(_0x4457e2(0x26c))/0xa)+-parseInt(_0x4457e2(0x20d))/0xb*(-parseInt(_0x4457e2(0x24b))/0xc);if(_0x373490===_0x54fa82)break;else _0x1a9067['push'](_0x1a9067['shift']());}catch(_0x277b9e){_0x1a9067['push'](_0x1a9067['shift']());}}}(_0x57f2,0xc2a7c),function(_0x41ccee,_0x3a6b19){const _0x5cb973=_0x27e5;typeof exports=='object'&&typeof module<'u'?_0x3a6b19(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5cb973(0x22c)&&define[_0x5cb973(0x26f)]?define([_0x5cb973(0x21f),_0x5cb973(0x264),_0x5cb973(0x207),_0x5cb973(0x26d),_0x5cb973(0x253),_0x5cb973(0x209),_0x5cb973(0x262),_0x5cb973(0x20f)],_0x3a6b19):(_0x41ccee=typeof globalThis<'u'?globalThis:_0x41ccee||self,_0x3a6b19(_0x41ccee['UniverProThreadCommentDatasource']={},_0x41ccee[_0x5cb973(0x21c)],_0x41ccee[_0x5cb973(0x200)],_0x41ccee['UniverCore'],_0x41ccee[_0x5cb973(0x1f2)],_0x41ccee[_0x5cb973(0x218)],_0x41ccee['rxjs'],_0x41ccee['UniverNetwork']));}(this,function(_0x5dc3cc,_0x6fd3a5,_0x5bc113,_0x112501,_0x1d552b,_0xcb6e46,_0x28e549,_0x367fa3){'use strict';const _0x56eb6d=_0x27e5;const _0xf2f31=_0x56eb6d(0x267);var _0x5a4ab8=(_0xbf2c92=>(_0xbf2c92[_0xbf2c92[_0x56eb6d(0x1f6)]=0x0]=_0x56eb6d(0x1f6),_0xbf2c92[_0xbf2c92['Solved']=0x1]=_0x56eb6d(0x260),_0xbf2c92[_0xbf2c92[_0x56eb6d(0x243)]=-0x1]='UNRECOGNIZED',_0xbf2c92))(_0x5a4ab8||{}),_0x2b839c=(_0x23cb03=>(_0x23cb03[_0x23cb03[_0x56eb6d(0x250)]=0x0]='Unknown',_0x23cb03[_0x23cb03[_0x56eb6d(0x1f5)]=0x1]=_0x56eb6d(0x1f5),_0x23cb03[_0x23cb03[_0x56eb6d(0x1fe)]=0x2]=_0x56eb6d(0x1fe),_0x23cb03[_0x23cb03[_0x56eb6d(0x248)]=0x3]=_0x56eb6d(0x248),_0x23cb03[_0x23cb03[_0x56eb6d(0x226)]=0x4]=_0x56eb6d(0x226),_0x23cb03[_0x23cb03['Solve']=0x5]=_0x56eb6d(0x210),_0x23cb03[_0x23cb03['UNRECOGNIZED']=-0x1]=_0x56eb6d(0x243),_0x23cb03))(_0x2b839c||{});const _0x5e755e=_0x1d5d10=>_0x112501['dayjs'](new Date(+_0x1d5d10))['format']('YYYY/MM/DD\x20HH:mm'),_0x10c78f=async(_0x11d554,_0x5302c6)=>{const _0x2b4077=_0x56eb6d,_0xb1637b=_0x11d554[_0x2b4077(0x256)](_0x112501[_0x2b4077(0x252)]),_0x2bb03d=_0x11d554[_0x2b4077(0x256)](_0x367fa3[_0x2b4077(0x24e)]);_0x5302c6[_0x2b4077(0x26a)](_0x5ec339=>{const _0x51bb89=_0x2b4077;_0xb1637b[_0x51bb89(0x222)](_0x5ec339)&&_0x5302c6[_0x51bb89(0x240)](_0x5ec339);}),_0x5302c6[_0x2b4077(0x272)]&&(await _0x2bb03d['get'](_0x2b4077(0x25d),{'params':{'userIDs':[..._0x5302c6]}}))[_0x2b4077(0x213)][_0x2b4077(0x263)][_0x2b4077(0x26a)](_0x4c28e8=>{const _0x2647ba=_0x2b4077;_0x4c28e8&&_0xb1637b[_0x2647ba(0x25f)](_0x4c28e8);});};var _0x3391d9=Object[_0x56eb6d(0x268)],_0x3019b6=(_0x427166,_0x65c02d,_0x4ef911,_0x2cee55)=>{for(var _0x464133=_0x2cee55>0x1?void 0x0:_0x2cee55?_0x3391d9(_0x65c02d,_0x4ef911):_0x65c02d,_0x55117b=_0x427166['length']-0x1,_0x5c7490;_0x55117b>=0x0;_0x55117b--)(_0x5c7490=_0x427166[_0x55117b])&&(_0x464133=_0x5c7490(_0x464133)||_0x464133);return _0x464133;},_0x121b2d=(_0x37cc78,_0x35d468)=>(_0x46bd9a,_0x2156b4)=>_0x35d468(_0x46bd9a,_0x2156b4,_0x37cc78);let _0x1f28d9=class extends _0x112501['Disposable']{constructor(_0x2c6958,_0x48c2f4,_0x13d531,_0x19323e){const _0x229f1a=_0x56eb6d;super(),this[_0x229f1a(0x241)]=_0x2c6958,this[_0x229f1a(0x211)]=_0x48c2f4,this[_0x229f1a(0x212)]=_0x13d531,this[_0x229f1a(0x1fa)]=_0x19323e,this['_init'](),this[_0x229f1a(0x276)]();}[_0x56eb6d(0x276)](){const _0x5e6183=_0x56eb6d;this[_0x5e6183(0x20a)](this['_threadCommentModel'][_0x5e6183(0x23e)]['pipe'](_0x28e549[_0x5e6183(0x237)](0x10))[_0x5e6183(0x25a)](_0x2307cc=>{const _0x5b16ee=_0x5e6183,_0x3b17f1=new Set();_0x2307cc[_0x5b16ee(0x26a)](_0x3249e5=>{const _0x87fc55=_0x5b16ee;switch(_0x3249e5[_0x87fc55(0x24a)]){case _0x87fc55(0x23f):{const _0x8425d9=_0x3249e5['payload'][_0x87fc55(0x221)];_0x3b17f1[_0x87fc55(0x23f)](_0x8425d9);break;}}}),_0x10c78f(this[_0x5b16ee(0x1fa)],_0x3b17f1);}));}[_0x56eb6d(0x26b)](){const _0x56e1e8=_0x56eb6d;this['disposeWithMe'](this[_0x56e1e8(0x241)][_0x56e1e8(0x23e)][_0x56e1e8(0x25a)](async _0x35c8bb=>{const _0x34aa66=_0x56e1e8;var _0x11cb5b,_0x30054,_0x3d013a,_0x4ddcc1;const _0x153219=(_0x11cb5b=this[_0x34aa66(0x211)][_0x34aa66(0x204)](_0x35c8bb[_0x34aa66(0x220)])[_0x34aa66(0x254)](_0x51bd61=>_0x51bd61[_0x34aa66(0x259)]===_0x35c8bb[_0x34aa66(0x259)]))==null?void 0x0:_0x11cb5b[_0x34aa66(0x225)];if(!_0x153219)return;const {unitId:_0x26c054,subUnitId:_0x22b795}=_0x153219;switch(_0x35c8bb[_0x34aa66(0x1fb)]&&this[_0x34aa66(0x212)][_0x34aa66(0x25f)](_0x35c8bb[_0x34aa66(0x1fb)]),_0x35c8bb['type']){case _0x2b839c[_0x34aa66(0x1f5)]:break;case _0x2b839c[_0x34aa66(0x1fe)]:{this[_0x34aa66(0x211)][_0x34aa66(0x231)](_0x26c054,_0x22b795,{'unitId':_0x26c054,'subUnitId':_0x22b795,'ref':'','id':_0x35c8bb[_0x34aa66(0x228)],'dT':_0x5e755e(+_0x35c8bb[_0x34aa66(0x242)]),'threadId':_0x35c8bb[_0x34aa66(0x259)],'personId':(_0x3d013a=(_0x30054=_0x35c8bb[_0x34aa66(0x1fb)])==null?void 0x0:_0x30054['userID'])!=null?_0x3d013a:_0x35c8bb[_0x34aa66(0x21e)],'text':JSON[_0x34aa66(0x24c)](_0x35c8bb[_0x34aa66(0x273)]),'parentId':_0x153219['id']});break;}case _0x2b839c[_0x34aa66(0x226)]:{const _0x2f1abe=this['_threadCommentModel']['getComment'](_0x26c054,_0x22b795,_0x35c8bb[_0x34aa66(0x228)]);_0x2f1abe&&_0x2f1abe[_0x34aa66(0x251)]&&this['_threadCommentModel']['deleteComment'](_0x26c054,_0x22b795,_0x35c8bb[_0x34aa66(0x228)]);break;}case _0x2b839c[_0x34aa66(0x248)]:{this['_threadCommentModel'][_0x34aa66(0x23d)](_0x26c054,_0x22b795,{'commentId':_0x35c8bb[_0x34aa66(0x228)],'text':JSON[_0x34aa66(0x24c)](_0x35c8bb[_0x34aa66(0x273)])});break;}case _0x2b839c[_0x34aa66(0x210)]:{const _0x5dc91c=(_0x4ddcc1=this[_0x34aa66(0x211)]['getUnit'](_0x35c8bb['unitId'])['find'](_0x507039=>_0x507039[_0x34aa66(0x259)]===_0x35c8bb[_0x34aa66(0x259)]))==null?void 0x0:_0x4ddcc1[_0x34aa66(0x225)];_0x5dc91c&&this['_threadCommentModel'][_0x34aa66(0x23a)](_0x26c054,_0x22b795,_0x5dc91c['id'],_0x35c8bb[_0x34aa66(0x233)]===_0x5a4ab8[_0x34aa66(0x260)]);break;}}}));}};_0x1f28d9=_0x3019b6([_0x121b2d(0x0,_0x112501['Inject'](_0x6fd3a5[_0x56eb6d(0x217)])),_0x121b2d(0x1,_0x112501[_0x56eb6d(0x23b)](_0xcb6e46['ThreadCommentModel'])),_0x121b2d(0x2,_0x112501[_0x56eb6d(0x23b)](_0x112501['UserManagerService'])),_0x121b2d(0x3,_0x112501[_0x56eb6d(0x23b)](_0x112501[_0x56eb6d(0x269)]))],_0x1f28d9);const _0x55a6bd=_0x56eb6d(0x271),_0xf4ffdd={};var _0x164a1f=Object[_0x56eb6d(0x268)],_0x1bac0c=(_0x1bfa17,_0x1acf52,_0x30a5fc,_0x5965ce)=>{for(var _0x13bc9a=_0x5965ce>0x1?void 0x0:_0x5965ce?_0x164a1f(_0x1acf52,_0x30a5fc):_0x1acf52,_0x3c2dc9=_0x1bfa17['length']-0x1,_0x8b2da6;_0x3c2dc9>=0x0;_0x3c2dc9--)(_0x8b2da6=_0x1bfa17[_0x3c2dc9])&&(_0x13bc9a=_0x8b2da6(_0x13bc9a)||_0x13bc9a);return _0x13bc9a;},_0x4d7359=(_0x36be51,_0x54f7a1)=>(_0x118d9e,_0x489296)=>_0x54f7a1(_0x118d9e,_0x489296,_0x36be51);function _0x784cd8(_0x21bc3a,_0x2a3b64){const _0x26c7a2=_0x56eb6d,_0x2d4c41=_0x21bc3a[_0x26c7a2(0x203)][0x0];return{..._0x2a3b64,'id':_0x2d4c41[_0x26c7a2(0x228)],'resolved':_0x21bc3a['solved']===0x1,'dT':_0x5e755e(_0x2d4c41[_0x26c7a2(0x242)]),'personId':_0x2d4c41['userId'],'threadId':_0x2d4c41[_0x26c7a2(0x259)]};}function _0x3efb9f(_0x308cc2,_0x1bce15,_0x32b32e){const _0x2f1266=_0x56eb6d;var _0x4f764,_0x217fac;if(((_0x217fac=(_0x4f764=_0x308cc2==null?void 0x0:_0x308cc2['replies'])==null?void 0x0:_0x4f764['length'])!=null?_0x217fac:0x0)>0x0){const _0x271a73=(_0x97e327,_0x38624d)=>({'id':_0x97e327[_0x2f1266(0x228)],'threadId':_0x97e327['threadId'],'dT':_0x5e755e(_0x97e327[_0x2f1266(0x242)]),'personId':_0x97e327[_0x2f1266(0x21e)],'resolved':_0x308cc2['solved']===_0x5a4ab8[_0x2f1266(0x260)],'unitId':_0x1bce15,'subUnitId':_0x32b32e,'text':JSON[_0x2f1266(0x24c)](_0x97e327[_0x2f1266(0x273)]),'parentId':_0x38624d}),_0x55c4fa=_0x271a73(_0x308cc2[_0x2f1266(0x203)][0x0]);return{..._0x55c4fa,'children':_0x308cc2[_0x2f1266(0x203)]['slice'](0x1)[_0x2f1266(0x24d)](_0x3557ff=>_0x271a73(_0x3557ff,_0x55c4fa['id']))};}return null;}let _0xe001c9=class{constructor(_0x3f8b68,_0x112640,_0x12ca28){const _0x2c7562=_0x56eb6d;this['_httpService']=_0x3f8b68,this[_0x2c7562(0x212)]=_0x112640,this[_0x2c7562(0x22d)]=_0x12ca28;}async[_0x56eb6d(0x231)](_0xa64478){const _0x1d3e3d=_0x56eb6d;var _0x45f045,_0x3e1f35;const {parentId:_0x204ebd,unitId:_0xb1a92b,text:_0x236253,threadId:_0x56cc93}=_0xa64478,_0x7f4574=(_0x3e1f35=(_0x45f045=_0x236253[_0x1d3e3d(0x21d)])==null?void 0x0:_0x45f045[_0x1d3e3d(0x229)](_0x12c34a=>_0x12c34a[_0x1d3e3d(0x1ff)]===_0x112501[_0x1d3e3d(0x239)]['COMMENT'])['map'](_0x571c35=>_0x571c35[_0x1d3e3d(0x23c)]))!=null?_0x3e1f35:[],_0x5547b6=JSON['stringify'](_0x236253),_0x42663c=(await this['_sessionService'][_0x1d3e3d(0x201)](_0xb1a92b))['getMemberID']();if(_0x204ebd){const _0x555f67={'memberId':_0x42663c,'unitId':_0xb1a92b,'content':_0x5547b6,'mention':_0x7f4574,'threadId':_0x56cc93},_0x2a2315=(await this[_0x1d3e3d(0x22e)][_0x1d3e3d(0x22f)](_0x1d3e3d(0x25c)+_0xb1a92b+_0x1d3e3d(0x208),{'body':_0x555f67}))[_0x1d3e3d(0x213)][_0x1d3e3d(0x270)];return{..._0xa64478,'id':_0x2a2315['replyId'],'dT':_0x112501['dayjs'](+_0x2a2315[_0x1d3e3d(0x242)])['format'](_0x1d3e3d(0x1f7)),'personId':_0x2a2315[_0x1d3e3d(0x21e)]};}else{const _0x49f70d={'memberId':_0x42663c,'unitId':_0xb1a92b,'content':_0x5547b6,'mention':_0x7f4574},_0x593391=await this['_httpService'][_0x1d3e3d(0x22f)](_0x1d3e3d(0x25c)+_0xb1a92b+_0x1d3e3d(0x223),{'body':_0x49f70d});return _0x784cd8(_0x593391[_0x1d3e3d(0x213)][_0x1d3e3d(0x227)],_0xa64478);}}async[_0x56eb6d(0x23d)](_0x247fb1){const _0x409868=_0x56eb6d;var _0x4a60cb,_0x583470;const {text:_0x355fbe,unitId:_0x1c0ef2}=_0x247fb1,_0x93a9db=(_0x583470=(_0x4a60cb=_0x355fbe[_0x409868(0x21d)])==null?void 0x0:_0x4a60cb[_0x409868(0x229)](_0x4f63b6=>_0x4f63b6[_0x409868(0x1ff)]===_0x112501['CustomRangeType']['COMMENT'])[_0x409868(0x24d)](_0x1005ec=>_0x1005ec[_0x409868(0x23c)]))!=null?_0x583470:[],_0x521798=JSON[_0x409868(0x1fd)](_0x355fbe),_0xdb77e4=_0x247fb1[_0x409868(0x259)],_0x6edb6a=_0x247fb1['id'],_0x21ab86={'memberId':(await this[_0x409868(0x22d)][_0x409868(0x201)](_0x1c0ef2))[_0x409868(0x202)](),'unitId':_0x1c0ef2,'threadId':_0xdb77e4,'mention':_0x93a9db,'content':_0x521798,'replyId':_0x6edb6a},_0x2355e3=await this[_0x409868(0x22e)][_0x409868(0x22f)](_0x409868(0x25c)+_0x1c0ef2+_0x409868(0x244),{'body':_0x21ab86});return!_0x2355e3[_0x409868(0x213)]['error']||_0x2355e3[_0x409868(0x213)][_0x409868(0x22b)][_0x409868(0x235)]===0x1;}async[_0x56eb6d(0x23a)](_0x365a6a){const _0x59d795=_0x56eb6d,{unitId:_0x4479e9}=_0x365a6a,_0x219a5a=_0x365a6a[_0x59d795(0x259)],_0x3bf494={'memberId':this[_0x59d795(0x212)][_0x59d795(0x206)]()['userID'],'unitId':_0x4479e9,'threadId':_0x219a5a,'solved':_0x365a6a[_0x59d795(0x257)]?_0x5a4ab8[_0x59d795(0x260)]:_0x5a4ab8['OpenOrReOpen']},_0x122ce4=await this['_httpService'][_0x59d795(0x22f)]('/universer-api/comment/unit/'+_0x4479e9+_0x59d795(0x1f4),{'body':_0x3bf494});return!_0x122ce4[_0x59d795(0x213)][_0x59d795(0x22b)]||_0x122ce4[_0x59d795(0x213)][_0x59d795(0x22b)][_0x59d795(0x235)]===0x1;}async[_0x56eb6d(0x24f)](_0x49bd0c,_0x5ba3ce,_0x5a9ebb,_0x54a3bd){const _0xc027bc=_0x56eb6d,_0x5b9a7c={'memberId':(await this[_0xc027bc(0x22d)][_0xc027bc(0x201)](_0x49bd0c))[_0xc027bc(0x202)](),'threadId':_0x5a9ebb,'replyId':_0x54a3bd,'unitId':_0x49bd0c},_0x3e0a56=await this[_0xc027bc(0x22e)]['post'](_0xc027bc(0x25c)+_0x49bd0c+_0xc027bc(0x261),{'body':_0x5b9a7c});return!_0x3e0a56['body'][_0xc027bc(0x22b)]||_0x3e0a56[_0xc027bc(0x213)][_0xc027bc(0x22b)]['code']===0x1;}async[_0x56eb6d(0x20c)](_0x54288e,_0x4e127b,_0xd95642){const _0x71be79=_0x56eb6d,_0x4af0b5={'unitId':_0x54288e,'threadId':_0xd95642},_0x26a897=await this[_0x71be79(0x22e)][_0x71be79(0x22f)](_0x71be79(0x25c)+_0x54288e+_0x71be79(0x26e),{'body':_0x4af0b5}),_0x411a5f=_0xd95642[_0x71be79(0x24d)](_0x20ff42=>_0x3efb9f(_0x26a897[_0x71be79(0x213)][_0x71be79(0x22a)][_0x20ff42],_0x54288e,_0x4e127b))[_0x71be79(0x229)](Boolean);return Object['values'](_0x26a897['body'][_0x71be79(0x263)])[_0x71be79(0x26a)](_0x4502d2=>{const _0x8a43b1=_0x71be79;this[_0x8a43b1(0x212)]['addUser'](_0x4502d2);}),_0x411a5f;}[_0x56eb6d(0x249)](_0x3d3076){const _0x6e9cd1=_0x56eb6d;return{'id':_0x3d3076['id'],'threadId':_0x3d3076[_0x6e9cd1(0x259)],'ref':_0x3d3076['ref']};}};_0xe001c9=_0x1bac0c([_0x4d7359(0x0,_0x112501[_0x56eb6d(0x23b)](_0x367fa3[_0x56eb6d(0x24e)])),_0x4d7359(0x1,_0x112501[_0x56eb6d(0x23b)](_0x112501[_0x56eb6d(0x252)])),_0x4d7359(0x2,_0x112501['Inject'](_0x6fd3a5['CollaborationSessionService']))],_0xe001c9);var _0x1942f1=Object['getOwnPropertyDescriptor'],_0x57bb0d=(_0x5f15e8,_0x58d010,_0x470962,_0x76004a)=>{const _0x39b0f8=_0x56eb6d;for(var _0x450bd0=_0x76004a>0x1?void 0x0:_0x76004a?_0x1942f1(_0x58d010,_0x470962):_0x58d010,_0x189642=_0x5f15e8[_0x39b0f8(0x265)]-0x1,_0x358ad3;_0x189642>=0x0;_0x189642--)(_0x358ad3=_0x5f15e8[_0x189642])&&(_0x450bd0=_0x358ad3(_0x450bd0)||_0x450bd0);return _0x450bd0;},_0x16b3c7=(_0x194087,_0xc54cf5)=>(_0x28f22e,_0x2555b1)=>_0xc54cf5(_0x28f22e,_0x2555b1,_0x194087);let _0x11057f=class extends _0x112501[_0x56eb6d(0x21b)]{constructor(_0xeae537,_0x5efc6d){const _0x197a72=_0x56eb6d;super(),this[_0x197a72(0x21a)]=_0xeae537,this['_threadCommentDataSource']=_0x5efc6d,this[_0x197a72(0x219)]();}['_initDataSource'](){const _0x28c644=_0x56eb6d;this['_threadCommentDataSourceService'][_0x28c644(0x1f9)]=this[_0x28c644(0x255)],this['_threadCommentDataSourceService'][_0x28c644(0x278)]=!0x1;}};_0x11057f=_0x57bb0d([_0x16b3c7(0x0,_0xcb6e46[_0x56eb6d(0x238)]),_0x16b3c7(0x1,_0x112501[_0x56eb6d(0x23b)](_0xe001c9))],_0x11057f);var _0x2d0cb7=Object[_0x56eb6d(0x236)],_0x4a30fa=Object[_0x56eb6d(0x268)],_0x19b890=(_0x3e2d1c,_0x1d04f4,_0x31e780)=>_0x1d04f4 in _0x3e2d1c?_0x2d0cb7(_0x3e2d1c,_0x1d04f4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31e780}):_0x3e2d1c[_0x1d04f4]=_0x31e780,_0x381aa7=(_0x4ab467,_0x5cafd0,_0x2d2323,_0x4b9eca)=>{const _0x1166f6=_0x56eb6d;for(var _0x4953e7=_0x4b9eca>0x1?void 0x0:_0x4b9eca?_0x4a30fa(_0x5cafd0,_0x2d2323):_0x5cafd0,_0x3c3534=_0x4ab467[_0x1166f6(0x265)]-0x1,_0xed11cf;_0x3c3534>=0x0;_0x3c3534--)(_0xed11cf=_0x4ab467[_0x3c3534])&&(_0x4953e7=_0xed11cf(_0x4953e7)||_0x4953e7);return _0x4953e7;},_0x562844=(_0xf0c4e1,_0x92c4d1)=>(_0x5c9d09,_0x2ef6ca)=>_0x92c4d1(_0x5c9d09,_0x2ef6ca,_0xf0c4e1),_0x382365=(_0xec3036,_0x286f13,_0x45a12d)=>_0x19b890(_0xec3036,typeof _0x286f13!=_0x56eb6d(0x20e)?_0x286f13+'':_0x286f13,_0x45a12d);_0x5dc3cc[_0x56eb6d(0x230)]=class extends _0x112501[_0x56eb6d(0x20b)]{constructor(_0x4a3cb2=_0xf4ffdd,_0x310c53,_0x5efea8){const _0x143457=_0x56eb6d;super(),this['_config']=_0x4a3cb2,this['_injector']=_0x310c53,this[_0x143457(0x246)]=_0x5efea8;const {..._0xea2e43}=_0x112501[_0x143457(0x274)]({},_0xf4ffdd,this[_0x143457(0x258)]);this[_0x143457(0x246)][_0x143457(0x266)](_0x55a6bd,_0xea2e43);}['onStarting'](){const _0x476ee5=_0x56eb6d;[[_0xe001c9],[_0x11057f],[_0x1f28d9]][_0x476ee5(0x26a)](_0x1aff36=>{const _0xb83ae2=_0x476ee5;this[_0xb83ae2(0x1fa)]['add'](_0x1aff36);});}[_0x56eb6d(0x247)](){const _0x39dbbf=_0x56eb6d;this[_0x39dbbf(0x1fa)][_0x39dbbf(0x256)](_0x11057f),this[_0x39dbbf(0x1fa)]['get'](_0x1f28d9);}},_0x382365(_0x5dc3cc[_0x56eb6d(0x230)],_0x56eb6d(0x25e),_0xf2f31),_0x382365(_0x5dc3cc[_0x56eb6d(0x230)],_0x56eb6d(0x24a),_0x112501[_0x56eb6d(0x245)]['UNIVER_UNKNOWN']),_0x5dc3cc['UniverThreadCommentDataSourcePlugin']=_0x381aa7([_0x112501['DependentOn'](_0x1d552b[_0x56eb6d(0x1f3)],_0x6fd3a5[_0x56eb6d(0x1fc)],_0x5bc113['UniverLicensePlugin']),_0x562844(0x1,_0x112501[_0x56eb6d(0x23b)](_0x112501['Injector'])),_0x562844(0x2,_0x112501[_0x56eb6d(0x234)])],_0x5dc3cc[_0x56eb6d(0x230)]),Object[_0x56eb6d(0x236)](_0x5dc3cc,Symbol[_0x56eb6d(0x277)],{'value':'Module'});}));
|
|
1
|
+
(function(_0x5da13a,_0x3f8a83){const _0x15a510=_0x5033,_0x5ebcc2=_0x5da13a();while(!![]){try{const _0x1e6150=-parseInt(_0x15a510(0x225))/0x1*(-parseInt(_0x15a510(0x1e5))/0x2)+parseInt(_0x15a510(0x22e))/0x3+parseInt(_0x15a510(0x228))/0x4+-parseInt(_0x15a510(0x1e1))/0x5+parseInt(_0x15a510(0x215))/0x6*(parseInt(_0x15a510(0x1bf))/0x7)+-parseInt(_0x15a510(0x206))/0x8+-parseInt(_0x15a510(0x1fe))/0x9;if(_0x1e6150===_0x3f8a83)break;else _0x5ebcc2['push'](_0x5ebcc2['shift']());}catch(_0x24fd31){_0x5ebcc2['push'](_0x5ebcc2['shift']());}}}(_0x1b27,0xdd9de),function(_0x4d0ce8,_0x2aec0c){const _0x57585c=_0x5033;typeof exports==_0x57585c(0x1f1)&&typeof module<'u'?_0x2aec0c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x57585c(0x207)&&define[_0x57585c(0x1dc)]?define([_0x57585c(0x22a),'@univerjs-pro/collaboration-client',_0x57585c(0x1b2),_0x57585c(0x21b),_0x57585c(0x1f4),_0x57585c(0x214),_0x57585c(0x201),'@univerjs/network'],_0x2aec0c):(_0x4d0ce8=typeof globalThis<'u'?globalThis:_0x4d0ce8||self,_0x2aec0c(_0x4d0ce8[_0x57585c(0x1fa)]={},_0x4d0ce8[_0x57585c(0x1c6)],_0x4d0ce8[_0x57585c(0x223)],_0x4d0ce8[_0x57585c(0x1cf)],_0x4d0ce8[_0x57585c(0x1e7)],_0x4d0ce8[_0x57585c(0x1b1)],_0x4d0ce8[_0x57585c(0x201)],_0x4d0ce8['UniverNetwork']));}(this,function(_0x1384e2,_0xd637b2,_0xb4ec85,_0xca3df0,_0x2832a7,_0xc5ac98,_0x1c95db,_0x2413ad){'use strict';const _0x1b6927=_0x5033;const _0x36886f=_0x1b6927(0x1c7);var _0x271263=(_0x232d1d=>(_0x232d1d[_0x232d1d[_0x1b6927(0x205)]=0x0]=_0x1b6927(0x205),_0x232d1d[_0x232d1d[_0x1b6927(0x1b0)]=0x1]=_0x1b6927(0x1b0),_0x232d1d[_0x232d1d[_0x1b6927(0x1c5)]=-0x1]=_0x1b6927(0x1c5),_0x232d1d))(_0x271263||{}),_0x13e2d0=(_0x55393a=>(_0x55393a[_0x55393a[_0x1b6927(0x1ed)]=0x0]=_0x1b6927(0x1ed),_0x55393a[_0x55393a[_0x1b6927(0x1e6)]=0x1]=_0x1b6927(0x1e6),_0x55393a[_0x55393a[_0x1b6927(0x1ba)]=0x2]=_0x1b6927(0x1ba),_0x55393a[_0x55393a['Edit']=0x3]='Edit',_0x55393a[_0x55393a['Delete']=0x4]='Delete',_0x55393a[_0x55393a[_0x1b6927(0x1ee)]=0x5]='Solve',_0x55393a[_0x55393a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x55393a))(_0x13e2d0||{});const _0x5106e7=_0x525295=>_0xca3df0['dayjs'](new Date(+_0x525295))[_0x1b6927(0x22b)](_0x1b6927(0x1bb)),_0x1325ae=async(_0x3e4c65,_0x479503)=>{const _0xf7a301=_0x1b6927,_0x4cbc17=_0x3e4c65['get'](_0xca3df0[_0xf7a301(0x1df)]),_0x6fb204=_0x3e4c65['get'](_0x2413ad[_0xf7a301(0x1b6)]);_0x479503[_0xf7a301(0x1b9)](_0x434fad=>{const _0x38ea71=_0xf7a301;_0x4cbc17[_0x38ea71(0x1d9)](_0x434fad)&&_0x479503['delete'](_0x434fad);}),_0x479503[_0xf7a301(0x21a)]&&(await _0x6fb204[_0xf7a301(0x222)](_0xf7a301(0x1d2),{'params':{'userIDs':[..._0x479503]}}))[_0xf7a301(0x1c2)]['users'][_0xf7a301(0x1b9)](_0x517972=>{const _0xa45fda=_0xf7a301;_0x517972&&_0x4cbc17[_0xa45fda(0x1f6)](_0x517972);});};var _0x2fadb1=Object[_0x1b6927(0x229)],_0x5d48ff=(_0x575886,_0x58150a,_0x5985b4,_0x2d453b)=>{const _0x4fe517=_0x1b6927;for(var _0x19b9bb=_0x2d453b>0x1?void 0x0:_0x2d453b?_0x2fadb1(_0x58150a,_0x5985b4):_0x58150a,_0xad0ccb=_0x575886[_0x4fe517(0x221)]-0x1,_0x53aff7;_0xad0ccb>=0x0;_0xad0ccb--)(_0x53aff7=_0x575886[_0xad0ccb])&&(_0x19b9bb=_0x53aff7(_0x19b9bb)||_0x19b9bb);return _0x19b9bb;},_0x5130cb=(_0x594ba1,_0x50a438)=>(_0x5bdab5,_0x454c52)=>_0x50a438(_0x5bdab5,_0x454c52,_0x594ba1);let _0x169a97=class extends _0xca3df0[_0x1b6927(0x1a7)]{constructor(_0x224cfb,_0x4bb323,_0x2f3c80,_0x368373){const _0x2c5ba9=_0x1b6927;super(),this['_commentService']=_0x224cfb,this[_0x2c5ba9(0x1db)]=_0x4bb323,this[_0x2c5ba9(0x1d5)]=_0x2f3c80,this[_0x2c5ba9(0x1eb)]=_0x368373,this[_0x2c5ba9(0x217)](),this['_initUserSync']();}['_initUserSync'](){const _0x3e61bb=_0x1b6927;this[_0x3e61bb(0x21e)](this[_0x3e61bb(0x1db)][_0x3e61bb(0x1a9)]['pipe'](_0x1c95db[_0x3e61bb(0x1cd)](0x10))[_0x3e61bb(0x1b8)](_0x8aab6b=>{const _0x584782=_0x3e61bb,_0x82c416=new Set();_0x8aab6b['forEach'](_0x4324ab=>{const _0x414450=_0x5033;switch(_0x4324ab[_0x414450(0x1f9)]){case _0x414450(0x1ea):{const _0x134e10=_0x4324ab[_0x414450(0x204)]['personId'];_0x82c416[_0x414450(0x1ea)](_0x134e10);break;}}}),_0x1325ae(this[_0x584782(0x1eb)],_0x82c416);}));}['_init'](){const _0x3bf308=_0x1b6927;this['disposeWithMe'](this[_0x3bf308(0x1e2)][_0x3bf308(0x1a9)][_0x3bf308(0x1b8)](async _0xebbb27=>{const _0xb9e7a=_0x3bf308;var _0x59a6f6,_0x5138cb,_0x4655e5,_0x1679fb;const _0x11f385=(_0x59a6f6=this[_0xb9e7a(0x1db)][_0xb9e7a(0x1b4)](_0xebbb27['unitId'])[_0xb9e7a(0x1e0)](_0x2a05a0=>_0x2a05a0['threadId']===_0xebbb27[_0xb9e7a(0x1ff)]))==null?void 0x0:_0x59a6f6[_0xb9e7a(0x226)];if(!_0x11f385)return;const {unitId:_0x25da35,subUnitId:_0x40d396}=_0x11f385;switch(_0xebbb27[_0xb9e7a(0x1fc)]&&this[_0xb9e7a(0x1d5)]['addUser'](_0xebbb27['user']),_0xebbb27[_0xb9e7a(0x1f9)]){case _0x13e2d0[_0xb9e7a(0x1e6)]:break;case _0x13e2d0['Reply']:{this['_threadCommentModel'][_0xb9e7a(0x203)](_0x25da35,_0x40d396,{'unitId':_0x25da35,'subUnitId':_0x40d396,'ref':'','id':_0xebbb27['replyId'],'dT':_0x5106e7(+_0xebbb27[_0xb9e7a(0x1f0)]),'threadId':_0xebbb27[_0xb9e7a(0x1ff)],'personId':(_0x4655e5=(_0x5138cb=_0xebbb27[_0xb9e7a(0x1fc)])==null?void 0x0:_0x5138cb['userID'])!=null?_0x4655e5:_0xebbb27[_0xb9e7a(0x1d0)],'text':JSON[_0xb9e7a(0x211)](_0xebbb27['content']),'parentId':_0x11f385['id']});break;}case _0x13e2d0[_0xb9e7a(0x20e)]:{const _0x2a6b1a=this[_0xb9e7a(0x1db)][_0xb9e7a(0x1de)](_0x25da35,_0x40d396,_0xebbb27[_0xb9e7a(0x1c1)]);_0x2a6b1a&&_0x2a6b1a[_0xb9e7a(0x1b7)]&&this['_threadCommentModel'][_0xb9e7a(0x1d3)](_0x25da35,_0x40d396,_0xebbb27['replyId']);break;}case _0x13e2d0[_0xb9e7a(0x1b5)]:{this[_0xb9e7a(0x1db)][_0xb9e7a(0x1f8)](_0x25da35,_0x40d396,{'commentId':_0xebbb27[_0xb9e7a(0x1c1)],'text':JSON[_0xb9e7a(0x211)](_0xebbb27[_0xb9e7a(0x1d8)])});break;}case _0x13e2d0[_0xb9e7a(0x1ee)]:{const _0x2c2285=(_0x1679fb=this[_0xb9e7a(0x1db)][_0xb9e7a(0x1b4)](_0xebbb27[_0xb9e7a(0x1be)])[_0xb9e7a(0x1e0)](_0x3e4d3f=>_0x3e4d3f[_0xb9e7a(0x1ff)]===_0xebbb27[_0xb9e7a(0x1ff)]))==null?void 0x0:_0x1679fb[_0xb9e7a(0x226)];_0x2c2285&&this[_0xb9e7a(0x1db)]['resolveComment'](_0x25da35,_0x40d396,_0x2c2285['id'],_0xebbb27[_0xb9e7a(0x21c)]===_0x271263[_0xb9e7a(0x1b0)]);break;}}}));}};_0x169a97=_0x5d48ff([_0x5130cb(0x0,_0xca3df0['Inject'](_0xd637b2[_0x1b6927(0x220)])),_0x5130cb(0x1,_0xca3df0['Inject'](_0xc5ac98['ThreadCommentModel'])),_0x5130cb(0x2,_0xca3df0['Inject'](_0xca3df0['UserManagerService'])),_0x5130cb(0x3,_0xca3df0[_0x1b6927(0x202)](_0xca3df0['Injector']))],_0x169a97);const _0x2b4a16=_0x1b6927(0x208),_0x261ea6={};var _0x30124f=Object[_0x1b6927(0x229)],_0x142f98=(_0x49e3dd,_0x247b98,_0x425fc2,_0x13c3f0)=>{const _0x9269f9=_0x1b6927;for(var _0x28f474=_0x13c3f0>0x1?void 0x0:_0x13c3f0?_0x30124f(_0x247b98,_0x425fc2):_0x247b98,_0x523210=_0x49e3dd[_0x9269f9(0x221)]-0x1,_0x15595e;_0x523210>=0x0;_0x523210--)(_0x15595e=_0x49e3dd[_0x523210])&&(_0x28f474=_0x15595e(_0x28f474)||_0x28f474);return _0x28f474;},_0x7bf77=(_0x54d7ff,_0x33cafe)=>(_0x1e984d,_0x8853f0)=>_0x33cafe(_0x1e984d,_0x8853f0,_0x54d7ff);function _0xb8caed(_0x137d6d,_0x47f4ef){const _0x26c914=_0x1b6927,_0x49ce09=_0x137d6d[_0x26c914(0x1fb)][0x0];return{..._0x47f4ef,'id':_0x49ce09[_0x26c914(0x1c1)],'resolved':_0x137d6d[_0x26c914(0x21c)]===0x1,'dT':_0x5106e7(_0x49ce09[_0x26c914(0x1f0)]),'personId':_0x49ce09['userId'],'threadId':_0x49ce09[_0x26c914(0x1ff)]};}function _0x2f96a7(_0x1d0c80,_0xdefb4f,_0x211782){const _0x5f2aa7=_0x1b6927;var _0x190d49,_0x5019e5;if(((_0x5019e5=(_0x190d49=_0x1d0c80==null?void 0x0:_0x1d0c80[_0x5f2aa7(0x1fb)])==null?void 0x0:_0x190d49[_0x5f2aa7(0x221)])!=null?_0x5019e5:0x0)>0x0){const _0x22d9e8=(_0x513878,_0x438eb7)=>({'id':_0x513878['replyId'],'threadId':_0x513878[_0x5f2aa7(0x1ff)],'dT':_0x5106e7(_0x513878['createTimestamp']),'personId':_0x513878[_0x5f2aa7(0x1d0)],'resolved':_0x1d0c80[_0x5f2aa7(0x21c)]===_0x271263[_0x5f2aa7(0x1b0)],'unitId':_0xdefb4f,'subUnitId':_0x211782,'text':JSON[_0x5f2aa7(0x211)](_0x513878[_0x5f2aa7(0x1d8)]),'parentId':_0x438eb7}),_0x56b151=_0x22d9e8(_0x1d0c80['replies'][0x0]);return{..._0x56b151,'children':_0x1d0c80[_0x5f2aa7(0x1fb)][_0x5f2aa7(0x1a8)](0x1)[_0x5f2aa7(0x1d1)](_0x46d726=>_0x22d9e8(_0x46d726,_0x56b151['id']))};}return null;}let _0x23fd58=class{constructor(_0x53d34d,_0x5b4dd3,_0x1d7ad1){const _0x12ef84=_0x1b6927;this[_0x12ef84(0x1b3)]=_0x53d34d,this[_0x12ef84(0x1d5)]=_0x5b4dd3,this[_0x12ef84(0x1bc)]=_0x1d7ad1;}async[_0x1b6927(0x203)](_0x2f0a2f){const _0x389dd6=_0x1b6927;var _0x24b8a1,_0x1b8d85;const {parentId:_0x5eb9d3,unitId:_0x4ffa80,text:_0x4cc82c,threadId:_0x2b5298}=_0x2f0a2f,_0xf39665=(_0x1b8d85=(_0x24b8a1=_0x4cc82c[_0x389dd6(0x1cc)])==null?void 0x0:_0x24b8a1[_0x389dd6(0x1e3)](_0x3d094d=>_0x3d094d['rangeType']===_0xca3df0['CustomRangeType'][_0x389dd6(0x1fd)])[_0x389dd6(0x1d1)](_0x59e52c=>_0x59e52c[_0x389dd6(0x1d7)]))!=null?_0x1b8d85:[],_0x608a16=JSON[_0x389dd6(0x1c0)](_0x4cc82c),_0x596cf0=(await this['_sessionService']['requireSession'](_0x4ffa80))[_0x389dd6(0x1ad)]();if(_0x5eb9d3){const _0x15a37b={'memberId':_0x596cf0,'unitId':_0x4ffa80,'content':_0x608a16,'mention':_0xf39665,'threadId':_0x2b5298},_0x150565=(await this[_0x389dd6(0x1b3)][_0x389dd6(0x219)](_0x389dd6(0x1ef)+_0x4ffa80+_0x389dd6(0x21d),{'body':_0x15a37b}))['body'][_0x389dd6(0x1c3)];return{..._0x2f0a2f,'id':_0x150565[_0x389dd6(0x1c1)],'dT':_0xca3df0['dayjs'](+_0x150565[_0x389dd6(0x1f0)])[_0x389dd6(0x22b)](_0x389dd6(0x1bb)),'personId':_0x150565[_0x389dd6(0x1d0)]};}else{const _0x68ebbd={'memberId':_0x596cf0,'unitId':_0x4ffa80,'content':_0x608a16,'mention':_0xf39665},_0x356182=await this['_httpService'][_0x389dd6(0x219)](_0x389dd6(0x1ef)+_0x4ffa80+_0x389dd6(0x1bd),{'body':_0x68ebbd});return _0xb8caed(_0x356182[_0x389dd6(0x1c2)][_0x389dd6(0x1e9)],_0x2f0a2f);}}async['updateComment'](_0x5a616f){const _0x432668=_0x1b6927;var _0xbf30d8,_0x440dce;const {text:_0x2b054f,unitId:_0x575368}=_0x5a616f,_0x566e27=(_0x440dce=(_0xbf30d8=_0x2b054f[_0x432668(0x1cc)])==null?void 0x0:_0xbf30d8[_0x432668(0x1e3)](_0x2049aa=>_0x2049aa[_0x432668(0x218)]===_0xca3df0[_0x432668(0x1d4)]['COMMENT'])[_0x432668(0x1d1)](_0x1ba003=>_0x1ba003[_0x432668(0x1d7)]))!=null?_0x440dce:[],_0x4fd834=JSON['stringify'](_0x2b054f),_0x34e533=_0x5a616f[_0x432668(0x1ff)],_0x229c6f=_0x5a616f['id'],_0x3d3781={'memberId':(await this[_0x432668(0x1bc)][_0x432668(0x1f5)](_0x575368))[_0x432668(0x1ad)](),'unitId':_0x575368,'threadId':_0x34e533,'mention':_0x566e27,'content':_0x4fd834,'replyId':_0x229c6f},_0x3a3d0a=await this[_0x432668(0x1b3)][_0x432668(0x219)](_0x432668(0x1ef)+_0x575368+_0x432668(0x1ac),{'body':_0x3d3781});return!_0x3a3d0a[_0x432668(0x1c2)]['error']||_0x3a3d0a[_0x432668(0x1c2)][_0x432668(0x1f7)]['code']===0x1;}async[_0x1b6927(0x1ca)](_0x5eb025){const _0xed5df4=_0x1b6927,{unitId:_0x241955}=_0x5eb025,_0x5db4b7=_0x5eb025['threadId'],_0x5c59d4={'memberId':this[_0xed5df4(0x1d5)][_0xed5df4(0x1ab)]()[_0xed5df4(0x1d6)],'unitId':_0x241955,'threadId':_0x5db4b7,'solved':_0x5eb025[_0xed5df4(0x20a)]?_0x271263['Solved']:_0x271263[_0xed5df4(0x205)]},_0x15e0eb=await this[_0xed5df4(0x1b3)]['post'](_0xed5df4(0x1ef)+_0x241955+_0xed5df4(0x1cb),{'body':_0x5c59d4});return!_0x15e0eb[_0xed5df4(0x1c2)]['error']||_0x15e0eb['body'][_0xed5df4(0x1f7)]['code']===0x1;}async[_0x1b6927(0x1d3)](_0x30e3ea,_0x72815a,_0x34c545,_0xa7f3b0){const _0x543651=_0x1b6927,_0x35a5bd={'memberId':(await this[_0x543651(0x1bc)][_0x543651(0x1f5)](_0x30e3ea))[_0x543651(0x1ad)](),'threadId':_0x34c545,'replyId':_0xa7f3b0,'unitId':_0x30e3ea},_0x1e9249=await this['_httpService']['post'](_0x543651(0x1ef)+_0x30e3ea+_0x543651(0x1dd),{'body':_0x35a5bd});return!_0x1e9249[_0x543651(0x1c2)][_0x543651(0x1f7)]||_0x1e9249[_0x543651(0x1c2)][_0x543651(0x1f7)]['code']===0x1;}async['listComments'](_0x2abc2b,_0x5d993b,_0x2c3a17){const _0x3192ee=_0x1b6927,_0x4d9189={'unitId':_0x2abc2b,'threadId':_0x2c3a17},_0xada11e=await this['_httpService'][_0x3192ee(0x219)](_0x3192ee(0x1ef)+_0x2abc2b+_0x3192ee(0x1c4),{'body':_0x4d9189}),_0x3314d4=_0x2c3a17['map'](_0x1e6fb7=>_0x2f96a7(_0xada11e['body'][_0x3192ee(0x212)][_0x1e6fb7],_0x2abc2b,_0x5d993b))[_0x3192ee(0x1e3)](Boolean);return Object[_0x3192ee(0x210)](_0xada11e[_0x3192ee(0x1c2)][_0x3192ee(0x1f3)])[_0x3192ee(0x1b9)](_0x7517=>{this['_userService']['addUser'](_0x7517);}),_0x3314d4;}[_0x1b6927(0x20f)](_0x75dab){const _0x365244=_0x1b6927;return{'id':_0x75dab['id'],'threadId':_0x75dab[_0x365244(0x1ff)],'ref':_0x75dab[_0x365244(0x22c)]};}};_0x23fd58=_0x142f98([_0x7bf77(0x0,_0xca3df0['Inject'](_0x2413ad[_0x1b6927(0x1b6)])),_0x7bf77(0x1,_0xca3df0[_0x1b6927(0x202)](_0xca3df0[_0x1b6927(0x1df)])),_0x7bf77(0x2,_0xca3df0['Inject'](_0xd637b2[_0x1b6927(0x1da)]))],_0x23fd58);var _0x5544c9=Object[_0x1b6927(0x229)],_0x4a5157=(_0x2f4d54,_0x42256a,_0x5c302f,_0x6d5afc)=>{const _0x5d7d68=_0x1b6927;for(var _0x96adf1=_0x6d5afc>0x1?void 0x0:_0x6d5afc?_0x5544c9(_0x42256a,_0x5c302f):_0x42256a,_0x2319cf=_0x2f4d54[_0x5d7d68(0x221)]-0x1,_0x1d7575;_0x2319cf>=0x0;_0x2319cf--)(_0x1d7575=_0x2f4d54[_0x2319cf])&&(_0x96adf1=_0x1d7575(_0x96adf1)||_0x96adf1);return _0x96adf1;},_0x23beb0=(_0x15a4c6,_0x4381db)=>(_0x25886b,_0xab13fd)=>_0x4381db(_0x25886b,_0xab13fd,_0x15a4c6);let _0x4213a4=class extends _0xca3df0['Disposable']{constructor(_0x21d371,_0x5d5c33){const _0x178092=_0x1b6927;super(),this[_0x178092(0x22f)]=_0x21d371,this[_0x178092(0x1af)]=_0x5d5c33,this[_0x178092(0x1c8)]();}[_0x1b6927(0x1c8)](){const _0x32b8ed=_0x1b6927;this[_0x32b8ed(0x22f)][_0x32b8ed(0x1ec)]=this[_0x32b8ed(0x1af)],this[_0x32b8ed(0x22f)]['syncUpdateMutationToColla']=!0x1;}};_0x4213a4=_0x4a5157([_0x23beb0(0x0,_0xc5ac98[_0x1b6927(0x1c9)]),_0x23beb0(0x1,_0xca3df0[_0x1b6927(0x202)](_0x23fd58))],_0x4213a4);var _0x57b98a=Object[_0x1b6927(0x22d)],_0x36553a=Object[_0x1b6927(0x229)],_0xd73c6f=(_0x58ea0e,_0x386796,_0x249734)=>_0x386796 in _0x58ea0e?_0x57b98a(_0x58ea0e,_0x386796,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x249734}):_0x58ea0e[_0x386796]=_0x249734,_0x334824=(_0x25bea0,_0x467bd7,_0x4af12d,_0x24d34f)=>{const _0x13ae0d=_0x1b6927;for(var _0x3c14b9=_0x24d34f>0x1?void 0x0:_0x24d34f?_0x36553a(_0x467bd7,_0x4af12d):_0x467bd7,_0x3a9f9f=_0x25bea0[_0x13ae0d(0x221)]-0x1,_0x5deb58;_0x3a9f9f>=0x0;_0x3a9f9f--)(_0x5deb58=_0x25bea0[_0x3a9f9f])&&(_0x3c14b9=_0x5deb58(_0x3c14b9)||_0x3c14b9);return _0x3c14b9;},_0x4a30e2=(_0x529ae3,_0x40f71)=>(_0x334f0d,_0x379c60)=>_0x40f71(_0x334f0d,_0x379c60,_0x529ae3),_0x3851b7=(_0x1a00ea,_0x10d732,_0x4e1baa)=>_0xd73c6f(_0x1a00ea,typeof _0x10d732!=_0x1b6927(0x224)?_0x10d732+'':_0x10d732,_0x4e1baa);_0x1384e2[_0x1b6927(0x1aa)]=class extends _0xca3df0[_0x1b6927(0x20b)]{constructor(_0x47fa39=_0x261ea6,_0x1fc894,_0x35e781){const _0x38f22a=_0x1b6927;super(),this[_0x38f22a(0x200)]=_0x47fa39,this['_injector']=_0x1fc894,this[_0x38f22a(0x209)]=_0x35e781;const {..._0x4e5127}=_0xca3df0[_0x38f22a(0x216)]({},_0x261ea6,this[_0x38f22a(0x200)]);this[_0x38f22a(0x209)][_0x38f22a(0x20d)](_0x2b4a16,_0x4e5127);}[_0x1b6927(0x1e8)](){const _0x4013be=_0x1b6927;[[_0x23fd58],[_0x4213a4],[_0x169a97]][_0x4013be(0x1b9)](_0x4bd13e=>{const _0x29bdb3=_0x4013be;this['_injector'][_0x29bdb3(0x1ea)](_0x4bd13e);});}[_0x1b6927(0x1ce)](){const _0x14f6ac=_0x1b6927;this['_injector'][_0x14f6ac(0x222)](_0x4213a4),this[_0x14f6ac(0x1eb)][_0x14f6ac(0x222)](_0x169a97);}},_0x3851b7(_0x1384e2['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x36886f),_0x3851b7(_0x1384e2[_0x1b6927(0x1aa)],'type',_0xca3df0[_0x1b6927(0x20c)]['UNIVER_UNKNOWN']),_0x1384e2[_0x1b6927(0x1aa)]=_0x334824([_0xca3df0[_0x1b6927(0x1f2)](_0x2832a7[_0x1b6927(0x1ae)],_0xd637b2[_0x1b6927(0x227)],_0xb4ec85[_0x1b6927(0x1e4)]),_0x4a30e2(0x1,_0xca3df0[_0x1b6927(0x202)](_0xca3df0[_0x1b6927(0x21f)])),_0x4a30e2(0x2,_0xca3df0['IConfigService'])],_0x1384e2['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x1384e2,Symbol['toStringTag'],{'value':_0x1b6927(0x213)});}));function _0x5033(_0xc0537e,_0x1adce0){const _0x1b2795=_0x1b27();return _0x5033=function(_0x503383,_0x3f76e4){_0x503383=_0x503383-0x1a7;let _0x77dcdc=_0x1b2795[_0x503383];return _0x77dcdc;},_0x5033(_0xc0537e,_0x1adce0);}function _0x1b27(){const _0xdeb7d=['saveCommentToSnapshot','values','parse','comments','Module','@univerjs/thread-comment','168GNkJxY','merge','_init','rangeType','post','size','@univerjs/core','solved','/reply','disposeWithMe','Injector','CommentService','length','get','UniverProLicense','symbol','1VpHjhg','root','UniverCollaborationClientPlugin','2663028SBBzJe','getOwnPropertyDescriptor','exports','format','ref','defineProperty','2874435HYLHpl','_threadCommentDataSourceService','Disposable','slice','commentUpdate$','UniverThreadCommentDataSourcePlugin','getCurrentUser','/edit','getMemberID','UniverThreadCommentUIPlugin','_threadCommentDataSource','Solved','UniverThreadComment','@univerjs-pro/license','_httpService','getUnit','Edit','HTTPService','parentId','subscribe','forEach','Reply','YYYY/MM/DD\x20HH:mm','_sessionService','/add','unitId','51079DAafEw','stringify','replyId','body','reply','/list','UNRECOGNIZED','UniverProCollaborationClient','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','IThreadCommentDataSourceService','resolveComment','/solved','customRanges','bufferTime','onReady','UniverCore','userId','map','/universer-api/user/list','deleteComment','CustomRangeType','_userService','userID','rangeId','content','getUser','CollaborationSessionService','_threadCommentModel','amd','/delete','getComment','UserManagerService','find','3363925zGFFLr','_commentService','filter','UniverLicensePlugin','1221314cqUYdO','Add','UniverThreadCommentUi','onStarting','comment','add','_injector','dataSource','Unknown','Solve','/universer-api/comment/unit/','createTimestamp','object','DependentOn','users','@univerjs/thread-comment-ui','requireSession','addUser','error','updateComment','type','UniverProThreadCommentDatasource','replies','user','COMMENT','227646sBLrkM','threadId','_config','rxjs','Inject','addComment','payload','OpenOrReOpen','6664432eQPbES','function','thread-comment-data-source.config','_configService','resolved','Plugin','UniverInstanceType','setConfig','Delete'];_0x1b27=function(){return _0xdeb7d;};return _0x1b27();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.10",
|
|
49
|
+
"@univerjs/core": "0.10.10",
|
|
50
|
+
"@univerjs/network": "0.10.10",
|
|
51
|
+
"@univerjs-pro/license": "0.10.10",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.
|
|
53
|
+
"@univerjs/thread-comment": "0.10.10",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.10"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.10"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|