@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507141607 → 0.9.2-nightly.202507161608
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x578bb1=_0x13f0;(function(_0x1d48e8,_0x2dae30){const _0x731f58=_0x13f0,_0x2a9654=_0x1d48e8();while(!![]){try{const _0x1ac6a8=parseInt(_0x731f58(0xe0))/0x1*(-parseInt(_0x731f58(0x13b))/0x2)+parseInt(_0x731f58(0xd7))/0x3+-parseInt(_0x731f58(0xe2))/0x4*(parseInt(_0x731f58(0xdb))/0x5)+parseInt(_0x731f58(0xd8))/0x6+-parseInt(_0x731f58(0xeb))/0x7+-parseInt(_0x731f58(0x139))/0x8+parseInt(_0x731f58(0xfe))/0x9;if(_0x1ac6a8===_0x2dae30)break;else _0x2a9654['push'](_0x2a9654['shift']());}catch(_0x613c90){_0x2a9654['push'](_0x2a9654['shift']());}}}(_0x3947,0x595f7));Object[_0x578bb1(0xd0)](exports,Symbol[_0x578bb1(0x101)],{'value':_0x578bb1(0xe4)});function _0x13f0(_0x5ee185,_0x2c0106){const _0x394744=_0x3947();return _0x13f0=function(_0x13f020,_0x1b6e18){_0x13f020=_0x13f020-0xce;let _0x23b677=_0x394744[_0x13f020];return _0x23b677;},_0x13f0(_0x5ee185,_0x2c0106);}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x578bb1(0x12e);var I=(_0x2fb288=>(_0x2fb288[_0x2fb288[_0x578bb1(0x13c)]=0x0]=_0x578bb1(0x13c),_0x2fb288[_0x2fb288[_0x578bb1(0xe7)]=0x1]='Solved',_0x2fb288[_0x2fb288['UNRECOGNIZED']=-0x1]=_0x578bb1(0x114),_0x2fb288))(I||{}),v=(_0x6e848d=>(_0x6e848d[_0x6e848d['Unknown']=0x0]=_0x578bb1(0x12c),_0x6e848d[_0x6e848d[_0x578bb1(0x11e)]=0x1]=_0x578bb1(0x11e),_0x6e848d[_0x6e848d[_0x578bb1(0xf4)]=0x2]=_0x578bb1(0xf4),_0x6e848d[_0x6e848d[_0x578bb1(0x12a)]=0x3]=_0x578bb1(0x12a),_0x6e848d[_0x6e848d[_0x578bb1(0xf6)]=0x4]='Delete',_0x6e848d[_0x6e848d[_0x578bb1(0xf8)]=0x5]='Solve',_0x6e848d[_0x6e848d[_0x578bb1(0x114)]=-0x1]=_0x578bb1(0x114),_0x6e848d))(v||{});const f=_0x498c96=>c[_0x578bb1(0x109)](new Date(+_0x498c96))[_0x578bb1(0xd5)](_0x578bb1(0x134)),R=async(_0x48b27e,_0x5a3a14)=>{const _0x688d23=_0x578bb1,_0x1cc799=_0x48b27e['get'](c['UserManagerService']),_0x8ba1ef=_0x48b27e[_0x688d23(0x104)](P[_0x688d23(0xd3)]);_0x5a3a14[_0x688d23(0x100)](_0x15b444=>{const _0x263354=_0x688d23;_0x1cc799[_0x263354(0x128)](_0x15b444)&&_0x5a3a14[_0x263354(0x11b)](_0x15b444);}),_0x5a3a14[_0x688d23(0xce)]&&(await _0x8ba1ef['get'](_0x688d23(0x132),{'params':{'userIDs':[..._0x5a3a14]}}))[_0x688d23(0x10b)][_0x688d23(0xf2)]['forEach'](_0x57c62a=>{_0x57c62a&&_0x1cc799['addUser'](_0x57c62a);});};var $=Object[_0x578bb1(0x123)],E=(_0x155166,_0x327ce3,_0x18f854,_0x462f5c)=>{for(var _0x17a43c=_0x462f5c>0x1?void 0x0:_0x462f5c?$(_0x327ce3,_0x18f854):_0x327ce3,_0x123289=_0x155166['length']-0x1,_0xdcec2c;_0x123289>=0x0;_0x123289--)(_0xdcec2c=_0x155166[_0x123289])&&(_0x17a43c=_0xdcec2c(_0x17a43c)||_0x17a43c);return _0x17a43c;},S=(_0x21b453,_0x56444c)=>(_0xb3a6f5,_0x363f77)=>_0x56444c(_0xb3a6f5,_0x363f77,_0x21b453);let p=class extends c[_0x578bb1(0xf9)]{constructor(_0x2b062a,_0x4e0a92,_0x4c4713,_0x5269f3){const _0x194adf=_0x578bb1;super(),this['_commentService']=_0x2b062a,this['_threadCommentModel']=_0x4e0a92,this[_0x194adf(0x110)]=_0x4c4713,this[_0x194adf(0x118)]=_0x5269f3,this[_0x194adf(0x137)](),this[_0x194adf(0xef)]();}[_0x578bb1(0xef)](){const _0x5b1e53=_0x578bb1;this['disposeWithMe'](this[_0x5b1e53(0xd6)][_0x5b1e53(0x140)][_0x5b1e53(0xfb)](w[_0x5b1e53(0x13d)](0x10))[_0x5b1e53(0xe1)](_0x384010=>{const _0x5060a0=_0x5b1e53,_0x2c5b57=new Set();_0x384010[_0x5060a0(0x100)](_0x93656f=>{const _0x4baa90=_0x5060a0;switch(_0x93656f['type']){case _0x4baa90(0xec):{const _0x406024=_0x93656f[_0x4baa90(0x102)][_0x4baa90(0xf7)];_0x2c5b57[_0x4baa90(0xec)](_0x406024);break;}}}),R(this[_0x5060a0(0x118)],_0x2c5b57);}));}['_init'](){const _0x169d35=_0x578bb1;this['disposeWithMe'](this[_0x169d35(0x111)][_0x169d35(0x140)][_0x169d35(0xe1)](async _0x3abc01=>{const _0x109d08=_0x169d35;var _0x55ad40,_0x17c590,_0x3a1704,_0x5eacdb;const _0x3fee23=(_0x55ad40=this[_0x109d08(0xd6)]['getUnit'](_0x3abc01[_0x109d08(0x124)])[_0x109d08(0xfc)](_0x3c70c3=>_0x3c70c3[_0x109d08(0x12b)]===_0x3abc01[_0x109d08(0x12b)]))==null?void 0x0:_0x55ad40[_0x109d08(0x142)];if(!_0x3fee23)return;const {unitId:_0x30edd3,subUnitId:_0x86d9b5}=_0x3fee23;switch(_0x3abc01[_0x109d08(0xd9)]&&this[_0x109d08(0x110)][_0x109d08(0xd4)](_0x3abc01[_0x109d08(0xd9)]),_0x3abc01[_0x109d08(0xf0)]){case v[_0x109d08(0x11e)]:break;case v[_0x109d08(0xf4)]:{this['_threadCommentModel'][_0x109d08(0x143)](_0x30edd3,_0x86d9b5,{'unitId':_0x30edd3,'subUnitId':_0x86d9b5,'ref':'','id':_0x3abc01[_0x109d08(0x107)],'dT':f(+_0x3abc01[_0x109d08(0xde)]),'threadId':_0x3abc01[_0x109d08(0x12b)],'personId':(_0x3a1704=(_0x17c590=_0x3abc01[_0x109d08(0xd9)])==null?void 0x0:_0x17c590[_0x109d08(0x127)])!=null?_0x3a1704:_0x3abc01[_0x109d08(0x105)],'text':JSON['parse'](_0x3abc01['content']),'parentId':_0x3fee23['id']});break;}case v['Delete']:{const _0xbab24b=this[_0x109d08(0xd6)][_0x109d08(0x112)](_0x30edd3,_0x86d9b5,_0x3abc01[_0x109d08(0x107)]);_0xbab24b&&_0xbab24b[_0x109d08(0x133)]&&this['_threadCommentModel']['deleteComment'](_0x30edd3,_0x86d9b5,_0x3abc01['replyId']);break;}case v[_0x109d08(0x12a)]:{this[_0x109d08(0xd6)]['updateComment'](_0x30edd3,_0x86d9b5,{'commentId':_0x3abc01['replyId'],'text':JSON['parse'](_0x3abc01[_0x109d08(0xea)])});break;}case v[_0x109d08(0xf8)]:{const _0x47962a=(_0x5eacdb=this[_0x109d08(0xd6)][_0x109d08(0x141)](_0x3abc01[_0x109d08(0x124)])['find'](_0x5dc24c=>_0x5dc24c[_0x109d08(0x12b)]===_0x3abc01[_0x109d08(0x12b)]))==null?void 0x0:_0x5eacdb[_0x109d08(0x142)];_0x47962a&&this[_0x109d08(0xd6)][_0x109d08(0x113)](_0x30edd3,_0x86d9b5,_0x47962a['id'],_0x3abc01[_0x109d08(0xed)]===I[_0x109d08(0xe7)]);break;}}}));}};p=E([S(0x0,c[_0x578bb1(0xff)](b['CommentService'])),S(0x1,c['Inject'](M[_0x578bb1(0x116)])),S(0x2,c[_0x578bb1(0xff)](c[_0x578bb1(0x10f)])),S(0x3,c['Inject'](c[_0x578bb1(0x13a)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x578bb1(0x123)],x=(_0x200c96,_0x281b29,_0x4442c7,_0x16e902)=>{const _0x3174cf=_0x578bb1;for(var _0x1d6ffd=_0x16e902>0x1?void 0x0:_0x16e902?A(_0x281b29,_0x4442c7):_0x281b29,_0x2af8b1=_0x200c96[_0x3174cf(0x119)]-0x1,_0x28cb2a;_0x2af8b1>=0x0;_0x2af8b1--)(_0x28cb2a=_0x200c96[_0x2af8b1])&&(_0x1d6ffd=_0x28cb2a(_0x1d6ffd)||_0x1d6ffd);return _0x1d6ffd;},_=(_0x52ff97,_0x2fb406)=>(_0x7f799a,_0x24220b)=>_0x2fb406(_0x7f799a,_0x24220b,_0x52ff97);function Y(_0x378310,_0x5b7ec1){const _0x3c0c3a=_0x578bb1,_0x545460=_0x378310['replies'][0x0];return{..._0x5b7ec1,'id':_0x545460[_0x3c0c3a(0x107)],'resolved':_0x378310['solved']===0x1,'dT':f(_0x545460[_0x3c0c3a(0xde)]),'personId':_0x545460[_0x3c0c3a(0x105)],'threadId':_0x545460['threadId']};}function G(_0x38f0e3,_0x90da3e,_0x355cb7){const _0x5ebfb3=_0x578bb1;var _0x4605fe,_0x1e2281;if(((_0x1e2281=(_0x4605fe=_0x38f0e3==null?void 0x0:_0x38f0e3[_0x5ebfb3(0x13e)])==null?void 0x0:_0x4605fe[_0x5ebfb3(0x119)])!=null?_0x1e2281:0x0)>0x0){const _0x1b6e4e=(_0x2d9b00,_0x32f732)=>({'id':_0x2d9b00[_0x5ebfb3(0x107)],'threadId':_0x2d9b00[_0x5ebfb3(0x12b)],'dT':f(_0x2d9b00[_0x5ebfb3(0xde)]),'personId':_0x2d9b00[_0x5ebfb3(0x105)],'resolved':_0x38f0e3['solved']===I[_0x5ebfb3(0xe7)],'unitId':_0x90da3e,'subUnitId':_0x355cb7,'text':JSON[_0x5ebfb3(0xfd)](_0x2d9b00[_0x5ebfb3(0xea)]),'parentId':_0x32f732}),_0x4133a2=_0x1b6e4e(_0x38f0e3[_0x5ebfb3(0x13e)][0x0]);return{..._0x4133a2,'children':_0x38f0e3['replies']['slice'](0x1)['map'](_0x208851=>_0x1b6e4e(_0x208851,_0x4133a2['id']))};}return null;}let g=class{constructor(_0xeeff8e,_0x5598a8,_0x57e966,_0x5c127c){const _0x1f38c0=_0x578bb1;this[_0x1f38c0(0xf3)]=_0xeeff8e,this[_0x1f38c0(0x110)]=_0x5598a8,this[_0x1f38c0(0x121)]=_0x57e966,this[_0x1f38c0(0x118)]=_0x5c127c;}async[_0x578bb1(0x143)](_0x5b65bf){const _0x42cad5=_0x578bb1;var _0x53cbdb,_0x4d8ff4;const {parentId:_0x17eda5,unitId:_0x2757d4,text:_0x5ecd4b,threadId:_0x1355d8}=_0x5b65bf,_0x2cfb2f=(_0x4d8ff4=(_0x53cbdb=_0x5ecd4b[_0x42cad5(0x10e)])==null?void 0x0:_0x53cbdb[_0x42cad5(0xe5)](_0x1052e9=>_0x1052e9[_0x42cad5(0x125)]===c['CustomRangeType'][_0x42cad5(0x126)])[_0x42cad5(0xdc)](_0x59a2c3=>_0x59a2c3[_0x42cad5(0xf5)]))!=null?_0x4d8ff4:[],_0x4825ac=JSON[_0x42cad5(0xe3)](_0x5ecd4b),_0x52c221=(await this['_sessionService']['requireSession'](_0x2757d4))[_0x42cad5(0xe8)]();if(_0x17eda5){const _0x31695a={'memberId':_0x52c221,'unitId':_0x2757d4,'content':_0x4825ac,'mention':_0x2cfb2f,'threadId':_0x1355d8},_0x18477c=(await this['_httpService'][_0x42cad5(0x11a)](_0x42cad5(0x129)+_0x2757d4+'/reply',{'body':_0x31695a}))[_0x42cad5(0x10b)][_0x42cad5(0x117)];return{..._0x5b65bf,'id':_0x18477c[_0x42cad5(0x107)],'dT':c['dayjs'](+_0x18477c[_0x42cad5(0xde)])['format'](_0x42cad5(0x134)),'personId':_0x18477c[_0x42cad5(0x105)]};}else{const _0x5ee5f2={'memberId':_0x52c221,'unitId':_0x2757d4,'content':_0x4825ac,'mention':_0x2cfb2f},_0x5297aa=await this['_httpService'][_0x42cad5(0x11a)](_0x42cad5(0x129)+_0x2757d4+'/add',{'body':_0x5ee5f2});return Y(_0x5297aa[_0x42cad5(0x10b)][_0x42cad5(0x12f)],_0x5b65bf);}}async[_0x578bb1(0x10a)](_0xf6cff9){const _0x1e9adb=_0x578bb1;var _0x753768,_0x19d626;const {text:_0x416e63,unitId:_0x180038}=_0xf6cff9,_0xf861ed=(_0x19d626=(_0x753768=_0x416e63['customRanges'])==null?void 0x0:_0x753768[_0x1e9adb(0xe5)](_0x2f816e=>_0x2f816e[_0x1e9adb(0x125)]===c['CustomRangeType'][_0x1e9adb(0x126)])[_0x1e9adb(0xdc)](_0x222dd5=>_0x222dd5[_0x1e9adb(0xf5)]))!=null?_0x19d626:[],_0x532efe=JSON[_0x1e9adb(0xe3)](_0x416e63),_0x313599=_0xf6cff9[_0x1e9adb(0x12b)],_0x22864e=_0xf6cff9['id'],_0x417632={'memberId':(await this['_sessionService']['requireSession'](_0x180038))['getMemberID'](),'unitId':_0x180038,'threadId':_0x313599,'mention':_0xf861ed,'content':_0x532efe,'replyId':_0x22864e},_0x256b42=await this[_0x1e9adb(0xf3)][_0x1e9adb(0x11a)]('/universer-api/comment/unit/'+_0x180038+_0x1e9adb(0x13f),{'body':_0x417632});return!_0x256b42[_0x1e9adb(0x10b)]['error']||_0x256b42[_0x1e9adb(0x10b)][_0x1e9adb(0xe6)][_0x1e9adb(0x103)]===0x1;}async[_0x578bb1(0x113)](_0x49d46c){const _0xed9479=_0x578bb1,{unitId:_0x55ce49}=_0x49d46c,_0xb03a99=_0x49d46c[_0xed9479(0x12b)],_0x31d4e0={'memberId':this[_0xed9479(0x110)]['getCurrentUser']()[_0xed9479(0x127)],'unitId':_0x55ce49,'threadId':_0xb03a99,'solved':_0x49d46c['resolved']?I[_0xed9479(0xe7)]:I[_0xed9479(0x13c)]},_0x40dde7=await this[_0xed9479(0xf3)]['post']('/universer-api/comment/unit/'+_0x55ce49+_0xed9479(0x131),{'body':_0x31d4e0});return!_0x40dde7[_0xed9479(0x10b)][_0xed9479(0xe6)]||_0x40dde7[_0xed9479(0x10b)]['error'][_0xed9479(0x103)]===0x1;}async[_0x578bb1(0xda)](_0x24acab,_0x2088a5,_0x4203d3,_0x549aee){const _0x5cb092=_0x578bb1,_0x718237={'memberId':(await this['_sessionService']['requireSession'](_0x24acab))[_0x5cb092(0xe8)](),'threadId':_0x4203d3,'replyId':_0x549aee,'unitId':_0x24acab},_0x55efb6=await this[_0x5cb092(0xf3)][_0x5cb092(0x11a)](_0x5cb092(0x129)+_0x24acab+_0x5cb092(0x10d),{'body':_0x718237});return!_0x55efb6[_0x5cb092(0x10b)][_0x5cb092(0xe6)]||_0x55efb6['body'][_0x5cb092(0xe6)][_0x5cb092(0x103)]===0x1;}async[_0x578bb1(0xe9)](_0x251e2c,_0x54a471,_0x482978){const _0x4bf591=_0x578bb1,_0x27f48c={'unitId':_0x251e2c,'threadId':_0x482978},_0x25dad7=await this[_0x4bf591(0xf3)][_0x4bf591(0x11a)](_0x4bf591(0x129)+_0x251e2c+_0x4bf591(0xd1),{'body':_0x27f48c}),_0x4cfe3c=_0x482978['map'](_0x4df21a=>G(_0x25dad7[_0x4bf591(0x10b)]['comments'][_0x4df21a],_0x251e2c,_0x54a471))['filter'](Boolean);return Object[_0x4bf591(0x12d)](_0x25dad7[_0x4bf591(0x10b)]['users'])[_0x4bf591(0x100)](_0x2ee4d7=>{const _0x46970f=_0x4bf591;this[_0x46970f(0x110)][_0x46970f(0xd4)](_0x2ee4d7);}),_0x4cfe3c;}[_0x578bb1(0x144)](_0x521b94){const _0x2fba6a=_0x578bb1;return{'id':_0x521b94['id'],'threadId':_0x521b94[_0x2fba6a(0x12b)],'ref':_0x521b94['ref']};}};g=x([_(0x0,c[_0x578bb1(0xff)](P[_0x578bb1(0xd3)])),_(0x1,c[_0x578bb1(0xff)](c[_0x578bb1(0x10f)])),_(0x2,c[_0x578bb1(0xff)](b[_0x578bb1(0x11d)])),_(0x3,c[_0x578bb1(0xff)](c[_0x578bb1(0x13a)]))],g);var H=Object[_0x578bb1(0x123)],J=(_0x3796a5,_0x204eee,_0x21d947,_0x4652ce)=>{const _0x1e17da=_0x578bb1;for(var _0x2bbe68=_0x4652ce>0x1?void 0x0:_0x4652ce?H(_0x204eee,_0x21d947):_0x204eee,_0x26d0ed=_0x3796a5[_0x1e17da(0x119)]-0x1,_0x192866;_0x26d0ed>=0x0;_0x26d0ed--)(_0x192866=_0x3796a5[_0x26d0ed])&&(_0x2bbe68=_0x192866(_0x2bbe68)||_0x2bbe68);return _0x2bbe68;},y=(_0x4acc96,_0x5329c2)=>(_0x285eaa,_0x9e56e3)=>_0x5329c2(_0x285eaa,_0x9e56e3,_0x4acc96);let C=class extends c[_0x578bb1(0xf9)]{constructor(_0x5462fe,_0x535a4b){const _0x409c79=_0x578bb1;super(),this['_threadCommentDataSourceService']=_0x5462fe,this[_0x409c79(0x10c)]=_0x535a4b,this[_0x409c79(0xf1)]();}[_0x578bb1(0xf1)](){const _0x4720a0=_0x578bb1;this[_0x4720a0(0xfa)][_0x4720a0(0x145)]=this[_0x4720a0(0x10c)],this[_0x4720a0(0xfa)][_0x4720a0(0x108)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x578bb1(0xff)](g))],C);function _0x3947(){const _0x136394=['delete','UniverCollaborationClientPlugin','CollaborationSessionService','Add','UniverInstanceType','UniverThreadCommentDataSourcePlugin','_sessionService','symbol','getOwnPropertyDescriptor','unitId','rangeType','COMMENT','userID','getUser','/universer-api/comment/unit/','Edit','threadId','Unknown','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','_configService','/solved','/universer-api/user/list','parentId','YYYY/MM/DD\x20HH:mm','pluginName','_config','_init','onStarting','4382336lDrHTF','Injector','286aPJqJZ','OpenOrReOpen','bufferTime','replies','/edit','commentUpdate$','getUnit','root','addComment','saveCommentToSnapshot','dataSource','size','DependentOn','defineProperty','/list','IConfigService','HTTPService','addUser','format','_threadCommentModel','1121769AuvVnG','397884FCjpzT','user','deleteComment','230145zaWqxN','map','setConfig','createTimestamp','Plugin','1267ZIKCGi','subscribe','44JgwQtH','stringify','Module','filter','error','Solved','getMemberID','listComments','content','2454767vRUbZJ','add','solved','merge','_initUserSync','type','_initDataSource','users','_httpService','Reply','rangeId','Delete','personId','Solve','Disposable','_threadCommentDataSourceService','pipe','find','parse','13606263mjAiFC','Inject','forEach','toStringTag','payload','code','get','userId','onReady','replyId','syncUpdateMutationToColla','dayjs','updateComment','body','_threadCommentDataSource','/delete','customRanges','UserManagerService','_userService','_commentService','getComment','resolveComment','UNRECOGNIZED','UNIVER_UNKNOWN','ThreadCommentModel','reply','_injector','length','post'];_0x3947=function(){return _0x136394;};return _0x3947();}var F=Object[_0x578bb1(0xd0)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5added,_0x54995d,_0xbb03ae)=>_0x54995d in _0x5added?F(_0x5added,_0x54995d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbb03ae}):_0x5added[_0x54995d]=_0xbb03ae,W=(_0xe1d2fd,_0x2da2c2,_0x2bf0bd,_0x4e350b)=>{const _0x3e6a80=_0x578bb1;for(var _0x4312fd=_0x4e350b>0x1?void 0x0:_0x4e350b?L(_0x2da2c2,_0x2bf0bd):_0x2da2c2,_0x28a55b=_0xe1d2fd[_0x3e6a80(0x119)]-0x1,_0x58a034;_0x28a55b>=0x0;_0x28a55b--)(_0x58a034=_0xe1d2fd[_0x28a55b])&&(_0x4312fd=_0x58a034(_0x4312fd)||_0x4312fd);return _0x4312fd;},O=(_0x4fb63e,_0x418e42)=>(_0x4b9e25,_0xb1755d)=>_0x418e42(_0x4b9e25,_0xb1755d,_0x4fb63e),N=(_0xd39a58,_0xac40aa,_0x341336)=>Z(_0xd39a58,typeof _0xac40aa!=_0x578bb1(0x122)?_0xac40aa+'':_0xac40aa,_0x341336);exports[_0x578bb1(0x120)]=class extends c[_0x578bb1(0xdf)]{constructor(_0x2ae5aa=D,_0x292a8d,_0x4bcde5){const _0x2cf7da=_0x578bb1;super(),this[_0x2cf7da(0x136)]=_0x2ae5aa,this[_0x2cf7da(0x118)]=_0x292a8d,this[_0x2cf7da(0x130)]=_0x4bcde5;const {..._0x2e9243}=c[_0x2cf7da(0xee)]({},D,this[_0x2cf7da(0x136)]);this[_0x2cf7da(0x130)][_0x2cf7da(0xdd)](q,_0x2e9243);}[_0x578bb1(0x138)](){const _0x4c15cd=_0x578bb1;[[g],[C],[p]][_0x4c15cd(0x100)](_0x40b0c3=>{const _0x351788=_0x4c15cd;this[_0x351788(0x118)][_0x351788(0xec)](_0x40b0c3);});}[_0x578bb1(0x106)](){const _0x2481b2=_0x578bb1;this[_0x2481b2(0x118)][_0x2481b2(0x104)](C),this[_0x2481b2(0x118)][_0x2481b2(0x104)](p);}},N(exports[_0x578bb1(0x120)],_0x578bb1(0x135),U),N(exports[_0x578bb1(0x120)],_0x578bb1(0xf0),c[_0x578bb1(0x11f)][_0x578bb1(0x115)]),exports[_0x578bb1(0x120)]=W([c[_0x578bb1(0xcf)](j['UniverThreadCommentUIPlugin'],b[_0x578bb1(0x11c)],T['UniverLicensePlugin']),O(0x1,c[_0x578bb1(0xff)](c['Injector'])),O(0x2,c[_0x578bb1(0xd2)])],exports[_0x578bb1(0x120)]);
|
|
1
|
+
'use strict';function _0x4e75(_0x40a572,_0x451834){const _0x199dd4=_0x199d();return _0x4e75=function(_0x4e75dc,_0x12fe76){_0x4e75dc=_0x4e75dc-0x1bc;let _0x97d52b=_0x199dd4[_0x4e75dc];return _0x97d52b;},_0x4e75(_0x40a572,_0x451834);}const _0x2ab71e=_0x4e75;(function(_0x3c7bb8,_0x5ea79c){const _0x4850e7=_0x4e75,_0x57313a=_0x3c7bb8();while(!![]){try{const _0x445a53=parseInt(_0x4850e7(0x210))/0x1+parseInt(_0x4850e7(0x214))/0x2*(parseInt(_0x4850e7(0x22d))/0x3)+parseInt(_0x4850e7(0x22a))/0x4+-parseInt(_0x4850e7(0x1ed))/0x5+-parseInt(_0x4850e7(0x1f0))/0x6+-parseInt(_0x4850e7(0x1ea))/0x7+parseInt(_0x4850e7(0x1bc))/0x8;if(_0x445a53===_0x5ea79c)break;else _0x57313a['push'](_0x57313a['shift']());}catch(_0x432a78){_0x57313a['push'](_0x57313a['shift']());}}}(_0x199d,0x7035f));Object[_0x2ab71e(0x1fa)](exports,Symbol[_0x2ab71e(0x215)],{'value':_0x2ab71e(0x1e3)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x2ab71e(0x22c);var I=(_0x2cae63=>(_0x2cae63[_0x2cae63[_0x2ab71e(0x1c0)]=0x0]='OpenOrReOpen',_0x2cae63[_0x2cae63[_0x2ab71e(0x1d7)]=0x1]=_0x2ab71e(0x1d7),_0x2cae63[_0x2cae63['UNRECOGNIZED']=-0x1]=_0x2ab71e(0x212),_0x2cae63))(I||{}),v=(_0x586e1a=>(_0x586e1a[_0x586e1a['Unknown']=0x0]='Unknown',_0x586e1a[_0x586e1a[_0x2ab71e(0x202)]=0x1]=_0x2ab71e(0x202),_0x586e1a[_0x586e1a[_0x2ab71e(0x21c)]=0x2]=_0x2ab71e(0x21c),_0x586e1a[_0x586e1a[_0x2ab71e(0x211)]=0x3]=_0x2ab71e(0x211),_0x586e1a[_0x586e1a[_0x2ab71e(0x1d8)]=0x4]=_0x2ab71e(0x1d8),_0x586e1a[_0x586e1a[_0x2ab71e(0x1e0)]=0x5]=_0x2ab71e(0x1e0),_0x586e1a[_0x586e1a['UNRECOGNIZED']=-0x1]=_0x2ab71e(0x212),_0x586e1a))(v||{});const f=_0x4ff9e3=>c['dayjs'](new Date(+_0x4ff9e3))[_0x2ab71e(0x21f)](_0x2ab71e(0x21b)),R=async(_0x658766,_0x2410bc)=>{const _0x2e77de=_0x2ab71e,_0x5b0a7a=_0x658766['get'](c[_0x2e77de(0x1ce)]),_0x5163c9=_0x658766[_0x2e77de(0x207)](P['HTTPService']);_0x2410bc[_0x2e77de(0x1c3)](_0x304fc8=>{const _0xd1e25=_0x2e77de;_0x5b0a7a[_0xd1e25(0x1ee)](_0x304fc8)&&_0x2410bc[_0xd1e25(0x1db)](_0x304fc8);}),_0x2410bc[_0x2e77de(0x20c)]&&(await _0x5163c9[_0x2e77de(0x207)](_0x2e77de(0x22b),{'params':{'userIDs':[..._0x2410bc]}}))[_0x2e77de(0x1d2)][_0x2e77de(0x20a)][_0x2e77de(0x1c3)](_0x8aea=>{const _0xbba0ac=_0x2e77de;_0x8aea&&_0x5b0a7a[_0xbba0ac(0x228)](_0x8aea);});};var $=Object[_0x2ab71e(0x20f)],E=(_0x2a307b,_0x397e2d,_0x41d5bd,_0x22e130)=>{const _0x46f0ab=_0x2ab71e;for(var _0x58ddf1=_0x22e130>0x1?void 0x0:_0x22e130?$(_0x397e2d,_0x41d5bd):_0x397e2d,_0x41bd3f=_0x2a307b[_0x46f0ab(0x213)]-0x1,_0x61c791;_0x41bd3f>=0x0;_0x41bd3f--)(_0x61c791=_0x2a307b[_0x41bd3f])&&(_0x58ddf1=_0x61c791(_0x58ddf1)||_0x58ddf1);return _0x58ddf1;},S=(_0x284763,_0x172512)=>(_0x4ec8cc,_0x473655)=>_0x172512(_0x4ec8cc,_0x473655,_0x284763);let p=class extends c[_0x2ab71e(0x1ff)]{constructor(_0x5b24f4,_0xc08fff,_0x4a47bc,_0x4082a0){const _0x305304=_0x2ab71e;super(),this[_0x305304(0x20e)]=_0x5b24f4,this[_0x305304(0x1e2)]=_0xc08fff,this[_0x305304(0x223)]=_0x4a47bc,this['_injector']=_0x4082a0,this[_0x305304(0x1de)](),this[_0x305304(0x1dd)]();}[_0x2ab71e(0x1dd)](){const _0x129f59=_0x2ab71e;this[_0x129f59(0x219)](this[_0x129f59(0x1e2)][_0x129f59(0x205)][_0x129f59(0x230)](w[_0x129f59(0x1ec)](0x10))[_0x129f59(0x22e)](_0x1e8e4d=>{const _0x89d25=_0x129f59,_0x31a72e=new Set();_0x1e8e4d['forEach'](_0x1f375e=>{const _0x1769f6=_0x4e75;switch(_0x1f375e[_0x1769f6(0x20d)]){case'add':{const _0x5844a9=_0x1f375e['payload'][_0x1769f6(0x1be)];_0x31a72e[_0x1769f6(0x1f2)](_0x5844a9);break;}}}),R(this[_0x89d25(0x1d1)],_0x31a72e);}));}[_0x2ab71e(0x1de)](){const _0x7ce1ec=_0x2ab71e;this[_0x7ce1ec(0x219)](this[_0x7ce1ec(0x20e)]['commentUpdate$'][_0x7ce1ec(0x22e)](async _0x2f9290=>{const _0x5ee3e1=_0x7ce1ec;var _0x2bef3d,_0x3e75be,_0x5e7c00,_0x49875a;const _0x3e423d=(_0x2bef3d=this['_threadCommentModel']['getUnit'](_0x2f9290[_0x5ee3e1(0x218)])[_0x5ee3e1(0x1e9)](_0x3d2ac9=>_0x3d2ac9[_0x5ee3e1(0x225)]===_0x2f9290[_0x5ee3e1(0x225)]))==null?void 0x0:_0x2bef3d['root'];if(!_0x3e423d)return;const {unitId:_0x27c492,subUnitId:_0x1ae89e}=_0x3e423d;switch(_0x2f9290[_0x5ee3e1(0x1c4)]&&this[_0x5ee3e1(0x223)][_0x5ee3e1(0x228)](_0x2f9290[_0x5ee3e1(0x1c4)]),_0x2f9290[_0x5ee3e1(0x20d)]){case v[_0x5ee3e1(0x202)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5ee3e1(0x221)](_0x27c492,_0x1ae89e,{'unitId':_0x27c492,'subUnitId':_0x1ae89e,'ref':'','id':_0x2f9290['replyId'],'dT':f(+_0x2f9290[_0x5ee3e1(0x217)]),'threadId':_0x2f9290['threadId'],'personId':(_0x5e7c00=(_0x3e75be=_0x2f9290[_0x5ee3e1(0x1c4)])==null?void 0x0:_0x3e75be[_0x5ee3e1(0x232)])!=null?_0x5e7c00:_0x2f9290[_0x5ee3e1(0x21a)],'text':JSON[_0x5ee3e1(0x1da)](_0x2f9290[_0x5ee3e1(0x1c7)]),'parentId':_0x3e423d['id']});break;}case v['Delete']:{const _0x4c24d6=this['_threadCommentModel'][_0x5ee3e1(0x1e1)](_0x27c492,_0x1ae89e,_0x2f9290[_0x5ee3e1(0x1f1)]);_0x4c24d6&&_0x4c24d6[_0x5ee3e1(0x1bd)]&&this[_0x5ee3e1(0x1e2)][_0x5ee3e1(0x208)](_0x27c492,_0x1ae89e,_0x2f9290['replyId']);break;}case v[_0x5ee3e1(0x211)]:{this[_0x5ee3e1(0x1e2)][_0x5ee3e1(0x1f4)](_0x27c492,_0x1ae89e,{'commentId':_0x2f9290[_0x5ee3e1(0x1f1)],'text':JSON['parse'](_0x2f9290[_0x5ee3e1(0x1c7)])});break;}case v[_0x5ee3e1(0x1e0)]:{const _0x1d22a1=(_0x49875a=this['_threadCommentModel'][_0x5ee3e1(0x1f8)](_0x2f9290[_0x5ee3e1(0x218)])[_0x5ee3e1(0x1e9)](_0x62dbf5=>_0x62dbf5[_0x5ee3e1(0x225)]===_0x2f9290[_0x5ee3e1(0x225)]))==null?void 0x0:_0x49875a[_0x5ee3e1(0x1cf)];_0x1d22a1&&this[_0x5ee3e1(0x1e2)]['resolveComment'](_0x27c492,_0x1ae89e,_0x1d22a1['id'],_0x2f9290[_0x5ee3e1(0x1f6)]===I[_0x5ee3e1(0x1d7)]);break;}}}));}};p=E([S(0x0,c[_0x2ab71e(0x1fd)](b[_0x2ab71e(0x1d0)])),S(0x1,c[_0x2ab71e(0x1fd)](M[_0x2ab71e(0x1c6)])),S(0x2,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1ce)])),S(0x3,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1c9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x2ab71e(0x20f)],x=(_0x158d1d,_0x1f3dd2,_0xbd6df2,_0x4086ec)=>{const _0xef8ceb=_0x2ab71e;for(var _0x412b91=_0x4086ec>0x1?void 0x0:_0x4086ec?A(_0x1f3dd2,_0xbd6df2):_0x1f3dd2,_0x5edb25=_0x158d1d[_0xef8ceb(0x213)]-0x1,_0x2746e4;_0x5edb25>=0x0;_0x5edb25--)(_0x2746e4=_0x158d1d[_0x5edb25])&&(_0x412b91=_0x2746e4(_0x412b91)||_0x412b91);return _0x412b91;},_=(_0xe31188,_0x3ed814)=>(_0x273af9,_0x197371)=>_0x3ed814(_0x273af9,_0x197371,_0xe31188);function Y(_0x449e4d,_0x14303a){const _0x5edad5=_0x2ab71e,_0x16ff02=_0x449e4d[_0x5edad5(0x234)][0x0];return{..._0x14303a,'id':_0x16ff02[_0x5edad5(0x1f1)],'resolved':_0x449e4d[_0x5edad5(0x1f6)]===0x1,'dT':f(_0x16ff02[_0x5edad5(0x217)]),'personId':_0x16ff02[_0x5edad5(0x21a)],'threadId':_0x16ff02[_0x5edad5(0x225)]};}function G(_0x388b72,_0x239cc1,_0x1ea070){const _0x12f0c7=_0x2ab71e;var _0x148e7f,_0x3e5b5f;if(((_0x3e5b5f=(_0x148e7f=_0x388b72==null?void 0x0:_0x388b72[_0x12f0c7(0x234)])==null?void 0x0:_0x148e7f['length'])!=null?_0x3e5b5f:0x0)>0x0){const _0x4c505b=(_0x278464,_0x26b024)=>({'id':_0x278464['replyId'],'threadId':_0x278464[_0x12f0c7(0x225)],'dT':f(_0x278464['createTimestamp']),'personId':_0x278464['userId'],'resolved':_0x388b72[_0x12f0c7(0x1f6)]===I['Solved'],'unitId':_0x239cc1,'subUnitId':_0x1ea070,'text':JSON['parse'](_0x278464[_0x12f0c7(0x1c7)]),'parentId':_0x26b024}),_0x21fcf6=_0x4c505b(_0x388b72[_0x12f0c7(0x234)][0x0]);return{..._0x21fcf6,'children':_0x388b72[_0x12f0c7(0x234)][_0x12f0c7(0x1c5)](0x1)['map'](_0x43cfe1=>_0x4c505b(_0x43cfe1,_0x21fcf6['id']))};}return null;}let g=class{constructor(_0x38fd71,_0x42dc3f,_0x19bad7,_0x5cb1c0){const _0x105c1d=_0x2ab71e;this[_0x105c1d(0x1f5)]=_0x38fd71,this[_0x105c1d(0x223)]=_0x42dc3f,this[_0x105c1d(0x203)]=_0x19bad7,this[_0x105c1d(0x1d1)]=_0x5cb1c0;}async[_0x2ab71e(0x221)](_0x336670){const _0x4f5bba=_0x2ab71e;var _0x2b7d55,_0x52c6ed;const {parentId:_0x415be2,unitId:_0x5e9da8,text:_0x282584,threadId:_0x1b789f}=_0x336670,_0x46dcee=(_0x52c6ed=(_0x2b7d55=_0x282584[_0x4f5bba(0x1d5)])==null?void 0x0:_0x2b7d55[_0x4f5bba(0x231)](_0x7215cb=>_0x7215cb[_0x4f5bba(0x1fb)]===c[_0x4f5bba(0x1df)][_0x4f5bba(0x224)])[_0x4f5bba(0x204)](_0x4a8f28=>_0x4a8f28[_0x4f5bba(0x22f)]))!=null?_0x52c6ed:[],_0x9d9ee4=JSON[_0x4f5bba(0x1ca)](_0x282584),_0x4d64a1=(await this[_0x4f5bba(0x203)][_0x4f5bba(0x200)](_0x5e9da8))['getMemberID']();if(_0x415be2){const _0x2ded2b={'memberId':_0x4d64a1,'unitId':_0x5e9da8,'content':_0x9d9ee4,'mention':_0x46dcee,'threadId':_0x1b789f},_0x31ff9f=(await this[_0x4f5bba(0x1f5)][_0x4f5bba(0x1cd)](_0x4f5bba(0x1d4)+_0x5e9da8+_0x4f5bba(0x209),{'body':_0x2ded2b}))['body'][_0x4f5bba(0x1bf)];return{..._0x336670,'id':_0x31ff9f[_0x4f5bba(0x1f1)],'dT':c[_0x4f5bba(0x1c1)](+_0x31ff9f[_0x4f5bba(0x217)])[_0x4f5bba(0x21f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x31ff9f[_0x4f5bba(0x21a)]};}else{const _0x289421={'memberId':_0x4d64a1,'unitId':_0x5e9da8,'content':_0x9d9ee4,'mention':_0x46dcee},_0x16802e=await this[_0x4f5bba(0x1f5)][_0x4f5bba(0x1cd)](_0x4f5bba(0x1d4)+_0x5e9da8+_0x4f5bba(0x1fe),{'body':_0x289421});return Y(_0x16802e[_0x4f5bba(0x1d2)]['comment'],_0x336670);}}async[_0x2ab71e(0x1f4)](_0xfb6627){const _0x3909bc=_0x2ab71e;var _0x4e9904,_0x1e3c3d;const {text:_0x1e5d99,unitId:_0x2e3ec3}=_0xfb6627,_0x5789a4=(_0x1e3c3d=(_0x4e9904=_0x1e5d99['customRanges'])==null?void 0x0:_0x4e9904['filter'](_0x53025a=>_0x53025a[_0x3909bc(0x1fb)]===c['CustomRangeType'][_0x3909bc(0x224)])[_0x3909bc(0x204)](_0x25900c=>_0x25900c[_0x3909bc(0x22f)]))!=null?_0x1e3c3d:[],_0x55d7df=JSON[_0x3909bc(0x1ca)](_0x1e5d99),_0x13f294=_0xfb6627['threadId'],_0x530936=_0xfb6627['id'],_0x38b3b2={'memberId':(await this[_0x3909bc(0x203)]['requireSession'](_0x2e3ec3))['getMemberID'](),'unitId':_0x2e3ec3,'threadId':_0x13f294,'mention':_0x5789a4,'content':_0x55d7df,'replyId':_0x530936},_0x4d84a8=await this[_0x3909bc(0x1f5)][_0x3909bc(0x1cd)](_0x3909bc(0x1d4)+_0x2e3ec3+'/edit',{'body':_0x38b3b2});return!_0x4d84a8[_0x3909bc(0x1d2)][_0x3909bc(0x21e)]||_0x4d84a8[_0x3909bc(0x1d2)]['error'][_0x3909bc(0x229)]===0x1;}async[_0x2ab71e(0x1cb)](_0x893802){const _0x597a34=_0x2ab71e,{unitId:_0x54456c}=_0x893802,_0x569706=_0x893802[_0x597a34(0x225)],_0x584345={'memberId':this[_0x597a34(0x223)][_0x597a34(0x220)]()['userID'],'unitId':_0x54456c,'threadId':_0x569706,'solved':_0x893802['resolved']?I[_0x597a34(0x1d7)]:I['OpenOrReOpen']},_0x363f6b=await this[_0x597a34(0x1f5)][_0x597a34(0x1cd)](_0x597a34(0x1d4)+_0x54456c+_0x597a34(0x1e8),{'body':_0x584345});return!_0x363f6b[_0x597a34(0x1d2)][_0x597a34(0x21e)]||_0x363f6b['body'][_0x597a34(0x21e)]['code']===0x1;}async[_0x2ab71e(0x208)](_0x486cf1,_0x1367d0,_0x544c63,_0x2e7511){const _0x1d1c15=_0x2ab71e,_0x13960b={'memberId':(await this['_sessionService']['requireSession'](_0x486cf1))[_0x1d1c15(0x235)](),'threadId':_0x544c63,'replyId':_0x2e7511,'unitId':_0x486cf1},_0x3d28fc=await this[_0x1d1c15(0x1f5)]['post'](_0x1d1c15(0x1d4)+_0x486cf1+_0x1d1c15(0x222),{'body':_0x13960b});return!_0x3d28fc[_0x1d1c15(0x1d2)][_0x1d1c15(0x21e)]||_0x3d28fc[_0x1d1c15(0x1d2)][_0x1d1c15(0x21e)]['code']===0x1;}async[_0x2ab71e(0x226)](_0x495719,_0x52d516,_0xdcac25){const _0xef0c66=_0x2ab71e,_0x22554e={'unitId':_0x495719,'threadId':_0xdcac25},_0x72e96c=await this['_httpService'][_0xef0c66(0x1cd)](_0xef0c66(0x1d4)+_0x495719+_0xef0c66(0x1f3),{'body':_0x22554e}),_0x530d63=_0xdcac25[_0xef0c66(0x204)](_0x35c353=>G(_0x72e96c[_0xef0c66(0x1d2)]['comments'][_0x35c353],_0x495719,_0x52d516))['filter'](Boolean);return Object[_0xef0c66(0x1f7)](_0x72e96c[_0xef0c66(0x1d2)][_0xef0c66(0x20a)])[_0xef0c66(0x1c3)](_0x4f98e6=>{const _0x54a052=_0xef0c66;this[_0x54a052(0x223)][_0x54a052(0x228)](_0x4f98e6);}),_0x530d63;}[_0x2ab71e(0x206)](_0x4a6d27){const _0x377f51=_0x2ab71e;return{'id':_0x4a6d27['id'],'threadId':_0x4a6d27[_0x377f51(0x225)],'ref':_0x4a6d27[_0x377f51(0x216)]};}};g=x([_(0x0,c[_0x2ab71e(0x1fd)](P[_0x2ab71e(0x1ef)])),_(0x1,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1ce)])),_(0x2,c['Inject'](b[_0x2ab71e(0x1c8)])),_(0x3,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1c9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x405b58,_0x5ace6b,_0x2e35a4,_0x3f7b08)=>{const _0x1f7718=_0x2ab71e;for(var _0xadb5b=_0x3f7b08>0x1?void 0x0:_0x3f7b08?H(_0x5ace6b,_0x2e35a4):_0x5ace6b,_0x30f997=_0x405b58[_0x1f7718(0x213)]-0x1,_0x4ead19;_0x30f997>=0x0;_0x30f997--)(_0x4ead19=_0x405b58[_0x30f997])&&(_0xadb5b=_0x4ead19(_0xadb5b)||_0xadb5b);return _0xadb5b;},y=(_0x3d2192,_0x2ed357)=>(_0x4d205d,_0x597fee)=>_0x2ed357(_0x4d205d,_0x597fee,_0x3d2192);let C=class extends c['Disposable']{constructor(_0x3547d6,_0x5356a9){const _0x30e74f=_0x2ab71e;super(),this[_0x30e74f(0x227)]=_0x3547d6,this[_0x30e74f(0x1c2)]=_0x5356a9,this[_0x30e74f(0x233)]();}[_0x2ab71e(0x233)](){const _0x485ac6=_0x2ab71e;this['_threadCommentDataSourceService'][_0x485ac6(0x1f9)]=this[_0x485ac6(0x1c2)],this['_threadCommentDataSourceService'][_0x485ac6(0x1e4)]=!0x1;}};function _0x199d(){const _0x4b1bac=['subscribe','rangeId','pipe','filter','userID','_initDataSource','replies','getMemberID','4244856OIMbJo','parentId','personId','reply','OpenOrReOpen','dayjs','_threadCommentDataSource','forEach','user','slice','ThreadCommentModel','content','CollaborationSessionService','Injector','stringify','resolveComment','merge','post','UserManagerService','root','CommentService','_injector','body','DependentOn','/universer-api/comment/unit/','customRanges','UniverLicensePlugin','Solved','Delete','_configService','parse','delete','UniverInstanceType','_initUserSync','_init','CustomRangeType','Solve','getComment','_threadCommentModel','Module','syncUpdateMutationToColla','UniverThreadCommentUIPlugin','pluginName','symbol','/solved','find','1557822yoHTbR','IThreadCommentDataSourceService','bufferTime','2344390icbixE','getUser','HTTPService','3140472baIhxh','replyId','add','/list','updateComment','_httpService','solved','values','getUnit','dataSource','defineProperty','rangeType','UniverThreadCommentDataSourcePlugin','Inject','/add','Disposable','requireSession','onReady','Add','_sessionService','map','commentUpdate$','saveCommentToSnapshot','get','deleteComment','/reply','users','onStarting','size','type','_commentService','getOwnPropertyDescriptor','66721wvMkkx','Edit','UNRECOGNIZED','length','6jmAXhH','toStringTag','ref','createTimestamp','unitId','disposeWithMe','userId','YYYY/MM/DD\x20HH:mm','Reply','UniverCollaborationClientPlugin','error','format','getCurrentUser','addComment','/delete','_userService','COMMENT','threadId','listComments','_threadCommentDataSourceService','addUser','code','910896NbkfsJ','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','849399HjokoZ'];_0x199d=function(){return _0x4b1bac;};return _0x199d();}C=J([y(0x0,M[_0x2ab71e(0x1eb)]),y(0x1,c[_0x2ab71e(0x1fd)](g))],C);var F=Object[_0x2ab71e(0x1fa)],L=Object['getOwnPropertyDescriptor'],Z=(_0x39327d,_0x1d3357,_0x3d01ec)=>_0x1d3357 in _0x39327d?F(_0x39327d,_0x1d3357,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d01ec}):_0x39327d[_0x1d3357]=_0x3d01ec,W=(_0x43c342,_0x50ff7d,_0x208d4c,_0x368e24)=>{const _0x18c7f9=_0x2ab71e;for(var _0x5bf2db=_0x368e24>0x1?void 0x0:_0x368e24?L(_0x50ff7d,_0x208d4c):_0x50ff7d,_0x1eb564=_0x43c342[_0x18c7f9(0x213)]-0x1,_0x46b23d;_0x1eb564>=0x0;_0x1eb564--)(_0x46b23d=_0x43c342[_0x1eb564])&&(_0x5bf2db=_0x46b23d(_0x5bf2db)||_0x5bf2db);return _0x5bf2db;},O=(_0x2a35a2,_0x31d898)=>(_0x500671,_0x4dcb3a)=>_0x31d898(_0x500671,_0x4dcb3a,_0x2a35a2),N=(_0x27a3ac,_0xaa55aa,_0x38ec04)=>Z(_0x27a3ac,typeof _0xaa55aa!=_0x2ab71e(0x1e7)?_0xaa55aa+'':_0xaa55aa,_0x38ec04);exports[_0x2ab71e(0x1fc)]=class extends c['Plugin']{constructor(_0xc02ea5=D,_0x1f28cb,_0x32b3e6){const _0x1a3fde=_0x2ab71e;super(),this['_config']=_0xc02ea5,this[_0x1a3fde(0x1d1)]=_0x1f28cb,this['_configService']=_0x32b3e6;const {..._0x6496d4}=c[_0x1a3fde(0x1cc)]({},D,this['_config']);this[_0x1a3fde(0x1d9)]['setConfig'](q,_0x6496d4);}[_0x2ab71e(0x20b)](){[[g],[C],[p]]['forEach'](_0x3afaff=>{const _0x16c966=_0x4e75;this[_0x16c966(0x1d1)][_0x16c966(0x1f2)](_0x3afaff);});}[_0x2ab71e(0x201)](){const _0x308ac8=_0x2ab71e;this[_0x308ac8(0x1d1)][_0x308ac8(0x207)](C),this[_0x308ac8(0x1d1)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2ab71e(0x1e6),U),N(exports[_0x2ab71e(0x1fc)],'type',c[_0x2ab71e(0x1dc)]['UNIVER_UNKNOWN']),exports[_0x2ab71e(0x1fc)]=W([c[_0x2ab71e(0x1d3)](j[_0x2ab71e(0x1e5)],b[_0x2ab71e(0x21d)],T[_0x2ab71e(0x1d6)]),O(0x1,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1c9)])),O(0x2,c['IConfigService'])],exports[_0x2ab71e(0x1fc)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x293706=_0x3c54;(function(_0x58e3e8,_0x200c12){const _0x338b0a=_0x3c54,_0x529f35=_0x58e3e8();while(!![]){try{const _0x4f0194=-parseInt(_0x338b0a(0xf5))/0x1*(parseInt(_0x338b0a(0x11d))/0x2)+-parseInt(_0x338b0a(0xc3))/0x3+-parseInt(_0x338b0a(0xe3))/0x4+parseInt(_0x338b0a(0x120))/0x5+parseInt(_0x338b0a(0xda))/0x6*(-parseInt(_0x338b0a(0x117))/0x7)+parseInt(_0x338b0a(0x101))/0x8+-parseInt(_0x338b0a(0xc9))/0x9*(-parseInt(_0x338b0a(0xea))/0xa);if(_0x4f0194===_0x200c12)break;else _0x529f35['push'](_0x529f35['shift']());}catch(_0xdb568a){_0x529f35['push'](_0x529f35['shift']());}}}(_0x2dbc,0xa2a09));import{CommentService as _0x4dcb6c,CollaborationSessionService as _0x40f849,UniverCollaborationClientPlugin as _0x320f56}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9823}from'@univerjs-pro/license';import{dayjs as _0x30b957,UserManagerService as _0x3196d5,Inject as _0x3bd5d5,Injector as _0x2dd791,Disposable as _0x3a5f25,CustomRangeType as _0x854669,UniverInstanceType as _0x58268d,DependentOn as _0x3479fe,IConfigService as _0x5d4364,Plugin as _0x287d2d,merge as _0x1aaaac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x516425}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48ead0,IThreadCommentDataSourceService as _0x2416c3}from'@univerjs/thread-comment';import{bufferTime as _0x2f2c97}from'rxjs';function _0x2dbc(){const _0x5ef8ce=['getUser','_injector','COMMENT','symbol','userID','2166764YwLVRy','Solve','getComment','_configService','_init','_initUserSync','pipe','510KyjSna','parse','thread-comment-data-source.config','_threadCommentModel','post','forEach','/reply','requireSession','defineProperty','getUnit','/solved','138231BwZRfT','resolved','rangeId','find','users','_initDataSource','/universer-api/comment/unit/','get','map','Unknown','subscribe','personId','5160968LzzNtC','/add','stringify','addComment','disposeWithMe','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','_threadCommentDataSourceService','/universer-api/user/list','Solved','_config','createTimestamp','filter','payload','resolveComment','_sessionService','replies','length','user','/list','size','_userService','791287xrLqTp','body','replyId','_threadCommentDataSource','solved','delete','18NJHVyY','_httpService','error','6366260NvOmeL','deleteComment','code','Reply','threadId','customRanges','addUser','getCurrentUser','rangeType','1229106YULOFb','userId','ref','unitId','onStarting','listComments','186399RQDqKh','dataSource','slice','commentUpdate$','root','UNIVER_UNKNOWN','getMemberID','parentId','UNRECOGNIZED','_commentService','Edit','add','content','type','format','setConfig','Delete','6UVTtnX','updateComment','Add','getOwnPropertyDescriptor'];_0x2dbc=function(){return _0x5ef8ce;};return _0x2dbc();}import{HTTPService as _0x191dc9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5226b2=>(_0x5226b2[_0x5226b2[_0x293706(0x107)]=0x0]='OpenOrReOpen',_0x5226b2[_0x5226b2[_0x293706(0x10a)]=0x1]=_0x293706(0x10a),_0x5226b2[_0x5226b2[_0x293706(0xd1)]=-0x1]=_0x293706(0xd1),_0x5226b2))(I||{}),v=(_0x4dcd9d=>(_0x4dcd9d[_0x4dcd9d['Unknown']=0x0]=_0x293706(0xfe),_0x4dcd9d[_0x4dcd9d[_0x293706(0xdc)]=0x1]='Add',_0x4dcd9d[_0x4dcd9d['Reply']=0x2]=_0x293706(0x123),_0x4dcd9d[_0x4dcd9d['Edit']=0x3]='Edit',_0x4dcd9d[_0x4dcd9d[_0x293706(0xd9)]=0x4]=_0x293706(0xd9),_0x4dcd9d[_0x4dcd9d[_0x293706(0xe4)]=0x5]=_0x293706(0xe4),_0x4dcd9d[_0x4dcd9d[_0x293706(0xd1)]=-0x1]='UNRECOGNIZED',_0x4dcd9d))(v||{});const D=_0x4b7d74=>_0x30b957(new Date(+_0x4b7d74))[_0x293706(0xd7)](_0x293706(0x106)),B=async(_0x5a4b02,_0x1b7f1c)=>{const _0x72a905=_0x293706,_0x49ab71=_0x5a4b02[_0x72a905(0xfc)](_0x3196d5),_0x53d4b6=_0x5a4b02[_0x72a905(0xfc)](_0x191dc9);_0x1b7f1c[_0x72a905(0xef)](_0x51fa7=>{const _0x50a859=_0x72a905;_0x49ab71[_0x50a859(0xde)](_0x51fa7)&&_0x1b7f1c[_0x50a859(0x11c)](_0x51fa7);}),_0x1b7f1c[_0x72a905(0x115)]&&(await _0x53d4b6[_0x72a905(0xfc)](_0x72a905(0x109),{'params':{'userIDs':[..._0x1b7f1c]}}))[_0x72a905(0x118)][_0x72a905(0xf9)]['forEach'](_0x28d0e1=>{const _0x1821c5=_0x72a905;_0x28d0e1&&_0x49ab71[_0x1821c5(0xc0)](_0x28d0e1);});};var K=Object[_0x293706(0xdd)],V=(_0x30beea,_0x52fe5f,_0x5f5311,_0x5562ab)=>{for(var _0x381bab=_0x5562ab>0x1?void 0x0:_0x5562ab?K(_0x52fe5f,_0x5f5311):_0x52fe5f,_0x2e08b8=_0x30beea['length']-0x1,_0x933162;_0x2e08b8>=0x0;_0x2e08b8--)(_0x933162=_0x30beea[_0x2e08b8])&&(_0x381bab=_0x933162(_0x381bab)||_0x381bab);return _0x381bab;},p=(_0xa2a71a,_0x26af67)=>(_0x449bae,_0x32e695)=>_0x26af67(_0x449bae,_0x32e695,_0xa2a71a);let S=class extends _0x3a5f25{constructor(_0x453871,_0x928fe0,_0x51a3b6,_0x4f2b76){const _0x54d1d2=_0x293706;super(),this[_0x54d1d2(0xd2)]=_0x453871,this[_0x54d1d2(0xed)]=_0x928fe0,this['_userService']=_0x51a3b6,this[_0x54d1d2(0xdf)]=_0x4f2b76,this[_0x54d1d2(0xe7)](),this[_0x54d1d2(0xe8)]();}[_0x293706(0xe8)](){const _0x3abfd6=_0x293706;this['disposeWithMe'](this[_0x3abfd6(0xed)][_0x3abfd6(0xcc)][_0x3abfd6(0xe9)](_0x2f2c97(0x10))[_0x3abfd6(0xff)](_0x20520d=>{const _0x2057a1=_0x3abfd6,_0x119b7a=new Set();_0x20520d[_0x2057a1(0xef)](_0x1829b5=>{const _0x15ebe2=_0x2057a1;switch(_0x1829b5[_0x15ebe2(0xd6)]){case _0x15ebe2(0xd4):{const _0x4a0e07=_0x1829b5[_0x15ebe2(0x10e)][_0x15ebe2(0x100)];_0x119b7a[_0x15ebe2(0xd4)](_0x4a0e07);break;}}}),B(this[_0x2057a1(0xdf)],_0x119b7a);}));}[_0x293706(0xe7)](){const _0x2435b6=_0x293706;this[_0x2435b6(0x105)](this['_commentService'][_0x2435b6(0xcc)]['subscribe'](async _0x3c857f=>{const _0x37388a=_0x2435b6;var _0x3d71b4,_0x2252d6,_0x53c898,_0x192981;const _0x68ba12=(_0x3d71b4=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f[_0x37388a(0xc6)])[_0x37388a(0xf8)](_0xd54b6b=>_0xd54b6b['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x3d71b4[_0x37388a(0xcd)];if(!_0x68ba12)return;const {unitId:_0x4f6342,subUnitId:_0x366811}=_0x68ba12;switch(_0x3c857f[_0x37388a(0x113)]&&this[_0x37388a(0x116)][_0x37388a(0xc0)](_0x3c857f[_0x37388a(0x113)]),_0x3c857f['type']){case v[_0x37388a(0xdc)]:break;case v[_0x37388a(0x123)]:{this[_0x37388a(0xed)][_0x37388a(0x104)](_0x4f6342,_0x366811,{'unitId':_0x4f6342,'subUnitId':_0x366811,'ref':'','id':_0x3c857f['replyId'],'dT':D(+_0x3c857f[_0x37388a(0x10c)]),'threadId':_0x3c857f[_0x37388a(0xbe)],'personId':(_0x53c898=(_0x2252d6=_0x3c857f['user'])==null?void 0x0:_0x2252d6[_0x37388a(0xe2)])!=null?_0x53c898:_0x3c857f[_0x37388a(0xc4)],'text':JSON[_0x37388a(0xeb)](_0x3c857f[_0x37388a(0xd5)]),'parentId':_0x68ba12['id']});break;}case v[_0x37388a(0xd9)]:{const _0x429ed6=this['_threadCommentModel'][_0x37388a(0xe5)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);_0x429ed6&&_0x429ed6[_0x37388a(0xd0)]&&this[_0x37388a(0xed)][_0x37388a(0x121)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);break;}case v[_0x37388a(0xd3)]:{this[_0x37388a(0xed)][_0x37388a(0xdb)](_0x4f6342,_0x366811,{'commentId':_0x3c857f['replyId'],'text':JSON['parse'](_0x3c857f['content'])});break;}case v[_0x37388a(0xe4)]:{const _0x17b09c=(_0x192981=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f['unitId'])['find'](_0x519117=>_0x519117['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x192981['root'];_0x17b09c&&this[_0x37388a(0xed)][_0x37388a(0x10f)](_0x4f6342,_0x366811,_0x17b09c['id'],_0x3c857f['solved']===I[_0x37388a(0x10a)]);break;}}}));}};S=V([p(0x0,_0x3bd5d5(_0x4dcb6c)),p(0x1,_0x3bd5d5(_0x48ead0)),p(0x2,_0x3bd5d5(_0x3196d5)),p(0x3,_0x3bd5d5(_0x2dd791))],S);function _0x3c54(_0x57a76a,_0x1b7982){const _0x2dbc8d=_0x2dbc();return _0x3c54=function(_0x3c540a,_0xe454a5){_0x3c540a=_0x3c540a-0xbe;let _0x7feb65=_0x2dbc8d[_0x3c540a];return _0x7feb65;},_0x3c54(_0x57a76a,_0x1b7982);}const z=_0x293706(0xec),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1632d7,_0x1e7ee6,_0x4a221e,_0xcf572b)=>{const _0x59e9ee=_0x293706;for(var _0x4f0bfe=_0xcf572b>0x1?void 0x0:_0xcf572b?k(_0x1e7ee6,_0x4a221e):_0x1e7ee6,_0x5ec4a4=_0x1632d7[_0x59e9ee(0x112)]-0x1,_0x552ed2;_0x5ec4a4>=0x0;_0x5ec4a4--)(_0x552ed2=_0x1632d7[_0x5ec4a4])&&(_0x4f0bfe=_0x552ed2(_0x4f0bfe)||_0x4f0bfe);return _0x4f0bfe;},_=(_0x1f6295,_0x4f1bf4)=>(_0x276c1d,_0x5662a0)=>_0x4f1bf4(_0x276c1d,_0x5662a0,_0x1f6295);function X(_0x44fe48,_0x49ae41){const _0x5979a5=_0x293706,_0x5b6387=_0x44fe48[_0x5979a5(0x111)][0x0];return{..._0x49ae41,'id':_0x5b6387[_0x5979a5(0x119)],'resolved':_0x44fe48[_0x5979a5(0x11b)]===0x1,'dT':D(_0x5b6387[_0x5979a5(0x10c)]),'personId':_0x5b6387[_0x5979a5(0xc4)],'threadId':_0x5b6387[_0x5979a5(0xbe)]};}function ee(_0x36997a,_0x4abe74,_0x10af6d){const _0x1fc04e=_0x293706;var _0x5b6ad5,_0x995892;if(((_0x995892=(_0x5b6ad5=_0x36997a==null?void 0x0:_0x36997a[_0x1fc04e(0x111)])==null?void 0x0:_0x5b6ad5[_0x1fc04e(0x112)])!=null?_0x995892:0x0)>0x0){const _0x1bc15d=(_0x5a1587,_0x3bbc06)=>({'id':_0x5a1587[_0x1fc04e(0x119)],'threadId':_0x5a1587[_0x1fc04e(0xbe)],'dT':D(_0x5a1587[_0x1fc04e(0x10c)]),'personId':_0x5a1587[_0x1fc04e(0xc4)],'resolved':_0x36997a[_0x1fc04e(0x11b)]===I[_0x1fc04e(0x10a)],'unitId':_0x4abe74,'subUnitId':_0x10af6d,'text':JSON[_0x1fc04e(0xeb)](_0x5a1587[_0x1fc04e(0xd5)]),'parentId':_0x3bbc06}),_0x518af1=_0x1bc15d(_0x36997a['replies'][0x0]);return{..._0x518af1,'children':_0x36997a[_0x1fc04e(0x111)][_0x1fc04e(0xcb)](0x1)[_0x1fc04e(0xfd)](_0x54dcf2=>_0x1bc15d(_0x54dcf2,_0x518af1['id']))};}return null;}let f=class{constructor(_0x7e778e,_0x1a4119,_0x3f6cd9,_0x4bc76d){const _0x3ec7f2=_0x293706;this[_0x3ec7f2(0x11e)]=_0x7e778e,this['_userService']=_0x1a4119,this[_0x3ec7f2(0x110)]=_0x3f6cd9,this[_0x3ec7f2(0xdf)]=_0x4bc76d;}async['addComment'](_0x2fd081){const _0x66793c=_0x293706;var _0x2deb51,_0x15d31f;const {parentId:_0x5c2f3e,unitId:_0x459a92,text:_0x465f02,threadId:_0x483851}=_0x2fd081,_0xc2ff04=(_0x15d31f=(_0x2deb51=_0x465f02[_0x66793c(0xbf)])==null?void 0x0:_0x2deb51[_0x66793c(0x10d)](_0x4349f0=>_0x4349f0[_0x66793c(0xc2)]===_0x854669[_0x66793c(0xe0)])['map'](_0xef9756=>_0xef9756[_0x66793c(0xf7)]))!=null?_0x15d31f:[],_0x4307da=JSON[_0x66793c(0x103)](_0x465f02),_0x3446c0=(await this['_sessionService']['requireSession'](_0x459a92))[_0x66793c(0xcf)]();if(_0x5c2f3e){const _0x5041b3={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04,'threadId':_0x483851},_0x191a54=(await this['_httpService'][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0xf0),{'body':_0x5041b3}))[_0x66793c(0x118)]['reply'];return{..._0x2fd081,'id':_0x191a54[_0x66793c(0x119)],'dT':_0x30b957(+_0x191a54[_0x66793c(0x10c)])['format'](_0x66793c(0x106)),'personId':_0x191a54[_0x66793c(0xc4)]};}else{const _0x469b8c={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04},_0x3b8a05=await this[_0x66793c(0x11e)][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0x102),{'body':_0x469b8c});return X(_0x3b8a05[_0x66793c(0x118)]['comment'],_0x2fd081);}}async[_0x293706(0xdb)](_0x4a15d9){const _0x32f301=_0x293706;var _0x115165,_0x5df503;const {text:_0x472bd7,unitId:_0x2d9b9a}=_0x4a15d9,_0x540cbd=(_0x5df503=(_0x115165=_0x472bd7[_0x32f301(0xbf)])==null?void 0x0:_0x115165[_0x32f301(0x10d)](_0x5ced11=>_0x5ced11[_0x32f301(0xc2)]===_0x854669['COMMENT'])[_0x32f301(0xfd)](_0x46d31c=>_0x46d31c[_0x32f301(0xf7)]))!=null?_0x5df503:[],_0x4311a2=JSON[_0x32f301(0x103)](_0x472bd7),_0x4ed214=_0x4a15d9[_0x32f301(0xbe)],_0x213e9d=_0x4a15d9['id'],_0x23982a={'memberId':(await this['_sessionService'][_0x32f301(0xf1)](_0x2d9b9a))[_0x32f301(0xcf)](),'unitId':_0x2d9b9a,'threadId':_0x4ed214,'mention':_0x540cbd,'content':_0x4311a2,'replyId':_0x213e9d},_0x553af4=await this[_0x32f301(0x11e)][_0x32f301(0xee)](_0x32f301(0xfb)+_0x2d9b9a+'/edit',{'body':_0x23982a});return!_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)]||_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)][_0x32f301(0x122)]===0x1;}async['resolveComment'](_0x79e56b){const _0x48961e=_0x293706,{unitId:_0x1cc0df}=_0x79e56b,_0x38c259=_0x79e56b[_0x48961e(0xbe)],_0x2f7f56={'memberId':this['_userService'][_0x48961e(0xc1)]()[_0x48961e(0xe2)],'unitId':_0x1cc0df,'threadId':_0x38c259,'solved':_0x79e56b[_0x48961e(0xf6)]?I[_0x48961e(0x10a)]:I[_0x48961e(0x107)]},_0x5733c4=await this[_0x48961e(0x11e)][_0x48961e(0xee)](_0x48961e(0xfb)+_0x1cc0df+_0x48961e(0xf4),{'body':_0x2f7f56});return!_0x5733c4[_0x48961e(0x118)][_0x48961e(0x11f)]||_0x5733c4[_0x48961e(0x118)]['error'][_0x48961e(0x122)]===0x1;}async[_0x293706(0x121)](_0x5d3ddc,_0x1b793d,_0x7149e8,_0x3014dc){const _0x3539ff=_0x293706,_0x1df114={'memberId':(await this[_0x3539ff(0x110)][_0x3539ff(0xf1)](_0x5d3ddc))[_0x3539ff(0xcf)](),'threadId':_0x7149e8,'replyId':_0x3014dc,'unitId':_0x5d3ddc},_0x17131b=await this[_0x3539ff(0x11e)]['post'](_0x3539ff(0xfb)+_0x5d3ddc+'/delete',{'body':_0x1df114});return!_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)]||_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)][_0x3539ff(0x122)]===0x1;}async[_0x293706(0xc8)](_0x57cc2c,_0x232977,_0x51e319){const _0x4de966=_0x293706,_0x43cfcb={'unitId':_0x57cc2c,'threadId':_0x51e319},_0x5b56db=await this[_0x4de966(0x11e)][_0x4de966(0xee)](_0x4de966(0xfb)+_0x57cc2c+_0x4de966(0x114),{'body':_0x43cfcb}),_0x2f5970=_0x51e319[_0x4de966(0xfd)](_0x26046a=>ee(_0x5b56db[_0x4de966(0x118)]['comments'][_0x26046a],_0x57cc2c,_0x232977))[_0x4de966(0x10d)](Boolean);return Object['values'](_0x5b56db['body'][_0x4de966(0xf9)])[_0x4de966(0xef)](_0x398273=>{const _0x1a32a8=_0x4de966;this['_userService'][_0x1a32a8(0xc0)](_0x398273);}),_0x2f5970;}['saveCommentToSnapshot'](_0x13ce20){const _0x2d335d=_0x293706;return{'id':_0x13ce20['id'],'threadId':_0x13ce20['threadId'],'ref':_0x13ce20[_0x2d335d(0xc5)]};}};f=Q([_(0x0,_0x3bd5d5(_0x191dc9)),_(0x1,_0x3bd5d5(_0x3196d5)),_(0x2,_0x3bd5d5(_0x40f849)),_(0x3,_0x3bd5d5(_0x2dd791))],f);var re=Object[_0x293706(0xdd)],te=(_0x1d4d36,_0x458372,_0x127bcc,_0x215438)=>{for(var _0x3e43a4=_0x215438>0x1?void 0x0:_0x215438?re(_0x458372,_0x127bcc):_0x458372,_0x5024d1=_0x1d4d36['length']-0x1,_0x331327;_0x5024d1>=0x0;_0x5024d1--)(_0x331327=_0x1d4d36[_0x5024d1])&&(_0x3e43a4=_0x331327(_0x3e43a4)||_0x3e43a4);return _0x3e43a4;},N=(_0x5af987,_0x2995d8)=>(_0x2ab013,_0x35438e)=>_0x2995d8(_0x2ab013,_0x35438e,_0x5af987);let g=class extends _0x3a5f25{constructor(_0x389787,_0x4a422f){const _0x3abbf6=_0x293706;super(),this[_0x3abbf6(0x108)]=_0x389787,this[_0x3abbf6(0x11a)]=_0x4a422f,this[_0x3abbf6(0xfa)]();}[_0x293706(0xfa)](){const _0x21025c=_0x293706;this[_0x21025c(0x108)][_0x21025c(0xca)]=this[_0x21025c(0x11a)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2416c3),N(0x1,_0x3bd5d5(f))],g);var se=Object[_0x293706(0xf2)],oe=Object[_0x293706(0xdd)],ne=(_0x2ec168,_0x23c57f,_0x42682f)=>_0x23c57f in _0x2ec168?se(_0x2ec168,_0x23c57f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42682f}):_0x2ec168[_0x23c57f]=_0x42682f,ie=(_0x4cf028,_0x2753b1,_0x3d6d11,_0x19366b)=>{const _0x406116=_0x293706;for(var _0x25c8ea=_0x19366b>0x1?void 0x0:_0x19366b?oe(_0x2753b1,_0x3d6d11):_0x2753b1,_0x4bcd37=_0x4cf028[_0x406116(0x112)]-0x1,_0x55881d;_0x4bcd37>=0x0;_0x4bcd37--)(_0x55881d=_0x4cf028[_0x4bcd37])&&(_0x25c8ea=_0x55881d(_0x25c8ea)||_0x25c8ea);return _0x25c8ea;},w=(_0x3d2689,_0x475db5)=>(_0x41e608,_0x1a0034)=>_0x475db5(_0x41e608,_0x1a0034,_0x3d2689),$=(_0x54a4df,_0x2291fc,_0x4f7cf8)=>ne(_0x54a4df,typeof _0x2291fc!=_0x293706(0xe1)?_0x2291fc+'':_0x2291fc,_0x4f7cf8);let b=class extends _0x287d2d{constructor(_0x318192=M,_0x711135,_0x51b8c5){const _0x1e7db9=_0x293706;super(),this[_0x1e7db9(0x10b)]=_0x318192,this[_0x1e7db9(0xdf)]=_0x711135,this[_0x1e7db9(0xe6)]=_0x51b8c5;const {..._0x137174}=_0x1aaaac({},M,this[_0x1e7db9(0x10b)]);this[_0x1e7db9(0xe6)][_0x1e7db9(0xd8)](z,_0x137174);}[_0x293706(0xc7)](){const _0x49c07d=_0x293706;[[f],[g],[S]][_0x49c07d(0xef)](_0x2dffec=>{const _0x1a4b13=_0x49c07d;this[_0x1a4b13(0xdf)][_0x1a4b13(0xd4)](_0x2dffec);});}['onReady'](){const _0x46faf1=_0x293706;this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](g),this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](S);}};$(b,'pluginName',W),$(b,_0x293706(0xd6),_0x58268d[_0x293706(0xce)]),b=ie([_0x3479fe(_0x516425,_0x320f56,_0x4b9823),w(0x1,_0x3bd5d5(_0x2dd791)),w(0x2,_0x5d4364)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2cea5e=_0x532a;(function(_0x377d08,_0x3d964d){const _0x3787e2=_0x532a,_0x312298=_0x377d08();while(!![]){try{const _0x3e50bb=-parseInt(_0x3787e2(0x1e6))/0x1*(-parseInt(_0x3787e2(0x192))/0x2)+parseInt(_0x3787e2(0x1d6))/0x3+parseInt(_0x3787e2(0x198))/0x4*(-parseInt(_0x3787e2(0x195))/0x5)+-parseInt(_0x3787e2(0x18d))/0x6+-parseInt(_0x3787e2(0x1f5))/0x7*(parseInt(_0x3787e2(0x19a))/0x8)+parseInt(_0x3787e2(0x1ab))/0x9*(parseInt(_0x3787e2(0x1b9))/0xa)+parseInt(_0x3787e2(0x1d3))/0xb;if(_0x3e50bb===_0x3d964d)break;else _0x312298['push'](_0x312298['shift']());}catch(_0x3071f5){_0x312298['push'](_0x312298['shift']());}}}(_0x47d2,0x89eb0));import{CommentService as _0x57d725,CollaborationSessionService as _0x3a25a6,UniverCollaborationClientPlugin as _0x18d329}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22f1b8}from'@univerjs-pro/license';import{dayjs as _0x33b9d1,UserManagerService as _0x168610,Inject as _0x2c417f,Injector as _0x448b63,Disposable as _0x5387f5,CustomRangeType as _0x558556,UniverInstanceType as _0x30ce88,DependentOn as _0x2b5003,IConfigService as _0x17ea7f,Plugin as _0x22233e,merge as _0x2b4b40}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ccdc3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa19232,IThreadCommentDataSourceService as _0x17a4a8}from'@univerjs/thread-comment';import{bufferTime as _0x534754}from'rxjs';import{HTTPService as _0x54e640}from'@univerjs/network';const W=_0x2cea5e(0x19c);var I=(_0x35670c=>(_0x35670c[_0x35670c[_0x2cea5e(0x1bc)]=0x0]=_0x2cea5e(0x1bc),_0x35670c[_0x35670c[_0x2cea5e(0x1b2)]=0x1]=_0x2cea5e(0x1b2),_0x35670c[_0x35670c[_0x2cea5e(0x19b)]=-0x1]=_0x2cea5e(0x19b),_0x35670c))(I||{}),v=(_0xb38806=>(_0xb38806[_0xb38806[_0x2cea5e(0x1e9)]=0x0]=_0x2cea5e(0x1e9),_0xb38806[_0xb38806[_0x2cea5e(0x1f6)]=0x1]=_0x2cea5e(0x1f6),_0xb38806[_0xb38806[_0x2cea5e(0x199)]=0x2]=_0x2cea5e(0x199),_0xb38806[_0xb38806[_0x2cea5e(0x1bb)]=0x3]=_0x2cea5e(0x1bb),_0xb38806[_0xb38806[_0x2cea5e(0x1f4)]=0x4]=_0x2cea5e(0x1f4),_0xb38806[_0xb38806[_0x2cea5e(0x1d8)]=0x5]=_0x2cea5e(0x1d8),_0xb38806[_0xb38806[_0x2cea5e(0x19b)]=-0x1]='UNRECOGNIZED',_0xb38806))(v||{});function _0x532a(_0x3cc71a,_0x2ed6b9){const _0x47d2b8=_0x47d2();return _0x532a=function(_0x532a1f,_0x5dac7e){_0x532a1f=_0x532a1f-0x18d;let _0x516c6b=_0x47d2b8[_0x532a1f];return _0x516c6b;},_0x532a(_0x3cc71a,_0x2ed6b9);}const D=_0x4a467a=>_0x33b9d1(new Date(+_0x4a467a))[_0x2cea5e(0x1d4)](_0x2cea5e(0x1a8)),B=async(_0x340f92,_0x17bbee)=>{const _0x405b9=_0x2cea5e,_0x124ab4=_0x340f92[_0x405b9(0x1cb)](_0x168610),_0x30f06b=_0x340f92[_0x405b9(0x1cb)](_0x54e640);_0x17bbee['forEach'](_0x148267=>{const _0x4231f1=_0x405b9;_0x124ab4[_0x4231f1(0x1ef)](_0x148267)&&_0x17bbee[_0x4231f1(0x194)](_0x148267);}),_0x17bbee[_0x405b9(0x1a4)]&&(await _0x30f06b[_0x405b9(0x1cb)](_0x405b9(0x1e8),{'params':{'userIDs':[..._0x17bbee]}}))[_0x405b9(0x1e1)][_0x405b9(0x1ba)]['forEach'](_0x3f5af5=>{const _0x1c7a3f=_0x405b9;_0x3f5af5&&_0x124ab4[_0x1c7a3f(0x1ad)](_0x3f5af5);});};var K=Object[_0x2cea5e(0x1d2)],V=(_0x423f39,_0x3b0632,_0x1fe8c0,_0x5a9966)=>{const _0x360b5f=_0x2cea5e;for(var _0x57419b=_0x5a9966>0x1?void 0x0:_0x5a9966?K(_0x3b0632,_0x1fe8c0):_0x3b0632,_0x357487=_0x423f39[_0x360b5f(0x1a1)]-0x1,_0x18870f;_0x357487>=0x0;_0x357487--)(_0x18870f=_0x423f39[_0x357487])&&(_0x57419b=_0x18870f(_0x57419b)||_0x57419b);return _0x57419b;},p=(_0x14fe14,_0x46496e)=>(_0x2e2393,_0x5aa0b4)=>_0x46496e(_0x2e2393,_0x5aa0b4,_0x14fe14);let S=class extends _0x5387f5{constructor(_0x2bf4ce,_0x3ba421,_0x25eca,_0xae0c3b){const _0xbddff6=_0x2cea5e;super(),this[_0xbddff6(0x1be)]=_0x2bf4ce,this['_threadCommentModel']=_0x3ba421,this[_0xbddff6(0x1c5)]=_0x25eca,this[_0xbddff6(0x1e5)]=_0xae0c3b,this['_init'](),this[_0xbddff6(0x1b6)]();}[_0x2cea5e(0x1b6)](){const _0x3882b6=_0x2cea5e;this[_0x3882b6(0x1dc)](this[_0x3882b6(0x1db)][_0x3882b6(0x1ce)][_0x3882b6(0x1ac)](_0x534754(0x10))[_0x3882b6(0x1c8)](_0x530149=>{const _0x8f8e59=_0x3882b6,_0x390024=new Set();_0x530149[_0x8f8e59(0x1f3)](_0x1200f6=>{const _0x31a18d=_0x8f8e59;switch(_0x1200f6[_0x31a18d(0x1f1)]){case _0x31a18d(0x1bf):{const _0x1f1eed=_0x1200f6[_0x31a18d(0x193)]['personId'];_0x390024[_0x31a18d(0x1bf)](_0x1f1eed);break;}}}),B(this['_injector'],_0x390024);}));}[_0x2cea5e(0x1ee)](){const _0x1d102b=_0x2cea5e;this[_0x1d102b(0x1dc)](this['_commentService']['commentUpdate$'][_0x1d102b(0x1c8)](async _0x2198c6=>{const _0x1a7907=_0x1d102b;var _0x536dcb,_0x21ad18,_0x2cc167,_0x57986d;const _0x38918f=(_0x536dcb=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x78147d=>_0x78147d[_0x1a7907(0x1e7)]===_0x2198c6['threadId']))==null?void 0x0:_0x536dcb['root'];if(!_0x38918f)return;const {unitId:_0x33756c,subUnitId:_0xb2b883}=_0x38918f;switch(_0x2198c6[_0x1a7907(0x1a6)]&&this[_0x1a7907(0x1c5)][_0x1a7907(0x1ad)](_0x2198c6[_0x1a7907(0x1a6)]),_0x2198c6['type']){case v['Add']:break;case v[_0x1a7907(0x199)]:{this[_0x1a7907(0x1db)][_0x1a7907(0x1ec)](_0x33756c,_0xb2b883,{'unitId':_0x33756c,'subUnitId':_0xb2b883,'ref':'','id':_0x2198c6[_0x1a7907(0x1a7)],'dT':D(+_0x2198c6[_0x1a7907(0x1cc)]),'threadId':_0x2198c6[_0x1a7907(0x1e7)],'personId':(_0x2cc167=(_0x21ad18=_0x2198c6[_0x1a7907(0x1a6)])==null?void 0x0:_0x21ad18[_0x1a7907(0x1e4)])!=null?_0x2cc167:_0x2198c6[_0x1a7907(0x1e3)],'text':JSON[_0x1a7907(0x1ca)](_0x2198c6[_0x1a7907(0x1d7)]),'parentId':_0x38918f['id']});break;}case v[_0x1a7907(0x1f4)]:{const _0x5b1713=this[_0x1a7907(0x1db)][_0x1a7907(0x1dd)](_0x33756c,_0xb2b883,_0x2198c6[_0x1a7907(0x1a7)]);_0x5b1713&&_0x5b1713[_0x1a7907(0x1a2)]&&this[_0x1a7907(0x1db)][_0x1a7907(0x1f2)](_0x33756c,_0xb2b883,_0x2198c6['replyId']);break;}case v['Edit']:{this[_0x1a7907(0x1db)][_0x1a7907(0x1b1)](_0x33756c,_0xb2b883,{'commentId':_0x2198c6[_0x1a7907(0x1a7)],'text':JSON['parse'](_0x2198c6[_0x1a7907(0x1d7)])});break;}case v[_0x1a7907(0x1d8)]:{const _0x4ae76b=(_0x57986d=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x2cde6e=>_0x2cde6e[_0x1a7907(0x1e7)]===_0x2198c6[_0x1a7907(0x1e7)]))==null?void 0x0:_0x57986d[_0x1a7907(0x18f)];_0x4ae76b&&this[_0x1a7907(0x1db)]['resolveComment'](_0x33756c,_0xb2b883,_0x4ae76b['id'],_0x2198c6['solved']===I['Solved']);break;}}}));}};function _0x47d2(){const _0x3ff6bf=['2114406GywHze','Add','COMMENT','2303652rRnSAf','/edit','root','_configService','find','111390aGldSc','payload','delete','5LRFcHC','customRanges','getCurrentUser','2789604VExDlm','Reply','16RhUNYl','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','syncUpdateMutationToColla','/solved','code','length','parentId','/universer-api/comment/unit/','size','_sessionService','user','replyId','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','resolved','16821SKGOoo','pipe','addUser','filter','solved','onReady','updateComment','Solved','resolveComment','_config','reply','_initUserSync','rangeId','slice','3350pjTPzF','users','Edit','OpenOrReOpen','onStarting','_commentService','add','/reply','pluginName','defineProperty','thread-comment-data-source.config','map','_userService','getMemberID','unitId','subscribe','setConfig','parse','get','createTimestamp','rangeType','commentUpdate$','_httpService','stringify','_initDataSource','getOwnPropertyDescriptor','12072687JwxwHt','format','_threadCommentDataSource','744792oHVdlO','content','Solve','replies','symbol','_threadCommentModel','disposeWithMe','getComment','requireSession','error','ref','body','post','userId','userID','_injector','5CcsSRw','threadId','/universer-api/user/list','Unknown','/list','values','addComment','comment','_init','getUser','/delete','type','deleteComment','forEach','Delete'];_0x47d2=function(){return _0x3ff6bf;};return _0x47d2();}S=V([p(0x0,_0x2c417f(_0x57d725)),p(0x1,_0x2c417f(_0xa19232)),p(0x2,_0x2c417f(_0x168610)),p(0x3,_0x2c417f(_0x448b63))],S);const z=_0x2cea5e(0x1c3),M={};var k=Object[_0x2cea5e(0x1d2)],Q=(_0x5c196f,_0xa81692,_0x40095c,_0x51c278)=>{for(var _0x4cd605=_0x51c278>0x1?void 0x0:_0x51c278?k(_0xa81692,_0x40095c):_0xa81692,_0x544770=_0x5c196f['length']-0x1,_0x40ac6d;_0x544770>=0x0;_0x544770--)(_0x40ac6d=_0x5c196f[_0x544770])&&(_0x4cd605=_0x40ac6d(_0x4cd605)||_0x4cd605);return _0x4cd605;},_=(_0x24a18a,_0x5918ca)=>(_0x4c1c8f,_0x2d19cf)=>_0x5918ca(_0x4c1c8f,_0x2d19cf,_0x24a18a);function X(_0x5ba611,_0x3ab685){const _0x553694=_0x2cea5e,_0x570b60=_0x5ba611[_0x553694(0x1d9)][0x0];return{..._0x3ab685,'id':_0x570b60['replyId'],'resolved':_0x5ba611[_0x553694(0x1af)]===0x1,'dT':D(_0x570b60[_0x553694(0x1cc)]),'personId':_0x570b60[_0x553694(0x1e3)],'threadId':_0x570b60[_0x553694(0x1e7)]};}function ee(_0x3ef257,_0x13d276,_0x16c78a){const _0x33e968=_0x2cea5e;var _0x16cc35,_0x3cd3fc;if(((_0x3cd3fc=(_0x16cc35=_0x3ef257==null?void 0x0:_0x3ef257[_0x33e968(0x1d9)])==null?void 0x0:_0x16cc35['length'])!=null?_0x3cd3fc:0x0)>0x0){const _0x2a4aa3=(_0x56d2a7,_0x425e36)=>({'id':_0x56d2a7['replyId'],'threadId':_0x56d2a7[_0x33e968(0x1e7)],'dT':D(_0x56d2a7[_0x33e968(0x1cc)]),'personId':_0x56d2a7[_0x33e968(0x1e3)],'resolved':_0x3ef257[_0x33e968(0x1af)]===I[_0x33e968(0x1b2)],'unitId':_0x13d276,'subUnitId':_0x16c78a,'text':JSON['parse'](_0x56d2a7[_0x33e968(0x1d7)]),'parentId':_0x425e36}),_0x583304=_0x2a4aa3(_0x3ef257['replies'][0x0]);return{..._0x583304,'children':_0x3ef257[_0x33e968(0x1d9)][_0x33e968(0x1b8)](0x1)[_0x33e968(0x1c4)](_0x2950a6=>_0x2a4aa3(_0x2950a6,_0x583304['id']))};}return null;}let f=class{constructor(_0x30369b,_0xcf72ee,_0x435bbe,_0x4dbff0){const _0x33ef0a=_0x2cea5e;this[_0x33ef0a(0x1cf)]=_0x30369b,this[_0x33ef0a(0x1c5)]=_0xcf72ee,this[_0x33ef0a(0x1a5)]=_0x435bbe,this[_0x33ef0a(0x1e5)]=_0x4dbff0;}async[_0x2cea5e(0x1ec)](_0x3ddfc4){const _0xc9e8cc=_0x2cea5e;var _0x2de657,_0x162205;const {parentId:_0x37510d,unitId:_0x395f9a,text:_0x24567b,threadId:_0x5a6378}=_0x3ddfc4,_0x31c0a1=(_0x162205=(_0x2de657=_0x24567b[_0xc9e8cc(0x196)])==null?void 0x0:_0x2de657[_0xc9e8cc(0x1ae)](_0x49aea9=>_0x49aea9[_0xc9e8cc(0x1cd)]===_0x558556[_0xc9e8cc(0x1f7)])[_0xc9e8cc(0x1c4)](_0x474603=>_0x474603[_0xc9e8cc(0x1b7)]))!=null?_0x162205:[],_0x4cf620=JSON[_0xc9e8cc(0x1d0)](_0x24567b),_0x595c85=(await this[_0xc9e8cc(0x1a5)]['requireSession'](_0x395f9a))[_0xc9e8cc(0x1c6)]();if(_0x37510d){const _0x2cbbb5={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1,'threadId':_0x5a6378},_0x4d5d7c=(await this[_0xc9e8cc(0x1cf)][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+_0xc9e8cc(0x1c0),{'body':_0x2cbbb5}))[_0xc9e8cc(0x1e1)][_0xc9e8cc(0x1b5)];return{..._0x3ddfc4,'id':_0x4d5d7c['replyId'],'dT':_0x33b9d1(+_0x4d5d7c['createTimestamp'])[_0xc9e8cc(0x1d4)](_0xc9e8cc(0x1a8)),'personId':_0x4d5d7c[_0xc9e8cc(0x1e3)]};}else{const _0x5b6065={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1},_0x481c7d=await this['_httpService'][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+'/add',{'body':_0x5b6065});return X(_0x481c7d['body'][_0xc9e8cc(0x1ed)],_0x3ddfc4);}}async['updateComment'](_0x5cd5fb){const _0x11ca50=_0x2cea5e;var _0x54230e,_0x3386c8;const {text:_0x43861f,unitId:_0x4c90af}=_0x5cd5fb,_0x31eeed=(_0x3386c8=(_0x54230e=_0x43861f[_0x11ca50(0x196)])==null?void 0x0:_0x54230e[_0x11ca50(0x1ae)](_0x58fafb=>_0x58fafb['rangeType']===_0x558556[_0x11ca50(0x1f7)])[_0x11ca50(0x1c4)](_0x412805=>_0x412805[_0x11ca50(0x1b7)]))!=null?_0x3386c8:[],_0x5e2f60=JSON[_0x11ca50(0x1d0)](_0x43861f),_0x518780=_0x5cd5fb[_0x11ca50(0x1e7)],_0xc041b8=_0x5cd5fb['id'],_0x1d29b8={'memberId':(await this[_0x11ca50(0x1a5)][_0x11ca50(0x1de)](_0x4c90af))['getMemberID'](),'unitId':_0x4c90af,'threadId':_0x518780,'mention':_0x31eeed,'content':_0x5e2f60,'replyId':_0xc041b8},_0x4167e2=await this[_0x11ca50(0x1cf)][_0x11ca50(0x1e2)](_0x11ca50(0x1a3)+_0x4c90af+_0x11ca50(0x18e),{'body':_0x1d29b8});return!_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)]||_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)][_0x11ca50(0x1a0)]===0x1;}async[_0x2cea5e(0x1b3)](_0x198f94){const _0x271ec6=_0x2cea5e,{unitId:_0x3c3cc5}=_0x198f94,_0x17afa3=_0x198f94['threadId'],_0x2d6746={'memberId':this[_0x271ec6(0x1c5)][_0x271ec6(0x197)]()[_0x271ec6(0x1e4)],'unitId':_0x3c3cc5,'threadId':_0x17afa3,'solved':_0x198f94[_0x271ec6(0x1aa)]?I[_0x271ec6(0x1b2)]:I['OpenOrReOpen']},_0x4b418b=await this['_httpService'][_0x271ec6(0x1e2)](_0x271ec6(0x1a3)+_0x3c3cc5+_0x271ec6(0x19f),{'body':_0x2d6746});return!_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)]||_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)][_0x271ec6(0x1a0)]===0x1;}async['deleteComment'](_0x55bb91,_0x4cd47d,_0x37971e,_0x2ddc7c){const _0x1713e1=_0x2cea5e,_0x2bbb7e={'memberId':(await this['_sessionService'][_0x1713e1(0x1de)](_0x55bb91))[_0x1713e1(0x1c6)](),'threadId':_0x37971e,'replyId':_0x2ddc7c,'unitId':_0x55bb91},_0x273c38=await this[_0x1713e1(0x1cf)][_0x1713e1(0x1e2)](_0x1713e1(0x1a3)+_0x55bb91+_0x1713e1(0x1f0),{'body':_0x2bbb7e});return!_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)]||_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)][_0x1713e1(0x1a0)]===0x1;}async['listComments'](_0x4e625a,_0x2410f4,_0x1530f8){const _0x5377bd=_0x2cea5e,_0x396fbb={'unitId':_0x4e625a,'threadId':_0x1530f8},_0xee3915=await this[_0x5377bd(0x1cf)][_0x5377bd(0x1e2)](_0x5377bd(0x1a3)+_0x4e625a+_0x5377bd(0x1ea),{'body':_0x396fbb}),_0x45756f=_0x1530f8[_0x5377bd(0x1c4)](_0x1794bf=>ee(_0xee3915[_0x5377bd(0x1e1)]['comments'][_0x1794bf],_0x4e625a,_0x2410f4))[_0x5377bd(0x1ae)](Boolean);return Object[_0x5377bd(0x1eb)](_0xee3915[_0x5377bd(0x1e1)][_0x5377bd(0x1ba)])[_0x5377bd(0x1f3)](_0x4b4831=>{const _0x5bca80=_0x5377bd;this[_0x5bca80(0x1c5)][_0x5bca80(0x1ad)](_0x4b4831);}),_0x45756f;}['saveCommentToSnapshot'](_0x437aea){const _0xb3ea17=_0x2cea5e;return{'id':_0x437aea['id'],'threadId':_0x437aea[_0xb3ea17(0x1e7)],'ref':_0x437aea[_0xb3ea17(0x1e0)]};}};f=Q([_(0x0,_0x2c417f(_0x54e640)),_(0x1,_0x2c417f(_0x168610)),_(0x2,_0x2c417f(_0x3a25a6)),_(0x3,_0x2c417f(_0x448b63))],f);var re=Object[_0x2cea5e(0x1d2)],te=(_0x1ee604,_0x17c161,_0x94dbb3,_0x1531dc)=>{const _0x3462de=_0x2cea5e;for(var _0xbf3f97=_0x1531dc>0x1?void 0x0:_0x1531dc?re(_0x17c161,_0x94dbb3):_0x17c161,_0x4fa7b7=_0x1ee604[_0x3462de(0x1a1)]-0x1,_0x19a9a2;_0x4fa7b7>=0x0;_0x4fa7b7--)(_0x19a9a2=_0x1ee604[_0x4fa7b7])&&(_0xbf3f97=_0x19a9a2(_0xbf3f97)||_0xbf3f97);return _0xbf3f97;},N=(_0x30342c,_0x56c515)=>(_0x43ad1c,_0x11c0bc)=>_0x56c515(_0x43ad1c,_0x11c0bc,_0x30342c);let g=class extends _0x5387f5{constructor(_0x34ff8c,_0x3ed7f8){const _0x10ec0b=_0x2cea5e;super(),this[_0x10ec0b(0x19d)]=_0x34ff8c,this[_0x10ec0b(0x1d5)]=_0x3ed7f8,this['_initDataSource']();}[_0x2cea5e(0x1d1)](){const _0x2272d0=_0x2cea5e;this['_threadCommentDataSourceService']['dataSource']=this[_0x2272d0(0x1d5)],this['_threadCommentDataSourceService'][_0x2272d0(0x19e)]=!0x1;}};g=te([N(0x0,_0x17a4a8),N(0x1,_0x2c417f(f))],g);var se=Object[_0x2cea5e(0x1c2)],oe=Object[_0x2cea5e(0x1d2)],ne=(_0x5344ca,_0x1a4102,_0x23d97d)=>_0x1a4102 in _0x5344ca?se(_0x5344ca,_0x1a4102,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23d97d}):_0x5344ca[_0x1a4102]=_0x23d97d,ie=(_0x701a3f,_0x876bfb,_0x2bc513,_0x38c807)=>{for(var _0x40bc91=_0x38c807>0x1?void 0x0:_0x38c807?oe(_0x876bfb,_0x2bc513):_0x876bfb,_0x300eb3=_0x701a3f['length']-0x1,_0x1e4b68;_0x300eb3>=0x0;_0x300eb3--)(_0x1e4b68=_0x701a3f[_0x300eb3])&&(_0x40bc91=_0x1e4b68(_0x40bc91)||_0x40bc91);return _0x40bc91;},w=(_0x25b504,_0x4abc90)=>(_0x47e036,_0x29c728)=>_0x4abc90(_0x47e036,_0x29c728,_0x25b504),$=(_0x5cf1ec,_0x19628a,_0x45f263)=>ne(_0x5cf1ec,typeof _0x19628a!=_0x2cea5e(0x1da)?_0x19628a+'':_0x19628a,_0x45f263);let b=class extends _0x22233e{constructor(_0x31e03a=M,_0x318c6b,_0x29c422){const _0x5756f5=_0x2cea5e;super(),this[_0x5756f5(0x1b4)]=_0x31e03a,this[_0x5756f5(0x1e5)]=_0x318c6b,this[_0x5756f5(0x190)]=_0x29c422;const {..._0x194a16}=_0x2b4b40({},M,this[_0x5756f5(0x1b4)]);this[_0x5756f5(0x190)][_0x5756f5(0x1c9)](z,_0x194a16);}[_0x2cea5e(0x1bd)](){const _0x3e75c9=_0x2cea5e;[[f],[g],[S]][_0x3e75c9(0x1f3)](_0x2a6f49=>{const _0x54b4ae=_0x3e75c9;this[_0x54b4ae(0x1e5)][_0x54b4ae(0x1bf)](_0x2a6f49);});}[_0x2cea5e(0x1b0)](){const _0x50a311=_0x2cea5e;this[_0x50a311(0x1e5)][_0x50a311(0x1cb)](g),this['_injector']['get'](S);}};$(b,_0x2cea5e(0x1c1),W),$(b,_0x2cea5e(0x1f1),_0x30ce88[_0x2cea5e(0x1a9)]),b=ie([_0x2b5003(_0x3ccdc3,_0x18d329,_0x22f1b8),w(0x1,_0x2c417f(_0x448b63)),w(0x2,_0x17ea7f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x293706=_0x3c54;(function(_0x58e3e8,_0x200c12){const _0x338b0a=_0x3c54,_0x529f35=_0x58e3e8();while(!![]){try{const _0x4f0194=-parseInt(_0x338b0a(0xf5))/0x1*(parseInt(_0x338b0a(0x11d))/0x2)+-parseInt(_0x338b0a(0xc3))/0x3+-parseInt(_0x338b0a(0xe3))/0x4+parseInt(_0x338b0a(0x120))/0x5+parseInt(_0x338b0a(0xda))/0x6*(-parseInt(_0x338b0a(0x117))/0x7)+parseInt(_0x338b0a(0x101))/0x8+-parseInt(_0x338b0a(0xc9))/0x9*(-parseInt(_0x338b0a(0xea))/0xa);if(_0x4f0194===_0x200c12)break;else _0x529f35['push'](_0x529f35['shift']());}catch(_0xdb568a){_0x529f35['push'](_0x529f35['shift']());}}}(_0x2dbc,0xa2a09));import{CommentService as _0x4dcb6c,CollaborationSessionService as _0x40f849,UniverCollaborationClientPlugin as _0x320f56}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9823}from'@univerjs-pro/license';import{dayjs as _0x30b957,UserManagerService as _0x3196d5,Inject as _0x3bd5d5,Injector as _0x2dd791,Disposable as _0x3a5f25,CustomRangeType as _0x854669,UniverInstanceType as _0x58268d,DependentOn as _0x3479fe,IConfigService as _0x5d4364,Plugin as _0x287d2d,merge as _0x1aaaac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x516425}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48ead0,IThreadCommentDataSourceService as _0x2416c3}from'@univerjs/thread-comment';import{bufferTime as _0x2f2c97}from'rxjs';function _0x2dbc(){const _0x5ef8ce=['getUser','_injector','COMMENT','symbol','userID','2166764YwLVRy','Solve','getComment','_configService','_init','_initUserSync','pipe','510KyjSna','parse','thread-comment-data-source.config','_threadCommentModel','post','forEach','/reply','requireSession','defineProperty','getUnit','/solved','138231BwZRfT','resolved','rangeId','find','users','_initDataSource','/universer-api/comment/unit/','get','map','Unknown','subscribe','personId','5160968LzzNtC','/add','stringify','addComment','disposeWithMe','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','_threadCommentDataSourceService','/universer-api/user/list','Solved','_config','createTimestamp','filter','payload','resolveComment','_sessionService','replies','length','user','/list','size','_userService','791287xrLqTp','body','replyId','_threadCommentDataSource','solved','delete','18NJHVyY','_httpService','error','6366260NvOmeL','deleteComment','code','Reply','threadId','customRanges','addUser','getCurrentUser','rangeType','1229106YULOFb','userId','ref','unitId','onStarting','listComments','186399RQDqKh','dataSource','slice','commentUpdate$','root','UNIVER_UNKNOWN','getMemberID','parentId','UNRECOGNIZED','_commentService','Edit','add','content','type','format','setConfig','Delete','6UVTtnX','updateComment','Add','getOwnPropertyDescriptor'];_0x2dbc=function(){return _0x5ef8ce;};return _0x2dbc();}import{HTTPService as _0x191dc9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5226b2=>(_0x5226b2[_0x5226b2[_0x293706(0x107)]=0x0]='OpenOrReOpen',_0x5226b2[_0x5226b2[_0x293706(0x10a)]=0x1]=_0x293706(0x10a),_0x5226b2[_0x5226b2[_0x293706(0xd1)]=-0x1]=_0x293706(0xd1),_0x5226b2))(I||{}),v=(_0x4dcd9d=>(_0x4dcd9d[_0x4dcd9d['Unknown']=0x0]=_0x293706(0xfe),_0x4dcd9d[_0x4dcd9d[_0x293706(0xdc)]=0x1]='Add',_0x4dcd9d[_0x4dcd9d['Reply']=0x2]=_0x293706(0x123),_0x4dcd9d[_0x4dcd9d['Edit']=0x3]='Edit',_0x4dcd9d[_0x4dcd9d[_0x293706(0xd9)]=0x4]=_0x293706(0xd9),_0x4dcd9d[_0x4dcd9d[_0x293706(0xe4)]=0x5]=_0x293706(0xe4),_0x4dcd9d[_0x4dcd9d[_0x293706(0xd1)]=-0x1]='UNRECOGNIZED',_0x4dcd9d))(v||{});const D=_0x4b7d74=>_0x30b957(new Date(+_0x4b7d74))[_0x293706(0xd7)](_0x293706(0x106)),B=async(_0x5a4b02,_0x1b7f1c)=>{const _0x72a905=_0x293706,_0x49ab71=_0x5a4b02[_0x72a905(0xfc)](_0x3196d5),_0x53d4b6=_0x5a4b02[_0x72a905(0xfc)](_0x191dc9);_0x1b7f1c[_0x72a905(0xef)](_0x51fa7=>{const _0x50a859=_0x72a905;_0x49ab71[_0x50a859(0xde)](_0x51fa7)&&_0x1b7f1c[_0x50a859(0x11c)](_0x51fa7);}),_0x1b7f1c[_0x72a905(0x115)]&&(await _0x53d4b6[_0x72a905(0xfc)](_0x72a905(0x109),{'params':{'userIDs':[..._0x1b7f1c]}}))[_0x72a905(0x118)][_0x72a905(0xf9)]['forEach'](_0x28d0e1=>{const _0x1821c5=_0x72a905;_0x28d0e1&&_0x49ab71[_0x1821c5(0xc0)](_0x28d0e1);});};var K=Object[_0x293706(0xdd)],V=(_0x30beea,_0x52fe5f,_0x5f5311,_0x5562ab)=>{for(var _0x381bab=_0x5562ab>0x1?void 0x0:_0x5562ab?K(_0x52fe5f,_0x5f5311):_0x52fe5f,_0x2e08b8=_0x30beea['length']-0x1,_0x933162;_0x2e08b8>=0x0;_0x2e08b8--)(_0x933162=_0x30beea[_0x2e08b8])&&(_0x381bab=_0x933162(_0x381bab)||_0x381bab);return _0x381bab;},p=(_0xa2a71a,_0x26af67)=>(_0x449bae,_0x32e695)=>_0x26af67(_0x449bae,_0x32e695,_0xa2a71a);let S=class extends _0x3a5f25{constructor(_0x453871,_0x928fe0,_0x51a3b6,_0x4f2b76){const _0x54d1d2=_0x293706;super(),this[_0x54d1d2(0xd2)]=_0x453871,this[_0x54d1d2(0xed)]=_0x928fe0,this['_userService']=_0x51a3b6,this[_0x54d1d2(0xdf)]=_0x4f2b76,this[_0x54d1d2(0xe7)](),this[_0x54d1d2(0xe8)]();}[_0x293706(0xe8)](){const _0x3abfd6=_0x293706;this['disposeWithMe'](this[_0x3abfd6(0xed)][_0x3abfd6(0xcc)][_0x3abfd6(0xe9)](_0x2f2c97(0x10))[_0x3abfd6(0xff)](_0x20520d=>{const _0x2057a1=_0x3abfd6,_0x119b7a=new Set();_0x20520d[_0x2057a1(0xef)](_0x1829b5=>{const _0x15ebe2=_0x2057a1;switch(_0x1829b5[_0x15ebe2(0xd6)]){case _0x15ebe2(0xd4):{const _0x4a0e07=_0x1829b5[_0x15ebe2(0x10e)][_0x15ebe2(0x100)];_0x119b7a[_0x15ebe2(0xd4)](_0x4a0e07);break;}}}),B(this[_0x2057a1(0xdf)],_0x119b7a);}));}[_0x293706(0xe7)](){const _0x2435b6=_0x293706;this[_0x2435b6(0x105)](this['_commentService'][_0x2435b6(0xcc)]['subscribe'](async _0x3c857f=>{const _0x37388a=_0x2435b6;var _0x3d71b4,_0x2252d6,_0x53c898,_0x192981;const _0x68ba12=(_0x3d71b4=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f[_0x37388a(0xc6)])[_0x37388a(0xf8)](_0xd54b6b=>_0xd54b6b['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x3d71b4[_0x37388a(0xcd)];if(!_0x68ba12)return;const {unitId:_0x4f6342,subUnitId:_0x366811}=_0x68ba12;switch(_0x3c857f[_0x37388a(0x113)]&&this[_0x37388a(0x116)][_0x37388a(0xc0)](_0x3c857f[_0x37388a(0x113)]),_0x3c857f['type']){case v[_0x37388a(0xdc)]:break;case v[_0x37388a(0x123)]:{this[_0x37388a(0xed)][_0x37388a(0x104)](_0x4f6342,_0x366811,{'unitId':_0x4f6342,'subUnitId':_0x366811,'ref':'','id':_0x3c857f['replyId'],'dT':D(+_0x3c857f[_0x37388a(0x10c)]),'threadId':_0x3c857f[_0x37388a(0xbe)],'personId':(_0x53c898=(_0x2252d6=_0x3c857f['user'])==null?void 0x0:_0x2252d6[_0x37388a(0xe2)])!=null?_0x53c898:_0x3c857f[_0x37388a(0xc4)],'text':JSON[_0x37388a(0xeb)](_0x3c857f[_0x37388a(0xd5)]),'parentId':_0x68ba12['id']});break;}case v[_0x37388a(0xd9)]:{const _0x429ed6=this['_threadCommentModel'][_0x37388a(0xe5)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);_0x429ed6&&_0x429ed6[_0x37388a(0xd0)]&&this[_0x37388a(0xed)][_0x37388a(0x121)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);break;}case v[_0x37388a(0xd3)]:{this[_0x37388a(0xed)][_0x37388a(0xdb)](_0x4f6342,_0x366811,{'commentId':_0x3c857f['replyId'],'text':JSON['parse'](_0x3c857f['content'])});break;}case v[_0x37388a(0xe4)]:{const _0x17b09c=(_0x192981=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f['unitId'])['find'](_0x519117=>_0x519117['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x192981['root'];_0x17b09c&&this[_0x37388a(0xed)][_0x37388a(0x10f)](_0x4f6342,_0x366811,_0x17b09c['id'],_0x3c857f['solved']===I[_0x37388a(0x10a)]);break;}}}));}};S=V([p(0x0,_0x3bd5d5(_0x4dcb6c)),p(0x1,_0x3bd5d5(_0x48ead0)),p(0x2,_0x3bd5d5(_0x3196d5)),p(0x3,_0x3bd5d5(_0x2dd791))],S);function _0x3c54(_0x57a76a,_0x1b7982){const _0x2dbc8d=_0x2dbc();return _0x3c54=function(_0x3c540a,_0xe454a5){_0x3c540a=_0x3c540a-0xbe;let _0x7feb65=_0x2dbc8d[_0x3c540a];return _0x7feb65;},_0x3c54(_0x57a76a,_0x1b7982);}const z=_0x293706(0xec),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1632d7,_0x1e7ee6,_0x4a221e,_0xcf572b)=>{const _0x59e9ee=_0x293706;for(var _0x4f0bfe=_0xcf572b>0x1?void 0x0:_0xcf572b?k(_0x1e7ee6,_0x4a221e):_0x1e7ee6,_0x5ec4a4=_0x1632d7[_0x59e9ee(0x112)]-0x1,_0x552ed2;_0x5ec4a4>=0x0;_0x5ec4a4--)(_0x552ed2=_0x1632d7[_0x5ec4a4])&&(_0x4f0bfe=_0x552ed2(_0x4f0bfe)||_0x4f0bfe);return _0x4f0bfe;},_=(_0x1f6295,_0x4f1bf4)=>(_0x276c1d,_0x5662a0)=>_0x4f1bf4(_0x276c1d,_0x5662a0,_0x1f6295);function X(_0x44fe48,_0x49ae41){const _0x5979a5=_0x293706,_0x5b6387=_0x44fe48[_0x5979a5(0x111)][0x0];return{..._0x49ae41,'id':_0x5b6387[_0x5979a5(0x119)],'resolved':_0x44fe48[_0x5979a5(0x11b)]===0x1,'dT':D(_0x5b6387[_0x5979a5(0x10c)]),'personId':_0x5b6387[_0x5979a5(0xc4)],'threadId':_0x5b6387[_0x5979a5(0xbe)]};}function ee(_0x36997a,_0x4abe74,_0x10af6d){const _0x1fc04e=_0x293706;var _0x5b6ad5,_0x995892;if(((_0x995892=(_0x5b6ad5=_0x36997a==null?void 0x0:_0x36997a[_0x1fc04e(0x111)])==null?void 0x0:_0x5b6ad5[_0x1fc04e(0x112)])!=null?_0x995892:0x0)>0x0){const _0x1bc15d=(_0x5a1587,_0x3bbc06)=>({'id':_0x5a1587[_0x1fc04e(0x119)],'threadId':_0x5a1587[_0x1fc04e(0xbe)],'dT':D(_0x5a1587[_0x1fc04e(0x10c)]),'personId':_0x5a1587[_0x1fc04e(0xc4)],'resolved':_0x36997a[_0x1fc04e(0x11b)]===I[_0x1fc04e(0x10a)],'unitId':_0x4abe74,'subUnitId':_0x10af6d,'text':JSON[_0x1fc04e(0xeb)](_0x5a1587[_0x1fc04e(0xd5)]),'parentId':_0x3bbc06}),_0x518af1=_0x1bc15d(_0x36997a['replies'][0x0]);return{..._0x518af1,'children':_0x36997a[_0x1fc04e(0x111)][_0x1fc04e(0xcb)](0x1)[_0x1fc04e(0xfd)](_0x54dcf2=>_0x1bc15d(_0x54dcf2,_0x518af1['id']))};}return null;}let f=class{constructor(_0x7e778e,_0x1a4119,_0x3f6cd9,_0x4bc76d){const _0x3ec7f2=_0x293706;this[_0x3ec7f2(0x11e)]=_0x7e778e,this['_userService']=_0x1a4119,this[_0x3ec7f2(0x110)]=_0x3f6cd9,this[_0x3ec7f2(0xdf)]=_0x4bc76d;}async['addComment'](_0x2fd081){const _0x66793c=_0x293706;var _0x2deb51,_0x15d31f;const {parentId:_0x5c2f3e,unitId:_0x459a92,text:_0x465f02,threadId:_0x483851}=_0x2fd081,_0xc2ff04=(_0x15d31f=(_0x2deb51=_0x465f02[_0x66793c(0xbf)])==null?void 0x0:_0x2deb51[_0x66793c(0x10d)](_0x4349f0=>_0x4349f0[_0x66793c(0xc2)]===_0x854669[_0x66793c(0xe0)])['map'](_0xef9756=>_0xef9756[_0x66793c(0xf7)]))!=null?_0x15d31f:[],_0x4307da=JSON[_0x66793c(0x103)](_0x465f02),_0x3446c0=(await this['_sessionService']['requireSession'](_0x459a92))[_0x66793c(0xcf)]();if(_0x5c2f3e){const _0x5041b3={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04,'threadId':_0x483851},_0x191a54=(await this['_httpService'][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0xf0),{'body':_0x5041b3}))[_0x66793c(0x118)]['reply'];return{..._0x2fd081,'id':_0x191a54[_0x66793c(0x119)],'dT':_0x30b957(+_0x191a54[_0x66793c(0x10c)])['format'](_0x66793c(0x106)),'personId':_0x191a54[_0x66793c(0xc4)]};}else{const _0x469b8c={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04},_0x3b8a05=await this[_0x66793c(0x11e)][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0x102),{'body':_0x469b8c});return X(_0x3b8a05[_0x66793c(0x118)]['comment'],_0x2fd081);}}async[_0x293706(0xdb)](_0x4a15d9){const _0x32f301=_0x293706;var _0x115165,_0x5df503;const {text:_0x472bd7,unitId:_0x2d9b9a}=_0x4a15d9,_0x540cbd=(_0x5df503=(_0x115165=_0x472bd7[_0x32f301(0xbf)])==null?void 0x0:_0x115165[_0x32f301(0x10d)](_0x5ced11=>_0x5ced11[_0x32f301(0xc2)]===_0x854669['COMMENT'])[_0x32f301(0xfd)](_0x46d31c=>_0x46d31c[_0x32f301(0xf7)]))!=null?_0x5df503:[],_0x4311a2=JSON[_0x32f301(0x103)](_0x472bd7),_0x4ed214=_0x4a15d9[_0x32f301(0xbe)],_0x213e9d=_0x4a15d9['id'],_0x23982a={'memberId':(await this['_sessionService'][_0x32f301(0xf1)](_0x2d9b9a))[_0x32f301(0xcf)](),'unitId':_0x2d9b9a,'threadId':_0x4ed214,'mention':_0x540cbd,'content':_0x4311a2,'replyId':_0x213e9d},_0x553af4=await this[_0x32f301(0x11e)][_0x32f301(0xee)](_0x32f301(0xfb)+_0x2d9b9a+'/edit',{'body':_0x23982a});return!_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)]||_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)][_0x32f301(0x122)]===0x1;}async['resolveComment'](_0x79e56b){const _0x48961e=_0x293706,{unitId:_0x1cc0df}=_0x79e56b,_0x38c259=_0x79e56b[_0x48961e(0xbe)],_0x2f7f56={'memberId':this['_userService'][_0x48961e(0xc1)]()[_0x48961e(0xe2)],'unitId':_0x1cc0df,'threadId':_0x38c259,'solved':_0x79e56b[_0x48961e(0xf6)]?I[_0x48961e(0x10a)]:I[_0x48961e(0x107)]},_0x5733c4=await this[_0x48961e(0x11e)][_0x48961e(0xee)](_0x48961e(0xfb)+_0x1cc0df+_0x48961e(0xf4),{'body':_0x2f7f56});return!_0x5733c4[_0x48961e(0x118)][_0x48961e(0x11f)]||_0x5733c4[_0x48961e(0x118)]['error'][_0x48961e(0x122)]===0x1;}async[_0x293706(0x121)](_0x5d3ddc,_0x1b793d,_0x7149e8,_0x3014dc){const _0x3539ff=_0x293706,_0x1df114={'memberId':(await this[_0x3539ff(0x110)][_0x3539ff(0xf1)](_0x5d3ddc))[_0x3539ff(0xcf)](),'threadId':_0x7149e8,'replyId':_0x3014dc,'unitId':_0x5d3ddc},_0x17131b=await this[_0x3539ff(0x11e)]['post'](_0x3539ff(0xfb)+_0x5d3ddc+'/delete',{'body':_0x1df114});return!_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)]||_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)][_0x3539ff(0x122)]===0x1;}async[_0x293706(0xc8)](_0x57cc2c,_0x232977,_0x51e319){const _0x4de966=_0x293706,_0x43cfcb={'unitId':_0x57cc2c,'threadId':_0x51e319},_0x5b56db=await this[_0x4de966(0x11e)][_0x4de966(0xee)](_0x4de966(0xfb)+_0x57cc2c+_0x4de966(0x114),{'body':_0x43cfcb}),_0x2f5970=_0x51e319[_0x4de966(0xfd)](_0x26046a=>ee(_0x5b56db[_0x4de966(0x118)]['comments'][_0x26046a],_0x57cc2c,_0x232977))[_0x4de966(0x10d)](Boolean);return Object['values'](_0x5b56db['body'][_0x4de966(0xf9)])[_0x4de966(0xef)](_0x398273=>{const _0x1a32a8=_0x4de966;this['_userService'][_0x1a32a8(0xc0)](_0x398273);}),_0x2f5970;}['saveCommentToSnapshot'](_0x13ce20){const _0x2d335d=_0x293706;return{'id':_0x13ce20['id'],'threadId':_0x13ce20['threadId'],'ref':_0x13ce20[_0x2d335d(0xc5)]};}};f=Q([_(0x0,_0x3bd5d5(_0x191dc9)),_(0x1,_0x3bd5d5(_0x3196d5)),_(0x2,_0x3bd5d5(_0x40f849)),_(0x3,_0x3bd5d5(_0x2dd791))],f);var re=Object[_0x293706(0xdd)],te=(_0x1d4d36,_0x458372,_0x127bcc,_0x215438)=>{for(var _0x3e43a4=_0x215438>0x1?void 0x0:_0x215438?re(_0x458372,_0x127bcc):_0x458372,_0x5024d1=_0x1d4d36['length']-0x1,_0x331327;_0x5024d1>=0x0;_0x5024d1--)(_0x331327=_0x1d4d36[_0x5024d1])&&(_0x3e43a4=_0x331327(_0x3e43a4)||_0x3e43a4);return _0x3e43a4;},N=(_0x5af987,_0x2995d8)=>(_0x2ab013,_0x35438e)=>_0x2995d8(_0x2ab013,_0x35438e,_0x5af987);let g=class extends _0x3a5f25{constructor(_0x389787,_0x4a422f){const _0x3abbf6=_0x293706;super(),this[_0x3abbf6(0x108)]=_0x389787,this[_0x3abbf6(0x11a)]=_0x4a422f,this[_0x3abbf6(0xfa)]();}[_0x293706(0xfa)](){const _0x21025c=_0x293706;this[_0x21025c(0x108)][_0x21025c(0xca)]=this[_0x21025c(0x11a)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2416c3),N(0x1,_0x3bd5d5(f))],g);var se=Object[_0x293706(0xf2)],oe=Object[_0x293706(0xdd)],ne=(_0x2ec168,_0x23c57f,_0x42682f)=>_0x23c57f in _0x2ec168?se(_0x2ec168,_0x23c57f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42682f}):_0x2ec168[_0x23c57f]=_0x42682f,ie=(_0x4cf028,_0x2753b1,_0x3d6d11,_0x19366b)=>{const _0x406116=_0x293706;for(var _0x25c8ea=_0x19366b>0x1?void 0x0:_0x19366b?oe(_0x2753b1,_0x3d6d11):_0x2753b1,_0x4bcd37=_0x4cf028[_0x406116(0x112)]-0x1,_0x55881d;_0x4bcd37>=0x0;_0x4bcd37--)(_0x55881d=_0x4cf028[_0x4bcd37])&&(_0x25c8ea=_0x55881d(_0x25c8ea)||_0x25c8ea);return _0x25c8ea;},w=(_0x3d2689,_0x475db5)=>(_0x41e608,_0x1a0034)=>_0x475db5(_0x41e608,_0x1a0034,_0x3d2689),$=(_0x54a4df,_0x2291fc,_0x4f7cf8)=>ne(_0x54a4df,typeof _0x2291fc!=_0x293706(0xe1)?_0x2291fc+'':_0x2291fc,_0x4f7cf8);let b=class extends _0x287d2d{constructor(_0x318192=M,_0x711135,_0x51b8c5){const _0x1e7db9=_0x293706;super(),this[_0x1e7db9(0x10b)]=_0x318192,this[_0x1e7db9(0xdf)]=_0x711135,this[_0x1e7db9(0xe6)]=_0x51b8c5;const {..._0x137174}=_0x1aaaac({},M,this[_0x1e7db9(0x10b)]);this[_0x1e7db9(0xe6)][_0x1e7db9(0xd8)](z,_0x137174);}[_0x293706(0xc7)](){const _0x49c07d=_0x293706;[[f],[g],[S]][_0x49c07d(0xef)](_0x2dffec=>{const _0x1a4b13=_0x49c07d;this[_0x1a4b13(0xdf)][_0x1a4b13(0xd4)](_0x2dffec);});}['onReady'](){const _0x46faf1=_0x293706;this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](g),this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](S);}};$(b,'pluginName',W),$(b,_0x293706(0xd6),_0x58268d[_0x293706(0xce)]),b=ie([_0x3479fe(_0x516425,_0x320f56,_0x4b9823),w(0x1,_0x3bd5d5(_0x2dd791)),w(0x2,_0x5d4364)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2cea5e=_0x532a;(function(_0x377d08,_0x3d964d){const _0x3787e2=_0x532a,_0x312298=_0x377d08();while(!![]){try{const _0x3e50bb=-parseInt(_0x3787e2(0x1e6))/0x1*(-parseInt(_0x3787e2(0x192))/0x2)+parseInt(_0x3787e2(0x1d6))/0x3+parseInt(_0x3787e2(0x198))/0x4*(-parseInt(_0x3787e2(0x195))/0x5)+-parseInt(_0x3787e2(0x18d))/0x6+-parseInt(_0x3787e2(0x1f5))/0x7*(parseInt(_0x3787e2(0x19a))/0x8)+parseInt(_0x3787e2(0x1ab))/0x9*(parseInt(_0x3787e2(0x1b9))/0xa)+parseInt(_0x3787e2(0x1d3))/0xb;if(_0x3e50bb===_0x3d964d)break;else _0x312298['push'](_0x312298['shift']());}catch(_0x3071f5){_0x312298['push'](_0x312298['shift']());}}}(_0x47d2,0x89eb0));import{CommentService as _0x57d725,CollaborationSessionService as _0x3a25a6,UniverCollaborationClientPlugin as _0x18d329}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22f1b8}from'@univerjs-pro/license';import{dayjs as _0x33b9d1,UserManagerService as _0x168610,Inject as _0x2c417f,Injector as _0x448b63,Disposable as _0x5387f5,CustomRangeType as _0x558556,UniverInstanceType as _0x30ce88,DependentOn as _0x2b5003,IConfigService as _0x17ea7f,Plugin as _0x22233e,merge as _0x2b4b40}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ccdc3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa19232,IThreadCommentDataSourceService as _0x17a4a8}from'@univerjs/thread-comment';import{bufferTime as _0x534754}from'rxjs';import{HTTPService as _0x54e640}from'@univerjs/network';const W=_0x2cea5e(0x19c);var I=(_0x35670c=>(_0x35670c[_0x35670c[_0x2cea5e(0x1bc)]=0x0]=_0x2cea5e(0x1bc),_0x35670c[_0x35670c[_0x2cea5e(0x1b2)]=0x1]=_0x2cea5e(0x1b2),_0x35670c[_0x35670c[_0x2cea5e(0x19b)]=-0x1]=_0x2cea5e(0x19b),_0x35670c))(I||{}),v=(_0xb38806=>(_0xb38806[_0xb38806[_0x2cea5e(0x1e9)]=0x0]=_0x2cea5e(0x1e9),_0xb38806[_0xb38806[_0x2cea5e(0x1f6)]=0x1]=_0x2cea5e(0x1f6),_0xb38806[_0xb38806[_0x2cea5e(0x199)]=0x2]=_0x2cea5e(0x199),_0xb38806[_0xb38806[_0x2cea5e(0x1bb)]=0x3]=_0x2cea5e(0x1bb),_0xb38806[_0xb38806[_0x2cea5e(0x1f4)]=0x4]=_0x2cea5e(0x1f4),_0xb38806[_0xb38806[_0x2cea5e(0x1d8)]=0x5]=_0x2cea5e(0x1d8),_0xb38806[_0xb38806[_0x2cea5e(0x19b)]=-0x1]='UNRECOGNIZED',_0xb38806))(v||{});function _0x532a(_0x3cc71a,_0x2ed6b9){const _0x47d2b8=_0x47d2();return _0x532a=function(_0x532a1f,_0x5dac7e){_0x532a1f=_0x532a1f-0x18d;let _0x516c6b=_0x47d2b8[_0x532a1f];return _0x516c6b;},_0x532a(_0x3cc71a,_0x2ed6b9);}const D=_0x4a467a=>_0x33b9d1(new Date(+_0x4a467a))[_0x2cea5e(0x1d4)](_0x2cea5e(0x1a8)),B=async(_0x340f92,_0x17bbee)=>{const _0x405b9=_0x2cea5e,_0x124ab4=_0x340f92[_0x405b9(0x1cb)](_0x168610),_0x30f06b=_0x340f92[_0x405b9(0x1cb)](_0x54e640);_0x17bbee['forEach'](_0x148267=>{const _0x4231f1=_0x405b9;_0x124ab4[_0x4231f1(0x1ef)](_0x148267)&&_0x17bbee[_0x4231f1(0x194)](_0x148267);}),_0x17bbee[_0x405b9(0x1a4)]&&(await _0x30f06b[_0x405b9(0x1cb)](_0x405b9(0x1e8),{'params':{'userIDs':[..._0x17bbee]}}))[_0x405b9(0x1e1)][_0x405b9(0x1ba)]['forEach'](_0x3f5af5=>{const _0x1c7a3f=_0x405b9;_0x3f5af5&&_0x124ab4[_0x1c7a3f(0x1ad)](_0x3f5af5);});};var K=Object[_0x2cea5e(0x1d2)],V=(_0x423f39,_0x3b0632,_0x1fe8c0,_0x5a9966)=>{const _0x360b5f=_0x2cea5e;for(var _0x57419b=_0x5a9966>0x1?void 0x0:_0x5a9966?K(_0x3b0632,_0x1fe8c0):_0x3b0632,_0x357487=_0x423f39[_0x360b5f(0x1a1)]-0x1,_0x18870f;_0x357487>=0x0;_0x357487--)(_0x18870f=_0x423f39[_0x357487])&&(_0x57419b=_0x18870f(_0x57419b)||_0x57419b);return _0x57419b;},p=(_0x14fe14,_0x46496e)=>(_0x2e2393,_0x5aa0b4)=>_0x46496e(_0x2e2393,_0x5aa0b4,_0x14fe14);let S=class extends _0x5387f5{constructor(_0x2bf4ce,_0x3ba421,_0x25eca,_0xae0c3b){const _0xbddff6=_0x2cea5e;super(),this[_0xbddff6(0x1be)]=_0x2bf4ce,this['_threadCommentModel']=_0x3ba421,this[_0xbddff6(0x1c5)]=_0x25eca,this[_0xbddff6(0x1e5)]=_0xae0c3b,this['_init'](),this[_0xbddff6(0x1b6)]();}[_0x2cea5e(0x1b6)](){const _0x3882b6=_0x2cea5e;this[_0x3882b6(0x1dc)](this[_0x3882b6(0x1db)][_0x3882b6(0x1ce)][_0x3882b6(0x1ac)](_0x534754(0x10))[_0x3882b6(0x1c8)](_0x530149=>{const _0x8f8e59=_0x3882b6,_0x390024=new Set();_0x530149[_0x8f8e59(0x1f3)](_0x1200f6=>{const _0x31a18d=_0x8f8e59;switch(_0x1200f6[_0x31a18d(0x1f1)]){case _0x31a18d(0x1bf):{const _0x1f1eed=_0x1200f6[_0x31a18d(0x193)]['personId'];_0x390024[_0x31a18d(0x1bf)](_0x1f1eed);break;}}}),B(this['_injector'],_0x390024);}));}[_0x2cea5e(0x1ee)](){const _0x1d102b=_0x2cea5e;this[_0x1d102b(0x1dc)](this['_commentService']['commentUpdate$'][_0x1d102b(0x1c8)](async _0x2198c6=>{const _0x1a7907=_0x1d102b;var _0x536dcb,_0x21ad18,_0x2cc167,_0x57986d;const _0x38918f=(_0x536dcb=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x78147d=>_0x78147d[_0x1a7907(0x1e7)]===_0x2198c6['threadId']))==null?void 0x0:_0x536dcb['root'];if(!_0x38918f)return;const {unitId:_0x33756c,subUnitId:_0xb2b883}=_0x38918f;switch(_0x2198c6[_0x1a7907(0x1a6)]&&this[_0x1a7907(0x1c5)][_0x1a7907(0x1ad)](_0x2198c6[_0x1a7907(0x1a6)]),_0x2198c6['type']){case v['Add']:break;case v[_0x1a7907(0x199)]:{this[_0x1a7907(0x1db)][_0x1a7907(0x1ec)](_0x33756c,_0xb2b883,{'unitId':_0x33756c,'subUnitId':_0xb2b883,'ref':'','id':_0x2198c6[_0x1a7907(0x1a7)],'dT':D(+_0x2198c6[_0x1a7907(0x1cc)]),'threadId':_0x2198c6[_0x1a7907(0x1e7)],'personId':(_0x2cc167=(_0x21ad18=_0x2198c6[_0x1a7907(0x1a6)])==null?void 0x0:_0x21ad18[_0x1a7907(0x1e4)])!=null?_0x2cc167:_0x2198c6[_0x1a7907(0x1e3)],'text':JSON[_0x1a7907(0x1ca)](_0x2198c6[_0x1a7907(0x1d7)]),'parentId':_0x38918f['id']});break;}case v[_0x1a7907(0x1f4)]:{const _0x5b1713=this[_0x1a7907(0x1db)][_0x1a7907(0x1dd)](_0x33756c,_0xb2b883,_0x2198c6[_0x1a7907(0x1a7)]);_0x5b1713&&_0x5b1713[_0x1a7907(0x1a2)]&&this[_0x1a7907(0x1db)][_0x1a7907(0x1f2)](_0x33756c,_0xb2b883,_0x2198c6['replyId']);break;}case v['Edit']:{this[_0x1a7907(0x1db)][_0x1a7907(0x1b1)](_0x33756c,_0xb2b883,{'commentId':_0x2198c6[_0x1a7907(0x1a7)],'text':JSON['parse'](_0x2198c6[_0x1a7907(0x1d7)])});break;}case v[_0x1a7907(0x1d8)]:{const _0x4ae76b=(_0x57986d=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x2cde6e=>_0x2cde6e[_0x1a7907(0x1e7)]===_0x2198c6[_0x1a7907(0x1e7)]))==null?void 0x0:_0x57986d[_0x1a7907(0x18f)];_0x4ae76b&&this[_0x1a7907(0x1db)]['resolveComment'](_0x33756c,_0xb2b883,_0x4ae76b['id'],_0x2198c6['solved']===I['Solved']);break;}}}));}};function _0x47d2(){const _0x3ff6bf=['2114406GywHze','Add','COMMENT','2303652rRnSAf','/edit','root','_configService','find','111390aGldSc','payload','delete','5LRFcHC','customRanges','getCurrentUser','2789604VExDlm','Reply','16RhUNYl','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','syncUpdateMutationToColla','/solved','code','length','parentId','/universer-api/comment/unit/','size','_sessionService','user','replyId','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','resolved','16821SKGOoo','pipe','addUser','filter','solved','onReady','updateComment','Solved','resolveComment','_config','reply','_initUserSync','rangeId','slice','3350pjTPzF','users','Edit','OpenOrReOpen','onStarting','_commentService','add','/reply','pluginName','defineProperty','thread-comment-data-source.config','map','_userService','getMemberID','unitId','subscribe','setConfig','parse','get','createTimestamp','rangeType','commentUpdate$','_httpService','stringify','_initDataSource','getOwnPropertyDescriptor','12072687JwxwHt','format','_threadCommentDataSource','744792oHVdlO','content','Solve','replies','symbol','_threadCommentModel','disposeWithMe','getComment','requireSession','error','ref','body','post','userId','userID','_injector','5CcsSRw','threadId','/universer-api/user/list','Unknown','/list','values','addComment','comment','_init','getUser','/delete','type','deleteComment','forEach','Delete'];_0x47d2=function(){return _0x3ff6bf;};return _0x47d2();}S=V([p(0x0,_0x2c417f(_0x57d725)),p(0x1,_0x2c417f(_0xa19232)),p(0x2,_0x2c417f(_0x168610)),p(0x3,_0x2c417f(_0x448b63))],S);const z=_0x2cea5e(0x1c3),M={};var k=Object[_0x2cea5e(0x1d2)],Q=(_0x5c196f,_0xa81692,_0x40095c,_0x51c278)=>{for(var _0x4cd605=_0x51c278>0x1?void 0x0:_0x51c278?k(_0xa81692,_0x40095c):_0xa81692,_0x544770=_0x5c196f['length']-0x1,_0x40ac6d;_0x544770>=0x0;_0x544770--)(_0x40ac6d=_0x5c196f[_0x544770])&&(_0x4cd605=_0x40ac6d(_0x4cd605)||_0x4cd605);return _0x4cd605;},_=(_0x24a18a,_0x5918ca)=>(_0x4c1c8f,_0x2d19cf)=>_0x5918ca(_0x4c1c8f,_0x2d19cf,_0x24a18a);function X(_0x5ba611,_0x3ab685){const _0x553694=_0x2cea5e,_0x570b60=_0x5ba611[_0x553694(0x1d9)][0x0];return{..._0x3ab685,'id':_0x570b60['replyId'],'resolved':_0x5ba611[_0x553694(0x1af)]===0x1,'dT':D(_0x570b60[_0x553694(0x1cc)]),'personId':_0x570b60[_0x553694(0x1e3)],'threadId':_0x570b60[_0x553694(0x1e7)]};}function ee(_0x3ef257,_0x13d276,_0x16c78a){const _0x33e968=_0x2cea5e;var _0x16cc35,_0x3cd3fc;if(((_0x3cd3fc=(_0x16cc35=_0x3ef257==null?void 0x0:_0x3ef257[_0x33e968(0x1d9)])==null?void 0x0:_0x16cc35['length'])!=null?_0x3cd3fc:0x0)>0x0){const _0x2a4aa3=(_0x56d2a7,_0x425e36)=>({'id':_0x56d2a7['replyId'],'threadId':_0x56d2a7[_0x33e968(0x1e7)],'dT':D(_0x56d2a7[_0x33e968(0x1cc)]),'personId':_0x56d2a7[_0x33e968(0x1e3)],'resolved':_0x3ef257[_0x33e968(0x1af)]===I[_0x33e968(0x1b2)],'unitId':_0x13d276,'subUnitId':_0x16c78a,'text':JSON['parse'](_0x56d2a7[_0x33e968(0x1d7)]),'parentId':_0x425e36}),_0x583304=_0x2a4aa3(_0x3ef257['replies'][0x0]);return{..._0x583304,'children':_0x3ef257[_0x33e968(0x1d9)][_0x33e968(0x1b8)](0x1)[_0x33e968(0x1c4)](_0x2950a6=>_0x2a4aa3(_0x2950a6,_0x583304['id']))};}return null;}let f=class{constructor(_0x30369b,_0xcf72ee,_0x435bbe,_0x4dbff0){const _0x33ef0a=_0x2cea5e;this[_0x33ef0a(0x1cf)]=_0x30369b,this[_0x33ef0a(0x1c5)]=_0xcf72ee,this[_0x33ef0a(0x1a5)]=_0x435bbe,this[_0x33ef0a(0x1e5)]=_0x4dbff0;}async[_0x2cea5e(0x1ec)](_0x3ddfc4){const _0xc9e8cc=_0x2cea5e;var _0x2de657,_0x162205;const {parentId:_0x37510d,unitId:_0x395f9a,text:_0x24567b,threadId:_0x5a6378}=_0x3ddfc4,_0x31c0a1=(_0x162205=(_0x2de657=_0x24567b[_0xc9e8cc(0x196)])==null?void 0x0:_0x2de657[_0xc9e8cc(0x1ae)](_0x49aea9=>_0x49aea9[_0xc9e8cc(0x1cd)]===_0x558556[_0xc9e8cc(0x1f7)])[_0xc9e8cc(0x1c4)](_0x474603=>_0x474603[_0xc9e8cc(0x1b7)]))!=null?_0x162205:[],_0x4cf620=JSON[_0xc9e8cc(0x1d0)](_0x24567b),_0x595c85=(await this[_0xc9e8cc(0x1a5)]['requireSession'](_0x395f9a))[_0xc9e8cc(0x1c6)]();if(_0x37510d){const _0x2cbbb5={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1,'threadId':_0x5a6378},_0x4d5d7c=(await this[_0xc9e8cc(0x1cf)][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+_0xc9e8cc(0x1c0),{'body':_0x2cbbb5}))[_0xc9e8cc(0x1e1)][_0xc9e8cc(0x1b5)];return{..._0x3ddfc4,'id':_0x4d5d7c['replyId'],'dT':_0x33b9d1(+_0x4d5d7c['createTimestamp'])[_0xc9e8cc(0x1d4)](_0xc9e8cc(0x1a8)),'personId':_0x4d5d7c[_0xc9e8cc(0x1e3)]};}else{const _0x5b6065={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1},_0x481c7d=await this['_httpService'][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+'/add',{'body':_0x5b6065});return X(_0x481c7d['body'][_0xc9e8cc(0x1ed)],_0x3ddfc4);}}async['updateComment'](_0x5cd5fb){const _0x11ca50=_0x2cea5e;var _0x54230e,_0x3386c8;const {text:_0x43861f,unitId:_0x4c90af}=_0x5cd5fb,_0x31eeed=(_0x3386c8=(_0x54230e=_0x43861f[_0x11ca50(0x196)])==null?void 0x0:_0x54230e[_0x11ca50(0x1ae)](_0x58fafb=>_0x58fafb['rangeType']===_0x558556[_0x11ca50(0x1f7)])[_0x11ca50(0x1c4)](_0x412805=>_0x412805[_0x11ca50(0x1b7)]))!=null?_0x3386c8:[],_0x5e2f60=JSON[_0x11ca50(0x1d0)](_0x43861f),_0x518780=_0x5cd5fb[_0x11ca50(0x1e7)],_0xc041b8=_0x5cd5fb['id'],_0x1d29b8={'memberId':(await this[_0x11ca50(0x1a5)][_0x11ca50(0x1de)](_0x4c90af))['getMemberID'](),'unitId':_0x4c90af,'threadId':_0x518780,'mention':_0x31eeed,'content':_0x5e2f60,'replyId':_0xc041b8},_0x4167e2=await this[_0x11ca50(0x1cf)][_0x11ca50(0x1e2)](_0x11ca50(0x1a3)+_0x4c90af+_0x11ca50(0x18e),{'body':_0x1d29b8});return!_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)]||_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)][_0x11ca50(0x1a0)]===0x1;}async[_0x2cea5e(0x1b3)](_0x198f94){const _0x271ec6=_0x2cea5e,{unitId:_0x3c3cc5}=_0x198f94,_0x17afa3=_0x198f94['threadId'],_0x2d6746={'memberId':this[_0x271ec6(0x1c5)][_0x271ec6(0x197)]()[_0x271ec6(0x1e4)],'unitId':_0x3c3cc5,'threadId':_0x17afa3,'solved':_0x198f94[_0x271ec6(0x1aa)]?I[_0x271ec6(0x1b2)]:I['OpenOrReOpen']},_0x4b418b=await this['_httpService'][_0x271ec6(0x1e2)](_0x271ec6(0x1a3)+_0x3c3cc5+_0x271ec6(0x19f),{'body':_0x2d6746});return!_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)]||_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)][_0x271ec6(0x1a0)]===0x1;}async['deleteComment'](_0x55bb91,_0x4cd47d,_0x37971e,_0x2ddc7c){const _0x1713e1=_0x2cea5e,_0x2bbb7e={'memberId':(await this['_sessionService'][_0x1713e1(0x1de)](_0x55bb91))[_0x1713e1(0x1c6)](),'threadId':_0x37971e,'replyId':_0x2ddc7c,'unitId':_0x55bb91},_0x273c38=await this[_0x1713e1(0x1cf)][_0x1713e1(0x1e2)](_0x1713e1(0x1a3)+_0x55bb91+_0x1713e1(0x1f0),{'body':_0x2bbb7e});return!_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)]||_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)][_0x1713e1(0x1a0)]===0x1;}async['listComments'](_0x4e625a,_0x2410f4,_0x1530f8){const _0x5377bd=_0x2cea5e,_0x396fbb={'unitId':_0x4e625a,'threadId':_0x1530f8},_0xee3915=await this[_0x5377bd(0x1cf)][_0x5377bd(0x1e2)](_0x5377bd(0x1a3)+_0x4e625a+_0x5377bd(0x1ea),{'body':_0x396fbb}),_0x45756f=_0x1530f8[_0x5377bd(0x1c4)](_0x1794bf=>ee(_0xee3915[_0x5377bd(0x1e1)]['comments'][_0x1794bf],_0x4e625a,_0x2410f4))[_0x5377bd(0x1ae)](Boolean);return Object[_0x5377bd(0x1eb)](_0xee3915[_0x5377bd(0x1e1)][_0x5377bd(0x1ba)])[_0x5377bd(0x1f3)](_0x4b4831=>{const _0x5bca80=_0x5377bd;this[_0x5bca80(0x1c5)][_0x5bca80(0x1ad)](_0x4b4831);}),_0x45756f;}['saveCommentToSnapshot'](_0x437aea){const _0xb3ea17=_0x2cea5e;return{'id':_0x437aea['id'],'threadId':_0x437aea[_0xb3ea17(0x1e7)],'ref':_0x437aea[_0xb3ea17(0x1e0)]};}};f=Q([_(0x0,_0x2c417f(_0x54e640)),_(0x1,_0x2c417f(_0x168610)),_(0x2,_0x2c417f(_0x3a25a6)),_(0x3,_0x2c417f(_0x448b63))],f);var re=Object[_0x2cea5e(0x1d2)],te=(_0x1ee604,_0x17c161,_0x94dbb3,_0x1531dc)=>{const _0x3462de=_0x2cea5e;for(var _0xbf3f97=_0x1531dc>0x1?void 0x0:_0x1531dc?re(_0x17c161,_0x94dbb3):_0x17c161,_0x4fa7b7=_0x1ee604[_0x3462de(0x1a1)]-0x1,_0x19a9a2;_0x4fa7b7>=0x0;_0x4fa7b7--)(_0x19a9a2=_0x1ee604[_0x4fa7b7])&&(_0xbf3f97=_0x19a9a2(_0xbf3f97)||_0xbf3f97);return _0xbf3f97;},N=(_0x30342c,_0x56c515)=>(_0x43ad1c,_0x11c0bc)=>_0x56c515(_0x43ad1c,_0x11c0bc,_0x30342c);let g=class extends _0x5387f5{constructor(_0x34ff8c,_0x3ed7f8){const _0x10ec0b=_0x2cea5e;super(),this[_0x10ec0b(0x19d)]=_0x34ff8c,this[_0x10ec0b(0x1d5)]=_0x3ed7f8,this['_initDataSource']();}[_0x2cea5e(0x1d1)](){const _0x2272d0=_0x2cea5e;this['_threadCommentDataSourceService']['dataSource']=this[_0x2272d0(0x1d5)],this['_threadCommentDataSourceService'][_0x2272d0(0x19e)]=!0x1;}};g=te([N(0x0,_0x17a4a8),N(0x1,_0x2c417f(f))],g);var se=Object[_0x2cea5e(0x1c2)],oe=Object[_0x2cea5e(0x1d2)],ne=(_0x5344ca,_0x1a4102,_0x23d97d)=>_0x1a4102 in _0x5344ca?se(_0x5344ca,_0x1a4102,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23d97d}):_0x5344ca[_0x1a4102]=_0x23d97d,ie=(_0x701a3f,_0x876bfb,_0x2bc513,_0x38c807)=>{for(var _0x40bc91=_0x38c807>0x1?void 0x0:_0x38c807?oe(_0x876bfb,_0x2bc513):_0x876bfb,_0x300eb3=_0x701a3f['length']-0x1,_0x1e4b68;_0x300eb3>=0x0;_0x300eb3--)(_0x1e4b68=_0x701a3f[_0x300eb3])&&(_0x40bc91=_0x1e4b68(_0x40bc91)||_0x40bc91);return _0x40bc91;},w=(_0x25b504,_0x4abc90)=>(_0x47e036,_0x29c728)=>_0x4abc90(_0x47e036,_0x29c728,_0x25b504),$=(_0x5cf1ec,_0x19628a,_0x45f263)=>ne(_0x5cf1ec,typeof _0x19628a!=_0x2cea5e(0x1da)?_0x19628a+'':_0x19628a,_0x45f263);let b=class extends _0x22233e{constructor(_0x31e03a=M,_0x318c6b,_0x29c422){const _0x5756f5=_0x2cea5e;super(),this[_0x5756f5(0x1b4)]=_0x31e03a,this[_0x5756f5(0x1e5)]=_0x318c6b,this[_0x5756f5(0x190)]=_0x29c422;const {..._0x194a16}=_0x2b4b40({},M,this[_0x5756f5(0x1b4)]);this[_0x5756f5(0x190)][_0x5756f5(0x1c9)](z,_0x194a16);}[_0x2cea5e(0x1bd)](){const _0x3e75c9=_0x2cea5e;[[f],[g],[S]][_0x3e75c9(0x1f3)](_0x2a6f49=>{const _0x54b4ae=_0x3e75c9;this[_0x54b4ae(0x1e5)][_0x54b4ae(0x1bf)](_0x2a6f49);});}[_0x2cea5e(0x1b0)](){const _0x50a311=_0x2cea5e;this[_0x50a311(0x1e5)][_0x50a311(0x1cb)](g),this['_injector']['get'](S);}};$(b,_0x2cea5e(0x1c1),W),$(b,_0x2cea5e(0x1f1),_0x30ce88[_0x2cea5e(0x1a9)]),b=ie([_0x2b5003(_0x3ccdc3,_0x18d329,_0x22f1b8),w(0x1,_0x2c417f(_0x448b63)),w(0x2,_0x17ea7f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x46f4(){const _0xd9fa78=['getOwnPropertyDescriptor','userID','add','listComments','delete','type','filter','161934bQIkLa','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','get','_initDataSource','_httpService','thread-comment-data-source.config','Unknown','find','Solve','rangeId','Disposable','Solved','IConfigService','onReady','1671834lngxYD','_threadCommentModel','resolved','CollaborationSessionService','_init','ThreadCommentModel','IThreadCommentDataSourceService','HTTPService','getUser','/universer-api/user/list','/edit','amd','UniverCore','UNIVER_UNKNOWN','root','dayjs','commentUpdate$','UniverCollaborationClientPlugin','_userService','requireSession','_config','3426595pknpmz','OpenOrReOpen','Add','content','toStringTag','defineProperty','user','exports','addUser','values','CommentService','length','rangeType','parse','UniverThreadCommentUIPlugin','onStarting','18ydIHGr','UniverNetwork','subscribe','merge','1404dWcqXo','userId','payload','/delete','632674eyEvNM','addComment','Injector','body','YYYY/MM/DD\x20HH:mm','CustomRangeType','symbol','290xsmrZi','UserManagerService','getComment','Inject','COMMENT','22891Dtehcf','comments','@univerjs/thread-comment','createTimestamp','345217KkzcQR','code','@univerjs/thread-comment-ui','pluginName','_commentService','disposeWithMe','/universer-api/comment/unit/','replies','getCurrentUser','Delete','getUnit','customRanges','setConfig','Module','_threadCommentDataSourceService','UniverInstanceType','Reply','UniverLicensePlugin','error','slice','_configService','UNRECOGNIZED','function','_initUserSync','_sessionService','rxjs','_threadCommentDataSource','getMemberID','4kuyRGH','updateComment','solved','syncUpdateMutationToColla','parentId','/solved','reply','UniverProThreadCommentDatasource','stringify','dataSource','forEach','resolveComment','threadId','pipe','users','Edit','/reply','Plugin','post','67923OGWTJX','map','UniverThreadCommentDataSourcePlugin','_injector','deleteComment','unitId','UniverProCollaborationClient','replyId','16fqNYja'];_0x46f4=function(){return _0xd9fa78;};return _0x46f4();}function _0x3417(_0x42f3b8,_0x8f3e97){const _0x46f49a=_0x46f4();return _0x3417=function(_0x341731,_0x55260f){_0x341731=_0x341731-0x80;let _0x50735e=_0x46f49a[_0x341731];return _0x50735e;},_0x3417(_0x42f3b8,_0x8f3e97);}(function(_0x2bb5fd,_0x18444a){const _0x1d943b=_0x3417,_0x167d6d=_0x2bb5fd();while(!![]){try{const _0x3d580b=-parseInt(_0x1d943b(0xba))/0x1+parseInt(_0x1d943b(0xf9))/0x2*(parseInt(_0x1d943b(0xa2))/0x3)+-parseInt(_0x1d943b(0xd6))/0x4*(parseInt(_0x1d943b(0x92))/0x5)+parseInt(_0x1d943b(0x108))/0x6+-parseInt(_0x1d943b(0xaa))/0x7*(-parseInt(_0x1d943b(0xf1))/0x8)+parseInt(_0x1d943b(0xe9))/0x9*(parseInt(_0x1d943b(0xb1))/0xa)+-parseInt(_0x1d943b(0xb6))/0xb*(-parseInt(_0x1d943b(0xa6))/0xc);if(_0x3d580b===_0x18444a)break;else _0x167d6d['push'](_0x167d6d['shift']());}catch(_0x39651d){_0x167d6d['push'](_0x167d6d['shift']());}}}(_0x46f4,0x5c0b1),function(_0x378411,_0x5ae508){const _0x1b1a25=_0x3417;typeof exports=='object'&&typeof module<'u'?_0x5ae508(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1b1a25(0xd0)&&define[_0x1b1a25(0x88)]?define([_0x1b1a25(0x99),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x1b1a25(0xbc),_0x1b1a25(0xb8),_0x1b1a25(0xd3),'@univerjs/network'],_0x5ae508):(_0x378411=typeof globalThis<'u'?globalThis:_0x378411||self,_0x5ae508(_0x378411[_0x1b1a25(0xdd)]={},_0x378411[_0x1b1a25(0xef)],_0x378411['UniverProLicense'],_0x378411[_0x1b1a25(0x89)],_0x378411['UniverThreadCommentUi'],_0x378411['UniverThreadComment'],_0x378411[_0x1b1a25(0xd3)],_0x378411[_0x1b1a25(0xa3)]));}(this,function(_0x2ea72a,_0x204406,_0x44fff7,_0x4f4087,_0x343015,_0x4f7dd7,_0x3b81d3,_0x59fb72){'use strict';const _0x581b78=_0x3417;const _0x1d6925=_0x581b78(0xfa);var _0x9044fa=(_0x236543=>(_0x236543[_0x236543[_0x581b78(0x93)]=0x0]=_0x581b78(0x93),_0x236543[_0x236543[_0x581b78(0x105)]=0x1]=_0x581b78(0x105),_0x236543[_0x236543[_0x581b78(0xcf)]=-0x1]=_0x581b78(0xcf),_0x236543))(_0x9044fa||{}),_0x1ed302=(_0x4eb1bb=>(_0x4eb1bb[_0x4eb1bb[_0x581b78(0x100)]=0x0]='Unknown',_0x4eb1bb[_0x4eb1bb[_0x581b78(0x94)]=0x1]=_0x581b78(0x94),_0x4eb1bb[_0x4eb1bb['Reply']=0x2]=_0x581b78(0xca),_0x4eb1bb[_0x4eb1bb[_0x581b78(0xe5)]=0x3]='Edit',_0x4eb1bb[_0x4eb1bb[_0x581b78(0xc3)]=0x4]=_0x581b78(0xc3),_0x4eb1bb[_0x4eb1bb['Solve']=0x5]='Solve',_0x4eb1bb[_0x4eb1bb[_0x581b78(0xcf)]=-0x1]=_0x581b78(0xcf),_0x4eb1bb))(_0x1ed302||{});const _0x2d94c3=_0x402031=>_0x4f4087[_0x581b78(0x8c)](new Date(+_0x402031))[_0x581b78(0xfb)](_0x581b78(0xae)),_0x40fbaa=async(_0x4c1fed,_0x5ca32f)=>{const _0x2f1dbf=_0x581b78,_0x55e035=_0x4c1fed['get'](_0x4f4087['UserManagerService']),_0x128830=_0x4c1fed[_0x2f1dbf(0xfc)](_0x59fb72[_0x2f1dbf(0x84)]);_0x5ca32f[_0x2f1dbf(0xe0)](_0x5a0853=>{const _0x3b28c7=_0x2f1dbf;_0x55e035[_0x3b28c7(0x85)](_0x5a0853)&&_0x5ca32f[_0x3b28c7(0xf6)](_0x5a0853);}),_0x5ca32f['size']&&(await _0x128830['get'](_0x2f1dbf(0x86),{'params':{'userIDs':[..._0x5ca32f]}}))[_0x2f1dbf(0xad)]['users']['forEach'](_0x499d88=>{const _0x29245f=_0x2f1dbf;_0x499d88&&_0x55e035[_0x29245f(0x9a)](_0x499d88);});};var _0x5a923e=Object['getOwnPropertyDescriptor'],_0x3d6b94=(_0x51067c,_0x448cc4,_0x259259,_0x23c018)=>{const _0x2168e1=_0x581b78;for(var _0x47237f=_0x23c018>0x1?void 0x0:_0x23c018?_0x5a923e(_0x448cc4,_0x259259):_0x448cc4,_0x1d0ecd=_0x51067c[_0x2168e1(0x9d)]-0x1,_0x2aaafe;_0x1d0ecd>=0x0;_0x1d0ecd--)(_0x2aaafe=_0x51067c[_0x1d0ecd])&&(_0x47237f=_0x2aaafe(_0x47237f)||_0x47237f);return _0x47237f;},_0x287783=(_0x15c4f8,_0x107b7f)=>(_0xd04612,_0x2a9d44)=>_0x107b7f(_0xd04612,_0x2a9d44,_0x15c4f8);let _0x22f493=class extends _0x4f4087[_0x581b78(0x104)]{constructor(_0x308ab1,_0x44e886,_0x473c97,_0x5bece3){const _0x2766c1=_0x581b78;super(),this[_0x2766c1(0xbe)]=_0x308ab1,this['_threadCommentModel']=_0x44e886,this[_0x2766c1(0x8f)]=_0x473c97,this[_0x2766c1(0xec)]=_0x5bece3,this[_0x2766c1(0x81)](),this[_0x2766c1(0xd1)]();}[_0x581b78(0xd1)](){const _0x3188b4=_0x581b78;this['disposeWithMe'](this['_threadCommentModel'][_0x3188b4(0x8d)][_0x3188b4(0xe3)](_0x3b81d3['bufferTime'](0x10))[_0x3188b4(0xa4)](_0x232e31=>{const _0x12523c=_0x3188b4,_0x4c2cb4=new Set();_0x232e31[_0x12523c(0xe0)](_0x4bf12c=>{const _0x516177=_0x12523c;switch(_0x4bf12c[_0x516177(0xf7)]){case _0x516177(0xf4):{const _0x4c8d5e=_0x4bf12c[_0x516177(0xa8)]['personId'];_0x4c2cb4['add'](_0x4c8d5e);break;}}}),_0x40fbaa(this['_injector'],_0x4c2cb4);}));}[_0x581b78(0x81)](){const _0x9824ca=_0x581b78;this[_0x9824ca(0xbf)](this[_0x9824ca(0xbe)][_0x9824ca(0x8d)][_0x9824ca(0xa4)](async _0x239342=>{const _0x1cc9e8=_0x9824ca;var _0x1a794c,_0x56a472,_0x4152af,_0x4a7764;const _0x4afacc=(_0x1a794c=this[_0x1cc9e8(0x109)][_0x1cc9e8(0xc4)](_0x239342[_0x1cc9e8(0xee)])['find'](_0x4150b7=>_0x4150b7[_0x1cc9e8(0xe2)]===_0x239342['threadId']))==null?void 0x0:_0x1a794c[_0x1cc9e8(0x8b)];if(!_0x4afacc)return;const {unitId:_0x3acfbb,subUnitId:_0x27e497}=_0x4afacc;switch(_0x239342[_0x1cc9e8(0x98)]&&this[_0x1cc9e8(0x8f)][_0x1cc9e8(0x9a)](_0x239342[_0x1cc9e8(0x98)]),_0x239342[_0x1cc9e8(0xf7)]){case _0x1ed302[_0x1cc9e8(0x94)]:break;case _0x1ed302[_0x1cc9e8(0xca)]:{this[_0x1cc9e8(0x109)][_0x1cc9e8(0xab)](_0x3acfbb,_0x27e497,{'unitId':_0x3acfbb,'subUnitId':_0x27e497,'ref':'','id':_0x239342[_0x1cc9e8(0xf0)],'dT':_0x2d94c3(+_0x239342[_0x1cc9e8(0xb9)]),'threadId':_0x239342[_0x1cc9e8(0xe2)],'personId':(_0x4152af=(_0x56a472=_0x239342[_0x1cc9e8(0x98)])==null?void 0x0:_0x56a472[_0x1cc9e8(0xf3)])!=null?_0x4152af:_0x239342[_0x1cc9e8(0xa7)],'text':JSON[_0x1cc9e8(0x9f)](_0x239342[_0x1cc9e8(0x95)]),'parentId':_0x4afacc['id']});break;}case _0x1ed302[_0x1cc9e8(0xc3)]:{const _0x3ce0b6=this[_0x1cc9e8(0x109)][_0x1cc9e8(0xb3)](_0x3acfbb,_0x27e497,_0x239342[_0x1cc9e8(0xf0)]);_0x3ce0b6&&_0x3ce0b6[_0x1cc9e8(0xda)]&&this[_0x1cc9e8(0x109)][_0x1cc9e8(0xed)](_0x3acfbb,_0x27e497,_0x239342[_0x1cc9e8(0xf0)]);break;}case _0x1ed302[_0x1cc9e8(0xe5)]:{this[_0x1cc9e8(0x109)][_0x1cc9e8(0xd7)](_0x3acfbb,_0x27e497,{'commentId':_0x239342[_0x1cc9e8(0xf0)],'text':JSON['parse'](_0x239342['content'])});break;}case _0x1ed302[_0x1cc9e8(0x102)]:{const _0x4a1fdf=(_0x4a7764=this[_0x1cc9e8(0x109)]['getUnit'](_0x239342[_0x1cc9e8(0xee)])[_0x1cc9e8(0x101)](_0x2a8927=>_0x2a8927['threadId']===_0x239342[_0x1cc9e8(0xe2)]))==null?void 0x0:_0x4a7764[_0x1cc9e8(0x8b)];_0x4a1fdf&&this[_0x1cc9e8(0x109)][_0x1cc9e8(0xe1)](_0x3acfbb,_0x27e497,_0x4a1fdf['id'],_0x239342[_0x1cc9e8(0xd8)]===_0x9044fa[_0x1cc9e8(0x105)]);break;}}}));}};_0x22f493=_0x3d6b94([_0x287783(0x0,_0x4f4087['Inject'](_0x204406[_0x581b78(0x9c)])),_0x287783(0x1,_0x4f4087[_0x581b78(0xb4)](_0x4f7dd7[_0x581b78(0x82)])),_0x287783(0x2,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xb2)])),_0x287783(0x3,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xac)]))],_0x22f493);const _0x2f83b2=_0x581b78(0xff),_0xc11060={};var _0x5c4351=Object[_0x581b78(0xf2)],_0x1c6188=(_0x174e50,_0xc8f1a2,_0x3250eb,_0x1d729b)=>{const _0x3f2084=_0x581b78;for(var _0x56937a=_0x1d729b>0x1?void 0x0:_0x1d729b?_0x5c4351(_0xc8f1a2,_0x3250eb):_0xc8f1a2,_0x545f19=_0x174e50[_0x3f2084(0x9d)]-0x1,_0x2940cf;_0x545f19>=0x0;_0x545f19--)(_0x2940cf=_0x174e50[_0x545f19])&&(_0x56937a=_0x2940cf(_0x56937a)||_0x56937a);return _0x56937a;},_0x5d68d6=(_0x30e0af,_0x4c4e02)=>(_0x2d25f0,_0x2e259e)=>_0x4c4e02(_0x2d25f0,_0x2e259e,_0x30e0af);function _0xba59a(_0xfe252d,_0x3fa700){const _0x3a9310=_0x581b78,_0xb83e92=_0xfe252d[_0x3a9310(0xc1)][0x0];return{..._0x3fa700,'id':_0xb83e92[_0x3a9310(0xf0)],'resolved':_0xfe252d[_0x3a9310(0xd8)]===0x1,'dT':_0x2d94c3(_0xb83e92['createTimestamp']),'personId':_0xb83e92['userId'],'threadId':_0xb83e92[_0x3a9310(0xe2)]};}function _0x47685c(_0x1cbdf9,_0x3ee1c8,_0x1ce733){const _0x165f3f=_0x581b78;var _0x5e8961,_0x52dcfa;if(((_0x52dcfa=(_0x5e8961=_0x1cbdf9==null?void 0x0:_0x1cbdf9[_0x165f3f(0xc1)])==null?void 0x0:_0x5e8961[_0x165f3f(0x9d)])!=null?_0x52dcfa:0x0)>0x0){const _0x1252eb=(_0x5be783,_0x7df660)=>({'id':_0x5be783[_0x165f3f(0xf0)],'threadId':_0x5be783[_0x165f3f(0xe2)],'dT':_0x2d94c3(_0x5be783['createTimestamp']),'personId':_0x5be783[_0x165f3f(0xa7)],'resolved':_0x1cbdf9[_0x165f3f(0xd8)]===_0x9044fa[_0x165f3f(0x105)],'unitId':_0x3ee1c8,'subUnitId':_0x1ce733,'text':JSON[_0x165f3f(0x9f)](_0x5be783[_0x165f3f(0x95)]),'parentId':_0x7df660}),_0x3780b4=_0x1252eb(_0x1cbdf9[_0x165f3f(0xc1)][0x0]);return{..._0x3780b4,'children':_0x1cbdf9[_0x165f3f(0xc1)][_0x165f3f(0xcd)](0x1)[_0x165f3f(0xea)](_0x4a9831=>_0x1252eb(_0x4a9831,_0x3780b4['id']))};}return null;}let _0x4753c4=class{constructor(_0x42fd30,_0x4df1a9,_0x3f60ae,_0x99fc79){const _0x1aed2d=_0x581b78;this[_0x1aed2d(0xfe)]=_0x42fd30,this[_0x1aed2d(0x8f)]=_0x4df1a9,this[_0x1aed2d(0xd2)]=_0x3f60ae,this[_0x1aed2d(0xec)]=_0x99fc79;}async['addComment'](_0x186140){const _0x67237f=_0x581b78;var _0x3520b1,_0x1ce282;const {parentId:_0x5790e7,unitId:_0x5896cc,text:_0x558e3a,threadId:_0x403967}=_0x186140,_0x107971=(_0x1ce282=(_0x3520b1=_0x558e3a[_0x67237f(0xc5)])==null?void 0x0:_0x3520b1['filter'](_0x55a556=>_0x55a556[_0x67237f(0x9e)]===_0x4f4087[_0x67237f(0xaf)][_0x67237f(0xb5)])[_0x67237f(0xea)](_0x3466bd=>_0x3466bd[_0x67237f(0x103)]))!=null?_0x1ce282:[],_0x382c13=JSON[_0x67237f(0xde)](_0x558e3a),_0xda2bd6=(await this[_0x67237f(0xd2)]['requireSession'](_0x5896cc))['getMemberID']();if(_0x5790e7){const _0x10847f={'memberId':_0xda2bd6,'unitId':_0x5896cc,'content':_0x382c13,'mention':_0x107971,'threadId':_0x403967},_0x5081b2=(await this[_0x67237f(0xfe)][_0x67237f(0xe8)]('/universer-api/comment/unit/'+_0x5896cc+_0x67237f(0xe6),{'body':_0x10847f}))[_0x67237f(0xad)][_0x67237f(0xdc)];return{..._0x186140,'id':_0x5081b2[_0x67237f(0xf0)],'dT':_0x4f4087[_0x67237f(0x8c)](+_0x5081b2[_0x67237f(0xb9)])[_0x67237f(0xfb)](_0x67237f(0xae)),'personId':_0x5081b2[_0x67237f(0xa7)]};}else{const _0x112095={'memberId':_0xda2bd6,'unitId':_0x5896cc,'content':_0x382c13,'mention':_0x107971},_0x12daaf=await this[_0x67237f(0xfe)][_0x67237f(0xe8)](_0x67237f(0xc0)+_0x5896cc+'/add',{'body':_0x112095});return _0xba59a(_0x12daaf[_0x67237f(0xad)]['comment'],_0x186140);}}async[_0x581b78(0xd7)](_0x317f3c){const _0x52422a=_0x581b78;var _0x74e413,_0x361eda;const {text:_0x207213,unitId:_0x47bd2b}=_0x317f3c,_0x5e7af5=(_0x361eda=(_0x74e413=_0x207213[_0x52422a(0xc5)])==null?void 0x0:_0x74e413[_0x52422a(0xf8)](_0x50a835=>_0x50a835[_0x52422a(0x9e)]===_0x4f4087[_0x52422a(0xaf)][_0x52422a(0xb5)])['map'](_0x144d92=>_0x144d92[_0x52422a(0x103)]))!=null?_0x361eda:[],_0xe9095d=JSON[_0x52422a(0xde)](_0x207213),_0x53aa63=_0x317f3c['threadId'],_0x18066b=_0x317f3c['id'],_0x2d358e={'memberId':(await this[_0x52422a(0xd2)][_0x52422a(0x90)](_0x47bd2b))['getMemberID'](),'unitId':_0x47bd2b,'threadId':_0x53aa63,'mention':_0x5e7af5,'content':_0xe9095d,'replyId':_0x18066b},_0x184fb0=await this[_0x52422a(0xfe)][_0x52422a(0xe8)](_0x52422a(0xc0)+_0x47bd2b+_0x52422a(0x87),{'body':_0x2d358e});return!_0x184fb0[_0x52422a(0xad)][_0x52422a(0xcc)]||_0x184fb0[_0x52422a(0xad)][_0x52422a(0xcc)]['code']===0x1;}async[_0x581b78(0xe1)](_0x15810b){const _0x51e5b9=_0x581b78,{unitId:_0x34933a}=_0x15810b,_0x43c87b=_0x15810b[_0x51e5b9(0xe2)],_0x1fd92a={'memberId':this[_0x51e5b9(0x8f)][_0x51e5b9(0xc2)]()[_0x51e5b9(0xf3)],'unitId':_0x34933a,'threadId':_0x43c87b,'solved':_0x15810b[_0x51e5b9(0x10a)]?_0x9044fa[_0x51e5b9(0x105)]:_0x9044fa['OpenOrReOpen']},_0x125496=await this[_0x51e5b9(0xfe)][_0x51e5b9(0xe8)](_0x51e5b9(0xc0)+_0x34933a+_0x51e5b9(0xdb),{'body':_0x1fd92a});return!_0x125496[_0x51e5b9(0xad)][_0x51e5b9(0xcc)]||_0x125496['body'][_0x51e5b9(0xcc)][_0x51e5b9(0xbb)]===0x1;}async['deleteComment'](_0x227cc9,_0x4ec769,_0x583a08,_0xf3666c){const _0x3025ca=_0x581b78,_0x33b539={'memberId':(await this[_0x3025ca(0xd2)]['requireSession'](_0x227cc9))[_0x3025ca(0xd5)](),'threadId':_0x583a08,'replyId':_0xf3666c,'unitId':_0x227cc9},_0x19dd6e=await this[_0x3025ca(0xfe)]['post'](_0x3025ca(0xc0)+_0x227cc9+_0x3025ca(0xa9),{'body':_0x33b539});return!_0x19dd6e[_0x3025ca(0xad)][_0x3025ca(0xcc)]||_0x19dd6e[_0x3025ca(0xad)][_0x3025ca(0xcc)]['code']===0x1;}async[_0x581b78(0xf5)](_0x5d860b,_0x24ab8c,_0x27f32d){const _0x4eb89a=_0x581b78,_0x2eea92={'unitId':_0x5d860b,'threadId':_0x27f32d},_0x4d6a5e=await this[_0x4eb89a(0xfe)][_0x4eb89a(0xe8)](_0x4eb89a(0xc0)+_0x5d860b+'/list',{'body':_0x2eea92}),_0x4eeb1e=_0x27f32d[_0x4eb89a(0xea)](_0x449d03=>_0x47685c(_0x4d6a5e[_0x4eb89a(0xad)][_0x4eb89a(0xb7)][_0x449d03],_0x5d860b,_0x24ab8c))['filter'](Boolean);return Object[_0x4eb89a(0x9b)](_0x4d6a5e[_0x4eb89a(0xad)][_0x4eb89a(0xe4)])[_0x4eb89a(0xe0)](_0x4e248e=>{const _0x486c6d=_0x4eb89a;this[_0x486c6d(0x8f)]['addUser'](_0x4e248e);}),_0x4eeb1e;}['saveCommentToSnapshot'](_0x29d082){const _0xd8975f=_0x581b78;return{'id':_0x29d082['id'],'threadId':_0x29d082[_0xd8975f(0xe2)],'ref':_0x29d082['ref']};}};_0x4753c4=_0x1c6188([_0x5d68d6(0x0,_0x4f4087[_0x581b78(0xb4)](_0x59fb72[_0x581b78(0x84)])),_0x5d68d6(0x1,_0x4f4087['Inject'](_0x4f4087[_0x581b78(0xb2)])),_0x5d68d6(0x2,_0x4f4087[_0x581b78(0xb4)](_0x204406[_0x581b78(0x80)])),_0x5d68d6(0x3,_0x4f4087['Inject'](_0x4f4087[_0x581b78(0xac)]))],_0x4753c4);var _0x2fe2a9=Object[_0x581b78(0xf2)],_0x3d84cf=(_0x146374,_0x4654fc,_0x3bbb00,_0x3c11e0)=>{const _0x354948=_0x581b78;for(var _0x373690=_0x3c11e0>0x1?void 0x0:_0x3c11e0?_0x2fe2a9(_0x4654fc,_0x3bbb00):_0x4654fc,_0x320836=_0x146374[_0x354948(0x9d)]-0x1,_0x35a185;_0x320836>=0x0;_0x320836--)(_0x35a185=_0x146374[_0x320836])&&(_0x373690=_0x35a185(_0x373690)||_0x373690);return _0x373690;},_0x1edeac=(_0x176206,_0x18102e)=>(_0x468cfd,_0x1e9254)=>_0x18102e(_0x468cfd,_0x1e9254,_0x176206);let _0x3e993a=class extends _0x4f4087[_0x581b78(0x104)]{constructor(_0x7cf27,_0x5f5d3a){const _0x513b8c=_0x581b78;super(),this[_0x513b8c(0xc8)]=_0x7cf27,this[_0x513b8c(0xd4)]=_0x5f5d3a,this[_0x513b8c(0xfd)]();}[_0x581b78(0xfd)](){const _0x251a91=_0x581b78;this[_0x251a91(0xc8)][_0x251a91(0xdf)]=this[_0x251a91(0xd4)],this[_0x251a91(0xc8)][_0x251a91(0xd9)]=!0x1;}};_0x3e993a=_0x3d84cf([_0x1edeac(0x0,_0x4f7dd7[_0x581b78(0x83)]),_0x1edeac(0x1,_0x4f4087['Inject'](_0x4753c4))],_0x3e993a);var _0x13e078=Object[_0x581b78(0x97)],_0xea4399=Object[_0x581b78(0xf2)],_0x593bcf=(_0x45382b,_0x315abd,_0x421c20)=>_0x315abd in _0x45382b?_0x13e078(_0x45382b,_0x315abd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x421c20}):_0x45382b[_0x315abd]=_0x421c20,_0x4182c7=(_0x135b9c,_0xc385b7,_0x3aa74f,_0x1bc5fb)=>{const _0x496e09=_0x581b78;for(var _0x142880=_0x1bc5fb>0x1?void 0x0:_0x1bc5fb?_0xea4399(_0xc385b7,_0x3aa74f):_0xc385b7,_0x1b5533=_0x135b9c[_0x496e09(0x9d)]-0x1,_0x258869;_0x1b5533>=0x0;_0x1b5533--)(_0x258869=_0x135b9c[_0x1b5533])&&(_0x142880=_0x258869(_0x142880)||_0x142880);return _0x142880;},_0x235afc=(_0x1051c3,_0x1a817e)=>(_0x50ba9c,_0x3dc9e8)=>_0x1a817e(_0x50ba9c,_0x3dc9e8,_0x1051c3),_0x18a529=(_0x226f6a,_0x20d845,_0x100b70)=>_0x593bcf(_0x226f6a,typeof _0x20d845!=_0x581b78(0xb0)?_0x20d845+'':_0x20d845,_0x100b70);_0x2ea72a[_0x581b78(0xeb)]=class extends _0x4f4087[_0x581b78(0xe7)]{constructor(_0x3ac8d8=_0xc11060,_0x48eb21,_0x565864){const _0x1a5a44=_0x581b78;super(),this['_config']=_0x3ac8d8,this[_0x1a5a44(0xec)]=_0x48eb21,this[_0x1a5a44(0xce)]=_0x565864;const {..._0x28e738}=_0x4f4087[_0x1a5a44(0xa5)]({},_0xc11060,this[_0x1a5a44(0x91)]);this[_0x1a5a44(0xce)][_0x1a5a44(0xc6)](_0x2f83b2,_0x28e738);}[_0x581b78(0xa1)](){const _0x4a7be2=_0x581b78;[[_0x4753c4],[_0x3e993a],[_0x22f493]][_0x4a7be2(0xe0)](_0x3fc8ff=>{const _0x1ca3c9=_0x4a7be2;this['_injector'][_0x1ca3c9(0xf4)](_0x3fc8ff);});}[_0x581b78(0x107)](){const _0x45cfe2=_0x581b78;this[_0x45cfe2(0xec)][_0x45cfe2(0xfc)](_0x3e993a),this[_0x45cfe2(0xec)][_0x45cfe2(0xfc)](_0x22f493);}},_0x18a529(_0x2ea72a[_0x581b78(0xeb)],_0x581b78(0xbd),_0x1d6925),_0x18a529(_0x2ea72a[_0x581b78(0xeb)],_0x581b78(0xf7),_0x4f4087[_0x581b78(0xc9)][_0x581b78(0x8a)]),_0x2ea72a[_0x581b78(0xeb)]=_0x4182c7([_0x4f4087['DependentOn'](_0x343015[_0x581b78(0xa0)],_0x204406[_0x581b78(0x8e)],_0x44fff7[_0x581b78(0xcb)]),_0x235afc(0x1,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xac)])),_0x235afc(0x2,_0x4f4087[_0x581b78(0x106)])],_0x2ea72a['UniverThreadCommentDataSourcePlugin']),Object[_0x581b78(0x97)](_0x2ea72a,Symbol[_0x581b78(0x96)],{'value':_0x581b78(0xc7)});}));
|
|
1
|
+
function _0x1c56(_0xb60acd,_0x23a4d9){const _0x51f21c=_0x51f2();return _0x1c56=function(_0x1c56c6,_0x363ee4){_0x1c56c6=_0x1c56c6-0x1ed;let _0x32823f=_0x51f21c[_0x1c56c6];return _0x32823f;},_0x1c56(_0xb60acd,_0x23a4d9);}(function(_0x55f684,_0x250cc7){const _0x14c606=_0x1c56,_0x4bc584=_0x55f684();while(!![]){try{const _0x2995af=parseInt(_0x14c606(0x231))/0x1+parseInt(_0x14c606(0x25f))/0x2*(parseInt(_0x14c606(0x21a))/0x3)+-parseInt(_0x14c606(0x1f3))/0x4+-parseInt(_0x14c606(0x239))/0x5*(-parseInt(_0x14c606(0x21d))/0x6)+-parseInt(_0x14c606(0x271))/0x7*(-parseInt(_0x14c606(0x1f1))/0x8)+parseInt(_0x14c606(0x24a))/0x9+-parseInt(_0x14c606(0x223))/0xa;if(_0x2995af===_0x250cc7)break;else _0x4bc584['push'](_0x4bc584['shift']());}catch(_0x205c7c){_0x4bc584['push'](_0x4bc584['shift']());}}}(_0x51f2,0xda4c4),function(_0x5ebf6a,_0x13b6fa){const _0x477373=_0x1c56;typeof exports==_0x477373(0x254)&&typeof module<'u'?_0x13b6fa(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x477373(0x1ef)&&define[_0x477373(0x249)]?define([_0x477373(0x206),_0x477373(0x26e),_0x477373(0x267),_0x477373(0x23b),_0x477373(0x262),_0x477373(0x260),_0x477373(0x226),_0x477373(0x1f6)],_0x13b6fa):(_0x5ebf6a=typeof globalThis<'u'?globalThis:_0x5ebf6a||self,_0x13b6fa(_0x5ebf6a[_0x477373(0x203)]={},_0x5ebf6a[_0x477373(0x246)],_0x5ebf6a[_0x477373(0x22c)],_0x5ebf6a[_0x477373(0x228)],_0x5ebf6a[_0x477373(0x259)],_0x5ebf6a[_0x477373(0x261)],_0x5ebf6a['rxjs'],_0x5ebf6a[_0x477373(0x1ed)]));}(this,function(_0x58e40f,_0x253f33,_0x56fca4,_0x29a18a,_0x3d01da,_0x50c82a,_0xe78ad1,_0x23203e){'use strict';const _0x70546f=_0x1c56;const _0x1b26ec=_0x70546f(0x22a);var _0x29a17e=(_0x4079b7=>(_0x4079b7[_0x4079b7[_0x70546f(0x216)]=0x0]=_0x70546f(0x216),_0x4079b7[_0x4079b7['Solved']=0x1]='Solved',_0x4079b7[_0x4079b7[_0x70546f(0x25a)]=-0x1]=_0x70546f(0x25a),_0x4079b7))(_0x29a17e||{}),_0x2058ee=(_0x161a12=>(_0x161a12[_0x161a12[_0x70546f(0x20f)]=0x0]=_0x70546f(0x20f),_0x161a12[_0x161a12[_0x70546f(0x208)]=0x1]=_0x70546f(0x208),_0x161a12[_0x161a12[_0x70546f(0x202)]=0x2]=_0x70546f(0x202),_0x161a12[_0x161a12[_0x70546f(0x23d)]=0x3]='Edit',_0x161a12[_0x161a12[_0x70546f(0x235)]=0x4]='Delete',_0x161a12[_0x161a12['Solve']=0x5]='Solve',_0x161a12[_0x161a12['UNRECOGNIZED']=-0x1]=_0x70546f(0x25a),_0x161a12))(_0x2058ee||{});const _0x2f4206=_0x159d35=>_0x29a18a[_0x70546f(0x20d)](new Date(+_0x159d35))['format']('YYYY/MM/DD\x20HH:mm'),_0x21c623=async(_0x28606f,_0xb5a79)=>{const _0x2cb490=_0x70546f,_0x7ee328=_0x28606f[_0x2cb490(0x21f)](_0x29a18a[_0x2cb490(0x25d)]),_0x2b63af=_0x28606f[_0x2cb490(0x21f)](_0x23203e['HTTPService']);_0xb5a79[_0x2cb490(0x273)](_0x4861ba=>{const _0xf7d609=_0x2cb490;_0x7ee328['getUser'](_0x4861ba)&&_0xb5a79[_0xf7d609(0x1f7)](_0x4861ba);}),_0xb5a79['size']&&(await _0x2b63af[_0x2cb490(0x21f)](_0x2cb490(0x224),{'params':{'userIDs':[..._0xb5a79]}}))[_0x2cb490(0x240)][_0x2cb490(0x274)]['forEach'](_0xd1e45b=>{_0xd1e45b&&_0x7ee328['addUser'](_0xd1e45b);});};var _0x3d673f=Object[_0x70546f(0x1f2)],_0x34347b=(_0x3b7a47,_0x404c78,_0x568d9e,_0x8f0251)=>{const _0x57425d=_0x70546f;for(var _0x35e35b=_0x8f0251>0x1?void 0x0:_0x8f0251?_0x3d673f(_0x404c78,_0x568d9e):_0x404c78,_0x44544a=_0x3b7a47[_0x57425d(0x25c)]-0x1,_0x123586;_0x44544a>=0x0;_0x44544a--)(_0x123586=_0x3b7a47[_0x44544a])&&(_0x35e35b=_0x123586(_0x35e35b)||_0x35e35b);return _0x35e35b;},_0x3bb791=(_0x92f1b5,_0x47457f)=>(_0x256526,_0x56ee19)=>_0x47457f(_0x256526,_0x56ee19,_0x92f1b5);let _0x5d4f28=class extends _0x29a18a[_0x70546f(0x247)]{constructor(_0x4811e7,_0x486e46,_0x1b5ed3,_0x141da8){const _0x2ea97c=_0x70546f;super(),this['_commentService']=_0x4811e7,this[_0x2ea97c(0x229)]=_0x486e46,this[_0x2ea97c(0x230)]=_0x1b5ed3,this[_0x2ea97c(0x265)]=_0x141da8,this[_0x2ea97c(0x269)](),this[_0x2ea97c(0x22d)]();}[_0x70546f(0x22d)](){const _0x3e9cec=_0x70546f;this['disposeWithMe'](this['_threadCommentModel'][_0x3e9cec(0x220)]['pipe'](_0xe78ad1[_0x3e9cec(0x209)](0x10))[_0x3e9cec(0x241)](_0x57e2c2=>{const _0x1686a1=_0x3e9cec,_0x3e024a=new Set();_0x57e2c2[_0x1686a1(0x273)](_0x5c3cda=>{const _0x43cd9d=_0x1686a1;switch(_0x5c3cda[_0x43cd9d(0x25b)]){case'add':{const _0x5a6b31=_0x5c3cda[_0x43cd9d(0x243)][_0x43cd9d(0x244)];_0x3e024a['add'](_0x5a6b31);break;}}}),_0x21c623(this[_0x1686a1(0x265)],_0x3e024a);}));}[_0x70546f(0x269)](){const _0x529fb6=_0x70546f;this[_0x529fb6(0x23a)](this[_0x529fb6(0x201)][_0x529fb6(0x220)][_0x529fb6(0x241)](async _0x3bba64=>{const _0x218770=_0x529fb6;var _0x14bdd9,_0x44fa89,_0x218037,_0x32a718;const _0x1efb30=(_0x14bdd9=this[_0x218770(0x229)][_0x218770(0x217)](_0x3bba64[_0x218770(0x210)])[_0x218770(0x250)](_0x1e7b3b=>_0x1e7b3b[_0x218770(0x24e)]===_0x3bba64[_0x218770(0x24e)]))==null?void 0x0:_0x14bdd9[_0x218770(0x225)];if(!_0x1efb30)return;const {unitId:_0x1a02b8,subUnitId:_0x2c70c3}=_0x1efb30;switch(_0x3bba64['user']&&this[_0x218770(0x230)]['addUser'](_0x3bba64[_0x218770(0x1fc)]),_0x3bba64[_0x218770(0x25b)]){case _0x2058ee[_0x218770(0x208)]:break;case _0x2058ee['Reply']:{this[_0x218770(0x229)][_0x218770(0x242)](_0x1a02b8,_0x2c70c3,{'unitId':_0x1a02b8,'subUnitId':_0x2c70c3,'ref':'','id':_0x3bba64[_0x218770(0x253)],'dT':_0x2f4206(+_0x3bba64[_0x218770(0x251)]),'threadId':_0x3bba64[_0x218770(0x24e)],'personId':(_0x218037=(_0x44fa89=_0x3bba64[_0x218770(0x1fc)])==null?void 0x0:_0x44fa89[_0x218770(0x1fa)])!=null?_0x218037:_0x3bba64['userId'],'text':JSON['parse'](_0x3bba64[_0x218770(0x22e)]),'parentId':_0x1efb30['id']});break;}case _0x2058ee[_0x218770(0x235)]:{const _0x2a8cd8=this[_0x218770(0x229)][_0x218770(0x24c)](_0x1a02b8,_0x2c70c3,_0x3bba64[_0x218770(0x253)]);_0x2a8cd8&&_0x2a8cd8[_0x218770(0x255)]&&this[_0x218770(0x229)][_0x218770(0x214)](_0x1a02b8,_0x2c70c3,_0x3bba64[_0x218770(0x253)]);break;}case _0x2058ee[_0x218770(0x23d)]:{this[_0x218770(0x229)][_0x218770(0x268)](_0x1a02b8,_0x2c70c3,{'commentId':_0x3bba64['replyId'],'text':JSON[_0x218770(0x237)](_0x3bba64[_0x218770(0x22e)])});break;}case _0x2058ee[_0x218770(0x215)]:{const _0x12983c=(_0x32a718=this['_threadCommentModel'][_0x218770(0x217)](_0x3bba64[_0x218770(0x210)])[_0x218770(0x250)](_0x48ac84=>_0x48ac84[_0x218770(0x24e)]===_0x3bba64[_0x218770(0x24e)]))==null?void 0x0:_0x32a718[_0x218770(0x225)];_0x12983c&&this[_0x218770(0x229)][_0x218770(0x20c)](_0x1a02b8,_0x2c70c3,_0x12983c['id'],_0x3bba64['solved']===_0x29a17e['Solved']);break;}}}));}};_0x5d4f28=_0x34347b([_0x3bb791(0x0,_0x29a18a['Inject'](_0x253f33['CommentService'])),_0x3bb791(0x1,_0x29a18a['Inject'](_0x50c82a[_0x70546f(0x205)])),_0x3bb791(0x2,_0x29a18a[_0x70546f(0x26f)](_0x29a18a['UserManagerService'])),_0x3bb791(0x3,_0x29a18a[_0x70546f(0x26f)](_0x29a18a[_0x70546f(0x211)]))],_0x5d4f28);const _0x359845=_0x70546f(0x222),_0x1f309e={};var _0xd35d24=Object['getOwnPropertyDescriptor'],_0xbb23d9=(_0x550acb,_0x14dbda,_0x25a178,_0x310b6a)=>{const _0x450385=_0x70546f;for(var _0x1d10b4=_0x310b6a>0x1?void 0x0:_0x310b6a?_0xd35d24(_0x14dbda,_0x25a178):_0x14dbda,_0xe18f58=_0x550acb[_0x450385(0x25c)]-0x1,_0x3d935d;_0xe18f58>=0x0;_0xe18f58--)(_0x3d935d=_0x550acb[_0xe18f58])&&(_0x1d10b4=_0x3d935d(_0x1d10b4)||_0x1d10b4);return _0x1d10b4;},_0x3d80cf=(_0x1b1266,_0x497f0b)=>(_0x48b392,_0xb56b89)=>_0x497f0b(_0x48b392,_0xb56b89,_0x1b1266);function _0x614462(_0x3f97e7,_0x47c308){const _0x590615=_0x70546f,_0x4d85dd=_0x3f97e7[_0x590615(0x207)][0x0];return{..._0x47c308,'id':_0x4d85dd[_0x590615(0x253)],'resolved':_0x3f97e7['solved']===0x1,'dT':_0x2f4206(_0x4d85dd[_0x590615(0x251)]),'personId':_0x4d85dd[_0x590615(0x24d)],'threadId':_0x4d85dd['threadId']};}function _0x3eddeb(_0x574a28,_0x80919a,_0x483e50){const _0x62f3c3=_0x70546f;var _0x10a4c8,_0x2b6c1e;if(((_0x2b6c1e=(_0x10a4c8=_0x574a28==null?void 0x0:_0x574a28['replies'])==null?void 0x0:_0x10a4c8[_0x62f3c3(0x25c)])!=null?_0x2b6c1e:0x0)>0x0){const _0x351a2a=(_0x27d738,_0x45a97b)=>({'id':_0x27d738['replyId'],'threadId':_0x27d738[_0x62f3c3(0x24e)],'dT':_0x2f4206(_0x27d738[_0x62f3c3(0x251)]),'personId':_0x27d738[_0x62f3c3(0x24d)],'resolved':_0x574a28['solved']===_0x29a17e[_0x62f3c3(0x221)],'unitId':_0x80919a,'subUnitId':_0x483e50,'text':JSON[_0x62f3c3(0x237)](_0x27d738[_0x62f3c3(0x22e)]),'parentId':_0x45a97b}),_0xaad4f7=_0x351a2a(_0x574a28[_0x62f3c3(0x207)][0x0]);return{..._0xaad4f7,'children':_0x574a28['replies']['slice'](0x1)[_0x62f3c3(0x257)](_0x1edda6=>_0x351a2a(_0x1edda6,_0xaad4f7['id']))};}return null;}let _0x4b0013=class{constructor(_0x2fe8e6,_0x4de0bb,_0x511d0b,_0x2622b9){const _0x4e55b4=_0x70546f;this[_0x4e55b4(0x232)]=_0x2fe8e6,this[_0x4e55b4(0x230)]=_0x4de0bb,this[_0x4e55b4(0x227)]=_0x511d0b,this[_0x4e55b4(0x265)]=_0x2622b9;}async[_0x70546f(0x242)](_0xebacac){const _0x10d300=_0x70546f;var _0x1559c0,_0x58f110;const {parentId:_0x360ee1,unitId:_0x34d002,text:_0x1b7a1d,threadId:_0x26849c}=_0xebacac,_0x58df20=(_0x58f110=(_0x1559c0=_0x1b7a1d[_0x10d300(0x258)])==null?void 0x0:_0x1559c0[_0x10d300(0x25e)](_0x15e057=>_0x15e057[_0x10d300(0x26a)]===_0x29a18a[_0x10d300(0x204)][_0x10d300(0x1f9)])[_0x10d300(0x257)](_0x58c9b8=>_0x58c9b8[_0x10d300(0x23e)]))!=null?_0x58f110:[],_0x33d4cf=JSON['stringify'](_0x1b7a1d),_0x22cde7=(await this[_0x10d300(0x227)][_0x10d300(0x212)](_0x34d002))['getMemberID']();if(_0x360ee1){const _0x4bde4d={'memberId':_0x22cde7,'unitId':_0x34d002,'content':_0x33d4cf,'mention':_0x58df20,'threadId':_0x26849c},_0x141f90=(await this[_0x10d300(0x232)][_0x10d300(0x234)](_0x10d300(0x1ff)+_0x34d002+_0x10d300(0x1fe),{'body':_0x4bde4d}))[_0x10d300(0x240)][_0x10d300(0x270)];return{..._0xebacac,'id':_0x141f90[_0x10d300(0x253)],'dT':_0x29a18a['dayjs'](+_0x141f90[_0x10d300(0x251)])[_0x10d300(0x1f4)](_0x10d300(0x213)),'personId':_0x141f90['userId']};}else{const _0x4b98f8={'memberId':_0x22cde7,'unitId':_0x34d002,'content':_0x33d4cf,'mention':_0x58df20},_0xacb72f=await this['_httpService'][_0x10d300(0x234)]('/universer-api/comment/unit/'+_0x34d002+_0x10d300(0x23c),{'body':_0x4b98f8});return _0x614462(_0xacb72f[_0x10d300(0x240)][_0x10d300(0x26b)],_0xebacac);}}async[_0x70546f(0x268)](_0x145f98){const _0x22d588=_0x70546f;var _0x1187f4,_0x5e6ce3;const {text:_0x2beca9,unitId:_0x562e2b}=_0x145f98,_0x5ba785=(_0x5e6ce3=(_0x1187f4=_0x2beca9['customRanges'])==null?void 0x0:_0x1187f4[_0x22d588(0x25e)](_0x3685ce=>_0x3685ce['rangeType']===_0x29a18a[_0x22d588(0x204)][_0x22d588(0x1f9)])['map'](_0x199416=>_0x199416[_0x22d588(0x23e)]))!=null?_0x5e6ce3:[],_0x97ef63=JSON[_0x22d588(0x26d)](_0x2beca9),_0x4c447d=_0x145f98[_0x22d588(0x24e)],_0x276fa7=_0x145f98['id'],_0x157f4b={'memberId':(await this['_sessionService'][_0x22d588(0x212)](_0x562e2b))[_0x22d588(0x21b)](),'unitId':_0x562e2b,'threadId':_0x4c447d,'mention':_0x5ba785,'content':_0x97ef63,'replyId':_0x276fa7},_0x471483=await this[_0x22d588(0x232)][_0x22d588(0x234)](_0x22d588(0x1ff)+_0x562e2b+_0x22d588(0x248),{'body':_0x157f4b});return!_0x471483[_0x22d588(0x240)][_0x22d588(0x233)]||_0x471483[_0x22d588(0x240)][_0x22d588(0x233)][_0x22d588(0x245)]===0x1;}async['resolveComment'](_0x37337b){const _0x2efe7f=_0x70546f,{unitId:_0x16f0b9}=_0x37337b,_0x43357c=_0x37337b[_0x2efe7f(0x24e)],_0x3b132e={'memberId':this['_userService'][_0x2efe7f(0x263)]()[_0x2efe7f(0x1fa)],'unitId':_0x16f0b9,'threadId':_0x43357c,'solved':_0x37337b[_0x2efe7f(0x23f)]?_0x29a17e[_0x2efe7f(0x221)]:_0x29a17e[_0x2efe7f(0x216)]},_0x2c132d=await this['_httpService']['post'](_0x2efe7f(0x1ff)+_0x16f0b9+_0x2efe7f(0x236),{'body':_0x3b132e});return!_0x2c132d[_0x2efe7f(0x240)][_0x2efe7f(0x233)]||_0x2c132d[_0x2efe7f(0x240)][_0x2efe7f(0x233)][_0x2efe7f(0x245)]===0x1;}async['deleteComment'](_0x3fd4cc,_0x65fe21,_0x6790f5,_0x2f9ca0){const _0x5c6722=_0x70546f,_0x56e6d8={'memberId':(await this['_sessionService'][_0x5c6722(0x212)](_0x3fd4cc))['getMemberID'](),'threadId':_0x6790f5,'replyId':_0x2f9ca0,'unitId':_0x3fd4cc},_0x505a39=await this[_0x5c6722(0x232)][_0x5c6722(0x234)]('/universer-api/comment/unit/'+_0x3fd4cc+'/delete',{'body':_0x56e6d8});return!_0x505a39[_0x5c6722(0x240)]['error']||_0x505a39['body']['error'][_0x5c6722(0x245)]===0x1;}async[_0x70546f(0x24b)](_0x3d690e,_0x396c81,_0x25b196){const _0x36b28b=_0x70546f,_0x132a6f={'unitId':_0x3d690e,'threadId':_0x25b196},_0x4f74a4=await this[_0x36b28b(0x232)][_0x36b28b(0x234)](_0x36b28b(0x1ff)+_0x3d690e+_0x36b28b(0x1ee),{'body':_0x132a6f}),_0x102f8d=_0x25b196[_0x36b28b(0x257)](_0x3ae696=>_0x3eddeb(_0x4f74a4[_0x36b28b(0x240)]['comments'][_0x3ae696],_0x3d690e,_0x396c81))[_0x36b28b(0x25e)](Boolean);return Object['values'](_0x4f74a4[_0x36b28b(0x240)][_0x36b28b(0x274)])['forEach'](_0x293e50=>{const _0x3837e9=_0x36b28b;this[_0x3837e9(0x230)][_0x3837e9(0x21e)](_0x293e50);}),_0x102f8d;}[_0x70546f(0x24f)](_0x396432){return{'id':_0x396432['id'],'threadId':_0x396432['threadId'],'ref':_0x396432['ref']};}};_0x4b0013=_0xbb23d9([_0x3d80cf(0x0,_0x29a18a['Inject'](_0x23203e['HTTPService'])),_0x3d80cf(0x1,_0x29a18a['Inject'](_0x29a18a[_0x70546f(0x25d)])),_0x3d80cf(0x2,_0x29a18a[_0x70546f(0x26f)](_0x253f33['CollaborationSessionService'])),_0x3d80cf(0x3,_0x29a18a['Inject'](_0x29a18a[_0x70546f(0x211)]))],_0x4b0013);var _0x5da8c2=Object['getOwnPropertyDescriptor'],_0x5e56c0=(_0x2639ac,_0x1287ac,_0x378c2b,_0x17dbe1)=>{const _0x3edb6b=_0x70546f;for(var _0x5cf8b9=_0x17dbe1>0x1?void 0x0:_0x17dbe1?_0x5da8c2(_0x1287ac,_0x378c2b):_0x1287ac,_0xbb7e80=_0x2639ac[_0x3edb6b(0x25c)]-0x1,_0x17ef2b;_0xbb7e80>=0x0;_0xbb7e80--)(_0x17ef2b=_0x2639ac[_0xbb7e80])&&(_0x5cf8b9=_0x17ef2b(_0x5cf8b9)||_0x5cf8b9);return _0x5cf8b9;},_0x380511=(_0x3bef27,_0x5bbade)=>(_0x1306b1,_0x2df345)=>_0x5bbade(_0x1306b1,_0x2df345,_0x3bef27);let _0x13fe19=class extends _0x29a18a[_0x70546f(0x247)]{constructor(_0x3ce0b1,_0x34b8ff){const _0x499ec2=_0x70546f;super(),this['_threadCommentDataSourceService']=_0x3ce0b1,this[_0x499ec2(0x256)]=_0x34b8ff,this['_initDataSource']();}['_initDataSource'](){const _0xc879b1=_0x70546f;this[_0xc879b1(0x252)][_0xc879b1(0x219)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x13fe19=_0x5e56c0([_0x380511(0x0,_0x50c82a['IThreadCommentDataSourceService']),_0x380511(0x1,_0x29a18a['Inject'](_0x4b0013))],_0x13fe19);var _0x589cbd=Object[_0x70546f(0x22b)],_0x1c89a2=Object[_0x70546f(0x1f2)],_0x1c0045=(_0x450bd1,_0xbaded4,_0x44a5f3)=>_0xbaded4 in _0x450bd1?_0x589cbd(_0x450bd1,_0xbaded4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44a5f3}):_0x450bd1[_0xbaded4]=_0x44a5f3,_0x3e7915=(_0x3dc8ae,_0x1963ba,_0x33bc16,_0x4646ce)=>{const _0x440ad8=_0x70546f;for(var _0x14b353=_0x4646ce>0x1?void 0x0:_0x4646ce?_0x1c89a2(_0x1963ba,_0x33bc16):_0x1963ba,_0x3ce576=_0x3dc8ae[_0x440ad8(0x25c)]-0x1,_0x5f3d4a;_0x3ce576>=0x0;_0x3ce576--)(_0x5f3d4a=_0x3dc8ae[_0x3ce576])&&(_0x14b353=_0x5f3d4a(_0x14b353)||_0x14b353);return _0x14b353;},_0x251860=(_0x4edc21,_0x4c2cad)=>(_0x2b58e3,_0x5d92d4)=>_0x4c2cad(_0x2b58e3,_0x5d92d4,_0x4edc21),_0x1eef0e=(_0x2991aa,_0x287f2a,_0x1ccf12)=>_0x1c0045(_0x2991aa,typeof _0x287f2a!=_0x70546f(0x21c)?_0x287f2a+'':_0x287f2a,_0x1ccf12);_0x58e40f[_0x70546f(0x272)]=class extends _0x29a18a[_0x70546f(0x200)]{constructor(_0x44e2ea=_0x1f309e,_0x75c264,_0x4df176){const _0x1a6ba6=_0x70546f;super(),this['_config']=_0x44e2ea,this[_0x1a6ba6(0x265)]=_0x75c264,this[_0x1a6ba6(0x1fd)]=_0x4df176;const {..._0x27b0d2}=_0x29a18a[_0x1a6ba6(0x218)]({},_0x1f309e,this[_0x1a6ba6(0x1f5)]);this['_configService']['setConfig'](_0x359845,_0x27b0d2);}[_0x70546f(0x264)](){[[_0x4b0013],[_0x13fe19],[_0x5d4f28]]['forEach'](_0x3e4767=>{const _0x25fafc=_0x1c56;this['_injector'][_0x25fafc(0x1f8)](_0x3e4767);});}[_0x70546f(0x26c)](){const _0x58801e=_0x70546f;this[_0x58801e(0x265)][_0x58801e(0x21f)](_0x13fe19),this[_0x58801e(0x265)][_0x58801e(0x21f)](_0x5d4f28);}},_0x1eef0e(_0x58e40f[_0x70546f(0x272)],_0x70546f(0x20b),_0x1b26ec),_0x1eef0e(_0x58e40f[_0x70546f(0x272)],'type',_0x29a18a['UniverInstanceType'][_0x70546f(0x1fb)]),_0x58e40f[_0x70546f(0x272)]=_0x3e7915([_0x29a18a[_0x70546f(0x20a)](_0x3d01da[_0x70546f(0x20e)],_0x253f33[_0x70546f(0x238)],_0x56fca4[_0x70546f(0x22f)]),_0x251860(0x1,_0x29a18a[_0x70546f(0x26f)](_0x29a18a['Injector'])),_0x251860(0x2,_0x29a18a[_0x70546f(0x266)])],_0x58e40f[_0x70546f(0x272)]),Object['defineProperty'](_0x58e40f,Symbol['toStringTag'],{'value':_0x70546f(0x1f0)});}));function _0x51f2(){const _0x472b21=['onReady','stringify','@univerjs-pro/collaboration-client','Inject','reply','7QkyFjL','UniverThreadCommentDataSourcePlugin','forEach','users','UniverNetwork','/list','function','Module','460936exMECp','getOwnPropertyDescriptor','1326736GcCDvR','format','_config','@univerjs/network','delete','add','COMMENT','userID','UNIVER_UNKNOWN','user','_configService','/reply','/universer-api/comment/unit/','Plugin','_commentService','Reply','UniverProThreadCommentDatasource','CustomRangeType','ThreadCommentModel','exports','replies','Add','bufferTime','DependentOn','pluginName','resolveComment','dayjs','UniverThreadCommentUIPlugin','Unknown','unitId','Injector','requireSession','YYYY/MM/DD\x20HH:mm','deleteComment','Solve','OpenOrReOpen','getUnit','merge','dataSource','6zVzcWj','getMemberID','symbol','7338SmgYXD','addUser','get','commentUpdate$','Solved','thread-comment-data-source.config','20593140NcgutU','/universer-api/user/list','root','rxjs','_sessionService','UniverCore','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','UniverProLicense','_initUserSync','content','UniverLicensePlugin','_userService','503052icLdTM','_httpService','error','post','Delete','/solved','parse','UniverCollaborationClientPlugin','1310QkKyrE','disposeWithMe','@univerjs/core','/add','Edit','rangeId','resolved','body','subscribe','addComment','payload','personId','code','UniverProCollaborationClient','Disposable','/edit','amd','8925021aphSWV','listComments','getComment','userId','threadId','saveCommentToSnapshot','find','createTimestamp','_threadCommentDataSourceService','replyId','object','parentId','_threadCommentDataSource','map','customRanges','UniverThreadCommentUi','UNRECOGNIZED','type','length','UserManagerService','filter','1412382yFdNat','@univerjs/thread-comment','UniverThreadComment','@univerjs/thread-comment-ui','getCurrentUser','onStarting','_injector','IConfigService','@univerjs-pro/license','updateComment','_init','rangeType','comment'];_0x51f2=function(){return _0x472b21;};return _0x51f2();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.2-nightly.
|
|
3
|
+
"version": "0.9.2-nightly.202507161608",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs-pro/
|
|
50
|
-
"@univerjs/core": "0.9.2-nightly.202507141607",
|
|
51
|
-
"@univerjs/network": "0.9.2-nightly.202507141607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.2-nightly.202507161608",
|
|
49
|
+
"@univerjs-pro/license": "0.9.2-nightly.202507161608",
|
|
52
50
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.9.2-nightly.
|
|
54
|
-
"@univerjs/
|
|
51
|
+
"@univerjs/thread-comment": "0.9.2-nightly.202507161608",
|
|
52
|
+
"@univerjs/core": "0.9.2-nightly.202507161608",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.9.2-nightly.202507161608",
|
|
54
|
+
"@univerjs/network": "0.9.2-nightly.202507161608"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|