@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507161608 → 0.9.2-nightly.202507181608

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';function _0x4e75(_0x40a572,_0x451834){const _0x199dd4=_0x199d();return _0x4e75=function(_0x4e75dc,_0x12fe76){_0x4e75dc=_0x4e75dc-0x1bc;let _0x97d52b=_0x199dd4[_0x4e75dc];return _0x97d52b;},_0x4e75(_0x40a572,_0x451834);}const _0x2ab71e=_0x4e75;(function(_0x3c7bb8,_0x5ea79c){const _0x4850e7=_0x4e75,_0x57313a=_0x3c7bb8();while(!![]){try{const _0x445a53=parseInt(_0x4850e7(0x210))/0x1+parseInt(_0x4850e7(0x214))/0x2*(parseInt(_0x4850e7(0x22d))/0x3)+parseInt(_0x4850e7(0x22a))/0x4+-parseInt(_0x4850e7(0x1ed))/0x5+-parseInt(_0x4850e7(0x1f0))/0x6+-parseInt(_0x4850e7(0x1ea))/0x7+parseInt(_0x4850e7(0x1bc))/0x8;if(_0x445a53===_0x5ea79c)break;else _0x57313a['push'](_0x57313a['shift']());}catch(_0x432a78){_0x57313a['push'](_0x57313a['shift']());}}}(_0x199d,0x7035f));Object[_0x2ab71e(0x1fa)](exports,Symbol[_0x2ab71e(0x215)],{'value':_0x2ab71e(0x1e3)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x2ab71e(0x22c);var I=(_0x2cae63=>(_0x2cae63[_0x2cae63[_0x2ab71e(0x1c0)]=0x0]='OpenOrReOpen',_0x2cae63[_0x2cae63[_0x2ab71e(0x1d7)]=0x1]=_0x2ab71e(0x1d7),_0x2cae63[_0x2cae63['UNRECOGNIZED']=-0x1]=_0x2ab71e(0x212),_0x2cae63))(I||{}),v=(_0x586e1a=>(_0x586e1a[_0x586e1a['Unknown']=0x0]='Unknown',_0x586e1a[_0x586e1a[_0x2ab71e(0x202)]=0x1]=_0x2ab71e(0x202),_0x586e1a[_0x586e1a[_0x2ab71e(0x21c)]=0x2]=_0x2ab71e(0x21c),_0x586e1a[_0x586e1a[_0x2ab71e(0x211)]=0x3]=_0x2ab71e(0x211),_0x586e1a[_0x586e1a[_0x2ab71e(0x1d8)]=0x4]=_0x2ab71e(0x1d8),_0x586e1a[_0x586e1a[_0x2ab71e(0x1e0)]=0x5]=_0x2ab71e(0x1e0),_0x586e1a[_0x586e1a['UNRECOGNIZED']=-0x1]=_0x2ab71e(0x212),_0x586e1a))(v||{});const f=_0x4ff9e3=>c['dayjs'](new Date(+_0x4ff9e3))[_0x2ab71e(0x21f)](_0x2ab71e(0x21b)),R=async(_0x658766,_0x2410bc)=>{const _0x2e77de=_0x2ab71e,_0x5b0a7a=_0x658766['get'](c[_0x2e77de(0x1ce)]),_0x5163c9=_0x658766[_0x2e77de(0x207)](P['HTTPService']);_0x2410bc[_0x2e77de(0x1c3)](_0x304fc8=>{const _0xd1e25=_0x2e77de;_0x5b0a7a[_0xd1e25(0x1ee)](_0x304fc8)&&_0x2410bc[_0xd1e25(0x1db)](_0x304fc8);}),_0x2410bc[_0x2e77de(0x20c)]&&(await _0x5163c9[_0x2e77de(0x207)](_0x2e77de(0x22b),{'params':{'userIDs':[..._0x2410bc]}}))[_0x2e77de(0x1d2)][_0x2e77de(0x20a)][_0x2e77de(0x1c3)](_0x8aea=>{const _0xbba0ac=_0x2e77de;_0x8aea&&_0x5b0a7a[_0xbba0ac(0x228)](_0x8aea);});};var $=Object[_0x2ab71e(0x20f)],E=(_0x2a307b,_0x397e2d,_0x41d5bd,_0x22e130)=>{const _0x46f0ab=_0x2ab71e;for(var _0x58ddf1=_0x22e130>0x1?void 0x0:_0x22e130?$(_0x397e2d,_0x41d5bd):_0x397e2d,_0x41bd3f=_0x2a307b[_0x46f0ab(0x213)]-0x1,_0x61c791;_0x41bd3f>=0x0;_0x41bd3f--)(_0x61c791=_0x2a307b[_0x41bd3f])&&(_0x58ddf1=_0x61c791(_0x58ddf1)||_0x58ddf1);return _0x58ddf1;},S=(_0x284763,_0x172512)=>(_0x4ec8cc,_0x473655)=>_0x172512(_0x4ec8cc,_0x473655,_0x284763);let p=class extends c[_0x2ab71e(0x1ff)]{constructor(_0x5b24f4,_0xc08fff,_0x4a47bc,_0x4082a0){const _0x305304=_0x2ab71e;super(),this[_0x305304(0x20e)]=_0x5b24f4,this[_0x305304(0x1e2)]=_0xc08fff,this[_0x305304(0x223)]=_0x4a47bc,this['_injector']=_0x4082a0,this[_0x305304(0x1de)](),this[_0x305304(0x1dd)]();}[_0x2ab71e(0x1dd)](){const _0x129f59=_0x2ab71e;this[_0x129f59(0x219)](this[_0x129f59(0x1e2)][_0x129f59(0x205)][_0x129f59(0x230)](w[_0x129f59(0x1ec)](0x10))[_0x129f59(0x22e)](_0x1e8e4d=>{const _0x89d25=_0x129f59,_0x31a72e=new Set();_0x1e8e4d['forEach'](_0x1f375e=>{const _0x1769f6=_0x4e75;switch(_0x1f375e[_0x1769f6(0x20d)]){case'add':{const _0x5844a9=_0x1f375e['payload'][_0x1769f6(0x1be)];_0x31a72e[_0x1769f6(0x1f2)](_0x5844a9);break;}}}),R(this[_0x89d25(0x1d1)],_0x31a72e);}));}[_0x2ab71e(0x1de)](){const _0x7ce1ec=_0x2ab71e;this[_0x7ce1ec(0x219)](this[_0x7ce1ec(0x20e)]['commentUpdate$'][_0x7ce1ec(0x22e)](async _0x2f9290=>{const _0x5ee3e1=_0x7ce1ec;var _0x2bef3d,_0x3e75be,_0x5e7c00,_0x49875a;const _0x3e423d=(_0x2bef3d=this['_threadCommentModel']['getUnit'](_0x2f9290[_0x5ee3e1(0x218)])[_0x5ee3e1(0x1e9)](_0x3d2ac9=>_0x3d2ac9[_0x5ee3e1(0x225)]===_0x2f9290[_0x5ee3e1(0x225)]))==null?void 0x0:_0x2bef3d['root'];if(!_0x3e423d)return;const {unitId:_0x27c492,subUnitId:_0x1ae89e}=_0x3e423d;switch(_0x2f9290[_0x5ee3e1(0x1c4)]&&this[_0x5ee3e1(0x223)][_0x5ee3e1(0x228)](_0x2f9290[_0x5ee3e1(0x1c4)]),_0x2f9290[_0x5ee3e1(0x20d)]){case v[_0x5ee3e1(0x202)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5ee3e1(0x221)](_0x27c492,_0x1ae89e,{'unitId':_0x27c492,'subUnitId':_0x1ae89e,'ref':'','id':_0x2f9290['replyId'],'dT':f(+_0x2f9290[_0x5ee3e1(0x217)]),'threadId':_0x2f9290['threadId'],'personId':(_0x5e7c00=(_0x3e75be=_0x2f9290[_0x5ee3e1(0x1c4)])==null?void 0x0:_0x3e75be[_0x5ee3e1(0x232)])!=null?_0x5e7c00:_0x2f9290[_0x5ee3e1(0x21a)],'text':JSON[_0x5ee3e1(0x1da)](_0x2f9290[_0x5ee3e1(0x1c7)]),'parentId':_0x3e423d['id']});break;}case v['Delete']:{const _0x4c24d6=this['_threadCommentModel'][_0x5ee3e1(0x1e1)](_0x27c492,_0x1ae89e,_0x2f9290[_0x5ee3e1(0x1f1)]);_0x4c24d6&&_0x4c24d6[_0x5ee3e1(0x1bd)]&&this[_0x5ee3e1(0x1e2)][_0x5ee3e1(0x208)](_0x27c492,_0x1ae89e,_0x2f9290['replyId']);break;}case v[_0x5ee3e1(0x211)]:{this[_0x5ee3e1(0x1e2)][_0x5ee3e1(0x1f4)](_0x27c492,_0x1ae89e,{'commentId':_0x2f9290[_0x5ee3e1(0x1f1)],'text':JSON['parse'](_0x2f9290[_0x5ee3e1(0x1c7)])});break;}case v[_0x5ee3e1(0x1e0)]:{const _0x1d22a1=(_0x49875a=this['_threadCommentModel'][_0x5ee3e1(0x1f8)](_0x2f9290[_0x5ee3e1(0x218)])[_0x5ee3e1(0x1e9)](_0x62dbf5=>_0x62dbf5[_0x5ee3e1(0x225)]===_0x2f9290[_0x5ee3e1(0x225)]))==null?void 0x0:_0x49875a[_0x5ee3e1(0x1cf)];_0x1d22a1&&this[_0x5ee3e1(0x1e2)]['resolveComment'](_0x27c492,_0x1ae89e,_0x1d22a1['id'],_0x2f9290[_0x5ee3e1(0x1f6)]===I[_0x5ee3e1(0x1d7)]);break;}}}));}};p=E([S(0x0,c[_0x2ab71e(0x1fd)](b[_0x2ab71e(0x1d0)])),S(0x1,c[_0x2ab71e(0x1fd)](M[_0x2ab71e(0x1c6)])),S(0x2,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1ce)])),S(0x3,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1c9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x2ab71e(0x20f)],x=(_0x158d1d,_0x1f3dd2,_0xbd6df2,_0x4086ec)=>{const _0xef8ceb=_0x2ab71e;for(var _0x412b91=_0x4086ec>0x1?void 0x0:_0x4086ec?A(_0x1f3dd2,_0xbd6df2):_0x1f3dd2,_0x5edb25=_0x158d1d[_0xef8ceb(0x213)]-0x1,_0x2746e4;_0x5edb25>=0x0;_0x5edb25--)(_0x2746e4=_0x158d1d[_0x5edb25])&&(_0x412b91=_0x2746e4(_0x412b91)||_0x412b91);return _0x412b91;},_=(_0xe31188,_0x3ed814)=>(_0x273af9,_0x197371)=>_0x3ed814(_0x273af9,_0x197371,_0xe31188);function Y(_0x449e4d,_0x14303a){const _0x5edad5=_0x2ab71e,_0x16ff02=_0x449e4d[_0x5edad5(0x234)][0x0];return{..._0x14303a,'id':_0x16ff02[_0x5edad5(0x1f1)],'resolved':_0x449e4d[_0x5edad5(0x1f6)]===0x1,'dT':f(_0x16ff02[_0x5edad5(0x217)]),'personId':_0x16ff02[_0x5edad5(0x21a)],'threadId':_0x16ff02[_0x5edad5(0x225)]};}function G(_0x388b72,_0x239cc1,_0x1ea070){const _0x12f0c7=_0x2ab71e;var _0x148e7f,_0x3e5b5f;if(((_0x3e5b5f=(_0x148e7f=_0x388b72==null?void 0x0:_0x388b72[_0x12f0c7(0x234)])==null?void 0x0:_0x148e7f['length'])!=null?_0x3e5b5f:0x0)>0x0){const _0x4c505b=(_0x278464,_0x26b024)=>({'id':_0x278464['replyId'],'threadId':_0x278464[_0x12f0c7(0x225)],'dT':f(_0x278464['createTimestamp']),'personId':_0x278464['userId'],'resolved':_0x388b72[_0x12f0c7(0x1f6)]===I['Solved'],'unitId':_0x239cc1,'subUnitId':_0x1ea070,'text':JSON['parse'](_0x278464[_0x12f0c7(0x1c7)]),'parentId':_0x26b024}),_0x21fcf6=_0x4c505b(_0x388b72[_0x12f0c7(0x234)][0x0]);return{..._0x21fcf6,'children':_0x388b72[_0x12f0c7(0x234)][_0x12f0c7(0x1c5)](0x1)['map'](_0x43cfe1=>_0x4c505b(_0x43cfe1,_0x21fcf6['id']))};}return null;}let g=class{constructor(_0x38fd71,_0x42dc3f,_0x19bad7,_0x5cb1c0){const _0x105c1d=_0x2ab71e;this[_0x105c1d(0x1f5)]=_0x38fd71,this[_0x105c1d(0x223)]=_0x42dc3f,this[_0x105c1d(0x203)]=_0x19bad7,this[_0x105c1d(0x1d1)]=_0x5cb1c0;}async[_0x2ab71e(0x221)](_0x336670){const _0x4f5bba=_0x2ab71e;var _0x2b7d55,_0x52c6ed;const {parentId:_0x415be2,unitId:_0x5e9da8,text:_0x282584,threadId:_0x1b789f}=_0x336670,_0x46dcee=(_0x52c6ed=(_0x2b7d55=_0x282584[_0x4f5bba(0x1d5)])==null?void 0x0:_0x2b7d55[_0x4f5bba(0x231)](_0x7215cb=>_0x7215cb[_0x4f5bba(0x1fb)]===c[_0x4f5bba(0x1df)][_0x4f5bba(0x224)])[_0x4f5bba(0x204)](_0x4a8f28=>_0x4a8f28[_0x4f5bba(0x22f)]))!=null?_0x52c6ed:[],_0x9d9ee4=JSON[_0x4f5bba(0x1ca)](_0x282584),_0x4d64a1=(await this[_0x4f5bba(0x203)][_0x4f5bba(0x200)](_0x5e9da8))['getMemberID']();if(_0x415be2){const _0x2ded2b={'memberId':_0x4d64a1,'unitId':_0x5e9da8,'content':_0x9d9ee4,'mention':_0x46dcee,'threadId':_0x1b789f},_0x31ff9f=(await this[_0x4f5bba(0x1f5)][_0x4f5bba(0x1cd)](_0x4f5bba(0x1d4)+_0x5e9da8+_0x4f5bba(0x209),{'body':_0x2ded2b}))['body'][_0x4f5bba(0x1bf)];return{..._0x336670,'id':_0x31ff9f[_0x4f5bba(0x1f1)],'dT':c[_0x4f5bba(0x1c1)](+_0x31ff9f[_0x4f5bba(0x217)])[_0x4f5bba(0x21f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x31ff9f[_0x4f5bba(0x21a)]};}else{const _0x289421={'memberId':_0x4d64a1,'unitId':_0x5e9da8,'content':_0x9d9ee4,'mention':_0x46dcee},_0x16802e=await this[_0x4f5bba(0x1f5)][_0x4f5bba(0x1cd)](_0x4f5bba(0x1d4)+_0x5e9da8+_0x4f5bba(0x1fe),{'body':_0x289421});return Y(_0x16802e[_0x4f5bba(0x1d2)]['comment'],_0x336670);}}async[_0x2ab71e(0x1f4)](_0xfb6627){const _0x3909bc=_0x2ab71e;var _0x4e9904,_0x1e3c3d;const {text:_0x1e5d99,unitId:_0x2e3ec3}=_0xfb6627,_0x5789a4=(_0x1e3c3d=(_0x4e9904=_0x1e5d99['customRanges'])==null?void 0x0:_0x4e9904['filter'](_0x53025a=>_0x53025a[_0x3909bc(0x1fb)]===c['CustomRangeType'][_0x3909bc(0x224)])[_0x3909bc(0x204)](_0x25900c=>_0x25900c[_0x3909bc(0x22f)]))!=null?_0x1e3c3d:[],_0x55d7df=JSON[_0x3909bc(0x1ca)](_0x1e5d99),_0x13f294=_0xfb6627['threadId'],_0x530936=_0xfb6627['id'],_0x38b3b2={'memberId':(await this[_0x3909bc(0x203)]['requireSession'](_0x2e3ec3))['getMemberID'](),'unitId':_0x2e3ec3,'threadId':_0x13f294,'mention':_0x5789a4,'content':_0x55d7df,'replyId':_0x530936},_0x4d84a8=await this[_0x3909bc(0x1f5)][_0x3909bc(0x1cd)](_0x3909bc(0x1d4)+_0x2e3ec3+'/edit',{'body':_0x38b3b2});return!_0x4d84a8[_0x3909bc(0x1d2)][_0x3909bc(0x21e)]||_0x4d84a8[_0x3909bc(0x1d2)]['error'][_0x3909bc(0x229)]===0x1;}async[_0x2ab71e(0x1cb)](_0x893802){const _0x597a34=_0x2ab71e,{unitId:_0x54456c}=_0x893802,_0x569706=_0x893802[_0x597a34(0x225)],_0x584345={'memberId':this[_0x597a34(0x223)][_0x597a34(0x220)]()['userID'],'unitId':_0x54456c,'threadId':_0x569706,'solved':_0x893802['resolved']?I[_0x597a34(0x1d7)]:I['OpenOrReOpen']},_0x363f6b=await this[_0x597a34(0x1f5)][_0x597a34(0x1cd)](_0x597a34(0x1d4)+_0x54456c+_0x597a34(0x1e8),{'body':_0x584345});return!_0x363f6b[_0x597a34(0x1d2)][_0x597a34(0x21e)]||_0x363f6b['body'][_0x597a34(0x21e)]['code']===0x1;}async[_0x2ab71e(0x208)](_0x486cf1,_0x1367d0,_0x544c63,_0x2e7511){const _0x1d1c15=_0x2ab71e,_0x13960b={'memberId':(await this['_sessionService']['requireSession'](_0x486cf1))[_0x1d1c15(0x235)](),'threadId':_0x544c63,'replyId':_0x2e7511,'unitId':_0x486cf1},_0x3d28fc=await this[_0x1d1c15(0x1f5)]['post'](_0x1d1c15(0x1d4)+_0x486cf1+_0x1d1c15(0x222),{'body':_0x13960b});return!_0x3d28fc[_0x1d1c15(0x1d2)][_0x1d1c15(0x21e)]||_0x3d28fc[_0x1d1c15(0x1d2)][_0x1d1c15(0x21e)]['code']===0x1;}async[_0x2ab71e(0x226)](_0x495719,_0x52d516,_0xdcac25){const _0xef0c66=_0x2ab71e,_0x22554e={'unitId':_0x495719,'threadId':_0xdcac25},_0x72e96c=await this['_httpService'][_0xef0c66(0x1cd)](_0xef0c66(0x1d4)+_0x495719+_0xef0c66(0x1f3),{'body':_0x22554e}),_0x530d63=_0xdcac25[_0xef0c66(0x204)](_0x35c353=>G(_0x72e96c[_0xef0c66(0x1d2)]['comments'][_0x35c353],_0x495719,_0x52d516))['filter'](Boolean);return Object[_0xef0c66(0x1f7)](_0x72e96c[_0xef0c66(0x1d2)][_0xef0c66(0x20a)])[_0xef0c66(0x1c3)](_0x4f98e6=>{const _0x54a052=_0xef0c66;this[_0x54a052(0x223)][_0x54a052(0x228)](_0x4f98e6);}),_0x530d63;}[_0x2ab71e(0x206)](_0x4a6d27){const _0x377f51=_0x2ab71e;return{'id':_0x4a6d27['id'],'threadId':_0x4a6d27[_0x377f51(0x225)],'ref':_0x4a6d27[_0x377f51(0x216)]};}};g=x([_(0x0,c[_0x2ab71e(0x1fd)](P[_0x2ab71e(0x1ef)])),_(0x1,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1ce)])),_(0x2,c['Inject'](b[_0x2ab71e(0x1c8)])),_(0x3,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1c9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x405b58,_0x5ace6b,_0x2e35a4,_0x3f7b08)=>{const _0x1f7718=_0x2ab71e;for(var _0xadb5b=_0x3f7b08>0x1?void 0x0:_0x3f7b08?H(_0x5ace6b,_0x2e35a4):_0x5ace6b,_0x30f997=_0x405b58[_0x1f7718(0x213)]-0x1,_0x4ead19;_0x30f997>=0x0;_0x30f997--)(_0x4ead19=_0x405b58[_0x30f997])&&(_0xadb5b=_0x4ead19(_0xadb5b)||_0xadb5b);return _0xadb5b;},y=(_0x3d2192,_0x2ed357)=>(_0x4d205d,_0x597fee)=>_0x2ed357(_0x4d205d,_0x597fee,_0x3d2192);let C=class extends c['Disposable']{constructor(_0x3547d6,_0x5356a9){const _0x30e74f=_0x2ab71e;super(),this[_0x30e74f(0x227)]=_0x3547d6,this[_0x30e74f(0x1c2)]=_0x5356a9,this[_0x30e74f(0x233)]();}[_0x2ab71e(0x233)](){const _0x485ac6=_0x2ab71e;this['_threadCommentDataSourceService'][_0x485ac6(0x1f9)]=this[_0x485ac6(0x1c2)],this['_threadCommentDataSourceService'][_0x485ac6(0x1e4)]=!0x1;}};function _0x199d(){const _0x4b1bac=['subscribe','rangeId','pipe','filter','userID','_initDataSource','replies','getMemberID','4244856OIMbJo','parentId','personId','reply','OpenOrReOpen','dayjs','_threadCommentDataSource','forEach','user','slice','ThreadCommentModel','content','CollaborationSessionService','Injector','stringify','resolveComment','merge','post','UserManagerService','root','CommentService','_injector','body','DependentOn','/universer-api/comment/unit/','customRanges','UniverLicensePlugin','Solved','Delete','_configService','parse','delete','UniverInstanceType','_initUserSync','_init','CustomRangeType','Solve','getComment','_threadCommentModel','Module','syncUpdateMutationToColla','UniverThreadCommentUIPlugin','pluginName','symbol','/solved','find','1557822yoHTbR','IThreadCommentDataSourceService','bufferTime','2344390icbixE','getUser','HTTPService','3140472baIhxh','replyId','add','/list','updateComment','_httpService','solved','values','getUnit','dataSource','defineProperty','rangeType','UniverThreadCommentDataSourcePlugin','Inject','/add','Disposable','requireSession','onReady','Add','_sessionService','map','commentUpdate$','saveCommentToSnapshot','get','deleteComment','/reply','users','onStarting','size','type','_commentService','getOwnPropertyDescriptor','66721wvMkkx','Edit','UNRECOGNIZED','length','6jmAXhH','toStringTag','ref','createTimestamp','unitId','disposeWithMe','userId','YYYY/MM/DD\x20HH:mm','Reply','UniverCollaborationClientPlugin','error','format','getCurrentUser','addComment','/delete','_userService','COMMENT','threadId','listComments','_threadCommentDataSourceService','addUser','code','910896NbkfsJ','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','849399HjokoZ'];_0x199d=function(){return _0x4b1bac;};return _0x199d();}C=J([y(0x0,M[_0x2ab71e(0x1eb)]),y(0x1,c[_0x2ab71e(0x1fd)](g))],C);var F=Object[_0x2ab71e(0x1fa)],L=Object['getOwnPropertyDescriptor'],Z=(_0x39327d,_0x1d3357,_0x3d01ec)=>_0x1d3357 in _0x39327d?F(_0x39327d,_0x1d3357,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d01ec}):_0x39327d[_0x1d3357]=_0x3d01ec,W=(_0x43c342,_0x50ff7d,_0x208d4c,_0x368e24)=>{const _0x18c7f9=_0x2ab71e;for(var _0x5bf2db=_0x368e24>0x1?void 0x0:_0x368e24?L(_0x50ff7d,_0x208d4c):_0x50ff7d,_0x1eb564=_0x43c342[_0x18c7f9(0x213)]-0x1,_0x46b23d;_0x1eb564>=0x0;_0x1eb564--)(_0x46b23d=_0x43c342[_0x1eb564])&&(_0x5bf2db=_0x46b23d(_0x5bf2db)||_0x5bf2db);return _0x5bf2db;},O=(_0x2a35a2,_0x31d898)=>(_0x500671,_0x4dcb3a)=>_0x31d898(_0x500671,_0x4dcb3a,_0x2a35a2),N=(_0x27a3ac,_0xaa55aa,_0x38ec04)=>Z(_0x27a3ac,typeof _0xaa55aa!=_0x2ab71e(0x1e7)?_0xaa55aa+'':_0xaa55aa,_0x38ec04);exports[_0x2ab71e(0x1fc)]=class extends c['Plugin']{constructor(_0xc02ea5=D,_0x1f28cb,_0x32b3e6){const _0x1a3fde=_0x2ab71e;super(),this['_config']=_0xc02ea5,this[_0x1a3fde(0x1d1)]=_0x1f28cb,this['_configService']=_0x32b3e6;const {..._0x6496d4}=c[_0x1a3fde(0x1cc)]({},D,this['_config']);this[_0x1a3fde(0x1d9)]['setConfig'](q,_0x6496d4);}[_0x2ab71e(0x20b)](){[[g],[C],[p]]['forEach'](_0x3afaff=>{const _0x16c966=_0x4e75;this[_0x16c966(0x1d1)][_0x16c966(0x1f2)](_0x3afaff);});}[_0x2ab71e(0x201)](){const _0x308ac8=_0x2ab71e;this[_0x308ac8(0x1d1)][_0x308ac8(0x207)](C),this[_0x308ac8(0x1d1)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2ab71e(0x1e6),U),N(exports[_0x2ab71e(0x1fc)],'type',c[_0x2ab71e(0x1dc)]['UNIVER_UNKNOWN']),exports[_0x2ab71e(0x1fc)]=W([c[_0x2ab71e(0x1d3)](j[_0x2ab71e(0x1e5)],b[_0x2ab71e(0x21d)],T[_0x2ab71e(0x1d6)]),O(0x1,c[_0x2ab71e(0x1fd)](c[_0x2ab71e(0x1c9)])),O(0x2,c['IConfigService'])],exports[_0x2ab71e(0x1fc)]);
1
+ 'use strict';function _0x3058(_0x5a995d,_0x18da63){const _0x1f59f6=_0x1f59();return _0x3058=function(_0x30581d,_0x32695d){_0x30581d=_0x30581d-0xc6;let _0x29a09e=_0x1f59f6[_0x30581d];return _0x29a09e;},_0x3058(_0x5a995d,_0x18da63);}const _0x5a3e92=_0x3058;(function(_0x326ad9,_0x38f49f){const _0xeee72a=_0x3058,_0x58989f=_0x326ad9();while(!![]){try{const _0x29ca3d=-parseInt(_0xeee72a(0xe4))/0x1+parseInt(_0xeee72a(0xd5))/0x2*(-parseInt(_0xeee72a(0xed))/0x3)+-parseInt(_0xeee72a(0x118))/0x4+parseInt(_0xeee72a(0xe7))/0x5+-parseInt(_0xeee72a(0x132))/0x6*(-parseInt(_0xeee72a(0x104))/0x7)+parseInt(_0xeee72a(0xeb))/0x8*(-parseInt(_0xeee72a(0xcc))/0x9)+-parseInt(_0xeee72a(0xf4))/0xa*(-parseInt(_0xeee72a(0x103))/0xb);if(_0x29ca3d===_0x38f49f)break;else _0x58989f['push'](_0x58989f['shift']());}catch(_0xbbd06f){_0x58989f['push'](_0x58989f['shift']());}}}(_0x1f59,0x81bcc));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});function _0x1f59(){const _0x513bd6=['filter','/add','UniverThreadCommentUIPlugin','1850gvwGgI','Solve','YYYY/MM/DD\x20HH:mm','parentId','Inject','userID','UNRECOGNIZED','getUnit','_init','ThreadCommentModel','saveCommentToSnapshot','map','commentUpdate$','payload','Unknown','54153wXrmkm','616LGHVfB','stringify','CustomRangeType','createTimestamp','/universer-api/comment/unit/','getOwnPropertyDescriptor','personId','unitId','addComment','thread-comment-data-source.config','rangeId','/universer-api/user/list','get','_userService','replies','_threadCommentDataSource','/delete','content','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','1628076MWdFaq','addUser','rangeType','parse','Disposable','_config','getMemberID','Solved','length','IConfigService','/list','OpenOrReOpen','comment','symbol','HTTPService','user','solved','/edit','root','forEach','_threadCommentModel','_httpService','threadId','getComment','post','error','51420PidXTU','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','body','/reply','Delete','users','CollaborationSessionService','code','onStarting','type','merge','Reply','1233evkPhA','_initUserSync','resolved','updateComment','UNIVER_UNKNOWN','IThreadCommentDataSourceService','Add','dayjs','_initDataSource','1528MWidjC','add','values','reply','bufferTime','Injector','UniverCollaborationClientPlugin','resolveComment','syncUpdateMutationToColla','userId','_configService','UserManagerService','disposeWithMe','onReady','defineProperty','12202uWrAOU','_injector','_commentService','2144120qlUqJB','replyId','_sessionService','Edit','32176jNmrId','CommentService','2325zsqTGj','/solved','customRanges','listComments'];_0x1f59=function(){return _0x513bd6;};return _0x1f59();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x5a3e92(0x134);var I=(_0x5b946e=>(_0x5b946e[_0x5b946e[_0x5a3e92(0x123)]=0x0]=_0x5a3e92(0x123),_0x5b946e[_0x5b946e[_0x5a3e92(0x11f)]=0x1]=_0x5a3e92(0x11f),_0x5b946e[_0x5b946e['UNRECOGNIZED']=-0x1]=_0x5a3e92(0xfa),_0x5b946e))(I||{}),v=(_0x3920b3=>(_0x3920b3[_0x3920b3['Unknown']=0x0]=_0x5a3e92(0x102),_0x3920b3[_0x3920b3[_0x5a3e92(0xd2)]=0x1]='Add',_0x3920b3[_0x3920b3['Reply']=0x2]='Reply',_0x3920b3[_0x3920b3[_0x5a3e92(0xea)]=0x3]=_0x5a3e92(0xea),_0x3920b3[_0x3920b3[_0x5a3e92(0x138)]=0x4]=_0x5a3e92(0x138),_0x3920b3[_0x3920b3[_0x5a3e92(0xf5)]=0x5]=_0x5a3e92(0xf5),_0x3920b3[_0x3920b3[_0x5a3e92(0xfa)]=-0x1]=_0x5a3e92(0xfa),_0x3920b3))(v||{});const f=_0x2dafeb=>c[_0x5a3e92(0xd3)](new Date(+_0x2dafeb))[_0x5a3e92(0x133)](_0x5a3e92(0xf6)),R=async(_0x5d2e9a,_0x5629c4)=>{const _0x34ef34=_0x5a3e92,_0x41d649=_0x5d2e9a['get'](c[_0x34ef34(0xe0)]),_0x4b8fd2=_0x5d2e9a[_0x34ef34(0x110)](P['HTTPService']);_0x5629c4[_0x34ef34(0x12b)](_0x278db5=>{_0x41d649['getUser'](_0x278db5)&&_0x5629c4['delete'](_0x278db5);}),_0x5629c4['size']&&(await _0x4b8fd2[_0x34ef34(0x110)](_0x34ef34(0x10f),{'params':{'userIDs':[..._0x5629c4]}}))[_0x34ef34(0x136)][_0x34ef34(0x139)]['forEach'](_0x3459f9=>{const _0x102be8=_0x34ef34;_0x3459f9&&_0x41d649[_0x102be8(0x119)](_0x3459f9);});};var $=Object[_0x5a3e92(0x109)],E=(_0x39b66f,_0x3b2649,_0x59b0ca,_0x201171)=>{for(var _0x117d3c=_0x201171>0x1?void 0x0:_0x201171?$(_0x3b2649,_0x59b0ca):_0x3b2649,_0x5296ae=_0x39b66f['length']-0x1,_0x259c7c;_0x5296ae>=0x0;_0x5296ae--)(_0x259c7c=_0x39b66f[_0x5296ae])&&(_0x117d3c=_0x259c7c(_0x117d3c)||_0x117d3c);return _0x117d3c;},S=(_0x20858f,_0x54bc45)=>(_0x1e2b65,_0x5208cf)=>_0x54bc45(_0x1e2b65,_0x5208cf,_0x20858f);let p=class extends c['Disposable']{constructor(_0x2b1deb,_0x50e5ce,_0x209ee3,_0xea51a9){const _0x336489=_0x5a3e92;super(),this['_commentService']=_0x2b1deb,this[_0x336489(0x12c)]=_0x50e5ce,this[_0x336489(0x111)]=_0x209ee3,this[_0x336489(0xe5)]=_0xea51a9,this['_init'](),this[_0x336489(0xcd)]();}['_initUserSync'](){const _0x2e6aaa=_0x5a3e92;this[_0x2e6aaa(0xe1)](this[_0x2e6aaa(0x12c)][_0x2e6aaa(0x100)]['pipe'](w[_0x2e6aaa(0xd9)](0x10))['subscribe'](_0x44b3a0=>{const _0x4df286=_0x2e6aaa,_0x3f4f1b=new Set();_0x44b3a0[_0x4df286(0x12b)](_0x549151=>{const _0x537985=_0x4df286;switch(_0x549151[_0x537985(0xc9)]){case _0x537985(0xd6):{const _0x22ef90=_0x549151[_0x537985(0x101)][_0x537985(0x10a)];_0x3f4f1b[_0x537985(0xd6)](_0x22ef90);break;}}}),R(this['_injector'],_0x3f4f1b);}));}[_0x5a3e92(0xfc)](){const _0x1502ad=_0x5a3e92;this[_0x1502ad(0xe1)](this[_0x1502ad(0xe6)]['commentUpdate$']['subscribe'](async _0x179117=>{const _0x35db77=_0x1502ad;var _0x433505,_0x915f66,_0xb4a0a3,_0x53b2a5;const _0x575051=(_0x433505=this['_threadCommentModel']['getUnit'](_0x179117['unitId'])['find'](_0x4b0cef=>_0x4b0cef[_0x35db77(0x12e)]===_0x179117[_0x35db77(0x12e)]))==null?void 0x0:_0x433505[_0x35db77(0x12a)];if(!_0x575051)return;const {unitId:_0xd99e2a,subUnitId:_0x402d47}=_0x575051;switch(_0x179117[_0x35db77(0x127)]&&this[_0x35db77(0x111)][_0x35db77(0x119)](_0x179117[_0x35db77(0x127)]),_0x179117[_0x35db77(0xc9)]){case v['Add']:break;case v[_0x35db77(0xcb)]:{this['_threadCommentModel']['addComment'](_0xd99e2a,_0x402d47,{'unitId':_0xd99e2a,'subUnitId':_0x402d47,'ref':'','id':_0x179117['replyId'],'dT':f(+_0x179117['createTimestamp']),'threadId':_0x179117[_0x35db77(0x12e)],'personId':(_0xb4a0a3=(_0x915f66=_0x179117[_0x35db77(0x127)])==null?void 0x0:_0x915f66[_0x35db77(0xf9)])!=null?_0xb4a0a3:_0x179117[_0x35db77(0xde)],'text':JSON[_0x35db77(0x11b)](_0x179117[_0x35db77(0x115)]),'parentId':_0x575051['id']});break;}case v[_0x35db77(0x138)]:{const _0x11532e=this[_0x35db77(0x12c)][_0x35db77(0x12f)](_0xd99e2a,_0x402d47,_0x179117[_0x35db77(0xe8)]);_0x11532e&&_0x11532e[_0x35db77(0xf7)]&&this[_0x35db77(0x12c)]['deleteComment'](_0xd99e2a,_0x402d47,_0x179117['replyId']);break;}case v['Edit']:{this[_0x35db77(0x12c)][_0x35db77(0xcf)](_0xd99e2a,_0x402d47,{'commentId':_0x179117[_0x35db77(0xe8)],'text':JSON[_0x35db77(0x11b)](_0x179117[_0x35db77(0x115)])});break;}case v[_0x35db77(0xf5)]:{const _0x524986=(_0x53b2a5=this[_0x35db77(0x12c)][_0x35db77(0xfb)](_0x179117[_0x35db77(0x10b)])['find'](_0x5e6ac1=>_0x5e6ac1[_0x35db77(0x12e)]===_0x179117[_0x35db77(0x12e)]))==null?void 0x0:_0x53b2a5[_0x35db77(0x12a)];_0x524986&&this[_0x35db77(0x12c)][_0x35db77(0xdc)](_0xd99e2a,_0x402d47,_0x524986['id'],_0x179117[_0x35db77(0x128)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x5a3e92(0xf8)](b[_0x5a3e92(0xec)])),S(0x1,c[_0x5a3e92(0xf8)](M[_0x5a3e92(0xfd)])),S(0x2,c[_0x5a3e92(0xf8)](c['UserManagerService'])),S(0x3,c[_0x5a3e92(0xf8)](c[_0x5a3e92(0xda)]))],p);const q=_0x5a3e92(0x10d),D={};var A=Object[_0x5a3e92(0x109)],x=(_0x304227,_0xb04feb,_0x2e7e1a,_0x19301d)=>{const _0x26e057=_0x5a3e92;for(var _0x47adf1=_0x19301d>0x1?void 0x0:_0x19301d?A(_0xb04feb,_0x2e7e1a):_0xb04feb,_0x198127=_0x304227[_0x26e057(0x120)]-0x1,_0x30ca00;_0x198127>=0x0;_0x198127--)(_0x30ca00=_0x304227[_0x198127])&&(_0x47adf1=_0x30ca00(_0x47adf1)||_0x47adf1);return _0x47adf1;},_=(_0x6a0445,_0x1631c4)=>(_0x2be810,_0xaefe6a)=>_0x1631c4(_0x2be810,_0xaefe6a,_0x6a0445);function Y(_0x420919,_0x596ee6){const _0x2aac8a=_0x5a3e92,_0x3427c9=_0x420919['replies'][0x0];return{..._0x596ee6,'id':_0x3427c9[_0x2aac8a(0xe8)],'resolved':_0x420919[_0x2aac8a(0x128)]===0x1,'dT':f(_0x3427c9[_0x2aac8a(0x107)]),'personId':_0x3427c9[_0x2aac8a(0xde)],'threadId':_0x3427c9[_0x2aac8a(0x12e)]};}function G(_0x5f0c71,_0x1ca32d,_0x541d6a){const _0x2708df=_0x5a3e92;var _0x16eff2,_0x33676e;if(((_0x33676e=(_0x16eff2=_0x5f0c71==null?void 0x0:_0x5f0c71[_0x2708df(0x112)])==null?void 0x0:_0x16eff2[_0x2708df(0x120)])!=null?_0x33676e:0x0)>0x0){const _0x31f0cc=(_0x4062fe,_0x1f90c4)=>({'id':_0x4062fe[_0x2708df(0xe8)],'threadId':_0x4062fe[_0x2708df(0x12e)],'dT':f(_0x4062fe[_0x2708df(0x107)]),'personId':_0x4062fe[_0x2708df(0xde)],'resolved':_0x5f0c71[_0x2708df(0x128)]===I['Solved'],'unitId':_0x1ca32d,'subUnitId':_0x541d6a,'text':JSON['parse'](_0x4062fe['content']),'parentId':_0x1f90c4}),_0x340274=_0x31f0cc(_0x5f0c71[_0x2708df(0x112)][0x0]);return{..._0x340274,'children':_0x5f0c71[_0x2708df(0x112)]['slice'](0x1)['map'](_0x43a705=>_0x31f0cc(_0x43a705,_0x340274['id']))};}return null;}let g=class{constructor(_0x220f9b,_0x33f8c2,_0x1a294c,_0x6d34d0){const _0x41b863=_0x5a3e92;this['_httpService']=_0x220f9b,this[_0x41b863(0x111)]=_0x33f8c2,this['_sessionService']=_0x1a294c,this[_0x41b863(0xe5)]=_0x6d34d0;}async[_0x5a3e92(0x10c)](_0x484d36){const _0x3b914f=_0x5a3e92;var _0x36836d,_0x41cee6;const {parentId:_0x304bd7,unitId:_0x447d54,text:_0x8942ed,threadId:_0x4ca339}=_0x484d36,_0x2be604=(_0x41cee6=(_0x36836d=_0x8942ed[_0x3b914f(0xef)])==null?void 0x0:_0x36836d[_0x3b914f(0xf1)](_0x1dac63=>_0x1dac63['rangeType']===c[_0x3b914f(0x106)]['COMMENT'])['map'](_0x3e9c3c=>_0x3e9c3c[_0x3b914f(0x10e)]))!=null?_0x41cee6:[],_0x430a50=JSON[_0x3b914f(0x105)](_0x8942ed),_0x58d899=(await this[_0x3b914f(0xe9)][_0x3b914f(0x135)](_0x447d54))[_0x3b914f(0x11e)]();if(_0x304bd7){const _0x4d1007={'memberId':_0x58d899,'unitId':_0x447d54,'content':_0x430a50,'mention':_0x2be604,'threadId':_0x4ca339},_0x590108=(await this[_0x3b914f(0x12d)][_0x3b914f(0x130)](_0x3b914f(0x108)+_0x447d54+_0x3b914f(0x137),{'body':_0x4d1007}))['body'][_0x3b914f(0xd8)];return{..._0x484d36,'id':_0x590108[_0x3b914f(0xe8)],'dT':c[_0x3b914f(0xd3)](+_0x590108['createTimestamp'])[_0x3b914f(0x133)](_0x3b914f(0xf6)),'personId':_0x590108[_0x3b914f(0xde)]};}else{const _0x117b1f={'memberId':_0x58d899,'unitId':_0x447d54,'content':_0x430a50,'mention':_0x2be604},_0xd3701c=await this[_0x3b914f(0x12d)]['post'](_0x3b914f(0x108)+_0x447d54+_0x3b914f(0xf2),{'body':_0x117b1f});return Y(_0xd3701c[_0x3b914f(0x136)][_0x3b914f(0x124)],_0x484d36);}}async[_0x5a3e92(0xcf)](_0x1695df){const _0x5e4a60=_0x5a3e92;var _0x4898d3,_0x4302f6;const {text:_0xeaaaf3,unitId:_0x239578}=_0x1695df,_0x263e13=(_0x4302f6=(_0x4898d3=_0xeaaaf3[_0x5e4a60(0xef)])==null?void 0x0:_0x4898d3['filter'](_0x33db7c=>_0x33db7c[_0x5e4a60(0x11a)]===c[_0x5e4a60(0x106)]['COMMENT'])[_0x5e4a60(0xff)](_0x3c783f=>_0x3c783f[_0x5e4a60(0x10e)]))!=null?_0x4302f6:[],_0x5f21cb=JSON['stringify'](_0xeaaaf3),_0x249f39=_0x1695df[_0x5e4a60(0x12e)],_0x459172=_0x1695df['id'],_0x2610b9={'memberId':(await this[_0x5e4a60(0xe9)][_0x5e4a60(0x135)](_0x239578))['getMemberID'](),'unitId':_0x239578,'threadId':_0x249f39,'mention':_0x263e13,'content':_0x5f21cb,'replyId':_0x459172},_0x52a463=await this[_0x5e4a60(0x12d)][_0x5e4a60(0x130)]('/universer-api/comment/unit/'+_0x239578+_0x5e4a60(0x129),{'body':_0x2610b9});return!_0x52a463[_0x5e4a60(0x136)][_0x5e4a60(0x131)]||_0x52a463['body']['error'][_0x5e4a60(0xc7)]===0x1;}async[_0x5a3e92(0xdc)](_0x77e6ef){const _0x24fbe6=_0x5a3e92,{unitId:_0x3c096b}=_0x77e6ef,_0xc07df6=_0x77e6ef[_0x24fbe6(0x12e)],_0x2a792d={'memberId':this['_userService']['getCurrentUser']()[_0x24fbe6(0xf9)],'unitId':_0x3c096b,'threadId':_0xc07df6,'solved':_0x77e6ef[_0x24fbe6(0xce)]?I[_0x24fbe6(0x11f)]:I[_0x24fbe6(0x123)]},_0x2cd2e4=await this[_0x24fbe6(0x12d)]['post'](_0x24fbe6(0x108)+_0x3c096b+_0x24fbe6(0xee),{'body':_0x2a792d});return!_0x2cd2e4[_0x24fbe6(0x136)][_0x24fbe6(0x131)]||_0x2cd2e4['body'][_0x24fbe6(0x131)][_0x24fbe6(0xc7)]===0x1;}async['deleteComment'](_0x25d9e5,_0x509fa4,_0x121d97,_0x4ee619){const _0x5b8865=_0x5a3e92,_0xbde299={'memberId':(await this[_0x5b8865(0xe9)][_0x5b8865(0x135)](_0x25d9e5))[_0x5b8865(0x11e)](),'threadId':_0x121d97,'replyId':_0x4ee619,'unitId':_0x25d9e5},_0x129d63=await this['_httpService']['post'](_0x5b8865(0x108)+_0x25d9e5+_0x5b8865(0x114),{'body':_0xbde299});return!_0x129d63['body'][_0x5b8865(0x131)]||_0x129d63[_0x5b8865(0x136)][_0x5b8865(0x131)][_0x5b8865(0xc7)]===0x1;}async[_0x5a3e92(0xf0)](_0xcf4615,_0x76f88d,_0x11e8d1){const _0x15f16c=_0x5a3e92,_0x3026e0={'unitId':_0xcf4615,'threadId':_0x11e8d1},_0x3b766a=await this['_httpService'][_0x15f16c(0x130)]('/universer-api/comment/unit/'+_0xcf4615+_0x15f16c(0x122),{'body':_0x3026e0}),_0x53af8a=_0x11e8d1[_0x15f16c(0xff)](_0x8b07d2=>G(_0x3b766a['body']['comments'][_0x8b07d2],_0xcf4615,_0x76f88d))[_0x15f16c(0xf1)](Boolean);return Object[_0x15f16c(0xd7)](_0x3b766a['body']['users'])['forEach'](_0x1e4415=>{const _0x37eaf9=_0x15f16c;this['_userService'][_0x37eaf9(0x119)](_0x1e4415);}),_0x53af8a;}[_0x5a3e92(0xfe)](_0x4ecd9f){const _0x54c3bf=_0x5a3e92;return{'id':_0x4ecd9f['id'],'threadId':_0x4ecd9f[_0x54c3bf(0x12e)],'ref':_0x4ecd9f['ref']};}};g=x([_(0x0,c[_0x5a3e92(0xf8)](P[_0x5a3e92(0x126)])),_(0x1,c['Inject'](c[_0x5a3e92(0xe0)])),_(0x2,c['Inject'](b[_0x5a3e92(0xc6)])),_(0x3,c['Inject'](c[_0x5a3e92(0xda)]))],g);var H=Object[_0x5a3e92(0x109)],J=(_0x1bfdc1,_0x2b0f58,_0x555418,_0x4d5771)=>{for(var _0x574640=_0x4d5771>0x1?void 0x0:_0x4d5771?H(_0x2b0f58,_0x555418):_0x2b0f58,_0x12be26=_0x1bfdc1['length']-0x1,_0x226fe6;_0x12be26>=0x0;_0x12be26--)(_0x226fe6=_0x1bfdc1[_0x12be26])&&(_0x574640=_0x226fe6(_0x574640)||_0x574640);return _0x574640;},y=(_0x1fc21b,_0x541afb)=>(_0x2a7283,_0x2f5684)=>_0x541afb(_0x2a7283,_0x2f5684,_0x1fc21b);let C=class extends c[_0x5a3e92(0x11c)]{constructor(_0x33ee6e,_0x19a30d){const _0x11b581=_0x5a3e92;super(),this[_0x11b581(0x116)]=_0x33ee6e,this[_0x11b581(0x113)]=_0x19a30d,this['_initDataSource']();}[_0x5a3e92(0xd4)](){const _0x1f6318=_0x5a3e92;this['_threadCommentDataSourceService']['dataSource']=this[_0x1f6318(0x113)],this[_0x1f6318(0x116)][_0x1f6318(0xdd)]=!0x1;}};C=J([y(0x0,M[_0x5a3e92(0xd1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x5a3e92(0xe3)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2d5723,_0x4953ea,_0x6682db)=>_0x4953ea in _0x2d5723?F(_0x2d5723,_0x4953ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6682db}):_0x2d5723[_0x4953ea]=_0x6682db,W=(_0x842501,_0x64103c,_0x212d41,_0x56bf75)=>{const _0x128d8f=_0x5a3e92;for(var _0x45b4d5=_0x56bf75>0x1?void 0x0:_0x56bf75?L(_0x64103c,_0x212d41):_0x64103c,_0x58004a=_0x842501[_0x128d8f(0x120)]-0x1,_0x2ffbb1;_0x58004a>=0x0;_0x58004a--)(_0x2ffbb1=_0x842501[_0x58004a])&&(_0x45b4d5=_0x2ffbb1(_0x45b4d5)||_0x45b4d5);return _0x45b4d5;},O=(_0x68917a,_0x149967)=>(_0x513f45,_0x4ffab2)=>_0x149967(_0x513f45,_0x4ffab2,_0x68917a),N=(_0x3ad275,_0x4875fa,_0x1757ff)=>Z(_0x3ad275,typeof _0x4875fa!=_0x5a3e92(0x125)?_0x4875fa+'':_0x4875fa,_0x1757ff);exports[_0x5a3e92(0x117)]=class extends c['Plugin']{constructor(_0x48bbf8=D,_0x1f16ba,_0x928626){const _0xb13038=_0x5a3e92;super(),this[_0xb13038(0x11d)]=_0x48bbf8,this['_injector']=_0x1f16ba,this[_0xb13038(0xdf)]=_0x928626;const {..._0x4bccdb}=c[_0xb13038(0xca)]({},D,this['_config']);this[_0xb13038(0xdf)]['setConfig'](q,_0x4bccdb);}[_0x5a3e92(0xc8)](){const _0xbb7f6=_0x5a3e92;[[g],[C],[p]][_0xbb7f6(0x12b)](_0x357316=>{const _0x598499=_0xbb7f6;this[_0x598499(0xe5)][_0x598499(0xd6)](_0x357316);});}[_0x5a3e92(0xe2)](){const _0x1802a3=_0x5a3e92;this[_0x1802a3(0xe5)][_0x1802a3(0x110)](C),this['_injector'][_0x1802a3(0x110)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x5a3e92(0x117)],_0x5a3e92(0xc9),c['UniverInstanceType'][_0x5a3e92(0xd0)]),exports[_0x5a3e92(0x117)]=W([c['DependentOn'](j[_0x5a3e92(0xf3)],b[_0x5a3e92(0xdb)],T['UniverLicensePlugin']),O(0x1,c[_0x5a3e92(0xf8)](c['Injector'])),O(0x2,c[_0x5a3e92(0x121)])],exports[_0x5a3e92(0x117)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2cea5e=_0x532a;(function(_0x377d08,_0x3d964d){const _0x3787e2=_0x532a,_0x312298=_0x377d08();while(!![]){try{const _0x3e50bb=-parseInt(_0x3787e2(0x1e6))/0x1*(-parseInt(_0x3787e2(0x192))/0x2)+parseInt(_0x3787e2(0x1d6))/0x3+parseInt(_0x3787e2(0x198))/0x4*(-parseInt(_0x3787e2(0x195))/0x5)+-parseInt(_0x3787e2(0x18d))/0x6+-parseInt(_0x3787e2(0x1f5))/0x7*(parseInt(_0x3787e2(0x19a))/0x8)+parseInt(_0x3787e2(0x1ab))/0x9*(parseInt(_0x3787e2(0x1b9))/0xa)+parseInt(_0x3787e2(0x1d3))/0xb;if(_0x3e50bb===_0x3d964d)break;else _0x312298['push'](_0x312298['shift']());}catch(_0x3071f5){_0x312298['push'](_0x312298['shift']());}}}(_0x47d2,0x89eb0));import{CommentService as _0x57d725,CollaborationSessionService as _0x3a25a6,UniverCollaborationClientPlugin as _0x18d329}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22f1b8}from'@univerjs-pro/license';import{dayjs as _0x33b9d1,UserManagerService as _0x168610,Inject as _0x2c417f,Injector as _0x448b63,Disposable as _0x5387f5,CustomRangeType as _0x558556,UniverInstanceType as _0x30ce88,DependentOn as _0x2b5003,IConfigService as _0x17ea7f,Plugin as _0x22233e,merge as _0x2b4b40}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ccdc3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa19232,IThreadCommentDataSourceService as _0x17a4a8}from'@univerjs/thread-comment';import{bufferTime as _0x534754}from'rxjs';import{HTTPService as _0x54e640}from'@univerjs/network';const W=_0x2cea5e(0x19c);var I=(_0x35670c=>(_0x35670c[_0x35670c[_0x2cea5e(0x1bc)]=0x0]=_0x2cea5e(0x1bc),_0x35670c[_0x35670c[_0x2cea5e(0x1b2)]=0x1]=_0x2cea5e(0x1b2),_0x35670c[_0x35670c[_0x2cea5e(0x19b)]=-0x1]=_0x2cea5e(0x19b),_0x35670c))(I||{}),v=(_0xb38806=>(_0xb38806[_0xb38806[_0x2cea5e(0x1e9)]=0x0]=_0x2cea5e(0x1e9),_0xb38806[_0xb38806[_0x2cea5e(0x1f6)]=0x1]=_0x2cea5e(0x1f6),_0xb38806[_0xb38806[_0x2cea5e(0x199)]=0x2]=_0x2cea5e(0x199),_0xb38806[_0xb38806[_0x2cea5e(0x1bb)]=0x3]=_0x2cea5e(0x1bb),_0xb38806[_0xb38806[_0x2cea5e(0x1f4)]=0x4]=_0x2cea5e(0x1f4),_0xb38806[_0xb38806[_0x2cea5e(0x1d8)]=0x5]=_0x2cea5e(0x1d8),_0xb38806[_0xb38806[_0x2cea5e(0x19b)]=-0x1]='UNRECOGNIZED',_0xb38806))(v||{});function _0x532a(_0x3cc71a,_0x2ed6b9){const _0x47d2b8=_0x47d2();return _0x532a=function(_0x532a1f,_0x5dac7e){_0x532a1f=_0x532a1f-0x18d;let _0x516c6b=_0x47d2b8[_0x532a1f];return _0x516c6b;},_0x532a(_0x3cc71a,_0x2ed6b9);}const D=_0x4a467a=>_0x33b9d1(new Date(+_0x4a467a))[_0x2cea5e(0x1d4)](_0x2cea5e(0x1a8)),B=async(_0x340f92,_0x17bbee)=>{const _0x405b9=_0x2cea5e,_0x124ab4=_0x340f92[_0x405b9(0x1cb)](_0x168610),_0x30f06b=_0x340f92[_0x405b9(0x1cb)](_0x54e640);_0x17bbee['forEach'](_0x148267=>{const _0x4231f1=_0x405b9;_0x124ab4[_0x4231f1(0x1ef)](_0x148267)&&_0x17bbee[_0x4231f1(0x194)](_0x148267);}),_0x17bbee[_0x405b9(0x1a4)]&&(await _0x30f06b[_0x405b9(0x1cb)](_0x405b9(0x1e8),{'params':{'userIDs':[..._0x17bbee]}}))[_0x405b9(0x1e1)][_0x405b9(0x1ba)]['forEach'](_0x3f5af5=>{const _0x1c7a3f=_0x405b9;_0x3f5af5&&_0x124ab4[_0x1c7a3f(0x1ad)](_0x3f5af5);});};var K=Object[_0x2cea5e(0x1d2)],V=(_0x423f39,_0x3b0632,_0x1fe8c0,_0x5a9966)=>{const _0x360b5f=_0x2cea5e;for(var _0x57419b=_0x5a9966>0x1?void 0x0:_0x5a9966?K(_0x3b0632,_0x1fe8c0):_0x3b0632,_0x357487=_0x423f39[_0x360b5f(0x1a1)]-0x1,_0x18870f;_0x357487>=0x0;_0x357487--)(_0x18870f=_0x423f39[_0x357487])&&(_0x57419b=_0x18870f(_0x57419b)||_0x57419b);return _0x57419b;},p=(_0x14fe14,_0x46496e)=>(_0x2e2393,_0x5aa0b4)=>_0x46496e(_0x2e2393,_0x5aa0b4,_0x14fe14);let S=class extends _0x5387f5{constructor(_0x2bf4ce,_0x3ba421,_0x25eca,_0xae0c3b){const _0xbddff6=_0x2cea5e;super(),this[_0xbddff6(0x1be)]=_0x2bf4ce,this['_threadCommentModel']=_0x3ba421,this[_0xbddff6(0x1c5)]=_0x25eca,this[_0xbddff6(0x1e5)]=_0xae0c3b,this['_init'](),this[_0xbddff6(0x1b6)]();}[_0x2cea5e(0x1b6)](){const _0x3882b6=_0x2cea5e;this[_0x3882b6(0x1dc)](this[_0x3882b6(0x1db)][_0x3882b6(0x1ce)][_0x3882b6(0x1ac)](_0x534754(0x10))[_0x3882b6(0x1c8)](_0x530149=>{const _0x8f8e59=_0x3882b6,_0x390024=new Set();_0x530149[_0x8f8e59(0x1f3)](_0x1200f6=>{const _0x31a18d=_0x8f8e59;switch(_0x1200f6[_0x31a18d(0x1f1)]){case _0x31a18d(0x1bf):{const _0x1f1eed=_0x1200f6[_0x31a18d(0x193)]['personId'];_0x390024[_0x31a18d(0x1bf)](_0x1f1eed);break;}}}),B(this['_injector'],_0x390024);}));}[_0x2cea5e(0x1ee)](){const _0x1d102b=_0x2cea5e;this[_0x1d102b(0x1dc)](this['_commentService']['commentUpdate$'][_0x1d102b(0x1c8)](async _0x2198c6=>{const _0x1a7907=_0x1d102b;var _0x536dcb,_0x21ad18,_0x2cc167,_0x57986d;const _0x38918f=(_0x536dcb=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x78147d=>_0x78147d[_0x1a7907(0x1e7)]===_0x2198c6['threadId']))==null?void 0x0:_0x536dcb['root'];if(!_0x38918f)return;const {unitId:_0x33756c,subUnitId:_0xb2b883}=_0x38918f;switch(_0x2198c6[_0x1a7907(0x1a6)]&&this[_0x1a7907(0x1c5)][_0x1a7907(0x1ad)](_0x2198c6[_0x1a7907(0x1a6)]),_0x2198c6['type']){case v['Add']:break;case v[_0x1a7907(0x199)]:{this[_0x1a7907(0x1db)][_0x1a7907(0x1ec)](_0x33756c,_0xb2b883,{'unitId':_0x33756c,'subUnitId':_0xb2b883,'ref':'','id':_0x2198c6[_0x1a7907(0x1a7)],'dT':D(+_0x2198c6[_0x1a7907(0x1cc)]),'threadId':_0x2198c6[_0x1a7907(0x1e7)],'personId':(_0x2cc167=(_0x21ad18=_0x2198c6[_0x1a7907(0x1a6)])==null?void 0x0:_0x21ad18[_0x1a7907(0x1e4)])!=null?_0x2cc167:_0x2198c6[_0x1a7907(0x1e3)],'text':JSON[_0x1a7907(0x1ca)](_0x2198c6[_0x1a7907(0x1d7)]),'parentId':_0x38918f['id']});break;}case v[_0x1a7907(0x1f4)]:{const _0x5b1713=this[_0x1a7907(0x1db)][_0x1a7907(0x1dd)](_0x33756c,_0xb2b883,_0x2198c6[_0x1a7907(0x1a7)]);_0x5b1713&&_0x5b1713[_0x1a7907(0x1a2)]&&this[_0x1a7907(0x1db)][_0x1a7907(0x1f2)](_0x33756c,_0xb2b883,_0x2198c6['replyId']);break;}case v['Edit']:{this[_0x1a7907(0x1db)][_0x1a7907(0x1b1)](_0x33756c,_0xb2b883,{'commentId':_0x2198c6[_0x1a7907(0x1a7)],'text':JSON['parse'](_0x2198c6[_0x1a7907(0x1d7)])});break;}case v[_0x1a7907(0x1d8)]:{const _0x4ae76b=(_0x57986d=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x2cde6e=>_0x2cde6e[_0x1a7907(0x1e7)]===_0x2198c6[_0x1a7907(0x1e7)]))==null?void 0x0:_0x57986d[_0x1a7907(0x18f)];_0x4ae76b&&this[_0x1a7907(0x1db)]['resolveComment'](_0x33756c,_0xb2b883,_0x4ae76b['id'],_0x2198c6['solved']===I['Solved']);break;}}}));}};function _0x47d2(){const _0x3ff6bf=['2114406GywHze','Add','COMMENT','2303652rRnSAf','/edit','root','_configService','find','111390aGldSc','payload','delete','5LRFcHC','customRanges','getCurrentUser','2789604VExDlm','Reply','16RhUNYl','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','syncUpdateMutationToColla','/solved','code','length','parentId','/universer-api/comment/unit/','size','_sessionService','user','replyId','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','resolved','16821SKGOoo','pipe','addUser','filter','solved','onReady','updateComment','Solved','resolveComment','_config','reply','_initUserSync','rangeId','slice','3350pjTPzF','users','Edit','OpenOrReOpen','onStarting','_commentService','add','/reply','pluginName','defineProperty','thread-comment-data-source.config','map','_userService','getMemberID','unitId','subscribe','setConfig','parse','get','createTimestamp','rangeType','commentUpdate$','_httpService','stringify','_initDataSource','getOwnPropertyDescriptor','12072687JwxwHt','format','_threadCommentDataSource','744792oHVdlO','content','Solve','replies','symbol','_threadCommentModel','disposeWithMe','getComment','requireSession','error','ref','body','post','userId','userID','_injector','5CcsSRw','threadId','/universer-api/user/list','Unknown','/list','values','addComment','comment','_init','getUser','/delete','type','deleteComment','forEach','Delete'];_0x47d2=function(){return _0x3ff6bf;};return _0x47d2();}S=V([p(0x0,_0x2c417f(_0x57d725)),p(0x1,_0x2c417f(_0xa19232)),p(0x2,_0x2c417f(_0x168610)),p(0x3,_0x2c417f(_0x448b63))],S);const z=_0x2cea5e(0x1c3),M={};var k=Object[_0x2cea5e(0x1d2)],Q=(_0x5c196f,_0xa81692,_0x40095c,_0x51c278)=>{for(var _0x4cd605=_0x51c278>0x1?void 0x0:_0x51c278?k(_0xa81692,_0x40095c):_0xa81692,_0x544770=_0x5c196f['length']-0x1,_0x40ac6d;_0x544770>=0x0;_0x544770--)(_0x40ac6d=_0x5c196f[_0x544770])&&(_0x4cd605=_0x40ac6d(_0x4cd605)||_0x4cd605);return _0x4cd605;},_=(_0x24a18a,_0x5918ca)=>(_0x4c1c8f,_0x2d19cf)=>_0x5918ca(_0x4c1c8f,_0x2d19cf,_0x24a18a);function X(_0x5ba611,_0x3ab685){const _0x553694=_0x2cea5e,_0x570b60=_0x5ba611[_0x553694(0x1d9)][0x0];return{..._0x3ab685,'id':_0x570b60['replyId'],'resolved':_0x5ba611[_0x553694(0x1af)]===0x1,'dT':D(_0x570b60[_0x553694(0x1cc)]),'personId':_0x570b60[_0x553694(0x1e3)],'threadId':_0x570b60[_0x553694(0x1e7)]};}function ee(_0x3ef257,_0x13d276,_0x16c78a){const _0x33e968=_0x2cea5e;var _0x16cc35,_0x3cd3fc;if(((_0x3cd3fc=(_0x16cc35=_0x3ef257==null?void 0x0:_0x3ef257[_0x33e968(0x1d9)])==null?void 0x0:_0x16cc35['length'])!=null?_0x3cd3fc:0x0)>0x0){const _0x2a4aa3=(_0x56d2a7,_0x425e36)=>({'id':_0x56d2a7['replyId'],'threadId':_0x56d2a7[_0x33e968(0x1e7)],'dT':D(_0x56d2a7[_0x33e968(0x1cc)]),'personId':_0x56d2a7[_0x33e968(0x1e3)],'resolved':_0x3ef257[_0x33e968(0x1af)]===I[_0x33e968(0x1b2)],'unitId':_0x13d276,'subUnitId':_0x16c78a,'text':JSON['parse'](_0x56d2a7[_0x33e968(0x1d7)]),'parentId':_0x425e36}),_0x583304=_0x2a4aa3(_0x3ef257['replies'][0x0]);return{..._0x583304,'children':_0x3ef257[_0x33e968(0x1d9)][_0x33e968(0x1b8)](0x1)[_0x33e968(0x1c4)](_0x2950a6=>_0x2a4aa3(_0x2950a6,_0x583304['id']))};}return null;}let f=class{constructor(_0x30369b,_0xcf72ee,_0x435bbe,_0x4dbff0){const _0x33ef0a=_0x2cea5e;this[_0x33ef0a(0x1cf)]=_0x30369b,this[_0x33ef0a(0x1c5)]=_0xcf72ee,this[_0x33ef0a(0x1a5)]=_0x435bbe,this[_0x33ef0a(0x1e5)]=_0x4dbff0;}async[_0x2cea5e(0x1ec)](_0x3ddfc4){const _0xc9e8cc=_0x2cea5e;var _0x2de657,_0x162205;const {parentId:_0x37510d,unitId:_0x395f9a,text:_0x24567b,threadId:_0x5a6378}=_0x3ddfc4,_0x31c0a1=(_0x162205=(_0x2de657=_0x24567b[_0xc9e8cc(0x196)])==null?void 0x0:_0x2de657[_0xc9e8cc(0x1ae)](_0x49aea9=>_0x49aea9[_0xc9e8cc(0x1cd)]===_0x558556[_0xc9e8cc(0x1f7)])[_0xc9e8cc(0x1c4)](_0x474603=>_0x474603[_0xc9e8cc(0x1b7)]))!=null?_0x162205:[],_0x4cf620=JSON[_0xc9e8cc(0x1d0)](_0x24567b),_0x595c85=(await this[_0xc9e8cc(0x1a5)]['requireSession'](_0x395f9a))[_0xc9e8cc(0x1c6)]();if(_0x37510d){const _0x2cbbb5={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1,'threadId':_0x5a6378},_0x4d5d7c=(await this[_0xc9e8cc(0x1cf)][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+_0xc9e8cc(0x1c0),{'body':_0x2cbbb5}))[_0xc9e8cc(0x1e1)][_0xc9e8cc(0x1b5)];return{..._0x3ddfc4,'id':_0x4d5d7c['replyId'],'dT':_0x33b9d1(+_0x4d5d7c['createTimestamp'])[_0xc9e8cc(0x1d4)](_0xc9e8cc(0x1a8)),'personId':_0x4d5d7c[_0xc9e8cc(0x1e3)]};}else{const _0x5b6065={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1},_0x481c7d=await this['_httpService'][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+'/add',{'body':_0x5b6065});return X(_0x481c7d['body'][_0xc9e8cc(0x1ed)],_0x3ddfc4);}}async['updateComment'](_0x5cd5fb){const _0x11ca50=_0x2cea5e;var _0x54230e,_0x3386c8;const {text:_0x43861f,unitId:_0x4c90af}=_0x5cd5fb,_0x31eeed=(_0x3386c8=(_0x54230e=_0x43861f[_0x11ca50(0x196)])==null?void 0x0:_0x54230e[_0x11ca50(0x1ae)](_0x58fafb=>_0x58fafb['rangeType']===_0x558556[_0x11ca50(0x1f7)])[_0x11ca50(0x1c4)](_0x412805=>_0x412805[_0x11ca50(0x1b7)]))!=null?_0x3386c8:[],_0x5e2f60=JSON[_0x11ca50(0x1d0)](_0x43861f),_0x518780=_0x5cd5fb[_0x11ca50(0x1e7)],_0xc041b8=_0x5cd5fb['id'],_0x1d29b8={'memberId':(await this[_0x11ca50(0x1a5)][_0x11ca50(0x1de)](_0x4c90af))['getMemberID'](),'unitId':_0x4c90af,'threadId':_0x518780,'mention':_0x31eeed,'content':_0x5e2f60,'replyId':_0xc041b8},_0x4167e2=await this[_0x11ca50(0x1cf)][_0x11ca50(0x1e2)](_0x11ca50(0x1a3)+_0x4c90af+_0x11ca50(0x18e),{'body':_0x1d29b8});return!_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)]||_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)][_0x11ca50(0x1a0)]===0x1;}async[_0x2cea5e(0x1b3)](_0x198f94){const _0x271ec6=_0x2cea5e,{unitId:_0x3c3cc5}=_0x198f94,_0x17afa3=_0x198f94['threadId'],_0x2d6746={'memberId':this[_0x271ec6(0x1c5)][_0x271ec6(0x197)]()[_0x271ec6(0x1e4)],'unitId':_0x3c3cc5,'threadId':_0x17afa3,'solved':_0x198f94[_0x271ec6(0x1aa)]?I[_0x271ec6(0x1b2)]:I['OpenOrReOpen']},_0x4b418b=await this['_httpService'][_0x271ec6(0x1e2)](_0x271ec6(0x1a3)+_0x3c3cc5+_0x271ec6(0x19f),{'body':_0x2d6746});return!_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)]||_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)][_0x271ec6(0x1a0)]===0x1;}async['deleteComment'](_0x55bb91,_0x4cd47d,_0x37971e,_0x2ddc7c){const _0x1713e1=_0x2cea5e,_0x2bbb7e={'memberId':(await this['_sessionService'][_0x1713e1(0x1de)](_0x55bb91))[_0x1713e1(0x1c6)](),'threadId':_0x37971e,'replyId':_0x2ddc7c,'unitId':_0x55bb91},_0x273c38=await this[_0x1713e1(0x1cf)][_0x1713e1(0x1e2)](_0x1713e1(0x1a3)+_0x55bb91+_0x1713e1(0x1f0),{'body':_0x2bbb7e});return!_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)]||_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)][_0x1713e1(0x1a0)]===0x1;}async['listComments'](_0x4e625a,_0x2410f4,_0x1530f8){const _0x5377bd=_0x2cea5e,_0x396fbb={'unitId':_0x4e625a,'threadId':_0x1530f8},_0xee3915=await this[_0x5377bd(0x1cf)][_0x5377bd(0x1e2)](_0x5377bd(0x1a3)+_0x4e625a+_0x5377bd(0x1ea),{'body':_0x396fbb}),_0x45756f=_0x1530f8[_0x5377bd(0x1c4)](_0x1794bf=>ee(_0xee3915[_0x5377bd(0x1e1)]['comments'][_0x1794bf],_0x4e625a,_0x2410f4))[_0x5377bd(0x1ae)](Boolean);return Object[_0x5377bd(0x1eb)](_0xee3915[_0x5377bd(0x1e1)][_0x5377bd(0x1ba)])[_0x5377bd(0x1f3)](_0x4b4831=>{const _0x5bca80=_0x5377bd;this[_0x5bca80(0x1c5)][_0x5bca80(0x1ad)](_0x4b4831);}),_0x45756f;}['saveCommentToSnapshot'](_0x437aea){const _0xb3ea17=_0x2cea5e;return{'id':_0x437aea['id'],'threadId':_0x437aea[_0xb3ea17(0x1e7)],'ref':_0x437aea[_0xb3ea17(0x1e0)]};}};f=Q([_(0x0,_0x2c417f(_0x54e640)),_(0x1,_0x2c417f(_0x168610)),_(0x2,_0x2c417f(_0x3a25a6)),_(0x3,_0x2c417f(_0x448b63))],f);var re=Object[_0x2cea5e(0x1d2)],te=(_0x1ee604,_0x17c161,_0x94dbb3,_0x1531dc)=>{const _0x3462de=_0x2cea5e;for(var _0xbf3f97=_0x1531dc>0x1?void 0x0:_0x1531dc?re(_0x17c161,_0x94dbb3):_0x17c161,_0x4fa7b7=_0x1ee604[_0x3462de(0x1a1)]-0x1,_0x19a9a2;_0x4fa7b7>=0x0;_0x4fa7b7--)(_0x19a9a2=_0x1ee604[_0x4fa7b7])&&(_0xbf3f97=_0x19a9a2(_0xbf3f97)||_0xbf3f97);return _0xbf3f97;},N=(_0x30342c,_0x56c515)=>(_0x43ad1c,_0x11c0bc)=>_0x56c515(_0x43ad1c,_0x11c0bc,_0x30342c);let g=class extends _0x5387f5{constructor(_0x34ff8c,_0x3ed7f8){const _0x10ec0b=_0x2cea5e;super(),this[_0x10ec0b(0x19d)]=_0x34ff8c,this[_0x10ec0b(0x1d5)]=_0x3ed7f8,this['_initDataSource']();}[_0x2cea5e(0x1d1)](){const _0x2272d0=_0x2cea5e;this['_threadCommentDataSourceService']['dataSource']=this[_0x2272d0(0x1d5)],this['_threadCommentDataSourceService'][_0x2272d0(0x19e)]=!0x1;}};g=te([N(0x0,_0x17a4a8),N(0x1,_0x2c417f(f))],g);var se=Object[_0x2cea5e(0x1c2)],oe=Object[_0x2cea5e(0x1d2)],ne=(_0x5344ca,_0x1a4102,_0x23d97d)=>_0x1a4102 in _0x5344ca?se(_0x5344ca,_0x1a4102,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23d97d}):_0x5344ca[_0x1a4102]=_0x23d97d,ie=(_0x701a3f,_0x876bfb,_0x2bc513,_0x38c807)=>{for(var _0x40bc91=_0x38c807>0x1?void 0x0:_0x38c807?oe(_0x876bfb,_0x2bc513):_0x876bfb,_0x300eb3=_0x701a3f['length']-0x1,_0x1e4b68;_0x300eb3>=0x0;_0x300eb3--)(_0x1e4b68=_0x701a3f[_0x300eb3])&&(_0x40bc91=_0x1e4b68(_0x40bc91)||_0x40bc91);return _0x40bc91;},w=(_0x25b504,_0x4abc90)=>(_0x47e036,_0x29c728)=>_0x4abc90(_0x47e036,_0x29c728,_0x25b504),$=(_0x5cf1ec,_0x19628a,_0x45f263)=>ne(_0x5cf1ec,typeof _0x19628a!=_0x2cea5e(0x1da)?_0x19628a+'':_0x19628a,_0x45f263);let b=class extends _0x22233e{constructor(_0x31e03a=M,_0x318c6b,_0x29c422){const _0x5756f5=_0x2cea5e;super(),this[_0x5756f5(0x1b4)]=_0x31e03a,this[_0x5756f5(0x1e5)]=_0x318c6b,this[_0x5756f5(0x190)]=_0x29c422;const {..._0x194a16}=_0x2b4b40({},M,this[_0x5756f5(0x1b4)]);this[_0x5756f5(0x190)][_0x5756f5(0x1c9)](z,_0x194a16);}[_0x2cea5e(0x1bd)](){const _0x3e75c9=_0x2cea5e;[[f],[g],[S]][_0x3e75c9(0x1f3)](_0x2a6f49=>{const _0x54b4ae=_0x3e75c9;this[_0x54b4ae(0x1e5)][_0x54b4ae(0x1bf)](_0x2a6f49);});}[_0x2cea5e(0x1b0)](){const _0x50a311=_0x2cea5e;this[_0x50a311(0x1e5)][_0x50a311(0x1cb)](g),this['_injector']['get'](S);}};$(b,_0x2cea5e(0x1c1),W),$(b,_0x2cea5e(0x1f1),_0x30ce88[_0x2cea5e(0x1a9)]),b=ie([_0x2b5003(_0x3ccdc3,_0x18d329,_0x22f1b8),w(0x1,_0x2c417f(_0x448b63)),w(0x2,_0x17ea7f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x419f(){const _0x30bc73=['resolved','code','19704uLdKPw','/delete','userID','get','/universer-api/comment/unit/','saveCommentToSnapshot','getUser','requireSession','post','749AjOMpB','addUser','Unknown','281369TSzLxx','_threadCommentDataSource','solved','updateComment','ref','_init','87939rULiBR','unitId','rangeId','Solved','COMMENT','format','resolveComment','Delete','defineProperty','Edit','setConfig','createTimestamp','replies','OpenOrReOpen','map','onReady','470xWsXvm','/edit','_threadCommentDataSourceService','payload','_configService','_initDataSource','getMemberID','delete','_sessionService','filter','stringify','_config','syncUpdateMutationToColla','content','root','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','180dtNRcc','deleteComment','parse','find','rangeType','getCurrentUser','getOwnPropertyDescriptor','pipe','thread-comment-data-source.config','parentId','1867026ThHWxN','/solved','symbol','_injector','_userService','_httpService','customRanges','comment','getUnit','personId','commentUpdate$','forEach','_initUserSync','replyId','_commentService','933237lKPEDM','add','Reply','/universer-api/user/list','type','260dbMaXs','5225LQZAbh','length','onStarting','values','_threadCommentModel','threadId','user','Solve','dataSource','userId','size','UNRECOGNIZED','1372MsMMsw','4169GwPPtG','body'];_0x419f=function(){return _0x30bc73;};return _0x419f();}const _0x2dab71=_0x38c7;(function(_0x2587d5,_0xbaf0ec){const _0x346bcd=_0x38c7,_0x1ee716=_0x2587d5();while(!![]){try{const _0x47db9b=parseInt(_0x346bcd(0x151))/0x1*(-parseInt(_0x346bcd(0x143))/0x2)+-parseInt(_0x346bcd(0x13e))/0x3+parseInt(_0x346bcd(0x150))/0x4*(parseInt(_0x346bcd(0x144))/0x5)+parseInt(_0x346bcd(0x12f))/0x6+parseInt(_0x346bcd(0x15e))/0x7*(-parseInt(_0x346bcd(0x155))/0x8)+parseInt(_0x346bcd(0x167))/0x9*(parseInt(_0x346bcd(0x112))/0xa)+parseInt(_0x346bcd(0x161))/0xb*(parseInt(_0x346bcd(0x125))/0xc);if(_0x47db9b===_0xbaf0ec)break;else _0x1ee716['push'](_0x1ee716['shift']());}catch(_0x3b93fc){_0x1ee716['push'](_0x1ee716['shift']());}}}(_0x419f,0x60aa2));import{CommentService as _0x21192d,CollaborationSessionService as _0x1eaae2,UniverCollaborationClientPlugin as _0x56bd3f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x121e1a}from'@univerjs-pro/license';import{dayjs as _0x35c504,UserManagerService as _0x1b2ae9,Inject as _0x223669,Injector as _0x380632,Disposable as _0x541d21,CustomRangeType as _0x2f110e,UniverInstanceType as _0x48e5bc,DependentOn as _0x246354,IConfigService as _0x238b6a,Plugin as _0x3558e5,merge as _0x56cf94}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4fa7aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95a713,IThreadCommentDataSourceService as _0x465bec}from'@univerjs/thread-comment';import{bufferTime as _0x4ecd2a}from'rxjs';import{HTTPService as _0x17be68}from'@univerjs/network';const W=_0x2dab71(0x123);var I=(_0x3d75c3=>(_0x3d75c3[_0x3d75c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d75c3[_0x3d75c3['Solved']=0x1]=_0x2dab71(0x16a),_0x3d75c3[_0x3d75c3[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x3d75c3))(I||{}),v=(_0x2a742f=>(_0x2a742f[_0x2a742f[_0x2dab71(0x160)]=0x0]=_0x2dab71(0x160),_0x2a742f[_0x2a742f[_0x2dab71(0x122)]=0x1]=_0x2dab71(0x122),_0x2a742f[_0x2a742f[_0x2dab71(0x140)]=0x2]='Reply',_0x2a742f[_0x2a742f[_0x2dab71(0x170)]=0x3]=_0x2dab71(0x170),_0x2a742f[_0x2a742f[_0x2dab71(0x16e)]=0x4]=_0x2dab71(0x16e),_0x2a742f[_0x2a742f[_0x2dab71(0x14b)]=0x5]=_0x2dab71(0x14b),_0x2a742f[_0x2a742f[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x2a742f))(v||{});const D=_0x56c464=>_0x35c504(new Date(+_0x56c464))[_0x2dab71(0x16c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x61d5a7,_0x5e31af)=>{const _0x316404=_0x2dab71,_0x3b1799=_0x61d5a7['get'](_0x1b2ae9),_0x4e6421=_0x61d5a7[_0x316404(0x158)](_0x17be68);_0x5e31af[_0x316404(0x13a)](_0x4ba52e=>{const _0x121e62=_0x316404;_0x3b1799[_0x121e62(0x15b)](_0x4ba52e)&&_0x5e31af[_0x121e62(0x119)](_0x4ba52e);}),_0x5e31af[_0x316404(0x14e)]&&(await _0x4e6421['get'](_0x316404(0x141),{'params':{'userIDs':[..._0x5e31af]}}))['body']['users'][_0x316404(0x13a)](_0x534ac6=>{const _0x3d9c25=_0x316404;_0x534ac6&&_0x3b1799[_0x3d9c25(0x15f)](_0x534ac6);});};var K=Object[_0x2dab71(0x12b)],V=(_0x38f6bb,_0x3cbe2a,_0x1869c4,_0x2cacce)=>{const _0x4e3b11=_0x2dab71;for(var _0x3eaf=_0x2cacce>0x1?void 0x0:_0x2cacce?K(_0x3cbe2a,_0x1869c4):_0x3cbe2a,_0x28d4ca=_0x38f6bb[_0x4e3b11(0x145)]-0x1,_0x5d38ca;_0x28d4ca>=0x0;_0x28d4ca--)(_0x5d38ca=_0x38f6bb[_0x28d4ca])&&(_0x3eaf=_0x5d38ca(_0x3eaf)||_0x3eaf);return _0x3eaf;},p=(_0x254917,_0x421797)=>(_0x5550e9,_0x240796)=>_0x421797(_0x5550e9,_0x240796,_0x254917);let S=class extends _0x541d21{constructor(_0xd4ee91,_0x3058b0,_0xbe2a48,_0x542412){const _0x43c9df=_0x2dab71;super(),this[_0x43c9df(0x13d)]=_0xd4ee91,this[_0x43c9df(0x148)]=_0x3058b0,this['_userService']=_0xbe2a48,this[_0x43c9df(0x132)]=_0x542412,this[_0x43c9df(0x166)](),this[_0x43c9df(0x13b)]();}[_0x2dab71(0x13b)](){const _0x5f59f4=_0x2dab71;this[_0x5f59f4(0x124)](this[_0x5f59f4(0x148)]['commentUpdate$'][_0x5f59f4(0x12c)](_0x4ecd2a(0x10))['subscribe'](_0x332ce9=>{const _0x3221aa=_0x5f59f4,_0x225c83=new Set();_0x332ce9[_0x3221aa(0x13a)](_0x7cae1c=>{const _0x25d589=_0x3221aa;switch(_0x7cae1c['type']){case _0x25d589(0x13f):{const _0x4c4d9d=_0x7cae1c[_0x25d589(0x115)][_0x25d589(0x138)];_0x225c83[_0x25d589(0x13f)](_0x4c4d9d);break;}}}),B(this['_injector'],_0x225c83);}));}[_0x2dab71(0x166)](){const _0x5cdfac=_0x2dab71;this[_0x5cdfac(0x124)](this[_0x5cdfac(0x13d)][_0x5cdfac(0x139)]['subscribe'](async _0x65234=>{const _0x5e1a3e=_0x5cdfac;var _0x4c4453,_0x2d383c,_0x3b70cf,_0x495fa6;const _0x4442f8=(_0x4c4453=this['_threadCommentModel'][_0x5e1a3e(0x137)](_0x65234[_0x5e1a3e(0x168)])[_0x5e1a3e(0x128)](_0x5ad3b1=>_0x5ad3b1[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x4c4453[_0x5e1a3e(0x120)];if(!_0x4442f8)return;const {unitId:_0x521e3c,subUnitId:_0x36ca47}=_0x4442f8;switch(_0x65234[_0x5e1a3e(0x14a)]&&this[_0x5e1a3e(0x133)][_0x5e1a3e(0x15f)](_0x65234[_0x5e1a3e(0x14a)]),_0x65234[_0x5e1a3e(0x142)]){case v['Add']:break;case v[_0x5e1a3e(0x140)]:{this['_threadCommentModel']['addComment'](_0x521e3c,_0x36ca47,{'unitId':_0x521e3c,'subUnitId':_0x36ca47,'ref':'','id':_0x65234[_0x5e1a3e(0x13c)],'dT':D(+_0x65234[_0x5e1a3e(0x172)]),'threadId':_0x65234[_0x5e1a3e(0x149)],'personId':(_0x3b70cf=(_0x2d383c=_0x65234[_0x5e1a3e(0x14a)])==null?void 0x0:_0x2d383c['userID'])!=null?_0x3b70cf:_0x65234[_0x5e1a3e(0x14d)],'text':JSON[_0x5e1a3e(0x127)](_0x65234[_0x5e1a3e(0x11f)]),'parentId':_0x4442f8['id']});break;}case v[_0x5e1a3e(0x16e)]:{const _0x5eabec=this[_0x5e1a3e(0x148)]['getComment'](_0x521e3c,_0x36ca47,_0x65234[_0x5e1a3e(0x13c)]);_0x5eabec&&_0x5eabec[_0x5e1a3e(0x12e)]&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x126)](_0x521e3c,_0x36ca47,_0x65234['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x5e1a3e(0x164)](_0x521e3c,_0x36ca47,{'commentId':_0x65234[_0x5e1a3e(0x13c)],'text':JSON['parse'](_0x65234[_0x5e1a3e(0x11f)])});break;}case v['Solve']:{const _0x141931=(_0x495fa6=this[_0x5e1a3e(0x148)][_0x5e1a3e(0x137)](_0x65234['unitId'])[_0x5e1a3e(0x128)](_0x45e0f8=>_0x45e0f8[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x495fa6['root'];_0x141931&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x16d)](_0x521e3c,_0x36ca47,_0x141931['id'],_0x65234['solved']===I[_0x5e1a3e(0x16a)]);break;}}}));}};S=V([p(0x0,_0x223669(_0x21192d)),p(0x1,_0x223669(_0x95a713)),p(0x2,_0x223669(_0x1b2ae9)),p(0x3,_0x223669(_0x380632))],S);const z=_0x2dab71(0x12d),M={};function _0x38c7(_0x2203cb,_0x3b0a3b){const _0x419f16=_0x419f();return _0x38c7=function(_0x38c7dc,_0x570d9d){_0x38c7dc=_0x38c7dc-0x10e;let _0x4d7d87=_0x419f16[_0x38c7dc];return _0x4d7d87;},_0x38c7(_0x2203cb,_0x3b0a3b);}var k=Object[_0x2dab71(0x12b)],Q=(_0x493e1b,_0x4bd118,_0x1ded35,_0x4f7287)=>{const _0x219850=_0x2dab71;for(var _0x2121f7=_0x4f7287>0x1?void 0x0:_0x4f7287?k(_0x4bd118,_0x1ded35):_0x4bd118,_0x5e0c3b=_0x493e1b[_0x219850(0x145)]-0x1,_0x5a7dd3;_0x5e0c3b>=0x0;_0x5e0c3b--)(_0x5a7dd3=_0x493e1b[_0x5e0c3b])&&(_0x2121f7=_0x5a7dd3(_0x2121f7)||_0x2121f7);return _0x2121f7;},_=(_0x4476f4,_0x1a41f9)=>(_0x42f00a,_0x35d00c)=>_0x1a41f9(_0x42f00a,_0x35d00c,_0x4476f4);function X(_0x2eb556,_0x4d81c9){const _0x30fdac=_0x2dab71,_0x2d7da3=_0x2eb556['replies'][0x0];return{..._0x4d81c9,'id':_0x2d7da3[_0x30fdac(0x13c)],'resolved':_0x2eb556[_0x30fdac(0x163)]===0x1,'dT':D(_0x2d7da3['createTimestamp']),'personId':_0x2d7da3['userId'],'threadId':_0x2d7da3[_0x30fdac(0x149)]};}function ee(_0x55871e,_0x185f70,_0x213432){const _0x45dfdd=_0x2dab71;var _0x120486,_0x5df19b;if(((_0x5df19b=(_0x120486=_0x55871e==null?void 0x0:_0x55871e[_0x45dfdd(0x10e)])==null?void 0x0:_0x120486[_0x45dfdd(0x145)])!=null?_0x5df19b:0x0)>0x0){const _0x49655d=(_0x132acc,_0x638aa7)=>({'id':_0x132acc[_0x45dfdd(0x13c)],'threadId':_0x132acc[_0x45dfdd(0x149)],'dT':D(_0x132acc['createTimestamp']),'personId':_0x132acc[_0x45dfdd(0x14d)],'resolved':_0x55871e[_0x45dfdd(0x163)]===I[_0x45dfdd(0x16a)],'unitId':_0x185f70,'subUnitId':_0x213432,'text':JSON[_0x45dfdd(0x127)](_0x132acc[_0x45dfdd(0x11f)]),'parentId':_0x638aa7}),_0x6e06c8=_0x49655d(_0x55871e[_0x45dfdd(0x10e)][0x0]);return{..._0x6e06c8,'children':_0x55871e[_0x45dfdd(0x10e)]['slice'](0x1)['map'](_0x545793=>_0x49655d(_0x545793,_0x6e06c8['id']))};}return null;}let f=class{constructor(_0x5b71a4,_0x24f6c3,_0x3b4dd0,_0x22a26f){const _0x1dc3cf=_0x2dab71;this['_httpService']=_0x5b71a4,this[_0x1dc3cf(0x133)]=_0x24f6c3,this[_0x1dc3cf(0x11a)]=_0x3b4dd0,this[_0x1dc3cf(0x132)]=_0x22a26f;}async['addComment'](_0x5d72fe){const _0x575537=_0x2dab71;var _0x46e0ab,_0x32890d;const {parentId:_0x5e5630,unitId:_0x3f50ad,text:_0x42215a,threadId:_0x4876d9}=_0x5d72fe,_0x27919c=(_0x32890d=(_0x46e0ab=_0x42215a[_0x575537(0x135)])==null?void 0x0:_0x46e0ab['filter'](_0x11df90=>_0x11df90[_0x575537(0x129)]===_0x2f110e[_0x575537(0x16b)])['map'](_0x4f1f34=>_0x4f1f34[_0x575537(0x169)]))!=null?_0x32890d:[],_0x1d7626=JSON[_0x575537(0x11c)](_0x42215a),_0x93fcf9=(await this[_0x575537(0x11a)][_0x575537(0x15c)](_0x3f50ad))[_0x575537(0x118)]();if(_0x5e5630){const _0x55b205={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c,'threadId':_0x4876d9},_0x8a9d54=(await this['_httpService'][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/reply',{'body':_0x55b205}))['body']['reply'];return{..._0x5d72fe,'id':_0x8a9d54[_0x575537(0x13c)],'dT':_0x35c504(+_0x8a9d54[_0x575537(0x172)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x8a9d54[_0x575537(0x14d)]};}else{const _0x1480eb={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c},_0xf2b71e=await this[_0x575537(0x134)][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/add',{'body':_0x1480eb});return X(_0xf2b71e[_0x575537(0x152)][_0x575537(0x136)],_0x5d72fe);}}async[_0x2dab71(0x164)](_0x53c822){const _0x103caf=_0x2dab71;var _0x10d3b0,_0x220e2d;const {text:_0x5379a4,unitId:_0x1f9b82}=_0x53c822,_0x1e1cba=(_0x220e2d=(_0x10d3b0=_0x5379a4['customRanges'])==null?void 0x0:_0x10d3b0[_0x103caf(0x11b)](_0x5b9e8a=>_0x5b9e8a[_0x103caf(0x129)]===_0x2f110e['COMMENT'])[_0x103caf(0x110)](_0x4e93c0=>_0x4e93c0[_0x103caf(0x169)]))!=null?_0x220e2d:[],_0x28988f=JSON[_0x103caf(0x11c)](_0x5379a4),_0x137495=_0x53c822[_0x103caf(0x149)],_0x2ad3cf=_0x53c822['id'],_0x4fe263={'memberId':(await this['_sessionService'][_0x103caf(0x15c)](_0x1f9b82))[_0x103caf(0x118)](),'unitId':_0x1f9b82,'threadId':_0x137495,'mention':_0x1e1cba,'content':_0x28988f,'replyId':_0x2ad3cf},_0x4d8350=await this['_httpService'][_0x103caf(0x15d)](_0x103caf(0x159)+_0x1f9b82+_0x103caf(0x113),{'body':_0x4fe263});return!_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)]||_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)][_0x103caf(0x154)]===0x1;}async[_0x2dab71(0x16d)](_0x25e7f3){const _0x4ab678=_0x2dab71,{unitId:_0x4419ff}=_0x25e7f3,_0x534bae=_0x25e7f3['threadId'],_0x3697a9={'memberId':this[_0x4ab678(0x133)][_0x4ab678(0x12a)]()[_0x4ab678(0x157)],'unitId':_0x4419ff,'threadId':_0x534bae,'solved':_0x25e7f3[_0x4ab678(0x153)]?I[_0x4ab678(0x16a)]:I[_0x4ab678(0x10f)]},_0xdfc102=await this['_httpService'][_0x4ab678(0x15d)]('/universer-api/comment/unit/'+_0x4419ff+_0x4ab678(0x130),{'body':_0x3697a9});return!_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)]||_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)][_0x4ab678(0x154)]===0x1;}async[_0x2dab71(0x126)](_0x184195,_0xb3fd6d,_0x1fe053,_0x4020b4){const _0x481ec3=_0x2dab71,_0x5530bf={'memberId':(await this[_0x481ec3(0x11a)][_0x481ec3(0x15c)](_0x184195))['getMemberID'](),'threadId':_0x1fe053,'replyId':_0x4020b4,'unitId':_0x184195},_0xf0e1a6=await this['_httpService']['post'](_0x481ec3(0x159)+_0x184195+_0x481ec3(0x156),{'body':_0x5530bf});return!_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)]||_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)][_0x481ec3(0x154)]===0x1;}async['listComments'](_0x278f17,_0x3770a4,_0x3ed97f){const _0x54049d=_0x2dab71,_0x52fbff={'unitId':_0x278f17,'threadId':_0x3ed97f},_0x1bb0d6=await this[_0x54049d(0x134)][_0x54049d(0x15d)]('/universer-api/comment/unit/'+_0x278f17+'/list',{'body':_0x52fbff}),_0xe8543e=_0x3ed97f[_0x54049d(0x110)](_0x45e801=>ee(_0x1bb0d6[_0x54049d(0x152)]['comments'][_0x45e801],_0x278f17,_0x3770a4))[_0x54049d(0x11b)](Boolean);return Object[_0x54049d(0x147)](_0x1bb0d6[_0x54049d(0x152)]['users'])[_0x54049d(0x13a)](_0x23c9ae=>{const _0x4384ac=_0x54049d;this['_userService'][_0x4384ac(0x15f)](_0x23c9ae);}),_0xe8543e;}[_0x2dab71(0x15a)](_0x1f214d){const _0x538c9b=_0x2dab71;return{'id':_0x1f214d['id'],'threadId':_0x1f214d[_0x538c9b(0x149)],'ref':_0x1f214d[_0x538c9b(0x165)]};}};f=Q([_(0x0,_0x223669(_0x17be68)),_(0x1,_0x223669(_0x1b2ae9)),_(0x2,_0x223669(_0x1eaae2)),_(0x3,_0x223669(_0x380632))],f);var re=Object[_0x2dab71(0x12b)],te=(_0x52a40b,_0x2c4275,_0x2608ce,_0x470da9)=>{const _0x4e452c=_0x2dab71;for(var _0x44b3f3=_0x470da9>0x1?void 0x0:_0x470da9?re(_0x2c4275,_0x2608ce):_0x2c4275,_0x17e63a=_0x52a40b[_0x4e452c(0x145)]-0x1,_0x17b65a;_0x17e63a>=0x0;_0x17e63a--)(_0x17b65a=_0x52a40b[_0x17e63a])&&(_0x44b3f3=_0x17b65a(_0x44b3f3)||_0x44b3f3);return _0x44b3f3;},N=(_0x4d0e0f,_0x26668d)=>(_0x30a1a5,_0x4041da)=>_0x26668d(_0x30a1a5,_0x4041da,_0x4d0e0f);let g=class extends _0x541d21{constructor(_0x43825a,_0x55a0fe){const _0x1dd62c=_0x2dab71;super(),this[_0x1dd62c(0x114)]=_0x43825a,this['_threadCommentDataSource']=_0x55a0fe,this['_initDataSource']();}[_0x2dab71(0x117)](){const _0x5ce768=_0x2dab71;this[_0x5ce768(0x114)][_0x5ce768(0x14c)]=this[_0x5ce768(0x162)],this[_0x5ce768(0x114)][_0x5ce768(0x11e)]=!0x1;}};g=te([N(0x0,_0x465bec),N(0x1,_0x223669(f))],g);var se=Object[_0x2dab71(0x16f)],oe=Object[_0x2dab71(0x12b)],ne=(_0x4bb03f,_0x337468,_0xdf20a0)=>_0x337468 in _0x4bb03f?se(_0x4bb03f,_0x337468,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdf20a0}):_0x4bb03f[_0x337468]=_0xdf20a0,ie=(_0x50868b,_0x2ba92e,_0x28817e,_0x51c966)=>{const _0x22f298=_0x2dab71;for(var _0xfc2f95=_0x51c966>0x1?void 0x0:_0x51c966?oe(_0x2ba92e,_0x28817e):_0x2ba92e,_0x1889bc=_0x50868b[_0x22f298(0x145)]-0x1,_0x1dfb5e;_0x1889bc>=0x0;_0x1889bc--)(_0x1dfb5e=_0x50868b[_0x1889bc])&&(_0xfc2f95=_0x1dfb5e(_0xfc2f95)||_0xfc2f95);return _0xfc2f95;},w=(_0x258025,_0x98a9d5)=>(_0x3d6163,_0x2e1fee)=>_0x98a9d5(_0x3d6163,_0x2e1fee,_0x258025),$=(_0x4493c5,_0x3b5e04,_0x32f60c)=>ne(_0x4493c5,typeof _0x3b5e04!=_0x2dab71(0x131)?_0x3b5e04+'':_0x3b5e04,_0x32f60c);let b=class extends _0x3558e5{constructor(_0x1e064b=M,_0x332c25,_0x28184f){const _0x19ed23=_0x2dab71;super(),this['_config']=_0x1e064b,this[_0x19ed23(0x132)]=_0x332c25,this['_configService']=_0x28184f;const {..._0x28e2bc}=_0x56cf94({},M,this[_0x19ed23(0x11d)]);this[_0x19ed23(0x116)][_0x19ed23(0x171)](z,_0x28e2bc);}[_0x2dab71(0x146)](){const _0xe6fe4f=_0x2dab71;[[f],[g],[S]][_0xe6fe4f(0x13a)](_0x3ed366=>{const _0x64cde2=_0xe6fe4f;this[_0x64cde2(0x132)][_0x64cde2(0x13f)](_0x3ed366);});}[_0x2dab71(0x111)](){const _0x446906=_0x2dab71;this[_0x446906(0x132)][_0x446906(0x158)](g),this[_0x446906(0x132)]['get'](S);}};$(b,'pluginName',W),$(b,_0x2dab71(0x142),_0x48e5bc['UNIVER_UNKNOWN']),b=ie([_0x246354(_0x4fa7aa,_0x56bd3f,_0x121e1a),w(0x1,_0x223669(_0x380632)),w(0x2,_0x238b6a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2cea5e=_0x532a;(function(_0x377d08,_0x3d964d){const _0x3787e2=_0x532a,_0x312298=_0x377d08();while(!![]){try{const _0x3e50bb=-parseInt(_0x3787e2(0x1e6))/0x1*(-parseInt(_0x3787e2(0x192))/0x2)+parseInt(_0x3787e2(0x1d6))/0x3+parseInt(_0x3787e2(0x198))/0x4*(-parseInt(_0x3787e2(0x195))/0x5)+-parseInt(_0x3787e2(0x18d))/0x6+-parseInt(_0x3787e2(0x1f5))/0x7*(parseInt(_0x3787e2(0x19a))/0x8)+parseInt(_0x3787e2(0x1ab))/0x9*(parseInt(_0x3787e2(0x1b9))/0xa)+parseInt(_0x3787e2(0x1d3))/0xb;if(_0x3e50bb===_0x3d964d)break;else _0x312298['push'](_0x312298['shift']());}catch(_0x3071f5){_0x312298['push'](_0x312298['shift']());}}}(_0x47d2,0x89eb0));import{CommentService as _0x57d725,CollaborationSessionService as _0x3a25a6,UniverCollaborationClientPlugin as _0x18d329}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22f1b8}from'@univerjs-pro/license';import{dayjs as _0x33b9d1,UserManagerService as _0x168610,Inject as _0x2c417f,Injector as _0x448b63,Disposable as _0x5387f5,CustomRangeType as _0x558556,UniverInstanceType as _0x30ce88,DependentOn as _0x2b5003,IConfigService as _0x17ea7f,Plugin as _0x22233e,merge as _0x2b4b40}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ccdc3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa19232,IThreadCommentDataSourceService as _0x17a4a8}from'@univerjs/thread-comment';import{bufferTime as _0x534754}from'rxjs';import{HTTPService as _0x54e640}from'@univerjs/network';const W=_0x2cea5e(0x19c);var I=(_0x35670c=>(_0x35670c[_0x35670c[_0x2cea5e(0x1bc)]=0x0]=_0x2cea5e(0x1bc),_0x35670c[_0x35670c[_0x2cea5e(0x1b2)]=0x1]=_0x2cea5e(0x1b2),_0x35670c[_0x35670c[_0x2cea5e(0x19b)]=-0x1]=_0x2cea5e(0x19b),_0x35670c))(I||{}),v=(_0xb38806=>(_0xb38806[_0xb38806[_0x2cea5e(0x1e9)]=0x0]=_0x2cea5e(0x1e9),_0xb38806[_0xb38806[_0x2cea5e(0x1f6)]=0x1]=_0x2cea5e(0x1f6),_0xb38806[_0xb38806[_0x2cea5e(0x199)]=0x2]=_0x2cea5e(0x199),_0xb38806[_0xb38806[_0x2cea5e(0x1bb)]=0x3]=_0x2cea5e(0x1bb),_0xb38806[_0xb38806[_0x2cea5e(0x1f4)]=0x4]=_0x2cea5e(0x1f4),_0xb38806[_0xb38806[_0x2cea5e(0x1d8)]=0x5]=_0x2cea5e(0x1d8),_0xb38806[_0xb38806[_0x2cea5e(0x19b)]=-0x1]='UNRECOGNIZED',_0xb38806))(v||{});function _0x532a(_0x3cc71a,_0x2ed6b9){const _0x47d2b8=_0x47d2();return _0x532a=function(_0x532a1f,_0x5dac7e){_0x532a1f=_0x532a1f-0x18d;let _0x516c6b=_0x47d2b8[_0x532a1f];return _0x516c6b;},_0x532a(_0x3cc71a,_0x2ed6b9);}const D=_0x4a467a=>_0x33b9d1(new Date(+_0x4a467a))[_0x2cea5e(0x1d4)](_0x2cea5e(0x1a8)),B=async(_0x340f92,_0x17bbee)=>{const _0x405b9=_0x2cea5e,_0x124ab4=_0x340f92[_0x405b9(0x1cb)](_0x168610),_0x30f06b=_0x340f92[_0x405b9(0x1cb)](_0x54e640);_0x17bbee['forEach'](_0x148267=>{const _0x4231f1=_0x405b9;_0x124ab4[_0x4231f1(0x1ef)](_0x148267)&&_0x17bbee[_0x4231f1(0x194)](_0x148267);}),_0x17bbee[_0x405b9(0x1a4)]&&(await _0x30f06b[_0x405b9(0x1cb)](_0x405b9(0x1e8),{'params':{'userIDs':[..._0x17bbee]}}))[_0x405b9(0x1e1)][_0x405b9(0x1ba)]['forEach'](_0x3f5af5=>{const _0x1c7a3f=_0x405b9;_0x3f5af5&&_0x124ab4[_0x1c7a3f(0x1ad)](_0x3f5af5);});};var K=Object[_0x2cea5e(0x1d2)],V=(_0x423f39,_0x3b0632,_0x1fe8c0,_0x5a9966)=>{const _0x360b5f=_0x2cea5e;for(var _0x57419b=_0x5a9966>0x1?void 0x0:_0x5a9966?K(_0x3b0632,_0x1fe8c0):_0x3b0632,_0x357487=_0x423f39[_0x360b5f(0x1a1)]-0x1,_0x18870f;_0x357487>=0x0;_0x357487--)(_0x18870f=_0x423f39[_0x357487])&&(_0x57419b=_0x18870f(_0x57419b)||_0x57419b);return _0x57419b;},p=(_0x14fe14,_0x46496e)=>(_0x2e2393,_0x5aa0b4)=>_0x46496e(_0x2e2393,_0x5aa0b4,_0x14fe14);let S=class extends _0x5387f5{constructor(_0x2bf4ce,_0x3ba421,_0x25eca,_0xae0c3b){const _0xbddff6=_0x2cea5e;super(),this[_0xbddff6(0x1be)]=_0x2bf4ce,this['_threadCommentModel']=_0x3ba421,this[_0xbddff6(0x1c5)]=_0x25eca,this[_0xbddff6(0x1e5)]=_0xae0c3b,this['_init'](),this[_0xbddff6(0x1b6)]();}[_0x2cea5e(0x1b6)](){const _0x3882b6=_0x2cea5e;this[_0x3882b6(0x1dc)](this[_0x3882b6(0x1db)][_0x3882b6(0x1ce)][_0x3882b6(0x1ac)](_0x534754(0x10))[_0x3882b6(0x1c8)](_0x530149=>{const _0x8f8e59=_0x3882b6,_0x390024=new Set();_0x530149[_0x8f8e59(0x1f3)](_0x1200f6=>{const _0x31a18d=_0x8f8e59;switch(_0x1200f6[_0x31a18d(0x1f1)]){case _0x31a18d(0x1bf):{const _0x1f1eed=_0x1200f6[_0x31a18d(0x193)]['personId'];_0x390024[_0x31a18d(0x1bf)](_0x1f1eed);break;}}}),B(this['_injector'],_0x390024);}));}[_0x2cea5e(0x1ee)](){const _0x1d102b=_0x2cea5e;this[_0x1d102b(0x1dc)](this['_commentService']['commentUpdate$'][_0x1d102b(0x1c8)](async _0x2198c6=>{const _0x1a7907=_0x1d102b;var _0x536dcb,_0x21ad18,_0x2cc167,_0x57986d;const _0x38918f=(_0x536dcb=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x78147d=>_0x78147d[_0x1a7907(0x1e7)]===_0x2198c6['threadId']))==null?void 0x0:_0x536dcb['root'];if(!_0x38918f)return;const {unitId:_0x33756c,subUnitId:_0xb2b883}=_0x38918f;switch(_0x2198c6[_0x1a7907(0x1a6)]&&this[_0x1a7907(0x1c5)][_0x1a7907(0x1ad)](_0x2198c6[_0x1a7907(0x1a6)]),_0x2198c6['type']){case v['Add']:break;case v[_0x1a7907(0x199)]:{this[_0x1a7907(0x1db)][_0x1a7907(0x1ec)](_0x33756c,_0xb2b883,{'unitId':_0x33756c,'subUnitId':_0xb2b883,'ref':'','id':_0x2198c6[_0x1a7907(0x1a7)],'dT':D(+_0x2198c6[_0x1a7907(0x1cc)]),'threadId':_0x2198c6[_0x1a7907(0x1e7)],'personId':(_0x2cc167=(_0x21ad18=_0x2198c6[_0x1a7907(0x1a6)])==null?void 0x0:_0x21ad18[_0x1a7907(0x1e4)])!=null?_0x2cc167:_0x2198c6[_0x1a7907(0x1e3)],'text':JSON[_0x1a7907(0x1ca)](_0x2198c6[_0x1a7907(0x1d7)]),'parentId':_0x38918f['id']});break;}case v[_0x1a7907(0x1f4)]:{const _0x5b1713=this[_0x1a7907(0x1db)][_0x1a7907(0x1dd)](_0x33756c,_0xb2b883,_0x2198c6[_0x1a7907(0x1a7)]);_0x5b1713&&_0x5b1713[_0x1a7907(0x1a2)]&&this[_0x1a7907(0x1db)][_0x1a7907(0x1f2)](_0x33756c,_0xb2b883,_0x2198c6['replyId']);break;}case v['Edit']:{this[_0x1a7907(0x1db)][_0x1a7907(0x1b1)](_0x33756c,_0xb2b883,{'commentId':_0x2198c6[_0x1a7907(0x1a7)],'text':JSON['parse'](_0x2198c6[_0x1a7907(0x1d7)])});break;}case v[_0x1a7907(0x1d8)]:{const _0x4ae76b=(_0x57986d=this[_0x1a7907(0x1db)]['getUnit'](_0x2198c6[_0x1a7907(0x1c7)])[_0x1a7907(0x191)](_0x2cde6e=>_0x2cde6e[_0x1a7907(0x1e7)]===_0x2198c6[_0x1a7907(0x1e7)]))==null?void 0x0:_0x57986d[_0x1a7907(0x18f)];_0x4ae76b&&this[_0x1a7907(0x1db)]['resolveComment'](_0x33756c,_0xb2b883,_0x4ae76b['id'],_0x2198c6['solved']===I['Solved']);break;}}}));}};function _0x47d2(){const _0x3ff6bf=['2114406GywHze','Add','COMMENT','2303652rRnSAf','/edit','root','_configService','find','111390aGldSc','payload','delete','5LRFcHC','customRanges','getCurrentUser','2789604VExDlm','Reply','16RhUNYl','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','syncUpdateMutationToColla','/solved','code','length','parentId','/universer-api/comment/unit/','size','_sessionService','user','replyId','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','resolved','16821SKGOoo','pipe','addUser','filter','solved','onReady','updateComment','Solved','resolveComment','_config','reply','_initUserSync','rangeId','slice','3350pjTPzF','users','Edit','OpenOrReOpen','onStarting','_commentService','add','/reply','pluginName','defineProperty','thread-comment-data-source.config','map','_userService','getMemberID','unitId','subscribe','setConfig','parse','get','createTimestamp','rangeType','commentUpdate$','_httpService','stringify','_initDataSource','getOwnPropertyDescriptor','12072687JwxwHt','format','_threadCommentDataSource','744792oHVdlO','content','Solve','replies','symbol','_threadCommentModel','disposeWithMe','getComment','requireSession','error','ref','body','post','userId','userID','_injector','5CcsSRw','threadId','/universer-api/user/list','Unknown','/list','values','addComment','comment','_init','getUser','/delete','type','deleteComment','forEach','Delete'];_0x47d2=function(){return _0x3ff6bf;};return _0x47d2();}S=V([p(0x0,_0x2c417f(_0x57d725)),p(0x1,_0x2c417f(_0xa19232)),p(0x2,_0x2c417f(_0x168610)),p(0x3,_0x2c417f(_0x448b63))],S);const z=_0x2cea5e(0x1c3),M={};var k=Object[_0x2cea5e(0x1d2)],Q=(_0x5c196f,_0xa81692,_0x40095c,_0x51c278)=>{for(var _0x4cd605=_0x51c278>0x1?void 0x0:_0x51c278?k(_0xa81692,_0x40095c):_0xa81692,_0x544770=_0x5c196f['length']-0x1,_0x40ac6d;_0x544770>=0x0;_0x544770--)(_0x40ac6d=_0x5c196f[_0x544770])&&(_0x4cd605=_0x40ac6d(_0x4cd605)||_0x4cd605);return _0x4cd605;},_=(_0x24a18a,_0x5918ca)=>(_0x4c1c8f,_0x2d19cf)=>_0x5918ca(_0x4c1c8f,_0x2d19cf,_0x24a18a);function X(_0x5ba611,_0x3ab685){const _0x553694=_0x2cea5e,_0x570b60=_0x5ba611[_0x553694(0x1d9)][0x0];return{..._0x3ab685,'id':_0x570b60['replyId'],'resolved':_0x5ba611[_0x553694(0x1af)]===0x1,'dT':D(_0x570b60[_0x553694(0x1cc)]),'personId':_0x570b60[_0x553694(0x1e3)],'threadId':_0x570b60[_0x553694(0x1e7)]};}function ee(_0x3ef257,_0x13d276,_0x16c78a){const _0x33e968=_0x2cea5e;var _0x16cc35,_0x3cd3fc;if(((_0x3cd3fc=(_0x16cc35=_0x3ef257==null?void 0x0:_0x3ef257[_0x33e968(0x1d9)])==null?void 0x0:_0x16cc35['length'])!=null?_0x3cd3fc:0x0)>0x0){const _0x2a4aa3=(_0x56d2a7,_0x425e36)=>({'id':_0x56d2a7['replyId'],'threadId':_0x56d2a7[_0x33e968(0x1e7)],'dT':D(_0x56d2a7[_0x33e968(0x1cc)]),'personId':_0x56d2a7[_0x33e968(0x1e3)],'resolved':_0x3ef257[_0x33e968(0x1af)]===I[_0x33e968(0x1b2)],'unitId':_0x13d276,'subUnitId':_0x16c78a,'text':JSON['parse'](_0x56d2a7[_0x33e968(0x1d7)]),'parentId':_0x425e36}),_0x583304=_0x2a4aa3(_0x3ef257['replies'][0x0]);return{..._0x583304,'children':_0x3ef257[_0x33e968(0x1d9)][_0x33e968(0x1b8)](0x1)[_0x33e968(0x1c4)](_0x2950a6=>_0x2a4aa3(_0x2950a6,_0x583304['id']))};}return null;}let f=class{constructor(_0x30369b,_0xcf72ee,_0x435bbe,_0x4dbff0){const _0x33ef0a=_0x2cea5e;this[_0x33ef0a(0x1cf)]=_0x30369b,this[_0x33ef0a(0x1c5)]=_0xcf72ee,this[_0x33ef0a(0x1a5)]=_0x435bbe,this[_0x33ef0a(0x1e5)]=_0x4dbff0;}async[_0x2cea5e(0x1ec)](_0x3ddfc4){const _0xc9e8cc=_0x2cea5e;var _0x2de657,_0x162205;const {parentId:_0x37510d,unitId:_0x395f9a,text:_0x24567b,threadId:_0x5a6378}=_0x3ddfc4,_0x31c0a1=(_0x162205=(_0x2de657=_0x24567b[_0xc9e8cc(0x196)])==null?void 0x0:_0x2de657[_0xc9e8cc(0x1ae)](_0x49aea9=>_0x49aea9[_0xc9e8cc(0x1cd)]===_0x558556[_0xc9e8cc(0x1f7)])[_0xc9e8cc(0x1c4)](_0x474603=>_0x474603[_0xc9e8cc(0x1b7)]))!=null?_0x162205:[],_0x4cf620=JSON[_0xc9e8cc(0x1d0)](_0x24567b),_0x595c85=(await this[_0xc9e8cc(0x1a5)]['requireSession'](_0x395f9a))[_0xc9e8cc(0x1c6)]();if(_0x37510d){const _0x2cbbb5={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1,'threadId':_0x5a6378},_0x4d5d7c=(await this[_0xc9e8cc(0x1cf)][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+_0xc9e8cc(0x1c0),{'body':_0x2cbbb5}))[_0xc9e8cc(0x1e1)][_0xc9e8cc(0x1b5)];return{..._0x3ddfc4,'id':_0x4d5d7c['replyId'],'dT':_0x33b9d1(+_0x4d5d7c['createTimestamp'])[_0xc9e8cc(0x1d4)](_0xc9e8cc(0x1a8)),'personId':_0x4d5d7c[_0xc9e8cc(0x1e3)]};}else{const _0x5b6065={'memberId':_0x595c85,'unitId':_0x395f9a,'content':_0x4cf620,'mention':_0x31c0a1},_0x481c7d=await this['_httpService'][_0xc9e8cc(0x1e2)]('/universer-api/comment/unit/'+_0x395f9a+'/add',{'body':_0x5b6065});return X(_0x481c7d['body'][_0xc9e8cc(0x1ed)],_0x3ddfc4);}}async['updateComment'](_0x5cd5fb){const _0x11ca50=_0x2cea5e;var _0x54230e,_0x3386c8;const {text:_0x43861f,unitId:_0x4c90af}=_0x5cd5fb,_0x31eeed=(_0x3386c8=(_0x54230e=_0x43861f[_0x11ca50(0x196)])==null?void 0x0:_0x54230e[_0x11ca50(0x1ae)](_0x58fafb=>_0x58fafb['rangeType']===_0x558556[_0x11ca50(0x1f7)])[_0x11ca50(0x1c4)](_0x412805=>_0x412805[_0x11ca50(0x1b7)]))!=null?_0x3386c8:[],_0x5e2f60=JSON[_0x11ca50(0x1d0)](_0x43861f),_0x518780=_0x5cd5fb[_0x11ca50(0x1e7)],_0xc041b8=_0x5cd5fb['id'],_0x1d29b8={'memberId':(await this[_0x11ca50(0x1a5)][_0x11ca50(0x1de)](_0x4c90af))['getMemberID'](),'unitId':_0x4c90af,'threadId':_0x518780,'mention':_0x31eeed,'content':_0x5e2f60,'replyId':_0xc041b8},_0x4167e2=await this[_0x11ca50(0x1cf)][_0x11ca50(0x1e2)](_0x11ca50(0x1a3)+_0x4c90af+_0x11ca50(0x18e),{'body':_0x1d29b8});return!_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)]||_0x4167e2[_0x11ca50(0x1e1)][_0x11ca50(0x1df)][_0x11ca50(0x1a0)]===0x1;}async[_0x2cea5e(0x1b3)](_0x198f94){const _0x271ec6=_0x2cea5e,{unitId:_0x3c3cc5}=_0x198f94,_0x17afa3=_0x198f94['threadId'],_0x2d6746={'memberId':this[_0x271ec6(0x1c5)][_0x271ec6(0x197)]()[_0x271ec6(0x1e4)],'unitId':_0x3c3cc5,'threadId':_0x17afa3,'solved':_0x198f94[_0x271ec6(0x1aa)]?I[_0x271ec6(0x1b2)]:I['OpenOrReOpen']},_0x4b418b=await this['_httpService'][_0x271ec6(0x1e2)](_0x271ec6(0x1a3)+_0x3c3cc5+_0x271ec6(0x19f),{'body':_0x2d6746});return!_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)]||_0x4b418b[_0x271ec6(0x1e1)][_0x271ec6(0x1df)][_0x271ec6(0x1a0)]===0x1;}async['deleteComment'](_0x55bb91,_0x4cd47d,_0x37971e,_0x2ddc7c){const _0x1713e1=_0x2cea5e,_0x2bbb7e={'memberId':(await this['_sessionService'][_0x1713e1(0x1de)](_0x55bb91))[_0x1713e1(0x1c6)](),'threadId':_0x37971e,'replyId':_0x2ddc7c,'unitId':_0x55bb91},_0x273c38=await this[_0x1713e1(0x1cf)][_0x1713e1(0x1e2)](_0x1713e1(0x1a3)+_0x55bb91+_0x1713e1(0x1f0),{'body':_0x2bbb7e});return!_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)]||_0x273c38[_0x1713e1(0x1e1)][_0x1713e1(0x1df)][_0x1713e1(0x1a0)]===0x1;}async['listComments'](_0x4e625a,_0x2410f4,_0x1530f8){const _0x5377bd=_0x2cea5e,_0x396fbb={'unitId':_0x4e625a,'threadId':_0x1530f8},_0xee3915=await this[_0x5377bd(0x1cf)][_0x5377bd(0x1e2)](_0x5377bd(0x1a3)+_0x4e625a+_0x5377bd(0x1ea),{'body':_0x396fbb}),_0x45756f=_0x1530f8[_0x5377bd(0x1c4)](_0x1794bf=>ee(_0xee3915[_0x5377bd(0x1e1)]['comments'][_0x1794bf],_0x4e625a,_0x2410f4))[_0x5377bd(0x1ae)](Boolean);return Object[_0x5377bd(0x1eb)](_0xee3915[_0x5377bd(0x1e1)][_0x5377bd(0x1ba)])[_0x5377bd(0x1f3)](_0x4b4831=>{const _0x5bca80=_0x5377bd;this[_0x5bca80(0x1c5)][_0x5bca80(0x1ad)](_0x4b4831);}),_0x45756f;}['saveCommentToSnapshot'](_0x437aea){const _0xb3ea17=_0x2cea5e;return{'id':_0x437aea['id'],'threadId':_0x437aea[_0xb3ea17(0x1e7)],'ref':_0x437aea[_0xb3ea17(0x1e0)]};}};f=Q([_(0x0,_0x2c417f(_0x54e640)),_(0x1,_0x2c417f(_0x168610)),_(0x2,_0x2c417f(_0x3a25a6)),_(0x3,_0x2c417f(_0x448b63))],f);var re=Object[_0x2cea5e(0x1d2)],te=(_0x1ee604,_0x17c161,_0x94dbb3,_0x1531dc)=>{const _0x3462de=_0x2cea5e;for(var _0xbf3f97=_0x1531dc>0x1?void 0x0:_0x1531dc?re(_0x17c161,_0x94dbb3):_0x17c161,_0x4fa7b7=_0x1ee604[_0x3462de(0x1a1)]-0x1,_0x19a9a2;_0x4fa7b7>=0x0;_0x4fa7b7--)(_0x19a9a2=_0x1ee604[_0x4fa7b7])&&(_0xbf3f97=_0x19a9a2(_0xbf3f97)||_0xbf3f97);return _0xbf3f97;},N=(_0x30342c,_0x56c515)=>(_0x43ad1c,_0x11c0bc)=>_0x56c515(_0x43ad1c,_0x11c0bc,_0x30342c);let g=class extends _0x5387f5{constructor(_0x34ff8c,_0x3ed7f8){const _0x10ec0b=_0x2cea5e;super(),this[_0x10ec0b(0x19d)]=_0x34ff8c,this[_0x10ec0b(0x1d5)]=_0x3ed7f8,this['_initDataSource']();}[_0x2cea5e(0x1d1)](){const _0x2272d0=_0x2cea5e;this['_threadCommentDataSourceService']['dataSource']=this[_0x2272d0(0x1d5)],this['_threadCommentDataSourceService'][_0x2272d0(0x19e)]=!0x1;}};g=te([N(0x0,_0x17a4a8),N(0x1,_0x2c417f(f))],g);var se=Object[_0x2cea5e(0x1c2)],oe=Object[_0x2cea5e(0x1d2)],ne=(_0x5344ca,_0x1a4102,_0x23d97d)=>_0x1a4102 in _0x5344ca?se(_0x5344ca,_0x1a4102,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23d97d}):_0x5344ca[_0x1a4102]=_0x23d97d,ie=(_0x701a3f,_0x876bfb,_0x2bc513,_0x38c807)=>{for(var _0x40bc91=_0x38c807>0x1?void 0x0:_0x38c807?oe(_0x876bfb,_0x2bc513):_0x876bfb,_0x300eb3=_0x701a3f['length']-0x1,_0x1e4b68;_0x300eb3>=0x0;_0x300eb3--)(_0x1e4b68=_0x701a3f[_0x300eb3])&&(_0x40bc91=_0x1e4b68(_0x40bc91)||_0x40bc91);return _0x40bc91;},w=(_0x25b504,_0x4abc90)=>(_0x47e036,_0x29c728)=>_0x4abc90(_0x47e036,_0x29c728,_0x25b504),$=(_0x5cf1ec,_0x19628a,_0x45f263)=>ne(_0x5cf1ec,typeof _0x19628a!=_0x2cea5e(0x1da)?_0x19628a+'':_0x19628a,_0x45f263);let b=class extends _0x22233e{constructor(_0x31e03a=M,_0x318c6b,_0x29c422){const _0x5756f5=_0x2cea5e;super(),this[_0x5756f5(0x1b4)]=_0x31e03a,this[_0x5756f5(0x1e5)]=_0x318c6b,this[_0x5756f5(0x190)]=_0x29c422;const {..._0x194a16}=_0x2b4b40({},M,this[_0x5756f5(0x1b4)]);this[_0x5756f5(0x190)][_0x5756f5(0x1c9)](z,_0x194a16);}[_0x2cea5e(0x1bd)](){const _0x3e75c9=_0x2cea5e;[[f],[g],[S]][_0x3e75c9(0x1f3)](_0x2a6f49=>{const _0x54b4ae=_0x3e75c9;this[_0x54b4ae(0x1e5)][_0x54b4ae(0x1bf)](_0x2a6f49);});}[_0x2cea5e(0x1b0)](){const _0x50a311=_0x2cea5e;this[_0x50a311(0x1e5)][_0x50a311(0x1cb)](g),this['_injector']['get'](S);}};$(b,_0x2cea5e(0x1c1),W),$(b,_0x2cea5e(0x1f1),_0x30ce88[_0x2cea5e(0x1a9)]),b=ie([_0x2b5003(_0x3ccdc3,_0x18d329,_0x22f1b8),w(0x1,_0x2c417f(_0x448b63)),w(0x2,_0x17ea7f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x419f(){const _0x30bc73=['resolved','code','19704uLdKPw','/delete','userID','get','/universer-api/comment/unit/','saveCommentToSnapshot','getUser','requireSession','post','749AjOMpB','addUser','Unknown','281369TSzLxx','_threadCommentDataSource','solved','updateComment','ref','_init','87939rULiBR','unitId','rangeId','Solved','COMMENT','format','resolveComment','Delete','defineProperty','Edit','setConfig','createTimestamp','replies','OpenOrReOpen','map','onReady','470xWsXvm','/edit','_threadCommentDataSourceService','payload','_configService','_initDataSource','getMemberID','delete','_sessionService','filter','stringify','_config','syncUpdateMutationToColla','content','root','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','180dtNRcc','deleteComment','parse','find','rangeType','getCurrentUser','getOwnPropertyDescriptor','pipe','thread-comment-data-source.config','parentId','1867026ThHWxN','/solved','symbol','_injector','_userService','_httpService','customRanges','comment','getUnit','personId','commentUpdate$','forEach','_initUserSync','replyId','_commentService','933237lKPEDM','add','Reply','/universer-api/user/list','type','260dbMaXs','5225LQZAbh','length','onStarting','values','_threadCommentModel','threadId','user','Solve','dataSource','userId','size','UNRECOGNIZED','1372MsMMsw','4169GwPPtG','body'];_0x419f=function(){return _0x30bc73;};return _0x419f();}const _0x2dab71=_0x38c7;(function(_0x2587d5,_0xbaf0ec){const _0x346bcd=_0x38c7,_0x1ee716=_0x2587d5();while(!![]){try{const _0x47db9b=parseInt(_0x346bcd(0x151))/0x1*(-parseInt(_0x346bcd(0x143))/0x2)+-parseInt(_0x346bcd(0x13e))/0x3+parseInt(_0x346bcd(0x150))/0x4*(parseInt(_0x346bcd(0x144))/0x5)+parseInt(_0x346bcd(0x12f))/0x6+parseInt(_0x346bcd(0x15e))/0x7*(-parseInt(_0x346bcd(0x155))/0x8)+parseInt(_0x346bcd(0x167))/0x9*(parseInt(_0x346bcd(0x112))/0xa)+parseInt(_0x346bcd(0x161))/0xb*(parseInt(_0x346bcd(0x125))/0xc);if(_0x47db9b===_0xbaf0ec)break;else _0x1ee716['push'](_0x1ee716['shift']());}catch(_0x3b93fc){_0x1ee716['push'](_0x1ee716['shift']());}}}(_0x419f,0x60aa2));import{CommentService as _0x21192d,CollaborationSessionService as _0x1eaae2,UniverCollaborationClientPlugin as _0x56bd3f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x121e1a}from'@univerjs-pro/license';import{dayjs as _0x35c504,UserManagerService as _0x1b2ae9,Inject as _0x223669,Injector as _0x380632,Disposable as _0x541d21,CustomRangeType as _0x2f110e,UniverInstanceType as _0x48e5bc,DependentOn as _0x246354,IConfigService as _0x238b6a,Plugin as _0x3558e5,merge as _0x56cf94}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4fa7aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95a713,IThreadCommentDataSourceService as _0x465bec}from'@univerjs/thread-comment';import{bufferTime as _0x4ecd2a}from'rxjs';import{HTTPService as _0x17be68}from'@univerjs/network';const W=_0x2dab71(0x123);var I=(_0x3d75c3=>(_0x3d75c3[_0x3d75c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d75c3[_0x3d75c3['Solved']=0x1]=_0x2dab71(0x16a),_0x3d75c3[_0x3d75c3[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x3d75c3))(I||{}),v=(_0x2a742f=>(_0x2a742f[_0x2a742f[_0x2dab71(0x160)]=0x0]=_0x2dab71(0x160),_0x2a742f[_0x2a742f[_0x2dab71(0x122)]=0x1]=_0x2dab71(0x122),_0x2a742f[_0x2a742f[_0x2dab71(0x140)]=0x2]='Reply',_0x2a742f[_0x2a742f[_0x2dab71(0x170)]=0x3]=_0x2dab71(0x170),_0x2a742f[_0x2a742f[_0x2dab71(0x16e)]=0x4]=_0x2dab71(0x16e),_0x2a742f[_0x2a742f[_0x2dab71(0x14b)]=0x5]=_0x2dab71(0x14b),_0x2a742f[_0x2a742f[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x2a742f))(v||{});const D=_0x56c464=>_0x35c504(new Date(+_0x56c464))[_0x2dab71(0x16c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x61d5a7,_0x5e31af)=>{const _0x316404=_0x2dab71,_0x3b1799=_0x61d5a7['get'](_0x1b2ae9),_0x4e6421=_0x61d5a7[_0x316404(0x158)](_0x17be68);_0x5e31af[_0x316404(0x13a)](_0x4ba52e=>{const _0x121e62=_0x316404;_0x3b1799[_0x121e62(0x15b)](_0x4ba52e)&&_0x5e31af[_0x121e62(0x119)](_0x4ba52e);}),_0x5e31af[_0x316404(0x14e)]&&(await _0x4e6421['get'](_0x316404(0x141),{'params':{'userIDs':[..._0x5e31af]}}))['body']['users'][_0x316404(0x13a)](_0x534ac6=>{const _0x3d9c25=_0x316404;_0x534ac6&&_0x3b1799[_0x3d9c25(0x15f)](_0x534ac6);});};var K=Object[_0x2dab71(0x12b)],V=(_0x38f6bb,_0x3cbe2a,_0x1869c4,_0x2cacce)=>{const _0x4e3b11=_0x2dab71;for(var _0x3eaf=_0x2cacce>0x1?void 0x0:_0x2cacce?K(_0x3cbe2a,_0x1869c4):_0x3cbe2a,_0x28d4ca=_0x38f6bb[_0x4e3b11(0x145)]-0x1,_0x5d38ca;_0x28d4ca>=0x0;_0x28d4ca--)(_0x5d38ca=_0x38f6bb[_0x28d4ca])&&(_0x3eaf=_0x5d38ca(_0x3eaf)||_0x3eaf);return _0x3eaf;},p=(_0x254917,_0x421797)=>(_0x5550e9,_0x240796)=>_0x421797(_0x5550e9,_0x240796,_0x254917);let S=class extends _0x541d21{constructor(_0xd4ee91,_0x3058b0,_0xbe2a48,_0x542412){const _0x43c9df=_0x2dab71;super(),this[_0x43c9df(0x13d)]=_0xd4ee91,this[_0x43c9df(0x148)]=_0x3058b0,this['_userService']=_0xbe2a48,this[_0x43c9df(0x132)]=_0x542412,this[_0x43c9df(0x166)](),this[_0x43c9df(0x13b)]();}[_0x2dab71(0x13b)](){const _0x5f59f4=_0x2dab71;this[_0x5f59f4(0x124)](this[_0x5f59f4(0x148)]['commentUpdate$'][_0x5f59f4(0x12c)](_0x4ecd2a(0x10))['subscribe'](_0x332ce9=>{const _0x3221aa=_0x5f59f4,_0x225c83=new Set();_0x332ce9[_0x3221aa(0x13a)](_0x7cae1c=>{const _0x25d589=_0x3221aa;switch(_0x7cae1c['type']){case _0x25d589(0x13f):{const _0x4c4d9d=_0x7cae1c[_0x25d589(0x115)][_0x25d589(0x138)];_0x225c83[_0x25d589(0x13f)](_0x4c4d9d);break;}}}),B(this['_injector'],_0x225c83);}));}[_0x2dab71(0x166)](){const _0x5cdfac=_0x2dab71;this[_0x5cdfac(0x124)](this[_0x5cdfac(0x13d)][_0x5cdfac(0x139)]['subscribe'](async _0x65234=>{const _0x5e1a3e=_0x5cdfac;var _0x4c4453,_0x2d383c,_0x3b70cf,_0x495fa6;const _0x4442f8=(_0x4c4453=this['_threadCommentModel'][_0x5e1a3e(0x137)](_0x65234[_0x5e1a3e(0x168)])[_0x5e1a3e(0x128)](_0x5ad3b1=>_0x5ad3b1[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x4c4453[_0x5e1a3e(0x120)];if(!_0x4442f8)return;const {unitId:_0x521e3c,subUnitId:_0x36ca47}=_0x4442f8;switch(_0x65234[_0x5e1a3e(0x14a)]&&this[_0x5e1a3e(0x133)][_0x5e1a3e(0x15f)](_0x65234[_0x5e1a3e(0x14a)]),_0x65234[_0x5e1a3e(0x142)]){case v['Add']:break;case v[_0x5e1a3e(0x140)]:{this['_threadCommentModel']['addComment'](_0x521e3c,_0x36ca47,{'unitId':_0x521e3c,'subUnitId':_0x36ca47,'ref':'','id':_0x65234[_0x5e1a3e(0x13c)],'dT':D(+_0x65234[_0x5e1a3e(0x172)]),'threadId':_0x65234[_0x5e1a3e(0x149)],'personId':(_0x3b70cf=(_0x2d383c=_0x65234[_0x5e1a3e(0x14a)])==null?void 0x0:_0x2d383c['userID'])!=null?_0x3b70cf:_0x65234[_0x5e1a3e(0x14d)],'text':JSON[_0x5e1a3e(0x127)](_0x65234[_0x5e1a3e(0x11f)]),'parentId':_0x4442f8['id']});break;}case v[_0x5e1a3e(0x16e)]:{const _0x5eabec=this[_0x5e1a3e(0x148)]['getComment'](_0x521e3c,_0x36ca47,_0x65234[_0x5e1a3e(0x13c)]);_0x5eabec&&_0x5eabec[_0x5e1a3e(0x12e)]&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x126)](_0x521e3c,_0x36ca47,_0x65234['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x5e1a3e(0x164)](_0x521e3c,_0x36ca47,{'commentId':_0x65234[_0x5e1a3e(0x13c)],'text':JSON['parse'](_0x65234[_0x5e1a3e(0x11f)])});break;}case v['Solve']:{const _0x141931=(_0x495fa6=this[_0x5e1a3e(0x148)][_0x5e1a3e(0x137)](_0x65234['unitId'])[_0x5e1a3e(0x128)](_0x45e0f8=>_0x45e0f8[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x495fa6['root'];_0x141931&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x16d)](_0x521e3c,_0x36ca47,_0x141931['id'],_0x65234['solved']===I[_0x5e1a3e(0x16a)]);break;}}}));}};S=V([p(0x0,_0x223669(_0x21192d)),p(0x1,_0x223669(_0x95a713)),p(0x2,_0x223669(_0x1b2ae9)),p(0x3,_0x223669(_0x380632))],S);const z=_0x2dab71(0x12d),M={};function _0x38c7(_0x2203cb,_0x3b0a3b){const _0x419f16=_0x419f();return _0x38c7=function(_0x38c7dc,_0x570d9d){_0x38c7dc=_0x38c7dc-0x10e;let _0x4d7d87=_0x419f16[_0x38c7dc];return _0x4d7d87;},_0x38c7(_0x2203cb,_0x3b0a3b);}var k=Object[_0x2dab71(0x12b)],Q=(_0x493e1b,_0x4bd118,_0x1ded35,_0x4f7287)=>{const _0x219850=_0x2dab71;for(var _0x2121f7=_0x4f7287>0x1?void 0x0:_0x4f7287?k(_0x4bd118,_0x1ded35):_0x4bd118,_0x5e0c3b=_0x493e1b[_0x219850(0x145)]-0x1,_0x5a7dd3;_0x5e0c3b>=0x0;_0x5e0c3b--)(_0x5a7dd3=_0x493e1b[_0x5e0c3b])&&(_0x2121f7=_0x5a7dd3(_0x2121f7)||_0x2121f7);return _0x2121f7;},_=(_0x4476f4,_0x1a41f9)=>(_0x42f00a,_0x35d00c)=>_0x1a41f9(_0x42f00a,_0x35d00c,_0x4476f4);function X(_0x2eb556,_0x4d81c9){const _0x30fdac=_0x2dab71,_0x2d7da3=_0x2eb556['replies'][0x0];return{..._0x4d81c9,'id':_0x2d7da3[_0x30fdac(0x13c)],'resolved':_0x2eb556[_0x30fdac(0x163)]===0x1,'dT':D(_0x2d7da3['createTimestamp']),'personId':_0x2d7da3['userId'],'threadId':_0x2d7da3[_0x30fdac(0x149)]};}function ee(_0x55871e,_0x185f70,_0x213432){const _0x45dfdd=_0x2dab71;var _0x120486,_0x5df19b;if(((_0x5df19b=(_0x120486=_0x55871e==null?void 0x0:_0x55871e[_0x45dfdd(0x10e)])==null?void 0x0:_0x120486[_0x45dfdd(0x145)])!=null?_0x5df19b:0x0)>0x0){const _0x49655d=(_0x132acc,_0x638aa7)=>({'id':_0x132acc[_0x45dfdd(0x13c)],'threadId':_0x132acc[_0x45dfdd(0x149)],'dT':D(_0x132acc['createTimestamp']),'personId':_0x132acc[_0x45dfdd(0x14d)],'resolved':_0x55871e[_0x45dfdd(0x163)]===I[_0x45dfdd(0x16a)],'unitId':_0x185f70,'subUnitId':_0x213432,'text':JSON[_0x45dfdd(0x127)](_0x132acc[_0x45dfdd(0x11f)]),'parentId':_0x638aa7}),_0x6e06c8=_0x49655d(_0x55871e[_0x45dfdd(0x10e)][0x0]);return{..._0x6e06c8,'children':_0x55871e[_0x45dfdd(0x10e)]['slice'](0x1)['map'](_0x545793=>_0x49655d(_0x545793,_0x6e06c8['id']))};}return null;}let f=class{constructor(_0x5b71a4,_0x24f6c3,_0x3b4dd0,_0x22a26f){const _0x1dc3cf=_0x2dab71;this['_httpService']=_0x5b71a4,this[_0x1dc3cf(0x133)]=_0x24f6c3,this[_0x1dc3cf(0x11a)]=_0x3b4dd0,this[_0x1dc3cf(0x132)]=_0x22a26f;}async['addComment'](_0x5d72fe){const _0x575537=_0x2dab71;var _0x46e0ab,_0x32890d;const {parentId:_0x5e5630,unitId:_0x3f50ad,text:_0x42215a,threadId:_0x4876d9}=_0x5d72fe,_0x27919c=(_0x32890d=(_0x46e0ab=_0x42215a[_0x575537(0x135)])==null?void 0x0:_0x46e0ab['filter'](_0x11df90=>_0x11df90[_0x575537(0x129)]===_0x2f110e[_0x575537(0x16b)])['map'](_0x4f1f34=>_0x4f1f34[_0x575537(0x169)]))!=null?_0x32890d:[],_0x1d7626=JSON[_0x575537(0x11c)](_0x42215a),_0x93fcf9=(await this[_0x575537(0x11a)][_0x575537(0x15c)](_0x3f50ad))[_0x575537(0x118)]();if(_0x5e5630){const _0x55b205={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c,'threadId':_0x4876d9},_0x8a9d54=(await this['_httpService'][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/reply',{'body':_0x55b205}))['body']['reply'];return{..._0x5d72fe,'id':_0x8a9d54[_0x575537(0x13c)],'dT':_0x35c504(+_0x8a9d54[_0x575537(0x172)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x8a9d54[_0x575537(0x14d)]};}else{const _0x1480eb={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c},_0xf2b71e=await this[_0x575537(0x134)][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/add',{'body':_0x1480eb});return X(_0xf2b71e[_0x575537(0x152)][_0x575537(0x136)],_0x5d72fe);}}async[_0x2dab71(0x164)](_0x53c822){const _0x103caf=_0x2dab71;var _0x10d3b0,_0x220e2d;const {text:_0x5379a4,unitId:_0x1f9b82}=_0x53c822,_0x1e1cba=(_0x220e2d=(_0x10d3b0=_0x5379a4['customRanges'])==null?void 0x0:_0x10d3b0[_0x103caf(0x11b)](_0x5b9e8a=>_0x5b9e8a[_0x103caf(0x129)]===_0x2f110e['COMMENT'])[_0x103caf(0x110)](_0x4e93c0=>_0x4e93c0[_0x103caf(0x169)]))!=null?_0x220e2d:[],_0x28988f=JSON[_0x103caf(0x11c)](_0x5379a4),_0x137495=_0x53c822[_0x103caf(0x149)],_0x2ad3cf=_0x53c822['id'],_0x4fe263={'memberId':(await this['_sessionService'][_0x103caf(0x15c)](_0x1f9b82))[_0x103caf(0x118)](),'unitId':_0x1f9b82,'threadId':_0x137495,'mention':_0x1e1cba,'content':_0x28988f,'replyId':_0x2ad3cf},_0x4d8350=await this['_httpService'][_0x103caf(0x15d)](_0x103caf(0x159)+_0x1f9b82+_0x103caf(0x113),{'body':_0x4fe263});return!_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)]||_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)][_0x103caf(0x154)]===0x1;}async[_0x2dab71(0x16d)](_0x25e7f3){const _0x4ab678=_0x2dab71,{unitId:_0x4419ff}=_0x25e7f3,_0x534bae=_0x25e7f3['threadId'],_0x3697a9={'memberId':this[_0x4ab678(0x133)][_0x4ab678(0x12a)]()[_0x4ab678(0x157)],'unitId':_0x4419ff,'threadId':_0x534bae,'solved':_0x25e7f3[_0x4ab678(0x153)]?I[_0x4ab678(0x16a)]:I[_0x4ab678(0x10f)]},_0xdfc102=await this['_httpService'][_0x4ab678(0x15d)]('/universer-api/comment/unit/'+_0x4419ff+_0x4ab678(0x130),{'body':_0x3697a9});return!_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)]||_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)][_0x4ab678(0x154)]===0x1;}async[_0x2dab71(0x126)](_0x184195,_0xb3fd6d,_0x1fe053,_0x4020b4){const _0x481ec3=_0x2dab71,_0x5530bf={'memberId':(await this[_0x481ec3(0x11a)][_0x481ec3(0x15c)](_0x184195))['getMemberID'](),'threadId':_0x1fe053,'replyId':_0x4020b4,'unitId':_0x184195},_0xf0e1a6=await this['_httpService']['post'](_0x481ec3(0x159)+_0x184195+_0x481ec3(0x156),{'body':_0x5530bf});return!_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)]||_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)][_0x481ec3(0x154)]===0x1;}async['listComments'](_0x278f17,_0x3770a4,_0x3ed97f){const _0x54049d=_0x2dab71,_0x52fbff={'unitId':_0x278f17,'threadId':_0x3ed97f},_0x1bb0d6=await this[_0x54049d(0x134)][_0x54049d(0x15d)]('/universer-api/comment/unit/'+_0x278f17+'/list',{'body':_0x52fbff}),_0xe8543e=_0x3ed97f[_0x54049d(0x110)](_0x45e801=>ee(_0x1bb0d6[_0x54049d(0x152)]['comments'][_0x45e801],_0x278f17,_0x3770a4))[_0x54049d(0x11b)](Boolean);return Object[_0x54049d(0x147)](_0x1bb0d6[_0x54049d(0x152)]['users'])[_0x54049d(0x13a)](_0x23c9ae=>{const _0x4384ac=_0x54049d;this['_userService'][_0x4384ac(0x15f)](_0x23c9ae);}),_0xe8543e;}[_0x2dab71(0x15a)](_0x1f214d){const _0x538c9b=_0x2dab71;return{'id':_0x1f214d['id'],'threadId':_0x1f214d[_0x538c9b(0x149)],'ref':_0x1f214d[_0x538c9b(0x165)]};}};f=Q([_(0x0,_0x223669(_0x17be68)),_(0x1,_0x223669(_0x1b2ae9)),_(0x2,_0x223669(_0x1eaae2)),_(0x3,_0x223669(_0x380632))],f);var re=Object[_0x2dab71(0x12b)],te=(_0x52a40b,_0x2c4275,_0x2608ce,_0x470da9)=>{const _0x4e452c=_0x2dab71;for(var _0x44b3f3=_0x470da9>0x1?void 0x0:_0x470da9?re(_0x2c4275,_0x2608ce):_0x2c4275,_0x17e63a=_0x52a40b[_0x4e452c(0x145)]-0x1,_0x17b65a;_0x17e63a>=0x0;_0x17e63a--)(_0x17b65a=_0x52a40b[_0x17e63a])&&(_0x44b3f3=_0x17b65a(_0x44b3f3)||_0x44b3f3);return _0x44b3f3;},N=(_0x4d0e0f,_0x26668d)=>(_0x30a1a5,_0x4041da)=>_0x26668d(_0x30a1a5,_0x4041da,_0x4d0e0f);let g=class extends _0x541d21{constructor(_0x43825a,_0x55a0fe){const _0x1dd62c=_0x2dab71;super(),this[_0x1dd62c(0x114)]=_0x43825a,this['_threadCommentDataSource']=_0x55a0fe,this['_initDataSource']();}[_0x2dab71(0x117)](){const _0x5ce768=_0x2dab71;this[_0x5ce768(0x114)][_0x5ce768(0x14c)]=this[_0x5ce768(0x162)],this[_0x5ce768(0x114)][_0x5ce768(0x11e)]=!0x1;}};g=te([N(0x0,_0x465bec),N(0x1,_0x223669(f))],g);var se=Object[_0x2dab71(0x16f)],oe=Object[_0x2dab71(0x12b)],ne=(_0x4bb03f,_0x337468,_0xdf20a0)=>_0x337468 in _0x4bb03f?se(_0x4bb03f,_0x337468,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdf20a0}):_0x4bb03f[_0x337468]=_0xdf20a0,ie=(_0x50868b,_0x2ba92e,_0x28817e,_0x51c966)=>{const _0x22f298=_0x2dab71;for(var _0xfc2f95=_0x51c966>0x1?void 0x0:_0x51c966?oe(_0x2ba92e,_0x28817e):_0x2ba92e,_0x1889bc=_0x50868b[_0x22f298(0x145)]-0x1,_0x1dfb5e;_0x1889bc>=0x0;_0x1889bc--)(_0x1dfb5e=_0x50868b[_0x1889bc])&&(_0xfc2f95=_0x1dfb5e(_0xfc2f95)||_0xfc2f95);return _0xfc2f95;},w=(_0x258025,_0x98a9d5)=>(_0x3d6163,_0x2e1fee)=>_0x98a9d5(_0x3d6163,_0x2e1fee,_0x258025),$=(_0x4493c5,_0x3b5e04,_0x32f60c)=>ne(_0x4493c5,typeof _0x3b5e04!=_0x2dab71(0x131)?_0x3b5e04+'':_0x3b5e04,_0x32f60c);let b=class extends _0x3558e5{constructor(_0x1e064b=M,_0x332c25,_0x28184f){const _0x19ed23=_0x2dab71;super(),this['_config']=_0x1e064b,this[_0x19ed23(0x132)]=_0x332c25,this['_configService']=_0x28184f;const {..._0x28e2bc}=_0x56cf94({},M,this[_0x19ed23(0x11d)]);this[_0x19ed23(0x116)][_0x19ed23(0x171)](z,_0x28e2bc);}[_0x2dab71(0x146)](){const _0xe6fe4f=_0x2dab71;[[f],[g],[S]][_0xe6fe4f(0x13a)](_0x3ed366=>{const _0x64cde2=_0xe6fe4f;this[_0x64cde2(0x132)][_0x64cde2(0x13f)](_0x3ed366);});}[_0x2dab71(0x111)](){const _0x446906=_0x2dab71;this[_0x446906(0x132)][_0x446906(0x158)](g),this[_0x446906(0x132)]['get'](S);}};$(b,'pluginName',W),$(b,_0x2dab71(0x142),_0x48e5bc['UNIVER_UNKNOWN']),b=ie([_0x246354(_0x4fa7aa,_0x56bd3f,_0x121e1a),w(0x1,_0x223669(_0x380632)),w(0x2,_0x238b6a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1c56(_0xb60acd,_0x23a4d9){const _0x51f21c=_0x51f2();return _0x1c56=function(_0x1c56c6,_0x363ee4){_0x1c56c6=_0x1c56c6-0x1ed;let _0x32823f=_0x51f21c[_0x1c56c6];return _0x32823f;},_0x1c56(_0xb60acd,_0x23a4d9);}(function(_0x55f684,_0x250cc7){const _0x14c606=_0x1c56,_0x4bc584=_0x55f684();while(!![]){try{const _0x2995af=parseInt(_0x14c606(0x231))/0x1+parseInt(_0x14c606(0x25f))/0x2*(parseInt(_0x14c606(0x21a))/0x3)+-parseInt(_0x14c606(0x1f3))/0x4+-parseInt(_0x14c606(0x239))/0x5*(-parseInt(_0x14c606(0x21d))/0x6)+-parseInt(_0x14c606(0x271))/0x7*(-parseInt(_0x14c606(0x1f1))/0x8)+parseInt(_0x14c606(0x24a))/0x9+-parseInt(_0x14c606(0x223))/0xa;if(_0x2995af===_0x250cc7)break;else _0x4bc584['push'](_0x4bc584['shift']());}catch(_0x205c7c){_0x4bc584['push'](_0x4bc584['shift']());}}}(_0x51f2,0xda4c4),function(_0x5ebf6a,_0x13b6fa){const _0x477373=_0x1c56;typeof exports==_0x477373(0x254)&&typeof module<'u'?_0x13b6fa(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x477373(0x1ef)&&define[_0x477373(0x249)]?define([_0x477373(0x206),_0x477373(0x26e),_0x477373(0x267),_0x477373(0x23b),_0x477373(0x262),_0x477373(0x260),_0x477373(0x226),_0x477373(0x1f6)],_0x13b6fa):(_0x5ebf6a=typeof globalThis<'u'?globalThis:_0x5ebf6a||self,_0x13b6fa(_0x5ebf6a[_0x477373(0x203)]={},_0x5ebf6a[_0x477373(0x246)],_0x5ebf6a[_0x477373(0x22c)],_0x5ebf6a[_0x477373(0x228)],_0x5ebf6a[_0x477373(0x259)],_0x5ebf6a[_0x477373(0x261)],_0x5ebf6a['rxjs'],_0x5ebf6a[_0x477373(0x1ed)]));}(this,function(_0x58e40f,_0x253f33,_0x56fca4,_0x29a18a,_0x3d01da,_0x50c82a,_0xe78ad1,_0x23203e){'use strict';const _0x70546f=_0x1c56;const _0x1b26ec=_0x70546f(0x22a);var _0x29a17e=(_0x4079b7=>(_0x4079b7[_0x4079b7[_0x70546f(0x216)]=0x0]=_0x70546f(0x216),_0x4079b7[_0x4079b7['Solved']=0x1]='Solved',_0x4079b7[_0x4079b7[_0x70546f(0x25a)]=-0x1]=_0x70546f(0x25a),_0x4079b7))(_0x29a17e||{}),_0x2058ee=(_0x161a12=>(_0x161a12[_0x161a12[_0x70546f(0x20f)]=0x0]=_0x70546f(0x20f),_0x161a12[_0x161a12[_0x70546f(0x208)]=0x1]=_0x70546f(0x208),_0x161a12[_0x161a12[_0x70546f(0x202)]=0x2]=_0x70546f(0x202),_0x161a12[_0x161a12[_0x70546f(0x23d)]=0x3]='Edit',_0x161a12[_0x161a12[_0x70546f(0x235)]=0x4]='Delete',_0x161a12[_0x161a12['Solve']=0x5]='Solve',_0x161a12[_0x161a12['UNRECOGNIZED']=-0x1]=_0x70546f(0x25a),_0x161a12))(_0x2058ee||{});const _0x2f4206=_0x159d35=>_0x29a18a[_0x70546f(0x20d)](new Date(+_0x159d35))['format']('YYYY/MM/DD\x20HH:mm'),_0x21c623=async(_0x28606f,_0xb5a79)=>{const _0x2cb490=_0x70546f,_0x7ee328=_0x28606f[_0x2cb490(0x21f)](_0x29a18a[_0x2cb490(0x25d)]),_0x2b63af=_0x28606f[_0x2cb490(0x21f)](_0x23203e['HTTPService']);_0xb5a79[_0x2cb490(0x273)](_0x4861ba=>{const _0xf7d609=_0x2cb490;_0x7ee328['getUser'](_0x4861ba)&&_0xb5a79[_0xf7d609(0x1f7)](_0x4861ba);}),_0xb5a79['size']&&(await _0x2b63af[_0x2cb490(0x21f)](_0x2cb490(0x224),{'params':{'userIDs':[..._0xb5a79]}}))[_0x2cb490(0x240)][_0x2cb490(0x274)]['forEach'](_0xd1e45b=>{_0xd1e45b&&_0x7ee328['addUser'](_0xd1e45b);});};var _0x3d673f=Object[_0x70546f(0x1f2)],_0x34347b=(_0x3b7a47,_0x404c78,_0x568d9e,_0x8f0251)=>{const _0x57425d=_0x70546f;for(var _0x35e35b=_0x8f0251>0x1?void 0x0:_0x8f0251?_0x3d673f(_0x404c78,_0x568d9e):_0x404c78,_0x44544a=_0x3b7a47[_0x57425d(0x25c)]-0x1,_0x123586;_0x44544a>=0x0;_0x44544a--)(_0x123586=_0x3b7a47[_0x44544a])&&(_0x35e35b=_0x123586(_0x35e35b)||_0x35e35b);return _0x35e35b;},_0x3bb791=(_0x92f1b5,_0x47457f)=>(_0x256526,_0x56ee19)=>_0x47457f(_0x256526,_0x56ee19,_0x92f1b5);let _0x5d4f28=class extends _0x29a18a[_0x70546f(0x247)]{constructor(_0x4811e7,_0x486e46,_0x1b5ed3,_0x141da8){const _0x2ea97c=_0x70546f;super(),this['_commentService']=_0x4811e7,this[_0x2ea97c(0x229)]=_0x486e46,this[_0x2ea97c(0x230)]=_0x1b5ed3,this[_0x2ea97c(0x265)]=_0x141da8,this[_0x2ea97c(0x269)](),this[_0x2ea97c(0x22d)]();}[_0x70546f(0x22d)](){const _0x3e9cec=_0x70546f;this['disposeWithMe'](this['_threadCommentModel'][_0x3e9cec(0x220)]['pipe'](_0xe78ad1[_0x3e9cec(0x209)](0x10))[_0x3e9cec(0x241)](_0x57e2c2=>{const _0x1686a1=_0x3e9cec,_0x3e024a=new Set();_0x57e2c2[_0x1686a1(0x273)](_0x5c3cda=>{const _0x43cd9d=_0x1686a1;switch(_0x5c3cda[_0x43cd9d(0x25b)]){case'add':{const _0x5a6b31=_0x5c3cda[_0x43cd9d(0x243)][_0x43cd9d(0x244)];_0x3e024a['add'](_0x5a6b31);break;}}}),_0x21c623(this[_0x1686a1(0x265)],_0x3e024a);}));}[_0x70546f(0x269)](){const _0x529fb6=_0x70546f;this[_0x529fb6(0x23a)](this[_0x529fb6(0x201)][_0x529fb6(0x220)][_0x529fb6(0x241)](async _0x3bba64=>{const _0x218770=_0x529fb6;var _0x14bdd9,_0x44fa89,_0x218037,_0x32a718;const _0x1efb30=(_0x14bdd9=this[_0x218770(0x229)][_0x218770(0x217)](_0x3bba64[_0x218770(0x210)])[_0x218770(0x250)](_0x1e7b3b=>_0x1e7b3b[_0x218770(0x24e)]===_0x3bba64[_0x218770(0x24e)]))==null?void 0x0:_0x14bdd9[_0x218770(0x225)];if(!_0x1efb30)return;const {unitId:_0x1a02b8,subUnitId:_0x2c70c3}=_0x1efb30;switch(_0x3bba64['user']&&this[_0x218770(0x230)]['addUser'](_0x3bba64[_0x218770(0x1fc)]),_0x3bba64[_0x218770(0x25b)]){case _0x2058ee[_0x218770(0x208)]:break;case _0x2058ee['Reply']:{this[_0x218770(0x229)][_0x218770(0x242)](_0x1a02b8,_0x2c70c3,{'unitId':_0x1a02b8,'subUnitId':_0x2c70c3,'ref':'','id':_0x3bba64[_0x218770(0x253)],'dT':_0x2f4206(+_0x3bba64[_0x218770(0x251)]),'threadId':_0x3bba64[_0x218770(0x24e)],'personId':(_0x218037=(_0x44fa89=_0x3bba64[_0x218770(0x1fc)])==null?void 0x0:_0x44fa89[_0x218770(0x1fa)])!=null?_0x218037:_0x3bba64['userId'],'text':JSON['parse'](_0x3bba64[_0x218770(0x22e)]),'parentId':_0x1efb30['id']});break;}case _0x2058ee[_0x218770(0x235)]:{const _0x2a8cd8=this[_0x218770(0x229)][_0x218770(0x24c)](_0x1a02b8,_0x2c70c3,_0x3bba64[_0x218770(0x253)]);_0x2a8cd8&&_0x2a8cd8[_0x218770(0x255)]&&this[_0x218770(0x229)][_0x218770(0x214)](_0x1a02b8,_0x2c70c3,_0x3bba64[_0x218770(0x253)]);break;}case _0x2058ee[_0x218770(0x23d)]:{this[_0x218770(0x229)][_0x218770(0x268)](_0x1a02b8,_0x2c70c3,{'commentId':_0x3bba64['replyId'],'text':JSON[_0x218770(0x237)](_0x3bba64[_0x218770(0x22e)])});break;}case _0x2058ee[_0x218770(0x215)]:{const _0x12983c=(_0x32a718=this['_threadCommentModel'][_0x218770(0x217)](_0x3bba64[_0x218770(0x210)])[_0x218770(0x250)](_0x48ac84=>_0x48ac84[_0x218770(0x24e)]===_0x3bba64[_0x218770(0x24e)]))==null?void 0x0:_0x32a718[_0x218770(0x225)];_0x12983c&&this[_0x218770(0x229)][_0x218770(0x20c)](_0x1a02b8,_0x2c70c3,_0x12983c['id'],_0x3bba64['solved']===_0x29a17e['Solved']);break;}}}));}};_0x5d4f28=_0x34347b([_0x3bb791(0x0,_0x29a18a['Inject'](_0x253f33['CommentService'])),_0x3bb791(0x1,_0x29a18a['Inject'](_0x50c82a[_0x70546f(0x205)])),_0x3bb791(0x2,_0x29a18a[_0x70546f(0x26f)](_0x29a18a['UserManagerService'])),_0x3bb791(0x3,_0x29a18a[_0x70546f(0x26f)](_0x29a18a[_0x70546f(0x211)]))],_0x5d4f28);const _0x359845=_0x70546f(0x222),_0x1f309e={};var _0xd35d24=Object['getOwnPropertyDescriptor'],_0xbb23d9=(_0x550acb,_0x14dbda,_0x25a178,_0x310b6a)=>{const _0x450385=_0x70546f;for(var _0x1d10b4=_0x310b6a>0x1?void 0x0:_0x310b6a?_0xd35d24(_0x14dbda,_0x25a178):_0x14dbda,_0xe18f58=_0x550acb[_0x450385(0x25c)]-0x1,_0x3d935d;_0xe18f58>=0x0;_0xe18f58--)(_0x3d935d=_0x550acb[_0xe18f58])&&(_0x1d10b4=_0x3d935d(_0x1d10b4)||_0x1d10b4);return _0x1d10b4;},_0x3d80cf=(_0x1b1266,_0x497f0b)=>(_0x48b392,_0xb56b89)=>_0x497f0b(_0x48b392,_0xb56b89,_0x1b1266);function _0x614462(_0x3f97e7,_0x47c308){const _0x590615=_0x70546f,_0x4d85dd=_0x3f97e7[_0x590615(0x207)][0x0];return{..._0x47c308,'id':_0x4d85dd[_0x590615(0x253)],'resolved':_0x3f97e7['solved']===0x1,'dT':_0x2f4206(_0x4d85dd[_0x590615(0x251)]),'personId':_0x4d85dd[_0x590615(0x24d)],'threadId':_0x4d85dd['threadId']};}function _0x3eddeb(_0x574a28,_0x80919a,_0x483e50){const _0x62f3c3=_0x70546f;var _0x10a4c8,_0x2b6c1e;if(((_0x2b6c1e=(_0x10a4c8=_0x574a28==null?void 0x0:_0x574a28['replies'])==null?void 0x0:_0x10a4c8[_0x62f3c3(0x25c)])!=null?_0x2b6c1e:0x0)>0x0){const _0x351a2a=(_0x27d738,_0x45a97b)=>({'id':_0x27d738['replyId'],'threadId':_0x27d738[_0x62f3c3(0x24e)],'dT':_0x2f4206(_0x27d738[_0x62f3c3(0x251)]),'personId':_0x27d738[_0x62f3c3(0x24d)],'resolved':_0x574a28['solved']===_0x29a17e[_0x62f3c3(0x221)],'unitId':_0x80919a,'subUnitId':_0x483e50,'text':JSON[_0x62f3c3(0x237)](_0x27d738[_0x62f3c3(0x22e)]),'parentId':_0x45a97b}),_0xaad4f7=_0x351a2a(_0x574a28[_0x62f3c3(0x207)][0x0]);return{..._0xaad4f7,'children':_0x574a28['replies']['slice'](0x1)[_0x62f3c3(0x257)](_0x1edda6=>_0x351a2a(_0x1edda6,_0xaad4f7['id']))};}return null;}let _0x4b0013=class{constructor(_0x2fe8e6,_0x4de0bb,_0x511d0b,_0x2622b9){const _0x4e55b4=_0x70546f;this[_0x4e55b4(0x232)]=_0x2fe8e6,this[_0x4e55b4(0x230)]=_0x4de0bb,this[_0x4e55b4(0x227)]=_0x511d0b,this[_0x4e55b4(0x265)]=_0x2622b9;}async[_0x70546f(0x242)](_0xebacac){const _0x10d300=_0x70546f;var _0x1559c0,_0x58f110;const {parentId:_0x360ee1,unitId:_0x34d002,text:_0x1b7a1d,threadId:_0x26849c}=_0xebacac,_0x58df20=(_0x58f110=(_0x1559c0=_0x1b7a1d[_0x10d300(0x258)])==null?void 0x0:_0x1559c0[_0x10d300(0x25e)](_0x15e057=>_0x15e057[_0x10d300(0x26a)]===_0x29a18a[_0x10d300(0x204)][_0x10d300(0x1f9)])[_0x10d300(0x257)](_0x58c9b8=>_0x58c9b8[_0x10d300(0x23e)]))!=null?_0x58f110:[],_0x33d4cf=JSON['stringify'](_0x1b7a1d),_0x22cde7=(await this[_0x10d300(0x227)][_0x10d300(0x212)](_0x34d002))['getMemberID']();if(_0x360ee1){const _0x4bde4d={'memberId':_0x22cde7,'unitId':_0x34d002,'content':_0x33d4cf,'mention':_0x58df20,'threadId':_0x26849c},_0x141f90=(await this[_0x10d300(0x232)][_0x10d300(0x234)](_0x10d300(0x1ff)+_0x34d002+_0x10d300(0x1fe),{'body':_0x4bde4d}))[_0x10d300(0x240)][_0x10d300(0x270)];return{..._0xebacac,'id':_0x141f90[_0x10d300(0x253)],'dT':_0x29a18a['dayjs'](+_0x141f90[_0x10d300(0x251)])[_0x10d300(0x1f4)](_0x10d300(0x213)),'personId':_0x141f90['userId']};}else{const _0x4b98f8={'memberId':_0x22cde7,'unitId':_0x34d002,'content':_0x33d4cf,'mention':_0x58df20},_0xacb72f=await this['_httpService'][_0x10d300(0x234)]('/universer-api/comment/unit/'+_0x34d002+_0x10d300(0x23c),{'body':_0x4b98f8});return _0x614462(_0xacb72f[_0x10d300(0x240)][_0x10d300(0x26b)],_0xebacac);}}async[_0x70546f(0x268)](_0x145f98){const _0x22d588=_0x70546f;var _0x1187f4,_0x5e6ce3;const {text:_0x2beca9,unitId:_0x562e2b}=_0x145f98,_0x5ba785=(_0x5e6ce3=(_0x1187f4=_0x2beca9['customRanges'])==null?void 0x0:_0x1187f4[_0x22d588(0x25e)](_0x3685ce=>_0x3685ce['rangeType']===_0x29a18a[_0x22d588(0x204)][_0x22d588(0x1f9)])['map'](_0x199416=>_0x199416[_0x22d588(0x23e)]))!=null?_0x5e6ce3:[],_0x97ef63=JSON[_0x22d588(0x26d)](_0x2beca9),_0x4c447d=_0x145f98[_0x22d588(0x24e)],_0x276fa7=_0x145f98['id'],_0x157f4b={'memberId':(await this['_sessionService'][_0x22d588(0x212)](_0x562e2b))[_0x22d588(0x21b)](),'unitId':_0x562e2b,'threadId':_0x4c447d,'mention':_0x5ba785,'content':_0x97ef63,'replyId':_0x276fa7},_0x471483=await this[_0x22d588(0x232)][_0x22d588(0x234)](_0x22d588(0x1ff)+_0x562e2b+_0x22d588(0x248),{'body':_0x157f4b});return!_0x471483[_0x22d588(0x240)][_0x22d588(0x233)]||_0x471483[_0x22d588(0x240)][_0x22d588(0x233)][_0x22d588(0x245)]===0x1;}async['resolveComment'](_0x37337b){const _0x2efe7f=_0x70546f,{unitId:_0x16f0b9}=_0x37337b,_0x43357c=_0x37337b[_0x2efe7f(0x24e)],_0x3b132e={'memberId':this['_userService'][_0x2efe7f(0x263)]()[_0x2efe7f(0x1fa)],'unitId':_0x16f0b9,'threadId':_0x43357c,'solved':_0x37337b[_0x2efe7f(0x23f)]?_0x29a17e[_0x2efe7f(0x221)]:_0x29a17e[_0x2efe7f(0x216)]},_0x2c132d=await this['_httpService']['post'](_0x2efe7f(0x1ff)+_0x16f0b9+_0x2efe7f(0x236),{'body':_0x3b132e});return!_0x2c132d[_0x2efe7f(0x240)][_0x2efe7f(0x233)]||_0x2c132d[_0x2efe7f(0x240)][_0x2efe7f(0x233)][_0x2efe7f(0x245)]===0x1;}async['deleteComment'](_0x3fd4cc,_0x65fe21,_0x6790f5,_0x2f9ca0){const _0x5c6722=_0x70546f,_0x56e6d8={'memberId':(await this['_sessionService'][_0x5c6722(0x212)](_0x3fd4cc))['getMemberID'](),'threadId':_0x6790f5,'replyId':_0x2f9ca0,'unitId':_0x3fd4cc},_0x505a39=await this[_0x5c6722(0x232)][_0x5c6722(0x234)]('/universer-api/comment/unit/'+_0x3fd4cc+'/delete',{'body':_0x56e6d8});return!_0x505a39[_0x5c6722(0x240)]['error']||_0x505a39['body']['error'][_0x5c6722(0x245)]===0x1;}async[_0x70546f(0x24b)](_0x3d690e,_0x396c81,_0x25b196){const _0x36b28b=_0x70546f,_0x132a6f={'unitId':_0x3d690e,'threadId':_0x25b196},_0x4f74a4=await this[_0x36b28b(0x232)][_0x36b28b(0x234)](_0x36b28b(0x1ff)+_0x3d690e+_0x36b28b(0x1ee),{'body':_0x132a6f}),_0x102f8d=_0x25b196[_0x36b28b(0x257)](_0x3ae696=>_0x3eddeb(_0x4f74a4[_0x36b28b(0x240)]['comments'][_0x3ae696],_0x3d690e,_0x396c81))[_0x36b28b(0x25e)](Boolean);return Object['values'](_0x4f74a4[_0x36b28b(0x240)][_0x36b28b(0x274)])['forEach'](_0x293e50=>{const _0x3837e9=_0x36b28b;this[_0x3837e9(0x230)][_0x3837e9(0x21e)](_0x293e50);}),_0x102f8d;}[_0x70546f(0x24f)](_0x396432){return{'id':_0x396432['id'],'threadId':_0x396432['threadId'],'ref':_0x396432['ref']};}};_0x4b0013=_0xbb23d9([_0x3d80cf(0x0,_0x29a18a['Inject'](_0x23203e['HTTPService'])),_0x3d80cf(0x1,_0x29a18a['Inject'](_0x29a18a[_0x70546f(0x25d)])),_0x3d80cf(0x2,_0x29a18a[_0x70546f(0x26f)](_0x253f33['CollaborationSessionService'])),_0x3d80cf(0x3,_0x29a18a['Inject'](_0x29a18a[_0x70546f(0x211)]))],_0x4b0013);var _0x5da8c2=Object['getOwnPropertyDescriptor'],_0x5e56c0=(_0x2639ac,_0x1287ac,_0x378c2b,_0x17dbe1)=>{const _0x3edb6b=_0x70546f;for(var _0x5cf8b9=_0x17dbe1>0x1?void 0x0:_0x17dbe1?_0x5da8c2(_0x1287ac,_0x378c2b):_0x1287ac,_0xbb7e80=_0x2639ac[_0x3edb6b(0x25c)]-0x1,_0x17ef2b;_0xbb7e80>=0x0;_0xbb7e80--)(_0x17ef2b=_0x2639ac[_0xbb7e80])&&(_0x5cf8b9=_0x17ef2b(_0x5cf8b9)||_0x5cf8b9);return _0x5cf8b9;},_0x380511=(_0x3bef27,_0x5bbade)=>(_0x1306b1,_0x2df345)=>_0x5bbade(_0x1306b1,_0x2df345,_0x3bef27);let _0x13fe19=class extends _0x29a18a[_0x70546f(0x247)]{constructor(_0x3ce0b1,_0x34b8ff){const _0x499ec2=_0x70546f;super(),this['_threadCommentDataSourceService']=_0x3ce0b1,this[_0x499ec2(0x256)]=_0x34b8ff,this['_initDataSource']();}['_initDataSource'](){const _0xc879b1=_0x70546f;this[_0xc879b1(0x252)][_0xc879b1(0x219)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x13fe19=_0x5e56c0([_0x380511(0x0,_0x50c82a['IThreadCommentDataSourceService']),_0x380511(0x1,_0x29a18a['Inject'](_0x4b0013))],_0x13fe19);var _0x589cbd=Object[_0x70546f(0x22b)],_0x1c89a2=Object[_0x70546f(0x1f2)],_0x1c0045=(_0x450bd1,_0xbaded4,_0x44a5f3)=>_0xbaded4 in _0x450bd1?_0x589cbd(_0x450bd1,_0xbaded4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44a5f3}):_0x450bd1[_0xbaded4]=_0x44a5f3,_0x3e7915=(_0x3dc8ae,_0x1963ba,_0x33bc16,_0x4646ce)=>{const _0x440ad8=_0x70546f;for(var _0x14b353=_0x4646ce>0x1?void 0x0:_0x4646ce?_0x1c89a2(_0x1963ba,_0x33bc16):_0x1963ba,_0x3ce576=_0x3dc8ae[_0x440ad8(0x25c)]-0x1,_0x5f3d4a;_0x3ce576>=0x0;_0x3ce576--)(_0x5f3d4a=_0x3dc8ae[_0x3ce576])&&(_0x14b353=_0x5f3d4a(_0x14b353)||_0x14b353);return _0x14b353;},_0x251860=(_0x4edc21,_0x4c2cad)=>(_0x2b58e3,_0x5d92d4)=>_0x4c2cad(_0x2b58e3,_0x5d92d4,_0x4edc21),_0x1eef0e=(_0x2991aa,_0x287f2a,_0x1ccf12)=>_0x1c0045(_0x2991aa,typeof _0x287f2a!=_0x70546f(0x21c)?_0x287f2a+'':_0x287f2a,_0x1ccf12);_0x58e40f[_0x70546f(0x272)]=class extends _0x29a18a[_0x70546f(0x200)]{constructor(_0x44e2ea=_0x1f309e,_0x75c264,_0x4df176){const _0x1a6ba6=_0x70546f;super(),this['_config']=_0x44e2ea,this[_0x1a6ba6(0x265)]=_0x75c264,this[_0x1a6ba6(0x1fd)]=_0x4df176;const {..._0x27b0d2}=_0x29a18a[_0x1a6ba6(0x218)]({},_0x1f309e,this[_0x1a6ba6(0x1f5)]);this['_configService']['setConfig'](_0x359845,_0x27b0d2);}[_0x70546f(0x264)](){[[_0x4b0013],[_0x13fe19],[_0x5d4f28]]['forEach'](_0x3e4767=>{const _0x25fafc=_0x1c56;this['_injector'][_0x25fafc(0x1f8)](_0x3e4767);});}[_0x70546f(0x26c)](){const _0x58801e=_0x70546f;this[_0x58801e(0x265)][_0x58801e(0x21f)](_0x13fe19),this[_0x58801e(0x265)][_0x58801e(0x21f)](_0x5d4f28);}},_0x1eef0e(_0x58e40f[_0x70546f(0x272)],_0x70546f(0x20b),_0x1b26ec),_0x1eef0e(_0x58e40f[_0x70546f(0x272)],'type',_0x29a18a['UniverInstanceType'][_0x70546f(0x1fb)]),_0x58e40f[_0x70546f(0x272)]=_0x3e7915([_0x29a18a[_0x70546f(0x20a)](_0x3d01da[_0x70546f(0x20e)],_0x253f33[_0x70546f(0x238)],_0x56fca4[_0x70546f(0x22f)]),_0x251860(0x1,_0x29a18a[_0x70546f(0x26f)](_0x29a18a['Injector'])),_0x251860(0x2,_0x29a18a[_0x70546f(0x266)])],_0x58e40f[_0x70546f(0x272)]),Object['defineProperty'](_0x58e40f,Symbol['toStringTag'],{'value':_0x70546f(0x1f0)});}));function _0x51f2(){const _0x472b21=['onReady','stringify','@univerjs-pro/collaboration-client','Inject','reply','7QkyFjL','UniverThreadCommentDataSourcePlugin','forEach','users','UniverNetwork','/list','function','Module','460936exMECp','getOwnPropertyDescriptor','1326736GcCDvR','format','_config','@univerjs/network','delete','add','COMMENT','userID','UNIVER_UNKNOWN','user','_configService','/reply','/universer-api/comment/unit/','Plugin','_commentService','Reply','UniverProThreadCommentDatasource','CustomRangeType','ThreadCommentModel','exports','replies','Add','bufferTime','DependentOn','pluginName','resolveComment','dayjs','UniverThreadCommentUIPlugin','Unknown','unitId','Injector','requireSession','YYYY/MM/DD\x20HH:mm','deleteComment','Solve','OpenOrReOpen','getUnit','merge','dataSource','6zVzcWj','getMemberID','symbol','7338SmgYXD','addUser','get','commentUpdate$','Solved','thread-comment-data-source.config','20593140NcgutU','/universer-api/user/list','root','rxjs','_sessionService','UniverCore','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','UniverProLicense','_initUserSync','content','UniverLicensePlugin','_userService','503052icLdTM','_httpService','error','post','Delete','/solved','parse','UniverCollaborationClientPlugin','1310QkKyrE','disposeWithMe','@univerjs/core','/add','Edit','rangeId','resolved','body','subscribe','addComment','payload','personId','code','UniverProCollaborationClient','Disposable','/edit','amd','8925021aphSWV','listComments','getComment','userId','threadId','saveCommentToSnapshot','find','createTimestamp','_threadCommentDataSourceService','replyId','object','parentId','_threadCommentDataSource','map','customRanges','UniverThreadCommentUi','UNRECOGNIZED','type','length','UserManagerService','filter','1412382yFdNat','@univerjs/thread-comment','UniverThreadComment','@univerjs/thread-comment-ui','getCurrentUser','onStarting','_injector','IConfigService','@univerjs-pro/license','updateComment','_init','rangeType','comment'];_0x51f2=function(){return _0x472b21;};return _0x51f2();}
1
+ (function(_0x3e5126,_0x26d3cb){const _0x53768c=_0x2a9b,_0x290b0f=_0x3e5126();while(!![]){try{const _0x25b4bd=parseInt(_0x53768c(0xb7))/0x1+-parseInt(_0x53768c(0xec))/0x2*(-parseInt(_0x53768c(0xb2))/0x3)+parseInt(_0x53768c(0x98))/0x4*(-parseInt(_0x53768c(0xb4))/0x5)+parseInt(_0x53768c(0x115))/0x6*(parseInt(_0x53768c(0xee))/0x7)+parseInt(_0x53768c(0xea))/0x8*(-parseInt(_0x53768c(0xbd))/0x9)+-parseInt(_0x53768c(0xe2))/0xa*(-parseInt(_0x53768c(0xa2))/0xb)+-parseInt(_0x53768c(0x10a))/0xc;if(_0x25b4bd===_0x26d3cb)break;else _0x290b0f['push'](_0x290b0f['shift']());}catch(_0x100d9b){_0x290b0f['push'](_0x290b0f['shift']());}}}(_0x1e90,0x5427e),function(_0x96fabc,_0x16eb9c){const _0x46fcd8=_0x2a9b;typeof exports==_0x46fcd8(0xa7)&&typeof module<'u'?_0x16eb9c(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=='function'&&define[_0x46fcd8(0x102)]?define([_0x46fcd8(0xa9),'@univerjs-pro/collaboration-client',_0x46fcd8(0xad),_0x46fcd8(0xe5),_0x46fcd8(0x9c),'@univerjs/thread-comment',_0x46fcd8(0xdc),'@univerjs/network'],_0x16eb9c):(_0x96fabc=typeof globalThis<'u'?globalThis:_0x96fabc||self,_0x16eb9c(_0x96fabc[_0x46fcd8(0xfc)]={},_0x96fabc[_0x46fcd8(0xab)],_0x96fabc[_0x46fcd8(0xc9)],_0x96fabc['UniverCore'],_0x96fabc['UniverThreadCommentUi'],_0x96fabc['UniverThreadComment'],_0x96fabc[_0x46fcd8(0xdc)],_0x96fabc[_0x46fcd8(0xc8)]));}(this,function(_0x545edf,_0x56cc7c,_0x336a84,_0x3064f5,_0x5cf2d3,_0x5efcbf,_0x40e41f,_0x60811d){'use strict';const _0x1ce235=_0x2a9b;const _0x62f104=_0x1ce235(0x9a);var _0x1860ff=(_0x2b39b5=>(_0x2b39b5[_0x2b39b5[_0x1ce235(0xed)]=0x0]='OpenOrReOpen',_0x2b39b5[_0x2b39b5[_0x1ce235(0xd4)]=0x1]=_0x1ce235(0xd4),_0x2b39b5[_0x2b39b5[_0x1ce235(0xce)]=-0x1]='UNRECOGNIZED',_0x2b39b5))(_0x1860ff||{}),_0xe356de=(_0xbd5b40=>(_0xbd5b40[_0xbd5b40[_0x1ce235(0xe3)]=0x0]='Unknown',_0xbd5b40[_0xbd5b40[_0x1ce235(0xd2)]=0x1]=_0x1ce235(0xd2),_0xbd5b40[_0xbd5b40[_0x1ce235(0xf9)]=0x2]=_0x1ce235(0xf9),_0xbd5b40[_0xbd5b40[_0x1ce235(0xb5)]=0x3]=_0x1ce235(0xb5),_0xbd5b40[_0xbd5b40[_0x1ce235(0xac)]=0x4]=_0x1ce235(0xac),_0xbd5b40[_0xbd5b40[_0x1ce235(0xf0)]=0x5]=_0x1ce235(0xf0),_0xbd5b40[_0xbd5b40[_0x1ce235(0xce)]=-0x1]='UNRECOGNIZED',_0xbd5b40))(_0xe356de||{});const _0xd800f7=_0x28dfe4=>_0x3064f5['dayjs'](new Date(+_0x28dfe4))[_0x1ce235(0xa8)](_0x1ce235(0xc6)),_0x309088=async(_0x310daf,_0x186707)=>{const _0x2811d2=_0x1ce235,_0x16f15e=_0x310daf[_0x2811d2(0xc2)](_0x3064f5[_0x2811d2(0xc7)]),_0xa61ac6=_0x310daf[_0x2811d2(0xc2)](_0x60811d['HTTPService']);_0x186707[_0x2811d2(0xaf)](_0xd3287d=>{const _0x2075b5=_0x2811d2;_0x16f15e['getUser'](_0xd3287d)&&_0x186707[_0x2075b5(0xef)](_0xd3287d);}),_0x186707[_0x2811d2(0xe7)]&&(await _0xa61ac6[_0x2811d2(0xc2)](_0x2811d2(0x9e),{'params':{'userIDs':[..._0x186707]}}))[_0x2811d2(0x103)][_0x2811d2(0xeb)][_0x2811d2(0xaf)](_0x65adc9=>{const _0x33af6a=_0x2811d2;_0x65adc9&&_0x16f15e[_0x33af6a(0x104)](_0x65adc9);});};var _0x2ad1a6=Object['getOwnPropertyDescriptor'],_0x13696c=(_0x48ff8d,_0x44510f,_0x57871a,_0x44db76)=>{for(var _0x350e9e=_0x44db76>0x1?void 0x0:_0x44db76?_0x2ad1a6(_0x44510f,_0x57871a):_0x44510f,_0x5a9b9e=_0x48ff8d['length']-0x1,_0x59ff19;_0x5a9b9e>=0x0;_0x5a9b9e--)(_0x59ff19=_0x48ff8d[_0x5a9b9e])&&(_0x350e9e=_0x59ff19(_0x350e9e)||_0x350e9e);return _0x350e9e;},_0x56da1b=(_0x1a5184,_0x581ec9)=>(_0x183e9d,_0x189e88)=>_0x581ec9(_0x183e9d,_0x189e88,_0x1a5184);let _0x52b79c=class extends _0x3064f5[_0x1ce235(0xb8)]{constructor(_0x42bdac,_0x5ea751,_0xdb3c92,_0x2a17f2){const _0x5bd2a3=_0x1ce235;super(),this['_commentService']=_0x42bdac,this[_0x5bd2a3(0xd0)]=_0x5ea751,this[_0x5bd2a3(0xe8)]=_0xdb3c92,this[_0x5bd2a3(0xe9)]=_0x2a17f2,this[_0x5bd2a3(0xb9)](),this[_0x5bd2a3(0xe4)]();}[_0x1ce235(0xe4)](){const _0x1bd5a5=_0x1ce235;this['disposeWithMe'](this['_threadCommentModel'][_0x1bd5a5(0xf5)][_0x1bd5a5(0xfe)](_0x40e41f['bufferTime'](0x10))[_0x1bd5a5(0xe6)](_0x33a52f=>{const _0x5b38e3=_0x1bd5a5,_0x432995=new Set();_0x33a52f[_0x5b38e3(0xaf)](_0x4b7661=>{const _0x458366=_0x5b38e3;switch(_0x4b7661[_0x458366(0xae)]){case _0x458366(0xf1):{const _0x15a077=_0x4b7661[_0x458366(0xa1)][_0x458366(0x114)];_0x432995[_0x458366(0xf1)](_0x15a077);break;}}}),_0x309088(this['_injector'],_0x432995);}));}[_0x1ce235(0xb9)](){const _0x1f4518=_0x1ce235;this['disposeWithMe'](this[_0x1f4518(0xcc)][_0x1f4518(0xf5)][_0x1f4518(0xe6)](async _0x4ae032=>{const _0x18f63d=_0x1f4518;var _0x1668ad,_0x42b25b,_0x4567be,_0xef84ac;const _0x1f7919=(_0x1668ad=this[_0x18f63d(0xd0)][_0x18f63d(0x108)](_0x4ae032[_0x18f63d(0x10d)])['find'](_0x5d22b9=>_0x5d22b9[_0x18f63d(0x10c)]===_0x4ae032[_0x18f63d(0x10c)]))==null?void 0x0:_0x1668ad[_0x18f63d(0x105)];if(!_0x1f7919)return;const {unitId:_0x53c38b,subUnitId:_0x411c31}=_0x1f7919;switch(_0x4ae032['user']&&this[_0x18f63d(0xe8)][_0x18f63d(0x104)](_0x4ae032[_0x18f63d(0xbb)]),_0x4ae032[_0x18f63d(0xae)]){case _0xe356de[_0x18f63d(0xd2)]:break;case _0xe356de[_0x18f63d(0xf9)]:{this[_0x18f63d(0xd0)][_0x18f63d(0x113)](_0x53c38b,_0x411c31,{'unitId':_0x53c38b,'subUnitId':_0x411c31,'ref':'','id':_0x4ae032[_0x18f63d(0xcd)],'dT':_0xd800f7(+_0x4ae032[_0x18f63d(0x107)]),'threadId':_0x4ae032['threadId'],'personId':(_0x4567be=(_0x42b25b=_0x4ae032['user'])==null?void 0x0:_0x42b25b[_0x18f63d(0x119)])!=null?_0x4567be:_0x4ae032[_0x18f63d(0xfd)],'text':JSON[_0x18f63d(0x110)](_0x4ae032[_0x18f63d(0xb1)]),'parentId':_0x1f7919['id']});break;}case _0xe356de[_0x18f63d(0xac)]:{const _0x2a2e27=this[_0x18f63d(0xd0)][_0x18f63d(0xa3)](_0x53c38b,_0x411c31,_0x4ae032[_0x18f63d(0xcd)]);_0x2a2e27&&_0x2a2e27[_0x18f63d(0xb0)]&&this[_0x18f63d(0xd0)][_0x18f63d(0xda)](_0x53c38b,_0x411c31,_0x4ae032[_0x18f63d(0xcd)]);break;}case _0xe356de[_0x18f63d(0xb5)]:{this[_0x18f63d(0xd0)][_0x18f63d(0xc0)](_0x53c38b,_0x411c31,{'commentId':_0x4ae032[_0x18f63d(0xcd)],'text':JSON['parse'](_0x4ae032[_0x18f63d(0xb1)])});break;}case _0xe356de[_0x18f63d(0xf0)]:{const _0x1ec080=(_0xef84ac=this[_0x18f63d(0xd0)]['getUnit'](_0x4ae032[_0x18f63d(0x10d)])[_0x18f63d(0xfb)](_0x4f508=>_0x4f508[_0x18f63d(0x10c)]===_0x4ae032[_0x18f63d(0x10c)]))==null?void 0x0:_0xef84ac[_0x18f63d(0x105)];_0x1ec080&&this['_threadCommentModel']['resolveComment'](_0x53c38b,_0x411c31,_0x1ec080['id'],_0x4ae032['solved']===_0x1860ff[_0x18f63d(0xd4)]);break;}}}));}};_0x52b79c=_0x13696c([_0x56da1b(0x0,_0x3064f5[_0x1ce235(0x106)](_0x56cc7c[_0x1ce235(0xf4)])),_0x56da1b(0x1,_0x3064f5[_0x1ce235(0x106)](_0x5efcbf['ThreadCommentModel'])),_0x56da1b(0x2,_0x3064f5[_0x1ce235(0x106)](_0x3064f5['UserManagerService'])),_0x56da1b(0x3,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0x101)]))],_0x52b79c);const _0x3061b0='thread-comment-data-source.config',_0x3fda5b={};var _0x14b761=Object['getOwnPropertyDescriptor'],_0x39a6fa=(_0x541633,_0x44030d,_0x52b18d,_0x22aa2d)=>{const _0x2aca3=_0x1ce235;for(var _0x57da34=_0x22aa2d>0x1?void 0x0:_0x22aa2d?_0x14b761(_0x44030d,_0x52b18d):_0x44030d,_0x1f429b=_0x541633[_0x2aca3(0xe0)]-0x1,_0x16fa47;_0x1f429b>=0x0;_0x1f429b--)(_0x16fa47=_0x541633[_0x1f429b])&&(_0x57da34=_0x16fa47(_0x57da34)||_0x57da34);return _0x57da34;},_0x32903c=(_0x3a9a23,_0x30a704)=>(_0x70d076,_0x56f57c)=>_0x30a704(_0x70d076,_0x56f57c,_0x3a9a23);function _0x8d3d13(_0x50d5bf,_0x4be0d9){const _0x23697f=_0x1ce235,_0x4f61b0=_0x50d5bf['replies'][0x0];return{..._0x4be0d9,'id':_0x4f61b0[_0x23697f(0xcd)],'resolved':_0x50d5bf[_0x23697f(0x116)]===0x1,'dT':_0xd800f7(_0x4f61b0[_0x23697f(0x107)]),'personId':_0x4f61b0[_0x23697f(0xfd)],'threadId':_0x4f61b0[_0x23697f(0x10c)]};}function _0x1552cd(_0x2097a3,_0x3f507c,_0x154396){const _0x2243a9=_0x1ce235;var _0x18ec45,_0x1d21d9;if(((_0x1d21d9=(_0x18ec45=_0x2097a3==null?void 0x0:_0x2097a3['replies'])==null?void 0x0:_0x18ec45[_0x2243a9(0xe0)])!=null?_0x1d21d9:0x0)>0x0){const _0x31c71c=(_0x2ae71c,_0x21ef60)=>({'id':_0x2ae71c[_0x2243a9(0xcd)],'threadId':_0x2ae71c[_0x2243a9(0x10c)],'dT':_0xd800f7(_0x2ae71c[_0x2243a9(0x107)]),'personId':_0x2ae71c[_0x2243a9(0xfd)],'resolved':_0x2097a3[_0x2243a9(0x116)]===_0x1860ff[_0x2243a9(0xd4)],'unitId':_0x3f507c,'subUnitId':_0x154396,'text':JSON[_0x2243a9(0x110)](_0x2ae71c[_0x2243a9(0xb1)]),'parentId':_0x21ef60}),_0x3b9050=_0x31c71c(_0x2097a3['replies'][0x0]);return{..._0x3b9050,'children':_0x2097a3[_0x2243a9(0x10b)][_0x2243a9(0xbe)](0x1)[_0x2243a9(0xa6)](_0x192f55=>_0x31c71c(_0x192f55,_0x3b9050['id']))};}return null;}let _0x52bed4=class{constructor(_0x57b09e,_0x4f3477,_0x226a05,_0x525842){const _0xed05ea=_0x1ce235;this[_0xed05ea(0xf7)]=_0x57b09e,this['_userService']=_0x4f3477,this[_0xed05ea(0xbc)]=_0x226a05,this[_0xed05ea(0xe9)]=_0x525842;}async['addComment'](_0x32248e){const _0x13bfa9=_0x1ce235;var _0xf631fd,_0x5d2ea3;const {parentId:_0x237ebd,unitId:_0x1ffe39,text:_0x138e5d,threadId:_0x4447b5}=_0x32248e,_0x101e5f=(_0x5d2ea3=(_0xf631fd=_0x138e5d[_0x13bfa9(0xdb)])==null?void 0x0:_0xf631fd[_0x13bfa9(0x9f)](_0x3102e3=>_0x3102e3['rangeType']===_0x3064f5[_0x13bfa9(0xaa)]['COMMENT'])[_0x13bfa9(0xa6)](_0xcd961f=>_0xcd961f[_0x13bfa9(0xcb)]))!=null?_0x5d2ea3:[],_0x37b213=JSON['stringify'](_0x138e5d),_0x1a1688=(await this[_0x13bfa9(0xbc)][_0x13bfa9(0x9d)](_0x1ffe39))[_0x13bfa9(0xd5)]();if(_0x237ebd){const _0x1e7b7c={'memberId':_0x1a1688,'unitId':_0x1ffe39,'content':_0x37b213,'mention':_0x101e5f,'threadId':_0x4447b5},_0x4b9852=(await this[_0x13bfa9(0xf7)]['post'](_0x13bfa9(0xbf)+_0x1ffe39+'/reply',{'body':_0x1e7b7c}))['body']['reply'];return{..._0x32248e,'id':_0x4b9852[_0x13bfa9(0xcd)],'dT':_0x3064f5['dayjs'](+_0x4b9852[_0x13bfa9(0x107)])[_0x13bfa9(0xa8)](_0x13bfa9(0xc6)),'personId':_0x4b9852[_0x13bfa9(0xfd)]};}else{const _0x2ac222={'memberId':_0x1a1688,'unitId':_0x1ffe39,'content':_0x37b213,'mention':_0x101e5f},_0x4f3150=await this[_0x13bfa9(0xf7)][_0x13bfa9(0x118)]('/universer-api/comment/unit/'+_0x1ffe39+_0x13bfa9(0x111),{'body':_0x2ac222});return _0x8d3d13(_0x4f3150[_0x13bfa9(0x103)][_0x13bfa9(0x9b)],_0x32248e);}}async[_0x1ce235(0xc0)](_0x1040c5){const _0x5e654d=_0x1ce235;var _0x205422,_0x87b5eb;const {text:_0x8eea5b,unitId:_0x13af5a}=_0x1040c5,_0x5aa54b=(_0x87b5eb=(_0x205422=_0x8eea5b['customRanges'])==null?void 0x0:_0x205422[_0x5e654d(0x9f)](_0x159354=>_0x159354['rangeType']===_0x3064f5[_0x5e654d(0xaa)]['COMMENT'])[_0x5e654d(0xa6)](_0x2f2261=>_0x2f2261[_0x5e654d(0xcb)]))!=null?_0x87b5eb:[],_0x8da19d=JSON[_0x5e654d(0xd6)](_0x8eea5b),_0xf086d1=_0x1040c5['threadId'],_0x444736=_0x1040c5['id'],_0x3ac2cf={'memberId':(await this[_0x5e654d(0xbc)][_0x5e654d(0x9d)](_0x13af5a))[_0x5e654d(0xd5)](),'unitId':_0x13af5a,'threadId':_0xf086d1,'mention':_0x5aa54b,'content':_0x8da19d,'replyId':_0x444736},_0x5b2031=await this[_0x5e654d(0xf7)]['post'](_0x5e654d(0xbf)+_0x13af5a+_0x5e654d(0xca),{'body':_0x3ac2cf});return!_0x5b2031[_0x5e654d(0x103)]['error']||_0x5b2031['body']['error'][_0x5e654d(0xd8)]===0x1;}async['resolveComment'](_0x33e791){const _0x5dd20a=_0x1ce235,{unitId:_0x22a35e}=_0x33e791,_0x2f81b6=_0x33e791[_0x5dd20a(0x10c)],_0x2b3de1={'memberId':this[_0x5dd20a(0xe8)][_0x5dd20a(0xb6)]()[_0x5dd20a(0x119)],'unitId':_0x22a35e,'threadId':_0x2f81b6,'solved':_0x33e791['resolved']?_0x1860ff[_0x5dd20a(0xd4)]:_0x1860ff[_0x5dd20a(0xed)]},_0x308327=await this['_httpService'][_0x5dd20a(0x118)]('/universer-api/comment/unit/'+_0x22a35e+_0x5dd20a(0x100),{'body':_0x2b3de1});return!_0x308327[_0x5dd20a(0x103)][_0x5dd20a(0xd9)]||_0x308327[_0x5dd20a(0x103)][_0x5dd20a(0xd9)]['code']===0x1;}async[_0x1ce235(0xda)](_0x237e2d,_0x35232c,_0x58262f,_0x3b802f){const _0x4338eb=_0x1ce235,_0x3083cf={'memberId':(await this['_sessionService'][_0x4338eb(0x9d)](_0x237e2d))[_0x4338eb(0xd5)](),'threadId':_0x58262f,'replyId':_0x3b802f,'unitId':_0x237e2d},_0x5b1f81=await this[_0x4338eb(0xf7)][_0x4338eb(0x118)](_0x4338eb(0xbf)+_0x237e2d+_0x4338eb(0xf6),{'body':_0x3083cf});return!_0x5b1f81['body'][_0x4338eb(0xd9)]||_0x5b1f81[_0x4338eb(0x103)][_0x4338eb(0xd9)][_0x4338eb(0xd8)]===0x1;}async[_0x1ce235(0xd3)](_0x4c88ef,_0x4a9045,_0x33dbfc){const _0xba3a17=_0x1ce235,_0x5725bc={'unitId':_0x4c88ef,'threadId':_0x33dbfc},_0x362034=await this[_0xba3a17(0xf7)]['post'](_0xba3a17(0xbf)+_0x4c88ef+_0xba3a17(0xc4),{'body':_0x5725bc}),_0x1f389f=_0x33dbfc['map'](_0x3d01cb=>_0x1552cd(_0x362034[_0xba3a17(0x103)][_0xba3a17(0x99)][_0x3d01cb],_0x4c88ef,_0x4a9045))[_0xba3a17(0x9f)](Boolean);return Object[_0xba3a17(0xba)](_0x362034['body'][_0xba3a17(0xeb)])[_0xba3a17(0xaf)](_0x2568d6=>{const _0x4bde95=_0xba3a17;this[_0x4bde95(0xe8)][_0x4bde95(0x104)](_0x2568d6);}),_0x1f389f;}[_0x1ce235(0xc5)](_0x563423){const _0x379407=_0x1ce235;return{'id':_0x563423['id'],'threadId':_0x563423[_0x379407(0x10c)],'ref':_0x563423[_0x379407(0x10f)]};}};_0x52bed4=_0x39a6fa([_0x32903c(0x0,_0x3064f5[_0x1ce235(0x106)](_0x60811d[_0x1ce235(0xd7)])),_0x32903c(0x1,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0xc7)])),_0x32903c(0x2,_0x3064f5[_0x1ce235(0x106)](_0x56cc7c['CollaborationSessionService'])),_0x32903c(0x3,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0x101)]))],_0x52bed4);var _0xb9a9ce=Object[_0x1ce235(0xf8)],_0x2847d1=(_0x33a684,_0x313559,_0x4d6b35,_0x3d7a2b)=>{const _0x22c79a=_0x1ce235;for(var _0x4438de=_0x3d7a2b>0x1?void 0x0:_0x3d7a2b?_0xb9a9ce(_0x313559,_0x4d6b35):_0x313559,_0x14a090=_0x33a684[_0x22c79a(0xe0)]-0x1,_0x30d402;_0x14a090>=0x0;_0x14a090--)(_0x30d402=_0x33a684[_0x14a090])&&(_0x4438de=_0x30d402(_0x4438de)||_0x4438de);return _0x4438de;},_0x2b1209=(_0x242c51,_0x1308da)=>(_0x10c207,_0x5dcf64)=>_0x1308da(_0x10c207,_0x5dcf64,_0x242c51);let _0x39bb2f=class extends _0x3064f5[_0x1ce235(0xb8)]{constructor(_0xbc76e1,_0x13d6bb){const _0x2c6d3d=_0x1ce235;super(),this[_0x2c6d3d(0xf3)]=_0xbc76e1,this['_threadCommentDataSource']=_0x13d6bb,this['_initDataSource']();}[_0x1ce235(0xf2)](){const _0x1a07da=_0x1ce235;this[_0x1a07da(0xf3)][_0x1a07da(0xb3)]=this[_0x1a07da(0xc3)],this[_0x1a07da(0xf3)][_0x1a07da(0xde)]=!0x1;}};_0x39bb2f=_0x2847d1([_0x2b1209(0x0,_0x5efcbf[_0x1ce235(0xfa)]),_0x2b1209(0x1,_0x3064f5[_0x1ce235(0x106)](_0x52bed4))],_0x39bb2f);var _0x32e35b=Object[_0x1ce235(0xdf)],_0x45c325=Object[_0x1ce235(0xf8)],_0x290cd8=(_0x1feb7f,_0x114c41,_0x1c56eb)=>_0x114c41 in _0x1feb7f?_0x32e35b(_0x1feb7f,_0x114c41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c56eb}):_0x1feb7f[_0x114c41]=_0x1c56eb,_0x22f307=(_0x1cf3ed,_0x3d5622,_0x70c47e,_0x1982b5)=>{for(var _0xa1ef8d=_0x1982b5>0x1?void 0x0:_0x1982b5?_0x45c325(_0x3d5622,_0x70c47e):_0x3d5622,_0x4c80fa=_0x1cf3ed['length']-0x1,_0x59b884;_0x4c80fa>=0x0;_0x4c80fa--)(_0x59b884=_0x1cf3ed[_0x4c80fa])&&(_0xa1ef8d=_0x59b884(_0xa1ef8d)||_0xa1ef8d);return _0xa1ef8d;},_0x242ff4=(_0x42731e,_0x526763)=>(_0x268967,_0x5bdb9d)=>_0x526763(_0x268967,_0x5bdb9d,_0x42731e),_0x39b7c4=(_0x5bd678,_0x183a53,_0x2a2690)=>_0x290cd8(_0x5bd678,typeof _0x183a53!=_0x1ce235(0xcf)?_0x183a53+'':_0x183a53,_0x2a2690);_0x545edf['UniverThreadCommentDataSourcePlugin']=class extends _0x3064f5['Plugin']{constructor(_0x5efa4b=_0x3fda5b,_0x316a84,_0x537687){const _0x5f1d5f=_0x1ce235;super(),this['_config']=_0x5efa4b,this[_0x5f1d5f(0xe9)]=_0x316a84,this[_0x5f1d5f(0xd1)]=_0x537687;const {..._0x282142}=_0x3064f5[_0x5f1d5f(0xff)]({},_0x3fda5b,this[_0x5f1d5f(0xdd)]);this['_configService'][_0x5f1d5f(0x112)](_0x3061b0,_0x282142);}['onStarting'](){[[_0x52bed4],[_0x39bb2f],[_0x52b79c]]['forEach'](_0x287cce=>{const _0x495a8f=_0x2a9b;this[_0x495a8f(0xe9)][_0x495a8f(0xf1)](_0x287cce);});}['onReady'](){const _0x14316a=_0x1ce235;this[_0x14316a(0xe9)][_0x14316a(0xc2)](_0x39bb2f),this[_0x14316a(0xe9)][_0x14316a(0xc2)](_0x52b79c);}},_0x39b7c4(_0x545edf[_0x1ce235(0x117)],_0x1ce235(0xa5),_0x62f104),_0x39b7c4(_0x545edf[_0x1ce235(0x117)],'type',_0x3064f5[_0x1ce235(0xa4)]['UNIVER_UNKNOWN']),_0x545edf[_0x1ce235(0x117)]=_0x22f307([_0x3064f5[_0x1ce235(0x10e)](_0x5cf2d3[_0x1ce235(0x109)],_0x56cc7c['UniverCollaborationClientPlugin'],_0x336a84[_0x1ce235(0xa0)]),_0x242ff4(0x1,_0x3064f5['Inject'](_0x3064f5['Injector'])),_0x242ff4(0x2,_0x3064f5[_0x1ce235(0xc1)])],_0x545edf['UniverThreadCommentDataSourcePlugin']),Object[_0x1ce235(0xdf)](_0x545edf,Symbol['toStringTag'],{'value':_0x1ce235(0xe1)});}));function _0x2a9b(_0x34d043,_0x501a18){const _0x1e90fb=_0x1e90();return _0x2a9b=function(_0x2a9bee,_0x5ec0c0){_0x2a9bee=_0x2a9bee-0x98;let _0x2f754b=_0x1e90fb[_0x2a9bee];return _0x2f754b;},_0x2a9b(_0x34d043,_0x501a18);}function _0x1e90(){const _0x35ce4b=['pluginName','map','object','format','exports','CustomRangeType','UniverProCollaborationClient','Delete','@univerjs-pro/license','type','forEach','parentId','content','3CMlhbm','dataSource','99305vXSODl','Edit','getCurrentUser','528635RAoFMh','Disposable','_init','values','user','_sessionService','987111ATcNzh','slice','/universer-api/comment/unit/','updateComment','IConfigService','get','_threadCommentDataSource','/list','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','UserManagerService','UniverNetwork','UniverProLicense','/edit','rangeId','_commentService','replyId','UNRECOGNIZED','symbol','_threadCommentModel','_configService','Add','listComments','Solved','getMemberID','stringify','HTTPService','code','error','deleteComment','customRanges','rxjs','_config','syncUpdateMutationToColla','defineProperty','length','Module','680EtgQoh','Unknown','_initUserSync','@univerjs/core','subscribe','size','_userService','_injector','32QngJqW','users','1345286ZoBJGQ','OpenOrReOpen','539JgZonf','delete','Solve','add','_initDataSource','_threadCommentDataSourceService','CommentService','commentUpdate$','/delete','_httpService','getOwnPropertyDescriptor','Reply','IThreadCommentDataSourceService','find','UniverProThreadCommentDatasource','userId','pipe','merge','/solved','Injector','amd','body','addUser','root','Inject','createTimestamp','getUnit','UniverThreadCommentUIPlugin','11704044NIECvv','replies','threadId','unitId','DependentOn','ref','parse','/add','setConfig','addComment','personId','46572lAmrAo','solved','UniverThreadCommentDataSourcePlugin','post','userID','116Qoekma','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','@univerjs/thread-comment-ui','requireSession','/universer-api/user/list','filter','UniverLicensePlugin','payload','86669jlFObI','getComment','UniverInstanceType'];_0x1e90=function(){return _0x35ce4b;};return _0x1e90();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.2-nightly.202507161608",
3
+ "version": "0.9.2-nightly.202507181608",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507161608",
49
- "@univerjs-pro/license": "0.9.2-nightly.202507161608",
48
+ "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507181608",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507181608",
50
+ "@univerjs/core": "0.9.2-nightly.202507181608",
51
+ "@univerjs/network": "0.9.2-nightly.202507181608",
52
+ "@univerjs/thread-comment": "0.9.2-nightly.202507181608",
50
53
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/thread-comment": "0.9.2-nightly.202507161608",
52
- "@univerjs/core": "0.9.2-nightly.202507161608",
53
- "@univerjs/thread-comment-ui": "0.9.2-nightly.202507161608",
54
- "@univerjs/network": "0.9.2-nightly.202507161608"
54
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507181608"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.5",
59
+ "vite": "^7.0.5",
60
60
  "vitest": "^3.2.4",
61
61
  "@univerjs-infra/shared": "0.9.2"
62
62
  },