@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506021607 → 0.8.0-nightly.202506031608

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x1f3f1b=_0x5ab3;(function(_0x5200f6,_0x183f3a){const _0x2e7ed0=_0x5ab3,_0x244b29=_0x5200f6();while(!![]){try{const _0x3301c1=-parseInt(_0x2e7ed0(0x1d7))/0x1*(parseInt(_0x2e7ed0(0x20a))/0x2)+-parseInt(_0x2e7ed0(0x1c3))/0x3+-parseInt(_0x2e7ed0(0x1f9))/0x4*(parseInt(_0x2e7ed0(0x1ac))/0x5)+-parseInt(_0x2e7ed0(0x20c))/0x6+-parseInt(_0x2e7ed0(0x1cf))/0x7*(-parseInt(_0x2e7ed0(0x1d0))/0x8)+-parseInt(_0x2e7ed0(0x1f1))/0x9*(parseInt(_0x2e7ed0(0x1b1))/0xa)+parseInt(_0x2e7ed0(0x1f5))/0xb;if(_0x3301c1===_0x183f3a)break;else _0x244b29['push'](_0x244b29['shift']());}catch(_0x36a1e9){_0x244b29['push'](_0x244b29['shift']());}}}(_0x5b56,0x525c8));Object[_0x1f3f1b(0x203)](exports,Symbol['toStringTag'],{'value':_0x1f3f1b(0x217)});function _0x5ab3(_0x5bd9c9,_0x54a5e0){const _0x5b566a=_0x5b56();return _0x5ab3=function(_0x5ab3c2,_0x4297ef){_0x5ab3c2=_0x5ab3c2-0x1a4;let _0xe2e6e9=_0x5b566a[_0x5ab3c2];return _0xe2e6e9;},_0x5ab3(_0x5bd9c9,_0x54a5e0);}const b=require(_0x1f3f1b(0x1c5)),T=require(_0x1f3f1b(0x20d)),c=require(_0x1f3f1b(0x1bb)),j=require('@univerjs/thread-comment-ui'),M=require(_0x1f3f1b(0x1c8)),w=require(_0x1f3f1b(0x21d)),P=require(_0x1f3f1b(0x20b)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5290b9=>(_0x5290b9[_0x5290b9['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5290b9[_0x5290b9[_0x1f3f1b(0x1ca)]=0x1]=_0x1f3f1b(0x1ca),_0x5290b9[_0x5290b9['UNRECOGNIZED']=-0x1]=_0x1f3f1b(0x218),_0x5290b9))(I||{}),v=(_0x108b19=>(_0x108b19[_0x108b19[_0x1f3f1b(0x226)]=0x0]='Unknown',_0x108b19[_0x108b19[_0x1f3f1b(0x1b8)]=0x1]=_0x1f3f1b(0x1b8),_0x108b19[_0x108b19[_0x1f3f1b(0x1e6)]=0x2]=_0x1f3f1b(0x1e6),_0x108b19[_0x108b19[_0x1f3f1b(0x1e2)]=0x3]=_0x1f3f1b(0x1e2),_0x108b19[_0x108b19[_0x1f3f1b(0x1bf)]=0x4]=_0x1f3f1b(0x1bf),_0x108b19[_0x108b19[_0x1f3f1b(0x1a9)]=0x5]=_0x1f3f1b(0x1a9),_0x108b19[_0x108b19[_0x1f3f1b(0x218)]=-0x1]='UNRECOGNIZED',_0x108b19))(v||{});const f=_0x3c91cb=>c[_0x1f3f1b(0x1a4)](new Date(+_0x3c91cb))[_0x1f3f1b(0x1a8)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x318acb,_0x3a7617)=>{const _0x44494c=_0x1f3f1b,_0x4c1097=_0x318acb['get'](c[_0x44494c(0x1f4)]),_0x4cb9ea=_0x318acb[_0x44494c(0x1b7)](P[_0x44494c(0x1d8)]);_0x3a7617['forEach'](_0x2c732f=>{const _0x197a0a=_0x44494c;_0x4c1097['getUser'](_0x2c732f)&&_0x3a7617[_0x197a0a(0x21e)](_0x2c732f);}),_0x3a7617['size']&&(await _0x4cb9ea[_0x44494c(0x1b7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3a7617]}}))[_0x44494c(0x1ab)][_0x44494c(0x1d4)]['forEach'](_0x17babf=>{const _0x5655b9=_0x44494c;_0x17babf&&_0x4c1097[_0x5655b9(0x224)](_0x17babf);});};var $=Object[_0x1f3f1b(0x1e0)],E=(_0x283bc3,_0x10c6ba,_0x12e570,_0x282865)=>{for(var _0x339306=_0x282865>0x1?void 0x0:_0x282865?$(_0x10c6ba,_0x12e570):_0x10c6ba,_0x42f242=_0x283bc3['length']-0x1,_0x480bfe;_0x42f242>=0x0;_0x42f242--)(_0x480bfe=_0x283bc3[_0x42f242])&&(_0x339306=_0x480bfe(_0x339306)||_0x339306);return _0x339306;},S=(_0x33c4f6,_0x2f3bbf)=>(_0x583464,_0x1a17ea)=>_0x2f3bbf(_0x583464,_0x1a17ea,_0x33c4f6);let p=class extends c[_0x1f3f1b(0x204)]{constructor(_0x4125cd,_0x2a1174,_0x2e2c2c,_0x167c93){const _0x1a211d=_0x1f3f1b;super(),this[_0x1a211d(0x1f7)]=_0x4125cd,this[_0x1a211d(0x1f3)]=_0x2a1174,this[_0x1a211d(0x1b5)]=_0x2e2c2c,this[_0x1a211d(0x1eb)]=_0x167c93,this[_0x1a211d(0x20e)](),this[_0x1a211d(0x20f)]();}[_0x1f3f1b(0x20f)](){const _0x41a9f4=_0x1f3f1b;this[_0x41a9f4(0x202)](this[_0x41a9f4(0x1f3)][_0x41a9f4(0x1fe)][_0x41a9f4(0x1e8)](w[_0x41a9f4(0x1ad)](0x10))[_0x41a9f4(0x1e4)](_0x443844=>{const _0x17e24c=_0x41a9f4,_0x1f9438=new Set();_0x443844[_0x17e24c(0x1ba)](_0x2eb929=>{const _0x19157c=_0x17e24c;switch(_0x2eb929[_0x19157c(0x200)]){case _0x19157c(0x1ce):{const _0x4e5b66=_0x2eb929['payload'][_0x19157c(0x21f)];_0x1f9438[_0x19157c(0x1ce)](_0x4e5b66);break;}}}),R(this[_0x17e24c(0x1eb)],_0x1f9438);}));}[_0x1f3f1b(0x20e)](){const _0x4e191e=_0x1f3f1b;this['disposeWithMe'](this[_0x4e191e(0x1f7)][_0x4e191e(0x1fe)][_0x4e191e(0x1e4)](async _0x5ae9e3=>{const _0x101f7b=_0x4e191e;var _0x54cac2,_0x208ea7,_0x23a00a,_0x134ece;const _0x3c9b0d=(_0x54cac2=this['_threadCommentModel'][_0x101f7b(0x223)](_0x5ae9e3['unitId'])[_0x101f7b(0x1ff)](_0x44ae79=>_0x44ae79[_0x101f7b(0x1ed)]===_0x5ae9e3[_0x101f7b(0x1ed)]))==null?void 0x0:_0x54cac2[_0x101f7b(0x1bd)];if(!_0x3c9b0d)return;const {unitId:_0x10dfb0,subUnitId:_0x381bd3}=_0x3c9b0d;switch(_0x5ae9e3[_0x101f7b(0x215)]&&this[_0x101f7b(0x1b5)][_0x101f7b(0x224)](_0x5ae9e3[_0x101f7b(0x215)]),_0x5ae9e3['type']){case v[_0x101f7b(0x1b8)]:break;case v['Reply']:{this[_0x101f7b(0x1f3)][_0x101f7b(0x1b3)](_0x10dfb0,_0x381bd3,{'unitId':_0x10dfb0,'subUnitId':_0x381bd3,'ref':'','id':_0x5ae9e3[_0x101f7b(0x1fa)],'dT':f(+_0x5ae9e3[_0x101f7b(0x1e9)]),'threadId':_0x5ae9e3[_0x101f7b(0x1ed)],'personId':(_0x23a00a=(_0x208ea7=_0x5ae9e3[_0x101f7b(0x215)])==null?void 0x0:_0x208ea7[_0x101f7b(0x221)])!=null?_0x23a00a:_0x5ae9e3[_0x101f7b(0x1cb)],'text':JSON[_0x101f7b(0x1ef)](_0x5ae9e3['content']),'parentId':_0x3c9b0d['id']});break;}case v[_0x101f7b(0x1bf)]:{const _0x4cbbc0=this[_0x101f7b(0x1f3)][_0x101f7b(0x1df)](_0x10dfb0,_0x381bd3,_0x5ae9e3[_0x101f7b(0x1fa)]);_0x4cbbc0&&_0x4cbbc0['parentId']&&this[_0x101f7b(0x1f3)][_0x101f7b(0x1de)](_0x10dfb0,_0x381bd3,_0x5ae9e3['replyId']);break;}case v[_0x101f7b(0x1e2)]:{this[_0x101f7b(0x1f3)][_0x101f7b(0x1d9)](_0x10dfb0,_0x381bd3,{'commentId':_0x5ae9e3[_0x101f7b(0x1fa)],'text':JSON[_0x101f7b(0x1ef)](_0x5ae9e3[_0x101f7b(0x1e3)])});break;}case v['Solve']:{const _0x2eb1cd=(_0x134ece=this[_0x101f7b(0x1f3)][_0x101f7b(0x223)](_0x5ae9e3[_0x101f7b(0x1db)])[_0x101f7b(0x1ff)](_0x3a36ff=>_0x3a36ff['threadId']===_0x5ae9e3[_0x101f7b(0x1ed)]))==null?void 0x0:_0x134ece[_0x101f7b(0x1bd)];_0x2eb1cd&&this[_0x101f7b(0x1f3)][_0x101f7b(0x1c9)](_0x10dfb0,_0x381bd3,_0x2eb1cd['id'],_0x5ae9e3[_0x101f7b(0x1e1)]===I[_0x101f7b(0x1ca)]);break;}}}));}};p=E([S(0x0,c[_0x1f3f1b(0x1dd)](b[_0x1f3f1b(0x21c)])),S(0x1,c['Inject'](M[_0x1f3f1b(0x220)])),S(0x2,c[_0x1f3f1b(0x1dd)](c['UserManagerService'])),S(0x3,c[_0x1f3f1b(0x1dd)](c[_0x1f3f1b(0x1cd)]))],p);const q=_0x1f3f1b(0x227),D={};var A=Object[_0x1f3f1b(0x1e0)],x=(_0x4fa718,_0x369e9f,_0x2f4d2a,_0x158935)=>{const _0x18d0f1=_0x1f3f1b;for(var _0x4689ea=_0x158935>0x1?void 0x0:_0x158935?A(_0x369e9f,_0x2f4d2a):_0x369e9f,_0x120c93=_0x4fa718[_0x18d0f1(0x216)]-0x1,_0x57292c;_0x120c93>=0x0;_0x120c93--)(_0x57292c=_0x4fa718[_0x120c93])&&(_0x4689ea=_0x57292c(_0x4689ea)||_0x4689ea);return _0x4689ea;},_=(_0x245656,_0x30ab22)=>(_0x3a3be1,_0x4d272)=>_0x30ab22(_0x3a3be1,_0x4d272,_0x245656);function Y(_0x473274,_0x1884ee){const _0x44f48b=_0x1f3f1b,_0x3dc37f=_0x473274[_0x44f48b(0x1f6)][0x0];return{..._0x1884ee,'id':_0x3dc37f[_0x44f48b(0x1fa)],'resolved':_0x473274[_0x44f48b(0x1e1)]===0x1,'dT':f(_0x3dc37f[_0x44f48b(0x1e9)]),'personId':_0x3dc37f[_0x44f48b(0x1cb)],'threadId':_0x3dc37f[_0x44f48b(0x1ed)]};}function G(_0x843edd,_0xcbad06,_0x534cb0){const _0x2dac93=_0x1f3f1b;var _0x466cbf,_0x53aa34;if(((_0x53aa34=(_0x466cbf=_0x843edd==null?void 0x0:_0x843edd[_0x2dac93(0x1f6)])==null?void 0x0:_0x466cbf['length'])!=null?_0x53aa34:0x0)>0x0){const _0x48ef7f=(_0x3c2b73,_0x1050ab)=>({'id':_0x3c2b73['replyId'],'threadId':_0x3c2b73[_0x2dac93(0x1ed)],'dT':f(_0x3c2b73[_0x2dac93(0x1e9)]),'personId':_0x3c2b73['userId'],'resolved':_0x843edd[_0x2dac93(0x1e1)]===I['Solved'],'unitId':_0xcbad06,'subUnitId':_0x534cb0,'text':JSON[_0x2dac93(0x1ef)](_0x3c2b73['content']),'parentId':_0x1050ab}),_0x3bce4d=_0x48ef7f(_0x843edd[_0x2dac93(0x1f6)][0x0]);return{..._0x3bce4d,'children':_0x843edd[_0x2dac93(0x1f6)][_0x2dac93(0x1b4)](0x1)[_0x2dac93(0x205)](_0x3af28b=>_0x48ef7f(_0x3af28b,_0x3bce4d['id']))};}return null;}let g=class{constructor(_0x1a8e88,_0x1ce465,_0x1b86e7,_0x1a395d){const _0x2fa6d2=_0x1f3f1b;this[_0x2fa6d2(0x1bc)]=_0x1a8e88,this[_0x2fa6d2(0x1b5)]=_0x1ce465,this[_0x2fa6d2(0x209)]=_0x1b86e7,this[_0x2fa6d2(0x1eb)]=_0x1a395d;}async[_0x1f3f1b(0x1b3)](_0x4c87a8){const _0x9ecf3c=_0x1f3f1b;var _0x4aa244,_0x2388f6;const {parentId:_0x2b4af4,unitId:_0x21f9bc,text:_0x2db3d7,threadId:_0x4dd9b4}=_0x4c87a8,_0x10dccd=(_0x2388f6=(_0x4aa244=_0x2db3d7[_0x9ecf3c(0x1ec)])==null?void 0x0:_0x4aa244['filter'](_0x232c46=>_0x232c46[_0x9ecf3c(0x1d3)]===c['CustomRangeType'][_0x9ecf3c(0x1c7)])['map'](_0x3e8442=>_0x3e8442[_0x9ecf3c(0x1fc)]))!=null?_0x2388f6:[],_0x4c2aeb=JSON[_0x9ecf3c(0x21a)](_0x2db3d7),_0x1e030d=(await this[_0x9ecf3c(0x209)]['requireSession'](_0x21f9bc))[_0x9ecf3c(0x1b2)]();if(_0x2b4af4){const _0x249746={'memberId':_0x1e030d,'unitId':_0x21f9bc,'content':_0x4c2aeb,'mention':_0x10dccd,'threadId':_0x4dd9b4},_0x581738=(await this[_0x9ecf3c(0x1bc)]['post'](_0x9ecf3c(0x1fd)+_0x21f9bc+_0x9ecf3c(0x1d5),{'body':_0x249746}))[_0x9ecf3c(0x1ab)][_0x9ecf3c(0x1b6)];return{..._0x4c87a8,'id':_0x581738[_0x9ecf3c(0x1fa)],'dT':c[_0x9ecf3c(0x1a4)](+_0x581738[_0x9ecf3c(0x1e9)])['format'](_0x9ecf3c(0x210)),'personId':_0x581738[_0x9ecf3c(0x1cb)]};}else{const _0x462e01={'memberId':_0x1e030d,'unitId':_0x21f9bc,'content':_0x4c2aeb,'mention':_0x10dccd},_0x58d13c=await this[_0x9ecf3c(0x1bc)][_0x9ecf3c(0x1d6)](_0x9ecf3c(0x1fd)+_0x21f9bc+_0x9ecf3c(0x1c2),{'body':_0x462e01});return Y(_0x58d13c[_0x9ecf3c(0x1ab)][_0x9ecf3c(0x207)],_0x4c87a8);}}async[_0x1f3f1b(0x1d9)](_0x569cc1){const _0x3706e5=_0x1f3f1b;var _0x25f7ce,_0x5e31ac;const {text:_0x37ffaa,unitId:_0x40ab61}=_0x569cc1,_0x265f20=(_0x5e31ac=(_0x25f7ce=_0x37ffaa['customRanges'])==null?void 0x0:_0x25f7ce['filter'](_0x59b3c2=>_0x59b3c2['rangeType']===c[_0x3706e5(0x1b0)][_0x3706e5(0x1c7)])[_0x3706e5(0x205)](_0x41554e=>_0x41554e[_0x3706e5(0x1fc)]))!=null?_0x5e31ac:[],_0x1ce36d=JSON[_0x3706e5(0x21a)](_0x37ffaa),_0x44709a=_0x569cc1['threadId'],_0x1ef25b=_0x569cc1['id'],_0x2e66eb={'memberId':(await this[_0x3706e5(0x209)]['requireSession'](_0x40ab61))['getMemberID'](),'unitId':_0x40ab61,'threadId':_0x44709a,'mention':_0x265f20,'content':_0x1ce36d,'replyId':_0x1ef25b},_0x51d780=await this[_0x3706e5(0x1bc)]['post']('/universer-api/comment/unit/'+_0x40ab61+_0x3706e5(0x1dc),{'body':_0x2e66eb});return!_0x51d780[_0x3706e5(0x1ab)]['error']||_0x51d780[_0x3706e5(0x1ab)][_0x3706e5(0x206)][_0x3706e5(0x1be)]===0x1;}async[_0x1f3f1b(0x1c9)](_0x30d758){const _0x3b1587=_0x1f3f1b,{unitId:_0x1d433c}=_0x30d758,_0x7af17b=_0x30d758['threadId'],_0x49ec21={'memberId':this[_0x3b1587(0x1b5)][_0x3b1587(0x228)]()[_0x3b1587(0x221)],'unitId':_0x1d433c,'threadId':_0x7af17b,'solved':_0x30d758[_0x3b1587(0x1cc)]?I[_0x3b1587(0x1ca)]:I[_0x3b1587(0x1c1)]},_0x15db70=await this[_0x3b1587(0x1bc)][_0x3b1587(0x1d6)](_0x3b1587(0x1fd)+_0x1d433c+_0x3b1587(0x1ae),{'body':_0x49ec21});return!_0x15db70[_0x3b1587(0x1ab)][_0x3b1587(0x206)]||_0x15db70[_0x3b1587(0x1ab)][_0x3b1587(0x206)][_0x3b1587(0x1be)]===0x1;}async[_0x1f3f1b(0x1de)](_0x339bdb,_0x471e4d,_0x837d93,_0x32a240){const _0x19889c=_0x1f3f1b,_0x537e23={'memberId':(await this[_0x19889c(0x209)][_0x19889c(0x1e7)](_0x339bdb))[_0x19889c(0x1b2)](),'threadId':_0x837d93,'replyId':_0x32a240,'unitId':_0x339bdb},_0x3090e=await this[_0x19889c(0x1bc)][_0x19889c(0x1d6)](_0x19889c(0x1fd)+_0x339bdb+_0x19889c(0x1f8),{'body':_0x537e23});return!_0x3090e[_0x19889c(0x1ab)][_0x19889c(0x206)]||_0x3090e[_0x19889c(0x1ab)][_0x19889c(0x206)][_0x19889c(0x1be)]===0x1;}async[_0x1f3f1b(0x1f0)](_0x1170f8,_0x55cf02,_0x22964f){const _0x3f17af=_0x1f3f1b,_0x1ebd07={'unitId':_0x1170f8,'threadId':_0x22964f},_0x4f416f=await this[_0x3f17af(0x1bc)][_0x3f17af(0x1d6)](_0x3f17af(0x1fd)+_0x1170f8+_0x3f17af(0x1f2),{'body':_0x1ebd07}),_0x4932ad=_0x22964f['map'](_0x13caa=>G(_0x4f416f[_0x3f17af(0x1ab)]['comments'][_0x13caa],_0x1170f8,_0x55cf02))[_0x3f17af(0x222)](Boolean);return Object[_0x3f17af(0x1a5)](_0x4f416f[_0x3f17af(0x1ab)][_0x3f17af(0x1d4)])[_0x3f17af(0x1ba)](_0x14b832=>{const _0x59b5d2=_0x3f17af;this[_0x59b5d2(0x1b5)]['addUser'](_0x14b832);}),_0x4932ad;}['saveCommentToSnapshot'](_0x15ca63){const _0x327abe=_0x1f3f1b;return{'id':_0x15ca63['id'],'threadId':_0x15ca63[_0x327abe(0x1ed)],'ref':_0x15ca63[_0x327abe(0x1b9)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x1f3f1b(0x1dd)](c[_0x1f3f1b(0x1f4)])),_(0x2,c[_0x1f3f1b(0x1dd)](b[_0x1f3f1b(0x1ee)])),_(0x3,c['Inject'](c[_0x1f3f1b(0x1cd)]))],g);var H=Object[_0x1f3f1b(0x1e0)],J=(_0x1935d9,_0x2666b7,_0x49c0b6,_0x51d48a)=>{const _0x867a1=_0x1f3f1b;for(var _0xe2477d=_0x51d48a>0x1?void 0x0:_0x51d48a?H(_0x2666b7,_0x49c0b6):_0x2666b7,_0xa9f8a6=_0x1935d9[_0x867a1(0x216)]-0x1,_0x175bcd;_0xa9f8a6>=0x0;_0xa9f8a6--)(_0x175bcd=_0x1935d9[_0xa9f8a6])&&(_0xe2477d=_0x175bcd(_0xe2477d)||_0xe2477d);return _0xe2477d;},y=(_0x39559c,_0x1a09de)=>(_0x3482ad,_0x21fd45)=>_0x1a09de(_0x3482ad,_0x21fd45,_0x39559c);let C=class extends c[_0x1f3f1b(0x204)]{constructor(_0x44d5fe,_0x3eff92){const _0x5ccf7d=_0x1f3f1b;super(),this[_0x5ccf7d(0x1c0)]=_0x44d5fe,this[_0x5ccf7d(0x1c6)]=_0x3eff92,this['_initDataSource']();}[_0x1f3f1b(0x211)](){const _0x20e3e9=_0x1f3f1b;this[_0x20e3e9(0x1c0)][_0x20e3e9(0x213)]=this[_0x20e3e9(0x1c6)],this[_0x20e3e9(0x1c0)][_0x20e3e9(0x219)]=!0x1;}};C=J([y(0x0,M[_0x1f3f1b(0x1e5)]),y(0x1,c[_0x1f3f1b(0x1dd)](g))],C);function _0x5b56(){const _0x54e7f1=['pluginName','rangeType','users','/reply','post','611iGmOml','HTTPService','updateComment','setConfig','unitId','/edit','Inject','deleteComment','getComment','getOwnPropertyDescriptor','solved','Edit','content','subscribe','IThreadCommentDataSourceService','Reply','requireSession','pipe','createTimestamp','UniverInstanceType','_injector','customRanges','threadId','CollaborationSessionService','parse','listComments','162621YTLpzM','/list','_threadCommentModel','UserManagerService','22115115QOrthc','replies','_commentService','/delete','744668grwyrw','replyId','DependentOn','rangeId','/universer-api/comment/unit/','commentUpdate$','find','type','UniverCollaborationClientPlugin','disposeWithMe','defineProperty','Disposable','map','error','comment','UniverThreadCommentDataSourcePlugin','_sessionService','2162JVUdjD','@univerjs/network','2076240CmPOaf','@univerjs-pro/license','_init','_initUserSync','YYYY/MM/DD\x20HH:mm','_initDataSource','merge','dataSource','symbol','user','length','Module','UNRECOGNIZED','syncUpdateMutationToColla','stringify','_config','CommentService','rxjs','delete','personId','ThreadCommentModel','userID','filter','getUnit','addUser','_configService','Unknown','thread-comment-data-source.config','getCurrentUser','dayjs','values','UNIVER_UNKNOWN','UniverThreadCommentUIPlugin','format','Solve','IConfigService','body','10kxVXJB','bufferTime','/solved','onStarting','CustomRangeType','60FkbHzx','getMemberID','addComment','slice','_userService','reply','get','Add','ref','forEach','@univerjs/core','_httpService','root','code','Delete','_threadCommentDataSourceService','OpenOrReOpen','/add','947763ncvtjH','Plugin','@univerjs-pro/collaboration-client','_threadCommentDataSource','COMMENT','@univerjs/thread-comment','resolveComment','Solved','userId','resolved','Injector','add','7HEixak','1040696AhiLul','onReady'];_0x5b56=function(){return _0x54e7f1;};return _0x5b56();}var F=Object[_0x1f3f1b(0x203)],L=Object[_0x1f3f1b(0x1e0)],Z=(_0x59e0fb,_0x1b415a,_0x48d9e1)=>_0x1b415a in _0x59e0fb?F(_0x59e0fb,_0x1b415a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48d9e1}):_0x59e0fb[_0x1b415a]=_0x48d9e1,W=(_0x1aab5d,_0x4f515c,_0x547a70,_0x5afdaf)=>{for(var _0x120f66=_0x5afdaf>0x1?void 0x0:_0x5afdaf?L(_0x4f515c,_0x547a70):_0x4f515c,_0x11ea92=_0x1aab5d['length']-0x1,_0x5628f5;_0x11ea92>=0x0;_0x11ea92--)(_0x5628f5=_0x1aab5d[_0x11ea92])&&(_0x120f66=_0x5628f5(_0x120f66)||_0x120f66);return _0x120f66;},O=(_0x5f0251,_0x37b207)=>(_0x2ccfaa,_0x5d6db9)=>_0x37b207(_0x2ccfaa,_0x5d6db9,_0x5f0251),N=(_0x4e5c87,_0x1ef6ba,_0x1bfb4e)=>Z(_0x4e5c87,typeof _0x1ef6ba!=_0x1f3f1b(0x214)?_0x1ef6ba+'':_0x1ef6ba,_0x1bfb4e);exports[_0x1f3f1b(0x208)]=class extends c[_0x1f3f1b(0x1c4)]{constructor(_0x4e3bf3=D,_0x2e9bbd,_0x3274ca){const _0x4cff7d=_0x1f3f1b;super(),this[_0x4cff7d(0x21b)]=_0x4e3bf3,this[_0x4cff7d(0x1eb)]=_0x2e9bbd,this[_0x4cff7d(0x225)]=_0x3274ca;const {..._0xdcb7d7}=c[_0x4cff7d(0x212)]({},D,this['_config']);this[_0x4cff7d(0x225)][_0x4cff7d(0x1da)](q,_0xdcb7d7);}[_0x1f3f1b(0x1af)](){const _0x5584ca=_0x1f3f1b;[[g],[C],[p]][_0x5584ca(0x1ba)](_0x4eaf42=>{this['_injector']['add'](_0x4eaf42);});}[_0x1f3f1b(0x1d1)](){const _0x103460=_0x1f3f1b;this['_injector'][_0x103460(0x1b7)](C),this['_injector'][_0x103460(0x1b7)](p);}},N(exports[_0x1f3f1b(0x208)],_0x1f3f1b(0x1d2),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x1f3f1b(0x1ea)][_0x1f3f1b(0x1a6)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1f3f1b(0x1fb)](j[_0x1f3f1b(0x1a7)],b[_0x1f3f1b(0x201)],T['UniverLicensePlugin']),O(0x1,c[_0x1f3f1b(0x1dd)](c[_0x1f3f1b(0x1cd)])),O(0x2,c[_0x1f3f1b(0x1aa)])],exports[_0x1f3f1b(0x208)]);
1
+ 'use strict';const _0x3eec7a=_0x2670;(function(_0x2554a9,_0x3df4bd){const _0x3f4ca0=_0x2670,_0x43df14=_0x2554a9();while(!![]){try{const _0x179cea=-parseInt(_0x3f4ca0(0xe3))/0x1+parseInt(_0x3f4ca0(0xd9))/0x2*(-parseInt(_0x3f4ca0(0xc2))/0x3)+-parseInt(_0x3f4ca0(0xe2))/0x4*(-parseInt(_0x3f4ca0(0xb8))/0x5)+-parseInt(_0x3f4ca0(0xd7))/0x6+parseInt(_0x3f4ca0(0xe0))/0x7*(-parseInt(_0x3f4ca0(0xea))/0x8)+parseInt(_0x3f4ca0(0x11a))/0x9+parseInt(_0x3f4ca0(0xce))/0xa;if(_0x179cea===_0x3df4bd)break;else _0x43df14['push'](_0x43df14['shift']());}catch(_0x5f23bf){_0x43df14['push'](_0x43df14['shift']());}}}(_0x322b,0xc382e));function _0x2670(_0x5870b0,_0x4dedb6){const _0x322b46=_0x322b();return _0x2670=function(_0x26707f,_0xfd4d1e){_0x26707f=_0x26707f-0xb3;let _0x467165=_0x322b46[_0x26707f];return _0x467165;},_0x2670(_0x5870b0,_0x4dedb6);}Object[_0x3eec7a(0xd3)](exports,Symbol['toStringTag'],{'value':_0x3eec7a(0xff)});const b=require(_0x3eec7a(0xdb)),T=require(_0x3eec7a(0xfa)),c=require(_0x3eec7a(0xcb)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x3eec7a(0x104)),P=require(_0x3eec7a(0x100)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x20303a=>(_0x20303a[_0x20303a['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x20303a[_0x20303a[_0x3eec7a(0xf5)]=0x1]='Solved',_0x20303a[_0x20303a['UNRECOGNIZED']=-0x1]=_0x3eec7a(0xd8),_0x20303a))(I||{}),v=(_0x540752=>(_0x540752[_0x540752[_0x3eec7a(0xca)]=0x0]='Unknown',_0x540752[_0x540752[_0x3eec7a(0x127)]=0x1]=_0x3eec7a(0x127),_0x540752[_0x540752[_0x3eec7a(0xd1)]=0x2]='Reply',_0x540752[_0x540752['Edit']=0x3]=_0x3eec7a(0x115),_0x540752[_0x540752[_0x3eec7a(0xf9)]=0x4]=_0x3eec7a(0xf9),_0x540752[_0x540752[_0x3eec7a(0x120)]=0x5]=_0x3eec7a(0x120),_0x540752[_0x540752[_0x3eec7a(0xd8)]=-0x1]=_0x3eec7a(0xd8),_0x540752))(v||{});const f=_0x1a5102=>c[_0x3eec7a(0x110)](new Date(+_0x1a5102))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x4dced7,_0x514335)=>{const _0x352c5b=_0x3eec7a,_0x42e975=_0x4dced7[_0x352c5b(0xbd)](c[_0x352c5b(0xe6)]),_0x45a9cd=_0x4dced7[_0x352c5b(0xbd)](P['HTTPService']);_0x514335[_0x352c5b(0xba)](_0x183689=>{const _0x3abb0f=_0x352c5b;_0x42e975[_0x3abb0f(0x112)](_0x183689)&&_0x514335[_0x3abb0f(0xe4)](_0x183689);}),_0x514335['size']&&(await _0x45a9cd['get'](_0x352c5b(0xf0),{'params':{'userIDs':[..._0x514335]}}))[_0x352c5b(0xf1)][_0x352c5b(0x105)][_0x352c5b(0xba)](_0x3f9f38=>{const _0x45b637=_0x352c5b;_0x3f9f38&&_0x42e975[_0x45b637(0x117)](_0x3f9f38);});};var $=Object[_0x3eec7a(0xe9)],E=(_0x25d1fe,_0x483d5c,_0x662f9,_0x343a3b)=>{const _0x530171=_0x3eec7a;for(var _0x1f32c9=_0x343a3b>0x1?void 0x0:_0x343a3b?$(_0x483d5c,_0x662f9):_0x483d5c,_0x3044d9=_0x25d1fe[_0x530171(0x122)]-0x1,_0x5d1423;_0x3044d9>=0x0;_0x3044d9--)(_0x5d1423=_0x25d1fe[_0x3044d9])&&(_0x1f32c9=_0x5d1423(_0x1f32c9)||_0x1f32c9);return _0x1f32c9;},S=(_0x1885a6,_0x42dae6)=>(_0x1a9e84,_0x41e8e0)=>_0x42dae6(_0x1a9e84,_0x41e8e0,_0x1885a6);let p=class extends c[_0x3eec7a(0x106)]{constructor(_0x3096f3,_0x3faf44,_0x457f53,_0x2cb59a){const _0x38a1b2=_0x3eec7a;super(),this['_commentService']=_0x3096f3,this[_0x38a1b2(0xe8)]=_0x3faf44,this[_0x38a1b2(0xc6)]=_0x457f53,this[_0x38a1b2(0x10f)]=_0x2cb59a,this[_0x38a1b2(0x109)](),this['_initUserSync']();}[_0x3eec7a(0x114)](){const _0x4249f6=_0x3eec7a;this[_0x4249f6(0x123)](this[_0x4249f6(0xe8)][_0x4249f6(0x102)]['pipe'](w[_0x4249f6(0xde)](0x10))[_0x4249f6(0xfe)](_0x3e27fb=>{const _0x3bc98e=_0x4249f6,_0x3745f5=new Set();_0x3e27fb[_0x3bc98e(0xba)](_0x42413f=>{const _0x2e8aa9=_0x3bc98e;switch(_0x42413f[_0x2e8aa9(0x12d)]){case _0x2e8aa9(0xd5):{const _0x4cbf6f=_0x42413f['payload']['personId'];_0x3745f5['add'](_0x4cbf6f);break;}}}),R(this['_injector'],_0x3745f5);}));}[_0x3eec7a(0x109)](){const _0x367ef3=_0x3eec7a;this[_0x367ef3(0x123)](this[_0x367ef3(0xed)][_0x367ef3(0x102)][_0x367ef3(0xfe)](async _0x5548db=>{const _0x5b87e5=_0x367ef3;var _0x2c92e9,_0x54d865,_0x2cc99d,_0x29e520;const _0xcfc334=(_0x2c92e9=this[_0x5b87e5(0xe8)][_0x5b87e5(0xbc)](_0x5548db[_0x5b87e5(0x10d)])['find'](_0x32ffa1=>_0x32ffa1[_0x5b87e5(0x118)]===_0x5548db['threadId']))==null?void 0x0:_0x2c92e9[_0x5b87e5(0x12a)];if(!_0xcfc334)return;const {unitId:_0x33fe80,subUnitId:_0x49a5b6}=_0xcfc334;switch(_0x5548db[_0x5b87e5(0x11f)]&&this[_0x5b87e5(0xc6)][_0x5b87e5(0x117)](_0x5548db[_0x5b87e5(0x11f)]),_0x5548db[_0x5b87e5(0x12d)]){case v[_0x5b87e5(0x127)]:break;case v[_0x5b87e5(0xd1)]:{this['_threadCommentModel'][_0x5b87e5(0xef)](_0x33fe80,_0x49a5b6,{'unitId':_0x33fe80,'subUnitId':_0x49a5b6,'ref':'','id':_0x5548db['replyId'],'dT':f(+_0x5548db[_0x5b87e5(0xbf)]),'threadId':_0x5548db[_0x5b87e5(0x118)],'personId':(_0x2cc99d=(_0x54d865=_0x5548db[_0x5b87e5(0x11f)])==null?void 0x0:_0x54d865[_0x5b87e5(0x12b)])!=null?_0x2cc99d:_0x5548db['userId'],'text':JSON[_0x5b87e5(0xbe)](_0x5548db[_0x5b87e5(0xbb)]),'parentId':_0xcfc334['id']});break;}case v['Delete']:{const _0x5deac2=this[_0x5b87e5(0xe8)][_0x5b87e5(0xf3)](_0x33fe80,_0x49a5b6,_0x5548db[_0x5b87e5(0x124)]);_0x5deac2&&_0x5deac2[_0x5b87e5(0x126)]&&this[_0x5b87e5(0xe8)]['deleteComment'](_0x33fe80,_0x49a5b6,_0x5548db[_0x5b87e5(0x124)]);break;}case v[_0x5b87e5(0x115)]:{this[_0x5b87e5(0xe8)][_0x5b87e5(0xcd)](_0x33fe80,_0x49a5b6,{'commentId':_0x5548db[_0x5b87e5(0x124)],'text':JSON[_0x5b87e5(0xbe)](_0x5548db['content'])});break;}case v[_0x5b87e5(0x120)]:{const _0xb8ac8b=(_0x29e520=this[_0x5b87e5(0xe8)][_0x5b87e5(0xbc)](_0x5548db[_0x5b87e5(0x10d)])[_0x5b87e5(0xb4)](_0x1e046a=>_0x1e046a[_0x5b87e5(0x118)]===_0x5548db[_0x5b87e5(0x118)]))==null?void 0x0:_0x29e520['root'];_0xb8ac8b&&this[_0x5b87e5(0xe8)][_0x5b87e5(0xc7)](_0x33fe80,_0x49a5b6,_0xb8ac8b['id'],_0x5548db['solved']===I[_0x5b87e5(0xf5)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3eec7a(0xd4)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x3eec7a(0x119)](c['UserManagerService'])),S(0x3,c[_0x3eec7a(0x119)](c[_0x3eec7a(0x129)]))],p);const q=_0x3eec7a(0xf4),D={};function _0x322b(){const _0x47aff1=['COMMENT','updateComment','13657390cbhxll','map','onStarting','Reply','userId','defineProperty','CommentService','add','UniverThreadCommentUIPlugin','2326992RUCcZt','UNRECOGNIZED','6kNdJAq','requireSession','@univerjs-pro/collaboration-client','stringify','ref','bufferTime','/universer-api/comment/unit/','3946621JkUxTF','comments','5580604kwchdd','221082gIodxj','delete','IConfigService','UserManagerService','UniverCollaborationClientPlugin','_threadCommentModel','getOwnPropertyDescriptor','8HsGntO','IThreadCommentDataSourceService','getCurrentUser','_commentService','CollaborationSessionService','addComment','/universer-api/user/list','body','_httpService','getComment','thread-comment-data-source.config','Solved','/add','UNIVER_UNKNOWN','_threadCommentDataSourceService','Delete','@univerjs-pro/license','/edit','_sessionService','UniverThreadCommentDataSourcePlugin','subscribe','Module','@univerjs/network','solved','commentUpdate$','dataSource','rxjs','users','Disposable','post','UniverLicensePlugin','_init','error','_config','merge','unitId','getMemberID','_injector','dayjs','filter','getUser','customRanges','_initUserSync','Edit','reply','addUser','threadId','Inject','2296080iUHpQm','deleteComment','replies','_initDataSource','/list','user','Solve','_configService','length','disposeWithMe','replyId','YYYY/MM/DD\x20HH:mm','parentId','Add','rangeId','Injector','root','userID','rangeType','type','slice','_threadCommentDataSource','find','CustomRangeType','UniverInstanceType','/reply','5EnqUMV','setConfig','forEach','content','getUnit','get','parse','createTimestamp','saveCommentToSnapshot','code','1042479ToGqOL','HTTPService','format','OpenOrReOpen','_userService','resolveComment','pluginName','Plugin','Unknown','@univerjs/core'];_0x322b=function(){return _0x47aff1;};return _0x322b();}var A=Object[_0x3eec7a(0xe9)],x=(_0xb2ad9c,_0x219b9f,_0x34c487,_0x2df574)=>{const _0x5dabb2=_0x3eec7a;for(var _0xbe4127=_0x2df574>0x1?void 0x0:_0x2df574?A(_0x219b9f,_0x34c487):_0x219b9f,_0x46e808=_0xb2ad9c[_0x5dabb2(0x122)]-0x1,_0x3e6dc9;_0x46e808>=0x0;_0x46e808--)(_0x3e6dc9=_0xb2ad9c[_0x46e808])&&(_0xbe4127=_0x3e6dc9(_0xbe4127)||_0xbe4127);return _0xbe4127;},_=(_0x870a75,_0x4a34be)=>(_0x4bb84d,_0x2a532d)=>_0x4a34be(_0x4bb84d,_0x2a532d,_0x870a75);function Y(_0x7ef542,_0x2aff9d){const _0x28b102=_0x3eec7a,_0x5e9597=_0x7ef542['replies'][0x0];return{..._0x2aff9d,'id':_0x5e9597['replyId'],'resolved':_0x7ef542['solved']===0x1,'dT':f(_0x5e9597[_0x28b102(0xbf)]),'personId':_0x5e9597[_0x28b102(0xd2)],'threadId':_0x5e9597['threadId']};}function G(_0x5b8797,_0x1db650,_0x505810){const _0x547c96=_0x3eec7a;var _0x5d9a3c,_0x307131;if(((_0x307131=(_0x5d9a3c=_0x5b8797==null?void 0x0:_0x5b8797[_0x547c96(0x11c)])==null?void 0x0:_0x5d9a3c[_0x547c96(0x122)])!=null?_0x307131:0x0)>0x0){const _0x437ccf=(_0x40635f,_0x866ef6)=>({'id':_0x40635f[_0x547c96(0x124)],'threadId':_0x40635f['threadId'],'dT':f(_0x40635f['createTimestamp']),'personId':_0x40635f[_0x547c96(0xd2)],'resolved':_0x5b8797[_0x547c96(0x101)]===I['Solved'],'unitId':_0x1db650,'subUnitId':_0x505810,'text':JSON[_0x547c96(0xbe)](_0x40635f['content']),'parentId':_0x866ef6}),_0x2e13d1=_0x437ccf(_0x5b8797[_0x547c96(0x11c)][0x0]);return{..._0x2e13d1,'children':_0x5b8797[_0x547c96(0x11c)][_0x547c96(0x12e)](0x1)[_0x547c96(0xcf)](_0x565530=>_0x437ccf(_0x565530,_0x2e13d1['id']))};}return null;}let g=class{constructor(_0x29c485,_0x15b50c,_0x4bae94,_0x1feee2){const _0x1e325a=_0x3eec7a;this[_0x1e325a(0xf2)]=_0x29c485,this['_userService']=_0x15b50c,this[_0x1e325a(0xfc)]=_0x4bae94,this[_0x1e325a(0x10f)]=_0x1feee2;}async[_0x3eec7a(0xef)](_0x154e21){const _0x4cfa2d=_0x3eec7a;var _0x3f4349,_0xb713b0;const {parentId:_0x4c14c6,unitId:_0x5aeec3,text:_0x3dbe94,threadId:_0x34d71e}=_0x154e21,_0x4a78c9=(_0xb713b0=(_0x3f4349=_0x3dbe94[_0x4cfa2d(0x113)])==null?void 0x0:_0x3f4349[_0x4cfa2d(0x111)](_0xd91b7b=>_0xd91b7b[_0x4cfa2d(0x12c)]===c[_0x4cfa2d(0xb5)][_0x4cfa2d(0xcc)])['map'](_0x3535e8=>_0x3535e8[_0x4cfa2d(0x128)]))!=null?_0xb713b0:[],_0x4445a6=JSON['stringify'](_0x3dbe94),_0x460d2a=(await this[_0x4cfa2d(0xfc)]['requireSession'](_0x5aeec3))['getMemberID']();if(_0x4c14c6){const _0x273f6a={'memberId':_0x460d2a,'unitId':_0x5aeec3,'content':_0x4445a6,'mention':_0x4a78c9,'threadId':_0x34d71e},_0x29a76e=(await this['_httpService']['post'](_0x4cfa2d(0xdf)+_0x5aeec3+_0x4cfa2d(0xb7),{'body':_0x273f6a}))[_0x4cfa2d(0xf1)][_0x4cfa2d(0x116)];return{..._0x154e21,'id':_0x29a76e['replyId'],'dT':c[_0x4cfa2d(0x110)](+_0x29a76e[_0x4cfa2d(0xbf)])[_0x4cfa2d(0xc4)](_0x4cfa2d(0x125)),'personId':_0x29a76e[_0x4cfa2d(0xd2)]};}else{const _0x446dc1={'memberId':_0x460d2a,'unitId':_0x5aeec3,'content':_0x4445a6,'mention':_0x4a78c9},_0x5f42e4=await this[_0x4cfa2d(0xf2)][_0x4cfa2d(0x107)]('/universer-api/comment/unit/'+_0x5aeec3+_0x4cfa2d(0xf6),{'body':_0x446dc1});return Y(_0x5f42e4[_0x4cfa2d(0xf1)]['comment'],_0x154e21);}}async[_0x3eec7a(0xcd)](_0x35b2da){const _0x194f85=_0x3eec7a;var _0x505a11,_0x50beee;const {text:_0x9a5d14,unitId:_0x7684d5}=_0x35b2da,_0x3784a4=(_0x50beee=(_0x505a11=_0x9a5d14[_0x194f85(0x113)])==null?void 0x0:_0x505a11['filter'](_0x3e63cf=>_0x3e63cf['rangeType']===c[_0x194f85(0xb5)]['COMMENT'])[_0x194f85(0xcf)](_0x5660f7=>_0x5660f7[_0x194f85(0x128)]))!=null?_0x50beee:[],_0x3b9858=JSON[_0x194f85(0xdc)](_0x9a5d14),_0x17947d=_0x35b2da['threadId'],_0x328831=_0x35b2da['id'],_0xa923d0={'memberId':(await this[_0x194f85(0xfc)][_0x194f85(0xda)](_0x7684d5))[_0x194f85(0x10e)](),'unitId':_0x7684d5,'threadId':_0x17947d,'mention':_0x3784a4,'content':_0x3b9858,'replyId':_0x328831},_0x356db7=await this[_0x194f85(0xf2)][_0x194f85(0x107)](_0x194f85(0xdf)+_0x7684d5+_0x194f85(0xfb),{'body':_0xa923d0});return!_0x356db7[_0x194f85(0xf1)][_0x194f85(0x10a)]||_0x356db7['body']['error'][_0x194f85(0xc1)]===0x1;}async[_0x3eec7a(0xc7)](_0x4c0602){const _0x3400a7=_0x3eec7a,{unitId:_0x1188db}=_0x4c0602,_0x39d753=_0x4c0602['threadId'],_0x87e2e6={'memberId':this[_0x3400a7(0xc6)][_0x3400a7(0xec)]()[_0x3400a7(0x12b)],'unitId':_0x1188db,'threadId':_0x39d753,'solved':_0x4c0602['resolved']?I[_0x3400a7(0xf5)]:I[_0x3400a7(0xc5)]},_0x2db844=await this[_0x3400a7(0xf2)][_0x3400a7(0x107)](_0x3400a7(0xdf)+_0x1188db+'/solved',{'body':_0x87e2e6});return!_0x2db844[_0x3400a7(0xf1)][_0x3400a7(0x10a)]||_0x2db844['body'][_0x3400a7(0x10a)][_0x3400a7(0xc1)]===0x1;}async[_0x3eec7a(0x11b)](_0x52865b,_0x247fce,_0xab1a7c,_0x53baec){const _0x56a5ef=_0x3eec7a,_0x5f5d5b={'memberId':(await this[_0x56a5ef(0xfc)][_0x56a5ef(0xda)](_0x52865b))[_0x56a5ef(0x10e)](),'threadId':_0xab1a7c,'replyId':_0x53baec,'unitId':_0x52865b},_0x1f6c84=await this[_0x56a5ef(0xf2)][_0x56a5ef(0x107)](_0x56a5ef(0xdf)+_0x52865b+'/delete',{'body':_0x5f5d5b});return!_0x1f6c84[_0x56a5ef(0xf1)][_0x56a5ef(0x10a)]||_0x1f6c84[_0x56a5ef(0xf1)][_0x56a5ef(0x10a)][_0x56a5ef(0xc1)]===0x1;}async['listComments'](_0x5d0483,_0xfab2dd,_0x4febd1){const _0x3d247f=_0x3eec7a,_0x5e4a3b={'unitId':_0x5d0483,'threadId':_0x4febd1},_0x428c9f=await this[_0x3d247f(0xf2)][_0x3d247f(0x107)](_0x3d247f(0xdf)+_0x5d0483+_0x3d247f(0x11e),{'body':_0x5e4a3b}),_0x2ccb34=_0x4febd1['map'](_0x29d512=>G(_0x428c9f['body'][_0x3d247f(0xe1)][_0x29d512],_0x5d0483,_0xfab2dd))[_0x3d247f(0x111)](Boolean);return Object['values'](_0x428c9f[_0x3d247f(0xf1)][_0x3d247f(0x105)])[_0x3d247f(0xba)](_0x4ba197=>{const _0x1bd2aa=_0x3d247f;this[_0x1bd2aa(0xc6)][_0x1bd2aa(0x117)](_0x4ba197);}),_0x2ccb34;}[_0x3eec7a(0xc0)](_0x194ec7){const _0x3419c4=_0x3eec7a;return{'id':_0x194ec7['id'],'threadId':_0x194ec7['threadId'],'ref':_0x194ec7[_0x3419c4(0xdd)]};}};g=x([_(0x0,c['Inject'](P[_0x3eec7a(0xc3)])),_(0x1,c[_0x3eec7a(0x119)](c['UserManagerService'])),_(0x2,c[_0x3eec7a(0x119)](b[_0x3eec7a(0xee)])),_(0x3,c[_0x3eec7a(0x119)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x1c50de,_0x2251f4,_0x2bb659,_0x38470f)=>{const _0x305867=_0x3eec7a;for(var _0x3b2df1=_0x38470f>0x1?void 0x0:_0x38470f?H(_0x2251f4,_0x2bb659):_0x2251f4,_0x15c171=_0x1c50de[_0x305867(0x122)]-0x1,_0x368bbe;_0x15c171>=0x0;_0x15c171--)(_0x368bbe=_0x1c50de[_0x15c171])&&(_0x3b2df1=_0x368bbe(_0x3b2df1)||_0x3b2df1);return _0x3b2df1;},y=(_0x505716,_0x22a847)=>(_0x523bba,_0x4338cf)=>_0x22a847(_0x523bba,_0x4338cf,_0x505716);let C=class extends c['Disposable']{constructor(_0x2bd6fe,_0x22daaf){const _0xf57cf9=_0x3eec7a;super(),this['_threadCommentDataSourceService']=_0x2bd6fe,this[_0xf57cf9(0xb3)]=_0x22daaf,this[_0xf57cf9(0x11d)]();}['_initDataSource'](){const _0x5a442b=_0x3eec7a;this[_0x5a442b(0xf8)][_0x5a442b(0x103)]=this[_0x5a442b(0xb3)],this[_0x5a442b(0xf8)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x3eec7a(0xeb)]),y(0x1,c[_0x3eec7a(0x119)](g))],C);var F=Object[_0x3eec7a(0xd3)],L=Object[_0x3eec7a(0xe9)],Z=(_0x3cb6c3,_0x21ef48,_0x398433)=>_0x21ef48 in _0x3cb6c3?F(_0x3cb6c3,_0x21ef48,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x398433}):_0x3cb6c3[_0x21ef48]=_0x398433,W=(_0x363556,_0x833b6,_0x59c955,_0x1d94cd)=>{const _0x1928bd=_0x3eec7a;for(var _0x13fc6d=_0x1d94cd>0x1?void 0x0:_0x1d94cd?L(_0x833b6,_0x59c955):_0x833b6,_0x4e7d2b=_0x363556[_0x1928bd(0x122)]-0x1,_0x1d3643;_0x4e7d2b>=0x0;_0x4e7d2b--)(_0x1d3643=_0x363556[_0x4e7d2b])&&(_0x13fc6d=_0x1d3643(_0x13fc6d)||_0x13fc6d);return _0x13fc6d;},O=(_0x215c65,_0x13208c)=>(_0x4abdfe,_0x1634d5)=>_0x13208c(_0x4abdfe,_0x1634d5,_0x215c65),N=(_0x2a738e,_0xf3d7de,_0x13be81)=>Z(_0x2a738e,typeof _0xf3d7de!='symbol'?_0xf3d7de+'':_0xf3d7de,_0x13be81);exports[_0x3eec7a(0xfd)]=class extends c[_0x3eec7a(0xc9)]{constructor(_0x14ddf0=D,_0x327490,_0x22532f){const _0x42a7ee=_0x3eec7a;super(),this[_0x42a7ee(0x10b)]=_0x14ddf0,this[_0x42a7ee(0x10f)]=_0x327490,this[_0x42a7ee(0x121)]=_0x22532f;const {..._0x5eeb75}=c[_0x42a7ee(0x10c)]({},D,this[_0x42a7ee(0x10b)]);this[_0x42a7ee(0x121)][_0x42a7ee(0xb9)](q,_0x5eeb75);}[_0x3eec7a(0xd0)](){const _0x55283d=_0x3eec7a;[[g],[C],[p]][_0x55283d(0xba)](_0x5b1034=>{const _0x4af117=_0x55283d;this[_0x4af117(0x10f)][_0x4af117(0xd5)](_0x5b1034);});}['onReady'](){const _0x156dd4=_0x3eec7a;this['_injector'][_0x156dd4(0xbd)](C),this['_injector'][_0x156dd4(0xbd)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3eec7a(0xc8),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3eec7a(0x12d),c[_0x3eec7a(0xb6)][_0x3eec7a(0xf7)]),exports[_0x3eec7a(0xfd)]=W([c['DependentOn'](j[_0x3eec7a(0xd6)],b[_0x3eec7a(0xe7)],T[_0x3eec7a(0x108)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x3eec7a(0xe5)])],exports[_0x3eec7a(0xfd)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2ad6c2=_0x215a;(function(_0x30d322,_0x47124b){const _0x1f0456=_0x215a,_0x146358=_0x30d322();while(!![]){try{const _0x3f3771=-parseInt(_0x1f0456(0x17c))/0x1+-parseInt(_0x1f0456(0x165))/0x2+parseInt(_0x1f0456(0x133))/0x3+-parseInt(_0x1f0456(0x14e))/0x4*(-parseInt(_0x1f0456(0x134))/0x5)+parseInt(_0x1f0456(0x18e))/0x6*(parseInt(_0x1f0456(0x16f))/0x7)+parseInt(_0x1f0456(0x13a))/0x8+-parseInt(_0x1f0456(0x156))/0x9*(parseInt(_0x1f0456(0x142))/0xa);if(_0x3f3771===_0x47124b)break;else _0x146358['push'](_0x146358['shift']());}catch(_0x16e4f1){_0x146358['push'](_0x146358['shift']());}}}(_0x158a,0x9a409));import{CommentService as _0x4100be,CollaborationSessionService as _0x341e14,UniverCollaborationClientPlugin as _0x5047d4}from'@univerjs-pro/collaboration-client';function _0x158a(){const _0x51bf87=['delete','/universer-api/user/list','get','Add','setConfig','deleteComment','comment','UNIVER_UNKNOWN','455QDIiwj','_threadCommentModel','type','Reply','Solved','commentUpdate$','rangeType','parse','symbol','UNRECOGNIZED','format','users','body','935270xUOLNS','Delete','unitId','reply','_injector','filter','/solved','pluginName','error','length','getUser','_httpService','Solve','_userService','saveCommentToSnapshot','/universer-api/comment/unit/','content','replyId','71466GWudtx','/reply','addUser','getMemberID','add','post','dataSource','map','rangeId','size','531756WzBjlV','3576005WRtOqo','/add','/delete','_configService','threadId','_commentService','10102936qXzAuG','forEach','_initDataSource','thread-comment-data-source.config','/edit','_initUserSync','defineProperty','slice','40Pyhprp','Edit','onStarting','parentId','values','userId','createTimestamp','_init','ref','onReady','resolveComment','getUnit','4mEJPYk','stringify','getOwnPropertyDescriptor','solved','getCurrentUser','user','OpenOrReOpen','COMMENT','3017799ZbRKWA','userID','_threadCommentDataSource','customRanges','code','YYYY/MM/DD\x20HH:mm','root','personId','_config','disposeWithMe','subscribe','syncUpdateMutationToColla','_threadCommentDataSourceService','replies','requireSession','42408LIGfAM','_sessionService'];_0x158a=function(){return _0x51bf87;};return _0x158a();}import{UniverLicensePlugin as _0x2652fc}from'@univerjs-pro/license';import{dayjs as _0x58da43,UserManagerService as _0x22549e,Inject as _0x289e88,Injector as _0x2db82f,Disposable as _0x1fa45d,CustomRangeType as _0x224c09,UniverInstanceType as _0x24dc40,DependentOn as _0x1a91bb,IConfigService as _0x1f33d5,Plugin as _0x73f04a,merge as _0x3e2c99}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4a8a90}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2b5e60,IThreadCommentDataSourceService as _0xa122ed}from'@univerjs/thread-comment';import{bufferTime as _0x2a95f0}from'rxjs';import{HTTPService as _0x53e8e9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x957b4c=>(_0x957b4c[_0x957b4c['OpenOrReOpen']=0x0]=_0x2ad6c2(0x154),_0x957b4c[_0x957b4c[_0x2ad6c2(0x173)]=0x1]=_0x2ad6c2(0x173),_0x957b4c[_0x957b4c[_0x2ad6c2(0x178)]=-0x1]=_0x2ad6c2(0x178),_0x957b4c))(I||{}),v=(_0x7763f=>(_0x7763f[_0x7763f['Unknown']=0x0]='Unknown',_0x7763f[_0x7763f[_0x2ad6c2(0x16a)]=0x1]=_0x2ad6c2(0x16a),_0x7763f[_0x7763f[_0x2ad6c2(0x172)]=0x2]=_0x2ad6c2(0x172),_0x7763f[_0x7763f[_0x2ad6c2(0x143)]=0x3]=_0x2ad6c2(0x143),_0x7763f[_0x7763f['Delete']=0x4]=_0x2ad6c2(0x17d),_0x7763f[_0x7763f['Solve']=0x5]=_0x2ad6c2(0x188),_0x7763f[_0x7763f[_0x2ad6c2(0x178)]=-0x1]='UNRECOGNIZED',_0x7763f))(v||{});const D=_0x104bd4=>_0x58da43(new Date(+_0x104bd4))[_0x2ad6c2(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x721151,_0x2d93e0)=>{const _0x4687d2=_0x2ad6c2,_0x3eeff2=_0x721151['get'](_0x22549e),_0x22242d=_0x721151[_0x4687d2(0x169)](_0x53e8e9);_0x2d93e0[_0x4687d2(0x13b)](_0x204ffc=>{const _0x38c92c=_0x4687d2;_0x3eeff2[_0x38c92c(0x186)](_0x204ffc)&&_0x2d93e0[_0x38c92c(0x167)](_0x204ffc);}),_0x2d93e0[_0x4687d2(0x132)]&&(await _0x22242d[_0x4687d2(0x169)](_0x4687d2(0x168),{'params':{'userIDs':[..._0x2d93e0]}}))['body'][_0x4687d2(0x17a)][_0x4687d2(0x13b)](_0x53c554=>{const _0xe47179=_0x4687d2;_0x53c554&&_0x3eeff2[_0xe47179(0x190)](_0x53c554);});};var K=Object[_0x2ad6c2(0x150)],V=(_0x255df5,_0x427d47,_0x10868f,_0x20feeb)=>{const _0x3648a0=_0x2ad6c2;for(var _0x355738=_0x20feeb>0x1?void 0x0:_0x20feeb?K(_0x427d47,_0x10868f):_0x427d47,_0x1907cf=_0x255df5[_0x3648a0(0x185)]-0x1,_0x3ce78e;_0x1907cf>=0x0;_0x1907cf--)(_0x3ce78e=_0x255df5[_0x1907cf])&&(_0x355738=_0x3ce78e(_0x355738)||_0x355738);return _0x355738;},p=(_0x5b511a,_0x401b71)=>(_0x47de31,_0xee39a1)=>_0x401b71(_0x47de31,_0xee39a1,_0x5b511a);let S=class extends _0x1fa45d{constructor(_0x118ba6,_0x5c6c4f,_0x1c4e70,_0x3a2477){const _0x3120b1=_0x2ad6c2;super(),this[_0x3120b1(0x139)]=_0x118ba6,this['_threadCommentModel']=_0x5c6c4f,this[_0x3120b1(0x189)]=_0x1c4e70,this[_0x3120b1(0x180)]=_0x3a2477,this[_0x3120b1(0x149)](),this[_0x3120b1(0x13f)]();}['_initUserSync'](){const _0x4700d1=_0x2ad6c2;this['disposeWithMe'](this[_0x4700d1(0x170)][_0x4700d1(0x174)]['pipe'](_0x2a95f0(0x10))[_0x4700d1(0x160)](_0x4cb8c7=>{const _0x3a2a8b=_0x4700d1,_0x1742d3=new Set();_0x4cb8c7[_0x3a2a8b(0x13b)](_0x31b249=>{const _0x4779f4=_0x3a2a8b;switch(_0x31b249[_0x4779f4(0x171)]){case'add':{const _0x350c96=_0x31b249['payload'][_0x4779f4(0x15d)];_0x1742d3[_0x4779f4(0x12d)](_0x350c96);break;}}}),B(this[_0x3a2a8b(0x180)],_0x1742d3);}));}[_0x2ad6c2(0x149)](){const _0x5b9f59=_0x2ad6c2;this[_0x5b9f59(0x15f)](this[_0x5b9f59(0x139)]['commentUpdate$'][_0x5b9f59(0x160)](async _0x35ff50=>{const _0x21ae36=_0x5b9f59;var _0x3f22f3,_0x2a38a2,_0x5511ce,_0x4f3680;const _0x51a80a=(_0x3f22f3=this['_threadCommentModel']['getUnit'](_0x35ff50[_0x21ae36(0x17e)])['find'](_0x47b478=>_0x47b478[_0x21ae36(0x138)]===_0x35ff50[_0x21ae36(0x138)]))==null?void 0x0:_0x3f22f3[_0x21ae36(0x15c)];if(!_0x51a80a)return;const {unitId:_0x192ae5,subUnitId:_0x53959e}=_0x51a80a;switch(_0x35ff50[_0x21ae36(0x153)]&&this[_0x21ae36(0x189)][_0x21ae36(0x190)](_0x35ff50[_0x21ae36(0x153)]),_0x35ff50[_0x21ae36(0x171)]){case v[_0x21ae36(0x16a)]:break;case v['Reply']:{this[_0x21ae36(0x170)]['addComment'](_0x192ae5,_0x53959e,{'unitId':_0x192ae5,'subUnitId':_0x53959e,'ref':'','id':_0x35ff50[_0x21ae36(0x18d)],'dT':D(+_0x35ff50[_0x21ae36(0x148)]),'threadId':_0x35ff50[_0x21ae36(0x138)],'personId':(_0x5511ce=(_0x2a38a2=_0x35ff50[_0x21ae36(0x153)])==null?void 0x0:_0x2a38a2[_0x21ae36(0x157)])!=null?_0x5511ce:_0x35ff50[_0x21ae36(0x147)],'text':JSON[_0x21ae36(0x176)](_0x35ff50[_0x21ae36(0x18c)]),'parentId':_0x51a80a['id']});break;}case v[_0x21ae36(0x17d)]:{const _0x1b8060=this[_0x21ae36(0x170)]['getComment'](_0x192ae5,_0x53959e,_0x35ff50[_0x21ae36(0x18d)]);_0x1b8060&&_0x1b8060[_0x21ae36(0x145)]&&this[_0x21ae36(0x170)]['deleteComment'](_0x192ae5,_0x53959e,_0x35ff50[_0x21ae36(0x18d)]);break;}case v[_0x21ae36(0x143)]:{this[_0x21ae36(0x170)]['updateComment'](_0x192ae5,_0x53959e,{'commentId':_0x35ff50[_0x21ae36(0x18d)],'text':JSON[_0x21ae36(0x176)](_0x35ff50['content'])});break;}case v[_0x21ae36(0x188)]:{const _0x3fd6a8=(_0x4f3680=this[_0x21ae36(0x170)][_0x21ae36(0x14d)](_0x35ff50[_0x21ae36(0x17e)])['find'](_0x2dd5f9=>_0x2dd5f9[_0x21ae36(0x138)]===_0x35ff50[_0x21ae36(0x138)]))==null?void 0x0:_0x4f3680[_0x21ae36(0x15c)];_0x3fd6a8&&this[_0x21ae36(0x170)]['resolveComment'](_0x192ae5,_0x53959e,_0x3fd6a8['id'],_0x35ff50['solved']===I['Solved']);break;}}}));}};function _0x215a(_0x3d679e,_0x388dc5){const _0x158ac8=_0x158a();return _0x215a=function(_0x215a61,_0x52a019){_0x215a61=_0x215a61-0x12d;let _0x3ee5bd=_0x158ac8[_0x215a61];return _0x3ee5bd;},_0x215a(_0x3d679e,_0x388dc5);}S=V([p(0x0,_0x289e88(_0x4100be)),p(0x1,_0x289e88(_0x2b5e60)),p(0x2,_0x289e88(_0x22549e)),p(0x3,_0x289e88(_0x2db82f))],S);const z=_0x2ad6c2(0x13d),M={};var k=Object[_0x2ad6c2(0x150)],Q=(_0x4efd54,_0x1eb9e1,_0x1d12c4,_0x672b1f)=>{const _0x15b23a=_0x2ad6c2;for(var _0x24e151=_0x672b1f>0x1?void 0x0:_0x672b1f?k(_0x1eb9e1,_0x1d12c4):_0x1eb9e1,_0x1b8504=_0x4efd54[_0x15b23a(0x185)]-0x1,_0x35c3f6;_0x1b8504>=0x0;_0x1b8504--)(_0x35c3f6=_0x4efd54[_0x1b8504])&&(_0x24e151=_0x35c3f6(_0x24e151)||_0x24e151);return _0x24e151;},_=(_0x213255,_0x561aaf)=>(_0x5a660b,_0xe137ea)=>_0x561aaf(_0x5a660b,_0xe137ea,_0x213255);function X(_0x2458b3,_0x124fe4){const _0x32cd94=_0x2ad6c2,_0x9bfa11=_0x2458b3[_0x32cd94(0x163)][0x0];return{..._0x124fe4,'id':_0x9bfa11[_0x32cd94(0x18d)],'resolved':_0x2458b3['solved']===0x1,'dT':D(_0x9bfa11['createTimestamp']),'personId':_0x9bfa11['userId'],'threadId':_0x9bfa11['threadId']};}function ee(_0x19e63e,_0x3c4cbd,_0x4f8426){const _0x59cf8b=_0x2ad6c2;var _0x1384af,_0x52d210;if(((_0x52d210=(_0x1384af=_0x19e63e==null?void 0x0:_0x19e63e[_0x59cf8b(0x163)])==null?void 0x0:_0x1384af[_0x59cf8b(0x185)])!=null?_0x52d210:0x0)>0x0){const _0x5aa133=(_0x2d0176,_0x4187cd)=>({'id':_0x2d0176['replyId'],'threadId':_0x2d0176[_0x59cf8b(0x138)],'dT':D(_0x2d0176[_0x59cf8b(0x148)]),'personId':_0x2d0176[_0x59cf8b(0x147)],'resolved':_0x19e63e[_0x59cf8b(0x151)]===I[_0x59cf8b(0x173)],'unitId':_0x3c4cbd,'subUnitId':_0x4f8426,'text':JSON[_0x59cf8b(0x176)](_0x2d0176['content']),'parentId':_0x4187cd}),_0x16601b=_0x5aa133(_0x19e63e[_0x59cf8b(0x163)][0x0]);return{..._0x16601b,'children':_0x19e63e['replies'][_0x59cf8b(0x141)](0x1)[_0x59cf8b(0x130)](_0x350417=>_0x5aa133(_0x350417,_0x16601b['id']))};}return null;}let f=class{constructor(_0x417e57,_0x322959,_0x170dbe,_0x1894c2){const _0x2d7747=_0x2ad6c2;this['_httpService']=_0x417e57,this[_0x2d7747(0x189)]=_0x322959,this['_sessionService']=_0x170dbe,this[_0x2d7747(0x180)]=_0x1894c2;}async['addComment'](_0x9dc8df){const _0x110ef3=_0x2ad6c2;var _0x4ede79,_0x1135a3;const {parentId:_0x4b227f,unitId:_0x437bf7,text:_0x4f9b28,threadId:_0xf6be0d}=_0x9dc8df,_0x48cfe0=(_0x1135a3=(_0x4ede79=_0x4f9b28['customRanges'])==null?void 0x0:_0x4ede79[_0x110ef3(0x181)](_0x2de126=>_0x2de126[_0x110ef3(0x175)]===_0x224c09[_0x110ef3(0x155)])[_0x110ef3(0x130)](_0x3b248c=>_0x3b248c[_0x110ef3(0x131)]))!=null?_0x1135a3:[],_0x10505f=JSON[_0x110ef3(0x14f)](_0x4f9b28),_0x530e5f=(await this[_0x110ef3(0x166)]['requireSession'](_0x437bf7))['getMemberID']();if(_0x4b227f){const _0x1b0f69={'memberId':_0x530e5f,'unitId':_0x437bf7,'content':_0x10505f,'mention':_0x48cfe0,'threadId':_0xf6be0d},_0x431efa=(await this['_httpService'][_0x110ef3(0x12e)]('/universer-api/comment/unit/'+_0x437bf7+_0x110ef3(0x18f),{'body':_0x1b0f69}))[_0x110ef3(0x17b)][_0x110ef3(0x17f)];return{..._0x9dc8df,'id':_0x431efa['replyId'],'dT':_0x58da43(+_0x431efa[_0x110ef3(0x148)])[_0x110ef3(0x179)](_0x110ef3(0x15b)),'personId':_0x431efa[_0x110ef3(0x147)]};}else{const _0x43bcc6={'memberId':_0x530e5f,'unitId':_0x437bf7,'content':_0x10505f,'mention':_0x48cfe0},_0x388e06=await this[_0x110ef3(0x187)][_0x110ef3(0x12e)](_0x110ef3(0x18b)+_0x437bf7+_0x110ef3(0x135),{'body':_0x43bcc6});return X(_0x388e06[_0x110ef3(0x17b)][_0x110ef3(0x16d)],_0x9dc8df);}}async['updateComment'](_0x7d8a6b){const _0x40f9f0=_0x2ad6c2;var _0x2ac1eb,_0x3cbdde;const {text:_0x9c5980,unitId:_0x35249}=_0x7d8a6b,_0x3c996b=(_0x3cbdde=(_0x2ac1eb=_0x9c5980[_0x40f9f0(0x159)])==null?void 0x0:_0x2ac1eb[_0x40f9f0(0x181)](_0x2c66c1=>_0x2c66c1['rangeType']===_0x224c09[_0x40f9f0(0x155)])[_0x40f9f0(0x130)](_0x216204=>_0x216204[_0x40f9f0(0x131)]))!=null?_0x3cbdde:[],_0x11fc6e=JSON['stringify'](_0x9c5980),_0x3a3052=_0x7d8a6b['threadId'],_0x409050=_0x7d8a6b['id'],_0x3b9ed7={'memberId':(await this[_0x40f9f0(0x166)][_0x40f9f0(0x164)](_0x35249))[_0x40f9f0(0x191)](),'unitId':_0x35249,'threadId':_0x3a3052,'mention':_0x3c996b,'content':_0x11fc6e,'replyId':_0x409050},_0x1762ad=await this[_0x40f9f0(0x187)]['post'](_0x40f9f0(0x18b)+_0x35249+_0x40f9f0(0x13e),{'body':_0x3b9ed7});return!_0x1762ad[_0x40f9f0(0x17b)]['error']||_0x1762ad[_0x40f9f0(0x17b)][_0x40f9f0(0x184)][_0x40f9f0(0x15a)]===0x1;}async[_0x2ad6c2(0x14c)](_0xddbdf0){const _0x587b84=_0x2ad6c2,{unitId:_0x494ee7}=_0xddbdf0,_0x4cc03f=_0xddbdf0[_0x587b84(0x138)],_0x24f1aa={'memberId':this['_userService'][_0x587b84(0x152)]()[_0x587b84(0x157)],'unitId':_0x494ee7,'threadId':_0x4cc03f,'solved':_0xddbdf0['resolved']?I[_0x587b84(0x173)]:I[_0x587b84(0x154)]},_0x402204=await this[_0x587b84(0x187)][_0x587b84(0x12e)]('/universer-api/comment/unit/'+_0x494ee7+_0x587b84(0x182),{'body':_0x24f1aa});return!_0x402204[_0x587b84(0x17b)][_0x587b84(0x184)]||_0x402204[_0x587b84(0x17b)][_0x587b84(0x184)][_0x587b84(0x15a)]===0x1;}async[_0x2ad6c2(0x16c)](_0x5b8638,_0x23f280,_0x150fd8,_0x7a7fdc){const _0x5ec2af=_0x2ad6c2,_0x29dbde={'memberId':(await this[_0x5ec2af(0x166)][_0x5ec2af(0x164)](_0x5b8638))['getMemberID'](),'threadId':_0x150fd8,'replyId':_0x7a7fdc,'unitId':_0x5b8638},_0x1596c8=await this[_0x5ec2af(0x187)][_0x5ec2af(0x12e)](_0x5ec2af(0x18b)+_0x5b8638+_0x5ec2af(0x136),{'body':_0x29dbde});return!_0x1596c8[_0x5ec2af(0x17b)][_0x5ec2af(0x184)]||_0x1596c8[_0x5ec2af(0x17b)][_0x5ec2af(0x184)]['code']===0x1;}async['listComments'](_0x25e47f,_0x120bbd,_0x51d4fd){const _0xc18bc1=_0x2ad6c2,_0x59b6a3={'unitId':_0x25e47f,'threadId':_0x51d4fd},_0x3ef5b7=await this[_0xc18bc1(0x187)]['post'](_0xc18bc1(0x18b)+_0x25e47f+'/list',{'body':_0x59b6a3}),_0xf546bf=_0x51d4fd['map'](_0x383eea=>ee(_0x3ef5b7['body']['comments'][_0x383eea],_0x25e47f,_0x120bbd))[_0xc18bc1(0x181)](Boolean);return Object[_0xc18bc1(0x146)](_0x3ef5b7[_0xc18bc1(0x17b)]['users'])[_0xc18bc1(0x13b)](_0x4b69fb=>{const _0x19554b=_0xc18bc1;this[_0x19554b(0x189)]['addUser'](_0x4b69fb);}),_0xf546bf;}[_0x2ad6c2(0x18a)](_0x353093){const _0x5edf9f=_0x2ad6c2;return{'id':_0x353093['id'],'threadId':_0x353093[_0x5edf9f(0x138)],'ref':_0x353093[_0x5edf9f(0x14a)]};}};f=Q([_(0x0,_0x289e88(_0x53e8e9)),_(0x1,_0x289e88(_0x22549e)),_(0x2,_0x289e88(_0x341e14)),_(0x3,_0x289e88(_0x2db82f))],f);var re=Object[_0x2ad6c2(0x150)],te=(_0x41a0cd,_0x429955,_0x179b16,_0x4e0036)=>{const _0x1e71b3=_0x2ad6c2;for(var _0xc0259c=_0x4e0036>0x1?void 0x0:_0x4e0036?re(_0x429955,_0x179b16):_0x429955,_0x11d118=_0x41a0cd[_0x1e71b3(0x185)]-0x1,_0x3b5bad;_0x11d118>=0x0;_0x11d118--)(_0x3b5bad=_0x41a0cd[_0x11d118])&&(_0xc0259c=_0x3b5bad(_0xc0259c)||_0xc0259c);return _0xc0259c;},N=(_0x42e89b,_0x4f2f31)=>(_0x42e6f8,_0x484fcf)=>_0x4f2f31(_0x42e6f8,_0x484fcf,_0x42e89b);let g=class extends _0x1fa45d{constructor(_0x451df5,_0x2d40fe){const _0x51af22=_0x2ad6c2;super(),this['_threadCommentDataSourceService']=_0x451df5,this[_0x51af22(0x158)]=_0x2d40fe,this[_0x51af22(0x13c)]();}[_0x2ad6c2(0x13c)](){const _0x349bbc=_0x2ad6c2;this[_0x349bbc(0x162)][_0x349bbc(0x12f)]=this['_threadCommentDataSource'],this[_0x349bbc(0x162)][_0x349bbc(0x161)]=!0x1;}};g=te([N(0x0,_0xa122ed),N(0x1,_0x289e88(f))],g);var se=Object[_0x2ad6c2(0x140)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xbaec03,_0x52847d,_0x2d9ed6)=>_0x52847d in _0xbaec03?se(_0xbaec03,_0x52847d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d9ed6}):_0xbaec03[_0x52847d]=_0x2d9ed6,ie=(_0x2971a6,_0x1e231b,_0x3e4294,_0x36bc4a)=>{const _0x35267d=_0x2ad6c2;for(var _0x892447=_0x36bc4a>0x1?void 0x0:_0x36bc4a?oe(_0x1e231b,_0x3e4294):_0x1e231b,_0x23113c=_0x2971a6[_0x35267d(0x185)]-0x1,_0xcc0ad5;_0x23113c>=0x0;_0x23113c--)(_0xcc0ad5=_0x2971a6[_0x23113c])&&(_0x892447=_0xcc0ad5(_0x892447)||_0x892447);return _0x892447;},w=(_0x14aa6b,_0x2018fc)=>(_0x129f40,_0x12061b)=>_0x2018fc(_0x129f40,_0x12061b,_0x14aa6b),$=(_0x563e30,_0x5da3d0,_0x24dbb3)=>ne(_0x563e30,typeof _0x5da3d0!=_0x2ad6c2(0x177)?_0x5da3d0+'':_0x5da3d0,_0x24dbb3);let b=class extends _0x73f04a{constructor(_0x563aa6=M,_0x491ec,_0x18e85c){const _0xc61e22=_0x2ad6c2;super(),this[_0xc61e22(0x15e)]=_0x563aa6,this[_0xc61e22(0x180)]=_0x491ec,this[_0xc61e22(0x137)]=_0x18e85c;const {..._0xdf7248}=_0x3e2c99({},M,this[_0xc61e22(0x15e)]);this['_configService'][_0xc61e22(0x16b)](z,_0xdf7248);}[_0x2ad6c2(0x144)](){[[f],[g],[S]]['forEach'](_0x477aaa=>{const _0x59b46a=_0x215a;this['_injector'][_0x59b46a(0x12d)](_0x477aaa);});}[_0x2ad6c2(0x14b)](){const _0x1e562c=_0x2ad6c2;this[_0x1e562c(0x180)]['get'](g),this[_0x1e562c(0x180)]['get'](S);}};$(b,_0x2ad6c2(0x183),W),$(b,_0x2ad6c2(0x171),_0x24dc40[_0x2ad6c2(0x16e)]),b=ie([_0x1a91bb(_0x4a8a90,_0x5047d4,_0x2652fc),w(0x1,_0x289e88(_0x2db82f)),w(0x2,_0x1f33d5)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x315572=_0x2001;(function(_0x1b0c2d,_0x1cca45){const _0x41fe69=_0x2001,_0x2303b2=_0x1b0c2d();while(!![]){try{const _0x28e32a=parseInt(_0x41fe69(0x10e))/0x1*(parseInt(_0x41fe69(0xe8))/0x2)+-parseInt(_0x41fe69(0x14c))/0x3+-parseInt(_0x41fe69(0x14e))/0x4*(parseInt(_0x41fe69(0xe6))/0x5)+-parseInt(_0x41fe69(0x111))/0x6+parseInt(_0x41fe69(0x129))/0x7*(parseInt(_0x41fe69(0x140))/0x8)+-parseInt(_0x41fe69(0xf0))/0x9*(parseInt(_0x41fe69(0xf3))/0xa)+parseInt(_0x41fe69(0x10b))/0xb*(parseInt(_0x41fe69(0xfc))/0xc);if(_0x28e32a===_0x1cca45)break;else _0x2303b2['push'](_0x2303b2['shift']());}catch(_0xabddd4){_0x2303b2['push'](_0x2303b2['shift']());}}}(_0x4a3d,0x3d129));import{CommentService as _0xf55148,CollaborationSessionService as _0x3367e2,UniverCollaborationClientPlugin as _0xbc1850}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c6876}from'@univerjs-pro/license';import{dayjs as _0x208de3,UserManagerService as _0x4b5ea8,Inject as _0x240b39,Injector as _0x8b9753,Disposable as _0x5145d0,CustomRangeType as _0x5cf3b6,UniverInstanceType as _0x1a1c01,DependentOn as _0x1c769b,IConfigService as _0x9dd781,Plugin as _0x336e2b,merge as _0x1497a9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b820e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43e662,IThreadCommentDataSourceService as _0xba9def}from'@univerjs/thread-comment';import{bufferTime as _0x1ade61}from'rxjs';function _0x2001(_0x4972d1,_0x402487){const _0x4a3de2=_0x4a3d();return _0x2001=function(_0x20011e,_0x5b4cf3){_0x20011e=_0x20011e-0xe6;let _0x40ef97=_0x4a3de2[_0x20011e];return _0x40ef97;},_0x2001(_0x4972d1,_0x402487);}import{HTTPService as _0x56f64f}from'@univerjs/network';const W=_0x315572(0x126);var I=(_0x6c0efa=>(_0x6c0efa[_0x6c0efa[_0x315572(0x10d)]=0x0]=_0x315572(0x10d),_0x6c0efa[_0x6c0efa[_0x315572(0x153)]=0x1]='Solved',_0x6c0efa[_0x6c0efa[_0x315572(0x148)]=-0x1]=_0x315572(0x148),_0x6c0efa))(I||{}),v=(_0x18d274=>(_0x18d274[_0x18d274[_0x315572(0x11b)]=0x0]=_0x315572(0x11b),_0x18d274[_0x18d274['Add']=0x1]=_0x315572(0x11e),_0x18d274[_0x18d274['Reply']=0x2]=_0x315572(0x13c),_0x18d274[_0x18d274[_0x315572(0x105)]=0x3]=_0x315572(0x105),_0x18d274[_0x18d274[_0x315572(0x14f)]=0x4]=_0x315572(0x14f),_0x18d274[_0x18d274[_0x315572(0x14d)]=0x5]=_0x315572(0x14d),_0x18d274[_0x18d274[_0x315572(0x148)]=-0x1]='UNRECOGNIZED',_0x18d274))(v||{});const D=_0x202c35=>_0x208de3(new Date(+_0x202c35))[_0x315572(0x118)](_0x315572(0x12f)),B=async(_0xd9d44b,_0x14a0ba)=>{const _0x988dd=_0x315572,_0x2876b1=_0xd9d44b[_0x988dd(0x10f)](_0x4b5ea8),_0x1b1ebb=_0xd9d44b[_0x988dd(0x10f)](_0x56f64f);_0x14a0ba[_0x988dd(0x13d)](_0x1f84ca=>{const _0x503569=_0x988dd;_0x2876b1['getUser'](_0x1f84ca)&&_0x14a0ba[_0x503569(0xf6)](_0x1f84ca);}),_0x14a0ba[_0x988dd(0xef)]&&(await _0x1b1ebb[_0x988dd(0x10f)](_0x988dd(0x13f),{'params':{'userIDs':[..._0x14a0ba]}}))[_0x988dd(0xf1)][_0x988dd(0x137)][_0x988dd(0x13d)](_0x549f05=>{const _0x572399=_0x988dd;_0x549f05&&_0x2876b1[_0x572399(0x139)](_0x549f05);});};var K=Object[_0x315572(0xf4)],V=(_0x5c598e,_0x573425,_0x13ab72,_0x407e73)=>{const _0x4d022b=_0x315572;for(var _0x59262d=_0x407e73>0x1?void 0x0:_0x407e73?K(_0x573425,_0x13ab72):_0x573425,_0x4cd28f=_0x5c598e[_0x4d022b(0x103)]-0x1,_0x177462;_0x4cd28f>=0x0;_0x4cd28f--)(_0x177462=_0x5c598e[_0x4cd28f])&&(_0x59262d=_0x177462(_0x59262d)||_0x59262d);return _0x59262d;},p=(_0x3e833a,_0x376724)=>(_0x3a19c2,_0x436870)=>_0x376724(_0x3a19c2,_0x436870,_0x3e833a);let S=class extends _0x5145d0{constructor(_0x114727,_0xead3d8,_0x393b55,_0x1fa4f1){const _0x290cda=_0x315572;super(),this[_0x290cda(0x149)]=_0x114727,this[_0x290cda(0x146)]=_0xead3d8,this[_0x290cda(0x128)]=_0x393b55,this[_0x290cda(0x132)]=_0x1fa4f1,this['_init'](),this[_0x290cda(0x114)]();}[_0x315572(0x114)](){const _0x34eeb5=_0x315572;this[_0x34eeb5(0x11c)](this[_0x34eeb5(0x146)]['commentUpdate$'][_0x34eeb5(0x13e)](_0x1ade61(0x10))[_0x34eeb5(0xe7)](_0x3b686b=>{const _0x496125=_0x34eeb5,_0x266165=new Set();_0x3b686b[_0x496125(0x13d)](_0x4a3d59=>{const _0x3a1f57=_0x496125;switch(_0x4a3d59[_0x3a1f57(0x12c)]){case _0x3a1f57(0x131):{const _0x4d88cf=_0x4a3d59['payload'][_0x3a1f57(0x130)];_0x266165[_0x3a1f57(0x131)](_0x4d88cf);break;}}}),B(this[_0x496125(0x132)],_0x266165);}));}[_0x315572(0xe9)](){const _0x90656e=_0x315572;this[_0x90656e(0x11c)](this[_0x90656e(0x149)][_0x90656e(0xec)][_0x90656e(0xe7)](async _0x12d3c1=>{const _0x5ed802=_0x90656e;var _0x3c0728,_0x555bb7,_0x1144a0,_0x364a79;const _0x31ed20=(_0x3c0728=this[_0x5ed802(0x146)]['getUnit'](_0x12d3c1[_0x5ed802(0x13a)])['find'](_0x565297=>_0x565297[_0x5ed802(0x10c)]===_0x12d3c1['threadId']))==null?void 0x0:_0x3c0728['root'];if(!_0x31ed20)return;const {unitId:_0x3ac16f,subUnitId:_0x46b49c}=_0x31ed20;switch(_0x12d3c1['user']&&this['_userService']['addUser'](_0x12d3c1[_0x5ed802(0xf5)]),_0x12d3c1[_0x5ed802(0x12c)]){case v[_0x5ed802(0x11e)]:break;case v['Reply']:{this[_0x5ed802(0x146)][_0x5ed802(0xfa)](_0x3ac16f,_0x46b49c,{'unitId':_0x3ac16f,'subUnitId':_0x46b49c,'ref':'','id':_0x12d3c1[_0x5ed802(0xf7)],'dT':D(+_0x12d3c1[_0x5ed802(0x11d)]),'threadId':_0x12d3c1[_0x5ed802(0x10c)],'personId':(_0x1144a0=(_0x555bb7=_0x12d3c1[_0x5ed802(0xf5)])==null?void 0x0:_0x555bb7[_0x5ed802(0x119)])!=null?_0x1144a0:_0x12d3c1[_0x5ed802(0x110)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)]),'parentId':_0x31ed20['id']});break;}case v[_0x5ed802(0x14f)]:{const _0x3a9ef0=this[_0x5ed802(0x146)][_0x5ed802(0x100)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);_0x3a9ef0&&_0x3a9ef0[_0x5ed802(0x122)]&&this[_0x5ed802(0x146)][_0x5ed802(0x142)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5ed802(0xee)](_0x3ac16f,_0x46b49c,{'commentId':_0x12d3c1[_0x5ed802(0xf7)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)])});break;}case v[_0x5ed802(0x14d)]:{const _0xb0d951=(_0x364a79=this[_0x5ed802(0x146)][_0x5ed802(0x107)](_0x12d3c1[_0x5ed802(0x13a)])[_0x5ed802(0x143)](_0xd3f8f=>_0xd3f8f[_0x5ed802(0x10c)]===_0x12d3c1[_0x5ed802(0x10c)]))==null?void 0x0:_0x364a79[_0x5ed802(0x101)];_0xb0d951&&this[_0x5ed802(0x146)][_0x5ed802(0x12a)](_0x3ac16f,_0x46b49c,_0xb0d951['id'],_0x12d3c1[_0x5ed802(0x144)]===I[_0x5ed802(0x153)]);break;}}}));}};S=V([p(0x0,_0x240b39(_0xf55148)),p(0x1,_0x240b39(_0x43e662)),p(0x2,_0x240b39(_0x4b5ea8)),p(0x3,_0x240b39(_0x8b9753))],S);const z=_0x315572(0x141),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5396b9,_0x504daa,_0x656df,_0x148842)=>{const _0x5890de=_0x315572;for(var _0x8abd7a=_0x148842>0x1?void 0x0:_0x148842?k(_0x504daa,_0x656df):_0x504daa,_0x17acd0=_0x5396b9[_0x5890de(0x103)]-0x1,_0x888dd3;_0x17acd0>=0x0;_0x17acd0--)(_0x888dd3=_0x5396b9[_0x17acd0])&&(_0x8abd7a=_0x888dd3(_0x8abd7a)||_0x8abd7a);return _0x8abd7a;},_=(_0x4718b4,_0x332c00)=>(_0x3ac36e,_0x171bb2)=>_0x332c00(_0x3ac36e,_0x171bb2,_0x4718b4);function X(_0x2229ff,_0x45240a){const _0x4c2e08=_0x315572,_0x2cb1b4=_0x2229ff[_0x4c2e08(0x123)][0x0];return{..._0x45240a,'id':_0x2cb1b4[_0x4c2e08(0xf7)],'resolved':_0x2229ff[_0x4c2e08(0x144)]===0x1,'dT':D(_0x2cb1b4['createTimestamp']),'personId':_0x2cb1b4['userId'],'threadId':_0x2cb1b4['threadId']};}function ee(_0x2c0425,_0x224b9b,_0x330826){const _0x387137=_0x315572;var _0x14f0cd,_0x55c62a;if(((_0x55c62a=(_0x14f0cd=_0x2c0425==null?void 0x0:_0x2c0425[_0x387137(0x123)])==null?void 0x0:_0x14f0cd[_0x387137(0x103)])!=null?_0x55c62a:0x0)>0x0){const _0x3c43f2=(_0x34b245,_0x472142)=>({'id':_0x34b245[_0x387137(0xf7)],'threadId':_0x34b245[_0x387137(0x10c)],'dT':D(_0x34b245[_0x387137(0x11d)]),'personId':_0x34b245[_0x387137(0x110)],'resolved':_0x2c0425['solved']===I[_0x387137(0x153)],'unitId':_0x224b9b,'subUnitId':_0x330826,'text':JSON[_0x387137(0x135)](_0x34b245[_0x387137(0x152)]),'parentId':_0x472142}),_0x29b2e3=_0x3c43f2(_0x2c0425[_0x387137(0x123)][0x0]);return{..._0x29b2e3,'children':_0x2c0425[_0x387137(0x123)]['slice'](0x1)[_0x387137(0xeb)](_0x52e60d=>_0x3c43f2(_0x52e60d,_0x29b2e3['id']))};}return null;}let f=class{constructor(_0x1d1cf8,_0x5af46d,_0x38bc1c,_0x182f22){const _0x518529=_0x315572;this[_0x518529(0x109)]=_0x1d1cf8,this[_0x518529(0x128)]=_0x5af46d,this[_0x518529(0x138)]=_0x38bc1c,this[_0x518529(0x132)]=_0x182f22;}async[_0x315572(0xfa)](_0x43d195){const _0x674dca=_0x315572;var _0x44d0b0,_0x222111;const {parentId:_0x1f984a,unitId:_0x184195,text:_0xf7392b,threadId:_0x5ab09d}=_0x43d195,_0x2dfb29=(_0x222111=(_0x44d0b0=_0xf7392b[_0x674dca(0x151)])==null?void 0x0:_0x44d0b0['filter'](_0x4fb584=>_0x4fb584[_0x674dca(0x121)]===_0x5cf3b6[_0x674dca(0x117)])[_0x674dca(0xeb)](_0x22a0bc=>_0x22a0bc['rangeId']))!=null?_0x222111:[],_0x481b44=JSON[_0x674dca(0x147)](_0xf7392b),_0x594a79=(await this[_0x674dca(0x138)][_0x674dca(0xfb)](_0x184195))[_0x674dca(0xff)]();if(_0x1f984a){const _0x449a9f={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29,'threadId':_0x5ab09d},_0x1012a3=(await this['_httpService']['post'](_0x674dca(0x12e)+_0x184195+_0x674dca(0xed),{'body':_0x449a9f}))['body'][_0x674dca(0xf9)];return{..._0x43d195,'id':_0x1012a3[_0x674dca(0xf7)],'dT':_0x208de3(+_0x1012a3['createTimestamp'])[_0x674dca(0x118)](_0x674dca(0x12f)),'personId':_0x1012a3[_0x674dca(0x110)]};}else{const _0x45b4fd={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29},_0x512061=await this['_httpService'][_0x674dca(0x104)](_0x674dca(0x12e)+_0x184195+_0x674dca(0x106),{'body':_0x45b4fd});return X(_0x512061['body'][_0x674dca(0x102)],_0x43d195);}}async[_0x315572(0xee)](_0x4c8c54){const _0x49bb2d=_0x315572;var _0x510176,_0x2da60e;const {text:_0x254756,unitId:_0x3ad372}=_0x4c8c54,_0x8d0a48=(_0x2da60e=(_0x510176=_0x254756['customRanges'])==null?void 0x0:_0x510176[_0x49bb2d(0x11a)](_0x1b829a=>_0x1b829a[_0x49bb2d(0x121)]===_0x5cf3b6[_0x49bb2d(0x117)])['map'](_0xf8c20c=>_0xf8c20c[_0x49bb2d(0x116)]))!=null?_0x2da60e:[],_0x83c595=JSON[_0x49bb2d(0x147)](_0x254756),_0x47d378=_0x4c8c54[_0x49bb2d(0x10c)],_0x3443ef=_0x4c8c54['id'],_0x5570fc={'memberId':(await this[_0x49bb2d(0x138)][_0x49bb2d(0xfb)](_0x3ad372))[_0x49bb2d(0xff)](),'unitId':_0x3ad372,'threadId':_0x47d378,'mention':_0x8d0a48,'content':_0x83c595,'replyId':_0x3443ef},_0x2a52a7=await this['_httpService'][_0x49bb2d(0x104)](_0x49bb2d(0x12e)+_0x3ad372+_0x49bb2d(0x136),{'body':_0x5570fc});return!_0x2a52a7['body'][_0x49bb2d(0x112)]||_0x2a52a7[_0x49bb2d(0xf1)][_0x49bb2d(0x112)]['code']===0x1;}async[_0x315572(0x12a)](_0x5d8147){const _0x34c0aa=_0x315572,{unitId:_0x22aab8}=_0x5d8147,_0x4a024c=_0x5d8147[_0x34c0aa(0x10c)],_0x3c3dbc={'memberId':this[_0x34c0aa(0x128)][_0x34c0aa(0xfe)]()[_0x34c0aa(0x119)],'unitId':_0x22aab8,'threadId':_0x4a024c,'solved':_0x5d8147[_0x34c0aa(0x108)]?I[_0x34c0aa(0x153)]:I[_0x34c0aa(0x10d)]},_0x1f7682=await this[_0x34c0aa(0x109)]['post'](_0x34c0aa(0x12e)+_0x22aab8+_0x34c0aa(0x120),{'body':_0x3c3dbc});return!_0x1f7682[_0x34c0aa(0xf1)][_0x34c0aa(0x112)]||_0x1f7682[_0x34c0aa(0xf1)]['error']['code']===0x1;}async[_0x315572(0x142)](_0x132408,_0x372f71,_0x36567c,_0x34461b){const _0xb909fe=_0x315572,_0x4817bd={'memberId':(await this['_sessionService'][_0xb909fe(0xfb)](_0x132408))[_0xb909fe(0xff)](),'threadId':_0x36567c,'replyId':_0x34461b,'unitId':_0x132408},_0x476760=await this[_0xb909fe(0x109)]['post']('/universer-api/comment/unit/'+_0x132408+_0xb909fe(0x124),{'body':_0x4817bd});return!_0x476760[_0xb909fe(0xf1)][_0xb909fe(0x112)]||_0x476760[_0xb909fe(0xf1)]['error'][_0xb909fe(0xf2)]===0x1;}async[_0x315572(0x134)](_0x4b307b,_0x51cb17,_0xcb49a2){const _0x3fbca6=_0x315572,_0x5083d7={'unitId':_0x4b307b,'threadId':_0xcb49a2},_0x171631=await this[_0x3fbca6(0x109)][_0x3fbca6(0x104)]('/universer-api/comment/unit/'+_0x4b307b+_0x3fbca6(0x13b),{'body':_0x5083d7}),_0x1c732f=_0xcb49a2[_0x3fbca6(0xeb)](_0x5d2f16=>ee(_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x12b)][_0x5d2f16],_0x4b307b,_0x51cb17))['filter'](Boolean);return Object[_0x3fbca6(0x127)](_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x137)])[_0x3fbca6(0x13d)](_0x15c81f=>{const _0x4807ad=_0x3fbca6;this['_userService'][_0x4807ad(0x139)](_0x15c81f);}),_0x1c732f;}[_0x315572(0x133)](_0x12cf1b){const _0x8548f6=_0x315572;return{'id':_0x12cf1b['id'],'threadId':_0x12cf1b[_0x8548f6(0x10c)],'ref':_0x12cf1b[_0x8548f6(0x10a)]};}};f=Q([_(0x0,_0x240b39(_0x56f64f)),_(0x1,_0x240b39(_0x4b5ea8)),_(0x2,_0x240b39(_0x3367e2)),_(0x3,_0x240b39(_0x8b9753))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0xd8dc89,_0x4df77b,_0x5d218f,_0xc54fa2)=>{const _0x18a824=_0x315572;for(var _0x3240fe=_0xc54fa2>0x1?void 0x0:_0xc54fa2?re(_0x4df77b,_0x5d218f):_0x4df77b,_0x238e12=_0xd8dc89[_0x18a824(0x103)]-0x1,_0x140bae;_0x238e12>=0x0;_0x238e12--)(_0x140bae=_0xd8dc89[_0x238e12])&&(_0x3240fe=_0x140bae(_0x3240fe)||_0x3240fe);return _0x3240fe;},N=(_0x5d9db2,_0x2f9fd1)=>(_0xdeadbe,_0x2733c0)=>_0x2f9fd1(_0xdeadbe,_0x2733c0,_0x5d9db2);let g=class extends _0x5145d0{constructor(_0x23724d,_0x481987){const _0x593a73=_0x315572;super(),this[_0x593a73(0x11f)]=_0x23724d,this[_0x593a73(0xf8)]=_0x481987,this['_initDataSource']();}[_0x315572(0x14b)](){const _0x37f685=_0x315572;this[_0x37f685(0x11f)][_0x37f685(0x125)]=this[_0x37f685(0xf8)],this[_0x37f685(0x11f)][_0x37f685(0x113)]=!0x1;}};g=te([N(0x0,_0xba9def),N(0x1,_0x240b39(f))],g);function _0x4a3d(){const _0x22c5db=['_userService','1351qDNqpd','resolveComment','comments','type','defineProperty','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','personId','add','_injector','saveCommentToSnapshot','listComments','parse','/edit','users','_sessionService','addUser','unitId','/list','Reply','forEach','pipe','/universer-api/user/list','12304vFGZSS','thread-comment-data-source.config','deleteComment','find','solved','UNIVER_UNKNOWN','_threadCommentModel','stringify','UNRECOGNIZED','_commentService','symbol','_initDataSource','295461mRBhSn','Solve','8qgJhpM','Delete','_configService','customRanges','content','Solved','141460VyBijZ','subscribe','10JMkxlc','_init','onReady','map','commentUpdate$','/reply','updateComment','size','50454lNjRZW','body','code','260CmuQjn','getOwnPropertyDescriptor','user','delete','replyId','_threadCommentDataSource','reply','addComment','requireSession','84aIOwNi','pluginName','getCurrentUser','getMemberID','getComment','root','comment','length','post','Edit','/add','getUnit','resolved','_httpService','ref','260601umePPe','threadId','OpenOrReOpen','42412cMeuJL','get','userId','742506EWntOi','error','syncUpdateMutationToColla','_initUserSync','_config','rangeId','COMMENT','format','userID','filter','Unknown','disposeWithMe','createTimestamp','Add','_threadCommentDataSourceService','/solved','rangeType','parentId','replies','/delete','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values'];_0x4a3d=function(){return _0x22c5db;};return _0x4a3d();}var se=Object[_0x315572(0x12d)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4f258b,_0x2db574,_0x1f2589)=>_0x2db574 in _0x4f258b?se(_0x4f258b,_0x2db574,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f2589}):_0x4f258b[_0x2db574]=_0x1f2589,ie=(_0x1b3d42,_0x550c18,_0x2fd444,_0x51ac8c)=>{const _0x300c01=_0x315572;for(var _0xb07419=_0x51ac8c>0x1?void 0x0:_0x51ac8c?oe(_0x550c18,_0x2fd444):_0x550c18,_0x159aa9=_0x1b3d42[_0x300c01(0x103)]-0x1,_0x20bd06;_0x159aa9>=0x0;_0x159aa9--)(_0x20bd06=_0x1b3d42[_0x159aa9])&&(_0xb07419=_0x20bd06(_0xb07419)||_0xb07419);return _0xb07419;},w=(_0x317a0e,_0x4ada00)=>(_0x40b202,_0x464d42)=>_0x4ada00(_0x40b202,_0x464d42,_0x317a0e),$=(_0x4d5675,_0x45bc98,_0x4507ef)=>ne(_0x4d5675,typeof _0x45bc98!=_0x315572(0x14a)?_0x45bc98+'':_0x45bc98,_0x4507ef);let b=class extends _0x336e2b{constructor(_0x3c00e5=M,_0x7b54fa,_0x4d6d62){const _0x20dab2=_0x315572;super(),this[_0x20dab2(0x115)]=_0x3c00e5,this[_0x20dab2(0x132)]=_0x7b54fa,this['_configService']=_0x4d6d62;const {..._0x118b97}=_0x1497a9({},M,this[_0x20dab2(0x115)]);this[_0x20dab2(0x150)]['setConfig'](z,_0x118b97);}['onStarting'](){const _0x202919=_0x315572;[[f],[g],[S]][_0x202919(0x13d)](_0x572104=>{const _0x371670=_0x202919;this[_0x371670(0x132)][_0x371670(0x131)](_0x572104);});}[_0x315572(0xea)](){const _0x1f56c7=_0x315572;this['_injector'][_0x1f56c7(0x10f)](g),this['_injector'][_0x1f56c7(0x10f)](S);}};$(b,_0x315572(0xfd),W),$(b,_0x315572(0x12c),_0x1a1c01[_0x315572(0x145)]),b=ie([_0x1c769b(_0x1b820e,_0xbc1850,_0x5c6876),w(0x1,_0x240b39(_0x8b9753)),w(0x2,_0x9dd781)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2ad6c2=_0x215a;(function(_0x30d322,_0x47124b){const _0x1f0456=_0x215a,_0x146358=_0x30d322();while(!![]){try{const _0x3f3771=-parseInt(_0x1f0456(0x17c))/0x1+-parseInt(_0x1f0456(0x165))/0x2+parseInt(_0x1f0456(0x133))/0x3+-parseInt(_0x1f0456(0x14e))/0x4*(-parseInt(_0x1f0456(0x134))/0x5)+parseInt(_0x1f0456(0x18e))/0x6*(parseInt(_0x1f0456(0x16f))/0x7)+parseInt(_0x1f0456(0x13a))/0x8+-parseInt(_0x1f0456(0x156))/0x9*(parseInt(_0x1f0456(0x142))/0xa);if(_0x3f3771===_0x47124b)break;else _0x146358['push'](_0x146358['shift']());}catch(_0x16e4f1){_0x146358['push'](_0x146358['shift']());}}}(_0x158a,0x9a409));import{CommentService as _0x4100be,CollaborationSessionService as _0x341e14,UniverCollaborationClientPlugin as _0x5047d4}from'@univerjs-pro/collaboration-client';function _0x158a(){const _0x51bf87=['delete','/universer-api/user/list','get','Add','setConfig','deleteComment','comment','UNIVER_UNKNOWN','455QDIiwj','_threadCommentModel','type','Reply','Solved','commentUpdate$','rangeType','parse','symbol','UNRECOGNIZED','format','users','body','935270xUOLNS','Delete','unitId','reply','_injector','filter','/solved','pluginName','error','length','getUser','_httpService','Solve','_userService','saveCommentToSnapshot','/universer-api/comment/unit/','content','replyId','71466GWudtx','/reply','addUser','getMemberID','add','post','dataSource','map','rangeId','size','531756WzBjlV','3576005WRtOqo','/add','/delete','_configService','threadId','_commentService','10102936qXzAuG','forEach','_initDataSource','thread-comment-data-source.config','/edit','_initUserSync','defineProperty','slice','40Pyhprp','Edit','onStarting','parentId','values','userId','createTimestamp','_init','ref','onReady','resolveComment','getUnit','4mEJPYk','stringify','getOwnPropertyDescriptor','solved','getCurrentUser','user','OpenOrReOpen','COMMENT','3017799ZbRKWA','userID','_threadCommentDataSource','customRanges','code','YYYY/MM/DD\x20HH:mm','root','personId','_config','disposeWithMe','subscribe','syncUpdateMutationToColla','_threadCommentDataSourceService','replies','requireSession','42408LIGfAM','_sessionService'];_0x158a=function(){return _0x51bf87;};return _0x158a();}import{UniverLicensePlugin as _0x2652fc}from'@univerjs-pro/license';import{dayjs as _0x58da43,UserManagerService as _0x22549e,Inject as _0x289e88,Injector as _0x2db82f,Disposable as _0x1fa45d,CustomRangeType as _0x224c09,UniverInstanceType as _0x24dc40,DependentOn as _0x1a91bb,IConfigService as _0x1f33d5,Plugin as _0x73f04a,merge as _0x3e2c99}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4a8a90}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2b5e60,IThreadCommentDataSourceService as _0xa122ed}from'@univerjs/thread-comment';import{bufferTime as _0x2a95f0}from'rxjs';import{HTTPService as _0x53e8e9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x957b4c=>(_0x957b4c[_0x957b4c['OpenOrReOpen']=0x0]=_0x2ad6c2(0x154),_0x957b4c[_0x957b4c[_0x2ad6c2(0x173)]=0x1]=_0x2ad6c2(0x173),_0x957b4c[_0x957b4c[_0x2ad6c2(0x178)]=-0x1]=_0x2ad6c2(0x178),_0x957b4c))(I||{}),v=(_0x7763f=>(_0x7763f[_0x7763f['Unknown']=0x0]='Unknown',_0x7763f[_0x7763f[_0x2ad6c2(0x16a)]=0x1]=_0x2ad6c2(0x16a),_0x7763f[_0x7763f[_0x2ad6c2(0x172)]=0x2]=_0x2ad6c2(0x172),_0x7763f[_0x7763f[_0x2ad6c2(0x143)]=0x3]=_0x2ad6c2(0x143),_0x7763f[_0x7763f['Delete']=0x4]=_0x2ad6c2(0x17d),_0x7763f[_0x7763f['Solve']=0x5]=_0x2ad6c2(0x188),_0x7763f[_0x7763f[_0x2ad6c2(0x178)]=-0x1]='UNRECOGNIZED',_0x7763f))(v||{});const D=_0x104bd4=>_0x58da43(new Date(+_0x104bd4))[_0x2ad6c2(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x721151,_0x2d93e0)=>{const _0x4687d2=_0x2ad6c2,_0x3eeff2=_0x721151['get'](_0x22549e),_0x22242d=_0x721151[_0x4687d2(0x169)](_0x53e8e9);_0x2d93e0[_0x4687d2(0x13b)](_0x204ffc=>{const _0x38c92c=_0x4687d2;_0x3eeff2[_0x38c92c(0x186)](_0x204ffc)&&_0x2d93e0[_0x38c92c(0x167)](_0x204ffc);}),_0x2d93e0[_0x4687d2(0x132)]&&(await _0x22242d[_0x4687d2(0x169)](_0x4687d2(0x168),{'params':{'userIDs':[..._0x2d93e0]}}))['body'][_0x4687d2(0x17a)][_0x4687d2(0x13b)](_0x53c554=>{const _0xe47179=_0x4687d2;_0x53c554&&_0x3eeff2[_0xe47179(0x190)](_0x53c554);});};var K=Object[_0x2ad6c2(0x150)],V=(_0x255df5,_0x427d47,_0x10868f,_0x20feeb)=>{const _0x3648a0=_0x2ad6c2;for(var _0x355738=_0x20feeb>0x1?void 0x0:_0x20feeb?K(_0x427d47,_0x10868f):_0x427d47,_0x1907cf=_0x255df5[_0x3648a0(0x185)]-0x1,_0x3ce78e;_0x1907cf>=0x0;_0x1907cf--)(_0x3ce78e=_0x255df5[_0x1907cf])&&(_0x355738=_0x3ce78e(_0x355738)||_0x355738);return _0x355738;},p=(_0x5b511a,_0x401b71)=>(_0x47de31,_0xee39a1)=>_0x401b71(_0x47de31,_0xee39a1,_0x5b511a);let S=class extends _0x1fa45d{constructor(_0x118ba6,_0x5c6c4f,_0x1c4e70,_0x3a2477){const _0x3120b1=_0x2ad6c2;super(),this[_0x3120b1(0x139)]=_0x118ba6,this['_threadCommentModel']=_0x5c6c4f,this[_0x3120b1(0x189)]=_0x1c4e70,this[_0x3120b1(0x180)]=_0x3a2477,this[_0x3120b1(0x149)](),this[_0x3120b1(0x13f)]();}['_initUserSync'](){const _0x4700d1=_0x2ad6c2;this['disposeWithMe'](this[_0x4700d1(0x170)][_0x4700d1(0x174)]['pipe'](_0x2a95f0(0x10))[_0x4700d1(0x160)](_0x4cb8c7=>{const _0x3a2a8b=_0x4700d1,_0x1742d3=new Set();_0x4cb8c7[_0x3a2a8b(0x13b)](_0x31b249=>{const _0x4779f4=_0x3a2a8b;switch(_0x31b249[_0x4779f4(0x171)]){case'add':{const _0x350c96=_0x31b249['payload'][_0x4779f4(0x15d)];_0x1742d3[_0x4779f4(0x12d)](_0x350c96);break;}}}),B(this[_0x3a2a8b(0x180)],_0x1742d3);}));}[_0x2ad6c2(0x149)](){const _0x5b9f59=_0x2ad6c2;this[_0x5b9f59(0x15f)](this[_0x5b9f59(0x139)]['commentUpdate$'][_0x5b9f59(0x160)](async _0x35ff50=>{const _0x21ae36=_0x5b9f59;var _0x3f22f3,_0x2a38a2,_0x5511ce,_0x4f3680;const _0x51a80a=(_0x3f22f3=this['_threadCommentModel']['getUnit'](_0x35ff50[_0x21ae36(0x17e)])['find'](_0x47b478=>_0x47b478[_0x21ae36(0x138)]===_0x35ff50[_0x21ae36(0x138)]))==null?void 0x0:_0x3f22f3[_0x21ae36(0x15c)];if(!_0x51a80a)return;const {unitId:_0x192ae5,subUnitId:_0x53959e}=_0x51a80a;switch(_0x35ff50[_0x21ae36(0x153)]&&this[_0x21ae36(0x189)][_0x21ae36(0x190)](_0x35ff50[_0x21ae36(0x153)]),_0x35ff50[_0x21ae36(0x171)]){case v[_0x21ae36(0x16a)]:break;case v['Reply']:{this[_0x21ae36(0x170)]['addComment'](_0x192ae5,_0x53959e,{'unitId':_0x192ae5,'subUnitId':_0x53959e,'ref':'','id':_0x35ff50[_0x21ae36(0x18d)],'dT':D(+_0x35ff50[_0x21ae36(0x148)]),'threadId':_0x35ff50[_0x21ae36(0x138)],'personId':(_0x5511ce=(_0x2a38a2=_0x35ff50[_0x21ae36(0x153)])==null?void 0x0:_0x2a38a2[_0x21ae36(0x157)])!=null?_0x5511ce:_0x35ff50[_0x21ae36(0x147)],'text':JSON[_0x21ae36(0x176)](_0x35ff50[_0x21ae36(0x18c)]),'parentId':_0x51a80a['id']});break;}case v[_0x21ae36(0x17d)]:{const _0x1b8060=this[_0x21ae36(0x170)]['getComment'](_0x192ae5,_0x53959e,_0x35ff50[_0x21ae36(0x18d)]);_0x1b8060&&_0x1b8060[_0x21ae36(0x145)]&&this[_0x21ae36(0x170)]['deleteComment'](_0x192ae5,_0x53959e,_0x35ff50[_0x21ae36(0x18d)]);break;}case v[_0x21ae36(0x143)]:{this[_0x21ae36(0x170)]['updateComment'](_0x192ae5,_0x53959e,{'commentId':_0x35ff50[_0x21ae36(0x18d)],'text':JSON[_0x21ae36(0x176)](_0x35ff50['content'])});break;}case v[_0x21ae36(0x188)]:{const _0x3fd6a8=(_0x4f3680=this[_0x21ae36(0x170)][_0x21ae36(0x14d)](_0x35ff50[_0x21ae36(0x17e)])['find'](_0x2dd5f9=>_0x2dd5f9[_0x21ae36(0x138)]===_0x35ff50[_0x21ae36(0x138)]))==null?void 0x0:_0x4f3680[_0x21ae36(0x15c)];_0x3fd6a8&&this[_0x21ae36(0x170)]['resolveComment'](_0x192ae5,_0x53959e,_0x3fd6a8['id'],_0x35ff50['solved']===I['Solved']);break;}}}));}};function _0x215a(_0x3d679e,_0x388dc5){const _0x158ac8=_0x158a();return _0x215a=function(_0x215a61,_0x52a019){_0x215a61=_0x215a61-0x12d;let _0x3ee5bd=_0x158ac8[_0x215a61];return _0x3ee5bd;},_0x215a(_0x3d679e,_0x388dc5);}S=V([p(0x0,_0x289e88(_0x4100be)),p(0x1,_0x289e88(_0x2b5e60)),p(0x2,_0x289e88(_0x22549e)),p(0x3,_0x289e88(_0x2db82f))],S);const z=_0x2ad6c2(0x13d),M={};var k=Object[_0x2ad6c2(0x150)],Q=(_0x4efd54,_0x1eb9e1,_0x1d12c4,_0x672b1f)=>{const _0x15b23a=_0x2ad6c2;for(var _0x24e151=_0x672b1f>0x1?void 0x0:_0x672b1f?k(_0x1eb9e1,_0x1d12c4):_0x1eb9e1,_0x1b8504=_0x4efd54[_0x15b23a(0x185)]-0x1,_0x35c3f6;_0x1b8504>=0x0;_0x1b8504--)(_0x35c3f6=_0x4efd54[_0x1b8504])&&(_0x24e151=_0x35c3f6(_0x24e151)||_0x24e151);return _0x24e151;},_=(_0x213255,_0x561aaf)=>(_0x5a660b,_0xe137ea)=>_0x561aaf(_0x5a660b,_0xe137ea,_0x213255);function X(_0x2458b3,_0x124fe4){const _0x32cd94=_0x2ad6c2,_0x9bfa11=_0x2458b3[_0x32cd94(0x163)][0x0];return{..._0x124fe4,'id':_0x9bfa11[_0x32cd94(0x18d)],'resolved':_0x2458b3['solved']===0x1,'dT':D(_0x9bfa11['createTimestamp']),'personId':_0x9bfa11['userId'],'threadId':_0x9bfa11['threadId']};}function ee(_0x19e63e,_0x3c4cbd,_0x4f8426){const _0x59cf8b=_0x2ad6c2;var _0x1384af,_0x52d210;if(((_0x52d210=(_0x1384af=_0x19e63e==null?void 0x0:_0x19e63e[_0x59cf8b(0x163)])==null?void 0x0:_0x1384af[_0x59cf8b(0x185)])!=null?_0x52d210:0x0)>0x0){const _0x5aa133=(_0x2d0176,_0x4187cd)=>({'id':_0x2d0176['replyId'],'threadId':_0x2d0176[_0x59cf8b(0x138)],'dT':D(_0x2d0176[_0x59cf8b(0x148)]),'personId':_0x2d0176[_0x59cf8b(0x147)],'resolved':_0x19e63e[_0x59cf8b(0x151)]===I[_0x59cf8b(0x173)],'unitId':_0x3c4cbd,'subUnitId':_0x4f8426,'text':JSON[_0x59cf8b(0x176)](_0x2d0176['content']),'parentId':_0x4187cd}),_0x16601b=_0x5aa133(_0x19e63e[_0x59cf8b(0x163)][0x0]);return{..._0x16601b,'children':_0x19e63e['replies'][_0x59cf8b(0x141)](0x1)[_0x59cf8b(0x130)](_0x350417=>_0x5aa133(_0x350417,_0x16601b['id']))};}return null;}let f=class{constructor(_0x417e57,_0x322959,_0x170dbe,_0x1894c2){const _0x2d7747=_0x2ad6c2;this['_httpService']=_0x417e57,this[_0x2d7747(0x189)]=_0x322959,this['_sessionService']=_0x170dbe,this[_0x2d7747(0x180)]=_0x1894c2;}async['addComment'](_0x9dc8df){const _0x110ef3=_0x2ad6c2;var _0x4ede79,_0x1135a3;const {parentId:_0x4b227f,unitId:_0x437bf7,text:_0x4f9b28,threadId:_0xf6be0d}=_0x9dc8df,_0x48cfe0=(_0x1135a3=(_0x4ede79=_0x4f9b28['customRanges'])==null?void 0x0:_0x4ede79[_0x110ef3(0x181)](_0x2de126=>_0x2de126[_0x110ef3(0x175)]===_0x224c09[_0x110ef3(0x155)])[_0x110ef3(0x130)](_0x3b248c=>_0x3b248c[_0x110ef3(0x131)]))!=null?_0x1135a3:[],_0x10505f=JSON[_0x110ef3(0x14f)](_0x4f9b28),_0x530e5f=(await this[_0x110ef3(0x166)]['requireSession'](_0x437bf7))['getMemberID']();if(_0x4b227f){const _0x1b0f69={'memberId':_0x530e5f,'unitId':_0x437bf7,'content':_0x10505f,'mention':_0x48cfe0,'threadId':_0xf6be0d},_0x431efa=(await this['_httpService'][_0x110ef3(0x12e)]('/universer-api/comment/unit/'+_0x437bf7+_0x110ef3(0x18f),{'body':_0x1b0f69}))[_0x110ef3(0x17b)][_0x110ef3(0x17f)];return{..._0x9dc8df,'id':_0x431efa['replyId'],'dT':_0x58da43(+_0x431efa[_0x110ef3(0x148)])[_0x110ef3(0x179)](_0x110ef3(0x15b)),'personId':_0x431efa[_0x110ef3(0x147)]};}else{const _0x43bcc6={'memberId':_0x530e5f,'unitId':_0x437bf7,'content':_0x10505f,'mention':_0x48cfe0},_0x388e06=await this[_0x110ef3(0x187)][_0x110ef3(0x12e)](_0x110ef3(0x18b)+_0x437bf7+_0x110ef3(0x135),{'body':_0x43bcc6});return X(_0x388e06[_0x110ef3(0x17b)][_0x110ef3(0x16d)],_0x9dc8df);}}async['updateComment'](_0x7d8a6b){const _0x40f9f0=_0x2ad6c2;var _0x2ac1eb,_0x3cbdde;const {text:_0x9c5980,unitId:_0x35249}=_0x7d8a6b,_0x3c996b=(_0x3cbdde=(_0x2ac1eb=_0x9c5980[_0x40f9f0(0x159)])==null?void 0x0:_0x2ac1eb[_0x40f9f0(0x181)](_0x2c66c1=>_0x2c66c1['rangeType']===_0x224c09[_0x40f9f0(0x155)])[_0x40f9f0(0x130)](_0x216204=>_0x216204[_0x40f9f0(0x131)]))!=null?_0x3cbdde:[],_0x11fc6e=JSON['stringify'](_0x9c5980),_0x3a3052=_0x7d8a6b['threadId'],_0x409050=_0x7d8a6b['id'],_0x3b9ed7={'memberId':(await this[_0x40f9f0(0x166)][_0x40f9f0(0x164)](_0x35249))[_0x40f9f0(0x191)](),'unitId':_0x35249,'threadId':_0x3a3052,'mention':_0x3c996b,'content':_0x11fc6e,'replyId':_0x409050},_0x1762ad=await this[_0x40f9f0(0x187)]['post'](_0x40f9f0(0x18b)+_0x35249+_0x40f9f0(0x13e),{'body':_0x3b9ed7});return!_0x1762ad[_0x40f9f0(0x17b)]['error']||_0x1762ad[_0x40f9f0(0x17b)][_0x40f9f0(0x184)][_0x40f9f0(0x15a)]===0x1;}async[_0x2ad6c2(0x14c)](_0xddbdf0){const _0x587b84=_0x2ad6c2,{unitId:_0x494ee7}=_0xddbdf0,_0x4cc03f=_0xddbdf0[_0x587b84(0x138)],_0x24f1aa={'memberId':this['_userService'][_0x587b84(0x152)]()[_0x587b84(0x157)],'unitId':_0x494ee7,'threadId':_0x4cc03f,'solved':_0xddbdf0['resolved']?I[_0x587b84(0x173)]:I[_0x587b84(0x154)]},_0x402204=await this[_0x587b84(0x187)][_0x587b84(0x12e)]('/universer-api/comment/unit/'+_0x494ee7+_0x587b84(0x182),{'body':_0x24f1aa});return!_0x402204[_0x587b84(0x17b)][_0x587b84(0x184)]||_0x402204[_0x587b84(0x17b)][_0x587b84(0x184)][_0x587b84(0x15a)]===0x1;}async[_0x2ad6c2(0x16c)](_0x5b8638,_0x23f280,_0x150fd8,_0x7a7fdc){const _0x5ec2af=_0x2ad6c2,_0x29dbde={'memberId':(await this[_0x5ec2af(0x166)][_0x5ec2af(0x164)](_0x5b8638))['getMemberID'](),'threadId':_0x150fd8,'replyId':_0x7a7fdc,'unitId':_0x5b8638},_0x1596c8=await this[_0x5ec2af(0x187)][_0x5ec2af(0x12e)](_0x5ec2af(0x18b)+_0x5b8638+_0x5ec2af(0x136),{'body':_0x29dbde});return!_0x1596c8[_0x5ec2af(0x17b)][_0x5ec2af(0x184)]||_0x1596c8[_0x5ec2af(0x17b)][_0x5ec2af(0x184)]['code']===0x1;}async['listComments'](_0x25e47f,_0x120bbd,_0x51d4fd){const _0xc18bc1=_0x2ad6c2,_0x59b6a3={'unitId':_0x25e47f,'threadId':_0x51d4fd},_0x3ef5b7=await this[_0xc18bc1(0x187)]['post'](_0xc18bc1(0x18b)+_0x25e47f+'/list',{'body':_0x59b6a3}),_0xf546bf=_0x51d4fd['map'](_0x383eea=>ee(_0x3ef5b7['body']['comments'][_0x383eea],_0x25e47f,_0x120bbd))[_0xc18bc1(0x181)](Boolean);return Object[_0xc18bc1(0x146)](_0x3ef5b7[_0xc18bc1(0x17b)]['users'])[_0xc18bc1(0x13b)](_0x4b69fb=>{const _0x19554b=_0xc18bc1;this[_0x19554b(0x189)]['addUser'](_0x4b69fb);}),_0xf546bf;}[_0x2ad6c2(0x18a)](_0x353093){const _0x5edf9f=_0x2ad6c2;return{'id':_0x353093['id'],'threadId':_0x353093[_0x5edf9f(0x138)],'ref':_0x353093[_0x5edf9f(0x14a)]};}};f=Q([_(0x0,_0x289e88(_0x53e8e9)),_(0x1,_0x289e88(_0x22549e)),_(0x2,_0x289e88(_0x341e14)),_(0x3,_0x289e88(_0x2db82f))],f);var re=Object[_0x2ad6c2(0x150)],te=(_0x41a0cd,_0x429955,_0x179b16,_0x4e0036)=>{const _0x1e71b3=_0x2ad6c2;for(var _0xc0259c=_0x4e0036>0x1?void 0x0:_0x4e0036?re(_0x429955,_0x179b16):_0x429955,_0x11d118=_0x41a0cd[_0x1e71b3(0x185)]-0x1,_0x3b5bad;_0x11d118>=0x0;_0x11d118--)(_0x3b5bad=_0x41a0cd[_0x11d118])&&(_0xc0259c=_0x3b5bad(_0xc0259c)||_0xc0259c);return _0xc0259c;},N=(_0x42e89b,_0x4f2f31)=>(_0x42e6f8,_0x484fcf)=>_0x4f2f31(_0x42e6f8,_0x484fcf,_0x42e89b);let g=class extends _0x1fa45d{constructor(_0x451df5,_0x2d40fe){const _0x51af22=_0x2ad6c2;super(),this['_threadCommentDataSourceService']=_0x451df5,this[_0x51af22(0x158)]=_0x2d40fe,this[_0x51af22(0x13c)]();}[_0x2ad6c2(0x13c)](){const _0x349bbc=_0x2ad6c2;this[_0x349bbc(0x162)][_0x349bbc(0x12f)]=this['_threadCommentDataSource'],this[_0x349bbc(0x162)][_0x349bbc(0x161)]=!0x1;}};g=te([N(0x0,_0xa122ed),N(0x1,_0x289e88(f))],g);var se=Object[_0x2ad6c2(0x140)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xbaec03,_0x52847d,_0x2d9ed6)=>_0x52847d in _0xbaec03?se(_0xbaec03,_0x52847d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d9ed6}):_0xbaec03[_0x52847d]=_0x2d9ed6,ie=(_0x2971a6,_0x1e231b,_0x3e4294,_0x36bc4a)=>{const _0x35267d=_0x2ad6c2;for(var _0x892447=_0x36bc4a>0x1?void 0x0:_0x36bc4a?oe(_0x1e231b,_0x3e4294):_0x1e231b,_0x23113c=_0x2971a6[_0x35267d(0x185)]-0x1,_0xcc0ad5;_0x23113c>=0x0;_0x23113c--)(_0xcc0ad5=_0x2971a6[_0x23113c])&&(_0x892447=_0xcc0ad5(_0x892447)||_0x892447);return _0x892447;},w=(_0x14aa6b,_0x2018fc)=>(_0x129f40,_0x12061b)=>_0x2018fc(_0x129f40,_0x12061b,_0x14aa6b),$=(_0x563e30,_0x5da3d0,_0x24dbb3)=>ne(_0x563e30,typeof _0x5da3d0!=_0x2ad6c2(0x177)?_0x5da3d0+'':_0x5da3d0,_0x24dbb3);let b=class extends _0x73f04a{constructor(_0x563aa6=M,_0x491ec,_0x18e85c){const _0xc61e22=_0x2ad6c2;super(),this[_0xc61e22(0x15e)]=_0x563aa6,this[_0xc61e22(0x180)]=_0x491ec,this[_0xc61e22(0x137)]=_0x18e85c;const {..._0xdf7248}=_0x3e2c99({},M,this[_0xc61e22(0x15e)]);this['_configService'][_0xc61e22(0x16b)](z,_0xdf7248);}[_0x2ad6c2(0x144)](){[[f],[g],[S]]['forEach'](_0x477aaa=>{const _0x59b46a=_0x215a;this['_injector'][_0x59b46a(0x12d)](_0x477aaa);});}[_0x2ad6c2(0x14b)](){const _0x1e562c=_0x2ad6c2;this[_0x1e562c(0x180)]['get'](g),this[_0x1e562c(0x180)]['get'](S);}};$(b,_0x2ad6c2(0x183),W),$(b,_0x2ad6c2(0x171),_0x24dc40[_0x2ad6c2(0x16e)]),b=ie([_0x1a91bb(_0x4a8a90,_0x5047d4,_0x2652fc),w(0x1,_0x289e88(_0x2db82f)),w(0x2,_0x1f33d5)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x315572=_0x2001;(function(_0x1b0c2d,_0x1cca45){const _0x41fe69=_0x2001,_0x2303b2=_0x1b0c2d();while(!![]){try{const _0x28e32a=parseInt(_0x41fe69(0x10e))/0x1*(parseInt(_0x41fe69(0xe8))/0x2)+-parseInt(_0x41fe69(0x14c))/0x3+-parseInt(_0x41fe69(0x14e))/0x4*(parseInt(_0x41fe69(0xe6))/0x5)+-parseInt(_0x41fe69(0x111))/0x6+parseInt(_0x41fe69(0x129))/0x7*(parseInt(_0x41fe69(0x140))/0x8)+-parseInt(_0x41fe69(0xf0))/0x9*(parseInt(_0x41fe69(0xf3))/0xa)+parseInt(_0x41fe69(0x10b))/0xb*(parseInt(_0x41fe69(0xfc))/0xc);if(_0x28e32a===_0x1cca45)break;else _0x2303b2['push'](_0x2303b2['shift']());}catch(_0xabddd4){_0x2303b2['push'](_0x2303b2['shift']());}}}(_0x4a3d,0x3d129));import{CommentService as _0xf55148,CollaborationSessionService as _0x3367e2,UniverCollaborationClientPlugin as _0xbc1850}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c6876}from'@univerjs-pro/license';import{dayjs as _0x208de3,UserManagerService as _0x4b5ea8,Inject as _0x240b39,Injector as _0x8b9753,Disposable as _0x5145d0,CustomRangeType as _0x5cf3b6,UniverInstanceType as _0x1a1c01,DependentOn as _0x1c769b,IConfigService as _0x9dd781,Plugin as _0x336e2b,merge as _0x1497a9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b820e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43e662,IThreadCommentDataSourceService as _0xba9def}from'@univerjs/thread-comment';import{bufferTime as _0x1ade61}from'rxjs';function _0x2001(_0x4972d1,_0x402487){const _0x4a3de2=_0x4a3d();return _0x2001=function(_0x20011e,_0x5b4cf3){_0x20011e=_0x20011e-0xe6;let _0x40ef97=_0x4a3de2[_0x20011e];return _0x40ef97;},_0x2001(_0x4972d1,_0x402487);}import{HTTPService as _0x56f64f}from'@univerjs/network';const W=_0x315572(0x126);var I=(_0x6c0efa=>(_0x6c0efa[_0x6c0efa[_0x315572(0x10d)]=0x0]=_0x315572(0x10d),_0x6c0efa[_0x6c0efa[_0x315572(0x153)]=0x1]='Solved',_0x6c0efa[_0x6c0efa[_0x315572(0x148)]=-0x1]=_0x315572(0x148),_0x6c0efa))(I||{}),v=(_0x18d274=>(_0x18d274[_0x18d274[_0x315572(0x11b)]=0x0]=_0x315572(0x11b),_0x18d274[_0x18d274['Add']=0x1]=_0x315572(0x11e),_0x18d274[_0x18d274['Reply']=0x2]=_0x315572(0x13c),_0x18d274[_0x18d274[_0x315572(0x105)]=0x3]=_0x315572(0x105),_0x18d274[_0x18d274[_0x315572(0x14f)]=0x4]=_0x315572(0x14f),_0x18d274[_0x18d274[_0x315572(0x14d)]=0x5]=_0x315572(0x14d),_0x18d274[_0x18d274[_0x315572(0x148)]=-0x1]='UNRECOGNIZED',_0x18d274))(v||{});const D=_0x202c35=>_0x208de3(new Date(+_0x202c35))[_0x315572(0x118)](_0x315572(0x12f)),B=async(_0xd9d44b,_0x14a0ba)=>{const _0x988dd=_0x315572,_0x2876b1=_0xd9d44b[_0x988dd(0x10f)](_0x4b5ea8),_0x1b1ebb=_0xd9d44b[_0x988dd(0x10f)](_0x56f64f);_0x14a0ba[_0x988dd(0x13d)](_0x1f84ca=>{const _0x503569=_0x988dd;_0x2876b1['getUser'](_0x1f84ca)&&_0x14a0ba[_0x503569(0xf6)](_0x1f84ca);}),_0x14a0ba[_0x988dd(0xef)]&&(await _0x1b1ebb[_0x988dd(0x10f)](_0x988dd(0x13f),{'params':{'userIDs':[..._0x14a0ba]}}))[_0x988dd(0xf1)][_0x988dd(0x137)][_0x988dd(0x13d)](_0x549f05=>{const _0x572399=_0x988dd;_0x549f05&&_0x2876b1[_0x572399(0x139)](_0x549f05);});};var K=Object[_0x315572(0xf4)],V=(_0x5c598e,_0x573425,_0x13ab72,_0x407e73)=>{const _0x4d022b=_0x315572;for(var _0x59262d=_0x407e73>0x1?void 0x0:_0x407e73?K(_0x573425,_0x13ab72):_0x573425,_0x4cd28f=_0x5c598e[_0x4d022b(0x103)]-0x1,_0x177462;_0x4cd28f>=0x0;_0x4cd28f--)(_0x177462=_0x5c598e[_0x4cd28f])&&(_0x59262d=_0x177462(_0x59262d)||_0x59262d);return _0x59262d;},p=(_0x3e833a,_0x376724)=>(_0x3a19c2,_0x436870)=>_0x376724(_0x3a19c2,_0x436870,_0x3e833a);let S=class extends _0x5145d0{constructor(_0x114727,_0xead3d8,_0x393b55,_0x1fa4f1){const _0x290cda=_0x315572;super(),this[_0x290cda(0x149)]=_0x114727,this[_0x290cda(0x146)]=_0xead3d8,this[_0x290cda(0x128)]=_0x393b55,this[_0x290cda(0x132)]=_0x1fa4f1,this['_init'](),this[_0x290cda(0x114)]();}[_0x315572(0x114)](){const _0x34eeb5=_0x315572;this[_0x34eeb5(0x11c)](this[_0x34eeb5(0x146)]['commentUpdate$'][_0x34eeb5(0x13e)](_0x1ade61(0x10))[_0x34eeb5(0xe7)](_0x3b686b=>{const _0x496125=_0x34eeb5,_0x266165=new Set();_0x3b686b[_0x496125(0x13d)](_0x4a3d59=>{const _0x3a1f57=_0x496125;switch(_0x4a3d59[_0x3a1f57(0x12c)]){case _0x3a1f57(0x131):{const _0x4d88cf=_0x4a3d59['payload'][_0x3a1f57(0x130)];_0x266165[_0x3a1f57(0x131)](_0x4d88cf);break;}}}),B(this[_0x496125(0x132)],_0x266165);}));}[_0x315572(0xe9)](){const _0x90656e=_0x315572;this[_0x90656e(0x11c)](this[_0x90656e(0x149)][_0x90656e(0xec)][_0x90656e(0xe7)](async _0x12d3c1=>{const _0x5ed802=_0x90656e;var _0x3c0728,_0x555bb7,_0x1144a0,_0x364a79;const _0x31ed20=(_0x3c0728=this[_0x5ed802(0x146)]['getUnit'](_0x12d3c1[_0x5ed802(0x13a)])['find'](_0x565297=>_0x565297[_0x5ed802(0x10c)]===_0x12d3c1['threadId']))==null?void 0x0:_0x3c0728['root'];if(!_0x31ed20)return;const {unitId:_0x3ac16f,subUnitId:_0x46b49c}=_0x31ed20;switch(_0x12d3c1['user']&&this['_userService']['addUser'](_0x12d3c1[_0x5ed802(0xf5)]),_0x12d3c1[_0x5ed802(0x12c)]){case v[_0x5ed802(0x11e)]:break;case v['Reply']:{this[_0x5ed802(0x146)][_0x5ed802(0xfa)](_0x3ac16f,_0x46b49c,{'unitId':_0x3ac16f,'subUnitId':_0x46b49c,'ref':'','id':_0x12d3c1[_0x5ed802(0xf7)],'dT':D(+_0x12d3c1[_0x5ed802(0x11d)]),'threadId':_0x12d3c1[_0x5ed802(0x10c)],'personId':(_0x1144a0=(_0x555bb7=_0x12d3c1[_0x5ed802(0xf5)])==null?void 0x0:_0x555bb7[_0x5ed802(0x119)])!=null?_0x1144a0:_0x12d3c1[_0x5ed802(0x110)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)]),'parentId':_0x31ed20['id']});break;}case v[_0x5ed802(0x14f)]:{const _0x3a9ef0=this[_0x5ed802(0x146)][_0x5ed802(0x100)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);_0x3a9ef0&&_0x3a9ef0[_0x5ed802(0x122)]&&this[_0x5ed802(0x146)][_0x5ed802(0x142)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5ed802(0xee)](_0x3ac16f,_0x46b49c,{'commentId':_0x12d3c1[_0x5ed802(0xf7)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)])});break;}case v[_0x5ed802(0x14d)]:{const _0xb0d951=(_0x364a79=this[_0x5ed802(0x146)][_0x5ed802(0x107)](_0x12d3c1[_0x5ed802(0x13a)])[_0x5ed802(0x143)](_0xd3f8f=>_0xd3f8f[_0x5ed802(0x10c)]===_0x12d3c1[_0x5ed802(0x10c)]))==null?void 0x0:_0x364a79[_0x5ed802(0x101)];_0xb0d951&&this[_0x5ed802(0x146)][_0x5ed802(0x12a)](_0x3ac16f,_0x46b49c,_0xb0d951['id'],_0x12d3c1[_0x5ed802(0x144)]===I[_0x5ed802(0x153)]);break;}}}));}};S=V([p(0x0,_0x240b39(_0xf55148)),p(0x1,_0x240b39(_0x43e662)),p(0x2,_0x240b39(_0x4b5ea8)),p(0x3,_0x240b39(_0x8b9753))],S);const z=_0x315572(0x141),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5396b9,_0x504daa,_0x656df,_0x148842)=>{const _0x5890de=_0x315572;for(var _0x8abd7a=_0x148842>0x1?void 0x0:_0x148842?k(_0x504daa,_0x656df):_0x504daa,_0x17acd0=_0x5396b9[_0x5890de(0x103)]-0x1,_0x888dd3;_0x17acd0>=0x0;_0x17acd0--)(_0x888dd3=_0x5396b9[_0x17acd0])&&(_0x8abd7a=_0x888dd3(_0x8abd7a)||_0x8abd7a);return _0x8abd7a;},_=(_0x4718b4,_0x332c00)=>(_0x3ac36e,_0x171bb2)=>_0x332c00(_0x3ac36e,_0x171bb2,_0x4718b4);function X(_0x2229ff,_0x45240a){const _0x4c2e08=_0x315572,_0x2cb1b4=_0x2229ff[_0x4c2e08(0x123)][0x0];return{..._0x45240a,'id':_0x2cb1b4[_0x4c2e08(0xf7)],'resolved':_0x2229ff[_0x4c2e08(0x144)]===0x1,'dT':D(_0x2cb1b4['createTimestamp']),'personId':_0x2cb1b4['userId'],'threadId':_0x2cb1b4['threadId']};}function ee(_0x2c0425,_0x224b9b,_0x330826){const _0x387137=_0x315572;var _0x14f0cd,_0x55c62a;if(((_0x55c62a=(_0x14f0cd=_0x2c0425==null?void 0x0:_0x2c0425[_0x387137(0x123)])==null?void 0x0:_0x14f0cd[_0x387137(0x103)])!=null?_0x55c62a:0x0)>0x0){const _0x3c43f2=(_0x34b245,_0x472142)=>({'id':_0x34b245[_0x387137(0xf7)],'threadId':_0x34b245[_0x387137(0x10c)],'dT':D(_0x34b245[_0x387137(0x11d)]),'personId':_0x34b245[_0x387137(0x110)],'resolved':_0x2c0425['solved']===I[_0x387137(0x153)],'unitId':_0x224b9b,'subUnitId':_0x330826,'text':JSON[_0x387137(0x135)](_0x34b245[_0x387137(0x152)]),'parentId':_0x472142}),_0x29b2e3=_0x3c43f2(_0x2c0425[_0x387137(0x123)][0x0]);return{..._0x29b2e3,'children':_0x2c0425[_0x387137(0x123)]['slice'](0x1)[_0x387137(0xeb)](_0x52e60d=>_0x3c43f2(_0x52e60d,_0x29b2e3['id']))};}return null;}let f=class{constructor(_0x1d1cf8,_0x5af46d,_0x38bc1c,_0x182f22){const _0x518529=_0x315572;this[_0x518529(0x109)]=_0x1d1cf8,this[_0x518529(0x128)]=_0x5af46d,this[_0x518529(0x138)]=_0x38bc1c,this[_0x518529(0x132)]=_0x182f22;}async[_0x315572(0xfa)](_0x43d195){const _0x674dca=_0x315572;var _0x44d0b0,_0x222111;const {parentId:_0x1f984a,unitId:_0x184195,text:_0xf7392b,threadId:_0x5ab09d}=_0x43d195,_0x2dfb29=(_0x222111=(_0x44d0b0=_0xf7392b[_0x674dca(0x151)])==null?void 0x0:_0x44d0b0['filter'](_0x4fb584=>_0x4fb584[_0x674dca(0x121)]===_0x5cf3b6[_0x674dca(0x117)])[_0x674dca(0xeb)](_0x22a0bc=>_0x22a0bc['rangeId']))!=null?_0x222111:[],_0x481b44=JSON[_0x674dca(0x147)](_0xf7392b),_0x594a79=(await this[_0x674dca(0x138)][_0x674dca(0xfb)](_0x184195))[_0x674dca(0xff)]();if(_0x1f984a){const _0x449a9f={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29,'threadId':_0x5ab09d},_0x1012a3=(await this['_httpService']['post'](_0x674dca(0x12e)+_0x184195+_0x674dca(0xed),{'body':_0x449a9f}))['body'][_0x674dca(0xf9)];return{..._0x43d195,'id':_0x1012a3[_0x674dca(0xf7)],'dT':_0x208de3(+_0x1012a3['createTimestamp'])[_0x674dca(0x118)](_0x674dca(0x12f)),'personId':_0x1012a3[_0x674dca(0x110)]};}else{const _0x45b4fd={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29},_0x512061=await this['_httpService'][_0x674dca(0x104)](_0x674dca(0x12e)+_0x184195+_0x674dca(0x106),{'body':_0x45b4fd});return X(_0x512061['body'][_0x674dca(0x102)],_0x43d195);}}async[_0x315572(0xee)](_0x4c8c54){const _0x49bb2d=_0x315572;var _0x510176,_0x2da60e;const {text:_0x254756,unitId:_0x3ad372}=_0x4c8c54,_0x8d0a48=(_0x2da60e=(_0x510176=_0x254756['customRanges'])==null?void 0x0:_0x510176[_0x49bb2d(0x11a)](_0x1b829a=>_0x1b829a[_0x49bb2d(0x121)]===_0x5cf3b6[_0x49bb2d(0x117)])['map'](_0xf8c20c=>_0xf8c20c[_0x49bb2d(0x116)]))!=null?_0x2da60e:[],_0x83c595=JSON[_0x49bb2d(0x147)](_0x254756),_0x47d378=_0x4c8c54[_0x49bb2d(0x10c)],_0x3443ef=_0x4c8c54['id'],_0x5570fc={'memberId':(await this[_0x49bb2d(0x138)][_0x49bb2d(0xfb)](_0x3ad372))[_0x49bb2d(0xff)](),'unitId':_0x3ad372,'threadId':_0x47d378,'mention':_0x8d0a48,'content':_0x83c595,'replyId':_0x3443ef},_0x2a52a7=await this['_httpService'][_0x49bb2d(0x104)](_0x49bb2d(0x12e)+_0x3ad372+_0x49bb2d(0x136),{'body':_0x5570fc});return!_0x2a52a7['body'][_0x49bb2d(0x112)]||_0x2a52a7[_0x49bb2d(0xf1)][_0x49bb2d(0x112)]['code']===0x1;}async[_0x315572(0x12a)](_0x5d8147){const _0x34c0aa=_0x315572,{unitId:_0x22aab8}=_0x5d8147,_0x4a024c=_0x5d8147[_0x34c0aa(0x10c)],_0x3c3dbc={'memberId':this[_0x34c0aa(0x128)][_0x34c0aa(0xfe)]()[_0x34c0aa(0x119)],'unitId':_0x22aab8,'threadId':_0x4a024c,'solved':_0x5d8147[_0x34c0aa(0x108)]?I[_0x34c0aa(0x153)]:I[_0x34c0aa(0x10d)]},_0x1f7682=await this[_0x34c0aa(0x109)]['post'](_0x34c0aa(0x12e)+_0x22aab8+_0x34c0aa(0x120),{'body':_0x3c3dbc});return!_0x1f7682[_0x34c0aa(0xf1)][_0x34c0aa(0x112)]||_0x1f7682[_0x34c0aa(0xf1)]['error']['code']===0x1;}async[_0x315572(0x142)](_0x132408,_0x372f71,_0x36567c,_0x34461b){const _0xb909fe=_0x315572,_0x4817bd={'memberId':(await this['_sessionService'][_0xb909fe(0xfb)](_0x132408))[_0xb909fe(0xff)](),'threadId':_0x36567c,'replyId':_0x34461b,'unitId':_0x132408},_0x476760=await this[_0xb909fe(0x109)]['post']('/universer-api/comment/unit/'+_0x132408+_0xb909fe(0x124),{'body':_0x4817bd});return!_0x476760[_0xb909fe(0xf1)][_0xb909fe(0x112)]||_0x476760[_0xb909fe(0xf1)]['error'][_0xb909fe(0xf2)]===0x1;}async[_0x315572(0x134)](_0x4b307b,_0x51cb17,_0xcb49a2){const _0x3fbca6=_0x315572,_0x5083d7={'unitId':_0x4b307b,'threadId':_0xcb49a2},_0x171631=await this[_0x3fbca6(0x109)][_0x3fbca6(0x104)]('/universer-api/comment/unit/'+_0x4b307b+_0x3fbca6(0x13b),{'body':_0x5083d7}),_0x1c732f=_0xcb49a2[_0x3fbca6(0xeb)](_0x5d2f16=>ee(_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x12b)][_0x5d2f16],_0x4b307b,_0x51cb17))['filter'](Boolean);return Object[_0x3fbca6(0x127)](_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x137)])[_0x3fbca6(0x13d)](_0x15c81f=>{const _0x4807ad=_0x3fbca6;this['_userService'][_0x4807ad(0x139)](_0x15c81f);}),_0x1c732f;}[_0x315572(0x133)](_0x12cf1b){const _0x8548f6=_0x315572;return{'id':_0x12cf1b['id'],'threadId':_0x12cf1b[_0x8548f6(0x10c)],'ref':_0x12cf1b[_0x8548f6(0x10a)]};}};f=Q([_(0x0,_0x240b39(_0x56f64f)),_(0x1,_0x240b39(_0x4b5ea8)),_(0x2,_0x240b39(_0x3367e2)),_(0x3,_0x240b39(_0x8b9753))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0xd8dc89,_0x4df77b,_0x5d218f,_0xc54fa2)=>{const _0x18a824=_0x315572;for(var _0x3240fe=_0xc54fa2>0x1?void 0x0:_0xc54fa2?re(_0x4df77b,_0x5d218f):_0x4df77b,_0x238e12=_0xd8dc89[_0x18a824(0x103)]-0x1,_0x140bae;_0x238e12>=0x0;_0x238e12--)(_0x140bae=_0xd8dc89[_0x238e12])&&(_0x3240fe=_0x140bae(_0x3240fe)||_0x3240fe);return _0x3240fe;},N=(_0x5d9db2,_0x2f9fd1)=>(_0xdeadbe,_0x2733c0)=>_0x2f9fd1(_0xdeadbe,_0x2733c0,_0x5d9db2);let g=class extends _0x5145d0{constructor(_0x23724d,_0x481987){const _0x593a73=_0x315572;super(),this[_0x593a73(0x11f)]=_0x23724d,this[_0x593a73(0xf8)]=_0x481987,this['_initDataSource']();}[_0x315572(0x14b)](){const _0x37f685=_0x315572;this[_0x37f685(0x11f)][_0x37f685(0x125)]=this[_0x37f685(0xf8)],this[_0x37f685(0x11f)][_0x37f685(0x113)]=!0x1;}};g=te([N(0x0,_0xba9def),N(0x1,_0x240b39(f))],g);function _0x4a3d(){const _0x22c5db=['_userService','1351qDNqpd','resolveComment','comments','type','defineProperty','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','personId','add','_injector','saveCommentToSnapshot','listComments','parse','/edit','users','_sessionService','addUser','unitId','/list','Reply','forEach','pipe','/universer-api/user/list','12304vFGZSS','thread-comment-data-source.config','deleteComment','find','solved','UNIVER_UNKNOWN','_threadCommentModel','stringify','UNRECOGNIZED','_commentService','symbol','_initDataSource','295461mRBhSn','Solve','8qgJhpM','Delete','_configService','customRanges','content','Solved','141460VyBijZ','subscribe','10JMkxlc','_init','onReady','map','commentUpdate$','/reply','updateComment','size','50454lNjRZW','body','code','260CmuQjn','getOwnPropertyDescriptor','user','delete','replyId','_threadCommentDataSource','reply','addComment','requireSession','84aIOwNi','pluginName','getCurrentUser','getMemberID','getComment','root','comment','length','post','Edit','/add','getUnit','resolved','_httpService','ref','260601umePPe','threadId','OpenOrReOpen','42412cMeuJL','get','userId','742506EWntOi','error','syncUpdateMutationToColla','_initUserSync','_config','rangeId','COMMENT','format','userID','filter','Unknown','disposeWithMe','createTimestamp','Add','_threadCommentDataSourceService','/solved','rangeType','parentId','replies','/delete','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values'];_0x4a3d=function(){return _0x22c5db;};return _0x4a3d();}var se=Object[_0x315572(0x12d)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4f258b,_0x2db574,_0x1f2589)=>_0x2db574 in _0x4f258b?se(_0x4f258b,_0x2db574,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f2589}):_0x4f258b[_0x2db574]=_0x1f2589,ie=(_0x1b3d42,_0x550c18,_0x2fd444,_0x51ac8c)=>{const _0x300c01=_0x315572;for(var _0xb07419=_0x51ac8c>0x1?void 0x0:_0x51ac8c?oe(_0x550c18,_0x2fd444):_0x550c18,_0x159aa9=_0x1b3d42[_0x300c01(0x103)]-0x1,_0x20bd06;_0x159aa9>=0x0;_0x159aa9--)(_0x20bd06=_0x1b3d42[_0x159aa9])&&(_0xb07419=_0x20bd06(_0xb07419)||_0xb07419);return _0xb07419;},w=(_0x317a0e,_0x4ada00)=>(_0x40b202,_0x464d42)=>_0x4ada00(_0x40b202,_0x464d42,_0x317a0e),$=(_0x4d5675,_0x45bc98,_0x4507ef)=>ne(_0x4d5675,typeof _0x45bc98!=_0x315572(0x14a)?_0x45bc98+'':_0x45bc98,_0x4507ef);let b=class extends _0x336e2b{constructor(_0x3c00e5=M,_0x7b54fa,_0x4d6d62){const _0x20dab2=_0x315572;super(),this[_0x20dab2(0x115)]=_0x3c00e5,this[_0x20dab2(0x132)]=_0x7b54fa,this['_configService']=_0x4d6d62;const {..._0x118b97}=_0x1497a9({},M,this[_0x20dab2(0x115)]);this[_0x20dab2(0x150)]['setConfig'](z,_0x118b97);}['onStarting'](){const _0x202919=_0x315572;[[f],[g],[S]][_0x202919(0x13d)](_0x572104=>{const _0x371670=_0x202919;this[_0x371670(0x132)][_0x371670(0x131)](_0x572104);});}[_0x315572(0xea)](){const _0x1f56c7=_0x315572;this['_injector'][_0x1f56c7(0x10f)](g),this['_injector'][_0x1f56c7(0x10f)](S);}};$(b,_0x315572(0xfd),W),$(b,_0x315572(0x12c),_0x1a1c01[_0x315572(0x145)]),b=ie([_0x1c769b(_0x1b820e,_0xbc1850,_0x5c6876),w(0x1,_0x240b39(_0x8b9753)),w(0x2,_0x9dd781)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x16f4(_0x2548d3,_0xe692cb){const _0x55c992=_0x55c9();return _0x16f4=function(_0x16f449,_0x177626){_0x16f449=_0x16f449-0xe5;let _0x369447=_0x55c992[_0x16f449];return _0x369447;},_0x16f4(_0x2548d3,_0xe692cb);}function _0x55c9(){const _0x3e893c=['Unknown','5286470PGFkYR','solved','replyId','UniverLicensePlugin','_initUserSync','syncUpdateMutationToColla','pluginName','UNIVER_UNKNOWN','Inject','OpenOrReOpen','12pFFNQq','values','threadId','setConfig','exports','Plugin','listComments','getMemberID','createTimestamp','IThreadCommentDataSourceService','/add','user','rxjs','ref','ThreadCommentModel','_init','onReady','Delete','users','/delete','UniverCore','_httpService','rangeType','error','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','getOwnPropertyDescriptor','_initDataSource','278246NbwXim','@univerjs/thread-comment','Module','_threadCommentDataSource','replies','thread-comment-data-source.config','amd','Add','DependentOn','format','UniverThreadComment','userId','reply','Edit','customRanges','Reply','_config','slice','getComment','Solved','_threadCommentModel','function','CustomRangeType','@univerjs/thread-comment-ui','updateComment','8nyBorB','1552630SHVAzh','add','_threadCommentDataSourceService','UniverProThreadCommentDatasource','stringify','length','body','dataSource','IConfigService','userID','deleteComment','@univerjs/network','map','get','/universer-api/user/list','/list','symbol','getUnit','root','/edit','personId','find','dayjs','UserManagerService','onStarting','addComment','HTTPService','addUser','resolveComment','disposeWithMe','commentUpdate$','Injector','type','post','UniverNetwork','filter','/solved','CollaborationSessionService','content','3646668PzmHGl','58604MDJUut','@univerjs-pro/license','_injector','UniverThreadCommentDataSourcePlugin','17235225dTsXLw','_sessionService','parse','Solve','/universer-api/comment/unit/','UniverCollaborationClientPlugin','requireSession','@univerjs/core','comments','pipe','/reply','769074PlZhnH','saveCommentToSnapshot','@univerjs-pro/collaboration-client','_userService','UNRECOGNIZED','bufferTime','defineProperty','UniverInstanceType','_commentService','forEach','comment','toStringTag','UniverThreadCommentUi','subscribe','size','YYYY/MM/DD\x20HH:mm'];_0x55c9=function(){return _0x3e893c;};return _0x55c9();}(function(_0x23fdde,_0x5a970b){const _0x405120=_0x16f4,_0x45a4f6=_0x23fdde();while(!![]){try{const _0x53cc45=-parseInt(_0x405120(0x163))/0x1+-parseInt(_0x405120(0x112))/0x2*(parseInt(_0x405120(0xf5))/0x3)+-parseInt(_0x405120(0x154))/0x4+-parseInt(_0x405120(0x12c))/0x5+-parseInt(_0x405120(0x153))/0x6+parseInt(_0x405120(0xeb))/0x7*(parseInt(_0x405120(0x12b))/0x8)+parseInt(_0x405120(0x158))/0x9;if(_0x53cc45===_0x5a970b)break;else _0x45a4f6['push'](_0x45a4f6['shift']());}catch(_0x3ec018){_0x45a4f6['push'](_0x45a4f6['shift']());}}}(_0x55c9,0x64842),function(_0x35d49a,_0x2535f8){const _0x378b6b=_0x16f4;typeof exports=='object'&&typeof module<'u'?_0x2535f8(exports,require(_0x378b6b(0x165)),require(_0x378b6b(0x155)),require(_0x378b6b(0x15f)),require(_0x378b6b(0x129)),require(_0x378b6b(0x113)),require(_0x378b6b(0x101)),require(_0x378b6b(0x137))):typeof define==_0x378b6b(0x127)&&define[_0x378b6b(0x118)]?define([_0x378b6b(0xf9),_0x378b6b(0x165),_0x378b6b(0x155),'@univerjs/core',_0x378b6b(0x129),_0x378b6b(0x113),_0x378b6b(0x101),_0x378b6b(0x137)],_0x2535f8):(_0x35d49a=typeof globalThis<'u'?globalThis:_0x35d49a||self,_0x2535f8(_0x35d49a[_0x378b6b(0x12f)]={},_0x35d49a['UniverProCollaborationClient'],_0x35d49a['UniverProLicense'],_0x35d49a[_0x378b6b(0x109)],_0x35d49a[_0x378b6b(0xe6)],_0x35d49a[_0x378b6b(0x11c)],_0x35d49a[_0x378b6b(0x101)],_0x35d49a[_0x378b6b(0x14e)]));}(this,function(_0x2fdd3f,_0x2c0e96,_0x1fb240,_0x4a869b,_0x33d478,_0x2982c2,_0x1e5048,_0x415a47){'use strict';const _0xc9bbe2=_0x16f4;const _0x5925ab=_0xc9bbe2(0x10e);var _0x5249ec=(_0x18d457=>(_0x18d457[_0x18d457[_0xc9bbe2(0xf4)]=0x0]=_0xc9bbe2(0xf4),_0x18d457[_0x18d457[_0xc9bbe2(0x125)]=0x1]=_0xc9bbe2(0x125),_0x18d457[_0x18d457[_0xc9bbe2(0x167)]=-0x1]='UNRECOGNIZED',_0x18d457))(_0x5249ec||{}),_0xdfb18e=(_0x3cb0a1=>(_0x3cb0a1[_0x3cb0a1[_0xc9bbe2(0xea)]=0x0]=_0xc9bbe2(0xea),_0x3cb0a1[_0x3cb0a1[_0xc9bbe2(0x119)]=0x1]='Add',_0x3cb0a1[_0x3cb0a1[_0xc9bbe2(0x121)]=0x2]=_0xc9bbe2(0x121),_0x3cb0a1[_0x3cb0a1[_0xc9bbe2(0x11f)]=0x3]=_0xc9bbe2(0x11f),_0x3cb0a1[_0x3cb0a1['Delete']=0x4]=_0xc9bbe2(0x106),_0x3cb0a1[_0x3cb0a1['Solve']=0x5]=_0xc9bbe2(0x15b),_0x3cb0a1[_0x3cb0a1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3cb0a1))(_0xdfb18e||{});const _0xb32e55=_0x412ca1=>_0x4a869b[_0xc9bbe2(0x142)](new Date(+_0x412ca1))[_0xc9bbe2(0x11b)](_0xc9bbe2(0xe9)),_0x2abd9e=async(_0x141fa5,_0xbb2ba5)=>{const _0x2fcdaf=_0xc9bbe2,_0x5194a1=_0x141fa5['get'](_0x4a869b[_0x2fcdaf(0x143)]),_0x307444=_0x141fa5[_0x2fcdaf(0x139)](_0x415a47[_0x2fcdaf(0x146)]);_0xbb2ba5[_0x2fcdaf(0x16c)](_0x2ef607=>{_0x5194a1['getUser'](_0x2ef607)&&_0xbb2ba5['delete'](_0x2ef607);}),_0xbb2ba5[_0x2fcdaf(0xe8)]&&(await _0x307444['get'](_0x2fcdaf(0x13a),{'params':{'userIDs':[..._0xbb2ba5]}}))[_0x2fcdaf(0x132)][_0x2fcdaf(0x107)][_0x2fcdaf(0x16c)](_0x246bd4=>{_0x246bd4&&_0x5194a1['addUser'](_0x246bd4);});};var _0x1fbe9a=Object[_0xc9bbe2(0x110)],_0x429f2b=(_0x232c47,_0x1f962f,_0x1261c8,_0x3d4425)=>{const _0x5d96fd=_0xc9bbe2;for(var _0x3c42e3=_0x3d4425>0x1?void 0x0:_0x3d4425?_0x1fbe9a(_0x1f962f,_0x1261c8):_0x1f962f,_0x163a4c=_0x232c47[_0x5d96fd(0x131)]-0x1,_0x1c9308;_0x163a4c>=0x0;_0x163a4c--)(_0x1c9308=_0x232c47[_0x163a4c])&&(_0x3c42e3=_0x1c9308(_0x3c42e3)||_0x3c42e3);return _0x3c42e3;},_0x15cf41=(_0x42c3dd,_0x475975)=>(_0x3d1739,_0x2be768)=>_0x475975(_0x3d1739,_0x2be768,_0x42c3dd);let _0x25706c=class extends _0x4a869b['Disposable']{constructor(_0xad8ba3,_0x45b30b,_0x58c58d,_0x59bfbc){const _0xa4af3b=_0xc9bbe2;super(),this[_0xa4af3b(0x16b)]=_0xad8ba3,this[_0xa4af3b(0x126)]=_0x45b30b,this[_0xa4af3b(0x166)]=_0x58c58d,this[_0xa4af3b(0x156)]=_0x59bfbc,this[_0xa4af3b(0x104)](),this['_initUserSync']();}[_0xc9bbe2(0xef)](){const _0x3889d1=_0xc9bbe2;this['disposeWithMe'](this[_0x3889d1(0x126)][_0x3889d1(0x14a)][_0x3889d1(0x161)](_0x1e5048[_0x3889d1(0x168)](0x10))['subscribe'](_0x2d5352=>{const _0x57a4a9=_0x3889d1,_0x4f41eb=new Set();_0x2d5352[_0x57a4a9(0x16c)](_0x4e3ac4=>{const _0x17a7b7=_0x57a4a9;switch(_0x4e3ac4[_0x17a7b7(0x14c)]){case'add':{const _0x31f7a2=_0x4e3ac4['payload'][_0x17a7b7(0x140)];_0x4f41eb[_0x17a7b7(0x12d)](_0x31f7a2);break;}}}),_0x2abd9e(this[_0x57a4a9(0x156)],_0x4f41eb);}));}['_init'](){const _0x58f7c4=_0xc9bbe2;this[_0x58f7c4(0x149)](this[_0x58f7c4(0x16b)][_0x58f7c4(0x14a)][_0x58f7c4(0xe7)](async _0x5b34e5=>{const _0x2b2a4a=_0x58f7c4;var _0x5d3ed6,_0x19a0f5,_0x37fd8a,_0x162943;const _0x327142=(_0x5d3ed6=this[_0x2b2a4a(0x126)][_0x2b2a4a(0x13d)](_0x5b34e5['unitId'])['find'](_0x525b40=>_0x525b40[_0x2b2a4a(0xf7)]===_0x5b34e5[_0x2b2a4a(0xf7)]))==null?void 0x0:_0x5d3ed6['root'];if(!_0x327142)return;const {unitId:_0x8a5e94,subUnitId:_0x50fce4}=_0x327142;switch(_0x5b34e5[_0x2b2a4a(0x100)]&&this[_0x2b2a4a(0x166)][_0x2b2a4a(0x147)](_0x5b34e5[_0x2b2a4a(0x100)]),_0x5b34e5[_0x2b2a4a(0x14c)]){case _0xdfb18e[_0x2b2a4a(0x119)]:break;case _0xdfb18e[_0x2b2a4a(0x121)]:{this[_0x2b2a4a(0x126)]['addComment'](_0x8a5e94,_0x50fce4,{'unitId':_0x8a5e94,'subUnitId':_0x50fce4,'ref':'','id':_0x5b34e5['replyId'],'dT':_0xb32e55(+_0x5b34e5[_0x2b2a4a(0xfd)]),'threadId':_0x5b34e5[_0x2b2a4a(0xf7)],'personId':(_0x37fd8a=(_0x19a0f5=_0x5b34e5[_0x2b2a4a(0x100)])==null?void 0x0:_0x19a0f5[_0x2b2a4a(0x135)])!=null?_0x37fd8a:_0x5b34e5[_0x2b2a4a(0x11d)],'text':JSON[_0x2b2a4a(0x15a)](_0x5b34e5[_0x2b2a4a(0x152)]),'parentId':_0x327142['id']});break;}case _0xdfb18e[_0x2b2a4a(0x106)]:{const _0x37ee27=this[_0x2b2a4a(0x126)][_0x2b2a4a(0x124)](_0x8a5e94,_0x50fce4,_0x5b34e5[_0x2b2a4a(0xed)]);_0x37ee27&&_0x37ee27['parentId']&&this[_0x2b2a4a(0x126)][_0x2b2a4a(0x136)](_0x8a5e94,_0x50fce4,_0x5b34e5[_0x2b2a4a(0xed)]);break;}case _0xdfb18e[_0x2b2a4a(0x11f)]:{this[_0x2b2a4a(0x126)][_0x2b2a4a(0x12a)](_0x8a5e94,_0x50fce4,{'commentId':_0x5b34e5['replyId'],'text':JSON[_0x2b2a4a(0x15a)](_0x5b34e5['content'])});break;}case _0xdfb18e[_0x2b2a4a(0x15b)]:{const _0x48d460=(_0x162943=this[_0x2b2a4a(0x126)][_0x2b2a4a(0x13d)](_0x5b34e5['unitId'])[_0x2b2a4a(0x141)](_0x523044=>_0x523044[_0x2b2a4a(0xf7)]===_0x5b34e5[_0x2b2a4a(0xf7)]))==null?void 0x0:_0x162943[_0x2b2a4a(0x13e)];_0x48d460&&this[_0x2b2a4a(0x126)][_0x2b2a4a(0x148)](_0x8a5e94,_0x50fce4,_0x48d460['id'],_0x5b34e5[_0x2b2a4a(0xec)]===_0x5249ec[_0x2b2a4a(0x125)]);break;}}}));}};_0x25706c=_0x429f2b([_0x15cf41(0x0,_0x4a869b[_0xc9bbe2(0xf3)](_0x2c0e96['CommentService'])),_0x15cf41(0x1,_0x4a869b[_0xc9bbe2(0xf3)](_0x2982c2[_0xc9bbe2(0x103)])),_0x15cf41(0x2,_0x4a869b['Inject'](_0x4a869b[_0xc9bbe2(0x143)])),_0x15cf41(0x3,_0x4a869b[_0xc9bbe2(0xf3)](_0x4a869b[_0xc9bbe2(0x14b)]))],_0x25706c);const _0x227816=_0xc9bbe2(0x117),_0x113003={};var _0xa867eb=Object[_0xc9bbe2(0x110)],_0x5a5bec=(_0x82ad8b,_0x3e588b,_0x5eae8b,_0x301af8)=>{const _0x2ab67e=_0xc9bbe2;for(var _0x44391c=_0x301af8>0x1?void 0x0:_0x301af8?_0xa867eb(_0x3e588b,_0x5eae8b):_0x3e588b,_0x33741f=_0x82ad8b[_0x2ab67e(0x131)]-0x1,_0x30fe15;_0x33741f>=0x0;_0x33741f--)(_0x30fe15=_0x82ad8b[_0x33741f])&&(_0x44391c=_0x30fe15(_0x44391c)||_0x44391c);return _0x44391c;},_0x267bc5=(_0x5b8025,_0x528e66)=>(_0x4e54b3,_0x4eba1e)=>_0x528e66(_0x4e54b3,_0x4eba1e,_0x5b8025);function _0x44ac18(_0x411d8c,_0x1e70ab){const _0x238d0e=_0xc9bbe2,_0x1081c2=_0x411d8c[_0x238d0e(0x116)][0x0];return{..._0x1e70ab,'id':_0x1081c2['replyId'],'resolved':_0x411d8c[_0x238d0e(0xec)]===0x1,'dT':_0xb32e55(_0x1081c2[_0x238d0e(0xfd)]),'personId':_0x1081c2[_0x238d0e(0x11d)],'threadId':_0x1081c2[_0x238d0e(0xf7)]};}function _0x596ba7(_0x11e68e,_0x25a86e,_0x1ac368){const _0x24c00b=_0xc9bbe2;var _0x12a81d,_0x11c7c5;if(((_0x11c7c5=(_0x12a81d=_0x11e68e==null?void 0x0:_0x11e68e[_0x24c00b(0x116)])==null?void 0x0:_0x12a81d[_0x24c00b(0x131)])!=null?_0x11c7c5:0x0)>0x0){const _0x2a85ac=(_0x34cba6,_0x4574c7)=>({'id':_0x34cba6[_0x24c00b(0xed)],'threadId':_0x34cba6['threadId'],'dT':_0xb32e55(_0x34cba6[_0x24c00b(0xfd)]),'personId':_0x34cba6[_0x24c00b(0x11d)],'resolved':_0x11e68e[_0x24c00b(0xec)]===_0x5249ec[_0x24c00b(0x125)],'unitId':_0x25a86e,'subUnitId':_0x1ac368,'text':JSON[_0x24c00b(0x15a)](_0x34cba6['content']),'parentId':_0x4574c7}),_0x59d514=_0x2a85ac(_0x11e68e['replies'][0x0]);return{..._0x59d514,'children':_0x11e68e['replies'][_0x24c00b(0x123)](0x1)[_0x24c00b(0x138)](_0xd8a909=>_0x2a85ac(_0xd8a909,_0x59d514['id']))};}return null;}let _0x3464af=class{constructor(_0x34f6fb,_0x5c1e0f,_0x6355b3,_0x443e3f){const _0xbd5c22=_0xc9bbe2;this[_0xbd5c22(0x10a)]=_0x34f6fb,this['_userService']=_0x5c1e0f,this[_0xbd5c22(0x159)]=_0x6355b3,this[_0xbd5c22(0x156)]=_0x443e3f;}async[_0xc9bbe2(0x145)](_0x3975dd){const _0x4a650f=_0xc9bbe2;var _0x574307,_0x5f50b7;const {parentId:_0xad28a0,unitId:_0x3b507e,text:_0xa63bc5,threadId:_0x2cd402}=_0x3975dd,_0x21c2a2=(_0x5f50b7=(_0x574307=_0xa63bc5[_0x4a650f(0x120)])==null?void 0x0:_0x574307[_0x4a650f(0x14f)](_0x8757fa=>_0x8757fa[_0x4a650f(0x10b)]===_0x4a869b['CustomRangeType'][_0x4a650f(0x10d)])[_0x4a650f(0x138)](_0x432693=>_0x432693['rangeId']))!=null?_0x5f50b7:[],_0x219ab0=JSON[_0x4a650f(0x130)](_0xa63bc5),_0x132ec2=(await this[_0x4a650f(0x159)][_0x4a650f(0x15e)](_0x3b507e))[_0x4a650f(0xfc)]();if(_0xad28a0){const _0x318df5={'memberId':_0x132ec2,'unitId':_0x3b507e,'content':_0x219ab0,'mention':_0x21c2a2,'threadId':_0x2cd402},_0x2e7d09=(await this[_0x4a650f(0x10a)][_0x4a650f(0x14d)]('/universer-api/comment/unit/'+_0x3b507e+_0x4a650f(0x162),{'body':_0x318df5}))[_0x4a650f(0x132)][_0x4a650f(0x11e)];return{..._0x3975dd,'id':_0x2e7d09[_0x4a650f(0xed)],'dT':_0x4a869b[_0x4a650f(0x142)](+_0x2e7d09[_0x4a650f(0xfd)])[_0x4a650f(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2e7d09['userId']};}else{const _0x403e93={'memberId':_0x132ec2,'unitId':_0x3b507e,'content':_0x219ab0,'mention':_0x21c2a2},_0x3b7f80=await this[_0x4a650f(0x10a)][_0x4a650f(0x14d)]('/universer-api/comment/unit/'+_0x3b507e+_0x4a650f(0xff),{'body':_0x403e93});return _0x44ac18(_0x3b7f80['body'][_0x4a650f(0x16d)],_0x3975dd);}}async[_0xc9bbe2(0x12a)](_0x33801b){const _0x11165d=_0xc9bbe2;var _0x14885d,_0x1e7c52;const {text:_0x2c9dbe,unitId:_0x462fe1}=_0x33801b,_0x41d914=(_0x1e7c52=(_0x14885d=_0x2c9dbe[_0x11165d(0x120)])==null?void 0x0:_0x14885d[_0x11165d(0x14f)](_0x5b32ae=>_0x5b32ae[_0x11165d(0x10b)]===_0x4a869b[_0x11165d(0x128)][_0x11165d(0x10d)])[_0x11165d(0x138)](_0x169149=>_0x169149['rangeId']))!=null?_0x1e7c52:[],_0x2d81de=JSON[_0x11165d(0x130)](_0x2c9dbe),_0x547955=_0x33801b[_0x11165d(0xf7)],_0x3058ce=_0x33801b['id'],_0x271e3e={'memberId':(await this[_0x11165d(0x159)][_0x11165d(0x15e)](_0x462fe1))[_0x11165d(0xfc)](),'unitId':_0x462fe1,'threadId':_0x547955,'mention':_0x41d914,'content':_0x2d81de,'replyId':_0x3058ce},_0x1a3d36=await this[_0x11165d(0x10a)][_0x11165d(0x14d)](_0x11165d(0x15c)+_0x462fe1+_0x11165d(0x13f),{'body':_0x271e3e});return!_0x1a3d36['body'][_0x11165d(0x10c)]||_0x1a3d36[_0x11165d(0x132)][_0x11165d(0x10c)]['code']===0x1;}async['resolveComment'](_0x2219d2){const _0x4a15b2=_0xc9bbe2,{unitId:_0x96fcf2}=_0x2219d2,_0x27a96b=_0x2219d2[_0x4a15b2(0xf7)],_0x58187c={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x96fcf2,'threadId':_0x27a96b,'solved':_0x2219d2['resolved']?_0x5249ec[_0x4a15b2(0x125)]:_0x5249ec[_0x4a15b2(0xf4)]},_0xef2f13=await this[_0x4a15b2(0x10a)][_0x4a15b2(0x14d)]('/universer-api/comment/unit/'+_0x96fcf2+_0x4a15b2(0x150),{'body':_0x58187c});return!_0xef2f13['body'][_0x4a15b2(0x10c)]||_0xef2f13[_0x4a15b2(0x132)][_0x4a15b2(0x10c)]['code']===0x1;}async[_0xc9bbe2(0x136)](_0x5062ad,_0x329f03,_0x329fe2,_0x1861ac){const _0x5dd5e7=_0xc9bbe2,_0x686b73={'memberId':(await this[_0x5dd5e7(0x159)]['requireSession'](_0x5062ad))[_0x5dd5e7(0xfc)](),'threadId':_0x329fe2,'replyId':_0x1861ac,'unitId':_0x5062ad},_0x2344d2=await this[_0x5dd5e7(0x10a)]['post'](_0x5dd5e7(0x15c)+_0x5062ad+_0x5dd5e7(0x108),{'body':_0x686b73});return!_0x2344d2['body'][_0x5dd5e7(0x10c)]||_0x2344d2[_0x5dd5e7(0x132)][_0x5dd5e7(0x10c)]['code']===0x1;}async[_0xc9bbe2(0xfb)](_0x345d2d,_0x10c573,_0x197e82){const _0x5ff70d=_0xc9bbe2,_0x5b87c6={'unitId':_0x345d2d,'threadId':_0x197e82},_0x4ca500=await this[_0x5ff70d(0x10a)][_0x5ff70d(0x14d)](_0x5ff70d(0x15c)+_0x345d2d+_0x5ff70d(0x13b),{'body':_0x5b87c6}),_0x50609b=_0x197e82[_0x5ff70d(0x138)](_0x2ba71c=>_0x596ba7(_0x4ca500[_0x5ff70d(0x132)][_0x5ff70d(0x160)][_0x2ba71c],_0x345d2d,_0x10c573))[_0x5ff70d(0x14f)](Boolean);return Object[_0x5ff70d(0xf6)](_0x4ca500[_0x5ff70d(0x132)][_0x5ff70d(0x107)])[_0x5ff70d(0x16c)](_0x3c76ad=>{const _0xbe4d7=_0x5ff70d;this[_0xbe4d7(0x166)][_0xbe4d7(0x147)](_0x3c76ad);}),_0x50609b;}[_0xc9bbe2(0x164)](_0x5ceab2){const _0x2dd79f=_0xc9bbe2;return{'id':_0x5ceab2['id'],'threadId':_0x5ceab2[_0x2dd79f(0xf7)],'ref':_0x5ceab2[_0x2dd79f(0x102)]};}};_0x3464af=_0x5a5bec([_0x267bc5(0x0,_0x4a869b[_0xc9bbe2(0xf3)](_0x415a47[_0xc9bbe2(0x146)])),_0x267bc5(0x1,_0x4a869b[_0xc9bbe2(0xf3)](_0x4a869b[_0xc9bbe2(0x143)])),_0x267bc5(0x2,_0x4a869b['Inject'](_0x2c0e96[_0xc9bbe2(0x151)])),_0x267bc5(0x3,_0x4a869b[_0xc9bbe2(0xf3)](_0x4a869b['Injector']))],_0x3464af);var _0x52c488=Object['getOwnPropertyDescriptor'],_0x6ca34f=(_0xa0309d,_0x468617,_0x4fe340,_0xbb9fa7)=>{for(var _0x5cc71d=_0xbb9fa7>0x1?void 0x0:_0xbb9fa7?_0x52c488(_0x468617,_0x4fe340):_0x468617,_0x12db1e=_0xa0309d['length']-0x1,_0x141c20;_0x12db1e>=0x0;_0x12db1e--)(_0x141c20=_0xa0309d[_0x12db1e])&&(_0x5cc71d=_0x141c20(_0x5cc71d)||_0x5cc71d);return _0x5cc71d;},_0x20c04f=(_0x13cb1c,_0x3ebf5f)=>(_0x4d22cc,_0x491baf)=>_0x3ebf5f(_0x4d22cc,_0x491baf,_0x13cb1c);let _0x253e51=class extends _0x4a869b['Disposable']{constructor(_0x1f8006,_0x2bb30f){const _0x4c2416=_0xc9bbe2;super(),this['_threadCommentDataSourceService']=_0x1f8006,this[_0x4c2416(0x115)]=_0x2bb30f,this[_0x4c2416(0x111)]();}['_initDataSource'](){const _0x469f66=_0xc9bbe2;this[_0x469f66(0x12e)][_0x469f66(0x133)]=this[_0x469f66(0x115)],this[_0x469f66(0x12e)][_0x469f66(0xf0)]=!0x1;}};_0x253e51=_0x6ca34f([_0x20c04f(0x0,_0x2982c2[_0xc9bbe2(0xfe)]),_0x20c04f(0x1,_0x4a869b[_0xc9bbe2(0xf3)](_0x3464af))],_0x253e51);var _0x4556d7=Object[_0xc9bbe2(0x169)],_0x1777ad=Object['getOwnPropertyDescriptor'],_0x588594=(_0x1bd541,_0x1d8310,_0x2e7a23)=>_0x1d8310 in _0x1bd541?_0x4556d7(_0x1bd541,_0x1d8310,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e7a23}):_0x1bd541[_0x1d8310]=_0x2e7a23,_0x29a46d=(_0x4574de,_0x33b64a,_0x3f7dcc,_0x46bce6)=>{for(var _0x3546a7=_0x46bce6>0x1?void 0x0:_0x46bce6?_0x1777ad(_0x33b64a,_0x3f7dcc):_0x33b64a,_0x594591=_0x4574de['length']-0x1,_0x3c58c4;_0x594591>=0x0;_0x594591--)(_0x3c58c4=_0x4574de[_0x594591])&&(_0x3546a7=_0x3c58c4(_0x3546a7)||_0x3546a7);return _0x3546a7;},_0x2377eb=(_0x292341,_0x4d5c57)=>(_0x415b1a,_0x3f45bd)=>_0x4d5c57(_0x415b1a,_0x3f45bd,_0x292341),_0x7b33bf=(_0x18fc2c,_0x4ea3be,_0x30cde0)=>_0x588594(_0x18fc2c,typeof _0x4ea3be!=_0xc9bbe2(0x13c)?_0x4ea3be+'':_0x4ea3be,_0x30cde0);_0x2fdd3f[_0xc9bbe2(0x157)]=class extends _0x4a869b[_0xc9bbe2(0xfa)]{constructor(_0x28c68f=_0x113003,_0xff711f,_0x48f5c0){const _0x5e913c=_0xc9bbe2;super(),this[_0x5e913c(0x122)]=_0x28c68f,this[_0x5e913c(0x156)]=_0xff711f,this[_0x5e913c(0x10f)]=_0x48f5c0;const {..._0x2bc383}=_0x4a869b['merge']({},_0x113003,this[_0x5e913c(0x122)]);this[_0x5e913c(0x10f)][_0x5e913c(0xf8)](_0x227816,_0x2bc383);}[_0xc9bbe2(0x144)](){[[_0x3464af],[_0x253e51],[_0x25706c]]['forEach'](_0x33a355=>{const _0x432522=_0x16f4;this[_0x432522(0x156)][_0x432522(0x12d)](_0x33a355);});}[_0xc9bbe2(0x105)](){const _0x4c330f=_0xc9bbe2;this[_0x4c330f(0x156)][_0x4c330f(0x139)](_0x253e51),this[_0x4c330f(0x156)][_0x4c330f(0x139)](_0x25706c);}},_0x7b33bf(_0x2fdd3f[_0xc9bbe2(0x157)],_0xc9bbe2(0xf1),_0x5925ab),_0x7b33bf(_0x2fdd3f[_0xc9bbe2(0x157)],_0xc9bbe2(0x14c),_0x4a869b[_0xc9bbe2(0x16a)][_0xc9bbe2(0xf2)]),_0x2fdd3f[_0xc9bbe2(0x157)]=_0x29a46d([_0x4a869b[_0xc9bbe2(0x11a)](_0x33d478['UniverThreadCommentUIPlugin'],_0x2c0e96[_0xc9bbe2(0x15d)],_0x1fb240[_0xc9bbe2(0xee)]),_0x2377eb(0x1,_0x4a869b[_0xc9bbe2(0xf3)](_0x4a869b[_0xc9bbe2(0x14b)])),_0x2377eb(0x2,_0x4a869b[_0xc9bbe2(0x134)])],_0x2fdd3f[_0xc9bbe2(0x157)]),Object['defineProperty'](_0x2fdd3f,Symbol[_0xc9bbe2(0xe5)],{'value':_0xc9bbe2(0x114)});}));
1
+ function _0xc2ff(_0x16899c,_0x1bbd44){const _0x1b24d4=_0x1b24();return _0xc2ff=function(_0xc2ffa9,_0x2a3dab){_0xc2ffa9=_0xc2ffa9-0x16b;let _0x515025=_0x1b24d4[_0xc2ffa9];return _0x515025;},_0xc2ff(_0x16899c,_0x1bbd44);}function _0x1b24(){const _0x3c7265=['find','_initUserSync','threadId','IConfigService','syncUpdateMutationToColla','_sessionService','createTimestamp','resolved','_userService','UniverInstanceType','replies','parse','/universer-api/comment/unit/','getUnit','/universer-api/user/list','unitId','@univerjs-pro/license','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','Disposable','_injector','IThreadCommentDataSourceService','reply','Injector','type','/delete','error','Reply','YYYY/MM/DD\x20HH:mm','_commentService','OpenOrReOpen','_configService','parentId','forEach','20VuJXMV','setConfig','2055hWZYxQ','Inject','replyId','UniverThreadComment','customRanges','toStringTag','updateComment','7pHtfLq','add','pipe','2735336JfYONs','CustomRangeType','Unknown','CommentService','Delete','thread-comment-data-source.config','_config','DependentOn','userID','UserManagerService','length','2610568CoBGkf','filter','5004351mlEpWu','delete','Add','_init','dataSource','addUser','11lLZttR','_httpService','body','@univerjs-pro/collaboration-client','personId','Edit','dayjs','deleteComment','getCurrentUser','ref','_threadCommentDataSourceService','code','user','root','@univerjs/thread-comment-ui','10WIyTbI','Plugin','UniverNetwork','Solved','commentUpdate$','CollaborationSessionService','map','function','getUser','1366OkMagU','rangeType','defineProperty','_threadCommentModel','getComment','disposeWithMe','UniverProCollaborationClient','UNIVER_UNKNOWN','446731sRwAaU','listComments','users','content','UniverThreadCommentUIPlugin','pluginName','96504BFhnkO','/reply','UniverProLicense','rangeId','@univerjs/network','/solved','/add','_initDataSource','stringify','HTTPService','solved','payload','UniverLicensePlugin','getMemberID','size','resolveComment','@univerjs/thread-comment','object','subscribe','userId','_threadCommentDataSource','merge','ThreadCommentModel','requireSession','19854612hoYzdj','Solve','Module','slice','UNRECOGNIZED','post','getOwnPropertyDescriptor','COMMENT','format','UniverCollaborationClientPlugin','rxjs'];_0x1b24=function(){return _0x3c7265;};return _0x1b24();}(function(_0xe2560a,_0x468dd3){const _0x51cb3d=_0xc2ff,_0x211f3d=_0xe2560a();while(!![]){try{const _0xa5b970=-parseInt(_0x51cb3d(0x1de))/0x1+-parseInt(_0x51cb3d(0x1d6))/0x2*(parseInt(_0x51cb3d(0x1a1))/0x3)+-parseInt(_0x51cb3d(0x1b6))/0x4+parseInt(_0x51cb3d(0x19f))/0x5*(parseInt(_0x51cb3d(0x1e4))/0x6)+-parseInt(_0x51cb3d(0x1a8))/0x7*(parseInt(_0x51cb3d(0x1ab))/0x8)+-parseInt(_0x51cb3d(0x1b8))/0x9*(-parseInt(_0x51cb3d(0x1cd))/0xa)+-parseInt(_0x51cb3d(0x1be))/0xb*(-parseInt(_0x51cb3d(0x171))/0xc);if(_0xa5b970===_0x468dd3)break;else _0x211f3d['push'](_0x211f3d['shift']());}catch(_0x531a8b){_0x211f3d['push'](_0x211f3d['shift']());}}}(_0x1b24,0x594d5),function(_0x4d7980,_0x22947a){const _0x31b9f8=_0xc2ff;typeof exports==_0x31b9f8(0x1f5)&&typeof module<'u'?_0x22947a(exports,require(_0x31b9f8(0x1c1)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x31b9f8(0x1cc)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x31b9f8(0x1e8))):typeof define==_0x31b9f8(0x1d4)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x31b9f8(0x18c),'@univerjs/core','@univerjs/thread-comment-ui',_0x31b9f8(0x1f4),_0x31b9f8(0x17b),_0x31b9f8(0x1e8)],_0x22947a):(_0x4d7980=typeof globalThis<'u'?globalThis:_0x4d7980||self,_0x22947a(_0x4d7980['UniverProThreadCommentDatasource']={},_0x4d7980[_0x31b9f8(0x1dc)],_0x4d7980[_0x31b9f8(0x1e6)],_0x4d7980['UniverCore'],_0x4d7980['UniverThreadCommentUi'],_0x4d7980[_0x31b9f8(0x1a4)],_0x4d7980['rxjs'],_0x4d7980[_0x31b9f8(0x1cf)]));}(this,function(_0x2cda17,_0x3c2b6e,_0x1ac677,_0x4bc811,_0x4ed381,_0x42ca36,_0x170452,_0x42baaf){'use strict';const _0x23e466=_0xc2ff;const _0x56b436=_0x23e466(0x18e);var _0x49f957=(_0x2473d9=>(_0x2473d9[_0x2473d9[_0x23e466(0x19b)]=0x0]=_0x23e466(0x19b),_0x2473d9[_0x2473d9[_0x23e466(0x1d0)]=0x1]='Solved',_0x2473d9[_0x2473d9[_0x23e466(0x175)]=-0x1]=_0x23e466(0x175),_0x2473d9))(_0x49f957||{}),_0x7579c7=(_0x586baa=>(_0x586baa[_0x586baa[_0x23e466(0x1ad)]=0x0]=_0x23e466(0x1ad),_0x586baa[_0x586baa[_0x23e466(0x1ba)]=0x1]='Add',_0x586baa[_0x586baa['Reply']=0x2]=_0x23e466(0x198),_0x586baa[_0x586baa['Edit']=0x3]=_0x23e466(0x1c3),_0x586baa[_0x586baa['Delete']=0x4]=_0x23e466(0x1af),_0x586baa[_0x586baa['Solve']=0x5]=_0x23e466(0x172),_0x586baa[_0x586baa[_0x23e466(0x175)]=-0x1]=_0x23e466(0x175),_0x586baa))(_0x7579c7||{});const _0x4f2d44=_0x85da16=>_0x4bc811[_0x23e466(0x1c4)](new Date(+_0x85da16))[_0x23e466(0x179)](_0x23e466(0x199)),_0x46866=async(_0x33019e,_0x3eeb97)=>{const _0x4be074=_0x23e466,_0x5cb744=_0x33019e['get'](_0x4bc811[_0x4be074(0x1b4)]),_0xb7d288=_0x33019e[_0x4be074(0x18d)](_0x42baaf[_0x4be074(0x1ed)]);_0x3eeb97[_0x4be074(0x19e)](_0x58cd7d=>{const _0x121ee0=_0x4be074;_0x5cb744[_0x121ee0(0x1d5)](_0x58cd7d)&&_0x3eeb97[_0x121ee0(0x1b9)](_0x58cd7d);}),_0x3eeb97[_0x4be074(0x1f2)]&&(await _0xb7d288[_0x4be074(0x18d)](_0x4be074(0x18a),{'params':{'userIDs':[..._0x3eeb97]}}))[_0x4be074(0x1c0)][_0x4be074(0x1e0)]['forEach'](_0x4bcaca=>{_0x4bcaca&&_0x5cb744['addUser'](_0x4bcaca);});};var _0x4e06a0=Object['getOwnPropertyDescriptor'],_0x3186b9=(_0xff3477,_0x49c24b,_0x276b77,_0xa00e75)=>{const _0x319fc5=_0x23e466;for(var _0x224c74=_0xa00e75>0x1?void 0x0:_0xa00e75?_0x4e06a0(_0x49c24b,_0x276b77):_0x49c24b,_0x98f7ed=_0xff3477[_0x319fc5(0x1b5)]-0x1,_0x3deb52;_0x98f7ed>=0x0;_0x98f7ed--)(_0x3deb52=_0xff3477[_0x98f7ed])&&(_0x224c74=_0x3deb52(_0x224c74)||_0x224c74);return _0x224c74;},_0x241010=(_0x2ac172,_0x3e4885)=>(_0xf3abec,_0x4725f6)=>_0x3e4885(_0xf3abec,_0x4725f6,_0x2ac172);let _0xe17943=class extends _0x4bc811[_0x23e466(0x190)]{constructor(_0x548534,_0x303197,_0x1825b1,_0x3e45b9){const _0x10616e=_0x23e466;super(),this[_0x10616e(0x19a)]=_0x548534,this['_threadCommentModel']=_0x303197,this[_0x10616e(0x184)]=_0x1825b1,this['_injector']=_0x3e45b9,this[_0x10616e(0x1bb)](),this[_0x10616e(0x17d)]();}['_initUserSync'](){const _0x3e4c77=_0x23e466;this[_0x3e4c77(0x1db)](this['_threadCommentModel'][_0x3e4c77(0x1d1)][_0x3e4c77(0x1aa)](_0x170452['bufferTime'](0x10))[_0x3e4c77(0x16b)](_0x48c0a7=>{const _0x31b493=_0x3e4c77,_0x6ab289=new Set();_0x48c0a7[_0x31b493(0x19e)](_0x3ad9a0=>{const _0x4c0514=_0x31b493;switch(_0x3ad9a0[_0x4c0514(0x195)]){case _0x4c0514(0x1a9):{const _0x4243d0=_0x3ad9a0[_0x4c0514(0x1ef)][_0x4c0514(0x1c2)];_0x6ab289[_0x4c0514(0x1a9)](_0x4243d0);break;}}}),_0x46866(this[_0x31b493(0x191)],_0x6ab289);}));}['_init'](){const _0x31cd63=_0x23e466;this['disposeWithMe'](this['_commentService'][_0x31cd63(0x1d1)][_0x31cd63(0x16b)](async _0x53af56=>{const _0x114e67=_0x31cd63;var _0x2c81a3,_0x161ede,_0xc6b7a7,_0x4a7d28;const _0x2c4f11=(_0x2c81a3=this[_0x114e67(0x1d9)]['getUnit'](_0x53af56[_0x114e67(0x18b)])[_0x114e67(0x17c)](_0x23c731=>_0x23c731['threadId']===_0x53af56['threadId']))==null?void 0x0:_0x2c81a3[_0x114e67(0x1cb)];if(!_0x2c4f11)return;const {unitId:_0x169ba0,subUnitId:_0x8d67ff}=_0x2c4f11;switch(_0x53af56['user']&&this[_0x114e67(0x184)][_0x114e67(0x1bd)](_0x53af56[_0x114e67(0x1ca)]),_0x53af56[_0x114e67(0x195)]){case _0x7579c7[_0x114e67(0x1ba)]:break;case _0x7579c7[_0x114e67(0x198)]:{this[_0x114e67(0x1d9)]['addComment'](_0x169ba0,_0x8d67ff,{'unitId':_0x169ba0,'subUnitId':_0x8d67ff,'ref':'','id':_0x53af56['replyId'],'dT':_0x4f2d44(+_0x53af56['createTimestamp']),'threadId':_0x53af56[_0x114e67(0x17e)],'personId':(_0xc6b7a7=(_0x161ede=_0x53af56[_0x114e67(0x1ca)])==null?void 0x0:_0x161ede['userID'])!=null?_0xc6b7a7:_0x53af56[_0x114e67(0x16c)],'text':JSON[_0x114e67(0x187)](_0x53af56[_0x114e67(0x1e1)]),'parentId':_0x2c4f11['id']});break;}case _0x7579c7[_0x114e67(0x1af)]:{const _0xf958fc=this['_threadCommentModel'][_0x114e67(0x1da)](_0x169ba0,_0x8d67ff,_0x53af56[_0x114e67(0x1a3)]);_0xf958fc&&_0xf958fc[_0x114e67(0x19d)]&&this[_0x114e67(0x1d9)][_0x114e67(0x1c5)](_0x169ba0,_0x8d67ff,_0x53af56['replyId']);break;}case _0x7579c7[_0x114e67(0x1c3)]:{this['_threadCommentModel'][_0x114e67(0x1a7)](_0x169ba0,_0x8d67ff,{'commentId':_0x53af56[_0x114e67(0x1a3)],'text':JSON['parse'](_0x53af56['content'])});break;}case _0x7579c7['Solve']:{const _0x15e217=(_0x4a7d28=this[_0x114e67(0x1d9)][_0x114e67(0x189)](_0x53af56['unitId'])[_0x114e67(0x17c)](_0x2c9bbc=>_0x2c9bbc['threadId']===_0x53af56['threadId']))==null?void 0x0:_0x4a7d28[_0x114e67(0x1cb)];_0x15e217&&this[_0x114e67(0x1d9)][_0x114e67(0x1f3)](_0x169ba0,_0x8d67ff,_0x15e217['id'],_0x53af56[_0x114e67(0x1ee)]===_0x49f957['Solved']);break;}}}));}};_0xe17943=_0x3186b9([_0x241010(0x0,_0x4bc811[_0x23e466(0x1a2)](_0x3c2b6e[_0x23e466(0x1ae)])),_0x241010(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x42ca36[_0x23e466(0x16f)])),_0x241010(0x2,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x1b4)])),_0x241010(0x3,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x194)]))],_0xe17943);const _0x7861ed=_0x23e466(0x1b0),_0x39d5f6={};var _0x25a751=Object[_0x23e466(0x177)],_0x2f8b90=(_0x50f348,_0x1ca39f,_0x1ac508,_0x1e33e8)=>{for(var _0x3a70f3=_0x1e33e8>0x1?void 0x0:_0x1e33e8?_0x25a751(_0x1ca39f,_0x1ac508):_0x1ca39f,_0x57e19f=_0x50f348['length']-0x1,_0x103748;_0x57e19f>=0x0;_0x57e19f--)(_0x103748=_0x50f348[_0x57e19f])&&(_0x3a70f3=_0x103748(_0x3a70f3)||_0x3a70f3);return _0x3a70f3;},_0x38d554=(_0x20630b,_0x295db8)=>(_0x35b36f,_0x14de0e)=>_0x295db8(_0x35b36f,_0x14de0e,_0x20630b);function _0x53cd5b(_0x8ec7a9,_0x55adc6){const _0x9d5bcf=_0x23e466,_0x3d5ac4=_0x8ec7a9[_0x9d5bcf(0x186)][0x0];return{..._0x55adc6,'id':_0x3d5ac4[_0x9d5bcf(0x1a3)],'resolved':_0x8ec7a9[_0x9d5bcf(0x1ee)]===0x1,'dT':_0x4f2d44(_0x3d5ac4[_0x9d5bcf(0x182)]),'personId':_0x3d5ac4[_0x9d5bcf(0x16c)],'threadId':_0x3d5ac4[_0x9d5bcf(0x17e)]};}function _0x1d3cca(_0x39af52,_0xd4c7dd,_0x5e3054){const _0x53f62e=_0x23e466;var _0xb0d6e3,_0x14d533;if(((_0x14d533=(_0xb0d6e3=_0x39af52==null?void 0x0:_0x39af52[_0x53f62e(0x186)])==null?void 0x0:_0xb0d6e3[_0x53f62e(0x1b5)])!=null?_0x14d533:0x0)>0x0){const _0x5077d5=(_0x46dffb,_0x386a99)=>({'id':_0x46dffb[_0x53f62e(0x1a3)],'threadId':_0x46dffb[_0x53f62e(0x17e)],'dT':_0x4f2d44(_0x46dffb[_0x53f62e(0x182)]),'personId':_0x46dffb[_0x53f62e(0x16c)],'resolved':_0x39af52[_0x53f62e(0x1ee)]===_0x49f957[_0x53f62e(0x1d0)],'unitId':_0xd4c7dd,'subUnitId':_0x5e3054,'text':JSON[_0x53f62e(0x187)](_0x46dffb['content']),'parentId':_0x386a99}),_0x598b1a=_0x5077d5(_0x39af52[_0x53f62e(0x186)][0x0]);return{..._0x598b1a,'children':_0x39af52[_0x53f62e(0x186)][_0x53f62e(0x174)](0x1)[_0x53f62e(0x1d3)](_0x346412=>_0x5077d5(_0x346412,_0x598b1a['id']))};}return null;}let _0x2ee8f8=class{constructor(_0x53f2b9,_0x5216a4,_0x35339d,_0x1d70e1){const _0x43ef8b=_0x23e466;this['_httpService']=_0x53f2b9,this[_0x43ef8b(0x184)]=_0x5216a4,this[_0x43ef8b(0x181)]=_0x35339d,this['_injector']=_0x1d70e1;}async['addComment'](_0x2a75cd){const _0xba2df6=_0x23e466;var _0x340114,_0x3f6b55;const {parentId:_0x5f414f,unitId:_0x15230e,text:_0x2136a7,threadId:_0x3788f3}=_0x2a75cd,_0x50eaf0=(_0x3f6b55=(_0x340114=_0x2136a7[_0xba2df6(0x1a5)])==null?void 0x0:_0x340114[_0xba2df6(0x1b7)](_0x217dbf=>_0x217dbf[_0xba2df6(0x1d7)]===_0x4bc811[_0xba2df6(0x1ac)][_0xba2df6(0x178)])[_0xba2df6(0x1d3)](_0x55f5e3=>_0x55f5e3[_0xba2df6(0x1e7)]))!=null?_0x3f6b55:[],_0x492b9e=JSON[_0xba2df6(0x1ec)](_0x2136a7),_0x5ac3fd=(await this[_0xba2df6(0x181)]['requireSession'](_0x15230e))['getMemberID']();if(_0x5f414f){const _0x45f975={'memberId':_0x5ac3fd,'unitId':_0x15230e,'content':_0x492b9e,'mention':_0x50eaf0,'threadId':_0x3788f3},_0x6d3835=(await this[_0xba2df6(0x1bf)][_0xba2df6(0x176)]('/universer-api/comment/unit/'+_0x15230e+_0xba2df6(0x1e5),{'body':_0x45f975}))[_0xba2df6(0x1c0)][_0xba2df6(0x193)];return{..._0x2a75cd,'id':_0x6d3835[_0xba2df6(0x1a3)],'dT':_0x4bc811[_0xba2df6(0x1c4)](+_0x6d3835[_0xba2df6(0x182)])[_0xba2df6(0x179)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x6d3835['userId']};}else{const _0x40ec2f={'memberId':_0x5ac3fd,'unitId':_0x15230e,'content':_0x492b9e,'mention':_0x50eaf0},_0x323aa2=await this['_httpService'][_0xba2df6(0x176)](_0xba2df6(0x188)+_0x15230e+_0xba2df6(0x1ea),{'body':_0x40ec2f});return _0x53cd5b(_0x323aa2[_0xba2df6(0x1c0)]['comment'],_0x2a75cd);}}async[_0x23e466(0x1a7)](_0x458f5f){const _0x1e2561=_0x23e466;var _0x240afc,_0x45df47;const {text:_0x32a327,unitId:_0xdfddc3}=_0x458f5f,_0x50aada=(_0x45df47=(_0x240afc=_0x32a327[_0x1e2561(0x1a5)])==null?void 0x0:_0x240afc['filter'](_0x25eccd=>_0x25eccd[_0x1e2561(0x1d7)]===_0x4bc811[_0x1e2561(0x1ac)][_0x1e2561(0x178)])[_0x1e2561(0x1d3)](_0x3c4c4f=>_0x3c4c4f[_0x1e2561(0x1e7)]))!=null?_0x45df47:[],_0x22ffd8=JSON['stringify'](_0x32a327),_0x5e3818=_0x458f5f[_0x1e2561(0x17e)],_0x42e500=_0x458f5f['id'],_0x33e4fa={'memberId':(await this[_0x1e2561(0x181)][_0x1e2561(0x170)](_0xdfddc3))[_0x1e2561(0x1f1)](),'unitId':_0xdfddc3,'threadId':_0x5e3818,'mention':_0x50aada,'content':_0x22ffd8,'replyId':_0x42e500},_0xb6edc6=await this['_httpService'][_0x1e2561(0x176)](_0x1e2561(0x188)+_0xdfddc3+'/edit',{'body':_0x33e4fa});return!_0xb6edc6[_0x1e2561(0x1c0)]['error']||_0xb6edc6[_0x1e2561(0x1c0)][_0x1e2561(0x197)][_0x1e2561(0x1c9)]===0x1;}async[_0x23e466(0x1f3)](_0x13e5eb){const _0x1aae61=_0x23e466,{unitId:_0x38bb11}=_0x13e5eb,_0x4bbd87=_0x13e5eb['threadId'],_0x297a24={'memberId':this[_0x1aae61(0x184)][_0x1aae61(0x1c6)]()[_0x1aae61(0x1b3)],'unitId':_0x38bb11,'threadId':_0x4bbd87,'solved':_0x13e5eb[_0x1aae61(0x183)]?_0x49f957['Solved']:_0x49f957[_0x1aae61(0x19b)]},_0x53ab18=await this['_httpService'][_0x1aae61(0x176)]('/universer-api/comment/unit/'+_0x38bb11+_0x1aae61(0x1e9),{'body':_0x297a24});return!_0x53ab18[_0x1aae61(0x1c0)]['error']||_0x53ab18[_0x1aae61(0x1c0)][_0x1aae61(0x197)][_0x1aae61(0x1c9)]===0x1;}async[_0x23e466(0x1c5)](_0x572478,_0x344320,_0xfc5f95,_0x57e45d){const _0x27568d=_0x23e466,_0x2e66f2={'memberId':(await this['_sessionService']['requireSession'](_0x572478))[_0x27568d(0x1f1)](),'threadId':_0xfc5f95,'replyId':_0x57e45d,'unitId':_0x572478},_0x1131ef=await this[_0x27568d(0x1bf)]['post'](_0x27568d(0x188)+_0x572478+_0x27568d(0x196),{'body':_0x2e66f2});return!_0x1131ef[_0x27568d(0x1c0)][_0x27568d(0x197)]||_0x1131ef[_0x27568d(0x1c0)][_0x27568d(0x197)][_0x27568d(0x1c9)]===0x1;}async[_0x23e466(0x1df)](_0x2e3641,_0x465f49,_0x2870df){const _0x2e8672=_0x23e466,_0xe181fb={'unitId':_0x2e3641,'threadId':_0x2870df},_0x62c341=await this[_0x2e8672(0x1bf)]['post']('/universer-api/comment/unit/'+_0x2e3641+'/list',{'body':_0xe181fb}),_0x324299=_0x2870df[_0x2e8672(0x1d3)](_0x14ffe0=>_0x1d3cca(_0x62c341[_0x2e8672(0x1c0)]['comments'][_0x14ffe0],_0x2e3641,_0x465f49))[_0x2e8672(0x1b7)](Boolean);return Object['values'](_0x62c341[_0x2e8672(0x1c0)][_0x2e8672(0x1e0)])[_0x2e8672(0x19e)](_0xd58492=>{const _0x3185f7=_0x2e8672;this[_0x3185f7(0x184)][_0x3185f7(0x1bd)](_0xd58492);}),_0x324299;}['saveCommentToSnapshot'](_0xce70b5){const _0x5712ae=_0x23e466;return{'id':_0xce70b5['id'],'threadId':_0xce70b5[_0x5712ae(0x17e)],'ref':_0xce70b5[_0x5712ae(0x1c7)]};}};_0x2ee8f8=_0x2f8b90([_0x38d554(0x0,_0x4bc811['Inject'](_0x42baaf[_0x23e466(0x1ed)])),_0x38d554(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x1b4)])),_0x38d554(0x2,_0x4bc811[_0x23e466(0x1a2)](_0x3c2b6e[_0x23e466(0x1d2)])),_0x38d554(0x3,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x194)]))],_0x2ee8f8);var _0x180394=Object[_0x23e466(0x177)],_0x279014=(_0x138799,_0x421191,_0x467a4b,_0x451df5)=>{const _0x4184ca=_0x23e466;for(var _0xd55d96=_0x451df5>0x1?void 0x0:_0x451df5?_0x180394(_0x421191,_0x467a4b):_0x421191,_0xf74ad6=_0x138799[_0x4184ca(0x1b5)]-0x1,_0x49fdd8;_0xf74ad6>=0x0;_0xf74ad6--)(_0x49fdd8=_0x138799[_0xf74ad6])&&(_0xd55d96=_0x49fdd8(_0xd55d96)||_0xd55d96);return _0xd55d96;},_0x1ad2ed=(_0x24137,_0x164f62)=>(_0x38c177,_0x9add8a)=>_0x164f62(_0x38c177,_0x9add8a,_0x24137);let _0x25a678=class extends _0x4bc811[_0x23e466(0x190)]{constructor(_0x42b183,_0x4466d9){const _0x3e1af3=_0x23e466;super(),this[_0x3e1af3(0x1c8)]=_0x42b183,this[_0x3e1af3(0x16d)]=_0x4466d9,this[_0x3e1af3(0x1eb)]();}[_0x23e466(0x1eb)](){const _0x1170fd=_0x23e466;this['_threadCommentDataSourceService'][_0x1170fd(0x1bc)]=this[_0x1170fd(0x16d)],this[_0x1170fd(0x1c8)][_0x1170fd(0x180)]=!0x1;}};_0x25a678=_0x279014([_0x1ad2ed(0x0,_0x42ca36[_0x23e466(0x192)]),_0x1ad2ed(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x2ee8f8))],_0x25a678);var _0x1dee9a=Object[_0x23e466(0x1d8)],_0x3b80a1=Object[_0x23e466(0x177)],_0x2b77a5=(_0x4e1a8c,_0x1c7f84,_0x45b947)=>_0x1c7f84 in _0x4e1a8c?_0x1dee9a(_0x4e1a8c,_0x1c7f84,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45b947}):_0x4e1a8c[_0x1c7f84]=_0x45b947,_0x2c8e6c=(_0x4dc19b,_0x4c95f3,_0x4c3085,_0x23aac6)=>{const _0x442661=_0x23e466;for(var _0x400b01=_0x23aac6>0x1?void 0x0:_0x23aac6?_0x3b80a1(_0x4c95f3,_0x4c3085):_0x4c95f3,_0x40d89c=_0x4dc19b[_0x442661(0x1b5)]-0x1,_0x361d9a;_0x40d89c>=0x0;_0x40d89c--)(_0x361d9a=_0x4dc19b[_0x40d89c])&&(_0x400b01=_0x361d9a(_0x400b01)||_0x400b01);return _0x400b01;},_0xc8ef01=(_0x1f12c0,_0x52b3ba)=>(_0x21823a,_0x5ba8af)=>_0x52b3ba(_0x21823a,_0x5ba8af,_0x1f12c0),_0x327592=(_0x10ddf6,_0x4bfa5e,_0x5bd94b)=>_0x2b77a5(_0x10ddf6,typeof _0x4bfa5e!='symbol'?_0x4bfa5e+'':_0x4bfa5e,_0x5bd94b);_0x2cda17[_0x23e466(0x18f)]=class extends _0x4bc811[_0x23e466(0x1ce)]{constructor(_0x30ef12=_0x39d5f6,_0x43a07a,_0x56c497){const _0x4ab8c3=_0x23e466;super(),this[_0x4ab8c3(0x1b1)]=_0x30ef12,this['_injector']=_0x43a07a,this[_0x4ab8c3(0x19c)]=_0x56c497;const {..._0x2a5292}=_0x4bc811[_0x4ab8c3(0x16e)]({},_0x39d5f6,this[_0x4ab8c3(0x1b1)]);this['_configService'][_0x4ab8c3(0x1a0)](_0x7861ed,_0x2a5292);}['onStarting'](){[[_0x2ee8f8],[_0x25a678],[_0xe17943]]['forEach'](_0x3790df=>{const _0x2180d1=_0xc2ff;this[_0x2180d1(0x191)][_0x2180d1(0x1a9)](_0x3790df);});}['onReady'](){const _0x426b84=_0x23e466;this[_0x426b84(0x191)][_0x426b84(0x18d)](_0x25a678),this[_0x426b84(0x191)]['get'](_0xe17943);}},_0x327592(_0x2cda17['UniverThreadCommentDataSourcePlugin'],_0x23e466(0x1e3),_0x56b436),_0x327592(_0x2cda17['UniverThreadCommentDataSourcePlugin'],'type',_0x4bc811[_0x23e466(0x185)][_0x23e466(0x1dd)]),_0x2cda17[_0x23e466(0x18f)]=_0x2c8e6c([_0x4bc811[_0x23e466(0x1b2)](_0x4ed381[_0x23e466(0x1e2)],_0x3c2b6e[_0x23e466(0x17a)],_0x1ac677[_0x23e466(0x1f0)]),_0xc8ef01(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x194)])),_0xc8ef01(0x2,_0x4bc811[_0x23e466(0x17f)])],_0x2cda17[_0x23e466(0x18f)]),Object[_0x23e466(0x1d8)](_0x2cda17,Symbol[_0x23e466(0x1a6)],{'value':_0x23e466(0x173)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.0-nightly.202506021607",
3
+ "version": "0.8.0-nightly.202506031608",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.0-nightly.202506021607",
49
- "@univerjs-pro/license": "0.8.0-nightly.202506021607",
50
- "@univerjs/core": "0.8.0-nightly.202506021607",
51
- "@univerjs/network": "0.8.0-nightly.202506021607",
48
+ "@univerjs-pro/collaboration-client": "0.8.0-nightly.202506031608",
49
+ "@univerjs-pro/license": "0.8.0-nightly.202506031608",
50
+ "@univerjs/core": "0.8.0-nightly.202506031608",
51
+ "@univerjs/network": "0.8.0-nightly.202506031608",
52
52
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment-ui": "0.8.0-nightly.202506021607",
54
- "@univerjs/thread-comment": "0.8.0-nightly.202506021607"
53
+ "@univerjs/thread-comment": "0.8.0-nightly.202506031608",
54
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202506031608"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
- "vitest": "^3.1.4",
60
+ "vitest": "^3.2.0",
61
61
  "@univerjs-infra/shared": "0.8.0-beta.1"
62
62
  },
63
63
  "scripts": {