@univerjs-pro/thread-comment-datasource 0.10.14-nightly.202511031023 → 0.10.14-nightly.202511070628
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x15b9b=_0x4a85;(function(_0x4c3cb3,_0x227c0d){const _0x168e70=_0x4a85,_0x43fb31=_0x4c3cb3();while(!![]){try{const _0x23be81=parseInt(_0x168e70(0xe0))/0x1+-parseInt(_0x168e70(0x9a))/0x2+parseInt(_0x168e70(0xdd))/0x3+-parseInt(_0x168e70(0xe1))/0x4*(parseInt(_0x168e70(0xd7))/0x5)+-parseInt(_0x168e70(0x8f))/0x6+-parseInt(_0x168e70(0xb2))/0x7+-parseInt(_0x168e70(0xd3))/0x8*(-parseInt(_0x168e70(0xdb))/0x9);if(_0x23be81===_0x227c0d)break;else _0x43fb31['push'](_0x43fb31['shift']());}catch(_0x45387f){_0x43fb31['push'](_0x43fb31['shift']());}}}(_0x2341,0xc48df));function _0x4a85(_0x3b1787,_0x3c382d){const _0x2341f4=_0x2341();return _0x4a85=function(_0x4a8504,_0x11b554){_0x4a8504=_0x4a8504-0x86;let _0x146be7=_0x2341f4[_0x4a8504];return _0x146be7;},_0x4a85(_0x3b1787,_0x3c382d);}Object[_0x15b9b(0xde)](exports,Symbol['toStringTag'],{'value':_0x15b9b(0xa7)});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=_0x15b9b(0xca);var I=(_0x4dff67=>(_0x4dff67[_0x4dff67['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4dff67[_0x4dff67['Solved']=0x1]='Solved',_0x4dff67[_0x4dff67[_0x15b9b(0xfc)]=-0x1]='UNRECOGNIZED',_0x4dff67))(I||{}),v=(_0x374be8=>(_0x374be8[_0x374be8[_0x15b9b(0xb4)]=0x0]='Unknown',_0x374be8[_0x374be8[_0x15b9b(0xee)]=0x1]='Add',_0x374be8[_0x374be8[_0x15b9b(0x90)]=0x2]=_0x15b9b(0x90),_0x374be8[_0x374be8[_0x15b9b(0xe6)]=0x3]='Edit',_0x374be8[_0x374be8['Delete']=0x4]=_0x15b9b(0xd4),_0x374be8[_0x374be8[_0x15b9b(0xac)]=0x5]=_0x15b9b(0xac),_0x374be8[_0x374be8[_0x15b9b(0xfc)]=-0x1]='UNRECOGNIZED',_0x374be8))(v||{});const f=_0x427a6c=>c['dayjs'](new Date(+_0x427a6c))[_0x15b9b(0xe2)](_0x15b9b(0xeb)),R=async(_0x4f366b,_0x27c272)=>{const _0x2a440e=_0x15b9b,_0x5201ef=_0x4f366b['get'](c[_0x2a440e(0xb8)]),_0xf0f2bb=_0x4f366b['get'](P[_0x2a440e(0xd0)]);_0x27c272['forEach'](_0x1e2872=>{const _0x48c61d=_0x2a440e;_0x5201ef['getUser'](_0x1e2872)&&_0x27c272[_0x48c61d(0xf4)](_0x1e2872);}),_0x27c272[_0x2a440e(0xf0)]&&(await _0xf0f2bb[_0x2a440e(0xe9)](_0x2a440e(0xa9),{'params':{'userIDs':[..._0x27c272]}}))[_0x2a440e(0xfb)][_0x2a440e(0x8a)][_0x2a440e(0x9d)](_0x417172=>{const _0x424db1=_0x2a440e;_0x417172&&_0x5201ef[_0x424db1(0xcb)](_0x417172);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5c2657,_0x52215f,_0x59d2ba,_0x310c72)=>{const _0x16421f=_0x15b9b;for(var _0x355267=_0x310c72>0x1?void 0x0:_0x310c72?$(_0x52215f,_0x59d2ba):_0x52215f,_0x1c1c86=_0x5c2657[_0x16421f(0x89)]-0x1,_0x621f51;_0x1c1c86>=0x0;_0x1c1c86--)(_0x621f51=_0x5c2657[_0x1c1c86])&&(_0x355267=_0x621f51(_0x355267)||_0x355267);return _0x355267;},S=(_0x56fbac,_0x31d263)=>(_0x18c60b,_0x116bee)=>_0x31d263(_0x18c60b,_0x116bee,_0x56fbac);let _=class extends c[_0x15b9b(0xf5)]{constructor(_0x25bffa,_0x154bb6,_0x383346,_0x2bb78c){const _0x5b673c=_0x15b9b;super(),this['_commentService']=_0x25bffa,this[_0x5b673c(0x8d)]=_0x154bb6,this[_0x5b673c(0xd5)]=_0x383346,this[_0x5b673c(0xdf)]=_0x2bb78c,this[_0x5b673c(0xa3)](),this[_0x5b673c(0xf9)]();}[_0x15b9b(0xf9)](){const _0x301a22=_0x15b9b;this[_0x301a22(0xaf)](this[_0x301a22(0x8d)]['commentUpdate$'][_0x301a22(0xd1)](j[_0x301a22(0x8c)](0x10))[_0x301a22(0x91)](_0x932ce=>{const _0xe5c60b=_0x301a22,_0x530265=new Set();_0x932ce[_0xe5c60b(0x9d)](_0x477a6f=>{const _0x5ed81a=_0xe5c60b;switch(_0x477a6f[_0x5ed81a(0xef)]){case _0x5ed81a(0xe7):{const _0x591d9f=_0x477a6f[_0x5ed81a(0x96)]['personId'];_0x530265[_0x5ed81a(0xe7)](_0x591d9f);break;}}}),R(this[_0xe5c60b(0xdf)],_0x530265);}));}[_0x15b9b(0xa3)](){const _0x111493=_0x15b9b;this[_0x111493(0xaf)](this[_0x111493(0xf3)][_0x111493(0xb3)][_0x111493(0x91)](async _0x38e9a9=>{const _0x441576=_0x111493;var _0x37a802,_0xfd35a2,_0xa29160,_0x262058;const _0x46bd0e=(_0x37a802=this[_0x441576(0x8d)][_0x441576(0xc5)](_0x38e9a9['unitId'])[_0x441576(0xb9)](_0x24f139=>_0x24f139[_0x441576(0x8e)]===_0x38e9a9[_0x441576(0x8e)]))==null?void 0x0:_0x37a802[_0x441576(0xd8)];if(!_0x46bd0e)return;const {unitId:_0xee3bda,subUnitId:_0x395f42}=_0x46bd0e;switch(_0x38e9a9[_0x441576(0xe3)]&&this[_0x441576(0xd5)]['addUser'](_0x38e9a9[_0x441576(0xe3)]),_0x38e9a9[_0x441576(0xef)]){case v['Add']:break;case v[_0x441576(0x90)]:{this['_threadCommentModel'][_0x441576(0xe4)](_0xee3bda,_0x395f42,{'unitId':_0xee3bda,'subUnitId':_0x395f42,'ref':'','id':_0x38e9a9[_0x441576(0xa5)],'dT':f(+_0x38e9a9[_0x441576(0xd2)]),'threadId':_0x38e9a9[_0x441576(0x8e)],'personId':(_0xa29160=(_0xfd35a2=_0x38e9a9[_0x441576(0xe3)])==null?void 0x0:_0xfd35a2[_0x441576(0xaa)])!=null?_0xa29160:_0x38e9a9['userId'],'text':JSON[_0x441576(0xf6)](_0x38e9a9[_0x441576(0xbf)]),'parentId':_0x46bd0e['id']});break;}case v[_0x441576(0xd4)]:{const _0x2a43ef=this[_0x441576(0x8d)]['getComment'](_0xee3bda,_0x395f42,_0x38e9a9['replyId']);_0x2a43ef&&_0x2a43ef[_0x441576(0xc7)]&&this['_threadCommentModel'][_0x441576(0xad)](_0xee3bda,_0x395f42,_0x38e9a9[_0x441576(0xa5)]);break;}case v[_0x441576(0xe6)]:{this[_0x441576(0x8d)][_0x441576(0xa0)](_0xee3bda,_0x395f42,{'commentId':_0x38e9a9[_0x441576(0xa5)],'text':JSON[_0x441576(0xf6)](_0x38e9a9[_0x441576(0xbf)])});break;}case v[_0x441576(0xac)]:{const _0x9d5e37=(_0x262058=this[_0x441576(0x8d)][_0x441576(0xc5)](_0x38e9a9[_0x441576(0x9b)])[_0x441576(0xb9)](_0x319323=>_0x319323[_0x441576(0x8e)]===_0x38e9a9[_0x441576(0x8e)]))==null?void 0x0:_0x262058['root'];_0x9d5e37&&this[_0x441576(0x8d)][_0x441576(0xdc)](_0xee3bda,_0x395f42,_0x9d5e37['id'],_0x38e9a9[_0x441576(0xa4)]===I[_0x441576(0x88)]);break;}}}));}};_=E([S(0x0,c[_0x15b9b(0xb5)](b[_0x15b9b(0xa2)])),S(0x1,c[_0x15b9b(0xb5)](M[_0x15b9b(0x93)])),S(0x2,c[_0x15b9b(0xb5)](c['UserManagerService'])),S(0x3,c[_0x15b9b(0xb5)](c[_0x15b9b(0xfa)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x15b9b(0xcf)],x=(_0x5b8313,_0x2a1109,_0x92a24c,_0x54291e)=>{for(var _0x5d201b=_0x54291e>0x1?void 0x0:_0x54291e?A(_0x2a1109,_0x92a24c):_0x2a1109,_0x53655c=_0x5b8313['length']-0x1,_0x238430;_0x53655c>=0x0;_0x53655c--)(_0x238430=_0x5b8313[_0x53655c])&&(_0x5d201b=_0x238430(_0x5d201b)||_0x5d201b);return _0x5d201b;},C=(_0x1e672c,_0x39f138)=>(_0x21c14e,_0x10263e)=>_0x39f138(_0x21c14e,_0x10263e,_0x1e672c);function Y(_0x45abeb,_0x2f442e){const _0x28c45d=_0x15b9b,_0xd5990d=_0x45abeb[_0x28c45d(0xa6)][0x0];return{..._0x2f442e,'id':_0xd5990d[_0x28c45d(0xa5)],'resolved':_0x45abeb[_0x28c45d(0xa4)]===0x1,'dT':f(_0xd5990d['createTimestamp']),'personId':_0xd5990d[_0x28c45d(0xf1)],'threadId':_0xd5990d[_0x28c45d(0x8e)]};}function G(_0x4991a2,_0x1f493c,_0x32863e){const _0x18cfa4=_0x15b9b;var _0x1328ec,_0x6e73c5;if(((_0x6e73c5=(_0x1328ec=_0x4991a2==null?void 0x0:_0x4991a2[_0x18cfa4(0xa6)])==null?void 0x0:_0x1328ec['length'])!=null?_0x6e73c5:0x0)>0x0){const _0x29fc78=(_0x5b25d1,_0x3c3261)=>({'id':_0x5b25d1[_0x18cfa4(0xa5)],'threadId':_0x5b25d1[_0x18cfa4(0x8e)],'dT':f(_0x5b25d1[_0x18cfa4(0xd2)]),'personId':_0x5b25d1[_0x18cfa4(0xf1)],'resolved':_0x4991a2[_0x18cfa4(0xa4)]===I[_0x18cfa4(0x88)],'unitId':_0x1f493c,'subUnitId':_0x32863e,'text':JSON['parse'](_0x5b25d1[_0x18cfa4(0xbf)]),'parentId':_0x3c3261}),_0x8328=_0x29fc78(_0x4991a2[_0x18cfa4(0xa6)][0x0]);return{..._0x8328,'children':_0x4991a2[_0x18cfa4(0xa6)][_0x18cfa4(0x86)](0x1)[_0x18cfa4(0xb7)](_0x2bc51a=>_0x29fc78(_0x2bc51a,_0x8328['id']))};}return null;}let p=class{constructor(_0x1954d7,_0xc83714,_0x1e1d12){const _0x4c8aae=_0x15b9b;this['_httpService']=_0x1954d7,this[_0x4c8aae(0xd5)]=_0xc83714,this[_0x4c8aae(0xb0)]=_0x1e1d12;}async[_0x15b9b(0xe4)](_0x14862b){const _0x290bb4=_0x15b9b;var _0x55c9f3,_0x31223b;const {parentId:_0x1cbee6,unitId:_0x397bf3,text:_0xfe79d,threadId:_0x30c0e8}=_0x14862b,_0x30519c=(_0x31223b=(_0x55c9f3=_0xfe79d['customRanges'])==null?void 0x0:_0x55c9f3[_0x290bb4(0xf8)](_0x447ae8=>_0x447ae8[_0x290bb4(0x98)]===c['CustomRangeType']['COMMENT'])[_0x290bb4(0xb7)](_0x21cc8a=>_0x21cc8a['rangeId']))!=null?_0x31223b:[],_0x4a2731=JSON[_0x290bb4(0xcc)](_0xfe79d),_0x4eadb4=(await this[_0x290bb4(0xb0)][_0x290bb4(0xd9)](_0x397bf3))[_0x290bb4(0xbe)]();if(_0x1cbee6){const _0x284ac4={'memberId':_0x4eadb4,'unitId':_0x397bf3,'content':_0x4a2731,'mention':_0x30519c,'threadId':_0x30c0e8},_0x358c4d=(await this[_0x290bb4(0xc0)]['post']('/universer-api/comment/unit/'+_0x397bf3+'/reply',{'body':_0x284ac4}))['body'][_0x290bb4(0xc6)];return{..._0x14862b,'id':_0x358c4d[_0x290bb4(0xa5)],'dT':c['dayjs'](+_0x358c4d[_0x290bb4(0xd2)])[_0x290bb4(0xe2)](_0x290bb4(0xeb)),'personId':_0x358c4d[_0x290bb4(0xf1)]};}else{const _0x259870={'memberId':_0x4eadb4,'unitId':_0x397bf3,'content':_0x4a2731,'mention':_0x30519c},_0xc19c8b=await this[_0x290bb4(0xc0)][_0x290bb4(0xc8)]('/universer-api/comment/unit/'+_0x397bf3+_0x290bb4(0xec),{'body':_0x259870});return Y(_0xc19c8b[_0x290bb4(0xfb)]['comment'],_0x14862b);}}async['updateComment'](_0x3a87d3){const _0x100b26=_0x15b9b;var _0x3549bf,_0x5cded1;const {text:_0x25f562,unitId:_0x2cbe56}=_0x3a87d3,_0x10074f=(_0x5cded1=(_0x3549bf=_0x25f562[_0x100b26(0xa1)])==null?void 0x0:_0x3549bf[_0x100b26(0xf8)](_0x1468e3=>_0x1468e3[_0x100b26(0x98)]===c[_0x100b26(0xc1)][_0x100b26(0xbc)])[_0x100b26(0xb7)](_0xbfbba=>_0xbfbba[_0x100b26(0xc3)]))!=null?_0x5cded1:[],_0x464dbd=JSON[_0x100b26(0xcc)](_0x25f562),_0x3105a8=_0x3a87d3[_0x100b26(0x8e)],_0x17b18c=_0x3a87d3['id'],_0x234d49={'memberId':(await this['_sessionService'][_0x100b26(0xd9)](_0x2cbe56))[_0x100b26(0xbe)](),'unitId':_0x2cbe56,'threadId':_0x3105a8,'mention':_0x10074f,'content':_0x464dbd,'replyId':_0x17b18c},_0x5a92b4=await this[_0x100b26(0xc0)][_0x100b26(0xc8)](_0x100b26(0x8b)+_0x2cbe56+_0x100b26(0x87),{'body':_0x234d49});return!_0x5a92b4[_0x100b26(0xfb)][_0x100b26(0x94)]||_0x5a92b4[_0x100b26(0xfb)][_0x100b26(0x94)][_0x100b26(0x9e)]===0x1;}async[_0x15b9b(0xdc)](_0x571b6f){const _0x3cca69=_0x15b9b,{unitId:_0x268727}=_0x571b6f,_0x58d404=_0x571b6f['threadId'],_0x5c76db={'memberId':this['_userService'][_0x3cca69(0xfd)]()[_0x3cca69(0xaa)],'unitId':_0x268727,'threadId':_0x58d404,'solved':_0x571b6f[_0x3cca69(0xba)]?I[_0x3cca69(0x88)]:I[_0x3cca69(0xc2)]},_0x30c7db=await this['_httpService']['post'](_0x3cca69(0x8b)+_0x268727+_0x3cca69(0xbd),{'body':_0x5c76db});return!_0x30c7db[_0x3cca69(0xfb)][_0x3cca69(0x94)]||_0x30c7db[_0x3cca69(0xfb)][_0x3cca69(0x94)]['code']===0x1;}async['deleteComment'](_0xf8ec3,_0x54c810,_0x195352,_0x1a7896){const _0x6343a3=_0x15b9b,_0x2408fd={'memberId':(await this[_0x6343a3(0xb0)][_0x6343a3(0xd9)](_0xf8ec3))[_0x6343a3(0xbe)](),'threadId':_0x195352,'replyId':_0x1a7896,'unitId':_0xf8ec3},_0x2528d9=await this[_0x6343a3(0xc0)][_0x6343a3(0xc8)]('/universer-api/comment/unit/'+_0xf8ec3+_0x6343a3(0xcd),{'body':_0x2408fd});return!_0x2528d9[_0x6343a3(0xfb)][_0x6343a3(0x94)]||_0x2528d9[_0x6343a3(0xfb)][_0x6343a3(0x94)][_0x6343a3(0x9e)]===0x1;}async['listComments'](_0x7ce9bc,_0x55c43a,_0x3480ae){const _0x20145f=_0x15b9b,_0x3b4ee9={'unitId':_0x7ce9bc,'threadId':_0x3480ae},_0xf77cb8=await this[_0x20145f(0xc0)][_0x20145f(0xc8)]('/universer-api/comment/unit/'+_0x7ce9bc+_0x20145f(0xda),{'body':_0x3b4ee9}),_0x83f84c=_0x3480ae[_0x20145f(0xb7)](_0x5f38d5=>G(_0xf77cb8[_0x20145f(0xfb)][_0x20145f(0xa8)][_0x5f38d5],_0x7ce9bc,_0x55c43a))[_0x20145f(0xf8)](Boolean);return Object[_0x20145f(0x97)](_0xf77cb8[_0x20145f(0xfb)][_0x20145f(0x8a)])[_0x20145f(0x9d)](_0x37108a=>{const _0x489ef3=_0x20145f;this[_0x489ef3(0xd5)]['addUser'](_0x37108a);}),_0x83f84c;}[_0x15b9b(0x95)](_0x377ad4){const _0xb82de4=_0x15b9b;return{'id':_0x377ad4['id'],'threadId':_0x377ad4[_0xb82de4(0x8e)],'ref':_0x377ad4[_0xb82de4(0xe5)]};}};p=x([C(0x0,c[_0x15b9b(0xb5)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x15b9b(0xb8)])),C(0x2,c[_0x15b9b(0xb5)](b[_0x15b9b(0xce)]))],p);var H=Object[_0x15b9b(0xcf)],J=(_0xc84b0d,_0x3ae1c3,_0x1de8d7,_0x12bef5)=>{const _0x3bd7de=_0x15b9b;for(var _0x172d9c=_0x12bef5>0x1?void 0x0:_0x12bef5?H(_0x3ae1c3,_0x1de8d7):_0x3ae1c3,_0x364b3c=_0xc84b0d[_0x3bd7de(0x89)]-0x1,_0x407de2;_0x364b3c>=0x0;_0x364b3c--)(_0x407de2=_0xc84b0d[_0x364b3c])&&(_0x172d9c=_0x407de2(_0x172d9c)||_0x172d9c);return _0x172d9c;},y=(_0x3737de,_0x2c57b5)=>(_0x5dc008,_0x5e5f47)=>_0x2c57b5(_0x5dc008,_0x5e5f47,_0x3737de);let g=class extends c[_0x15b9b(0xf5)]{constructor(_0x435a96,_0x4ec96c){const _0x53d277=_0x15b9b;super(),this['_threadCommentDataSourceService']=_0x435a96,this[_0x53d277(0xc9)]=_0x4ec96c,this[_0x53d277(0xd6)]();}['_initDataSource'](){const _0x8b03e2=_0x15b9b;this['_threadCommentDataSourceService']['dataSource']=this[_0x8b03e2(0xc9)],this[_0x8b03e2(0xea)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x15b9b(0x99)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x15b9b(0xde)],L=Object[_0x15b9b(0xcf)],Z=(_0x3e01ff,_0x177cef,_0x334ed7)=>_0x177cef in _0x3e01ff?F(_0x3e01ff,_0x177cef,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x334ed7}):_0x3e01ff[_0x177cef]=_0x334ed7,W=(_0x4039b8,_0x41d1cb,_0x5ed1ce,_0x3d9c9a)=>{for(var _0x5404a9=_0x3d9c9a>0x1?void 0x0:_0x3d9c9a?L(_0x41d1cb,_0x5ed1ce):_0x41d1cb,_0x4f2532=_0x4039b8['length']-0x1,_0x12f6c9;_0x4f2532>=0x0;_0x4f2532--)(_0x12f6c9=_0x4039b8[_0x4f2532])&&(_0x5404a9=_0x12f6c9(_0x5404a9)||_0x5404a9);return _0x5404a9;},O=(_0x5e3df8,_0x189f34)=>(_0x43200b,_0x5c407b)=>_0x189f34(_0x43200b,_0x5c407b,_0x5e3df8),N=(_0xb76e23,_0x17779b,_0x5f1bab)=>Z(_0xb76e23,typeof _0x17779b!='symbol'?_0x17779b+'':_0x17779b,_0x5f1bab);exports[_0x15b9b(0xb6)]=class extends c['Plugin']{constructor(_0x1adb21=D,_0x19332c,_0x55c81c){const _0x83b769=_0x15b9b;super(),this[_0x83b769(0x92)]=_0x1adb21,this[_0x83b769(0xdf)]=_0x19332c,this['_configService']=_0x55c81c;const {..._0x168696}=c['merge']({},D,this[_0x83b769(0x92)]);this[_0x83b769(0xe8)][_0x83b769(0xae)](q,_0x168696);}[_0x15b9b(0xf2)](){[[p],[g],[_]]['forEach'](_0x13243a=>{const _0x3a8ca5=_0x4a85;this[_0x3a8ca5(0xdf)][_0x3a8ca5(0xe7)](_0x13243a);});}[_0x15b9b(0xc4)](){const _0x594201=_0x15b9b;this['_injector'][_0x594201(0xe9)](g),this['_injector'][_0x594201(0xe9)](_);}},N(exports[_0x15b9b(0xb6)],_0x15b9b(0x9c),U),N(exports[_0x15b9b(0xb6)],_0x15b9b(0xef),c[_0x15b9b(0x9f)][_0x15b9b(0xb1)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x15b9b(0xf7)](w[_0x15b9b(0xab)],b[_0x15b9b(0xbb)],T[_0x15b9b(0xed)]),O(0x1,c[_0x15b9b(0xb5)](c[_0x15b9b(0xfa)])),O(0x2,c['IConfigService'])],exports[_0x15b9b(0xb6)]);function _0x2341(){const _0x240c03=['bufferTime','_threadCommentModel','threadId','3068646pMOcWg','Reply','subscribe','_config','ThreadCommentModel','error','saveCommentToSnapshot','payload','values','rangeType','IThreadCommentDataSourceService','1627184nrHaeg','unitId','pluginName','forEach','code','UniverInstanceType','updateComment','customRanges','CommentService','_init','solved','replyId','replies','Module','comments','/universer-api/user/list','userID','UniverThreadCommentUIPlugin','Solve','deleteComment','setConfig','disposeWithMe','_sessionService','UNIVER_UNKNOWN','654227tiQEYU','commentUpdate$','Unknown','Inject','UniverThreadCommentDataSourcePlugin','map','UserManagerService','find','resolved','UniverCollaborationClientPlugin','COMMENT','/solved','getMemberID','content','_httpService','CustomRangeType','OpenOrReOpen','rangeId','onReady','getUnit','reply','parentId','post','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','stringify','/delete','CollaborationSessionService','getOwnPropertyDescriptor','HTTPService','pipe','createTimestamp','1240BibvSt','Delete','_userService','_initDataSource','199685QNcQSJ','root','requireSession','/list','65115pPbBKl','resolveComment','1452687QDArQP','defineProperty','_injector','737738BeMYJy','12vhfLTv','format','user','addComment','ref','Edit','add','_configService','get','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','/add','UniverLicensePlugin','Add','type','size','userId','onStarting','_commentService','delete','Disposable','parse','DependentOn','filter','_initUserSync','Injector','body','UNRECOGNIZED','getCurrentUser','slice','/edit','Solved','length','users','/universer-api/comment/unit/'];_0x2341=function(){return _0x240c03;};return _0x2341();}
|
|
1
|
+
'use strict';const _0x342f94=_0x42c0;(function(_0x3ad902,_0x25431a){const _0x251bd3=_0x42c0,_0x510ba4=_0x3ad902();while(!![]){try{const _0x1ba60e=-parseInt(_0x251bd3(0x119))/0x1+parseInt(_0x251bd3(0xc4))/0x2+parseInt(_0x251bd3(0xbd))/0x3+-parseInt(_0x251bd3(0x108))/0x4*(parseInt(_0x251bd3(0x126))/0x5)+parseInt(_0x251bd3(0xba))/0x6*(-parseInt(_0x251bd3(0xef))/0x7)+-parseInt(_0x251bd3(0x101))/0x8*(-parseInt(_0x251bd3(0xf7))/0x9)+parseInt(_0x251bd3(0xc7))/0xa*(parseInt(_0x251bd3(0xcf))/0xb);if(_0x1ba60e===_0x25431a)break;else _0x510ba4['push'](_0x510ba4['shift']());}catch(_0xbc93ce){_0x510ba4['push'](_0x510ba4['shift']());}}}(_0x4a57,0x9a06f));function _0x4a57(){const _0x580f18=['deleteComment','values','Delete','customRanges','disposeWithMe','syncUpdateMutationToColla','342294jXOHYw','body','Unknown','141990uThtAR','UniverLicensePlugin','_commentService','add','get','user','parse','/list','110MkzvME','merge','getUnit','error','UniverCollaborationClientPlugin','forEach','symbol','parentId','setConfig','dayjs','format','_threadCommentModel','replyId','filter','_config','Module','_sessionService','_injector','createTimestamp','map','replies','onStarting','_initDataSource','type','_threadCommentDataSourceService','personId','slice','pipe','UNIVER_UNKNOWN','comment','UNRECOGNIZED','/universer-api/user/list','84063zhJVft','threadId','Edit','users','Reply','subscribe','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','3849201OREWHu','listComments','comments','userId','Solve','/delete','post','saveCommentToSnapshot','UniverInstanceType','CustomRangeType','8likdHl','UserManagerService','COMMENT','requireSession','Solved','userID','_configService','764LHUjFI','IConfigService','_httpService','rangeId','thread-comment-data-source.config','rangeType','getOwnPropertyDescriptor','HTTPService','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','unitId','addUser','dataSource','getMemberID','_userService','solved','145635ueIZbM','Add','getUser','addComment','size','find','commentUpdate$','content','_init','updateComment','getComment','Disposable','Plugin','28485CRiVBe','Inject','stringify','/edit','IThreadCommentDataSourceService','length','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','6ZcHLCB','payload','ThreadCommentModel','3407520NHsqMv'];_0x4a57=function(){return _0x580f18;};return _0x4a57();}Object[_0x342f94(0x112)](exports,Symbol['toStringTag'],{'value':_0x342f94(0xde)});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=_0x342f94(0x111);var I=(_0x6087d6=>(_0x6087d6[_0x6087d6['OpenOrReOpen']=0x0]=_0x342f94(0xf6),_0x6087d6[_0x6087d6[_0x342f94(0x105)]=0x1]='Solved',_0x6087d6[_0x6087d6[_0x342f94(0xed)]=-0x1]='UNRECOGNIZED',_0x6087d6))(I||{}),v=(_0xc43163=>(_0xc43163[_0xc43163[_0x342f94(0xc6)]=0x0]=_0x342f94(0xc6),_0xc43163[_0xc43163['Add']=0x1]=_0x342f94(0x11a),_0xc43163[_0xc43163[_0x342f94(0xf3)]=0x2]=_0x342f94(0xf3),_0xc43163[_0xc43163['Edit']=0x3]='Edit',_0xc43163[_0xc43163[_0x342f94(0xc0)]=0x4]=_0x342f94(0xc0),_0xc43163[_0xc43163[_0x342f94(0xfb)]=0x5]='Solve',_0xc43163[_0xc43163['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xc43163))(v||{});const f=_0x1dc30d=>c[_0x342f94(0xd8)](new Date(+_0x1dc30d))['format'](_0x342f94(0xb8)),R=async(_0x1e15ea,_0x549c7e)=>{const _0x5a330b=_0x342f94,_0x98a944=_0x1e15ea[_0x5a330b(0xcb)](c['UserManagerService']),_0x2f8418=_0x1e15ea[_0x5a330b(0xcb)](P[_0x5a330b(0x10f)]);_0x549c7e[_0x5a330b(0xd4)](_0x40729f=>{const _0x3cdce5=_0x5a330b;_0x98a944[_0x3cdce5(0x11b)](_0x40729f)&&_0x549c7e['delete'](_0x40729f);}),_0x549c7e[_0x5a330b(0x11d)]&&(await _0x2f8418[_0x5a330b(0xcb)](_0x5a330b(0xee),{'params':{'userIDs':[..._0x549c7e]}}))['body']['users']['forEach'](_0x3b18b6=>{const _0x15a3b6=_0x5a330b;_0x3b18b6&&_0x98a944[_0x15a3b6(0x114)](_0x3b18b6);});};var $=Object[_0x342f94(0x10e)],E=(_0x4d870b,_0xa58e17,_0x588729,_0x994d61)=>{const _0x2efe83=_0x342f94;for(var _0x5ebc1b=_0x994d61>0x1?void 0x0:_0x994d61?$(_0xa58e17,_0x588729):_0xa58e17,_0x19e4a3=_0x4d870b[_0x2efe83(0xb6)]-0x1,_0x280e53;_0x19e4a3>=0x0;_0x19e4a3--)(_0x280e53=_0x4d870b[_0x19e4a3])&&(_0x5ebc1b=_0x280e53(_0x5ebc1b)||_0x5ebc1b);return _0x5ebc1b;},S=(_0x51a2c5,_0x5ea9d4)=>(_0xa42c2a,_0x15457c)=>_0x5ea9d4(_0xa42c2a,_0x15457c,_0x51a2c5);let _=class extends c[_0x342f94(0x124)]{constructor(_0x3ec86c,_0x49b1f6,_0x2ebd8b,_0x3e9335){const _0x3064ff=_0x342f94;super(),this[_0x3064ff(0xc9)]=_0x3ec86c,this[_0x3064ff(0xda)]=_0x49b1f6,this[_0x3064ff(0x117)]=_0x2ebd8b,this[_0x3064ff(0xe0)]=_0x3e9335,this[_0x3064ff(0x121)](),this['_initUserSync']();}['_initUserSync'](){const _0x4e7462=_0x342f94;this[_0x4e7462(0xc2)](this[_0x4e7462(0xda)][_0x4e7462(0x11f)][_0x4e7462(0xea)](j['bufferTime'](0x10))[_0x4e7462(0xf4)](_0x3a4b29=>{const _0x3d445c=_0x4e7462,_0x10e27e=new Set();_0x3a4b29[_0x3d445c(0xd4)](_0x20afc7=>{const _0x507818=_0x3d445c;switch(_0x20afc7[_0x507818(0xe6)]){case _0x507818(0xca):{const _0x42bd71=_0x20afc7[_0x507818(0xbb)][_0x507818(0xe8)];_0x10e27e[_0x507818(0xca)](_0x42bd71);break;}}}),R(this['_injector'],_0x10e27e);}));}['_init'](){const _0x16414f=_0x342f94;this[_0x16414f(0xc2)](this[_0x16414f(0xc9)][_0x16414f(0x11f)][_0x16414f(0xf4)](async _0x5df3a1=>{const _0x428a1b=_0x16414f;var _0x1c62d0,_0xd6831d,_0x45df3f,_0x3a4cf1;const _0x30c1c0=(_0x1c62d0=this['_threadCommentModel'][_0x428a1b(0xd1)](_0x5df3a1['unitId'])['find'](_0x5bbc08=>_0x5bbc08[_0x428a1b(0xf0)]===_0x5df3a1[_0x428a1b(0xf0)]))==null?void 0x0:_0x1c62d0['root'];if(!_0x30c1c0)return;const {unitId:_0x2ea6c0,subUnitId:_0x4ad073}=_0x30c1c0;switch(_0x5df3a1['user']&&this[_0x428a1b(0x117)][_0x428a1b(0x114)](_0x5df3a1[_0x428a1b(0xcc)]),_0x5df3a1['type']){case v[_0x428a1b(0x11a)]:break;case v[_0x428a1b(0xf3)]:{this['_threadCommentModel']['addComment'](_0x2ea6c0,_0x4ad073,{'unitId':_0x2ea6c0,'subUnitId':_0x4ad073,'ref':'','id':_0x5df3a1[_0x428a1b(0xdb)],'dT':f(+_0x5df3a1[_0x428a1b(0xe1)]),'threadId':_0x5df3a1['threadId'],'personId':(_0x45df3f=(_0xd6831d=_0x5df3a1[_0x428a1b(0xcc)])==null?void 0x0:_0xd6831d[_0x428a1b(0x106)])!=null?_0x45df3f:_0x5df3a1[_0x428a1b(0xfa)],'text':JSON[_0x428a1b(0xcd)](_0x5df3a1[_0x428a1b(0x120)]),'parentId':_0x30c1c0['id']});break;}case v['Delete']:{const _0x25e9df=this[_0x428a1b(0xda)][_0x428a1b(0x123)](_0x2ea6c0,_0x4ad073,_0x5df3a1[_0x428a1b(0xdb)]);_0x25e9df&&_0x25e9df[_0x428a1b(0xd6)]&&this[_0x428a1b(0xda)][_0x428a1b(0xbe)](_0x2ea6c0,_0x4ad073,_0x5df3a1[_0x428a1b(0xdb)]);break;}case v[_0x428a1b(0xf1)]:{this[_0x428a1b(0xda)][_0x428a1b(0x122)](_0x2ea6c0,_0x4ad073,{'commentId':_0x5df3a1['replyId'],'text':JSON[_0x428a1b(0xcd)](_0x5df3a1[_0x428a1b(0x120)])});break;}case v[_0x428a1b(0xfb)]:{const _0x38b1b2=(_0x3a4cf1=this[_0x428a1b(0xda)]['getUnit'](_0x5df3a1[_0x428a1b(0x113)])[_0x428a1b(0x11e)](_0x498e20=>_0x498e20[_0x428a1b(0xf0)]===_0x5df3a1[_0x428a1b(0xf0)]))==null?void 0x0:_0x3a4cf1['root'];_0x38b1b2&&this[_0x428a1b(0xda)]['resolveComment'](_0x2ea6c0,_0x4ad073,_0x38b1b2['id'],_0x5df3a1[_0x428a1b(0x118)]===I[_0x428a1b(0x105)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c['Inject'](M[_0x342f94(0xbc)])),S(0x2,c['Inject'](c[_0x342f94(0x102)])),S(0x3,c[_0x342f94(0x127)](c['Injector']))],_);const q=_0x342f94(0x10c),D={};var A=Object[_0x342f94(0x10e)],x=(_0x481df1,_0x58892b,_0x2632be,_0x435ac0)=>{for(var _0x484daf=_0x435ac0>0x1?void 0x0:_0x435ac0?A(_0x58892b,_0x2632be):_0x58892b,_0x5d5bc7=_0x481df1['length']-0x1,_0x2a801d;_0x5d5bc7>=0x0;_0x5d5bc7--)(_0x2a801d=_0x481df1[_0x5d5bc7])&&(_0x484daf=_0x2a801d(_0x484daf)||_0x484daf);return _0x484daf;},C=(_0x2cd9d8,_0x22f673)=>(_0x116658,_0x30cc23)=>_0x22f673(_0x116658,_0x30cc23,_0x2cd9d8);function Y(_0x76ed73,_0x5846f8){const _0x1614be=_0x342f94,_0x555754=_0x76ed73[_0x1614be(0xe3)][0x0];return{..._0x5846f8,'id':_0x555754[_0x1614be(0xdb)],'resolved':_0x76ed73[_0x1614be(0x118)]===0x1,'dT':f(_0x555754[_0x1614be(0xe1)]),'personId':_0x555754[_0x1614be(0xfa)],'threadId':_0x555754['threadId']};}function G(_0x166dd0,_0x337348,_0x16b361){const _0x1312af=_0x342f94;var _0x4b59ef,_0xd95dd2;if(((_0xd95dd2=(_0x4b59ef=_0x166dd0==null?void 0x0:_0x166dd0[_0x1312af(0xe3)])==null?void 0x0:_0x4b59ef['length'])!=null?_0xd95dd2:0x0)>0x0){const _0x395c80=(_0x11830d,_0x546ffa)=>({'id':_0x11830d[_0x1312af(0xdb)],'threadId':_0x11830d['threadId'],'dT':f(_0x11830d['createTimestamp']),'personId':_0x11830d[_0x1312af(0xfa)],'resolved':_0x166dd0['solved']===I[_0x1312af(0x105)],'unitId':_0x337348,'subUnitId':_0x16b361,'text':JSON[_0x1312af(0xcd)](_0x11830d[_0x1312af(0x120)]),'parentId':_0x546ffa}),_0x54a749=_0x395c80(_0x166dd0[_0x1312af(0xe3)][0x0]);return{..._0x54a749,'children':_0x166dd0[_0x1312af(0xe3)][_0x1312af(0xe9)](0x1)[_0x1312af(0xe2)](_0x142241=>_0x395c80(_0x142241,_0x54a749['id']))};}return null;}let p=class{constructor(_0x43a6f9,_0x19e74f,_0x95e090){const _0x304b34=_0x342f94;this[_0x304b34(0x10a)]=_0x43a6f9,this[_0x304b34(0x117)]=_0x19e74f,this[_0x304b34(0xdf)]=_0x95e090;}async[_0x342f94(0x11c)](_0x33bc5){const _0x14f5bb=_0x342f94;var _0x40a94a,_0x2e6c32;const {parentId:_0x2e1c22,unitId:_0x5e8974,text:_0x2846b7,threadId:_0x275720}=_0x33bc5,_0x41a107=(_0x2e6c32=(_0x40a94a=_0x2846b7[_0x14f5bb(0xc1)])==null?void 0x0:_0x40a94a[_0x14f5bb(0xdc)](_0xbe35e5=>_0xbe35e5[_0x14f5bb(0x10d)]===c[_0x14f5bb(0x100)][_0x14f5bb(0x103)])['map'](_0x577c65=>_0x577c65[_0x14f5bb(0x10b)]))!=null?_0x2e6c32:[],_0x270cae=JSON[_0x14f5bb(0xb3)](_0x2846b7),_0x5daf65=(await this[_0x14f5bb(0xdf)][_0x14f5bb(0x104)](_0x5e8974))[_0x14f5bb(0x116)]();if(_0x2e1c22){const _0x1c5c45={'memberId':_0x5daf65,'unitId':_0x5e8974,'content':_0x270cae,'mention':_0x41a107,'threadId':_0x275720},_0x37fc9c=(await this['_httpService'][_0x14f5bb(0xfd)](_0x14f5bb(0xb9)+_0x5e8974+'/reply',{'body':_0x1c5c45}))['body']['reply'];return{..._0x33bc5,'id':_0x37fc9c['replyId'],'dT':c[_0x14f5bb(0xd8)](+_0x37fc9c['createTimestamp'])[_0x14f5bb(0xd9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37fc9c[_0x14f5bb(0xfa)]};}else{const _0x567fe0={'memberId':_0x5daf65,'unitId':_0x5e8974,'content':_0x270cae,'mention':_0x41a107},_0x308042=await this['_httpService'][_0x14f5bb(0xfd)]('/universer-api/comment/unit/'+_0x5e8974+'/add',{'body':_0x567fe0});return Y(_0x308042['body'][_0x14f5bb(0xec)],_0x33bc5);}}async['updateComment'](_0x4b3ee9){const _0xfedabd=_0x342f94;var _0x2da1ac,_0x56eea2;const {text:_0xb8c13a,unitId:_0x55431a}=_0x4b3ee9,_0x39022c=(_0x56eea2=(_0x2da1ac=_0xb8c13a[_0xfedabd(0xc1)])==null?void 0x0:_0x2da1ac[_0xfedabd(0xdc)](_0x5a5a68=>_0x5a5a68['rangeType']===c[_0xfedabd(0x100)][_0xfedabd(0x103)])['map'](_0x1dd82f=>_0x1dd82f[_0xfedabd(0x10b)]))!=null?_0x56eea2:[],_0x1441cb=JSON[_0xfedabd(0xb3)](_0xb8c13a),_0x25c9a9=_0x4b3ee9[_0xfedabd(0xf0)],_0x3cddfa=_0x4b3ee9['id'],_0x3e1ef3={'memberId':(await this[_0xfedabd(0xdf)][_0xfedabd(0x104)](_0x55431a))[_0xfedabd(0x116)](),'unitId':_0x55431a,'threadId':_0x25c9a9,'mention':_0x39022c,'content':_0x1441cb,'replyId':_0x3cddfa},_0x48d29a=await this[_0xfedabd(0x10a)][_0xfedabd(0xfd)]('/universer-api/comment/unit/'+_0x55431a+_0xfedabd(0xb4),{'body':_0x3e1ef3});return!_0x48d29a['body'][_0xfedabd(0xd2)]||_0x48d29a[_0xfedabd(0xc5)][_0xfedabd(0xd2)]['code']===0x1;}async['resolveComment'](_0x14e882){const _0x5cda04=_0x342f94,{unitId:_0x1a877f}=_0x14e882,_0x434bc5=_0x14e882['threadId'],_0x18ecc5={'memberId':this[_0x5cda04(0x117)]['getCurrentUser']()[_0x5cda04(0x106)],'unitId':_0x1a877f,'threadId':_0x434bc5,'solved':_0x14e882['resolved']?I[_0x5cda04(0x105)]:I[_0x5cda04(0xf6)]},_0x5a588b=await this[_0x5cda04(0x10a)][_0x5cda04(0xfd)](_0x5cda04(0xb9)+_0x1a877f+'/solved',{'body':_0x18ecc5});return!_0x5a588b[_0x5cda04(0xc5)]['error']||_0x5a588b[_0x5cda04(0xc5)][_0x5cda04(0xd2)]['code']===0x1;}async['deleteComment'](_0x446f9d,_0x3f009a,_0x14d9d7,_0x52b2c9){const _0x231b31=_0x342f94,_0x5ae7b2={'memberId':(await this[_0x231b31(0xdf)]['requireSession'](_0x446f9d))[_0x231b31(0x116)](),'threadId':_0x14d9d7,'replyId':_0x52b2c9,'unitId':_0x446f9d},_0x86cc9a=await this[_0x231b31(0x10a)]['post'](_0x231b31(0xb9)+_0x446f9d+_0x231b31(0xfc),{'body':_0x5ae7b2});return!_0x86cc9a[_0x231b31(0xc5)]['error']||_0x86cc9a['body'][_0x231b31(0xd2)]['code']===0x1;}async[_0x342f94(0xf8)](_0x3ff78c,_0x41e6ed,_0x23de14){const _0x53a34c=_0x342f94,_0x3d5efb={'unitId':_0x3ff78c,'threadId':_0x23de14},_0x59e830=await this[_0x53a34c(0x10a)][_0x53a34c(0xfd)](_0x53a34c(0xb9)+_0x3ff78c+_0x53a34c(0xce),{'body':_0x3d5efb}),_0x39c2d0=_0x23de14['map'](_0x155492=>G(_0x59e830[_0x53a34c(0xc5)][_0x53a34c(0xf9)][_0x155492],_0x3ff78c,_0x41e6ed))[_0x53a34c(0xdc)](Boolean);return Object[_0x53a34c(0xbf)](_0x59e830[_0x53a34c(0xc5)][_0x53a34c(0xf2)])[_0x53a34c(0xd4)](_0x3d50a2=>{const _0x3e44ae=_0x53a34c;this[_0x3e44ae(0x117)][_0x3e44ae(0x114)](_0x3d50a2);}),_0x39c2d0;}[_0x342f94(0xfe)](_0x10f101){return{'id':_0x10f101['id'],'threadId':_0x10f101['threadId'],'ref':_0x10f101['ref']};}};function _0x42c0(_0x3e69d0,_0x1ebf15){const _0x4a575d=_0x4a57();return _0x42c0=function(_0x42c0b4,_0xed804f){_0x42c0b4=_0x42c0b4-0xb3;let _0x519f2e=_0x4a575d[_0x42c0b4];return _0x519f2e;},_0x42c0(_0x3e69d0,_0x1ebf15);}p=x([C(0x0,c['Inject'](P[_0x342f94(0x10f)])),C(0x1,c[_0x342f94(0x127)](c['UserManagerService'])),C(0x2,c[_0x342f94(0x127)](b['CollaborationSessionService']))],p);var H=Object[_0x342f94(0x10e)],J=(_0x92fa4e,_0x10a10a,_0x4da55f,_0xdc810b)=>{const _0x14d69f=_0x342f94;for(var _0x55e283=_0xdc810b>0x1?void 0x0:_0xdc810b?H(_0x10a10a,_0x4da55f):_0x10a10a,_0x5269ed=_0x92fa4e[_0x14d69f(0xb6)]-0x1,_0x194630;_0x5269ed>=0x0;_0x5269ed--)(_0x194630=_0x92fa4e[_0x5269ed])&&(_0x55e283=_0x194630(_0x55e283)||_0x55e283);return _0x55e283;},y=(_0x26bdca,_0x43d06d)=>(_0x324775,_0x5b5ec6)=>_0x43d06d(_0x324775,_0x5b5ec6,_0x26bdca);let g=class extends c[_0x342f94(0x124)]{constructor(_0x3e675c,_0x41b5d1){const _0xa4c11f=_0x342f94;super(),this['_threadCommentDataSourceService']=_0x3e675c,this[_0xa4c11f(0xb7)]=_0x41b5d1,this['_initDataSource']();}[_0x342f94(0xe5)](){const _0x3898a3=_0x342f94;this[_0x3898a3(0xe7)][_0x3898a3(0x115)]=this[_0x3898a3(0xb7)],this[_0x3898a3(0xe7)][_0x3898a3(0xc3)]=!0x1;}};g=J([y(0x0,M[_0x342f94(0xb5)]),y(0x1,c[_0x342f94(0x127)](p))],g);var F=Object[_0x342f94(0x112)],L=Object[_0x342f94(0x10e)],Z=(_0x276f60,_0x53124f,_0xd2b8e8)=>_0x53124f in _0x276f60?F(_0x276f60,_0x53124f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd2b8e8}):_0x276f60[_0x53124f]=_0xd2b8e8,W=(_0x191e94,_0x38eb9d,_0xd07e57,_0x98efb1)=>{const _0x228b62=_0x342f94;for(var _0x261cde=_0x98efb1>0x1?void 0x0:_0x98efb1?L(_0x38eb9d,_0xd07e57):_0x38eb9d,_0x2fb9db=_0x191e94[_0x228b62(0xb6)]-0x1,_0x216069;_0x2fb9db>=0x0;_0x2fb9db--)(_0x216069=_0x191e94[_0x2fb9db])&&(_0x261cde=_0x216069(_0x261cde)||_0x261cde);return _0x261cde;},O=(_0x11375e,_0x14fef1)=>(_0x105beb,_0x2aa54b)=>_0x14fef1(_0x105beb,_0x2aa54b,_0x11375e),N=(_0x2bc4a6,_0x60092,_0x3ee51f)=>Z(_0x2bc4a6,typeof _0x60092!=_0x342f94(0xd5)?_0x60092+'':_0x60092,_0x3ee51f);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x342f94(0x125)]{constructor(_0x3ff9a3=D,_0x2fdaf0,_0x4c9416){const _0x36bec7=_0x342f94;super(),this[_0x36bec7(0xdd)]=_0x3ff9a3,this[_0x36bec7(0xe0)]=_0x2fdaf0,this[_0x36bec7(0x107)]=_0x4c9416;const {..._0x5b6018}=c[_0x36bec7(0xd0)]({},D,this['_config']);this['_configService'][_0x36bec7(0xd7)](q,_0x5b6018);}[_0x342f94(0xe4)](){[[p],[g],[_]]['forEach'](_0x23724f=>{const _0x26f2ad=_0x42c0;this['_injector'][_0x26f2ad(0xca)](_0x23724f);});}['onReady'](){const _0xe4434=_0x342f94;this[_0xe4434(0xe0)]['get'](g),this[_0xe4434(0xe0)]['get'](_);}},N(exports[_0x342f94(0xf5)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x342f94(0xff)][_0x342f94(0xeb)]),exports[_0x342f94(0xf5)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0x342f94(0xd3)],T[_0x342f94(0xc8)]),O(0x1,c[_0x342f94(0x127)](c[_0x342f94(0x110)])),O(0x2,c[_0x342f94(0x109)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e32a6=_0x1527;(function(_0x576f75,_0x597d5c){const _0xbbb47=_0x1527,_0x51a384=_0x576f75();while(!![]){try{const _0x28747e=-parseInt(_0xbbb47(0x158))/0x1+-parseInt(_0xbbb47(0x15b))/0x2*(-parseInt(_0xbbb47(0x149))/0x3)+parseInt(_0xbbb47(0x12a))/0x4+-parseInt(_0xbbb47(0x124))/0x5+-parseInt(_0xbbb47(0x140))/0x6+parseInt(_0xbbb47(0x134))/0x7*(parseInt(_0xbbb47(0x166))/0x8)+-parseInt(_0xbbb47(0x14b))/0x9;if(_0x28747e===_0x597d5c)break;else _0x51a384['push'](_0x51a384['shift']());}catch(_0x49908f){_0x51a384['push'](_0x51a384['shift']());}}}(_0x5744,0x8962e));import{CommentService as _0x25684e,CollaborationSessionService as _0x2bbd11,UniverCollaborationClientPlugin as _0x1b6345}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46806d}from'@univerjs-pro/license';import{dayjs as _0x2edf0d,UserManagerService as _0x5aa83d,Inject as _0x8aec6c,Injector as _0x420fd5,Disposable as _0x3b1f59,CustomRangeType as _0x174598,UniverInstanceType as _0x32f188,DependentOn as _0xde6bbc,IConfigService as _0x5457f3,Plugin as _0x154e10,merge as _0x58cf97}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40ed92}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28c6d4,IThreadCommentDataSourceService as _0x10cad0}from'@univerjs/thread-comment';function _0x5744(){const _0xc65ce1=['get','rangeId','UNIVER_UNKNOWN','4936854iyprYn','replies','/solved','UNRECOGNIZED','_initUserSync','stringify','_threadCommentDataSourceService','map','content','6WdOCQj','_sessionService','80991ivKRnW','Reply','getUnit','threadId','userID','subscribe','requireSession','pipe','Add','unitId','comments','/universer-api/comment/unit/','personId','412548DNPYxH','addComment','customRanges','580518ofzqmj','payload','_threadCommentDataSource','pluginName','deleteComment','_initDataSource','updateComment','ref','Solve','setConfig','_threadCommentModel','3863752rphgZd','/universer-api/user/list','length','_configService','_commentService','parse','createTimestamp','type','disposeWithMe','rangeType','_config','forEach','filter','symbol','solved','parentId','Delete','resolveComment','Edit','getMemberID','error','addUser','userId','/reply','thread-comment-data-source.config','_init','40685KOzWbe','getComment','post','replyId','Solved','onStarting','3006960QngLPk','dataSource','code','_httpService','root','getOwnPropertyDescriptor','COMMENT','_injector','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7VxxVPZ','getCurrentUser','_userService','users','find','/delete','YYYY/MM/DD\x20HH:mm','resolved','body'];_0x5744=function(){return _0xc65ce1;};return _0x5744();}import{bufferTime as _0x1604bb}from'rxjs';import{HTTPService as _0x45a61b}from'@univerjs/network';const W=_0x5e32a6(0x133);var I=(_0x295eca=>(_0x295eca[_0x295eca['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x295eca[_0x295eca[_0x5e32a6(0x128)]=0x1]=_0x5e32a6(0x128),_0x295eca[_0x295eca['UNRECOGNIZED']=-0x1]=_0x5e32a6(0x143),_0x295eca))(I||{}),v=(_0x69ded0=>(_0x69ded0[_0x69ded0['Unknown']=0x0]='Unknown',_0x69ded0[_0x69ded0['Add']=0x1]=_0x5e32a6(0x153),_0x69ded0[_0x69ded0['Reply']=0x2]='Reply',_0x69ded0[_0x69ded0[_0x5e32a6(0x178)]=0x3]='Edit',_0x69ded0[_0x69ded0[_0x5e32a6(0x176)]=0x4]=_0x5e32a6(0x176),_0x69ded0[_0x69ded0['Solve']=0x5]=_0x5e32a6(0x163),_0x69ded0[_0x69ded0[_0x5e32a6(0x143)]=-0x1]=_0x5e32a6(0x143),_0x69ded0))(v||{});const y=_0x889282=>_0x2edf0d(new Date(+_0x889282))['format'](_0x5e32a6(0x13a)),B=async(_0x19f1f5,_0x4f2b4d)=>{const _0x40bb14=_0x5e32a6,_0x532d9d=_0x19f1f5[_0x40bb14(0x13d)](_0x5aa83d),_0x5966b8=_0x19f1f5[_0x40bb14(0x13d)](_0x45a61b);_0x4f2b4d['forEach'](_0x321241=>{_0x532d9d['getUser'](_0x321241)&&_0x4f2b4d['delete'](_0x321241);}),_0x4f2b4d['size']&&(await _0x5966b8[_0x40bb14(0x13d)](_0x40bb14(0x167),{'params':{'userIDs':[..._0x4f2b4d]}}))[_0x40bb14(0x13c)][_0x40bb14(0x137)][_0x40bb14(0x171)](_0x4b71d9=>{const _0xcbe019=_0x40bb14;_0x4b71d9&&_0x532d9d[_0xcbe019(0x17b)](_0x4b71d9);});};var K=Object[_0x5e32a6(0x12f)],V=(_0x42be3f,_0x26c26c,_0x438ce0,_0x1042eb)=>{for(var _0x68bff4=_0x1042eb>0x1?void 0x0:_0x1042eb?K(_0x26c26c,_0x438ce0):_0x26c26c,_0x3d6a4f=_0x42be3f['length']-0x1,_0x48086a;_0x3d6a4f>=0x0;_0x3d6a4f--)(_0x48086a=_0x42be3f[_0x3d6a4f])&&(_0x68bff4=_0x48086a(_0x68bff4)||_0x68bff4);return _0x68bff4;},p=(_0x1362be,_0x511fd5)=>(_0x3bb22f,_0x1c9d7c)=>_0x511fd5(_0x3bb22f,_0x1c9d7c,_0x1362be);let _=class extends _0x3b1f59{constructor(_0x39ba44,_0x9a3566,_0x342bd1,_0x2b13f1){const _0x48a700=_0x5e32a6;super(),this['_commentService']=_0x39ba44,this[_0x48a700(0x165)]=_0x9a3566,this[_0x48a700(0x136)]=_0x342bd1,this[_0x48a700(0x131)]=_0x2b13f1,this[_0x48a700(0x17f)](),this[_0x48a700(0x144)]();}[_0x5e32a6(0x144)](){const _0xb98ddb=_0x5e32a6;this[_0xb98ddb(0x16e)](this[_0xb98ddb(0x165)]['commentUpdate$'][_0xb98ddb(0x152)](_0x1604bb(0x10))['subscribe'](_0x5616cb=>{const _0x46ff7e=_0xb98ddb,_0xdcc87d=new Set();_0x5616cb[_0x46ff7e(0x171)](_0x39229b=>{const _0x1c05b1=_0x46ff7e;switch(_0x39229b['type']){case'add':{const _0x299bdb=_0x39229b[_0x1c05b1(0x15c)][_0x1c05b1(0x157)];_0xdcc87d['add'](_0x299bdb);break;}}}),B(this[_0x46ff7e(0x131)],_0xdcc87d);}));}[_0x5e32a6(0x17f)](){const _0x4a2190=_0x5e32a6;this[_0x4a2190(0x16e)](this[_0x4a2190(0x16a)]['commentUpdate$'][_0x4a2190(0x150)](async _0x523b79=>{const _0x3322b3=_0x4a2190;var _0x51e1c5,_0x3b775e,_0x2e7f18,_0x3288b3;const _0x30c7d8=(_0x51e1c5=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])[_0x3322b3(0x138)](_0x5405e8=>_0x5405e8['threadId']===_0x523b79[_0x3322b3(0x14e)]))==null?void 0x0:_0x51e1c5[_0x3322b3(0x12e)];if(!_0x30c7d8)return;const {unitId:_0x3da1c2,subUnitId:_0x5e04c7}=_0x30c7d8;switch(_0x523b79['user']&&this[_0x3322b3(0x136)][_0x3322b3(0x17b)](_0x523b79['user']),_0x523b79[_0x3322b3(0x16d)]){case v[_0x3322b3(0x153)]:break;case v[_0x3322b3(0x14c)]:{this['_threadCommentModel'][_0x3322b3(0x159)](_0x3da1c2,_0x5e04c7,{'unitId':_0x3da1c2,'subUnitId':_0x5e04c7,'ref':'','id':_0x523b79[_0x3322b3(0x127)],'dT':y(+_0x523b79[_0x3322b3(0x16c)]),'threadId':_0x523b79[_0x3322b3(0x14e)],'personId':(_0x2e7f18=(_0x3b775e=_0x523b79['user'])==null?void 0x0:_0x3b775e[_0x3322b3(0x14f)])!=null?_0x2e7f18:_0x523b79[_0x3322b3(0x17c)],'text':JSON[_0x3322b3(0x16b)](_0x523b79['content']),'parentId':_0x30c7d8['id']});break;}case v[_0x3322b3(0x176)]:{const _0x392871=this['_threadCommentModel'][_0x3322b3(0x125)](_0x3da1c2,_0x5e04c7,_0x523b79[_0x3322b3(0x127)]);_0x392871&&_0x392871[_0x3322b3(0x175)]&&this['_threadCommentModel'][_0x3322b3(0x15f)](_0x3da1c2,_0x5e04c7,_0x523b79['replyId']);break;}case v[_0x3322b3(0x178)]:{this[_0x3322b3(0x165)]['updateComment'](_0x3da1c2,_0x5e04c7,{'commentId':_0x523b79['replyId'],'text':JSON[_0x3322b3(0x16b)](_0x523b79[_0x3322b3(0x148)])});break;}case v[_0x3322b3(0x163)]:{const _0x5650f9=(_0x3288b3=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])['find'](_0x3234fb=>_0x3234fb[_0x3322b3(0x14e)]===_0x523b79['threadId']))==null?void 0x0:_0x3288b3[_0x3322b3(0x12e)];_0x5650f9&&this[_0x3322b3(0x165)][_0x3322b3(0x177)](_0x3da1c2,_0x5e04c7,_0x5650f9['id'],_0x523b79[_0x3322b3(0x174)]===I['Solved']);break;}}}));}};function _0x1527(_0x1f3476,_0x4afaac){const _0x57447b=_0x5744();return _0x1527=function(_0x15279a,_0x5df83e){_0x15279a=_0x15279a-0x124;let _0x2ce626=_0x57447b[_0x15279a];return _0x2ce626;},_0x1527(_0x1f3476,_0x4afaac);}_=V([p(0x0,_0x8aec6c(_0x25684e)),p(0x1,_0x8aec6c(_0x28c6d4)),p(0x2,_0x8aec6c(_0x5aa83d)),p(0x3,_0x8aec6c(_0x420fd5))],_);const z=_0x5e32a6(0x17e),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x37fbf3,_0xf94518,_0x547663,_0x4505c3)=>{const _0x17919b=_0x5e32a6;for(var _0x26948a=_0x4505c3>0x1?void 0x0:_0x4505c3?k(_0xf94518,_0x547663):_0xf94518,_0x1da55f=_0x37fbf3[_0x17919b(0x168)]-0x1,_0x5367b3;_0x1da55f>=0x0;_0x1da55f--)(_0x5367b3=_0x37fbf3[_0x1da55f])&&(_0x26948a=_0x5367b3(_0x26948a)||_0x26948a);return _0x26948a;},b=(_0x2ff711,_0x161673)=>(_0x3b5f35,_0x483f37)=>_0x161673(_0x3b5f35,_0x483f37,_0x2ff711);function X(_0x3f5d1a,_0x33a645){const _0x3cf677=_0x5e32a6,_0x16cb49=_0x3f5d1a[_0x3cf677(0x141)][0x0];return{..._0x33a645,'id':_0x16cb49[_0x3cf677(0x127)],'resolved':_0x3f5d1a[_0x3cf677(0x174)]===0x1,'dT':y(_0x16cb49[_0x3cf677(0x16c)]),'personId':_0x16cb49[_0x3cf677(0x17c)],'threadId':_0x16cb49[_0x3cf677(0x14e)]};}function ee(_0x58e7b5,_0x485195,_0x3ef9b2){const _0x21539b=_0x5e32a6;var _0x7094ff,_0x11792a;if(((_0x11792a=(_0x7094ff=_0x58e7b5==null?void 0x0:_0x58e7b5[_0x21539b(0x141)])==null?void 0x0:_0x7094ff[_0x21539b(0x168)])!=null?_0x11792a:0x0)>0x0){const _0x43aadb=(_0x37f35d,_0x1a6c94)=>({'id':_0x37f35d[_0x21539b(0x127)],'threadId':_0x37f35d[_0x21539b(0x14e)],'dT':y(_0x37f35d['createTimestamp']),'personId':_0x37f35d[_0x21539b(0x17c)],'resolved':_0x58e7b5[_0x21539b(0x174)]===I[_0x21539b(0x128)],'unitId':_0x485195,'subUnitId':_0x3ef9b2,'text':JSON[_0x21539b(0x16b)](_0x37f35d[_0x21539b(0x148)]),'parentId':_0x1a6c94}),_0x3b2690=_0x43aadb(_0x58e7b5[_0x21539b(0x141)][0x0]);return{..._0x3b2690,'children':_0x58e7b5[_0x21539b(0x141)]['slice'](0x1)['map'](_0x2c9d8e=>_0x43aadb(_0x2c9d8e,_0x3b2690['id']))};}return null;}let S=class{constructor(_0x301656,_0xd6e9d8,_0x1a3b69){const _0x3c5450=_0x5e32a6;this[_0x3c5450(0x12d)]=_0x301656,this[_0x3c5450(0x136)]=_0xd6e9d8,this[_0x3c5450(0x14a)]=_0x1a3b69;}async[_0x5e32a6(0x159)](_0x37bd9f){const _0x25339e=_0x5e32a6;var _0x2c584e,_0x3a776e;const {parentId:_0x3ccaf3,unitId:_0x5bdf04,text:_0x5b49b2,threadId:_0x49c1d1}=_0x37bd9f,_0x474828=(_0x3a776e=(_0x2c584e=_0x5b49b2[_0x25339e(0x15a)])==null?void 0x0:_0x2c584e['filter'](_0x3d3268=>_0x3d3268[_0x25339e(0x16f)]===_0x174598[_0x25339e(0x130)])[_0x25339e(0x147)](_0x13d08a=>_0x13d08a[_0x25339e(0x13e)]))!=null?_0x3a776e:[],_0x1cff83=JSON[_0x25339e(0x145)](_0x5b49b2),_0x41274d=(await this['_sessionService'][_0x25339e(0x151)](_0x5bdf04))['getMemberID']();if(_0x3ccaf3){const _0x1ca8da={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828,'threadId':_0x49c1d1},_0x2c57ac=(await this['_httpService'][_0x25339e(0x126)](_0x25339e(0x156)+_0x5bdf04+_0x25339e(0x17d),{'body':_0x1ca8da}))[_0x25339e(0x13c)][_0x25339e(0x132)];return{..._0x37bd9f,'id':_0x2c57ac[_0x25339e(0x127)],'dT':_0x2edf0d(+_0x2c57ac[_0x25339e(0x16c)])['format'](_0x25339e(0x13a)),'personId':_0x2c57ac[_0x25339e(0x17c)]};}else{const _0x4764d1={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828},_0x4c0bf9=await this['_httpService'][_0x25339e(0x126)]('/universer-api/comment/unit/'+_0x5bdf04+'/add',{'body':_0x4764d1});return X(_0x4c0bf9[_0x25339e(0x13c)]['comment'],_0x37bd9f);}}async[_0x5e32a6(0x161)](_0x2d53e8){const _0x25b168=_0x5e32a6;var _0x291a71,_0x130e6c;const {text:_0x5911e8,unitId:_0x32d139}=_0x2d53e8,_0x260f0c=(_0x130e6c=(_0x291a71=_0x5911e8['customRanges'])==null?void 0x0:_0x291a71[_0x25b168(0x172)](_0x451842=>_0x451842[_0x25b168(0x16f)]===_0x174598['COMMENT'])[_0x25b168(0x147)](_0x4795ac=>_0x4795ac[_0x25b168(0x13e)]))!=null?_0x130e6c:[],_0x2c8165=JSON[_0x25b168(0x145)](_0x5911e8),_0x545c09=_0x2d53e8['threadId'],_0x3a3427=_0x2d53e8['id'],_0x53deb8={'memberId':(await this['_sessionService'][_0x25b168(0x151)](_0x32d139))[_0x25b168(0x179)](),'unitId':_0x32d139,'threadId':_0x545c09,'mention':_0x260f0c,'content':_0x2c8165,'replyId':_0x3a3427},_0xce7a15=await this['_httpService'][_0x25b168(0x126)](_0x25b168(0x156)+_0x32d139+'/edit',{'body':_0x53deb8});return!_0xce7a15['body'][_0x25b168(0x17a)]||_0xce7a15[_0x25b168(0x13c)][_0x25b168(0x17a)][_0x25b168(0x12c)]===0x1;}async[_0x5e32a6(0x177)](_0x5edac0){const _0x255d78=_0x5e32a6,{unitId:_0x3d716c}=_0x5edac0,_0x2548b1=_0x5edac0[_0x255d78(0x14e)],_0x4b2ed5={'memberId':this[_0x255d78(0x136)][_0x255d78(0x135)]()[_0x255d78(0x14f)],'unitId':_0x3d716c,'threadId':_0x2548b1,'solved':_0x5edac0[_0x255d78(0x13b)]?I[_0x255d78(0x128)]:I['OpenOrReOpen']},_0x166857=await this[_0x255d78(0x12d)][_0x255d78(0x126)](_0x255d78(0x156)+_0x3d716c+_0x255d78(0x142),{'body':_0x4b2ed5});return!_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)]||_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)][_0x255d78(0x12c)]===0x1;}async[_0x5e32a6(0x15f)](_0x285f78,_0x17a31b,_0xbc3c93,_0x24f27e){const _0x22d218=_0x5e32a6,_0x56c1ca={'memberId':(await this[_0x22d218(0x14a)]['requireSession'](_0x285f78))['getMemberID'](),'threadId':_0xbc3c93,'replyId':_0x24f27e,'unitId':_0x285f78},_0x45ef9b=await this[_0x22d218(0x12d)][_0x22d218(0x126)](_0x22d218(0x156)+_0x285f78+_0x22d218(0x139),{'body':_0x56c1ca});return!_0x45ef9b[_0x22d218(0x13c)]['error']||_0x45ef9b[_0x22d218(0x13c)][_0x22d218(0x17a)][_0x22d218(0x12c)]===0x1;}async['listComments'](_0x5e148b,_0x30ff39,_0x1dc3f3){const _0x25d90b=_0x5e32a6,_0x111a67={'unitId':_0x5e148b,'threadId':_0x1dc3f3},_0x3c0f91=await this[_0x25d90b(0x12d)][_0x25d90b(0x126)](_0x25d90b(0x156)+_0x5e148b+'/list',{'body':_0x111a67}),_0x1d97c2=_0x1dc3f3['map'](_0xf0818a=>ee(_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x155)][_0xf0818a],_0x5e148b,_0x30ff39))[_0x25d90b(0x172)](Boolean);return Object['values'](_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x137)])['forEach'](_0x4e4889=>{const _0xa9c5f=_0x25d90b;this[_0xa9c5f(0x136)][_0xa9c5f(0x17b)](_0x4e4889);}),_0x1d97c2;}['saveCommentToSnapshot'](_0x5d4d57){const _0x269138=_0x5e32a6;return{'id':_0x5d4d57['id'],'threadId':_0x5d4d57['threadId'],'ref':_0x5d4d57[_0x269138(0x162)]};}};S=Q([b(0x0,_0x8aec6c(_0x45a61b)),b(0x1,_0x8aec6c(_0x5aa83d)),b(0x2,_0x8aec6c(_0x2bbd11))],S);var re=Object[_0x5e32a6(0x12f)],te=(_0x24808f,_0x22912c,_0x503c8d,_0xe6c737)=>{const _0x10318c=_0x5e32a6;for(var _0x156fa6=_0xe6c737>0x1?void 0x0:_0xe6c737?re(_0x22912c,_0x503c8d):_0x22912c,_0x34d903=_0x24808f[_0x10318c(0x168)]-0x1,_0x489b63;_0x34d903>=0x0;_0x34d903--)(_0x489b63=_0x24808f[_0x34d903])&&(_0x156fa6=_0x489b63(_0x156fa6)||_0x156fa6);return _0x156fa6;},M=(_0x37f381,_0x8667e8)=>(_0x12aa6d,_0x3cb248)=>_0x8667e8(_0x12aa6d,_0x3cb248,_0x37f381);let f=class extends _0x3b1f59{constructor(_0x1ba95a,_0x2015da){const _0x5c6e04=_0x5e32a6;super(),this[_0x5c6e04(0x146)]=_0x1ba95a,this[_0x5c6e04(0x15d)]=_0x2015da,this[_0x5c6e04(0x160)]();}['_initDataSource'](){const _0x17c27a=_0x5e32a6;this[_0x17c27a(0x146)][_0x17c27a(0x12b)]=this['_threadCommentDataSource'],this[_0x17c27a(0x146)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x10cad0),M(0x1,_0x8aec6c(S))],f);var se=Object['defineProperty'],oe=Object[_0x5e32a6(0x12f)],ne=(_0x21baf0,_0x5ecae1,_0x190a53)=>_0x5ecae1 in _0x21baf0?se(_0x21baf0,_0x5ecae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x190a53}):_0x21baf0[_0x5ecae1]=_0x190a53,ie=(_0x47e1cb,_0x5aa15a,_0x871f02,_0x3ba956)=>{for(var _0x21417c=_0x3ba956>0x1?void 0x0:_0x3ba956?oe(_0x5aa15a,_0x871f02):_0x5aa15a,_0x224b58=_0x47e1cb['length']-0x1,_0x9de8d1;_0x224b58>=0x0;_0x224b58--)(_0x9de8d1=_0x47e1cb[_0x224b58])&&(_0x21417c=_0x9de8d1(_0x21417c)||_0x21417c);return _0x21417c;},N=(_0x36d118,_0x46e7ef)=>(_0x7006f8,_0x1fdbb7)=>_0x46e7ef(_0x7006f8,_0x1fdbb7,_0x36d118),$=(_0x27cb2d,_0x363a7e,_0x3568df)=>ne(_0x27cb2d,typeof _0x363a7e!=_0x5e32a6(0x173)?_0x363a7e+'':_0x363a7e,_0x3568df);let g=class extends _0x154e10{constructor(_0x189189=O,_0xdff84,_0x5d9eeb){const _0x2ecc0e=_0x5e32a6;super(),this[_0x2ecc0e(0x170)]=_0x189189,this[_0x2ecc0e(0x131)]=_0xdff84,this['_configService']=_0x5d9eeb;const {..._0x1b01b8}=_0x58cf97({},O,this[_0x2ecc0e(0x170)]);this[_0x2ecc0e(0x169)][_0x2ecc0e(0x164)](z,_0x1b01b8);}[_0x5e32a6(0x129)](){const _0x3a4041=_0x5e32a6;[[S],[f],[_]][_0x3a4041(0x171)](_0x109297=>{this['_injector']['add'](_0x109297);});}['onReady'](){const _0x3e3f37=_0x5e32a6;this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](f),this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](_);}};$(g,_0x5e32a6(0x15e),W),$(g,_0x5e32a6(0x16d),_0x32f188[_0x5e32a6(0x13f)]),g=ie([_0xde6bbc(_0x40ed92,_0x1b6345,_0x46806d),N(0x1,_0x8aec6c(_0x420fd5)),N(0x2,_0x5457f3)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x14b4(_0x7e0315,_0x1004b8){const _0x618831=_0x6188();return _0x14b4=function(_0x14b40c,_0x4e4645){_0x14b40c=_0x14b40c-0x1dc;let _0x343784=_0x618831[_0x14b40c];return _0x343784;},_0x14b4(_0x7e0315,_0x1004b8);}function _0x6188(){const _0x4204ed=['reply','comment','_httpService','userId','_userService','/universer-api/comment/unit/','addUser','943004cMETdO','YYYY/MM/DD\x20HH:mm','threadId','rangeType','parentId','pluginName','createTimestamp','requireSession','personId','/universer-api/user/list','ref','/add','find','map','_threadCommentModel','_threadCommentDataSourceService','get','UNRECOGNIZED','3865344CuzDzz','26361BcBHfz','1764679cyhQpn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','11442060UIAjVx','post','body','solved','stringify','pipe','addComment','530072mIVZzE','/edit','filter','unitId','getComment','resolveComment','content','dataSource','forEach','listComments','users','disposeWithMe','saveCommentToSnapshot','3824QfnqAl','replies','subscribe','symbol','onStarting','getOwnPropertyDescriptor','getMemberID','16671072etvSFx','thread-comment-data-source.config','getUser','_initUserSync','/solved','getCurrentUser','length','_threadCommentDataSource','OpenOrReOpen','parse','comments','syncUpdateMutationToColla','_initDataSource','deleteComment','updateComment','/reply','_sessionService','userID','code','_injector','COMMENT','Add','18QNnbBY','_init','Unknown','_config','root','user','_commentService','/delete','Solve','add','UNIVER_UNKNOWN','values','slice','error','Edit','5asvQLP','onReady','Solved','getUnit','4shPorO','resolved','customRanges','type','Delete','format','_configService','rangeId','commentUpdate$','Reply'];_0x6188=function(){return _0x4204ed;};return _0x6188();}const _0x4d2e20=_0x14b4;(function(_0x5dad8e,_0x5c5754){const _0x3c3886=_0x14b4,_0x311165=_0x5dad8e();while(!![]){try{const _0x30bb1e=parseInt(_0x3c3886(0x205))/0x1*(-parseInt(_0x3c3886(0x234))/0x2)+-parseInt(_0x3c3886(0x228))/0x3+-parseInt(_0x3c3886(0x216))/0x4*(parseInt(_0x3c3886(0x201))/0x5)+-parseInt(_0x3c3886(0x1f2))/0x6*(parseInt(_0x3c3886(0x22a))/0x7)+parseInt(_0x3c3886(0x241))/0x8*(parseInt(_0x3c3886(0x229))/0x9)+parseInt(_0x3c3886(0x22d))/0xa+parseInt(_0x3c3886(0x1dc))/0xb;if(_0x30bb1e===_0x5c5754)break;else _0x311165['push'](_0x311165['shift']());}catch(_0x4792fc){_0x311165['push'](_0x311165['shift']());}}}(_0x6188,0xaf952));import{CommentService as _0x33e698,CollaborationSessionService as _0x3b3256,UniverCollaborationClientPlugin as _0xfff223}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x593ad9}from'@univerjs-pro/license';import{dayjs as _0x5dad93,UserManagerService as _0x118a51,Inject as _0x4c6c26,Injector as _0x6d6cf3,Disposable as _0x2793c2,CustomRangeType as _0xafaec,UniverInstanceType as _0xbfac25,DependentOn as _0x5a8c90,IConfigService as _0x136898,Plugin as _0x3692f7,merge as _0x37574b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x39222f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38904e,IThreadCommentDataSourceService as _0x447bb4}from'@univerjs/thread-comment';import{bufferTime as _0x21aca5}from'rxjs';import{HTTPService as _0xd4ec99}from'@univerjs/network';const W=_0x4d2e20(0x22b);var I=(_0xc8bd83=>(_0xc8bd83[_0xc8bd83[_0x4d2e20(0x1e4)]=0x0]='OpenOrReOpen',_0xc8bd83[_0xc8bd83[_0x4d2e20(0x203)]=0x1]=_0x4d2e20(0x203),_0xc8bd83[_0xc8bd83[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0xc8bd83))(I||{}),v=(_0x3c1c33=>(_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f4)]=0x0]=_0x4d2e20(0x1f4),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f1)]=0x1]=_0x4d2e20(0x1f1),_0x3c1c33[_0x3c1c33['Reply']=0x2]=_0x4d2e20(0x20e),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x200)]=0x3]=_0x4d2e20(0x200),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x209)]=0x4]='Delete',_0x3c1c33[_0x3c1c33['Solve']=0x5]=_0x4d2e20(0x1fa),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0x3c1c33))(v||{});const y=_0x5f2023=>_0x5dad93(new Date(+_0x5f2023))[_0x4d2e20(0x20a)](_0x4d2e20(0x217)),B=async(_0xda3c59,_0x27cec2)=>{const _0x3c832e=_0x4d2e20,_0x37ef38=_0xda3c59[_0x3c832e(0x226)](_0x118a51),_0xeaead9=_0xda3c59['get'](_0xd4ec99);_0x27cec2[_0x3c832e(0x23c)](_0x4bfe75=>{const _0x51c883=_0x3c832e;_0x37ef38[_0x51c883(0x1de)](_0x4bfe75)&&_0x27cec2['delete'](_0x4bfe75);}),_0x27cec2['size']&&(await _0xeaead9[_0x3c832e(0x226)](_0x3c832e(0x21f),{'params':{'userIDs':[..._0x27cec2]}}))[_0x3c832e(0x22f)]['users'][_0x3c832e(0x23c)](_0x4a5abd=>{const _0x5d36b1=_0x3c832e;_0x4a5abd&&_0x37ef38[_0x5d36b1(0x215)](_0x4a5abd);});};var K=Object[_0x4d2e20(0x246)],V=(_0x5cbc32,_0x27ce48,_0x177543,_0x273c82)=>{const _0x36e96d=_0x4d2e20;for(var _0x20ccc5=_0x273c82>0x1?void 0x0:_0x273c82?K(_0x27ce48,_0x177543):_0x27ce48,_0x170d9b=_0x5cbc32[_0x36e96d(0x1e2)]-0x1,_0x41b30d;_0x170d9b>=0x0;_0x170d9b--)(_0x41b30d=_0x5cbc32[_0x170d9b])&&(_0x20ccc5=_0x41b30d(_0x20ccc5)||_0x20ccc5);return _0x20ccc5;},p=(_0xaa0075,_0x4811e4)=>(_0x1361c8,_0x244020)=>_0x4811e4(_0x1361c8,_0x244020,_0xaa0075);let _=class extends _0x2793c2{constructor(_0x481362,_0x11b8e5,_0x44660b,_0x150c04){const _0x331783=_0x4d2e20;super(),this[_0x331783(0x1f8)]=_0x481362,this[_0x331783(0x224)]=_0x11b8e5,this[_0x331783(0x213)]=_0x44660b,this[_0x331783(0x1ef)]=_0x150c04,this[_0x331783(0x1f3)](),this[_0x331783(0x1df)]();}[_0x4d2e20(0x1df)](){const _0x15fd57=_0x4d2e20;this['disposeWithMe'](this[_0x15fd57(0x224)][_0x15fd57(0x20d)][_0x15fd57(0x232)](_0x21aca5(0x10))[_0x15fd57(0x243)](_0x5117d1=>{const _0x2bd2ab=_0x15fd57,_0x1c7a5a=new Set();_0x5117d1[_0x2bd2ab(0x23c)](_0x36d6b7=>{const _0x1a4a66=_0x2bd2ab;switch(_0x36d6b7[_0x1a4a66(0x208)]){case _0x1a4a66(0x1fb):{const _0x4f4e0b=_0x36d6b7['payload'][_0x1a4a66(0x21e)];_0x1c7a5a[_0x1a4a66(0x1fb)](_0x4f4e0b);break;}}}),B(this['_injector'],_0x1c7a5a);}));}[_0x4d2e20(0x1f3)](){const _0x14b05f=_0x4d2e20;this[_0x14b05f(0x23f)](this[_0x14b05f(0x1f8)]['commentUpdate$'][_0x14b05f(0x243)](async _0x340bcd=>{const _0x279486=_0x14b05f;var _0x2620b7,_0x7a6136,_0x94bb98,_0x4dc22e;const _0x4e180d=(_0x2620b7=this[_0x279486(0x224)][_0x279486(0x204)](_0x340bcd[_0x279486(0x237)])[_0x279486(0x222)](_0x5ee2e5=>_0x5ee2e5[_0x279486(0x218)]===_0x340bcd[_0x279486(0x218)]))==null?void 0x0:_0x2620b7[_0x279486(0x1f6)];if(!_0x4e180d)return;const {unitId:_0xda18b1,subUnitId:_0x2ac44c}=_0x4e180d;switch(_0x340bcd[_0x279486(0x1f7)]&&this[_0x279486(0x213)][_0x279486(0x215)](_0x340bcd[_0x279486(0x1f7)]),_0x340bcd[_0x279486(0x208)]){case v[_0x279486(0x1f1)]:break;case v[_0x279486(0x20e)]:{this[_0x279486(0x224)][_0x279486(0x233)](_0xda18b1,_0x2ac44c,{'unitId':_0xda18b1,'subUnitId':_0x2ac44c,'ref':'','id':_0x340bcd[_0x279486(0x22c)],'dT':y(+_0x340bcd[_0x279486(0x21c)]),'threadId':_0x340bcd[_0x279486(0x218)],'personId':(_0x94bb98=(_0x7a6136=_0x340bcd['user'])==null?void 0x0:_0x7a6136[_0x279486(0x1ed)])!=null?_0x94bb98:_0x340bcd[_0x279486(0x212)],'text':JSON[_0x279486(0x1e5)](_0x340bcd['content']),'parentId':_0x4e180d['id']});break;}case v['Delete']:{const _0x2d5fe4=this[_0x279486(0x224)][_0x279486(0x238)](_0xda18b1,_0x2ac44c,_0x340bcd[_0x279486(0x22c)]);_0x2d5fe4&&_0x2d5fe4[_0x279486(0x21a)]&&this[_0x279486(0x224)][_0x279486(0x1e9)](_0xda18b1,_0x2ac44c,_0x340bcd['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x279486(0x1ea)](_0xda18b1,_0x2ac44c,{'commentId':_0x340bcd[_0x279486(0x22c)],'text':JSON[_0x279486(0x1e5)](_0x340bcd[_0x279486(0x23a)])});break;}case v['Solve']:{const _0x1712ad=(_0x4dc22e=this[_0x279486(0x224)]['getUnit'](_0x340bcd['unitId'])['find'](_0x3733e2=>_0x3733e2[_0x279486(0x218)]===_0x340bcd['threadId']))==null?void 0x0:_0x4dc22e[_0x279486(0x1f6)];_0x1712ad&&this[_0x279486(0x224)][_0x279486(0x239)](_0xda18b1,_0x2ac44c,_0x1712ad['id'],_0x340bcd[_0x279486(0x230)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c6c26(_0x33e698)),p(0x1,_0x4c6c26(_0x38904e)),p(0x2,_0x4c6c26(_0x118a51)),p(0x3,_0x4c6c26(_0x6d6cf3))],_);const z=_0x4d2e20(0x1dd),O={};var k=Object[_0x4d2e20(0x246)],Q=(_0x48d222,_0x38c19e,_0x2cc6a0,_0x1c213a)=>{const _0x2c588a=_0x4d2e20;for(var _0x41f48c=_0x1c213a>0x1?void 0x0:_0x1c213a?k(_0x38c19e,_0x2cc6a0):_0x38c19e,_0x17145d=_0x48d222[_0x2c588a(0x1e2)]-0x1,_0x51004c;_0x17145d>=0x0;_0x17145d--)(_0x51004c=_0x48d222[_0x17145d])&&(_0x41f48c=_0x51004c(_0x41f48c)||_0x41f48c);return _0x41f48c;},b=(_0x16f689,_0x423d00)=>(_0x1733c2,_0x53d984)=>_0x423d00(_0x1733c2,_0x53d984,_0x16f689);function X(_0x1a17b9,_0x352c15){const _0x18c2b8=_0x4d2e20,_0x355433=_0x1a17b9[_0x18c2b8(0x242)][0x0];return{..._0x352c15,'id':_0x355433[_0x18c2b8(0x22c)],'resolved':_0x1a17b9[_0x18c2b8(0x230)]===0x1,'dT':y(_0x355433['createTimestamp']),'personId':_0x355433[_0x18c2b8(0x212)],'threadId':_0x355433[_0x18c2b8(0x218)]};}function ee(_0x9ed2aa,_0x504553,_0x134bc9){const _0x5c6437=_0x4d2e20;var _0x5aed1f,_0x2c3a92;if(((_0x2c3a92=(_0x5aed1f=_0x9ed2aa==null?void 0x0:_0x9ed2aa['replies'])==null?void 0x0:_0x5aed1f[_0x5c6437(0x1e2)])!=null?_0x2c3a92:0x0)>0x0){const _0x2744b5=(_0x55b3bc,_0xfb8160)=>({'id':_0x55b3bc[_0x5c6437(0x22c)],'threadId':_0x55b3bc[_0x5c6437(0x218)],'dT':y(_0x55b3bc[_0x5c6437(0x21c)]),'personId':_0x55b3bc[_0x5c6437(0x212)],'resolved':_0x9ed2aa[_0x5c6437(0x230)]===I[_0x5c6437(0x203)],'unitId':_0x504553,'subUnitId':_0x134bc9,'text':JSON['parse'](_0x55b3bc[_0x5c6437(0x23a)]),'parentId':_0xfb8160}),_0x1435e5=_0x2744b5(_0x9ed2aa[_0x5c6437(0x242)][0x0]);return{..._0x1435e5,'children':_0x9ed2aa[_0x5c6437(0x242)][_0x5c6437(0x1fe)](0x1)[_0x5c6437(0x223)](_0x1b64d4=>_0x2744b5(_0x1b64d4,_0x1435e5['id']))};}return null;}let S=class{constructor(_0x131e3c,_0x602336,_0x2f8855){const _0xf2ef70=_0x4d2e20;this[_0xf2ef70(0x211)]=_0x131e3c,this[_0xf2ef70(0x213)]=_0x602336,this[_0xf2ef70(0x1ec)]=_0x2f8855;}async[_0x4d2e20(0x233)](_0x10490f){const _0x52f44a=_0x4d2e20;var _0x2a0754,_0x50961e;const {parentId:_0x429d2f,unitId:_0x5db86a,text:_0x32b385,threadId:_0x499f76}=_0x10490f,_0x3fb551=(_0x50961e=(_0x2a0754=_0x32b385['customRanges'])==null?void 0x0:_0x2a0754[_0x52f44a(0x236)](_0x53c8aa=>_0x53c8aa[_0x52f44a(0x219)]===_0xafaec[_0x52f44a(0x1f0)])[_0x52f44a(0x223)](_0xf8f2bb=>_0xf8f2bb[_0x52f44a(0x20c)]))!=null?_0x50961e:[],_0x5ad5e1=JSON[_0x52f44a(0x231)](_0x32b385),_0x1e5a88=(await this[_0x52f44a(0x1ec)]['requireSession'](_0x5db86a))[_0x52f44a(0x247)]();if(_0x429d2f){const _0x5d43b9={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551,'threadId':_0x499f76},_0x12834a=(await this['_httpService']['post'](_0x52f44a(0x214)+_0x5db86a+_0x52f44a(0x1eb),{'body':_0x5d43b9}))[_0x52f44a(0x22f)][_0x52f44a(0x20f)];return{..._0x10490f,'id':_0x12834a['replyId'],'dT':_0x5dad93(+_0x12834a[_0x52f44a(0x21c)])[_0x52f44a(0x20a)](_0x52f44a(0x217)),'personId':_0x12834a[_0x52f44a(0x212)]};}else{const _0x288287={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551},_0x3f4bfb=await this[_0x52f44a(0x211)]['post']('/universer-api/comment/unit/'+_0x5db86a+_0x52f44a(0x221),{'body':_0x288287});return X(_0x3f4bfb[_0x52f44a(0x22f)][_0x52f44a(0x210)],_0x10490f);}}async[_0x4d2e20(0x1ea)](_0xdf93f4){const _0x5ad989=_0x4d2e20;var _0xb85e03,_0x1d6a4b;const {text:_0x519185,unitId:_0x278486}=_0xdf93f4,_0x2b9d22=(_0x1d6a4b=(_0xb85e03=_0x519185[_0x5ad989(0x207)])==null?void 0x0:_0xb85e03[_0x5ad989(0x236)](_0x2f0225=>_0x2f0225[_0x5ad989(0x219)]===_0xafaec[_0x5ad989(0x1f0)])['map'](_0x29f3e5=>_0x29f3e5[_0x5ad989(0x20c)]))!=null?_0x1d6a4b:[],_0x219325=JSON[_0x5ad989(0x231)](_0x519185),_0x520dd1=_0xdf93f4[_0x5ad989(0x218)],_0x13cf53=_0xdf93f4['id'],_0xf8636={'memberId':(await this[_0x5ad989(0x1ec)]['requireSession'](_0x278486))[_0x5ad989(0x247)](),'unitId':_0x278486,'threadId':_0x520dd1,'mention':_0x2b9d22,'content':_0x219325,'replyId':_0x13cf53},_0x182ced=await this[_0x5ad989(0x211)][_0x5ad989(0x22e)](_0x5ad989(0x214)+_0x278486+_0x5ad989(0x235),{'body':_0xf8636});return!_0x182ced['body'][_0x5ad989(0x1ff)]||_0x182ced['body']['error']['code']===0x1;}async[_0x4d2e20(0x239)](_0x444a8a){const _0x169b9a=_0x4d2e20,{unitId:_0xf007ff}=_0x444a8a,_0x4563f1=_0x444a8a['threadId'],_0x32cfdf={'memberId':this[_0x169b9a(0x213)][_0x169b9a(0x1e1)]()[_0x169b9a(0x1ed)],'unitId':_0xf007ff,'threadId':_0x4563f1,'solved':_0x444a8a[_0x169b9a(0x206)]?I[_0x169b9a(0x203)]:I[_0x169b9a(0x1e4)]},_0xa8313c=await this[_0x169b9a(0x211)]['post']('/universer-api/comment/unit/'+_0xf007ff+_0x169b9a(0x1e0),{'body':_0x32cfdf});return!_0xa8313c[_0x169b9a(0x22f)][_0x169b9a(0x1ff)]||_0xa8313c[_0x169b9a(0x22f)]['error'][_0x169b9a(0x1ee)]===0x1;}async[_0x4d2e20(0x1e9)](_0x571af0,_0x43592a,_0x462bc2,_0x492ab5){const _0x4f1bd3=_0x4d2e20,_0x50d2cd={'memberId':(await this['_sessionService'][_0x4f1bd3(0x21d)](_0x571af0))['getMemberID'](),'threadId':_0x462bc2,'replyId':_0x492ab5,'unitId':_0x571af0},_0x2f7be5=await this[_0x4f1bd3(0x211)][_0x4f1bd3(0x22e)](_0x4f1bd3(0x214)+_0x571af0+_0x4f1bd3(0x1f9),{'body':_0x50d2cd});return!_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)]||_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)][_0x4f1bd3(0x1ee)]===0x1;}async[_0x4d2e20(0x23d)](_0x1b47ed,_0x27fcb7,_0x4d8531){const _0x3b273c=_0x4d2e20,_0x5bd317={'unitId':_0x1b47ed,'threadId':_0x4d8531},_0x5e729e=await this['_httpService'][_0x3b273c(0x22e)]('/universer-api/comment/unit/'+_0x1b47ed+'/list',{'body':_0x5bd317}),_0x394e1b=_0x4d8531['map'](_0x23f44c=>ee(_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x1e6)][_0x23f44c],_0x1b47ed,_0x27fcb7))[_0x3b273c(0x236)](Boolean);return Object[_0x3b273c(0x1fd)](_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x23e)])['forEach'](_0x2e4232=>{const _0x241826=_0x3b273c;this[_0x241826(0x213)][_0x241826(0x215)](_0x2e4232);}),_0x394e1b;}[_0x4d2e20(0x240)](_0x4400c7){const _0x4b7d90=_0x4d2e20;return{'id':_0x4400c7['id'],'threadId':_0x4400c7[_0x4b7d90(0x218)],'ref':_0x4400c7[_0x4b7d90(0x220)]};}};S=Q([b(0x0,_0x4c6c26(_0xd4ec99)),b(0x1,_0x4c6c26(_0x118a51)),b(0x2,_0x4c6c26(_0x3b3256))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x44e879,_0x4fcdbe,_0x1c7167,_0x143469)=>{for(var _0x11d2ac=_0x143469>0x1?void 0x0:_0x143469?re(_0x4fcdbe,_0x1c7167):_0x4fcdbe,_0x58b59b=_0x44e879['length']-0x1,_0x171a5a;_0x58b59b>=0x0;_0x58b59b--)(_0x171a5a=_0x44e879[_0x58b59b])&&(_0x11d2ac=_0x171a5a(_0x11d2ac)||_0x11d2ac);return _0x11d2ac;},M=(_0x4eb3b0,_0x10d459)=>(_0x3001bb,_0xf11f37)=>_0x10d459(_0x3001bb,_0xf11f37,_0x4eb3b0);let f=class extends _0x2793c2{constructor(_0x2201ac,_0x3bc853){const _0x59e9a2=_0x4d2e20;super(),this[_0x59e9a2(0x225)]=_0x2201ac,this[_0x59e9a2(0x1e3)]=_0x3bc853,this[_0x59e9a2(0x1e8)]();}[_0x4d2e20(0x1e8)](){const _0x20e137=_0x4d2e20;this[_0x20e137(0x225)][_0x20e137(0x23b)]=this[_0x20e137(0x1e3)],this[_0x20e137(0x225)][_0x20e137(0x1e7)]=!0x1;}};f=te([M(0x0,_0x447bb4),M(0x1,_0x4c6c26(S))],f);var se=Object['defineProperty'],oe=Object[_0x4d2e20(0x246)],ne=(_0x3e317c,_0x5a5b85,_0x58cc0e)=>_0x5a5b85 in _0x3e317c?se(_0x3e317c,_0x5a5b85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58cc0e}):_0x3e317c[_0x5a5b85]=_0x58cc0e,ie=(_0x454514,_0x532e98,_0x3a6e9f,_0x2b34e5)=>{const _0x3e4b0a=_0x4d2e20;for(var _0x56bdfd=_0x2b34e5>0x1?void 0x0:_0x2b34e5?oe(_0x532e98,_0x3a6e9f):_0x532e98,_0x5e7356=_0x454514[_0x3e4b0a(0x1e2)]-0x1,_0x39ef6b;_0x5e7356>=0x0;_0x5e7356--)(_0x39ef6b=_0x454514[_0x5e7356])&&(_0x56bdfd=_0x39ef6b(_0x56bdfd)||_0x56bdfd);return _0x56bdfd;},N=(_0x331e3f,_0x394ad6)=>(_0x1f659f,_0x3c1883)=>_0x394ad6(_0x1f659f,_0x3c1883,_0x331e3f),$=(_0x3d7dcb,_0x24dd78,_0x1460f6)=>ne(_0x3d7dcb,typeof _0x24dd78!=_0x4d2e20(0x244)?_0x24dd78+'':_0x24dd78,_0x1460f6);let g=class extends _0x3692f7{constructor(_0x51b7e7=O,_0x58baa4,_0x3ffb30){const _0x47fcf1=_0x4d2e20;super(),this['_config']=_0x51b7e7,this[_0x47fcf1(0x1ef)]=_0x58baa4,this[_0x47fcf1(0x20b)]=_0x3ffb30;const {..._0x4b2fe8}=_0x37574b({},O,this[_0x47fcf1(0x1f5)]);this[_0x47fcf1(0x20b)]['setConfig'](z,_0x4b2fe8);}[_0x4d2e20(0x245)](){[[S],[f],[_]]['forEach'](_0x298a5c=>{const _0x4baa19=_0x14b4;this[_0x4baa19(0x1ef)][_0x4baa19(0x1fb)](_0x298a5c);});}[_0x4d2e20(0x202)](){const _0x36ceee=_0x4d2e20;this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](f),this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](_);}};$(g,_0x4d2e20(0x21b),W),$(g,'type',_0xbfac25[_0x4d2e20(0x1fc)]),g=ie([_0x5a8c90(_0x39222f,_0xfff223,_0x593ad9),N(0x1,_0x4c6c26(_0x6d6cf3)),N(0x2,_0x136898)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e32a6=_0x1527;(function(_0x576f75,_0x597d5c){const _0xbbb47=_0x1527,_0x51a384=_0x576f75();while(!![]){try{const _0x28747e=-parseInt(_0xbbb47(0x158))/0x1+-parseInt(_0xbbb47(0x15b))/0x2*(-parseInt(_0xbbb47(0x149))/0x3)+parseInt(_0xbbb47(0x12a))/0x4+-parseInt(_0xbbb47(0x124))/0x5+-parseInt(_0xbbb47(0x140))/0x6+parseInt(_0xbbb47(0x134))/0x7*(parseInt(_0xbbb47(0x166))/0x8)+-parseInt(_0xbbb47(0x14b))/0x9;if(_0x28747e===_0x597d5c)break;else _0x51a384['push'](_0x51a384['shift']());}catch(_0x49908f){_0x51a384['push'](_0x51a384['shift']());}}}(_0x5744,0x8962e));import{CommentService as _0x25684e,CollaborationSessionService as _0x2bbd11,UniverCollaborationClientPlugin as _0x1b6345}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46806d}from'@univerjs-pro/license';import{dayjs as _0x2edf0d,UserManagerService as _0x5aa83d,Inject as _0x8aec6c,Injector as _0x420fd5,Disposable as _0x3b1f59,CustomRangeType as _0x174598,UniverInstanceType as _0x32f188,DependentOn as _0xde6bbc,IConfigService as _0x5457f3,Plugin as _0x154e10,merge as _0x58cf97}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40ed92}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28c6d4,IThreadCommentDataSourceService as _0x10cad0}from'@univerjs/thread-comment';function _0x5744(){const _0xc65ce1=['get','rangeId','UNIVER_UNKNOWN','4936854iyprYn','replies','/solved','UNRECOGNIZED','_initUserSync','stringify','_threadCommentDataSourceService','map','content','6WdOCQj','_sessionService','80991ivKRnW','Reply','getUnit','threadId','userID','subscribe','requireSession','pipe','Add','unitId','comments','/universer-api/comment/unit/','personId','412548DNPYxH','addComment','customRanges','580518ofzqmj','payload','_threadCommentDataSource','pluginName','deleteComment','_initDataSource','updateComment','ref','Solve','setConfig','_threadCommentModel','3863752rphgZd','/universer-api/user/list','length','_configService','_commentService','parse','createTimestamp','type','disposeWithMe','rangeType','_config','forEach','filter','symbol','solved','parentId','Delete','resolveComment','Edit','getMemberID','error','addUser','userId','/reply','thread-comment-data-source.config','_init','40685KOzWbe','getComment','post','replyId','Solved','onStarting','3006960QngLPk','dataSource','code','_httpService','root','getOwnPropertyDescriptor','COMMENT','_injector','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7VxxVPZ','getCurrentUser','_userService','users','find','/delete','YYYY/MM/DD\x20HH:mm','resolved','body'];_0x5744=function(){return _0xc65ce1;};return _0x5744();}import{bufferTime as _0x1604bb}from'rxjs';import{HTTPService as _0x45a61b}from'@univerjs/network';const W=_0x5e32a6(0x133);var I=(_0x295eca=>(_0x295eca[_0x295eca['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x295eca[_0x295eca[_0x5e32a6(0x128)]=0x1]=_0x5e32a6(0x128),_0x295eca[_0x295eca['UNRECOGNIZED']=-0x1]=_0x5e32a6(0x143),_0x295eca))(I||{}),v=(_0x69ded0=>(_0x69ded0[_0x69ded0['Unknown']=0x0]='Unknown',_0x69ded0[_0x69ded0['Add']=0x1]=_0x5e32a6(0x153),_0x69ded0[_0x69ded0['Reply']=0x2]='Reply',_0x69ded0[_0x69ded0[_0x5e32a6(0x178)]=0x3]='Edit',_0x69ded0[_0x69ded0[_0x5e32a6(0x176)]=0x4]=_0x5e32a6(0x176),_0x69ded0[_0x69ded0['Solve']=0x5]=_0x5e32a6(0x163),_0x69ded0[_0x69ded0[_0x5e32a6(0x143)]=-0x1]=_0x5e32a6(0x143),_0x69ded0))(v||{});const y=_0x889282=>_0x2edf0d(new Date(+_0x889282))['format'](_0x5e32a6(0x13a)),B=async(_0x19f1f5,_0x4f2b4d)=>{const _0x40bb14=_0x5e32a6,_0x532d9d=_0x19f1f5[_0x40bb14(0x13d)](_0x5aa83d),_0x5966b8=_0x19f1f5[_0x40bb14(0x13d)](_0x45a61b);_0x4f2b4d['forEach'](_0x321241=>{_0x532d9d['getUser'](_0x321241)&&_0x4f2b4d['delete'](_0x321241);}),_0x4f2b4d['size']&&(await _0x5966b8[_0x40bb14(0x13d)](_0x40bb14(0x167),{'params':{'userIDs':[..._0x4f2b4d]}}))[_0x40bb14(0x13c)][_0x40bb14(0x137)][_0x40bb14(0x171)](_0x4b71d9=>{const _0xcbe019=_0x40bb14;_0x4b71d9&&_0x532d9d[_0xcbe019(0x17b)](_0x4b71d9);});};var K=Object[_0x5e32a6(0x12f)],V=(_0x42be3f,_0x26c26c,_0x438ce0,_0x1042eb)=>{for(var _0x68bff4=_0x1042eb>0x1?void 0x0:_0x1042eb?K(_0x26c26c,_0x438ce0):_0x26c26c,_0x3d6a4f=_0x42be3f['length']-0x1,_0x48086a;_0x3d6a4f>=0x0;_0x3d6a4f--)(_0x48086a=_0x42be3f[_0x3d6a4f])&&(_0x68bff4=_0x48086a(_0x68bff4)||_0x68bff4);return _0x68bff4;},p=(_0x1362be,_0x511fd5)=>(_0x3bb22f,_0x1c9d7c)=>_0x511fd5(_0x3bb22f,_0x1c9d7c,_0x1362be);let _=class extends _0x3b1f59{constructor(_0x39ba44,_0x9a3566,_0x342bd1,_0x2b13f1){const _0x48a700=_0x5e32a6;super(),this['_commentService']=_0x39ba44,this[_0x48a700(0x165)]=_0x9a3566,this[_0x48a700(0x136)]=_0x342bd1,this[_0x48a700(0x131)]=_0x2b13f1,this[_0x48a700(0x17f)](),this[_0x48a700(0x144)]();}[_0x5e32a6(0x144)](){const _0xb98ddb=_0x5e32a6;this[_0xb98ddb(0x16e)](this[_0xb98ddb(0x165)]['commentUpdate$'][_0xb98ddb(0x152)](_0x1604bb(0x10))['subscribe'](_0x5616cb=>{const _0x46ff7e=_0xb98ddb,_0xdcc87d=new Set();_0x5616cb[_0x46ff7e(0x171)](_0x39229b=>{const _0x1c05b1=_0x46ff7e;switch(_0x39229b['type']){case'add':{const _0x299bdb=_0x39229b[_0x1c05b1(0x15c)][_0x1c05b1(0x157)];_0xdcc87d['add'](_0x299bdb);break;}}}),B(this[_0x46ff7e(0x131)],_0xdcc87d);}));}[_0x5e32a6(0x17f)](){const _0x4a2190=_0x5e32a6;this[_0x4a2190(0x16e)](this[_0x4a2190(0x16a)]['commentUpdate$'][_0x4a2190(0x150)](async _0x523b79=>{const _0x3322b3=_0x4a2190;var _0x51e1c5,_0x3b775e,_0x2e7f18,_0x3288b3;const _0x30c7d8=(_0x51e1c5=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])[_0x3322b3(0x138)](_0x5405e8=>_0x5405e8['threadId']===_0x523b79[_0x3322b3(0x14e)]))==null?void 0x0:_0x51e1c5[_0x3322b3(0x12e)];if(!_0x30c7d8)return;const {unitId:_0x3da1c2,subUnitId:_0x5e04c7}=_0x30c7d8;switch(_0x523b79['user']&&this[_0x3322b3(0x136)][_0x3322b3(0x17b)](_0x523b79['user']),_0x523b79[_0x3322b3(0x16d)]){case v[_0x3322b3(0x153)]:break;case v[_0x3322b3(0x14c)]:{this['_threadCommentModel'][_0x3322b3(0x159)](_0x3da1c2,_0x5e04c7,{'unitId':_0x3da1c2,'subUnitId':_0x5e04c7,'ref':'','id':_0x523b79[_0x3322b3(0x127)],'dT':y(+_0x523b79[_0x3322b3(0x16c)]),'threadId':_0x523b79[_0x3322b3(0x14e)],'personId':(_0x2e7f18=(_0x3b775e=_0x523b79['user'])==null?void 0x0:_0x3b775e[_0x3322b3(0x14f)])!=null?_0x2e7f18:_0x523b79[_0x3322b3(0x17c)],'text':JSON[_0x3322b3(0x16b)](_0x523b79['content']),'parentId':_0x30c7d8['id']});break;}case v[_0x3322b3(0x176)]:{const _0x392871=this['_threadCommentModel'][_0x3322b3(0x125)](_0x3da1c2,_0x5e04c7,_0x523b79[_0x3322b3(0x127)]);_0x392871&&_0x392871[_0x3322b3(0x175)]&&this['_threadCommentModel'][_0x3322b3(0x15f)](_0x3da1c2,_0x5e04c7,_0x523b79['replyId']);break;}case v[_0x3322b3(0x178)]:{this[_0x3322b3(0x165)]['updateComment'](_0x3da1c2,_0x5e04c7,{'commentId':_0x523b79['replyId'],'text':JSON[_0x3322b3(0x16b)](_0x523b79[_0x3322b3(0x148)])});break;}case v[_0x3322b3(0x163)]:{const _0x5650f9=(_0x3288b3=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])['find'](_0x3234fb=>_0x3234fb[_0x3322b3(0x14e)]===_0x523b79['threadId']))==null?void 0x0:_0x3288b3[_0x3322b3(0x12e)];_0x5650f9&&this[_0x3322b3(0x165)][_0x3322b3(0x177)](_0x3da1c2,_0x5e04c7,_0x5650f9['id'],_0x523b79[_0x3322b3(0x174)]===I['Solved']);break;}}}));}};function _0x1527(_0x1f3476,_0x4afaac){const _0x57447b=_0x5744();return _0x1527=function(_0x15279a,_0x5df83e){_0x15279a=_0x15279a-0x124;let _0x2ce626=_0x57447b[_0x15279a];return _0x2ce626;},_0x1527(_0x1f3476,_0x4afaac);}_=V([p(0x0,_0x8aec6c(_0x25684e)),p(0x1,_0x8aec6c(_0x28c6d4)),p(0x2,_0x8aec6c(_0x5aa83d)),p(0x3,_0x8aec6c(_0x420fd5))],_);const z=_0x5e32a6(0x17e),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x37fbf3,_0xf94518,_0x547663,_0x4505c3)=>{const _0x17919b=_0x5e32a6;for(var _0x26948a=_0x4505c3>0x1?void 0x0:_0x4505c3?k(_0xf94518,_0x547663):_0xf94518,_0x1da55f=_0x37fbf3[_0x17919b(0x168)]-0x1,_0x5367b3;_0x1da55f>=0x0;_0x1da55f--)(_0x5367b3=_0x37fbf3[_0x1da55f])&&(_0x26948a=_0x5367b3(_0x26948a)||_0x26948a);return _0x26948a;},b=(_0x2ff711,_0x161673)=>(_0x3b5f35,_0x483f37)=>_0x161673(_0x3b5f35,_0x483f37,_0x2ff711);function X(_0x3f5d1a,_0x33a645){const _0x3cf677=_0x5e32a6,_0x16cb49=_0x3f5d1a[_0x3cf677(0x141)][0x0];return{..._0x33a645,'id':_0x16cb49[_0x3cf677(0x127)],'resolved':_0x3f5d1a[_0x3cf677(0x174)]===0x1,'dT':y(_0x16cb49[_0x3cf677(0x16c)]),'personId':_0x16cb49[_0x3cf677(0x17c)],'threadId':_0x16cb49[_0x3cf677(0x14e)]};}function ee(_0x58e7b5,_0x485195,_0x3ef9b2){const _0x21539b=_0x5e32a6;var _0x7094ff,_0x11792a;if(((_0x11792a=(_0x7094ff=_0x58e7b5==null?void 0x0:_0x58e7b5[_0x21539b(0x141)])==null?void 0x0:_0x7094ff[_0x21539b(0x168)])!=null?_0x11792a:0x0)>0x0){const _0x43aadb=(_0x37f35d,_0x1a6c94)=>({'id':_0x37f35d[_0x21539b(0x127)],'threadId':_0x37f35d[_0x21539b(0x14e)],'dT':y(_0x37f35d['createTimestamp']),'personId':_0x37f35d[_0x21539b(0x17c)],'resolved':_0x58e7b5[_0x21539b(0x174)]===I[_0x21539b(0x128)],'unitId':_0x485195,'subUnitId':_0x3ef9b2,'text':JSON[_0x21539b(0x16b)](_0x37f35d[_0x21539b(0x148)]),'parentId':_0x1a6c94}),_0x3b2690=_0x43aadb(_0x58e7b5[_0x21539b(0x141)][0x0]);return{..._0x3b2690,'children':_0x58e7b5[_0x21539b(0x141)]['slice'](0x1)['map'](_0x2c9d8e=>_0x43aadb(_0x2c9d8e,_0x3b2690['id']))};}return null;}let S=class{constructor(_0x301656,_0xd6e9d8,_0x1a3b69){const _0x3c5450=_0x5e32a6;this[_0x3c5450(0x12d)]=_0x301656,this[_0x3c5450(0x136)]=_0xd6e9d8,this[_0x3c5450(0x14a)]=_0x1a3b69;}async[_0x5e32a6(0x159)](_0x37bd9f){const _0x25339e=_0x5e32a6;var _0x2c584e,_0x3a776e;const {parentId:_0x3ccaf3,unitId:_0x5bdf04,text:_0x5b49b2,threadId:_0x49c1d1}=_0x37bd9f,_0x474828=(_0x3a776e=(_0x2c584e=_0x5b49b2[_0x25339e(0x15a)])==null?void 0x0:_0x2c584e['filter'](_0x3d3268=>_0x3d3268[_0x25339e(0x16f)]===_0x174598[_0x25339e(0x130)])[_0x25339e(0x147)](_0x13d08a=>_0x13d08a[_0x25339e(0x13e)]))!=null?_0x3a776e:[],_0x1cff83=JSON[_0x25339e(0x145)](_0x5b49b2),_0x41274d=(await this['_sessionService'][_0x25339e(0x151)](_0x5bdf04))['getMemberID']();if(_0x3ccaf3){const _0x1ca8da={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828,'threadId':_0x49c1d1},_0x2c57ac=(await this['_httpService'][_0x25339e(0x126)](_0x25339e(0x156)+_0x5bdf04+_0x25339e(0x17d),{'body':_0x1ca8da}))[_0x25339e(0x13c)][_0x25339e(0x132)];return{..._0x37bd9f,'id':_0x2c57ac[_0x25339e(0x127)],'dT':_0x2edf0d(+_0x2c57ac[_0x25339e(0x16c)])['format'](_0x25339e(0x13a)),'personId':_0x2c57ac[_0x25339e(0x17c)]};}else{const _0x4764d1={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828},_0x4c0bf9=await this['_httpService'][_0x25339e(0x126)]('/universer-api/comment/unit/'+_0x5bdf04+'/add',{'body':_0x4764d1});return X(_0x4c0bf9[_0x25339e(0x13c)]['comment'],_0x37bd9f);}}async[_0x5e32a6(0x161)](_0x2d53e8){const _0x25b168=_0x5e32a6;var _0x291a71,_0x130e6c;const {text:_0x5911e8,unitId:_0x32d139}=_0x2d53e8,_0x260f0c=(_0x130e6c=(_0x291a71=_0x5911e8['customRanges'])==null?void 0x0:_0x291a71[_0x25b168(0x172)](_0x451842=>_0x451842[_0x25b168(0x16f)]===_0x174598['COMMENT'])[_0x25b168(0x147)](_0x4795ac=>_0x4795ac[_0x25b168(0x13e)]))!=null?_0x130e6c:[],_0x2c8165=JSON[_0x25b168(0x145)](_0x5911e8),_0x545c09=_0x2d53e8['threadId'],_0x3a3427=_0x2d53e8['id'],_0x53deb8={'memberId':(await this['_sessionService'][_0x25b168(0x151)](_0x32d139))[_0x25b168(0x179)](),'unitId':_0x32d139,'threadId':_0x545c09,'mention':_0x260f0c,'content':_0x2c8165,'replyId':_0x3a3427},_0xce7a15=await this['_httpService'][_0x25b168(0x126)](_0x25b168(0x156)+_0x32d139+'/edit',{'body':_0x53deb8});return!_0xce7a15['body'][_0x25b168(0x17a)]||_0xce7a15[_0x25b168(0x13c)][_0x25b168(0x17a)][_0x25b168(0x12c)]===0x1;}async[_0x5e32a6(0x177)](_0x5edac0){const _0x255d78=_0x5e32a6,{unitId:_0x3d716c}=_0x5edac0,_0x2548b1=_0x5edac0[_0x255d78(0x14e)],_0x4b2ed5={'memberId':this[_0x255d78(0x136)][_0x255d78(0x135)]()[_0x255d78(0x14f)],'unitId':_0x3d716c,'threadId':_0x2548b1,'solved':_0x5edac0[_0x255d78(0x13b)]?I[_0x255d78(0x128)]:I['OpenOrReOpen']},_0x166857=await this[_0x255d78(0x12d)][_0x255d78(0x126)](_0x255d78(0x156)+_0x3d716c+_0x255d78(0x142),{'body':_0x4b2ed5});return!_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)]||_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)][_0x255d78(0x12c)]===0x1;}async[_0x5e32a6(0x15f)](_0x285f78,_0x17a31b,_0xbc3c93,_0x24f27e){const _0x22d218=_0x5e32a6,_0x56c1ca={'memberId':(await this[_0x22d218(0x14a)]['requireSession'](_0x285f78))['getMemberID'](),'threadId':_0xbc3c93,'replyId':_0x24f27e,'unitId':_0x285f78},_0x45ef9b=await this[_0x22d218(0x12d)][_0x22d218(0x126)](_0x22d218(0x156)+_0x285f78+_0x22d218(0x139),{'body':_0x56c1ca});return!_0x45ef9b[_0x22d218(0x13c)]['error']||_0x45ef9b[_0x22d218(0x13c)][_0x22d218(0x17a)][_0x22d218(0x12c)]===0x1;}async['listComments'](_0x5e148b,_0x30ff39,_0x1dc3f3){const _0x25d90b=_0x5e32a6,_0x111a67={'unitId':_0x5e148b,'threadId':_0x1dc3f3},_0x3c0f91=await this[_0x25d90b(0x12d)][_0x25d90b(0x126)](_0x25d90b(0x156)+_0x5e148b+'/list',{'body':_0x111a67}),_0x1d97c2=_0x1dc3f3['map'](_0xf0818a=>ee(_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x155)][_0xf0818a],_0x5e148b,_0x30ff39))[_0x25d90b(0x172)](Boolean);return Object['values'](_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x137)])['forEach'](_0x4e4889=>{const _0xa9c5f=_0x25d90b;this[_0xa9c5f(0x136)][_0xa9c5f(0x17b)](_0x4e4889);}),_0x1d97c2;}['saveCommentToSnapshot'](_0x5d4d57){const _0x269138=_0x5e32a6;return{'id':_0x5d4d57['id'],'threadId':_0x5d4d57['threadId'],'ref':_0x5d4d57[_0x269138(0x162)]};}};S=Q([b(0x0,_0x8aec6c(_0x45a61b)),b(0x1,_0x8aec6c(_0x5aa83d)),b(0x2,_0x8aec6c(_0x2bbd11))],S);var re=Object[_0x5e32a6(0x12f)],te=(_0x24808f,_0x22912c,_0x503c8d,_0xe6c737)=>{const _0x10318c=_0x5e32a6;for(var _0x156fa6=_0xe6c737>0x1?void 0x0:_0xe6c737?re(_0x22912c,_0x503c8d):_0x22912c,_0x34d903=_0x24808f[_0x10318c(0x168)]-0x1,_0x489b63;_0x34d903>=0x0;_0x34d903--)(_0x489b63=_0x24808f[_0x34d903])&&(_0x156fa6=_0x489b63(_0x156fa6)||_0x156fa6);return _0x156fa6;},M=(_0x37f381,_0x8667e8)=>(_0x12aa6d,_0x3cb248)=>_0x8667e8(_0x12aa6d,_0x3cb248,_0x37f381);let f=class extends _0x3b1f59{constructor(_0x1ba95a,_0x2015da){const _0x5c6e04=_0x5e32a6;super(),this[_0x5c6e04(0x146)]=_0x1ba95a,this[_0x5c6e04(0x15d)]=_0x2015da,this[_0x5c6e04(0x160)]();}['_initDataSource'](){const _0x17c27a=_0x5e32a6;this[_0x17c27a(0x146)][_0x17c27a(0x12b)]=this['_threadCommentDataSource'],this[_0x17c27a(0x146)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x10cad0),M(0x1,_0x8aec6c(S))],f);var se=Object['defineProperty'],oe=Object[_0x5e32a6(0x12f)],ne=(_0x21baf0,_0x5ecae1,_0x190a53)=>_0x5ecae1 in _0x21baf0?se(_0x21baf0,_0x5ecae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x190a53}):_0x21baf0[_0x5ecae1]=_0x190a53,ie=(_0x47e1cb,_0x5aa15a,_0x871f02,_0x3ba956)=>{for(var _0x21417c=_0x3ba956>0x1?void 0x0:_0x3ba956?oe(_0x5aa15a,_0x871f02):_0x5aa15a,_0x224b58=_0x47e1cb['length']-0x1,_0x9de8d1;_0x224b58>=0x0;_0x224b58--)(_0x9de8d1=_0x47e1cb[_0x224b58])&&(_0x21417c=_0x9de8d1(_0x21417c)||_0x21417c);return _0x21417c;},N=(_0x36d118,_0x46e7ef)=>(_0x7006f8,_0x1fdbb7)=>_0x46e7ef(_0x7006f8,_0x1fdbb7,_0x36d118),$=(_0x27cb2d,_0x363a7e,_0x3568df)=>ne(_0x27cb2d,typeof _0x363a7e!=_0x5e32a6(0x173)?_0x363a7e+'':_0x363a7e,_0x3568df);let g=class extends _0x154e10{constructor(_0x189189=O,_0xdff84,_0x5d9eeb){const _0x2ecc0e=_0x5e32a6;super(),this[_0x2ecc0e(0x170)]=_0x189189,this[_0x2ecc0e(0x131)]=_0xdff84,this['_configService']=_0x5d9eeb;const {..._0x1b01b8}=_0x58cf97({},O,this[_0x2ecc0e(0x170)]);this[_0x2ecc0e(0x169)][_0x2ecc0e(0x164)](z,_0x1b01b8);}[_0x5e32a6(0x129)](){const _0x3a4041=_0x5e32a6;[[S],[f],[_]][_0x3a4041(0x171)](_0x109297=>{this['_injector']['add'](_0x109297);});}['onReady'](){const _0x3e3f37=_0x5e32a6;this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](f),this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](_);}};$(g,_0x5e32a6(0x15e),W),$(g,_0x5e32a6(0x16d),_0x32f188[_0x5e32a6(0x13f)]),g=ie([_0xde6bbc(_0x40ed92,_0x1b6345,_0x46806d),N(0x1,_0x8aec6c(_0x420fd5)),N(0x2,_0x5457f3)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x14b4(_0x7e0315,_0x1004b8){const _0x618831=_0x6188();return _0x14b4=function(_0x14b40c,_0x4e4645){_0x14b40c=_0x14b40c-0x1dc;let _0x343784=_0x618831[_0x14b40c];return _0x343784;},_0x14b4(_0x7e0315,_0x1004b8);}function _0x6188(){const _0x4204ed=['reply','comment','_httpService','userId','_userService','/universer-api/comment/unit/','addUser','943004cMETdO','YYYY/MM/DD\x20HH:mm','threadId','rangeType','parentId','pluginName','createTimestamp','requireSession','personId','/universer-api/user/list','ref','/add','find','map','_threadCommentModel','_threadCommentDataSourceService','get','UNRECOGNIZED','3865344CuzDzz','26361BcBHfz','1764679cyhQpn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','11442060UIAjVx','post','body','solved','stringify','pipe','addComment','530072mIVZzE','/edit','filter','unitId','getComment','resolveComment','content','dataSource','forEach','listComments','users','disposeWithMe','saveCommentToSnapshot','3824QfnqAl','replies','subscribe','symbol','onStarting','getOwnPropertyDescriptor','getMemberID','16671072etvSFx','thread-comment-data-source.config','getUser','_initUserSync','/solved','getCurrentUser','length','_threadCommentDataSource','OpenOrReOpen','parse','comments','syncUpdateMutationToColla','_initDataSource','deleteComment','updateComment','/reply','_sessionService','userID','code','_injector','COMMENT','Add','18QNnbBY','_init','Unknown','_config','root','user','_commentService','/delete','Solve','add','UNIVER_UNKNOWN','values','slice','error','Edit','5asvQLP','onReady','Solved','getUnit','4shPorO','resolved','customRanges','type','Delete','format','_configService','rangeId','commentUpdate$','Reply'];_0x6188=function(){return _0x4204ed;};return _0x6188();}const _0x4d2e20=_0x14b4;(function(_0x5dad8e,_0x5c5754){const _0x3c3886=_0x14b4,_0x311165=_0x5dad8e();while(!![]){try{const _0x30bb1e=parseInt(_0x3c3886(0x205))/0x1*(-parseInt(_0x3c3886(0x234))/0x2)+-parseInt(_0x3c3886(0x228))/0x3+-parseInt(_0x3c3886(0x216))/0x4*(parseInt(_0x3c3886(0x201))/0x5)+-parseInt(_0x3c3886(0x1f2))/0x6*(parseInt(_0x3c3886(0x22a))/0x7)+parseInt(_0x3c3886(0x241))/0x8*(parseInt(_0x3c3886(0x229))/0x9)+parseInt(_0x3c3886(0x22d))/0xa+parseInt(_0x3c3886(0x1dc))/0xb;if(_0x30bb1e===_0x5c5754)break;else _0x311165['push'](_0x311165['shift']());}catch(_0x4792fc){_0x311165['push'](_0x311165['shift']());}}}(_0x6188,0xaf952));import{CommentService as _0x33e698,CollaborationSessionService as _0x3b3256,UniverCollaborationClientPlugin as _0xfff223}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x593ad9}from'@univerjs-pro/license';import{dayjs as _0x5dad93,UserManagerService as _0x118a51,Inject as _0x4c6c26,Injector as _0x6d6cf3,Disposable as _0x2793c2,CustomRangeType as _0xafaec,UniverInstanceType as _0xbfac25,DependentOn as _0x5a8c90,IConfigService as _0x136898,Plugin as _0x3692f7,merge as _0x37574b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x39222f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38904e,IThreadCommentDataSourceService as _0x447bb4}from'@univerjs/thread-comment';import{bufferTime as _0x21aca5}from'rxjs';import{HTTPService as _0xd4ec99}from'@univerjs/network';const W=_0x4d2e20(0x22b);var I=(_0xc8bd83=>(_0xc8bd83[_0xc8bd83[_0x4d2e20(0x1e4)]=0x0]='OpenOrReOpen',_0xc8bd83[_0xc8bd83[_0x4d2e20(0x203)]=0x1]=_0x4d2e20(0x203),_0xc8bd83[_0xc8bd83[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0xc8bd83))(I||{}),v=(_0x3c1c33=>(_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f4)]=0x0]=_0x4d2e20(0x1f4),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x1f1)]=0x1]=_0x4d2e20(0x1f1),_0x3c1c33[_0x3c1c33['Reply']=0x2]=_0x4d2e20(0x20e),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x200)]=0x3]=_0x4d2e20(0x200),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x209)]=0x4]='Delete',_0x3c1c33[_0x3c1c33['Solve']=0x5]=_0x4d2e20(0x1fa),_0x3c1c33[_0x3c1c33[_0x4d2e20(0x227)]=-0x1]=_0x4d2e20(0x227),_0x3c1c33))(v||{});const y=_0x5f2023=>_0x5dad93(new Date(+_0x5f2023))[_0x4d2e20(0x20a)](_0x4d2e20(0x217)),B=async(_0xda3c59,_0x27cec2)=>{const _0x3c832e=_0x4d2e20,_0x37ef38=_0xda3c59[_0x3c832e(0x226)](_0x118a51),_0xeaead9=_0xda3c59['get'](_0xd4ec99);_0x27cec2[_0x3c832e(0x23c)](_0x4bfe75=>{const _0x51c883=_0x3c832e;_0x37ef38[_0x51c883(0x1de)](_0x4bfe75)&&_0x27cec2['delete'](_0x4bfe75);}),_0x27cec2['size']&&(await _0xeaead9[_0x3c832e(0x226)](_0x3c832e(0x21f),{'params':{'userIDs':[..._0x27cec2]}}))[_0x3c832e(0x22f)]['users'][_0x3c832e(0x23c)](_0x4a5abd=>{const _0x5d36b1=_0x3c832e;_0x4a5abd&&_0x37ef38[_0x5d36b1(0x215)](_0x4a5abd);});};var K=Object[_0x4d2e20(0x246)],V=(_0x5cbc32,_0x27ce48,_0x177543,_0x273c82)=>{const _0x36e96d=_0x4d2e20;for(var _0x20ccc5=_0x273c82>0x1?void 0x0:_0x273c82?K(_0x27ce48,_0x177543):_0x27ce48,_0x170d9b=_0x5cbc32[_0x36e96d(0x1e2)]-0x1,_0x41b30d;_0x170d9b>=0x0;_0x170d9b--)(_0x41b30d=_0x5cbc32[_0x170d9b])&&(_0x20ccc5=_0x41b30d(_0x20ccc5)||_0x20ccc5);return _0x20ccc5;},p=(_0xaa0075,_0x4811e4)=>(_0x1361c8,_0x244020)=>_0x4811e4(_0x1361c8,_0x244020,_0xaa0075);let _=class extends _0x2793c2{constructor(_0x481362,_0x11b8e5,_0x44660b,_0x150c04){const _0x331783=_0x4d2e20;super(),this[_0x331783(0x1f8)]=_0x481362,this[_0x331783(0x224)]=_0x11b8e5,this[_0x331783(0x213)]=_0x44660b,this[_0x331783(0x1ef)]=_0x150c04,this[_0x331783(0x1f3)](),this[_0x331783(0x1df)]();}[_0x4d2e20(0x1df)](){const _0x15fd57=_0x4d2e20;this['disposeWithMe'](this[_0x15fd57(0x224)][_0x15fd57(0x20d)][_0x15fd57(0x232)](_0x21aca5(0x10))[_0x15fd57(0x243)](_0x5117d1=>{const _0x2bd2ab=_0x15fd57,_0x1c7a5a=new Set();_0x5117d1[_0x2bd2ab(0x23c)](_0x36d6b7=>{const _0x1a4a66=_0x2bd2ab;switch(_0x36d6b7[_0x1a4a66(0x208)]){case _0x1a4a66(0x1fb):{const _0x4f4e0b=_0x36d6b7['payload'][_0x1a4a66(0x21e)];_0x1c7a5a[_0x1a4a66(0x1fb)](_0x4f4e0b);break;}}}),B(this['_injector'],_0x1c7a5a);}));}[_0x4d2e20(0x1f3)](){const _0x14b05f=_0x4d2e20;this[_0x14b05f(0x23f)](this[_0x14b05f(0x1f8)]['commentUpdate$'][_0x14b05f(0x243)](async _0x340bcd=>{const _0x279486=_0x14b05f;var _0x2620b7,_0x7a6136,_0x94bb98,_0x4dc22e;const _0x4e180d=(_0x2620b7=this[_0x279486(0x224)][_0x279486(0x204)](_0x340bcd[_0x279486(0x237)])[_0x279486(0x222)](_0x5ee2e5=>_0x5ee2e5[_0x279486(0x218)]===_0x340bcd[_0x279486(0x218)]))==null?void 0x0:_0x2620b7[_0x279486(0x1f6)];if(!_0x4e180d)return;const {unitId:_0xda18b1,subUnitId:_0x2ac44c}=_0x4e180d;switch(_0x340bcd[_0x279486(0x1f7)]&&this[_0x279486(0x213)][_0x279486(0x215)](_0x340bcd[_0x279486(0x1f7)]),_0x340bcd[_0x279486(0x208)]){case v[_0x279486(0x1f1)]:break;case v[_0x279486(0x20e)]:{this[_0x279486(0x224)][_0x279486(0x233)](_0xda18b1,_0x2ac44c,{'unitId':_0xda18b1,'subUnitId':_0x2ac44c,'ref':'','id':_0x340bcd[_0x279486(0x22c)],'dT':y(+_0x340bcd[_0x279486(0x21c)]),'threadId':_0x340bcd[_0x279486(0x218)],'personId':(_0x94bb98=(_0x7a6136=_0x340bcd['user'])==null?void 0x0:_0x7a6136[_0x279486(0x1ed)])!=null?_0x94bb98:_0x340bcd[_0x279486(0x212)],'text':JSON[_0x279486(0x1e5)](_0x340bcd['content']),'parentId':_0x4e180d['id']});break;}case v['Delete']:{const _0x2d5fe4=this[_0x279486(0x224)][_0x279486(0x238)](_0xda18b1,_0x2ac44c,_0x340bcd[_0x279486(0x22c)]);_0x2d5fe4&&_0x2d5fe4[_0x279486(0x21a)]&&this[_0x279486(0x224)][_0x279486(0x1e9)](_0xda18b1,_0x2ac44c,_0x340bcd['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x279486(0x1ea)](_0xda18b1,_0x2ac44c,{'commentId':_0x340bcd[_0x279486(0x22c)],'text':JSON[_0x279486(0x1e5)](_0x340bcd[_0x279486(0x23a)])});break;}case v['Solve']:{const _0x1712ad=(_0x4dc22e=this[_0x279486(0x224)]['getUnit'](_0x340bcd['unitId'])['find'](_0x3733e2=>_0x3733e2[_0x279486(0x218)]===_0x340bcd['threadId']))==null?void 0x0:_0x4dc22e[_0x279486(0x1f6)];_0x1712ad&&this[_0x279486(0x224)][_0x279486(0x239)](_0xda18b1,_0x2ac44c,_0x1712ad['id'],_0x340bcd[_0x279486(0x230)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c6c26(_0x33e698)),p(0x1,_0x4c6c26(_0x38904e)),p(0x2,_0x4c6c26(_0x118a51)),p(0x3,_0x4c6c26(_0x6d6cf3))],_);const z=_0x4d2e20(0x1dd),O={};var k=Object[_0x4d2e20(0x246)],Q=(_0x48d222,_0x38c19e,_0x2cc6a0,_0x1c213a)=>{const _0x2c588a=_0x4d2e20;for(var _0x41f48c=_0x1c213a>0x1?void 0x0:_0x1c213a?k(_0x38c19e,_0x2cc6a0):_0x38c19e,_0x17145d=_0x48d222[_0x2c588a(0x1e2)]-0x1,_0x51004c;_0x17145d>=0x0;_0x17145d--)(_0x51004c=_0x48d222[_0x17145d])&&(_0x41f48c=_0x51004c(_0x41f48c)||_0x41f48c);return _0x41f48c;},b=(_0x16f689,_0x423d00)=>(_0x1733c2,_0x53d984)=>_0x423d00(_0x1733c2,_0x53d984,_0x16f689);function X(_0x1a17b9,_0x352c15){const _0x18c2b8=_0x4d2e20,_0x355433=_0x1a17b9[_0x18c2b8(0x242)][0x0];return{..._0x352c15,'id':_0x355433[_0x18c2b8(0x22c)],'resolved':_0x1a17b9[_0x18c2b8(0x230)]===0x1,'dT':y(_0x355433['createTimestamp']),'personId':_0x355433[_0x18c2b8(0x212)],'threadId':_0x355433[_0x18c2b8(0x218)]};}function ee(_0x9ed2aa,_0x504553,_0x134bc9){const _0x5c6437=_0x4d2e20;var _0x5aed1f,_0x2c3a92;if(((_0x2c3a92=(_0x5aed1f=_0x9ed2aa==null?void 0x0:_0x9ed2aa['replies'])==null?void 0x0:_0x5aed1f[_0x5c6437(0x1e2)])!=null?_0x2c3a92:0x0)>0x0){const _0x2744b5=(_0x55b3bc,_0xfb8160)=>({'id':_0x55b3bc[_0x5c6437(0x22c)],'threadId':_0x55b3bc[_0x5c6437(0x218)],'dT':y(_0x55b3bc[_0x5c6437(0x21c)]),'personId':_0x55b3bc[_0x5c6437(0x212)],'resolved':_0x9ed2aa[_0x5c6437(0x230)]===I[_0x5c6437(0x203)],'unitId':_0x504553,'subUnitId':_0x134bc9,'text':JSON['parse'](_0x55b3bc[_0x5c6437(0x23a)]),'parentId':_0xfb8160}),_0x1435e5=_0x2744b5(_0x9ed2aa[_0x5c6437(0x242)][0x0]);return{..._0x1435e5,'children':_0x9ed2aa[_0x5c6437(0x242)][_0x5c6437(0x1fe)](0x1)[_0x5c6437(0x223)](_0x1b64d4=>_0x2744b5(_0x1b64d4,_0x1435e5['id']))};}return null;}let S=class{constructor(_0x131e3c,_0x602336,_0x2f8855){const _0xf2ef70=_0x4d2e20;this[_0xf2ef70(0x211)]=_0x131e3c,this[_0xf2ef70(0x213)]=_0x602336,this[_0xf2ef70(0x1ec)]=_0x2f8855;}async[_0x4d2e20(0x233)](_0x10490f){const _0x52f44a=_0x4d2e20;var _0x2a0754,_0x50961e;const {parentId:_0x429d2f,unitId:_0x5db86a,text:_0x32b385,threadId:_0x499f76}=_0x10490f,_0x3fb551=(_0x50961e=(_0x2a0754=_0x32b385['customRanges'])==null?void 0x0:_0x2a0754[_0x52f44a(0x236)](_0x53c8aa=>_0x53c8aa[_0x52f44a(0x219)]===_0xafaec[_0x52f44a(0x1f0)])[_0x52f44a(0x223)](_0xf8f2bb=>_0xf8f2bb[_0x52f44a(0x20c)]))!=null?_0x50961e:[],_0x5ad5e1=JSON[_0x52f44a(0x231)](_0x32b385),_0x1e5a88=(await this[_0x52f44a(0x1ec)]['requireSession'](_0x5db86a))[_0x52f44a(0x247)]();if(_0x429d2f){const _0x5d43b9={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551,'threadId':_0x499f76},_0x12834a=(await this['_httpService']['post'](_0x52f44a(0x214)+_0x5db86a+_0x52f44a(0x1eb),{'body':_0x5d43b9}))[_0x52f44a(0x22f)][_0x52f44a(0x20f)];return{..._0x10490f,'id':_0x12834a['replyId'],'dT':_0x5dad93(+_0x12834a[_0x52f44a(0x21c)])[_0x52f44a(0x20a)](_0x52f44a(0x217)),'personId':_0x12834a[_0x52f44a(0x212)]};}else{const _0x288287={'memberId':_0x1e5a88,'unitId':_0x5db86a,'content':_0x5ad5e1,'mention':_0x3fb551},_0x3f4bfb=await this[_0x52f44a(0x211)]['post']('/universer-api/comment/unit/'+_0x5db86a+_0x52f44a(0x221),{'body':_0x288287});return X(_0x3f4bfb[_0x52f44a(0x22f)][_0x52f44a(0x210)],_0x10490f);}}async[_0x4d2e20(0x1ea)](_0xdf93f4){const _0x5ad989=_0x4d2e20;var _0xb85e03,_0x1d6a4b;const {text:_0x519185,unitId:_0x278486}=_0xdf93f4,_0x2b9d22=(_0x1d6a4b=(_0xb85e03=_0x519185[_0x5ad989(0x207)])==null?void 0x0:_0xb85e03[_0x5ad989(0x236)](_0x2f0225=>_0x2f0225[_0x5ad989(0x219)]===_0xafaec[_0x5ad989(0x1f0)])['map'](_0x29f3e5=>_0x29f3e5[_0x5ad989(0x20c)]))!=null?_0x1d6a4b:[],_0x219325=JSON[_0x5ad989(0x231)](_0x519185),_0x520dd1=_0xdf93f4[_0x5ad989(0x218)],_0x13cf53=_0xdf93f4['id'],_0xf8636={'memberId':(await this[_0x5ad989(0x1ec)]['requireSession'](_0x278486))[_0x5ad989(0x247)](),'unitId':_0x278486,'threadId':_0x520dd1,'mention':_0x2b9d22,'content':_0x219325,'replyId':_0x13cf53},_0x182ced=await this[_0x5ad989(0x211)][_0x5ad989(0x22e)](_0x5ad989(0x214)+_0x278486+_0x5ad989(0x235),{'body':_0xf8636});return!_0x182ced['body'][_0x5ad989(0x1ff)]||_0x182ced['body']['error']['code']===0x1;}async[_0x4d2e20(0x239)](_0x444a8a){const _0x169b9a=_0x4d2e20,{unitId:_0xf007ff}=_0x444a8a,_0x4563f1=_0x444a8a['threadId'],_0x32cfdf={'memberId':this[_0x169b9a(0x213)][_0x169b9a(0x1e1)]()[_0x169b9a(0x1ed)],'unitId':_0xf007ff,'threadId':_0x4563f1,'solved':_0x444a8a[_0x169b9a(0x206)]?I[_0x169b9a(0x203)]:I[_0x169b9a(0x1e4)]},_0xa8313c=await this[_0x169b9a(0x211)]['post']('/universer-api/comment/unit/'+_0xf007ff+_0x169b9a(0x1e0),{'body':_0x32cfdf});return!_0xa8313c[_0x169b9a(0x22f)][_0x169b9a(0x1ff)]||_0xa8313c[_0x169b9a(0x22f)]['error'][_0x169b9a(0x1ee)]===0x1;}async[_0x4d2e20(0x1e9)](_0x571af0,_0x43592a,_0x462bc2,_0x492ab5){const _0x4f1bd3=_0x4d2e20,_0x50d2cd={'memberId':(await this['_sessionService'][_0x4f1bd3(0x21d)](_0x571af0))['getMemberID'](),'threadId':_0x462bc2,'replyId':_0x492ab5,'unitId':_0x571af0},_0x2f7be5=await this[_0x4f1bd3(0x211)][_0x4f1bd3(0x22e)](_0x4f1bd3(0x214)+_0x571af0+_0x4f1bd3(0x1f9),{'body':_0x50d2cd});return!_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)]||_0x2f7be5[_0x4f1bd3(0x22f)][_0x4f1bd3(0x1ff)][_0x4f1bd3(0x1ee)]===0x1;}async[_0x4d2e20(0x23d)](_0x1b47ed,_0x27fcb7,_0x4d8531){const _0x3b273c=_0x4d2e20,_0x5bd317={'unitId':_0x1b47ed,'threadId':_0x4d8531},_0x5e729e=await this['_httpService'][_0x3b273c(0x22e)]('/universer-api/comment/unit/'+_0x1b47ed+'/list',{'body':_0x5bd317}),_0x394e1b=_0x4d8531['map'](_0x23f44c=>ee(_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x1e6)][_0x23f44c],_0x1b47ed,_0x27fcb7))[_0x3b273c(0x236)](Boolean);return Object[_0x3b273c(0x1fd)](_0x5e729e[_0x3b273c(0x22f)][_0x3b273c(0x23e)])['forEach'](_0x2e4232=>{const _0x241826=_0x3b273c;this[_0x241826(0x213)][_0x241826(0x215)](_0x2e4232);}),_0x394e1b;}[_0x4d2e20(0x240)](_0x4400c7){const _0x4b7d90=_0x4d2e20;return{'id':_0x4400c7['id'],'threadId':_0x4400c7[_0x4b7d90(0x218)],'ref':_0x4400c7[_0x4b7d90(0x220)]};}};S=Q([b(0x0,_0x4c6c26(_0xd4ec99)),b(0x1,_0x4c6c26(_0x118a51)),b(0x2,_0x4c6c26(_0x3b3256))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x44e879,_0x4fcdbe,_0x1c7167,_0x143469)=>{for(var _0x11d2ac=_0x143469>0x1?void 0x0:_0x143469?re(_0x4fcdbe,_0x1c7167):_0x4fcdbe,_0x58b59b=_0x44e879['length']-0x1,_0x171a5a;_0x58b59b>=0x0;_0x58b59b--)(_0x171a5a=_0x44e879[_0x58b59b])&&(_0x11d2ac=_0x171a5a(_0x11d2ac)||_0x11d2ac);return _0x11d2ac;},M=(_0x4eb3b0,_0x10d459)=>(_0x3001bb,_0xf11f37)=>_0x10d459(_0x3001bb,_0xf11f37,_0x4eb3b0);let f=class extends _0x2793c2{constructor(_0x2201ac,_0x3bc853){const _0x59e9a2=_0x4d2e20;super(),this[_0x59e9a2(0x225)]=_0x2201ac,this[_0x59e9a2(0x1e3)]=_0x3bc853,this[_0x59e9a2(0x1e8)]();}[_0x4d2e20(0x1e8)](){const _0x20e137=_0x4d2e20;this[_0x20e137(0x225)][_0x20e137(0x23b)]=this[_0x20e137(0x1e3)],this[_0x20e137(0x225)][_0x20e137(0x1e7)]=!0x1;}};f=te([M(0x0,_0x447bb4),M(0x1,_0x4c6c26(S))],f);var se=Object['defineProperty'],oe=Object[_0x4d2e20(0x246)],ne=(_0x3e317c,_0x5a5b85,_0x58cc0e)=>_0x5a5b85 in _0x3e317c?se(_0x3e317c,_0x5a5b85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58cc0e}):_0x3e317c[_0x5a5b85]=_0x58cc0e,ie=(_0x454514,_0x532e98,_0x3a6e9f,_0x2b34e5)=>{const _0x3e4b0a=_0x4d2e20;for(var _0x56bdfd=_0x2b34e5>0x1?void 0x0:_0x2b34e5?oe(_0x532e98,_0x3a6e9f):_0x532e98,_0x5e7356=_0x454514[_0x3e4b0a(0x1e2)]-0x1,_0x39ef6b;_0x5e7356>=0x0;_0x5e7356--)(_0x39ef6b=_0x454514[_0x5e7356])&&(_0x56bdfd=_0x39ef6b(_0x56bdfd)||_0x56bdfd);return _0x56bdfd;},N=(_0x331e3f,_0x394ad6)=>(_0x1f659f,_0x3c1883)=>_0x394ad6(_0x1f659f,_0x3c1883,_0x331e3f),$=(_0x3d7dcb,_0x24dd78,_0x1460f6)=>ne(_0x3d7dcb,typeof _0x24dd78!=_0x4d2e20(0x244)?_0x24dd78+'':_0x24dd78,_0x1460f6);let g=class extends _0x3692f7{constructor(_0x51b7e7=O,_0x58baa4,_0x3ffb30){const _0x47fcf1=_0x4d2e20;super(),this['_config']=_0x51b7e7,this[_0x47fcf1(0x1ef)]=_0x58baa4,this[_0x47fcf1(0x20b)]=_0x3ffb30;const {..._0x4b2fe8}=_0x37574b({},O,this[_0x47fcf1(0x1f5)]);this[_0x47fcf1(0x20b)]['setConfig'](z,_0x4b2fe8);}[_0x4d2e20(0x245)](){[[S],[f],[_]]['forEach'](_0x298a5c=>{const _0x4baa19=_0x14b4;this[_0x4baa19(0x1ef)][_0x4baa19(0x1fb)](_0x298a5c);});}[_0x4d2e20(0x202)](){const _0x36ceee=_0x4d2e20;this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](f),this[_0x36ceee(0x1ef)][_0x36ceee(0x226)](_);}};$(g,_0x4d2e20(0x21b),W),$(g,'type',_0xbfac25[_0x4d2e20(0x1fc)]),g=ie([_0x5a8c90(_0x39222f,_0xfff223,_0x593ad9),N(0x1,_0x4c6c26(_0x6d6cf3)),N(0x2,_0x136898)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x531e(_0x11f09a,_0x1c2815){const _0x31f2a5=_0x31f2();return _0x531e=function(_0x531e6f,_0x2cf021){_0x531e6f=_0x531e6f-0x164;let _0x267329=_0x31f2a5[_0x531e6f];return _0x267329;},_0x531e(_0x11f09a,_0x1c2815);}function _0x31f2(){const _0x148c2f=['Disposable','Reply','values','userId','delete','_init','rangeType','stringify','82110fzyBQw','UniverProCollaborationClient','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','pluginName','@univerjs/thread-comment','_injector','content','addUser','replies','thread-comment-data-source.config','rxjs','COMMENT','toStringTag','symbol','amd','/edit','syncUpdateMutationToColla','6435304ocKvyU','UniverThreadComment','function','3654189xOfFcl','get','getMemberID','threadId','type','_threadCommentDataSourceService','parse','dayjs','disposeWithMe','customRanges','saveCommentToSnapshot','getCurrentUser','4208118fmDJmf','6033935UgBFlq','UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','createTimestamp','UniverThreadCommentDataSourcePlugin','root','CustomRangeType','getUser','unitId','ThreadCommentModel','replyId','Plugin','UNRECOGNIZED','IThreadCommentDataSourceService','commentUpdate$','Unknown','_userService','users','IConfigService','user','Solve','listComments','solved','personId','/universer-api/comment/unit/','setConfig','/add','deleteComment','onReady','Add','userID','14228262Giappk','map','YYYY/MM/DD\x20HH:mm','post','subscribe','add','ref','Edit','forEach','4STaVSJ','/reply','OpenOrReOpen','HTTPService','/universer-api/user/list','_threadCommentModel','@univerjs-pro/collaboration-client','resolved','addComment','pipe','UniverLicensePlugin','_config','_httpService','12XZZefn','UserManagerService','_initUserSync','@univerjs-pro/license','defineProperty','/solved','_threadCommentDataSource','Solved','filter','_commentService','1249523dAfPSt','format','UniverNetwork','getUnit','resolveComment','length','reply','size','rangeId','comment','merge','bufferTime','UNIVER_UNKNOWN','CommentService','code','@univerjs/core','parentId','object','CollaborationSessionService','_configService','find','error','getOwnPropertyDescriptor','onStarting','_sessionService','_initDataSource','requireSession','DependentOn','Injector','Inject','UniverInstanceType','body','slice','updateComment'];_0x31f2=function(){return _0x148c2f;};return _0x31f2();}(function(_0x3580a0,_0x5ebb89){const _0x3ab3e5=_0x531e,_0x5e791e=_0x3580a0();while(!![]){try{const _0x59ed77=parseInt(_0x3ab3e5(0x1b0))/0x1+-parseInt(_0x3ab3e5(0x1da))/0x2+-parseInt(_0x3ab3e5(0x170))/0x3*(parseInt(_0x3ab3e5(0x199))/0x4)+parseInt(_0x3ab3e5(0x171))/0x5+-parseInt(_0x3ab3e5(0x1a6))/0x6*(parseInt(_0x3ab3e5(0x164))/0x7)+-parseInt(_0x3ab3e5(0x1ec))/0x8+parseInt(_0x3ab3e5(0x190))/0x9;if(_0x59ed77===_0x5ebb89)break;else _0x5e791e['push'](_0x5e791e['shift']());}catch(_0x579d5c){_0x5e791e['push'](_0x5e791e['shift']());}}}(_0x31f2,0xb5e28),function(_0x2f98bd,_0x4bc9cd){const _0x56475a=_0x531e;typeof exports==_0x56475a(0x1c1)&&typeof module<'u'?_0x4bc9cd(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==_0x56475a(0x1ee)&&define[_0x56475a(0x1e9)]?define(['exports',_0x56475a(0x19f),_0x56475a(0x1a9),_0x56475a(0x1bf),'@univerjs/thread-comment-ui',_0x56475a(0x1df),_0x56475a(0x1e5),'@univerjs/network'],_0x4bc9cd):(_0x2f98bd=typeof globalThis<'u'?globalThis:_0x2f98bd||self,_0x4bc9cd(_0x2f98bd[_0x56475a(0x173)]={},_0x2f98bd[_0x56475a(0x1db)],_0x2f98bd['UniverProLicense'],_0x2f98bd['UniverCore'],_0x2f98bd['UniverThreadCommentUi'],_0x2f98bd[_0x56475a(0x1ed)],_0x2f98bd['rxjs'],_0x2f98bd[_0x56475a(0x1b2)]));}(this,function(_0x5b48c7,_0x470d10,_0x1ed3ec,_0x5e7100,_0x383fea,_0x4c2b6e,_0x5475ba,_0x407610){'use strict';const _0xf3c7d4=_0x531e;const _0xaafc86=_0xf3c7d4(0x1dc);var _0x2b17c2=(_0x5907a1=>(_0x5907a1[_0x5907a1[_0xf3c7d4(0x19b)]=0x0]='OpenOrReOpen',_0x5907a1[_0x5907a1[_0xf3c7d4(0x1ad)]=0x1]='Solved',_0x5907a1[_0x5907a1['UNRECOGNIZED']=-0x1]=_0xf3c7d4(0x17d),_0x5907a1))(_0x2b17c2||{}),_0x2c2130=(_0x50f800=>(_0x50f800[_0x50f800[_0xf3c7d4(0x180)]=0x0]=_0xf3c7d4(0x180),_0x50f800[_0x50f800[_0xf3c7d4(0x18e)]=0x1]=_0xf3c7d4(0x18e),_0x50f800[_0x50f800['Reply']=0x2]='Reply',_0x50f800[_0x50f800['Edit']=0x3]=_0xf3c7d4(0x197),_0x50f800[_0x50f800[_0xf3c7d4(0x1dd)]=0x4]='Delete',_0x50f800[_0x50f800[_0xf3c7d4(0x185)]=0x5]=_0xf3c7d4(0x185),_0x50f800[_0x50f800[_0xf3c7d4(0x17d)]=-0x1]='UNRECOGNIZED',_0x50f800))(_0x2c2130||{});const _0x40551a=_0xa49850=>_0x5e7100['dayjs'](new Date(+_0xa49850))[_0xf3c7d4(0x1b1)]('YYYY/MM/DD\x20HH:mm'),_0x49e072=async(_0xccce41,_0x43fd96)=>{const _0x2e0f1a=_0xf3c7d4,_0x4019f4=_0xccce41[_0x2e0f1a(0x165)](_0x5e7100['UserManagerService']),_0x3b9918=_0xccce41[_0x2e0f1a(0x165)](_0x407610['HTTPService']);_0x43fd96[_0x2e0f1a(0x198)](_0x395de1=>{const _0x4ba982=_0x2e0f1a;_0x4019f4[_0x4ba982(0x178)](_0x395de1)&&_0x43fd96[_0x4ba982(0x1d6)](_0x395de1);}),_0x43fd96[_0x2e0f1a(0x1b7)]&&(await _0x3b9918[_0x2e0f1a(0x165)](_0x2e0f1a(0x19d),{'params':{'userIDs':[..._0x43fd96]}}))['body']['users']['forEach'](_0x40b26b=>{_0x40b26b&&_0x4019f4['addUser'](_0x40b26b);});};var _0x1aadea=Object[_0xf3c7d4(0x1c6)],_0x40d312=(_0x3c8d19,_0x1b0eeb,_0x59357a,_0x57d297)=>{const _0x251c48=_0xf3c7d4;for(var _0x2da6fc=_0x57d297>0x1?void 0x0:_0x57d297?_0x1aadea(_0x1b0eeb,_0x59357a):_0x1b0eeb,_0x2ae512=_0x3c8d19[_0x251c48(0x1b5)]-0x1,_0x34eef1;_0x2ae512>=0x0;_0x2ae512--)(_0x34eef1=_0x3c8d19[_0x2ae512])&&(_0x2da6fc=_0x34eef1(_0x2da6fc)||_0x2da6fc);return _0x2da6fc;},_0x1a9ad0=(_0x33d87d,_0x5052dd)=>(_0x50540f,_0x122908)=>_0x5052dd(_0x50540f,_0x122908,_0x33d87d);let _0x6554da=class extends _0x5e7100[_0xf3c7d4(0x1d2)]{constructor(_0x45b31c,_0x4f531c,_0x1979d6,_0x2f165d){const _0x5f141f=_0xf3c7d4;super(),this[_0x5f141f(0x1af)]=_0x45b31c,this['_threadCommentModel']=_0x4f531c,this[_0x5f141f(0x181)]=_0x1979d6,this[_0x5f141f(0x1e0)]=_0x2f165d,this[_0x5f141f(0x1d7)](),this[_0x5f141f(0x1a8)]();}['_initUserSync'](){const _0x61c896=_0xf3c7d4;this[_0x61c896(0x16c)](this['_threadCommentModel'][_0x61c896(0x17f)][_0x61c896(0x1a2)](_0x5475ba[_0x61c896(0x1bb)](0x10))[_0x61c896(0x194)](_0x2d896b=>{const _0x495cee=_0x61c896,_0x10f326=new Set();_0x2d896b['forEach'](_0x1fd75c=>{const _0x1ff142=_0x531e;switch(_0x1fd75c[_0x1ff142(0x168)]){case'add':{const _0x396edc=_0x1fd75c['payload'][_0x1ff142(0x188)];_0x10f326[_0x1ff142(0x195)](_0x396edc);break;}}}),_0x49e072(this[_0x495cee(0x1e0)],_0x10f326);}));}[_0xf3c7d4(0x1d7)](){const _0xeb5798=_0xf3c7d4;this[_0xeb5798(0x16c)](this[_0xeb5798(0x1af)][_0xeb5798(0x17f)][_0xeb5798(0x194)](async _0x27b9ee=>{const _0x4ec71d=_0xeb5798;var _0x12ca04,_0x4542a7,_0x3d3061,_0x2907e8;const _0x461e08=(_0x12ca04=this[_0x4ec71d(0x19e)][_0x4ec71d(0x1b3)](_0x27b9ee[_0x4ec71d(0x179)])[_0x4ec71d(0x1c4)](_0x4ee6d1=>_0x4ee6d1[_0x4ec71d(0x167)]===_0x27b9ee[_0x4ec71d(0x167)]))==null?void 0x0:_0x12ca04['root'];if(!_0x461e08)return;const {unitId:_0x437311,subUnitId:_0x169f0a}=_0x461e08;switch(_0x27b9ee[_0x4ec71d(0x184)]&&this[_0x4ec71d(0x181)][_0x4ec71d(0x1e2)](_0x27b9ee[_0x4ec71d(0x184)]),_0x27b9ee[_0x4ec71d(0x168)]){case _0x2c2130[_0x4ec71d(0x18e)]:break;case _0x2c2130[_0x4ec71d(0x1d3)]:{this[_0x4ec71d(0x19e)]['addComment'](_0x437311,_0x169f0a,{'unitId':_0x437311,'subUnitId':_0x169f0a,'ref':'','id':_0x27b9ee[_0x4ec71d(0x17b)],'dT':_0x40551a(+_0x27b9ee['createTimestamp']),'threadId':_0x27b9ee[_0x4ec71d(0x167)],'personId':(_0x3d3061=(_0x4542a7=_0x27b9ee[_0x4ec71d(0x184)])==null?void 0x0:_0x4542a7[_0x4ec71d(0x18f)])!=null?_0x3d3061:_0x27b9ee[_0x4ec71d(0x1d5)],'text':JSON['parse'](_0x27b9ee[_0x4ec71d(0x1e1)]),'parentId':_0x461e08['id']});break;}case _0x2c2130[_0x4ec71d(0x1dd)]:{const _0x6af85c=this[_0x4ec71d(0x19e)]['getComment'](_0x437311,_0x169f0a,_0x27b9ee[_0x4ec71d(0x17b)]);_0x6af85c&&_0x6af85c[_0x4ec71d(0x1c0)]&&this[_0x4ec71d(0x19e)][_0x4ec71d(0x18c)](_0x437311,_0x169f0a,_0x27b9ee['replyId']);break;}case _0x2c2130[_0x4ec71d(0x197)]:{this[_0x4ec71d(0x19e)][_0x4ec71d(0x1d1)](_0x437311,_0x169f0a,{'commentId':_0x27b9ee['replyId'],'text':JSON[_0x4ec71d(0x16a)](_0x27b9ee[_0x4ec71d(0x1e1)])});break;}case _0x2c2130[_0x4ec71d(0x185)]:{const _0x166ca7=(_0x2907e8=this[_0x4ec71d(0x19e)][_0x4ec71d(0x1b3)](_0x27b9ee[_0x4ec71d(0x179)])[_0x4ec71d(0x1c4)](_0x20adcf=>_0x20adcf[_0x4ec71d(0x167)]===_0x27b9ee[_0x4ec71d(0x167)]))==null?void 0x0:_0x2907e8[_0x4ec71d(0x176)];_0x166ca7&&this[_0x4ec71d(0x19e)]['resolveComment'](_0x437311,_0x169f0a,_0x166ca7['id'],_0x27b9ee['solved']===_0x2b17c2[_0x4ec71d(0x1ad)]);break;}}}));}};_0x6554da=_0x40d312([_0x1a9ad0(0x0,_0x5e7100[_0xf3c7d4(0x1cd)](_0x470d10[_0xf3c7d4(0x1bd)])),_0x1a9ad0(0x1,_0x5e7100[_0xf3c7d4(0x1cd)](_0x4c2b6e[_0xf3c7d4(0x17a)])),_0x1a9ad0(0x2,_0x5e7100[_0xf3c7d4(0x1cd)](_0x5e7100[_0xf3c7d4(0x1a7)])),_0x1a9ad0(0x3,_0x5e7100['Inject'](_0x5e7100[_0xf3c7d4(0x1cc)]))],_0x6554da);const _0x219bc2=_0xf3c7d4(0x1e4),_0x4fc848={};var _0x318725=Object['getOwnPropertyDescriptor'],_0x1bb774=(_0x4bfcbf,_0x1ee5ca,_0x26b75f,_0x370100)=>{const _0xde1b31=_0xf3c7d4;for(var _0x5a9051=_0x370100>0x1?void 0x0:_0x370100?_0x318725(_0x1ee5ca,_0x26b75f):_0x1ee5ca,_0x2c10d2=_0x4bfcbf[_0xde1b31(0x1b5)]-0x1,_0x26ba28;_0x2c10d2>=0x0;_0x2c10d2--)(_0x26ba28=_0x4bfcbf[_0x2c10d2])&&(_0x5a9051=_0x26ba28(_0x5a9051)||_0x5a9051);return _0x5a9051;},_0x1e4f59=(_0x2eea14,_0x11d3d2)=>(_0xc7abfb,_0x54747e)=>_0x11d3d2(_0xc7abfb,_0x54747e,_0x2eea14);function _0x58c8a1(_0x2ca804,_0x479009){const _0xd77a84=_0xf3c7d4,_0x1a3f26=_0x2ca804['replies'][0x0];return{..._0x479009,'id':_0x1a3f26['replyId'],'resolved':_0x2ca804[_0xd77a84(0x187)]===0x1,'dT':_0x40551a(_0x1a3f26[_0xd77a84(0x174)]),'personId':_0x1a3f26['userId'],'threadId':_0x1a3f26[_0xd77a84(0x167)]};}function _0x337c7d(_0x1b7738,_0x458be8,_0x455e18){const _0x132e8a=_0xf3c7d4;var _0x1ab6db,_0x312559;if(((_0x312559=(_0x1ab6db=_0x1b7738==null?void 0x0:_0x1b7738['replies'])==null?void 0x0:_0x1ab6db[_0x132e8a(0x1b5)])!=null?_0x312559:0x0)>0x0){const _0x2a9c4e=(_0x1fbd0b,_0x59a172)=>({'id':_0x1fbd0b[_0x132e8a(0x17b)],'threadId':_0x1fbd0b[_0x132e8a(0x167)],'dT':_0x40551a(_0x1fbd0b[_0x132e8a(0x174)]),'personId':_0x1fbd0b[_0x132e8a(0x1d5)],'resolved':_0x1b7738[_0x132e8a(0x187)]===_0x2b17c2[_0x132e8a(0x1ad)],'unitId':_0x458be8,'subUnitId':_0x455e18,'text':JSON['parse'](_0x1fbd0b[_0x132e8a(0x1e1)]),'parentId':_0x59a172}),_0x5739dc=_0x2a9c4e(_0x1b7738['replies'][0x0]);return{..._0x5739dc,'children':_0x1b7738[_0x132e8a(0x1e3)][_0x132e8a(0x1d0)](0x1)[_0x132e8a(0x191)](_0x5b73b9=>_0x2a9c4e(_0x5b73b9,_0x5739dc['id']))};}return null;}let _0x42bb4d=class{constructor(_0x194449,_0x2b1b88,_0x190827){const _0x209a96=_0xf3c7d4;this['_httpService']=_0x194449,this['_userService']=_0x2b1b88,this[_0x209a96(0x1c8)]=_0x190827;}async[_0xf3c7d4(0x1a1)](_0x280407){const _0x28d1b7=_0xf3c7d4;var _0x4b15ad,_0x237154;const {parentId:_0x2261d7,unitId:_0x525d49,text:_0x474ee1,threadId:_0x2c3fcd}=_0x280407,_0xb820b=(_0x237154=(_0x4b15ad=_0x474ee1[_0x28d1b7(0x16d)])==null?void 0x0:_0x4b15ad[_0x28d1b7(0x1ae)](_0x3f60a5=>_0x3f60a5[_0x28d1b7(0x1d8)]===_0x5e7100[_0x28d1b7(0x177)][_0x28d1b7(0x1e6)])[_0x28d1b7(0x191)](_0x40b87f=>_0x40b87f[_0x28d1b7(0x1b8)]))!=null?_0x237154:[],_0xf21d57=JSON[_0x28d1b7(0x1d9)](_0x474ee1),_0x15ec1c=(await this[_0x28d1b7(0x1c8)][_0x28d1b7(0x1ca)](_0x525d49))['getMemberID']();if(_0x2261d7){const _0x41489b={'memberId':_0x15ec1c,'unitId':_0x525d49,'content':_0xf21d57,'mention':_0xb820b,'threadId':_0x2c3fcd},_0x96e282=(await this[_0x28d1b7(0x1a5)]['post'](_0x28d1b7(0x189)+_0x525d49+_0x28d1b7(0x19a),{'body':_0x41489b}))[_0x28d1b7(0x1cf)][_0x28d1b7(0x1b6)];return{..._0x280407,'id':_0x96e282['replyId'],'dT':_0x5e7100[_0x28d1b7(0x16b)](+_0x96e282['createTimestamp'])[_0x28d1b7(0x1b1)](_0x28d1b7(0x192)),'personId':_0x96e282[_0x28d1b7(0x1d5)]};}else{const _0x3cd8d6={'memberId':_0x15ec1c,'unitId':_0x525d49,'content':_0xf21d57,'mention':_0xb820b},_0x4deb82=await this[_0x28d1b7(0x1a5)][_0x28d1b7(0x193)](_0x28d1b7(0x189)+_0x525d49+_0x28d1b7(0x18b),{'body':_0x3cd8d6});return _0x58c8a1(_0x4deb82[_0x28d1b7(0x1cf)][_0x28d1b7(0x1b9)],_0x280407);}}async[_0xf3c7d4(0x1d1)](_0x598c73){const _0x4a1564=_0xf3c7d4;var _0x15b336,_0x153afa;const {text:_0x972aa6,unitId:_0x1ad2a3}=_0x598c73,_0x6d66f7=(_0x153afa=(_0x15b336=_0x972aa6['customRanges'])==null?void 0x0:_0x15b336[_0x4a1564(0x1ae)](_0x141919=>_0x141919[_0x4a1564(0x1d8)]===_0x5e7100['CustomRangeType']['COMMENT'])[_0x4a1564(0x191)](_0x331791=>_0x331791[_0x4a1564(0x1b8)]))!=null?_0x153afa:[],_0x302e8f=JSON[_0x4a1564(0x1d9)](_0x972aa6),_0x3a437b=_0x598c73[_0x4a1564(0x167)],_0x262cc7=_0x598c73['id'],_0x58e24d={'memberId':(await this[_0x4a1564(0x1c8)]['requireSession'](_0x1ad2a3))[_0x4a1564(0x166)](),'unitId':_0x1ad2a3,'threadId':_0x3a437b,'mention':_0x6d66f7,'content':_0x302e8f,'replyId':_0x262cc7},_0x203487=await this[_0x4a1564(0x1a5)][_0x4a1564(0x193)]('/universer-api/comment/unit/'+_0x1ad2a3+_0x4a1564(0x1ea),{'body':_0x58e24d});return!_0x203487[_0x4a1564(0x1cf)]['error']||_0x203487[_0x4a1564(0x1cf)]['error'][_0x4a1564(0x1be)]===0x1;}async[_0xf3c7d4(0x1b4)](_0x44bf3){const _0x55ce98=_0xf3c7d4,{unitId:_0x1fba46}=_0x44bf3,_0x3019db=_0x44bf3['threadId'],_0x2948da={'memberId':this['_userService'][_0x55ce98(0x16f)]()[_0x55ce98(0x18f)],'unitId':_0x1fba46,'threadId':_0x3019db,'solved':_0x44bf3[_0x55ce98(0x1a0)]?_0x2b17c2['Solved']:_0x2b17c2[_0x55ce98(0x19b)]},_0x5cf8be=await this[_0x55ce98(0x1a5)][_0x55ce98(0x193)]('/universer-api/comment/unit/'+_0x1fba46+_0x55ce98(0x1ab),{'body':_0x2948da});return!_0x5cf8be[_0x55ce98(0x1cf)][_0x55ce98(0x1c5)]||_0x5cf8be[_0x55ce98(0x1cf)]['error'][_0x55ce98(0x1be)]===0x1;}async['deleteComment'](_0x5b8580,_0x2ed8f6,_0x39120c,_0x133a2e){const _0x5c5a3d=_0xf3c7d4,_0x9a2806={'memberId':(await this[_0x5c5a3d(0x1c8)]['requireSession'](_0x5b8580))[_0x5c5a3d(0x166)](),'threadId':_0x39120c,'replyId':_0x133a2e,'unitId':_0x5b8580},_0x2951eb=await this['_httpService'][_0x5c5a3d(0x193)](_0x5c5a3d(0x189)+_0x5b8580+'/delete',{'body':_0x9a2806});return!_0x2951eb[_0x5c5a3d(0x1cf)][_0x5c5a3d(0x1c5)]||_0x2951eb[_0x5c5a3d(0x1cf)]['error'][_0x5c5a3d(0x1be)]===0x1;}async[_0xf3c7d4(0x186)](_0x51821c,_0x25c947,_0x20e82f){const _0x5735e9=_0xf3c7d4,_0x39fe88={'unitId':_0x51821c,'threadId':_0x20e82f},_0x49ab25=await this[_0x5735e9(0x1a5)]['post']('/universer-api/comment/unit/'+_0x51821c+'/list',{'body':_0x39fe88}),_0x48ae00=_0x20e82f[_0x5735e9(0x191)](_0x26f163=>_0x337c7d(_0x49ab25[_0x5735e9(0x1cf)]['comments'][_0x26f163],_0x51821c,_0x25c947))[_0x5735e9(0x1ae)](Boolean);return Object[_0x5735e9(0x1d4)](_0x49ab25[_0x5735e9(0x1cf)][_0x5735e9(0x182)])['forEach'](_0x49967=>{const _0x19cfc6=_0x5735e9;this[_0x19cfc6(0x181)][_0x19cfc6(0x1e2)](_0x49967);}),_0x48ae00;}[_0xf3c7d4(0x16e)](_0x39c69c){const _0x5a14a9=_0xf3c7d4;return{'id':_0x39c69c['id'],'threadId':_0x39c69c[_0x5a14a9(0x167)],'ref':_0x39c69c[_0x5a14a9(0x196)]};}};_0x42bb4d=_0x1bb774([_0x1e4f59(0x0,_0x5e7100[_0xf3c7d4(0x1cd)](_0x407610[_0xf3c7d4(0x19c)])),_0x1e4f59(0x1,_0x5e7100['Inject'](_0x5e7100[_0xf3c7d4(0x1a7)])),_0x1e4f59(0x2,_0x5e7100[_0xf3c7d4(0x1cd)](_0x470d10[_0xf3c7d4(0x1c2)]))],_0x42bb4d);var _0x41fa43=Object[_0xf3c7d4(0x1c6)],_0xedbf09=(_0x40183d,_0x49dc06,_0x5edaf5,_0x1876b6)=>{const _0x270c30=_0xf3c7d4;for(var _0x173ad8=_0x1876b6>0x1?void 0x0:_0x1876b6?_0x41fa43(_0x49dc06,_0x5edaf5):_0x49dc06,_0x59a8c2=_0x40183d[_0x270c30(0x1b5)]-0x1,_0x23485f;_0x59a8c2>=0x0;_0x59a8c2--)(_0x23485f=_0x40183d[_0x59a8c2])&&(_0x173ad8=_0x23485f(_0x173ad8)||_0x173ad8);return _0x173ad8;},_0x314d24=(_0x3099ea,_0x378db6)=>(_0x5b3cc6,_0x28aee3)=>_0x378db6(_0x5b3cc6,_0x28aee3,_0x3099ea);let _0x160a28=class extends _0x5e7100[_0xf3c7d4(0x1d2)]{constructor(_0x2920af,_0x3e3135){const _0x74d45=_0xf3c7d4;super(),this[_0x74d45(0x169)]=_0x2920af,this[_0x74d45(0x1ac)]=_0x3e3135,this['_initDataSource']();}[_0xf3c7d4(0x1c9)](){const _0xad33b9=_0xf3c7d4;this[_0xad33b9(0x169)]['dataSource']=this[_0xad33b9(0x1ac)],this[_0xad33b9(0x169)][_0xad33b9(0x1eb)]=!0x1;}};_0x160a28=_0xedbf09([_0x314d24(0x0,_0x4c2b6e[_0xf3c7d4(0x17e)]),_0x314d24(0x1,_0x5e7100[_0xf3c7d4(0x1cd)](_0x42bb4d))],_0x160a28);var _0x31f8a1=Object['defineProperty'],_0x23a549=Object[_0xf3c7d4(0x1c6)],_0x5520c6=(_0x4ed928,_0x190503,_0xf98845)=>_0x190503 in _0x4ed928?_0x31f8a1(_0x4ed928,_0x190503,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf98845}):_0x4ed928[_0x190503]=_0xf98845,_0x8c300b=(_0x57b3b0,_0x40aa22,_0x2702fa,_0x2a340d)=>{const _0x179ad1=_0xf3c7d4;for(var _0x3823ff=_0x2a340d>0x1?void 0x0:_0x2a340d?_0x23a549(_0x40aa22,_0x2702fa):_0x40aa22,_0x43f75f=_0x57b3b0[_0x179ad1(0x1b5)]-0x1,_0x4c665c;_0x43f75f>=0x0;_0x43f75f--)(_0x4c665c=_0x57b3b0[_0x43f75f])&&(_0x3823ff=_0x4c665c(_0x3823ff)||_0x3823ff);return _0x3823ff;},_0x562052=(_0x2e86fb,_0x413577)=>(_0x1d8f72,_0x4da1eb)=>_0x413577(_0x1d8f72,_0x4da1eb,_0x2e86fb),_0x2507fa=(_0x48a3f0,_0x386b57,_0x1a188b)=>_0x5520c6(_0x48a3f0,typeof _0x386b57!=_0xf3c7d4(0x1e8)?_0x386b57+'':_0x386b57,_0x1a188b);_0x5b48c7[_0xf3c7d4(0x175)]=class extends _0x5e7100[_0xf3c7d4(0x17c)]{constructor(_0xba9962=_0x4fc848,_0x89cb44,_0x557549){const _0x366640=_0xf3c7d4;super(),this[_0x366640(0x1a4)]=_0xba9962,this[_0x366640(0x1e0)]=_0x89cb44,this[_0x366640(0x1c3)]=_0x557549;const {..._0x4e054f}=_0x5e7100[_0x366640(0x1ba)]({},_0x4fc848,this['_config']);this[_0x366640(0x1c3)][_0x366640(0x18a)](_0x219bc2,_0x4e054f);}[_0xf3c7d4(0x1c7)](){const _0xa724ad=_0xf3c7d4;[[_0x42bb4d],[_0x160a28],[_0x6554da]][_0xa724ad(0x198)](_0x33df5a=>{const _0x4e0dfa=_0xa724ad;this[_0x4e0dfa(0x1e0)][_0x4e0dfa(0x195)](_0x33df5a);});}[_0xf3c7d4(0x18d)](){const _0x36364e=_0xf3c7d4;this[_0x36364e(0x1e0)][_0x36364e(0x165)](_0x160a28),this[_0x36364e(0x1e0)]['get'](_0x6554da);}},_0x2507fa(_0x5b48c7['UniverThreadCommentDataSourcePlugin'],_0xf3c7d4(0x1de),_0xaafc86),_0x2507fa(_0x5b48c7['UniverThreadCommentDataSourcePlugin'],_0xf3c7d4(0x168),_0x5e7100[_0xf3c7d4(0x1ce)][_0xf3c7d4(0x1bc)]),_0x5b48c7[_0xf3c7d4(0x175)]=_0x8c300b([_0x5e7100[_0xf3c7d4(0x1cb)](_0x383fea[_0xf3c7d4(0x172)],_0x470d10['UniverCollaborationClientPlugin'],_0x1ed3ec[_0xf3c7d4(0x1a3)]),_0x562052(0x1,_0x5e7100[_0xf3c7d4(0x1cd)](_0x5e7100[_0xf3c7d4(0x1cc)])),_0x562052(0x2,_0x5e7100[_0xf3c7d4(0x183)])],_0x5b48c7[_0xf3c7d4(0x175)]),Object[_0xf3c7d4(0x1aa)](_0x5b48c7,Symbol[_0xf3c7d4(0x1e7)],{'value':'Module'});}));
|
|
1
|
+
function _0x2c79(){const _0x1b1f28=['customRanges','7880dRoauo','1UJfRzx','payload','CollaborationSessionService','dayjs','Plugin','Solved','CommentService','rxjs','symbol','delete','IConfigService','/delete','UniverThreadCommentUIPlugin','size','object','OpenOrReOpen','type','createTimestamp','UniverCore','Reply','_httpService','ref','merge','_configService','Edit','getMemberID','saveCommentToSnapshot','addUser','Add','forEach','unitId','@univerjs/core','pipe','_initUserSync','length','COMMENT','getOwnPropertyDescriptor','personId','deleteComment','defineProperty','thread-comment-data-source.config','exports','UniverProCollaborationClient','disposeWithMe','_sessionService','Delete','amd','UniverProLicense','_injector','/add','get','_threadCommentDataSourceService','UniverProThreadCommentDatasource','threadId','UniverThreadCommentUi','parentId','/universer-api/comment/unit/','addComment','@univerjs/thread-comment','289932QTNBHW','map','filter','reply','Solve','userId','getCurrentUser','replyId','users','updateComment','syncUpdateMutationToColla','content','349770oHPpIU','userID','error','getComment','UserManagerService','replies','572AIdxnB','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','onStarting','_threadCommentDataSource','requireSession','subscribe','root','_threadCommentModel','stringify','UniverNetwork','parse','format','commentUpdate$','comments','UniverLicensePlugin','post','dataSource','_config','resolveComment','Disposable','UniverThreadCommentDataSourcePlugin','UniverThreadComment','Unknown','user','resolved','HTTPService','Injector','2475312LHZrlL','body','UNRECOGNIZED','/universer-api/user/list','rangeType','Inject','ThreadCommentModel','Module','45oUXFOh','getUnit','6mnprBL','_userService','onReady','_commentService','code','add','/list','CustomRangeType','rangeId','@univerjs/thread-comment-ui','IThreadCommentDataSourceService','slice','_init','@univerjs-pro/license','values','1632617bCXOyw','pluginName','1221026muupiL','9922341vBVMmg'];_0x2c79=function(){return _0x1b1f28;};return _0x2c79();}function _0x3393(_0x21f317,_0x4d247c){const _0x2c7957=_0x2c79();return _0x3393=function(_0x3393f1,_0x5343dc){_0x3393f1=_0x3393f1-0x1e2;let _0x4017e3=_0x2c7957[_0x3393f1];return _0x4017e3;},_0x3393(_0x21f317,_0x4d247c);}(function(_0x1c16ed,_0x24d7d3){const _0x5716a6=_0x3393,_0x1faab0=_0x1c16ed();while(!![]){try{const _0x4c6fa5=-parseInt(_0x5716a6(0x201))/0x1*(parseInt(_0x5716a6(0x1fd))/0x2)+-parseInt(_0x5716a6(0x23c))/0x3+-parseInt(_0x5716a6(0x24e))/0x4*(-parseInt(_0x5716a6(0x200))/0x5)+-parseInt(_0x5716a6(0x1ec))/0x6*(parseInt(_0x5716a6(0x1fb))/0x7)+parseInt(_0x5716a6(0x1e2))/0x8+-parseInt(_0x5716a6(0x1ea))/0x9*(parseInt(_0x5716a6(0x248))/0xa)+parseInt(_0x5716a6(0x1fe))/0xb;if(_0x4c6fa5===_0x24d7d3)break;else _0x1faab0['push'](_0x1faab0['shift']());}catch(_0x555edb){_0x1faab0['push'](_0x1faab0['shift']());}}}(_0x2c79,0x4e804),function(_0x2c0849,_0x23fb5a){const _0x3ec13b=_0x3393;typeof exports==_0x3ec13b(0x20f)&&typeof module<'u'?_0x23fb5a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x3ec13b(0x22f)]?define([_0x3ec13b(0x22a),_0x3ec13b(0x24f),_0x3ec13b(0x1f9),_0x3ec13b(0x220),_0x3ec13b(0x1f5),_0x3ec13b(0x23b),'rxjs','@univerjs/network'],_0x23fb5a):(_0x2c0849=typeof globalThis<'u'?globalThis:_0x2c0849||self,_0x23fb5a(_0x2c0849[_0x3ec13b(0x235)]={},_0x2c0849[_0x3ec13b(0x22b)],_0x2c0849[_0x3ec13b(0x230)],_0x2c0849[_0x3ec13b(0x213)],_0x2c0849[_0x3ec13b(0x237)],_0x2c0849[_0x3ec13b(0x264)],_0x2c0849[_0x3ec13b(0x208)],_0x2c0849[_0x3ec13b(0x258)]));}(this,function(_0x256275,_0x271aba,_0x30cdcd,_0x5a07a9,_0x4c2680,_0x4cc5f5,_0x4f5e41,_0x476811){'use strict';const _0x19a2ad=_0x3393;const _0x257191='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1d7c20=(_0x3c18f1=>(_0x3c18f1[_0x3c18f1[_0x19a2ad(0x210)]=0x0]=_0x19a2ad(0x210),_0x3c18f1[_0x3c18f1[_0x19a2ad(0x206)]=0x1]=_0x19a2ad(0x206),_0x3c18f1[_0x3c18f1[_0x19a2ad(0x1e4)]=-0x1]='UNRECOGNIZED',_0x3c18f1))(_0x1d7c20||{}),_0x2d66f6=(_0x2a413e=>(_0x2a413e[_0x2a413e[_0x19a2ad(0x265)]=0x0]=_0x19a2ad(0x265),_0x2a413e[_0x2a413e['Add']=0x1]=_0x19a2ad(0x21d),_0x2a413e[_0x2a413e[_0x19a2ad(0x214)]=0x2]=_0x19a2ad(0x214),_0x2a413e[_0x2a413e['Edit']=0x3]=_0x19a2ad(0x219),_0x2a413e[_0x2a413e[_0x19a2ad(0x22e)]=0x4]=_0x19a2ad(0x22e),_0x2a413e[_0x2a413e[_0x19a2ad(0x240)]=0x5]=_0x19a2ad(0x240),_0x2a413e[_0x2a413e['UNRECOGNIZED']=-0x1]=_0x19a2ad(0x1e4),_0x2a413e))(_0x2d66f6||{});const _0x359ba0=_0x513d01=>_0x5a07a9[_0x19a2ad(0x204)](new Date(+_0x513d01))['format']('YYYY/MM/DD\x20HH:mm'),_0x1f5d1f=async(_0x4adbe6,_0x492ded)=>{const _0x3463a3=_0x19a2ad,_0x1c763b=_0x4adbe6[_0x3463a3(0x233)](_0x5a07a9[_0x3463a3(0x24c)]),_0x1eeb9a=_0x4adbe6[_0x3463a3(0x233)](_0x476811[_0x3463a3(0x268)]);_0x492ded[_0x3463a3(0x21e)](_0x126dd2=>{const _0x37e482=_0x3463a3;_0x1c763b['getUser'](_0x126dd2)&&_0x492ded[_0x37e482(0x20a)](_0x126dd2);}),_0x492ded[_0x3463a3(0x20e)]&&(await _0x1eeb9a[_0x3463a3(0x233)](_0x3463a3(0x1e5),{'params':{'userIDs':[..._0x492ded]}}))[_0x3463a3(0x1e3)][_0x3463a3(0x244)][_0x3463a3(0x21e)](_0x188e2e=>{const _0x24f2c4=_0x3463a3;_0x188e2e&&_0x1c763b[_0x24f2c4(0x21c)](_0x188e2e);});};var _0x893943=Object[_0x19a2ad(0x225)],_0x226db8=(_0x187eb3,_0x1588fa,_0x547ac0,_0xb6edec)=>{for(var _0x4b17f8=_0xb6edec>0x1?void 0x0:_0xb6edec?_0x893943(_0x1588fa,_0x547ac0):_0x1588fa,_0x2bdedb=_0x187eb3['length']-0x1,_0x48eae7;_0x2bdedb>=0x0;_0x2bdedb--)(_0x48eae7=_0x187eb3[_0x2bdedb])&&(_0x4b17f8=_0x48eae7(_0x4b17f8)||_0x4b17f8);return _0x4b17f8;},_0x219e01=(_0xa88f98,_0x2a5fd7)=>(_0x4aab3e,_0x27f968)=>_0x2a5fd7(_0x4aab3e,_0x27f968,_0xa88f98);let _0x4a6244=class extends _0x5a07a9[_0x19a2ad(0x262)]{constructor(_0x5d0295,_0x264fe0,_0x3460f0,_0x37c118){const _0x506773=_0x19a2ad;super(),this['_commentService']=_0x5d0295,this['_threadCommentModel']=_0x264fe0,this[_0x506773(0x1ed)]=_0x3460f0,this[_0x506773(0x231)]=_0x37c118,this[_0x506773(0x1f8)](),this['_initUserSync']();}[_0x19a2ad(0x222)](){const _0x34129c=_0x19a2ad;this[_0x34129c(0x22c)](this[_0x34129c(0x256)][_0x34129c(0x25b)][_0x34129c(0x221)](_0x4f5e41['bufferTime'](0x10))[_0x34129c(0x254)](_0x14a616=>{const _0x34c42c=_0x34129c,_0x3ff80d=new Set();_0x14a616['forEach'](_0x4f236f=>{const _0x5c2724=_0x3393;switch(_0x4f236f[_0x5c2724(0x211)]){case _0x5c2724(0x1f1):{const _0x5611af=_0x4f236f[_0x5c2724(0x202)][_0x5c2724(0x226)];_0x3ff80d[_0x5c2724(0x1f1)](_0x5611af);break;}}}),_0x1f5d1f(this[_0x34c42c(0x231)],_0x3ff80d);}));}[_0x19a2ad(0x1f8)](){const _0x998a58=_0x19a2ad;this[_0x998a58(0x22c)](this[_0x998a58(0x1ef)]['commentUpdate$']['subscribe'](async _0x4414ea=>{const _0xab3e1d=_0x998a58;var _0x5c1067,_0x439f71,_0x47c6ed,_0x1f4f26;const _0xfaa393=(_0x5c1067=this[_0xab3e1d(0x256)]['getUnit'](_0x4414ea[_0xab3e1d(0x21f)])['find'](_0x1a7878=>_0x1a7878['threadId']===_0x4414ea['threadId']))==null?void 0x0:_0x5c1067['root'];if(!_0xfaa393)return;const {unitId:_0x13b723,subUnitId:_0x1d6e85}=_0xfaa393;switch(_0x4414ea['user']&&this[_0xab3e1d(0x1ed)][_0xab3e1d(0x21c)](_0x4414ea[_0xab3e1d(0x266)]),_0x4414ea['type']){case _0x2d66f6['Add']:break;case _0x2d66f6[_0xab3e1d(0x214)]:{this[_0xab3e1d(0x256)][_0xab3e1d(0x23a)](_0x13b723,_0x1d6e85,{'unitId':_0x13b723,'subUnitId':_0x1d6e85,'ref':'','id':_0x4414ea['replyId'],'dT':_0x359ba0(+_0x4414ea['createTimestamp']),'threadId':_0x4414ea['threadId'],'personId':(_0x47c6ed=(_0x439f71=_0x4414ea[_0xab3e1d(0x266)])==null?void 0x0:_0x439f71['userID'])!=null?_0x47c6ed:_0x4414ea[_0xab3e1d(0x241)],'text':JSON[_0xab3e1d(0x259)](_0x4414ea['content']),'parentId':_0xfaa393['id']});break;}case _0x2d66f6[_0xab3e1d(0x22e)]:{const _0x469761=this[_0xab3e1d(0x256)][_0xab3e1d(0x24b)](_0x13b723,_0x1d6e85,_0x4414ea[_0xab3e1d(0x243)]);_0x469761&&_0x469761[_0xab3e1d(0x238)]&&this[_0xab3e1d(0x256)][_0xab3e1d(0x227)](_0x13b723,_0x1d6e85,_0x4414ea['replyId']);break;}case _0x2d66f6[_0xab3e1d(0x219)]:{this[_0xab3e1d(0x256)][_0xab3e1d(0x245)](_0x13b723,_0x1d6e85,{'commentId':_0x4414ea[_0xab3e1d(0x243)],'text':JSON[_0xab3e1d(0x259)](_0x4414ea[_0xab3e1d(0x247)])});break;}case _0x2d66f6[_0xab3e1d(0x240)]:{const _0x3c1256=(_0x1f4f26=this[_0xab3e1d(0x256)][_0xab3e1d(0x1eb)](_0x4414ea['unitId'])['find'](_0x11221a=>_0x11221a[_0xab3e1d(0x236)]===_0x4414ea[_0xab3e1d(0x236)]))==null?void 0x0:_0x1f4f26[_0xab3e1d(0x255)];_0x3c1256&&this[_0xab3e1d(0x256)][_0xab3e1d(0x261)](_0x13b723,_0x1d6e85,_0x3c1256['id'],_0x4414ea['solved']===_0x1d7c20[_0xab3e1d(0x206)]);break;}}}));}};_0x4a6244=_0x226db8([_0x219e01(0x0,_0x5a07a9[_0x19a2ad(0x1e7)](_0x271aba[_0x19a2ad(0x207)])),_0x219e01(0x1,_0x5a07a9[_0x19a2ad(0x1e7)](_0x4cc5f5[_0x19a2ad(0x1e8)])),_0x219e01(0x2,_0x5a07a9['Inject'](_0x5a07a9[_0x19a2ad(0x24c)])),_0x219e01(0x3,_0x5a07a9['Inject'](_0x5a07a9[_0x19a2ad(0x269)]))],_0x4a6244);const _0x435912=_0x19a2ad(0x229),_0x2ec340={};var _0x15e804=Object[_0x19a2ad(0x225)],_0x190b69=(_0x2b200d,_0x362946,_0x29bced,_0x3d8413)=>{for(var _0x8b0682=_0x3d8413>0x1?void 0x0:_0x3d8413?_0x15e804(_0x362946,_0x29bced):_0x362946,_0x35f66b=_0x2b200d['length']-0x1,_0x26a4e1;_0x35f66b>=0x0;_0x35f66b--)(_0x26a4e1=_0x2b200d[_0x35f66b])&&(_0x8b0682=_0x26a4e1(_0x8b0682)||_0x8b0682);return _0x8b0682;},_0x5cc6cb=(_0x28ae40,_0x4d8138)=>(_0x9b2f94,_0x42a73b)=>_0x4d8138(_0x9b2f94,_0x42a73b,_0x28ae40);function _0x3b7b74(_0x27c630,_0xc6758f){const _0x595053=_0x19a2ad,_0x5c8c94=_0x27c630[_0x595053(0x24d)][0x0];return{..._0xc6758f,'id':_0x5c8c94[_0x595053(0x243)],'resolved':_0x27c630['solved']===0x1,'dT':_0x359ba0(_0x5c8c94[_0x595053(0x212)]),'personId':_0x5c8c94[_0x595053(0x241)],'threadId':_0x5c8c94[_0x595053(0x236)]};}function _0x535d82(_0x15f630,_0x1b5b46,_0x13d04c){const _0x3af2ac=_0x19a2ad;var _0x2b3001,_0xb02a79;if(((_0xb02a79=(_0x2b3001=_0x15f630==null?void 0x0:_0x15f630[_0x3af2ac(0x24d)])==null?void 0x0:_0x2b3001['length'])!=null?_0xb02a79:0x0)>0x0){const _0x16779c=(_0x5e1992,_0x4d30f0)=>({'id':_0x5e1992[_0x3af2ac(0x243)],'threadId':_0x5e1992[_0x3af2ac(0x236)],'dT':_0x359ba0(_0x5e1992[_0x3af2ac(0x212)]),'personId':_0x5e1992[_0x3af2ac(0x241)],'resolved':_0x15f630['solved']===_0x1d7c20[_0x3af2ac(0x206)],'unitId':_0x1b5b46,'subUnitId':_0x13d04c,'text':JSON['parse'](_0x5e1992[_0x3af2ac(0x247)]),'parentId':_0x4d30f0}),_0x47719b=_0x16779c(_0x15f630[_0x3af2ac(0x24d)][0x0]);return{..._0x47719b,'children':_0x15f630['replies'][_0x3af2ac(0x1f7)](0x1)[_0x3af2ac(0x23d)](_0x35714e=>_0x16779c(_0x35714e,_0x47719b['id']))};}return null;}let _0x164f6f=class{constructor(_0x42ad86,_0x42102e,_0x248605){const _0x32a272=_0x19a2ad;this[_0x32a272(0x215)]=_0x42ad86,this[_0x32a272(0x1ed)]=_0x42102e,this[_0x32a272(0x22d)]=_0x248605;}async['addComment'](_0x4c79a9){const _0x31564d=_0x19a2ad;var _0x1fbf65,_0x477a2f;const {parentId:_0x3740e9,unitId:_0x2f1132,text:_0x1b4291,threadId:_0x3050e8}=_0x4c79a9,_0x4ac62c=(_0x477a2f=(_0x1fbf65=_0x1b4291[_0x31564d(0x1ff)])==null?void 0x0:_0x1fbf65['filter'](_0x152d57=>_0x152d57[_0x31564d(0x1e6)]===_0x5a07a9['CustomRangeType']['COMMENT'])['map'](_0xace3b7=>_0xace3b7[_0x31564d(0x1f4)]))!=null?_0x477a2f:[],_0x460a00=JSON[_0x31564d(0x257)](_0x1b4291),_0x2341ad=(await this[_0x31564d(0x22d)][_0x31564d(0x253)](_0x2f1132))[_0x31564d(0x21a)]();if(_0x3740e9){const _0x59cae1={'memberId':_0x2341ad,'unitId':_0x2f1132,'content':_0x460a00,'mention':_0x4ac62c,'threadId':_0x3050e8},_0x157e61=(await this[_0x31564d(0x215)][_0x31564d(0x25e)](_0x31564d(0x239)+_0x2f1132+'/reply',{'body':_0x59cae1}))[_0x31564d(0x1e3)][_0x31564d(0x23f)];return{..._0x4c79a9,'id':_0x157e61[_0x31564d(0x243)],'dT':_0x5a07a9[_0x31564d(0x204)](+_0x157e61[_0x31564d(0x212)])[_0x31564d(0x25a)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x157e61[_0x31564d(0x241)]};}else{const _0x2c0847={'memberId':_0x2341ad,'unitId':_0x2f1132,'content':_0x460a00,'mention':_0x4ac62c},_0x11ceed=await this[_0x31564d(0x215)][_0x31564d(0x25e)](_0x31564d(0x239)+_0x2f1132+_0x31564d(0x232),{'body':_0x2c0847});return _0x3b7b74(_0x11ceed[_0x31564d(0x1e3)]['comment'],_0x4c79a9);}}async[_0x19a2ad(0x245)](_0x207027){const _0x3390a8=_0x19a2ad;var _0x8b97f9,_0x5702a9;const {text:_0xbfeb8f,unitId:_0x343210}=_0x207027,_0x40d0b7=(_0x5702a9=(_0x8b97f9=_0xbfeb8f['customRanges'])==null?void 0x0:_0x8b97f9[_0x3390a8(0x23e)](_0xb55ea0=>_0xb55ea0[_0x3390a8(0x1e6)]===_0x5a07a9[_0x3390a8(0x1f3)][_0x3390a8(0x224)])[_0x3390a8(0x23d)](_0x46c3bf=>_0x46c3bf[_0x3390a8(0x1f4)]))!=null?_0x5702a9:[],_0x17c9f9=JSON['stringify'](_0xbfeb8f),_0x2ba4d6=_0x207027[_0x3390a8(0x236)],_0x81541d=_0x207027['id'],_0x5180c9={'memberId':(await this[_0x3390a8(0x22d)][_0x3390a8(0x253)](_0x343210))['getMemberID'](),'unitId':_0x343210,'threadId':_0x2ba4d6,'mention':_0x40d0b7,'content':_0x17c9f9,'replyId':_0x81541d},_0x5d6686=await this['_httpService'][_0x3390a8(0x25e)](_0x3390a8(0x239)+_0x343210+'/edit',{'body':_0x5180c9});return!_0x5d6686[_0x3390a8(0x1e3)][_0x3390a8(0x24a)]||_0x5d6686[_0x3390a8(0x1e3)][_0x3390a8(0x24a)][_0x3390a8(0x1f0)]===0x1;}async['resolveComment'](_0x508d67){const _0x546a6e=_0x19a2ad,{unitId:_0x598d4f}=_0x508d67,_0x1756fc=_0x508d67[_0x546a6e(0x236)],_0x2dcda7={'memberId':this[_0x546a6e(0x1ed)][_0x546a6e(0x242)]()[_0x546a6e(0x249)],'unitId':_0x598d4f,'threadId':_0x1756fc,'solved':_0x508d67[_0x546a6e(0x267)]?_0x1d7c20['Solved']:_0x1d7c20[_0x546a6e(0x210)]},_0x3691ec=await this[_0x546a6e(0x215)][_0x546a6e(0x25e)]('/universer-api/comment/unit/'+_0x598d4f+'/solved',{'body':_0x2dcda7});return!_0x3691ec['body'][_0x546a6e(0x24a)]||_0x3691ec[_0x546a6e(0x1e3)][_0x546a6e(0x24a)][_0x546a6e(0x1f0)]===0x1;}async[_0x19a2ad(0x227)](_0x428b22,_0x5c2a93,_0x3a975a,_0x4207b3){const _0x39d29c=_0x19a2ad,_0x14f221={'memberId':(await this[_0x39d29c(0x22d)]['requireSession'](_0x428b22))[_0x39d29c(0x21a)](),'threadId':_0x3a975a,'replyId':_0x4207b3,'unitId':_0x428b22},_0x1b05c0=await this[_0x39d29c(0x215)]['post'](_0x39d29c(0x239)+_0x428b22+_0x39d29c(0x20c),{'body':_0x14f221});return!_0x1b05c0[_0x39d29c(0x1e3)][_0x39d29c(0x24a)]||_0x1b05c0[_0x39d29c(0x1e3)]['error']['code']===0x1;}async['listComments'](_0x1b8fb9,_0x25f977,_0x115661){const _0x5c8a1a=_0x19a2ad,_0x195dab={'unitId':_0x1b8fb9,'threadId':_0x115661},_0x59d175=await this['_httpService'][_0x5c8a1a(0x25e)](_0x5c8a1a(0x239)+_0x1b8fb9+_0x5c8a1a(0x1f2),{'body':_0x195dab}),_0x3828a8=_0x115661[_0x5c8a1a(0x23d)](_0x555408=>_0x535d82(_0x59d175['body'][_0x5c8a1a(0x25c)][_0x555408],_0x1b8fb9,_0x25f977))[_0x5c8a1a(0x23e)](Boolean);return Object[_0x5c8a1a(0x1fa)](_0x59d175[_0x5c8a1a(0x1e3)][_0x5c8a1a(0x244)])[_0x5c8a1a(0x21e)](_0x338fe6=>{const _0x48a419=_0x5c8a1a;this[_0x48a419(0x1ed)][_0x48a419(0x21c)](_0x338fe6);}),_0x3828a8;}[_0x19a2ad(0x21b)](_0x2f357c){const _0x1ead9b=_0x19a2ad;return{'id':_0x2f357c['id'],'threadId':_0x2f357c[_0x1ead9b(0x236)],'ref':_0x2f357c[_0x1ead9b(0x216)]};}};_0x164f6f=_0x190b69([_0x5cc6cb(0x0,_0x5a07a9[_0x19a2ad(0x1e7)](_0x476811['HTTPService'])),_0x5cc6cb(0x1,_0x5a07a9[_0x19a2ad(0x1e7)](_0x5a07a9[_0x19a2ad(0x24c)])),_0x5cc6cb(0x2,_0x5a07a9['Inject'](_0x271aba[_0x19a2ad(0x203)]))],_0x164f6f);var _0x39bced=Object[_0x19a2ad(0x225)],_0x258703=(_0xb6dcf5,_0x143d44,_0x3a7561,_0xb787)=>{const _0x46e075=_0x19a2ad;for(var _0x35c5cf=_0xb787>0x1?void 0x0:_0xb787?_0x39bced(_0x143d44,_0x3a7561):_0x143d44,_0x1b1430=_0xb6dcf5[_0x46e075(0x223)]-0x1,_0x5b9be8;_0x1b1430>=0x0;_0x1b1430--)(_0x5b9be8=_0xb6dcf5[_0x1b1430])&&(_0x35c5cf=_0x5b9be8(_0x35c5cf)||_0x35c5cf);return _0x35c5cf;},_0x23cf85=(_0x5b7244,_0x2f9eb8)=>(_0x54a3ed,_0x2c6d32)=>_0x2f9eb8(_0x54a3ed,_0x2c6d32,_0x5b7244);let _0x4f242a=class extends _0x5a07a9[_0x19a2ad(0x262)]{constructor(_0x54518a,_0x27c644){const _0x5463c8=_0x19a2ad;super(),this[_0x5463c8(0x234)]=_0x54518a,this['_threadCommentDataSource']=_0x27c644,this['_initDataSource']();}['_initDataSource'](){const _0x313158=_0x19a2ad;this[_0x313158(0x234)][_0x313158(0x25f)]=this[_0x313158(0x252)],this['_threadCommentDataSourceService'][_0x313158(0x246)]=!0x1;}};_0x4f242a=_0x258703([_0x23cf85(0x0,_0x4cc5f5[_0x19a2ad(0x1f6)]),_0x23cf85(0x1,_0x5a07a9[_0x19a2ad(0x1e7)](_0x164f6f))],_0x4f242a);var _0x2c980a=Object[_0x19a2ad(0x228)],_0x4bacfd=Object[_0x19a2ad(0x225)],_0x624e45=(_0x1252f8,_0x2f1fe7,_0x3c6108)=>_0x2f1fe7 in _0x1252f8?_0x2c980a(_0x1252f8,_0x2f1fe7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3c6108}):_0x1252f8[_0x2f1fe7]=_0x3c6108,_0x437058=(_0x545ae1,_0xa10447,_0x4e2d7e,_0x2ee30f)=>{const _0x43f976=_0x19a2ad;for(var _0x1ce692=_0x2ee30f>0x1?void 0x0:_0x2ee30f?_0x4bacfd(_0xa10447,_0x4e2d7e):_0xa10447,_0x474620=_0x545ae1[_0x43f976(0x223)]-0x1,_0x20a351;_0x474620>=0x0;_0x474620--)(_0x20a351=_0x545ae1[_0x474620])&&(_0x1ce692=_0x20a351(_0x1ce692)||_0x1ce692);return _0x1ce692;},_0xfa33cb=(_0x3fd24b,_0x19be84)=>(_0x4bbdc3,_0x4c4957)=>_0x19be84(_0x4bbdc3,_0x4c4957,_0x3fd24b),_0x53e428=(_0x25e476,_0x2f20a3,_0x29b6bf)=>_0x624e45(_0x25e476,typeof _0x2f20a3!=_0x19a2ad(0x209)?_0x2f20a3+'':_0x2f20a3,_0x29b6bf);_0x256275['UniverThreadCommentDataSourcePlugin']=class extends _0x5a07a9[_0x19a2ad(0x205)]{constructor(_0x3196d7=_0x2ec340,_0x4ddf61,_0x462669){const _0x2c35af=_0x19a2ad;super(),this[_0x2c35af(0x260)]=_0x3196d7,this[_0x2c35af(0x231)]=_0x4ddf61,this[_0x2c35af(0x218)]=_0x462669;const {..._0x544278}=_0x5a07a9[_0x2c35af(0x217)]({},_0x2ec340,this[_0x2c35af(0x260)]);this[_0x2c35af(0x218)]['setConfig'](_0x435912,_0x544278);}[_0x19a2ad(0x251)](){const _0x2cadfc=_0x19a2ad;[[_0x164f6f],[_0x4f242a],[_0x4a6244]][_0x2cadfc(0x21e)](_0x43aa4f=>{const _0x39836f=_0x2cadfc;this[_0x39836f(0x231)][_0x39836f(0x1f1)](_0x43aa4f);});}[_0x19a2ad(0x1ee)](){const _0xe1a2c0=_0x19a2ad;this[_0xe1a2c0(0x231)][_0xe1a2c0(0x233)](_0x4f242a),this['_injector'][_0xe1a2c0(0x233)](_0x4a6244);}},_0x53e428(_0x256275[_0x19a2ad(0x263)],_0x19a2ad(0x1fc),_0x257191),_0x53e428(_0x256275[_0x19a2ad(0x263)],_0x19a2ad(0x211),_0x5a07a9['UniverInstanceType'][_0x19a2ad(0x250)]),_0x256275[_0x19a2ad(0x263)]=_0x437058([_0x5a07a9['DependentOn'](_0x4c2680[_0x19a2ad(0x20d)],_0x271aba['UniverCollaborationClientPlugin'],_0x30cdcd[_0x19a2ad(0x25d)]),_0xfa33cb(0x1,_0x5a07a9['Inject'](_0x5a07a9[_0x19a2ad(0x269)])),_0xfa33cb(0x2,_0x5a07a9[_0x19a2ad(0x20b)])],_0x256275[_0x19a2ad(0x263)]),Object['defineProperty'](_0x256275,Symbol['toStringTag'],{'value':_0x19a2ad(0x1e9)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.14-nightly.
|
|
3
|
+
"version": "0.10.14-nightly.202511070628",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.14-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.10.14-nightly.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/core": "0.10.14-nightly.202511031023",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.14-nightly.202511070628",
|
|
49
|
+
"@univerjs-pro/license": "0.10.14-nightly.202511070628",
|
|
50
|
+
"@univerjs/core": "0.10.14-nightly.202511070628",
|
|
51
|
+
"@univerjs/network": "0.10.14-nightly.202511070628",
|
|
53
52
|
"@univerjs/protocol": "0.1.47",
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment": "0.10.14-nightly.202511070628",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.14-nightly.202511070628"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|