@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202504301607 → 0.7.0-nightly.202505021607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x14cdcb=_0x8c22;(function(_0x45f6b5,_0x2d1f20){const _0xf35e4a=_0x8c22,_0x102d0d=_0x45f6b5();while(!![]){try{const _0x5baac1=-parseInt(_0xf35e4a(0xd7))/0x1+-parseInt(_0xf35e4a(0xf9))/0x2+-parseInt(_0xf35e4a(0xee))/0x3*(parseInt(_0xf35e4a(0xca))/0x4)+-parseInt(_0xf35e4a(0xc2))/0x5*(parseInt(_0xf35e4a(0x111))/0x6)+parseInt(_0xf35e4a(0xac))/0x7*(-parseInt(_0xf35e4a(0xb6))/0x8)+parseInt(_0xf35e4a(0xfa))/0x9+parseInt(_0xf35e4a(0x103))/0xa*(parseInt(_0xf35e4a(0xad))/0xb);if(_0x5baac1===_0x2d1f20)break;else _0x102d0d['push'](_0x102d0d['shift']());}catch(_0x2039c8){_0x102d0d['push'](_0x102d0d['shift']());}}}(_0x510f,0x19e32));Object['defineProperty'](exports,Symbol[_0x14cdcb(0xff)],{'value':'Module'});const b=require(_0x14cdcb(0x117)),T=require('@univerjs-pro/license'),c=require(_0x14cdcb(0xeb)),j=require('@univerjs/thread-comment-ui'),M=require(_0x14cdcb(0xec)),w=require(_0x14cdcb(0xd6)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x18845a=>(_0x18845a[_0x18845a[_0x14cdcb(0xb4)]=0x0]='OpenOrReOpen',_0x18845a[_0x18845a['Solved']=0x1]=_0x14cdcb(0xf1),_0x18845a[_0x18845a['UNRECOGNIZED']=-0x1]=_0x14cdcb(0x11b),_0x18845a))(I||{}),v=(_0x2f5119=>(_0x2f5119[_0x2f5119[_0x14cdcb(0xba)]=0x0]=_0x14cdcb(0xba),_0x2f5119[_0x2f5119[_0x14cdcb(0xfd)]=0x1]='Add',_0x2f5119[_0x2f5119[_0x14cdcb(0xbe)]=0x2]=_0x14cdcb(0xbe),_0x2f5119[_0x2f5119[_0x14cdcb(0xe9)]=0x3]='Edit',_0x2f5119[_0x2f5119[_0x14cdcb(0xdd)]=0x4]=_0x14cdcb(0xdd),_0x2f5119[_0x2f5119[_0x14cdcb(0xe3)]=0x5]=_0x14cdcb(0xe3),_0x2f5119[_0x2f5119[_0x14cdcb(0x11b)]=-0x1]=_0x14cdcb(0x11b),_0x2f5119))(v||{});const f=_0x5c7893=>c[_0x14cdcb(0xe4)](new Date(+_0x5c7893))[_0x14cdcb(0x10f)](_0x14cdcb(0xc7)),R=async(_0x20b5a4,_0xa4b4e8)=>{const _0x477649=_0x14cdcb,_0x4c32b4=_0x20b5a4['get'](c[_0x477649(0x11e)]),_0x455f51=_0x20b5a4['get'](P[_0x477649(0xe2)]);_0xa4b4e8[_0x477649(0x10d)](_0x1a79c2=>{_0x4c32b4['getUser'](_0x1a79c2)&&_0xa4b4e8['delete'](_0x1a79c2);}),_0xa4b4e8[_0x477649(0xd5)]&&(await _0x455f51[_0x477649(0xd9)](_0x477649(0xc1),{'params':{'userIDs':[..._0xa4b4e8]}}))[_0x477649(0xbf)][_0x477649(0xda)][_0x477649(0x10d)](_0x2f5674=>{const _0xd5507=_0x477649;_0x2f5674&&_0x4c32b4[_0xd5507(0xde)](_0x2f5674);});};var $=Object[_0x14cdcb(0xcf)],E=(_0x535e8b,_0x142be2,_0x8b40ed,_0x96ff8a)=>{for(var _0x30cecc=_0x96ff8a>0x1?void 0x0:_0x96ff8a?$(_0x142be2,_0x8b40ed):_0x142be2,_0x5869aa=_0x535e8b['length']-0x1,_0x38b34f;_0x5869aa>=0x0;_0x5869aa--)(_0x38b34f=_0x535e8b[_0x5869aa])&&(_0x30cecc=_0x38b34f(_0x30cecc)||_0x30cecc);return _0x30cecc;},S=(_0x28035f,_0x302a0e)=>(_0x2a59e6,_0x1f0f18)=>_0x302a0e(_0x2a59e6,_0x1f0f18,_0x28035f);let p=class extends c[_0x14cdcb(0x10e)]{constructor(_0x4a581a,_0x5360bb,_0x592e6a,_0xa73410){const _0x178730=_0x14cdcb;super(),this[_0x178730(0xef)]=_0x4a581a,this[_0x178730(0xc4)]=_0x5360bb,this['_userService']=_0x592e6a,this[_0x178730(0xf8)]=_0xa73410,this['_init'](),this['_initUserSync']();}[_0x14cdcb(0xd8)](){const _0x5d962b=_0x14cdcb;this['disposeWithMe'](this['_threadCommentModel'][_0x5d962b(0x115)][_0x5d962b(0xc5)](w[_0x5d962b(0xd3)](0x10))[_0x5d962b(0xdf)](_0xd651e6=>{const _0x21b267=_0x5d962b,_0x3f527a=new Set();_0xd651e6[_0x21b267(0x10d)](_0x19331f=>{const _0x50df88=_0x21b267;switch(_0x19331f[_0x50df88(0xcb)]){case'add':{const _0x3a5064=_0x19331f[_0x50df88(0x11d)][_0x50df88(0xa9)];_0x3f527a['add'](_0x3a5064);break;}}}),R(this[_0x21b267(0xf8)],_0x3f527a);}));}[_0x14cdcb(0xdc)](){const _0x51d11e=_0x14cdcb;this[_0x51d11e(0x10c)](this[_0x51d11e(0xef)][_0x51d11e(0x115)][_0x51d11e(0xdf)](async _0x45bf84=>{const _0x2a57d9=_0x51d11e;var _0x2b9722,_0x5a5068,_0x91a644,_0xa60206;const _0x5c1114=(_0x2b9722=this[_0x2a57d9(0xc4)]['getUnit'](_0x45bf84[_0x2a57d9(0xc0)])[_0x2a57d9(0x113)](_0x47026c=>_0x47026c[_0x2a57d9(0xf6)]===_0x45bf84[_0x2a57d9(0xf6)]))==null?void 0x0:_0x2b9722[_0x2a57d9(0xc9)];if(!_0x5c1114)return;const {unitId:_0x564e50,subUnitId:_0x123978}=_0x5c1114;switch(_0x45bf84[_0x2a57d9(0xa8)]&&this[_0x2a57d9(0xbb)][_0x2a57d9(0xde)](_0x45bf84[_0x2a57d9(0xa8)]),_0x45bf84[_0x2a57d9(0xcb)]){case v[_0x2a57d9(0xfd)]:break;case v[_0x2a57d9(0xbe)]:{this[_0x2a57d9(0xc4)][_0x2a57d9(0xcd)](_0x564e50,_0x123978,{'unitId':_0x564e50,'subUnitId':_0x123978,'ref':'','id':_0x45bf84[_0x2a57d9(0x116)],'dT':f(+_0x45bf84['createTimestamp']),'threadId':_0x45bf84[_0x2a57d9(0xf6)],'personId':(_0x91a644=(_0x5a5068=_0x45bf84['user'])==null?void 0x0:_0x5a5068[_0x2a57d9(0x107)])!=null?_0x91a644:_0x45bf84[_0x2a57d9(0x10a)],'text':JSON[_0x2a57d9(0xce)](_0x45bf84['content']),'parentId':_0x5c1114['id']});break;}case v[_0x2a57d9(0xdd)]:{const _0x10afce=this[_0x2a57d9(0xc4)]['getComment'](_0x564e50,_0x123978,_0x45bf84[_0x2a57d9(0x116)]);_0x10afce&&_0x10afce[_0x2a57d9(0xdb)]&&this[_0x2a57d9(0xc4)][_0x2a57d9(0x104)](_0x564e50,_0x123978,_0x45bf84['replyId']);break;}case v[_0x2a57d9(0xe9)]:{this[_0x2a57d9(0xc4)][_0x2a57d9(0xb2)](_0x564e50,_0x123978,{'commentId':_0x45bf84['replyId'],'text':JSON[_0x2a57d9(0xce)](_0x45bf84[_0x2a57d9(0x101)])});break;}case v[_0x2a57d9(0xe3)]:{const _0x3b4e11=(_0xa60206=this['_threadCommentModel'][_0x2a57d9(0xcc)](_0x45bf84[_0x2a57d9(0xc0)])[_0x2a57d9(0x113)](_0x3c4901=>_0x3c4901[_0x2a57d9(0xf6)]===_0x45bf84[_0x2a57d9(0xf6)]))==null?void 0x0:_0xa60206[_0x2a57d9(0xc9)];_0x3b4e11&&this[_0x2a57d9(0xc4)]['resolveComment'](_0x564e50,_0x123978,_0x3b4e11['id'],_0x45bf84['solved']===I[_0x2a57d9(0xf1)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x14cdcb(0xfb)])),S(0x1,c[_0x14cdcb(0xb9)](M['ThreadCommentModel'])),S(0x2,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0x11e)])),S(0x3,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0xf0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x170480,_0x5ca9d9,_0x5eba88,_0x483f95)=>{const _0x3dc223=_0x14cdcb;for(var _0x118ec1=_0x483f95>0x1?void 0x0:_0x483f95?A(_0x5ca9d9,_0x5eba88):_0x5ca9d9,_0x120b93=_0x170480[_0x3dc223(0xb3)]-0x1,_0x4bfa74;_0x120b93>=0x0;_0x120b93--)(_0x4bfa74=_0x170480[_0x120b93])&&(_0x118ec1=_0x4bfa74(_0x118ec1)||_0x118ec1);return _0x118ec1;},_=(_0x427c28,_0x571b63)=>(_0x446ef1,_0x40eb0b)=>_0x571b63(_0x446ef1,_0x40eb0b,_0x427c28);function Y(_0x327e36,_0x52fa1d){const _0x2762a8=_0x14cdcb,_0x5e897d=_0x327e36['replies'][0x0];return{..._0x52fa1d,'id':_0x5e897d['replyId'],'resolved':_0x327e36[_0x2762a8(0x108)]===0x1,'dT':f(_0x5e897d[_0x2762a8(0xe6)]),'personId':_0x5e897d['userId'],'threadId':_0x5e897d[_0x2762a8(0xf6)]};}function _0x8c22(_0x528d0b,_0x12fd14){const _0x510f9b=_0x510f();return _0x8c22=function(_0x8c2229,_0x21de81){_0x8c2229=_0x8c2229-0xa8;let _0x3229a3=_0x510f9b[_0x8c2229];return _0x3229a3;},_0x8c22(_0x528d0b,_0x12fd14);}function G(_0x531460,_0x237a9d,_0xebf677){const _0x595974=_0x14cdcb;var _0x1f46d0,_0x4901d9;if(((_0x4901d9=(_0x1f46d0=_0x531460==null?void 0x0:_0x531460[_0x595974(0xbc)])==null?void 0x0:_0x1f46d0['length'])!=null?_0x4901d9:0x0)>0x0){const _0x6994c7=(_0x38b757,_0x2f1648)=>({'id':_0x38b757['replyId'],'threadId':_0x38b757['threadId'],'dT':f(_0x38b757['createTimestamp']),'personId':_0x38b757[_0x595974(0x10a)],'resolved':_0x531460[_0x595974(0x108)]===I[_0x595974(0xf1)],'unitId':_0x237a9d,'subUnitId':_0xebf677,'text':JSON['parse'](_0x38b757[_0x595974(0x101)]),'parentId':_0x2f1648}),_0xedb6e6=_0x6994c7(_0x531460[_0x595974(0xbc)][0x0]);return{..._0xedb6e6,'children':_0x531460[_0x595974(0xbc)][_0x595974(0xfc)](0x1)[_0x595974(0xd2)](_0x2a4d66=>_0x6994c7(_0x2a4d66,_0xedb6e6['id']))};}return null;}let g=class{constructor(_0x35f71b,_0x2e37a5,_0x52a014,_0x229ea6){const _0x5a59ac=_0x14cdcb;this[_0x5a59ac(0xc8)]=_0x35f71b,this[_0x5a59ac(0xbb)]=_0x2e37a5,this[_0x5a59ac(0x11a)]=_0x52a014,this['_injector']=_0x229ea6;}async[_0x14cdcb(0xcd)](_0x5d56a7){const _0x114e94=_0x14cdcb;var _0xc85c92,_0x2736a6;const {parentId:_0x183fbe,unitId:_0x18c0ed,text:_0x4fdae0,threadId:_0x52db00}=_0x5d56a7,_0x11821c=(_0x2736a6=(_0xc85c92=_0x4fdae0['customRanges'])==null?void 0x0:_0xc85c92[_0x114e94(0xb8)](_0x274b76=>_0x274b76[_0x114e94(0xaf)]===c[_0x114e94(0xfe)]['COMMENT'])['map'](_0x3668df=>_0x3668df[_0x114e94(0xf7)]))!=null?_0x2736a6:[],_0x4df066=JSON['stringify'](_0x4fdae0),_0x364339=(await this[_0x114e94(0x11a)][_0x114e94(0xd1)](_0x18c0ed))['getMemberID']();if(_0x183fbe){const _0x286d87={'memberId':_0x364339,'unitId':_0x18c0ed,'content':_0x4df066,'mention':_0x11821c,'threadId':_0x52db00},_0x2ff866=(await this[_0x114e94(0xc8)]['post'](_0x114e94(0xd4)+_0x18c0ed+'/reply',{'body':_0x286d87}))[_0x114e94(0xbf)][_0x114e94(0xc3)];return{..._0x5d56a7,'id':_0x2ff866[_0x114e94(0x116)],'dT':c[_0x114e94(0xe4)](+_0x2ff866[_0x114e94(0xe6)])['format'](_0x114e94(0xc7)),'personId':_0x2ff866[_0x114e94(0x10a)]};}else{const _0x582efb={'memberId':_0x364339,'unitId':_0x18c0ed,'content':_0x4df066,'mention':_0x11821c},_0x306947=await this[_0x114e94(0xc8)][_0x114e94(0x102)]('/universer-api/comment/unit/'+_0x18c0ed+_0x114e94(0xbd),{'body':_0x582efb});return Y(_0x306947[_0x114e94(0xbf)][_0x114e94(0x11c)],_0x5d56a7);}}async[_0x14cdcb(0xb2)](_0x57a3a2){const _0x6f2adb=_0x14cdcb;var _0x19ca32,_0x3bf60d;const {text:_0x2d4c5f,unitId:_0x474c9e}=_0x57a3a2,_0x5e47ef=(_0x3bf60d=(_0x19ca32=_0x2d4c5f['customRanges'])==null?void 0x0:_0x19ca32[_0x6f2adb(0xb8)](_0x1d1aca=>_0x1d1aca[_0x6f2adb(0xaf)]===c['CustomRangeType'][_0x6f2adb(0xb1)])[_0x6f2adb(0xd2)](_0x1395ad=>_0x1395ad[_0x6f2adb(0xf7)]))!=null?_0x3bf60d:[],_0x199b87=JSON[_0x6f2adb(0x109)](_0x2d4c5f),_0x3bd886=_0x57a3a2['threadId'],_0x4f2ba3=_0x57a3a2['id'],_0x3ad382={'memberId':(await this[_0x6f2adb(0x11a)][_0x6f2adb(0xd1)](_0x474c9e))[_0x6f2adb(0xae)](),'unitId':_0x474c9e,'threadId':_0x3bd886,'mention':_0x5e47ef,'content':_0x199b87,'replyId':_0x4f2ba3},_0x5388f4=await this[_0x6f2adb(0xc8)][_0x6f2adb(0x102)](_0x6f2adb(0xd4)+_0x474c9e+_0x6f2adb(0xaa),{'body':_0x3ad382});return!_0x5388f4[_0x6f2adb(0xbf)][_0x6f2adb(0xb5)]||_0x5388f4[_0x6f2adb(0xbf)][_0x6f2adb(0xb5)]['code']===0x1;}async['resolveComment'](_0x3f7bd1){const _0x4d6824=_0x14cdcb,{unitId:_0x362747}=_0x3f7bd1,_0x2add96=_0x3f7bd1[_0x4d6824(0xf6)],_0x3c15dd={'memberId':this[_0x4d6824(0xbb)]['getCurrentUser']()['userID'],'unitId':_0x362747,'threadId':_0x2add96,'solved':_0x3f7bd1['resolved']?I['Solved']:I['OpenOrReOpen']},_0x32f26b=await this[_0x4d6824(0xc8)][_0x4d6824(0x102)](_0x4d6824(0xd4)+_0x362747+_0x4d6824(0xf4),{'body':_0x3c15dd});return!_0x32f26b['body'][_0x4d6824(0xb5)]||_0x32f26b['body'][_0x4d6824(0xb5)][_0x4d6824(0xd0)]===0x1;}async[_0x14cdcb(0x104)](_0x5f1309,_0x3483bc,_0xf61951,_0x494840){const _0x4affd4=_0x14cdcb,_0x4932b6={'memberId':(await this[_0x4affd4(0x11a)]['requireSession'](_0x5f1309))[_0x4affd4(0xae)](),'threadId':_0xf61951,'replyId':_0x494840,'unitId':_0x5f1309},_0x486e56=await this[_0x4affd4(0xc8)]['post'](_0x4affd4(0xd4)+_0x5f1309+_0x4affd4(0x10b),{'body':_0x4932b6});return!_0x486e56[_0x4affd4(0xbf)][_0x4affd4(0xb5)]||_0x486e56[_0x4affd4(0xbf)][_0x4affd4(0xb5)][_0x4affd4(0xd0)]===0x1;}async[_0x14cdcb(0xe0)](_0x1a3966,_0x2f5a2d,_0x544975){const _0xce6de6=_0x14cdcb,_0x278c93={'unitId':_0x1a3966,'threadId':_0x544975},_0x181e59=await this[_0xce6de6(0xc8)][_0xce6de6(0x102)](_0xce6de6(0xd4)+_0x1a3966+_0xce6de6(0xe8),{'body':_0x278c93}),_0xfcb1fb=_0x544975[_0xce6de6(0xd2)](_0x2a8844=>G(_0x181e59[_0xce6de6(0xbf)]['comments'][_0x2a8844],_0x1a3966,_0x2f5a2d))[_0xce6de6(0xb8)](Boolean);return Object['values'](_0x181e59['body'][_0xce6de6(0xda)])[_0xce6de6(0x10d)](_0x5593dc=>{const _0x69786=_0xce6de6;this['_userService'][_0x69786(0xde)](_0x5593dc);}),_0xfcb1fb;}[_0x14cdcb(0xf5)](_0x3ec0d5){const _0x4ea19e=_0x14cdcb;return{'id':_0x3ec0d5['id'],'threadId':_0x3ec0d5[_0x4ea19e(0xf6)],'ref':_0x3ec0d5[_0x4ea19e(0xb0)]};}};g=x([_(0x0,c['Inject'](P[_0x14cdcb(0xe2)])),_(0x1,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0x11e)])),_(0x2,c[_0x14cdcb(0xb9)](b['CollaborationSessionService'])),_(0x3,c[_0x14cdcb(0xb9)](c['Injector']))],g);var H=Object[_0x14cdcb(0xcf)],J=(_0x4985ad,_0x2c8012,_0x130e42,_0xe5155a)=>{const _0x327fa3=_0x14cdcb;for(var _0x1b7eec=_0xe5155a>0x1?void 0x0:_0xe5155a?H(_0x2c8012,_0x130e42):_0x2c8012,_0x3f05a7=_0x4985ad[_0x327fa3(0xb3)]-0x1,_0x4cdbf1;_0x3f05a7>=0x0;_0x3f05a7--)(_0x4cdbf1=_0x4985ad[_0x3f05a7])&&(_0x1b7eec=_0x4cdbf1(_0x1b7eec)||_0x1b7eec);return _0x1b7eec;},y=(_0x22cd19,_0x49b017)=>(_0x222e1c,_0x3ee817)=>_0x49b017(_0x222e1c,_0x3ee817,_0x22cd19);let C=class extends c[_0x14cdcb(0x10e)]{constructor(_0x58f8a3,_0x53e642){const _0x1d2827=_0x14cdcb;super(),this[_0x1d2827(0xe7)]=_0x58f8a3,this[_0x1d2827(0x114)]=_0x53e642,this[_0x1d2827(0xb7)]();}['_initDataSource'](){const _0x48c603=_0x14cdcb;this[_0x48c603(0xe7)][_0x48c603(0xab)]=this[_0x48c603(0x114)],this[_0x48c603(0xe7)]['syncUpdateMutationToColla']=!0x1;}};function _0x510f(){const _0x369f35=['dayjs','pluginName','createTimestamp','_threadCommentDataSourceService','/list','Edit','onStarting','@univerjs/core','@univerjs/thread-comment','UniverInstanceType','39uBrGNN','_commentService','Injector','Solved','UniverThreadCommentUIPlugin','_config','/solved','saveCommentToSnapshot','threadId','rangeId','_injector','304156xqEkVD','434610voaudC','CommentService','slice','Add','CustomRangeType','toStringTag','UniverLicensePlugin','content','post','250kUkFrL','deleteComment','IThreadCommentDataSourceService','UNIVER_UNKNOWN','userID','solved','stringify','userId','/delete','disposeWithMe','forEach','Disposable','format','DependentOn','114ZkhqKo','merge','find','_threadCommentDataSource','commentUpdate$','replyId','@univerjs-pro/collaboration-client','defineProperty','UniverThreadCommentDataSourcePlugin','_sessionService','UNRECOGNIZED','comment','payload','UserManagerService','user','personId','/edit','dataSource','511ODJfIt','342848uUdQhO','getMemberID','rangeType','ref','COMMENT','updateComment','length','OpenOrReOpen','error','21512kacxuJ','_initDataSource','filter','Inject','Unknown','_userService','replies','/add','Reply','body','unitId','/universer-api/user/list','45770ggkamk','reply','_threadCommentModel','pipe','onReady','YYYY/MM/DD\x20HH:mm','_httpService','root','13296BtoUpb','type','getUnit','addComment','parse','getOwnPropertyDescriptor','code','requireSession','map','bufferTime','/universer-api/comment/unit/','size','rxjs','155943fOMKyH','_initUserSync','get','users','parentId','_init','Delete','addUser','subscribe','listComments','Plugin','HTTPService','Solve'];_0x510f=function(){return _0x369f35;};return _0x510f();}C=J([y(0x0,M[_0x14cdcb(0x105)]),y(0x1,c[_0x14cdcb(0xb9)](g))],C);var F=Object[_0x14cdcb(0x118)],L=Object[_0x14cdcb(0xcf)],Z=(_0x3b0a1f,_0x1e64bc,_0x1a7775)=>_0x1e64bc in _0x3b0a1f?F(_0x3b0a1f,_0x1e64bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a7775}):_0x3b0a1f[_0x1e64bc]=_0x1a7775,W=(_0x1e3370,_0x2bfac4,_0x5dc9e0,_0x5728d9)=>{const _0x3421a3=_0x14cdcb;for(var _0x13c233=_0x5728d9>0x1?void 0x0:_0x5728d9?L(_0x2bfac4,_0x5dc9e0):_0x2bfac4,_0x258722=_0x1e3370[_0x3421a3(0xb3)]-0x1,_0x580c0c;_0x258722>=0x0;_0x258722--)(_0x580c0c=_0x1e3370[_0x258722])&&(_0x13c233=_0x580c0c(_0x13c233)||_0x13c233);return _0x13c233;},O=(_0x982f74,_0x1fde18)=>(_0x32d1e3,_0x308797)=>_0x1fde18(_0x32d1e3,_0x308797,_0x982f74),N=(_0x52c330,_0x373c20,_0x1cc10c)=>Z(_0x52c330,typeof _0x373c20!='symbol'?_0x373c20+'':_0x373c20,_0x1cc10c);exports[_0x14cdcb(0x119)]=class extends c[_0x14cdcb(0xe1)]{constructor(_0x16a55f=D,_0x249cb0,_0x28bbfc){const _0x568c45=_0x14cdcb;super(),this['_config']=_0x16a55f,this['_injector']=_0x249cb0,this['_configService']=_0x28bbfc;const {..._0x3cdfbb}=c[_0x568c45(0x112)]({},D,this[_0x568c45(0xf3)]);this['_configService']['setConfig'](q,_0x3cdfbb);}[_0x14cdcb(0xea)](){const _0x3af36d=_0x14cdcb;[[g],[C],[p]][_0x3af36d(0x10d)](_0x27f27a=>{const _0x17a634=_0x3af36d;this[_0x17a634(0xf8)]['add'](_0x27f27a);});}[_0x14cdcb(0xc6)](){const _0x45ccec=_0x14cdcb;this[_0x45ccec(0xf8)][_0x45ccec(0xd9)](C),this[_0x45ccec(0xf8)][_0x45ccec(0xd9)](p);}},N(exports[_0x14cdcb(0x119)],_0x14cdcb(0xe5),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x14cdcb(0xed)][_0x14cdcb(0x106)]),exports[_0x14cdcb(0x119)]=W([c[_0x14cdcb(0x110)](j[_0x14cdcb(0xf2)],b['UniverCollaborationClientPlugin'],T[_0x14cdcb(0x100)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x14cdcb(0x119)]);
|
|
1
|
+
'use strict';const _0x3ed0e1=_0x1c58;(function(_0x46db32,_0x4e1edd){const _0x4e0390=_0x1c58,_0xc34431=_0x46db32();while(!![]){try{const _0x38e436=parseInt(_0x4e0390(0x182))/0x1*(parseInt(_0x4e0390(0x14b))/0x2)+-parseInt(_0x4e0390(0x19d))/0x3*(parseInt(_0x4e0390(0x176))/0x4)+-parseInt(_0x4e0390(0x14f))/0x5*(parseInt(_0x4e0390(0x174))/0x6)+-parseInt(_0x4e0390(0x16c))/0x7+parseInt(_0x4e0390(0x1ba))/0x8*(-parseInt(_0x4e0390(0x1c5))/0x9)+parseInt(_0x4e0390(0x1be))/0xa*(parseInt(_0x4e0390(0x17d))/0xb)+parseInt(_0x4e0390(0x153))/0xc;if(_0x38e436===_0x4e1edd)break;else _0xc34431['push'](_0xc34431['shift']());}catch(_0x277f5a){_0xc34431['push'](_0xc34431['shift']());}}}(_0x436c,0xbdf6e));Object[_0x3ed0e1(0x1a5)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require(_0x3ed0e1(0x151)),T=require(_0x3ed0e1(0x18b)),c=require(_0x3ed0e1(0x152)),j=require(_0x3ed0e1(0x16b)),M=require(_0x3ed0e1(0x166)),w=require(_0x3ed0e1(0x1bb)),P=require(_0x3ed0e1(0x16d)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x245d99=>(_0x245d99[_0x245d99[_0x3ed0e1(0x15f)]=0x0]=_0x3ed0e1(0x15f),_0x245d99[_0x245d99[_0x3ed0e1(0x1b9)]=0x1]=_0x3ed0e1(0x1b9),_0x245d99[_0x245d99['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x245d99))(I||{}),v=(_0x4bbab2=>(_0x4bbab2[_0x4bbab2['Unknown']=0x0]=_0x3ed0e1(0x197),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x184)]=0x1]=_0x3ed0e1(0x184),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x1a2)]=0x2]='Reply',_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x15c)]=0x3]=_0x3ed0e1(0x15c),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x175)]=0x4]='Delete',_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x178)]=0x5]=_0x3ed0e1(0x178),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x17a)]=-0x1]=_0x3ed0e1(0x17a),_0x4bbab2))(v||{});const f=_0x1f2329=>c[_0x3ed0e1(0x159)](new Date(+_0x1f2329))[_0x3ed0e1(0x183)](_0x3ed0e1(0x148)),R=async(_0x5f0d27,_0x1f6541)=>{const _0x77272f=_0x3ed0e1,_0x10d01c=_0x5f0d27[_0x77272f(0x19e)](c[_0x77272f(0x179)]),_0x4b78bb=_0x5f0d27['get'](P[_0x77272f(0x1b0)]);_0x1f6541['forEach'](_0x398320=>{const _0x2dbb75=_0x77272f;_0x10d01c['getUser'](_0x398320)&&_0x1f6541[_0x2dbb75(0x1b5)](_0x398320);}),_0x1f6541['size']&&(await _0x4b78bb[_0x77272f(0x19e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1f6541]}}))['body']['users'][_0x77272f(0x198)](_0x9b0847=>{_0x9b0847&&_0x10d01c['addUser'](_0x9b0847);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2fec3d,_0x4986b7,_0x566c84,_0x31c4cd)=>{const _0x1a23f5=_0x3ed0e1;for(var _0x5e08b4=_0x31c4cd>0x1?void 0x0:_0x31c4cd?$(_0x4986b7,_0x566c84):_0x4986b7,_0x1dc188=_0x2fec3d[_0x1a23f5(0x1ad)]-0x1,_0x333ae0;_0x1dc188>=0x0;_0x1dc188--)(_0x333ae0=_0x2fec3d[_0x1dc188])&&(_0x5e08b4=_0x333ae0(_0x5e08b4)||_0x5e08b4);return _0x5e08b4;},S=(_0x21442d,_0x1d9404)=>(_0x5cfd14,_0x2d211e)=>_0x1d9404(_0x5cfd14,_0x2d211e,_0x21442d);let p=class extends c[_0x3ed0e1(0x167)]{constructor(_0x56e152,_0x445c16,_0x5a69cb,_0x3b70e7){const _0x21c28b=_0x3ed0e1;super(),this[_0x21c28b(0x19a)]=_0x56e152,this[_0x21c28b(0x1a7)]=_0x445c16,this[_0x21c28b(0x18f)]=_0x5a69cb,this['_injector']=_0x3b70e7,this[_0x21c28b(0x155)](),this[_0x21c28b(0x165)]();}['_initUserSync'](){const _0x5db32a=_0x3ed0e1;this['disposeWithMe'](this[_0x5db32a(0x1a7)][_0x5db32a(0x147)][_0x5db32a(0x149)](w['bufferTime'](0x10))[_0x5db32a(0x156)](_0x4edded=>{const _0x187e61=_0x5db32a,_0x3693f9=new Set();_0x4edded['forEach'](_0x111282=>{const _0xbd5c8d=_0x1c58;switch(_0x111282[_0xbd5c8d(0x1aa)]){case _0xbd5c8d(0x18c):{const _0x27ecee=_0x111282[_0xbd5c8d(0x188)][_0xbd5c8d(0x171)];_0x3693f9[_0xbd5c8d(0x18c)](_0x27ecee);break;}}}),R(this[_0x187e61(0x1b6)],_0x3693f9);}));}[_0x3ed0e1(0x155)](){const _0x31e9c9=_0x3ed0e1;this[_0x31e9c9(0x160)](this['_commentService']['commentUpdate$'][_0x31e9c9(0x156)](async _0x3f98af=>{const _0x1a2e12=_0x31e9c9;var _0x56bcce,_0x530086,_0xe4551a,_0x58ddcd;const _0x1b39ac=(_0x56bcce=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x14d)](_0x3f98af[_0x1a2e12(0x1ab)])[_0x1a2e12(0x187)](_0x2daa38=>_0x2daa38[_0x1a2e12(0x1c0)]===_0x3f98af[_0x1a2e12(0x1c0)]))==null?void 0x0:_0x56bcce[_0x1a2e12(0x1bd)];if(!_0x1b39ac)return;const {unitId:_0x5c0b1d,subUnitId:_0x50427e}=_0x1b39ac;switch(_0x3f98af[_0x1a2e12(0x177)]&&this['_userService'][_0x1a2e12(0x1b3)](_0x3f98af[_0x1a2e12(0x177)]),_0x3f98af['type']){case v[_0x1a2e12(0x184)]:break;case v[_0x1a2e12(0x1a2)]:{this[_0x1a2e12(0x1a7)][_0x1a2e12(0x15d)](_0x5c0b1d,_0x50427e,{'unitId':_0x5c0b1d,'subUnitId':_0x50427e,'ref':'','id':_0x3f98af[_0x1a2e12(0x157)],'dT':f(+_0x3f98af[_0x1a2e12(0x18d)]),'threadId':_0x3f98af[_0x1a2e12(0x1c0)],'personId':(_0xe4551a=(_0x530086=_0x3f98af[_0x1a2e12(0x177)])==null?void 0x0:_0x530086[_0x1a2e12(0x1c9)])!=null?_0xe4551a:_0x3f98af[_0x1a2e12(0x1a8)],'text':JSON['parse'](_0x3f98af[_0x1a2e12(0x15b)]),'parentId':_0x1b39ac['id']});break;}case v[_0x1a2e12(0x175)]:{const _0x564cfd=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x181)](_0x5c0b1d,_0x50427e,_0x3f98af[_0x1a2e12(0x157)]);_0x564cfd&&_0x564cfd['parentId']&&this['_threadCommentModel'][_0x1a2e12(0x1c8)](_0x5c0b1d,_0x50427e,_0x3f98af[_0x1a2e12(0x157)]);break;}case v[_0x1a2e12(0x15c)]:{this[_0x1a2e12(0x1a7)]['updateComment'](_0x5c0b1d,_0x50427e,{'commentId':_0x3f98af['replyId'],'text':JSON[_0x1a2e12(0x16a)](_0x3f98af[_0x1a2e12(0x15b)])});break;}case v[_0x1a2e12(0x178)]:{const _0x4098ba=(_0x58ddcd=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x14d)](_0x3f98af[_0x1a2e12(0x1ab)])['find'](_0x357e9d=>_0x357e9d[_0x1a2e12(0x1c0)]===_0x3f98af[_0x1a2e12(0x1c0)]))==null?void 0x0:_0x58ddcd[_0x1a2e12(0x1bd)];_0x4098ba&&this[_0x1a2e12(0x1a7)][_0x1a2e12(0x196)](_0x5c0b1d,_0x50427e,_0x4098ba['id'],_0x3f98af[_0x1a2e12(0x164)]===I[_0x1a2e12(0x1b9)]);break;}}}));}};p=E([S(0x0,c[_0x3ed0e1(0x1a3)](b[_0x3ed0e1(0x1c2)])),S(0x1,c[_0x3ed0e1(0x1a3)](M[_0x3ed0e1(0x161)])),S(0x2,c[_0x3ed0e1(0x1a3)](c[_0x3ed0e1(0x179)])),S(0x3,c['Inject'](c[_0x3ed0e1(0x1c7)]))],p);const q=_0x3ed0e1(0x1c4),D={};var A=Object[_0x3ed0e1(0x1bc)],x=(_0xaa4aab,_0x516053,_0x5b794d,_0x101aec)=>{for(var _0x4c1b49=_0x101aec>0x1?void 0x0:_0x101aec?A(_0x516053,_0x5b794d):_0x516053,_0x2e0c92=_0xaa4aab['length']-0x1,_0x3cdf5a;_0x2e0c92>=0x0;_0x2e0c92--)(_0x3cdf5a=_0xaa4aab[_0x2e0c92])&&(_0x4c1b49=_0x3cdf5a(_0x4c1b49)||_0x4c1b49);return _0x4c1b49;},_=(_0xd45d4c,_0x13043b)=>(_0x2c6fe2,_0x1314e4)=>_0x13043b(_0x2c6fe2,_0x1314e4,_0xd45d4c);function Y(_0x14d9c6,_0x204c97){const _0xeb97f0=_0x3ed0e1,_0x1d75f3=_0x14d9c6[_0xeb97f0(0x168)][0x0];return{..._0x204c97,'id':_0x1d75f3[_0xeb97f0(0x157)],'resolved':_0x14d9c6['solved']===0x1,'dT':f(_0x1d75f3[_0xeb97f0(0x18d)]),'personId':_0x1d75f3['userId'],'threadId':_0x1d75f3[_0xeb97f0(0x1c0)]};}function G(_0x3547c5,_0x37ee8c,_0x303b4b){const _0x1e2b90=_0x3ed0e1;var _0x53bb2b,_0x1810e4;if(((_0x1810e4=(_0x53bb2b=_0x3547c5==null?void 0x0:_0x3547c5[_0x1e2b90(0x168)])==null?void 0x0:_0x53bb2b[_0x1e2b90(0x1ad)])!=null?_0x1810e4:0x0)>0x0){const _0x3ec478=(_0x32c14f,_0x4982a9)=>({'id':_0x32c14f[_0x1e2b90(0x157)],'threadId':_0x32c14f[_0x1e2b90(0x1c0)],'dT':f(_0x32c14f[_0x1e2b90(0x18d)]),'personId':_0x32c14f['userId'],'resolved':_0x3547c5[_0x1e2b90(0x164)]===I[_0x1e2b90(0x1b9)],'unitId':_0x37ee8c,'subUnitId':_0x303b4b,'text':JSON[_0x1e2b90(0x16a)](_0x32c14f[_0x1e2b90(0x15b)]),'parentId':_0x4982a9}),_0x9ff4df=_0x3ec478(_0x3547c5[_0x1e2b90(0x168)][0x0]);return{..._0x9ff4df,'children':_0x3547c5['replies'][_0x1e2b90(0x17f)](0x1)[_0x1e2b90(0x1b2)](_0x143688=>_0x3ec478(_0x143688,_0x9ff4df['id']))};}return null;}let g=class{constructor(_0x4fc172,_0x4e6787,_0x3a55c1,_0xb378dc){const _0x4c2277=_0x3ed0e1;this[_0x4c2277(0x180)]=_0x4fc172,this['_userService']=_0x4e6787,this['_sessionService']=_0x3a55c1,this[_0x4c2277(0x1b6)]=_0xb378dc;}async['addComment'](_0x581c70){const _0x46aa34=_0x3ed0e1;var _0x418ed2,_0x493888;const {parentId:_0x42d9aa,unitId:_0x4bc1a9,text:_0x53297a,threadId:_0x876243}=_0x581c70,_0x5bc3b0=(_0x493888=(_0x418ed2=_0x53297a[_0x46aa34(0x16f)])==null?void 0x0:_0x418ed2[_0x46aa34(0x15e)](_0x7b419f=>_0x7b419f[_0x46aa34(0x192)]===c[_0x46aa34(0x17e)][_0x46aa34(0x195)])[_0x46aa34(0x1b2)](_0x3cb5ce=>_0x3cb5ce['rangeId']))!=null?_0x493888:[],_0x3fd067=JSON['stringify'](_0x53297a),_0x137edd=(await this[_0x46aa34(0x17c)][_0x46aa34(0x14e)](_0x4bc1a9))[_0x46aa34(0x146)]();if(_0x42d9aa){const _0x181a99={'memberId':_0x137edd,'unitId':_0x4bc1a9,'content':_0x3fd067,'mention':_0x5bc3b0,'threadId':_0x876243},_0x57a3b4=(await this[_0x46aa34(0x180)][_0x46aa34(0x158)]('/universer-api/comment/unit/'+_0x4bc1a9+_0x46aa34(0x1b7),{'body':_0x181a99}))[_0x46aa34(0x185)]['reply'];return{..._0x581c70,'id':_0x57a3b4[_0x46aa34(0x157)],'dT':c[_0x46aa34(0x159)](+_0x57a3b4[_0x46aa34(0x18d)])[_0x46aa34(0x183)](_0x46aa34(0x148)),'personId':_0x57a3b4[_0x46aa34(0x1a8)]};}else{const _0x1640e5={'memberId':_0x137edd,'unitId':_0x4bc1a9,'content':_0x3fd067,'mention':_0x5bc3b0},_0x381324=await this['_httpService'][_0x46aa34(0x158)](_0x46aa34(0x190)+_0x4bc1a9+_0x46aa34(0x1c1),{'body':_0x1640e5});return Y(_0x381324['body']['comment'],_0x581c70);}}async[_0x3ed0e1(0x1ae)](_0xa6b27){const _0x28b3e8=_0x3ed0e1;var _0x36617b,_0x3955b6;const {text:_0x525eba,unitId:_0x3b02ee}=_0xa6b27,_0x50a7ab=(_0x3955b6=(_0x36617b=_0x525eba[_0x28b3e8(0x16f)])==null?void 0x0:_0x36617b[_0x28b3e8(0x15e)](_0x3ad0f4=>_0x3ad0f4[_0x28b3e8(0x192)]===c[_0x28b3e8(0x17e)][_0x28b3e8(0x195)])['map'](_0x11191e=>_0x11191e[_0x28b3e8(0x19c)]))!=null?_0x3955b6:[],_0x4a05d2=JSON[_0x28b3e8(0x1a6)](_0x525eba),_0x2cc556=_0xa6b27[_0x28b3e8(0x1c0)],_0x1f2bb6=_0xa6b27['id'],_0x55c1bf={'memberId':(await this['_sessionService'][_0x28b3e8(0x14e)](_0x3b02ee))[_0x28b3e8(0x146)](),'unitId':_0x3b02ee,'threadId':_0x2cc556,'mention':_0x50a7ab,'content':_0x4a05d2,'replyId':_0x1f2bb6},_0x144990=await this['_httpService'][_0x28b3e8(0x158)](_0x28b3e8(0x190)+_0x3b02ee+_0x28b3e8(0x1b1),{'body':_0x55c1bf});return!_0x144990[_0x28b3e8(0x185)][_0x28b3e8(0x1a1)]||_0x144990['body'][_0x28b3e8(0x1a1)][_0x28b3e8(0x150)]===0x1;}async[_0x3ed0e1(0x196)](_0x5e5e4c){const _0x5e0074=_0x3ed0e1,{unitId:_0x236c88}=_0x5e5e4c,_0x580924=_0x5e5e4c[_0x5e0074(0x1c0)],_0xa4fe65={'memberId':this[_0x5e0074(0x18f)][_0x5e0074(0x1c6)]()[_0x5e0074(0x1c9)],'unitId':_0x236c88,'threadId':_0x580924,'solved':_0x5e5e4c[_0x5e0074(0x172)]?I['Solved']:I[_0x5e0074(0x15f)]},_0xdbee80=await this[_0x5e0074(0x180)][_0x5e0074(0x158)]('/universer-api/comment/unit/'+_0x236c88+'/solved',{'body':_0xa4fe65});return!_0xdbee80[_0x5e0074(0x185)][_0x5e0074(0x1a1)]||_0xdbee80[_0x5e0074(0x185)][_0x5e0074(0x1a1)][_0x5e0074(0x150)]===0x1;}async[_0x3ed0e1(0x1c8)](_0x13b5ee,_0xd88afc,_0x5d37c8,_0x7f90ef){const _0xfe8f6a=_0x3ed0e1,_0x5ecf4a={'memberId':(await this[_0xfe8f6a(0x17c)]['requireSession'](_0x13b5ee))[_0xfe8f6a(0x146)](),'threadId':_0x5d37c8,'replyId':_0x7f90ef,'unitId':_0x13b5ee},_0x1fdaf7=await this[_0xfe8f6a(0x180)][_0xfe8f6a(0x158)](_0xfe8f6a(0x190)+_0x13b5ee+_0xfe8f6a(0x1a9),{'body':_0x5ecf4a});return!_0x1fdaf7[_0xfe8f6a(0x185)][_0xfe8f6a(0x1a1)]||_0x1fdaf7[_0xfe8f6a(0x185)][_0xfe8f6a(0x1a1)][_0xfe8f6a(0x150)]===0x1;}async[_0x3ed0e1(0x1b8)](_0x267814,_0x47e6de,_0x4ceaff){const _0x2c9ce8=_0x3ed0e1,_0x1ea6d0={'unitId':_0x267814,'threadId':_0x4ceaff},_0x4f7712=await this[_0x2c9ce8(0x180)][_0x2c9ce8(0x158)](_0x2c9ce8(0x190)+_0x267814+_0x2c9ce8(0x194),{'body':_0x1ea6d0}),_0x3001e5=_0x4ceaff['map'](_0x1c4482=>G(_0x4f7712[_0x2c9ce8(0x185)][_0x2c9ce8(0x193)][_0x1c4482],_0x267814,_0x47e6de))[_0x2c9ce8(0x15e)](Boolean);return Object[_0x2c9ce8(0x14c)](_0x4f7712[_0x2c9ce8(0x185)][_0x2c9ce8(0x1af)])['forEach'](_0x308f5e=>{const _0x4bb702=_0x2c9ce8;this[_0x4bb702(0x18f)]['addUser'](_0x308f5e);}),_0x3001e5;}['saveCommentToSnapshot'](_0x52a16a){const _0x5ba25a=_0x3ed0e1;return{'id':_0x52a16a['id'],'threadId':_0x52a16a[_0x5ba25a(0x1c0)],'ref':_0x52a16a[_0x5ba25a(0x16e)]};}};g=x([_(0x0,c[_0x3ed0e1(0x1a3)](P['HTTPService'])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x3ed0e1(0x162)])),_(0x3,c[_0x3ed0e1(0x1a3)](c[_0x3ed0e1(0x1c7)]))],g);var H=Object[_0x3ed0e1(0x1bc)],J=(_0x5bf4d9,_0x40e22d,_0x4ce978,_0x33197f)=>{const _0x31ff74=_0x3ed0e1;for(var _0xc8e53d=_0x33197f>0x1?void 0x0:_0x33197f?H(_0x40e22d,_0x4ce978):_0x40e22d,_0xa79031=_0x5bf4d9[_0x31ff74(0x1ad)]-0x1,_0x21b3c2;_0xa79031>=0x0;_0xa79031--)(_0x21b3c2=_0x5bf4d9[_0xa79031])&&(_0xc8e53d=_0x21b3c2(_0xc8e53d)||_0xc8e53d);return _0xc8e53d;},y=(_0xb3ff02,_0x2dd5f8)=>(_0x2857d6,_0x452f5c)=>_0x2dd5f8(_0x2857d6,_0x452f5c,_0xb3ff02);let C=class extends c[_0x3ed0e1(0x167)]{constructor(_0x363f00,_0x20090a){const _0xd2a6a3=_0x3ed0e1;super(),this['_threadCommentDataSourceService']=_0x363f00,this[_0xd2a6a3(0x1b4)]=_0x20090a,this[_0xd2a6a3(0x199)]();}['_initDataSource'](){const _0x361678=_0x3ed0e1;this['_threadCommentDataSourceService'][_0x361678(0x169)]=this[_0x361678(0x1b4)],this['_threadCommentDataSourceService'][_0x361678(0x18a)]=!0x1;}};function _0x1c58(_0x1188d6,_0x26357e){const _0x436c6f=_0x436c();return _0x1c58=function(_0x1c581c,_0x348c1a){_0x1c581c=_0x1c581c-0x146;let _0x3bdc26=_0x436c6f[_0x1c581c];return _0x3bdc26;},_0x1c58(_0x1188d6,_0x26357e);}C=J([y(0x0,M[_0x3ed0e1(0x189)]),y(0x1,c[_0x3ed0e1(0x1a3)](g))],C);var F=Object[_0x3ed0e1(0x1a5)],L=Object[_0x3ed0e1(0x1bc)],Z=(_0x221d2a,_0xbf73f7,_0xf3daf2)=>_0xbf73f7 in _0x221d2a?F(_0x221d2a,_0xbf73f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf3daf2}):_0x221d2a[_0xbf73f7]=_0xf3daf2,W=(_0x342011,_0x33161e,_0x556b24,_0x432072)=>{const _0x3cf3c8=_0x3ed0e1;for(var _0x527883=_0x432072>0x1?void 0x0:_0x432072?L(_0x33161e,_0x556b24):_0x33161e,_0x2cc72f=_0x342011[_0x3cf3c8(0x1ad)]-0x1,_0x3b0466;_0x2cc72f>=0x0;_0x2cc72f--)(_0x3b0466=_0x342011[_0x2cc72f])&&(_0x527883=_0x3b0466(_0x527883)||_0x527883);return _0x527883;},O=(_0xd5c228,_0x451b26)=>(_0x53b717,_0x1ebcf8)=>_0x451b26(_0x53b717,_0x1ebcf8,_0xd5c228),N=(_0x12f26b,_0xd2c6fe,_0x2f7a92)=>Z(_0x12f26b,typeof _0xd2c6fe!=_0x3ed0e1(0x19b)?_0xd2c6fe+'':_0xd2c6fe,_0x2f7a92);exports[_0x3ed0e1(0x17b)]=class extends c[_0x3ed0e1(0x191)]{constructor(_0xedef1c=D,_0x29722d,_0x8eefa5){const _0x588ee2=_0x3ed0e1;super(),this[_0x588ee2(0x1c3)]=_0xedef1c,this[_0x588ee2(0x1b6)]=_0x29722d,this[_0x588ee2(0x173)]=_0x8eefa5;const {..._0x2c4bd8}=c[_0x588ee2(0x1bf)]({},D,this['_config']);this[_0x588ee2(0x173)][_0x588ee2(0x15a)](q,_0x2c4bd8);}[_0x3ed0e1(0x19f)](){const _0x24c772=_0x3ed0e1;[[g],[C],[p]][_0x24c772(0x198)](_0x56c892=>{const _0x3ecc33=_0x24c772;this[_0x3ecc33(0x1b6)][_0x3ecc33(0x18c)](_0x56c892);});}[_0x3ed0e1(0x18e)](){const _0x2305c1=_0x3ed0e1;this[_0x2305c1(0x1b6)]['get'](C),this[_0x2305c1(0x1b6)][_0x2305c1(0x19e)](p);}},N(exports[_0x3ed0e1(0x17b)],_0x3ed0e1(0x14a),U),N(exports[_0x3ed0e1(0x17b)],_0x3ed0e1(0x1aa),c[_0x3ed0e1(0x186)][_0x3ed0e1(0x163)]),exports[_0x3ed0e1(0x17b)]=W([c[_0x3ed0e1(0x1a4)](j[_0x3ed0e1(0x1a0)],b[_0x3ed0e1(0x1ac)],T[_0x3ed0e1(0x154)]),O(0x1,c['Inject'](c[_0x3ed0e1(0x1c7)])),O(0x2,c[_0x3ed0e1(0x170)])],exports[_0x3ed0e1(0x17b)]);function _0x436c(){const _0x24b50d=['userID','getMemberID','commentUpdate$','YYYY/MM/DD\x20HH:mm','pipe','pluginName','666080CSWUXD','values','getUnit','requireSession','8900fYYzuf','code','@univerjs-pro/collaboration-client','@univerjs/core','32348580ReHSFt','UniverLicensePlugin','_init','subscribe','replyId','post','dayjs','setConfig','content','Edit','addComment','filter','OpenOrReOpen','disposeWithMe','ThreadCommentModel','CollaborationSessionService','UNIVER_UNKNOWN','solved','_initUserSync','@univerjs/thread-comment','Disposable','replies','dataSource','parse','@univerjs/thread-comment-ui','10455879HdMlkH','@univerjs/network','ref','customRanges','IConfigService','personId','resolved','_configService','18icwPPG','Delete','1844ZrUNlo','user','Solve','UserManagerService','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','_sessionService','764390unOWpe','CustomRangeType','slice','_httpService','getComment','2VVNpqo','format','Add','body','UniverInstanceType','find','payload','IThreadCommentDataSourceService','syncUpdateMutationToColla','@univerjs-pro/license','add','createTimestamp','onReady','_userService','/universer-api/comment/unit/','Plugin','rangeType','comments','/list','COMMENT','resolveComment','Unknown','forEach','_initDataSource','_commentService','symbol','rangeId','4137nXgCZO','get','onStarting','UniverThreadCommentUIPlugin','error','Reply','Inject','DependentOn','defineProperty','stringify','_threadCommentModel','userId','/delete','type','unitId','UniverCollaborationClientPlugin','length','updateComment','users','HTTPService','/edit','map','addUser','_threadCommentDataSource','delete','_injector','/reply','listComments','Solved','8PmsXer','rxjs','getOwnPropertyDescriptor','root','130rrlTMl','merge','threadId','/add','CommentService','_config','thread-comment-data-source.config','12170835BHTxdr','getCurrentUser','Injector','deleteComment'];_0x436c=function(){return _0x24b50d;};return _0x436c();}
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e519c=_0x5ceb;(function(_0x123488,_0x434d91){const _0x3fc728=_0x5ceb,_0x5acb2d=_0x123488();while(!![]){try{const _0x2f4881=parseInt(_0x3fc728(0xbc))/0x1*(parseInt(_0x3fc728(0xdf))/0x2)+-parseInt(_0x3fc728(0xae))/0x3+parseInt(_0x3fc728(0x9a))/0x4*(parseInt(_0x3fc728(0xd3))/0x5)+parseInt(_0x3fc728(0xcc))/0x6+-parseInt(_0x3fc728(0xca))/0x7+parseInt(_0x3fc728(0x9e))/0x8*(-parseInt(_0x3fc728(0xd2))/0x9)+-parseInt(_0x3fc728(0xa0))/0xa*(parseInt(_0x3fc728(0xe6))/0xb);if(_0x2f4881===_0x434d91)break;else _0x5acb2d['push'](_0x5acb2d['shift']());}catch(_0x3fc1ce){_0x5acb2d['push'](_0x5acb2d['shift']());}}}(_0x5878,0xbea9b));import{CommentService as _0x12d00b,CollaborationSessionService as _0x494f6f,UniverCollaborationClientPlugin as _0x297c90}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24c725}from'@univerjs-pro/license';import{dayjs as _0x19b6e7,UserManagerService as _0x3d615e,Inject as _0x1bd6b7,Injector as _0x1dfc40,Disposable as _0x4dbd30,CustomRangeType as _0x517552,UniverInstanceType as _0x5c3a2a,DependentOn as _0x2aafae,IConfigService as _0x4ccfd1,Plugin as _0x41074e,merge as _0x59806d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31b480}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d9488,IThreadCommentDataSourceService as _0x1e1893}from'@univerjs/thread-comment';import{bufferTime as _0x522b81}from'rxjs';import{HTTPService as _0x52a4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395eb1=>(_0x395eb1[_0x395eb1[_0x5e519c(0xda)]=0x0]=_0x5e519c(0xda),_0x395eb1[_0x395eb1[_0x5e519c(0xa9)]=0x1]=_0x5e519c(0xa9),_0x395eb1[_0x395eb1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x395eb1))(I||{}),v=(_0x3d9ea7=>(_0x3d9ea7[_0x3d9ea7['Unknown']=0x0]=_0x5e519c(0xb5),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xd8)]=0x1]=_0x5e519c(0xd8),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xdc)]=0x2]=_0x5e519c(0xdc),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0x91)]=0x3]=_0x5e519c(0x91),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc4)]=0x4]=_0x5e519c(0xc4),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xef)]=0x5]=_0x5e519c(0xef),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc7)]=-0x1]=_0x5e519c(0xc7),_0x3d9ea7))(v||{});const D=_0x268478=>_0x19b6e7(new Date(+_0x268478))[_0x5e519c(0xcb)](_0x5e519c(0xbb)),B=async(_0x262fad,_0x353302)=>{const _0x1b6b6c=_0x5e519c,_0x4f46b8=_0x262fad[_0x1b6b6c(0xee)](_0x3d615e),_0x152324=_0x262fad[_0x1b6b6c(0xee)](_0x52a4a2);_0x353302[_0x1b6b6c(0xdd)](_0x526851=>{const _0x329486=_0x1b6b6c;_0x4f46b8[_0x329486(0xa5)](_0x526851)&&_0x353302[_0x329486(0xd0)](_0x526851);}),_0x353302['size']&&(await _0x152324[_0x1b6b6c(0xee)]('/universer-api/user/list',{'params':{'userIDs':[..._0x353302]}}))[_0x1b6b6c(0xa2)][_0x1b6b6c(0xc3)][_0x1b6b6c(0xdd)](_0x42ce50=>{const _0x59dfa1=_0x1b6b6c;_0x42ce50&&_0x4f46b8[_0x59dfa1(0xd4)](_0x42ce50);});};function _0x5878(){const _0x50530a=['Reply','forEach','_sessionService','2bmXCRB','pluginName','_threadCommentDataSource','_commentService','length','dataSource','userID','11ISIPwp','comments','ref','root','parentId','/add','/reply','replyId','get','Solve','Edit','unitId','customRanges','createTimestamp','user','map','_httpService','deleteComment','type','78004utSuZr','_config','filter','getOwnPropertyDescriptor','156568aIboBl','getUnit','4452870KExamF','solved','body','post','error','getUser','requireSession','values','pipe','Solved','_init','updateComment','userId','disposeWithMe','1960779gVlxGF','_threadCommentDataSourceService','find','_threadCommentModel','resolveComment','_injector','/list','Unknown','addComment','onStarting','payload','/universer-api/comment/unit/','_initUserSync','YYYY/MM/DD\x20HH:mm','1387055JDQbjc','_configService','rangeType','_userService','getMemberID','replies','add','users','Delete','saveCommentToSnapshot','subscribe','UNRECOGNIZED','COMMENT','threadId','2179807aUEToF','format','6001866xgiKbL','/edit','personId','syncUpdateMutationToColla','delete','rangeId','144wYzrYA','30FYEQzq','addUser','commentUpdate$','code','parse','Add','listComments','OpenOrReOpen','_initDataSource'];_0x5878=function(){return _0x50530a;};return _0x5878();}var K=Object[_0x5e519c(0x9d)],V=(_0x1a6862,_0x55ac9c,_0x3d26a5,_0x236beb)=>{const _0x269ff4=_0x5e519c;for(var _0x34b007=_0x236beb>0x1?void 0x0:_0x236beb?K(_0x55ac9c,_0x3d26a5):_0x55ac9c,_0x2adf79=_0x1a6862[_0x269ff4(0xe3)]-0x1,_0x243102;_0x2adf79>=0x0;_0x2adf79--)(_0x243102=_0x1a6862[_0x2adf79])&&(_0x34b007=_0x243102(_0x34b007)||_0x34b007);return _0x34b007;},p=(_0x24b02c,_0x28b848)=>(_0x36079c,_0x3dcd39)=>_0x28b848(_0x36079c,_0x3dcd39,_0x24b02c);let S=class extends _0x4dbd30{constructor(_0x41aebb,_0x4ca893,_0x36868a,_0x54160a){const _0x51dcbf=_0x5e519c;super(),this['_commentService']=_0x41aebb,this[_0x51dcbf(0xb1)]=_0x4ca893,this['_userService']=_0x36868a,this[_0x51dcbf(0xb3)]=_0x54160a,this[_0x51dcbf(0xaa)](),this[_0x51dcbf(0xba)]();}[_0x5e519c(0xba)](){const _0x726858=_0x5e519c;this[_0x726858(0xad)](this['_threadCommentModel']['commentUpdate$'][_0x726858(0xa8)](_0x522b81(0x10))[_0x726858(0xc6)](_0x333991=>{const _0x39515e=_0x726858,_0x2d1b88=new Set();_0x333991[_0x39515e(0xdd)](_0x454762=>{const _0x17df64=_0x39515e;switch(_0x454762[_0x17df64(0x99)]){case _0x17df64(0xc2):{const _0x3ac24f=_0x454762[_0x17df64(0xb8)][_0x17df64(0xce)];_0x2d1b88[_0x17df64(0xc2)](_0x3ac24f);break;}}}),B(this['_injector'],_0x2d1b88);}));}[_0x5e519c(0xaa)](){const _0x23622b=_0x5e519c;this[_0x23622b(0xad)](this[_0x23622b(0xe2)][_0x23622b(0xd5)][_0x23622b(0xc6)](async _0x3a21ba=>{const _0x3a6884=_0x23622b;var _0x2c23de,_0xeb45f8,_0x323a45,_0xd1ce65;const _0x5db5c9=(_0x2c23de=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba['unitId'])['find'](_0x8a7d8=>_0x8a7d8[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0x2c23de['root'];if(!_0x5db5c9)return;const {unitId:_0x5b93ed,subUnitId:_0x594da2}=_0x5db5c9;switch(_0x3a21ba['user']&&this[_0x3a6884(0xbf)][_0x3a6884(0xd4)](_0x3a21ba['user']),_0x3a21ba[_0x3a6884(0x99)]){case v['Add']:break;case v[_0x3a6884(0xdc)]:{this[_0x3a6884(0xb1)]['addComment'](_0x5b93ed,_0x594da2,{'unitId':_0x5b93ed,'subUnitId':_0x594da2,'ref':'','id':_0x3a21ba[_0x3a6884(0xed)],'dT':D(+_0x3a21ba[_0x3a6884(0x94)]),'threadId':_0x3a21ba['threadId'],'personId':(_0x323a45=(_0xeb45f8=_0x3a21ba[_0x3a6884(0x95)])==null?void 0x0:_0xeb45f8[_0x3a6884(0xe5)])!=null?_0x323a45:_0x3a21ba[_0x3a6884(0xac)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content']),'parentId':_0x5db5c9['id']});break;}case v['Delete']:{const _0x33f369=this[_0x3a6884(0xb1)]['getComment'](_0x5b93ed,_0x594da2,_0x3a21ba[_0x3a6884(0xed)]);_0x33f369&&_0x33f369[_0x3a6884(0xea)]&&this['_threadCommentModel']['deleteComment'](_0x5b93ed,_0x594da2,_0x3a21ba['replyId']);break;}case v['Edit']:{this[_0x3a6884(0xb1)]['updateComment'](_0x5b93ed,_0x594da2,{'commentId':_0x3a21ba[_0x3a6884(0xed)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content'])});break;}case v[_0x3a6884(0xef)]:{const _0x28a6ae=(_0xd1ce65=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba[_0x3a6884(0x92)])[_0x3a6884(0xb0)](_0x485aec=>_0x485aec[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0xd1ce65[_0x3a6884(0xe9)];_0x28a6ae&&this[_0x3a6884(0xb1)][_0x3a6884(0xb2)](_0x5b93ed,_0x594da2,_0x28a6ae['id'],_0x3a21ba['solved']===I[_0x3a6884(0xa9)]);break;}}}));}};S=V([p(0x0,_0x1bd6b7(_0x12d00b)),p(0x1,_0x1bd6b7(_0x2d9488)),p(0x2,_0x1bd6b7(_0x3d615e)),p(0x3,_0x1bd6b7(_0x1dfc40))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x126e9c,_0xe5cf5c,_0x420c12,_0x1a178f)=>{const _0x19ae95=_0x5e519c;for(var _0x272145=_0x1a178f>0x1?void 0x0:_0x1a178f?k(_0xe5cf5c,_0x420c12):_0xe5cf5c,_0x5b4cec=_0x126e9c[_0x19ae95(0xe3)]-0x1,_0x137b66;_0x5b4cec>=0x0;_0x5b4cec--)(_0x137b66=_0x126e9c[_0x5b4cec])&&(_0x272145=_0x137b66(_0x272145)||_0x272145);return _0x272145;},_=(_0x26a1f4,_0x281b8d)=>(_0x584d65,_0x22df2d)=>_0x281b8d(_0x584d65,_0x22df2d,_0x26a1f4);function X(_0x480b96,_0x1fe62d){const _0x22c521=_0x5e519c,_0x41c193=_0x480b96[_0x22c521(0xc1)][0x0];return{..._0x1fe62d,'id':_0x41c193['replyId'],'resolved':_0x480b96[_0x22c521(0xa1)]===0x1,'dT':D(_0x41c193[_0x22c521(0x94)]),'personId':_0x41c193['userId'],'threadId':_0x41c193['threadId']};}function ee(_0x788a95,_0x16985f,_0x284a63){const _0x3568bc=_0x5e519c;var _0xa97886,_0x2e28b7;if(((_0x2e28b7=(_0xa97886=_0x788a95==null?void 0x0:_0x788a95[_0x3568bc(0xc1)])==null?void 0x0:_0xa97886[_0x3568bc(0xe3)])!=null?_0x2e28b7:0x0)>0x0){const _0x3a66dd=(_0x4f17ed,_0x2f2aa3)=>({'id':_0x4f17ed['replyId'],'threadId':_0x4f17ed[_0x3568bc(0xc9)],'dT':D(_0x4f17ed[_0x3568bc(0x94)]),'personId':_0x4f17ed['userId'],'resolved':_0x788a95[_0x3568bc(0xa1)]===I[_0x3568bc(0xa9)],'unitId':_0x16985f,'subUnitId':_0x284a63,'text':JSON[_0x3568bc(0xd7)](_0x4f17ed['content']),'parentId':_0x2f2aa3}),_0x4a2743=_0x3a66dd(_0x788a95[_0x3568bc(0xc1)][0x0]);return{..._0x4a2743,'children':_0x788a95['replies']['slice'](0x1)[_0x3568bc(0x96)](_0x4c26c8=>_0x3a66dd(_0x4c26c8,_0x4a2743['id']))};}return null;}let f=class{constructor(_0x4a0a55,_0x46b7ec,_0x1193db,_0x3af4c8){const _0x52c118=_0x5e519c;this[_0x52c118(0x97)]=_0x4a0a55,this['_userService']=_0x46b7ec,this['_sessionService']=_0x1193db,this[_0x52c118(0xb3)]=_0x3af4c8;}async[_0x5e519c(0xb6)](_0xa173bc){const _0x5d729b=_0x5e519c;var _0x2ca814,_0x20a6b1;const {parentId:_0x339b09,unitId:_0x419960,text:_0x5f52be,threadId:_0x82adbd}=_0xa173bc,_0xd4d1e2=(_0x20a6b1=(_0x2ca814=_0x5f52be[_0x5d729b(0x93)])==null?void 0x0:_0x2ca814[_0x5d729b(0x9c)](_0x619ef8=>_0x619ef8[_0x5d729b(0xbe)]===_0x517552[_0x5d729b(0xc8)])['map'](_0x96f5de=>_0x96f5de[_0x5d729b(0xd1)]))!=null?_0x20a6b1:[],_0x4695e9=JSON['stringify'](_0x5f52be),_0x231617=(await this[_0x5d729b(0xde)][_0x5d729b(0xa6)](_0x419960))[_0x5d729b(0xc0)]();if(_0x339b09){const _0x3dcf31={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2,'threadId':_0x82adbd},_0x1c7184=(await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xec),{'body':_0x3dcf31}))[_0x5d729b(0xa2)]['reply'];return{..._0xa173bc,'id':_0x1c7184[_0x5d729b(0xed)],'dT':_0x19b6e7(+_0x1c7184['createTimestamp'])[_0x5d729b(0xcb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1c7184[_0x5d729b(0xac)]};}else{const _0x5895a0={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2},_0x57a9e2=await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xeb),{'body':_0x5895a0});return X(_0x57a9e2['body']['comment'],_0xa173bc);}}async[_0x5e519c(0xab)](_0x5ba388){const _0x146c7b=_0x5e519c;var _0x311480,_0x4049e4;const {text:_0x290947,unitId:_0x11be01}=_0x5ba388,_0x42fc8c=(_0x4049e4=(_0x311480=_0x290947[_0x146c7b(0x93)])==null?void 0x0:_0x311480['filter'](_0x4c81b6=>_0x4c81b6[_0x146c7b(0xbe)]===_0x517552[_0x146c7b(0xc8)])[_0x146c7b(0x96)](_0x491c81=>_0x491c81[_0x146c7b(0xd1)]))!=null?_0x4049e4:[],_0x38ccac=JSON['stringify'](_0x290947),_0x28705f=_0x5ba388[_0x146c7b(0xc9)],_0x7635d8=_0x5ba388['id'],_0x3dc1f1={'memberId':(await this[_0x146c7b(0xde)][_0x146c7b(0xa6)](_0x11be01))[_0x146c7b(0xc0)](),'unitId':_0x11be01,'threadId':_0x28705f,'mention':_0x42fc8c,'content':_0x38ccac,'replyId':_0x7635d8},_0x129bcf=await this[_0x146c7b(0x97)][_0x146c7b(0xa3)]('/universer-api/comment/unit/'+_0x11be01+_0x146c7b(0xcd),{'body':_0x3dc1f1});return!_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)]||_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)][_0x146c7b(0xd6)]===0x1;}async['resolveComment'](_0x55be80){const _0x92af12=_0x5e519c,{unitId:_0x1a91b1}=_0x55be80,_0x4e663e=_0x55be80[_0x92af12(0xc9)],_0x475f70={'memberId':this['_userService']['getCurrentUser']()[_0x92af12(0xe5)],'unitId':_0x1a91b1,'threadId':_0x4e663e,'solved':_0x55be80['resolved']?I[_0x92af12(0xa9)]:I[_0x92af12(0xda)]},_0x180eca=await this[_0x92af12(0x97)][_0x92af12(0xa3)]('/universer-api/comment/unit/'+_0x1a91b1+'/solved',{'body':_0x475f70});return!_0x180eca[_0x92af12(0xa2)]['error']||_0x180eca[_0x92af12(0xa2)][_0x92af12(0xa4)]['code']===0x1;}async[_0x5e519c(0x98)](_0x58645b,_0x4e7965,_0x17e333,_0x4f1b06){const _0x1ec86c=_0x5e519c,_0xa7fbde={'memberId':(await this[_0x1ec86c(0xde)][_0x1ec86c(0xa6)](_0x58645b))[_0x1ec86c(0xc0)](),'threadId':_0x17e333,'replyId':_0x4f1b06,'unitId':_0x58645b},_0x5d410c=await this[_0x1ec86c(0x97)][_0x1ec86c(0xa3)](_0x1ec86c(0xb9)+_0x58645b+'/delete',{'body':_0xa7fbde});return!_0x5d410c['body'][_0x1ec86c(0xa4)]||_0x5d410c[_0x1ec86c(0xa2)][_0x1ec86c(0xa4)][_0x1ec86c(0xd6)]===0x1;}async[_0x5e519c(0xd9)](_0x3feefd,_0x25d00d,_0x3cd881){const _0x55c250=_0x5e519c,_0x42cacf={'unitId':_0x3feefd,'threadId':_0x3cd881},_0x58bd70=await this[_0x55c250(0x97)][_0x55c250(0xa3)](_0x55c250(0xb9)+_0x3feefd+_0x55c250(0xb4),{'body':_0x42cacf}),_0x3159b5=_0x3cd881['map'](_0x3fee24=>ee(_0x58bd70['body'][_0x55c250(0xe7)][_0x3fee24],_0x3feefd,_0x25d00d))['filter'](Boolean);return Object[_0x55c250(0xa7)](_0x58bd70['body']['users'])[_0x55c250(0xdd)](_0x236fed=>{const _0x5bcb36=_0x55c250;this['_userService'][_0x5bcb36(0xd4)](_0x236fed);}),_0x3159b5;}[_0x5e519c(0xc5)](_0x442952){const _0x7578a2=_0x5e519c;return{'id':_0x442952['id'],'threadId':_0x442952[_0x7578a2(0xc9)],'ref':_0x442952[_0x7578a2(0xe8)]};}};f=Q([_(0x0,_0x1bd6b7(_0x52a4a2)),_(0x1,_0x1bd6b7(_0x3d615e)),_(0x2,_0x1bd6b7(_0x494f6f)),_(0x3,_0x1bd6b7(_0x1dfc40))],f);var re=Object[_0x5e519c(0x9d)],te=(_0x17877c,_0xcf2c87,_0x2e7c25,_0x54ff9e)=>{const _0x2d5414=_0x5e519c;for(var _0x4ac2c0=_0x54ff9e>0x1?void 0x0:_0x54ff9e?re(_0xcf2c87,_0x2e7c25):_0xcf2c87,_0x6292eb=_0x17877c[_0x2d5414(0xe3)]-0x1,_0x1f4304;_0x6292eb>=0x0;_0x6292eb--)(_0x1f4304=_0x17877c[_0x6292eb])&&(_0x4ac2c0=_0x1f4304(_0x4ac2c0)||_0x4ac2c0);return _0x4ac2c0;},N=(_0x5dc274,_0x153500)=>(_0x428cc3,_0x199ebd)=>_0x153500(_0x428cc3,_0x199ebd,_0x5dc274);let g=class extends _0x4dbd30{constructor(_0x2ff542,_0x37e7ba){const _0x4d4df0=_0x5e519c;super(),this[_0x4d4df0(0xaf)]=_0x2ff542,this[_0x4d4df0(0xe1)]=_0x37e7ba,this[_0x4d4df0(0xdb)]();}['_initDataSource'](){const _0x393965=_0x5e519c;this[_0x393965(0xaf)][_0x393965(0xe4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x393965(0xcf)]=!0x1;}};g=te([N(0x0,_0x1e1893),N(0x1,_0x1bd6b7(f))],g);var se=Object['defineProperty'],oe=Object[_0x5e519c(0x9d)],ne=(_0x35ad40,_0x447367,_0x3dff44)=>_0x447367 in _0x35ad40?se(_0x35ad40,_0x447367,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dff44}):_0x35ad40[_0x447367]=_0x3dff44,ie=(_0x5dff54,_0x3381e2,_0x1c99ce,_0x2503ae)=>{const _0x548b72=_0x5e519c;for(var _0x3b1f82=_0x2503ae>0x1?void 0x0:_0x2503ae?oe(_0x3381e2,_0x1c99ce):_0x3381e2,_0x4eb2=_0x5dff54[_0x548b72(0xe3)]-0x1,_0x4723f0;_0x4eb2>=0x0;_0x4eb2--)(_0x4723f0=_0x5dff54[_0x4eb2])&&(_0x3b1f82=_0x4723f0(_0x3b1f82)||_0x3b1f82);return _0x3b1f82;},w=(_0x58e0ee,_0x58a975)=>(_0x1623a2,_0x3e7078)=>_0x58a975(_0x1623a2,_0x3e7078,_0x58e0ee),$=(_0x41cd99,_0x2b58bb,_0x2e1e76)=>ne(_0x41cd99,typeof _0x2b58bb!='symbol'?_0x2b58bb+'':_0x2b58bb,_0x2e1e76);function _0x5ceb(_0x44b9cb,_0x5cec12){const _0x587803=_0x5878();return _0x5ceb=function(_0x5ceb85,_0x45c382){_0x5ceb85=_0x5ceb85-0x91;let _0x1f9fd2=_0x587803[_0x5ceb85];return _0x1f9fd2;},_0x5ceb(_0x44b9cb,_0x5cec12);}let b=class extends _0x41074e{constructor(_0x29bf7a=M,_0x2d535e,_0x27f7e0){const _0x2ea9fb=_0x5e519c;super(),this['_config']=_0x29bf7a,this[_0x2ea9fb(0xb3)]=_0x2d535e,this[_0x2ea9fb(0xbd)]=_0x27f7e0;const {..._0x3af099}=_0x59806d({},M,this[_0x2ea9fb(0x9b)]);this[_0x2ea9fb(0xbd)]['setConfig'](z,_0x3af099);}[_0x5e519c(0xb7)](){const _0x207c21=_0x5e519c;[[f],[g],[S]][_0x207c21(0xdd)](_0x342c0c=>{const _0x2e5340=_0x207c21;this[_0x2e5340(0xb3)]['add'](_0x342c0c);});}['onReady'](){const _0x4cafb7=_0x5e519c;this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](g),this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](S);}};$(b,_0x5e519c(0xe0),W),$(b,_0x5e519c(0x99),_0x5c3a2a['UNIVER_UNKNOWN']),b=ie([_0x2aafae(_0x31b480,_0x297c90,_0x24c725),w(0x1,_0x1bd6b7(_0x1dfc40)),w(0x2,_0x4ccfd1)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x8eb16d=_0xa644;(function(_0x26f565,_0x4a5003){const _0x54cbc0=_0xa644,_0x11892c=_0x26f565();while(!![]){try{const _0x4e8a81=-parseInt(_0x54cbc0(0x181))/0x1*(parseInt(_0x54cbc0(0x1c4))/0x2)+-parseInt(_0x54cbc0(0x19a))/0x3*(-parseInt(_0x54cbc0(0x16b))/0x4)+parseInt(_0x54cbc0(0x176))/0x5+parseInt(_0x54cbc0(0x16e))/0x6*(-parseInt(_0x54cbc0(0x1a9))/0x7)+parseInt(_0x54cbc0(0x194))/0x8+-parseInt(_0x54cbc0(0x177))/0x9+parseInt(_0x54cbc0(0x1a7))/0xa;if(_0x4e8a81===_0x4a5003)break;else _0x11892c['push'](_0x11892c['shift']());}catch(_0x47526e){_0x11892c['push'](_0x11892c['shift']());}}}(_0x118a,0x2f9ea));import{CommentService as _0x1ccc3b,CollaborationSessionService as _0x3d3196,UniverCollaborationClientPlugin as _0x2caa97}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe51017}from'@univerjs-pro/license';import{dayjs as _0x5eb8ae,UserManagerService as _0x4ba4f5,Inject as _0xdc24c4,Injector as _0x446729,Disposable as _0x4f817d,CustomRangeType as _0x19605a,UniverInstanceType as _0x20c5bd,DependentOn as _0x5aa5bd,IConfigService as _0x17f2a0,Plugin as _0x1d9dc9,merge as _0x147312}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24bb62}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5c51a6,IThreadCommentDataSourceService as _0x1004f0}from'@univerjs/thread-comment';import{bufferTime as _0x200bd8}from'rxjs';import{HTTPService as _0x40e085}from'@univerjs/network';const W=_0x8eb16d(0x180);var I=(_0x4ed037=>(_0x4ed037[_0x4ed037[_0x8eb16d(0x1a2)]=0x0]='OpenOrReOpen',_0x4ed037[_0x4ed037[_0x8eb16d(0x1ce)]=0x1]=_0x8eb16d(0x1ce),_0x4ed037[_0x4ed037[_0x8eb16d(0x191)]=-0x1]='UNRECOGNIZED',_0x4ed037))(I||{}),v=(_0x4bf901=>(_0x4bf901[_0x4bf901[_0x8eb16d(0x192)]=0x0]=_0x8eb16d(0x192),_0x4bf901[_0x4bf901[_0x8eb16d(0x17e)]=0x1]=_0x8eb16d(0x17e),_0x4bf901[_0x4bf901['Reply']=0x2]='Reply',_0x4bf901[_0x4bf901[_0x8eb16d(0x17d)]=0x3]=_0x8eb16d(0x17d),_0x4bf901[_0x4bf901['Delete']=0x4]=_0x8eb16d(0x1b7),_0x4bf901[_0x4bf901[_0x8eb16d(0x197)]=0x5]=_0x8eb16d(0x197),_0x4bf901[_0x4bf901[_0x8eb16d(0x191)]=-0x1]=_0x8eb16d(0x191),_0x4bf901))(v||{});function _0x118a(){const _0x46d758=['6329fRKInW','syncUpdateMutationToColla','solved','parentId','customRanges','getMemberID','get','ref','saveCommentToSnapshot','_initUserSync','error','replyId','COMMENT','size','_threadCommentDataSource','length','UNRECOGNIZED','Unknown','userId','1711568NOOgTA','pipe','dataSource','Solve','getUser','content','3RcYeMr','_init','commentUpdate$','subscribe','/add','_config','setConfig','updateComment','OpenOrReOpen','user','getComment','symbol','add','4622420jpGjrG','body','1059730qnvOdn','payload','type','_httpService','createTimestamp','onStarting','userID','filter','root','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initDataSource','unitId','find','Delete','deleteComment','pluginName','reply','parse','Reply','defineProperty','_sessionService','_injector','UNIVER_UNKNOWN','post','/delete','/universer-api/user/list','56oJQoaw','threadId','/universer-api/comment/unit/','/list','forEach','listComments','users','_userService','map','values','Solved','replies','116868tYUBEI','_threadCommentModel','getCurrentUser','6dqmWOu','resolveComment','rangeId','addComment','_commentService','stringify','/solved','addUser','1028480wZfnXW','3487041OtjmXa','requireSession','getOwnPropertyDescriptor','getUnit','disposeWithMe','code','Edit','Add','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x118a=function(){return _0x46d758;};return _0x118a();}const D=_0x142eb4=>_0x5eb8ae(new Date(+_0x142eb4))['format'](_0x8eb16d(0x1b2)),B=async(_0x342391,_0x1ee11b)=>{const _0x3a57ee=_0x8eb16d,_0x30d120=_0x342391[_0x3a57ee(0x187)](_0x4ba4f5),_0xa4e10e=_0x342391[_0x3a57ee(0x187)](_0x40e085);_0x1ee11b[_0x3a57ee(0x1c8)](_0xf2ed1d=>{const _0x25ad56=_0x3a57ee;_0x30d120[_0x25ad56(0x198)](_0xf2ed1d)&&_0x1ee11b['delete'](_0xf2ed1d);}),_0x1ee11b[_0x3a57ee(0x18e)]&&(await _0xa4e10e[_0x3a57ee(0x187)](_0x3a57ee(0x1c3),{'params':{'userIDs':[..._0x1ee11b]}}))[_0x3a57ee(0x1a8)][_0x3a57ee(0x1ca)]['forEach'](_0x3019f4=>{const _0x281dd2=_0x3a57ee;_0x3019f4&&_0x30d120[_0x281dd2(0x175)](_0x3019f4);});};var K=Object[_0x8eb16d(0x179)],V=(_0x3c5927,_0x5460f6,_0x354784,_0x17d86c)=>{for(var _0x58200e=_0x17d86c>0x1?void 0x0:_0x17d86c?K(_0x5460f6,_0x354784):_0x5460f6,_0x5be380=_0x3c5927['length']-0x1,_0x4f4b0b;_0x5be380>=0x0;_0x5be380--)(_0x4f4b0b=_0x3c5927[_0x5be380])&&(_0x58200e=_0x4f4b0b(_0x58200e)||_0x58200e);return _0x58200e;},p=(_0x404226,_0x10b535)=>(_0x5efc4f,_0x5a6ec1)=>_0x10b535(_0x5efc4f,_0x5a6ec1,_0x404226);let S=class extends _0x4f817d{constructor(_0x3cb562,_0x2ffe30,_0x1dd3ff,_0x57a9dc){const _0x206d68=_0x8eb16d;super(),this['_commentService']=_0x3cb562,this[_0x206d68(0x16c)]=_0x2ffe30,this['_userService']=_0x1dd3ff,this['_injector']=_0x57a9dc,this[_0x206d68(0x19b)](),this[_0x206d68(0x18a)]();}[_0x8eb16d(0x18a)](){const _0x389b82=_0x8eb16d;this[_0x389b82(0x17b)](this[_0x389b82(0x16c)]['commentUpdate$'][_0x389b82(0x195)](_0x200bd8(0x10))[_0x389b82(0x19d)](_0x1eff56=>{const _0x486510=_0x389b82,_0xa1cf08=new Set();_0x1eff56[_0x486510(0x1c8)](_0x377008=>{const _0x1c4306=_0x486510;switch(_0x377008[_0x1c4306(0x1ab)]){case _0x1c4306(0x1a6):{const _0x5e5b80=_0x377008[_0x1c4306(0x1aa)]['personId'];_0xa1cf08[_0x1c4306(0x1a6)](_0x5e5b80);break;}}}),B(this[_0x486510(0x1bf)],_0xa1cf08);}));}['_init'](){const _0x4cb971=_0x8eb16d;this['disposeWithMe'](this[_0x4cb971(0x172)][_0x4cb971(0x19c)][_0x4cb971(0x19d)](async _0x80891f=>{const _0x27846d=_0x4cb971;var _0x2c0708,_0x16aaed,_0x1dbd4f,_0x479cc1;const _0xe01919=(_0x2c0708=this[_0x27846d(0x16c)][_0x27846d(0x17a)](_0x80891f['unitId'])[_0x27846d(0x1b6)](_0x17b8ca=>_0x17b8ca[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x2c0708[_0x27846d(0x1b1)];if(!_0xe01919)return;const {unitId:_0x24c545,subUnitId:_0x506b4d}=_0xe01919;switch(_0x80891f['user']&&this[_0x27846d(0x1cb)]['addUser'](_0x80891f[_0x27846d(0x1a3)]),_0x80891f[_0x27846d(0x1ab)]){case v[_0x27846d(0x17e)]:break;case v[_0x27846d(0x1bc)]:{this[_0x27846d(0x16c)][_0x27846d(0x171)](_0x24c545,_0x506b4d,{'unitId':_0x24c545,'subUnitId':_0x506b4d,'ref':'','id':_0x80891f[_0x27846d(0x18c)],'dT':D(+_0x80891f[_0x27846d(0x1ad)]),'threadId':_0x80891f[_0x27846d(0x1c5)],'personId':(_0x1dbd4f=(_0x16aaed=_0x80891f[_0x27846d(0x1a3)])==null?void 0x0:_0x16aaed['userID'])!=null?_0x1dbd4f:_0x80891f['userId'],'text':JSON[_0x27846d(0x1bb)](_0x80891f['content']),'parentId':_0xe01919['id']});break;}case v[_0x27846d(0x1b7)]:{const _0x121518=this['_threadCommentModel'][_0x27846d(0x1a4)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);_0x121518&&_0x121518[_0x27846d(0x184)]&&this[_0x27846d(0x16c)][_0x27846d(0x1b8)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);break;}case v[_0x27846d(0x17d)]:{this[_0x27846d(0x16c)][_0x27846d(0x1a1)](_0x24c545,_0x506b4d,{'commentId':_0x80891f[_0x27846d(0x18c)],'text':JSON['parse'](_0x80891f[_0x27846d(0x199)])});break;}case v[_0x27846d(0x197)]:{const _0x52d86e=(_0x479cc1=this[_0x27846d(0x16c)]['getUnit'](_0x80891f[_0x27846d(0x1b5)])[_0x27846d(0x1b6)](_0x3f9878=>_0x3f9878[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x479cc1[_0x27846d(0x1b1)];_0x52d86e&&this[_0x27846d(0x16c)]['resolveComment'](_0x24c545,_0x506b4d,_0x52d86e['id'],_0x80891f[_0x27846d(0x183)]===I[_0x27846d(0x1ce)]);break;}}}));}};S=V([p(0x0,_0xdc24c4(_0x1ccc3b)),p(0x1,_0xdc24c4(_0x5c51a6)),p(0x2,_0xdc24c4(_0x4ba4f5)),p(0x3,_0xdc24c4(_0x446729))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c693,_0x4d23a6,_0x2984df,_0xa31c13)=>{for(var _0xdc3e2d=_0xa31c13>0x1?void 0x0:_0xa31c13?k(_0x4d23a6,_0x2984df):_0x4d23a6,_0x36cdd9=_0x17c693['length']-0x1,_0x54f304;_0x36cdd9>=0x0;_0x36cdd9--)(_0x54f304=_0x17c693[_0x36cdd9])&&(_0xdc3e2d=_0x54f304(_0xdc3e2d)||_0xdc3e2d);return _0xdc3e2d;},_=(_0xe4c82f,_0x57f10e)=>(_0x16a164,_0x55a361)=>_0x57f10e(_0x16a164,_0x55a361,_0xe4c82f);function X(_0x5d0474,_0x1f2072){const _0x1b1af5=_0x8eb16d,_0x4ec919=_0x5d0474[_0x1b1af5(0x16a)][0x0];return{..._0x1f2072,'id':_0x4ec919['replyId'],'resolved':_0x5d0474[_0x1b1af5(0x183)]===0x1,'dT':D(_0x4ec919[_0x1b1af5(0x1ad)]),'personId':_0x4ec919['userId'],'threadId':_0x4ec919[_0x1b1af5(0x1c5)]};}function ee(_0x1dc058,_0x1d33a1,_0x4a29b8){const _0x3e4429=_0x8eb16d;var _0x16905e,_0x380e3e;if(((_0x380e3e=(_0x16905e=_0x1dc058==null?void 0x0:_0x1dc058[_0x3e4429(0x16a)])==null?void 0x0:_0x16905e[_0x3e4429(0x190)])!=null?_0x380e3e:0x0)>0x0){const _0x12a6fc=(_0x26be21,_0x102ff0)=>({'id':_0x26be21[_0x3e4429(0x18c)],'threadId':_0x26be21[_0x3e4429(0x1c5)],'dT':D(_0x26be21['createTimestamp']),'personId':_0x26be21[_0x3e4429(0x193)],'resolved':_0x1dc058[_0x3e4429(0x183)]===I['Solved'],'unitId':_0x1d33a1,'subUnitId':_0x4a29b8,'text':JSON[_0x3e4429(0x1bb)](_0x26be21[_0x3e4429(0x199)]),'parentId':_0x102ff0}),_0xa1c339=_0x12a6fc(_0x1dc058[_0x3e4429(0x16a)][0x0]);return{..._0xa1c339,'children':_0x1dc058[_0x3e4429(0x16a)]['slice'](0x1)['map'](_0x4353c8=>_0x12a6fc(_0x4353c8,_0xa1c339['id']))};}return null;}let f=class{constructor(_0xd527d1,_0x7b2f99,_0x5854ac,_0x43c529){const _0x16cda7=_0x8eb16d;this[_0x16cda7(0x1ac)]=_0xd527d1,this['_userService']=_0x7b2f99,this[_0x16cda7(0x1be)]=_0x5854ac,this[_0x16cda7(0x1bf)]=_0x43c529;}async['addComment'](_0x4e7085){const _0x3cabd4=_0x8eb16d;var _0x3d1b7c,_0x559fb9;const {parentId:_0x2ba49e,unitId:_0x460949,text:_0x1deed3,threadId:_0x96e33}=_0x4e7085,_0x3a2114=(_0x559fb9=(_0x3d1b7c=_0x1deed3[_0x3cabd4(0x185)])==null?void 0x0:_0x3d1b7c['filter'](_0x3cee94=>_0x3cee94['rangeType']===_0x19605a[_0x3cabd4(0x18d)])[_0x3cabd4(0x1cc)](_0x570fe8=>_0x570fe8['rangeId']))!=null?_0x559fb9:[],_0x4e9bb1=JSON[_0x3cabd4(0x173)](_0x1deed3),_0xaf8c4=(await this['_sessionService'][_0x3cabd4(0x178)](_0x460949))[_0x3cabd4(0x186)]();if(_0x2ba49e){const _0x3c9c5e={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114,'threadId':_0x96e33},_0x7d3202=(await this[_0x3cabd4(0x1ac)][_0x3cabd4(0x1c1)](_0x3cabd4(0x1c6)+_0x460949+'/reply',{'body':_0x3c9c5e}))['body'][_0x3cabd4(0x1ba)];return{..._0x4e7085,'id':_0x7d3202[_0x3cabd4(0x18c)],'dT':_0x5eb8ae(+_0x7d3202[_0x3cabd4(0x1ad)])['format'](_0x3cabd4(0x1b2)),'personId':_0x7d3202['userId']};}else{const _0x4f2575={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114},_0x5d5519=await this[_0x3cabd4(0x1ac)]['post'](_0x3cabd4(0x1c6)+_0x460949+_0x3cabd4(0x19e),{'body':_0x4f2575});return X(_0x5d5519[_0x3cabd4(0x1a8)]['comment'],_0x4e7085);}}async[_0x8eb16d(0x1a1)](_0x1d395f){const _0x31ebd5=_0x8eb16d;var _0x68d19,_0x45e08e;const {text:_0x16f826,unitId:_0x3aa872}=_0x1d395f,_0x47db8e=(_0x45e08e=(_0x68d19=_0x16f826[_0x31ebd5(0x185)])==null?void 0x0:_0x68d19[_0x31ebd5(0x1b0)](_0x28b20f=>_0x28b20f['rangeType']===_0x19605a[_0x31ebd5(0x18d)])[_0x31ebd5(0x1cc)](_0x31cdbd=>_0x31cdbd[_0x31ebd5(0x170)]))!=null?_0x45e08e:[],_0x65d2a2=JSON[_0x31ebd5(0x173)](_0x16f826),_0x2bdbe0=_0x1d395f[_0x31ebd5(0x1c5)],_0xfbdfbc=_0x1d395f['id'],_0x51b782={'memberId':(await this[_0x31ebd5(0x1be)][_0x31ebd5(0x178)](_0x3aa872))[_0x31ebd5(0x186)](),'unitId':_0x3aa872,'threadId':_0x2bdbe0,'mention':_0x47db8e,'content':_0x65d2a2,'replyId':_0xfbdfbc},_0x42177c=await this[_0x31ebd5(0x1ac)][_0x31ebd5(0x1c1)](_0x31ebd5(0x1c6)+_0x3aa872+'/edit',{'body':_0x51b782});return!_0x42177c[_0x31ebd5(0x1a8)]['error']||_0x42177c[_0x31ebd5(0x1a8)][_0x31ebd5(0x18b)][_0x31ebd5(0x17c)]===0x1;}async[_0x8eb16d(0x16f)](_0xc6e78){const _0x2cf62b=_0x8eb16d,{unitId:_0x1094dc}=_0xc6e78,_0x3577a6=_0xc6e78[_0x2cf62b(0x1c5)],_0x52d09a={'memberId':this['_userService'][_0x2cf62b(0x16d)]()[_0x2cf62b(0x1af)],'unitId':_0x1094dc,'threadId':_0x3577a6,'solved':_0xc6e78['resolved']?I['Solved']:I[_0x2cf62b(0x1a2)]},_0x4e9c2e=await this[_0x2cf62b(0x1ac)]['post']('/universer-api/comment/unit/'+_0x1094dc+_0x2cf62b(0x174),{'body':_0x52d09a});return!_0x4e9c2e[_0x2cf62b(0x1a8)][_0x2cf62b(0x18b)]||_0x4e9c2e['body'][_0x2cf62b(0x18b)][_0x2cf62b(0x17c)]===0x1;}async[_0x8eb16d(0x1b8)](_0x33b212,_0x495a01,_0x267a16,_0x418271){const _0x8964af=_0x8eb16d,_0x22d066={'memberId':(await this[_0x8964af(0x1be)]['requireSession'](_0x33b212))[_0x8964af(0x186)](),'threadId':_0x267a16,'replyId':_0x418271,'unitId':_0x33b212},_0x1d20bb=await this[_0x8964af(0x1ac)]['post']('/universer-api/comment/unit/'+_0x33b212+_0x8964af(0x1c2),{'body':_0x22d066});return!_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)]||_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)][_0x8964af(0x17c)]===0x1;}async[_0x8eb16d(0x1c9)](_0x27fe30,_0x4c6d96,_0xfce698){const _0x323c5f=_0x8eb16d,_0x2f967c={'unitId':_0x27fe30,'threadId':_0xfce698},_0xbcffa5=await this[_0x323c5f(0x1ac)][_0x323c5f(0x1c1)](_0x323c5f(0x1c6)+_0x27fe30+_0x323c5f(0x1c7),{'body':_0x2f967c}),_0x245734=_0xfce698['map'](_0x1092d9=>ee(_0xbcffa5[_0x323c5f(0x1a8)]['comments'][_0x1092d9],_0x27fe30,_0x4c6d96))[_0x323c5f(0x1b0)](Boolean);return Object[_0x323c5f(0x1cd)](_0xbcffa5[_0x323c5f(0x1a8)][_0x323c5f(0x1ca)])[_0x323c5f(0x1c8)](_0x1d3b4f=>{const _0x263c53=_0x323c5f;this['_userService'][_0x263c53(0x175)](_0x1d3b4f);}),_0x245734;}[_0x8eb16d(0x189)](_0x471f37){const _0xa6d548=_0x8eb16d;return{'id':_0x471f37['id'],'threadId':_0x471f37['threadId'],'ref':_0x471f37[_0xa6d548(0x188)]};}};f=Q([_(0x0,_0xdc24c4(_0x40e085)),_(0x1,_0xdc24c4(_0x4ba4f5)),_(0x2,_0xdc24c4(_0x3d3196)),_(0x3,_0xdc24c4(_0x446729))],f);function _0xa644(_0x4637c9,_0x265c74){const _0x118a90=_0x118a();return _0xa644=function(_0xa64400,_0x274b13){_0xa64400=_0xa64400-0x16a;let _0x3234dd=_0x118a90[_0xa64400];return _0x3234dd;},_0xa644(_0x4637c9,_0x265c74);}var re=Object[_0x8eb16d(0x179)],te=(_0x303b71,_0x52317d,_0x3de470,_0x264898)=>{for(var _0x2d7bfe=_0x264898>0x1?void 0x0:_0x264898?re(_0x52317d,_0x3de470):_0x52317d,_0x58bd3d=_0x303b71['length']-0x1,_0x1a17c3;_0x58bd3d>=0x0;_0x58bd3d--)(_0x1a17c3=_0x303b71[_0x58bd3d])&&(_0x2d7bfe=_0x1a17c3(_0x2d7bfe)||_0x2d7bfe);return _0x2d7bfe;},N=(_0x1ba854,_0x260363)=>(_0x42d615,_0x95e093)=>_0x260363(_0x42d615,_0x95e093,_0x1ba854);let g=class extends _0x4f817d{constructor(_0x248f39,_0x16617b){const _0x2dac32=_0x8eb16d;super(),this[_0x2dac32(0x1b3)]=_0x248f39,this['_threadCommentDataSource']=_0x16617b,this[_0x2dac32(0x1b4)]();}[_0x8eb16d(0x1b4)](){const _0x52ad67=_0x8eb16d;this['_threadCommentDataSourceService'][_0x52ad67(0x196)]=this[_0x52ad67(0x18f)],this['_threadCommentDataSourceService'][_0x52ad67(0x182)]=!0x1;}};g=te([N(0x0,_0x1004f0),N(0x1,_0xdc24c4(f))],g);var se=Object[_0x8eb16d(0x1bd)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x19bb16,_0x95b4f1,_0x3fbb49)=>_0x95b4f1 in _0x19bb16?se(_0x19bb16,_0x95b4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fbb49}):_0x19bb16[_0x95b4f1]=_0x3fbb49,ie=(_0x3402be,_0x5b174a,_0x42d9bb,_0x28c724)=>{const _0x3c25d5=_0x8eb16d;for(var _0x48d123=_0x28c724>0x1?void 0x0:_0x28c724?oe(_0x5b174a,_0x42d9bb):_0x5b174a,_0x1b8a30=_0x3402be[_0x3c25d5(0x190)]-0x1,_0x28e325;_0x1b8a30>=0x0;_0x1b8a30--)(_0x28e325=_0x3402be[_0x1b8a30])&&(_0x48d123=_0x28e325(_0x48d123)||_0x48d123);return _0x48d123;},w=(_0x1724c1,_0x44ebcd)=>(_0x21969d,_0x194b4d)=>_0x44ebcd(_0x21969d,_0x194b4d,_0x1724c1),$=(_0x1fef6b,_0x57c003,_0x17f93f)=>ne(_0x1fef6b,typeof _0x57c003!=_0x8eb16d(0x1a5)?_0x57c003+'':_0x57c003,_0x17f93f);let b=class extends _0x1d9dc9{constructor(_0x210702=M,_0x227bab,_0x2a3f5a){const _0x3d47bc=_0x8eb16d;super(),this[_0x3d47bc(0x19f)]=_0x210702,this['_injector']=_0x227bab,this['_configService']=_0x2a3f5a;const {..._0x3fc915}=_0x147312({},M,this[_0x3d47bc(0x19f)]);this['_configService'][_0x3d47bc(0x1a0)](z,_0x3fc915);}[_0x8eb16d(0x1ae)](){const _0x46d7bd=_0x8eb16d;[[f],[g],[S]][_0x46d7bd(0x1c8)](_0xb809a5=>{const _0x4f1008=_0x46d7bd;this[_0x4f1008(0x1bf)]['add'](_0xb809a5);});}[_0x8eb16d(0x17f)](){const _0x19a14d=_0x8eb16d;this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](g),this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](S);}};$(b,_0x8eb16d(0x1b9),W),$(b,'type',_0x20c5bd[_0x8eb16d(0x1c0)]),b=ie([_0x5aa5bd(_0x24bb62,_0x2caa97,_0xe51017),w(0x1,_0xdc24c4(_0x446729)),w(0x2,_0x17f2a0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e519c=_0x5ceb;(function(_0x123488,_0x434d91){const _0x3fc728=_0x5ceb,_0x5acb2d=_0x123488();while(!![]){try{const _0x2f4881=parseInt(_0x3fc728(0xbc))/0x1*(parseInt(_0x3fc728(0xdf))/0x2)+-parseInt(_0x3fc728(0xae))/0x3+parseInt(_0x3fc728(0x9a))/0x4*(parseInt(_0x3fc728(0xd3))/0x5)+parseInt(_0x3fc728(0xcc))/0x6+-parseInt(_0x3fc728(0xca))/0x7+parseInt(_0x3fc728(0x9e))/0x8*(-parseInt(_0x3fc728(0xd2))/0x9)+-parseInt(_0x3fc728(0xa0))/0xa*(parseInt(_0x3fc728(0xe6))/0xb);if(_0x2f4881===_0x434d91)break;else _0x5acb2d['push'](_0x5acb2d['shift']());}catch(_0x3fc1ce){_0x5acb2d['push'](_0x5acb2d['shift']());}}}(_0x5878,0xbea9b));import{CommentService as _0x12d00b,CollaborationSessionService as _0x494f6f,UniverCollaborationClientPlugin as _0x297c90}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24c725}from'@univerjs-pro/license';import{dayjs as _0x19b6e7,UserManagerService as _0x3d615e,Inject as _0x1bd6b7,Injector as _0x1dfc40,Disposable as _0x4dbd30,CustomRangeType as _0x517552,UniverInstanceType as _0x5c3a2a,DependentOn as _0x2aafae,IConfigService as _0x4ccfd1,Plugin as _0x41074e,merge as _0x59806d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31b480}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d9488,IThreadCommentDataSourceService as _0x1e1893}from'@univerjs/thread-comment';import{bufferTime as _0x522b81}from'rxjs';import{HTTPService as _0x52a4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395eb1=>(_0x395eb1[_0x395eb1[_0x5e519c(0xda)]=0x0]=_0x5e519c(0xda),_0x395eb1[_0x395eb1[_0x5e519c(0xa9)]=0x1]=_0x5e519c(0xa9),_0x395eb1[_0x395eb1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x395eb1))(I||{}),v=(_0x3d9ea7=>(_0x3d9ea7[_0x3d9ea7['Unknown']=0x0]=_0x5e519c(0xb5),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xd8)]=0x1]=_0x5e519c(0xd8),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xdc)]=0x2]=_0x5e519c(0xdc),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0x91)]=0x3]=_0x5e519c(0x91),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc4)]=0x4]=_0x5e519c(0xc4),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xef)]=0x5]=_0x5e519c(0xef),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc7)]=-0x1]=_0x5e519c(0xc7),_0x3d9ea7))(v||{});const D=_0x268478=>_0x19b6e7(new Date(+_0x268478))[_0x5e519c(0xcb)](_0x5e519c(0xbb)),B=async(_0x262fad,_0x353302)=>{const _0x1b6b6c=_0x5e519c,_0x4f46b8=_0x262fad[_0x1b6b6c(0xee)](_0x3d615e),_0x152324=_0x262fad[_0x1b6b6c(0xee)](_0x52a4a2);_0x353302[_0x1b6b6c(0xdd)](_0x526851=>{const _0x329486=_0x1b6b6c;_0x4f46b8[_0x329486(0xa5)](_0x526851)&&_0x353302[_0x329486(0xd0)](_0x526851);}),_0x353302['size']&&(await _0x152324[_0x1b6b6c(0xee)]('/universer-api/user/list',{'params':{'userIDs':[..._0x353302]}}))[_0x1b6b6c(0xa2)][_0x1b6b6c(0xc3)][_0x1b6b6c(0xdd)](_0x42ce50=>{const _0x59dfa1=_0x1b6b6c;_0x42ce50&&_0x4f46b8[_0x59dfa1(0xd4)](_0x42ce50);});};function _0x5878(){const _0x50530a=['Reply','forEach','_sessionService','2bmXCRB','pluginName','_threadCommentDataSource','_commentService','length','dataSource','userID','11ISIPwp','comments','ref','root','parentId','/add','/reply','replyId','get','Solve','Edit','unitId','customRanges','createTimestamp','user','map','_httpService','deleteComment','type','78004utSuZr','_config','filter','getOwnPropertyDescriptor','156568aIboBl','getUnit','4452870KExamF','solved','body','post','error','getUser','requireSession','values','pipe','Solved','_init','updateComment','userId','disposeWithMe','1960779gVlxGF','_threadCommentDataSourceService','find','_threadCommentModel','resolveComment','_injector','/list','Unknown','addComment','onStarting','payload','/universer-api/comment/unit/','_initUserSync','YYYY/MM/DD\x20HH:mm','1387055JDQbjc','_configService','rangeType','_userService','getMemberID','replies','add','users','Delete','saveCommentToSnapshot','subscribe','UNRECOGNIZED','COMMENT','threadId','2179807aUEToF','format','6001866xgiKbL','/edit','personId','syncUpdateMutationToColla','delete','rangeId','144wYzrYA','30FYEQzq','addUser','commentUpdate$','code','parse','Add','listComments','OpenOrReOpen','_initDataSource'];_0x5878=function(){return _0x50530a;};return _0x5878();}var K=Object[_0x5e519c(0x9d)],V=(_0x1a6862,_0x55ac9c,_0x3d26a5,_0x236beb)=>{const _0x269ff4=_0x5e519c;for(var _0x34b007=_0x236beb>0x1?void 0x0:_0x236beb?K(_0x55ac9c,_0x3d26a5):_0x55ac9c,_0x2adf79=_0x1a6862[_0x269ff4(0xe3)]-0x1,_0x243102;_0x2adf79>=0x0;_0x2adf79--)(_0x243102=_0x1a6862[_0x2adf79])&&(_0x34b007=_0x243102(_0x34b007)||_0x34b007);return _0x34b007;},p=(_0x24b02c,_0x28b848)=>(_0x36079c,_0x3dcd39)=>_0x28b848(_0x36079c,_0x3dcd39,_0x24b02c);let S=class extends _0x4dbd30{constructor(_0x41aebb,_0x4ca893,_0x36868a,_0x54160a){const _0x51dcbf=_0x5e519c;super(),this['_commentService']=_0x41aebb,this[_0x51dcbf(0xb1)]=_0x4ca893,this['_userService']=_0x36868a,this[_0x51dcbf(0xb3)]=_0x54160a,this[_0x51dcbf(0xaa)](),this[_0x51dcbf(0xba)]();}[_0x5e519c(0xba)](){const _0x726858=_0x5e519c;this[_0x726858(0xad)](this['_threadCommentModel']['commentUpdate$'][_0x726858(0xa8)](_0x522b81(0x10))[_0x726858(0xc6)](_0x333991=>{const _0x39515e=_0x726858,_0x2d1b88=new Set();_0x333991[_0x39515e(0xdd)](_0x454762=>{const _0x17df64=_0x39515e;switch(_0x454762[_0x17df64(0x99)]){case _0x17df64(0xc2):{const _0x3ac24f=_0x454762[_0x17df64(0xb8)][_0x17df64(0xce)];_0x2d1b88[_0x17df64(0xc2)](_0x3ac24f);break;}}}),B(this['_injector'],_0x2d1b88);}));}[_0x5e519c(0xaa)](){const _0x23622b=_0x5e519c;this[_0x23622b(0xad)](this[_0x23622b(0xe2)][_0x23622b(0xd5)][_0x23622b(0xc6)](async _0x3a21ba=>{const _0x3a6884=_0x23622b;var _0x2c23de,_0xeb45f8,_0x323a45,_0xd1ce65;const _0x5db5c9=(_0x2c23de=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba['unitId'])['find'](_0x8a7d8=>_0x8a7d8[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0x2c23de['root'];if(!_0x5db5c9)return;const {unitId:_0x5b93ed,subUnitId:_0x594da2}=_0x5db5c9;switch(_0x3a21ba['user']&&this[_0x3a6884(0xbf)][_0x3a6884(0xd4)](_0x3a21ba['user']),_0x3a21ba[_0x3a6884(0x99)]){case v['Add']:break;case v[_0x3a6884(0xdc)]:{this[_0x3a6884(0xb1)]['addComment'](_0x5b93ed,_0x594da2,{'unitId':_0x5b93ed,'subUnitId':_0x594da2,'ref':'','id':_0x3a21ba[_0x3a6884(0xed)],'dT':D(+_0x3a21ba[_0x3a6884(0x94)]),'threadId':_0x3a21ba['threadId'],'personId':(_0x323a45=(_0xeb45f8=_0x3a21ba[_0x3a6884(0x95)])==null?void 0x0:_0xeb45f8[_0x3a6884(0xe5)])!=null?_0x323a45:_0x3a21ba[_0x3a6884(0xac)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content']),'parentId':_0x5db5c9['id']});break;}case v['Delete']:{const _0x33f369=this[_0x3a6884(0xb1)]['getComment'](_0x5b93ed,_0x594da2,_0x3a21ba[_0x3a6884(0xed)]);_0x33f369&&_0x33f369[_0x3a6884(0xea)]&&this['_threadCommentModel']['deleteComment'](_0x5b93ed,_0x594da2,_0x3a21ba['replyId']);break;}case v['Edit']:{this[_0x3a6884(0xb1)]['updateComment'](_0x5b93ed,_0x594da2,{'commentId':_0x3a21ba[_0x3a6884(0xed)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content'])});break;}case v[_0x3a6884(0xef)]:{const _0x28a6ae=(_0xd1ce65=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba[_0x3a6884(0x92)])[_0x3a6884(0xb0)](_0x485aec=>_0x485aec[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0xd1ce65[_0x3a6884(0xe9)];_0x28a6ae&&this[_0x3a6884(0xb1)][_0x3a6884(0xb2)](_0x5b93ed,_0x594da2,_0x28a6ae['id'],_0x3a21ba['solved']===I[_0x3a6884(0xa9)]);break;}}}));}};S=V([p(0x0,_0x1bd6b7(_0x12d00b)),p(0x1,_0x1bd6b7(_0x2d9488)),p(0x2,_0x1bd6b7(_0x3d615e)),p(0x3,_0x1bd6b7(_0x1dfc40))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x126e9c,_0xe5cf5c,_0x420c12,_0x1a178f)=>{const _0x19ae95=_0x5e519c;for(var _0x272145=_0x1a178f>0x1?void 0x0:_0x1a178f?k(_0xe5cf5c,_0x420c12):_0xe5cf5c,_0x5b4cec=_0x126e9c[_0x19ae95(0xe3)]-0x1,_0x137b66;_0x5b4cec>=0x0;_0x5b4cec--)(_0x137b66=_0x126e9c[_0x5b4cec])&&(_0x272145=_0x137b66(_0x272145)||_0x272145);return _0x272145;},_=(_0x26a1f4,_0x281b8d)=>(_0x584d65,_0x22df2d)=>_0x281b8d(_0x584d65,_0x22df2d,_0x26a1f4);function X(_0x480b96,_0x1fe62d){const _0x22c521=_0x5e519c,_0x41c193=_0x480b96[_0x22c521(0xc1)][0x0];return{..._0x1fe62d,'id':_0x41c193['replyId'],'resolved':_0x480b96[_0x22c521(0xa1)]===0x1,'dT':D(_0x41c193[_0x22c521(0x94)]),'personId':_0x41c193['userId'],'threadId':_0x41c193['threadId']};}function ee(_0x788a95,_0x16985f,_0x284a63){const _0x3568bc=_0x5e519c;var _0xa97886,_0x2e28b7;if(((_0x2e28b7=(_0xa97886=_0x788a95==null?void 0x0:_0x788a95[_0x3568bc(0xc1)])==null?void 0x0:_0xa97886[_0x3568bc(0xe3)])!=null?_0x2e28b7:0x0)>0x0){const _0x3a66dd=(_0x4f17ed,_0x2f2aa3)=>({'id':_0x4f17ed['replyId'],'threadId':_0x4f17ed[_0x3568bc(0xc9)],'dT':D(_0x4f17ed[_0x3568bc(0x94)]),'personId':_0x4f17ed['userId'],'resolved':_0x788a95[_0x3568bc(0xa1)]===I[_0x3568bc(0xa9)],'unitId':_0x16985f,'subUnitId':_0x284a63,'text':JSON[_0x3568bc(0xd7)](_0x4f17ed['content']),'parentId':_0x2f2aa3}),_0x4a2743=_0x3a66dd(_0x788a95[_0x3568bc(0xc1)][0x0]);return{..._0x4a2743,'children':_0x788a95['replies']['slice'](0x1)[_0x3568bc(0x96)](_0x4c26c8=>_0x3a66dd(_0x4c26c8,_0x4a2743['id']))};}return null;}let f=class{constructor(_0x4a0a55,_0x46b7ec,_0x1193db,_0x3af4c8){const _0x52c118=_0x5e519c;this[_0x52c118(0x97)]=_0x4a0a55,this['_userService']=_0x46b7ec,this['_sessionService']=_0x1193db,this[_0x52c118(0xb3)]=_0x3af4c8;}async[_0x5e519c(0xb6)](_0xa173bc){const _0x5d729b=_0x5e519c;var _0x2ca814,_0x20a6b1;const {parentId:_0x339b09,unitId:_0x419960,text:_0x5f52be,threadId:_0x82adbd}=_0xa173bc,_0xd4d1e2=(_0x20a6b1=(_0x2ca814=_0x5f52be[_0x5d729b(0x93)])==null?void 0x0:_0x2ca814[_0x5d729b(0x9c)](_0x619ef8=>_0x619ef8[_0x5d729b(0xbe)]===_0x517552[_0x5d729b(0xc8)])['map'](_0x96f5de=>_0x96f5de[_0x5d729b(0xd1)]))!=null?_0x20a6b1:[],_0x4695e9=JSON['stringify'](_0x5f52be),_0x231617=(await this[_0x5d729b(0xde)][_0x5d729b(0xa6)](_0x419960))[_0x5d729b(0xc0)]();if(_0x339b09){const _0x3dcf31={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2,'threadId':_0x82adbd},_0x1c7184=(await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xec),{'body':_0x3dcf31}))[_0x5d729b(0xa2)]['reply'];return{..._0xa173bc,'id':_0x1c7184[_0x5d729b(0xed)],'dT':_0x19b6e7(+_0x1c7184['createTimestamp'])[_0x5d729b(0xcb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1c7184[_0x5d729b(0xac)]};}else{const _0x5895a0={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2},_0x57a9e2=await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xeb),{'body':_0x5895a0});return X(_0x57a9e2['body']['comment'],_0xa173bc);}}async[_0x5e519c(0xab)](_0x5ba388){const _0x146c7b=_0x5e519c;var _0x311480,_0x4049e4;const {text:_0x290947,unitId:_0x11be01}=_0x5ba388,_0x42fc8c=(_0x4049e4=(_0x311480=_0x290947[_0x146c7b(0x93)])==null?void 0x0:_0x311480['filter'](_0x4c81b6=>_0x4c81b6[_0x146c7b(0xbe)]===_0x517552[_0x146c7b(0xc8)])[_0x146c7b(0x96)](_0x491c81=>_0x491c81[_0x146c7b(0xd1)]))!=null?_0x4049e4:[],_0x38ccac=JSON['stringify'](_0x290947),_0x28705f=_0x5ba388[_0x146c7b(0xc9)],_0x7635d8=_0x5ba388['id'],_0x3dc1f1={'memberId':(await this[_0x146c7b(0xde)][_0x146c7b(0xa6)](_0x11be01))[_0x146c7b(0xc0)](),'unitId':_0x11be01,'threadId':_0x28705f,'mention':_0x42fc8c,'content':_0x38ccac,'replyId':_0x7635d8},_0x129bcf=await this[_0x146c7b(0x97)][_0x146c7b(0xa3)]('/universer-api/comment/unit/'+_0x11be01+_0x146c7b(0xcd),{'body':_0x3dc1f1});return!_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)]||_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)][_0x146c7b(0xd6)]===0x1;}async['resolveComment'](_0x55be80){const _0x92af12=_0x5e519c,{unitId:_0x1a91b1}=_0x55be80,_0x4e663e=_0x55be80[_0x92af12(0xc9)],_0x475f70={'memberId':this['_userService']['getCurrentUser']()[_0x92af12(0xe5)],'unitId':_0x1a91b1,'threadId':_0x4e663e,'solved':_0x55be80['resolved']?I[_0x92af12(0xa9)]:I[_0x92af12(0xda)]},_0x180eca=await this[_0x92af12(0x97)][_0x92af12(0xa3)]('/universer-api/comment/unit/'+_0x1a91b1+'/solved',{'body':_0x475f70});return!_0x180eca[_0x92af12(0xa2)]['error']||_0x180eca[_0x92af12(0xa2)][_0x92af12(0xa4)]['code']===0x1;}async[_0x5e519c(0x98)](_0x58645b,_0x4e7965,_0x17e333,_0x4f1b06){const _0x1ec86c=_0x5e519c,_0xa7fbde={'memberId':(await this[_0x1ec86c(0xde)][_0x1ec86c(0xa6)](_0x58645b))[_0x1ec86c(0xc0)](),'threadId':_0x17e333,'replyId':_0x4f1b06,'unitId':_0x58645b},_0x5d410c=await this[_0x1ec86c(0x97)][_0x1ec86c(0xa3)](_0x1ec86c(0xb9)+_0x58645b+'/delete',{'body':_0xa7fbde});return!_0x5d410c['body'][_0x1ec86c(0xa4)]||_0x5d410c[_0x1ec86c(0xa2)][_0x1ec86c(0xa4)][_0x1ec86c(0xd6)]===0x1;}async[_0x5e519c(0xd9)](_0x3feefd,_0x25d00d,_0x3cd881){const _0x55c250=_0x5e519c,_0x42cacf={'unitId':_0x3feefd,'threadId':_0x3cd881},_0x58bd70=await this[_0x55c250(0x97)][_0x55c250(0xa3)](_0x55c250(0xb9)+_0x3feefd+_0x55c250(0xb4),{'body':_0x42cacf}),_0x3159b5=_0x3cd881['map'](_0x3fee24=>ee(_0x58bd70['body'][_0x55c250(0xe7)][_0x3fee24],_0x3feefd,_0x25d00d))['filter'](Boolean);return Object[_0x55c250(0xa7)](_0x58bd70['body']['users'])[_0x55c250(0xdd)](_0x236fed=>{const _0x5bcb36=_0x55c250;this['_userService'][_0x5bcb36(0xd4)](_0x236fed);}),_0x3159b5;}[_0x5e519c(0xc5)](_0x442952){const _0x7578a2=_0x5e519c;return{'id':_0x442952['id'],'threadId':_0x442952[_0x7578a2(0xc9)],'ref':_0x442952[_0x7578a2(0xe8)]};}};f=Q([_(0x0,_0x1bd6b7(_0x52a4a2)),_(0x1,_0x1bd6b7(_0x3d615e)),_(0x2,_0x1bd6b7(_0x494f6f)),_(0x3,_0x1bd6b7(_0x1dfc40))],f);var re=Object[_0x5e519c(0x9d)],te=(_0x17877c,_0xcf2c87,_0x2e7c25,_0x54ff9e)=>{const _0x2d5414=_0x5e519c;for(var _0x4ac2c0=_0x54ff9e>0x1?void 0x0:_0x54ff9e?re(_0xcf2c87,_0x2e7c25):_0xcf2c87,_0x6292eb=_0x17877c[_0x2d5414(0xe3)]-0x1,_0x1f4304;_0x6292eb>=0x0;_0x6292eb--)(_0x1f4304=_0x17877c[_0x6292eb])&&(_0x4ac2c0=_0x1f4304(_0x4ac2c0)||_0x4ac2c0);return _0x4ac2c0;},N=(_0x5dc274,_0x153500)=>(_0x428cc3,_0x199ebd)=>_0x153500(_0x428cc3,_0x199ebd,_0x5dc274);let g=class extends _0x4dbd30{constructor(_0x2ff542,_0x37e7ba){const _0x4d4df0=_0x5e519c;super(),this[_0x4d4df0(0xaf)]=_0x2ff542,this[_0x4d4df0(0xe1)]=_0x37e7ba,this[_0x4d4df0(0xdb)]();}['_initDataSource'](){const _0x393965=_0x5e519c;this[_0x393965(0xaf)][_0x393965(0xe4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x393965(0xcf)]=!0x1;}};g=te([N(0x0,_0x1e1893),N(0x1,_0x1bd6b7(f))],g);var se=Object['defineProperty'],oe=Object[_0x5e519c(0x9d)],ne=(_0x35ad40,_0x447367,_0x3dff44)=>_0x447367 in _0x35ad40?se(_0x35ad40,_0x447367,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dff44}):_0x35ad40[_0x447367]=_0x3dff44,ie=(_0x5dff54,_0x3381e2,_0x1c99ce,_0x2503ae)=>{const _0x548b72=_0x5e519c;for(var _0x3b1f82=_0x2503ae>0x1?void 0x0:_0x2503ae?oe(_0x3381e2,_0x1c99ce):_0x3381e2,_0x4eb2=_0x5dff54[_0x548b72(0xe3)]-0x1,_0x4723f0;_0x4eb2>=0x0;_0x4eb2--)(_0x4723f0=_0x5dff54[_0x4eb2])&&(_0x3b1f82=_0x4723f0(_0x3b1f82)||_0x3b1f82);return _0x3b1f82;},w=(_0x58e0ee,_0x58a975)=>(_0x1623a2,_0x3e7078)=>_0x58a975(_0x1623a2,_0x3e7078,_0x58e0ee),$=(_0x41cd99,_0x2b58bb,_0x2e1e76)=>ne(_0x41cd99,typeof _0x2b58bb!='symbol'?_0x2b58bb+'':_0x2b58bb,_0x2e1e76);function _0x5ceb(_0x44b9cb,_0x5cec12){const _0x587803=_0x5878();return _0x5ceb=function(_0x5ceb85,_0x45c382){_0x5ceb85=_0x5ceb85-0x91;let _0x1f9fd2=_0x587803[_0x5ceb85];return _0x1f9fd2;},_0x5ceb(_0x44b9cb,_0x5cec12);}let b=class extends _0x41074e{constructor(_0x29bf7a=M,_0x2d535e,_0x27f7e0){const _0x2ea9fb=_0x5e519c;super(),this['_config']=_0x29bf7a,this[_0x2ea9fb(0xb3)]=_0x2d535e,this[_0x2ea9fb(0xbd)]=_0x27f7e0;const {..._0x3af099}=_0x59806d({},M,this[_0x2ea9fb(0x9b)]);this[_0x2ea9fb(0xbd)]['setConfig'](z,_0x3af099);}[_0x5e519c(0xb7)](){const _0x207c21=_0x5e519c;[[f],[g],[S]][_0x207c21(0xdd)](_0x342c0c=>{const _0x2e5340=_0x207c21;this[_0x2e5340(0xb3)]['add'](_0x342c0c);});}['onReady'](){const _0x4cafb7=_0x5e519c;this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](g),this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](S);}};$(b,_0x5e519c(0xe0),W),$(b,_0x5e519c(0x99),_0x5c3a2a['UNIVER_UNKNOWN']),b=ie([_0x2aafae(_0x31b480,_0x297c90,_0x24c725),w(0x1,_0x1bd6b7(_0x1dfc40)),w(0x2,_0x4ccfd1)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x8eb16d=_0xa644;(function(_0x26f565,_0x4a5003){const _0x54cbc0=_0xa644,_0x11892c=_0x26f565();while(!![]){try{const _0x4e8a81=-parseInt(_0x54cbc0(0x181))/0x1*(parseInt(_0x54cbc0(0x1c4))/0x2)+-parseInt(_0x54cbc0(0x19a))/0x3*(-parseInt(_0x54cbc0(0x16b))/0x4)+parseInt(_0x54cbc0(0x176))/0x5+parseInt(_0x54cbc0(0x16e))/0x6*(-parseInt(_0x54cbc0(0x1a9))/0x7)+parseInt(_0x54cbc0(0x194))/0x8+-parseInt(_0x54cbc0(0x177))/0x9+parseInt(_0x54cbc0(0x1a7))/0xa;if(_0x4e8a81===_0x4a5003)break;else _0x11892c['push'](_0x11892c['shift']());}catch(_0x47526e){_0x11892c['push'](_0x11892c['shift']());}}}(_0x118a,0x2f9ea));import{CommentService as _0x1ccc3b,CollaborationSessionService as _0x3d3196,UniverCollaborationClientPlugin as _0x2caa97}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe51017}from'@univerjs-pro/license';import{dayjs as _0x5eb8ae,UserManagerService as _0x4ba4f5,Inject as _0xdc24c4,Injector as _0x446729,Disposable as _0x4f817d,CustomRangeType as _0x19605a,UniverInstanceType as _0x20c5bd,DependentOn as _0x5aa5bd,IConfigService as _0x17f2a0,Plugin as _0x1d9dc9,merge as _0x147312}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24bb62}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5c51a6,IThreadCommentDataSourceService as _0x1004f0}from'@univerjs/thread-comment';import{bufferTime as _0x200bd8}from'rxjs';import{HTTPService as _0x40e085}from'@univerjs/network';const W=_0x8eb16d(0x180);var I=(_0x4ed037=>(_0x4ed037[_0x4ed037[_0x8eb16d(0x1a2)]=0x0]='OpenOrReOpen',_0x4ed037[_0x4ed037[_0x8eb16d(0x1ce)]=0x1]=_0x8eb16d(0x1ce),_0x4ed037[_0x4ed037[_0x8eb16d(0x191)]=-0x1]='UNRECOGNIZED',_0x4ed037))(I||{}),v=(_0x4bf901=>(_0x4bf901[_0x4bf901[_0x8eb16d(0x192)]=0x0]=_0x8eb16d(0x192),_0x4bf901[_0x4bf901[_0x8eb16d(0x17e)]=0x1]=_0x8eb16d(0x17e),_0x4bf901[_0x4bf901['Reply']=0x2]='Reply',_0x4bf901[_0x4bf901[_0x8eb16d(0x17d)]=0x3]=_0x8eb16d(0x17d),_0x4bf901[_0x4bf901['Delete']=0x4]=_0x8eb16d(0x1b7),_0x4bf901[_0x4bf901[_0x8eb16d(0x197)]=0x5]=_0x8eb16d(0x197),_0x4bf901[_0x4bf901[_0x8eb16d(0x191)]=-0x1]=_0x8eb16d(0x191),_0x4bf901))(v||{});function _0x118a(){const _0x46d758=['6329fRKInW','syncUpdateMutationToColla','solved','parentId','customRanges','getMemberID','get','ref','saveCommentToSnapshot','_initUserSync','error','replyId','COMMENT','size','_threadCommentDataSource','length','UNRECOGNIZED','Unknown','userId','1711568NOOgTA','pipe','dataSource','Solve','getUser','content','3RcYeMr','_init','commentUpdate$','subscribe','/add','_config','setConfig','updateComment','OpenOrReOpen','user','getComment','symbol','add','4622420jpGjrG','body','1059730qnvOdn','payload','type','_httpService','createTimestamp','onStarting','userID','filter','root','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initDataSource','unitId','find','Delete','deleteComment','pluginName','reply','parse','Reply','defineProperty','_sessionService','_injector','UNIVER_UNKNOWN','post','/delete','/universer-api/user/list','56oJQoaw','threadId','/universer-api/comment/unit/','/list','forEach','listComments','users','_userService','map','values','Solved','replies','116868tYUBEI','_threadCommentModel','getCurrentUser','6dqmWOu','resolveComment','rangeId','addComment','_commentService','stringify','/solved','addUser','1028480wZfnXW','3487041OtjmXa','requireSession','getOwnPropertyDescriptor','getUnit','disposeWithMe','code','Edit','Add','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x118a=function(){return _0x46d758;};return _0x118a();}const D=_0x142eb4=>_0x5eb8ae(new Date(+_0x142eb4))['format'](_0x8eb16d(0x1b2)),B=async(_0x342391,_0x1ee11b)=>{const _0x3a57ee=_0x8eb16d,_0x30d120=_0x342391[_0x3a57ee(0x187)](_0x4ba4f5),_0xa4e10e=_0x342391[_0x3a57ee(0x187)](_0x40e085);_0x1ee11b[_0x3a57ee(0x1c8)](_0xf2ed1d=>{const _0x25ad56=_0x3a57ee;_0x30d120[_0x25ad56(0x198)](_0xf2ed1d)&&_0x1ee11b['delete'](_0xf2ed1d);}),_0x1ee11b[_0x3a57ee(0x18e)]&&(await _0xa4e10e[_0x3a57ee(0x187)](_0x3a57ee(0x1c3),{'params':{'userIDs':[..._0x1ee11b]}}))[_0x3a57ee(0x1a8)][_0x3a57ee(0x1ca)]['forEach'](_0x3019f4=>{const _0x281dd2=_0x3a57ee;_0x3019f4&&_0x30d120[_0x281dd2(0x175)](_0x3019f4);});};var K=Object[_0x8eb16d(0x179)],V=(_0x3c5927,_0x5460f6,_0x354784,_0x17d86c)=>{for(var _0x58200e=_0x17d86c>0x1?void 0x0:_0x17d86c?K(_0x5460f6,_0x354784):_0x5460f6,_0x5be380=_0x3c5927['length']-0x1,_0x4f4b0b;_0x5be380>=0x0;_0x5be380--)(_0x4f4b0b=_0x3c5927[_0x5be380])&&(_0x58200e=_0x4f4b0b(_0x58200e)||_0x58200e);return _0x58200e;},p=(_0x404226,_0x10b535)=>(_0x5efc4f,_0x5a6ec1)=>_0x10b535(_0x5efc4f,_0x5a6ec1,_0x404226);let S=class extends _0x4f817d{constructor(_0x3cb562,_0x2ffe30,_0x1dd3ff,_0x57a9dc){const _0x206d68=_0x8eb16d;super(),this['_commentService']=_0x3cb562,this[_0x206d68(0x16c)]=_0x2ffe30,this['_userService']=_0x1dd3ff,this['_injector']=_0x57a9dc,this[_0x206d68(0x19b)](),this[_0x206d68(0x18a)]();}[_0x8eb16d(0x18a)](){const _0x389b82=_0x8eb16d;this[_0x389b82(0x17b)](this[_0x389b82(0x16c)]['commentUpdate$'][_0x389b82(0x195)](_0x200bd8(0x10))[_0x389b82(0x19d)](_0x1eff56=>{const _0x486510=_0x389b82,_0xa1cf08=new Set();_0x1eff56[_0x486510(0x1c8)](_0x377008=>{const _0x1c4306=_0x486510;switch(_0x377008[_0x1c4306(0x1ab)]){case _0x1c4306(0x1a6):{const _0x5e5b80=_0x377008[_0x1c4306(0x1aa)]['personId'];_0xa1cf08[_0x1c4306(0x1a6)](_0x5e5b80);break;}}}),B(this[_0x486510(0x1bf)],_0xa1cf08);}));}['_init'](){const _0x4cb971=_0x8eb16d;this['disposeWithMe'](this[_0x4cb971(0x172)][_0x4cb971(0x19c)][_0x4cb971(0x19d)](async _0x80891f=>{const _0x27846d=_0x4cb971;var _0x2c0708,_0x16aaed,_0x1dbd4f,_0x479cc1;const _0xe01919=(_0x2c0708=this[_0x27846d(0x16c)][_0x27846d(0x17a)](_0x80891f['unitId'])[_0x27846d(0x1b6)](_0x17b8ca=>_0x17b8ca[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x2c0708[_0x27846d(0x1b1)];if(!_0xe01919)return;const {unitId:_0x24c545,subUnitId:_0x506b4d}=_0xe01919;switch(_0x80891f['user']&&this[_0x27846d(0x1cb)]['addUser'](_0x80891f[_0x27846d(0x1a3)]),_0x80891f[_0x27846d(0x1ab)]){case v[_0x27846d(0x17e)]:break;case v[_0x27846d(0x1bc)]:{this[_0x27846d(0x16c)][_0x27846d(0x171)](_0x24c545,_0x506b4d,{'unitId':_0x24c545,'subUnitId':_0x506b4d,'ref':'','id':_0x80891f[_0x27846d(0x18c)],'dT':D(+_0x80891f[_0x27846d(0x1ad)]),'threadId':_0x80891f[_0x27846d(0x1c5)],'personId':(_0x1dbd4f=(_0x16aaed=_0x80891f[_0x27846d(0x1a3)])==null?void 0x0:_0x16aaed['userID'])!=null?_0x1dbd4f:_0x80891f['userId'],'text':JSON[_0x27846d(0x1bb)](_0x80891f['content']),'parentId':_0xe01919['id']});break;}case v[_0x27846d(0x1b7)]:{const _0x121518=this['_threadCommentModel'][_0x27846d(0x1a4)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);_0x121518&&_0x121518[_0x27846d(0x184)]&&this[_0x27846d(0x16c)][_0x27846d(0x1b8)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);break;}case v[_0x27846d(0x17d)]:{this[_0x27846d(0x16c)][_0x27846d(0x1a1)](_0x24c545,_0x506b4d,{'commentId':_0x80891f[_0x27846d(0x18c)],'text':JSON['parse'](_0x80891f[_0x27846d(0x199)])});break;}case v[_0x27846d(0x197)]:{const _0x52d86e=(_0x479cc1=this[_0x27846d(0x16c)]['getUnit'](_0x80891f[_0x27846d(0x1b5)])[_0x27846d(0x1b6)](_0x3f9878=>_0x3f9878[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x479cc1[_0x27846d(0x1b1)];_0x52d86e&&this[_0x27846d(0x16c)]['resolveComment'](_0x24c545,_0x506b4d,_0x52d86e['id'],_0x80891f[_0x27846d(0x183)]===I[_0x27846d(0x1ce)]);break;}}}));}};S=V([p(0x0,_0xdc24c4(_0x1ccc3b)),p(0x1,_0xdc24c4(_0x5c51a6)),p(0x2,_0xdc24c4(_0x4ba4f5)),p(0x3,_0xdc24c4(_0x446729))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c693,_0x4d23a6,_0x2984df,_0xa31c13)=>{for(var _0xdc3e2d=_0xa31c13>0x1?void 0x0:_0xa31c13?k(_0x4d23a6,_0x2984df):_0x4d23a6,_0x36cdd9=_0x17c693['length']-0x1,_0x54f304;_0x36cdd9>=0x0;_0x36cdd9--)(_0x54f304=_0x17c693[_0x36cdd9])&&(_0xdc3e2d=_0x54f304(_0xdc3e2d)||_0xdc3e2d);return _0xdc3e2d;},_=(_0xe4c82f,_0x57f10e)=>(_0x16a164,_0x55a361)=>_0x57f10e(_0x16a164,_0x55a361,_0xe4c82f);function X(_0x5d0474,_0x1f2072){const _0x1b1af5=_0x8eb16d,_0x4ec919=_0x5d0474[_0x1b1af5(0x16a)][0x0];return{..._0x1f2072,'id':_0x4ec919['replyId'],'resolved':_0x5d0474[_0x1b1af5(0x183)]===0x1,'dT':D(_0x4ec919[_0x1b1af5(0x1ad)]),'personId':_0x4ec919['userId'],'threadId':_0x4ec919[_0x1b1af5(0x1c5)]};}function ee(_0x1dc058,_0x1d33a1,_0x4a29b8){const _0x3e4429=_0x8eb16d;var _0x16905e,_0x380e3e;if(((_0x380e3e=(_0x16905e=_0x1dc058==null?void 0x0:_0x1dc058[_0x3e4429(0x16a)])==null?void 0x0:_0x16905e[_0x3e4429(0x190)])!=null?_0x380e3e:0x0)>0x0){const _0x12a6fc=(_0x26be21,_0x102ff0)=>({'id':_0x26be21[_0x3e4429(0x18c)],'threadId':_0x26be21[_0x3e4429(0x1c5)],'dT':D(_0x26be21['createTimestamp']),'personId':_0x26be21[_0x3e4429(0x193)],'resolved':_0x1dc058[_0x3e4429(0x183)]===I['Solved'],'unitId':_0x1d33a1,'subUnitId':_0x4a29b8,'text':JSON[_0x3e4429(0x1bb)](_0x26be21[_0x3e4429(0x199)]),'parentId':_0x102ff0}),_0xa1c339=_0x12a6fc(_0x1dc058[_0x3e4429(0x16a)][0x0]);return{..._0xa1c339,'children':_0x1dc058[_0x3e4429(0x16a)]['slice'](0x1)['map'](_0x4353c8=>_0x12a6fc(_0x4353c8,_0xa1c339['id']))};}return null;}let f=class{constructor(_0xd527d1,_0x7b2f99,_0x5854ac,_0x43c529){const _0x16cda7=_0x8eb16d;this[_0x16cda7(0x1ac)]=_0xd527d1,this['_userService']=_0x7b2f99,this[_0x16cda7(0x1be)]=_0x5854ac,this[_0x16cda7(0x1bf)]=_0x43c529;}async['addComment'](_0x4e7085){const _0x3cabd4=_0x8eb16d;var _0x3d1b7c,_0x559fb9;const {parentId:_0x2ba49e,unitId:_0x460949,text:_0x1deed3,threadId:_0x96e33}=_0x4e7085,_0x3a2114=(_0x559fb9=(_0x3d1b7c=_0x1deed3[_0x3cabd4(0x185)])==null?void 0x0:_0x3d1b7c['filter'](_0x3cee94=>_0x3cee94['rangeType']===_0x19605a[_0x3cabd4(0x18d)])[_0x3cabd4(0x1cc)](_0x570fe8=>_0x570fe8['rangeId']))!=null?_0x559fb9:[],_0x4e9bb1=JSON[_0x3cabd4(0x173)](_0x1deed3),_0xaf8c4=(await this['_sessionService'][_0x3cabd4(0x178)](_0x460949))[_0x3cabd4(0x186)]();if(_0x2ba49e){const _0x3c9c5e={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114,'threadId':_0x96e33},_0x7d3202=(await this[_0x3cabd4(0x1ac)][_0x3cabd4(0x1c1)](_0x3cabd4(0x1c6)+_0x460949+'/reply',{'body':_0x3c9c5e}))['body'][_0x3cabd4(0x1ba)];return{..._0x4e7085,'id':_0x7d3202[_0x3cabd4(0x18c)],'dT':_0x5eb8ae(+_0x7d3202[_0x3cabd4(0x1ad)])['format'](_0x3cabd4(0x1b2)),'personId':_0x7d3202['userId']};}else{const _0x4f2575={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114},_0x5d5519=await this[_0x3cabd4(0x1ac)]['post'](_0x3cabd4(0x1c6)+_0x460949+_0x3cabd4(0x19e),{'body':_0x4f2575});return X(_0x5d5519[_0x3cabd4(0x1a8)]['comment'],_0x4e7085);}}async[_0x8eb16d(0x1a1)](_0x1d395f){const _0x31ebd5=_0x8eb16d;var _0x68d19,_0x45e08e;const {text:_0x16f826,unitId:_0x3aa872}=_0x1d395f,_0x47db8e=(_0x45e08e=(_0x68d19=_0x16f826[_0x31ebd5(0x185)])==null?void 0x0:_0x68d19[_0x31ebd5(0x1b0)](_0x28b20f=>_0x28b20f['rangeType']===_0x19605a[_0x31ebd5(0x18d)])[_0x31ebd5(0x1cc)](_0x31cdbd=>_0x31cdbd[_0x31ebd5(0x170)]))!=null?_0x45e08e:[],_0x65d2a2=JSON[_0x31ebd5(0x173)](_0x16f826),_0x2bdbe0=_0x1d395f[_0x31ebd5(0x1c5)],_0xfbdfbc=_0x1d395f['id'],_0x51b782={'memberId':(await this[_0x31ebd5(0x1be)][_0x31ebd5(0x178)](_0x3aa872))[_0x31ebd5(0x186)](),'unitId':_0x3aa872,'threadId':_0x2bdbe0,'mention':_0x47db8e,'content':_0x65d2a2,'replyId':_0xfbdfbc},_0x42177c=await this[_0x31ebd5(0x1ac)][_0x31ebd5(0x1c1)](_0x31ebd5(0x1c6)+_0x3aa872+'/edit',{'body':_0x51b782});return!_0x42177c[_0x31ebd5(0x1a8)]['error']||_0x42177c[_0x31ebd5(0x1a8)][_0x31ebd5(0x18b)][_0x31ebd5(0x17c)]===0x1;}async[_0x8eb16d(0x16f)](_0xc6e78){const _0x2cf62b=_0x8eb16d,{unitId:_0x1094dc}=_0xc6e78,_0x3577a6=_0xc6e78[_0x2cf62b(0x1c5)],_0x52d09a={'memberId':this['_userService'][_0x2cf62b(0x16d)]()[_0x2cf62b(0x1af)],'unitId':_0x1094dc,'threadId':_0x3577a6,'solved':_0xc6e78['resolved']?I['Solved']:I[_0x2cf62b(0x1a2)]},_0x4e9c2e=await this[_0x2cf62b(0x1ac)]['post']('/universer-api/comment/unit/'+_0x1094dc+_0x2cf62b(0x174),{'body':_0x52d09a});return!_0x4e9c2e[_0x2cf62b(0x1a8)][_0x2cf62b(0x18b)]||_0x4e9c2e['body'][_0x2cf62b(0x18b)][_0x2cf62b(0x17c)]===0x1;}async[_0x8eb16d(0x1b8)](_0x33b212,_0x495a01,_0x267a16,_0x418271){const _0x8964af=_0x8eb16d,_0x22d066={'memberId':(await this[_0x8964af(0x1be)]['requireSession'](_0x33b212))[_0x8964af(0x186)](),'threadId':_0x267a16,'replyId':_0x418271,'unitId':_0x33b212},_0x1d20bb=await this[_0x8964af(0x1ac)]['post']('/universer-api/comment/unit/'+_0x33b212+_0x8964af(0x1c2),{'body':_0x22d066});return!_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)]||_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)][_0x8964af(0x17c)]===0x1;}async[_0x8eb16d(0x1c9)](_0x27fe30,_0x4c6d96,_0xfce698){const _0x323c5f=_0x8eb16d,_0x2f967c={'unitId':_0x27fe30,'threadId':_0xfce698},_0xbcffa5=await this[_0x323c5f(0x1ac)][_0x323c5f(0x1c1)](_0x323c5f(0x1c6)+_0x27fe30+_0x323c5f(0x1c7),{'body':_0x2f967c}),_0x245734=_0xfce698['map'](_0x1092d9=>ee(_0xbcffa5[_0x323c5f(0x1a8)]['comments'][_0x1092d9],_0x27fe30,_0x4c6d96))[_0x323c5f(0x1b0)](Boolean);return Object[_0x323c5f(0x1cd)](_0xbcffa5[_0x323c5f(0x1a8)][_0x323c5f(0x1ca)])[_0x323c5f(0x1c8)](_0x1d3b4f=>{const _0x263c53=_0x323c5f;this['_userService'][_0x263c53(0x175)](_0x1d3b4f);}),_0x245734;}[_0x8eb16d(0x189)](_0x471f37){const _0xa6d548=_0x8eb16d;return{'id':_0x471f37['id'],'threadId':_0x471f37['threadId'],'ref':_0x471f37[_0xa6d548(0x188)]};}};f=Q([_(0x0,_0xdc24c4(_0x40e085)),_(0x1,_0xdc24c4(_0x4ba4f5)),_(0x2,_0xdc24c4(_0x3d3196)),_(0x3,_0xdc24c4(_0x446729))],f);function _0xa644(_0x4637c9,_0x265c74){const _0x118a90=_0x118a();return _0xa644=function(_0xa64400,_0x274b13){_0xa64400=_0xa64400-0x16a;let _0x3234dd=_0x118a90[_0xa64400];return _0x3234dd;},_0xa644(_0x4637c9,_0x265c74);}var re=Object[_0x8eb16d(0x179)],te=(_0x303b71,_0x52317d,_0x3de470,_0x264898)=>{for(var _0x2d7bfe=_0x264898>0x1?void 0x0:_0x264898?re(_0x52317d,_0x3de470):_0x52317d,_0x58bd3d=_0x303b71['length']-0x1,_0x1a17c3;_0x58bd3d>=0x0;_0x58bd3d--)(_0x1a17c3=_0x303b71[_0x58bd3d])&&(_0x2d7bfe=_0x1a17c3(_0x2d7bfe)||_0x2d7bfe);return _0x2d7bfe;},N=(_0x1ba854,_0x260363)=>(_0x42d615,_0x95e093)=>_0x260363(_0x42d615,_0x95e093,_0x1ba854);let g=class extends _0x4f817d{constructor(_0x248f39,_0x16617b){const _0x2dac32=_0x8eb16d;super(),this[_0x2dac32(0x1b3)]=_0x248f39,this['_threadCommentDataSource']=_0x16617b,this[_0x2dac32(0x1b4)]();}[_0x8eb16d(0x1b4)](){const _0x52ad67=_0x8eb16d;this['_threadCommentDataSourceService'][_0x52ad67(0x196)]=this[_0x52ad67(0x18f)],this['_threadCommentDataSourceService'][_0x52ad67(0x182)]=!0x1;}};g=te([N(0x0,_0x1004f0),N(0x1,_0xdc24c4(f))],g);var se=Object[_0x8eb16d(0x1bd)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x19bb16,_0x95b4f1,_0x3fbb49)=>_0x95b4f1 in _0x19bb16?se(_0x19bb16,_0x95b4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fbb49}):_0x19bb16[_0x95b4f1]=_0x3fbb49,ie=(_0x3402be,_0x5b174a,_0x42d9bb,_0x28c724)=>{const _0x3c25d5=_0x8eb16d;for(var _0x48d123=_0x28c724>0x1?void 0x0:_0x28c724?oe(_0x5b174a,_0x42d9bb):_0x5b174a,_0x1b8a30=_0x3402be[_0x3c25d5(0x190)]-0x1,_0x28e325;_0x1b8a30>=0x0;_0x1b8a30--)(_0x28e325=_0x3402be[_0x1b8a30])&&(_0x48d123=_0x28e325(_0x48d123)||_0x48d123);return _0x48d123;},w=(_0x1724c1,_0x44ebcd)=>(_0x21969d,_0x194b4d)=>_0x44ebcd(_0x21969d,_0x194b4d,_0x1724c1),$=(_0x1fef6b,_0x57c003,_0x17f93f)=>ne(_0x1fef6b,typeof _0x57c003!=_0x8eb16d(0x1a5)?_0x57c003+'':_0x57c003,_0x17f93f);let b=class extends _0x1d9dc9{constructor(_0x210702=M,_0x227bab,_0x2a3f5a){const _0x3d47bc=_0x8eb16d;super(),this[_0x3d47bc(0x19f)]=_0x210702,this['_injector']=_0x227bab,this['_configService']=_0x2a3f5a;const {..._0x3fc915}=_0x147312({},M,this[_0x3d47bc(0x19f)]);this['_configService'][_0x3d47bc(0x1a0)](z,_0x3fc915);}[_0x8eb16d(0x1ae)](){const _0x46d7bd=_0x8eb16d;[[f],[g],[S]][_0x46d7bd(0x1c8)](_0xb809a5=>{const _0x4f1008=_0x46d7bd;this[_0x4f1008(0x1bf)]['add'](_0xb809a5);});}[_0x8eb16d(0x17f)](){const _0x19a14d=_0x8eb16d;this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](g),this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](S);}};$(b,_0x8eb16d(0x1b9),W),$(b,'type',_0x20c5bd[_0x8eb16d(0x1c0)]),b=ie([_0x5aa5bd(_0x24bb62,_0x2caa97,_0xe51017),w(0x1,_0xdc24c4(_0x446729)),w(0x2,_0x17f2a0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x37da(_0x80db3f,_0xaa4555){const _0x3674f7=_0x3674();return _0x37da=function(_0x37dafd,_0x2eefd2){_0x37dafd=_0x37dafd-0x19f;let _0x1f82f7=_0x3674f7[_0x37dafd];return _0x1f82f7;},_0x37da(_0x80db3f,_0xaa4555);}function _0x3674(){const _0x519256=['IThreadCommentDataSourceService','Solve','stringify','comment','Plugin','map','toStringTag','get','_threadCommentDataSource','Edit','personId','userId','exports','IConfigService','dayjs','UniverCollaborationClientPlugin','Reply','Inject','_initDataSource','resolveComment','post','amd','@univerjs-pro/license','error','updateComment','/delete','130614HnWLla','replyId','_threadCommentDataSourceService','/universer-api/user/list','@univerjs/network','UserManagerService','merge','DependentOn','rxjs','CustomRangeType','_httpService','type','saveCommentToSnapshot','values','_sessionService','COMMENT','Add','forEach','onReady','CommentService','UNIVER_UNKNOWN','getUnit','425120JOPPvH','/add','getMemberID','UniverInstanceType','@univerjs/core','UniverCore','user','length','UNRECOGNIZED','/reply','slice','Injector','UniverThreadComment','find','Solved','format','UniverLicensePlugin','ThreadCommentModel','code','_threadCommentModel','customRanges','313500bTAkhd','1771987WEIFOS','createTimestamp','pipe','OpenOrReOpen','solved','addUser','disposeWithMe','content','UniverThreadCommentUIPlugin','Unknown','@univerjs/thread-comment-ui','@univerjs/thread-comment','_init','addComment','bufferTime','_injector','getOwnPropertyDescriptor','/universer-api/comment/unit/','add','filter','263325wiooLA','userID','parse','UniverThreadCommentDataSourcePlugin','469266ScQHQc','symbol','dataSource','threadId','UniverProLicense','body','listComments','YYYY/MM/DD\x20HH:mm','rangeType','_userService','/list','Disposable','rangeId','_commentService','parentId','UniverNetwork','subscribe','ref','resolved','_config','HTTPService','unitId','3348124odCTkX','users','requireSession','UniverThreadCommentUi','replies','deleteComment','defineProperty','Module','_configService','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs-pro/collaboration-client','/edit','syncUpdateMutationToColla','Delete'];_0x3674=function(){return _0x519256;};return _0x3674();}(function(_0x212ea2,_0x22cf5c){const _0x18bf24=_0x37da,_0x420165=_0x212ea2();while(!![]){try{const _0x3d144b=-parseInt(_0x18bf24(0x1ba))/0x1+-parseInt(_0x18bf24(0x1d3))/0x2+-parseInt(_0x18bf24(0x1cf))/0x3+parseInt(_0x18bf24(0x1e9))/0x4+parseInt(_0x18bf24(0x1a5))/0x5+-parseInt(_0x18bf24(0x212))/0x6+parseInt(_0x18bf24(0x1bb))/0x7;if(_0x3d144b===_0x22cf5c)break;else _0x420165['push'](_0x420165['shift']());}catch(_0x1e6335){_0x420165['push'](_0x420165['shift']());}}}(_0x3674,0x7e58f),function(_0x1f741e,_0x2718c0){const _0x477e35=_0x37da;typeof exports=='object'&&typeof module<'u'?_0x2718c0(exports,require(_0x477e35(0x1f4)),require(_0x477e35(0x20e)),require(_0x477e35(0x1a9)),require(_0x477e35(0x1c5)),require(_0x477e35(0x1c6)),require(_0x477e35(0x21a)),require('@univerjs/network')):typeof define=='function'&&define[_0x477e35(0x20d)]?define([_0x477e35(0x204),_0x477e35(0x1f4),_0x477e35(0x20e),_0x477e35(0x1a9),_0x477e35(0x1c5),_0x477e35(0x1c6),_0x477e35(0x21a),_0x477e35(0x216)],_0x2718c0):(_0x1f741e=typeof globalThis<'u'?globalThis:_0x1f741e||self,_0x2718c0(_0x1f741e['UniverProThreadCommentDatasource']={},_0x1f741e['UniverProCollaborationClient'],_0x1f741e[_0x477e35(0x1d7)],_0x1f741e[_0x477e35(0x1aa)],_0x1f741e[_0x477e35(0x1ec)],_0x1f741e[_0x477e35(0x1b1)],_0x1f741e['rxjs'],_0x1f741e[_0x477e35(0x1e2)]));}(this,function(_0x5b5f3f,_0x2bbcf7,_0x3057e4,_0x1489c4,_0x37cbe5,_0x3008b3,_0x21d5eb,_0x126286){'use strict';const _0x2a2473=_0x37da;const _0x366665=_0x2a2473(0x1f3);var _0x4f9904=(_0x4cf9a5=>(_0x4cf9a5[_0x4cf9a5['OpenOrReOpen']=0x0]=_0x2a2473(0x1be),_0x4cf9a5[_0x4cf9a5['Solved']=0x1]='Solved',_0x4cf9a5[_0x4cf9a5[_0x2a2473(0x1ad)]=-0x1]=_0x2a2473(0x1ad),_0x4cf9a5))(_0x4f9904||{}),_0x6bcd17=(_0x495b56=>(_0x495b56[_0x495b56[_0x2a2473(0x1c4)]=0x0]=_0x2a2473(0x1c4),_0x495b56[_0x495b56['Add']=0x1]=_0x2a2473(0x19f),_0x495b56[_0x495b56[_0x2a2473(0x208)]=0x2]='Reply',_0x495b56[_0x495b56[_0x2a2473(0x201)]=0x3]=_0x2a2473(0x201),_0x495b56[_0x495b56[_0x2a2473(0x1f7)]=0x4]=_0x2a2473(0x1f7),_0x495b56[_0x495b56['Solve']=0x5]='Solve',_0x495b56[_0x495b56['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x495b56))(_0x6bcd17||{});const _0x4eef73=_0x1bd6c1=>_0x1489c4[_0x2a2473(0x206)](new Date(+_0x1bd6c1))['format']('YYYY/MM/DD\x20HH:mm'),_0x1d0b6c=async(_0x28c774,_0x40b12e)=>{const _0x55cc7d=_0x2a2473,_0x1ac15a=_0x28c774['get'](_0x1489c4[_0x55cc7d(0x217)]),_0x31d287=_0x28c774['get'](_0x126286[_0x55cc7d(0x1e7)]);_0x40b12e[_0x55cc7d(0x1a0)](_0x89b6b5=>{_0x1ac15a['getUser'](_0x89b6b5)&&_0x40b12e['delete'](_0x89b6b5);}),_0x40b12e['size']&&(await _0x31d287[_0x55cc7d(0x1ff)](_0x55cc7d(0x215),{'params':{'userIDs':[..._0x40b12e]}}))[_0x55cc7d(0x1d8)][_0x55cc7d(0x1ea)][_0x55cc7d(0x1a0)](_0x4ae922=>{const _0x3f89d8=_0x55cc7d;_0x4ae922&&_0x1ac15a[_0x3f89d8(0x1c0)](_0x4ae922);});};var _0x29ffc9=Object['getOwnPropertyDescriptor'],_0x2e5ae5=(_0x3c3732,_0x59dffd,_0x51211f,_0x20b7f2)=>{const _0x10871b=_0x2a2473;for(var _0x5c8b2c=_0x20b7f2>0x1?void 0x0:_0x20b7f2?_0x29ffc9(_0x59dffd,_0x51211f):_0x59dffd,_0x23e42f=_0x3c3732[_0x10871b(0x1ac)]-0x1,_0x72966a;_0x23e42f>=0x0;_0x23e42f--)(_0x72966a=_0x3c3732[_0x23e42f])&&(_0x5c8b2c=_0x72966a(_0x5c8b2c)||_0x5c8b2c);return _0x5c8b2c;},_0xdc392c=(_0x572491,_0x433cc0)=>(_0x271434,_0x538feb)=>_0x433cc0(_0x271434,_0x538feb,_0x572491);let _0x46f606=class extends _0x1489c4[_0x2a2473(0x1de)]{constructor(_0xeb5b06,_0x55c12c,_0x1a2331,_0x34f60b){const _0xdec1d=_0x2a2473;super(),this[_0xdec1d(0x1e0)]=_0xeb5b06,this[_0xdec1d(0x1b8)]=_0x55c12c,this[_0xdec1d(0x1dc)]=_0x1a2331,this[_0xdec1d(0x1ca)]=_0x34f60b,this[_0xdec1d(0x1c7)](),this['_initUserSync']();}['_initUserSync'](){const _0x748984=_0x2a2473;this[_0x748984(0x1c1)](this['_threadCommentModel']['commentUpdate$'][_0x748984(0x1bd)](_0x21d5eb[_0x748984(0x1c9)](0x10))[_0x748984(0x1e3)](_0xf2605e=>{const _0x53adf7=_0x748984,_0x5caf22=new Set();_0xf2605e[_0x53adf7(0x1a0)](_0x90158e=>{const _0x84979c=_0x53adf7;switch(_0x90158e['type']){case _0x84979c(0x1cd):{const _0x21bebf=_0x90158e[_0x84979c(0x1f2)][_0x84979c(0x202)];_0x5caf22[_0x84979c(0x1cd)](_0x21bebf);break;}}}),_0x1d0b6c(this[_0x53adf7(0x1ca)],_0x5caf22);}));}[_0x2a2473(0x1c7)](){const _0x3c599d=_0x2a2473;this[_0x3c599d(0x1c1)](this[_0x3c599d(0x1e0)]['commentUpdate$'][_0x3c599d(0x1e3)](async _0x2e45c7=>{const _0xa65795=_0x3c599d;var _0xb73c23,_0x203001,_0x5606ad,_0x19f058;const _0x1b6582=(_0xb73c23=this[_0xa65795(0x1b8)][_0xa65795(0x1a4)](_0x2e45c7['unitId'])[_0xa65795(0x1b2)](_0x1d9538=>_0x1d9538['threadId']===_0x2e45c7[_0xa65795(0x1d6)]))==null?void 0x0:_0xb73c23['root'];if(!_0x1b6582)return;const {unitId:_0x506de8,subUnitId:_0x3d2d33}=_0x1b6582;switch(_0x2e45c7[_0xa65795(0x1ab)]&&this[_0xa65795(0x1dc)]['addUser'](_0x2e45c7[_0xa65795(0x1ab)]),_0x2e45c7[_0xa65795(0x21d)]){case _0x6bcd17[_0xa65795(0x19f)]:break;case _0x6bcd17[_0xa65795(0x208)]:{this[_0xa65795(0x1b8)][_0xa65795(0x1c8)](_0x506de8,_0x3d2d33,{'unitId':_0x506de8,'subUnitId':_0x3d2d33,'ref':'','id':_0x2e45c7['replyId'],'dT':_0x4eef73(+_0x2e45c7[_0xa65795(0x1bc)]),'threadId':_0x2e45c7[_0xa65795(0x1d6)],'personId':(_0x5606ad=(_0x203001=_0x2e45c7['user'])==null?void 0x0:_0x203001[_0xa65795(0x1d0)])!=null?_0x5606ad:_0x2e45c7['userId'],'text':JSON[_0xa65795(0x1d1)](_0x2e45c7[_0xa65795(0x1c2)]),'parentId':_0x1b6582['id']});break;}case _0x6bcd17[_0xa65795(0x1f7)]:{const _0x4ec1fb=this['_threadCommentModel']['getComment'](_0x506de8,_0x3d2d33,_0x2e45c7['replyId']);_0x4ec1fb&&_0x4ec1fb[_0xa65795(0x1e1)]&&this[_0xa65795(0x1b8)]['deleteComment'](_0x506de8,_0x3d2d33,_0x2e45c7['replyId']);break;}case _0x6bcd17[_0xa65795(0x201)]:{this[_0xa65795(0x1b8)][_0xa65795(0x210)](_0x506de8,_0x3d2d33,{'commentId':_0x2e45c7['replyId'],'text':JSON['parse'](_0x2e45c7[_0xa65795(0x1c2)])});break;}case _0x6bcd17[_0xa65795(0x1f9)]:{const _0x3f3dad=(_0x19f058=this['_threadCommentModel'][_0xa65795(0x1a4)](_0x2e45c7[_0xa65795(0x1e8)])[_0xa65795(0x1b2)](_0x276535=>_0x276535[_0xa65795(0x1d6)]===_0x2e45c7['threadId']))==null?void 0x0:_0x19f058['root'];_0x3f3dad&&this['_threadCommentModel'][_0xa65795(0x20b)](_0x506de8,_0x3d2d33,_0x3f3dad['id'],_0x2e45c7['solved']===_0x4f9904['Solved']);break;}}}));}};_0x46f606=_0x2e5ae5([_0xdc392c(0x0,_0x1489c4[_0x2a2473(0x209)](_0x2bbcf7[_0x2a2473(0x1a2)])),_0xdc392c(0x1,_0x1489c4['Inject'](_0x3008b3[_0x2a2473(0x1b6)])),_0xdc392c(0x2,_0x1489c4[_0x2a2473(0x209)](_0x1489c4[_0x2a2473(0x217)])),_0xdc392c(0x3,_0x1489c4['Inject'](_0x1489c4[_0x2a2473(0x1b0)]))],_0x46f606);const _0x227be3='thread-comment-data-source.config',_0x247007={};var _0x4038ea=Object[_0x2a2473(0x1cb)],_0xc92523=(_0x3af91f,_0x117a1e,_0x4040fe,_0x4113fe)=>{for(var _0x1705a7=_0x4113fe>0x1?void 0x0:_0x4113fe?_0x4038ea(_0x117a1e,_0x4040fe):_0x117a1e,_0x57dabf=_0x3af91f['length']-0x1,_0x206032;_0x57dabf>=0x0;_0x57dabf--)(_0x206032=_0x3af91f[_0x57dabf])&&(_0x1705a7=_0x206032(_0x1705a7)||_0x1705a7);return _0x1705a7;},_0x4dcd8e=(_0x4fa435,_0x25dfdf)=>(_0x106a75,_0xc26e1c)=>_0x25dfdf(_0x106a75,_0xc26e1c,_0x4fa435);function _0x2c3cd3(_0x2c5714,_0x54b7cf){const _0x29f58b=_0x2a2473,_0x231c44=_0x2c5714['replies'][0x0];return{..._0x54b7cf,'id':_0x231c44['replyId'],'resolved':_0x2c5714[_0x29f58b(0x1bf)]===0x1,'dT':_0x4eef73(_0x231c44['createTimestamp']),'personId':_0x231c44['userId'],'threadId':_0x231c44['threadId']};}function _0x373eb9(_0x3200d0,_0x5ca5bd,_0x4b6724){const _0x4a4bac=_0x2a2473;var _0x4f92d1,_0x2b0906;if(((_0x2b0906=(_0x4f92d1=_0x3200d0==null?void 0x0:_0x3200d0[_0x4a4bac(0x1ed)])==null?void 0x0:_0x4f92d1[_0x4a4bac(0x1ac)])!=null?_0x2b0906:0x0)>0x0){const _0x52c5dd=(_0x3d14f5,_0x1e83d5)=>({'id':_0x3d14f5[_0x4a4bac(0x213)],'threadId':_0x3d14f5[_0x4a4bac(0x1d6)],'dT':_0x4eef73(_0x3d14f5[_0x4a4bac(0x1bc)]),'personId':_0x3d14f5[_0x4a4bac(0x203)],'resolved':_0x3200d0[_0x4a4bac(0x1bf)]===_0x4f9904[_0x4a4bac(0x1b3)],'unitId':_0x5ca5bd,'subUnitId':_0x4b6724,'text':JSON[_0x4a4bac(0x1d1)](_0x3d14f5['content']),'parentId':_0x1e83d5}),_0x481d6b=_0x52c5dd(_0x3200d0[_0x4a4bac(0x1ed)][0x0]);return{..._0x481d6b,'children':_0x3200d0[_0x4a4bac(0x1ed)][_0x4a4bac(0x1af)](0x1)[_0x4a4bac(0x1fd)](_0x51e985=>_0x52c5dd(_0x51e985,_0x481d6b['id']))};}return null;}let _0x102993=class{constructor(_0x4a2f2e,_0x2b1c98,_0x103a15,_0x428056){const _0x419c8d=_0x2a2473;this[_0x419c8d(0x21c)]=_0x4a2f2e,this['_userService']=_0x2b1c98,this[_0x419c8d(0x220)]=_0x103a15,this[_0x419c8d(0x1ca)]=_0x428056;}async[_0x2a2473(0x1c8)](_0x527074){const _0xcf14f0=_0x2a2473;var _0x1d0cab,_0x36152e;const {parentId:_0x3810eb,unitId:_0x4a201f,text:_0x28e235,threadId:_0xb2f580}=_0x527074,_0x345729=(_0x36152e=(_0x1d0cab=_0x28e235['customRanges'])==null?void 0x0:_0x1d0cab[_0xcf14f0(0x1ce)](_0x247767=>_0x247767[_0xcf14f0(0x1db)]===_0x1489c4['CustomRangeType'][_0xcf14f0(0x221)])['map'](_0x2ce5de=>_0x2ce5de[_0xcf14f0(0x1df)]))!=null?_0x36152e:[],_0x31bc91=JSON[_0xcf14f0(0x1fa)](_0x28e235),_0x1028a3=(await this['_sessionService']['requireSession'](_0x4a201f))[_0xcf14f0(0x1a7)]();if(_0x3810eb){const _0x516c67={'memberId':_0x1028a3,'unitId':_0x4a201f,'content':_0x31bc91,'mention':_0x345729,'threadId':_0xb2f580},_0x4bdd24=(await this[_0xcf14f0(0x21c)][_0xcf14f0(0x20c)](_0xcf14f0(0x1cc)+_0x4a201f+_0xcf14f0(0x1ae),{'body':_0x516c67}))[_0xcf14f0(0x1d8)]['reply'];return{..._0x527074,'id':_0x4bdd24['replyId'],'dT':_0x1489c4[_0xcf14f0(0x206)](+_0x4bdd24[_0xcf14f0(0x1bc)])[_0xcf14f0(0x1b4)](_0xcf14f0(0x1da)),'personId':_0x4bdd24[_0xcf14f0(0x203)]};}else{const _0x2b470b={'memberId':_0x1028a3,'unitId':_0x4a201f,'content':_0x31bc91,'mention':_0x345729},_0xdd9003=await this[_0xcf14f0(0x21c)]['post']('/universer-api/comment/unit/'+_0x4a201f+_0xcf14f0(0x1a6),{'body':_0x2b470b});return _0x2c3cd3(_0xdd9003[_0xcf14f0(0x1d8)][_0xcf14f0(0x1fb)],_0x527074);}}async['updateComment'](_0x41b375){const _0x13e07c=_0x2a2473;var _0x5abc78,_0x3a0387;const {text:_0x132de2,unitId:_0x4178fe}=_0x41b375,_0xfade61=(_0x3a0387=(_0x5abc78=_0x132de2[_0x13e07c(0x1b9)])==null?void 0x0:_0x5abc78[_0x13e07c(0x1ce)](_0x5a7b06=>_0x5a7b06[_0x13e07c(0x1db)]===_0x1489c4[_0x13e07c(0x21b)][_0x13e07c(0x221)])[_0x13e07c(0x1fd)](_0x2704be=>_0x2704be['rangeId']))!=null?_0x3a0387:[],_0x3cbc55=JSON[_0x13e07c(0x1fa)](_0x132de2),_0x3daa17=_0x41b375[_0x13e07c(0x1d6)],_0x51804a=_0x41b375['id'],_0x3d5903={'memberId':(await this[_0x13e07c(0x220)]['requireSession'](_0x4178fe))[_0x13e07c(0x1a7)](),'unitId':_0x4178fe,'threadId':_0x3daa17,'mention':_0xfade61,'content':_0x3cbc55,'replyId':_0x51804a},_0x2dbc7b=await this['_httpService'][_0x13e07c(0x20c)](_0x13e07c(0x1cc)+_0x4178fe+_0x13e07c(0x1f5),{'body':_0x3d5903});return!_0x2dbc7b[_0x13e07c(0x1d8)][_0x13e07c(0x20f)]||_0x2dbc7b[_0x13e07c(0x1d8)][_0x13e07c(0x20f)][_0x13e07c(0x1b7)]===0x1;}async[_0x2a2473(0x20b)](_0x28c0e3){const _0x1fa499=_0x2a2473,{unitId:_0x15ebcc}=_0x28c0e3,_0x5a1080=_0x28c0e3[_0x1fa499(0x1d6)],_0x240a99={'memberId':this[_0x1fa499(0x1dc)]['getCurrentUser']()[_0x1fa499(0x1d0)],'unitId':_0x15ebcc,'threadId':_0x5a1080,'solved':_0x28c0e3[_0x1fa499(0x1e5)]?_0x4f9904[_0x1fa499(0x1b3)]:_0x4f9904[_0x1fa499(0x1be)]},_0x38d3c1=await this['_httpService'][_0x1fa499(0x20c)](_0x1fa499(0x1cc)+_0x15ebcc+'/solved',{'body':_0x240a99});return!_0x38d3c1[_0x1fa499(0x1d8)][_0x1fa499(0x20f)]||_0x38d3c1['body'][_0x1fa499(0x20f)][_0x1fa499(0x1b7)]===0x1;}async[_0x2a2473(0x1ee)](_0x4afffe,_0x344a20,_0x15cb89,_0xaffa90){const _0x4ea657=_0x2a2473,_0x2f36a6={'memberId':(await this['_sessionService'][_0x4ea657(0x1eb)](_0x4afffe))[_0x4ea657(0x1a7)](),'threadId':_0x15cb89,'replyId':_0xaffa90,'unitId':_0x4afffe},_0x210aae=await this[_0x4ea657(0x21c)][_0x4ea657(0x20c)](_0x4ea657(0x1cc)+_0x4afffe+_0x4ea657(0x211),{'body':_0x2f36a6});return!_0x210aae[_0x4ea657(0x1d8)][_0x4ea657(0x20f)]||_0x210aae[_0x4ea657(0x1d8)][_0x4ea657(0x20f)]['code']===0x1;}async[_0x2a2473(0x1d9)](_0x33f36e,_0x445368,_0x506e41){const _0x1aded7=_0x2a2473,_0x42d6a8={'unitId':_0x33f36e,'threadId':_0x506e41},_0x524454=await this[_0x1aded7(0x21c)]['post']('/universer-api/comment/unit/'+_0x33f36e+_0x1aded7(0x1dd),{'body':_0x42d6a8}),_0x4f6a58=_0x506e41[_0x1aded7(0x1fd)](_0xb80c49=>_0x373eb9(_0x524454['body']['comments'][_0xb80c49],_0x33f36e,_0x445368))[_0x1aded7(0x1ce)](Boolean);return Object[_0x1aded7(0x21f)](_0x524454[_0x1aded7(0x1d8)][_0x1aded7(0x1ea)])[_0x1aded7(0x1a0)](_0x2457ec=>{this['_userService']['addUser'](_0x2457ec);}),_0x4f6a58;}[_0x2a2473(0x21e)](_0x24f30b){const _0x1733c2=_0x2a2473;return{'id':_0x24f30b['id'],'threadId':_0x24f30b[_0x1733c2(0x1d6)],'ref':_0x24f30b[_0x1733c2(0x1e4)]};}};_0x102993=_0xc92523([_0x4dcd8e(0x0,_0x1489c4['Inject'](_0x126286[_0x2a2473(0x1e7)])),_0x4dcd8e(0x1,_0x1489c4[_0x2a2473(0x209)](_0x1489c4[_0x2a2473(0x217)])),_0x4dcd8e(0x2,_0x1489c4['Inject'](_0x2bbcf7['CollaborationSessionService'])),_0x4dcd8e(0x3,_0x1489c4['Inject'](_0x1489c4['Injector']))],_0x102993);var _0x485ad3=Object[_0x2a2473(0x1cb)],_0x5c1e53=(_0x4db725,_0x52fd18,_0x12cbfb,_0x5e4a43)=>{const _0x193511=_0x2a2473;for(var _0xc73553=_0x5e4a43>0x1?void 0x0:_0x5e4a43?_0x485ad3(_0x52fd18,_0x12cbfb):_0x52fd18,_0xdce475=_0x4db725[_0x193511(0x1ac)]-0x1,_0x4fc099;_0xdce475>=0x0;_0xdce475--)(_0x4fc099=_0x4db725[_0xdce475])&&(_0xc73553=_0x4fc099(_0xc73553)||_0xc73553);return _0xc73553;},_0x3bb396=(_0x5aaab2,_0x1e7584)=>(_0x2e2f00,_0xa46db3)=>_0x1e7584(_0x2e2f00,_0xa46db3,_0x5aaab2);let _0x307c8d=class extends _0x1489c4[_0x2a2473(0x1de)]{constructor(_0x37101d,_0x36eb13){const _0x16d2e4=_0x2a2473;super(),this[_0x16d2e4(0x214)]=_0x37101d,this[_0x16d2e4(0x200)]=_0x36eb13,this[_0x16d2e4(0x20a)]();}['_initDataSource'](){const _0x2e8b5d=_0x2a2473;this[_0x2e8b5d(0x214)][_0x2e8b5d(0x1d5)]=this[_0x2e8b5d(0x200)],this[_0x2e8b5d(0x214)][_0x2e8b5d(0x1f6)]=!0x1;}};_0x307c8d=_0x5c1e53([_0x3bb396(0x0,_0x3008b3[_0x2a2473(0x1f8)]),_0x3bb396(0x1,_0x1489c4[_0x2a2473(0x209)](_0x102993))],_0x307c8d);var _0x573648=Object[_0x2a2473(0x1ef)],_0x169acb=Object[_0x2a2473(0x1cb)],_0x4964d5=(_0x37a19b,_0x2e5ec4,_0x2b27ea)=>_0x2e5ec4 in _0x37a19b?_0x573648(_0x37a19b,_0x2e5ec4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b27ea}):_0x37a19b[_0x2e5ec4]=_0x2b27ea,_0xb99fee=(_0x5d0d00,_0x5d374e,_0x456541,_0x422209)=>{const _0xc94b9c=_0x2a2473;for(var _0x1b7c5d=_0x422209>0x1?void 0x0:_0x422209?_0x169acb(_0x5d374e,_0x456541):_0x5d374e,_0x378c02=_0x5d0d00[_0xc94b9c(0x1ac)]-0x1,_0x4a28bd;_0x378c02>=0x0;_0x378c02--)(_0x4a28bd=_0x5d0d00[_0x378c02])&&(_0x1b7c5d=_0x4a28bd(_0x1b7c5d)||_0x1b7c5d);return _0x1b7c5d;},_0x6043e1=(_0x1bb395,_0x2f2ecb)=>(_0x9dc5c3,_0x91f94)=>_0x2f2ecb(_0x9dc5c3,_0x91f94,_0x1bb395),_0x16fa90=(_0x46bd7f,_0x41271e,_0x265f04)=>_0x4964d5(_0x46bd7f,typeof _0x41271e!=_0x2a2473(0x1d4)?_0x41271e+'':_0x41271e,_0x265f04);_0x5b5f3f[_0x2a2473(0x1d2)]=class extends _0x1489c4[_0x2a2473(0x1fc)]{constructor(_0x30f31f=_0x247007,_0x3d230e,_0x55088f){const _0x2e35b9=_0x2a2473;super(),this['_config']=_0x30f31f,this[_0x2e35b9(0x1ca)]=_0x3d230e,this[_0x2e35b9(0x1f1)]=_0x55088f;const {..._0x44c26f}=_0x1489c4[_0x2e35b9(0x218)]({},_0x247007,this[_0x2e35b9(0x1e6)]);this[_0x2e35b9(0x1f1)]['setConfig'](_0x227be3,_0x44c26f);}['onStarting'](){[[_0x102993],[_0x307c8d],[_0x46f606]]['forEach'](_0xf6e540=>{const _0x38d385=_0x37da;this[_0x38d385(0x1ca)][_0x38d385(0x1cd)](_0xf6e540);});}[_0x2a2473(0x1a1)](){const _0x6c051c=_0x2a2473;this[_0x6c051c(0x1ca)][_0x6c051c(0x1ff)](_0x307c8d),this['_injector'][_0x6c051c(0x1ff)](_0x46f606);}},_0x16fa90(_0x5b5f3f[_0x2a2473(0x1d2)],'pluginName',_0x366665),_0x16fa90(_0x5b5f3f[_0x2a2473(0x1d2)],_0x2a2473(0x21d),_0x1489c4[_0x2a2473(0x1a8)][_0x2a2473(0x1a3)]),_0x5b5f3f['UniverThreadCommentDataSourcePlugin']=_0xb99fee([_0x1489c4[_0x2a2473(0x219)](_0x37cbe5[_0x2a2473(0x1c3)],_0x2bbcf7[_0x2a2473(0x207)],_0x3057e4[_0x2a2473(0x1b5)]),_0x6043e1(0x1,_0x1489c4[_0x2a2473(0x209)](_0x1489c4['Injector'])),_0x6043e1(0x2,_0x1489c4[_0x2a2473(0x205)])],_0x5b5f3f['UniverThreadCommentDataSourcePlugin']),Object[_0x2a2473(0x1ef)](_0x5b5f3f,Symbol[_0x2a2473(0x1fe)],{'value':_0x2a2473(0x1f0)});}));
|
|
1
|
+
(function(_0x3e85c4,_0x3de6e6){const _0xef7b96=_0x28a8,_0x580c=_0x3e85c4();while(!![]){try{const _0x1b8774=parseInt(_0xef7b96(0x19e))/0x1+parseInt(_0xef7b96(0x1c3))/0x2+parseInt(_0xef7b96(0x1d7))/0x3*(parseInt(_0xef7b96(0x159))/0x4)+-parseInt(_0xef7b96(0x16f))/0x5+parseInt(_0xef7b96(0x1b0))/0x6+parseInt(_0xef7b96(0x1a2))/0x7*(-parseInt(_0xef7b96(0x16a))/0x8)+-parseInt(_0xef7b96(0x1b9))/0x9;if(_0x1b8774===_0x3de6e6)break;else _0x580c['push'](_0x580c['shift']());}catch(_0x302887){_0x580c['push'](_0x580c['shift']());}}}(_0x33c2,0x7905b),function(_0x2f7f4e,_0x5c76c9){const _0x5c74f3=_0x28a8;typeof exports==_0x5c74f3(0x1d1)&&typeof module<'u'?_0x5c76c9(exports,require('@univerjs-pro/collaboration-client'),require(_0x5c74f3(0x192)),require(_0x5c74f3(0x1c8)),require(_0x5c74f3(0x188)),require(_0x5c74f3(0x1ac)),require(_0x5c74f3(0x15a)),require(_0x5c74f3(0x184))):typeof define==_0x5c74f3(0x1ce)&&define[_0x5c74f3(0x16b)]?define([_0x5c74f3(0x197),_0x5c74f3(0x196),_0x5c74f3(0x192),_0x5c74f3(0x1c8),_0x5c74f3(0x188),'@univerjs/thread-comment',_0x5c74f3(0x15a),_0x5c74f3(0x184)],_0x5c76c9):(_0x2f7f4e=typeof globalThis<'u'?globalThis:_0x2f7f4e||self,_0x5c76c9(_0x2f7f4e[_0x5c74f3(0x15c)]={},_0x2f7f4e[_0x5c74f3(0x1d4)],_0x2f7f4e[_0x5c74f3(0x17b)],_0x2f7f4e[_0x5c74f3(0x1b6)],_0x2f7f4e[_0x5c74f3(0x1c2)],_0x2f7f4e[_0x5c74f3(0x16c)],_0x2f7f4e['rxjs'],_0x2f7f4e['UniverNetwork']));}(this,function(_0x5aef6a,_0x4b7c90,_0x4ce647,_0xc82365,_0x3aebb4,_0x435464,_0x23220a,_0x481c25){'use strict';const _0x3f3b9e=_0x28a8;const _0x3b43ae='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x218ff7=(_0x3795d4=>(_0x3795d4[_0x3795d4['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3795d4[_0x3795d4[_0x3f3b9e(0x1cf)]=0x1]='Solved',_0x3795d4[_0x3795d4[_0x3f3b9e(0x19d)]=-0x1]=_0x3f3b9e(0x19d),_0x3795d4))(_0x218ff7||{}),_0x3d72d3=(_0x397a5b=>(_0x397a5b[_0x397a5b[_0x3f3b9e(0x18a)]=0x0]=_0x3f3b9e(0x18a),_0x397a5b[_0x397a5b['Add']=0x1]='Add',_0x397a5b[_0x397a5b[_0x3f3b9e(0x18b)]=0x2]=_0x3f3b9e(0x18b),_0x397a5b[_0x397a5b[_0x3f3b9e(0x17f)]=0x3]=_0x3f3b9e(0x17f),_0x397a5b[_0x397a5b['Delete']=0x4]=_0x3f3b9e(0x183),_0x397a5b[_0x397a5b[_0x3f3b9e(0x1b3)]=0x5]=_0x3f3b9e(0x1b3),_0x397a5b[_0x397a5b['UNRECOGNIZED']=-0x1]=_0x3f3b9e(0x19d),_0x397a5b))(_0x3d72d3||{});const _0x459464=_0x2fd0ef=>_0xc82365[_0x3f3b9e(0x165)](new Date(+_0x2fd0ef))[_0x3f3b9e(0x1c7)]('YYYY/MM/DD\x20HH:mm'),_0x4e28a8=async(_0x531bc8,_0xb67f52)=>{const _0x44393e=_0x3f3b9e,_0x45a7d6=_0x531bc8[_0x44393e(0x1b4)](_0xc82365[_0x44393e(0x176)]),_0x21e21b=_0x531bc8[_0x44393e(0x1b4)](_0x481c25['HTTPService']);_0xb67f52[_0x44393e(0x168)](_0x3a8aa9=>{const _0x10bc45=_0x44393e;_0x45a7d6[_0x10bc45(0x15d)](_0x3a8aa9)&&_0xb67f52[_0x10bc45(0x1b5)](_0x3a8aa9);}),_0xb67f52[_0x44393e(0x1b7)]&&(await _0x21e21b[_0x44393e(0x1b4)](_0x44393e(0x171),{'params':{'userIDs':[..._0xb67f52]}}))[_0x44393e(0x1ab)][_0x44393e(0x18d)][_0x44393e(0x168)](_0x5c9ea0=>{const _0x4535dc=_0x44393e;_0x5c9ea0&&_0x45a7d6[_0x4535dc(0x160)](_0x5c9ea0);});};var _0x355be8=Object['getOwnPropertyDescriptor'],_0x4b6d93=(_0x393446,_0x504de5,_0x71356f,_0xcb97ec)=>{const _0x2005ef=_0x3f3b9e;for(var _0x511071=_0xcb97ec>0x1?void 0x0:_0xcb97ec?_0x355be8(_0x504de5,_0x71356f):_0x504de5,_0xe6daee=_0x393446[_0x2005ef(0x1ca)]-0x1,_0x3bff48;_0xe6daee>=0x0;_0xe6daee--)(_0x3bff48=_0x393446[_0xe6daee])&&(_0x511071=_0x3bff48(_0x511071)||_0x511071);return _0x511071;},_0x1d6953=(_0x1fd698,_0x135ae5)=>(_0x41b58a,_0x401ae0)=>_0x135ae5(_0x41b58a,_0x401ae0,_0x1fd698);let _0x19aef7=class extends _0xc82365[_0x3f3b9e(0x174)]{constructor(_0x99e13e,_0x482823,_0x8cae33,_0x4a6ec7){const _0x363f16=_0x3f3b9e;super(),this[_0x363f16(0x1c6)]=_0x99e13e,this[_0x363f16(0x179)]=_0x482823,this[_0x363f16(0x1c5)]=_0x8cae33,this[_0x363f16(0x186)]=_0x4a6ec7,this[_0x363f16(0x177)](),this[_0x363f16(0x181)]();}[_0x3f3b9e(0x181)](){const _0x34c16f=_0x3f3b9e;this[_0x34c16f(0x1a9)](this['_threadCommentModel'][_0x34c16f(0x17d)][_0x34c16f(0x17a)](_0x23220a['bufferTime'](0x10))[_0x34c16f(0x175)](_0x226139=>{const _0xa8fdbb=_0x34c16f,_0x2ec085=new Set();_0x226139['forEach'](_0x1e117f=>{const _0x3486db=_0x28a8;switch(_0x1e117f[_0x3486db(0x1a8)]){case'add':{const _0x3cad25=_0x1e117f[_0x3486db(0x19a)][_0x3486db(0x16d)];_0x2ec085['add'](_0x3cad25);break;}}}),_0x4e28a8(this[_0xa8fdbb(0x186)],_0x2ec085);}));}[_0x3f3b9e(0x177)](){const _0xbd0cc6=_0x3f3b9e;this[_0xbd0cc6(0x1a9)](this['_commentService'][_0xbd0cc6(0x17d)][_0xbd0cc6(0x175)](async _0x5e67df=>{const _0x3d1a1e=_0xbd0cc6;var _0x2b4670,_0x5bb884,_0x4c3843,_0x2a07bf;const _0x27e400=(_0x2b4670=this['_threadCommentModel'][_0x3d1a1e(0x1c0)](_0x5e67df[_0x3d1a1e(0x1b1)])['find'](_0x4b7d00=>_0x4b7d00[_0x3d1a1e(0x1d2)]===_0x5e67df['threadId']))==null?void 0x0:_0x2b4670[_0x3d1a1e(0x178)];if(!_0x27e400)return;const {unitId:_0x1a08ef,subUnitId:_0x22ca85}=_0x27e400;switch(_0x5e67df['user']&&this[_0x3d1a1e(0x1c5)]['addUser'](_0x5e67df['user']),_0x5e67df[_0x3d1a1e(0x1a8)]){case _0x3d72d3[_0x3d1a1e(0x17e)]:break;case _0x3d72d3[_0x3d1a1e(0x18b)]:{this[_0x3d1a1e(0x179)]['addComment'](_0x1a08ef,_0x22ca85,{'unitId':_0x1a08ef,'subUnitId':_0x22ca85,'ref':'','id':_0x5e67df[_0x3d1a1e(0x18e)],'dT':_0x459464(+_0x5e67df[_0x3d1a1e(0x163)]),'threadId':_0x5e67df[_0x3d1a1e(0x1d2)],'personId':(_0x4c3843=(_0x5bb884=_0x5e67df[_0x3d1a1e(0x1a0)])==null?void 0x0:_0x5bb884['userID'])!=null?_0x4c3843:_0x5e67df[_0x3d1a1e(0x18f)],'text':JSON['parse'](_0x5e67df[_0x3d1a1e(0x1a3)]),'parentId':_0x27e400['id']});break;}case _0x3d72d3['Delete']:{const _0x232450=this['_threadCommentModel'][_0x3d1a1e(0x15e)](_0x1a08ef,_0x22ca85,_0x5e67df[_0x3d1a1e(0x18e)]);_0x232450&&_0x232450[_0x3d1a1e(0x189)]&&this['_threadCommentModel']['deleteComment'](_0x1a08ef,_0x22ca85,_0x5e67df['replyId']);break;}case _0x3d72d3['Edit']:{this[_0x3d1a1e(0x179)]['updateComment'](_0x1a08ef,_0x22ca85,{'commentId':_0x5e67df['replyId'],'text':JSON[_0x3d1a1e(0x1cb)](_0x5e67df['content'])});break;}case _0x3d72d3[_0x3d1a1e(0x1b3)]:{const _0x1489c2=(_0x2a07bf=this[_0x3d1a1e(0x179)][_0x3d1a1e(0x1c0)](_0x5e67df[_0x3d1a1e(0x1b1)])[_0x3d1a1e(0x1d3)](_0x506095=>_0x506095['threadId']===_0x5e67df[_0x3d1a1e(0x1d2)]))==null?void 0x0:_0x2a07bf[_0x3d1a1e(0x178)];_0x1489c2&&this['_threadCommentModel']['resolveComment'](_0x1a08ef,_0x22ca85,_0x1489c2['id'],_0x5e67df[_0x3d1a1e(0x1ba)]===_0x218ff7[_0x3d1a1e(0x1cf)]);break;}}}));}};_0x19aef7=_0x4b6d93([_0x1d6953(0x0,_0xc82365[_0x3f3b9e(0x1bf)](_0x4b7c90['CommentService'])),_0x1d6953(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0x435464[_0x3f3b9e(0x1b2)])),_0x1d6953(0x2,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x176)])),_0x1d6953(0x3,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365['Injector']))],_0x19aef7);const _0x18bcdf=_0x3f3b9e(0x166),_0x13396e={};var _0x40ea8d=Object['getOwnPropertyDescriptor'],_0x491e56=(_0x34730e,_0x457988,_0x5f345b,_0x248e55)=>{for(var _0x3b4d9b=_0x248e55>0x1?void 0x0:_0x248e55?_0x40ea8d(_0x457988,_0x5f345b):_0x457988,_0x27ca2e=_0x34730e['length']-0x1,_0x390415;_0x27ca2e>=0x0;_0x27ca2e--)(_0x390415=_0x34730e[_0x27ca2e])&&(_0x3b4d9b=_0x390415(_0x3b4d9b)||_0x3b4d9b);return _0x3b4d9b;},_0xce3454=(_0x4635f3,_0x40fddd)=>(_0x8ef1a8,_0x1010c5)=>_0x40fddd(_0x8ef1a8,_0x1010c5,_0x4635f3);function _0x253b60(_0x28cb3d,_0x3de7e8){const _0x530142=_0x3f3b9e,_0x4539ce=_0x28cb3d['replies'][0x0];return{..._0x3de7e8,'id':_0x4539ce[_0x530142(0x18e)],'resolved':_0x28cb3d[_0x530142(0x1ba)]===0x1,'dT':_0x459464(_0x4539ce[_0x530142(0x163)]),'personId':_0x4539ce[_0x530142(0x18f)],'threadId':_0x4539ce[_0x530142(0x1d2)]};}function _0x28bd6c(_0x4b8cf1,_0x3cd23f,_0x5efa1b){const _0xa1184b=_0x3f3b9e;var _0x1f91ab,_0x2e77c9;if(((_0x2e77c9=(_0x1f91ab=_0x4b8cf1==null?void 0x0:_0x4b8cf1['replies'])==null?void 0x0:_0x1f91ab['length'])!=null?_0x2e77c9:0x0)>0x0){const _0xf30381=(_0x26eb60,_0x5af123)=>({'id':_0x26eb60[_0xa1184b(0x18e)],'threadId':_0x26eb60[_0xa1184b(0x1d2)],'dT':_0x459464(_0x26eb60[_0xa1184b(0x163)]),'personId':_0x26eb60['userId'],'resolved':_0x4b8cf1[_0xa1184b(0x1ba)]===_0x218ff7[_0xa1184b(0x1cf)],'unitId':_0x3cd23f,'subUnitId':_0x5efa1b,'text':JSON[_0xa1184b(0x1cb)](_0x26eb60[_0xa1184b(0x1a3)]),'parentId':_0x5af123}),_0x3df7f5=_0xf30381(_0x4b8cf1[_0xa1184b(0x1c1)][0x0]);return{..._0x3df7f5,'children':_0x4b8cf1['replies'][_0xa1184b(0x164)](0x1)[_0xa1184b(0x1d6)](_0x354af2=>_0xf30381(_0x354af2,_0x3df7f5['id']))};}return null;}let _0x1ee8ec=class{constructor(_0x32acde,_0x3af678,_0x97b383,_0x5cdeb2){const _0x25cabb=_0x3f3b9e;this[_0x25cabb(0x1cc)]=_0x32acde,this[_0x25cabb(0x1c5)]=_0x3af678,this['_sessionService']=_0x97b383,this[_0x25cabb(0x186)]=_0x5cdeb2;}async['addComment'](_0x1053b2){const _0x439a09=_0x3f3b9e;var _0x577abc,_0x2b47a3;const {parentId:_0x401a07,unitId:_0x292e06,text:_0x427d19,threadId:_0x1576e6}=_0x1053b2,_0xa08641=(_0x2b47a3=(_0x577abc=_0x427d19[_0x439a09(0x1a7)])==null?void 0x0:_0x577abc['filter'](_0x48b17a=>_0x48b17a['rangeType']===_0xc82365[_0x439a09(0x1a1)][_0x439a09(0x1cd)])['map'](_0x1ac5df=>_0x1ac5df[_0x439a09(0x172)]))!=null?_0x2b47a3:[],_0x738c3=JSON[_0x439a09(0x17c)](_0x427d19),_0x52bf9e=(await this[_0x439a09(0x180)][_0x439a09(0x199)](_0x292e06))['getMemberID']();if(_0x401a07){const _0xd4d376={'memberId':_0x52bf9e,'unitId':_0x292e06,'content':_0x738c3,'mention':_0xa08641,'threadId':_0x1576e6},_0x1afd2d=(await this[_0x439a09(0x1cc)][_0x439a09(0x1a6)]('/universer-api/comment/unit/'+_0x292e06+_0x439a09(0x1b8),{'body':_0xd4d376}))[_0x439a09(0x1ab)][_0x439a09(0x1a5)];return{..._0x1053b2,'id':_0x1afd2d[_0x439a09(0x18e)],'dT':_0xc82365['dayjs'](+_0x1afd2d[_0x439a09(0x163)])[_0x439a09(0x1c7)](_0x439a09(0x1bd)),'personId':_0x1afd2d[_0x439a09(0x18f)]};}else{const _0x41609b={'memberId':_0x52bf9e,'unitId':_0x292e06,'content':_0x738c3,'mention':_0xa08641},_0x2bb7c0=await this['_httpService'][_0x439a09(0x1a6)](_0x439a09(0x19f)+_0x292e06+_0x439a09(0x1a4),{'body':_0x41609b});return _0x253b60(_0x2bb7c0[_0x439a09(0x1ab)]['comment'],_0x1053b2);}}async[_0x3f3b9e(0x18c)](_0x4c1ac0){const _0x164a6d=_0x3f3b9e;var _0x5bca94,_0x21852f;const {text:_0x2f9d28,unitId:_0x523c00}=_0x4c1ac0,_0x2c4ec2=(_0x21852f=(_0x5bca94=_0x2f9d28[_0x164a6d(0x1a7)])==null?void 0x0:_0x5bca94['filter'](_0x26094b=>_0x26094b[_0x164a6d(0x173)]===_0xc82365[_0x164a6d(0x1a1)][_0x164a6d(0x1cd)])[_0x164a6d(0x1d6)](_0x4d8949=>_0x4d8949['rangeId']))!=null?_0x21852f:[],_0x2b81fa=JSON[_0x164a6d(0x17c)](_0x2f9d28),_0x1cd74b=_0x4c1ac0['threadId'],_0x54f288=_0x4c1ac0['id'],_0x2e6f75={'memberId':(await this[_0x164a6d(0x180)]['requireSession'](_0x523c00))[_0x164a6d(0x169)](),'unitId':_0x523c00,'threadId':_0x1cd74b,'mention':_0x2c4ec2,'content':_0x2b81fa,'replyId':_0x54f288},_0x1ad429=await this[_0x164a6d(0x1cc)][_0x164a6d(0x1a6)](_0x164a6d(0x19f)+_0x523c00+_0x164a6d(0x16e),{'body':_0x2e6f75});return!_0x1ad429[_0x164a6d(0x1ab)]['error']||_0x1ad429['body'][_0x164a6d(0x1bb)][_0x164a6d(0x1aa)]===0x1;}async[_0x3f3b9e(0x162)](_0x126a55){const _0x415973=_0x3f3b9e,{unitId:_0x4edce6}=_0x126a55,_0x545032=_0x126a55[_0x415973(0x1d2)],_0x3c5b44={'memberId':this[_0x415973(0x1c5)]['getCurrentUser']()['userID'],'unitId':_0x4edce6,'threadId':_0x545032,'solved':_0x126a55['resolved']?_0x218ff7[_0x415973(0x1cf)]:_0x218ff7['OpenOrReOpen']},_0x5cbd0e=await this[_0x415973(0x1cc)][_0x415973(0x1a6)](_0x415973(0x19f)+_0x4edce6+_0x415973(0x167),{'body':_0x3c5b44});return!_0x5cbd0e[_0x415973(0x1ab)]['error']||_0x5cbd0e[_0x415973(0x1ab)]['error'][_0x415973(0x1aa)]===0x1;}async['deleteComment'](_0x4a98f4,_0xdb2860,_0x50c03e,_0x3a45f7){const _0x9dfb51=_0x3f3b9e,_0xc164b8={'memberId':(await this[_0x9dfb51(0x180)][_0x9dfb51(0x199)](_0x4a98f4))[_0x9dfb51(0x169)](),'threadId':_0x50c03e,'replyId':_0x3a45f7,'unitId':_0x4a98f4},_0x2b19ac=await this[_0x9dfb51(0x1cc)][_0x9dfb51(0x1a6)](_0x9dfb51(0x19f)+_0x4a98f4+'/delete',{'body':_0xc164b8});return!_0x2b19ac[_0x9dfb51(0x1ab)][_0x9dfb51(0x1bb)]||_0x2b19ac[_0x9dfb51(0x1ab)][_0x9dfb51(0x1bb)][_0x9dfb51(0x1aa)]===0x1;}async[_0x3f3b9e(0x1c9)](_0x569fe5,_0xd3a4a1,_0x2eec93){const _0x4770b3=_0x3f3b9e,_0x4029b1={'unitId':_0x569fe5,'threadId':_0x2eec93},_0x2b931d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x569fe5+_0x4770b3(0x198),{'body':_0x4029b1}),_0x4f4664=_0x2eec93['map'](_0x2f08a7=>_0x28bd6c(_0x2b931d[_0x4770b3(0x1ab)][_0x4770b3(0x194)][_0x2f08a7],_0x569fe5,_0xd3a4a1))[_0x4770b3(0x187)](Boolean);return Object[_0x4770b3(0x170)](_0x2b931d[_0x4770b3(0x1ab)][_0x4770b3(0x18d)])['forEach'](_0x4a0d10=>{const _0x519539=_0x4770b3;this['_userService'][_0x519539(0x160)](_0x4a0d10);}),_0x4f4664;}['saveCommentToSnapshot'](_0x4bd6bb){const _0x574855=_0x3f3b9e;return{'id':_0x4bd6bb['id'],'threadId':_0x4bd6bb[_0x574855(0x1d2)],'ref':_0x4bd6bb['ref']};}};_0x1ee8ec=_0x491e56([_0xce3454(0x0,_0xc82365[_0x3f3b9e(0x1bf)](_0x481c25[_0x3f3b9e(0x1d5)])),_0xce3454(0x1,_0xc82365['Inject'](_0xc82365[_0x3f3b9e(0x176)])),_0xce3454(0x2,_0xc82365[_0x3f3b9e(0x1bf)](_0x4b7c90[_0x3f3b9e(0x190)])),_0xce3454(0x3,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x15f)]))],_0x1ee8ec);var _0x180f3a=Object['getOwnPropertyDescriptor'],_0x343863=(_0x348e90,_0x3d654e,_0x59482a,_0x1ba828)=>{for(var _0x504ec2=_0x1ba828>0x1?void 0x0:_0x1ba828?_0x180f3a(_0x3d654e,_0x59482a):_0x3d654e,_0x1820a7=_0x348e90['length']-0x1,_0x414143;_0x1820a7>=0x0;_0x1820a7--)(_0x414143=_0x348e90[_0x1820a7])&&(_0x504ec2=_0x414143(_0x504ec2)||_0x504ec2);return _0x504ec2;},_0x55713f=(_0x4f6ef3,_0x54613f)=>(_0x40241a,_0x3a3f66)=>_0x54613f(_0x40241a,_0x3a3f66,_0x4f6ef3);let _0x4ce67b=class extends _0xc82365['Disposable']{constructor(_0x41b1a7,_0x17b06f){const _0x4d3625=_0x3f3b9e;super(),this['_threadCommentDataSourceService']=_0x41b1a7,this['_threadCommentDataSource']=_0x17b06f,this[_0x4d3625(0x1be)]();}[_0x3f3b9e(0x1be)](){const _0x53edf5=_0x3f3b9e;this[_0x53edf5(0x1af)]['dataSource']=this['_threadCommentDataSource'],this[_0x53edf5(0x1af)][_0x53edf5(0x1ae)]=!0x1;}};_0x4ce67b=_0x343863([_0x55713f(0x0,_0x435464[_0x3f3b9e(0x193)]),_0x55713f(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0x1ee8ec))],_0x4ce67b);var _0x88c4ae=Object[_0x3f3b9e(0x1c4)],_0x54ebfc=Object[_0x3f3b9e(0x185)],_0x1972d4=(_0x1ba96b,_0x3770d5,_0x22cd4c)=>_0x3770d5 in _0x1ba96b?_0x88c4ae(_0x1ba96b,_0x3770d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x22cd4c}):_0x1ba96b[_0x3770d5]=_0x22cd4c,_0x32ec8a=(_0x11230d,_0x44e3c7,_0x272320,_0x4196da)=>{for(var _0x5bf3f6=_0x4196da>0x1?void 0x0:_0x4196da?_0x54ebfc(_0x44e3c7,_0x272320):_0x44e3c7,_0x4ed622=_0x11230d['length']-0x1,_0x182eb9;_0x4ed622>=0x0;_0x4ed622--)(_0x182eb9=_0x11230d[_0x4ed622])&&(_0x5bf3f6=_0x182eb9(_0x5bf3f6)||_0x5bf3f6);return _0x5bf3f6;},_0x1d369f=(_0x58c766,_0x36d79)=>(_0x460bd3,_0x3cdce3)=>_0x36d79(_0x460bd3,_0x3cdce3,_0x58c766),_0x2d65b0=(_0x7cc5e6,_0x3fb421,_0x5834cc)=>_0x1972d4(_0x7cc5e6,typeof _0x3fb421!='symbol'?_0x3fb421+'':_0x3fb421,_0x5834cc);_0x5aef6a[_0x3f3b9e(0x1bc)]=class extends _0xc82365['Plugin']{constructor(_0x100ff7=_0x13396e,_0x2a858a,_0x58553b){const _0x7af5ca=_0x3f3b9e;super(),this['_config']=_0x100ff7,this[_0x7af5ca(0x186)]=_0x2a858a,this['_configService']=_0x58553b;const {..._0x1bf34f}=_0xc82365[_0x7af5ca(0x1d0)]({},_0x13396e,this[_0x7af5ca(0x182)]);this[_0x7af5ca(0x191)][_0x7af5ca(0x161)](_0x18bcdf,_0x1bf34f);}['onStarting'](){[[_0x1ee8ec],[_0x4ce67b],[_0x19aef7]]['forEach'](_0x20aeb8=>{const _0xaceafa=_0x28a8;this[_0xaceafa(0x186)]['add'](_0x20aeb8);});}['onReady'](){const _0x691d06=_0x3f3b9e;this['_injector'][_0x691d06(0x1b4)](_0x4ce67b),this[_0x691d06(0x186)][_0x691d06(0x1b4)](_0x19aef7);}},_0x2d65b0(_0x5aef6a[_0x3f3b9e(0x1bc)],'pluginName',_0x3b43ae),_0x2d65b0(_0x5aef6a[_0x3f3b9e(0x1bc)],_0x3f3b9e(0x1a8),_0xc82365[_0x3f3b9e(0x195)]['UNIVER_UNKNOWN']),_0x5aef6a['UniverThreadCommentDataSourcePlugin']=_0x32ec8a([_0xc82365[_0x3f3b9e(0x15b)](_0x3aebb4[_0x3f3b9e(0x19b)],_0x4b7c90[_0x3f3b9e(0x158)],_0x4ce647[_0x3f3b9e(0x1ad)]),_0x1d369f(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x15f)])),_0x1d369f(0x2,_0xc82365['IConfigService'])],_0x5aef6a[_0x3f3b9e(0x1bc)]),Object['defineProperty'](_0x5aef6a,Symbol[_0x3f3b9e(0x19c)],{'value':'Module'});}));function _0x28a8(_0x2a4037,_0x1b3767){const _0x33c242=_0x33c2();return _0x28a8=function(_0x28a88e,_0x1edbf0){_0x28a88e=_0x28a88e-0x158;let _0x103393=_0x33c242[_0x28a88e];return _0x103393;},_0x28a8(_0x2a4037,_0x1b3767);}function _0x33c2(){const _0x7089a0=['UniverCollaborationClientPlugin','28rBbWbe','rxjs','DependentOn','UniverProThreadCommentDatasource','getUser','getComment','Injector','addUser','setConfig','resolveComment','createTimestamp','slice','dayjs','thread-comment-data-source.config','/solved','forEach','getMemberID','3856sERCJM','amd','UniverThreadComment','personId','/edit','2356045LIMyPx','values','/universer-api/user/list','rangeId','rangeType','Disposable','subscribe','UserManagerService','_init','root','_threadCommentModel','pipe','UniverProLicense','stringify','commentUpdate$','Add','Edit','_sessionService','_initUserSync','_config','Delete','@univerjs/network','getOwnPropertyDescriptor','_injector','filter','@univerjs/thread-comment-ui','parentId','Unknown','Reply','updateComment','users','replyId','userId','CollaborationSessionService','_configService','@univerjs-pro/license','IThreadCommentDataSourceService','comments','UniverInstanceType','@univerjs-pro/collaboration-client','exports','/list','requireSession','payload','UniverThreadCommentUIPlugin','toStringTag','UNRECOGNIZED','640381xqOyQV','/universer-api/comment/unit/','user','CustomRangeType','10297EoTNGs','content','/add','reply','post','customRanges','type','disposeWithMe','code','body','@univerjs/thread-comment','UniverLicensePlugin','syncUpdateMutationToColla','_threadCommentDataSourceService','5785986JZWXHf','unitId','ThreadCommentModel','Solve','get','delete','UniverCore','size','/reply','6577938HiGudu','solved','error','UniverThreadCommentDataSourcePlugin','YYYY/MM/DD\x20HH:mm','_initDataSource','Inject','getUnit','replies','UniverThreadCommentUi','757202oKHMsj','defineProperty','_userService','_commentService','format','@univerjs/core','listComments','length','parse','_httpService','COMMENT','function','Solved','merge','object','threadId','find','UniverProCollaborationClient','HTTPService','map','181503MUrHEJ'];_0x33c2=function(){return _0x7089a0;};return _0x33c2();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505021607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505021607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505021607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505021607",
|
|
51
|
+
"@univerjs/network": "0.7.0-nightly.202505021607",
|
|
52
52
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.
|
|
53
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505021607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505021607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
|
-
"vite": "^6.3.
|
|
59
|
+
"vite": "^6.3.4",
|
|
60
60
|
"vitest": "^3.1.2",
|
|
61
61
|
"@univerjs-infra/shared": "0.7.0-beta.0"
|
|
62
62
|
},
|