@univerjs-pro/thread-comment-datasource 0.10.2 → 0.10.3-experimental.20250812-b4b6f1a

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 _0x594d5d=_0x524c;(function(_0x1a1ab0,_0x14e545){const _0x2ba9f7=_0x524c,_0x373ac6=_0x1a1ab0();while(!![]){try{const _0x2663b6=parseInt(_0x2ba9f7(0x123))/0x1+parseInt(_0x2ba9f7(0x114))/0x2*(parseInt(_0x2ba9f7(0x117))/0x3)+parseInt(_0x2ba9f7(0xb8))/0x4*(-parseInt(_0x2ba9f7(0xef))/0x5)+parseInt(_0x2ba9f7(0xd7))/0x6+parseInt(_0x2ba9f7(0x106))/0x7+parseInt(_0x2ba9f7(0xfd))/0x8+-parseInt(_0x2ba9f7(0xe7))/0x9;if(_0x2663b6===_0x14e545)break;else _0x373ac6['push'](_0x373ac6['shift']());}catch(_0x5ebb7e){_0x373ac6['push'](_0x373ac6['shift']());}}}(_0x1fe0,0xe43f2));Object[_0x594d5d(0xd8)](exports,Symbol[_0x594d5d(0xc5)],{'value':_0x594d5d(0x119)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x13ada6=>(_0x13ada6[_0x13ada6[_0x594d5d(0xbe)]=0x0]=_0x594d5d(0xbe),_0x13ada6[_0x13ada6[_0x594d5d(0xfa)]=0x1]=_0x594d5d(0xfa),_0x13ada6[_0x13ada6[_0x594d5d(0xcd)]=-0x1]='UNRECOGNIZED',_0x13ada6))(I||{}),v=(_0x386e9a=>(_0x386e9a[_0x386e9a[_0x594d5d(0xe3)]=0x0]=_0x594d5d(0xe3),_0x386e9a[_0x386e9a[_0x594d5d(0xe2)]=0x1]=_0x594d5d(0xe2),_0x386e9a[_0x386e9a[_0x594d5d(0x103)]=0x2]='Reply',_0x386e9a[_0x386e9a[_0x594d5d(0xf9)]=0x3]=_0x594d5d(0xf9),_0x386e9a[_0x386e9a[_0x594d5d(0x12b)]=0x4]='Delete',_0x386e9a[_0x386e9a['Solve']=0x5]=_0x594d5d(0x11b),_0x386e9a[_0x386e9a[_0x594d5d(0xcd)]=-0x1]=_0x594d5d(0xcd),_0x386e9a))(v||{});const f=_0xf5a751=>c['dayjs'](new Date(+_0xf5a751))['format'](_0x594d5d(0xf4)),R=async(_0x4d7089,_0x35d53a)=>{const _0x4eab42=_0x594d5d,_0xab36c9=_0x4d7089[_0x4eab42(0xc4)](c[_0x4eab42(0x10a)]),_0x4d51d5=_0x4d7089[_0x4eab42(0xc4)](P[_0x4eab42(0x10c)]);_0x35d53a[_0x4eab42(0xf7)](_0x5b24f3=>{const _0x180b58=_0x4eab42;_0xab36c9[_0x180b58(0xe5)](_0x5b24f3)&&_0x35d53a[_0x180b58(0xba)](_0x5b24f3);}),_0x35d53a[_0x4eab42(0xd9)]&&(await _0x4d51d5[_0x4eab42(0xc4)](_0x4eab42(0xde),{'params':{'userIDs':[..._0x35d53a]}}))['body'][_0x4eab42(0x10b)][_0x4eab42(0xf7)](_0x1d8261=>{const _0x436f2d=_0x4eab42;_0x1d8261&&_0xab36c9[_0x436f2d(0x130)](_0x1d8261);});};var $=Object[_0x594d5d(0xcf)],E=(_0x25de6a,_0x32abc0,_0xa2671,_0x45f07e)=>{const _0x14b781=_0x594d5d;for(var _0x3fa9f4=_0x45f07e>0x1?void 0x0:_0x45f07e?$(_0x32abc0,_0xa2671):_0x32abc0,_0x2ececd=_0x25de6a[_0x14b781(0xf2)]-0x1,_0x471ab9;_0x2ececd>=0x0;_0x2ececd--)(_0x471ab9=_0x25de6a[_0x2ececd])&&(_0x3fa9f4=_0x471ab9(_0x3fa9f4)||_0x3fa9f4);return _0x3fa9f4;},S=(_0x33aa7d,_0x54f28e)=>(_0x54c5e5,_0x1df815)=>_0x54f28e(_0x54c5e5,_0x1df815,_0x33aa7d);let _=class extends c[_0x594d5d(0xdb)]{constructor(_0xb712f3,_0x4930a7,_0x39ab8a,_0xf3350d){const _0x81ca39=_0x594d5d;super(),this['_commentService']=_0xb712f3,this['_threadCommentModel']=_0x4930a7,this[_0x81ca39(0x12a)]=_0x39ab8a,this[_0x81ca39(0x12c)]=_0xf3350d,this[_0x81ca39(0xbb)](),this[_0x81ca39(0xe8)]();}['_initUserSync'](){const _0x54a53d=_0x594d5d;this['disposeWithMe'](this[_0x54a53d(0x10d)][_0x54a53d(0xcc)][_0x54a53d(0xb6)](j[_0x54a53d(0xe9)](0x10))[_0x54a53d(0xb7)](_0x5e7805=>{const _0xccd60d=_0x54a53d,_0x4994e3=new Set();_0x5e7805[_0xccd60d(0xf7)](_0x29037b=>{const _0x35e656=_0xccd60d;switch(_0x29037b[_0x35e656(0x113)]){case _0x35e656(0xd4):{const _0xd397d0=_0x29037b[_0x35e656(0xda)][_0x35e656(0xf8)];_0x4994e3[_0x35e656(0xd4)](_0xd397d0);break;}}}),R(this[_0xccd60d(0x12c)],_0x4994e3);}));}[_0x594d5d(0xbb)](){const _0x526f59=_0x594d5d;this[_0x526f59(0xc8)](this[_0x526f59(0x101)]['commentUpdate$'][_0x526f59(0xb7)](async _0x398310=>{const _0x1bf6f4=_0x526f59;var _0x22d62e,_0x2e39b8,_0x1dfce8,_0x4fd792;const _0x2c80e9=(_0x22d62e=this[_0x1bf6f4(0x10d)][_0x1bf6f4(0xdd)](_0x398310[_0x1bf6f4(0x126)])[_0x1bf6f4(0x109)](_0x4ae921=>_0x4ae921[_0x1bf6f4(0x100)]===_0x398310[_0x1bf6f4(0x100)]))==null?void 0x0:_0x22d62e[_0x1bf6f4(0x12f)];if(!_0x2c80e9)return;const {unitId:_0x3ce8c9,subUnitId:_0x5ba9ae}=_0x2c80e9;switch(_0x398310[_0x1bf6f4(0xd0)]&&this[_0x1bf6f4(0x12a)][_0x1bf6f4(0x130)](_0x398310[_0x1bf6f4(0xd0)]),_0x398310[_0x1bf6f4(0x113)]){case v[_0x1bf6f4(0xe2)]:break;case v[_0x1bf6f4(0x103)]:{this['_threadCommentModel']['addComment'](_0x3ce8c9,_0x5ba9ae,{'unitId':_0x3ce8c9,'subUnitId':_0x5ba9ae,'ref':'','id':_0x398310['replyId'],'dT':f(+_0x398310['createTimestamp']),'threadId':_0x398310[_0x1bf6f4(0x100)],'personId':(_0x1dfce8=(_0x2e39b8=_0x398310['user'])==null?void 0x0:_0x2e39b8['userID'])!=null?_0x1dfce8:_0x398310[_0x1bf6f4(0xbc)],'text':JSON[_0x1bf6f4(0xd3)](_0x398310[_0x1bf6f4(0xbd)]),'parentId':_0x2c80e9['id']});break;}case v[_0x1bf6f4(0x12b)]:{const _0x555c65=this[_0x1bf6f4(0x10d)][_0x1bf6f4(0xe4)](_0x3ce8c9,_0x5ba9ae,_0x398310['replyId']);_0x555c65&&_0x555c65[_0x1bf6f4(0xe6)]&&this['_threadCommentModel'][_0x1bf6f4(0x125)](_0x3ce8c9,_0x5ba9ae,_0x398310[_0x1bf6f4(0x104)]);break;}case v[_0x1bf6f4(0xf9)]:{this['_threadCommentModel']['updateComment'](_0x3ce8c9,_0x5ba9ae,{'commentId':_0x398310['replyId'],'text':JSON[_0x1bf6f4(0xd3)](_0x398310[_0x1bf6f4(0xbd)])});break;}case v[_0x1bf6f4(0x11b)]:{const _0x7a34c5=(_0x4fd792=this[_0x1bf6f4(0x10d)][_0x1bf6f4(0xdd)](_0x398310['unitId'])[_0x1bf6f4(0x109)](_0x233ee8=>_0x233ee8[_0x1bf6f4(0x100)]===_0x398310['threadId']))==null?void 0x0:_0x4fd792[_0x1bf6f4(0x12f)];_0x7a34c5&&this[_0x1bf6f4(0x10d)][_0x1bf6f4(0x122)](_0x3ce8c9,_0x5ba9ae,_0x7a34c5['id'],_0x398310[_0x1bf6f4(0xca)]===I[_0x1bf6f4(0xfa)]);break;}}}));}};_=E([S(0x0,c[_0x594d5d(0x121)](b[_0x594d5d(0xf3)])),S(0x1,c[_0x594d5d(0x121)](M[_0x594d5d(0xf0)])),S(0x2,c[_0x594d5d(0x121)](c['UserManagerService'])),S(0x3,c[_0x594d5d(0x121)](c[_0x594d5d(0x11d)]))],_);const q=_0x594d5d(0xfb),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1ff802,_0x5573e9,_0x17b64a,_0x46f77c)=>{const _0x1e93df=_0x594d5d;for(var _0x5df172=_0x46f77c>0x1?void 0x0:_0x46f77c?A(_0x5573e9,_0x17b64a):_0x5573e9,_0xb2ac76=_0x1ff802[_0x1e93df(0xf2)]-0x1,_0x2265c6;_0xb2ac76>=0x0;_0xb2ac76--)(_0x2265c6=_0x1ff802[_0xb2ac76])&&(_0x5df172=_0x2265c6(_0x5df172)||_0x5df172);return _0x5df172;},C=(_0x5ef763,_0x56964b)=>(_0x10b516,_0x4d9c9a)=>_0x56964b(_0x10b516,_0x4d9c9a,_0x5ef763);function _0x524c(_0x7a6923,_0x30cafa){const _0x1fe02d=_0x1fe0();return _0x524c=function(_0x524ca2,_0x1d18a9){_0x524ca2=_0x524ca2-0xb6;let _0x4f912e=_0x1fe02d[_0x524ca2];return _0x4f912e;},_0x524c(_0x7a6923,_0x30cafa);}function Y(_0x48e201,_0x23f926){const _0x4a15de=_0x594d5d,_0x3517f7=_0x48e201[_0x4a15de(0x115)][0x0];return{..._0x23f926,'id':_0x3517f7[_0x4a15de(0x104)],'resolved':_0x48e201[_0x4a15de(0xca)]===0x1,'dT':f(_0x3517f7[_0x4a15de(0xc1)]),'personId':_0x3517f7[_0x4a15de(0xbc)],'threadId':_0x3517f7['threadId']};}function G(_0x3dd197,_0x1b9e53,_0x141b71){const _0x7af8ba=_0x594d5d;var _0x24b7fb,_0x1c2ce0;if(((_0x1c2ce0=(_0x24b7fb=_0x3dd197==null?void 0x0:_0x3dd197[_0x7af8ba(0x115)])==null?void 0x0:_0x24b7fb[_0x7af8ba(0xf2)])!=null?_0x1c2ce0:0x0)>0x0){const _0xe5df8=(_0x5d742e,_0x2fb3cb)=>({'id':_0x5d742e[_0x7af8ba(0x104)],'threadId':_0x5d742e[_0x7af8ba(0x100)],'dT':f(_0x5d742e[_0x7af8ba(0xc1)]),'personId':_0x5d742e['userId'],'resolved':_0x3dd197[_0x7af8ba(0xca)]===I[_0x7af8ba(0xfa)],'unitId':_0x1b9e53,'subUnitId':_0x141b71,'text':JSON[_0x7af8ba(0xd3)](_0x5d742e[_0x7af8ba(0xbd)]),'parentId':_0x2fb3cb}),_0x2532b5=_0xe5df8(_0x3dd197[_0x7af8ba(0x115)][0x0]);return{..._0x2532b5,'children':_0x3dd197[_0x7af8ba(0x115)][_0x7af8ba(0xce)](0x1)[_0x7af8ba(0x111)](_0x4720d0=>_0xe5df8(_0x4720d0,_0x2532b5['id']))};}return null;}let p=class{constructor(_0x3af8f8,_0x3edbb7,_0x22a94c){const _0x3cbcc4=_0x594d5d;this[_0x3cbcc4(0x120)]=_0x3af8f8,this[_0x3cbcc4(0x12a)]=_0x3edbb7,this['_sessionService']=_0x22a94c;}async['addComment'](_0x3afd37){const _0x213918=_0x594d5d;var _0x1e0cbe,_0x181612;const {parentId:_0xb47e9,unitId:_0x189f07,text:_0x4b17ed,threadId:_0xeb9e17}=_0x3afd37,_0x9243a0=(_0x181612=(_0x1e0cbe=_0x4b17ed['customRanges'])==null?void 0x0:_0x1e0cbe[_0x213918(0xc0)](_0x275789=>_0x275789[_0x213918(0xc2)]===c[_0x213918(0xea)]['COMMENT'])['map'](_0x2fe8b9=>_0x2fe8b9['rangeId']))!=null?_0x181612:[],_0x163b97=JSON[_0x213918(0xec)](_0x4b17ed),_0x3f851e=(await this[_0x213918(0xf5)][_0x213918(0xd2)](_0x189f07))[_0x213918(0xc7)]();if(_0xb47e9){const _0x2297a8={'memberId':_0x3f851e,'unitId':_0x189f07,'content':_0x163b97,'mention':_0x9243a0,'threadId':_0xeb9e17},_0x1dfff0=(await this['_httpService']['post'](_0x213918(0x105)+_0x189f07+_0x213918(0xf1),{'body':_0x2297a8}))[_0x213918(0xe0)][_0x213918(0xdc)];return{..._0x3afd37,'id':_0x1dfff0[_0x213918(0x104)],'dT':c[_0x213918(0x11c)](+_0x1dfff0['createTimestamp'])[_0x213918(0xf6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1dfff0['userId']};}else{const _0x1305ae={'memberId':_0x3f851e,'unitId':_0x189f07,'content':_0x163b97,'mention':_0x9243a0},_0x4864a5=await this[_0x213918(0x120)][_0x213918(0xed)](_0x213918(0x105)+_0x189f07+'/add',{'body':_0x1305ae});return Y(_0x4864a5[_0x213918(0xe0)]['comment'],_0x3afd37);}}async[_0x594d5d(0xc6)](_0x44bf95){const _0x52bded=_0x594d5d;var _0x10674b,_0x33f940;const {text:_0xb9476e,unitId:_0x4680ef}=_0x44bf95,_0x5af89c=(_0x33f940=(_0x10674b=_0xb9476e[_0x52bded(0xff)])==null?void 0x0:_0x10674b[_0x52bded(0xc0)](_0x3f94a9=>_0x3f94a9[_0x52bded(0xc2)]===c[_0x52bded(0xea)][_0x52bded(0x11e)])[_0x52bded(0x111)](_0x2f568d=>_0x2f568d[_0x52bded(0x11f)]))!=null?_0x33f940:[],_0x1bef04=JSON[_0x52bded(0xec)](_0xb9476e),_0x479b99=_0x44bf95[_0x52bded(0x100)],_0x28c5ed=_0x44bf95['id'],_0x5a8ce9={'memberId':(await this['_sessionService'][_0x52bded(0xd2)](_0x4680ef))[_0x52bded(0xc7)](),'unitId':_0x4680ef,'threadId':_0x479b99,'mention':_0x5af89c,'content':_0x1bef04,'replyId':_0x28c5ed},_0x59a5f9=await this[_0x52bded(0x120)][_0x52bded(0xed)]('/universer-api/comment/unit/'+_0x4680ef+_0x52bded(0x12d),{'body':_0x5a8ce9});return!_0x59a5f9[_0x52bded(0xe0)][_0x52bded(0xfe)]||_0x59a5f9[_0x52bded(0xe0)]['error'][_0x52bded(0x108)]===0x1;}async[_0x594d5d(0x122)](_0x552323){const _0x20f912=_0x594d5d,{unitId:_0x3ff0bd}=_0x552323,_0x1cd87a=_0x552323['threadId'],_0x2e80b0={'memberId':this['_userService'][_0x20f912(0xbf)]()[_0x20f912(0x118)],'unitId':_0x3ff0bd,'threadId':_0x1cd87a,'solved':_0x552323[_0x20f912(0xd1)]?I[_0x20f912(0xfa)]:I[_0x20f912(0xbe)]},_0x15670c=await this['_httpService']['post'](_0x20f912(0x105)+_0x3ff0bd+'/solved',{'body':_0x2e80b0});return!_0x15670c['body']['error']||_0x15670c[_0x20f912(0xe0)][_0x20f912(0xfe)][_0x20f912(0x108)]===0x1;}async[_0x594d5d(0x125)](_0x2a308b,_0x4807a6,_0x2192f3,_0x466b3e){const _0x1f9a36=_0x594d5d,_0x3f54b5={'memberId':(await this['_sessionService'][_0x1f9a36(0xd2)](_0x2a308b))[_0x1f9a36(0xc7)](),'threadId':_0x2192f3,'replyId':_0x466b3e,'unitId':_0x2a308b},_0x5c7aa3=await this[_0x1f9a36(0x120)][_0x1f9a36(0xed)](_0x1f9a36(0x105)+_0x2a308b+_0x1f9a36(0xc3),{'body':_0x3f54b5});return!_0x5c7aa3[_0x1f9a36(0xe0)][_0x1f9a36(0xfe)]||_0x5c7aa3['body'][_0x1f9a36(0xfe)][_0x1f9a36(0x108)]===0x1;}async['listComments'](_0xc849a2,_0x2a7ce9,_0x22b96d){const _0x4de5a9=_0x594d5d,_0x2f65ab={'unitId':_0xc849a2,'threadId':_0x22b96d},_0x3cd2e5=await this[_0x4de5a9(0x120)][_0x4de5a9(0xed)](_0x4de5a9(0x105)+_0xc849a2+'/list',{'body':_0x2f65ab}),_0x5c8b7a=_0x22b96d[_0x4de5a9(0x111)](_0x56e45d=>G(_0x3cd2e5[_0x4de5a9(0xe0)][_0x4de5a9(0xd6)][_0x56e45d],_0xc849a2,_0x2a7ce9))[_0x4de5a9(0xc0)](Boolean);return Object[_0x4de5a9(0x127)](_0x3cd2e5[_0x4de5a9(0xe0)]['users'])[_0x4de5a9(0xf7)](_0x51247e=>{this['_userService']['addUser'](_0x51247e);}),_0x5c8b7a;}[_0x594d5d(0xee)](_0x5a2a21){const _0x93e815=_0x594d5d;return{'id':_0x5a2a21['id'],'threadId':_0x5a2a21[_0x93e815(0x100)],'ref':_0x5a2a21[_0x93e815(0x116)]};}};p=x([C(0x0,c[_0x594d5d(0x121)](P[_0x594d5d(0x10c)])),C(0x1,c[_0x594d5d(0x121)](c['UserManagerService'])),C(0x2,c[_0x594d5d(0x121)](b[_0x594d5d(0x107)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5127d7,_0x183b83,_0x4334d2,_0x2eb7c7)=>{const _0x2eb3c6=_0x594d5d;for(var _0x21943d=_0x2eb7c7>0x1?void 0x0:_0x2eb7c7?H(_0x183b83,_0x4334d2):_0x183b83,_0xbd72f4=_0x5127d7[_0x2eb3c6(0xf2)]-0x1,_0x53f646;_0xbd72f4>=0x0;_0xbd72f4--)(_0x53f646=_0x5127d7[_0xbd72f4])&&(_0x21943d=_0x53f646(_0x21943d)||_0x21943d);return _0x21943d;},y=(_0x75cd31,_0x3aaa5b)=>(_0x134f49,_0x425609)=>_0x3aaa5b(_0x134f49,_0x425609,_0x75cd31);let g=class extends c[_0x594d5d(0xdb)]{constructor(_0x5ea384,_0x13a0fe){const _0x711683=_0x594d5d;super(),this[_0x711683(0x110)]=_0x5ea384,this[_0x711683(0xeb)]=_0x13a0fe,this[_0x711683(0xb9)]();}[_0x594d5d(0xb9)](){const _0x5bddb4=_0x594d5d;this[_0x5bddb4(0x110)][_0x5bddb4(0x102)]=this['_threadCommentDataSource'],this[_0x5bddb4(0x110)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x594d5d(0xd8)],L=Object[_0x594d5d(0xcf)],Z=(_0x80ab5,_0x540dfc,_0x534d32)=>_0x540dfc in _0x80ab5?F(_0x80ab5,_0x540dfc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x534d32}):_0x80ab5[_0x540dfc]=_0x534d32,W=(_0x2912f5,_0x504d52,_0x1aaad8,_0x40ea99)=>{const _0xf72ec3=_0x594d5d;for(var _0x238429=_0x40ea99>0x1?void 0x0:_0x40ea99?L(_0x504d52,_0x1aaad8):_0x504d52,_0x29d6ce=_0x2912f5[_0xf72ec3(0xf2)]-0x1,_0x363560;_0x29d6ce>=0x0;_0x29d6ce--)(_0x363560=_0x2912f5[_0x29d6ce])&&(_0x238429=_0x363560(_0x238429)||_0x238429);return _0x238429;},O=(_0x3a252b,_0x18ea77)=>(_0x4cb036,_0x589642)=>_0x18ea77(_0x4cb036,_0x589642,_0x3a252b),N=(_0x2789c2,_0x5ad201,_0x2e156c)=>Z(_0x2789c2,typeof _0x5ad201!='symbol'?_0x5ad201+'':_0x5ad201,_0x2e156c);exports[_0x594d5d(0xfc)]=class extends c[_0x594d5d(0x124)]{constructor(_0x1456e1=D,_0x1d4b8c,_0x586c68){const _0x35989f=_0x594d5d;super(),this[_0x35989f(0x11a)]=_0x1456e1,this[_0x35989f(0x12c)]=_0x1d4b8c,this[_0x35989f(0xc9)]=_0x586c68;const {..._0x2ec248}=c[_0x35989f(0xd5)]({},D,this[_0x35989f(0x11a)]);this[_0x35989f(0xc9)][_0x35989f(0x12e)](q,_0x2ec248);}[_0x594d5d(0x10f)](){const _0x1f58b6=_0x594d5d;[[p],[g],[_]][_0x1f58b6(0xf7)](_0x3bafce=>{const _0x32973b=_0x1f58b6;this[_0x32973b(0x12c)][_0x32973b(0xd4)](_0x3bafce);});}[_0x594d5d(0xcb)](){const _0x31379a=_0x594d5d;this[_0x31379a(0x12c)][_0x31379a(0xc4)](g),this[_0x31379a(0x12c)]['get'](_);}},N(exports[_0x594d5d(0xfc)],_0x594d5d(0x129),U),N(exports[_0x594d5d(0xfc)],_0x594d5d(0x113),c[_0x594d5d(0xe1)]['UNIVER_UNKNOWN']),exports[_0x594d5d(0xfc)]=W([c['DependentOn'](w[_0x594d5d(0x128)],b[_0x594d5d(0x10e)],T[_0x594d5d(0x112)]),O(0x1,c[_0x594d5d(0x121)](c['Injector'])),O(0x2,c[_0x594d5d(0xdf)])],exports['UniverThreadCommentDataSourcePlugin']);function _0x1fe0(){const _0x2f02cc=['Add','Unknown','getComment','getUser','parentId','49955274alCfzq','_initUserSync','bufferTime','CustomRangeType','_threadCommentDataSource','stringify','post','saveCommentToSnapshot','350fgvpHU','ThreadCommentModel','/reply','length','CommentService','YYYY/MM/DD\x20HH:mm','_sessionService','format','forEach','personId','Edit','Solved','thread-comment-data-source.config','UniverThreadCommentDataSourcePlugin','13904112qxTrkt','error','customRanges','threadId','_commentService','dataSource','Reply','replyId','/universer-api/comment/unit/','12748778nVqVNE','CollaborationSessionService','code','find','UserManagerService','users','HTTPService','_threadCommentModel','UniverCollaborationClientPlugin','onStarting','_threadCommentDataSourceService','map','UniverLicensePlugin','type','6kKriPP','replies','ref','134031MgxwzU','userID','Module','_config','Solve','dayjs','Injector','COMMENT','rangeId','_httpService','Inject','resolveComment','1535960RGdcDJ','Plugin','deleteComment','unitId','values','UniverThreadCommentUIPlugin','pluginName','_userService','Delete','_injector','/edit','setConfig','root','addUser','pipe','subscribe','10684ytDNqt','_initDataSource','delete','_init','userId','content','OpenOrReOpen','getCurrentUser','filter','createTimestamp','rangeType','/delete','get','toStringTag','updateComment','getMemberID','disposeWithMe','_configService','solved','onReady','commentUpdate$','UNRECOGNIZED','slice','getOwnPropertyDescriptor','user','resolved','requireSession','parse','add','merge','comments','8659170JFGKzP','defineProperty','size','payload','Disposable','reply','getUnit','/universer-api/user/list','IConfigService','body','UniverInstanceType'];_0x1fe0=function(){return _0x2f02cc;};return _0x1fe0();}
1
+ 'use strict';const _0x4e17d9=_0x3823;(function(_0xb29057,_0x5387e0){const _0x4adaa9=_0x3823,_0x225e72=_0xb29057();while(!![]){try{const _0x3f7496=parseInt(_0x4adaa9(0x11a))/0x1*(-parseInt(_0x4adaa9(0x12d))/0x2)+-parseInt(_0x4adaa9(0x109))/0x3*(-parseInt(_0x4adaa9(0xee))/0x4)+parseInt(_0x4adaa9(0x13b))/0x5+parseInt(_0x4adaa9(0x136))/0x6+-parseInt(_0x4adaa9(0x10e))/0x7*(-parseInt(_0x4adaa9(0x12f))/0x8)+parseInt(_0x4adaa9(0xf4))/0x9+-parseInt(_0x4adaa9(0x100))/0xa;if(_0x3f7496===_0x5387e0)break;else _0x225e72['push'](_0x225e72['shift']());}catch(_0xd7ce1b){_0x225e72['push'](_0x225e72['shift']());}}}(_0x12be,0x796cd));Object[_0x4e17d9(0x130)](exports,Symbol['toStringTag'],{'value':_0x4e17d9(0x129)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4e17d9(0xf1);var I=(_0x145e10=>(_0x145e10[_0x145e10[_0x4e17d9(0xf9)]=0x0]='OpenOrReOpen',_0x145e10[_0x145e10[_0x4e17d9(0x112)]=0x1]=_0x4e17d9(0x112),_0x145e10[_0x145e10[_0x4e17d9(0x108)]=-0x1]='UNRECOGNIZED',_0x145e10))(I||{}),v=(_0xac5613=>(_0xac5613[_0xac5613[_0x4e17d9(0xdd)]=0x0]=_0x4e17d9(0xdd),_0xac5613[_0xac5613['Add']=0x1]='Add',_0xac5613[_0xac5613[_0x4e17d9(0x12a)]=0x2]=_0x4e17d9(0x12a),_0xac5613[_0xac5613[_0x4e17d9(0x133)]=0x3]=_0x4e17d9(0x133),_0xac5613[_0xac5613[_0x4e17d9(0xed)]=0x4]=_0x4e17d9(0xed),_0xac5613[_0xac5613['Solve']=0x5]=_0x4e17d9(0x117),_0xac5613[_0xac5613[_0x4e17d9(0x108)]=-0x1]=_0x4e17d9(0x108),_0xac5613))(v||{});const f=_0x4a397d=>c[_0x4e17d9(0x122)](new Date(+_0x4a397d))['format'](_0x4e17d9(0xdf)),R=async(_0x477e5e,_0x2d7a16)=>{const _0xb1531e=_0x4e17d9,_0x1f9d41=_0x477e5e[_0xb1531e(0x11c)](c[_0xb1531e(0x11b)]),_0x1e0074=_0x477e5e[_0xb1531e(0x11c)](P[_0xb1531e(0x137)]);_0x2d7a16[_0xb1531e(0x141)](_0x45b6ba=>{_0x1f9d41['getUser'](_0x45b6ba)&&_0x2d7a16['delete'](_0x45b6ba);}),_0x2d7a16[_0xb1531e(0x110)]&&(await _0x1e0074['get'](_0xb1531e(0xe9),{'params':{'userIDs':[..._0x2d7a16]}}))[_0xb1531e(0x121)][_0xb1531e(0x126)][_0xb1531e(0x141)](_0x31d795=>{const _0x19ac06=_0xb1531e;_0x31d795&&_0x1f9d41[_0x19ac06(0xfe)](_0x31d795);});};var $=Object[_0x4e17d9(0x10b)],E=(_0xa820e2,_0x48a996,_0x3579fe,_0x1e1f0f)=>{for(var _0x1272f2=_0x1e1f0f>0x1?void 0x0:_0x1e1f0f?$(_0x48a996,_0x3579fe):_0x48a996,_0x3db5a5=_0xa820e2['length']-0x1,_0x54098d;_0x3db5a5>=0x0;_0x3db5a5--)(_0x54098d=_0xa820e2[_0x3db5a5])&&(_0x1272f2=_0x54098d(_0x1272f2)||_0x1272f2);return _0x1272f2;},S=(_0x46e83c,_0x11630a)=>(_0x580307,_0x16a374)=>_0x11630a(_0x580307,_0x16a374,_0x46e83c);let _=class extends c['Disposable']{constructor(_0x69ac87,_0x1ead45,_0x4d0706,_0x5c591a){const _0x171005=_0x4e17d9;super(),this['_commentService']=_0x69ac87,this[_0x171005(0x10f)]=_0x1ead45,this['_userService']=_0x4d0706,this[_0x171005(0x147)]=_0x5c591a,this['_init'](),this[_0x171005(0x13a)]();}[_0x4e17d9(0x13a)](){const _0x4d506f=_0x4e17d9;this['disposeWithMe'](this[_0x4d506f(0x10f)]['commentUpdate$'][_0x4d506f(0xda)](j[_0x4d506f(0x106)](0x10))['subscribe'](_0x3b7b4f=>{const _0x8ac26=_0x4d506f,_0x200455=new Set();_0x3b7b4f[_0x8ac26(0x141)](_0x3efb93=>{const _0x576d0f=_0x8ac26;switch(_0x3efb93['type']){case'add':{const _0x3e51b3=_0x3efb93[_0x576d0f(0x119)][_0x576d0f(0xd1)];_0x200455[_0x576d0f(0xe2)](_0x3e51b3);break;}}}),R(this['_injector'],_0x200455);}));}[_0x4e17d9(0x127)](){const _0x35d0c0=_0x4e17d9;this[_0x35d0c0(0xf3)](this[_0x35d0c0(0x111)][_0x35d0c0(0x132)][_0x35d0c0(0xea)](async _0x342afb=>{const _0x3c4237=_0x35d0c0;var _0x379990,_0x2e0bad,_0x25e331,_0x55adc5;const _0x3d9750=(_0x379990=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x34d9b2=>_0x34d9b2[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x379990[_0x3c4237(0xff)];if(!_0x3d9750)return;const {unitId:_0x26ec77,subUnitId:_0x1c55fe}=_0x3d9750;switch(_0x342afb[_0x3c4237(0x113)]&&this[_0x3c4237(0xf2)][_0x3c4237(0xfe)](_0x342afb[_0x3c4237(0x113)]),_0x342afb[_0x3c4237(0x145)]){case v[_0x3c4237(0x10d)]:break;case v[_0x3c4237(0x12a)]:{this['_threadCommentModel']['addComment'](_0x26ec77,_0x1c55fe,{'unitId':_0x26ec77,'subUnitId':_0x1c55fe,'ref':'','id':_0x342afb[_0x3c4237(0x13f)],'dT':f(+_0x342afb[_0x3c4237(0xfd)]),'threadId':_0x342afb[_0x3c4237(0xd9)],'personId':(_0x25e331=(_0x2e0bad=_0x342afb['user'])==null?void 0x0:_0x2e0bad['userID'])!=null?_0x25e331:_0x342afb[_0x3c4237(0x120)],'text':JSON[_0x3c4237(0x116)](_0x342afb[_0x3c4237(0xef)]),'parentId':_0x3d9750['id']});break;}case v[_0x3c4237(0xed)]:{const _0x42cef3=this[_0x3c4237(0x10f)][_0x3c4237(0xe7)](_0x26ec77,_0x1c55fe,_0x342afb['replyId']);_0x42cef3&&_0x42cef3['parentId']&&this[_0x3c4237(0x10f)]['deleteComment'](_0x26ec77,_0x1c55fe,_0x342afb[_0x3c4237(0x13f)]);break;}case v[_0x3c4237(0x133)]:{this[_0x3c4237(0x10f)][_0x3c4237(0xe3)](_0x26ec77,_0x1c55fe,{'commentId':_0x342afb[_0x3c4237(0x13f)],'text':JSON['parse'](_0x342afb[_0x3c4237(0xef)])});break;}case v[_0x3c4237(0x117)]:{const _0x24650f=(_0x55adc5=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x374a74=>_0x374a74[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x55adc5['root'];_0x24650f&&this[_0x3c4237(0x10f)]['resolveComment'](_0x26ec77,_0x1c55fe,_0x24650f['id'],_0x342afb[_0x3c4237(0xce)]===I[_0x3c4237(0x112)]);break;}}}));}};_=E([S(0x0,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0x123)])),S(0x1,c['Inject'](M[_0x4e17d9(0x144)])),S(0x2,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),S(0x3,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x13e)]))],_);const q=_0x4e17d9(0xd7),D={};function _0x12be(){const _0x37e88a=['personId','_configService','comments','Inject','DependentOn','COMMENT','thread-comment-data-source.config','CustomRangeType','threadId','pipe','_sessionService','pluginName','Unknown','Plugin','YYYY/MM/DD\x20HH:mm','values','getMemberID','add','updateComment','/add','comment','/solved','getComment','dataSource','/universer-api/user/list','subscribe','IThreadCommentDataSourceService','getUnit','Delete','202556rTHpDe','content','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','disposeWithMe','4658085rtefFO','map','/reply','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','OpenOrReOpen','CollaborationSessionService','find','Disposable','createTimestamp','addUser','root','18651000UOUOUW','_threadCommentDataSource','_threadCommentDataSourceService','deleteComment','reply','_initDataSource','bufferTime','post','UNRECOGNIZED','6nkrmUS','UniverLicensePlugin','getOwnPropertyDescriptor','symbol','Add','1505HenaNg','_threadCommentModel','size','_commentService','Solved','user','filter','resolveComment','parse','Solve','/delete','payload','44LbftRN','UserManagerService','get','resolved','IConfigService','customRanges','userId','body','dayjs','CommentService','_httpService','code','users','_init','error','Module','Reply','length','onStarting','22854zLsdaG','requireSession','31880KgLHof','defineProperty','_config','commentUpdate$','Edit','onReady','UniverThreadCommentDataSourcePlugin','5964006OqygSC','HTTPService','unitId','addComment','_initUserSync','1978130lBzAvl','setConfig','stringify','Injector','replyId','/universer-api/comment/unit/','forEach','merge','replies','ThreadCommentModel','type','rangeType','_injector','UNIVER_UNKNOWN','solved','rangeId','userID'];_0x12be=function(){return _0x37e88a;};return _0x12be();}var A=Object[_0x4e17d9(0x10b)],x=(_0x2eb4ac,_0x268727,_0x11aaf8,_0xe65d0c)=>{const _0x28e1b1=_0x4e17d9;for(var _0x53b2f4=_0xe65d0c>0x1?void 0x0:_0xe65d0c?A(_0x268727,_0x11aaf8):_0x268727,_0x4dcb1e=_0x2eb4ac[_0x28e1b1(0x12b)]-0x1,_0x137b0c;_0x4dcb1e>=0x0;_0x4dcb1e--)(_0x137b0c=_0x2eb4ac[_0x4dcb1e])&&(_0x53b2f4=_0x137b0c(_0x53b2f4)||_0x53b2f4);return _0x53b2f4;},C=(_0x54e97a,_0x290d5e)=>(_0x28bed3,_0x248d72)=>_0x290d5e(_0x28bed3,_0x248d72,_0x54e97a);function Y(_0x3ada4e,_0x11d4ee){const _0x44b437=_0x4e17d9,_0x354407=_0x3ada4e[_0x44b437(0x143)][0x0];return{..._0x11d4ee,'id':_0x354407[_0x44b437(0x13f)],'resolved':_0x3ada4e[_0x44b437(0xce)]===0x1,'dT':f(_0x354407[_0x44b437(0xfd)]),'personId':_0x354407[_0x44b437(0x120)],'threadId':_0x354407[_0x44b437(0xd9)]};}function G(_0x4fbd4e,_0x183c75,_0x8309ce){const _0x18d4f0=_0x4e17d9;var _0x41606e,_0x3dc0b1;if(((_0x3dc0b1=(_0x41606e=_0x4fbd4e==null?void 0x0:_0x4fbd4e[_0x18d4f0(0x143)])==null?void 0x0:_0x41606e[_0x18d4f0(0x12b)])!=null?_0x3dc0b1:0x0)>0x0){const _0x4939f1=(_0x47dcef,_0x259023)=>({'id':_0x47dcef[_0x18d4f0(0x13f)],'threadId':_0x47dcef[_0x18d4f0(0xd9)],'dT':f(_0x47dcef[_0x18d4f0(0xfd)]),'personId':_0x47dcef['userId'],'resolved':_0x4fbd4e[_0x18d4f0(0xce)]===I['Solved'],'unitId':_0x183c75,'subUnitId':_0x8309ce,'text':JSON[_0x18d4f0(0x116)](_0x47dcef['content']),'parentId':_0x259023}),_0xb36bbc=_0x4939f1(_0x4fbd4e[_0x18d4f0(0x143)][0x0]);return{..._0xb36bbc,'children':_0x4fbd4e[_0x18d4f0(0x143)]['slice'](0x1)[_0x18d4f0(0xf5)](_0x2abdac=>_0x4939f1(_0x2abdac,_0xb36bbc['id']))};}return null;}let p=class{constructor(_0x49ccc4,_0x376817,_0x3f9ff2){const _0x214a91=_0x4e17d9;this[_0x214a91(0x124)]=_0x49ccc4,this[_0x214a91(0xf2)]=_0x376817,this[_0x214a91(0xdb)]=_0x3f9ff2;}async[_0x4e17d9(0x139)](_0x4f8dc5){const _0x1327b0=_0x4e17d9;var _0x5c51cb,_0x9d0b24;const {parentId:_0x94b0e7,unitId:_0x5b2992,text:_0x52e12f,threadId:_0x2cdbdb}=_0x4f8dc5,_0x8c1907=(_0x9d0b24=(_0x5c51cb=_0x52e12f[_0x1327b0(0x11f)])==null?void 0x0:_0x5c51cb['filter'](_0x281cfe=>_0x281cfe['rangeType']===c[_0x1327b0(0xd8)][_0x1327b0(0xd6)])['map'](_0x7168e8=>_0x7168e8[_0x1327b0(0xcf)]))!=null?_0x9d0b24:[],_0x167be7=JSON['stringify'](_0x52e12f),_0x49b65a=(await this['_sessionService']['requireSession'](_0x5b2992))[_0x1327b0(0xe1)]();if(_0x94b0e7){const _0x298611={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907,'threadId':_0x2cdbdb},_0x50f763=(await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xf6),{'body':_0x298611}))[_0x1327b0(0x121)][_0x1327b0(0x104)];return{..._0x4f8dc5,'id':_0x50f763['replyId'],'dT':c['dayjs'](+_0x50f763['createTimestamp'])['format'](_0x1327b0(0xdf)),'personId':_0x50f763[_0x1327b0(0x120)]};}else{const _0x2a7a85={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907},_0x173bbc=await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xe4),{'body':_0x2a7a85});return Y(_0x173bbc[_0x1327b0(0x121)][_0x1327b0(0xe5)],_0x4f8dc5);}}async[_0x4e17d9(0xe3)](_0x25ba3a){const _0x55de65=_0x4e17d9;var _0x275f2a,_0x4e51fb;const {text:_0x256c93,unitId:_0x2f2b17}=_0x25ba3a,_0xdee93d=(_0x4e51fb=(_0x275f2a=_0x256c93['customRanges'])==null?void 0x0:_0x275f2a[_0x55de65(0x114)](_0x57eecc=>_0x57eecc[_0x55de65(0x146)]===c['CustomRangeType'][_0x55de65(0xd6)])[_0x55de65(0xf5)](_0x4c0316=>_0x4c0316[_0x55de65(0xcf)]))!=null?_0x4e51fb:[],_0x9059e6=JSON[_0x55de65(0x13d)](_0x256c93),_0x103d64=_0x25ba3a[_0x55de65(0xd9)],_0x4b47ca=_0x25ba3a['id'],_0x3d660e={'memberId':(await this[_0x55de65(0xdb)][_0x55de65(0x12e)](_0x2f2b17))[_0x55de65(0xe1)](),'unitId':_0x2f2b17,'threadId':_0x103d64,'mention':_0xdee93d,'content':_0x9059e6,'replyId':_0x4b47ca},_0x4f295e=await this[_0x55de65(0x124)]['post'](_0x55de65(0x140)+_0x2f2b17+'/edit',{'body':_0x3d660e});return!_0x4f295e[_0x55de65(0x121)][_0x55de65(0x128)]||_0x4f295e['body'][_0x55de65(0x128)]['code']===0x1;}async[_0x4e17d9(0x115)](_0xf153cb){const _0xfe0cc7=_0x4e17d9,{unitId:_0x3eeef0}=_0xf153cb,_0x49263f=_0xf153cb[_0xfe0cc7(0xd9)],_0x53f00e={'memberId':this[_0xfe0cc7(0xf2)]['getCurrentUser']()[_0xfe0cc7(0xd0)],'unitId':_0x3eeef0,'threadId':_0x49263f,'solved':_0xf153cb[_0xfe0cc7(0x11d)]?I[_0xfe0cc7(0x112)]:I[_0xfe0cc7(0xf9)]},_0x31ba52=await this[_0xfe0cc7(0x124)][_0xfe0cc7(0x107)](_0xfe0cc7(0x140)+_0x3eeef0+_0xfe0cc7(0xe6),{'body':_0x53f00e});return!_0x31ba52[_0xfe0cc7(0x121)]['error']||_0x31ba52[_0xfe0cc7(0x121)][_0xfe0cc7(0x128)][_0xfe0cc7(0x125)]===0x1;}async[_0x4e17d9(0x103)](_0x11dc11,_0x11a1d4,_0x3f98b5,_0x550438){const _0x92860d=_0x4e17d9,_0x52f063={'memberId':(await this[_0x92860d(0xdb)][_0x92860d(0x12e)](_0x11dc11))[_0x92860d(0xe1)](),'threadId':_0x3f98b5,'replyId':_0x550438,'unitId':_0x11dc11},_0x47fb00=await this['_httpService'][_0x92860d(0x107)](_0x92860d(0x140)+_0x11dc11+_0x92860d(0x118),{'body':_0x52f063});return!_0x47fb00[_0x92860d(0x121)][_0x92860d(0x128)]||_0x47fb00['body'][_0x92860d(0x128)]['code']===0x1;}async[_0x4e17d9(0xf0)](_0x50f3b0,_0x249f60,_0x5b9591){const _0x5304b5=_0x4e17d9,_0x7e808c={'unitId':_0x50f3b0,'threadId':_0x5b9591},_0x559bef=await this[_0x5304b5(0x124)][_0x5304b5(0x107)](_0x5304b5(0x140)+_0x50f3b0+'/list',{'body':_0x7e808c}),_0x4adb69=_0x5b9591[_0x5304b5(0xf5)](_0x3de047=>G(_0x559bef[_0x5304b5(0x121)][_0x5304b5(0xd3)][_0x3de047],_0x50f3b0,_0x249f60))['filter'](Boolean);return Object[_0x5304b5(0xe0)](_0x559bef[_0x5304b5(0x121)][_0x5304b5(0x126)])[_0x5304b5(0x141)](_0x544ec3=>{const _0x48ffcc=_0x5304b5;this[_0x48ffcc(0xf2)][_0x48ffcc(0xfe)](_0x544ec3);}),_0x4adb69;}['saveCommentToSnapshot'](_0x4ea878){return{'id':_0x4ea878['id'],'threadId':_0x4ea878['threadId'],'ref':_0x4ea878['ref']};}};p=x([C(0x0,c[_0x4e17d9(0xd4)](P[_0x4e17d9(0x137)])),C(0x1,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),C(0x2,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0xfa)]))],p);var H=Object[_0x4e17d9(0x10b)],J=(_0x1c8b9c,_0x442ace,_0xa3f0f6,_0x4114a9)=>{const _0x35c6a4=_0x4e17d9;for(var _0x5cf295=_0x4114a9>0x1?void 0x0:_0x4114a9?H(_0x442ace,_0xa3f0f6):_0x442ace,_0x5c4051=_0x1c8b9c[_0x35c6a4(0x12b)]-0x1,_0x16ff27;_0x5c4051>=0x0;_0x5c4051--)(_0x16ff27=_0x1c8b9c[_0x5c4051])&&(_0x5cf295=_0x16ff27(_0x5cf295)||_0x5cf295);return _0x5cf295;},y=(_0x2e8f6e,_0x3af385)=>(_0x248e36,_0x104cbf)=>_0x3af385(_0x248e36,_0x104cbf,_0x2e8f6e);let g=class extends c[_0x4e17d9(0xfc)]{constructor(_0x59abb2,_0x333b9a){const _0x625d6f=_0x4e17d9;super(),this[_0x625d6f(0x102)]=_0x59abb2,this[_0x625d6f(0x101)]=_0x333b9a,this[_0x625d6f(0x105)]();}['_initDataSource'](){const _0x2927fb=_0x4e17d9;this[_0x2927fb(0x102)][_0x2927fb(0xe8)]=this['_threadCommentDataSource'],this[_0x2927fb(0x102)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4e17d9(0xeb)]),y(0x1,c[_0x4e17d9(0xd4)](p))],g);function _0x3823(_0x32c266,_0x26fd90){const _0x12be48=_0x12be();return _0x3823=function(_0x382373,_0x54a3ba){_0x382373=_0x382373-0xce;let _0x2c7e67=_0x12be48[_0x382373];return _0x2c7e67;},_0x3823(_0x32c266,_0x26fd90);}var F=Object[_0x4e17d9(0x130)],L=Object[_0x4e17d9(0x10b)],Z=(_0xe92ea8,_0x2cbfba,_0x4c975e)=>_0x2cbfba in _0xe92ea8?F(_0xe92ea8,_0x2cbfba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c975e}):_0xe92ea8[_0x2cbfba]=_0x4c975e,W=(_0xd1f9b1,_0x231c7a,_0x43656a,_0xbf70aa)=>{const _0x4b7489=_0x4e17d9;for(var _0x117c37=_0xbf70aa>0x1?void 0x0:_0xbf70aa?L(_0x231c7a,_0x43656a):_0x231c7a,_0x18a78d=_0xd1f9b1[_0x4b7489(0x12b)]-0x1,_0x78b8fe;_0x18a78d>=0x0;_0x18a78d--)(_0x78b8fe=_0xd1f9b1[_0x18a78d])&&(_0x117c37=_0x78b8fe(_0x117c37)||_0x117c37);return _0x117c37;},O=(_0x5d10b7,_0x20047c)=>(_0x2eb921,_0x48bb4d)=>_0x20047c(_0x2eb921,_0x48bb4d,_0x5d10b7),N=(_0x51112e,_0x454e1c,_0x3cfccb)=>Z(_0x51112e,typeof _0x454e1c!=_0x4e17d9(0x10c)?_0x454e1c+'':_0x454e1c,_0x3cfccb);exports[_0x4e17d9(0x135)]=class extends c[_0x4e17d9(0xde)]{constructor(_0x2c1584=D,_0x3ee91d,_0x117bbe){const _0xc15ccb=_0x4e17d9;super(),this[_0xc15ccb(0x131)]=_0x2c1584,this['_injector']=_0x3ee91d,this[_0xc15ccb(0xd2)]=_0x117bbe;const {..._0x5ea0da}=c[_0xc15ccb(0x142)]({},D,this[_0xc15ccb(0x131)]);this[_0xc15ccb(0xd2)][_0xc15ccb(0x13c)](q,_0x5ea0da);}[_0x4e17d9(0x12c)](){[[p],[g],[_]]['forEach'](_0x1897f5=>{const _0x492956=_0x3823;this[_0x492956(0x147)]['add'](_0x1897f5);});}[_0x4e17d9(0x134)](){const _0x4e9bcb=_0x4e17d9;this['_injector'][_0x4e9bcb(0x11c)](g),this['_injector'][_0x4e9bcb(0x11c)](_);}},N(exports[_0x4e17d9(0x135)],_0x4e17d9(0xdc),U),N(exports[_0x4e17d9(0x135)],_0x4e17d9(0x145),c['UniverInstanceType'][_0x4e17d9(0x148)]),exports[_0x4e17d9(0x135)]=W([c[_0x4e17d9(0xd5)](w[_0x4e17d9(0xf8)],b[_0x4e17d9(0xf7)],T[_0x4e17d9(0x10a)]),O(0x1,c[_0x4e17d9(0xd4)](c['Injector'])),O(0x2,c[_0x4e17d9(0x11e)])],exports[_0x4e17d9(0x135)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1c57(){const _0x4a1845=['_initDataSource','map','parentId','/add','syncUpdateMutationToColla','error','replyId','_initUserSync','user','_injector','Solved','22KLCfNk','_threadCommentModel','comments','values','reply','Edit','content','132gZSJNT','_threadCommentDataSourceService','threadId','8562294FRgmqS','filter','userID','stringify','replies','unitId','post','symbol','_configService','475500yUNqXq','find','root','body','UNIVER_UNKNOWN','getComment','setConfig','getUnit','onReady','/universer-api/comment/unit/','deleteComment','315387fcUwRU','addUser','solved','Reply','Add','UNRECOGNIZED','slice','createTimestamp','ref','comment','3076799FfTbgW','userId','listComments','getOwnPropertyDescriptor','62956szIVfH','get','onStarting','rangeType','format','141cXOcEl','_config','COMMENT','/edit','280FtvdKR','57520pndvXZ','add','getUser','getCurrentUser','_userService','size','addComment','updateComment','/delete','_sessionService','Solve','_threadCommentDataSource','parse','Unknown','129094wGlagb','users','getMemberID','disposeWithMe','saveCommentToSnapshot','thread-comment-data-source.config','requireSession','OpenOrReOpen','rangeId','_init','customRanges','type','code','personId','/universer-api/user/list','forEach','subscribe','/list','_httpService','410JTpVIM','dataSource','length','pipe','Delete','_commentService','YYYY/MM/DD\x20HH:mm'];_0x1c57=function(){return _0x4a1845;};return _0x1c57();}const _0x4589a6=_0x1bd1;(function(_0x1b20d8,_0x5927c1){const _0x306e6e=_0x1bd1,_0x1764cf=_0x1b20d8();while(!![]){try{const _0x2db186=parseInt(_0x306e6e(0xc8))/0x1*(-parseInt(_0x306e6e(0x9c))/0x2)+-parseInt(_0x306e6e(0xcd))/0x3*(parseInt(_0x306e6e(0xd2))/0x4)+-parseInt(_0x306e6e(0xaf))/0x5+parseInt(_0x306e6e(0xa6))/0x6+-parseInt(_0x306e6e(0xe0))/0x7*(parseInt(_0x306e6e(0xd1))/0x8)+-parseInt(_0x306e6e(0xba))/0x9*(parseInt(_0x306e6e(0xf3))/0xa)+-parseInt(_0x306e6e(0xc4))/0xb*(-parseInt(_0x306e6e(0xa3))/0xc);if(_0x2db186===_0x5927c1)break;else _0x1764cf['push'](_0x1764cf['shift']());}catch(_0x22e1d1){_0x1764cf['push'](_0x1764cf['shift']());}}}(_0x1c57,0xe9ebb));import{CommentService as _0x3e001d,CollaborationSessionService as _0x129018,UniverCollaborationClientPlugin as _0x6a1198}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17902a}from'@univerjs-pro/license';import{dayjs as _0x33562b,UserManagerService as _0x3332b7,Inject as _0x47535d,Injector as _0x4f1901,Disposable as _0x2a85ba,CustomRangeType as _0x13e826,UniverInstanceType as _0x4d3911,DependentOn as _0x1e604f,IConfigService as _0x23d4eb,Plugin as _0x184bc7,merge as _0x182991}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x552a21}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303fe8,IThreadCommentDataSourceService as _0x12c212}from'@univerjs/thread-comment';import{bufferTime as _0x4eed33}from'rxjs';import{HTTPService as _0x4c611f}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x123e23=>(_0x123e23[_0x123e23['OpenOrReOpen']=0x0]=_0x4589a6(0xe7),_0x123e23[_0x123e23[_0x4589a6(0x9b)]=0x1]=_0x4589a6(0x9b),_0x123e23[_0x123e23['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x123e23))(I||{}),v=(_0x4c7caa=>(_0x4c7caa[_0x4c7caa['Unknown']=0x0]=_0x4589a6(0xdf),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbe)]=0x1]='Add',_0x4c7caa[_0x4c7caa[_0x4589a6(0xbd)]=0x2]=_0x4589a6(0xbd),_0x4c7caa[_0x4c7caa[_0x4589a6(0xa1)]=0x3]=_0x4589a6(0xa1),_0x4c7caa[_0x4c7caa['Delete']=0x4]=_0x4589a6(0xf7),_0x4c7caa[_0x4c7caa['Solve']=0x5]=_0x4589a6(0xdc),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbf)]=-0x1]=_0x4589a6(0xbf),_0x4c7caa))(v||{});const y=_0x21aad6=>_0x33562b(new Date(+_0x21aad6))['format'](_0x4589a6(0xf9)),B=async(_0x30e199,_0x516f20)=>{const _0x55e5ad=_0x4589a6,_0x334845=_0x30e199[_0x55e5ad(0xc9)](_0x3332b7),_0x4884b0=_0x30e199[_0x55e5ad(0xc9)](_0x4c611f);_0x516f20['forEach'](_0x4546d9=>{const _0x5732ba=_0x55e5ad;_0x334845[_0x5732ba(0xd4)](_0x4546d9)&&_0x516f20['delete'](_0x4546d9);}),_0x516f20[_0x55e5ad(0xd7)]&&(await _0x4884b0[_0x55e5ad(0xc9)](_0x55e5ad(0xee),{'params':{'userIDs':[..._0x516f20]}}))[_0x55e5ad(0xb2)][_0x55e5ad(0xe1)]['forEach'](_0x5f258a=>{_0x5f258a&&_0x334845['addUser'](_0x5f258a);});};var K=Object[_0x4589a6(0xc7)],V=(_0x562410,_0x12efe4,_0x5b4d8e,_0x4d8fe2)=>{const _0xc4a07e=_0x4589a6;for(var _0x42e8ec=_0x4d8fe2>0x1?void 0x0:_0x4d8fe2?K(_0x12efe4,_0x5b4d8e):_0x12efe4,_0x8928a8=_0x562410[_0xc4a07e(0xf5)]-0x1,_0x253872;_0x8928a8>=0x0;_0x8928a8--)(_0x253872=_0x562410[_0x8928a8])&&(_0x42e8ec=_0x253872(_0x42e8ec)||_0x42e8ec);return _0x42e8ec;},p=(_0x5bfc56,_0x212204)=>(_0x2e604c,_0x19d794)=>_0x212204(_0x2e604c,_0x19d794,_0x5bfc56);let _=class extends _0x2a85ba{constructor(_0x5998f2,_0x3e1234,_0x64b3f0,_0x5c1143){const _0x3155b2=_0x4589a6;super(),this[_0x3155b2(0xf8)]=_0x5998f2,this[_0x3155b2(0x9d)]=_0x3e1234,this[_0x3155b2(0xd6)]=_0x64b3f0,this['_injector']=_0x5c1143,this['_init'](),this['_initUserSync']();}[_0x4589a6(0x101)](){const _0x5e4e03=_0x4589a6;this[_0x5e4e03(0xe3)](this[_0x5e4e03(0x9d)]['commentUpdate$'][_0x5e4e03(0xf6)](_0x4eed33(0x10))[_0x5e4e03(0xf0)](_0x52eac3=>{const _0x543bd1=_0x5e4e03,_0x35a8e1=new Set();_0x52eac3[_0x543bd1(0xef)](_0x3ab2eb=>{const _0x498e0c=_0x543bd1;switch(_0x3ab2eb[_0x498e0c(0xeb)]){case _0x498e0c(0xd3):{const _0x5209cb=_0x3ab2eb['payload'][_0x498e0c(0xed)];_0x35a8e1[_0x498e0c(0xd3)](_0x5209cb);break;}}}),B(this['_injector'],_0x35a8e1);}));}[_0x4589a6(0xe9)](){const _0x3c9f8e=_0x4589a6;this[_0x3c9f8e(0xe3)](this[_0x3c9f8e(0xf8)]['commentUpdate$']['subscribe'](async _0x407395=>{const _0x2a864e=_0x3c9f8e;var _0x57cdbe,_0x3f946f,_0x1748ba,_0x25824b;const _0x494809=(_0x57cdbe=this[_0x2a864e(0x9d)][_0x2a864e(0xb6)](_0x407395[_0x2a864e(0xab)])['find'](_0x1b145b=>_0x1b145b[_0x2a864e(0xa5)]===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x57cdbe[_0x2a864e(0xb1)];if(!_0x494809)return;const {unitId:_0x18d68b,subUnitId:_0x2aeab9}=_0x494809;switch(_0x407395[_0x2a864e(0x102)]&&this[_0x2a864e(0xd6)][_0x2a864e(0xbb)](_0x407395['user']),_0x407395[_0x2a864e(0xeb)]){case v[_0x2a864e(0xbe)]:break;case v[_0x2a864e(0xbd)]:{this['_threadCommentModel'][_0x2a864e(0xd8)](_0x18d68b,_0x2aeab9,{'unitId':_0x18d68b,'subUnitId':_0x2aeab9,'ref':'','id':_0x407395[_0x2a864e(0x100)],'dT':y(+_0x407395[_0x2a864e(0xc1)]),'threadId':_0x407395['threadId'],'personId':(_0x1748ba=(_0x3f946f=_0x407395['user'])==null?void 0x0:_0x3f946f['userID'])!=null?_0x1748ba:_0x407395['userId'],'text':JSON[_0x2a864e(0xde)](_0x407395['content']),'parentId':_0x494809['id']});break;}case v[_0x2a864e(0xf7)]:{const _0xd3fee4=this[_0x2a864e(0x9d)][_0x2a864e(0xb4)](_0x18d68b,_0x2aeab9,_0x407395[_0x2a864e(0x100)]);_0xd3fee4&&_0xd3fee4[_0x2a864e(0xfc)]&&this[_0x2a864e(0x9d)][_0x2a864e(0xb9)](_0x18d68b,_0x2aeab9,_0x407395['replyId']);break;}case v[_0x2a864e(0xa1)]:{this[_0x2a864e(0x9d)][_0x2a864e(0xd9)](_0x18d68b,_0x2aeab9,{'commentId':_0x407395[_0x2a864e(0x100)],'text':JSON['parse'](_0x407395[_0x2a864e(0xa2)])});break;}case v[_0x2a864e(0xdc)]:{const _0x97db8=(_0x25824b=this['_threadCommentModel'][_0x2a864e(0xb6)](_0x407395['unitId'])[_0x2a864e(0xb0)](_0x2e94f7=>_0x2e94f7['threadId']===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x25824b[_0x2a864e(0xb1)];_0x97db8&&this[_0x2a864e(0x9d)]['resolveComment'](_0x18d68b,_0x2aeab9,_0x97db8['id'],_0x407395['solved']===I[_0x2a864e(0x9b)]);break;}}}));}};_=V([p(0x0,_0x47535d(_0x3e001d)),p(0x1,_0x47535d(_0x303fe8)),p(0x2,_0x47535d(_0x3332b7)),p(0x3,_0x47535d(_0x4f1901))],_);const z=_0x4589a6(0xe5),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3dbf89,_0x5c8ab9,_0x1d19c4,_0x4c67b8)=>{for(var _0x3a174d=_0x4c67b8>0x1?void 0x0:_0x4c67b8?k(_0x5c8ab9,_0x1d19c4):_0x5c8ab9,_0x339383=_0x3dbf89['length']-0x1,_0xf2be25;_0x339383>=0x0;_0x339383--)(_0xf2be25=_0x3dbf89[_0x339383])&&(_0x3a174d=_0xf2be25(_0x3a174d)||_0x3a174d);return _0x3a174d;},b=(_0x386871,_0x3bd6ac)=>(_0xf6fd15,_0x5bad38)=>_0x3bd6ac(_0xf6fd15,_0x5bad38,_0x386871);function X(_0x29b28f,_0x537cf9){const _0x1baf58=_0x4589a6,_0x248932=_0x29b28f[_0x1baf58(0xaa)][0x0];return{..._0x537cf9,'id':_0x248932[_0x1baf58(0x100)],'resolved':_0x29b28f[_0x1baf58(0xbc)]===0x1,'dT':y(_0x248932[_0x1baf58(0xc1)]),'personId':_0x248932[_0x1baf58(0xc5)],'threadId':_0x248932[_0x1baf58(0xa5)]};}function ee(_0x33b920,_0x466321,_0xe864fd){const _0x51ec7b=_0x4589a6;var _0x42fd84,_0x4b3162;if(((_0x4b3162=(_0x42fd84=_0x33b920==null?void 0x0:_0x33b920['replies'])==null?void 0x0:_0x42fd84['length'])!=null?_0x4b3162:0x0)>0x0){const _0xdb8c41=(_0x21489c,_0x313910)=>({'id':_0x21489c[_0x51ec7b(0x100)],'threadId':_0x21489c['threadId'],'dT':y(_0x21489c[_0x51ec7b(0xc1)]),'personId':_0x21489c[_0x51ec7b(0xc5)],'resolved':_0x33b920[_0x51ec7b(0xbc)]===I[_0x51ec7b(0x9b)],'unitId':_0x466321,'subUnitId':_0xe864fd,'text':JSON[_0x51ec7b(0xde)](_0x21489c[_0x51ec7b(0xa2)]),'parentId':_0x313910}),_0x200632=_0xdb8c41(_0x33b920[_0x51ec7b(0xaa)][0x0]);return{..._0x200632,'children':_0x33b920[_0x51ec7b(0xaa)][_0x51ec7b(0xc0)](0x1)['map'](_0x56c7e3=>_0xdb8c41(_0x56c7e3,_0x200632['id']))};}return null;}let S=class{constructor(_0x1e435c,_0x48a72f,_0x6ad733){const _0x3a2ad9=_0x4589a6;this[_0x3a2ad9(0xf2)]=_0x1e435c,this['_userService']=_0x48a72f,this[_0x3a2ad9(0xdb)]=_0x6ad733;}async[_0x4589a6(0xd8)](_0x105acd){const _0x28666d=_0x4589a6;var _0x2d934e,_0x4f1f22;const {parentId:_0x4da64c,unitId:_0xa868e2,text:_0x19e15a,threadId:_0x2828b7}=_0x105acd,_0x188643=(_0x4f1f22=(_0x2d934e=_0x19e15a['customRanges'])==null?void 0x0:_0x2d934e[_0x28666d(0xa7)](_0x5aa96f=>_0x5aa96f[_0x28666d(0xcb)]===_0x13e826[_0x28666d(0xcf)])['map'](_0x28409d=>_0x28409d[_0x28666d(0xe8)]))!=null?_0x4f1f22:[],_0x5e662d=JSON['stringify'](_0x19e15a),_0x4e0d6c=(await this[_0x28666d(0xdb)][_0x28666d(0xe6)](_0xa868e2))[_0x28666d(0xe2)]();if(_0x4da64c){const _0x32cfc9={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643,'threadId':_0x2828b7},_0x4abd1b=(await this[_0x28666d(0xf2)]['post'](_0x28666d(0xb8)+_0xa868e2+'/reply',{'body':_0x32cfc9}))[_0x28666d(0xb2)][_0x28666d(0xa0)];return{..._0x105acd,'id':_0x4abd1b[_0x28666d(0x100)],'dT':_0x33562b(+_0x4abd1b[_0x28666d(0xc1)])[_0x28666d(0xcc)](_0x28666d(0xf9)),'personId':_0x4abd1b[_0x28666d(0xc5)]};}else{const _0x36cbb4={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643},_0x4e6e30=await this['_httpService'][_0x28666d(0xac)](_0x28666d(0xb8)+_0xa868e2+_0x28666d(0xfd),{'body':_0x36cbb4});return X(_0x4e6e30['body'][_0x28666d(0xc3)],_0x105acd);}}async[_0x4589a6(0xd9)](_0x287845){const _0x378c8b=_0x4589a6;var _0x403835,_0x213d3d;const {text:_0x34a9f6,unitId:_0xbf14af}=_0x287845,_0x49c389=(_0x213d3d=(_0x403835=_0x34a9f6[_0x378c8b(0xea)])==null?void 0x0:_0x403835[_0x378c8b(0xa7)](_0x42650c=>_0x42650c[_0x378c8b(0xcb)]===_0x13e826['COMMENT'])['map'](_0x5c875d=>_0x5c875d[_0x378c8b(0xe8)]))!=null?_0x213d3d:[],_0x99fdb9=JSON[_0x378c8b(0xa9)](_0x34a9f6),_0x235bd6=_0x287845[_0x378c8b(0xa5)],_0x5bdd0c=_0x287845['id'],_0x58ef65={'memberId':(await this[_0x378c8b(0xdb)]['requireSession'](_0xbf14af))[_0x378c8b(0xe2)](),'unitId':_0xbf14af,'threadId':_0x235bd6,'mention':_0x49c389,'content':_0x99fdb9,'replyId':_0x5bdd0c},_0x6d4a66=await this[_0x378c8b(0xf2)][_0x378c8b(0xac)](_0x378c8b(0xb8)+_0xbf14af+_0x378c8b(0xd0),{'body':_0x58ef65});return!_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)]||_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)][_0x378c8b(0xec)]===0x1;}async['resolveComment'](_0x46baa6){const _0x3823cb=_0x4589a6,{unitId:_0x11a346}=_0x46baa6,_0x5a0271=_0x46baa6[_0x3823cb(0xa5)],_0x165a5e={'memberId':this['_userService'][_0x3823cb(0xd5)]()[_0x3823cb(0xa8)],'unitId':_0x11a346,'threadId':_0x5a0271,'solved':_0x46baa6['resolved']?I[_0x3823cb(0x9b)]:I['OpenOrReOpen']},_0x418027=await this[_0x3823cb(0xf2)][_0x3823cb(0xac)](_0x3823cb(0xb8)+_0x11a346+'/solved',{'body':_0x165a5e});return!_0x418027['body'][_0x3823cb(0xff)]||_0x418027['body'][_0x3823cb(0xff)][_0x3823cb(0xec)]===0x1;}async[_0x4589a6(0xb9)](_0x2c6ca1,_0x58b8b6,_0x12a6af,_0x4b1619){const _0x3a3cd8=_0x4589a6,_0x32a16d={'memberId':(await this[_0x3a3cd8(0xdb)][_0x3a3cd8(0xe6)](_0x2c6ca1))[_0x3a3cd8(0xe2)](),'threadId':_0x12a6af,'replyId':_0x4b1619,'unitId':_0x2c6ca1},_0xf5fb88=await this[_0x3a3cd8(0xf2)][_0x3a3cd8(0xac)](_0x3a3cd8(0xb8)+_0x2c6ca1+_0x3a3cd8(0xda),{'body':_0x32a16d});return!_0xf5fb88[_0x3a3cd8(0xb2)]['error']||_0xf5fb88[_0x3a3cd8(0xb2)][_0x3a3cd8(0xff)][_0x3a3cd8(0xec)]===0x1;}async[_0x4589a6(0xc6)](_0x3e3ece,_0x5f07ed,_0x5e2438){const _0x541b63=_0x4589a6,_0x5ce53f={'unitId':_0x3e3ece,'threadId':_0x5e2438},_0x68f1b6=await this[_0x541b63(0xf2)][_0x541b63(0xac)](_0x541b63(0xb8)+_0x3e3ece+_0x541b63(0xf1),{'body':_0x5ce53f}),_0x594057=_0x5e2438[_0x541b63(0xfb)](_0x5ad9ee=>ee(_0x68f1b6[_0x541b63(0xb2)][_0x541b63(0x9e)][_0x5ad9ee],_0x3e3ece,_0x5f07ed))[_0x541b63(0xa7)](Boolean);return Object[_0x541b63(0x9f)](_0x68f1b6[_0x541b63(0xb2)]['users'])[_0x541b63(0xef)](_0x5f4ccc=>{const _0x4e0e27=_0x541b63;this[_0x4e0e27(0xd6)][_0x4e0e27(0xbb)](_0x5f4ccc);}),_0x594057;}[_0x4589a6(0xe4)](_0x3cf381){const _0x5e9f2b=_0x4589a6;return{'id':_0x3cf381['id'],'threadId':_0x3cf381[_0x5e9f2b(0xa5)],'ref':_0x3cf381[_0x5e9f2b(0xc2)]};}};function _0x1bd1(_0x464450,_0x6dbf5a){const _0x1c57ba=_0x1c57();return _0x1bd1=function(_0x1bd19d,_0xcc8ba2){_0x1bd19d=_0x1bd19d-0x9a;let _0xf55d8c=_0x1c57ba[_0x1bd19d];return _0xf55d8c;},_0x1bd1(_0x464450,_0x6dbf5a);}S=Q([b(0x0,_0x47535d(_0x4c611f)),b(0x1,_0x47535d(_0x3332b7)),b(0x2,_0x47535d(_0x129018))],S);var re=Object[_0x4589a6(0xc7)],te=(_0x55f8d7,_0x2327e3,_0x225e74,_0x29136d)=>{const _0x3c8df1=_0x4589a6;for(var _0x3fa651=_0x29136d>0x1?void 0x0:_0x29136d?re(_0x2327e3,_0x225e74):_0x2327e3,_0x1a4a77=_0x55f8d7[_0x3c8df1(0xf5)]-0x1,_0xb19a50;_0x1a4a77>=0x0;_0x1a4a77--)(_0xb19a50=_0x55f8d7[_0x1a4a77])&&(_0x3fa651=_0xb19a50(_0x3fa651)||_0x3fa651);return _0x3fa651;},M=(_0x506b64,_0x1ad209)=>(_0x4f4f38,_0x120751)=>_0x1ad209(_0x4f4f38,_0x120751,_0x506b64);let f=class extends _0x2a85ba{constructor(_0x3496d4,_0x3fbdf5){const _0x3edf0b=_0x4589a6;super(),this['_threadCommentDataSourceService']=_0x3496d4,this[_0x3edf0b(0xdd)]=_0x3fbdf5,this['_initDataSource']();}[_0x4589a6(0xfa)](){const _0x4332b8=_0x4589a6;this['_threadCommentDataSourceService'][_0x4332b8(0xf4)]=this[_0x4332b8(0xdd)],this[_0x4332b8(0xa4)][_0x4332b8(0xfe)]=!0x1;}};f=te([M(0x0,_0x12c212),M(0x1,_0x47535d(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x525286,_0x16ce9b,_0x46bb18)=>_0x16ce9b in _0x525286?se(_0x525286,_0x16ce9b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46bb18}):_0x525286[_0x16ce9b]=_0x46bb18,ie=(_0x5106c0,_0xb64b58,_0x199068,_0x564315)=>{const _0x5afb4c=_0x4589a6;for(var _0x5740b9=_0x564315>0x1?void 0x0:_0x564315?oe(_0xb64b58,_0x199068):_0xb64b58,_0x4506de=_0x5106c0[_0x5afb4c(0xf5)]-0x1,_0x218ede;_0x4506de>=0x0;_0x4506de--)(_0x218ede=_0x5106c0[_0x4506de])&&(_0x5740b9=_0x218ede(_0x5740b9)||_0x5740b9);return _0x5740b9;},N=(_0x2dea51,_0x119b59)=>(_0x1ed9a7,_0x4604d7)=>_0x119b59(_0x1ed9a7,_0x4604d7,_0x2dea51),$=(_0xb8e551,_0x15912c,_0x464698)=>ne(_0xb8e551,typeof _0x15912c!=_0x4589a6(0xad)?_0x15912c+'':_0x15912c,_0x464698);let g=class extends _0x184bc7{constructor(_0x5a8e08=O,_0x3a9771,_0x49786f){const _0x45e9d1=_0x4589a6;super(),this['_config']=_0x5a8e08,this[_0x45e9d1(0x9a)]=_0x3a9771,this[_0x45e9d1(0xae)]=_0x49786f;const {..._0x5e6f55}=_0x182991({},O,this[_0x45e9d1(0xce)]);this[_0x45e9d1(0xae)][_0x45e9d1(0xb5)](z,_0x5e6f55);}[_0x4589a6(0xca)](){[[S],[f],[_]]['forEach'](_0x3c24d5=>{this['_injector']['add'](_0x3c24d5);});}[_0x4589a6(0xb7)](){const _0x35a267=_0x4589a6;this['_injector'][_0x35a267(0xc9)](f),this[_0x35a267(0x9a)][_0x35a267(0xc9)](_);}};$(g,'pluginName',W),$(g,_0x4589a6(0xeb),_0x4d3911[_0x4589a6(0xb3)]),g=ie([_0x1e604f(_0x552a21,_0x6a1198,_0x17902a),N(0x1,_0x47535d(_0x4f1901)),N(0x2,_0x23d4eb)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1c57(){const _0x4a1845=['_initDataSource','map','parentId','/add','syncUpdateMutationToColla','error','replyId','_initUserSync','user','_injector','Solved','22KLCfNk','_threadCommentModel','comments','values','reply','Edit','content','132gZSJNT','_threadCommentDataSourceService','threadId','8562294FRgmqS','filter','userID','stringify','replies','unitId','post','symbol','_configService','475500yUNqXq','find','root','body','UNIVER_UNKNOWN','getComment','setConfig','getUnit','onReady','/universer-api/comment/unit/','deleteComment','315387fcUwRU','addUser','solved','Reply','Add','UNRECOGNIZED','slice','createTimestamp','ref','comment','3076799FfTbgW','userId','listComments','getOwnPropertyDescriptor','62956szIVfH','get','onStarting','rangeType','format','141cXOcEl','_config','COMMENT','/edit','280FtvdKR','57520pndvXZ','add','getUser','getCurrentUser','_userService','size','addComment','updateComment','/delete','_sessionService','Solve','_threadCommentDataSource','parse','Unknown','129094wGlagb','users','getMemberID','disposeWithMe','saveCommentToSnapshot','thread-comment-data-source.config','requireSession','OpenOrReOpen','rangeId','_init','customRanges','type','code','personId','/universer-api/user/list','forEach','subscribe','/list','_httpService','410JTpVIM','dataSource','length','pipe','Delete','_commentService','YYYY/MM/DD\x20HH:mm'];_0x1c57=function(){return _0x4a1845;};return _0x1c57();}const _0x4589a6=_0x1bd1;(function(_0x1b20d8,_0x5927c1){const _0x306e6e=_0x1bd1,_0x1764cf=_0x1b20d8();while(!![]){try{const _0x2db186=parseInt(_0x306e6e(0xc8))/0x1*(-parseInt(_0x306e6e(0x9c))/0x2)+-parseInt(_0x306e6e(0xcd))/0x3*(parseInt(_0x306e6e(0xd2))/0x4)+-parseInt(_0x306e6e(0xaf))/0x5+parseInt(_0x306e6e(0xa6))/0x6+-parseInt(_0x306e6e(0xe0))/0x7*(parseInt(_0x306e6e(0xd1))/0x8)+-parseInt(_0x306e6e(0xba))/0x9*(parseInt(_0x306e6e(0xf3))/0xa)+-parseInt(_0x306e6e(0xc4))/0xb*(-parseInt(_0x306e6e(0xa3))/0xc);if(_0x2db186===_0x5927c1)break;else _0x1764cf['push'](_0x1764cf['shift']());}catch(_0x22e1d1){_0x1764cf['push'](_0x1764cf['shift']());}}}(_0x1c57,0xe9ebb));import{CommentService as _0x3e001d,CollaborationSessionService as _0x129018,UniverCollaborationClientPlugin as _0x6a1198}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17902a}from'@univerjs-pro/license';import{dayjs as _0x33562b,UserManagerService as _0x3332b7,Inject as _0x47535d,Injector as _0x4f1901,Disposable as _0x2a85ba,CustomRangeType as _0x13e826,UniverInstanceType as _0x4d3911,DependentOn as _0x1e604f,IConfigService as _0x23d4eb,Plugin as _0x184bc7,merge as _0x182991}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x552a21}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303fe8,IThreadCommentDataSourceService as _0x12c212}from'@univerjs/thread-comment';import{bufferTime as _0x4eed33}from'rxjs';import{HTTPService as _0x4c611f}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x123e23=>(_0x123e23[_0x123e23['OpenOrReOpen']=0x0]=_0x4589a6(0xe7),_0x123e23[_0x123e23[_0x4589a6(0x9b)]=0x1]=_0x4589a6(0x9b),_0x123e23[_0x123e23['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x123e23))(I||{}),v=(_0x4c7caa=>(_0x4c7caa[_0x4c7caa['Unknown']=0x0]=_0x4589a6(0xdf),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbe)]=0x1]='Add',_0x4c7caa[_0x4c7caa[_0x4589a6(0xbd)]=0x2]=_0x4589a6(0xbd),_0x4c7caa[_0x4c7caa[_0x4589a6(0xa1)]=0x3]=_0x4589a6(0xa1),_0x4c7caa[_0x4c7caa['Delete']=0x4]=_0x4589a6(0xf7),_0x4c7caa[_0x4c7caa['Solve']=0x5]=_0x4589a6(0xdc),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbf)]=-0x1]=_0x4589a6(0xbf),_0x4c7caa))(v||{});const y=_0x21aad6=>_0x33562b(new Date(+_0x21aad6))['format'](_0x4589a6(0xf9)),B=async(_0x30e199,_0x516f20)=>{const _0x55e5ad=_0x4589a6,_0x334845=_0x30e199[_0x55e5ad(0xc9)](_0x3332b7),_0x4884b0=_0x30e199[_0x55e5ad(0xc9)](_0x4c611f);_0x516f20['forEach'](_0x4546d9=>{const _0x5732ba=_0x55e5ad;_0x334845[_0x5732ba(0xd4)](_0x4546d9)&&_0x516f20['delete'](_0x4546d9);}),_0x516f20[_0x55e5ad(0xd7)]&&(await _0x4884b0[_0x55e5ad(0xc9)](_0x55e5ad(0xee),{'params':{'userIDs':[..._0x516f20]}}))[_0x55e5ad(0xb2)][_0x55e5ad(0xe1)]['forEach'](_0x5f258a=>{_0x5f258a&&_0x334845['addUser'](_0x5f258a);});};var K=Object[_0x4589a6(0xc7)],V=(_0x562410,_0x12efe4,_0x5b4d8e,_0x4d8fe2)=>{const _0xc4a07e=_0x4589a6;for(var _0x42e8ec=_0x4d8fe2>0x1?void 0x0:_0x4d8fe2?K(_0x12efe4,_0x5b4d8e):_0x12efe4,_0x8928a8=_0x562410[_0xc4a07e(0xf5)]-0x1,_0x253872;_0x8928a8>=0x0;_0x8928a8--)(_0x253872=_0x562410[_0x8928a8])&&(_0x42e8ec=_0x253872(_0x42e8ec)||_0x42e8ec);return _0x42e8ec;},p=(_0x5bfc56,_0x212204)=>(_0x2e604c,_0x19d794)=>_0x212204(_0x2e604c,_0x19d794,_0x5bfc56);let _=class extends _0x2a85ba{constructor(_0x5998f2,_0x3e1234,_0x64b3f0,_0x5c1143){const _0x3155b2=_0x4589a6;super(),this[_0x3155b2(0xf8)]=_0x5998f2,this[_0x3155b2(0x9d)]=_0x3e1234,this[_0x3155b2(0xd6)]=_0x64b3f0,this['_injector']=_0x5c1143,this['_init'](),this['_initUserSync']();}[_0x4589a6(0x101)](){const _0x5e4e03=_0x4589a6;this[_0x5e4e03(0xe3)](this[_0x5e4e03(0x9d)]['commentUpdate$'][_0x5e4e03(0xf6)](_0x4eed33(0x10))[_0x5e4e03(0xf0)](_0x52eac3=>{const _0x543bd1=_0x5e4e03,_0x35a8e1=new Set();_0x52eac3[_0x543bd1(0xef)](_0x3ab2eb=>{const _0x498e0c=_0x543bd1;switch(_0x3ab2eb[_0x498e0c(0xeb)]){case _0x498e0c(0xd3):{const _0x5209cb=_0x3ab2eb['payload'][_0x498e0c(0xed)];_0x35a8e1[_0x498e0c(0xd3)](_0x5209cb);break;}}}),B(this['_injector'],_0x35a8e1);}));}[_0x4589a6(0xe9)](){const _0x3c9f8e=_0x4589a6;this[_0x3c9f8e(0xe3)](this[_0x3c9f8e(0xf8)]['commentUpdate$']['subscribe'](async _0x407395=>{const _0x2a864e=_0x3c9f8e;var _0x57cdbe,_0x3f946f,_0x1748ba,_0x25824b;const _0x494809=(_0x57cdbe=this[_0x2a864e(0x9d)][_0x2a864e(0xb6)](_0x407395[_0x2a864e(0xab)])['find'](_0x1b145b=>_0x1b145b[_0x2a864e(0xa5)]===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x57cdbe[_0x2a864e(0xb1)];if(!_0x494809)return;const {unitId:_0x18d68b,subUnitId:_0x2aeab9}=_0x494809;switch(_0x407395[_0x2a864e(0x102)]&&this[_0x2a864e(0xd6)][_0x2a864e(0xbb)](_0x407395['user']),_0x407395[_0x2a864e(0xeb)]){case v[_0x2a864e(0xbe)]:break;case v[_0x2a864e(0xbd)]:{this['_threadCommentModel'][_0x2a864e(0xd8)](_0x18d68b,_0x2aeab9,{'unitId':_0x18d68b,'subUnitId':_0x2aeab9,'ref':'','id':_0x407395[_0x2a864e(0x100)],'dT':y(+_0x407395[_0x2a864e(0xc1)]),'threadId':_0x407395['threadId'],'personId':(_0x1748ba=(_0x3f946f=_0x407395['user'])==null?void 0x0:_0x3f946f['userID'])!=null?_0x1748ba:_0x407395['userId'],'text':JSON[_0x2a864e(0xde)](_0x407395['content']),'parentId':_0x494809['id']});break;}case v[_0x2a864e(0xf7)]:{const _0xd3fee4=this[_0x2a864e(0x9d)][_0x2a864e(0xb4)](_0x18d68b,_0x2aeab9,_0x407395[_0x2a864e(0x100)]);_0xd3fee4&&_0xd3fee4[_0x2a864e(0xfc)]&&this[_0x2a864e(0x9d)][_0x2a864e(0xb9)](_0x18d68b,_0x2aeab9,_0x407395['replyId']);break;}case v[_0x2a864e(0xa1)]:{this[_0x2a864e(0x9d)][_0x2a864e(0xd9)](_0x18d68b,_0x2aeab9,{'commentId':_0x407395[_0x2a864e(0x100)],'text':JSON['parse'](_0x407395[_0x2a864e(0xa2)])});break;}case v[_0x2a864e(0xdc)]:{const _0x97db8=(_0x25824b=this['_threadCommentModel'][_0x2a864e(0xb6)](_0x407395['unitId'])[_0x2a864e(0xb0)](_0x2e94f7=>_0x2e94f7['threadId']===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x25824b[_0x2a864e(0xb1)];_0x97db8&&this[_0x2a864e(0x9d)]['resolveComment'](_0x18d68b,_0x2aeab9,_0x97db8['id'],_0x407395['solved']===I[_0x2a864e(0x9b)]);break;}}}));}};_=V([p(0x0,_0x47535d(_0x3e001d)),p(0x1,_0x47535d(_0x303fe8)),p(0x2,_0x47535d(_0x3332b7)),p(0x3,_0x47535d(_0x4f1901))],_);const z=_0x4589a6(0xe5),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3dbf89,_0x5c8ab9,_0x1d19c4,_0x4c67b8)=>{for(var _0x3a174d=_0x4c67b8>0x1?void 0x0:_0x4c67b8?k(_0x5c8ab9,_0x1d19c4):_0x5c8ab9,_0x339383=_0x3dbf89['length']-0x1,_0xf2be25;_0x339383>=0x0;_0x339383--)(_0xf2be25=_0x3dbf89[_0x339383])&&(_0x3a174d=_0xf2be25(_0x3a174d)||_0x3a174d);return _0x3a174d;},b=(_0x386871,_0x3bd6ac)=>(_0xf6fd15,_0x5bad38)=>_0x3bd6ac(_0xf6fd15,_0x5bad38,_0x386871);function X(_0x29b28f,_0x537cf9){const _0x1baf58=_0x4589a6,_0x248932=_0x29b28f[_0x1baf58(0xaa)][0x0];return{..._0x537cf9,'id':_0x248932[_0x1baf58(0x100)],'resolved':_0x29b28f[_0x1baf58(0xbc)]===0x1,'dT':y(_0x248932[_0x1baf58(0xc1)]),'personId':_0x248932[_0x1baf58(0xc5)],'threadId':_0x248932[_0x1baf58(0xa5)]};}function ee(_0x33b920,_0x466321,_0xe864fd){const _0x51ec7b=_0x4589a6;var _0x42fd84,_0x4b3162;if(((_0x4b3162=(_0x42fd84=_0x33b920==null?void 0x0:_0x33b920['replies'])==null?void 0x0:_0x42fd84['length'])!=null?_0x4b3162:0x0)>0x0){const _0xdb8c41=(_0x21489c,_0x313910)=>({'id':_0x21489c[_0x51ec7b(0x100)],'threadId':_0x21489c['threadId'],'dT':y(_0x21489c[_0x51ec7b(0xc1)]),'personId':_0x21489c[_0x51ec7b(0xc5)],'resolved':_0x33b920[_0x51ec7b(0xbc)]===I[_0x51ec7b(0x9b)],'unitId':_0x466321,'subUnitId':_0xe864fd,'text':JSON[_0x51ec7b(0xde)](_0x21489c[_0x51ec7b(0xa2)]),'parentId':_0x313910}),_0x200632=_0xdb8c41(_0x33b920[_0x51ec7b(0xaa)][0x0]);return{..._0x200632,'children':_0x33b920[_0x51ec7b(0xaa)][_0x51ec7b(0xc0)](0x1)['map'](_0x56c7e3=>_0xdb8c41(_0x56c7e3,_0x200632['id']))};}return null;}let S=class{constructor(_0x1e435c,_0x48a72f,_0x6ad733){const _0x3a2ad9=_0x4589a6;this[_0x3a2ad9(0xf2)]=_0x1e435c,this['_userService']=_0x48a72f,this[_0x3a2ad9(0xdb)]=_0x6ad733;}async[_0x4589a6(0xd8)](_0x105acd){const _0x28666d=_0x4589a6;var _0x2d934e,_0x4f1f22;const {parentId:_0x4da64c,unitId:_0xa868e2,text:_0x19e15a,threadId:_0x2828b7}=_0x105acd,_0x188643=(_0x4f1f22=(_0x2d934e=_0x19e15a['customRanges'])==null?void 0x0:_0x2d934e[_0x28666d(0xa7)](_0x5aa96f=>_0x5aa96f[_0x28666d(0xcb)]===_0x13e826[_0x28666d(0xcf)])['map'](_0x28409d=>_0x28409d[_0x28666d(0xe8)]))!=null?_0x4f1f22:[],_0x5e662d=JSON['stringify'](_0x19e15a),_0x4e0d6c=(await this[_0x28666d(0xdb)][_0x28666d(0xe6)](_0xa868e2))[_0x28666d(0xe2)]();if(_0x4da64c){const _0x32cfc9={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643,'threadId':_0x2828b7},_0x4abd1b=(await this[_0x28666d(0xf2)]['post'](_0x28666d(0xb8)+_0xa868e2+'/reply',{'body':_0x32cfc9}))[_0x28666d(0xb2)][_0x28666d(0xa0)];return{..._0x105acd,'id':_0x4abd1b[_0x28666d(0x100)],'dT':_0x33562b(+_0x4abd1b[_0x28666d(0xc1)])[_0x28666d(0xcc)](_0x28666d(0xf9)),'personId':_0x4abd1b[_0x28666d(0xc5)]};}else{const _0x36cbb4={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643},_0x4e6e30=await this['_httpService'][_0x28666d(0xac)](_0x28666d(0xb8)+_0xa868e2+_0x28666d(0xfd),{'body':_0x36cbb4});return X(_0x4e6e30['body'][_0x28666d(0xc3)],_0x105acd);}}async[_0x4589a6(0xd9)](_0x287845){const _0x378c8b=_0x4589a6;var _0x403835,_0x213d3d;const {text:_0x34a9f6,unitId:_0xbf14af}=_0x287845,_0x49c389=(_0x213d3d=(_0x403835=_0x34a9f6[_0x378c8b(0xea)])==null?void 0x0:_0x403835[_0x378c8b(0xa7)](_0x42650c=>_0x42650c[_0x378c8b(0xcb)]===_0x13e826['COMMENT'])['map'](_0x5c875d=>_0x5c875d[_0x378c8b(0xe8)]))!=null?_0x213d3d:[],_0x99fdb9=JSON[_0x378c8b(0xa9)](_0x34a9f6),_0x235bd6=_0x287845[_0x378c8b(0xa5)],_0x5bdd0c=_0x287845['id'],_0x58ef65={'memberId':(await this[_0x378c8b(0xdb)]['requireSession'](_0xbf14af))[_0x378c8b(0xe2)](),'unitId':_0xbf14af,'threadId':_0x235bd6,'mention':_0x49c389,'content':_0x99fdb9,'replyId':_0x5bdd0c},_0x6d4a66=await this[_0x378c8b(0xf2)][_0x378c8b(0xac)](_0x378c8b(0xb8)+_0xbf14af+_0x378c8b(0xd0),{'body':_0x58ef65});return!_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)]||_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)][_0x378c8b(0xec)]===0x1;}async['resolveComment'](_0x46baa6){const _0x3823cb=_0x4589a6,{unitId:_0x11a346}=_0x46baa6,_0x5a0271=_0x46baa6[_0x3823cb(0xa5)],_0x165a5e={'memberId':this['_userService'][_0x3823cb(0xd5)]()[_0x3823cb(0xa8)],'unitId':_0x11a346,'threadId':_0x5a0271,'solved':_0x46baa6['resolved']?I[_0x3823cb(0x9b)]:I['OpenOrReOpen']},_0x418027=await this[_0x3823cb(0xf2)][_0x3823cb(0xac)](_0x3823cb(0xb8)+_0x11a346+'/solved',{'body':_0x165a5e});return!_0x418027['body'][_0x3823cb(0xff)]||_0x418027['body'][_0x3823cb(0xff)][_0x3823cb(0xec)]===0x1;}async[_0x4589a6(0xb9)](_0x2c6ca1,_0x58b8b6,_0x12a6af,_0x4b1619){const _0x3a3cd8=_0x4589a6,_0x32a16d={'memberId':(await this[_0x3a3cd8(0xdb)][_0x3a3cd8(0xe6)](_0x2c6ca1))[_0x3a3cd8(0xe2)](),'threadId':_0x12a6af,'replyId':_0x4b1619,'unitId':_0x2c6ca1},_0xf5fb88=await this[_0x3a3cd8(0xf2)][_0x3a3cd8(0xac)](_0x3a3cd8(0xb8)+_0x2c6ca1+_0x3a3cd8(0xda),{'body':_0x32a16d});return!_0xf5fb88[_0x3a3cd8(0xb2)]['error']||_0xf5fb88[_0x3a3cd8(0xb2)][_0x3a3cd8(0xff)][_0x3a3cd8(0xec)]===0x1;}async[_0x4589a6(0xc6)](_0x3e3ece,_0x5f07ed,_0x5e2438){const _0x541b63=_0x4589a6,_0x5ce53f={'unitId':_0x3e3ece,'threadId':_0x5e2438},_0x68f1b6=await this[_0x541b63(0xf2)][_0x541b63(0xac)](_0x541b63(0xb8)+_0x3e3ece+_0x541b63(0xf1),{'body':_0x5ce53f}),_0x594057=_0x5e2438[_0x541b63(0xfb)](_0x5ad9ee=>ee(_0x68f1b6[_0x541b63(0xb2)][_0x541b63(0x9e)][_0x5ad9ee],_0x3e3ece,_0x5f07ed))[_0x541b63(0xa7)](Boolean);return Object[_0x541b63(0x9f)](_0x68f1b6[_0x541b63(0xb2)]['users'])[_0x541b63(0xef)](_0x5f4ccc=>{const _0x4e0e27=_0x541b63;this[_0x4e0e27(0xd6)][_0x4e0e27(0xbb)](_0x5f4ccc);}),_0x594057;}[_0x4589a6(0xe4)](_0x3cf381){const _0x5e9f2b=_0x4589a6;return{'id':_0x3cf381['id'],'threadId':_0x3cf381[_0x5e9f2b(0xa5)],'ref':_0x3cf381[_0x5e9f2b(0xc2)]};}};function _0x1bd1(_0x464450,_0x6dbf5a){const _0x1c57ba=_0x1c57();return _0x1bd1=function(_0x1bd19d,_0xcc8ba2){_0x1bd19d=_0x1bd19d-0x9a;let _0xf55d8c=_0x1c57ba[_0x1bd19d];return _0xf55d8c;},_0x1bd1(_0x464450,_0x6dbf5a);}S=Q([b(0x0,_0x47535d(_0x4c611f)),b(0x1,_0x47535d(_0x3332b7)),b(0x2,_0x47535d(_0x129018))],S);var re=Object[_0x4589a6(0xc7)],te=(_0x55f8d7,_0x2327e3,_0x225e74,_0x29136d)=>{const _0x3c8df1=_0x4589a6;for(var _0x3fa651=_0x29136d>0x1?void 0x0:_0x29136d?re(_0x2327e3,_0x225e74):_0x2327e3,_0x1a4a77=_0x55f8d7[_0x3c8df1(0xf5)]-0x1,_0xb19a50;_0x1a4a77>=0x0;_0x1a4a77--)(_0xb19a50=_0x55f8d7[_0x1a4a77])&&(_0x3fa651=_0xb19a50(_0x3fa651)||_0x3fa651);return _0x3fa651;},M=(_0x506b64,_0x1ad209)=>(_0x4f4f38,_0x120751)=>_0x1ad209(_0x4f4f38,_0x120751,_0x506b64);let f=class extends _0x2a85ba{constructor(_0x3496d4,_0x3fbdf5){const _0x3edf0b=_0x4589a6;super(),this['_threadCommentDataSourceService']=_0x3496d4,this[_0x3edf0b(0xdd)]=_0x3fbdf5,this['_initDataSource']();}[_0x4589a6(0xfa)](){const _0x4332b8=_0x4589a6;this['_threadCommentDataSourceService'][_0x4332b8(0xf4)]=this[_0x4332b8(0xdd)],this[_0x4332b8(0xa4)][_0x4332b8(0xfe)]=!0x1;}};f=te([M(0x0,_0x12c212),M(0x1,_0x47535d(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x525286,_0x16ce9b,_0x46bb18)=>_0x16ce9b in _0x525286?se(_0x525286,_0x16ce9b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46bb18}):_0x525286[_0x16ce9b]=_0x46bb18,ie=(_0x5106c0,_0xb64b58,_0x199068,_0x564315)=>{const _0x5afb4c=_0x4589a6;for(var _0x5740b9=_0x564315>0x1?void 0x0:_0x564315?oe(_0xb64b58,_0x199068):_0xb64b58,_0x4506de=_0x5106c0[_0x5afb4c(0xf5)]-0x1,_0x218ede;_0x4506de>=0x0;_0x4506de--)(_0x218ede=_0x5106c0[_0x4506de])&&(_0x5740b9=_0x218ede(_0x5740b9)||_0x5740b9);return _0x5740b9;},N=(_0x2dea51,_0x119b59)=>(_0x1ed9a7,_0x4604d7)=>_0x119b59(_0x1ed9a7,_0x4604d7,_0x2dea51),$=(_0xb8e551,_0x15912c,_0x464698)=>ne(_0xb8e551,typeof _0x15912c!=_0x4589a6(0xad)?_0x15912c+'':_0x15912c,_0x464698);let g=class extends _0x184bc7{constructor(_0x5a8e08=O,_0x3a9771,_0x49786f){const _0x45e9d1=_0x4589a6;super(),this['_config']=_0x5a8e08,this[_0x45e9d1(0x9a)]=_0x3a9771,this[_0x45e9d1(0xae)]=_0x49786f;const {..._0x5e6f55}=_0x182991({},O,this[_0x45e9d1(0xce)]);this[_0x45e9d1(0xae)][_0x45e9d1(0xb5)](z,_0x5e6f55);}[_0x4589a6(0xca)](){[[S],[f],[_]]['forEach'](_0x3c24d5=>{this['_injector']['add'](_0x3c24d5);});}[_0x4589a6(0xb7)](){const _0x35a267=_0x4589a6;this['_injector'][_0x35a267(0xc9)](f),this[_0x35a267(0x9a)][_0x35a267(0xc9)](_);}};$(g,'pluginName',W),$(g,_0x4589a6(0xeb),_0x4d3911[_0x4589a6(0xb3)]),g=ie([_0x1e604f(_0x552a21,_0x6a1198,_0x17902a),N(0x1,_0x47535d(_0x4f1901)),N(0x2,_0x23d4eb)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,2 +1,2 @@
1
- export { UniverThreadCommentDataSourcePlugin } from './plugin';
2
1
  export type { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
2
+ export { UniverThreadCommentDataSourcePlugin } from './plugin';
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x58ae0a,_0x19ce9d){const _0x1ff3ba=_0x7638,_0xf13bc5=_0x58ae0a();while(!![]){try{const _0x5a8d05=-parseInt(_0x1ff3ba(0x137))/0x1+parseInt(_0x1ff3ba(0x100))/0x2+parseInt(_0x1ff3ba(0xe3))/0x3*(parseInt(_0x1ff3ba(0xd9))/0x4)+parseInt(_0x1ff3ba(0xda))/0x5+-parseInt(_0x1ff3ba(0xf9))/0x6+-parseInt(_0x1ff3ba(0xd3))/0x7+-parseInt(_0x1ff3ba(0xd4))/0x8*(-parseInt(_0x1ff3ba(0x117))/0x9);if(_0x5a8d05===_0x19ce9d)break;else _0xf13bc5['push'](_0xf13bc5['shift']());}catch(_0x367a28){_0xf13bc5['push'](_0xf13bc5['shift']());}}}(_0xe519,0x7dcb7),function(_0x2988cb,_0xb2efc9){const _0x318f0d=_0x7638;typeof exports==_0x318f0d(0x13e)&&typeof module<'u'?_0xb2efc9(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x318f0d(0x10c)&&define['amd']?define([_0x318f0d(0xc5),_0x318f0d(0x119),_0x318f0d(0xea),_0x318f0d(0xdb),_0x318f0d(0xe4),_0x318f0d(0xd8),_0x318f0d(0x102),_0x318f0d(0xbb)],_0xb2efc9):(_0x2988cb=typeof globalThis<'u'?globalThis:_0x2988cb||self,_0xb2efc9(_0x2988cb[_0x318f0d(0x124)]={},_0x2988cb[_0x318f0d(0x135)],_0x2988cb[_0x318f0d(0x122)],_0x2988cb['UniverCore'],_0x2988cb[_0x318f0d(0xec)],_0x2988cb[_0x318f0d(0x126)],_0x2988cb[_0x318f0d(0x102)],_0x2988cb[_0x318f0d(0xc7)]));}(this,function(_0x16275a,_0x4f69e9,_0x28b4d5,_0x34c685,_0x52e5cc,_0x2e97f3,_0x26b64f,_0x2b4a22){'use strict';const _0x239c63=_0x7638;const _0x4409fc=_0x239c63(0x128);var _0x530123=(_0x1b9f56=>(_0x1b9f56[_0x1b9f56[_0x239c63(0x115)]=0x0]=_0x239c63(0x115),_0x1b9f56[_0x1b9f56['Solved']=0x1]=_0x239c63(0xdc),_0x1b9f56[_0x1b9f56[_0x239c63(0x118)]=-0x1]=_0x239c63(0x118),_0x1b9f56))(_0x530123||{}),_0x39a9ec=(_0x1d1e5a=>(_0x1d1e5a[_0x1d1e5a[_0x239c63(0x127)]=0x0]=_0x239c63(0x127),_0x1d1e5a[_0x1d1e5a[_0x239c63(0x12f)]=0x1]='Add',_0x1d1e5a[_0x1d1e5a[_0x239c63(0x130)]=0x2]=_0x239c63(0x130),_0x1d1e5a[_0x1d1e5a[_0x239c63(0x129)]=0x3]=_0x239c63(0x129),_0x1d1e5a[_0x1d1e5a[_0x239c63(0x106)]=0x4]='Delete',_0x1d1e5a[_0x1d1e5a[_0x239c63(0x116)]=0x5]='Solve',_0x1d1e5a[_0x1d1e5a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d1e5a))(_0x39a9ec||{});const _0x4fe706=_0x33b28d=>_0x34c685[_0x239c63(0xc2)](new Date(+_0x33b28d))[_0x239c63(0xef)](_0x239c63(0x105)),_0x4ae220=async(_0xfe2ef2,_0x56debd)=>{const _0x4f02e0=_0x239c63,_0x35c311=_0xfe2ef2[_0x4f02e0(0x11e)](_0x34c685[_0x4f02e0(0x131)]),_0x2de2a5=_0xfe2ef2[_0x4f02e0(0x11e)](_0x2b4a22[_0x4f02e0(0xbc)]);_0x56debd[_0x4f02e0(0xf4)](_0x76788e=>{_0x35c311['getUser'](_0x76788e)&&_0x56debd['delete'](_0x76788e);}),_0x56debd[_0x4f02e0(0x114)]&&(await _0x2de2a5['get'](_0x4f02e0(0xe6),{'params':{'userIDs':[..._0x56debd]}}))[_0x4f02e0(0xdd)][_0x4f02e0(0xc9)][_0x4f02e0(0xf4)](_0x3865bd=>{const _0x325db3=_0x4f02e0;_0x3865bd&&_0x35c311[_0x325db3(0x10f)](_0x3865bd);});};var _0x3b66e8=Object[_0x239c63(0x104)],_0x413f0e=(_0x535193,_0x29859a,_0x18f4ae,_0x10a72a)=>{const _0x1266ba=_0x239c63;for(var _0x3ed0ef=_0x10a72a>0x1?void 0x0:_0x10a72a?_0x3b66e8(_0x29859a,_0x18f4ae):_0x29859a,_0x302928=_0x535193[_0x1266ba(0x13b)]-0x1,_0x2acb82;_0x302928>=0x0;_0x302928--)(_0x2acb82=_0x535193[_0x302928])&&(_0x3ed0ef=_0x2acb82(_0x3ed0ef)||_0x3ed0ef);return _0x3ed0ef;},_0x1022a9=(_0x410d96,_0x55bb44)=>(_0x3cbaff,_0x187a02)=>_0x55bb44(_0x3cbaff,_0x187a02,_0x410d96);let _0x77681a=class extends _0x34c685[_0x239c63(0xf1)]{constructor(_0x85b78c,_0x17a39d,_0x5d9d5f,_0x3fb444){const _0x238180=_0x239c63;super(),this[_0x238180(0xf6)]=_0x85b78c,this['_threadCommentModel']=_0x17a39d,this[_0x238180(0x10e)]=_0x5d9d5f,this[_0x238180(0xe1)]=_0x3fb444,this[_0x238180(0xcf)](),this[_0x238180(0x142)]();}['_initUserSync'](){const _0x51513a=_0x239c63;this[_0x51513a(0xc6)](this[_0x51513a(0x109)][_0x51513a(0x123)][_0x51513a(0xd6)](_0x26b64f[_0x51513a(0xe5)](0x10))[_0x51513a(0x11d)](_0xb2471a=>{const _0x5999f4=_0x51513a,_0x65dd4f=new Set();_0xb2471a[_0x5999f4(0xf4)](_0x3f576f=>{const _0x4facdc=_0x5999f4;switch(_0x3f576f[_0x4facdc(0x111)]){case'add':{const _0xb464e0=_0x3f576f['payload'][_0x4facdc(0xfd)];_0x65dd4f[_0x4facdc(0x125)](_0xb464e0);break;}}}),_0x4ae220(this['_injector'],_0x65dd4f);}));}[_0x239c63(0xcf)](){const _0x5f4ae5=_0x239c63;this[_0x5f4ae5(0xc6)](this[_0x5f4ae5(0xf6)][_0x5f4ae5(0x123)][_0x5f4ae5(0x11d)](async _0x239cb=>{const _0x130b46=_0x5f4ae5;var _0x3c3945,_0x564f0e,_0x47f330,_0x5a3845;const _0x312a62=(_0x3c3945=this[_0x130b46(0x109)][_0x130b46(0x12a)](_0x239cb[_0x130b46(0xd1)])[_0x130b46(0xce)](_0x2561f1=>_0x2561f1[_0x130b46(0xcd)]===_0x239cb[_0x130b46(0xcd)]))==null?void 0x0:_0x3c3945[_0x130b46(0xe9)];if(!_0x312a62)return;const {unitId:_0x3775e9,subUnitId:_0x9d75d6}=_0x312a62;switch(_0x239cb[_0x130b46(0xf7)]&&this[_0x130b46(0x10e)]['addUser'](_0x239cb[_0x130b46(0xf7)]),_0x239cb[_0x130b46(0x111)]){case _0x39a9ec['Add']:break;case _0x39a9ec[_0x130b46(0x130)]:{this[_0x130b46(0x109)]['addComment'](_0x3775e9,_0x9d75d6,{'unitId':_0x3775e9,'subUnitId':_0x9d75d6,'ref':'','id':_0x239cb[_0x130b46(0xfa)],'dT':_0x4fe706(+_0x239cb[_0x130b46(0x112)]),'threadId':_0x239cb[_0x130b46(0xcd)],'personId':(_0x47f330=(_0x564f0e=_0x239cb['user'])==null?void 0x0:_0x564f0e[_0x130b46(0x120)])!=null?_0x47f330:_0x239cb[_0x130b46(0x113)],'text':JSON[_0x130b46(0xf2)](_0x239cb[_0x130b46(0xc3)]),'parentId':_0x312a62['id']});break;}case _0x39a9ec[_0x130b46(0x106)]:{const _0x10d1f2=this[_0x130b46(0x109)]['getComment'](_0x3775e9,_0x9d75d6,_0x239cb[_0x130b46(0xfa)]);_0x10d1f2&&_0x10d1f2[_0x130b46(0x13f)]&&this['_threadCommentModel'][_0x130b46(0xbf)](_0x3775e9,_0x9d75d6,_0x239cb['replyId']);break;}case _0x39a9ec[_0x130b46(0x129)]:{this[_0x130b46(0x109)][_0x130b46(0x11c)](_0x3775e9,_0x9d75d6,{'commentId':_0x239cb[_0x130b46(0xfa)],'text':JSON[_0x130b46(0xf2)](_0x239cb[_0x130b46(0xc3)])});break;}case _0x39a9ec[_0x130b46(0x116)]:{const _0x31d39a=(_0x5a3845=this[_0x130b46(0x109)][_0x130b46(0x12a)](_0x239cb['unitId'])[_0x130b46(0xce)](_0x343705=>_0x343705['threadId']===_0x239cb[_0x130b46(0xcd)]))==null?void 0x0:_0x5a3845[_0x130b46(0xe9)];_0x31d39a&&this[_0x130b46(0x109)][_0x130b46(0xe7)](_0x3775e9,_0x9d75d6,_0x31d39a['id'],_0x239cb['solved']===_0x530123[_0x130b46(0xdc)]);break;}}}));}};_0x77681a=_0x413f0e([_0x1022a9(0x0,_0x34c685[_0x239c63(0xc8)](_0x4f69e9[_0x239c63(0x12b)])),_0x1022a9(0x1,_0x34c685['Inject'](_0x2e97f3[_0x239c63(0xbe)])),_0x1022a9(0x2,_0x34c685[_0x239c63(0xc8)](_0x34c685[_0x239c63(0x131)])),_0x1022a9(0x3,_0x34c685[_0x239c63(0xc8)](_0x34c685[_0x239c63(0xee)]))],_0x77681a);const _0x41e39d=_0x239c63(0xfc),_0x1a9661={};var _0x388e91=Object[_0x239c63(0x104)],_0x331c35=(_0x34af7b,_0x4d8035,_0x2c2d53,_0x23d5e2)=>{const _0x4eff5a=_0x239c63;for(var _0xe74b26=_0x23d5e2>0x1?void 0x0:_0x23d5e2?_0x388e91(_0x4d8035,_0x2c2d53):_0x4d8035,_0x26a510=_0x34af7b[_0x4eff5a(0x13b)]-0x1,_0x34eb44;_0x26a510>=0x0;_0x26a510--)(_0x34eb44=_0x34af7b[_0x26a510])&&(_0xe74b26=_0x34eb44(_0xe74b26)||_0xe74b26);return _0xe74b26;},_0x3bf7e3=(_0x37b715,_0x52d60e)=>(_0x2c68cf,_0x5224ec)=>_0x52d60e(_0x2c68cf,_0x5224ec,_0x37b715);function _0x39a84d(_0x2b2b6,_0x605b9b){const _0x2d5bc8=_0x239c63,_0x46c615=_0x2b2b6['replies'][0x0];return{..._0x605b9b,'id':_0x46c615[_0x2d5bc8(0xfa)],'resolved':_0x2b2b6[_0x2d5bc8(0xe2)]===0x1,'dT':_0x4fe706(_0x46c615['createTimestamp']),'personId':_0x46c615[_0x2d5bc8(0x113)],'threadId':_0x46c615['threadId']};}function _0x54cef2(_0x2a6915,_0x4c70a9,_0x13efab){const _0x17dc55=_0x239c63;var _0x20c6f9,_0x3b05a9;if(((_0x3b05a9=(_0x20c6f9=_0x2a6915==null?void 0x0:_0x2a6915[_0x17dc55(0x103)])==null?void 0x0:_0x20c6f9[_0x17dc55(0x13b)])!=null?_0x3b05a9:0x0)>0x0){const _0x5045ff=(_0x18e982,_0x33e663)=>({'id':_0x18e982[_0x17dc55(0xfa)],'threadId':_0x18e982['threadId'],'dT':_0x4fe706(_0x18e982['createTimestamp']),'personId':_0x18e982['userId'],'resolved':_0x2a6915[_0x17dc55(0xe2)]===_0x530123['Solved'],'unitId':_0x4c70a9,'subUnitId':_0x13efab,'text':JSON[_0x17dc55(0xf2)](_0x18e982[_0x17dc55(0xc3)]),'parentId':_0x33e663}),_0xdbcc43=_0x5045ff(_0x2a6915['replies'][0x0]);return{..._0xdbcc43,'children':_0x2a6915['replies'][_0x17dc55(0x13c)](0x1)[_0x17dc55(0xde)](_0x3b7a7a=>_0x5045ff(_0x3b7a7a,_0xdbcc43['id']))};}return null;}let _0x26605f=class{constructor(_0x2de2b5,_0xf99852,_0x3b6424){const _0x3715ce=_0x239c63;this['_httpService']=_0x2de2b5,this[_0x3715ce(0x10e)]=_0xf99852,this[_0x3715ce(0x141)]=_0x3b6424;}async[_0x239c63(0x10b)](_0x31390c){const _0x112f8f=_0x239c63;var _0x420cb3,_0x27fec2;const {parentId:_0x5711de,unitId:_0x5eee57,text:_0x179a85,threadId:_0x36f6fc}=_0x31390c,_0x1b1e54=(_0x27fec2=(_0x420cb3=_0x179a85[_0x112f8f(0x138)])==null?void 0x0:_0x420cb3[_0x112f8f(0x134)](_0xc652a7=>_0xc652a7[_0x112f8f(0xeb)]===_0x34c685[_0x112f8f(0xbd)]['COMMENT'])[_0x112f8f(0xde)](_0xc46de0=>_0xc46de0[_0x112f8f(0x13d)]))!=null?_0x27fec2:[],_0x3f0d9d=JSON[_0x112f8f(0x12e)](_0x179a85),_0x20282e=(await this[_0x112f8f(0x141)][_0x112f8f(0xcc)](_0x5eee57))[_0x112f8f(0xf8)]();if(_0x5711de){const _0x3f003e={'memberId':_0x20282e,'unitId':_0x5eee57,'content':_0x3f0d9d,'mention':_0x1b1e54,'threadId':_0x36f6fc},_0x3437ef=(await this[_0x112f8f(0xcb)][_0x112f8f(0xfe)](_0x112f8f(0x10a)+_0x5eee57+_0x112f8f(0xff),{'body':_0x3f003e}))[_0x112f8f(0xdd)][_0x112f8f(0xd7)];return{..._0x31390c,'id':_0x3437ef[_0x112f8f(0xfa)],'dT':_0x34c685[_0x112f8f(0xc2)](+_0x3437ef[_0x112f8f(0x112)])[_0x112f8f(0xef)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3437ef[_0x112f8f(0x113)]};}else{const _0x36798a={'memberId':_0x20282e,'unitId':_0x5eee57,'content':_0x3f0d9d,'mention':_0x1b1e54},_0x58b5a3=await this[_0x112f8f(0xcb)][_0x112f8f(0xfe)](_0x112f8f(0x10a)+_0x5eee57+_0x112f8f(0xe8),{'body':_0x36798a});return _0x39a84d(_0x58b5a3[_0x112f8f(0xdd)][_0x112f8f(0xc4)],_0x31390c);}}async[_0x239c63(0x11c)](_0x2cded0){const _0x217fa6=_0x239c63;var _0x476dba,_0x965644;const {text:_0x6a4e7f,unitId:_0x326263}=_0x2cded0,_0x75292=(_0x965644=(_0x476dba=_0x6a4e7f[_0x217fa6(0x138)])==null?void 0x0:_0x476dba[_0x217fa6(0x134)](_0x52d145=>_0x52d145[_0x217fa6(0xeb)]===_0x34c685[_0x217fa6(0xbd)][_0x217fa6(0x121)])[_0x217fa6(0xde)](_0x2ad2d1=>_0x2ad2d1['rangeId']))!=null?_0x965644:[],_0xaae888=JSON[_0x217fa6(0x12e)](_0x6a4e7f),_0x32328f=_0x2cded0[_0x217fa6(0xcd)],_0x5e58db=_0x2cded0['id'],_0x58e0ef={'memberId':(await this[_0x217fa6(0x141)][_0x217fa6(0xcc)](_0x326263))[_0x217fa6(0xf8)](),'unitId':_0x326263,'threadId':_0x32328f,'mention':_0x75292,'content':_0xaae888,'replyId':_0x5e58db},_0x3abc08=await this['_httpService'][_0x217fa6(0xfe)]('/universer-api/comment/unit/'+_0x326263+'/edit',{'body':_0x58e0ef});return!_0x3abc08[_0x217fa6(0xdd)]['error']||_0x3abc08['body'][_0x217fa6(0x136)][_0x217fa6(0xd5)]===0x1;}async[_0x239c63(0xe7)](_0x12a91e){const _0x23b6f5=_0x239c63,{unitId:_0x53db0c}=_0x12a91e,_0x3cd344=_0x12a91e[_0x23b6f5(0xcd)],_0x5bfb14={'memberId':this['_userService'][_0x23b6f5(0x133)]()[_0x23b6f5(0x120)],'unitId':_0x53db0c,'threadId':_0x3cd344,'solved':_0x12a91e[_0x23b6f5(0xc1)]?_0x530123['Solved']:_0x530123[_0x23b6f5(0x115)]},_0x5c3471=await this[_0x23b6f5(0xcb)][_0x23b6f5(0xfe)](_0x23b6f5(0x10a)+_0x53db0c+_0x23b6f5(0xe0),{'body':_0x5bfb14});return!_0x5c3471[_0x23b6f5(0xdd)][_0x23b6f5(0x136)]||_0x5c3471['body'][_0x23b6f5(0x136)]['code']===0x1;}async[_0x239c63(0xbf)](_0xaa7af1,_0xc4d376,_0x4b287b,_0x33c18b){const _0x432f45=_0x239c63,_0x4b51ff={'memberId':(await this[_0x432f45(0x141)]['requireSession'](_0xaa7af1))['getMemberID'](),'threadId':_0x4b287b,'replyId':_0x33c18b,'unitId':_0xaa7af1},_0x20f633=await this[_0x432f45(0xcb)][_0x432f45(0xfe)]('/universer-api/comment/unit/'+_0xaa7af1+'/delete',{'body':_0x4b51ff});return!_0x20f633[_0x432f45(0xdd)]['error']||_0x20f633[_0x432f45(0xdd)]['error']['code']===0x1;}async[_0x239c63(0xdf)](_0x327f8d,_0x16cea5,_0x256086){const _0x474533=_0x239c63,_0x310596={'unitId':_0x327f8d,'threadId':_0x256086},_0x574149=await this[_0x474533(0xcb)][_0x474533(0xfe)](_0x474533(0x10a)+_0x327f8d+'/list',{'body':_0x310596}),_0x3abbb4=_0x256086['map'](_0x3ead63=>_0x54cef2(_0x574149[_0x474533(0xdd)]['comments'][_0x3ead63],_0x327f8d,_0x16cea5))[_0x474533(0x134)](Boolean);return Object[_0x474533(0x10d)](_0x574149[_0x474533(0xdd)][_0x474533(0xc9)])[_0x474533(0xf4)](_0x5b537e=>{const _0x2494bd=_0x474533;this[_0x2494bd(0x10e)][_0x2494bd(0x10f)](_0x5b537e);}),_0x3abbb4;}['saveCommentToSnapshot'](_0x13f506){const _0x5f1cde=_0x239c63;return{'id':_0x13f506['id'],'threadId':_0x13f506['threadId'],'ref':_0x13f506[_0x5f1cde(0x12d)]};}};_0x26605f=_0x331c35([_0x3bf7e3(0x0,_0x34c685['Inject'](_0x2b4a22[_0x239c63(0xbc)])),_0x3bf7e3(0x1,_0x34c685[_0x239c63(0xc8)](_0x34c685[_0x239c63(0x131)])),_0x3bf7e3(0x2,_0x34c685[_0x239c63(0xc8)](_0x4f69e9[_0x239c63(0xd0)]))],_0x26605f);var _0x42669c=Object[_0x239c63(0x104)],_0x303669=(_0x4f5f59,_0x2cb32e,_0xcd501e,_0x3c2c1a)=>{for(var _0x2cfa21=_0x3c2c1a>0x1?void 0x0:_0x3c2c1a?_0x42669c(_0x2cb32e,_0xcd501e):_0x2cb32e,_0x3bd727=_0x4f5f59['length']-0x1,_0x7f5e03;_0x3bd727>=0x0;_0x3bd727--)(_0x7f5e03=_0x4f5f59[_0x3bd727])&&(_0x2cfa21=_0x7f5e03(_0x2cfa21)||_0x2cfa21);return _0x2cfa21;},_0x5e7ae4=(_0x230f55,_0x8759d3)=>(_0x537852,_0x464867)=>_0x8759d3(_0x537852,_0x464867,_0x230f55);let _0x2335e5=class extends _0x34c685[_0x239c63(0xf1)]{constructor(_0x33f9ad,_0x45eddb){const _0x15770c=_0x239c63;super(),this['_threadCommentDataSourceService']=_0x33f9ad,this[_0x15770c(0xf0)]=_0x45eddb,this[_0x15770c(0x12c)]();}[_0x239c63(0x12c)](){const _0x4b5836=_0x239c63;this[_0x4b5836(0x101)][_0x4b5836(0x108)]=this[_0x4b5836(0xf0)],this[_0x4b5836(0x101)][_0x4b5836(0x139)]=!0x1;}};_0x2335e5=_0x303669([_0x5e7ae4(0x0,_0x2e97f3[_0x239c63(0x132)]),_0x5e7ae4(0x1,_0x34c685[_0x239c63(0xc8)](_0x26605f))],_0x2335e5);var _0x481b8c=Object[_0x239c63(0x11b)],_0x463073=Object['getOwnPropertyDescriptor'],_0x4632d5=(_0x510155,_0x25c0ec,_0x548634)=>_0x25c0ec in _0x510155?_0x481b8c(_0x510155,_0x25c0ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x548634}):_0x510155[_0x25c0ec]=_0x548634,_0x5579fa=(_0x358d44,_0x444eda,_0x2a0c65,_0x164993)=>{for(var _0x32cbd5=_0x164993>0x1?void 0x0:_0x164993?_0x463073(_0x444eda,_0x2a0c65):_0x444eda,_0x44efc5=_0x358d44['length']-0x1,_0x198508;_0x44efc5>=0x0;_0x44efc5--)(_0x198508=_0x358d44[_0x44efc5])&&(_0x32cbd5=_0x198508(_0x32cbd5)||_0x32cbd5);return _0x32cbd5;},_0x391ade=(_0x51fd08,_0x49952a)=>(_0x581669,_0x4e9420)=>_0x49952a(_0x581669,_0x4e9420,_0x51fd08),_0x2563b6=(_0x3a1ef6,_0x146ad8,_0x5a2fc1)=>_0x4632d5(_0x3a1ef6,typeof _0x146ad8!=_0x239c63(0x107)?_0x146ad8+'':_0x146ad8,_0x5a2fc1);_0x16275a[_0x239c63(0x11f)]=class extends _0x34c685['Plugin']{constructor(_0x3f03a8=_0x1a9661,_0x251c32,_0x4c9f59){const _0x17d2ce=_0x239c63;super(),this[_0x17d2ce(0x11a)]=_0x3f03a8,this[_0x17d2ce(0xe1)]=_0x251c32,this[_0x17d2ce(0x140)]=_0x4c9f59;const {..._0x3bd0bc}=_0x34c685[_0x17d2ce(0x110)]({},_0x1a9661,this[_0x17d2ce(0x11a)]);this[_0x17d2ce(0x140)][_0x17d2ce(0xca)](_0x41e39d,_0x3bd0bc);}[_0x239c63(0xc0)](){const _0x3def2c=_0x239c63;[[_0x26605f],[_0x2335e5],[_0x77681a]][_0x3def2c(0xf4)](_0x2afb59=>{const _0x2aa538=_0x3def2c;this[_0x2aa538(0xe1)]['add'](_0x2afb59);});}['onReady'](){const _0xaf6f7b=_0x239c63;this[_0xaf6f7b(0xe1)][_0xaf6f7b(0x11e)](_0x2335e5),this[_0xaf6f7b(0xe1)][_0xaf6f7b(0x11e)](_0x77681a);}},_0x2563b6(_0x16275a[_0x239c63(0x11f)],_0x239c63(0xd2),_0x4409fc),_0x2563b6(_0x16275a[_0x239c63(0x11f)],_0x239c63(0x111),_0x34c685['UniverInstanceType'][_0x239c63(0xfb)]),_0x16275a['UniverThreadCommentDataSourcePlugin']=_0x5579fa([_0x34c685['DependentOn'](_0x52e5cc[_0x239c63(0xed)],_0x4f69e9['UniverCollaborationClientPlugin'],_0x28b4d5[_0x239c63(0x143)]),_0x391ade(0x1,_0x34c685['Inject'](_0x34c685['Injector'])),_0x391ade(0x2,_0x34c685[_0x239c63(0x13a)])],_0x16275a['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x16275a,Symbol[_0x239c63(0xf5)],{'value':_0x239c63(0xf3)});}));function _0x7638(_0x3974f9,_0x8f1778){const _0xe5196=_0xe519();return _0x7638=function(_0x7638cf,_0x5090e7){_0x7638cf=_0x7638cf-0xbb;let _0x1c1700=_0xe5196[_0x7638cf];return _0x1c1700;},_0x7638(_0x3974f9,_0x8f1778);}function _0xe519(){const _0x2ae0c3=['values','_userService','addUser','merge','type','createTimestamp','userId','size','OpenOrReOpen','Solve','99SfrwHz','UNRECOGNIZED','@univerjs-pro/collaboration-client','_config','defineProperty','updateComment','subscribe','get','UniverThreadCommentDataSourcePlugin','userID','COMMENT','UniverProLicense','commentUpdate$','UniverProThreadCommentDatasource','add','UniverThreadComment','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','getUnit','CommentService','_initDataSource','ref','stringify','Add','Reply','UserManagerService','IThreadCommentDataSourceService','getCurrentUser','filter','UniverProCollaborationClient','error','736128ZZpySN','customRanges','syncUpdateMutationToColla','IConfigService','length','slice','rangeId','object','parentId','_configService','_sessionService','_initUserSync','UniverLicensePlugin','@univerjs/network','HTTPService','CustomRangeType','ThreadCommentModel','deleteComment','onStarting','resolved','dayjs','content','comment','exports','disposeWithMe','UniverNetwork','Inject','users','setConfig','_httpService','requireSession','threadId','find','_init','CollaborationSessionService','unitId','pluginName','5129005tYknmD','1532024eysHvT','code','pipe','reply','@univerjs/thread-comment','4gxsxuX','2116080LJiSft','@univerjs/core','Solved','body','map','listComments','/solved','_injector','solved','433971GJSiji','@univerjs/thread-comment-ui','bufferTime','/universer-api/user/list','resolveComment','/add','root','@univerjs-pro/license','rangeType','UniverThreadCommentUi','UniverThreadCommentUIPlugin','Injector','format','_threadCommentDataSource','Disposable','parse','Module','forEach','toStringTag','_commentService','user','getMemberID','5941734veElPE','replyId','UNIVER_UNKNOWN','thread-comment-data-source.config','personId','post','/reply','599962mOMEJo','_threadCommentDataSourceService','rxjs','replies','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','Delete','symbol','dataSource','_threadCommentModel','/universer-api/comment/unit/','addComment','function'];_0xe519=function(){return _0x2ae0c3;};return _0xe519();}
1
+ function _0xc476(){const _0x529c11=['Solved','359895lMNRKv','comment','post','_configService','HTTPService','UniverCore','ref','COMMENT','replyId','map','function','Injector','@univerjs/network','dayjs','slice','format','disposeWithMe','root','reply','CollaborationSessionService','addUser','code','filter','add','Delete','exports','_commentService','error','symbol','delete','5170758jYcYic','personId','Unknown','11OLwFjr','/universer-api/user/list','rangeId','user','amd','comments','994995rcyiDm','stringify','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','UNRECOGNIZED','pipe','@univerjs/thread-comment','_threadCommentDataSourceService','_userService','replies','customRanges','_init','userId','Module','forEach','@univerjs/core','payload','/universer-api/comment/unit/','parse','1864528KxNzww','type','users','_initDataSource','parentId','CustomRangeType','DependentOn','pluginName','threadId','defineProperty','merge','Add','getOwnPropertyDescriptor','length','size','5467700TRtfnB','toStringTag','rxjs','object','setConfig','getUnit','Edit','/solved','_sessionService','Disposable','_httpService','values','get','/add','UniverThreadCommentUi','19970570nRvqLm','_injector','ThreadCommentModel','find','userID','getComment','CommentService','3870324hpRuwN','resolved','Plugin','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','deleteComment','solved','UniverThreadComment','addComment','rangeType','Reply','OpenOrReOpen','commentUpdate$','UniverThreadCommentDataSourcePlugin','UniverNetwork','getMemberID','subscribe','content','_threadCommentModel','getUser','unitId','UniverProCollaborationClient','resolveComment','onReady','/delete','body','IConfigService','Solve','_initUserSync','UniverInstanceType','_threadCommentDataSource','UniverLicensePlugin','requireSession','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','54fvkEMT','/edit','_config','UserManagerService','Inject','10xruOlO','createTimestamp','7eGvcAH','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply'];_0xc476=function(){return _0x529c11;};return _0xc476();}function _0x2f68(_0x271dbe,_0x25f33c){const _0xc4765=_0xc476();return _0x2f68=function(_0x2f6854,_0x5469bf){_0x2f6854=_0x2f6854-0x96;let _0x210980=_0xc4765[_0x2f6854];return _0x210980;},_0x2f68(_0x271dbe,_0x25f33c);}(function(_0xb87033,_0x2fb6a7){const _0x31b3f0=_0x2f68,_0x2181ed=_0xb87033();while(!![]){try{const _0x1dc901=parseInt(_0x31b3f0(0xd6))/0x1*(-parseInt(_0x31b3f0(0xcf))/0x2)+parseInt(_0x31b3f0(0xa7))/0x3+parseInt(_0x31b3f0(0x11f))/0x4+-parseInt(_0x31b3f0(0xfd))/0x5+-parseInt(_0x31b3f0(0xf4))/0x6*(-parseInt(_0x31b3f0(0xd1))/0x7)+-parseInt(_0x31b3f0(0x110))/0x8*(-parseInt(_0x31b3f0(0xca))/0x9)+-parseInt(_0x31b3f0(0xa0))/0xa*(parseInt(_0x31b3f0(0xf7))/0xb);if(_0x1dc901===_0x2fb6a7)break;else _0x2181ed['push'](_0x2181ed['shift']());}catch(_0xd37a1f){_0x2181ed['push'](_0x2181ed['shift']());}}}(_0xc476,0xe105b),function(_0x1c9d4d,_0x7f4872){const _0xb1b1e9=_0x2f68;typeof exports==_0xb1b1e9(0x122)&&typeof module<'u'?_0x7f4872(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xb1b1e9(0xe0)&&define[_0xb1b1e9(0xfb)]?define([_0xb1b1e9(0xef),_0xb1b1e9(0xc9),'@univerjs-pro/license',_0xb1b1e9(0x10c),_0xb1b1e9(0xc8),_0xb1b1e9(0x103),_0xb1b1e9(0x121),_0xb1b1e9(0xe2)],_0x7f4872):(_0x1c9d4d=typeof globalThis<'u'?globalThis:_0x1c9d4d||self,_0x7f4872(_0x1c9d4d[_0xb1b1e9(0xaa)]={},_0x1c9d4d[_0xb1b1e9(0xbc)],_0x1c9d4d['UniverProLicense'],_0x1c9d4d[_0xb1b1e9(0xdb)],_0x1c9d4d[_0xb1b1e9(0x9f)],_0x1c9d4d[_0xb1b1e9(0xae)],_0x1c9d4d[_0xb1b1e9(0x121)],_0x1c9d4d[_0xb1b1e9(0xb5)]));}(this,function(_0x3b0238,_0x1f850e,_0x25b08e,_0x4dc168,_0x940fd9,_0x396cb8,_0x32004a,_0x3bd295){'use strict';const _0x327966=_0x2f68;const _0x43fbd9=_0x327966(0xd3);var _0x58e237=(_0x5ca945=>(_0x5ca945[_0x5ca945[_0x327966(0xb2)]=0x0]=_0x327966(0xb2),_0x5ca945[_0x5ca945[_0x327966(0xd5)]=0x1]=_0x327966(0xd5),_0x5ca945[_0x5ca945['UNRECOGNIZED']=-0x1]=_0x327966(0x101),_0x5ca945))(_0x58e237||{}),_0x2a392e=(_0x471823=>(_0x471823[_0x471823[_0x327966(0xf6)]=0x0]=_0x327966(0xf6),_0x471823[_0x471823[_0x327966(0x11b)]=0x1]='Add',_0x471823[_0x471823[_0x327966(0xb1)]=0x2]=_0x327966(0xb1),_0x471823[_0x471823['Edit']=0x3]=_0x327966(0x97),_0x471823[_0x471823[_0x327966(0xee)]=0x4]=_0x327966(0xee),_0x471823[_0x471823[_0x327966(0xc2)]=0x5]=_0x327966(0xc2),_0x471823[_0x471823[_0x327966(0x101)]=-0x1]='UNRECOGNIZED',_0x471823))(_0x2a392e||{});const _0x5efbbc=_0x3c4c00=>_0x4dc168[_0x327966(0xe3)](new Date(+_0x3c4c00))[_0x327966(0xe5)](_0x327966(0xab)),_0x135566=async(_0x448abc,_0x12c5cf)=>{const _0x42b1e5=_0x327966,_0x384e7f=_0x448abc[_0x42b1e5(0x9d)](_0x4dc168[_0x42b1e5(0xcd)]),_0x1b02c2=_0x448abc[_0x42b1e5(0x9d)](_0x3bd295[_0x42b1e5(0xda)]);_0x12c5cf[_0x42b1e5(0x10b)](_0x55b00d=>{const _0x1145a6=_0x42b1e5;_0x384e7f[_0x1145a6(0xba)](_0x55b00d)&&_0x12c5cf[_0x1145a6(0xf3)](_0x55b00d);}),_0x12c5cf[_0x42b1e5(0x11e)]&&(await _0x1b02c2[_0x42b1e5(0x9d)](_0x42b1e5(0xf8),{'params':{'userIDs':[..._0x12c5cf]}}))[_0x42b1e5(0xc0)][_0x42b1e5(0x112)][_0x42b1e5(0x10b)](_0x5d0f07=>{const _0x4f3e14=_0x42b1e5;_0x5d0f07&&_0x384e7f[_0x4f3e14(0xea)](_0x5d0f07);});};var _0x56432e=Object[_0x327966(0x11c)],_0x40a743=(_0x251ee5,_0x113d2e,_0x192411,_0x44c1eb)=>{for(var _0x560eba=_0x44c1eb>0x1?void 0x0:_0x44c1eb?_0x56432e(_0x113d2e,_0x192411):_0x113d2e,_0x44aedc=_0x251ee5['length']-0x1,_0x3c1251;_0x44aedc>=0x0;_0x44aedc--)(_0x3c1251=_0x251ee5[_0x44aedc])&&(_0x560eba=_0x3c1251(_0x560eba)||_0x560eba);return _0x560eba;},_0x2e2e56=(_0xe3044d,_0x1d9822)=>(_0x4d105e,_0x5bec97)=>_0x1d9822(_0x4d105e,_0x5bec97,_0xe3044d);let _0x1f3357=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x1a3b73,_0x4eb07f,_0x25f8d8,_0x1ea39f){const _0x4802ad=_0x327966;super(),this[_0x4802ad(0xf0)]=_0x1a3b73,this[_0x4802ad(0xb9)]=_0x4eb07f,this[_0x4802ad(0x105)]=_0x25f8d8,this[_0x4802ad(0xa1)]=_0x1ea39f,this[_0x4802ad(0x108)](),this[_0x4802ad(0xc3)]();}['_initUserSync'](){const _0x988aaa=_0x327966;this['disposeWithMe'](this[_0x988aaa(0xb9)][_0x988aaa(0xb3)][_0x988aaa(0x102)](_0x32004a['bufferTime'](0x10))[_0x988aaa(0xb7)](_0x546705=>{const _0xfb2e84=_0x988aaa,_0x4fdcba=new Set();_0x546705[_0xfb2e84(0x10b)](_0x1fb96d=>{const _0x3d2d0b=_0xfb2e84;switch(_0x1fb96d[_0x3d2d0b(0x111)]){case _0x3d2d0b(0xed):{const _0xd045cc=_0x1fb96d[_0x3d2d0b(0x10d)][_0x3d2d0b(0xf5)];_0x4fdcba['add'](_0xd045cc);break;}}}),_0x135566(this[_0xfb2e84(0xa1)],_0x4fdcba);}));}[_0x327966(0x108)](){const _0x4f0181=_0x327966;this[_0x4f0181(0xe6)](this[_0x4f0181(0xf0)]['commentUpdate$'][_0x4f0181(0xb7)](async _0x2aed10=>{const _0x3ff38f=_0x4f0181;var _0x44e2bf,_0x1fdc39,_0x415389,_0x24759e;const _0x20ee2a=(_0x44e2bf=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])['find'](_0x5caf9a=>_0x5caf9a[_0x3ff38f(0x118)]===_0x2aed10[_0x3ff38f(0x118)]))==null?void 0x0:_0x44e2bf[_0x3ff38f(0xe7)];if(!_0x20ee2a)return;const {unitId:_0x2655f8,subUnitId:_0x4ba732}=_0x20ee2a;switch(_0x2aed10[_0x3ff38f(0xfa)]&&this[_0x3ff38f(0x105)]['addUser'](_0x2aed10[_0x3ff38f(0xfa)]),_0x2aed10[_0x3ff38f(0x111)]){case _0x2a392e[_0x3ff38f(0x11b)]:break;case _0x2a392e[_0x3ff38f(0xb1)]:{this['_threadCommentModel']['addComment'](_0x2655f8,_0x4ba732,{'unitId':_0x2655f8,'subUnitId':_0x4ba732,'ref':'','id':_0x2aed10[_0x3ff38f(0xde)],'dT':_0x5efbbc(+_0x2aed10['createTimestamp']),'threadId':_0x2aed10[_0x3ff38f(0x118)],'personId':(_0x415389=(_0x1fdc39=_0x2aed10[_0x3ff38f(0xfa)])==null?void 0x0:_0x1fdc39[_0x3ff38f(0xa4)])!=null?_0x415389:_0x2aed10[_0x3ff38f(0x109)],'text':JSON['parse'](_0x2aed10[_0x3ff38f(0xb8)]),'parentId':_0x20ee2a['id']});break;}case _0x2a392e[_0x3ff38f(0xee)]:{const _0x323b0d=this['_threadCommentModel'][_0x3ff38f(0xa5)](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);_0x323b0d&&_0x323b0d[_0x3ff38f(0x114)]&&this['_threadCommentModel']['deleteComment'](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);break;}case _0x2a392e[_0x3ff38f(0x97)]:{this[_0x3ff38f(0xb9)]['updateComment'](_0x2655f8,_0x4ba732,{'commentId':_0x2aed10[_0x3ff38f(0xde)],'text':JSON[_0x3ff38f(0x10f)](_0x2aed10[_0x3ff38f(0xb8)])});break;}case _0x2a392e['Solve']:{const _0x4923dc=(_0x24759e=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])[_0x3ff38f(0xa3)](_0x4cd95a=>_0x4cd95a[_0x3ff38f(0x118)]===_0x2aed10['threadId']))==null?void 0x0:_0x24759e[_0x3ff38f(0xe7)];_0x4923dc&&this['_threadCommentModel'][_0x3ff38f(0xbd)](_0x2655f8,_0x4ba732,_0x4923dc['id'],_0x2aed10[_0x3ff38f(0xad)]===_0x58e237[_0x3ff38f(0xd5)]);break;}}}));}};_0x1f3357=_0x40a743([_0x2e2e56(0x0,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xa6)])),_0x2e2e56(0x1,_0x4dc168['Inject'](_0x396cb8[_0x327966(0xa2)])),_0x2e2e56(0x2,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2e2e56(0x3,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)]))],_0x1f3357);const _0x2f467a='thread-comment-data-source.config',_0x1cae5c={};var _0x3b79be=Object[_0x327966(0x11c)],_0x4e6402=(_0x120d59,_0x448a6c,_0x1be3a5,_0x10f36a)=>{for(var _0x2ae339=_0x10f36a>0x1?void 0x0:_0x10f36a?_0x3b79be(_0x448a6c,_0x1be3a5):_0x448a6c,_0x1047ee=_0x120d59['length']-0x1,_0x8fa1e0;_0x1047ee>=0x0;_0x1047ee--)(_0x8fa1e0=_0x120d59[_0x1047ee])&&(_0x2ae339=_0x8fa1e0(_0x2ae339)||_0x2ae339);return _0x2ae339;},_0x2799af=(_0x5eb65b,_0xe5f370)=>(_0x15c027,_0xb320a0)=>_0xe5f370(_0x15c027,_0xb320a0,_0x5eb65b);function _0x250f64(_0x3be529,_0x81d08){const _0x58c0b5=_0x327966,_0x5abd65=_0x3be529[_0x58c0b5(0x106)][0x0];return{..._0x81d08,'id':_0x5abd65['replyId'],'resolved':_0x3be529[_0x58c0b5(0xad)]===0x1,'dT':_0x5efbbc(_0x5abd65[_0x58c0b5(0xd0)]),'personId':_0x5abd65[_0x58c0b5(0x109)],'threadId':_0x5abd65['threadId']};}function _0x3e5dca(_0x1468fa,_0x160309,_0x438dba){const _0x873b07=_0x327966;var _0x586873,_0xbc9885;if(((_0xbc9885=(_0x586873=_0x1468fa==null?void 0x0:_0x1468fa[_0x873b07(0x106)])==null?void 0x0:_0x586873[_0x873b07(0x11d)])!=null?_0xbc9885:0x0)>0x0){const _0x3559fc=(_0x2e089c,_0x296079)=>({'id':_0x2e089c[_0x873b07(0xde)],'threadId':_0x2e089c[_0x873b07(0x118)],'dT':_0x5efbbc(_0x2e089c[_0x873b07(0xd0)]),'personId':_0x2e089c[_0x873b07(0x109)],'resolved':_0x1468fa[_0x873b07(0xad)]===_0x58e237[_0x873b07(0xd5)],'unitId':_0x160309,'subUnitId':_0x438dba,'text':JSON[_0x873b07(0x10f)](_0x2e089c[_0x873b07(0xb8)]),'parentId':_0x296079}),_0x1930b3=_0x3559fc(_0x1468fa[_0x873b07(0x106)][0x0]);return{..._0x1930b3,'children':_0x1468fa['replies'][_0x873b07(0xe4)](0x1)[_0x873b07(0xdf)](_0x54c705=>_0x3559fc(_0x54c705,_0x1930b3['id']))};}return null;}let _0x20bedb=class{constructor(_0x9b5c11,_0xbf37e,_0x7cd19a){const _0x187d17=_0x327966;this[_0x187d17(0x9b)]=_0x9b5c11,this[_0x187d17(0x105)]=_0xbf37e,this[_0x187d17(0x99)]=_0x7cd19a;}async[_0x327966(0xaf)](_0x399b9b){const _0x8d977d=_0x327966;var _0x7957ed,_0x454120;const {parentId:_0x4ed1f3,unitId:_0x450045,text:_0x5d15de,threadId:_0x5af9c8}=_0x399b9b,_0x46b199=(_0x454120=(_0x7957ed=_0x5d15de[_0x8d977d(0x107)])==null?void 0x0:_0x7957ed['filter'](_0x3c444c=>_0x3c444c[_0x8d977d(0xb0)]===_0x4dc168[_0x8d977d(0x115)][_0x8d977d(0xdd)])[_0x8d977d(0xdf)](_0x23af1c=>_0x23af1c[_0x8d977d(0xf9)]))!=null?_0x454120:[],_0x265330=JSON[_0x8d977d(0xfe)](_0x5d15de),_0x1f67ff=(await this['_sessionService'][_0x8d977d(0xc7)](_0x450045))['getMemberID']();if(_0x4ed1f3){const _0xc45976={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199,'threadId':_0x5af9c8},_0x3968a7=(await this['_httpService']['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0xd4),{'body':_0xc45976}))[_0x8d977d(0xc0)][_0x8d977d(0xe8)];return{..._0x399b9b,'id':_0x3968a7[_0x8d977d(0xde)],'dT':_0x4dc168[_0x8d977d(0xe3)](+_0x3968a7['createTimestamp'])[_0x8d977d(0xe5)](_0x8d977d(0xab)),'personId':_0x3968a7[_0x8d977d(0x109)]};}else{const _0x1e8550={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199},_0x46dba1=await this[_0x8d977d(0x9b)]['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0x9e),{'body':_0x1e8550});return _0x250f64(_0x46dba1[_0x8d977d(0xc0)][_0x8d977d(0xd7)],_0x399b9b);}}async['updateComment'](_0x4acc59){const _0x5a2422=_0x327966;var _0x3e55a1,_0x1f6490;const {text:_0x5c2a2c,unitId:_0x4c9c45}=_0x4acc59,_0x1b1a54=(_0x1f6490=(_0x3e55a1=_0x5c2a2c[_0x5a2422(0x107)])==null?void 0x0:_0x3e55a1[_0x5a2422(0xec)](_0x212719=>_0x212719['rangeType']===_0x4dc168['CustomRangeType'][_0x5a2422(0xdd)])[_0x5a2422(0xdf)](_0x10a5f0=>_0x10a5f0[_0x5a2422(0xf9)]))!=null?_0x1f6490:[],_0x569a3a=JSON[_0x5a2422(0xfe)](_0x5c2a2c),_0x5c710f=_0x4acc59[_0x5a2422(0x118)],_0x328083=_0x4acc59['id'],_0x55a772={'memberId':(await this[_0x5a2422(0x99)][_0x5a2422(0xc7)](_0x4c9c45))[_0x5a2422(0xb6)](),'unitId':_0x4c9c45,'threadId':_0x5c710f,'mention':_0x1b1a54,'content':_0x569a3a,'replyId':_0x328083},_0x2a52b5=await this['_httpService'][_0x5a2422(0xd8)](_0x5a2422(0x10e)+_0x4c9c45+_0x5a2422(0xcb),{'body':_0x55a772});return!_0x2a52b5['body'][_0x5a2422(0xf1)]||_0x2a52b5[_0x5a2422(0xc0)][_0x5a2422(0xf1)][_0x5a2422(0xeb)]===0x1;}async['resolveComment'](_0x2f54be){const _0x562f28=_0x327966,{unitId:_0x1960f6}=_0x2f54be,_0x17e2a6=_0x2f54be[_0x562f28(0x118)],_0x1d5afe={'memberId':this[_0x562f28(0x105)]['getCurrentUser']()[_0x562f28(0xa4)],'unitId':_0x1960f6,'threadId':_0x17e2a6,'solved':_0x2f54be[_0x562f28(0xa8)]?_0x58e237[_0x562f28(0xd5)]:_0x58e237[_0x562f28(0xb2)]},_0x45f41c=await this[_0x562f28(0x9b)][_0x562f28(0xd8)](_0x562f28(0x10e)+_0x1960f6+_0x562f28(0x98),{'body':_0x1d5afe});return!_0x45f41c[_0x562f28(0xc0)]['error']||_0x45f41c['body'][_0x562f28(0xf1)]['code']===0x1;}async[_0x327966(0xac)](_0x24caf5,_0xf81232,_0xa82bcd,_0x2e4957){const _0x1cb6bd=_0x327966,_0x40aaf3={'memberId':(await this[_0x1cb6bd(0x99)][_0x1cb6bd(0xc7)](_0x24caf5))[_0x1cb6bd(0xb6)](),'threadId':_0xa82bcd,'replyId':_0x2e4957,'unitId':_0x24caf5},_0x3558b1=await this['_httpService'][_0x1cb6bd(0xd8)](_0x1cb6bd(0x10e)+_0x24caf5+_0x1cb6bd(0xbf),{'body':_0x40aaf3});return!_0x3558b1[_0x1cb6bd(0xc0)]['error']||_0x3558b1['body'][_0x1cb6bd(0xf1)][_0x1cb6bd(0xeb)]===0x1;}async['listComments'](_0x315b3b,_0x48c897,_0x4769a9){const _0x33f8b2=_0x327966,_0x313d24={'unitId':_0x315b3b,'threadId':_0x4769a9},_0x26d2b1=await this['_httpService'][_0x33f8b2(0xd8)](_0x33f8b2(0x10e)+_0x315b3b+'/list',{'body':_0x313d24}),_0x5ddca4=_0x4769a9[_0x33f8b2(0xdf)](_0x595540=>_0x3e5dca(_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0xfc)][_0x595540],_0x315b3b,_0x48c897))[_0x33f8b2(0xec)](Boolean);return Object[_0x33f8b2(0x9c)](_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0x112)])[_0x33f8b2(0x10b)](_0x50a925=>{const _0x2430ff=_0x33f8b2;this[_0x2430ff(0x105)][_0x2430ff(0xea)](_0x50a925);}),_0x5ddca4;}[_0x327966(0xd2)](_0xd0cfdf){const _0x15901=_0x327966;return{'id':_0xd0cfdf['id'],'threadId':_0xd0cfdf[_0x15901(0x118)],'ref':_0xd0cfdf[_0x15901(0xdc)]};}};_0x20bedb=_0x4e6402([_0x2799af(0x0,_0x4dc168[_0x327966(0xce)](_0x3bd295['HTTPService'])),_0x2799af(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2799af(0x2,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xe9)]))],_0x20bedb);var _0x23ebe6=Object['getOwnPropertyDescriptor'],_0x50725f=(_0x5d6c4e,_0x13eb2d,_0x33425a,_0x274e1c)=>{const _0x3f81c1=_0x327966;for(var _0x219dc0=_0x274e1c>0x1?void 0x0:_0x274e1c?_0x23ebe6(_0x13eb2d,_0x33425a):_0x13eb2d,_0x4ceed7=_0x5d6c4e[_0x3f81c1(0x11d)]-0x1,_0x1fefe3;_0x4ceed7>=0x0;_0x4ceed7--)(_0x1fefe3=_0x5d6c4e[_0x4ceed7])&&(_0x219dc0=_0x1fefe3(_0x219dc0)||_0x219dc0);return _0x219dc0;},_0x554cb4=(_0x152ca7,_0x4daf52)=>(_0x248d07,_0x1182aa)=>_0x4daf52(_0x248d07,_0x1182aa,_0x152ca7);let _0x13880a=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x3b5ce7,_0x4a165f){const _0x409e49=_0x327966;super(),this[_0x409e49(0x104)]=_0x3b5ce7,this[_0x409e49(0xc5)]=_0x4a165f,this[_0x409e49(0x113)]();}['_initDataSource'](){const _0x1217df=_0x327966;this[_0x1217df(0x104)]['dataSource']=this['_threadCommentDataSource'],this[_0x1217df(0x104)]['syncUpdateMutationToColla']=!0x1;}};_0x13880a=_0x50725f([_0x554cb4(0x0,_0x396cb8[_0x327966(0x100)]),_0x554cb4(0x1,_0x4dc168[_0x327966(0xce)](_0x20bedb))],_0x13880a);var _0x2deb99=Object[_0x327966(0x119)],_0x43f983=Object[_0x327966(0x11c)],_0x4a34d2=(_0xeeee9c,_0x43d041,_0x192aca)=>_0x43d041 in _0xeeee9c?_0x2deb99(_0xeeee9c,_0x43d041,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x192aca}):_0xeeee9c[_0x43d041]=_0x192aca,_0x1dda2c=(_0x5424b5,_0x256c3f,_0x581b2f,_0xa1af5)=>{for(var _0x48f96c=_0xa1af5>0x1?void 0x0:_0xa1af5?_0x43f983(_0x256c3f,_0x581b2f):_0x256c3f,_0xd23ea1=_0x5424b5['length']-0x1,_0x4e716a;_0xd23ea1>=0x0;_0xd23ea1--)(_0x4e716a=_0x5424b5[_0xd23ea1])&&(_0x48f96c=_0x4e716a(_0x48f96c)||_0x48f96c);return _0x48f96c;},_0x50ef05=(_0x296b9e,_0x219ace)=>(_0x399328,_0x5bb111)=>_0x219ace(_0x399328,_0x5bb111,_0x296b9e),_0x7b636b=(_0x247b1c,_0x494df5,_0x58443c)=>_0x4a34d2(_0x247b1c,typeof _0x494df5!=_0x327966(0xf2)?_0x494df5+'':_0x494df5,_0x58443c);_0x3b0238[_0x327966(0xb4)]=class extends _0x4dc168[_0x327966(0xa9)]{constructor(_0x3a0702=_0x1cae5c,_0xbc51cd,_0x46c99a){const _0x58904b=_0x327966;super(),this[_0x58904b(0xcc)]=_0x3a0702,this[_0x58904b(0xa1)]=_0xbc51cd,this[_0x58904b(0xd9)]=_0x46c99a;const {..._0x1329d1}=_0x4dc168[_0x58904b(0x11a)]({},_0x1cae5c,this[_0x58904b(0xcc)]);this[_0x58904b(0xd9)][_0x58904b(0x123)](_0x2f467a,_0x1329d1);}['onStarting'](){const _0x3a6c34=_0x327966;[[_0x20bedb],[_0x13880a],[_0x1f3357]][_0x3a6c34(0x10b)](_0x403a6e=>{const _0x51151d=_0x3a6c34;this['_injector'][_0x51151d(0xed)](_0x403a6e);});}[_0x327966(0xbe)](){const _0x1730d6=_0x327966;this[_0x1730d6(0xa1)][_0x1730d6(0x9d)](_0x13880a),this[_0x1730d6(0xa1)]['get'](_0x1f3357);}},_0x7b636b(_0x3b0238[_0x327966(0xb4)],_0x327966(0x117),_0x43fbd9),_0x7b636b(_0x3b0238[_0x327966(0xb4)],'type',_0x4dc168[_0x327966(0xc4)]['UNIVER_UNKNOWN']),_0x3b0238['UniverThreadCommentDataSourcePlugin']=_0x1dda2c([_0x4dc168[_0x327966(0x116)](_0x940fd9['UniverThreadCommentUIPlugin'],_0x1f850e[_0x327966(0xff)],_0x25b08e[_0x327966(0xc6)]),_0x50ef05(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)])),_0x50ef05(0x2,_0x4dc168[_0x327966(0xc1)])],_0x3b0238['UniverThreadCommentDataSourcePlugin']),Object[_0x327966(0x119)](_0x3b0238,Symbol[_0x327966(0x120)],{'value':_0x327966(0x10a)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.2",
3
+ "version": "0.10.3-experimental.20250812-b4b6f1a",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.2",
49
- "@univerjs-pro/license": "0.10.2",
50
- "@univerjs/core": "0.10.2",
48
+ "@univerjs-pro/collaboration-client": "0.10.3-experimental.20250812-b4b6f1a",
49
+ "@univerjs-pro/license": "0.10.3-experimental.20250812-b4b6f1a",
50
+ "@univerjs/core": "0.10.3-experimental.20250812-b4b6f1a",
51
+ "@univerjs/network": "0.10.3-experimental.20250812-b4b6f1a",
52
+ "@univerjs/thread-comment": "0.10.3-experimental.20250812-b4b6f1a",
51
53
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/network": "0.10.2",
53
- "@univerjs/thread-comment": "0.10.2",
54
- "@univerjs/thread-comment-ui": "0.10.2"
54
+ "@univerjs/thread-comment-ui": "0.10.3-experimental.20250812-b4b6f1a"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.2"
61
+ "@univerjs-infra/shared": "0.10.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",