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

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';const _0x1ee313=_0x8821;(function(_0xd6125e,_0x2e894d){const _0x52bbd9=_0x8821,_0x4f9197=_0xd6125e();while(!![]){try{const _0x418bf8=-parseInt(_0x52bbd9(0x16a))/0x1*(-parseInt(_0x52bbd9(0x13c))/0x2)+-parseInt(_0x52bbd9(0x156))/0x3+-parseInt(_0x52bbd9(0x175))/0x4+-parseInt(_0x52bbd9(0x11b))/0x5*(-parseInt(_0x52bbd9(0x10f))/0x6)+parseInt(_0x52bbd9(0x14c))/0x7+-parseInt(_0x52bbd9(0x158))/0x8*(parseInt(_0x52bbd9(0x17a))/0x9)+parseInt(_0x52bbd9(0x138))/0xa*(-parseInt(_0x52bbd9(0x15e))/0xb);if(_0x418bf8===_0x2e894d)break;else _0x4f9197['push'](_0x4f9197['shift']());}catch(_0x6c81ff){_0x4f9197['push'](_0x4f9197['shift']());}}}(_0x285e,0x5f575));Object[_0x1ee313(0x14b)](exports,Symbol[_0x1ee313(0x143)],{'value':_0x1ee313(0x125)});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=_0x1ee313(0x146);var I=(_0x40ff79=>(_0x40ff79[_0x40ff79[_0x1ee313(0x119)]=0x0]='OpenOrReOpen',_0x40ff79[_0x40ff79[_0x1ee313(0x115)]=0x1]=_0x1ee313(0x115),_0x40ff79[_0x40ff79[_0x1ee313(0x159)]=-0x1]='UNRECOGNIZED',_0x40ff79))(I||{}),v=(_0xdea46e=>(_0xdea46e[_0xdea46e[_0x1ee313(0x11c)]=0x0]=_0x1ee313(0x11c),_0xdea46e[_0xdea46e[_0x1ee313(0x150)]=0x1]='Add',_0xdea46e[_0xdea46e[_0x1ee313(0x11f)]=0x2]=_0x1ee313(0x11f),_0xdea46e[_0xdea46e['Edit']=0x3]=_0x1ee313(0x165),_0xdea46e[_0xdea46e[_0x1ee313(0x121)]=0x4]=_0x1ee313(0x121),_0xdea46e[_0xdea46e[_0x1ee313(0x177)]=0x5]='Solve',_0xdea46e[_0xdea46e['UNRECOGNIZED']=-0x1]=_0x1ee313(0x159),_0xdea46e))(v||{});const f=_0x4eb6d1=>c[_0x1ee313(0x116)](new Date(+_0x4eb6d1))['format'](_0x1ee313(0x149)),R=async(_0x539232,_0xe057)=>{const _0x20e06c=_0x1ee313,_0x341d8b=_0x539232[_0x20e06c(0x169)](c['UserManagerService']),_0x4aa305=_0x539232[_0x20e06c(0x169)](P[_0x20e06c(0x15d)]);_0xe057[_0x20e06c(0x12a)](_0x2d07a6=>{const _0x47e970=_0x20e06c;_0x341d8b['getUser'](_0x2d07a6)&&_0xe057[_0x47e970(0x133)](_0x2d07a6);}),_0xe057[_0x20e06c(0xfe)]&&(await _0x4aa305[_0x20e06c(0x169)](_0x20e06c(0x132),{'params':{'userIDs':[..._0xe057]}}))[_0x20e06c(0xfd)]['users']['forEach'](_0x5b7221=>{_0x5b7221&&_0x341d8b['addUser'](_0x5b7221);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x59e2b5,_0xc24bb3,_0x1d8274,_0x4db8b2)=>{const _0x4c633c=_0x1ee313;for(var _0x5c0e9e=_0x4db8b2>0x1?void 0x0:_0x4db8b2?$(_0xc24bb3,_0x1d8274):_0xc24bb3,_0x39ae1b=_0x59e2b5[_0x4c633c(0x154)]-0x1,_0x3af85d;_0x39ae1b>=0x0;_0x39ae1b--)(_0x3af85d=_0x59e2b5[_0x39ae1b])&&(_0x5c0e9e=_0x3af85d(_0x5c0e9e)||_0x5c0e9e);return _0x5c0e9e;},S=(_0x1039d4,_0x5d0c9a)=>(_0x546ff8,_0x5bb6ce)=>_0x5d0c9a(_0x546ff8,_0x5bb6ce,_0x1039d4);let p=class extends c[_0x1ee313(0x120)]{constructor(_0x74f46c,_0x1f5821,_0x1d3d13,_0x196ab0){const _0x2331bf=_0x1ee313;super(),this[_0x2331bf(0x144)]=_0x74f46c,this[_0x2331bf(0x112)]=_0x1f5821,this[_0x2331bf(0x172)]=_0x1d3d13,this['_injector']=_0x196ab0,this[_0x2331bf(0x107)](),this[_0x2331bf(0x111)]();}[_0x1ee313(0x111)](){const _0x75501f=_0x1ee313;this[_0x75501f(0x179)](this[_0x75501f(0x112)][_0x75501f(0x12b)][_0x75501f(0x12e)](w[_0x75501f(0x103)](0x10))['subscribe'](_0x303f12=>{const _0x521f6a=_0x75501f,_0x4d77e1=new Set();_0x303f12['forEach'](_0x3df2d5=>{const _0x5bd2f2=_0x8821;switch(_0x3df2d5[_0x5bd2f2(0x14f)]){case _0x5bd2f2(0x13a):{const _0x4de8e6=_0x3df2d5[_0x5bd2f2(0x137)]['personId'];_0x4d77e1[_0x5bd2f2(0x13a)](_0x4de8e6);break;}}}),R(this[_0x521f6a(0x106)],_0x4d77e1);}));}[_0x1ee313(0x107)](){const _0x3cfd66=_0x1ee313;this[_0x3cfd66(0x179)](this['_commentService'][_0x3cfd66(0x12b)][_0x3cfd66(0x155)](async _0x554f39=>{const _0x12c074=_0x3cfd66;var _0x44b1e7,_0x4d3117,_0x457ffb,_0x471487;const _0x3f1be2=(_0x44b1e7=this[_0x12c074(0x112)][_0x12c074(0x162)](_0x554f39[_0x12c074(0x147)])[_0x12c074(0x16f)](_0x2fb9c1=>_0x2fb9c1[_0x12c074(0x136)]===_0x554f39[_0x12c074(0x136)]))==null?void 0x0:_0x44b1e7[_0x12c074(0x16b)];if(!_0x3f1be2)return;const {unitId:_0x56f8bf,subUnitId:_0x2d138d}=_0x3f1be2;switch(_0x554f39[_0x12c074(0x166)]&&this[_0x12c074(0x172)]['addUser'](_0x554f39[_0x12c074(0x166)]),_0x554f39[_0x12c074(0x14f)]){case v[_0x12c074(0x150)]:break;case v[_0x12c074(0x11f)]:{this[_0x12c074(0x112)][_0x12c074(0x105)](_0x56f8bf,_0x2d138d,{'unitId':_0x56f8bf,'subUnitId':_0x2d138d,'ref':'','id':_0x554f39[_0x12c074(0x15b)],'dT':f(+_0x554f39[_0x12c074(0x170)]),'threadId':_0x554f39[_0x12c074(0x136)],'personId':(_0x457ffb=(_0x4d3117=_0x554f39[_0x12c074(0x166)])==null?void 0x0:_0x4d3117[_0x12c074(0x140)])!=null?_0x457ffb:_0x554f39[_0x12c074(0x118)],'text':JSON[_0x12c074(0x13b)](_0x554f39[_0x12c074(0x13d)]),'parentId':_0x3f1be2['id']});break;}case v['Delete']:{const _0x5f171b=this[_0x12c074(0x112)][_0x12c074(0x163)](_0x56f8bf,_0x2d138d,_0x554f39[_0x12c074(0x15b)]);_0x5f171b&&_0x5f171b[_0x12c074(0x12c)]&&this[_0x12c074(0x112)][_0x12c074(0x174)](_0x56f8bf,_0x2d138d,_0x554f39[_0x12c074(0x15b)]);break;}case v[_0x12c074(0x165)]:{this[_0x12c074(0x112)]['updateComment'](_0x56f8bf,_0x2d138d,{'commentId':_0x554f39[_0x12c074(0x15b)],'text':JSON['parse'](_0x554f39[_0x12c074(0x13d)])});break;}case v[_0x12c074(0x177)]:{const _0x5bdbc8=(_0x471487=this[_0x12c074(0x112)][_0x12c074(0x162)](_0x554f39[_0x12c074(0x147)])[_0x12c074(0x16f)](_0x1e5e55=>_0x1e5e55[_0x12c074(0x136)]===_0x554f39[_0x12c074(0x136)]))==null?void 0x0:_0x471487[_0x12c074(0x16b)];_0x5bdbc8&&this[_0x12c074(0x112)][_0x12c074(0x168)](_0x56f8bf,_0x2d138d,_0x5bdbc8['id'],_0x554f39[_0x12c074(0x142)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x1ee313(0x122)](b[_0x1ee313(0x14e)])),S(0x1,c[_0x1ee313(0x122)](M[_0x1ee313(0x167)])),S(0x2,c[_0x1ee313(0x122)](c[_0x1ee313(0x100)])),S(0x3,c[_0x1ee313(0x122)](c[_0x1ee313(0x10c)]))],p);function _0x8821(_0x124200,_0x1b3e5e){const _0x285e0c=_0x285e();return _0x8821=function(_0x882193,_0x41ff5f){_0x882193=_0x882193-0xfd;let _0xfe0b0c=_0x285e0c[_0x882193];return _0xfe0b0c;},_0x8821(_0x124200,_0x1b3e5e);}const q=_0x1ee313(0x126),D={};var A=Object[_0x1ee313(0x130)],x=(_0x5f0cf4,_0x3506f0,_0x51460,_0xc5d3e8)=>{const _0x174994=_0x1ee313;for(var _0x54bcfb=_0xc5d3e8>0x1?void 0x0:_0xc5d3e8?A(_0x3506f0,_0x51460):_0x3506f0,_0x53dc55=_0x5f0cf4[_0x174994(0x154)]-0x1,_0x39b2af;_0x53dc55>=0x0;_0x53dc55--)(_0x39b2af=_0x5f0cf4[_0x53dc55])&&(_0x54bcfb=_0x39b2af(_0x54bcfb)||_0x54bcfb);return _0x54bcfb;},_=(_0x1f20db,_0x262c5a)=>(_0x113cac,_0x38f838)=>_0x262c5a(_0x113cac,_0x38f838,_0x1f20db);function Y(_0x171864,_0x42feff){const _0x2e9a3f=_0x1ee313,_0x4e87df=_0x171864[_0x2e9a3f(0x11d)][0x0];return{..._0x42feff,'id':_0x4e87df[_0x2e9a3f(0x15b)],'resolved':_0x171864[_0x2e9a3f(0x142)]===0x1,'dT':f(_0x4e87df['createTimestamp']),'personId':_0x4e87df[_0x2e9a3f(0x118)],'threadId':_0x4e87df[_0x2e9a3f(0x136)]};}function G(_0x40b8b0,_0x520e26,_0x5cd030){const _0x1c16ae=_0x1ee313;var _0x2c35b6,_0x56fdce;if(((_0x56fdce=(_0x2c35b6=_0x40b8b0==null?void 0x0:_0x40b8b0[_0x1c16ae(0x11d)])==null?void 0x0:_0x2c35b6[_0x1c16ae(0x154)])!=null?_0x56fdce:0x0)>0x0){const _0x375027=(_0x4f1d46,_0x2bdc2b)=>({'id':_0x4f1d46['replyId'],'threadId':_0x4f1d46[_0x1c16ae(0x136)],'dT':f(_0x4f1d46['createTimestamp']),'personId':_0x4f1d46[_0x1c16ae(0x118)],'resolved':_0x40b8b0[_0x1c16ae(0x142)]===I[_0x1c16ae(0x115)],'unitId':_0x520e26,'subUnitId':_0x5cd030,'text':JSON[_0x1c16ae(0x13b)](_0x4f1d46[_0x1c16ae(0x13d)]),'parentId':_0x2bdc2b}),_0xf2e19c=_0x375027(_0x40b8b0[_0x1c16ae(0x11d)][0x0]);return{..._0xf2e19c,'children':_0x40b8b0[_0x1c16ae(0x11d)][_0x1c16ae(0x114)](0x1)[_0x1c16ae(0x151)](_0xf5aada=>_0x375027(_0xf5aada,_0xf2e19c['id']))};}return null;}let g=class{constructor(_0x61d8ae,_0x33f10b,_0x368f37,_0x536d5c){const _0x77204c=_0x1ee313;this[_0x77204c(0x104)]=_0x61d8ae,this[_0x77204c(0x172)]=_0x33f10b,this[_0x77204c(0x128)]=_0x368f37,this[_0x77204c(0x106)]=_0x536d5c;}async[_0x1ee313(0x105)](_0x5ef236){const _0x557e2a=_0x1ee313;var _0x22dbca,_0x4b6e78;const {parentId:_0x4aad23,unitId:_0x511126,text:_0x2450a7,threadId:_0x591ab9}=_0x5ef236,_0x445569=(_0x4b6e78=(_0x22dbca=_0x2450a7[_0x557e2a(0x10e)])==null?void 0x0:_0x22dbca['filter'](_0x5d13a1=>_0x5d13a1[_0x557e2a(0x135)]===c[_0x557e2a(0x15f)][_0x557e2a(0x127)])[_0x557e2a(0x151)](_0x42e654=>_0x42e654[_0x557e2a(0x13e)]))!=null?_0x4b6e78:[],_0x53e5db=JSON[_0x557e2a(0x139)](_0x2450a7),_0x123a9c=(await this[_0x557e2a(0x128)][_0x557e2a(0x14a)](_0x511126))['getMemberID']();if(_0x4aad23){const _0x11e868={'memberId':_0x123a9c,'unitId':_0x511126,'content':_0x53e5db,'mention':_0x445569,'threadId':_0x591ab9},_0x2b4278=(await this[_0x557e2a(0x104)][_0x557e2a(0x102)](_0x557e2a(0x110)+_0x511126+_0x557e2a(0x109),{'body':_0x11e868}))[_0x557e2a(0xfd)][_0x557e2a(0x161)];return{..._0x5ef236,'id':_0x2b4278[_0x557e2a(0x15b)],'dT':c['dayjs'](+_0x2b4278[_0x557e2a(0x170)])[_0x557e2a(0x157)](_0x557e2a(0x149)),'personId':_0x2b4278[_0x557e2a(0x118)]};}else{const _0x3582dd={'memberId':_0x123a9c,'unitId':_0x511126,'content':_0x53e5db,'mention':_0x445569},_0x40c654=await this[_0x557e2a(0x104)]['post'](_0x557e2a(0x110)+_0x511126+_0x557e2a(0x17b),{'body':_0x3582dd});return Y(_0x40c654['body'][_0x557e2a(0x12f)],_0x5ef236);}}async[_0x1ee313(0x11e)](_0x41f330){const _0x4578ca=_0x1ee313;var _0x2dd795,_0x5de8e9;const {text:_0x3ea936,unitId:_0x574ccd}=_0x41f330,_0x5b3e23=(_0x5de8e9=(_0x2dd795=_0x3ea936[_0x4578ca(0x10e)])==null?void 0x0:_0x2dd795[_0x4578ca(0x141)](_0x424670=>_0x424670[_0x4578ca(0x135)]===c[_0x4578ca(0x15f)][_0x4578ca(0x127)])[_0x4578ca(0x151)](_0x5d71f7=>_0x5d71f7[_0x4578ca(0x13e)]))!=null?_0x5de8e9:[],_0x101959=JSON['stringify'](_0x3ea936),_0x272672=_0x41f330[_0x4578ca(0x136)],_0x34fdb1=_0x41f330['id'],_0xbcc5f6={'memberId':(await this[_0x4578ca(0x128)][_0x4578ca(0x14a)](_0x574ccd))['getMemberID'](),'unitId':_0x574ccd,'threadId':_0x272672,'mention':_0x5b3e23,'content':_0x101959,'replyId':_0x34fdb1},_0x352a86=await this[_0x4578ca(0x104)]['post'](_0x4578ca(0x110)+_0x574ccd+_0x4578ca(0x164),{'body':_0xbcc5f6});return!_0x352a86[_0x4578ca(0xfd)]['error']||_0x352a86[_0x4578ca(0xfd)]['error'][_0x4578ca(0x13f)]===0x1;}async[_0x1ee313(0x168)](_0x5594bb){const _0x3d2212=_0x1ee313,{unitId:_0x373f3c}=_0x5594bb,_0x14d44b=_0x5594bb[_0x3d2212(0x136)],_0x15d3bc={'memberId':this[_0x3d2212(0x172)]['getCurrentUser']()['userID'],'unitId':_0x373f3c,'threadId':_0x14d44b,'solved':_0x5594bb[_0x3d2212(0x129)]?I[_0x3d2212(0x115)]:I[_0x3d2212(0x119)]},_0x59aca0=await this[_0x3d2212(0x104)][_0x3d2212(0x102)]('/universer-api/comment/unit/'+_0x373f3c+_0x3d2212(0x16e),{'body':_0x15d3bc});return!_0x59aca0['body'][_0x3d2212(0x14d)]||_0x59aca0[_0x3d2212(0xfd)][_0x3d2212(0x14d)]['code']===0x1;}async[_0x1ee313(0x174)](_0x22e5ab,_0x32a87d,_0x2281ad,_0x39190d){const _0x1a07ed=_0x1ee313,_0x4ceb28={'memberId':(await this[_0x1a07ed(0x128)][_0x1a07ed(0x14a)](_0x22e5ab))[_0x1a07ed(0x153)](),'threadId':_0x2281ad,'replyId':_0x39190d,'unitId':_0x22e5ab},_0x4ad1ab=await this[_0x1a07ed(0x104)][_0x1a07ed(0x102)]('/universer-api/comment/unit/'+_0x22e5ab+_0x1a07ed(0x117),{'body':_0x4ceb28});return!_0x4ad1ab[_0x1a07ed(0xfd)][_0x1a07ed(0x14d)]||_0x4ad1ab['body']['error'][_0x1a07ed(0x13f)]===0x1;}async['listComments'](_0x595262,_0x5cbf30,_0x4b5078){const _0x5d0e80=_0x1ee313,_0x342db0={'unitId':_0x595262,'threadId':_0x4b5078},_0x2c26ea=await this[_0x5d0e80(0x104)][_0x5d0e80(0x102)](_0x5d0e80(0x110)+_0x595262+_0x5d0e80(0x15c),{'body':_0x342db0}),_0x4bdaba=_0x4b5078[_0x5d0e80(0x151)](_0x184b6f=>G(_0x2c26ea[_0x5d0e80(0xfd)][_0x5d0e80(0x152)][_0x184b6f],_0x595262,_0x5cbf30))[_0x5d0e80(0x141)](Boolean);return Object[_0x5d0e80(0x145)](_0x2c26ea[_0x5d0e80(0xfd)]['users'])[_0x5d0e80(0x12a)](_0x50fabc=>{const _0x16150a=_0x5d0e80;this[_0x16150a(0x172)][_0x16150a(0x16c)](_0x50fabc);}),_0x4bdaba;}['saveCommentToSnapshot'](_0x3c70be){const _0x4bd35d=_0x1ee313;return{'id':_0x3c70be['id'],'threadId':_0x3c70be[_0x4bd35d(0x136)],'ref':_0x3c70be[_0x4bd35d(0x11a)]};}};g=x([_(0x0,c[_0x1ee313(0x122)](P[_0x1ee313(0x15d)])),_(0x1,c[_0x1ee313(0x122)](c[_0x1ee313(0x100)])),_(0x2,c[_0x1ee313(0x122)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x1ee313(0x10c)]))],g);var H=Object[_0x1ee313(0x130)],J=(_0x505bbd,_0x345574,_0x2dbf18,_0x196ce3)=>{for(var _0x119194=_0x196ce3>0x1?void 0x0:_0x196ce3?H(_0x345574,_0x2dbf18):_0x345574,_0x1c7256=_0x505bbd['length']-0x1,_0x493458;_0x1c7256>=0x0;_0x1c7256--)(_0x493458=_0x505bbd[_0x1c7256])&&(_0x119194=_0x493458(_0x119194)||_0x119194);return _0x119194;},y=(_0x22d24b,_0x30510e)=>(_0x5d233a,_0x31622b)=>_0x30510e(_0x5d233a,_0x31622b,_0x22d24b);let C=class extends c[_0x1ee313(0x120)]{constructor(_0x30b563,_0x1fa986){const _0x25df2d=_0x1ee313;super(),this[_0x25df2d(0x123)]=_0x30b563,this[_0x25df2d(0x160)]=_0x1fa986,this[_0x25df2d(0x12d)]();}[_0x1ee313(0x12d)](){const _0x22b58c=_0x1ee313;this[_0x22b58c(0x123)]['dataSource']=this[_0x22b58c(0x160)],this[_0x22b58c(0x123)][_0x22b58c(0x124)]=!0x1;}};C=J([y(0x0,M[_0x1ee313(0x10b)]),y(0x1,c[_0x1ee313(0x122)](g))],C);var F=Object['defineProperty'],L=Object[_0x1ee313(0x130)],Z=(_0xa9cc32,_0x518f0a,_0x5df569)=>_0x518f0a in _0xa9cc32?F(_0xa9cc32,_0x518f0a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5df569}):_0xa9cc32[_0x518f0a]=_0x5df569,W=(_0x34b1cf,_0xf7a7df,_0xd6c18a,_0x18d284)=>{for(var _0x35b102=_0x18d284>0x1?void 0x0:_0x18d284?L(_0xf7a7df,_0xd6c18a):_0xf7a7df,_0x1f2f2d=_0x34b1cf['length']-0x1,_0x19b835;_0x1f2f2d>=0x0;_0x1f2f2d--)(_0x19b835=_0x34b1cf[_0x1f2f2d])&&(_0x35b102=_0x19b835(_0x35b102)||_0x35b102);return _0x35b102;},O=(_0x44f149,_0xf0b2b)=>(_0x2df297,_0x6ba8eb)=>_0xf0b2b(_0x2df297,_0x6ba8eb,_0x44f149),N=(_0xcb12ae,_0x4fa359,_0x40d2af)=>Z(_0xcb12ae,typeof _0x4fa359!='symbol'?_0x4fa359+'':_0x4fa359,_0x40d2af);function _0x285e(){const _0x38b8a4=['/solved','find','createTimestamp','_configService','_userService','setConfig','deleteComment','1043140wivEkF','UniverLicensePlugin','Solve','UNIVER_UNKNOWN','disposeWithMe','27gKEula','/add','body','size','merge','UserManagerService','onStarting','post','bufferTime','_httpService','addComment','_injector','_init','DependentOn','/reply','UniverInstanceType','IThreadCommentDataSourceService','Injector','IConfigService','customRanges','42ftgftb','/universer-api/comment/unit/','_initUserSync','_threadCommentModel','Plugin','slice','Solved','dayjs','/delete','userId','OpenOrReOpen','ref','549205HGHRyf','Unknown','replies','updateComment','Reply','Disposable','Delete','Inject','_threadCommentDataSourceService','syncUpdateMutationToColla','Module','thread-comment-data-source.config','COMMENT','_sessionService','resolved','forEach','commentUpdate$','parentId','_initDataSource','pipe','comment','getOwnPropertyDescriptor','pluginName','/universer-api/user/list','delete','_config','rangeType','threadId','payload','2526070OujRHZ','stringify','add','parse','2SnAHrM','content','rangeId','code','userID','filter','solved','toStringTag','_commentService','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','requireSession','defineProperty','4746791pYIeXJ','error','CommentService','type','Add','map','comments','getMemberID','length','subscribe','586437IsXDWy','format','1334584NddCjx','UNRECOGNIZED','onReady','replyId','/list','HTTPService','22YqfgeR','CustomRangeType','_threadCommentDataSource','reply','getUnit','getComment','/edit','Edit','user','ThreadCommentModel','resolveComment','get','405464xUiwrx','root','addUser','UniverThreadCommentDataSourcePlugin'];_0x285e=function(){return _0x38b8a4;};return _0x285e();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1ee313(0x113)]{constructor(_0x21a91f=D,_0x595c06,_0x270881){const _0x1c2804=_0x1ee313;super(),this[_0x1c2804(0x134)]=_0x21a91f,this[_0x1c2804(0x106)]=_0x595c06,this[_0x1c2804(0x171)]=_0x270881;const {..._0x450b60}=c[_0x1c2804(0xff)]({},D,this[_0x1c2804(0x134)]);this['_configService'][_0x1c2804(0x173)](q,_0x450b60);}[_0x1ee313(0x101)](){[[g],[C],[p]]['forEach'](_0x1e13bc=>{const _0x532581=_0x8821;this[_0x532581(0x106)][_0x532581(0x13a)](_0x1e13bc);});}[_0x1ee313(0x15a)](){const _0x1ae853=_0x1ee313;this[_0x1ae853(0x106)][_0x1ae853(0x169)](C),this[_0x1ae853(0x106)][_0x1ae853(0x169)](p);}},N(exports[_0x1ee313(0x16d)],_0x1ee313(0x131),U),N(exports[_0x1ee313(0x16d)],'type',c[_0x1ee313(0x10a)][_0x1ee313(0x178)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1ee313(0x108)](j['UniverThreadCommentUIPlugin'],b[_0x1ee313(0x148)],T[_0x1ee313(0x176)]),O(0x1,c[_0x1ee313(0x122)](c[_0x1ee313(0x10c)])),O(0x2,c[_0x1ee313(0x10d)])],exports[_0x1ee313(0x16d)]);
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
+ const _0x1b47a9=_0x124b;(function(_0x1408a1,_0x2c6ce2){const _0x3d0917=_0x124b,_0x165aa9=_0x1408a1();while(!![]){try{const _0x4d02f0=parseInt(_0x3d0917(0x16b))/0x1+-parseInt(_0x3d0917(0x166))/0x2*(-parseInt(_0x3d0917(0x179))/0x3)+parseInt(_0x3d0917(0x156))/0x4+parseInt(_0x3d0917(0x12a))/0x5+-parseInt(_0x3d0917(0x146))/0x6*(parseInt(_0x3d0917(0x170))/0x7)+-parseInt(_0x3d0917(0x159))/0x8*(-parseInt(_0x3d0917(0x162))/0x9)+parseInt(_0x3d0917(0x16c))/0xa*(-parseInt(_0x3d0917(0x147))/0xb);if(_0x4d02f0===_0x2c6ce2)break;else _0x165aa9['push'](_0x165aa9['shift']());}catch(_0xfe2161){_0x165aa9['push'](_0x165aa9['shift']());}}}(_0x1078,0x76658));import{CommentService as _0x3c4083,CollaborationSessionService as _0x2ae918,UniverCollaborationClientPlugin as _0x3a519b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ef8f5}from'@univerjs-pro/license';import{dayjs as _0x4bf675,UserManagerService as _0x571c24,Inject as _0x113128,Injector as _0x59dbaa,Disposable as _0x434d24,CustomRangeType as _0x59c86f,UniverInstanceType as _0x1ce2d1,DependentOn as _0x8a9abb,IConfigService as _0x575a65,Plugin as _0x5b100b,merge as _0x4ebc5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x18e6d7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x656ab3,IThreadCommentDataSourceService as _0x5e6fac}from'@univerjs/thread-comment';import{bufferTime as _0x4c390f}from'rxjs';import{HTTPService as _0x4b42b5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17bfe8=>(_0x17bfe8[_0x17bfe8[_0x1b47a9(0x17b)]=0x0]=_0x1b47a9(0x17b),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x142)]=0x1]=_0x1b47a9(0x142),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x17bfe8))(I||{}),v=(_0x5d2623=>(_0x5d2623[_0x5d2623['Unknown']=0x0]='Unknown',_0x5d2623[_0x5d2623[_0x1b47a9(0x136)]=0x1]='Add',_0x5d2623[_0x5d2623[_0x1b47a9(0x149)]=0x2]=_0x1b47a9(0x149),_0x5d2623[_0x5d2623[_0x1b47a9(0x133)]=0x3]=_0x1b47a9(0x133),_0x5d2623[_0x5d2623[_0x1b47a9(0x13a)]=0x4]=_0x1b47a9(0x13a),_0x5d2623[_0x5d2623['Solve']=0x5]=_0x1b47a9(0x17f),_0x5d2623[_0x5d2623[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x5d2623))(v||{});const D=_0x24b4b9=>_0x4bf675(new Date(+_0x24b4b9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x41edec,_0x2df88d)=>{const _0x43f763=_0x1b47a9,_0x425b3f=_0x41edec[_0x43f763(0x180)](_0x571c24),_0x4351ff=_0x41edec[_0x43f763(0x180)](_0x4b42b5);_0x2df88d[_0x43f763(0x132)](_0x50b0e2=>{const _0x2a286b=_0x43f763;_0x425b3f[_0x2a286b(0x183)](_0x50b0e2)&&_0x2df88d['delete'](_0x50b0e2);}),_0x2df88d['size']&&(await _0x4351ff['get'](_0x43f763(0x169),{'params':{'userIDs':[..._0x2df88d]}}))[_0x43f763(0x174)][_0x43f763(0x140)][_0x43f763(0x132)](_0x260e2b=>{const _0x3598f1=_0x43f763;_0x260e2b&&_0x425b3f[_0x3598f1(0x165)](_0x260e2b);});};var K=Object[_0x1b47a9(0x14c)],V=(_0x331caf,_0x4fb274,_0x4949c4,_0x285b94)=>{const _0x1158e8=_0x1b47a9;for(var _0x8e58dc=_0x285b94>0x1?void 0x0:_0x285b94?K(_0x4fb274,_0x4949c4):_0x4fb274,_0x5d1558=_0x331caf[_0x1158e8(0x137)]-0x1,_0x285046;_0x5d1558>=0x0;_0x5d1558--)(_0x285046=_0x331caf[_0x5d1558])&&(_0x8e58dc=_0x285046(_0x8e58dc)||_0x8e58dc);return _0x8e58dc;},p=(_0x4b234c,_0x307f76)=>(_0x24f8b8,_0x4be3c7)=>_0x307f76(_0x24f8b8,_0x4be3c7,_0x4b234c);let S=class extends _0x434d24{constructor(_0x46160f,_0x2384e2,_0x104f20,_0x58c874){const _0x12eee3=_0x1b47a9;super(),this[_0x12eee3(0x167)]=_0x46160f,this[_0x12eee3(0x16e)]=_0x2384e2,this['_userService']=_0x104f20,this[_0x12eee3(0x151)]=_0x58c874,this[_0x12eee3(0x13d)](),this[_0x12eee3(0x18a)]();}[_0x1b47a9(0x18a)](){const _0x645c7d=_0x1b47a9;this[_0x645c7d(0x143)](this[_0x645c7d(0x16e)]['commentUpdate$'][_0x645c7d(0x14f)](_0x4c390f(0x10))[_0x645c7d(0x139)](_0x2d3b68=>{const _0x4fe041=_0x645c7d,_0x53cb17=new Set();_0x2d3b68[_0x4fe041(0x132)](_0x5f57db=>{const _0x27aa12=_0x4fe041;switch(_0x5f57db['type']){case'add':{const _0x5c6029=_0x5f57db['payload'][_0x27aa12(0x12e)];_0x53cb17[_0x27aa12(0x164)](_0x5c6029);break;}}}),B(this[_0x4fe041(0x151)],_0x53cb17);}));}['_init'](){const _0x5eb9af=_0x1b47a9;this[_0x5eb9af(0x143)](this[_0x5eb9af(0x167)][_0x5eb9af(0x15e)]['subscribe'](async _0x2645b9=>{const _0x5e46c5=_0x5eb9af;var _0x35ad58,_0x430761,_0x5d9380,_0xa36b2d;const _0x18888d=(_0x35ad58=this['_threadCommentModel'][_0x5e46c5(0x153)](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xdac173=>_0xdac173[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0x35ad58['root'];if(!_0x18888d)return;const {unitId:_0x53990f,subUnitId:_0x5cf4c3}=_0x18888d;switch(_0x2645b9[_0x5e46c5(0x188)]&&this[_0x5e46c5(0x157)][_0x5e46c5(0x165)](_0x2645b9[_0x5e46c5(0x188)]),_0x2645b9[_0x5e46c5(0x168)]){case v[_0x5e46c5(0x136)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5e46c5(0x171)](_0x53990f,_0x5cf4c3,{'unitId':_0x53990f,'subUnitId':_0x5cf4c3,'ref':'','id':_0x2645b9[_0x5e46c5(0x185)],'dT':D(+_0x2645b9[_0x5e46c5(0x12f)]),'threadId':_0x2645b9[_0x5e46c5(0x13c)],'personId':(_0x5d9380=(_0x430761=_0x2645b9[_0x5e46c5(0x188)])==null?void 0x0:_0x430761[_0x5e46c5(0x14a)])!=null?_0x5d9380:_0x2645b9[_0x5e46c5(0x13b)],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9[_0x5e46c5(0x150)]),'parentId':_0x18888d['id']});break;}case v[_0x5e46c5(0x13a)]:{const _0x1a85bd=this[_0x5e46c5(0x16e)][_0x5e46c5(0x161)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);_0x1a85bd&&_0x1a85bd[_0x5e46c5(0x15f)]&&this[_0x5e46c5(0x16e)][_0x5e46c5(0x145)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);break;}case v['Edit']:{this[_0x5e46c5(0x16e)][_0x5e46c5(0x12c)](_0x53990f,_0x5cf4c3,{'commentId':_0x2645b9['replyId'],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9['content'])});break;}case v['Solve']:{const _0x5991eb=(_0xa36b2d=this[_0x5e46c5(0x16e)]['getUnit'](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xa100fb=>_0xa100fb[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0xa36b2d['root'];_0x5991eb&&this[_0x5e46c5(0x16e)]['resolveComment'](_0x53990f,_0x5cf4c3,_0x5991eb['id'],_0x2645b9[_0x5e46c5(0x181)]===I[_0x5e46c5(0x142)]);break;}}}));}};S=V([p(0x0,_0x113128(_0x3c4083)),p(0x1,_0x113128(_0x656ab3)),p(0x2,_0x113128(_0x571c24)),p(0x3,_0x113128(_0x59dbaa))],S);const z=_0x1b47a9(0x15b),M={};var k=Object[_0x1b47a9(0x14c)],Q=(_0xb999c0,_0x2ee177,_0x5f3de2,_0x588de5)=>{for(var _0x48e4c1=_0x588de5>0x1?void 0x0:_0x588de5?k(_0x2ee177,_0x5f3de2):_0x2ee177,_0xd1d785=_0xb999c0['length']-0x1,_0x483119;_0xd1d785>=0x0;_0xd1d785--)(_0x483119=_0xb999c0[_0xd1d785])&&(_0x48e4c1=_0x483119(_0x48e4c1)||_0x48e4c1);return _0x48e4c1;},_=(_0x52cda2,_0x8d120e)=>(_0x3604f2,_0x49eb53)=>_0x8d120e(_0x3604f2,_0x49eb53,_0x52cda2);function _0x1078(){const _0x21f48d=['length','comment','subscribe','Delete','userId','threadId','_init','ref','/reply','users','saveCommentToSnapshot','Solved','disposeWithMe','getMemberID','deleteComment','16266qGfYTQ','264kTZotR','symbol','Reply','userID','UNRECOGNIZED','getOwnPropertyDescriptor','listComments','values','pipe','content','_injector','error','getUnit','requireSession','reply','3139272lxGjsh','_userService','_sessionService','3166168fNLdNd','code','thread-comment-data-source.config','format','post','commentUpdate$','parentId','/universer-api/comment/unit/','getComment','18YvJMwz','_config','add','addUser','26Ujyzeo','_commentService','type','/universer-api/user/list','rangeId','388256zjzrzm','1014080uqDzpX','onStarting','_threadCommentModel','COMMENT','133uHGCTn','addComment','filter','customRanges','body','/list','rangeType','replies','_threadCommentDataSourceService','40530lKjasH','find','OpenOrReOpen','/delete','resolveComment','map','Solve','get','solved','UNIVER_UNKNOWN','getUser','onReady','replyId','_threadCommentDataSource','unitId','user','pluginName','_initUserSync','parse','defineProperty','/edit','4150035pzosFe','YYYY/MM/DD\x20HH:mm','updateComment','_configService','personId','createTimestamp','resolved','_httpService','forEach','Edit','stringify','comments','Add'];_0x1078=function(){return _0x21f48d;};return _0x1078();}function X(_0x3384a0,_0x1e30ec){const _0x1527a6=_0x1b47a9,_0x25d1ed=_0x3384a0[_0x1527a6(0x177)][0x0];return{..._0x1e30ec,'id':_0x25d1ed[_0x1527a6(0x185)],'resolved':_0x3384a0['solved']===0x1,'dT':D(_0x25d1ed['createTimestamp']),'personId':_0x25d1ed[_0x1527a6(0x13b)],'threadId':_0x25d1ed[_0x1527a6(0x13c)]};}function ee(_0x1d7063,_0x13bfb3,_0x515b2f){const _0x34571b=_0x1b47a9;var _0x532f15,_0xfe0932;if(((_0xfe0932=(_0x532f15=_0x1d7063==null?void 0x0:_0x1d7063[_0x34571b(0x177)])==null?void 0x0:_0x532f15[_0x34571b(0x137)])!=null?_0xfe0932:0x0)>0x0){const _0x46c30b=(_0x578d94,_0x4949b1)=>({'id':_0x578d94[_0x34571b(0x185)],'threadId':_0x578d94[_0x34571b(0x13c)],'dT':D(_0x578d94['createTimestamp']),'personId':_0x578d94[_0x34571b(0x13b)],'resolved':_0x1d7063[_0x34571b(0x181)]===I[_0x34571b(0x142)],'unitId':_0x13bfb3,'subUnitId':_0x515b2f,'text':JSON[_0x34571b(0x18b)](_0x578d94['content']),'parentId':_0x4949b1}),_0x55554b=_0x46c30b(_0x1d7063[_0x34571b(0x177)][0x0]);return{..._0x55554b,'children':_0x1d7063[_0x34571b(0x177)]['slice'](0x1)[_0x34571b(0x17e)](_0x3797ad=>_0x46c30b(_0x3797ad,_0x55554b['id']))};}return null;}let f=class{constructor(_0xd7d389,_0x5170f1,_0xba759f,_0x2f555d){const _0xac69f6=_0x1b47a9;this[_0xac69f6(0x131)]=_0xd7d389,this['_userService']=_0x5170f1,this['_sessionService']=_0xba759f,this[_0xac69f6(0x151)]=_0x2f555d;}async[_0x1b47a9(0x171)](_0x437b36){const _0x492901=_0x1b47a9;var _0x14a6a0,_0x2d42e8;const {parentId:_0x59a8aa,unitId:_0x43e6a2,text:_0x53a797,threadId:_0x200249}=_0x437b36,_0x330226=(_0x2d42e8=(_0x14a6a0=_0x53a797[_0x492901(0x173)])==null?void 0x0:_0x14a6a0[_0x492901(0x172)](_0x4dd281=>_0x4dd281[_0x492901(0x176)]===_0x59c86f[_0x492901(0x16f)])[_0x492901(0x17e)](_0x3c51c3=>_0x3c51c3[_0x492901(0x16a)]))!=null?_0x2d42e8:[],_0x2b7661=JSON[_0x492901(0x134)](_0x53a797),_0x1d9c91=(await this[_0x492901(0x158)]['requireSession'](_0x43e6a2))[_0x492901(0x144)]();if(_0x59a8aa){const _0x206c38={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226,'threadId':_0x200249},_0x2c03f1=(await this[_0x492901(0x131)]['post'](_0x492901(0x160)+_0x43e6a2+_0x492901(0x13f),{'body':_0x206c38}))[_0x492901(0x174)][_0x492901(0x155)];return{..._0x437b36,'id':_0x2c03f1['replyId'],'dT':_0x4bf675(+_0x2c03f1[_0x492901(0x12f)])[_0x492901(0x15c)](_0x492901(0x12b)),'personId':_0x2c03f1[_0x492901(0x13b)]};}else{const _0x3d1b2d={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226},_0xed89b4=await this[_0x492901(0x131)][_0x492901(0x15d)]('/universer-api/comment/unit/'+_0x43e6a2+'/add',{'body':_0x3d1b2d});return X(_0xed89b4[_0x492901(0x174)][_0x492901(0x138)],_0x437b36);}}async[_0x1b47a9(0x12c)](_0xafc3d6){const _0x2f89cc=_0x1b47a9;var _0x394edb,_0x487bfa;const {text:_0x2f57e6,unitId:_0x356a2d}=_0xafc3d6,_0x3d0c33=(_0x487bfa=(_0x394edb=_0x2f57e6[_0x2f89cc(0x173)])==null?void 0x0:_0x394edb[_0x2f89cc(0x172)](_0x4f9172=>_0x4f9172[_0x2f89cc(0x176)]===_0x59c86f[_0x2f89cc(0x16f)])[_0x2f89cc(0x17e)](_0x4751a8=>_0x4751a8['rangeId']))!=null?_0x487bfa:[],_0x527833=JSON[_0x2f89cc(0x134)](_0x2f57e6),_0x8e5aa5=_0xafc3d6[_0x2f89cc(0x13c)],_0x14177e=_0xafc3d6['id'],_0x8ef920={'memberId':(await this[_0x2f89cc(0x158)][_0x2f89cc(0x154)](_0x356a2d))[_0x2f89cc(0x144)](),'unitId':_0x356a2d,'threadId':_0x8e5aa5,'mention':_0x3d0c33,'content':_0x527833,'replyId':_0x14177e},_0x388dc4=await this[_0x2f89cc(0x131)]['post'](_0x2f89cc(0x160)+_0x356a2d+_0x2f89cc(0x129),{'body':_0x8ef920});return!_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)]||_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)][_0x2f89cc(0x15a)]===0x1;}async[_0x1b47a9(0x17d)](_0xe3bac4){const _0x199eb9=_0x1b47a9,{unitId:_0x294724}=_0xe3bac4,_0x2645e3=_0xe3bac4['threadId'],_0x21caae={'memberId':this[_0x199eb9(0x157)]['getCurrentUser']()['userID'],'unitId':_0x294724,'threadId':_0x2645e3,'solved':_0xe3bac4[_0x199eb9(0x130)]?I[_0x199eb9(0x142)]:I[_0x199eb9(0x17b)]},_0xbfbc0=await this[_0x199eb9(0x131)][_0x199eb9(0x15d)](_0x199eb9(0x160)+_0x294724+'/solved',{'body':_0x21caae});return!_0xbfbc0[_0x199eb9(0x174)]['error']||_0xbfbc0[_0x199eb9(0x174)][_0x199eb9(0x152)][_0x199eb9(0x15a)]===0x1;}async['deleteComment'](_0x253e02,_0x45ee23,_0x4195ec,_0x3d1092){const _0x407fdd=_0x1b47a9,_0x24adc9={'memberId':(await this[_0x407fdd(0x158)][_0x407fdd(0x154)](_0x253e02))[_0x407fdd(0x144)](),'threadId':_0x4195ec,'replyId':_0x3d1092,'unitId':_0x253e02},_0x2c57eb=await this[_0x407fdd(0x131)]['post'](_0x407fdd(0x160)+_0x253e02+_0x407fdd(0x17c),{'body':_0x24adc9});return!_0x2c57eb['body']['error']||_0x2c57eb['body'][_0x407fdd(0x152)][_0x407fdd(0x15a)]===0x1;}async[_0x1b47a9(0x14d)](_0x11c094,_0x25eeea,_0x2b5a89){const _0x10647d=_0x1b47a9,_0x397229={'unitId':_0x11c094,'threadId':_0x2b5a89},_0x31ad5f=await this['_httpService']['post'](_0x10647d(0x160)+_0x11c094+_0x10647d(0x175),{'body':_0x397229}),_0xc95385=_0x2b5a89[_0x10647d(0x17e)](_0x4dd222=>ee(_0x31ad5f[_0x10647d(0x174)][_0x10647d(0x135)][_0x4dd222],_0x11c094,_0x25eeea))[_0x10647d(0x172)](Boolean);return Object[_0x10647d(0x14e)](_0x31ad5f['body'][_0x10647d(0x140)])[_0x10647d(0x132)](_0x1ef004=>{const _0x32d1a7=_0x10647d;this['_userService'][_0x32d1a7(0x165)](_0x1ef004);}),_0xc95385;}[_0x1b47a9(0x141)](_0x29293e){const _0x3bd35d=_0x1b47a9;return{'id':_0x29293e['id'],'threadId':_0x29293e['threadId'],'ref':_0x29293e[_0x3bd35d(0x13e)]};}};f=Q([_(0x0,_0x113128(_0x4b42b5)),_(0x1,_0x113128(_0x571c24)),_(0x2,_0x113128(_0x2ae918)),_(0x3,_0x113128(_0x59dbaa))],f);var re=Object[_0x1b47a9(0x14c)],te=(_0x49d31e,_0x2a2084,_0x42b57d,_0x3ea695)=>{const _0x1be6f3=_0x1b47a9;for(var _0x13e953=_0x3ea695>0x1?void 0x0:_0x3ea695?re(_0x2a2084,_0x42b57d):_0x2a2084,_0x45ee68=_0x49d31e[_0x1be6f3(0x137)]-0x1,_0x5b2cc4;_0x45ee68>=0x0;_0x45ee68--)(_0x5b2cc4=_0x49d31e[_0x45ee68])&&(_0x13e953=_0x5b2cc4(_0x13e953)||_0x13e953);return _0x13e953;},N=(_0x4cad79,_0x5b61c3)=>(_0x313213,_0x2dec8f)=>_0x5b61c3(_0x313213,_0x2dec8f,_0x4cad79);let g=class extends _0x434d24{constructor(_0x3ff894,_0x2f0269){const _0x6bfc3d=_0x1b47a9;super(),this[_0x6bfc3d(0x178)]=_0x3ff894,this[_0x6bfc3d(0x186)]=_0x2f0269,this['_initDataSource']();}['_initDataSource'](){const _0x3acc06=_0x1b47a9;this['_threadCommentDataSourceService']['dataSource']=this[_0x3acc06(0x186)],this[_0x3acc06(0x178)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5e6fac),N(0x1,_0x113128(f))],g);function _0x124b(_0x420d37,_0x4a2db5){const _0x107845=_0x1078();return _0x124b=function(_0x124bf7,_0x11fe76){_0x124bf7=_0x124bf7-0x128;let _0x248c88=_0x107845[_0x124bf7];return _0x248c88;},_0x124b(_0x420d37,_0x4a2db5);}var se=Object[_0x1b47a9(0x128)],oe=Object[_0x1b47a9(0x14c)],ne=(_0x421412,_0x15296a,_0x23e0d5)=>_0x15296a in _0x421412?se(_0x421412,_0x15296a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23e0d5}):_0x421412[_0x15296a]=_0x23e0d5,ie=(_0x291359,_0x335706,_0x22d712,_0x50b4e6)=>{const _0x13cf79=_0x1b47a9;for(var _0x2b9f2a=_0x50b4e6>0x1?void 0x0:_0x50b4e6?oe(_0x335706,_0x22d712):_0x335706,_0x1a94be=_0x291359[_0x13cf79(0x137)]-0x1,_0x118a7b;_0x1a94be>=0x0;_0x1a94be--)(_0x118a7b=_0x291359[_0x1a94be])&&(_0x2b9f2a=_0x118a7b(_0x2b9f2a)||_0x2b9f2a);return _0x2b9f2a;},w=(_0x4c3a1d,_0x5fa085)=>(_0x38419c,_0x439a2c)=>_0x5fa085(_0x38419c,_0x439a2c,_0x4c3a1d),$=(_0x4d61aa,_0x5eccb4,_0x727677)=>ne(_0x4d61aa,typeof _0x5eccb4!=_0x1b47a9(0x148)?_0x5eccb4+'':_0x5eccb4,_0x727677);let b=class extends _0x5b100b{constructor(_0x292d01=M,_0x421f76,_0x5698bc){const _0x56cdb9=_0x1b47a9;super(),this[_0x56cdb9(0x163)]=_0x292d01,this[_0x56cdb9(0x151)]=_0x421f76,this[_0x56cdb9(0x12d)]=_0x5698bc;const {..._0x1ce176}=_0x4ebc5a({},M,this[_0x56cdb9(0x163)]);this[_0x56cdb9(0x12d)]['setConfig'](z,_0x1ce176);}[_0x1b47a9(0x16d)](){const _0x442a09=_0x1b47a9;[[f],[g],[S]][_0x442a09(0x132)](_0x3f89f3=>{const _0x3b4375=_0x442a09;this[_0x3b4375(0x151)][_0x3b4375(0x164)](_0x3f89f3);});}[_0x1b47a9(0x184)](){const _0x24dae9=_0x1b47a9;this[_0x24dae9(0x151)][_0x24dae9(0x180)](g),this[_0x24dae9(0x151)][_0x24dae9(0x180)](S);}};$(b,_0x1b47a9(0x189),W),$(b,_0x1b47a9(0x168),_0x1ce2d1[_0x1b47a9(0x182)]),b=ie([_0x8a9abb(_0x18e6d7,_0x3a519b,_0x4ef8f5),w(0x1,_0x113128(_0x59dbaa)),w(0x2,_0x575a65)],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
+ const _0x1b47a9=_0x124b;(function(_0x1408a1,_0x2c6ce2){const _0x3d0917=_0x124b,_0x165aa9=_0x1408a1();while(!![]){try{const _0x4d02f0=parseInt(_0x3d0917(0x16b))/0x1+-parseInt(_0x3d0917(0x166))/0x2*(-parseInt(_0x3d0917(0x179))/0x3)+parseInt(_0x3d0917(0x156))/0x4+parseInt(_0x3d0917(0x12a))/0x5+-parseInt(_0x3d0917(0x146))/0x6*(parseInt(_0x3d0917(0x170))/0x7)+-parseInt(_0x3d0917(0x159))/0x8*(-parseInt(_0x3d0917(0x162))/0x9)+parseInt(_0x3d0917(0x16c))/0xa*(-parseInt(_0x3d0917(0x147))/0xb);if(_0x4d02f0===_0x2c6ce2)break;else _0x165aa9['push'](_0x165aa9['shift']());}catch(_0xfe2161){_0x165aa9['push'](_0x165aa9['shift']());}}}(_0x1078,0x76658));import{CommentService as _0x3c4083,CollaborationSessionService as _0x2ae918,UniverCollaborationClientPlugin as _0x3a519b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ef8f5}from'@univerjs-pro/license';import{dayjs as _0x4bf675,UserManagerService as _0x571c24,Inject as _0x113128,Injector as _0x59dbaa,Disposable as _0x434d24,CustomRangeType as _0x59c86f,UniverInstanceType as _0x1ce2d1,DependentOn as _0x8a9abb,IConfigService as _0x575a65,Plugin as _0x5b100b,merge as _0x4ebc5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x18e6d7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x656ab3,IThreadCommentDataSourceService as _0x5e6fac}from'@univerjs/thread-comment';import{bufferTime as _0x4c390f}from'rxjs';import{HTTPService as _0x4b42b5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17bfe8=>(_0x17bfe8[_0x17bfe8[_0x1b47a9(0x17b)]=0x0]=_0x1b47a9(0x17b),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x142)]=0x1]=_0x1b47a9(0x142),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x17bfe8))(I||{}),v=(_0x5d2623=>(_0x5d2623[_0x5d2623['Unknown']=0x0]='Unknown',_0x5d2623[_0x5d2623[_0x1b47a9(0x136)]=0x1]='Add',_0x5d2623[_0x5d2623[_0x1b47a9(0x149)]=0x2]=_0x1b47a9(0x149),_0x5d2623[_0x5d2623[_0x1b47a9(0x133)]=0x3]=_0x1b47a9(0x133),_0x5d2623[_0x5d2623[_0x1b47a9(0x13a)]=0x4]=_0x1b47a9(0x13a),_0x5d2623[_0x5d2623['Solve']=0x5]=_0x1b47a9(0x17f),_0x5d2623[_0x5d2623[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x5d2623))(v||{});const D=_0x24b4b9=>_0x4bf675(new Date(+_0x24b4b9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x41edec,_0x2df88d)=>{const _0x43f763=_0x1b47a9,_0x425b3f=_0x41edec[_0x43f763(0x180)](_0x571c24),_0x4351ff=_0x41edec[_0x43f763(0x180)](_0x4b42b5);_0x2df88d[_0x43f763(0x132)](_0x50b0e2=>{const _0x2a286b=_0x43f763;_0x425b3f[_0x2a286b(0x183)](_0x50b0e2)&&_0x2df88d['delete'](_0x50b0e2);}),_0x2df88d['size']&&(await _0x4351ff['get'](_0x43f763(0x169),{'params':{'userIDs':[..._0x2df88d]}}))[_0x43f763(0x174)][_0x43f763(0x140)][_0x43f763(0x132)](_0x260e2b=>{const _0x3598f1=_0x43f763;_0x260e2b&&_0x425b3f[_0x3598f1(0x165)](_0x260e2b);});};var K=Object[_0x1b47a9(0x14c)],V=(_0x331caf,_0x4fb274,_0x4949c4,_0x285b94)=>{const _0x1158e8=_0x1b47a9;for(var _0x8e58dc=_0x285b94>0x1?void 0x0:_0x285b94?K(_0x4fb274,_0x4949c4):_0x4fb274,_0x5d1558=_0x331caf[_0x1158e8(0x137)]-0x1,_0x285046;_0x5d1558>=0x0;_0x5d1558--)(_0x285046=_0x331caf[_0x5d1558])&&(_0x8e58dc=_0x285046(_0x8e58dc)||_0x8e58dc);return _0x8e58dc;},p=(_0x4b234c,_0x307f76)=>(_0x24f8b8,_0x4be3c7)=>_0x307f76(_0x24f8b8,_0x4be3c7,_0x4b234c);let S=class extends _0x434d24{constructor(_0x46160f,_0x2384e2,_0x104f20,_0x58c874){const _0x12eee3=_0x1b47a9;super(),this[_0x12eee3(0x167)]=_0x46160f,this[_0x12eee3(0x16e)]=_0x2384e2,this['_userService']=_0x104f20,this[_0x12eee3(0x151)]=_0x58c874,this[_0x12eee3(0x13d)](),this[_0x12eee3(0x18a)]();}[_0x1b47a9(0x18a)](){const _0x645c7d=_0x1b47a9;this[_0x645c7d(0x143)](this[_0x645c7d(0x16e)]['commentUpdate$'][_0x645c7d(0x14f)](_0x4c390f(0x10))[_0x645c7d(0x139)](_0x2d3b68=>{const _0x4fe041=_0x645c7d,_0x53cb17=new Set();_0x2d3b68[_0x4fe041(0x132)](_0x5f57db=>{const _0x27aa12=_0x4fe041;switch(_0x5f57db['type']){case'add':{const _0x5c6029=_0x5f57db['payload'][_0x27aa12(0x12e)];_0x53cb17[_0x27aa12(0x164)](_0x5c6029);break;}}}),B(this[_0x4fe041(0x151)],_0x53cb17);}));}['_init'](){const _0x5eb9af=_0x1b47a9;this[_0x5eb9af(0x143)](this[_0x5eb9af(0x167)][_0x5eb9af(0x15e)]['subscribe'](async _0x2645b9=>{const _0x5e46c5=_0x5eb9af;var _0x35ad58,_0x430761,_0x5d9380,_0xa36b2d;const _0x18888d=(_0x35ad58=this['_threadCommentModel'][_0x5e46c5(0x153)](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xdac173=>_0xdac173[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0x35ad58['root'];if(!_0x18888d)return;const {unitId:_0x53990f,subUnitId:_0x5cf4c3}=_0x18888d;switch(_0x2645b9[_0x5e46c5(0x188)]&&this[_0x5e46c5(0x157)][_0x5e46c5(0x165)](_0x2645b9[_0x5e46c5(0x188)]),_0x2645b9[_0x5e46c5(0x168)]){case v[_0x5e46c5(0x136)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5e46c5(0x171)](_0x53990f,_0x5cf4c3,{'unitId':_0x53990f,'subUnitId':_0x5cf4c3,'ref':'','id':_0x2645b9[_0x5e46c5(0x185)],'dT':D(+_0x2645b9[_0x5e46c5(0x12f)]),'threadId':_0x2645b9[_0x5e46c5(0x13c)],'personId':(_0x5d9380=(_0x430761=_0x2645b9[_0x5e46c5(0x188)])==null?void 0x0:_0x430761[_0x5e46c5(0x14a)])!=null?_0x5d9380:_0x2645b9[_0x5e46c5(0x13b)],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9[_0x5e46c5(0x150)]),'parentId':_0x18888d['id']});break;}case v[_0x5e46c5(0x13a)]:{const _0x1a85bd=this[_0x5e46c5(0x16e)][_0x5e46c5(0x161)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);_0x1a85bd&&_0x1a85bd[_0x5e46c5(0x15f)]&&this[_0x5e46c5(0x16e)][_0x5e46c5(0x145)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);break;}case v['Edit']:{this[_0x5e46c5(0x16e)][_0x5e46c5(0x12c)](_0x53990f,_0x5cf4c3,{'commentId':_0x2645b9['replyId'],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9['content'])});break;}case v['Solve']:{const _0x5991eb=(_0xa36b2d=this[_0x5e46c5(0x16e)]['getUnit'](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xa100fb=>_0xa100fb[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0xa36b2d['root'];_0x5991eb&&this[_0x5e46c5(0x16e)]['resolveComment'](_0x53990f,_0x5cf4c3,_0x5991eb['id'],_0x2645b9[_0x5e46c5(0x181)]===I[_0x5e46c5(0x142)]);break;}}}));}};S=V([p(0x0,_0x113128(_0x3c4083)),p(0x1,_0x113128(_0x656ab3)),p(0x2,_0x113128(_0x571c24)),p(0x3,_0x113128(_0x59dbaa))],S);const z=_0x1b47a9(0x15b),M={};var k=Object[_0x1b47a9(0x14c)],Q=(_0xb999c0,_0x2ee177,_0x5f3de2,_0x588de5)=>{for(var _0x48e4c1=_0x588de5>0x1?void 0x0:_0x588de5?k(_0x2ee177,_0x5f3de2):_0x2ee177,_0xd1d785=_0xb999c0['length']-0x1,_0x483119;_0xd1d785>=0x0;_0xd1d785--)(_0x483119=_0xb999c0[_0xd1d785])&&(_0x48e4c1=_0x483119(_0x48e4c1)||_0x48e4c1);return _0x48e4c1;},_=(_0x52cda2,_0x8d120e)=>(_0x3604f2,_0x49eb53)=>_0x8d120e(_0x3604f2,_0x49eb53,_0x52cda2);function _0x1078(){const _0x21f48d=['length','comment','subscribe','Delete','userId','threadId','_init','ref','/reply','users','saveCommentToSnapshot','Solved','disposeWithMe','getMemberID','deleteComment','16266qGfYTQ','264kTZotR','symbol','Reply','userID','UNRECOGNIZED','getOwnPropertyDescriptor','listComments','values','pipe','content','_injector','error','getUnit','requireSession','reply','3139272lxGjsh','_userService','_sessionService','3166168fNLdNd','code','thread-comment-data-source.config','format','post','commentUpdate$','parentId','/universer-api/comment/unit/','getComment','18YvJMwz','_config','add','addUser','26Ujyzeo','_commentService','type','/universer-api/user/list','rangeId','388256zjzrzm','1014080uqDzpX','onStarting','_threadCommentModel','COMMENT','133uHGCTn','addComment','filter','customRanges','body','/list','rangeType','replies','_threadCommentDataSourceService','40530lKjasH','find','OpenOrReOpen','/delete','resolveComment','map','Solve','get','solved','UNIVER_UNKNOWN','getUser','onReady','replyId','_threadCommentDataSource','unitId','user','pluginName','_initUserSync','parse','defineProperty','/edit','4150035pzosFe','YYYY/MM/DD\x20HH:mm','updateComment','_configService','personId','createTimestamp','resolved','_httpService','forEach','Edit','stringify','comments','Add'];_0x1078=function(){return _0x21f48d;};return _0x1078();}function X(_0x3384a0,_0x1e30ec){const _0x1527a6=_0x1b47a9,_0x25d1ed=_0x3384a0[_0x1527a6(0x177)][0x0];return{..._0x1e30ec,'id':_0x25d1ed[_0x1527a6(0x185)],'resolved':_0x3384a0['solved']===0x1,'dT':D(_0x25d1ed['createTimestamp']),'personId':_0x25d1ed[_0x1527a6(0x13b)],'threadId':_0x25d1ed[_0x1527a6(0x13c)]};}function ee(_0x1d7063,_0x13bfb3,_0x515b2f){const _0x34571b=_0x1b47a9;var _0x532f15,_0xfe0932;if(((_0xfe0932=(_0x532f15=_0x1d7063==null?void 0x0:_0x1d7063[_0x34571b(0x177)])==null?void 0x0:_0x532f15[_0x34571b(0x137)])!=null?_0xfe0932:0x0)>0x0){const _0x46c30b=(_0x578d94,_0x4949b1)=>({'id':_0x578d94[_0x34571b(0x185)],'threadId':_0x578d94[_0x34571b(0x13c)],'dT':D(_0x578d94['createTimestamp']),'personId':_0x578d94[_0x34571b(0x13b)],'resolved':_0x1d7063[_0x34571b(0x181)]===I[_0x34571b(0x142)],'unitId':_0x13bfb3,'subUnitId':_0x515b2f,'text':JSON[_0x34571b(0x18b)](_0x578d94['content']),'parentId':_0x4949b1}),_0x55554b=_0x46c30b(_0x1d7063[_0x34571b(0x177)][0x0]);return{..._0x55554b,'children':_0x1d7063[_0x34571b(0x177)]['slice'](0x1)[_0x34571b(0x17e)](_0x3797ad=>_0x46c30b(_0x3797ad,_0x55554b['id']))};}return null;}let f=class{constructor(_0xd7d389,_0x5170f1,_0xba759f,_0x2f555d){const _0xac69f6=_0x1b47a9;this[_0xac69f6(0x131)]=_0xd7d389,this['_userService']=_0x5170f1,this['_sessionService']=_0xba759f,this[_0xac69f6(0x151)]=_0x2f555d;}async[_0x1b47a9(0x171)](_0x437b36){const _0x492901=_0x1b47a9;var _0x14a6a0,_0x2d42e8;const {parentId:_0x59a8aa,unitId:_0x43e6a2,text:_0x53a797,threadId:_0x200249}=_0x437b36,_0x330226=(_0x2d42e8=(_0x14a6a0=_0x53a797[_0x492901(0x173)])==null?void 0x0:_0x14a6a0[_0x492901(0x172)](_0x4dd281=>_0x4dd281[_0x492901(0x176)]===_0x59c86f[_0x492901(0x16f)])[_0x492901(0x17e)](_0x3c51c3=>_0x3c51c3[_0x492901(0x16a)]))!=null?_0x2d42e8:[],_0x2b7661=JSON[_0x492901(0x134)](_0x53a797),_0x1d9c91=(await this[_0x492901(0x158)]['requireSession'](_0x43e6a2))[_0x492901(0x144)]();if(_0x59a8aa){const _0x206c38={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226,'threadId':_0x200249},_0x2c03f1=(await this[_0x492901(0x131)]['post'](_0x492901(0x160)+_0x43e6a2+_0x492901(0x13f),{'body':_0x206c38}))[_0x492901(0x174)][_0x492901(0x155)];return{..._0x437b36,'id':_0x2c03f1['replyId'],'dT':_0x4bf675(+_0x2c03f1[_0x492901(0x12f)])[_0x492901(0x15c)](_0x492901(0x12b)),'personId':_0x2c03f1[_0x492901(0x13b)]};}else{const _0x3d1b2d={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226},_0xed89b4=await this[_0x492901(0x131)][_0x492901(0x15d)]('/universer-api/comment/unit/'+_0x43e6a2+'/add',{'body':_0x3d1b2d});return X(_0xed89b4[_0x492901(0x174)][_0x492901(0x138)],_0x437b36);}}async[_0x1b47a9(0x12c)](_0xafc3d6){const _0x2f89cc=_0x1b47a9;var _0x394edb,_0x487bfa;const {text:_0x2f57e6,unitId:_0x356a2d}=_0xafc3d6,_0x3d0c33=(_0x487bfa=(_0x394edb=_0x2f57e6[_0x2f89cc(0x173)])==null?void 0x0:_0x394edb[_0x2f89cc(0x172)](_0x4f9172=>_0x4f9172[_0x2f89cc(0x176)]===_0x59c86f[_0x2f89cc(0x16f)])[_0x2f89cc(0x17e)](_0x4751a8=>_0x4751a8['rangeId']))!=null?_0x487bfa:[],_0x527833=JSON[_0x2f89cc(0x134)](_0x2f57e6),_0x8e5aa5=_0xafc3d6[_0x2f89cc(0x13c)],_0x14177e=_0xafc3d6['id'],_0x8ef920={'memberId':(await this[_0x2f89cc(0x158)][_0x2f89cc(0x154)](_0x356a2d))[_0x2f89cc(0x144)](),'unitId':_0x356a2d,'threadId':_0x8e5aa5,'mention':_0x3d0c33,'content':_0x527833,'replyId':_0x14177e},_0x388dc4=await this[_0x2f89cc(0x131)]['post'](_0x2f89cc(0x160)+_0x356a2d+_0x2f89cc(0x129),{'body':_0x8ef920});return!_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)]||_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)][_0x2f89cc(0x15a)]===0x1;}async[_0x1b47a9(0x17d)](_0xe3bac4){const _0x199eb9=_0x1b47a9,{unitId:_0x294724}=_0xe3bac4,_0x2645e3=_0xe3bac4['threadId'],_0x21caae={'memberId':this[_0x199eb9(0x157)]['getCurrentUser']()['userID'],'unitId':_0x294724,'threadId':_0x2645e3,'solved':_0xe3bac4[_0x199eb9(0x130)]?I[_0x199eb9(0x142)]:I[_0x199eb9(0x17b)]},_0xbfbc0=await this[_0x199eb9(0x131)][_0x199eb9(0x15d)](_0x199eb9(0x160)+_0x294724+'/solved',{'body':_0x21caae});return!_0xbfbc0[_0x199eb9(0x174)]['error']||_0xbfbc0[_0x199eb9(0x174)][_0x199eb9(0x152)][_0x199eb9(0x15a)]===0x1;}async['deleteComment'](_0x253e02,_0x45ee23,_0x4195ec,_0x3d1092){const _0x407fdd=_0x1b47a9,_0x24adc9={'memberId':(await this[_0x407fdd(0x158)][_0x407fdd(0x154)](_0x253e02))[_0x407fdd(0x144)](),'threadId':_0x4195ec,'replyId':_0x3d1092,'unitId':_0x253e02},_0x2c57eb=await this[_0x407fdd(0x131)]['post'](_0x407fdd(0x160)+_0x253e02+_0x407fdd(0x17c),{'body':_0x24adc9});return!_0x2c57eb['body']['error']||_0x2c57eb['body'][_0x407fdd(0x152)][_0x407fdd(0x15a)]===0x1;}async[_0x1b47a9(0x14d)](_0x11c094,_0x25eeea,_0x2b5a89){const _0x10647d=_0x1b47a9,_0x397229={'unitId':_0x11c094,'threadId':_0x2b5a89},_0x31ad5f=await this['_httpService']['post'](_0x10647d(0x160)+_0x11c094+_0x10647d(0x175),{'body':_0x397229}),_0xc95385=_0x2b5a89[_0x10647d(0x17e)](_0x4dd222=>ee(_0x31ad5f[_0x10647d(0x174)][_0x10647d(0x135)][_0x4dd222],_0x11c094,_0x25eeea))[_0x10647d(0x172)](Boolean);return Object[_0x10647d(0x14e)](_0x31ad5f['body'][_0x10647d(0x140)])[_0x10647d(0x132)](_0x1ef004=>{const _0x32d1a7=_0x10647d;this['_userService'][_0x32d1a7(0x165)](_0x1ef004);}),_0xc95385;}[_0x1b47a9(0x141)](_0x29293e){const _0x3bd35d=_0x1b47a9;return{'id':_0x29293e['id'],'threadId':_0x29293e['threadId'],'ref':_0x29293e[_0x3bd35d(0x13e)]};}};f=Q([_(0x0,_0x113128(_0x4b42b5)),_(0x1,_0x113128(_0x571c24)),_(0x2,_0x113128(_0x2ae918)),_(0x3,_0x113128(_0x59dbaa))],f);var re=Object[_0x1b47a9(0x14c)],te=(_0x49d31e,_0x2a2084,_0x42b57d,_0x3ea695)=>{const _0x1be6f3=_0x1b47a9;for(var _0x13e953=_0x3ea695>0x1?void 0x0:_0x3ea695?re(_0x2a2084,_0x42b57d):_0x2a2084,_0x45ee68=_0x49d31e[_0x1be6f3(0x137)]-0x1,_0x5b2cc4;_0x45ee68>=0x0;_0x45ee68--)(_0x5b2cc4=_0x49d31e[_0x45ee68])&&(_0x13e953=_0x5b2cc4(_0x13e953)||_0x13e953);return _0x13e953;},N=(_0x4cad79,_0x5b61c3)=>(_0x313213,_0x2dec8f)=>_0x5b61c3(_0x313213,_0x2dec8f,_0x4cad79);let g=class extends _0x434d24{constructor(_0x3ff894,_0x2f0269){const _0x6bfc3d=_0x1b47a9;super(),this[_0x6bfc3d(0x178)]=_0x3ff894,this[_0x6bfc3d(0x186)]=_0x2f0269,this['_initDataSource']();}['_initDataSource'](){const _0x3acc06=_0x1b47a9;this['_threadCommentDataSourceService']['dataSource']=this[_0x3acc06(0x186)],this[_0x3acc06(0x178)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5e6fac),N(0x1,_0x113128(f))],g);function _0x124b(_0x420d37,_0x4a2db5){const _0x107845=_0x1078();return _0x124b=function(_0x124bf7,_0x11fe76){_0x124bf7=_0x124bf7-0x128;let _0x248c88=_0x107845[_0x124bf7];return _0x248c88;},_0x124b(_0x420d37,_0x4a2db5);}var se=Object[_0x1b47a9(0x128)],oe=Object[_0x1b47a9(0x14c)],ne=(_0x421412,_0x15296a,_0x23e0d5)=>_0x15296a in _0x421412?se(_0x421412,_0x15296a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23e0d5}):_0x421412[_0x15296a]=_0x23e0d5,ie=(_0x291359,_0x335706,_0x22d712,_0x50b4e6)=>{const _0x13cf79=_0x1b47a9;for(var _0x2b9f2a=_0x50b4e6>0x1?void 0x0:_0x50b4e6?oe(_0x335706,_0x22d712):_0x335706,_0x1a94be=_0x291359[_0x13cf79(0x137)]-0x1,_0x118a7b;_0x1a94be>=0x0;_0x1a94be--)(_0x118a7b=_0x291359[_0x1a94be])&&(_0x2b9f2a=_0x118a7b(_0x2b9f2a)||_0x2b9f2a);return _0x2b9f2a;},w=(_0x4c3a1d,_0x5fa085)=>(_0x38419c,_0x439a2c)=>_0x5fa085(_0x38419c,_0x439a2c,_0x4c3a1d),$=(_0x4d61aa,_0x5eccb4,_0x727677)=>ne(_0x4d61aa,typeof _0x5eccb4!=_0x1b47a9(0x148)?_0x5eccb4+'':_0x5eccb4,_0x727677);let b=class extends _0x5b100b{constructor(_0x292d01=M,_0x421f76,_0x5698bc){const _0x56cdb9=_0x1b47a9;super(),this[_0x56cdb9(0x163)]=_0x292d01,this[_0x56cdb9(0x151)]=_0x421f76,this[_0x56cdb9(0x12d)]=_0x5698bc;const {..._0x1ce176}=_0x4ebc5a({},M,this[_0x56cdb9(0x163)]);this[_0x56cdb9(0x12d)]['setConfig'](z,_0x1ce176);}[_0x1b47a9(0x16d)](){const _0x442a09=_0x1b47a9;[[f],[g],[S]][_0x442a09(0x132)](_0x3f89f3=>{const _0x3b4375=_0x442a09;this[_0x3b4375(0x151)][_0x3b4375(0x164)](_0x3f89f3);});}[_0x1b47a9(0x184)](){const _0x24dae9=_0x1b47a9;this[_0x24dae9(0x151)][_0x24dae9(0x180)](g),this[_0x24dae9(0x151)][_0x24dae9(0x180)](S);}};$(b,_0x1b47a9(0x189),W),$(b,_0x1b47a9(0x168),_0x1ce2d1[_0x1b47a9(0x182)]),b=ie([_0x8a9abb(_0x18e6d7,_0x3a519b,_0x4ef8f5),w(0x1,_0x113128(_0x59dbaa)),w(0x2,_0x575a65)],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(_0x48388f,_0x4f3d0c){const _0x5ae752=_0x1bc3,_0x511721=_0x48388f();while(!![]){try{const _0x3974e4=parseInt(_0x5ae752(0x18c))/0x1*(parseInt(_0x5ae752(0x19a))/0x2)+-parseInt(_0x5ae752(0x1e8))/0x3+-parseInt(_0x5ae752(0x1e6))/0x4+-parseInt(_0x5ae752(0x175))/0x5+parseInt(_0x5ae752(0x1a2))/0x6+parseInt(_0x5ae752(0x1c6))/0x7+-parseInt(_0x5ae752(0x193))/0x8*(-parseInt(_0x5ae752(0x1b3))/0x9);if(_0x3974e4===_0x4f3d0c)break;else _0x511721['push'](_0x511721['shift']());}catch(_0x455c26){_0x511721['push'](_0x511721['shift']());}}}(_0x3990,0x46a64),function(_0x1f7b8e,_0x3557a3){const _0x531889=_0x1bc3;typeof exports==_0x531889(0x184)&&typeof module<'u'?_0x3557a3(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==_0x531889(0x196)&&define[_0x531889(0x1b1)]?define(['exports',_0x531889(0x1d5),_0x531889(0x1bf),'@univerjs/core',_0x531889(0x1d6),'@univerjs/thread-comment',_0x531889(0x194),_0x531889(0x1de)],_0x3557a3):(_0x1f7b8e=typeof globalThis<'u'?globalThis:_0x1f7b8e||self,_0x3557a3(_0x1f7b8e[_0x531889(0x1f4)]={},_0x1f7b8e[_0x531889(0x1a0)],_0x1f7b8e['UniverProLicense'],_0x1f7b8e[_0x531889(0x1c0)],_0x1f7b8e[_0x531889(0x1ac)],_0x1f7b8e[_0x531889(0x1cb)],_0x1f7b8e[_0x531889(0x194)],_0x1f7b8e['UniverNetwork']));}(this,function(_0x5742a6,_0x2a4d49,_0x46234c,_0x42b4da,_0x22a6ec,_0x2f850a,_0x282e99,_0x2bc6d0){'use strict';const _0x122b3b=_0x1bc3;const _0xafa4fc=_0x122b3b(0x176);var _0x57db8b=(_0x44f346=>(_0x44f346[_0x44f346[_0x122b3b(0x182)]=0x0]=_0x122b3b(0x182),_0x44f346[_0x44f346[_0x122b3b(0x1ae)]=0x1]=_0x122b3b(0x1ae),_0x44f346[_0x44f346[_0x122b3b(0x1ec)]=-0x1]='UNRECOGNIZED',_0x44f346))(_0x57db8b||{}),_0x46ba33=(_0x1f9a5b=>(_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x180)]=0x0]=_0x122b3b(0x180),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x17a)]=0x1]=_0x122b3b(0x17a),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x170)]=0x2]=_0x122b3b(0x170),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x1d2)]=0x3]='Edit',_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x18b)]=0x4]=_0x122b3b(0x18b),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x1bd)]=0x5]=_0x122b3b(0x1bd),_0x1f9a5b[_0x1f9a5b['UNRECOGNIZED']=-0x1]=_0x122b3b(0x1ec),_0x1f9a5b))(_0x46ba33||{});const _0x34f9fe=_0x2eb2c5=>_0x42b4da[_0x122b3b(0x1f0)](new Date(+_0x2eb2c5))[_0x122b3b(0x173)](_0x122b3b(0x16f)),_0x1cf215=async(_0x4466be,_0x5ae8db)=>{const _0x559242=_0x122b3b,_0x4153ee=_0x4466be[_0x559242(0x1d0)](_0x42b4da['UserManagerService']),_0xacdfb9=_0x4466be[_0x559242(0x1d0)](_0x2bc6d0['HTTPService']);_0x5ae8db[_0x559242(0x1b0)](_0xbb231b=>{const _0x53629a=_0x559242;_0x4153ee[_0x53629a(0x198)](_0xbb231b)&&_0x5ae8db[_0x53629a(0x1a5)](_0xbb231b);}),_0x5ae8db[_0x559242(0x1bb)]&&(await _0xacdfb9[_0x559242(0x1d0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5ae8db]}}))[_0x559242(0x1b2)]['users'][_0x559242(0x1b0)](_0x542166=>{const _0x338b36=_0x559242;_0x542166&&_0x4153ee[_0x338b36(0x1d4)](_0x542166);});};var _0x47ab2f=Object[_0x122b3b(0x183)],_0x4d4340=(_0x1b8664,_0x2ffc17,_0x246eec,_0x27e73f)=>{const _0x35e67f=_0x122b3b;for(var _0x329962=_0x27e73f>0x1?void 0x0:_0x27e73f?_0x47ab2f(_0x2ffc17,_0x246eec):_0x2ffc17,_0x3729ef=_0x1b8664[_0x35e67f(0x1d8)]-0x1,_0x161966;_0x3729ef>=0x0;_0x3729ef--)(_0x161966=_0x1b8664[_0x3729ef])&&(_0x329962=_0x161966(_0x329962)||_0x329962);return _0x329962;},_0x400e87=(_0x269321,_0x415ed7)=>(_0xa38473,_0x5b645b)=>_0x415ed7(_0xa38473,_0x5b645b,_0x269321);let _0xdbacdc=class extends _0x42b4da['Disposable']{constructor(_0x1e91d4,_0x26e949,_0x7baf7,_0x10e369){const _0x50e4cc=_0x122b3b;super(),this[_0x50e4cc(0x1da)]=_0x1e91d4,this[_0x50e4cc(0x1c1)]=_0x26e949,this[_0x50e4cc(0x18a)]=_0x7baf7,this[_0x50e4cc(0x1d9)]=_0x10e369,this[_0x50e4cc(0x1b9)](),this[_0x50e4cc(0x1ee)]();}['_initUserSync'](){const _0x5db026=_0x122b3b;this[_0x5db026(0x1af)](this[_0x5db026(0x1c1)][_0x5db026(0x18f)][_0x5db026(0x1c9)](_0x282e99[_0x5db026(0x17f)](0x10))['subscribe'](_0x39de58=>{const _0x28707c=_0x5db026,_0x44abf7=new Set();_0x39de58[_0x28707c(0x1b0)](_0x554c61=>{const _0x52ebd2=_0x28707c;switch(_0x554c61[_0x52ebd2(0x19d)]){case'add':{const _0x23cfc6=_0x554c61[_0x52ebd2(0x1e7)][_0x52ebd2(0x1ba)];_0x44abf7[_0x52ebd2(0x179)](_0x23cfc6);break;}}}),_0x1cf215(this[_0x28707c(0x1d9)],_0x44abf7);}));}['_init'](){const _0x5c959e=_0x122b3b;this[_0x5c959e(0x1af)](this[_0x5c959e(0x1da)][_0x5c959e(0x18f)][_0x5c959e(0x1c3)](async _0x3b0bf8=>{const _0x30364c=_0x5c959e;var _0x3ac4c6,_0x562951,_0x171449,_0x39187c;const _0x55aa5f=(_0x3ac4c6=this['_threadCommentModel'][_0x30364c(0x1eb)](_0x3b0bf8['unitId'])[_0x30364c(0x1c4)](_0x18d7c3=>_0x18d7c3[_0x30364c(0x17d)]===_0x3b0bf8['threadId']))==null?void 0x0:_0x3ac4c6['root'];if(!_0x55aa5f)return;const {unitId:_0x2b6fb2,subUnitId:_0x343696}=_0x55aa5f;switch(_0x3b0bf8['user']&&this[_0x30364c(0x18a)][_0x30364c(0x1d4)](_0x3b0bf8['user']),_0x3b0bf8[_0x30364c(0x19d)]){case _0x46ba33[_0x30364c(0x17a)]:break;case _0x46ba33['Reply']:{this[_0x30364c(0x1c1)][_0x30364c(0x1ef)](_0x2b6fb2,_0x343696,{'unitId':_0x2b6fb2,'subUnitId':_0x343696,'ref':'','id':_0x3b0bf8[_0x30364c(0x1ad)],'dT':_0x34f9fe(+_0x3b0bf8[_0x30364c(0x1e1)]),'threadId':_0x3b0bf8['threadId'],'personId':(_0x171449=(_0x562951=_0x3b0bf8[_0x30364c(0x1d7)])==null?void 0x0:_0x562951[_0x30364c(0x177)])!=null?_0x171449:_0x3b0bf8[_0x30364c(0x1e0)],'text':JSON[_0x30364c(0x1d3)](_0x3b0bf8[_0x30364c(0x1b7)]),'parentId':_0x55aa5f['id']});break;}case _0x46ba33[_0x30364c(0x18b)]:{const _0x340d4e=this[_0x30364c(0x1c1)][_0x30364c(0x1e9)](_0x2b6fb2,_0x343696,_0x3b0bf8[_0x30364c(0x1ad)]);_0x340d4e&&_0x340d4e[_0x30364c(0x186)]&&this[_0x30364c(0x1c1)]['deleteComment'](_0x2b6fb2,_0x343696,_0x3b0bf8[_0x30364c(0x1ad)]);break;}case _0x46ba33['Edit']:{this['_threadCommentModel'][_0x30364c(0x181)](_0x2b6fb2,_0x343696,{'commentId':_0x3b0bf8[_0x30364c(0x1ad)],'text':JSON[_0x30364c(0x1d3)](_0x3b0bf8['content'])});break;}case _0x46ba33[_0x30364c(0x1bd)]:{const _0x4bf5e4=(_0x39187c=this['_threadCommentModel']['getUnit'](_0x3b0bf8[_0x30364c(0x1e2)])['find'](_0x2cf4b2=>_0x2cf4b2[_0x30364c(0x17d)]===_0x3b0bf8[_0x30364c(0x17d)]))==null?void 0x0:_0x39187c[_0x30364c(0x187)];_0x4bf5e4&&this[_0x30364c(0x1c1)][_0x30364c(0x191)](_0x2b6fb2,_0x343696,_0x4bf5e4['id'],_0x3b0bf8[_0x30364c(0x178)]===_0x57db8b[_0x30364c(0x1ae)]);break;}}}));}};_0xdbacdc=_0x4d4340([_0x400e87(0x0,_0x42b4da[_0x122b3b(0x1b5)](_0x2a4d49[_0x122b3b(0x18d)])),_0x400e87(0x1,_0x42b4da['Inject'](_0x2f850a[_0x122b3b(0x17b)])),_0x400e87(0x2,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1a3)])),_0x400e87(0x3,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1f1)]))],_0xdbacdc);const _0x5ec5d5='thread-comment-data-source.config',_0x9982d4={};var _0x9ebb9c=Object[_0x122b3b(0x183)],_0x22df30=(_0xa93d51,_0x20a638,_0x56d5de,_0x2a9543)=>{const _0x3609a9=_0x122b3b;for(var _0x3c0297=_0x2a9543>0x1?void 0x0:_0x2a9543?_0x9ebb9c(_0x20a638,_0x56d5de):_0x20a638,_0x3820aa=_0xa93d51[_0x3609a9(0x1d8)]-0x1,_0x48f868;_0x3820aa>=0x0;_0x3820aa--)(_0x48f868=_0xa93d51[_0x3820aa])&&(_0x3c0297=_0x48f868(_0x3c0297)||_0x3c0297);return _0x3c0297;},_0x10ea5c=(_0x12fa5a,_0x18a2de)=>(_0x37d452,_0x451165)=>_0x18a2de(_0x37d452,_0x451165,_0x12fa5a);function _0x2b078e(_0x352814,_0x22b4de){const _0x18c8eb=_0x122b3b,_0x25ec76=_0x352814['replies'][0x0];return{..._0x22b4de,'id':_0x25ec76[_0x18c8eb(0x1ad)],'resolved':_0x352814[_0x18c8eb(0x178)]===0x1,'dT':_0x34f9fe(_0x25ec76['createTimestamp']),'personId':_0x25ec76[_0x18c8eb(0x1e0)],'threadId':_0x25ec76['threadId']};}function _0x4cf10f(_0x1b23dc,_0x335cfe,_0x251efe){const _0x1db216=_0x122b3b;var _0x2bab98,_0x380bc2;if(((_0x380bc2=(_0x2bab98=_0x1b23dc==null?void 0x0:_0x1b23dc['replies'])==null?void 0x0:_0x2bab98[_0x1db216(0x1d8)])!=null?_0x380bc2:0x0)>0x0){const _0x597942=(_0x44c6fb,_0x285f3d)=>({'id':_0x44c6fb['replyId'],'threadId':_0x44c6fb[_0x1db216(0x17d)],'dT':_0x34f9fe(_0x44c6fb[_0x1db216(0x1e1)]),'personId':_0x44c6fb[_0x1db216(0x1e0)],'resolved':_0x1b23dc[_0x1db216(0x178)]===_0x57db8b[_0x1db216(0x1ae)],'unitId':_0x335cfe,'subUnitId':_0x251efe,'text':JSON[_0x1db216(0x1d3)](_0x44c6fb[_0x1db216(0x1b7)]),'parentId':_0x285f3d}),_0xff1e6c=_0x597942(_0x1b23dc[_0x1db216(0x174)][0x0]);return{..._0xff1e6c,'children':_0x1b23dc['replies'][_0x1db216(0x1dc)](0x1)[_0x1db216(0x1b6)](_0x1d444e=>_0x597942(_0x1d444e,_0xff1e6c['id']))};}return null;}let _0x3a7176=class{constructor(_0x134048,_0x2549da,_0x38ca75,_0x3e6007){const _0x3bb81b=_0x122b3b;this[_0x3bb81b(0x1e3)]=_0x134048,this[_0x3bb81b(0x18a)]=_0x2549da,this[_0x3bb81b(0x1a4)]=_0x38ca75,this[_0x3bb81b(0x1d9)]=_0x3e6007;}async[_0x122b3b(0x1ef)](_0x26f332){const _0xa4e361=_0x122b3b;var _0x7b2361,_0x527f7f;const {parentId:_0x868d75,unitId:_0x302691,text:_0x58d2ff,threadId:_0x38ce47}=_0x26f332,_0x5970fd=(_0x527f7f=(_0x7b2361=_0x58d2ff[_0xa4e361(0x17e)])==null?void 0x0:_0x7b2361[_0xa4e361(0x19c)](_0x2e6542=>_0x2e6542['rangeType']===_0x42b4da['CustomRangeType'][_0xa4e361(0x1ed)])[_0xa4e361(0x1b6)](_0x423c5e=>_0x423c5e[_0xa4e361(0x1aa)]))!=null?_0x527f7f:[],_0x3f2a94=JSON['stringify'](_0x58d2ff),_0xc8a71f=(await this['_sessionService'][_0xa4e361(0x1f2)](_0x302691))[_0xa4e361(0x1db)]();if(_0x868d75){const _0x2b1a5e={'memberId':_0xc8a71f,'unitId':_0x302691,'content':_0x3f2a94,'mention':_0x5970fd,'threadId':_0x38ce47},_0x1ddee4=(await this[_0xa4e361(0x1e3)][_0xa4e361(0x1a9)](_0xa4e361(0x1a8)+_0x302691+_0xa4e361(0x1ca),{'body':_0x2b1a5e}))[_0xa4e361(0x1b2)][_0xa4e361(0x1be)];return{..._0x26f332,'id':_0x1ddee4[_0xa4e361(0x1ad)],'dT':_0x42b4da[_0xa4e361(0x1f0)](+_0x1ddee4[_0xa4e361(0x1e1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1ddee4[_0xa4e361(0x1e0)]};}else{const _0x11730a={'memberId':_0xc8a71f,'unitId':_0x302691,'content':_0x3f2a94,'mention':_0x5970fd},_0x301ec6=await this['_httpService'][_0xa4e361(0x1a9)](_0xa4e361(0x1a8)+_0x302691+'/add',{'body':_0x11730a});return _0x2b078e(_0x301ec6[_0xa4e361(0x1b2)]['comment'],_0x26f332);}}async[_0x122b3b(0x181)](_0x538633){const _0x2581c9=_0x122b3b;var _0x1ad2fe,_0x4e9c10;const {text:_0x3b078f,unitId:_0x1d08c5}=_0x538633,_0x15083f=(_0x4e9c10=(_0x1ad2fe=_0x3b078f[_0x2581c9(0x17e)])==null?void 0x0:_0x1ad2fe[_0x2581c9(0x19c)](_0x56fb66=>_0x56fb66[_0x2581c9(0x1e5)]===_0x42b4da[_0x2581c9(0x1cc)]['COMMENT'])['map'](_0x364b10=>_0x364b10[_0x2581c9(0x1aa)]))!=null?_0x4e9c10:[],_0x304e6b=JSON['stringify'](_0x3b078f),_0x1e1dbf=_0x538633[_0x2581c9(0x17d)],_0x527701=_0x538633['id'],_0x55d75f={'memberId':(await this['_sessionService'][_0x2581c9(0x1f2)](_0x1d08c5))[_0x2581c9(0x1db)](),'unitId':_0x1d08c5,'threadId':_0x1e1dbf,'mention':_0x15083f,'content':_0x304e6b,'replyId':_0x527701},_0x2106f7=await this['_httpService'][_0x2581c9(0x1a9)](_0x2581c9(0x1a8)+_0x1d08c5+'/edit',{'body':_0x55d75f});return!_0x2106f7['body']['error']||_0x2106f7[_0x2581c9(0x1b2)][_0x2581c9(0x1e4)][_0x2581c9(0x172)]===0x1;}async['resolveComment'](_0x322a8c){const _0x3816da=_0x122b3b,{unitId:_0x4d191f}=_0x322a8c,_0x57a606=_0x322a8c[_0x3816da(0x17d)],_0x42197d={'memberId':this[_0x3816da(0x18a)][_0x3816da(0x1df)]()[_0x3816da(0x177)],'unitId':_0x4d191f,'threadId':_0x57a606,'solved':_0x322a8c[_0x3816da(0x1cd)]?_0x57db8b[_0x3816da(0x1ae)]:_0x57db8b[_0x3816da(0x182)]},_0x28235d=await this[_0x3816da(0x1e3)][_0x3816da(0x1a9)](_0x3816da(0x1a8)+_0x4d191f+'/solved',{'body':_0x42197d});return!_0x28235d[_0x3816da(0x1b2)]['error']||_0x28235d[_0x3816da(0x1b2)][_0x3816da(0x1e4)][_0x3816da(0x172)]===0x1;}async[_0x122b3b(0x1ce)](_0x301bd6,_0x534bfe,_0x4af9b3,_0x3f1edc){const _0xacc608=_0x122b3b,_0x4b5031={'memberId':(await this[_0xacc608(0x1a4)][_0xacc608(0x1f2)](_0x301bd6))[_0xacc608(0x1db)](),'threadId':_0x4af9b3,'replyId':_0x3f1edc,'unitId':_0x301bd6},_0x5bf123=await this[_0xacc608(0x1e3)][_0xacc608(0x1a9)](_0xacc608(0x1a8)+_0x301bd6+_0xacc608(0x1d1),{'body':_0x4b5031});return!_0x5bf123[_0xacc608(0x1b2)][_0xacc608(0x1e4)]||_0x5bf123[_0xacc608(0x1b2)]['error']['code']===0x1;}async['listComments'](_0x272624,_0x59846e,_0x421c0c){const _0x589349=_0x122b3b,_0x47c1d1={'unitId':_0x272624,'threadId':_0x421c0c},_0x4f2ea1=await this[_0x589349(0x1e3)]['post'](_0x589349(0x1a8)+_0x272624+_0x589349(0x1ab),{'body':_0x47c1d1}),_0x54f01d=_0x421c0c[_0x589349(0x1b6)](_0x4844cf=>_0x4cf10f(_0x4f2ea1[_0x589349(0x1b2)]['comments'][_0x4844cf],_0x272624,_0x59846e))[_0x589349(0x19c)](Boolean);return Object[_0x589349(0x1bc)](_0x4f2ea1[_0x589349(0x1b2)][_0x589349(0x188)])[_0x589349(0x1b0)](_0x277732=>{const _0x48d72e=_0x589349;this[_0x48d72e(0x18a)][_0x48d72e(0x1d4)](_0x277732);}),_0x54f01d;}[_0x122b3b(0x197)](_0x2ba70d){const _0x4120d9=_0x122b3b;return{'id':_0x2ba70d['id'],'threadId':_0x2ba70d['threadId'],'ref':_0x2ba70d[_0x4120d9(0x1f3)]};}};_0x3a7176=_0x22df30([_0x10ea5c(0x0,_0x42b4da[_0x122b3b(0x1b5)](_0x2bc6d0[_0x122b3b(0x1c2)])),_0x10ea5c(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1a3)])),_0x10ea5c(0x2,_0x42b4da[_0x122b3b(0x1b5)](_0x2a4d49['CollaborationSessionService'])),_0x10ea5c(0x3,_0x42b4da['Inject'](_0x42b4da[_0x122b3b(0x1f1)]))],_0x3a7176);var _0x337f26=Object[_0x122b3b(0x183)],_0x11098e=(_0x483488,_0xcfa3ee,_0x5002b7,_0x5a5396)=>{for(var _0xb90790=_0x5a5396>0x1?void 0x0:_0x5a5396?_0x337f26(_0xcfa3ee,_0x5002b7):_0xcfa3ee,_0x21437e=_0x483488['length']-0x1,_0xe7d30d;_0x21437e>=0x0;_0x21437e--)(_0xe7d30d=_0x483488[_0x21437e])&&(_0xb90790=_0xe7d30d(_0xb90790)||_0xb90790);return _0xb90790;},_0x110b96=(_0x36198d,_0x3dda8a)=>(_0x1c02cd,_0x28d07e)=>_0x3dda8a(_0x1c02cd,_0x28d07e,_0x36198d);let _0x1de9d9=class extends _0x42b4da[_0x122b3b(0x1a7)]{constructor(_0x3c68a6,_0x5f5b81){const _0x2011e0=_0x122b3b;super(),this['_threadCommentDataSourceService']=_0x3c68a6,this[_0x2011e0(0x19e)]=_0x5f5b81,this['_initDataSource']();}[_0x122b3b(0x17c)](){const _0x44e0ca=_0x122b3b;this[_0x44e0ca(0x1a1)][_0x44e0ca(0x189)]=this[_0x44e0ca(0x19e)],this[_0x44e0ca(0x1a1)][_0x44e0ca(0x1c8)]=!0x1;}};_0x1de9d9=_0x11098e([_0x110b96(0x0,_0x2f850a[_0x122b3b(0x1c5)]),_0x110b96(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x3a7176))],_0x1de9d9);var _0x3731c1=Object[_0x122b3b(0x1dd)],_0x2e46be=Object[_0x122b3b(0x183)],_0x2319a4=(_0x31b083,_0x36db80,_0x361987)=>_0x36db80 in _0x31b083?_0x3731c1(_0x31b083,_0x36db80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x361987}):_0x31b083[_0x36db80]=_0x361987,_0x34b03a=(_0x2816af,_0x5e717a,_0x26f231,_0x45867c)=>{const _0x57ad69=_0x122b3b;for(var _0x20f0bd=_0x45867c>0x1?void 0x0:_0x45867c?_0x2e46be(_0x5e717a,_0x26f231):_0x5e717a,_0x22f5fa=_0x2816af[_0x57ad69(0x1d8)]-0x1,_0x1fe57b;_0x22f5fa>=0x0;_0x22f5fa--)(_0x1fe57b=_0x2816af[_0x22f5fa])&&(_0x20f0bd=_0x1fe57b(_0x20f0bd)||_0x20f0bd);return _0x20f0bd;},_0x496077=(_0x5875a3,_0x5c2eab)=>(_0x866b76,_0x38f397)=>_0x5c2eab(_0x866b76,_0x38f397,_0x5875a3),_0x5ceb2f=(_0x4dd71c,_0x2acd9f,_0x69cfcc)=>_0x2319a4(_0x4dd71c,typeof _0x2acd9f!=_0x122b3b(0x185)?_0x2acd9f+'':_0x2acd9f,_0x69cfcc);_0x5742a6[_0x122b3b(0x19b)]=class extends _0x42b4da[_0x122b3b(0x195)]{constructor(_0x6ebdd7=_0x9982d4,_0x31fa37,_0x475da8){const _0x2ac580=_0x122b3b;super(),this[_0x2ac580(0x190)]=_0x6ebdd7,this['_injector']=_0x31fa37,this[_0x2ac580(0x171)]=_0x475da8;const {..._0x3defac}=_0x42b4da['merge']({},_0x9982d4,this['_config']);this[_0x2ac580(0x171)][_0x2ac580(0x18e)](_0x5ec5d5,_0x3defac);}[_0x122b3b(0x192)](){const _0x37a8c6=_0x122b3b;[[_0x3a7176],[_0x1de9d9],[_0xdbacdc]][_0x37a8c6(0x1b0)](_0x16e48b=>{const _0x34da19=_0x37a8c6;this[_0x34da19(0x1d9)][_0x34da19(0x179)](_0x16e48b);});}[_0x122b3b(0x1c7)](){const _0x40f144=_0x122b3b;this[_0x40f144(0x1d9)]['get'](_0x1de9d9),this['_injector'][_0x40f144(0x1d0)](_0xdbacdc);}},_0x5ceb2f(_0x5742a6[_0x122b3b(0x19b)],_0x122b3b(0x1b4),_0xafa4fc),_0x5ceb2f(_0x5742a6[_0x122b3b(0x19b)],'type',_0x42b4da[_0x122b3b(0x1ea)]['UNIVER_UNKNOWN']),_0x5742a6[_0x122b3b(0x19b)]=_0x34b03a([_0x42b4da['DependentOn'](_0x22a6ec[_0x122b3b(0x1cf)],_0x2a4d49['UniverCollaborationClientPlugin'],_0x46234c[_0x122b3b(0x1a6)]),_0x496077(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1f1)])),_0x496077(0x2,_0x42b4da[_0x122b3b(0x19f)])],_0x5742a6['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x5742a6,Symbol[_0x122b3b(0x199)],{'value':_0x122b3b(0x1b8)});}));function _0x1bc3(_0x5e24ec,_0x2e8aef){const _0x399028=_0x3990();return _0x1bc3=function(_0x1bc330,_0x4c463e){_0x1bc330=_0x1bc330-0x16f;let _0x4fd966=_0x399028[_0x1bc330];return _0x4fd966;},_0x1bc3(_0x5e24ec,_0x2e8aef);}function _0x3990(){const _0x446cd8=['body','9AmELoI','pluginName','Inject','map','content','Module','_init','personId','size','values','Solve','reply','@univerjs-pro/license','UniverCore','_threadCommentModel','HTTPService','subscribe','find','IThreadCommentDataSourceService','1117557HOsraH','onReady','syncUpdateMutationToColla','pipe','/reply','UniverThreadComment','CustomRangeType','resolved','deleteComment','UniverThreadCommentUIPlugin','get','/delete','Edit','parse','addUser','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','user','length','_injector','_commentService','getMemberID','slice','defineProperty','@univerjs/network','getCurrentUser','userId','createTimestamp','unitId','_httpService','error','rangeType','1734368pyhdlf','payload','877011WOVKAf','getComment','UniverInstanceType','getUnit','UNRECOGNIZED','COMMENT','_initUserSync','addComment','dayjs','Injector','requireSession','ref','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','Reply','_configService','code','format','replies','1978420dSykST','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','solved','add','Add','ThreadCommentModel','_initDataSource','threadId','customRanges','bufferTime','Unknown','updateComment','OpenOrReOpen','getOwnPropertyDescriptor','object','symbol','parentId','root','users','dataSource','_userService','Delete','11uJEaQW','CommentService','setConfig','commentUpdate$','_config','resolveComment','onStarting','6524104vHIAWj','rxjs','Plugin','function','saveCommentToSnapshot','getUser','toStringTag','9968edBpkS','UniverThreadCommentDataSourcePlugin','filter','type','_threadCommentDataSource','IConfigService','UniverProCollaborationClient','_threadCommentDataSourceService','2286030GHIuDh','UserManagerService','_sessionService','delete','UniverLicensePlugin','Disposable','/universer-api/comment/unit/','post','rangeId','/list','UniverThreadCommentUi','replyId','Solved','disposeWithMe','forEach','amd'];_0x3990=function(){return _0x446cd8;};return _0x3990();}
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.202507171607",
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.202507171607",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507171607",
50
+ "@univerjs/core": "0.9.2-nightly.202507171607",
50
51
  "@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"
52
+ "@univerjs/thread-comment": "0.9.2-nightly.202507171607",
53
+ "@univerjs/network": "0.9.2-nightly.202507171607",
54
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507171607"
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
  },