@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505221607 → 0.7.0-nightly.202505231607
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 _0x29ba3e=_0x42d2;(function(_0x5d45a6,_0x8cc893){const _0x2c1263=_0x42d2,_0x3c8d93=_0x5d45a6();while(!![]){try{const _0x424b78=-parseInt(_0x2c1263(0x175))/0x1*(-parseInt(_0x2c1263(0x193))/0x2)+-parseInt(_0x2c1263(0x18e))/0x3+parseInt(_0x2c1263(0x176))/0x4+parseInt(_0x2c1263(0x172))/0x5+-parseInt(_0x2c1263(0x1c9))/0x6*(-parseInt(_0x2c1263(0x181))/0x7)+parseInt(_0x2c1263(0x1b6))/0x8+-parseInt(_0x2c1263(0x16e))/0x9*(parseInt(_0x2c1263(0x185))/0xa);if(_0x424b78===_0x8cc893)break;else _0x3c8d93['push'](_0x3c8d93['shift']());}catch(_0x5e1c76){_0x3c8d93['push'](_0x3c8d93['shift']());}}}(_0x8817,0x82d21));Object[_0x29ba3e(0x163)](exports,Symbol[_0x29ba3e(0x1ac)],{'value':'Module'});const b=require(_0x29ba3e(0x1b1)),T=require(_0x29ba3e(0x190)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x29ba3e(0x15c)),U=_0x29ba3e(0x18d);var I=(_0x52631b=>(_0x52631b[_0x52631b[_0x29ba3e(0x1be)]=0x0]='OpenOrReOpen',_0x52631b[_0x52631b[_0x29ba3e(0x1b4)]=0x1]='Solved',_0x52631b[_0x52631b[_0x29ba3e(0x1a2)]=-0x1]=_0x29ba3e(0x1a2),_0x52631b))(I||{}),v=(_0x5c064d=>(_0x5c064d[_0x5c064d[_0x29ba3e(0x1bb)]=0x0]=_0x29ba3e(0x1bb),_0x5c064d[_0x5c064d[_0x29ba3e(0x18a)]=0x1]='Add',_0x5c064d[_0x5c064d[_0x29ba3e(0x1a8)]=0x2]=_0x29ba3e(0x1a8),_0x5c064d[_0x5c064d[_0x29ba3e(0x160)]=0x3]='Edit',_0x5c064d[_0x5c064d[_0x29ba3e(0x189)]=0x4]=_0x29ba3e(0x189),_0x5c064d[_0x5c064d[_0x29ba3e(0x18c)]=0x5]=_0x29ba3e(0x18c),_0x5c064d[_0x5c064d[_0x29ba3e(0x1a2)]=-0x1]='UNRECOGNIZED',_0x5c064d))(v||{});const f=_0x45bef4=>c[_0x29ba3e(0x15f)](new Date(+_0x45bef4))[_0x29ba3e(0x1ab)](_0x29ba3e(0x156)),R=async(_0x3ffed0,_0x205ba9)=>{const _0x11c995=_0x29ba3e,_0x381057=_0x3ffed0[_0x11c995(0x199)](c['UserManagerService']),_0x3a6d7c=_0x3ffed0[_0x11c995(0x199)](P[_0x11c995(0x184)]);_0x205ba9['forEach'](_0x5bc10b=>{const _0x2301c9=_0x11c995;_0x381057[_0x2301c9(0x168)](_0x5bc10b)&&_0x205ba9['delete'](_0x5bc10b);}),_0x205ba9[_0x11c995(0x170)]&&(await _0x3a6d7c['get'](_0x11c995(0x1a5),{'params':{'userIDs':[..._0x205ba9]}}))['body'][_0x11c995(0x16c)][_0x11c995(0x1c7)](_0x2ae752=>{_0x2ae752&&_0x381057['addUser'](_0x2ae752);});};var $=Object[_0x29ba3e(0x1b7)],E=(_0x2e2ab,_0x78d144,_0x16e023,_0x568d1a)=>{const _0x26e969=_0x29ba3e;for(var _0x1a63ff=_0x568d1a>0x1?void 0x0:_0x568d1a?$(_0x78d144,_0x16e023):_0x78d144,_0x4b529b=_0x2e2ab[_0x26e969(0x174)]-0x1,_0x8ec4d5;_0x4b529b>=0x0;_0x4b529b--)(_0x8ec4d5=_0x2e2ab[_0x4b529b])&&(_0x1a63ff=_0x8ec4d5(_0x1a63ff)||_0x1a63ff);return _0x1a63ff;},S=(_0x3400d1,_0x313575)=>(_0x315a61,_0x151635)=>_0x313575(_0x315a61,_0x151635,_0x3400d1);let p=class extends c[_0x29ba3e(0x198)]{constructor(_0x18ee51,_0x4c5f64,_0x4517d1,_0x4632dd){const _0x23e5a1=_0x29ba3e;super(),this[_0x23e5a1(0x159)]=_0x18ee51,this['_threadCommentModel']=_0x4c5f64,this[_0x23e5a1(0x1b3)]=_0x4517d1,this[_0x23e5a1(0x16f)]=_0x4632dd,this[_0x23e5a1(0x165)](),this['_initUserSync']();}['_initUserSync'](){const _0x5dfcaa=_0x29ba3e;this[_0x5dfcaa(0x1c4)](this[_0x5dfcaa(0x1c6)]['commentUpdate$'][_0x5dfcaa(0x191)](w['bufferTime'](0x10))[_0x5dfcaa(0x1b0)](_0x587042=>{const _0x1e65b8=_0x5dfcaa,_0x499d3c=new Set();_0x587042[_0x1e65b8(0x1c7)](_0x22bfa0=>{const _0x4f1faf=_0x1e65b8;switch(_0x22bfa0[_0x4f1faf(0x19a)]){case _0x4f1faf(0x19f):{const _0x1de6ca=_0x22bfa0[_0x4f1faf(0x173)]['personId'];_0x499d3c[_0x4f1faf(0x19f)](_0x1de6ca);break;}}}),R(this['_injector'],_0x499d3c);}));}[_0x29ba3e(0x165)](){const _0x367f1c=_0x29ba3e;this['disposeWithMe'](this[_0x367f1c(0x159)][_0x367f1c(0x153)][_0x367f1c(0x1b0)](async _0x287429=>{const _0x599086=_0x367f1c;var _0x3c687d,_0x5eb102,_0x26c427,_0x4ba7c4;const _0x2e51ec=(_0x3c687d=this['_threadCommentModel']['getUnit'](_0x287429[_0x599086(0x179)])[_0x599086(0x19c)](_0xb737ec=>_0xb737ec[_0x599086(0x1a6)]===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x3c687d['root'];if(!_0x2e51ec)return;const {unitId:_0x136fb5,subUnitId:_0x40e679}=_0x2e51ec;switch(_0x287429[_0x599086(0x167)]&&this[_0x599086(0x1b3)][_0x599086(0x1b9)](_0x287429[_0x599086(0x167)]),_0x287429[_0x599086(0x19a)]){case v['Add']:break;case v['Reply']:{this[_0x599086(0x1c6)][_0x599086(0x17b)](_0x136fb5,_0x40e679,{'unitId':_0x136fb5,'subUnitId':_0x40e679,'ref':'','id':_0x287429['replyId'],'dT':f(+_0x287429['createTimestamp']),'threadId':_0x287429[_0x599086(0x1a6)],'personId':(_0x26c427=(_0x5eb102=_0x287429[_0x599086(0x167)])==null?void 0x0:_0x5eb102[_0x599086(0x187)])!=null?_0x26c427:_0x287429[_0x599086(0x197)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)]),'parentId':_0x2e51ec['id']});break;}case v[_0x599086(0x189)]:{const _0xa24e4e=this['_threadCommentModel']['getComment'](_0x136fb5,_0x40e679,_0x287429[_0x599086(0x1ba)]);_0xa24e4e&&_0xa24e4e[_0x599086(0x157)]&&this[_0x599086(0x1c6)][_0x599086(0x195)](_0x136fb5,_0x40e679,_0x287429['replyId']);break;}case v[_0x599086(0x160)]:{this[_0x599086(0x1c6)][_0x599086(0x18b)](_0x136fb5,_0x40e679,{'commentId':_0x287429[_0x599086(0x1ba)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)])});break;}case v[_0x599086(0x18c)]:{const _0x28d01f=(_0x4ba7c4=this[_0x599086(0x1c6)][_0x599086(0x1bc)](_0x287429[_0x599086(0x179)])['find'](_0x101927=>_0x101927['threadId']===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x4ba7c4[_0x599086(0x1bd)];_0x28d01f&&this[_0x599086(0x1c6)][_0x599086(0x166)](_0x136fb5,_0x40e679,_0x28d01f['id'],_0x287429[_0x599086(0x17e)]===I[_0x599086(0x1b4)]);break;}}}));}};p=E([S(0x0,c[_0x29ba3e(0x1ad)](b['CommentService'])),S(0x1,c[_0x29ba3e(0x1ad)](M[_0x29ba3e(0x16b)])),S(0x2,c['Inject'](c[_0x29ba3e(0x194)])),S(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],p);const q=_0x29ba3e(0x158),D={};var A=Object[_0x29ba3e(0x1b7)],x=(_0x527584,_0x4cd8ba,_0x5cb583,_0x109986)=>{const _0x4f9734=_0x29ba3e;for(var _0x31ddce=_0x109986>0x1?void 0x0:_0x109986?A(_0x4cd8ba,_0x5cb583):_0x4cd8ba,_0xbc1539=_0x527584[_0x4f9734(0x174)]-0x1,_0x192794;_0xbc1539>=0x0;_0xbc1539--)(_0x192794=_0x527584[_0xbc1539])&&(_0x31ddce=_0x192794(_0x31ddce)||_0x31ddce);return _0x31ddce;},_=(_0x37100c,_0x46f863)=>(_0x3820d2,_0x115cac)=>_0x46f863(_0x3820d2,_0x115cac,_0x37100c);function Y(_0x4b13e7,_0x559fd4){const _0x4a0711=_0x29ba3e,_0x5f43bc=_0x4b13e7[_0x4a0711(0x188)][0x0];return{..._0x559fd4,'id':_0x5f43bc[_0x4a0711(0x1ba)],'resolved':_0x4b13e7[_0x4a0711(0x17e)]===0x1,'dT':f(_0x5f43bc[_0x4a0711(0x1a3)]),'personId':_0x5f43bc[_0x4a0711(0x197)],'threadId':_0x5f43bc['threadId']};}function _0x42d2(_0x51c127,_0xe29ca6){const _0x881725=_0x8817();return _0x42d2=function(_0x42d236,_0x111f92){_0x42d236=_0x42d236-0x153;let _0x2865af=_0x881725[_0x42d236];return _0x2865af;},_0x42d2(_0x51c127,_0xe29ca6);}function G(_0x5f2fba,_0x2e0ea,_0x3922d2){const _0x149fee=_0x29ba3e;var _0x4a2923,_0x35e003;if(((_0x35e003=(_0x4a2923=_0x5f2fba==null?void 0x0:_0x5f2fba[_0x149fee(0x188)])==null?void 0x0:_0x4a2923[_0x149fee(0x174)])!=null?_0x35e003:0x0)>0x0){const _0x515348=(_0x3d7c57,_0x20cb50)=>({'id':_0x3d7c57[_0x149fee(0x1ba)],'threadId':_0x3d7c57[_0x149fee(0x1a6)],'dT':f(_0x3d7c57['createTimestamp']),'personId':_0x3d7c57[_0x149fee(0x197)],'resolved':_0x5f2fba['solved']===I[_0x149fee(0x1b4)],'unitId':_0x2e0ea,'subUnitId':_0x3922d2,'text':JSON[_0x149fee(0x1ae)](_0x3d7c57[_0x149fee(0x1a9)]),'parentId':_0x20cb50}),_0x56ec88=_0x515348(_0x5f2fba[_0x149fee(0x188)][0x0]);return{..._0x56ec88,'children':_0x5f2fba[_0x149fee(0x188)]['slice'](0x1)['map'](_0xbf0aa4=>_0x515348(_0xbf0aa4,_0x56ec88['id']))};}return null;}let g=class{constructor(_0x5b1acf,_0x4d9ea7,_0x407894,_0x3b77b7){const _0x29b49f=_0x29ba3e;this[_0x29b49f(0x1a7)]=_0x5b1acf,this[_0x29b49f(0x1b3)]=_0x4d9ea7,this[_0x29b49f(0x15a)]=_0x407894,this[_0x29b49f(0x16f)]=_0x3b77b7;}async[_0x29ba3e(0x17b)](_0x22c0b1){const _0x37af6d=_0x29ba3e;var _0x3391f4,_0x3110f0;const {parentId:_0x38d3b6,unitId:_0x1e3dbb,text:_0x22f85f,threadId:_0xcc623c}=_0x22c0b1,_0x4b70b8=(_0x3110f0=(_0x3391f4=_0x22f85f['customRanges'])==null?void 0x0:_0x3391f4[_0x37af6d(0x19b)](_0x453b89=>_0x453b89[_0x37af6d(0x15b)]===c[_0x37af6d(0x19d)][_0x37af6d(0x1c8)])['map'](_0x159e80=>_0x159e80[_0x37af6d(0x196)]))!=null?_0x3110f0:[],_0xc50bb8=JSON['stringify'](_0x22f85f),_0x59a5ac=(await this[_0x37af6d(0x15a)]['requireSession'](_0x1e3dbb))[_0x37af6d(0x16a)]();if(_0x38d3b6){const _0x1ecaad={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8,'threadId':_0xcc623c},_0x57a297=(await this[_0x37af6d(0x1a7)]['post']('/universer-api/comment/unit/'+_0x1e3dbb+'/reply',{'body':_0x1ecaad}))[_0x37af6d(0x1a0)]['reply'];return{..._0x22c0b1,'id':_0x57a297['replyId'],'dT':c[_0x37af6d(0x15f)](+_0x57a297[_0x37af6d(0x1a3)])[_0x37af6d(0x1ab)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x57a297['userId']};}else{const _0xda3c93={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8},_0x3e2684=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1e3dbb+_0x37af6d(0x178),{'body':_0xda3c93});return Y(_0x3e2684[_0x37af6d(0x1a0)][_0x37af6d(0x180)],_0x22c0b1);}}async['updateComment'](_0x1fb8ce){const _0x46289b=_0x29ba3e;var _0x4cbd7b,_0x5492fb;const {text:_0x49c924,unitId:_0x3bc5db}=_0x1fb8ce,_0x1a885d=(_0x5492fb=(_0x4cbd7b=_0x49c924['customRanges'])==null?void 0x0:_0x4cbd7b[_0x46289b(0x19b)](_0x536682=>_0x536682[_0x46289b(0x15b)]===c['CustomRangeType'][_0x46289b(0x1c8)])[_0x46289b(0x192)](_0x35affc=>_0x35affc[_0x46289b(0x196)]))!=null?_0x5492fb:[],_0x34edbe=JSON[_0x46289b(0x16d)](_0x49c924),_0xa6c5ba=_0x1fb8ce[_0x46289b(0x1a6)],_0x231ae8=_0x1fb8ce['id'],_0x138f09={'memberId':(await this[_0x46289b(0x15a)]['requireSession'](_0x3bc5db))[_0x46289b(0x16a)](),'unitId':_0x3bc5db,'threadId':_0xa6c5ba,'mention':_0x1a885d,'content':_0x34edbe,'replyId':_0x231ae8},_0x30dd91=await this[_0x46289b(0x1a7)][_0x46289b(0x17f)]('/universer-api/comment/unit/'+_0x3bc5db+_0x46289b(0x161),{'body':_0x138f09});return!_0x30dd91[_0x46289b(0x1a0)]['error']||_0x30dd91[_0x46289b(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x166)](_0x268390){const _0x4c2cc8=_0x29ba3e,{unitId:_0x50aee9}=_0x268390,_0x34580d=_0x268390[_0x4c2cc8(0x1a6)],_0x1e420c={'memberId':this['_userService']['getCurrentUser']()[_0x4c2cc8(0x187)],'unitId':_0x50aee9,'threadId':_0x34580d,'solved':_0x268390[_0x4c2cc8(0x1b8)]?I[_0x4c2cc8(0x1b4)]:I[_0x4c2cc8(0x1be)]},_0xab983=await this[_0x4c2cc8(0x1a7)][_0x4c2cc8(0x17f)](_0x4c2cc8(0x15e)+_0x50aee9+_0x4c2cc8(0x154),{'body':_0x1e420c});return!_0xab983[_0x4c2cc8(0x1a0)]['error']||_0xab983[_0x4c2cc8(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x195)](_0x338e58,_0x1b8299,_0x244d52,_0x340385){const _0x3d3794=_0x29ba3e,_0x3e8244={'memberId':(await this[_0x3d3794(0x15a)][_0x3d3794(0x183)](_0x338e58))[_0x3d3794(0x16a)](),'threadId':_0x244d52,'replyId':_0x340385,'unitId':_0x338e58},_0x926209=await this[_0x3d3794(0x1a7)][_0x3d3794(0x17f)]('/universer-api/comment/unit/'+_0x338e58+_0x3d3794(0x186),{'body':_0x3e8244});return!_0x926209[_0x3d3794(0x1a0)][_0x3d3794(0x1af)]||_0x926209['body'][_0x3d3794(0x1af)][_0x3d3794(0x1c1)]===0x1;}async[_0x29ba3e(0x17d)](_0x2abea5,_0x10e06e,_0x5216d4){const _0x3b600c=_0x29ba3e,_0x157346={'unitId':_0x2abea5,'threadId':_0x5216d4},_0x141444=await this[_0x3b600c(0x1a7)]['post'](_0x3b600c(0x15e)+_0x2abea5+_0x3b600c(0x1c0),{'body':_0x157346}),_0x5b0e5d=_0x5216d4[_0x3b600c(0x192)](_0x1503be=>G(_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x18f)][_0x1503be],_0x2abea5,_0x10e06e))[_0x3b600c(0x19b)](Boolean);return Object['values'](_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x16c)])[_0x3b600c(0x1c7)](_0x3b5b56=>{const _0x511c95=_0x3b600c;this[_0x511c95(0x1b3)][_0x511c95(0x1b9)](_0x3b5b56);}),_0x5b0e5d;}[_0x29ba3e(0x19e)](_0x47e4ce){const _0x5ba665=_0x29ba3e;return{'id':_0x47e4ce['id'],'threadId':_0x47e4ce[_0x5ba665(0x1a6)],'ref':_0x47e4ce[_0x5ba665(0x15d)]};}};g=x([_(0x0,c[_0x29ba3e(0x1ad)](P[_0x29ba3e(0x184)])),_(0x1,c[_0x29ba3e(0x1ad)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x29ba3e(0x1bf)])),_(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],g);var H=Object[_0x29ba3e(0x1b7)],J=(_0x56d558,_0x432744,_0x3578f0,_0x397593)=>{const _0x3b2071=_0x29ba3e;for(var _0x38c00e=_0x397593>0x1?void 0x0:_0x397593?H(_0x432744,_0x3578f0):_0x432744,_0x28340d=_0x56d558[_0x3b2071(0x174)]-0x1,_0x37b19f;_0x28340d>=0x0;_0x28340d--)(_0x37b19f=_0x56d558[_0x28340d])&&(_0x38c00e=_0x37b19f(_0x38c00e)||_0x38c00e);return _0x38c00e;},y=(_0x1b439a,_0x23a21b)=>(_0x175ee7,_0x2b492f)=>_0x23a21b(_0x175ee7,_0x2b492f,_0x1b439a);let C=class extends c[_0x29ba3e(0x198)]{constructor(_0x44d03b,_0x1211a8){const _0xb1f8fe=_0x29ba3e;super(),this[_0xb1f8fe(0x162)]=_0x44d03b,this['_threadCommentDataSource']=_0x1211a8,this[_0xb1f8fe(0x164)]();}[_0x29ba3e(0x164)](){const _0x5274ba=_0x29ba3e;this[_0x5274ba(0x162)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5274ba(0x155)]=!0x1;}};function _0x8817(){const _0x1cdb8f=['stringify','15669QvepVh','_injector','size','_configService','4843100SmhNeW','payload','length','6OLXrZG','1511332iOrfQb','_config','/add','unitId','UniverThreadCommentDataSourcePlugin','addComment','pluginName','listComments','solved','post','comment','2908997tvCAHe','UniverInstanceType','requireSession','HTTPService','10690QZuzYO','/delete','userID','replies','Delete','Add','updateComment','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','792288YHcSzi','comments','@univerjs-pro/license','pipe','map','135444nBLfKj','UserManagerService','deleteComment','rangeId','userId','Disposable','get','type','filter','find','CustomRangeType','saveCommentToSnapshot','add','body','UniverCollaborationClientPlugin','UNRECOGNIZED','createTimestamp','DependentOn','/universer-api/user/list','threadId','_httpService','Reply','content','onReady','format','toStringTag','Inject','parse','error','subscribe','@univerjs-pro/collaboration-client','Injector','_userService','Solved','setConfig','3941680chATMC','getOwnPropertyDescriptor','resolved','addUser','replyId','Unknown','getUnit','root','OpenOrReOpen','CollaborationSessionService','/list','code','UNIVER_UNKNOWN','onStarting','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','forEach','COMMENT','6RxzXyX','commentUpdate$','/solved','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','parentId','thread-comment-data-source.config','_commentService','_sessionService','rangeType','@univerjs/network','ref','/universer-api/comment/unit/','dayjs','Edit','/edit','_threadCommentDataSourceService','defineProperty','_initDataSource','_init','resolveComment','user','getUser','Plugin','getMemberID','ThreadCommentModel','users'];_0x8817=function(){return _0x1cdb8f;};return _0x8817();}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x29ba3e(0x1ad)](g))],C);var F=Object[_0x29ba3e(0x163)],L=Object[_0x29ba3e(0x1b7)],Z=(_0x1cea6a,_0x4d17ba,_0x1ef833)=>_0x4d17ba in _0x1cea6a?F(_0x1cea6a,_0x4d17ba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ef833}):_0x1cea6a[_0x4d17ba]=_0x1ef833,W=(_0xb01c79,_0x43434f,_0x5b4263,_0x242243)=>{const _0x4ec4b0=_0x29ba3e;for(var _0x35e6d0=_0x242243>0x1?void 0x0:_0x242243?L(_0x43434f,_0x5b4263):_0x43434f,_0x509ddc=_0xb01c79[_0x4ec4b0(0x174)]-0x1,_0x110e25;_0x509ddc>=0x0;_0x509ddc--)(_0x110e25=_0xb01c79[_0x509ddc])&&(_0x35e6d0=_0x110e25(_0x35e6d0)||_0x35e6d0);return _0x35e6d0;},O=(_0x3b9d12,_0x4856d6)=>(_0x39deb1,_0x1dc8c7)=>_0x4856d6(_0x39deb1,_0x1dc8c7,_0x3b9d12),N=(_0x4ae883,_0x2b2c66,_0x2c6642)=>Z(_0x4ae883,typeof _0x2b2c66!='symbol'?_0x2b2c66+'':_0x2b2c66,_0x2c6642);exports[_0x29ba3e(0x17a)]=class extends c[_0x29ba3e(0x169)]{constructor(_0x48f3e3=D,_0x10944d,_0xa8d975){const _0x19c68e=_0x29ba3e;super(),this[_0x19c68e(0x177)]=_0x48f3e3,this[_0x19c68e(0x16f)]=_0x10944d,this[_0x19c68e(0x171)]=_0xa8d975;const {..._0x1fe772}=c['merge']({},D,this['_config']);this[_0x19c68e(0x171)][_0x19c68e(0x1b5)](q,_0x1fe772);}[_0x29ba3e(0x1c3)](){const _0x29c652=_0x29ba3e;[[g],[C],[p]][_0x29c652(0x1c7)](_0x39bd34=>{const _0x19515c=_0x29c652;this[_0x19515c(0x16f)][_0x19515c(0x19f)](_0x39bd34);});}[_0x29ba3e(0x1aa)](){const _0x8b9e61=_0x29ba3e;this['_injector'][_0x8b9e61(0x199)](C),this['_injector'][_0x8b9e61(0x199)](p);}},N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x17c),U),N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x19a),c[_0x29ba3e(0x182)][_0x29ba3e(0x1c2)]),exports[_0x29ba3e(0x17a)]=W([c[_0x29ba3e(0x1a4)](j[_0x29ba3e(0x1c5)],b[_0x29ba3e(0x1a1)],T['UniverLicensePlugin']),O(0x1,c[_0x29ba3e(0x1ad)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0xffd7c1=_0x3ffc;(function(_0x1c6cdf,_0x576ab2){const _0xc62552=_0x3ffc,_0x18d830=_0x1c6cdf();while(!![]){try{const _0x1038b0=-parseInt(_0xc62552(0x1f6))/0x1*(-parseInt(_0xc62552(0x1ff))/0x2)+-parseInt(_0xc62552(0x1ca))/0x3*(parseInt(_0xc62552(0x1f2))/0x4)+-parseInt(_0xc62552(0x1da))/0x5*(parseInt(_0xc62552(0x1fa))/0x6)+-parseInt(_0xc62552(0x216))/0x7*(parseInt(_0xc62552(0x1d2))/0x8)+parseInt(_0xc62552(0x208))/0x9+parseInt(_0xc62552(0x205))/0xa+parseInt(_0xc62552(0x1b3))/0xb;if(_0x1038b0===_0x576ab2)break;else _0x18d830['push'](_0x18d830['shift']());}catch(_0x43f9df){_0x18d830['push'](_0x18d830['shift']());}}}(_0x5bde,0xde5bc));Object['defineProperty'](exports,Symbol[_0xffd7c1(0x1e9)],{'value':_0xffd7c1(0x1f7)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0xffd7c1(0x1ec)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0xffd7c1(0x21b)),w=require(_0xffd7c1(0x21e)),P=require(_0xffd7c1(0x21f)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5bde(){const _0x55c529=['get','error','symbol','HTTPService','224pXmcJw','length','Reply','defineProperty','59462toAoQq','Module','resolveComment','pipe','12TGOgsb','rangeType','updateComment','OpenOrReOpen','ThreadCommentModel','8pTBzQS','Add','deleteComment','stringify','UNRECOGNIZED','replyId','15115090YXJWzZ','_sessionService','threadId','9255834ApJIWp','reply','UniverInstanceType','addUser','content','parentId','Plugin','post','Delete','payload','_threadCommentModel','Inject','_userService','solved','91hZNwKP','subscribe','rangeId','getCurrentUser','Solve','@univerjs/thread-comment','setConfig','_initDataSource','rxjs','@univerjs/network','getComment','map','forEach','replies','/list','_config','Solved','requireSession','personId','UniverLicensePlugin','_threadCommentDataSource','listComments','6959282OwBAMz','onReady','delete','_init','find','dayjs','Injector','Disposable','filter','UniverThreadCommentUIPlugin','_httpService','/universer-api/comment/unit/','commentUpdate$','customRanges','UserManagerService','users','root','type','_initUserSync','getMemberID','CollaborationSessionService','/add','YYYY/MM/DD\x20HH:mm','60366hYIGNI','_commentService','size','_configService','_threadCommentDataSourceService','ref','/universer-api/user/list','values','17432PXzWnI','merge','body','createTimestamp','unitId','pluginName','onStarting','thread-comment-data-source.config','3361265QKeAOQ','user','userID','format','CustomRangeType','Edit','getOwnPropertyDescriptor','slice','_injector','Unknown','getUnit','add','getUser','UniverThreadCommentDataSourcePlugin','parse','toStringTag','/edit','code','@univerjs-pro/license','userId'];_0x5bde=function(){return _0x55c529;};return _0x5bde();}var I=(_0x340b44=>(_0x340b44[_0x340b44[_0xffd7c1(0x1fd)]=0x0]='OpenOrReOpen',_0x340b44[_0x340b44[_0xffd7c1(0x226)]=0x1]='Solved',_0x340b44[_0x340b44[_0xffd7c1(0x203)]=-0x1]='UNRECOGNIZED',_0x340b44))(I||{}),v=(_0x520030=>(_0x520030[_0x520030[_0xffd7c1(0x1e3)]=0x0]=_0xffd7c1(0x1e3),_0x520030[_0x520030[_0xffd7c1(0x200)]=0x1]=_0xffd7c1(0x200),_0x520030[_0x520030['Reply']=0x2]=_0xffd7c1(0x1f4),_0x520030[_0x520030[_0xffd7c1(0x1df)]=0x3]=_0xffd7c1(0x1df),_0x520030[_0x520030[_0xffd7c1(0x210)]=0x4]='Delete',_0x520030[_0x520030[_0xffd7c1(0x21a)]=0x5]=_0xffd7c1(0x21a),_0x520030[_0x520030[_0xffd7c1(0x203)]=-0x1]=_0xffd7c1(0x203),_0x520030))(v||{});const f=_0x455437=>c[_0xffd7c1(0x1b8)](new Date(+_0x455437))['format'](_0xffd7c1(0x1c9)),R=async(_0x3cb26b,_0x45b5c1)=>{const _0x4277f7=_0xffd7c1,_0x3bc52b=_0x3cb26b['get'](c[_0x4277f7(0x1c1)]),_0x25d6fb=_0x3cb26b[_0x4277f7(0x1ee)](P[_0x4277f7(0x1f1)]);_0x45b5c1[_0x4277f7(0x222)](_0x49a959=>{const _0x27beb0=_0x4277f7;_0x3bc52b[_0x27beb0(0x1e6)](_0x49a959)&&_0x45b5c1[_0x27beb0(0x1b5)](_0x49a959);}),_0x45b5c1[_0x4277f7(0x1cc)]&&(await _0x25d6fb[_0x4277f7(0x1ee)](_0x4277f7(0x1d0),{'params':{'userIDs':[..._0x45b5c1]}}))['body']['users'][_0x4277f7(0x222)](_0x55b207=>{_0x55b207&&_0x3bc52b['addUser'](_0x55b207);});};var $=Object[_0xffd7c1(0x1e0)],E=(_0xa4b534,_0x18007d,_0x502393,_0x52d361)=>{const _0x5e52b1=_0xffd7c1;for(var _0xa0454=_0x52d361>0x1?void 0x0:_0x52d361?$(_0x18007d,_0x502393):_0x18007d,_0x3e61f5=_0xa4b534[_0x5e52b1(0x1f3)]-0x1,_0x1da931;_0x3e61f5>=0x0;_0x3e61f5--)(_0x1da931=_0xa4b534[_0x3e61f5])&&(_0xa0454=_0x1da931(_0xa0454)||_0xa0454);return _0xa0454;},S=(_0x395aea,_0x3916fc)=>(_0x5e7c79,_0x1bd90b)=>_0x3916fc(_0x5e7c79,_0x1bd90b,_0x395aea);let p=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x32cceb,_0x62f9ce,_0x48de18,_0x38b025){const _0x49cb3f=_0xffd7c1;super(),this['_commentService']=_0x32cceb,this['_threadCommentModel']=_0x62f9ce,this[_0x49cb3f(0x214)]=_0x48de18,this[_0x49cb3f(0x1e2)]=_0x38b025,this[_0x49cb3f(0x1b6)](),this[_0x49cb3f(0x1c5)]();}[_0xffd7c1(0x1c5)](){const _0x2fb269=_0xffd7c1;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2fb269(0x1f9)](w['bufferTime'](0x10))['subscribe'](_0x2de257=>{const _0x3b8f3b=_0x2fb269,_0x403a89=new Set();_0x2de257[_0x3b8f3b(0x222)](_0x218148=>{const _0x4f1ae7=_0x3b8f3b;switch(_0x218148[_0x4f1ae7(0x1c4)]){case _0x4f1ae7(0x1e5):{const _0x207d6b=_0x218148[_0x4f1ae7(0x211)][_0x4f1ae7(0x228)];_0x403a89[_0x4f1ae7(0x1e5)](_0x207d6b);break;}}}),R(this[_0x3b8f3b(0x1e2)],_0x403a89);}));}[_0xffd7c1(0x1b6)](){const _0x3816e1=_0xffd7c1;this['disposeWithMe'](this[_0x3816e1(0x1cb)][_0x3816e1(0x1bf)][_0x3816e1(0x217)](async _0x310e5e=>{const _0x101589=_0x3816e1;var _0xaabfe,_0x44c48c,_0x3f155a,_0x58395e;const _0x12749d=(_0xaabfe=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x505abe=>_0x505abe[_0x101589(0x207)]===_0x310e5e[_0x101589(0x207)]))==null?void 0x0:_0xaabfe[_0x101589(0x1c3)];if(!_0x12749d)return;const {unitId:_0x2bfa44,subUnitId:_0x3d6411}=_0x12749d;switch(_0x310e5e[_0x101589(0x1db)]&&this['_userService'][_0x101589(0x20b)](_0x310e5e['user']),_0x310e5e[_0x101589(0x1c4)]){case v[_0x101589(0x200)]:break;case v['Reply']:{this[_0x101589(0x212)]['addComment'](_0x2bfa44,_0x3d6411,{'unitId':_0x2bfa44,'subUnitId':_0x3d6411,'ref':'','id':_0x310e5e[_0x101589(0x204)],'dT':f(+_0x310e5e[_0x101589(0x1d5)]),'threadId':_0x310e5e[_0x101589(0x207)],'personId':(_0x3f155a=(_0x44c48c=_0x310e5e[_0x101589(0x1db)])==null?void 0x0:_0x44c48c['userID'])!=null?_0x3f155a:_0x310e5e[_0x101589(0x1ed)],'text':JSON[_0x101589(0x1e8)](_0x310e5e['content']),'parentId':_0x12749d['id']});break;}case v[_0x101589(0x210)]:{const _0x40fd11=this['_threadCommentModel'][_0x101589(0x220)](_0x2bfa44,_0x3d6411,_0x310e5e[_0x101589(0x204)]);_0x40fd11&&_0x40fd11[_0x101589(0x20d)]&&this[_0x101589(0x212)][_0x101589(0x201)](_0x2bfa44,_0x3d6411,_0x310e5e['replyId']);break;}case v[_0x101589(0x1df)]:{this[_0x101589(0x212)][_0x101589(0x1fc)](_0x2bfa44,_0x3d6411,{'commentId':_0x310e5e['replyId'],'text':JSON[_0x101589(0x1e8)](_0x310e5e[_0x101589(0x20c)])});break;}case v[_0x101589(0x21a)]:{const _0x16a7f7=(_0x58395e=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x350cf1=>_0x350cf1[_0x101589(0x207)]===_0x310e5e['threadId']))==null?void 0x0:_0x58395e['root'];_0x16a7f7&&this[_0x101589(0x212)][_0x101589(0x1f8)](_0x2bfa44,_0x3d6411,_0x16a7f7['id'],_0x310e5e[_0x101589(0x215)]===I[_0x101589(0x226)]);break;}}}));}};p=E([S(0x0,c[_0xffd7c1(0x213)](b['CommentService'])),S(0x1,c[_0xffd7c1(0x213)](M[_0xffd7c1(0x1fe)])),S(0x2,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),S(0x3,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)]))],p);const q=_0xffd7c1(0x1d9),D={};var A=Object[_0xffd7c1(0x1e0)],x=(_0x10207d,_0x55f01d,_0x47891d,_0x27f53a)=>{const _0x9bedec=_0xffd7c1;for(var _0x50d167=_0x27f53a>0x1?void 0x0:_0x27f53a?A(_0x55f01d,_0x47891d):_0x55f01d,_0xfe8748=_0x10207d[_0x9bedec(0x1f3)]-0x1,_0x525166;_0xfe8748>=0x0;_0xfe8748--)(_0x525166=_0x10207d[_0xfe8748])&&(_0x50d167=_0x525166(_0x50d167)||_0x50d167);return _0x50d167;},_=(_0x5e8392,_0x1a1076)=>(_0x6634f5,_0x39bfc3)=>_0x1a1076(_0x6634f5,_0x39bfc3,_0x5e8392);function Y(_0xaf2165,_0x25f74e){const _0x4c095e=_0xffd7c1,_0x2282d5=_0xaf2165['replies'][0x0];return{..._0x25f74e,'id':_0x2282d5[_0x4c095e(0x204)],'resolved':_0xaf2165[_0x4c095e(0x215)]===0x1,'dT':f(_0x2282d5[_0x4c095e(0x1d5)]),'personId':_0x2282d5[_0x4c095e(0x1ed)],'threadId':_0x2282d5[_0x4c095e(0x207)]};}function _0x3ffc(_0x32388b,_0x58add7){const _0x5bdecb=_0x5bde();return _0x3ffc=function(_0x3ffce6,_0x4cc13f){_0x3ffce6=_0x3ffce6-0x1b0;let _0x1526fa=_0x5bdecb[_0x3ffce6];return _0x1526fa;},_0x3ffc(_0x32388b,_0x58add7);}function G(_0x2d242a,_0x28cd98,_0x387255){const _0x30516f=_0xffd7c1;var _0x59121b,_0x50147b;if(((_0x50147b=(_0x59121b=_0x2d242a==null?void 0x0:_0x2d242a[_0x30516f(0x223)])==null?void 0x0:_0x59121b[_0x30516f(0x1f3)])!=null?_0x50147b:0x0)>0x0){const _0x3bba77=(_0x5104fa,_0x2d709f)=>({'id':_0x5104fa['replyId'],'threadId':_0x5104fa[_0x30516f(0x207)],'dT':f(_0x5104fa['createTimestamp']),'personId':_0x5104fa[_0x30516f(0x1ed)],'resolved':_0x2d242a[_0x30516f(0x215)]===I['Solved'],'unitId':_0x28cd98,'subUnitId':_0x387255,'text':JSON[_0x30516f(0x1e8)](_0x5104fa[_0x30516f(0x20c)]),'parentId':_0x2d709f}),_0x187b88=_0x3bba77(_0x2d242a[_0x30516f(0x223)][0x0]);return{..._0x187b88,'children':_0x2d242a[_0x30516f(0x223)][_0x30516f(0x1e1)](0x1)['map'](_0x2c3dc2=>_0x3bba77(_0x2c3dc2,_0x187b88['id']))};}return null;}let g=class{constructor(_0x5da154,_0x3174ca,_0x303225,_0x5eb344){const _0x580d9f=_0xffd7c1;this[_0x580d9f(0x1bd)]=_0x5da154,this[_0x580d9f(0x214)]=_0x3174ca,this[_0x580d9f(0x206)]=_0x303225,this[_0x580d9f(0x1e2)]=_0x5eb344;}async['addComment'](_0x42c55b){const _0x252814=_0xffd7c1;var _0x229d76,_0x11afd0;const {parentId:_0x427c17,unitId:_0xffa395,text:_0x2a2557,threadId:_0x26b256}=_0x42c55b,_0x1b38f6=(_0x11afd0=(_0x229d76=_0x2a2557['customRanges'])==null?void 0x0:_0x229d76[_0x252814(0x1bb)](_0x4009b1=>_0x4009b1[_0x252814(0x1fb)]===c[_0x252814(0x1de)]['COMMENT'])[_0x252814(0x221)](_0x21942e=>_0x21942e[_0x252814(0x218)]))!=null?_0x11afd0:[],_0x146451=JSON[_0x252814(0x202)](_0x2a2557),_0x2816d1=(await this[_0x252814(0x206)][_0x252814(0x227)](_0xffa395))[_0x252814(0x1c6)]();if(_0x427c17){const _0x565ca0={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6,'threadId':_0x26b256},_0x37edab=(await this[_0x252814(0x1bd)]['post']('/universer-api/comment/unit/'+_0xffa395+'/reply',{'body':_0x565ca0}))['body'][_0x252814(0x209)];return{..._0x42c55b,'id':_0x37edab[_0x252814(0x204)],'dT':c[_0x252814(0x1b8)](+_0x37edab[_0x252814(0x1d5)])[_0x252814(0x1dd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37edab['userId']};}else{const _0xc6ed97={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6},_0x3cd16f=await this[_0x252814(0x1bd)][_0x252814(0x20f)](_0x252814(0x1be)+_0xffa395+_0x252814(0x1c8),{'body':_0xc6ed97});return Y(_0x3cd16f['body']['comment'],_0x42c55b);}}async[_0xffd7c1(0x1fc)](_0x226585){const _0x40902a=_0xffd7c1;var _0x58d8c2,_0x4059bd;const {text:_0x17a0d8,unitId:_0x2120db}=_0x226585,_0x35f862=(_0x4059bd=(_0x58d8c2=_0x17a0d8[_0x40902a(0x1c0)])==null?void 0x0:_0x58d8c2[_0x40902a(0x1bb)](_0x468a5f=>_0x468a5f[_0x40902a(0x1fb)]===c[_0x40902a(0x1de)]['COMMENT'])[_0x40902a(0x221)](_0xa25acc=>_0xa25acc[_0x40902a(0x218)]))!=null?_0x4059bd:[],_0xe37cfb=JSON[_0x40902a(0x202)](_0x17a0d8),_0x5687ce=_0x226585['threadId'],_0x217dac=_0x226585['id'],_0x1c5cc0={'memberId':(await this[_0x40902a(0x206)][_0x40902a(0x227)](_0x2120db))[_0x40902a(0x1c6)](),'unitId':_0x2120db,'threadId':_0x5687ce,'mention':_0x35f862,'content':_0xe37cfb,'replyId':_0x217dac},_0x2616f2=await this['_httpService'][_0x40902a(0x20f)](_0x40902a(0x1be)+_0x2120db+_0x40902a(0x1ea),{'body':_0x1c5cc0});return!_0x2616f2['body']['error']||_0x2616f2[_0x40902a(0x1d4)][_0x40902a(0x1ef)][_0x40902a(0x1eb)]===0x1;}async[_0xffd7c1(0x1f8)](_0x4a742d){const _0x17bd31=_0xffd7c1,{unitId:_0x1f432f}=_0x4a742d,_0xc1c4c6=_0x4a742d['threadId'],_0xaa01d7={'memberId':this[_0x17bd31(0x214)][_0x17bd31(0x219)]()[_0x17bd31(0x1dc)],'unitId':_0x1f432f,'threadId':_0xc1c4c6,'solved':_0x4a742d['resolved']?I[_0x17bd31(0x226)]:I[_0x17bd31(0x1fd)]},_0x5c81ff=await this[_0x17bd31(0x1bd)][_0x17bd31(0x20f)](_0x17bd31(0x1be)+_0x1f432f+'/solved',{'body':_0xaa01d7});return!_0x5c81ff[_0x17bd31(0x1d4)]['error']||_0x5c81ff[_0x17bd31(0x1d4)]['error'][_0x17bd31(0x1eb)]===0x1;}async['deleteComment'](_0x5c88ea,_0x2353ca,_0x370224,_0x12afd8){const _0x26c894=_0xffd7c1,_0x3930db={'memberId':(await this[_0x26c894(0x206)][_0x26c894(0x227)](_0x5c88ea))[_0x26c894(0x1c6)](),'threadId':_0x370224,'replyId':_0x12afd8,'unitId':_0x5c88ea},_0x114cc2=await this['_httpService'][_0x26c894(0x20f)](_0x26c894(0x1be)+_0x5c88ea+'/delete',{'body':_0x3930db});return!_0x114cc2[_0x26c894(0x1d4)][_0x26c894(0x1ef)]||_0x114cc2['body'][_0x26c894(0x1ef)][_0x26c894(0x1eb)]===0x1;}async[_0xffd7c1(0x1b2)](_0x1ae5c4,_0x56601e,_0x1964a4){const _0x368da6=_0xffd7c1,_0x3e71ca={'unitId':_0x1ae5c4,'threadId':_0x1964a4},_0x1434e7=await this[_0x368da6(0x1bd)]['post'](_0x368da6(0x1be)+_0x1ae5c4+_0x368da6(0x224),{'body':_0x3e71ca}),_0xfa9c87=_0x1964a4[_0x368da6(0x221)](_0x2760e0=>G(_0x1434e7[_0x368da6(0x1d4)]['comments'][_0x2760e0],_0x1ae5c4,_0x56601e))[_0x368da6(0x1bb)](Boolean);return Object[_0x368da6(0x1d1)](_0x1434e7['body'][_0x368da6(0x1c2)])[_0x368da6(0x222)](_0x30b311=>{const _0x5228cc=_0x368da6;this[_0x5228cc(0x214)]['addUser'](_0x30b311);}),_0xfa9c87;}['saveCommentToSnapshot'](_0x3dd797){const _0x365dcd=_0xffd7c1;return{'id':_0x3dd797['id'],'threadId':_0x3dd797[_0x365dcd(0x207)],'ref':_0x3dd797[_0x365dcd(0x1cf)]};}};g=x([_(0x0,c[_0xffd7c1(0x213)](P['HTTPService'])),_(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),_(0x2,c[_0xffd7c1(0x213)](b[_0xffd7c1(0x1c7)])),_(0x3,c['Inject'](c[_0xffd7c1(0x1b9)]))],g);var H=Object[_0xffd7c1(0x1e0)],J=(_0x18cccc,_0x58305a,_0x5c145c,_0x327beb)=>{for(var _0x4d6962=_0x327beb>0x1?void 0x0:_0x327beb?H(_0x58305a,_0x5c145c):_0x58305a,_0x3c0f0c=_0x18cccc['length']-0x1,_0x202ac3;_0x3c0f0c>=0x0;_0x3c0f0c--)(_0x202ac3=_0x18cccc[_0x3c0f0c])&&(_0x4d6962=_0x202ac3(_0x4d6962)||_0x4d6962);return _0x4d6962;},y=(_0x149e54,_0x5bf7e4)=>(_0xe3f055,_0x3588ae)=>_0x5bf7e4(_0xe3f055,_0x3588ae,_0x149e54);let C=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x36e352,_0x3d0537){const _0x2c22c1=_0xffd7c1;super(),this[_0x2c22c1(0x1ce)]=_0x36e352,this[_0x2c22c1(0x1b1)]=_0x3d0537,this[_0x2c22c1(0x21d)]();}['_initDataSource'](){const _0x58a1e5=_0xffd7c1;this[_0x58a1e5(0x1ce)]['dataSource']=this[_0x58a1e5(0x1b1)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xffd7c1(0x213)](g))],C);var F=Object[_0xffd7c1(0x1f5)],L=Object[_0xffd7c1(0x1e0)],Z=(_0x3fb045,_0x3ac6cb,_0x13dae2)=>_0x3ac6cb in _0x3fb045?F(_0x3fb045,_0x3ac6cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13dae2}):_0x3fb045[_0x3ac6cb]=_0x13dae2,W=(_0x2476a1,_0x1eb0a9,_0x3f33a3,_0x38ed79)=>{const _0x46ff68=_0xffd7c1;for(var _0x3776ba=_0x38ed79>0x1?void 0x0:_0x38ed79?L(_0x1eb0a9,_0x3f33a3):_0x1eb0a9,_0x4ccb5b=_0x2476a1[_0x46ff68(0x1f3)]-0x1,_0x1bd8ff;_0x4ccb5b>=0x0;_0x4ccb5b--)(_0x1bd8ff=_0x2476a1[_0x4ccb5b])&&(_0x3776ba=_0x1bd8ff(_0x3776ba)||_0x3776ba);return _0x3776ba;},O=(_0x399380,_0x2b6425)=>(_0x2b71a6,_0x10da1e)=>_0x2b6425(_0x2b71a6,_0x10da1e,_0x399380),N=(_0x4e7d01,_0x39c708,_0x458544)=>Z(_0x4e7d01,typeof _0x39c708!=_0xffd7c1(0x1f0)?_0x39c708+'':_0x39c708,_0x458544);exports[_0xffd7c1(0x1e7)]=class extends c[_0xffd7c1(0x20e)]{constructor(_0x59e461=D,_0x5d6176,_0x3654c2){const _0x52910a=_0xffd7c1;super(),this[_0x52910a(0x225)]=_0x59e461,this[_0x52910a(0x1e2)]=_0x5d6176,this[_0x52910a(0x1cd)]=_0x3654c2;const {..._0x286fe4}=c[_0x52910a(0x1d3)]({},D,this[_0x52910a(0x225)]);this[_0x52910a(0x1cd)][_0x52910a(0x21c)](q,_0x286fe4);}[_0xffd7c1(0x1d8)](){const _0x231320=_0xffd7c1;[[g],[C],[p]][_0x231320(0x222)](_0x5bc432=>{const _0xe43858=_0x231320;this[_0xe43858(0x1e2)][_0xe43858(0x1e5)](_0x5bc432);});}[_0xffd7c1(0x1b4)](){const _0x1ae994=_0xffd7c1;this[_0x1ae994(0x1e2)][_0x1ae994(0x1ee)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1d7),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1c4),c[_0xffd7c1(0x20a)]['UNIVER_UNKNOWN']),exports[_0xffd7c1(0x1e7)]=W([c['DependentOn'](j[_0xffd7c1(0x1bc)],b['UniverCollaborationClientPlugin'],T[_0xffd7c1(0x1b0)]),O(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4398(_0x461641,_0x467d6e){const _0x47e643=_0x47e6();return _0x4398=function(_0x439832,_0x5bb3a7){_0x439832=_0x439832-0x173;let _0x9c74f1=_0x47e643[_0x439832];return _0x9c74f1;},_0x4398(_0x461641,_0x467d6e);}(function(_0x20d3d8,_0x5292c9){const _0x34ae38=_0x4398,_0x3b1fa0=_0x20d3d8();while(!![]){try{const _0x19e5dd=-parseInt(_0x34ae38(0x180))/0x1+-parseInt(_0x34ae38(0x185))/0x2*(-parseInt(_0x34ae38(0x1d1))/0x3)+-parseInt(_0x34ae38(0x18a))/0x4+-parseInt(_0x34ae38(0x188))/0x5*(parseInt(_0x34ae38(0x1b7))/0x6)+-parseInt(_0x34ae38(0x1eb))/0x7*(parseInt(_0x34ae38(0x1e3))/0x8)+-parseInt(_0x34ae38(0x1c7))/0x9+-parseInt(_0x34ae38(0x1ad))/0xa*(-parseInt(_0x34ae38(0x1c5))/0xb);if(_0x19e5dd===_0x5292c9)break;else _0x3b1fa0['push'](_0x3b1fa0['shift']());}catch(_0x34472b){_0x3b1fa0['push'](_0x3b1fa0['shift']());}}}(_0x47e6,0x2a2f1),function(_0xfd4b7b,_0x834232){const _0x269ed4=_0x4398;typeof exports==_0x269ed4(0x17a)&&typeof module<'u'?_0x834232(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x269ed4(0x1bc)),require(_0x269ed4(0x18d)),require(_0x269ed4(0x1cb)),require(_0x269ed4(0x1a0)),require('@univerjs/network')):typeof define==_0x269ed4(0x1c2)&&define[_0x269ed4(0x1ca)]?define([_0x269ed4(0x1b8),'@univerjs-pro/collaboration-client',_0x269ed4(0x1ce),_0x269ed4(0x1bc),_0x269ed4(0x18d),_0x269ed4(0x1cb),'rxjs',_0x269ed4(0x1d5)],_0x834232):(_0xfd4b7b=typeof globalThis<'u'?globalThis:_0xfd4b7b||self,_0x834232(_0xfd4b7b['UniverProThreadCommentDatasource']={},_0xfd4b7b['UniverProCollaborationClient'],_0xfd4b7b[_0x269ed4(0x1d4)],_0xfd4b7b[_0x269ed4(0x1ea)],_0xfd4b7b['UniverThreadCommentUi'],_0xfd4b7b[_0x269ed4(0x1a6)],_0xfd4b7b[_0x269ed4(0x1a0)],_0xfd4b7b[_0x269ed4(0x1f3)]));}(this,function(_0x11ecc3,_0x5d20d9,_0x11ab02,_0x3c648d,_0x20cd00,_0x3b1059,_0xd85e6f,_0x48603c){'use strict';const _0x3f0ee5=_0x4398;const _0x29c887=_0x3f0ee5(0x191);var _0x8e7e8b=(_0x7fdf33=>(_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x184)]=0x0]=_0x3f0ee5(0x184),_0x7fdf33[_0x7fdf33['Solved']=0x1]=_0x3f0ee5(0x1d7),_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x1e1)]=-0x1]=_0x3f0ee5(0x1e1),_0x7fdf33))(_0x8e7e8b||{}),_0x7af052=(_0x1b5562=>(_0x1b5562[_0x1b5562['Unknown']=0x0]=_0x3f0ee5(0x1d6),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e8)]=0x1]=_0x3f0ee5(0x1e8),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1f2)]=0x2]=_0x3f0ee5(0x1f2),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1cd)]=0x3]=_0x3f0ee5(0x1cd),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1c9)]=0x4]=_0x3f0ee5(0x1c9),_0x1b5562[_0x1b5562[_0x3f0ee5(0x189)]=0x5]=_0x3f0ee5(0x189),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e1)]=-0x1]='UNRECOGNIZED',_0x1b5562))(_0x7af052||{});const _0x2a4927=_0x35fe8e=>_0x3c648d[_0x3f0ee5(0x19a)](new Date(+_0x35fe8e))['format']('YYYY/MM/DD\x20HH:mm'),_0x4a1b1f=async(_0x142d99,_0x3d0266)=>{const _0x4cbb8d=_0x3f0ee5,_0x91f4bb=_0x142d99['get'](_0x3c648d[_0x4cbb8d(0x19b)]),_0x2424fc=_0x142d99[_0x4cbb8d(0x1bf)](_0x48603c[_0x4cbb8d(0x1b4)]);_0x3d0266[_0x4cbb8d(0x1ab)](_0x1cc6a6=>{const _0x510e8a=_0x4cbb8d;_0x91f4bb[_0x510e8a(0x177)](_0x1cc6a6)&&_0x3d0266[_0x510e8a(0x1a1)](_0x1cc6a6);}),_0x3d0266['size']&&(await _0x2424fc[_0x4cbb8d(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3d0266]}}))[_0x4cbb8d(0x1d3)]['users'][_0x4cbb8d(0x1ab)](_0x249f94=>{const _0x2edff5=_0x4cbb8d;_0x249f94&&_0x91f4bb[_0x2edff5(0x18b)](_0x249f94);});};var _0x53e6be=Object[_0x3f0ee5(0x1f8)],_0x26083b=(_0x3ecb63,_0x11377e,_0x116f94,_0x2eed99)=>{const _0x4bcd19=_0x3f0ee5;for(var _0x2f7a34=_0x2eed99>0x1?void 0x0:_0x2eed99?_0x53e6be(_0x11377e,_0x116f94):_0x11377e,_0x12b210=_0x3ecb63[_0x4bcd19(0x199)]-0x1,_0x4276e0;_0x12b210>=0x0;_0x12b210--)(_0x4276e0=_0x3ecb63[_0x12b210])&&(_0x2f7a34=_0x4276e0(_0x2f7a34)||_0x2f7a34);return _0x2f7a34;},_0x4ffaf4=(_0x3cfbed,_0x1842ae)=>(_0x107fbb,_0x11981e)=>_0x1842ae(_0x107fbb,_0x11981e,_0x3cfbed);let _0xe4df36=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x36d134,_0x1f7351,_0x591a2b,_0x2fb144){const _0x52c7e0=_0x3f0ee5;super(),this[_0x52c7e0(0x1aa)]=_0x36d134,this[_0x52c7e0(0x1f0)]=_0x1f7351,this[_0x52c7e0(0x1ee)]=_0x591a2b,this[_0x52c7e0(0x1d2)]=_0x2fb144,this['_init'](),this[_0x52c7e0(0x1af)]();}['_initUserSync'](){const _0x423b42=_0x3f0ee5;this[_0x423b42(0x1e7)](this[_0x423b42(0x1f0)][_0x423b42(0x179)][_0x423b42(0x183)](_0xd85e6f[_0x423b42(0x1dc)](0x10))[_0x423b42(0x19f)](_0x746cf8=>{const _0x43efdc=new Set();_0x746cf8['forEach'](_0x2bc85d=>{const _0x12b575=_0x4398;switch(_0x2bc85d[_0x12b575(0x187)]){case _0x12b575(0x176):{const _0x33cd34=_0x2bc85d['payload'][_0x12b575(0x19c)];_0x43efdc[_0x12b575(0x176)](_0x33cd34);break;}}}),_0x4a1b1f(this['_injector'],_0x43efdc);}));}[_0x3f0ee5(0x1f4)](){const _0x51a79c=_0x3f0ee5;this['disposeWithMe'](this[_0x51a79c(0x1aa)][_0x51a79c(0x179)][_0x51a79c(0x19f)](async _0x39f27e=>{const _0x5ee7f3=_0x51a79c;var _0x154b1b,_0x230e6b,_0x3397ac,_0x37082b;const _0x29bfc5=(_0x154b1b=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x517ee7=>_0x517ee7[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x154b1b[_0x5ee7f3(0x1ba)];if(!_0x29bfc5)return;const {unitId:_0x4e1cdc,subUnitId:_0x556f1c}=_0x29bfc5;switch(_0x39f27e[_0x5ee7f3(0x186)]&&this[_0x5ee7f3(0x1ee)][_0x5ee7f3(0x18b)](_0x39f27e[_0x5ee7f3(0x186)]),_0x39f27e[_0x5ee7f3(0x187)]){case _0x7af052[_0x5ee7f3(0x1e8)]:break;case _0x7af052[_0x5ee7f3(0x1f2)]:{this['_threadCommentModel']['addComment'](_0x4e1cdc,_0x556f1c,{'unitId':_0x4e1cdc,'subUnitId':_0x556f1c,'ref':'','id':_0x39f27e[_0x5ee7f3(0x1bd)],'dT':_0x2a4927(+_0x39f27e['createTimestamp']),'threadId':_0x39f27e[_0x5ee7f3(0x1c1)],'personId':(_0x3397ac=(_0x230e6b=_0x39f27e[_0x5ee7f3(0x186)])==null?void 0x0:_0x230e6b[_0x5ee7f3(0x1c3)])!=null?_0x3397ac:_0x39f27e[_0x5ee7f3(0x1d9)],'text':JSON[_0x5ee7f3(0x17e)](_0x39f27e[_0x5ee7f3(0x1a2)]),'parentId':_0x29bfc5['id']});break;}case _0x7af052['Delete']:{const _0x368463=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1ac)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);_0x368463&&_0x368463[_0x5ee7f3(0x1ef)]&&this['_threadCommentModel'][_0x5ee7f3(0x1a7)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);break;}case _0x7af052[_0x5ee7f3(0x1cd)]:{this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x17c)](_0x4e1cdc,_0x556f1c,{'commentId':_0x39f27e[_0x5ee7f3(0x1bd)],'text':JSON['parse'](_0x39f27e[_0x5ee7f3(0x1a2)])});break;}case _0x7af052[_0x5ee7f3(0x189)]:{const _0x29719b=(_0x37082b=this['_threadCommentModel'][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x2a1dee=>_0x2a1dee[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x37082b[_0x5ee7f3(0x1ba)];_0x29719b&&this['_threadCommentModel'][_0x5ee7f3(0x1a9)](_0x4e1cdc,_0x556f1c,_0x29719b['id'],_0x39f27e[_0x5ee7f3(0x1e9)]===_0x8e7e8b[_0x5ee7f3(0x1d7)]);break;}}}));}};_0xe4df36=_0x26083b([_0x4ffaf4(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x5d20d9[_0x3f0ee5(0x1e2)])),_0x4ffaf4(0x1,_0x3c648d['Inject'](_0x3b1059['ThreadCommentModel'])),_0x4ffaf4(0x2,_0x3c648d[_0x3f0ee5(0x1c0)](_0x3c648d[_0x3f0ee5(0x19b)])),_0x4ffaf4(0x3,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x1de)]))],_0xe4df36);const _0x3a876c=_0x3f0ee5(0x1e5),_0x1e4835={};var _0x20a5a8=Object['getOwnPropertyDescriptor'],_0x4f199e=(_0x1115d3,_0x406fc6,_0x62fb81,_0x19bf26)=>{for(var _0x3c981b=_0x19bf26>0x1?void 0x0:_0x19bf26?_0x20a5a8(_0x406fc6,_0x62fb81):_0x406fc6,_0x1ccb63=_0x1115d3['length']-0x1,_0x4d8b7f;_0x1ccb63>=0x0;_0x1ccb63--)(_0x4d8b7f=_0x1115d3[_0x1ccb63])&&(_0x3c981b=_0x4d8b7f(_0x3c981b)||_0x3c981b);return _0x3c981b;},_0x346b08=(_0x9ac741,_0x1997cb)=>(_0x5cc502,_0x10277c)=>_0x1997cb(_0x5cc502,_0x10277c,_0x9ac741);function _0x115485(_0x4dc836,_0x1d2a90){const _0x2755c8=_0x3f0ee5,_0x294372=_0x4dc836[_0x2755c8(0x17b)][0x0];return{..._0x1d2a90,'id':_0x294372[_0x2755c8(0x1bd)],'resolved':_0x4dc836[_0x2755c8(0x1e9)]===0x1,'dT':_0x2a4927(_0x294372[_0x2755c8(0x1c4)]),'personId':_0x294372[_0x2755c8(0x1d9)],'threadId':_0x294372[_0x2755c8(0x1c1)]};}function _0x532479(_0x188679,_0x16d735,_0xfbdf15){const _0x258c42=_0x3f0ee5;var _0x2b2a02,_0x508eb0;if(((_0x508eb0=(_0x2b2a02=_0x188679==null?void 0x0:_0x188679[_0x258c42(0x17b)])==null?void 0x0:_0x2b2a02[_0x258c42(0x199)])!=null?_0x508eb0:0x0)>0x0){const _0x1aed6b=(_0x9bbad3,_0x27e5c5)=>({'id':_0x9bbad3[_0x258c42(0x1bd)],'threadId':_0x9bbad3[_0x258c42(0x1c1)],'dT':_0x2a4927(_0x9bbad3[_0x258c42(0x1c4)]),'personId':_0x9bbad3[_0x258c42(0x1d9)],'resolved':_0x188679[_0x258c42(0x1e9)]===_0x8e7e8b[_0x258c42(0x1d7)],'unitId':_0x16d735,'subUnitId':_0xfbdf15,'text':JSON[_0x258c42(0x17e)](_0x9bbad3[_0x258c42(0x1a2)]),'parentId':_0x27e5c5}),_0x4f61a4=_0x1aed6b(_0x188679['replies'][0x0]);return{..._0x4f61a4,'children':_0x188679[_0x258c42(0x17b)][_0x258c42(0x1b6)](0x1)[_0x258c42(0x19e)](_0x243efa=>_0x1aed6b(_0x243efa,_0x4f61a4['id']))};}return null;}let _0x474c81=class{constructor(_0x30773b,_0x55b807,_0xdd47ff,_0x23fd3e){const _0x7c1530=_0x3f0ee5;this[_0x7c1530(0x1f5)]=_0x30773b,this[_0x7c1530(0x1ee)]=_0x55b807,this['_sessionService']=_0xdd47ff,this[_0x7c1530(0x1d2)]=_0x23fd3e;}async[_0x3f0ee5(0x1e0)](_0x2397f4){const _0x26a1e6=_0x3f0ee5;var _0x391b24,_0x5371db;const {parentId:_0x444621,unitId:_0xa1e839,text:_0x2eefdf,threadId:_0x32b298}=_0x2397f4,_0x4f9d41=(_0x5371db=(_0x391b24=_0x2eefdf['customRanges'])==null?void 0x0:_0x391b24[_0x26a1e6(0x182)](_0x1da5b7=>_0x1da5b7[_0x26a1e6(0x1b1)]===_0x3c648d[_0x26a1e6(0x1e6)][_0x26a1e6(0x1f7)])[_0x26a1e6(0x19e)](_0xf6d126=>_0xf6d126['rangeId']))!=null?_0x5371db:[],_0x2a765e=JSON['stringify'](_0x2eefdf),_0x4dd0d3=(await this[_0x26a1e6(0x1ed)][_0x26a1e6(0x1a4)](_0xa1e839))['getMemberID']();if(_0x444621){const _0x1b194d={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41,'threadId':_0x32b298},_0x2f80fd=(await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)]('/universer-api/comment/unit/'+_0xa1e839+_0x26a1e6(0x18c),{'body':_0x1b194d}))['body']['reply'];return{..._0x2397f4,'id':_0x2f80fd[_0x26a1e6(0x1bd)],'dT':_0x3c648d[_0x26a1e6(0x19a)](+_0x2f80fd[_0x26a1e6(0x1c4)])['format'](_0x26a1e6(0x1be)),'personId':_0x2f80fd[_0x26a1e6(0x1d9)]};}else{const _0x33b255={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41},_0x400ff1=await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)](_0x26a1e6(0x1da)+_0xa1e839+'/add',{'body':_0x33b255});return _0x115485(_0x400ff1['body'][_0x26a1e6(0x1d8)],_0x2397f4);}}async[_0x3f0ee5(0x17c)](_0x14700b){const _0x59762f=_0x3f0ee5;var _0x1b9466,_0xc7f378;const {text:_0x1041b5,unitId:_0x55907b}=_0x14700b,_0x5c9b21=(_0xc7f378=(_0x1b9466=_0x1041b5['customRanges'])==null?void 0x0:_0x1b9466['filter'](_0x393031=>_0x393031['rangeType']===_0x3c648d[_0x59762f(0x1e6)][_0x59762f(0x1f7)])[_0x59762f(0x19e)](_0x1eabaa=>_0x1eabaa[_0x59762f(0x1df)]))!=null?_0xc7f378:[],_0x2364dc=JSON[_0x59762f(0x1a3)](_0x1041b5),_0x579876=_0x14700b[_0x59762f(0x1c1)],_0x2481e8=_0x14700b['id'],_0x2b4bac={'memberId':(await this[_0x59762f(0x1ed)][_0x59762f(0x1a4)](_0x55907b))['getMemberID'](),'unitId':_0x55907b,'threadId':_0x579876,'mention':_0x5c9b21,'content':_0x2364dc,'replyId':_0x2481e8},_0x50fa94=await this[_0x59762f(0x1f5)]['post'](_0x59762f(0x1da)+_0x55907b+'/edit',{'body':_0x2b4bac});return!_0x50fa94[_0x59762f(0x1d3)][_0x59762f(0x17d)]||_0x50fa94[_0x59762f(0x1d3)]['error'][_0x59762f(0x196)]===0x1;}async['resolveComment'](_0x1cf1cd){const _0x8dad33=_0x3f0ee5,{unitId:_0x259342}=_0x1cf1cd,_0x442187=_0x1cf1cd[_0x8dad33(0x1c1)],_0x250538={'memberId':this['_userService'][_0x8dad33(0x1cf)]()['userID'],'unitId':_0x259342,'threadId':_0x442187,'solved':_0x1cf1cd[_0x8dad33(0x18f)]?_0x8e7e8b[_0x8dad33(0x1d7)]:_0x8e7e8b[_0x8dad33(0x184)]},_0x35c96a=await this[_0x8dad33(0x1f5)]['post'](_0x8dad33(0x1da)+_0x259342+'/solved',{'body':_0x250538});return!_0x35c96a[_0x8dad33(0x1d3)][_0x8dad33(0x17d)]||_0x35c96a['body'][_0x8dad33(0x17d)][_0x8dad33(0x196)]===0x1;}async[_0x3f0ee5(0x1a7)](_0x20431c,_0x2baf60,_0x88c2c,_0x2e3f6b){const _0x32fbd7=_0x3f0ee5,_0x53d7a9={'memberId':(await this[_0x32fbd7(0x1ed)][_0x32fbd7(0x1a4)](_0x20431c))[_0x32fbd7(0x1e4)](),'threadId':_0x88c2c,'replyId':_0x2e3f6b,'unitId':_0x20431c},_0x44e8b2=await this[_0x32fbd7(0x1f5)][_0x32fbd7(0x193)]('/universer-api/comment/unit/'+_0x20431c+_0x32fbd7(0x1ae),{'body':_0x53d7a9});return!_0x44e8b2[_0x32fbd7(0x1d3)]['error']||_0x44e8b2[_0x32fbd7(0x1d3)][_0x32fbd7(0x17d)]['code']===0x1;}async[_0x3f0ee5(0x1c6)](_0x4af09a,_0x3b9d05,_0x5afc38){const _0x267a51=_0x3f0ee5,_0x3996ed={'unitId':_0x4af09a,'threadId':_0x5afc38},_0x50f02b=await this[_0x267a51(0x1f5)][_0x267a51(0x193)](_0x267a51(0x1da)+_0x4af09a+_0x267a51(0x19d),{'body':_0x3996ed}),_0x37a4e4=_0x5afc38[_0x267a51(0x19e)](_0x4cf015=>_0x532479(_0x50f02b['body'][_0x267a51(0x1d0)][_0x4cf015],_0x4af09a,_0x3b9d05))[_0x267a51(0x182)](Boolean);return Object[_0x267a51(0x17f)](_0x50f02b[_0x267a51(0x1d3)][_0x267a51(0x1a8)])['forEach'](_0x151181=>{const _0x56a2c7=_0x267a51;this[_0x56a2c7(0x1ee)]['addUser'](_0x151181);}),_0x37a4e4;}[_0x3f0ee5(0x1c8)](_0x1e00a9){const _0x7e38fa=_0x3f0ee5;return{'id':_0x1e00a9['id'],'threadId':_0x1e00a9['threadId'],'ref':_0x1e00a9[_0x7e38fa(0x1b2)]};}};_0x474c81=_0x4f199e([_0x346b08(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x48603c[_0x3f0ee5(0x1b4)])),_0x346b08(0x1,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x19b)])),_0x346b08(0x2,_0x3c648d['Inject'](_0x5d20d9[_0x3f0ee5(0x1ec)])),_0x346b08(0x3,_0x3c648d['Inject'](_0x3c648d['Injector']))],_0x474c81);var _0x252caa=Object[_0x3f0ee5(0x1f8)],_0x3c1b13=(_0x4db7a4,_0x26b578,_0x14d82b,_0x923c9d)=>{const _0x4c60ed=_0x3f0ee5;for(var _0x4ead20=_0x923c9d>0x1?void 0x0:_0x923c9d?_0x252caa(_0x26b578,_0x14d82b):_0x26b578,_0x3c33d6=_0x4db7a4[_0x4c60ed(0x199)]-0x1,_0x35134f;_0x3c33d6>=0x0;_0x3c33d6--)(_0x35134f=_0x4db7a4[_0x3c33d6])&&(_0x4ead20=_0x35134f(_0x4ead20)||_0x4ead20);return _0x4ead20;},_0x5089b5=(_0x593b97,_0x178217)=>(_0x47a566,_0x51bf38)=>_0x178217(_0x47a566,_0x51bf38,_0x593b97);let _0xd69d66=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x483156,_0x52bda5){const _0x3200e7=_0x3f0ee5;super(),this[_0x3200e7(0x174)]=_0x483156,this['_threadCommentDataSource']=_0x52bda5,this[_0x3200e7(0x1dd)]();}[_0x3f0ee5(0x1dd)](){const _0x708a65=_0x3f0ee5;this['_threadCommentDataSourceService'][_0x708a65(0x190)]=this[_0x708a65(0x175)],this[_0x708a65(0x174)][_0x708a65(0x194)]=!0x1;}};_0xd69d66=_0x3c1b13([_0x5089b5(0x0,_0x3b1059[_0x3f0ee5(0x1bb)]),_0x5089b5(0x1,_0x3c648d[_0x3f0ee5(0x1c0)](_0x474c81))],_0xd69d66);var _0x212fd9=Object[_0x3f0ee5(0x1b0)],_0x1034f4=Object['getOwnPropertyDescriptor'],_0x168ad9=(_0x389b70,_0x164419,_0xb43a44)=>_0x164419 in _0x389b70?_0x212fd9(_0x389b70,_0x164419,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb43a44}):_0x389b70[_0x164419]=_0xb43a44,_0x542e7c=(_0x4377a4,_0x1bb03a,_0x2be553,_0x2b124c)=>{for(var _0x1bbc95=_0x2b124c>0x1?void 0x0:_0x2b124c?_0x1034f4(_0x1bb03a,_0x2be553):_0x1bb03a,_0x5c2fab=_0x4377a4['length']-0x1,_0x218a73;_0x5c2fab>=0x0;_0x5c2fab--)(_0x218a73=_0x4377a4[_0x5c2fab])&&(_0x1bbc95=_0x218a73(_0x1bbc95)||_0x1bbc95);return _0x1bbc95;},_0x57ee6b=(_0x4c0563,_0x10a7a2)=>(_0x595f52,_0x107929)=>_0x10a7a2(_0x595f52,_0x107929,_0x4c0563),_0x507446=(_0x996b54,_0x2e29fa,_0x2c5fff)=>_0x168ad9(_0x996b54,typeof _0x2e29fa!=_0x3f0ee5(0x1cc)?_0x2e29fa+'':_0x2e29fa,_0x2c5fff);_0x11ecc3[_0x3f0ee5(0x18e)]=class extends _0x3c648d['Plugin']{constructor(_0x1ae307=_0x1e4835,_0xbdb220,_0x43550a){const _0x11341=_0x3f0ee5;super(),this[_0x11341(0x1a5)]=_0x1ae307,this['_injector']=_0xbdb220,this['_configService']=_0x43550a;const {..._0xf4be42}=_0x3c648d[_0x11341(0x198)]({},_0x1e4835,this['_config']);this['_configService']['setConfig'](_0x3a876c,_0xf4be42);}[_0x3f0ee5(0x1f1)](){const _0x334300=_0x3f0ee5;[[_0x474c81],[_0xd69d66],[_0xe4df36]][_0x334300(0x1ab)](_0x5464b8=>{const _0x57f151=_0x334300;this[_0x57f151(0x1d2)]['add'](_0x5464b8);});}[_0x3f0ee5(0x1b5)](){const _0x15a2d3=_0x3f0ee5;this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xd69d66),this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xe4df36);}},_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x1b9),_0x29c887),_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x187),_0x3c648d[_0x3f0ee5(0x173)]['UNIVER_UNKNOWN']),_0x11ecc3['UniverThreadCommentDataSourcePlugin']=_0x542e7c([_0x3c648d[_0x3f0ee5(0x1f6)](_0x20cd00['UniverThreadCommentUIPlugin'],_0x5d20d9[_0x3f0ee5(0x178)],_0x11ab02[_0x3f0ee5(0x192)]),_0x57ee6b(0x1,_0x3c648d['Inject'](_0x3c648d['Injector'])),_0x57ee6b(0x2,_0x3c648d['IConfigService'])],_0x11ecc3[_0x3f0ee5(0x18e)]),Object[_0x3f0ee5(0x1b0)](_0x11ecc3,Symbol[_0x3f0ee5(0x195)],{'value':'Module'});}));function _0x47e6(){const _0x654b07=['onStarting','Reply','UniverNetwork','_init','_httpService','DependentOn','COMMENT','getOwnPropertyDescriptor','UniverInstanceType','_threadCommentDataSourceService','_threadCommentDataSource','add','getUser','UniverCollaborationClientPlugin','commentUpdate$','object','replies','updateComment','error','parse','values','235704ZrvHJl','find','filter','pipe','OpenOrReOpen','525810SnWKhA','user','type','64810YvrpQv','Solve','621744oQxwKT','addUser','/reply','@univerjs/thread-comment-ui','UniverThreadCommentDataSourcePlugin','resolved','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverLicensePlugin','post','syncUpdateMutationToColla','toStringTag','code','unitId','merge','length','dayjs','UserManagerService','personId','/list','map','subscribe','rxjs','delete','content','stringify','requireSession','_config','UniverThreadComment','deleteComment','users','resolveComment','_commentService','forEach','getComment','10yJXpld','/delete','_initUserSync','defineProperty','rangeType','ref','getUnit','HTTPService','onReady','slice','6Wyrbiq','exports','pluginName','root','IThreadCommentDataSourceService','@univerjs/core','replyId','YYYY/MM/DD\x20HH:mm','get','Inject','threadId','function','userID','createTimestamp','9977198WSAziX','listComments','3000780DgpskA','saveCommentToSnapshot','Delete','amd','@univerjs/thread-comment','symbol','Edit','@univerjs-pro/license','getCurrentUser','comments','3XwUWBE','_injector','body','UniverProLicense','@univerjs/network','Unknown','Solved','comment','userId','/universer-api/comment/unit/','Disposable','bufferTime','_initDataSource','Injector','rangeId','addComment','UNRECOGNIZED','CommentService','9272qjAZVp','getMemberID','thread-comment-data-source.config','CustomRangeType','disposeWithMe','Add','solved','UniverCore','1568wKsHLq','CollaborationSessionService','_sessionService','_userService','parentId','_threadCommentModel'];_0x47e6=function(){return _0x654b07;};return _0x47e6();}
|
|
1
|
+
function _0xe027(){const _0x138747=['subscribe','Injector','Edit','type','payload','69160NHmLBv','Disposable','parentId','getComment','filter','saveCommentToSnapshot','Solved','Add','3943926ZeYDZf','/list','disposeWithMe','_userService','ThreadCommentModel','21630sgBnnQ','object','merge','UniverThreadCommentDataSourcePlugin','895815rMfFma','UniverProCollaborationClient','format','_config','UniverCore','addUser','listComments','thread-comment-data-source.config','UniverInstanceType','@univerjs/thread-comment-ui','rxjs','CommentService','UserManagerService','defineProperty','stringify','find','Solve','getMemberID','3DGdyzg','slice','_init','2214vEaMjU','delete','Delete','_threadCommentModel','userID','content','pipe','function','customRanges','UniverNetwork','getUnit','size','users','_injector','_initUserSync','679mQdgZR','getUser','comments','rangeType','@univerjs-pro/license','_threadCommentDataSource','bufferTime','_threadCommentDataSourceService','pluginName','replyId','requireSession','map','forEach','userId','@univerjs-pro/collaboration-client','get','/delete','add','IThreadCommentDataSourceService','IConfigService','syncUpdateMutationToColla','Unknown','/add','replies','UniverProThreadCommentDatasource','addComment','UniverThreadCommentUIPlugin','ref','rangeId','UniverCollaborationClientPlugin','symbol','UniverProLicense','_configService','205FGjebG','values','Reply','UNRECOGNIZED','@univerjs/network','/universer-api/comment/unit/','getCurrentUser','updateComment','deleteComment','28083484ykCfQG','setConfig','getOwnPropertyDescriptor','_initDataSource','2182866ouYduq','onReady','unitId','_httpService','Plugin','solved','reply','onStarting','error','@univerjs/core','personId','resolveComment','code','createTimestamp','user','commentUpdate$','@univerjs/thread-comment','post','amd','UNIVER_UNKNOWN','dayjs','Inject','parse','length','CustomRangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','body','threadId','102412TKWSgi','_sessionService','COMMENT','dataSource','HTTPService','YYYY/MM/DD\x20HH:mm'];_0xe027=function(){return _0x138747;};return _0xe027();}function _0x52f8(_0x4fb342,_0x3373af){const _0xe0271f=_0xe027();return _0x52f8=function(_0x52f810,_0x3a4965){_0x52f810=_0x52f810-0x193;let _0x1864c6=_0xe0271f[_0x52f810];return _0x1864c6;},_0x52f8(_0x4fb342,_0x3373af);}(function(_0x34023c,_0x5d7969){const _0x45813d=_0x52f8,_0x2b3c37=_0x34023c();while(!![]){try{const _0x19d742=parseInt(_0x45813d(0x1de))/0x1+-parseInt(_0x45813d(0x1a5))/0x2*(parseInt(_0x45813d(0x1f0))/0x3)+-parseInt(_0x45813d(0x1c2))/0x4*(parseInt(_0x45813d(0x198))/0x5)+parseInt(_0x45813d(0x1d5))/0x6+-parseInt(_0x45813d(0x202))/0x7*(parseInt(_0x45813d(0x1cd))/0x8)+parseInt(_0x45813d(0x1f3))/0x9*(-parseInt(_0x45813d(0x1da))/0xa)+parseInt(_0x45813d(0x1a1))/0xb;if(_0x19d742===_0x5d7969)break;else _0x2b3c37['push'](_0x2b3c37['shift']());}catch(_0x26457a){_0x2b3c37['push'](_0x2b3c37['shift']());}}}(_0xe027,0x911b9),function(_0x2201f2,_0xc7da50){const _0x3ad85e=_0x52f8;typeof exports==_0x3ad85e(0x1db)&&typeof module<'u'?_0xc7da50(exports,require(_0x3ad85e(0x210)),require(_0x3ad85e(0x206)),require(_0x3ad85e(0x1ae)),require(_0x3ad85e(0x1e7)),require(_0x3ad85e(0x1b5)),require(_0x3ad85e(0x1e8)),require('@univerjs/network')):typeof define==_0x3ad85e(0x1fa)&&define[_0x3ad85e(0x1b7)]?define(['exports',_0x3ad85e(0x210),'@univerjs-pro/license',_0x3ad85e(0x1ae),_0x3ad85e(0x1e7),_0x3ad85e(0x1b5),_0x3ad85e(0x1e8),_0x3ad85e(0x19c)],_0xc7da50):(_0x2201f2=typeof globalThis<'u'?globalThis:_0x2201f2||self,_0xc7da50(_0x2201f2[_0x3ad85e(0x21a)]={},_0x2201f2[_0x3ad85e(0x1df)],_0x2201f2[_0x3ad85e(0x196)],_0x2201f2[_0x3ad85e(0x1e2)],_0x2201f2['UniverThreadCommentUi'],_0x2201f2['UniverThreadComment'],_0x2201f2['rxjs'],_0x2201f2[_0x3ad85e(0x1fc)]));}(this,function(_0x548496,_0x426221,_0xc37522,_0x1c699f,_0x87d4ea,_0xcce1a5,_0x147dd4,_0x521ef0){'use strict';const _0x116d82=_0x52f8;const _0x456c38=_0x116d82(0x1be);var _0x16e3d0=(_0x1af785=>(_0x1af785[_0x1af785['OpenOrReOpen']=0x0]=_0x116d82(0x1bf),_0x1af785[_0x1af785[_0x116d82(0x1d3)]=0x1]=_0x116d82(0x1d3),_0x1af785[_0x1af785['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1af785))(_0x16e3d0||{}),_0x348269=(_0x40fa4c=>(_0x40fa4c[_0x40fa4c[_0x116d82(0x217)]=0x0]=_0x116d82(0x217),_0x40fa4c[_0x40fa4c['Add']=0x1]='Add',_0x40fa4c[_0x40fa4c[_0x116d82(0x19a)]=0x2]=_0x116d82(0x19a),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ca)]=0x3]=_0x116d82(0x1ca),_0x40fa4c[_0x40fa4c[_0x116d82(0x1f5)]=0x4]=_0x116d82(0x1f5),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ee)]=0x5]=_0x116d82(0x1ee),_0x40fa4c[_0x40fa4c[_0x116d82(0x19b)]=-0x1]=_0x116d82(0x19b),_0x40fa4c))(_0x348269||{});const _0x408a58=_0xefb243=>_0x1c699f[_0x116d82(0x1b9)](new Date(+_0xefb243))[_0x116d82(0x1e0)](_0x116d82(0x1c7)),_0x5f3f61=async(_0x29757c,_0x51ac4f)=>{const _0x1fd6a9=_0x116d82,_0x1db48f=_0x29757c[_0x1fd6a9(0x211)](_0x1c699f[_0x1fd6a9(0x1ea)]),_0x44e7d9=_0x29757c[_0x1fd6a9(0x211)](_0x521ef0[_0x1fd6a9(0x1c6)]);_0x51ac4f[_0x1fd6a9(0x20e)](_0x13bcd1=>{const _0x3f6484=_0x1fd6a9;_0x1db48f[_0x3f6484(0x203)](_0x13bcd1)&&_0x51ac4f[_0x3f6484(0x1f4)](_0x13bcd1);}),_0x51ac4f[_0x1fd6a9(0x1fe)]&&(await _0x44e7d9[_0x1fd6a9(0x211)]('/universer-api/user/list',{'params':{'userIDs':[..._0x51ac4f]}}))[_0x1fd6a9(0x1c0)]['users'][_0x1fd6a9(0x20e)](_0x5995ac=>{const _0xac934b=_0x1fd6a9;_0x5995ac&&_0x1db48f[_0xac934b(0x1e3)](_0x5995ac);});};var _0x5a206a=Object[_0x116d82(0x1a3)],_0x263b60=(_0x1fbe0a,_0x20341b,_0x183666,_0x496ece)=>{const _0x215ec8=_0x116d82;for(var _0x5afa5c=_0x496ece>0x1?void 0x0:_0x496ece?_0x5a206a(_0x20341b,_0x183666):_0x20341b,_0x48930a=_0x1fbe0a[_0x215ec8(0x1bc)]-0x1,_0x7c05ae;_0x48930a>=0x0;_0x48930a--)(_0x7c05ae=_0x1fbe0a[_0x48930a])&&(_0x5afa5c=_0x7c05ae(_0x5afa5c)||_0x5afa5c);return _0x5afa5c;},_0x5ac075=(_0x4d4148,_0xe81b4f)=>(_0x3136a5,_0x402d2b)=>_0xe81b4f(_0x3136a5,_0x402d2b,_0x4d4148);let _0x102805=class extends _0x1c699f[_0x116d82(0x1ce)]{constructor(_0x2af3a4,_0x53477f,_0x43fccb,_0x1b79ec){const _0x2a5b53=_0x116d82;super(),this['_commentService']=_0x2af3a4,this['_threadCommentModel']=_0x53477f,this['_userService']=_0x43fccb,this['_injector']=_0x1b79ec,this['_init'](),this[_0x2a5b53(0x201)]();}[_0x116d82(0x201)](){const _0x23d098=_0x116d82;this[_0x23d098(0x1d7)](this[_0x23d098(0x1f6)][_0x23d098(0x1b4)][_0x23d098(0x1f9)](_0x147dd4[_0x23d098(0x208)](0x10))[_0x23d098(0x1c8)](_0x1a253c=>{const _0x478236=_0x23d098,_0x5a814b=new Set();_0x1a253c[_0x478236(0x20e)](_0x444204=>{const _0x506986=_0x478236;switch(_0x444204[_0x506986(0x1cb)]){case _0x506986(0x213):{const _0x1f411a=_0x444204[_0x506986(0x1cc)][_0x506986(0x1af)];_0x5a814b[_0x506986(0x213)](_0x1f411a);break;}}}),_0x5f3f61(this[_0x478236(0x200)],_0x5a814b);}));}[_0x116d82(0x1f2)](){const _0x391011=_0x116d82;this[_0x391011(0x1d7)](this['_commentService']['commentUpdate$'][_0x391011(0x1c8)](async _0x19c4ca=>{const _0x41dc1=_0x391011;var _0x346823,_0x4b0569,_0x1f78f3,_0x3998f8;const _0x44e72c=(_0x346823=this['_threadCommentModel']['getUnit'](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x5ca515=>_0x5ca515['threadId']===_0x19c4ca['threadId']))==null?void 0x0:_0x346823['root'];if(!_0x44e72c)return;const {unitId:_0x2a8853,subUnitId:_0x6a997f}=_0x44e72c;switch(_0x19c4ca[_0x41dc1(0x1b3)]&&this[_0x41dc1(0x1d8)][_0x41dc1(0x1e3)](_0x19c4ca[_0x41dc1(0x1b3)]),_0x19c4ca['type']){case _0x348269[_0x41dc1(0x1d4)]:break;case _0x348269[_0x41dc1(0x19a)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x21b)](_0x2a8853,_0x6a997f,{'unitId':_0x2a8853,'subUnitId':_0x6a997f,'ref':'','id':_0x19c4ca['replyId'],'dT':_0x408a58(+_0x19c4ca['createTimestamp']),'threadId':_0x19c4ca['threadId'],'personId':(_0x1f78f3=(_0x4b0569=_0x19c4ca[_0x41dc1(0x1b3)])==null?void 0x0:_0x4b0569[_0x41dc1(0x1f7)])!=null?_0x1f78f3:_0x19c4ca[_0x41dc1(0x20f)],'text':JSON['parse'](_0x19c4ca[_0x41dc1(0x1f8)]),'parentId':_0x44e72c['id']});break;}case _0x348269[_0x41dc1(0x1f5)]:{const _0x190aac=this['_threadCommentModel'][_0x41dc1(0x1d0)](_0x2a8853,_0x6a997f,_0x19c4ca['replyId']);_0x190aac&&_0x190aac[_0x41dc1(0x1cf)]&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1a0)](_0x2a8853,_0x6a997f,_0x19c4ca[_0x41dc1(0x20b)]);break;}case _0x348269[_0x41dc1(0x1ca)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x19f)](_0x2a8853,_0x6a997f,{'commentId':_0x19c4ca[_0x41dc1(0x20b)],'text':JSON[_0x41dc1(0x1bb)](_0x19c4ca[_0x41dc1(0x1f8)])});break;}case _0x348269[_0x41dc1(0x1ee)]:{const _0x159724=(_0x3998f8=this[_0x41dc1(0x1f6)][_0x41dc1(0x1fd)](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x449aea=>_0x449aea['threadId']===_0x19c4ca[_0x41dc1(0x1c1)]))==null?void 0x0:_0x3998f8['root'];_0x159724&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1b0)](_0x2a8853,_0x6a997f,_0x159724['id'],_0x19c4ca[_0x41dc1(0x1aa)]===_0x16e3d0[_0x41dc1(0x1d3)]);break;}}}));}};_0x102805=_0x263b60([_0x5ac075(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x426221[_0x116d82(0x1e9)])),_0x5ac075(0x1,_0x1c699f[_0x116d82(0x1ba)](_0xcce1a5[_0x116d82(0x1d9)])),_0x5ac075(0x2,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f['UserManagerService'])),_0x5ac075(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x102805);const _0x1eab7f=_0x116d82(0x1e5),_0xabd489={};var _0x5efb10=Object[_0x116d82(0x1a3)],_0xfa0ff3=(_0x541205,_0xb650c7,_0x5217ee,_0x349ff1)=>{const _0x326edc=_0x116d82;for(var _0xd85ac8=_0x349ff1>0x1?void 0x0:_0x349ff1?_0x5efb10(_0xb650c7,_0x5217ee):_0xb650c7,_0x352ce5=_0x541205[_0x326edc(0x1bc)]-0x1,_0x41053f;_0x352ce5>=0x0;_0x352ce5--)(_0x41053f=_0x541205[_0x352ce5])&&(_0xd85ac8=_0x41053f(_0xd85ac8)||_0xd85ac8);return _0xd85ac8;},_0xbf8b5b=(_0x297a5a,_0x3d8234)=>(_0x220058,_0x20bdd1)=>_0x3d8234(_0x220058,_0x20bdd1,_0x297a5a);function _0x34bfe5(_0x397723,_0x2ca247){const _0x8af5c3=_0x116d82,_0x2f1581=_0x397723[_0x8af5c3(0x219)][0x0];return{..._0x2ca247,'id':_0x2f1581[_0x8af5c3(0x20b)],'resolved':_0x397723[_0x8af5c3(0x1aa)]===0x1,'dT':_0x408a58(_0x2f1581[_0x8af5c3(0x1b2)]),'personId':_0x2f1581[_0x8af5c3(0x20f)],'threadId':_0x2f1581[_0x8af5c3(0x1c1)]};}function _0x4959a2(_0x5e4d87,_0x667d5d,_0x347ea2){const _0x3833e5=_0x116d82;var _0x4fdeaa,_0x3bf4fd;if(((_0x3bf4fd=(_0x4fdeaa=_0x5e4d87==null?void 0x0:_0x5e4d87[_0x3833e5(0x219)])==null?void 0x0:_0x4fdeaa[_0x3833e5(0x1bc)])!=null?_0x3bf4fd:0x0)>0x0){const _0x135770=(_0x9a188f,_0x15afd1)=>({'id':_0x9a188f[_0x3833e5(0x20b)],'threadId':_0x9a188f[_0x3833e5(0x1c1)],'dT':_0x408a58(_0x9a188f[_0x3833e5(0x1b2)]),'personId':_0x9a188f[_0x3833e5(0x20f)],'resolved':_0x5e4d87[_0x3833e5(0x1aa)]===_0x16e3d0[_0x3833e5(0x1d3)],'unitId':_0x667d5d,'subUnitId':_0x347ea2,'text':JSON[_0x3833e5(0x1bb)](_0x9a188f[_0x3833e5(0x1f8)]),'parentId':_0x15afd1}),_0x18acc6=_0x135770(_0x5e4d87[_0x3833e5(0x219)][0x0]);return{..._0x18acc6,'children':_0x5e4d87[_0x3833e5(0x219)][_0x3833e5(0x1f1)](0x1)[_0x3833e5(0x20d)](_0x129fc7=>_0x135770(_0x129fc7,_0x18acc6['id']))};}return null;}let _0x54b91b=class{constructor(_0x39ca5e,_0x1b4b63,_0x3926d3,_0x270d69){const _0x563a4a=_0x116d82;this[_0x563a4a(0x1a8)]=_0x39ca5e,this['_userService']=_0x1b4b63,this['_sessionService']=_0x3926d3,this[_0x563a4a(0x200)]=_0x270d69;}async[_0x116d82(0x21b)](_0x1bb360){const _0x3335f9=_0x116d82;var _0x1c6047,_0x20e732;const {parentId:_0x815b70,unitId:_0x56d781,text:_0x430df3,threadId:_0x5c8fee}=_0x1bb360,_0x371683=(_0x20e732=(_0x1c6047=_0x430df3[_0x3335f9(0x1fb)])==null?void 0x0:_0x1c6047[_0x3335f9(0x1d1)](_0x52079e=>_0x52079e[_0x3335f9(0x205)]===_0x1c699f[_0x3335f9(0x1bd)][_0x3335f9(0x1c4)])['map'](_0x4e6abc=>_0x4e6abc[_0x3335f9(0x193)]))!=null?_0x20e732:[],_0x38020b=JSON[_0x3335f9(0x1ec)](_0x430df3),_0x38fdf9=(await this[_0x3335f9(0x1c3)][_0x3335f9(0x20c)](_0x56d781))[_0x3335f9(0x1ef)]();if(_0x815b70){const _0x27d942={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683,'threadId':_0x5c8fee},_0x434cc8=(await this['_httpService'][_0x3335f9(0x1b6)](_0x3335f9(0x19d)+_0x56d781+'/reply',{'body':_0x27d942}))[_0x3335f9(0x1c0)][_0x3335f9(0x1ab)];return{..._0x1bb360,'id':_0x434cc8[_0x3335f9(0x20b)],'dT':_0x1c699f[_0x3335f9(0x1b9)](+_0x434cc8[_0x3335f9(0x1b2)])[_0x3335f9(0x1e0)](_0x3335f9(0x1c7)),'personId':_0x434cc8[_0x3335f9(0x20f)]};}else{const _0x59a8da={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683},_0x115952=await this['_httpService']['post'](_0x3335f9(0x19d)+_0x56d781+_0x3335f9(0x218),{'body':_0x59a8da});return _0x34bfe5(_0x115952['body']['comment'],_0x1bb360);}}async[_0x116d82(0x19f)](_0x59a569){const _0xa48423=_0x116d82;var _0x4795e5,_0x52c03c;const {text:_0x5ee8d3,unitId:_0x501209}=_0x59a569,_0x57d47a=(_0x52c03c=(_0x4795e5=_0x5ee8d3[_0xa48423(0x1fb)])==null?void 0x0:_0x4795e5['filter'](_0x1f3a9e=>_0x1f3a9e['rangeType']===_0x1c699f[_0xa48423(0x1bd)][_0xa48423(0x1c4)])['map'](_0x4d951d=>_0x4d951d[_0xa48423(0x193)]))!=null?_0x52c03c:[],_0x218496=JSON[_0xa48423(0x1ec)](_0x5ee8d3),_0x3f1db1=_0x59a569[_0xa48423(0x1c1)],_0x51c8a6=_0x59a569['id'],_0xe17eb4={'memberId':(await this['_sessionService'][_0xa48423(0x20c)](_0x501209))['getMemberID'](),'unitId':_0x501209,'threadId':_0x3f1db1,'mention':_0x57d47a,'content':_0x218496,'replyId':_0x51c8a6},_0x12cdf2=await this[_0xa48423(0x1a8)]['post']('/universer-api/comment/unit/'+_0x501209+'/edit',{'body':_0xe17eb4});return!_0x12cdf2[_0xa48423(0x1c0)][_0xa48423(0x1ad)]||_0x12cdf2['body'][_0xa48423(0x1ad)][_0xa48423(0x1b1)]===0x1;}async[_0x116d82(0x1b0)](_0x5abe8c){const _0x421e78=_0x116d82,{unitId:_0x1b7e39}=_0x5abe8c,_0xdc4ff9=_0x5abe8c[_0x421e78(0x1c1)],_0x3e3335={'memberId':this[_0x421e78(0x1d8)][_0x421e78(0x19e)]()['userID'],'unitId':_0x1b7e39,'threadId':_0xdc4ff9,'solved':_0x5abe8c['resolved']?_0x16e3d0['Solved']:_0x16e3d0[_0x421e78(0x1bf)]},_0x10c454=await this['_httpService']['post'](_0x421e78(0x19d)+_0x1b7e39+'/solved',{'body':_0x3e3335});return!_0x10c454['body']['error']||_0x10c454[_0x421e78(0x1c0)][_0x421e78(0x1ad)][_0x421e78(0x1b1)]===0x1;}async[_0x116d82(0x1a0)](_0x33c73e,_0x568d76,_0x3ba347,_0x2be894){const _0x3b8567=_0x116d82,_0xf1e7d6={'memberId':(await this[_0x3b8567(0x1c3)][_0x3b8567(0x20c)](_0x33c73e))[_0x3b8567(0x1ef)](),'threadId':_0x3ba347,'replyId':_0x2be894,'unitId':_0x33c73e},_0x37b982=await this[_0x3b8567(0x1a8)][_0x3b8567(0x1b6)](_0x3b8567(0x19d)+_0x33c73e+_0x3b8567(0x212),{'body':_0xf1e7d6});return!_0x37b982[_0x3b8567(0x1c0)][_0x3b8567(0x1ad)]||_0x37b982[_0x3b8567(0x1c0)]['error'][_0x3b8567(0x1b1)]===0x1;}async[_0x116d82(0x1e4)](_0x5674b5,_0x5bf4f6,_0x4876f9){const _0x161065=_0x116d82,_0x369366={'unitId':_0x5674b5,'threadId':_0x4876f9},_0x9e8f68=await this['_httpService']['post'](_0x161065(0x19d)+_0x5674b5+_0x161065(0x1d6),{'body':_0x369366}),_0x16f77b=_0x4876f9['map'](_0x4e8962=>_0x4959a2(_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x204)][_0x4e8962],_0x5674b5,_0x5bf4f6))[_0x161065(0x1d1)](Boolean);return Object[_0x161065(0x199)](_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x1ff)])[_0x161065(0x20e)](_0x80d514=>{const _0x314f8c=_0x161065;this[_0x314f8c(0x1d8)][_0x314f8c(0x1e3)](_0x80d514);}),_0x16f77b;}[_0x116d82(0x1d2)](_0x5b7314){const _0x1de497=_0x116d82;return{'id':_0x5b7314['id'],'threadId':_0x5b7314[_0x1de497(0x1c1)],'ref':_0x5b7314[_0x1de497(0x21d)]};}};_0x54b91b=_0xfa0ff3([_0xbf8b5b(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x521ef0[_0x116d82(0x1c6)])),_0xbf8b5b(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1ea)])),_0xbf8b5b(0x2,_0x1c699f['Inject'](_0x426221['CollaborationSessionService'])),_0xbf8b5b(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x54b91b);var _0xd9f954=Object[_0x116d82(0x1a3)],_0x21f4e2=(_0xa6e4ec,_0x5291f7,_0x25411a,_0x450458)=>{const _0x37369d=_0x116d82;for(var _0x221026=_0x450458>0x1?void 0x0:_0x450458?_0xd9f954(_0x5291f7,_0x25411a):_0x5291f7,_0x510ae6=_0xa6e4ec[_0x37369d(0x1bc)]-0x1,_0x566447;_0x510ae6>=0x0;_0x510ae6--)(_0x566447=_0xa6e4ec[_0x510ae6])&&(_0x221026=_0x566447(_0x221026)||_0x221026);return _0x221026;},_0x4dc25a=(_0xcfdc0e,_0x17cc5f)=>(_0x312fd5,_0x4b2496)=>_0x17cc5f(_0x312fd5,_0x4b2496,_0xcfdc0e);let _0x161aae=class extends _0x1c699f['Disposable']{constructor(_0x24295c,_0x5c6753){const _0x12e491=_0x116d82;super(),this[_0x12e491(0x209)]=_0x24295c,this[_0x12e491(0x207)]=_0x5c6753,this[_0x12e491(0x1a4)]();}[_0x116d82(0x1a4)](){const _0x1866bc=_0x116d82;this[_0x1866bc(0x209)][_0x1866bc(0x1c5)]=this[_0x1866bc(0x207)],this['_threadCommentDataSourceService'][_0x1866bc(0x216)]=!0x1;}};_0x161aae=_0x21f4e2([_0x4dc25a(0x0,_0xcce1a5[_0x116d82(0x214)]),_0x4dc25a(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x54b91b))],_0x161aae);var _0x100f6e=Object[_0x116d82(0x1eb)],_0x5ecccc=Object['getOwnPropertyDescriptor'],_0x32371c=(_0x402718,_0x4f0803,_0x24988d)=>_0x4f0803 in _0x402718?_0x100f6e(_0x402718,_0x4f0803,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24988d}):_0x402718[_0x4f0803]=_0x24988d,_0x1434f9=(_0x274279,_0x414d9f,_0x50fe16,_0x4685d9)=>{const _0x17f876=_0x116d82;for(var _0x55c349=_0x4685d9>0x1?void 0x0:_0x4685d9?_0x5ecccc(_0x414d9f,_0x50fe16):_0x414d9f,_0x58e2b4=_0x274279[_0x17f876(0x1bc)]-0x1,_0x5406fb;_0x58e2b4>=0x0;_0x58e2b4--)(_0x5406fb=_0x274279[_0x58e2b4])&&(_0x55c349=_0x5406fb(_0x55c349)||_0x55c349);return _0x55c349;},_0x466e95=(_0x477af6,_0x5b002c)=>(_0x251b06,_0x4d247f)=>_0x5b002c(_0x251b06,_0x4d247f,_0x477af6),_0x3b8683=(_0x1cc1b5,_0x4a396d,_0x5395bb)=>_0x32371c(_0x1cc1b5,typeof _0x4a396d!=_0x116d82(0x195)?_0x4a396d+'':_0x4a396d,_0x5395bb);_0x548496[_0x116d82(0x1dd)]=class extends _0x1c699f[_0x116d82(0x1a9)]{constructor(_0xf5a0d3=_0xabd489,_0xd9fecd,_0x5137a5){const _0x13851d=_0x116d82;super(),this[_0x13851d(0x1e1)]=_0xf5a0d3,this[_0x13851d(0x200)]=_0xd9fecd,this[_0x13851d(0x197)]=_0x5137a5;const {..._0x20c592}=_0x1c699f[_0x13851d(0x1dc)]({},_0xabd489,this[_0x13851d(0x1e1)]);this['_configService'][_0x13851d(0x1a2)](_0x1eab7f,_0x20c592);}[_0x116d82(0x1ac)](){[[_0x54b91b],[_0x161aae],[_0x102805]]['forEach'](_0x3bf10f=>{const _0x3b6ba9=_0x52f8;this[_0x3b6ba9(0x200)]['add'](_0x3bf10f);});}[_0x116d82(0x1a6)](){const _0x4d73c6=_0x116d82;this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x161aae),this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x102805);}},_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x20a),_0x456c38),_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x1cb),_0x1c699f[_0x116d82(0x1e6)][_0x116d82(0x1b8)]),_0x548496['UniverThreadCommentDataSourcePlugin']=_0x1434f9([_0x1c699f['DependentOn'](_0x87d4ea[_0x116d82(0x21c)],_0x426221[_0x116d82(0x194)],_0xc37522['UniverLicensePlugin']),_0x466e95(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)])),_0x466e95(0x2,_0x1c699f[_0x116d82(0x215)])],_0x548496[_0x116d82(0x1dd)]),Object['defineProperty'](_0x548496,Symbol['toStringTag'],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505231607",
|
|
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.7.0-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505231607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505231607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505231607",
|
|
51
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
-
"@univerjs-
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505231607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505231607",
|
|
54
|
+
"@univerjs/network": "0.7.0-nightly.202505231607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|