@univerjs-pro/thread-comment-datasource 0.11.0-nightly.202511151013 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x3929(_0x4a5190,_0x468ebf){const _0x16fe36=_0x16fe();return _0x3929=function(_0x39290f,_0x574e3e){_0x39290f=_0x39290f-0x1cf;let _0x2faf5d=_0x16fe36[_0x39290f];return _0x2faf5d;},_0x3929(_0x4a5190,_0x468ebf);}const _0x4c0e2b=_0x3929;(function(_0x2879a1,_0x2b15c9){const _0x5177cd=_0x3929,_0x29da6b=_0x2879a1();while(!![]){try{const _0x415c23=parseInt(_0x5177cd(0x21e))/0x1*(parseInt(_0x5177cd(0x1d8))/0x2)+parseInt(_0x5177cd(0x1d0))/0x3+-parseInt(_0x5177cd(0x217))/0x4*(-parseInt(_0x5177cd(0x234))/0x5)+-parseInt(_0x5177cd(0x1f7))/0x6*(parseInt(_0x5177cd(0x1f5))/0x7)+parseInt(_0x5177cd(0x233))/0x8+-parseInt(_0x5177cd(0x210))/0x9+parseInt(_0x5177cd(0x1fc))/0xa*(-parseInt(_0x5177cd(0x1d4))/0xb);if(_0x415c23===_0x2b15c9)break;else _0x29da6b['push'](_0x29da6b['shift']());}catch(_0x895145){_0x29da6b['push'](_0x29da6b['shift']());}}}(_0x16fe,0xd8ecb));Object['defineProperty'](exports,Symbol[_0x4c0e2b(0x245)],{'value':_0x4c0e2b(0x221)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5c7140=>(_0x5c7140[_0x5c7140[_0x4c0e2b(0x1d6)]=0x0]=_0x4c0e2b(0x1d6),_0x5c7140[_0x5c7140[_0x4c0e2b(0x21a)]=0x1]='Solved',_0x5c7140[_0x5c7140['UNRECOGNIZED']=-0x1]=_0x4c0e2b(0x1d1),_0x5c7140))(I||{}),v=(_0x26871f=>(_0x26871f[_0x26871f[_0x4c0e2b(0x22c)]=0x0]='Unknown',_0x26871f[_0x26871f[_0x4c0e2b(0x1ea)]=0x1]=_0x4c0e2b(0x1ea),_0x26871f[_0x26871f[_0x4c0e2b(0x20d)]=0x2]=_0x4c0e2b(0x20d),_0x26871f[_0x26871f['Edit']=0x3]=_0x4c0e2b(0x1e9),_0x26871f[_0x26871f[_0x4c0e2b(0x225)]=0x4]=_0x4c0e2b(0x225),_0x26871f[_0x26871f[_0x4c0e2b(0x1ed)]=0x5]=_0x4c0e2b(0x1ed),_0x26871f[_0x26871f[_0x4c0e2b(0x1d1)]=-0x1]=_0x4c0e2b(0x1d1),_0x26871f))(v||{});const f=_0x15a896=>c[_0x4c0e2b(0x1e1)](new Date(+_0x15a896))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x2946cb,_0x3ef4c6)=>{const _0x4dbce5=_0x4c0e2b,_0x36f1ce=_0x2946cb[_0x4dbce5(0x20f)](c[_0x4dbce5(0x232)]),_0x3e4bae=_0x2946cb['get'](P[_0x4dbce5(0x20c)]);_0x3ef4c6['forEach'](_0x186af0=>{_0x36f1ce['getUser'](_0x186af0)&&_0x3ef4c6['delete'](_0x186af0);}),_0x3ef4c6[_0x4dbce5(0x1f0)]&&(await _0x3e4bae[_0x4dbce5(0x20f)](_0x4dbce5(0x1d7),{'params':{'userIDs':[..._0x3ef4c6]}}))[_0x4dbce5(0x23a)][_0x4dbce5(0x215)][_0x4dbce5(0x246)](_0x3c974a=>{const _0x308f63=_0x4dbce5;_0x3c974a&&_0x36f1ce[_0x308f63(0x1e0)](_0x3c974a);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x25e193,_0x2af2d0,_0x446f18,_0x49c66e)=>{const _0x15b4ad=_0x4c0e2b;for(var _0x46ea8e=_0x49c66e>0x1?void 0x0:_0x49c66e?$(_0x2af2d0,_0x446f18):_0x2af2d0,_0x4b5c27=_0x25e193[_0x15b4ad(0x209)]-0x1,_0x33469c;_0x4b5c27>=0x0;_0x4b5c27--)(_0x33469c=_0x25e193[_0x4b5c27])&&(_0x46ea8e=_0x33469c(_0x46ea8e)||_0x46ea8e);return _0x46ea8e;},S=(_0x54bf04,_0x2cb630)=>(_0x5121a3,_0x277a13)=>_0x2cb630(_0x5121a3,_0x277a13,_0x54bf04);let _=class extends c['Disposable']{constructor(_0x5461f1,_0x320ca4,_0x92cf06,_0x469835){const _0x358a32=_0x4c0e2b;super(),this['_commentService']=_0x5461f1,this['_threadCommentModel']=_0x320ca4,this[_0x358a32(0x206)]=_0x92cf06,this['_injector']=_0x469835,this[_0x358a32(0x1cf)](),this[_0x358a32(0x22b)]();}['_initUserSync'](){const _0x2840e5=_0x4c0e2b;this['disposeWithMe'](this[_0x2840e5(0x213)][_0x2840e5(0x1f6)]['pipe'](j[_0x2840e5(0x22d)](0x10))['subscribe'](_0x590758=>{const _0x362a2a=_0x2840e5,_0x313acf=new Set();_0x590758['forEach'](_0x23d440=>{const _0x26b759=_0x3929;switch(_0x23d440[_0x26b759(0x1e4)]){case'add':{const _0x3a46d6=_0x23d440[_0x26b759(0x1f9)][_0x26b759(0x229)];_0x313acf['add'](_0x3a46d6);break;}}}),R(this[_0x362a2a(0x248)],_0x313acf);}));}['_init'](){const _0x2c40e9=_0x4c0e2b;this[_0x2c40e9(0x212)](this['_commentService']['commentUpdate$'][_0x2c40e9(0x218)](async _0x219f5f=>{const _0x19e983=_0x2c40e9;var _0x27d25f,_0x43f62d,_0x11655b,_0x13f68b;const _0xa1996a=(_0x27d25f=this[_0x19e983(0x213)][_0x19e983(0x200)](_0x219f5f[_0x19e983(0x219)])[_0x19e983(0x216)](_0x1b3a1f=>_0x1b3a1f[_0x19e983(0x21b)]===_0x219f5f[_0x19e983(0x21b)]))==null?void 0x0:_0x27d25f[_0x19e983(0x208)];if(!_0xa1996a)return;const {unitId:_0xc69ed1,subUnitId:_0x2cdb70}=_0xa1996a;switch(_0x219f5f[_0x19e983(0x1fe)]&&this['_userService'][_0x19e983(0x1e0)](_0x219f5f[_0x19e983(0x1fe)]),_0x219f5f['type']){case v[_0x19e983(0x1ea)]:break;case v[_0x19e983(0x20d)]:{this[_0x19e983(0x213)][_0x19e983(0x1ef)](_0xc69ed1,_0x2cdb70,{'unitId':_0xc69ed1,'subUnitId':_0x2cdb70,'ref':'','id':_0x219f5f[_0x19e983(0x20b)],'dT':f(+_0x219f5f['createTimestamp']),'threadId':_0x219f5f['threadId'],'personId':(_0x11655b=(_0x43f62d=_0x219f5f[_0x19e983(0x1fe)])==null?void 0x0:_0x43f62d[_0x19e983(0x236)])!=null?_0x11655b:_0x219f5f['userId'],'text':JSON[_0x19e983(0x239)](_0x219f5f[_0x19e983(0x211)]),'parentId':_0xa1996a['id']});break;}case v[_0x19e983(0x225)]:{const _0x56ad78=this[_0x19e983(0x213)][_0x19e983(0x231)](_0xc69ed1,_0x2cdb70,_0x219f5f[_0x19e983(0x20b)]);_0x56ad78&&_0x56ad78[_0x19e983(0x21d)]&&this[_0x19e983(0x213)][_0x19e983(0x1e3)](_0xc69ed1,_0x2cdb70,_0x219f5f[_0x19e983(0x20b)]);break;}case v[_0x19e983(0x1e9)]:{this[_0x19e983(0x213)][_0x19e983(0x1f2)](_0xc69ed1,_0x2cdb70,{'commentId':_0x219f5f[_0x19e983(0x20b)],'text':JSON[_0x19e983(0x239)](_0x219f5f[_0x19e983(0x211)])});break;}case v[_0x19e983(0x1ed)]:{const _0x2d8748=(_0x13f68b=this[_0x19e983(0x213)][_0x19e983(0x200)](_0x219f5f[_0x19e983(0x219)])[_0x19e983(0x216)](_0x3230b7=>_0x3230b7[_0x19e983(0x21b)]===_0x219f5f[_0x19e983(0x21b)]))==null?void 0x0:_0x13f68b[_0x19e983(0x208)];_0x2d8748&&this[_0x19e983(0x213)][_0x19e983(0x21f)](_0xc69ed1,_0x2cdb70,_0x2d8748['id'],_0x219f5f[_0x19e983(0x23b)]===I[_0x19e983(0x21a)]);break;}}}));}};_=E([S(0x0,c[_0x4c0e2b(0x237)](b[_0x4c0e2b(0x23d)])),S(0x1,c[_0x4c0e2b(0x237)](M[_0x4c0e2b(0x1f3)])),S(0x2,c[_0x4c0e2b(0x237)](c[_0x4c0e2b(0x232)])),S(0x3,c['Inject'](c[_0x4c0e2b(0x238)]))],_);const q=_0x4c0e2b(0x202),D={};var A=Object[_0x4c0e2b(0x22a)],x=(_0x2ba3ea,_0x15bde7,_0x4ead36,_0x462eb8)=>{const _0x3a72fe=_0x4c0e2b;for(var _0x1b859f=_0x462eb8>0x1?void 0x0:_0x462eb8?A(_0x15bde7,_0x4ead36):_0x15bde7,_0x55eb8d=_0x2ba3ea[_0x3a72fe(0x209)]-0x1,_0x3644e9;_0x55eb8d>=0x0;_0x55eb8d--)(_0x3644e9=_0x2ba3ea[_0x55eb8d])&&(_0x1b859f=_0x3644e9(_0x1b859f)||_0x1b859f);return _0x1b859f;},C=(_0x28ca8b,_0x3d5673)=>(_0x55167b,_0x5bda9a)=>_0x3d5673(_0x55167b,_0x5bda9a,_0x28ca8b);function Y(_0x12fd34,_0x26f255){const _0x46aa4c=_0x4c0e2b,_0x5ea383=_0x12fd34[_0x46aa4c(0x1d2)][0x0];return{..._0x26f255,'id':_0x5ea383['replyId'],'resolved':_0x12fd34[_0x46aa4c(0x23b)]===0x1,'dT':f(_0x5ea383[_0x46aa4c(0x23e)]),'personId':_0x5ea383['userId'],'threadId':_0x5ea383[_0x46aa4c(0x21b)]};}function G(_0x569936,_0x21fc35,_0x36b524){const _0x5e1474=_0x4c0e2b;var _0x423b9d,_0x277b78;if(((_0x277b78=(_0x423b9d=_0x569936==null?void 0x0:_0x569936[_0x5e1474(0x1d2)])==null?void 0x0:_0x423b9d[_0x5e1474(0x209)])!=null?_0x277b78:0x0)>0x0){const _0xf6c5e2=(_0x5ee531,_0x5719cd)=>({'id':_0x5ee531[_0x5e1474(0x20b)],'threadId':_0x5ee531[_0x5e1474(0x21b)],'dT':f(_0x5ee531[_0x5e1474(0x23e)]),'personId':_0x5ee531['userId'],'resolved':_0x569936[_0x5e1474(0x23b)]===I[_0x5e1474(0x21a)],'unitId':_0x21fc35,'subUnitId':_0x36b524,'text':JSON['parse'](_0x5ee531[_0x5e1474(0x211)]),'parentId':_0x5719cd}),_0x25939d=_0xf6c5e2(_0x569936[_0x5e1474(0x1d2)][0x0]);return{..._0x25939d,'children':_0x569936['replies'][_0x5e1474(0x226)](0x1)[_0x5e1474(0x214)](_0x3f7990=>_0xf6c5e2(_0x3f7990,_0x25939d['id']))};}return null;}let p=class{constructor(_0x1e5210,_0x3fc54b,_0x2419b7){const _0x3537ef=_0x4c0e2b;this[_0x3537ef(0x203)]=_0x1e5210,this[_0x3537ef(0x206)]=_0x3fc54b,this['_sessionService']=_0x2419b7;}async[_0x4c0e2b(0x1ef)](_0x4ec5ab){const _0x4b4c93=_0x4c0e2b;var _0xe51ee0,_0x5b135e;const {parentId:_0x382996,unitId:_0x267422,text:_0x5d03a1,threadId:_0x21c17b}=_0x4ec5ab,_0x4799b4=(_0x5b135e=(_0xe51ee0=_0x5d03a1[_0x4b4c93(0x22f)])==null?void 0x0:_0xe51ee0[_0x4b4c93(0x22e)](_0x28d825=>_0x28d825[_0x4b4c93(0x1fb)]===c['CustomRangeType']['COMMENT'])[_0x4b4c93(0x214)](_0x709102=>_0x709102[_0x4b4c93(0x1dc)]))!=null?_0x5b135e:[],_0x216ec0=JSON['stringify'](_0x5d03a1),_0xa19014=(await this[_0x4b4c93(0x1f1)][_0x4b4c93(0x241)](_0x267422))[_0x4b4c93(0x244)]();if(_0x382996){const _0x4793dd={'memberId':_0xa19014,'unitId':_0x267422,'content':_0x216ec0,'mention':_0x4799b4,'threadId':_0x21c17b},_0x5b60f7=(await this[_0x4b4c93(0x203)][_0x4b4c93(0x1d5)](_0x4b4c93(0x1ff)+_0x267422+_0x4b4c93(0x1d9),{'body':_0x4793dd}))[_0x4b4c93(0x23a)][_0x4b4c93(0x220)];return{..._0x4ec5ab,'id':_0x5b60f7[_0x4b4c93(0x20b)],'dT':c['dayjs'](+_0x5b60f7[_0x4b4c93(0x23e)])[_0x4b4c93(0x1e2)](_0x4b4c93(0x1f4)),'personId':_0x5b60f7[_0x4b4c93(0x1de)]};}else{const _0x1b71f8={'memberId':_0xa19014,'unitId':_0x267422,'content':_0x216ec0,'mention':_0x4799b4},_0x3041ee=await this[_0x4b4c93(0x203)][_0x4b4c93(0x1d5)](_0x4b4c93(0x1ff)+_0x267422+'/add',{'body':_0x1b71f8});return Y(_0x3041ee['body']['comment'],_0x4ec5ab);}}async[_0x4c0e2b(0x1f2)](_0x3a14b8){const _0x84774e=_0x4c0e2b;var _0x490c0b,_0x382946;const {text:_0x1fe789,unitId:_0x56e78d}=_0x3a14b8,_0x357d79=(_0x382946=(_0x490c0b=_0x1fe789[_0x84774e(0x22f)])==null?void 0x0:_0x490c0b['filter'](_0x18e436=>_0x18e436[_0x84774e(0x1fb)]===c[_0x84774e(0x1d3)]['COMMENT'])[_0x84774e(0x214)](_0x19cc00=>_0x19cc00[_0x84774e(0x1dc)]))!=null?_0x382946:[],_0x323724=JSON[_0x84774e(0x1ec)](_0x1fe789),_0x30dc76=_0x3a14b8[_0x84774e(0x21b)],_0x53c594=_0x3a14b8['id'],_0x3cc293={'memberId':(await this['_sessionService'][_0x84774e(0x241)](_0x56e78d))[_0x84774e(0x244)](),'unitId':_0x56e78d,'threadId':_0x30dc76,'mention':_0x357d79,'content':_0x323724,'replyId':_0x53c594},_0x457bb4=await this[_0x84774e(0x203)]['post'](_0x84774e(0x1ff)+_0x56e78d+_0x84774e(0x1f8),{'body':_0x3cc293});return!_0x457bb4[_0x84774e(0x23a)][_0x84774e(0x1e7)]||_0x457bb4[_0x84774e(0x23a)][_0x84774e(0x1e7)][_0x84774e(0x1eb)]===0x1;}async[_0x4c0e2b(0x21f)](_0x28dc99){const _0x712bd8=_0x4c0e2b,{unitId:_0x1d4feb}=_0x28dc99,_0x352f1f=_0x28dc99['threadId'],_0x1ac2a4={'memberId':this[_0x712bd8(0x206)]['getCurrentUser']()[_0x712bd8(0x236)],'unitId':_0x1d4feb,'threadId':_0x352f1f,'solved':_0x28dc99[_0x712bd8(0x201)]?I['Solved']:I[_0x712bd8(0x1d6)]},_0x26519f=await this[_0x712bd8(0x203)][_0x712bd8(0x1d5)](_0x712bd8(0x1ff)+_0x1d4feb+_0x712bd8(0x20e),{'body':_0x1ac2a4});return!_0x26519f['body'][_0x712bd8(0x1e7)]||_0x26519f[_0x712bd8(0x23a)][_0x712bd8(0x1e7)]['code']===0x1;}async['deleteComment'](_0x1e5fae,_0x246e6e,_0x5e3174,_0x30a496){const _0x33c193=_0x4c0e2b,_0x36d590={'memberId':(await this[_0x33c193(0x1f1)][_0x33c193(0x241)](_0x1e5fae))[_0x33c193(0x244)](),'threadId':_0x5e3174,'replyId':_0x30a496,'unitId':_0x1e5fae},_0x791b52=await this['_httpService'][_0x33c193(0x1d5)]('/universer-api/comment/unit/'+_0x1e5fae+_0x33c193(0x1dd),{'body':_0x36d590});return!_0x791b52[_0x33c193(0x23a)][_0x33c193(0x1e7)]||_0x791b52['body'][_0x33c193(0x1e7)][_0x33c193(0x1eb)]===0x1;}async[_0x4c0e2b(0x1e5)](_0x1bc744,_0xfd1dff,_0x417ed8){const _0x35ef97=_0x4c0e2b,_0x22b1f0={'unitId':_0x1bc744,'threadId':_0x417ed8},_0x4d099d=await this[_0x35ef97(0x203)]['post']('/universer-api/comment/unit/'+_0x1bc744+'/list',{'body':_0x22b1f0}),_0x41cec0=_0x417ed8[_0x35ef97(0x214)](_0x16ae9b=>G(_0x4d099d['body']['comments'][_0x16ae9b],_0x1bc744,_0xfd1dff))[_0x35ef97(0x22e)](Boolean);return Object[_0x35ef97(0x1fd)](_0x4d099d[_0x35ef97(0x23a)][_0x35ef97(0x215)])['forEach'](_0x52682c=>{const _0x2d44ab=_0x35ef97;this[_0x2d44ab(0x206)][_0x2d44ab(0x1e0)](_0x52682c);}),_0x41cec0;}[_0x4c0e2b(0x21c)](_0x4a2108){const _0x4786ba=_0x4c0e2b;return{'id':_0x4a2108['id'],'threadId':_0x4a2108[_0x4786ba(0x21b)],'ref':_0x4a2108[_0x4786ba(0x204)]};}};p=x([C(0x0,c[_0x4c0e2b(0x237)](P[_0x4c0e2b(0x20c)])),C(0x1,c[_0x4c0e2b(0x237)](c[_0x4c0e2b(0x232)])),C(0x2,c[_0x4c0e2b(0x237)](b[_0x4c0e2b(0x1ee)]))],p);var H=Object[_0x4c0e2b(0x22a)],J=(_0x25b418,_0x6c87e9,_0x27f196,_0x47c1e6)=>{const _0x3bec1e=_0x4c0e2b;for(var _0x5e8b19=_0x47c1e6>0x1?void 0x0:_0x47c1e6?H(_0x6c87e9,_0x27f196):_0x6c87e9,_0x9abe2e=_0x25b418[_0x3bec1e(0x209)]-0x1,_0x37d311;_0x9abe2e>=0x0;_0x9abe2e--)(_0x37d311=_0x25b418[_0x9abe2e])&&(_0x5e8b19=_0x37d311(_0x5e8b19)||_0x5e8b19);return _0x5e8b19;},y=(_0x55c744,_0x52ec19)=>(_0x2fe0ce,_0x537c18)=>_0x52ec19(_0x2fe0ce,_0x537c18,_0x55c744);let g=class extends c['Disposable']{constructor(_0x561a39,_0x53d430){const _0x2c92b5=_0x4c0e2b;super(),this[_0x2c92b5(0x1df)]=_0x561a39,this[_0x2c92b5(0x228)]=_0x53d430,this[_0x2c92b5(0x205)]();}['_initDataSource'](){const _0x2cc81e=_0x4c0e2b;this[_0x2cc81e(0x1df)][_0x2cc81e(0x247)]=this[_0x2cc81e(0x228)],this['_threadCommentDataSourceService'][_0x2cc81e(0x224)]=!0x1;}};g=J([y(0x0,M[_0x4c0e2b(0x207)]),y(0x1,c[_0x4c0e2b(0x237)](p))],g);var F=Object[_0x4c0e2b(0x222)],L=Object['getOwnPropertyDescriptor'],Z=(_0xccb895,_0x1686c0,_0x56a043)=>_0x1686c0 in _0xccb895?F(_0xccb895,_0x1686c0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56a043}):_0xccb895[_0x1686c0]=_0x56a043,W=(_0x3d7a6c,_0x3db576,_0x3907b9,_0x5ddc96)=>{const _0xfffc76=_0x4c0e2b;for(var _0x2360b4=_0x5ddc96>0x1?void 0x0:_0x5ddc96?L(_0x3db576,_0x3907b9):_0x3db576,_0x47681d=_0x3d7a6c[_0xfffc76(0x209)]-0x1,_0x874bd;_0x47681d>=0x0;_0x47681d--)(_0x874bd=_0x3d7a6c[_0x47681d])&&(_0x2360b4=_0x874bd(_0x2360b4)||_0x2360b4);return _0x2360b4;},O=(_0x565630,_0x5dc1f7)=>(_0x261c6b,_0x1a27bd)=>_0x5dc1f7(_0x261c6b,_0x1a27bd,_0x565630),N=(_0x10e281,_0xd75ee7,_0x5d7282)=>Z(_0x10e281,typeof _0xd75ee7!=_0x4c0e2b(0x1e8)?_0xd75ee7+'':_0xd75ee7,_0x5d7282);function _0x16fe(){const _0x222d23=['Injector','parse','body','solved','UniverInstanceType','CommentService','createTimestamp','add','_config','requireSession','setConfig','UniverLicensePlugin','getMemberID','toStringTag','forEach','dataSource','_injector','_init','3487806ZddIlL','UNRECOGNIZED','replies','CustomRangeType','410014LcFqfl','post','OpenOrReOpen','/universer-api/user/list','1046DyoroF','/reply','_configService','IConfigService','rangeId','/delete','userId','_threadCommentDataSourceService','addUser','dayjs','format','deleteComment','type','listComments','Plugin','error','symbol','Edit','Add','code','stringify','Solve','CollaborationSessionService','addComment','size','_sessionService','updateComment','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','7fGdtpM','commentUpdate$','8726754rXaAKO','/edit','payload','merge','rangeType','510FPwVWn','values','user','/universer-api/comment/unit/','getUnit','resolved','thread-comment-data-source.config','_httpService','ref','_initDataSource','_userService','IThreadCommentDataSourceService','root','length','onReady','replyId','HTTPService','Reply','/solved','get','11306826AtIgoZ','content','disposeWithMe','_threadCommentModel','map','users','find','16988ljNDrG','subscribe','unitId','Solved','threadId','saveCommentToSnapshot','parentId','1753MMFSpY','resolveComment','reply','Module','defineProperty','UniverCollaborationClientPlugin','syncUpdateMutationToColla','Delete','slice','UniverThreadCommentUIPlugin','_threadCommentDataSource','personId','getOwnPropertyDescriptor','_initUserSync','Unknown','bufferTime','filter','customRanges','UniverThreadCommentDataSourcePlugin','getComment','UserManagerService','14150128tbFMHS','1945snekNB','onStarting','userID','Inject'];_0x16fe=function(){return _0x222d23;};return _0x16fe();}exports[_0x4c0e2b(0x230)]=class extends c[_0x4c0e2b(0x1e6)]{constructor(_0x265896=D,_0x15f22d,_0x43e05e){const _0x52825a=_0x4c0e2b;super(),this[_0x52825a(0x240)]=_0x265896,this[_0x52825a(0x248)]=_0x15f22d,this[_0x52825a(0x1da)]=_0x43e05e;const {..._0x2d5312}=c[_0x52825a(0x1fa)]({},D,this[_0x52825a(0x240)]);this[_0x52825a(0x1da)][_0x52825a(0x242)](q,_0x2d5312);}[_0x4c0e2b(0x235)](){const _0x117032=_0x4c0e2b;[[p],[g],[_]][_0x117032(0x246)](_0x234071=>{const _0x41e788=_0x117032;this[_0x41e788(0x248)][_0x41e788(0x23f)](_0x234071);});}[_0x4c0e2b(0x20a)](){const _0x365aef=_0x4c0e2b;this['_injector'][_0x365aef(0x20f)](g),this[_0x365aef(0x248)]['get'](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x4c0e2b(0x230)],_0x4c0e2b(0x1e4),c[_0x4c0e2b(0x23c)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x4c0e2b(0x227)],b[_0x4c0e2b(0x223)],T[_0x4c0e2b(0x243)]),O(0x1,c[_0x4c0e2b(0x237)](c[_0x4c0e2b(0x238)])),O(0x2,c[_0x4c0e2b(0x1db)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x195db3=_0x258e;(function(_0x2e4ebd,_0x3036ff){const _0x45239d=_0x258e,_0x419b52=_0x2e4ebd();while(!![]){try{const _0x2e468d=parseInt(_0x45239d(0x189))/0x1*(parseInt(_0x45239d(0x14e))/0x2)+parseInt(_0x45239d(0x186))/0x3+-parseInt(_0x45239d(0x179))/0x4*(-parseInt(_0x45239d(0x19b))/0x5)+-parseInt(_0x45239d(0x185))/0x6+parseInt(_0x45239d(0x15a))/0x7*(parseInt(_0x45239d(0x1ac))/0x8)+-parseInt(_0x45239d(0x19a))/0x9*(parseInt(_0x45239d(0x178))/0xa)+-parseInt(_0x45239d(0x14d))/0xb;if(_0x2e468d===_0x3036ff)break;else _0x419b52['push'](_0x419b52['shift']());}catch(_0x6d2cd0){_0x419b52['push'](_0x419b52['shift']());}}}(_0x542b,0x9223d));function _0x258e(_0x456c8e,_0x532c97){const _0x542b55=_0x542b();return _0x258e=function(_0x258e82,_0x2c7676){_0x258e82=_0x258e82-0x135;let _0x57b794=_0x542b55[_0x258e82];return _0x57b794;},_0x258e(_0x456c8e,_0x532c97);}Object[_0x195db3(0x16f)](exports,Symbol[_0x195db3(0x147)],{'value':_0x195db3(0x144)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x195db3(0x148);var I=(_0x24fdd8=>(_0x24fdd8[_0x24fdd8['OpenOrReOpen']=0x0]=_0x195db3(0x192),_0x24fdd8[_0x24fdd8['Solved']=0x1]=_0x195db3(0x18b),_0x24fdd8[_0x24fdd8[_0x195db3(0x1aa)]=-0x1]=_0x195db3(0x1aa),_0x24fdd8))(I||{}),v=(_0x20ac03=>(_0x20ac03[_0x20ac03[_0x195db3(0x193)]=0x0]=_0x195db3(0x193),_0x20ac03[_0x20ac03[_0x195db3(0x15b)]=0x1]='Add',_0x20ac03[_0x20ac03[_0x195db3(0x199)]=0x2]=_0x195db3(0x199),_0x20ac03[_0x20ac03[_0x195db3(0x136)]=0x3]=_0x195db3(0x136),_0x20ac03[_0x20ac03[_0x195db3(0x160)]=0x4]=_0x195db3(0x160),_0x20ac03[_0x20ac03[_0x195db3(0x14b)]=0x5]=_0x195db3(0x14b),_0x20ac03[_0x20ac03['UNRECOGNIZED']=-0x1]=_0x195db3(0x1aa),_0x20ac03))(v||{});const f=_0x3fcec2=>c[_0x195db3(0x16b)](new Date(+_0x3fcec2))[_0x195db3(0x19c)](_0x195db3(0x17e)),R=async(_0x42a7de,_0x26304c)=>{const _0x1f130f=_0x195db3,_0x2aa132=_0x42a7de['get'](c[_0x1f130f(0x159)]),_0x1801da=_0x42a7de['get'](P[_0x1f130f(0x18d)]);_0x26304c[_0x1f130f(0x13c)](_0x5baac6=>{const _0x4bcbe5=_0x1f130f;_0x2aa132[_0x4bcbe5(0x139)](_0x5baac6)&&_0x26304c[_0x4bcbe5(0x151)](_0x5baac6);}),_0x26304c[_0x1f130f(0x1a1)]&&(await _0x1801da[_0x1f130f(0x17a)](_0x1f130f(0x17d),{'params':{'userIDs':[..._0x26304c]}}))[_0x1f130f(0x182)]['users']['forEach'](_0x3bccdf=>{const _0x50bf63=_0x1f130f;_0x3bccdf&&_0x2aa132[_0x50bf63(0x154)](_0x3bccdf);});};var $=Object[_0x195db3(0x1a4)],E=(_0xc00abc,_0x43ea9e,_0x4c9946,_0x1d084c)=>{for(var _0x356bdb=_0x1d084c>0x1?void 0x0:_0x1d084c?$(_0x43ea9e,_0x4c9946):_0x43ea9e,_0x1c155a=_0xc00abc['length']-0x1,_0x20f7c2;_0x1c155a>=0x0;_0x1c155a--)(_0x20f7c2=_0xc00abc[_0x1c155a])&&(_0x356bdb=_0x20f7c2(_0x356bdb)||_0x356bdb);return _0x356bdb;},S=(_0x2c93b0,_0x22ff17)=>(_0x34a120,_0x159b84)=>_0x22ff17(_0x34a120,_0x159b84,_0x2c93b0);let _=class extends c[_0x195db3(0x172)]{constructor(_0x576af9,_0x1c8f41,_0x5c80a9,_0x4283cc){const _0x4db075=_0x195db3;super(),this[_0x4db075(0x15d)]=_0x576af9,this[_0x4db075(0x16a)]=_0x1c8f41,this['_userService']=_0x5c80a9,this[_0x4db075(0x162)]=_0x4283cc,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0xbeb649=_0x195db3;this[_0xbeb649(0x1ae)](this['_threadCommentModel'][_0xbeb649(0x168)][_0xbeb649(0x167)](j[_0xbeb649(0x1a7)](0x10))[_0xbeb649(0x16c)](_0x1367f5=>{const _0x379813=_0xbeb649,_0x3febad=new Set();_0x1367f5[_0x379813(0x13c)](_0x38376d=>{const _0x2275d8=_0x379813;switch(_0x38376d[_0x2275d8(0x145)]){case'add':{const _0x5238c3=_0x38376d[_0x2275d8(0x150)][_0x2275d8(0x141)];_0x3febad['add'](_0x5238c3);break;}}}),R(this['_injector'],_0x3febad);}));}[_0x195db3(0x177)](){const _0x37f1a3=_0x195db3;this['disposeWithMe'](this['_commentService'][_0x37f1a3(0x168)][_0x37f1a3(0x16c)](async _0x53722f=>{const _0x21fe98=_0x37f1a3;var _0x2a0162,_0x3986d9,_0xe8d305,_0x66369b;const _0x23eb41=(_0x2a0162=this['_threadCommentModel'][_0x21fe98(0x18a)](_0x53722f[_0x21fe98(0x163)])['find'](_0x502ddd=>_0x502ddd['threadId']===_0x53722f[_0x21fe98(0x169)]))==null?void 0x0:_0x2a0162[_0x21fe98(0x190)];if(!_0x23eb41)return;const {unitId:_0x6fb230,subUnitId:_0x32e0d3}=_0x23eb41;switch(_0x53722f['user']&&this[_0x21fe98(0x1a3)][_0x21fe98(0x154)](_0x53722f[_0x21fe98(0x195)]),_0x53722f[_0x21fe98(0x145)]){case v[_0x21fe98(0x15b)]:break;case v[_0x21fe98(0x199)]:{this[_0x21fe98(0x16a)][_0x21fe98(0x196)](_0x6fb230,_0x32e0d3,{'unitId':_0x6fb230,'subUnitId':_0x32e0d3,'ref':'','id':_0x53722f[_0x21fe98(0x171)],'dT':f(+_0x53722f[_0x21fe98(0x149)]),'threadId':_0x53722f[_0x21fe98(0x169)],'personId':(_0xe8d305=(_0x3986d9=_0x53722f[_0x21fe98(0x195)])==null?void 0x0:_0x3986d9[_0x21fe98(0x146)])!=null?_0xe8d305:_0x53722f[_0x21fe98(0x13d)],'text':JSON[_0x21fe98(0x15c)](_0x53722f[_0x21fe98(0x176)]),'parentId':_0x23eb41['id']});break;}case v['Delete']:{const _0x1fd165=this[_0x21fe98(0x16a)]['getComment'](_0x6fb230,_0x32e0d3,_0x53722f['replyId']);_0x1fd165&&_0x1fd165['parentId']&&this[_0x21fe98(0x16a)][_0x21fe98(0x13f)](_0x6fb230,_0x32e0d3,_0x53722f[_0x21fe98(0x171)]);break;}case v[_0x21fe98(0x136)]:{this['_threadCommentModel'][_0x21fe98(0x143)](_0x6fb230,_0x32e0d3,{'commentId':_0x53722f['replyId'],'text':JSON[_0x21fe98(0x15c)](_0x53722f['content'])});break;}case v[_0x21fe98(0x14b)]:{const _0x56b272=(_0x66369b=this[_0x21fe98(0x16a)]['getUnit'](_0x53722f[_0x21fe98(0x163)])[_0x21fe98(0x161)](_0x4368ae=>_0x4368ae['threadId']===_0x53722f[_0x21fe98(0x169)]))==null?void 0x0:_0x66369b[_0x21fe98(0x190)];_0x56b272&&this[_0x21fe98(0x16a)][_0x21fe98(0x19e)](_0x6fb230,_0x32e0d3,_0x56b272['id'],_0x53722f['solved']===I[_0x21fe98(0x18b)]);break;}}}));}};_=E([S(0x0,c[_0x195db3(0x135)](b[_0x195db3(0x13b)])),S(0x1,c[_0x195db3(0x135)](M[_0x195db3(0x1a9)])),S(0x2,c[_0x195db3(0x135)](c[_0x195db3(0x159)])),S(0x3,c[_0x195db3(0x135)](c['Injector']))],_);const q=_0x195db3(0x16e),D={};function _0x542b(){const _0x2d24bb=['subscribe','customRanges','thread-comment-data-source.config','defineProperty','CollaborationSessionService','replyId','Disposable','listComments','COMMENT','comment','content','_init','4850jTKrgN','3644uZGjjR','get','error','dataSource','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','ref','syncUpdateMutationToColla','reply','body','saveCommentToSnapshot','replies','5834784YUodIV','2832624DBQdHp','_initDataSource','users','775805JbSnnE','getUnit','Solved','/add','HTTPService','rangeId','map','root','onStarting','OpenOrReOpen','Unknown','stringify','user','addComment','slice','_threadCommentDataSourceService','Reply','8793YdaqYX','1175mLAJso','format','_threadCommentDataSource','resolveComment','_httpService','filter','size','code','_userService','getOwnPropertyDescriptor','_configService','IThreadCommentDataSourceService','bufferTime','_sessionService','ThreadCommentModel','UNRECOGNIZED','/edit','208lrZiVf','requireSession','disposeWithMe','onReady','rangeType','Inject','Edit','solved','/reply','getUser','resolved','CommentService','forEach','userId','merge','deleteComment','pluginName','personId','length','updateComment','Module','type','userID','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','Injector','Solve','/universer-api/comment/unit/','6475172frenTZ','2zfPPco','_config','payload','delete','getMemberID','setConfig','addUser','Plugin','UniverLicensePlugin','/list','post','UserManagerService','188314gYbJqQ','Add','parse','_commentService','UniverThreadCommentDataSourcePlugin','values','Delete','find','_injector','unitId','CustomRangeType','DependentOn','add','pipe','commentUpdate$','threadId','_threadCommentModel','dayjs'];_0x542b=function(){return _0x2d24bb;};return _0x542b();}var A=Object[_0x195db3(0x1a4)],x=(_0x2b5ce1,_0x552725,_0x59c638,_0x1a68e4)=>{const _0x5b1e91=_0x195db3;for(var _0x1bbb13=_0x1a68e4>0x1?void 0x0:_0x1a68e4?A(_0x552725,_0x59c638):_0x552725,_0x54db8d=_0x2b5ce1[_0x5b1e91(0x142)]-0x1,_0x5a02d8;_0x54db8d>=0x0;_0x54db8d--)(_0x5a02d8=_0x2b5ce1[_0x54db8d])&&(_0x1bbb13=_0x5a02d8(_0x1bbb13)||_0x1bbb13);return _0x1bbb13;},C=(_0x2aa6ff,_0x35fc84)=>(_0x3347fe,_0xcca97b)=>_0x35fc84(_0x3347fe,_0xcca97b,_0x2aa6ff);function Y(_0x21be45,_0x2905f5){const _0x5913f8=_0x195db3,_0x5cf8ce=_0x21be45[_0x5913f8(0x184)][0x0];return{..._0x2905f5,'id':_0x5cf8ce['replyId'],'resolved':_0x21be45[_0x5913f8(0x137)]===0x1,'dT':f(_0x5cf8ce[_0x5913f8(0x149)]),'personId':_0x5cf8ce['userId'],'threadId':_0x5cf8ce['threadId']};}function G(_0x2cb4bb,_0xe75564,_0x4d262c){const _0x5601d2=_0x195db3;var _0xb9406d,_0x4f6325;if(((_0x4f6325=(_0xb9406d=_0x2cb4bb==null?void 0x0:_0x2cb4bb[_0x5601d2(0x184)])==null?void 0x0:_0xb9406d[_0x5601d2(0x142)])!=null?_0x4f6325:0x0)>0x0){const _0x2899a5=(_0x175f0a,_0x4fa2f7)=>({'id':_0x175f0a[_0x5601d2(0x171)],'threadId':_0x175f0a[_0x5601d2(0x169)],'dT':f(_0x175f0a['createTimestamp']),'personId':_0x175f0a[_0x5601d2(0x13d)],'resolved':_0x2cb4bb[_0x5601d2(0x137)]===I[_0x5601d2(0x18b)],'unitId':_0xe75564,'subUnitId':_0x4d262c,'text':JSON[_0x5601d2(0x15c)](_0x175f0a['content']),'parentId':_0x4fa2f7}),_0x1f5141=_0x2899a5(_0x2cb4bb[_0x5601d2(0x184)][0x0]);return{..._0x1f5141,'children':_0x2cb4bb[_0x5601d2(0x184)][_0x5601d2(0x197)](0x1)['map'](_0x373122=>_0x2899a5(_0x373122,_0x1f5141['id']))};}return null;}let p=class{constructor(_0x5584d6,_0x3cec69,_0x5c5b4d){const _0x557221=_0x195db3;this[_0x557221(0x19f)]=_0x5584d6,this[_0x557221(0x1a3)]=_0x3cec69,this['_sessionService']=_0x5c5b4d;}async[_0x195db3(0x196)](_0x35bf60){const _0x44be90=_0x195db3;var _0x373af9,_0x29f677;const {parentId:_0x40e44d,unitId:_0x401325,text:_0x4c484d,threadId:_0x263dca}=_0x35bf60,_0x4b9268=(_0x29f677=(_0x373af9=_0x4c484d[_0x44be90(0x16d)])==null?void 0x0:_0x373af9[_0x44be90(0x1a0)](_0x198e77=>_0x198e77[_0x44be90(0x1b0)]===c[_0x44be90(0x164)][_0x44be90(0x174)])[_0x44be90(0x18f)](_0x169ca0=>_0x169ca0[_0x44be90(0x18e)]))!=null?_0x29f677:[],_0x1da5c1=JSON[_0x44be90(0x194)](_0x4c484d),_0x441f9d=(await this[_0x44be90(0x1a8)][_0x44be90(0x1ad)](_0x401325))[_0x44be90(0x152)]();if(_0x40e44d){const _0xda83d2={'memberId':_0x441f9d,'unitId':_0x401325,'content':_0x1da5c1,'mention':_0x4b9268,'threadId':_0x263dca},_0x493ac9=(await this[_0x44be90(0x19f)][_0x44be90(0x158)](_0x44be90(0x14c)+_0x401325+_0x44be90(0x138),{'body':_0xda83d2}))[_0x44be90(0x182)][_0x44be90(0x181)];return{..._0x35bf60,'id':_0x493ac9[_0x44be90(0x171)],'dT':c['dayjs'](+_0x493ac9[_0x44be90(0x149)])[_0x44be90(0x19c)](_0x44be90(0x17e)),'personId':_0x493ac9[_0x44be90(0x13d)]};}else{const _0x564395={'memberId':_0x441f9d,'unitId':_0x401325,'content':_0x1da5c1,'mention':_0x4b9268},_0x2a819a=await this[_0x44be90(0x19f)][_0x44be90(0x158)](_0x44be90(0x14c)+_0x401325+_0x44be90(0x18c),{'body':_0x564395});return Y(_0x2a819a[_0x44be90(0x182)][_0x44be90(0x175)],_0x35bf60);}}async[_0x195db3(0x143)](_0x1a6277){const _0xf31879=_0x195db3;var _0x1e0c15,_0x404a33;const {text:_0x27a8ad,unitId:_0x6050b5}=_0x1a6277,_0x7d6f7b=(_0x404a33=(_0x1e0c15=_0x27a8ad[_0xf31879(0x16d)])==null?void 0x0:_0x1e0c15[_0xf31879(0x1a0)](_0x34d9e4=>_0x34d9e4[_0xf31879(0x1b0)]===c[_0xf31879(0x164)][_0xf31879(0x174)])['map'](_0x38b5e3=>_0x38b5e3[_0xf31879(0x18e)]))!=null?_0x404a33:[],_0x182f70=JSON[_0xf31879(0x194)](_0x27a8ad),_0x1228ce=_0x1a6277[_0xf31879(0x169)],_0x4e565b=_0x1a6277['id'],_0x22c37d={'memberId':(await this[_0xf31879(0x1a8)][_0xf31879(0x1ad)](_0x6050b5))[_0xf31879(0x152)](),'unitId':_0x6050b5,'threadId':_0x1228ce,'mention':_0x7d6f7b,'content':_0x182f70,'replyId':_0x4e565b},_0x4f8fc6=await this[_0xf31879(0x19f)]['post'](_0xf31879(0x14c)+_0x6050b5+_0xf31879(0x1ab),{'body':_0x22c37d});return!_0x4f8fc6[_0xf31879(0x182)][_0xf31879(0x17b)]||_0x4f8fc6['body']['error'][_0xf31879(0x1a2)]===0x1;}async[_0x195db3(0x19e)](_0x59ff42){const _0x516013=_0x195db3,{unitId:_0x160e1f}=_0x59ff42,_0x1ceb84=_0x59ff42[_0x516013(0x169)],_0x26103e={'memberId':this[_0x516013(0x1a3)]['getCurrentUser']()['userID'],'unitId':_0x160e1f,'threadId':_0x1ceb84,'solved':_0x59ff42[_0x516013(0x13a)]?I[_0x516013(0x18b)]:I[_0x516013(0x192)]},_0x58d704=await this[_0x516013(0x19f)][_0x516013(0x158)](_0x516013(0x14c)+_0x160e1f+'/solved',{'body':_0x26103e});return!_0x58d704[_0x516013(0x182)][_0x516013(0x17b)]||_0x58d704[_0x516013(0x182)][_0x516013(0x17b)][_0x516013(0x1a2)]===0x1;}async[_0x195db3(0x13f)](_0xdf98aa,_0x1378cf,_0x4d3b8e,_0xb1038c){const _0x54a7b4=_0x195db3,_0x2647aa={'memberId':(await this['_sessionService'][_0x54a7b4(0x1ad)](_0xdf98aa))['getMemberID'](),'threadId':_0x4d3b8e,'replyId':_0xb1038c,'unitId':_0xdf98aa},_0x5ee1a2=await this['_httpService'][_0x54a7b4(0x158)](_0x54a7b4(0x14c)+_0xdf98aa+'/delete',{'body':_0x2647aa});return!_0x5ee1a2[_0x54a7b4(0x182)][_0x54a7b4(0x17b)]||_0x5ee1a2[_0x54a7b4(0x182)][_0x54a7b4(0x17b)][_0x54a7b4(0x1a2)]===0x1;}async[_0x195db3(0x173)](_0x46ab83,_0x5ab91c,_0x55c6d8){const _0x101912=_0x195db3,_0x31ccec={'unitId':_0x46ab83,'threadId':_0x55c6d8},_0x20e19d=await this['_httpService'][_0x101912(0x158)](_0x101912(0x14c)+_0x46ab83+_0x101912(0x157),{'body':_0x31ccec}),_0x10977e=_0x55c6d8['map'](_0x57cb40=>G(_0x20e19d[_0x101912(0x182)]['comments'][_0x57cb40],_0x46ab83,_0x5ab91c))['filter'](Boolean);return Object[_0x101912(0x15f)](_0x20e19d['body'][_0x101912(0x188)])[_0x101912(0x13c)](_0x89551c=>{const _0x59183d=_0x101912;this['_userService'][_0x59183d(0x154)](_0x89551c);}),_0x10977e;}[_0x195db3(0x183)](_0x563b0d){const _0x3e14dc=_0x195db3;return{'id':_0x563b0d['id'],'threadId':_0x563b0d[_0x3e14dc(0x169)],'ref':_0x563b0d[_0x3e14dc(0x17f)]};}};p=x([C(0x0,c[_0x195db3(0x135)](P[_0x195db3(0x18d)])),C(0x1,c[_0x195db3(0x135)](c['UserManagerService'])),C(0x2,c[_0x195db3(0x135)](b[_0x195db3(0x170)]))],p);var H=Object[_0x195db3(0x1a4)],J=(_0x475c1c,_0x5f0b88,_0x483961,_0x4a9959)=>{const _0x10680b=_0x195db3;for(var _0x1c9ce6=_0x4a9959>0x1?void 0x0:_0x4a9959?H(_0x5f0b88,_0x483961):_0x5f0b88,_0x4de202=_0x475c1c[_0x10680b(0x142)]-0x1,_0x70ee70;_0x4de202>=0x0;_0x4de202--)(_0x70ee70=_0x475c1c[_0x4de202])&&(_0x1c9ce6=_0x70ee70(_0x1c9ce6)||_0x1c9ce6);return _0x1c9ce6;},y=(_0x13b6a7,_0x4d6b97)=>(_0x13b1f1,_0x25a6f4)=>_0x4d6b97(_0x13b1f1,_0x25a6f4,_0x13b6a7);let g=class extends c[_0x195db3(0x172)]{constructor(_0x388939,_0x408779){const _0x5d3a98=_0x195db3;super(),this['_threadCommentDataSourceService']=_0x388939,this[_0x5d3a98(0x19d)]=_0x408779,this['_initDataSource']();}[_0x195db3(0x187)](){const _0x223aa7=_0x195db3;this[_0x223aa7(0x198)][_0x223aa7(0x17c)]=this[_0x223aa7(0x19d)],this[_0x223aa7(0x198)][_0x223aa7(0x180)]=!0x1;}};g=J([y(0x0,M[_0x195db3(0x1a6)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x195db3(0x16f)],L=Object[_0x195db3(0x1a4)],Z=(_0x19ef7e,_0x2c74c6,_0x398add)=>_0x2c74c6 in _0x19ef7e?F(_0x19ef7e,_0x2c74c6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x398add}):_0x19ef7e[_0x2c74c6]=_0x398add,W=(_0x3be2e7,_0x3c5cf3,_0x548ffb,_0x576e0b)=>{const _0x28e9da=_0x195db3;for(var _0x47cfe5=_0x576e0b>0x1?void 0x0:_0x576e0b?L(_0x3c5cf3,_0x548ffb):_0x3c5cf3,_0x44d2a4=_0x3be2e7[_0x28e9da(0x142)]-0x1,_0x5d2488;_0x44d2a4>=0x0;_0x44d2a4--)(_0x5d2488=_0x3be2e7[_0x44d2a4])&&(_0x47cfe5=_0x5d2488(_0x47cfe5)||_0x47cfe5);return _0x47cfe5;},O=(_0x4a2c23,_0x3e467a)=>(_0x433fac,_0x2177fc)=>_0x3e467a(_0x433fac,_0x2177fc,_0x4a2c23),N=(_0xee95f7,_0xb7021c,_0x3ea5bb)=>Z(_0xee95f7,typeof _0xb7021c!='symbol'?_0xb7021c+'':_0xb7021c,_0x3ea5bb);exports[_0x195db3(0x15e)]=class extends c[_0x195db3(0x155)]{constructor(_0x283a8b=D,_0x112f56,_0x37581f){const _0x18c80e=_0x195db3;super(),this[_0x18c80e(0x14f)]=_0x283a8b,this[_0x18c80e(0x162)]=_0x112f56,this[_0x18c80e(0x1a5)]=_0x37581f;const {..._0x57546a}=c[_0x18c80e(0x13e)]({},D,this[_0x18c80e(0x14f)]);this[_0x18c80e(0x1a5)][_0x18c80e(0x153)](q,_0x57546a);}[_0x195db3(0x191)](){[[p],[g],[_]]['forEach'](_0xbabd8e=>{const _0x51124a=_0x258e;this[_0x51124a(0x162)][_0x51124a(0x166)](_0xbabd8e);});}[_0x195db3(0x1af)](){const _0x42b9aa=_0x195db3;this['_injector'][_0x42b9aa(0x17a)](g),this[_0x42b9aa(0x162)][_0x42b9aa(0x17a)](_);}},N(exports[_0x195db3(0x15e)],_0x195db3(0x140),U),N(exports[_0x195db3(0x15e)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x195db3(0x15e)]=W([c[_0x195db3(0x165)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x195db3(0x156)]),O(0x1,c['Inject'](c[_0x195db3(0x14a)])),O(0x2,c['IConfigService'])],exports[_0x195db3(0x15e)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5610bb=_0x4b46;(function(_0x184847,_0x52a8d0){const _0x7eb76b=_0x4b46,_0xe2865a=_0x184847();while(!![]){try{const _0x24a58a=-parseInt(_0x7eb76b(0x1d9))/0x1+parseInt(_0x7eb76b(0x219))/0x2+parseInt(_0x7eb76b(0x216))/0x3*(-parseInt(_0x7eb76b(0x21e))/0x4)+parseInt(_0x7eb76b(0x1e2))/0x5+-parseInt(_0x7eb76b(0x21f))/0x6+-parseInt(_0x7eb76b(0x1c6))/0x7*(parseInt(_0x7eb76b(0x1dd))/0x8)+parseInt(_0x7eb76b(0x1ce))/0x9*(parseInt(_0x7eb76b(0x1ec))/0xa);if(_0x24a58a===_0x52a8d0)break;else _0xe2865a['push'](_0xe2865a['shift']());}catch(_0x52b729){_0xe2865a['push'](_0xe2865a['shift']());}}}(_0x1585,0xe0fb3));import{CommentService as _0xd20b2d,CollaborationSessionService as _0x3def1e,UniverCollaborationClientPlugin as _0x4a365b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x48a04c}from'@univerjs-pro/license';function _0x1585(){const _0x2ec996=['resolved','filter','saveCommentToSnapshot','getOwnPropertyDescriptor','rangeType','get','486160GitPwV','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','1263208YhMnIt','map','format','reply','customRanges','7256850TiPoUj','_sessionService','deleteComment','onStarting','users','Add','Solve','/universer-api/comment/unit/','getMemberID','parentId','1880vuWutC','slice','userId','stringify','_threadCommentDataSource','/universer-api/user/list','_httpService','/solved','setConfig','onReady','_userService','parse','/list','replyId','forEach','getCurrentUser','error','/add','pipe','dataSource','createTimestamp','comments','solved','symbol','code','disposeWithMe','UNIVER_UNKNOWN','post','size','_configService','_initDataSource','COMMENT','ref','find','payload','length','Edit','addUser','personId','type','replies','resolveComment','3pHaGYF','delete','/reply','561794qyEWPH','_config','content','userID','Solved','3022972xvaRMc','4024824zRmGgZ','rangeId','root','unitId','Unknown','requireSession','YYYY/MM/DD\x20HH:mm','user','_init','add','body','syncUpdateMutationToColla','_threadCommentModel','35YjIrnr','Reply','threadId','commentUpdate$','_injector','/delete','UNRECOGNIZED','subscribe','90549PmlINe','listComments','_commentService','Delete','_initUserSync'];_0x1585=function(){return _0x2ec996;};return _0x1585();}import{dayjs as _0x392d07,UserManagerService as _0x449089,Inject as _0x455332,Injector as _0x4bb4d0,Disposable as _0x1b00e4,CustomRangeType as _0x53a16e,UniverInstanceType as _0x5c288c,DependentOn as _0x29f3d1,IConfigService as _0x2ba459,Plugin as _0x7e8235,merge as _0x4157ef}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5cb7b2}from'@univerjs/thread-comment-ui';function _0x4b46(_0x4cb0aa,_0x2b2fa7){const _0x1585d0=_0x1585();return _0x4b46=function(_0x4b4657,_0x15c0ed){_0x4b4657=_0x4b4657-0x1c5;let _0x1f8fbd=_0x1585d0[_0x4b4657];return _0x1f8fbd;},_0x4b46(_0x4cb0aa,_0x2b2fa7);}import{ThreadCommentModel as _0x32029d,IThreadCommentDataSourceService as _0x494393}from'@univerjs/thread-comment';import{bufferTime as _0x5195f5}from'rxjs';import{HTTPService as _0x2d4ba7}from'@univerjs/network';const W=_0x5610bb(0x1db);var I=(_0x2f98f5=>(_0x2f98f5[_0x2f98f5['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f98f5[_0x2f98f5[_0x5610bb(0x21d)]=0x1]=_0x5610bb(0x21d),_0x2f98f5[_0x2f98f5[_0x5610bb(0x1cc)]=-0x1]=_0x5610bb(0x1cc),_0x2f98f5))(I||{}),v=(_0x50c6ea=>(_0x50c6ea[_0x50c6ea[_0x5610bb(0x223)]=0x0]=_0x5610bb(0x223),_0x50c6ea[_0x50c6ea[_0x5610bb(0x1e7)]=0x1]='Add',_0x50c6ea[_0x50c6ea[_0x5610bb(0x1c7)]=0x2]=_0x5610bb(0x1c7),_0x50c6ea[_0x50c6ea['Edit']=0x3]=_0x5610bb(0x210),_0x50c6ea[_0x50c6ea[_0x5610bb(0x1d1)]=0x4]=_0x5610bb(0x1d1),_0x50c6ea[_0x50c6ea['Solve']=0x5]='Solve',_0x50c6ea[_0x50c6ea[_0x5610bb(0x1cc)]=-0x1]=_0x5610bb(0x1cc),_0x50c6ea))(v||{});const y=_0x567c62=>_0x392d07(new Date(+_0x567c62))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x8993dc,_0x22c09e)=>{const _0x8fd304=_0x5610bb,_0x4161ee=_0x8993dc[_0x8fd304(0x1d8)](_0x449089),_0x959e1e=_0x8993dc[_0x8fd304(0x1d8)](_0x2d4ba7);_0x22c09e[_0x8fd304(0x1fa)](_0x8ece08=>{const _0x5ec18e=_0x8fd304;_0x4161ee['getUser'](_0x8ece08)&&_0x22c09e[_0x5ec18e(0x217)](_0x8ece08);}),_0x22c09e[_0x8fd304(0x208)]&&(await _0x959e1e['get'](_0x8fd304(0x1f1),{'params':{'userIDs':[..._0x22c09e]}}))['body'][_0x8fd304(0x1e6)]['forEach'](_0x5e6ad4=>{const _0x16e8d3=_0x8fd304;_0x5e6ad4&&_0x4161ee[_0x16e8d3(0x211)](_0x5e6ad4);});};var K=Object[_0x5610bb(0x1d6)],V=(_0x5c54ee,_0x43f0f8,_0x3a4cc4,_0x3f8def)=>{const _0xa2b985=_0x5610bb;for(var _0x4caac5=_0x3f8def>0x1?void 0x0:_0x3f8def?K(_0x43f0f8,_0x3a4cc4):_0x43f0f8,_0x293fe2=_0x5c54ee[_0xa2b985(0x20f)]-0x1,_0x2a9caa;_0x293fe2>=0x0;_0x293fe2--)(_0x2a9caa=_0x5c54ee[_0x293fe2])&&(_0x4caac5=_0x2a9caa(_0x4caac5)||_0x4caac5);return _0x4caac5;},p=(_0x4fd3fd,_0x4570ce)=>(_0x33d901,_0x39ea34)=>_0x4570ce(_0x33d901,_0x39ea34,_0x4fd3fd);let _=class extends _0x1b00e4{constructor(_0x5cd820,_0x525435,_0x4e7bbe,_0x4d3d03){const _0x3ea377=_0x5610bb;super(),this['_commentService']=_0x5cd820,this[_0x3ea377(0x1c5)]=_0x525435,this['_userService']=_0x4e7bbe,this['_injector']=_0x4d3d03,this[_0x3ea377(0x227)](),this[_0x3ea377(0x1d2)]();}[_0x5610bb(0x1d2)](){const _0x3d04bc=_0x5610bb;this[_0x3d04bc(0x205)](this[_0x3d04bc(0x1c5)]['commentUpdate$'][_0x3d04bc(0x1fe)](_0x5195f5(0x10))[_0x3d04bc(0x1cd)](_0x25ad4a=>{const _0x4cde54=_0x3d04bc,_0x39a9a1=new Set();_0x25ad4a['forEach'](_0x24f044=>{const _0x3f350f=_0x4b46;switch(_0x24f044[_0x3f350f(0x213)]){case _0x3f350f(0x228):{const _0x5e158e=_0x24f044[_0x3f350f(0x20e)][_0x3f350f(0x212)];_0x39a9a1[_0x3f350f(0x228)](_0x5e158e);break;}}}),B(this[_0x4cde54(0x1ca)],_0x39a9a1);}));}[_0x5610bb(0x227)](){const _0x17997f=_0x5610bb;this[_0x17997f(0x205)](this[_0x17997f(0x1d0)][_0x17997f(0x1c9)][_0x17997f(0x1cd)](async _0x14a00a=>{const _0x579516=_0x17997f;var _0x5e9a3f,_0x445a88,_0x3e24c0,_0xdbdd82;const _0x24b38d=(_0x5e9a3f=this[_0x579516(0x1c5)]['getUnit'](_0x14a00a[_0x579516(0x222)])[_0x579516(0x20d)](_0x43e17d=>_0x43e17d['threadId']===_0x14a00a['threadId']))==null?void 0x0:_0x5e9a3f['root'];if(!_0x24b38d)return;const {unitId:_0x2e3edb,subUnitId:_0x3c47a8}=_0x24b38d;switch(_0x14a00a[_0x579516(0x226)]&&this[_0x579516(0x1f6)][_0x579516(0x211)](_0x14a00a[_0x579516(0x226)]),_0x14a00a[_0x579516(0x213)]){case v[_0x579516(0x1e7)]:break;case v[_0x579516(0x1c7)]:{this[_0x579516(0x1c5)][_0x579516(0x1da)](_0x2e3edb,_0x3c47a8,{'unitId':_0x2e3edb,'subUnitId':_0x3c47a8,'ref':'','id':_0x14a00a[_0x579516(0x1f9)],'dT':y(+_0x14a00a[_0x579516(0x200)]),'threadId':_0x14a00a[_0x579516(0x1c8)],'personId':(_0x3e24c0=(_0x445a88=_0x14a00a[_0x579516(0x226)])==null?void 0x0:_0x445a88['userID'])!=null?_0x3e24c0:_0x14a00a['userId'],'text':JSON['parse'](_0x14a00a[_0x579516(0x21b)]),'parentId':_0x24b38d['id']});break;}case v['Delete']:{const _0x42e133=this[_0x579516(0x1c5)]['getComment'](_0x2e3edb,_0x3c47a8,_0x14a00a[_0x579516(0x1f9)]);_0x42e133&&_0x42e133[_0x579516(0x1eb)]&&this['_threadCommentModel'][_0x579516(0x1e4)](_0x2e3edb,_0x3c47a8,_0x14a00a[_0x579516(0x1f9)]);break;}case v[_0x579516(0x210)]:{this[_0x579516(0x1c5)][_0x579516(0x1dc)](_0x2e3edb,_0x3c47a8,{'commentId':_0x14a00a[_0x579516(0x1f9)],'text':JSON['parse'](_0x14a00a[_0x579516(0x21b)])});break;}case v[_0x579516(0x1e8)]:{const _0x335e41=(_0xdbdd82=this['_threadCommentModel']['getUnit'](_0x14a00a[_0x579516(0x222)])[_0x579516(0x20d)](_0x5ce36f=>_0x5ce36f[_0x579516(0x1c8)]===_0x14a00a[_0x579516(0x1c8)]))==null?void 0x0:_0xdbdd82[_0x579516(0x221)];_0x335e41&&this[_0x579516(0x1c5)][_0x579516(0x215)](_0x2e3edb,_0x3c47a8,_0x335e41['id'],_0x14a00a[_0x579516(0x202)]===I[_0x579516(0x21d)]);break;}}}));}};_=V([p(0x0,_0x455332(_0xd20b2d)),p(0x1,_0x455332(_0x32029d)),p(0x2,_0x455332(_0x449089)),p(0x3,_0x455332(_0x4bb4d0))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5610bb(0x1d6)],Q=(_0x55413c,_0x41b05b,_0x53992a,_0x3b2093)=>{const _0x6d6dc0=_0x5610bb;for(var _0x3e53b3=_0x3b2093>0x1?void 0x0:_0x3b2093?k(_0x41b05b,_0x53992a):_0x41b05b,_0xd8d4ca=_0x55413c[_0x6d6dc0(0x20f)]-0x1,_0x2a0306;_0xd8d4ca>=0x0;_0xd8d4ca--)(_0x2a0306=_0x55413c[_0xd8d4ca])&&(_0x3e53b3=_0x2a0306(_0x3e53b3)||_0x3e53b3);return _0x3e53b3;},b=(_0x21e951,_0xdb9e98)=>(_0x4bc018,_0x1884e8)=>_0xdb9e98(_0x4bc018,_0x1884e8,_0x21e951);function X(_0x1e1a40,_0x5dd8c0){const _0x2c3192=_0x5610bb,_0x5077e0=_0x1e1a40[_0x2c3192(0x214)][0x0];return{..._0x5dd8c0,'id':_0x5077e0[_0x2c3192(0x1f9)],'resolved':_0x1e1a40[_0x2c3192(0x202)]===0x1,'dT':y(_0x5077e0[_0x2c3192(0x200)]),'personId':_0x5077e0[_0x2c3192(0x1ee)],'threadId':_0x5077e0[_0x2c3192(0x1c8)]};}function ee(_0xa684e3,_0x2bb074,_0x40eafa){const _0x42993d=_0x5610bb;var _0x322c1f,_0x1b18fc;if(((_0x1b18fc=(_0x322c1f=_0xa684e3==null?void 0x0:_0xa684e3[_0x42993d(0x214)])==null?void 0x0:_0x322c1f[_0x42993d(0x20f)])!=null?_0x1b18fc:0x0)>0x0){const _0x497360=(_0x460dd9,_0x3618a4)=>({'id':_0x460dd9['replyId'],'threadId':_0x460dd9[_0x42993d(0x1c8)],'dT':y(_0x460dd9[_0x42993d(0x200)]),'personId':_0x460dd9['userId'],'resolved':_0xa684e3[_0x42993d(0x202)]===I[_0x42993d(0x21d)],'unitId':_0x2bb074,'subUnitId':_0x40eafa,'text':JSON[_0x42993d(0x1f7)](_0x460dd9[_0x42993d(0x21b)]),'parentId':_0x3618a4}),_0x3f889a=_0x497360(_0xa684e3['replies'][0x0]);return{..._0x3f889a,'children':_0xa684e3[_0x42993d(0x214)][_0x42993d(0x1ed)](0x1)['map'](_0xa35415=>_0x497360(_0xa35415,_0x3f889a['id']))};}return null;}let S=class{constructor(_0x1160bc,_0x208408,_0x473828){const _0x5d409c=_0x5610bb;this[_0x5d409c(0x1f2)]=_0x1160bc,this[_0x5d409c(0x1f6)]=_0x208408,this[_0x5d409c(0x1e3)]=_0x473828;}async[_0x5610bb(0x1da)](_0x25b723){const _0x5dc2fb=_0x5610bb;var _0x3f0b7d,_0x35d368;const {parentId:_0x46f8b9,unitId:_0x2b29bc,text:_0x26232a,threadId:_0x25c1ed}=_0x25b723,_0x51b488=(_0x35d368=(_0x3f0b7d=_0x26232a[_0x5dc2fb(0x1e1)])==null?void 0x0:_0x3f0b7d[_0x5dc2fb(0x1d4)](_0xafdfa5=>_0xafdfa5[_0x5dc2fb(0x1d7)]===_0x53a16e[_0x5dc2fb(0x20b)])[_0x5dc2fb(0x1de)](_0x33f93c=>_0x33f93c[_0x5dc2fb(0x220)]))!=null?_0x35d368:[],_0x16c4aa=JSON[_0x5dc2fb(0x1ef)](_0x26232a),_0x571e8d=(await this[_0x5dc2fb(0x1e3)][_0x5dc2fb(0x224)](_0x2b29bc))[_0x5dc2fb(0x1ea)]();if(_0x46f8b9){const _0x53651f={'memberId':_0x571e8d,'unitId':_0x2b29bc,'content':_0x16c4aa,'mention':_0x51b488,'threadId':_0x25c1ed},_0x5c7f8d=(await this[_0x5dc2fb(0x1f2)]['post'](_0x5dc2fb(0x1e9)+_0x2b29bc+_0x5dc2fb(0x218),{'body':_0x53651f}))[_0x5dc2fb(0x229)][_0x5dc2fb(0x1e0)];return{..._0x25b723,'id':_0x5c7f8d['replyId'],'dT':_0x392d07(+_0x5c7f8d[_0x5dc2fb(0x200)])[_0x5dc2fb(0x1df)](_0x5dc2fb(0x225)),'personId':_0x5c7f8d[_0x5dc2fb(0x1ee)]};}else{const _0x2ee321={'memberId':_0x571e8d,'unitId':_0x2b29bc,'content':_0x16c4aa,'mention':_0x51b488},_0x841fc0=await this[_0x5dc2fb(0x1f2)]['post'](_0x5dc2fb(0x1e9)+_0x2b29bc+_0x5dc2fb(0x1fd),{'body':_0x2ee321});return X(_0x841fc0[_0x5dc2fb(0x229)]['comment'],_0x25b723);}}async[_0x5610bb(0x1dc)](_0x1b73c1){const _0x382cda=_0x5610bb;var _0x223723,_0x26f1a3;const {text:_0x107ec6,unitId:_0x58002e}=_0x1b73c1,_0x3932db=(_0x26f1a3=(_0x223723=_0x107ec6[_0x382cda(0x1e1)])==null?void 0x0:_0x223723['filter'](_0x4f543c=>_0x4f543c['rangeType']===_0x53a16e[_0x382cda(0x20b)])['map'](_0x990b15=>_0x990b15['rangeId']))!=null?_0x26f1a3:[],_0x3762c5=JSON[_0x382cda(0x1ef)](_0x107ec6),_0x11161a=_0x1b73c1['threadId'],_0x216930=_0x1b73c1['id'],_0x305c51={'memberId':(await this[_0x382cda(0x1e3)][_0x382cda(0x224)](_0x58002e))['getMemberID'](),'unitId':_0x58002e,'threadId':_0x11161a,'mention':_0x3932db,'content':_0x3762c5,'replyId':_0x216930},_0x947639=await this['_httpService'][_0x382cda(0x207)](_0x382cda(0x1e9)+_0x58002e+'/edit',{'body':_0x305c51});return!_0x947639[_0x382cda(0x229)]['error']||_0x947639[_0x382cda(0x229)][_0x382cda(0x1fc)][_0x382cda(0x204)]===0x1;}async[_0x5610bb(0x215)](_0x15489f){const _0x32b196=_0x5610bb,{unitId:_0x4ce3a6}=_0x15489f,_0x101026=_0x15489f[_0x32b196(0x1c8)],_0x3975f1={'memberId':this[_0x32b196(0x1f6)][_0x32b196(0x1fb)]()[_0x32b196(0x21c)],'unitId':_0x4ce3a6,'threadId':_0x101026,'solved':_0x15489f[_0x32b196(0x1d3)]?I['Solved']:I['OpenOrReOpen']},_0x2ac46e=await this[_0x32b196(0x1f2)][_0x32b196(0x207)](_0x32b196(0x1e9)+_0x4ce3a6+_0x32b196(0x1f3),{'body':_0x3975f1});return!_0x2ac46e[_0x32b196(0x229)][_0x32b196(0x1fc)]||_0x2ac46e[_0x32b196(0x229)][_0x32b196(0x1fc)][_0x32b196(0x204)]===0x1;}async['deleteComment'](_0x3af680,_0x1aba66,_0x573dcf,_0x1cd34f){const _0x4cb2d5=_0x5610bb,_0x5b58fc={'memberId':(await this[_0x4cb2d5(0x1e3)][_0x4cb2d5(0x224)](_0x3af680))[_0x4cb2d5(0x1ea)](),'threadId':_0x573dcf,'replyId':_0x1cd34f,'unitId':_0x3af680},_0x15544b=await this[_0x4cb2d5(0x1f2)][_0x4cb2d5(0x207)](_0x4cb2d5(0x1e9)+_0x3af680+_0x4cb2d5(0x1cb),{'body':_0x5b58fc});return!_0x15544b[_0x4cb2d5(0x229)][_0x4cb2d5(0x1fc)]||_0x15544b[_0x4cb2d5(0x229)]['error']['code']===0x1;}async[_0x5610bb(0x1cf)](_0x537e2b,_0x11a594,_0x3add34){const _0xba2b1c=_0x5610bb,_0x17b053={'unitId':_0x537e2b,'threadId':_0x3add34},_0x50b3f0=await this['_httpService']['post'](_0xba2b1c(0x1e9)+_0x537e2b+_0xba2b1c(0x1f8),{'body':_0x17b053}),_0x44cc2e=_0x3add34[_0xba2b1c(0x1de)](_0x48c2ce=>ee(_0x50b3f0[_0xba2b1c(0x229)][_0xba2b1c(0x201)][_0x48c2ce],_0x537e2b,_0x11a594))[_0xba2b1c(0x1d4)](Boolean);return Object['values'](_0x50b3f0['body'][_0xba2b1c(0x1e6)])['forEach'](_0x2ed906=>{const _0x3813a5=_0xba2b1c;this[_0x3813a5(0x1f6)]['addUser'](_0x2ed906);}),_0x44cc2e;}[_0x5610bb(0x1d5)](_0x3abce1){const _0x2c7d13=_0x5610bb;return{'id':_0x3abce1['id'],'threadId':_0x3abce1[_0x2c7d13(0x1c8)],'ref':_0x3abce1[_0x2c7d13(0x20c)]};}};S=Q([b(0x0,_0x455332(_0x2d4ba7)),b(0x1,_0x455332(_0x449089)),b(0x2,_0x455332(_0x3def1e))],S);var re=Object[_0x5610bb(0x1d6)],te=(_0x831341,_0x3513eb,_0x234f23,_0x30b98b)=>{const _0x9f833a=_0x5610bb;for(var _0x522555=_0x30b98b>0x1?void 0x0:_0x30b98b?re(_0x3513eb,_0x234f23):_0x3513eb,_0x1f3432=_0x831341[_0x9f833a(0x20f)]-0x1,_0xa27078;_0x1f3432>=0x0;_0x1f3432--)(_0xa27078=_0x831341[_0x1f3432])&&(_0x522555=_0xa27078(_0x522555)||_0x522555);return _0x522555;},M=(_0x4c887d,_0x2943fc)=>(_0x3daa2e,_0x57a8ea)=>_0x2943fc(_0x3daa2e,_0x57a8ea,_0x4c887d);let f=class extends _0x1b00e4{constructor(_0x1d8bea,_0x2f55a2){const _0x5af7f6=_0x5610bb;super(),this['_threadCommentDataSourceService']=_0x1d8bea,this[_0x5af7f6(0x1f0)]=_0x2f55a2,this[_0x5af7f6(0x20a)]();}['_initDataSource'](){const _0x2e295c=_0x5610bb;this['_threadCommentDataSourceService'][_0x2e295c(0x1ff)]=this[_0x2e295c(0x1f0)],this['_threadCommentDataSourceService'][_0x2e295c(0x22a)]=!0x1;}};f=te([M(0x0,_0x494393),M(0x1,_0x455332(S))],f);var se=Object['defineProperty'],oe=Object[_0x5610bb(0x1d6)],ne=(_0x4d14ea,_0x1b3859,_0x993920)=>_0x1b3859 in _0x4d14ea?se(_0x4d14ea,_0x1b3859,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x993920}):_0x4d14ea[_0x1b3859]=_0x993920,ie=(_0x2d455c,_0x460207,_0x415dc2,_0x48fcac)=>{const _0x243797=_0x5610bb;for(var _0x16be0b=_0x48fcac>0x1?void 0x0:_0x48fcac?oe(_0x460207,_0x415dc2):_0x460207,_0x25f0e9=_0x2d455c[_0x243797(0x20f)]-0x1,_0x5a2560;_0x25f0e9>=0x0;_0x25f0e9--)(_0x5a2560=_0x2d455c[_0x25f0e9])&&(_0x16be0b=_0x5a2560(_0x16be0b)||_0x16be0b);return _0x16be0b;},N=(_0x4e1a08,_0x2b6b4a)=>(_0x1ae8ec,_0x574dbb)=>_0x2b6b4a(_0x1ae8ec,_0x574dbb,_0x4e1a08),$=(_0x5f140d,_0x313e96,_0x208589)=>ne(_0x5f140d,typeof _0x313e96!=_0x5610bb(0x203)?_0x313e96+'':_0x313e96,_0x208589);let g=class extends _0x7e8235{constructor(_0x536d0d=O,_0x22daad,_0x30e74d){const _0x5344bf=_0x5610bb;super(),this[_0x5344bf(0x21a)]=_0x536d0d,this[_0x5344bf(0x1ca)]=_0x22daad,this[_0x5344bf(0x209)]=_0x30e74d;const {..._0x1f999d}=_0x4157ef({},O,this[_0x5344bf(0x21a)]);this[_0x5344bf(0x209)][_0x5344bf(0x1f4)](z,_0x1f999d);}[_0x5610bb(0x1e5)](){const _0x1ff5f3=_0x5610bb;[[S],[f],[_]][_0x1ff5f3(0x1fa)](_0x9dce14=>{const _0x16f67e=_0x1ff5f3;this['_injector'][_0x16f67e(0x228)](_0x9dce14);});}[_0x5610bb(0x1f5)](){const _0x541734=_0x5610bb;this['_injector'][_0x541734(0x1d8)](f),this[_0x541734(0x1ca)][_0x541734(0x1d8)](_);}};$(g,'pluginName',W),$(g,_0x5610bb(0x213),_0x5c288c[_0x5610bb(0x206)]),g=ie([_0x29f3d1(_0x5cb7b2,_0x4a365b,_0x48a04c),N(0x1,_0x455332(_0x4bb4d0)),N(0x2,_0x2ba459)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x30354b=_0x6b72;(function(_0x19d239,_0x4952ed){const _0x4ca1fb=_0x6b72,_0x19fe23=_0x19d239();while(!![]){try{const _0x3084f5=-parseInt(_0x4ca1fb(0x1f4))/0x1+parseInt(_0x4ca1fb(0x208))/0x2*(parseInt(_0x4ca1fb(0x1da))/0x3)+-parseInt(_0x4ca1fb(0x1db))/0x4*(parseInt(_0x4ca1fb(0x1ed))/0x5)+parseInt(_0x4ca1fb(0x200))/0x6*(parseInt(_0x4ca1fb(0x205))/0x7)+parseInt(_0x4ca1fb(0x1dd))/0x8*(parseInt(_0x4ca1fb(0x222))/0x9)+parseInt(_0x4ca1fb(0x1e1))/0xa*(-parseInt(_0x4ca1fb(0x20d))/0xb)+-parseInt(_0x4ca1fb(0x21e))/0xc*(-parseInt(_0x4ca1fb(0x1d6))/0xd);if(_0x3084f5===_0x4952ed)break;else _0x19fe23['push'](_0x19fe23['shift']());}catch(_0x39d700){_0x19fe23['push'](_0x19fe23['shift']());}}}(_0x403e,0x81e18));import{CommentService as _0x3237e5,CollaborationSessionService as _0x4c60bb,UniverCollaborationClientPlugin as _0x516653}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2125bb}from'@univerjs-pro/license';import{dayjs as _0x4a080f,UserManagerService as _0x3579fd,Inject as _0x5d6dec,Injector as _0x5eef6b,Disposable as _0x5da71c,CustomRangeType as _0x300af4,UniverInstanceType as _0x3bb98c,DependentOn as _0x413398,IConfigService as _0x195d4b,Plugin as _0x3bc542,merge as _0x3f3339}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x32a910}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59f117,IThreadCommentDataSourceService as _0x5a2639}from'@univerjs/thread-comment';import{bufferTime as _0x298b90}from'rxjs';import{HTTPService as _0x365edd}from'@univerjs/network';const W=_0x30354b(0x213);var I=(_0x42d073=>(_0x42d073[_0x42d073['OpenOrReOpen']=0x0]=_0x30354b(0x20c),_0x42d073[_0x42d073[_0x30354b(0x1c9)]=0x1]=_0x30354b(0x1c9),_0x42d073[_0x42d073[_0x30354b(0x228)]=-0x1]=_0x30354b(0x228),_0x42d073))(I||{}),v=(_0xdac16d=>(_0xdac16d[_0xdac16d[_0x30354b(0x227)]=0x0]=_0x30354b(0x227),_0xdac16d[_0xdac16d[_0x30354b(0x1eb)]=0x1]=_0x30354b(0x1eb),_0xdac16d[_0xdac16d['Reply']=0x2]=_0x30354b(0x206),_0xdac16d[_0xdac16d[_0x30354b(0x1e6)]=0x3]=_0x30354b(0x1e6),_0xdac16d[_0xdac16d[_0x30354b(0x21c)]=0x4]=_0x30354b(0x21c),_0xdac16d[_0xdac16d[_0x30354b(0x1f9)]=0x5]=_0x30354b(0x1f9),_0xdac16d[_0xdac16d[_0x30354b(0x228)]=-0x1]='UNRECOGNIZED',_0xdac16d))(v||{});function _0x6b72(_0x14a30b,_0x560ebb){const _0x403ee1=_0x403e();return _0x6b72=function(_0x6b7255,_0x530bbb){_0x6b7255=_0x6b7255-0x1bf;let _0x1ed82a=_0x403ee1[_0x6b7255];return _0x1ed82a;},_0x6b72(_0x14a30b,_0x560ebb);}const y=_0x20d043=>_0x4a080f(new Date(+_0x20d043))[_0x30354b(0x1dc)](_0x30354b(0x1ea)),B=async(_0x8aafcb,_0x268328)=>{const _0x272da7=_0x30354b,_0x5a6e33=_0x8aafcb[_0x272da7(0x1f2)](_0x3579fd),_0x4580be=_0x8aafcb['get'](_0x365edd);_0x268328[_0x272da7(0x1f8)](_0x5b728e=>{const _0x20658e=_0x272da7;_0x5a6e33['getUser'](_0x5b728e)&&_0x268328[_0x20658e(0x1cd)](_0x5b728e);}),_0x268328[_0x272da7(0x20e)]&&(await _0x4580be[_0x272da7(0x1f2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x268328]}}))['body'][_0x272da7(0x1c0)][_0x272da7(0x1f8)](_0x3d3b14=>{_0x3d3b14&&_0x5a6e33['addUser'](_0x3d3b14);});};var K=Object[_0x30354b(0x1cf)],V=(_0x21890e,_0x355929,_0x52281e,_0x33a0bb)=>{for(var _0x2d5ee7=_0x33a0bb>0x1?void 0x0:_0x33a0bb?K(_0x355929,_0x52281e):_0x355929,_0x64e2f4=_0x21890e['length']-0x1,_0x187cda;_0x64e2f4>=0x0;_0x64e2f4--)(_0x187cda=_0x21890e[_0x64e2f4])&&(_0x2d5ee7=_0x187cda(_0x2d5ee7)||_0x2d5ee7);return _0x2d5ee7;},p=(_0x32e8d0,_0x11768a)=>(_0xb1bcde,_0x41d10e)=>_0x11768a(_0xb1bcde,_0x41d10e,_0x32e8d0);function _0x403e(){const _0x9332c1=['383411wVdAmB','Reply','_threadCommentModel','973118bKoQQJ','unitId','parentId','post','OpenOrReOpen','8591EPYukU','size','map','deleteComment','/edit','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','add','code','requireSession','length','find','_userService','_injector','Delete','thread-comment-data-source.config','12RTfxpP','disposeWithMe','customRanges','content','3332061xALvhp','type','COMMENT','subscribe','resolveComment','Unknown','UNRECOGNIZED','userID','rangeType','users','commentUpdate$','updateComment','userId','pluginName','UNIVER_UNKNOWN','/reply','parse','setConfig','Solved','user','symbol','syncUpdateMutationToColla','delete','getMemberID','getOwnPropertyDescriptor','dataSource','_httpService','/universer-api/comment/unit/','rangeId','error','replies','8514857XxTsix','_config','personId','replyId','3enWGLm','2360572tLMfeG','format','16yJVYPp','_threadCommentDataSourceService','root','stringify','12940bAyFEK','getComment','resolved','addComment','solved','Edit','_threadCommentDataSource','ref','getUnit','YYYY/MM/DD\x20HH:mm','Add','defineProperty','5tfTzCe','slice','comment','addUser','_commentService','get','_initUserSync','789944uVQuGT','pipe','_sessionService','threadId','forEach','Solve','values','_init','filter','comments','body','_configService','114URdPkj','/list','onReady','onStarting','createTimestamp'];_0x403e=function(){return _0x9332c1;};return _0x403e();}let _=class extends _0x5da71c{constructor(_0x5774e9,_0xcf3eec,_0x1b0940,_0x585d2e){const _0xaf08c6=_0x30354b;super(),this[_0xaf08c6(0x1f1)]=_0x5774e9,this[_0xaf08c6(0x207)]=_0xcf3eec,this[_0xaf08c6(0x21a)]=_0x1b0940,this['_injector']=_0x585d2e,this[_0xaf08c6(0x1fb)](),this[_0xaf08c6(0x1f3)]();}[_0x30354b(0x1f3)](){const _0x5d96f1=_0x30354b;this[_0x5d96f1(0x21f)](this[_0x5d96f1(0x207)]['commentUpdate$'][_0x5d96f1(0x1f5)](_0x298b90(0x10))[_0x5d96f1(0x225)](_0x3cef68=>{const _0x39e980=_0x5d96f1,_0x2e0b23=new Set();_0x3cef68[_0x39e980(0x1f8)](_0x20cf2e=>{const _0x253361=_0x39e980;switch(_0x20cf2e['type']){case _0x253361(0x215):{const _0x5c43f4=_0x20cf2e['payload'][_0x253361(0x1d8)];_0x2e0b23[_0x253361(0x215)](_0x5c43f4);break;}}}),B(this['_injector'],_0x2e0b23);}));}[_0x30354b(0x1fb)](){const _0x223fc0=_0x30354b;this[_0x223fc0(0x21f)](this[_0x223fc0(0x1f1)][_0x223fc0(0x1c1)][_0x223fc0(0x225)](async _0x306253=>{const _0x189772=_0x223fc0;var _0xb394a0,_0x2503e5,_0x5a8b8e,_0xa435aa;const _0x2b3317=(_0xb394a0=this['_threadCommentModel']['getUnit'](_0x306253['unitId'])[_0x189772(0x219)](_0x5c3c51=>_0x5c3c51[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xb394a0[_0x189772(0x1df)];if(!_0x2b3317)return;const {unitId:_0x4f9c5f,subUnitId:_0x5e762c}=_0x2b3317;switch(_0x306253['user']&&this[_0x189772(0x21a)]['addUser'](_0x306253[_0x189772(0x1ca)]),_0x306253[_0x189772(0x223)]){case v[_0x189772(0x1eb)]:break;case v[_0x189772(0x206)]:{this['_threadCommentModel'][_0x189772(0x1e4)](_0x4f9c5f,_0x5e762c,{'unitId':_0x4f9c5f,'subUnitId':_0x5e762c,'ref':'','id':_0x306253[_0x189772(0x1d9)],'dT':y(+_0x306253['createTimestamp']),'threadId':_0x306253['threadId'],'personId':(_0x5a8b8e=(_0x2503e5=_0x306253[_0x189772(0x1ca)])==null?void 0x0:_0x2503e5['userID'])!=null?_0x5a8b8e:_0x306253[_0x189772(0x1c3)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)]),'parentId':_0x2b3317['id']});break;}case v[_0x189772(0x21c)]:{const _0x54e3ac=this['_threadCommentModel'][_0x189772(0x1e2)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);_0x54e3ac&&_0x54e3ac[_0x189772(0x20a)]&&this[_0x189772(0x207)][_0x189772(0x210)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);break;}case v[_0x189772(0x1e6)]:{this[_0x189772(0x207)][_0x189772(0x1c2)](_0x4f9c5f,_0x5e762c,{'commentId':_0x306253[_0x189772(0x1d9)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)])});break;}case v[_0x189772(0x1f9)]:{const _0x1dfc6d=(_0xa435aa=this['_threadCommentModel'][_0x189772(0x1e9)](_0x306253[_0x189772(0x209)])[_0x189772(0x219)](_0xc6f364=>_0xc6f364[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xa435aa[_0x189772(0x1df)];_0x1dfc6d&&this[_0x189772(0x207)][_0x189772(0x226)](_0x4f9c5f,_0x5e762c,_0x1dfc6d['id'],_0x306253[_0x189772(0x1e5)]===I[_0x189772(0x1c9)]);break;}}}));}};_=V([p(0x0,_0x5d6dec(_0x3237e5)),p(0x1,_0x5d6dec(_0x59f117)),p(0x2,_0x5d6dec(_0x3579fd)),p(0x3,_0x5d6dec(_0x5eef6b))],_);const z=_0x30354b(0x21d),O={};var k=Object[_0x30354b(0x1cf)],Q=(_0x19cddd,_0x41e075,_0x110441,_0x40c97a)=>{for(var _0x5f18a9=_0x40c97a>0x1?void 0x0:_0x40c97a?k(_0x41e075,_0x110441):_0x41e075,_0xb79e8d=_0x19cddd['length']-0x1,_0x339154;_0xb79e8d>=0x0;_0xb79e8d--)(_0x339154=_0x19cddd[_0xb79e8d])&&(_0x5f18a9=_0x339154(_0x5f18a9)||_0x5f18a9);return _0x5f18a9;},b=(_0x5a3fb1,_0xa9a51c)=>(_0x4b0db5,_0xefe791)=>_0xa9a51c(_0x4b0db5,_0xefe791,_0x5a3fb1);function X(_0x36f817,_0x281e45){const _0x55f41a=_0x30354b,_0x1c0013=_0x36f817[_0x55f41a(0x1d5)][0x0];return{..._0x281e45,'id':_0x1c0013[_0x55f41a(0x1d9)],'resolved':_0x36f817[_0x55f41a(0x1e5)]===0x1,'dT':y(_0x1c0013[_0x55f41a(0x204)]),'personId':_0x1c0013[_0x55f41a(0x1c3)],'threadId':_0x1c0013[_0x55f41a(0x1f7)]};}function ee(_0x3eaaa7,_0x343457,_0x2dea6a){const _0x1e3ae5=_0x30354b;var _0x32a9d1,_0x13361f;if(((_0x13361f=(_0x32a9d1=_0x3eaaa7==null?void 0x0:_0x3eaaa7[_0x1e3ae5(0x1d5)])==null?void 0x0:_0x32a9d1[_0x1e3ae5(0x218)])!=null?_0x13361f:0x0)>0x0){const _0x55c69a=(_0x12250c,_0x17f27b)=>({'id':_0x12250c['replyId'],'threadId':_0x12250c[_0x1e3ae5(0x1f7)],'dT':y(_0x12250c['createTimestamp']),'personId':_0x12250c[_0x1e3ae5(0x1c3)],'resolved':_0x3eaaa7[_0x1e3ae5(0x1e5)]===I[_0x1e3ae5(0x1c9)],'unitId':_0x343457,'subUnitId':_0x2dea6a,'text':JSON[_0x1e3ae5(0x1c7)](_0x12250c[_0x1e3ae5(0x221)]),'parentId':_0x17f27b}),_0x3beb10=_0x55c69a(_0x3eaaa7[_0x1e3ae5(0x1d5)][0x0]);return{..._0x3beb10,'children':_0x3eaaa7[_0x1e3ae5(0x1d5)][_0x1e3ae5(0x1ee)](0x1)[_0x1e3ae5(0x20f)](_0x16f8d6=>_0x55c69a(_0x16f8d6,_0x3beb10['id']))};}return null;}let S=class{constructor(_0x9ec1cb,_0x27ca8d,_0x27c967){const _0x232620=_0x30354b;this[_0x232620(0x1d1)]=_0x9ec1cb,this[_0x232620(0x21a)]=_0x27ca8d,this[_0x232620(0x1f6)]=_0x27c967;}async['addComment'](_0x4b86a9){const _0x4ef882=_0x30354b;var _0x1a9947,_0x4e5133;const {parentId:_0x9ad8ae,unitId:_0x3c85c6,text:_0x10e433,threadId:_0xf825cc}=_0x4b86a9,_0x10154d=(_0x4e5133=(_0x1a9947=_0x10e433['customRanges'])==null?void 0x0:_0x1a9947[_0x4ef882(0x1fc)](_0x527b20=>_0x527b20[_0x4ef882(0x1bf)]===_0x300af4[_0x4ef882(0x224)])[_0x4ef882(0x20f)](_0x3f9ab0=>_0x3f9ab0[_0x4ef882(0x1d3)]))!=null?_0x4e5133:[],_0x159a50=JSON[_0x4ef882(0x1e0)](_0x10e433),_0x350a15=(await this[_0x4ef882(0x1f6)]['requireSession'](_0x3c85c6))[_0x4ef882(0x1ce)]();if(_0x9ad8ae){const _0xba2370={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d,'threadId':_0xf825cc},_0x558d6a=(await this[_0x4ef882(0x1d1)]['post'](_0x4ef882(0x1d2)+_0x3c85c6+_0x4ef882(0x1c6),{'body':_0xba2370}))[_0x4ef882(0x1fe)]['reply'];return{..._0x4b86a9,'id':_0x558d6a['replyId'],'dT':_0x4a080f(+_0x558d6a['createTimestamp'])[_0x4ef882(0x1dc)](_0x4ef882(0x1ea)),'personId':_0x558d6a[_0x4ef882(0x1c3)]};}else{const _0xa33ed1={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d},_0xab587f=await this[_0x4ef882(0x1d1)]['post']('/universer-api/comment/unit/'+_0x3c85c6+'/add',{'body':_0xa33ed1});return X(_0xab587f['body'][_0x4ef882(0x1ef)],_0x4b86a9);}}async[_0x30354b(0x1c2)](_0x570878){const _0x49df70=_0x30354b;var _0x22914d,_0x1f5466;const {text:_0x22ac6f,unitId:_0x2adb4a}=_0x570878,_0x10cf20=(_0x1f5466=(_0x22914d=_0x22ac6f[_0x49df70(0x220)])==null?void 0x0:_0x22914d[_0x49df70(0x1fc)](_0x5b765f=>_0x5b765f[_0x49df70(0x1bf)]===_0x300af4['COMMENT'])['map'](_0xd3e42c=>_0xd3e42c[_0x49df70(0x1d3)]))!=null?_0x1f5466:[],_0x432927=JSON['stringify'](_0x22ac6f),_0x483e67=_0x570878[_0x49df70(0x1f7)],_0x6e2278=_0x570878['id'],_0x1ff66b={'memberId':(await this[_0x49df70(0x1f6)][_0x49df70(0x217)](_0x2adb4a))[_0x49df70(0x1ce)](),'unitId':_0x2adb4a,'threadId':_0x483e67,'mention':_0x10cf20,'content':_0x432927,'replyId':_0x6e2278},_0x381ad0=await this[_0x49df70(0x1d1)][_0x49df70(0x20b)](_0x49df70(0x1d2)+_0x2adb4a+_0x49df70(0x211),{'body':_0x1ff66b});return!_0x381ad0[_0x49df70(0x1fe)]['error']||_0x381ad0[_0x49df70(0x1fe)]['error']['code']===0x1;}async[_0x30354b(0x226)](_0x176f6d){const _0x505721=_0x30354b,{unitId:_0x31bafc}=_0x176f6d,_0x2b72da=_0x176f6d[_0x505721(0x1f7)],_0xbe1d01={'memberId':this['_userService']['getCurrentUser']()[_0x505721(0x229)],'unitId':_0x31bafc,'threadId':_0x2b72da,'solved':_0x176f6d[_0x505721(0x1e3)]?I[_0x505721(0x1c9)]:I['OpenOrReOpen']},_0x201375=await this[_0x505721(0x1d1)][_0x505721(0x20b)](_0x505721(0x1d2)+_0x31bafc+'/solved',{'body':_0xbe1d01});return!_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]||_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]['code']===0x1;}async[_0x30354b(0x210)](_0x219348,_0x1d741d,_0x11aeff,_0x1a4e81){const _0x2e3dc2=_0x30354b,_0x972fec={'memberId':(await this[_0x2e3dc2(0x1f6)][_0x2e3dc2(0x217)](_0x219348))[_0x2e3dc2(0x1ce)](),'threadId':_0x11aeff,'replyId':_0x1a4e81,'unitId':_0x219348},_0x1ec068=await this[_0x2e3dc2(0x1d1)][_0x2e3dc2(0x20b)]('/universer-api/comment/unit/'+_0x219348+'/delete',{'body':_0x972fec});return!_0x1ec068[_0x2e3dc2(0x1fe)]['error']||_0x1ec068[_0x2e3dc2(0x1fe)][_0x2e3dc2(0x1d4)][_0x2e3dc2(0x216)]===0x1;}async[_0x30354b(0x214)](_0x3f44f7,_0x5dbb05,_0x103c7f){const _0x10726b=_0x30354b,_0x59a161={'unitId':_0x3f44f7,'threadId':_0x103c7f},_0x4fb4b0=await this[_0x10726b(0x1d1)][_0x10726b(0x20b)]('/universer-api/comment/unit/'+_0x3f44f7+_0x10726b(0x201),{'body':_0x59a161}),_0x18b87d=_0x103c7f[_0x10726b(0x20f)](_0x2805f5=>ee(_0x4fb4b0['body'][_0x10726b(0x1fd)][_0x2805f5],_0x3f44f7,_0x5dbb05))[_0x10726b(0x1fc)](Boolean);return Object[_0x10726b(0x1fa)](_0x4fb4b0[_0x10726b(0x1fe)][_0x10726b(0x1c0)])[_0x10726b(0x1f8)](_0x185d84=>{const _0x2dd430=_0x10726b;this['_userService'][_0x2dd430(0x1f0)](_0x185d84);}),_0x18b87d;}[_0x30354b(0x212)](_0x1321ad){const _0x524d75=_0x30354b;return{'id':_0x1321ad['id'],'threadId':_0x1321ad['threadId'],'ref':_0x1321ad[_0x524d75(0x1e8)]};}};S=Q([b(0x0,_0x5d6dec(_0x365edd)),b(0x1,_0x5d6dec(_0x3579fd)),b(0x2,_0x5d6dec(_0x4c60bb))],S);var re=Object[_0x30354b(0x1cf)],te=(_0x598a40,_0x24d176,_0x30431d,_0x536549)=>{const _0x4d4601=_0x30354b;for(var _0x186ba7=_0x536549>0x1?void 0x0:_0x536549?re(_0x24d176,_0x30431d):_0x24d176,_0x39725a=_0x598a40[_0x4d4601(0x218)]-0x1,_0x502def;_0x39725a>=0x0;_0x39725a--)(_0x502def=_0x598a40[_0x39725a])&&(_0x186ba7=_0x502def(_0x186ba7)||_0x186ba7);return _0x186ba7;},M=(_0x5405cc,_0x46c260)=>(_0x570dc2,_0x2de495)=>_0x46c260(_0x570dc2,_0x2de495,_0x5405cc);let f=class extends _0x5da71c{constructor(_0xf831b5,_0x275fe9){const _0xe016af=_0x30354b;super(),this['_threadCommentDataSourceService']=_0xf831b5,this[_0xe016af(0x1e7)]=_0x275fe9,this['_initDataSource']();}['_initDataSource'](){const _0x57b166=_0x30354b;this[_0x57b166(0x1de)][_0x57b166(0x1d0)]=this[_0x57b166(0x1e7)],this[_0x57b166(0x1de)][_0x57b166(0x1cc)]=!0x1;}};f=te([M(0x0,_0x5a2639),M(0x1,_0x5d6dec(S))],f);var se=Object[_0x30354b(0x1ec)],oe=Object[_0x30354b(0x1cf)],ne=(_0x31307d,_0x3a4205,_0x29fd13)=>_0x3a4205 in _0x31307d?se(_0x31307d,_0x3a4205,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29fd13}):_0x31307d[_0x3a4205]=_0x29fd13,ie=(_0x3daa40,_0x3a5048,_0xc3a9e1,_0x321717)=>{const _0x2932ce=_0x30354b;for(var _0x1d8deb=_0x321717>0x1?void 0x0:_0x321717?oe(_0x3a5048,_0xc3a9e1):_0x3a5048,_0x631672=_0x3daa40[_0x2932ce(0x218)]-0x1,_0x3ed4cb;_0x631672>=0x0;_0x631672--)(_0x3ed4cb=_0x3daa40[_0x631672])&&(_0x1d8deb=_0x3ed4cb(_0x1d8deb)||_0x1d8deb);return _0x1d8deb;},N=(_0x1b11cc,_0x397cea)=>(_0x325806,_0xdd6ee)=>_0x397cea(_0x325806,_0xdd6ee,_0x1b11cc),$=(_0x2078fb,_0x4ab36d,_0x41b772)=>ne(_0x2078fb,typeof _0x4ab36d!=_0x30354b(0x1cb)?_0x4ab36d+'':_0x4ab36d,_0x41b772);let g=class extends _0x3bc542{constructor(_0x28d035=O,_0x2c859d,_0x303f96){const _0x555333=_0x30354b;super(),this['_config']=_0x28d035,this[_0x555333(0x21b)]=_0x2c859d,this[_0x555333(0x1ff)]=_0x303f96;const {..._0x46bfd8}=_0x3f3339({},O,this[_0x555333(0x1d7)]);this[_0x555333(0x1ff)][_0x555333(0x1c8)](z,_0x46bfd8);}[_0x30354b(0x203)](){const _0x33a6c4=_0x30354b;[[S],[f],[_]][_0x33a6c4(0x1f8)](_0x44dd8f=>{const _0x31a5bf=_0x33a6c4;this['_injector'][_0x31a5bf(0x215)](_0x44dd8f);});}[_0x30354b(0x202)](){const _0xfc040=_0x30354b;this[_0xfc040(0x21b)][_0xfc040(0x1f2)](f),this[_0xfc040(0x21b)][_0xfc040(0x1f2)](_);}};$(g,_0x30354b(0x1c4),W),$(g,'type',_0x3bb98c[_0x30354b(0x1c5)]),g=ie([_0x413398(_0x32a910,_0x516653,_0x2125bb),N(0x1,_0x5d6dec(_0x5eef6b)),N(0x2,_0x195d4b)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5610bb=_0x4b46;(function(_0x184847,_0x52a8d0){const _0x7eb76b=_0x4b46,_0xe2865a=_0x184847();while(!![]){try{const _0x24a58a=-parseInt(_0x7eb76b(0x1d9))/0x1+parseInt(_0x7eb76b(0x219))/0x2+parseInt(_0x7eb76b(0x216))/0x3*(-parseInt(_0x7eb76b(0x21e))/0x4)+parseInt(_0x7eb76b(0x1e2))/0x5+-parseInt(_0x7eb76b(0x21f))/0x6+-parseInt(_0x7eb76b(0x1c6))/0x7*(parseInt(_0x7eb76b(0x1dd))/0x8)+parseInt(_0x7eb76b(0x1ce))/0x9*(parseInt(_0x7eb76b(0x1ec))/0xa);if(_0x24a58a===_0x52a8d0)break;else _0xe2865a['push'](_0xe2865a['shift']());}catch(_0x52b729){_0xe2865a['push'](_0xe2865a['shift']());}}}(_0x1585,0xe0fb3));import{CommentService as _0xd20b2d,CollaborationSessionService as _0x3def1e,UniverCollaborationClientPlugin as _0x4a365b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x48a04c}from'@univerjs-pro/license';function _0x1585(){const _0x2ec996=['resolved','filter','saveCommentToSnapshot','getOwnPropertyDescriptor','rangeType','get','486160GitPwV','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','1263208YhMnIt','map','format','reply','customRanges','7256850TiPoUj','_sessionService','deleteComment','onStarting','users','Add','Solve','/universer-api/comment/unit/','getMemberID','parentId','1880vuWutC','slice','userId','stringify','_threadCommentDataSource','/universer-api/user/list','_httpService','/solved','setConfig','onReady','_userService','parse','/list','replyId','forEach','getCurrentUser','error','/add','pipe','dataSource','createTimestamp','comments','solved','symbol','code','disposeWithMe','UNIVER_UNKNOWN','post','size','_configService','_initDataSource','COMMENT','ref','find','payload','length','Edit','addUser','personId','type','replies','resolveComment','3pHaGYF','delete','/reply','561794qyEWPH','_config','content','userID','Solved','3022972xvaRMc','4024824zRmGgZ','rangeId','root','unitId','Unknown','requireSession','YYYY/MM/DD\x20HH:mm','user','_init','add','body','syncUpdateMutationToColla','_threadCommentModel','35YjIrnr','Reply','threadId','commentUpdate$','_injector','/delete','UNRECOGNIZED','subscribe','90549PmlINe','listComments','_commentService','Delete','_initUserSync'];_0x1585=function(){return _0x2ec996;};return _0x1585();}import{dayjs as _0x392d07,UserManagerService as _0x449089,Inject as _0x455332,Injector as _0x4bb4d0,Disposable as _0x1b00e4,CustomRangeType as _0x53a16e,UniverInstanceType as _0x5c288c,DependentOn as _0x29f3d1,IConfigService as _0x2ba459,Plugin as _0x7e8235,merge as _0x4157ef}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5cb7b2}from'@univerjs/thread-comment-ui';function _0x4b46(_0x4cb0aa,_0x2b2fa7){const _0x1585d0=_0x1585();return _0x4b46=function(_0x4b4657,_0x15c0ed){_0x4b4657=_0x4b4657-0x1c5;let _0x1f8fbd=_0x1585d0[_0x4b4657];return _0x1f8fbd;},_0x4b46(_0x4cb0aa,_0x2b2fa7);}import{ThreadCommentModel as _0x32029d,IThreadCommentDataSourceService as _0x494393}from'@univerjs/thread-comment';import{bufferTime as _0x5195f5}from'rxjs';import{HTTPService as _0x2d4ba7}from'@univerjs/network';const W=_0x5610bb(0x1db);var I=(_0x2f98f5=>(_0x2f98f5[_0x2f98f5['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f98f5[_0x2f98f5[_0x5610bb(0x21d)]=0x1]=_0x5610bb(0x21d),_0x2f98f5[_0x2f98f5[_0x5610bb(0x1cc)]=-0x1]=_0x5610bb(0x1cc),_0x2f98f5))(I||{}),v=(_0x50c6ea=>(_0x50c6ea[_0x50c6ea[_0x5610bb(0x223)]=0x0]=_0x5610bb(0x223),_0x50c6ea[_0x50c6ea[_0x5610bb(0x1e7)]=0x1]='Add',_0x50c6ea[_0x50c6ea[_0x5610bb(0x1c7)]=0x2]=_0x5610bb(0x1c7),_0x50c6ea[_0x50c6ea['Edit']=0x3]=_0x5610bb(0x210),_0x50c6ea[_0x50c6ea[_0x5610bb(0x1d1)]=0x4]=_0x5610bb(0x1d1),_0x50c6ea[_0x50c6ea['Solve']=0x5]='Solve',_0x50c6ea[_0x50c6ea[_0x5610bb(0x1cc)]=-0x1]=_0x5610bb(0x1cc),_0x50c6ea))(v||{});const y=_0x567c62=>_0x392d07(new Date(+_0x567c62))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x8993dc,_0x22c09e)=>{const _0x8fd304=_0x5610bb,_0x4161ee=_0x8993dc[_0x8fd304(0x1d8)](_0x449089),_0x959e1e=_0x8993dc[_0x8fd304(0x1d8)](_0x2d4ba7);_0x22c09e[_0x8fd304(0x1fa)](_0x8ece08=>{const _0x5ec18e=_0x8fd304;_0x4161ee['getUser'](_0x8ece08)&&_0x22c09e[_0x5ec18e(0x217)](_0x8ece08);}),_0x22c09e[_0x8fd304(0x208)]&&(await _0x959e1e['get'](_0x8fd304(0x1f1),{'params':{'userIDs':[..._0x22c09e]}}))['body'][_0x8fd304(0x1e6)]['forEach'](_0x5e6ad4=>{const _0x16e8d3=_0x8fd304;_0x5e6ad4&&_0x4161ee[_0x16e8d3(0x211)](_0x5e6ad4);});};var K=Object[_0x5610bb(0x1d6)],V=(_0x5c54ee,_0x43f0f8,_0x3a4cc4,_0x3f8def)=>{const _0xa2b985=_0x5610bb;for(var _0x4caac5=_0x3f8def>0x1?void 0x0:_0x3f8def?K(_0x43f0f8,_0x3a4cc4):_0x43f0f8,_0x293fe2=_0x5c54ee[_0xa2b985(0x20f)]-0x1,_0x2a9caa;_0x293fe2>=0x0;_0x293fe2--)(_0x2a9caa=_0x5c54ee[_0x293fe2])&&(_0x4caac5=_0x2a9caa(_0x4caac5)||_0x4caac5);return _0x4caac5;},p=(_0x4fd3fd,_0x4570ce)=>(_0x33d901,_0x39ea34)=>_0x4570ce(_0x33d901,_0x39ea34,_0x4fd3fd);let _=class extends _0x1b00e4{constructor(_0x5cd820,_0x525435,_0x4e7bbe,_0x4d3d03){const _0x3ea377=_0x5610bb;super(),this['_commentService']=_0x5cd820,this[_0x3ea377(0x1c5)]=_0x525435,this['_userService']=_0x4e7bbe,this['_injector']=_0x4d3d03,this[_0x3ea377(0x227)](),this[_0x3ea377(0x1d2)]();}[_0x5610bb(0x1d2)](){const _0x3d04bc=_0x5610bb;this[_0x3d04bc(0x205)](this[_0x3d04bc(0x1c5)]['commentUpdate$'][_0x3d04bc(0x1fe)](_0x5195f5(0x10))[_0x3d04bc(0x1cd)](_0x25ad4a=>{const _0x4cde54=_0x3d04bc,_0x39a9a1=new Set();_0x25ad4a['forEach'](_0x24f044=>{const _0x3f350f=_0x4b46;switch(_0x24f044[_0x3f350f(0x213)]){case _0x3f350f(0x228):{const _0x5e158e=_0x24f044[_0x3f350f(0x20e)][_0x3f350f(0x212)];_0x39a9a1[_0x3f350f(0x228)](_0x5e158e);break;}}}),B(this[_0x4cde54(0x1ca)],_0x39a9a1);}));}[_0x5610bb(0x227)](){const _0x17997f=_0x5610bb;this[_0x17997f(0x205)](this[_0x17997f(0x1d0)][_0x17997f(0x1c9)][_0x17997f(0x1cd)](async _0x14a00a=>{const _0x579516=_0x17997f;var _0x5e9a3f,_0x445a88,_0x3e24c0,_0xdbdd82;const _0x24b38d=(_0x5e9a3f=this[_0x579516(0x1c5)]['getUnit'](_0x14a00a[_0x579516(0x222)])[_0x579516(0x20d)](_0x43e17d=>_0x43e17d['threadId']===_0x14a00a['threadId']))==null?void 0x0:_0x5e9a3f['root'];if(!_0x24b38d)return;const {unitId:_0x2e3edb,subUnitId:_0x3c47a8}=_0x24b38d;switch(_0x14a00a[_0x579516(0x226)]&&this[_0x579516(0x1f6)][_0x579516(0x211)](_0x14a00a[_0x579516(0x226)]),_0x14a00a[_0x579516(0x213)]){case v[_0x579516(0x1e7)]:break;case v[_0x579516(0x1c7)]:{this[_0x579516(0x1c5)][_0x579516(0x1da)](_0x2e3edb,_0x3c47a8,{'unitId':_0x2e3edb,'subUnitId':_0x3c47a8,'ref':'','id':_0x14a00a[_0x579516(0x1f9)],'dT':y(+_0x14a00a[_0x579516(0x200)]),'threadId':_0x14a00a[_0x579516(0x1c8)],'personId':(_0x3e24c0=(_0x445a88=_0x14a00a[_0x579516(0x226)])==null?void 0x0:_0x445a88['userID'])!=null?_0x3e24c0:_0x14a00a['userId'],'text':JSON['parse'](_0x14a00a[_0x579516(0x21b)]),'parentId':_0x24b38d['id']});break;}case v['Delete']:{const _0x42e133=this[_0x579516(0x1c5)]['getComment'](_0x2e3edb,_0x3c47a8,_0x14a00a[_0x579516(0x1f9)]);_0x42e133&&_0x42e133[_0x579516(0x1eb)]&&this['_threadCommentModel'][_0x579516(0x1e4)](_0x2e3edb,_0x3c47a8,_0x14a00a[_0x579516(0x1f9)]);break;}case v[_0x579516(0x210)]:{this[_0x579516(0x1c5)][_0x579516(0x1dc)](_0x2e3edb,_0x3c47a8,{'commentId':_0x14a00a[_0x579516(0x1f9)],'text':JSON['parse'](_0x14a00a[_0x579516(0x21b)])});break;}case v[_0x579516(0x1e8)]:{const _0x335e41=(_0xdbdd82=this['_threadCommentModel']['getUnit'](_0x14a00a[_0x579516(0x222)])[_0x579516(0x20d)](_0x5ce36f=>_0x5ce36f[_0x579516(0x1c8)]===_0x14a00a[_0x579516(0x1c8)]))==null?void 0x0:_0xdbdd82[_0x579516(0x221)];_0x335e41&&this[_0x579516(0x1c5)][_0x579516(0x215)](_0x2e3edb,_0x3c47a8,_0x335e41['id'],_0x14a00a[_0x579516(0x202)]===I[_0x579516(0x21d)]);break;}}}));}};_=V([p(0x0,_0x455332(_0xd20b2d)),p(0x1,_0x455332(_0x32029d)),p(0x2,_0x455332(_0x449089)),p(0x3,_0x455332(_0x4bb4d0))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5610bb(0x1d6)],Q=(_0x55413c,_0x41b05b,_0x53992a,_0x3b2093)=>{const _0x6d6dc0=_0x5610bb;for(var _0x3e53b3=_0x3b2093>0x1?void 0x0:_0x3b2093?k(_0x41b05b,_0x53992a):_0x41b05b,_0xd8d4ca=_0x55413c[_0x6d6dc0(0x20f)]-0x1,_0x2a0306;_0xd8d4ca>=0x0;_0xd8d4ca--)(_0x2a0306=_0x55413c[_0xd8d4ca])&&(_0x3e53b3=_0x2a0306(_0x3e53b3)||_0x3e53b3);return _0x3e53b3;},b=(_0x21e951,_0xdb9e98)=>(_0x4bc018,_0x1884e8)=>_0xdb9e98(_0x4bc018,_0x1884e8,_0x21e951);function X(_0x1e1a40,_0x5dd8c0){const _0x2c3192=_0x5610bb,_0x5077e0=_0x1e1a40[_0x2c3192(0x214)][0x0];return{..._0x5dd8c0,'id':_0x5077e0[_0x2c3192(0x1f9)],'resolved':_0x1e1a40[_0x2c3192(0x202)]===0x1,'dT':y(_0x5077e0[_0x2c3192(0x200)]),'personId':_0x5077e0[_0x2c3192(0x1ee)],'threadId':_0x5077e0[_0x2c3192(0x1c8)]};}function ee(_0xa684e3,_0x2bb074,_0x40eafa){const _0x42993d=_0x5610bb;var _0x322c1f,_0x1b18fc;if(((_0x1b18fc=(_0x322c1f=_0xa684e3==null?void 0x0:_0xa684e3[_0x42993d(0x214)])==null?void 0x0:_0x322c1f[_0x42993d(0x20f)])!=null?_0x1b18fc:0x0)>0x0){const _0x497360=(_0x460dd9,_0x3618a4)=>({'id':_0x460dd9['replyId'],'threadId':_0x460dd9[_0x42993d(0x1c8)],'dT':y(_0x460dd9[_0x42993d(0x200)]),'personId':_0x460dd9['userId'],'resolved':_0xa684e3[_0x42993d(0x202)]===I[_0x42993d(0x21d)],'unitId':_0x2bb074,'subUnitId':_0x40eafa,'text':JSON[_0x42993d(0x1f7)](_0x460dd9[_0x42993d(0x21b)]),'parentId':_0x3618a4}),_0x3f889a=_0x497360(_0xa684e3['replies'][0x0]);return{..._0x3f889a,'children':_0xa684e3[_0x42993d(0x214)][_0x42993d(0x1ed)](0x1)['map'](_0xa35415=>_0x497360(_0xa35415,_0x3f889a['id']))};}return null;}let S=class{constructor(_0x1160bc,_0x208408,_0x473828){const _0x5d409c=_0x5610bb;this[_0x5d409c(0x1f2)]=_0x1160bc,this[_0x5d409c(0x1f6)]=_0x208408,this[_0x5d409c(0x1e3)]=_0x473828;}async[_0x5610bb(0x1da)](_0x25b723){const _0x5dc2fb=_0x5610bb;var _0x3f0b7d,_0x35d368;const {parentId:_0x46f8b9,unitId:_0x2b29bc,text:_0x26232a,threadId:_0x25c1ed}=_0x25b723,_0x51b488=(_0x35d368=(_0x3f0b7d=_0x26232a[_0x5dc2fb(0x1e1)])==null?void 0x0:_0x3f0b7d[_0x5dc2fb(0x1d4)](_0xafdfa5=>_0xafdfa5[_0x5dc2fb(0x1d7)]===_0x53a16e[_0x5dc2fb(0x20b)])[_0x5dc2fb(0x1de)](_0x33f93c=>_0x33f93c[_0x5dc2fb(0x220)]))!=null?_0x35d368:[],_0x16c4aa=JSON[_0x5dc2fb(0x1ef)](_0x26232a),_0x571e8d=(await this[_0x5dc2fb(0x1e3)][_0x5dc2fb(0x224)](_0x2b29bc))[_0x5dc2fb(0x1ea)]();if(_0x46f8b9){const _0x53651f={'memberId':_0x571e8d,'unitId':_0x2b29bc,'content':_0x16c4aa,'mention':_0x51b488,'threadId':_0x25c1ed},_0x5c7f8d=(await this[_0x5dc2fb(0x1f2)]['post'](_0x5dc2fb(0x1e9)+_0x2b29bc+_0x5dc2fb(0x218),{'body':_0x53651f}))[_0x5dc2fb(0x229)][_0x5dc2fb(0x1e0)];return{..._0x25b723,'id':_0x5c7f8d['replyId'],'dT':_0x392d07(+_0x5c7f8d[_0x5dc2fb(0x200)])[_0x5dc2fb(0x1df)](_0x5dc2fb(0x225)),'personId':_0x5c7f8d[_0x5dc2fb(0x1ee)]};}else{const _0x2ee321={'memberId':_0x571e8d,'unitId':_0x2b29bc,'content':_0x16c4aa,'mention':_0x51b488},_0x841fc0=await this[_0x5dc2fb(0x1f2)]['post'](_0x5dc2fb(0x1e9)+_0x2b29bc+_0x5dc2fb(0x1fd),{'body':_0x2ee321});return X(_0x841fc0[_0x5dc2fb(0x229)]['comment'],_0x25b723);}}async[_0x5610bb(0x1dc)](_0x1b73c1){const _0x382cda=_0x5610bb;var _0x223723,_0x26f1a3;const {text:_0x107ec6,unitId:_0x58002e}=_0x1b73c1,_0x3932db=(_0x26f1a3=(_0x223723=_0x107ec6[_0x382cda(0x1e1)])==null?void 0x0:_0x223723['filter'](_0x4f543c=>_0x4f543c['rangeType']===_0x53a16e[_0x382cda(0x20b)])['map'](_0x990b15=>_0x990b15['rangeId']))!=null?_0x26f1a3:[],_0x3762c5=JSON[_0x382cda(0x1ef)](_0x107ec6),_0x11161a=_0x1b73c1['threadId'],_0x216930=_0x1b73c1['id'],_0x305c51={'memberId':(await this[_0x382cda(0x1e3)][_0x382cda(0x224)](_0x58002e))['getMemberID'](),'unitId':_0x58002e,'threadId':_0x11161a,'mention':_0x3932db,'content':_0x3762c5,'replyId':_0x216930},_0x947639=await this['_httpService'][_0x382cda(0x207)](_0x382cda(0x1e9)+_0x58002e+'/edit',{'body':_0x305c51});return!_0x947639[_0x382cda(0x229)]['error']||_0x947639[_0x382cda(0x229)][_0x382cda(0x1fc)][_0x382cda(0x204)]===0x1;}async[_0x5610bb(0x215)](_0x15489f){const _0x32b196=_0x5610bb,{unitId:_0x4ce3a6}=_0x15489f,_0x101026=_0x15489f[_0x32b196(0x1c8)],_0x3975f1={'memberId':this[_0x32b196(0x1f6)][_0x32b196(0x1fb)]()[_0x32b196(0x21c)],'unitId':_0x4ce3a6,'threadId':_0x101026,'solved':_0x15489f[_0x32b196(0x1d3)]?I['Solved']:I['OpenOrReOpen']},_0x2ac46e=await this[_0x32b196(0x1f2)][_0x32b196(0x207)](_0x32b196(0x1e9)+_0x4ce3a6+_0x32b196(0x1f3),{'body':_0x3975f1});return!_0x2ac46e[_0x32b196(0x229)][_0x32b196(0x1fc)]||_0x2ac46e[_0x32b196(0x229)][_0x32b196(0x1fc)][_0x32b196(0x204)]===0x1;}async['deleteComment'](_0x3af680,_0x1aba66,_0x573dcf,_0x1cd34f){const _0x4cb2d5=_0x5610bb,_0x5b58fc={'memberId':(await this[_0x4cb2d5(0x1e3)][_0x4cb2d5(0x224)](_0x3af680))[_0x4cb2d5(0x1ea)](),'threadId':_0x573dcf,'replyId':_0x1cd34f,'unitId':_0x3af680},_0x15544b=await this[_0x4cb2d5(0x1f2)][_0x4cb2d5(0x207)](_0x4cb2d5(0x1e9)+_0x3af680+_0x4cb2d5(0x1cb),{'body':_0x5b58fc});return!_0x15544b[_0x4cb2d5(0x229)][_0x4cb2d5(0x1fc)]||_0x15544b[_0x4cb2d5(0x229)]['error']['code']===0x1;}async[_0x5610bb(0x1cf)](_0x537e2b,_0x11a594,_0x3add34){const _0xba2b1c=_0x5610bb,_0x17b053={'unitId':_0x537e2b,'threadId':_0x3add34},_0x50b3f0=await this['_httpService']['post'](_0xba2b1c(0x1e9)+_0x537e2b+_0xba2b1c(0x1f8),{'body':_0x17b053}),_0x44cc2e=_0x3add34[_0xba2b1c(0x1de)](_0x48c2ce=>ee(_0x50b3f0[_0xba2b1c(0x229)][_0xba2b1c(0x201)][_0x48c2ce],_0x537e2b,_0x11a594))[_0xba2b1c(0x1d4)](Boolean);return Object['values'](_0x50b3f0['body'][_0xba2b1c(0x1e6)])['forEach'](_0x2ed906=>{const _0x3813a5=_0xba2b1c;this[_0x3813a5(0x1f6)]['addUser'](_0x2ed906);}),_0x44cc2e;}[_0x5610bb(0x1d5)](_0x3abce1){const _0x2c7d13=_0x5610bb;return{'id':_0x3abce1['id'],'threadId':_0x3abce1[_0x2c7d13(0x1c8)],'ref':_0x3abce1[_0x2c7d13(0x20c)]};}};S=Q([b(0x0,_0x455332(_0x2d4ba7)),b(0x1,_0x455332(_0x449089)),b(0x2,_0x455332(_0x3def1e))],S);var re=Object[_0x5610bb(0x1d6)],te=(_0x831341,_0x3513eb,_0x234f23,_0x30b98b)=>{const _0x9f833a=_0x5610bb;for(var _0x522555=_0x30b98b>0x1?void 0x0:_0x30b98b?re(_0x3513eb,_0x234f23):_0x3513eb,_0x1f3432=_0x831341[_0x9f833a(0x20f)]-0x1,_0xa27078;_0x1f3432>=0x0;_0x1f3432--)(_0xa27078=_0x831341[_0x1f3432])&&(_0x522555=_0xa27078(_0x522555)||_0x522555);return _0x522555;},M=(_0x4c887d,_0x2943fc)=>(_0x3daa2e,_0x57a8ea)=>_0x2943fc(_0x3daa2e,_0x57a8ea,_0x4c887d);let f=class extends _0x1b00e4{constructor(_0x1d8bea,_0x2f55a2){const _0x5af7f6=_0x5610bb;super(),this['_threadCommentDataSourceService']=_0x1d8bea,this[_0x5af7f6(0x1f0)]=_0x2f55a2,this[_0x5af7f6(0x20a)]();}['_initDataSource'](){const _0x2e295c=_0x5610bb;this['_threadCommentDataSourceService'][_0x2e295c(0x1ff)]=this[_0x2e295c(0x1f0)],this['_threadCommentDataSourceService'][_0x2e295c(0x22a)]=!0x1;}};f=te([M(0x0,_0x494393),M(0x1,_0x455332(S))],f);var se=Object['defineProperty'],oe=Object[_0x5610bb(0x1d6)],ne=(_0x4d14ea,_0x1b3859,_0x993920)=>_0x1b3859 in _0x4d14ea?se(_0x4d14ea,_0x1b3859,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x993920}):_0x4d14ea[_0x1b3859]=_0x993920,ie=(_0x2d455c,_0x460207,_0x415dc2,_0x48fcac)=>{const _0x243797=_0x5610bb;for(var _0x16be0b=_0x48fcac>0x1?void 0x0:_0x48fcac?oe(_0x460207,_0x415dc2):_0x460207,_0x25f0e9=_0x2d455c[_0x243797(0x20f)]-0x1,_0x5a2560;_0x25f0e9>=0x0;_0x25f0e9--)(_0x5a2560=_0x2d455c[_0x25f0e9])&&(_0x16be0b=_0x5a2560(_0x16be0b)||_0x16be0b);return _0x16be0b;},N=(_0x4e1a08,_0x2b6b4a)=>(_0x1ae8ec,_0x574dbb)=>_0x2b6b4a(_0x1ae8ec,_0x574dbb,_0x4e1a08),$=(_0x5f140d,_0x313e96,_0x208589)=>ne(_0x5f140d,typeof _0x313e96!=_0x5610bb(0x203)?_0x313e96+'':_0x313e96,_0x208589);let g=class extends _0x7e8235{constructor(_0x536d0d=O,_0x22daad,_0x30e74d){const _0x5344bf=_0x5610bb;super(),this[_0x5344bf(0x21a)]=_0x536d0d,this[_0x5344bf(0x1ca)]=_0x22daad,this[_0x5344bf(0x209)]=_0x30e74d;const {..._0x1f999d}=_0x4157ef({},O,this[_0x5344bf(0x21a)]);this[_0x5344bf(0x209)][_0x5344bf(0x1f4)](z,_0x1f999d);}[_0x5610bb(0x1e5)](){const _0x1ff5f3=_0x5610bb;[[S],[f],[_]][_0x1ff5f3(0x1fa)](_0x9dce14=>{const _0x16f67e=_0x1ff5f3;this['_injector'][_0x16f67e(0x228)](_0x9dce14);});}[_0x5610bb(0x1f5)](){const _0x541734=_0x5610bb;this['_injector'][_0x541734(0x1d8)](f),this[_0x541734(0x1ca)][_0x541734(0x1d8)](_);}};$(g,'pluginName',W),$(g,_0x5610bb(0x213),_0x5c288c[_0x5610bb(0x206)]),g=ie([_0x29f3d1(_0x5cb7b2,_0x4a365b,_0x48a04c),N(0x1,_0x455332(_0x4bb4d0)),N(0x2,_0x2ba459)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x30354b=_0x6b72;(function(_0x19d239,_0x4952ed){const _0x4ca1fb=_0x6b72,_0x19fe23=_0x19d239();while(!![]){try{const _0x3084f5=-parseInt(_0x4ca1fb(0x1f4))/0x1+parseInt(_0x4ca1fb(0x208))/0x2*(parseInt(_0x4ca1fb(0x1da))/0x3)+-parseInt(_0x4ca1fb(0x1db))/0x4*(parseInt(_0x4ca1fb(0x1ed))/0x5)+parseInt(_0x4ca1fb(0x200))/0x6*(parseInt(_0x4ca1fb(0x205))/0x7)+parseInt(_0x4ca1fb(0x1dd))/0x8*(parseInt(_0x4ca1fb(0x222))/0x9)+parseInt(_0x4ca1fb(0x1e1))/0xa*(-parseInt(_0x4ca1fb(0x20d))/0xb)+-parseInt(_0x4ca1fb(0x21e))/0xc*(-parseInt(_0x4ca1fb(0x1d6))/0xd);if(_0x3084f5===_0x4952ed)break;else _0x19fe23['push'](_0x19fe23['shift']());}catch(_0x39d700){_0x19fe23['push'](_0x19fe23['shift']());}}}(_0x403e,0x81e18));import{CommentService as _0x3237e5,CollaborationSessionService as _0x4c60bb,UniverCollaborationClientPlugin as _0x516653}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2125bb}from'@univerjs-pro/license';import{dayjs as _0x4a080f,UserManagerService as _0x3579fd,Inject as _0x5d6dec,Injector as _0x5eef6b,Disposable as _0x5da71c,CustomRangeType as _0x300af4,UniverInstanceType as _0x3bb98c,DependentOn as _0x413398,IConfigService as _0x195d4b,Plugin as _0x3bc542,merge as _0x3f3339}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x32a910}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59f117,IThreadCommentDataSourceService as _0x5a2639}from'@univerjs/thread-comment';import{bufferTime as _0x298b90}from'rxjs';import{HTTPService as _0x365edd}from'@univerjs/network';const W=_0x30354b(0x213);var I=(_0x42d073=>(_0x42d073[_0x42d073['OpenOrReOpen']=0x0]=_0x30354b(0x20c),_0x42d073[_0x42d073[_0x30354b(0x1c9)]=0x1]=_0x30354b(0x1c9),_0x42d073[_0x42d073[_0x30354b(0x228)]=-0x1]=_0x30354b(0x228),_0x42d073))(I||{}),v=(_0xdac16d=>(_0xdac16d[_0xdac16d[_0x30354b(0x227)]=0x0]=_0x30354b(0x227),_0xdac16d[_0xdac16d[_0x30354b(0x1eb)]=0x1]=_0x30354b(0x1eb),_0xdac16d[_0xdac16d['Reply']=0x2]=_0x30354b(0x206),_0xdac16d[_0xdac16d[_0x30354b(0x1e6)]=0x3]=_0x30354b(0x1e6),_0xdac16d[_0xdac16d[_0x30354b(0x21c)]=0x4]=_0x30354b(0x21c),_0xdac16d[_0xdac16d[_0x30354b(0x1f9)]=0x5]=_0x30354b(0x1f9),_0xdac16d[_0xdac16d[_0x30354b(0x228)]=-0x1]='UNRECOGNIZED',_0xdac16d))(v||{});function _0x6b72(_0x14a30b,_0x560ebb){const _0x403ee1=_0x403e();return _0x6b72=function(_0x6b7255,_0x530bbb){_0x6b7255=_0x6b7255-0x1bf;let _0x1ed82a=_0x403ee1[_0x6b7255];return _0x1ed82a;},_0x6b72(_0x14a30b,_0x560ebb);}const y=_0x20d043=>_0x4a080f(new Date(+_0x20d043))[_0x30354b(0x1dc)](_0x30354b(0x1ea)),B=async(_0x8aafcb,_0x268328)=>{const _0x272da7=_0x30354b,_0x5a6e33=_0x8aafcb[_0x272da7(0x1f2)](_0x3579fd),_0x4580be=_0x8aafcb['get'](_0x365edd);_0x268328[_0x272da7(0x1f8)](_0x5b728e=>{const _0x20658e=_0x272da7;_0x5a6e33['getUser'](_0x5b728e)&&_0x268328[_0x20658e(0x1cd)](_0x5b728e);}),_0x268328[_0x272da7(0x20e)]&&(await _0x4580be[_0x272da7(0x1f2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x268328]}}))['body'][_0x272da7(0x1c0)][_0x272da7(0x1f8)](_0x3d3b14=>{_0x3d3b14&&_0x5a6e33['addUser'](_0x3d3b14);});};var K=Object[_0x30354b(0x1cf)],V=(_0x21890e,_0x355929,_0x52281e,_0x33a0bb)=>{for(var _0x2d5ee7=_0x33a0bb>0x1?void 0x0:_0x33a0bb?K(_0x355929,_0x52281e):_0x355929,_0x64e2f4=_0x21890e['length']-0x1,_0x187cda;_0x64e2f4>=0x0;_0x64e2f4--)(_0x187cda=_0x21890e[_0x64e2f4])&&(_0x2d5ee7=_0x187cda(_0x2d5ee7)||_0x2d5ee7);return _0x2d5ee7;},p=(_0x32e8d0,_0x11768a)=>(_0xb1bcde,_0x41d10e)=>_0x11768a(_0xb1bcde,_0x41d10e,_0x32e8d0);function _0x403e(){const _0x9332c1=['383411wVdAmB','Reply','_threadCommentModel','973118bKoQQJ','unitId','parentId','post','OpenOrReOpen','8591EPYukU','size','map','deleteComment','/edit','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','add','code','requireSession','length','find','_userService','_injector','Delete','thread-comment-data-source.config','12RTfxpP','disposeWithMe','customRanges','content','3332061xALvhp','type','COMMENT','subscribe','resolveComment','Unknown','UNRECOGNIZED','userID','rangeType','users','commentUpdate$','updateComment','userId','pluginName','UNIVER_UNKNOWN','/reply','parse','setConfig','Solved','user','symbol','syncUpdateMutationToColla','delete','getMemberID','getOwnPropertyDescriptor','dataSource','_httpService','/universer-api/comment/unit/','rangeId','error','replies','8514857XxTsix','_config','personId','replyId','3enWGLm','2360572tLMfeG','format','16yJVYPp','_threadCommentDataSourceService','root','stringify','12940bAyFEK','getComment','resolved','addComment','solved','Edit','_threadCommentDataSource','ref','getUnit','YYYY/MM/DD\x20HH:mm','Add','defineProperty','5tfTzCe','slice','comment','addUser','_commentService','get','_initUserSync','789944uVQuGT','pipe','_sessionService','threadId','forEach','Solve','values','_init','filter','comments','body','_configService','114URdPkj','/list','onReady','onStarting','createTimestamp'];_0x403e=function(){return _0x9332c1;};return _0x403e();}let _=class extends _0x5da71c{constructor(_0x5774e9,_0xcf3eec,_0x1b0940,_0x585d2e){const _0xaf08c6=_0x30354b;super(),this[_0xaf08c6(0x1f1)]=_0x5774e9,this[_0xaf08c6(0x207)]=_0xcf3eec,this[_0xaf08c6(0x21a)]=_0x1b0940,this['_injector']=_0x585d2e,this[_0xaf08c6(0x1fb)](),this[_0xaf08c6(0x1f3)]();}[_0x30354b(0x1f3)](){const _0x5d96f1=_0x30354b;this[_0x5d96f1(0x21f)](this[_0x5d96f1(0x207)]['commentUpdate$'][_0x5d96f1(0x1f5)](_0x298b90(0x10))[_0x5d96f1(0x225)](_0x3cef68=>{const _0x39e980=_0x5d96f1,_0x2e0b23=new Set();_0x3cef68[_0x39e980(0x1f8)](_0x20cf2e=>{const _0x253361=_0x39e980;switch(_0x20cf2e['type']){case _0x253361(0x215):{const _0x5c43f4=_0x20cf2e['payload'][_0x253361(0x1d8)];_0x2e0b23[_0x253361(0x215)](_0x5c43f4);break;}}}),B(this['_injector'],_0x2e0b23);}));}[_0x30354b(0x1fb)](){const _0x223fc0=_0x30354b;this[_0x223fc0(0x21f)](this[_0x223fc0(0x1f1)][_0x223fc0(0x1c1)][_0x223fc0(0x225)](async _0x306253=>{const _0x189772=_0x223fc0;var _0xb394a0,_0x2503e5,_0x5a8b8e,_0xa435aa;const _0x2b3317=(_0xb394a0=this['_threadCommentModel']['getUnit'](_0x306253['unitId'])[_0x189772(0x219)](_0x5c3c51=>_0x5c3c51[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xb394a0[_0x189772(0x1df)];if(!_0x2b3317)return;const {unitId:_0x4f9c5f,subUnitId:_0x5e762c}=_0x2b3317;switch(_0x306253['user']&&this[_0x189772(0x21a)]['addUser'](_0x306253[_0x189772(0x1ca)]),_0x306253[_0x189772(0x223)]){case v[_0x189772(0x1eb)]:break;case v[_0x189772(0x206)]:{this['_threadCommentModel'][_0x189772(0x1e4)](_0x4f9c5f,_0x5e762c,{'unitId':_0x4f9c5f,'subUnitId':_0x5e762c,'ref':'','id':_0x306253[_0x189772(0x1d9)],'dT':y(+_0x306253['createTimestamp']),'threadId':_0x306253['threadId'],'personId':(_0x5a8b8e=(_0x2503e5=_0x306253[_0x189772(0x1ca)])==null?void 0x0:_0x2503e5['userID'])!=null?_0x5a8b8e:_0x306253[_0x189772(0x1c3)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)]),'parentId':_0x2b3317['id']});break;}case v[_0x189772(0x21c)]:{const _0x54e3ac=this['_threadCommentModel'][_0x189772(0x1e2)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);_0x54e3ac&&_0x54e3ac[_0x189772(0x20a)]&&this[_0x189772(0x207)][_0x189772(0x210)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);break;}case v[_0x189772(0x1e6)]:{this[_0x189772(0x207)][_0x189772(0x1c2)](_0x4f9c5f,_0x5e762c,{'commentId':_0x306253[_0x189772(0x1d9)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)])});break;}case v[_0x189772(0x1f9)]:{const _0x1dfc6d=(_0xa435aa=this['_threadCommentModel'][_0x189772(0x1e9)](_0x306253[_0x189772(0x209)])[_0x189772(0x219)](_0xc6f364=>_0xc6f364[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xa435aa[_0x189772(0x1df)];_0x1dfc6d&&this[_0x189772(0x207)][_0x189772(0x226)](_0x4f9c5f,_0x5e762c,_0x1dfc6d['id'],_0x306253[_0x189772(0x1e5)]===I[_0x189772(0x1c9)]);break;}}}));}};_=V([p(0x0,_0x5d6dec(_0x3237e5)),p(0x1,_0x5d6dec(_0x59f117)),p(0x2,_0x5d6dec(_0x3579fd)),p(0x3,_0x5d6dec(_0x5eef6b))],_);const z=_0x30354b(0x21d),O={};var k=Object[_0x30354b(0x1cf)],Q=(_0x19cddd,_0x41e075,_0x110441,_0x40c97a)=>{for(var _0x5f18a9=_0x40c97a>0x1?void 0x0:_0x40c97a?k(_0x41e075,_0x110441):_0x41e075,_0xb79e8d=_0x19cddd['length']-0x1,_0x339154;_0xb79e8d>=0x0;_0xb79e8d--)(_0x339154=_0x19cddd[_0xb79e8d])&&(_0x5f18a9=_0x339154(_0x5f18a9)||_0x5f18a9);return _0x5f18a9;},b=(_0x5a3fb1,_0xa9a51c)=>(_0x4b0db5,_0xefe791)=>_0xa9a51c(_0x4b0db5,_0xefe791,_0x5a3fb1);function X(_0x36f817,_0x281e45){const _0x55f41a=_0x30354b,_0x1c0013=_0x36f817[_0x55f41a(0x1d5)][0x0];return{..._0x281e45,'id':_0x1c0013[_0x55f41a(0x1d9)],'resolved':_0x36f817[_0x55f41a(0x1e5)]===0x1,'dT':y(_0x1c0013[_0x55f41a(0x204)]),'personId':_0x1c0013[_0x55f41a(0x1c3)],'threadId':_0x1c0013[_0x55f41a(0x1f7)]};}function ee(_0x3eaaa7,_0x343457,_0x2dea6a){const _0x1e3ae5=_0x30354b;var _0x32a9d1,_0x13361f;if(((_0x13361f=(_0x32a9d1=_0x3eaaa7==null?void 0x0:_0x3eaaa7[_0x1e3ae5(0x1d5)])==null?void 0x0:_0x32a9d1[_0x1e3ae5(0x218)])!=null?_0x13361f:0x0)>0x0){const _0x55c69a=(_0x12250c,_0x17f27b)=>({'id':_0x12250c['replyId'],'threadId':_0x12250c[_0x1e3ae5(0x1f7)],'dT':y(_0x12250c['createTimestamp']),'personId':_0x12250c[_0x1e3ae5(0x1c3)],'resolved':_0x3eaaa7[_0x1e3ae5(0x1e5)]===I[_0x1e3ae5(0x1c9)],'unitId':_0x343457,'subUnitId':_0x2dea6a,'text':JSON[_0x1e3ae5(0x1c7)](_0x12250c[_0x1e3ae5(0x221)]),'parentId':_0x17f27b}),_0x3beb10=_0x55c69a(_0x3eaaa7[_0x1e3ae5(0x1d5)][0x0]);return{..._0x3beb10,'children':_0x3eaaa7[_0x1e3ae5(0x1d5)][_0x1e3ae5(0x1ee)](0x1)[_0x1e3ae5(0x20f)](_0x16f8d6=>_0x55c69a(_0x16f8d6,_0x3beb10['id']))};}return null;}let S=class{constructor(_0x9ec1cb,_0x27ca8d,_0x27c967){const _0x232620=_0x30354b;this[_0x232620(0x1d1)]=_0x9ec1cb,this[_0x232620(0x21a)]=_0x27ca8d,this[_0x232620(0x1f6)]=_0x27c967;}async['addComment'](_0x4b86a9){const _0x4ef882=_0x30354b;var _0x1a9947,_0x4e5133;const {parentId:_0x9ad8ae,unitId:_0x3c85c6,text:_0x10e433,threadId:_0xf825cc}=_0x4b86a9,_0x10154d=(_0x4e5133=(_0x1a9947=_0x10e433['customRanges'])==null?void 0x0:_0x1a9947[_0x4ef882(0x1fc)](_0x527b20=>_0x527b20[_0x4ef882(0x1bf)]===_0x300af4[_0x4ef882(0x224)])[_0x4ef882(0x20f)](_0x3f9ab0=>_0x3f9ab0[_0x4ef882(0x1d3)]))!=null?_0x4e5133:[],_0x159a50=JSON[_0x4ef882(0x1e0)](_0x10e433),_0x350a15=(await this[_0x4ef882(0x1f6)]['requireSession'](_0x3c85c6))[_0x4ef882(0x1ce)]();if(_0x9ad8ae){const _0xba2370={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d,'threadId':_0xf825cc},_0x558d6a=(await this[_0x4ef882(0x1d1)]['post'](_0x4ef882(0x1d2)+_0x3c85c6+_0x4ef882(0x1c6),{'body':_0xba2370}))[_0x4ef882(0x1fe)]['reply'];return{..._0x4b86a9,'id':_0x558d6a['replyId'],'dT':_0x4a080f(+_0x558d6a['createTimestamp'])[_0x4ef882(0x1dc)](_0x4ef882(0x1ea)),'personId':_0x558d6a[_0x4ef882(0x1c3)]};}else{const _0xa33ed1={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d},_0xab587f=await this[_0x4ef882(0x1d1)]['post']('/universer-api/comment/unit/'+_0x3c85c6+'/add',{'body':_0xa33ed1});return X(_0xab587f['body'][_0x4ef882(0x1ef)],_0x4b86a9);}}async[_0x30354b(0x1c2)](_0x570878){const _0x49df70=_0x30354b;var _0x22914d,_0x1f5466;const {text:_0x22ac6f,unitId:_0x2adb4a}=_0x570878,_0x10cf20=(_0x1f5466=(_0x22914d=_0x22ac6f[_0x49df70(0x220)])==null?void 0x0:_0x22914d[_0x49df70(0x1fc)](_0x5b765f=>_0x5b765f[_0x49df70(0x1bf)]===_0x300af4['COMMENT'])['map'](_0xd3e42c=>_0xd3e42c[_0x49df70(0x1d3)]))!=null?_0x1f5466:[],_0x432927=JSON['stringify'](_0x22ac6f),_0x483e67=_0x570878[_0x49df70(0x1f7)],_0x6e2278=_0x570878['id'],_0x1ff66b={'memberId':(await this[_0x49df70(0x1f6)][_0x49df70(0x217)](_0x2adb4a))[_0x49df70(0x1ce)](),'unitId':_0x2adb4a,'threadId':_0x483e67,'mention':_0x10cf20,'content':_0x432927,'replyId':_0x6e2278},_0x381ad0=await this[_0x49df70(0x1d1)][_0x49df70(0x20b)](_0x49df70(0x1d2)+_0x2adb4a+_0x49df70(0x211),{'body':_0x1ff66b});return!_0x381ad0[_0x49df70(0x1fe)]['error']||_0x381ad0[_0x49df70(0x1fe)]['error']['code']===0x1;}async[_0x30354b(0x226)](_0x176f6d){const _0x505721=_0x30354b,{unitId:_0x31bafc}=_0x176f6d,_0x2b72da=_0x176f6d[_0x505721(0x1f7)],_0xbe1d01={'memberId':this['_userService']['getCurrentUser']()[_0x505721(0x229)],'unitId':_0x31bafc,'threadId':_0x2b72da,'solved':_0x176f6d[_0x505721(0x1e3)]?I[_0x505721(0x1c9)]:I['OpenOrReOpen']},_0x201375=await this[_0x505721(0x1d1)][_0x505721(0x20b)](_0x505721(0x1d2)+_0x31bafc+'/solved',{'body':_0xbe1d01});return!_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]||_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]['code']===0x1;}async[_0x30354b(0x210)](_0x219348,_0x1d741d,_0x11aeff,_0x1a4e81){const _0x2e3dc2=_0x30354b,_0x972fec={'memberId':(await this[_0x2e3dc2(0x1f6)][_0x2e3dc2(0x217)](_0x219348))[_0x2e3dc2(0x1ce)](),'threadId':_0x11aeff,'replyId':_0x1a4e81,'unitId':_0x219348},_0x1ec068=await this[_0x2e3dc2(0x1d1)][_0x2e3dc2(0x20b)]('/universer-api/comment/unit/'+_0x219348+'/delete',{'body':_0x972fec});return!_0x1ec068[_0x2e3dc2(0x1fe)]['error']||_0x1ec068[_0x2e3dc2(0x1fe)][_0x2e3dc2(0x1d4)][_0x2e3dc2(0x216)]===0x1;}async[_0x30354b(0x214)](_0x3f44f7,_0x5dbb05,_0x103c7f){const _0x10726b=_0x30354b,_0x59a161={'unitId':_0x3f44f7,'threadId':_0x103c7f},_0x4fb4b0=await this[_0x10726b(0x1d1)][_0x10726b(0x20b)]('/universer-api/comment/unit/'+_0x3f44f7+_0x10726b(0x201),{'body':_0x59a161}),_0x18b87d=_0x103c7f[_0x10726b(0x20f)](_0x2805f5=>ee(_0x4fb4b0['body'][_0x10726b(0x1fd)][_0x2805f5],_0x3f44f7,_0x5dbb05))[_0x10726b(0x1fc)](Boolean);return Object[_0x10726b(0x1fa)](_0x4fb4b0[_0x10726b(0x1fe)][_0x10726b(0x1c0)])[_0x10726b(0x1f8)](_0x185d84=>{const _0x2dd430=_0x10726b;this['_userService'][_0x2dd430(0x1f0)](_0x185d84);}),_0x18b87d;}[_0x30354b(0x212)](_0x1321ad){const _0x524d75=_0x30354b;return{'id':_0x1321ad['id'],'threadId':_0x1321ad['threadId'],'ref':_0x1321ad[_0x524d75(0x1e8)]};}};S=Q([b(0x0,_0x5d6dec(_0x365edd)),b(0x1,_0x5d6dec(_0x3579fd)),b(0x2,_0x5d6dec(_0x4c60bb))],S);var re=Object[_0x30354b(0x1cf)],te=(_0x598a40,_0x24d176,_0x30431d,_0x536549)=>{const _0x4d4601=_0x30354b;for(var _0x186ba7=_0x536549>0x1?void 0x0:_0x536549?re(_0x24d176,_0x30431d):_0x24d176,_0x39725a=_0x598a40[_0x4d4601(0x218)]-0x1,_0x502def;_0x39725a>=0x0;_0x39725a--)(_0x502def=_0x598a40[_0x39725a])&&(_0x186ba7=_0x502def(_0x186ba7)||_0x186ba7);return _0x186ba7;},M=(_0x5405cc,_0x46c260)=>(_0x570dc2,_0x2de495)=>_0x46c260(_0x570dc2,_0x2de495,_0x5405cc);let f=class extends _0x5da71c{constructor(_0xf831b5,_0x275fe9){const _0xe016af=_0x30354b;super(),this['_threadCommentDataSourceService']=_0xf831b5,this[_0xe016af(0x1e7)]=_0x275fe9,this['_initDataSource']();}['_initDataSource'](){const _0x57b166=_0x30354b;this[_0x57b166(0x1de)][_0x57b166(0x1d0)]=this[_0x57b166(0x1e7)],this[_0x57b166(0x1de)][_0x57b166(0x1cc)]=!0x1;}};f=te([M(0x0,_0x5a2639),M(0x1,_0x5d6dec(S))],f);var se=Object[_0x30354b(0x1ec)],oe=Object[_0x30354b(0x1cf)],ne=(_0x31307d,_0x3a4205,_0x29fd13)=>_0x3a4205 in _0x31307d?se(_0x31307d,_0x3a4205,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29fd13}):_0x31307d[_0x3a4205]=_0x29fd13,ie=(_0x3daa40,_0x3a5048,_0xc3a9e1,_0x321717)=>{const _0x2932ce=_0x30354b;for(var _0x1d8deb=_0x321717>0x1?void 0x0:_0x321717?oe(_0x3a5048,_0xc3a9e1):_0x3a5048,_0x631672=_0x3daa40[_0x2932ce(0x218)]-0x1,_0x3ed4cb;_0x631672>=0x0;_0x631672--)(_0x3ed4cb=_0x3daa40[_0x631672])&&(_0x1d8deb=_0x3ed4cb(_0x1d8deb)||_0x1d8deb);return _0x1d8deb;},N=(_0x1b11cc,_0x397cea)=>(_0x325806,_0xdd6ee)=>_0x397cea(_0x325806,_0xdd6ee,_0x1b11cc),$=(_0x2078fb,_0x4ab36d,_0x41b772)=>ne(_0x2078fb,typeof _0x4ab36d!=_0x30354b(0x1cb)?_0x4ab36d+'':_0x4ab36d,_0x41b772);let g=class extends _0x3bc542{constructor(_0x28d035=O,_0x2c859d,_0x303f96){const _0x555333=_0x30354b;super(),this['_config']=_0x28d035,this[_0x555333(0x21b)]=_0x2c859d,this[_0x555333(0x1ff)]=_0x303f96;const {..._0x46bfd8}=_0x3f3339({},O,this[_0x555333(0x1d7)]);this[_0x555333(0x1ff)][_0x555333(0x1c8)](z,_0x46bfd8);}[_0x30354b(0x203)](){const _0x33a6c4=_0x30354b;[[S],[f],[_]][_0x33a6c4(0x1f8)](_0x44dd8f=>{const _0x31a5bf=_0x33a6c4;this['_injector'][_0x31a5bf(0x215)](_0x44dd8f);});}[_0x30354b(0x202)](){const _0xfc040=_0x30354b;this[_0xfc040(0x21b)][_0xfc040(0x1f2)](f),this[_0xfc040(0x21b)][_0xfc040(0x1f2)](_);}};$(g,_0x30354b(0x1c4),W),$(g,'type',_0x3bb98c[_0x30354b(0x1c5)]),g=ie([_0x413398(_0x32a910,_0x516653,_0x2125bb),N(0x1,_0x5d6dec(_0x5eef6b)),N(0x2,_0x195d4b)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4c6e(){const _0x39a7ea=['@univerjs/thread-comment','parse','listComments','dayjs','add','payload','115XJEMSw','user','@univerjs/core','UniverCore','delete','UniverCollaborationClientPlugin','pluginName','_injector','code','UniverThreadComment','replyId','root','11rtDhgG','74281Mfomqx','deleteComment','solved','CommentService','Reply','CustomRangeType','@univerjs/thread-comment-ui','resolveComment','Plugin','comments','disposeWithMe','length','post','ref','_config','220614BVvXde','type','defineProperty','Disposable','body','_sessionService','rxjs','thread-comment-data-source.config','userID','_threadCommentDataSourceService','find','forEach','2mdyVhW','Solve','userId','_configService','UNIVER_UNKNOWN','subscribe','/list','symbol','_commentService','bufferTime','IThreadCommentDataSourceService','UserManagerService','COMMENT','syncUpdateMutationToColla','588699LHNGmN','Module','7vqgHvq','UniverThreadCommentDataSourcePlugin','UniverProLicense','values','1314297rpobxp','amd','/universer-api/user/list','get','Inject','unitId','Unknown','YYYY/MM/DD\x20HH:mm','10beJBbt','/edit','_initDataSource','_userService','_threadCommentDataSource','22241772vyrfMN','getOwnPropertyDescriptor','toStringTag','format','rangeType','map','threadId','/delete','function','UniverProThreadCommentDatasource','personId','filter','updateComment','3144108oaEdOT','getMemberID','@univerjs-pro/collaboration-client','createTimestamp','OpenOrReOpen','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','addUser','getCurrentUser','Delete','requireSession','pipe','comment','addComment','users','Edit','reply','parentId','DependentOn','5688856WbANsl','rangeId','error','_httpService','content','customRanges','_threadCommentModel','onStarting','UNRECOGNIZED','/universer-api/comment/unit/','UniverInstanceType','object','commentUpdate$','exports','IConfigService','_initUserSync','getUnit','replies','HTTPService','merge','UniverThreadCommentUIPlugin','getUser','onReady','resolved','stringify'];_0x4c6e=function(){return _0x39a7ea;};return _0x4c6e();}function _0x4b99(_0x1d6635,_0x82693e){const _0x4c6e8e=_0x4c6e();return _0x4b99=function(_0x4b99ba,_0x55649a){_0x4b99ba=_0x4b99ba-0xd5;let _0x32dae4=_0x4c6e8e[_0x4b99ba];return _0x32dae4;},_0x4b99(_0x1d6635,_0x82693e);}(function(_0x4e467d,_0x451134){const _0x2d1d3b=_0x4b99,_0x518743=_0x4e467d();while(!![]){try{const _0x48344a=parseInt(_0x2d1d3b(0x131))/0x1+parseInt(_0x2d1d3b(0x14c))/0x2*(-parseInt(_0x2d1d3b(0x15a))/0x3)+parseInt(_0x2d1d3b(0xf1))/0x4+parseInt(_0x2d1d3b(0x124))/0x5*(parseInt(_0x2d1d3b(0x140))/0x6)+-parseInt(_0x2d1d3b(0x15c))/0x7*(-parseInt(_0x2d1d3b(0x105))/0x8)+-parseInt(_0x2d1d3b(0xd7))/0x9*(-parseInt(_0x2d1d3b(0xdf))/0xa)+-parseInt(_0x2d1d3b(0x130))/0xb*(parseInt(_0x2d1d3b(0xe4))/0xc);if(_0x48344a===_0x451134)break;else _0x518743['push'](_0x518743['shift']());}catch(_0x1d58be){_0x518743['push'](_0x518743['shift']());}}}(_0x4c6e,0x7d58d),function(_0x312281,_0x4c143f){const _0x59aebf=_0x4b99;typeof exports==_0x59aebf(0x110)&&typeof module<'u'?_0x4c143f(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x59aebf(0xec)&&define[_0x59aebf(0xd8)]?define([_0x59aebf(0x112),_0x59aebf(0xf3),'@univerjs-pro/license',_0x59aebf(0x126),_0x59aebf(0x137),_0x59aebf(0x11e),_0x59aebf(0x146),'@univerjs/network'],_0x4c143f):(_0x312281=typeof globalThis<'u'?globalThis:_0x312281||self,_0x4c143f(_0x312281[_0x59aebf(0xed)]={},_0x312281['UniverProCollaborationClient'],_0x312281[_0x59aebf(0xd5)],_0x312281[_0x59aebf(0x127)],_0x312281['UniverThreadCommentUi'],_0x312281[_0x59aebf(0x12d)],_0x312281[_0x59aebf(0x146)],_0x312281['UniverNetwork']));}(this,function(_0x261fe6,_0x2252c1,_0xa0c98,_0x22a486,_0x1292ce,_0x1c5522,_0x496401,_0x1bde06){'use strict';const _0x46790b=_0x4b99;const _0x299bb0=_0x46790b(0xf7);var _0x3b3c0c=(_0x39c2db=>(_0x39c2db[_0x39c2db[_0x46790b(0xf5)]=0x0]=_0x46790b(0xf5),_0x39c2db[_0x39c2db[_0x46790b(0xf6)]=0x1]=_0x46790b(0xf6),_0x39c2db[_0x39c2db[_0x46790b(0x10d)]=-0x1]=_0x46790b(0x10d),_0x39c2db))(_0x3b3c0c||{}),_0x33e786=(_0x26f23e=>(_0x26f23e[_0x26f23e['Unknown']=0x0]=_0x46790b(0xdd),_0x26f23e[_0x26f23e[_0x46790b(0xf8)]=0x1]=_0x46790b(0xf8),_0x26f23e[_0x26f23e['Reply']=0x2]=_0x46790b(0x135),_0x26f23e[_0x26f23e[_0x46790b(0x101)]=0x3]=_0x46790b(0x101),_0x26f23e[_0x26f23e['Delete']=0x4]=_0x46790b(0xfb),_0x26f23e[_0x26f23e[_0x46790b(0x14d)]=0x5]='Solve',_0x26f23e[_0x26f23e['UNRECOGNIZED']=-0x1]=_0x46790b(0x10d),_0x26f23e))(_0x33e786||{});const _0x425054=_0x17bd55=>_0x22a486[_0x46790b(0x121)](new Date(+_0x17bd55))[_0x46790b(0xe7)](_0x46790b(0xde)),_0x2b997f=async(_0x102db0,_0x2909ee)=>{const _0x392a3f=_0x46790b,_0x3994bb=_0x102db0['get'](_0x22a486[_0x392a3f(0x157)]),_0x3ddfce=_0x102db0[_0x392a3f(0xda)](_0x1bde06[_0x392a3f(0x117)]);_0x2909ee['forEach'](_0x4ce35a=>{const _0x581cb9=_0x392a3f;_0x3994bb[_0x581cb9(0x11a)](_0x4ce35a)&&_0x2909ee[_0x581cb9(0x128)](_0x4ce35a);}),_0x2909ee['size']&&(await _0x3ddfce[_0x392a3f(0xda)](_0x392a3f(0xd9),{'params':{'userIDs':[..._0x2909ee]}}))[_0x392a3f(0x144)][_0x392a3f(0x100)][_0x392a3f(0x14b)](_0x44fbe3=>{const _0x445010=_0x392a3f;_0x44fbe3&&_0x3994bb[_0x445010(0xf9)](_0x44fbe3);});};var _0x2fb6d8=Object[_0x46790b(0xe5)],_0x8ecc7e=(_0x3fc254,_0x3d5c2b,_0x238f00,_0x2af50a)=>{for(var _0x44bbe1=_0x2af50a>0x1?void 0x0:_0x2af50a?_0x2fb6d8(_0x3d5c2b,_0x238f00):_0x3d5c2b,_0x5462bb=_0x3fc254['length']-0x1,_0x2ba845;_0x5462bb>=0x0;_0x5462bb--)(_0x2ba845=_0x3fc254[_0x5462bb])&&(_0x44bbe1=_0x2ba845(_0x44bbe1)||_0x44bbe1);return _0x44bbe1;},_0x2db4ca=(_0x284318,_0x121a13)=>(_0x21e505,_0x1e0e49)=>_0x121a13(_0x21e505,_0x1e0e49,_0x284318);let _0x309543=class extends _0x22a486['Disposable']{constructor(_0xecec00,_0x36072b,_0x503c4c,_0x20fd93){const _0x363a8d=_0x46790b;super(),this[_0x363a8d(0x154)]=_0xecec00,this['_threadCommentModel']=_0x36072b,this[_0x363a8d(0xe2)]=_0x503c4c,this[_0x363a8d(0x12b)]=_0x20fd93,this['_init'](),this[_0x363a8d(0x114)]();}[_0x46790b(0x114)](){const _0xac4a06=_0x46790b;this['disposeWithMe'](this['_threadCommentModel'][_0xac4a06(0x111)][_0xac4a06(0xfd)](_0x496401[_0xac4a06(0x155)](0x10))[_0xac4a06(0x151)](_0xf5106c=>{const _0x4e4587=_0xac4a06,_0x2f1411=new Set();_0xf5106c[_0x4e4587(0x14b)](_0x2b9a49=>{const _0x32c261=_0x4e4587;switch(_0x2b9a49['type']){case'add':{const _0x5665d8=_0x2b9a49[_0x32c261(0x123)][_0x32c261(0xee)];_0x2f1411['add'](_0x5665d8);break;}}}),_0x2b997f(this[_0x4e4587(0x12b)],_0x2f1411);}));}['_init'](){const _0x92f123=_0x46790b;this[_0x92f123(0x13b)](this[_0x92f123(0x154)]['commentUpdate$'][_0x92f123(0x151)](async _0x30a514=>{const _0x157474=_0x92f123;var _0x15d6ba,_0x2a0ec9,_0x3c9817,_0xcd5b39;const _0x531197=(_0x15d6ba=this[_0x157474(0x10b)][_0x157474(0x115)](_0x30a514[_0x157474(0xdc)])[_0x157474(0x14a)](_0x4493a8=>_0x4493a8[_0x157474(0xea)]===_0x30a514[_0x157474(0xea)]))==null?void 0x0:_0x15d6ba[_0x157474(0x12f)];if(!_0x531197)return;const {unitId:_0x91dc0e,subUnitId:_0x1bd740}=_0x531197;switch(_0x30a514[_0x157474(0x125)]&&this[_0x157474(0xe2)][_0x157474(0xf9)](_0x30a514['user']),_0x30a514[_0x157474(0x141)]){case _0x33e786['Add']:break;case _0x33e786[_0x157474(0x135)]:{this[_0x157474(0x10b)][_0x157474(0xff)](_0x91dc0e,_0x1bd740,{'unitId':_0x91dc0e,'subUnitId':_0x1bd740,'ref':'','id':_0x30a514['replyId'],'dT':_0x425054(+_0x30a514[_0x157474(0xf4)]),'threadId':_0x30a514['threadId'],'personId':(_0x3c9817=(_0x2a0ec9=_0x30a514[_0x157474(0x125)])==null?void 0x0:_0x2a0ec9[_0x157474(0x148)])!=null?_0x3c9817:_0x30a514[_0x157474(0x14e)],'text':JSON[_0x157474(0x11f)](_0x30a514[_0x157474(0x109)]),'parentId':_0x531197['id']});break;}case _0x33e786['Delete']:{const _0x46b54d=this[_0x157474(0x10b)]['getComment'](_0x91dc0e,_0x1bd740,_0x30a514[_0x157474(0x12e)]);_0x46b54d&&_0x46b54d[_0x157474(0x103)]&&this[_0x157474(0x10b)][_0x157474(0x132)](_0x91dc0e,_0x1bd740,_0x30a514[_0x157474(0x12e)]);break;}case _0x33e786['Edit']:{this[_0x157474(0x10b)][_0x157474(0xf0)](_0x91dc0e,_0x1bd740,{'commentId':_0x30a514[_0x157474(0x12e)],'text':JSON[_0x157474(0x11f)](_0x30a514[_0x157474(0x109)])});break;}case _0x33e786[_0x157474(0x14d)]:{const _0x4a6c9=(_0xcd5b39=this[_0x157474(0x10b)][_0x157474(0x115)](_0x30a514[_0x157474(0xdc)])[_0x157474(0x14a)](_0x1ac0ff=>_0x1ac0ff[_0x157474(0xea)]===_0x30a514[_0x157474(0xea)]))==null?void 0x0:_0xcd5b39[_0x157474(0x12f)];_0x4a6c9&&this[_0x157474(0x10b)][_0x157474(0x138)](_0x91dc0e,_0x1bd740,_0x4a6c9['id'],_0x30a514[_0x157474(0x133)]===_0x3b3c0c[_0x157474(0xf6)]);break;}}}));}};_0x309543=_0x8ecc7e([_0x2db4ca(0x0,_0x22a486['Inject'](_0x2252c1[_0x46790b(0x134)])),_0x2db4ca(0x1,_0x22a486[_0x46790b(0xdb)](_0x1c5522['ThreadCommentModel'])),_0x2db4ca(0x2,_0x22a486[_0x46790b(0xdb)](_0x22a486[_0x46790b(0x157)])),_0x2db4ca(0x3,_0x22a486[_0x46790b(0xdb)](_0x22a486['Injector']))],_0x309543);const _0x555357=_0x46790b(0x147),_0x3f7e53={};var _0x4e1f28=Object[_0x46790b(0xe5)],_0xfd942c=(_0x2ef629,_0xf16df4,_0x2eeb95,_0x269d17)=>{const _0x2380b5=_0x46790b;for(var _0x2b2f1c=_0x269d17>0x1?void 0x0:_0x269d17?_0x4e1f28(_0xf16df4,_0x2eeb95):_0xf16df4,_0x150aa7=_0x2ef629[_0x2380b5(0x13c)]-0x1,_0x5299ac;_0x150aa7>=0x0;_0x150aa7--)(_0x5299ac=_0x2ef629[_0x150aa7])&&(_0x2b2f1c=_0x5299ac(_0x2b2f1c)||_0x2b2f1c);return _0x2b2f1c;},_0x4791c6=(_0x520ba8,_0x33806e)=>(_0x3b7c65,_0x3faf94)=>_0x33806e(_0x3b7c65,_0x3faf94,_0x520ba8);function _0x1da3ac(_0x41d2f7,_0x1f52b5){const _0x295eda=_0x46790b,_0x3b3d03=_0x41d2f7[_0x295eda(0x116)][0x0];return{..._0x1f52b5,'id':_0x3b3d03[_0x295eda(0x12e)],'resolved':_0x41d2f7[_0x295eda(0x133)]===0x1,'dT':_0x425054(_0x3b3d03[_0x295eda(0xf4)]),'personId':_0x3b3d03[_0x295eda(0x14e)],'threadId':_0x3b3d03['threadId']};}function _0x58ac9b(_0x50b65f,_0x38d73b,_0x3c50d7){const _0x30d56f=_0x46790b;var _0x2a2b3e,_0x17b971;if(((_0x17b971=(_0x2a2b3e=_0x50b65f==null?void 0x0:_0x50b65f[_0x30d56f(0x116)])==null?void 0x0:_0x2a2b3e[_0x30d56f(0x13c)])!=null?_0x17b971:0x0)>0x0){const _0x181099=(_0x1619e1,_0x2d8a75)=>({'id':_0x1619e1[_0x30d56f(0x12e)],'threadId':_0x1619e1[_0x30d56f(0xea)],'dT':_0x425054(_0x1619e1['createTimestamp']),'personId':_0x1619e1['userId'],'resolved':_0x50b65f[_0x30d56f(0x133)]===_0x3b3c0c[_0x30d56f(0xf6)],'unitId':_0x38d73b,'subUnitId':_0x3c50d7,'text':JSON['parse'](_0x1619e1[_0x30d56f(0x109)]),'parentId':_0x2d8a75}),_0x6f4558=_0x181099(_0x50b65f[_0x30d56f(0x116)][0x0]);return{..._0x6f4558,'children':_0x50b65f['replies']['slice'](0x1)[_0x30d56f(0xe9)](_0x21c60b=>_0x181099(_0x21c60b,_0x6f4558['id']))};}return null;}let _0x57e33f=class{constructor(_0x2f026b,_0x121074,_0x4c4de0){const _0x354909=_0x46790b;this[_0x354909(0x108)]=_0x2f026b,this['_userService']=_0x121074,this['_sessionService']=_0x4c4de0;}async[_0x46790b(0xff)](_0x228ac3){const _0x2df6cf=_0x46790b;var _0x45b427,_0x507f48;const {parentId:_0xd2d90c,unitId:_0x265f56,text:_0x1388c5,threadId:_0x279b52}=_0x228ac3,_0x54a0ac=(_0x507f48=(_0x45b427=_0x1388c5[_0x2df6cf(0x10a)])==null?void 0x0:_0x45b427[_0x2df6cf(0xef)](_0x4bd21a=>_0x4bd21a['rangeType']===_0x22a486[_0x2df6cf(0x136)][_0x2df6cf(0x158)])[_0x2df6cf(0xe9)](_0x1d51f2=>_0x1d51f2[_0x2df6cf(0x106)]))!=null?_0x507f48:[],_0x4b0fa6=JSON[_0x2df6cf(0x11d)](_0x1388c5),_0xf53bb1=(await this[_0x2df6cf(0x145)][_0x2df6cf(0xfc)](_0x265f56))[_0x2df6cf(0xf2)]();if(_0xd2d90c){const _0x1b3a8b={'memberId':_0xf53bb1,'unitId':_0x265f56,'content':_0x4b0fa6,'mention':_0x54a0ac,'threadId':_0x279b52},_0x83dbbf=(await this[_0x2df6cf(0x108)][_0x2df6cf(0x13d)](_0x2df6cf(0x10e)+_0x265f56+'/reply',{'body':_0x1b3a8b}))['body'][_0x2df6cf(0x102)];return{..._0x228ac3,'id':_0x83dbbf['replyId'],'dT':_0x22a486[_0x2df6cf(0x121)](+_0x83dbbf[_0x2df6cf(0xf4)])['format'](_0x2df6cf(0xde)),'personId':_0x83dbbf['userId']};}else{const _0x1f0ead={'memberId':_0xf53bb1,'unitId':_0x265f56,'content':_0x4b0fa6,'mention':_0x54a0ac},_0x3f6d46=await this[_0x2df6cf(0x108)]['post'](_0x2df6cf(0x10e)+_0x265f56+'/add',{'body':_0x1f0ead});return _0x1da3ac(_0x3f6d46[_0x2df6cf(0x144)][_0x2df6cf(0xfe)],_0x228ac3);}}async[_0x46790b(0xf0)](_0x2a6ae1){const _0x44a80e=_0x46790b;var _0x2164ec,_0x2ee0e9;const {text:_0x23024d,unitId:_0x2c8f82}=_0x2a6ae1,_0x555585=(_0x2ee0e9=(_0x2164ec=_0x23024d[_0x44a80e(0x10a)])==null?void 0x0:_0x2164ec[_0x44a80e(0xef)](_0x53afac=>_0x53afac[_0x44a80e(0xe8)]===_0x22a486[_0x44a80e(0x136)][_0x44a80e(0x158)])['map'](_0x14f0c1=>_0x14f0c1[_0x44a80e(0x106)]))!=null?_0x2ee0e9:[],_0x24f929=JSON[_0x44a80e(0x11d)](_0x23024d),_0xc819b1=_0x2a6ae1[_0x44a80e(0xea)],_0x18c4cf=_0x2a6ae1['id'],_0x241548={'memberId':(await this[_0x44a80e(0x145)][_0x44a80e(0xfc)](_0x2c8f82))[_0x44a80e(0xf2)](),'unitId':_0x2c8f82,'threadId':_0xc819b1,'mention':_0x555585,'content':_0x24f929,'replyId':_0x18c4cf},_0x23be73=await this[_0x44a80e(0x108)]['post'](_0x44a80e(0x10e)+_0x2c8f82+_0x44a80e(0xe0),{'body':_0x241548});return!_0x23be73[_0x44a80e(0x144)][_0x44a80e(0x107)]||_0x23be73[_0x44a80e(0x144)][_0x44a80e(0x107)][_0x44a80e(0x12c)]===0x1;}async[_0x46790b(0x138)](_0x2b0df6){const _0x45f4ff=_0x46790b,{unitId:_0x338ef3}=_0x2b0df6,_0x500097=_0x2b0df6[_0x45f4ff(0xea)],_0x303e4e={'memberId':this['_userService'][_0x45f4ff(0xfa)]()['userID'],'unitId':_0x338ef3,'threadId':_0x500097,'solved':_0x2b0df6[_0x45f4ff(0x11c)]?_0x3b3c0c[_0x45f4ff(0xf6)]:_0x3b3c0c['OpenOrReOpen']},_0x21345a=await this[_0x45f4ff(0x108)][_0x45f4ff(0x13d)]('/universer-api/comment/unit/'+_0x338ef3+'/solved',{'body':_0x303e4e});return!_0x21345a[_0x45f4ff(0x144)][_0x45f4ff(0x107)]||_0x21345a[_0x45f4ff(0x144)][_0x45f4ff(0x107)][_0x45f4ff(0x12c)]===0x1;}async[_0x46790b(0x132)](_0x2bc675,_0x310f20,_0x3ded94,_0x312eaa){const _0x57fde3=_0x46790b,_0x2827b5={'memberId':(await this['_sessionService'][_0x57fde3(0xfc)](_0x2bc675))[_0x57fde3(0xf2)](),'threadId':_0x3ded94,'replyId':_0x312eaa,'unitId':_0x2bc675},_0x2396b8=await this['_httpService'][_0x57fde3(0x13d)](_0x57fde3(0x10e)+_0x2bc675+_0x57fde3(0xeb),{'body':_0x2827b5});return!_0x2396b8['body'][_0x57fde3(0x107)]||_0x2396b8[_0x57fde3(0x144)][_0x57fde3(0x107)][_0x57fde3(0x12c)]===0x1;}async[_0x46790b(0x120)](_0x3142f9,_0x549c4e,_0x19f329){const _0x1998d3=_0x46790b,_0x389cc3={'unitId':_0x3142f9,'threadId':_0x19f329},_0x3b04a4=await this[_0x1998d3(0x108)][_0x1998d3(0x13d)]('/universer-api/comment/unit/'+_0x3142f9+_0x1998d3(0x152),{'body':_0x389cc3}),_0x26e75e=_0x19f329[_0x1998d3(0xe9)](_0x8fdf3a=>_0x58ac9b(_0x3b04a4[_0x1998d3(0x144)][_0x1998d3(0x13a)][_0x8fdf3a],_0x3142f9,_0x549c4e))['filter'](Boolean);return Object[_0x1998d3(0xd6)](_0x3b04a4[_0x1998d3(0x144)][_0x1998d3(0x100)])['forEach'](_0x5df48b=>{const _0x32c3b8=_0x1998d3;this[_0x32c3b8(0xe2)][_0x32c3b8(0xf9)](_0x5df48b);}),_0x26e75e;}['saveCommentToSnapshot'](_0x36886e){const _0x4740d4=_0x46790b;return{'id':_0x36886e['id'],'threadId':_0x36886e[_0x4740d4(0xea)],'ref':_0x36886e[_0x4740d4(0x13e)]};}};_0x57e33f=_0xfd942c([_0x4791c6(0x0,_0x22a486[_0x46790b(0xdb)](_0x1bde06[_0x46790b(0x117)])),_0x4791c6(0x1,_0x22a486[_0x46790b(0xdb)](_0x22a486['UserManagerService'])),_0x4791c6(0x2,_0x22a486['Inject'](_0x2252c1['CollaborationSessionService']))],_0x57e33f);var _0x5c0a4a=Object[_0x46790b(0xe5)],_0x3ce1dc=(_0x3a1d90,_0x4e52ad,_0x444e6e,_0xd02a06)=>{const _0x1033e9=_0x46790b;for(var _0xc563c1=_0xd02a06>0x1?void 0x0:_0xd02a06?_0x5c0a4a(_0x4e52ad,_0x444e6e):_0x4e52ad,_0x3d6beb=_0x3a1d90[_0x1033e9(0x13c)]-0x1,_0x69335b;_0x3d6beb>=0x0;_0x3d6beb--)(_0x69335b=_0x3a1d90[_0x3d6beb])&&(_0xc563c1=_0x69335b(_0xc563c1)||_0xc563c1);return _0xc563c1;},_0x45d99c=(_0x22daf1,_0x3f0ebb)=>(_0x113194,_0x2116cb)=>_0x3f0ebb(_0x113194,_0x2116cb,_0x22daf1);let _0x230bc5=class extends _0x22a486[_0x46790b(0x143)]{constructor(_0xcf7846,_0x58d638){const _0x10fe58=_0x46790b;super(),this[_0x10fe58(0x149)]=_0xcf7846,this[_0x10fe58(0xe3)]=_0x58d638,this[_0x10fe58(0xe1)]();}[_0x46790b(0xe1)](){const _0x1263ac=_0x46790b;this['_threadCommentDataSourceService']['dataSource']=this[_0x1263ac(0xe3)],this[_0x1263ac(0x149)][_0x1263ac(0x159)]=!0x1;}};_0x230bc5=_0x3ce1dc([_0x45d99c(0x0,_0x1c5522[_0x46790b(0x156)]),_0x45d99c(0x1,_0x22a486[_0x46790b(0xdb)](_0x57e33f))],_0x230bc5);var _0xc72f87=Object[_0x46790b(0x142)],_0x3aaa5c=Object['getOwnPropertyDescriptor'],_0x13e1fa=(_0x2de825,_0x829af3,_0x1a6df6)=>_0x829af3 in _0x2de825?_0xc72f87(_0x2de825,_0x829af3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a6df6}):_0x2de825[_0x829af3]=_0x1a6df6,_0x308781=(_0x496b16,_0x4b6761,_0x49ed71,_0x14dc27)=>{const _0x24671e=_0x46790b;for(var _0x463877=_0x14dc27>0x1?void 0x0:_0x14dc27?_0x3aaa5c(_0x4b6761,_0x49ed71):_0x4b6761,_0x3d5526=_0x496b16[_0x24671e(0x13c)]-0x1,_0x2ab390;_0x3d5526>=0x0;_0x3d5526--)(_0x2ab390=_0x496b16[_0x3d5526])&&(_0x463877=_0x2ab390(_0x463877)||_0x463877);return _0x463877;},_0x5e0953=(_0x31d7a0,_0x114413)=>(_0x39dcb0,_0x500971)=>_0x114413(_0x39dcb0,_0x500971,_0x31d7a0),_0x50a95f=(_0x5286fc,_0x51a159,_0x40f5b8)=>_0x13e1fa(_0x5286fc,typeof _0x51a159!=_0x46790b(0x153)?_0x51a159+'':_0x51a159,_0x40f5b8);_0x261fe6[_0x46790b(0x15d)]=class extends _0x22a486[_0x46790b(0x139)]{constructor(_0x4c0590=_0x3f7e53,_0x476d4e,_0xa28452){const _0x41c2b2=_0x46790b;super(),this[_0x41c2b2(0x13f)]=_0x4c0590,this[_0x41c2b2(0x12b)]=_0x476d4e,this[_0x41c2b2(0x14f)]=_0xa28452;const {..._0x8494a2}=_0x22a486[_0x41c2b2(0x118)]({},_0x3f7e53,this[_0x41c2b2(0x13f)]);this[_0x41c2b2(0x14f)]['setConfig'](_0x555357,_0x8494a2);}[_0x46790b(0x10c)](){const _0x3c9447=_0x46790b;[[_0x57e33f],[_0x230bc5],[_0x309543]][_0x3c9447(0x14b)](_0x53c0f8=>{const _0x226f53=_0x3c9447;this[_0x226f53(0x12b)][_0x226f53(0x122)](_0x53c0f8);});}[_0x46790b(0x11b)](){const _0x44c45d=_0x46790b;this[_0x44c45d(0x12b)][_0x44c45d(0xda)](_0x230bc5),this[_0x44c45d(0x12b)][_0x44c45d(0xda)](_0x309543);}},_0x50a95f(_0x261fe6['UniverThreadCommentDataSourcePlugin'],_0x46790b(0x12a),_0x299bb0),_0x50a95f(_0x261fe6[_0x46790b(0x15d)],_0x46790b(0x141),_0x22a486[_0x46790b(0x10f)][_0x46790b(0x150)]),_0x261fe6[_0x46790b(0x15d)]=_0x308781([_0x22a486[_0x46790b(0x104)](_0x1292ce[_0x46790b(0x119)],_0x2252c1[_0x46790b(0x129)],_0xa0c98['UniverLicensePlugin']),_0x5e0953(0x1,_0x22a486[_0x46790b(0xdb)](_0x22a486['Injector'])),_0x5e0953(0x2,_0x22a486[_0x46790b(0x113)])],_0x261fe6[_0x46790b(0x15d)]),Object['defineProperty'](_0x261fe6,Symbol[_0x46790b(0xe6)],{'value':_0x46790b(0x15b)});}));
1
+ (function(_0x36a560,_0x1448b8){const _0x3f406e=_0x2a56,_0x43d4c2=_0x36a560();while(!![]){try{const _0x3c0763=-parseInt(_0x3f406e(0x1ab))/0x1+parseInt(_0x3f406e(0x1a2))/0x2*(-parseInt(_0x3f406e(0x17e))/0x3)+-parseInt(_0x3f406e(0x1c8))/0x4*(parseInt(_0x3f406e(0x189))/0x5)+parseInt(_0x3f406e(0x1aa))/0x6*(-parseInt(_0x3f406e(0x1de))/0x7)+-parseInt(_0x3f406e(0x1c7))/0x8*(-parseInt(_0x3f406e(0x1cd))/0x9)+parseInt(_0x3f406e(0x188))/0xa+parseInt(_0x3f406e(0x182))/0xb*(parseInt(_0x3f406e(0x1e7))/0xc);if(_0x3c0763===_0x1448b8)break;else _0x43d4c2['push'](_0x43d4c2['shift']());}catch(_0xf6a4e8){_0x43d4c2['push'](_0x43d4c2['shift']());}}}(_0x3f33,0xa1205),function(_0x2304d8,_0x234b4c){const _0x21e0e5=_0x2a56;typeof exports==_0x21e0e5(0x187)&&typeof module<'u'?_0x234b4c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x21e0e5(0x1bc),_0x21e0e5(0x190),_0x21e0e5(0x1f2),_0x21e0e5(0x19d),_0x21e0e5(0x1eb),_0x21e0e5(0x1c3),_0x21e0e5(0x1ba),_0x21e0e5(0x201)],_0x234b4c):(_0x2304d8=typeof globalThis<'u'?globalThis:_0x2304d8||self,_0x234b4c(_0x2304d8['UniverProThreadCommentDatasource']={},_0x2304d8['UniverProCollaborationClient'],_0x2304d8[_0x21e0e5(0x1d4)],_0x2304d8[_0x21e0e5(0x1db)],_0x2304d8[_0x21e0e5(0x1b9)],_0x2304d8[_0x21e0e5(0x1bb)],_0x2304d8['rxjs'],_0x2304d8[_0x21e0e5(0x1a4)]));}(this,function(_0x535030,_0x504b97,_0x51a395,_0x20d5f0,_0x4da799,_0x4f9e71,_0x4cfb65,_0x20277a){'use strict';const _0x14ef60=_0x2a56;const _0x3e569=_0x14ef60(0x1a9);var _0x56e0b5=(_0x4134ca=>(_0x4134ca[_0x4134ca[_0x14ef60(0x19f)]=0x0]='OpenOrReOpen',_0x4134ca[_0x4134ca[_0x14ef60(0x1c1)]=0x1]=_0x14ef60(0x1c1),_0x4134ca[_0x4134ca[_0x14ef60(0x186)]=-0x1]=_0x14ef60(0x186),_0x4134ca))(_0x56e0b5||{}),_0x4ceb98=(_0x5c9de0=>(_0x5c9de0[_0x5c9de0[_0x14ef60(0x1a0)]=0x0]=_0x14ef60(0x1a0),_0x5c9de0[_0x5c9de0[_0x14ef60(0x1ad)]=0x1]=_0x14ef60(0x1ad),_0x5c9de0[_0x5c9de0[_0x14ef60(0x19c)]=0x2]=_0x14ef60(0x19c),_0x5c9de0[_0x5c9de0['Edit']=0x3]=_0x14ef60(0x1bf),_0x5c9de0[_0x5c9de0[_0x14ef60(0x1d3)]=0x4]=_0x14ef60(0x1d3),_0x5c9de0[_0x5c9de0[_0x14ef60(0x18c)]=0x5]=_0x14ef60(0x18c),_0x5c9de0[_0x5c9de0[_0x14ef60(0x186)]=-0x1]=_0x14ef60(0x186),_0x5c9de0))(_0x4ceb98||{});const _0x3be4ab=_0x59d21e=>_0x20d5f0[_0x14ef60(0x1f3)](new Date(+_0x59d21e))[_0x14ef60(0x199)]('YYYY/MM/DD\x20HH:mm'),_0x261b7d=async(_0x61ba65,_0x24ed99)=>{const _0x41c7bd=_0x14ef60,_0x23a40d=_0x61ba65[_0x41c7bd(0x1e6)](_0x20d5f0[_0x41c7bd(0x1b2)]),_0x3c3ef9=_0x61ba65['get'](_0x20277a[_0x41c7bd(0x1fb)]);_0x24ed99[_0x41c7bd(0x1ff)](_0x906125=>{const _0x428a7f=_0x41c7bd;_0x23a40d[_0x428a7f(0x19b)](_0x906125)&&_0x24ed99[_0x428a7f(0x1fc)](_0x906125);}),_0x24ed99[_0x41c7bd(0x183)]&&(await _0x3c3ef9[_0x41c7bd(0x1e6)](_0x41c7bd(0x1e8),{'params':{'userIDs':[..._0x24ed99]}}))[_0x41c7bd(0x1b7)][_0x41c7bd(0x1f4)][_0x41c7bd(0x1ff)](_0x900540=>{const _0x525866=_0x41c7bd;_0x900540&&_0x23a40d[_0x525866(0x1dc)](_0x900540);});};var _0xdb31d2=Object[_0x14ef60(0x1ea)],_0x5c6129=(_0x1fd339,_0x5039c0,_0x32ff59,_0x51153e)=>{const _0x3377f5=_0x14ef60;for(var _0x4ce63e=_0x51153e>0x1?void 0x0:_0x51153e?_0xdb31d2(_0x5039c0,_0x32ff59):_0x5039c0,_0x8628b4=_0x1fd339[_0x3377f5(0x1cb)]-0x1,_0x30be70;_0x8628b4>=0x0;_0x8628b4--)(_0x30be70=_0x1fd339[_0x8628b4])&&(_0x4ce63e=_0x30be70(_0x4ce63e)||_0x4ce63e);return _0x4ce63e;},_0xf68539=(_0x4719b8,_0x3570c6)=>(_0x27b974,_0x41b0f9)=>_0x3570c6(_0x27b974,_0x41b0f9,_0x4719b8);let _0x45c70f=class extends _0x20d5f0[_0x14ef60(0x1f0)]{constructor(_0x37f313,_0xd75420,_0x5ad218,_0x253f6c){const _0x575b2c=_0x14ef60;super(),this[_0x575b2c(0x1ee)]=_0x37f313,this[_0x575b2c(0x1be)]=_0xd75420,this[_0x575b2c(0x18a)]=_0x5ad218,this[_0x575b2c(0x1d9)]=_0x253f6c,this[_0x575b2c(0x1f9)](),this[_0x575b2c(0x1da)]();}[_0x14ef60(0x1da)](){const _0x112538=_0x14ef60;this[_0x112538(0x1c5)](this[_0x112538(0x1be)][_0x112538(0x1df)]['pipe'](_0x4cfb65[_0x112538(0x1d7)](0x10))['subscribe'](_0x353421=>{const _0x2f24a8=_0x112538,_0x4e92a7=new Set();_0x353421[_0x2f24a8(0x1ff)](_0x436c6e=>{const _0x34b3f6=_0x2f24a8;switch(_0x436c6e[_0x34b3f6(0x1dd)]){case'add':{const _0x18b007=_0x436c6e['payload']['personId'];_0x4e92a7[_0x34b3f6(0x1d2)](_0x18b007);break;}}}),_0x261b7d(this[_0x2f24a8(0x1d9)],_0x4e92a7);}));}['_init'](){const _0x25daed=_0x14ef60;this['disposeWithMe'](this['_commentService'][_0x25daed(0x1df)][_0x25daed(0x184)](async _0x16102b=>{const _0x22d827=_0x25daed;var _0x4574f2,_0x340084,_0x32951e,_0x3a5dd5;const _0x52ef4f=(_0x4574f2=this[_0x22d827(0x1be)][_0x22d827(0x1cf)](_0x16102b[_0x22d827(0x181)])['find'](_0x1938a2=>_0x1938a2[_0x22d827(0x1ef)]===_0x16102b[_0x22d827(0x1ef)]))==null?void 0x0:_0x4574f2['root'];if(!_0x52ef4f)return;const {unitId:_0x397485,subUnitId:_0x3b2163}=_0x52ef4f;switch(_0x16102b['user']&&this[_0x22d827(0x18a)][_0x22d827(0x1dc)](_0x16102b['user']),_0x16102b[_0x22d827(0x1dd)]){case _0x4ceb98[_0x22d827(0x1ad)]:break;case _0x4ceb98[_0x22d827(0x19c)]:{this['_threadCommentModel'][_0x22d827(0x1ae)](_0x397485,_0x3b2163,{'unitId':_0x397485,'subUnitId':_0x3b2163,'ref':'','id':_0x16102b['replyId'],'dT':_0x3be4ab(+_0x16102b['createTimestamp']),'threadId':_0x16102b[_0x22d827(0x1ef)],'personId':(_0x32951e=(_0x340084=_0x16102b['user'])==null?void 0x0:_0x340084[_0x22d827(0x1e4)])!=null?_0x32951e:_0x16102b[_0x22d827(0x1e5)],'text':JSON[_0x22d827(0x1d0)](_0x16102b['content']),'parentId':_0x52ef4f['id']});break;}case _0x4ceb98[_0x22d827(0x1d3)]:{const _0x2a1318=this[_0x22d827(0x1be)][_0x22d827(0x17c)](_0x397485,_0x3b2163,_0x16102b[_0x22d827(0x1c2)]);_0x2a1318&&_0x2a1318[_0x22d827(0x1e9)]&&this[_0x22d827(0x1be)][_0x22d827(0x1a7)](_0x397485,_0x3b2163,_0x16102b[_0x22d827(0x1c2)]);break;}case _0x4ceb98['Edit']:{this[_0x22d827(0x1be)]['updateComment'](_0x397485,_0x3b2163,{'commentId':_0x16102b[_0x22d827(0x1c2)],'text':JSON[_0x22d827(0x1d0)](_0x16102b['content'])});break;}case _0x4ceb98[_0x22d827(0x18c)]:{const _0x81a0b3=(_0x3a5dd5=this[_0x22d827(0x1be)][_0x22d827(0x1cf)](_0x16102b[_0x22d827(0x181)])['find'](_0x3f9f17=>_0x3f9f17['threadId']===_0x16102b[_0x22d827(0x1ef)]))==null?void 0x0:_0x3a5dd5[_0x22d827(0x1d5)];_0x81a0b3&&this[_0x22d827(0x1be)]['resolveComment'](_0x397485,_0x3b2163,_0x81a0b3['id'],_0x16102b[_0x22d827(0x19a)]===_0x56e0b5[_0x22d827(0x1c1)]);break;}}}));}};_0x45c70f=_0x5c6129([_0xf68539(0x0,_0x20d5f0[_0x14ef60(0x185)](_0x504b97[_0x14ef60(0x1b3)])),_0xf68539(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x4f9e71['ThreadCommentModel'])),_0xf68539(0x2,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b2)])),_0xf68539(0x3,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b1)]))],_0x45c70f);const _0xb8d4e6=_0x14ef60(0x1e1),_0xd9a410={};var _0x1fa2c5=Object['getOwnPropertyDescriptor'],_0x57837b=(_0x3e3de0,_0x4acd88,_0x26c302,_0x49ade4)=>{for(var _0x1afa03=_0x49ade4>0x1?void 0x0:_0x49ade4?_0x1fa2c5(_0x4acd88,_0x26c302):_0x4acd88,_0x1e9ce7=_0x3e3de0['length']-0x1,_0x116748;_0x1e9ce7>=0x0;_0x1e9ce7--)(_0x116748=_0x3e3de0[_0x1e9ce7])&&(_0x1afa03=_0x116748(_0x1afa03)||_0x1afa03);return _0x1afa03;},_0xdf1a53=(_0x4f6751,_0x333761)=>(_0x40d651,_0x49ab7c)=>_0x333761(_0x40d651,_0x49ab7c,_0x4f6751);function _0x4210ec(_0x398b33,_0x53635f){const _0x24b6ab=_0x14ef60,_0x598325=_0x398b33[_0x24b6ab(0x1d6)][0x0];return{..._0x53635f,'id':_0x598325[_0x24b6ab(0x1c2)],'resolved':_0x398b33[_0x24b6ab(0x19a)]===0x1,'dT':_0x3be4ab(_0x598325[_0x24b6ab(0x19e)]),'personId':_0x598325[_0x24b6ab(0x1e5)],'threadId':_0x598325[_0x24b6ab(0x1ef)]};}function _0x20e294(_0x493e61,_0x8f3454,_0x4f2644){const _0x42f3db=_0x14ef60;var _0xa17888,_0x29f452;if(((_0x29f452=(_0xa17888=_0x493e61==null?void 0x0:_0x493e61[_0x42f3db(0x1d6)])==null?void 0x0:_0xa17888[_0x42f3db(0x1cb)])!=null?_0x29f452:0x0)>0x0){const _0xc9bf8f=(_0x3207e0,_0x3ec936)=>({'id':_0x3207e0[_0x42f3db(0x1c2)],'threadId':_0x3207e0[_0x42f3db(0x1ef)],'dT':_0x3be4ab(_0x3207e0[_0x42f3db(0x19e)]),'personId':_0x3207e0[_0x42f3db(0x1e5)],'resolved':_0x493e61[_0x42f3db(0x19a)]===_0x56e0b5[_0x42f3db(0x1c1)],'unitId':_0x8f3454,'subUnitId':_0x4f2644,'text':JSON[_0x42f3db(0x1d0)](_0x3207e0['content']),'parentId':_0x3ec936}),_0x45ceb1=_0xc9bf8f(_0x493e61[_0x42f3db(0x1d6)][0x0]);return{..._0x45ceb1,'children':_0x493e61[_0x42f3db(0x1d6)]['slice'](0x1)['map'](_0x809842=>_0xc9bf8f(_0x809842,_0x45ceb1['id']))};}return null;}let _0x1c2270=class{constructor(_0x192204,_0x17a22d,_0x1bf634){const _0x40e04e=_0x14ef60;this['_httpService']=_0x192204,this['_userService']=_0x17a22d,this[_0x40e04e(0x200)]=_0x1bf634;}async['addComment'](_0x5ec81c){const _0x3d6334=_0x14ef60;var _0xebeacb,_0x150096;const {parentId:_0x24d073,unitId:_0x4cd849,text:_0x4be7c3,threadId:_0x17c73f}=_0x5ec81c,_0x52a81f=(_0x150096=(_0xebeacb=_0x4be7c3['customRanges'])==null?void 0x0:_0xebeacb[_0x3d6334(0x1d8)](_0x2a0c5e=>_0x2a0c5e[_0x3d6334(0x180)]===_0x20d5f0['CustomRangeType'][_0x3d6334(0x1c9)])[_0x3d6334(0x1a3)](_0x4729c9=>_0x4729c9['rangeId']))!=null?_0x150096:[],_0x58276d=JSON[_0x3d6334(0x202)](_0x4be7c3),_0xdef7e0=(await this[_0x3d6334(0x200)]['requireSession'](_0x4cd849))[_0x3d6334(0x1e2)]();if(_0x24d073){const _0x291bb7={'memberId':_0xdef7e0,'unitId':_0x4cd849,'content':_0x58276d,'mention':_0x52a81f,'threadId':_0x17c73f},_0x17967c=(await this[_0x3d6334(0x18f)][_0x3d6334(0x1bd)](_0x3d6334(0x1cc)+_0x4cd849+_0x3d6334(0x191),{'body':_0x291bb7}))[_0x3d6334(0x1b7)]['reply'];return{..._0x5ec81c,'id':_0x17967c['replyId'],'dT':_0x20d5f0['dayjs'](+_0x17967c['createTimestamp'])[_0x3d6334(0x199)](_0x3d6334(0x1b5)),'personId':_0x17967c[_0x3d6334(0x1e5)]};}else{const _0x1afb4b={'memberId':_0xdef7e0,'unitId':_0x4cd849,'content':_0x58276d,'mention':_0x52a81f},_0x22aeb7=await this['_httpService'][_0x3d6334(0x1bd)](_0x3d6334(0x1cc)+_0x4cd849+_0x3d6334(0x1fe),{'body':_0x1afb4b});return _0x4210ec(_0x22aeb7[_0x3d6334(0x1b7)][_0x3d6334(0x1b8)],_0x5ec81c);}}async[_0x14ef60(0x1ac)](_0xac5a65){const _0x12fd20=_0x14ef60;var _0x99d20c,_0x963293;const {text:_0xb718dd,unitId:_0x2008d6}=_0xac5a65,_0x193854=(_0x963293=(_0x99d20c=_0xb718dd['customRanges'])==null?void 0x0:_0x99d20c[_0x12fd20(0x1d8)](_0x12bbae=>_0x12bbae['rangeType']===_0x20d5f0[_0x12fd20(0x193)][_0x12fd20(0x1c9)])[_0x12fd20(0x1a3)](_0x5227e8=>_0x5227e8[_0x12fd20(0x17d)]))!=null?_0x963293:[],_0x226b12=JSON['stringify'](_0xb718dd),_0x1b0ef5=_0xac5a65[_0x12fd20(0x1ef)],_0x4ca824=_0xac5a65['id'],_0x3d9eb3={'memberId':(await this[_0x12fd20(0x200)][_0x12fd20(0x1ca)](_0x2008d6))[_0x12fd20(0x1e2)](),'unitId':_0x2008d6,'threadId':_0x1b0ef5,'mention':_0x193854,'content':_0x226b12,'replyId':_0x4ca824},_0x4c7957=await this[_0x12fd20(0x18f)][_0x12fd20(0x1bd)](_0x12fd20(0x1cc)+_0x2008d6+'/edit',{'body':_0x3d9eb3});return!_0x4c7957[_0x12fd20(0x1b7)][_0x12fd20(0x1ec)]||_0x4c7957[_0x12fd20(0x1b7)][_0x12fd20(0x1ec)]['code']===0x1;}async[_0x14ef60(0x1a8)](_0x1ca494){const _0x146be8=_0x14ef60,{unitId:_0x2b046e}=_0x1ca494,_0x479e8d=_0x1ca494[_0x146be8(0x1ef)],_0xd9d473={'memberId':this['_userService'][_0x146be8(0x195)]()[_0x146be8(0x1e4)],'unitId':_0x2b046e,'threadId':_0x479e8d,'solved':_0x1ca494[_0x146be8(0x1a5)]?_0x56e0b5['Solved']:_0x56e0b5[_0x146be8(0x19f)]},_0x550662=await this[_0x146be8(0x18f)][_0x146be8(0x1bd)](_0x146be8(0x1cc)+_0x2b046e+_0x146be8(0x1af),{'body':_0xd9d473});return!_0x550662[_0x146be8(0x1b7)][_0x146be8(0x1ec)]||_0x550662[_0x146be8(0x1b7)]['error'][_0x146be8(0x1b6)]===0x1;}async[_0x14ef60(0x1a7)](_0xcfd029,_0x1c9d32,_0x65c5c0,_0x3ef9ed){const _0x3899af=_0x14ef60,_0xb7e7c1={'memberId':(await this[_0x3899af(0x200)][_0x3899af(0x1ca)](_0xcfd029))[_0x3899af(0x1e2)](),'threadId':_0x65c5c0,'replyId':_0x3ef9ed,'unitId':_0xcfd029},_0x2228dc=await this[_0x3899af(0x18f)][_0x3899af(0x1bd)](_0x3899af(0x1cc)+_0xcfd029+_0x3899af(0x18b),{'body':_0xb7e7c1});return!_0x2228dc['body']['error']||_0x2228dc['body'][_0x3899af(0x1ec)][_0x3899af(0x1b6)]===0x1;}async[_0x14ef60(0x197)](_0x44713f,_0x589de8,_0x5c32e3){const _0x3a92c0=_0x14ef60,_0x9fb50={'unitId':_0x44713f,'threadId':_0x5c32e3},_0x46b595=await this[_0x3a92c0(0x18f)][_0x3a92c0(0x1bd)](_0x3a92c0(0x1cc)+_0x44713f+_0x3a92c0(0x1c0),{'body':_0x9fb50}),_0x5e10a9=_0x5c32e3[_0x3a92c0(0x1a3)](_0x596548=>_0x20e294(_0x46b595[_0x3a92c0(0x1b7)]['comments'][_0x596548],_0x44713f,_0x589de8))[_0x3a92c0(0x1d8)](Boolean);return Object[_0x3a92c0(0x192)](_0x46b595['body'][_0x3a92c0(0x1f4)])[_0x3a92c0(0x1ff)](_0x284fee=>{const _0x1cda60=_0x3a92c0;this[_0x1cda60(0x18a)][_0x1cda60(0x1dc)](_0x284fee);}),_0x5e10a9;}[_0x14ef60(0x1b0)](_0x58caa0){const _0xe572da=_0x14ef60;return{'id':_0x58caa0['id'],'threadId':_0x58caa0[_0xe572da(0x1ef)],'ref':_0x58caa0[_0xe572da(0x1f1)]};}};_0x1c2270=_0x57837b([_0xdf1a53(0x0,_0x20d5f0['Inject'](_0x20277a[_0x14ef60(0x1fb)])),_0xdf1a53(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b2)])),_0xdf1a53(0x2,_0x20d5f0[_0x14ef60(0x185)](_0x504b97['CollaborationSessionService']))],_0x1c2270);var _0x37b86e=Object[_0x14ef60(0x1ea)],_0x2607f7=(_0x3d7bd0,_0x4d1fde,_0x1fb7a4,_0x5cc5e2)=>{const _0x2d5dea=_0x14ef60;for(var _0x44059d=_0x5cc5e2>0x1?void 0x0:_0x5cc5e2?_0x37b86e(_0x4d1fde,_0x1fb7a4):_0x4d1fde,_0x11d0e8=_0x3d7bd0[_0x2d5dea(0x1cb)]-0x1,_0x476ccd;_0x11d0e8>=0x0;_0x11d0e8--)(_0x476ccd=_0x3d7bd0[_0x11d0e8])&&(_0x44059d=_0x476ccd(_0x44059d)||_0x44059d);return _0x44059d;},_0x2b9720=(_0x424f39,_0x5cedb9)=>(_0x198c30,_0x17fc00)=>_0x5cedb9(_0x198c30,_0x17fc00,_0x424f39);let _0x3f708a=class extends _0x20d5f0[_0x14ef60(0x1f0)]{constructor(_0x343b7b,_0x2e581d){const _0x3894fd=_0x14ef60;super(),this[_0x3894fd(0x1f8)]=_0x343b7b,this[_0x3894fd(0x1e0)]=_0x2e581d,this[_0x3894fd(0x1c6)]();}['_initDataSource'](){const _0x161ddb=_0x14ef60;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x161ddb(0x1f8)][_0x161ddb(0x1a1)]=!0x1;}};_0x3f708a=_0x2607f7([_0x2b9720(0x0,_0x4f9e71['IThreadCommentDataSourceService']),_0x2b9720(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x1c2270))],_0x3f708a);var _0x1e0353=Object[_0x14ef60(0x194)],_0x1bdad6=Object['getOwnPropertyDescriptor'],_0x38c663=(_0x382086,_0x92551d,_0x2776fe)=>_0x92551d in _0x382086?_0x1e0353(_0x382086,_0x92551d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2776fe}):_0x382086[_0x92551d]=_0x2776fe,_0x123923=(_0x4fd3d5,_0x2d3419,_0x1b9ac2,_0x52565f)=>{const _0x4b2c95=_0x14ef60;for(var _0x1d9973=_0x52565f>0x1?void 0x0:_0x52565f?_0x1bdad6(_0x2d3419,_0x1b9ac2):_0x2d3419,_0x2fe876=_0x4fd3d5[_0x4b2c95(0x1cb)]-0x1,_0x3fe16e;_0x2fe876>=0x0;_0x2fe876--)(_0x3fe16e=_0x4fd3d5[_0x2fe876])&&(_0x1d9973=_0x3fe16e(_0x1d9973)||_0x1d9973);return _0x1d9973;},_0x32ff6e=(_0x452a8b,_0x778e76)=>(_0x20e0aa,_0x5a638a)=>_0x778e76(_0x20e0aa,_0x5a638a,_0x452a8b),_0x35e4b7=(_0x205621,_0x49ee7b,_0x97dac5)=>_0x38c663(_0x205621,typeof _0x49ee7b!=_0x14ef60(0x1c4)?_0x49ee7b+'':_0x49ee7b,_0x97dac5);_0x535030[_0x14ef60(0x1d1)]=class extends _0x20d5f0[_0x14ef60(0x1f5)]{constructor(_0x3cfbfc=_0xd9a410,_0x1f125a,_0x12feac){const _0x1ac444=_0x14ef60;super(),this[_0x1ac444(0x1f6)]=_0x3cfbfc,this[_0x1ac444(0x1d9)]=_0x1f125a,this[_0x1ac444(0x18d)]=_0x12feac;const {..._0x2ae3ed}=_0x20d5f0[_0x1ac444(0x1fd)]({},_0xd9a410,this['_config']);this[_0x1ac444(0x18d)][_0x1ac444(0x1e3)](_0xb8d4e6,_0x2ae3ed);}[_0x14ef60(0x1f7)](){const _0x57ea92=_0x14ef60;[[_0x1c2270],[_0x3f708a],[_0x45c70f]][_0x57ea92(0x1ff)](_0x4219cf=>{const _0x4f756b=_0x57ea92;this[_0x4f756b(0x1d9)][_0x4f756b(0x1d2)](_0x4219cf);});}[_0x14ef60(0x18e)](){const _0x205d8b=_0x14ef60;this[_0x205d8b(0x1d9)][_0x205d8b(0x1e6)](_0x3f708a),this[_0x205d8b(0x1d9)][_0x205d8b(0x1e6)](_0x45c70f);}},_0x35e4b7(_0x535030['UniverThreadCommentDataSourcePlugin'],_0x14ef60(0x1fa),_0x3e569),_0x35e4b7(_0x535030[_0x14ef60(0x1d1)],_0x14ef60(0x1dd),_0x20d5f0[_0x14ef60(0x17f)][_0x14ef60(0x198)]),_0x535030['UniverThreadCommentDataSourcePlugin']=_0x123923([_0x20d5f0['DependentOn'](_0x4da799[_0x14ef60(0x1ed)],_0x504b97[_0x14ef60(0x1ce)],_0x51a395[_0x14ef60(0x1a6)]),_0x32ff6e(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b1)])),_0x32ff6e(0x2,_0x20d5f0[_0x14ef60(0x1b4)])],_0x535030[_0x14ef60(0x1d1)]),Object[_0x14ef60(0x194)](_0x535030,Symbol[_0x14ef60(0x196)],{'value':'Module'});}));function _0x2a56(_0x3d97ff,_0x101063){const _0x3f33df=_0x3f33();return _0x2a56=function(_0x2a5600,_0x212b50){_0x2a5600=_0x2a5600-0x17c;let _0x1edeb0=_0x3f33df[_0x2a5600];return _0x1edeb0;},_0x2a56(_0x3d97ff,_0x101063);}function _0x3f33(){const _0x392c89=['/add','forEach','_sessionService','@univerjs/network','stringify','getComment','rangeId','2459433gpupJK','UniverInstanceType','rangeType','unitId','11BoFAcc','size','subscribe','Inject','UNRECOGNIZED','object','4524270aoXvpF','241550dxmafn','_userService','/delete','Solve','_configService','onReady','_httpService','@univerjs-pro/collaboration-client','/reply','values','CustomRangeType','defineProperty','getCurrentUser','toStringTag','listComments','UNIVER_UNKNOWN','format','solved','getUser','Reply','@univerjs/core','createTimestamp','OpenOrReOpen','Unknown','syncUpdateMutationToColla','2HoERio','map','UniverNetwork','resolved','UniverLicensePlugin','deleteComment','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','529422tqVsAm','802238uQbZEX','updateComment','Add','addComment','/solved','saveCommentToSnapshot','Injector','UserManagerService','CommentService','IConfigService','YYYY/MM/DD\x20HH:mm','code','body','comment','UniverThreadCommentUi','rxjs','UniverThreadComment','exports','post','_threadCommentModel','Edit','/list','Solved','replyId','@univerjs/thread-comment','symbol','disposeWithMe','_initDataSource','9272504PMaINo','28VBXvEb','COMMENT','requireSession','length','/universer-api/comment/unit/','9FEGuPY','UniverCollaborationClientPlugin','getUnit','parse','UniverThreadCommentDataSourcePlugin','add','Delete','UniverProLicense','root','replies','bufferTime','filter','_injector','_initUserSync','UniverCore','addUser','type','77zfuByI','commentUpdate$','_threadCommentDataSource','thread-comment-data-source.config','getMemberID','setConfig','userID','userId','get','23751708dhRdsE','/universer-api/user/list','parentId','getOwnPropertyDescriptor','@univerjs/thread-comment-ui','error','UniverThreadCommentUIPlugin','_commentService','threadId','Disposable','ref','@univerjs-pro/license','dayjs','users','Plugin','_config','onStarting','_threadCommentDataSourceService','_init','pluginName','HTTPService','delete','merge'];_0x3f33=function(){return _0x392c89;};return _0x3f33();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.11.0-nightly.202511151013",
3
+ "version": "0.12.0",
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.11.0-nightly.202511151013",
49
- "@univerjs-pro/license": "0.11.0-nightly.202511151013",
50
- "@univerjs/core": "0.11.0-nightly.202511151013",
48
+ "@univerjs-pro/collaboration-client": "0.12.0",
49
+ "@univerjs-pro/license": "0.12.0",
50
+ "@univerjs/core": "0.12.0",
51
51
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/thread-comment": "0.11.0-nightly.202511151013",
53
- "@univerjs/thread-comment-ui": "0.11.0-nightly.202511151013",
54
- "@univerjs/network": "0.11.0-nightly.202511151013"
52
+ "@univerjs/network": "0.12.0",
53
+ "@univerjs/thread-comment": "0.12.0",
54
+ "@univerjs/thread-comment-ui": "0.12.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.2",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.11.0"
61
+ "@univerjs-infra/shared": "0.12.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",