@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504181606 → 0.6.10-nightly.202504191606

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x388aec=_0x3e84;(function(_0x114cc8,_0xc8c4f7){const _0x533e00=_0x3e84,_0x3eae97=_0x114cc8();while(!![]){try{const _0x55b011=parseInt(_0x533e00(0x1b3))/0x1*(parseInt(_0x533e00(0x16f))/0x2)+-parseInt(_0x533e00(0x15e))/0x3*(-parseInt(_0x533e00(0x193))/0x4)+-parseInt(_0x533e00(0x168))/0x5+parseInt(_0x533e00(0x194))/0x6+-parseInt(_0x533e00(0x18a))/0x7+parseInt(_0x533e00(0x1a9))/0x8*(parseInt(_0x533e00(0x17b))/0x9)+-parseInt(_0x533e00(0x16e))/0xa;if(_0x55b011===_0xc8c4f7)break;else _0x3eae97['push'](_0x3eae97['shift']());}catch(_0x30b7c1){_0x3eae97['push'](_0x3eae97['shift']());}}}(_0x5285,0xf042c));Object[_0x388aec(0x173)](exports,Symbol[_0x388aec(0x16a)],{'value':_0x388aec(0x13e)});const b=require(_0x388aec(0x172)),T=require('@univerjs-pro/license'),c=require(_0x388aec(0x1ad)),j=require(_0x388aec(0x1ba)),M=require(_0x388aec(0x1a8)),w=require(_0x388aec(0x19c)),P=require(_0x388aec(0x197)),U=_0x388aec(0x148);var I=(_0x2c4b32=>(_0x2c4b32[_0x2c4b32['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2c4b32[_0x2c4b32[_0x388aec(0x147)]=0x1]=_0x388aec(0x147),_0x2c4b32[_0x2c4b32['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2c4b32))(I||{}),v=(_0x4ca27f=>(_0x4ca27f[_0x4ca27f['Unknown']=0x0]='Unknown',_0x4ca27f[_0x4ca27f[_0x388aec(0x161)]=0x1]='Add',_0x4ca27f[_0x4ca27f[_0x388aec(0x1b6)]=0x2]=_0x388aec(0x1b6),_0x4ca27f[_0x4ca27f[_0x388aec(0x1af)]=0x3]=_0x388aec(0x1af),_0x4ca27f[_0x4ca27f[_0x388aec(0x184)]=0x4]=_0x388aec(0x184),_0x4ca27f[_0x4ca27f[_0x388aec(0x189)]=0x5]=_0x388aec(0x189),_0x4ca27f[_0x4ca27f[_0x388aec(0x1b9)]=-0x1]=_0x388aec(0x1b9),_0x4ca27f))(v||{});const f=_0x1304ca=>c['dayjs'](new Date(+_0x1304ca))[_0x388aec(0x13f)](_0x388aec(0x158)),R=async(_0x6d2d23,_0x4975cb)=>{const _0x59bbad=_0x388aec,_0x228f75=_0x6d2d23[_0x59bbad(0x1aa)](c[_0x59bbad(0x178)]),_0xac6127=_0x6d2d23['get'](P[_0x59bbad(0x1b5)]);_0x4975cb[_0x59bbad(0x14a)](_0x449dcd=>{const _0x291c08=_0x59bbad;_0x228f75[_0x291c08(0x195)](_0x449dcd)&&_0x4975cb[_0x291c08(0x171)](_0x449dcd);}),_0x4975cb[_0x59bbad(0x18d)]&&(await _0xac6127[_0x59bbad(0x1aa)](_0x59bbad(0x16b),{'params':{'userIDs':[..._0x4975cb]}}))[_0x59bbad(0x192)][_0x59bbad(0x196)]['forEach'](_0x444b4a=>{const _0x281ee4=_0x59bbad;_0x444b4a&&_0x228f75[_0x281ee4(0x19f)](_0x444b4a);});};var $=Object[_0x388aec(0x1a5)],E=(_0x45c239,_0x4d1bc3,_0x552aad,_0x2b0cf8)=>{const _0x4fea2c=_0x388aec;for(var _0x296acf=_0x2b0cf8>0x1?void 0x0:_0x2b0cf8?$(_0x4d1bc3,_0x552aad):_0x4d1bc3,_0x357276=_0x45c239[_0x4fea2c(0x19a)]-0x1,_0x41befa;_0x357276>=0x0;_0x357276--)(_0x41befa=_0x45c239[_0x357276])&&(_0x296acf=_0x41befa(_0x296acf)||_0x296acf);return _0x296acf;},S=(_0x39d99a,_0x27ff11)=>(_0x2bd6ac,_0x4f51e1)=>_0x27ff11(_0x2bd6ac,_0x4f51e1,_0x39d99a);let p=class extends c[_0x388aec(0x154)]{constructor(_0x4a49bc,_0x3f72fc,_0x379876,_0x20a011){const _0x443840=_0x388aec;super(),this[_0x443840(0x198)]=_0x4a49bc,this[_0x443840(0x13c)]=_0x3f72fc,this[_0x443840(0x15d)]=_0x379876,this['_injector']=_0x20a011,this[_0x443840(0x1b1)](),this[_0x443840(0x19b)]();}[_0x388aec(0x19b)](){const _0x5ab1ed=_0x388aec;this[_0x5ab1ed(0x185)](this[_0x5ab1ed(0x13c)][_0x5ab1ed(0x146)][_0x5ab1ed(0x155)](w[_0x5ab1ed(0x165)](0x10))[_0x5ab1ed(0x14b)](_0x6ce85d=>{const _0x5cd3dc=new Set();_0x6ce85d['forEach'](_0x3c0804=>{const _0x233ca4=_0x3e84;switch(_0x3c0804['type']){case _0x233ca4(0x169):{const _0x987780=_0x3c0804[_0x233ca4(0x160)][_0x233ca4(0x15a)];_0x5cd3dc[_0x233ca4(0x169)](_0x987780);break;}}}),R(this['_injector'],_0x5cd3dc);}));}[_0x388aec(0x1b1)](){const _0x166ab1=_0x388aec;this['disposeWithMe'](this[_0x166ab1(0x198)][_0x166ab1(0x146)][_0x166ab1(0x14b)](async _0x50df74=>{const _0x493a1e=_0x166ab1;var _0x58e99d,_0x4501e7,_0x332815,_0x5de7a2;const _0x36d99b=(_0x58e99d=this['_threadCommentModel']['getUnit'](_0x50df74[_0x493a1e(0x18c)])['find'](_0x2c4aa6=>_0x2c4aa6['threadId']===_0x50df74['threadId']))==null?void 0x0:_0x58e99d['root'];if(!_0x36d99b)return;const {unitId:_0x32b90d,subUnitId:_0x59e12f}=_0x36d99b;switch(_0x50df74[_0x493a1e(0x1a1)]&&this[_0x493a1e(0x15d)][_0x493a1e(0x19f)](_0x50df74[_0x493a1e(0x1a1)]),_0x50df74['type']){case v[_0x493a1e(0x161)]:break;case v['Reply']:{this[_0x493a1e(0x13c)][_0x493a1e(0x164)](_0x32b90d,_0x59e12f,{'unitId':_0x32b90d,'subUnitId':_0x59e12f,'ref':'','id':_0x50df74[_0x493a1e(0x139)],'dT':f(+_0x50df74[_0x493a1e(0x17f)]),'threadId':_0x50df74[_0x493a1e(0x162)],'personId':(_0x332815=(_0x4501e7=_0x50df74[_0x493a1e(0x1a1)])==null?void 0x0:_0x4501e7[_0x493a1e(0x17c)])!=null?_0x332815:_0x50df74[_0x493a1e(0x1b0)],'text':JSON[_0x493a1e(0x14e)](_0x50df74[_0x493a1e(0x149)]),'parentId':_0x36d99b['id']});break;}case v['Delete']:{const _0x116e87=this[_0x493a1e(0x13c)][_0x493a1e(0x18b)](_0x32b90d,_0x59e12f,_0x50df74[_0x493a1e(0x139)]);_0x116e87&&_0x116e87['parentId']&&this[_0x493a1e(0x13c)]['deleteComment'](_0x32b90d,_0x59e12f,_0x50df74[_0x493a1e(0x139)]);break;}case v['Edit']:{this[_0x493a1e(0x13c)]['updateComment'](_0x32b90d,_0x59e12f,{'commentId':_0x50df74[_0x493a1e(0x139)],'text':JSON[_0x493a1e(0x14e)](_0x50df74[_0x493a1e(0x149)])});break;}case v[_0x493a1e(0x189)]:{const _0x435044=(_0x5de7a2=this[_0x493a1e(0x13c)][_0x493a1e(0x186)](_0x50df74['unitId'])['find'](_0x45b6f9=>_0x45b6f9[_0x493a1e(0x162)]===_0x50df74[_0x493a1e(0x162)]))==null?void 0x0:_0x5de7a2['root'];_0x435044&&this[_0x493a1e(0x13c)][_0x493a1e(0x1a3)](_0x32b90d,_0x59e12f,_0x435044['id'],_0x50df74['solved']===I[_0x493a1e(0x147)]);break;}}}));}};p=E([S(0x0,c[_0x388aec(0x19e)](b[_0x388aec(0x166)])),S(0x1,c[_0x388aec(0x19e)](M['ThreadCommentModel'])),S(0x2,c[_0x388aec(0x19e)](c[_0x388aec(0x178)])),S(0x3,c[_0x388aec(0x19e)](c[_0x388aec(0x140)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x388aec(0x1a5)],x=(_0x15f0d5,_0xa98014,_0x330a1b,_0x7445e)=>{for(var _0x18e188=_0x7445e>0x1?void 0x0:_0x7445e?A(_0xa98014,_0x330a1b):_0xa98014,_0x91e0ce=_0x15f0d5['length']-0x1,_0x15465d;_0x91e0ce>=0x0;_0x91e0ce--)(_0x15465d=_0x15f0d5[_0x91e0ce])&&(_0x18e188=_0x15465d(_0x18e188)||_0x18e188);return _0x18e188;},_=(_0x577213,_0x406217)=>(_0x2806c2,_0x11106b)=>_0x406217(_0x2806c2,_0x11106b,_0x577213);function Y(_0x364dcf,_0xac98c){const _0x1e3fb9=_0x388aec,_0x8d5554=_0x364dcf['replies'][0x0];return{..._0xac98c,'id':_0x8d5554[_0x1e3fb9(0x139)],'resolved':_0x364dcf[_0x1e3fb9(0x1a7)]===0x1,'dT':f(_0x8d5554['createTimestamp']),'personId':_0x8d5554['userId'],'threadId':_0x8d5554[_0x1e3fb9(0x162)]};}function G(_0x1b908d,_0x5c674b,_0x3691c8){const _0x2c94cb=_0x388aec;var _0x1c6cb4,_0x2b9a82;if(((_0x2b9a82=(_0x1c6cb4=_0x1b908d==null?void 0x0:_0x1b908d[_0x2c94cb(0x179)])==null?void 0x0:_0x1c6cb4[_0x2c94cb(0x19a)])!=null?_0x2b9a82:0x0)>0x0){const _0x1253a4=(_0x161ad1,_0x518e59)=>({'id':_0x161ad1['replyId'],'threadId':_0x161ad1[_0x2c94cb(0x162)],'dT':f(_0x161ad1[_0x2c94cb(0x17f)]),'personId':_0x161ad1[_0x2c94cb(0x1b0)],'resolved':_0x1b908d[_0x2c94cb(0x1a7)]===I[_0x2c94cb(0x147)],'unitId':_0x5c674b,'subUnitId':_0x3691c8,'text':JSON['parse'](_0x161ad1['content']),'parentId':_0x518e59}),_0x1ded71=_0x1253a4(_0x1b908d[_0x2c94cb(0x179)][0x0]);return{..._0x1ded71,'children':_0x1b908d[_0x2c94cb(0x179)]['slice'](0x1)[_0x2c94cb(0x188)](_0x35885e=>_0x1253a4(_0x35885e,_0x1ded71['id']))};}return null;}let g=class{constructor(_0xdf16f2,_0x255c3a,_0x571b01,_0x360c31){const _0x289c55=_0x388aec;this[_0x289c55(0x14c)]=_0xdf16f2,this['_userService']=_0x255c3a,this['_sessionService']=_0x571b01,this[_0x289c55(0x167)]=_0x360c31;}async[_0x388aec(0x164)](_0x177223){const _0x47e2a4=_0x388aec;var _0x4e2d54,_0x594c1b;const {parentId:_0xe0661d,unitId:_0x313229,text:_0x2b6deb,threadId:_0x22fdfc}=_0x177223,_0x1a4f6b=(_0x594c1b=(_0x4e2d54=_0x2b6deb[_0x47e2a4(0x1a0)])==null?void 0x0:_0x4e2d54[_0x47e2a4(0x15b)](_0x37e032=>_0x37e032[_0x47e2a4(0x181)]===c[_0x47e2a4(0x1a2)][_0x47e2a4(0x177)])[_0x47e2a4(0x188)](_0x4fd371=>_0x4fd371[_0x47e2a4(0x13b)]))!=null?_0x594c1b:[],_0x3e232b=JSON['stringify'](_0x2b6deb),_0x5c1d73=(await this[_0x47e2a4(0x156)][_0x47e2a4(0x13a)](_0x313229))[_0x47e2a4(0x174)]();if(_0xe0661d){const _0x1cb3bf={'memberId':_0x5c1d73,'unitId':_0x313229,'content':_0x3e232b,'mention':_0x1a4f6b,'threadId':_0x22fdfc},_0x21a3e0=(await this[_0x47e2a4(0x14c)][_0x47e2a4(0x1ac)](_0x47e2a4(0x14d)+_0x313229+_0x47e2a4(0x176),{'body':_0x1cb3bf}))[_0x47e2a4(0x192)][_0x47e2a4(0x18e)];return{..._0x177223,'id':_0x21a3e0['replyId'],'dT':c[_0x47e2a4(0x17d)](+_0x21a3e0[_0x47e2a4(0x17f)])[_0x47e2a4(0x13f)](_0x47e2a4(0x158)),'personId':_0x21a3e0[_0x47e2a4(0x1b0)]};}else{const _0x2f3a43={'memberId':_0x5c1d73,'unitId':_0x313229,'content':_0x3e232b,'mention':_0x1a4f6b},_0x1a8799=await this[_0x47e2a4(0x14c)][_0x47e2a4(0x1ac)](_0x47e2a4(0x14d)+_0x313229+_0x47e2a4(0x18f),{'body':_0x2f3a43});return Y(_0x1a8799[_0x47e2a4(0x192)][_0x47e2a4(0x191)],_0x177223);}}async[_0x388aec(0x183)](_0x25e8e1){const _0x303779=_0x388aec;var _0x531808,_0x516959;const {text:_0x1d39c5,unitId:_0x2ed02f}=_0x25e8e1,_0x475977=(_0x516959=(_0x531808=_0x1d39c5[_0x303779(0x1a0)])==null?void 0x0:_0x531808[_0x303779(0x15b)](_0x1da517=>_0x1da517[_0x303779(0x181)]===c['CustomRangeType'][_0x303779(0x177)])['map'](_0x3a5696=>_0x3a5696[_0x303779(0x13b)]))!=null?_0x516959:[],_0x32f77b=JSON[_0x303779(0x143)](_0x1d39c5),_0x45759e=_0x25e8e1['threadId'],_0xcf2024=_0x25e8e1['id'],_0x3caad5={'memberId':(await this[_0x303779(0x156)]['requireSession'](_0x2ed02f))['getMemberID'](),'unitId':_0x2ed02f,'threadId':_0x45759e,'mention':_0x475977,'content':_0x32f77b,'replyId':_0xcf2024},_0x139ed6=await this[_0x303779(0x14c)][_0x303779(0x1ac)](_0x303779(0x14d)+_0x2ed02f+_0x303779(0x1a6),{'body':_0x3caad5});return!_0x139ed6['body'][_0x303779(0x180)]||_0x139ed6[_0x303779(0x192)][_0x303779(0x180)]['code']===0x1;}async['resolveComment'](_0x2a4bcc){const _0x20b2f9=_0x388aec,{unitId:_0x54b38d}=_0x2a4bcc,_0xe27a7f=_0x2a4bcc[_0x20b2f9(0x162)],_0x343ff9={'memberId':this[_0x20b2f9(0x15d)][_0x20b2f9(0x199)]()[_0x20b2f9(0x17c)],'unitId':_0x54b38d,'threadId':_0xe27a7f,'solved':_0x2a4bcc['resolved']?I[_0x20b2f9(0x147)]:I[_0x20b2f9(0x144)]},_0x553be5=await this[_0x20b2f9(0x14c)][_0x20b2f9(0x1ac)](_0x20b2f9(0x14d)+_0x54b38d+_0x20b2f9(0x150),{'body':_0x343ff9});return!_0x553be5[_0x20b2f9(0x192)]['error']||_0x553be5[_0x20b2f9(0x192)][_0x20b2f9(0x180)][_0x20b2f9(0x1a4)]===0x1;}async[_0x388aec(0x1b7)](_0x448da8,_0x3ae590,_0x58d5e0,_0x22cf6d){const _0xab9d4=_0x388aec,_0x5bb21d={'memberId':(await this['_sessionService'][_0xab9d4(0x13a)](_0x448da8))[_0xab9d4(0x174)](),'threadId':_0x58d5e0,'replyId':_0x22cf6d,'unitId':_0x448da8},_0x4c26f6=await this[_0xab9d4(0x14c)][_0xab9d4(0x1ac)]('/universer-api/comment/unit/'+_0x448da8+_0xab9d4(0x19d),{'body':_0x5bb21d});return!_0x4c26f6[_0xab9d4(0x192)][_0xab9d4(0x180)]||_0x4c26f6['body']['error'][_0xab9d4(0x1a4)]===0x1;}async[_0x388aec(0x163)](_0x46f7c0,_0x344489,_0x55e2a8){const _0x35a058=_0x388aec,_0x5c768b={'unitId':_0x46f7c0,'threadId':_0x55e2a8},_0x130548=await this[_0x35a058(0x14c)][_0x35a058(0x1ac)](_0x35a058(0x14d)+_0x46f7c0+_0x35a058(0x15c),{'body':_0x5c768b}),_0x202daa=_0x55e2a8[_0x35a058(0x188)](_0x271d68=>G(_0x130548[_0x35a058(0x192)][_0x35a058(0x1b2)][_0x271d68],_0x46f7c0,_0x344489))[_0x35a058(0x15b)](Boolean);return Object[_0x35a058(0x152)](_0x130548[_0x35a058(0x192)][_0x35a058(0x196)])[_0x35a058(0x14a)](_0x4154dd=>{const _0x21d795=_0x35a058;this[_0x21d795(0x15d)][_0x21d795(0x19f)](_0x4154dd);}),_0x202daa;}[_0x388aec(0x16c)](_0x1a4427){const _0x3ec65a=_0x388aec;return{'id':_0x1a4427['id'],'threadId':_0x1a4427[_0x3ec65a(0x162)],'ref':_0x1a4427[_0x3ec65a(0x13d)]};}};g=x([_(0x0,c[_0x388aec(0x19e)](P[_0x388aec(0x1b5)])),_(0x1,c['Inject'](c[_0x388aec(0x178)])),_(0x2,c[_0x388aec(0x19e)](b[_0x388aec(0x151)])),_(0x3,c[_0x388aec(0x19e)](c[_0x388aec(0x140)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x2dc94,_0x332e0f,_0x16d2f2,_0x2efc6d)=>{const _0x527549=_0x388aec;for(var _0x20910a=_0x2efc6d>0x1?void 0x0:_0x2efc6d?H(_0x332e0f,_0x16d2f2):_0x332e0f,_0x38af90=_0x2dc94[_0x527549(0x19a)]-0x1,_0x350a82;_0x38af90>=0x0;_0x38af90--)(_0x350a82=_0x2dc94[_0x38af90])&&(_0x20910a=_0x350a82(_0x20910a)||_0x20910a);return _0x20910a;},y=(_0x1657a3,_0xc2c48)=>(_0x14ce5a,_0x529eae)=>_0xc2c48(_0x14ce5a,_0x529eae,_0x1657a3);let C=class extends c[_0x388aec(0x154)]{constructor(_0x18cf72,_0x41d77c){const _0x4bab1c=_0x388aec;super(),this[_0x4bab1c(0x15f)]=_0x18cf72,this['_threadCommentDataSource']=_0x41d77c,this[_0x4bab1c(0x14f)]();}[_0x388aec(0x14f)](){const _0x3c7a9c=_0x388aec;this[_0x3c7a9c(0x15f)]['dataSource']=this[_0x3c7a9c(0x190)],this['_threadCommentDataSourceService'][_0x3c7a9c(0x142)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x388aec(0x19e)](g))],C);function _0x3e84(_0x27c014,_0xabae98){const _0x528560=_0x5285();return _0x3e84=function(_0x3e8419,_0x28626f){_0x3e8419=_0x3e8419-0x139;let _0x57b0af=_0x528560[_0x3e8419];return _0x57b0af;},_0x3e84(_0x27c014,_0xabae98);}var F=Object[_0x388aec(0x173)],L=Object['getOwnPropertyDescriptor'],Z=(_0xe2d6c0,_0x5b07f8,_0x47402b)=>_0x5b07f8 in _0xe2d6c0?F(_0xe2d6c0,_0x5b07f8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x47402b}):_0xe2d6c0[_0x5b07f8]=_0x47402b,W=(_0x184848,_0x2b6ec5,_0x2aa825,_0x189e97)=>{const _0x9c65aa=_0x388aec;for(var _0x3ba2bc=_0x189e97>0x1?void 0x0:_0x189e97?L(_0x2b6ec5,_0x2aa825):_0x2b6ec5,_0x119a9e=_0x184848[_0x9c65aa(0x19a)]-0x1,_0xf7c1f4;_0x119a9e>=0x0;_0x119a9e--)(_0xf7c1f4=_0x184848[_0x119a9e])&&(_0x3ba2bc=_0xf7c1f4(_0x3ba2bc)||_0x3ba2bc);return _0x3ba2bc;},O=(_0x4457ad,_0x1238fc)=>(_0x2b59b5,_0x4bbc93)=>_0x1238fc(_0x2b59b5,_0x4bbc93,_0x4457ad),N=(_0x543204,_0xa8f29e,_0x2441d7)=>Z(_0x543204,typeof _0xa8f29e!='symbol'?_0xa8f29e+'':_0xa8f29e,_0x2441d7);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x388aec(0x17a)]{constructor(_0x320a9d=D,_0x4b8996,_0x54c16e){const _0x564e6f=_0x388aec;super(),this[_0x564e6f(0x145)]=_0x320a9d,this[_0x564e6f(0x167)]=_0x4b8996,this[_0x564e6f(0x1b4)]=_0x54c16e;const {..._0x45e990}=c[_0x564e6f(0x170)]({},D,this[_0x564e6f(0x145)]);this['_configService'][_0x564e6f(0x187)](q,_0x45e990);}[_0x388aec(0x175)](){const _0x58bb66=_0x388aec;[[g],[C],[p]][_0x58bb66(0x14a)](_0x29fa9a=>{const _0x3110a1=_0x58bb66;this[_0x3110a1(0x167)][_0x3110a1(0x169)](_0x29fa9a);});}['onReady'](){const _0x581769=_0x388aec;this['_injector'][_0x581769(0x1aa)](C),this['_injector'][_0x581769(0x1aa)](p);}},N(exports[_0x388aec(0x17e)],_0x388aec(0x1ab),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x388aec(0x16d),c[_0x388aec(0x1ae)][_0x388aec(0x141)]),exports[_0x388aec(0x17e)]=W([c[_0x388aec(0x159)](j[_0x388aec(0x1b8)],b[_0x388aec(0x153)],T[_0x388aec(0x157)]),O(0x1,c[_0x388aec(0x19e)](c[_0x388aec(0x140)])),O(0x2,c[_0x388aec(0x182)])],exports[_0x388aec(0x17e)]);function _0x5285(){const _0xf51d3b=['/universer-api/comment/unit/','parse','_initDataSource','/solved','CollaborationSessionService','values','UniverCollaborationClientPlugin','Disposable','pipe','_sessionService','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','DependentOn','personId','filter','/list','_userService','90609cmEZJJ','_threadCommentDataSourceService','payload','Add','threadId','listComments','addComment','bufferTime','CommentService','_injector','3459830MxzWTJ','add','toStringTag','/universer-api/user/list','saveCommentToSnapshot','type','23036040iYmMvN','370870lzkGOK','merge','delete','@univerjs-pro/collaboration-client','defineProperty','getMemberID','onStarting','/reply','COMMENT','UserManagerService','replies','Plugin','657lYabUm','userID','dayjs','UniverThreadCommentDataSourcePlugin','createTimestamp','error','rangeType','IConfigService','updateComment','Delete','disposeWithMe','getUnit','setConfig','map','Solve','4770157jpmtdy','getComment','unitId','size','reply','/add','_threadCommentDataSource','comment','body','156ypxfIq','675564DxHhIS','getUser','users','@univerjs/network','_commentService','getCurrentUser','length','_initUserSync','rxjs','/delete','Inject','addUser','customRanges','user','CustomRangeType','resolveComment','code','getOwnPropertyDescriptor','/edit','solved','@univerjs/thread-comment','186488YsNpcE','get','pluginName','post','@univerjs/core','UniverInstanceType','Edit','userId','_init','comments','9YebXve','_configService','HTTPService','Reply','deleteComment','UniverThreadCommentUIPlugin','UNRECOGNIZED','@univerjs/thread-comment-ui','replyId','requireSession','rangeId','_threadCommentModel','ref','Module','format','Injector','UNIVER_UNKNOWN','syncUpdateMutationToColla','stringify','OpenOrReOpen','_config','commentUpdate$','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','forEach','subscribe','_httpService'];_0x5285=function(){return _0xf51d3b;};return _0x5285();}
1
+ 'use strict';const _0x261250=_0x1e43;(function(_0x3c886a,_0x2d94d1){const _0x18a676=_0x1e43,_0x545014=_0x3c886a();while(!![]){try{const _0x481b3f=parseInt(_0x18a676(0x1ff))/0x1*(-parseInt(_0x18a676(0x1fb))/0x2)+parseInt(_0x18a676(0x254))/0x3+parseInt(_0x18a676(0x232))/0x4+-parseInt(_0x18a676(0x1f9))/0x5*(parseInt(_0x18a676(0x247))/0x6)+parseInt(_0x18a676(0x25c))/0x7+parseInt(_0x18a676(0x211))/0x8*(-parseInt(_0x18a676(0x242))/0x9)+parseInt(_0x18a676(0x23c))/0xa*(parseInt(_0x18a676(0x201))/0xb);if(_0x481b3f===_0x2d94d1)break;else _0x545014['push'](_0x545014['shift']());}catch(_0x1a801c){_0x545014['push'](_0x545014['shift']());}}}(_0x324a,0x89639));function _0x324a(){const _0x2ca0b8=['_threadCommentModel','Inject','comments','requireSession','userId','comment','_config','5262335gXNDVY','UniverLicensePlugin','10sJTbrl','error','syncUpdateMutationToColla','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','214089qvuJWt','_commentService','8542259JuMlPE','Solved','Edit','pipe','content','UniverThreadCommentDataSourcePlugin','ThreadCommentModel','filter','onStarting','forEach','dayjs','map','updateComment','values','_threadCommentDataSourceService','reply','3832MSZcKp','rangeType','Add','ref','CustomRangeType','Disposable','/edit','post','customRanges','_initUserSync','parentId','/universer-api/comment/unit/','IThreadCommentDataSourceService','add','get','format','rangeId','threadId','UniverCollaborationClientPlugin','Module','getComment','createTimestamp','users','userID','body','_configService','length','addUser','rxjs','Unknown','_httpService','Delete','pluginName','1757576ydSAbk','/solved','personId','getMemberID','onReady','subscribe','payload','COMMENT','_threadCommentDataSource','UNRECOGNIZED','20kyibLT','@univerjs/core','replyId','resolved','code','IConfigService','9774yXblkn','find','slice','@univerjs-pro/license','stringify','6yWRmWQ','OpenOrReOpen','defineProperty','/reply','YYYY/MM/DD\x20HH:mm','_init','unitId','resolveComment','HTTPService','delete','getOwnPropertyDescriptor','Solve','UserManagerService','2388720HDiLNk','user','Reply','commentUpdate$','_initDataSource','type','getUnit','/list','2919553OWyVnU','/universer-api/user/list','disposeWithMe','/add','listComments','Plugin','toStringTag','size','setConfig','Injector','addComment','solved','DependentOn','_userService','getUser','_injector','replies','parse','_sessionService','@univerjs/thread-comment','deleteComment'];_0x324a=function(){return _0x2ca0b8;};return _0x324a();}Object['defineProperty'](exports,Symbol[_0x261250(0x262)],{'value':_0x261250(0x224)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x261250(0x245)),c=require(_0x261250(0x23d)),j=require('@univerjs/thread-comment-ui'),M=require(_0x261250(0x1f0)),w=require(_0x261250(0x22d)),P=require('@univerjs/network'),U=_0x261250(0x1fe);var I=(_0x16436d=>(_0x16436d[_0x16436d['OpenOrReOpen']=0x0]=_0x261250(0x248),_0x16436d[_0x16436d[_0x261250(0x202)]=0x1]='Solved',_0x16436d[_0x16436d[_0x261250(0x23b)]=-0x1]=_0x261250(0x23b),_0x16436d))(I||{}),v=(_0x2bcd85=>(_0x2bcd85[_0x2bcd85[_0x261250(0x22e)]=0x0]=_0x261250(0x22e),_0x2bcd85[_0x2bcd85[_0x261250(0x213)]=0x1]=_0x261250(0x213),_0x2bcd85[_0x2bcd85[_0x261250(0x256)]=0x2]=_0x261250(0x256),_0x2bcd85[_0x2bcd85['Edit']=0x3]=_0x261250(0x203),_0x2bcd85[_0x2bcd85['Delete']=0x4]=_0x261250(0x230),_0x2bcd85[_0x2bcd85['Solve']=0x5]='Solve',_0x2bcd85[_0x2bcd85['UNRECOGNIZED']=-0x1]=_0x261250(0x23b),_0x2bcd85))(v||{});const f=_0x3c8939=>c['dayjs'](new Date(+_0x3c8939))[_0x261250(0x220)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x30aae0,_0xdc8809)=>{const _0x2ecfb7=_0x261250,_0x33fa89=_0x30aae0[_0x2ecfb7(0x21f)](c[_0x2ecfb7(0x253)]),_0x2b6fc9=_0x30aae0['get'](P[_0x2ecfb7(0x24f)]);_0xdc8809[_0x2ecfb7(0x20a)](_0x1f21cb=>{const _0x522c93=_0x2ecfb7;_0x33fa89[_0x522c93(0x1eb)](_0x1f21cb)&&_0xdc8809[_0x522c93(0x250)](_0x1f21cb);}),_0xdc8809[_0x2ecfb7(0x263)]&&(await _0x2b6fc9[_0x2ecfb7(0x21f)](_0x2ecfb7(0x25d),{'params':{'userIDs':[..._0xdc8809]}}))['body'][_0x2ecfb7(0x227)][_0x2ecfb7(0x20a)](_0x5dc46d=>{const _0x4a5562=_0x2ecfb7;_0x5dc46d&&_0x33fa89[_0x4a5562(0x22c)](_0x5dc46d);});};var $=Object[_0x261250(0x251)],E=(_0x4a1873,_0x3d0bed,_0x59d2ad,_0xbe4f17)=>{const _0x2a44ec=_0x261250;for(var _0x2fb732=_0xbe4f17>0x1?void 0x0:_0xbe4f17?$(_0x3d0bed,_0x59d2ad):_0x3d0bed,_0x1dab44=_0x4a1873[_0x2a44ec(0x22b)]-0x1,_0x2d0282;_0x1dab44>=0x0;_0x1dab44--)(_0x2d0282=_0x4a1873[_0x1dab44])&&(_0x2fb732=_0x2d0282(_0x2fb732)||_0x2fb732);return _0x2fb732;},S=(_0x2827a5,_0x1f9002)=>(_0x31a4f8,_0x30329e)=>_0x1f9002(_0x31a4f8,_0x30329e,_0x2827a5);let p=class extends c[_0x261250(0x216)]{constructor(_0x3a1b4c,_0x3c39f4,_0x496581,_0x3d1574){const _0x11b837=_0x261250;super(),this[_0x11b837(0x200)]=_0x3a1b4c,this[_0x11b837(0x1f2)]=_0x3c39f4,this[_0x11b837(0x1ea)]=_0x496581,this['_injector']=_0x3d1574,this[_0x11b837(0x24c)](),this[_0x11b837(0x21a)]();}[_0x261250(0x21a)](){const _0x3fc3de=_0x261250;this[_0x3fc3de(0x25e)](this[_0x3fc3de(0x1f2)][_0x3fc3de(0x257)][_0x3fc3de(0x204)](w['bufferTime'](0x10))[_0x3fc3de(0x237)](_0x4199bf=>{const _0x413e37=new Set();_0x4199bf['forEach'](_0x56ecf5=>{const _0x5b2262=_0x1e43;switch(_0x56ecf5[_0x5b2262(0x259)]){case _0x5b2262(0x21e):{const _0x58a5d7=_0x56ecf5[_0x5b2262(0x238)][_0x5b2262(0x234)];_0x413e37[_0x5b2262(0x21e)](_0x58a5d7);break;}}}),R(this['_injector'],_0x413e37);}));}[_0x261250(0x24c)](){const _0x361731=_0x261250;this[_0x361731(0x25e)](this['_commentService'][_0x361731(0x257)]['subscribe'](async _0x4b72ff=>{const _0x4340dc=_0x361731;var _0x27836d,_0x1f4d33,_0x73a263,_0x61d871;const _0x47c584=(_0x27836d=this[_0x4340dc(0x1f2)][_0x4340dc(0x25a)](_0x4b72ff[_0x4340dc(0x24d)])[_0x4340dc(0x243)](_0x3917e3=>_0x3917e3[_0x4340dc(0x222)]===_0x4b72ff['threadId']))==null?void 0x0:_0x27836d['root'];if(!_0x47c584)return;const {unitId:_0x46b729,subUnitId:_0x4d2592}=_0x47c584;switch(_0x4b72ff[_0x4340dc(0x255)]&&this['_userService'][_0x4340dc(0x22c)](_0x4b72ff['user']),_0x4b72ff[_0x4340dc(0x259)]){case v[_0x4340dc(0x213)]:break;case v[_0x4340dc(0x256)]:{this['_threadCommentModel'][_0x4340dc(0x266)](_0x46b729,_0x4d2592,{'unitId':_0x46b729,'subUnitId':_0x4d2592,'ref':'','id':_0x4b72ff[_0x4340dc(0x23e)],'dT':f(+_0x4b72ff[_0x4340dc(0x226)]),'threadId':_0x4b72ff[_0x4340dc(0x222)],'personId':(_0x73a263=(_0x1f4d33=_0x4b72ff[_0x4340dc(0x255)])==null?void 0x0:_0x1f4d33[_0x4340dc(0x228)])!=null?_0x73a263:_0x4b72ff[_0x4340dc(0x1f6)],'text':JSON[_0x4340dc(0x1ee)](_0x4b72ff['content']),'parentId':_0x47c584['id']});break;}case v[_0x4340dc(0x230)]:{const _0x22412e=this[_0x4340dc(0x1f2)][_0x4340dc(0x225)](_0x46b729,_0x4d2592,_0x4b72ff[_0x4340dc(0x23e)]);_0x22412e&&_0x22412e[_0x4340dc(0x21b)]&&this[_0x4340dc(0x1f2)][_0x4340dc(0x1f1)](_0x46b729,_0x4d2592,_0x4b72ff['replyId']);break;}case v[_0x4340dc(0x203)]:{this['_threadCommentModel'][_0x4340dc(0x20d)](_0x46b729,_0x4d2592,{'commentId':_0x4b72ff['replyId'],'text':JSON[_0x4340dc(0x1ee)](_0x4b72ff[_0x4340dc(0x205)])});break;}case v[_0x4340dc(0x252)]:{const _0x52da58=(_0x61d871=this[_0x4340dc(0x1f2)][_0x4340dc(0x25a)](_0x4b72ff[_0x4340dc(0x24d)])['find'](_0x43792a=>_0x43792a[_0x4340dc(0x222)]===_0x4b72ff[_0x4340dc(0x222)]))==null?void 0x0:_0x61d871['root'];_0x52da58&&this['_threadCommentModel'][_0x4340dc(0x24e)](_0x46b729,_0x4d2592,_0x52da58['id'],_0x4b72ff['solved']===I[_0x4340dc(0x202)]);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x261250(0x1f3)](M[_0x261250(0x207)])),S(0x2,c['Inject'](c[_0x261250(0x253)])),S(0x3,c[_0x261250(0x1f3)](c[_0x261250(0x265)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x261250(0x251)],x=(_0x4f3bc6,_0x39e22b,_0x460dc0,_0x571afe)=>{const _0x55f3c5=_0x261250;for(var _0x363aa7=_0x571afe>0x1?void 0x0:_0x571afe?A(_0x39e22b,_0x460dc0):_0x39e22b,_0x4139a8=_0x4f3bc6[_0x55f3c5(0x22b)]-0x1,_0x374733;_0x4139a8>=0x0;_0x4139a8--)(_0x374733=_0x4f3bc6[_0x4139a8])&&(_0x363aa7=_0x374733(_0x363aa7)||_0x363aa7);return _0x363aa7;},_=(_0x33f4db,_0x5ca34f)=>(_0x4c8846,_0x15a6b1)=>_0x5ca34f(_0x4c8846,_0x15a6b1,_0x33f4db);function Y(_0x3e0539,_0x5bac4c){const _0x168678=_0x261250,_0x57a6d2=_0x3e0539[_0x168678(0x1ed)][0x0];return{..._0x5bac4c,'id':_0x57a6d2[_0x168678(0x23e)],'resolved':_0x3e0539[_0x168678(0x267)]===0x1,'dT':f(_0x57a6d2[_0x168678(0x226)]),'personId':_0x57a6d2['userId'],'threadId':_0x57a6d2[_0x168678(0x222)]};}function G(_0x310e2b,_0x3753c2,_0x10ac23){const _0x2b8c6c=_0x261250;var _0x1af4aa,_0x1dc7bf;if(((_0x1dc7bf=(_0x1af4aa=_0x310e2b==null?void 0x0:_0x310e2b['replies'])==null?void 0x0:_0x1af4aa['length'])!=null?_0x1dc7bf:0x0)>0x0){const _0x5e0302=(_0x4ea46b,_0x193293)=>({'id':_0x4ea46b[_0x2b8c6c(0x23e)],'threadId':_0x4ea46b[_0x2b8c6c(0x222)],'dT':f(_0x4ea46b['createTimestamp']),'personId':_0x4ea46b[_0x2b8c6c(0x1f6)],'resolved':_0x310e2b['solved']===I[_0x2b8c6c(0x202)],'unitId':_0x3753c2,'subUnitId':_0x10ac23,'text':JSON['parse'](_0x4ea46b[_0x2b8c6c(0x205)]),'parentId':_0x193293}),_0x43ad24=_0x5e0302(_0x310e2b[_0x2b8c6c(0x1ed)][0x0]);return{..._0x43ad24,'children':_0x310e2b[_0x2b8c6c(0x1ed)][_0x2b8c6c(0x244)](0x1)[_0x2b8c6c(0x20c)](_0x2acc77=>_0x5e0302(_0x2acc77,_0x43ad24['id']))};}return null;}let g=class{constructor(_0x467dba,_0x1b3c26,_0x59c096,_0x3a1f09){const _0x5b1066=_0x261250;this[_0x5b1066(0x22f)]=_0x467dba,this[_0x5b1066(0x1ea)]=_0x1b3c26,this[_0x5b1066(0x1ef)]=_0x59c096,this[_0x5b1066(0x1ec)]=_0x3a1f09;}async[_0x261250(0x266)](_0x3b3154){const _0x2e0e7d=_0x261250;var _0x495e0a,_0x30855a;const {parentId:_0x348864,unitId:_0x37f178,text:_0x1b5956,threadId:_0x3721b4}=_0x3b3154,_0x5ee794=(_0x30855a=(_0x495e0a=_0x1b5956[_0x2e0e7d(0x219)])==null?void 0x0:_0x495e0a[_0x2e0e7d(0x208)](_0x5bc567=>_0x5bc567[_0x2e0e7d(0x212)]===c[_0x2e0e7d(0x215)][_0x2e0e7d(0x239)])[_0x2e0e7d(0x20c)](_0x171249=>_0x171249[_0x2e0e7d(0x221)]))!=null?_0x30855a:[],_0x31d8e4=JSON[_0x2e0e7d(0x246)](_0x1b5956),_0x521690=(await this[_0x2e0e7d(0x1ef)][_0x2e0e7d(0x1f5)](_0x37f178))[_0x2e0e7d(0x235)]();if(_0x348864){const _0x51e86c={'memberId':_0x521690,'unitId':_0x37f178,'content':_0x31d8e4,'mention':_0x5ee794,'threadId':_0x3721b4},_0x3b8f13=(await this['_httpService'][_0x2e0e7d(0x218)](_0x2e0e7d(0x21c)+_0x37f178+_0x2e0e7d(0x24a),{'body':_0x51e86c}))['body'][_0x2e0e7d(0x210)];return{..._0x3b3154,'id':_0x3b8f13[_0x2e0e7d(0x23e)],'dT':c[_0x2e0e7d(0x20b)](+_0x3b8f13[_0x2e0e7d(0x226)])[_0x2e0e7d(0x220)](_0x2e0e7d(0x24b)),'personId':_0x3b8f13[_0x2e0e7d(0x1f6)]};}else{const _0x2a2748={'memberId':_0x521690,'unitId':_0x37f178,'content':_0x31d8e4,'mention':_0x5ee794},_0x1e4396=await this[_0x2e0e7d(0x22f)][_0x2e0e7d(0x218)](_0x2e0e7d(0x21c)+_0x37f178+_0x2e0e7d(0x25f),{'body':_0x2a2748});return Y(_0x1e4396[_0x2e0e7d(0x229)][_0x2e0e7d(0x1f7)],_0x3b3154);}}async[_0x261250(0x20d)](_0x1a66e5){const _0x4ec39f=_0x261250;var _0x4e6cc3,_0x433f28;const {text:_0x10d6f5,unitId:_0xf52921}=_0x1a66e5,_0x29ae48=(_0x433f28=(_0x4e6cc3=_0x10d6f5[_0x4ec39f(0x219)])==null?void 0x0:_0x4e6cc3['filter'](_0x4cf91a=>_0x4cf91a[_0x4ec39f(0x212)]===c[_0x4ec39f(0x215)][_0x4ec39f(0x239)])[_0x4ec39f(0x20c)](_0x1e8464=>_0x1e8464['rangeId']))!=null?_0x433f28:[],_0x3dce19=JSON['stringify'](_0x10d6f5),_0x54078a=_0x1a66e5[_0x4ec39f(0x222)],_0x2429dd=_0x1a66e5['id'],_0x986ca2={'memberId':(await this[_0x4ec39f(0x1ef)]['requireSession'](_0xf52921))['getMemberID'](),'unitId':_0xf52921,'threadId':_0x54078a,'mention':_0x29ae48,'content':_0x3dce19,'replyId':_0x2429dd},_0x175026=await this[_0x4ec39f(0x22f)][_0x4ec39f(0x218)]('/universer-api/comment/unit/'+_0xf52921+_0x4ec39f(0x217),{'body':_0x986ca2});return!_0x175026[_0x4ec39f(0x229)][_0x4ec39f(0x1fc)]||_0x175026[_0x4ec39f(0x229)][_0x4ec39f(0x1fc)][_0x4ec39f(0x240)]===0x1;}async[_0x261250(0x24e)](_0x35452e){const _0xe0734=_0x261250,{unitId:_0x30f9c3}=_0x35452e,_0x39c8a2=_0x35452e[_0xe0734(0x222)],_0x3979bf={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x30f9c3,'threadId':_0x39c8a2,'solved':_0x35452e[_0xe0734(0x23f)]?I[_0xe0734(0x202)]:I[_0xe0734(0x248)]},_0x176e91=await this['_httpService']['post'](_0xe0734(0x21c)+_0x30f9c3+_0xe0734(0x233),{'body':_0x3979bf});return!_0x176e91[_0xe0734(0x229)][_0xe0734(0x1fc)]||_0x176e91[_0xe0734(0x229)][_0xe0734(0x1fc)][_0xe0734(0x240)]===0x1;}async[_0x261250(0x1f1)](_0x24057a,_0x36c585,_0x2cb230,_0x42289e){const _0x5666b8=_0x261250,_0x11c8ae={'memberId':(await this[_0x5666b8(0x1ef)][_0x5666b8(0x1f5)](_0x24057a))[_0x5666b8(0x235)](),'threadId':_0x2cb230,'replyId':_0x42289e,'unitId':_0x24057a},_0x17f83f=await this[_0x5666b8(0x22f)][_0x5666b8(0x218)]('/universer-api/comment/unit/'+_0x24057a+'/delete',{'body':_0x11c8ae});return!_0x17f83f[_0x5666b8(0x229)]['error']||_0x17f83f[_0x5666b8(0x229)][_0x5666b8(0x1fc)]['code']===0x1;}async[_0x261250(0x260)](_0x41cf3d,_0x3dd61f,_0x2a0245){const _0x44003a=_0x261250,_0x2a108a={'unitId':_0x41cf3d,'threadId':_0x2a0245},_0x56287b=await this[_0x44003a(0x22f)][_0x44003a(0x218)](_0x44003a(0x21c)+_0x41cf3d+_0x44003a(0x25b),{'body':_0x2a108a}),_0x29141e=_0x2a0245[_0x44003a(0x20c)](_0x26e3d5=>G(_0x56287b[_0x44003a(0x229)][_0x44003a(0x1f4)][_0x26e3d5],_0x41cf3d,_0x3dd61f))[_0x44003a(0x208)](Boolean);return Object[_0x44003a(0x20e)](_0x56287b[_0x44003a(0x229)][_0x44003a(0x227)])[_0x44003a(0x20a)](_0x593a82=>{const _0x22d9c9=_0x44003a;this[_0x22d9c9(0x1ea)][_0x22d9c9(0x22c)](_0x593a82);}),_0x29141e;}['saveCommentToSnapshot'](_0x2427db){const _0x3564c8=_0x261250;return{'id':_0x2427db['id'],'threadId':_0x2427db[_0x3564c8(0x222)],'ref':_0x2427db[_0x3564c8(0x214)]};}};function _0x1e43(_0x5434b4,_0x380b90){const _0x324ade=_0x324a();return _0x1e43=function(_0x1e43d6,_0x97146d){_0x1e43d6=_0x1e43d6-0x1ea;let _0x3594b9=_0x324ade[_0x1e43d6];return _0x3594b9;},_0x1e43(_0x5434b4,_0x380b90);}g=x([_(0x0,c[_0x261250(0x1f3)](P[_0x261250(0x24f)])),_(0x1,c[_0x261250(0x1f3)](c[_0x261250(0x253)])),_(0x2,c[_0x261250(0x1f3)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x261250(0x265)]))],g);var H=Object[_0x261250(0x251)],J=(_0x37a881,_0x5aa420,_0x423180,_0x18e3a6)=>{const _0x38e8ae=_0x261250;for(var _0x61d3a3=_0x18e3a6>0x1?void 0x0:_0x18e3a6?H(_0x5aa420,_0x423180):_0x5aa420,_0x4c60e8=_0x37a881[_0x38e8ae(0x22b)]-0x1,_0x4d6a28;_0x4c60e8>=0x0;_0x4c60e8--)(_0x4d6a28=_0x37a881[_0x4c60e8])&&(_0x61d3a3=_0x4d6a28(_0x61d3a3)||_0x61d3a3);return _0x61d3a3;},y=(_0xefaa66,_0x14e467)=>(_0x4a084a,_0x2596d9)=>_0x14e467(_0x4a084a,_0x2596d9,_0xefaa66);let C=class extends c[_0x261250(0x216)]{constructor(_0x51f3b9,_0x472eb4){const _0x53d903=_0x261250;super(),this['_threadCommentDataSourceService']=_0x51f3b9,this['_threadCommentDataSource']=_0x472eb4,this[_0x53d903(0x258)]();}['_initDataSource'](){const _0x5104a5=_0x261250;this[_0x5104a5(0x20f)]['dataSource']=this[_0x5104a5(0x23a)],this['_threadCommentDataSourceService'][_0x5104a5(0x1fd)]=!0x1;}};C=J([y(0x0,M[_0x261250(0x21d)]),y(0x1,c[_0x261250(0x1f3)](g))],C);var F=Object[_0x261250(0x249)],L=Object[_0x261250(0x251)],Z=(_0x3f38c7,_0x17bad9,_0x293f65)=>_0x17bad9 in _0x3f38c7?F(_0x3f38c7,_0x17bad9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x293f65}):_0x3f38c7[_0x17bad9]=_0x293f65,W=(_0x14083c,_0x17e7cc,_0x1d25f1,_0x7d8d7e)=>{const _0x3a2357=_0x261250;for(var _0x59a144=_0x7d8d7e>0x1?void 0x0:_0x7d8d7e?L(_0x17e7cc,_0x1d25f1):_0x17e7cc,_0x414893=_0x14083c[_0x3a2357(0x22b)]-0x1,_0x659541;_0x414893>=0x0;_0x414893--)(_0x659541=_0x14083c[_0x414893])&&(_0x59a144=_0x659541(_0x59a144)||_0x59a144);return _0x59a144;},O=(_0x30965a,_0x26bf5a)=>(_0x1176a6,_0x2de30c)=>_0x26bf5a(_0x1176a6,_0x2de30c,_0x30965a),N=(_0x4d383a,_0x1ac274,_0x46e6d9)=>Z(_0x4d383a,typeof _0x1ac274!='symbol'?_0x1ac274+'':_0x1ac274,_0x46e6d9);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x261250(0x261)]{constructor(_0x1c5fab=D,_0x51a1bb,_0x1ad693){const _0x4e9080=_0x261250;super(),this[_0x4e9080(0x1f8)]=_0x1c5fab,this[_0x4e9080(0x1ec)]=_0x51a1bb,this[_0x4e9080(0x22a)]=_0x1ad693;const {..._0x40dc9b}=c['merge']({},D,this[_0x4e9080(0x1f8)]);this[_0x4e9080(0x22a)][_0x4e9080(0x264)](q,_0x40dc9b);}[_0x261250(0x209)](){const _0xb04eaf=_0x261250;[[g],[C],[p]][_0xb04eaf(0x20a)](_0x18b2cb=>{const _0x355ed8=_0xb04eaf;this[_0x355ed8(0x1ec)][_0x355ed8(0x21e)](_0x18b2cb);});}[_0x261250(0x236)](){const _0x3e22e8=_0x261250;this[_0x3e22e8(0x1ec)]['get'](C),this[_0x3e22e8(0x1ec)][_0x3e22e8(0x21f)](p);}},N(exports[_0x261250(0x206)],_0x261250(0x231),U),N(exports[_0x261250(0x206)],_0x261250(0x259),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x261250(0x268)](j['UniverThreadCommentUIPlugin'],b[_0x261250(0x223)],T[_0x261250(0x1fa)]),O(0x1,c[_0x261250(0x1f3)](c[_0x261250(0x265)])),O(0x2,c[_0x261250(0x241)])],exports[_0x261250(0x206)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x156056=_0x2456;(function(_0x20a7c2,_0x1d5fc3){const _0x68fe54=_0x2456,_0x40f370=_0x20a7c2();while(!![]){try{const _0x5194d3=parseInt(_0x68fe54(0x141))/0x1+parseInt(_0x68fe54(0x114))/0x2*(parseInt(_0x68fe54(0x157))/0x3)+parseInt(_0x68fe54(0x127))/0x4+-parseInt(_0x68fe54(0x168))/0x5+parseInt(_0x68fe54(0x11f))/0x6*(-parseInt(_0x68fe54(0x136))/0x7)+parseInt(_0x68fe54(0x166))/0x8*(parseInt(_0x68fe54(0x149))/0x9)+parseInt(_0x68fe54(0x116))/0xa;if(_0x5194d3===_0x1d5fc3)break;else _0x40f370['push'](_0x40f370['shift']());}catch(_0x16e1bc){_0x40f370['push'](_0x40f370['shift']());}}}(_0xc8e1,0x3ea1e));import{CommentService as _0x585108,CollaborationSessionService as _0x55d06f,UniverCollaborationClientPlugin as _0x2a0e3c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x576c81}from'@univerjs-pro/license';import{dayjs as _0x29a7b8,UserManagerService as _0x3b7c6a,Inject as _0xa1f4a5,Injector as _0x467e49,Disposable as _0x329f5c,CustomRangeType as _0x364f98,UniverInstanceType as _0x5183dd,DependentOn as _0x12fb17,IConfigService as _0x1abcfa,Plugin as _0x239e11,merge as _0x29ada1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x507370}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28d422,IThreadCommentDataSourceService as _0xa48844}from'@univerjs/thread-comment';import{bufferTime as _0x1e78a8}from'rxjs';import{HTTPService as _0x581e56}from'@univerjs/network';const W=_0x156056(0x12f);var I=(_0x1016ca=>(_0x1016ca[_0x1016ca[_0x156056(0x158)]=0x0]=_0x156056(0x158),_0x1016ca[_0x1016ca['Solved']=0x1]=_0x156056(0x11b),_0x1016ca[_0x1016ca[_0x156056(0x15e)]=-0x1]='UNRECOGNIZED',_0x1016ca))(I||{}),v=(_0x37796f=>(_0x37796f[_0x37796f[_0x156056(0x15f)]=0x0]='Unknown',_0x37796f[_0x37796f['Add']=0x1]=_0x156056(0x12c),_0x37796f[_0x37796f['Reply']=0x2]='Reply',_0x37796f[_0x37796f[_0x156056(0x13d)]=0x3]='Edit',_0x37796f[_0x37796f[_0x156056(0x118)]=0x4]=_0x156056(0x118),_0x37796f[_0x37796f[_0x156056(0x162)]=0x5]=_0x156056(0x162),_0x37796f[_0x37796f[_0x156056(0x15e)]=-0x1]=_0x156056(0x15e),_0x37796f))(v||{});const D=_0x43f4de=>_0x29a7b8(new Date(+_0x43f4de))[_0x156056(0x122)](_0x156056(0x129)),B=async(_0x22a29d,_0x13a601)=>{const _0x2a1314=_0x156056,_0x40c388=_0x22a29d[_0x2a1314(0x14e)](_0x3b7c6a),_0x320ab6=_0x22a29d[_0x2a1314(0x14e)](_0x581e56);_0x13a601[_0x2a1314(0x134)](_0x2824b6=>{_0x40c388['getUser'](_0x2824b6)&&_0x13a601['delete'](_0x2824b6);}),_0x13a601[_0x2a1314(0x152)]&&(await _0x320ab6[_0x2a1314(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a601]}}))['body'][_0x2a1314(0x133)][_0x2a1314(0x134)](_0x1c33a0=>{const _0x4e7395=_0x2a1314;_0x1c33a0&&_0x40c388[_0x4e7395(0x161)](_0x1c33a0);});};function _0x2456(_0x4c12e8,_0x3d7bc7){const _0xc8e1ba=_0xc8e1();return _0x2456=function(_0x245614,_0x2ea907){_0x245614=_0x245614-0x10e;let _0x5bb234=_0xc8e1ba[_0x245614];return _0x5bb234;},_0x2456(_0x4c12e8,_0x3d7bc7);}var K=Object[_0x156056(0x167)],V=(_0x3b2791,_0x1609d7,_0x25fe0c,_0x3d6d82)=>{const _0x1c04fb=_0x156056;for(var _0x26ffe0=_0x3d6d82>0x1?void 0x0:_0x3d6d82?K(_0x1609d7,_0x25fe0c):_0x1609d7,_0x445793=_0x3b2791[_0x1c04fb(0x130)]-0x1,_0x4edd96;_0x445793>=0x0;_0x445793--)(_0x4edd96=_0x3b2791[_0x445793])&&(_0x26ffe0=_0x4edd96(_0x26ffe0)||_0x26ffe0);return _0x26ffe0;},p=(_0x3915d1,_0x1f847f)=>(_0x465386,_0x3c9236)=>_0x1f847f(_0x465386,_0x3c9236,_0x3915d1);let S=class extends _0x329f5c{constructor(_0x31b552,_0x1540da,_0x227bf2,_0x3963a1){const _0xe7ef26=_0x156056;super(),this[_0xe7ef26(0x15c)]=_0x31b552,this[_0xe7ef26(0x128)]=_0x1540da,this['_userService']=_0x227bf2,this[_0xe7ef26(0x155)]=_0x3963a1,this[_0xe7ef26(0x132)](),this[_0xe7ef26(0x12d)]();}[_0x156056(0x12d)](){const _0x101168=_0x156056;this[_0x101168(0x165)](this[_0x101168(0x128)][_0x101168(0x111)][_0x101168(0x14b)](_0x1e78a8(0x10))[_0x101168(0x150)](_0x2d5363=>{const _0x39f921=_0x101168,_0x22d89f=new Set();_0x2d5363['forEach'](_0x3ad8bd=>{const _0x26a9f6=_0x2456;switch(_0x3ad8bd[_0x26a9f6(0x117)]){case'add':{const _0x3b1a6d=_0x3ad8bd[_0x26a9f6(0x163)][_0x26a9f6(0x119)];_0x22d89f['add'](_0x3b1a6d);break;}}}),B(this[_0x39f921(0x155)],_0x22d89f);}));}[_0x156056(0x132)](){const _0x29a7f2=_0x156056;this[_0x29a7f2(0x165)](this['_commentService'][_0x29a7f2(0x111)][_0x29a7f2(0x150)](async _0x3aa7b2=>{const _0x20d005=_0x29a7f2;var _0x1aeaab,_0x362222,_0x5e1ce8,_0xdfeded;const _0x389266=(_0x1aeaab=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0x2fc067=>_0x2fc067[_0x20d005(0x121)]===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0x1aeaab[_0x20d005(0x142)];if(!_0x389266)return;const {unitId:_0x560d4b,subUnitId:_0x39f6b0}=_0x389266;switch(_0x3aa7b2['user']&&this[_0x20d005(0x164)][_0x20d005(0x161)](_0x3aa7b2[_0x20d005(0x126)]),_0x3aa7b2['type']){case v[_0x20d005(0x12c)]:break;case v[_0x20d005(0x151)]:{this[_0x20d005(0x128)][_0x20d005(0x147)](_0x560d4b,_0x39f6b0,{'unitId':_0x560d4b,'subUnitId':_0x39f6b0,'ref':'','id':_0x3aa7b2['replyId'],'dT':D(+_0x3aa7b2[_0x20d005(0x160)]),'threadId':_0x3aa7b2['threadId'],'personId':(_0x5e1ce8=(_0x362222=_0x3aa7b2['user'])==null?void 0x0:_0x362222['userID'])!=null?_0x5e1ce8:_0x3aa7b2[_0x20d005(0x12e)],'text':JSON['parse'](_0x3aa7b2['content']),'parentId':_0x389266['id']});break;}case v['Delete']:{const _0x331be0=this[_0x20d005(0x128)][_0x20d005(0x16d)](_0x560d4b,_0x39f6b0,_0x3aa7b2['replyId']);_0x331be0&&_0x331be0[_0x20d005(0x13a)]&&this[_0x20d005(0x128)]['deleteComment'](_0x560d4b,_0x39f6b0,_0x3aa7b2[_0x20d005(0x15a)]);break;}case v[_0x20d005(0x13d)]:{this['_threadCommentModel']['updateComment'](_0x560d4b,_0x39f6b0,{'commentId':_0x3aa7b2[_0x20d005(0x15a)],'text':JSON['parse'](_0x3aa7b2['content'])});break;}case v[_0x20d005(0x162)]:{const _0x12ce01=(_0xdfeded=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0xe352f7=>_0xe352f7['threadId']===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0xdfeded[_0x20d005(0x142)];_0x12ce01&&this[_0x20d005(0x128)][_0x20d005(0x11c)](_0x560d4b,_0x39f6b0,_0x12ce01['id'],_0x3aa7b2[_0x20d005(0x145)]===I[_0x20d005(0x11b)]);break;}}}));}};S=V([p(0x0,_0xa1f4a5(_0x585108)),p(0x1,_0xa1f4a5(_0x28d422)),p(0x2,_0xa1f4a5(_0x3b7c6a)),p(0x3,_0xa1f4a5(_0x467e49))],S);const z='thread-comment-data-source.config',M={};function _0xc8e1(){const _0x39b3f9=['find','pipe','_threadCommentDataSourceService','onStarting','get','/universer-api/comment/unit/','subscribe','Reply','size','slice','getCurrentUser','_injector','_threadCommentDataSource','479097uOfuEm','OpenOrReOpen','comment','replyId','comments','_commentService','rangeType','UNRECOGNIZED','Unknown','createTimestamp','addUser','Solve','payload','_userService','disposeWithMe','3056jNFFfa','getOwnPropertyDescriptor','2266985wAcCtD','ref','customRanges','content','resolved','getComment','symbol','userID','_config','commentUpdate$','add','values','4vrIPwt','unitId','4520230hiDsQq','type','Delete','personId','_httpService','Solved','resolveComment','setConfig','_sessionService','4638ugxPzA','/solved','threadId','format','/add','_initDataSource','getMemberID','user','713124lSpvsP','_threadCommentModel','YYYY/MM/DD\x20HH:mm','filter','rangeId','Add','_initUserSync','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','code','_init','users','forEach','onReady','4354rmFpVS','/delete','_configService','requireSession','parentId','/reply','post','Edit','body','error','replies','142105IfCHxx','root','map','getUnit','solved','stringify','addComment','reply','2331NrhPvQ'];_0xc8e1=function(){return _0x39b3f9;};return _0xc8e1();}var k=Object[_0x156056(0x167)],Q=(_0x1d4abd,_0x55ea39,_0xa2396e,_0x45cc93)=>{const _0x341bf6=_0x156056;for(var _0x2601e6=_0x45cc93>0x1?void 0x0:_0x45cc93?k(_0x55ea39,_0xa2396e):_0x55ea39,_0x463efd=_0x1d4abd[_0x341bf6(0x130)]-0x1,_0x26ffd5;_0x463efd>=0x0;_0x463efd--)(_0x26ffd5=_0x1d4abd[_0x463efd])&&(_0x2601e6=_0x26ffd5(_0x2601e6)||_0x2601e6);return _0x2601e6;},_=(_0x44f823,_0x4e6144)=>(_0x52e865,_0x1a0aec)=>_0x4e6144(_0x52e865,_0x1a0aec,_0x44f823);function X(_0x1c5532,_0x44d280){const _0x299dd1=_0x156056,_0x513332=_0x1c5532['replies'][0x0];return{..._0x44d280,'id':_0x513332[_0x299dd1(0x15a)],'resolved':_0x1c5532[_0x299dd1(0x145)]===0x1,'dT':D(_0x513332[_0x299dd1(0x160)]),'personId':_0x513332[_0x299dd1(0x12e)],'threadId':_0x513332[_0x299dd1(0x121)]};}function ee(_0x1782e9,_0x1aa38b,_0x44d93c){const _0x41a88e=_0x156056;var _0x266e7e,_0x4ccf46;if(((_0x4ccf46=(_0x266e7e=_0x1782e9==null?void 0x0:_0x1782e9[_0x41a88e(0x140)])==null?void 0x0:_0x266e7e[_0x41a88e(0x130)])!=null?_0x4ccf46:0x0)>0x0){const _0x2be37d=(_0x1ac1d6,_0x187c23)=>({'id':_0x1ac1d6['replyId'],'threadId':_0x1ac1d6['threadId'],'dT':D(_0x1ac1d6[_0x41a88e(0x160)]),'personId':_0x1ac1d6['userId'],'resolved':_0x1782e9[_0x41a88e(0x145)]===I['Solved'],'unitId':_0x1aa38b,'subUnitId':_0x44d93c,'text':JSON['parse'](_0x1ac1d6[_0x41a88e(0x16b)]),'parentId':_0x187c23}),_0xfb42ee=_0x2be37d(_0x1782e9[_0x41a88e(0x140)][0x0]);return{..._0xfb42ee,'children':_0x1782e9['replies'][_0x41a88e(0x153)](0x1)[_0x41a88e(0x143)](_0x192254=>_0x2be37d(_0x192254,_0xfb42ee['id']))};}return null;}let f=class{constructor(_0xe36bad,_0x28940f,_0x468e6b,_0x3e00d5){const _0x41b8e8=_0x156056;this[_0x41b8e8(0x11a)]=_0xe36bad,this['_userService']=_0x28940f,this['_sessionService']=_0x468e6b,this[_0x41b8e8(0x155)]=_0x3e00d5;}async[_0x156056(0x147)](_0x41e943){const _0x3f87cb=_0x156056;var _0x26dab2,_0x5b8a0c;const {parentId:_0x1ef24b,unitId:_0x28a974,text:_0x2984a5,threadId:_0x27aa9a}=_0x41e943,_0x3ab062=(_0x5b8a0c=(_0x26dab2=_0x2984a5[_0x3f87cb(0x16a)])==null?void 0x0:_0x26dab2[_0x3f87cb(0x12a)](_0x175e95=>_0x175e95[_0x3f87cb(0x15d)]===_0x364f98['COMMENT'])['map'](_0x517bf9=>_0x517bf9[_0x3f87cb(0x12b)]))!=null?_0x5b8a0c:[],_0x4e47a1=JSON[_0x3f87cb(0x146)](_0x2984a5),_0x37d0f2=(await this[_0x3f87cb(0x11e)][_0x3f87cb(0x139)](_0x28a974))[_0x3f87cb(0x125)]();if(_0x1ef24b){const _0x32edac={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062,'threadId':_0x27aa9a},_0x5e3c83=(await this[_0x3f87cb(0x11a)]['post'](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x13b),{'body':_0x32edac}))[_0x3f87cb(0x13e)][_0x3f87cb(0x148)];return{..._0x41e943,'id':_0x5e3c83[_0x3f87cb(0x15a)],'dT':_0x29a7b8(+_0x5e3c83[_0x3f87cb(0x160)])[_0x3f87cb(0x122)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5e3c83['userId']};}else{const _0x2263db={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062},_0x17a925=await this[_0x3f87cb(0x11a)][_0x3f87cb(0x13c)](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x123),{'body':_0x2263db});return X(_0x17a925[_0x3f87cb(0x13e)][_0x3f87cb(0x159)],_0x41e943);}}async['updateComment'](_0xb833f8){const _0x2e1b21=_0x156056;var _0x5e6b70,_0x9c7b7a;const {text:_0x4da092,unitId:_0x346bf5}=_0xb833f8,_0x5554d4=(_0x9c7b7a=(_0x5e6b70=_0x4da092[_0x2e1b21(0x16a)])==null?void 0x0:_0x5e6b70[_0x2e1b21(0x12a)](_0x249967=>_0x249967['rangeType']===_0x364f98['COMMENT'])[_0x2e1b21(0x143)](_0x4028bc=>_0x4028bc[_0x2e1b21(0x12b)]))!=null?_0x9c7b7a:[],_0x54e6fc=JSON[_0x2e1b21(0x146)](_0x4da092),_0x1e74ca=_0xb833f8[_0x2e1b21(0x121)],_0x4e0a64=_0xb833f8['id'],_0xa7a531={'memberId':(await this[_0x2e1b21(0x11e)][_0x2e1b21(0x139)](_0x346bf5))[_0x2e1b21(0x125)](),'unitId':_0x346bf5,'threadId':_0x1e74ca,'mention':_0x5554d4,'content':_0x54e6fc,'replyId':_0x4e0a64},_0x32f297=await this[_0x2e1b21(0x11a)][_0x2e1b21(0x13c)]('/universer-api/comment/unit/'+_0x346bf5+'/edit',{'body':_0xa7a531});return!_0x32f297['body']['error']||_0x32f297['body'][_0x2e1b21(0x13f)]['code']===0x1;}async['resolveComment'](_0x476469){const _0x14c8f0=_0x156056,{unitId:_0x10b187}=_0x476469,_0x569166=_0x476469[_0x14c8f0(0x121)],_0x59123f={'memberId':this[_0x14c8f0(0x164)][_0x14c8f0(0x154)]()[_0x14c8f0(0x10f)],'unitId':_0x10b187,'threadId':_0x569166,'solved':_0x476469[_0x14c8f0(0x16c)]?I[_0x14c8f0(0x11b)]:I[_0x14c8f0(0x158)]},_0x478d60=await this[_0x14c8f0(0x11a)][_0x14c8f0(0x13c)]('/universer-api/comment/unit/'+_0x10b187+_0x14c8f0(0x120),{'body':_0x59123f});return!_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)]||_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)][_0x14c8f0(0x131)]===0x1;}async['deleteComment'](_0x103939,_0x5d3b85,_0x3a5fca,_0x305080){const _0x167b49=_0x156056,_0x2262bf={'memberId':(await this[_0x167b49(0x11e)][_0x167b49(0x139)](_0x103939))[_0x167b49(0x125)](),'threadId':_0x3a5fca,'replyId':_0x305080,'unitId':_0x103939},_0x5c6d03=await this[_0x167b49(0x11a)][_0x167b49(0x13c)]('/universer-api/comment/unit/'+_0x103939+_0x167b49(0x137),{'body':_0x2262bf});return!_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)]||_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)][_0x167b49(0x131)]===0x1;}async['listComments'](_0x242f39,_0x3770c4,_0x4cc007){const _0x2565fc=_0x156056,_0x373546={'unitId':_0x242f39,'threadId':_0x4cc007},_0x304036=await this[_0x2565fc(0x11a)]['post'](_0x2565fc(0x14f)+_0x242f39+'/list',{'body':_0x373546}),_0x3dd9b9=_0x4cc007[_0x2565fc(0x143)](_0x52a210=>ee(_0x304036[_0x2565fc(0x13e)][_0x2565fc(0x15b)][_0x52a210],_0x242f39,_0x3770c4))['filter'](Boolean);return Object[_0x2565fc(0x113)](_0x304036[_0x2565fc(0x13e)]['users'])[_0x2565fc(0x134)](_0x563f1b=>{const _0x124cd9=_0x2565fc;this['_userService'][_0x124cd9(0x161)](_0x563f1b);}),_0x3dd9b9;}['saveCommentToSnapshot'](_0x38cf18){const _0x187eea=_0x156056;return{'id':_0x38cf18['id'],'threadId':_0x38cf18[_0x187eea(0x121)],'ref':_0x38cf18[_0x187eea(0x169)]};}};f=Q([_(0x0,_0xa1f4a5(_0x581e56)),_(0x1,_0xa1f4a5(_0x3b7c6a)),_(0x2,_0xa1f4a5(_0x55d06f)),_(0x3,_0xa1f4a5(_0x467e49))],f);var re=Object[_0x156056(0x167)],te=(_0x458293,_0x1ca14f,_0x4207b3,_0x46b4a4)=>{const _0x580f09=_0x156056;for(var _0x17d475=_0x46b4a4>0x1?void 0x0:_0x46b4a4?re(_0x1ca14f,_0x4207b3):_0x1ca14f,_0x7153ca=_0x458293[_0x580f09(0x130)]-0x1,_0x10f1b2;_0x7153ca>=0x0;_0x7153ca--)(_0x10f1b2=_0x458293[_0x7153ca])&&(_0x17d475=_0x10f1b2(_0x17d475)||_0x17d475);return _0x17d475;},N=(_0x3c6250,_0x134122)=>(_0x1517f3,_0x3fc326)=>_0x134122(_0x1517f3,_0x3fc326,_0x3c6250);let g=class extends _0x329f5c{constructor(_0xe81fa,_0x2417c9){const _0x4c0951=_0x156056;super(),this[_0x4c0951(0x14c)]=_0xe81fa,this[_0x4c0951(0x156)]=_0x2417c9,this[_0x4c0951(0x124)]();}['_initDataSource'](){const _0x1515a1=_0x156056;this[_0x1515a1(0x14c)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa48844),N(0x1,_0xa1f4a5(f))],g);var se=Object['defineProperty'],oe=Object[_0x156056(0x167)],ne=(_0x1e35b8,_0x3f0a5c,_0x358331)=>_0x3f0a5c in _0x1e35b8?se(_0x1e35b8,_0x3f0a5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x358331}):_0x1e35b8[_0x3f0a5c]=_0x358331,ie=(_0x3619b6,_0xe59082,_0xb271be,_0x1c0fa4)=>{const _0x3328b6=_0x156056;for(var _0x13fa9f=_0x1c0fa4>0x1?void 0x0:_0x1c0fa4?oe(_0xe59082,_0xb271be):_0xe59082,_0x3a80cc=_0x3619b6[_0x3328b6(0x130)]-0x1,_0x349c6e;_0x3a80cc>=0x0;_0x3a80cc--)(_0x349c6e=_0x3619b6[_0x3a80cc])&&(_0x13fa9f=_0x349c6e(_0x13fa9f)||_0x13fa9f);return _0x13fa9f;},w=(_0x39533e,_0x26f6c4)=>(_0x4c2b17,_0xd48a5c)=>_0x26f6c4(_0x4c2b17,_0xd48a5c,_0x39533e),$=(_0x4bbf12,_0x1c041a,_0x2cdcf2)=>ne(_0x4bbf12,typeof _0x1c041a!=_0x156056(0x10e)?_0x1c041a+'':_0x1c041a,_0x2cdcf2);let b=class extends _0x239e11{constructor(_0x45dd26=M,_0x116394,_0x1bfa8a){const _0x2a1210=_0x156056;super(),this['_config']=_0x45dd26,this['_injector']=_0x116394,this[_0x2a1210(0x138)]=_0x1bfa8a;const {..._0x37b173}=_0x29ada1({},M,this[_0x2a1210(0x110)]);this[_0x2a1210(0x138)][_0x2a1210(0x11d)](z,_0x37b173);}[_0x156056(0x14d)](){const _0xfad2c7=_0x156056;[[f],[g],[S]][_0xfad2c7(0x134)](_0x2fbabf=>{const _0x42ca9f=_0xfad2c7;this[_0x42ca9f(0x155)][_0x42ca9f(0x112)](_0x2fbabf);});}[_0x156056(0x135)](){const _0x4d1d01=_0x156056;this[_0x4d1d01(0x155)]['get'](g),this[_0x4d1d01(0x155)][_0x4d1d01(0x14e)](S);}};$(b,'pluginName',W),$(b,_0x156056(0x117),_0x5183dd['UNIVER_UNKNOWN']),b=ie([_0x12fb17(_0x507370,_0x2a0e3c,_0x576c81),w(0x1,_0xa1f4a5(_0x467e49)),w(0x2,_0x1abcfa)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2597e9=_0x20a4;(function(_0x2000cf,_0x42f1b0){const _0x4b3443=_0x20a4,_0x2cac61=_0x2000cf();while(!![]){try{const _0x170e64=parseInt(_0x4b3443(0x15d))/0x1+-parseInt(_0x4b3443(0x147))/0x2*(-parseInt(_0x4b3443(0x160))/0x3)+-parseInt(_0x4b3443(0x157))/0x4+parseInt(_0x4b3443(0x145))/0x5*(-parseInt(_0x4b3443(0x187))/0x6)+-parseInt(_0x4b3443(0x188))/0x7+-parseInt(_0x4b3443(0x17e))/0x8*(-parseInt(_0x4b3443(0x169))/0x9)+parseInt(_0x4b3443(0x148))/0xa;if(_0x170e64===_0x42f1b0)break;else _0x2cac61['push'](_0x2cac61['shift']());}catch(_0x13972d){_0x2cac61['push'](_0x2cac61['shift']());}}}(_0x5d60,0x5bfe1));import{CommentService as _0x31c088,CollaborationSessionService as _0xfbbfd9,UniverCollaborationClientPlugin as _0x473ff2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x451a8e}from'@univerjs-pro/license';import{dayjs as _0x202a2a,UserManagerService as _0x47e0ea,Inject as _0x4de5f3,Injector as _0xa3bf2,Disposable as _0x485769,CustomRangeType as _0x5d373d,UniverInstanceType as _0x43a3c7,DependentOn as _0x958407,IConfigService as _0x453c5c,Plugin as _0x1f6d70,merge as _0x45afd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b967b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2af163,IThreadCommentDataSourceService as _0x5d2836}from'@univerjs/thread-comment';import{bufferTime as _0x42b721}from'rxjs';import{HTTPService as _0x36e09e}from'@univerjs/network';const W=_0x2597e9(0x152);var I=(_0x5deb2c=>(_0x5deb2c[_0x5deb2c[_0x2597e9(0x159)]=0x0]=_0x2597e9(0x159),_0x5deb2c[_0x5deb2c[_0x2597e9(0x150)]=0x1]='Solved',_0x5deb2c[_0x5deb2c['UNRECOGNIZED']=-0x1]=_0x2597e9(0x13a),_0x5deb2c))(I||{}),v=(_0x21d7fb=>(_0x21d7fb[_0x21d7fb['Unknown']=0x0]=_0x2597e9(0x180),_0x21d7fb[_0x21d7fb[_0x2597e9(0x154)]=0x1]='Add',_0x21d7fb[_0x21d7fb[_0x2597e9(0x13c)]=0x2]='Reply',_0x21d7fb[_0x21d7fb[_0x2597e9(0x15c)]=0x3]=_0x2597e9(0x15c),_0x21d7fb[_0x21d7fb[_0x2597e9(0x12b)]=0x4]=_0x2597e9(0x12b),_0x21d7fb[_0x21d7fb[_0x2597e9(0x133)]=0x5]='Solve',_0x21d7fb[_0x21d7fb[_0x2597e9(0x13a)]=-0x1]=_0x2597e9(0x13a),_0x21d7fb))(v||{});const D=_0x35dd05=>_0x202a2a(new Date(+_0x35dd05))[_0x2597e9(0x12c)](_0x2597e9(0x18b)),B=async(_0xcf9cd2,_0x3191c4)=>{const _0x471549=_0x2597e9,_0x2dcb02=_0xcf9cd2[_0x471549(0x16b)](_0x47e0ea),_0x4cf74d=_0xcf9cd2[_0x471549(0x16b)](_0x36e09e);_0x3191c4[_0x471549(0x13f)](_0xd83710=>{const _0x13177d=_0x471549;_0x2dcb02[_0x13177d(0x130)](_0xd83710)&&_0x3191c4[_0x13177d(0x183)](_0xd83710);}),_0x3191c4['size']&&(await _0x4cf74d[_0x471549(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3191c4]}}))[_0x471549(0x143)][_0x471549(0x17a)][_0x471549(0x13f)](_0x3bc869=>{const _0x122618=_0x471549;_0x3bc869&&_0x2dcb02[_0x122618(0x186)](_0x3bc869);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x456b10,_0x101e9c,_0x162017,_0x1031a5)=>{const _0x3177b5=_0x2597e9;for(var _0x1070b4=_0x1031a5>0x1?void 0x0:_0x1031a5?K(_0x101e9c,_0x162017):_0x101e9c,_0x18aa42=_0x456b10[_0x3177b5(0x170)]-0x1,_0x339a9e;_0x18aa42>=0x0;_0x18aa42--)(_0x339a9e=_0x456b10[_0x18aa42])&&(_0x1070b4=_0x339a9e(_0x1070b4)||_0x1070b4);return _0x1070b4;},p=(_0x34c89d,_0x32e9a6)=>(_0xc89371,_0x2a80f8)=>_0x32e9a6(_0xc89371,_0x2a80f8,_0x34c89d);let S=class extends _0x485769{constructor(_0x1c3678,_0x3f0f9c,_0x524d3b,_0x1075e7){const _0x1bb18c=_0x2597e9;super(),this['_commentService']=_0x1c3678,this['_threadCommentModel']=_0x3f0f9c,this[_0x1bb18c(0x18a)]=_0x524d3b,this[_0x1bb18c(0x167)]=_0x1075e7,this[_0x1bb18c(0x14d)](),this[_0x1bb18c(0x12a)]();}[_0x2597e9(0x12a)](){const _0x14283e=_0x2597e9;this[_0x14283e(0x165)](this[_0x14283e(0x158)]['commentUpdate$']['pipe'](_0x42b721(0x10))[_0x14283e(0x134)](_0x5b8560=>{const _0x2d48cd=_0x14283e,_0x146b33=new Set();_0x5b8560[_0x2d48cd(0x13f)](_0x31f51a=>{const _0x40a85c=_0x2d48cd;switch(_0x31f51a[_0x40a85c(0x12e)]){case'add':{const _0x237d62=_0x31f51a[_0x40a85c(0x139)][_0x40a85c(0x15b)];_0x146b33[_0x40a85c(0x185)](_0x237d62);break;}}}),B(this[_0x2d48cd(0x167)],_0x146b33);}));}[_0x2597e9(0x14d)](){const _0x9898b7=_0x2597e9;this[_0x9898b7(0x165)](this['_commentService']['commentUpdate$']['subscribe'](async _0x55c738=>{const _0x52abbe=_0x9898b7;var _0x248eb3,_0x3ed5ad,_0x5020a1,_0x5f3883;const _0x342452=(_0x248eb3=this[_0x52abbe(0x158)]['getUnit'](_0x55c738[_0x52abbe(0x184)])['find'](_0x28c403=>_0x28c403[_0x52abbe(0x172)]===_0x55c738[_0x52abbe(0x172)]))==null?void 0x0:_0x248eb3['root'];if(!_0x342452)return;const {unitId:_0xf4bcf6,subUnitId:_0x4b2720}=_0x342452;switch(_0x55c738[_0x52abbe(0x13b)]&&this[_0x52abbe(0x18a)]['addUser'](_0x55c738[_0x52abbe(0x13b)]),_0x55c738[_0x52abbe(0x12e)]){case v[_0x52abbe(0x154)]:break;case v[_0x52abbe(0x13c)]:{this[_0x52abbe(0x158)]['addComment'](_0xf4bcf6,_0x4b2720,{'unitId':_0xf4bcf6,'subUnitId':_0x4b2720,'ref':'','id':_0x55c738[_0x52abbe(0x161)],'dT':D(+_0x55c738['createTimestamp']),'threadId':_0x55c738['threadId'],'personId':(_0x5020a1=(_0x3ed5ad=_0x55c738[_0x52abbe(0x13b)])==null?void 0x0:_0x3ed5ad[_0x52abbe(0x135)])!=null?_0x5020a1:_0x55c738[_0x52abbe(0x17c)],'text':JSON[_0x52abbe(0x146)](_0x55c738[_0x52abbe(0x14f)]),'parentId':_0x342452['id']});break;}case v[_0x52abbe(0x12b)]:{const _0x23d9fa=this['_threadCommentModel']['getComment'](_0xf4bcf6,_0x4b2720,_0x55c738[_0x52abbe(0x161)]);_0x23d9fa&&_0x23d9fa[_0x52abbe(0x16a)]&&this[_0x52abbe(0x158)][_0x52abbe(0x17f)](_0xf4bcf6,_0x4b2720,_0x55c738[_0x52abbe(0x161)]);break;}case v[_0x52abbe(0x15c)]:{this['_threadCommentModel'][_0x52abbe(0x136)](_0xf4bcf6,_0x4b2720,{'commentId':_0x55c738[_0x52abbe(0x161)],'text':JSON['parse'](_0x55c738[_0x52abbe(0x14f)])});break;}case v[_0x52abbe(0x133)]:{const _0x519c2e=(_0x5f3883=this[_0x52abbe(0x158)][_0x52abbe(0x173)](_0x55c738[_0x52abbe(0x184)])[_0x52abbe(0x16e)](_0x8e3b07=>_0x8e3b07[_0x52abbe(0x172)]===_0x55c738['threadId']))==null?void 0x0:_0x5f3883['root'];_0x519c2e&&this['_threadCommentModel'][_0x52abbe(0x142)](_0xf4bcf6,_0x4b2720,_0x519c2e['id'],_0x55c738[_0x52abbe(0x149)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4de5f3(_0x31c088)),p(0x1,_0x4de5f3(_0x2af163)),p(0x2,_0x4de5f3(_0x47e0ea)),p(0x3,_0x4de5f3(_0xa3bf2))],S);const z=_0x2597e9(0x140),M={};var k=Object[_0x2597e9(0x153)],Q=(_0x3dbda0,_0x483b2,_0x3c1040,_0x4ba754)=>{const _0xb90f43=_0x2597e9;for(var _0x1c0ba0=_0x4ba754>0x1?void 0x0:_0x4ba754?k(_0x483b2,_0x3c1040):_0x483b2,_0x5b40d9=_0x3dbda0[_0xb90f43(0x170)]-0x1,_0x4164b6;_0x5b40d9>=0x0;_0x5b40d9--)(_0x4164b6=_0x3dbda0[_0x5b40d9])&&(_0x1c0ba0=_0x4164b6(_0x1c0ba0)||_0x1c0ba0);return _0x1c0ba0;},_=(_0x3f16c3,_0x1fa6aa)=>(_0xdb41bc,_0x10d25e)=>_0x1fa6aa(_0xdb41bc,_0x10d25e,_0x3f16c3);function X(_0x34cd4a,_0x51e9cb){const _0x16b6bd=_0x2597e9,_0x1478d0=_0x34cd4a['replies'][0x0];return{..._0x51e9cb,'id':_0x1478d0[_0x16b6bd(0x161)],'resolved':_0x34cd4a[_0x16b6bd(0x149)]===0x1,'dT':D(_0x1478d0[_0x16b6bd(0x141)]),'personId':_0x1478d0[_0x16b6bd(0x17c)],'threadId':_0x1478d0[_0x16b6bd(0x172)]};}function ee(_0x37a6ec,_0x5303fa,_0x51b288){const _0x5053d6=_0x2597e9;var _0x3b8cf3,_0x323644;if(((_0x323644=(_0x3b8cf3=_0x37a6ec==null?void 0x0:_0x37a6ec[_0x5053d6(0x131)])==null?void 0x0:_0x3b8cf3['length'])!=null?_0x323644:0x0)>0x0){const _0x2feb43=(_0x1707ef,_0x5bb2be)=>({'id':_0x1707ef[_0x5053d6(0x161)],'threadId':_0x1707ef[_0x5053d6(0x172)],'dT':D(_0x1707ef[_0x5053d6(0x141)]),'personId':_0x1707ef[_0x5053d6(0x17c)],'resolved':_0x37a6ec[_0x5053d6(0x149)]===I['Solved'],'unitId':_0x5303fa,'subUnitId':_0x51b288,'text':JSON[_0x5053d6(0x146)](_0x1707ef[_0x5053d6(0x14f)]),'parentId':_0x5bb2be}),_0x372de0=_0x2feb43(_0x37a6ec[_0x5053d6(0x131)][0x0]);return{..._0x372de0,'children':_0x37a6ec[_0x5053d6(0x131)]['slice'](0x1)['map'](_0x38b8b0=>_0x2feb43(_0x38b8b0,_0x372de0['id']))};}return null;}let f=class{constructor(_0x2c18f7,_0x4e8e67,_0x5bc71a,_0x493e31){const _0x3bc5d0=_0x2597e9;this[_0x3bc5d0(0x16c)]=_0x2c18f7,this[_0x3bc5d0(0x18a)]=_0x4e8e67,this[_0x3bc5d0(0x178)]=_0x5bc71a,this[_0x3bc5d0(0x167)]=_0x493e31;}async[_0x2597e9(0x15a)](_0x16c380){const _0x1e3767=_0x2597e9;var _0x5fb27a,_0x5b5dec;const {parentId:_0x1fe8a1,unitId:_0x2d27dc,text:_0x4d640c,threadId:_0xd45ba0}=_0x16c380,_0x2259fd=(_0x5b5dec=(_0x5fb27a=_0x4d640c[_0x1e3767(0x132)])==null?void 0x0:_0x5fb27a[_0x1e3767(0x14e)](_0x29025c=>_0x29025c[_0x1e3767(0x164)]===_0x5d373d[_0x1e3767(0x144)])[_0x1e3767(0x12d)](_0x361065=>_0x361065['rangeId']))!=null?_0x5b5dec:[],_0x4c3569=JSON[_0x1e3767(0x151)](_0x4d640c),_0x6f61dc=(await this[_0x1e3767(0x178)][_0x1e3767(0x176)](_0x2d27dc))[_0x1e3767(0x177)]();if(_0x1fe8a1){const _0x27a9b5={'memberId':_0x6f61dc,'unitId':_0x2d27dc,'content':_0x4c3569,'mention':_0x2259fd,'threadId':_0xd45ba0},_0x9bd957=(await this[_0x1e3767(0x16c)][_0x1e3767(0x13d)]('/universer-api/comment/unit/'+_0x2d27dc+_0x1e3767(0x14a),{'body':_0x27a9b5}))[_0x1e3767(0x143)][_0x1e3767(0x174)];return{..._0x16c380,'id':_0x9bd957[_0x1e3767(0x161)],'dT':_0x202a2a(+_0x9bd957['createTimestamp'])[_0x1e3767(0x12c)](_0x1e3767(0x18b)),'personId':_0x9bd957[_0x1e3767(0x17c)]};}else{const _0x168bd2={'memberId':_0x6f61dc,'unitId':_0x2d27dc,'content':_0x4c3569,'mention':_0x2259fd},_0xeac531=await this[_0x1e3767(0x16c)][_0x1e3767(0x13d)](_0x1e3767(0x17b)+_0x2d27dc+'/add',{'body':_0x168bd2});return X(_0xeac531['body'][_0x1e3767(0x16d)],_0x16c380);}}async['updateComment'](_0x2e3cba){const _0x15f3c5=_0x2597e9;var _0x3b3deb,_0x55f6c1;const {text:_0x5933a5,unitId:_0x34edd6}=_0x2e3cba,_0x2b5c91=(_0x55f6c1=(_0x3b3deb=_0x5933a5[_0x15f3c5(0x132)])==null?void 0x0:_0x3b3deb['filter'](_0x47f00c=>_0x47f00c[_0x15f3c5(0x164)]===_0x5d373d['COMMENT'])[_0x15f3c5(0x12d)](_0x30dbf8=>_0x30dbf8[_0x15f3c5(0x163)]))!=null?_0x55f6c1:[],_0x1bb177=JSON['stringify'](_0x5933a5),_0x866165=_0x2e3cba[_0x15f3c5(0x172)],_0x3604ce=_0x2e3cba['id'],_0x12d972={'memberId':(await this['_sessionService'][_0x15f3c5(0x176)](_0x34edd6))[_0x15f3c5(0x177)](),'unitId':_0x34edd6,'threadId':_0x866165,'mention':_0x2b5c91,'content':_0x1bb177,'replyId':_0x3604ce},_0x114cbf=await this['_httpService'][_0x15f3c5(0x13d)](_0x15f3c5(0x17b)+_0x34edd6+'/edit',{'body':_0x12d972});return!_0x114cbf['body'][_0x15f3c5(0x155)]||_0x114cbf[_0x15f3c5(0x143)]['error']['code']===0x1;}async['resolveComment'](_0x358281){const _0x9921cf=_0x2597e9,{unitId:_0x2413da}=_0x358281,_0x51faca=_0x358281[_0x9921cf(0x172)],_0x2527fc={'memberId':this['_userService'][_0x9921cf(0x175)]()[_0x9921cf(0x135)],'unitId':_0x2413da,'threadId':_0x51faca,'solved':_0x358281[_0x9921cf(0x12f)]?I[_0x9921cf(0x150)]:I['OpenOrReOpen']},_0x54ff58=await this[_0x9921cf(0x16c)][_0x9921cf(0x13d)]('/universer-api/comment/unit/'+_0x2413da+_0x9921cf(0x14c),{'body':_0x2527fc});return!_0x54ff58[_0x9921cf(0x143)]['error']||_0x54ff58['body'][_0x9921cf(0x155)][_0x9921cf(0x168)]===0x1;}async[_0x2597e9(0x17f)](_0x10a399,_0x20dddd,_0x239167,_0x45aa0c){const _0x29b72=_0x2597e9,_0x38822e={'memberId':(await this[_0x29b72(0x178)][_0x29b72(0x176)](_0x10a399))[_0x29b72(0x177)](),'threadId':_0x239167,'replyId':_0x45aa0c,'unitId':_0x10a399},_0x298064=await this[_0x29b72(0x16c)]['post'](_0x29b72(0x17b)+_0x10a399+_0x29b72(0x17d),{'body':_0x38822e});return!_0x298064['body']['error']||_0x298064[_0x29b72(0x143)][_0x29b72(0x155)]['code']===0x1;}async[_0x2597e9(0x181)](_0x180e08,_0x4b4830,_0x545bdf){const _0x256913=_0x2597e9,_0x501510={'unitId':_0x180e08,'threadId':_0x545bdf},_0x1b662e=await this[_0x256913(0x16c)][_0x256913(0x13d)](_0x256913(0x17b)+_0x180e08+'/list',{'body':_0x501510}),_0x1e5af3=_0x545bdf[_0x256913(0x12d)](_0x432db9=>ee(_0x1b662e['body'][_0x256913(0x18c)][_0x432db9],_0x180e08,_0x4b4830))['filter'](Boolean);return Object[_0x256913(0x171)](_0x1b662e[_0x256913(0x143)]['users'])[_0x256913(0x13f)](_0x39bdef=>{const _0xf1c080=_0x256913;this['_userService'][_0xf1c080(0x186)](_0x39bdef);}),_0x1e5af3;}[_0x2597e9(0x182)](_0x387c45){const _0x43ce03=_0x2597e9;return{'id':_0x387c45['id'],'threadId':_0x387c45[_0x43ce03(0x172)],'ref':_0x387c45['ref']};}};f=Q([_(0x0,_0x4de5f3(_0x36e09e)),_(0x1,_0x4de5f3(_0x47e0ea)),_(0x2,_0x4de5f3(_0xfbbfd9)),_(0x3,_0x4de5f3(_0xa3bf2))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x524904,_0x1aeab5,_0x523d15,_0x4950a5)=>{const _0x2523b0=_0x2597e9;for(var _0x5a7fad=_0x4950a5>0x1?void 0x0:_0x4950a5?re(_0x1aeab5,_0x523d15):_0x1aeab5,_0x38cd48=_0x524904[_0x2523b0(0x170)]-0x1,_0x3ed2bf;_0x38cd48>=0x0;_0x38cd48--)(_0x3ed2bf=_0x524904[_0x38cd48])&&(_0x5a7fad=_0x3ed2bf(_0x5a7fad)||_0x5a7fad);return _0x5a7fad;},N=(_0x53c307,_0x592b6d)=>(_0x2ea2c6,_0x12b88c)=>_0x592b6d(_0x2ea2c6,_0x12b88c,_0x53c307);let g=class extends _0x485769{constructor(_0x204733,_0x3add50){const _0x13ef56=_0x2597e9;super(),this['_threadCommentDataSourceService']=_0x204733,this['_threadCommentDataSource']=_0x3add50,this[_0x13ef56(0x14b)]();}[_0x2597e9(0x14b)](){const _0x2e6f9b=_0x2597e9;this[_0x2e6f9b(0x179)][_0x2e6f9b(0x162)]=this[_0x2e6f9b(0x166)],this[_0x2e6f9b(0x179)][_0x2e6f9b(0x137)]=!0x1;}};function _0x20a4(_0x4a975c,_0x1c02ed){const _0x5d60aa=_0x5d60();return _0x20a4=function(_0x20a402,_0x4c86d8){_0x20a402=_0x20a402-0x12a;let _0x45dee5=_0x5d60aa[_0x20a402];return _0x45dee5;},_0x20a4(_0x4a975c,_0x1c02ed);}g=te([N(0x0,_0x5d2836),N(0x1,_0x4de5f3(f))],g);function _0x5d60(){const _0x48c627=['_configService','payload','UNRECOGNIZED','user','Reply','post','onStarting','forEach','thread-comment-data-source.config','createTimestamp','resolveComment','body','COMMENT','1875BDeaCc','parse','495812TNtfEK','6465050RPSyIV','solved','/reply','_initDataSource','/solved','_init','filter','content','Solved','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Add','error','setConfig','2233468khiYkC','_threadCommentModel','OpenOrReOpen','addComment','personId','Edit','314392BwfdIT','pluginName','UNIVER_UNKNOWN','9eivmrh','replyId','dataSource','rangeId','rangeType','disposeWithMe','_threadCommentDataSource','_injector','code','311301kOxFvJ','parentId','get','_httpService','comment','find','onReady','length','values','threadId','getUnit','reply','getCurrentUser','requireSession','getMemberID','_sessionService','_threadCommentDataSourceService','users','/universer-api/comment/unit/','userId','/delete','112NaEmhO','deleteComment','Unknown','listComments','saveCommentToSnapshot','delete','unitId','add','addUser','10584WGYUYU','4145351CsXwlg','_config','_userService','YYYY/MM/DD\x20HH:mm','comments','_initUserSync','Delete','format','map','type','resolved','getUser','replies','customRanges','Solve','subscribe','userID','updateComment','syncUpdateMutationToColla'];_0x5d60=function(){return _0x48c627;};return _0x5d60();}var se=Object['defineProperty'],oe=Object[_0x2597e9(0x153)],ne=(_0x507a8d,_0x2cf261,_0x16f34d)=>_0x2cf261 in _0x507a8d?se(_0x507a8d,_0x2cf261,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16f34d}):_0x507a8d[_0x2cf261]=_0x16f34d,ie=(_0x26d39c,_0x6c874b,_0x1a921a,_0x551f84)=>{const _0x50ac6a=_0x2597e9;for(var _0x2578e9=_0x551f84>0x1?void 0x0:_0x551f84?oe(_0x6c874b,_0x1a921a):_0x6c874b,_0x4b7144=_0x26d39c[_0x50ac6a(0x170)]-0x1,_0x296a76;_0x4b7144>=0x0;_0x4b7144--)(_0x296a76=_0x26d39c[_0x4b7144])&&(_0x2578e9=_0x296a76(_0x2578e9)||_0x2578e9);return _0x2578e9;},w=(_0x113f72,_0x3fbb81)=>(_0x576590,_0x46f871)=>_0x3fbb81(_0x576590,_0x46f871,_0x113f72),$=(_0xb5c499,_0x34348d,_0x214b8c)=>ne(_0xb5c499,typeof _0x34348d!='symbol'?_0x34348d+'':_0x34348d,_0x214b8c);let b=class extends _0x1f6d70{constructor(_0x48b4e2=M,_0xd91f37,_0x4e0031){const _0x97b403=_0x2597e9;super(),this[_0x97b403(0x189)]=_0x48b4e2,this[_0x97b403(0x167)]=_0xd91f37,this[_0x97b403(0x138)]=_0x4e0031;const {..._0xff4206}=_0x45afd8({},M,this['_config']);this[_0x97b403(0x138)][_0x97b403(0x156)](z,_0xff4206);}[_0x2597e9(0x13e)](){const _0xdaa85e=_0x2597e9;[[f],[g],[S]][_0xdaa85e(0x13f)](_0x355b45=>{const _0x559c34=_0xdaa85e;this[_0x559c34(0x167)][_0x559c34(0x185)](_0x355b45);});}[_0x2597e9(0x16f)](){const _0x401929=_0x2597e9;this[_0x401929(0x167)]['get'](g),this['_injector'][_0x401929(0x16b)](S);}};$(b,_0x2597e9(0x15e),W),$(b,'type',_0x43a3c7[_0x2597e9(0x15f)]),b=ie([_0x958407(_0x2b967b,_0x473ff2,_0x451a8e),w(0x1,_0x4de5f3(_0xa3bf2)),w(0x2,_0x453c5c)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x156056=_0x2456;(function(_0x20a7c2,_0x1d5fc3){const _0x68fe54=_0x2456,_0x40f370=_0x20a7c2();while(!![]){try{const _0x5194d3=parseInt(_0x68fe54(0x141))/0x1+parseInt(_0x68fe54(0x114))/0x2*(parseInt(_0x68fe54(0x157))/0x3)+parseInt(_0x68fe54(0x127))/0x4+-parseInt(_0x68fe54(0x168))/0x5+parseInt(_0x68fe54(0x11f))/0x6*(-parseInt(_0x68fe54(0x136))/0x7)+parseInt(_0x68fe54(0x166))/0x8*(parseInt(_0x68fe54(0x149))/0x9)+parseInt(_0x68fe54(0x116))/0xa;if(_0x5194d3===_0x1d5fc3)break;else _0x40f370['push'](_0x40f370['shift']());}catch(_0x16e1bc){_0x40f370['push'](_0x40f370['shift']());}}}(_0xc8e1,0x3ea1e));import{CommentService as _0x585108,CollaborationSessionService as _0x55d06f,UniverCollaborationClientPlugin as _0x2a0e3c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x576c81}from'@univerjs-pro/license';import{dayjs as _0x29a7b8,UserManagerService as _0x3b7c6a,Inject as _0xa1f4a5,Injector as _0x467e49,Disposable as _0x329f5c,CustomRangeType as _0x364f98,UniverInstanceType as _0x5183dd,DependentOn as _0x12fb17,IConfigService as _0x1abcfa,Plugin as _0x239e11,merge as _0x29ada1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x507370}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28d422,IThreadCommentDataSourceService as _0xa48844}from'@univerjs/thread-comment';import{bufferTime as _0x1e78a8}from'rxjs';import{HTTPService as _0x581e56}from'@univerjs/network';const W=_0x156056(0x12f);var I=(_0x1016ca=>(_0x1016ca[_0x1016ca[_0x156056(0x158)]=0x0]=_0x156056(0x158),_0x1016ca[_0x1016ca['Solved']=0x1]=_0x156056(0x11b),_0x1016ca[_0x1016ca[_0x156056(0x15e)]=-0x1]='UNRECOGNIZED',_0x1016ca))(I||{}),v=(_0x37796f=>(_0x37796f[_0x37796f[_0x156056(0x15f)]=0x0]='Unknown',_0x37796f[_0x37796f['Add']=0x1]=_0x156056(0x12c),_0x37796f[_0x37796f['Reply']=0x2]='Reply',_0x37796f[_0x37796f[_0x156056(0x13d)]=0x3]='Edit',_0x37796f[_0x37796f[_0x156056(0x118)]=0x4]=_0x156056(0x118),_0x37796f[_0x37796f[_0x156056(0x162)]=0x5]=_0x156056(0x162),_0x37796f[_0x37796f[_0x156056(0x15e)]=-0x1]=_0x156056(0x15e),_0x37796f))(v||{});const D=_0x43f4de=>_0x29a7b8(new Date(+_0x43f4de))[_0x156056(0x122)](_0x156056(0x129)),B=async(_0x22a29d,_0x13a601)=>{const _0x2a1314=_0x156056,_0x40c388=_0x22a29d[_0x2a1314(0x14e)](_0x3b7c6a),_0x320ab6=_0x22a29d[_0x2a1314(0x14e)](_0x581e56);_0x13a601[_0x2a1314(0x134)](_0x2824b6=>{_0x40c388['getUser'](_0x2824b6)&&_0x13a601['delete'](_0x2824b6);}),_0x13a601[_0x2a1314(0x152)]&&(await _0x320ab6[_0x2a1314(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a601]}}))['body'][_0x2a1314(0x133)][_0x2a1314(0x134)](_0x1c33a0=>{const _0x4e7395=_0x2a1314;_0x1c33a0&&_0x40c388[_0x4e7395(0x161)](_0x1c33a0);});};function _0x2456(_0x4c12e8,_0x3d7bc7){const _0xc8e1ba=_0xc8e1();return _0x2456=function(_0x245614,_0x2ea907){_0x245614=_0x245614-0x10e;let _0x5bb234=_0xc8e1ba[_0x245614];return _0x5bb234;},_0x2456(_0x4c12e8,_0x3d7bc7);}var K=Object[_0x156056(0x167)],V=(_0x3b2791,_0x1609d7,_0x25fe0c,_0x3d6d82)=>{const _0x1c04fb=_0x156056;for(var _0x26ffe0=_0x3d6d82>0x1?void 0x0:_0x3d6d82?K(_0x1609d7,_0x25fe0c):_0x1609d7,_0x445793=_0x3b2791[_0x1c04fb(0x130)]-0x1,_0x4edd96;_0x445793>=0x0;_0x445793--)(_0x4edd96=_0x3b2791[_0x445793])&&(_0x26ffe0=_0x4edd96(_0x26ffe0)||_0x26ffe0);return _0x26ffe0;},p=(_0x3915d1,_0x1f847f)=>(_0x465386,_0x3c9236)=>_0x1f847f(_0x465386,_0x3c9236,_0x3915d1);let S=class extends _0x329f5c{constructor(_0x31b552,_0x1540da,_0x227bf2,_0x3963a1){const _0xe7ef26=_0x156056;super(),this[_0xe7ef26(0x15c)]=_0x31b552,this[_0xe7ef26(0x128)]=_0x1540da,this['_userService']=_0x227bf2,this[_0xe7ef26(0x155)]=_0x3963a1,this[_0xe7ef26(0x132)](),this[_0xe7ef26(0x12d)]();}[_0x156056(0x12d)](){const _0x101168=_0x156056;this[_0x101168(0x165)](this[_0x101168(0x128)][_0x101168(0x111)][_0x101168(0x14b)](_0x1e78a8(0x10))[_0x101168(0x150)](_0x2d5363=>{const _0x39f921=_0x101168,_0x22d89f=new Set();_0x2d5363['forEach'](_0x3ad8bd=>{const _0x26a9f6=_0x2456;switch(_0x3ad8bd[_0x26a9f6(0x117)]){case'add':{const _0x3b1a6d=_0x3ad8bd[_0x26a9f6(0x163)][_0x26a9f6(0x119)];_0x22d89f['add'](_0x3b1a6d);break;}}}),B(this[_0x39f921(0x155)],_0x22d89f);}));}[_0x156056(0x132)](){const _0x29a7f2=_0x156056;this[_0x29a7f2(0x165)](this['_commentService'][_0x29a7f2(0x111)][_0x29a7f2(0x150)](async _0x3aa7b2=>{const _0x20d005=_0x29a7f2;var _0x1aeaab,_0x362222,_0x5e1ce8,_0xdfeded;const _0x389266=(_0x1aeaab=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0x2fc067=>_0x2fc067[_0x20d005(0x121)]===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0x1aeaab[_0x20d005(0x142)];if(!_0x389266)return;const {unitId:_0x560d4b,subUnitId:_0x39f6b0}=_0x389266;switch(_0x3aa7b2['user']&&this[_0x20d005(0x164)][_0x20d005(0x161)](_0x3aa7b2[_0x20d005(0x126)]),_0x3aa7b2['type']){case v[_0x20d005(0x12c)]:break;case v[_0x20d005(0x151)]:{this[_0x20d005(0x128)][_0x20d005(0x147)](_0x560d4b,_0x39f6b0,{'unitId':_0x560d4b,'subUnitId':_0x39f6b0,'ref':'','id':_0x3aa7b2['replyId'],'dT':D(+_0x3aa7b2[_0x20d005(0x160)]),'threadId':_0x3aa7b2['threadId'],'personId':(_0x5e1ce8=(_0x362222=_0x3aa7b2['user'])==null?void 0x0:_0x362222['userID'])!=null?_0x5e1ce8:_0x3aa7b2[_0x20d005(0x12e)],'text':JSON['parse'](_0x3aa7b2['content']),'parentId':_0x389266['id']});break;}case v['Delete']:{const _0x331be0=this[_0x20d005(0x128)][_0x20d005(0x16d)](_0x560d4b,_0x39f6b0,_0x3aa7b2['replyId']);_0x331be0&&_0x331be0[_0x20d005(0x13a)]&&this[_0x20d005(0x128)]['deleteComment'](_0x560d4b,_0x39f6b0,_0x3aa7b2[_0x20d005(0x15a)]);break;}case v[_0x20d005(0x13d)]:{this['_threadCommentModel']['updateComment'](_0x560d4b,_0x39f6b0,{'commentId':_0x3aa7b2[_0x20d005(0x15a)],'text':JSON['parse'](_0x3aa7b2['content'])});break;}case v[_0x20d005(0x162)]:{const _0x12ce01=(_0xdfeded=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0xe352f7=>_0xe352f7['threadId']===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0xdfeded[_0x20d005(0x142)];_0x12ce01&&this[_0x20d005(0x128)][_0x20d005(0x11c)](_0x560d4b,_0x39f6b0,_0x12ce01['id'],_0x3aa7b2[_0x20d005(0x145)]===I[_0x20d005(0x11b)]);break;}}}));}};S=V([p(0x0,_0xa1f4a5(_0x585108)),p(0x1,_0xa1f4a5(_0x28d422)),p(0x2,_0xa1f4a5(_0x3b7c6a)),p(0x3,_0xa1f4a5(_0x467e49))],S);const z='thread-comment-data-source.config',M={};function _0xc8e1(){const _0x39b3f9=['find','pipe','_threadCommentDataSourceService','onStarting','get','/universer-api/comment/unit/','subscribe','Reply','size','slice','getCurrentUser','_injector','_threadCommentDataSource','479097uOfuEm','OpenOrReOpen','comment','replyId','comments','_commentService','rangeType','UNRECOGNIZED','Unknown','createTimestamp','addUser','Solve','payload','_userService','disposeWithMe','3056jNFFfa','getOwnPropertyDescriptor','2266985wAcCtD','ref','customRanges','content','resolved','getComment','symbol','userID','_config','commentUpdate$','add','values','4vrIPwt','unitId','4520230hiDsQq','type','Delete','personId','_httpService','Solved','resolveComment','setConfig','_sessionService','4638ugxPzA','/solved','threadId','format','/add','_initDataSource','getMemberID','user','713124lSpvsP','_threadCommentModel','YYYY/MM/DD\x20HH:mm','filter','rangeId','Add','_initUserSync','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','code','_init','users','forEach','onReady','4354rmFpVS','/delete','_configService','requireSession','parentId','/reply','post','Edit','body','error','replies','142105IfCHxx','root','map','getUnit','solved','stringify','addComment','reply','2331NrhPvQ'];_0xc8e1=function(){return _0x39b3f9;};return _0xc8e1();}var k=Object[_0x156056(0x167)],Q=(_0x1d4abd,_0x55ea39,_0xa2396e,_0x45cc93)=>{const _0x341bf6=_0x156056;for(var _0x2601e6=_0x45cc93>0x1?void 0x0:_0x45cc93?k(_0x55ea39,_0xa2396e):_0x55ea39,_0x463efd=_0x1d4abd[_0x341bf6(0x130)]-0x1,_0x26ffd5;_0x463efd>=0x0;_0x463efd--)(_0x26ffd5=_0x1d4abd[_0x463efd])&&(_0x2601e6=_0x26ffd5(_0x2601e6)||_0x2601e6);return _0x2601e6;},_=(_0x44f823,_0x4e6144)=>(_0x52e865,_0x1a0aec)=>_0x4e6144(_0x52e865,_0x1a0aec,_0x44f823);function X(_0x1c5532,_0x44d280){const _0x299dd1=_0x156056,_0x513332=_0x1c5532['replies'][0x0];return{..._0x44d280,'id':_0x513332[_0x299dd1(0x15a)],'resolved':_0x1c5532[_0x299dd1(0x145)]===0x1,'dT':D(_0x513332[_0x299dd1(0x160)]),'personId':_0x513332[_0x299dd1(0x12e)],'threadId':_0x513332[_0x299dd1(0x121)]};}function ee(_0x1782e9,_0x1aa38b,_0x44d93c){const _0x41a88e=_0x156056;var _0x266e7e,_0x4ccf46;if(((_0x4ccf46=(_0x266e7e=_0x1782e9==null?void 0x0:_0x1782e9[_0x41a88e(0x140)])==null?void 0x0:_0x266e7e[_0x41a88e(0x130)])!=null?_0x4ccf46:0x0)>0x0){const _0x2be37d=(_0x1ac1d6,_0x187c23)=>({'id':_0x1ac1d6['replyId'],'threadId':_0x1ac1d6['threadId'],'dT':D(_0x1ac1d6[_0x41a88e(0x160)]),'personId':_0x1ac1d6['userId'],'resolved':_0x1782e9[_0x41a88e(0x145)]===I['Solved'],'unitId':_0x1aa38b,'subUnitId':_0x44d93c,'text':JSON['parse'](_0x1ac1d6[_0x41a88e(0x16b)]),'parentId':_0x187c23}),_0xfb42ee=_0x2be37d(_0x1782e9[_0x41a88e(0x140)][0x0]);return{..._0xfb42ee,'children':_0x1782e9['replies'][_0x41a88e(0x153)](0x1)[_0x41a88e(0x143)](_0x192254=>_0x2be37d(_0x192254,_0xfb42ee['id']))};}return null;}let f=class{constructor(_0xe36bad,_0x28940f,_0x468e6b,_0x3e00d5){const _0x41b8e8=_0x156056;this[_0x41b8e8(0x11a)]=_0xe36bad,this['_userService']=_0x28940f,this['_sessionService']=_0x468e6b,this[_0x41b8e8(0x155)]=_0x3e00d5;}async[_0x156056(0x147)](_0x41e943){const _0x3f87cb=_0x156056;var _0x26dab2,_0x5b8a0c;const {parentId:_0x1ef24b,unitId:_0x28a974,text:_0x2984a5,threadId:_0x27aa9a}=_0x41e943,_0x3ab062=(_0x5b8a0c=(_0x26dab2=_0x2984a5[_0x3f87cb(0x16a)])==null?void 0x0:_0x26dab2[_0x3f87cb(0x12a)](_0x175e95=>_0x175e95[_0x3f87cb(0x15d)]===_0x364f98['COMMENT'])['map'](_0x517bf9=>_0x517bf9[_0x3f87cb(0x12b)]))!=null?_0x5b8a0c:[],_0x4e47a1=JSON[_0x3f87cb(0x146)](_0x2984a5),_0x37d0f2=(await this[_0x3f87cb(0x11e)][_0x3f87cb(0x139)](_0x28a974))[_0x3f87cb(0x125)]();if(_0x1ef24b){const _0x32edac={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062,'threadId':_0x27aa9a},_0x5e3c83=(await this[_0x3f87cb(0x11a)]['post'](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x13b),{'body':_0x32edac}))[_0x3f87cb(0x13e)][_0x3f87cb(0x148)];return{..._0x41e943,'id':_0x5e3c83[_0x3f87cb(0x15a)],'dT':_0x29a7b8(+_0x5e3c83[_0x3f87cb(0x160)])[_0x3f87cb(0x122)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5e3c83['userId']};}else{const _0x2263db={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062},_0x17a925=await this[_0x3f87cb(0x11a)][_0x3f87cb(0x13c)](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x123),{'body':_0x2263db});return X(_0x17a925[_0x3f87cb(0x13e)][_0x3f87cb(0x159)],_0x41e943);}}async['updateComment'](_0xb833f8){const _0x2e1b21=_0x156056;var _0x5e6b70,_0x9c7b7a;const {text:_0x4da092,unitId:_0x346bf5}=_0xb833f8,_0x5554d4=(_0x9c7b7a=(_0x5e6b70=_0x4da092[_0x2e1b21(0x16a)])==null?void 0x0:_0x5e6b70[_0x2e1b21(0x12a)](_0x249967=>_0x249967['rangeType']===_0x364f98['COMMENT'])[_0x2e1b21(0x143)](_0x4028bc=>_0x4028bc[_0x2e1b21(0x12b)]))!=null?_0x9c7b7a:[],_0x54e6fc=JSON[_0x2e1b21(0x146)](_0x4da092),_0x1e74ca=_0xb833f8[_0x2e1b21(0x121)],_0x4e0a64=_0xb833f8['id'],_0xa7a531={'memberId':(await this[_0x2e1b21(0x11e)][_0x2e1b21(0x139)](_0x346bf5))[_0x2e1b21(0x125)](),'unitId':_0x346bf5,'threadId':_0x1e74ca,'mention':_0x5554d4,'content':_0x54e6fc,'replyId':_0x4e0a64},_0x32f297=await this[_0x2e1b21(0x11a)][_0x2e1b21(0x13c)]('/universer-api/comment/unit/'+_0x346bf5+'/edit',{'body':_0xa7a531});return!_0x32f297['body']['error']||_0x32f297['body'][_0x2e1b21(0x13f)]['code']===0x1;}async['resolveComment'](_0x476469){const _0x14c8f0=_0x156056,{unitId:_0x10b187}=_0x476469,_0x569166=_0x476469[_0x14c8f0(0x121)],_0x59123f={'memberId':this[_0x14c8f0(0x164)][_0x14c8f0(0x154)]()[_0x14c8f0(0x10f)],'unitId':_0x10b187,'threadId':_0x569166,'solved':_0x476469[_0x14c8f0(0x16c)]?I[_0x14c8f0(0x11b)]:I[_0x14c8f0(0x158)]},_0x478d60=await this[_0x14c8f0(0x11a)][_0x14c8f0(0x13c)]('/universer-api/comment/unit/'+_0x10b187+_0x14c8f0(0x120),{'body':_0x59123f});return!_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)]||_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)][_0x14c8f0(0x131)]===0x1;}async['deleteComment'](_0x103939,_0x5d3b85,_0x3a5fca,_0x305080){const _0x167b49=_0x156056,_0x2262bf={'memberId':(await this[_0x167b49(0x11e)][_0x167b49(0x139)](_0x103939))[_0x167b49(0x125)](),'threadId':_0x3a5fca,'replyId':_0x305080,'unitId':_0x103939},_0x5c6d03=await this[_0x167b49(0x11a)][_0x167b49(0x13c)]('/universer-api/comment/unit/'+_0x103939+_0x167b49(0x137),{'body':_0x2262bf});return!_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)]||_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)][_0x167b49(0x131)]===0x1;}async['listComments'](_0x242f39,_0x3770c4,_0x4cc007){const _0x2565fc=_0x156056,_0x373546={'unitId':_0x242f39,'threadId':_0x4cc007},_0x304036=await this[_0x2565fc(0x11a)]['post'](_0x2565fc(0x14f)+_0x242f39+'/list',{'body':_0x373546}),_0x3dd9b9=_0x4cc007[_0x2565fc(0x143)](_0x52a210=>ee(_0x304036[_0x2565fc(0x13e)][_0x2565fc(0x15b)][_0x52a210],_0x242f39,_0x3770c4))['filter'](Boolean);return Object[_0x2565fc(0x113)](_0x304036[_0x2565fc(0x13e)]['users'])[_0x2565fc(0x134)](_0x563f1b=>{const _0x124cd9=_0x2565fc;this['_userService'][_0x124cd9(0x161)](_0x563f1b);}),_0x3dd9b9;}['saveCommentToSnapshot'](_0x38cf18){const _0x187eea=_0x156056;return{'id':_0x38cf18['id'],'threadId':_0x38cf18[_0x187eea(0x121)],'ref':_0x38cf18[_0x187eea(0x169)]};}};f=Q([_(0x0,_0xa1f4a5(_0x581e56)),_(0x1,_0xa1f4a5(_0x3b7c6a)),_(0x2,_0xa1f4a5(_0x55d06f)),_(0x3,_0xa1f4a5(_0x467e49))],f);var re=Object[_0x156056(0x167)],te=(_0x458293,_0x1ca14f,_0x4207b3,_0x46b4a4)=>{const _0x580f09=_0x156056;for(var _0x17d475=_0x46b4a4>0x1?void 0x0:_0x46b4a4?re(_0x1ca14f,_0x4207b3):_0x1ca14f,_0x7153ca=_0x458293[_0x580f09(0x130)]-0x1,_0x10f1b2;_0x7153ca>=0x0;_0x7153ca--)(_0x10f1b2=_0x458293[_0x7153ca])&&(_0x17d475=_0x10f1b2(_0x17d475)||_0x17d475);return _0x17d475;},N=(_0x3c6250,_0x134122)=>(_0x1517f3,_0x3fc326)=>_0x134122(_0x1517f3,_0x3fc326,_0x3c6250);let g=class extends _0x329f5c{constructor(_0xe81fa,_0x2417c9){const _0x4c0951=_0x156056;super(),this[_0x4c0951(0x14c)]=_0xe81fa,this[_0x4c0951(0x156)]=_0x2417c9,this[_0x4c0951(0x124)]();}['_initDataSource'](){const _0x1515a1=_0x156056;this[_0x1515a1(0x14c)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa48844),N(0x1,_0xa1f4a5(f))],g);var se=Object['defineProperty'],oe=Object[_0x156056(0x167)],ne=(_0x1e35b8,_0x3f0a5c,_0x358331)=>_0x3f0a5c in _0x1e35b8?se(_0x1e35b8,_0x3f0a5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x358331}):_0x1e35b8[_0x3f0a5c]=_0x358331,ie=(_0x3619b6,_0xe59082,_0xb271be,_0x1c0fa4)=>{const _0x3328b6=_0x156056;for(var _0x13fa9f=_0x1c0fa4>0x1?void 0x0:_0x1c0fa4?oe(_0xe59082,_0xb271be):_0xe59082,_0x3a80cc=_0x3619b6[_0x3328b6(0x130)]-0x1,_0x349c6e;_0x3a80cc>=0x0;_0x3a80cc--)(_0x349c6e=_0x3619b6[_0x3a80cc])&&(_0x13fa9f=_0x349c6e(_0x13fa9f)||_0x13fa9f);return _0x13fa9f;},w=(_0x39533e,_0x26f6c4)=>(_0x4c2b17,_0xd48a5c)=>_0x26f6c4(_0x4c2b17,_0xd48a5c,_0x39533e),$=(_0x4bbf12,_0x1c041a,_0x2cdcf2)=>ne(_0x4bbf12,typeof _0x1c041a!=_0x156056(0x10e)?_0x1c041a+'':_0x1c041a,_0x2cdcf2);let b=class extends _0x239e11{constructor(_0x45dd26=M,_0x116394,_0x1bfa8a){const _0x2a1210=_0x156056;super(),this['_config']=_0x45dd26,this['_injector']=_0x116394,this[_0x2a1210(0x138)]=_0x1bfa8a;const {..._0x37b173}=_0x29ada1({},M,this[_0x2a1210(0x110)]);this[_0x2a1210(0x138)][_0x2a1210(0x11d)](z,_0x37b173);}[_0x156056(0x14d)](){const _0xfad2c7=_0x156056;[[f],[g],[S]][_0xfad2c7(0x134)](_0x2fbabf=>{const _0x42ca9f=_0xfad2c7;this[_0x42ca9f(0x155)][_0x42ca9f(0x112)](_0x2fbabf);});}[_0x156056(0x135)](){const _0x4d1d01=_0x156056;this[_0x4d1d01(0x155)]['get'](g),this[_0x4d1d01(0x155)][_0x4d1d01(0x14e)](S);}};$(b,'pluginName',W),$(b,_0x156056(0x117),_0x5183dd['UNIVER_UNKNOWN']),b=ie([_0x12fb17(_0x507370,_0x2a0e3c,_0x576c81),w(0x1,_0xa1f4a5(_0x467e49)),w(0x2,_0x1abcfa)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2597e9=_0x20a4;(function(_0x2000cf,_0x42f1b0){const _0x4b3443=_0x20a4,_0x2cac61=_0x2000cf();while(!![]){try{const _0x170e64=parseInt(_0x4b3443(0x15d))/0x1+-parseInt(_0x4b3443(0x147))/0x2*(-parseInt(_0x4b3443(0x160))/0x3)+-parseInt(_0x4b3443(0x157))/0x4+parseInt(_0x4b3443(0x145))/0x5*(-parseInt(_0x4b3443(0x187))/0x6)+-parseInt(_0x4b3443(0x188))/0x7+-parseInt(_0x4b3443(0x17e))/0x8*(-parseInt(_0x4b3443(0x169))/0x9)+parseInt(_0x4b3443(0x148))/0xa;if(_0x170e64===_0x42f1b0)break;else _0x2cac61['push'](_0x2cac61['shift']());}catch(_0x13972d){_0x2cac61['push'](_0x2cac61['shift']());}}}(_0x5d60,0x5bfe1));import{CommentService as _0x31c088,CollaborationSessionService as _0xfbbfd9,UniverCollaborationClientPlugin as _0x473ff2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x451a8e}from'@univerjs-pro/license';import{dayjs as _0x202a2a,UserManagerService as _0x47e0ea,Inject as _0x4de5f3,Injector as _0xa3bf2,Disposable as _0x485769,CustomRangeType as _0x5d373d,UniverInstanceType as _0x43a3c7,DependentOn as _0x958407,IConfigService as _0x453c5c,Plugin as _0x1f6d70,merge as _0x45afd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b967b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2af163,IThreadCommentDataSourceService as _0x5d2836}from'@univerjs/thread-comment';import{bufferTime as _0x42b721}from'rxjs';import{HTTPService as _0x36e09e}from'@univerjs/network';const W=_0x2597e9(0x152);var I=(_0x5deb2c=>(_0x5deb2c[_0x5deb2c[_0x2597e9(0x159)]=0x0]=_0x2597e9(0x159),_0x5deb2c[_0x5deb2c[_0x2597e9(0x150)]=0x1]='Solved',_0x5deb2c[_0x5deb2c['UNRECOGNIZED']=-0x1]=_0x2597e9(0x13a),_0x5deb2c))(I||{}),v=(_0x21d7fb=>(_0x21d7fb[_0x21d7fb['Unknown']=0x0]=_0x2597e9(0x180),_0x21d7fb[_0x21d7fb[_0x2597e9(0x154)]=0x1]='Add',_0x21d7fb[_0x21d7fb[_0x2597e9(0x13c)]=0x2]='Reply',_0x21d7fb[_0x21d7fb[_0x2597e9(0x15c)]=0x3]=_0x2597e9(0x15c),_0x21d7fb[_0x21d7fb[_0x2597e9(0x12b)]=0x4]=_0x2597e9(0x12b),_0x21d7fb[_0x21d7fb[_0x2597e9(0x133)]=0x5]='Solve',_0x21d7fb[_0x21d7fb[_0x2597e9(0x13a)]=-0x1]=_0x2597e9(0x13a),_0x21d7fb))(v||{});const D=_0x35dd05=>_0x202a2a(new Date(+_0x35dd05))[_0x2597e9(0x12c)](_0x2597e9(0x18b)),B=async(_0xcf9cd2,_0x3191c4)=>{const _0x471549=_0x2597e9,_0x2dcb02=_0xcf9cd2[_0x471549(0x16b)](_0x47e0ea),_0x4cf74d=_0xcf9cd2[_0x471549(0x16b)](_0x36e09e);_0x3191c4[_0x471549(0x13f)](_0xd83710=>{const _0x13177d=_0x471549;_0x2dcb02[_0x13177d(0x130)](_0xd83710)&&_0x3191c4[_0x13177d(0x183)](_0xd83710);}),_0x3191c4['size']&&(await _0x4cf74d[_0x471549(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3191c4]}}))[_0x471549(0x143)][_0x471549(0x17a)][_0x471549(0x13f)](_0x3bc869=>{const _0x122618=_0x471549;_0x3bc869&&_0x2dcb02[_0x122618(0x186)](_0x3bc869);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x456b10,_0x101e9c,_0x162017,_0x1031a5)=>{const _0x3177b5=_0x2597e9;for(var _0x1070b4=_0x1031a5>0x1?void 0x0:_0x1031a5?K(_0x101e9c,_0x162017):_0x101e9c,_0x18aa42=_0x456b10[_0x3177b5(0x170)]-0x1,_0x339a9e;_0x18aa42>=0x0;_0x18aa42--)(_0x339a9e=_0x456b10[_0x18aa42])&&(_0x1070b4=_0x339a9e(_0x1070b4)||_0x1070b4);return _0x1070b4;},p=(_0x34c89d,_0x32e9a6)=>(_0xc89371,_0x2a80f8)=>_0x32e9a6(_0xc89371,_0x2a80f8,_0x34c89d);let S=class extends _0x485769{constructor(_0x1c3678,_0x3f0f9c,_0x524d3b,_0x1075e7){const _0x1bb18c=_0x2597e9;super(),this['_commentService']=_0x1c3678,this['_threadCommentModel']=_0x3f0f9c,this[_0x1bb18c(0x18a)]=_0x524d3b,this[_0x1bb18c(0x167)]=_0x1075e7,this[_0x1bb18c(0x14d)](),this[_0x1bb18c(0x12a)]();}[_0x2597e9(0x12a)](){const _0x14283e=_0x2597e9;this[_0x14283e(0x165)](this[_0x14283e(0x158)]['commentUpdate$']['pipe'](_0x42b721(0x10))[_0x14283e(0x134)](_0x5b8560=>{const _0x2d48cd=_0x14283e,_0x146b33=new Set();_0x5b8560[_0x2d48cd(0x13f)](_0x31f51a=>{const _0x40a85c=_0x2d48cd;switch(_0x31f51a[_0x40a85c(0x12e)]){case'add':{const _0x237d62=_0x31f51a[_0x40a85c(0x139)][_0x40a85c(0x15b)];_0x146b33[_0x40a85c(0x185)](_0x237d62);break;}}}),B(this[_0x2d48cd(0x167)],_0x146b33);}));}[_0x2597e9(0x14d)](){const _0x9898b7=_0x2597e9;this[_0x9898b7(0x165)](this['_commentService']['commentUpdate$']['subscribe'](async _0x55c738=>{const _0x52abbe=_0x9898b7;var _0x248eb3,_0x3ed5ad,_0x5020a1,_0x5f3883;const _0x342452=(_0x248eb3=this[_0x52abbe(0x158)]['getUnit'](_0x55c738[_0x52abbe(0x184)])['find'](_0x28c403=>_0x28c403[_0x52abbe(0x172)]===_0x55c738[_0x52abbe(0x172)]))==null?void 0x0:_0x248eb3['root'];if(!_0x342452)return;const {unitId:_0xf4bcf6,subUnitId:_0x4b2720}=_0x342452;switch(_0x55c738[_0x52abbe(0x13b)]&&this[_0x52abbe(0x18a)]['addUser'](_0x55c738[_0x52abbe(0x13b)]),_0x55c738[_0x52abbe(0x12e)]){case v[_0x52abbe(0x154)]:break;case v[_0x52abbe(0x13c)]:{this[_0x52abbe(0x158)]['addComment'](_0xf4bcf6,_0x4b2720,{'unitId':_0xf4bcf6,'subUnitId':_0x4b2720,'ref':'','id':_0x55c738[_0x52abbe(0x161)],'dT':D(+_0x55c738['createTimestamp']),'threadId':_0x55c738['threadId'],'personId':(_0x5020a1=(_0x3ed5ad=_0x55c738[_0x52abbe(0x13b)])==null?void 0x0:_0x3ed5ad[_0x52abbe(0x135)])!=null?_0x5020a1:_0x55c738[_0x52abbe(0x17c)],'text':JSON[_0x52abbe(0x146)](_0x55c738[_0x52abbe(0x14f)]),'parentId':_0x342452['id']});break;}case v[_0x52abbe(0x12b)]:{const _0x23d9fa=this['_threadCommentModel']['getComment'](_0xf4bcf6,_0x4b2720,_0x55c738[_0x52abbe(0x161)]);_0x23d9fa&&_0x23d9fa[_0x52abbe(0x16a)]&&this[_0x52abbe(0x158)][_0x52abbe(0x17f)](_0xf4bcf6,_0x4b2720,_0x55c738[_0x52abbe(0x161)]);break;}case v[_0x52abbe(0x15c)]:{this['_threadCommentModel'][_0x52abbe(0x136)](_0xf4bcf6,_0x4b2720,{'commentId':_0x55c738[_0x52abbe(0x161)],'text':JSON['parse'](_0x55c738[_0x52abbe(0x14f)])});break;}case v[_0x52abbe(0x133)]:{const _0x519c2e=(_0x5f3883=this[_0x52abbe(0x158)][_0x52abbe(0x173)](_0x55c738[_0x52abbe(0x184)])[_0x52abbe(0x16e)](_0x8e3b07=>_0x8e3b07[_0x52abbe(0x172)]===_0x55c738['threadId']))==null?void 0x0:_0x5f3883['root'];_0x519c2e&&this['_threadCommentModel'][_0x52abbe(0x142)](_0xf4bcf6,_0x4b2720,_0x519c2e['id'],_0x55c738[_0x52abbe(0x149)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4de5f3(_0x31c088)),p(0x1,_0x4de5f3(_0x2af163)),p(0x2,_0x4de5f3(_0x47e0ea)),p(0x3,_0x4de5f3(_0xa3bf2))],S);const z=_0x2597e9(0x140),M={};var k=Object[_0x2597e9(0x153)],Q=(_0x3dbda0,_0x483b2,_0x3c1040,_0x4ba754)=>{const _0xb90f43=_0x2597e9;for(var _0x1c0ba0=_0x4ba754>0x1?void 0x0:_0x4ba754?k(_0x483b2,_0x3c1040):_0x483b2,_0x5b40d9=_0x3dbda0[_0xb90f43(0x170)]-0x1,_0x4164b6;_0x5b40d9>=0x0;_0x5b40d9--)(_0x4164b6=_0x3dbda0[_0x5b40d9])&&(_0x1c0ba0=_0x4164b6(_0x1c0ba0)||_0x1c0ba0);return _0x1c0ba0;},_=(_0x3f16c3,_0x1fa6aa)=>(_0xdb41bc,_0x10d25e)=>_0x1fa6aa(_0xdb41bc,_0x10d25e,_0x3f16c3);function X(_0x34cd4a,_0x51e9cb){const _0x16b6bd=_0x2597e9,_0x1478d0=_0x34cd4a['replies'][0x0];return{..._0x51e9cb,'id':_0x1478d0[_0x16b6bd(0x161)],'resolved':_0x34cd4a[_0x16b6bd(0x149)]===0x1,'dT':D(_0x1478d0[_0x16b6bd(0x141)]),'personId':_0x1478d0[_0x16b6bd(0x17c)],'threadId':_0x1478d0[_0x16b6bd(0x172)]};}function ee(_0x37a6ec,_0x5303fa,_0x51b288){const _0x5053d6=_0x2597e9;var _0x3b8cf3,_0x323644;if(((_0x323644=(_0x3b8cf3=_0x37a6ec==null?void 0x0:_0x37a6ec[_0x5053d6(0x131)])==null?void 0x0:_0x3b8cf3['length'])!=null?_0x323644:0x0)>0x0){const _0x2feb43=(_0x1707ef,_0x5bb2be)=>({'id':_0x1707ef[_0x5053d6(0x161)],'threadId':_0x1707ef[_0x5053d6(0x172)],'dT':D(_0x1707ef[_0x5053d6(0x141)]),'personId':_0x1707ef[_0x5053d6(0x17c)],'resolved':_0x37a6ec[_0x5053d6(0x149)]===I['Solved'],'unitId':_0x5303fa,'subUnitId':_0x51b288,'text':JSON[_0x5053d6(0x146)](_0x1707ef[_0x5053d6(0x14f)]),'parentId':_0x5bb2be}),_0x372de0=_0x2feb43(_0x37a6ec[_0x5053d6(0x131)][0x0]);return{..._0x372de0,'children':_0x37a6ec[_0x5053d6(0x131)]['slice'](0x1)['map'](_0x38b8b0=>_0x2feb43(_0x38b8b0,_0x372de0['id']))};}return null;}let f=class{constructor(_0x2c18f7,_0x4e8e67,_0x5bc71a,_0x493e31){const _0x3bc5d0=_0x2597e9;this[_0x3bc5d0(0x16c)]=_0x2c18f7,this[_0x3bc5d0(0x18a)]=_0x4e8e67,this[_0x3bc5d0(0x178)]=_0x5bc71a,this[_0x3bc5d0(0x167)]=_0x493e31;}async[_0x2597e9(0x15a)](_0x16c380){const _0x1e3767=_0x2597e9;var _0x5fb27a,_0x5b5dec;const {parentId:_0x1fe8a1,unitId:_0x2d27dc,text:_0x4d640c,threadId:_0xd45ba0}=_0x16c380,_0x2259fd=(_0x5b5dec=(_0x5fb27a=_0x4d640c[_0x1e3767(0x132)])==null?void 0x0:_0x5fb27a[_0x1e3767(0x14e)](_0x29025c=>_0x29025c[_0x1e3767(0x164)]===_0x5d373d[_0x1e3767(0x144)])[_0x1e3767(0x12d)](_0x361065=>_0x361065['rangeId']))!=null?_0x5b5dec:[],_0x4c3569=JSON[_0x1e3767(0x151)](_0x4d640c),_0x6f61dc=(await this[_0x1e3767(0x178)][_0x1e3767(0x176)](_0x2d27dc))[_0x1e3767(0x177)]();if(_0x1fe8a1){const _0x27a9b5={'memberId':_0x6f61dc,'unitId':_0x2d27dc,'content':_0x4c3569,'mention':_0x2259fd,'threadId':_0xd45ba0},_0x9bd957=(await this[_0x1e3767(0x16c)][_0x1e3767(0x13d)]('/universer-api/comment/unit/'+_0x2d27dc+_0x1e3767(0x14a),{'body':_0x27a9b5}))[_0x1e3767(0x143)][_0x1e3767(0x174)];return{..._0x16c380,'id':_0x9bd957[_0x1e3767(0x161)],'dT':_0x202a2a(+_0x9bd957['createTimestamp'])[_0x1e3767(0x12c)](_0x1e3767(0x18b)),'personId':_0x9bd957[_0x1e3767(0x17c)]};}else{const _0x168bd2={'memberId':_0x6f61dc,'unitId':_0x2d27dc,'content':_0x4c3569,'mention':_0x2259fd},_0xeac531=await this[_0x1e3767(0x16c)][_0x1e3767(0x13d)](_0x1e3767(0x17b)+_0x2d27dc+'/add',{'body':_0x168bd2});return X(_0xeac531['body'][_0x1e3767(0x16d)],_0x16c380);}}async['updateComment'](_0x2e3cba){const _0x15f3c5=_0x2597e9;var _0x3b3deb,_0x55f6c1;const {text:_0x5933a5,unitId:_0x34edd6}=_0x2e3cba,_0x2b5c91=(_0x55f6c1=(_0x3b3deb=_0x5933a5[_0x15f3c5(0x132)])==null?void 0x0:_0x3b3deb['filter'](_0x47f00c=>_0x47f00c[_0x15f3c5(0x164)]===_0x5d373d['COMMENT'])[_0x15f3c5(0x12d)](_0x30dbf8=>_0x30dbf8[_0x15f3c5(0x163)]))!=null?_0x55f6c1:[],_0x1bb177=JSON['stringify'](_0x5933a5),_0x866165=_0x2e3cba[_0x15f3c5(0x172)],_0x3604ce=_0x2e3cba['id'],_0x12d972={'memberId':(await this['_sessionService'][_0x15f3c5(0x176)](_0x34edd6))[_0x15f3c5(0x177)](),'unitId':_0x34edd6,'threadId':_0x866165,'mention':_0x2b5c91,'content':_0x1bb177,'replyId':_0x3604ce},_0x114cbf=await this['_httpService'][_0x15f3c5(0x13d)](_0x15f3c5(0x17b)+_0x34edd6+'/edit',{'body':_0x12d972});return!_0x114cbf['body'][_0x15f3c5(0x155)]||_0x114cbf[_0x15f3c5(0x143)]['error']['code']===0x1;}async['resolveComment'](_0x358281){const _0x9921cf=_0x2597e9,{unitId:_0x2413da}=_0x358281,_0x51faca=_0x358281[_0x9921cf(0x172)],_0x2527fc={'memberId':this['_userService'][_0x9921cf(0x175)]()[_0x9921cf(0x135)],'unitId':_0x2413da,'threadId':_0x51faca,'solved':_0x358281[_0x9921cf(0x12f)]?I[_0x9921cf(0x150)]:I['OpenOrReOpen']},_0x54ff58=await this[_0x9921cf(0x16c)][_0x9921cf(0x13d)]('/universer-api/comment/unit/'+_0x2413da+_0x9921cf(0x14c),{'body':_0x2527fc});return!_0x54ff58[_0x9921cf(0x143)]['error']||_0x54ff58['body'][_0x9921cf(0x155)][_0x9921cf(0x168)]===0x1;}async[_0x2597e9(0x17f)](_0x10a399,_0x20dddd,_0x239167,_0x45aa0c){const _0x29b72=_0x2597e9,_0x38822e={'memberId':(await this[_0x29b72(0x178)][_0x29b72(0x176)](_0x10a399))[_0x29b72(0x177)](),'threadId':_0x239167,'replyId':_0x45aa0c,'unitId':_0x10a399},_0x298064=await this[_0x29b72(0x16c)]['post'](_0x29b72(0x17b)+_0x10a399+_0x29b72(0x17d),{'body':_0x38822e});return!_0x298064['body']['error']||_0x298064[_0x29b72(0x143)][_0x29b72(0x155)]['code']===0x1;}async[_0x2597e9(0x181)](_0x180e08,_0x4b4830,_0x545bdf){const _0x256913=_0x2597e9,_0x501510={'unitId':_0x180e08,'threadId':_0x545bdf},_0x1b662e=await this[_0x256913(0x16c)][_0x256913(0x13d)](_0x256913(0x17b)+_0x180e08+'/list',{'body':_0x501510}),_0x1e5af3=_0x545bdf[_0x256913(0x12d)](_0x432db9=>ee(_0x1b662e['body'][_0x256913(0x18c)][_0x432db9],_0x180e08,_0x4b4830))['filter'](Boolean);return Object[_0x256913(0x171)](_0x1b662e[_0x256913(0x143)]['users'])[_0x256913(0x13f)](_0x39bdef=>{const _0xf1c080=_0x256913;this['_userService'][_0xf1c080(0x186)](_0x39bdef);}),_0x1e5af3;}[_0x2597e9(0x182)](_0x387c45){const _0x43ce03=_0x2597e9;return{'id':_0x387c45['id'],'threadId':_0x387c45[_0x43ce03(0x172)],'ref':_0x387c45['ref']};}};f=Q([_(0x0,_0x4de5f3(_0x36e09e)),_(0x1,_0x4de5f3(_0x47e0ea)),_(0x2,_0x4de5f3(_0xfbbfd9)),_(0x3,_0x4de5f3(_0xa3bf2))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x524904,_0x1aeab5,_0x523d15,_0x4950a5)=>{const _0x2523b0=_0x2597e9;for(var _0x5a7fad=_0x4950a5>0x1?void 0x0:_0x4950a5?re(_0x1aeab5,_0x523d15):_0x1aeab5,_0x38cd48=_0x524904[_0x2523b0(0x170)]-0x1,_0x3ed2bf;_0x38cd48>=0x0;_0x38cd48--)(_0x3ed2bf=_0x524904[_0x38cd48])&&(_0x5a7fad=_0x3ed2bf(_0x5a7fad)||_0x5a7fad);return _0x5a7fad;},N=(_0x53c307,_0x592b6d)=>(_0x2ea2c6,_0x12b88c)=>_0x592b6d(_0x2ea2c6,_0x12b88c,_0x53c307);let g=class extends _0x485769{constructor(_0x204733,_0x3add50){const _0x13ef56=_0x2597e9;super(),this['_threadCommentDataSourceService']=_0x204733,this['_threadCommentDataSource']=_0x3add50,this[_0x13ef56(0x14b)]();}[_0x2597e9(0x14b)](){const _0x2e6f9b=_0x2597e9;this[_0x2e6f9b(0x179)][_0x2e6f9b(0x162)]=this[_0x2e6f9b(0x166)],this[_0x2e6f9b(0x179)][_0x2e6f9b(0x137)]=!0x1;}};function _0x20a4(_0x4a975c,_0x1c02ed){const _0x5d60aa=_0x5d60();return _0x20a4=function(_0x20a402,_0x4c86d8){_0x20a402=_0x20a402-0x12a;let _0x45dee5=_0x5d60aa[_0x20a402];return _0x45dee5;},_0x20a4(_0x4a975c,_0x1c02ed);}g=te([N(0x0,_0x5d2836),N(0x1,_0x4de5f3(f))],g);function _0x5d60(){const _0x48c627=['_configService','payload','UNRECOGNIZED','user','Reply','post','onStarting','forEach','thread-comment-data-source.config','createTimestamp','resolveComment','body','COMMENT','1875BDeaCc','parse','495812TNtfEK','6465050RPSyIV','solved','/reply','_initDataSource','/solved','_init','filter','content','Solved','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Add','error','setConfig','2233468khiYkC','_threadCommentModel','OpenOrReOpen','addComment','personId','Edit','314392BwfdIT','pluginName','UNIVER_UNKNOWN','9eivmrh','replyId','dataSource','rangeId','rangeType','disposeWithMe','_threadCommentDataSource','_injector','code','311301kOxFvJ','parentId','get','_httpService','comment','find','onReady','length','values','threadId','getUnit','reply','getCurrentUser','requireSession','getMemberID','_sessionService','_threadCommentDataSourceService','users','/universer-api/comment/unit/','userId','/delete','112NaEmhO','deleteComment','Unknown','listComments','saveCommentToSnapshot','delete','unitId','add','addUser','10584WGYUYU','4145351CsXwlg','_config','_userService','YYYY/MM/DD\x20HH:mm','comments','_initUserSync','Delete','format','map','type','resolved','getUser','replies','customRanges','Solve','subscribe','userID','updateComment','syncUpdateMutationToColla'];_0x5d60=function(){return _0x48c627;};return _0x5d60();}var se=Object['defineProperty'],oe=Object[_0x2597e9(0x153)],ne=(_0x507a8d,_0x2cf261,_0x16f34d)=>_0x2cf261 in _0x507a8d?se(_0x507a8d,_0x2cf261,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16f34d}):_0x507a8d[_0x2cf261]=_0x16f34d,ie=(_0x26d39c,_0x6c874b,_0x1a921a,_0x551f84)=>{const _0x50ac6a=_0x2597e9;for(var _0x2578e9=_0x551f84>0x1?void 0x0:_0x551f84?oe(_0x6c874b,_0x1a921a):_0x6c874b,_0x4b7144=_0x26d39c[_0x50ac6a(0x170)]-0x1,_0x296a76;_0x4b7144>=0x0;_0x4b7144--)(_0x296a76=_0x26d39c[_0x4b7144])&&(_0x2578e9=_0x296a76(_0x2578e9)||_0x2578e9);return _0x2578e9;},w=(_0x113f72,_0x3fbb81)=>(_0x576590,_0x46f871)=>_0x3fbb81(_0x576590,_0x46f871,_0x113f72),$=(_0xb5c499,_0x34348d,_0x214b8c)=>ne(_0xb5c499,typeof _0x34348d!='symbol'?_0x34348d+'':_0x34348d,_0x214b8c);let b=class extends _0x1f6d70{constructor(_0x48b4e2=M,_0xd91f37,_0x4e0031){const _0x97b403=_0x2597e9;super(),this[_0x97b403(0x189)]=_0x48b4e2,this[_0x97b403(0x167)]=_0xd91f37,this[_0x97b403(0x138)]=_0x4e0031;const {..._0xff4206}=_0x45afd8({},M,this['_config']);this[_0x97b403(0x138)][_0x97b403(0x156)](z,_0xff4206);}[_0x2597e9(0x13e)](){const _0xdaa85e=_0x2597e9;[[f],[g],[S]][_0xdaa85e(0x13f)](_0x355b45=>{const _0x559c34=_0xdaa85e;this[_0x559c34(0x167)][_0x559c34(0x185)](_0x355b45);});}[_0x2597e9(0x16f)](){const _0x401929=_0x2597e9;this[_0x401929(0x167)]['get'](g),this['_injector'][_0x401929(0x16b)](S);}};$(b,_0x2597e9(0x15e),W),$(b,'type',_0x43a3c7[_0x2597e9(0x15f)]),b=ie([_0x958407(_0x2b967b,_0x473ff2,_0x451a8e),w(0x1,_0x4de5f3(_0xa3bf2)),w(0x2,_0x453c5c)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1ce650,_0x415dbf){const _0x5a336e=_0x41de,_0x15b7c7=_0x1ce650();while(!![]){try{const _0x1aaf89=-parseInt(_0x5a336e(0x1c7))/0x1*(parseInt(_0x5a336e(0x20d))/0x2)+-parseInt(_0x5a336e(0x237))/0x3+-parseInt(_0x5a336e(0x23d))/0x4*(parseInt(_0x5a336e(0x1d2))/0x5)+parseInt(_0x5a336e(0x206))/0x6*(parseInt(_0x5a336e(0x1fd))/0x7)+parseInt(_0x5a336e(0x1d4))/0x8+-parseInt(_0x5a336e(0x204))/0x9+parseInt(_0x5a336e(0x229))/0xa*(parseInt(_0x5a336e(0x1e7))/0xb);if(_0x1aaf89===_0x415dbf)break;else _0x15b7c7['push'](_0x15b7c7['shift']());}catch(_0x25c2c1){_0x15b7c7['push'](_0x15b7c7['shift']());}}}(_0x1632,0x27e40),function(_0x587f7b,_0x134c09){const _0x1965da=_0x41de;typeof exports==_0x1965da(0x20e)&&typeof module<'u'?_0x134c09(exports,require(_0x1965da(0x223)),require('@univerjs-pro/license'),require(_0x1965da(0x1ff)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x1965da(0x1e1)),require(_0x1965da(0x1fc))):typeof define=='function'&&define['amd']?define(['exports',_0x1965da(0x223),_0x1965da(0x23c),_0x1965da(0x1ff),_0x1965da(0x1e5),_0x1965da(0x1fb),_0x1965da(0x1e1),_0x1965da(0x1fc)],_0x134c09):(_0x587f7b=typeof globalThis<'u'?globalThis:_0x587f7b||self,_0x134c09(_0x587f7b['UniverProThreadCommentDatasource']={},_0x587f7b[_0x1965da(0x1d1)],_0x587f7b['UniverProLicense'],_0x587f7b[_0x1965da(0x215)],_0x587f7b[_0x1965da(0x22f)],_0x587f7b['UniverThreadComment'],_0x587f7b[_0x1965da(0x1e1)],_0x587f7b['UniverNetwork']));}(this,function(_0x2a78b6,_0x32c2f9,_0x3978b6,_0x206fc5,_0x1cd1db,_0x5aad4a,_0x4f8cf8,_0x2a30c3){'use strict';const _0x501570=_0x41de;const _0x206c54=_0x501570(0x1f4);var _0x2a37cd=(_0x2c8a28=>(_0x2c8a28[_0x2c8a28[_0x501570(0x227)]=0x0]=_0x501570(0x227),_0x2c8a28[_0x2c8a28[_0x501570(0x1de)]=0x1]=_0x501570(0x1de),_0x2c8a28[_0x2c8a28[_0x501570(0x1e2)]=-0x1]=_0x501570(0x1e2),_0x2c8a28))(_0x2a37cd||{}),_0x5cfb89=(_0x5d64c2=>(_0x5d64c2[_0x5d64c2[_0x501570(0x207)]=0x0]=_0x501570(0x207),_0x5d64c2[_0x5d64c2[_0x501570(0x22e)]=0x1]=_0x501570(0x22e),_0x5d64c2[_0x5d64c2['Reply']=0x2]='Reply',_0x5d64c2[_0x5d64c2[_0x501570(0x214)]=0x3]=_0x501570(0x214),_0x5d64c2[_0x5d64c2[_0x501570(0x1dd)]=0x4]=_0x501570(0x1dd),_0x5d64c2[_0x5d64c2['Solve']=0x5]=_0x501570(0x225),_0x5d64c2[_0x5d64c2[_0x501570(0x1e2)]=-0x1]=_0x501570(0x1e2),_0x5d64c2))(_0x5cfb89||{});const _0x2568c8=_0x2ba203=>_0x206fc5[_0x501570(0x22a)](new Date(+_0x2ba203))[_0x501570(0x234)](_0x501570(0x1ce)),_0xf4c171=async(_0x142fd7,_0x52a1f3)=>{const _0x419791=_0x501570,_0x17165f=_0x142fd7['get'](_0x206fc5[_0x419791(0x1e4)]),_0x2dbd40=_0x142fd7[_0x419791(0x22b)](_0x2a30c3['HTTPService']);_0x52a1f3['forEach'](_0x10ac8b=>{const _0x31a495=_0x419791;_0x17165f[_0x31a495(0x1d5)](_0x10ac8b)&&_0x52a1f3['delete'](_0x10ac8b);}),_0x52a1f3[_0x419791(0x211)]&&(await _0x2dbd40[_0x419791(0x22b)](_0x419791(0x236),{'params':{'userIDs':[..._0x52a1f3]}}))[_0x419791(0x1ed)]['users']['forEach'](_0x192336=>{_0x192336&&_0x17165f['addUser'](_0x192336);});};var _0x339ea1=Object[_0x501570(0x21c)],_0x490248=(_0x45fb86,_0x50bccb,_0x9a5e78,_0x317ce4)=>{const _0x2e9d66=_0x501570;for(var _0x5ccac9=_0x317ce4>0x1?void 0x0:_0x317ce4?_0x339ea1(_0x50bccb,_0x9a5e78):_0x50bccb,_0x32c796=_0x45fb86[_0x2e9d66(0x1f3)]-0x1,_0x4929ae;_0x32c796>=0x0;_0x32c796--)(_0x4929ae=_0x45fb86[_0x32c796])&&(_0x5ccac9=_0x4929ae(_0x5ccac9)||_0x5ccac9);return _0x5ccac9;},_0x3693a7=(_0x188d13,_0x425ab0)=>(_0x2e5ba2,_0xdca2b9)=>_0x425ab0(_0x2e5ba2,_0xdca2b9,_0x188d13);let _0x1158c2=class extends _0x206fc5[_0x501570(0x1f1)]{constructor(_0x510cca,_0x37c92f,_0x1aca70,_0x3c51e3){const _0x2b0e9d=_0x501570;super(),this[_0x2b0e9d(0x23b)]=_0x510cca,this[_0x2b0e9d(0x21b)]=_0x37c92f,this['_userService']=_0x1aca70,this[_0x2b0e9d(0x1e6)]=_0x3c51e3,this[_0x2b0e9d(0x241)](),this[_0x2b0e9d(0x20b)]();}[_0x501570(0x20b)](){const _0x4ffabd=_0x501570;this[_0x4ffabd(0x245)](this[_0x4ffabd(0x21b)][_0x4ffabd(0x1cd)][_0x4ffabd(0x201)](_0x4f8cf8[_0x4ffabd(0x20a)](0x10))[_0x4ffabd(0x205)](_0x426b75=>{const _0x342b64=_0x4ffabd,_0x23d7e7=new Set();_0x426b75[_0x342b64(0x222)](_0x340654=>{const _0x2a6c81=_0x342b64;switch(_0x340654[_0x2a6c81(0x1db)]){case _0x2a6c81(0x1d8):{const _0x4b0b98=_0x340654['payload'][_0x2a6c81(0x232)];_0x23d7e7[_0x2a6c81(0x1d8)](_0x4b0b98);break;}}}),_0xf4c171(this[_0x342b64(0x1e6)],_0x23d7e7);}));}['_init'](){const _0xb50c82=_0x501570;this[_0xb50c82(0x245)](this[_0xb50c82(0x23b)][_0xb50c82(0x1cd)]['subscribe'](async _0x39453e=>{const _0x537a47=_0xb50c82;var _0x1da1af,_0x398b54,_0x228f14,_0x2c6a53;const _0x1d573c=(_0x1da1af=this['_threadCommentModel'][_0x537a47(0x1d6)](_0x39453e[_0x537a47(0x209)])[_0x537a47(0x23f)](_0x4f5aeb=>_0x4f5aeb[_0x537a47(0x1f0)]===_0x39453e[_0x537a47(0x1f0)]))==null?void 0x0:_0x1da1af[_0x537a47(0x1eb)];if(!_0x1d573c)return;const {unitId:_0x5f355e,subUnitId:_0x478c0a}=_0x1d573c;switch(_0x39453e[_0x537a47(0x1c6)]&&this[_0x537a47(0x239)][_0x537a47(0x1e0)](_0x39453e[_0x537a47(0x1c6)]),_0x39453e[_0x537a47(0x1db)]){case _0x5cfb89[_0x537a47(0x22e)]:break;case _0x5cfb89[_0x537a47(0x1ef)]:{this[_0x537a47(0x21b)]['addComment'](_0x5f355e,_0x478c0a,{'unitId':_0x5f355e,'subUnitId':_0x478c0a,'ref':'','id':_0x39453e[_0x537a47(0x1f2)],'dT':_0x2568c8(+_0x39453e[_0x537a47(0x219)]),'threadId':_0x39453e[_0x537a47(0x1f0)],'personId':(_0x228f14=(_0x398b54=_0x39453e['user'])==null?void 0x0:_0x398b54[_0x537a47(0x221)])!=null?_0x228f14:_0x39453e[_0x537a47(0x235)],'text':JSON[_0x537a47(0x23a)](_0x39453e['content']),'parentId':_0x1d573c['id']});break;}case _0x5cfb89[_0x537a47(0x1dd)]:{const _0x2eb408=this[_0x537a47(0x21b)][_0x537a47(0x1dc)](_0x5f355e,_0x478c0a,_0x39453e['replyId']);_0x2eb408&&_0x2eb408['parentId']&&this[_0x537a47(0x21b)][_0x537a47(0x217)](_0x5f355e,_0x478c0a,_0x39453e[_0x537a47(0x1f2)]);break;}case _0x5cfb89[_0x537a47(0x214)]:{this[_0x537a47(0x21b)][_0x537a47(0x1f7)](_0x5f355e,_0x478c0a,{'commentId':_0x39453e[_0x537a47(0x1f2)],'text':JSON['parse'](_0x39453e[_0x537a47(0x20c)])});break;}case _0x5cfb89[_0x537a47(0x225)]:{const _0x3f9fba=(_0x2c6a53=this[_0x537a47(0x21b)][_0x537a47(0x1d6)](_0x39453e['unitId'])['find'](_0x201f8c=>_0x201f8c[_0x537a47(0x1f0)]===_0x39453e[_0x537a47(0x1f0)]))==null?void 0x0:_0x2c6a53[_0x537a47(0x1eb)];_0x3f9fba&&this['_threadCommentModel']['resolveComment'](_0x5f355e,_0x478c0a,_0x3f9fba['id'],_0x39453e['solved']===_0x2a37cd[_0x537a47(0x1de)]);break;}}}));}};_0x1158c2=_0x490248([_0x3693a7(0x0,_0x206fc5[_0x501570(0x240)](_0x32c2f9['CommentService'])),_0x3693a7(0x1,_0x206fc5[_0x501570(0x240)](_0x5aad4a[_0x501570(0x23e)])),_0x3693a7(0x2,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x1e4)])),_0x3693a7(0x3,_0x206fc5['Inject'](_0x206fc5[_0x501570(0x20f)]))],_0x1158c2);const _0xc7f60='thread-comment-data-source.config',_0x5d6dce={};var _0xc1be93=Object[_0x501570(0x21c)],_0x3169df=(_0x61ad2e,_0x529a05,_0xac5a41,_0x5e171e)=>{for(var _0x35243a=_0x5e171e>0x1?void 0x0:_0x5e171e?_0xc1be93(_0x529a05,_0xac5a41):_0x529a05,_0x32c216=_0x61ad2e['length']-0x1,_0x1a29b5;_0x32c216>=0x0;_0x32c216--)(_0x1a29b5=_0x61ad2e[_0x32c216])&&(_0x35243a=_0x1a29b5(_0x35243a)||_0x35243a);return _0x35243a;},_0x5c41c8=(_0x200986,_0x4aebc5)=>(_0x13f5d2,_0x26fca7)=>_0x4aebc5(_0x13f5d2,_0x26fca7,_0x200986);function _0x408a5d(_0x541e75,_0x12b0b9){const _0x341044=_0x501570,_0xfd5f8f=_0x541e75[_0x341044(0x21e)][0x0];return{..._0x12b0b9,'id':_0xfd5f8f[_0x341044(0x1f2)],'resolved':_0x541e75[_0x341044(0x238)]===0x1,'dT':_0x2568c8(_0xfd5f8f[_0x341044(0x219)]),'personId':_0xfd5f8f[_0x341044(0x235)],'threadId':_0xfd5f8f[_0x341044(0x1f0)]};}function _0x441684(_0x123669,_0x32ef4c,_0x12371c){const _0x3dcb95=_0x501570;var _0x2ce2e1,_0x2bcdec;if(((_0x2bcdec=(_0x2ce2e1=_0x123669==null?void 0x0:_0x123669[_0x3dcb95(0x21e)])==null?void 0x0:_0x2ce2e1[_0x3dcb95(0x1f3)])!=null?_0x2bcdec:0x0)>0x0){const _0x17063c=(_0x5138a6,_0xa6c8cb)=>({'id':_0x5138a6[_0x3dcb95(0x1f2)],'threadId':_0x5138a6[_0x3dcb95(0x1f0)],'dT':_0x2568c8(_0x5138a6[_0x3dcb95(0x219)]),'personId':_0x5138a6[_0x3dcb95(0x235)],'resolved':_0x123669[_0x3dcb95(0x238)]===_0x2a37cd['Solved'],'unitId':_0x32ef4c,'subUnitId':_0x12371c,'text':JSON[_0x3dcb95(0x23a)](_0x5138a6[_0x3dcb95(0x20c)]),'parentId':_0xa6c8cb}),_0x155273=_0x17063c(_0x123669['replies'][0x0]);return{..._0x155273,'children':_0x123669[_0x3dcb95(0x21e)]['slice'](0x1)[_0x3dcb95(0x216)](_0x5d3f90=>_0x17063c(_0x5d3f90,_0x155273['id']))};}return null;}let _0xae0cf=class{constructor(_0x529576,_0x2b021a,_0x38bf44,_0x2c8a04){const _0x464f35=_0x501570;this[_0x464f35(0x1f9)]=_0x529576,this[_0x464f35(0x239)]=_0x2b021a,this[_0x464f35(0x1d7)]=_0x38bf44,this[_0x464f35(0x1e6)]=_0x2c8a04;}async[_0x501570(0x1d0)](_0x14ba2e){const _0x3ed51a=_0x501570;var _0x290a3e,_0x938257;const {parentId:_0x26b850,unitId:_0x56ebce,text:_0x30e842,threadId:_0x126bcb}=_0x14ba2e,_0x348dff=(_0x938257=(_0x290a3e=_0x30e842[_0x3ed51a(0x1fa)])==null?void 0x0:_0x290a3e[_0x3ed51a(0x213)](_0x33f58f=>_0x33f58f[_0x3ed51a(0x1d9)]===_0x206fc5[_0x3ed51a(0x1d3)]['COMMENT'])['map'](_0x41d18c=>_0x41d18c['rangeId']))!=null?_0x938257:[],_0x1ff1c8=JSON[_0x3ed51a(0x1cb)](_0x30e842),_0x9f8d8a=(await this[_0x3ed51a(0x1d7)][_0x3ed51a(0x21f)](_0x56ebce))[_0x3ed51a(0x202)]();if(_0x26b850){const _0x52dd08={'memberId':_0x9f8d8a,'unitId':_0x56ebce,'content':_0x1ff1c8,'mention':_0x348dff,'threadId':_0x126bcb},_0x4d7c17=(await this['_httpService'][_0x3ed51a(0x21d)](_0x3ed51a(0x1fe)+_0x56ebce+_0x3ed51a(0x22c),{'body':_0x52dd08}))[_0x3ed51a(0x1ed)][_0x3ed51a(0x228)];return{..._0x14ba2e,'id':_0x4d7c17['replyId'],'dT':_0x206fc5[_0x3ed51a(0x22a)](+_0x4d7c17[_0x3ed51a(0x219)])[_0x3ed51a(0x234)](_0x3ed51a(0x1ce)),'personId':_0x4d7c17[_0x3ed51a(0x235)]};}else{const _0x1403df={'memberId':_0x9f8d8a,'unitId':_0x56ebce,'content':_0x1ff1c8,'mention':_0x348dff},_0x4cf81a=await this['_httpService'][_0x3ed51a(0x21d)](_0x3ed51a(0x1fe)+_0x56ebce+_0x3ed51a(0x22d),{'body':_0x1403df});return _0x408a5d(_0x4cf81a[_0x3ed51a(0x1ed)]['comment'],_0x14ba2e);}}async[_0x501570(0x1f7)](_0x3a8cb6){const _0x481ede=_0x501570;var _0x1f4bc3,_0x1c6ffb;const {text:_0x27ca5f,unitId:_0x1eff1e}=_0x3a8cb6,_0x40563e=(_0x1c6ffb=(_0x1f4bc3=_0x27ca5f[_0x481ede(0x1fa)])==null?void 0x0:_0x1f4bc3[_0x481ede(0x213)](_0x1cfa59=>_0x1cfa59[_0x481ede(0x1d9)]===_0x206fc5['CustomRangeType'][_0x481ede(0x243)])[_0x481ede(0x216)](_0x2e7e8d=>_0x2e7e8d[_0x481ede(0x218)]))!=null?_0x1c6ffb:[],_0x5c44bb=JSON[_0x481ede(0x1cb)](_0x27ca5f),_0x272248=_0x3a8cb6[_0x481ede(0x1f0)],_0x26dac3=_0x3a8cb6['id'],_0x35ba45={'memberId':(await this[_0x481ede(0x1d7)][_0x481ede(0x21f)](_0x1eff1e))['getMemberID'](),'unitId':_0x1eff1e,'threadId':_0x272248,'mention':_0x40563e,'content':_0x5c44bb,'replyId':_0x26dac3},_0x4570e3=await this[_0x481ede(0x1f9)]['post'](_0x481ede(0x1fe)+_0x1eff1e+_0x481ede(0x1da),{'body':_0x35ba45});return!_0x4570e3[_0x481ede(0x1ed)][_0x481ede(0x1c9)]||_0x4570e3['body']['error'][_0x481ede(0x1f5)]===0x1;}async['resolveComment'](_0x2e5a75){const _0x5be4da=_0x501570,{unitId:_0x323c26}=_0x2e5a75,_0x580042=_0x2e5a75[_0x5be4da(0x1f0)],_0x4d54be={'memberId':this[_0x5be4da(0x239)]['getCurrentUser']()['userID'],'unitId':_0x323c26,'threadId':_0x580042,'solved':_0x2e5a75[_0x5be4da(0x200)]?_0x2a37cd['Solved']:_0x2a37cd[_0x5be4da(0x227)]},_0x519ef6=await this[_0x5be4da(0x1f9)][_0x5be4da(0x21d)](_0x5be4da(0x1fe)+_0x323c26+'/solved',{'body':_0x4d54be});return!_0x519ef6['body'][_0x5be4da(0x1c9)]||_0x519ef6['body'][_0x5be4da(0x1c9)]['code']===0x1;}async['deleteComment'](_0x292cb8,_0x34d7ed,_0x1340d0,_0x908b56){const _0x46cac7=_0x501570,_0x167e90={'memberId':(await this['_sessionService'][_0x46cac7(0x21f)](_0x292cb8))[_0x46cac7(0x202)](),'threadId':_0x1340d0,'replyId':_0x908b56,'unitId':_0x292cb8},_0x3116fe=await this[_0x46cac7(0x1f9)]['post']('/universer-api/comment/unit/'+_0x292cb8+_0x46cac7(0x233),{'body':_0x167e90});return!_0x3116fe[_0x46cac7(0x1ed)][_0x46cac7(0x1c9)]||_0x3116fe[_0x46cac7(0x1ed)][_0x46cac7(0x1c9)][_0x46cac7(0x1f5)]===0x1;}async['listComments'](_0x2df413,_0x5167cf,_0x154168){const _0x8d6a78=_0x501570,_0x26c88b={'unitId':_0x2df413,'threadId':_0x154168},_0x138c14=await this['_httpService'][_0x8d6a78(0x21d)](_0x8d6a78(0x1fe)+_0x2df413+'/list',{'body':_0x26c88b}),_0x162289=_0x154168[_0x8d6a78(0x216)](_0x1fbee3=>_0x441684(_0x138c14[_0x8d6a78(0x1ed)]['comments'][_0x1fbee3],_0x2df413,_0x5167cf))[_0x8d6a78(0x213)](Boolean);return Object[_0x8d6a78(0x246)](_0x138c14[_0x8d6a78(0x1ed)][_0x8d6a78(0x1e3)])[_0x8d6a78(0x222)](_0x297d4e=>{const _0x6cb67=_0x8d6a78;this['_userService'][_0x6cb67(0x1e0)](_0x297d4e);}),_0x162289;}['saveCommentToSnapshot'](_0xaef788){const _0x400d27=_0x501570;return{'id':_0xaef788['id'],'threadId':_0xaef788[_0x400d27(0x1f0)],'ref':_0xaef788[_0x400d27(0x1cf)]};}};_0xae0cf=_0x3169df([_0x5c41c8(0x0,_0x206fc5[_0x501570(0x240)](_0x2a30c3[_0x501570(0x1e8)])),_0x5c41c8(0x1,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x1e4)])),_0x5c41c8(0x2,_0x206fc5[_0x501570(0x240)](_0x32c2f9[_0x501570(0x1e9)])),_0x5c41c8(0x3,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x20f)]))],_0xae0cf);var _0x5b6b1f=Object['getOwnPropertyDescriptor'],_0x562505=(_0x26e933,_0x34ef92,_0x435ab4,_0x53e132)=>{const _0x4bb49a=_0x501570;for(var _0x4ab4ca=_0x53e132>0x1?void 0x0:_0x53e132?_0x5b6b1f(_0x34ef92,_0x435ab4):_0x34ef92,_0x2fbe88=_0x26e933[_0x4bb49a(0x1f3)]-0x1,_0x48d349;_0x2fbe88>=0x0;_0x2fbe88--)(_0x48d349=_0x26e933[_0x2fbe88])&&(_0x4ab4ca=_0x48d349(_0x4ab4ca)||_0x4ab4ca);return _0x4ab4ca;},_0x4b1c23=(_0x4f1852,_0x533385)=>(_0x58b5dc,_0x5f36df)=>_0x533385(_0x58b5dc,_0x5f36df,_0x4f1852);let _0xa301a0=class extends _0x206fc5['Disposable']{constructor(_0x26ccda,_0x10626c){const _0x2e35f5=_0x501570;super(),this['_threadCommentDataSourceService']=_0x26ccda,this[_0x2e35f5(0x231)]=_0x10626c,this[_0x2e35f5(0x1df)]();}['_initDataSource'](){const _0x53463e=_0x501570;this[_0x53463e(0x210)][_0x53463e(0x208)]=this[_0x53463e(0x231)],this[_0x53463e(0x210)][_0x53463e(0x1f6)]=!0x1;}};_0xa301a0=_0x562505([_0x4b1c23(0x0,_0x5aad4a['IThreadCommentDataSourceService']),_0x4b1c23(0x1,_0x206fc5[_0x501570(0x240)](_0xae0cf))],_0xa301a0);var _0x52eb31=Object['defineProperty'],_0x47e13c=Object[_0x501570(0x21c)],_0x3c31c3=(_0x535a42,_0xf50228,_0x1bcbff)=>_0xf50228 in _0x535a42?_0x52eb31(_0x535a42,_0xf50228,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bcbff}):_0x535a42[_0xf50228]=_0x1bcbff,_0x3fc96b=(_0x3b0da6,_0x2862d0,_0x238a46,_0x38c1ef)=>{for(var _0x2aa055=_0x38c1ef>0x1?void 0x0:_0x38c1ef?_0x47e13c(_0x2862d0,_0x238a46):_0x2862d0,_0x4aa9a4=_0x3b0da6['length']-0x1,_0x21d09c;_0x4aa9a4>=0x0;_0x4aa9a4--)(_0x21d09c=_0x3b0da6[_0x4aa9a4])&&(_0x2aa055=_0x21d09c(_0x2aa055)||_0x2aa055);return _0x2aa055;},_0x58a248=(_0x283406,_0x1dd9a3)=>(_0xe3795a,_0xc26a6)=>_0x1dd9a3(_0xe3795a,_0xc26a6,_0x283406),_0x128f1c=(_0x1c7933,_0x311271,_0x4f981f)=>_0x3c31c3(_0x1c7933,typeof _0x311271!='symbol'?_0x311271+'':_0x311271,_0x4f981f);_0x2a78b6[_0x501570(0x212)]=class extends _0x206fc5[_0x501570(0x220)]{constructor(_0x6ad92b=_0x5d6dce,_0x43aabd,_0x25abe7){const _0x1d392a=_0x501570;super(),this[_0x1d392a(0x1cc)]=_0x6ad92b,this['_injector']=_0x43aabd,this['_configService']=_0x25abe7;const {..._0x1b4d3f}=_0x206fc5['merge']({},_0x5d6dce,this[_0x1d392a(0x1cc)]);this[_0x1d392a(0x1ee)][_0x1d392a(0x1f8)](_0xc7f60,_0x1b4d3f);}[_0x501570(0x1ea)](){const _0x2c7493=_0x501570;[[_0xae0cf],[_0xa301a0],[_0x1158c2]][_0x2c7493(0x222)](_0x294e69=>{const _0x3f05ea=_0x2c7493;this['_injector'][_0x3f05ea(0x1d8)](_0x294e69);});}[_0x501570(0x230)](){const _0x430bd9=_0x501570;this['_injector']['get'](_0xa301a0),this[_0x430bd9(0x1e6)][_0x430bd9(0x22b)](_0x1158c2);}},_0x128f1c(_0x2a78b6[_0x501570(0x212)],_0x501570(0x1ca),_0x206c54),_0x128f1c(_0x2a78b6['UniverThreadCommentDataSourcePlugin'],_0x501570(0x1db),_0x206fc5[_0x501570(0x242)][_0x501570(0x1c8)]),_0x2a78b6[_0x501570(0x212)]=_0x3fc96b([_0x206fc5[_0x501570(0x224)](_0x1cd1db['UniverThreadCommentUIPlugin'],_0x32c2f9[_0x501570(0x244)],_0x3978b6[_0x501570(0x1ec)]),_0x58a248(0x1,_0x206fc5['Inject'](_0x206fc5[_0x501570(0x20f)])),_0x58a248(0x2,_0x206fc5[_0x501570(0x21a)])],_0x2a78b6[_0x501570(0x212)]),Object['defineProperty'](_0x2a78b6,Symbol[_0x501570(0x226)],{'value':_0x501570(0x203)});}));function _0x41de(_0x27d1ea,_0x45d9b8){const _0x163271=_0x1632();return _0x41de=function(_0x41deee,_0x3d79c5){_0x41deee=_0x41deee-0x1c6;let _0x167a62=_0x163271[_0x41deee];return _0x167a62;},_0x41de(_0x27d1ea,_0x45d9b8);}function _0x1632(){const _0x5032e4=['ref','addComment','UniverProCollaborationClient','195KbkyBj','CustomRangeType','2611696JeAqEV','getUser','getUnit','_sessionService','add','rangeType','/edit','type','getComment','Delete','Solved','_initDataSource','addUser','rxjs','UNRECOGNIZED','users','UserManagerService','@univerjs/thread-comment-ui','_injector','110682rZjvHp','HTTPService','CollaborationSessionService','onStarting','root','UniverLicensePlugin','body','_configService','Reply','threadId','Disposable','replyId','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','syncUpdateMutationToColla','updateComment','setConfig','_httpService','customRanges','@univerjs/thread-comment','@univerjs/network','2250367iDmaao','/universer-api/comment/unit/','@univerjs/core','resolved','pipe','getMemberID','Module','1303740JeOnPA','subscribe','6SmhGMu','Unknown','dataSource','unitId','bufferTime','_initUserSync','content','553684DzduMJ','object','Injector','_threadCommentDataSourceService','size','UniverThreadCommentDataSourcePlugin','filter','Edit','UniverCore','map','deleteComment','rangeId','createTimestamp','IConfigService','_threadCommentModel','getOwnPropertyDescriptor','post','replies','requireSession','Plugin','userID','forEach','@univerjs-pro/collaboration-client','DependentOn','Solve','toStringTag','OpenOrReOpen','reply','130QeZfui','dayjs','get','/reply','/add','Add','UniverThreadCommentUi','onReady','_threadCommentDataSource','personId','/delete','format','userId','/universer-api/user/list','261438kmZbYz','solved','_userService','parse','_commentService','@univerjs-pro/license','10924eaoPSf','ThreadCommentModel','find','Inject','_init','UniverInstanceType','COMMENT','UniverCollaborationClientPlugin','disposeWithMe','values','user','1RDXGze','UNIVER_UNKNOWN','error','pluginName','stringify','_config','commentUpdate$','YYYY/MM/DD\x20HH:mm'];_0x1632=function(){return _0x5032e4;};return _0x1632();}
1
+ function _0xdedf(_0x5eac38,_0x36a05c){const _0x35b1e5=_0x35b1();return _0xdedf=function(_0xdedf39,_0x43ef10){_0xdedf39=_0xdedf39-0x96;let _0x585f30=_0x35b1e5[_0xdedf39];return _0x585f30;},_0xdedf(_0x5eac38,_0x36a05c);}function _0x35b1(){const _0x1c59b3=['@univerjs/thread-comment','saveCommentToSnapshot','rangeType','dataSource','code','3896778VFqKOq','delete','577176ihjbHv','customRanges','symbol','/universer-api/comment/unit/','reply','error','_userService','type','defineProperty','9sUEfZV','userId','_configService','payload','/solved','Edit','unitId','updateComment','_threadCommentModel','bufferTime','getMemberID','getComment','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','post','UNRECOGNIZED','merge','UniverProThreadCommentDatasource','UniverCore','UniverThreadComment','rangeId','583OVqDGa','listComments','CollaborationSessionService','setConfig','_init','Inject','resolved','subscribe','102xImWAX','Unknown','@univerjs-pro/collaboration-client','HTTPService','users','solved','get','/add','/edit','/reply','UniverThreadCommentUi','_sessionService','Add','_httpService','UniverThreadCommentDataSourcePlugin','Solved','UserManagerService','parentId','IThreadCommentDataSourceService','Delete','user','COMMENT','createTimestamp','content','_commentService','replyId','@univerjs/thread-comment-ui','_initUserSync','CommentService','DependentOn','Disposable','root','@univerjs/network','Module','addComment','_config','requireSession','object','filter','UniverCollaborationClientPlugin','commentUpdate$','format','UniverNetwork','_threadCommentDataSource','UNIVER_UNKNOWN','replies','threadId','2729030xTGhqX','find','slice','CustomRangeType','userID','pluginName','@univerjs-pro/license','pipe','toStringTag','values','parse','UniverProCollaborationClient','length','IConfigService','_initDataSource','30632VXSyjA','onReady','map','add','3679155roDPcP','_threadCommentDataSourceService','dayjs','/list','getOwnPropertyDescriptor','245ONCqvH','_injector','syncUpdateMutationToColla','ref','body','@univerjs/core','forEach','Solve','OpenOrReOpen','size','resolveComment','Injector','Reply','UniverLicensePlugin','deleteComment','disposeWithMe','/delete','2065851dYGXBn','ThreadCommentModel','getCurrentUser','YYYY/MM/DD\x20HH:mm','rxjs'];_0x35b1=function(){return _0x1c59b3;};return _0x35b1();}(function(_0x1fcdec,_0x25a109){const _0x215da5=_0xdedf,_0x4dc1c9=_0x1fcdec();while(!![]){try{const _0x1b5883=-parseInt(_0x215da5(0xfa))/0x1*(-parseInt(_0x215da5(0x102))/0x2)+parseInt(_0x215da5(0xcf))/0x3+parseInt(_0x215da5(0xdb))/0x4+-parseInt(_0x215da5(0xb9))/0x5+parseInt(_0x215da5(0xd9))/0x6+-parseInt(_0x215da5(0xbe))/0x7*(parseInt(_0x215da5(0xb5))/0x8)+-parseInt(_0x215da5(0xe4))/0x9*(parseInt(_0x215da5(0xa6))/0xa);if(_0x1b5883===_0x25a109)break;else _0x4dc1c9['push'](_0x4dc1c9['shift']());}catch(_0x538d2f){_0x4dc1c9['push'](_0x4dc1c9['shift']());}}}(_0x35b1,0x5a2ce),function(_0x130f0a,_0x31c252){const _0x7b0821=_0xdedf;typeof exports==_0x7b0821(0x9c)&&typeof module<'u'?_0x31c252(exports,require('@univerjs-pro/collaboration-client'),require(_0x7b0821(0xac)),require('@univerjs/core'),require(_0x7b0821(0x11c)),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define(['exports',_0x7b0821(0x104),_0x7b0821(0xac),_0x7b0821(0xc3),_0x7b0821(0x11c),_0x7b0821(0xd4),_0x7b0821(0xd3),_0x7b0821(0x97)],_0x31c252):(_0x130f0a=typeof globalThis<'u'?globalThis:_0x130f0a||self,_0x31c252(_0x130f0a[_0x7b0821(0xf6)]={},_0x130f0a[_0x7b0821(0xb1)],_0x130f0a['UniverProLicense'],_0x130f0a[_0x7b0821(0xf7)],_0x130f0a[_0x7b0821(0x10c)],_0x130f0a[_0x7b0821(0xf8)],_0x130f0a[_0x7b0821(0xd3)],_0x130f0a[_0x7b0821(0xa1)]));}(this,function(_0xe7a965,_0x407f01,_0x5072f6,_0xbd05f8,_0x1ac5f6,_0x59f909,_0x54cea7,_0x3135c3){'use strict';const _0x36bdb4=_0xdedf;const _0x28f2f3=_0x36bdb4(0xf1);var _0x93f907=(_0x15fafa=>(_0x15fafa[_0x15fafa['OpenOrReOpen']=0x0]=_0x36bdb4(0xc6),_0x15fafa[_0x15fafa[_0x36bdb4(0x111)]=0x1]=_0x36bdb4(0x111),_0x15fafa[_0x15fafa[_0x36bdb4(0xf4)]=-0x1]=_0x36bdb4(0xf4),_0x15fafa))(_0x93f907||{}),_0x33684b=(_0x26ad28=>(_0x26ad28[_0x26ad28[_0x36bdb4(0x103)]=0x0]=_0x36bdb4(0x103),_0x26ad28[_0x26ad28['Add']=0x1]='Add',_0x26ad28[_0x26ad28['Reply']=0x2]=_0x36bdb4(0xca),_0x26ad28[_0x26ad28['Edit']=0x3]='Edit',_0x26ad28[_0x26ad28[_0x36bdb4(0x115)]=0x4]='Delete',_0x26ad28[_0x26ad28['Solve']=0x5]=_0x36bdb4(0xc5),_0x26ad28[_0x26ad28[_0x36bdb4(0xf4)]=-0x1]=_0x36bdb4(0xf4),_0x26ad28))(_0x33684b||{});const _0xaa989c=_0x1b369d=>_0xbd05f8[_0x36bdb4(0xbb)](new Date(+_0x1b369d))[_0x36bdb4(0xa0)](_0x36bdb4(0xd2)),_0x363409=async(_0x517802,_0xa12775)=>{const _0x4b8a0f=_0x36bdb4,_0x6947f7=_0x517802[_0x4b8a0f(0x108)](_0xbd05f8[_0x4b8a0f(0x112)]),_0x5062d9=_0x517802[_0x4b8a0f(0x108)](_0x3135c3[_0x4b8a0f(0x105)]);_0xa12775['forEach'](_0x20bf2f=>{const _0x383c04=_0x4b8a0f;_0x6947f7['getUser'](_0x20bf2f)&&_0xa12775[_0x383c04(0xda)](_0x20bf2f);}),_0xa12775[_0x4b8a0f(0xc7)]&&(await _0x5062d9[_0x4b8a0f(0x108)]('/universer-api/user/list',{'params':{'userIDs':[..._0xa12775]}}))[_0x4b8a0f(0xc2)][_0x4b8a0f(0x106)]['forEach'](_0x488662=>{_0x488662&&_0x6947f7['addUser'](_0x488662);});};var _0x4d0d43=Object[_0x36bdb4(0xbd)],_0x1ed92e=(_0x1afb12,_0x511430,_0x782b99,_0x23dfa8)=>{const _0x3cd1c0=_0x36bdb4;for(var _0x549a01=_0x23dfa8>0x1?void 0x0:_0x23dfa8?_0x4d0d43(_0x511430,_0x782b99):_0x511430,_0x592c0d=_0x1afb12[_0x3cd1c0(0xb2)]-0x1,_0xd846e3;_0x592c0d>=0x0;_0x592c0d--)(_0xd846e3=_0x1afb12[_0x592c0d])&&(_0x549a01=_0xd846e3(_0x549a01)||_0x549a01);return _0x549a01;},_0x5a0932=(_0x20ea44,_0x245642)=>(_0x4b2b41,_0x305a3e)=>_0x245642(_0x4b2b41,_0x305a3e,_0x20ea44);let _0x37f8d1=class extends _0xbd05f8[_0x36bdb4(0x120)]{constructor(_0x3aad37,_0x524c7d,_0x2d1166,_0x491d87){const _0x4ffc4d=_0x36bdb4;super(),this[_0x4ffc4d(0x11a)]=_0x3aad37,this[_0x4ffc4d(0xec)]=_0x524c7d,this[_0x4ffc4d(0xe1)]=_0x2d1166,this[_0x4ffc4d(0xbf)]=_0x491d87,this['_init'](),this['_initUserSync']();}[_0x36bdb4(0x11d)](){const _0x54dedd=_0x36bdb4;this[_0x54dedd(0xcd)](this[_0x54dedd(0xec)][_0x54dedd(0x9f)][_0x54dedd(0xad)](_0x54cea7[_0x54dedd(0xed)](0x10))[_0x54dedd(0x101)](_0x38992d=>{const _0x1fddc1=_0x54dedd,_0x2d3351=new Set();_0x38992d[_0x1fddc1(0xc4)](_0x57162a=>{const _0xa12b75=_0x1fddc1;switch(_0x57162a[_0xa12b75(0xe2)]){case _0xa12b75(0xb8):{const _0x3131ee=_0x57162a[_0xa12b75(0xe7)]['personId'];_0x2d3351[_0xa12b75(0xb8)](_0x3131ee);break;}}}),_0x363409(this[_0x1fddc1(0xbf)],_0x2d3351);}));}[_0x36bdb4(0xfe)](){const _0x3efa24=_0x36bdb4;this[_0x3efa24(0xcd)](this[_0x3efa24(0x11a)]['commentUpdate$']['subscribe'](async _0x2f4122=>{const _0x5f4cfb=_0x3efa24;var _0x404f73,_0x249e77,_0x5edd00,_0x193131;const _0x410bee=(_0x404f73=this[_0x5f4cfb(0xec)][_0x5f4cfb(0xf2)](_0x2f4122[_0x5f4cfb(0xea)])['find'](_0x1c73f1=>_0x1c73f1[_0x5f4cfb(0xa5)]===_0x2f4122[_0x5f4cfb(0xa5)]))==null?void 0x0:_0x404f73[_0x5f4cfb(0x96)];if(!_0x410bee)return;const {unitId:_0x57df3c,subUnitId:_0x24daae}=_0x410bee;switch(_0x2f4122[_0x5f4cfb(0x116)]&&this['_userService']['addUser'](_0x2f4122[_0x5f4cfb(0x116)]),_0x2f4122['type']){case _0x33684b[_0x5f4cfb(0x10e)]:break;case _0x33684b[_0x5f4cfb(0xca)]:{this[_0x5f4cfb(0xec)]['addComment'](_0x57df3c,_0x24daae,{'unitId':_0x57df3c,'subUnitId':_0x24daae,'ref':'','id':_0x2f4122[_0x5f4cfb(0x11b)],'dT':_0xaa989c(+_0x2f4122['createTimestamp']),'threadId':_0x2f4122[_0x5f4cfb(0xa5)],'personId':(_0x5edd00=(_0x249e77=_0x2f4122[_0x5f4cfb(0x116)])==null?void 0x0:_0x249e77[_0x5f4cfb(0xaa)])!=null?_0x5edd00:_0x2f4122[_0x5f4cfb(0xe5)],'text':JSON[_0x5f4cfb(0xb0)](_0x2f4122['content']),'parentId':_0x410bee['id']});break;}case _0x33684b[_0x5f4cfb(0x115)]:{const _0x26b12a=this[_0x5f4cfb(0xec)][_0x5f4cfb(0xef)](_0x57df3c,_0x24daae,_0x2f4122[_0x5f4cfb(0x11b)]);_0x26b12a&&_0x26b12a[_0x5f4cfb(0x113)]&&this[_0x5f4cfb(0xec)][_0x5f4cfb(0xcc)](_0x57df3c,_0x24daae,_0x2f4122[_0x5f4cfb(0x11b)]);break;}case _0x33684b[_0x5f4cfb(0xe9)]:{this[_0x5f4cfb(0xec)][_0x5f4cfb(0xeb)](_0x57df3c,_0x24daae,{'commentId':_0x2f4122[_0x5f4cfb(0x11b)],'text':JSON[_0x5f4cfb(0xb0)](_0x2f4122[_0x5f4cfb(0x119)])});break;}case _0x33684b[_0x5f4cfb(0xc5)]:{const _0x389de4=(_0x193131=this['_threadCommentModel'][_0x5f4cfb(0xf2)](_0x2f4122[_0x5f4cfb(0xea)])[_0x5f4cfb(0xa7)](_0x509f2f=>_0x509f2f[_0x5f4cfb(0xa5)]===_0x2f4122['threadId']))==null?void 0x0:_0x193131[_0x5f4cfb(0x96)];_0x389de4&&this[_0x5f4cfb(0xec)][_0x5f4cfb(0xc8)](_0x57df3c,_0x24daae,_0x389de4['id'],_0x2f4122[_0x5f4cfb(0x107)]===_0x93f907[_0x5f4cfb(0x111)]);break;}}}));}};_0x37f8d1=_0x1ed92e([_0x5a0932(0x0,_0xbd05f8[_0x36bdb4(0xff)](_0x407f01[_0x36bdb4(0x11e)])),_0x5a0932(0x1,_0xbd05f8[_0x36bdb4(0xff)](_0x59f909[_0x36bdb4(0xd0)])),_0x5a0932(0x2,_0xbd05f8[_0x36bdb4(0xff)](_0xbd05f8[_0x36bdb4(0x112)])),_0x5a0932(0x3,_0xbd05f8[_0x36bdb4(0xff)](_0xbd05f8[_0x36bdb4(0xc9)]))],_0x37f8d1);const _0x515e83='thread-comment-data-source.config',_0x4f5c33={};var _0x165d19=Object[_0x36bdb4(0xbd)],_0x57a5ea=(_0x3a0974,_0x2276f2,_0xe9b9f,_0xd4e229)=>{for(var _0x55f5df=_0xd4e229>0x1?void 0x0:_0xd4e229?_0x165d19(_0x2276f2,_0xe9b9f):_0x2276f2,_0x400203=_0x3a0974['length']-0x1,_0x18cb2e;_0x400203>=0x0;_0x400203--)(_0x18cb2e=_0x3a0974[_0x400203])&&(_0x55f5df=_0x18cb2e(_0x55f5df)||_0x55f5df);return _0x55f5df;},_0x1c3a29=(_0x28f446,_0x47198d)=>(_0x4a25a2,_0x2401cc)=>_0x47198d(_0x4a25a2,_0x2401cc,_0x28f446);function _0x47e74e(_0x22f1bf,_0x5bc025){const _0x220518=_0x36bdb4,_0x588b56=_0x22f1bf[_0x220518(0xa4)][0x0];return{..._0x5bc025,'id':_0x588b56[_0x220518(0x11b)],'resolved':_0x22f1bf[_0x220518(0x107)]===0x1,'dT':_0xaa989c(_0x588b56[_0x220518(0x118)]),'personId':_0x588b56[_0x220518(0xe5)],'threadId':_0x588b56[_0x220518(0xa5)]};}function _0xafa1d9(_0x2d6139,_0x437e9c,_0x46439d){const _0x4b80fc=_0x36bdb4;var _0x4f8c66,_0x14e300;if(((_0x14e300=(_0x4f8c66=_0x2d6139==null?void 0x0:_0x2d6139[_0x4b80fc(0xa4)])==null?void 0x0:_0x4f8c66['length'])!=null?_0x14e300:0x0)>0x0){const _0x4fc9a7=(_0x479198,_0x4f483d)=>({'id':_0x479198[_0x4b80fc(0x11b)],'threadId':_0x479198['threadId'],'dT':_0xaa989c(_0x479198[_0x4b80fc(0x118)]),'personId':_0x479198['userId'],'resolved':_0x2d6139[_0x4b80fc(0x107)]===_0x93f907[_0x4b80fc(0x111)],'unitId':_0x437e9c,'subUnitId':_0x46439d,'text':JSON[_0x4b80fc(0xb0)](_0x479198[_0x4b80fc(0x119)]),'parentId':_0x4f483d}),_0x29bd31=_0x4fc9a7(_0x2d6139[_0x4b80fc(0xa4)][0x0]);return{..._0x29bd31,'children':_0x2d6139[_0x4b80fc(0xa4)][_0x4b80fc(0xa8)](0x1)['map'](_0x3c6f12=>_0x4fc9a7(_0x3c6f12,_0x29bd31['id']))};}return null;}let _0x42728a=class{constructor(_0x3ddcee,_0x499992,_0x3db81b,_0x4fd7f5){const _0x5472a5=_0x36bdb4;this['_httpService']=_0x3ddcee,this[_0x5472a5(0xe1)]=_0x499992,this[_0x5472a5(0x10d)]=_0x3db81b,this[_0x5472a5(0xbf)]=_0x4fd7f5;}async[_0x36bdb4(0x99)](_0x3113e7){const _0x35368a=_0x36bdb4;var _0x1297f0,_0x406a00;const {parentId:_0x618283,unitId:_0x2528d7,text:_0x56bd63,threadId:_0x1ea206}=_0x3113e7,_0xf0d720=(_0x406a00=(_0x1297f0=_0x56bd63[_0x35368a(0xdc)])==null?void 0x0:_0x1297f0['filter'](_0x58973e=>_0x58973e[_0x35368a(0xd6)]===_0xbd05f8[_0x35368a(0xa9)][_0x35368a(0x117)])[_0x35368a(0xb7)](_0x1dbc12=>_0x1dbc12['rangeId']))!=null?_0x406a00:[],_0x1ca5d9=JSON[_0x35368a(0xf0)](_0x56bd63),_0x895689=(await this[_0x35368a(0x10d)][_0x35368a(0x9b)](_0x2528d7))[_0x35368a(0xee)]();if(_0x618283){const _0x3e9909={'memberId':_0x895689,'unitId':_0x2528d7,'content':_0x1ca5d9,'mention':_0xf0d720,'threadId':_0x1ea206},_0x1b78ba=(await this[_0x35368a(0x10f)][_0x35368a(0xf3)]('/universer-api/comment/unit/'+_0x2528d7+_0x35368a(0x10b),{'body':_0x3e9909}))[_0x35368a(0xc2)][_0x35368a(0xdf)];return{..._0x3113e7,'id':_0x1b78ba[_0x35368a(0x11b)],'dT':_0xbd05f8[_0x35368a(0xbb)](+_0x1b78ba[_0x35368a(0x118)])[_0x35368a(0xa0)](_0x35368a(0xd2)),'personId':_0x1b78ba['userId']};}else{const _0x317564={'memberId':_0x895689,'unitId':_0x2528d7,'content':_0x1ca5d9,'mention':_0xf0d720},_0x2f0cdd=await this[_0x35368a(0x10f)]['post']('/universer-api/comment/unit/'+_0x2528d7+_0x35368a(0x109),{'body':_0x317564});return _0x47e74e(_0x2f0cdd[_0x35368a(0xc2)]['comment'],_0x3113e7);}}async[_0x36bdb4(0xeb)](_0x33a838){const _0x406911=_0x36bdb4;var _0x416b79,_0xb6ad0;const {text:_0x1e4aa8,unitId:_0x42a141}=_0x33a838,_0x46fbba=(_0xb6ad0=(_0x416b79=_0x1e4aa8['customRanges'])==null?void 0x0:_0x416b79['filter'](_0xd6f102=>_0xd6f102['rangeType']===_0xbd05f8['CustomRangeType']['COMMENT'])['map'](_0x567f3c=>_0x567f3c[_0x406911(0xf9)]))!=null?_0xb6ad0:[],_0x4f26a5=JSON[_0x406911(0xf0)](_0x1e4aa8),_0x15f688=_0x33a838[_0x406911(0xa5)],_0x46e63f=_0x33a838['id'],_0x4a8e48={'memberId':(await this[_0x406911(0x10d)][_0x406911(0x9b)](_0x42a141))[_0x406911(0xee)](),'unitId':_0x42a141,'threadId':_0x15f688,'mention':_0x46fbba,'content':_0x4f26a5,'replyId':_0x46e63f},_0x1efdfd=await this[_0x406911(0x10f)]['post']('/universer-api/comment/unit/'+_0x42a141+_0x406911(0x10a),{'body':_0x4a8e48});return!_0x1efdfd[_0x406911(0xc2)][_0x406911(0xe0)]||_0x1efdfd['body']['error']['code']===0x1;}async[_0x36bdb4(0xc8)](_0x4ce421){const _0x1c8b23=_0x36bdb4,{unitId:_0x2071f3}=_0x4ce421,_0x106a61=_0x4ce421[_0x1c8b23(0xa5)],_0x13ac17={'memberId':this[_0x1c8b23(0xe1)][_0x1c8b23(0xd1)]()[_0x1c8b23(0xaa)],'unitId':_0x2071f3,'threadId':_0x106a61,'solved':_0x4ce421[_0x1c8b23(0x100)]?_0x93f907[_0x1c8b23(0x111)]:_0x93f907[_0x1c8b23(0xc6)]},_0x1f90a1=await this[_0x1c8b23(0x10f)][_0x1c8b23(0xf3)](_0x1c8b23(0xde)+_0x2071f3+_0x1c8b23(0xe8),{'body':_0x13ac17});return!_0x1f90a1[_0x1c8b23(0xc2)]['error']||_0x1f90a1[_0x1c8b23(0xc2)]['error'][_0x1c8b23(0xd8)]===0x1;}async[_0x36bdb4(0xcc)](_0x4da98d,_0x4f955a,_0x4554b0,_0x564bd1){const _0x199e60=_0x36bdb4,_0x3324a9={'memberId':(await this[_0x199e60(0x10d)]['requireSession'](_0x4da98d))['getMemberID'](),'threadId':_0x4554b0,'replyId':_0x564bd1,'unitId':_0x4da98d},_0x3209f0=await this[_0x199e60(0x10f)][_0x199e60(0xf3)](_0x199e60(0xde)+_0x4da98d+_0x199e60(0xce),{'body':_0x3324a9});return!_0x3209f0[_0x199e60(0xc2)][_0x199e60(0xe0)]||_0x3209f0[_0x199e60(0xc2)][_0x199e60(0xe0)][_0x199e60(0xd8)]===0x1;}async[_0x36bdb4(0xfb)](_0xc92601,_0x19bd67,_0x3c08fb){const _0x4a0af8=_0x36bdb4,_0x187ac4={'unitId':_0xc92601,'threadId':_0x3c08fb},_0xaa0bc3=await this['_httpService'][_0x4a0af8(0xf3)](_0x4a0af8(0xde)+_0xc92601+_0x4a0af8(0xbc),{'body':_0x187ac4}),_0x5815f8=_0x3c08fb[_0x4a0af8(0xb7)](_0x357a2f=>_0xafa1d9(_0xaa0bc3[_0x4a0af8(0xc2)]['comments'][_0x357a2f],_0xc92601,_0x19bd67))[_0x4a0af8(0x9d)](Boolean);return Object[_0x4a0af8(0xaf)](_0xaa0bc3[_0x4a0af8(0xc2)]['users'])[_0x4a0af8(0xc4)](_0x7d9724=>{const _0x1926ec=_0x4a0af8;this[_0x1926ec(0xe1)]['addUser'](_0x7d9724);}),_0x5815f8;}[_0x36bdb4(0xd5)](_0x4b0b3d){const _0x51859e=_0x36bdb4;return{'id':_0x4b0b3d['id'],'threadId':_0x4b0b3d[_0x51859e(0xa5)],'ref':_0x4b0b3d[_0x51859e(0xc1)]};}};_0x42728a=_0x57a5ea([_0x1c3a29(0x0,_0xbd05f8['Inject'](_0x3135c3[_0x36bdb4(0x105)])),_0x1c3a29(0x1,_0xbd05f8[_0x36bdb4(0xff)](_0xbd05f8[_0x36bdb4(0x112)])),_0x1c3a29(0x2,_0xbd05f8[_0x36bdb4(0xff)](_0x407f01[_0x36bdb4(0xfc)])),_0x1c3a29(0x3,_0xbd05f8[_0x36bdb4(0xff)](_0xbd05f8['Injector']))],_0x42728a);var _0x473337=Object[_0x36bdb4(0xbd)],_0x4cc1a3=(_0x2a0d0b,_0xe91a3c,_0x96cfaf,_0x22f6cb)=>{const _0x33453d=_0x36bdb4;for(var _0x5bcfaa=_0x22f6cb>0x1?void 0x0:_0x22f6cb?_0x473337(_0xe91a3c,_0x96cfaf):_0xe91a3c,_0x2fcade=_0x2a0d0b[_0x33453d(0xb2)]-0x1,_0xbc1b71;_0x2fcade>=0x0;_0x2fcade--)(_0xbc1b71=_0x2a0d0b[_0x2fcade])&&(_0x5bcfaa=_0xbc1b71(_0x5bcfaa)||_0x5bcfaa);return _0x5bcfaa;},_0x3d3cad=(_0x100cb8,_0x24adbd)=>(_0x595a27,_0xa2688a)=>_0x24adbd(_0x595a27,_0xa2688a,_0x100cb8);let _0x18a410=class extends _0xbd05f8[_0x36bdb4(0x120)]{constructor(_0xc59ae6,_0xabab52){super(),this['_threadCommentDataSourceService']=_0xc59ae6,this['_threadCommentDataSource']=_0xabab52,this['_initDataSource']();}[_0x36bdb4(0xb4)](){const _0x52b973=_0x36bdb4;this[_0x52b973(0xba)][_0x52b973(0xd7)]=this[_0x52b973(0xa2)],this[_0x52b973(0xba)][_0x52b973(0xc0)]=!0x1;}};_0x18a410=_0x4cc1a3([_0x3d3cad(0x0,_0x59f909[_0x36bdb4(0x114)]),_0x3d3cad(0x1,_0xbd05f8[_0x36bdb4(0xff)](_0x42728a))],_0x18a410);var _0x44c2a3=Object[_0x36bdb4(0xe3)],_0xb2043e=Object[_0x36bdb4(0xbd)],_0x102d02=(_0x56ca09,_0x43fb9a,_0x206130)=>_0x43fb9a in _0x56ca09?_0x44c2a3(_0x56ca09,_0x43fb9a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x206130}):_0x56ca09[_0x43fb9a]=_0x206130,_0x60f144=(_0x36df30,_0x386969,_0xd73bf8,_0x25a243)=>{const _0x39a057=_0x36bdb4;for(var _0x31687c=_0x25a243>0x1?void 0x0:_0x25a243?_0xb2043e(_0x386969,_0xd73bf8):_0x386969,_0x4e7142=_0x36df30[_0x39a057(0xb2)]-0x1,_0x567fd0;_0x4e7142>=0x0;_0x4e7142--)(_0x567fd0=_0x36df30[_0x4e7142])&&(_0x31687c=_0x567fd0(_0x31687c)||_0x31687c);return _0x31687c;},_0x363130=(_0x533eb6,_0x5d6bb8)=>(_0x43bb29,_0x3bfa7d)=>_0x5d6bb8(_0x43bb29,_0x3bfa7d,_0x533eb6),_0x4f472b=(_0x5189ab,_0x496b2d,_0x5c1dfa)=>_0x102d02(_0x5189ab,typeof _0x496b2d!=_0x36bdb4(0xdd)?_0x496b2d+'':_0x496b2d,_0x5c1dfa);_0xe7a965[_0x36bdb4(0x110)]=class extends _0xbd05f8['Plugin']{constructor(_0x1a3e8a=_0x4f5c33,_0x56c809,_0x2eac6b){const _0x38cac9=_0x36bdb4;super(),this[_0x38cac9(0x9a)]=_0x1a3e8a,this[_0x38cac9(0xbf)]=_0x56c809,this[_0x38cac9(0xe6)]=_0x2eac6b;const {..._0x3c41ac}=_0xbd05f8[_0x38cac9(0xf5)]({},_0x4f5c33,this['_config']);this[_0x38cac9(0xe6)][_0x38cac9(0xfd)](_0x515e83,_0x3c41ac);}['onStarting'](){const _0x1eb797=_0x36bdb4;[[_0x42728a],[_0x18a410],[_0x37f8d1]][_0x1eb797(0xc4)](_0x490170=>{const _0xfdbf12=_0x1eb797;this[_0xfdbf12(0xbf)][_0xfdbf12(0xb8)](_0x490170);});}[_0x36bdb4(0xb6)](){const _0x308a6d=_0x36bdb4;this[_0x308a6d(0xbf)]['get'](_0x18a410),this[_0x308a6d(0xbf)][_0x308a6d(0x108)](_0x37f8d1);}},_0x4f472b(_0xe7a965['UniverThreadCommentDataSourcePlugin'],_0x36bdb4(0xab),_0x28f2f3),_0x4f472b(_0xe7a965[_0x36bdb4(0x110)],_0x36bdb4(0xe2),_0xbd05f8['UniverInstanceType'][_0x36bdb4(0xa3)]),_0xe7a965[_0x36bdb4(0x110)]=_0x60f144([_0xbd05f8[_0x36bdb4(0x11f)](_0x1ac5f6['UniverThreadCommentUIPlugin'],_0x407f01[_0x36bdb4(0x9e)],_0x5072f6[_0x36bdb4(0xcb)]),_0x363130(0x1,_0xbd05f8['Inject'](_0xbd05f8[_0x36bdb4(0xc9)])),_0x363130(0x2,_0xbd05f8[_0x36bdb4(0xb3)])],_0xe7a965[_0x36bdb4(0x110)]),Object[_0x36bdb4(0xe3)](_0xe7a965,Symbol[_0x36bdb4(0xae)],{'value':_0x36bdb4(0x98)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504181606",
3
+ "version": "0.6.10-nightly.202504191606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504181606",
49
- "@univerjs-pro/license": "0.6.10-nightly.202504181606",
50
- "@univerjs/core": "0.6.10-nightly.202504181606",
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504191606",
49
+ "@univerjs-pro/license": "0.6.10-nightly.202504191606",
50
+ "@univerjs/core": "0.6.10-nightly.202504191606",
51
+ "@univerjs/network": "0.6.10-nightly.202504191606",
51
52
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504181606",
53
- "@univerjs/thread-comment": "0.6.10-nightly.202504181606",
54
- "@univerjs/network": "0.6.10-nightly.202504181606"
53
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504191606",
54
+ "@univerjs/thread-comment": "0.6.10-nightly.202504191606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",