@univerjs-pro/thread-comment-datasource 0.15.4 → 0.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x86ef70=_0x65fb;(function(_0x3905fb,_0x439422){const _0x39018e=_0x65fb,_0x3978a2=_0x3905fb();while(!![]){try{const _0x51368c=-parseInt(_0x39018e(0x119))/0x1+-parseInt(_0x39018e(0xd3))/0x2+-parseInt(_0x39018e(0xdd))/0x3+-parseInt(_0x39018e(0x10b))/0x4+parseInt(_0x39018e(0xc0))/0x5+-parseInt(_0x39018e(0x11f))/0x6+-parseInt(_0x39018e(0xf1))/0x7*(-parseInt(_0x39018e(0xca))/0x8);if(_0x51368c===_0x439422)break;else _0x3978a2['push'](_0x3978a2['shift']());}catch(_0x14c054){_0x3978a2['push'](_0x3978a2['shift']());}}}(_0x455f,0x586d7));Object[_0x86ef70(0xbe)](exports,Symbol[_0x86ef70(0xc9)],{'value':_0x86ef70(0xe8)});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=_0x86ef70(0x10a);var I=(_0x1817b4=>(_0x1817b4[_0x1817b4[_0x86ef70(0x118)]=0x0]=_0x86ef70(0x118),_0x1817b4[_0x1817b4[_0x86ef70(0x108)]=0x1]='Solved',_0x1817b4[_0x1817b4[_0x86ef70(0xb9)]=-0x1]=_0x86ef70(0xb9),_0x1817b4))(I||{}),v=(_0xd570a6=>(_0xd570a6[_0xd570a6[_0x86ef70(0x120)]=0x0]=_0x86ef70(0x120),_0xd570a6[_0xd570a6[_0x86ef70(0x116)]=0x1]=_0x86ef70(0x116),_0xd570a6[_0xd570a6['Reply']=0x2]=_0x86ef70(0x10f),_0xd570a6[_0xd570a6[_0x86ef70(0xeb)]=0x3]=_0x86ef70(0xeb),_0xd570a6[_0xd570a6['Delete']=0x4]=_0x86ef70(0x112),_0xd570a6[_0xd570a6['Solve']=0x5]=_0x86ef70(0xb3),_0xd570a6[_0xd570a6['UNRECOGNIZED']=-0x1]=_0x86ef70(0xb9),_0xd570a6))(v||{});const f=_0x444ae2=>c['dayjs'](new Date(+_0x444ae2))[_0x86ef70(0x121)](_0x86ef70(0xf4)),R=async(_0x398f1d,_0x53edca)=>{const _0x4d2e9e=_0x86ef70,_0x545317=_0x398f1d[_0x4d2e9e(0xbf)](c[_0x4d2e9e(0xf8)]),_0x35e181=_0x398f1d['get'](P[_0x4d2e9e(0xce)]);_0x53edca[_0x4d2e9e(0x11b)](_0x12f021=>{const _0x50d1da=_0x4d2e9e;_0x545317[_0x50d1da(0xef)](_0x12f021)&&_0x53edca[_0x50d1da(0xae)](_0x12f021);}),_0x53edca[_0x4d2e9e(0xea)]&&(await _0x35e181[_0x4d2e9e(0xbf)](_0x4d2e9e(0xbb),{'params':{'userIDs':[..._0x53edca]}}))[_0x4d2e9e(0xf9)][_0x4d2e9e(0xbc)][_0x4d2e9e(0x11b)](_0x4696ff=>{const _0x5b0ba6=_0x4d2e9e;_0x4696ff&&_0x545317[_0x5b0ba6(0xfc)](_0x4696ff);});};var $=Object[_0x86ef70(0xc7)],E=(_0x1d4e9c,_0x42d4aa,_0x12427f,_0x541cff)=>{for(var _0x5dc1d1=_0x541cff>0x1?void 0x0:_0x541cff?$(_0x42d4aa,_0x12427f):_0x42d4aa,_0x44ef44=_0x1d4e9c['length']-0x1,_0x3ba037;_0x44ef44>=0x0;_0x44ef44--)(_0x3ba037=_0x1d4e9c[_0x44ef44])&&(_0x5dc1d1=_0x3ba037(_0x5dc1d1)||_0x5dc1d1);return _0x5dc1d1;},S=(_0x108248,_0x1b475c)=>(_0x1ebca1,_0x41b84d)=>_0x1b475c(_0x1ebca1,_0x41b84d,_0x108248);let _=class extends c[_0x86ef70(0xe9)]{constructor(_0xa74936,_0x3bb7a5,_0x1d38e3,_0x18cdf2){const _0x244f17=_0x86ef70;super(),this['_commentService']=_0xa74936,this[_0x244f17(0x100)]=_0x3bb7a5,this['_userService']=_0x1d38e3,this[_0x244f17(0x115)]=_0x18cdf2,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x183363=_0x86ef70;this[_0x183363(0xd0)](this[_0x183363(0x100)][_0x183363(0xd2)][_0x183363(0xd5)](j[_0x183363(0xd8)](0x10))['subscribe'](_0x8b4855=>{const _0x439a4f=_0x183363,_0x77d74c=new Set();_0x8b4855[_0x439a4f(0x11b)](_0x167d92=>{const _0x347b01=_0x439a4f;if(_0x167d92[_0x347b01(0xd6)]==='add'){const _0x3872fa=_0x167d92[_0x347b01(0xe5)][_0x347b01(0xb4)];_0x77d74c[_0x347b01(0xaf)](_0x3872fa);}}),R(this[_0x439a4f(0x115)],_0x77d74c);}));}['_init'](){const _0x96697a=_0x86ef70;this[_0x96697a(0xd0)](this[_0x96697a(0xe4)][_0x96697a(0xd2)][_0x96697a(0xba)](async _0x560eef=>{const _0x267f13=_0x96697a;var _0x428f7b,_0x1f1c7b,_0x463afc,_0x200ad8;const _0x1cb240=(_0x428f7b=this['_threadCommentModel'][_0x267f13(0xb8)](_0x560eef[_0x267f13(0x102)])['find'](_0x25d3fe=>_0x25d3fe['threadId']===_0x560eef[_0x267f13(0xb2)]))==null?void 0x0:_0x428f7b['root'];if(!_0x1cb240)return;const {unitId:_0x4ee5e5,subUnitId:_0x152627}=_0x1cb240;switch(_0x560eef['user']&&this[_0x267f13(0x103)][_0x267f13(0xfc)](_0x560eef['user']),_0x560eef[_0x267f13(0xd6)]){case v[_0x267f13(0x116)]:break;case v['Reply']:{this[_0x267f13(0x100)][_0x267f13(0x11d)](_0x4ee5e5,_0x152627,{'unitId':_0x4ee5e5,'subUnitId':_0x152627,'ref':'','id':_0x560eef[_0x267f13(0xda)],'dT':f(+_0x560eef['createTimestamp']),'threadId':_0x560eef[_0x267f13(0xb2)],'personId':(_0x463afc=(_0x1f1c7b=_0x560eef['user'])==null?void 0x0:_0x1f1c7b[_0x267f13(0xd4)])!=null?_0x463afc:_0x560eef[_0x267f13(0xfa)],'text':JSON[_0x267f13(0xec)](_0x560eef[_0x267f13(0x111)]),'parentId':_0x1cb240['id']});break;}case v['Delete']:{const _0x3145f2=this[_0x267f13(0x100)]['getComment'](_0x4ee5e5,_0x152627,_0x560eef[_0x267f13(0xda)]);_0x3145f2&&_0x3145f2['parentId']&&this[_0x267f13(0x100)][_0x267f13(0xb7)](_0x4ee5e5,_0x152627,_0x560eef[_0x267f13(0xda)]);break;}case v[_0x267f13(0xeb)]:{this['_threadCommentModel']['updateComment'](_0x4ee5e5,_0x152627,{'commentId':_0x560eef[_0x267f13(0xda)],'text':JSON[_0x267f13(0xec)](_0x560eef['content'])});break;}case v[_0x267f13(0xb3)]:{const _0x39441e=(_0x200ad8=this[_0x267f13(0x100)]['getUnit'](_0x560eef[_0x267f13(0x102)])['find'](_0x1038ed=>_0x1038ed[_0x267f13(0xb2)]===_0x560eef[_0x267f13(0xb2)]))==null?void 0x0:_0x200ad8['root'];_0x39441e&&this['_threadCommentModel'][_0x267f13(0xcb)](_0x4ee5e5,_0x152627,_0x39441e['id'],_0x560eef[_0x267f13(0xf0)]===I[_0x267f13(0x108)]);break;}}}));}};function _0x65fb(_0x129ffe,_0x1f87f3){_0x129ffe=_0x129ffe-0xae;const _0x455f55=_0x455f();let _0x65fb1e=_0x455f55[_0x129ffe];return _0x65fb1e;}_=E([S(0x0,c[_0x86ef70(0xd7)](b[_0x86ef70(0xfe)])),S(0x1,c[_0x86ef70(0xd7)](M[_0x86ef70(0x114)])),S(0x2,c['Inject'](c[_0x86ef70(0xf8)])),S(0x3,c[_0x86ef70(0xd7)](c[_0x86ef70(0x106)]))],_);const q=_0x86ef70(0xc3),D={};var A=Object[_0x86ef70(0xc7)],x=(_0x5727d1,_0x574f0c,_0x2c4b9a,_0x2ea457)=>{for(var _0x164589=_0x2ea457>0x1?void 0x0:_0x2ea457?A(_0x574f0c,_0x2c4b9a):_0x574f0c,_0x3f1ae9=_0x5727d1['length']-0x1,_0x39a167;_0x3f1ae9>=0x0;_0x3f1ae9--)(_0x39a167=_0x5727d1[_0x3f1ae9])&&(_0x164589=_0x39a167(_0x164589)||_0x164589);return _0x164589;},C=(_0x18ed48,_0x3a887c)=>(_0x1a66c8,_0x58a3ca)=>_0x3a887c(_0x1a66c8,_0x58a3ca,_0x18ed48);function Y(_0xde8fac,_0x47442c){const _0xf6a0c9=_0x86ef70,_0x5b6978=_0xde8fac[_0xf6a0c9(0xbd)][0x0];return{..._0x47442c,'id':_0x5b6978[_0xf6a0c9(0xda)],'resolved':_0xde8fac[_0xf6a0c9(0xf0)]===0x1,'dT':f(_0x5b6978[_0xf6a0c9(0xe1)]),'personId':_0x5b6978['userId'],'threadId':_0x5b6978[_0xf6a0c9(0xb2)]};}function G(_0x5b8a1e,_0xc87bd,_0x51000c){const _0x5bd504=_0x86ef70;var _0x18d9e1,_0x1154d1;if(((_0x1154d1=(_0x18d9e1=_0x5b8a1e==null?void 0x0:_0x5b8a1e[_0x5bd504(0xbd)])==null?void 0x0:_0x18d9e1[_0x5bd504(0xf2)])!=null?_0x1154d1:0x0)>0x0){const _0x565acf=(_0x59199b,_0x5f0c84)=>({'id':_0x59199b[_0x5bd504(0xda)],'threadId':_0x59199b[_0x5bd504(0xb2)],'dT':f(_0x59199b[_0x5bd504(0xe1)]),'personId':_0x59199b[_0x5bd504(0xfa)],'resolved':_0x5b8a1e['solved']===I[_0x5bd504(0x108)],'unitId':_0xc87bd,'subUnitId':_0x51000c,'text':JSON[_0x5bd504(0xec)](_0x59199b[_0x5bd504(0x111)]),'parentId':_0x5f0c84}),_0x41ac8b=_0x565acf(_0x5b8a1e['replies'][0x0]);return{..._0x41ac8b,'children':_0x5b8a1e[_0x5bd504(0xbd)][_0x5bd504(0xcc)](0x1)[_0x5bd504(0x10e)](_0x565d53=>_0x565acf(_0x565d53,_0x41ac8b['id']))};}return null;}let p=class{constructor(_0x459f36,_0x6bf34d,_0x4f2b8a){const _0x17946c=_0x86ef70;this[_0x17946c(0xcd)]=_0x459f36,this[_0x17946c(0x103)]=_0x6bf34d,this['_sessionService']=_0x4f2b8a;}async[_0x86ef70(0x11d)](_0x2ee39e){const _0x4281c1=_0x86ef70;var _0x539f51,_0x743c0e;const {parentId:_0x14b35c,unitId:_0x22e3df,text:_0x1c8c20,threadId:_0x3fc4d1}=_0x2ee39e,_0x5da9c9=(_0x743c0e=(_0x539f51=_0x1c8c20[_0x4281c1(0xe3)])==null?void 0x0:_0x539f51[_0x4281c1(0xf3)](_0x5b5fc7=>_0x5b5fc7['rangeType']===c[_0x4281c1(0xe7)][_0x4281c1(0xfb)])[_0x4281c1(0x10e)](_0x15c3b2=>_0x15c3b2[_0x4281c1(0xfd)]))!=null?_0x743c0e:[],_0x237298=JSON[_0x4281c1(0x11a)](_0x1c8c20),_0x1fb6c7=(await this[_0x4281c1(0xe6)][_0x4281c1(0xf5)](_0x22e3df))[_0x4281c1(0xc2)]();if(_0x14b35c){const _0x88abe={'memberId':_0x1fb6c7,'unitId':_0x22e3df,'content':_0x237298,'mention':_0x5da9c9,'threadId':_0x3fc4d1},_0x67f0fb=(await this[_0x4281c1(0xcd)]['post'](_0x4281c1(0x107)+_0x22e3df+'/reply',{'body':_0x88abe}))[_0x4281c1(0xf9)]['reply'];return{..._0x2ee39e,'id':_0x67f0fb['replyId'],'dT':c['dayjs'](+_0x67f0fb[_0x4281c1(0xe1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x67f0fb[_0x4281c1(0xfa)]};}else{const _0x2656c5={'memberId':_0x1fb6c7,'unitId':_0x22e3df,'content':_0x237298,'mention':_0x5da9c9},_0x259978=await this[_0x4281c1(0xcd)][_0x4281c1(0x105)](_0x4281c1(0x107)+_0x22e3df+'/add',{'body':_0x2656c5});return Y(_0x259978[_0x4281c1(0xf9)]['comment'],_0x2ee39e);}}async[_0x86ef70(0x109)](_0x569fa1){const _0xb24dce=_0x86ef70;var _0x462c37,_0x31b1d0;const {text:_0x88020f,unitId:_0x4862d4}=_0x569fa1,_0x4d4daf=(_0x31b1d0=(_0x462c37=_0x88020f[_0xb24dce(0xe3)])==null?void 0x0:_0x462c37[_0xb24dce(0xf3)](_0x1b8586=>_0x1b8586[_0xb24dce(0xcf)]===c['CustomRangeType']['COMMENT'])['map'](_0x43298d=>_0x43298d[_0xb24dce(0xfd)]))!=null?_0x31b1d0:[],_0x53a1f5=JSON[_0xb24dce(0x11a)](_0x88020f),_0x192c63=_0x569fa1[_0xb24dce(0xb2)],_0x38c3b3=_0x569fa1['id'],_0x44057e={'memberId':(await this[_0xb24dce(0xe6)][_0xb24dce(0xf5)](_0x4862d4))[_0xb24dce(0xc2)](),'unitId':_0x4862d4,'threadId':_0x192c63,'mention':_0x4d4daf,'content':_0x53a1f5,'replyId':_0x38c3b3},_0x3d31eb=await this['_httpService'][_0xb24dce(0x105)](_0xb24dce(0x107)+_0x4862d4+_0xb24dce(0x113),{'body':_0x44057e});return!_0x3d31eb[_0xb24dce(0xf9)][_0xb24dce(0xdc)]||_0x3d31eb[_0xb24dce(0xf9)]['error'][_0xb24dce(0xdb)]===0x1;}async[_0x86ef70(0xcb)](_0x2bc0c6){const _0x104007=_0x86ef70,{unitId:_0x15b2f2}=_0x2bc0c6,_0x2bccfe=_0x2bc0c6[_0x104007(0xb2)],_0x466ad3={'memberId':this[_0x104007(0x103)][_0x104007(0xf7)]()[_0x104007(0xd4)],'unitId':_0x15b2f2,'threadId':_0x2bccfe,'solved':_0x2bc0c6[_0x104007(0xb0)]?I['Solved']:I[_0x104007(0x118)]},_0x4fc6ae=await this[_0x104007(0xcd)][_0x104007(0x105)](_0x104007(0x107)+_0x15b2f2+_0x104007(0x11e),{'body':_0x466ad3});return!_0x4fc6ae['body'][_0x104007(0xdc)]||_0x4fc6ae[_0x104007(0xf9)][_0x104007(0xdc)][_0x104007(0xdb)]===0x1;}async[_0x86ef70(0xb7)](_0xcad2a8,_0x39cafa,_0x219c36,_0x1c1f68){const _0xe48fb7=_0x86ef70,_0x3c0376={'memberId':(await this[_0xe48fb7(0xe6)][_0xe48fb7(0xf5)](_0xcad2a8))[_0xe48fb7(0xc2)](),'threadId':_0x219c36,'replyId':_0x1c1f68,'unitId':_0xcad2a8},_0x476bc5=await this['_httpService'][_0xe48fb7(0x105)]('/universer-api/comment/unit/'+_0xcad2a8+_0xe48fb7(0x104),{'body':_0x3c0376});return!_0x476bc5[_0xe48fb7(0xf9)][_0xe48fb7(0xdc)]||_0x476bc5['body'][_0xe48fb7(0xdc)][_0xe48fb7(0xdb)]===0x1;}async[_0x86ef70(0xc6)](_0x2c2ee7,_0x48c0af,_0x30d6ee){const _0x3c5133=_0x86ef70,_0x7638c5={'unitId':_0x2c2ee7,'threadId':_0x30d6ee},_0x51487b=await this['_httpService']['post'](_0x3c5133(0x107)+_0x2c2ee7+_0x3c5133(0xc5),{'body':_0x7638c5}),_0x1e31a4=_0x30d6ee[_0x3c5133(0x10e)](_0x4bf754=>G(_0x51487b[_0x3c5133(0xf9)][_0x3c5133(0xee)][_0x4bf754],_0x2c2ee7,_0x48c0af))[_0x3c5133(0xf3)](Boolean);return Object[_0x3c5133(0xdf)](_0x51487b['body']['users'])[_0x3c5133(0x11b)](_0x390e06=>{const _0x5c9bc9=_0x3c5133;this[_0x5c9bc9(0x103)][_0x5c9bc9(0xfc)](_0x390e06);}),_0x1e31a4;}[_0x86ef70(0xc8)](_0x1f41e5){const _0x41e2f7=_0x86ef70;return{'id':_0x1f41e5['id'],'threadId':_0x1f41e5['threadId'],'ref':_0x1f41e5[_0x41e2f7(0xd9)]};}};p=x([C(0x0,c[_0x86ef70(0xd7)](P['HTTPService'])),C(0x1,c[_0x86ef70(0xd7)](c[_0x86ef70(0xf8)])),C(0x2,c[_0x86ef70(0xd7)](b['CollaborationSessionService']))],p);var H=Object[_0x86ef70(0xc7)],J=(_0x932c2e,_0x241f0c,_0x406111,_0x352f4f)=>{const _0x3b8691=_0x86ef70;for(var _0x26a0ff=_0x352f4f>0x1?void 0x0:_0x352f4f?H(_0x241f0c,_0x406111):_0x241f0c,_0x488340=_0x932c2e[_0x3b8691(0xf2)]-0x1,_0x5b95a4;_0x488340>=0x0;_0x488340--)(_0x5b95a4=_0x932c2e[_0x488340])&&(_0x26a0ff=_0x5b95a4(_0x26a0ff)||_0x26a0ff);return _0x26a0ff;},y=(_0x4a3f95,_0x5f318f)=>(_0x1f9a84,_0x541cd3)=>_0x5f318f(_0x1f9a84,_0x541cd3,_0x4a3f95);let g=class extends c[_0x86ef70(0xe9)]{constructor(_0x2b6acf,_0x12d34e){const _0x381f5d=_0x86ef70;super(),this[_0x381f5d(0xb5)]=_0x2b6acf,this[_0x381f5d(0x117)]=_0x12d34e,this[_0x381f5d(0xff)]();}[_0x86ef70(0xff)](){const _0x3e62fa=_0x86ef70;this[_0x3e62fa(0xb5)][_0x3e62fa(0xd1)]=this[_0x3e62fa(0x117)],this[_0x3e62fa(0xb5)][_0x3e62fa(0xb6)]=!0x1;}};g=J([y(0x0,M[_0x86ef70(0x110)]),y(0x1,c[_0x86ef70(0xd7)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x243156,_0x588ea3,_0x36407d)=>_0x588ea3 in _0x243156?F(_0x243156,_0x588ea3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36407d}):_0x243156[_0x588ea3]=_0x36407d,W=(_0xb9cb74,_0x516f63,_0x53b549,_0x3b686d)=>{for(var _0x511e1d=_0x3b686d>0x1?void 0x0:_0x3b686d?L(_0x516f63,_0x53b549):_0x516f63,_0x5abe83=_0xb9cb74['length']-0x1,_0xf9a2b5;_0x5abe83>=0x0;_0x5abe83--)(_0xf9a2b5=_0xb9cb74[_0x5abe83])&&(_0x511e1d=_0xf9a2b5(_0x511e1d)||_0x511e1d);return _0x511e1d;},O=(_0x5b2e99,_0x4339d9)=>(_0x45e1cb,_0xf750ca)=>_0x4339d9(_0x45e1cb,_0xf750ca,_0x5b2e99),N=(_0x388905,_0x33039a,_0x390f22)=>Z(_0x388905,typeof _0x33039a!='symbol'?_0x33039a+'':_0x33039a,_0x390f22);exports[_0x86ef70(0xc1)]=class extends c[_0x86ef70(0xc4)]{constructor(_0x34ae3f=D,_0x1b7b0f,_0x32900b){const _0x2f996a=_0x86ef70;super(),this[_0x2f996a(0xb1)]=_0x34ae3f,this['_injector']=_0x1b7b0f,this[_0x2f996a(0x101)]=_0x32900b;const {..._0x51868b}=c[_0x2f996a(0xe0)]({},D,this[_0x2f996a(0xb1)]);this[_0x2f996a(0x101)]['setConfig'](q,_0x51868b);}[_0x86ef70(0xf6)](){const _0x17a99b=_0x86ef70;[[p],[g],[_]][_0x17a99b(0x11b)](_0x453229=>{const _0x28dbcd=_0x17a99b;this[_0x28dbcd(0x115)]['add'](_0x453229);});}[_0x86ef70(0xed)](){const _0xde4553=_0x86ef70;this[_0xde4553(0x115)]['get'](g),this[_0xde4553(0x115)][_0xde4553(0xbf)](_);}},N(exports[_0x86ef70(0xc1)],_0x86ef70(0xde),U),N(exports[_0x86ef70(0xc1)],'type',c[_0x86ef70(0xe2)]['UNIVER_UNKNOWN']),exports[_0x86ef70(0xc1)]=W([c[_0x86ef70(0x10c)](w['UniverThreadCommentUIPlugin'],b[_0x86ef70(0x11c)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x86ef70(0x106)])),O(0x2,c[_0x86ef70(0x10d)])],exports[_0x86ef70(0xc1)]);function _0x455f(){const _0xc97ecf=['Add','_threadCommentDataSource','OpenOrReOpen','132778rIYOkP','stringify','forEach','UniverCollaborationClientPlugin','addComment','/solved','2294214dsbKVn','Unknown','format','delete','add','resolved','_config','threadId','Solve','personId','_threadCommentDataSourceService','syncUpdateMutationToColla','deleteComment','getUnit','UNRECOGNIZED','subscribe','/universer-api/user/list','users','replies','defineProperty','get','3549370jOpzsu','UniverThreadCommentDataSourcePlugin','getMemberID','thread-comment-data-source.config','Plugin','/list','listComments','getOwnPropertyDescriptor','saveCommentToSnapshot','toStringTag','89344FUdkiG','resolveComment','slice','_httpService','HTTPService','rangeType','disposeWithMe','dataSource','commentUpdate$','744024qfbDJN','userID','pipe','type','Inject','bufferTime','ref','replyId','code','error','181755oYRQcR','pluginName','values','merge','createTimestamp','UniverInstanceType','customRanges','_commentService','payload','_sessionService','CustomRangeType','Module','Disposable','size','Edit','parse','onReady','comments','getUser','solved','392JbiXco','length','filter','YYYY/MM/DD\x20HH:mm','requireSession','onStarting','getCurrentUser','UserManagerService','body','userId','COMMENT','addUser','rangeId','CommentService','_initDataSource','_threadCommentModel','_configService','unitId','_userService','/delete','post','Injector','/universer-api/comment/unit/','Solved','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','101356YsWaQe','DependentOn','IConfigService','map','Reply','IThreadCommentDataSourceService','content','Delete','/edit','ThreadCommentModel','_injector'];_0x455f=function(){return _0xc97ecf;};return _0x455f();}
|
|
1
|
+
'use strict';function _0x1169(_0x5703f7,_0x4f0a0d){_0x5703f7=_0x5703f7-0x173;const _0x3bb234=_0x3bb2();let _0x1169d7=_0x3bb234[_0x5703f7];return _0x1169d7;}const _0x3d1db5=_0x1169;(function(_0x401810,_0x34c493){const _0x2bd3db=_0x1169,_0x5555d7=_0x401810();while(!![]){try{const _0xe12e78=-parseInt(_0x2bd3db(0x1b7))/0x1*(-parseInt(_0x2bd3db(0x1bb))/0x2)+-parseInt(_0x2bd3db(0x1eb))/0x3+-parseInt(_0x2bd3db(0x1e4))/0x4*(-parseInt(_0x2bd3db(0x182))/0x5)+parseInt(_0x2bd3db(0x1b4))/0x6+parseInt(_0x2bd3db(0x1b0))/0x7*(-parseInt(_0x2bd3db(0x190))/0x8)+-parseInt(_0x2bd3db(0x19d))/0x9*(parseInt(_0x2bd3db(0x1ba))/0xa)+parseInt(_0x2bd3db(0x187))/0xb;if(_0xe12e78===_0x34c493)break;else _0x5555d7['push'](_0x5555d7['shift']());}catch(_0x174e6d){_0x5555d7['push'](_0x5555d7['shift']());}}}(_0x3bb2,0xcddfb));Object[_0x3d1db5(0x199)](exports,Symbol[_0x3d1db5(0x175)],{'value':_0x3d1db5(0x1c5)});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=_0x3d1db5(0x189);var I=(_0x46dec4=>(_0x46dec4[_0x46dec4[_0x3d1db5(0x1a9)]=0x0]='OpenOrReOpen',_0x46dec4[_0x46dec4[_0x3d1db5(0x1a2)]=0x1]=_0x3d1db5(0x1a2),_0x46dec4[_0x46dec4[_0x3d1db5(0x181)]=-0x1]=_0x3d1db5(0x181),_0x46dec4))(I||{}),v=(_0x191b06=>(_0x191b06[_0x191b06['Unknown']=0x0]=_0x3d1db5(0x18f),_0x191b06[_0x191b06[_0x3d1db5(0x176)]=0x1]=_0x3d1db5(0x176),_0x191b06[_0x191b06['Reply']=0x2]=_0x3d1db5(0x1a1),_0x191b06[_0x191b06[_0x3d1db5(0x1e9)]=0x3]=_0x3d1db5(0x1e9),_0x191b06[_0x191b06[_0x3d1db5(0x1d4)]=0x4]='Delete',_0x191b06[_0x191b06[_0x3d1db5(0x1b6)]=0x5]=_0x3d1db5(0x1b6),_0x191b06[_0x191b06[_0x3d1db5(0x181)]=-0x1]=_0x3d1db5(0x181),_0x191b06))(v||{});const f=_0x84494d=>c['dayjs'](new Date(+_0x84494d))['format'](_0x3d1db5(0x1d8)),R=async(_0x517b9d,_0x299b6a)=>{const _0x214aba=_0x3d1db5,_0x2f5da0=_0x517b9d[_0x214aba(0x1e1)](c[_0x214aba(0x1b2)]),_0x1fff50=_0x517b9d[_0x214aba(0x1e1)](P['HTTPService']);_0x299b6a[_0x214aba(0x19b)](_0x4381b7=>{const _0x141257=_0x214aba;_0x2f5da0[_0x141257(0x1a5)](_0x4381b7)&&_0x299b6a[_0x141257(0x1e3)](_0x4381b7);}),_0x299b6a[_0x214aba(0x1d5)]&&(await _0x1fff50['get'](_0x214aba(0x1ce),{'params':{'userIDs':[..._0x299b6a]}}))[_0x214aba(0x1a7)][_0x214aba(0x1b8)][_0x214aba(0x19b)](_0x2ab090=>{const _0x4e02b7=_0x214aba;_0x2ab090&&_0x2f5da0[_0x4e02b7(0x1e2)](_0x2ab090);});};function _0x3bb2(){const _0xd05a53=['filter','post','type','toStringTag','Add','saveCommentToSnapshot','thread-comment-data-source.config','comment','getOwnPropertyDescriptor','threadId','DependentOn','_httpService','UniverCollaborationClientPlugin','updateComment','find','UNRECOGNIZED','8440wOnyEd','getMemberID','subscribe','getComment','replies','8677174UuWOgG','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','values','_threadCommentDataSource','format','ThreadCommentModel','Unknown','591144gXWTKK','Plugin','_init','_initDataSource','_initUserSync','_threadCommentDataSourceService','_injector','_commentService','/edit','defineProperty','CommentService','forEach','userId','117Bcsrft','requireSession','dayjs','rangeType','Reply','Solved','merge','_userService','getUser','map','body','stringify','OpenOrReOpen','onReady','content','Inject','CustomRangeType','setConfig','Disposable','63wrsbyg','_sessionService','UserManagerService','ref','7668594dEQJWW','user','Solve','1sGMOBp','users','add','767170YUbsEu','60042YqYbad','_configService','getUnit','UniverThreadCommentDataSourcePlugin','_threadCommentModel','syncUpdateMutationToColla','reply','parse','bufferTime','UniverInstanceType','Module','slice','getCurrentUser','listComments','onStarting','Injector','commentUpdate$','resolved','UNIVER_UNKNOWN','/universer-api/user/list','/solved','payload','_config','/reply','solved','Delete','size','CollaborationSessionService','deleteComment','YYYY/MM/DD\x20HH:mm','symbol','length','unitId','rangeId','addComment','code','pipe','customRanges','get','addUser','delete','3028ZRTTsJ','root','replyId','error','/delete','Edit','createTimestamp','2607459yVDESE','dataSource'];_0x3bb2=function(){return _0xd05a53;};return _0x3bb2();}var $=Object[_0x3d1db5(0x17a)],E=(_0x47afc7,_0x24d030,_0x27148a,_0xd37bf0)=>{const _0x4510d0=_0x3d1db5;for(var _0x5f920b=_0xd37bf0>0x1?void 0x0:_0xd37bf0?$(_0x24d030,_0x27148a):_0x24d030,_0xd75ae=_0x47afc7[_0x4510d0(0x1da)]-0x1,_0x72d327;_0xd75ae>=0x0;_0xd75ae--)(_0x72d327=_0x47afc7[_0xd75ae])&&(_0x5f920b=_0x72d327(_0x5f920b)||_0x5f920b);return _0x5f920b;},S=(_0x76aad5,_0x8c6167)=>(_0x3afec0,_0xf136f8)=>_0x8c6167(_0x3afec0,_0xf136f8,_0x76aad5);let _=class extends c[_0x3d1db5(0x1af)]{constructor(_0x1ccf63,_0x2247ac,_0x44b69f,_0x45fa01){const _0x12747f=_0x3d1db5;super(),this[_0x12747f(0x197)]=_0x1ccf63,this[_0x12747f(0x1bf)]=_0x2247ac,this[_0x12747f(0x1a4)]=_0x44b69f,this[_0x12747f(0x196)]=_0x45fa01,this[_0x12747f(0x192)](),this[_0x12747f(0x194)]();}['_initUserSync'](){const _0x49cded=_0x3d1db5;this['disposeWithMe'](this[_0x49cded(0x1bf)][_0x49cded(0x1cb)][_0x49cded(0x1df)](j[_0x49cded(0x1c3)](0x10))[_0x49cded(0x184)](_0x56cfdd=>{const _0x1e6c55=_0x49cded,_0xa25cd4=new Set();_0x56cfdd['forEach'](_0x4d064e=>{const _0x15b9a6=_0x1169;if(_0x4d064e[_0x15b9a6(0x174)]===_0x15b9a6(0x1b9)){const _0x8cfe1c=_0x4d064e[_0x15b9a6(0x1d0)]['personId'];_0xa25cd4[_0x15b9a6(0x1b9)](_0x8cfe1c);}}),R(this[_0x1e6c55(0x196)],_0xa25cd4);}));}['_init'](){const _0x4cea3=_0x3d1db5;this['disposeWithMe'](this['_commentService'][_0x4cea3(0x1cb)]['subscribe'](async _0x588f5c=>{const _0x4c11ef=_0x4cea3;var _0x21fc82,_0x3e6393,_0x11cbc1,_0x3d03f6;const _0x4e005a=(_0x21fc82=this[_0x4c11ef(0x1bf)]['getUnit'](_0x588f5c[_0x4c11ef(0x1db)])[_0x4c11ef(0x180)](_0x512c64=>_0x512c64[_0x4c11ef(0x17b)]===_0x588f5c[_0x4c11ef(0x17b)]))==null?void 0x0:_0x21fc82[_0x4c11ef(0x1e5)];if(!_0x4e005a)return;const {unitId:_0x10b12b,subUnitId:_0x5685bf}=_0x4e005a;switch(_0x588f5c[_0x4c11ef(0x1b5)]&&this[_0x4c11ef(0x1a4)][_0x4c11ef(0x1e2)](_0x588f5c[_0x4c11ef(0x1b5)]),_0x588f5c[_0x4c11ef(0x174)]){case v[_0x4c11ef(0x176)]:break;case v[_0x4c11ef(0x1a1)]:{this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1dd)](_0x10b12b,_0x5685bf,{'unitId':_0x10b12b,'subUnitId':_0x5685bf,'ref':'','id':_0x588f5c[_0x4c11ef(0x1e6)],'dT':f(+_0x588f5c[_0x4c11ef(0x1ea)]),'threadId':_0x588f5c[_0x4c11ef(0x17b)],'personId':(_0x11cbc1=(_0x3e6393=_0x588f5c[_0x4c11ef(0x1b5)])==null?void 0x0:_0x3e6393['userID'])!=null?_0x11cbc1:_0x588f5c['userId'],'text':JSON[_0x4c11ef(0x1c2)](_0x588f5c['content']),'parentId':_0x4e005a['id']});break;}case v[_0x4c11ef(0x1d4)]:{const _0x4aad88=this[_0x4c11ef(0x1bf)][_0x4c11ef(0x185)](_0x10b12b,_0x5685bf,_0x588f5c[_0x4c11ef(0x1e6)]);_0x4aad88&&_0x4aad88['parentId']&&this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1d7)](_0x10b12b,_0x5685bf,_0x588f5c[_0x4c11ef(0x1e6)]);break;}case v[_0x4c11ef(0x1e9)]:{this[_0x4c11ef(0x1bf)][_0x4c11ef(0x17f)](_0x10b12b,_0x5685bf,{'commentId':_0x588f5c['replyId'],'text':JSON['parse'](_0x588f5c['content'])});break;}case v[_0x4c11ef(0x1b6)]:{const _0x41529e=(_0x3d03f6=this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1bd)](_0x588f5c[_0x4c11ef(0x1db)])['find'](_0x66b010=>_0x66b010[_0x4c11ef(0x17b)]===_0x588f5c['threadId']))==null?void 0x0:_0x3d03f6[_0x4c11ef(0x1e5)];_0x41529e&&this[_0x4c11ef(0x1bf)]['resolveComment'](_0x10b12b,_0x5685bf,_0x41529e['id'],_0x588f5c[_0x4c11ef(0x1d3)]===I[_0x4c11ef(0x1a2)]);break;}}}));}};_=E([S(0x0,c[_0x3d1db5(0x1ac)](b[_0x3d1db5(0x19a)])),S(0x1,c[_0x3d1db5(0x1ac)](M[_0x3d1db5(0x18e)])),S(0x2,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1b2)])),S(0x3,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1ca)]))],_);const q=_0x3d1db5(0x178),D={};var A=Object[_0x3d1db5(0x17a)],x=(_0x1bb383,_0x5a5faf,_0x25ccb3,_0x2f83cc)=>{const _0x4a51f3=_0x3d1db5;for(var _0x473590=_0x2f83cc>0x1?void 0x0:_0x2f83cc?A(_0x5a5faf,_0x25ccb3):_0x5a5faf,_0x2dac46=_0x1bb383[_0x4a51f3(0x1da)]-0x1,_0x593a08;_0x2dac46>=0x0;_0x2dac46--)(_0x593a08=_0x1bb383[_0x2dac46])&&(_0x473590=_0x593a08(_0x473590)||_0x473590);return _0x473590;},C=(_0x55562b,_0x4dd465)=>(_0x321bcf,_0x56ca1c)=>_0x4dd465(_0x321bcf,_0x56ca1c,_0x55562b);function Y(_0x24dd2f,_0x15efbb){const _0x5582ec=_0x3d1db5,_0x394d69=_0x24dd2f[_0x5582ec(0x186)][0x0];return{..._0x15efbb,'id':_0x394d69[_0x5582ec(0x1e6)],'resolved':_0x24dd2f[_0x5582ec(0x1d3)]===0x1,'dT':f(_0x394d69[_0x5582ec(0x1ea)]),'personId':_0x394d69[_0x5582ec(0x19c)],'threadId':_0x394d69['threadId']};}function G(_0x44a122,_0x5ec112,_0x415e88){const _0x3f2079=_0x3d1db5;var _0x89a76c,_0x3fb1f7;if(((_0x3fb1f7=(_0x89a76c=_0x44a122==null?void 0x0:_0x44a122[_0x3f2079(0x186)])==null?void 0x0:_0x89a76c['length'])!=null?_0x3fb1f7:0x0)>0x0){const _0x469814=(_0xe54661,_0x6fd75e)=>({'id':_0xe54661[_0x3f2079(0x1e6)],'threadId':_0xe54661[_0x3f2079(0x17b)],'dT':f(_0xe54661[_0x3f2079(0x1ea)]),'personId':_0xe54661[_0x3f2079(0x19c)],'resolved':_0x44a122[_0x3f2079(0x1d3)]===I[_0x3f2079(0x1a2)],'unitId':_0x5ec112,'subUnitId':_0x415e88,'text':JSON[_0x3f2079(0x1c2)](_0xe54661[_0x3f2079(0x1ab)]),'parentId':_0x6fd75e}),_0x20584a=_0x469814(_0x44a122[_0x3f2079(0x186)][0x0]);return{..._0x20584a,'children':_0x44a122[_0x3f2079(0x186)][_0x3f2079(0x1c6)](0x1)['map'](_0x22929c=>_0x469814(_0x22929c,_0x20584a['id']))};}return null;}let p=class{constructor(_0x16c7b8,_0x4406f8,_0x4f01d0){const _0x2a60fd=_0x3d1db5;this[_0x2a60fd(0x17d)]=_0x16c7b8,this[_0x2a60fd(0x1a4)]=_0x4406f8,this[_0x2a60fd(0x1b1)]=_0x4f01d0;}async[_0x3d1db5(0x1dd)](_0x5cb4ab){const _0x4c9668=_0x3d1db5;var _0x84c271,_0x51da51;const {parentId:_0x311af8,unitId:_0x389ef4,text:_0x1b5712,threadId:_0x15f9b3}=_0x5cb4ab,_0x2faeee=(_0x51da51=(_0x84c271=_0x1b5712[_0x4c9668(0x1e0)])==null?void 0x0:_0x84c271[_0x4c9668(0x1ed)](_0x3bc051=>_0x3bc051[_0x4c9668(0x1a0)]===c[_0x4c9668(0x1ad)][_0x4c9668(0x18a)])['map'](_0x30a2af=>_0x30a2af[_0x4c9668(0x1dc)]))!=null?_0x51da51:[],_0x59b363=JSON[_0x4c9668(0x1a8)](_0x1b5712),_0x2a8d37=(await this[_0x4c9668(0x1b1)][_0x4c9668(0x19e)](_0x389ef4))['getMemberID']();if(_0x311af8){const _0x224463={'memberId':_0x2a8d37,'unitId':_0x389ef4,'content':_0x59b363,'mention':_0x2faeee,'threadId':_0x15f9b3},_0x5e0b68=(await this[_0x4c9668(0x17d)][_0x4c9668(0x173)](_0x4c9668(0x188)+_0x389ef4+_0x4c9668(0x1d2),{'body':_0x224463}))['body'][_0x4c9668(0x1c1)];return{..._0x5cb4ab,'id':_0x5e0b68[_0x4c9668(0x1e6)],'dT':c[_0x4c9668(0x19f)](+_0x5e0b68['createTimestamp'])[_0x4c9668(0x18d)](_0x4c9668(0x1d8)),'personId':_0x5e0b68[_0x4c9668(0x19c)]};}else{const _0xc6694b={'memberId':_0x2a8d37,'unitId':_0x389ef4,'content':_0x59b363,'mention':_0x2faeee},_0x3ddbc0=await this[_0x4c9668(0x17d)][_0x4c9668(0x173)]('/universer-api/comment/unit/'+_0x389ef4+'/add',{'body':_0xc6694b});return Y(_0x3ddbc0[_0x4c9668(0x1a7)][_0x4c9668(0x179)],_0x5cb4ab);}}async[_0x3d1db5(0x17f)](_0x1b1784){const _0xf52251=_0x3d1db5;var _0x44f8b8,_0x322f8a;const {text:_0x235377,unitId:_0x1ce8bc}=_0x1b1784,_0x100dab=(_0x322f8a=(_0x44f8b8=_0x235377[_0xf52251(0x1e0)])==null?void 0x0:_0x44f8b8['filter'](_0x11462e=>_0x11462e[_0xf52251(0x1a0)]===c[_0xf52251(0x1ad)][_0xf52251(0x18a)])[_0xf52251(0x1a6)](_0x33e788=>_0x33e788['rangeId']))!=null?_0x322f8a:[],_0x54c1d6=JSON[_0xf52251(0x1a8)](_0x235377),_0xdf5469=_0x1b1784[_0xf52251(0x17b)],_0x1ef290=_0x1b1784['id'],_0x546811={'memberId':(await this[_0xf52251(0x1b1)][_0xf52251(0x19e)](_0x1ce8bc))[_0xf52251(0x183)](),'unitId':_0x1ce8bc,'threadId':_0xdf5469,'mention':_0x100dab,'content':_0x54c1d6,'replyId':_0x1ef290},_0xabbcf=await this[_0xf52251(0x17d)][_0xf52251(0x173)](_0xf52251(0x188)+_0x1ce8bc+_0xf52251(0x198),{'body':_0x546811});return!_0xabbcf[_0xf52251(0x1a7)][_0xf52251(0x1e7)]||_0xabbcf[_0xf52251(0x1a7)][_0xf52251(0x1e7)][_0xf52251(0x1de)]===0x1;}async['resolveComment'](_0x441e99){const _0x2b6ffb=_0x3d1db5,{unitId:_0x2094ae}=_0x441e99,_0x2614c3=_0x441e99[_0x2b6ffb(0x17b)],_0x33bc61={'memberId':this['_userService'][_0x2b6ffb(0x1c7)]()['userID'],'unitId':_0x2094ae,'threadId':_0x2614c3,'solved':_0x441e99[_0x2b6ffb(0x1cc)]?I['Solved']:I[_0x2b6ffb(0x1a9)]},_0x2f81bd=await this[_0x2b6ffb(0x17d)][_0x2b6ffb(0x173)](_0x2b6ffb(0x188)+_0x2094ae+_0x2b6ffb(0x1cf),{'body':_0x33bc61});return!_0x2f81bd[_0x2b6ffb(0x1a7)][_0x2b6ffb(0x1e7)]||_0x2f81bd[_0x2b6ffb(0x1a7)][_0x2b6ffb(0x1e7)][_0x2b6ffb(0x1de)]===0x1;}async[_0x3d1db5(0x1d7)](_0x3a4952,_0x1d118c,_0x57df27,_0x4205ef){const _0x320b71=_0x3d1db5,_0x1fe53e={'memberId':(await this['_sessionService'][_0x320b71(0x19e)](_0x3a4952))[_0x320b71(0x183)](),'threadId':_0x57df27,'replyId':_0x4205ef,'unitId':_0x3a4952},_0x4a00ca=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3a4952+_0x320b71(0x1e8),{'body':_0x1fe53e});return!_0x4a00ca[_0x320b71(0x1a7)][_0x320b71(0x1e7)]||_0x4a00ca[_0x320b71(0x1a7)][_0x320b71(0x1e7)]['code']===0x1;}async[_0x3d1db5(0x1c8)](_0x20bc2e,_0x6338c2,_0x3da866){const _0x1b647d=_0x3d1db5,_0xcf5ede={'unitId':_0x20bc2e,'threadId':_0x3da866},_0x1e2518=await this[_0x1b647d(0x17d)][_0x1b647d(0x173)](_0x1b647d(0x188)+_0x20bc2e+'/list',{'body':_0xcf5ede}),_0x5a4582=_0x3da866[_0x1b647d(0x1a6)](_0x114e29=>G(_0x1e2518[_0x1b647d(0x1a7)]['comments'][_0x114e29],_0x20bc2e,_0x6338c2))[_0x1b647d(0x1ed)](Boolean);return Object[_0x1b647d(0x18b)](_0x1e2518[_0x1b647d(0x1a7)][_0x1b647d(0x1b8)])[_0x1b647d(0x19b)](_0x4a3f6f=>{const _0x52d2dd=_0x1b647d;this[_0x52d2dd(0x1a4)][_0x52d2dd(0x1e2)](_0x4a3f6f);}),_0x5a4582;}[_0x3d1db5(0x177)](_0x42f0ca){const _0x1612a2=_0x3d1db5;return{'id':_0x42f0ca['id'],'threadId':_0x42f0ca[_0x1612a2(0x17b)],'ref':_0x42f0ca[_0x1612a2(0x1b3)]};}};p=x([C(0x0,c[_0x3d1db5(0x1ac)](P['HTTPService'])),C(0x1,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1b2)])),C(0x2,c[_0x3d1db5(0x1ac)](b[_0x3d1db5(0x1d6)]))],p);var H=Object[_0x3d1db5(0x17a)],J=(_0x34bb68,_0x15c45f,_0x1481ac,_0x585eb5)=>{for(var _0x2f50e7=_0x585eb5>0x1?void 0x0:_0x585eb5?H(_0x15c45f,_0x1481ac):_0x15c45f,_0xf38a7a=_0x34bb68['length']-0x1,_0x2fa657;_0xf38a7a>=0x0;_0xf38a7a--)(_0x2fa657=_0x34bb68[_0xf38a7a])&&(_0x2f50e7=_0x2fa657(_0x2f50e7)||_0x2f50e7);return _0x2f50e7;},y=(_0xf3b23f,_0x1b9fa5)=>(_0xd764e,_0x53c52a)=>_0x1b9fa5(_0xd764e,_0x53c52a,_0xf3b23f);let g=class extends c[_0x3d1db5(0x1af)]{constructor(_0x26587c,_0x2b24af){const _0x5054b1=_0x3d1db5;super(),this[_0x5054b1(0x195)]=_0x26587c,this[_0x5054b1(0x18c)]=_0x2b24af,this[_0x5054b1(0x193)]();}['_initDataSource'](){const _0x24546c=_0x3d1db5;this[_0x24546c(0x195)][_0x24546c(0x1ec)]=this[_0x24546c(0x18c)],this[_0x24546c(0x195)][_0x24546c(0x1c0)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x3d1db5(0x199)],L=Object['getOwnPropertyDescriptor'],Z=(_0x40e8ff,_0x6f83ec,_0x4bf4e3)=>_0x6f83ec in _0x40e8ff?F(_0x40e8ff,_0x6f83ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bf4e3}):_0x40e8ff[_0x6f83ec]=_0x4bf4e3,W=(_0x5c707f,_0x1c45b6,_0x89b6d6,_0xe58b47)=>{const _0x1b8303=_0x3d1db5;for(var _0x400917=_0xe58b47>0x1?void 0x0:_0xe58b47?L(_0x1c45b6,_0x89b6d6):_0x1c45b6,_0x4103a3=_0x5c707f[_0x1b8303(0x1da)]-0x1,_0x33683b;_0x4103a3>=0x0;_0x4103a3--)(_0x33683b=_0x5c707f[_0x4103a3])&&(_0x400917=_0x33683b(_0x400917)||_0x400917);return _0x400917;},O=(_0x368bd8,_0x4235c1)=>(_0x3886f4,_0x7614cd)=>_0x4235c1(_0x3886f4,_0x7614cd,_0x368bd8),N=(_0x54296e,_0x27b5d6,_0x4c1ab5)=>Z(_0x54296e,typeof _0x27b5d6!=_0x3d1db5(0x1d9)?_0x27b5d6+'':_0x27b5d6,_0x4c1ab5);exports[_0x3d1db5(0x1be)]=class extends c[_0x3d1db5(0x191)]{constructor(_0xd51dc9=D,_0x4641f3,_0x6ef878){const _0x1a47b3=_0x3d1db5;super(),this[_0x1a47b3(0x1d1)]=_0xd51dc9,this[_0x1a47b3(0x196)]=_0x4641f3,this['_configService']=_0x6ef878;const {..._0x5d8773}=c[_0x1a47b3(0x1a3)]({},D,this[_0x1a47b3(0x1d1)]);this[_0x1a47b3(0x1bc)][_0x1a47b3(0x1ae)](q,_0x5d8773);}[_0x3d1db5(0x1c9)](){[[p],[g],[_]]['forEach'](_0x3bb083=>{const _0x34af70=_0x1169;this[_0x34af70(0x196)][_0x34af70(0x1b9)](_0x3bb083);});}[_0x3d1db5(0x1aa)](){const _0x13240f=_0x3d1db5;this[_0x13240f(0x196)][_0x13240f(0x1e1)](g),this[_0x13240f(0x196)][_0x13240f(0x1e1)](_);}},N(exports[_0x3d1db5(0x1be)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3d1db5(0x174),c[_0x3d1db5(0x1c4)][_0x3d1db5(0x1cd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3d1db5(0x17c)](w['UniverThreadCommentUIPlugin'],b[_0x3d1db5(0x17e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x430339=_0x29df;(function(_0x5cbf55,_0x48d232){const _0x52f4c4=_0x29df,_0x1afc3c=_0x5cbf55();while(!![]){try{const _0x263434=parseInt(_0x52f4c4(0xa2))/0x1*(parseInt(_0x52f4c4(0xb8))/0x2)+parseInt(_0x52f4c4(0xc2))/0x3*(-parseInt(_0x52f4c4(0xb1))/0x4)+parseInt(_0x52f4c4(0xcb))/0x5+-parseInt(_0x52f4c4(0xf8))/0x6*(-parseInt(_0x52f4c4(0x9e))/0x7)+parseInt(_0x52f4c4(0xbd))/0x8*(-parseInt(_0x52f4c4(0xf9))/0x9)+parseInt(_0x52f4c4(0xba))/0xa+parseInt(_0x52f4c4(0xcf))/0xb*(parseInt(_0x52f4c4(0xb9))/0xc);if(_0x263434===_0x48d232)break;else _0x1afc3c['push'](_0x1afc3c['shift']());}catch(_0x134c22){_0x1afc3c['push'](_0x1afc3c['shift']());}}}(_0x342d,0x20482));import{CommentService as _0x4f2985,CollaborationSessionService as _0x11cde2,UniverCollaborationClientPlugin as _0x2663f6}from'@univerjs-pro/collaboration-client';function _0x342d(){const _0x167208=['replyId','_injector','delete','comment','format','deleteComment','stringify','_threadCommentModel','solved','_config','_init','commentUpdate$','12oMbOVA','603fwZcnw','COMMENT','dataSource','addComment','threadId','resolveComment','_threadCommentDataSource','code','getOwnPropertyDescriptor','user','/list','/delete','Reply','285628gxOFnl','_sessionService','Solve','content','97bNoncc','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','getUser','parse','body','payload','_initDataSource','Add','users','rangeType','_initUserSync','_httpService','OpenOrReOpen','242188zgyTEA','userId','/solved','defineProperty','add','error','_configService','402iKuuBE','279132ioqqVI','1903000qCrZYu','setConfig','getUnit','18040FYrbio','subscribe','filter','slice','map','3tIqdfH','get','post','createTimestamp','onReady','requireSession','length','find','getMemberID','29655XkNkSp','forEach','Delete','reply','22ZAewfg','values','Solved','UNRECOGNIZED','type','/universer-api/user/list','onStarting','resolved','syncUpdateMutationToColla','getComment','thread-comment-data-source.config','parentId','_threadCommentDataSourceService','replies','comments','UNIVER_UNKNOWN','unitId','rangeId','pluginName','root','pipe','_commentService','_userService','updateComment','customRanges','addUser','Unknown','/edit','/universer-api/comment/unit/'];_0x342d=function(){return _0x167208;};return _0x342d();}import{UniverLicensePlugin as _0x13710b}from'@univerjs-pro/license';import{dayjs as _0x482a8a,UserManagerService as _0x3c7f05,Inject as _0x284561,Injector as _0x42cc06,Disposable as _0x50a3fb,CustomRangeType as _0x3efa19,UniverInstanceType as _0x4be0da,DependentOn as _0x4af44e,Plugin as _0x28c80c,merge as _0x362468,IConfigService as _0x4dbdea}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x116fe9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cb6ce,IThreadCommentDataSourceService as _0x401660}from'@univerjs/thread-comment';import{bufferTime as _0x5ab57d}from'rxjs';import{HTTPService as _0x2e9b77}from'@univerjs/network';const W=_0x430339(0xa4);var I=(_0x1dbd1d=>(_0x1dbd1d[_0x1dbd1d[_0x430339(0xb0)]=0x0]=_0x430339(0xb0),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd1)]=0x1]=_0x430339(0xd1),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x1dbd1d))(I||{}),v=(_0x2d04d9=>(_0x2d04d9[_0x2d04d9[_0x430339(0xe9)]=0x0]=_0x430339(0xe9),_0x2d04d9[_0x2d04d9[_0x430339(0xab)]=0x1]=_0x430339(0xab),_0x2d04d9[_0x2d04d9[_0x430339(0x9d)]=0x2]=_0x430339(0x9d),_0x2d04d9[_0x2d04d9['Edit']=0x3]=_0x430339(0xa5),_0x2d04d9[_0x2d04d9['Delete']=0x4]=_0x430339(0xcd),_0x2d04d9[_0x2d04d9['Solve']=0x5]=_0x430339(0xa0),_0x2d04d9[_0x2d04d9[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x2d04d9))(v||{});const y=_0x359ae5=>_0x482a8a(new Date(+_0x359ae5))[_0x430339(0xf0)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x16cea7,_0x156b5b)=>{const _0x350cb7=_0x430339,_0x133d81=_0x16cea7[_0x350cb7(0xc3)](_0x3c7f05),_0x40f182=_0x16cea7['get'](_0x2e9b77);_0x156b5b['forEach'](_0x16881c=>{const _0x3aed0f=_0x350cb7;_0x133d81[_0x3aed0f(0xa6)](_0x16881c)&&_0x156b5b[_0x3aed0f(0xee)](_0x16881c);}),_0x156b5b['size']&&(await _0x40f182[_0x350cb7(0xc3)](_0x350cb7(0xd4),{'params':{'userIDs':[..._0x156b5b]}}))[_0x350cb7(0xa8)][_0x350cb7(0xac)][_0x350cb7(0xcc)](_0x69280d=>{const _0x41f293=_0x350cb7;_0x69280d&&_0x133d81[_0x41f293(0xe8)](_0x69280d);});};var K=Object[_0x430339(0x99)],V=(_0x3402e0,_0x1857a6,_0xc3572a,_0x10c23c)=>{const _0x2f3a2d=_0x430339;for(var _0x436a7a=_0x10c23c>0x1?void 0x0:_0x10c23c?K(_0x1857a6,_0xc3572a):_0x1857a6,_0x334a2d=_0x3402e0[_0x2f3a2d(0xc8)]-0x1,_0x2b7e38;_0x334a2d>=0x0;_0x334a2d--)(_0x2b7e38=_0x3402e0[_0x334a2d])&&(_0x436a7a=_0x2b7e38(_0x436a7a)||_0x436a7a);return _0x436a7a;},p=(_0x4b1c7e,_0x100287)=>(_0x4ebeb4,_0x899d41)=>_0x100287(_0x4ebeb4,_0x899d41,_0x4b1c7e);let _=class extends _0x50a3fb{constructor(_0x208135,_0x3b69ce,_0x104d78,_0x2af8c6){const _0x3ac60e=_0x430339;super(),this['_commentService']=_0x208135,this['_threadCommentModel']=_0x3b69ce,this[_0x3ac60e(0xe5)]=_0x104d78,this['_injector']=_0x2af8c6,this['_init'](),this['_initUserSync']();}[_0x430339(0xae)](){const _0xbafe6e=_0x430339;this['disposeWithMe'](this['_threadCommentModel'][_0xbafe6e(0xf7)][_0xbafe6e(0xe3)](_0x5ab57d(0x10))[_0xbafe6e(0xbe)](_0x124065=>{const _0x1d9ebb=_0xbafe6e,_0x293812=new Set();_0x124065['forEach'](_0xb03f72=>{const _0x220e2e=_0x29df;if(_0xb03f72[_0x220e2e(0xd3)]===_0x220e2e(0xb5)){const _0x127e09=_0xb03f72[_0x220e2e(0xa9)]['personId'];_0x293812[_0x220e2e(0xb5)](_0x127e09);}}),B(this[_0x1d9ebb(0xed)],_0x293812);}));}[_0x430339(0xf6)](){const _0x324099=_0x430339;this['disposeWithMe'](this[_0x324099(0xe4)][_0x324099(0xf7)][_0x324099(0xbe)](async _0x56783b=>{const _0x4287e9=_0x324099;var _0x427263,_0x5d1e04,_0x183ff2,_0x44544e;const _0x30ef30=(_0x427263=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x3f47a7=>_0x3f47a7[_0x4287e9(0x95)]===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x427263[_0x4287e9(0xe2)];if(!_0x30ef30)return;const {unitId:_0x2db6f8,subUnitId:_0x20b93c}=_0x30ef30;switch(_0x56783b[_0x4287e9(0x9a)]&&this[_0x4287e9(0xe5)][_0x4287e9(0xe8)](_0x56783b[_0x4287e9(0x9a)]),_0x56783b['type']){case v[_0x4287e9(0xab)]:break;case v['Reply']:{this[_0x4287e9(0xf3)][_0x4287e9(0x94)](_0x2db6f8,_0x20b93c,{'unitId':_0x2db6f8,'subUnitId':_0x20b93c,'ref':'','id':_0x56783b[_0x4287e9(0xec)],'dT':y(+_0x56783b[_0x4287e9(0xc5)]),'threadId':_0x56783b[_0x4287e9(0x95)],'personId':(_0x183ff2=(_0x5d1e04=_0x56783b['user'])==null?void 0x0:_0x5d1e04[_0x4287e9(0xa3)])!=null?_0x183ff2:_0x56783b[_0x4287e9(0xb2)],'text':JSON['parse'](_0x56783b[_0x4287e9(0xa1)]),'parentId':_0x30ef30['id']});break;}case v[_0x4287e9(0xcd)]:{const _0x2509b2=this['_threadCommentModel'][_0x4287e9(0xd8)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);_0x2509b2&&_0x2509b2[_0x4287e9(0xda)]&&this[_0x4287e9(0xf3)][_0x4287e9(0xf1)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);break;}case v[_0x4287e9(0xa5)]:{this[_0x4287e9(0xf3)][_0x4287e9(0xe6)](_0x2db6f8,_0x20b93c,{'commentId':_0x56783b['replyId'],'text':JSON[_0x4287e9(0xa7)](_0x56783b[_0x4287e9(0xa1)])});break;}case v[_0x4287e9(0xa0)]:{const _0x476a7f=(_0x44544e=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x84199b=>_0x84199b['threadId']===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x44544e['root'];_0x476a7f&&this[_0x4287e9(0xf3)][_0x4287e9(0x96)](_0x2db6f8,_0x20b93c,_0x476a7f['id'],_0x56783b[_0x4287e9(0xf4)]===I[_0x4287e9(0xd1)]);break;}}}));}};_=V([p(0x0,_0x284561(_0x4f2985)),p(0x1,_0x284561(_0x2cb6ce)),p(0x2,_0x284561(_0x3c7f05)),p(0x3,_0x284561(_0x42cc06))],_);const z=_0x430339(0xd9),O={};var k=Object[_0x430339(0x99)],Q=(_0x3b9948,_0x589236,_0x34104b,_0x5880a1)=>{const _0x5ab75c=_0x430339;for(var _0x35683a=_0x5880a1>0x1?void 0x0:_0x5880a1?k(_0x589236,_0x34104b):_0x589236,_0x19aa7b=_0x3b9948[_0x5ab75c(0xc8)]-0x1,_0x5d4062;_0x19aa7b>=0x0;_0x19aa7b--)(_0x5d4062=_0x3b9948[_0x19aa7b])&&(_0x35683a=_0x5d4062(_0x35683a)||_0x35683a);return _0x35683a;},b=(_0x559dcb,_0x303e8)=>(_0x3a7406,_0x15c885)=>_0x303e8(_0x3a7406,_0x15c885,_0x559dcb);function X(_0x1131f3,_0x57c5a5){const _0x19caec=_0x430339,_0x6ea603=_0x1131f3[_0x19caec(0xdc)][0x0];return{..._0x57c5a5,'id':_0x6ea603[_0x19caec(0xec)],'resolved':_0x1131f3[_0x19caec(0xf4)]===0x1,'dT':y(_0x6ea603[_0x19caec(0xc5)]),'personId':_0x6ea603[_0x19caec(0xb2)],'threadId':_0x6ea603[_0x19caec(0x95)]};}function ee(_0xbdc744,_0x4841c7,_0x206a33){const _0x5c77de=_0x430339;var _0x344a18,_0x5d55bd;if(((_0x5d55bd=(_0x344a18=_0xbdc744==null?void 0x0:_0xbdc744['replies'])==null?void 0x0:_0x344a18['length'])!=null?_0x5d55bd:0x0)>0x0){const _0x46bd93=(_0x1832d5,_0x2bb14d)=>({'id':_0x1832d5['replyId'],'threadId':_0x1832d5[_0x5c77de(0x95)],'dT':y(_0x1832d5[_0x5c77de(0xc5)]),'personId':_0x1832d5[_0x5c77de(0xb2)],'resolved':_0xbdc744[_0x5c77de(0xf4)]===I['Solved'],'unitId':_0x4841c7,'subUnitId':_0x206a33,'text':JSON[_0x5c77de(0xa7)](_0x1832d5['content']),'parentId':_0x2bb14d}),_0x276909=_0x46bd93(_0xbdc744[_0x5c77de(0xdc)][0x0]);return{..._0x276909,'children':_0xbdc744['replies'][_0x5c77de(0xc0)](0x1)[_0x5c77de(0xc1)](_0x226d9c=>_0x46bd93(_0x226d9c,_0x276909['id']))};}return null;}let S=class{constructor(_0x53e238,_0x389ea5,_0x50741a){const _0x2f0ba3=_0x430339;this[_0x2f0ba3(0xaf)]=_0x53e238,this[_0x2f0ba3(0xe5)]=_0x389ea5,this['_sessionService']=_0x50741a;}async[_0x430339(0x94)](_0x39f384){const _0x5d6316=_0x430339;var _0x5d0fbb,_0x4f1852;const {parentId:_0x21ce8e,unitId:_0x5dd2ba,text:_0x420ce0,threadId:_0xb5bca0}=_0x39f384,_0x3009cb=(_0x4f1852=(_0x5d0fbb=_0x420ce0[_0x5d6316(0xe7)])==null?void 0x0:_0x5d0fbb[_0x5d6316(0xbf)](_0x1bd4af=>_0x1bd4af['rangeType']===_0x3efa19[_0x5d6316(0x92)])['map'](_0x329ec3=>_0x329ec3[_0x5d6316(0xe0)]))!=null?_0x4f1852:[],_0x1018cc=JSON[_0x5d6316(0xf2)](_0x420ce0),_0x198825=(await this[_0x5d6316(0x9f)]['requireSession'](_0x5dd2ba))[_0x5d6316(0xca)]();if(_0x21ce8e){const _0x393cb9={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb,'threadId':_0xb5bca0},_0x53c2b5=(await this[_0x5d6316(0xaf)][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/reply',{'body':_0x393cb9}))[_0x5d6316(0xa8)][_0x5d6316(0xce)];return{..._0x39f384,'id':_0x53c2b5[_0x5d6316(0xec)],'dT':_0x482a8a(+_0x53c2b5[_0x5d6316(0xc5)])[_0x5d6316(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x53c2b5[_0x5d6316(0xb2)]};}else{const _0x56a001={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb},_0x54ae32=await this['_httpService'][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/add',{'body':_0x56a001});return X(_0x54ae32[_0x5d6316(0xa8)][_0x5d6316(0xef)],_0x39f384);}}async[_0x430339(0xe6)](_0x4e8f44){const _0x2982ee=_0x430339;var _0x251172,_0xb2003a;const {text:_0x14d4db,unitId:_0x42b645}=_0x4e8f44,_0x2ee766=(_0xb2003a=(_0x251172=_0x14d4db[_0x2982ee(0xe7)])==null?void 0x0:_0x251172[_0x2982ee(0xbf)](_0x59e8e9=>_0x59e8e9[_0x2982ee(0xad)]===_0x3efa19[_0x2982ee(0x92)])[_0x2982ee(0xc1)](_0x3307f4=>_0x3307f4['rangeId']))!=null?_0xb2003a:[],_0x4020db=JSON[_0x2982ee(0xf2)](_0x14d4db),_0x3fbd33=_0x4e8f44[_0x2982ee(0x95)],_0x153e28=_0x4e8f44['id'],_0x1bc436={'memberId':(await this[_0x2982ee(0x9f)][_0x2982ee(0xc7)](_0x42b645))[_0x2982ee(0xca)](),'unitId':_0x42b645,'threadId':_0x3fbd33,'mention':_0x2ee766,'content':_0x4020db,'replyId':_0x153e28},_0x57b5ee=await this[_0x2982ee(0xaf)][_0x2982ee(0xc4)](_0x2982ee(0xeb)+_0x42b645+_0x2982ee(0xea),{'body':_0x1bc436});return!_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)]||_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)][_0x2982ee(0x98)]===0x1;}async[_0x430339(0x96)](_0x30bf2e){const _0x4cfac9=_0x430339,{unitId:_0x1982fa}=_0x30bf2e,_0x29b696=_0x30bf2e[_0x4cfac9(0x95)],_0x3ff65e={'memberId':this[_0x4cfac9(0xe5)]['getCurrentUser']()[_0x4cfac9(0xa3)],'unitId':_0x1982fa,'threadId':_0x29b696,'solved':_0x30bf2e[_0x4cfac9(0xd6)]?I['Solved']:I[_0x4cfac9(0xb0)]},_0x24b0ef=await this['_httpService'][_0x4cfac9(0xc4)](_0x4cfac9(0xeb)+_0x1982fa+_0x4cfac9(0xb3),{'body':_0x3ff65e});return!_0x24b0ef['body'][_0x4cfac9(0xb6)]||_0x24b0ef[_0x4cfac9(0xa8)][_0x4cfac9(0xb6)]['code']===0x1;}async['deleteComment'](_0x1dacb6,_0x1ed653,_0x4b3bae,_0x4ee5e6){const _0x306483=_0x430339,_0x195549={'memberId':(await this['_sessionService'][_0x306483(0xc7)](_0x1dacb6))[_0x306483(0xca)](),'threadId':_0x4b3bae,'replyId':_0x4ee5e6,'unitId':_0x1dacb6},_0x174573=await this[_0x306483(0xaf)][_0x306483(0xc4)](_0x306483(0xeb)+_0x1dacb6+_0x306483(0x9c),{'body':_0x195549});return!_0x174573['body'][_0x306483(0xb6)]||_0x174573[_0x306483(0xa8)]['error'][_0x306483(0x98)]===0x1;}async['listComments'](_0x2ec94c,_0x322a0a,_0x11a264){const _0x2190db=_0x430339,_0x4ae08f={'unitId':_0x2ec94c,'threadId':_0x11a264},_0x13193b=await this[_0x2190db(0xaf)]['post'](_0x2190db(0xeb)+_0x2ec94c+_0x2190db(0x9b),{'body':_0x4ae08f}),_0x5b586e=_0x11a264[_0x2190db(0xc1)](_0x3f4bf9=>ee(_0x13193b[_0x2190db(0xa8)][_0x2190db(0xdd)][_0x3f4bf9],_0x2ec94c,_0x322a0a))['filter'](Boolean);return Object[_0x2190db(0xd0)](_0x13193b[_0x2190db(0xa8)][_0x2190db(0xac)])[_0x2190db(0xcc)](_0x5396cc=>{const _0x291ff1=_0x2190db;this[_0x291ff1(0xe5)]['addUser'](_0x5396cc);}),_0x5b586e;}['saveCommentToSnapshot'](_0x41a4f8){const _0x21b598=_0x430339;return{'id':_0x41a4f8['id'],'threadId':_0x41a4f8[_0x21b598(0x95)],'ref':_0x41a4f8['ref']};}};S=Q([b(0x0,_0x284561(_0x2e9b77)),b(0x1,_0x284561(_0x3c7f05)),b(0x2,_0x284561(_0x11cde2))],S);var re=Object[_0x430339(0x99)],te=(_0x4622ca,_0x56c3f,_0x5a89e3,_0x499b51)=>{const _0x50d62e=_0x430339;for(var _0x40d10a=_0x499b51>0x1?void 0x0:_0x499b51?re(_0x56c3f,_0x5a89e3):_0x56c3f,_0xedc17d=_0x4622ca[_0x50d62e(0xc8)]-0x1,_0x483f84;_0xedc17d>=0x0;_0xedc17d--)(_0x483f84=_0x4622ca[_0xedc17d])&&(_0x40d10a=_0x483f84(_0x40d10a)||_0x40d10a);return _0x40d10a;},M=(_0x259df9,_0x411da4)=>(_0x38fa9c,_0x2a8a20)=>_0x411da4(_0x38fa9c,_0x2a8a20,_0x259df9);function _0x29df(_0x219580,_0xd2b0af){_0x219580=_0x219580-0x92;const _0x342d5b=_0x342d();let _0x29df42=_0x342d5b[_0x219580];return _0x29df42;}let f=class extends _0x50a3fb{constructor(_0x375f80,_0x52e351){super(),this['_threadCommentDataSourceService']=_0x375f80,this['_threadCommentDataSource']=_0x52e351,this['_initDataSource']();}[_0x430339(0xaa)](){const _0x5f1526=_0x430339;this[_0x5f1526(0xdb)][_0x5f1526(0x93)]=this[_0x5f1526(0x97)],this[_0x5f1526(0xdb)][_0x5f1526(0xd7)]=!0x1;}};f=te([M(0x0,_0x401660),M(0x1,_0x284561(S))],f);var se=Object[_0x430339(0xb4)],oe=Object[_0x430339(0x99)],ne=(_0x3f9c87,_0xd76f44,_0x55489c)=>_0xd76f44 in _0x3f9c87?se(_0x3f9c87,_0xd76f44,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55489c}):_0x3f9c87[_0xd76f44]=_0x55489c,ie=(_0x259a7b,_0x574d57,_0x2f6f5e,_0x5e2998)=>{const _0x268a03=_0x430339;for(var _0x2978da=_0x5e2998>0x1?void 0x0:_0x5e2998?oe(_0x574d57,_0x2f6f5e):_0x574d57,_0x4a192f=_0x259a7b[_0x268a03(0xc8)]-0x1,_0x3c8c45;_0x4a192f>=0x0;_0x4a192f--)(_0x3c8c45=_0x259a7b[_0x4a192f])&&(_0x2978da=_0x3c8c45(_0x2978da)||_0x2978da);return _0x2978da;},N=(_0x50db3c,_0x396c30)=>(_0x44cd32,_0x4be6f5)=>_0x396c30(_0x44cd32,_0x4be6f5,_0x50db3c),$=(_0x2a8fa2,_0x8f8dc2,_0x4464d5)=>ne(_0x2a8fa2,typeof _0x8f8dc2!='symbol'?_0x8f8dc2+'':_0x8f8dc2,_0x4464d5);let g=class extends _0x28c80c{constructor(_0x1a3b81=O,_0x505733,_0x2bd0aa){const _0x2a44c2=_0x430339;super(),this[_0x2a44c2(0xf5)]=_0x1a3b81,this['_injector']=_0x505733,this[_0x2a44c2(0xb7)]=_0x2bd0aa;const {..._0x4bee3d}=_0x362468({},O,this[_0x2a44c2(0xf5)]);this[_0x2a44c2(0xb7)][_0x2a44c2(0xbb)](z,_0x4bee3d);}[_0x430339(0xd5)](){[[S],[f],[_]]['forEach'](_0x15b678=>{const _0x54e939=_0x29df;this[_0x54e939(0xed)][_0x54e939(0xb5)](_0x15b678);});}[_0x430339(0xc6)](){const _0xc06215=_0x430339;this['_injector'][_0xc06215(0xc3)](f),this[_0xc06215(0xed)]['get'](_);}};$(g,_0x430339(0xe1),W),$(g,_0x430339(0xd3),_0x4be0da[_0x430339(0xde)]),g=ie([_0x4af44e(_0x116fe9,_0x2663f6,_0x13710b),N(0x1,_0x284561(_0x42cc06)),N(0x2,_0x4dbdea)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x48fe2c=_0x331d;(function(_0x304275,_0x2e0c6c){const _0x53dd1b=_0x331d,_0x17d870=_0x304275();while(!![]){try{const _0x68ad7f=-parseInt(_0x53dd1b(0xba))/0x1+parseInt(_0x53dd1b(0x101))/0x2*(-parseInt(_0x53dd1b(0xa1))/0x3)+parseInt(_0x53dd1b(0xa5))/0x4*(parseInt(_0x53dd1b(0xcc))/0x5)+parseInt(_0x53dd1b(0xb7))/0x6*(parseInt(_0x53dd1b(0xfb))/0x7)+-parseInt(_0x53dd1b(0xf2))/0x8*(-parseInt(_0x53dd1b(0xe3))/0x9)+parseInt(_0x53dd1b(0xaa))/0xa+-parseInt(_0x53dd1b(0xac))/0xb;if(_0x68ad7f===_0x2e0c6c)break;else _0x17d870['push'](_0x17d870['shift']());}catch(_0x556b70){_0x17d870['push'](_0x17d870['shift']());}}}(_0x2786,0xc35c6));import{CommentService as _0x5c121d,CollaborationSessionService as _0x147544,UniverCollaborationClientPlugin as _0x167480}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x25820f}from'@univerjs-pro/license';import{dayjs as _0x5195b2,UserManagerService as _0x53574f,Inject as _0x428f3a,Injector as _0x29b08d,Disposable as _0xe221d9,CustomRangeType as _0x3c6003,UniverInstanceType as _0x4bc7a1,DependentOn as _0xdc118a,Plugin as _0x4b70ca,merge as _0x157acd,IConfigService as _0x5e1548}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5995f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5b2ea3,IThreadCommentDataSourceService as _0x38d035}from'@univerjs/thread-comment';import{bufferTime as _0x2af66c}from'rxjs';import{HTTPService as _0xa6dc27}from'@univerjs/network';const W=_0x48fe2c(0xed);var I=(_0x266a30=>(_0x266a30[_0x266a30[_0x48fe2c(0xa0)]=0x0]=_0x48fe2c(0xa0),_0x266a30[_0x266a30['Solved']=0x1]=_0x48fe2c(0x100),_0x266a30[_0x266a30[_0x48fe2c(0xa7)]=-0x1]=_0x48fe2c(0xa7),_0x266a30))(I||{}),v=(_0x3e4355=>(_0x3e4355[_0x3e4355[_0x48fe2c(0xc2)]=0x0]=_0x48fe2c(0xc2),_0x3e4355[_0x3e4355['Add']=0x1]='Add',_0x3e4355[_0x3e4355[_0x48fe2c(0xb8)]=0x2]=_0x48fe2c(0xb8),_0x3e4355[_0x3e4355['Edit']=0x3]='Edit',_0x3e4355[_0x3e4355['Delete']=0x4]=_0x48fe2c(0xb0),_0x3e4355[_0x3e4355[_0x48fe2c(0xec)]=0x5]=_0x48fe2c(0xec),_0x3e4355[_0x3e4355['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e4355))(v||{});const y=_0x4bc5e4=>_0x5195b2(new Date(+_0x4bc5e4))[_0x48fe2c(0xaf)](_0x48fe2c(0xb4)),B=async(_0x6dc9c8,_0x4964da)=>{const _0x1ba25a=_0x48fe2c,_0x10248a=_0x6dc9c8[_0x1ba25a(0xf0)](_0x53574f),_0x2bcd00=_0x6dc9c8['get'](_0xa6dc27);_0x4964da[_0x1ba25a(0xd1)](_0x240e29=>{const _0x24df96=_0x1ba25a;_0x10248a['getUser'](_0x240e29)&&_0x4964da[_0x24df96(0xe9)](_0x240e29);}),_0x4964da[_0x1ba25a(0xf1)]&&(await _0x2bcd00[_0x1ba25a(0xf0)](_0x1ba25a(0x102),{'params':{'userIDs':[..._0x4964da]}}))['body']['users'][_0x1ba25a(0xd1)](_0x526ae9=>{const _0x56833f=_0x1ba25a;_0x526ae9&&_0x10248a[_0x56833f(0xa2)](_0x526ae9);});};var K=Object[_0x48fe2c(0xa3)],V=(_0x357eef,_0x191289,_0x1b48f1,_0x37ff15)=>{for(var _0x2079ae=_0x37ff15>0x1?void 0x0:_0x37ff15?K(_0x191289,_0x1b48f1):_0x191289,_0x20a4f3=_0x357eef['length']-0x1,_0x2123a2;_0x20a4f3>=0x0;_0x20a4f3--)(_0x2123a2=_0x357eef[_0x20a4f3])&&(_0x2079ae=_0x2123a2(_0x2079ae)||_0x2079ae);return _0x2079ae;},p=(_0x1b0a29,_0x2c76a2)=>(_0x2bb2d7,_0x512358)=>_0x2c76a2(_0x2bb2d7,_0x512358,_0x1b0a29);let _=class extends _0xe221d9{constructor(_0x4ff4cb,_0x2f045e,_0x4e9578,_0x4e2071){const _0x1ea932=_0x48fe2c;super(),this[_0x1ea932(0xe2)]=_0x4ff4cb,this[_0x1ea932(0xbe)]=_0x2f045e,this[_0x1ea932(0xe4)]=_0x4e9578,this[_0x1ea932(0xdc)]=_0x4e2071,this[_0x1ea932(0xc8)](),this[_0x1ea932(0xc1)]();}[_0x48fe2c(0xc1)](){const _0x6ff1b0=_0x48fe2c;this[_0x6ff1b0(0xbd)](this[_0x6ff1b0(0xbe)]['commentUpdate$'][_0x6ff1b0(0xbf)](_0x2af66c(0x10))[_0x6ff1b0(0xd4)](_0x52b3a6=>{const _0x28d66e=_0x6ff1b0,_0x53c34d=new Set();_0x52b3a6['forEach'](_0x451407=>{const _0x10e342=_0x331d;if(_0x451407[_0x10e342(0xb2)]==='add'){const _0x39c55c=_0x451407[_0x10e342(0xfa)][_0x10e342(0xef)];_0x53c34d[_0x10e342(0xe1)](_0x39c55c);}}),B(this[_0x28d66e(0xdc)],_0x53c34d);}));}[_0x48fe2c(0xc8)](){const _0x1d947a=_0x48fe2c;this[_0x1d947a(0xbd)](this[_0x1d947a(0xe2)][_0x1d947a(0xc6)][_0x1d947a(0xd4)](async _0x312552=>{const _0x41bf6a=_0x1d947a;var _0x5933da,_0x1bd47a,_0x2d2caf,_0x2aae63;const _0x3b9dac=(_0x5933da=this[_0x41bf6a(0xbe)][_0x41bf6a(0xc4)](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0xe9a6d1=>_0xe9a6d1['threadId']===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x5933da[_0x41bf6a(0xdf)];if(!_0x3b9dac)return;const {unitId:_0x230f03,subUnitId:_0x4242d4}=_0x3b9dac;switch(_0x312552[_0x41bf6a(0xcf)]&&this[_0x41bf6a(0xe4)][_0x41bf6a(0xa2)](_0x312552[_0x41bf6a(0xcf)]),_0x312552[_0x41bf6a(0xb2)]){case v[_0x41bf6a(0xfe)]:break;case v['Reply']:{this['_threadCommentModel'][_0x41bf6a(0xf9)](_0x230f03,_0x4242d4,{'unitId':_0x230f03,'subUnitId':_0x4242d4,'ref':'','id':_0x312552[_0x41bf6a(0xf3)],'dT':y(+_0x312552[_0x41bf6a(0xe6)]),'threadId':_0x312552[_0x41bf6a(0xab)],'personId':(_0x2d2caf=(_0x1bd47a=_0x312552[_0x41bf6a(0xcf)])==null?void 0x0:_0x1bd47a[_0x41bf6a(0xea)])!=null?_0x2d2caf:_0x312552[_0x41bf6a(0xf4)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content']),'parentId':_0x3b9dac['id']});break;}case v[_0x41bf6a(0xb0)]:{const _0x1a0244=this[_0x41bf6a(0xbe)]['getComment'](_0x230f03,_0x4242d4,_0x312552[_0x41bf6a(0xf3)]);_0x1a0244&&_0x1a0244[_0x41bf6a(0xdb)]&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xca)](_0x230f03,_0x4242d4,_0x312552['replyId']);break;}case v[_0x41bf6a(0xd5)]:{this[_0x41bf6a(0xbe)]['updateComment'](_0x230f03,_0x4242d4,{'commentId':_0x312552[_0x41bf6a(0xf3)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content'])});break;}case v[_0x41bf6a(0xec)]:{const _0xe12e5d=(_0x2aae63=this[_0x41bf6a(0xbe)]['getUnit'](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0x129802=>_0x129802[_0x41bf6a(0xab)]===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x2aae63[_0x41bf6a(0xdf)];_0xe12e5d&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xda)](_0x230f03,_0x4242d4,_0xe12e5d['id'],_0x312552[_0x41bf6a(0xce)]===I[_0x41bf6a(0x100)]);break;}}}));}};_=V([p(0x0,_0x428f3a(_0x5c121d)),p(0x1,_0x428f3a(_0x5b2ea3)),p(0x2,_0x428f3a(_0x53574f)),p(0x3,_0x428f3a(_0x29b08d))],_);const z=_0x48fe2c(0xad),O={};function _0x331d(_0x4bc6b2,_0x45cb30){_0x4bc6b2=_0x4bc6b2-0x9d;const _0x2786b4=_0x2786();let _0x331dbf=_0x2786b4[_0x4bc6b2];return _0x331dbf;}var k=Object['getOwnPropertyDescriptor'],Q=(_0x139968,_0x470422,_0x3837ec,_0x826566)=>{const _0x1f42fd=_0x48fe2c;for(var _0x1c044d=_0x826566>0x1?void 0x0:_0x826566?k(_0x470422,_0x3837ec):_0x470422,_0x21f1e1=_0x139968[_0x1f42fd(0xcb)]-0x1,_0x191a22;_0x21f1e1>=0x0;_0x21f1e1--)(_0x191a22=_0x139968[_0x21f1e1])&&(_0x1c044d=_0x191a22(_0x1c044d)||_0x1c044d);return _0x1c044d;},b=(_0x36adec,_0x3903b4)=>(_0xeef47a,_0x2d48a8)=>_0x3903b4(_0xeef47a,_0x2d48a8,_0x36adec);function X(_0x30d231,_0x668fa0){const _0x3e41c4=_0x48fe2c,_0x419118=_0x30d231['replies'][0x0];return{..._0x668fa0,'id':_0x419118[_0x3e41c4(0xf3)],'resolved':_0x30d231[_0x3e41c4(0xce)]===0x1,'dT':y(_0x419118[_0x3e41c4(0xe6)]),'personId':_0x419118[_0x3e41c4(0xf4)],'threadId':_0x419118['threadId']};}function ee(_0x59ea32,_0xdda6b5,_0x10ccf5){const _0xc8bb0c=_0x48fe2c;var _0x4c05ec,_0xfb3f9c;if(((_0xfb3f9c=(_0x4c05ec=_0x59ea32==null?void 0x0:_0x59ea32['replies'])==null?void 0x0:_0x4c05ec[_0xc8bb0c(0xcb)])!=null?_0xfb3f9c:0x0)>0x0){const _0x41e3f1=(_0x7d6f27,_0x56684d)=>({'id':_0x7d6f27[_0xc8bb0c(0xf3)],'threadId':_0x7d6f27[_0xc8bb0c(0xab)],'dT':y(_0x7d6f27['createTimestamp']),'personId':_0x7d6f27[_0xc8bb0c(0xf4)],'resolved':_0x59ea32['solved']===I['Solved'],'unitId':_0xdda6b5,'subUnitId':_0x10ccf5,'text':JSON[_0xc8bb0c(0xe8)](_0x7d6f27[_0xc8bb0c(0xee)]),'parentId':_0x56684d}),_0x1c71f2=_0x41e3f1(_0x59ea32['replies'][0x0]);return{..._0x1c71f2,'children':_0x59ea32[_0xc8bb0c(0xd2)][_0xc8bb0c(0xb5)](0x1)['map'](_0x546bfa=>_0x41e3f1(_0x546bfa,_0x1c71f2['id']))};}return null;}let S=class{constructor(_0x317e21,_0x511b5e,_0x332787){const _0x2b3bef=_0x48fe2c;this[_0x2b3bef(0xd6)]=_0x317e21,this[_0x2b3bef(0xe4)]=_0x511b5e,this['_sessionService']=_0x332787;}async[_0x48fe2c(0xf9)](_0x1205f3){const _0x3ba5bb=_0x48fe2c;var _0x45718e,_0x1a0f78;const {parentId:_0x54a481,unitId:_0xa5eb06,text:_0x37c887,threadId:_0x2cc036}=_0x1205f3,_0x1b78ee=(_0x1a0f78=(_0x45718e=_0x37c887['customRanges'])==null?void 0x0:_0x45718e['filter'](_0x3dc5a3=>_0x3dc5a3['rangeType']===_0x3c6003[_0x3ba5bb(0xd8)])[_0x3ba5bb(0xd9)](_0x43c6c3=>_0x43c6c3[_0x3ba5bb(0xbb)]))!=null?_0x1a0f78:[],_0x585d95=JSON[_0x3ba5bb(0xfc)](_0x37c887),_0x4c38ac=(await this[_0x3ba5bb(0xff)][_0x3ba5bb(0xb6)](_0xa5eb06))[_0x3ba5bb(0xb3)]();if(_0x54a481){const _0x1fc30c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee,'threadId':_0x2cc036},_0xfd1c58=(await this[_0x3ba5bb(0xd6)][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+_0x3ba5bb(0xa8),{'body':_0x1fc30c}))[_0x3ba5bb(0xd0)][_0x3ba5bb(0xe0)];return{..._0x1205f3,'id':_0xfd1c58[_0x3ba5bb(0xf3)],'dT':_0x5195b2(+_0xfd1c58['createTimestamp'])[_0x3ba5bb(0xaf)](_0x3ba5bb(0xb4)),'personId':_0xfd1c58[_0x3ba5bb(0xf4)]};}else{const _0x395e9c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee},_0x5efc40=await this['_httpService'][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+'/add',{'body':_0x395e9c});return X(_0x5efc40[_0x3ba5bb(0xd0)]['comment'],_0x1205f3);}}async[_0x48fe2c(0xc5)](_0x546ec2){const _0x351375=_0x48fe2c;var _0x4f56fa,_0x5dfb48;const {text:_0x406710,unitId:_0x54c53f}=_0x546ec2,_0x274f9e=(_0x5dfb48=(_0x4f56fa=_0x406710['customRanges'])==null?void 0x0:_0x4f56fa[_0x351375(0xa6)](_0x5a5dac=>_0x5a5dac[_0x351375(0xeb)]===_0x3c6003[_0x351375(0xd8)])[_0x351375(0xd9)](_0x3ad921=>_0x3ad921[_0x351375(0xbb)]))!=null?_0x5dfb48:[],_0x402063=JSON['stringify'](_0x406710),_0x780143=_0x546ec2['threadId'],_0x23f0bb=_0x546ec2['id'],_0x3daf9f={'memberId':(await this['_sessionService'][_0x351375(0xb6)](_0x54c53f))[_0x351375(0xb3)](),'unitId':_0x54c53f,'threadId':_0x780143,'mention':_0x274f9e,'content':_0x402063,'replyId':_0x23f0bb},_0x461783=await this['_httpService'][_0x351375(0xc3)](_0x351375(0xd7)+_0x54c53f+'/edit',{'body':_0x3daf9f});return!_0x461783['body'][_0x351375(0xdd)]||_0x461783[_0x351375(0xd0)]['error'][_0x351375(0xb9)]===0x1;}async[_0x48fe2c(0xda)](_0x5980c1){const _0x46ba6d=_0x48fe2c,{unitId:_0x34d77b}=_0x5980c1,_0x161b40=_0x5980c1[_0x46ba6d(0xab)],_0x4cb8e5={'memberId':this[_0x46ba6d(0xe4)][_0x46ba6d(0xa4)]()[_0x46ba6d(0xea)],'unitId':_0x34d77b,'threadId':_0x161b40,'solved':_0x5980c1[_0x46ba6d(0xf8)]?I[_0x46ba6d(0x100)]:I['OpenOrReOpen']},_0x1e49cd=await this[_0x46ba6d(0xd6)][_0x46ba6d(0xc3)](_0x46ba6d(0xd7)+_0x34d77b+_0x46ba6d(0xc0),{'body':_0x4cb8e5});return!_0x1e49cd['body'][_0x46ba6d(0xdd)]||_0x1e49cd['body']['error'][_0x46ba6d(0xb9)]===0x1;}async[_0x48fe2c(0xca)](_0x1697cd,_0x54b36e,_0x5f3543,_0x2a2357){const _0x452c67=_0x48fe2c,_0x5d3ca7={'memberId':(await this[_0x452c67(0xff)][_0x452c67(0xb6)](_0x1697cd))['getMemberID'](),'threadId':_0x5f3543,'replyId':_0x2a2357,'unitId':_0x1697cd},_0x39c861=await this[_0x452c67(0xd6)][_0x452c67(0xc3)](_0x452c67(0xd7)+_0x1697cd+_0x452c67(0xa9),{'body':_0x5d3ca7});return!_0x39c861['body'][_0x452c67(0xdd)]||_0x39c861[_0x452c67(0xd0)]['error'][_0x452c67(0xb9)]===0x1;}async[_0x48fe2c(0xc7)](_0x2d80f1,_0x2e281b,_0xf29e7b){const _0x1785ef=_0x48fe2c,_0x3216ea={'unitId':_0x2d80f1,'threadId':_0xf29e7b},_0x5a7728=await this['_httpService']['post'](_0x1785ef(0xd7)+_0x2d80f1+'/list',{'body':_0x3216ea}),_0x331e03=_0xf29e7b['map'](_0x378d28=>ee(_0x5a7728[_0x1785ef(0xd0)]['comments'][_0x378d28],_0x2d80f1,_0x2e281b))[_0x1785ef(0xa6)](Boolean);return Object[_0x1785ef(0xde)](_0x5a7728[_0x1785ef(0xd0)][_0x1785ef(0xc9)])[_0x1785ef(0xd1)](_0x1ace91=>{const _0x5f48e4=_0x1785ef;this[_0x5f48e4(0xe4)][_0x5f48e4(0xa2)](_0x1ace91);}),_0x331e03;}['saveCommentToSnapshot'](_0x4cc305){const _0x5874fb=_0x48fe2c;return{'id':_0x4cc305['id'],'threadId':_0x4cc305[_0x5874fb(0xab)],'ref':_0x4cc305['ref']};}};S=Q([b(0x0,_0x428f3a(_0xa6dc27)),b(0x1,_0x428f3a(_0x53574f)),b(0x2,_0x428f3a(_0x147544))],S);function _0x2786(){const _0x45299d=['onReady','createTimestamp','syncUpdateMutationToColla','parse','delete','userID','rangeType','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','personId','get','size','70496CknnQN','replyId','userId','dataSource','pluginName','defineProperty','resolved','addComment','payload','282856xaBObW','stringify','_threadCommentDataSourceService','Add','_sessionService','Solved','2036bIFbsR','/universer-api/user/list','onStarting','UNIVER_UNKNOWN','find','OpenOrReOpen','933lYrrhG','addUser','getOwnPropertyDescriptor','getCurrentUser','2280OpjCZd','filter','UNRECOGNIZED','/reply','/delete','13850950wheMvX','threadId','3712808tbxHvx','thread-comment-data-source.config','_initDataSource','format','Delete','unitId','type','getMemberID','YYYY/MM/DD\x20HH:mm','slice','requireSession','6PXJwxv','Reply','code','1595405LKxwKH','rangeId','_configService','disposeWithMe','_threadCommentModel','pipe','/solved','_initUserSync','Unknown','post','getUnit','updateComment','commentUpdate$','listComments','_init','users','deleteComment','length','875SFjHxl','symbol','solved','user','body','forEach','replies','_config','subscribe','Edit','_httpService','/universer-api/comment/unit/','COMMENT','map','resolveComment','parentId','_injector','error','values','root','reply','add','_commentService','1557DOQOZp','_userService'];_0x2786=function(){return _0x45299d;};return _0x2786();}var re=Object['getOwnPropertyDescriptor'],te=(_0x11e342,_0x147bec,_0x3835ce,_0x4553a7)=>{const _0x3fc310=_0x48fe2c;for(var _0x5612a5=_0x4553a7>0x1?void 0x0:_0x4553a7?re(_0x147bec,_0x3835ce):_0x147bec,_0x4f0f61=_0x11e342[_0x3fc310(0xcb)]-0x1,_0x2b2bf6;_0x4f0f61>=0x0;_0x4f0f61--)(_0x2b2bf6=_0x11e342[_0x4f0f61])&&(_0x5612a5=_0x2b2bf6(_0x5612a5)||_0x5612a5);return _0x5612a5;},M=(_0x4b8006,_0x39bdd9)=>(_0x352980,_0x4c7fac)=>_0x39bdd9(_0x352980,_0x4c7fac,_0x4b8006);let f=class extends _0xe221d9{constructor(_0x1af98d,_0x3ebeef){const _0x3a67f2=_0x48fe2c;super(),this[_0x3a67f2(0xfd)]=_0x1af98d,this['_threadCommentDataSource']=_0x3ebeef,this[_0x3a67f2(0xae)]();}['_initDataSource'](){const _0xa271fa=_0x48fe2c;this['_threadCommentDataSourceService'][_0xa271fa(0xf5)]=this['_threadCommentDataSource'],this[_0xa271fa(0xfd)][_0xa271fa(0xe7)]=!0x1;}};f=te([M(0x0,_0x38d035),M(0x1,_0x428f3a(S))],f);var se=Object[_0x48fe2c(0xf7)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1bedea,_0x573693,_0x2a7bc3)=>_0x573693 in _0x1bedea?se(_0x1bedea,_0x573693,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a7bc3}):_0x1bedea[_0x573693]=_0x2a7bc3,ie=(_0x463889,_0x1fa58d,_0x3a106a,_0x1da43e)=>{const _0x43c352=_0x48fe2c;for(var _0x4c8874=_0x1da43e>0x1?void 0x0:_0x1da43e?oe(_0x1fa58d,_0x3a106a):_0x1fa58d,_0x4de60a=_0x463889[_0x43c352(0xcb)]-0x1,_0x8b2b3a;_0x4de60a>=0x0;_0x4de60a--)(_0x8b2b3a=_0x463889[_0x4de60a])&&(_0x4c8874=_0x8b2b3a(_0x4c8874)||_0x4c8874);return _0x4c8874;},N=(_0xa95b56,_0x51f282)=>(_0x9be76c,_0x783e9b)=>_0x51f282(_0x9be76c,_0x783e9b,_0xa95b56),$=(_0x557a2e,_0x398208,_0xf836ae)=>ne(_0x557a2e,typeof _0x398208!=_0x48fe2c(0xcd)?_0x398208+'':_0x398208,_0xf836ae);let g=class extends _0x4b70ca{constructor(_0x54c2f7=O,_0x532645,_0x1e9e98){const _0x30e2cd=_0x48fe2c;super(),this['_config']=_0x54c2f7,this[_0x30e2cd(0xdc)]=_0x532645,this[_0x30e2cd(0xbc)]=_0x1e9e98;const {..._0x2274bf}=_0x157acd({},O,this[_0x30e2cd(0xd3)]);this[_0x30e2cd(0xbc)]['setConfig'](z,_0x2274bf);}[_0x48fe2c(0x9d)](){const _0x179386=_0x48fe2c;[[S],[f],[_]][_0x179386(0xd1)](_0x3344d6=>{const _0x2e55d4=_0x179386;this[_0x2e55d4(0xdc)][_0x2e55d4(0xe1)](_0x3344d6);});}[_0x48fe2c(0xe5)](){const _0x39a128=_0x48fe2c;this[_0x39a128(0xdc)]['get'](f),this[_0x39a128(0xdc)][_0x39a128(0xf0)](_);}};$(g,_0x48fe2c(0xf6),W),$(g,_0x48fe2c(0xb2),_0x4bc7a1[_0x48fe2c(0x9e)]),g=ie([_0xdc118a(_0x5995f1,_0x167480,_0x25820f),N(0x1,_0x428f3a(_0x29b08d)),N(0x2,_0x5e1548)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x430339=_0x29df;(function(_0x5cbf55,_0x48d232){const _0x52f4c4=_0x29df,_0x1afc3c=_0x5cbf55();while(!![]){try{const _0x263434=parseInt(_0x52f4c4(0xa2))/0x1*(parseInt(_0x52f4c4(0xb8))/0x2)+parseInt(_0x52f4c4(0xc2))/0x3*(-parseInt(_0x52f4c4(0xb1))/0x4)+parseInt(_0x52f4c4(0xcb))/0x5+-parseInt(_0x52f4c4(0xf8))/0x6*(-parseInt(_0x52f4c4(0x9e))/0x7)+parseInt(_0x52f4c4(0xbd))/0x8*(-parseInt(_0x52f4c4(0xf9))/0x9)+parseInt(_0x52f4c4(0xba))/0xa+parseInt(_0x52f4c4(0xcf))/0xb*(parseInt(_0x52f4c4(0xb9))/0xc);if(_0x263434===_0x48d232)break;else _0x1afc3c['push'](_0x1afc3c['shift']());}catch(_0x134c22){_0x1afc3c['push'](_0x1afc3c['shift']());}}}(_0x342d,0x20482));import{CommentService as _0x4f2985,CollaborationSessionService as _0x11cde2,UniverCollaborationClientPlugin as _0x2663f6}from'@univerjs-pro/collaboration-client';function _0x342d(){const _0x167208=['replyId','_injector','delete','comment','format','deleteComment','stringify','_threadCommentModel','solved','_config','_init','commentUpdate$','12oMbOVA','603fwZcnw','COMMENT','dataSource','addComment','threadId','resolveComment','_threadCommentDataSource','code','getOwnPropertyDescriptor','user','/list','/delete','Reply','285628gxOFnl','_sessionService','Solve','content','97bNoncc','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','getUser','parse','body','payload','_initDataSource','Add','users','rangeType','_initUserSync','_httpService','OpenOrReOpen','242188zgyTEA','userId','/solved','defineProperty','add','error','_configService','402iKuuBE','279132ioqqVI','1903000qCrZYu','setConfig','getUnit','18040FYrbio','subscribe','filter','slice','map','3tIqdfH','get','post','createTimestamp','onReady','requireSession','length','find','getMemberID','29655XkNkSp','forEach','Delete','reply','22ZAewfg','values','Solved','UNRECOGNIZED','type','/universer-api/user/list','onStarting','resolved','syncUpdateMutationToColla','getComment','thread-comment-data-source.config','parentId','_threadCommentDataSourceService','replies','comments','UNIVER_UNKNOWN','unitId','rangeId','pluginName','root','pipe','_commentService','_userService','updateComment','customRanges','addUser','Unknown','/edit','/universer-api/comment/unit/'];_0x342d=function(){return _0x167208;};return _0x342d();}import{UniverLicensePlugin as _0x13710b}from'@univerjs-pro/license';import{dayjs as _0x482a8a,UserManagerService as _0x3c7f05,Inject as _0x284561,Injector as _0x42cc06,Disposable as _0x50a3fb,CustomRangeType as _0x3efa19,UniverInstanceType as _0x4be0da,DependentOn as _0x4af44e,Plugin as _0x28c80c,merge as _0x362468,IConfigService as _0x4dbdea}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x116fe9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cb6ce,IThreadCommentDataSourceService as _0x401660}from'@univerjs/thread-comment';import{bufferTime as _0x5ab57d}from'rxjs';import{HTTPService as _0x2e9b77}from'@univerjs/network';const W=_0x430339(0xa4);var I=(_0x1dbd1d=>(_0x1dbd1d[_0x1dbd1d[_0x430339(0xb0)]=0x0]=_0x430339(0xb0),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd1)]=0x1]=_0x430339(0xd1),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x1dbd1d))(I||{}),v=(_0x2d04d9=>(_0x2d04d9[_0x2d04d9[_0x430339(0xe9)]=0x0]=_0x430339(0xe9),_0x2d04d9[_0x2d04d9[_0x430339(0xab)]=0x1]=_0x430339(0xab),_0x2d04d9[_0x2d04d9[_0x430339(0x9d)]=0x2]=_0x430339(0x9d),_0x2d04d9[_0x2d04d9['Edit']=0x3]=_0x430339(0xa5),_0x2d04d9[_0x2d04d9['Delete']=0x4]=_0x430339(0xcd),_0x2d04d9[_0x2d04d9['Solve']=0x5]=_0x430339(0xa0),_0x2d04d9[_0x2d04d9[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x2d04d9))(v||{});const y=_0x359ae5=>_0x482a8a(new Date(+_0x359ae5))[_0x430339(0xf0)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x16cea7,_0x156b5b)=>{const _0x350cb7=_0x430339,_0x133d81=_0x16cea7[_0x350cb7(0xc3)](_0x3c7f05),_0x40f182=_0x16cea7['get'](_0x2e9b77);_0x156b5b['forEach'](_0x16881c=>{const _0x3aed0f=_0x350cb7;_0x133d81[_0x3aed0f(0xa6)](_0x16881c)&&_0x156b5b[_0x3aed0f(0xee)](_0x16881c);}),_0x156b5b['size']&&(await _0x40f182[_0x350cb7(0xc3)](_0x350cb7(0xd4),{'params':{'userIDs':[..._0x156b5b]}}))[_0x350cb7(0xa8)][_0x350cb7(0xac)][_0x350cb7(0xcc)](_0x69280d=>{const _0x41f293=_0x350cb7;_0x69280d&&_0x133d81[_0x41f293(0xe8)](_0x69280d);});};var K=Object[_0x430339(0x99)],V=(_0x3402e0,_0x1857a6,_0xc3572a,_0x10c23c)=>{const _0x2f3a2d=_0x430339;for(var _0x436a7a=_0x10c23c>0x1?void 0x0:_0x10c23c?K(_0x1857a6,_0xc3572a):_0x1857a6,_0x334a2d=_0x3402e0[_0x2f3a2d(0xc8)]-0x1,_0x2b7e38;_0x334a2d>=0x0;_0x334a2d--)(_0x2b7e38=_0x3402e0[_0x334a2d])&&(_0x436a7a=_0x2b7e38(_0x436a7a)||_0x436a7a);return _0x436a7a;},p=(_0x4b1c7e,_0x100287)=>(_0x4ebeb4,_0x899d41)=>_0x100287(_0x4ebeb4,_0x899d41,_0x4b1c7e);let _=class extends _0x50a3fb{constructor(_0x208135,_0x3b69ce,_0x104d78,_0x2af8c6){const _0x3ac60e=_0x430339;super(),this['_commentService']=_0x208135,this['_threadCommentModel']=_0x3b69ce,this[_0x3ac60e(0xe5)]=_0x104d78,this['_injector']=_0x2af8c6,this['_init'](),this['_initUserSync']();}[_0x430339(0xae)](){const _0xbafe6e=_0x430339;this['disposeWithMe'](this['_threadCommentModel'][_0xbafe6e(0xf7)][_0xbafe6e(0xe3)](_0x5ab57d(0x10))[_0xbafe6e(0xbe)](_0x124065=>{const _0x1d9ebb=_0xbafe6e,_0x293812=new Set();_0x124065['forEach'](_0xb03f72=>{const _0x220e2e=_0x29df;if(_0xb03f72[_0x220e2e(0xd3)]===_0x220e2e(0xb5)){const _0x127e09=_0xb03f72[_0x220e2e(0xa9)]['personId'];_0x293812[_0x220e2e(0xb5)](_0x127e09);}}),B(this[_0x1d9ebb(0xed)],_0x293812);}));}[_0x430339(0xf6)](){const _0x324099=_0x430339;this['disposeWithMe'](this[_0x324099(0xe4)][_0x324099(0xf7)][_0x324099(0xbe)](async _0x56783b=>{const _0x4287e9=_0x324099;var _0x427263,_0x5d1e04,_0x183ff2,_0x44544e;const _0x30ef30=(_0x427263=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x3f47a7=>_0x3f47a7[_0x4287e9(0x95)]===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x427263[_0x4287e9(0xe2)];if(!_0x30ef30)return;const {unitId:_0x2db6f8,subUnitId:_0x20b93c}=_0x30ef30;switch(_0x56783b[_0x4287e9(0x9a)]&&this[_0x4287e9(0xe5)][_0x4287e9(0xe8)](_0x56783b[_0x4287e9(0x9a)]),_0x56783b['type']){case v[_0x4287e9(0xab)]:break;case v['Reply']:{this[_0x4287e9(0xf3)][_0x4287e9(0x94)](_0x2db6f8,_0x20b93c,{'unitId':_0x2db6f8,'subUnitId':_0x20b93c,'ref':'','id':_0x56783b[_0x4287e9(0xec)],'dT':y(+_0x56783b[_0x4287e9(0xc5)]),'threadId':_0x56783b[_0x4287e9(0x95)],'personId':(_0x183ff2=(_0x5d1e04=_0x56783b['user'])==null?void 0x0:_0x5d1e04[_0x4287e9(0xa3)])!=null?_0x183ff2:_0x56783b[_0x4287e9(0xb2)],'text':JSON['parse'](_0x56783b[_0x4287e9(0xa1)]),'parentId':_0x30ef30['id']});break;}case v[_0x4287e9(0xcd)]:{const _0x2509b2=this['_threadCommentModel'][_0x4287e9(0xd8)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);_0x2509b2&&_0x2509b2[_0x4287e9(0xda)]&&this[_0x4287e9(0xf3)][_0x4287e9(0xf1)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);break;}case v[_0x4287e9(0xa5)]:{this[_0x4287e9(0xf3)][_0x4287e9(0xe6)](_0x2db6f8,_0x20b93c,{'commentId':_0x56783b['replyId'],'text':JSON[_0x4287e9(0xa7)](_0x56783b[_0x4287e9(0xa1)])});break;}case v[_0x4287e9(0xa0)]:{const _0x476a7f=(_0x44544e=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x84199b=>_0x84199b['threadId']===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x44544e['root'];_0x476a7f&&this[_0x4287e9(0xf3)][_0x4287e9(0x96)](_0x2db6f8,_0x20b93c,_0x476a7f['id'],_0x56783b[_0x4287e9(0xf4)]===I[_0x4287e9(0xd1)]);break;}}}));}};_=V([p(0x0,_0x284561(_0x4f2985)),p(0x1,_0x284561(_0x2cb6ce)),p(0x2,_0x284561(_0x3c7f05)),p(0x3,_0x284561(_0x42cc06))],_);const z=_0x430339(0xd9),O={};var k=Object[_0x430339(0x99)],Q=(_0x3b9948,_0x589236,_0x34104b,_0x5880a1)=>{const _0x5ab75c=_0x430339;for(var _0x35683a=_0x5880a1>0x1?void 0x0:_0x5880a1?k(_0x589236,_0x34104b):_0x589236,_0x19aa7b=_0x3b9948[_0x5ab75c(0xc8)]-0x1,_0x5d4062;_0x19aa7b>=0x0;_0x19aa7b--)(_0x5d4062=_0x3b9948[_0x19aa7b])&&(_0x35683a=_0x5d4062(_0x35683a)||_0x35683a);return _0x35683a;},b=(_0x559dcb,_0x303e8)=>(_0x3a7406,_0x15c885)=>_0x303e8(_0x3a7406,_0x15c885,_0x559dcb);function X(_0x1131f3,_0x57c5a5){const _0x19caec=_0x430339,_0x6ea603=_0x1131f3[_0x19caec(0xdc)][0x0];return{..._0x57c5a5,'id':_0x6ea603[_0x19caec(0xec)],'resolved':_0x1131f3[_0x19caec(0xf4)]===0x1,'dT':y(_0x6ea603[_0x19caec(0xc5)]),'personId':_0x6ea603[_0x19caec(0xb2)],'threadId':_0x6ea603[_0x19caec(0x95)]};}function ee(_0xbdc744,_0x4841c7,_0x206a33){const _0x5c77de=_0x430339;var _0x344a18,_0x5d55bd;if(((_0x5d55bd=(_0x344a18=_0xbdc744==null?void 0x0:_0xbdc744['replies'])==null?void 0x0:_0x344a18['length'])!=null?_0x5d55bd:0x0)>0x0){const _0x46bd93=(_0x1832d5,_0x2bb14d)=>({'id':_0x1832d5['replyId'],'threadId':_0x1832d5[_0x5c77de(0x95)],'dT':y(_0x1832d5[_0x5c77de(0xc5)]),'personId':_0x1832d5[_0x5c77de(0xb2)],'resolved':_0xbdc744[_0x5c77de(0xf4)]===I['Solved'],'unitId':_0x4841c7,'subUnitId':_0x206a33,'text':JSON[_0x5c77de(0xa7)](_0x1832d5['content']),'parentId':_0x2bb14d}),_0x276909=_0x46bd93(_0xbdc744[_0x5c77de(0xdc)][0x0]);return{..._0x276909,'children':_0xbdc744['replies'][_0x5c77de(0xc0)](0x1)[_0x5c77de(0xc1)](_0x226d9c=>_0x46bd93(_0x226d9c,_0x276909['id']))};}return null;}let S=class{constructor(_0x53e238,_0x389ea5,_0x50741a){const _0x2f0ba3=_0x430339;this[_0x2f0ba3(0xaf)]=_0x53e238,this[_0x2f0ba3(0xe5)]=_0x389ea5,this['_sessionService']=_0x50741a;}async[_0x430339(0x94)](_0x39f384){const _0x5d6316=_0x430339;var _0x5d0fbb,_0x4f1852;const {parentId:_0x21ce8e,unitId:_0x5dd2ba,text:_0x420ce0,threadId:_0xb5bca0}=_0x39f384,_0x3009cb=(_0x4f1852=(_0x5d0fbb=_0x420ce0[_0x5d6316(0xe7)])==null?void 0x0:_0x5d0fbb[_0x5d6316(0xbf)](_0x1bd4af=>_0x1bd4af['rangeType']===_0x3efa19[_0x5d6316(0x92)])['map'](_0x329ec3=>_0x329ec3[_0x5d6316(0xe0)]))!=null?_0x4f1852:[],_0x1018cc=JSON[_0x5d6316(0xf2)](_0x420ce0),_0x198825=(await this[_0x5d6316(0x9f)]['requireSession'](_0x5dd2ba))[_0x5d6316(0xca)]();if(_0x21ce8e){const _0x393cb9={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb,'threadId':_0xb5bca0},_0x53c2b5=(await this[_0x5d6316(0xaf)][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/reply',{'body':_0x393cb9}))[_0x5d6316(0xa8)][_0x5d6316(0xce)];return{..._0x39f384,'id':_0x53c2b5[_0x5d6316(0xec)],'dT':_0x482a8a(+_0x53c2b5[_0x5d6316(0xc5)])[_0x5d6316(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x53c2b5[_0x5d6316(0xb2)]};}else{const _0x56a001={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb},_0x54ae32=await this['_httpService'][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/add',{'body':_0x56a001});return X(_0x54ae32[_0x5d6316(0xa8)][_0x5d6316(0xef)],_0x39f384);}}async[_0x430339(0xe6)](_0x4e8f44){const _0x2982ee=_0x430339;var _0x251172,_0xb2003a;const {text:_0x14d4db,unitId:_0x42b645}=_0x4e8f44,_0x2ee766=(_0xb2003a=(_0x251172=_0x14d4db[_0x2982ee(0xe7)])==null?void 0x0:_0x251172[_0x2982ee(0xbf)](_0x59e8e9=>_0x59e8e9[_0x2982ee(0xad)]===_0x3efa19[_0x2982ee(0x92)])[_0x2982ee(0xc1)](_0x3307f4=>_0x3307f4['rangeId']))!=null?_0xb2003a:[],_0x4020db=JSON[_0x2982ee(0xf2)](_0x14d4db),_0x3fbd33=_0x4e8f44[_0x2982ee(0x95)],_0x153e28=_0x4e8f44['id'],_0x1bc436={'memberId':(await this[_0x2982ee(0x9f)][_0x2982ee(0xc7)](_0x42b645))[_0x2982ee(0xca)](),'unitId':_0x42b645,'threadId':_0x3fbd33,'mention':_0x2ee766,'content':_0x4020db,'replyId':_0x153e28},_0x57b5ee=await this[_0x2982ee(0xaf)][_0x2982ee(0xc4)](_0x2982ee(0xeb)+_0x42b645+_0x2982ee(0xea),{'body':_0x1bc436});return!_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)]||_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)][_0x2982ee(0x98)]===0x1;}async[_0x430339(0x96)](_0x30bf2e){const _0x4cfac9=_0x430339,{unitId:_0x1982fa}=_0x30bf2e,_0x29b696=_0x30bf2e[_0x4cfac9(0x95)],_0x3ff65e={'memberId':this[_0x4cfac9(0xe5)]['getCurrentUser']()[_0x4cfac9(0xa3)],'unitId':_0x1982fa,'threadId':_0x29b696,'solved':_0x30bf2e[_0x4cfac9(0xd6)]?I['Solved']:I[_0x4cfac9(0xb0)]},_0x24b0ef=await this['_httpService'][_0x4cfac9(0xc4)](_0x4cfac9(0xeb)+_0x1982fa+_0x4cfac9(0xb3),{'body':_0x3ff65e});return!_0x24b0ef['body'][_0x4cfac9(0xb6)]||_0x24b0ef[_0x4cfac9(0xa8)][_0x4cfac9(0xb6)]['code']===0x1;}async['deleteComment'](_0x1dacb6,_0x1ed653,_0x4b3bae,_0x4ee5e6){const _0x306483=_0x430339,_0x195549={'memberId':(await this['_sessionService'][_0x306483(0xc7)](_0x1dacb6))[_0x306483(0xca)](),'threadId':_0x4b3bae,'replyId':_0x4ee5e6,'unitId':_0x1dacb6},_0x174573=await this[_0x306483(0xaf)][_0x306483(0xc4)](_0x306483(0xeb)+_0x1dacb6+_0x306483(0x9c),{'body':_0x195549});return!_0x174573['body'][_0x306483(0xb6)]||_0x174573[_0x306483(0xa8)]['error'][_0x306483(0x98)]===0x1;}async['listComments'](_0x2ec94c,_0x322a0a,_0x11a264){const _0x2190db=_0x430339,_0x4ae08f={'unitId':_0x2ec94c,'threadId':_0x11a264},_0x13193b=await this[_0x2190db(0xaf)]['post'](_0x2190db(0xeb)+_0x2ec94c+_0x2190db(0x9b),{'body':_0x4ae08f}),_0x5b586e=_0x11a264[_0x2190db(0xc1)](_0x3f4bf9=>ee(_0x13193b[_0x2190db(0xa8)][_0x2190db(0xdd)][_0x3f4bf9],_0x2ec94c,_0x322a0a))['filter'](Boolean);return Object[_0x2190db(0xd0)](_0x13193b[_0x2190db(0xa8)][_0x2190db(0xac)])[_0x2190db(0xcc)](_0x5396cc=>{const _0x291ff1=_0x2190db;this[_0x291ff1(0xe5)]['addUser'](_0x5396cc);}),_0x5b586e;}['saveCommentToSnapshot'](_0x41a4f8){const _0x21b598=_0x430339;return{'id':_0x41a4f8['id'],'threadId':_0x41a4f8[_0x21b598(0x95)],'ref':_0x41a4f8['ref']};}};S=Q([b(0x0,_0x284561(_0x2e9b77)),b(0x1,_0x284561(_0x3c7f05)),b(0x2,_0x284561(_0x11cde2))],S);var re=Object[_0x430339(0x99)],te=(_0x4622ca,_0x56c3f,_0x5a89e3,_0x499b51)=>{const _0x50d62e=_0x430339;for(var _0x40d10a=_0x499b51>0x1?void 0x0:_0x499b51?re(_0x56c3f,_0x5a89e3):_0x56c3f,_0xedc17d=_0x4622ca[_0x50d62e(0xc8)]-0x1,_0x483f84;_0xedc17d>=0x0;_0xedc17d--)(_0x483f84=_0x4622ca[_0xedc17d])&&(_0x40d10a=_0x483f84(_0x40d10a)||_0x40d10a);return _0x40d10a;},M=(_0x259df9,_0x411da4)=>(_0x38fa9c,_0x2a8a20)=>_0x411da4(_0x38fa9c,_0x2a8a20,_0x259df9);function _0x29df(_0x219580,_0xd2b0af){_0x219580=_0x219580-0x92;const _0x342d5b=_0x342d();let _0x29df42=_0x342d5b[_0x219580];return _0x29df42;}let f=class extends _0x50a3fb{constructor(_0x375f80,_0x52e351){super(),this['_threadCommentDataSourceService']=_0x375f80,this['_threadCommentDataSource']=_0x52e351,this['_initDataSource']();}[_0x430339(0xaa)](){const _0x5f1526=_0x430339;this[_0x5f1526(0xdb)][_0x5f1526(0x93)]=this[_0x5f1526(0x97)],this[_0x5f1526(0xdb)][_0x5f1526(0xd7)]=!0x1;}};f=te([M(0x0,_0x401660),M(0x1,_0x284561(S))],f);var se=Object[_0x430339(0xb4)],oe=Object[_0x430339(0x99)],ne=(_0x3f9c87,_0xd76f44,_0x55489c)=>_0xd76f44 in _0x3f9c87?se(_0x3f9c87,_0xd76f44,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55489c}):_0x3f9c87[_0xd76f44]=_0x55489c,ie=(_0x259a7b,_0x574d57,_0x2f6f5e,_0x5e2998)=>{const _0x268a03=_0x430339;for(var _0x2978da=_0x5e2998>0x1?void 0x0:_0x5e2998?oe(_0x574d57,_0x2f6f5e):_0x574d57,_0x4a192f=_0x259a7b[_0x268a03(0xc8)]-0x1,_0x3c8c45;_0x4a192f>=0x0;_0x4a192f--)(_0x3c8c45=_0x259a7b[_0x4a192f])&&(_0x2978da=_0x3c8c45(_0x2978da)||_0x2978da);return _0x2978da;},N=(_0x50db3c,_0x396c30)=>(_0x44cd32,_0x4be6f5)=>_0x396c30(_0x44cd32,_0x4be6f5,_0x50db3c),$=(_0x2a8fa2,_0x8f8dc2,_0x4464d5)=>ne(_0x2a8fa2,typeof _0x8f8dc2!='symbol'?_0x8f8dc2+'':_0x8f8dc2,_0x4464d5);let g=class extends _0x28c80c{constructor(_0x1a3b81=O,_0x505733,_0x2bd0aa){const _0x2a44c2=_0x430339;super(),this[_0x2a44c2(0xf5)]=_0x1a3b81,this['_injector']=_0x505733,this[_0x2a44c2(0xb7)]=_0x2bd0aa;const {..._0x4bee3d}=_0x362468({},O,this[_0x2a44c2(0xf5)]);this[_0x2a44c2(0xb7)][_0x2a44c2(0xbb)](z,_0x4bee3d);}[_0x430339(0xd5)](){[[S],[f],[_]]['forEach'](_0x15b678=>{const _0x54e939=_0x29df;this[_0x54e939(0xed)][_0x54e939(0xb5)](_0x15b678);});}[_0x430339(0xc6)](){const _0xc06215=_0x430339;this['_injector'][_0xc06215(0xc3)](f),this[_0xc06215(0xed)]['get'](_);}};$(g,_0x430339(0xe1),W),$(g,_0x430339(0xd3),_0x4be0da[_0x430339(0xde)]),g=ie([_0x4af44e(_0x116fe9,_0x2663f6,_0x13710b),N(0x1,_0x284561(_0x42cc06)),N(0x2,_0x4dbdea)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x48fe2c=_0x331d;(function(_0x304275,_0x2e0c6c){const _0x53dd1b=_0x331d,_0x17d870=_0x304275();while(!![]){try{const _0x68ad7f=-parseInt(_0x53dd1b(0xba))/0x1+parseInt(_0x53dd1b(0x101))/0x2*(-parseInt(_0x53dd1b(0xa1))/0x3)+parseInt(_0x53dd1b(0xa5))/0x4*(parseInt(_0x53dd1b(0xcc))/0x5)+parseInt(_0x53dd1b(0xb7))/0x6*(parseInt(_0x53dd1b(0xfb))/0x7)+-parseInt(_0x53dd1b(0xf2))/0x8*(-parseInt(_0x53dd1b(0xe3))/0x9)+parseInt(_0x53dd1b(0xaa))/0xa+-parseInt(_0x53dd1b(0xac))/0xb;if(_0x68ad7f===_0x2e0c6c)break;else _0x17d870['push'](_0x17d870['shift']());}catch(_0x556b70){_0x17d870['push'](_0x17d870['shift']());}}}(_0x2786,0xc35c6));import{CommentService as _0x5c121d,CollaborationSessionService as _0x147544,UniverCollaborationClientPlugin as _0x167480}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x25820f}from'@univerjs-pro/license';import{dayjs as _0x5195b2,UserManagerService as _0x53574f,Inject as _0x428f3a,Injector as _0x29b08d,Disposable as _0xe221d9,CustomRangeType as _0x3c6003,UniverInstanceType as _0x4bc7a1,DependentOn as _0xdc118a,Plugin as _0x4b70ca,merge as _0x157acd,IConfigService as _0x5e1548}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5995f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5b2ea3,IThreadCommentDataSourceService as _0x38d035}from'@univerjs/thread-comment';import{bufferTime as _0x2af66c}from'rxjs';import{HTTPService as _0xa6dc27}from'@univerjs/network';const W=_0x48fe2c(0xed);var I=(_0x266a30=>(_0x266a30[_0x266a30[_0x48fe2c(0xa0)]=0x0]=_0x48fe2c(0xa0),_0x266a30[_0x266a30['Solved']=0x1]=_0x48fe2c(0x100),_0x266a30[_0x266a30[_0x48fe2c(0xa7)]=-0x1]=_0x48fe2c(0xa7),_0x266a30))(I||{}),v=(_0x3e4355=>(_0x3e4355[_0x3e4355[_0x48fe2c(0xc2)]=0x0]=_0x48fe2c(0xc2),_0x3e4355[_0x3e4355['Add']=0x1]='Add',_0x3e4355[_0x3e4355[_0x48fe2c(0xb8)]=0x2]=_0x48fe2c(0xb8),_0x3e4355[_0x3e4355['Edit']=0x3]='Edit',_0x3e4355[_0x3e4355['Delete']=0x4]=_0x48fe2c(0xb0),_0x3e4355[_0x3e4355[_0x48fe2c(0xec)]=0x5]=_0x48fe2c(0xec),_0x3e4355[_0x3e4355['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e4355))(v||{});const y=_0x4bc5e4=>_0x5195b2(new Date(+_0x4bc5e4))[_0x48fe2c(0xaf)](_0x48fe2c(0xb4)),B=async(_0x6dc9c8,_0x4964da)=>{const _0x1ba25a=_0x48fe2c,_0x10248a=_0x6dc9c8[_0x1ba25a(0xf0)](_0x53574f),_0x2bcd00=_0x6dc9c8['get'](_0xa6dc27);_0x4964da[_0x1ba25a(0xd1)](_0x240e29=>{const _0x24df96=_0x1ba25a;_0x10248a['getUser'](_0x240e29)&&_0x4964da[_0x24df96(0xe9)](_0x240e29);}),_0x4964da[_0x1ba25a(0xf1)]&&(await _0x2bcd00[_0x1ba25a(0xf0)](_0x1ba25a(0x102),{'params':{'userIDs':[..._0x4964da]}}))['body']['users'][_0x1ba25a(0xd1)](_0x526ae9=>{const _0x56833f=_0x1ba25a;_0x526ae9&&_0x10248a[_0x56833f(0xa2)](_0x526ae9);});};var K=Object[_0x48fe2c(0xa3)],V=(_0x357eef,_0x191289,_0x1b48f1,_0x37ff15)=>{for(var _0x2079ae=_0x37ff15>0x1?void 0x0:_0x37ff15?K(_0x191289,_0x1b48f1):_0x191289,_0x20a4f3=_0x357eef['length']-0x1,_0x2123a2;_0x20a4f3>=0x0;_0x20a4f3--)(_0x2123a2=_0x357eef[_0x20a4f3])&&(_0x2079ae=_0x2123a2(_0x2079ae)||_0x2079ae);return _0x2079ae;},p=(_0x1b0a29,_0x2c76a2)=>(_0x2bb2d7,_0x512358)=>_0x2c76a2(_0x2bb2d7,_0x512358,_0x1b0a29);let _=class extends _0xe221d9{constructor(_0x4ff4cb,_0x2f045e,_0x4e9578,_0x4e2071){const _0x1ea932=_0x48fe2c;super(),this[_0x1ea932(0xe2)]=_0x4ff4cb,this[_0x1ea932(0xbe)]=_0x2f045e,this[_0x1ea932(0xe4)]=_0x4e9578,this[_0x1ea932(0xdc)]=_0x4e2071,this[_0x1ea932(0xc8)](),this[_0x1ea932(0xc1)]();}[_0x48fe2c(0xc1)](){const _0x6ff1b0=_0x48fe2c;this[_0x6ff1b0(0xbd)](this[_0x6ff1b0(0xbe)]['commentUpdate$'][_0x6ff1b0(0xbf)](_0x2af66c(0x10))[_0x6ff1b0(0xd4)](_0x52b3a6=>{const _0x28d66e=_0x6ff1b0,_0x53c34d=new Set();_0x52b3a6['forEach'](_0x451407=>{const _0x10e342=_0x331d;if(_0x451407[_0x10e342(0xb2)]==='add'){const _0x39c55c=_0x451407[_0x10e342(0xfa)][_0x10e342(0xef)];_0x53c34d[_0x10e342(0xe1)](_0x39c55c);}}),B(this[_0x28d66e(0xdc)],_0x53c34d);}));}[_0x48fe2c(0xc8)](){const _0x1d947a=_0x48fe2c;this[_0x1d947a(0xbd)](this[_0x1d947a(0xe2)][_0x1d947a(0xc6)][_0x1d947a(0xd4)](async _0x312552=>{const _0x41bf6a=_0x1d947a;var _0x5933da,_0x1bd47a,_0x2d2caf,_0x2aae63;const _0x3b9dac=(_0x5933da=this[_0x41bf6a(0xbe)][_0x41bf6a(0xc4)](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0xe9a6d1=>_0xe9a6d1['threadId']===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x5933da[_0x41bf6a(0xdf)];if(!_0x3b9dac)return;const {unitId:_0x230f03,subUnitId:_0x4242d4}=_0x3b9dac;switch(_0x312552[_0x41bf6a(0xcf)]&&this[_0x41bf6a(0xe4)][_0x41bf6a(0xa2)](_0x312552[_0x41bf6a(0xcf)]),_0x312552[_0x41bf6a(0xb2)]){case v[_0x41bf6a(0xfe)]:break;case v['Reply']:{this['_threadCommentModel'][_0x41bf6a(0xf9)](_0x230f03,_0x4242d4,{'unitId':_0x230f03,'subUnitId':_0x4242d4,'ref':'','id':_0x312552[_0x41bf6a(0xf3)],'dT':y(+_0x312552[_0x41bf6a(0xe6)]),'threadId':_0x312552[_0x41bf6a(0xab)],'personId':(_0x2d2caf=(_0x1bd47a=_0x312552[_0x41bf6a(0xcf)])==null?void 0x0:_0x1bd47a[_0x41bf6a(0xea)])!=null?_0x2d2caf:_0x312552[_0x41bf6a(0xf4)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content']),'parentId':_0x3b9dac['id']});break;}case v[_0x41bf6a(0xb0)]:{const _0x1a0244=this[_0x41bf6a(0xbe)]['getComment'](_0x230f03,_0x4242d4,_0x312552[_0x41bf6a(0xf3)]);_0x1a0244&&_0x1a0244[_0x41bf6a(0xdb)]&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xca)](_0x230f03,_0x4242d4,_0x312552['replyId']);break;}case v[_0x41bf6a(0xd5)]:{this[_0x41bf6a(0xbe)]['updateComment'](_0x230f03,_0x4242d4,{'commentId':_0x312552[_0x41bf6a(0xf3)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content'])});break;}case v[_0x41bf6a(0xec)]:{const _0xe12e5d=(_0x2aae63=this[_0x41bf6a(0xbe)]['getUnit'](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0x129802=>_0x129802[_0x41bf6a(0xab)]===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x2aae63[_0x41bf6a(0xdf)];_0xe12e5d&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xda)](_0x230f03,_0x4242d4,_0xe12e5d['id'],_0x312552[_0x41bf6a(0xce)]===I[_0x41bf6a(0x100)]);break;}}}));}};_=V([p(0x0,_0x428f3a(_0x5c121d)),p(0x1,_0x428f3a(_0x5b2ea3)),p(0x2,_0x428f3a(_0x53574f)),p(0x3,_0x428f3a(_0x29b08d))],_);const z=_0x48fe2c(0xad),O={};function _0x331d(_0x4bc6b2,_0x45cb30){_0x4bc6b2=_0x4bc6b2-0x9d;const _0x2786b4=_0x2786();let _0x331dbf=_0x2786b4[_0x4bc6b2];return _0x331dbf;}var k=Object['getOwnPropertyDescriptor'],Q=(_0x139968,_0x470422,_0x3837ec,_0x826566)=>{const _0x1f42fd=_0x48fe2c;for(var _0x1c044d=_0x826566>0x1?void 0x0:_0x826566?k(_0x470422,_0x3837ec):_0x470422,_0x21f1e1=_0x139968[_0x1f42fd(0xcb)]-0x1,_0x191a22;_0x21f1e1>=0x0;_0x21f1e1--)(_0x191a22=_0x139968[_0x21f1e1])&&(_0x1c044d=_0x191a22(_0x1c044d)||_0x1c044d);return _0x1c044d;},b=(_0x36adec,_0x3903b4)=>(_0xeef47a,_0x2d48a8)=>_0x3903b4(_0xeef47a,_0x2d48a8,_0x36adec);function X(_0x30d231,_0x668fa0){const _0x3e41c4=_0x48fe2c,_0x419118=_0x30d231['replies'][0x0];return{..._0x668fa0,'id':_0x419118[_0x3e41c4(0xf3)],'resolved':_0x30d231[_0x3e41c4(0xce)]===0x1,'dT':y(_0x419118[_0x3e41c4(0xe6)]),'personId':_0x419118[_0x3e41c4(0xf4)],'threadId':_0x419118['threadId']};}function ee(_0x59ea32,_0xdda6b5,_0x10ccf5){const _0xc8bb0c=_0x48fe2c;var _0x4c05ec,_0xfb3f9c;if(((_0xfb3f9c=(_0x4c05ec=_0x59ea32==null?void 0x0:_0x59ea32['replies'])==null?void 0x0:_0x4c05ec[_0xc8bb0c(0xcb)])!=null?_0xfb3f9c:0x0)>0x0){const _0x41e3f1=(_0x7d6f27,_0x56684d)=>({'id':_0x7d6f27[_0xc8bb0c(0xf3)],'threadId':_0x7d6f27[_0xc8bb0c(0xab)],'dT':y(_0x7d6f27['createTimestamp']),'personId':_0x7d6f27[_0xc8bb0c(0xf4)],'resolved':_0x59ea32['solved']===I['Solved'],'unitId':_0xdda6b5,'subUnitId':_0x10ccf5,'text':JSON[_0xc8bb0c(0xe8)](_0x7d6f27[_0xc8bb0c(0xee)]),'parentId':_0x56684d}),_0x1c71f2=_0x41e3f1(_0x59ea32['replies'][0x0]);return{..._0x1c71f2,'children':_0x59ea32[_0xc8bb0c(0xd2)][_0xc8bb0c(0xb5)](0x1)['map'](_0x546bfa=>_0x41e3f1(_0x546bfa,_0x1c71f2['id']))};}return null;}let S=class{constructor(_0x317e21,_0x511b5e,_0x332787){const _0x2b3bef=_0x48fe2c;this[_0x2b3bef(0xd6)]=_0x317e21,this[_0x2b3bef(0xe4)]=_0x511b5e,this['_sessionService']=_0x332787;}async[_0x48fe2c(0xf9)](_0x1205f3){const _0x3ba5bb=_0x48fe2c;var _0x45718e,_0x1a0f78;const {parentId:_0x54a481,unitId:_0xa5eb06,text:_0x37c887,threadId:_0x2cc036}=_0x1205f3,_0x1b78ee=(_0x1a0f78=(_0x45718e=_0x37c887['customRanges'])==null?void 0x0:_0x45718e['filter'](_0x3dc5a3=>_0x3dc5a3['rangeType']===_0x3c6003[_0x3ba5bb(0xd8)])[_0x3ba5bb(0xd9)](_0x43c6c3=>_0x43c6c3[_0x3ba5bb(0xbb)]))!=null?_0x1a0f78:[],_0x585d95=JSON[_0x3ba5bb(0xfc)](_0x37c887),_0x4c38ac=(await this[_0x3ba5bb(0xff)][_0x3ba5bb(0xb6)](_0xa5eb06))[_0x3ba5bb(0xb3)]();if(_0x54a481){const _0x1fc30c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee,'threadId':_0x2cc036},_0xfd1c58=(await this[_0x3ba5bb(0xd6)][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+_0x3ba5bb(0xa8),{'body':_0x1fc30c}))[_0x3ba5bb(0xd0)][_0x3ba5bb(0xe0)];return{..._0x1205f3,'id':_0xfd1c58[_0x3ba5bb(0xf3)],'dT':_0x5195b2(+_0xfd1c58['createTimestamp'])[_0x3ba5bb(0xaf)](_0x3ba5bb(0xb4)),'personId':_0xfd1c58[_0x3ba5bb(0xf4)]};}else{const _0x395e9c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee},_0x5efc40=await this['_httpService'][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+'/add',{'body':_0x395e9c});return X(_0x5efc40[_0x3ba5bb(0xd0)]['comment'],_0x1205f3);}}async[_0x48fe2c(0xc5)](_0x546ec2){const _0x351375=_0x48fe2c;var _0x4f56fa,_0x5dfb48;const {text:_0x406710,unitId:_0x54c53f}=_0x546ec2,_0x274f9e=(_0x5dfb48=(_0x4f56fa=_0x406710['customRanges'])==null?void 0x0:_0x4f56fa[_0x351375(0xa6)](_0x5a5dac=>_0x5a5dac[_0x351375(0xeb)]===_0x3c6003[_0x351375(0xd8)])[_0x351375(0xd9)](_0x3ad921=>_0x3ad921[_0x351375(0xbb)]))!=null?_0x5dfb48:[],_0x402063=JSON['stringify'](_0x406710),_0x780143=_0x546ec2['threadId'],_0x23f0bb=_0x546ec2['id'],_0x3daf9f={'memberId':(await this['_sessionService'][_0x351375(0xb6)](_0x54c53f))[_0x351375(0xb3)](),'unitId':_0x54c53f,'threadId':_0x780143,'mention':_0x274f9e,'content':_0x402063,'replyId':_0x23f0bb},_0x461783=await this['_httpService'][_0x351375(0xc3)](_0x351375(0xd7)+_0x54c53f+'/edit',{'body':_0x3daf9f});return!_0x461783['body'][_0x351375(0xdd)]||_0x461783[_0x351375(0xd0)]['error'][_0x351375(0xb9)]===0x1;}async[_0x48fe2c(0xda)](_0x5980c1){const _0x46ba6d=_0x48fe2c,{unitId:_0x34d77b}=_0x5980c1,_0x161b40=_0x5980c1[_0x46ba6d(0xab)],_0x4cb8e5={'memberId':this[_0x46ba6d(0xe4)][_0x46ba6d(0xa4)]()[_0x46ba6d(0xea)],'unitId':_0x34d77b,'threadId':_0x161b40,'solved':_0x5980c1[_0x46ba6d(0xf8)]?I[_0x46ba6d(0x100)]:I['OpenOrReOpen']},_0x1e49cd=await this[_0x46ba6d(0xd6)][_0x46ba6d(0xc3)](_0x46ba6d(0xd7)+_0x34d77b+_0x46ba6d(0xc0),{'body':_0x4cb8e5});return!_0x1e49cd['body'][_0x46ba6d(0xdd)]||_0x1e49cd['body']['error'][_0x46ba6d(0xb9)]===0x1;}async[_0x48fe2c(0xca)](_0x1697cd,_0x54b36e,_0x5f3543,_0x2a2357){const _0x452c67=_0x48fe2c,_0x5d3ca7={'memberId':(await this[_0x452c67(0xff)][_0x452c67(0xb6)](_0x1697cd))['getMemberID'](),'threadId':_0x5f3543,'replyId':_0x2a2357,'unitId':_0x1697cd},_0x39c861=await this[_0x452c67(0xd6)][_0x452c67(0xc3)](_0x452c67(0xd7)+_0x1697cd+_0x452c67(0xa9),{'body':_0x5d3ca7});return!_0x39c861['body'][_0x452c67(0xdd)]||_0x39c861[_0x452c67(0xd0)]['error'][_0x452c67(0xb9)]===0x1;}async[_0x48fe2c(0xc7)](_0x2d80f1,_0x2e281b,_0xf29e7b){const _0x1785ef=_0x48fe2c,_0x3216ea={'unitId':_0x2d80f1,'threadId':_0xf29e7b},_0x5a7728=await this['_httpService']['post'](_0x1785ef(0xd7)+_0x2d80f1+'/list',{'body':_0x3216ea}),_0x331e03=_0xf29e7b['map'](_0x378d28=>ee(_0x5a7728[_0x1785ef(0xd0)]['comments'][_0x378d28],_0x2d80f1,_0x2e281b))[_0x1785ef(0xa6)](Boolean);return Object[_0x1785ef(0xde)](_0x5a7728[_0x1785ef(0xd0)][_0x1785ef(0xc9)])[_0x1785ef(0xd1)](_0x1ace91=>{const _0x5f48e4=_0x1785ef;this[_0x5f48e4(0xe4)][_0x5f48e4(0xa2)](_0x1ace91);}),_0x331e03;}['saveCommentToSnapshot'](_0x4cc305){const _0x5874fb=_0x48fe2c;return{'id':_0x4cc305['id'],'threadId':_0x4cc305[_0x5874fb(0xab)],'ref':_0x4cc305['ref']};}};S=Q([b(0x0,_0x428f3a(_0xa6dc27)),b(0x1,_0x428f3a(_0x53574f)),b(0x2,_0x428f3a(_0x147544))],S);function _0x2786(){const _0x45299d=['onReady','createTimestamp','syncUpdateMutationToColla','parse','delete','userID','rangeType','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','personId','get','size','70496CknnQN','replyId','userId','dataSource','pluginName','defineProperty','resolved','addComment','payload','282856xaBObW','stringify','_threadCommentDataSourceService','Add','_sessionService','Solved','2036bIFbsR','/universer-api/user/list','onStarting','UNIVER_UNKNOWN','find','OpenOrReOpen','933lYrrhG','addUser','getOwnPropertyDescriptor','getCurrentUser','2280OpjCZd','filter','UNRECOGNIZED','/reply','/delete','13850950wheMvX','threadId','3712808tbxHvx','thread-comment-data-source.config','_initDataSource','format','Delete','unitId','type','getMemberID','YYYY/MM/DD\x20HH:mm','slice','requireSession','6PXJwxv','Reply','code','1595405LKxwKH','rangeId','_configService','disposeWithMe','_threadCommentModel','pipe','/solved','_initUserSync','Unknown','post','getUnit','updateComment','commentUpdate$','listComments','_init','users','deleteComment','length','875SFjHxl','symbol','solved','user','body','forEach','replies','_config','subscribe','Edit','_httpService','/universer-api/comment/unit/','COMMENT','map','resolveComment','parentId','_injector','error','values','root','reply','add','_commentService','1557DOQOZp','_userService'];_0x2786=function(){return _0x45299d;};return _0x2786();}var re=Object['getOwnPropertyDescriptor'],te=(_0x11e342,_0x147bec,_0x3835ce,_0x4553a7)=>{const _0x3fc310=_0x48fe2c;for(var _0x5612a5=_0x4553a7>0x1?void 0x0:_0x4553a7?re(_0x147bec,_0x3835ce):_0x147bec,_0x4f0f61=_0x11e342[_0x3fc310(0xcb)]-0x1,_0x2b2bf6;_0x4f0f61>=0x0;_0x4f0f61--)(_0x2b2bf6=_0x11e342[_0x4f0f61])&&(_0x5612a5=_0x2b2bf6(_0x5612a5)||_0x5612a5);return _0x5612a5;},M=(_0x4b8006,_0x39bdd9)=>(_0x352980,_0x4c7fac)=>_0x39bdd9(_0x352980,_0x4c7fac,_0x4b8006);let f=class extends _0xe221d9{constructor(_0x1af98d,_0x3ebeef){const _0x3a67f2=_0x48fe2c;super(),this[_0x3a67f2(0xfd)]=_0x1af98d,this['_threadCommentDataSource']=_0x3ebeef,this[_0x3a67f2(0xae)]();}['_initDataSource'](){const _0xa271fa=_0x48fe2c;this['_threadCommentDataSourceService'][_0xa271fa(0xf5)]=this['_threadCommentDataSource'],this[_0xa271fa(0xfd)][_0xa271fa(0xe7)]=!0x1;}};f=te([M(0x0,_0x38d035),M(0x1,_0x428f3a(S))],f);var se=Object[_0x48fe2c(0xf7)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1bedea,_0x573693,_0x2a7bc3)=>_0x573693 in _0x1bedea?se(_0x1bedea,_0x573693,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a7bc3}):_0x1bedea[_0x573693]=_0x2a7bc3,ie=(_0x463889,_0x1fa58d,_0x3a106a,_0x1da43e)=>{const _0x43c352=_0x48fe2c;for(var _0x4c8874=_0x1da43e>0x1?void 0x0:_0x1da43e?oe(_0x1fa58d,_0x3a106a):_0x1fa58d,_0x4de60a=_0x463889[_0x43c352(0xcb)]-0x1,_0x8b2b3a;_0x4de60a>=0x0;_0x4de60a--)(_0x8b2b3a=_0x463889[_0x4de60a])&&(_0x4c8874=_0x8b2b3a(_0x4c8874)||_0x4c8874);return _0x4c8874;},N=(_0xa95b56,_0x51f282)=>(_0x9be76c,_0x783e9b)=>_0x51f282(_0x9be76c,_0x783e9b,_0xa95b56),$=(_0x557a2e,_0x398208,_0xf836ae)=>ne(_0x557a2e,typeof _0x398208!=_0x48fe2c(0xcd)?_0x398208+'':_0x398208,_0xf836ae);let g=class extends _0x4b70ca{constructor(_0x54c2f7=O,_0x532645,_0x1e9e98){const _0x30e2cd=_0x48fe2c;super(),this['_config']=_0x54c2f7,this[_0x30e2cd(0xdc)]=_0x532645,this[_0x30e2cd(0xbc)]=_0x1e9e98;const {..._0x2274bf}=_0x157acd({},O,this[_0x30e2cd(0xd3)]);this[_0x30e2cd(0xbc)]['setConfig'](z,_0x2274bf);}[_0x48fe2c(0x9d)](){const _0x179386=_0x48fe2c;[[S],[f],[_]][_0x179386(0xd1)](_0x3344d6=>{const _0x2e55d4=_0x179386;this[_0x2e55d4(0xdc)][_0x2e55d4(0xe1)](_0x3344d6);});}[_0x48fe2c(0xe5)](){const _0x39a128=_0x48fe2c;this[_0x39a128(0xdc)]['get'](f),this[_0x39a128(0xdc)][_0x39a128(0xf0)](_);}};$(g,_0x48fe2c(0xf6),W),$(g,_0x48fe2c(0xb2),_0x4bc7a1[_0x48fe2c(0x9e)]),g=ie([_0xdc118a(_0x5995f1,_0x167480,_0x25820f),N(0x1,_0x428f3a(_0x29b08d)),N(0x2,_0x5e1548)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x195e(_0x309dd8,_0x233f0e){_0x309dd8=_0x309dd8-0x1ab;const _0x195675=_0x1956();let _0x195ef6=_0x195675[_0x309dd8];return _0x195ef6;}(function(_0x32f10f,_0x52ba32){const _0x5d45c9=_0x195e,_0x5d6256=_0x32f10f();while(!![]){try{const _0x2b83d6=parseInt(_0x5d45c9(0x1c9))/0x1+parseInt(_0x5d45c9(0x1c1))/0x2+-parseInt(_0x5d45c9(0x1b6))/0x3+-parseInt(_0x5d45c9(0x214))/0x4+-parseInt(_0x5d45c9(0x201))/0x5*(parseInt(_0x5d45c9(0x228))/0x6)+-parseInt(_0x5d45c9(0x1ef))/0x7*(-parseInt(_0x5d45c9(0x1ce))/0x8)+parseInt(_0x5d45c9(0x1de))/0x9*(-parseInt(_0x5d45c9(0x1bb))/0xa);if(_0x2b83d6===_0x52ba32)break;else _0x5d6256['push'](_0x5d6256['shift']());}catch(_0x562216){_0x5d6256['push'](_0x5d6256['shift']());}}}(_0x1956,0x50b73),function(_0x1ec44a,_0x58486f){const _0xd39b2c=_0x195e;typeof exports==_0xd39b2c(0x1b3)&&typeof module<'u'?_0x58486f(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==_0xd39b2c(0x212)&&define[_0xd39b2c(0x1c8)]?define([_0xd39b2c(0x1cb),'@univerjs-pro/collaboration-client',_0xd39b2c(0x233),_0xd39b2c(0x210),_0xd39b2c(0x20b),_0xd39b2c(0x1d1),_0xd39b2c(0x209),_0xd39b2c(0x1bf)],_0x58486f):(_0x1ec44a=typeof globalThis<'u'?globalThis:_0x1ec44a||self,_0x58486f(_0x1ec44a[_0xd39b2c(0x1fa)]={},_0x1ec44a[_0xd39b2c(0x1b8)],_0x1ec44a[_0xd39b2c(0x1d7)],_0x1ec44a['UniverCore'],_0x1ec44a[_0xd39b2c(0x205)],_0x1ec44a[_0xd39b2c(0x1ff)],_0x1ec44a[_0xd39b2c(0x209)],_0x1ec44a['UniverNetwork']));}(this,function(_0x4fe946,_0x1125ce,_0x414fa8,_0x223e30,_0x59a657,_0x49ccb8,_0x4945cc,_0x4cefa1){'use strict';const _0x51766c=_0x195e;const _0x3d4067=_0x51766c(0x219);var _0x58181b=(_0x473d29=>(_0x473d29[_0x473d29[_0x51766c(0x1cf)]=0x0]=_0x51766c(0x1cf),_0x473d29[_0x473d29[_0x51766c(0x1f7)]=0x1]=_0x51766c(0x1f7),_0x473d29[_0x473d29[_0x51766c(0x1c5)]=-0x1]=_0x51766c(0x1c5),_0x473d29))(_0x58181b||{}),_0x494282=(_0x4f5a70=>(_0x4f5a70[_0x4f5a70[_0x51766c(0x1d2)]=0x0]=_0x51766c(0x1d2),_0x4f5a70[_0x4f5a70[_0x51766c(0x22a)]=0x1]=_0x51766c(0x22a),_0x4f5a70[_0x4f5a70[_0x51766c(0x1f4)]=0x2]=_0x51766c(0x1f4),_0x4f5a70[_0x4f5a70['Edit']=0x3]='Edit',_0x4f5a70[_0x4f5a70['Delete']=0x4]=_0x51766c(0x22e),_0x4f5a70[_0x4f5a70[_0x51766c(0x211)]=0x5]=_0x51766c(0x211),_0x4f5a70[_0x4f5a70['UNRECOGNIZED']=-0x1]=_0x51766c(0x1c5),_0x4f5a70))(_0x494282||{});const _0x1d712a=_0x4640be=>_0x223e30[_0x51766c(0x1ae)](new Date(+_0x4640be))['format'](_0x51766c(0x234)),_0x3018fa=async(_0x47fbac,_0x203eeb)=>{const _0x25398d=_0x51766c,_0x517f12=_0x47fbac[_0x25398d(0x1ad)](_0x223e30[_0x25398d(0x229)]),_0x4f2b0c=_0x47fbac['get'](_0x4cefa1[_0x25398d(0x1e5)]);_0x203eeb['forEach'](_0x25af7b=>{const _0x4c7aec=_0x25398d;_0x517f12[_0x4c7aec(0x1b5)](_0x25af7b)&&_0x203eeb[_0x4c7aec(0x1da)](_0x25af7b);}),_0x203eeb[_0x25398d(0x1c6)]&&(await _0x4f2b0c[_0x25398d(0x1ad)](_0x25398d(0x223),{'params':{'userIDs':[..._0x203eeb]}}))[_0x25398d(0x1f9)][_0x25398d(0x207)][_0x25398d(0x206)](_0x560c74=>{_0x560c74&&_0x517f12['addUser'](_0x560c74);});};var _0x41f221=Object[_0x51766c(0x1f3)],_0x13b3cf=(_0x453ab2,_0x530c24,_0xd4d502,_0x5f4e2a)=>{const _0x26cadb=_0x51766c;for(var _0x4b6a88=_0x5f4e2a>0x1?void 0x0:_0x5f4e2a?_0x41f221(_0x530c24,_0xd4d502):_0x530c24,_0xf5b47d=_0x453ab2[_0x26cadb(0x1db)]-0x1,_0x3b237f;_0xf5b47d>=0x0;_0xf5b47d--)(_0x3b237f=_0x453ab2[_0xf5b47d])&&(_0x4b6a88=_0x3b237f(_0x4b6a88)||_0x4b6a88);return _0x4b6a88;},_0x44b5b7=(_0x6f56d4,_0x161b8d)=>(_0x4d0e33,_0x54de83)=>_0x161b8d(_0x4d0e33,_0x54de83,_0x6f56d4);let _0x35caf4=class extends _0x223e30[_0x51766c(0x216)]{constructor(_0xf57751,_0x500ea7,_0x464fc6,_0x3f8d06){const _0x36cbde=_0x51766c;super(),this[_0x36cbde(0x1ee)]=_0xf57751,this[_0x36cbde(0x1d5)]=_0x500ea7,this[_0x36cbde(0x1ca)]=_0x464fc6,this['_injector']=_0x3f8d06,this[_0x36cbde(0x20f)](),this[_0x36cbde(0x1f6)]();}['_initUserSync'](){const _0x4d6478=_0x51766c;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x4d6478(0x222)](_0x4945cc[_0x4d6478(0x1ac)](0x10))['subscribe'](_0x29d320=>{const _0x28ad24=_0x4d6478,_0x458d05=new Set();_0x29d320[_0x28ad24(0x206)](_0x54daef=>{const _0x143afc=_0x28ad24;if(_0x54daef[_0x143afc(0x202)]===_0x143afc(0x20d)){const _0x2e53c8=_0x54daef['payload'][_0x143afc(0x1d6)];_0x458d05[_0x143afc(0x20d)](_0x2e53c8);}}),_0x3018fa(this[_0x28ad24(0x21a)],_0x458d05);}));}[_0x51766c(0x20f)](){const _0x5b84ce=_0x51766c;this[_0x5b84ce(0x208)](this[_0x5b84ce(0x1ee)][_0x5b84ce(0x1cd)][_0x5b84ce(0x1f8)](async _0x510f84=>{const _0x2c535e=_0x5b84ce;var _0x19fa89,_0x4e3299,_0x556b19,_0x253e2a;const _0x4bc8fa=(_0x19fa89=this[_0x2c535e(0x1d5)]['getUnit'](_0x510f84[_0x2c535e(0x21b)])[_0x2c535e(0x225)](_0x2addff=>_0x2addff['threadId']===_0x510f84['threadId']))==null?void 0x0:_0x19fa89[_0x2c535e(0x1cc)];if(!_0x4bc8fa)return;const {unitId:_0xadf76e,subUnitId:_0x5d62f0}=_0x4bc8fa;switch(_0x510f84[_0x2c535e(0x1e3)]&&this['_userService'][_0x2c535e(0x1dd)](_0x510f84[_0x2c535e(0x1e3)]),_0x510f84['type']){case _0x494282[_0x2c535e(0x22a)]:break;case _0x494282[_0x2c535e(0x1f4)]:{this['_threadCommentModel'][_0x2c535e(0x22d)](_0xadf76e,_0x5d62f0,{'unitId':_0xadf76e,'subUnitId':_0x5d62f0,'ref':'','id':_0x510f84['replyId'],'dT':_0x1d712a(+_0x510f84[_0x2c535e(0x20e)]),'threadId':_0x510f84[_0x2c535e(0x1ec)],'personId':(_0x556b19=(_0x4e3299=_0x510f84['user'])==null?void 0x0:_0x4e3299[_0x2c535e(0x1e1)])!=null?_0x556b19:_0x510f84[_0x2c535e(0x1b0)],'text':JSON['parse'](_0x510f84['content']),'parentId':_0x4bc8fa['id']});break;}case _0x494282[_0x2c535e(0x22e)]:{const _0x59e78f=this[_0x2c535e(0x1d5)][_0x2c535e(0x1e8)](_0xadf76e,_0x5d62f0,_0x510f84['replyId']);_0x59e78f&&_0x59e78f['parentId']&&this[_0x2c535e(0x1d5)][_0x2c535e(0x1e4)](_0xadf76e,_0x5d62f0,_0x510f84[_0x2c535e(0x1ed)]);break;}case _0x494282[_0x2c535e(0x1e7)]:{this[_0x2c535e(0x1d5)]['updateComment'](_0xadf76e,_0x5d62f0,{'commentId':_0x510f84[_0x2c535e(0x1ed)],'text':JSON['parse'](_0x510f84[_0x2c535e(0x1ea)])});break;}case _0x494282[_0x2c535e(0x211)]:{const _0x35fa64=(_0x253e2a=this['_threadCommentModel'][_0x2c535e(0x1e0)](_0x510f84[_0x2c535e(0x21b)])[_0x2c535e(0x225)](_0x43e64f=>_0x43e64f['threadId']===_0x510f84[_0x2c535e(0x1ec)]))==null?void 0x0:_0x253e2a[_0x2c535e(0x1cc)];_0x35fa64&&this[_0x2c535e(0x1d5)][_0x2c535e(0x203)](_0xadf76e,_0x5d62f0,_0x35fa64['id'],_0x510f84[_0x2c535e(0x213)]===_0x58181b[_0x2c535e(0x1f7)]);break;}}}));}};_0x35caf4=_0x13b3cf([_0x44b5b7(0x0,_0x223e30[_0x51766c(0x1b1)](_0x1125ce[_0x51766c(0x21e)])),_0x44b5b7(0x1,_0x223e30[_0x51766c(0x1b1)](_0x49ccb8[_0x51766c(0x1d0)])),_0x44b5b7(0x2,_0x223e30[_0x51766c(0x1b1)](_0x223e30[_0x51766c(0x229)])),_0x44b5b7(0x3,_0x223e30[_0x51766c(0x1b1)](_0x223e30[_0x51766c(0x1b4)]))],_0x35caf4);const _0x11f380=_0x51766c(0x1bd),_0x4bddf9={};var _0x4c0013=Object[_0x51766c(0x1f3)],_0x123f5b=(_0xfd61c7,_0x258399,_0xe4da6d,_0x2ee0d9)=>{const _0x59df1a=_0x51766c;for(var _0x474aca=_0x2ee0d9>0x1?void 0x0:_0x2ee0d9?_0x4c0013(_0x258399,_0xe4da6d):_0x258399,_0x3c338d=_0xfd61c7[_0x59df1a(0x1db)]-0x1,_0x1a0e35;_0x3c338d>=0x0;_0x3c338d--)(_0x1a0e35=_0xfd61c7[_0x3c338d])&&(_0x474aca=_0x1a0e35(_0x474aca)||_0x474aca);return _0x474aca;},_0x49f320=(_0x37896e,_0x16ea02)=>(_0x14849c,_0x3b348c)=>_0x16ea02(_0x14849c,_0x3b348c,_0x37896e);function _0x3c9f02(_0x44142b,_0x279a2c){const _0x436306=_0x51766c,_0x5b95e3=_0x44142b[_0x436306(0x217)][0x0];return{..._0x279a2c,'id':_0x5b95e3[_0x436306(0x1ed)],'resolved':_0x44142b[_0x436306(0x213)]===0x1,'dT':_0x1d712a(_0x5b95e3[_0x436306(0x20e)]),'personId':_0x5b95e3[_0x436306(0x1b0)],'threadId':_0x5b95e3[_0x436306(0x1ec)]};}function _0x1aa8c2(_0x339a73,_0x28040c,_0x5e59a8){const _0x5d8880=_0x51766c;var _0x2d157a,_0x1542d4;if(((_0x1542d4=(_0x2d157a=_0x339a73==null?void 0x0:_0x339a73['replies'])==null?void 0x0:_0x2d157a[_0x5d8880(0x1db)])!=null?_0x1542d4:0x0)>0x0){const _0x2add2a=(_0x31b60d,_0x520e11)=>({'id':_0x31b60d[_0x5d8880(0x1ed)],'threadId':_0x31b60d['threadId'],'dT':_0x1d712a(_0x31b60d['createTimestamp']),'personId':_0x31b60d['userId'],'resolved':_0x339a73[_0x5d8880(0x213)]===_0x58181b[_0x5d8880(0x1f7)],'unitId':_0x28040c,'subUnitId':_0x5e59a8,'text':JSON[_0x5d8880(0x226)](_0x31b60d[_0x5d8880(0x1ea)]),'parentId':_0x520e11}),_0x211de0=_0x2add2a(_0x339a73['replies'][0x0]);return{..._0x211de0,'children':_0x339a73[_0x5d8880(0x217)][_0x5d8880(0x1d9)](0x1)[_0x5d8880(0x224)](_0x42cb9d=>_0x2add2a(_0x42cb9d,_0x211de0['id']))};}return null;}let _0x5a9f42=class{constructor(_0x17242d,_0x1590e0,_0xcccbb){const _0x236e27=_0x51766c;this['_httpService']=_0x17242d,this[_0x236e27(0x1ca)]=_0x1590e0,this[_0x236e27(0x1af)]=_0xcccbb;}async['addComment'](_0x1cee02){const _0x47e1c0=_0x51766c;var _0x5032ad,_0x4ebddb;const {parentId:_0x318a51,unitId:_0x1e71ff,text:_0x56984b,threadId:_0x3c968c}=_0x1cee02,_0x515157=(_0x4ebddb=(_0x5032ad=_0x56984b[_0x47e1c0(0x1d3)])==null?void 0x0:_0x5032ad['filter'](_0x12153a=>_0x12153a['rangeType']===_0x223e30[_0x47e1c0(0x1fb)]['COMMENT'])[_0x47e1c0(0x224)](_0x343eec=>_0x343eec[_0x47e1c0(0x1e9)]))!=null?_0x4ebddb:[],_0x341540=JSON[_0x47e1c0(0x1c7)](_0x56984b),_0x1b0f7e=(await this['_sessionService'][_0x47e1c0(0x1c3)](_0x1e71ff))[_0x47e1c0(0x1d4)]();if(_0x318a51){const _0x43948b={'memberId':_0x1b0f7e,'unitId':_0x1e71ff,'content':_0x341540,'mention':_0x515157,'threadId':_0x3c968c},_0x3d66f5=(await this[_0x47e1c0(0x1d8)][_0x47e1c0(0x200)](_0x47e1c0(0x1b9)+_0x1e71ff+_0x47e1c0(0x1b7),{'body':_0x43948b}))[_0x47e1c0(0x1f9)]['reply'];return{..._0x1cee02,'id':_0x3d66f5[_0x47e1c0(0x1ed)],'dT':_0x223e30[_0x47e1c0(0x1ae)](+_0x3d66f5['createTimestamp'])[_0x47e1c0(0x204)](_0x47e1c0(0x234)),'personId':_0x3d66f5[_0x47e1c0(0x1b0)]};}else{const _0x3c85bc={'memberId':_0x1b0f7e,'unitId':_0x1e71ff,'content':_0x341540,'mention':_0x515157},_0x362306=await this['_httpService'][_0x47e1c0(0x200)]('/universer-api/comment/unit/'+_0x1e71ff+'/add',{'body':_0x3c85bc});return _0x3c9f02(_0x362306['body'][_0x47e1c0(0x218)],_0x1cee02);}}async[_0x51766c(0x22c)](_0x2a6164){const _0x3b4fed=_0x51766c;var _0x3f2529,_0x1c3f62;const {text:_0xdf7f0,unitId:_0x2c2f04}=_0x2a6164,_0x2bfb81=(_0x1c3f62=(_0x3f2529=_0xdf7f0[_0x3b4fed(0x1d3)])==null?void 0x0:_0x3f2529[_0x3b4fed(0x22b)](_0x337719=>_0x337719[_0x3b4fed(0x21c)]===_0x223e30[_0x3b4fed(0x1fb)][_0x3b4fed(0x1f2)])[_0x3b4fed(0x224)](_0x45aa9e=>_0x45aa9e[_0x3b4fed(0x1e9)]))!=null?_0x1c3f62:[],_0x3028f2=JSON[_0x3b4fed(0x1c7)](_0xdf7f0),_0x4dfc52=_0x2a6164[_0x3b4fed(0x1ec)],_0x3326aa=_0x2a6164['id'],_0x5351d5={'memberId':(await this[_0x3b4fed(0x1af)][_0x3b4fed(0x1c3)](_0x2c2f04))['getMemberID'](),'unitId':_0x2c2f04,'threadId':_0x4dfc52,'mention':_0x2bfb81,'content':_0x3028f2,'replyId':_0x3326aa},_0x540ddf=await this[_0x3b4fed(0x1d8)]['post']('/universer-api/comment/unit/'+_0x2c2f04+'/edit',{'body':_0x5351d5});return!_0x540ddf[_0x3b4fed(0x1f9)][_0x3b4fed(0x235)]||_0x540ddf[_0x3b4fed(0x1f9)][_0x3b4fed(0x235)][_0x3b4fed(0x1c4)]===0x1;}async[_0x51766c(0x203)](_0x48363b){const _0x20a4cf=_0x51766c,{unitId:_0x1950e4}=_0x48363b,_0x403586=_0x48363b[_0x20a4cf(0x1ec)],_0x30e57={'memberId':this[_0x20a4cf(0x1ca)][_0x20a4cf(0x1eb)]()[_0x20a4cf(0x1e1)],'unitId':_0x1950e4,'threadId':_0x403586,'solved':_0x48363b[_0x20a4cf(0x22f)]?_0x58181b[_0x20a4cf(0x1f7)]:_0x58181b[_0x20a4cf(0x1cf)]},_0x589c39=await this[_0x20a4cf(0x1d8)][_0x20a4cf(0x200)](_0x20a4cf(0x1b9)+_0x1950e4+'/solved',{'body':_0x30e57});return!_0x589c39[_0x20a4cf(0x1f9)]['error']||_0x589c39[_0x20a4cf(0x1f9)][_0x20a4cf(0x235)][_0x20a4cf(0x1c4)]===0x1;}async[_0x51766c(0x1e4)](_0x34962e,_0x2d9ba3,_0x330fec,_0x26e5a9){const _0x340ced=_0x51766c,_0x48343={'memberId':(await this[_0x340ced(0x1af)]['requireSession'](_0x34962e))[_0x340ced(0x1d4)](),'threadId':_0x330fec,'replyId':_0x26e5a9,'unitId':_0x34962e},_0x5bcf5e=await this[_0x340ced(0x1d8)][_0x340ced(0x200)](_0x340ced(0x1b9)+_0x34962e+_0x340ced(0x1e6),{'body':_0x48343});return!_0x5bcf5e['body']['error']||_0x5bcf5e['body'][_0x340ced(0x235)][_0x340ced(0x1c4)]===0x1;}async[_0x51766c(0x1be)](_0xbb0a67,_0x536370,_0x5eb3a9){const _0x2cd09b=_0x51766c,_0x492c7b={'unitId':_0xbb0a67,'threadId':_0x5eb3a9},_0x2f165e=await this[_0x2cd09b(0x1d8)][_0x2cd09b(0x200)](_0x2cd09b(0x1b9)+_0xbb0a67+_0x2cd09b(0x1e2),{'body':_0x492c7b}),_0x129b94=_0x5eb3a9[_0x2cd09b(0x224)](_0x60e531=>_0x1aa8c2(_0x2f165e[_0x2cd09b(0x1f9)]['comments'][_0x60e531],_0xbb0a67,_0x536370))[_0x2cd09b(0x22b)](Boolean);return Object[_0x2cd09b(0x1ba)](_0x2f165e['body'][_0x2cd09b(0x207)])[_0x2cd09b(0x206)](_0x2e0d0d=>{const _0x321895=_0x2cd09b;this[_0x321895(0x1ca)][_0x321895(0x1dd)](_0x2e0d0d);}),_0x129b94;}[_0x51766c(0x1fd)](_0x168aea){const _0x146834=_0x51766c;return{'id':_0x168aea['id'],'threadId':_0x168aea['threadId'],'ref':_0x168aea[_0x146834(0x221)]};}};_0x5a9f42=_0x123f5b([_0x49f320(0x0,_0x223e30[_0x51766c(0x1b1)](_0x4cefa1['HTTPService'])),_0x49f320(0x1,_0x223e30[_0x51766c(0x1b1)](_0x223e30['UserManagerService'])),_0x49f320(0x2,_0x223e30[_0x51766c(0x1b1)](_0x1125ce[_0x51766c(0x1df)]))],_0x5a9f42);var _0x11bb46=Object[_0x51766c(0x1f3)],_0x2ded7c=(_0x8afdc4,_0x40ba00,_0xcbad10,_0x10ddf2)=>{const _0x5537fd=_0x51766c;for(var _0x303776=_0x10ddf2>0x1?void 0x0:_0x10ddf2?_0x11bb46(_0x40ba00,_0xcbad10):_0x40ba00,_0x33d0e5=_0x8afdc4[_0x5537fd(0x1db)]-0x1,_0x27d34f;_0x33d0e5>=0x0;_0x33d0e5--)(_0x27d34f=_0x8afdc4[_0x33d0e5])&&(_0x303776=_0x27d34f(_0x303776)||_0x303776);return _0x303776;},_0x2f2df5=(_0x3f37f2,_0x48dcaf)=>(_0x56b967,_0x550aa0)=>_0x48dcaf(_0x56b967,_0x550aa0,_0x3f37f2);let _0x1a4f00=class extends _0x223e30[_0x51766c(0x216)]{constructor(_0x52accf,_0x375067){const _0x190125=_0x51766c;super(),this[_0x190125(0x230)]=_0x52accf,this[_0x190125(0x1fe)]=_0x375067,this[_0x190125(0x1ab)]();}[_0x51766c(0x1ab)](){const _0x5c56c5=_0x51766c;this[_0x5c56c5(0x230)][_0x5c56c5(0x21d)]=this[_0x5c56c5(0x1fe)],this[_0x5c56c5(0x230)][_0x5c56c5(0x227)]=!0x1;}};_0x1a4f00=_0x2ded7c([_0x2f2df5(0x0,_0x49ccb8[_0x51766c(0x237)]),_0x2f2df5(0x1,_0x223e30[_0x51766c(0x1b1)](_0x5a9f42))],_0x1a4f00);var _0x42d920=Object['defineProperty'],_0x3bab50=Object[_0x51766c(0x1f3)],_0xc7c770=(_0x5d1ce2,_0x2cae93,_0x4442c3)=>_0x2cae93 in _0x5d1ce2?_0x42d920(_0x5d1ce2,_0x2cae93,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4442c3}):_0x5d1ce2[_0x2cae93]=_0x4442c3,_0xccd726=(_0x329bd5,_0x4c17fb,_0x46925b,_0x2eb94f)=>{const _0x168a81=_0x51766c;for(var _0x456c31=_0x2eb94f>0x1?void 0x0:_0x2eb94f?_0x3bab50(_0x4c17fb,_0x46925b):_0x4c17fb,_0x2f7d93=_0x329bd5[_0x168a81(0x1db)]-0x1,_0x2ab1e9;_0x2f7d93>=0x0;_0x2f7d93--)(_0x2ab1e9=_0x329bd5[_0x2f7d93])&&(_0x456c31=_0x2ab1e9(_0x456c31)||_0x456c31);return _0x456c31;},_0x266aa0=(_0x23387e,_0x248dff)=>(_0x3a8b4c,_0x4cd4ca)=>_0x248dff(_0x3a8b4c,_0x4cd4ca,_0x23387e),_0x258c20=(_0x2f00f2,_0x40bdc9,_0x5acb30)=>_0xc7c770(_0x2f00f2,typeof _0x40bdc9!=_0x51766c(0x215)?_0x40bdc9+'':_0x40bdc9,_0x5acb30);_0x4fe946['UniverThreadCommentDataSourcePlugin']=class extends _0x223e30['Plugin']{constructor(_0xa8a71d=_0x4bddf9,_0x3253c2,_0x127f63){const _0x17e10d=_0x51766c;super(),this[_0x17e10d(0x1c0)]=_0xa8a71d,this[_0x17e10d(0x21a)]=_0x3253c2,this['_configService']=_0x127f63;const {..._0x65369a}=_0x223e30['merge']({},_0x4bddf9,this[_0x17e10d(0x1c0)]);this['_configService'][_0x17e10d(0x1f5)](_0x11f380,_0x65369a);}[_0x51766c(0x232)](){const _0x564da0=_0x51766c;[[_0x5a9f42],[_0x1a4f00],[_0x35caf4]][_0x564da0(0x206)](_0x425580=>{const _0x3a95ef=_0x564da0;this[_0x3a95ef(0x21a)][_0x3a95ef(0x20d)](_0x425580);});}[_0x51766c(0x236)](){const _0x2167bb=_0x51766c;this[_0x2167bb(0x21a)]['get'](_0x1a4f00),this['_injector'][_0x2167bb(0x1ad)](_0x35caf4);}},_0x258c20(_0x4fe946[_0x51766c(0x1fc)],_0x51766c(0x1f0),_0x3d4067),_0x258c20(_0x4fe946[_0x51766c(0x1fc)],_0x51766c(0x202),_0x223e30[_0x51766c(0x220)][_0x51766c(0x20c)]),_0x4fe946[_0x51766c(0x1fc)]=_0xccd726([_0x223e30[_0x51766c(0x20a)](_0x59a657[_0x51766c(0x1f1)],_0x1125ce[_0x51766c(0x231)],_0x414fa8[_0x51766c(0x1c2)]),_0x266aa0(0x1,_0x223e30[_0x51766c(0x1b1)](_0x223e30['Injector'])),_0x266aa0(0x2,_0x223e30[_0x51766c(0x1bc)])],_0x4fe946['UniverThreadCommentDataSourcePlugin']),Object[_0x51766c(0x1b2)](_0x4fe946,Symbol[_0x51766c(0x1dc)],{'value':_0x51766c(0x21f)});}));function _0x1956(){const _0x2ad65a=['getComment','rangeId','content','getCurrentUser','threadId','replyId','_commentService','7CuPQvp','pluginName','UniverThreadCommentUIPlugin','COMMENT','getOwnPropertyDescriptor','Reply','setConfig','_initUserSync','Solved','subscribe','body','UniverProThreadCommentDatasource','CustomRangeType','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','_threadCommentDataSource','UniverThreadComment','post','1037165hTFJeK','type','resolveComment','format','UniverThreadCommentUi','forEach','users','disposeWithMe','rxjs','DependentOn','@univerjs/thread-comment-ui','UNIVER_UNKNOWN','add','createTimestamp','_init','@univerjs/core','Solve','function','solved','517688IoGfKb','symbol','Disposable','replies','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','unitId','rangeType','dataSource','CommentService','Module','UniverInstanceType','ref','pipe','/universer-api/user/list','map','find','parse','syncUpdateMutationToColla','6fvHqyX','UserManagerService','Add','filter','updateComment','addComment','Delete','resolved','_threadCommentDataSourceService','UniverCollaborationClientPlugin','onStarting','@univerjs-pro/license','YYYY/MM/DD\x20HH:mm','error','onReady','IThreadCommentDataSourceService','_initDataSource','bufferTime','get','dayjs','_sessionService','userId','Inject','defineProperty','object','Injector','getUser','664116YeSMyV','/reply','UniverProCollaborationClient','/universer-api/comment/unit/','values','4040jzVnCZ','IConfigService','thread-comment-data-source.config','listComments','@univerjs/network','_config','887740hmqLTb','UniverLicensePlugin','requireSession','code','UNRECOGNIZED','size','stringify','amd','623653AYtUII','_userService','exports','root','commentUpdate$','5528NpGNcV','OpenOrReOpen','ThreadCommentModel','@univerjs/thread-comment','Unknown','customRanges','getMemberID','_threadCommentModel','personId','UniverProLicense','_httpService','slice','delete','length','toStringTag','addUser','3996cAvnSE','CollaborationSessionService','getUnit','userID','/list','user','deleteComment','HTTPService','/delete','Edit'];_0x1956=function(){return _0x2ad65a;};return _0x1956();}
|
|
1
|
+
function _0xc58f(_0x419dc4,_0x31a11c){_0x419dc4=_0x419dc4-0xc6;const _0x7464bc=_0x7464();let _0xc58fd5=_0x7464bc[_0x419dc4];return _0xc58fd5;}(function(_0x116b11,_0x1f4e16){const _0x36ab84=_0xc58f,_0x460837=_0x116b11();while(!![]){try{const _0x37f8f3=parseInt(_0x36ab84(0x108))/0x1*(parseInt(_0x36ab84(0x105))/0x2)+parseInt(_0x36ab84(0xff))/0x3+-parseInt(_0x36ab84(0x121))/0x4+-parseInt(_0x36ab84(0x13b))/0x5*(parseInt(_0x36ab84(0xd9))/0x6)+parseInt(_0x36ab84(0xd8))/0x7+-parseInt(_0x36ab84(0x138))/0x8*(-parseInt(_0x36ab84(0xe9))/0x9)+-parseInt(_0x36ab84(0xfd))/0xa;if(_0x37f8f3===_0x1f4e16)break;else _0x460837['push'](_0x460837['shift']());}catch(_0x213760){_0x460837['push'](_0x460837['shift']());}}}(_0x7464,0x364cb),function(_0x578ba9,_0x568c19){const _0x1ae1c6=_0xc58f;typeof exports==_0x1ae1c6(0xfb)&&typeof module<'u'?_0x568c19(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==_0x1ae1c6(0x151)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x1ae1c6(0x139),_0x1ae1c6(0x13e),_0x1ae1c6(0x14d),'@univerjs/thread-comment',_0x1ae1c6(0xfe),_0x1ae1c6(0x126)],_0x568c19):(_0x578ba9=typeof globalThis<'u'?globalThis:_0x578ba9||self,_0x568c19(_0x578ba9[_0x1ae1c6(0xd2)]={},_0x578ba9[_0x1ae1c6(0xc9)],_0x578ba9['UniverProLicense'],_0x578ba9[_0x1ae1c6(0x128)],_0x578ba9[_0x1ae1c6(0xfa)],_0x578ba9[_0x1ae1c6(0x10a)],_0x578ba9['rxjs'],_0x578ba9[_0x1ae1c6(0x141)]));}(this,function(_0x3041a1,_0x1c91d7,_0x3db020,_0x3e4368,_0x2c2f02,_0x39bcb2,_0x4b9f61,_0x567a93){'use strict';const _0x307b38=_0xc58f;const _0x3fc2ff=_0x307b38(0x142);var _0x1b8961=(_0x509cca=>(_0x509cca[_0x509cca[_0x307b38(0xf2)]=0x0]='OpenOrReOpen',_0x509cca[_0x509cca[_0x307b38(0x10f)]=0x1]=_0x307b38(0x10f),_0x509cca[_0x509cca[_0x307b38(0xe7)]=-0x1]=_0x307b38(0xe7),_0x509cca))(_0x1b8961||{}),_0x222735=(_0x8af110=>(_0x8af110[_0x8af110[_0x307b38(0xcc)]=0x0]=_0x307b38(0xcc),_0x8af110[_0x8af110[_0x307b38(0x143)]=0x1]=_0x307b38(0x143),_0x8af110[_0x8af110['Reply']=0x2]=_0x307b38(0x124),_0x8af110[_0x8af110['Edit']=0x3]=_0x307b38(0x11a),_0x8af110[_0x8af110[_0x307b38(0x100)]=0x4]=_0x307b38(0x100),_0x8af110[_0x8af110[_0x307b38(0x104)]=0x5]='Solve',_0x8af110[_0x8af110['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x8af110))(_0x222735||{});const _0x16cba7=_0x570103=>_0x3e4368[_0x307b38(0xf6)](new Date(+_0x570103))['format'](_0x307b38(0x110)),_0x41556f=async(_0x3b4318,_0x198b61)=>{const _0x580195=_0x307b38,_0x140aa5=_0x3b4318['get'](_0x3e4368[_0x580195(0x11d)]),_0x379d93=_0x3b4318[_0x580195(0x133)](_0x567a93[_0x580195(0xeb)]);_0x198b61[_0x580195(0x137)](_0x5307bc=>{const _0x213b00=_0x580195;_0x140aa5[_0x213b00(0x114)](_0x5307bc)&&_0x198b61[_0x213b00(0x103)](_0x5307bc);}),_0x198b61['size']&&(await _0x379d93['get'](_0x580195(0xca),{'params':{'userIDs':[..._0x198b61]}}))[_0x580195(0x13f)][_0x580195(0x11e)][_0x580195(0x137)](_0x271206=>{const _0x3e287f=_0x580195;_0x271206&&_0x140aa5[_0x3e287f(0x149)](_0x271206);});};var _0x1a2a1c=Object['getOwnPropertyDescriptor'],_0x4a88ca=(_0x46fbeb,_0x3e51cd,_0x2a41d8,_0x5adc5c)=>{const _0x4417d5=_0x307b38;for(var _0x310687=_0x5adc5c>0x1?void 0x0:_0x5adc5c?_0x1a2a1c(_0x3e51cd,_0x2a41d8):_0x3e51cd,_0x2c5955=_0x46fbeb[_0x4417d5(0xcb)]-0x1,_0x52d27f;_0x2c5955>=0x0;_0x2c5955--)(_0x52d27f=_0x46fbeb[_0x2c5955])&&(_0x310687=_0x52d27f(_0x310687)||_0x310687);return _0x310687;},_0x480242=(_0x4d5ba6,_0x12a3e7)=>(_0x1dad85,_0x23587b)=>_0x12a3e7(_0x1dad85,_0x23587b,_0x4d5ba6);let _0x1b1de7=class extends _0x3e4368['Disposable']{constructor(_0x2f3f00,_0x20a898,_0x27989e,_0x5bf9e2){const _0x21699b=_0x307b38;super(),this[_0x21699b(0xe3)]=_0x2f3f00,this[_0x21699b(0xc8)]=_0x20a898,this[_0x21699b(0x125)]=_0x27989e,this[_0x21699b(0x129)]=_0x5bf9e2,this[_0x21699b(0x12e)](),this[_0x21699b(0x140)]();}[_0x307b38(0x140)](){const _0x2cf9de=_0x307b38;this['disposeWithMe'](this[_0x2cf9de(0xc8)][_0x2cf9de(0x130)][_0x2cf9de(0xce)](_0x4b9f61[_0x2cf9de(0xd1)](0x10))[_0x2cf9de(0xf3)](_0x232dc5=>{const _0x2e4bf6=_0x2cf9de,_0x21e3e8=new Set();_0x232dc5[_0x2e4bf6(0x137)](_0x17ac83=>{const _0x4aa66f=_0x2e4bf6;if(_0x17ac83[_0x4aa66f(0x14c)]==='add'){const _0x1858fe=_0x17ac83[_0x4aa66f(0xef)][_0x4aa66f(0xdc)];_0x21e3e8['add'](_0x1858fe);}}),_0x41556f(this[_0x2e4bf6(0x129)],_0x21e3e8);}));}[_0x307b38(0x12e)](){const _0x34aee1=_0x307b38;this[_0x34aee1(0x147)](this[_0x34aee1(0xe3)][_0x34aee1(0x130)][_0x34aee1(0xf3)](async _0x4155f2=>{const _0x4f74da=_0x34aee1;var _0x31695f,_0x1ab9d5,_0x26e9ed,_0x2ea8a6;const _0x26fcdc=(_0x31695f=this[_0x4f74da(0xc8)]['getUnit'](_0x4155f2[_0x4f74da(0x111)])['find'](_0x30cc86=>_0x30cc86[_0x4f74da(0xdb)]===_0x4155f2[_0x4f74da(0xdb)]))==null?void 0x0:_0x31695f[_0x4f74da(0x12c)];if(!_0x26fcdc)return;const {unitId:_0x30a454,subUnitId:_0x89c10}=_0x26fcdc;switch(_0x4155f2[_0x4f74da(0xe2)]&&this[_0x4f74da(0x125)][_0x4f74da(0x149)](_0x4155f2[_0x4f74da(0xe2)]),_0x4155f2[_0x4f74da(0x14c)]){case _0x222735['Add']:break;case _0x222735[_0x4f74da(0x124)]:{this[_0x4f74da(0xc8)][_0x4f74da(0x10e)](_0x30a454,_0x89c10,{'unitId':_0x30a454,'subUnitId':_0x89c10,'ref':'','id':_0x4155f2[_0x4f74da(0x146)],'dT':_0x16cba7(+_0x4155f2[_0x4f74da(0x11f)]),'threadId':_0x4155f2['threadId'],'personId':(_0x26e9ed=(_0x1ab9d5=_0x4155f2[_0x4f74da(0xe2)])==null?void 0x0:_0x1ab9d5[_0x4f74da(0xee)])!=null?_0x26e9ed:_0x4155f2[_0x4f74da(0x13d)],'text':JSON[_0x4f74da(0xd4)](_0x4155f2[_0x4f74da(0xe0)]),'parentId':_0x26fcdc['id']});break;}case _0x222735[_0x4f74da(0x100)]:{const _0x598d5e=this[_0x4f74da(0xc8)][_0x4f74da(0xc7)](_0x30a454,_0x89c10,_0x4155f2[_0x4f74da(0x146)]);_0x598d5e&&_0x598d5e[_0x4f74da(0x115)]&&this[_0x4f74da(0xc8)][_0x4f74da(0xd5)](_0x30a454,_0x89c10,_0x4155f2[_0x4f74da(0x146)]);break;}case _0x222735[_0x4f74da(0x11a)]:{this[_0x4f74da(0xc8)][_0x4f74da(0x14f)](_0x30a454,_0x89c10,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x4f74da(0xd4)](_0x4155f2[_0x4f74da(0xe0)])});break;}case _0x222735[_0x4f74da(0x104)]:{const _0x1151a4=(_0x2ea8a6=this[_0x4f74da(0xc8)]['getUnit'](_0x4155f2[_0x4f74da(0x111)])[_0x4f74da(0x109)](_0x2c8fe4=>_0x2c8fe4[_0x4f74da(0xdb)]===_0x4155f2[_0x4f74da(0xdb)]))==null?void 0x0:_0x2ea8a6[_0x4f74da(0x12c)];_0x1151a4&&this[_0x4f74da(0xc8)][_0x4f74da(0xdf)](_0x30a454,_0x89c10,_0x1151a4['id'],_0x4155f2[_0x4f74da(0x117)]===_0x1b8961[_0x4f74da(0x10f)]);break;}}}));}};_0x1b1de7=_0x4a88ca([_0x480242(0x0,_0x3e4368[_0x307b38(0xc6)](_0x1c91d7[_0x307b38(0xf7)])),_0x480242(0x1,_0x3e4368[_0x307b38(0xc6)](_0x39bcb2[_0x307b38(0xf9)])),_0x480242(0x2,_0x3e4368[_0x307b38(0xc6)](_0x3e4368[_0x307b38(0x11d)])),_0x480242(0x3,_0x3e4368[_0x307b38(0xc6)](_0x3e4368[_0x307b38(0x123)]))],_0x1b1de7);const _0x381f78=_0x307b38(0xda),_0x4350f3={};var _0x30fce0=Object['getOwnPropertyDescriptor'],_0x22caad=(_0x4584b5,_0x5de675,_0x4fb57d,_0x893a35)=>{const _0x247999=_0x307b38;for(var _0x51055a=_0x893a35>0x1?void 0x0:_0x893a35?_0x30fce0(_0x5de675,_0x4fb57d):_0x5de675,_0x1f2e53=_0x4584b5[_0x247999(0xcb)]-0x1,_0x17812a;_0x1f2e53>=0x0;_0x1f2e53--)(_0x17812a=_0x4584b5[_0x1f2e53])&&(_0x51055a=_0x17812a(_0x51055a)||_0x51055a);return _0x51055a;},_0x3c845c=(_0xc52e01,_0x5bd81a)=>(_0x3aba7c,_0x34edc4)=>_0x5bd81a(_0x3aba7c,_0x34edc4,_0xc52e01);function _0x3946ad(_0x530888,_0x3f2300){const _0x5cc2a5=_0x307b38,_0x1f1252=_0x530888['replies'][0x0];return{..._0x3f2300,'id':_0x1f1252['replyId'],'resolved':_0x530888[_0x5cc2a5(0x117)]===0x1,'dT':_0x16cba7(_0x1f1252[_0x5cc2a5(0x11f)]),'personId':_0x1f1252[_0x5cc2a5(0x13d)],'threadId':_0x1f1252['threadId']};}function _0x4838de(_0x368f29,_0x57e35f,_0x16a428){const _0x274599=_0x307b38;var _0x165179,_0x5a4383;if(((_0x5a4383=(_0x165179=_0x368f29==null?void 0x0:_0x368f29['replies'])==null?void 0x0:_0x165179['length'])!=null?_0x5a4383:0x0)>0x0){const _0x828805=(_0x40c513,_0x32f072)=>({'id':_0x40c513[_0x274599(0x146)],'threadId':_0x40c513[_0x274599(0xdb)],'dT':_0x16cba7(_0x40c513['createTimestamp']),'personId':_0x40c513[_0x274599(0x13d)],'resolved':_0x368f29[_0x274599(0x117)]===_0x1b8961['Solved'],'unitId':_0x57e35f,'subUnitId':_0x16a428,'text':JSON[_0x274599(0xd4)](_0x40c513[_0x274599(0xe0)]),'parentId':_0x32f072}),_0x5b30e7=_0x828805(_0x368f29[_0x274599(0x11b)][0x0]);return{..._0x5b30e7,'children':_0x368f29[_0x274599(0x11b)][_0x274599(0xcd)](0x1)['map'](_0x40b264=>_0x828805(_0x40b264,_0x5b30e7['id']))};}return null;}let _0x1d1a6a=class{constructor(_0x457093,_0x2634e7,_0x1b802b){const _0x3d0d53=_0x307b38;this[_0x3d0d53(0x136)]=_0x457093,this[_0x3d0d53(0x125)]=_0x2634e7,this[_0x3d0d53(0x118)]=_0x1b802b;}async[_0x307b38(0x10e)](_0x46f12d){const _0x165e1f=_0x307b38;var _0x27aeff,_0x382a2a;const {parentId:_0x19f0d1,unitId:_0x32eab9,text:_0x45f610,threadId:_0x598edc}=_0x46f12d,_0x557e63=(_0x382a2a=(_0x27aeff=_0x45f610[_0x165e1f(0xea)])==null?void 0x0:_0x27aeff[_0x165e1f(0xf0)](_0x28854a=>_0x28854a[_0x165e1f(0x131)]===_0x3e4368[_0x165e1f(0x120)]['COMMENT'])['map'](_0x335278=>_0x335278['rangeId']))!=null?_0x382a2a:[],_0x1526e8=JSON[_0x165e1f(0x12d)](_0x45f610),_0x302a83=(await this[_0x165e1f(0x118)]['requireSession'](_0x32eab9))[_0x165e1f(0x11c)]();if(_0x19f0d1){const _0x432d08={'memberId':_0x302a83,'unitId':_0x32eab9,'content':_0x1526e8,'mention':_0x557e63,'threadId':_0x598edc},_0x4d8092=(await this[_0x165e1f(0x136)][_0x165e1f(0x102)]('/universer-api/comment/unit/'+_0x32eab9+'/reply',{'body':_0x432d08}))['body'][_0x165e1f(0x148)];return{..._0x46f12d,'id':_0x4d8092[_0x165e1f(0x146)],'dT':_0x3e4368['dayjs'](+_0x4d8092[_0x165e1f(0x11f)])[_0x165e1f(0xdd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4d8092[_0x165e1f(0x13d)]};}else{const _0x4b7c4e={'memberId':_0x302a83,'unitId':_0x32eab9,'content':_0x1526e8,'mention':_0x557e63},_0x48075c=await this[_0x165e1f(0x136)]['post'](_0x165e1f(0xe5)+_0x32eab9+'/add',{'body':_0x4b7c4e});return _0x3946ad(_0x48075c['body'][_0x165e1f(0x113)],_0x46f12d);}}async['updateComment'](_0x188848){const _0x459f88=_0x307b38;var _0x194259,_0x249f62;const {text:_0x45f752,unitId:_0x52fb8d}=_0x188848,_0x3b7c35=(_0x249f62=(_0x194259=_0x45f752[_0x459f88(0xea)])==null?void 0x0:_0x194259[_0x459f88(0xf0)](_0x1a329a=>_0x1a329a['rangeType']===_0x3e4368[_0x459f88(0x120)][_0x459f88(0x10b)])[_0x459f88(0x14a)](_0x2da044=>_0x2da044['rangeId']))!=null?_0x249f62:[],_0x56466e=JSON[_0x459f88(0x12d)](_0x45f752),_0x17c23c=_0x188848['threadId'],_0xcefc8a=_0x188848['id'],_0x260f37={'memberId':(await this[_0x459f88(0x118)][_0x459f88(0xe4)](_0x52fb8d))[_0x459f88(0x11c)](),'unitId':_0x52fb8d,'threadId':_0x17c23c,'mention':_0x3b7c35,'content':_0x56466e,'replyId':_0xcefc8a},_0x599a24=await this['_httpService'][_0x459f88(0x102)]('/universer-api/comment/unit/'+_0x52fb8d+_0x459f88(0xd6),{'body':_0x260f37});return!_0x599a24[_0x459f88(0x13f)][_0x459f88(0xd7)]||_0x599a24['body'][_0x459f88(0xd7)][_0x459f88(0x150)]===0x1;}async['resolveComment'](_0x11c00f){const _0x33d39f=_0x307b38,{unitId:_0x504d6a}=_0x11c00f,_0x52d740=_0x11c00f[_0x33d39f(0xdb)],_0x2b7ea3={'memberId':this[_0x33d39f(0x125)][_0x33d39f(0x144)]()[_0x33d39f(0xee)],'unitId':_0x504d6a,'threadId':_0x52d740,'solved':_0x11c00f[_0x33d39f(0x14b)]?_0x1b8961[_0x33d39f(0x10f)]:_0x1b8961[_0x33d39f(0xf2)]},_0x1675b8=await this[_0x33d39f(0x136)][_0x33d39f(0x102)](_0x33d39f(0xe5)+_0x504d6a+_0x33d39f(0x13a),{'body':_0x2b7ea3});return!_0x1675b8[_0x33d39f(0x13f)][_0x33d39f(0xd7)]||_0x1675b8[_0x33d39f(0x13f)][_0x33d39f(0xd7)][_0x33d39f(0x150)]===0x1;}async[_0x307b38(0xd5)](_0x2f66f2,_0xec20e8,_0x54bcd7,_0x2571d9){const _0x5e555a=_0x307b38,_0x1e8e6f={'memberId':(await this[_0x5e555a(0x118)][_0x5e555a(0xe4)](_0x2f66f2))[_0x5e555a(0x11c)](),'threadId':_0x54bcd7,'replyId':_0x2571d9,'unitId':_0x2f66f2},_0x4b90c0=await this[_0x5e555a(0x136)]['post'](_0x5e555a(0xe5)+_0x2f66f2+_0x5e555a(0xd0),{'body':_0x1e8e6f});return!_0x4b90c0[_0x5e555a(0x13f)][_0x5e555a(0xd7)]||_0x4b90c0[_0x5e555a(0x13f)][_0x5e555a(0xd7)][_0x5e555a(0x150)]===0x1;}async[_0x307b38(0x122)](_0x553527,_0x33975a,_0x2e4fd5){const _0x483703=_0x307b38,_0x22dc05={'unitId':_0x553527,'threadId':_0x2e4fd5},_0x20b655=await this[_0x483703(0x136)][_0x483703(0x102)]('/universer-api/comment/unit/'+_0x553527+_0x483703(0x107),{'body':_0x22dc05}),_0x2ff633=_0x2e4fd5[_0x483703(0x14a)](_0x12b870=>_0x4838de(_0x20b655[_0x483703(0x13f)][_0x483703(0x134)][_0x12b870],_0x553527,_0x33975a))[_0x483703(0xf0)](Boolean);return Object[_0x483703(0x135)](_0x20b655[_0x483703(0x13f)]['users'])[_0x483703(0x137)](_0x38b0e5=>{const _0x282cfe=_0x483703;this[_0x282cfe(0x125)][_0x282cfe(0x149)](_0x38b0e5);}),_0x2ff633;}[_0x307b38(0x12b)](_0x244ccb){const _0x1c7ea7=_0x307b38;return{'id':_0x244ccb['id'],'threadId':_0x244ccb['threadId'],'ref':_0x244ccb[_0x1c7ea7(0xe6)]};}};_0x1d1a6a=_0x22caad([_0x3c845c(0x0,_0x3e4368[_0x307b38(0xc6)](_0x567a93['HTTPService'])),_0x3c845c(0x1,_0x3e4368['Inject'](_0x3e4368['UserManagerService'])),_0x3c845c(0x2,_0x3e4368[_0x307b38(0xc6)](_0x1c91d7[_0x307b38(0xcf)]))],_0x1d1a6a);var _0x5ef8e1=Object[_0x307b38(0x12a)],_0x468072=(_0x5d73da,_0x2affaf,_0x27b624,_0x1cb375)=>{for(var _0x321916=_0x1cb375>0x1?void 0x0:_0x1cb375?_0x5ef8e1(_0x2affaf,_0x27b624):_0x2affaf,_0x1545ab=_0x5d73da['length']-0x1,_0x4ffb36;_0x1545ab>=0x0;_0x1545ab--)(_0x4ffb36=_0x5d73da[_0x1545ab])&&(_0x321916=_0x4ffb36(_0x321916)||_0x321916);return _0x321916;},_0x50cfa6=(_0x438f13,_0x11e92b)=>(_0x58e50c,_0x1e1afd)=>_0x11e92b(_0x58e50c,_0x1e1afd,_0x438f13);let _0xbd0b48=class extends _0x3e4368[_0x307b38(0x14e)]{constructor(_0x40545f,_0x818a41){const _0x577778=_0x307b38;super(),this[_0x577778(0xf4)]=_0x40545f,this[_0x577778(0x112)]=_0x818a41,this[_0x577778(0xe8)]();}[_0x307b38(0xe8)](){const _0x1ef6ce=_0x307b38;this[_0x1ef6ce(0xf4)][_0x1ef6ce(0xd3)]=this['_threadCommentDataSource'],this[_0x1ef6ce(0xf4)]['syncUpdateMutationToColla']=!0x1;}};_0xbd0b48=_0x468072([_0x50cfa6(0x0,_0x39bcb2[_0x307b38(0x106)]),_0x50cfa6(0x1,_0x3e4368['Inject'](_0x1d1a6a))],_0xbd0b48);var _0x5a9dd1=Object[_0x307b38(0x13c)],_0x104a55=Object[_0x307b38(0x12a)],_0x52a195=(_0x772605,_0x2d444f,_0x5e6938)=>_0x2d444f in _0x772605?_0x5a9dd1(_0x772605,_0x2d444f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e6938}):_0x772605[_0x2d444f]=_0x5e6938,_0x2d7dd7=(_0x4e6c84,_0x5a43cd,_0x3adf6c,_0x54fcfb)=>{for(var _0x5aaef6=_0x54fcfb>0x1?void 0x0:_0x54fcfb?_0x104a55(_0x5a43cd,_0x3adf6c):_0x5a43cd,_0x5754cc=_0x4e6c84['length']-0x1,_0xb7fe61;_0x5754cc>=0x0;_0x5754cc--)(_0xb7fe61=_0x4e6c84[_0x5754cc])&&(_0x5aaef6=_0xb7fe61(_0x5aaef6)||_0x5aaef6);return _0x5aaef6;},_0xeb5f0e=(_0x108d1e,_0x135b13)=>(_0x1db150,_0x4bebc7)=>_0x135b13(_0x1db150,_0x4bebc7,_0x108d1e),_0x572a42=(_0x2061ae,_0x32a520,_0x59dd6c)=>_0x52a195(_0x2061ae,typeof _0x32a520!=_0x307b38(0x116)?_0x32a520+'':_0x32a520,_0x59dd6c);_0x3041a1['UniverThreadCommentDataSourcePlugin']=class extends _0x3e4368[_0x307b38(0xf8)]{constructor(_0x570fba=_0x4350f3,_0x82bf48,_0x1673a3){const _0x3ed5cb=_0x307b38;super(),this[_0x3ed5cb(0xed)]=_0x570fba,this['_injector']=_0x82bf48,this[_0x3ed5cb(0x119)]=_0x1673a3;const {..._0x23a79a}=_0x3e4368[_0x3ed5cb(0xf1)]({},_0x4350f3,this[_0x3ed5cb(0xed)]);this[_0x3ed5cb(0x119)]['setConfig'](_0x381f78,_0x23a79a);}[_0x307b38(0x127)](){const _0x585fc6=_0x307b38;[[_0x1d1a6a],[_0xbd0b48],[_0x1b1de7]][_0x585fc6(0x137)](_0x58d0f1=>{const _0x4e4917=_0x585fc6;this[_0x4e4917(0x129)][_0x4e4917(0xe1)](_0x58d0f1);});}[_0x307b38(0x12f)](){const _0x3228db=_0x307b38;this['_injector'][_0x3228db(0x133)](_0xbd0b48),this[_0x3228db(0x129)]['get'](_0x1b1de7);}},_0x572a42(_0x3041a1[_0x307b38(0x10c)],_0x307b38(0x132),_0x3fc2ff),_0x572a42(_0x3041a1['UniverThreadCommentDataSourcePlugin'],_0x307b38(0x14c),_0x3e4368[_0x307b38(0x145)]['UNIVER_UNKNOWN']),_0x3041a1[_0x307b38(0x10c)]=_0x2d7dd7([_0x3e4368[_0x307b38(0x101)](_0x2c2f02[_0x307b38(0xec)],_0x1c91d7['UniverCollaborationClientPlugin'],_0x3db020[_0x307b38(0xfc)]),_0xeb5f0e(0x1,_0x3e4368['Inject'](_0x3e4368[_0x307b38(0x123)])),_0xeb5f0e(0x2,_0x3e4368[_0x307b38(0x10d)])],_0x3041a1[_0x307b38(0x10c)]),Object[_0x307b38(0x13c)](_0x3041a1,Symbol[_0x307b38(0xf5)],{'value':_0x307b38(0xde)});}));function _0x7464(){const _0x59f0ad=['Module','resolveComment','content','add','user','_commentService','requireSession','/universer-api/comment/unit/','ref','UNRECOGNIZED','_initDataSource','9mULguU','customRanges','HTTPService','UniverThreadCommentUIPlugin','_config','userID','payload','filter','merge','OpenOrReOpen','subscribe','_threadCommentDataSourceService','toStringTag','dayjs','CommentService','Plugin','ThreadCommentModel','UniverThreadCommentUi','object','UniverLicensePlugin','937280nZFYtG','rxjs','766767LHDylP','Delete','DependentOn','post','delete','Solve','4bCWdQm','IThreadCommentDataSourceService','/list','33037ICWAde','find','UniverThreadComment','COMMENT','UniverThreadCommentDataSourcePlugin','IConfigService','addComment','Solved','YYYY/MM/DD\x20HH:mm','unitId','_threadCommentDataSource','comment','getUser','parentId','symbol','solved','_sessionService','_configService','Edit','replies','getMemberID','UserManagerService','users','createTimestamp','CustomRangeType','1168172QLKILw','listComments','Injector','Reply','_userService','@univerjs/network','onStarting','UniverCore','_injector','getOwnPropertyDescriptor','saveCommentToSnapshot','root','stringify','_init','onReady','commentUpdate$','rangeType','pluginName','get','comments','values','_httpService','forEach','3039864AFtMSB','@univerjs-pro/license','/solved','475gttTIe','defineProperty','userId','@univerjs/core','body','_initUserSync','UniverNetwork','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','getCurrentUser','UniverInstanceType','replyId','disposeWithMe','reply','addUser','map','resolved','type','@univerjs/thread-comment-ui','Disposable','updateComment','code','function','Inject','getComment','_threadCommentModel','UniverProCollaborationClient','/universer-api/user/list','length','Unknown','slice','pipe','CollaborationSessionService','/delete','bufferTime','UniverProThreadCommentDatasource','dataSource','parse','deleteComment','/edit','error','161042ZSegWj','7356TYLpMN','thread-comment-data-source.config','threadId','personId','format'];_0x7464=function(){return _0x59f0ad;};return _0x7464();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
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.15.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/network": "0.15.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.5",
|
|
49
|
+
"@univerjs/core": "0.15.5",
|
|
50
|
+
"@univerjs-pro/license": "0.15.5",
|
|
51
|
+
"@univerjs/network": "0.15.5",
|
|
52
|
+
"@univerjs/thread-comment": "0.15.5",
|
|
52
53
|
"@univerjs/protocol": "0.1.48",
|
|
53
|
-
"@univerjs/thread-comment": "0.15.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.4"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
60
|
"vitest": "^4.0.18",
|
|
61
|
-
"@univerjs-infra/shared": "0.15.
|
|
61
|
+
"@univerjs-infra/shared": "0.15.5"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|