@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505061607 → 0.7.0-nightly.202505091607
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x4252(_0x3e8f12,_0x5bd4f9){const _0x1a0787=_0x1a07();return _0x4252=function(_0x42522e,_0x5d7013){_0x42522e=_0x42522e-0x160;let _0x593c16=_0x1a0787[_0x42522e];return _0x593c16;},_0x4252(_0x3e8f12,_0x5bd4f9);}const _0x5c5821=_0x4252;(function(_0x1e054b,_0x5b8930){const _0x3f8a25=_0x4252,_0x3f1b56=_0x1e054b();while(!![]){try{const _0x2a855d=-parseInt(_0x3f8a25(0x1d4))/0x1*(parseInt(_0x3f8a25(0x1d5))/0x2)+-parseInt(_0x3f8a25(0x18a))/0x3+-parseInt(_0x3f8a25(0x1b6))/0x4*(-parseInt(_0x3f8a25(0x186))/0x5)+parseInt(_0x3f8a25(0x18b))/0x6+parseInt(_0x3f8a25(0x1df))/0x7+parseInt(_0x3f8a25(0x166))/0x8*(-parseInt(_0x3f8a25(0x1e3))/0x9)+parseInt(_0x3f8a25(0x1e0))/0xa;if(_0x2a855d===_0x5b8930)break;else _0x3f1b56['push'](_0x3f1b56['shift']());}catch(_0x515f80){_0x3f1b56['push'](_0x3f1b56['shift']());}}}(_0x1a07,0x8ec54));Object[_0x5c5821(0x1b4)](exports,Symbol[_0x5c5821(0x1ae)],{'value':_0x5c5821(0x185)});const b=require(_0x5c5821(0x1ac)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x5c5821(0x19b)),M=require(_0x5c5821(0x188)),w=require(_0x5c5821(0x1bd)),P=require(_0x5c5821(0x18e)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3542c3=>(_0x3542c3[_0x3542c3[_0x5c5821(0x183)]=0x0]='OpenOrReOpen',_0x3542c3[_0x3542c3['Solved']=0x1]='Solved',_0x3542c3[_0x3542c3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3542c3))(I||{}),v=(_0x5ca57a=>(_0x5ca57a[_0x5ca57a[_0x5c5821(0x181)]=0x0]=_0x5c5821(0x181),_0x5ca57a[_0x5ca57a[_0x5c5821(0x1b7)]=0x1]=_0x5c5821(0x1b7),_0x5ca57a[_0x5ca57a['Reply']=0x2]='Reply',_0x5ca57a[_0x5ca57a['Edit']=0x3]=_0x5c5821(0x1af),_0x5ca57a[_0x5ca57a['Delete']=0x4]=_0x5c5821(0x1a8),_0x5ca57a[_0x5ca57a[_0x5c5821(0x1b3)]=0x5]='Solve',_0x5ca57a[_0x5ca57a[_0x5c5821(0x184)]=-0x1]=_0x5c5821(0x184),_0x5ca57a))(v||{});const f=_0x55f01d=>c[_0x5c5821(0x1a4)](new Date(+_0x55f01d))[_0x5c5821(0x1c4)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x209c1c,_0x4ac234)=>{const _0x17e926=_0x5c5821,_0x56543f=_0x209c1c[_0x17e926(0x169)](c[_0x17e926(0x171)]),_0x1ee905=_0x209c1c[_0x17e926(0x169)](P[_0x17e926(0x19d)]);_0x4ac234[_0x17e926(0x17b)](_0x279db4=>{const _0x27094b=_0x17e926;_0x56543f[_0x27094b(0x191)](_0x279db4)&&_0x4ac234[_0x27094b(0x1db)](_0x279db4);}),_0x4ac234[_0x17e926(0x1d8)]&&(await _0x1ee905[_0x17e926(0x169)](_0x17e926(0x1b0),{'params':{'userIDs':[..._0x4ac234]}}))[_0x17e926(0x179)]['users'][_0x17e926(0x17b)](_0x2a2f0f=>{const _0x8aaf58=_0x17e926;_0x2a2f0f&&_0x56543f[_0x8aaf58(0x1ab)](_0x2a2f0f);});};var $=Object[_0x5c5821(0x196)],E=(_0xf8b4c7,_0x24755e,_0x3f7014,_0x1cf293)=>{const _0x5b228e=_0x5c5821;for(var _0x4891eb=_0x1cf293>0x1?void 0x0:_0x1cf293?$(_0x24755e,_0x3f7014):_0x24755e,_0x550159=_0xf8b4c7[_0x5b228e(0x1be)]-0x1,_0x522d88;_0x550159>=0x0;_0x550159--)(_0x522d88=_0xf8b4c7[_0x550159])&&(_0x4891eb=_0x522d88(_0x4891eb)||_0x4891eb);return _0x4891eb;},S=(_0x576619,_0x16b570)=>(_0x18c145,_0x161b38)=>_0x16b570(_0x18c145,_0x161b38,_0x576619);let p=class extends c[_0x5c5821(0x190)]{constructor(_0x277eed,_0x1254b3,_0x1cc20a,_0x4f315e){const _0x363dfb=_0x5c5821;super(),this[_0x363dfb(0x161)]=_0x277eed,this['_threadCommentModel']=_0x1254b3,this[_0x363dfb(0x176)]=_0x1cc20a,this[_0x363dfb(0x182)]=_0x4f315e,this[_0x363dfb(0x163)](),this['_initUserSync']();}[_0x5c5821(0x1bf)](){const _0xc136ae=_0x5c5821;this['disposeWithMe'](this['_threadCommentModel'][_0xc136ae(0x195)][_0xc136ae(0x1cb)](w[_0xc136ae(0x178)](0x10))[_0xc136ae(0x1b2)](_0x39346d=>{const _0x2e547f=_0xc136ae,_0x570875=new Set();_0x39346d[_0x2e547f(0x17b)](_0x571c64=>{const _0x2e95df=_0x2e547f;switch(_0x571c64[_0x2e95df(0x1ca)]){case _0x2e95df(0x189):{const _0x51328d=_0x571c64[_0x2e95df(0x1b9)][_0x2e95df(0x1cf)];_0x570875[_0x2e95df(0x189)](_0x51328d);break;}}}),R(this[_0x2e547f(0x182)],_0x570875);}));}[_0x5c5821(0x163)](){const _0x2a802a=_0x5c5821;this[_0x2a802a(0x1c2)](this[_0x2a802a(0x161)]['commentUpdate$'][_0x2a802a(0x1b2)](async _0x219574=>{const _0x554d50=_0x2a802a;var _0x4b6165,_0x1b891e,_0x760f90,_0x52e7e5;const _0x436a85=(_0x4b6165=this[_0x554d50(0x1ad)][_0x554d50(0x193)](_0x219574[_0x554d50(0x17d)])['find'](_0x7d40d6=>_0x7d40d6[_0x554d50(0x180)]===_0x219574['threadId']))==null?void 0x0:_0x4b6165[_0x554d50(0x1a6)];if(!_0x436a85)return;const {unitId:_0x4916b1,subUnitId:_0x4d4cbe}=_0x436a85;switch(_0x219574[_0x554d50(0x164)]&&this[_0x554d50(0x176)][_0x554d50(0x1ab)](_0x219574[_0x554d50(0x164)]),_0x219574[_0x554d50(0x1ca)]){case v[_0x554d50(0x1b7)]:break;case v[_0x554d50(0x1aa)]:{this[_0x554d50(0x1ad)][_0x554d50(0x1b5)](_0x4916b1,_0x4d4cbe,{'unitId':_0x4916b1,'subUnitId':_0x4d4cbe,'ref':'','id':_0x219574[_0x554d50(0x18f)],'dT':f(+_0x219574[_0x554d50(0x1d3)]),'threadId':_0x219574[_0x554d50(0x180)],'personId':(_0x760f90=(_0x1b891e=_0x219574[_0x554d50(0x164)])==null?void 0x0:_0x1b891e[_0x554d50(0x1c0)])!=null?_0x760f90:_0x219574[_0x554d50(0x197)],'text':JSON[_0x554d50(0x1dd)](_0x219574[_0x554d50(0x16d)]),'parentId':_0x436a85['id']});break;}case v[_0x554d50(0x1a8)]:{const _0x494ff2=this[_0x554d50(0x1ad)][_0x554d50(0x16a)](_0x4916b1,_0x4d4cbe,_0x219574[_0x554d50(0x18f)]);_0x494ff2&&_0x494ff2['parentId']&&this[_0x554d50(0x1ad)][_0x554d50(0x194)](_0x4916b1,_0x4d4cbe,_0x219574[_0x554d50(0x18f)]);break;}case v[_0x554d50(0x1af)]:{this[_0x554d50(0x1ad)]['updateComment'](_0x4916b1,_0x4d4cbe,{'commentId':_0x219574[_0x554d50(0x18f)],'text':JSON[_0x554d50(0x1dd)](_0x219574['content'])});break;}case v['Solve']:{const _0x358d91=(_0x52e7e5=this[_0x554d50(0x1ad)]['getUnit'](_0x219574[_0x554d50(0x17d)])[_0x554d50(0x16e)](_0x3a696a=>_0x3a696a[_0x554d50(0x180)]===_0x219574[_0x554d50(0x180)]))==null?void 0x0:_0x52e7e5['root'];_0x358d91&&this[_0x554d50(0x1ad)][_0x554d50(0x160)](_0x4916b1,_0x4d4cbe,_0x358d91['id'],_0x219574[_0x554d50(0x17c)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5c5821(0x162)])),S(0x1,c[_0x5c5821(0x17a)](M[_0x5c5821(0x1a0)])),S(0x2,c[_0x5c5821(0x17a)](c[_0x5c5821(0x171)])),S(0x3,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1ed0a2,_0x260da3,_0x148111,_0x352da5)=>{const _0x51d31a=_0x5c5821;for(var _0x271aad=_0x352da5>0x1?void 0x0:_0x352da5?A(_0x260da3,_0x148111):_0x260da3,_0x19515e=_0x1ed0a2[_0x51d31a(0x1be)]-0x1,_0x1cfcf5;_0x19515e>=0x0;_0x19515e--)(_0x1cfcf5=_0x1ed0a2[_0x19515e])&&(_0x271aad=_0x1cfcf5(_0x271aad)||_0x271aad);return _0x271aad;},_=(_0x5c77b2,_0x30fe29)=>(_0x7f8418,_0x2093af)=>_0x30fe29(_0x7f8418,_0x2093af,_0x5c77b2);function Y(_0x415c04,_0xdef6a3){const _0x27f31b=_0x5c5821,_0x3639eb=_0x415c04['replies'][0x0];return{..._0xdef6a3,'id':_0x3639eb[_0x27f31b(0x18f)],'resolved':_0x415c04[_0x27f31b(0x17c)]===0x1,'dT':f(_0x3639eb[_0x27f31b(0x1d3)]),'personId':_0x3639eb[_0x27f31b(0x197)],'threadId':_0x3639eb[_0x27f31b(0x180)]};}function G(_0xa616fb,_0x44bd8d,_0x5c606b){const _0x5e4518=_0x5c5821;var _0x88e8a0,_0x157797;if(((_0x157797=(_0x88e8a0=_0xa616fb==null?void 0x0:_0xa616fb[_0x5e4518(0x1e1)])==null?void 0x0:_0x88e8a0['length'])!=null?_0x157797:0x0)>0x0){const _0x488fa8=(_0x362634,_0x3de9bf)=>({'id':_0x362634[_0x5e4518(0x18f)],'threadId':_0x362634[_0x5e4518(0x180)],'dT':f(_0x362634['createTimestamp']),'personId':_0x362634[_0x5e4518(0x197)],'resolved':_0xa616fb[_0x5e4518(0x17c)]===I['Solved'],'unitId':_0x44bd8d,'subUnitId':_0x5c606b,'text':JSON[_0x5e4518(0x1dd)](_0x362634[_0x5e4518(0x16d)]),'parentId':_0x3de9bf}),_0x4c8359=_0x488fa8(_0xa616fb[_0x5e4518(0x1e1)][0x0]);return{..._0x4c8359,'children':_0xa616fb['replies']['slice'](0x1)[_0x5e4518(0x1cc)](_0x70bf16=>_0x488fa8(_0x70bf16,_0x4c8359['id']))};}return null;}let g=class{constructor(_0x9033a9,_0x3607f9,_0x185642,_0x5ef25c){const _0x3b0f8e=_0x5c5821;this[_0x3b0f8e(0x1c5)]=_0x9033a9,this[_0x3b0f8e(0x176)]=_0x3607f9,this[_0x3b0f8e(0x1d9)]=_0x185642,this[_0x3b0f8e(0x182)]=_0x5ef25c;}async[_0x5c5821(0x1b5)](_0x4a35c3){const _0x7e947e=_0x5c5821;var _0x40b905,_0x512cec;const {parentId:_0x1c52f0,unitId:_0x3f2184,text:_0x413bb9,threadId:_0x1be4a8}=_0x4a35c3,_0x3a78c0=(_0x512cec=(_0x40b905=_0x413bb9[_0x7e947e(0x1a7)])==null?void 0x0:_0x40b905[_0x7e947e(0x1c8)](_0x43d2c2=>_0x43d2c2[_0x7e947e(0x198)]===c['CustomRangeType'][_0x7e947e(0x1d2)])[_0x7e947e(0x1cc)](_0x517edb=>_0x517edb[_0x7e947e(0x167)]))!=null?_0x512cec:[],_0x2de600=JSON[_0x7e947e(0x1b8)](_0x413bb9),_0x2c2a2d=(await this[_0x7e947e(0x1d9)][_0x7e947e(0x177)](_0x3f2184))['getMemberID']();if(_0x1c52f0){const _0xdbac6d={'memberId':_0x2c2a2d,'unitId':_0x3f2184,'content':_0x2de600,'mention':_0x3a78c0,'threadId':_0x1be4a8},_0x2abf92=(await this[_0x7e947e(0x1c5)][_0x7e947e(0x1d7)](_0x7e947e(0x17f)+_0x3f2184+_0x7e947e(0x1b1),{'body':_0xdbac6d}))[_0x7e947e(0x179)][_0x7e947e(0x168)];return{..._0x4a35c3,'id':_0x2abf92[_0x7e947e(0x18f)],'dT':c[_0x7e947e(0x1a4)](+_0x2abf92['createTimestamp'])[_0x7e947e(0x1c4)](_0x7e947e(0x1c3)),'personId':_0x2abf92[_0x7e947e(0x197)]};}else{const _0x81f9ea={'memberId':_0x2c2a2d,'unitId':_0x3f2184,'content':_0x2de600,'mention':_0x3a78c0},_0x2546aa=await this['_httpService'][_0x7e947e(0x1d7)]('/universer-api/comment/unit/'+_0x3f2184+'/add',{'body':_0x81f9ea});return Y(_0x2546aa[_0x7e947e(0x179)][_0x7e947e(0x18c)],_0x4a35c3);}}async[_0x5c5821(0x199)](_0x2fcfd0){const _0x3651cb=_0x5c5821;var _0x1b6fe6,_0x246d59;const {text:_0x547009,unitId:_0x5d3ecb}=_0x2fcfd0,_0x38eded=(_0x246d59=(_0x1b6fe6=_0x547009[_0x3651cb(0x1a7)])==null?void 0x0:_0x1b6fe6[_0x3651cb(0x1c8)](_0x1f23d8=>_0x1f23d8[_0x3651cb(0x198)]===c[_0x3651cb(0x1d1)][_0x3651cb(0x1d2)])[_0x3651cb(0x1cc)](_0x2df4d4=>_0x2df4d4['rangeId']))!=null?_0x246d59:[],_0x1d571c=JSON[_0x3651cb(0x1b8)](_0x547009),_0x595004=_0x2fcfd0[_0x3651cb(0x180)],_0x4488e6=_0x2fcfd0['id'],_0x4836fa={'memberId':(await this[_0x3651cb(0x1d9)][_0x3651cb(0x177)](_0x5d3ecb))[_0x3651cb(0x1e2)](),'unitId':_0x5d3ecb,'threadId':_0x595004,'mention':_0x38eded,'content':_0x1d571c,'replyId':_0x4488e6},_0x135940=await this[_0x3651cb(0x1c5)]['post'](_0x3651cb(0x17f)+_0x5d3ecb+_0x3651cb(0x1de),{'body':_0x4836fa});return!_0x135940['body'][_0x3651cb(0x174)]||_0x135940[_0x3651cb(0x179)][_0x3651cb(0x174)][_0x3651cb(0x16c)]===0x1;}async[_0x5c5821(0x160)](_0x168d69){const _0x1d0348=_0x5c5821,{unitId:_0x58f598}=_0x168d69,_0x454849=_0x168d69[_0x1d0348(0x180)],_0x16b810={'memberId':this['_userService'][_0x1d0348(0x1c1)]()[_0x1d0348(0x1c0)],'unitId':_0x58f598,'threadId':_0x454849,'solved':_0x168d69[_0x1d0348(0x170)]?I[_0x1d0348(0x1a3)]:I[_0x1d0348(0x183)]},_0x3d7baf=await this[_0x1d0348(0x1c5)]['post'](_0x1d0348(0x17f)+_0x58f598+_0x1d0348(0x187),{'body':_0x16b810});return!_0x3d7baf[_0x1d0348(0x179)]['error']||_0x3d7baf['body'][_0x1d0348(0x174)][_0x1d0348(0x16c)]===0x1;}async[_0x5c5821(0x194)](_0x121988,_0x18b5bb,_0x20a890,_0x3f1a69){const _0x1e7827=_0x5c5821,_0x4e5505={'memberId':(await this[_0x1e7827(0x1d9)][_0x1e7827(0x177)](_0x121988))[_0x1e7827(0x1e2)](),'threadId':_0x20a890,'replyId':_0x3f1a69,'unitId':_0x121988},_0x32586d=await this[_0x1e7827(0x1c5)][_0x1e7827(0x1d7)](_0x1e7827(0x17f)+_0x121988+_0x1e7827(0x1d6),{'body':_0x4e5505});return!_0x32586d[_0x1e7827(0x179)]['error']||_0x32586d[_0x1e7827(0x179)]['error']['code']===0x1;}async[_0x5c5821(0x16f)](_0xd4f3d1,_0x2ca29c,_0x18e7b0){const _0x17a04c=_0x5c5821,_0x23ec22={'unitId':_0xd4f3d1,'threadId':_0x18e7b0},_0x14e1f6=await this[_0x17a04c(0x1c5)][_0x17a04c(0x1d7)](_0x17a04c(0x17f)+_0xd4f3d1+_0x17a04c(0x1c9),{'body':_0x23ec22}),_0x3966bb=_0x18e7b0['map'](_0x28fcfd=>G(_0x14e1f6[_0x17a04c(0x179)][_0x17a04c(0x172)][_0x28fcfd],_0xd4f3d1,_0x2ca29c))[_0x17a04c(0x1c8)](Boolean);return Object[_0x17a04c(0x175)](_0x14e1f6[_0x17a04c(0x179)][_0x17a04c(0x17e)])['forEach'](_0x40758c=>{const _0x5471a8=_0x17a04c;this[_0x5471a8(0x176)][_0x5471a8(0x1ab)](_0x40758c);}),_0x3966bb;}[_0x5c5821(0x1ba)](_0x3c619a){const _0x18452f=_0x5c5821;return{'id':_0x3c619a['id'],'threadId':_0x3c619a['threadId'],'ref':_0x3c619a[_0x18452f(0x19a)]};}};g=x([_(0x0,c[_0x5c5821(0x17a)](P[_0x5c5821(0x19d)])),_(0x1,c[_0x5c5821(0x17a)](c[_0x5c5821(0x171)])),_(0x2,c[_0x5c5821(0x17a)](b[_0x5c5821(0x1a1)])),_(0x3,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)]))],g);var H=Object[_0x5c5821(0x196)],J=(_0x5d4fee,_0x4b997a,_0x1206b5,_0x1e95ff)=>{const _0x247aed=_0x5c5821;for(var _0x1bab69=_0x1e95ff>0x1?void 0x0:_0x1e95ff?H(_0x4b997a,_0x1206b5):_0x4b997a,_0xfa1fae=_0x5d4fee[_0x247aed(0x1be)]-0x1,_0x5a1b31;_0xfa1fae>=0x0;_0xfa1fae--)(_0x5a1b31=_0x5d4fee[_0xfa1fae])&&(_0x1bab69=_0x5a1b31(_0x1bab69)||_0x1bab69);return _0x1bab69;},y=(_0x28a718,_0x53c374)=>(_0x3b901f,_0x19e2e5)=>_0x53c374(_0x3b901f,_0x19e2e5,_0x28a718);let C=class extends c[_0x5c5821(0x190)]{constructor(_0x2ef3bb,_0x44a57d){const _0x4a0839=_0x5c5821;super(),this[_0x4a0839(0x1c7)]=_0x2ef3bb,this[_0x4a0839(0x18d)]=_0x44a57d,this[_0x4a0839(0x165)]();}[_0x5c5821(0x165)](){const _0x245729=_0x5c5821;this[_0x245729(0x1c7)][_0x245729(0x1e5)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x5c5821(0x1e4)]),y(0x1,c[_0x5c5821(0x17a)](g))],C);function _0x1a07(){const _0x4b465a=['/solved','@univerjs/thread-comment','add','3040248KfFEVX','6607314mJgdAr','comment','_threadCommentDataSource','@univerjs/network','replyId','Disposable','getUser','UniverInstanceType','getUnit','deleteComment','commentUpdate$','getOwnPropertyDescriptor','userId','rangeType','updateComment','ref','@univerjs/thread-comment-ui','UniverThreadCommentUIPlugin','HTTPService','onStarting','pluginName','ThreadCommentModel','CollaborationSessionService','UniverLicensePlugin','Solved','dayjs','symbol','root','customRanges','Delete','UNIVER_UNKNOWN','Reply','addUser','@univerjs-pro/collaboration-client','_threadCommentModel','toStringTag','Edit','/universer-api/user/list','/reply','subscribe','Solve','defineProperty','addComment','44972wftiap','Add','stringify','payload','saveCommentToSnapshot','Injector','UniverCollaborationClientPlugin','rxjs','length','_initUserSync','userID','getCurrentUser','disposeWithMe','YYYY/MM/DD\x20HH:mm','format','_httpService','onReady','_threadCommentDataSourceService','filter','/list','type','pipe','map','Plugin','_configService','personId','UniverThreadCommentDataSourcePlugin','CustomRangeType','COMMENT','createTimestamp','326503gSGcBk','6rXrrax','/delete','post','size','_sessionService','_config','delete','merge','parse','/edit','3649653Ujkcdb','9500060BqJaZJ','replies','getMemberID','18dTTciM','IThreadCommentDataSourceService','dataSource','resolveComment','_commentService','CommentService','_init','user','_initDataSource','2003304EcDtYD','rangeId','reply','get','getComment','setConfig','code','content','find','listComments','resolved','UserManagerService','comments','IConfigService','error','values','_userService','requireSession','bufferTime','body','Inject','forEach','solved','unitId','users','/universer-api/comment/unit/','threadId','Unknown','_injector','OpenOrReOpen','UNRECOGNIZED','Module','225recBAu'];_0x1a07=function(){return _0x4b465a;};return _0x1a07();}var F=Object['defineProperty'],L=Object[_0x5c5821(0x196)],Z=(_0x192b33,_0x3b0912,_0x514dc4)=>_0x3b0912 in _0x192b33?F(_0x192b33,_0x3b0912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x514dc4}):_0x192b33[_0x3b0912]=_0x514dc4,W=(_0x496ada,_0x1760f3,_0x5c83ed,_0x62b9fb)=>{for(var _0x797f70=_0x62b9fb>0x1?void 0x0:_0x62b9fb?L(_0x1760f3,_0x5c83ed):_0x1760f3,_0xde5710=_0x496ada['length']-0x1,_0x1fe7dc;_0xde5710>=0x0;_0xde5710--)(_0x1fe7dc=_0x496ada[_0xde5710])&&(_0x797f70=_0x1fe7dc(_0x797f70)||_0x797f70);return _0x797f70;},O=(_0x2ce591,_0x208861)=>(_0x5c0bce,_0x3c17bf)=>_0x208861(_0x5c0bce,_0x3c17bf,_0x2ce591),N=(_0xb2c2e9,_0x1757a0,_0x49307a)=>Z(_0xb2c2e9,typeof _0x1757a0!=_0x5c5821(0x1a5)?_0x1757a0+'':_0x1757a0,_0x49307a);exports[_0x5c5821(0x1d0)]=class extends c[_0x5c5821(0x1cd)]{constructor(_0x214ed2=D,_0x551061,_0x334165){const _0x4054e4=_0x5c5821;super(),this[_0x4054e4(0x1da)]=_0x214ed2,this[_0x4054e4(0x182)]=_0x551061,this[_0x4054e4(0x1ce)]=_0x334165;const {..._0x28ba54}=c[_0x4054e4(0x1dc)]({},D,this['_config']);this[_0x4054e4(0x1ce)][_0x4054e4(0x16b)](q,_0x28ba54);}[_0x5c5821(0x19e)](){[[g],[C],[p]]['forEach'](_0x220ca5=>{const _0x548c8f=_0x4252;this[_0x548c8f(0x182)][_0x548c8f(0x189)](_0x220ca5);});}[_0x5c5821(0x1c6)](){const _0x108138=_0x5c5821;this['_injector'][_0x108138(0x169)](C),this[_0x108138(0x182)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5c5821(0x19f),U),N(exports[_0x5c5821(0x1d0)],_0x5c5821(0x1ca),c[_0x5c5821(0x192)][_0x5c5821(0x1a9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x5c5821(0x19c)],b[_0x5c5821(0x1bc)],T[_0x5c5821(0x1a2)]),O(0x1,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)])),O(0x2,c[_0x5c5821(0x173)])],exports[_0x5c5821(0x1d0)]);
|
|
1
|
+
'use strict';const _0x30cd26=_0x1c7d;(function(_0x565df1,_0x149dd3){const _0x3b6e75=_0x1c7d,_0x50f536=_0x565df1();while(!![]){try{const _0x280626=-parseInt(_0x3b6e75(0x16e))/0x1+parseInt(_0x3b6e75(0x1ca))/0x2+-parseInt(_0x3b6e75(0x1c8))/0x3+-parseInt(_0x3b6e75(0x1bb))/0x4+parseInt(_0x3b6e75(0x1a7))/0x5*(-parseInt(_0x3b6e75(0x1af))/0x6)+parseInt(_0x3b6e75(0x187))/0x7*(parseInt(_0x3b6e75(0x16a))/0x8)+parseInt(_0x3b6e75(0x1cc))/0x9;if(_0x280626===_0x149dd3)break;else _0x50f536['push'](_0x50f536['shift']());}catch(_0x41e2ea){_0x50f536['push'](_0x50f536['shift']());}}}(_0x4690,0x6cf58));Object[_0x30cd26(0x1b8)](exports,Symbol[_0x30cd26(0x181)],{'value':_0x30cd26(0x199)});const b=require(_0x30cd26(0x1c2)),T=require(_0x30cd26(0x1cf)),c=require(_0x30cd26(0x1df)),j=require(_0x30cd26(0x179)),M=require(_0x30cd26(0x1c5)),w=require(_0x30cd26(0x18d)),P=require(_0x30cd26(0x17e)),U=_0x30cd26(0x1ac);var I=(_0x3237aa=>(_0x3237aa[_0x3237aa['OpenOrReOpen']=0x0]=_0x30cd26(0x1b1),_0x3237aa[_0x3237aa['Solved']=0x1]=_0x30cd26(0x171),_0x3237aa[_0x3237aa[_0x30cd26(0x1da)]=-0x1]='UNRECOGNIZED',_0x3237aa))(I||{}),v=(_0x196f45=>(_0x196f45[_0x196f45[_0x30cd26(0x188)]=0x0]=_0x30cd26(0x188),_0x196f45[_0x196f45[_0x30cd26(0x1d8)]=0x1]='Add',_0x196f45[_0x196f45['Reply']=0x2]=_0x30cd26(0x18c),_0x196f45[_0x196f45['Edit']=0x3]=_0x30cd26(0x1d7),_0x196f45[_0x196f45[_0x30cd26(0x1b3)]=0x4]=_0x30cd26(0x1b3),_0x196f45[_0x196f45[_0x30cd26(0x1be)]=0x5]='Solve',_0x196f45[_0x196f45[_0x30cd26(0x1da)]=-0x1]=_0x30cd26(0x1da),_0x196f45))(v||{});const f=_0x3365ca=>c[_0x30cd26(0x1c6)](new Date(+_0x3365ca))[_0x30cd26(0x1bd)](_0x30cd26(0x1c0)),R=async(_0x4c51b6,_0x59cfe2)=>{const _0x4d1a78=_0x30cd26,_0x2621ab=_0x4c51b6[_0x4d1a78(0x1a4)](c['UserManagerService']),_0x44b102=_0x4c51b6[_0x4d1a78(0x1a4)](P['HTTPService']);_0x59cfe2[_0x4d1a78(0x1d6)](_0x1e63ac=>{_0x2621ab['getUser'](_0x1e63ac)&&_0x59cfe2['delete'](_0x1e63ac);}),_0x59cfe2[_0x4d1a78(0x180)]&&(await _0x44b102[_0x4d1a78(0x1a4)](_0x4d1a78(0x19d),{'params':{'userIDs':[..._0x59cfe2]}}))[_0x4d1a78(0x19c)][_0x4d1a78(0x192)]['forEach'](_0x1326cf=>{const _0x2004ac=_0x4d1a78;_0x1326cf&&_0x2621ab[_0x2004ac(0x19e)](_0x1326cf);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x117d20,_0x3dcbe7,_0x1593d1,_0x299827)=>{const _0x347834=_0x30cd26;for(var _0xfaa55e=_0x299827>0x1?void 0x0:_0x299827?$(_0x3dcbe7,_0x1593d1):_0x3dcbe7,_0x57a01c=_0x117d20[_0x347834(0x161)]-0x1,_0x5b6449;_0x57a01c>=0x0;_0x57a01c--)(_0x5b6449=_0x117d20[_0x57a01c])&&(_0xfaa55e=_0x5b6449(_0xfaa55e)||_0xfaa55e);return _0xfaa55e;},S=(_0xd57901,_0x4766f6)=>(_0x13e635,_0x5c7e84)=>_0x4766f6(_0x13e635,_0x5c7e84,_0xd57901);function _0x1c7d(_0x12d405,_0x11aaf2){const _0x4690ef=_0x4690();return _0x1c7d=function(_0x1c7d58,_0x22c36c){_0x1c7d58=_0x1c7d58-0x160;let _0x3cc8e9=_0x4690ef[_0x1c7d58];return _0x3cc8e9;},_0x1c7d(_0x12d405,_0x11aaf2);}let p=class extends c[_0x30cd26(0x1a8)]{constructor(_0x26ae39,_0x13fe5f,_0x36356f,_0x28ce6b){const _0x56e983=_0x30cd26;super(),this[_0x56e983(0x1e0)]=_0x26ae39,this['_threadCommentModel']=_0x13fe5f,this['_userService']=_0x36356f,this[_0x56e983(0x18e)]=_0x28ce6b,this[_0x56e983(0x1c4)](),this[_0x56e983(0x1bf)]();}[_0x30cd26(0x1bf)](){const _0x2d1ff9=_0x30cd26;this[_0x2d1ff9(0x163)](this['_threadCommentModel'][_0x2d1ff9(0x1a0)][_0x2d1ff9(0x1b5)](w[_0x2d1ff9(0x1cd)](0x10))[_0x2d1ff9(0x183)](_0x49d741=>{const _0xe72ce0=_0x2d1ff9,_0x1d567c=new Set();_0x49d741[_0xe72ce0(0x1d6)](_0x596871=>{const _0x38a62d=_0xe72ce0;switch(_0x596871[_0x38a62d(0x189)]){case _0x38a62d(0x172):{const _0x4bda80=_0x596871[_0x38a62d(0x1e1)][_0x38a62d(0x16b)];_0x1d567c['add'](_0x4bda80);break;}}}),R(this[_0xe72ce0(0x18e)],_0x1d567c);}));}[_0x30cd26(0x1c4)](){const _0x13147a=_0x30cd26;this[_0x13147a(0x163)](this['_commentService'][_0x13147a(0x1a0)][_0x13147a(0x183)](async _0x5bf622=>{const _0x57ad11=_0x13147a;var _0xdc88d3,_0x1109fa,_0x4c415f,_0x5a2c22;const _0x5c7d4e=(_0xdc88d3=this[_0x57ad11(0x173)]['getUnit'](_0x5bf622[_0x57ad11(0x196)])['find'](_0x12f4c3=>_0x12f4c3['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0xdc88d3['root'];if(!_0x5c7d4e)return;const {unitId:_0x40655c,subUnitId:_0x55b96f}=_0x5c7d4e;switch(_0x5bf622[_0x57ad11(0x1d2)]&&this[_0x57ad11(0x1d1)]['addUser'](_0x5bf622['user']),_0x5bf622['type']){case v['Add']:break;case v[_0x57ad11(0x18c)]:{this[_0x57ad11(0x173)]['addComment'](_0x40655c,_0x55b96f,{'unitId':_0x40655c,'subUnitId':_0x55b96f,'ref':'','id':_0x5bf622[_0x57ad11(0x1b9)],'dT':f(+_0x5bf622['createTimestamp']),'threadId':_0x5bf622['threadId'],'personId':(_0x4c415f=(_0x1109fa=_0x5bf622[_0x57ad11(0x1d2)])==null?void 0x0:_0x1109fa['userID'])!=null?_0x4c415f:_0x5bf622[_0x57ad11(0x198)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)]),'parentId':_0x5c7d4e['id']});break;}case v['Delete']:{const _0x377e22=this[_0x57ad11(0x173)][_0x57ad11(0x197)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);_0x377e22&&_0x377e22[_0x57ad11(0x1dc)]&&this[_0x57ad11(0x173)][_0x57ad11(0x1aa)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);break;}case v[_0x57ad11(0x1d7)]:{this[_0x57ad11(0x173)][_0x57ad11(0x1bc)](_0x40655c,_0x55b96f,{'commentId':_0x5bf622[_0x57ad11(0x1b9)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)])});break;}case v[_0x57ad11(0x1be)]:{const _0x3057ff=(_0x5a2c22=this['_threadCommentModel'][_0x57ad11(0x1a2)](_0x5bf622['unitId'])[_0x57ad11(0x165)](_0x1b9840=>_0x1b9840['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0x5a2c22[_0x57ad11(0x1a6)];_0x3057ff&&this[_0x57ad11(0x173)][_0x57ad11(0x164)](_0x40655c,_0x55b96f,_0x3057ff['id'],_0x5bf622[_0x57ad11(0x1b2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x166)])),S(0x1,c[_0x30cd26(0x1a1)](M[_0x30cd26(0x1c9)])),S(0x2,c[_0x30cd26(0x1a1)](c['UserManagerService'])),S(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],p);const q=_0x30cd26(0x1dd),D={};var A=Object[_0x30cd26(0x195)],x=(_0x6064ec,_0x5c2f2e,_0x431713,_0x1657b7)=>{const _0x212579=_0x30cd26;for(var _0x1a1c5e=_0x1657b7>0x1?void 0x0:_0x1657b7?A(_0x5c2f2e,_0x431713):_0x5c2f2e,_0x447df0=_0x6064ec[_0x212579(0x161)]-0x1,_0x6da1e;_0x447df0>=0x0;_0x447df0--)(_0x6da1e=_0x6064ec[_0x447df0])&&(_0x1a1c5e=_0x6da1e(_0x1a1c5e)||_0x1a1c5e);return _0x1a1c5e;},_=(_0xaf6d24,_0x145a71)=>(_0x5527f1,_0x512622)=>_0x145a71(_0x5527f1,_0x512622,_0xaf6d24);function Y(_0x2ea7bc,_0x47ecdf){const _0x188c24=_0x30cd26,_0x10ad6d=_0x2ea7bc[_0x188c24(0x169)][0x0];return{..._0x47ecdf,'id':_0x10ad6d[_0x188c24(0x1b9)],'resolved':_0x2ea7bc[_0x188c24(0x1b2)]===0x1,'dT':f(_0x10ad6d[_0x188c24(0x1b0)]),'personId':_0x10ad6d[_0x188c24(0x198)],'threadId':_0x10ad6d[_0x188c24(0x170)]};}function G(_0x2be311,_0x2335d6,_0x13d896){const _0x1c2166=_0x30cd26;var _0x4938d7,_0x54d7de;if(((_0x54d7de=(_0x4938d7=_0x2be311==null?void 0x0:_0x2be311['replies'])==null?void 0x0:_0x4938d7[_0x1c2166(0x161)])!=null?_0x54d7de:0x0)>0x0){const _0x1e1fec=(_0x2a8b19,_0x590405)=>({'id':_0x2a8b19['replyId'],'threadId':_0x2a8b19['threadId'],'dT':f(_0x2a8b19[_0x1c2166(0x1b0)]),'personId':_0x2a8b19[_0x1c2166(0x198)],'resolved':_0x2be311['solved']===I['Solved'],'unitId':_0x2335d6,'subUnitId':_0x13d896,'text':JSON[_0x1c2166(0x17a)](_0x2a8b19[_0x1c2166(0x175)]),'parentId':_0x590405}),_0x4036d0=_0x1e1fec(_0x2be311[_0x1c2166(0x169)][0x0]);return{..._0x4036d0,'children':_0x2be311['replies']['slice'](0x1)[_0x1c2166(0x19a)](_0x59b294=>_0x1e1fec(_0x59b294,_0x4036d0['id']))};}return null;}let g=class{constructor(_0x48dc46,_0x191903,_0x4da51c,_0x2b850a){const _0x12b89c=_0x30cd26;this['_httpService']=_0x48dc46,this[_0x12b89c(0x1d1)]=_0x191903,this[_0x12b89c(0x1a3)]=_0x4da51c,this[_0x12b89c(0x18e)]=_0x2b850a;}async['addComment'](_0x3a0fd8){const _0x44ca1b=_0x30cd26;var _0x349959,_0x2810ce;const {parentId:_0x51ec4d,unitId:_0x57aa42,text:_0x2438e2,threadId:_0x21e5e7}=_0x3a0fd8,_0x360023=(_0x2810ce=(_0x349959=_0x2438e2[_0x44ca1b(0x1ae)])==null?void 0x0:_0x349959[_0x44ca1b(0x18a)](_0x1fa900=>_0x1fa900[_0x44ca1b(0x178)]===c[_0x44ca1b(0x184)]['COMMENT'])[_0x44ca1b(0x19a)](_0x303d21=>_0x303d21[_0x44ca1b(0x1d5)]))!=null?_0x2810ce:[],_0x336dc1=JSON[_0x44ca1b(0x160)](_0x2438e2),_0x899a80=(await this[_0x44ca1b(0x1a3)]['requireSession'](_0x57aa42))[_0x44ca1b(0x17c)]();if(_0x51ec4d){const _0x1441fc={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023,'threadId':_0x21e5e7},_0x22d9d1=(await this[_0x44ca1b(0x1b7)][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1ce),{'body':_0x1441fc}))[_0x44ca1b(0x19c)]['reply'];return{..._0x3a0fd8,'id':_0x22d9d1[_0x44ca1b(0x1b9)],'dT':c[_0x44ca1b(0x1c6)](+_0x22d9d1[_0x44ca1b(0x1b0)])[_0x44ca1b(0x1bd)](_0x44ca1b(0x1c0)),'personId':_0x22d9d1[_0x44ca1b(0x198)]};}else{const _0x384678={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023},_0x5f5c15=await this['_httpService'][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1d9),{'body':_0x384678});return Y(_0x5f5c15[_0x44ca1b(0x19c)]['comment'],_0x3a0fd8);}}async[_0x30cd26(0x1bc)](_0x13b212){const _0x33e816=_0x30cd26;var _0xbcfa8,_0x30716c;const {text:_0x3629b6,unitId:_0x48e2ae}=_0x13b212,_0x1df643=(_0x30716c=(_0xbcfa8=_0x3629b6['customRanges'])==null?void 0x0:_0xbcfa8[_0x33e816(0x18a)](_0x3ce110=>_0x3ce110[_0x33e816(0x178)]===c[_0x33e816(0x184)][_0x33e816(0x17d)])['map'](_0x53dcae=>_0x53dcae[_0x33e816(0x1d5)]))!=null?_0x30716c:[],_0x566823=JSON['stringify'](_0x3629b6),_0x309dbe=_0x13b212[_0x33e816(0x170)],_0x2fb104=_0x13b212['id'],_0x517261={'memberId':(await this['_sessionService']['requireSession'](_0x48e2ae))[_0x33e816(0x17c)](),'unitId':_0x48e2ae,'threadId':_0x309dbe,'mention':_0x1df643,'content':_0x566823,'replyId':_0x2fb104},_0x56e023=await this[_0x33e816(0x1b7)]['post']('/universer-api/comment/unit/'+_0x48e2ae+'/edit',{'body':_0x517261});return!_0x56e023[_0x33e816(0x19c)][_0x33e816(0x18b)]||_0x56e023[_0x33e816(0x19c)]['error'][_0x33e816(0x16f)]===0x1;}async[_0x30cd26(0x164)](_0x5e49c9){const _0x1c6d4b=_0x30cd26,{unitId:_0x4b480c}=_0x5e49c9,_0x1f0f72=_0x5e49c9[_0x1c6d4b(0x170)],_0x2c1a7f={'memberId':this[_0x1c6d4b(0x1d1)][_0x1c6d4b(0x17b)]()[_0x1c6d4b(0x1d3)],'unitId':_0x4b480c,'threadId':_0x1f0f72,'solved':_0x5e49c9[_0x1c6d4b(0x177)]?I[_0x1c6d4b(0x171)]:I['OpenOrReOpen']},_0x20b34c=await this[_0x1c6d4b(0x1b7)][_0x1c6d4b(0x1d0)](_0x1c6d4b(0x168)+_0x4b480c+_0x1c6d4b(0x1cb),{'body':_0x2c1a7f});return!_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)]||_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)][_0x1c6d4b(0x16f)]===0x1;}async['deleteComment'](_0x52b489,_0x49fd05,_0x243fee,_0x5847fb){const _0x5ece00=_0x30cd26,_0x17100d={'memberId':(await this['_sessionService'][_0x5ece00(0x194)](_0x52b489))[_0x5ece00(0x17c)](),'threadId':_0x243fee,'replyId':_0x5847fb,'unitId':_0x52b489},_0x243760=await this[_0x5ece00(0x1b7)][_0x5ece00(0x1d0)](_0x5ece00(0x168)+_0x52b489+_0x5ece00(0x17f),{'body':_0x17100d});return!_0x243760[_0x5ece00(0x19c)][_0x5ece00(0x18b)]||_0x243760[_0x5ece00(0x19c)]['error']['code']===0x1;}async['listComments'](_0x544dac,_0x37327b,_0x2bba40){const _0xc3a720=_0x30cd26,_0xb79003={'unitId':_0x544dac,'threadId':_0x2bba40},_0x1a2bd7=await this[_0xc3a720(0x1b7)]['post'](_0xc3a720(0x168)+_0x544dac+_0xc3a720(0x1ab),{'body':_0xb79003}),_0x27b7af=_0x2bba40[_0xc3a720(0x19a)](_0x498c58=>G(_0x1a2bd7['body']['comments'][_0x498c58],_0x544dac,_0x37327b))[_0xc3a720(0x18a)](Boolean);return Object[_0xc3a720(0x1c7)](_0x1a2bd7[_0xc3a720(0x19c)][_0xc3a720(0x192)])[_0xc3a720(0x1d6)](_0x2e9256=>{const _0x3bd834=_0xc3a720;this[_0x3bd834(0x1d1)]['addUser'](_0x2e9256);}),_0x27b7af;}[_0x30cd26(0x174)](_0x8a90b2){return{'id':_0x8a90b2['id'],'threadId':_0x8a90b2['threadId'],'ref':_0x8a90b2['ref']};}};g=x([_(0x0,c['Inject'](P[_0x30cd26(0x1ad)])),_(0x1,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x186)])),_(0x2,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x19f)])),_(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],g);var H=Object[_0x30cd26(0x195)],J=(_0x162238,_0x1d0780,_0x5332a9,_0x2aa5ab)=>{const _0x4d715f=_0x30cd26;for(var _0x5851e9=_0x2aa5ab>0x1?void 0x0:_0x2aa5ab?H(_0x1d0780,_0x5332a9):_0x1d0780,_0x4377b3=_0x162238[_0x4d715f(0x161)]-0x1,_0x1ecdef;_0x4377b3>=0x0;_0x4377b3--)(_0x1ecdef=_0x162238[_0x4377b3])&&(_0x5851e9=_0x1ecdef(_0x5851e9)||_0x5851e9);return _0x5851e9;},y=(_0x21913c,_0x3254a0)=>(_0x3592a2,_0x3d060d)=>_0x3254a0(_0x3592a2,_0x3d060d,_0x21913c);let C=class extends c[_0x30cd26(0x1a8)]{constructor(_0x51570e,_0xfa69b6){const _0x5220b6=_0x30cd26;super(),this['_threadCommentDataSourceService']=_0x51570e,this['_threadCommentDataSource']=_0xfa69b6,this[_0x5220b6(0x16d)]();}[_0x30cd26(0x16d)](){const _0x3ab2ce=_0x30cd26;this[_0x3ab2ce(0x193)][_0x3ab2ce(0x182)]=this[_0x3ab2ce(0x16c)],this['_threadCommentDataSourceService'][_0x3ab2ce(0x1b6)]=!0x1;}};C=J([y(0x0,M[_0x30cd26(0x162)]),y(0x1,c[_0x30cd26(0x1a1)](g))],C);var F=Object[_0x30cd26(0x1b8)],L=Object[_0x30cd26(0x195)],Z=(_0x397d5f,_0x1ac877,_0x314435)=>_0x1ac877 in _0x397d5f?F(_0x397d5f,_0x1ac877,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x314435}):_0x397d5f[_0x1ac877]=_0x314435,W=(_0x51073d,_0x122d88,_0x23f6c7,_0x29a753)=>{const _0x140739=_0x30cd26;for(var _0x1ed6b7=_0x29a753>0x1?void 0x0:_0x29a753?L(_0x122d88,_0x23f6c7):_0x122d88,_0x25c601=_0x51073d[_0x140739(0x161)]-0x1,_0x4d6f9b;_0x25c601>=0x0;_0x25c601--)(_0x4d6f9b=_0x51073d[_0x25c601])&&(_0x1ed6b7=_0x4d6f9b(_0x1ed6b7)||_0x1ed6b7);return _0x1ed6b7;},O=(_0x2c9e45,_0x4b1b20)=>(_0x5deee5,_0x4c9b6a)=>_0x4b1b20(_0x5deee5,_0x4c9b6a,_0x2c9e45),N=(_0x218633,_0x19cdc0,_0x1d0f45)=>Z(_0x218633,typeof _0x19cdc0!=_0x30cd26(0x1db)?_0x19cdc0+'':_0x19cdc0,_0x1d0f45);function _0x4690(){const _0x4ad64b=['users','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','unitId','getComment','userId','Module','map','UniverThreadCommentDataSourcePlugin','body','/universer-api/user/list','addUser','CollaborationSessionService','commentUpdate$','Inject','getUnit','_sessionService','get','onStarting','root','25OmhZIT','Disposable','setConfig','deleteComment','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','HTTPService','customRanges','540546jTPMUk','createTimestamp','OpenOrReOpen','solved','Delete','UniverCollaborationClientPlugin','pipe','syncUpdateMutationToColla','_httpService','defineProperty','replyId','Plugin','2729556JKpdRb','updateComment','format','Solve','_initUserSync','YYYY/MM/DD\x20HH:mm','DependentOn','@univerjs-pro/collaboration-client','UniverThreadCommentUIPlugin','_init','@univerjs/thread-comment','dayjs','values','1194417NoFvUd','ThreadCommentModel','856670muPLIt','/solved','16124868WDrdtF','bufferTime','/reply','@univerjs-pro/license','post','_userService','user','userID','_config','rangeId','forEach','Edit','Add','/add','UNRECOGNIZED','symbol','parentId','thread-comment-data-source.config','UniverInstanceType','@univerjs/core','_commentService','payload','stringify','length','IThreadCommentDataSourceService','disposeWithMe','resolveComment','find','CommentService','onReady','/universer-api/comment/unit/','replies','104AmbHkY','personId','_threadCommentDataSource','_initDataSource','473601FLaUbL','code','threadId','Solved','add','_threadCommentModel','saveCommentToSnapshot','content','UNIVER_UNKNOWN','resolved','rangeType','@univerjs/thread-comment-ui','parse','getCurrentUser','getMemberID','COMMENT','@univerjs/network','/delete','size','toStringTag','dataSource','subscribe','CustomRangeType','Injector','UserManagerService','124327dcxRLU','Unknown','type','filter','error','Reply','rxjs','_injector','merge','pluginName','_configService'];_0x4690=function(){return _0x4ad64b;};return _0x4690();}exports[_0x30cd26(0x19b)]=class extends c[_0x30cd26(0x1ba)]{constructor(_0x2c6ed0=D,_0x578323,_0x599aca){const _0x3176b5=_0x30cd26;super(),this[_0x3176b5(0x1d4)]=_0x2c6ed0,this['_injector']=_0x578323,this[_0x3176b5(0x191)]=_0x599aca;const {..._0x2de1be}=c[_0x3176b5(0x18f)]({},D,this[_0x3176b5(0x1d4)]);this[_0x3176b5(0x191)][_0x3176b5(0x1a9)](q,_0x2de1be);}[_0x30cd26(0x1a5)](){[[g],[C],[p]]['forEach'](_0x3e422e=>{const _0x1b7307=_0x1c7d;this['_injector'][_0x1b7307(0x172)](_0x3e422e);});}[_0x30cd26(0x167)](){const _0x2b9c5a=_0x30cd26;this[_0x2b9c5a(0x18e)][_0x2b9c5a(0x1a4)](C),this[_0x2b9c5a(0x18e)]['get'](p);}},N(exports[_0x30cd26(0x19b)],_0x30cd26(0x190),U),N(exports[_0x30cd26(0x19b)],'type',c[_0x30cd26(0x1de)][_0x30cd26(0x176)]),exports[_0x30cd26(0x19b)]=W([c[_0x30cd26(0x1c1)](j[_0x30cd26(0x1c3)],b[_0x30cd26(0x1b4)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x30cd26(0x185)])),O(0x2,c['IConfigService'])],exports[_0x30cd26(0x19b)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4845ea=_0x6940;(function(_0x5f0ece,_0x1e40ae){const _0x4543ff=_0x6940,_0x5bee79=_0x5f0ece();while(!![]){try{const _0x351067=-parseInt(_0x4543ff(0xd3))/0x1+-parseInt(_0x4543ff(0xd1))/0x2+-parseInt(_0x4543ff(0xad))/0x3+parseInt(_0x4543ff(0xc1))/0x4*(-parseInt(_0x4543ff(0x82))/0x5)+parseInt(_0x4543ff(0x8c))/0x6+parseInt(_0x4543ff(0xc3))/0x7+parseInt(_0x4543ff(0x98))/0x8;if(_0x351067===_0x1e40ae)break;else _0x5bee79['push'](_0x5bee79['shift']());}catch(_0x59cde1){_0x5bee79['push'](_0x5bee79['shift']());}}}(_0x76c9,0x39135));import{CommentService as _0x5f1bda,CollaborationSessionService as _0x1a3d82,UniverCollaborationClientPlugin as _0x6a2fba}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45810e}from'@univerjs-pro/license';function _0x6940(_0x267a78,_0x1a1310){const _0x76c91d=_0x76c9();return _0x6940=function(_0x694028,_0x4b6dca){_0x694028=_0x694028-0x80;let _0x50c51c=_0x76c91d[_0x694028];return _0x50c51c;},_0x6940(_0x267a78,_0x1a1310);}import{dayjs as _0x4d3e30,UserManagerService as _0x56ea55,Inject as _0x4173d0,Injector as _0x5905e3,Disposable as _0x17feda,CustomRangeType as _0x5f5740,UniverInstanceType as _0x161e92,DependentOn as _0x1ce5fd,IConfigService as _0x22d314,Plugin as _0x42140b,merge as _0x50b81b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d3295}from'@univerjs/thread-comment-ui';function _0x76c9(){const _0x2f52d4=['_init','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','disposeWithMe','addUser','1148208dEOcEb','values','getUser','body','root','post','UNIVER_UNKNOWN','_initDataSource','_initUserSync','getCurrentUser','/edit','onStarting','8204536mYPrEN','stringify','OpenOrReOpen','/reply','replyId','createTimestamp','Edit','/add','delete','/universer-api/user/list','_config','solved','format','subscribe','ref','payload','UNRECOGNIZED','size','commentUpdate$','parentId','COMMENT','1199736nVskTc','_sessionService','length','_injector','Solved','parse','threadId','customRanges','add','symbol','userId','type','pipe','/list','_httpService','deleteComment','Delete','replies','_threadCommentDataSourceService','personId','148844VxrTan','content','1914857EWEtXv','user','addComment','saveCommentToSnapshot','Reply','getOwnPropertyDescriptor','forEach','updateComment','_threadCommentDataSource','Solve','Unknown','code','users','rangeId','897812FPUagR','/universer-api/comment/unit/','110199VoKgsT','getMemberID','setConfig','thread-comment-data-source.config','reply','find','syncUpdateMutationToColla','_userService','comment','getComment','/solved','userID','get','getUnit','error','Add','slice','resolved','comments','map','onReady','YYYY/MM/DD\x20HH:mm','40GlGJvf','_configService','unitId','_threadCommentModel'];_0x76c9=function(){return _0x2f52d4;};return _0x76c9();}import{ThreadCommentModel as _0x13d21d,IThreadCommentDataSourceService as _0xf1e621}from'@univerjs/thread-comment';import{bufferTime as _0x597e0a}from'rxjs';import{HTTPService as _0x4088a0}from'@univerjs/network';const W=_0x4845ea(0x88);var I=(_0xea19a1=>(_0xea19a1[_0xea19a1[_0x4845ea(0x9a)]=0x0]=_0x4845ea(0x9a),_0xea19a1[_0xea19a1['Solved']=0x1]=_0x4845ea(0xb1),_0xea19a1[_0xea19a1[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0xea19a1))(I||{}),v=(_0x13843a=>(_0x13843a[_0x13843a[_0x4845ea(0xcd)]=0x0]=_0x4845ea(0xcd),_0x13843a[_0x13843a['Add']=0x1]=_0x4845ea(0xe2),_0x13843a[_0x13843a[_0x4845ea(0xc7)]=0x2]='Reply',_0x13843a[_0x13843a[_0x4845ea(0x9e)]=0x3]='Edit',_0x13843a[_0x13843a[_0x4845ea(0xbd)]=0x4]=_0x4845ea(0xbd),_0x13843a[_0x13843a[_0x4845ea(0xcc)]=0x5]='Solve',_0x13843a[_0x13843a[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0x13843a))(v||{});const D=_0x1af597=>_0x4d3e30(new Date(+_0x1af597))[_0x4845ea(0xa4)](_0x4845ea(0x81)),B=async(_0xc7505c,_0x18be95)=>{const _0x14897e=_0x4845ea,_0x547536=_0xc7505c['get'](_0x56ea55),_0x2fedb8=_0xc7505c[_0x14897e(0xdf)](_0x4088a0);_0x18be95[_0x14897e(0xc9)](_0x5844b9=>{const _0x5096f9=_0x14897e;_0x547536[_0x5096f9(0x8e)](_0x5844b9)&&_0x18be95[_0x5096f9(0xa0)](_0x5844b9);}),_0x18be95[_0x14897e(0xa9)]&&(await _0x2fedb8[_0x14897e(0xdf)](_0x14897e(0xa1),{'params':{'userIDs':[..._0x18be95]}}))['body'][_0x14897e(0xcf)][_0x14897e(0xc9)](_0xb5ffc6=>{const _0x40dd74=_0x14897e;_0xb5ffc6&&_0x547536[_0x40dd74(0x8b)](_0xb5ffc6);});};var K=Object[_0x4845ea(0xc8)],V=(_0xff959,_0x4b0699,_0x222fb4,_0x5e2ed4)=>{const _0x33c36d=_0x4845ea;for(var _0x379c57=_0x5e2ed4>0x1?void 0x0:_0x5e2ed4?K(_0x4b0699,_0x222fb4):_0x4b0699,_0x4237f6=_0xff959[_0x33c36d(0xaf)]-0x1,_0x1fc8c6;_0x4237f6>=0x0;_0x4237f6--)(_0x1fc8c6=_0xff959[_0x4237f6])&&(_0x379c57=_0x1fc8c6(_0x379c57)||_0x379c57);return _0x379c57;},p=(_0x4335aa,_0x18f2be)=>(_0x4bdf72,_0x4c3c11)=>_0x18f2be(_0x4bdf72,_0x4c3c11,_0x4335aa);let S=class extends _0x17feda{constructor(_0x46b013,_0x304864,_0x160435,_0x81eb89){const _0x320c1a=_0x4845ea;super(),this['_commentService']=_0x46b013,this['_threadCommentModel']=_0x304864,this[_0x320c1a(0xda)]=_0x160435,this['_injector']=_0x81eb89,this[_0x320c1a(0x86)](),this[_0x320c1a(0x94)]();}[_0x4845ea(0x94)](){const _0x26d3ec=_0x4845ea;this[_0x26d3ec(0x8a)](this['_threadCommentModel'][_0x26d3ec(0xaa)][_0x26d3ec(0xb9)](_0x597e0a(0x10))[_0x26d3ec(0xa5)](_0x245f5f=>{const _0x515f45=_0x26d3ec,_0x22cec2=new Set();_0x245f5f[_0x515f45(0xc9)](_0x535ba8=>{const _0x2313b8=_0x515f45;switch(_0x535ba8[_0x2313b8(0xb8)]){case _0x2313b8(0xb5):{const _0x48aac9=_0x535ba8[_0x2313b8(0xa7)][_0x2313b8(0xc0)];_0x22cec2['add'](_0x48aac9);break;}}}),B(this[_0x515f45(0xb0)],_0x22cec2);}));}['_init'](){const _0x1ab718=_0x4845ea;this[_0x1ab718(0x8a)](this['_commentService'][_0x1ab718(0xaa)]['subscribe'](async _0x2a1da5=>{const _0x3963d3=_0x1ab718;var _0x45f1cd,_0x15acca,_0x50723b,_0x1ec352;const _0x2bb2d7=(_0x45f1cd=this['_threadCommentModel']['getUnit'](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0xf82b0b=>_0xf82b0b[_0x3963d3(0xb3)]===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x45f1cd[_0x3963d3(0x90)];if(!_0x2bb2d7)return;const {unitId:_0x237b14,subUnitId:_0x9853c4}=_0x2bb2d7;switch(_0x2a1da5[_0x3963d3(0xc4)]&&this[_0x3963d3(0xda)][_0x3963d3(0x8b)](_0x2a1da5[_0x3963d3(0xc4)]),_0x2a1da5[_0x3963d3(0xb8)]){case v['Add']:break;case v['Reply']:{this[_0x3963d3(0x85)]['addComment'](_0x237b14,_0x9853c4,{'unitId':_0x237b14,'subUnitId':_0x9853c4,'ref':'','id':_0x2a1da5[_0x3963d3(0x9c)],'dT':D(+_0x2a1da5[_0x3963d3(0x9d)]),'threadId':_0x2a1da5[_0x3963d3(0xb3)],'personId':(_0x50723b=(_0x15acca=_0x2a1da5[_0x3963d3(0xc4)])==null?void 0x0:_0x15acca[_0x3963d3(0xde)])!=null?_0x50723b:_0x2a1da5[_0x3963d3(0xb7)],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)]),'parentId':_0x2bb2d7['id']});break;}case v[_0x3963d3(0xbd)]:{const _0x13f4ec=this[_0x3963d3(0x85)][_0x3963d3(0xdc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);_0x13f4ec&&_0x13f4ec[_0x3963d3(0xab)]&&this['_threadCommentModel'][_0x3963d3(0xbc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);break;}case v[_0x3963d3(0x9e)]:{this[_0x3963d3(0x85)][_0x3963d3(0xca)](_0x237b14,_0x9853c4,{'commentId':_0x2a1da5['replyId'],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)])});break;}case v[_0x3963d3(0xcc)]:{const _0x476ca2=(_0x1ec352=this['_threadCommentModel'][_0x3963d3(0xe0)](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0x230a8e=>_0x230a8e['threadId']===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x1ec352[_0x3963d3(0x90)];_0x476ca2&&this['_threadCommentModel']['resolveComment'](_0x237b14,_0x9853c4,_0x476ca2['id'],_0x2a1da5['solved']===I[_0x3963d3(0xb1)]);break;}}}));}};S=V([p(0x0,_0x4173d0(_0x5f1bda)),p(0x1,_0x4173d0(_0x13d21d)),p(0x2,_0x4173d0(_0x56ea55)),p(0x3,_0x4173d0(_0x5905e3))],S);const z=_0x4845ea(0xd6),M={};var k=Object[_0x4845ea(0xc8)],Q=(_0x1f560e,_0xc19d7c,_0x952527,_0x13224c)=>{const _0x5e8920=_0x4845ea;for(var _0x6a3795=_0x13224c>0x1?void 0x0:_0x13224c?k(_0xc19d7c,_0x952527):_0xc19d7c,_0x59293f=_0x1f560e[_0x5e8920(0xaf)]-0x1,_0x5f22ad;_0x59293f>=0x0;_0x59293f--)(_0x5f22ad=_0x1f560e[_0x59293f])&&(_0x6a3795=_0x5f22ad(_0x6a3795)||_0x6a3795);return _0x6a3795;},_=(_0x316bc3,_0x335540)=>(_0x53a774,_0x3359dc)=>_0x335540(_0x53a774,_0x3359dc,_0x316bc3);function X(_0x572a31,_0x374096){const _0x2cfaea=_0x4845ea,_0x1098f5=_0x572a31[_0x2cfaea(0xbe)][0x0];return{..._0x374096,'id':_0x1098f5[_0x2cfaea(0x9c)],'resolved':_0x572a31[_0x2cfaea(0xa3)]===0x1,'dT':D(_0x1098f5[_0x2cfaea(0x9d)]),'personId':_0x1098f5[_0x2cfaea(0xb7)],'threadId':_0x1098f5[_0x2cfaea(0xb3)]};}function ee(_0x4eb297,_0x25e238,_0x2d6065){const _0x53b67d=_0x4845ea;var _0x2cca9d,_0x309ae8;if(((_0x309ae8=(_0x2cca9d=_0x4eb297==null?void 0x0:_0x4eb297[_0x53b67d(0xbe)])==null?void 0x0:_0x2cca9d['length'])!=null?_0x309ae8:0x0)>0x0){const _0x1bdca4=(_0x4fa42e,_0x1c9b18)=>({'id':_0x4fa42e[_0x53b67d(0x9c)],'threadId':_0x4fa42e['threadId'],'dT':D(_0x4fa42e[_0x53b67d(0x9d)]),'personId':_0x4fa42e['userId'],'resolved':_0x4eb297[_0x53b67d(0xa3)]===I[_0x53b67d(0xb1)],'unitId':_0x25e238,'subUnitId':_0x2d6065,'text':JSON[_0x53b67d(0xb2)](_0x4fa42e['content']),'parentId':_0x1c9b18}),_0x255065=_0x1bdca4(_0x4eb297[_0x53b67d(0xbe)][0x0]);return{..._0x255065,'children':_0x4eb297[_0x53b67d(0xbe)][_0x53b67d(0xe3)](0x1)['map'](_0x1a5f49=>_0x1bdca4(_0x1a5f49,_0x255065['id']))};}return null;}let f=class{constructor(_0x42702a,_0x67dfd1,_0x492144,_0x24686c){const _0x382e90=_0x4845ea;this[_0x382e90(0xbb)]=_0x42702a,this[_0x382e90(0xda)]=_0x67dfd1,this[_0x382e90(0xae)]=_0x492144,this['_injector']=_0x24686c;}async[_0x4845ea(0xc5)](_0x18c2fb){const _0x276b96=_0x4845ea;var _0x50c8a2,_0x2901b8;const {parentId:_0x567987,unitId:_0x19fccc,text:_0x2d4351,threadId:_0x941d03}=_0x18c2fb,_0x22f711=(_0x2901b8=(_0x50c8a2=_0x2d4351['customRanges'])==null?void 0x0:_0x50c8a2['filter'](_0x282ecc=>_0x282ecc['rangeType']===_0x5f5740['COMMENT'])['map'](_0x258529=>_0x258529[_0x276b96(0xd0)]))!=null?_0x2901b8:[],_0x5a25eb=JSON[_0x276b96(0x99)](_0x2d4351),_0x214e44=(await this[_0x276b96(0xae)]['requireSession'](_0x19fccc))[_0x276b96(0xd4)]();if(_0x567987){const _0x3ab599={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711,'threadId':_0x941d03},_0x4bddaa=(await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9b),{'body':_0x3ab599}))[_0x276b96(0x8f)][_0x276b96(0xd7)];return{..._0x18c2fb,'id':_0x4bddaa[_0x276b96(0x9c)],'dT':_0x4d3e30(+_0x4bddaa[_0x276b96(0x9d)])['format'](_0x276b96(0x81)),'personId':_0x4bddaa['userId']};}else{const _0x1a9e39={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711},_0xb493a9=await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9f),{'body':_0x1a9e39});return X(_0xb493a9['body'][_0x276b96(0xdb)],_0x18c2fb);}}async[_0x4845ea(0xca)](_0x952a77){const _0x16ce0e=_0x4845ea;var _0x169034,_0x28bfff;const {text:_0x2750b1,unitId:_0x3b2ff2}=_0x952a77,_0x13eae3=(_0x28bfff=(_0x169034=_0x2750b1[_0x16ce0e(0xb4)])==null?void 0x0:_0x169034['filter'](_0x1fa310=>_0x1fa310['rangeType']===_0x5f5740[_0x16ce0e(0xac)])[_0x16ce0e(0xe6)](_0x5a003d=>_0x5a003d['rangeId']))!=null?_0x28bfff:[],_0x2a0676=JSON[_0x16ce0e(0x99)](_0x2750b1),_0x54dd8b=_0x952a77[_0x16ce0e(0xb3)],_0x2d57d7=_0x952a77['id'],_0x202b9e={'memberId':(await this['_sessionService']['requireSession'](_0x3b2ff2))['getMemberID'](),'unitId':_0x3b2ff2,'threadId':_0x54dd8b,'mention':_0x13eae3,'content':_0x2a0676,'replyId':_0x2d57d7},_0xd9ec75=await this['_httpService'][_0x16ce0e(0x91)](_0x16ce0e(0xd2)+_0x3b2ff2+_0x16ce0e(0x96),{'body':_0x202b9e});return!_0xd9ec75[_0x16ce0e(0x8f)]['error']||_0xd9ec75[_0x16ce0e(0x8f)][_0x16ce0e(0xe1)][_0x16ce0e(0xce)]===0x1;}async['resolveComment'](_0x4ce925){const _0x5dab6d=_0x4845ea,{unitId:_0x5b2407}=_0x4ce925,_0x4c8d16=_0x4ce925[_0x5dab6d(0xb3)],_0x3b6cd1={'memberId':this[_0x5dab6d(0xda)][_0x5dab6d(0x95)]()[_0x5dab6d(0xde)],'unitId':_0x5b2407,'threadId':_0x4c8d16,'solved':_0x4ce925[_0x5dab6d(0xe4)]?I['Solved']:I[_0x5dab6d(0x9a)]},_0x2f4050=await this[_0x5dab6d(0xbb)][_0x5dab6d(0x91)](_0x5dab6d(0xd2)+_0x5b2407+_0x5dab6d(0xdd),{'body':_0x3b6cd1});return!_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)]||_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)][_0x5dab6d(0xce)]===0x1;}async['deleteComment'](_0x51acda,_0x1491ee,_0x856ccb,_0x293a42){const _0x11c9b2=_0x4845ea,_0x5bbd7d={'memberId':(await this[_0x11c9b2(0xae)][_0x11c9b2(0x87)](_0x51acda))[_0x11c9b2(0xd4)](),'threadId':_0x856ccb,'replyId':_0x293a42,'unitId':_0x51acda},_0x479635=await this[_0x11c9b2(0xbb)][_0x11c9b2(0x91)](_0x11c9b2(0xd2)+_0x51acda+'/delete',{'body':_0x5bbd7d});return!_0x479635[_0x11c9b2(0x8f)]['error']||_0x479635[_0x11c9b2(0x8f)][_0x11c9b2(0xe1)]['code']===0x1;}async['listComments'](_0x449999,_0x35654d,_0x1af0a8){const _0x4c30e7=_0x4845ea,_0xfda1fc={'unitId':_0x449999,'threadId':_0x1af0a8},_0x515648=await this[_0x4c30e7(0xbb)]['post']('/universer-api/comment/unit/'+_0x449999+_0x4c30e7(0xba),{'body':_0xfda1fc}),_0x60286=_0x1af0a8[_0x4c30e7(0xe6)](_0x19c797=>ee(_0x515648[_0x4c30e7(0x8f)][_0x4c30e7(0xe5)][_0x19c797],_0x449999,_0x35654d))['filter'](Boolean);return Object[_0x4c30e7(0x8d)](_0x515648['body'][_0x4c30e7(0xcf)])[_0x4c30e7(0xc9)](_0x1de0a8=>{const _0x2e4eec=_0x4c30e7;this['_userService'][_0x2e4eec(0x8b)](_0x1de0a8);}),_0x60286;}[_0x4845ea(0xc6)](_0x27ab0e){const _0x52d172=_0x4845ea;return{'id':_0x27ab0e['id'],'threadId':_0x27ab0e[_0x52d172(0xb3)],'ref':_0x27ab0e[_0x52d172(0xa6)]};}};f=Q([_(0x0,_0x4173d0(_0x4088a0)),_(0x1,_0x4173d0(_0x56ea55)),_(0x2,_0x4173d0(_0x1a3d82)),_(0x3,_0x4173d0(_0x5905e3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x69e504,_0xa85112,_0x6c1d91,_0x30e476)=>{const _0x5ade0a=_0x4845ea;for(var _0x4a8c97=_0x30e476>0x1?void 0x0:_0x30e476?re(_0xa85112,_0x6c1d91):_0xa85112,_0x39e210=_0x69e504[_0x5ade0a(0xaf)]-0x1,_0x1815e0;_0x39e210>=0x0;_0x39e210--)(_0x1815e0=_0x69e504[_0x39e210])&&(_0x4a8c97=_0x1815e0(_0x4a8c97)||_0x4a8c97);return _0x4a8c97;},N=(_0x3c42d7,_0x2dd4f0)=>(_0x4abb01,_0x5bea90)=>_0x2dd4f0(_0x4abb01,_0x5bea90,_0x3c42d7);let g=class extends _0x17feda{constructor(_0x4f07ff,_0x3ec5b8){const _0x5929fe=_0x4845ea;super(),this['_threadCommentDataSourceService']=_0x4f07ff,this['_threadCommentDataSource']=_0x3ec5b8,this[_0x5929fe(0x93)]();}[_0x4845ea(0x93)](){const _0x836c37=_0x4845ea;this[_0x836c37(0xbf)][_0x836c37(0x89)]=this[_0x836c37(0xcb)],this[_0x836c37(0xbf)][_0x836c37(0xd9)]=!0x1;}};g=te([N(0x0,_0xf1e621),N(0x1,_0x4173d0(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3353ff,_0x190b64,_0x8b1c37)=>_0x190b64 in _0x3353ff?se(_0x3353ff,_0x190b64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b1c37}):_0x3353ff[_0x190b64]=_0x8b1c37,ie=(_0x55178a,_0x494d8c,_0x15357b,_0x12cbd8)=>{for(var _0x59ef3a=_0x12cbd8>0x1?void 0x0:_0x12cbd8?oe(_0x494d8c,_0x15357b):_0x494d8c,_0x573c15=_0x55178a['length']-0x1,_0x1f76e3;_0x573c15>=0x0;_0x573c15--)(_0x1f76e3=_0x55178a[_0x573c15])&&(_0x59ef3a=_0x1f76e3(_0x59ef3a)||_0x59ef3a);return _0x59ef3a;},w=(_0x508dc8,_0x46b04e)=>(_0x1046ee,_0x210144)=>_0x46b04e(_0x1046ee,_0x210144,_0x508dc8),$=(_0x27b07f,_0xabc664,_0x17b6d5)=>ne(_0x27b07f,typeof _0xabc664!=_0x4845ea(0xb6)?_0xabc664+'':_0xabc664,_0x17b6d5);let b=class extends _0x42140b{constructor(_0x1e74ad=M,_0x43d0de,_0x48e9ea){const _0x2b90b3=_0x4845ea;super(),this['_config']=_0x1e74ad,this[_0x2b90b3(0xb0)]=_0x43d0de,this[_0x2b90b3(0x83)]=_0x48e9ea;const {..._0x1fbd50}=_0x50b81b({},M,this[_0x2b90b3(0xa2)]);this['_configService'][_0x2b90b3(0xd5)](z,_0x1fbd50);}[_0x4845ea(0x97)](){[[f],[g],[S]]['forEach'](_0x24e0dd=>{const _0x4d71f6=_0x6940;this[_0x4d71f6(0xb0)][_0x4d71f6(0xb5)](_0x24e0dd);});}[_0x4845ea(0x80)](){const _0x1363af=_0x4845ea;this[_0x1363af(0xb0)]['get'](g),this['_injector'][_0x1363af(0xdf)](S);}};$(b,'pluginName',W),$(b,_0x4845ea(0xb8),_0x161e92[_0x4845ea(0x92)]),b=ie([_0x1ce5fd(_0x1d3295,_0x6a2fba,_0x45810e),w(0x1,_0x4173d0(_0x5905e3)),w(0x2,_0x22d314)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4845ea=_0x6940;(function(_0x5f0ece,_0x1e40ae){const _0x4543ff=_0x6940,_0x5bee79=_0x5f0ece();while(!![]){try{const _0x351067=-parseInt(_0x4543ff(0xd3))/0x1+-parseInt(_0x4543ff(0xd1))/0x2+-parseInt(_0x4543ff(0xad))/0x3+parseInt(_0x4543ff(0xc1))/0x4*(-parseInt(_0x4543ff(0x82))/0x5)+parseInt(_0x4543ff(0x8c))/0x6+parseInt(_0x4543ff(0xc3))/0x7+parseInt(_0x4543ff(0x98))/0x8;if(_0x351067===_0x1e40ae)break;else _0x5bee79['push'](_0x5bee79['shift']());}catch(_0x59cde1){_0x5bee79['push'](_0x5bee79['shift']());}}}(_0x76c9,0x39135));import{CommentService as _0x5f1bda,CollaborationSessionService as _0x1a3d82,UniverCollaborationClientPlugin as _0x6a2fba}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45810e}from'@univerjs-pro/license';function _0x6940(_0x267a78,_0x1a1310){const _0x76c91d=_0x76c9();return _0x6940=function(_0x694028,_0x4b6dca){_0x694028=_0x694028-0x80;let _0x50c51c=_0x76c91d[_0x694028];return _0x50c51c;},_0x6940(_0x267a78,_0x1a1310);}import{dayjs as _0x4d3e30,UserManagerService as _0x56ea55,Inject as _0x4173d0,Injector as _0x5905e3,Disposable as _0x17feda,CustomRangeType as _0x5f5740,UniverInstanceType as _0x161e92,DependentOn as _0x1ce5fd,IConfigService as _0x22d314,Plugin as _0x42140b,merge as _0x50b81b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d3295}from'@univerjs/thread-comment-ui';function _0x76c9(){const _0x2f52d4=['_init','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','disposeWithMe','addUser','1148208dEOcEb','values','getUser','body','root','post','UNIVER_UNKNOWN','_initDataSource','_initUserSync','getCurrentUser','/edit','onStarting','8204536mYPrEN','stringify','OpenOrReOpen','/reply','replyId','createTimestamp','Edit','/add','delete','/universer-api/user/list','_config','solved','format','subscribe','ref','payload','UNRECOGNIZED','size','commentUpdate$','parentId','COMMENT','1199736nVskTc','_sessionService','length','_injector','Solved','parse','threadId','customRanges','add','symbol','userId','type','pipe','/list','_httpService','deleteComment','Delete','replies','_threadCommentDataSourceService','personId','148844VxrTan','content','1914857EWEtXv','user','addComment','saveCommentToSnapshot','Reply','getOwnPropertyDescriptor','forEach','updateComment','_threadCommentDataSource','Solve','Unknown','code','users','rangeId','897812FPUagR','/universer-api/comment/unit/','110199VoKgsT','getMemberID','setConfig','thread-comment-data-source.config','reply','find','syncUpdateMutationToColla','_userService','comment','getComment','/solved','userID','get','getUnit','error','Add','slice','resolved','comments','map','onReady','YYYY/MM/DD\x20HH:mm','40GlGJvf','_configService','unitId','_threadCommentModel'];_0x76c9=function(){return _0x2f52d4;};return _0x76c9();}import{ThreadCommentModel as _0x13d21d,IThreadCommentDataSourceService as _0xf1e621}from'@univerjs/thread-comment';import{bufferTime as _0x597e0a}from'rxjs';import{HTTPService as _0x4088a0}from'@univerjs/network';const W=_0x4845ea(0x88);var I=(_0xea19a1=>(_0xea19a1[_0xea19a1[_0x4845ea(0x9a)]=0x0]=_0x4845ea(0x9a),_0xea19a1[_0xea19a1['Solved']=0x1]=_0x4845ea(0xb1),_0xea19a1[_0xea19a1[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0xea19a1))(I||{}),v=(_0x13843a=>(_0x13843a[_0x13843a[_0x4845ea(0xcd)]=0x0]=_0x4845ea(0xcd),_0x13843a[_0x13843a['Add']=0x1]=_0x4845ea(0xe2),_0x13843a[_0x13843a[_0x4845ea(0xc7)]=0x2]='Reply',_0x13843a[_0x13843a[_0x4845ea(0x9e)]=0x3]='Edit',_0x13843a[_0x13843a[_0x4845ea(0xbd)]=0x4]=_0x4845ea(0xbd),_0x13843a[_0x13843a[_0x4845ea(0xcc)]=0x5]='Solve',_0x13843a[_0x13843a[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0x13843a))(v||{});const D=_0x1af597=>_0x4d3e30(new Date(+_0x1af597))[_0x4845ea(0xa4)](_0x4845ea(0x81)),B=async(_0xc7505c,_0x18be95)=>{const _0x14897e=_0x4845ea,_0x547536=_0xc7505c['get'](_0x56ea55),_0x2fedb8=_0xc7505c[_0x14897e(0xdf)](_0x4088a0);_0x18be95[_0x14897e(0xc9)](_0x5844b9=>{const _0x5096f9=_0x14897e;_0x547536[_0x5096f9(0x8e)](_0x5844b9)&&_0x18be95[_0x5096f9(0xa0)](_0x5844b9);}),_0x18be95[_0x14897e(0xa9)]&&(await _0x2fedb8[_0x14897e(0xdf)](_0x14897e(0xa1),{'params':{'userIDs':[..._0x18be95]}}))['body'][_0x14897e(0xcf)][_0x14897e(0xc9)](_0xb5ffc6=>{const _0x40dd74=_0x14897e;_0xb5ffc6&&_0x547536[_0x40dd74(0x8b)](_0xb5ffc6);});};var K=Object[_0x4845ea(0xc8)],V=(_0xff959,_0x4b0699,_0x222fb4,_0x5e2ed4)=>{const _0x33c36d=_0x4845ea;for(var _0x379c57=_0x5e2ed4>0x1?void 0x0:_0x5e2ed4?K(_0x4b0699,_0x222fb4):_0x4b0699,_0x4237f6=_0xff959[_0x33c36d(0xaf)]-0x1,_0x1fc8c6;_0x4237f6>=0x0;_0x4237f6--)(_0x1fc8c6=_0xff959[_0x4237f6])&&(_0x379c57=_0x1fc8c6(_0x379c57)||_0x379c57);return _0x379c57;},p=(_0x4335aa,_0x18f2be)=>(_0x4bdf72,_0x4c3c11)=>_0x18f2be(_0x4bdf72,_0x4c3c11,_0x4335aa);let S=class extends _0x17feda{constructor(_0x46b013,_0x304864,_0x160435,_0x81eb89){const _0x320c1a=_0x4845ea;super(),this['_commentService']=_0x46b013,this['_threadCommentModel']=_0x304864,this[_0x320c1a(0xda)]=_0x160435,this['_injector']=_0x81eb89,this[_0x320c1a(0x86)](),this[_0x320c1a(0x94)]();}[_0x4845ea(0x94)](){const _0x26d3ec=_0x4845ea;this[_0x26d3ec(0x8a)](this['_threadCommentModel'][_0x26d3ec(0xaa)][_0x26d3ec(0xb9)](_0x597e0a(0x10))[_0x26d3ec(0xa5)](_0x245f5f=>{const _0x515f45=_0x26d3ec,_0x22cec2=new Set();_0x245f5f[_0x515f45(0xc9)](_0x535ba8=>{const _0x2313b8=_0x515f45;switch(_0x535ba8[_0x2313b8(0xb8)]){case _0x2313b8(0xb5):{const _0x48aac9=_0x535ba8[_0x2313b8(0xa7)][_0x2313b8(0xc0)];_0x22cec2['add'](_0x48aac9);break;}}}),B(this[_0x515f45(0xb0)],_0x22cec2);}));}['_init'](){const _0x1ab718=_0x4845ea;this[_0x1ab718(0x8a)](this['_commentService'][_0x1ab718(0xaa)]['subscribe'](async _0x2a1da5=>{const _0x3963d3=_0x1ab718;var _0x45f1cd,_0x15acca,_0x50723b,_0x1ec352;const _0x2bb2d7=(_0x45f1cd=this['_threadCommentModel']['getUnit'](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0xf82b0b=>_0xf82b0b[_0x3963d3(0xb3)]===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x45f1cd[_0x3963d3(0x90)];if(!_0x2bb2d7)return;const {unitId:_0x237b14,subUnitId:_0x9853c4}=_0x2bb2d7;switch(_0x2a1da5[_0x3963d3(0xc4)]&&this[_0x3963d3(0xda)][_0x3963d3(0x8b)](_0x2a1da5[_0x3963d3(0xc4)]),_0x2a1da5[_0x3963d3(0xb8)]){case v['Add']:break;case v['Reply']:{this[_0x3963d3(0x85)]['addComment'](_0x237b14,_0x9853c4,{'unitId':_0x237b14,'subUnitId':_0x9853c4,'ref':'','id':_0x2a1da5[_0x3963d3(0x9c)],'dT':D(+_0x2a1da5[_0x3963d3(0x9d)]),'threadId':_0x2a1da5[_0x3963d3(0xb3)],'personId':(_0x50723b=(_0x15acca=_0x2a1da5[_0x3963d3(0xc4)])==null?void 0x0:_0x15acca[_0x3963d3(0xde)])!=null?_0x50723b:_0x2a1da5[_0x3963d3(0xb7)],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)]),'parentId':_0x2bb2d7['id']});break;}case v[_0x3963d3(0xbd)]:{const _0x13f4ec=this[_0x3963d3(0x85)][_0x3963d3(0xdc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);_0x13f4ec&&_0x13f4ec[_0x3963d3(0xab)]&&this['_threadCommentModel'][_0x3963d3(0xbc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);break;}case v[_0x3963d3(0x9e)]:{this[_0x3963d3(0x85)][_0x3963d3(0xca)](_0x237b14,_0x9853c4,{'commentId':_0x2a1da5['replyId'],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)])});break;}case v[_0x3963d3(0xcc)]:{const _0x476ca2=(_0x1ec352=this['_threadCommentModel'][_0x3963d3(0xe0)](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0x230a8e=>_0x230a8e['threadId']===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x1ec352[_0x3963d3(0x90)];_0x476ca2&&this['_threadCommentModel']['resolveComment'](_0x237b14,_0x9853c4,_0x476ca2['id'],_0x2a1da5['solved']===I[_0x3963d3(0xb1)]);break;}}}));}};S=V([p(0x0,_0x4173d0(_0x5f1bda)),p(0x1,_0x4173d0(_0x13d21d)),p(0x2,_0x4173d0(_0x56ea55)),p(0x3,_0x4173d0(_0x5905e3))],S);const z=_0x4845ea(0xd6),M={};var k=Object[_0x4845ea(0xc8)],Q=(_0x1f560e,_0xc19d7c,_0x952527,_0x13224c)=>{const _0x5e8920=_0x4845ea;for(var _0x6a3795=_0x13224c>0x1?void 0x0:_0x13224c?k(_0xc19d7c,_0x952527):_0xc19d7c,_0x59293f=_0x1f560e[_0x5e8920(0xaf)]-0x1,_0x5f22ad;_0x59293f>=0x0;_0x59293f--)(_0x5f22ad=_0x1f560e[_0x59293f])&&(_0x6a3795=_0x5f22ad(_0x6a3795)||_0x6a3795);return _0x6a3795;},_=(_0x316bc3,_0x335540)=>(_0x53a774,_0x3359dc)=>_0x335540(_0x53a774,_0x3359dc,_0x316bc3);function X(_0x572a31,_0x374096){const _0x2cfaea=_0x4845ea,_0x1098f5=_0x572a31[_0x2cfaea(0xbe)][0x0];return{..._0x374096,'id':_0x1098f5[_0x2cfaea(0x9c)],'resolved':_0x572a31[_0x2cfaea(0xa3)]===0x1,'dT':D(_0x1098f5[_0x2cfaea(0x9d)]),'personId':_0x1098f5[_0x2cfaea(0xb7)],'threadId':_0x1098f5[_0x2cfaea(0xb3)]};}function ee(_0x4eb297,_0x25e238,_0x2d6065){const _0x53b67d=_0x4845ea;var _0x2cca9d,_0x309ae8;if(((_0x309ae8=(_0x2cca9d=_0x4eb297==null?void 0x0:_0x4eb297[_0x53b67d(0xbe)])==null?void 0x0:_0x2cca9d['length'])!=null?_0x309ae8:0x0)>0x0){const _0x1bdca4=(_0x4fa42e,_0x1c9b18)=>({'id':_0x4fa42e[_0x53b67d(0x9c)],'threadId':_0x4fa42e['threadId'],'dT':D(_0x4fa42e[_0x53b67d(0x9d)]),'personId':_0x4fa42e['userId'],'resolved':_0x4eb297[_0x53b67d(0xa3)]===I[_0x53b67d(0xb1)],'unitId':_0x25e238,'subUnitId':_0x2d6065,'text':JSON[_0x53b67d(0xb2)](_0x4fa42e['content']),'parentId':_0x1c9b18}),_0x255065=_0x1bdca4(_0x4eb297[_0x53b67d(0xbe)][0x0]);return{..._0x255065,'children':_0x4eb297[_0x53b67d(0xbe)][_0x53b67d(0xe3)](0x1)['map'](_0x1a5f49=>_0x1bdca4(_0x1a5f49,_0x255065['id']))};}return null;}let f=class{constructor(_0x42702a,_0x67dfd1,_0x492144,_0x24686c){const _0x382e90=_0x4845ea;this[_0x382e90(0xbb)]=_0x42702a,this[_0x382e90(0xda)]=_0x67dfd1,this[_0x382e90(0xae)]=_0x492144,this['_injector']=_0x24686c;}async[_0x4845ea(0xc5)](_0x18c2fb){const _0x276b96=_0x4845ea;var _0x50c8a2,_0x2901b8;const {parentId:_0x567987,unitId:_0x19fccc,text:_0x2d4351,threadId:_0x941d03}=_0x18c2fb,_0x22f711=(_0x2901b8=(_0x50c8a2=_0x2d4351['customRanges'])==null?void 0x0:_0x50c8a2['filter'](_0x282ecc=>_0x282ecc['rangeType']===_0x5f5740['COMMENT'])['map'](_0x258529=>_0x258529[_0x276b96(0xd0)]))!=null?_0x2901b8:[],_0x5a25eb=JSON[_0x276b96(0x99)](_0x2d4351),_0x214e44=(await this[_0x276b96(0xae)]['requireSession'](_0x19fccc))[_0x276b96(0xd4)]();if(_0x567987){const _0x3ab599={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711,'threadId':_0x941d03},_0x4bddaa=(await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9b),{'body':_0x3ab599}))[_0x276b96(0x8f)][_0x276b96(0xd7)];return{..._0x18c2fb,'id':_0x4bddaa[_0x276b96(0x9c)],'dT':_0x4d3e30(+_0x4bddaa[_0x276b96(0x9d)])['format'](_0x276b96(0x81)),'personId':_0x4bddaa['userId']};}else{const _0x1a9e39={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711},_0xb493a9=await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9f),{'body':_0x1a9e39});return X(_0xb493a9['body'][_0x276b96(0xdb)],_0x18c2fb);}}async[_0x4845ea(0xca)](_0x952a77){const _0x16ce0e=_0x4845ea;var _0x169034,_0x28bfff;const {text:_0x2750b1,unitId:_0x3b2ff2}=_0x952a77,_0x13eae3=(_0x28bfff=(_0x169034=_0x2750b1[_0x16ce0e(0xb4)])==null?void 0x0:_0x169034['filter'](_0x1fa310=>_0x1fa310['rangeType']===_0x5f5740[_0x16ce0e(0xac)])[_0x16ce0e(0xe6)](_0x5a003d=>_0x5a003d['rangeId']))!=null?_0x28bfff:[],_0x2a0676=JSON[_0x16ce0e(0x99)](_0x2750b1),_0x54dd8b=_0x952a77[_0x16ce0e(0xb3)],_0x2d57d7=_0x952a77['id'],_0x202b9e={'memberId':(await this['_sessionService']['requireSession'](_0x3b2ff2))['getMemberID'](),'unitId':_0x3b2ff2,'threadId':_0x54dd8b,'mention':_0x13eae3,'content':_0x2a0676,'replyId':_0x2d57d7},_0xd9ec75=await this['_httpService'][_0x16ce0e(0x91)](_0x16ce0e(0xd2)+_0x3b2ff2+_0x16ce0e(0x96),{'body':_0x202b9e});return!_0xd9ec75[_0x16ce0e(0x8f)]['error']||_0xd9ec75[_0x16ce0e(0x8f)][_0x16ce0e(0xe1)][_0x16ce0e(0xce)]===0x1;}async['resolveComment'](_0x4ce925){const _0x5dab6d=_0x4845ea,{unitId:_0x5b2407}=_0x4ce925,_0x4c8d16=_0x4ce925[_0x5dab6d(0xb3)],_0x3b6cd1={'memberId':this[_0x5dab6d(0xda)][_0x5dab6d(0x95)]()[_0x5dab6d(0xde)],'unitId':_0x5b2407,'threadId':_0x4c8d16,'solved':_0x4ce925[_0x5dab6d(0xe4)]?I['Solved']:I[_0x5dab6d(0x9a)]},_0x2f4050=await this[_0x5dab6d(0xbb)][_0x5dab6d(0x91)](_0x5dab6d(0xd2)+_0x5b2407+_0x5dab6d(0xdd),{'body':_0x3b6cd1});return!_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)]||_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)][_0x5dab6d(0xce)]===0x1;}async['deleteComment'](_0x51acda,_0x1491ee,_0x856ccb,_0x293a42){const _0x11c9b2=_0x4845ea,_0x5bbd7d={'memberId':(await this[_0x11c9b2(0xae)][_0x11c9b2(0x87)](_0x51acda))[_0x11c9b2(0xd4)](),'threadId':_0x856ccb,'replyId':_0x293a42,'unitId':_0x51acda},_0x479635=await this[_0x11c9b2(0xbb)][_0x11c9b2(0x91)](_0x11c9b2(0xd2)+_0x51acda+'/delete',{'body':_0x5bbd7d});return!_0x479635[_0x11c9b2(0x8f)]['error']||_0x479635[_0x11c9b2(0x8f)][_0x11c9b2(0xe1)]['code']===0x1;}async['listComments'](_0x449999,_0x35654d,_0x1af0a8){const _0x4c30e7=_0x4845ea,_0xfda1fc={'unitId':_0x449999,'threadId':_0x1af0a8},_0x515648=await this[_0x4c30e7(0xbb)]['post']('/universer-api/comment/unit/'+_0x449999+_0x4c30e7(0xba),{'body':_0xfda1fc}),_0x60286=_0x1af0a8[_0x4c30e7(0xe6)](_0x19c797=>ee(_0x515648[_0x4c30e7(0x8f)][_0x4c30e7(0xe5)][_0x19c797],_0x449999,_0x35654d))['filter'](Boolean);return Object[_0x4c30e7(0x8d)](_0x515648['body'][_0x4c30e7(0xcf)])[_0x4c30e7(0xc9)](_0x1de0a8=>{const _0x2e4eec=_0x4c30e7;this['_userService'][_0x2e4eec(0x8b)](_0x1de0a8);}),_0x60286;}[_0x4845ea(0xc6)](_0x27ab0e){const _0x52d172=_0x4845ea;return{'id':_0x27ab0e['id'],'threadId':_0x27ab0e[_0x52d172(0xb3)],'ref':_0x27ab0e[_0x52d172(0xa6)]};}};f=Q([_(0x0,_0x4173d0(_0x4088a0)),_(0x1,_0x4173d0(_0x56ea55)),_(0x2,_0x4173d0(_0x1a3d82)),_(0x3,_0x4173d0(_0x5905e3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x69e504,_0xa85112,_0x6c1d91,_0x30e476)=>{const _0x5ade0a=_0x4845ea;for(var _0x4a8c97=_0x30e476>0x1?void 0x0:_0x30e476?re(_0xa85112,_0x6c1d91):_0xa85112,_0x39e210=_0x69e504[_0x5ade0a(0xaf)]-0x1,_0x1815e0;_0x39e210>=0x0;_0x39e210--)(_0x1815e0=_0x69e504[_0x39e210])&&(_0x4a8c97=_0x1815e0(_0x4a8c97)||_0x4a8c97);return _0x4a8c97;},N=(_0x3c42d7,_0x2dd4f0)=>(_0x4abb01,_0x5bea90)=>_0x2dd4f0(_0x4abb01,_0x5bea90,_0x3c42d7);let g=class extends _0x17feda{constructor(_0x4f07ff,_0x3ec5b8){const _0x5929fe=_0x4845ea;super(),this['_threadCommentDataSourceService']=_0x4f07ff,this['_threadCommentDataSource']=_0x3ec5b8,this[_0x5929fe(0x93)]();}[_0x4845ea(0x93)](){const _0x836c37=_0x4845ea;this[_0x836c37(0xbf)][_0x836c37(0x89)]=this[_0x836c37(0xcb)],this[_0x836c37(0xbf)][_0x836c37(0xd9)]=!0x1;}};g=te([N(0x0,_0xf1e621),N(0x1,_0x4173d0(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3353ff,_0x190b64,_0x8b1c37)=>_0x190b64 in _0x3353ff?se(_0x3353ff,_0x190b64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b1c37}):_0x3353ff[_0x190b64]=_0x8b1c37,ie=(_0x55178a,_0x494d8c,_0x15357b,_0x12cbd8)=>{for(var _0x59ef3a=_0x12cbd8>0x1?void 0x0:_0x12cbd8?oe(_0x494d8c,_0x15357b):_0x494d8c,_0x573c15=_0x55178a['length']-0x1,_0x1f76e3;_0x573c15>=0x0;_0x573c15--)(_0x1f76e3=_0x55178a[_0x573c15])&&(_0x59ef3a=_0x1f76e3(_0x59ef3a)||_0x59ef3a);return _0x59ef3a;},w=(_0x508dc8,_0x46b04e)=>(_0x1046ee,_0x210144)=>_0x46b04e(_0x1046ee,_0x210144,_0x508dc8),$=(_0x27b07f,_0xabc664,_0x17b6d5)=>ne(_0x27b07f,typeof _0xabc664!=_0x4845ea(0xb6)?_0xabc664+'':_0xabc664,_0x17b6d5);let b=class extends _0x42140b{constructor(_0x1e74ad=M,_0x43d0de,_0x48e9ea){const _0x2b90b3=_0x4845ea;super(),this['_config']=_0x1e74ad,this[_0x2b90b3(0xb0)]=_0x43d0de,this[_0x2b90b3(0x83)]=_0x48e9ea;const {..._0x1fbd50}=_0x50b81b({},M,this[_0x2b90b3(0xa2)]);this['_configService'][_0x2b90b3(0xd5)](z,_0x1fbd50);}[_0x4845ea(0x97)](){[[f],[g],[S]]['forEach'](_0x24e0dd=>{const _0x4d71f6=_0x6940;this[_0x4d71f6(0xb0)][_0x4d71f6(0xb5)](_0x24e0dd);});}[_0x4845ea(0x80)](){const _0x1363af=_0x4845ea;this[_0x1363af(0xb0)]['get'](g),this['_injector'][_0x1363af(0xdf)](S);}};$(b,'pluginName',W),$(b,_0x4845ea(0xb8),_0x161e92[_0x4845ea(0x92)]),b=ie([_0x1ce5fd(_0x1d3295,_0x6a2fba,_0x45810e),w(0x1,_0x4173d0(_0x5905e3)),w(0x2,_0x22d314)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2cbb(){const _0x5b5fec=['/list','668730IszTps','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','user','addUser','code','/universer-api/comment/unit/','UniverThreadComment','body','_initUserSync','personId','defineProperty','error','dataSource','content','UniverInstanceType','@univerjs/network','add','threadId','_userService','createTimestamp','CommentService','_injector','Disposable','commentUpdate$','get','OpenOrReOpen','pluginName','Edit','_config','solved','rangeType','UniverThreadCommentUi','HTTPService','UniverLicensePlugin','_sessionService','getOwnPropertyDescriptor','listComments','map','Delete','users','size','COMMENT','_threadCommentDataSource','261Pligqj','Solve','UNIVER_UNKNOWN','_threadCommentDataSourceService','requireSession','UniverProThreadCommentDatasource','subscribe','UniverCollaborationClientPlugin','stringify','merge','Module','rangeId','Add','@univerjs-pro/license','getUser','UniverThreadCommentDataSourcePlugin','disposeWithMe','4023344UDczeV','pipe','length','function','1071846zZJzdC','Unknown','unitId','_httpService','_initDataSource','resolved','@univerjs/thread-comment-ui','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','@univerjs/thread-comment','parentId','UniverCore','10PzImfl','root','filter','slice','userId','replies','ThreadCommentModel','UniverProCollaborationClient','updateComment','post','_threadCommentModel','Injector','thread-comment-data-source.config','object','@univerjs/core','comments','bufferTime','20256bYMhUV','format','deleteComment','/add','delete','_commentService','exports','toStringTag','comment','reply','resolveComment','addComment','Reply','@univerjs-pro/collaboration-client','Inject','IThreadCommentDataSourceService','/universer-api/user/list','_init','/reply','forEach','UniverNetwork','type','onReady','getMemberID','3326176HyWDQC','498486GYcgnO','dayjs','184695njdXYP','onStarting','rxjs','values','Solved','/edit','CustomRangeType','UserManagerService','parse','DependentOn','customRanges','getUnit','getCurrentUser'];_0x2cbb=function(){return _0x5b5fec;};return _0x2cbb();}function _0x94d4(_0x59dfd9,_0x179fff){const _0x2cbb83=_0x2cbb();return _0x94d4=function(_0x94d43c,_0x164eee){_0x94d43c=_0x94d43c-0x171;let _0x4c2c49=_0x2cbb83[_0x94d43c];return _0x4c2c49;},_0x94d4(_0x59dfd9,_0x179fff);}(function(_0x45a3b7,_0x4b7819){const _0x14f741=_0x94d4,_0x537b63=_0x45a3b7();while(!![]){try{const _0x3c32c3=-parseInt(_0x14f741(0x17c))/0x1+parseInt(_0x14f741(0x17a))/0x2+parseInt(_0x14f741(0x1b6))/0x3*(-parseInt(_0x14f741(0x1e8))/0x4)+parseInt(_0x14f741(0x1d7))/0x5*(-parseInt(_0x14f741(0x18a))/0x6)+parseInt(_0x14f741(0x179))/0x7+parseInt(_0x14f741(0x1c7))/0x8+-parseInt(_0x14f741(0x1cb))/0x9;if(_0x3c32c3===_0x4b7819)break;else _0x537b63['push'](_0x537b63['shift']());}catch(_0x194337){_0x537b63['push'](_0x537b63['shift']());}}}(_0x2cbb,0x3f7de),function(_0x3fe759,_0x214b95){const _0x13b56b=_0x94d4;typeof exports==_0x13b56b(0x1e4)&&typeof module<'u'?_0x214b95(exports,require('@univerjs-pro/collaboration-client'),require(_0x13b56b(0x1c3)),require(_0x13b56b(0x1e5)),require(_0x13b56b(0x1d1)),require('@univerjs/thread-comment'),require(_0x13b56b(0x17e)),require('@univerjs/network')):typeof define==_0x13b56b(0x1ca)&&define['amd']?define([_0x13b56b(0x1ee),_0x13b56b(0x1f5),_0x13b56b(0x1c3),_0x13b56b(0x1e5),_0x13b56b(0x1d1),_0x13b56b(0x1d4),_0x13b56b(0x17e),_0x13b56b(0x19a)],_0x214b95):(_0x3fe759=typeof globalThis<'u'?globalThis:_0x3fe759||self,_0x214b95(_0x3fe759[_0x13b56b(0x1bb)]={},_0x3fe759[_0x13b56b(0x1de)],_0x3fe759['UniverProLicense'],_0x3fe759[_0x13b56b(0x1d6)],_0x3fe759[_0x13b56b(0x1aa)],_0x3fe759[_0x13b56b(0x191)],_0x3fe759[_0x13b56b(0x17e)],_0x3fe759[_0x13b56b(0x175)]));}(this,function(_0x2db18a,_0x2cec26,_0x3420cd,_0x1507f4,_0x153d8a,_0xdfdb70,_0x3426de,_0x436b9f){'use strict';const _0x40ab6b=_0x94d4;const _0x4630c9=_0x40ab6b(0x1d2);var _0x346e18=(_0x55b143=>(_0x55b143[_0x55b143[_0x40ab6b(0x1a4)]=0x0]=_0x40ab6b(0x1a4),_0x55b143[_0x55b143[_0x40ab6b(0x180)]=0x1]=_0x40ab6b(0x180),_0x55b143[_0x55b143[_0x40ab6b(0x18c)]=-0x1]='UNRECOGNIZED',_0x55b143))(_0x346e18||{}),_0xb8f1a7=(_0x554590=>(_0x554590[_0x554590['Unknown']=0x0]=_0x40ab6b(0x1cc),_0x554590[_0x554590['Add']=0x1]=_0x40ab6b(0x1c2),_0x554590[_0x554590[_0x40ab6b(0x1f4)]=0x2]='Reply',_0x554590[_0x554590[_0x40ab6b(0x1a6)]=0x3]=_0x40ab6b(0x1a6),_0x554590[_0x554590[_0x40ab6b(0x1b1)]=0x4]=_0x40ab6b(0x1b1),_0x554590[_0x554590['Solve']=0x5]=_0x40ab6b(0x1b7),_0x554590[_0x554590[_0x40ab6b(0x18c)]=-0x1]=_0x40ab6b(0x18c),_0x554590))(_0xb8f1a7||{});const _0x5e3a40=_0x1d68ec=>_0x1507f4[_0x40ab6b(0x17b)](new Date(+_0x1d68ec))[_0x40ab6b(0x1e9)]('YYYY/MM/DD\x20HH:mm'),_0x68d72a=async(_0xc7d0a0,_0x319964)=>{const _0x36e44c=_0x40ab6b,_0x4b04fe=_0xc7d0a0[_0x36e44c(0x1a3)](_0x1507f4[_0x36e44c(0x183)]),_0x2e31d9=_0xc7d0a0[_0x36e44c(0x1a3)](_0x436b9f[_0x36e44c(0x1ab)]);_0x319964[_0x36e44c(0x174)](_0x307b9f=>{const _0x30ee57=_0x36e44c;_0x4b04fe[_0x30ee57(0x1c4)](_0x307b9f)&&_0x319964[_0x30ee57(0x1ec)](_0x307b9f);}),_0x319964[_0x36e44c(0x1b3)]&&(await _0x2e31d9[_0x36e44c(0x1a3)](_0x36e44c(0x171),{'params':{'userIDs':[..._0x319964]}}))[_0x36e44c(0x192)]['users'][_0x36e44c(0x174)](_0x5e2a7f=>{_0x5e2a7f&&_0x4b04fe['addUser'](_0x5e2a7f);});};var _0x5bc92b=Object[_0x40ab6b(0x1ae)],_0x455b6e=(_0x3d9429,_0x35d479,_0x467f78,_0x29a8f9)=>{const _0x5a7b01=_0x40ab6b;for(var _0x2d176d=_0x29a8f9>0x1?void 0x0:_0x29a8f9?_0x5bc92b(_0x35d479,_0x467f78):_0x35d479,_0x4395be=_0x3d9429[_0x5a7b01(0x1c9)]-0x1,_0x34df2f;_0x4395be>=0x0;_0x4395be--)(_0x34df2f=_0x3d9429[_0x4395be])&&(_0x2d176d=_0x34df2f(_0x2d176d)||_0x2d176d);return _0x2d176d;},_0x1bbf24=(_0x3d8749,_0x17bba0)=>(_0x24e318,_0x388599)=>_0x17bba0(_0x24e318,_0x388599,_0x3d8749);let _0x458505=class extends _0x1507f4[_0x40ab6b(0x1a1)]{constructor(_0x28b61b,_0x397f98,_0x509371,_0xd7cfad){const _0x4b7b71=_0x40ab6b;super(),this['_commentService']=_0x28b61b,this[_0x4b7b71(0x1e1)]=_0x397f98,this[_0x4b7b71(0x19d)]=_0x509371,this[_0x4b7b71(0x1a0)]=_0xd7cfad,this[_0x4b7b71(0x172)](),this['_initUserSync']();}[_0x40ab6b(0x193)](){const _0x341f53=_0x40ab6b;this[_0x341f53(0x1c6)](this['_threadCommentModel'][_0x341f53(0x1a2)][_0x341f53(0x1c8)](_0x3426de[_0x341f53(0x1e7)](0x10))[_0x341f53(0x1bc)](_0x18bc22=>{const _0x55e7ca=_0x341f53,_0x3de4ab=new Set();_0x18bc22[_0x55e7ca(0x174)](_0xd8ffaa=>{const _0x30ef4e=_0x55e7ca;switch(_0xd8ffaa[_0x30ef4e(0x176)]){case _0x30ef4e(0x19b):{const _0x1e1410=_0xd8ffaa['payload'][_0x30ef4e(0x194)];_0x3de4ab[_0x30ef4e(0x19b)](_0x1e1410);break;}}}),_0x68d72a(this['_injector'],_0x3de4ab);}));}[_0x40ab6b(0x172)](){const _0x346a4d=_0x40ab6b;this[_0x346a4d(0x1c6)](this[_0x346a4d(0x1ed)][_0x346a4d(0x1a2)][_0x346a4d(0x1bc)](async _0x266d1b=>{const _0xda54d6=_0x346a4d;var _0x23a62b,_0x5145b8,_0x41106a,_0x1a2d8a;const _0x37a72d=(_0x23a62b=this[_0xda54d6(0x1e1)][_0xda54d6(0x187)](_0x266d1b[_0xda54d6(0x1cd)])['find'](_0x4a7a76=>_0x4a7a76[_0xda54d6(0x19c)]===_0x266d1b[_0xda54d6(0x19c)]))==null?void 0x0:_0x23a62b[_0xda54d6(0x1d8)];if(!_0x37a72d)return;const {unitId:_0x5f3bd6,subUnitId:_0x5b771b}=_0x37a72d;switch(_0x266d1b['user']&&this[_0xda54d6(0x19d)][_0xda54d6(0x18e)](_0x266d1b[_0xda54d6(0x18d)]),_0x266d1b[_0xda54d6(0x176)]){case _0xb8f1a7[_0xda54d6(0x1c2)]:break;case _0xb8f1a7['Reply']:{this[_0xda54d6(0x1e1)][_0xda54d6(0x1f3)](_0x5f3bd6,_0x5b771b,{'unitId':_0x5f3bd6,'subUnitId':_0x5b771b,'ref':'','id':_0x266d1b[_0xda54d6(0x1d3)],'dT':_0x5e3a40(+_0x266d1b[_0xda54d6(0x19e)]),'threadId':_0x266d1b[_0xda54d6(0x19c)],'personId':(_0x41106a=(_0x5145b8=_0x266d1b[_0xda54d6(0x18d)])==null?void 0x0:_0x5145b8['userID'])!=null?_0x41106a:_0x266d1b[_0xda54d6(0x1db)],'text':JSON[_0xda54d6(0x184)](_0x266d1b['content']),'parentId':_0x37a72d['id']});break;}case _0xb8f1a7[_0xda54d6(0x1b1)]:{const _0x41e550=this[_0xda54d6(0x1e1)]['getComment'](_0x5f3bd6,_0x5b771b,_0x266d1b['replyId']);_0x41e550&&_0x41e550[_0xda54d6(0x1d5)]&&this[_0xda54d6(0x1e1)][_0xda54d6(0x1ea)](_0x5f3bd6,_0x5b771b,_0x266d1b[_0xda54d6(0x1d3)]);break;}case _0xb8f1a7[_0xda54d6(0x1a6)]:{this[_0xda54d6(0x1e1)][_0xda54d6(0x1df)](_0x5f3bd6,_0x5b771b,{'commentId':_0x266d1b[_0xda54d6(0x1d3)],'text':JSON[_0xda54d6(0x184)](_0x266d1b[_0xda54d6(0x198)])});break;}case _0xb8f1a7[_0xda54d6(0x1b7)]:{const _0x2431b1=(_0x1a2d8a=this[_0xda54d6(0x1e1)]['getUnit'](_0x266d1b[_0xda54d6(0x1cd)])['find'](_0x46c22b=>_0x46c22b[_0xda54d6(0x19c)]===_0x266d1b[_0xda54d6(0x19c)]))==null?void 0x0:_0x1a2d8a['root'];_0x2431b1&&this[_0xda54d6(0x1e1)][_0xda54d6(0x1f2)](_0x5f3bd6,_0x5b771b,_0x2431b1['id'],_0x266d1b[_0xda54d6(0x1a8)]===_0x346e18[_0xda54d6(0x180)]);break;}}}));}};_0x458505=_0x455b6e([_0x1bbf24(0x0,_0x1507f4[_0x40ab6b(0x1f6)](_0x2cec26[_0x40ab6b(0x19f)])),_0x1bbf24(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0xdfdb70[_0x40ab6b(0x1dd)])),_0x1bbf24(0x2,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x183)])),_0x1bbf24(0x3,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)]))],_0x458505);const _0x5ded37=_0x40ab6b(0x1e3),_0x3be81e={};var _0x4d3a17=Object[_0x40ab6b(0x1ae)],_0x13cffd=(_0x56172e,_0x59fbef,_0x4e36a9,_0x12b609)=>{const _0x5a8613=_0x40ab6b;for(var _0x5c8c2c=_0x12b609>0x1?void 0x0:_0x12b609?_0x4d3a17(_0x59fbef,_0x4e36a9):_0x59fbef,_0x10fd9f=_0x56172e[_0x5a8613(0x1c9)]-0x1,_0xcc6a45;_0x10fd9f>=0x0;_0x10fd9f--)(_0xcc6a45=_0x56172e[_0x10fd9f])&&(_0x5c8c2c=_0xcc6a45(_0x5c8c2c)||_0x5c8c2c);return _0x5c8c2c;},_0x4389af=(_0x450878,_0x59fd2)=>(_0x317d8d,_0x2d0cc4)=>_0x59fd2(_0x317d8d,_0x2d0cc4,_0x450878);function _0x2e90c4(_0x2a0bd6,_0x4f82cd){const _0x3c93d9=_0x40ab6b,_0x23bdcd=_0x2a0bd6[_0x3c93d9(0x1dc)][0x0];return{..._0x4f82cd,'id':_0x23bdcd[_0x3c93d9(0x1d3)],'resolved':_0x2a0bd6[_0x3c93d9(0x1a8)]===0x1,'dT':_0x5e3a40(_0x23bdcd[_0x3c93d9(0x19e)]),'personId':_0x23bdcd[_0x3c93d9(0x1db)],'threadId':_0x23bdcd['threadId']};}function _0x659624(_0x4e7f51,_0xce56d2,_0x16a954){const _0x351eb4=_0x40ab6b;var _0x5243ac,_0x4cbecc;if(((_0x4cbecc=(_0x5243ac=_0x4e7f51==null?void 0x0:_0x4e7f51[_0x351eb4(0x1dc)])==null?void 0x0:_0x5243ac[_0x351eb4(0x1c9)])!=null?_0x4cbecc:0x0)>0x0){const _0x46511=(_0xac9170,_0x97f345)=>({'id':_0xac9170[_0x351eb4(0x1d3)],'threadId':_0xac9170[_0x351eb4(0x19c)],'dT':_0x5e3a40(_0xac9170[_0x351eb4(0x19e)]),'personId':_0xac9170[_0x351eb4(0x1db)],'resolved':_0x4e7f51['solved']===_0x346e18[_0x351eb4(0x180)],'unitId':_0xce56d2,'subUnitId':_0x16a954,'text':JSON[_0x351eb4(0x184)](_0xac9170['content']),'parentId':_0x97f345}),_0x1736c2=_0x46511(_0x4e7f51['replies'][0x0]);return{..._0x1736c2,'children':_0x4e7f51[_0x351eb4(0x1dc)][_0x351eb4(0x1da)](0x1)['map'](_0x3a4f34=>_0x46511(_0x3a4f34,_0x1736c2['id']))};}return null;}let _0x10675f=class{constructor(_0xf6355e,_0x96a53c,_0x55d714,_0x108cee){const _0x1595ac=_0x40ab6b;this['_httpService']=_0xf6355e,this[_0x1595ac(0x19d)]=_0x96a53c,this['_sessionService']=_0x55d714,this[_0x1595ac(0x1a0)]=_0x108cee;}async[_0x40ab6b(0x1f3)](_0x5b700b){const _0x373a4c=_0x40ab6b;var _0x54cf1e,_0x1cfa12;const {parentId:_0x103544,unitId:_0x4e7957,text:_0x4015ea,threadId:_0x17dd77}=_0x5b700b,_0x517250=(_0x1cfa12=(_0x54cf1e=_0x4015ea[_0x373a4c(0x186)])==null?void 0x0:_0x54cf1e['filter'](_0x56ac94=>_0x56ac94[_0x373a4c(0x1a9)]===_0x1507f4['CustomRangeType'][_0x373a4c(0x1b4)])[_0x373a4c(0x1b0)](_0x72e3c3=>_0x72e3c3[_0x373a4c(0x1c1)]))!=null?_0x1cfa12:[],_0x5ce7d5=JSON[_0x373a4c(0x1be)](_0x4015ea),_0x2eed59=(await this['_sessionService'][_0x373a4c(0x1ba)](_0x4e7957))['getMemberID']();if(_0x103544){const _0x222363={'memberId':_0x2eed59,'unitId':_0x4e7957,'content':_0x5ce7d5,'mention':_0x517250,'threadId':_0x17dd77},_0x37ae08=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4e7957+_0x373a4c(0x173),{'body':_0x222363}))[_0x373a4c(0x192)][_0x373a4c(0x1f1)];return{..._0x5b700b,'id':_0x37ae08[_0x373a4c(0x1d3)],'dT':_0x1507f4[_0x373a4c(0x17b)](+_0x37ae08[_0x373a4c(0x19e)])['format'](_0x373a4c(0x18b)),'personId':_0x37ae08['userId']};}else{const _0x119f1e={'memberId':_0x2eed59,'unitId':_0x4e7957,'content':_0x5ce7d5,'mention':_0x517250},_0x2a7a1c=await this['_httpService'][_0x373a4c(0x1e0)](_0x373a4c(0x190)+_0x4e7957+_0x373a4c(0x1eb),{'body':_0x119f1e});return _0x2e90c4(_0x2a7a1c['body'][_0x373a4c(0x1f0)],_0x5b700b);}}async[_0x40ab6b(0x1df)](_0x516729){const _0x10223a=_0x40ab6b;var _0x1d384c,_0x597041;const {text:_0x5b16ac,unitId:_0x3f302f}=_0x516729,_0x450291=(_0x597041=(_0x1d384c=_0x5b16ac[_0x10223a(0x186)])==null?void 0x0:_0x1d384c[_0x10223a(0x1d9)](_0x394cf2=>_0x394cf2[_0x10223a(0x1a9)]===_0x1507f4[_0x10223a(0x182)]['COMMENT'])[_0x10223a(0x1b0)](_0x7fcbdc=>_0x7fcbdc[_0x10223a(0x1c1)]))!=null?_0x597041:[],_0x589634=JSON[_0x10223a(0x1be)](_0x5b16ac),_0xcc4edb=_0x516729[_0x10223a(0x19c)],_0x4a2cad=_0x516729['id'],_0x5215e5={'memberId':(await this[_0x10223a(0x1ad)]['requireSession'](_0x3f302f))[_0x10223a(0x178)](),'unitId':_0x3f302f,'threadId':_0xcc4edb,'mention':_0x450291,'content':_0x589634,'replyId':_0x4a2cad},_0xb6c87=await this[_0x10223a(0x1ce)]['post'](_0x10223a(0x190)+_0x3f302f+_0x10223a(0x181),{'body':_0x5215e5});return!_0xb6c87[_0x10223a(0x192)]['error']||_0xb6c87['body'][_0x10223a(0x196)]['code']===0x1;}async[_0x40ab6b(0x1f2)](_0xf4438a){const _0x53683f=_0x40ab6b,{unitId:_0x50bc19}=_0xf4438a,_0x368f9a=_0xf4438a['threadId'],_0x9134e={'memberId':this[_0x53683f(0x19d)][_0x53683f(0x188)]()['userID'],'unitId':_0x50bc19,'threadId':_0x368f9a,'solved':_0xf4438a[_0x53683f(0x1d0)]?_0x346e18[_0x53683f(0x180)]:_0x346e18[_0x53683f(0x1a4)]},_0x492275=await this['_httpService'][_0x53683f(0x1e0)]('/universer-api/comment/unit/'+_0x50bc19+'/solved',{'body':_0x9134e});return!_0x492275[_0x53683f(0x192)]['error']||_0x492275['body']['error']['code']===0x1;}async['deleteComment'](_0x2efa5d,_0x4c6072,_0x127731,_0x481216){const _0x507cf3=_0x40ab6b,_0x1271df={'memberId':(await this[_0x507cf3(0x1ad)][_0x507cf3(0x1ba)](_0x2efa5d))[_0x507cf3(0x178)](),'threadId':_0x127731,'replyId':_0x481216,'unitId':_0x2efa5d},_0x5b3852=await this[_0x507cf3(0x1ce)][_0x507cf3(0x1e0)](_0x507cf3(0x190)+_0x2efa5d+'/delete',{'body':_0x1271df});return!_0x5b3852['body'][_0x507cf3(0x196)]||_0x5b3852['body'][_0x507cf3(0x196)][_0x507cf3(0x18f)]===0x1;}async[_0x40ab6b(0x1af)](_0x1e2a09,_0x33cf39,_0x4b2508){const _0x2c16a6=_0x40ab6b,_0x79ba3={'unitId':_0x1e2a09,'threadId':_0x4b2508},_0x3f1c16=await this[_0x2c16a6(0x1ce)][_0x2c16a6(0x1e0)]('/universer-api/comment/unit/'+_0x1e2a09+_0x2c16a6(0x189),{'body':_0x79ba3}),_0x31f5bf=_0x4b2508[_0x2c16a6(0x1b0)](_0x1ce670=>_0x659624(_0x3f1c16[_0x2c16a6(0x192)][_0x2c16a6(0x1e6)][_0x1ce670],_0x1e2a09,_0x33cf39))[_0x2c16a6(0x1d9)](Boolean);return Object[_0x2c16a6(0x17f)](_0x3f1c16['body'][_0x2c16a6(0x1b2)])[_0x2c16a6(0x174)](_0x284cad=>{const _0x3f72d2=_0x2c16a6;this[_0x3f72d2(0x19d)]['addUser'](_0x284cad);}),_0x31f5bf;}['saveCommentToSnapshot'](_0x1255f8){const _0x3a14be=_0x40ab6b;return{'id':_0x1255f8['id'],'threadId':_0x1255f8[_0x3a14be(0x19c)],'ref':_0x1255f8['ref']};}};_0x10675f=_0x13cffd([_0x4389af(0x0,_0x1507f4[_0x40ab6b(0x1f6)](_0x436b9f[_0x40ab6b(0x1ab)])),_0x4389af(0x1,_0x1507f4['Inject'](_0x1507f4[_0x40ab6b(0x183)])),_0x4389af(0x2,_0x1507f4[_0x40ab6b(0x1f6)](_0x2cec26['CollaborationSessionService'])),_0x4389af(0x3,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)]))],_0x10675f);var _0x6cd102=Object[_0x40ab6b(0x1ae)],_0x3d8222=(_0x11db3c,_0x4b6d25,_0x5b4948,_0x140f29)=>{const _0x83122=_0x40ab6b;for(var _0x1085f5=_0x140f29>0x1?void 0x0:_0x140f29?_0x6cd102(_0x4b6d25,_0x5b4948):_0x4b6d25,_0x2718a3=_0x11db3c[_0x83122(0x1c9)]-0x1,_0x4be286;_0x2718a3>=0x0;_0x2718a3--)(_0x4be286=_0x11db3c[_0x2718a3])&&(_0x1085f5=_0x4be286(_0x1085f5)||_0x1085f5);return _0x1085f5;},_0x45aa7c=(_0x1649c2,_0x331c46)=>(_0x28dfcd,_0x57d414)=>_0x331c46(_0x28dfcd,_0x57d414,_0x1649c2);let _0x1e00bb=class extends _0x1507f4['Disposable']{constructor(_0x3416ab,_0x121cf8){const _0x118a40=_0x40ab6b;super(),this[_0x118a40(0x1b9)]=_0x3416ab,this['_threadCommentDataSource']=_0x121cf8,this[_0x118a40(0x1cf)]();}['_initDataSource'](){const _0x18e3bf=_0x40ab6b;this[_0x18e3bf(0x1b9)][_0x18e3bf(0x197)]=this[_0x18e3bf(0x1b5)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x1e00bb=_0x3d8222([_0x45aa7c(0x0,_0xdfdb70[_0x40ab6b(0x1f7)]),_0x45aa7c(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0x10675f))],_0x1e00bb);var _0x55cdf7=Object[_0x40ab6b(0x195)],_0x1f2649=Object[_0x40ab6b(0x1ae)],_0x1e93f7=(_0xb02da0,_0x2491aa,_0x29d1d4)=>_0x2491aa in _0xb02da0?_0x55cdf7(_0xb02da0,_0x2491aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29d1d4}):_0xb02da0[_0x2491aa]=_0x29d1d4,_0x3ec012=(_0x248e6a,_0x5368fe,_0xf95de7,_0x7ff1ac)=>{for(var _0x378265=_0x7ff1ac>0x1?void 0x0:_0x7ff1ac?_0x1f2649(_0x5368fe,_0xf95de7):_0x5368fe,_0x2ff997=_0x248e6a['length']-0x1,_0x1718c7;_0x2ff997>=0x0;_0x2ff997--)(_0x1718c7=_0x248e6a[_0x2ff997])&&(_0x378265=_0x1718c7(_0x378265)||_0x378265);return _0x378265;},_0x398e3c=(_0x448e07,_0x1222ad)=>(_0x61fbb,_0x1f66f2)=>_0x1222ad(_0x61fbb,_0x1f66f2,_0x448e07),_0x5bf771=(_0x446ea9,_0x4d1c52,_0x446750)=>_0x1e93f7(_0x446ea9,typeof _0x4d1c52!='symbol'?_0x4d1c52+'':_0x4d1c52,_0x446750);_0x2db18a[_0x40ab6b(0x1c5)]=class extends _0x1507f4['Plugin']{constructor(_0x1528c8=_0x3be81e,_0x1f8977,_0x5a88df){const _0x37b19a=_0x40ab6b;super(),this[_0x37b19a(0x1a7)]=_0x1528c8,this[_0x37b19a(0x1a0)]=_0x1f8977,this['_configService']=_0x5a88df;const {..._0x58daba}=_0x1507f4[_0x37b19a(0x1bf)]({},_0x3be81e,this[_0x37b19a(0x1a7)]);this['_configService']['setConfig'](_0x5ded37,_0x58daba);}[_0x40ab6b(0x17d)](){[[_0x10675f],[_0x1e00bb],[_0x458505]]['forEach'](_0x304535=>{const _0x9a1841=_0x94d4;this['_injector'][_0x9a1841(0x19b)](_0x304535);});}[_0x40ab6b(0x177)](){const _0x515d1c=_0x40ab6b;this[_0x515d1c(0x1a0)][_0x515d1c(0x1a3)](_0x1e00bb),this[_0x515d1c(0x1a0)][_0x515d1c(0x1a3)](_0x458505);}},_0x5bf771(_0x2db18a[_0x40ab6b(0x1c5)],_0x40ab6b(0x1a5),_0x4630c9),_0x5bf771(_0x2db18a[_0x40ab6b(0x1c5)],_0x40ab6b(0x176),_0x1507f4[_0x40ab6b(0x199)][_0x40ab6b(0x1b8)]),_0x2db18a[_0x40ab6b(0x1c5)]=_0x3ec012([_0x1507f4[_0x40ab6b(0x185)](_0x153d8a['UniverThreadCommentUIPlugin'],_0x2cec26[_0x40ab6b(0x1bd)],_0x3420cd[_0x40ab6b(0x1ac)]),_0x398e3c(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)])),_0x398e3c(0x2,_0x1507f4['IConfigService'])],_0x2db18a['UniverThreadCommentDataSourcePlugin']),Object[_0x40ab6b(0x195)](_0x2db18a,Symbol[_0x40ab6b(0x1ef)],{'value':_0x40ab6b(0x1c0)});}));
|
|
1
|
+
function _0x1927(_0x4a24cb,_0xcf9027){const _0x3bd8af=_0x3bd8();return _0x1927=function(_0x192784,_0xb53684){_0x192784=_0x192784-0x1ea;let _0xb3e5f4=_0x3bd8af[_0x192784];return _0xb3e5f4;},_0x1927(_0x4a24cb,_0xcf9027);}function _0x3bd8(){const _0x23badb=['parentId','filter','userId','DependentOn','_threadCommentDataSourceService','payload','IThreadCommentDataSourceService','Disposable','/reply','user','stringify','_httpService','UniverProThreadCommentDatasource','3346aNEemi','ThreadCommentModel','slice','function','@univerjs/thread-comment-ui','1191645eeDCYF','UniverThreadCommentUIPlugin','@univerjs/network','_initDataSource','amd','listComments','defineProperty','8136fFRgWH','@univerjs-pro/license','subscribe','UniverCollaborationClientPlugin','forEach','userID','getUnit','/add','Edit','Add','syncUpdateMutationToColla','setConfig','comment','format','_userService','CustomRangeType','_init','CollaborationSessionService','onReady','disposeWithMe','/edit','Solve','get','content','_injector','customRanges','getUser','map','deleteComment','pipe','79256gviBIv','rangeType','1382LvmXKz','UniverThreadCommentDataSourcePlugin','values','parse','replies','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','commentUpdate$','UserManagerService','rangeId','Inject','updateComment','dayjs','HTTPService','8ZgQdGR','dataSource','replyId','8552502aTrOvb','getCurrentUser','8076180uIGBWW','_threadCommentDataSource','Delete','CommentService','UNIVER_UNKNOWN','_commentService','body','getMemberID','IConfigService','85yVUbUc','code','UniverProLicense','type','Injector','Solved','93313wWPjlp','root','UniverProCollaborationClient','/universer-api/comment/unit/','toStringTag','resolved','_config','comments','_threadCommentModel','users','object','1980OpvdGc','getComment','post','UNRECOGNIZED','Unknown','add','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','createTimestamp','addComment','_sessionService','bufferTime','rxjs','addUser','Reply','resolveComment','UniverNetwork','Plugin','length','_configService','error','/solved','requireSession','getOwnPropertyDescriptor','/delete','threadId','exports','334LmTlIT','onStarting'];_0x3bd8=function(){return _0x23badb;};return _0x3bd8();}(function(_0x4033e3,_0x540bb3){const _0x1df9e6=_0x1927,_0x4794f3=_0x4033e3();while(!![]){try{const _0x4db19b=-parseInt(_0x1df9e6(0x25f))/0x1*(parseInt(_0x1df9e6(0x216))/0x2)+parseInt(_0x1df9e6(0x1ef))/0x3+-parseInt(_0x1df9e6(0x214))/0x4*(parseInt(_0x1df9e6(0x232))/0x5)+-parseInt(_0x1df9e6(0x1f6))/0x6*(parseInt(_0x1df9e6(0x1ea))/0x7)+parseInt(_0x1df9e6(0x224))/0x8*(parseInt(_0x1df9e6(0x227))/0x9)+-parseInt(_0x1df9e6(0x229))/0xa+parseInt(_0x1df9e6(0x238))/0xb*(parseInt(_0x1df9e6(0x243))/0xc);if(_0x4db19b===_0x540bb3)break;else _0x4794f3['push'](_0x4794f3['shift']());}catch(_0x11dc93){_0x4794f3['push'](_0x4794f3['shift']());}}}(_0x3bd8,0xb0b3a),function(_0x3194d2,_0x1d4326){const _0x22d588=_0x1927;typeof exports==_0x22d588(0x242)&&typeof module<'u'?_0x1d4326(exports,require('@univerjs-pro/collaboration-client'),require(_0x22d588(0x1f7)),require(_0x22d588(0x24b)),require(_0x22d588(0x1ee)),require('@univerjs/thread-comment'),require(_0x22d588(0x250)),require('@univerjs/network')):typeof define==_0x22d588(0x1ed)&&define[_0x22d588(0x1f3)]?define([_0x22d588(0x25e),'@univerjs-pro/collaboration-client',_0x22d588(0x1f7),_0x22d588(0x24b),_0x22d588(0x1ee),'@univerjs/thread-comment','rxjs',_0x22d588(0x1f1)],_0x1d4326):(_0x3194d2=typeof globalThis<'u'?globalThis:_0x3194d2||self,_0x1d4326(_0x3194d2[_0x22d588(0x26d)]={},_0x3194d2[_0x22d588(0x23a)],_0x3194d2[_0x22d588(0x234)],_0x3194d2['UniverCore'],_0x3194d2['UniverThreadCommentUi'],_0x3194d2['UniverThreadComment'],_0x3194d2[_0x22d588(0x250)],_0x3194d2[_0x22d588(0x254)]));}(this,function(_0x4b8500,_0x410ab3,_0x3913ca,_0x43ff14,_0x315cc2,_0x293da4,_0x135669,_0xa198f5){'use strict';const _0x68cbcb=_0x1927;const _0x47759d=_0x68cbcb(0x24a);var _0xd2dbd0=(_0x4350d4=>(_0x4350d4[_0x4350d4[_0x68cbcb(0x21c)]=0x0]='OpenOrReOpen',_0x4350d4[_0x4350d4[_0x68cbcb(0x237)]=0x1]=_0x68cbcb(0x237),_0x4350d4[_0x4350d4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4350d4))(_0xd2dbd0||{}),_0x2a6a07=(_0x1a5220=>(_0x1a5220[_0x1a5220[_0x68cbcb(0x247)]=0x0]='Unknown',_0x1a5220[_0x1a5220[_0x68cbcb(0x1ff)]=0x1]='Add',_0x1a5220[_0x1a5220[_0x68cbcb(0x252)]=0x2]=_0x68cbcb(0x252),_0x1a5220[_0x1a5220['Edit']=0x3]=_0x68cbcb(0x1fe),_0x1a5220[_0x1a5220[_0x68cbcb(0x22b)]=0x4]=_0x68cbcb(0x22b),_0x1a5220[_0x1a5220[_0x68cbcb(0x20b)]=0x5]=_0x68cbcb(0x20b),_0x1a5220[_0x1a5220[_0x68cbcb(0x246)]=-0x1]=_0x68cbcb(0x246),_0x1a5220))(_0x2a6a07||{});const _0x33033b=_0x5b8813=>_0x43ff14['dayjs'](new Date(+_0x5b8813))['format'](_0x68cbcb(0x21b)),_0x188cd1=async(_0x228e71,_0x5d105f)=>{const _0x28c1b8=_0x68cbcb,_0x3548f6=_0x228e71[_0x28c1b8(0x20c)](_0x43ff14['UserManagerService']),_0x44c9ef=_0x228e71['get'](_0xa198f5[_0x28c1b8(0x223)]);_0x5d105f['forEach'](_0xacf965=>{const _0x40d408=_0x28c1b8;_0x3548f6[_0x40d408(0x210)](_0xacf965)&&_0x5d105f['delete'](_0xacf965);}),_0x5d105f['size']&&(await _0x44c9ef[_0x28c1b8(0x20c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d105f]}}))[_0x28c1b8(0x22f)][_0x28c1b8(0x241)]['forEach'](_0x420340=>{const _0x4ab6d8=_0x28c1b8;_0x420340&&_0x3548f6[_0x4ab6d8(0x251)](_0x420340);});};var _0x38f1f5=Object[_0x68cbcb(0x25b)],_0x22be8c=(_0x409293,_0x15e06f,_0x1886cc,_0x4505f8)=>{for(var _0x45d19e=_0x4505f8>0x1?void 0x0:_0x4505f8?_0x38f1f5(_0x15e06f,_0x1886cc):_0x15e06f,_0x2a8890=_0x409293['length']-0x1,_0x41575a;_0x2a8890>=0x0;_0x2a8890--)(_0x41575a=_0x409293[_0x2a8890])&&(_0x45d19e=_0x41575a(_0x45d19e)||_0x45d19e);return _0x45d19e;},_0x4ad2e9=(_0x44ee1c,_0x539633)=>(_0xd767a7,_0x3e18d6)=>_0x539633(_0xd767a7,_0x3e18d6,_0x44ee1c);let _0x3c98ab=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0xe47e05,_0x34718a,_0x2acedb,_0x3a7f5a){const _0x22812d=_0x68cbcb;super(),this[_0x22812d(0x22e)]=_0xe47e05,this[_0x22812d(0x240)]=_0x34718a,this['_userService']=_0x2acedb,this[_0x22812d(0x20e)]=_0x3a7f5a,this[_0x22812d(0x206)](),this['_initUserSync']();}['_initUserSync'](){const _0x1c99b3=_0x68cbcb;this[_0x1c99b3(0x209)](this[_0x1c99b3(0x240)][_0x1c99b3(0x21d)][_0x1c99b3(0x213)](_0x135669[_0x1c99b3(0x24f)](0x10))[_0x1c99b3(0x1f8)](_0x3904a1=>{const _0x48b5b3=_0x1c99b3,_0x294eab=new Set();_0x3904a1[_0x48b5b3(0x1fa)](_0x9db516=>{const _0x5dd85c=_0x48b5b3;switch(_0x9db516[_0x5dd85c(0x235)]){case _0x5dd85c(0x248):{const _0x1a2495=_0x9db516[_0x5dd85c(0x266)]['personId'];_0x294eab['add'](_0x1a2495);break;}}}),_0x188cd1(this[_0x48b5b3(0x20e)],_0x294eab);}));}[_0x68cbcb(0x206)](){const _0x91717f=_0x68cbcb;this['disposeWithMe'](this[_0x91717f(0x22e)]['commentUpdate$']['subscribe'](async _0x36ffac=>{const _0x4940b4=_0x91717f;var _0x474631,_0x171cac,_0x3749dc,_0xdc93ee;const _0x556af3=(_0x474631=this[_0x4940b4(0x240)]['getUnit'](_0x36ffac['unitId'])[_0x4940b4(0x249)](_0x512828=>_0x512828[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0x474631[_0x4940b4(0x239)];if(!_0x556af3)return;const {unitId:_0x5d779a,subUnitId:_0x914646}=_0x556af3;switch(_0x36ffac[_0x4940b4(0x26a)]&&this[_0x4940b4(0x204)][_0x4940b4(0x251)](_0x36ffac[_0x4940b4(0x26a)]),_0x36ffac[_0x4940b4(0x235)]){case _0x2a6a07['Add']:break;case _0x2a6a07[_0x4940b4(0x252)]:{this[_0x4940b4(0x240)][_0x4940b4(0x24d)](_0x5d779a,_0x914646,{'unitId':_0x5d779a,'subUnitId':_0x914646,'ref':'','id':_0x36ffac[_0x4940b4(0x226)],'dT':_0x33033b(+_0x36ffac['createTimestamp']),'threadId':_0x36ffac[_0x4940b4(0x25d)],'personId':(_0x3749dc=(_0x171cac=_0x36ffac[_0x4940b4(0x26a)])==null?void 0x0:_0x171cac['userID'])!=null?_0x3749dc:_0x36ffac[_0x4940b4(0x263)],'text':JSON[_0x4940b4(0x219)](_0x36ffac[_0x4940b4(0x20d)]),'parentId':_0x556af3['id']});break;}case _0x2a6a07[_0x4940b4(0x22b)]:{const _0x607cdc=this[_0x4940b4(0x240)][_0x4940b4(0x244)](_0x5d779a,_0x914646,_0x36ffac[_0x4940b4(0x226)]);_0x607cdc&&_0x607cdc[_0x4940b4(0x261)]&&this[_0x4940b4(0x240)][_0x4940b4(0x212)](_0x5d779a,_0x914646,_0x36ffac['replyId']);break;}case _0x2a6a07['Edit']:{this[_0x4940b4(0x240)][_0x4940b4(0x221)](_0x5d779a,_0x914646,{'commentId':_0x36ffac[_0x4940b4(0x226)],'text':JSON['parse'](_0x36ffac[_0x4940b4(0x20d)])});break;}case _0x2a6a07[_0x4940b4(0x20b)]:{const _0x50f4fb=(_0xdc93ee=this[_0x4940b4(0x240)][_0x4940b4(0x1fc)](_0x36ffac['unitId'])['find'](_0x2c3cf5=>_0x2c3cf5[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0xdc93ee[_0x4940b4(0x239)];_0x50f4fb&&this['_threadCommentModel'][_0x4940b4(0x253)](_0x5d779a,_0x914646,_0x50f4fb['id'],_0x36ffac['solved']===_0xd2dbd0[_0x4940b4(0x237)]);break;}}}));}};_0x3c98ab=_0x22be8c([_0x4ad2e9(0x0,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x22c)])),_0x4ad2e9(0x1,_0x43ff14['Inject'](_0x293da4[_0x68cbcb(0x1eb)])),_0x4ad2e9(0x2,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x4ad2e9(0x3,_0x43ff14['Inject'](_0x43ff14[_0x68cbcb(0x236)]))],_0x3c98ab);const _0x160666='thread-comment-data-source.config',_0x5dcb9d={};var _0x39dc30=Object[_0x68cbcb(0x25b)],_0x5ea355=(_0x1d9b05,_0x59e427,_0x2ec891,_0x58eb04)=>{for(var _0x397815=_0x58eb04>0x1?void 0x0:_0x58eb04?_0x39dc30(_0x59e427,_0x2ec891):_0x59e427,_0x327d6b=_0x1d9b05['length']-0x1,_0x49a82a;_0x327d6b>=0x0;_0x327d6b--)(_0x49a82a=_0x1d9b05[_0x327d6b])&&(_0x397815=_0x49a82a(_0x397815)||_0x397815);return _0x397815;},_0x3d193d=(_0x2b72ef,_0x2085f4)=>(_0x125f9b,_0x3d1d44)=>_0x2085f4(_0x125f9b,_0x3d1d44,_0x2b72ef);function _0x54ae88(_0x417b68,_0x5a926d){const _0x24b2d4=_0x68cbcb,_0x87ae98=_0x417b68['replies'][0x0];return{..._0x5a926d,'id':_0x87ae98['replyId'],'resolved':_0x417b68['solved']===0x1,'dT':_0x33033b(_0x87ae98[_0x24b2d4(0x24c)]),'personId':_0x87ae98[_0x24b2d4(0x263)],'threadId':_0x87ae98[_0x24b2d4(0x25d)]};}function _0x3091e0(_0x108c86,_0x12b6ec,_0x27dadb){const _0x299a81=_0x68cbcb;var _0x52e9cd,_0x10f404;if(((_0x10f404=(_0x52e9cd=_0x108c86==null?void 0x0:_0x108c86['replies'])==null?void 0x0:_0x52e9cd[_0x299a81(0x256)])!=null?_0x10f404:0x0)>0x0){const _0x7dd90b=(_0x39a54d,_0x26d5c2)=>({'id':_0x39a54d[_0x299a81(0x226)],'threadId':_0x39a54d[_0x299a81(0x25d)],'dT':_0x33033b(_0x39a54d[_0x299a81(0x24c)]),'personId':_0x39a54d[_0x299a81(0x263)],'resolved':_0x108c86['solved']===_0xd2dbd0[_0x299a81(0x237)],'unitId':_0x12b6ec,'subUnitId':_0x27dadb,'text':JSON[_0x299a81(0x219)](_0x39a54d['content']),'parentId':_0x26d5c2}),_0xdcb6b2=_0x7dd90b(_0x108c86[_0x299a81(0x21a)][0x0]);return{..._0xdcb6b2,'children':_0x108c86[_0x299a81(0x21a)][_0x299a81(0x1ec)](0x1)['map'](_0x46d9c1=>_0x7dd90b(_0x46d9c1,_0xdcb6b2['id']))};}return null;}let _0x34fd15=class{constructor(_0x4239b2,_0x55846b,_0x300515,_0xbc1cc3){const _0x457d52=_0x68cbcb;this[_0x457d52(0x26c)]=_0x4239b2,this[_0x457d52(0x204)]=_0x55846b,this[_0x457d52(0x24e)]=_0x300515,this['_injector']=_0xbc1cc3;}async[_0x68cbcb(0x24d)](_0xd8605b){const _0x3603cd=_0x68cbcb;var _0x284831,_0x48714f;const {parentId:_0x3dc4be,unitId:_0x71b2f8,text:_0x1f946f,threadId:_0x173990}=_0xd8605b,_0x5c93ee=(_0x48714f=(_0x284831=_0x1f946f[_0x3603cd(0x20f)])==null?void 0x0:_0x284831[_0x3603cd(0x262)](_0x9afc9d=>_0x9afc9d[_0x3603cd(0x215)]===_0x43ff14[_0x3603cd(0x205)]['COMMENT'])[_0x3603cd(0x211)](_0x3648fe=>_0x3648fe[_0x3603cd(0x21f)]))!=null?_0x48714f:[],_0x4b0582=JSON[_0x3603cd(0x26b)](_0x1f946f),_0x242036=(await this[_0x3603cd(0x24e)][_0x3603cd(0x25a)](_0x71b2f8))['getMemberID']();if(_0x3dc4be){const _0x19c367={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee,'threadId':_0x173990},_0x316036=(await this['_httpService'][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x269),{'body':_0x19c367}))[_0x3603cd(0x22f)]['reply'];return{..._0xd8605b,'id':_0x316036[_0x3603cd(0x226)],'dT':_0x43ff14[_0x3603cd(0x222)](+_0x316036[_0x3603cd(0x24c)])[_0x3603cd(0x203)](_0x3603cd(0x21b)),'personId':_0x316036[_0x3603cd(0x263)]};}else{const _0x1addb2={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee},_0x18f399=await this[_0x3603cd(0x26c)][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x1fd),{'body':_0x1addb2});return _0x54ae88(_0x18f399['body'][_0x3603cd(0x202)],_0xd8605b);}}async[_0x68cbcb(0x221)](_0x482f98){const _0x5c85fc=_0x68cbcb;var _0x34ee89,_0x10d9ac;const {text:_0x4e1900,unitId:_0x2a4154}=_0x482f98,_0x770e8=(_0x10d9ac=(_0x34ee89=_0x4e1900[_0x5c85fc(0x20f)])==null?void 0x0:_0x34ee89[_0x5c85fc(0x262)](_0x3d004c=>_0x3d004c[_0x5c85fc(0x215)]===_0x43ff14[_0x5c85fc(0x205)]['COMMENT'])[_0x5c85fc(0x211)](_0x8d6c66=>_0x8d6c66['rangeId']))!=null?_0x10d9ac:[],_0x56e6c4=JSON['stringify'](_0x4e1900),_0xfb8188=_0x482f98[_0x5c85fc(0x25d)],_0x4aa1eb=_0x482f98['id'],_0x2bb96a={'memberId':(await this['_sessionService'][_0x5c85fc(0x25a)](_0x2a4154))['getMemberID'](),'unitId':_0x2a4154,'threadId':_0xfb8188,'mention':_0x770e8,'content':_0x56e6c4,'replyId':_0x4aa1eb},_0x40ba5c=await this[_0x5c85fc(0x26c)][_0x5c85fc(0x245)](_0x5c85fc(0x23b)+_0x2a4154+_0x5c85fc(0x20a),{'body':_0x2bb96a});return!_0x40ba5c[_0x5c85fc(0x22f)][_0x5c85fc(0x258)]||_0x40ba5c['body'][_0x5c85fc(0x258)][_0x5c85fc(0x233)]===0x1;}async[_0x68cbcb(0x253)](_0x4d2965){const _0x233905=_0x68cbcb,{unitId:_0x2690c6}=_0x4d2965,_0x2bcc70=_0x4d2965[_0x233905(0x25d)],_0x34f353={'memberId':this[_0x233905(0x204)][_0x233905(0x228)]()[_0x233905(0x1fb)],'unitId':_0x2690c6,'threadId':_0x2bcc70,'solved':_0x4d2965[_0x233905(0x23d)]?_0xd2dbd0[_0x233905(0x237)]:_0xd2dbd0['OpenOrReOpen']},_0x2e8c71=await this[_0x233905(0x26c)][_0x233905(0x245)](_0x233905(0x23b)+_0x2690c6+_0x233905(0x259),{'body':_0x34f353});return!_0x2e8c71[_0x233905(0x22f)]['error']||_0x2e8c71[_0x233905(0x22f)][_0x233905(0x258)]['code']===0x1;}async[_0x68cbcb(0x212)](_0x565edc,_0x540feb,_0x3890f0,_0x1a9b4f){const _0x287ee9=_0x68cbcb,_0x357358={'memberId':(await this[_0x287ee9(0x24e)][_0x287ee9(0x25a)](_0x565edc))[_0x287ee9(0x230)](),'threadId':_0x3890f0,'replyId':_0x1a9b4f,'unitId':_0x565edc},_0x1bac0b=await this[_0x287ee9(0x26c)][_0x287ee9(0x245)](_0x287ee9(0x23b)+_0x565edc+_0x287ee9(0x25c),{'body':_0x357358});return!_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)]||_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)][_0x287ee9(0x233)]===0x1;}async[_0x68cbcb(0x1f4)](_0x17df38,_0x253cec,_0x18a050){const _0x445fae=_0x68cbcb,_0xa58a59={'unitId':_0x17df38,'threadId':_0x18a050},_0x4325f0=await this[_0x445fae(0x26c)][_0x445fae(0x245)]('/universer-api/comment/unit/'+_0x17df38+'/list',{'body':_0xa58a59}),_0x18477d=_0x18a050[_0x445fae(0x211)](_0x266002=>_0x3091e0(_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x23f)][_0x266002],_0x17df38,_0x253cec))[_0x445fae(0x262)](Boolean);return Object[_0x445fae(0x218)](_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x241)])['forEach'](_0x2a202d=>{const _0x343242=_0x445fae;this[_0x343242(0x204)]['addUser'](_0x2a202d);}),_0x18477d;}['saveCommentToSnapshot'](_0x5f0af6){return{'id':_0x5f0af6['id'],'threadId':_0x5f0af6['threadId'],'ref':_0x5f0af6['ref']};}};_0x34fd15=_0x5ea355([_0x3d193d(0x0,_0x43ff14['Inject'](_0xa198f5[_0x68cbcb(0x223)])),_0x3d193d(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x3d193d(0x2,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x207)])),_0x3d193d(0x3,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x236)]))],_0x34fd15);var _0x758866=Object[_0x68cbcb(0x25b)],_0x2f145d=(_0x9db884,_0x1fc576,_0x337198,_0x3366c1)=>{const _0x50a8be=_0x68cbcb;for(var _0x566b4b=_0x3366c1>0x1?void 0x0:_0x3366c1?_0x758866(_0x1fc576,_0x337198):_0x1fc576,_0xf87754=_0x9db884[_0x50a8be(0x256)]-0x1,_0x22ac67;_0xf87754>=0x0;_0xf87754--)(_0x22ac67=_0x9db884[_0xf87754])&&(_0x566b4b=_0x22ac67(_0x566b4b)||_0x566b4b);return _0x566b4b;},_0x4797b3=(_0x45a0bb,_0xfa7aa9)=>(_0x110e3a,_0x4cdd16)=>_0xfa7aa9(_0x110e3a,_0x4cdd16,_0x45a0bb);let _0x5c4d1b=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0x582949,_0x534909){const _0x129a93=_0x68cbcb;super(),this[_0x129a93(0x265)]=_0x582949,this[_0x129a93(0x22a)]=_0x534909,this[_0x129a93(0x1f2)]();}['_initDataSource'](){const _0x5f094d=_0x68cbcb;this['_threadCommentDataSourceService'][_0x5f094d(0x225)]=this['_threadCommentDataSource'],this[_0x5f094d(0x265)][_0x5f094d(0x200)]=!0x1;}};_0x5c4d1b=_0x2f145d([_0x4797b3(0x0,_0x293da4[_0x68cbcb(0x267)]),_0x4797b3(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x34fd15))],_0x5c4d1b);var _0x4d45ec=Object[_0x68cbcb(0x1f5)],_0x508a28=Object[_0x68cbcb(0x25b)],_0x578682=(_0x4af109,_0x2c688f,_0x15c657)=>_0x2c688f in _0x4af109?_0x4d45ec(_0x4af109,_0x2c688f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15c657}):_0x4af109[_0x2c688f]=_0x15c657,_0x283ca0=(_0xd6187d,_0x3f43ab,_0x26ac37,_0x3ebbfe)=>{const _0x3c6327=_0x68cbcb;for(var _0x1bb187=_0x3ebbfe>0x1?void 0x0:_0x3ebbfe?_0x508a28(_0x3f43ab,_0x26ac37):_0x3f43ab,_0x4da1a6=_0xd6187d[_0x3c6327(0x256)]-0x1,_0x3d7615;_0x4da1a6>=0x0;_0x4da1a6--)(_0x3d7615=_0xd6187d[_0x4da1a6])&&(_0x1bb187=_0x3d7615(_0x1bb187)||_0x1bb187);return _0x1bb187;},_0x474611=(_0x28411a,_0x106dca)=>(_0x6ed0a5,_0x19c98d)=>_0x106dca(_0x6ed0a5,_0x19c98d,_0x28411a),_0x49841d=(_0x23e2fa,_0x32ee1a,_0x3dbd94)=>_0x578682(_0x23e2fa,typeof _0x32ee1a!='symbol'?_0x32ee1a+'':_0x32ee1a,_0x3dbd94);_0x4b8500['UniverThreadCommentDataSourcePlugin']=class extends _0x43ff14[_0x68cbcb(0x255)]{constructor(_0x57d416=_0x5dcb9d,_0x8094b3,_0x334860){const _0x21b420=_0x68cbcb;super(),this[_0x21b420(0x23e)]=_0x57d416,this['_injector']=_0x8094b3,this[_0x21b420(0x257)]=_0x334860;const {..._0x5001d3}=_0x43ff14['merge']({},_0x5dcb9d,this[_0x21b420(0x23e)]);this['_configService'][_0x21b420(0x201)](_0x160666,_0x5001d3);}[_0x68cbcb(0x260)](){const _0x4d1fa2=_0x68cbcb;[[_0x34fd15],[_0x5c4d1b],[_0x3c98ab]][_0x4d1fa2(0x1fa)](_0x517118=>{const _0x378f8c=_0x4d1fa2;this['_injector'][_0x378f8c(0x248)](_0x517118);});}[_0x68cbcb(0x208)](){const _0x3112bd=_0x68cbcb;this[_0x3112bd(0x20e)]['get'](_0x5c4d1b),this['_injector'][_0x3112bd(0x20c)](_0x3c98ab);}},_0x49841d(_0x4b8500['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x47759d),_0x49841d(_0x4b8500[_0x68cbcb(0x217)],_0x68cbcb(0x235),_0x43ff14['UniverInstanceType'][_0x68cbcb(0x22d)]),_0x4b8500['UniverThreadCommentDataSourcePlugin']=_0x283ca0([_0x43ff14[_0x68cbcb(0x264)](_0x315cc2[_0x68cbcb(0x1f0)],_0x410ab3[_0x68cbcb(0x1f9)],_0x3913ca['UniverLicensePlugin']),_0x474611(0x1,_0x43ff14['Inject'](_0x43ff14['Injector'])),_0x474611(0x2,_0x43ff14[_0x68cbcb(0x231)])],_0x4b8500[_0x68cbcb(0x217)]),Object[_0x68cbcb(0x1f5)](_0x4b8500,Symbol[_0x68cbcb(0x23c)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505091607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505091607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505091607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505091607",
|
|
51
|
+
"@univerjs/network": "0.7.0-nightly.202505091607",
|
|
50
52
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
53
|
-
"@univerjs/core": "0.7.0-nightly.202505061607",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505061607"
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505091607",
|
|
54
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505091607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
60
|
"vitest": "^3.1.3",
|
|
61
|
-
"@univerjs-infra/shared": "0.7.0-beta.
|
|
61
|
+
"@univerjs-infra/shared": "0.7.0-beta.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|