@univerjs-pro/thread-comment-datasource 0.2.14 → 0.3.0-alpha.0
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/types/plugin.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +19 -14
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x378286=_0x2bea;(function(_0x47ddc0,_0x11acab){const _0x376ce2=_0x2bea,_0xa21241=_0x47ddc0();while(!![]){try{const _0x4c300b=parseInt(_0x376ce2(0x143))/0x1+-parseInt(_0x376ce2(0x122))/0x2*(parseInt(_0x376ce2(0x119))/0x3)+parseInt(_0x376ce2(0x16a))/0x4*(-parseInt(_0x376ce2(0x100))/0x5)+-parseInt(_0x376ce2(0x15d))/0x6*(-parseInt(_0x376ce2(0x130))/0x7)+-parseInt(_0x376ce2(0x140))/0x8*(parseInt(_0x376ce2(0x103))/0x9)+parseInt(_0x376ce2(0x116))/0xa*(-parseInt(_0x376ce2(0xe7))/0xb)+parseInt(_0x376ce2(0x114))/0xc;if(_0x4c300b===_0x11acab)break;else _0xa21241['push'](_0xa21241['shift']());}catch(_0x284b63){_0xa21241['push'](_0xa21241['shift']());}}}(_0x4418,0x3c428));Object[_0x378286(0xe9)](exports,Symbol[_0x378286(0x15f)],{'value':_0x378286(0xe5)});const c=require('@univerjs/core'),g=require('@univerjs/thread-comment'),N=require(_0x378286(0x146)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x378286(0x131)),$=require(_0x378286(0x14c)),E=require(_0x378286(0x166)),q=_0x378286(0x13a);var p=(_0x146de7=>(_0x146de7[_0x146de7[_0x378286(0xe3)]=0x0]=_0x378286(0xe3),_0x146de7[_0x146de7['Solved']=0x1]='Solved',_0x146de7[_0x146de7[_0x378286(0x129)]=-0x1]=_0x378286(0x129),_0x146de7))(p||{}),v=(_0x39244b=>(_0x39244b[_0x39244b['Unknown']=0x0]=_0x378286(0x164),_0x39244b[_0x39244b[_0x378286(0x15a)]=0x1]='Add',_0x39244b[_0x39244b[_0x378286(0xf0)]=0x2]=_0x378286(0xf0),_0x39244b[_0x39244b[_0x378286(0x108)]=0x3]=_0x378286(0x108),_0x39244b[_0x39244b[_0x378286(0x172)]=0x4]=_0x378286(0x172),_0x39244b[_0x39244b[_0x378286(0x111)]=0x5]=_0x378286(0x111),_0x39244b[_0x39244b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x39244b))(v||{});const P=_0x99c4fb=>$(new Date(+_0x99c4fb))[_0x378286(0x102)](_0x378286(0x127)),x=async(_0x4dc16f,_0x5cc994)=>{const _0x368388=_0x378286,_0x534de4=_0x4dc16f['get'](c[_0x368388(0x16e)]),_0x3f93a3=_0x4dc16f[_0x368388(0x163)](O[_0x368388(0x155)]);_0x5cc994['forEach'](_0x3e9cdf=>{const _0x1e565a=_0x368388;_0x534de4[_0x1e565a(0x14a)](_0x3e9cdf)&&_0x5cc994[_0x1e565a(0x11f)](_0x3e9cdf);}),_0x5cc994['size']&&(await _0x3f93a3['get'](_0x368388(0x148),{'params':{'userIDs':[..._0x5cc994]}}))['body'][_0x368388(0x107)][_0x368388(0x156)](_0x951b7b=>{_0x951b7b&&_0x534de4['addUser'](_0x951b7b);});};var Y=Object[_0x378286(0xe9)],G=Object[_0x378286(0x10d)],H=(_0xb5f0a8,_0x59a4f1,_0x21d67c,_0x1ae5e2)=>{const _0x480fe6=_0x378286;for(var _0x3d362b=_0x1ae5e2>0x1?void 0x0:_0x1ae5e2?G(_0x59a4f1,_0x21d67c):_0x59a4f1,_0x3e720d=_0xb5f0a8[_0x480fe6(0x128)]-0x1,_0x53e672;_0x3e720d>=0x0;_0x3e720d--)(_0x53e672=_0xb5f0a8[_0x3e720d])&&(_0x3d362b=(_0x1ae5e2?_0x53e672(_0x59a4f1,_0x21d67c,_0x3d362b):_0x53e672(_0x3d362b))||_0x3d362b);return _0x1ae5e2&&_0x3d362b&&Y(_0x59a4f1,_0x21d67c,_0x3d362b),_0x3d362b;},I=(_0x221978,_0xfeb3ca)=>(_0x2ac327,_0x5a8bc8)=>_0xfeb3ca(_0x2ac327,_0x5a8bc8,_0x221978);function L(_0x5a3047,_0x13f746){const _0xfd8312=_0x378286,_0x2062ec=_0x5a3047[_0xfd8312(0x14b)][0x0];return{..._0x13f746,'id':_0x2062ec[_0xfd8312(0x171)],'resolved':_0x5a3047['solved']===0x1,'dT':P(_0x2062ec[_0xfd8312(0x13d)]),'personId':_0x2062ec[_0xfd8312(0xec)],'threadId':_0x2062ec['threadId']};}function _0x2bea(_0x175473,_0x2ff164){const _0x4418a0=_0x4418();return _0x2bea=function(_0x2beaf8,_0x1c08f6){_0x2beaf8=_0x2beaf8-0xe0;let _0x140500=_0x4418a0[_0x2beaf8];return _0x140500;},_0x2bea(_0x175473,_0x2ff164);}function A(_0x5af2e3,_0x28f42f,_0x6c8752){const _0xefae03=_0x378286;var _0x1b6e4b,_0x3873d9;if(((_0x3873d9=(_0x1b6e4b=_0x5af2e3==null?void 0x0:_0x5af2e3['replies'])==null?void 0x0:_0x1b6e4b['length'])!=null?_0x3873d9:0x0)>0x0){const _0x9df778=(_0x7ef1f0,_0x455940)=>({'id':_0x7ef1f0[_0xefae03(0x171)],'threadId':_0x7ef1f0[_0xefae03(0x14d)],'dT':P(_0x7ef1f0[_0xefae03(0x13d)]),'personId':_0x7ef1f0[_0xefae03(0xec)],'resolved':_0x5af2e3[_0xefae03(0x154)]===p['Solved'],'unitId':_0x28f42f,'subUnitId':_0x6c8752,'text':JSON[_0xefae03(0xf6)](_0x7ef1f0[_0xefae03(0xf5)]),'parentId':_0x455940}),_0x26c90e=_0x9df778(_0x5af2e3[_0xefae03(0x14b)][0x0]);return{..._0x26c90e,'children':_0x5af2e3['replies'][_0xefae03(0x11b)](0x1)['map'](_0x175817=>_0x9df778(_0x175817,_0x26c90e['id']))};}return null;}let C=class{constructor(_0x5144ac,_0x459cc2,_0x1d8233,_0xba6a75){const _0x35c7a0=_0x378286;this[_0x35c7a0(0x167)]=_0x5144ac,this['_userService']=_0x459cc2,this[_0x35c7a0(0x169)]=_0x1d8233,this[_0x35c7a0(0x16f)]=_0xba6a75;}async[_0x378286(0x12f)](_0x8234b3){const _0x13fe25=_0x378286;var _0x16b09b,_0x1b5069;const {parentId:_0x7cf2be,unitId:_0x32e7db,text:_0x483e84,threadId:_0x48cef7}=_0x8234b3,_0x2a33de=(_0x1b5069=(_0x16b09b=_0x483e84[_0x13fe25(0x10b)])==null?void 0x0:_0x16b09b[_0x13fe25(0xe4)](_0x4f874c=>_0x4f874c[_0x13fe25(0x123)]===c[_0x13fe25(0x11d)][_0x13fe25(0xf2)])['map'](_0x13ca55=>_0x13ca55[_0x13fe25(0x10c)]))!=null?_0x1b5069:[],_0x3c7f88=JSON[_0x13fe25(0x13c)](_0x483e84),_0x302a90=(await this['_sessionService'][_0x13fe25(0xfc)](_0x32e7db))['getMemberID']();if(_0x7cf2be){const _0x542b4d={'memberId':_0x302a90,'unitId':_0x32e7db,'content':_0x3c7f88,'mention':_0x2a33de,'threadId':_0x48cef7},_0x2be394=(await this[_0x13fe25(0x167)][_0x13fe25(0x152)](_0x13fe25(0x137)+_0x32e7db+_0x13fe25(0x112),{'body':_0x542b4d}))[_0x13fe25(0xe0)][_0x13fe25(0x161)];return{..._0x8234b3,'id':_0x2be394[_0x13fe25(0x171)],'dT':$(+_0x2be394[_0x13fe25(0x13d)])[_0x13fe25(0x102)](_0x13fe25(0x127)),'personId':_0x2be394[_0x13fe25(0xec)]};}else{const _0xcca8e5={'memberId':_0x302a90,'unitId':_0x32e7db,'content':_0x3c7f88,'mention':_0x2a33de},_0x2024fa=await this[_0x13fe25(0x167)][_0x13fe25(0x152)]('/universer-api/comment/unit/'+_0x32e7db+_0x13fe25(0x151),{'body':_0xcca8e5});return L(_0x2024fa[_0x13fe25(0xe0)][_0x13fe25(0xf9)],_0x8234b3);}}async['updateComment'](_0x265f49){const _0x39ff13=_0x378286;var _0x4ca9bd,_0xb6e8d7;const {text:_0x5b6f55,unitId:_0x4064e5}=_0x265f49,_0x4d6f89=(_0xb6e8d7=(_0x4ca9bd=_0x5b6f55[_0x39ff13(0x10b)])==null?void 0x0:_0x4ca9bd['filter'](_0x80c15a=>_0x80c15a[_0x39ff13(0x123)]===c[_0x39ff13(0x11d)]['COMMENT'])[_0x39ff13(0xea)](_0xa75cd8=>_0xa75cd8[_0x39ff13(0x10c)]))!=null?_0xb6e8d7:[],_0x2d477a=JSON[_0x39ff13(0x13c)](_0x5b6f55),_0x13be84=_0x265f49['threadId'],_0x5d9cb1=_0x265f49['id'],_0x19dc23={'memberId':(await this[_0x39ff13(0x169)][_0x39ff13(0xfc)](_0x4064e5))[_0x39ff13(0xe8)](),'unitId':_0x4064e5,'threadId':_0x13be84,'mention':_0x4d6f89,'content':_0x2d477a,'replyId':_0x5d9cb1},_0x17e9d8=await this[_0x39ff13(0x167)][_0x39ff13(0x152)](_0x39ff13(0x137)+_0x4064e5+_0x39ff13(0x153),{'body':_0x19dc23});return!_0x17e9d8['body'][_0x39ff13(0x170)]||_0x17e9d8['body'][_0x39ff13(0x170)][_0x39ff13(0x12e)]===0x1;}async[_0x378286(0x13b)](_0x5e0050){const _0x296756=_0x378286,{unitId:_0x2499cd}=_0x5e0050,_0x17039b=_0x5e0050[_0x296756(0x14d)],_0x4f4d94={'memberId':this['_userService'][_0x296756(0x120)]()['userID'],'unitId':_0x2499cd,'threadId':_0x17039b,'solved':_0x5e0050[_0x296756(0xef)]?p[_0x296756(0x101)]:p[_0x296756(0xe3)]},_0x16f352=await this[_0x296756(0x167)][_0x296756(0x152)](_0x296756(0x137)+_0x2499cd+_0x296756(0x158),{'body':_0x4f4d94});return!_0x16f352[_0x296756(0xe0)][_0x296756(0x170)]||_0x16f352[_0x296756(0xe0)]['error'][_0x296756(0x12e)]===0x1;}async[_0x378286(0x150)](_0xaacfa5,_0x2e83ed,_0x3fe96b,_0x44fa93){const _0x353888=_0x378286,_0x2544af={'memberId':(await this[_0x353888(0x169)]['requireSession'](_0xaacfa5))[_0x353888(0xe8)](),'threadId':_0x3fe96b,'replyId':_0x44fa93,'unitId':_0xaacfa5},_0x3b3f56=await this[_0x353888(0x167)][_0x353888(0x152)](_0x353888(0x137)+_0xaacfa5+_0x353888(0x16c),{'body':_0x2544af});return!_0x3b3f56['body']['error']||_0x3b3f56['body'][_0x353888(0x170)]['code']===0x1;}async['listComments'](_0x37a6cc,_0x5c9d56,_0x3a7c5f){const _0x5db9d0=_0x378286,_0x1dcd73={'unitId':_0x37a6cc,'threadId':_0x3a7c5f},_0x2b3a12=await this[_0x5db9d0(0x167)][_0x5db9d0(0x152)](_0x5db9d0(0x137)+_0x37a6cc+_0x5db9d0(0x162),{'body':_0x1dcd73}),_0x32f4d2=_0x3a7c5f[_0x5db9d0(0xea)](_0x19bb9e=>A(_0x2b3a12[_0x5db9d0(0xe0)]['comments'][_0x19bb9e],_0x37a6cc,_0x5c9d56))['filter'](Boolean);return Object['values'](_0x2b3a12['body'][_0x5db9d0(0x107)])[_0x5db9d0(0x156)](_0x32c00b=>{const _0x5c5ee6=_0x5db9d0;this[_0x5c5ee6(0x115)][_0x5c5ee6(0x13f)](_0x32c00b);}),_0x32f4d2;}[_0x378286(0x106)](_0xff9b1a){const _0x1be821=_0x378286;return{'id':_0xff9b1a['id'],'threadId':_0xff9b1a['threadId'],'ref':_0xff9b1a[_0x1be821(0x12a)]};}};C=H([I(0x0,c[_0x378286(0x147)](O[_0x378286(0x155)])),I(0x1,c[_0x378286(0x147)](c[_0x378286(0x16e)])),I(0x2,c[_0x378286(0x147)](y['CollaborationSessionService'])),I(0x3,c['Inject'](c['Injector']))],C);var J=Object['defineProperty'],F=Object[_0x378286(0x10d)],Z=(_0x456d8d,_0x47177c,_0x3b5787,_0x469c4b)=>{for(var _0x1795f3=_0x469c4b>0x1?void 0x0:_0x469c4b?F(_0x47177c,_0x3b5787):_0x47177c,_0x50ad7a=_0x456d8d['length']-0x1,_0x269ffb;_0x50ad7a>=0x0;_0x50ad7a--)(_0x269ffb=_0x456d8d[_0x50ad7a])&&(_0x1795f3=(_0x469c4b?_0x269ffb(_0x47177c,_0x3b5787,_0x1795f3):_0x269ffb(_0x1795f3))||_0x1795f3);return _0x469c4b&&_0x1795f3&&J(_0x47177c,_0x3b5787,_0x1795f3),_0x1795f3;},W=(_0x2f7e51,_0x310b5c)=>(_0x44519,_0x3d13eb)=>_0x310b5c(_0x44519,_0x3d13eb,_0x2f7e51);function _0x4418(){const _0x5dc4ae=['/universer-api/user/list','_initUserSync','getUser','replies','dayjs','threadId','getThread','UniverThreadCommentDataSourcePlugin','deleteComment','/add','post','/edit','solved','HTTPService','forEach','syncUpdateMutationToColla','/solved','ThreadCommentModel','Add','_config','avatar','579732iIkYnh','_threadCommentDataSource','toStringTag','href','reply','/list','get','Unknown','Plugin','rxjs','_httpService','_threadCommentMentionDataSource','_sessionService','68LUnfmC','add','/delete','userID','UserManagerService','_injector','error','replyId','Delete','body','IConfigService','_init','OpenOrReOpen','filter','Module','_initDataSource','715vQcpfb','getMemberID','defineProperty','map','updateComment','userId','UniverCollaborationClientPlugin','user','resolved','Reply','symbol','COMMENT','Injector','DependentOn','content','parse','bufferTime','Disposable','comment','Ready','://','requireSession','UNIVER_UNKNOWN','getMentions','OnLifecycle','82295flzTFN','Solved','format','293805fXtXWh','UniverInstanceType','type','saveCommentToSnapshot','users','Edit','CommentService','disposeWithMe','customRanges','rangeId','getOwnPropertyDescriptor','subject','subscribe','_threadCommentModel','Solve','/reply','unit','4959852GXnLlR','_userService','13970bfGKKo','LifecycleStages','thread-comment-data-source.config','174684COcrNf','setConfig','slice','UniverThreadCommentUIPlugin','CustomRangeType','protocol','delete','getCurrentUser','_commentService','2EQPrQR','rangeType','searchParams','Starting','commentUpdate$','YYYY/MM/DD\x20HH:mm','length','UNRECOGNIZED','ref','https','IThreadCommentDataSourceService','unitId','code','addComment','21BfAIyd','@univerjs/network','UniverThreadCommentPlugin','collaborators','pluginName','IThreadCommentMentionDataService','host','/universer-api/comment/unit/','_threadCommentMentionDataService','http','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolveComment','stringify','createTimestamp','name','addUser','104yNNpBq','_threadCommentDataSourceService','personId','396858CUjCBP','_configService','/universer-api/authz/collaborator','@univerjs/thread-comment-ui','Inject'];_0x4418=function(){return _0x5dc4ae;};return _0x4418();}let D=class{constructor(_0x34313e){const _0x132d04=_0x378286;this[_0x132d04(0x167)]=_0x34313e;}async[_0x378286(0xfe)](_0x171921,_0x31dd58,_0x37814d){const _0x4cee70=_0x378286,_0x4c7605=new URL(window['location'][_0x4cee70(0x160)])[_0x4cee70(0x124)][_0x4cee70(0x163)](_0x4cee70(0x113));if(!_0x4c7605)return[];const _0x18118a=window['location'][_0x4cee70(0x136)],_0x5b2979=window['location'][_0x4cee70(0x11e)]==='https:'?_0x4cee70(0x12b):_0x4cee70(0x139);return(await this[_0x4cee70(0x167)][_0x4cee70(0x163)](_0x5b2979+_0x4cee70(0xfb)+_0x18118a+_0x4cee70(0x145),{'params':{'objectID':_0x4c7605,'unitID':_0x4c7605}}))[_0x4cee70(0xe0)][_0x4cee70(0x133)][_0x4cee70(0xea)](_0x734edb=>{const _0x15767a=_0x4cee70;var _0x272712,_0x3eb780,_0x15117b,_0x25a393,_0x1b57e8,_0x26cea5;return{'id':(_0x3eb780=(_0x272712=_0x734edb[_0x15767a(0x10e)])==null?void 0x0:_0x272712[_0x15767a(0x16d)])!=null?_0x3eb780:'','label':(_0x25a393=(_0x15117b=_0x734edb[_0x15767a(0x10e)])==null?void 0x0:_0x15117b[_0x15767a(0x13e)])!=null?_0x25a393:'','icon':(_0x26cea5=(_0x1b57e8=_0x734edb['subject'])==null?void 0x0:_0x1b57e8[_0x15767a(0x15c)])!=null?_0x26cea5:'','type':_0x15767a(0xee)};});}};D=Z([W(0x0,c['Inject'](O[_0x378286(0x155)]))],D);var z=Object['defineProperty'],B=Object[_0x378286(0x10d)],K=(_0x52901e,_0x3e338e,_0x3f3cfb,_0x192295)=>{const _0x40e2c2=_0x378286;for(var _0x58a8a4=_0x192295>0x1?void 0x0:_0x192295?B(_0x3e338e,_0x3f3cfb):_0x3e338e,_0x591850=_0x52901e[_0x40e2c2(0x128)]-0x1,_0x433f79;_0x591850>=0x0;_0x591850--)(_0x433f79=_0x52901e[_0x591850])&&(_0x58a8a4=(_0x192295?_0x433f79(_0x3e338e,_0x3f3cfb,_0x58a8a4):_0x433f79(_0x58a8a4))||_0x58a8a4);return _0x192295&&_0x58a8a4&&z(_0x3e338e,_0x3f3cfb,_0x58a8a4),_0x58a8a4;},S=(_0x5c500e,_0x35d4df)=>(_0x2c98ee,_0x3719a3)=>_0x35d4df(_0x2c98ee,_0x3719a3,_0x5c500e);let f=class extends c[_0x378286(0xf8)]{constructor(_0x3f52db,_0x33b088,_0x349cf9,_0x50c71c){const _0x236ad6=_0x378286;super(),this['_threadCommentDataSourceService']=_0x3f52db,this[_0x236ad6(0x15e)]=_0x33b088,this[_0x236ad6(0x138)]=_0x349cf9,this[_0x236ad6(0x168)]=_0x50c71c,this[_0x236ad6(0xe6)]();}[_0x378286(0xe6)](){const _0x432b79=_0x378286;this[_0x432b79(0x141)]['dataSource']=this[_0x432b79(0x15e)],this['_threadCommentDataSourceService'][_0x432b79(0x157)]=!0x1,this[_0x432b79(0x138)]['dataSource']=this[_0x432b79(0x168)];}};f=K([c[_0x378286(0xff)](c['LifecycleStages'][_0x378286(0x125)],f),S(0x0,g[_0x378286(0x12c)]),S(0x1,c[_0x378286(0x147)](C)),S(0x2,N[_0x378286(0x135)]),S(0x3,c[_0x378286(0x147)](D))],f);var V=Object[_0x378286(0xe9)],Q=Object[_0x378286(0x10d)],X=(_0x555ff0,_0x31e61a,_0x3f6c01,_0x44e979)=>{const _0x333f8f=_0x378286;for(var _0x58ddcb=_0x44e979>0x1?void 0x0:_0x44e979?Q(_0x31e61a,_0x3f6c01):_0x31e61a,_0x226f74=_0x555ff0[_0x333f8f(0x128)]-0x1,_0x15befd;_0x226f74>=0x0;_0x226f74--)(_0x15befd=_0x555ff0[_0x226f74])&&(_0x58ddcb=(_0x44e979?_0x15befd(_0x31e61a,_0x3f6c01,_0x58ddcb):_0x15befd(_0x58ddcb))||_0x58ddcb);return _0x44e979&&_0x58ddcb&&V(_0x31e61a,_0x3f6c01,_0x58ddcb),_0x58ddcb;},_=(_0x4612bf,_0xca1ff1)=>(_0xe2e6ce,_0x10409b)=>_0xca1ff1(_0xe2e6ce,_0x10409b,_0x4612bf);let b=class extends c[_0x378286(0xf8)]{constructor(_0x59df95,_0x372c99,_0x2dba9b,_0xed38a3){const _0x1ef92e=_0x378286;super(),this['_commentService']=_0x59df95,this[_0x1ef92e(0x110)]=_0x372c99,this[_0x1ef92e(0x115)]=_0x2dba9b,this[_0x1ef92e(0x16f)]=_0xed38a3,this[_0x1ef92e(0xe2)](),this['_initUserSync']();}[_0x378286(0x149)](){const _0x3bfed5=_0x378286;this['disposeWithMe'](this[_0x3bfed5(0x110)]['commentUpdate$']['pipe'](E[_0x3bfed5(0xf7)](0x10))[_0x3bfed5(0x10f)](_0x59a912=>{const _0x12861e=_0x3bfed5,_0x3bfd5c=new Set();_0x59a912[_0x12861e(0x156)](_0x154df3=>{const _0x50160f=_0x12861e;switch(_0x154df3[_0x50160f(0x105)]){case _0x50160f(0x16b):{const _0x44d847=_0x154df3['payload'][_0x50160f(0x142)];_0x3bfd5c[_0x50160f(0x16b)](_0x44d847);break;}}}),x(this[_0x12861e(0x16f)],_0x3bfd5c);}));}[_0x378286(0xe2)](){const _0x335207=_0x378286;this[_0x335207(0x10a)](this[_0x335207(0x121)][_0x335207(0x126)]['subscribe'](async _0x1a2479=>{const _0x21db72=_0x335207;var _0x260bcd,_0x490fe1;const _0x3eb158=this[_0x21db72(0x110)][_0x21db72(0x14e)](_0x1a2479[_0x21db72(0x12d)],_0x1a2479[_0x21db72(0x14d)]);if(!_0x3eb158)return;const {unitId:_0x1aedfb,subUnitId:_0x4e5f2b}=_0x3eb158;switch(_0x1a2479['user']&&this['_userService'][_0x21db72(0x13f)](_0x1a2479[_0x21db72(0xee)]),_0x1a2479[_0x21db72(0x105)]){case v[_0x21db72(0x15a)]:break;case v[_0x21db72(0xf0)]:{this['_threadCommentModel'][_0x21db72(0x12f)](_0x1aedfb,_0x4e5f2b,{'unitId':_0x1aedfb,'subUnitId':_0x4e5f2b,'ref':'','id':_0x1a2479['replyId'],'dT':P(+_0x1a2479[_0x21db72(0x13d)]),'threadId':_0x1a2479[_0x21db72(0x14d)],'personId':(_0x490fe1=(_0x260bcd=_0x1a2479[_0x21db72(0xee)])==null?void 0x0:_0x260bcd[_0x21db72(0x16d)])!=null?_0x490fe1:_0x1a2479[_0x21db72(0xec)],'text':JSON[_0x21db72(0xf6)](_0x1a2479[_0x21db72(0xf5)]),'parentId':_0x3eb158['id']});break;}case v[_0x21db72(0x172)]:{const _0x1abe73=this[_0x21db72(0x110)]['getComment'](_0x1aedfb,_0x4e5f2b,_0x1a2479[_0x21db72(0x171)]);_0x1abe73&&_0x1abe73['parentId']&&this[_0x21db72(0x110)][_0x21db72(0x150)](_0x1aedfb,_0x4e5f2b,_0x1a2479[_0x21db72(0x171)]);break;}case v[_0x21db72(0x108)]:{this[_0x21db72(0x110)][_0x21db72(0xeb)](_0x1aedfb,_0x4e5f2b,{'commentId':_0x1a2479[_0x21db72(0x171)],'text':JSON[_0x21db72(0xf6)](_0x1a2479[_0x21db72(0xf5)])});break;}case v[_0x21db72(0x111)]:{const _0x409a5f=this[_0x21db72(0x110)][_0x21db72(0x14e)](_0x1aedfb,_0x1a2479[_0x21db72(0x14d)]);_0x409a5f&&this[_0x21db72(0x110)][_0x21db72(0x13b)](_0x1aedfb,_0x4e5f2b,_0x409a5f['id'],_0x1a2479[_0x21db72(0x154)]===p[_0x21db72(0x101)]);break;}}}));}};b=X([c[_0x378286(0xff)](c[_0x378286(0x117)][_0x378286(0xfa)],b),_(0x0,c['Inject'](y[_0x378286(0x109)])),_(0x1,c[_0x378286(0x147)](g[_0x378286(0x159)])),_(0x2,c[_0x378286(0x147)](c[_0x378286(0x16e)])),_(0x3,c[_0x378286(0x147)](c[_0x378286(0xf3)]))],b);const k=_0x378286(0x118),ee={};var U=Object[_0x378286(0xe9)],re=Object[_0x378286(0x10d)],te=(_0x57299b,_0x48195d,_0x91856f)=>_0x48195d in _0x57299b?U(_0x57299b,_0x48195d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x91856f}):_0x57299b[_0x48195d]=_0x91856f,se=(_0x481637,_0x126f1e,_0x1546e9,_0x30d186)=>{const _0x474548=_0x378286;for(var _0x1d080e=_0x30d186>0x1?void 0x0:_0x30d186?re(_0x126f1e,_0x1546e9):_0x126f1e,_0x158e69=_0x481637[_0x474548(0x128)]-0x1,_0x4b03bc;_0x158e69>=0x0;_0x158e69--)(_0x4b03bc=_0x481637[_0x158e69])&&(_0x1d080e=(_0x30d186?_0x4b03bc(_0x126f1e,_0x1546e9,_0x1d080e):_0x4b03bc(_0x1d080e))||_0x1d080e);return _0x30d186&&_0x1d080e&&U(_0x126f1e,_0x1546e9,_0x1d080e),_0x1d080e;},T=(_0x922e39,_0x5adc2e)=>(_0x39548f,_0x51d7d3)=>_0x5adc2e(_0x39548f,_0x51d7d3,_0x922e39),R=(_0x4acf37,_0x44d959,_0x4ce14a)=>te(_0x4acf37,typeof _0x44d959!=_0x378286(0xf1)?_0x44d959+'':_0x44d959,_0x4ce14a);exports[_0x378286(0x14f)]=class extends c[_0x378286(0x165)]{constructor(_0x317581=ee,_0x58adff,_0x27c3fd){const _0x2dfc67=_0x378286;super(),this[_0x2dfc67(0x15b)]=_0x317581,this['_injector']=_0x58adff,this[_0x2dfc67(0x144)]=_0x27c3fd;const {..._0x120c32}=this['_config'];this[_0x2dfc67(0x144)][_0x2dfc67(0x11a)](k,_0x120c32);}['onStarting'](){const _0x4d4ee5=_0x378286;[[D],[C],[f],[b]][_0x4d4ee5(0x156)](_0x41bc51=>{const _0x4b915a=_0x4d4ee5;this['_injector'][_0x4b915a(0x16b)](_0x41bc51);});}},R(exports[_0x378286(0x14f)],_0x378286(0x134),q),R(exports['UniverThreadCommentDataSourcePlugin'],_0x378286(0x105),c[_0x378286(0x104)][_0x378286(0xfd)]),exports['UniverThreadCommentDataSourcePlugin']=se([c[_0x378286(0xf4)](g[_0x378286(0x132)],N[_0x378286(0x11c)],y[_0x378286(0xed)]),T(0x1,c[_0x378286(0x147)](c[_0x378286(0xf3)])),T(0x2,c[_0x378286(0xe1)])],exports[_0x378286(0x14f)]);
|
|
1
|
+
'use strict';const _0x1f4f70=_0x2fe5;(function(_0x5f4eba,_0x1fec57){const _0x1c694f=_0x2fe5,_0x2a8bf1=_0x5f4eba();while(!![]){try{const _0x56610d=-parseInt(_0x1c694f(0x10e))/0x1*(parseInt(_0x1c694f(0x14b))/0x2)+-parseInt(_0x1c694f(0xed))/0x3+parseInt(_0x1c694f(0x131))/0x4*(-parseInt(_0x1c694f(0xf9))/0x5)+-parseInt(_0x1c694f(0xdf))/0x6+-parseInt(_0x1c694f(0xff))/0x7*(parseInt(_0x1c694f(0xf0))/0x8)+-parseInt(_0x1c694f(0x14c))/0x9*(parseInt(_0x1c694f(0x14e))/0xa)+-parseInt(_0x1c694f(0xf1))/0xb*(-parseInt(_0x1c694f(0x11c))/0xc);if(_0x56610d===_0x1fec57)break;else _0x2a8bf1['push'](_0x2a8bf1['shift']());}catch(_0x308779){_0x2a8bf1['push'](_0x2a8bf1['shift']());}}}(_0x200b,0x943ab));Object['defineProperty'](exports,Symbol[_0x1f4f70(0x14f)],{'value':'Module'});const c=require('@univerjs/core'),g=require('@univerjs/thread-comment'),N=require(_0x1f4f70(0x108)),y=require('@univerjs-pro/collaboration-client'),E=require(_0x1f4f70(0x15f)),q=require('rxjs'),O=require(_0x1f4f70(0x115)),$=require(_0x1f4f70(0x137)),x=_0x1f4f70(0x119);function _0x2fe5(_0x253a93,_0xc2c45a){const _0x200b19=_0x200b();return _0x2fe5=function(_0x2fe5a1,_0x2aff71){_0x2fe5a1=_0x2fe5a1-0xd4;let _0x50abad=_0x200b19[_0x2fe5a1];return _0x50abad;},_0x2fe5(_0x253a93,_0xc2c45a);}var p=(_0xb145e4=>(_0xb145e4[_0xb145e4['OpenOrReOpen']=0x0]=_0x1f4f70(0xd7),_0xb145e4[_0xb145e4[_0x1f4f70(0xd8)]=0x1]=_0x1f4f70(0xd8),_0xb145e4[_0xb145e4[_0x1f4f70(0x124)]=-0x1]=_0x1f4f70(0x124),_0xb145e4))(p||{}),v=(_0x574375=>(_0x574375[_0x574375['Unknown']=0x0]=_0x1f4f70(0x11d),_0x574375[_0x574375['Add']=0x1]=_0x1f4f70(0x13d),_0x574375[_0x574375[_0x1f4f70(0x12b)]=0x2]='Reply',_0x574375[_0x574375[_0x1f4f70(0x142)]=0x3]=_0x1f4f70(0x142),_0x574375[_0x574375[_0x1f4f70(0x14d)]=0x4]=_0x1f4f70(0x14d),_0x574375[_0x574375[_0x1f4f70(0xf7)]=0x5]=_0x1f4f70(0xf7),_0x574375[_0x574375['UNRECOGNIZED']=-0x1]=_0x1f4f70(0x124),_0x574375))(v||{});const P=_0x196e28=>$(new Date(+_0x196e28))[_0x1f4f70(0xf5)](_0x1f4f70(0x13e)),L=async(_0x34be17,_0x161732)=>{const _0x38e9ce=_0x1f4f70,_0x2b11e3=_0x34be17[_0x38e9ce(0x140)](c['UserManagerService']),_0x58f527=_0x34be17[_0x38e9ce(0x140)](O[_0x38e9ce(0xec)]);_0x161732[_0x38e9ce(0xdb)](_0x83a851=>{const _0x1aec5e=_0x38e9ce;_0x2b11e3['getUser'](_0x83a851)&&_0x161732[_0x1aec5e(0x11a)](_0x83a851);}),_0x161732[_0x38e9ce(0x10f)]&&(await _0x58f527[_0x38e9ce(0x140)](_0x38e9ce(0xd6),{'params':{'userIDs':[..._0x161732]}}))[_0x38e9ce(0x155)][_0x38e9ce(0x123)][_0x38e9ce(0xdb)](_0x30558e=>{const _0x3d44a4=_0x38e9ce;_0x30558e&&_0x2b11e3[_0x3d44a4(0x150)](_0x30558e);});};var Y=Object[_0x1f4f70(0x147)],G=Object[_0x1f4f70(0x12c)],H=(_0x1c342b,_0x12a754,_0x744135,_0x130223)=>{const _0x1cf0bf=_0x1f4f70;for(var _0x591627=_0x130223>0x1?void 0x0:_0x130223?G(_0x12a754,_0x744135):_0x12a754,_0x568070=_0x1c342b[_0x1cf0bf(0x15c)]-0x1,_0x153446;_0x568070>=0x0;_0x568070--)(_0x153446=_0x1c342b[_0x568070])&&(_0x591627=(_0x130223?_0x153446(_0x12a754,_0x744135,_0x591627):_0x153446(_0x591627))||_0x591627);return _0x130223&&_0x591627&&Y(_0x12a754,_0x744135,_0x591627),_0x591627;},I=(_0x12441,_0x1708ca)=>(_0x18a20b,_0xa939d9)=>_0x1708ca(_0x18a20b,_0xa939d9,_0x12441);let f=class extends c['Disposable']{constructor(_0x29b248,_0x456bd6,_0x3cb8ec,_0x4a12b8){const _0x402a6b=_0x1f4f70;super(),this[_0x402a6b(0x14a)]=_0x29b248,this[_0x402a6b(0xe2)]=_0x456bd6,this[_0x402a6b(0xe1)]=_0x3cb8ec,this['_injector']=_0x4a12b8,this[_0x402a6b(0x117)](),this[_0x402a6b(0x105)]();}['_initUserSync'](){const _0x22f710=_0x1f4f70;this[_0x22f710(0x114)](this[_0x22f710(0xe2)][_0x22f710(0xea)][_0x22f710(0x101)](q[_0x22f710(0x15d)](0x10))[_0x22f710(0x10c)](_0x521579=>{const _0x1b0f90=_0x22f710,_0x439e12=new Set();_0x521579[_0x1b0f90(0xdb)](_0x553ba5=>{const _0x4a8dfa=_0x1b0f90;switch(_0x553ba5[_0x4a8dfa(0x132)]){case _0x4a8dfa(0x146):{const _0x8c8718=_0x553ba5['payload'][_0x4a8dfa(0xf6)];_0x439e12['add'](_0x8c8718);break;}}}),L(this['_injector'],_0x439e12);}));}[_0x1f4f70(0x117)](){const _0x451e6b=_0x1f4f70;this[_0x451e6b(0x114)](this[_0x451e6b(0x14a)]['commentUpdate$']['subscribe'](async _0x14fab9=>{const _0x2d2396=_0x451e6b;var _0x3b4e4a,_0x2c5c5c;const _0x470c56=this[_0x2d2396(0xe2)]['getThread'](_0x14fab9[_0x2d2396(0x154)],_0x14fab9[_0x2d2396(0x13f)]);if(!_0x470c56)return;const {unitId:_0x1e1445,subUnitId:_0x3dc2bf}=_0x470c56;switch(_0x14fab9[_0x2d2396(0xf2)]&&this[_0x2d2396(0xe1)][_0x2d2396(0x150)](_0x14fab9['user']),_0x14fab9[_0x2d2396(0x132)]){case v[_0x2d2396(0x13d)]:break;case v['Reply']:{this[_0x2d2396(0xe2)][_0x2d2396(0xe9)](_0x1e1445,_0x3dc2bf,{'unitId':_0x1e1445,'subUnitId':_0x3dc2bf,'ref':'','id':_0x14fab9[_0x2d2396(0x116)],'dT':P(+_0x14fab9[_0x2d2396(0xfe)]),'threadId':_0x14fab9['threadId'],'personId':(_0x2c5c5c=(_0x3b4e4a=_0x14fab9[_0x2d2396(0xf2)])==null?void 0x0:_0x3b4e4a[_0x2d2396(0x104)])!=null?_0x2c5c5c:_0x14fab9[_0x2d2396(0xe4)],'text':JSON[_0x2d2396(0x11b)](_0x14fab9[_0x2d2396(0x134)]),'parentId':_0x470c56['id']});break;}case v['Delete']:{const _0x893f86=this[_0x2d2396(0xe2)]['getComment'](_0x1e1445,_0x3dc2bf,_0x14fab9['replyId']);_0x893f86&&_0x893f86[_0x2d2396(0x10b)]&&this[_0x2d2396(0xe2)][_0x2d2396(0xde)](_0x1e1445,_0x3dc2bf,_0x14fab9[_0x2d2396(0x116)]);break;}case v['Edit']:{this[_0x2d2396(0xe2)]['updateComment'](_0x1e1445,_0x3dc2bf,{'commentId':_0x14fab9[_0x2d2396(0x116)],'text':JSON['parse'](_0x14fab9['content'])});break;}case v['Solve']:{const _0x2a2f92=this[_0x2d2396(0xe2)][_0x2d2396(0xe6)](_0x1e1445,_0x14fab9['threadId']);_0x2a2f92&&this[_0x2d2396(0xe2)][_0x2d2396(0x126)](_0x1e1445,_0x3dc2bf,_0x2a2f92['id'],_0x14fab9[_0x2d2396(0x110)]===p['Solved']);break;}}}));}};f=H([c[_0x1f4f70(0x139)](c[_0x1f4f70(0x122)]['Ready'],f),I(0x0,c[_0x1f4f70(0x103)](y[_0x1f4f70(0x12f)])),I(0x1,c[_0x1f4f70(0x103)](g[_0x1f4f70(0x141)])),I(0x2,c[_0x1f4f70(0x103)](c['UserManagerService'])),I(0x3,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)]))],f);const A=_0x1f4f70(0xe5),J={};var F=Object[_0x1f4f70(0x147)],Z=Object[_0x1f4f70(0x12c)],W=(_0x502a41,_0x892612,_0x532b6f,_0x2a9337)=>{const _0x1c0d08=_0x1f4f70;for(var _0x3e1d2f=_0x2a9337>0x1?void 0x0:_0x2a9337?Z(_0x892612,_0x532b6f):_0x892612,_0x3e87d9=_0x502a41[_0x1c0d08(0x15c)]-0x1,_0x55c549;_0x3e87d9>=0x0;_0x3e87d9--)(_0x55c549=_0x502a41[_0x3e87d9])&&(_0x3e1d2f=(_0x2a9337?_0x55c549(_0x892612,_0x532b6f,_0x3e1d2f):_0x55c549(_0x3e1d2f))||_0x3e1d2f);return _0x2a9337&&_0x3e1d2f&&F(_0x892612,_0x532b6f,_0x3e1d2f),_0x3e1d2f;},S=(_0x34a40f,_0x5d4992)=>(_0x4626cf,_0x50415b)=>_0x5d4992(_0x4626cf,_0x50415b,_0x34a40f);function _0x200b(){const _0x15b968=['https','@univerjs/thread-comment-ui','/solved','DependentOn','parentId','subscribe','dataSource','8qpOASn','size','solved','/edit','/reply','onStarting','disposeWithMe','@univerjs/network','replyId','_init','host','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','parse','2450892YdKIvh','Unknown','filter','getCurrentUser','_configService','_httpService','LifecycleStages','users','UNRECOGNIZED','slice','resolveComment','getMentions','UniverLicensePlugin','code','href','Reply','getOwnPropertyDescriptor','/delete','IConfigService','CommentService','location','8kJVvqA','type','stringify','content','_threadCommentMentionDataService','IThreadCommentMentionDataService','dayjs','UniverInstanceType','OnLifecycle','syncUpdateMutationToColla','CustomRangeType','name','Add','YYYY/MM/DD\x20HH:mm','threadId','get','ThreadCommentModel','Edit','unit','getMemberID','resolved','add','defineProperty','Starting','_threadCommentMentionDataSource','_commentService','52708zwLmWg','5208561cJYAvr','Delete','20jKyeQp','toStringTag','addUser','Injector','_threadCommentDataSourceService','/list','unitId','body','error','UserManagerService','setConfig','/universer-api/comment/unit/','rangeType','comments','length','bufferTime','listComments','@univerjs-pro/license','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','COMMENT','/universer-api/user/list','OpenOrReOpen','Solved','rangeId','Plugin','forEach','values','comment','deleteComment','795402VVuVMW','post','_userService','_threadCommentModel','customRanges','userId','thread-comment-data-source.config','getThread','pluginName','Disposable','addComment','commentUpdate$','_initDataSource','HTTPService','120753jGvpEu','_sessionService','ref','27096ylQyGO','121QZZZuZ','user','protocol','saveCommentToSnapshot','format','personId','Solve','map','25835TQMTpV','subject','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','requireSession','createTimestamp','182ssKVWg','replies','pipe','_config','Inject','userID','_initUserSync','_injector'];_0x200b=function(){return _0x15b968;};return _0x200b();}function z(_0x199b07,_0x39dc64){const _0x15b74c=_0x1f4f70,_0x59b935=_0x199b07[_0x15b74c(0x100)][0x0];return{..._0x39dc64,'id':_0x59b935[_0x15b74c(0x116)],'resolved':_0x199b07[_0x15b74c(0x110)]===0x1,'dT':P(_0x59b935[_0x15b74c(0xfe)]),'personId':_0x59b935['userId'],'threadId':_0x59b935[_0x15b74c(0x13f)]};}function B(_0x5d96ad,_0x3d937f,_0x5d23f9){const _0x244a5d=_0x1f4f70;var _0x336719,_0x2fb343;if(((_0x2fb343=(_0x336719=_0x5d96ad==null?void 0x0:_0x5d96ad[_0x244a5d(0x100)])==null?void 0x0:_0x336719[_0x244a5d(0x15c)])!=null?_0x2fb343:0x0)>0x0){const _0x3fce54=(_0x5b18a5,_0x22a9fd)=>({'id':_0x5b18a5[_0x244a5d(0x116)],'threadId':_0x5b18a5['threadId'],'dT':P(_0x5b18a5[_0x244a5d(0xfe)]),'personId':_0x5b18a5[_0x244a5d(0xe4)],'resolved':_0x5d96ad[_0x244a5d(0x110)]===p['Solved'],'unitId':_0x3d937f,'subUnitId':_0x5d23f9,'text':JSON[_0x244a5d(0x11b)](_0x5b18a5[_0x244a5d(0x134)]),'parentId':_0x22a9fd}),_0x222cd2=_0x3fce54(_0x5d96ad[_0x244a5d(0x100)][0x0]);return{..._0x222cd2,'children':_0x5d96ad['replies'][_0x244a5d(0x125)](0x1)['map'](_0x5ce931=>_0x3fce54(_0x5ce931,_0x222cd2['id']))};}return null;}let C=class{constructor(_0x2f1906,_0xf9f4f,_0x4f5a1b,_0x2ecea6){const _0x1ddb7d=_0x1f4f70;this[_0x1ddb7d(0x121)]=_0x2f1906,this[_0x1ddb7d(0xe1)]=_0xf9f4f,this[_0x1ddb7d(0xee)]=_0x4f5a1b,this[_0x1ddb7d(0x106)]=_0x2ecea6;}async[_0x1f4f70(0xe9)](_0x1ec41e){const _0x3a3c07=_0x1f4f70;var _0x5825fa,_0x480694;const {parentId:_0x43dbc9,unitId:_0x44b3af,text:_0x121ab8,threadId:_0x5696d}=_0x1ec41e,_0x3fcca1=(_0x480694=(_0x5825fa=_0x121ab8[_0x3a3c07(0xe3)])==null?void 0x0:_0x5825fa[_0x3a3c07(0x11e)](_0x5d1bab=>_0x5d1bab[_0x3a3c07(0x15a)]===c['CustomRangeType'][_0x3a3c07(0xd5)])[_0x3a3c07(0xf8)](_0x347ae3=>_0x347ae3[_0x3a3c07(0xd9)]))!=null?_0x480694:[],_0x4e6477=JSON[_0x3a3c07(0x133)](_0x121ab8),_0x130f8b=(await this[_0x3a3c07(0xee)]['requireSession'](_0x44b3af))[_0x3a3c07(0x144)]();if(_0x43dbc9){const _0x1e5ff1={'memberId':_0x130f8b,'unitId':_0x44b3af,'content':_0x4e6477,'mention':_0x3fcca1,'threadId':_0x5696d},_0x51017c=(await this[_0x3a3c07(0x121)]['post'](_0x3a3c07(0x159)+_0x44b3af+_0x3a3c07(0x112),{'body':_0x1e5ff1}))[_0x3a3c07(0x155)]['reply'];return{..._0x1ec41e,'id':_0x51017c[_0x3a3c07(0x116)],'dT':$(+_0x51017c[_0x3a3c07(0xfe)])[_0x3a3c07(0xf5)](_0x3a3c07(0x13e)),'personId':_0x51017c[_0x3a3c07(0xe4)]};}else{const _0x282a10={'memberId':_0x130f8b,'unitId':_0x44b3af,'content':_0x4e6477,'mention':_0x3fcca1},_0x321161=await this[_0x3a3c07(0x121)][_0x3a3c07(0xe0)](_0x3a3c07(0x159)+_0x44b3af+'/add',{'body':_0x282a10});return z(_0x321161['body'][_0x3a3c07(0xdd)],_0x1ec41e);}}async['updateComment'](_0x546713){const _0x46db6b=_0x1f4f70;var _0x194e0c,_0x4c8238;const {text:_0x3cbec8,unitId:_0x106a0c}=_0x546713,_0x347f98=(_0x4c8238=(_0x194e0c=_0x3cbec8[_0x46db6b(0xe3)])==null?void 0x0:_0x194e0c[_0x46db6b(0x11e)](_0x149f6f=>_0x149f6f[_0x46db6b(0x15a)]===c[_0x46db6b(0x13b)][_0x46db6b(0xd5)])[_0x46db6b(0xf8)](_0x6fcef5=>_0x6fcef5[_0x46db6b(0xd9)]))!=null?_0x4c8238:[],_0x124dab=JSON['stringify'](_0x3cbec8),_0x54374e=_0x546713['threadId'],_0x43747f=_0x546713['id'],_0x484082={'memberId':(await this[_0x46db6b(0xee)][_0x46db6b(0xfd)](_0x106a0c))[_0x46db6b(0x144)](),'unitId':_0x106a0c,'threadId':_0x54374e,'mention':_0x347f98,'content':_0x124dab,'replyId':_0x43747f},_0x3afbca=await this[_0x46db6b(0x121)][_0x46db6b(0xe0)](_0x46db6b(0x159)+_0x106a0c+_0x46db6b(0x111),{'body':_0x484082});return!_0x3afbca[_0x46db6b(0x155)]['error']||_0x3afbca[_0x46db6b(0x155)]['error'][_0x46db6b(0x129)]===0x1;}async[_0x1f4f70(0x126)](_0x5e67c6){const _0x57dd42=_0x1f4f70,{unitId:_0x4e1d50}=_0x5e67c6,_0x1643ae=_0x5e67c6[_0x57dd42(0x13f)],_0xe1b05b={'memberId':this['_userService'][_0x57dd42(0x11f)]()[_0x57dd42(0x104)],'unitId':_0x4e1d50,'threadId':_0x1643ae,'solved':_0x5e67c6[_0x57dd42(0x145)]?p[_0x57dd42(0xd8)]:p[_0x57dd42(0xd7)]},_0xb6d441=await this[_0x57dd42(0x121)]['post'](_0x57dd42(0x159)+_0x4e1d50+_0x57dd42(0x109),{'body':_0xe1b05b});return!_0xb6d441[_0x57dd42(0x155)][_0x57dd42(0x156)]||_0xb6d441[_0x57dd42(0x155)][_0x57dd42(0x156)][_0x57dd42(0x129)]===0x1;}async[_0x1f4f70(0xde)](_0x53b67e,_0x399d08,_0x29a222,_0x2b5237){const _0x752201=_0x1f4f70,_0x39c7f8={'memberId':(await this[_0x752201(0xee)][_0x752201(0xfd)](_0x53b67e))['getMemberID'](),'threadId':_0x29a222,'replyId':_0x2b5237,'unitId':_0x53b67e},_0x32b025=await this[_0x752201(0x121)][_0x752201(0xe0)](_0x752201(0x159)+_0x53b67e+_0x752201(0x12d),{'body':_0x39c7f8});return!_0x32b025[_0x752201(0x155)][_0x752201(0x156)]||_0x32b025[_0x752201(0x155)][_0x752201(0x156)][_0x752201(0x129)]===0x1;}async[_0x1f4f70(0x15e)](_0x37a66c,_0x391a87,_0x5a76ce){const _0x152ddf=_0x1f4f70,_0x3bb70f={'unitId':_0x37a66c,'threadId':_0x5a76ce},_0x2607fe=await this['_httpService'][_0x152ddf(0xe0)]('/universer-api/comment/unit/'+_0x37a66c+_0x152ddf(0x153),{'body':_0x3bb70f}),_0x54f28f=_0x5a76ce[_0x152ddf(0xf8)](_0x1f36f7=>B(_0x2607fe[_0x152ddf(0x155)][_0x152ddf(0x15b)][_0x1f36f7],_0x37a66c,_0x391a87))[_0x152ddf(0x11e)](Boolean);return Object[_0x152ddf(0xdc)](_0x2607fe['body'][_0x152ddf(0x123)])[_0x152ddf(0xdb)](_0xae3465=>{const _0x5d86d7=_0x152ddf;this[_0x5d86d7(0xe1)][_0x5d86d7(0x150)](_0xae3465);}),_0x54f28f;}[_0x1f4f70(0xf4)](_0x569a5e){const _0x1a4c32=_0x1f4f70;return{'id':_0x569a5e['id'],'threadId':_0x569a5e[_0x1a4c32(0x13f)],'ref':_0x569a5e[_0x1a4c32(0xef)]};}};C=W([S(0x0,c[_0x1f4f70(0x103)](O[_0x1f4f70(0xec)])),S(0x1,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x157)])),S(0x2,c['Inject'](y['CollaborationSessionService'])),S(0x3,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)]))],C);var K=Object[_0x1f4f70(0x147)],V=Object[_0x1f4f70(0x12c)],Q=(_0x251e83,_0x5d9c3a,_0x45b364,_0x6b51f1)=>{const _0x2ebcdb=_0x1f4f70;for(var _0x518d42=_0x6b51f1>0x1?void 0x0:_0x6b51f1?V(_0x5d9c3a,_0x45b364):_0x5d9c3a,_0x4e92c8=_0x251e83[_0x2ebcdb(0x15c)]-0x1,_0x2fe041;_0x4e92c8>=0x0;_0x4e92c8--)(_0x2fe041=_0x251e83[_0x4e92c8])&&(_0x518d42=(_0x6b51f1?_0x2fe041(_0x5d9c3a,_0x45b364,_0x518d42):_0x2fe041(_0x518d42))||_0x518d42);return _0x6b51f1&&_0x518d42&&K(_0x5d9c3a,_0x45b364,_0x518d42),_0x518d42;},X=(_0x2bce3c,_0x4880a2)=>(_0x38c649,_0xc85ed4)=>_0x4880a2(_0x38c649,_0xc85ed4,_0x2bce3c);let D=class{constructor(_0x318c20){const _0x480274=_0x1f4f70;this[_0x480274(0x121)]=_0x318c20;}async[_0x1f4f70(0x127)](_0x3bd3b3,_0x30937e,_0x209581){const _0x410f1f=_0x1f4f70,_0x5d7670=new URL(window[_0x410f1f(0x130)][_0x410f1f(0x12a)])['searchParams'][_0x410f1f(0x140)](_0x410f1f(0x143));if(!_0x5d7670)return[];const _0x5d62fd=window[_0x410f1f(0x130)][_0x410f1f(0x118)],_0x58090d=window[_0x410f1f(0x130)][_0x410f1f(0xf3)]==='https:'?_0x410f1f(0x107):'http';return(await this[_0x410f1f(0x121)][_0x410f1f(0x140)](_0x58090d+'://'+_0x5d62fd+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5d7670,'unitID':_0x5d7670}}))['body']['collaborators'][_0x410f1f(0xf8)](_0x18150a=>{const _0x4daa82=_0x410f1f;var _0x529fbb,_0x223d8b,_0x41be2f,_0x15ef7f,_0x2e6bfd,_0x3e0d42;return{'id':(_0x223d8b=(_0x529fbb=_0x18150a[_0x4daa82(0xfa)])==null?void 0x0:_0x529fbb['userID'])!=null?_0x223d8b:'','label':(_0x15ef7f=(_0x41be2f=_0x18150a['subject'])==null?void 0x0:_0x41be2f[_0x4daa82(0x13c)])!=null?_0x15ef7f:'','icon':(_0x3e0d42=(_0x2e6bfd=_0x18150a[_0x4daa82(0xfa)])==null?void 0x0:_0x2e6bfd['avatar'])!=null?_0x3e0d42:'','type':_0x4daa82(0xf2)};});}};D=Q([X(0x0,c[_0x1f4f70(0x103)](O[_0x1f4f70(0xec)]))],D);var k=Object[_0x1f4f70(0x147)],ee=Object[_0x1f4f70(0x12c)],re=(_0x59503d,_0x7a33a5,_0x3d217e,_0x36b86e)=>{const _0x2516b7=_0x1f4f70;for(var _0x821568=_0x36b86e>0x1?void 0x0:_0x36b86e?ee(_0x7a33a5,_0x3d217e):_0x7a33a5,_0x3655e7=_0x59503d[_0x2516b7(0x15c)]-0x1,_0x22ba7e;_0x3655e7>=0x0;_0x3655e7--)(_0x22ba7e=_0x59503d[_0x3655e7])&&(_0x821568=(_0x36b86e?_0x22ba7e(_0x7a33a5,_0x3d217e,_0x821568):_0x22ba7e(_0x821568))||_0x821568);return _0x36b86e&&_0x821568&&k(_0x7a33a5,_0x3d217e,_0x821568),_0x821568;},_=(_0x4bfada,_0x5a589c)=>(_0x4b4aff,_0x2c52f6)=>_0x5a589c(_0x4b4aff,_0x2c52f6,_0x4bfada);let b=class extends c[_0x1f4f70(0xe8)]{constructor(_0x137a63,_0x4c7ebe,_0x596ee7,_0xd4878c){const _0x671e99=_0x1f4f70;super(),this[_0x671e99(0x152)]=_0x137a63,this['_threadCommentDataSource']=_0x4c7ebe,this[_0x671e99(0x135)]=_0x596ee7,this[_0x671e99(0x149)]=_0xd4878c,this[_0x671e99(0xeb)]();}['_initDataSource'](){const _0x54135f=_0x1f4f70;this['_threadCommentDataSourceService'][_0x54135f(0x10d)]=this[_0x54135f(0xfb)],this[_0x54135f(0x152)][_0x54135f(0x13a)]=!0x1,this['_threadCommentMentionDataService'][_0x54135f(0x10d)]=this[_0x54135f(0x149)];}};b=re([c['OnLifecycle'](c[_0x1f4f70(0x122)][_0x1f4f70(0x148)],b),_(0x0,g['IThreadCommentDataSourceService']),_(0x1,c[_0x1f4f70(0x103)](C)),_(0x2,N[_0x1f4f70(0x136)]),_(0x3,c['Inject'](D))],b);var U=Object[_0x1f4f70(0x147)],te=Object[_0x1f4f70(0x12c)],se=(_0x16684a,_0x59d857,_0x4d571f)=>_0x59d857 in _0x16684a?U(_0x16684a,_0x59d857,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d571f}):_0x16684a[_0x59d857]=_0x4d571f,ne=(_0x50f547,_0x179de3,_0x34aa0b,_0x138d25)=>{const _0x563982=_0x1f4f70;for(var _0x19a44d=_0x138d25>0x1?void 0x0:_0x138d25?te(_0x179de3,_0x34aa0b):_0x179de3,_0x382dd0=_0x50f547[_0x563982(0x15c)]-0x1,_0x1d2146;_0x382dd0>=0x0;_0x382dd0--)(_0x1d2146=_0x50f547[_0x382dd0])&&(_0x19a44d=(_0x138d25?_0x1d2146(_0x179de3,_0x34aa0b,_0x19a44d):_0x1d2146(_0x19a44d))||_0x19a44d);return _0x138d25&&_0x19a44d&&U(_0x179de3,_0x34aa0b,_0x19a44d),_0x19a44d;},T=(_0x29f4a3,_0x2b0673)=>(_0x1f5dec,_0x594d29)=>_0x2b0673(_0x1f5dec,_0x594d29,_0x29f4a3),R=(_0x4625b5,_0x3f5996,_0x4bb510)=>se(_0x4625b5,typeof _0x3f5996!='symbol'?_0x3f5996+'':_0x3f5996,_0x4bb510);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1f4f70(0xda)]{constructor(_0x21bf8c=J,_0x22bcf1,_0x523f96){const _0x330886=_0x1f4f70;super(),this[_0x330886(0x102)]=_0x21bf8c,this[_0x330886(0x106)]=_0x22bcf1,this[_0x330886(0x120)]=_0x523f96;const {..._0x1d3d65}=this[_0x330886(0x102)];this[_0x330886(0x120)][_0x330886(0x158)](A,_0x1d3d65);}[_0x1f4f70(0x113)](){const _0x2eba0e=_0x1f4f70;[[D],[C],[b],[f]][_0x2eba0e(0xdb)](_0x4d4c92=>{const _0x17b872=_0x2eba0e;this[_0x17b872(0x106)]['add'](_0x4d4c92);});}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x1f4f70(0xe7),x),R(exports[_0x1f4f70(0xfc)],_0x1f4f70(0x132),c[_0x1f4f70(0x138)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x1f4f70(0x10a)](g['UniverThreadCommentPlugin'],N[_0x1f4f70(0xd4)],y[_0x1f4f70(0x160)],E[_0x1f4f70(0x128)]),T(0x1,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)])),T(0x2,c[_0x1f4f70(0x12e)])],exports[_0x1f4f70(0xfc)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xb40524=_0x40d5;(function(_0x20acab,_0x35693e){const _0x5dff34=_0x40d5,_0x471b79=_0x20acab();while(!![]){try{const _0xa6f3a9=parseInt(_0x5dff34(0x19b))/0x1*(parseInt(_0x5dff34(0x15a))/0x2)+parseInt(_0x5dff34(0x13e))/0x3*(parseInt(_0x5dff34(0x13d))/0x4)+parseInt(_0x5dff34(0x14e))/0x5+parseInt(_0x5dff34(0x15c))/0x6+parseInt(_0x5dff34(0x147))/0x7+-parseInt(_0x5dff34(0x15e))/0x8+-parseInt(_0x5dff34(0x136))/0x9;if(_0xa6f3a9===_0x35693e)break;else _0x471b79['push'](_0x471b79['shift']());}catch(_0x5351c3){_0x471b79['push'](_0x471b79['shift']());}}}(_0x3e3e,0xa5b6c));import{UserManagerService as _0x570a4f,Inject as _0x4ad08d,Injector as _0xfa0489,CustomRangeType as _0x4b1bd0,OnLifecycle as _0x248609,LifecycleStages as _0x1ac694,Disposable as _0x470db3,UniverInstanceType as _0x1e316d,DependentOn as _0x5a57ce,Plugin as _0x6410d4,IConfigService as _0x5e8d47}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x221c7b,ThreadCommentModel as _0x1ce34a,UniverThreadCommentPlugin as _0x29e33c}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x35bb6c,UniverThreadCommentUIPlugin as _0x261fe5}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x4d50c4,CommentService as _0x34c4ff,UniverCollaborationClientPlugin as _0x44bf59}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x476a74}from'@univerjs/network';import _0x1f05ce from'dayjs';import{bufferTime as _0x135b07}from'rxjs';const X=_0xb40524(0x176);var v=(_0x578c94=>(_0x578c94[_0x578c94[_0xb40524(0x14a)]=0x0]=_0xb40524(0x14a),_0x578c94[_0x578c94[_0xb40524(0x196)]=0x1]=_0xb40524(0x196),_0x578c94[_0x578c94['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x578c94))(v||{}),p=(_0x1093de=>(_0x1093de[_0x1093de['Unknown']=0x0]=_0xb40524(0x16c),_0x1093de[_0x1093de[_0xb40524(0x137)]=0x1]=_0xb40524(0x137),_0x1093de[_0x1093de[_0xb40524(0x187)]=0x2]=_0xb40524(0x187),_0x1093de[_0x1093de[_0xb40524(0x14b)]=0x3]='Edit',_0x1093de[_0x1093de[_0xb40524(0x174)]=0x4]=_0xb40524(0x174),_0x1093de[_0x1093de['Solve']=0x5]=_0xb40524(0x131),_0x1093de[_0x1093de[_0xb40524(0x16b)]=-0x1]=_0xb40524(0x16b),_0x1093de))(p||{});function _0x3e3e(){const _0x4564be=['commentUpdate$','getCurrentUser','code','YYYY/MM/DD\x20HH:mm','Solved','userID','_configService','Ready','resolveComment','1YIwPTp','/edit','payload','ref','slice','searchParams','personId','replies','filter','type','requireSession','location','_httpService','Solve','userId','listComments','_init','user','25429716rPxFvQ','Add','updateComment','onStarting','disposeWithMe','dataSource','comments','92LkPuqp','157134GGsXxD','delete','getUser','createTimestamp','_userService','reply','https','getMemberID','values','5016214oljMVc','length','format','OpenOrReOpen','Edit','resolved','http','6726975ahaZFI','threadId','replyId','getOwnPropertyDescriptor','getMentions','addUser','getThread','unit','get','parse','getComment','post','876268ljhRLN','_injector','1307970QtNcfP','customRanges','3348256DPGrwL','users','host','/delete','saveCommentToSnapshot','_threadCommentDataSource','body','/universer-api/authz/collaborator','name','_sessionService','UNIVER_UNKNOWN','addComment','syncUpdateMutationToColla','UNRECOGNIZED','Unknown','subscribe','avatar','symbol','content','COMMENT','pluginName','forEach','Delete','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','thread-comment-data-source.config','subject','href','/universer-api/comment/unit/','solved','_threadCommentDataSourceService','protocol','map','https:','_initDataSource','setConfig','collaborators','stringify','_threadCommentMentionDataService','_threadCommentModel','Reply','unitId','rangeType','deleteComment','://','/reply','rangeId','/solved','add','error','_initUserSync'];_0x3e3e=function(){return _0x4564be;};return _0x3e3e();}const w=_0x108a9c=>_0x1f05ce(new Date(+_0x108a9c))['format'](_0xb40524(0x195)),k=async(_0x2e4c6c,_0x1e81b7)=>{const _0xd006de=_0xb40524,_0x2d8059=_0x2e4c6c[_0xd006de(0x156)](_0x570a4f),_0x3bacac=_0x2e4c6c[_0xd006de(0x156)](_0x476a74);_0x1e81b7[_0xd006de(0x173)](_0x52a27d=>{const _0x4b1ad2=_0xd006de;_0x2d8059[_0x4b1ad2(0x140)](_0x52a27d)&&_0x1e81b7[_0x4b1ad2(0x13f)](_0x52a27d);}),_0x1e81b7['size']&&(await _0x3bacac[_0xd006de(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1e81b7]}}))[_0xd006de(0x164)][_0xd006de(0x15f)]['forEach'](_0x3c7d05=>{const _0x42eefa=_0xd006de;_0x3c7d05&&_0x2d8059[_0x42eefa(0x153)](_0x3c7d05);});};var ee=Object[_0xb40524(0x177)],re=Object[_0xb40524(0x151)],te=(_0x42a7c3,_0x7a8058,_0x2dfa47,_0x2d8eeb)=>{const _0x3dcf58=_0xb40524;for(var _0x5bd9a2=_0x2d8eeb>0x1?void 0x0:_0x2d8eeb?re(_0x7a8058,_0x2dfa47):_0x7a8058,_0x204d17=_0x42a7c3[_0x3dcf58(0x148)]-0x1,_0x2d20a4;_0x204d17>=0x0;_0x204d17--)(_0x2d20a4=_0x42a7c3[_0x204d17])&&(_0x5bd9a2=(_0x2d8eeb?_0x2d20a4(_0x7a8058,_0x2dfa47,_0x5bd9a2):_0x2d20a4(_0x5bd9a2))||_0x5bd9a2);return _0x2d8eeb&&_0x5bd9a2&&ee(_0x7a8058,_0x2dfa47,_0x5bd9a2),_0x5bd9a2;},_=(_0x1f3e28,_0x24bfc2)=>(_0x5cbbb3,_0x108804)=>_0x24bfc2(_0x5cbbb3,_0x108804,_0x1f3e28);function se(_0x4060dc,_0x5a6e83){const _0x701dcc=_0xb40524,_0x435d82=_0x4060dc[_0x701dcc(0x1a2)][0x0];return{..._0x5a6e83,'id':_0x435d82[_0x701dcc(0x150)],'resolved':_0x4060dc[_0x701dcc(0x17c)]===0x1,'dT':w(_0x435d82[_0x701dcc(0x141)]),'personId':_0x435d82['userId'],'threadId':_0x435d82[_0x701dcc(0x14f)]};}function oe(_0xfea13e,_0x40378d,_0x544192){const _0x2c68c4=_0xb40524;var _0x3ce666,_0x25670a;if(((_0x25670a=(_0x3ce666=_0xfea13e==null?void 0x0:_0xfea13e[_0x2c68c4(0x1a2)])==null?void 0x0:_0x3ce666[_0x2c68c4(0x148)])!=null?_0x25670a:0x0)>0x0){const _0x4d691f=(_0x3f7cec,_0x3ce04b)=>({'id':_0x3f7cec[_0x2c68c4(0x150)],'threadId':_0x3f7cec[_0x2c68c4(0x14f)],'dT':w(_0x3f7cec[_0x2c68c4(0x141)]),'personId':_0x3f7cec['userId'],'resolved':_0xfea13e[_0x2c68c4(0x17c)]===v[_0x2c68c4(0x196)],'unitId':_0x40378d,'subUnitId':_0x544192,'text':JSON['parse'](_0x3f7cec[_0x2c68c4(0x170)]),'parentId':_0x3ce04b}),_0x33f0d1=_0x4d691f(_0xfea13e[_0x2c68c4(0x1a2)][0x0]);return{..._0x33f0d1,'children':_0xfea13e['replies'][_0x2c68c4(0x19f)](0x1)[_0x2c68c4(0x17f)](_0x27a3fd=>_0x4d691f(_0x27a3fd,_0x33f0d1['id']))};}return null;}let D=class{constructor(_0x3151ef,_0x4d6ee5,_0x5878b4,_0x27b5c4){const _0x417757=_0xb40524;this[_0x417757(0x130)]=_0x3151ef,this[_0x417757(0x142)]=_0x4d6ee5,this['_sessionService']=_0x5878b4,this[_0x417757(0x15b)]=_0x27b5c4;}async[_0xb40524(0x169)](_0x4288e6){const _0x3d3382=_0xb40524;var _0x317d75,_0x342a5e;const {parentId:_0x4ead9e,unitId:_0x363f2b,text:_0x1ddfd8,threadId:_0x155130}=_0x4288e6,_0x2cf573=(_0x342a5e=(_0x317d75=_0x1ddfd8[_0x3d3382(0x15d)])==null?void 0x0:_0x317d75[_0x3d3382(0x1a3)](_0x16cb3b=>_0x16cb3b[_0x3d3382(0x189)]===_0x4b1bd0[_0x3d3382(0x171)])[_0x3d3382(0x17f)](_0x58169f=>_0x58169f[_0x3d3382(0x18d)]))!=null?_0x342a5e:[],_0x17d826=JSON[_0x3d3382(0x184)](_0x1ddfd8),_0x184e82=(await this['_sessionService'][_0x3d3382(0x12e)](_0x363f2b))[_0x3d3382(0x145)]();if(_0x4ead9e){const _0x4943c6={'memberId':_0x184e82,'unitId':_0x363f2b,'content':_0x17d826,'mention':_0x2cf573,'threadId':_0x155130},_0x3d55f7=(await this[_0x3d3382(0x130)]['post'](_0x3d3382(0x17b)+_0x363f2b+_0x3d3382(0x18c),{'body':_0x4943c6}))[_0x3d3382(0x164)][_0x3d3382(0x143)];return{..._0x4288e6,'id':_0x3d55f7[_0x3d3382(0x150)],'dT':_0x1f05ce(+_0x3d55f7[_0x3d3382(0x141)])[_0x3d3382(0x149)](_0x3d3382(0x195)),'personId':_0x3d55f7['userId']};}else{const _0x13d459={'memberId':_0x184e82,'unitId':_0x363f2b,'content':_0x17d826,'mention':_0x2cf573},_0x241c35=await this[_0x3d3382(0x130)][_0x3d3382(0x159)](_0x3d3382(0x17b)+_0x363f2b+'/add',{'body':_0x13d459});return se(_0x241c35[_0x3d3382(0x164)]['comment'],_0x4288e6);}}async['updateComment'](_0x40e48e){const _0x2d429d=_0xb40524;var _0x2fd6a3,_0x165cd3;const {text:_0x2f97bc,unitId:_0x14781d}=_0x40e48e,_0x2cbffe=(_0x165cd3=(_0x2fd6a3=_0x2f97bc[_0x2d429d(0x15d)])==null?void 0x0:_0x2fd6a3[_0x2d429d(0x1a3)](_0x80095b=>_0x80095b[_0x2d429d(0x189)]===_0x4b1bd0[_0x2d429d(0x171)])[_0x2d429d(0x17f)](_0x5af00c=>_0x5af00c[_0x2d429d(0x18d)]))!=null?_0x165cd3:[],_0x24e0eb=JSON['stringify'](_0x2f97bc),_0x8e5b28=_0x40e48e['threadId'],_0x3d24be=_0x40e48e['id'],_0x39b697={'memberId':(await this[_0x2d429d(0x167)][_0x2d429d(0x12e)](_0x14781d))[_0x2d429d(0x145)](),'unitId':_0x14781d,'threadId':_0x8e5b28,'mention':_0x2cbffe,'content':_0x24e0eb,'replyId':_0x3d24be},_0x20a18a=await this[_0x2d429d(0x130)][_0x2d429d(0x159)](_0x2d429d(0x17b)+_0x14781d+_0x2d429d(0x19c),{'body':_0x39b697});return!_0x20a18a[_0x2d429d(0x164)]['error']||_0x20a18a[_0x2d429d(0x164)][_0x2d429d(0x190)][_0x2d429d(0x194)]===0x1;}async[_0xb40524(0x19a)](_0x176c61){const _0x5b9d3f=_0xb40524,{unitId:_0x480bbf}=_0x176c61,_0xc18b7e=_0x176c61[_0x5b9d3f(0x14f)],_0x22cc66={'memberId':this['_userService'][_0x5b9d3f(0x193)]()[_0x5b9d3f(0x197)],'unitId':_0x480bbf,'threadId':_0xc18b7e,'solved':_0x176c61[_0x5b9d3f(0x14c)]?v[_0x5b9d3f(0x196)]:v[_0x5b9d3f(0x14a)]},_0x48d0b9=await this[_0x5b9d3f(0x130)][_0x5b9d3f(0x159)](_0x5b9d3f(0x17b)+_0x480bbf+_0x5b9d3f(0x18e),{'body':_0x22cc66});return!_0x48d0b9['body'][_0x5b9d3f(0x190)]||_0x48d0b9[_0x5b9d3f(0x164)][_0x5b9d3f(0x190)][_0x5b9d3f(0x194)]===0x1;}async[_0xb40524(0x18a)](_0x45cfcf,_0x1023a9,_0x5e3307,_0xad364b){const _0x4ce281=_0xb40524,_0x5a3f43={'memberId':(await this['_sessionService'][_0x4ce281(0x12e)](_0x45cfcf))[_0x4ce281(0x145)](),'threadId':_0x5e3307,'replyId':_0xad364b,'unitId':_0x45cfcf},_0x128317=await this[_0x4ce281(0x130)][_0x4ce281(0x159)](_0x4ce281(0x17b)+_0x45cfcf+_0x4ce281(0x161),{'body':_0x5a3f43});return!_0x128317[_0x4ce281(0x164)][_0x4ce281(0x190)]||_0x128317['body'][_0x4ce281(0x190)][_0x4ce281(0x194)]===0x1;}async[_0xb40524(0x133)](_0x5f4e92,_0x445601,_0x13fe20){const _0x4179a6=_0xb40524,_0x82780f={'unitId':_0x5f4e92,'threadId':_0x13fe20},_0x379b62=await this[_0x4179a6(0x130)][_0x4179a6(0x159)](_0x4179a6(0x17b)+_0x5f4e92+_0x4179a6(0x175),{'body':_0x82780f}),_0x454423=_0x13fe20[_0x4179a6(0x17f)](_0x44d092=>oe(_0x379b62['body'][_0x4179a6(0x13c)][_0x44d092],_0x5f4e92,_0x445601))['filter'](Boolean);return Object[_0x4179a6(0x146)](_0x379b62[_0x4179a6(0x164)][_0x4179a6(0x15f)])['forEach'](_0x447a61=>{const _0x4886da=_0x4179a6;this[_0x4886da(0x142)][_0x4886da(0x153)](_0x447a61);}),_0x454423;}[_0xb40524(0x162)](_0x187884){const _0x2e252d=_0xb40524;return{'id':_0x187884['id'],'threadId':_0x187884[_0x2e252d(0x14f)],'ref':_0x187884[_0x2e252d(0x19e)]};}};D=te([_(0x0,_0x4ad08d(_0x476a74)),_(0x1,_0x4ad08d(_0x570a4f)),_(0x2,_0x4ad08d(_0x4d50c4)),_(0x3,_0x4ad08d(_0xfa0489))],D);var ne=Object[_0xb40524(0x177)],ie=Object[_0xb40524(0x151)],ae=(_0x2ace05,_0x374f7b,_0xd7f2d1,_0x17d411)=>{for(var _0x510716=_0x17d411>0x1?void 0x0:_0x17d411?ie(_0x374f7b,_0xd7f2d1):_0x374f7b,_0x67f425=_0x2ace05['length']-0x1,_0x278520;_0x67f425>=0x0;_0x67f425--)(_0x278520=_0x2ace05[_0x67f425])&&(_0x510716=(_0x17d411?_0x278520(_0x374f7b,_0xd7f2d1,_0x510716):_0x278520(_0x510716))||_0x510716);return _0x17d411&&_0x510716&&ne(_0x374f7b,_0xd7f2d1,_0x510716),_0x510716;},ce=(_0x28bf56,_0x1e9560)=>(_0x161187,_0x5d5b29)=>_0x1e9560(_0x161187,_0x5d5b29,_0x28bf56);let C=class{constructor(_0x14aed9){this['_httpService']=_0x14aed9;}async[_0xb40524(0x152)](_0xde51b1,_0x758394,_0x2bd30b){const _0x1a5888=_0xb40524,_0x20f60a=new URL(window['location'][_0x1a5888(0x17a)])[_0x1a5888(0x1a0)][_0x1a5888(0x156)](_0x1a5888(0x155));if(!_0x20f60a)return[];const _0x34a910=window[_0x1a5888(0x12f)][_0x1a5888(0x160)],_0xdcaa86=window[_0x1a5888(0x12f)][_0x1a5888(0x17e)]===_0x1a5888(0x180)?_0x1a5888(0x144):_0x1a5888(0x14d);return(await this['_httpService'][_0x1a5888(0x156)](_0xdcaa86+_0x1a5888(0x18b)+_0x34a910+_0x1a5888(0x165),{'params':{'objectID':_0x20f60a,'unitID':_0x20f60a}}))[_0x1a5888(0x164)][_0x1a5888(0x183)]['map'](_0x4d3e36=>{const _0x126026=_0x1a5888;var _0x423d25,_0x9cad61,_0x573337,_0x5b333c,_0x56a102,_0x553376;return{'id':(_0x9cad61=(_0x423d25=_0x4d3e36[_0x126026(0x179)])==null?void 0x0:_0x423d25['userID'])!=null?_0x9cad61:'','label':(_0x5b333c=(_0x573337=_0x4d3e36[_0x126026(0x179)])==null?void 0x0:_0x573337[_0x126026(0x166)])!=null?_0x5b333c:'','icon':(_0x553376=(_0x56a102=_0x4d3e36['subject'])==null?void 0x0:_0x56a102[_0x126026(0x16e)])!=null?_0x553376:'','type':_0x126026(0x135)};});}};C=ae([ce(0x0,_0x4ad08d(_0x476a74))],C);var de=Object[_0xb40524(0x177)],me=Object[_0xb40524(0x151)],le=(_0x27517f,_0x37fa7d,_0x564ad4,_0x45f904)=>{const _0x12a6c0=_0xb40524;for(var _0x148054=_0x45f904>0x1?void 0x0:_0x45f904?me(_0x37fa7d,_0x564ad4):_0x37fa7d,_0x3aa6a3=_0x27517f[_0x12a6c0(0x148)]-0x1,_0x30b274;_0x3aa6a3>=0x0;_0x3aa6a3--)(_0x30b274=_0x27517f[_0x3aa6a3])&&(_0x148054=(_0x45f904?_0x30b274(_0x37fa7d,_0x564ad4,_0x148054):_0x30b274(_0x148054))||_0x148054);return _0x45f904&&_0x148054&&de(_0x37fa7d,_0x564ad4,_0x148054),_0x148054;},f=(_0x208ef5,_0x3722f6)=>(_0x5c46ee,_0x5ec14e)=>_0x3722f6(_0x5c46ee,_0x5ec14e,_0x208ef5);let S=class extends _0x470db3{constructor(_0x1fa603,_0x5f3725,_0x482bdb,_0x400eba){const _0x329654=_0xb40524;super(),this['_threadCommentDataSourceService']=_0x1fa603,this[_0x329654(0x163)]=_0x5f3725,this['_threadCommentMentionDataService']=_0x482bdb,this['_threadCommentMentionDataSource']=_0x400eba,this[_0x329654(0x181)]();}[_0xb40524(0x181)](){const _0x112fd8=_0xb40524;this[_0x112fd8(0x17d)][_0x112fd8(0x13b)]=this[_0x112fd8(0x163)],this['_threadCommentDataSourceService'][_0x112fd8(0x16a)]=!0x1,this[_0x112fd8(0x185)][_0x112fd8(0x13b)]=this['_threadCommentMentionDataSource'];}};S=le([_0x248609(_0x1ac694['Starting'],S),f(0x0,_0x221c7b),f(0x1,_0x4ad08d(D)),f(0x2,_0x35bb6c),f(0x3,_0x4ad08d(C))],S);var he=Object[_0xb40524(0x177)],ue=Object['getOwnPropertyDescriptor'],pe=(_0x3c9d63,_0x45cbc5,_0x47add7,_0x1a4157)=>{const _0x1e42f6=_0xb40524;for(var _0x4ed919=_0x1a4157>0x1?void 0x0:_0x1a4157?ue(_0x45cbc5,_0x47add7):_0x45cbc5,_0x4df62e=_0x3c9d63[_0x1e42f6(0x148)]-0x1,_0x4307e1;_0x4df62e>=0x0;_0x4df62e--)(_0x4307e1=_0x3c9d63[_0x4df62e])&&(_0x4ed919=(_0x1a4157?_0x4307e1(_0x45cbc5,_0x47add7,_0x4ed919):_0x4307e1(_0x4ed919))||_0x4ed919);return _0x1a4157&&_0x4ed919&&he(_0x45cbc5,_0x47add7,_0x4ed919),_0x4ed919;},I=(_0x8670cb,_0x1a9d68)=>(_0x2f0e76,_0x9a8e68)=>_0x1a9d68(_0x2f0e76,_0x9a8e68,_0x8670cb);let b=class extends _0x470db3{constructor(_0x5b72c0,_0x36dab4,_0x6b377d,_0x11a61f){const _0x4aebc2=_0xb40524;super(),this['_commentService']=_0x5b72c0,this[_0x4aebc2(0x186)]=_0x36dab4,this[_0x4aebc2(0x142)]=_0x6b377d,this[_0x4aebc2(0x15b)]=_0x11a61f,this[_0x4aebc2(0x134)](),this[_0x4aebc2(0x191)]();}[_0xb40524(0x191)](){const _0x1177a0=_0xb40524;this[_0x1177a0(0x13a)](this['_threadCommentModel'][_0x1177a0(0x192)]['pipe'](_0x135b07(0x10))[_0x1177a0(0x16d)](_0x134704=>{const _0x411d86=_0x1177a0,_0x4ddae4=new Set();_0x134704['forEach'](_0x361d37=>{const _0x3299db=_0x40d5;switch(_0x361d37[_0x3299db(0x1a4)]){case _0x3299db(0x18f):{const _0x1459d0=_0x361d37[_0x3299db(0x19d)][_0x3299db(0x1a1)];_0x4ddae4[_0x3299db(0x18f)](_0x1459d0);break;}}}),k(this[_0x411d86(0x15b)],_0x4ddae4);}));}['_init'](){const _0x70ef09=_0xb40524;this[_0x70ef09(0x13a)](this['_commentService']['commentUpdate$'][_0x70ef09(0x16d)](async _0x41f79d=>{const _0x30f9db=_0x70ef09;var _0x101395,_0x12fdee;const _0x11314b=this[_0x30f9db(0x186)][_0x30f9db(0x154)](_0x41f79d[_0x30f9db(0x188)],_0x41f79d['threadId']);if(!_0x11314b)return;const {unitId:_0x3d982a,subUnitId:_0x1fc574}=_0x11314b;switch(_0x41f79d[_0x30f9db(0x135)]&&this[_0x30f9db(0x142)][_0x30f9db(0x153)](_0x41f79d['user']),_0x41f79d[_0x30f9db(0x1a4)]){case p[_0x30f9db(0x137)]:break;case p[_0x30f9db(0x187)]:{this[_0x30f9db(0x186)][_0x30f9db(0x169)](_0x3d982a,_0x1fc574,{'unitId':_0x3d982a,'subUnitId':_0x1fc574,'ref':'','id':_0x41f79d[_0x30f9db(0x150)],'dT':w(+_0x41f79d[_0x30f9db(0x141)]),'threadId':_0x41f79d[_0x30f9db(0x14f)],'personId':(_0x12fdee=(_0x101395=_0x41f79d[_0x30f9db(0x135)])==null?void 0x0:_0x101395[_0x30f9db(0x197)])!=null?_0x12fdee:_0x41f79d[_0x30f9db(0x132)],'text':JSON[_0x30f9db(0x157)](_0x41f79d[_0x30f9db(0x170)]),'parentId':_0x11314b['id']});break;}case p['Delete']:{const _0x3b2acd=this[_0x30f9db(0x186)][_0x30f9db(0x158)](_0x3d982a,_0x1fc574,_0x41f79d[_0x30f9db(0x150)]);_0x3b2acd&&_0x3b2acd['parentId']&&this[_0x30f9db(0x186)]['deleteComment'](_0x3d982a,_0x1fc574,_0x41f79d[_0x30f9db(0x150)]);break;}case p[_0x30f9db(0x14b)]:{this[_0x30f9db(0x186)][_0x30f9db(0x138)](_0x3d982a,_0x1fc574,{'commentId':_0x41f79d[_0x30f9db(0x150)],'text':JSON[_0x30f9db(0x157)](_0x41f79d[_0x30f9db(0x170)])});break;}case p[_0x30f9db(0x131)]:{const _0x4a6c18=this[_0x30f9db(0x186)]['getThread'](_0x3d982a,_0x41f79d['threadId']);_0x4a6c18&&this[_0x30f9db(0x186)]['resolveComment'](_0x3d982a,_0x1fc574,_0x4a6c18['id'],_0x41f79d['solved']===v['Solved']);break;}}}));}};b=pe([_0x248609(_0x1ac694[_0xb40524(0x199)],b),I(0x0,_0x4ad08d(_0x34c4ff)),I(0x1,_0x4ad08d(_0x1ce34a)),I(0x2,_0x4ad08d(_0x570a4f)),I(0x3,_0x4ad08d(_0xfa0489))],b);const ve=_0xb40524(0x178),_e={};var Y=Object[_0xb40524(0x177)],fe=Object[_0xb40524(0x151)],Ie=(_0x5dd562,_0x3b26ed,_0x3e820a)=>_0x3b26ed in _0x5dd562?Y(_0x5dd562,_0x3b26ed,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e820a}):_0x5dd562[_0x3b26ed]=_0x3e820a,Se=(_0x38272e,_0x33d5c8,_0x550d4a,_0x59256e)=>{for(var _0x4d9e09=_0x59256e>0x1?void 0x0:_0x59256e?fe(_0x33d5c8,_0x550d4a):_0x33d5c8,_0xb2c1be=_0x38272e['length']-0x1,_0x297d0e;_0xb2c1be>=0x0;_0xb2c1be--)(_0x297d0e=_0x38272e[_0xb2c1be])&&(_0x4d9e09=(_0x59256e?_0x297d0e(_0x33d5c8,_0x550d4a,_0x4d9e09):_0x297d0e(_0x4d9e09))||_0x4d9e09);return _0x59256e&&_0x4d9e09&&Y(_0x33d5c8,_0x550d4a,_0x4d9e09),_0x4d9e09;},j=(_0x16db5f,_0x247856)=>(_0x45acfe,_0x50a20f)=>_0x247856(_0x45acfe,_0x50a20f,_0x16db5f),G=(_0xd1dc84,_0x10b1c2,_0x5a89bd)=>Ie(_0xd1dc84,typeof _0x10b1c2!=_0xb40524(0x16f)?_0x10b1c2+'':_0x10b1c2,_0x5a89bd);let O=class extends _0x6410d4{constructor(_0x437fca=_e,_0x5e4258,_0x2ead37){const _0x5a520b=_0xb40524;super(),this['_config']=_0x437fca,this['_injector']=_0x5e4258,this[_0x5a520b(0x198)]=_0x2ead37;const {..._0x3811ac}=this['_config'];this['_configService'][_0x5a520b(0x182)](ve,_0x3811ac);}[_0xb40524(0x139)](){const _0x5b2933=_0xb40524;[[C],[D],[S],[b]][_0x5b2933(0x173)](_0x2fb7f2=>{const _0xacf7e=_0x5b2933;this[_0xacf7e(0x15b)]['add'](_0x2fb7f2);});}};G(O,_0xb40524(0x172),X),G(O,_0xb40524(0x1a4),_0x1e316d[_0xb40524(0x168)]),O=Se([_0x5a57ce(_0x29e33c,_0x261fe5,_0x44bf59),j(0x1,_0x4ad08d(_0xfa0489)),j(0x2,_0x5e8d47)],O);function _0x40d5(_0x5be384,_0x401e5c){const _0x3e3e55=_0x3e3e();return _0x40d5=function(_0x40d5a1,_0xc80484){_0x40d5a1=_0x40d5a1-0x12e;let _0xcf6bac=_0x3e3e55[_0x40d5a1];return _0xcf6bac;},_0x40d5(_0x5be384,_0x401e5c);}export{O as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x54d3c0=_0x3961;(function(_0x743aef,_0x3929fb){const _0x4e8eb8=_0x3961,_0x339f79=_0x743aef();while(!![]){try{const _0x2d9ec=-parseInt(_0x4e8eb8(0x228))/0x1+-parseInt(_0x4e8eb8(0x1f7))/0x2*(parseInt(_0x4e8eb8(0x246))/0x3)+-parseInt(_0x4e8eb8(0x243))/0x4+parseInt(_0x4e8eb8(0x218))/0x5+parseInt(_0x4e8eb8(0x1f1))/0x6*(-parseInt(_0x4e8eb8(0x212))/0x7)+-parseInt(_0x4e8eb8(0x1fa))/0x8+parseInt(_0x4e8eb8(0x1fb))/0x9;if(_0x2d9ec===_0x3929fb)break;else _0x339f79['push'](_0x339f79['shift']());}catch(_0x49a61c){_0x339f79['push'](_0x339f79['shift']());}}}(_0x5587,0xc9953));import{UserManagerService as _0x2f3fe0,OnLifecycle as _0x2e269a,LifecycleStages as _0x2dc267,Inject as _0x556ac5,Injector as _0x4900de,Disposable as _0x52739f,CustomRangeType as _0x45bfa5,UniverInstanceType as _0x4408ec,DependentOn as _0x556292,Plugin as _0x1a3cb5,IConfigService as _0x5362db}from'@univerjs/core';import{ThreadCommentModel as _0x4fc152,IThreadCommentDataSourceService as _0x183b75,UniverThreadCommentPlugin as _0x137644}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1d516f,UniverThreadCommentUIPlugin as _0x125610}from'@univerjs/thread-comment-ui';import{CommentService as _0x47984a,CollaborationSessionService as _0x385840,UniverCollaborationClientPlugin as _0x541cb2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4bd77d}from'@univerjs-pro/license';import{bufferTime as _0x3a43bf}from'rxjs';function _0x3961(_0x2cc6a4,_0x22823d){const _0x558765=_0x5587();return _0x3961=function(_0x3961f9,_0x54171f){_0x3961f9=_0x3961f9-0x1db;let _0x354f26=_0x558765[_0x3961f9];return _0x354f26;},_0x3961(_0x2cc6a4,_0x22823d);}import{HTTPService as _0x4f4d9a}from'@univerjs/network';import _0x3cbc92 from'dayjs';const k=_0x54d3c0(0x234);var v=(_0x2b7f99=>(_0x2b7f99[_0x2b7f99['OpenOrReOpen']=0x0]=_0x54d3c0(0x21a),_0x2b7f99[_0x2b7f99['Solved']=0x1]='Solved',_0x2b7f99[_0x2b7f99[_0x54d3c0(0x1e6)]=-0x1]=_0x54d3c0(0x1e6),_0x2b7f99))(v||{}),p=(_0x1d177f=>(_0x1d177f[_0x1d177f[_0x54d3c0(0x241)]=0x0]=_0x54d3c0(0x241),_0x1d177f[_0x1d177f['Add']=0x1]=_0x54d3c0(0x200),_0x1d177f[_0x1d177f[_0x54d3c0(0x216)]=0x2]=_0x54d3c0(0x216),_0x1d177f[_0x1d177f['Edit']=0x3]='Edit',_0x1d177f[_0x1d177f[_0x54d3c0(0x1e9)]=0x4]=_0x54d3c0(0x1e9),_0x1d177f[_0x1d177f[_0x54d3c0(0x23b)]=0x5]='Solve',_0x1d177f[_0x1d177f[_0x54d3c0(0x1e6)]=-0x1]='UNRECOGNIZED',_0x1d177f))(p||{});const w=_0x5b8fb2=>_0x3cbc92(new Date(+_0x5b8fb2))[_0x54d3c0(0x1e8)](_0x54d3c0(0x21c)),ee=async(_0x36507b,_0x1911fa)=>{const _0x494fa5=_0x54d3c0,_0x2e8ba9=_0x36507b['get'](_0x2f3fe0),_0xfa89a7=_0x36507b[_0x494fa5(0x238)](_0x4f4d9a);_0x1911fa[_0x494fa5(0x1e7)](_0x15ade9=>{const _0x85cfcc=_0x494fa5;_0x2e8ba9['getUser'](_0x15ade9)&&_0x1911fa[_0x85cfcc(0x209)](_0x15ade9);}),_0x1911fa[_0x494fa5(0x20a)]&&(await _0xfa89a7[_0x494fa5(0x238)](_0x494fa5(0x1f4),{'params':{'userIDs':[..._0x1911fa]}}))['body']['users'][_0x494fa5(0x1e7)](_0x3a0f73=>{const _0x1c98a6=_0x494fa5;_0x3a0f73&&_0x2e8ba9[_0x1c98a6(0x222)](_0x3a0f73);});};var re=Object[_0x54d3c0(0x244)],te=Object[_0x54d3c0(0x20c)],se=(_0x30c1f0,_0x39e260,_0x4db4cf,_0x37fa7f)=>{const _0x3c8bbe=_0x54d3c0;for(var _0x250f69=_0x37fa7f>0x1?void 0x0:_0x37fa7f?te(_0x39e260,_0x4db4cf):_0x39e260,_0xda1ff6=_0x30c1f0[_0x3c8bbe(0x202)]-0x1,_0x3e277e;_0xda1ff6>=0x0;_0xda1ff6--)(_0x3e277e=_0x30c1f0[_0xda1ff6])&&(_0x250f69=(_0x37fa7f?_0x3e277e(_0x39e260,_0x4db4cf,_0x250f69):_0x3e277e(_0x250f69))||_0x250f69);return _0x37fa7f&&_0x250f69&&re(_0x39e260,_0x4db4cf,_0x250f69),_0x250f69;},_=(_0x5e9543,_0x1e4f73)=>(_0x188163,_0x49725b)=>_0x1e4f73(_0x188163,_0x49725b,_0x5e9543);let S=class extends _0x52739f{constructor(_0x2b15f1,_0x44f2f7,_0x1f5386,_0x98859c){const _0x5e89dc=_0x54d3c0;super(),this[_0x5e89dc(0x22d)]=_0x2b15f1,this['_threadCommentModel']=_0x44f2f7,this[_0x5e89dc(0x1ea)]=_0x1f5386,this[_0x5e89dc(0x23d)]=_0x98859c,this[_0x5e89dc(0x233)](),this[_0x5e89dc(0x210)]();}[_0x54d3c0(0x210)](){const _0x1c9aef=_0x54d3c0;this[_0x1c9aef(0x235)](this['_threadCommentModel']['commentUpdate$'][_0x1c9aef(0x23f)](_0x3a43bf(0x10))['subscribe'](_0x53ba54=>{const _0x56506c=_0x1c9aef,_0x2edc09=new Set();_0x53ba54[_0x56506c(0x1e7)](_0xf3f471=>{const _0x4444fd=_0x56506c;switch(_0xf3f471[_0x4444fd(0x1eb)]){case _0x4444fd(0x22b):{const _0x4166e8=_0xf3f471[_0x4444fd(0x22a)][_0x4444fd(0x223)];_0x2edc09['add'](_0x4166e8);break;}}}),ee(this['_injector'],_0x2edc09);}));}[_0x54d3c0(0x233)](){const _0x4e79b3=_0x54d3c0;this[_0x4e79b3(0x235)](this[_0x4e79b3(0x22d)]['commentUpdate$']['subscribe'](async _0x3d777b=>{const _0x34e7f1=_0x4e79b3;var _0x4776c4,_0x4226f8;const _0x808d41=this[_0x34e7f1(0x22f)][_0x34e7f1(0x1e1)](_0x3d777b[_0x34e7f1(0x203)],_0x3d777b['threadId']);if(!_0x808d41)return;const {unitId:_0x42dbbf,subUnitId:_0x53a9e6}=_0x808d41;switch(_0x3d777b['user']&&this[_0x34e7f1(0x1ea)][_0x34e7f1(0x222)](_0x3d777b[_0x34e7f1(0x20b)]),_0x3d777b[_0x34e7f1(0x1eb)]){case p[_0x34e7f1(0x200)]:break;case p['Reply']:{this[_0x34e7f1(0x22f)]['addComment'](_0x42dbbf,_0x53a9e6,{'unitId':_0x42dbbf,'subUnitId':_0x53a9e6,'ref':'','id':_0x3d777b[_0x34e7f1(0x205)],'dT':w(+_0x3d777b[_0x34e7f1(0x204)]),'threadId':_0x3d777b[_0x34e7f1(0x1e3)],'personId':(_0x4226f8=(_0x4776c4=_0x3d777b[_0x34e7f1(0x20b)])==null?void 0x0:_0x4776c4['userID'])!=null?_0x4226f8:_0x3d777b[_0x34e7f1(0x21e)],'text':JSON[_0x34e7f1(0x215)](_0x3d777b[_0x34e7f1(0x1f6)]),'parentId':_0x808d41['id']});break;}case p[_0x34e7f1(0x1e9)]:{const _0x487aa0=this[_0x34e7f1(0x22f)][_0x34e7f1(0x1fc)](_0x42dbbf,_0x53a9e6,_0x3d777b[_0x34e7f1(0x205)]);_0x487aa0&&_0x487aa0[_0x34e7f1(0x207)]&&this['_threadCommentModel'][_0x34e7f1(0x231)](_0x42dbbf,_0x53a9e6,_0x3d777b[_0x34e7f1(0x205)]);break;}case p[_0x34e7f1(0x1dd)]:{this['_threadCommentModel'][_0x34e7f1(0x20d)](_0x42dbbf,_0x53a9e6,{'commentId':_0x3d777b[_0x34e7f1(0x205)],'text':JSON[_0x34e7f1(0x215)](_0x3d777b[_0x34e7f1(0x1f6)])});break;}case p[_0x34e7f1(0x23b)]:{const _0x5897f1=this[_0x34e7f1(0x22f)]['getThread'](_0x42dbbf,_0x3d777b['threadId']);_0x5897f1&&this[_0x34e7f1(0x22f)][_0x34e7f1(0x23a)](_0x42dbbf,_0x53a9e6,_0x5897f1['id'],_0x3d777b['solved']===v[_0x34e7f1(0x242)]);break;}}}));}};S=se([_0x2e269a(_0x2dc267['Ready'],S),_(0x0,_0x556ac5(_0x47984a)),_(0x1,_0x556ac5(_0x4fc152)),_(0x2,_0x556ac5(_0x2f3fe0)),_(0x3,_0x556ac5(_0x4900de))],S);const oe=_0x54d3c0(0x225),ne={};var ie=Object[_0x54d3c0(0x244)],ae=Object['getOwnPropertyDescriptor'],ce=(_0x4bfad3,_0x3df789,_0x248f8a,_0x115988)=>{const _0x2eb3af=_0x54d3c0;for(var _0x1704c3=_0x115988>0x1?void 0x0:_0x115988?ae(_0x3df789,_0x248f8a):_0x3df789,_0x8d821c=_0x4bfad3[_0x2eb3af(0x202)]-0x1,_0x5df0c8;_0x8d821c>=0x0;_0x8d821c--)(_0x5df0c8=_0x4bfad3[_0x8d821c])&&(_0x1704c3=(_0x115988?_0x5df0c8(_0x3df789,_0x248f8a,_0x1704c3):_0x5df0c8(_0x1704c3))||_0x1704c3);return _0x115988&&_0x1704c3&&ie(_0x3df789,_0x248f8a,_0x1704c3),_0x1704c3;},f=(_0x1415e1,_0x1f9b9a)=>(_0x43f977,_0x5793f8)=>_0x1f9b9a(_0x43f977,_0x5793f8,_0x1415e1);function de(_0x8e9f3,_0x1ab00d){const _0x41be3a=_0x54d3c0,_0x1077b8=_0x8e9f3[_0x41be3a(0x237)][0x0];return{..._0x1ab00d,'id':_0x1077b8[_0x41be3a(0x205)],'resolved':_0x8e9f3[_0x41be3a(0x1ec)]===0x1,'dT':w(_0x1077b8['createTimestamp']),'personId':_0x1077b8[_0x41be3a(0x21e)],'threadId':_0x1077b8[_0x41be3a(0x1e3)]};}function me(_0x1c5652,_0x13f49d,_0x4493fa){const _0xa103b1=_0x54d3c0;var _0x519195,_0x5e865d;if(((_0x5e865d=(_0x519195=_0x1c5652==null?void 0x0:_0x1c5652[_0xa103b1(0x237)])==null?void 0x0:_0x519195[_0xa103b1(0x202)])!=null?_0x5e865d:0x0)>0x0){const _0x509481=(_0x5e4a1a,_0x2cec4f)=>({'id':_0x5e4a1a['replyId'],'threadId':_0x5e4a1a['threadId'],'dT':w(_0x5e4a1a[_0xa103b1(0x204)]),'personId':_0x5e4a1a[_0xa103b1(0x21e)],'resolved':_0x1c5652[_0xa103b1(0x1ec)]===v[_0xa103b1(0x242)],'unitId':_0x13f49d,'subUnitId':_0x4493fa,'text':JSON['parse'](_0x5e4a1a[_0xa103b1(0x1f6)]),'parentId':_0x2cec4f}),_0x1096c3=_0x509481(_0x1c5652[_0xa103b1(0x237)][0x0]);return{..._0x1096c3,'children':_0x1c5652['replies']['slice'](0x1)[_0xa103b1(0x220)](_0x4ac12d=>_0x509481(_0x4ac12d,_0x1096c3['id']))};}return null;}function _0x5587(){const _0x5bc3ec=['/reply','413UykPja','saveCommentToSnapshot','getMemberID','parse','Reply','values','5803020TsSsOz','_configService','OpenOrReOpen','body','YYYY/MM/DD\x20HH:mm','rangeId','userId','avatar','map','/solved','addUser','personId','rangeType','thread-comment-data-source.config','setConfig','subject','1485635MdJZcs','filter','payload','add','_threadCommentDataSourceService','_commentService','resolved','_threadCommentModel','listComments','deleteComment','reply','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','searchParams','replies','get','host','resolveComment','Solve','dataSource','_injector','code','pipe','pluginName','Unknown','Solved','2696396DEOsbv','defineProperty','error','235470jTcfZv','_config','/universer-api/comment/unit/','userID','Edit','protocol','onStarting','https','getThread','https:','threadId','UNIVER_UNKNOWN','unit','UNRECOGNIZED','forEach','format','Delete','_userService','type','solved','requireSession','location','_threadCommentDataSource','_sessionService','49584ayuSpg','customRanges','collaborators','/universer-api/user/list','users','content','12fwxSQr','COMMENT','symbol','6754656cSPIXR','32648949KqaRCc','getComment','_threadCommentMentionDataService','comment','_httpService','Add','_threadCommentMentionDataSource','length','unitId','createTimestamp','replyId','getMentions','parentId','stringify','delete','size','user','getOwnPropertyDescriptor','updateComment','_initDataSource','post','_initUserSync'];_0x5587=function(){return _0x5bc3ec;};return _0x5587();}let D=class{constructor(_0xdc1351,_0x12b7eb,_0x52b576,_0x337e95){const _0x33843d=_0x54d3c0;this[_0x33843d(0x1ff)]=_0xdc1351,this[_0x33843d(0x1ea)]=_0x12b7eb,this[_0x33843d(0x1f0)]=_0x52b576,this[_0x33843d(0x23d)]=_0x337e95;}async['addComment'](_0x4de92c){const _0x5d72b4=_0x54d3c0;var _0x21da39,_0xc4b3df;const {parentId:_0x50bb55,unitId:_0x58348a,text:_0x2aae63,threadId:_0x2cc5db}=_0x4de92c,_0x452246=(_0xc4b3df=(_0x21da39=_0x2aae63[_0x5d72b4(0x1f2)])==null?void 0x0:_0x21da39[_0x5d72b4(0x229)](_0x2a84ac=>_0x2a84ac[_0x5d72b4(0x224)]===_0x45bfa5[_0x5d72b4(0x1f8)])[_0x5d72b4(0x220)](_0x5c9247=>_0x5c9247['rangeId']))!=null?_0xc4b3df:[],_0x502389=JSON[_0x5d72b4(0x208)](_0x2aae63),_0x31dbf3=(await this[_0x5d72b4(0x1f0)][_0x5d72b4(0x1ed)](_0x58348a))['getMemberID']();if(_0x50bb55){const _0x2dd0fc={'memberId':_0x31dbf3,'unitId':_0x58348a,'content':_0x502389,'mention':_0x452246,'threadId':_0x2cc5db},_0xde95e6=(await this[_0x5d72b4(0x1ff)][_0x5d72b4(0x20f)](_0x5d72b4(0x1db)+_0x58348a+_0x5d72b4(0x211),{'body':_0x2dd0fc}))['body'][_0x5d72b4(0x232)];return{..._0x4de92c,'id':_0xde95e6[_0x5d72b4(0x205)],'dT':_0x3cbc92(+_0xde95e6[_0x5d72b4(0x204)])[_0x5d72b4(0x1e8)](_0x5d72b4(0x21c)),'personId':_0xde95e6['userId']};}else{const _0x3cae33={'memberId':_0x31dbf3,'unitId':_0x58348a,'content':_0x502389,'mention':_0x452246},_0x25a628=await this[_0x5d72b4(0x1ff)]['post'](_0x5d72b4(0x1db)+_0x58348a+'/add',{'body':_0x3cae33});return de(_0x25a628['body'][_0x5d72b4(0x1fe)],_0x4de92c);}}async[_0x54d3c0(0x20d)](_0x65105b){const _0x303d0e=_0x54d3c0;var _0x2a6fd4,_0x2d45e8;const {text:_0x2254c1,unitId:_0x446063}=_0x65105b,_0x3b2b42=(_0x2d45e8=(_0x2a6fd4=_0x2254c1[_0x303d0e(0x1f2)])==null?void 0x0:_0x2a6fd4[_0x303d0e(0x229)](_0x79dc6=>_0x79dc6[_0x303d0e(0x224)]===_0x45bfa5[_0x303d0e(0x1f8)])[_0x303d0e(0x220)](_0x2bc596=>_0x2bc596[_0x303d0e(0x21d)]))!=null?_0x2d45e8:[],_0xf7bf4c=JSON[_0x303d0e(0x208)](_0x2254c1),_0x5084e2=_0x65105b[_0x303d0e(0x1e3)],_0x4733d5=_0x65105b['id'],_0x395395={'memberId':(await this[_0x303d0e(0x1f0)][_0x303d0e(0x1ed)](_0x446063))[_0x303d0e(0x214)](),'unitId':_0x446063,'threadId':_0x5084e2,'mention':_0x3b2b42,'content':_0xf7bf4c,'replyId':_0x4733d5},_0x5b244b=await this[_0x303d0e(0x1ff)][_0x303d0e(0x20f)](_0x303d0e(0x1db)+_0x446063+'/edit',{'body':_0x395395});return!_0x5b244b[_0x303d0e(0x21b)]['error']||_0x5b244b['body']['error'][_0x303d0e(0x23e)]===0x1;}async[_0x54d3c0(0x23a)](_0xe15011){const _0x5cf847=_0x54d3c0,{unitId:_0x330869}=_0xe15011,_0x1b80df=_0xe15011['threadId'],_0x1d9da6={'memberId':this[_0x5cf847(0x1ea)]['getCurrentUser']()['userID'],'unitId':_0x330869,'threadId':_0x1b80df,'solved':_0xe15011[_0x5cf847(0x22e)]?v['Solved']:v[_0x5cf847(0x21a)]},_0x1f712a=await this[_0x5cf847(0x1ff)][_0x5cf847(0x20f)](_0x5cf847(0x1db)+_0x330869+_0x5cf847(0x221),{'body':_0x1d9da6});return!_0x1f712a[_0x5cf847(0x21b)][_0x5cf847(0x245)]||_0x1f712a[_0x5cf847(0x21b)]['error'][_0x5cf847(0x23e)]===0x1;}async['deleteComment'](_0x3d89e1,_0x417032,_0x14c108,_0x59b6c0){const _0x492208=_0x54d3c0,_0x3975f4={'memberId':(await this[_0x492208(0x1f0)][_0x492208(0x1ed)](_0x3d89e1))[_0x492208(0x214)](),'threadId':_0x14c108,'replyId':_0x59b6c0,'unitId':_0x3d89e1},_0xa73f3f=await this[_0x492208(0x1ff)][_0x492208(0x20f)](_0x492208(0x1db)+_0x3d89e1+'/delete',{'body':_0x3975f4});return!_0xa73f3f[_0x492208(0x21b)][_0x492208(0x245)]||_0xa73f3f['body']['error'][_0x492208(0x23e)]===0x1;}async[_0x54d3c0(0x230)](_0x4445ac,_0x59a290,_0x5db401){const _0x3338a2=_0x54d3c0,_0x376a5c={'unitId':_0x4445ac,'threadId':_0x5db401},_0xca403f=await this[_0x3338a2(0x1ff)][_0x3338a2(0x20f)](_0x3338a2(0x1db)+_0x4445ac+'/list',{'body':_0x376a5c}),_0x564394=_0x5db401[_0x3338a2(0x220)](_0x33fa7b=>me(_0xca403f[_0x3338a2(0x21b)]['comments'][_0x33fa7b],_0x4445ac,_0x59a290))['filter'](Boolean);return Object[_0x3338a2(0x217)](_0xca403f[_0x3338a2(0x21b)][_0x3338a2(0x1f5)])[_0x3338a2(0x1e7)](_0x483b19=>{const _0x781742=_0x3338a2;this[_0x781742(0x1ea)][_0x781742(0x222)](_0x483b19);}),_0x564394;}[_0x54d3c0(0x213)](_0x24c489){const _0x502d96=_0x54d3c0;return{'id':_0x24c489['id'],'threadId':_0x24c489[_0x502d96(0x1e3)],'ref':_0x24c489['ref']};}};D=ce([f(0x0,_0x556ac5(_0x4f4d9a)),f(0x1,_0x556ac5(_0x2f3fe0)),f(0x2,_0x556ac5(_0x385840)),f(0x3,_0x556ac5(_0x4900de))],D);var le=Object[_0x54d3c0(0x244)],he=Object[_0x54d3c0(0x20c)],ue=(_0x1d289e,_0x47bab7,_0x487386,_0x2a73b3)=>{const _0x4ecbdc=_0x54d3c0;for(var _0x1cea13=_0x2a73b3>0x1?void 0x0:_0x2a73b3?he(_0x47bab7,_0x487386):_0x47bab7,_0x141e6f=_0x1d289e[_0x4ecbdc(0x202)]-0x1,_0x35fc70;_0x141e6f>=0x0;_0x141e6f--)(_0x35fc70=_0x1d289e[_0x141e6f])&&(_0x1cea13=(_0x2a73b3?_0x35fc70(_0x47bab7,_0x487386,_0x1cea13):_0x35fc70(_0x1cea13))||_0x1cea13);return _0x2a73b3&&_0x1cea13&&le(_0x47bab7,_0x487386,_0x1cea13),_0x1cea13;},pe=(_0x1208af,_0x32ba16)=>(_0xed1875,_0xa44dd0)=>_0x32ba16(_0xed1875,_0xa44dd0,_0x1208af);let C=class{constructor(_0x4ffb5b){const _0x303d84=_0x54d3c0;this[_0x303d84(0x1ff)]=_0x4ffb5b;}async[_0x54d3c0(0x206)](_0xb523a0,_0x20e239,_0x577ac3){const _0x2c1cba=_0x54d3c0,_0x42177b=new URL(window[_0x2c1cba(0x1ee)]['href'])[_0x2c1cba(0x236)][_0x2c1cba(0x238)](_0x2c1cba(0x1e5));if(!_0x42177b)return[];const _0x34039c=window[_0x2c1cba(0x1ee)][_0x2c1cba(0x239)],_0x3282f3=window[_0x2c1cba(0x1ee)][_0x2c1cba(0x1de)]===_0x2c1cba(0x1e2)?_0x2c1cba(0x1e0):'http';return(await this[_0x2c1cba(0x1ff)][_0x2c1cba(0x238)](_0x3282f3+'://'+_0x34039c+'/universer-api/authz/collaborator',{'params':{'objectID':_0x42177b,'unitID':_0x42177b}}))['body'][_0x2c1cba(0x1f3)][_0x2c1cba(0x220)](_0x1bf8c9=>{const _0x42ccb0=_0x2c1cba;var _0x2e518e,_0x274e43,_0x2538ba,_0x5aef57,_0x5cdc62,_0x1fea7c;return{'id':(_0x274e43=(_0x2e518e=_0x1bf8c9['subject'])==null?void 0x0:_0x2e518e[_0x42ccb0(0x1dc)])!=null?_0x274e43:'','label':(_0x5aef57=(_0x2538ba=_0x1bf8c9[_0x42ccb0(0x227)])==null?void 0x0:_0x2538ba['name'])!=null?_0x5aef57:'','icon':(_0x1fea7c=(_0x5cdc62=_0x1bf8c9['subject'])==null?void 0x0:_0x5cdc62[_0x42ccb0(0x21f)])!=null?_0x1fea7c:'','type':_0x42ccb0(0x20b)};});}};C=ue([pe(0x0,_0x556ac5(_0x4f4d9a))],C);var ve=Object[_0x54d3c0(0x244)],_e=Object[_0x54d3c0(0x20c)],fe=(_0xf411fb,_0x2f74ad,_0x485828,_0x7b1e55)=>{const _0x14906c=_0x54d3c0;for(var _0xfcbb4d=_0x7b1e55>0x1?void 0x0:_0x7b1e55?_e(_0x2f74ad,_0x485828):_0x2f74ad,_0x1ddf08=_0xf411fb[_0x14906c(0x202)]-0x1,_0xd2c168;_0x1ddf08>=0x0;_0x1ddf08--)(_0xd2c168=_0xf411fb[_0x1ddf08])&&(_0xfcbb4d=(_0x7b1e55?_0xd2c168(_0x2f74ad,_0x485828,_0xfcbb4d):_0xd2c168(_0xfcbb4d))||_0xfcbb4d);return _0x7b1e55&&_0xfcbb4d&&ve(_0x2f74ad,_0x485828,_0xfcbb4d),_0xfcbb4d;},I=(_0x29b9ed,_0x48ed11)=>(_0x32bbf5,_0x4bc109)=>_0x48ed11(_0x32bbf5,_0x4bc109,_0x29b9ed);let b=class extends _0x52739f{constructor(_0xf89097,_0x2fd09c,_0xba321c,_0x7a5b4d){const _0x1244b2=_0x54d3c0;super(),this[_0x1244b2(0x22c)]=_0xf89097,this[_0x1244b2(0x1ef)]=_0x2fd09c,this[_0x1244b2(0x1fd)]=_0xba321c,this[_0x1244b2(0x201)]=_0x7a5b4d,this[_0x1244b2(0x20e)]();}[_0x54d3c0(0x20e)](){const _0x37842b=_0x54d3c0;this['_threadCommentDataSourceService'][_0x37842b(0x23c)]=this[_0x37842b(0x1ef)],this[_0x37842b(0x22c)]['syncUpdateMutationToColla']=!0x1,this[_0x37842b(0x1fd)][_0x37842b(0x23c)]=this[_0x37842b(0x201)];}};b=fe([_0x2e269a(_0x2dc267['Starting'],b),I(0x0,_0x183b75),I(0x1,_0x556ac5(D)),I(0x2,_0x1d516f),I(0x3,_0x556ac5(C))],b);var Y=Object[_0x54d3c0(0x244)],Ie=Object['getOwnPropertyDescriptor'],Se=(_0x224c38,_0x492ef6,_0x5d39ea)=>_0x492ef6 in _0x224c38?Y(_0x224c38,_0x492ef6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d39ea}):_0x224c38[_0x492ef6]=_0x5d39ea,be=(_0x55a7cb,_0x16f2f9,_0x4b52aa,_0x2d931e)=>{const _0x45dc5c=_0x54d3c0;for(var _0x528292=_0x2d931e>0x1?void 0x0:_0x2d931e?Ie(_0x16f2f9,_0x4b52aa):_0x16f2f9,_0x5af7d5=_0x55a7cb[_0x45dc5c(0x202)]-0x1,_0x152cb7;_0x5af7d5>=0x0;_0x5af7d5--)(_0x152cb7=_0x55a7cb[_0x5af7d5])&&(_0x528292=(_0x2d931e?_0x152cb7(_0x16f2f9,_0x4b52aa,_0x528292):_0x152cb7(_0x528292))||_0x528292);return _0x2d931e&&_0x528292&&Y(_0x16f2f9,_0x4b52aa,_0x528292),_0x528292;},j=(_0x16e984,_0x1b4222)=>(_0x4e5a9f,_0x220bda)=>_0x1b4222(_0x4e5a9f,_0x220bda,_0x16e984),G=(_0x495927,_0x4f5702,_0xbd0703)=>Se(_0x495927,typeof _0x4f5702!=_0x54d3c0(0x1f9)?_0x4f5702+'':_0x4f5702,_0xbd0703);let g=class extends _0x1a3cb5{constructor(_0x1bb7a8=ne,_0xc93fd4,_0x10c50a){const _0x3fb49f=_0x54d3c0;super(),this[_0x3fb49f(0x247)]=_0x1bb7a8,this['_injector']=_0xc93fd4,this[_0x3fb49f(0x219)]=_0x10c50a;const {..._0xbd407f}=this[_0x3fb49f(0x247)];this['_configService'][_0x3fb49f(0x226)](oe,_0xbd407f);}[_0x54d3c0(0x1df)](){const _0x450fff=_0x54d3c0;[[C],[D],[b],[S]][_0x450fff(0x1e7)](_0x51dad5=>{const _0xb81c9e=_0x450fff;this['_injector'][_0xb81c9e(0x22b)](_0x51dad5);});}};G(g,_0x54d3c0(0x240),k),G(g,'type',_0x4408ec[_0x54d3c0(0x1e4)]),g=be([_0x556292(_0x137644,_0x125610,_0x541cb2,_0x4bd77d),j(0x1,_0x556ac5(_0x4900de)),j(0x2,_0x5362db)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
1
|
import { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
|
|
2
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
|
|
4
4
|
private readonly _config;
|
|
5
5
|
protected _injector: Injector;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4acd7b,_0x50412e){const _0x41daff=_0x305b,_0x55af84=_0x4acd7b();while(!![]){try{const _0x3d6eb9=parseInt(_0x41daff(0x11d))/0x1+-parseInt(_0x41daff(0xc0))/0x2*(parseInt(_0x41daff(0xf8))/0x3)+parseInt(_0x41daff(0x107))/0x4*(-parseInt(_0x41daff(0xdf))/0x5)+parseInt(_0x41daff(0x10a))/0x6+-parseInt(_0x41daff(0xbe))/0x7+-parseInt(_0x41daff(0xe8))/0x8*(parseInt(_0x41daff(0x109))/0x9)+parseInt(_0x41daff(0xd0))/0xa;if(_0x3d6eb9===_0x50412e)break;else _0x55af84['push'](_0x55af84['shift']());}catch(_0x31abb3){_0x55af84['push'](_0x55af84['shift']());}}}(_0x563b,0x2eae4),function(_0x5ea428,_0x14d007){const _0x4597a6=_0x305b;typeof exports==_0x4597a6(0xf6)&&typeof module<'u'?_0x14d007(exports,require(_0x4597a6(0x133)),require(_0x4597a6(0xac)),require(_0x4597a6(0xb9)),require(_0x4597a6(0xec)),require(_0x4597a6(0xdd)),require('dayjs'),require('rxjs')):typeof define==_0x4597a6(0xcc)&&define[_0x4597a6(0x104)]?define([_0x4597a6(0xb3),_0x4597a6(0x133),_0x4597a6(0xac),_0x4597a6(0xb9),_0x4597a6(0xec),'@univerjs/network',_0x4597a6(0x10f),_0x4597a6(0xd5)],_0x14d007):(_0x5ea428=typeof globalThis<'u'?globalThis:_0x5ea428||self,_0x14d007(_0x5ea428[_0x4597a6(0xcf)]={},_0x5ea428['UniverCore'],_0x5ea428['UniverThreadComment'],_0x5ea428['UniverThreadCommentUi'],_0x5ea428[_0x4597a6(0xb7)],_0x5ea428[_0x4597a6(0x112)],_0x5ea428['dayjs'],_0x5ea428[_0x4597a6(0xd5)]));}(this,function(_0x516bfc,_0x9e79b8,_0x5aad9f,_0x5d023b,_0x11de0e,_0x4a978f,_0x44dd6c,_0x7271f8){'use strict';const _0x243cdf=_0x305b;const _0x24a0ce=_0x243cdf(0x11f);var _0xb2798d=(_0x578fee=>(_0x578fee[_0x578fee[_0x243cdf(0xde)]=0x0]=_0x243cdf(0xde),_0x578fee[_0x578fee[_0x243cdf(0xb2)]=0x1]=_0x243cdf(0xb2),_0x578fee[_0x578fee[_0x243cdf(0xae)]=-0x1]='UNRECOGNIZED',_0x578fee))(_0xb2798d||{}),_0x2a6887=(_0xaa338a=>(_0xaa338a[_0xaa338a[_0x243cdf(0xef)]=0x0]='Unknown',_0xaa338a[_0xaa338a[_0x243cdf(0xc8)]=0x1]='Add',_0xaa338a[_0xaa338a['Reply']=0x2]=_0x243cdf(0xff),_0xaa338a[_0xaa338a[_0x243cdf(0xa9)]=0x3]=_0x243cdf(0xa9),_0xaa338a[_0xaa338a['Delete']=0x4]=_0x243cdf(0xce),_0xaa338a[_0xaa338a[_0x243cdf(0x130)]=0x5]=_0x243cdf(0x130),_0xaa338a[_0xaa338a['UNRECOGNIZED']=-0x1]=_0x243cdf(0xae),_0xaa338a))(_0x2a6887||{});const _0x3e0c9c=_0xcba73d=>_0x44dd6c(new Date(+_0xcba73d))[_0x243cdf(0x11c)]('YYYY/MM/DD\x20HH:mm'),_0x38626a=async(_0x2d0877,_0x34f5ec)=>{const _0x713671=_0x243cdf,_0x5d0634=_0x2d0877[_0x713671(0xf4)](_0x9e79b8[_0x713671(0x11e)]),_0x4ae36b=_0x2d0877[_0x713671(0xf4)](_0x4a978f['HTTPService']);_0x34f5ec[_0x713671(0xad)](_0x1f995e=>{const _0x37e01f=_0x713671;_0x5d0634[_0x37e01f(0xf2)](_0x1f995e)&&_0x34f5ec[_0x37e01f(0xca)](_0x1f995e);}),_0x34f5ec['size']&&(await _0x4ae36b[_0x713671(0xf4)](_0x713671(0xe9),{'params':{'userIDs':[..._0x34f5ec]}}))[_0x713671(0xc4)][_0x713671(0x132)][_0x713671(0xad)](_0x341f04=>{const _0x14be4f=_0x713671;_0x341f04&&_0x5d0634[_0x14be4f(0xaa)](_0x341f04);});};var _0x21a1cd=Object[_0x243cdf(0xf1)],_0x2add44=Object[_0x243cdf(0x11b)],_0x514fe4=(_0x797631,_0x17290b,_0x349f89,_0x466098)=>{const _0x19589a=_0x243cdf;for(var _0x3075ec=_0x466098>0x1?void 0x0:_0x466098?_0x2add44(_0x17290b,_0x349f89):_0x17290b,_0x5572b7=_0x797631[_0x19589a(0x131)]-0x1,_0x1dd2a0;_0x5572b7>=0x0;_0x5572b7--)(_0x1dd2a0=_0x797631[_0x5572b7])&&(_0x3075ec=(_0x466098?_0x1dd2a0(_0x17290b,_0x349f89,_0x3075ec):_0x1dd2a0(_0x3075ec))||_0x3075ec);return _0x466098&&_0x3075ec&&_0x21a1cd(_0x17290b,_0x349f89,_0x3075ec),_0x3075ec;},_0x10409c=(_0x1e0ef3,_0x30e1a8)=>(_0x2ce3d9,_0x429741)=>_0x30e1a8(_0x2ce3d9,_0x429741,_0x1e0ef3);function _0x18316b(_0x4bb192,_0x28bac0){const _0x4414cf=_0x243cdf,_0x912d08=_0x4bb192[_0x4414cf(0xc2)][0x0];return{..._0x28bac0,'id':_0x912d08['replyId'],'resolved':_0x4bb192[_0x4414cf(0xda)]===0x1,'dT':_0x3e0c9c(_0x912d08['createTimestamp']),'personId':_0x912d08[_0x4414cf(0x136)],'threadId':_0x912d08[_0x4414cf(0x135)]};}function _0x1f98fb(_0x359b24,_0x321cec,_0x5e2982){const _0x4454aa=_0x243cdf;var _0x1ba648,_0x4a75d4;if(((_0x4a75d4=(_0x1ba648=_0x359b24==null?void 0x0:_0x359b24[_0x4454aa(0xc2)])==null?void 0x0:_0x1ba648['length'])!=null?_0x4a75d4:0x0)>0x0){const _0x4d8b85=(_0x2b1751,_0x2bf83a)=>({'id':_0x2b1751[_0x4454aa(0x13a)],'threadId':_0x2b1751['threadId'],'dT':_0x3e0c9c(_0x2b1751[_0x4454aa(0x138)]),'personId':_0x2b1751[_0x4454aa(0x136)],'resolved':_0x359b24['solved']===_0xb2798d['Solved'],'unitId':_0x321cec,'subUnitId':_0x5e2982,'text':JSON[_0x4454aa(0x13d)](_0x2b1751[_0x4454aa(0xfa)]),'parentId':_0x2bf83a}),_0x54fa30=_0x4d8b85(_0x359b24[_0x4454aa(0xc2)][0x0]);return{..._0x54fa30,'children':_0x359b24[_0x4454aa(0xc2)][_0x4454aa(0xd1)](0x1)[_0x4454aa(0x113)](_0x5d9e9a=>_0x4d8b85(_0x5d9e9a,_0x54fa30['id']))};}return null;}let _0x1102d2=class{constructor(_0x28d17a,_0x2322f5,_0x5b0eb8,_0x1a5f4f){const _0x5d83b3=_0x243cdf;this[_0x5d83b3(0xe4)]=_0x28d17a,this['_userService']=_0x2322f5,this[_0x5d83b3(0xbb)]=_0x5b0eb8,this['_injector']=_0x1a5f4f;}async[_0x243cdf(0xfc)](_0xd379e2){const _0x1f9d08=_0x243cdf;var _0x47738a,_0x56e5d0;const {parentId:_0x49cbc5,unitId:_0x11fd0e,text:_0xf9763,threadId:_0x28a16d}=_0xd379e2,_0x1596c5=(_0x56e5d0=(_0x47738a=_0xf9763[_0x1f9d08(0xbf)])==null?void 0x0:_0x47738a[_0x1f9d08(0xbd)](_0x1a7ae6=>_0x1a7ae6[_0x1f9d08(0x110)]===_0x9e79b8[_0x1f9d08(0x123)][_0x1f9d08(0x10c)])[_0x1f9d08(0x113)](_0x2a7c66=>_0x2a7c66[_0x1f9d08(0x106)]))!=null?_0x56e5d0:[],_0x41ecff=JSON['stringify'](_0xf9763),_0x4b9430=(await this[_0x1f9d08(0xbb)][_0x1f9d08(0x102)](_0x11fd0e))[_0x1f9d08(0xf7)]();if(_0x49cbc5){const _0x3ea833={'memberId':_0x4b9430,'unitId':_0x11fd0e,'content':_0x41ecff,'mention':_0x1596c5,'threadId':_0x28a16d},_0x45792d=(await this['_httpService']['post'](_0x1f9d08(0x10b)+_0x11fd0e+_0x1f9d08(0xab),{'body':_0x3ea833}))[_0x1f9d08(0xc4)][_0x1f9d08(0x12b)];return{..._0xd379e2,'id':_0x45792d[_0x1f9d08(0x13a)],'dT':_0x44dd6c(+_0x45792d[_0x1f9d08(0x138)])[_0x1f9d08(0x11c)](_0x1f9d08(0xd2)),'personId':_0x45792d[_0x1f9d08(0x136)]};}else{const _0xfa4a28={'memberId':_0x4b9430,'unitId':_0x11fd0e,'content':_0x41ecff,'mention':_0x1596c5},_0x5d3ab8=await this['_httpService'][_0x1f9d08(0x114)](_0x1f9d08(0x10b)+_0x11fd0e+_0x1f9d08(0xd8),{'body':_0xfa4a28});return _0x18316b(_0x5d3ab8['body'][_0x1f9d08(0xe7)],_0xd379e2);}}async[_0x243cdf(0x120)](_0x360792){const _0x274801=_0x243cdf;var _0x4c2b2e,_0xd26435;const {text:_0x5bc9ad,unitId:_0x247e1e}=_0x360792,_0x3dfedc=(_0xd26435=(_0x4c2b2e=_0x5bc9ad[_0x274801(0xbf)])==null?void 0x0:_0x4c2b2e['filter'](_0x20e817=>_0x20e817[_0x274801(0x110)]===_0x9e79b8[_0x274801(0x123)][_0x274801(0x10c)])['map'](_0x2001c7=>_0x2001c7['rangeId']))!=null?_0xd26435:[],_0x2afbf6=JSON[_0x274801(0xb1)](_0x5bc9ad),_0x22076f=_0x360792[_0x274801(0x135)],_0xa012e=_0x360792['id'],_0x5079d7={'memberId':(await this[_0x274801(0xbb)][_0x274801(0x102)](_0x247e1e))[_0x274801(0xf7)](),'unitId':_0x247e1e,'threadId':_0x22076f,'mention':_0x3dfedc,'content':_0x2afbf6,'replyId':_0xa012e},_0x2d2d4b=await this[_0x274801(0xe4)][_0x274801(0x114)](_0x274801(0x10b)+_0x247e1e+_0x274801(0xd7),{'body':_0x5079d7});return!_0x2d2d4b['body'][_0x274801(0x101)]||_0x2d2d4b[_0x274801(0xc4)]['error'][_0x274801(0xdb)]===0x1;}async[_0x243cdf(0xcd)](_0x46c3d7){const _0x5ab588=_0x243cdf,{unitId:_0x4990c5}=_0x46c3d7,_0x1c7f2e=_0x46c3d7[_0x5ab588(0x135)],_0x416178={'memberId':this[_0x5ab588(0x134)]['getCurrentUser']()[_0x5ab588(0x10e)],'unitId':_0x4990c5,'threadId':_0x1c7f2e,'solved':_0x46c3d7[_0x5ab588(0x124)]?_0xb2798d[_0x5ab588(0xb2)]:_0xb2798d['OpenOrReOpen']},_0xb30426=await this[_0x5ab588(0xe4)][_0x5ab588(0x114)](_0x5ab588(0x10b)+_0x4990c5+'/solved',{'body':_0x416178});return!_0xb30426[_0x5ab588(0xc4)][_0x5ab588(0x101)]||_0xb30426[_0x5ab588(0xc4)][_0x5ab588(0x101)]['code']===0x1;}async[_0x243cdf(0xe5)](_0x4173be,_0x5515ee,_0x1ee126,_0x3d10e5){const _0x37cd7c=_0x243cdf,_0x3a33e5={'memberId':(await this['_sessionService'][_0x37cd7c(0x102)](_0x4173be))[_0x37cd7c(0xf7)](),'threadId':_0x1ee126,'replyId':_0x3d10e5,'unitId':_0x4173be},_0x2347ab=await this[_0x37cd7c(0xe4)][_0x37cd7c(0x114)](_0x37cd7c(0x10b)+_0x4173be+_0x37cd7c(0x13b),{'body':_0x3a33e5});return!_0x2347ab['body'][_0x37cd7c(0x101)]||_0x2347ab[_0x37cd7c(0xc4)][_0x37cd7c(0x101)]['code']===0x1;}async[_0x243cdf(0xd9)](_0x2b5eb0,_0x2f5d64,_0x20743f){const _0x5217ed=_0x243cdf,_0x2bd965={'unitId':_0x2b5eb0,'threadId':_0x20743f},_0x430687=await this[_0x5217ed(0xe4)][_0x5217ed(0x114)](_0x5217ed(0x10b)+_0x2b5eb0+_0x5217ed(0xb6),{'body':_0x2bd965}),_0x55817e=_0x20743f['map'](_0x476279=>_0x1f98fb(_0x430687['body']['comments'][_0x476279],_0x2b5eb0,_0x2f5d64))[_0x5217ed(0xbd)](Boolean);return Object[_0x5217ed(0x118)](_0x430687[_0x5217ed(0xc4)][_0x5217ed(0x132)])[_0x5217ed(0xad)](_0x40ed38=>{const _0x24914d=_0x5217ed;this['_userService'][_0x24914d(0xaa)](_0x40ed38);}),_0x55817e;}['saveCommentToSnapshot'](_0xd7ba88){const _0x981a2f=_0x243cdf;return{'id':_0xd7ba88['id'],'threadId':_0xd7ba88[_0x981a2f(0x135)],'ref':_0xd7ba88[_0x981a2f(0xc7)]};}};_0x1102d2=_0x514fe4([_0x10409c(0x0,_0x9e79b8[_0x243cdf(0x111)](_0x4a978f['HTTPService'])),_0x10409c(0x1,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8[_0x243cdf(0x11e)])),_0x10409c(0x2,_0x9e79b8[_0x243cdf(0x111)](_0x11de0e[_0x243cdf(0x119)])),_0x10409c(0x3,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8[_0x243cdf(0xc1)]))],_0x1102d2);var _0x5a23a7=Object['defineProperty'],_0x71a005=Object['getOwnPropertyDescriptor'],_0x41594e=(_0x558814,_0x525761,_0x41c2a3,_0x3790b1)=>{const _0x48e1b8=_0x243cdf;for(var _0x555c63=_0x3790b1>0x1?void 0x0:_0x3790b1?_0x71a005(_0x525761,_0x41c2a3):_0x525761,_0x337edb=_0x558814[_0x48e1b8(0x131)]-0x1,_0x411189;_0x337edb>=0x0;_0x337edb--)(_0x411189=_0x558814[_0x337edb])&&(_0x555c63=(_0x3790b1?_0x411189(_0x525761,_0x41c2a3,_0x555c63):_0x411189(_0x555c63))||_0x555c63);return _0x3790b1&&_0x555c63&&_0x5a23a7(_0x525761,_0x41c2a3,_0x555c63),_0x555c63;},_0x59f7cd=(_0x2b3478,_0x925269)=>(_0x2e16dc,_0x2e647f)=>_0x925269(_0x2e16dc,_0x2e647f,_0x2b3478);let _0x57e9c8=class{constructor(_0x326fc0){const _0x5a36bb=_0x243cdf;this[_0x5a36bb(0xe4)]=_0x326fc0;}async[_0x243cdf(0xcb)](_0x47c522,_0x511684,_0x569e79){const _0x3efc58=_0x243cdf,_0x208d8e=new URL(window[_0x3efc58(0xd6)]['href'])[_0x3efc58(0x116)][_0x3efc58(0xf4)]('unit');if(!_0x208d8e)return[];const _0x2201b2=window[_0x3efc58(0xd6)][_0x3efc58(0x115)],_0x2822d2=window[_0x3efc58(0xd6)]['protocol']===_0x3efc58(0xc6)?_0x3efc58(0xc5):'http';return(await this[_0x3efc58(0xe4)][_0x3efc58(0xf4)](_0x2822d2+_0x3efc58(0xb8)+_0x2201b2+'/universer-api/authz/collaborator',{'params':{'objectID':_0x208d8e,'unitID':_0x208d8e}}))[_0x3efc58(0xc4)][_0x3efc58(0x100)][_0x3efc58(0x113)](_0x3ea8e5=>{const _0x3a8f0e=_0x3efc58;var _0x3778ed,_0x302d55,_0x4c5da8,_0xda8c0b,_0x4b8662,_0x211c2d;return{'id':(_0x302d55=(_0x3778ed=_0x3ea8e5[_0x3a8f0e(0xf0)])==null?void 0x0:_0x3778ed[_0x3a8f0e(0x10e)])!=null?_0x302d55:'','label':(_0xda8c0b=(_0x4c5da8=_0x3ea8e5['subject'])==null?void 0x0:_0x4c5da8[_0x3a8f0e(0x12c)])!=null?_0xda8c0b:'','icon':(_0x211c2d=(_0x4b8662=_0x3ea8e5[_0x3a8f0e(0xf0)])==null?void 0x0:_0x4b8662[_0x3a8f0e(0xea)])!=null?_0x211c2d:'','type':_0x3a8f0e(0xa8)};});}};_0x57e9c8=_0x41594e([_0x59f7cd(0x0,_0x9e79b8[_0x243cdf(0x111)](_0x4a978f[_0x243cdf(0xaf)]))],_0x57e9c8);var _0x3622a1=Object[_0x243cdf(0xf1)],_0x26d7a1=Object[_0x243cdf(0x11b)],_0x6c3492=(_0x298b8f,_0x40ea03,_0x41a4d7,_0x30e8a9)=>{for(var _0x310493=_0x30e8a9>0x1?void 0x0:_0x30e8a9?_0x26d7a1(_0x40ea03,_0x41a4d7):_0x40ea03,_0x149beb=_0x298b8f['length']-0x1,_0x47c0f8;_0x149beb>=0x0;_0x149beb--)(_0x47c0f8=_0x298b8f[_0x149beb])&&(_0x310493=(_0x30e8a9?_0x47c0f8(_0x40ea03,_0x41a4d7,_0x310493):_0x47c0f8(_0x310493))||_0x310493);return _0x30e8a9&&_0x310493&&_0x3622a1(_0x40ea03,_0x41a4d7,_0x310493),_0x310493;},_0xb63e0e=(_0x55e615,_0x1edea5)=>(_0x25a086,_0x328adb)=>_0x1edea5(_0x25a086,_0x328adb,_0x55e615);let _0x15902a=class extends _0x9e79b8[_0x243cdf(0xe0)]{constructor(_0x5546f6,_0x288c3e,_0x7336ed,_0x4c1a4a){const _0x56fbc7=_0x243cdf;super(),this['_threadCommentDataSourceService']=_0x5546f6,this[_0x56fbc7(0x12f)]=_0x288c3e,this[_0x56fbc7(0xf9)]=_0x7336ed,this['_threadCommentMentionDataSource']=_0x4c1a4a,this['_initDataSource']();}[_0x243cdf(0x12a)](){const _0x26c686=_0x243cdf;this[_0x26c686(0x126)][_0x26c686(0xfb)]=this['_threadCommentDataSource'],this[_0x26c686(0x126)][_0x26c686(0x129)]=!0x1,this[_0x26c686(0xf9)][_0x26c686(0xfb)]=this[_0x26c686(0x122)];}};_0x15902a=_0x6c3492([_0x9e79b8[_0x243cdf(0x12e)](_0x9e79b8[_0x243cdf(0x125)][_0x243cdf(0x103)],_0x15902a),_0xb63e0e(0x0,_0x5aad9f[_0x243cdf(0x127)]),_0xb63e0e(0x1,_0x9e79b8['Inject'](_0x1102d2)),_0xb63e0e(0x2,_0x5d023b['IThreadCommentMentionDataService']),_0xb63e0e(0x3,_0x9e79b8[_0x243cdf(0x111)](_0x57e9c8))],_0x15902a);var _0x55261b=Object[_0x243cdf(0xf1)],_0x5e747d=Object[_0x243cdf(0x11b)],_0x168190=(_0x3e82f4,_0x6ad665,_0x579fb2,_0x158abc)=>{for(var _0x3a1ff6=_0x158abc>0x1?void 0x0:_0x158abc?_0x5e747d(_0x6ad665,_0x579fb2):_0x6ad665,_0x53d963=_0x3e82f4['length']-0x1,_0x255818;_0x53d963>=0x0;_0x53d963--)(_0x255818=_0x3e82f4[_0x53d963])&&(_0x3a1ff6=(_0x158abc?_0x255818(_0x6ad665,_0x579fb2,_0x3a1ff6):_0x255818(_0x3a1ff6))||_0x3a1ff6);return _0x158abc&&_0x3a1ff6&&_0x55261b(_0x6ad665,_0x579fb2,_0x3a1ff6),_0x3a1ff6;},_0x1b8e30=(_0x435073,_0x58c2a6)=>(_0x1f5d60,_0x3b8ec1)=>_0x58c2a6(_0x1f5d60,_0x3b8ec1,_0x435073);let _0x15bb56=class extends _0x9e79b8[_0x243cdf(0xe0)]{constructor(_0x47ec90,_0x4c4b9c,_0x357b3e,_0x4dc291){const _0x2bf710=_0x243cdf;super(),this['_commentService']=_0x47ec90,this['_threadCommentModel']=_0x4c4b9c,this[_0x2bf710(0x134)]=_0x357b3e,this['_injector']=_0x4dc291,this['_init'](),this[_0x2bf710(0x12d)]();}[_0x243cdf(0x12d)](){const _0x1d2006=_0x243cdf;this[_0x1d2006(0xe2)](this[_0x1d2006(0xe6)][_0x1d2006(0xb5)][_0x1d2006(0x10d)](_0x7271f8['bufferTime'](0x10))[_0x1d2006(0xf5)](_0x43f4eb=>{const _0xd94b5c=_0x1d2006,_0x1a3cbb=new Set();_0x43f4eb[_0xd94b5c(0xad)](_0x555b8b=>{const _0x487996=_0xd94b5c;switch(_0x555b8b[_0x487996(0xee)]){case _0x487996(0xbc):{const _0xe0d0a7=_0x555b8b[_0x487996(0xc9)][_0x487996(0xe1)];_0x1a3cbb[_0x487996(0xbc)](_0xe0d0a7);break;}}}),_0x38626a(this[_0xd94b5c(0x121)],_0x1a3cbb);}));}[_0x243cdf(0xf3)](){const _0x4bb1c2=_0x243cdf;this[_0x4bb1c2(0xe2)](this[_0x4bb1c2(0xeb)][_0x4bb1c2(0xb5)][_0x4bb1c2(0xf5)](async _0x56e267=>{const _0x1576cc=_0x4bb1c2;var _0x5bcc46,_0x1e4960;const _0x334cc9=this[_0x1576cc(0xe6)]['getThread'](_0x56e267['unitId'],_0x56e267['threadId']);if(!_0x334cc9)return;const {unitId:_0xd0085d,subUnitId:_0xaf1d9d}=_0x334cc9;switch(_0x56e267['user']&&this[_0x1576cc(0x134)][_0x1576cc(0xaa)](_0x56e267[_0x1576cc(0xa8)]),_0x56e267['type']){case _0x2a6887[_0x1576cc(0xc8)]:break;case _0x2a6887[_0x1576cc(0xff)]:{this[_0x1576cc(0xe6)][_0x1576cc(0xfc)](_0xd0085d,_0xaf1d9d,{'unitId':_0xd0085d,'subUnitId':_0xaf1d9d,'ref':'','id':_0x56e267['replyId'],'dT':_0x3e0c9c(+_0x56e267[_0x1576cc(0x138)]),'threadId':_0x56e267['threadId'],'personId':(_0x1e4960=(_0x5bcc46=_0x56e267[_0x1576cc(0xa8)])==null?void 0x0:_0x5bcc46[_0x1576cc(0x10e)])!=null?_0x1e4960:_0x56e267[_0x1576cc(0x136)],'text':JSON[_0x1576cc(0x13d)](_0x56e267['content']),'parentId':_0x334cc9['id']});break;}case _0x2a6887[_0x1576cc(0xce)]:{const _0x451b21=this[_0x1576cc(0xe6)][_0x1576cc(0xb0)](_0xd0085d,_0xaf1d9d,_0x56e267[_0x1576cc(0x13a)]);_0x451b21&&_0x451b21[_0x1576cc(0xd3)]&&this[_0x1576cc(0xe6)][_0x1576cc(0xe5)](_0xd0085d,_0xaf1d9d,_0x56e267['replyId']);break;}case _0x2a6887[_0x1576cc(0xa9)]:{this[_0x1576cc(0xe6)]['updateComment'](_0xd0085d,_0xaf1d9d,{'commentId':_0x56e267[_0x1576cc(0x13a)],'text':JSON[_0x1576cc(0x13d)](_0x56e267[_0x1576cc(0xfa)])});break;}case _0x2a6887[_0x1576cc(0x130)]:{const _0x20f116=this['_threadCommentModel']['getThread'](_0xd0085d,_0x56e267[_0x1576cc(0x135)]);_0x20f116&&this[_0x1576cc(0xe6)]['resolveComment'](_0xd0085d,_0xaf1d9d,_0x20f116['id'],_0x56e267[_0x1576cc(0xda)]===_0xb2798d[_0x1576cc(0xb2)]);break;}}}));}};_0x15bb56=_0x168190([_0x9e79b8['OnLifecycle'](_0x9e79b8[_0x243cdf(0x125)][_0x243cdf(0x139)],_0x15bb56),_0x1b8e30(0x0,_0x9e79b8[_0x243cdf(0x111)](_0x11de0e['CommentService'])),_0x1b8e30(0x1,_0x9e79b8[_0x243cdf(0x111)](_0x5aad9f[_0x243cdf(0x105)])),_0x1b8e30(0x2,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8[_0x243cdf(0x11e)])),_0x1b8e30(0x3,_0x9e79b8['Inject'](_0x9e79b8[_0x243cdf(0xc1)]))],_0x15bb56);const _0x15557b=_0x243cdf(0xb4),_0x3b6224={};var _0x1e92ae=Object[_0x243cdf(0xf1)],_0x5266fc=Object[_0x243cdf(0x11b)],_0x3fba4b=(_0x383029,_0x5e4e85,_0x21aa4b)=>_0x5e4e85 in _0x383029?_0x1e92ae(_0x383029,_0x5e4e85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21aa4b}):_0x383029[_0x5e4e85]=_0x21aa4b,_0x4d40e6=(_0x3e3be8,_0x298df9,_0x2d52f6,_0xe72479)=>{const _0x3f926a=_0x243cdf;for(var _0x285843=_0xe72479>0x1?void 0x0:_0xe72479?_0x5266fc(_0x298df9,_0x2d52f6):_0x298df9,_0x25608a=_0x3e3be8[_0x3f926a(0x131)]-0x1,_0x2fb741;_0x25608a>=0x0;_0x25608a--)(_0x2fb741=_0x3e3be8[_0x25608a])&&(_0x285843=(_0xe72479?_0x2fb741(_0x298df9,_0x2d52f6,_0x285843):_0x2fb741(_0x285843))||_0x285843);return _0xe72479&&_0x285843&&_0x1e92ae(_0x298df9,_0x2d52f6,_0x285843),_0x285843;},_0x493b05=(_0x323e99,_0x7ce2a7)=>(_0x177509,_0x5d88d0)=>_0x7ce2a7(_0x177509,_0x5d88d0,_0x323e99),_0x55a5bf=(_0x54d0ef,_0x209b3b,_0x45d5de)=>_0x3fba4b(_0x54d0ef,typeof _0x209b3b!=_0x243cdf(0x13c)?_0x209b3b+'':_0x209b3b,_0x45d5de);_0x516bfc['UniverThreadCommentDataSourcePlugin']=class extends _0x9e79b8[_0x243cdf(0x117)]{constructor(_0x21dd0b=_0x3b6224,_0x3fffd4,_0x401efd){const _0x286d69=_0x243cdf;super(),this[_0x286d69(0xd4)]=_0x21dd0b,this['_injector']=_0x3fffd4,this[_0x286d69(0xfd)]=_0x401efd;const {..._0xa7ebc9}=this[_0x286d69(0xd4)];this[_0x286d69(0xfd)][_0x286d69(0xc3)](_0x15557b,_0xa7ebc9);}[_0x243cdf(0x137)](){const _0x4c016f=_0x243cdf;[[_0x57e9c8],[_0x1102d2],[_0x15902a],[_0x15bb56]][_0x4c016f(0xad)](_0x314b50=>{const _0xb0fd23=_0x4c016f;this[_0xb0fd23(0x121)][_0xb0fd23(0xbc)](_0x314b50);});}},_0x55a5bf(_0x516bfc[_0x243cdf(0xed)],_0x243cdf(0x128),_0x24a0ce),_0x55a5bf(_0x516bfc[_0x243cdf(0xed)],_0x243cdf(0xee),_0x9e79b8[_0x243cdf(0xba)][_0x243cdf(0xe3)]),_0x516bfc['UniverThreadCommentDataSourcePlugin']=_0x4d40e6([_0x9e79b8[_0x243cdf(0x13e)](_0x5aad9f[_0x243cdf(0x108)],_0x5d023b[_0x243cdf(0xdc)],_0x11de0e[_0x243cdf(0x11a)]),_0x493b05(0x1,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8['Injector'])),_0x493b05(0x2,_0x9e79b8['IConfigService'])],_0x516bfc[_0x243cdf(0xed)]),Object[_0x243cdf(0xf1)](_0x516bfc,Symbol[_0x243cdf(0xfe)],{'value':'Module'});}));function _0x305b(_0x4fc176,_0x445080){const _0x563b1a=_0x563b();return _0x305b=function(_0x305b2e,_0x4d65d6){_0x305b2e=_0x305b2e-0xa8;let _0x90029e=_0x563b1a[_0x305b2e];return _0x90029e;},_0x305b(_0x4fc176,_0x445080);}function _0x563b(){const _0x1a1561=['CollaborationSessionService','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','format','325579jKRGSa','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','_injector','_threadCommentMentionDataSource','CustomRangeType','resolved','LifecycleStages','_threadCommentDataSourceService','IThreadCommentDataSourceService','pluginName','syncUpdateMutationToColla','_initDataSource','reply','name','_initUserSync','OnLifecycle','_threadCommentDataSource','Solve','length','users','@univerjs/core','_userService','threadId','userId','onStarting','createTimestamp','Ready','replyId','/delete','symbol','parse','DependentOn','user','Edit','addUser','/reply','@univerjs/thread-comment','forEach','UNRECOGNIZED','HTTPService','getComment','stringify','Solved','exports','thread-comment-data-source.config','commentUpdate$','/list','UniverCollaborationClient','://','@univerjs/thread-comment-ui','UniverInstanceType','_sessionService','add','filter','824159QBXHCs','customRanges','566akkxts','Injector','replies','setConfig','body','https','https:','ref','Add','payload','delete','getMentions','function','resolveComment','Delete','UniverThreadCommentDatasource','3650160MrFeBP','slice','YYYY/MM/DD\x20HH:mm','parentId','_config','rxjs','location','/edit','/add','listComments','solved','code','UniverThreadCommentUIPlugin','@univerjs/network','OpenOrReOpen','5vOkOeg','Disposable','personId','disposeWithMe','UNIVER_UNKNOWN','_httpService','deleteComment','_threadCommentModel','comment','8ASmSYE','/universer-api/user/list','avatar','_commentService','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','type','Unknown','subject','defineProperty','getUser','_init','get','subscribe','object','getMemberID','3489HXDnFJ','_threadCommentMentionDataService','content','dataSource','addComment','_configService','toStringTag','Reply','collaborators','error','requireSession','Starting','amd','ThreadCommentModel','rangeId','219156dZjeEd','UniverThreadCommentPlugin','1583208FEKyPo','1069056BYaZOw','/universer-api/comment/unit/','COMMENT','pipe','userID','dayjs','rangeType','Inject','UniverNetwork','map','post','host','searchParams','Plugin','values'];_0x563b=function(){return _0x1a1561;};return _0x563b();}
|
|
1
|
+
function _0xcdf0(_0x4ea4b9,_0xcc44e5){const _0x5139c2=_0x5139();return _0xcdf0=function(_0xcdf00b,_0x3088d2){_0xcdf00b=_0xcdf00b-0x188;let _0x5ccdda=_0x5139c2[_0xcdf00b];return _0x5ccdda;},_0xcdf0(_0x4ea4b9,_0xcc44e5);}function _0x5139(){const _0x45df11=['_threadCommentDataSourceService','pipe','function','https','setConfig','_initUserSync','OpenOrReOpen','saveCommentToSnapshot','add','getMentions','slice','values','@univerjs/network','UniverThreadCommentUi','UniverThreadCommentDataSourcePlugin','_userService','stringify','@univerjs-pro/license','http','commentUpdate$','Module','UNRECOGNIZED','rangeType','/universer-api/comment/unit/','customRanges','/universer-api/user/list','_httpService','/delete','replies','@univerjs-pro/collaboration-client','solved','delete','CommentService','LifecycleStages','Solve','symbol','threadId','unit','8afABGm','body','CollaborationSessionService','deleteComment','comments','href','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentMentionDataSource','566523YyNIUv','addUser','11035qZSvpu','_threadCommentDataSource','IThreadCommentMentionDataService','getUser','toStringTag','_sessionService','userID','code','createTimestamp','parse','subscribe','_threadCommentMentionDataService','onStarting','@univerjs/thread-comment-ui','length','/universer-api/authz/collaborator','personId','rxjs','YYYY/MM/DD\x20HH:mm','bufferTime','rangeId','508hVuuuB','map','object','/list','10SUnQZp','Reply','resolveComment','getOwnPropertyDescriptor','1017540jtjCTn','_injector','dayjs','_threadCommentModel','reply','_init','OnLifecycle','parentId','COMMENT','589gAoaZS','userId','UniverCore','content','IThreadCommentDataSourceService','314088PqKyby','searchParams','size','ThreadCommentModel','protocol','getCurrentUser','forEach','thread-comment-data-source.config','Unknown','host','_initDataSource','unitId','Solved','Inject','UniverLicense','subject','addComment','182679dPHPRa','UniverNetwork','CustomRangeType','UniverCollaborationClient','format','dataSource','getComment','avatar','DependentOn','Delete','622nUvWnv','listComments','type','error','requireSession','_commentService','get','1506186lZkIIr','UserManagerService','UniverThreadComment','comment','@univerjs/thread-comment','Edit','replyId','Disposable','location','payload','getThread','users','disposeWithMe','Add','amd','UNIVER_UNKNOWN','HTTPService','://','defineProperty','getMemberID','user','UniverThreadCommentPlugin','/edit','UniverThreadCommentUIPlugin','filter','Injector','_config','/solved','_configService','resolved','post'];_0x5139=function(){return _0x45df11;};return _0x5139();}(function(_0x3f5f06,_0x2e4d81){const _0x51cbe9=_0xcdf0,_0x389dd6=_0x3f5f06();while(!![]){try{const _0x4e2194=-parseInt(_0x51cbe9(0x1b4))/0x1*(-parseInt(_0x51cbe9(0x1d4))/0x2)+-parseInt(_0x51cbe9(0x1ab))/0x3+parseInt(_0x51cbe9(0x1a3))/0x4*(parseInt(_0x51cbe9(0x18e))/0x5)+-parseInt(_0x51cbe9(0x1b9))/0x6+parseInt(_0x51cbe9(0x1ca))/0x7*(parseInt(_0x51cbe9(0x220))/0x8)+parseInt(_0x51cbe9(0x18c))/0x9*(-parseInt(_0x51cbe9(0x1a7))/0xa)+parseInt(_0x51cbe9(0x1db))/0xb;if(_0x4e2194===_0x2e4d81)break;else _0x389dd6['push'](_0x389dd6['shift']());}catch(_0x486f7e){_0x389dd6['push'](_0x389dd6['shift']());}}}(_0x5139,0x29ff0),function(_0x3addfc,_0x465b14){const _0x33ad61=_0xcdf0;typeof exports==_0x33ad61(0x1a5)&&typeof module<'u'?_0x465b14(exports,require('@univerjs/core'),require(_0x33ad61(0x1df)),require(_0x33ad61(0x19b)),require('@univerjs-pro/collaboration-client'),require(_0x33ad61(0x20b)),require(_0x33ad61(0x19f)),require(_0x33ad61(0x206)),require(_0x33ad61(0x1ad))):typeof define==_0x33ad61(0x1fc)&&define[_0x33ad61(0x1e9)]?define(['exports','@univerjs/core',_0x33ad61(0x1df),'@univerjs/thread-comment-ui',_0x33ad61(0x217),_0x33ad61(0x20b),'rxjs',_0x33ad61(0x206),_0x33ad61(0x1ad)],_0x465b14):(_0x3addfc=typeof globalThis<'u'?globalThis:_0x3addfc||self,_0x465b14(_0x3addfc['UniverThreadCommentDatasource']={},_0x3addfc[_0x33ad61(0x1b6)],_0x3addfc[_0x33ad61(0x1dd)],_0x3addfc[_0x33ad61(0x207)],_0x3addfc[_0x33ad61(0x1cd)],_0x3addfc[_0x33ad61(0x1c7)],_0x3addfc[_0x33ad61(0x19f)],_0x3addfc[_0x33ad61(0x1cb)],_0x3addfc[_0x33ad61(0x1ad)]));}(this,function(_0xbfcf46,_0x299097,_0x48b9c5,_0x3e94f5,_0x1d92d3,_0x4bcffa,_0x1d4a18,_0x1d7911,_0x4f003a){'use strict';const _0xcfdc78=_0xcdf0;const _0x2662d5=_0xcfdc78(0x18a);var _0x5754f1=(_0x3d7781=>(_0x3d7781[_0x3d7781[_0xcfdc78(0x200)]=0x0]=_0xcfdc78(0x200),_0x3d7781[_0x3d7781[_0xcfdc78(0x1c5)]=0x1]=_0xcfdc78(0x1c5),_0x3d7781[_0x3d7781[_0xcfdc78(0x20f)]=-0x1]=_0xcfdc78(0x20f),_0x3d7781))(_0x5754f1||{}),_0x6617b7=(_0x1a0528=>(_0x1a0528[_0x1a0528['Unknown']=0x0]=_0xcfdc78(0x1c1),_0x1a0528[_0x1a0528['Add']=0x1]=_0xcfdc78(0x1e8),_0x1a0528[_0x1a0528['Reply']=0x2]=_0xcfdc78(0x1a8),_0x1a0528[_0x1a0528[_0xcfdc78(0x1e0)]=0x3]=_0xcfdc78(0x1e0),_0x1a0528[_0x1a0528[_0xcfdc78(0x1d3)]=0x4]='Delete',_0x1a0528[_0x1a0528[_0xcfdc78(0x21c)]=0x5]='Solve',_0x1a0528[_0x1a0528[_0xcfdc78(0x20f)]=-0x1]=_0xcfdc78(0x20f),_0x1a0528))(_0x6617b7||{});const _0x685b06=_0x25dd90=>_0x4f003a(new Date(+_0x25dd90))[_0xcfdc78(0x1ce)](_0xcfdc78(0x1a0)),_0x2c9c90=async(_0x1019ab,_0x4ca21e)=>{const _0x5ee8f6=_0xcfdc78,_0xc93076=_0x1019ab[_0x5ee8f6(0x1da)](_0x299097[_0x5ee8f6(0x1dc)]),_0x28125e=_0x1019ab[_0x5ee8f6(0x1da)](_0x1d7911[_0x5ee8f6(0x1eb)]);_0x4ca21e[_0x5ee8f6(0x1bf)](_0x3cc81b=>{const _0x4c8c8f=_0x5ee8f6;_0xc93076[_0x4c8c8f(0x191)](_0x3cc81b)&&_0x4ca21e[_0x4c8c8f(0x219)](_0x3cc81b);}),_0x4ca21e[_0x5ee8f6(0x1bb)]&&(await _0x28125e['get'](_0x5ee8f6(0x213),{'params':{'userIDs':[..._0x4ca21e]}}))[_0x5ee8f6(0x221)]['users'][_0x5ee8f6(0x1bf)](_0x54d427=>{const _0x18c1bc=_0x5ee8f6;_0x54d427&&_0xc93076[_0x18c1bc(0x18d)](_0x54d427);});};var _0x39e91e=Object[_0xcfdc78(0x1ed)],_0x564452=Object[_0xcfdc78(0x1aa)],_0x279bfe=(_0x4fedc2,_0x2d55db,_0x28c6af,_0xf5b3d9)=>{const _0x107faf=_0xcfdc78;for(var _0x231137=_0xf5b3d9>0x1?void 0x0:_0xf5b3d9?_0x564452(_0x2d55db,_0x28c6af):_0x2d55db,_0x587196=_0x4fedc2[_0x107faf(0x19c)]-0x1,_0x3c355c;_0x587196>=0x0;_0x587196--)(_0x3c355c=_0x4fedc2[_0x587196])&&(_0x231137=(_0xf5b3d9?_0x3c355c(_0x2d55db,_0x28c6af,_0x231137):_0x3c355c(_0x231137))||_0x231137);return _0xf5b3d9&&_0x231137&&_0x39e91e(_0x2d55db,_0x28c6af,_0x231137),_0x231137;},_0x2eb7a9=(_0x483507,_0x58dd81)=>(_0x500ae5,_0x265349)=>_0x58dd81(_0x500ae5,_0x265349,_0x483507);let _0x29a3e2=class extends _0x299097['Disposable']{constructor(_0x43331d,_0x4a2531,_0x26bbaf,_0x403bcb){const _0x4b11ec=_0xcfdc78;super(),this[_0x4b11ec(0x1d9)]=_0x43331d,this[_0x4b11ec(0x1ae)]=_0x4a2531,this[_0x4b11ec(0x209)]=_0x26bbaf,this['_injector']=_0x403bcb,this[_0x4b11ec(0x1b0)](),this[_0x4b11ec(0x1ff)]();}['_initUserSync'](){const _0x37414c=_0xcfdc78;this['disposeWithMe'](this['_threadCommentModel'][_0x37414c(0x20d)][_0x37414c(0x1fb)](_0x1d4a18[_0x37414c(0x1a1)](0x10))['subscribe'](_0x3e813e=>{const _0x311010=new Set();_0x3e813e['forEach'](_0x25f6a4=>{const _0x315289=_0xcdf0;switch(_0x25f6a4['type']){case _0x315289(0x202):{const _0x3213ce=_0x25f6a4[_0x315289(0x1e4)][_0x315289(0x19e)];_0x311010[_0x315289(0x202)](_0x3213ce);break;}}}),_0x2c9c90(this['_injector'],_0x311010);}));}[_0xcfdc78(0x1b0)](){const _0x44a22b=_0xcfdc78;this[_0x44a22b(0x1e7)](this[_0x44a22b(0x1d9)][_0x44a22b(0x20d)][_0x44a22b(0x198)](async _0x899d1d=>{const _0x2a64a6=_0x44a22b;var _0x40abde,_0x7356cd;const _0x55749f=this['_threadCommentModel'][_0x2a64a6(0x1e5)](_0x899d1d[_0x2a64a6(0x1c4)],_0x899d1d[_0x2a64a6(0x21e)]);if(!_0x55749f)return;const {unitId:_0x54a856,subUnitId:_0xbf5e5c}=_0x55749f;switch(_0x899d1d[_0x2a64a6(0x1ef)]&&this['_userService']['addUser'](_0x899d1d[_0x2a64a6(0x1ef)]),_0x899d1d[_0x2a64a6(0x1d6)]){case _0x6617b7[_0x2a64a6(0x1e8)]:break;case _0x6617b7['Reply']:{this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1c9)](_0x54a856,_0xbf5e5c,{'unitId':_0x54a856,'subUnitId':_0xbf5e5c,'ref':'','id':_0x899d1d[_0x2a64a6(0x1e1)],'dT':_0x685b06(+_0x899d1d[_0x2a64a6(0x196)]),'threadId':_0x899d1d['threadId'],'personId':(_0x7356cd=(_0x40abde=_0x899d1d[_0x2a64a6(0x1ef)])==null?void 0x0:_0x40abde['userID'])!=null?_0x7356cd:_0x899d1d['userId'],'text':JSON[_0x2a64a6(0x197)](_0x899d1d[_0x2a64a6(0x1b7)]),'parentId':_0x55749f['id']});break;}case _0x6617b7['Delete']:{const _0x4ea540=this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1d0)](_0x54a856,_0xbf5e5c,_0x899d1d[_0x2a64a6(0x1e1)]);_0x4ea540&&_0x4ea540[_0x2a64a6(0x1b2)]&&this['_threadCommentModel'][_0x2a64a6(0x223)](_0x54a856,_0xbf5e5c,_0x899d1d[_0x2a64a6(0x1e1)]);break;}case _0x6617b7[_0x2a64a6(0x1e0)]:{this[_0x2a64a6(0x1ae)]['updateComment'](_0x54a856,_0xbf5e5c,{'commentId':_0x899d1d[_0x2a64a6(0x1e1)],'text':JSON[_0x2a64a6(0x197)](_0x899d1d[_0x2a64a6(0x1b7)])});break;}case _0x6617b7['Solve']:{const _0x2c1f27=this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1e5)](_0x54a856,_0x899d1d[_0x2a64a6(0x21e)]);_0x2c1f27&&this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1a9)](_0x54a856,_0xbf5e5c,_0x2c1f27['id'],_0x899d1d[_0x2a64a6(0x218)]===_0x5754f1[_0x2a64a6(0x1c5)]);break;}}}));}};_0x29a3e2=_0x279bfe([_0x299097['OnLifecycle'](_0x299097[_0xcfdc78(0x21b)]['Ready'],_0x29a3e2),_0x2eb7a9(0x0,_0x299097['Inject'](_0x1d92d3[_0xcfdc78(0x21a)])),_0x2eb7a9(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x48b9c5[_0xcfdc78(0x1bc)])),_0x2eb7a9(0x2,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1dc)])),_0x2eb7a9(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x299097['Injector']))],_0x29a3e2);const _0xb0c2b2=_0xcfdc78(0x1c0),_0x28b8ac={};var _0xeacdaa=Object['defineProperty'],_0x4aed05=Object[_0xcfdc78(0x1aa)],_0x13746a=(_0x8f6be7,_0x84f6b,_0x4e286b,_0x3d088a)=>{for(var _0x2900cc=_0x3d088a>0x1?void 0x0:_0x3d088a?_0x4aed05(_0x84f6b,_0x4e286b):_0x84f6b,_0x48085e=_0x8f6be7['length']-0x1,_0x21d349;_0x48085e>=0x0;_0x48085e--)(_0x21d349=_0x8f6be7[_0x48085e])&&(_0x2900cc=(_0x3d088a?_0x21d349(_0x84f6b,_0x4e286b,_0x2900cc):_0x21d349(_0x2900cc))||_0x2900cc);return _0x3d088a&&_0x2900cc&&_0xeacdaa(_0x84f6b,_0x4e286b,_0x2900cc),_0x2900cc;},_0x18cbb6=(_0x14fb34,_0xa3cb96)=>(_0x27fdbd,_0x353116)=>_0xa3cb96(_0x27fdbd,_0x353116,_0x14fb34);function _0x515303(_0x322e9f,_0x30812d){const _0x4810c6=_0xcfdc78,_0x5e350e=_0x322e9f['replies'][0x0];return{..._0x30812d,'id':_0x5e350e[_0x4810c6(0x1e1)],'resolved':_0x322e9f[_0x4810c6(0x218)]===0x1,'dT':_0x685b06(_0x5e350e[_0x4810c6(0x196)]),'personId':_0x5e350e['userId'],'threadId':_0x5e350e[_0x4810c6(0x21e)]};}function _0x5e3513(_0x278888,_0x57b7b1,_0x199c0e){const _0x1fe1a2=_0xcfdc78;var _0x27a4b9,_0x437ebc;if(((_0x437ebc=(_0x27a4b9=_0x278888==null?void 0x0:_0x278888['replies'])==null?void 0x0:_0x27a4b9['length'])!=null?_0x437ebc:0x0)>0x0){const _0x39eb07=(_0x53ce0c,_0xe24046)=>({'id':_0x53ce0c[_0x1fe1a2(0x1e1)],'threadId':_0x53ce0c['threadId'],'dT':_0x685b06(_0x53ce0c[_0x1fe1a2(0x196)]),'personId':_0x53ce0c[_0x1fe1a2(0x1b5)],'resolved':_0x278888[_0x1fe1a2(0x218)]===_0x5754f1['Solved'],'unitId':_0x57b7b1,'subUnitId':_0x199c0e,'text':JSON[_0x1fe1a2(0x197)](_0x53ce0c[_0x1fe1a2(0x1b7)]),'parentId':_0xe24046}),_0x50a064=_0x39eb07(_0x278888['replies'][0x0]);return{..._0x50a064,'children':_0x278888[_0x1fe1a2(0x216)][_0x1fe1a2(0x204)](0x1)['map'](_0x16ba06=>_0x39eb07(_0x16ba06,_0x50a064['id']))};}return null;}let _0x1636d9=class{constructor(_0x26f118,_0x295494,_0x553e0d,_0x2fd0a0){const _0x5cc699=_0xcfdc78;this[_0x5cc699(0x214)]=_0x26f118,this[_0x5cc699(0x209)]=_0x295494,this[_0x5cc699(0x193)]=_0x553e0d,this[_0x5cc699(0x1ac)]=_0x2fd0a0;}async['addComment'](_0x599164){const _0x4ca69e=_0xcfdc78;var _0x13663f,_0x419305;const {parentId:_0x1411ed,unitId:_0x3c5a22,text:_0x16d268,threadId:_0x4c1c46}=_0x599164,_0x2b3510=(_0x419305=(_0x13663f=_0x16d268[_0x4ca69e(0x212)])==null?void 0x0:_0x13663f[_0x4ca69e(0x1f3)](_0x4fe12d=>_0x4fe12d[_0x4ca69e(0x210)]===_0x299097[_0x4ca69e(0x1cc)][_0x4ca69e(0x1b3)])[_0x4ca69e(0x1a4)](_0x45ee27=>_0x45ee27['rangeId']))!=null?_0x419305:[],_0x47aefc=JSON[_0x4ca69e(0x20a)](_0x16d268),_0x1ae4a5=(await this[_0x4ca69e(0x193)][_0x4ca69e(0x1d8)](_0x3c5a22))[_0x4ca69e(0x1ee)]();if(_0x1411ed){const _0x115c99={'memberId':_0x1ae4a5,'unitId':_0x3c5a22,'content':_0x47aefc,'mention':_0x2b3510,'threadId':_0x4c1c46},_0x9611b=(await this['_httpService'][_0x4ca69e(0x1f9)](_0x4ca69e(0x211)+_0x3c5a22+'/reply',{'body':_0x115c99}))[_0x4ca69e(0x221)][_0x4ca69e(0x1af)];return{..._0x599164,'id':_0x9611b[_0x4ca69e(0x1e1)],'dT':_0x4f003a(+_0x9611b['createTimestamp'])[_0x4ca69e(0x1ce)](_0x4ca69e(0x1a0)),'personId':_0x9611b['userId']};}else{const _0x5c851a={'memberId':_0x1ae4a5,'unitId':_0x3c5a22,'content':_0x47aefc,'mention':_0x2b3510},_0x486139=await this[_0x4ca69e(0x214)][_0x4ca69e(0x1f9)](_0x4ca69e(0x211)+_0x3c5a22+'/add',{'body':_0x5c851a});return _0x515303(_0x486139[_0x4ca69e(0x221)][_0x4ca69e(0x1de)],_0x599164);}}async['updateComment'](_0x5b0dbb){const _0x31c8be=_0xcfdc78;var _0x4bb3b4,_0x5eeb8d;const {text:_0x47c548,unitId:_0x1984e7}=_0x5b0dbb,_0x579c06=(_0x5eeb8d=(_0x4bb3b4=_0x47c548[_0x31c8be(0x212)])==null?void 0x0:_0x4bb3b4[_0x31c8be(0x1f3)](_0x3cc857=>_0x3cc857[_0x31c8be(0x210)]===_0x299097['CustomRangeType'][_0x31c8be(0x1b3)])[_0x31c8be(0x1a4)](_0x1f73e3=>_0x1f73e3[_0x31c8be(0x1a2)]))!=null?_0x5eeb8d:[],_0x4db430=JSON['stringify'](_0x47c548),_0x51d3c1=_0x5b0dbb['threadId'],_0x1e1d91=_0x5b0dbb['id'],_0x5e36dc={'memberId':(await this[_0x31c8be(0x193)]['requireSession'](_0x1984e7))[_0x31c8be(0x1ee)](),'unitId':_0x1984e7,'threadId':_0x51d3c1,'mention':_0x579c06,'content':_0x4db430,'replyId':_0x1e1d91},_0x4d83b7=await this[_0x31c8be(0x214)][_0x31c8be(0x1f9)](_0x31c8be(0x211)+_0x1984e7+_0x31c8be(0x1f1),{'body':_0x5e36dc});return!_0x4d83b7[_0x31c8be(0x221)][_0x31c8be(0x1d7)]||_0x4d83b7['body'][_0x31c8be(0x1d7)][_0x31c8be(0x195)]===0x1;}async[_0xcfdc78(0x1a9)](_0x494960){const _0x233bfe=_0xcfdc78,{unitId:_0xbabc49}=_0x494960,_0x507ada=_0x494960['threadId'],_0x2c041b={'memberId':this[_0x233bfe(0x209)][_0x233bfe(0x1be)]()[_0x233bfe(0x194)],'unitId':_0xbabc49,'threadId':_0x507ada,'solved':_0x494960[_0x233bfe(0x1f8)]?_0x5754f1[_0x233bfe(0x1c5)]:_0x5754f1['OpenOrReOpen']},_0x225960=await this[_0x233bfe(0x214)][_0x233bfe(0x1f9)](_0x233bfe(0x211)+_0xbabc49+_0x233bfe(0x1f6),{'body':_0x2c041b});return!_0x225960[_0x233bfe(0x221)][_0x233bfe(0x1d7)]||_0x225960[_0x233bfe(0x221)][_0x233bfe(0x1d7)][_0x233bfe(0x195)]===0x1;}async[_0xcfdc78(0x223)](_0x29f659,_0x3ba61b,_0x4af766,_0x23e187){const _0x39bea2=_0xcfdc78,_0x4f8b1d={'memberId':(await this[_0x39bea2(0x193)]['requireSession'](_0x29f659))[_0x39bea2(0x1ee)](),'threadId':_0x4af766,'replyId':_0x23e187,'unitId':_0x29f659},_0x2cb9da=await this[_0x39bea2(0x214)][_0x39bea2(0x1f9)](_0x39bea2(0x211)+_0x29f659+_0x39bea2(0x215),{'body':_0x4f8b1d});return!_0x2cb9da[_0x39bea2(0x221)]['error']||_0x2cb9da['body'][_0x39bea2(0x1d7)]['code']===0x1;}async[_0xcfdc78(0x1d5)](_0x1b9d53,_0x51b8dd,_0x595c0e){const _0x7fab57=_0xcfdc78,_0x504412={'unitId':_0x1b9d53,'threadId':_0x595c0e},_0x26b948=await this['_httpService'][_0x7fab57(0x1f9)](_0x7fab57(0x211)+_0x1b9d53+_0x7fab57(0x1a6),{'body':_0x504412}),_0x5a5c7b=_0x595c0e[_0x7fab57(0x1a4)](_0x55915b=>_0x5e3513(_0x26b948[_0x7fab57(0x221)][_0x7fab57(0x188)][_0x55915b],_0x1b9d53,_0x51b8dd))[_0x7fab57(0x1f3)](Boolean);return Object[_0x7fab57(0x205)](_0x26b948[_0x7fab57(0x221)][_0x7fab57(0x1e6)])[_0x7fab57(0x1bf)](_0x33e7db=>{const _0x3bb26a=_0x7fab57;this[_0x3bb26a(0x209)][_0x3bb26a(0x18d)](_0x33e7db);}),_0x5a5c7b;}[_0xcfdc78(0x201)](_0x2fbe85){const _0x45b067=_0xcfdc78;return{'id':_0x2fbe85['id'],'threadId':_0x2fbe85[_0x45b067(0x21e)],'ref':_0x2fbe85['ref']};}};_0x1636d9=_0x13746a([_0x18cbb6(0x0,_0x299097['Inject'](_0x1d7911['HTTPService'])),_0x18cbb6(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1dc)])),_0x18cbb6(0x2,_0x299097[_0xcfdc78(0x1c6)](_0x1d92d3[_0xcfdc78(0x222)])),_0x18cbb6(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1f4)]))],_0x1636d9);var _0x6bc8a=Object[_0xcfdc78(0x1ed)],_0x22e244=Object['getOwnPropertyDescriptor'],_0x2cb860=(_0x3f8ba7,_0x2e064a,_0x59c341,_0x3a07ef)=>{const _0x470f3d=_0xcfdc78;for(var _0x9ff493=_0x3a07ef>0x1?void 0x0:_0x3a07ef?_0x22e244(_0x2e064a,_0x59c341):_0x2e064a,_0x1555eb=_0x3f8ba7[_0x470f3d(0x19c)]-0x1,_0x58029b;_0x1555eb>=0x0;_0x1555eb--)(_0x58029b=_0x3f8ba7[_0x1555eb])&&(_0x9ff493=(_0x3a07ef?_0x58029b(_0x2e064a,_0x59c341,_0x9ff493):_0x58029b(_0x9ff493))||_0x9ff493);return _0x3a07ef&&_0x9ff493&&_0x6bc8a(_0x2e064a,_0x59c341,_0x9ff493),_0x9ff493;},_0x509ad7=(_0x4e9023,_0x35aa70)=>(_0x40974b,_0x2e6e76)=>_0x35aa70(_0x40974b,_0x2e6e76,_0x4e9023);let _0x2d3fce=class{constructor(_0x4916c5){const _0x1bf3bd=_0xcfdc78;this[_0x1bf3bd(0x214)]=_0x4916c5;}async[_0xcfdc78(0x203)](_0x55e6ed,_0x5f5809,_0x5976ea){const _0x2da9a4=_0xcfdc78,_0x31b02c=new URL(window[_0x2da9a4(0x1e3)][_0x2da9a4(0x189)])[_0x2da9a4(0x1ba)][_0x2da9a4(0x1da)](_0x2da9a4(0x21f));if(!_0x31b02c)return[];const _0x396279=window[_0x2da9a4(0x1e3)][_0x2da9a4(0x1c2)],_0x1ed801=window[_0x2da9a4(0x1e3)][_0x2da9a4(0x1bd)]==='https:'?_0x2da9a4(0x1fd):_0x2da9a4(0x20c);return(await this[_0x2da9a4(0x214)]['get'](_0x1ed801+_0x2da9a4(0x1ec)+_0x396279+_0x2da9a4(0x19d),{'params':{'objectID':_0x31b02c,'unitID':_0x31b02c}}))[_0x2da9a4(0x221)]['collaborators']['map'](_0x19d1d7=>{const _0x18e846=_0x2da9a4;var _0x1a6804,_0x40c1ec,_0x36faf3,_0x2387e1,_0xac7402,_0x3d7f02;return{'id':(_0x40c1ec=(_0x1a6804=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0x1a6804[_0x18e846(0x194)])!=null?_0x40c1ec:'','label':(_0x2387e1=(_0x36faf3=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0x36faf3['name'])!=null?_0x2387e1:'','icon':(_0x3d7f02=(_0xac7402=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0xac7402[_0x18e846(0x1d1)])!=null?_0x3d7f02:'','type':_0x18e846(0x1ef)};});}};_0x2d3fce=_0x2cb860([_0x509ad7(0x0,_0x299097[_0xcfdc78(0x1c6)](_0x1d7911[_0xcfdc78(0x1eb)]))],_0x2d3fce);var _0x277968=Object[_0xcfdc78(0x1ed)],_0x361aec=Object[_0xcfdc78(0x1aa)],_0x593468=(_0x421936,_0x5c46a8,_0x6e8929,_0xb0b34)=>{const _0x3c1747=_0xcfdc78;for(var _0x4aa866=_0xb0b34>0x1?void 0x0:_0xb0b34?_0x361aec(_0x5c46a8,_0x6e8929):_0x5c46a8,_0x3d9b54=_0x421936[_0x3c1747(0x19c)]-0x1,_0x5cc9b2;_0x3d9b54>=0x0;_0x3d9b54--)(_0x5cc9b2=_0x421936[_0x3d9b54])&&(_0x4aa866=(_0xb0b34?_0x5cc9b2(_0x5c46a8,_0x6e8929,_0x4aa866):_0x5cc9b2(_0x4aa866))||_0x4aa866);return _0xb0b34&&_0x4aa866&&_0x277968(_0x5c46a8,_0x6e8929,_0x4aa866),_0x4aa866;},_0x56c8ef=(_0x3b82e0,_0x3d011b)=>(_0x4f86ca,_0x34e599)=>_0x3d011b(_0x4f86ca,_0x34e599,_0x3b82e0);let _0x3ed1c2=class extends _0x299097[_0xcfdc78(0x1e2)]{constructor(_0x272243,_0x14a021,_0x480d86,_0x4e6e2f){const _0x8aef0e=_0xcfdc78;super(),this[_0x8aef0e(0x1fa)]=_0x272243,this[_0x8aef0e(0x18f)]=_0x14a021,this[_0x8aef0e(0x199)]=_0x480d86,this[_0x8aef0e(0x18b)]=_0x4e6e2f,this[_0x8aef0e(0x1c3)]();}[_0xcfdc78(0x1c3)](){const _0x5e725=_0xcfdc78;this[_0x5e725(0x1fa)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this['_threadCommentMentionDataService'][_0x5e725(0x1cf)]=this[_0x5e725(0x18b)];}};_0x3ed1c2=_0x593468([_0x299097[_0xcfdc78(0x1b1)](_0x299097[_0xcfdc78(0x21b)]['Starting'],_0x3ed1c2),_0x56c8ef(0x0,_0x48b9c5[_0xcfdc78(0x1b8)]),_0x56c8ef(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x1636d9)),_0x56c8ef(0x2,_0x3e94f5[_0xcfdc78(0x190)]),_0x56c8ef(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x2d3fce))],_0x3ed1c2);var _0x245c5b=Object['defineProperty'],_0x1a5161=Object[_0xcfdc78(0x1aa)],_0x34d169=(_0x9e3e3c,_0x947f81,_0x3a7f60)=>_0x947f81 in _0x9e3e3c?_0x245c5b(_0x9e3e3c,_0x947f81,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a7f60}):_0x9e3e3c[_0x947f81]=_0x3a7f60,_0x1a909b=(_0x4ac5a1,_0xb9fb96,_0x4386d4,_0x35ed27)=>{for(var _0x535575=_0x35ed27>0x1?void 0x0:_0x35ed27?_0x1a5161(_0xb9fb96,_0x4386d4):_0xb9fb96,_0x32d585=_0x4ac5a1['length']-0x1,_0xe50ede;_0x32d585>=0x0;_0x32d585--)(_0xe50ede=_0x4ac5a1[_0x32d585])&&(_0x535575=(_0x35ed27?_0xe50ede(_0xb9fb96,_0x4386d4,_0x535575):_0xe50ede(_0x535575))||_0x535575);return _0x35ed27&&_0x535575&&_0x245c5b(_0xb9fb96,_0x4386d4,_0x535575),_0x535575;},_0x597c4d=(_0x3d2351,_0x18ff01)=>(_0x20dbd2,_0x15b255)=>_0x18ff01(_0x20dbd2,_0x15b255,_0x3d2351),_0x30bd7a=(_0x509b42,_0x1deca4,_0x3d7992)=>_0x34d169(_0x509b42,typeof _0x1deca4!=_0xcfdc78(0x21d)?_0x1deca4+'':_0x1deca4,_0x3d7992);_0xbfcf46['UniverThreadCommentDataSourcePlugin']=class extends _0x299097['Plugin']{constructor(_0x20176c=_0x28b8ac,_0x58cc79,_0x10c7e8){const _0x39387f=_0xcfdc78;super(),this[_0x39387f(0x1f5)]=_0x20176c,this['_injector']=_0x58cc79,this['_configService']=_0x10c7e8;const {..._0xa0801a}=this[_0x39387f(0x1f5)];this[_0x39387f(0x1f7)][_0x39387f(0x1fe)](_0xb0c2b2,_0xa0801a);}[_0xcfdc78(0x19a)](){[[_0x2d3fce],[_0x1636d9],[_0x3ed1c2],[_0x29a3e2]]['forEach'](_0x5d8c86=>{const _0x5e3f12=_0xcdf0;this['_injector'][_0x5e3f12(0x202)](_0x5d8c86);});}},_0x30bd7a(_0xbfcf46['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2662d5),_0x30bd7a(_0xbfcf46['UniverThreadCommentDataSourcePlugin'],_0xcfdc78(0x1d6),_0x299097['UniverInstanceType'][_0xcfdc78(0x1ea)]),_0xbfcf46[_0xcfdc78(0x208)]=_0x1a909b([_0x299097[_0xcfdc78(0x1d2)](_0x48b9c5[_0xcfdc78(0x1f0)],_0x3e94f5[_0xcfdc78(0x1f2)],_0x1d92d3['UniverCollaborationClientPlugin'],_0x4bcffa['UniverLicensePlugin']),_0x597c4d(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x299097['Injector'])),_0x597c4d(0x2,_0x299097['IConfigService'])],_0xbfcf46['UniverThreadCommentDataSourcePlugin']),Object[_0xcfdc78(0x1ed)](_0xbfcf46,Symbol[_0xcfdc78(0x192)],{'value':_0xcfdc78(0x20e)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-alpha.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,26 +45,31 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
49
|
-
"@univerjs/core": "0.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.3.0-alpha.0",
|
|
49
|
+
"@univerjs/core": "0.3.0-alpha.0",
|
|
50
|
+
"@univerjs-pro/license": "0.3.0-alpha.0",
|
|
51
|
+
"@univerjs/thread-comment-ui": "0.3.0-alpha.0",
|
|
52
|
+
"@univerjs/network": "0.3.0-alpha.0",
|
|
53
|
+
"@univerjs/thread-comment": "0.3.0-alpha.0"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"dayjs": "^1.11.13",
|
|
56
|
-
"@univerjs-pro/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.3.0-alpha.0",
|
|
58
|
+
"@univerjs-pro/facade": "0.3.0-alpha.0",
|
|
59
|
+
"@univerjs/core": "0.3.0-alpha.0",
|
|
60
|
+
"@univerjs-pro/license": "0.3.0-alpha.0",
|
|
61
|
+
"@univerjs/network": "0.3.0-alpha.0",
|
|
62
|
+
"@univerjs/thread-comment": "0.3.0-alpha.0",
|
|
63
|
+
"@univerjs/protocol": "0.1.39-alpha.22",
|
|
64
|
+
"@univerjs/thread-comment-ui": "0.3.0-alpha.0",
|
|
65
|
+
"@univerjs/uniscript": "0.3.0-alpha.0"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
63
68
|
"rxjs": "^7.8.1",
|
|
64
69
|
"typescript": "^5.6.2",
|
|
65
|
-
"vite": "^5.4.
|
|
66
|
-
"vitest": "^2.
|
|
67
|
-
"@univerjs-infra/shared": "0.
|
|
70
|
+
"vite": "^5.4.8",
|
|
71
|
+
"vitest": "^2.1.1",
|
|
72
|
+
"@univerjs-infra/shared": "0.3.0-alpha.0"
|
|
68
73
|
},
|
|
69
74
|
"univerSpace": {
|
|
70
75
|
".": {
|