@univerjs-pro/thread-comment-datasource 0.10.0-nightly.202507310307 → 0.10.1
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 _0x3ef7ad=_0x1810;function _0x356e(){const _0x298e08=['Solved','_threadCommentDataSourceService','disposeWithMe','defineProperty','getUser','CollaborationSessionService','size','COMMENT','getMemberID','rangeId','subscribe','40xaEoRn','dataSource','customRanges','find','Unknown','Injector','Delete','OpenOrReOpen','rangeType','_commentService','IConfigService','HTTPService','reply','parentId','get','userID','personId','_config','dayjs','stringify','CustomRangeType','Reply','getCurrentUser','slice','resolveComment','replyId','users','toStringTag','Add','merge','syncUpdateMutationToColla','forEach','Solve','/reply','_initUserSync','/delete','_userService','UniverThreadCommentUIPlugin','add','map','DependentOn','_initDataSource','replies','5397898qOdkPc','filter','saveCommentToSnapshot','parse','payload','post','UniverThreadCommentDataSourcePlugin','listComments','Inject','/universer-api/user/list','deleteComment','comments','threadId','/solved','addUser','type','symbol','ref','root','onStarting','_init','getComment','/universer-api/comment/unit/','_sessionService','Disposable','/edit','4065xgJLuJ','ThreadCommentModel','441700zScEly','/add','addComment','pluginName','createTimestamp','UniverLicensePlugin','body','144ulwNcV','475208prvEVj','code','UserManagerService','1149224TXmxFS','solved','Edit','_httpService','unitId','getUnit','_configService','IThreadCommentDataSourceService','_injector','9IaVggK','delete','2853132FjBTeK','UNRECOGNIZED','2892aGVOZg','values','_threadCommentModel','getOwnPropertyDescriptor','userId','length','requireSession','error','pipe','updateComment','format','content','71085YQmICL'];_0x356e=function(){return _0x298e08;};return _0x356e();}(function(_0x19ae5a,_0x59f571){const _0x38fbbf=_0x1810,_0x58c749=_0x19ae5a();while(!![]){try{const _0x18ca86=parseInt(_0x38fbbf(0xe1))/0x1+-parseInt(_0x38fbbf(0xe9))/0x2+-parseInt(_0x38fbbf(0x80))/0x3+parseInt(_0x38fbbf(0x82))/0x4*(-parseInt(_0x38fbbf(0xdf))/0x5)+-parseInt(_0x38fbbf(0xe8))/0x6*(-parseInt(_0x38fbbf(0x8e))/0x7)+parseInt(_0x38fbbf(0x75))/0x8*(-parseInt(_0x38fbbf(0x7e))/0x9)+parseInt(_0x38fbbf(0x9a))/0xa*(parseInt(_0x38fbbf(0xc5))/0xb);if(_0x18ca86===_0x59f571)break;else _0x58c749['push'](_0x58c749['shift']());}catch(_0x2c3306){_0x58c749['push'](_0x58c749['shift']());}}}(_0x356e,0xb1c80));Object[_0x3ef7ad(0x92)](exports,Symbol[_0x3ef7ad(0xb5)],{'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=(_0x1b8fe7=>(_0x1b8fe7[_0x1b8fe7[_0x3ef7ad(0xa1)]=0x0]=_0x3ef7ad(0xa1),_0x1b8fe7[_0x1b8fe7['Solved']=0x1]=_0x3ef7ad(0x8f),_0x1b8fe7[_0x1b8fe7['UNRECOGNIZED']=-0x1]=_0x3ef7ad(0x81),_0x1b8fe7))(I||{}),v=(_0x46c568=>(_0x46c568[_0x46c568[_0x3ef7ad(0x9e)]=0x0]=_0x3ef7ad(0x9e),_0x46c568[_0x46c568[_0x3ef7ad(0xb6)]=0x1]=_0x3ef7ad(0xb6),_0x46c568[_0x46c568['Reply']=0x2]='Reply',_0x46c568[_0x46c568['Edit']=0x3]=_0x3ef7ad(0x77),_0x46c568[_0x46c568['Delete']=0x4]=_0x3ef7ad(0xa0),_0x46c568[_0x46c568[_0x3ef7ad(0xba)]=0x5]=_0x3ef7ad(0xba),_0x46c568[_0x46c568[_0x3ef7ad(0x81)]=-0x1]=_0x3ef7ad(0x81),_0x46c568))(v||{});const f=_0x1bc425=>c[_0x3ef7ad(0xac)](new Date(+_0x1bc425))[_0x3ef7ad(0x8c)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x10e1aa,_0xa7ed71)=>{const _0x33a7ba=_0x3ef7ad,_0x4281a9=_0x10e1aa[_0x33a7ba(0xa8)](c['UserManagerService']),_0x282597=_0x10e1aa[_0x33a7ba(0xa8)](P[_0x33a7ba(0xa5)]);_0xa7ed71[_0x33a7ba(0xb9)](_0x46c5b3=>{const _0x5128d7=_0x33a7ba;_0x4281a9[_0x5128d7(0x93)](_0x46c5b3)&&_0xa7ed71[_0x5128d7(0x7f)](_0x46c5b3);}),_0xa7ed71[_0x33a7ba(0x95)]&&(await _0x282597[_0x33a7ba(0xa8)](_0x33a7ba(0xce),{'params':{'userIDs':[..._0xa7ed71]}}))['body'][_0x33a7ba(0xb4)]['forEach'](_0x71b86b=>{_0x71b86b&&_0x4281a9['addUser'](_0x71b86b);});};var $=Object[_0x3ef7ad(0x85)],E=(_0x303c66,_0x5786dd,_0x39a38b,_0x3d2ccb)=>{const _0x239471=_0x3ef7ad;for(var _0x4f7aff=_0x3d2ccb>0x1?void 0x0:_0x3d2ccb?$(_0x5786dd,_0x39a38b):_0x5786dd,_0x258cae=_0x303c66[_0x239471(0x87)]-0x1,_0x221a5b;_0x258cae>=0x0;_0x258cae--)(_0x221a5b=_0x303c66[_0x258cae])&&(_0x4f7aff=_0x221a5b(_0x4f7aff)||_0x4f7aff);return _0x4f7aff;},S=(_0x49b3dd,_0xda6c42)=>(_0x3c57d0,_0xd07097)=>_0xda6c42(_0x3c57d0,_0xd07097,_0x49b3dd);let _=class extends c[_0x3ef7ad(0xdd)]{constructor(_0x1912e4,_0x555aa8,_0x31ad8c,_0x56359d){const _0x3b4fa0=_0x3ef7ad;super(),this[_0x3b4fa0(0xa3)]=_0x1912e4,this[_0x3b4fa0(0x84)]=_0x555aa8,this[_0x3b4fa0(0xbe)]=_0x31ad8c,this[_0x3b4fa0(0x7d)]=_0x56359d,this[_0x3b4fa0(0xd9)](),this[_0x3b4fa0(0xbc)]();}[_0x3ef7ad(0xbc)](){const _0x5ab135=_0x3ef7ad;this[_0x5ab135(0x91)](this[_0x5ab135(0x84)]['commentUpdate$'][_0x5ab135(0x8a)](j['bufferTime'](0x10))[_0x5ab135(0x99)](_0x24452a=>{const _0x2976e0=_0x5ab135,_0x1f31bd=new Set();_0x24452a[_0x2976e0(0xb9)](_0x37fa2b=>{const _0x232b4c=_0x2976e0;switch(_0x37fa2b[_0x232b4c(0xd4)]){case _0x232b4c(0xc0):{const _0x31166d=_0x37fa2b[_0x232b4c(0xc9)][_0x232b4c(0xaa)];_0x1f31bd[_0x232b4c(0xc0)](_0x31166d);break;}}}),R(this[_0x2976e0(0x7d)],_0x1f31bd);}));}[_0x3ef7ad(0xd9)](){const _0x1ec1f9=_0x3ef7ad;this[_0x1ec1f9(0x91)](this['_commentService']['commentUpdate$'][_0x1ec1f9(0x99)](async _0x561abd=>{const _0x4cc5d6=_0x1ec1f9;var _0x23c562,_0x3dbeb3,_0x83ddf7,_0x3a5eaf;const _0xd0712b=(_0x23c562=this['_threadCommentModel'][_0x4cc5d6(0x7a)](_0x561abd[_0x4cc5d6(0x79)])[_0x4cc5d6(0x9d)](_0x30f0a8=>_0x30f0a8['threadId']===_0x561abd[_0x4cc5d6(0xd1)]))==null?void 0x0:_0x23c562[_0x4cc5d6(0xd7)];if(!_0xd0712b)return;const {unitId:_0x10ecc2,subUnitId:_0x54574e}=_0xd0712b;switch(_0x561abd['user']&&this['_userService'][_0x4cc5d6(0xd3)](_0x561abd['user']),_0x561abd['type']){case v[_0x4cc5d6(0xb6)]:break;case v[_0x4cc5d6(0xaf)]:{this['_threadCommentModel'][_0x4cc5d6(0xe3)](_0x10ecc2,_0x54574e,{'unitId':_0x10ecc2,'subUnitId':_0x54574e,'ref':'','id':_0x561abd[_0x4cc5d6(0xb3)],'dT':f(+_0x561abd['createTimestamp']),'threadId':_0x561abd[_0x4cc5d6(0xd1)],'personId':(_0x83ddf7=(_0x3dbeb3=_0x561abd['user'])==null?void 0x0:_0x3dbeb3[_0x4cc5d6(0xa9)])!=null?_0x83ddf7:_0x561abd['userId'],'text':JSON['parse'](_0x561abd['content']),'parentId':_0xd0712b['id']});break;}case v[_0x4cc5d6(0xa0)]:{const _0x2e28f9=this[_0x4cc5d6(0x84)][_0x4cc5d6(0xda)](_0x10ecc2,_0x54574e,_0x561abd['replyId']);_0x2e28f9&&_0x2e28f9[_0x4cc5d6(0xa7)]&&this[_0x4cc5d6(0x84)][_0x4cc5d6(0xcf)](_0x10ecc2,_0x54574e,_0x561abd[_0x4cc5d6(0xb3)]);break;}case v[_0x4cc5d6(0x77)]:{this[_0x4cc5d6(0x84)]['updateComment'](_0x10ecc2,_0x54574e,{'commentId':_0x561abd[_0x4cc5d6(0xb3)],'text':JSON[_0x4cc5d6(0xc8)](_0x561abd['content'])});break;}case v['Solve']:{const _0x2adfd8=(_0x3a5eaf=this[_0x4cc5d6(0x84)][_0x4cc5d6(0x7a)](_0x561abd[_0x4cc5d6(0x79)])[_0x4cc5d6(0x9d)](_0x30b9d4=>_0x30b9d4[_0x4cc5d6(0xd1)]===_0x561abd[_0x4cc5d6(0xd1)]))==null?void 0x0:_0x3a5eaf[_0x4cc5d6(0xd7)];_0x2adfd8&&this[_0x4cc5d6(0x84)][_0x4cc5d6(0xb2)](_0x10ecc2,_0x54574e,_0x2adfd8['id'],_0x561abd[_0x4cc5d6(0x76)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x3ef7ad(0xcd)](b['CommentService'])),S(0x1,c['Inject'](M[_0x3ef7ad(0xe0)])),S(0x2,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x74)])),S(0x3,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x9f)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x3ef7ad(0x85)],x=(_0x749cbb,_0x17af7b,_0x1f9e3e,_0x3f894b)=>{for(var _0x3def08=_0x3f894b>0x1?void 0x0:_0x3f894b?A(_0x17af7b,_0x1f9e3e):_0x17af7b,_0x112c85=_0x749cbb['length']-0x1,_0x15c1de;_0x112c85>=0x0;_0x112c85--)(_0x15c1de=_0x749cbb[_0x112c85])&&(_0x3def08=_0x15c1de(_0x3def08)||_0x3def08);return _0x3def08;},C=(_0x2c1b9f,_0x3f7cd3)=>(_0x50f944,_0x20c917)=>_0x3f7cd3(_0x50f944,_0x20c917,_0x2c1b9f);function Y(_0x541646,_0x4b1072){const _0x1a8b9b=_0x3ef7ad,_0x25fa24=_0x541646[_0x1a8b9b(0xc4)][0x0];return{..._0x4b1072,'id':_0x25fa24[_0x1a8b9b(0xb3)],'resolved':_0x541646['solved']===0x1,'dT':f(_0x25fa24[_0x1a8b9b(0xe5)]),'personId':_0x25fa24['userId'],'threadId':_0x25fa24['threadId']};}function G(_0x2b4b33,_0x6d47f5,_0x356e82){const _0x53f6e0=_0x3ef7ad;var _0x463e50,_0x252538;if(((_0x252538=(_0x463e50=_0x2b4b33==null?void 0x0:_0x2b4b33['replies'])==null?void 0x0:_0x463e50[_0x53f6e0(0x87)])!=null?_0x252538:0x0)>0x0){const _0x3432a9=(_0x547114,_0x30d137)=>({'id':_0x547114[_0x53f6e0(0xb3)],'threadId':_0x547114[_0x53f6e0(0xd1)],'dT':f(_0x547114[_0x53f6e0(0xe5)]),'personId':_0x547114[_0x53f6e0(0x86)],'resolved':_0x2b4b33[_0x53f6e0(0x76)]===I[_0x53f6e0(0x8f)],'unitId':_0x6d47f5,'subUnitId':_0x356e82,'text':JSON[_0x53f6e0(0xc8)](_0x547114[_0x53f6e0(0x8d)]),'parentId':_0x30d137}),_0x2f9887=_0x3432a9(_0x2b4b33[_0x53f6e0(0xc4)][0x0]);return{..._0x2f9887,'children':_0x2b4b33[_0x53f6e0(0xc4)][_0x53f6e0(0xb1)](0x1)[_0x53f6e0(0xc1)](_0x3f6fb3=>_0x3432a9(_0x3f6fb3,_0x2f9887['id']))};}return null;}let p=class{constructor(_0x30b065,_0x2a6f2c,_0x407050){const _0x43bb17=_0x3ef7ad;this[_0x43bb17(0x78)]=_0x30b065,this[_0x43bb17(0xbe)]=_0x2a6f2c,this[_0x43bb17(0xdc)]=_0x407050;}async[_0x3ef7ad(0xe3)](_0x594a88){const _0x26af6d=_0x3ef7ad;var _0x52fd5a,_0x6baf97;const {parentId:_0x10a72f,unitId:_0x2fa69,text:_0x32e815,threadId:_0x37bb9c}=_0x594a88,_0x586034=(_0x6baf97=(_0x52fd5a=_0x32e815[_0x26af6d(0x9c)])==null?void 0x0:_0x52fd5a[_0x26af6d(0xc6)](_0x191f33=>_0x191f33[_0x26af6d(0xa2)]===c[_0x26af6d(0xae)][_0x26af6d(0x96)])[_0x26af6d(0xc1)](_0x4f5f2f=>_0x4f5f2f[_0x26af6d(0x98)]))!=null?_0x6baf97:[],_0x4e092c=JSON['stringify'](_0x32e815),_0x1253ed=(await this[_0x26af6d(0xdc)][_0x26af6d(0x88)](_0x2fa69))[_0x26af6d(0x97)]();if(_0x10a72f){const _0x6bcd95={'memberId':_0x1253ed,'unitId':_0x2fa69,'content':_0x4e092c,'mention':_0x586034,'threadId':_0x37bb9c},_0x2ea588=(await this['_httpService'][_0x26af6d(0xca)]('/universer-api/comment/unit/'+_0x2fa69+_0x26af6d(0xbb),{'body':_0x6bcd95}))['body'][_0x26af6d(0xa6)];return{..._0x594a88,'id':_0x2ea588[_0x26af6d(0xb3)],'dT':c[_0x26af6d(0xac)](+_0x2ea588[_0x26af6d(0xe5)])[_0x26af6d(0x8c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2ea588[_0x26af6d(0x86)]};}else{const _0x284764={'memberId':_0x1253ed,'unitId':_0x2fa69,'content':_0x4e092c,'mention':_0x586034},_0x27fd69=await this[_0x26af6d(0x78)][_0x26af6d(0xca)]('/universer-api/comment/unit/'+_0x2fa69+_0x26af6d(0xe2),{'body':_0x284764});return Y(_0x27fd69[_0x26af6d(0xe7)]['comment'],_0x594a88);}}async[_0x3ef7ad(0x8b)](_0x45240b){const _0x3b2364=_0x3ef7ad;var _0x9df5e2,_0x54cb8e;const {text:_0x165d1f,unitId:_0x499815}=_0x45240b,_0x25da36=(_0x54cb8e=(_0x9df5e2=_0x165d1f[_0x3b2364(0x9c)])==null?void 0x0:_0x9df5e2[_0x3b2364(0xc6)](_0x288abe=>_0x288abe['rangeType']===c['CustomRangeType'][_0x3b2364(0x96)])['map'](_0x4105d3=>_0x4105d3[_0x3b2364(0x98)]))!=null?_0x54cb8e:[],_0x20be9c=JSON[_0x3b2364(0xad)](_0x165d1f),_0x17945a=_0x45240b['threadId'],_0x2e722e=_0x45240b['id'],_0x51e836={'memberId':(await this[_0x3b2364(0xdc)][_0x3b2364(0x88)](_0x499815))[_0x3b2364(0x97)](),'unitId':_0x499815,'threadId':_0x17945a,'mention':_0x25da36,'content':_0x20be9c,'replyId':_0x2e722e},_0x25a807=await this[_0x3b2364(0x78)]['post']('/universer-api/comment/unit/'+_0x499815+_0x3b2364(0xde),{'body':_0x51e836});return!_0x25a807[_0x3b2364(0xe7)]['error']||_0x25a807[_0x3b2364(0xe7)]['error']['code']===0x1;}async[_0x3ef7ad(0xb2)](_0x516845){const _0x505a4d=_0x3ef7ad,{unitId:_0xd7c5c9}=_0x516845,_0x8e4c47=_0x516845['threadId'],_0x1f889e={'memberId':this[_0x505a4d(0xbe)][_0x505a4d(0xb0)]()['userID'],'unitId':_0xd7c5c9,'threadId':_0x8e4c47,'solved':_0x516845['resolved']?I['Solved']:I[_0x505a4d(0xa1)]},_0x31253b=await this[_0x505a4d(0x78)][_0x505a4d(0xca)]('/universer-api/comment/unit/'+_0xd7c5c9+_0x505a4d(0xd2),{'body':_0x1f889e});return!_0x31253b[_0x505a4d(0xe7)][_0x505a4d(0x89)]||_0x31253b['body'][_0x505a4d(0x89)][_0x505a4d(0xea)]===0x1;}async['deleteComment'](_0x3199c2,_0xf1fd63,_0x5ee6d4,_0x190432){const _0x5e00ee=_0x3ef7ad,_0x2cc18e={'memberId':(await this[_0x5e00ee(0xdc)]['requireSession'](_0x3199c2))[_0x5e00ee(0x97)](),'threadId':_0x5ee6d4,'replyId':_0x190432,'unitId':_0x3199c2},_0xc6d40e=await this[_0x5e00ee(0x78)][_0x5e00ee(0xca)](_0x5e00ee(0xdb)+_0x3199c2+_0x5e00ee(0xbd),{'body':_0x2cc18e});return!_0xc6d40e[_0x5e00ee(0xe7)][_0x5e00ee(0x89)]||_0xc6d40e['body']['error'][_0x5e00ee(0xea)]===0x1;}async[_0x3ef7ad(0xcc)](_0x53a07b,_0x54d2c7,_0x231863){const _0x17ef7e=_0x3ef7ad,_0x3d64e2={'unitId':_0x53a07b,'threadId':_0x231863},_0x1396fa=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x53a07b+'/list',{'body':_0x3d64e2}),_0x57880a=_0x231863['map'](_0xd195c6=>G(_0x1396fa['body'][_0x17ef7e(0xd0)][_0xd195c6],_0x53a07b,_0x54d2c7))['filter'](Boolean);return Object[_0x17ef7e(0x83)](_0x1396fa[_0x17ef7e(0xe7)][_0x17ef7e(0xb4)])[_0x17ef7e(0xb9)](_0x485004=>{const _0x5b94d5=_0x17ef7e;this[_0x5b94d5(0xbe)][_0x5b94d5(0xd3)](_0x485004);}),_0x57880a;}[_0x3ef7ad(0xc7)](_0x2fae8e){const _0x9efcc6=_0x3ef7ad;return{'id':_0x2fae8e['id'],'threadId':_0x2fae8e[_0x9efcc6(0xd1)],'ref':_0x2fae8e[_0x9efcc6(0xd6)]};}};function _0x1810(_0x4f3283,_0xae002){const _0x356e89=_0x356e();return _0x1810=function(_0x181034,_0xee880c){_0x181034=_0x181034-0x74;let _0x2f7552=_0x356e89[_0x181034];return _0x2f7552;},_0x1810(_0x4f3283,_0xae002);}p=x([C(0x0,c[_0x3ef7ad(0xcd)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x3ef7ad(0x94)]))],p);var H=Object[_0x3ef7ad(0x85)],J=(_0x47d3cf,_0x4e912d,_0x12b446,_0x4f39b8)=>{for(var _0x3b9688=_0x4f39b8>0x1?void 0x0:_0x4f39b8?H(_0x4e912d,_0x12b446):_0x4e912d,_0x5a1c4c=_0x47d3cf['length']-0x1,_0x291296;_0x5a1c4c>=0x0;_0x5a1c4c--)(_0x291296=_0x47d3cf[_0x5a1c4c])&&(_0x3b9688=_0x291296(_0x3b9688)||_0x3b9688);return _0x3b9688;},y=(_0x341554,_0x495648)=>(_0x250d21,_0x25f3e5)=>_0x495648(_0x250d21,_0x25f3e5,_0x341554);let g=class extends c[_0x3ef7ad(0xdd)]{constructor(_0x403dad,_0x537844){const _0x27d553=_0x3ef7ad;super(),this['_threadCommentDataSourceService']=_0x403dad,this['_threadCommentDataSource']=_0x537844,this[_0x27d553(0xc3)]();}[_0x3ef7ad(0xc3)](){const _0x397f81=_0x3ef7ad;this[_0x397f81(0x90)][_0x397f81(0x9b)]=this['_threadCommentDataSource'],this[_0x397f81(0x90)][_0x397f81(0xb8)]=!0x1;}};g=J([y(0x0,M[_0x3ef7ad(0x7c)]),y(0x1,c[_0x3ef7ad(0xcd)](p))],g);var F=Object[_0x3ef7ad(0x92)],L=Object[_0x3ef7ad(0x85)],Z=(_0x996038,_0x481729,_0x33b8c0)=>_0x481729 in _0x996038?F(_0x996038,_0x481729,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x33b8c0}):_0x996038[_0x481729]=_0x33b8c0,W=(_0x343053,_0x509f03,_0x9c6431,_0x4263a3)=>{const _0x41e7b5=_0x3ef7ad;for(var _0x47bca6=_0x4263a3>0x1?void 0x0:_0x4263a3?L(_0x509f03,_0x9c6431):_0x509f03,_0xb5b212=_0x343053[_0x41e7b5(0x87)]-0x1,_0x5a4e8c;_0xb5b212>=0x0;_0xb5b212--)(_0x5a4e8c=_0x343053[_0xb5b212])&&(_0x47bca6=_0x5a4e8c(_0x47bca6)||_0x47bca6);return _0x47bca6;},O=(_0x22dd5d,_0x38b3dc)=>(_0x61a21f,_0x796135)=>_0x38b3dc(_0x61a21f,_0x796135,_0x22dd5d),N=(_0x52511d,_0x2317b7,_0x3ba2f3)=>Z(_0x52511d,typeof _0x2317b7!=_0x3ef7ad(0xd5)?_0x2317b7+'':_0x2317b7,_0x3ba2f3);exports[_0x3ef7ad(0xcb)]=class extends c['Plugin']{constructor(_0x431f48=D,_0x507c22,_0x670c30){const _0x3ec25d=_0x3ef7ad;super(),this[_0x3ec25d(0xab)]=_0x431f48,this[_0x3ec25d(0x7d)]=_0x507c22,this[_0x3ec25d(0x7b)]=_0x670c30;const {..._0x43ab56}=c[_0x3ec25d(0xb7)]({},D,this['_config']);this[_0x3ec25d(0x7b)]['setConfig'](q,_0x43ab56);}[_0x3ef7ad(0xd8)](){const _0x54b030=_0x3ef7ad;[[p],[g],[_]][_0x54b030(0xb9)](_0x5592e7=>{const _0x4b9616=_0x54b030;this['_injector'][_0x4b9616(0xc0)](_0x5592e7);});}['onReady'](){const _0x127db1=_0x3ef7ad;this[_0x127db1(0x7d)]['get'](g),this[_0x127db1(0x7d)][_0x127db1(0xa8)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3ef7ad(0xe4),U),N(exports[_0x3ef7ad(0xcb)],_0x3ef7ad(0xd4),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3ef7ad(0xc2)](w[_0x3ef7ad(0xbf)],b['UniverCollaborationClientPlugin'],T[_0x3ef7ad(0xe6)]),O(0x1,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x9f)])),O(0x2,c[_0x3ef7ad(0xa4)])],exports[_0x3ef7ad(0xcb)]);
|
|
1
|
+
'use strict';const _0x2c577b=_0x11cc;(function(_0x862ec1,_0x2c9379){const _0x49ac02=_0x11cc,_0x69c8ec=_0x862ec1();while(!![]){try{const _0xdfec02=-parseInt(_0x49ac02(0x1a7))/0x1+-parseInt(_0x49ac02(0x1b5))/0x2+parseInt(_0x49ac02(0x187))/0x3+-parseInt(_0x49ac02(0x1d1))/0x4+parseInt(_0x49ac02(0x184))/0x5+parseInt(_0x49ac02(0x17c))/0x6*(parseInt(_0x49ac02(0x1b1))/0x7)+parseInt(_0x49ac02(0x1ab))/0x8;if(_0xdfec02===_0x2c9379)break;else _0x69c8ec['push'](_0x69c8ec['shift']());}catch(_0x543243){_0x69c8ec['push'](_0x69c8ec['shift']());}}}(_0x15bc,0x50adb));Object[_0x2c577b(0x1c9)](exports,Symbol['toStringTag'],{'value':_0x2c577b(0x1d0)});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=(_0x3291bc=>(_0x3291bc[_0x3291bc[_0x2c577b(0x179)]=0x0]=_0x2c577b(0x179),_0x3291bc[_0x3291bc[_0x2c577b(0x177)]=0x1]='Solved',_0x3291bc[_0x3291bc[_0x2c577b(0x1da)]=-0x1]=_0x2c577b(0x1da),_0x3291bc))(I||{}),v=(_0x54039a=>(_0x54039a[_0x54039a['Unknown']=0x0]=_0x2c577b(0x1a9),_0x54039a[_0x54039a[_0x2c577b(0x1a1)]=0x1]=_0x2c577b(0x1a1),_0x54039a[_0x54039a['Reply']=0x2]=_0x2c577b(0x199),_0x54039a[_0x54039a[_0x2c577b(0x1dc)]=0x3]='Edit',_0x54039a[_0x54039a[_0x2c577b(0x1dd)]=0x4]='Delete',_0x54039a[_0x54039a[_0x2c577b(0x1a6)]=0x5]=_0x2c577b(0x1a6),_0x54039a[_0x54039a[_0x2c577b(0x1da)]=-0x1]=_0x2c577b(0x1da),_0x54039a))(v||{});function _0x15bc(){const _0x4cc134=['find','resolveComment','solved','symbol','updateComment','getUser','body','addComment','_userService','ThreadCommentModel','createTimestamp','length','/reply','getOwnPropertyDescriptor','Reply','Injector','code','_configService','get','replyId','DependentOn','rangeId','Add','onReady','CustomRangeType','stringify','UserManagerService','Solve','4625VbyPUa','type','Unknown','userID','2777280eeiPaO','UniverLicensePlugin','pipe','reply','/universer-api/user/list','UniverThreadCommentUIPlugin','119ZlbaUQ','_httpService','userId','CollaborationSessionService','774612LJcbhf','getComment','error','IConfigService','addUser','resolved','deleteComment','_injector','comment','ref','map','_sessionService','forEach','_threadCommentDataSource','/edit','thread-comment-data-source.config','personId','/delete','Plugin','format','defineProperty','commentUpdate$','/list','Disposable','unitId','pluginName','getUnit','Module','351328DpDKFc','slice','post','_threadCommentDataSourceService','users','values','_threadCommentModel','user','replies','UNRECOGNIZED','bufferTime','Edit','Delete','COMMENT','merge','payload','parentId','parse','filter','getCurrentUser','HTTPService','_initDataSource','Inject','add','UniverThreadCommentDataSourcePlugin','content','Solved','dayjs','OpenOrReOpen','root','dataSource','13956XrnNAN','comments','/universer-api/comment/unit/','getMemberID','threadId','requireSession','_commentService','rangeType','1289370ctanqT','customRanges','_initUserSync','496938UkiSGp','YYYY/MM/DD\x20HH:mm','onStarting','subscribe'];_0x15bc=function(){return _0x4cc134;};return _0x15bc();}const f=_0x137815=>c[_0x2c577b(0x178)](new Date(+_0x137815))[_0x2c577b(0x1c8)](_0x2c577b(0x188)),R=async(_0x45cdde,_0x320ff3)=>{const _0x56413b=_0x2c577b,_0x41c88c=_0x45cdde['get'](c['UserManagerService']),_0x26bc72=_0x45cdde[_0x56413b(0x19d)](P[_0x56413b(0x1e5)]);_0x320ff3['forEach'](_0x4aba19=>{const _0x49fc09=_0x56413b;_0x41c88c[_0x49fc09(0x190)](_0x4aba19)&&_0x320ff3['delete'](_0x4aba19);}),_0x320ff3['size']&&(await _0x26bc72['get'](_0x56413b(0x1af),{'params':{'userIDs':[..._0x320ff3]}}))[_0x56413b(0x191)][_0x56413b(0x1d5)][_0x56413b(0x1c1)](_0x31a99f=>{_0x31a99f&&_0x41c88c['addUser'](_0x31a99f);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4410ae,_0x1916fd,_0x236548,_0x2fe598)=>{for(var _0x3e589d=_0x2fe598>0x1?void 0x0:_0x2fe598?$(_0x1916fd,_0x236548):_0x1916fd,_0x7bfb3a=_0x4410ae['length']-0x1,_0x52d87d;_0x7bfb3a>=0x0;_0x7bfb3a--)(_0x52d87d=_0x4410ae[_0x7bfb3a])&&(_0x3e589d=_0x52d87d(_0x3e589d)||_0x3e589d);return _0x3e589d;},S=(_0x33f4c5,_0x20fdbf)=>(_0x2fb381,_0x311f70)=>_0x20fdbf(_0x2fb381,_0x311f70,_0x33f4c5);let _=class extends c['Disposable']{constructor(_0x1a4109,_0x5520a9,_0xd3e8d,_0x481d55){const _0x2f578d=_0x2c577b;super(),this[_0x2f578d(0x182)]=_0x1a4109,this['_threadCommentModel']=_0x5520a9,this[_0x2f578d(0x193)]=_0xd3e8d,this[_0x2f578d(0x1bc)]=_0x481d55,this['_init'](),this[_0x2f578d(0x186)]();}[_0x2c577b(0x186)](){const _0x350f9f=_0x2c577b;this['disposeWithMe'](this[_0x350f9f(0x1d7)]['commentUpdate$'][_0x350f9f(0x1ad)](j[_0x350f9f(0x1db)](0x10))[_0x350f9f(0x18a)](_0x3ff053=>{const _0x5aa717=_0x350f9f,_0xc8d2f2=new Set();_0x3ff053[_0x5aa717(0x1c1)](_0x351155=>{const _0x386309=_0x5aa717;switch(_0x351155[_0x386309(0x1a8)]){case'add':{const _0x443e95=_0x351155[_0x386309(0x1e0)][_0x386309(0x1c5)];_0xc8d2f2['add'](_0x443e95);break;}}}),R(this[_0x5aa717(0x1bc)],_0xc8d2f2);}));}['_init'](){const _0x4be3bc=_0x2c577b;this['disposeWithMe'](this['_commentService'][_0x4be3bc(0x1ca)]['subscribe'](async _0x241a7c=>{const _0x16fe1e=_0x4be3bc;var _0x432656,_0x146c2a,_0x312f83,_0xd09869;const _0x3a9192=(_0x432656=this[_0x16fe1e(0x1d7)][_0x16fe1e(0x1cf)](_0x241a7c[_0x16fe1e(0x1cd)])['find'](_0x51d90c=>_0x51d90c['threadId']===_0x241a7c['threadId']))==null?void 0x0:_0x432656[_0x16fe1e(0x17a)];if(!_0x3a9192)return;const {unitId:_0x1ec292,subUnitId:_0x9721be}=_0x3a9192;switch(_0x241a7c[_0x16fe1e(0x1d8)]&&this[_0x16fe1e(0x193)][_0x16fe1e(0x1b9)](_0x241a7c[_0x16fe1e(0x1d8)]),_0x241a7c[_0x16fe1e(0x1a8)]){case v['Add']:break;case v[_0x16fe1e(0x199)]:{this[_0x16fe1e(0x1d7)][_0x16fe1e(0x192)](_0x1ec292,_0x9721be,{'unitId':_0x1ec292,'subUnitId':_0x9721be,'ref':'','id':_0x241a7c[_0x16fe1e(0x19e)],'dT':f(+_0x241a7c[_0x16fe1e(0x195)]),'threadId':_0x241a7c['threadId'],'personId':(_0x312f83=(_0x146c2a=_0x241a7c[_0x16fe1e(0x1d8)])==null?void 0x0:_0x146c2a[_0x16fe1e(0x1aa)])!=null?_0x312f83:_0x241a7c['userId'],'text':JSON[_0x16fe1e(0x1e2)](_0x241a7c[_0x16fe1e(0x176)]),'parentId':_0x3a9192['id']});break;}case v[_0x16fe1e(0x1dd)]:{const _0x59ab98=this[_0x16fe1e(0x1d7)][_0x16fe1e(0x1b6)](_0x1ec292,_0x9721be,_0x241a7c[_0x16fe1e(0x19e)]);_0x59ab98&&_0x59ab98[_0x16fe1e(0x1e1)]&&this[_0x16fe1e(0x1d7)][_0x16fe1e(0x1bb)](_0x1ec292,_0x9721be,_0x241a7c[_0x16fe1e(0x19e)]);break;}case v['Edit']:{this[_0x16fe1e(0x1d7)][_0x16fe1e(0x18f)](_0x1ec292,_0x9721be,{'commentId':_0x241a7c[_0x16fe1e(0x19e)],'text':JSON['parse'](_0x241a7c[_0x16fe1e(0x176)])});break;}case v[_0x16fe1e(0x1a6)]:{const _0x199484=(_0xd09869=this[_0x16fe1e(0x1d7)][_0x16fe1e(0x1cf)](_0x241a7c['unitId'])[_0x16fe1e(0x18b)](_0xc1db81=>_0xc1db81[_0x16fe1e(0x180)]===_0x241a7c[_0x16fe1e(0x180)]))==null?void 0x0:_0xd09869[_0x16fe1e(0x17a)];_0x199484&&this[_0x16fe1e(0x1d7)][_0x16fe1e(0x18c)](_0x1ec292,_0x9721be,_0x199484['id'],_0x241a7c[_0x16fe1e(0x18d)]===I[_0x16fe1e(0x177)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x2c577b(0x1e7)](M[_0x2c577b(0x194)])),S(0x2,c[_0x2c577b(0x1e7)](c['UserManagerService'])),S(0x3,c[_0x2c577b(0x1e7)](c['Injector']))],_);const q=_0x2c577b(0x1c4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1b7d04,_0x49c290,_0x24c4c5,_0x12705f)=>{const _0x80865f=_0x2c577b;for(var _0x1e427f=_0x12705f>0x1?void 0x0:_0x12705f?A(_0x49c290,_0x24c4c5):_0x49c290,_0x424a17=_0x1b7d04[_0x80865f(0x196)]-0x1,_0x3b7792;_0x424a17>=0x0;_0x424a17--)(_0x3b7792=_0x1b7d04[_0x424a17])&&(_0x1e427f=_0x3b7792(_0x1e427f)||_0x1e427f);return _0x1e427f;},C=(_0x42437c,_0x19682e)=>(_0x2f7c59,_0xf9ea89)=>_0x19682e(_0x2f7c59,_0xf9ea89,_0x42437c);function Y(_0x383001,_0x4b114f){const _0x56f2a5=_0x2c577b,_0x2afb1=_0x383001['replies'][0x0];return{..._0x4b114f,'id':_0x2afb1[_0x56f2a5(0x19e)],'resolved':_0x383001['solved']===0x1,'dT':f(_0x2afb1[_0x56f2a5(0x195)]),'personId':_0x2afb1[_0x56f2a5(0x1b3)],'threadId':_0x2afb1[_0x56f2a5(0x180)]};}function G(_0x479894,_0x1f80a0,_0x341ed6){const _0x4a625f=_0x2c577b;var _0x1a8a40,_0x529e95;if(((_0x529e95=(_0x1a8a40=_0x479894==null?void 0x0:_0x479894[_0x4a625f(0x1d9)])==null?void 0x0:_0x1a8a40[_0x4a625f(0x196)])!=null?_0x529e95:0x0)>0x0){const _0x1210ee=(_0x4f21b5,_0x4a49ac)=>({'id':_0x4f21b5[_0x4a625f(0x19e)],'threadId':_0x4f21b5['threadId'],'dT':f(_0x4f21b5['createTimestamp']),'personId':_0x4f21b5[_0x4a625f(0x1b3)],'resolved':_0x479894[_0x4a625f(0x18d)]===I[_0x4a625f(0x177)],'unitId':_0x1f80a0,'subUnitId':_0x341ed6,'text':JSON['parse'](_0x4f21b5['content']),'parentId':_0x4a49ac}),_0x516c52=_0x1210ee(_0x479894[_0x4a625f(0x1d9)][0x0]);return{..._0x516c52,'children':_0x479894[_0x4a625f(0x1d9)][_0x4a625f(0x1d2)](0x1)[_0x4a625f(0x1bf)](_0x38e489=>_0x1210ee(_0x38e489,_0x516c52['id']))};}return null;}let p=class{constructor(_0x5360c5,_0x26a082,_0x2f5561){const _0xd69866=_0x2c577b;this['_httpService']=_0x5360c5,this[_0xd69866(0x193)]=_0x26a082,this[_0xd69866(0x1c0)]=_0x2f5561;}async[_0x2c577b(0x192)](_0x59262a){const _0x4d7be1=_0x2c577b;var _0x45f76e,_0x2d4395;const {parentId:_0x563631,unitId:_0x4203fb,text:_0x29ee0f,threadId:_0x5eaad5}=_0x59262a,_0x291fe0=(_0x2d4395=(_0x45f76e=_0x29ee0f[_0x4d7be1(0x185)])==null?void 0x0:_0x45f76e[_0x4d7be1(0x1e3)](_0x316984=>_0x316984[_0x4d7be1(0x183)]===c[_0x4d7be1(0x1a3)][_0x4d7be1(0x1de)])[_0x4d7be1(0x1bf)](_0x444a74=>_0x444a74['rangeId']))!=null?_0x2d4395:[],_0xa13a74=JSON[_0x4d7be1(0x1a4)](_0x29ee0f),_0x35135=(await this[_0x4d7be1(0x1c0)]['requireSession'](_0x4203fb))[_0x4d7be1(0x17f)]();if(_0x563631){const _0x486b77={'memberId':_0x35135,'unitId':_0x4203fb,'content':_0xa13a74,'mention':_0x291fe0,'threadId':_0x5eaad5},_0x59ee16=(await this['_httpService'][_0x4d7be1(0x1d3)](_0x4d7be1(0x17e)+_0x4203fb+_0x4d7be1(0x197),{'body':_0x486b77}))[_0x4d7be1(0x191)][_0x4d7be1(0x1ae)];return{..._0x59262a,'id':_0x59ee16[_0x4d7be1(0x19e)],'dT':c[_0x4d7be1(0x178)](+_0x59ee16[_0x4d7be1(0x195)])[_0x4d7be1(0x1c8)](_0x4d7be1(0x188)),'personId':_0x59ee16[_0x4d7be1(0x1b3)]};}else{const _0x3494b4={'memberId':_0x35135,'unitId':_0x4203fb,'content':_0xa13a74,'mention':_0x291fe0},_0x1e23f5=await this[_0x4d7be1(0x1b2)]['post'](_0x4d7be1(0x17e)+_0x4203fb+'/add',{'body':_0x3494b4});return Y(_0x1e23f5['body'][_0x4d7be1(0x1bd)],_0x59262a);}}async[_0x2c577b(0x18f)](_0x1c3ae1){const _0x508345=_0x2c577b;var _0x555741,_0x453987;const {text:_0x169f73,unitId:_0x2f6a29}=_0x1c3ae1,_0x1f1311=(_0x453987=(_0x555741=_0x169f73['customRanges'])==null?void 0x0:_0x555741[_0x508345(0x1e3)](_0xd787ed=>_0xd787ed[_0x508345(0x183)]===c[_0x508345(0x1a3)]['COMMENT'])[_0x508345(0x1bf)](_0x3543ba=>_0x3543ba[_0x508345(0x1a0)]))!=null?_0x453987:[],_0x5a74c2=JSON['stringify'](_0x169f73),_0x180745=_0x1c3ae1['threadId'],_0x3b0d2b=_0x1c3ae1['id'],_0x1108ab={'memberId':(await this['_sessionService']['requireSession'](_0x2f6a29))['getMemberID'](),'unitId':_0x2f6a29,'threadId':_0x180745,'mention':_0x1f1311,'content':_0x5a74c2,'replyId':_0x3b0d2b},_0x952439=await this[_0x508345(0x1b2)]['post'](_0x508345(0x17e)+_0x2f6a29+_0x508345(0x1c3),{'body':_0x1108ab});return!_0x952439['body'][_0x508345(0x1b7)]||_0x952439[_0x508345(0x191)][_0x508345(0x1b7)][_0x508345(0x19b)]===0x1;}async[_0x2c577b(0x18c)](_0x441f7f){const _0x41c27c=_0x2c577b,{unitId:_0x3dbfee}=_0x441f7f,_0x265e51=_0x441f7f['threadId'],_0x5332c2={'memberId':this[_0x41c27c(0x193)][_0x41c27c(0x1e4)]()['userID'],'unitId':_0x3dbfee,'threadId':_0x265e51,'solved':_0x441f7f[_0x41c27c(0x1ba)]?I['Solved']:I[_0x41c27c(0x179)]},_0x4279aa=await this[_0x41c27c(0x1b2)][_0x41c27c(0x1d3)](_0x41c27c(0x17e)+_0x3dbfee+'/solved',{'body':_0x5332c2});return!_0x4279aa['body'][_0x41c27c(0x1b7)]||_0x4279aa[_0x41c27c(0x191)][_0x41c27c(0x1b7)][_0x41c27c(0x19b)]===0x1;}async[_0x2c577b(0x1bb)](_0x5d41a7,_0x1b3915,_0x205a68,_0x4e699b){const _0xc4e610=_0x2c577b,_0x42e943={'memberId':(await this[_0xc4e610(0x1c0)][_0xc4e610(0x181)](_0x5d41a7))['getMemberID'](),'threadId':_0x205a68,'replyId':_0x4e699b,'unitId':_0x5d41a7},_0xe70c6d=await this[_0xc4e610(0x1b2)][_0xc4e610(0x1d3)](_0xc4e610(0x17e)+_0x5d41a7+_0xc4e610(0x1c6),{'body':_0x42e943});return!_0xe70c6d[_0xc4e610(0x191)][_0xc4e610(0x1b7)]||_0xe70c6d[_0xc4e610(0x191)]['error'][_0xc4e610(0x19b)]===0x1;}async['listComments'](_0x168fd9,_0x45df08,_0x24eb90){const _0x15c6f2=_0x2c577b,_0x21f775={'unitId':_0x168fd9,'threadId':_0x24eb90},_0x17e476=await this[_0x15c6f2(0x1b2)]['post'](_0x15c6f2(0x17e)+_0x168fd9+_0x15c6f2(0x1cb),{'body':_0x21f775}),_0x183e2c=_0x24eb90[_0x15c6f2(0x1bf)](_0x4baef6=>G(_0x17e476[_0x15c6f2(0x191)][_0x15c6f2(0x17d)][_0x4baef6],_0x168fd9,_0x45df08))[_0x15c6f2(0x1e3)](Boolean);return Object[_0x15c6f2(0x1d6)](_0x17e476[_0x15c6f2(0x191)][_0x15c6f2(0x1d5)])[_0x15c6f2(0x1c1)](_0x5bc9b6=>{const _0xfc93be=_0x15c6f2;this['_userService'][_0xfc93be(0x1b9)](_0x5bc9b6);}),_0x183e2c;}['saveCommentToSnapshot'](_0x2ee753){const _0x560806=_0x2c577b;return{'id':_0x2ee753['id'],'threadId':_0x2ee753[_0x560806(0x180)],'ref':_0x2ee753[_0x560806(0x1be)]};}};p=x([C(0x0,c[_0x2c577b(0x1e7)](P[_0x2c577b(0x1e5)])),C(0x1,c[_0x2c577b(0x1e7)](c[_0x2c577b(0x1a5)])),C(0x2,c['Inject'](b[_0x2c577b(0x1b4)]))],p);var H=Object[_0x2c577b(0x198)],J=(_0x1e1e85,_0x1f8417,_0x8aa9d7,_0x33365e)=>{const _0x443a03=_0x2c577b;for(var _0xd64a0=_0x33365e>0x1?void 0x0:_0x33365e?H(_0x1f8417,_0x8aa9d7):_0x1f8417,_0x29a97c=_0x1e1e85[_0x443a03(0x196)]-0x1,_0x196744;_0x29a97c>=0x0;_0x29a97c--)(_0x196744=_0x1e1e85[_0x29a97c])&&(_0xd64a0=_0x196744(_0xd64a0)||_0xd64a0);return _0xd64a0;},y=(_0x4999b5,_0x361e7c)=>(_0xfc0a8d,_0x27dfb5)=>_0x361e7c(_0xfc0a8d,_0x27dfb5,_0x4999b5);let g=class extends c[_0x2c577b(0x1cc)]{constructor(_0x695d9b,_0x35c788){const _0x33ba9d=_0x2c577b;super(),this[_0x33ba9d(0x1d4)]=_0x695d9b,this[_0x33ba9d(0x1c2)]=_0x35c788,this['_initDataSource']();}[_0x2c577b(0x1e6)](){const _0x19abd5=_0x2c577b;this[_0x19abd5(0x1d4)][_0x19abd5(0x17b)]=this['_threadCommentDataSource'],this[_0x19abd5(0x1d4)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x2c577b(0x1e7)](p))],g);function _0x11cc(_0x410a1b,_0x1c7bc9){const _0x15bc75=_0x15bc();return _0x11cc=function(_0x11cc8d,_0x543b95){_0x11cc8d=_0x11cc8d-0x176;let _0x16c05d=_0x15bc75[_0x11cc8d];return _0x16c05d;},_0x11cc(_0x410a1b,_0x1c7bc9);}var F=Object[_0x2c577b(0x1c9)],L=Object[_0x2c577b(0x198)],Z=(_0x523f98,_0x17dc82,_0x596175)=>_0x17dc82 in _0x523f98?F(_0x523f98,_0x17dc82,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x596175}):_0x523f98[_0x17dc82]=_0x596175,W=(_0x3437c9,_0x2bbb01,_0x244b6e,_0x30adab)=>{const _0x3f6985=_0x2c577b;for(var _0x42a43a=_0x30adab>0x1?void 0x0:_0x30adab?L(_0x2bbb01,_0x244b6e):_0x2bbb01,_0x2bb5be=_0x3437c9[_0x3f6985(0x196)]-0x1,_0x368223;_0x2bb5be>=0x0;_0x2bb5be--)(_0x368223=_0x3437c9[_0x2bb5be])&&(_0x42a43a=_0x368223(_0x42a43a)||_0x42a43a);return _0x42a43a;},O=(_0x2e19a6,_0x80d02)=>(_0xaf8f64,_0x5617ae)=>_0x80d02(_0xaf8f64,_0x5617ae,_0x2e19a6),N=(_0x3b7776,_0x336511,_0x4e8468)=>Z(_0x3b7776,typeof _0x336511!=_0x2c577b(0x18e)?_0x336511+'':_0x336511,_0x4e8468);exports[_0x2c577b(0x1e9)]=class extends c[_0x2c577b(0x1c7)]{constructor(_0xaf3a39=D,_0x197c65,_0x54a7c0){const _0x478cce=_0x2c577b;super(),this['_config']=_0xaf3a39,this[_0x478cce(0x1bc)]=_0x197c65,this[_0x478cce(0x19c)]=_0x54a7c0;const {..._0x5ec838}=c[_0x478cce(0x1df)]({},D,this['_config']);this[_0x478cce(0x19c)]['setConfig'](q,_0x5ec838);}[_0x2c577b(0x189)](){const _0x2010aa=_0x2c577b;[[p],[g],[_]][_0x2010aa(0x1c1)](_0x45c6c9=>{const _0x35c019=_0x2010aa;this[_0x35c019(0x1bc)][_0x35c019(0x1e8)](_0x45c6c9);});}[_0x2c577b(0x1a2)](){const _0x9c6a39=_0x2c577b;this[_0x9c6a39(0x1bc)][_0x9c6a39(0x19d)](g),this[_0x9c6a39(0x1bc)][_0x9c6a39(0x19d)](_);}},N(exports[_0x2c577b(0x1e9)],_0x2c577b(0x1ce),U),N(exports[_0x2c577b(0x1e9)],_0x2c577b(0x1a8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x2c577b(0x1e9)]=W([c[_0x2c577b(0x19f)](w[_0x2c577b(0x1b0)],b['UniverCollaborationClientPlugin'],T[_0x2c577b(0x1ac)]),O(0x1,c[_0x2c577b(0x1e7)](c[_0x2c577b(0x19a)])),O(0x2,c[_0x2c577b(0x1b8)])],exports[_0x2c577b(0x1e9)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2482b5=_0x36f5;(function(_0xf1335b,_0x1e66f9){const _0x3b88e6=_0x36f5,_0x1d9984=_0xf1335b();while(!![]){try{const _0x43c6fe=-parseInt(_0x3b88e6(0x225))/0x1+parseInt(_0x3b88e6(0x1fc))/0x2*(parseInt(_0x3b88e6(0x244))/0x3)+-parseInt(_0x3b88e6(0x21a))/0x4*(-parseInt(_0x3b88e6(0x23e))/0x5)+parseInt(_0x3b88e6(0x229))/0x6+parseInt(_0x3b88e6(0x1f9))/0x7+parseInt(_0x3b88e6(0x240))/0x8+-parseInt(_0x3b88e6(0x208))/0x9;if(_0x43c6fe===_0x1e66f9)break;else _0x1d9984['push'](_0x1d9984['shift']());}catch(_0x2ea407){_0x1d9984['push'](_0x1d9984['shift']());}}}(_0x30b3,0x891ac));function _0x30b3(){const _0x4fa12f=['Delete','UNRECOGNIZED','4776290WrAOWT','/list','8201728AKXjWL','getCurrentUser','/add','userID','15MXOVqQ','get','add','subscribe','threadId','Solved','OpenOrReOpen','Unknown','_threadCommentDataSourceService','_init','format','getUser','ref','rangeType','dataSource','type','saveCommentToSnapshot','unitId','parse','/solved','root','_commentService','addUser','content','_httpService','1070755FtPsgk','onReady','_sessionService','210396nxmMJr','deleteComment','_threadCommentDataSource','disposeWithMe','requireSession','syncUpdateMutationToColla','map','Reply','listComments','replies','forEach','createTimestamp','15225912GAfFzj','setConfig','Add','slice','defineProperty','Edit','replyId','_injector','filter','_initUserSync','_config','_initDataSource','stringify','comments','code','COMMENT','getComment','_threadCommentModel','4wNRoPK','getMemberID','personId','commentUpdate$','userId','/delete','symbol','/universer-api/comment/unit/','user','_userService','values','431867DAfKgI','size','/reply','length','154716OeLVTs','getUnit','customRanges','comment','Solve','/universer-api/user/list','solved','updateComment','error','_configService','find','getOwnPropertyDescriptor','users','body','resolveComment','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','addComment'];_0x30b3=function(){return _0x4fa12f;};return _0x30b3();}import{CommentService as _0x48a9f5,CollaborationSessionService as _0x385d7c,UniverCollaborationClientPlugin as _0x1aa4b3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26258d}from'@univerjs-pro/license';import{dayjs as _0x1fe5ef,UserManagerService as _0x3f1b78,Inject as _0x1289ff,Injector as _0x378ce5,Disposable as _0x1663e6,CustomRangeType as _0x261728,UniverInstanceType as _0x5abae1,DependentOn as _0x15259c,IConfigService as _0xa1e2a6,Plugin as _0x1215a8,merge as _0x4f79b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43a799}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49d49f,IThreadCommentDataSourceService as _0x555c27}from'@univerjs/thread-comment';import{bufferTime as _0x292fec}from'rxjs';function _0x36f5(_0x46d50a,_0xed5230){const _0x30b3c7=_0x30b3();return _0x36f5=function(_0x36f55e,_0x2b6a04){_0x36f55e=_0x36f55e-0x1f0;let _0x2887ba=_0x30b3c7[_0x36f55e];return _0x2887ba;},_0x36f5(_0x46d50a,_0xed5230);}import{HTTPService as _0x4193ea}from'@univerjs/network';const W=_0x2482b5(0x239);var I=(_0x3bb1e9=>(_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x24a)]=0x0]=_0x2482b5(0x24a),_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x249)]=0x1]='Solved',_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3bb1e9))(I||{}),v=(_0x3cb929=>(_0x3cb929[_0x3cb929['Unknown']=0x0]=_0x2482b5(0x24b),_0x3cb929[_0x3cb929['Add']=0x1]=_0x2482b5(0x20a),_0x3cb929[_0x3cb929['Reply']=0x2]=_0x2482b5(0x203),_0x3cb929[_0x3cb929['Edit']=0x3]=_0x2482b5(0x20d),_0x3cb929[_0x3cb929[_0x2482b5(0x23c)]=0x4]=_0x2482b5(0x23c),_0x3cb929[_0x3cb929[_0x2482b5(0x22d)]=0x5]=_0x2482b5(0x22d),_0x3cb929[_0x3cb929[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3cb929))(v||{});const y=_0x32c642=>_0x1fe5ef(new Date(+_0x32c642))[_0x2482b5(0x24e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x949c69,_0x2111f5)=>{const _0x22bfed=_0x2482b5,_0x51129b=_0x949c69[_0x22bfed(0x245)](_0x3f1b78),_0x2b40db=_0x949c69['get'](_0x4193ea);_0x2111f5[_0x22bfed(0x206)](_0x47794d=>{const _0x17e38b=_0x22bfed;_0x51129b[_0x17e38b(0x24f)](_0x47794d)&&_0x2111f5['delete'](_0x47794d);}),_0x2111f5[_0x22bfed(0x226)]&&(await _0x2b40db[_0x22bfed(0x245)](_0x22bfed(0x22e),{'params':{'userIDs':[..._0x2111f5]}}))[_0x22bfed(0x236)][_0x22bfed(0x235)]['forEach'](_0x5c565c=>{_0x5c565c&&_0x51129b['addUser'](_0x5c565c);});};var K=Object[_0x2482b5(0x234)],V=(_0x5ac750,_0xd338f0,_0x182ff9,_0x466841)=>{const _0x51e246=_0x2482b5;for(var _0x592327=_0x466841>0x1?void 0x0:_0x466841?K(_0xd338f0,_0x182ff9):_0xd338f0,_0x50dd29=_0x5ac750[_0x51e246(0x228)]-0x1,_0x25d153;_0x50dd29>=0x0;_0x50dd29--)(_0x25d153=_0x5ac750[_0x50dd29])&&(_0x592327=_0x25d153(_0x592327)||_0x592327);return _0x592327;},p=(_0x32fadb,_0x1de72e)=>(_0x2af5c7,_0x2798f6)=>_0x1de72e(_0x2af5c7,_0x2798f6,_0x32fadb);let _=class extends _0x1663e6{constructor(_0x40cd04,_0x3d6d90,_0x43e864,_0x16f732){const _0x260579=_0x2482b5;super(),this[_0x260579(0x1f5)]=_0x40cd04,this['_threadCommentModel']=_0x3d6d90,this[_0x260579(0x223)]=_0x43e864,this['_injector']=_0x16f732,this[_0x260579(0x24d)](),this[_0x260579(0x211)]();}[_0x2482b5(0x211)](){const _0x1d08f4=_0x2482b5;this['disposeWithMe'](this[_0x1d08f4(0x219)][_0x1d08f4(0x21d)]['pipe'](_0x292fec(0x10))[_0x1d08f4(0x247)](_0x597c20=>{const _0x4acf03=_0x1d08f4,_0xe03f25=new Set();_0x597c20[_0x4acf03(0x206)](_0xd568bd=>{const _0x5b6480=_0x4acf03;switch(_0xd568bd['type']){case'add':{const _0x162b3e=_0xd568bd['payload'][_0x5b6480(0x21c)];_0xe03f25[_0x5b6480(0x246)](_0x162b3e);break;}}}),B(this[_0x4acf03(0x20f)],_0xe03f25);}));}[_0x2482b5(0x24d)](){const _0x786df1=_0x2482b5;this[_0x786df1(0x1ff)](this[_0x786df1(0x1f5)][_0x786df1(0x21d)][_0x786df1(0x247)](async _0x43234c=>{const _0x369663=_0x786df1;var _0x10b72a,_0x1225b6,_0x1165f2,_0x3bed3d;const _0x33eea7=(_0x10b72a=this[_0x369663(0x219)]['getUnit'](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x5c2d53=>_0x5c2d53['threadId']===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x10b72a[_0x369663(0x1f4)];if(!_0x33eea7)return;const {unitId:_0x493a78,subUnitId:_0x5af512}=_0x33eea7;switch(_0x43234c['user']&&this['_userService'][_0x369663(0x1f6)](_0x43234c[_0x369663(0x222)]),_0x43234c[_0x369663(0x253)]){case v[_0x369663(0x20a)]:break;case v[_0x369663(0x203)]:{this[_0x369663(0x219)]['addComment'](_0x493a78,_0x5af512,{'unitId':_0x493a78,'subUnitId':_0x5af512,'ref':'','id':_0x43234c[_0x369663(0x20e)],'dT':y(+_0x43234c['createTimestamp']),'threadId':_0x43234c[_0x369663(0x248)],'personId':(_0x1165f2=(_0x1225b6=_0x43234c[_0x369663(0x222)])==null?void 0x0:_0x1225b6[_0x369663(0x243)])!=null?_0x1165f2:_0x43234c['userId'],'text':JSON[_0x369663(0x1f2)](_0x43234c[_0x369663(0x1f7)]),'parentId':_0x33eea7['id']});break;}case v[_0x369663(0x23c)]:{const _0x24db09=this[_0x369663(0x219)][_0x369663(0x218)](_0x493a78,_0x5af512,_0x43234c[_0x369663(0x20e)]);_0x24db09&&_0x24db09['parentId']&&this[_0x369663(0x219)]['deleteComment'](_0x493a78,_0x5af512,_0x43234c['replyId']);break;}case v['Edit']:{this[_0x369663(0x219)][_0x369663(0x230)](_0x493a78,_0x5af512,{'commentId':_0x43234c[_0x369663(0x20e)],'text':JSON[_0x369663(0x1f2)](_0x43234c['content'])});break;}case v[_0x369663(0x22d)]:{const _0x489c03=(_0x3bed3d=this[_0x369663(0x219)][_0x369663(0x22a)](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x9c06ca=>_0x9c06ca[_0x369663(0x248)]===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x3bed3d[_0x369663(0x1f4)];_0x489c03&&this[_0x369663(0x219)][_0x369663(0x237)](_0x493a78,_0x5af512,_0x489c03['id'],_0x43234c[_0x369663(0x22f)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1289ff(_0x48a9f5)),p(0x1,_0x1289ff(_0x49d49f)),p(0x2,_0x1289ff(_0x3f1b78)),p(0x3,_0x1289ff(_0x378ce5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x2482b5(0x234)],Q=(_0xa7119c,_0x332659,_0x2815c1,_0x137673)=>{const _0x29e9a6=_0x2482b5;for(var _0x1fba62=_0x137673>0x1?void 0x0:_0x137673?k(_0x332659,_0x2815c1):_0x332659,_0x2f2138=_0xa7119c[_0x29e9a6(0x228)]-0x1,_0x53cb04;_0x2f2138>=0x0;_0x2f2138--)(_0x53cb04=_0xa7119c[_0x2f2138])&&(_0x1fba62=_0x53cb04(_0x1fba62)||_0x1fba62);return _0x1fba62;},b=(_0x185208,_0xbd1c9f)=>(_0x2328c8,_0x57fbd8)=>_0xbd1c9f(_0x2328c8,_0x57fbd8,_0x185208);function X(_0x3b7d98,_0x11b8b2){const _0x1ee499=_0x2482b5,_0x1f49b4=_0x3b7d98[_0x1ee499(0x205)][0x0];return{..._0x11b8b2,'id':_0x1f49b4[_0x1ee499(0x20e)],'resolved':_0x3b7d98[_0x1ee499(0x22f)]===0x1,'dT':y(_0x1f49b4[_0x1ee499(0x207)]),'personId':_0x1f49b4[_0x1ee499(0x21e)],'threadId':_0x1f49b4[_0x1ee499(0x248)]};}function ee(_0x5851ba,_0x8d91de,_0x57b405){const _0x33de5d=_0x2482b5;var _0x32bdfb,_0x5221af;if(((_0x5221af=(_0x32bdfb=_0x5851ba==null?void 0x0:_0x5851ba[_0x33de5d(0x205)])==null?void 0x0:_0x32bdfb[_0x33de5d(0x228)])!=null?_0x5221af:0x0)>0x0){const _0x30f85e=(_0x9a3d55,_0x209e05)=>({'id':_0x9a3d55[_0x33de5d(0x20e)],'threadId':_0x9a3d55[_0x33de5d(0x248)],'dT':y(_0x9a3d55[_0x33de5d(0x207)]),'personId':_0x9a3d55[_0x33de5d(0x21e)],'resolved':_0x5851ba[_0x33de5d(0x22f)]===I[_0x33de5d(0x249)],'unitId':_0x8d91de,'subUnitId':_0x57b405,'text':JSON[_0x33de5d(0x1f2)](_0x9a3d55[_0x33de5d(0x1f7)]),'parentId':_0x209e05}),_0x2e0a10=_0x30f85e(_0x5851ba['replies'][0x0]);return{..._0x2e0a10,'children':_0x5851ba['replies'][_0x33de5d(0x20b)](0x1)['map'](_0x4455e7=>_0x30f85e(_0x4455e7,_0x2e0a10['id']))};}return null;}let S=class{constructor(_0x296e7d,_0x5154a8,_0x172d19){const _0x34ac29=_0x2482b5;this['_httpService']=_0x296e7d,this[_0x34ac29(0x223)]=_0x5154a8,this[_0x34ac29(0x1fb)]=_0x172d19;}async[_0x2482b5(0x23b)](_0x421dab){const _0x247af1=_0x2482b5;var _0x660813,_0x5f107c;const {parentId:_0x5ad9d1,unitId:_0xeeb610,text:_0xc12cb7,threadId:_0x562bcd}=_0x421dab,_0x31995d=(_0x5f107c=(_0x660813=_0xc12cb7[_0x247af1(0x22b)])==null?void 0x0:_0x660813[_0x247af1(0x210)](_0x20ae9e=>_0x20ae9e[_0x247af1(0x251)]===_0x261728[_0x247af1(0x217)])['map'](_0x2a1201=>_0x2a1201['rangeId']))!=null?_0x5f107c:[],_0x4260b5=JSON[_0x247af1(0x214)](_0xc12cb7),_0x54e567=(await this[_0x247af1(0x1fb)][_0x247af1(0x200)](_0xeeb610))[_0x247af1(0x21b)]();if(_0x5ad9d1){const _0x17f1a2={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d,'threadId':_0x562bcd},_0x5fb4cd=(await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x227),{'body':_0x17f1a2}))['body']['reply'];return{..._0x421dab,'id':_0x5fb4cd[_0x247af1(0x20e)],'dT':_0x1fe5ef(+_0x5fb4cd[_0x247af1(0x207)])[_0x247af1(0x24e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5fb4cd[_0x247af1(0x21e)]};}else{const _0x42a2a8={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d},_0x13b663=await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x242),{'body':_0x42a2a8});return X(_0x13b663['body'][_0x247af1(0x22c)],_0x421dab);}}async['updateComment'](_0x31c808){const _0x53ffca=_0x2482b5;var _0x53a46d,_0x4a9e08;const {text:_0x217b9a,unitId:_0xec6bc5}=_0x31c808,_0x378b97=(_0x4a9e08=(_0x53a46d=_0x217b9a['customRanges'])==null?void 0x0:_0x53a46d['filter'](_0x392a59=>_0x392a59[_0x53ffca(0x251)]===_0x261728[_0x53ffca(0x217)])[_0x53ffca(0x202)](_0x7b95a8=>_0x7b95a8['rangeId']))!=null?_0x4a9e08:[],_0x3bb85b=JSON[_0x53ffca(0x214)](_0x217b9a),_0x1cd503=_0x31c808['threadId'],_0x3d6525=_0x31c808['id'],_0x495519={'memberId':(await this[_0x53ffca(0x1fb)][_0x53ffca(0x200)](_0xec6bc5))[_0x53ffca(0x21b)](),'unitId':_0xec6bc5,'threadId':_0x1cd503,'mention':_0x378b97,'content':_0x3bb85b,'replyId':_0x3d6525},_0x1c8f61=await this['_httpService'][_0x53ffca(0x23a)](_0x53ffca(0x221)+_0xec6bc5+'/edit',{'body':_0x495519});return!_0x1c8f61[_0x53ffca(0x236)]['error']||_0x1c8f61[_0x53ffca(0x236)][_0x53ffca(0x231)][_0x53ffca(0x216)]===0x1;}async[_0x2482b5(0x237)](_0x1d68fe){const _0x1d590f=_0x2482b5,{unitId:_0x5790af}=_0x1d68fe,_0x113752=_0x1d68fe[_0x1d590f(0x248)],_0x446d51={'memberId':this[_0x1d590f(0x223)][_0x1d590f(0x241)]()['userID'],'unitId':_0x5790af,'threadId':_0x113752,'solved':_0x1d68fe['resolved']?I[_0x1d590f(0x249)]:I['OpenOrReOpen']},_0x40ce4f=await this[_0x1d590f(0x1f8)]['post'](_0x1d590f(0x221)+_0x5790af+_0x1d590f(0x1f3),{'body':_0x446d51});return!_0x40ce4f[_0x1d590f(0x236)]['error']||_0x40ce4f[_0x1d590f(0x236)][_0x1d590f(0x231)][_0x1d590f(0x216)]===0x1;}async[_0x2482b5(0x1fd)](_0x2618dd,_0x33f536,_0x3b2d3a,_0x1152dc){const _0x3d1dd9=_0x2482b5,_0x2e0cf5={'memberId':(await this[_0x3d1dd9(0x1fb)]['requireSession'](_0x2618dd))[_0x3d1dd9(0x21b)](),'threadId':_0x3b2d3a,'replyId':_0x1152dc,'unitId':_0x2618dd},_0x5251c8=await this[_0x3d1dd9(0x1f8)]['post'](_0x3d1dd9(0x221)+_0x2618dd+_0x3d1dd9(0x21f),{'body':_0x2e0cf5});return!_0x5251c8[_0x3d1dd9(0x236)]['error']||_0x5251c8['body'][_0x3d1dd9(0x231)][_0x3d1dd9(0x216)]===0x1;}async[_0x2482b5(0x204)](_0x1781af,_0x37c90d,_0x47b7f2){const _0x1a247a=_0x2482b5,_0x5be237={'unitId':_0x1781af,'threadId':_0x47b7f2},_0x52acac=await this[_0x1a247a(0x1f8)][_0x1a247a(0x23a)](_0x1a247a(0x221)+_0x1781af+_0x1a247a(0x23f),{'body':_0x5be237}),_0x15e0d4=_0x47b7f2[_0x1a247a(0x202)](_0x53d206=>ee(_0x52acac[_0x1a247a(0x236)][_0x1a247a(0x215)][_0x53d206],_0x1781af,_0x37c90d))[_0x1a247a(0x210)](Boolean);return Object[_0x1a247a(0x224)](_0x52acac[_0x1a247a(0x236)]['users'])[_0x1a247a(0x206)](_0x3fa766=>{const _0x4a9bcf=_0x1a247a;this[_0x4a9bcf(0x223)][_0x4a9bcf(0x1f6)](_0x3fa766);}),_0x15e0d4;}[_0x2482b5(0x1f0)](_0x41145b){const _0x2a8400=_0x2482b5;return{'id':_0x41145b['id'],'threadId':_0x41145b['threadId'],'ref':_0x41145b[_0x2a8400(0x250)]};}};S=Q([b(0x0,_0x1289ff(_0x4193ea)),b(0x1,_0x1289ff(_0x3f1b78)),b(0x2,_0x1289ff(_0x385d7c))],S);var re=Object[_0x2482b5(0x234)],te=(_0x584608,_0x5b4ed9,_0x1f21ad,_0x403030)=>{const _0x42290c=_0x2482b5;for(var _0xa6baee=_0x403030>0x1?void 0x0:_0x403030?re(_0x5b4ed9,_0x1f21ad):_0x5b4ed9,_0x5adadf=_0x584608[_0x42290c(0x228)]-0x1,_0x13ac6b;_0x5adadf>=0x0;_0x5adadf--)(_0x13ac6b=_0x584608[_0x5adadf])&&(_0xa6baee=_0x13ac6b(_0xa6baee)||_0xa6baee);return _0xa6baee;},M=(_0x3edce6,_0x5a1c40)=>(_0x46f74a,_0x892a5d)=>_0x5a1c40(_0x46f74a,_0x892a5d,_0x3edce6);let f=class extends _0x1663e6{constructor(_0x110fd5,_0x51bcf8){const _0x238d49=_0x2482b5;super(),this[_0x238d49(0x24c)]=_0x110fd5,this[_0x238d49(0x1fe)]=_0x51bcf8,this[_0x238d49(0x213)]();}[_0x2482b5(0x213)](){const _0x27311d=_0x2482b5;this[_0x27311d(0x24c)][_0x27311d(0x252)]=this[_0x27311d(0x1fe)],this[_0x27311d(0x24c)][_0x27311d(0x201)]=!0x1;}};f=te([M(0x0,_0x555c27),M(0x1,_0x1289ff(S))],f);var se=Object[_0x2482b5(0x20c)],oe=Object[_0x2482b5(0x234)],ne=(_0x48c421,_0x1e0d2c,_0x484901)=>_0x1e0d2c in _0x48c421?se(_0x48c421,_0x1e0d2c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x484901}):_0x48c421[_0x1e0d2c]=_0x484901,ie=(_0x2627ee,_0x591dff,_0x2b577f,_0xa0fc13)=>{const _0x3b7da2=_0x2482b5;for(var _0x1fd065=_0xa0fc13>0x1?void 0x0:_0xa0fc13?oe(_0x591dff,_0x2b577f):_0x591dff,_0x24a656=_0x2627ee[_0x3b7da2(0x228)]-0x1,_0xb2f445;_0x24a656>=0x0;_0x24a656--)(_0xb2f445=_0x2627ee[_0x24a656])&&(_0x1fd065=_0xb2f445(_0x1fd065)||_0x1fd065);return _0x1fd065;},N=(_0x45a63c,_0x10070b)=>(_0x5dd389,_0x81c684)=>_0x10070b(_0x5dd389,_0x81c684,_0x45a63c),$=(_0x867e6c,_0x5cf70e,_0x440c9f)=>ne(_0x867e6c,typeof _0x5cf70e!=_0x2482b5(0x220)?_0x5cf70e+'':_0x5cf70e,_0x440c9f);let g=class extends _0x1215a8{constructor(_0xca22b9=O,_0x506ba6,_0x37c07c){const _0x3a2bd2=_0x2482b5;super(),this[_0x3a2bd2(0x212)]=_0xca22b9,this[_0x3a2bd2(0x20f)]=_0x506ba6,this[_0x3a2bd2(0x232)]=_0x37c07c;const {..._0x259999}=_0x4f79b5({},O,this['_config']);this['_configService'][_0x3a2bd2(0x209)](z,_0x259999);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x1f323f=>{const _0x1fe196=_0x36f5;this[_0x1fe196(0x20f)][_0x1fe196(0x246)](_0x1f323f);});}[_0x2482b5(0x1fa)](){const _0x3eed37=_0x2482b5;this[_0x3eed37(0x20f)]['get'](f),this[_0x3eed37(0x20f)][_0x3eed37(0x245)](_);}};$(g,'pluginName',W),$(g,_0x2482b5(0x253),_0x5abae1[_0x2482b5(0x238)]),g=ie([_0x15259c(_0x43a799,_0x1aa4b3,_0x26258d),N(0x1,_0x1289ff(_0x378ce5)),N(0x2,_0xa1e2a6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b9507=_0x1f6c;(function(_0x5c2039,_0x38c0fa){const _0x270d1e=_0x1f6c,_0x51013e=_0x5c2039();while(!![]){try{const _0xd46ac6=-parseInt(_0x270d1e(0xc0))/0x1+parseInt(_0x270d1e(0x91))/0x2+parseInt(_0x270d1e(0x95))/0x3+-parseInt(_0x270d1e(0x81))/0x4+-parseInt(_0x270d1e(0x67))/0x5*(parseInt(_0x270d1e(0xb3))/0x6)+parseInt(_0x270d1e(0x68))/0x7+parseInt(_0x270d1e(0xbf))/0x8*(-parseInt(_0x270d1e(0xb6))/0x9);if(_0xd46ac6===_0x38c0fa)break;else _0x51013e['push'](_0x51013e['shift']());}catch(_0x4eb261){_0x51013e['push'](_0x51013e['shift']());}}}(_0x561a,0x18e99));import{CommentService as _0x563bfa,CollaborationSessionService as _0x4d34d4,UniverCollaborationClientPlugin as _0x3b6b1e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x325064}from'@univerjs-pro/license';function _0x561a(){const _0x35f6e5=['Solved','282pOtRSe','_userService','replyId','36OjYJLS','getMemberID','rangeId','type','size','threadId','forEach','_threadCommentDataSourceService','filter','25544HcDAwB','191596tKKVna','slice','symbol','personId','/universer-api/user/list','users','Solve','_injector','Edit','UNRECOGNIZED','/add','resolved','comments','userId','125kxdZAx','1288931YAAWfQ','getUnit','payload','_threadCommentModel','solved','error','format','/solved','_threadCommentDataSource','Reply','_config','getUser','replies','customRanges','map','disposeWithMe','rangeType','pluginName','unitId','Delete','post','syncUpdateMutationToColla','_configService','add','getOwnPropertyDescriptor','648620JUYZaC','addUser','listComments','length','commentUpdate$','/list','dataSource','root','resolveComment','addComment','comment','onStarting','Add','_sessionService','setConfig','body','391390szIBEI','stringify','deleteComment','user','269733BNpYYP','get','requireSession','_httpService','OpenOrReOpen','parentId','/universer-api/comment/unit/','_commentService','parse','_initDataSource','Unknown','subscribe','onReady','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','COMMENT','_init','/delete','createTimestamp','content','getCurrentUser','values','/edit','_initUserSync','find','updateComment','code','userID','thread-comment-data-source.config'];_0x561a=function(){return _0x35f6e5;};return _0x561a();}import{dayjs as _0x111026,UserManagerService as _0x26afc5,Inject as _0x39e633,Injector as _0x5c870b,Disposable as _0x3deba4,CustomRangeType as _0x49e252,UniverInstanceType as _0x35c98f,DependentOn as _0x240fde,IConfigService as _0x5a065c,Plugin as _0x3b2a37,merge as _0x18c6ba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa23dc7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1725db,IThreadCommentDataSourceService as _0x285a38}from'@univerjs/thread-comment';import{bufferTime as _0x3a697b}from'rxjs';import{HTTPService as _0x32a8f2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x331eb0=>(_0x331eb0[_0x331eb0[_0x3b9507(0x99)]=0x0]=_0x3b9507(0x99),_0x331eb0[_0x331eb0[_0x3b9507(0xb2)]=0x1]='Solved',_0x331eb0[_0x331eb0['UNRECOGNIZED']=-0x1]=_0x3b9507(0xc9),_0x331eb0))(I||{}),v=(_0x56fb9e=>(_0x56fb9e[_0x56fb9e[_0x3b9507(0x9f)]=0x0]=_0x3b9507(0x9f),_0x56fb9e[_0x56fb9e[_0x3b9507(0x8d)]=0x1]=_0x3b9507(0x8d),_0x56fb9e[_0x56fb9e[_0x3b9507(0x71)]=0x2]='Reply',_0x56fb9e[_0x56fb9e[_0x3b9507(0xc8)]=0x3]=_0x3b9507(0xc8),_0x56fb9e[_0x56fb9e[_0x3b9507(0x7b)]=0x4]=_0x3b9507(0x7b),_0x56fb9e[_0x56fb9e[_0x3b9507(0xc6)]=0x5]=_0x3b9507(0xc6),_0x56fb9e[_0x56fb9e[_0x3b9507(0xc9)]=-0x1]=_0x3b9507(0xc9),_0x56fb9e))(v||{});const y=_0xa55468=>_0x111026(new Date(+_0xa55468))[_0x3b9507(0x6e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3a6393,_0x3b133e)=>{const _0x5dcb37=_0x3b9507,_0x6811d0=_0x3a6393['get'](_0x26afc5),_0x1eacec=_0x3a6393[_0x5dcb37(0x96)](_0x32a8f2);_0x3b133e['forEach'](_0x2b9d31=>{const _0x36f11a=_0x5dcb37;_0x6811d0[_0x36f11a(0x73)](_0x2b9d31)&&_0x3b133e['delete'](_0x2b9d31);}),_0x3b133e[_0x5dcb37(0xba)]&&(await _0x1eacec['get'](_0x5dcb37(0xc4),{'params':{'userIDs':[..._0x3b133e]}}))[_0x5dcb37(0x90)][_0x5dcb37(0xc5)][_0x5dcb37(0xbc)](_0xa04db7=>{_0xa04db7&&_0x6811d0['addUser'](_0xa04db7);});};var K=Object[_0x3b9507(0x80)],V=(_0x6fe78e,_0x882737,_0x299d08,_0x639bec)=>{const _0x3c15b0=_0x3b9507;for(var _0x47f795=_0x639bec>0x1?void 0x0:_0x639bec?K(_0x882737,_0x299d08):_0x882737,_0x56fcd6=_0x6fe78e[_0x3c15b0(0x84)]-0x1,_0x256294;_0x56fcd6>=0x0;_0x56fcd6--)(_0x256294=_0x6fe78e[_0x56fcd6])&&(_0x47f795=_0x256294(_0x47f795)||_0x47f795);return _0x47f795;},p=(_0x42c73c,_0x49cc6c)=>(_0x114bf5,_0x531732)=>_0x49cc6c(_0x114bf5,_0x531732,_0x42c73c);let _=class extends _0x3deba4{constructor(_0x1a7575,_0x29537e,_0x5afe5d,_0x22c1f1){const _0x1fd681=_0x3b9507;super(),this[_0x1fd681(0x9c)]=_0x1a7575,this[_0x1fd681(0x6b)]=_0x29537e,this['_userService']=_0x5afe5d,this[_0x1fd681(0xc7)]=_0x22c1f1,this[_0x1fd681(0xa5)](),this[_0x1fd681(0xac)]();}[_0x3b9507(0xac)](){const _0x592c41=_0x3b9507;this['disposeWithMe'](this['_threadCommentModel'][_0x592c41(0x85)]['pipe'](_0x3a697b(0x10))[_0x592c41(0xa0)](_0x10b9d8=>{const _0x380777=_0x592c41,_0x2cffb0=new Set();_0x10b9d8[_0x380777(0xbc)](_0x455384=>{const _0x48008b=_0x380777;switch(_0x455384['type']){case _0x48008b(0x7f):{const _0x52197e=_0x455384[_0x48008b(0x6a)][_0x48008b(0xc3)];_0x2cffb0['add'](_0x52197e);break;}}}),B(this[_0x380777(0xc7)],_0x2cffb0);}));}[_0x3b9507(0xa5)](){const _0x25edee=_0x3b9507;this[_0x25edee(0x77)](this[_0x25edee(0x9c)]['commentUpdate$'][_0x25edee(0xa0)](async _0x3efd46=>{const _0x2865fe=_0x25edee;var _0x5f2e42,_0x1ef541,_0x7fe7a6,_0x2aa0ed;const _0x4e8157=(_0x5f2e42=this['_threadCommentModel'][_0x2865fe(0x69)](_0x3efd46[_0x2865fe(0x7a)])[_0x2865fe(0xad)](_0x22f1ce=>_0x22f1ce[_0x2865fe(0xbb)]===_0x3efd46[_0x2865fe(0xbb)]))==null?void 0x0:_0x5f2e42[_0x2865fe(0x88)];if(!_0x4e8157)return;const {unitId:_0x205fec,subUnitId:_0xbc458b}=_0x4e8157;switch(_0x3efd46[_0x2865fe(0x94)]&&this[_0x2865fe(0xb4)][_0x2865fe(0x82)](_0x3efd46[_0x2865fe(0x94)]),_0x3efd46['type']){case v[_0x2865fe(0x8d)]:break;case v[_0x2865fe(0x71)]:{this[_0x2865fe(0x6b)][_0x2865fe(0x8a)](_0x205fec,_0xbc458b,{'unitId':_0x205fec,'subUnitId':_0xbc458b,'ref':'','id':_0x3efd46[_0x2865fe(0xb5)],'dT':y(+_0x3efd46[_0x2865fe(0xa7)]),'threadId':_0x3efd46[_0x2865fe(0xbb)],'personId':(_0x7fe7a6=(_0x1ef541=_0x3efd46[_0x2865fe(0x94)])==null?void 0x0:_0x1ef541[_0x2865fe(0xb0)])!=null?_0x7fe7a6:_0x3efd46[_0x2865fe(0x66)],'text':JSON[_0x2865fe(0x9d)](_0x3efd46[_0x2865fe(0xa8)]),'parentId':_0x4e8157['id']});break;}case v['Delete']:{const _0xc4817f=this[_0x2865fe(0x6b)]['getComment'](_0x205fec,_0xbc458b,_0x3efd46['replyId']);_0xc4817f&&_0xc4817f[_0x2865fe(0x9a)]&&this[_0x2865fe(0x6b)]['deleteComment'](_0x205fec,_0xbc458b,_0x3efd46['replyId']);break;}case v[_0x2865fe(0xc8)]:{this['_threadCommentModel'][_0x2865fe(0xae)](_0x205fec,_0xbc458b,{'commentId':_0x3efd46[_0x2865fe(0xb5)],'text':JSON[_0x2865fe(0x9d)](_0x3efd46[_0x2865fe(0xa8)])});break;}case v['Solve']:{const _0x429c36=(_0x2aa0ed=this['_threadCommentModel'][_0x2865fe(0x69)](_0x3efd46[_0x2865fe(0x7a)])[_0x2865fe(0xad)](_0x58794b=>_0x58794b['threadId']===_0x3efd46[_0x2865fe(0xbb)]))==null?void 0x0:_0x2aa0ed[_0x2865fe(0x88)];_0x429c36&&this[_0x2865fe(0x6b)][_0x2865fe(0x89)](_0x205fec,_0xbc458b,_0x429c36['id'],_0x3efd46[_0x2865fe(0x6c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x39e633(_0x563bfa)),p(0x1,_0x39e633(_0x1725db)),p(0x2,_0x39e633(_0x26afc5)),p(0x3,_0x39e633(_0x5c870b))],_);const z=_0x3b9507(0xb1),O={};var k=Object[_0x3b9507(0x80)],Q=(_0x32a5b5,_0x2d8bb7,_0x235546,_0x385d24)=>{const _0x37cefa=_0x3b9507;for(var _0x1c93eb=_0x385d24>0x1?void 0x0:_0x385d24?k(_0x2d8bb7,_0x235546):_0x2d8bb7,_0x24de02=_0x32a5b5[_0x37cefa(0x84)]-0x1,_0xf20559;_0x24de02>=0x0;_0x24de02--)(_0xf20559=_0x32a5b5[_0x24de02])&&(_0x1c93eb=_0xf20559(_0x1c93eb)||_0x1c93eb);return _0x1c93eb;},b=(_0x42bf87,_0x3f663c)=>(_0x567deb,_0x5c7225)=>_0x3f663c(_0x567deb,_0x5c7225,_0x42bf87);function X(_0x383e8d,_0x5e9f3e){const _0x588d97=_0x3b9507,_0x37cf11=_0x383e8d[_0x588d97(0x74)][0x0];return{..._0x5e9f3e,'id':_0x37cf11[_0x588d97(0xb5)],'resolved':_0x383e8d[_0x588d97(0x6c)]===0x1,'dT':y(_0x37cf11[_0x588d97(0xa7)]),'personId':_0x37cf11[_0x588d97(0x66)],'threadId':_0x37cf11[_0x588d97(0xbb)]};}function ee(_0x2a7714,_0x37e3e1,_0x554a38){const _0x298213=_0x3b9507;var _0x3ecacf,_0x4ef6a5;if(((_0x4ef6a5=(_0x3ecacf=_0x2a7714==null?void 0x0:_0x2a7714[_0x298213(0x74)])==null?void 0x0:_0x3ecacf[_0x298213(0x84)])!=null?_0x4ef6a5:0x0)>0x0){const _0xc4423=(_0x2d1d5e,_0x22303e)=>({'id':_0x2d1d5e['replyId'],'threadId':_0x2d1d5e[_0x298213(0xbb)],'dT':y(_0x2d1d5e[_0x298213(0xa7)]),'personId':_0x2d1d5e[_0x298213(0x66)],'resolved':_0x2a7714[_0x298213(0x6c)]===I[_0x298213(0xb2)],'unitId':_0x37e3e1,'subUnitId':_0x554a38,'text':JSON[_0x298213(0x9d)](_0x2d1d5e[_0x298213(0xa8)]),'parentId':_0x22303e}),_0x1f28d4=_0xc4423(_0x2a7714[_0x298213(0x74)][0x0]);return{..._0x1f28d4,'children':_0x2a7714[_0x298213(0x74)][_0x298213(0xc1)](0x1)[_0x298213(0x76)](_0x4fb217=>_0xc4423(_0x4fb217,_0x1f28d4['id']))};}return null;}let S=class{constructor(_0x1369e6,_0x472940,_0x445f15){const _0xddaf50=_0x3b9507;this[_0xddaf50(0x98)]=_0x1369e6,this[_0xddaf50(0xb4)]=_0x472940,this[_0xddaf50(0x8e)]=_0x445f15;}async['addComment'](_0x40f87f){const _0xe5c124=_0x3b9507;var _0x441e60,_0x335506;const {parentId:_0x208985,unitId:_0x2e23cc,text:_0x377588,threadId:_0x26ba61}=_0x40f87f,_0x17d930=(_0x335506=(_0x441e60=_0x377588['customRanges'])==null?void 0x0:_0x441e60[_0xe5c124(0xbe)](_0x1f7f9b=>_0x1f7f9b['rangeType']===_0x49e252[_0xe5c124(0xa4)])['map'](_0x474e49=>_0x474e49[_0xe5c124(0xb8)]))!=null?_0x335506:[],_0x447661=JSON['stringify'](_0x377588),_0x30916b=(await this[_0xe5c124(0x8e)]['requireSession'](_0x2e23cc))[_0xe5c124(0xb7)]();if(_0x208985){const _0x2e9240={'memberId':_0x30916b,'unitId':_0x2e23cc,'content':_0x447661,'mention':_0x17d930,'threadId':_0x26ba61},_0x3b0b4e=(await this[_0xe5c124(0x98)][_0xe5c124(0x7c)]('/universer-api/comment/unit/'+_0x2e23cc+'/reply',{'body':_0x2e9240}))[_0xe5c124(0x90)]['reply'];return{..._0x40f87f,'id':_0x3b0b4e[_0xe5c124(0xb5)],'dT':_0x111026(+_0x3b0b4e[_0xe5c124(0xa7)])['format'](_0xe5c124(0xa3)),'personId':_0x3b0b4e[_0xe5c124(0x66)]};}else{const _0x59f045={'memberId':_0x30916b,'unitId':_0x2e23cc,'content':_0x447661,'mention':_0x17d930},_0x50b8ac=await this[_0xe5c124(0x98)]['post']('/universer-api/comment/unit/'+_0x2e23cc+_0xe5c124(0xca),{'body':_0x59f045});return X(_0x50b8ac[_0xe5c124(0x90)][_0xe5c124(0x8b)],_0x40f87f);}}async[_0x3b9507(0xae)](_0x139414){const _0x4f7fd8=_0x3b9507;var _0x2204ee,_0x30fdbc;const {text:_0x39a4c5,unitId:_0x517f85}=_0x139414,_0x4faac6=(_0x30fdbc=(_0x2204ee=_0x39a4c5[_0x4f7fd8(0x75)])==null?void 0x0:_0x2204ee['filter'](_0x7c7670=>_0x7c7670[_0x4f7fd8(0x78)]===_0x49e252[_0x4f7fd8(0xa4)])[_0x4f7fd8(0x76)](_0xb16d2b=>_0xb16d2b[_0x4f7fd8(0xb8)]))!=null?_0x30fdbc:[],_0x3ca566=JSON[_0x4f7fd8(0x92)](_0x39a4c5),_0x2414d9=_0x139414[_0x4f7fd8(0xbb)],_0xa977b9=_0x139414['id'],_0x4cf76b={'memberId':(await this['_sessionService'][_0x4f7fd8(0x97)](_0x517f85))[_0x4f7fd8(0xb7)](),'unitId':_0x517f85,'threadId':_0x2414d9,'mention':_0x4faac6,'content':_0x3ca566,'replyId':_0xa977b9},_0x1e5d0a=await this[_0x4f7fd8(0x98)]['post']('/universer-api/comment/unit/'+_0x517f85+_0x4f7fd8(0xab),{'body':_0x4cf76b});return!_0x1e5d0a[_0x4f7fd8(0x90)]['error']||_0x1e5d0a[_0x4f7fd8(0x90)][_0x4f7fd8(0x6d)]['code']===0x1;}async[_0x3b9507(0x89)](_0x572e93){const _0x9e74b2=_0x3b9507,{unitId:_0x66585d}=_0x572e93,_0x1a4123=_0x572e93[_0x9e74b2(0xbb)],_0x5e8d49={'memberId':this[_0x9e74b2(0xb4)][_0x9e74b2(0xa9)]()[_0x9e74b2(0xb0)],'unitId':_0x66585d,'threadId':_0x1a4123,'solved':_0x572e93[_0x9e74b2(0xcb)]?I[_0x9e74b2(0xb2)]:I[_0x9e74b2(0x99)]},_0x3f1049=await this[_0x9e74b2(0x98)]['post']('/universer-api/comment/unit/'+_0x66585d+_0x9e74b2(0x6f),{'body':_0x5e8d49});return!_0x3f1049['body'][_0x9e74b2(0x6d)]||_0x3f1049['body'][_0x9e74b2(0x6d)][_0x9e74b2(0xaf)]===0x1;}async[_0x3b9507(0x93)](_0x592d57,_0x28b8c2,_0x48951d,_0x294225){const _0x4301b4=_0x3b9507,_0x2fe822={'memberId':(await this[_0x4301b4(0x8e)][_0x4301b4(0x97)](_0x592d57))[_0x4301b4(0xb7)](),'threadId':_0x48951d,'replyId':_0x294225,'unitId':_0x592d57},_0xf02996=await this[_0x4301b4(0x98)]['post'](_0x4301b4(0x9b)+_0x592d57+_0x4301b4(0xa6),{'body':_0x2fe822});return!_0xf02996[_0x4301b4(0x90)][_0x4301b4(0x6d)]||_0xf02996[_0x4301b4(0x90)][_0x4301b4(0x6d)]['code']===0x1;}async[_0x3b9507(0x83)](_0x3c062e,_0x42270b,_0x1cddd3){const _0x51a032=_0x3b9507,_0x3142e1={'unitId':_0x3c062e,'threadId':_0x1cddd3},_0x538f51=await this[_0x51a032(0x98)][_0x51a032(0x7c)](_0x51a032(0x9b)+_0x3c062e+_0x51a032(0x86),{'body':_0x3142e1}),_0x504aae=_0x1cddd3[_0x51a032(0x76)](_0x1f1720=>ee(_0x538f51[_0x51a032(0x90)][_0x51a032(0x65)][_0x1f1720],_0x3c062e,_0x42270b))[_0x51a032(0xbe)](Boolean);return Object[_0x51a032(0xaa)](_0x538f51[_0x51a032(0x90)]['users'])[_0x51a032(0xbc)](_0x5cb843=>{const _0x3c39e2=_0x51a032;this[_0x3c39e2(0xb4)]['addUser'](_0x5cb843);}),_0x504aae;}[_0x3b9507(0xa2)](_0x255395){return{'id':_0x255395['id'],'threadId':_0x255395['threadId'],'ref':_0x255395['ref']};}};S=Q([b(0x0,_0x39e633(_0x32a8f2)),b(0x1,_0x39e633(_0x26afc5)),b(0x2,_0x39e633(_0x4d34d4))],S);var re=Object[_0x3b9507(0x80)],te=(_0x795c5e,_0x110ad7,_0x4b57b6,_0x5c92b1)=>{for(var _0xb4acfb=_0x5c92b1>0x1?void 0x0:_0x5c92b1?re(_0x110ad7,_0x4b57b6):_0x110ad7,_0x4fc7cc=_0x795c5e['length']-0x1,_0x3a55b0;_0x4fc7cc>=0x0;_0x4fc7cc--)(_0x3a55b0=_0x795c5e[_0x4fc7cc])&&(_0xb4acfb=_0x3a55b0(_0xb4acfb)||_0xb4acfb);return _0xb4acfb;},M=(_0xf8b672,_0x58c573)=>(_0x26cdaf,_0x5ab8f5)=>_0x58c573(_0x26cdaf,_0x5ab8f5,_0xf8b672);function _0x1f6c(_0x3f9246,_0x5ea5ea){const _0x561a60=_0x561a();return _0x1f6c=function(_0x1f6c38,_0x522824){_0x1f6c38=_0x1f6c38-0x65;let _0x331ca6=_0x561a60[_0x1f6c38];return _0x331ca6;},_0x1f6c(_0x3f9246,_0x5ea5ea);}let f=class extends _0x3deba4{constructor(_0x495bd3,_0x451b43){const _0x156706=_0x3b9507;super(),this['_threadCommentDataSourceService']=_0x495bd3,this['_threadCommentDataSource']=_0x451b43,this[_0x156706(0x9e)]();}[_0x3b9507(0x9e)](){const _0x49bfe2=_0x3b9507;this['_threadCommentDataSourceService'][_0x49bfe2(0x87)]=this[_0x49bfe2(0x70)],this[_0x49bfe2(0xbd)][_0x49bfe2(0x7d)]=!0x1;}};f=te([M(0x0,_0x285a38),M(0x1,_0x39e633(S))],f);var se=Object['defineProperty'],oe=Object[_0x3b9507(0x80)],ne=(_0x561f41,_0x4585df,_0x2a6aef)=>_0x4585df in _0x561f41?se(_0x561f41,_0x4585df,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a6aef}):_0x561f41[_0x4585df]=_0x2a6aef,ie=(_0x12e4e9,_0x157659,_0x56288b,_0xd7a810)=>{const _0x373e00=_0x3b9507;for(var _0x3278d3=_0xd7a810>0x1?void 0x0:_0xd7a810?oe(_0x157659,_0x56288b):_0x157659,_0x3d023a=_0x12e4e9[_0x373e00(0x84)]-0x1,_0x2d2174;_0x3d023a>=0x0;_0x3d023a--)(_0x2d2174=_0x12e4e9[_0x3d023a])&&(_0x3278d3=_0x2d2174(_0x3278d3)||_0x3278d3);return _0x3278d3;},N=(_0x111589,_0x53b8f3)=>(_0x511747,_0x4c91f8)=>_0x53b8f3(_0x511747,_0x4c91f8,_0x111589),$=(_0x37fd24,_0x1db6a8,_0x48f805)=>ne(_0x37fd24,typeof _0x1db6a8!=_0x3b9507(0xc2)?_0x1db6a8+'':_0x1db6a8,_0x48f805);let g=class extends _0x3b2a37{constructor(_0x2ca629=O,_0xfdc284,_0x39cc30){const _0x40e2b8=_0x3b9507;super(),this['_config']=_0x2ca629,this[_0x40e2b8(0xc7)]=_0xfdc284,this[_0x40e2b8(0x7e)]=_0x39cc30;const {..._0x810812}=_0x18c6ba({},O,this[_0x40e2b8(0x72)]);this[_0x40e2b8(0x7e)][_0x40e2b8(0x8f)](z,_0x810812);}[_0x3b9507(0x8c)](){const _0x4ff94e=_0x3b9507;[[S],[f],[_]][_0x4ff94e(0xbc)](_0x5b53ca=>{const _0x239e08=_0x4ff94e;this['_injector'][_0x239e08(0x7f)](_0x5b53ca);});}[_0x3b9507(0xa1)](){const _0x5d91e5=_0x3b9507;this[_0x5d91e5(0xc7)]['get'](f),this['_injector']['get'](_);}};$(g,_0x3b9507(0x79),W),$(g,_0x3b9507(0xb9),_0x35c98f['UNIVER_UNKNOWN']),g=ie([_0x240fde(_0xa23dc7,_0x3b6b1e,_0x325064),N(0x1,_0x39e633(_0x5c870b)),N(0x2,_0x5a065c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2482b5=_0x36f5;(function(_0xf1335b,_0x1e66f9){const _0x3b88e6=_0x36f5,_0x1d9984=_0xf1335b();while(!![]){try{const _0x43c6fe=-parseInt(_0x3b88e6(0x225))/0x1+parseInt(_0x3b88e6(0x1fc))/0x2*(parseInt(_0x3b88e6(0x244))/0x3)+-parseInt(_0x3b88e6(0x21a))/0x4*(-parseInt(_0x3b88e6(0x23e))/0x5)+parseInt(_0x3b88e6(0x229))/0x6+parseInt(_0x3b88e6(0x1f9))/0x7+parseInt(_0x3b88e6(0x240))/0x8+-parseInt(_0x3b88e6(0x208))/0x9;if(_0x43c6fe===_0x1e66f9)break;else _0x1d9984['push'](_0x1d9984['shift']());}catch(_0x2ea407){_0x1d9984['push'](_0x1d9984['shift']());}}}(_0x30b3,0x891ac));function _0x30b3(){const _0x4fa12f=['Delete','UNRECOGNIZED','4776290WrAOWT','/list','8201728AKXjWL','getCurrentUser','/add','userID','15MXOVqQ','get','add','subscribe','threadId','Solved','OpenOrReOpen','Unknown','_threadCommentDataSourceService','_init','format','getUser','ref','rangeType','dataSource','type','saveCommentToSnapshot','unitId','parse','/solved','root','_commentService','addUser','content','_httpService','1070755FtPsgk','onReady','_sessionService','210396nxmMJr','deleteComment','_threadCommentDataSource','disposeWithMe','requireSession','syncUpdateMutationToColla','map','Reply','listComments','replies','forEach','createTimestamp','15225912GAfFzj','setConfig','Add','slice','defineProperty','Edit','replyId','_injector','filter','_initUserSync','_config','_initDataSource','stringify','comments','code','COMMENT','getComment','_threadCommentModel','4wNRoPK','getMemberID','personId','commentUpdate$','userId','/delete','symbol','/universer-api/comment/unit/','user','_userService','values','431867DAfKgI','size','/reply','length','154716OeLVTs','getUnit','customRanges','comment','Solve','/universer-api/user/list','solved','updateComment','error','_configService','find','getOwnPropertyDescriptor','users','body','resolveComment','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','addComment'];_0x30b3=function(){return _0x4fa12f;};return _0x30b3();}import{CommentService as _0x48a9f5,CollaborationSessionService as _0x385d7c,UniverCollaborationClientPlugin as _0x1aa4b3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26258d}from'@univerjs-pro/license';import{dayjs as _0x1fe5ef,UserManagerService as _0x3f1b78,Inject as _0x1289ff,Injector as _0x378ce5,Disposable as _0x1663e6,CustomRangeType as _0x261728,UniverInstanceType as _0x5abae1,DependentOn as _0x15259c,IConfigService as _0xa1e2a6,Plugin as _0x1215a8,merge as _0x4f79b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43a799}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49d49f,IThreadCommentDataSourceService as _0x555c27}from'@univerjs/thread-comment';import{bufferTime as _0x292fec}from'rxjs';function _0x36f5(_0x46d50a,_0xed5230){const _0x30b3c7=_0x30b3();return _0x36f5=function(_0x36f55e,_0x2b6a04){_0x36f55e=_0x36f55e-0x1f0;let _0x2887ba=_0x30b3c7[_0x36f55e];return _0x2887ba;},_0x36f5(_0x46d50a,_0xed5230);}import{HTTPService as _0x4193ea}from'@univerjs/network';const W=_0x2482b5(0x239);var I=(_0x3bb1e9=>(_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x24a)]=0x0]=_0x2482b5(0x24a),_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x249)]=0x1]='Solved',_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3bb1e9))(I||{}),v=(_0x3cb929=>(_0x3cb929[_0x3cb929['Unknown']=0x0]=_0x2482b5(0x24b),_0x3cb929[_0x3cb929['Add']=0x1]=_0x2482b5(0x20a),_0x3cb929[_0x3cb929['Reply']=0x2]=_0x2482b5(0x203),_0x3cb929[_0x3cb929['Edit']=0x3]=_0x2482b5(0x20d),_0x3cb929[_0x3cb929[_0x2482b5(0x23c)]=0x4]=_0x2482b5(0x23c),_0x3cb929[_0x3cb929[_0x2482b5(0x22d)]=0x5]=_0x2482b5(0x22d),_0x3cb929[_0x3cb929[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3cb929))(v||{});const y=_0x32c642=>_0x1fe5ef(new Date(+_0x32c642))[_0x2482b5(0x24e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x949c69,_0x2111f5)=>{const _0x22bfed=_0x2482b5,_0x51129b=_0x949c69[_0x22bfed(0x245)](_0x3f1b78),_0x2b40db=_0x949c69['get'](_0x4193ea);_0x2111f5[_0x22bfed(0x206)](_0x47794d=>{const _0x17e38b=_0x22bfed;_0x51129b[_0x17e38b(0x24f)](_0x47794d)&&_0x2111f5['delete'](_0x47794d);}),_0x2111f5[_0x22bfed(0x226)]&&(await _0x2b40db[_0x22bfed(0x245)](_0x22bfed(0x22e),{'params':{'userIDs':[..._0x2111f5]}}))[_0x22bfed(0x236)][_0x22bfed(0x235)]['forEach'](_0x5c565c=>{_0x5c565c&&_0x51129b['addUser'](_0x5c565c);});};var K=Object[_0x2482b5(0x234)],V=(_0x5ac750,_0xd338f0,_0x182ff9,_0x466841)=>{const _0x51e246=_0x2482b5;for(var _0x592327=_0x466841>0x1?void 0x0:_0x466841?K(_0xd338f0,_0x182ff9):_0xd338f0,_0x50dd29=_0x5ac750[_0x51e246(0x228)]-0x1,_0x25d153;_0x50dd29>=0x0;_0x50dd29--)(_0x25d153=_0x5ac750[_0x50dd29])&&(_0x592327=_0x25d153(_0x592327)||_0x592327);return _0x592327;},p=(_0x32fadb,_0x1de72e)=>(_0x2af5c7,_0x2798f6)=>_0x1de72e(_0x2af5c7,_0x2798f6,_0x32fadb);let _=class extends _0x1663e6{constructor(_0x40cd04,_0x3d6d90,_0x43e864,_0x16f732){const _0x260579=_0x2482b5;super(),this[_0x260579(0x1f5)]=_0x40cd04,this['_threadCommentModel']=_0x3d6d90,this[_0x260579(0x223)]=_0x43e864,this['_injector']=_0x16f732,this[_0x260579(0x24d)](),this[_0x260579(0x211)]();}[_0x2482b5(0x211)](){const _0x1d08f4=_0x2482b5;this['disposeWithMe'](this[_0x1d08f4(0x219)][_0x1d08f4(0x21d)]['pipe'](_0x292fec(0x10))[_0x1d08f4(0x247)](_0x597c20=>{const _0x4acf03=_0x1d08f4,_0xe03f25=new Set();_0x597c20[_0x4acf03(0x206)](_0xd568bd=>{const _0x5b6480=_0x4acf03;switch(_0xd568bd['type']){case'add':{const _0x162b3e=_0xd568bd['payload'][_0x5b6480(0x21c)];_0xe03f25[_0x5b6480(0x246)](_0x162b3e);break;}}}),B(this[_0x4acf03(0x20f)],_0xe03f25);}));}[_0x2482b5(0x24d)](){const _0x786df1=_0x2482b5;this[_0x786df1(0x1ff)](this[_0x786df1(0x1f5)][_0x786df1(0x21d)][_0x786df1(0x247)](async _0x43234c=>{const _0x369663=_0x786df1;var _0x10b72a,_0x1225b6,_0x1165f2,_0x3bed3d;const _0x33eea7=(_0x10b72a=this[_0x369663(0x219)]['getUnit'](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x5c2d53=>_0x5c2d53['threadId']===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x10b72a[_0x369663(0x1f4)];if(!_0x33eea7)return;const {unitId:_0x493a78,subUnitId:_0x5af512}=_0x33eea7;switch(_0x43234c['user']&&this['_userService'][_0x369663(0x1f6)](_0x43234c[_0x369663(0x222)]),_0x43234c[_0x369663(0x253)]){case v[_0x369663(0x20a)]:break;case v[_0x369663(0x203)]:{this[_0x369663(0x219)]['addComment'](_0x493a78,_0x5af512,{'unitId':_0x493a78,'subUnitId':_0x5af512,'ref':'','id':_0x43234c[_0x369663(0x20e)],'dT':y(+_0x43234c['createTimestamp']),'threadId':_0x43234c[_0x369663(0x248)],'personId':(_0x1165f2=(_0x1225b6=_0x43234c[_0x369663(0x222)])==null?void 0x0:_0x1225b6[_0x369663(0x243)])!=null?_0x1165f2:_0x43234c['userId'],'text':JSON[_0x369663(0x1f2)](_0x43234c[_0x369663(0x1f7)]),'parentId':_0x33eea7['id']});break;}case v[_0x369663(0x23c)]:{const _0x24db09=this[_0x369663(0x219)][_0x369663(0x218)](_0x493a78,_0x5af512,_0x43234c[_0x369663(0x20e)]);_0x24db09&&_0x24db09['parentId']&&this[_0x369663(0x219)]['deleteComment'](_0x493a78,_0x5af512,_0x43234c['replyId']);break;}case v['Edit']:{this[_0x369663(0x219)][_0x369663(0x230)](_0x493a78,_0x5af512,{'commentId':_0x43234c[_0x369663(0x20e)],'text':JSON[_0x369663(0x1f2)](_0x43234c['content'])});break;}case v[_0x369663(0x22d)]:{const _0x489c03=(_0x3bed3d=this[_0x369663(0x219)][_0x369663(0x22a)](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x9c06ca=>_0x9c06ca[_0x369663(0x248)]===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x3bed3d[_0x369663(0x1f4)];_0x489c03&&this[_0x369663(0x219)][_0x369663(0x237)](_0x493a78,_0x5af512,_0x489c03['id'],_0x43234c[_0x369663(0x22f)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1289ff(_0x48a9f5)),p(0x1,_0x1289ff(_0x49d49f)),p(0x2,_0x1289ff(_0x3f1b78)),p(0x3,_0x1289ff(_0x378ce5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x2482b5(0x234)],Q=(_0xa7119c,_0x332659,_0x2815c1,_0x137673)=>{const _0x29e9a6=_0x2482b5;for(var _0x1fba62=_0x137673>0x1?void 0x0:_0x137673?k(_0x332659,_0x2815c1):_0x332659,_0x2f2138=_0xa7119c[_0x29e9a6(0x228)]-0x1,_0x53cb04;_0x2f2138>=0x0;_0x2f2138--)(_0x53cb04=_0xa7119c[_0x2f2138])&&(_0x1fba62=_0x53cb04(_0x1fba62)||_0x1fba62);return _0x1fba62;},b=(_0x185208,_0xbd1c9f)=>(_0x2328c8,_0x57fbd8)=>_0xbd1c9f(_0x2328c8,_0x57fbd8,_0x185208);function X(_0x3b7d98,_0x11b8b2){const _0x1ee499=_0x2482b5,_0x1f49b4=_0x3b7d98[_0x1ee499(0x205)][0x0];return{..._0x11b8b2,'id':_0x1f49b4[_0x1ee499(0x20e)],'resolved':_0x3b7d98[_0x1ee499(0x22f)]===0x1,'dT':y(_0x1f49b4[_0x1ee499(0x207)]),'personId':_0x1f49b4[_0x1ee499(0x21e)],'threadId':_0x1f49b4[_0x1ee499(0x248)]};}function ee(_0x5851ba,_0x8d91de,_0x57b405){const _0x33de5d=_0x2482b5;var _0x32bdfb,_0x5221af;if(((_0x5221af=(_0x32bdfb=_0x5851ba==null?void 0x0:_0x5851ba[_0x33de5d(0x205)])==null?void 0x0:_0x32bdfb[_0x33de5d(0x228)])!=null?_0x5221af:0x0)>0x0){const _0x30f85e=(_0x9a3d55,_0x209e05)=>({'id':_0x9a3d55[_0x33de5d(0x20e)],'threadId':_0x9a3d55[_0x33de5d(0x248)],'dT':y(_0x9a3d55[_0x33de5d(0x207)]),'personId':_0x9a3d55[_0x33de5d(0x21e)],'resolved':_0x5851ba[_0x33de5d(0x22f)]===I[_0x33de5d(0x249)],'unitId':_0x8d91de,'subUnitId':_0x57b405,'text':JSON[_0x33de5d(0x1f2)](_0x9a3d55[_0x33de5d(0x1f7)]),'parentId':_0x209e05}),_0x2e0a10=_0x30f85e(_0x5851ba['replies'][0x0]);return{..._0x2e0a10,'children':_0x5851ba['replies'][_0x33de5d(0x20b)](0x1)['map'](_0x4455e7=>_0x30f85e(_0x4455e7,_0x2e0a10['id']))};}return null;}let S=class{constructor(_0x296e7d,_0x5154a8,_0x172d19){const _0x34ac29=_0x2482b5;this['_httpService']=_0x296e7d,this[_0x34ac29(0x223)]=_0x5154a8,this[_0x34ac29(0x1fb)]=_0x172d19;}async[_0x2482b5(0x23b)](_0x421dab){const _0x247af1=_0x2482b5;var _0x660813,_0x5f107c;const {parentId:_0x5ad9d1,unitId:_0xeeb610,text:_0xc12cb7,threadId:_0x562bcd}=_0x421dab,_0x31995d=(_0x5f107c=(_0x660813=_0xc12cb7[_0x247af1(0x22b)])==null?void 0x0:_0x660813[_0x247af1(0x210)](_0x20ae9e=>_0x20ae9e[_0x247af1(0x251)]===_0x261728[_0x247af1(0x217)])['map'](_0x2a1201=>_0x2a1201['rangeId']))!=null?_0x5f107c:[],_0x4260b5=JSON[_0x247af1(0x214)](_0xc12cb7),_0x54e567=(await this[_0x247af1(0x1fb)][_0x247af1(0x200)](_0xeeb610))[_0x247af1(0x21b)]();if(_0x5ad9d1){const _0x17f1a2={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d,'threadId':_0x562bcd},_0x5fb4cd=(await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x227),{'body':_0x17f1a2}))['body']['reply'];return{..._0x421dab,'id':_0x5fb4cd[_0x247af1(0x20e)],'dT':_0x1fe5ef(+_0x5fb4cd[_0x247af1(0x207)])[_0x247af1(0x24e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5fb4cd[_0x247af1(0x21e)]};}else{const _0x42a2a8={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d},_0x13b663=await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x242),{'body':_0x42a2a8});return X(_0x13b663['body'][_0x247af1(0x22c)],_0x421dab);}}async['updateComment'](_0x31c808){const _0x53ffca=_0x2482b5;var _0x53a46d,_0x4a9e08;const {text:_0x217b9a,unitId:_0xec6bc5}=_0x31c808,_0x378b97=(_0x4a9e08=(_0x53a46d=_0x217b9a['customRanges'])==null?void 0x0:_0x53a46d['filter'](_0x392a59=>_0x392a59[_0x53ffca(0x251)]===_0x261728[_0x53ffca(0x217)])[_0x53ffca(0x202)](_0x7b95a8=>_0x7b95a8['rangeId']))!=null?_0x4a9e08:[],_0x3bb85b=JSON[_0x53ffca(0x214)](_0x217b9a),_0x1cd503=_0x31c808['threadId'],_0x3d6525=_0x31c808['id'],_0x495519={'memberId':(await this[_0x53ffca(0x1fb)][_0x53ffca(0x200)](_0xec6bc5))[_0x53ffca(0x21b)](),'unitId':_0xec6bc5,'threadId':_0x1cd503,'mention':_0x378b97,'content':_0x3bb85b,'replyId':_0x3d6525},_0x1c8f61=await this['_httpService'][_0x53ffca(0x23a)](_0x53ffca(0x221)+_0xec6bc5+'/edit',{'body':_0x495519});return!_0x1c8f61[_0x53ffca(0x236)]['error']||_0x1c8f61[_0x53ffca(0x236)][_0x53ffca(0x231)][_0x53ffca(0x216)]===0x1;}async[_0x2482b5(0x237)](_0x1d68fe){const _0x1d590f=_0x2482b5,{unitId:_0x5790af}=_0x1d68fe,_0x113752=_0x1d68fe[_0x1d590f(0x248)],_0x446d51={'memberId':this[_0x1d590f(0x223)][_0x1d590f(0x241)]()['userID'],'unitId':_0x5790af,'threadId':_0x113752,'solved':_0x1d68fe['resolved']?I[_0x1d590f(0x249)]:I['OpenOrReOpen']},_0x40ce4f=await this[_0x1d590f(0x1f8)]['post'](_0x1d590f(0x221)+_0x5790af+_0x1d590f(0x1f3),{'body':_0x446d51});return!_0x40ce4f[_0x1d590f(0x236)]['error']||_0x40ce4f[_0x1d590f(0x236)][_0x1d590f(0x231)][_0x1d590f(0x216)]===0x1;}async[_0x2482b5(0x1fd)](_0x2618dd,_0x33f536,_0x3b2d3a,_0x1152dc){const _0x3d1dd9=_0x2482b5,_0x2e0cf5={'memberId':(await this[_0x3d1dd9(0x1fb)]['requireSession'](_0x2618dd))[_0x3d1dd9(0x21b)](),'threadId':_0x3b2d3a,'replyId':_0x1152dc,'unitId':_0x2618dd},_0x5251c8=await this[_0x3d1dd9(0x1f8)]['post'](_0x3d1dd9(0x221)+_0x2618dd+_0x3d1dd9(0x21f),{'body':_0x2e0cf5});return!_0x5251c8[_0x3d1dd9(0x236)]['error']||_0x5251c8['body'][_0x3d1dd9(0x231)][_0x3d1dd9(0x216)]===0x1;}async[_0x2482b5(0x204)](_0x1781af,_0x37c90d,_0x47b7f2){const _0x1a247a=_0x2482b5,_0x5be237={'unitId':_0x1781af,'threadId':_0x47b7f2},_0x52acac=await this[_0x1a247a(0x1f8)][_0x1a247a(0x23a)](_0x1a247a(0x221)+_0x1781af+_0x1a247a(0x23f),{'body':_0x5be237}),_0x15e0d4=_0x47b7f2[_0x1a247a(0x202)](_0x53d206=>ee(_0x52acac[_0x1a247a(0x236)][_0x1a247a(0x215)][_0x53d206],_0x1781af,_0x37c90d))[_0x1a247a(0x210)](Boolean);return Object[_0x1a247a(0x224)](_0x52acac[_0x1a247a(0x236)]['users'])[_0x1a247a(0x206)](_0x3fa766=>{const _0x4a9bcf=_0x1a247a;this[_0x4a9bcf(0x223)][_0x4a9bcf(0x1f6)](_0x3fa766);}),_0x15e0d4;}[_0x2482b5(0x1f0)](_0x41145b){const _0x2a8400=_0x2482b5;return{'id':_0x41145b['id'],'threadId':_0x41145b['threadId'],'ref':_0x41145b[_0x2a8400(0x250)]};}};S=Q([b(0x0,_0x1289ff(_0x4193ea)),b(0x1,_0x1289ff(_0x3f1b78)),b(0x2,_0x1289ff(_0x385d7c))],S);var re=Object[_0x2482b5(0x234)],te=(_0x584608,_0x5b4ed9,_0x1f21ad,_0x403030)=>{const _0x42290c=_0x2482b5;for(var _0xa6baee=_0x403030>0x1?void 0x0:_0x403030?re(_0x5b4ed9,_0x1f21ad):_0x5b4ed9,_0x5adadf=_0x584608[_0x42290c(0x228)]-0x1,_0x13ac6b;_0x5adadf>=0x0;_0x5adadf--)(_0x13ac6b=_0x584608[_0x5adadf])&&(_0xa6baee=_0x13ac6b(_0xa6baee)||_0xa6baee);return _0xa6baee;},M=(_0x3edce6,_0x5a1c40)=>(_0x46f74a,_0x892a5d)=>_0x5a1c40(_0x46f74a,_0x892a5d,_0x3edce6);let f=class extends _0x1663e6{constructor(_0x110fd5,_0x51bcf8){const _0x238d49=_0x2482b5;super(),this[_0x238d49(0x24c)]=_0x110fd5,this[_0x238d49(0x1fe)]=_0x51bcf8,this[_0x238d49(0x213)]();}[_0x2482b5(0x213)](){const _0x27311d=_0x2482b5;this[_0x27311d(0x24c)][_0x27311d(0x252)]=this[_0x27311d(0x1fe)],this[_0x27311d(0x24c)][_0x27311d(0x201)]=!0x1;}};f=te([M(0x0,_0x555c27),M(0x1,_0x1289ff(S))],f);var se=Object[_0x2482b5(0x20c)],oe=Object[_0x2482b5(0x234)],ne=(_0x48c421,_0x1e0d2c,_0x484901)=>_0x1e0d2c in _0x48c421?se(_0x48c421,_0x1e0d2c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x484901}):_0x48c421[_0x1e0d2c]=_0x484901,ie=(_0x2627ee,_0x591dff,_0x2b577f,_0xa0fc13)=>{const _0x3b7da2=_0x2482b5;for(var _0x1fd065=_0xa0fc13>0x1?void 0x0:_0xa0fc13?oe(_0x591dff,_0x2b577f):_0x591dff,_0x24a656=_0x2627ee[_0x3b7da2(0x228)]-0x1,_0xb2f445;_0x24a656>=0x0;_0x24a656--)(_0xb2f445=_0x2627ee[_0x24a656])&&(_0x1fd065=_0xb2f445(_0x1fd065)||_0x1fd065);return _0x1fd065;},N=(_0x45a63c,_0x10070b)=>(_0x5dd389,_0x81c684)=>_0x10070b(_0x5dd389,_0x81c684,_0x45a63c),$=(_0x867e6c,_0x5cf70e,_0x440c9f)=>ne(_0x867e6c,typeof _0x5cf70e!=_0x2482b5(0x220)?_0x5cf70e+'':_0x5cf70e,_0x440c9f);let g=class extends _0x1215a8{constructor(_0xca22b9=O,_0x506ba6,_0x37c07c){const _0x3a2bd2=_0x2482b5;super(),this[_0x3a2bd2(0x212)]=_0xca22b9,this[_0x3a2bd2(0x20f)]=_0x506ba6,this[_0x3a2bd2(0x232)]=_0x37c07c;const {..._0x259999}=_0x4f79b5({},O,this['_config']);this['_configService'][_0x3a2bd2(0x209)](z,_0x259999);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x1f323f=>{const _0x1fe196=_0x36f5;this[_0x1fe196(0x20f)][_0x1fe196(0x246)](_0x1f323f);});}[_0x2482b5(0x1fa)](){const _0x3eed37=_0x2482b5;this[_0x3eed37(0x20f)]['get'](f),this[_0x3eed37(0x20f)][_0x3eed37(0x245)](_);}};$(g,'pluginName',W),$(g,_0x2482b5(0x253),_0x5abae1[_0x2482b5(0x238)]),g=ie([_0x15259c(_0x43a799,_0x1aa4b3,_0x26258d),N(0x1,_0x1289ff(_0x378ce5)),N(0x2,_0xa1e2a6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b9507=_0x1f6c;(function(_0x5c2039,_0x38c0fa){const _0x270d1e=_0x1f6c,_0x51013e=_0x5c2039();while(!![]){try{const _0xd46ac6=-parseInt(_0x270d1e(0xc0))/0x1+parseInt(_0x270d1e(0x91))/0x2+parseInt(_0x270d1e(0x95))/0x3+-parseInt(_0x270d1e(0x81))/0x4+-parseInt(_0x270d1e(0x67))/0x5*(parseInt(_0x270d1e(0xb3))/0x6)+parseInt(_0x270d1e(0x68))/0x7+parseInt(_0x270d1e(0xbf))/0x8*(-parseInt(_0x270d1e(0xb6))/0x9);if(_0xd46ac6===_0x38c0fa)break;else _0x51013e['push'](_0x51013e['shift']());}catch(_0x4eb261){_0x51013e['push'](_0x51013e['shift']());}}}(_0x561a,0x18e99));import{CommentService as _0x563bfa,CollaborationSessionService as _0x4d34d4,UniverCollaborationClientPlugin as _0x3b6b1e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x325064}from'@univerjs-pro/license';function _0x561a(){const _0x35f6e5=['Solved','282pOtRSe','_userService','replyId','36OjYJLS','getMemberID','rangeId','type','size','threadId','forEach','_threadCommentDataSourceService','filter','25544HcDAwB','191596tKKVna','slice','symbol','personId','/universer-api/user/list','users','Solve','_injector','Edit','UNRECOGNIZED','/add','resolved','comments','userId','125kxdZAx','1288931YAAWfQ','getUnit','payload','_threadCommentModel','solved','error','format','/solved','_threadCommentDataSource','Reply','_config','getUser','replies','customRanges','map','disposeWithMe','rangeType','pluginName','unitId','Delete','post','syncUpdateMutationToColla','_configService','add','getOwnPropertyDescriptor','648620JUYZaC','addUser','listComments','length','commentUpdate$','/list','dataSource','root','resolveComment','addComment','comment','onStarting','Add','_sessionService','setConfig','body','391390szIBEI','stringify','deleteComment','user','269733BNpYYP','get','requireSession','_httpService','OpenOrReOpen','parentId','/universer-api/comment/unit/','_commentService','parse','_initDataSource','Unknown','subscribe','onReady','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','COMMENT','_init','/delete','createTimestamp','content','getCurrentUser','values','/edit','_initUserSync','find','updateComment','code','userID','thread-comment-data-source.config'];_0x561a=function(){return _0x35f6e5;};return _0x561a();}import{dayjs as _0x111026,UserManagerService as _0x26afc5,Inject as _0x39e633,Injector as _0x5c870b,Disposable as _0x3deba4,CustomRangeType as _0x49e252,UniverInstanceType as _0x35c98f,DependentOn as _0x240fde,IConfigService as _0x5a065c,Plugin as _0x3b2a37,merge as _0x18c6ba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa23dc7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1725db,IThreadCommentDataSourceService as _0x285a38}from'@univerjs/thread-comment';import{bufferTime as _0x3a697b}from'rxjs';import{HTTPService as _0x32a8f2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x331eb0=>(_0x331eb0[_0x331eb0[_0x3b9507(0x99)]=0x0]=_0x3b9507(0x99),_0x331eb0[_0x331eb0[_0x3b9507(0xb2)]=0x1]='Solved',_0x331eb0[_0x331eb0['UNRECOGNIZED']=-0x1]=_0x3b9507(0xc9),_0x331eb0))(I||{}),v=(_0x56fb9e=>(_0x56fb9e[_0x56fb9e[_0x3b9507(0x9f)]=0x0]=_0x3b9507(0x9f),_0x56fb9e[_0x56fb9e[_0x3b9507(0x8d)]=0x1]=_0x3b9507(0x8d),_0x56fb9e[_0x56fb9e[_0x3b9507(0x71)]=0x2]='Reply',_0x56fb9e[_0x56fb9e[_0x3b9507(0xc8)]=0x3]=_0x3b9507(0xc8),_0x56fb9e[_0x56fb9e[_0x3b9507(0x7b)]=0x4]=_0x3b9507(0x7b),_0x56fb9e[_0x56fb9e[_0x3b9507(0xc6)]=0x5]=_0x3b9507(0xc6),_0x56fb9e[_0x56fb9e[_0x3b9507(0xc9)]=-0x1]=_0x3b9507(0xc9),_0x56fb9e))(v||{});const y=_0xa55468=>_0x111026(new Date(+_0xa55468))[_0x3b9507(0x6e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3a6393,_0x3b133e)=>{const _0x5dcb37=_0x3b9507,_0x6811d0=_0x3a6393['get'](_0x26afc5),_0x1eacec=_0x3a6393[_0x5dcb37(0x96)](_0x32a8f2);_0x3b133e['forEach'](_0x2b9d31=>{const _0x36f11a=_0x5dcb37;_0x6811d0[_0x36f11a(0x73)](_0x2b9d31)&&_0x3b133e['delete'](_0x2b9d31);}),_0x3b133e[_0x5dcb37(0xba)]&&(await _0x1eacec['get'](_0x5dcb37(0xc4),{'params':{'userIDs':[..._0x3b133e]}}))[_0x5dcb37(0x90)][_0x5dcb37(0xc5)][_0x5dcb37(0xbc)](_0xa04db7=>{_0xa04db7&&_0x6811d0['addUser'](_0xa04db7);});};var K=Object[_0x3b9507(0x80)],V=(_0x6fe78e,_0x882737,_0x299d08,_0x639bec)=>{const _0x3c15b0=_0x3b9507;for(var _0x47f795=_0x639bec>0x1?void 0x0:_0x639bec?K(_0x882737,_0x299d08):_0x882737,_0x56fcd6=_0x6fe78e[_0x3c15b0(0x84)]-0x1,_0x256294;_0x56fcd6>=0x0;_0x56fcd6--)(_0x256294=_0x6fe78e[_0x56fcd6])&&(_0x47f795=_0x256294(_0x47f795)||_0x47f795);return _0x47f795;},p=(_0x42c73c,_0x49cc6c)=>(_0x114bf5,_0x531732)=>_0x49cc6c(_0x114bf5,_0x531732,_0x42c73c);let _=class extends _0x3deba4{constructor(_0x1a7575,_0x29537e,_0x5afe5d,_0x22c1f1){const _0x1fd681=_0x3b9507;super(),this[_0x1fd681(0x9c)]=_0x1a7575,this[_0x1fd681(0x6b)]=_0x29537e,this['_userService']=_0x5afe5d,this[_0x1fd681(0xc7)]=_0x22c1f1,this[_0x1fd681(0xa5)](),this[_0x1fd681(0xac)]();}[_0x3b9507(0xac)](){const _0x592c41=_0x3b9507;this['disposeWithMe'](this['_threadCommentModel'][_0x592c41(0x85)]['pipe'](_0x3a697b(0x10))[_0x592c41(0xa0)](_0x10b9d8=>{const _0x380777=_0x592c41,_0x2cffb0=new Set();_0x10b9d8[_0x380777(0xbc)](_0x455384=>{const _0x48008b=_0x380777;switch(_0x455384['type']){case _0x48008b(0x7f):{const _0x52197e=_0x455384[_0x48008b(0x6a)][_0x48008b(0xc3)];_0x2cffb0['add'](_0x52197e);break;}}}),B(this[_0x380777(0xc7)],_0x2cffb0);}));}[_0x3b9507(0xa5)](){const _0x25edee=_0x3b9507;this[_0x25edee(0x77)](this[_0x25edee(0x9c)]['commentUpdate$'][_0x25edee(0xa0)](async _0x3efd46=>{const _0x2865fe=_0x25edee;var _0x5f2e42,_0x1ef541,_0x7fe7a6,_0x2aa0ed;const _0x4e8157=(_0x5f2e42=this['_threadCommentModel'][_0x2865fe(0x69)](_0x3efd46[_0x2865fe(0x7a)])[_0x2865fe(0xad)](_0x22f1ce=>_0x22f1ce[_0x2865fe(0xbb)]===_0x3efd46[_0x2865fe(0xbb)]))==null?void 0x0:_0x5f2e42[_0x2865fe(0x88)];if(!_0x4e8157)return;const {unitId:_0x205fec,subUnitId:_0xbc458b}=_0x4e8157;switch(_0x3efd46[_0x2865fe(0x94)]&&this[_0x2865fe(0xb4)][_0x2865fe(0x82)](_0x3efd46[_0x2865fe(0x94)]),_0x3efd46['type']){case v[_0x2865fe(0x8d)]:break;case v[_0x2865fe(0x71)]:{this[_0x2865fe(0x6b)][_0x2865fe(0x8a)](_0x205fec,_0xbc458b,{'unitId':_0x205fec,'subUnitId':_0xbc458b,'ref':'','id':_0x3efd46[_0x2865fe(0xb5)],'dT':y(+_0x3efd46[_0x2865fe(0xa7)]),'threadId':_0x3efd46[_0x2865fe(0xbb)],'personId':(_0x7fe7a6=(_0x1ef541=_0x3efd46[_0x2865fe(0x94)])==null?void 0x0:_0x1ef541[_0x2865fe(0xb0)])!=null?_0x7fe7a6:_0x3efd46[_0x2865fe(0x66)],'text':JSON[_0x2865fe(0x9d)](_0x3efd46[_0x2865fe(0xa8)]),'parentId':_0x4e8157['id']});break;}case v['Delete']:{const _0xc4817f=this[_0x2865fe(0x6b)]['getComment'](_0x205fec,_0xbc458b,_0x3efd46['replyId']);_0xc4817f&&_0xc4817f[_0x2865fe(0x9a)]&&this[_0x2865fe(0x6b)]['deleteComment'](_0x205fec,_0xbc458b,_0x3efd46['replyId']);break;}case v[_0x2865fe(0xc8)]:{this['_threadCommentModel'][_0x2865fe(0xae)](_0x205fec,_0xbc458b,{'commentId':_0x3efd46[_0x2865fe(0xb5)],'text':JSON[_0x2865fe(0x9d)](_0x3efd46[_0x2865fe(0xa8)])});break;}case v['Solve']:{const _0x429c36=(_0x2aa0ed=this['_threadCommentModel'][_0x2865fe(0x69)](_0x3efd46[_0x2865fe(0x7a)])[_0x2865fe(0xad)](_0x58794b=>_0x58794b['threadId']===_0x3efd46[_0x2865fe(0xbb)]))==null?void 0x0:_0x2aa0ed[_0x2865fe(0x88)];_0x429c36&&this[_0x2865fe(0x6b)][_0x2865fe(0x89)](_0x205fec,_0xbc458b,_0x429c36['id'],_0x3efd46[_0x2865fe(0x6c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x39e633(_0x563bfa)),p(0x1,_0x39e633(_0x1725db)),p(0x2,_0x39e633(_0x26afc5)),p(0x3,_0x39e633(_0x5c870b))],_);const z=_0x3b9507(0xb1),O={};var k=Object[_0x3b9507(0x80)],Q=(_0x32a5b5,_0x2d8bb7,_0x235546,_0x385d24)=>{const _0x37cefa=_0x3b9507;for(var _0x1c93eb=_0x385d24>0x1?void 0x0:_0x385d24?k(_0x2d8bb7,_0x235546):_0x2d8bb7,_0x24de02=_0x32a5b5[_0x37cefa(0x84)]-0x1,_0xf20559;_0x24de02>=0x0;_0x24de02--)(_0xf20559=_0x32a5b5[_0x24de02])&&(_0x1c93eb=_0xf20559(_0x1c93eb)||_0x1c93eb);return _0x1c93eb;},b=(_0x42bf87,_0x3f663c)=>(_0x567deb,_0x5c7225)=>_0x3f663c(_0x567deb,_0x5c7225,_0x42bf87);function X(_0x383e8d,_0x5e9f3e){const _0x588d97=_0x3b9507,_0x37cf11=_0x383e8d[_0x588d97(0x74)][0x0];return{..._0x5e9f3e,'id':_0x37cf11[_0x588d97(0xb5)],'resolved':_0x383e8d[_0x588d97(0x6c)]===0x1,'dT':y(_0x37cf11[_0x588d97(0xa7)]),'personId':_0x37cf11[_0x588d97(0x66)],'threadId':_0x37cf11[_0x588d97(0xbb)]};}function ee(_0x2a7714,_0x37e3e1,_0x554a38){const _0x298213=_0x3b9507;var _0x3ecacf,_0x4ef6a5;if(((_0x4ef6a5=(_0x3ecacf=_0x2a7714==null?void 0x0:_0x2a7714[_0x298213(0x74)])==null?void 0x0:_0x3ecacf[_0x298213(0x84)])!=null?_0x4ef6a5:0x0)>0x0){const _0xc4423=(_0x2d1d5e,_0x22303e)=>({'id':_0x2d1d5e['replyId'],'threadId':_0x2d1d5e[_0x298213(0xbb)],'dT':y(_0x2d1d5e[_0x298213(0xa7)]),'personId':_0x2d1d5e[_0x298213(0x66)],'resolved':_0x2a7714[_0x298213(0x6c)]===I[_0x298213(0xb2)],'unitId':_0x37e3e1,'subUnitId':_0x554a38,'text':JSON[_0x298213(0x9d)](_0x2d1d5e[_0x298213(0xa8)]),'parentId':_0x22303e}),_0x1f28d4=_0xc4423(_0x2a7714[_0x298213(0x74)][0x0]);return{..._0x1f28d4,'children':_0x2a7714[_0x298213(0x74)][_0x298213(0xc1)](0x1)[_0x298213(0x76)](_0x4fb217=>_0xc4423(_0x4fb217,_0x1f28d4['id']))};}return null;}let S=class{constructor(_0x1369e6,_0x472940,_0x445f15){const _0xddaf50=_0x3b9507;this[_0xddaf50(0x98)]=_0x1369e6,this[_0xddaf50(0xb4)]=_0x472940,this[_0xddaf50(0x8e)]=_0x445f15;}async['addComment'](_0x40f87f){const _0xe5c124=_0x3b9507;var _0x441e60,_0x335506;const {parentId:_0x208985,unitId:_0x2e23cc,text:_0x377588,threadId:_0x26ba61}=_0x40f87f,_0x17d930=(_0x335506=(_0x441e60=_0x377588['customRanges'])==null?void 0x0:_0x441e60[_0xe5c124(0xbe)](_0x1f7f9b=>_0x1f7f9b['rangeType']===_0x49e252[_0xe5c124(0xa4)])['map'](_0x474e49=>_0x474e49[_0xe5c124(0xb8)]))!=null?_0x335506:[],_0x447661=JSON['stringify'](_0x377588),_0x30916b=(await this[_0xe5c124(0x8e)]['requireSession'](_0x2e23cc))[_0xe5c124(0xb7)]();if(_0x208985){const _0x2e9240={'memberId':_0x30916b,'unitId':_0x2e23cc,'content':_0x447661,'mention':_0x17d930,'threadId':_0x26ba61},_0x3b0b4e=(await this[_0xe5c124(0x98)][_0xe5c124(0x7c)]('/universer-api/comment/unit/'+_0x2e23cc+'/reply',{'body':_0x2e9240}))[_0xe5c124(0x90)]['reply'];return{..._0x40f87f,'id':_0x3b0b4e[_0xe5c124(0xb5)],'dT':_0x111026(+_0x3b0b4e[_0xe5c124(0xa7)])['format'](_0xe5c124(0xa3)),'personId':_0x3b0b4e[_0xe5c124(0x66)]};}else{const _0x59f045={'memberId':_0x30916b,'unitId':_0x2e23cc,'content':_0x447661,'mention':_0x17d930},_0x50b8ac=await this[_0xe5c124(0x98)]['post']('/universer-api/comment/unit/'+_0x2e23cc+_0xe5c124(0xca),{'body':_0x59f045});return X(_0x50b8ac[_0xe5c124(0x90)][_0xe5c124(0x8b)],_0x40f87f);}}async[_0x3b9507(0xae)](_0x139414){const _0x4f7fd8=_0x3b9507;var _0x2204ee,_0x30fdbc;const {text:_0x39a4c5,unitId:_0x517f85}=_0x139414,_0x4faac6=(_0x30fdbc=(_0x2204ee=_0x39a4c5[_0x4f7fd8(0x75)])==null?void 0x0:_0x2204ee['filter'](_0x7c7670=>_0x7c7670[_0x4f7fd8(0x78)]===_0x49e252[_0x4f7fd8(0xa4)])[_0x4f7fd8(0x76)](_0xb16d2b=>_0xb16d2b[_0x4f7fd8(0xb8)]))!=null?_0x30fdbc:[],_0x3ca566=JSON[_0x4f7fd8(0x92)](_0x39a4c5),_0x2414d9=_0x139414[_0x4f7fd8(0xbb)],_0xa977b9=_0x139414['id'],_0x4cf76b={'memberId':(await this['_sessionService'][_0x4f7fd8(0x97)](_0x517f85))[_0x4f7fd8(0xb7)](),'unitId':_0x517f85,'threadId':_0x2414d9,'mention':_0x4faac6,'content':_0x3ca566,'replyId':_0xa977b9},_0x1e5d0a=await this[_0x4f7fd8(0x98)]['post']('/universer-api/comment/unit/'+_0x517f85+_0x4f7fd8(0xab),{'body':_0x4cf76b});return!_0x1e5d0a[_0x4f7fd8(0x90)]['error']||_0x1e5d0a[_0x4f7fd8(0x90)][_0x4f7fd8(0x6d)]['code']===0x1;}async[_0x3b9507(0x89)](_0x572e93){const _0x9e74b2=_0x3b9507,{unitId:_0x66585d}=_0x572e93,_0x1a4123=_0x572e93[_0x9e74b2(0xbb)],_0x5e8d49={'memberId':this[_0x9e74b2(0xb4)][_0x9e74b2(0xa9)]()[_0x9e74b2(0xb0)],'unitId':_0x66585d,'threadId':_0x1a4123,'solved':_0x572e93[_0x9e74b2(0xcb)]?I[_0x9e74b2(0xb2)]:I[_0x9e74b2(0x99)]},_0x3f1049=await this[_0x9e74b2(0x98)]['post']('/universer-api/comment/unit/'+_0x66585d+_0x9e74b2(0x6f),{'body':_0x5e8d49});return!_0x3f1049['body'][_0x9e74b2(0x6d)]||_0x3f1049['body'][_0x9e74b2(0x6d)][_0x9e74b2(0xaf)]===0x1;}async[_0x3b9507(0x93)](_0x592d57,_0x28b8c2,_0x48951d,_0x294225){const _0x4301b4=_0x3b9507,_0x2fe822={'memberId':(await this[_0x4301b4(0x8e)][_0x4301b4(0x97)](_0x592d57))[_0x4301b4(0xb7)](),'threadId':_0x48951d,'replyId':_0x294225,'unitId':_0x592d57},_0xf02996=await this[_0x4301b4(0x98)]['post'](_0x4301b4(0x9b)+_0x592d57+_0x4301b4(0xa6),{'body':_0x2fe822});return!_0xf02996[_0x4301b4(0x90)][_0x4301b4(0x6d)]||_0xf02996[_0x4301b4(0x90)][_0x4301b4(0x6d)]['code']===0x1;}async[_0x3b9507(0x83)](_0x3c062e,_0x42270b,_0x1cddd3){const _0x51a032=_0x3b9507,_0x3142e1={'unitId':_0x3c062e,'threadId':_0x1cddd3},_0x538f51=await this[_0x51a032(0x98)][_0x51a032(0x7c)](_0x51a032(0x9b)+_0x3c062e+_0x51a032(0x86),{'body':_0x3142e1}),_0x504aae=_0x1cddd3[_0x51a032(0x76)](_0x1f1720=>ee(_0x538f51[_0x51a032(0x90)][_0x51a032(0x65)][_0x1f1720],_0x3c062e,_0x42270b))[_0x51a032(0xbe)](Boolean);return Object[_0x51a032(0xaa)](_0x538f51[_0x51a032(0x90)]['users'])[_0x51a032(0xbc)](_0x5cb843=>{const _0x3c39e2=_0x51a032;this[_0x3c39e2(0xb4)]['addUser'](_0x5cb843);}),_0x504aae;}[_0x3b9507(0xa2)](_0x255395){return{'id':_0x255395['id'],'threadId':_0x255395['threadId'],'ref':_0x255395['ref']};}};S=Q([b(0x0,_0x39e633(_0x32a8f2)),b(0x1,_0x39e633(_0x26afc5)),b(0x2,_0x39e633(_0x4d34d4))],S);var re=Object[_0x3b9507(0x80)],te=(_0x795c5e,_0x110ad7,_0x4b57b6,_0x5c92b1)=>{for(var _0xb4acfb=_0x5c92b1>0x1?void 0x0:_0x5c92b1?re(_0x110ad7,_0x4b57b6):_0x110ad7,_0x4fc7cc=_0x795c5e['length']-0x1,_0x3a55b0;_0x4fc7cc>=0x0;_0x4fc7cc--)(_0x3a55b0=_0x795c5e[_0x4fc7cc])&&(_0xb4acfb=_0x3a55b0(_0xb4acfb)||_0xb4acfb);return _0xb4acfb;},M=(_0xf8b672,_0x58c573)=>(_0x26cdaf,_0x5ab8f5)=>_0x58c573(_0x26cdaf,_0x5ab8f5,_0xf8b672);function _0x1f6c(_0x3f9246,_0x5ea5ea){const _0x561a60=_0x561a();return _0x1f6c=function(_0x1f6c38,_0x522824){_0x1f6c38=_0x1f6c38-0x65;let _0x331ca6=_0x561a60[_0x1f6c38];return _0x331ca6;},_0x1f6c(_0x3f9246,_0x5ea5ea);}let f=class extends _0x3deba4{constructor(_0x495bd3,_0x451b43){const _0x156706=_0x3b9507;super(),this['_threadCommentDataSourceService']=_0x495bd3,this['_threadCommentDataSource']=_0x451b43,this[_0x156706(0x9e)]();}[_0x3b9507(0x9e)](){const _0x49bfe2=_0x3b9507;this['_threadCommentDataSourceService'][_0x49bfe2(0x87)]=this[_0x49bfe2(0x70)],this[_0x49bfe2(0xbd)][_0x49bfe2(0x7d)]=!0x1;}};f=te([M(0x0,_0x285a38),M(0x1,_0x39e633(S))],f);var se=Object['defineProperty'],oe=Object[_0x3b9507(0x80)],ne=(_0x561f41,_0x4585df,_0x2a6aef)=>_0x4585df in _0x561f41?se(_0x561f41,_0x4585df,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a6aef}):_0x561f41[_0x4585df]=_0x2a6aef,ie=(_0x12e4e9,_0x157659,_0x56288b,_0xd7a810)=>{const _0x373e00=_0x3b9507;for(var _0x3278d3=_0xd7a810>0x1?void 0x0:_0xd7a810?oe(_0x157659,_0x56288b):_0x157659,_0x3d023a=_0x12e4e9[_0x373e00(0x84)]-0x1,_0x2d2174;_0x3d023a>=0x0;_0x3d023a--)(_0x2d2174=_0x12e4e9[_0x3d023a])&&(_0x3278d3=_0x2d2174(_0x3278d3)||_0x3278d3);return _0x3278d3;},N=(_0x111589,_0x53b8f3)=>(_0x511747,_0x4c91f8)=>_0x53b8f3(_0x511747,_0x4c91f8,_0x111589),$=(_0x37fd24,_0x1db6a8,_0x48f805)=>ne(_0x37fd24,typeof _0x1db6a8!=_0x3b9507(0xc2)?_0x1db6a8+'':_0x1db6a8,_0x48f805);let g=class extends _0x3b2a37{constructor(_0x2ca629=O,_0xfdc284,_0x39cc30){const _0x40e2b8=_0x3b9507;super(),this['_config']=_0x2ca629,this[_0x40e2b8(0xc7)]=_0xfdc284,this[_0x40e2b8(0x7e)]=_0x39cc30;const {..._0x810812}=_0x18c6ba({},O,this[_0x40e2b8(0x72)]);this[_0x40e2b8(0x7e)][_0x40e2b8(0x8f)](z,_0x810812);}[_0x3b9507(0x8c)](){const _0x4ff94e=_0x3b9507;[[S],[f],[_]][_0x4ff94e(0xbc)](_0x5b53ca=>{const _0x239e08=_0x4ff94e;this['_injector'][_0x239e08(0x7f)](_0x5b53ca);});}[_0x3b9507(0xa1)](){const _0x5d91e5=_0x3b9507;this[_0x5d91e5(0xc7)]['get'](f),this['_injector']['get'](_);}};$(g,_0x3b9507(0x79),W),$(g,_0x3b9507(0xb9),_0x35c98f['UNIVER_UNKNOWN']),g=ie([_0x240fde(_0xa23dc7,_0x3b6b1e,_0x325064),N(0x1,_0x39e633(_0x5c870b)),N(0x2,_0x5a065c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4bb6f3,_0x56517d){const _0x4f464c=_0x58a9,_0xc00b49=_0x4bb6f3();while(!![]){try{const _0x3eddc3=-parseInt(_0x4f464c(0xe7))/0x1*(parseInt(_0x4f464c(0x96))/0x2)+parseInt(_0x4f464c(0x94))/0x3+parseInt(_0x4f464c(0xa3))/0x4+parseInt(_0x4f464c(0xc0))/0x5+parseInt(_0x4f464c(0xb9))/0x6*(-parseInt(_0x4f464c(0xd2))/0x7)+-parseInt(_0x4f464c(0xeb))/0x8+-parseInt(_0x4f464c(0x108))/0x9*(parseInt(_0x4f464c(0x10d))/0xa);if(_0x3eddc3===_0x56517d)break;else _0xc00b49['push'](_0xc00b49['shift']());}catch(_0x49a6a4){_0xc00b49['push'](_0xc00b49['shift']());}}}(_0x2d01,0xe7372),function(_0x1e4f0c,_0x13f434){const _0x13e87d=_0x58a9;typeof exports==_0x13e87d(0xb1)&&typeof module<'u'?_0x13f434(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==_0x13e87d(0xca)&&define[_0x13e87d(0xc5)]?define([_0x13e87d(0x117),_0x13e87d(0xd4),_0x13e87d(0xb2),_0x13e87d(0xb8),_0x13e87d(0xbe),_0x13e87d(0x10b),_0x13e87d(0xf1),_0x13e87d(0xed)],_0x13f434):(_0x1e4f0c=typeof globalThis<'u'?globalThis:_0x1e4f0c||self,_0x13f434(_0x1e4f0c[_0x13e87d(0xd3)]={},_0x1e4f0c[_0x13e87d(0xaa)],_0x1e4f0c[_0x13e87d(0xba)],_0x1e4f0c[_0x13e87d(0xd5)],_0x1e4f0c['UniverThreadCommentUi'],_0x1e4f0c[_0x13e87d(0xd0)],_0x1e4f0c[_0x13e87d(0xf1)],_0x1e4f0c[_0x13e87d(0x8a)]));}(this,function(_0x2bc380,_0x53b012,_0x4c8cf5,_0x414820,_0x25e18d,_0x10ac41,_0x49ee10,_0x1d4abe){'use strict';const _0x566886=_0x58a9;const _0x2c7336=_0x566886(0xc9);var _0x1b7f69=(_0x1300f4=>(_0x1300f4[_0x1300f4['OpenOrReOpen']=0x0]=_0x566886(0xdf),_0x1300f4[_0x1300f4[_0x566886(0x116)]=0x1]=_0x566886(0x116),_0x1300f4[_0x1300f4[_0x566886(0xe6)]=-0x1]=_0x566886(0xe6),_0x1300f4))(_0x1b7f69||{}),_0x16fa13=(_0x50c303=>(_0x50c303[_0x50c303[_0x566886(0x9a)]=0x0]='Unknown',_0x50c303[_0x50c303['Add']=0x1]=_0x566886(0xde),_0x50c303[_0x50c303[_0x566886(0xec)]=0x2]=_0x566886(0xec),_0x50c303[_0x50c303[_0x566886(0xe1)]=0x3]=_0x566886(0xe1),_0x50c303[_0x50c303[_0x566886(0xd6)]=0x4]=_0x566886(0xd6),_0x50c303[_0x50c303[_0x566886(0xea)]=0x5]=_0x566886(0xea),_0x50c303[_0x50c303[_0x566886(0xe6)]=-0x1]=_0x566886(0xe6),_0x50c303))(_0x16fa13||{});const _0x15adae=_0x4e121c=>_0x414820[_0x566886(0xfc)](new Date(+_0x4e121c))[_0x566886(0x10f)]('YYYY/MM/DD\x20HH:mm'),_0x38aa63=async(_0x4574eb,_0x135a8d)=>{const _0x4c2b9b=_0x566886,_0x59a7b9=_0x4574eb[_0x4c2b9b(0x9d)](_0x414820[_0x4c2b9b(0xbb)]),_0xe699a3=_0x4574eb['get'](_0x1d4abe[_0x4c2b9b(0xa5)]);_0x135a8d[_0x4c2b9b(0x113)](_0x354baf=>{const _0x186147=_0x4c2b9b;_0x59a7b9[_0x186147(0x9b)](_0x354baf)&&_0x135a8d[_0x186147(0xfd)](_0x354baf);}),_0x135a8d[_0x4c2b9b(0x90)]&&(await _0xe699a3[_0x4c2b9b(0x9d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x135a8d]}}))[_0x4c2b9b(0xbd)][_0x4c2b9b(0x95)][_0x4c2b9b(0x113)](_0x3b3090=>{_0x3b3090&&_0x59a7b9['addUser'](_0x3b3090);});};var _0x3d790c=Object['getOwnPropertyDescriptor'],_0x39f729=(_0x4056b4,_0x6ce4c0,_0x2be89a,_0x354722)=>{const _0x37bc0b=_0x566886;for(var _0x1804a9=_0x354722>0x1?void 0x0:_0x354722?_0x3d790c(_0x6ce4c0,_0x2be89a):_0x6ce4c0,_0x249abc=_0x4056b4[_0x37bc0b(0x97)]-0x1,_0x5d7746;_0x249abc>=0x0;_0x249abc--)(_0x5d7746=_0x4056b4[_0x249abc])&&(_0x1804a9=_0x5d7746(_0x1804a9)||_0x1804a9);return _0x1804a9;},_0x2fd080=(_0x2e7d04,_0x1871e3)=>(_0x130eca,_0x43cc63)=>_0x1871e3(_0x130eca,_0x43cc63,_0x2e7d04);let _0x24dc3e=class extends _0x414820[_0x566886(0xd1)]{constructor(_0x25150d,_0x547ae3,_0x31a4dd,_0x12dd60){const _0x8ba5b5=_0x566886;super(),this[_0x8ba5b5(0xe0)]=_0x25150d,this[_0x8ba5b5(0x100)]=_0x547ae3,this[_0x8ba5b5(0x8b)]=_0x31a4dd,this[_0x8ba5b5(0x10c)]=_0x12dd60,this[_0x8ba5b5(0xb6)](),this[_0x8ba5b5(0xf3)]();}[_0x566886(0xf3)](){const _0x105bb7=_0x566886;this['disposeWithMe'](this[_0x105bb7(0x100)]['commentUpdate$']['pipe'](_0x49ee10[_0x105bb7(0xce)](0x10))[_0x105bb7(0xe9)](_0x9397f7=>{const _0xa1650b=_0x105bb7,_0x20b653=new Set();_0x9397f7[_0xa1650b(0x113)](_0x1c4e13=>{const _0x3636d4=_0xa1650b;switch(_0x1c4e13['type']){case'add':{const _0x49668=_0x1c4e13[_0x3636d4(0xd9)][_0x3636d4(0x92)];_0x20b653[_0x3636d4(0xbc)](_0x49668);break;}}}),_0x38aa63(this[_0xa1650b(0x10c)],_0x20b653);}));}[_0x566886(0xb6)](){const _0xe91912=_0x566886;this[_0xe91912(0xc1)](this[_0xe91912(0xe0)][_0xe91912(0xcf)][_0xe91912(0xe9)](async _0x3844ad=>{const _0x35568c=_0xe91912;var _0x1423c4,_0x42003d,_0x4adae1,_0x472626;const _0x37886a=(_0x1423c4=this[_0x35568c(0x100)][_0x35568c(0xa7)](_0x3844ad[_0x35568c(0xdc)])[_0x35568c(0x8e)](_0x1ea1c3=>_0x1ea1c3['threadId']===_0x3844ad[_0x35568c(0xa6)]))==null?void 0x0:_0x1423c4[_0x35568c(0xf8)];if(!_0x37886a)return;const {unitId:_0x17d5c1,subUnitId:_0x3d529c}=_0x37886a;switch(_0x3844ad[_0x35568c(0x8c)]&&this[_0x35568c(0x8b)]['addUser'](_0x3844ad[_0x35568c(0x8c)]),_0x3844ad['type']){case _0x16fa13['Add']:break;case _0x16fa13[_0x35568c(0xec)]:{this['_threadCommentModel'][_0x35568c(0xb0)](_0x17d5c1,_0x3d529c,{'unitId':_0x17d5c1,'subUnitId':_0x3d529c,'ref':'','id':_0x3844ad[_0x35568c(0xa8)],'dT':_0x15adae(+_0x3844ad[_0x35568c(0xc6)]),'threadId':_0x3844ad[_0x35568c(0xa6)],'personId':(_0x4adae1=(_0x42003d=_0x3844ad[_0x35568c(0x8c)])==null?void 0x0:_0x42003d[_0x35568c(0x109)])!=null?_0x4adae1:_0x3844ad[_0x35568c(0x111)],'text':JSON[_0x35568c(0xb4)](_0x3844ad[_0x35568c(0x10e)]),'parentId':_0x37886a['id']});break;}case _0x16fa13[_0x35568c(0xd6)]:{const _0x47f6d2=this[_0x35568c(0x100)][_0x35568c(0x9f)](_0x17d5c1,_0x3d529c,_0x3844ad[_0x35568c(0xa8)]);_0x47f6d2&&_0x47f6d2['parentId']&&this[_0x35568c(0x100)][_0x35568c(0xe3)](_0x17d5c1,_0x3d529c,_0x3844ad[_0x35568c(0xa8)]);break;}case _0x16fa13[_0x35568c(0xe1)]:{this[_0x35568c(0x100)]['updateComment'](_0x17d5c1,_0x3d529c,{'commentId':_0x3844ad[_0x35568c(0xa8)],'text':JSON['parse'](_0x3844ad[_0x35568c(0x10e)])});break;}case _0x16fa13[_0x35568c(0xea)]:{const _0x245fff=(_0x472626=this[_0x35568c(0x100)][_0x35568c(0xa7)](_0x3844ad['unitId'])[_0x35568c(0x8e)](_0x36f10b=>_0x36f10b[_0x35568c(0xa6)]===_0x3844ad[_0x35568c(0xa6)]))==null?void 0x0:_0x472626[_0x35568c(0xf8)];_0x245fff&&this['_threadCommentModel'][_0x35568c(0xe4)](_0x17d5c1,_0x3d529c,_0x245fff['id'],_0x3844ad[_0x35568c(0x106)]===_0x1b7f69[_0x35568c(0x116)]);break;}}}));}};_0x24dc3e=_0x39f729([_0x2fd080(0x0,_0x414820['Inject'](_0x53b012[_0x566886(0xf4)])),_0x2fd080(0x1,_0x414820[_0x566886(0xd8)](_0x10ac41['ThreadCommentModel'])),_0x2fd080(0x2,_0x414820[_0x566886(0xd8)](_0x414820['UserManagerService'])),_0x2fd080(0x3,_0x414820[_0x566886(0xd8)](_0x414820[_0x566886(0x89)]))],_0x24dc3e);const _0x2a6279=_0x566886(0x103),_0x117104={};var _0x11f49f=Object['getOwnPropertyDescriptor'],_0x5ead18=(_0x5839da,_0x41b626,_0x1bccbb,_0x476326)=>{const _0x4e3ddc=_0x566886;for(var _0x138a06=_0x476326>0x1?void 0x0:_0x476326?_0x11f49f(_0x41b626,_0x1bccbb):_0x41b626,_0x1f663e=_0x5839da[_0x4e3ddc(0x97)]-0x1,_0x5ee8e9;_0x1f663e>=0x0;_0x1f663e--)(_0x5ee8e9=_0x5839da[_0x1f663e])&&(_0x138a06=_0x5ee8e9(_0x138a06)||_0x138a06);return _0x138a06;},_0x25e81a=(_0x2d1df5,_0x43bcc8)=>(_0x4723b6,_0x4a6631)=>_0x43bcc8(_0x4723b6,_0x4a6631,_0x2d1df5);function _0x1b2dde(_0x3e8e07,_0x622ee6){const _0x31e5c6=_0x566886,_0x317a27=_0x3e8e07[_0x31e5c6(0xb7)][0x0];return{..._0x622ee6,'id':_0x317a27[_0x31e5c6(0xa8)],'resolved':_0x3e8e07[_0x31e5c6(0x106)]===0x1,'dT':_0x15adae(_0x317a27[_0x31e5c6(0xc6)]),'personId':_0x317a27[_0x31e5c6(0x111)],'threadId':_0x317a27[_0x31e5c6(0xa6)]};}function _0x1810b0(_0x683738,_0x5931d0,_0xb1f1b4){const _0x54b259=_0x566886;var _0x257e62,_0x6ebb6e;if(((_0x6ebb6e=(_0x257e62=_0x683738==null?void 0x0:_0x683738['replies'])==null?void 0x0:_0x257e62['length'])!=null?_0x6ebb6e:0x0)>0x0){const _0x4a393b=(_0x451ff6,_0x29d2e9)=>({'id':_0x451ff6['replyId'],'threadId':_0x451ff6[_0x54b259(0xa6)],'dT':_0x15adae(_0x451ff6[_0x54b259(0xc6)]),'personId':_0x451ff6[_0x54b259(0x111)],'resolved':_0x683738[_0x54b259(0x106)]===_0x1b7f69['Solved'],'unitId':_0x5931d0,'subUnitId':_0xb1f1b4,'text':JSON[_0x54b259(0xb4)](_0x451ff6[_0x54b259(0x10e)]),'parentId':_0x29d2e9}),_0x490f57=_0x4a393b(_0x683738[_0x54b259(0xb7)][0x0]);return{..._0x490f57,'children':_0x683738[_0x54b259(0xb7)][_0x54b259(0xa1)](0x1)['map'](_0x41ca94=>_0x4a393b(_0x41ca94,_0x490f57['id']))};}return null;}let _0x562ee2=class{constructor(_0x5eaf97,_0x164cb8,_0x36c211){const _0x2b9e4b=_0x566886;this[_0x2b9e4b(0xee)]=_0x5eaf97,this['_userService']=_0x164cb8,this[_0x2b9e4b(0x9c)]=_0x36c211;}async[_0x566886(0xb0)](_0x286846){const _0x50f5dc=_0x566886;var _0xfde29a,_0x1d9aa4;const {parentId:_0x4f4988,unitId:_0x5e4493,text:_0x4dea55,threadId:_0x4d65ec}=_0x286846,_0x1a56c9=(_0x1d9aa4=(_0xfde29a=_0x4dea55[_0x50f5dc(0xf5)])==null?void 0x0:_0xfde29a[_0x50f5dc(0xc8)](_0x4315fc=>_0x4315fc[_0x50f5dc(0xf6)]===_0x414820[_0x50f5dc(0xff)][_0x50f5dc(0xf7)])[_0x50f5dc(0x102)](_0x15134b=>_0x15134b[_0x50f5dc(0xcb)]))!=null?_0x1d9aa4:[],_0x54caef=JSON['stringify'](_0x4dea55),_0x59a99c=(await this[_0x50f5dc(0x9c)]['requireSession'](_0x5e4493))[_0x50f5dc(0x118)]();if(_0x4f4988){const _0x41fa8a={'memberId':_0x59a99c,'unitId':_0x5e4493,'content':_0x54caef,'mention':_0x1a56c9,'threadId':_0x4d65ec},_0xd36cab=(await this[_0x50f5dc(0xee)]['post'](_0x50f5dc(0xbf)+_0x5e4493+_0x50f5dc(0xc4),{'body':_0x41fa8a}))['body']['reply'];return{..._0x286846,'id':_0xd36cab['replyId'],'dT':_0x414820['dayjs'](+_0xd36cab[_0x50f5dc(0xc6)])[_0x50f5dc(0x10f)](_0x50f5dc(0xf9)),'personId':_0xd36cab[_0x50f5dc(0x111)]};}else{const _0xaa460c={'memberId':_0x59a99c,'unitId':_0x5e4493,'content':_0x54caef,'mention':_0x1a56c9},_0x2e25ac=await this[_0x50f5dc(0xee)][_0x50f5dc(0xcc)]('/universer-api/comment/unit/'+_0x5e4493+_0x50f5dc(0x115),{'body':_0xaa460c});return _0x1b2dde(_0x2e25ac['body'][_0x50f5dc(0x98)],_0x286846);}}async[_0x566886(0x107)](_0x66d491){const _0x4c4aee=_0x566886;var _0xaf11ef,_0x13ffa3;const {text:_0x438216,unitId:_0x2e6f26}=_0x66d491,_0x1871fa=(_0x13ffa3=(_0xaf11ef=_0x438216[_0x4c4aee(0xf5)])==null?void 0x0:_0xaf11ef[_0x4c4aee(0xc8)](_0x354ff8=>_0x354ff8[_0x4c4aee(0xf6)]===_0x414820[_0x4c4aee(0xff)][_0x4c4aee(0xf7)])[_0x4c4aee(0x102)](_0xe830ac=>_0xe830ac[_0x4c4aee(0xcb)]))!=null?_0x13ffa3:[],_0x7870dd=JSON[_0x4c4aee(0xe8)](_0x438216),_0x5cf523=_0x66d491[_0x4c4aee(0xa6)],_0x4f9391=_0x66d491['id'],_0x2f45b5={'memberId':(await this['_sessionService'][_0x4c4aee(0x99)](_0x2e6f26))[_0x4c4aee(0x118)](),'unitId':_0x2e6f26,'threadId':_0x5cf523,'mention':_0x1871fa,'content':_0x7870dd,'replyId':_0x4f9391},_0x2e2896=await this['_httpService'][_0x4c4aee(0xcc)](_0x4c4aee(0xbf)+_0x2e6f26+_0x4c4aee(0xab),{'body':_0x2f45b5});return!_0x2e2896[_0x4c4aee(0xbd)][_0x4c4aee(0x8d)]||_0x2e2896[_0x4c4aee(0xbd)][_0x4c4aee(0x8d)][_0x4c4aee(0x110)]===0x1;}async[_0x566886(0xe4)](_0x565539){const _0x5b2148=_0x566886,{unitId:_0x1e95af}=_0x565539,_0x319ee1=_0x565539[_0x5b2148(0xa6)],_0x20442c={'memberId':this[_0x5b2148(0x8b)][_0x5b2148(0xc3)]()['userID'],'unitId':_0x1e95af,'threadId':_0x319ee1,'solved':_0x565539[_0x5b2148(0xe2)]?_0x1b7f69['Solved']:_0x1b7f69[_0x5b2148(0xdf)]},_0x36a62f=await this['_httpService'][_0x5b2148(0xcc)](_0x5b2148(0xbf)+_0x1e95af+_0x5b2148(0xcd),{'body':_0x20442c});return!_0x36a62f[_0x5b2148(0xbd)][_0x5b2148(0x8d)]||_0x36a62f[_0x5b2148(0xbd)]['error'][_0x5b2148(0x110)]===0x1;}async['deleteComment'](_0x4893c1,_0x50255b,_0x3ab335,_0x1bfc47){const _0x3966cc=_0x566886,_0x5c798b={'memberId':(await this[_0x3966cc(0x9c)][_0x3966cc(0x99)](_0x4893c1))[_0x3966cc(0x118)](),'threadId':_0x3ab335,'replyId':_0x1bfc47,'unitId':_0x4893c1},_0x3b0377=await this[_0x3966cc(0xee)][_0x3966cc(0xcc)]('/universer-api/comment/unit/'+_0x4893c1+_0x3966cc(0xfb),{'body':_0x5c798b});return!_0x3b0377['body']['error']||_0x3b0377[_0x3966cc(0xbd)][_0x3966cc(0x8d)][_0x3966cc(0x110)]===0x1;}async[_0x566886(0xa9)](_0x223c04,_0x7753f,_0x481dda){const _0x41b97a=_0x566886,_0x2cafb8={'unitId':_0x223c04,'threadId':_0x481dda},_0x54bff7=await this[_0x41b97a(0xee)][_0x41b97a(0xcc)]('/universer-api/comment/unit/'+_0x223c04+_0x41b97a(0xf2),{'body':_0x2cafb8}),_0x168b6f=_0x481dda[_0x41b97a(0x102)](_0x4b433b=>_0x1810b0(_0x54bff7[_0x41b97a(0xbd)][_0x41b97a(0x104)][_0x4b433b],_0x223c04,_0x7753f))[_0x41b97a(0xc8)](Boolean);return Object[_0x41b97a(0xfe)](_0x54bff7[_0x41b97a(0xbd)][_0x41b97a(0x95)])[_0x41b97a(0x113)](_0x18786f=>{const _0x3a79b2=_0x41b97a;this[_0x3a79b2(0x8b)][_0x3a79b2(0xc2)](_0x18786f);}),_0x168b6f;}[_0x566886(0x112)](_0x58de2c){const _0x4a8057=_0x566886;return{'id':_0x58de2c['id'],'threadId':_0x58de2c[_0x4a8057(0xa6)],'ref':_0x58de2c[_0x4a8057(0xa4)]};}};_0x562ee2=_0x5ead18([_0x25e81a(0x0,_0x414820['Inject'](_0x1d4abe[_0x566886(0xa5)])),_0x25e81a(0x1,_0x414820[_0x566886(0xd8)](_0x414820[_0x566886(0xbb)])),_0x25e81a(0x2,_0x414820['Inject'](_0x53b012['CollaborationSessionService']))],_0x562ee2);var _0x51228f=Object[_0x566886(0xf0)],_0x4b2b0c=(_0x4552ef,_0x58ef64,_0x494a91,_0x16c152)=>{const _0x13d891=_0x566886;for(var _0x2c076a=_0x16c152>0x1?void 0x0:_0x16c152?_0x51228f(_0x58ef64,_0x494a91):_0x58ef64,_0x1f2c87=_0x4552ef[_0x13d891(0x97)]-0x1,_0x54cfdd;_0x1f2c87>=0x0;_0x1f2c87--)(_0x54cfdd=_0x4552ef[_0x1f2c87])&&(_0x2c076a=_0x54cfdd(_0x2c076a)||_0x2c076a);return _0x2c076a;},_0x127a96=(_0x145adf,_0x35845f)=>(_0xbfaca5,_0x4ba41f)=>_0x35845f(_0xbfaca5,_0x4ba41f,_0x145adf);let _0x5ad152=class extends _0x414820[_0x566886(0xd1)]{constructor(_0x353e4d,_0xd84170){const _0x16af18=_0x566886;super(),this['_threadCommentDataSourceService']=_0x353e4d,this[_0x16af18(0xdd)]=_0xd84170,this['_initDataSource']();}['_initDataSource'](){const _0x28019e=_0x566886;this[_0x28019e(0xd7)][_0x28019e(0xfa)]=this[_0x28019e(0xdd)],this[_0x28019e(0xd7)][_0x28019e(0x8f)]=!0x1;}};_0x5ad152=_0x4b2b0c([_0x127a96(0x0,_0x10ac41[_0x566886(0xda)]),_0x127a96(0x1,_0x414820[_0x566886(0xd8)](_0x562ee2))],_0x5ad152);var _0x2f4229=Object[_0x566886(0x91)],_0x25bc1d=Object['getOwnPropertyDescriptor'],_0x5b079a=(_0x551cba,_0x2d7a4e,_0x3664bc)=>_0x2d7a4e in _0x551cba?_0x2f4229(_0x551cba,_0x2d7a4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3664bc}):_0x551cba[_0x2d7a4e]=_0x3664bc,_0x3fcb36=(_0x4f6312,_0x4f2242,_0x57f670,_0x1c3760)=>{for(var _0x37f123=_0x1c3760>0x1?void 0x0:_0x1c3760?_0x25bc1d(_0x4f2242,_0x57f670):_0x4f2242,_0xc33027=_0x4f6312['length']-0x1,_0x57a939;_0xc33027>=0x0;_0xc33027--)(_0x57a939=_0x4f6312[_0xc33027])&&(_0x37f123=_0x57a939(_0x37f123)||_0x37f123);return _0x37f123;},_0x37ce43=(_0x55ba91,_0x5d8b80)=>(_0x1f5a67,_0x2720a3)=>_0x5d8b80(_0x1f5a67,_0x2720a3,_0x55ba91),_0x172062=(_0x18354d,_0x3d0d40,_0x1d73ef)=>_0x5b079a(_0x18354d,typeof _0x3d0d40!=_0x566886(0xad)?_0x3d0d40+'':_0x3d0d40,_0x1d73ef);_0x2bc380[_0x566886(0xa2)]=class extends _0x414820[_0x566886(0xac)]{constructor(_0xa7fee4=_0x117104,_0x5cd79b,_0x208784){const _0x1adae0=_0x566886;super(),this[_0x1adae0(0xae)]=_0xa7fee4,this[_0x1adae0(0x10c)]=_0x5cd79b,this['_configService']=_0x208784;const {..._0xf3fe6c}=_0x414820[_0x1adae0(0xe5)]({},_0x117104,this[_0x1adae0(0xae)]);this[_0x1adae0(0xc7)][_0x1adae0(0xef)](_0x2a6279,_0xf3fe6c);}[_0x566886(0x101)](){const _0x16a83a=_0x566886;[[_0x562ee2],[_0x5ad152],[_0x24dc3e]][_0x16a83a(0x113)](_0x1b0096=>{const _0x5e470b=_0x16a83a;this[_0x5e470b(0x10c)]['add'](_0x1b0096);});}[_0x566886(0x105)](){const _0x14a2b1=_0x566886;this[_0x14a2b1(0x10c)][_0x14a2b1(0x9d)](_0x5ad152),this[_0x14a2b1(0x10c)][_0x14a2b1(0x9d)](_0x24dc3e);}},_0x172062(_0x2bc380[_0x566886(0xa2)],_0x566886(0xb3),_0x2c7336),_0x172062(_0x2bc380[_0x566886(0xa2)],_0x566886(0xa0),_0x414820['UniverInstanceType'][_0x566886(0xdb)]),_0x2bc380[_0x566886(0xa2)]=_0x3fcb36([_0x414820[_0x566886(0x9e)](_0x25e18d[_0x566886(0x10a)],_0x53b012['UniverCollaborationClientPlugin'],_0x4c8cf5[_0x566886(0xaf)]),_0x37ce43(0x1,_0x414820[_0x566886(0xd8)](_0x414820['Injector'])),_0x37ce43(0x2,_0x414820[_0x566886(0xb5)])],_0x2bc380[_0x566886(0xa2)]),Object[_0x566886(0x91)](_0x2bc380,Symbol[_0x566886(0x93)],{'value':_0x566886(0x114)});}));function _0x58a9(_0x1c0fac,_0x432ecf){const _0x2d01c9=_0x2d01();return _0x58a9=function(_0x58a911,_0x56cc3d){_0x58a911=_0x58a911-0x89;let _0x437819=_0x2d01c9[_0x58a911];return _0x437819;},_0x58a9(_0x1c0fac,_0x432ecf);}function _0x2d01(){const _0x55f5b2=['UniverProCollaborationClient','/edit','Plugin','symbol','_config','UniverLicensePlugin','addComment','object','@univerjs-pro/license','pluginName','parse','IConfigService','_init','replies','@univerjs/core','150jjdQTE','UniverProLicense','UserManagerService','add','body','@univerjs/thread-comment-ui','/universer-api/comment/unit/','7464710QxfEDF','disposeWithMe','addUser','getCurrentUser','/reply','amd','createTimestamp','_configService','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','rangeId','post','/solved','bufferTime','commentUpdate$','UniverThreadComment','Disposable','281939VBYXuf','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','UniverCore','Delete','_threadCommentDataSourceService','Inject','payload','IThreadCommentDataSourceService','UNIVER_UNKNOWN','unitId','_threadCommentDataSource','Add','OpenOrReOpen','_commentService','Edit','resolved','deleteComment','resolveComment','merge','UNRECOGNIZED','1TEjvBD','stringify','subscribe','Solve','9220720UbvTFu','Reply','@univerjs/network','_httpService','setConfig','getOwnPropertyDescriptor','rxjs','/list','_initUserSync','CommentService','customRanges','rangeType','COMMENT','root','YYYY/MM/DD\x20HH:mm','dataSource','/delete','dayjs','delete','values','CustomRangeType','_threadCommentModel','onStarting','map','thread-comment-data-source.config','comments','onReady','solved','updateComment','4381839FXZLtb','userID','UniverThreadCommentUIPlugin','@univerjs/thread-comment','_injector','10HawkNO','content','format','code','userId','saveCommentToSnapshot','forEach','Module','/add','Solved','exports','getMemberID','Injector','UniverNetwork','_userService','user','error','find','syncUpdateMutationToColla','size','defineProperty','personId','toStringTag','5418195VGFSyD','users','300858BGaWZb','length','comment','requireSession','Unknown','getUser','_sessionService','get','DependentOn','getComment','type','slice','UniverThreadCommentDataSourcePlugin','1779464qGcgvH','ref','HTTPService','threadId','getUnit','replyId','listComments'];_0x2d01=function(){return _0x55f5b2;};return _0x2d01();}
|
|
1
|
+
function _0x1776(){const _0x2a6db3=['addComment','_config','_httpService','OpenOrReOpen','get','customRanges','getUnit','exports','userId','content','UniverThreadCommentDataSourcePlugin','unitId','forEach','@univerjs/thread-comment-ui','code','ref','values','130YGtBXj','3934696sknGmc','rangeType','_threadCommentDataSourceService','add','deleteComment','UserManagerService','length','CollaborationSessionService','onStarting','thread-comment-data-source.config','syncUpdateMutationToColla','filter','@univerjs/core','defineProperty','UniverThreadComment','onReady','UniverProCollaborationClient','saveCommentToSnapshot','20GEEpxU','personId','merge','/solved','commentUpdate$','_initDataSource','setConfig','bufferTime','3606ntdNlb','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','333Skhgpz','comment','pipe','_threadCommentDataSource','resolveComment','597900DCyKtG','@univerjs/thread-comment','_sessionService','updateComment','users','function','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','slice','resolved','replyId','IConfigService','payload','@univerjs-pro/collaboration-client','createTimestamp','post','Edit','subscribe','UniverNetwork','COMMENT','_commentService','find','/universer-api/comment/unit/','getComment','map','Solved','UniverProThreadCommentDatasource','CustomRangeType','@univerjs-pro/license','_configService','Injector','Unknown','addUser','disposeWithMe','reply','solved','error','342fRLudt','getUser','requireSession','listComments','replies','Inject','Plugin','UniverLicensePlugin','UniverCore','user','_injector','type','dayjs','threadId','/add','Disposable','rxjs','body','Module','format','_userService','UNIVER_UNKNOWN','UniverThreadCommentUIPlugin','Delete','1413742EHuHrc','symbol','_initUserSync','userID','UNRECOGNIZED','4253370IsyTYr','@univerjs/network','parse','Reply','getCurrentUser','ThreadCommentModel','rangeId','88557zymZPN','amd','delete','IThreadCommentDataSourceService','getOwnPropertyDescriptor','CommentService','object','dataSource','HTTPService','Solve','stringify','/edit','_init','Add','getMemberID','910980gbbCfV','parentId','_threadCommentModel'];_0x1776=function(){return _0x2a6db3;};return _0x1776();}function _0x2d7c(_0x19f5a1,_0xb853ca){const _0x177601=_0x1776();return _0x2d7c=function(_0x2d7ccc,_0x241f31){_0x2d7ccc=_0x2d7ccc-0xb6;let _0x33a42a=_0x177601[_0x2d7ccc];return _0x33a42a;},_0x2d7c(_0x19f5a1,_0xb853ca);}(function(_0x519867,_0x389672){const _0x56e091=_0x2d7c,_0x31ec35=_0x519867();while(!![]){try{const _0x2db612=parseInt(_0x56e091(0x13c))/0x1*(-parseInt(_0x56e091(0x139))/0x2)+parseInt(_0x56e091(0x141))/0x3*(-parseInt(_0x56e091(0x131))/0x4)+-parseInt(_0x56e091(0xf4))/0x5+parseInt(_0x56e091(0xd7))/0x6*(parseInt(_0x56e091(0xfb))/0x7)+parseInt(_0x56e091(0x11f))/0x8+parseInt(_0x56e091(0x10a))/0x9+parseInt(_0x56e091(0x11e))/0xa*(parseInt(_0x56e091(0xef))/0xb);if(_0x2db612===_0x389672)break;else _0x31ec35['push'](_0x31ec35['shift']());}catch(_0x107b82){_0x31ec35['push'](_0x31ec35['shift']());}}}(_0x1776,0x83321),function(_0x2185cb,_0x1ade5e){const _0x3d2ef2=_0x2d7c;typeof exports==_0x3d2ef2(0x101)&&typeof module<'u'?_0x1ade5e(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==_0x3d2ef2(0xb7)&&define[_0x3d2ef2(0xfc)]?define([_0x3d2ef2(0x114),_0x3d2ef2(0xbf),_0x3d2ef2(0xce),_0x3d2ef2(0x12b),_0x3d2ef2(0x11a),_0x3d2ef2(0x142),_0x3d2ef2(0xe7),_0x3d2ef2(0xf5)],_0x1ade5e):(_0x2185cb=typeof globalThis<'u'?globalThis:_0x2185cb||self,_0x1ade5e(_0x2185cb[_0x3d2ef2(0xcc)]={},_0x2185cb[_0x3d2ef2(0x12f)],_0x2185cb['UniverProLicense'],_0x2185cb[_0x3d2ef2(0xdf)],_0x2185cb['UniverThreadCommentUi'],_0x2185cb[_0x3d2ef2(0x12d)],_0x2185cb[_0x3d2ef2(0xe7)],_0x2185cb[_0x3d2ef2(0xc4)]));}(this,function(_0x29ecc1,_0x3f33f6,_0xcdd372,_0x4714ea,_0x3339da,_0x3ebd12,_0x4b4bdb,_0x3f77b0){'use strict';const _0x451fa6=_0x2d7c;const _0x162d0e=_0x451fa6(0x13a);var _0x4837dc=(_0x462875=>(_0x462875[_0x462875['OpenOrReOpen']=0x0]=_0x451fa6(0x110),_0x462875[_0x462875[_0x451fa6(0xcb)]=0x1]=_0x451fa6(0xcb),_0x462875[_0x462875[_0x451fa6(0xf3)]=-0x1]=_0x451fa6(0xf3),_0x462875))(_0x4837dc||{}),_0x47fb93=(_0xbd14b5=>(_0xbd14b5[_0xbd14b5[_0x451fa6(0xd1)]=0x0]=_0x451fa6(0xd1),_0xbd14b5[_0xbd14b5[_0x451fa6(0x108)]=0x1]=_0x451fa6(0x108),_0xbd14b5[_0xbd14b5[_0x451fa6(0xf7)]=0x2]=_0x451fa6(0xf7),_0xbd14b5[_0xbd14b5[_0x451fa6(0xc2)]=0x3]='Edit',_0xbd14b5[_0xbd14b5['Delete']=0x4]=_0x451fa6(0xee),_0xbd14b5[_0xbd14b5[_0x451fa6(0x104)]=0x5]='Solve',_0xbd14b5[_0xbd14b5[_0x451fa6(0xf3)]=-0x1]=_0x451fa6(0xf3),_0xbd14b5))(_0x47fb93||{});const _0x425c70=_0x54334b=>_0x4714ea['dayjs'](new Date(+_0x54334b))[_0x451fa6(0xea)](_0x451fa6(0xb8)),_0x1438ad=async(_0x5ba1da,_0x365a83)=>{const _0x58da61=_0x451fa6,_0x354cb0=_0x5ba1da[_0x58da61(0x111)](_0x4714ea['UserManagerService']),_0x45836a=_0x5ba1da[_0x58da61(0x111)](_0x3f77b0['HTTPService']);_0x365a83[_0x58da61(0x119)](_0x37af6a=>{const _0x3fd080=_0x58da61;_0x354cb0[_0x3fd080(0xd8)](_0x37af6a)&&_0x365a83[_0x3fd080(0xfd)](_0x37af6a);}),_0x365a83['size']&&(await _0x45836a[_0x58da61(0x111)](_0x58da61(0xb9),{'params':{'userIDs':[..._0x365a83]}}))[_0x58da61(0xe8)][_0x58da61(0xb6)][_0x58da61(0x119)](_0x534607=>{const _0x55120f=_0x58da61;_0x534607&&_0x354cb0[_0x55120f(0xd2)](_0x534607);});};var _0x2725f2=Object['getOwnPropertyDescriptor'],_0x4c0642=(_0x47ed55,_0x3b01be,_0x4c69d4,_0x3becef)=>{for(var _0x44be45=_0x3becef>0x1?void 0x0:_0x3becef?_0x2725f2(_0x3b01be,_0x4c69d4):_0x3b01be,_0x23d245=_0x47ed55['length']-0x1,_0x288c6f;_0x23d245>=0x0;_0x23d245--)(_0x288c6f=_0x47ed55[_0x23d245])&&(_0x44be45=_0x288c6f(_0x44be45)||_0x44be45);return _0x44be45;},_0x2c8dc8=(_0x528b43,_0x3b0552)=>(_0x57b17e,_0x356777)=>_0x3b0552(_0x57b17e,_0x356777,_0x528b43);let _0x2c998d=class extends _0x4714ea[_0x451fa6(0xe6)]{constructor(_0x15fc28,_0x359cd1,_0x2a7fc8,_0x3c1911){const _0x501cbb=_0x451fa6;super(),this[_0x501cbb(0xc6)]=_0x15fc28,this[_0x501cbb(0x10c)]=_0x359cd1,this['_userService']=_0x2a7fc8,this[_0x501cbb(0xe1)]=_0x3c1911,this[_0x501cbb(0x107)](),this[_0x501cbb(0xf1)]();}['_initUserSync'](){const _0x574164=_0x451fa6;this[_0x574164(0xd3)](this[_0x574164(0x10c)][_0x574164(0x135)][_0x574164(0x13e)](_0x4b4bdb[_0x574164(0x138)](0x10))[_0x574164(0xc3)](_0xa8d2d0=>{const _0x430ec6=_0x574164,_0x5421f0=new Set();_0xa8d2d0[_0x430ec6(0x119)](_0x369ae5=>{const _0x5f2c47=_0x430ec6;switch(_0x369ae5[_0x5f2c47(0xe2)]){case _0x5f2c47(0x122):{const _0xc01628=_0x369ae5[_0x5f2c47(0xbe)][_0x5f2c47(0x132)];_0x5421f0['add'](_0xc01628);break;}}}),_0x1438ad(this[_0x430ec6(0xe1)],_0x5421f0);}));}['_init'](){const _0x475473=_0x451fa6;this['disposeWithMe'](this[_0x475473(0xc6)]['commentUpdate$'][_0x475473(0xc3)](async _0x5505da=>{const _0x2c949f=_0x475473;var _0x4f84b2,_0x2a163b,_0x19e5fd,_0x980ba9;const _0x4f4169=(_0x4f84b2=this[_0x2c949f(0x10c)][_0x2c949f(0x113)](_0x5505da[_0x2c949f(0x118)])[_0x2c949f(0xc7)](_0x1adad0=>_0x1adad0['threadId']===_0x5505da[_0x2c949f(0xe4)]))==null?void 0x0:_0x4f84b2['root'];if(!_0x4f4169)return;const {unitId:_0x4be820,subUnitId:_0xfd825d}=_0x4f4169;switch(_0x5505da[_0x2c949f(0xe0)]&&this['_userService'][_0x2c949f(0xd2)](_0x5505da['user']),_0x5505da[_0x2c949f(0xe2)]){case _0x47fb93[_0x2c949f(0x108)]:break;case _0x47fb93[_0x2c949f(0xf7)]:{this['_threadCommentModel']['addComment'](_0x4be820,_0xfd825d,{'unitId':_0x4be820,'subUnitId':_0xfd825d,'ref':'','id':_0x5505da[_0x2c949f(0xbc)],'dT':_0x425c70(+_0x5505da[_0x2c949f(0xc0)]),'threadId':_0x5505da[_0x2c949f(0xe4)],'personId':(_0x19e5fd=(_0x2a163b=_0x5505da[_0x2c949f(0xe0)])==null?void 0x0:_0x2a163b[_0x2c949f(0xf2)])!=null?_0x19e5fd:_0x5505da[_0x2c949f(0x115)],'text':JSON['parse'](_0x5505da[_0x2c949f(0x116)]),'parentId':_0x4f4169['id']});break;}case _0x47fb93[_0x2c949f(0xee)]:{const _0x255350=this['_threadCommentModel'][_0x2c949f(0xc9)](_0x4be820,_0xfd825d,_0x5505da[_0x2c949f(0xbc)]);_0x255350&&_0x255350[_0x2c949f(0x10b)]&&this['_threadCommentModel'][_0x2c949f(0x123)](_0x4be820,_0xfd825d,_0x5505da[_0x2c949f(0xbc)]);break;}case _0x47fb93[_0x2c949f(0xc2)]:{this['_threadCommentModel']['updateComment'](_0x4be820,_0xfd825d,{'commentId':_0x5505da[_0x2c949f(0xbc)],'text':JSON[_0x2c949f(0xf6)](_0x5505da[_0x2c949f(0x116)])});break;}case _0x47fb93[_0x2c949f(0x104)]:{const _0x1818b1=(_0x980ba9=this['_threadCommentModel'][_0x2c949f(0x113)](_0x5505da[_0x2c949f(0x118)])[_0x2c949f(0xc7)](_0x49e7d2=>_0x49e7d2[_0x2c949f(0xe4)]===_0x5505da[_0x2c949f(0xe4)]))==null?void 0x0:_0x980ba9['root'];_0x1818b1&&this[_0x2c949f(0x10c)][_0x2c949f(0x140)](_0x4be820,_0xfd825d,_0x1818b1['id'],_0x5505da['solved']===_0x4837dc[_0x2c949f(0xcb)]);break;}}}));}};_0x2c998d=_0x4c0642([_0x2c8dc8(0x0,_0x4714ea['Inject'](_0x3f33f6[_0x451fa6(0x100)])),_0x2c8dc8(0x1,_0x4714ea[_0x451fa6(0xdc)](_0x3ebd12[_0x451fa6(0xf9)])),_0x2c8dc8(0x2,_0x4714ea[_0x451fa6(0xdc)](_0x4714ea[_0x451fa6(0x124)])),_0x2c8dc8(0x3,_0x4714ea[_0x451fa6(0xdc)](_0x4714ea[_0x451fa6(0xd0)]))],_0x2c998d);const _0x27a57b=_0x451fa6(0x128),_0x3f7440={};var _0x6355d=Object[_0x451fa6(0xff)],_0x17c98b=(_0x20150f,_0x288de2,_0x191085,_0x5ba7ed)=>{const _0x40a64d=_0x451fa6;for(var _0xcde28a=_0x5ba7ed>0x1?void 0x0:_0x5ba7ed?_0x6355d(_0x288de2,_0x191085):_0x288de2,_0xd8a05=_0x20150f[_0x40a64d(0x125)]-0x1,_0x7b7c32;_0xd8a05>=0x0;_0xd8a05--)(_0x7b7c32=_0x20150f[_0xd8a05])&&(_0xcde28a=_0x7b7c32(_0xcde28a)||_0xcde28a);return _0xcde28a;},_0x462185=(_0x568735,_0x98395e)=>(_0x1adea2,_0x16b888)=>_0x98395e(_0x1adea2,_0x16b888,_0x568735);function _0x41ba44(_0x3fe80b,_0x25b3fe){const _0x140d85=_0x451fa6,_0x27d685=_0x3fe80b[_0x140d85(0xdb)][0x0];return{..._0x25b3fe,'id':_0x27d685[_0x140d85(0xbc)],'resolved':_0x3fe80b[_0x140d85(0xd5)]===0x1,'dT':_0x425c70(_0x27d685[_0x140d85(0xc0)]),'personId':_0x27d685[_0x140d85(0x115)],'threadId':_0x27d685[_0x140d85(0xe4)]};}function _0x1e1359(_0x332995,_0x50fde2,_0x2cbba5){const _0xda48f0=_0x451fa6;var _0x27b005,_0x3ed076;if(((_0x3ed076=(_0x27b005=_0x332995==null?void 0x0:_0x332995[_0xda48f0(0xdb)])==null?void 0x0:_0x27b005[_0xda48f0(0x125)])!=null?_0x3ed076:0x0)>0x0){const _0x33dc7c=(_0x32c30a,_0x284288)=>({'id':_0x32c30a[_0xda48f0(0xbc)],'threadId':_0x32c30a[_0xda48f0(0xe4)],'dT':_0x425c70(_0x32c30a[_0xda48f0(0xc0)]),'personId':_0x32c30a[_0xda48f0(0x115)],'resolved':_0x332995[_0xda48f0(0xd5)]===_0x4837dc[_0xda48f0(0xcb)],'unitId':_0x50fde2,'subUnitId':_0x2cbba5,'text':JSON[_0xda48f0(0xf6)](_0x32c30a[_0xda48f0(0x116)]),'parentId':_0x284288}),_0x13603d=_0x33dc7c(_0x332995['replies'][0x0]);return{..._0x13603d,'children':_0x332995['replies'][_0xda48f0(0xba)](0x1)[_0xda48f0(0xca)](_0xc45de6=>_0x33dc7c(_0xc45de6,_0x13603d['id']))};}return null;}let _0x535f85=class{constructor(_0x2bafdb,_0x5d7718,_0x4758ef){const _0x514ff7=_0x451fa6;this[_0x514ff7(0x10f)]=_0x2bafdb,this[_0x514ff7(0xeb)]=_0x5d7718,this[_0x514ff7(0x143)]=_0x4758ef;}async[_0x451fa6(0x10d)](_0x174bd1){const _0x2d7378=_0x451fa6;var _0x8c6c4a,_0xd58a61;const {parentId:_0x1683d0,unitId:_0x8cb91e,text:_0x371193,threadId:_0x20f124}=_0x174bd1,_0x132c9b=(_0xd58a61=(_0x8c6c4a=_0x371193[_0x2d7378(0x112)])==null?void 0x0:_0x8c6c4a[_0x2d7378(0x12a)](_0x3aa678=>_0x3aa678[_0x2d7378(0x120)]===_0x4714ea['CustomRangeType'][_0x2d7378(0xc5)])[_0x2d7378(0xca)](_0x2c5e2c=>_0x2c5e2c[_0x2d7378(0xfa)]))!=null?_0xd58a61:[],_0x3cf719=JSON['stringify'](_0x371193),_0x4da1fb=(await this['_sessionService'][_0x2d7378(0xd9)](_0x8cb91e))['getMemberID']();if(_0x1683d0){const _0x132f28={'memberId':_0x4da1fb,'unitId':_0x8cb91e,'content':_0x3cf719,'mention':_0x132c9b,'threadId':_0x20f124},_0x11bb63=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x8cb91e+'/reply',{'body':_0x132f28}))['body'][_0x2d7378(0xd4)];return{..._0x174bd1,'id':_0x11bb63[_0x2d7378(0xbc)],'dT':_0x4714ea[_0x2d7378(0xe3)](+_0x11bb63[_0x2d7378(0xc0)])[_0x2d7378(0xea)](_0x2d7378(0xb8)),'personId':_0x11bb63[_0x2d7378(0x115)]};}else{const _0x45ce03={'memberId':_0x4da1fb,'unitId':_0x8cb91e,'content':_0x3cf719,'mention':_0x132c9b},_0x5767ba=await this['_httpService'][_0x2d7378(0xc1)](_0x2d7378(0xc8)+_0x8cb91e+_0x2d7378(0xe5),{'body':_0x45ce03});return _0x41ba44(_0x5767ba[_0x2d7378(0xe8)][_0x2d7378(0x13d)],_0x174bd1);}}async[_0x451fa6(0x144)](_0x5f3fad){const _0x5ecc54=_0x451fa6;var _0x1ce11b,_0x34d6c7;const {text:_0x4bdb13,unitId:_0x85b65f}=_0x5f3fad,_0x12f3f4=(_0x34d6c7=(_0x1ce11b=_0x4bdb13[_0x5ecc54(0x112)])==null?void 0x0:_0x1ce11b['filter'](_0x5a69e9=>_0x5a69e9[_0x5ecc54(0x120)]===_0x4714ea[_0x5ecc54(0xcd)][_0x5ecc54(0xc5)])['map'](_0x12faed=>_0x12faed[_0x5ecc54(0xfa)]))!=null?_0x34d6c7:[],_0xd09d1=JSON[_0x5ecc54(0x105)](_0x4bdb13),_0x3ad464=_0x5f3fad[_0x5ecc54(0xe4)],_0x454bcc=_0x5f3fad['id'],_0x3d4773={'memberId':(await this['_sessionService']['requireSession'](_0x85b65f))[_0x5ecc54(0x109)](),'unitId':_0x85b65f,'threadId':_0x3ad464,'mention':_0x12f3f4,'content':_0xd09d1,'replyId':_0x454bcc},_0x2d2518=await this[_0x5ecc54(0x10f)][_0x5ecc54(0xc1)](_0x5ecc54(0xc8)+_0x85b65f+_0x5ecc54(0x106),{'body':_0x3d4773});return!_0x2d2518['body'][_0x5ecc54(0xd6)]||_0x2d2518[_0x5ecc54(0xe8)][_0x5ecc54(0xd6)]['code']===0x1;}async['resolveComment'](_0x4862d2){const _0x456bc7=_0x451fa6,{unitId:_0x38221e}=_0x4862d2,_0x504eb4=_0x4862d2['threadId'],_0x343f62={'memberId':this['_userService'][_0x456bc7(0xf8)]()[_0x456bc7(0xf2)],'unitId':_0x38221e,'threadId':_0x504eb4,'solved':_0x4862d2[_0x456bc7(0xbb)]?_0x4837dc[_0x456bc7(0xcb)]:_0x4837dc[_0x456bc7(0x110)]},_0x3b8c81=await this['_httpService']['post'](_0x456bc7(0xc8)+_0x38221e+_0x456bc7(0x134),{'body':_0x343f62});return!_0x3b8c81['body']['error']||_0x3b8c81['body'][_0x456bc7(0xd6)][_0x456bc7(0x11b)]===0x1;}async[_0x451fa6(0x123)](_0x54c3de,_0x4dc159,_0x69b636,_0x4b6bb9){const _0x4e22cc=_0x451fa6,_0x2e2f75={'memberId':(await this[_0x4e22cc(0x143)][_0x4e22cc(0xd9)](_0x54c3de))['getMemberID'](),'threadId':_0x69b636,'replyId':_0x4b6bb9,'unitId':_0x54c3de},_0x16af76=await this[_0x4e22cc(0x10f)][_0x4e22cc(0xc1)](_0x4e22cc(0xc8)+_0x54c3de+'/delete',{'body':_0x2e2f75});return!_0x16af76['body'][_0x4e22cc(0xd6)]||_0x16af76[_0x4e22cc(0xe8)][_0x4e22cc(0xd6)][_0x4e22cc(0x11b)]===0x1;}async[_0x451fa6(0xda)](_0x5a5a2c,_0x31246d,_0x19d0ca){const _0x4ac5e8=_0x451fa6,_0x5e3c61={'unitId':_0x5a5a2c,'threadId':_0x19d0ca},_0x5a6e17=await this[_0x4ac5e8(0x10f)][_0x4ac5e8(0xc1)](_0x4ac5e8(0xc8)+_0x5a5a2c+'/list',{'body':_0x5e3c61}),_0x2d8419=_0x19d0ca[_0x4ac5e8(0xca)](_0x4826ca=>_0x1e1359(_0x5a6e17[_0x4ac5e8(0xe8)]['comments'][_0x4826ca],_0x5a5a2c,_0x31246d))[_0x4ac5e8(0x12a)](Boolean);return Object[_0x4ac5e8(0x11d)](_0x5a6e17[_0x4ac5e8(0xe8)][_0x4ac5e8(0xb6)])[_0x4ac5e8(0x119)](_0xf61fa=>{const _0x5e9e33=_0x4ac5e8;this[_0x5e9e33(0xeb)][_0x5e9e33(0xd2)](_0xf61fa);}),_0x2d8419;}[_0x451fa6(0x130)](_0x319f28){const _0x478a22=_0x451fa6;return{'id':_0x319f28['id'],'threadId':_0x319f28['threadId'],'ref':_0x319f28[_0x478a22(0x11c)]};}};_0x535f85=_0x17c98b([_0x462185(0x0,_0x4714ea['Inject'](_0x3f77b0[_0x451fa6(0x103)])),_0x462185(0x1,_0x4714ea[_0x451fa6(0xdc)](_0x4714ea['UserManagerService'])),_0x462185(0x2,_0x4714ea['Inject'](_0x3f33f6[_0x451fa6(0x126)]))],_0x535f85);var _0x53f2c4=Object[_0x451fa6(0xff)],_0x458828=(_0x5bb65e,_0xbcd2a1,_0x4e8ce8,_0x55ac45)=>{const _0x39f441=_0x451fa6;for(var _0x2b1af9=_0x55ac45>0x1?void 0x0:_0x55ac45?_0x53f2c4(_0xbcd2a1,_0x4e8ce8):_0xbcd2a1,_0xdff188=_0x5bb65e[_0x39f441(0x125)]-0x1,_0x524f52;_0xdff188>=0x0;_0xdff188--)(_0x524f52=_0x5bb65e[_0xdff188])&&(_0x2b1af9=_0x524f52(_0x2b1af9)||_0x2b1af9);return _0x2b1af9;},_0x4d15bc=(_0x24476b,_0x4a8ef8)=>(_0x4f22c9,_0x570a90)=>_0x4a8ef8(_0x4f22c9,_0x570a90,_0x24476b);let _0x2d9bf2=class extends _0x4714ea[_0x451fa6(0xe6)]{constructor(_0x8ecf5,_0x30cc37){const _0x5609e8=_0x451fa6;super(),this['_threadCommentDataSourceService']=_0x8ecf5,this[_0x5609e8(0x13f)]=_0x30cc37,this['_initDataSource']();}[_0x451fa6(0x136)](){const _0x3bc3af=_0x451fa6;this[_0x3bc3af(0x121)][_0x3bc3af(0x102)]=this[_0x3bc3af(0x13f)],this[_0x3bc3af(0x121)][_0x3bc3af(0x129)]=!0x1;}};_0x2d9bf2=_0x458828([_0x4d15bc(0x0,_0x3ebd12[_0x451fa6(0xfe)]),_0x4d15bc(0x1,_0x4714ea['Inject'](_0x535f85))],_0x2d9bf2);var _0x1f9566=Object[_0x451fa6(0x12c)],_0x3eb442=Object[_0x451fa6(0xff)],_0x345e46=(_0x4d93af,_0x490300,_0x31b874)=>_0x490300 in _0x4d93af?_0x1f9566(_0x4d93af,_0x490300,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31b874}):_0x4d93af[_0x490300]=_0x31b874,_0xc05a78=(_0x45d05e,_0x16b178,_0x27597e,_0x1ad93d)=>{const _0x519f7c=_0x451fa6;for(var _0x1d073c=_0x1ad93d>0x1?void 0x0:_0x1ad93d?_0x3eb442(_0x16b178,_0x27597e):_0x16b178,_0x43fed5=_0x45d05e[_0x519f7c(0x125)]-0x1,_0x4bec3d;_0x43fed5>=0x0;_0x43fed5--)(_0x4bec3d=_0x45d05e[_0x43fed5])&&(_0x1d073c=_0x4bec3d(_0x1d073c)||_0x1d073c);return _0x1d073c;},_0x53c2a5=(_0xe99663,_0xa5b31f)=>(_0x2b266e,_0x3a681d)=>_0xa5b31f(_0x2b266e,_0x3a681d,_0xe99663),_0x8ad09b=(_0x687c7b,_0x368b6c,_0x113fb9)=>_0x345e46(_0x687c7b,typeof _0x368b6c!=_0x451fa6(0xf0)?_0x368b6c+'':_0x368b6c,_0x113fb9);_0x29ecc1['UniverThreadCommentDataSourcePlugin']=class extends _0x4714ea[_0x451fa6(0xdd)]{constructor(_0x219a5f=_0x3f7440,_0x2c8ba8,_0x33e1e1){const _0x514726=_0x451fa6;super(),this[_0x514726(0x10e)]=_0x219a5f,this['_injector']=_0x2c8ba8,this[_0x514726(0xcf)]=_0x33e1e1;const {..._0x3851f8}=_0x4714ea[_0x514726(0x133)]({},_0x3f7440,this[_0x514726(0x10e)]);this[_0x514726(0xcf)][_0x514726(0x137)](_0x27a57b,_0x3851f8);}[_0x451fa6(0x127)](){const _0x5f54fa=_0x451fa6;[[_0x535f85],[_0x2d9bf2],[_0x2c998d]][_0x5f54fa(0x119)](_0x4a234f=>{const _0x392d71=_0x5f54fa;this[_0x392d71(0xe1)][_0x392d71(0x122)](_0x4a234f);});}[_0x451fa6(0x12e)](){const _0x2a443b=_0x451fa6;this[_0x2a443b(0xe1)]['get'](_0x2d9bf2),this['_injector']['get'](_0x2c998d);}},_0x8ad09b(_0x29ecc1[_0x451fa6(0x117)],'pluginName',_0x162d0e),_0x8ad09b(_0x29ecc1[_0x451fa6(0x117)],_0x451fa6(0xe2),_0x4714ea['UniverInstanceType'][_0x451fa6(0xec)]),_0x29ecc1[_0x451fa6(0x117)]=_0xc05a78([_0x4714ea['DependentOn'](_0x3339da[_0x451fa6(0xed)],_0x3f33f6['UniverCollaborationClientPlugin'],_0xcdd372[_0x451fa6(0xde)]),_0x53c2a5(0x1,_0x4714ea[_0x451fa6(0xdc)](_0x4714ea['Injector'])),_0x53c2a5(0x2,_0x4714ea[_0x451fa6(0xbd)])],_0x29ecc1[_0x451fa6(0x117)]),Object[_0x451fa6(0x12c)](_0x29ecc1,Symbol[_0x451fa6(0x13b)],{'value':_0x451fa6(0xe9)});}));
|
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.1",
|
|
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/network": "0.10.0-nightly.202507310307",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.1",
|
|
49
|
+
"@univerjs/core": "0.10.1",
|
|
50
|
+
"@univerjs-pro/license": "0.10.1",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.
|
|
52
|
+
"@univerjs/network": "0.10.1",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.1",
|
|
54
|
+
"@univerjs/thread-comment": "0.10.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^7.0.6",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|