@univerjs-pro/thread-comment-datasource 0.5.5-nightly.202501211606 → 0.5.5
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/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x2919cf=_0x4b18;(function(_0x2c7144,_0x5ba30c){const _0x33264e=_0x4b18,_0x4d41fb=_0x2c7144();while(!![]){try{const _0x5c92bd=parseInt(_0x33264e(0x1b4))/0x1+-parseInt(_0x33264e(0x1ac))/0x2+parseInt(_0x33264e(0x1c8))/0x3+parseInt(_0x33264e(0x178))/0x4+parseInt(_0x33264e(0x1ae))/0x5+-parseInt(_0x33264e(0x199))/0x6+parseInt(_0x33264e(0x1e5))/0x7*(parseInt(_0x33264e(0x197))/0x8);if(_0x5c92bd===_0x5ba30c)break;else _0x4d41fb['push'](_0x4d41fb['shift']());}catch(_0x56b7b5){_0x4d41fb['push'](_0x4d41fb['shift']());}}}(_0x3159,0xbe9f9));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x2919cf(0x1b1)});function _0x4b18(_0x485ec9,_0x3766cc){const _0x3159ca=_0x3159();return _0x4b18=function(_0x4b1808,_0xf33197){_0x4b1808=_0x4b1808-0x16f;let _0x32ae0c=_0x3159ca[_0x4b1808];return _0x32ae0c;},_0x4b18(_0x485ec9,_0x3766cc);}const C=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x2919cf(0x1c6)),w=require(_0x2919cf(0x1e2)),P=require(_0x2919cf(0x173)),U=require(_0x2919cf(0x174)),M=require('@univerjs/network'),R=_0x2919cf(0x17c);var v=(_0x3062f8=>(_0x3062f8[_0x3062f8[_0x2919cf(0x186)]=0x0]=_0x2919cf(0x186),_0x3062f8[_0x3062f8[_0x2919cf(0x1bd)]=0x1]='Solved',_0x3062f8[_0x3062f8[_0x2919cf(0x194)]=-0x1]=_0x2919cf(0x194),_0x3062f8))(v||{}),I=(_0x5788ce=>(_0x5788ce[_0x5788ce[_0x2919cf(0x179)]=0x0]=_0x2919cf(0x179),_0x5788ce[_0x5788ce[_0x2919cf(0x177)]=0x1]='Add',_0x5788ce[_0x5788ce[_0x2919cf(0x1d8)]=0x2]=_0x2919cf(0x1d8),_0x5788ce[_0x5788ce['Edit']=0x3]='Edit',_0x5788ce[_0x5788ce[_0x2919cf(0x1bb)]=0x4]=_0x2919cf(0x1bb),_0x5788ce[_0x5788ce['Solve']=0x5]=_0x2919cf(0x1e3),_0x5788ce[_0x5788ce['UNRECOGNIZED']=-0x1]=_0x2919cf(0x194),_0x5788ce))(I||{});const g=_0xed9e48=>c[_0x2919cf(0x1b9)](new Date(+_0xed9e48))[_0x2919cf(0x176)](_0x2919cf(0x1da)),$=async(_0x2176ca,_0x561f84)=>{const _0x3b0cb9=_0x2919cf,_0x5d2f3b=_0x2176ca[_0x3b0cb9(0x183)](c[_0x3b0cb9(0x1d2)]),_0xb6e61a=_0x2176ca['get'](M[_0x3b0cb9(0x1d7)]);_0x561f84[_0x3b0cb9(0x198)](_0x268c2a=>{const _0x27f2ec=_0x3b0cb9;_0x5d2f3b[_0x27f2ec(0x1a9)](_0x268c2a)&&_0x561f84[_0x27f2ec(0x1a1)](_0x268c2a);}),_0x561f84[_0x3b0cb9(0x1cf)]&&(await _0xb6e61a[_0x3b0cb9(0x183)](_0x3b0cb9(0x1ad),{'params':{'userIDs':[..._0x561f84]}}))[_0x3b0cb9(0x175)][_0x3b0cb9(0x1df)][_0x3b0cb9(0x198)](_0x52df93=>{const _0x4a193d=_0x3b0cb9;_0x52df93&&_0x5d2f3b[_0x4a193d(0x184)](_0x52df93);});};var E=Object[_0x2919cf(0x1b3)],q=Object['getOwnPropertyDescriptor'],A=(_0x2a9ce3,_0x43ae4e,_0x31765e,_0x1255bf)=>{const _0x4d365a=_0x2919cf;for(var _0x44cac9=_0x1255bf>0x1?void 0x0:_0x1255bf?q(_0x43ae4e,_0x31765e):_0x43ae4e,_0x14ec4a=_0x2a9ce3[_0x4d365a(0x1c2)]-0x1,_0x5687b4;_0x14ec4a>=0x0;_0x14ec4a--)(_0x5687b4=_0x2a9ce3[_0x14ec4a])&&(_0x44cac9=(_0x1255bf?_0x5687b4(_0x43ae4e,_0x31765e,_0x44cac9):_0x5687b4(_0x44cac9))||_0x44cac9);return _0x1255bf&&_0x44cac9&&E(_0x43ae4e,_0x31765e,_0x44cac9),_0x44cac9;},_=(_0xdb35f5,_0x46902e)=>(_0x4f9179,_0x43468a)=>_0x46902e(_0x4f9179,_0x43468a,_0xdb35f5);let S=class extends c[_0x2919cf(0x19d)]{constructor(_0x436614,_0x1ff44e,_0x1f790b,_0x35e186){const _0x1f012f=_0x2919cf;super(),this[_0x1f012f(0x1a6)]=_0x436614,this[_0x1f012f(0x1dd)]=_0x1ff44e,this[_0x1f012f(0x1cd)]=_0x1f790b,this[_0x1f012f(0x1c7)]=_0x35e186,this[_0x1f012f(0x18d)](),this[_0x1f012f(0x1d0)]();}[_0x2919cf(0x1d0)](){const _0x1bce9f=_0x2919cf;this[_0x1bce9f(0x190)](this[_0x1bce9f(0x1dd)]['commentUpdate$']['pipe'](U[_0x1bce9f(0x1e1)](0x10))['subscribe'](_0x32500c=>{const _0xcbc5c4=_0x1bce9f,_0x3f32e1=new Set();_0x32500c[_0xcbc5c4(0x198)](_0x1e0afe=>{const _0x9ed2c3=_0xcbc5c4;switch(_0x1e0afe['type']){case _0x9ed2c3(0x1ca):{const _0x411c08=_0x1e0afe[_0x9ed2c3(0x1b5)][_0x9ed2c3(0x1d3)];_0x3f32e1[_0x9ed2c3(0x1ca)](_0x411c08);break;}}}),$(this[_0xcbc5c4(0x1c7)],_0x3f32e1);}));}[_0x2919cf(0x18d)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x301748=>{const _0xcf72cc=_0x4b18;var _0x7cb046,_0x1b8d2d,_0x3be74f,_0x3eb005;const _0x6ef5c0=(_0x7cb046=this['_threadCommentModel']['getUnit'](_0x301748['unitId'])[_0xcf72cc(0x172)](_0x564e09=>_0x564e09[_0xcf72cc(0x18c)]===_0x301748[_0xcf72cc(0x18c)]))==null?void 0x0:_0x7cb046[_0xcf72cc(0x192)];if(!_0x6ef5c0)return;const {unitId:_0xab898b,subUnitId:_0x1b55e6}=_0x6ef5c0;switch(_0x301748[_0xcf72cc(0x19a)]&&this['_userService'][_0xcf72cc(0x184)](_0x301748['user']),_0x301748[_0xcf72cc(0x189)]){case I[_0xcf72cc(0x177)]:break;case I[_0xcf72cc(0x1d8)]:{this[_0xcf72cc(0x1dd)]['addComment'](_0xab898b,_0x1b55e6,{'unitId':_0xab898b,'subUnitId':_0x1b55e6,'ref':'','id':_0x301748[_0xcf72cc(0x1a8)],'dT':g(+_0x301748[_0xcf72cc(0x1cb)]),'threadId':_0x301748[_0xcf72cc(0x18c)],'personId':(_0x3be74f=(_0x1b8d2d=_0x301748[_0xcf72cc(0x19a)])==null?void 0x0:_0x1b8d2d['userID'])!=null?_0x3be74f:_0x301748[_0xcf72cc(0x195)],'text':JSON['parse'](_0x301748[_0xcf72cc(0x180)]),'parentId':_0x6ef5c0['id']});break;}case I[_0xcf72cc(0x1bb)]:{const _0x28dce1=this[_0xcf72cc(0x1dd)][_0xcf72cc(0x17e)](_0xab898b,_0x1b55e6,_0x301748['replyId']);_0x28dce1&&_0x28dce1[_0xcf72cc(0x1a7)]&&this['_threadCommentModel'][_0xcf72cc(0x1b2)](_0xab898b,_0x1b55e6,_0x301748[_0xcf72cc(0x1a8)]);break;}case I['Edit']:{this[_0xcf72cc(0x1dd)][_0xcf72cc(0x1ba)](_0xab898b,_0x1b55e6,{'commentId':_0x301748['replyId'],'text':JSON[_0xcf72cc(0x191)](_0x301748[_0xcf72cc(0x180)])});break;}case I[_0xcf72cc(0x1e3)]:{const _0x5ba80f=(_0x3eb005=this[_0xcf72cc(0x1dd)]['getUnit'](_0x301748[_0xcf72cc(0x1d6)])[_0xcf72cc(0x172)](_0x57fdfe=>_0x57fdfe[_0xcf72cc(0x18c)]===_0x301748[_0xcf72cc(0x18c)]))==null?void 0x0:_0x3eb005[_0xcf72cc(0x192)];_0x5ba80f&&this[_0xcf72cc(0x1dd)][_0xcf72cc(0x1ce)](_0xab898b,_0x1b55e6,_0x5ba80f['id'],_0x301748['solved']===v['Solved']);break;}}}));}};S=A([_(0x0,c[_0x2919cf(0x1de)](C[_0x2919cf(0x196)])),_(0x1,c[_0x2919cf(0x1de)](P['ThreadCommentModel'])),_(0x2,c[_0x2919cf(0x1de)](c[_0x2919cf(0x1d2)])),_(0x3,c['Inject'](c[_0x2919cf(0x1be)]))],S);const x=_0x2919cf(0x185),D={};var Y=Object[_0x2919cf(0x1b3)],G=Object[_0x2919cf(0x1dc)],H=(_0x1be5a8,_0x5efa84,_0x114729,_0x10ce20)=>{const _0xd8944e=_0x2919cf;for(var _0x147e7c=_0x10ce20>0x1?void 0x0:_0x10ce20?G(_0x5efa84,_0x114729):_0x5efa84,_0x52ace9=_0x1be5a8[_0xd8944e(0x1c2)]-0x1,_0x14f20f;_0x52ace9>=0x0;_0x52ace9--)(_0x14f20f=_0x1be5a8[_0x52ace9])&&(_0x147e7c=(_0x10ce20?_0x14f20f(_0x5efa84,_0x114729,_0x147e7c):_0x14f20f(_0x147e7c))||_0x147e7c);return _0x10ce20&&_0x147e7c&&Y(_0x5efa84,_0x114729,_0x147e7c),_0x147e7c;},p=(_0x4f56f1,_0x21c44a)=>(_0xa30941,_0x3d8960)=>_0x21c44a(_0xa30941,_0x3d8960,_0x4f56f1);function _0x3159(){const _0xcd4b10=['length','reply','requireSession','_initDataSource','@univerjs/core','_injector','660525BLOlRH','/universer-api/comment/unit/','add','createTimestamp','IConfigService','_userService','resolveComment','size','_initUserSync','customRanges','UserManagerService','personId','getCurrentUser','replies','unitId','HTTPService','Reply','UniverThreadCommentUIPlugin','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','getOwnPropertyDescriptor','_threadCommentModel','Inject','users','_threadCommentDataSourceService','bufferTime','@univerjs/thread-comment-ui','Solve','saveCommentToSnapshot','122073vZEmwi','/edit','map','onStarting','find','@univerjs/thread-comment','rxjs','body','format','Add','396688xjAvUb','Unknown','ref','IThreadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','getComment','solved','content','symbol','setConfig','get','addUser','thread-comment-data-source.config','OpenOrReOpen','_configService','dataSource','type','onReady','UniverCollaborationClientPlugin','threadId','_init','CustomRangeType','UniverInstanceType','disposeWithMe','parse','root','listComments','UNRECOGNIZED','userId','CommentService','32TaceRa','forEach','6715746rmOXAk','user','UniverThreadCommentDataSourcePlugin','userID','Disposable','error','rangeId','rangeType','delete','_sessionService','COMMENT','UNIVER_UNKNOWN','post','_commentService','parentId','replyId','getUser','getMemberID','DependentOn','805540rphRiV','/universer-api/user/list','4100475RUKRAr','filter','UniverLicensePlugin','Module','deleteComment','defineProperty','1093656VoOTsX','payload','resolved','code','pluginName','dayjs','updateComment','Delete','slice','Solved','Injector','_httpService','/list','/solved'];_0x3159=function(){return _0xcd4b10;};return _0x3159();}function J(_0x51ab7a,_0x4e2176){const _0x40e402=_0x2919cf,_0x4f4854=_0x51ab7a[_0x40e402(0x1d5)][0x0];return{..._0x4e2176,'id':_0x4f4854['replyId'],'resolved':_0x51ab7a[_0x40e402(0x17f)]===0x1,'dT':g(_0x4f4854[_0x40e402(0x1cb)]),'personId':_0x4f4854[_0x40e402(0x195)],'threadId':_0x4f4854[_0x40e402(0x18c)]};}function F(_0x3be3d3,_0x4d65fc,_0x250cbc){const _0x3ce05a=_0x2919cf;var _0x1bcce9,_0x3232be;if(((_0x3232be=(_0x1bcce9=_0x3be3d3==null?void 0x0:_0x3be3d3[_0x3ce05a(0x1d5)])==null?void 0x0:_0x1bcce9['length'])!=null?_0x3232be:0x0)>0x0){const _0x15d47a=(_0x5f1562,_0x5c1366)=>({'id':_0x5f1562['replyId'],'threadId':_0x5f1562[_0x3ce05a(0x18c)],'dT':g(_0x5f1562[_0x3ce05a(0x1cb)]),'personId':_0x5f1562[_0x3ce05a(0x195)],'resolved':_0x3be3d3[_0x3ce05a(0x17f)]===v[_0x3ce05a(0x1bd)],'unitId':_0x4d65fc,'subUnitId':_0x250cbc,'text':JSON[_0x3ce05a(0x191)](_0x5f1562['content']),'parentId':_0x5c1366}),_0x278262=_0x15d47a(_0x3be3d3['replies'][0x0]);return{..._0x278262,'children':_0x3be3d3[_0x3ce05a(0x1d5)][_0x3ce05a(0x1bc)](0x1)[_0x3ce05a(0x170)](_0x3e6a73=>_0x15d47a(_0x3e6a73,_0x278262['id']))};}return null;}let f=class{constructor(_0x387757,_0x535c30,_0x258ace,_0x5bedb4){const _0x30bb2e=_0x2919cf;this[_0x30bb2e(0x1bf)]=_0x387757,this['_userService']=_0x535c30,this[_0x30bb2e(0x1a2)]=_0x258ace,this['_injector']=_0x5bedb4;}async['addComment'](_0x391262){const _0x53dbab=_0x2919cf;var _0x44c170,_0x2c916d;const {parentId:_0x290be1,unitId:_0x22023d,text:_0x3adaee,threadId:_0x4eb92e}=_0x391262,_0x563004=(_0x2c916d=(_0x44c170=_0x3adaee[_0x53dbab(0x1d1)])==null?void 0x0:_0x44c170[_0x53dbab(0x1af)](_0x22956c=>_0x22956c[_0x53dbab(0x1a0)]===c[_0x53dbab(0x18e)]['COMMENT'])[_0x53dbab(0x170)](_0xdd0b35=>_0xdd0b35[_0x53dbab(0x19f)]))!=null?_0x2c916d:[],_0x51b65e=JSON['stringify'](_0x3adaee),_0x458a43=(await this[_0x53dbab(0x1a2)][_0x53dbab(0x1c4)](_0x22023d))[_0x53dbab(0x1aa)]();if(_0x290be1){const _0x2dbf1b={'memberId':_0x458a43,'unitId':_0x22023d,'content':_0x51b65e,'mention':_0x563004,'threadId':_0x4eb92e},_0x4d0002=(await this['_httpService'][_0x53dbab(0x1a5)](_0x53dbab(0x1c9)+_0x22023d+'/reply',{'body':_0x2dbf1b}))['body'][_0x53dbab(0x1c3)];return{..._0x391262,'id':_0x4d0002[_0x53dbab(0x1a8)],'dT':c['dayjs'](+_0x4d0002[_0x53dbab(0x1cb)])[_0x53dbab(0x176)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4d0002[_0x53dbab(0x195)]};}else{const _0xa43285={'memberId':_0x458a43,'unitId':_0x22023d,'content':_0x51b65e,'mention':_0x563004},_0x49e66c=await this[_0x53dbab(0x1bf)]['post']('/universer-api/comment/unit/'+_0x22023d+'/add',{'body':_0xa43285});return J(_0x49e66c[_0x53dbab(0x175)]['comment'],_0x391262);}}async[_0x2919cf(0x1ba)](_0x5c7618){const _0x56d46a=_0x2919cf;var _0x34ab6c,_0x3f7a82;const {text:_0x16e3b0,unitId:_0x55801f}=_0x5c7618,_0x143f95=(_0x3f7a82=(_0x34ab6c=_0x16e3b0['customRanges'])==null?void 0x0:_0x34ab6c[_0x56d46a(0x1af)](_0x556179=>_0x556179[_0x56d46a(0x1a0)]===c[_0x56d46a(0x18e)][_0x56d46a(0x1a3)])[_0x56d46a(0x170)](_0x4b0906=>_0x4b0906['rangeId']))!=null?_0x3f7a82:[],_0x339e23=JSON['stringify'](_0x16e3b0),_0x5681e9=_0x5c7618['threadId'],_0x2bc83f=_0x5c7618['id'],_0x89b54={'memberId':(await this[_0x56d46a(0x1a2)]['requireSession'](_0x55801f))[_0x56d46a(0x1aa)](),'unitId':_0x55801f,'threadId':_0x5681e9,'mention':_0x143f95,'content':_0x339e23,'replyId':_0x2bc83f},_0x57fa9a=await this[_0x56d46a(0x1bf)][_0x56d46a(0x1a5)](_0x56d46a(0x1c9)+_0x55801f+_0x56d46a(0x16f),{'body':_0x89b54});return!_0x57fa9a[_0x56d46a(0x175)][_0x56d46a(0x19e)]||_0x57fa9a[_0x56d46a(0x175)][_0x56d46a(0x19e)]['code']===0x1;}async[_0x2919cf(0x1ce)](_0x5aedb3){const _0x2f1fd2=_0x2919cf,{unitId:_0x211f2b}=_0x5aedb3,_0x367afc=_0x5aedb3[_0x2f1fd2(0x18c)],_0x457b24={'memberId':this[_0x2f1fd2(0x1cd)][_0x2f1fd2(0x1d4)]()[_0x2f1fd2(0x19c)],'unitId':_0x211f2b,'threadId':_0x367afc,'solved':_0x5aedb3[_0x2f1fd2(0x1b6)]?v[_0x2f1fd2(0x1bd)]:v[_0x2f1fd2(0x186)]},_0x44a6be=await this[_0x2f1fd2(0x1bf)][_0x2f1fd2(0x1a5)]('/universer-api/comment/unit/'+_0x211f2b+_0x2f1fd2(0x1c1),{'body':_0x457b24});return!_0x44a6be['body'][_0x2f1fd2(0x19e)]||_0x44a6be[_0x2f1fd2(0x175)]['error'][_0x2f1fd2(0x1b7)]===0x1;}async[_0x2919cf(0x1b2)](_0x18a715,_0x51615b,_0x1deab0,_0x50dc81){const _0x40a9a8=_0x2919cf,_0x5dfd20={'memberId':(await this[_0x40a9a8(0x1a2)][_0x40a9a8(0x1c4)](_0x18a715))[_0x40a9a8(0x1aa)](),'threadId':_0x1deab0,'replyId':_0x50dc81,'unitId':_0x18a715},_0x4c7446=await this[_0x40a9a8(0x1bf)][_0x40a9a8(0x1a5)](_0x40a9a8(0x1c9)+_0x18a715+'/delete',{'body':_0x5dfd20});return!_0x4c7446['body'][_0x40a9a8(0x19e)]||_0x4c7446[_0x40a9a8(0x175)]['error']['code']===0x1;}async[_0x2919cf(0x193)](_0xbccb58,_0x5cd5b7,_0x24ea7d){const _0x49f2ac=_0x2919cf,_0x27dff2={'unitId':_0xbccb58,'threadId':_0x24ea7d},_0x5a161b=await this[_0x49f2ac(0x1bf)][_0x49f2ac(0x1a5)](_0x49f2ac(0x1c9)+_0xbccb58+_0x49f2ac(0x1c0),{'body':_0x27dff2}),_0x2ad4e4=_0x24ea7d[_0x49f2ac(0x170)](_0x4a6e60=>F(_0x5a161b[_0x49f2ac(0x175)]['comments'][_0x4a6e60],_0xbccb58,_0x5cd5b7))[_0x49f2ac(0x1af)](Boolean);return Object['values'](_0x5a161b[_0x49f2ac(0x175)][_0x49f2ac(0x1df)])[_0x49f2ac(0x198)](_0x404f3a=>{const _0x30eeca=_0x49f2ac;this['_userService'][_0x30eeca(0x184)](_0x404f3a);}),_0x2ad4e4;}[_0x2919cf(0x1e4)](_0x94b24e){const _0x646822=_0x2919cf;return{'id':_0x94b24e['id'],'threadId':_0x94b24e[_0x646822(0x18c)],'ref':_0x94b24e[_0x646822(0x17a)]};}};f=H([p(0x0,c[_0x2919cf(0x1de)](M['HTTPService'])),p(0x1,c['Inject'](c['UserManagerService'])),p(0x2,c[_0x2919cf(0x1de)](C[_0x2919cf(0x17d)])),p(0x3,c[_0x2919cf(0x1de)](c[_0x2919cf(0x1be)]))],f);var L=Object['defineProperty'],Z=Object[_0x2919cf(0x1dc)],W=(_0x2e9071,_0x3b487d,_0x38779e,_0x330998)=>{const _0x14ecc9=_0x2919cf;for(var _0x398143=_0x330998>0x1?void 0x0:_0x330998?Z(_0x3b487d,_0x38779e):_0x3b487d,_0x35990b=_0x2e9071[_0x14ecc9(0x1c2)]-0x1,_0x50f166;_0x35990b>=0x0;_0x35990b--)(_0x50f166=_0x2e9071[_0x35990b])&&(_0x398143=(_0x330998?_0x50f166(_0x3b487d,_0x38779e,_0x398143):_0x50f166(_0x398143))||_0x398143);return _0x330998&&_0x398143&&L(_0x3b487d,_0x38779e,_0x398143),_0x398143;},O=(_0x3db84f,_0x9c7a66)=>(_0x5dbb1c,_0x3b8f9a)=>_0x9c7a66(_0x5dbb1c,_0x3b8f9a,_0x3db84f);let b=class extends c[_0x2919cf(0x19d)]{constructor(_0x1a636c,_0x545250){const _0x1981cb=_0x2919cf;super(),this[_0x1981cb(0x1e0)]=_0x1a636c,this[_0x1981cb(0x1db)]=_0x545250,this[_0x1981cb(0x1c5)]();}[_0x2919cf(0x1c5)](){const _0x5857b5=_0x2919cf;this[_0x5857b5(0x1e0)][_0x5857b5(0x188)]=this[_0x5857b5(0x1db)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P[_0x2919cf(0x17b)]),O(0x1,c[_0x2919cf(0x1de)](f))],b);var j=Object[_0x2919cf(0x1b3)],B=Object[_0x2919cf(0x1dc)],K=(_0x11384e,_0x5533d1,_0x40349f)=>_0x5533d1 in _0x11384e?j(_0x11384e,_0x5533d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40349f}):_0x11384e[_0x5533d1]=_0x40349f,V=(_0x5aaf89,_0x3349ac,_0x17fc06,_0xb84908)=>{const _0x3bfde6=_0x2919cf;for(var _0x3ab821=_0xb84908>0x1?void 0x0:_0xb84908?B(_0x3349ac,_0x17fc06):_0x3349ac,_0x42b426=_0x5aaf89[_0x3bfde6(0x1c2)]-0x1,_0x171ebd;_0x42b426>=0x0;_0x42b426--)(_0x171ebd=_0x5aaf89[_0x42b426])&&(_0x3ab821=(_0xb84908?_0x171ebd(_0x3349ac,_0x17fc06,_0x3ab821):_0x171ebd(_0x3ab821))||_0x3ab821);return _0xb84908&&_0x3ab821&&j(_0x3349ac,_0x17fc06,_0x3ab821),_0x3ab821;},y=(_0x489c8b,_0x3f1311)=>(_0x139697,_0x1c0e7d)=>_0x3f1311(_0x139697,_0x1c0e7d,_0x489c8b),N=(_0x292802,_0x14c182,_0x2d4d07)=>K(_0x292802,typeof _0x14c182!=_0x2919cf(0x181)?_0x14c182+'':_0x14c182,_0x2d4d07);exports[_0x2919cf(0x19b)]=class extends c['Plugin']{constructor(_0xd3cb76=D,_0x24c7b2,_0x4ef92c){const _0xdc9a71=_0x2919cf;super(),this['_config']=_0xd3cb76,this[_0xdc9a71(0x1c7)]=_0x24c7b2,this[_0xdc9a71(0x187)]=_0x4ef92c;const {..._0x5004a6}=c['merge']({},D,this['_config']);this[_0xdc9a71(0x187)][_0xdc9a71(0x182)](x,_0x5004a6);}[_0x2919cf(0x171)](){const _0x6ddd40=_0x2919cf;[[f],[b],[S]][_0x6ddd40(0x198)](_0x592ecf=>{const _0x3ada08=_0x6ddd40;this[_0x3ada08(0x1c7)][_0x3ada08(0x1ca)](_0x592ecf);});}[_0x2919cf(0x18a)](){const _0x5ce6e6=_0x2919cf;this[_0x5ce6e6(0x1c7)][_0x5ce6e6(0x183)](b),this['_injector'][_0x5ce6e6(0x183)](S);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2919cf(0x1b8),R),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x2919cf(0x18f)][_0x2919cf(0x1a4)]),exports[_0x2919cf(0x19b)]=V([c[_0x2919cf(0x1ab)](w[_0x2919cf(0x1d9)],C[_0x2919cf(0x18b)],T[_0x2919cf(0x1b0)]),y(0x1,c[_0x2919cf(0x1de)](c[_0x2919cf(0x1be)])),y(0x2,c[_0x2919cf(0x1cc)])],exports[_0x2919cf(0x19b)]);
|
|
1
|
+
'use strict';const _0x23f222=_0x4cad;(function(_0x5d823e,_0x517ee6){const _0x56edcb=_0x4cad,_0x3fe19e=_0x5d823e();while(!![]){try{const _0x35cfd5=-parseInt(_0x56edcb(0x1fd))/0x1+parseInt(_0x56edcb(0x20c))/0x2+parseInt(_0x56edcb(0x264))/0x3+-parseInt(_0x56edcb(0x24a))/0x4+-parseInt(_0x56edcb(0x24d))/0x5+parseInt(_0x56edcb(0x215))/0x6+-parseInt(_0x56edcb(0x1f5))/0x7*(-parseInt(_0x56edcb(0x21c))/0x8);if(_0x35cfd5===_0x517ee6)break;else _0x3fe19e['push'](_0x3fe19e['shift']());}catch(_0x25ca21){_0x3fe19e['push'](_0x3fe19e['shift']());}}}(_0x3963,0xd48bd));Object[_0x23f222(0x25d)](exports,Symbol[_0x23f222(0x217)],{'value':_0x23f222(0x241)});const C=require(_0x23f222(0x232)),T=require(_0x23f222(0x212)),c=require(_0x23f222(0x1f4)),w=require(_0x23f222(0x234)),P=require(_0x23f222(0x247)),U=require(_0x23f222(0x254)),M=require(_0x23f222(0x1f6)),R=_0x23f222(0x261);var v=(_0xac695a=>(_0xac695a[_0xac695a[_0x23f222(0x263)]=0x0]='OpenOrReOpen',_0xac695a[_0xac695a[_0x23f222(0x231)]=0x1]=_0x23f222(0x231),_0xac695a[_0xac695a['UNRECOGNIZED']=-0x1]=_0x23f222(0x21d),_0xac695a))(v||{}),I=(_0x1104ff=>(_0x1104ff[_0x1104ff[_0x23f222(0x266)]=0x0]=_0x23f222(0x266),_0x1104ff[_0x1104ff['Add']=0x1]=_0x23f222(0x208),_0x1104ff[_0x1104ff['Reply']=0x2]='Reply',_0x1104ff[_0x1104ff[_0x23f222(0x213)]=0x3]=_0x23f222(0x213),_0x1104ff[_0x1104ff[_0x23f222(0x244)]=0x4]='Delete',_0x1104ff[_0x1104ff[_0x23f222(0x25c)]=0x5]=_0x23f222(0x25c),_0x1104ff[_0x1104ff[_0x23f222(0x21d)]=-0x1]='UNRECOGNIZED',_0x1104ff))(I||{});const g=_0x41ea95=>c[_0x23f222(0x1fb)](new Date(+_0x41ea95))[_0x23f222(0x20d)]('YYYY/MM/DD\x20HH:mm'),$=async(_0x21321e,_0x132f51)=>{const _0x1ee5ad=_0x23f222,_0x12471d=_0x21321e[_0x1ee5ad(0x1fe)](c[_0x1ee5ad(0x20a)]),_0x28dfa8=_0x21321e[_0x1ee5ad(0x1fe)](M[_0x1ee5ad(0x204)]);_0x132f51[_0x1ee5ad(0x236)](_0x217d2f=>{const _0xe7b9ff=_0x1ee5ad;_0x12471d[_0xe7b9ff(0x246)](_0x217d2f)&&_0x132f51[_0xe7b9ff(0x222)](_0x217d2f);}),_0x132f51[_0x1ee5ad(0x233)]&&(await _0x28dfa8[_0x1ee5ad(0x1fe)](_0x1ee5ad(0x225),{'params':{'userIDs':[..._0x132f51]}}))[_0x1ee5ad(0x21e)]['users'][_0x1ee5ad(0x236)](_0x240e1f=>{const _0x3d9557=_0x1ee5ad;_0x240e1f&&_0x12471d[_0x3d9557(0x260)](_0x240e1f);});};var E=Object[_0x23f222(0x25d)],q=Object['getOwnPropertyDescriptor'],A=(_0x4d1f71,_0x457010,_0x432351,_0x4abb65)=>{for(var _0x58d798=_0x4abb65>0x1?void 0x0:_0x4abb65?q(_0x457010,_0x432351):_0x457010,_0x2d4d69=_0x4d1f71['length']-0x1,_0x101ed5;_0x2d4d69>=0x0;_0x2d4d69--)(_0x101ed5=_0x4d1f71[_0x2d4d69])&&(_0x58d798=(_0x4abb65?_0x101ed5(_0x457010,_0x432351,_0x58d798):_0x101ed5(_0x58d798))||_0x58d798);return _0x4abb65&&_0x58d798&&E(_0x457010,_0x432351,_0x58d798),_0x58d798;},_=(_0x16515a,_0x5d62c6)=>(_0x13dc0a,_0x135c17)=>_0x5d62c6(_0x13dc0a,_0x135c17,_0x16515a);let S=class extends c['Disposable']{constructor(_0x57a2ba,_0x4fcbf4,_0x4b069c,_0xc41759){const _0x3c4400=_0x23f222;super(),this[_0x3c4400(0x22a)]=_0x57a2ba,this[_0x3c4400(0x23e)]=_0x4fcbf4,this[_0x3c4400(0x22e)]=_0x4b069c,this[_0x3c4400(0x23d)]=_0xc41759,this[_0x3c4400(0x25b)](),this[_0x3c4400(0x250)]();}[_0x23f222(0x250)](){const _0x34cfc4=_0x23f222;this['disposeWithMe'](this[_0x34cfc4(0x23e)][_0x34cfc4(0x238)]['pipe'](U[_0x34cfc4(0x257)](0x10))['subscribe'](_0x55c9c9=>{const _0x9f5119=_0x34cfc4,_0x1c01e1=new Set();_0x55c9c9[_0x9f5119(0x236)](_0xee1f81=>{const _0x2c9c76=_0x9f5119;switch(_0xee1f81[_0x2c9c76(0x1f9)]){case'add':{const _0xb41739=_0xee1f81[_0x2c9c76(0x223)][_0x2c9c76(0x235)];_0x1c01e1[_0x2c9c76(0x203)](_0xb41739);break;}}}),$(this[_0x9f5119(0x23d)],_0x1c01e1);}));}[_0x23f222(0x25b)](){const _0x3ae9cc=_0x23f222;this['disposeWithMe'](this[_0x3ae9cc(0x22a)][_0x3ae9cc(0x238)][_0x3ae9cc(0x211)](async _0x1c1559=>{const _0x2ee455=_0x3ae9cc;var _0x389901,_0x565ebe,_0x13d573,_0x44662a;const _0x4faf65=(_0x389901=this[_0x2ee455(0x23e)][_0x2ee455(0x242)](_0x1c1559['unitId'])['find'](_0x3c261a=>_0x3c261a['threadId']===_0x1c1559[_0x2ee455(0x20f)]))==null?void 0x0:_0x389901[_0x2ee455(0x21f)];if(!_0x4faf65)return;const {unitId:_0x20ed56,subUnitId:_0x2e91fa}=_0x4faf65;switch(_0x1c1559[_0x2ee455(0x249)]&&this[_0x2ee455(0x22e)]['addUser'](_0x1c1559[_0x2ee455(0x249)]),_0x1c1559[_0x2ee455(0x1f9)]){case I['Add']:break;case I[_0x2ee455(0x22c)]:{this[_0x2ee455(0x23e)][_0x2ee455(0x253)](_0x20ed56,_0x2e91fa,{'unitId':_0x20ed56,'subUnitId':_0x2e91fa,'ref':'','id':_0x1c1559['replyId'],'dT':g(+_0x1c1559[_0x2ee455(0x201)]),'threadId':_0x1c1559[_0x2ee455(0x20f)],'personId':(_0x13d573=(_0x565ebe=_0x1c1559[_0x2ee455(0x249)])==null?void 0x0:_0x565ebe[_0x2ee455(0x21b)])!=null?_0x13d573:_0x1c1559[_0x2ee455(0x200)],'text':JSON['parse'](_0x1c1559[_0x2ee455(0x20b)]),'parentId':_0x4faf65['id']});break;}case I[_0x2ee455(0x244)]:{const _0x279914=this['_threadCommentModel'][_0x2ee455(0x23a)](_0x20ed56,_0x2e91fa,_0x1c1559['replyId']);_0x279914&&_0x279914['parentId']&&this[_0x2ee455(0x23e)]['deleteComment'](_0x20ed56,_0x2e91fa,_0x1c1559['replyId']);break;}case I[_0x2ee455(0x213)]:{this[_0x2ee455(0x23e)][_0x2ee455(0x255)](_0x20ed56,_0x2e91fa,{'commentId':_0x1c1559[_0x2ee455(0x265)],'text':JSON[_0x2ee455(0x259)](_0x1c1559['content'])});break;}case I[_0x2ee455(0x25c)]:{const _0x390a76=(_0x44662a=this[_0x2ee455(0x23e)][_0x2ee455(0x242)](_0x1c1559['unitId'])['find'](_0x42ad21=>_0x42ad21[_0x2ee455(0x20f)]===_0x1c1559[_0x2ee455(0x20f)]))==null?void 0x0:_0x44662a['root'];_0x390a76&&this[_0x2ee455(0x23e)][_0x2ee455(0x207)](_0x20ed56,_0x2e91fa,_0x390a76['id'],_0x1c1559['solved']===v['Solved']);break;}}}));}};S=A([_(0x0,c[_0x23f222(0x221)](C[_0x23f222(0x22b)])),_(0x1,c['Inject'](P[_0x23f222(0x256)])),_(0x2,c[_0x23f222(0x221)](c[_0x23f222(0x20a)])),_(0x3,c[_0x23f222(0x221)](c[_0x23f222(0x209)]))],S);function _0x3963(){const _0x529508=['bufferTime','IConfigService','parse','map','_init','Solve','defineProperty','requireSession','CollaborationSessionService','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','OpenOrReOpen','1872801MgiTPq','replyId','Unknown','_initDataSource','rangeId','replies','values','error','length','UniverThreadCommentDataSourcePlugin','stringify','@univerjs/core','50393hJFxih','@univerjs/network','IThreadCommentDataSourceService','filter','type','_httpService','dayjs','getCurrentUser','1689233xYhJvK','get','DependentOn','userId','createTimestamp','ref','add','HTTPService','Plugin','/delete','resolveComment','Add','Injector','UserManagerService','content','2688076tpDnso','format','/edit','threadId','/universer-api/comment/unit/','subscribe','@univerjs-pro/license','Edit','code','7528446JwCRmM','getOwnPropertyDescriptor','toStringTag','UniverInstanceType','resolved','rangeType','userID','1720LyMGVm','UNRECOGNIZED','body','root','customRanges','Inject','delete','payload','listComments','/universer-api/user/list','post','getMemberID','CustomRangeType','users','_commentService','CommentService','Reply','_config','_userService','solved','/solved','Solved','@univerjs-pro/collaboration-client','size','@univerjs/thread-comment-ui','personId','forEach','UniverLicensePlugin','commentUpdate$','Disposable','getComment','reply','saveCommentToSnapshot','_injector','_threadCommentModel','onStarting','symbol','Module','getUnit','comments','Delete','slice','getUser','@univerjs/thread-comment','comment','user','2348364tZbAAE','_threadCommentDataSource','_sessionService','8119590ainFCB','YYYY/MM/DD\x20HH:mm','deleteComment','_initUserSync','_configService','pluginName','addComment','rxjs','updateComment','ThreadCommentModel'];_0x3963=function(){return _0x529508;};return _0x3963();}const x='thread-comment-data-source.config',D={};function _0x4cad(_0xa095c7,_0x1fffd3){const _0x396398=_0x3963();return _0x4cad=function(_0x4cad9a,_0x1f2de5){_0x4cad9a=_0x4cad9a-0x1f0;let _0xa597e=_0x396398[_0x4cad9a];return _0xa597e;},_0x4cad(_0xa095c7,_0x1fffd3);}var Y=Object[_0x23f222(0x25d)],G=Object[_0x23f222(0x216)],H=(_0x2cd30a,_0x8a917d,_0x55d329,_0x407a9f)=>{const _0x3c709b=_0x23f222;for(var _0x59dec7=_0x407a9f>0x1?void 0x0:_0x407a9f?G(_0x8a917d,_0x55d329):_0x8a917d,_0x777cbe=_0x2cd30a[_0x3c709b(0x1f1)]-0x1,_0x561546;_0x777cbe>=0x0;_0x777cbe--)(_0x561546=_0x2cd30a[_0x777cbe])&&(_0x59dec7=(_0x407a9f?_0x561546(_0x8a917d,_0x55d329,_0x59dec7):_0x561546(_0x59dec7))||_0x59dec7);return _0x407a9f&&_0x59dec7&&Y(_0x8a917d,_0x55d329,_0x59dec7),_0x59dec7;},p=(_0x2ba737,_0x46fd5c)=>(_0x586ccf,_0x482533)=>_0x46fd5c(_0x586ccf,_0x482533,_0x2ba737);function J(_0x1b53bd,_0x209449){const _0x3350bb=_0x23f222,_0x3e7499=_0x1b53bd[_0x3350bb(0x269)][0x0];return{..._0x209449,'id':_0x3e7499[_0x3350bb(0x265)],'resolved':_0x1b53bd['solved']===0x1,'dT':g(_0x3e7499[_0x3350bb(0x201)]),'personId':_0x3e7499[_0x3350bb(0x200)],'threadId':_0x3e7499[_0x3350bb(0x20f)]};}function F(_0x1f0b62,_0x580288,_0x35fd7c){const _0x5aeb6b=_0x23f222;var _0x4c1568,_0x51af6e;if(((_0x51af6e=(_0x4c1568=_0x1f0b62==null?void 0x0:_0x1f0b62[_0x5aeb6b(0x269)])==null?void 0x0:_0x4c1568[_0x5aeb6b(0x1f1)])!=null?_0x51af6e:0x0)>0x0){const _0x44558d=(_0x5736ba,_0x50c718)=>({'id':_0x5736ba[_0x5aeb6b(0x265)],'threadId':_0x5736ba['threadId'],'dT':g(_0x5736ba['createTimestamp']),'personId':_0x5736ba[_0x5aeb6b(0x200)],'resolved':_0x1f0b62[_0x5aeb6b(0x22f)]===v['Solved'],'unitId':_0x580288,'subUnitId':_0x35fd7c,'text':JSON[_0x5aeb6b(0x259)](_0x5736ba[_0x5aeb6b(0x20b)]),'parentId':_0x50c718}),_0x4818dc=_0x44558d(_0x1f0b62[_0x5aeb6b(0x269)][0x0]);return{..._0x4818dc,'children':_0x1f0b62[_0x5aeb6b(0x269)][_0x5aeb6b(0x245)](0x1)['map'](_0x128fe5=>_0x44558d(_0x128fe5,_0x4818dc['id']))};}return null;}let f=class{constructor(_0x2e470e,_0x29b96e,_0x4f7669,_0x2fdc2b){const _0x5e5ccb=_0x23f222;this['_httpService']=_0x2e470e,this[_0x5e5ccb(0x22e)]=_0x29b96e,this[_0x5e5ccb(0x24c)]=_0x4f7669,this[_0x5e5ccb(0x23d)]=_0x2fdc2b;}async[_0x23f222(0x253)](_0x291788){const _0xe441cb=_0x23f222;var _0x89a92a,_0x4eb2df;const {parentId:_0x4f69fc,unitId:_0x434b86,text:_0x3334b2,threadId:_0x548048}=_0x291788,_0x409d32=(_0x4eb2df=(_0x89a92a=_0x3334b2[_0xe441cb(0x220)])==null?void 0x0:_0x89a92a[_0xe441cb(0x1f8)](_0x267df8=>_0x267df8[_0xe441cb(0x21a)]===c[_0xe441cb(0x228)]['COMMENT'])[_0xe441cb(0x25a)](_0x13acdb=>_0x13acdb['rangeId']))!=null?_0x4eb2df:[],_0x592bb7=JSON[_0xe441cb(0x1f3)](_0x3334b2),_0x39c818=(await this['_sessionService'][_0xe441cb(0x25e)](_0x434b86))[_0xe441cb(0x227)]();if(_0x4f69fc){const _0x62c99e={'memberId':_0x39c818,'unitId':_0x434b86,'content':_0x592bb7,'mention':_0x409d32,'threadId':_0x548048},_0x33ad6b=(await this['_httpService'][_0xe441cb(0x226)](_0xe441cb(0x210)+_0x434b86+'/reply',{'body':_0x62c99e}))['body'][_0xe441cb(0x23b)];return{..._0x291788,'id':_0x33ad6b[_0xe441cb(0x265)],'dT':c[_0xe441cb(0x1fb)](+_0x33ad6b[_0xe441cb(0x201)])[_0xe441cb(0x20d)](_0xe441cb(0x24e)),'personId':_0x33ad6b[_0xe441cb(0x200)]};}else{const _0x4d491b={'memberId':_0x39c818,'unitId':_0x434b86,'content':_0x592bb7,'mention':_0x409d32},_0x25b1d6=await this['_httpService'][_0xe441cb(0x226)]('/universer-api/comment/unit/'+_0x434b86+'/add',{'body':_0x4d491b});return J(_0x25b1d6['body'][_0xe441cb(0x248)],_0x291788);}}async[_0x23f222(0x255)](_0x5daa8e){const _0x357736=_0x23f222;var _0x5de41f,_0x4273a5;const {text:_0xde9737,unitId:_0x3f971c}=_0x5daa8e,_0x1ad2b9=(_0x4273a5=(_0x5de41f=_0xde9737[_0x357736(0x220)])==null?void 0x0:_0x5de41f['filter'](_0x3f269c=>_0x3f269c[_0x357736(0x21a)]===c[_0x357736(0x228)]['COMMENT'])[_0x357736(0x25a)](_0x59163b=>_0x59163b[_0x357736(0x268)]))!=null?_0x4273a5:[],_0x2c63b1=JSON[_0x357736(0x1f3)](_0xde9737),_0x117a04=_0x5daa8e[_0x357736(0x20f)],_0x5827db=_0x5daa8e['id'],_0x3cb843={'memberId':(await this[_0x357736(0x24c)][_0x357736(0x25e)](_0x3f971c))[_0x357736(0x227)](),'unitId':_0x3f971c,'threadId':_0x117a04,'mention':_0x1ad2b9,'content':_0x2c63b1,'replyId':_0x5827db},_0x406876=await this[_0x357736(0x1fa)]['post']('/universer-api/comment/unit/'+_0x3f971c+_0x357736(0x20e),{'body':_0x3cb843});return!_0x406876[_0x357736(0x21e)][_0x357736(0x1f0)]||_0x406876[_0x357736(0x21e)][_0x357736(0x1f0)]['code']===0x1;}async['resolveComment'](_0x1850c2){const _0x5c1300=_0x23f222,{unitId:_0x30ddcc}=_0x1850c2,_0xa3325c=_0x1850c2['threadId'],_0x5502d0={'memberId':this[_0x5c1300(0x22e)][_0x5c1300(0x1fc)]()['userID'],'unitId':_0x30ddcc,'threadId':_0xa3325c,'solved':_0x1850c2[_0x5c1300(0x219)]?v[_0x5c1300(0x231)]:v[_0x5c1300(0x263)]},_0x3932a2=await this[_0x5c1300(0x1fa)][_0x5c1300(0x226)](_0x5c1300(0x210)+_0x30ddcc+_0x5c1300(0x230),{'body':_0x5502d0});return!_0x3932a2[_0x5c1300(0x21e)]['error']||_0x3932a2['body'][_0x5c1300(0x1f0)][_0x5c1300(0x214)]===0x1;}async[_0x23f222(0x24f)](_0x46b2f6,_0x39bdac,_0x2ff7ba,_0x4485ed){const _0x52c123=_0x23f222,_0x5a34e3={'memberId':(await this[_0x52c123(0x24c)]['requireSession'](_0x46b2f6))['getMemberID'](),'threadId':_0x2ff7ba,'replyId':_0x4485ed,'unitId':_0x46b2f6},_0x10b26a=await this[_0x52c123(0x1fa)][_0x52c123(0x226)](_0x52c123(0x210)+_0x46b2f6+_0x52c123(0x206),{'body':_0x5a34e3});return!_0x10b26a['body'][_0x52c123(0x1f0)]||_0x10b26a['body'][_0x52c123(0x1f0)][_0x52c123(0x214)]===0x1;}async[_0x23f222(0x224)](_0x2c18b0,_0x47e956,_0x51c00f){const _0x5dd094=_0x23f222,_0x16578c={'unitId':_0x2c18b0,'threadId':_0x51c00f},_0x156eda=await this['_httpService']['post'](_0x5dd094(0x210)+_0x2c18b0+'/list',{'body':_0x16578c}),_0x25967b=_0x51c00f[_0x5dd094(0x25a)](_0x4765b5=>F(_0x156eda[_0x5dd094(0x21e)][_0x5dd094(0x243)][_0x4765b5],_0x2c18b0,_0x47e956))['filter'](Boolean);return Object[_0x5dd094(0x26a)](_0x156eda[_0x5dd094(0x21e)][_0x5dd094(0x229)])[_0x5dd094(0x236)](_0x4a470e=>{const _0x1f26f2=_0x5dd094;this['_userService'][_0x1f26f2(0x260)](_0x4a470e);}),_0x25967b;}[_0x23f222(0x23c)](_0x17e88b){const _0x336d31=_0x23f222;return{'id':_0x17e88b['id'],'threadId':_0x17e88b[_0x336d31(0x20f)],'ref':_0x17e88b[_0x336d31(0x202)]};}};f=H([p(0x0,c[_0x23f222(0x221)](M['HTTPService'])),p(0x1,c[_0x23f222(0x221)](c[_0x23f222(0x20a)])),p(0x2,c['Inject'](C[_0x23f222(0x25f)])),p(0x3,c[_0x23f222(0x221)](c[_0x23f222(0x209)]))],f);var L=Object[_0x23f222(0x25d)],Z=Object[_0x23f222(0x216)],W=(_0x262176,_0x86096f,_0x59b3ba,_0x1d61cb)=>{const _0x1aac28=_0x23f222;for(var _0x5391d9=_0x1d61cb>0x1?void 0x0:_0x1d61cb?Z(_0x86096f,_0x59b3ba):_0x86096f,_0x1a9d36=_0x262176[_0x1aac28(0x1f1)]-0x1,_0x5ac0c9;_0x1a9d36>=0x0;_0x1a9d36--)(_0x5ac0c9=_0x262176[_0x1a9d36])&&(_0x5391d9=(_0x1d61cb?_0x5ac0c9(_0x86096f,_0x59b3ba,_0x5391d9):_0x5ac0c9(_0x5391d9))||_0x5391d9);return _0x1d61cb&&_0x5391d9&&L(_0x86096f,_0x59b3ba,_0x5391d9),_0x5391d9;},O=(_0x1f7cb1,_0x91601)=>(_0x362750,_0x5dd07a)=>_0x91601(_0x362750,_0x5dd07a,_0x1f7cb1);let b=class extends c[_0x23f222(0x239)]{constructor(_0x48cba0,_0x241c41){const _0x1e8da2=_0x23f222;super(),this['_threadCommentDataSourceService']=_0x48cba0,this[_0x1e8da2(0x24b)]=_0x241c41,this[_0x1e8da2(0x267)]();}[_0x23f222(0x267)](){const _0x575531=_0x23f222;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x575531(0x262)]['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P[_0x23f222(0x1f7)]),O(0x1,c[_0x23f222(0x221)](f))],b);var j=Object[_0x23f222(0x25d)],B=Object['getOwnPropertyDescriptor'],K=(_0x3fb40d,_0x5cc5f2,_0x1be52b)=>_0x5cc5f2 in _0x3fb40d?j(_0x3fb40d,_0x5cc5f2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be52b}):_0x3fb40d[_0x5cc5f2]=_0x1be52b,V=(_0x26f67c,_0x258045,_0x5bbefd,_0x4d9542)=>{const _0x22d2d6=_0x23f222;for(var _0x426f37=_0x4d9542>0x1?void 0x0:_0x4d9542?B(_0x258045,_0x5bbefd):_0x258045,_0x12e2fa=_0x26f67c[_0x22d2d6(0x1f1)]-0x1,_0x581590;_0x12e2fa>=0x0;_0x12e2fa--)(_0x581590=_0x26f67c[_0x12e2fa])&&(_0x426f37=(_0x4d9542?_0x581590(_0x258045,_0x5bbefd,_0x426f37):_0x581590(_0x426f37))||_0x426f37);return _0x4d9542&&_0x426f37&&j(_0x258045,_0x5bbefd,_0x426f37),_0x426f37;},y=(_0x137fab,_0x546017)=>(_0x4d3d93,_0x37afb1)=>_0x546017(_0x4d3d93,_0x37afb1,_0x137fab),N=(_0x2c85e1,_0x1227a1,_0x35d17d)=>K(_0x2c85e1,typeof _0x1227a1!=_0x23f222(0x240)?_0x1227a1+'':_0x1227a1,_0x35d17d);exports[_0x23f222(0x1f2)]=class extends c[_0x23f222(0x205)]{constructor(_0x565d39=D,_0x33b868,_0x19ac59){const _0x39beb2=_0x23f222;super(),this[_0x39beb2(0x22d)]=_0x565d39,this[_0x39beb2(0x23d)]=_0x33b868,this[_0x39beb2(0x251)]=_0x19ac59;const {..._0x2034c5}=c['merge']({},D,this[_0x39beb2(0x22d)]);this['_configService']['setConfig'](x,_0x2034c5);}[_0x23f222(0x23f)](){const _0x2100fe=_0x23f222;[[f],[b],[S]][_0x2100fe(0x236)](_0x4ee298=>{const _0x5e4302=_0x2100fe;this['_injector'][_0x5e4302(0x203)](_0x4ee298);});}['onReady'](){const _0x189727=_0x23f222;this[_0x189727(0x23d)][_0x189727(0x1fe)](b),this[_0x189727(0x23d)][_0x189727(0x1fe)](S);}},N(exports[_0x23f222(0x1f2)],_0x23f222(0x252),R),N(exports[_0x23f222(0x1f2)],_0x23f222(0x1f9),c[_0x23f222(0x218)]['UNIVER_UNKNOWN']),exports[_0x23f222(0x1f2)]=V([c[_0x23f222(0x1ff)](w['UniverThreadCommentUIPlugin'],C['UniverCollaborationClientPlugin'],T[_0x23f222(0x237)]),y(0x1,c[_0x23f222(0x221)](c['Injector'])),y(0x2,c[_0x23f222(0x258)])],exports[_0x23f222(0x1f2)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x63570d=_0x3457;(function(_0x54804e,_0x9db7f){const _0x247f6a=_0x3457,_0xe88772=_0x54804e();while(!![]){try{const _0x1f0334=parseInt(_0x247f6a(0x174))/0x1*(parseInt(_0x247f6a(0x14f))/0x2)+parseInt(_0x247f6a(0x13d))/0x3+-parseInt(_0x247f6a(0x133))/0x4+-parseInt(_0x247f6a(0x11e))/0x5+parseInt(_0x247f6a(0x171))/0x6*(-parseInt(_0x247f6a(0x119))/0x7)+-parseInt(_0x247f6a(0x154))/0x8*(-parseInt(_0x247f6a(0x123))/0x9)+-parseInt(_0x247f6a(0x124))/0xa*(-parseInt(_0x247f6a(0x12f))/0xb);if(_0x1f0334===_0x9db7f)break;else _0xe88772['push'](_0xe88772['shift']());}catch(_0x529b3a){_0xe88772['push'](_0xe88772['shift']());}}}(_0x439d,0x321c7));import{CommentService as _0x354a19,CollaborationSessionService as _0x30c0ac,UniverCollaborationClientPlugin as _0x561fe5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd699}from'@univerjs-pro/license';import{dayjs as _0x42b0c,UserManagerService as _0x4f6b05,Inject as _0x2709bb,Injector as _0x23178a,Disposable as _0x420a79,CustomRangeType as _0x3a31e9,UniverInstanceType as _0x5a2d51,DependentOn as _0x118271,Plugin as _0x26ca76,merge as _0xf4505,IConfigService as _0x40b24a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b304c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2791e5,IThreadCommentDataSourceService as _0x256e93}from'@univerjs/thread-comment';import{bufferTime as _0x379476}from'rxjs';import{HTTPService as _0xea1ba2}from'@univerjs/network';const B=_0x63570d(0x15c);var _=(_0x2556e4=>(_0x2556e4[_0x2556e4[_0x63570d(0x153)]=0x0]=_0x63570d(0x153),_0x2556e4[_0x2556e4[_0x63570d(0x11b)]=0x1]=_0x63570d(0x11b),_0x2556e4[_0x2556e4[_0x63570d(0x152)]=-0x1]=_0x63570d(0x152),_0x2556e4))(_||{}),p=(_0xd04caa=>(_0xd04caa[_0xd04caa[_0x63570d(0x139)]=0x0]=_0x63570d(0x139),_0xd04caa[_0xd04caa[_0x63570d(0x127)]=0x1]=_0x63570d(0x127),_0xd04caa[_0xd04caa[_0x63570d(0x17b)]=0x2]=_0x63570d(0x17b),_0xd04caa[_0xd04caa[_0x63570d(0x172)]=0x3]=_0x63570d(0x172),_0xd04caa[_0xd04caa[_0x63570d(0x148)]=0x4]=_0x63570d(0x148),_0xd04caa[_0xd04caa[_0x63570d(0x12d)]=0x5]=_0x63570d(0x12d),_0xd04caa[_0xd04caa[_0x63570d(0x152)]=-0x1]=_0x63570d(0x152),_0xd04caa))(p||{});const O=_0x1ab20f=>_0x42b0c(new Date(+_0x1ab20f))['format'](_0x63570d(0x16c)),K=async(_0x5c986a,_0x3f4ba5)=>{const _0xf6ed7f=_0x63570d,_0x540012=_0x5c986a[_0xf6ed7f(0x166)](_0x4f6b05),_0x4d0b19=_0x5c986a[_0xf6ed7f(0x166)](_0xea1ba2);_0x3f4ba5['forEach'](_0x2d7f43=>{const _0x7e7caa=_0xf6ed7f;_0x540012[_0x7e7caa(0x11d)](_0x2d7f43)&&_0x3f4ba5[_0x7e7caa(0x150)](_0x2d7f43);}),_0x3f4ba5[_0xf6ed7f(0x158)]&&(await _0x4d0b19[_0xf6ed7f(0x166)](_0xf6ed7f(0x146),{'params':{'userIDs':[..._0x3f4ba5]}}))[_0xf6ed7f(0x16e)][_0xf6ed7f(0x15f)][_0xf6ed7f(0x128)](_0x42ce49=>{const _0x418420=_0xf6ed7f;_0x42ce49&&_0x540012[_0x418420(0x16d)](_0x42ce49);});};var V=Object['defineProperty'],z=Object[_0x63570d(0x126)],Q=(_0xff83f7,_0x496266,_0x1834ae,_0x3c948f)=>{const _0x17aec7=_0x63570d;for(var _0x49bf0c=_0x3c948f>0x1?void 0x0:_0x3c948f?z(_0x496266,_0x1834ae):_0x496266,_0x1ce4d8=_0xff83f7[_0x17aec7(0x12e)]-0x1,_0x4bbe13;_0x1ce4d8>=0x0;_0x1ce4d8--)(_0x4bbe13=_0xff83f7[_0x1ce4d8])&&(_0x49bf0c=(_0x3c948f?_0x4bbe13(_0x496266,_0x1834ae,_0x49bf0c):_0x4bbe13(_0x49bf0c))||_0x49bf0c);return _0x3c948f&&_0x49bf0c&&V(_0x496266,_0x1834ae,_0x49bf0c),_0x49bf0c;},v=(_0x44337b,_0x328524)=>(_0x3e6c8f,_0x3c7334)=>_0x328524(_0x3e6c8f,_0x3c7334,_0x44337b);let I=class extends _0x420a79{constructor(_0x2330d1,_0x5d9305,_0x563d31,_0x5e792d){const _0x322e2d=_0x63570d;super(),this['_commentService']=_0x2330d1,this[_0x322e2d(0x15d)]=_0x5d9305,this[_0x322e2d(0x16f)]=_0x563d31,this[_0x322e2d(0x131)]=_0x5e792d,this[_0x322e2d(0x11f)](),this[_0x322e2d(0x17d)]();}[_0x63570d(0x17d)](){const _0x1cff49=_0x63570d;this['disposeWithMe'](this[_0x1cff49(0x15d)][_0x1cff49(0x13f)][_0x1cff49(0x17f)](_0x379476(0x10))['subscribe'](_0x3cba78=>{const _0x41c3e6=_0x1cff49,_0x253edb=new Set();_0x3cba78['forEach'](_0x33ddd2=>{const _0x3f4110=_0x3457;switch(_0x33ddd2[_0x3f4110(0x164)]){case'add':{const _0x106afe=_0x33ddd2['payload'][_0x3f4110(0x149)];_0x253edb[_0x3f4110(0x12b)](_0x106afe);break;}}}),K(this[_0x41c3e6(0x131)],_0x253edb);}));}[_0x63570d(0x11f)](){const _0x581b62=_0x63570d;this[_0x581b62(0x167)](this[_0x581b62(0x12c)][_0x581b62(0x13f)]['subscribe'](async _0x1991e6=>{const _0x1cb6ef=_0x581b62;var _0x375160,_0x2a8d36,_0x3503de,_0x533a5f;const _0x5c511b=(_0x375160=this[_0x1cb6ef(0x15d)][_0x1cb6ef(0x16a)](_0x1991e6[_0x1cb6ef(0x177)])[_0x1cb6ef(0x129)](_0xd1602c=>_0xd1602c[_0x1cb6ef(0x11a)]===_0x1991e6[_0x1cb6ef(0x11a)]))==null?void 0x0:_0x375160[_0x1cb6ef(0x14b)];if(!_0x5c511b)return;const {unitId:_0x311d25,subUnitId:_0x1b6000}=_0x5c511b;switch(_0x1991e6['user']&&this[_0x1cb6ef(0x16f)][_0x1cb6ef(0x16d)](_0x1991e6[_0x1cb6ef(0x151)]),_0x1991e6[_0x1cb6ef(0x164)]){case p[_0x1cb6ef(0x127)]:break;case p[_0x1cb6ef(0x17b)]:{this[_0x1cb6ef(0x15d)][_0x1cb6ef(0x17e)](_0x311d25,_0x1b6000,{'unitId':_0x311d25,'subUnitId':_0x1b6000,'ref':'','id':_0x1991e6[_0x1cb6ef(0x168)],'dT':O(+_0x1991e6['createTimestamp']),'threadId':_0x1991e6[_0x1cb6ef(0x11a)],'personId':(_0x3503de=(_0x2a8d36=_0x1991e6[_0x1cb6ef(0x151)])==null?void 0x0:_0x2a8d36[_0x1cb6ef(0x122)])!=null?_0x3503de:_0x1991e6[_0x1cb6ef(0x134)],'text':JSON[_0x1cb6ef(0x132)](_0x1991e6[_0x1cb6ef(0x169)]),'parentId':_0x5c511b['id']});break;}case p[_0x1cb6ef(0x148)]:{const _0x4d9438=this[_0x1cb6ef(0x15d)][_0x1cb6ef(0x137)](_0x311d25,_0x1b6000,_0x1991e6['replyId']);_0x4d9438&&_0x4d9438[_0x1cb6ef(0x156)]&&this[_0x1cb6ef(0x15d)][_0x1cb6ef(0x157)](_0x311d25,_0x1b6000,_0x1991e6['replyId']);break;}case p[_0x1cb6ef(0x172)]:{this[_0x1cb6ef(0x15d)]['updateComment'](_0x311d25,_0x1b6000,{'commentId':_0x1991e6[_0x1cb6ef(0x168)],'text':JSON[_0x1cb6ef(0x132)](_0x1991e6['content'])});break;}case p[_0x1cb6ef(0x12d)]:{const _0x4a8c52=(_0x533a5f=this[_0x1cb6ef(0x15d)][_0x1cb6ef(0x16a)](_0x1991e6[_0x1cb6ef(0x177)])[_0x1cb6ef(0x129)](_0x5c1415=>_0x5c1415['threadId']===_0x1991e6[_0x1cb6ef(0x11a)]))==null?void 0x0:_0x533a5f[_0x1cb6ef(0x14b)];_0x4a8c52&&this[_0x1cb6ef(0x15d)]['resolveComment'](_0x311d25,_0x1b6000,_0x4a8c52['id'],_0x1991e6[_0x1cb6ef(0x136)]===_[_0x1cb6ef(0x11b)]);break;}}}));}};I=Q([v(0x0,_0x2709bb(_0x354a19)),v(0x1,_0x2709bb(_0x2791e5)),v(0x2,_0x2709bb(_0x4f6b05)),v(0x3,_0x2709bb(_0x23178a))],I);const X=_0x63570d(0x135),P={};var k=Object[_0x63570d(0x15a)],ee=Object['getOwnPropertyDescriptor'],re=(_0x3c3605,_0x5be765,_0x2abb83,_0x5e0605)=>{const _0x4d4f25=_0x63570d;for(var _0x4161cb=_0x5e0605>0x1?void 0x0:_0x5e0605?ee(_0x5be765,_0x2abb83):_0x5be765,_0xf0d874=_0x3c3605[_0x4d4f25(0x12e)]-0x1,_0x3ec0a6;_0xf0d874>=0x0;_0xf0d874--)(_0x3ec0a6=_0x3c3605[_0xf0d874])&&(_0x4161cb=(_0x5e0605?_0x3ec0a6(_0x5be765,_0x2abb83,_0x4161cb):_0x3ec0a6(_0x4161cb))||_0x4161cb);return _0x5e0605&&_0x4161cb&&k(_0x5be765,_0x2abb83,_0x4161cb),_0x4161cb;},f=(_0x85af4c,_0x5c17b2)=>(_0x405b76,_0x4f1a38)=>_0x5c17b2(_0x405b76,_0x4f1a38,_0x85af4c);function te(_0xcbf8ed,_0x5b3043){const _0x45c90a=_0x63570d,_0xb575fe=_0xcbf8ed[_0x45c90a(0x142)][0x0];return{..._0x5b3043,'id':_0xb575fe[_0x45c90a(0x168)],'resolved':_0xcbf8ed[_0x45c90a(0x136)]===0x1,'dT':O(_0xb575fe[_0x45c90a(0x17c)]),'personId':_0xb575fe['userId'],'threadId':_0xb575fe[_0x45c90a(0x11a)]};}function _0x3457(_0x543994,_0x1a3f90){const _0x439d45=_0x439d();return _0x3457=function(_0x345742,_0x2185ff){_0x345742=_0x345742-0x117;let _0x329b86=_0x439d45[_0x345742];return _0x329b86;},_0x3457(_0x543994,_0x1a3f90);}function _0x439d(){const _0x16f0dd=['/universer-api/user/list','updateComment','Delete','personId','comments','root','map','_threadCommentDataSource','/edit','16dxJyJj','delete','user','UNRECOGNIZED','OpenOrReOpen','2942624sBMlfu','symbol','parentId','deleteComment','size','/universer-api/comment/unit/','defineProperty','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','dataSource','users','format','_threadCommentDataSourceService','stringify','rangeId','type','_httpService','get','disposeWithMe','replyId','content','getUnit','pluginName','YYYY/MM/DD\x20HH:mm','addUser','body','_userService','syncUpdateMutationToColla','21534JuOXsh','Edit','listComments','44169lWACbK','filter','post','unitId','saveCommentToSnapshot','_config','values','Reply','createTimestamp','_initUserSync','addComment','pipe','/add','_configService','791aLzZhz','threadId','Solved','getMemberID','getUser','998105CWGmRE','_init','error','reply','userID','9yypCeV','10HbJfBJ','COMMENT','getOwnPropertyDescriptor','Add','forEach','find','setConfig','add','_commentService','Solve','length','2219921jeIUSE','resolveComment','_injector','parse','1231272GuSjpE','userId','thread-comment-data-source.config','solved','getComment','_initDataSource','Unknown','resolved','rangeType','slice','585780johwQq','_sessionService','commentUpdate$','ref','/reply','replies','onReady','customRanges','requireSession'];_0x439d=function(){return _0x16f0dd;};return _0x439d();}function se(_0x10451f,_0x34c871,_0x1e4d73){const _0x181195=_0x63570d;var _0xf5823a,_0x423065;if(((_0x423065=(_0xf5823a=_0x10451f==null?void 0x0:_0x10451f[_0x181195(0x142)])==null?void 0x0:_0xf5823a[_0x181195(0x12e)])!=null?_0x423065:0x0)>0x0){const _0x53301f=(_0x224209,_0x1beb83)=>({'id':_0x224209[_0x181195(0x168)],'threadId':_0x224209[_0x181195(0x11a)],'dT':O(_0x224209[_0x181195(0x17c)]),'personId':_0x224209[_0x181195(0x134)],'resolved':_0x10451f[_0x181195(0x136)]===_[_0x181195(0x11b)],'unitId':_0x34c871,'subUnitId':_0x1e4d73,'text':JSON[_0x181195(0x132)](_0x224209[_0x181195(0x169)]),'parentId':_0x1beb83}),_0x3616f1=_0x53301f(_0x10451f[_0x181195(0x142)][0x0]);return{..._0x3616f1,'children':_0x10451f[_0x181195(0x142)][_0x181195(0x13c)](0x1)['map'](_0x459951=>_0x53301f(_0x459951,_0x3616f1['id']))};}return null;}let S=class{constructor(_0x1ea952,_0x32b01f,_0x33a0e7,_0x57740e){const _0x2aacdd=_0x63570d;this[_0x2aacdd(0x165)]=_0x1ea952,this[_0x2aacdd(0x16f)]=_0x32b01f,this[_0x2aacdd(0x13e)]=_0x33a0e7,this[_0x2aacdd(0x131)]=_0x57740e;}async['addComment'](_0x3df123){const _0x26a204=_0x63570d;var _0x2b4d6b,_0x3117bd;const {parentId:_0x30e79d,unitId:_0x41cb5e,text:_0x52e81f,threadId:_0x449459}=_0x3df123,_0x27004f=(_0x3117bd=(_0x2b4d6b=_0x52e81f[_0x26a204(0x144)])==null?void 0x0:_0x2b4d6b['filter'](_0x37eea1=>_0x37eea1[_0x26a204(0x13b)]===_0x3a31e9['COMMENT'])[_0x26a204(0x14c)](_0x2c9e09=>_0x2c9e09[_0x26a204(0x163)]))!=null?_0x3117bd:[],_0x480a09=JSON['stringify'](_0x52e81f),_0x95a0cf=(await this[_0x26a204(0x13e)][_0x26a204(0x145)](_0x41cb5e))[_0x26a204(0x11c)]();if(_0x30e79d){const _0x2b88c2={'memberId':_0x95a0cf,'unitId':_0x41cb5e,'content':_0x480a09,'mention':_0x27004f,'threadId':_0x449459},_0x4f0234=(await this[_0x26a204(0x165)][_0x26a204(0x176)]('/universer-api/comment/unit/'+_0x41cb5e+_0x26a204(0x141),{'body':_0x2b88c2}))['body'][_0x26a204(0x121)];return{..._0x3df123,'id':_0x4f0234[_0x26a204(0x168)],'dT':_0x42b0c(+_0x4f0234['createTimestamp'])[_0x26a204(0x160)](_0x26a204(0x16c)),'personId':_0x4f0234['userId']};}else{const _0x5a09e3={'memberId':_0x95a0cf,'unitId':_0x41cb5e,'content':_0x480a09,'mention':_0x27004f},_0x54d251=await this[_0x26a204(0x165)][_0x26a204(0x176)]('/universer-api/comment/unit/'+_0x41cb5e+_0x26a204(0x117),{'body':_0x5a09e3});return te(_0x54d251[_0x26a204(0x16e)]['comment'],_0x3df123);}}async[_0x63570d(0x147)](_0x270076){const _0x91c362=_0x63570d;var _0x160181,_0x63661e;const {text:_0x3ef7b2,unitId:_0x1f7f8e}=_0x270076,_0x121543=(_0x63661e=(_0x160181=_0x3ef7b2[_0x91c362(0x144)])==null?void 0x0:_0x160181[_0x91c362(0x175)](_0x35d264=>_0x35d264[_0x91c362(0x13b)]===_0x3a31e9[_0x91c362(0x125)])[_0x91c362(0x14c)](_0x453b44=>_0x453b44['rangeId']))!=null?_0x63661e:[],_0x3a26ab=JSON[_0x91c362(0x162)](_0x3ef7b2),_0x226524=_0x270076[_0x91c362(0x11a)],_0x3918fa=_0x270076['id'],_0x2c4db4={'memberId':(await this[_0x91c362(0x13e)][_0x91c362(0x145)](_0x1f7f8e))[_0x91c362(0x11c)](),'unitId':_0x1f7f8e,'threadId':_0x226524,'mention':_0x121543,'content':_0x3a26ab,'replyId':_0x3918fa},_0x60c1c9=await this[_0x91c362(0x165)]['post'](_0x91c362(0x159)+_0x1f7f8e+_0x91c362(0x14e),{'body':_0x2c4db4});return!_0x60c1c9[_0x91c362(0x16e)][_0x91c362(0x120)]||_0x60c1c9[_0x91c362(0x16e)]['error']['code']===0x1;}async[_0x63570d(0x130)](_0x31b05e){const _0x523712=_0x63570d,{unitId:_0x170836}=_0x31b05e,_0x594c3b=_0x31b05e[_0x523712(0x11a)],_0x2db0aa={'memberId':this[_0x523712(0x16f)]['getCurrentUser']()[_0x523712(0x122)],'unitId':_0x170836,'threadId':_0x594c3b,'solved':_0x31b05e[_0x523712(0x13a)]?_[_0x523712(0x11b)]:_['OpenOrReOpen']},_0x389201=await this[_0x523712(0x165)][_0x523712(0x176)](_0x523712(0x159)+_0x170836+'/solved',{'body':_0x2db0aa});return!_0x389201[_0x523712(0x16e)][_0x523712(0x120)]||_0x389201[_0x523712(0x16e)][_0x523712(0x120)][_0x523712(0x15b)]===0x1;}async[_0x63570d(0x157)](_0x25c1ec,_0x2b4045,_0x9da2ce,_0x13c1a6){const _0x2cfa80=_0x63570d,_0x133297={'memberId':(await this[_0x2cfa80(0x13e)][_0x2cfa80(0x145)](_0x25c1ec))[_0x2cfa80(0x11c)](),'threadId':_0x9da2ce,'replyId':_0x13c1a6,'unitId':_0x25c1ec},_0x12048d=await this[_0x2cfa80(0x165)][_0x2cfa80(0x176)](_0x2cfa80(0x159)+_0x25c1ec+'/delete',{'body':_0x133297});return!_0x12048d[_0x2cfa80(0x16e)]['error']||_0x12048d['body'][_0x2cfa80(0x120)][_0x2cfa80(0x15b)]===0x1;}async[_0x63570d(0x173)](_0x48ca68,_0x181f13,_0x61c896){const _0x242727=_0x63570d,_0x22ca64={'unitId':_0x48ca68,'threadId':_0x61c896},_0x3aa292=await this['_httpService'][_0x242727(0x176)](_0x242727(0x159)+_0x48ca68+'/list',{'body':_0x22ca64}),_0x398a46=_0x61c896[_0x242727(0x14c)](_0x47a683=>se(_0x3aa292[_0x242727(0x16e)][_0x242727(0x14a)][_0x47a683],_0x48ca68,_0x181f13))[_0x242727(0x175)](Boolean);return Object[_0x242727(0x17a)](_0x3aa292['body'][_0x242727(0x15f)])[_0x242727(0x128)](_0xef35e3=>{const _0x3e0573=_0x242727;this[_0x3e0573(0x16f)]['addUser'](_0xef35e3);}),_0x398a46;}[_0x63570d(0x178)](_0x3910cd){const _0x6686db=_0x63570d;return{'id':_0x3910cd['id'],'threadId':_0x3910cd['threadId'],'ref':_0x3910cd[_0x6686db(0x140)]};}};S=re([f(0x0,_0x2709bb(_0xea1ba2)),f(0x1,_0x2709bb(_0x4f6b05)),f(0x2,_0x2709bb(_0x30c0ac)),f(0x3,_0x2709bb(_0x23178a))],S);var oe=Object[_0x63570d(0x15a)],ne=Object[_0x63570d(0x126)],ie=(_0x10635d,_0xf143ce,_0x3b27ab,_0x5b7dde)=>{const _0x3afa47=_0x63570d;for(var _0x5c2f4d=_0x5b7dde>0x1?void 0x0:_0x5b7dde?ne(_0xf143ce,_0x3b27ab):_0xf143ce,_0x3e2313=_0x10635d[_0x3afa47(0x12e)]-0x1,_0x579934;_0x3e2313>=0x0;_0x3e2313--)(_0x579934=_0x10635d[_0x3e2313])&&(_0x5c2f4d=(_0x5b7dde?_0x579934(_0xf143ce,_0x3b27ab,_0x5c2f4d):_0x579934(_0x5c2f4d))||_0x5c2f4d);return _0x5b7dde&&_0x5c2f4d&&oe(_0xf143ce,_0x3b27ab,_0x5c2f4d),_0x5c2f4d;},M=(_0x617f8d,_0x1c69aa)=>(_0x2b1574,_0x522995)=>_0x1c69aa(_0x2b1574,_0x522995,_0x617f8d);let b=class extends _0x420a79{constructor(_0x2452d4,_0x34eb85){const _0x311081=_0x63570d;super(),this[_0x311081(0x161)]=_0x2452d4,this[_0x311081(0x14d)]=_0x34eb85,this[_0x311081(0x138)]();}[_0x63570d(0x138)](){const _0x5a877d=_0x63570d;this[_0x5a877d(0x161)][_0x5a877d(0x15e)]=this[_0x5a877d(0x14d)],this[_0x5a877d(0x161)][_0x5a877d(0x170)]=!0x1;}};b=ie([M(0x0,_0x256e93),M(0x1,_0x2709bb(S))],b);var $=Object[_0x63570d(0x15a)],ce=Object[_0x63570d(0x126)],ae=(_0x12624f,_0x2b9049,_0x2c4317)=>_0x2b9049 in _0x12624f?$(_0x12624f,_0x2b9049,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c4317}):_0x12624f[_0x2b9049]=_0x2c4317,de=(_0x34aec2,_0x12dbe7,_0x32bc19,_0xc121e0)=>{for(var _0x2fde5e=_0xc121e0>0x1?void 0x0:_0xc121e0?ce(_0x12dbe7,_0x32bc19):_0x12dbe7,_0xda959a=_0x34aec2['length']-0x1,_0x366c53;_0xda959a>=0x0;_0xda959a--)(_0x366c53=_0x34aec2[_0xda959a])&&(_0x2fde5e=(_0xc121e0?_0x366c53(_0x12dbe7,_0x32bc19,_0x2fde5e):_0x366c53(_0x2fde5e))||_0x2fde5e);return _0xc121e0&&_0x2fde5e&&$(_0x12dbe7,_0x32bc19,_0x2fde5e),_0x2fde5e;},N=(_0x8dc6a2,_0x1f77cf)=>(_0x3bc296,_0x4d9df6)=>_0x1f77cf(_0x3bc296,_0x4d9df6,_0x8dc6a2),j=(_0x4df3e8,_0x4353b6,_0x936ae4)=>ae(_0x4df3e8,typeof _0x4353b6!=_0x63570d(0x155)?_0x4353b6+'':_0x4353b6,_0x936ae4);let C=class extends _0x26ca76{constructor(_0x16f3f4=P,_0x39839e,_0x38904e){const _0x3110cf=_0x63570d;super(),this[_0x3110cf(0x179)]=_0x16f3f4,this[_0x3110cf(0x131)]=_0x39839e,this[_0x3110cf(0x118)]=_0x38904e;const {..._0x5190fc}=_0xf4505({},P,this[_0x3110cf(0x179)]);this[_0x3110cf(0x118)][_0x3110cf(0x12a)](X,_0x5190fc);}['onStarting'](){const _0xba53a3=_0x63570d;[[S],[b],[I]][_0xba53a3(0x128)](_0x5d95c0=>{this['_injector']['add'](_0x5d95c0);});}[_0x63570d(0x143)](){const _0x3a98bc=_0x63570d;this[_0x3a98bc(0x131)][_0x3a98bc(0x166)](b),this[_0x3a98bc(0x131)][_0x3a98bc(0x166)](I);}};j(C,_0x63570d(0x16b),B),j(C,'type',_0x5a2d51['UNIVER_UNKNOWN']),C=de([_0x118271(_0x2b304c,_0x561fe5,_0x1cd699),N(0x1,_0x2709bb(_0x23178a)),N(0x2,_0x40b24a)],C);export{C as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x261e27=_0x5ae5;(function(_0x28069f,_0x170b09){const _0x43e99f=_0x5ae5,_0x43bd63=_0x28069f();while(!![]){try{const _0x38fbdd=-parseInt(_0x43e99f(0x1dc))/0x1+parseInt(_0x43e99f(0x1c3))/0x2*(-parseInt(_0x43e99f(0x1ff))/0x3)+-parseInt(_0x43e99f(0x209))/0x4+parseInt(_0x43e99f(0x1c1))/0x5*(parseInt(_0x43e99f(0x1bc))/0x6)+-parseInt(_0x43e99f(0x1ea))/0x7+parseInt(_0x43e99f(0x1fd))/0x8+parseInt(_0x43e99f(0x1eb))/0x9;if(_0x38fbdd===_0x170b09)break;else _0x43bd63['push'](_0x43bd63['shift']());}catch(_0x12d112){_0x43bd63['push'](_0x43bd63['shift']());}}}(_0x1df9,0xee287));import{CommentService as _0x214a9b,CollaborationSessionService as _0x530eba,UniverCollaborationClientPlugin as _0x541e65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x47994c}from'@univerjs-pro/license';import{dayjs as _0x13f5be,UserManagerService as _0x5851a2,Inject as _0x3f6240,Injector as _0x1ccb8a,Disposable as _0x34dba8,CustomRangeType as _0x4bfc54,UniverInstanceType as _0x150667,DependentOn as _0x212ca6,Plugin as _0x248539,merge as _0x4ff709,IConfigService as _0x1a65e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x328c2c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x15862a,IThreadCommentDataSourceService as _0x370691}from'@univerjs/thread-comment';import{bufferTime as _0x18c6da}from'rxjs';import{HTTPService as _0x436005}from'@univerjs/network';const B='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _=(_0x119373=>(_0x119373[_0x119373[_0x261e27(0x1be)]=0x0]=_0x261e27(0x1be),_0x119373[_0x119373['Solved']=0x1]=_0x261e27(0x206),_0x119373[_0x119373['UNRECOGNIZED']=-0x1]=_0x261e27(0x1f4),_0x119373))(_||{}),p=(_0x5f4bf0=>(_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1f6)]=0x0]=_0x261e27(0x1f6),_0x5f4bf0[_0x5f4bf0['Add']=0x1]=_0x261e27(0x20f),_0x5f4bf0[_0x5f4bf0['Reply']=0x2]=_0x261e27(0x1f2),_0x5f4bf0[_0x5f4bf0['Edit']=0x3]=_0x261e27(0x1c8),_0x5f4bf0[_0x5f4bf0[_0x261e27(0x200)]=0x4]=_0x261e27(0x200),_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1da)]=0x5]='Solve',_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1f4)]=-0x1]=_0x261e27(0x1f4),_0x5f4bf0))(p||{});const O=_0x35704f=>_0x13f5be(new Date(+_0x35704f))[_0x261e27(0x1c2)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x462260,_0x2da3e7)=>{const _0xe56c3=_0x261e27,_0x48e4b0=_0x462260[_0xe56c3(0x1de)](_0x5851a2),_0x520cdd=_0x462260[_0xe56c3(0x1de)](_0x436005);_0x2da3e7[_0xe56c3(0x1bf)](_0xcd761b=>{const _0x13b4ea=_0xe56c3;_0x48e4b0[_0x13b4ea(0x203)](_0xcd761b)&&_0x2da3e7[_0x13b4ea(0x1c9)](_0xcd761b);}),_0x2da3e7[_0xe56c3(0x1c4)]&&(await _0x520cdd['get'](_0xe56c3(0x1d3),{'params':{'userIDs':[..._0x2da3e7]}}))[_0xe56c3(0x1d1)][_0xe56c3(0x1e1)]['forEach'](_0x56b83b=>{_0x56b83b&&_0x48e4b0['addUser'](_0x56b83b);});};var V=Object[_0x261e27(0x1fe)],z=Object[_0x261e27(0x1f8)],Q=(_0x3ed310,_0x1a5695,_0x1d572e,_0x55fee8)=>{for(var _0x312f3b=_0x55fee8>0x1?void 0x0:_0x55fee8?z(_0x1a5695,_0x1d572e):_0x1a5695,_0x102dd2=_0x3ed310['length']-0x1,_0x7dba8b;_0x102dd2>=0x0;_0x102dd2--)(_0x7dba8b=_0x3ed310[_0x102dd2])&&(_0x312f3b=(_0x55fee8?_0x7dba8b(_0x1a5695,_0x1d572e,_0x312f3b):_0x7dba8b(_0x312f3b))||_0x312f3b);return _0x55fee8&&_0x312f3b&&V(_0x1a5695,_0x1d572e,_0x312f3b),_0x312f3b;},v=(_0x322512,_0x15932d)=>(_0xcc88b3,_0x60ff4)=>_0x15932d(_0xcc88b3,_0x60ff4,_0x322512);let I=class extends _0x34dba8{constructor(_0x2fca3c,_0x14bc14,_0x53ad22,_0x1af711){const _0xa23af2=_0x261e27;super(),this['_commentService']=_0x2fca3c,this['_threadCommentModel']=_0x14bc14,this[_0xa23af2(0x1cd)]=_0x53ad22,this[_0xa23af2(0x212)]=_0x1af711,this['_init'](),this[_0xa23af2(0x1f0)]();}[_0x261e27(0x1f0)](){const _0x27fb17=_0x261e27;this[_0x27fb17(0x20b)](this['_threadCommentModel'][_0x27fb17(0x216)]['pipe'](_0x18c6da(0x10))['subscribe'](_0x39eef9=>{const _0x1debfd=_0x27fb17,_0x376710=new Set();_0x39eef9[_0x1debfd(0x1bf)](_0x5b75c8=>{const _0x43bf02=_0x1debfd;switch(_0x5b75c8['type']){case _0x43bf02(0x1ec):{const _0x269682=_0x5b75c8['payload'][_0x43bf02(0x1fb)];_0x376710[_0x43bf02(0x1ec)](_0x269682);break;}}}),K(this['_injector'],_0x376710);}));}['_init'](){const _0x1d3ee9=_0x261e27;this[_0x1d3ee9(0x20b)](this[_0x1d3ee9(0x1e7)][_0x1d3ee9(0x216)][_0x1d3ee9(0x215)](async _0x3d80c7=>{const _0x545c47=_0x1d3ee9;var _0x2ba4fc,_0x1cc097,_0xe509d8,_0x8692c2;const _0x189507=(_0x2ba4fc=this[_0x545c47(0x20a)]['getUnit'](_0x3d80c7[_0x545c47(0x20d)])[_0x545c47(0x1d8)](_0x463595=>_0x463595[_0x545c47(0x1df)]===_0x3d80c7[_0x545c47(0x1df)]))==null?void 0x0:_0x2ba4fc[_0x545c47(0x1c7)];if(!_0x189507)return;const {unitId:_0xaa40f4,subUnitId:_0x31a9cd}=_0x189507;switch(_0x3d80c7[_0x545c47(0x20e)]&&this['_userService'][_0x545c47(0x1e3)](_0x3d80c7['user']),_0x3d80c7[_0x545c47(0x1cf)]){case p[_0x545c47(0x20f)]:break;case p[_0x545c47(0x1f2)]:{this[_0x545c47(0x20a)][_0x545c47(0x1d7)](_0xaa40f4,_0x31a9cd,{'unitId':_0xaa40f4,'subUnitId':_0x31a9cd,'ref':'','id':_0x3d80c7[_0x545c47(0x1c0)],'dT':O(+_0x3d80c7[_0x545c47(0x1c6)]),'threadId':_0x3d80c7[_0x545c47(0x1df)],'personId':(_0xe509d8=(_0x1cc097=_0x3d80c7[_0x545c47(0x20e)])==null?void 0x0:_0x1cc097['userID'])!=null?_0xe509d8:_0x3d80c7['userId'],'text':JSON['parse'](_0x3d80c7[_0x545c47(0x205)]),'parentId':_0x189507['id']});break;}case p['Delete']:{const _0xa734e3=this[_0x545c47(0x20a)][_0x545c47(0x1e5)](_0xaa40f4,_0x31a9cd,_0x3d80c7[_0x545c47(0x1c0)]);_0xa734e3&&_0xa734e3[_0x545c47(0x208)]&&this[_0x545c47(0x20a)][_0x545c47(0x1f9)](_0xaa40f4,_0x31a9cd,_0x3d80c7[_0x545c47(0x1c0)]);break;}case p['Edit']:{this[_0x545c47(0x20a)][_0x545c47(0x211)](_0xaa40f4,_0x31a9cd,{'commentId':_0x3d80c7[_0x545c47(0x1c0)],'text':JSON[_0x545c47(0x1f3)](_0x3d80c7['content'])});break;}case p[_0x545c47(0x1da)]:{const _0x11c031=(_0x8692c2=this[_0x545c47(0x20a)][_0x545c47(0x1b7)](_0x3d80c7[_0x545c47(0x20d)])['find'](_0x5ab41f=>_0x5ab41f[_0x545c47(0x1df)]===_0x3d80c7['threadId']))==null?void 0x0:_0x8692c2[_0x545c47(0x1c7)];_0x11c031&&this['_threadCommentModel'][_0x545c47(0x1e2)](_0xaa40f4,_0x31a9cd,_0x11c031['id'],_0x3d80c7[_0x545c47(0x1bd)]===_[_0x545c47(0x206)]);break;}}}));}};I=Q([v(0x0,_0x3f6240(_0x214a9b)),v(0x1,_0x3f6240(_0x15862a)),v(0x2,_0x3f6240(_0x5851a2)),v(0x3,_0x3f6240(_0x1ccb8a))],I);const X=_0x261e27(0x1fc),P={};var k=Object[_0x261e27(0x1fe)],ee=Object['getOwnPropertyDescriptor'],re=(_0x1c9595,_0x12ae47,_0x205b56,_0xbb3cd3)=>{const _0x49cbeb=_0x261e27;for(var _0x5dd5f5=_0xbb3cd3>0x1?void 0x0:_0xbb3cd3?ee(_0x12ae47,_0x205b56):_0x12ae47,_0x5b2aad=_0x1c9595[_0x49cbeb(0x1d4)]-0x1,_0x46513f;_0x5b2aad>=0x0;_0x5b2aad--)(_0x46513f=_0x1c9595[_0x5b2aad])&&(_0x5dd5f5=(_0xbb3cd3?_0x46513f(_0x12ae47,_0x205b56,_0x5dd5f5):_0x46513f(_0x5dd5f5))||_0x5dd5f5);return _0xbb3cd3&&_0x5dd5f5&&k(_0x12ae47,_0x205b56,_0x5dd5f5),_0x5dd5f5;},f=(_0xa352e9,_0x26ec19)=>(_0x52eb01,_0x334819)=>_0x26ec19(_0x52eb01,_0x334819,_0xa352e9);function te(_0x554655,_0x3d69ca){const _0x5336de=_0x261e27,_0x141cda=_0x554655[_0x5336de(0x1ed)][0x0];return{..._0x3d69ca,'id':_0x141cda['replyId'],'resolved':_0x554655[_0x5336de(0x1bd)]===0x1,'dT':O(_0x141cda['createTimestamp']),'personId':_0x141cda[_0x5336de(0x1d2)],'threadId':_0x141cda['threadId']};}function se(_0x3d88e4,_0x1c94ba,_0x7d88cc){const _0x12462d=_0x261e27;var _0x44245e,_0x1e18c4;if(((_0x1e18c4=(_0x44245e=_0x3d88e4==null?void 0x0:_0x3d88e4[_0x12462d(0x1ed)])==null?void 0x0:_0x44245e[_0x12462d(0x1d4)])!=null?_0x1e18c4:0x0)>0x0){const _0x3f25f4=(_0xae3a43,_0x40f84f)=>({'id':_0xae3a43[_0x12462d(0x1c0)],'threadId':_0xae3a43[_0x12462d(0x1df)],'dT':O(_0xae3a43[_0x12462d(0x1c6)]),'personId':_0xae3a43[_0x12462d(0x1d2)],'resolved':_0x3d88e4[_0x12462d(0x1bd)]===_[_0x12462d(0x206)],'unitId':_0x1c94ba,'subUnitId':_0x7d88cc,'text':JSON[_0x12462d(0x1f3)](_0xae3a43[_0x12462d(0x205)]),'parentId':_0x40f84f}),_0x5489c2=_0x3f25f4(_0x3d88e4['replies'][0x0]);return{..._0x5489c2,'children':_0x3d88e4[_0x12462d(0x1ed)]['slice'](0x1)[_0x12462d(0x207)](_0x17c027=>_0x3f25f4(_0x17c027,_0x5489c2['id']))};}return null;}let S=class{constructor(_0x36aaad,_0x49e796,_0x1324bc,_0x2b05b9){const _0x479399=_0x261e27;this['_httpService']=_0x36aaad,this[_0x479399(0x1cd)]=_0x49e796,this[_0x479399(0x1e8)]=_0x1324bc,this[_0x479399(0x212)]=_0x2b05b9;}async[_0x261e27(0x1d7)](_0x34f383){const _0x35434a=_0x261e27;var _0xb4847e,_0x4cb071;const {parentId:_0x10bed9,unitId:_0x2d3d2a,text:_0x49d0f3,threadId:_0x5ddf98}=_0x34f383,_0xc0f122=(_0x4cb071=(_0xb4847e=_0x49d0f3[_0x35434a(0x1ce)])==null?void 0x0:_0xb4847e[_0x35434a(0x1b8)](_0x44ab66=>_0x44ab66['rangeType']===_0x4bfc54[_0x35434a(0x201)])[_0x35434a(0x207)](_0x120f4a=>_0x120f4a[_0x35434a(0x1ef)]))!=null?_0x4cb071:[],_0x432f22=JSON[_0x35434a(0x1cc)](_0x49d0f3),_0xe2307d=(await this[_0x35434a(0x1e8)][_0x35434a(0x1f7)](_0x2d3d2a))['getMemberID']();if(_0x10bed9){const _0x142d58={'memberId':_0xe2307d,'unitId':_0x2d3d2a,'content':_0x432f22,'mention':_0xc0f122,'threadId':_0x5ddf98},_0x4a165b=(await this[_0x35434a(0x1ba)][_0x35434a(0x1d9)](_0x35434a(0x1b9)+_0x2d3d2a+_0x35434a(0x204),{'body':_0x142d58}))['body'][_0x35434a(0x1f1)];return{..._0x34f383,'id':_0x4a165b[_0x35434a(0x1c0)],'dT':_0x13f5be(+_0x4a165b[_0x35434a(0x1c6)])[_0x35434a(0x1c2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4a165b[_0x35434a(0x1d2)]};}else{const _0x30704b={'memberId':_0xe2307d,'unitId':_0x2d3d2a,'content':_0x432f22,'mention':_0xc0f122},_0xe21ed0=await this['_httpService'][_0x35434a(0x1d9)](_0x35434a(0x1b9)+_0x2d3d2a+'/add',{'body':_0x30704b});return te(_0xe21ed0[_0x35434a(0x1d1)][_0x35434a(0x1e0)],_0x34f383);}}async['updateComment'](_0x3818d0){const _0x38d53d=_0x261e27;var _0x198a0e,_0x4918be;const {text:_0x5d6aa5,unitId:_0x41a555}=_0x3818d0,_0x5162b9=(_0x4918be=(_0x198a0e=_0x5d6aa5['customRanges'])==null?void 0x0:_0x198a0e[_0x38d53d(0x1b8)](_0x43be30=>_0x43be30[_0x38d53d(0x1b6)]===_0x4bfc54[_0x38d53d(0x201)])[_0x38d53d(0x207)](_0xfca7d3=>_0xfca7d3[_0x38d53d(0x1ef)]))!=null?_0x4918be:[],_0x47d493=JSON['stringify'](_0x5d6aa5),_0x279326=_0x3818d0[_0x38d53d(0x1df)],_0x3b9749=_0x3818d0['id'],_0x4f9a9c={'memberId':(await this['_sessionService']['requireSession'](_0x41a555))['getMemberID'](),'unitId':_0x41a555,'threadId':_0x279326,'mention':_0x5162b9,'content':_0x47d493,'replyId':_0x3b9749},_0x4ec280=await this[_0x38d53d(0x1ba)][_0x38d53d(0x1d9)](_0x38d53d(0x1b9)+_0x41a555+'/edit',{'body':_0x4f9a9c});return!_0x4ec280[_0x38d53d(0x1d1)]['error']||_0x4ec280['body'][_0x38d53d(0x1d5)][_0x38d53d(0x1ca)]===0x1;}async[_0x261e27(0x1e2)](_0x5952c9){const _0x564023=_0x261e27,{unitId:_0x26bcf1}=_0x5952c9,_0x4b8408=_0x5952c9[_0x564023(0x1df)],_0x2d679f={'memberId':this[_0x564023(0x1cd)]['getCurrentUser']()['userID'],'unitId':_0x26bcf1,'threadId':_0x4b8408,'solved':_0x5952c9[_0x564023(0x1e6)]?_[_0x564023(0x206)]:_[_0x564023(0x1be)]},_0x1eff10=await this[_0x564023(0x1ba)][_0x564023(0x1d9)](_0x564023(0x1b9)+_0x26bcf1+_0x564023(0x213),{'body':_0x2d679f});return!_0x1eff10[_0x564023(0x1d1)]['error']||_0x1eff10[_0x564023(0x1d1)][_0x564023(0x1d5)][_0x564023(0x1ca)]===0x1;}async[_0x261e27(0x1f9)](_0x2d7f3f,_0x42c594,_0x10f389,_0x26fa37){const _0x51dadf=_0x261e27,_0x50a15e={'memberId':(await this['_sessionService']['requireSession'](_0x2d7f3f))[_0x51dadf(0x1fa)](),'threadId':_0x10f389,'replyId':_0x26fa37,'unitId':_0x2d7f3f},_0x281e07=await this['_httpService'][_0x51dadf(0x1d9)](_0x51dadf(0x1b9)+_0x2d7f3f+'/delete',{'body':_0x50a15e});return!_0x281e07[_0x51dadf(0x1d1)][_0x51dadf(0x1d5)]||_0x281e07[_0x51dadf(0x1d1)][_0x51dadf(0x1d5)][_0x51dadf(0x1ca)]===0x1;}async[_0x261e27(0x202)](_0x39500e,_0x3548f8,_0x6e359e){const _0x1c3fcf=_0x261e27,_0x1abbda={'unitId':_0x39500e,'threadId':_0x6e359e},_0x55301f=await this[_0x1c3fcf(0x1ba)][_0x1c3fcf(0x1d9)](_0x1c3fcf(0x1b9)+_0x39500e+_0x1c3fcf(0x1ee),{'body':_0x1abbda}),_0xaf6729=_0x6e359e[_0x1c3fcf(0x207)](_0x31990f=>se(_0x55301f['body'][_0x1c3fcf(0x210)][_0x31990f],_0x39500e,_0x3548f8))['filter'](Boolean);return Object[_0x1c3fcf(0x1f5)](_0x55301f[_0x1c3fcf(0x1d1)][_0x1c3fcf(0x1e1)])[_0x1c3fcf(0x1bf)](_0x16435d=>{const _0x3c5a5e=_0x1c3fcf;this['_userService'][_0x3c5a5e(0x1e3)](_0x16435d);}),_0xaf6729;}['saveCommentToSnapshot'](_0x54db61){const _0x52cf28=_0x261e27;return{'id':_0x54db61['id'],'threadId':_0x54db61[_0x52cf28(0x1df)],'ref':_0x54db61['ref']};}};function _0x5ae5(_0x565684,_0x5f16e0){const _0x1df971=_0x1df9();return _0x5ae5=function(_0x5ae5ed,_0x1ddb88){_0x5ae5ed=_0x5ae5ed-0x1b5;let _0x55051e=_0x1df971[_0x5ae5ed];return _0x55051e;},_0x5ae5(_0x565684,_0x5f16e0);}function _0x1df9(){const _0x482137=['_commentService','_sessionService','syncUpdateMutationToColla','7188335tEnOCk','35670762hGKrHi','add','replies','/list','rangeId','_initUserSync','reply','Reply','parse','UNRECOGNIZED','values','Unknown','requireSession','getOwnPropertyDescriptor','deleteComment','getMemberID','personId','thread-comment-data-source.config','5117016UdgBMn','defineProperty','1734534gVKhSW','Delete','COMMENT','listComments','getUser','/reply','content','Solved','map','parentId','3244984kwsTgH','_threadCommentModel','disposeWithMe','_initDataSource','unitId','user','Add','comments','updateComment','_injector','/solved','_configService','subscribe','commentUpdate$','setConfig','rangeType','getUnit','filter','/universer-api/comment/unit/','_httpService','_config','5743902XMjdZG','solved','OpenOrReOpen','forEach','replyId','5lQldFr','format','4PTTkTm','size','onStarting','createTimestamp','root','Edit','delete','code','UNIVER_UNKNOWN','stringify','_userService','customRanges','type','pluginName','body','userId','/universer-api/user/list','length','error','_threadCommentDataSourceService','addComment','find','post','Solve','dataSource','1590360DCWUvn','_threadCommentDataSource','get','threadId','comment','users','resolveComment','addUser','onReady','getComment','resolved'];_0x1df9=function(){return _0x482137;};return _0x1df9();}S=re([f(0x0,_0x3f6240(_0x436005)),f(0x1,_0x3f6240(_0x5851a2)),f(0x2,_0x3f6240(_0x530eba)),f(0x3,_0x3f6240(_0x1ccb8a))],S);var oe=Object[_0x261e27(0x1fe)],ne=Object[_0x261e27(0x1f8)],ie=(_0x4b7345,_0x3e33a6,_0x54feb4,_0x2310a3)=>{for(var _0x58b801=_0x2310a3>0x1?void 0x0:_0x2310a3?ne(_0x3e33a6,_0x54feb4):_0x3e33a6,_0x2aba7a=_0x4b7345['length']-0x1,_0x3ad9c9;_0x2aba7a>=0x0;_0x2aba7a--)(_0x3ad9c9=_0x4b7345[_0x2aba7a])&&(_0x58b801=(_0x2310a3?_0x3ad9c9(_0x3e33a6,_0x54feb4,_0x58b801):_0x3ad9c9(_0x58b801))||_0x58b801);return _0x2310a3&&_0x58b801&&oe(_0x3e33a6,_0x54feb4,_0x58b801),_0x58b801;},M=(_0x50e543,_0x2dc905)=>(_0x15e699,_0x3b4303)=>_0x2dc905(_0x15e699,_0x3b4303,_0x50e543);let b=class extends _0x34dba8{constructor(_0x4c0e5a,_0x45f73c){const _0x17ba29=_0x261e27;super(),this['_threadCommentDataSourceService']=_0x4c0e5a,this['_threadCommentDataSource']=_0x45f73c,this[_0x17ba29(0x20c)]();}[_0x261e27(0x20c)](){const _0x3a3d1d=_0x261e27;this[_0x3a3d1d(0x1d6)][_0x3a3d1d(0x1db)]=this[_0x3a3d1d(0x1dd)],this[_0x3a3d1d(0x1d6)][_0x3a3d1d(0x1e9)]=!0x1;}};b=ie([M(0x0,_0x370691),M(0x1,_0x3f6240(S))],b);var $=Object[_0x261e27(0x1fe)],ce=Object[_0x261e27(0x1f8)],ae=(_0x4c79e9,_0x35e02d,_0x4a5d9d)=>_0x35e02d in _0x4c79e9?$(_0x4c79e9,_0x35e02d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a5d9d}):_0x4c79e9[_0x35e02d]=_0x4a5d9d,de=(_0x1f75c0,_0x421fb0,_0x16f65e,_0x5a8253)=>{const _0x1b56dd=_0x261e27;for(var _0x375b1b=_0x5a8253>0x1?void 0x0:_0x5a8253?ce(_0x421fb0,_0x16f65e):_0x421fb0,_0x113551=_0x1f75c0[_0x1b56dd(0x1d4)]-0x1,_0x2401a9;_0x113551>=0x0;_0x113551--)(_0x2401a9=_0x1f75c0[_0x113551])&&(_0x375b1b=(_0x5a8253?_0x2401a9(_0x421fb0,_0x16f65e,_0x375b1b):_0x2401a9(_0x375b1b))||_0x375b1b);return _0x5a8253&&_0x375b1b&&$(_0x421fb0,_0x16f65e,_0x375b1b),_0x375b1b;},N=(_0x4226f7,_0x30fcf8)=>(_0x3d4f6b,_0x49f92d)=>_0x30fcf8(_0x3d4f6b,_0x49f92d,_0x4226f7),j=(_0x412fa7,_0x5785c2,_0x449334)=>ae(_0x412fa7,typeof _0x5785c2!='symbol'?_0x5785c2+'':_0x5785c2,_0x449334);let C=class extends _0x248539{constructor(_0x8b7fd6=P,_0x24c70c,_0x207a61){const _0x19a3e2=_0x261e27;super(),this[_0x19a3e2(0x1bb)]=_0x8b7fd6,this['_injector']=_0x24c70c,this[_0x19a3e2(0x214)]=_0x207a61;const {..._0x2a012d}=_0x4ff709({},P,this[_0x19a3e2(0x1bb)]);this[_0x19a3e2(0x214)][_0x19a3e2(0x1b5)](X,_0x2a012d);}[_0x261e27(0x1c5)](){const _0x3825d1=_0x261e27;[[S],[b],[I]][_0x3825d1(0x1bf)](_0x291470=>{const _0x238bc6=_0x3825d1;this[_0x238bc6(0x212)][_0x238bc6(0x1ec)](_0x291470);});}[_0x261e27(0x1e4)](){const _0xfe78f4=_0x261e27;this[_0xfe78f4(0x212)][_0xfe78f4(0x1de)](b),this[_0xfe78f4(0x212)]['get'](I);}};j(C,_0x261e27(0x1d0),B),j(C,_0x261e27(0x1cf),_0x150667[_0x261e27(0x1cb)]),C=de([_0x212ca6(_0x328c2c,_0x541e65,_0x47994c),N(0x1,_0x3f6240(_0x1ccb8a)),N(0x2,_0x1a65e)],C);export{C as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x26c4(){const _0x186c58=['length','_initDataSource','post','users','listComments','format','UniverNetwork','_httpService','type','Solve','UniverThreadComment','UNRECOGNIZED','user','@univerjs/core','COMMENT','error','_injector','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','311624FbFUeW','getComment','30vVuCuL','UniverThreadCommentUi','merge','solved','@univerjs/network','map','deleteComment','reply','forEach','threadId','Inject','requireSession','OpenOrReOpen','Add','5051abohrn','UNIVER_UNKNOWN','/solved','symbol','/reply','CommentService','comment','body','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','updateComment','delete','_initUserSync','Module','_init','customRanges','Reply','object','getUnit','exports','50uDCLdL','getUser','236RJNOPO','UniverProCollaborationClient','_threadCommentDataSource','Delete','pluginName','_configService','_threadCommentDataSourceService','resolveComment','replyId','rxjs','find','syncUpdateMutationToColla','Unknown','function','Edit','1410543EqmgHB','Plugin','createTimestamp','DependentOn','_threadCommentModel','defineProperty','dayjs','code','247248STkCcv','parentId','_config','@univerjs-pro/license','size','31152957xqBrPv','@univerjs-pro/collaboration-client','content','40lRRDUL','amd','UniverThreadCommentUIPlugin','314734wvzfYi','filter','root','_userService','_sessionService','rangeId','@univerjs/thread-comment','parse','dataSource','add','addComment','replies','stringify','userID','get','commentUpdate$','userId','@univerjs/thread-comment-ui','toStringTag','Solved','rangeType','CustomRangeType','CollaborationSessionService','getOwnPropertyDescriptor','/add','getCurrentUser','resolved','onReady','slice','getMemberID','addUser','unitId','Injector','values','pipe','saveCommentToSnapshot','comments','Disposable','bufferTime','onStarting','391356soTjyk','UserManagerService','ref','UniverInstanceType'];_0x26c4=function(){return _0x186c58;};return _0x26c4();}function _0x53a4(_0x365d08,_0x2249a4){const _0x26c41b=_0x26c4();return _0x53a4=function(_0x53a4bd,_0x2a4c71){_0x53a4bd=_0x53a4bd-0x96;let _0x2206cf=_0x26c41b[_0x53a4bd];return _0x2206cf;},_0x53a4(_0x365d08,_0x2249a4);}(function(_0x543a4f,_0x32b046){const _0x3e6d0a=_0x53a4,_0x3d53e8=_0x543a4f();while(!![]){try{const _0x590279=-parseInt(_0x3e6d0a(0xb2))/0x1*(parseInt(_0x3e6d0a(0xc8))/0x2)+-parseInt(_0x3e6d0a(0x112))/0x3+parseInt(_0x3e6d0a(0xa2))/0x4*(-parseInt(_0x3e6d0a(0xc6))/0x5)+-parseInt(_0x3e6d0a(0xa4))/0x6*(parseInt(_0x3e6d0a(0xea))/0x7)+parseInt(_0x3e6d0a(0xdf))/0x8+parseInt(_0x3e6d0a(0xd7))/0x9*(-parseInt(_0x3e6d0a(0xe7))/0xa)+parseInt(_0x3e6d0a(0xe4))/0xb;if(_0x590279===_0x32b046)break;else _0x3d53e8['push'](_0x3d53e8['shift']());}catch(_0xcf3f82){_0x3d53e8['push'](_0x3d53e8['shift']());}}}(_0x26c4,0x7b791),function(_0x59a7c1,_0x5dbc19){const _0x2b7432=_0x53a4;typeof exports==_0x2b7432(0xc3)&&typeof module<'u'?_0x5dbc19(exports,require(_0x2b7432(0xe5)),require(_0x2b7432(0xe2)),require(_0x2b7432(0x9c)),require(_0x2b7432(0xfb)),require(_0x2b7432(0xf0)),require(_0x2b7432(0xd1)),require(_0x2b7432(0xa8))):typeof define==_0x2b7432(0xd5)&&define[_0x2b7432(0xe8)]?define([_0x2b7432(0xc5),_0x2b7432(0xe5),_0x2b7432(0xe2),_0x2b7432(0x9c),_0x2b7432(0xfb),_0x2b7432(0xf0),_0x2b7432(0xd1),_0x2b7432(0xa8)],_0x5dbc19):(_0x59a7c1=typeof globalThis<'u'?globalThis:_0x59a7c1||self,_0x5dbc19(_0x59a7c1['UniverProThreadCommentDatasource']={},_0x59a7c1[_0x2b7432(0xc9)],_0x59a7c1['UniverProLicense'],_0x59a7c1['UniverCore'],_0x59a7c1[_0x2b7432(0xa5)],_0x59a7c1[_0x2b7432(0x99)],_0x59a7c1[_0x2b7432(0xd1)],_0x59a7c1[_0x2b7432(0x11c)]));}(this,function(_0x31e174,_0x5e398e,_0x43f458,_0x34129a,_0x1289e4,_0x31a41f,_0x26cc7c,_0xdcfeb){'use strict';const _0x4ca202=_0x53a4;const _0x360381='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x590ae6=(_0xa8e549=>(_0xa8e549[_0xa8e549[_0x4ca202(0xb0)]=0x0]=_0x4ca202(0xb0),_0xa8e549[_0xa8e549[_0x4ca202(0xfd)]=0x1]=_0x4ca202(0xfd),_0xa8e549[_0xa8e549[_0x4ca202(0x9a)]=-0x1]=_0x4ca202(0x9a),_0xa8e549))(_0x590ae6||{}),_0xc3b91a=(_0x16ed26=>(_0x16ed26[_0x16ed26['Unknown']=0x0]=_0x4ca202(0xd4),_0x16ed26[_0x16ed26[_0x4ca202(0xb1)]=0x1]=_0x4ca202(0xb1),_0x16ed26[_0x16ed26[_0x4ca202(0xc2)]=0x2]='Reply',_0x16ed26[_0x16ed26[_0x4ca202(0xd6)]=0x3]=_0x4ca202(0xd6),_0x16ed26[_0x16ed26[_0x4ca202(0xcb)]=0x4]='Delete',_0x16ed26[_0x16ed26[_0x4ca202(0x98)]=0x5]='Solve',_0x16ed26[_0x16ed26[_0x4ca202(0x9a)]=-0x1]=_0x4ca202(0x9a),_0x16ed26))(_0xc3b91a||{});const _0x119108=_0x2283a2=>_0x34129a[_0x4ca202(0xdd)](new Date(+_0x2283a2))[_0x4ca202(0x11b)](_0x4ca202(0xba)),_0x282b2f=async(_0x50dec0,_0x3aff8b)=>{const _0x510cb9=_0x4ca202,_0x20da09=_0x50dec0[_0x510cb9(0xf8)](_0x34129a['UserManagerService']),_0x3c660=_0x50dec0[_0x510cb9(0xf8)](_0xdcfeb['HTTPService']);_0x3aff8b[_0x510cb9(0xac)](_0x1a3b2e=>{const _0x176315=_0x510cb9;_0x20da09[_0x176315(0xc7)](_0x1a3b2e)&&_0x3aff8b[_0x176315(0xbd)](_0x1a3b2e);}),_0x3aff8b[_0x510cb9(0xe3)]&&(await _0x3c660[_0x510cb9(0xf8)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3aff8b]}}))['body']['users'][_0x510cb9(0xac)](_0x22664b=>{const _0x2adc2a=_0x510cb9;_0x22664b&&_0x20da09[_0x2adc2a(0x108)](_0x22664b);});};var _0x659eb5=Object[_0x4ca202(0xdc)],_0x380949=Object[_0x4ca202(0x101)],_0x755d5=(_0xeb45ba,_0x363d82,_0x9e5bf5,_0x12f85e)=>{const _0x336fc5=_0x4ca202;for(var _0x3976a7=_0x12f85e>0x1?void 0x0:_0x12f85e?_0x380949(_0x363d82,_0x9e5bf5):_0x363d82,_0x23f588=_0xeb45ba[_0x336fc5(0x116)]-0x1,_0x294e50;_0x23f588>=0x0;_0x23f588--)(_0x294e50=_0xeb45ba[_0x23f588])&&(_0x3976a7=(_0x12f85e?_0x294e50(_0x363d82,_0x9e5bf5,_0x3976a7):_0x294e50(_0x3976a7))||_0x3976a7);return _0x12f85e&&_0x3976a7&&_0x659eb5(_0x363d82,_0x9e5bf5,_0x3976a7),_0x3976a7;},_0x43758e=(_0x488738,_0x1f504c)=>(_0x4a6ceb,_0x5ce1da)=>_0x1f504c(_0x4a6ceb,_0x5ce1da,_0x488738);let _0xf1f3ab=class extends _0x34129a[_0x4ca202(0x10f)]{constructor(_0x1ed309,_0x79ae5,_0x18eea4,_0x54ab13){const _0x29df62=_0x4ca202;super(),this['_commentService']=_0x1ed309,this[_0x29df62(0xdb)]=_0x79ae5,this[_0x29df62(0xed)]=_0x18eea4,this[_0x29df62(0x9f)]=_0x54ab13,this[_0x29df62(0xc0)](),this[_0x29df62(0xbe)]();}[_0x4ca202(0xbe)](){const _0xca6e75=_0x4ca202;this['disposeWithMe'](this['_threadCommentModel'][_0xca6e75(0xf9)][_0xca6e75(0x10c)](_0x26cc7c[_0xca6e75(0x110)](0x10))['subscribe'](_0x59b076=>{const _0x25ba14=_0xca6e75,_0x2a6451=new Set();_0x59b076[_0x25ba14(0xac)](_0x4adf85=>{const _0x3adcef=_0x25ba14;switch(_0x4adf85[_0x3adcef(0x97)]){case _0x3adcef(0xf3):{const _0x3fc493=_0x4adf85['payload']['personId'];_0x2a6451[_0x3adcef(0xf3)](_0x3fc493);break;}}}),_0x282b2f(this[_0x25ba14(0x9f)],_0x2a6451);}));}['_init'](){const _0x45fa89=_0x4ca202;this['disposeWithMe'](this['_commentService'][_0x45fa89(0xf9)]['subscribe'](async _0x4ddf2f=>{const _0x580bb8=_0x45fa89;var _0x6e73b1,_0x4e41b1,_0x4c2ef2,_0x11274e;const _0x55db20=(_0x6e73b1=this['_threadCommentModel'][_0x580bb8(0xc4)](_0x4ddf2f[_0x580bb8(0x109)])[_0x580bb8(0xd2)](_0x41eb44=>_0x41eb44[_0x580bb8(0xad)]===_0x4ddf2f[_0x580bb8(0xad)]))==null?void 0x0:_0x6e73b1[_0x580bb8(0xec)];if(!_0x55db20)return;const {unitId:_0x14b2a7,subUnitId:_0x1474c5}=_0x55db20;switch(_0x4ddf2f[_0x580bb8(0x9b)]&&this['_userService']['addUser'](_0x4ddf2f['user']),_0x4ddf2f[_0x580bb8(0x97)]){case _0xc3b91a['Add']:break;case _0xc3b91a['Reply']:{this[_0x580bb8(0xdb)][_0x580bb8(0xf4)](_0x14b2a7,_0x1474c5,{'unitId':_0x14b2a7,'subUnitId':_0x1474c5,'ref':'','id':_0x4ddf2f[_0x580bb8(0xd0)],'dT':_0x119108(+_0x4ddf2f[_0x580bb8(0xd9)]),'threadId':_0x4ddf2f[_0x580bb8(0xad)],'personId':(_0x4c2ef2=(_0x4e41b1=_0x4ddf2f[_0x580bb8(0x9b)])==null?void 0x0:_0x4e41b1[_0x580bb8(0xf7)])!=null?_0x4c2ef2:_0x4ddf2f[_0x580bb8(0xfa)],'text':JSON[_0x580bb8(0xf1)](_0x4ddf2f['content']),'parentId':_0x55db20['id']});break;}case _0xc3b91a[_0x580bb8(0xcb)]:{const _0x122107=this['_threadCommentModel'][_0x580bb8(0xa3)](_0x14b2a7,_0x1474c5,_0x4ddf2f[_0x580bb8(0xd0)]);_0x122107&&_0x122107[_0x580bb8(0xe0)]&&this[_0x580bb8(0xdb)][_0x580bb8(0xaa)](_0x14b2a7,_0x1474c5,_0x4ddf2f[_0x580bb8(0xd0)]);break;}case _0xc3b91a[_0x580bb8(0xd6)]:{this['_threadCommentModel'][_0x580bb8(0xbc)](_0x14b2a7,_0x1474c5,{'commentId':_0x4ddf2f[_0x580bb8(0xd0)],'text':JSON[_0x580bb8(0xf1)](_0x4ddf2f[_0x580bb8(0xe6)])});break;}case _0xc3b91a[_0x580bb8(0x98)]:{const _0xc465e=(_0x11274e=this['_threadCommentModel']['getUnit'](_0x4ddf2f[_0x580bb8(0x109)])[_0x580bb8(0xd2)](_0x55a2cb=>_0x55a2cb[_0x580bb8(0xad)]===_0x4ddf2f['threadId']))==null?void 0x0:_0x11274e['root'];_0xc465e&&this[_0x580bb8(0xdb)][_0x580bb8(0xcf)](_0x14b2a7,_0x1474c5,_0xc465e['id'],_0x4ddf2f['solved']===_0x590ae6['Solved']);break;}}}));}};_0xf1f3ab=_0x755d5([_0x43758e(0x0,_0x34129a[_0x4ca202(0xae)](_0x5e398e[_0x4ca202(0xb7)])),_0x43758e(0x1,_0x34129a[_0x4ca202(0xae)](_0x31a41f['ThreadCommentModel'])),_0x43758e(0x2,_0x34129a[_0x4ca202(0xae)](_0x34129a[_0x4ca202(0x113)])),_0x43758e(0x3,_0x34129a['Inject'](_0x34129a[_0x4ca202(0x10a)]))],_0xf1f3ab);const _0x16f556='thread-comment-data-source.config',_0x15cb4f={};var _0x52e0e1=Object['defineProperty'],_0x1ac9d6=Object[_0x4ca202(0x101)],_0x2b652b=(_0x3d68db,_0x2968b0,_0x471694,_0x55296a)=>{for(var _0xd42ee3=_0x55296a>0x1?void 0x0:_0x55296a?_0x1ac9d6(_0x2968b0,_0x471694):_0x2968b0,_0x15c412=_0x3d68db['length']-0x1,_0x24e1df;_0x15c412>=0x0;_0x15c412--)(_0x24e1df=_0x3d68db[_0x15c412])&&(_0xd42ee3=(_0x55296a?_0x24e1df(_0x2968b0,_0x471694,_0xd42ee3):_0x24e1df(_0xd42ee3))||_0xd42ee3);return _0x55296a&&_0xd42ee3&&_0x52e0e1(_0x2968b0,_0x471694,_0xd42ee3),_0xd42ee3;},_0x5c1602=(_0x5d58c2,_0x2f9243)=>(_0x39eec4,_0x2c349e)=>_0x2f9243(_0x39eec4,_0x2c349e,_0x5d58c2);function _0x27dfc5(_0x3dacb6,_0xb51878){const _0x247d14=_0x4ca202,_0x1f13d2=_0x3dacb6[_0x247d14(0xf5)][0x0];return{..._0xb51878,'id':_0x1f13d2[_0x247d14(0xd0)],'resolved':_0x3dacb6[_0x247d14(0xa7)]===0x1,'dT':_0x119108(_0x1f13d2[_0x247d14(0xd9)]),'personId':_0x1f13d2[_0x247d14(0xfa)],'threadId':_0x1f13d2['threadId']};}function _0x12d2aa(_0x5b1719,_0x5100f6,_0x40ee5a){const _0x44fea0=_0x4ca202;var _0x2b5289,_0x219ab8;if(((_0x219ab8=(_0x2b5289=_0x5b1719==null?void 0x0:_0x5b1719['replies'])==null?void 0x0:_0x2b5289[_0x44fea0(0x116)])!=null?_0x219ab8:0x0)>0x0){const _0x29d80c=(_0x904259,_0x229f95)=>({'id':_0x904259['replyId'],'threadId':_0x904259[_0x44fea0(0xad)],'dT':_0x119108(_0x904259[_0x44fea0(0xd9)]),'personId':_0x904259[_0x44fea0(0xfa)],'resolved':_0x5b1719['solved']===_0x590ae6['Solved'],'unitId':_0x5100f6,'subUnitId':_0x40ee5a,'text':JSON[_0x44fea0(0xf1)](_0x904259[_0x44fea0(0xe6)]),'parentId':_0x229f95}),_0x17709c=_0x29d80c(_0x5b1719[_0x44fea0(0xf5)][0x0]);return{..._0x17709c,'children':_0x5b1719[_0x44fea0(0xf5)][_0x44fea0(0x106)](0x1)[_0x44fea0(0xa9)](_0x5e048c=>_0x29d80c(_0x5e048c,_0x17709c['id']))};}return null;}let _0x34da2f=class{constructor(_0x304bdf,_0x3b865c,_0x2e5ad7,_0x4b63bf){const _0x42c93c=_0x4ca202;this[_0x42c93c(0x96)]=_0x304bdf,this[_0x42c93c(0xed)]=_0x3b865c,this['_sessionService']=_0x2e5ad7,this['_injector']=_0x4b63bf;}async[_0x4ca202(0xf4)](_0x363549){const _0x1ca058=_0x4ca202;var _0x577a53,_0x23870c;const {parentId:_0x2d0a82,unitId:_0x576df5,text:_0x3b7e3f,threadId:_0x182ef0}=_0x363549,_0x36e86d=(_0x23870c=(_0x577a53=_0x3b7e3f['customRanges'])==null?void 0x0:_0x577a53[_0x1ca058(0xeb)](_0x449aeb=>_0x449aeb[_0x1ca058(0xfe)]===_0x34129a[_0x1ca058(0xff)]['COMMENT'])[_0x1ca058(0xa9)](_0x4b2ca5=>_0x4b2ca5[_0x1ca058(0xef)]))!=null?_0x23870c:[],_0x5644e2=JSON['stringify'](_0x3b7e3f),_0x30baf1=(await this[_0x1ca058(0xee)][_0x1ca058(0xaf)](_0x576df5))[_0x1ca058(0x107)]();if(_0x2d0a82){const _0x3bb2c1={'memberId':_0x30baf1,'unitId':_0x576df5,'content':_0x5644e2,'mention':_0x36e86d,'threadId':_0x182ef0},_0x327be0=(await this['_httpService'][_0x1ca058(0x118)](_0x1ca058(0xa0)+_0x576df5+_0x1ca058(0xb6),{'body':_0x3bb2c1}))['body'][_0x1ca058(0xab)];return{..._0x363549,'id':_0x327be0[_0x1ca058(0xd0)],'dT':_0x34129a[_0x1ca058(0xdd)](+_0x327be0[_0x1ca058(0xd9)])[_0x1ca058(0x11b)](_0x1ca058(0xba)),'personId':_0x327be0[_0x1ca058(0xfa)]};}else{const _0x1a7730={'memberId':_0x30baf1,'unitId':_0x576df5,'content':_0x5644e2,'mention':_0x36e86d},_0x162e61=await this[_0x1ca058(0x96)][_0x1ca058(0x118)](_0x1ca058(0xa0)+_0x576df5+_0x1ca058(0x102),{'body':_0x1a7730});return _0x27dfc5(_0x162e61[_0x1ca058(0xb9)][_0x1ca058(0xb8)],_0x363549);}}async['updateComment'](_0x351a6){const _0x279128=_0x4ca202;var _0xae6873,_0x20ad25;const {text:_0x666695,unitId:_0x1a2177}=_0x351a6,_0x70a9a2=(_0x20ad25=(_0xae6873=_0x666695[_0x279128(0xc1)])==null?void 0x0:_0xae6873[_0x279128(0xeb)](_0x410b45=>_0x410b45[_0x279128(0xfe)]===_0x34129a[_0x279128(0xff)][_0x279128(0x9d)])[_0x279128(0xa9)](_0x31a9f0=>_0x31a9f0['rangeId']))!=null?_0x20ad25:[],_0x12b477=JSON[_0x279128(0xf6)](_0x666695),_0x16f01c=_0x351a6[_0x279128(0xad)],_0x51d802=_0x351a6['id'],_0x3fc95c={'memberId':(await this[_0x279128(0xee)][_0x279128(0xaf)](_0x1a2177))[_0x279128(0x107)](),'unitId':_0x1a2177,'threadId':_0x16f01c,'mention':_0x70a9a2,'content':_0x12b477,'replyId':_0x51d802},_0x41ae38=await this[_0x279128(0x96)][_0x279128(0x118)]('/universer-api/comment/unit/'+_0x1a2177+'/edit',{'body':_0x3fc95c});return!_0x41ae38[_0x279128(0xb9)][_0x279128(0x9e)]||_0x41ae38[_0x279128(0xb9)][_0x279128(0x9e)][_0x279128(0xde)]===0x1;}async[_0x4ca202(0xcf)](_0x45361d){const _0x12c12e=_0x4ca202,{unitId:_0x272d73}=_0x45361d,_0x5b6eb8=_0x45361d['threadId'],_0x51724b={'memberId':this[_0x12c12e(0xed)][_0x12c12e(0x103)]()['userID'],'unitId':_0x272d73,'threadId':_0x5b6eb8,'solved':_0x45361d[_0x12c12e(0x104)]?_0x590ae6[_0x12c12e(0xfd)]:_0x590ae6[_0x12c12e(0xb0)]},_0x4ccdad=await this[_0x12c12e(0x96)][_0x12c12e(0x118)]('/universer-api/comment/unit/'+_0x272d73+_0x12c12e(0xb4),{'body':_0x51724b});return!_0x4ccdad[_0x12c12e(0xb9)][_0x12c12e(0x9e)]||_0x4ccdad[_0x12c12e(0xb9)][_0x12c12e(0x9e)][_0x12c12e(0xde)]===0x1;}async[_0x4ca202(0xaa)](_0x51d401,_0x9e3feb,_0x1b1014,_0xdbfb00){const _0x4ca84e=_0x4ca202,_0xd07926={'memberId':(await this['_sessionService'][_0x4ca84e(0xaf)](_0x51d401))[_0x4ca84e(0x107)](),'threadId':_0x1b1014,'replyId':_0xdbfb00,'unitId':_0x51d401},_0x4090ae=await this[_0x4ca84e(0x96)][_0x4ca84e(0x118)](_0x4ca84e(0xa0)+_0x51d401+'/delete',{'body':_0xd07926});return!_0x4090ae[_0x4ca84e(0xb9)]['error']||_0x4090ae[_0x4ca84e(0xb9)][_0x4ca84e(0x9e)]['code']===0x1;}async[_0x4ca202(0x11a)](_0x133df1,_0x12b67f,_0x189f46){const _0x2ee446=_0x4ca202,_0x14e7ee={'unitId':_0x133df1,'threadId':_0x189f46},_0x499832=await this[_0x2ee446(0x96)][_0x2ee446(0x118)]('/universer-api/comment/unit/'+_0x133df1+'/list',{'body':_0x14e7ee}),_0x1f4d2c=_0x189f46[_0x2ee446(0xa9)](_0x5f3146=>_0x12d2aa(_0x499832[_0x2ee446(0xb9)][_0x2ee446(0x10e)][_0x5f3146],_0x133df1,_0x12b67f))['filter'](Boolean);return Object[_0x2ee446(0x10b)](_0x499832[_0x2ee446(0xb9)][_0x2ee446(0x119)])['forEach'](_0x1c289d=>{const _0x2cad7d=_0x2ee446;this[_0x2cad7d(0xed)][_0x2cad7d(0x108)](_0x1c289d);}),_0x1f4d2c;}[_0x4ca202(0x10d)](_0x314113){const _0x507c79=_0x4ca202;return{'id':_0x314113['id'],'threadId':_0x314113[_0x507c79(0xad)],'ref':_0x314113[_0x507c79(0x114)]};}};_0x34da2f=_0x2b652b([_0x5c1602(0x0,_0x34129a['Inject'](_0xdcfeb['HTTPService'])),_0x5c1602(0x1,_0x34129a[_0x4ca202(0xae)](_0x34129a[_0x4ca202(0x113)])),_0x5c1602(0x2,_0x34129a['Inject'](_0x5e398e[_0x4ca202(0x100)])),_0x5c1602(0x3,_0x34129a[_0x4ca202(0xae)](_0x34129a[_0x4ca202(0x10a)]))],_0x34da2f);var _0xf9cfab=Object[_0x4ca202(0xdc)],_0x59df1c=Object['getOwnPropertyDescriptor'],_0x3b3c88=(_0x39c091,_0x4a1c9b,_0x3cbce7,_0x268e56)=>{const _0x302d10=_0x4ca202;for(var _0x3fec33=_0x268e56>0x1?void 0x0:_0x268e56?_0x59df1c(_0x4a1c9b,_0x3cbce7):_0x4a1c9b,_0x5e8526=_0x39c091[_0x302d10(0x116)]-0x1,_0x16de76;_0x5e8526>=0x0;_0x5e8526--)(_0x16de76=_0x39c091[_0x5e8526])&&(_0x3fec33=(_0x268e56?_0x16de76(_0x4a1c9b,_0x3cbce7,_0x3fec33):_0x16de76(_0x3fec33))||_0x3fec33);return _0x268e56&&_0x3fec33&&_0xf9cfab(_0x4a1c9b,_0x3cbce7,_0x3fec33),_0x3fec33;},_0x3d39f8=(_0x4b143a,_0x106dae)=>(_0x2d9ee2,_0x240eb0)=>_0x106dae(_0x2d9ee2,_0x240eb0,_0x4b143a);let _0x5b9523=class extends _0x34129a[_0x4ca202(0x10f)]{constructor(_0x1f7f21,_0x45117f){const _0x2b3d17=_0x4ca202;super(),this[_0x2b3d17(0xce)]=_0x1f7f21,this[_0x2b3d17(0xca)]=_0x45117f,this[_0x2b3d17(0x117)]();}['_initDataSource'](){const _0x430e44=_0x4ca202;this[_0x430e44(0xce)][_0x430e44(0xf2)]=this[_0x430e44(0xca)],this[_0x430e44(0xce)][_0x430e44(0xd3)]=!0x1;}};_0x5b9523=_0x3b3c88([_0x3d39f8(0x0,_0x31a41f['IThreadCommentDataSourceService']),_0x3d39f8(0x1,_0x34129a[_0x4ca202(0xae)](_0x34da2f))],_0x5b9523);var _0x4519d0=Object[_0x4ca202(0xdc)],_0x19128d=Object['getOwnPropertyDescriptor'],_0x372b3a=(_0x3ad49e,_0x2e68ea,_0x2e6a06)=>_0x2e68ea in _0x3ad49e?_0x4519d0(_0x3ad49e,_0x2e68ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e6a06}):_0x3ad49e[_0x2e68ea]=_0x2e6a06,_0x466dcc=(_0x4f9be4,_0x22f292,_0x1d97b6,_0x50f68b)=>{const _0x28b9bd=_0x4ca202;for(var _0x221188=_0x50f68b>0x1?void 0x0:_0x50f68b?_0x19128d(_0x22f292,_0x1d97b6):_0x22f292,_0x31ae44=_0x4f9be4[_0x28b9bd(0x116)]-0x1,_0x1b6c0a;_0x31ae44>=0x0;_0x31ae44--)(_0x1b6c0a=_0x4f9be4[_0x31ae44])&&(_0x221188=(_0x50f68b?_0x1b6c0a(_0x22f292,_0x1d97b6,_0x221188):_0x1b6c0a(_0x221188))||_0x221188);return _0x50f68b&&_0x221188&&_0x4519d0(_0x22f292,_0x1d97b6,_0x221188),_0x221188;},_0x52f366=(_0x5026bc,_0x398525)=>(_0x1ed861,_0x2e6829)=>_0x398525(_0x1ed861,_0x2e6829,_0x5026bc),_0x3d7a4f=(_0x3da769,_0x2deb97,_0x3be3f4)=>_0x372b3a(_0x3da769,typeof _0x2deb97!=_0x4ca202(0xb5)?_0x2deb97+'':_0x2deb97,_0x3be3f4);_0x31e174[_0x4ca202(0xa1)]=class extends _0x34129a[_0x4ca202(0xd8)]{constructor(_0x5e5558=_0x15cb4f,_0x22af11,_0x39d65f){const _0x196af6=_0x4ca202;super(),this[_0x196af6(0xe1)]=_0x5e5558,this[_0x196af6(0x9f)]=_0x22af11,this[_0x196af6(0xcd)]=_0x39d65f;const {..._0x32b6e7}=_0x34129a[_0x196af6(0xa6)]({},_0x15cb4f,this[_0x196af6(0xe1)]);this['_configService']['setConfig'](_0x16f556,_0x32b6e7);}[_0x4ca202(0x111)](){const _0x7b439c=_0x4ca202;[[_0x34da2f],[_0x5b9523],[_0xf1f3ab]][_0x7b439c(0xac)](_0x5f421d=>{const _0x298b2a=_0x7b439c;this['_injector'][_0x298b2a(0xf3)](_0x5f421d);});}[_0x4ca202(0x105)](){const _0x2e62b4=_0x4ca202;this[_0x2e62b4(0x9f)][_0x2e62b4(0xf8)](_0x5b9523),this[_0x2e62b4(0x9f)]['get'](_0xf1f3ab);}},_0x3d7a4f(_0x31e174[_0x4ca202(0xa1)],_0x4ca202(0xcc),_0x360381),_0x3d7a4f(_0x31e174[_0x4ca202(0xa1)],_0x4ca202(0x97),_0x34129a[_0x4ca202(0x115)][_0x4ca202(0xb3)]),_0x31e174[_0x4ca202(0xa1)]=_0x466dcc([_0x34129a[_0x4ca202(0xda)](_0x1289e4[_0x4ca202(0xe9)],_0x5e398e['UniverCollaborationClientPlugin'],_0x43f458[_0x4ca202(0xbb)]),_0x52f366(0x1,_0x34129a[_0x4ca202(0xae)](_0x34129a[_0x4ca202(0x10a)])),_0x52f366(0x2,_0x34129a['IConfigService'])],_0x31e174[_0x4ca202(0xa1)]),Object['defineProperty'](_0x31e174,Symbol[_0x4ca202(0xfc)],{'value':_0x4ca202(0xbf)});}));
|
|
1
|
+
function _0x2b03(_0x16179e,_0x214350){const _0x2e316b=_0x2e31();return _0x2b03=function(_0x2b036d,_0x6af26c){_0x2b036d=_0x2b036d-0x1d7;let _0x2aab7d=_0x2e316b[_0x2b036d];return _0x2aab7d;},_0x2b03(_0x16179e,_0x214350);}function _0x2e31(){const _0x5a25c1=['setConfig','Add','UniverThreadCommentUi','3921720ltNzgB','rangeType','onReady','users','@univerjs/thread-comment-ui','root','UniverLicensePlugin','_commentService','UniverInstanceType','IThreadCommentDataSourceService','stringify','user','CollaborationSessionService','customRanges','format','HTTPService','getUser','UniverProLicense','/universer-api/user/list','1943530OKXjcn','map','5472260ostqbi','@univerjs/network','thread-comment-data-source.config','18mMLcnl','resolveComment','/add','_threadCommentModel','deleteComment','post','threadId','solved','6142276adbdAR','content','_configService','5016148VDpfWN','personId','Injector','userID','forEach','defineProperty','replyId','@univerjs-pro/license','getMemberID','UniverCore','Disposable','replies','_initUserSync','object','type','Solved','COMMENT','UniverNetwork','Inject','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','rxjs','@univerjs/thread-comment','rangeId','UniverProCollaborationClient','function','OpenOrReOpen','toStringTag','@univerjs/core','19852IJpGyR','_userService','_initDataSource','body','UNRECOGNIZED','/delete','50eNilTf','getOwnPropertyDescriptor','CommentService','Unknown','UserManagerService','createTimestamp','pluginName','dayjs','updateComment','DependentOn','pipe','@univerjs-pro/collaboration-client','Module','_injector','CustomRangeType','onStarting','disposeWithMe','getUnit','addComment','Edit','comment','reply','addUser','_sessionService','Delete','requireSession','/universer-api/comment/unit/','subscribe','UniverProThreadCommentDatasource','8766FEMCyv','UniverThreadCommentDataSourcePlugin','listComments','parse','_config','Solve','UniverThreadCommentUIPlugin','exports','6LOyHLb','_httpService','filter','userId','unitId','syncUpdateMutationToColla','commentUpdate$','error','UniverThreadComment','comments','_threadCommentDataSource','values','find','_init','Reply','IConfigService','get','UniverCollaborationClientPlugin','amd','length','add','delete'];_0x2e31=function(){return _0x5a25c1;};return _0x2e31();}(function(_0xbedb78,_0x5b9c83){const _0x62ac10=_0x2b03,_0x58c64a=_0xbedb78();while(!![]){try{const _0xfe6d53=parseInt(_0x62ac10(0x1ff))/0x1*(parseInt(_0x62ac10(0x1f9))/0x2)+-parseInt(_0x62ac10(0x21c))/0x3+parseInt(_0x62ac10(0x1dc))/0x4+-parseInt(_0x62ac10(0x252))/0x5+parseInt(_0x62ac10(0x224))/0x6*(parseInt(_0x62ac10(0x1d9))/0x7)+-parseInt(_0x62ac10(0x23d))/0x8+-parseInt(_0x62ac10(0x255))/0x9*(parseInt(_0x62ac10(0x250))/0xa);if(_0xfe6d53===_0x5b9c83)break;else _0x58c64a['push'](_0x58c64a['shift']());}catch(_0x476393){_0x58c64a['push'](_0x58c64a['shift']());}}}(_0x2e31,0x9f0f6),function(_0x27c0bd,_0x1938c6){const _0x1d5b03=_0x2b03;typeof exports==_0x1d5b03(0x1e9)&&typeof module<'u'?_0x1938c6(exports,require(_0x1d5b03(0x20a)),require('@univerjs-pro/license'),require(_0x1d5b03(0x1f8)),require(_0x1d5b03(0x241)),require(_0x1d5b03(0x1f2)),require('rxjs'),require(_0x1d5b03(0x253))):typeof define==_0x1d5b03(0x1f5)&&define[_0x1d5b03(0x236)]?define([_0x1d5b03(0x223),_0x1d5b03(0x20a),_0x1d5b03(0x1e3),'@univerjs/core',_0x1d5b03(0x241),_0x1d5b03(0x1f2),_0x1d5b03(0x1f1),_0x1d5b03(0x253)],_0x1938c6):(_0x27c0bd=typeof globalThis<'u'?globalThis:_0x27c0bd||self,_0x1938c6(_0x27c0bd[_0x1d5b03(0x21b)]={},_0x27c0bd[_0x1d5b03(0x1f4)],_0x27c0bd[_0x1d5b03(0x24e)],_0x27c0bd[_0x1d5b03(0x1e5)],_0x27c0bd[_0x1d5b03(0x23c)],_0x27c0bd[_0x1d5b03(0x22c)],_0x27c0bd[_0x1d5b03(0x1f1)],_0x27c0bd[_0x1d5b03(0x1ed)]));}(this,function(_0x2718f4,_0x5f5cf2,_0xea7ec2,_0x160b92,_0x160ee0,_0x366c04,_0x470924,_0x519750){'use strict';const _0xba9176=_0x2b03;const _0x522b00='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2d0677=(_0x89c8ee=>(_0x89c8ee[_0x89c8ee[_0xba9176(0x1f6)]=0x0]=_0xba9176(0x1f6),_0x89c8ee[_0x89c8ee[_0xba9176(0x1eb)]=0x1]='Solved',_0x89c8ee[_0x89c8ee[_0xba9176(0x1fd)]=-0x1]=_0xba9176(0x1fd),_0x89c8ee))(_0x2d0677||{}),_0x289780=(_0x977b52=>(_0x977b52[_0x977b52['Unknown']=0x0]=_0xba9176(0x202),_0x977b52[_0x977b52[_0xba9176(0x23b)]=0x1]=_0xba9176(0x23b),_0x977b52[_0x977b52[_0xba9176(0x232)]=0x2]='Reply',_0x977b52[_0x977b52['Edit']=0x3]='Edit',_0x977b52[_0x977b52[_0xba9176(0x217)]=0x4]=_0xba9176(0x217),_0x977b52[_0x977b52[_0xba9176(0x221)]=0x5]=_0xba9176(0x221),_0x977b52[_0x977b52[_0xba9176(0x1fd)]=-0x1]=_0xba9176(0x1fd),_0x977b52))(_0x289780||{});const _0x521e26=_0x2f74f2=>_0x160b92[_0xba9176(0x206)](new Date(+_0x2f74f2))[_0xba9176(0x24b)](_0xba9176(0x1ef)),_0x1d131c=async(_0x1a283f,_0x6393bd)=>{const _0x1edf68=_0xba9176,_0x2840f8=_0x1a283f[_0x1edf68(0x234)](_0x160b92[_0x1edf68(0x203)]),_0x1a2270=_0x1a283f['get'](_0x519750['HTTPService']);_0x6393bd[_0x1edf68(0x1e0)](_0x3966c6=>{const _0x427459=_0x1edf68;_0x2840f8[_0x427459(0x24d)](_0x3966c6)&&_0x6393bd[_0x427459(0x239)](_0x3966c6);}),_0x6393bd['size']&&(await _0x1a2270['get'](_0x1edf68(0x24f),{'params':{'userIDs':[..._0x6393bd]}}))[_0x1edf68(0x1fc)][_0x1edf68(0x240)][_0x1edf68(0x1e0)](_0x2f7f48=>{const _0x454702=_0x1edf68;_0x2f7f48&&_0x2840f8[_0x454702(0x215)](_0x2f7f48);});};var _0x3bfdab=Object['defineProperty'],_0x237784=Object[_0xba9176(0x200)],_0x2b0223=(_0x5b1315,_0x244a40,_0x1ead0a,_0x59f723)=>{const _0x4ae01c=_0xba9176;for(var _0x127385=_0x59f723>0x1?void 0x0:_0x59f723?_0x237784(_0x244a40,_0x1ead0a):_0x244a40,_0x4dd42b=_0x5b1315[_0x4ae01c(0x237)]-0x1,_0x33032a;_0x4dd42b>=0x0;_0x4dd42b--)(_0x33032a=_0x5b1315[_0x4dd42b])&&(_0x127385=(_0x59f723?_0x33032a(_0x244a40,_0x1ead0a,_0x127385):_0x33032a(_0x127385))||_0x127385);return _0x59f723&&_0x127385&&_0x3bfdab(_0x244a40,_0x1ead0a,_0x127385),_0x127385;},_0x49cf6e=(_0x5f4000,_0x22c88c)=>(_0x1d2a20,_0x2013d1)=>_0x22c88c(_0x1d2a20,_0x2013d1,_0x5f4000);let _0x382135=class extends _0x160b92['Disposable']{constructor(_0x754206,_0x524bfc,_0x56a46e,_0x1cd07d){const _0x460fa3=_0xba9176;super(),this[_0x460fa3(0x244)]=_0x754206,this[_0x460fa3(0x258)]=_0x524bfc,this['_userService']=_0x56a46e,this['_injector']=_0x1cd07d,this[_0x460fa3(0x231)](),this[_0x460fa3(0x1e8)]();}['_initUserSync'](){const _0x6ec86d=_0xba9176;this['disposeWithMe'](this[_0x6ec86d(0x258)][_0x6ec86d(0x22a)][_0x6ec86d(0x209)](_0x470924['bufferTime'](0x10))[_0x6ec86d(0x21a)](_0x59de01=>{const _0x3dd07c=_0x6ec86d,_0x26b093=new Set();_0x59de01[_0x3dd07c(0x1e0)](_0x16e668=>{const _0x230003=_0x3dd07c;switch(_0x16e668[_0x230003(0x1ea)]){case _0x230003(0x238):{const _0x33f4d3=_0x16e668['payload'][_0x230003(0x1dd)];_0x26b093[_0x230003(0x238)](_0x33f4d3);break;}}}),_0x1d131c(this[_0x3dd07c(0x20c)],_0x26b093);}));}['_init'](){const _0x5608cf=_0xba9176;this[_0x5608cf(0x20f)](this[_0x5608cf(0x244)][_0x5608cf(0x22a)][_0x5608cf(0x21a)](async _0x3a9dad=>{const _0xe151cc=_0x5608cf;var _0x188823,_0x3a1998,_0x37b7fb,_0x1bc60b;const _0x5d0d36=(_0x188823=this[_0xe151cc(0x258)][_0xe151cc(0x210)](_0x3a9dad[_0xe151cc(0x228)])[_0xe151cc(0x230)](_0x58be47=>_0x58be47[_0xe151cc(0x1d7)]===_0x3a9dad['threadId']))==null?void 0x0:_0x188823[_0xe151cc(0x242)];if(!_0x5d0d36)return;const {unitId:_0x183a32,subUnitId:_0x35ebb4}=_0x5d0d36;switch(_0x3a9dad[_0xe151cc(0x248)]&&this[_0xe151cc(0x1fa)][_0xe151cc(0x215)](_0x3a9dad[_0xe151cc(0x248)]),_0x3a9dad[_0xe151cc(0x1ea)]){case _0x289780[_0xe151cc(0x23b)]:break;case _0x289780[_0xe151cc(0x232)]:{this[_0xe151cc(0x258)][_0xe151cc(0x211)](_0x183a32,_0x35ebb4,{'unitId':_0x183a32,'subUnitId':_0x35ebb4,'ref':'','id':_0x3a9dad['replyId'],'dT':_0x521e26(+_0x3a9dad[_0xe151cc(0x204)]),'threadId':_0x3a9dad[_0xe151cc(0x1d7)],'personId':(_0x37b7fb=(_0x3a1998=_0x3a9dad[_0xe151cc(0x248)])==null?void 0x0:_0x3a1998['userID'])!=null?_0x37b7fb:_0x3a9dad[_0xe151cc(0x227)],'text':JSON[_0xe151cc(0x21f)](_0x3a9dad[_0xe151cc(0x1da)]),'parentId':_0x5d0d36['id']});break;}case _0x289780[_0xe151cc(0x217)]:{const _0x1fd347=this[_0xe151cc(0x258)]['getComment'](_0x183a32,_0x35ebb4,_0x3a9dad['replyId']);_0x1fd347&&_0x1fd347['parentId']&&this['_threadCommentModel'][_0xe151cc(0x259)](_0x183a32,_0x35ebb4,_0x3a9dad[_0xe151cc(0x1e2)]);break;}case _0x289780[_0xe151cc(0x212)]:{this[_0xe151cc(0x258)][_0xe151cc(0x207)](_0x183a32,_0x35ebb4,{'commentId':_0x3a9dad[_0xe151cc(0x1e2)],'text':JSON[_0xe151cc(0x21f)](_0x3a9dad[_0xe151cc(0x1da)])});break;}case _0x289780['Solve']:{const _0x38c57b=(_0x1bc60b=this[_0xe151cc(0x258)]['getUnit'](_0x3a9dad['unitId'])[_0xe151cc(0x230)](_0x26df73=>_0x26df73[_0xe151cc(0x1d7)]===_0x3a9dad[_0xe151cc(0x1d7)]))==null?void 0x0:_0x1bc60b[_0xe151cc(0x242)];_0x38c57b&&this[_0xe151cc(0x258)][_0xe151cc(0x256)](_0x183a32,_0x35ebb4,_0x38c57b['id'],_0x3a9dad[_0xe151cc(0x1d8)]===_0x2d0677['Solved']);break;}}}));}};_0x382135=_0x2b0223([_0x49cf6e(0x0,_0x160b92[_0xba9176(0x1ee)](_0x5f5cf2[_0xba9176(0x201)])),_0x49cf6e(0x1,_0x160b92[_0xba9176(0x1ee)](_0x366c04['ThreadCommentModel'])),_0x49cf6e(0x2,_0x160b92[_0xba9176(0x1ee)](_0x160b92[_0xba9176(0x203)])),_0x49cf6e(0x3,_0x160b92['Inject'](_0x160b92[_0xba9176(0x1de)]))],_0x382135);const _0x332b0e=_0xba9176(0x254),_0x5d8a00={};var _0x4130d3=Object[_0xba9176(0x1e1)],_0x186062=Object[_0xba9176(0x200)],_0x3feb5=(_0x45daef,_0x461100,_0x3fba56,_0x543691)=>{for(var _0x4ff2d6=_0x543691>0x1?void 0x0:_0x543691?_0x186062(_0x461100,_0x3fba56):_0x461100,_0x2edfa8=_0x45daef['length']-0x1,_0xad6cc6;_0x2edfa8>=0x0;_0x2edfa8--)(_0xad6cc6=_0x45daef[_0x2edfa8])&&(_0x4ff2d6=(_0x543691?_0xad6cc6(_0x461100,_0x3fba56,_0x4ff2d6):_0xad6cc6(_0x4ff2d6))||_0x4ff2d6);return _0x543691&&_0x4ff2d6&&_0x4130d3(_0x461100,_0x3fba56,_0x4ff2d6),_0x4ff2d6;},_0x321f5a=(_0x514136,_0x447913)=>(_0xd3a594,_0x5a40e2)=>_0x447913(_0xd3a594,_0x5a40e2,_0x514136);function _0x2c6206(_0x58ce4b,_0x11e8b6){const _0x34c26e=_0xba9176,_0x226b08=_0x58ce4b['replies'][0x0];return{..._0x11e8b6,'id':_0x226b08[_0x34c26e(0x1e2)],'resolved':_0x58ce4b[_0x34c26e(0x1d8)]===0x1,'dT':_0x521e26(_0x226b08[_0x34c26e(0x204)]),'personId':_0x226b08[_0x34c26e(0x227)],'threadId':_0x226b08['threadId']};}function _0x1f7655(_0x3db542,_0x3c5ee4,_0x257556){const _0x1bc28f=_0xba9176;var _0x335db1,_0x5651c1;if(((_0x5651c1=(_0x335db1=_0x3db542==null?void 0x0:_0x3db542[_0x1bc28f(0x1e7)])==null?void 0x0:_0x335db1['length'])!=null?_0x5651c1:0x0)>0x0){const _0x4ac735=(_0x3c4072,_0x31d5bd)=>({'id':_0x3c4072[_0x1bc28f(0x1e2)],'threadId':_0x3c4072[_0x1bc28f(0x1d7)],'dT':_0x521e26(_0x3c4072[_0x1bc28f(0x204)]),'personId':_0x3c4072[_0x1bc28f(0x227)],'resolved':_0x3db542[_0x1bc28f(0x1d8)]===_0x2d0677[_0x1bc28f(0x1eb)],'unitId':_0x3c5ee4,'subUnitId':_0x257556,'text':JSON['parse'](_0x3c4072[_0x1bc28f(0x1da)]),'parentId':_0x31d5bd}),_0x42a1b9=_0x4ac735(_0x3db542[_0x1bc28f(0x1e7)][0x0]);return{..._0x42a1b9,'children':_0x3db542[_0x1bc28f(0x1e7)]['slice'](0x1)[_0x1bc28f(0x251)](_0x3b7baf=>_0x4ac735(_0x3b7baf,_0x42a1b9['id']))};}return null;}let _0x78f03c=class{constructor(_0x55fa8a,_0x3332c8,_0x137940,_0x35ea13){const _0x1162f4=_0xba9176;this[_0x1162f4(0x225)]=_0x55fa8a,this[_0x1162f4(0x1fa)]=_0x3332c8,this[_0x1162f4(0x216)]=_0x137940,this[_0x1162f4(0x20c)]=_0x35ea13;}async[_0xba9176(0x211)](_0x24d7cf){const _0x590d3f=_0xba9176;var _0x5b7fe1,_0x3379aa;const {parentId:_0x29f072,unitId:_0x30385c,text:_0x2e5433,threadId:_0x332a47}=_0x24d7cf,_0x4a5cae=(_0x3379aa=(_0x5b7fe1=_0x2e5433[_0x590d3f(0x24a)])==null?void 0x0:_0x5b7fe1[_0x590d3f(0x226)](_0x423ef9=>_0x423ef9[_0x590d3f(0x23e)]===_0x160b92[_0x590d3f(0x20d)][_0x590d3f(0x1ec)])[_0x590d3f(0x251)](_0x4aafe1=>_0x4aafe1[_0x590d3f(0x1f3)]))!=null?_0x3379aa:[],_0xcb785f=JSON[_0x590d3f(0x247)](_0x2e5433),_0x3121b9=(await this[_0x590d3f(0x216)][_0x590d3f(0x218)](_0x30385c))[_0x590d3f(0x1e4)]();if(_0x29f072){const _0x1faad6={'memberId':_0x3121b9,'unitId':_0x30385c,'content':_0xcb785f,'mention':_0x4a5cae,'threadId':_0x332a47},_0x4e5e34=(await this[_0x590d3f(0x225)][_0x590d3f(0x25a)](_0x590d3f(0x219)+_0x30385c+'/reply',{'body':_0x1faad6}))[_0x590d3f(0x1fc)][_0x590d3f(0x214)];return{..._0x24d7cf,'id':_0x4e5e34[_0x590d3f(0x1e2)],'dT':_0x160b92[_0x590d3f(0x206)](+_0x4e5e34['createTimestamp'])[_0x590d3f(0x24b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4e5e34[_0x590d3f(0x227)]};}else{const _0x4a7f83={'memberId':_0x3121b9,'unitId':_0x30385c,'content':_0xcb785f,'mention':_0x4a5cae},_0x445cac=await this['_httpService'][_0x590d3f(0x25a)](_0x590d3f(0x219)+_0x30385c+_0x590d3f(0x257),{'body':_0x4a7f83});return _0x2c6206(_0x445cac[_0x590d3f(0x1fc)][_0x590d3f(0x213)],_0x24d7cf);}}async['updateComment'](_0x3596f1){const _0x930f31=_0xba9176;var _0x4e5536,_0x679c7a;const {text:_0x492f6c,unitId:_0x3d5329}=_0x3596f1,_0x418d54=(_0x679c7a=(_0x4e5536=_0x492f6c[_0x930f31(0x24a)])==null?void 0x0:_0x4e5536[_0x930f31(0x226)](_0x11527c=>_0x11527c[_0x930f31(0x23e)]===_0x160b92[_0x930f31(0x20d)][_0x930f31(0x1ec)])[_0x930f31(0x251)](_0x13a924=>_0x13a924[_0x930f31(0x1f3)]))!=null?_0x679c7a:[],_0x1f66d5=JSON[_0x930f31(0x247)](_0x492f6c),_0xc45b25=_0x3596f1[_0x930f31(0x1d7)],_0x3be1e3=_0x3596f1['id'],_0x31cff2={'memberId':(await this['_sessionService'][_0x930f31(0x218)](_0x3d5329))[_0x930f31(0x1e4)](),'unitId':_0x3d5329,'threadId':_0xc45b25,'mention':_0x418d54,'content':_0x1f66d5,'replyId':_0x3be1e3},_0x17399e=await this[_0x930f31(0x225)]['post']('/universer-api/comment/unit/'+_0x3d5329+'/edit',{'body':_0x31cff2});return!_0x17399e[_0x930f31(0x1fc)][_0x930f31(0x22b)]||_0x17399e['body'][_0x930f31(0x22b)]['code']===0x1;}async[_0xba9176(0x256)](_0x390846){const _0x368b7e=_0xba9176,{unitId:_0x1e5d98}=_0x390846,_0x3c8678=_0x390846[_0x368b7e(0x1d7)],_0x280b06={'memberId':this[_0x368b7e(0x1fa)]['getCurrentUser']()[_0x368b7e(0x1df)],'unitId':_0x1e5d98,'threadId':_0x3c8678,'solved':_0x390846['resolved']?_0x2d0677['Solved']:_0x2d0677[_0x368b7e(0x1f6)]},_0x2b2438=await this[_0x368b7e(0x225)]['post'](_0x368b7e(0x219)+_0x1e5d98+'/solved',{'body':_0x280b06});return!_0x2b2438['body']['error']||_0x2b2438['body'][_0x368b7e(0x22b)]['code']===0x1;}async['deleteComment'](_0x5df6fd,_0x489a13,_0x237a4e,_0x485348){const _0x251761=_0xba9176,_0x363788={'memberId':(await this[_0x251761(0x216)]['requireSession'](_0x5df6fd))[_0x251761(0x1e4)](),'threadId':_0x237a4e,'replyId':_0x485348,'unitId':_0x5df6fd},_0x1de337=await this[_0x251761(0x225)][_0x251761(0x25a)](_0x251761(0x219)+_0x5df6fd+_0x251761(0x1fe),{'body':_0x363788});return!_0x1de337['body'][_0x251761(0x22b)]||_0x1de337[_0x251761(0x1fc)]['error']['code']===0x1;}async[_0xba9176(0x21e)](_0xaf5c59,_0x390a31,_0x262989){const _0x32a43a=_0xba9176,_0x5cfa6e={'unitId':_0xaf5c59,'threadId':_0x262989},_0x26337d=await this[_0x32a43a(0x225)][_0x32a43a(0x25a)]('/universer-api/comment/unit/'+_0xaf5c59+'/list',{'body':_0x5cfa6e}),_0x306f47=_0x262989[_0x32a43a(0x251)](_0x37264a=>_0x1f7655(_0x26337d[_0x32a43a(0x1fc)][_0x32a43a(0x22d)][_0x37264a],_0xaf5c59,_0x390a31))['filter'](Boolean);return Object[_0x32a43a(0x22f)](_0x26337d[_0x32a43a(0x1fc)][_0x32a43a(0x240)])['forEach'](_0x512c4f=>{const _0x58a42b=_0x32a43a;this[_0x58a42b(0x1fa)]['addUser'](_0x512c4f);}),_0x306f47;}['saveCommentToSnapshot'](_0x1f2f5d){return{'id':_0x1f2f5d['id'],'threadId':_0x1f2f5d['threadId'],'ref':_0x1f2f5d['ref']};}};_0x78f03c=_0x3feb5([_0x321f5a(0x0,_0x160b92[_0xba9176(0x1ee)](_0x519750[_0xba9176(0x24c)])),_0x321f5a(0x1,_0x160b92['Inject'](_0x160b92[_0xba9176(0x203)])),_0x321f5a(0x2,_0x160b92[_0xba9176(0x1ee)](_0x5f5cf2[_0xba9176(0x249)])),_0x321f5a(0x3,_0x160b92[_0xba9176(0x1ee)](_0x160b92['Injector']))],_0x78f03c);var _0x27dfc4=Object['defineProperty'],_0x332892=Object[_0xba9176(0x200)],_0x366438=(_0x4d26d5,_0x372943,_0x4ef713,_0x44f078)=>{const _0x2f3cba=_0xba9176;for(var _0x536a35=_0x44f078>0x1?void 0x0:_0x44f078?_0x332892(_0x372943,_0x4ef713):_0x372943,_0x3cae21=_0x4d26d5[_0x2f3cba(0x237)]-0x1,_0x34910e;_0x3cae21>=0x0;_0x3cae21--)(_0x34910e=_0x4d26d5[_0x3cae21])&&(_0x536a35=(_0x44f078?_0x34910e(_0x372943,_0x4ef713,_0x536a35):_0x34910e(_0x536a35))||_0x536a35);return _0x44f078&&_0x536a35&&_0x27dfc4(_0x372943,_0x4ef713,_0x536a35),_0x536a35;},_0x3b5494=(_0x465311,_0x2c7ca1)=>(_0x9a3ae3,_0x2f64d9)=>_0x2c7ca1(_0x9a3ae3,_0x2f64d9,_0x465311);let _0x1ca896=class extends _0x160b92[_0xba9176(0x1e6)]{constructor(_0x563c8f,_0x1bc32c){const _0x47b52e=_0xba9176;super(),this[_0x47b52e(0x1f0)]=_0x563c8f,this[_0x47b52e(0x22e)]=_0x1bc32c,this[_0x47b52e(0x1fb)]();}['_initDataSource'](){const _0x540ed6=_0xba9176;this['_threadCommentDataSourceService']['dataSource']=this[_0x540ed6(0x22e)],this[_0x540ed6(0x1f0)][_0x540ed6(0x229)]=!0x1;}};_0x1ca896=_0x366438([_0x3b5494(0x0,_0x366c04[_0xba9176(0x246)]),_0x3b5494(0x1,_0x160b92['Inject'](_0x78f03c))],_0x1ca896);var _0x4bcbc0=Object[_0xba9176(0x1e1)],_0x56940d=Object[_0xba9176(0x200)],_0x18e835=(_0xbd2c76,_0x4a449c,_0x23bb9b)=>_0x4a449c in _0xbd2c76?_0x4bcbc0(_0xbd2c76,_0x4a449c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23bb9b}):_0xbd2c76[_0x4a449c]=_0x23bb9b,_0x41b32e=(_0x3547bf,_0x31dea1,_0x11b543,_0x32cd80)=>{const _0x567daf=_0xba9176;for(var _0x3cb2df=_0x32cd80>0x1?void 0x0:_0x32cd80?_0x56940d(_0x31dea1,_0x11b543):_0x31dea1,_0x296d61=_0x3547bf[_0x567daf(0x237)]-0x1,_0x4c21df;_0x296d61>=0x0;_0x296d61--)(_0x4c21df=_0x3547bf[_0x296d61])&&(_0x3cb2df=(_0x32cd80?_0x4c21df(_0x31dea1,_0x11b543,_0x3cb2df):_0x4c21df(_0x3cb2df))||_0x3cb2df);return _0x32cd80&&_0x3cb2df&&_0x4bcbc0(_0x31dea1,_0x11b543,_0x3cb2df),_0x3cb2df;},_0x1c8dbc=(_0xa91c0f,_0x273bbd)=>(_0xb27f7,_0x5e93fa)=>_0x273bbd(_0xb27f7,_0x5e93fa,_0xa91c0f),_0x17247c=(_0x15c3f1,_0x4559d0,_0x40898f)=>_0x18e835(_0x15c3f1,typeof _0x4559d0!='symbol'?_0x4559d0+'':_0x4559d0,_0x40898f);_0x2718f4['UniverThreadCommentDataSourcePlugin']=class extends _0x160b92['Plugin']{constructor(_0x55017a=_0x5d8a00,_0x17a784,_0x566a75){const _0x331f16=_0xba9176;super(),this[_0x331f16(0x220)]=_0x55017a,this[_0x331f16(0x20c)]=_0x17a784,this[_0x331f16(0x1db)]=_0x566a75;const {..._0x8b8f34}=_0x160b92['merge']({},_0x5d8a00,this['_config']);this[_0x331f16(0x1db)][_0x331f16(0x23a)](_0x332b0e,_0x8b8f34);}[_0xba9176(0x20e)](){const _0x39ba51=_0xba9176;[[_0x78f03c],[_0x1ca896],[_0x382135]][_0x39ba51(0x1e0)](_0x2a6f96=>{const _0x5e495c=_0x39ba51;this[_0x5e495c(0x20c)][_0x5e495c(0x238)](_0x2a6f96);});}[_0xba9176(0x23f)](){const _0x2787c4=_0xba9176;this[_0x2787c4(0x20c)][_0x2787c4(0x234)](_0x1ca896),this[_0x2787c4(0x20c)]['get'](_0x382135);}},_0x17247c(_0x2718f4['UniverThreadCommentDataSourcePlugin'],_0xba9176(0x205),_0x522b00),_0x17247c(_0x2718f4['UniverThreadCommentDataSourcePlugin'],_0xba9176(0x1ea),_0x160b92[_0xba9176(0x245)]['UNIVER_UNKNOWN']),_0x2718f4[_0xba9176(0x21d)]=_0x41b32e([_0x160b92[_0xba9176(0x208)](_0x160ee0[_0xba9176(0x222)],_0x5f5cf2[_0xba9176(0x235)],_0xea7ec2[_0xba9176(0x243)]),_0x1c8dbc(0x1,_0x160b92[_0xba9176(0x1ee)](_0x160b92[_0xba9176(0x1de)])),_0x1c8dbc(0x2,_0x160b92[_0xba9176(0x233)])],_0x2718f4[_0xba9176(0x21d)]),Object[_0xba9176(0x1e1)](_0x2718f4,Symbol[_0xba9176(0x1f7)],{'value':_0xba9176(0x20b)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.5.5
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.5.5
|
|
49
|
-
"@univerjs/core": "0.5.5
|
|
50
|
-
"@univerjs-pro/license": "0.5.5
|
|
51
|
-
"@univerjs/network": "0.5.5
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.5.5",
|
|
49
|
+
"@univerjs/core": "0.5.5",
|
|
50
|
+
"@univerjs-pro/license": "0.5.5",
|
|
51
|
+
"@univerjs/network": "0.5.5",
|
|
52
52
|
"@univerjs/protocol": "0.1.42",
|
|
53
|
-
"@univerjs/thread-comment": "0.5.5
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.5.5",
|
|
54
|
+
"@univerjs/thread-comment": "0.5.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|