@univerjs-pro/thread-comment-datasource 0.6.2 → 0.6.3-nightly.202503051607
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/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x36155a=_0x5362;(function(_0x347c8f,_0x3f1e39){const _0xce9fd=_0x5362,_0x3518e1=_0x347c8f();while(!![]){try{const _0x2d6555=-parseInt(_0xce9fd(0x1b0))/0x1+-parseInt(_0xce9fd(0x1fb))/0x2*(parseInt(_0xce9fd(0x1f9))/0x3)+-parseInt(_0xce9fd(0x20e))/0x4*(parseInt(_0xce9fd(0x20b))/0x5)+parseInt(_0xce9fd(0x1a1))/0x6*(parseInt(_0xce9fd(0x1f3))/0x7)+-parseInt(_0xce9fd(0x191))/0x8*(-parseInt(_0xce9fd(0x1a5))/0x9)+parseInt(_0xce9fd(0x1a2))/0xa*(parseInt(_0xce9fd(0x1c5))/0xb)+parseInt(_0xce9fd(0x1b4))/0xc*(parseInt(_0xce9fd(0x1a6))/0xd);if(_0x2d6555===_0x3f1e39)break;else _0x3518e1['push'](_0x3518e1['shift']());}catch(_0x93f037){_0x3518e1['push'](_0x3518e1['shift']());}}}(_0x374e,0x49522));Object[_0x36155a(0x204)](exports,Symbol[_0x36155a(0x211)],{'value':_0x36155a(0x1fa)});const b=require(_0x36155a(0x210)),T=require(_0x36155a(0x1cb)),c=require(_0x36155a(0x1d6)),j=require('@univerjs/thread-comment-ui'),M=require(_0x36155a(0x1bf)),w=require(_0x36155a(0x1c6)),P=require(_0x36155a(0x1ab)),U=_0x36155a(0x1b8);var I=(_0x379c06=>(_0x379c06[_0x379c06[_0x36155a(0x1ef)]=0x0]=_0x36155a(0x1ef),_0x379c06[_0x379c06[_0x36155a(0x1cc)]=0x1]=_0x36155a(0x1cc),_0x379c06[_0x379c06['UNRECOGNIZED']=-0x1]=_0x36155a(0x18e),_0x379c06))(I||{}),v=(_0x1cc1a7=>(_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1a9)]=0x0]=_0x36155a(0x1a9),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1ca)]=0x1]=_0x36155a(0x1ca),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1e2)]=0x2]=_0x36155a(0x1e2),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x194)]=0x3]=_0x36155a(0x194),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x196)]=0x4]=_0x36155a(0x196),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x19a)]=0x5]=_0x36155a(0x19a),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x18e)]=-0x1]=_0x36155a(0x18e),_0x1cc1a7))(v||{});const f=_0x1402e1=>c['dayjs'](new Date(+_0x1402e1))[_0x36155a(0x199)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f90d3,_0x47eb6a)=>{const _0x20cae1=_0x36155a,_0x484113=_0x2f90d3[_0x20cae1(0x1d3)](c[_0x20cae1(0x193)]),_0x259369=_0x2f90d3[_0x20cae1(0x1d3)](P['HTTPService']);_0x47eb6a[_0x20cae1(0x1db)](_0x3aa0bc=>{const _0x9bd1b1=_0x20cae1;_0x484113[_0x9bd1b1(0x212)](_0x3aa0bc)&&_0x47eb6a[_0x9bd1b1(0x1e1)](_0x3aa0bc);}),_0x47eb6a[_0x20cae1(0x19f)]&&(await _0x259369[_0x20cae1(0x1d3)](_0x20cae1(0x195),{'params':{'userIDs':[..._0x47eb6a]}}))[_0x20cae1(0x1f4)]['users']['forEach'](_0x40cd0e=>{const _0x13733f=_0x20cae1;_0x40cd0e&&_0x484113[_0x13733f(0x1f2)](_0x40cd0e);});};var $=Object[_0x36155a(0x1ba)],E=(_0x4dd63d,_0x388d68,_0x3f390c,_0x1d00c2)=>{const _0x4d09cb=_0x36155a;for(var _0x1d780c=_0x1d00c2>0x1?void 0x0:_0x1d00c2?$(_0x388d68,_0x3f390c):_0x388d68,_0x57408c=_0x4dd63d[_0x4d09cb(0x216)]-0x1,_0x1b2ece;_0x57408c>=0x0;_0x57408c--)(_0x1b2ece=_0x4dd63d[_0x57408c])&&(_0x1d780c=_0x1b2ece(_0x1d780c)||_0x1d780c);return _0x1d780c;},S=(_0x2c3e1d,_0x30500c)=>(_0x14eb89,_0x117599)=>_0x30500c(_0x14eb89,_0x117599,_0x2c3e1d);let p=class extends c['Disposable']{constructor(_0x3dd9c7,_0x46b594,_0x5e6e95,_0x48bd2f){const _0xc9e584=_0x36155a;super(),this[_0xc9e584(0x208)]=_0x3dd9c7,this[_0xc9e584(0x1e3)]=_0x46b594,this[_0xc9e584(0x1c3)]=_0x5e6e95,this[_0xc9e584(0x1fd)]=_0x48bd2f,this[_0xc9e584(0x217)](),this['_initUserSync']();}[_0x36155a(0x1ae)](){const _0x1fcc9b=_0x36155a;this['disposeWithMe'](this['_threadCommentModel'][_0x1fcc9b(0x19b)][_0x1fcc9b(0x19c)](w[_0x1fcc9b(0x1ff)](0x10))[_0x1fcc9b(0x1a0)](_0x405129=>{const _0x12bb9f=_0x1fcc9b,_0x33464a=new Set();_0x405129[_0x12bb9f(0x1db)](_0x5d2745=>{const _0x561fe4=_0x12bb9f;switch(_0x5d2745[_0x561fe4(0x1f7)]){case _0x561fe4(0x1d1):{const _0x4cc317=_0x5d2745['payload'][_0x561fe4(0x1e6)];_0x33464a[_0x561fe4(0x1d1)](_0x4cc317);break;}}}),R(this['_injector'],_0x33464a);}));}['_init'](){const _0x123b15=_0x36155a;this[_0x123b15(0x1e8)](this[_0x123b15(0x208)]['commentUpdate$']['subscribe'](async _0x3a64e7=>{const _0x4c5b9d=_0x123b15;var _0x6b3c04,_0x116769,_0x99df78,_0x3c8e22;const _0x51ab3c=(_0x6b3c04=this[_0x4c5b9d(0x1e3)]['getUnit'](_0x3a64e7['unitId'])['find'](_0x5b02a7=>_0x5b02a7[_0x4c5b9d(0x1c9)]===_0x3a64e7['threadId']))==null?void 0x0:_0x6b3c04[_0x4c5b9d(0x1d8)];if(!_0x51ab3c)return;const {unitId:_0x86b56c,subUnitId:_0x22696b}=_0x51ab3c;switch(_0x3a64e7[_0x4c5b9d(0x206)]&&this[_0x4c5b9d(0x1c3)][_0x4c5b9d(0x1f2)](_0x3a64e7[_0x4c5b9d(0x206)]),_0x3a64e7['type']){case v[_0x4c5b9d(0x1ca)]:break;case v[_0x4c5b9d(0x1e2)]:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1ce)](_0x86b56c,_0x22696b,{'unitId':_0x86b56c,'subUnitId':_0x22696b,'ref':'','id':_0x3a64e7['replyId'],'dT':f(+_0x3a64e7['createTimestamp']),'threadId':_0x3a64e7[_0x4c5b9d(0x1c9)],'personId':(_0x99df78=(_0x116769=_0x3a64e7[_0x4c5b9d(0x206)])==null?void 0x0:_0x116769['userID'])!=null?_0x99df78:_0x3a64e7[_0x4c5b9d(0x1d0)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)]),'parentId':_0x51ab3c['id']});break;}case v[_0x4c5b9d(0x196)]:{const _0x75d090=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1d2)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);_0x75d090&&_0x75d090[_0x4c5b9d(0x1ac)]&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x18d)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);break;}case v['Edit']:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1f1)](_0x86b56c,_0x22696b,{'commentId':_0x3a64e7[_0x4c5b9d(0x198)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)])});break;}case v['Solve']:{const _0x189ade=(_0x3c8e22=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1b3)](_0x3a64e7[_0x4c5b9d(0x201)])[_0x4c5b9d(0x1ea)](_0x1ab160=>_0x1ab160[_0x4c5b9d(0x1c9)]===_0x3a64e7[_0x4c5b9d(0x1c9)]))==null?void 0x0:_0x3c8e22[_0x4c5b9d(0x1d8)];_0x189ade&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1cd)](_0x86b56c,_0x22696b,_0x189ade['id'],_0x3a64e7[_0x4c5b9d(0x1c1)]===I[_0x4c5b9d(0x1cc)]);break;}}}));}};p=E([S(0x0,c[_0x36155a(0x197)](b['CommentService'])),S(0x1,c[_0x36155a(0x197)](M[_0x36155a(0x1b7)])),S(0x2,c[_0x36155a(0x197)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x36155a(0x218)]))],p);const q=_0x36155a(0x1e5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x397994,_0xc93a58,_0x140f70,_0x39a49e)=>{for(var _0x46b8c1=_0x39a49e>0x1?void 0x0:_0x39a49e?A(_0xc93a58,_0x140f70):_0xc93a58,_0x486b26=_0x397994['length']-0x1,_0x26b1a0;_0x486b26>=0x0;_0x486b26--)(_0x26b1a0=_0x397994[_0x486b26])&&(_0x46b8c1=_0x26b1a0(_0x46b8c1)||_0x46b8c1);return _0x46b8c1;},_=(_0x49dde2,_0xb2f56b)=>(_0x3f0d1d,_0x3fbbd0)=>_0xb2f56b(_0x3f0d1d,_0x3fbbd0,_0x49dde2);function Y(_0x13b2e1,_0x2e9c72){const _0x2afc43=_0x36155a,_0xfc6e35=_0x13b2e1[_0x2afc43(0x1d4)][0x0];return{..._0x2e9c72,'id':_0xfc6e35[_0x2afc43(0x198)],'resolved':_0x13b2e1[_0x2afc43(0x1c1)]===0x1,'dT':f(_0xfc6e35[_0x2afc43(0x1be)]),'personId':_0xfc6e35['userId'],'threadId':_0xfc6e35[_0x2afc43(0x1c9)]};}function G(_0x2202c9,_0x18e323,_0x2ad138){const _0x4a1c0f=_0x36155a;var _0x5cee34,_0x36d095;if(((_0x36d095=(_0x5cee34=_0x2202c9==null?void 0x0:_0x2202c9[_0x4a1c0f(0x1d4)])==null?void 0x0:_0x5cee34[_0x4a1c0f(0x216)])!=null?_0x36d095:0x0)>0x0){const _0x45f42f=(_0x97dfde,_0x516cfc)=>({'id':_0x97dfde[_0x4a1c0f(0x198)],'threadId':_0x97dfde['threadId'],'dT':f(_0x97dfde[_0x4a1c0f(0x1be)]),'personId':_0x97dfde['userId'],'resolved':_0x2202c9[_0x4a1c0f(0x1c1)]===I[_0x4a1c0f(0x1cc)],'unitId':_0x18e323,'subUnitId':_0x2ad138,'text':JSON['parse'](_0x97dfde['content']),'parentId':_0x516cfc}),_0x38c074=_0x45f42f(_0x2202c9[_0x4a1c0f(0x1d4)][0x0]);return{..._0x38c074,'children':_0x2202c9[_0x4a1c0f(0x1d4)]['slice'](0x1)[_0x4a1c0f(0x203)](_0x1b9ed1=>_0x45f42f(_0x1b9ed1,_0x38c074['id']))};}return null;}let g=class{constructor(_0x3b1a11,_0xe94ebe,_0x261bb2,_0x402e99){const _0x3e6e7d=_0x36155a;this[_0x3e6e7d(0x1dd)]=_0x3b1a11,this['_userService']=_0xe94ebe,this[_0x3e6e7d(0x1ec)]=_0x261bb2,this[_0x3e6e7d(0x1fd)]=_0x402e99;}async[_0x36155a(0x1ce)](_0x1267d3){const _0xc24f0b=_0x36155a;var _0x3818d2,_0x564b78;const {parentId:_0x430103,unitId:_0xb10179,text:_0xb27a63,threadId:_0x21e17b}=_0x1267d3,_0x2b6590=(_0x564b78=(_0x3818d2=_0xb27a63[_0xc24f0b(0x1bb)])==null?void 0x0:_0x3818d2[_0xc24f0b(0x1bc)](_0x544b5a=>_0x544b5a[_0xc24f0b(0x1a3)]===c[_0xc24f0b(0x20a)]['COMMENT'])[_0xc24f0b(0x203)](_0x3717c2=>_0x3717c2['rangeId']))!=null?_0x564b78:[],_0x50bfae=JSON[_0xc24f0b(0x214)](_0xb27a63),_0x1723a6=(await this[_0xc24f0b(0x1ec)][_0xc24f0b(0x205)](_0xb10179))[_0xc24f0b(0x1d9)]();if(_0x430103){const _0x19a4e3={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590,'threadId':_0x21e17b},_0x5a75d1=(await this[_0xc24f0b(0x1dd)][_0xc24f0b(0x202)](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x190),{'body':_0x19a4e3}))['body'][_0xc24f0b(0x1ee)];return{..._0x1267d3,'id':_0x5a75d1[_0xc24f0b(0x198)],'dT':c[_0xc24f0b(0x1c4)](+_0x5a75d1[_0xc24f0b(0x1be)])[_0xc24f0b(0x199)](_0xc24f0b(0x1e0)),'personId':_0x5a75d1['userId']};}else{const _0x28fa3b={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590},_0x34712a=await this[_0xc24f0b(0x1dd)]['post'](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x1a7),{'body':_0x28fa3b});return Y(_0x34712a[_0xc24f0b(0x1f4)][_0xc24f0b(0x1ed)],_0x1267d3);}}async[_0x36155a(0x1f1)](_0xf5677a){const _0x25ae6b=_0x36155a;var _0x10cb9a,_0x3b42ec;const {text:_0x80b723,unitId:_0x37c048}=_0xf5677a,_0xf7f777=(_0x3b42ec=(_0x10cb9a=_0x80b723['customRanges'])==null?void 0x0:_0x10cb9a[_0x25ae6b(0x1bc)](_0x5802f9=>_0x5802f9[_0x25ae6b(0x1a3)]===c[_0x25ae6b(0x20a)][_0x25ae6b(0x1e9)])['map'](_0x156094=>_0x156094[_0x25ae6b(0x1cf)]))!=null?_0x3b42ec:[],_0x4ef2cf=JSON[_0x25ae6b(0x214)](_0x80b723),_0x438611=_0xf5677a[_0x25ae6b(0x1c9)],_0x8c5d84=_0xf5677a['id'],_0x3fe365={'memberId':(await this['_sessionService']['requireSession'](_0x37c048))[_0x25ae6b(0x1d9)](),'unitId':_0x37c048,'threadId':_0x438611,'mention':_0xf7f777,'content':_0x4ef2cf,'replyId':_0x8c5d84},_0x3f13ec=await this[_0x25ae6b(0x1dd)][_0x25ae6b(0x202)](_0x25ae6b(0x1f5)+_0x37c048+_0x25ae6b(0x1b1),{'body':_0x3fe365});return!_0x3f13ec[_0x25ae6b(0x1f4)]['error']||_0x3f13ec[_0x25ae6b(0x1f4)][_0x25ae6b(0x1fe)][_0x25ae6b(0x19e)]===0x1;}async[_0x36155a(0x1cd)](_0x43522d){const _0x37890c=_0x36155a,{unitId:_0x730f06}=_0x43522d,_0x505f0d=_0x43522d[_0x37890c(0x1c9)],_0x3d734c={'memberId':this[_0x37890c(0x1c3)][_0x37890c(0x1df)]()[_0x37890c(0x18f)],'unitId':_0x730f06,'threadId':_0x505f0d,'solved':_0x43522d[_0x37890c(0x1c7)]?I['Solved']:I[_0x37890c(0x1ef)]},_0x51c68e=await this['_httpService'][_0x37890c(0x202)](_0x37890c(0x1f5)+_0x730f06+_0x37890c(0x1de),{'body':_0x3d734c});return!_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)]||_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)][_0x37890c(0x19e)]===0x1;}async[_0x36155a(0x18d)](_0x5d96dc,_0x25f4b1,_0x32cd8a,_0x57ed6a){const _0xb9b723=_0x36155a,_0x3b2133={'memberId':(await this['_sessionService'][_0xb9b723(0x205)](_0x5d96dc))[_0xb9b723(0x1d9)](),'threadId':_0x32cd8a,'replyId':_0x57ed6a,'unitId':_0x5d96dc},_0x57993d=await this[_0xb9b723(0x1dd)]['post'](_0xb9b723(0x1f5)+_0x5d96dc+_0xb9b723(0x1b5),{'body':_0x3b2133});return!_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]||_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]['code']===0x1;}async[_0x36155a(0x1fc)](_0x19cb0a,_0x3c9975,_0x5c495e){const _0x4badca=_0x36155a,_0x2da396={'unitId':_0x19cb0a,'threadId':_0x5c495e},_0x10fcbe=await this[_0x4badca(0x1dd)]['post']('/universer-api/comment/unit/'+_0x19cb0a+_0x4badca(0x1c0),{'body':_0x2da396}),_0x41c389=_0x5c495e['map'](_0x5cbf2d=>G(_0x10fcbe['body']['comments'][_0x5cbf2d],_0x19cb0a,_0x3c9975))[_0x4badca(0x1bc)](Boolean);return Object[_0x4badca(0x1b6)](_0x10fcbe[_0x4badca(0x1f4)][_0x4badca(0x1ad)])[_0x4badca(0x1db)](_0x1d92e6=>{const _0x22a6cc=_0x4badca;this[_0x22a6cc(0x1c3)][_0x22a6cc(0x1f2)](_0x1d92e6);}),_0x41c389;}[_0x36155a(0x1a8)](_0x201acd){const _0x40a234=_0x36155a;return{'id':_0x201acd['id'],'threadId':_0x201acd[_0x40a234(0x1c9)],'ref':_0x201acd[_0x40a234(0x1e7)]};}};function _0x5362(_0x436b95,_0x3f2868){const _0x374eb0=_0x374e();return _0x5362=function(_0x5362cc,_0x3d30c1){_0x5362cc=_0x5362cc-0x18d;let _0x4108fb=_0x374eb0[_0x5362cc];return _0x4108fb;},_0x5362(_0x436b95,_0x3f2868);}g=x([_(0x0,c[_0x36155a(0x197)](P[_0x36155a(0x19d)])),_(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x193)])),_(0x2,c['Inject'](b[_0x36155a(0x1aa)])),_(0x3,c[_0x36155a(0x197)](c[_0x36155a(0x218)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xeb10eb,_0x12a2e9,_0x23d3a8,_0x8936b2)=>{const _0x3bf85f=_0x36155a;for(var _0xc21ae6=_0x8936b2>0x1?void 0x0:_0x8936b2?H(_0x12a2e9,_0x23d3a8):_0x12a2e9,_0x240712=_0xeb10eb[_0x3bf85f(0x216)]-0x1,_0x1ad6f8;_0x240712>=0x0;_0x240712--)(_0x1ad6f8=_0xeb10eb[_0x240712])&&(_0xc21ae6=_0x1ad6f8(_0xc21ae6)||_0xc21ae6);return _0xc21ae6;},y=(_0x4c3b62,_0x2d77cc)=>(_0x21316b,_0x3f0832)=>_0x2d77cc(_0x21316b,_0x3f0832,_0x4c3b62);let C=class extends c[_0x36155a(0x1bd)]{constructor(_0x1dde57,_0x365be2){const _0x16ef70=_0x36155a;super(),this[_0x16ef70(0x1c2)]=_0x1dde57,this[_0x16ef70(0x207)]=_0x365be2,this[_0x16ef70(0x1d5)]();}[_0x36155a(0x1d5)](){const _0x327b35=_0x36155a;this[_0x327b35(0x1c2)][_0x327b35(0x192)]=this[_0x327b35(0x207)],this[_0x327b35(0x1c2)][_0x327b35(0x1da)]=!0x1;}};function _0x374e(){const _0x4efb77=['forEach','pluginName','_httpService','/solved','getCurrentUser','YYYY/MM/DD\x20HH:mm','delete','Reply','_threadCommentModel','Plugin','thread-comment-data-source.config','personId','ref','disposeWithMe','COMMENT','find','symbol','_sessionService','comment','reply','OpenOrReOpen','UniverCollaborationClientPlugin','updateComment','addUser','49SNXnvx','body','/universer-api/comment/unit/','UNIVER_UNKNOWN','type','content','101397FGImzt','Module','2swsEtN','listComments','_injector','error','bufferTime','setConfig','unitId','post','map','defineProperty','requireSession','user','_threadCommentDataSource','_commentService','UniverThreadCommentUIPlugin','CustomRangeType','29740itYsBL','UniverInstanceType','_configService','8hIHRqJ','DependentOn','@univerjs-pro/collaboration-client','toStringTag','getUser','merge','stringify','onReady','length','_init','Injector','deleteComment','UNRECOGNIZED','userID','/reply','352392sDYQBa','dataSource','UserManagerService','Edit','/universer-api/user/list','Delete','Inject','replyId','format','Solve','commentUpdate$','pipe','HTTPService','code','size','subscribe','11838CiItpT','262970lTvodi','rangeType','UniverThreadCommentDataSourcePlugin','36DomRgc','3524339CNbVJC','/add','saveCommentToSnapshot','Unknown','CollaborationSessionService','@univerjs/network','parentId','users','_initUserSync','UniverLicensePlugin','193984hgzMXh','/edit','IThreadCommentDataSourceService','getUnit','12WQyekx','/delete','values','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','getOwnPropertyDescriptor','customRanges','filter','Disposable','createTimestamp','@univerjs/thread-comment','/list','solved','_threadCommentDataSourceService','_userService','dayjs','33KOqZCS','rxjs','resolved','parse','threadId','Add','@univerjs-pro/license','Solved','resolveComment','addComment','rangeId','userId','add','getComment','get','replies','_initDataSource','@univerjs/core','_config','root','getMemberID','syncUpdateMutationToColla'];_0x374e=function(){return _0x4efb77;};return _0x374e();}C=J([y(0x0,M[_0x36155a(0x1b2)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x36155a(0x1ba)],Z=(_0x52ba7e,_0x4d94d3,_0x30f673)=>_0x4d94d3 in _0x52ba7e?F(_0x52ba7e,_0x4d94d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30f673}):_0x52ba7e[_0x4d94d3]=_0x30f673,W=(_0x4fab5a,_0x1abf17,_0x59833f,_0x49e22f)=>{const _0x55ca05=_0x36155a;for(var _0x5b7a76=_0x49e22f>0x1?void 0x0:_0x49e22f?L(_0x1abf17,_0x59833f):_0x1abf17,_0x5a598c=_0x4fab5a[_0x55ca05(0x216)]-0x1,_0xecbeff;_0x5a598c>=0x0;_0x5a598c--)(_0xecbeff=_0x4fab5a[_0x5a598c])&&(_0x5b7a76=_0xecbeff(_0x5b7a76)||_0x5b7a76);return _0x5b7a76;},O=(_0x28f1c7,_0x4a95fb)=>(_0x83ca4f,_0x3b537f)=>_0x4a95fb(_0x83ca4f,_0x3b537f,_0x28f1c7),N=(_0x2b4baa,_0x322063,_0x36a352)=>Z(_0x2b4baa,typeof _0x322063!=_0x36155a(0x1eb)?_0x322063+'':_0x322063,_0x36a352);exports[_0x36155a(0x1a4)]=class extends c[_0x36155a(0x1e4)]{constructor(_0xe0e9eb=D,_0x2a2dc1,_0x2d28f9){const _0x324650=_0x36155a;super(),this['_config']=_0xe0e9eb,this[_0x324650(0x1fd)]=_0x2a2dc1,this[_0x324650(0x20d)]=_0x2d28f9;const {..._0x39593f}=c[_0x324650(0x213)]({},D,this[_0x324650(0x1d7)]);this['_configService'][_0x324650(0x200)](q,_0x39593f);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xb3d572=>{const _0x42799e=_0x5362;this[_0x42799e(0x1fd)][_0x42799e(0x1d1)](_0xb3d572);});}[_0x36155a(0x215)](){const _0xedb4de=_0x36155a;this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](C),this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](p);}},N(exports[_0x36155a(0x1a4)],_0x36155a(0x1dc),U),N(exports[_0x36155a(0x1a4)],_0x36155a(0x1f7),c[_0x36155a(0x20c)][_0x36155a(0x1f6)]),exports[_0x36155a(0x1a4)]=W([c[_0x36155a(0x20f)](j[_0x36155a(0x209)],b[_0x36155a(0x1f0)],T[_0x36155a(0x1af)]),O(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x218)])),O(0x2,c[_0x36155a(0x1b9)])],exports[_0x36155a(0x1a4)]);
|
|
1
|
+
'use strict';const _0x228a01=_0x531f;function _0x2984(){const _0x2defd1=['/universer-api/comment/unit/','bufferTime','get','CustomRangeType','comments','listComments','Unknown','Delete','_configService','customRanges','Plugin','find','Inject','31203PHWPEf','code','user','CommentService','/universer-api/user/list','rangeType','Solved','onStarting','values','resolved','Reply','3mJgUHE','pipe','UniverThreadCommentDataSourcePlugin','Solve','comment','Disposable','UniverLicensePlugin','DependentOn','OpenOrReOpen','solved','YYYY/MM/DD\x20HH:mm','/delete','getOwnPropertyDescriptor','userID','length','1263456nzGTvv','parentId','UserManagerService','content','_initUserSync','users','19340bmcWfO','getUnit','UniverInstanceType','1085221aSHcCc','UniverCollaborationClientPlugin','error','commentUpdate$','dayjs','addComment','@univerjs-pro/collaboration-client','/reply','saveCommentToSnapshot','disposeWithMe','parse','map','type','post','replyId','body','resolveComment','_httpService','merge','format','getCurrentUser','rxjs','Edit','reply','UNRECOGNIZED','addUser','_sessionService','_userService','replies','unitId','createTimestamp','getComment','5377165pVTJkd','delete','_initDataSource','defineProperty','filter','subscribe','Add','toStringTag','/add','getUser','494724pNFHjZ','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','stringify','_commentService','rangeId','_init','/solved','symbol','threadId','_threadCommentModel','IThreadCommentDataSourceService','ref','CollaborationSessionService','HTTPService','_config','pluginName','/edit','add','userId','ThreadCommentModel','3451UwMysw','56LuZzrb','forEach','updateComment','requireSession','getMemberID','_threadCommentDataSource','Injector','IConfigService','root','5238RLTsln','_injector','COMMENT','UNIVER_UNKNOWN','@univerjs/network','thread-comment-data-source.config','17611lcsjqb'];_0x2984=function(){return _0x2defd1;};return _0x2984();}(function(_0x585ee7,_0x1ad52e){const _0x3c5aa8=_0x531f,_0x42e5f8=_0x585ee7();while(!![]){try{const _0x213950=-parseInt(_0x3c5aa8(0x1d4))/0x1+-parseInt(_0x3c5aa8(0x1cb))/0x2+parseInt(_0x3c5aa8(0x1bc))/0x3*(-parseInt(_0x3c5aa8(0x1fe))/0x4)+-parseInt(_0x3c5aa8(0x1f4))/0x5+-parseInt(_0x3c5aa8(0x21d))/0x6*(-parseInt(_0x3c5aa8(0x213))/0x7)+-parseInt(_0x3c5aa8(0x214))/0x8*(-parseInt(_0x3c5aa8(0x1b1))/0x9)+-parseInt(_0x3c5aa8(0x1d1))/0xa*(-parseInt(_0x3c5aa8(0x223))/0xb);if(_0x213950===_0x1ad52e)break;else _0x42e5f8['push'](_0x42e5f8['shift']());}catch(_0x34b1ec){_0x42e5f8['push'](_0x42e5f8['shift']());}}}(_0x2984,0x9b031));Object['defineProperty'](exports,Symbol[_0x228a01(0x1fb)],{'value':'Module'});const b=require(_0x228a01(0x1da)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x228a01(0x1e9)),P=require(_0x228a01(0x221)),U=_0x228a01(0x200);var I=(_0xd063f6=>(_0xd063f6[_0xd063f6[_0x228a01(0x1c4)]=0x0]='OpenOrReOpen',_0xd063f6[_0xd063f6[_0x228a01(0x1b7)]=0x1]=_0x228a01(0x1b7),_0xd063f6[_0xd063f6[_0x228a01(0x1ec)]=-0x1]='UNRECOGNIZED',_0xd063f6))(I||{}),v=(_0x910ce2=>(_0x910ce2[_0x910ce2[_0x228a01(0x1aa)]=0x0]=_0x228a01(0x1aa),_0x910ce2[_0x910ce2[_0x228a01(0x1fa)]=0x1]='Add',_0x910ce2[_0x910ce2[_0x228a01(0x1bb)]=0x2]=_0x228a01(0x1bb),_0x910ce2[_0x910ce2[_0x228a01(0x1ea)]=0x3]=_0x228a01(0x1ea),_0x910ce2[_0x910ce2['Delete']=0x4]=_0x228a01(0x1ab),_0x910ce2[_0x910ce2[_0x228a01(0x1bf)]=0x5]=_0x228a01(0x1bf),_0x910ce2[_0x910ce2[_0x228a01(0x1ec)]=-0x1]=_0x228a01(0x1ec),_0x910ce2))(v||{});const f=_0x3aa18e=>c[_0x228a01(0x1d8)](new Date(+_0x3aa18e))[_0x228a01(0x1e7)](_0x228a01(0x1c6)),R=async(_0x424af1,_0x1436f0)=>{const _0x1b9edc=_0x228a01,_0x4d92d2=_0x424af1[_0x1b9edc(0x226)](c['UserManagerService']),_0x1467bc=_0x424af1[_0x1b9edc(0x226)](P[_0x1b9edc(0x20c)]);_0x1436f0[_0x1b9edc(0x215)](_0xf632e9=>{const _0x4eba19=_0x1b9edc;_0x4d92d2[_0x4eba19(0x1fd)](_0xf632e9)&&_0x1436f0[_0x4eba19(0x1f5)](_0xf632e9);}),_0x1436f0['size']&&(await _0x1467bc[_0x1b9edc(0x226)](_0x1b9edc(0x1b5),{'params':{'userIDs':[..._0x1436f0]}}))['body'][_0x1b9edc(0x1d0)]['forEach'](_0x3e8379=>{const _0xc79bf1=_0x1b9edc;_0x3e8379&&_0x4d92d2[_0xc79bf1(0x1ed)](_0x3e8379);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2207b3,_0x188074,_0x16f885,_0x114419)=>{const _0x3e70b7=_0x228a01;for(var _0x1eb3d8=_0x114419>0x1?void 0x0:_0x114419?$(_0x188074,_0x16f885):_0x188074,_0x7a270=_0x2207b3[_0x3e70b7(0x1ca)]-0x1,_0x825ec9;_0x7a270>=0x0;_0x7a270--)(_0x825ec9=_0x2207b3[_0x7a270])&&(_0x1eb3d8=_0x825ec9(_0x1eb3d8)||_0x1eb3d8);return _0x1eb3d8;},S=(_0x182cc5,_0x46caad)=>(_0x208e74,_0x5d26fb)=>_0x46caad(_0x208e74,_0x5d26fb,_0x182cc5);let p=class extends c[_0x228a01(0x1c1)]{constructor(_0x3f9c86,_0x291401,_0x2fffb6,_0x596aa2){const _0x492a71=_0x228a01;super(),this[_0x492a71(0x202)]=_0x3f9c86,this['_threadCommentModel']=_0x291401,this[_0x492a71(0x1ef)]=_0x2fffb6,this[_0x492a71(0x21e)]=_0x596aa2,this[_0x492a71(0x204)](),this[_0x492a71(0x1cf)]();}[_0x228a01(0x1cf)](){const _0x7ffe51=_0x228a01;this[_0x7ffe51(0x1dd)](this[_0x7ffe51(0x208)]['commentUpdate$'][_0x7ffe51(0x1bd)](w[_0x7ffe51(0x225)](0x10))['subscribe'](_0x1e8641=>{const _0x5c95af=_0x7ffe51,_0x1315c3=new Set();_0x1e8641[_0x5c95af(0x215)](_0x28941c=>{const _0x4a822d=_0x5c95af;switch(_0x28941c[_0x4a822d(0x1e0)]){case _0x4a822d(0x210):{const _0x312abd=_0x28941c['payload']['personId'];_0x1315c3[_0x4a822d(0x210)](_0x312abd);break;}}}),R(this['_injector'],_0x1315c3);}));}[_0x228a01(0x204)](){const _0xa689e4=_0x228a01;this[_0xa689e4(0x1dd)](this[_0xa689e4(0x202)][_0xa689e4(0x1d7)][_0xa689e4(0x1f9)](async _0x11745c=>{const _0x53429c=_0xa689e4;var _0x2af55b,_0x5627c0,_0xc866ab,_0x704323;const _0x42e060=(_0x2af55b=this[_0x53429c(0x208)][_0x53429c(0x1d2)](_0x11745c[_0x53429c(0x1f1)])[_0x53429c(0x1af)](_0x3f3552=>_0x3f3552[_0x53429c(0x207)]===_0x11745c[_0x53429c(0x207)]))==null?void 0x0:_0x2af55b[_0x53429c(0x21c)];if(!_0x42e060)return;const {unitId:_0xc9f212,subUnitId:_0xbe55f0}=_0x42e060;switch(_0x11745c[_0x53429c(0x1b3)]&&this[_0x53429c(0x1ef)][_0x53429c(0x1ed)](_0x11745c['user']),_0x11745c[_0x53429c(0x1e0)]){case v[_0x53429c(0x1fa)]:break;case v[_0x53429c(0x1bb)]:{this['_threadCommentModel']['addComment'](_0xc9f212,_0xbe55f0,{'unitId':_0xc9f212,'subUnitId':_0xbe55f0,'ref':'','id':_0x11745c[_0x53429c(0x1e2)],'dT':f(+_0x11745c[_0x53429c(0x1f2)]),'threadId':_0x11745c[_0x53429c(0x207)],'personId':(_0xc866ab=(_0x5627c0=_0x11745c[_0x53429c(0x1b3)])==null?void 0x0:_0x5627c0[_0x53429c(0x1c9)])!=null?_0xc866ab:_0x11745c[_0x53429c(0x211)],'text':JSON['parse'](_0x11745c[_0x53429c(0x1ce)]),'parentId':_0x42e060['id']});break;}case v[_0x53429c(0x1ab)]:{const _0x1f53cd=this[_0x53429c(0x208)][_0x53429c(0x1f3)](_0xc9f212,_0xbe55f0,_0x11745c['replyId']);_0x1f53cd&&_0x1f53cd[_0x53429c(0x1cc)]&&this[_0x53429c(0x208)]['deleteComment'](_0xc9f212,_0xbe55f0,_0x11745c[_0x53429c(0x1e2)]);break;}case v[_0x53429c(0x1ea)]:{this['_threadCommentModel'][_0x53429c(0x216)](_0xc9f212,_0xbe55f0,{'commentId':_0x11745c[_0x53429c(0x1e2)],'text':JSON[_0x53429c(0x1de)](_0x11745c[_0x53429c(0x1ce)])});break;}case v[_0x53429c(0x1bf)]:{const _0x3bd85c=(_0x704323=this['_threadCommentModel'][_0x53429c(0x1d2)](_0x11745c['unitId'])[_0x53429c(0x1af)](_0x1c3ddd=>_0x1c3ddd[_0x53429c(0x207)]===_0x11745c[_0x53429c(0x207)]))==null?void 0x0:_0x704323[_0x53429c(0x21c)];_0x3bd85c&&this[_0x53429c(0x208)]['resolveComment'](_0xc9f212,_0xbe55f0,_0x3bd85c['id'],_0x11745c[_0x53429c(0x1c5)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x228a01(0x1b0)](b[_0x228a01(0x1b4)])),S(0x1,c[_0x228a01(0x1b0)](M[_0x228a01(0x212)])),S(0x2,c[_0x228a01(0x1b0)](c['UserManagerService'])),S(0x3,c[_0x228a01(0x1b0)](c[_0x228a01(0x21a)]))],p);const q=_0x228a01(0x222),D={};var A=Object[_0x228a01(0x1c8)],x=(_0x29f432,_0x1fba8c,_0x5aae42,_0xdc94a3)=>{const _0x129478=_0x228a01;for(var _0x1cdfe2=_0xdc94a3>0x1?void 0x0:_0xdc94a3?A(_0x1fba8c,_0x5aae42):_0x1fba8c,_0x3b6018=_0x29f432[_0x129478(0x1ca)]-0x1,_0x1f6406;_0x3b6018>=0x0;_0x3b6018--)(_0x1f6406=_0x29f432[_0x3b6018])&&(_0x1cdfe2=_0x1f6406(_0x1cdfe2)||_0x1cdfe2);return _0x1cdfe2;},_=(_0x35237c,_0x1884ab)=>(_0x1056ad,_0x4ea4c8)=>_0x1884ab(_0x1056ad,_0x4ea4c8,_0x35237c);function _0x531f(_0x1f766f,_0x318eaf){const _0x298418=_0x2984();return _0x531f=function(_0x531fea,_0x3a26cc){_0x531fea=_0x531fea-0x1a9;let _0x1c1500=_0x298418[_0x531fea];return _0x1c1500;},_0x531f(_0x1f766f,_0x318eaf);}function Y(_0x2d45e3,_0x379a63){const _0x3f0ac1=_0x228a01,_0x4f7e99=_0x2d45e3[_0x3f0ac1(0x1f0)][0x0];return{..._0x379a63,'id':_0x4f7e99[_0x3f0ac1(0x1e2)],'resolved':_0x2d45e3[_0x3f0ac1(0x1c5)]===0x1,'dT':f(_0x4f7e99[_0x3f0ac1(0x1f2)]),'personId':_0x4f7e99[_0x3f0ac1(0x211)],'threadId':_0x4f7e99[_0x3f0ac1(0x207)]};}function G(_0xf352f9,_0x56a682,_0x5a84a4){const _0xe10dfc=_0x228a01;var _0x5b1058,_0xa4da8;if(((_0xa4da8=(_0x5b1058=_0xf352f9==null?void 0x0:_0xf352f9['replies'])==null?void 0x0:_0x5b1058['length'])!=null?_0xa4da8:0x0)>0x0){const _0x1dbc4e=(_0x533170,_0x398eea)=>({'id':_0x533170[_0xe10dfc(0x1e2)],'threadId':_0x533170[_0xe10dfc(0x207)],'dT':f(_0x533170[_0xe10dfc(0x1f2)]),'personId':_0x533170[_0xe10dfc(0x211)],'resolved':_0xf352f9[_0xe10dfc(0x1c5)]===I[_0xe10dfc(0x1b7)],'unitId':_0x56a682,'subUnitId':_0x5a84a4,'text':JSON['parse'](_0x533170['content']),'parentId':_0x398eea}),_0x24373a=_0x1dbc4e(_0xf352f9['replies'][0x0]);return{..._0x24373a,'children':_0xf352f9[_0xe10dfc(0x1f0)]['slice'](0x1)[_0xe10dfc(0x1df)](_0x3e48af=>_0x1dbc4e(_0x3e48af,_0x24373a['id']))};}return null;}let g=class{constructor(_0xc06bab,_0x1d3f3a,_0x19e326,_0x4ac9a2){const _0x365ed8=_0x228a01;this[_0x365ed8(0x1e5)]=_0xc06bab,this[_0x365ed8(0x1ef)]=_0x1d3f3a,this[_0x365ed8(0x1ee)]=_0x19e326,this[_0x365ed8(0x21e)]=_0x4ac9a2;}async[_0x228a01(0x1d9)](_0x38852c){const _0x1a06d0=_0x228a01;var _0x50183f,_0x14ad24;const {parentId:_0x1dfbba,unitId:_0xc12910,text:_0x1598cf,threadId:_0x228961}=_0x38852c,_0x5a3267=(_0x14ad24=(_0x50183f=_0x1598cf[_0x1a06d0(0x1ad)])==null?void 0x0:_0x50183f[_0x1a06d0(0x1f8)](_0x2f73fe=>_0x2f73fe[_0x1a06d0(0x1b6)]===c[_0x1a06d0(0x227)][_0x1a06d0(0x21f)])['map'](_0x111b8d=>_0x111b8d[_0x1a06d0(0x203)]))!=null?_0x14ad24:[],_0x2620d9=JSON[_0x1a06d0(0x201)](_0x1598cf),_0x479bbc=(await this[_0x1a06d0(0x1ee)][_0x1a06d0(0x217)](_0xc12910))[_0x1a06d0(0x218)]();if(_0x1dfbba){const _0x42de91={'memberId':_0x479bbc,'unitId':_0xc12910,'content':_0x2620d9,'mention':_0x5a3267,'threadId':_0x228961},_0x19146=(await this[_0x1a06d0(0x1e5)]['post'](_0x1a06d0(0x224)+_0xc12910+_0x1a06d0(0x1db),{'body':_0x42de91}))[_0x1a06d0(0x1e3)][_0x1a06d0(0x1eb)];return{..._0x38852c,'id':_0x19146[_0x1a06d0(0x1e2)],'dT':c[_0x1a06d0(0x1d8)](+_0x19146[_0x1a06d0(0x1f2)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x19146[_0x1a06d0(0x211)]};}else{const _0x2efdde={'memberId':_0x479bbc,'unitId':_0xc12910,'content':_0x2620d9,'mention':_0x5a3267},_0x47a439=await this[_0x1a06d0(0x1e5)]['post']('/universer-api/comment/unit/'+_0xc12910+_0x1a06d0(0x1fc),{'body':_0x2efdde});return Y(_0x47a439[_0x1a06d0(0x1e3)][_0x1a06d0(0x1c0)],_0x38852c);}}async[_0x228a01(0x216)](_0x41d385){const _0x4181d4=_0x228a01;var _0x47905f,_0x338be6;const {text:_0x273819,unitId:_0x580c1e}=_0x41d385,_0x1cce3b=(_0x338be6=(_0x47905f=_0x273819[_0x4181d4(0x1ad)])==null?void 0x0:_0x47905f[_0x4181d4(0x1f8)](_0x35226e=>_0x35226e[_0x4181d4(0x1b6)]===c[_0x4181d4(0x227)][_0x4181d4(0x21f)])[_0x4181d4(0x1df)](_0x120a27=>_0x120a27['rangeId']))!=null?_0x338be6:[],_0x1b23ea=JSON[_0x4181d4(0x201)](_0x273819),_0x557db9=_0x41d385['threadId'],_0x3dbef7=_0x41d385['id'],_0x43602d={'memberId':(await this[_0x4181d4(0x1ee)][_0x4181d4(0x217)](_0x580c1e))[_0x4181d4(0x218)](),'unitId':_0x580c1e,'threadId':_0x557db9,'mention':_0x1cce3b,'content':_0x1b23ea,'replyId':_0x3dbef7},_0x3ba072=await this[_0x4181d4(0x1e5)][_0x4181d4(0x1e1)](_0x4181d4(0x224)+_0x580c1e+_0x4181d4(0x20f),{'body':_0x43602d});return!_0x3ba072[_0x4181d4(0x1e3)][_0x4181d4(0x1d6)]||_0x3ba072[_0x4181d4(0x1e3)][_0x4181d4(0x1d6)][_0x4181d4(0x1b2)]===0x1;}async[_0x228a01(0x1e4)](_0x471ff8){const _0x1c5fb1=_0x228a01,{unitId:_0xfe7cb5}=_0x471ff8,_0x4f7413=_0x471ff8[_0x1c5fb1(0x207)],_0x2f6220={'memberId':this[_0x1c5fb1(0x1ef)][_0x1c5fb1(0x1e8)]()[_0x1c5fb1(0x1c9)],'unitId':_0xfe7cb5,'threadId':_0x4f7413,'solved':_0x471ff8[_0x1c5fb1(0x1ba)]?I[_0x1c5fb1(0x1b7)]:I[_0x1c5fb1(0x1c4)]},_0x58a3ec=await this['_httpService'][_0x1c5fb1(0x1e1)]('/universer-api/comment/unit/'+_0xfe7cb5+_0x1c5fb1(0x205),{'body':_0x2f6220});return!_0x58a3ec[_0x1c5fb1(0x1e3)][_0x1c5fb1(0x1d6)]||_0x58a3ec[_0x1c5fb1(0x1e3)][_0x1c5fb1(0x1d6)][_0x1c5fb1(0x1b2)]===0x1;}async['deleteComment'](_0x5da95d,_0xffa8,_0x410920,_0x59e584){const _0x404760=_0x228a01,_0x205aed={'memberId':(await this[_0x404760(0x1ee)][_0x404760(0x217)](_0x5da95d))[_0x404760(0x218)](),'threadId':_0x410920,'replyId':_0x59e584,'unitId':_0x5da95d},_0x1ac63d=await this[_0x404760(0x1e5)][_0x404760(0x1e1)](_0x404760(0x224)+_0x5da95d+_0x404760(0x1c7),{'body':_0x205aed});return!_0x1ac63d[_0x404760(0x1e3)][_0x404760(0x1d6)]||_0x1ac63d[_0x404760(0x1e3)][_0x404760(0x1d6)][_0x404760(0x1b2)]===0x1;}async[_0x228a01(0x1a9)](_0xce4d0,_0x77e38b,_0x1850e1){const _0x42dcb4=_0x228a01,_0x30d528={'unitId':_0xce4d0,'threadId':_0x1850e1},_0x815f2e=await this[_0x42dcb4(0x1e5)][_0x42dcb4(0x1e1)](_0x42dcb4(0x224)+_0xce4d0+'/list',{'body':_0x30d528}),_0x2ccd94=_0x1850e1[_0x42dcb4(0x1df)](_0x59655f=>G(_0x815f2e[_0x42dcb4(0x1e3)][_0x42dcb4(0x228)][_0x59655f],_0xce4d0,_0x77e38b))[_0x42dcb4(0x1f8)](Boolean);return Object[_0x42dcb4(0x1b9)](_0x815f2e[_0x42dcb4(0x1e3)][_0x42dcb4(0x1d0)])['forEach'](_0x3038a5=>{const _0x221fa8=_0x42dcb4;this[_0x221fa8(0x1ef)][_0x221fa8(0x1ed)](_0x3038a5);}),_0x2ccd94;}[_0x228a01(0x1dc)](_0x3d03c5){const _0x541c12=_0x228a01;return{'id':_0x3d03c5['id'],'threadId':_0x3d03c5[_0x541c12(0x207)],'ref':_0x3d03c5[_0x541c12(0x20a)]};}};g=x([_(0x0,c['Inject'](P[_0x228a01(0x20c)])),_(0x1,c['Inject'](c[_0x228a01(0x1cd)])),_(0x2,c[_0x228a01(0x1b0)](b[_0x228a01(0x20b)])),_(0x3,c[_0x228a01(0x1b0)](c[_0x228a01(0x21a)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x384f61,_0x540f1d,_0x9133b7,_0x3057ad)=>{const _0x47d91b=_0x228a01;for(var _0x4e70aa=_0x3057ad>0x1?void 0x0:_0x3057ad?H(_0x540f1d,_0x9133b7):_0x540f1d,_0x926fa9=_0x384f61[_0x47d91b(0x1ca)]-0x1,_0x2e0da4;_0x926fa9>=0x0;_0x926fa9--)(_0x2e0da4=_0x384f61[_0x926fa9])&&(_0x4e70aa=_0x2e0da4(_0x4e70aa)||_0x4e70aa);return _0x4e70aa;},y=(_0x5b4f7e,_0x4dd31f)=>(_0x5be36a,_0x48b177)=>_0x4dd31f(_0x5be36a,_0x48b177,_0x5b4f7e);let C=class extends c[_0x228a01(0x1c1)]{constructor(_0x133add,_0x21627e){const _0x387cc6=_0x228a01;super(),this['_threadCommentDataSourceService']=_0x133add,this[_0x387cc6(0x219)]=_0x21627e,this[_0x387cc6(0x1f6)]();}[_0x228a01(0x1f6)](){const _0xd363d1=_0x228a01;this['_threadCommentDataSourceService']['dataSource']=this[_0xd363d1(0x219)],this[_0xd363d1(0x1ff)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x228a01(0x209)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x228a01(0x1f7)],L=Object[_0x228a01(0x1c8)],Z=(_0x27edb2,_0x19c6a6,_0x39298c)=>_0x19c6a6 in _0x27edb2?F(_0x27edb2,_0x19c6a6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39298c}):_0x27edb2[_0x19c6a6]=_0x39298c,W=(_0x3cdf3a,_0x27a77c,_0x5cbc36,_0x3aafb0)=>{const _0x2656b2=_0x228a01;for(var _0xcd08c0=_0x3aafb0>0x1?void 0x0:_0x3aafb0?L(_0x27a77c,_0x5cbc36):_0x27a77c,_0x217b17=_0x3cdf3a[_0x2656b2(0x1ca)]-0x1,_0x453c01;_0x217b17>=0x0;_0x217b17--)(_0x453c01=_0x3cdf3a[_0x217b17])&&(_0xcd08c0=_0x453c01(_0xcd08c0)||_0xcd08c0);return _0xcd08c0;},O=(_0xe25f88,_0x36e12d)=>(_0xf29798,_0x4d571d)=>_0x36e12d(_0xf29798,_0x4d571d,_0xe25f88),N=(_0x20bbf9,_0x3f837c,_0x2537db)=>Z(_0x20bbf9,typeof _0x3f837c!=_0x228a01(0x206)?_0x3f837c+'':_0x3f837c,_0x2537db);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x228a01(0x1ae)]{constructor(_0x5bb0eb=D,_0x654f1,_0x44b7d5){const _0xaac6c4=_0x228a01;super(),this['_config']=_0x5bb0eb,this[_0xaac6c4(0x21e)]=_0x654f1,this['_configService']=_0x44b7d5;const {..._0xfac54e}=c[_0xaac6c4(0x1e6)]({},D,this[_0xaac6c4(0x20d)]);this[_0xaac6c4(0x1ac)]['setConfig'](q,_0xfac54e);}[_0x228a01(0x1b8)](){const _0x44a9b3=_0x228a01;[[g],[C],[p]][_0x44a9b3(0x215)](_0x3eebae=>{const _0x37deab=_0x44a9b3;this[_0x37deab(0x21e)]['add'](_0x3eebae);});}['onReady'](){const _0x3ea03f=_0x228a01;this['_injector'][_0x3ea03f(0x226)](C),this[_0x3ea03f(0x21e)][_0x3ea03f(0x226)](p);}},N(exports[_0x228a01(0x1be)],_0x228a01(0x20e),U),N(exports[_0x228a01(0x1be)],_0x228a01(0x1e0),c[_0x228a01(0x1d3)][_0x228a01(0x220)]),exports[_0x228a01(0x1be)]=W([c[_0x228a01(0x1c3)](j['UniverThreadCommentUIPlugin'],b[_0x228a01(0x1d5)],T[_0x228a01(0x1c2)]),O(0x1,c[_0x228a01(0x1b0)](c[_0x228a01(0x21a)])),O(0x2,c[_0x228a01(0x21b)])],exports[_0x228a01(0x1be)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3767(){const _0x5233a8=['solved','addUser','getCurrentUser','rangeId','post','4154064AHckNC','thread-comment-data-source.config','Unknown','disposeWithMe','setConfig','root','updateComment','filter','Edit','getUser','_threadCommentDataSource','21847VoEvdh','_sessionService','body','length','onStarting','content','reply','customRanges','/edit','createTimestamp','addComment','_injector','Solve','ref','onReady','1900593PgXnwe','UNIVER_UNKNOWN','_config','user','format','/universer-api/user/list','/add','_httpService','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','stringify','Delete','symbol','replies','Add','/list','get','slice','dataSource','add','unitId','_commentService','resolveComment','/reply','getComment','personId','2934FYSOcN','syncUpdateMutationToColla','userID','map','115100MLLqVg','_initUserSync','/universer-api/comment/unit/','Solved','OpenOrReOpen','code','commentUpdate$','type','requireSession','rangeType','pluginName','Reply','find','threadId','listComments','8630390Yumofa','getMemberID','getUnit','4675692FsTVDL','comments','parse','getOwnPropertyDescriptor','payload','3271586Xmexbm','parentId','subscribe','_threadCommentDataSourceService','_init','_userService','userId','_initDataSource','delete','deleteComment','1GVUxAp','users','saveCommentToSnapshot','size','_threadCommentModel','replyId','forEach','error'];_0x3767=function(){return _0x5233a8;};return _0x3767();}const _0x471d44=_0x4b1d;function _0x4b1d(_0x4517b0,_0x5e6e6a){const _0x37671b=_0x3767();return _0x4b1d=function(_0x4b1d76,_0x13d919){_0x4b1d76=_0x4b1d76-0x126;let _0xad7dff=_0x37671b[_0x4b1d76];return _0xad7dff;},_0x4b1d(_0x4517b0,_0x5e6e6a);}(function(_0x56376d,_0x57cdbb){const _0x2fe99a=_0x4b1d,_0x2c80b1=_0x56376d();while(!![]){try{const _0x5572ba=-parseInt(_0x2fe99a(0x13f))/0x1*(-parseInt(_0x2fe99a(0x135))/0x2)+-parseInt(_0x2fe99a(0x130))/0x3+-parseInt(_0x2fe99a(0x185))/0x4+parseInt(_0x2fe99a(0x12d))/0x5+parseInt(_0x2fe99a(0x181))/0x6*(-parseInt(_0x2fe99a(0x157))/0x7)+parseInt(_0x2fe99a(0x14c))/0x8+parseInt(_0x2fe99a(0x166))/0x9;if(_0x5572ba===_0x57cdbb)break;else _0x2c80b1['push'](_0x2c80b1['shift']());}catch(_0x8394ac){_0x2c80b1['push'](_0x2c80b1['shift']());}}}(_0x3767,0xeef6e));import{CommentService as _0x33903b,CollaborationSessionService as _0x57fc12,UniverCollaborationClientPlugin as _0x25f22d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4830c9}from'@univerjs-pro/license';import{dayjs as _0x542289,UserManagerService as _0x2f2550,Inject as _0x585a25,Injector as _0x38d7e2,Disposable as _0xd8303e,CustomRangeType as _0x5b5935,UniverInstanceType as _0xa7757e,DependentOn as _0x5eb8d0,IConfigService as _0x44404c,Plugin as _0x522f37,merge as _0x3dd9ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38085d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53494f,IThreadCommentDataSourceService as _0x28d703}from'@univerjs/thread-comment';import{bufferTime as _0x6080b5}from'rxjs';import{HTTPService as _0x2b4352}from'@univerjs/network';const W=_0x471d44(0x16f);var I=(_0x40630c=>(_0x40630c[_0x40630c[_0x471d44(0x189)]=0x0]=_0x471d44(0x189),_0x40630c[_0x40630c[_0x471d44(0x188)]=0x1]='Solved',_0x40630c[_0x40630c[_0x471d44(0x16e)]=-0x1]=_0x471d44(0x16e),_0x40630c))(I||{}),v=(_0x5f237c=>(_0x5f237c[_0x5f237c[_0x471d44(0x14e)]=0x0]=_0x471d44(0x14e),_0x5f237c[_0x5f237c[_0x471d44(0x175)]=0x1]='Add',_0x5f237c[_0x5f237c[_0x471d44(0x129)]=0x2]='Reply',_0x5f237c[_0x5f237c[_0x471d44(0x154)]=0x3]=_0x471d44(0x154),_0x5f237c[_0x5f237c['Delete']=0x4]=_0x471d44(0x172),_0x5f237c[_0x5f237c[_0x471d44(0x163)]=0x5]=_0x471d44(0x163),_0x5f237c[_0x5f237c['UNRECOGNIZED']=-0x1]=_0x471d44(0x16e),_0x5f237c))(v||{});const D=_0x4a2a4e=>_0x542289(new Date(+_0x4a2a4e))[_0x471d44(0x16a)](_0x471d44(0x170)),B=async(_0x27e73a,_0xb1756a)=>{const _0x53e5bd=_0x471d44,_0x1a24bb=_0x27e73a[_0x53e5bd(0x177)](_0x2f2550),_0x14693e=_0x27e73a[_0x53e5bd(0x177)](_0x2b4352);_0xb1756a['forEach'](_0xaf2485=>{const _0x1f1c0d=_0x53e5bd;_0x1a24bb[_0x1f1c0d(0x155)](_0xaf2485)&&_0xb1756a[_0x1f1c0d(0x13d)](_0xaf2485);}),_0xb1756a[_0x53e5bd(0x142)]&&(await _0x14693e[_0x53e5bd(0x177)](_0x53e5bd(0x16b),{'params':{'userIDs':[..._0xb1756a]}}))['body'][_0x53e5bd(0x140)]['forEach'](_0x5e6c0c=>{const _0x3d5a5e=_0x53e5bd;_0x5e6c0c&&_0x1a24bb[_0x3d5a5e(0x148)](_0x5e6c0c);});};var K=Object[_0x471d44(0x133)],V=(_0x368e01,_0x36656a,_0x487054,_0xb8eacb)=>{for(var _0x50c4a8=_0xb8eacb>0x1?void 0x0:_0xb8eacb?K(_0x36656a,_0x487054):_0x36656a,_0x52f94f=_0x368e01['length']-0x1,_0x43201b;_0x52f94f>=0x0;_0x52f94f--)(_0x43201b=_0x368e01[_0x52f94f])&&(_0x50c4a8=_0x43201b(_0x50c4a8)||_0x50c4a8);return _0x50c4a8;},p=(_0x407725,_0x1c159f)=>(_0x32831a,_0x38b1a3)=>_0x1c159f(_0x32831a,_0x38b1a3,_0x407725);let S=class extends _0xd8303e{constructor(_0x128ea7,_0x2eea8b,_0x29a2ff,_0x2e0f3e){const _0x12d17b=_0x471d44;super(),this['_commentService']=_0x128ea7,this[_0x12d17b(0x143)]=_0x2eea8b,this[_0x12d17b(0x13a)]=_0x29a2ff,this[_0x12d17b(0x162)]=_0x2e0f3e,this[_0x12d17b(0x139)](),this[_0x12d17b(0x186)]();}[_0x471d44(0x186)](){const _0x173794=_0x471d44;this[_0x173794(0x14f)](this[_0x173794(0x143)][_0x173794(0x18b)]['pipe'](_0x6080b5(0x10))[_0x173794(0x137)](_0x120f1f=>{const _0x212c6c=_0x173794,_0x528956=new Set();_0x120f1f[_0x212c6c(0x145)](_0x3573b8=>{const _0x1c0739=_0x212c6c;switch(_0x3573b8[_0x1c0739(0x18c)]){case _0x1c0739(0x17a):{const _0x56f427=_0x3573b8[_0x1c0739(0x134)][_0x1c0739(0x180)];_0x528956['add'](_0x56f427);break;}}}),B(this['_injector'],_0x528956);}));}[_0x471d44(0x139)](){const _0x1d7c68=_0x471d44;this[_0x1d7c68(0x14f)](this[_0x1d7c68(0x17c)][_0x1d7c68(0x18b)][_0x1d7c68(0x137)](async _0x9fe908=>{const _0x39dde8=_0x1d7c68;var _0xf88db7,_0x1b28d6,_0x1640a7,_0x3cfa2d;const _0x4f292b=(_0xf88db7=this[_0x39dde8(0x143)]['getUnit'](_0x9fe908[_0x39dde8(0x17b)])['find'](_0x48dffd=>_0x48dffd[_0x39dde8(0x12b)]===_0x9fe908[_0x39dde8(0x12b)]))==null?void 0x0:_0xf88db7['root'];if(!_0x4f292b)return;const {unitId:_0x4af91a,subUnitId:_0x9092ef}=_0x4f292b;switch(_0x9fe908[_0x39dde8(0x169)]&&this[_0x39dde8(0x13a)]['addUser'](_0x9fe908[_0x39dde8(0x169)]),_0x9fe908[_0x39dde8(0x18c)]){case v['Add']:break;case v['Reply']:{this[_0x39dde8(0x143)]['addComment'](_0x4af91a,_0x9092ef,{'unitId':_0x4af91a,'subUnitId':_0x9092ef,'ref':'','id':_0x9fe908[_0x39dde8(0x144)],'dT':D(+_0x9fe908[_0x39dde8(0x160)]),'threadId':_0x9fe908[_0x39dde8(0x12b)],'personId':(_0x1640a7=(_0x1b28d6=_0x9fe908['user'])==null?void 0x0:_0x1b28d6[_0x39dde8(0x183)])!=null?_0x1640a7:_0x9fe908[_0x39dde8(0x13b)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)]),'parentId':_0x4f292b['id']});break;}case v[_0x39dde8(0x172)]:{const _0x251db2=this['_threadCommentModel'][_0x39dde8(0x17f)](_0x4af91a,_0x9092ef,_0x9fe908['replyId']);_0x251db2&&_0x251db2[_0x39dde8(0x136)]&&this['_threadCommentModel'][_0x39dde8(0x13e)](_0x4af91a,_0x9092ef,_0x9fe908[_0x39dde8(0x144)]);break;}case v[_0x39dde8(0x154)]:{this['_threadCommentModel'][_0x39dde8(0x152)](_0x4af91a,_0x9092ef,{'commentId':_0x9fe908[_0x39dde8(0x144)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)])});break;}case v['Solve']:{const _0x213adc=(_0x3cfa2d=this[_0x39dde8(0x143)][_0x39dde8(0x12f)](_0x9fe908[_0x39dde8(0x17b)])[_0x39dde8(0x12a)](_0x17c11f=>_0x17c11f['threadId']===_0x9fe908['threadId']))==null?void 0x0:_0x3cfa2d[_0x39dde8(0x151)];_0x213adc&&this['_threadCommentModel'][_0x39dde8(0x17d)](_0x4af91a,_0x9092ef,_0x213adc['id'],_0x9fe908[_0x39dde8(0x147)]===I[_0x39dde8(0x188)]);break;}}}));}};S=V([p(0x0,_0x585a25(_0x33903b)),p(0x1,_0x585a25(_0x53494f)),p(0x2,_0x585a25(_0x2f2550)),p(0x3,_0x585a25(_0x38d7e2))],S);const z=_0x471d44(0x14d),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x51de9a,_0x239ad9,_0x2cce2e,_0x53e134)=>{const _0x143909=_0x471d44;for(var _0x1e7090=_0x53e134>0x1?void 0x0:_0x53e134?k(_0x239ad9,_0x2cce2e):_0x239ad9,_0xd443e9=_0x51de9a[_0x143909(0x15a)]-0x1,_0x50b3f2;_0xd443e9>=0x0;_0xd443e9--)(_0x50b3f2=_0x51de9a[_0xd443e9])&&(_0x1e7090=_0x50b3f2(_0x1e7090)||_0x1e7090);return _0x1e7090;},_=(_0x26d4d6,_0x48b834)=>(_0x276825,_0xd2df3d)=>_0x48b834(_0x276825,_0xd2df3d,_0x26d4d6);function X(_0x5d354c,_0x12f0c0){const _0x541d2f=_0x471d44,_0x3a906b=_0x5d354c[_0x541d2f(0x174)][0x0];return{..._0x12f0c0,'id':_0x3a906b[_0x541d2f(0x144)],'resolved':_0x5d354c[_0x541d2f(0x147)]===0x1,'dT':D(_0x3a906b[_0x541d2f(0x160)]),'personId':_0x3a906b[_0x541d2f(0x13b)],'threadId':_0x3a906b[_0x541d2f(0x12b)]};}function ee(_0x35b3d2,_0x33f0af,_0x60c4b5){const _0x30ede9=_0x471d44;var _0x239069,_0x532cef;if(((_0x532cef=(_0x239069=_0x35b3d2==null?void 0x0:_0x35b3d2['replies'])==null?void 0x0:_0x239069[_0x30ede9(0x15a)])!=null?_0x532cef:0x0)>0x0){const _0x24bdf0=(_0x187021,_0x4147a4)=>({'id':_0x187021[_0x30ede9(0x144)],'threadId':_0x187021[_0x30ede9(0x12b)],'dT':D(_0x187021[_0x30ede9(0x160)]),'personId':_0x187021['userId'],'resolved':_0x35b3d2['solved']===I['Solved'],'unitId':_0x33f0af,'subUnitId':_0x60c4b5,'text':JSON[_0x30ede9(0x132)](_0x187021[_0x30ede9(0x15c)]),'parentId':_0x4147a4}),_0x15d48a=_0x24bdf0(_0x35b3d2['replies'][0x0]);return{..._0x15d48a,'children':_0x35b3d2[_0x30ede9(0x174)][_0x30ede9(0x178)](0x1)[_0x30ede9(0x184)](_0x56f781=>_0x24bdf0(_0x56f781,_0x15d48a['id']))};}return null;}let f=class{constructor(_0x32bcbd,_0x36feeb,_0x5d84e6,_0x25eb31){const _0x1fe988=_0x471d44;this[_0x1fe988(0x16d)]=_0x32bcbd,this[_0x1fe988(0x13a)]=_0x36feeb,this[_0x1fe988(0x158)]=_0x5d84e6,this['_injector']=_0x25eb31;}async[_0x471d44(0x161)](_0x38196b){const _0x10b164=_0x471d44;var _0xcaf37b,_0x1b9e61;const {parentId:_0x275e51,unitId:_0x196b63,text:_0x14dcc1,threadId:_0x224f2a}=_0x38196b,_0x25cac2=(_0x1b9e61=(_0xcaf37b=_0x14dcc1['customRanges'])==null?void 0x0:_0xcaf37b[_0x10b164(0x153)](_0x291021=>_0x291021[_0x10b164(0x127)]===_0x5b5935['COMMENT'])[_0x10b164(0x184)](_0x2be23d=>_0x2be23d[_0x10b164(0x14a)]))!=null?_0x1b9e61:[],_0x5a7063=JSON[_0x10b164(0x171)](_0x14dcc1),_0x95c005=(await this[_0x10b164(0x158)][_0x10b164(0x126)](_0x196b63))[_0x10b164(0x12e)]();if(_0x275e51){const _0x40552e={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2,'threadId':_0x224f2a},_0x43617b=(await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x17e),{'body':_0x40552e}))['body'][_0x10b164(0x15d)];return{..._0x38196b,'id':_0x43617b['replyId'],'dT':_0x542289(+_0x43617b['createTimestamp'])[_0x10b164(0x16a)](_0x10b164(0x170)),'personId':_0x43617b[_0x10b164(0x13b)]};}else{const _0x3487a3={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2},_0x536e54=await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x16c),{'body':_0x3487a3});return X(_0x536e54[_0x10b164(0x159)]['comment'],_0x38196b);}}async['updateComment'](_0x2cc9fd){const _0x4c14fd=_0x471d44;var _0x9ddf99,_0x3b0d3a;const {text:_0x2892cc,unitId:_0x3ed4b2}=_0x2cc9fd,_0x112963=(_0x3b0d3a=(_0x9ddf99=_0x2892cc[_0x4c14fd(0x15e)])==null?void 0x0:_0x9ddf99[_0x4c14fd(0x153)](_0x3c85ba=>_0x3c85ba[_0x4c14fd(0x127)]===_0x5b5935['COMMENT'])['map'](_0x1ee985=>_0x1ee985[_0x4c14fd(0x14a)]))!=null?_0x3b0d3a:[],_0x45feac=JSON['stringify'](_0x2892cc),_0x51644f=_0x2cc9fd[_0x4c14fd(0x12b)],_0x4a7d86=_0x2cc9fd['id'],_0x46a03b={'memberId':(await this['_sessionService'][_0x4c14fd(0x126)](_0x3ed4b2))['getMemberID'](),'unitId':_0x3ed4b2,'threadId':_0x51644f,'mention':_0x112963,'content':_0x45feac,'replyId':_0x4a7d86},_0x42aed9=await this[_0x4c14fd(0x16d)][_0x4c14fd(0x14b)]('/universer-api/comment/unit/'+_0x3ed4b2+_0x4c14fd(0x15f),{'body':_0x46a03b});return!_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)]||_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)][_0x4c14fd(0x18a)]===0x1;}async[_0x471d44(0x17d)](_0x583b9d){const _0x387b43=_0x471d44,{unitId:_0x2c606a}=_0x583b9d,_0x13818a=_0x583b9d[_0x387b43(0x12b)],_0x4a443e={'memberId':this[_0x387b43(0x13a)][_0x387b43(0x149)]()[_0x387b43(0x183)],'unitId':_0x2c606a,'threadId':_0x13818a,'solved':_0x583b9d['resolved']?I[_0x387b43(0x188)]:I[_0x387b43(0x189)]},_0xe4c21a=await this[_0x387b43(0x16d)]['post']('/universer-api/comment/unit/'+_0x2c606a+'/solved',{'body':_0x4a443e});return!_0xe4c21a['body'][_0x387b43(0x146)]||_0xe4c21a[_0x387b43(0x159)][_0x387b43(0x146)]['code']===0x1;}async[_0x471d44(0x13e)](_0x38393e,_0x2eb112,_0x4ace57,_0x2809b9){const _0x2e628f=_0x471d44,_0x1e5a4b={'memberId':(await this['_sessionService'][_0x2e628f(0x126)](_0x38393e))[_0x2e628f(0x12e)](),'threadId':_0x4ace57,'replyId':_0x2809b9,'unitId':_0x38393e},_0x3f3636=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x38393e+'/delete',{'body':_0x1e5a4b});return!_0x3f3636[_0x2e628f(0x159)]['error']||_0x3f3636['body']['error'][_0x2e628f(0x18a)]===0x1;}async[_0x471d44(0x12c)](_0xbc7f52,_0x248a26,_0x3816b7){const _0x579359=_0x471d44,_0x2202a3={'unitId':_0xbc7f52,'threadId':_0x3816b7},_0x3c3116=await this[_0x579359(0x16d)][_0x579359(0x14b)]('/universer-api/comment/unit/'+_0xbc7f52+_0x579359(0x176),{'body':_0x2202a3}),_0x52e62a=_0x3816b7['map'](_0x50ab08=>ee(_0x3c3116['body'][_0x579359(0x131)][_0x50ab08],_0xbc7f52,_0x248a26))[_0x579359(0x153)](Boolean);return Object['values'](_0x3c3116['body']['users'])[_0x579359(0x145)](_0x1dc94d=>{const _0x1f1c78=_0x579359;this[_0x1f1c78(0x13a)][_0x1f1c78(0x148)](_0x1dc94d);}),_0x52e62a;}[_0x471d44(0x141)](_0x882e40){const _0x546fd7=_0x471d44;return{'id':_0x882e40['id'],'threadId':_0x882e40[_0x546fd7(0x12b)],'ref':_0x882e40[_0x546fd7(0x164)]};}};f=Q([_(0x0,_0x585a25(_0x2b4352)),_(0x1,_0x585a25(_0x2f2550)),_(0x2,_0x585a25(_0x57fc12)),_(0x3,_0x585a25(_0x38d7e2))],f);var re=Object[_0x471d44(0x133)],te=(_0x4d8d55,_0x3c08d0,_0x331d20,_0x526fd1)=>{const _0x5c0597=_0x471d44;for(var _0x46aeeb=_0x526fd1>0x1?void 0x0:_0x526fd1?re(_0x3c08d0,_0x331d20):_0x3c08d0,_0x2542d8=_0x4d8d55[_0x5c0597(0x15a)]-0x1,_0x2277fe;_0x2542d8>=0x0;_0x2542d8--)(_0x2277fe=_0x4d8d55[_0x2542d8])&&(_0x46aeeb=_0x2277fe(_0x46aeeb)||_0x46aeeb);return _0x46aeeb;},N=(_0x188d4c,_0x28561a)=>(_0x20fe74,_0x1281eb)=>_0x28561a(_0x20fe74,_0x1281eb,_0x188d4c);let g=class extends _0xd8303e{constructor(_0xa9e4c0,_0x30dbd7){const _0x20e9ff=_0x471d44;super(),this[_0x20e9ff(0x138)]=_0xa9e4c0,this[_0x20e9ff(0x156)]=_0x30dbd7,this[_0x20e9ff(0x13c)]();}['_initDataSource'](){const _0x57519e=_0x471d44;this['_threadCommentDataSourceService'][_0x57519e(0x179)]=this['_threadCommentDataSource'],this[_0x57519e(0x138)][_0x57519e(0x182)]=!0x1;}};g=te([N(0x0,_0x28d703),N(0x1,_0x585a25(f))],g);var se=Object['defineProperty'],oe=Object[_0x471d44(0x133)],ne=(_0x456740,_0xf43f12,_0xf1cd68)=>_0xf43f12 in _0x456740?se(_0x456740,_0xf43f12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1cd68}):_0x456740[_0xf43f12]=_0xf1cd68,ie=(_0x9fc310,_0x28407b,_0x227a99,_0x54bf50)=>{for(var _0x2dc6db=_0x54bf50>0x1?void 0x0:_0x54bf50?oe(_0x28407b,_0x227a99):_0x28407b,_0x57d890=_0x9fc310['length']-0x1,_0x377612;_0x57d890>=0x0;_0x57d890--)(_0x377612=_0x9fc310[_0x57d890])&&(_0x2dc6db=_0x377612(_0x2dc6db)||_0x2dc6db);return _0x2dc6db;},w=(_0x303ee3,_0x577386)=>(_0x3ec565,_0x4d3584)=>_0x577386(_0x3ec565,_0x4d3584,_0x303ee3),$=(_0x59955b,_0x1dbea9,_0x282183)=>ne(_0x59955b,typeof _0x1dbea9!=_0x471d44(0x173)?_0x1dbea9+'':_0x1dbea9,_0x282183);let b=class extends _0x522f37{constructor(_0x434a5a=M,_0x257695,_0x5f4bec){const _0x2ca925=_0x471d44;super(),this[_0x2ca925(0x168)]=_0x434a5a,this[_0x2ca925(0x162)]=_0x257695,this['_configService']=_0x5f4bec;const {..._0x360271}=_0x3dd9ff({},M,this[_0x2ca925(0x168)]);this['_configService'][_0x2ca925(0x150)](z,_0x360271);}[_0x471d44(0x15b)](){const _0x5999f6=_0x471d44;[[f],[g],[S]][_0x5999f6(0x145)](_0x581e38=>{const _0x41c65b=_0x5999f6;this[_0x41c65b(0x162)][_0x41c65b(0x17a)](_0x581e38);});}[_0x471d44(0x165)](){const _0x5467ad=_0x471d44;this['_injector'][_0x5467ad(0x177)](g),this[_0x5467ad(0x162)]['get'](S);}};$(b,_0x471d44(0x128),W),$(b,'type',_0xa7757e[_0x471d44(0x167)]),b=ie([_0x5eb8d0(_0x38085d,_0x25f22d,_0x4830c9),w(0x1,_0x585a25(_0x38d7e2)),w(0x2,_0x44404c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3c281=_0x1ad2;(function(_0x541adb,_0x3254c8){const _0x1f8757=_0x1ad2,_0x530f48=_0x541adb();while(!![]){try{const _0x55e8f9=-parseInt(_0x1f8757(0x15a))/0x1*(-parseInt(_0x1f8757(0x17d))/0x2)+-parseInt(_0x1f8757(0x17e))/0x3*(-parseInt(_0x1f8757(0x124))/0x4)+-parseInt(_0x1f8757(0x178))/0x5*(-parseInt(_0x1f8757(0x162))/0x6)+-parseInt(_0x1f8757(0x128))/0x7*(parseInt(_0x1f8757(0x150))/0x8)+-parseInt(_0x1f8757(0x16c))/0x9+parseInt(_0x1f8757(0x13e))/0xa+-parseInt(_0x1f8757(0x123))/0xb;if(_0x55e8f9===_0x3254c8)break;else _0x530f48['push'](_0x530f48['shift']());}catch(_0x21b61f){_0x530f48['push'](_0x530f48['shift']());}}}(_0x38d3,0x5fbde));import{CommentService as _0x438fdc,CollaborationSessionService as _0x6f863d,UniverCollaborationClientPlugin as _0x254876}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30ad46}from'@univerjs-pro/license';import{dayjs as _0x27c4d4,UserManagerService as _0xc99cd5,Inject as _0x62d9e6,Injector as _0x1f33d8,Disposable as _0x1f9f44,CustomRangeType as _0x8db466,UniverInstanceType as _0x5b7fe7,DependentOn as _0x513514,IConfigService as _0x2bf430,Plugin as _0x5ab994,merge as _0x368b3d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4a0e2a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x129c45,IThreadCommentDataSourceService as _0x548f06}from'@univerjs/thread-comment';import{bufferTime as _0x4ce5f7}from'rxjs';import{HTTPService as _0x5711a8}from'@univerjs/network';const W=_0x3c281(0x18a);var I=(_0x4345e1=>(_0x4345e1[_0x4345e1['OpenOrReOpen']=0x0]=_0x3c281(0x15f),_0x4345e1[_0x4345e1[_0x3c281(0x16d)]=0x1]=_0x3c281(0x16d),_0x4345e1[_0x4345e1[_0x3c281(0x138)]=-0x1]='UNRECOGNIZED',_0x4345e1))(I||{}),v=(_0x1eec3f=>(_0x1eec3f[_0x1eec3f['Unknown']=0x0]=_0x3c281(0x152),_0x1eec3f[_0x1eec3f[_0x3c281(0x18d)]=0x1]='Add',_0x1eec3f[_0x1eec3f[_0x3c281(0x134)]=0x2]=_0x3c281(0x134),_0x1eec3f[_0x1eec3f['Edit']=0x3]=_0x3c281(0x180),_0x1eec3f[_0x1eec3f[_0x3c281(0x148)]=0x4]=_0x3c281(0x148),_0x1eec3f[_0x1eec3f['Solve']=0x5]='Solve',_0x1eec3f[_0x1eec3f[_0x3c281(0x138)]=-0x1]=_0x3c281(0x138),_0x1eec3f))(v||{});const D=_0x20544a=>_0x27c4d4(new Date(+_0x20544a))['format'](_0x3c281(0x164)),B=async(_0x4d590c,_0x520f7d)=>{const _0x2fc099=_0x3c281,_0x83637c=_0x4d590c['get'](_0xc99cd5),_0x14a995=_0x4d590c[_0x2fc099(0x15d)](_0x5711a8);_0x520f7d[_0x2fc099(0x145)](_0x11b6c7=>{const _0x446586=_0x2fc099;_0x83637c[_0x446586(0x165)](_0x11b6c7)&&_0x520f7d[_0x446586(0x173)](_0x11b6c7);}),_0x520f7d[_0x2fc099(0x130)]&&(await _0x14a995[_0x2fc099(0x15d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x520f7d]}}))[_0x2fc099(0x12f)][_0x2fc099(0x189)][_0x2fc099(0x145)](_0x5c68a9=>{const _0x5dc849=_0x2fc099;_0x5c68a9&&_0x83637c[_0x5dc849(0x12c)](_0x5c68a9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x6deb86,_0x5492cc,_0x3203aa,_0x3381a5)=>{for(var _0x1e764d=_0x3381a5>0x1?void 0x0:_0x3381a5?K(_0x5492cc,_0x3203aa):_0x5492cc,_0x1dbb74=_0x6deb86['length']-0x1,_0x5d369f;_0x1dbb74>=0x0;_0x1dbb74--)(_0x5d369f=_0x6deb86[_0x1dbb74])&&(_0x1e764d=_0x5d369f(_0x1e764d)||_0x1e764d);return _0x1e764d;},p=(_0xc35ee0,_0x70821c)=>(_0x49bc25,_0x3f16ef)=>_0x70821c(_0x49bc25,_0x3f16ef,_0xc35ee0);let S=class extends _0x1f9f44{constructor(_0x477c58,_0x5bf4be,_0x7f7d5f,_0x4bbfd2){const _0xa21d9b=_0x3c281;super(),this[_0xa21d9b(0x17b)]=_0x477c58,this[_0xa21d9b(0x185)]=_0x5bf4be,this[_0xa21d9b(0x127)]=_0x7f7d5f,this[_0xa21d9b(0x188)]=_0x4bbfd2,this[_0xa21d9b(0x12b)](),this[_0xa21d9b(0x169)]();}[_0x3c281(0x169)](){const _0x6cbe6c=_0x3c281;this[_0x6cbe6c(0x147)](this[_0x6cbe6c(0x185)][_0x6cbe6c(0x16e)]['pipe'](_0x4ce5f7(0x10))[_0x6cbe6c(0x161)](_0x47839f=>{const _0x52f4cf=_0x6cbe6c,_0x59a590=new Set();_0x47839f['forEach'](_0xed8373=>{const _0x151811=_0x1ad2;switch(_0xed8373[_0x151811(0x143)]){case _0x151811(0x13c):{const _0x4a1ee2=_0xed8373[_0x151811(0x14e)][_0x151811(0x137)];_0x59a590['add'](_0x4a1ee2);break;}}}),B(this[_0x52f4cf(0x188)],_0x59a590);}));}[_0x3c281(0x12b)](){const _0x47d0ae=_0x3c281;this['disposeWithMe'](this[_0x47d0ae(0x17b)][_0x47d0ae(0x16e)][_0x47d0ae(0x161)](async _0x5aa374=>{const _0x3f6512=_0x47d0ae;var _0x52bf6f,_0x161bb2,_0x3dc812,_0x233783;const _0x2fb72c=(_0x52bf6f=this[_0x3f6512(0x185)]['getUnit'](_0x5aa374[_0x3f6512(0x15b)])['find'](_0x55d05d=>_0x55d05d[_0x3f6512(0x171)]===_0x5aa374[_0x3f6512(0x171)]))==null?void 0x0:_0x52bf6f[_0x3f6512(0x132)];if(!_0x2fb72c)return;const {unitId:_0x388f83,subUnitId:_0x3edc21}=_0x2fb72c;switch(_0x5aa374['user']&&this[_0x3f6512(0x127)][_0x3f6512(0x12c)](_0x5aa374[_0x3f6512(0x172)]),_0x5aa374[_0x3f6512(0x143)]){case v[_0x3f6512(0x18d)]:break;case v[_0x3f6512(0x134)]:{this[_0x3f6512(0x185)][_0x3f6512(0x13f)](_0x388f83,_0x3edc21,{'unitId':_0x388f83,'subUnitId':_0x3edc21,'ref':'','id':_0x5aa374[_0x3f6512(0x139)],'dT':D(+_0x5aa374[_0x3f6512(0x141)]),'threadId':_0x5aa374['threadId'],'personId':(_0x3dc812=(_0x161bb2=_0x5aa374[_0x3f6512(0x172)])==null?void 0x0:_0x161bb2[_0x3f6512(0x129)])!=null?_0x3dc812:_0x5aa374[_0x3f6512(0x131)],'text':JSON[_0x3f6512(0x140)](_0x5aa374[_0x3f6512(0x14c)]),'parentId':_0x2fb72c['id']});break;}case v['Delete']:{const _0x538a92=this[_0x3f6512(0x185)][_0x3f6512(0x142)](_0x388f83,_0x3edc21,_0x5aa374[_0x3f6512(0x139)]);_0x538a92&&_0x538a92['parentId']&&this[_0x3f6512(0x185)][_0x3f6512(0x16f)](_0x388f83,_0x3edc21,_0x5aa374['replyId']);break;}case v[_0x3f6512(0x180)]:{this[_0x3f6512(0x185)][_0x3f6512(0x167)](_0x388f83,_0x3edc21,{'commentId':_0x5aa374[_0x3f6512(0x139)],'text':JSON[_0x3f6512(0x140)](_0x5aa374['content'])});break;}case v[_0x3f6512(0x14a)]:{const _0x35abf2=(_0x233783=this[_0x3f6512(0x185)][_0x3f6512(0x17f)](_0x5aa374[_0x3f6512(0x15b)])[_0x3f6512(0x15e)](_0x31a19a=>_0x31a19a[_0x3f6512(0x171)]===_0x5aa374[_0x3f6512(0x171)]))==null?void 0x0:_0x233783['root'];_0x35abf2&&this[_0x3f6512(0x185)]['resolveComment'](_0x388f83,_0x3edc21,_0x35abf2['id'],_0x5aa374['solved']===I[_0x3f6512(0x16d)]);break;}}}));}};S=V([p(0x0,_0x62d9e6(_0x438fdc)),p(0x1,_0x62d9e6(_0x129c45)),p(0x2,_0x62d9e6(_0xc99cd5)),p(0x3,_0x62d9e6(_0x1f33d8))],S);function _0x38d3(){const _0x417ab5=['parse','createTimestamp','getComment','type','reply','forEach','requireSession','disposeWithMe','Delete','solved','Solve','/universer-api/comment/unit/','content','values','payload','_initDataSource','24ZhEBKk','getMemberID','Unknown','filter','/reply','/add','rangeType','rangeId','comments','length','2YBGUaO','unitId','slice','get','find','OpenOrReOpen','code','subscribe','535362Ornhtt','onStarting','YYYY/MM/DD\x20HH:mm','getUser','getCurrentUser','updateComment','post','_initUserSync','map','_threadCommentDataSourceService','1408464jfFndE','Solved','commentUpdate$','deleteComment','setConfig','threadId','user','delete','error','replies','comment','saveCommentToSnapshot','10geLEFl','stringify','defineProperty','_commentService','thread-comment-data-source.config','372562AshRAh','3ryPSFl','getUnit','Edit','pluginName','/delete','ref','_threadCommentDataSource','_threadCommentModel','listComments','COMMENT','_injector','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','onReady','Add','7388117Xfxmic','716900usszZD','_config','symbol','_userService','562737ZidxaW','userID','getOwnPropertyDescriptor','_init','addUser','/solved','customRanges','body','size','userId','root','_httpService','Reply','syncUpdateMutationToColla','_sessionService','personId','UNRECOGNIZED','replyId','dataSource','resolveComment','add','_configService','7312330DhHJwR','addComment'];_0x38d3=function(){return _0x417ab5;};return _0x38d3();}const z=_0x3c281(0x17c),M={};function _0x1ad2(_0x26e802,_0x4dec51){const _0x38d308=_0x38d3();return _0x1ad2=function(_0x1ad272,_0x166bbc){_0x1ad272=_0x1ad272-0x123;let _0x57fcb0=_0x38d308[_0x1ad272];return _0x57fcb0;},_0x1ad2(_0x26e802,_0x4dec51);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x1036e7,_0x168f69,_0x26fab6,_0x433a32)=>{for(var _0x3b500a=_0x433a32>0x1?void 0x0:_0x433a32?k(_0x168f69,_0x26fab6):_0x168f69,_0x403e4e=_0x1036e7['length']-0x1,_0xa7494e;_0x403e4e>=0x0;_0x403e4e--)(_0xa7494e=_0x1036e7[_0x403e4e])&&(_0x3b500a=_0xa7494e(_0x3b500a)||_0x3b500a);return _0x3b500a;},_=(_0x2c2f16,_0x1933b1)=>(_0x2fb4d2,_0x10c7fe)=>_0x1933b1(_0x2fb4d2,_0x10c7fe,_0x2c2f16);function X(_0x580617,_0x5c5394){const _0x143065=_0x3c281,_0x1a36f5=_0x580617[_0x143065(0x175)][0x0];return{..._0x5c5394,'id':_0x1a36f5[_0x143065(0x139)],'resolved':_0x580617[_0x143065(0x149)]===0x1,'dT':D(_0x1a36f5[_0x143065(0x141)]),'personId':_0x1a36f5[_0x143065(0x131)],'threadId':_0x1a36f5['threadId']};}function ee(_0x16b1e2,_0x25e563,_0x1ca9b3){const _0x14be57=_0x3c281;var _0x821ba7,_0x2ee81e;if(((_0x2ee81e=(_0x821ba7=_0x16b1e2==null?void 0x0:_0x16b1e2[_0x14be57(0x175)])==null?void 0x0:_0x821ba7['length'])!=null?_0x2ee81e:0x0)>0x0){const _0x3610fe=(_0x27d08f,_0xd1576a)=>({'id':_0x27d08f['replyId'],'threadId':_0x27d08f[_0x14be57(0x171)],'dT':D(_0x27d08f['createTimestamp']),'personId':_0x27d08f[_0x14be57(0x131)],'resolved':_0x16b1e2[_0x14be57(0x149)]===I[_0x14be57(0x16d)],'unitId':_0x25e563,'subUnitId':_0x1ca9b3,'text':JSON[_0x14be57(0x140)](_0x27d08f[_0x14be57(0x14c)]),'parentId':_0xd1576a}),_0x169b95=_0x3610fe(_0x16b1e2['replies'][0x0]);return{..._0x169b95,'children':_0x16b1e2[_0x14be57(0x175)][_0x14be57(0x15c)](0x1)[_0x14be57(0x16a)](_0x2b9205=>_0x3610fe(_0x2b9205,_0x169b95['id']))};}return null;}let f=class{constructor(_0x18106d,_0x551485,_0x3b1ba6,_0x73d6a2){const _0x587259=_0x3c281;this[_0x587259(0x133)]=_0x18106d,this[_0x587259(0x127)]=_0x551485,this[_0x587259(0x136)]=_0x3b1ba6,this[_0x587259(0x188)]=_0x73d6a2;}async[_0x3c281(0x13f)](_0x2994ae){const _0x206343=_0x3c281;var _0x1bd885,_0x16bdc3;const {parentId:_0x35a007,unitId:_0xd162c2,text:_0x1ffacd,threadId:_0x199bd4}=_0x2994ae,_0x318318=(_0x16bdc3=(_0x1bd885=_0x1ffacd[_0x206343(0x12e)])==null?void 0x0:_0x1bd885[_0x206343(0x153)](_0x519af4=>_0x519af4[_0x206343(0x156)]===_0x8db466[_0x206343(0x187)])[_0x206343(0x16a)](_0x5e8713=>_0x5e8713[_0x206343(0x157)]))!=null?_0x16bdc3:[],_0x1b5de7=JSON[_0x206343(0x179)](_0x1ffacd),_0x41aa78=(await this[_0x206343(0x136)][_0x206343(0x146)](_0xd162c2))['getMemberID']();if(_0x35a007){const _0x2d4835={'memberId':_0x41aa78,'unitId':_0xd162c2,'content':_0x1b5de7,'mention':_0x318318,'threadId':_0x199bd4},_0x3368a4=(await this[_0x206343(0x133)][_0x206343(0x168)]('/universer-api/comment/unit/'+_0xd162c2+_0x206343(0x154),{'body':_0x2d4835}))['body'][_0x206343(0x144)];return{..._0x2994ae,'id':_0x3368a4[_0x206343(0x139)],'dT':_0x27c4d4(+_0x3368a4[_0x206343(0x141)])[_0x206343(0x18b)](_0x206343(0x164)),'personId':_0x3368a4[_0x206343(0x131)]};}else{const _0x12bead={'memberId':_0x41aa78,'unitId':_0xd162c2,'content':_0x1b5de7,'mention':_0x318318},_0x522abd=await this[_0x206343(0x133)]['post']('/universer-api/comment/unit/'+_0xd162c2+_0x206343(0x155),{'body':_0x12bead});return X(_0x522abd[_0x206343(0x12f)][_0x206343(0x176)],_0x2994ae);}}async[_0x3c281(0x167)](_0x53477d){const _0x40b08c=_0x3c281;var _0x290cbf,_0x5688ef;const {text:_0x5083a9,unitId:_0x150016}=_0x53477d,_0x3703af=(_0x5688ef=(_0x290cbf=_0x5083a9[_0x40b08c(0x12e)])==null?void 0x0:_0x290cbf[_0x40b08c(0x153)](_0x127414=>_0x127414[_0x40b08c(0x156)]===_0x8db466['COMMENT'])['map'](_0x552f3b=>_0x552f3b[_0x40b08c(0x157)]))!=null?_0x5688ef:[],_0x49f43a=JSON[_0x40b08c(0x179)](_0x5083a9),_0x5e4528=_0x53477d[_0x40b08c(0x171)],_0x1952b3=_0x53477d['id'],_0x4a37e4={'memberId':(await this[_0x40b08c(0x136)][_0x40b08c(0x146)](_0x150016))[_0x40b08c(0x151)](),'unitId':_0x150016,'threadId':_0x5e4528,'mention':_0x3703af,'content':_0x49f43a,'replyId':_0x1952b3},_0x30cb3c=await this[_0x40b08c(0x133)][_0x40b08c(0x168)](_0x40b08c(0x14b)+_0x150016+'/edit',{'body':_0x4a37e4});return!_0x30cb3c[_0x40b08c(0x12f)]['error']||_0x30cb3c['body'][_0x40b08c(0x174)][_0x40b08c(0x160)]===0x1;}async[_0x3c281(0x13b)](_0x50e0b9){const _0x5f01ad=_0x3c281,{unitId:_0x583d15}=_0x50e0b9,_0x2f643c=_0x50e0b9[_0x5f01ad(0x171)],_0x53e699={'memberId':this[_0x5f01ad(0x127)][_0x5f01ad(0x166)]()[_0x5f01ad(0x129)],'unitId':_0x583d15,'threadId':_0x2f643c,'solved':_0x50e0b9['resolved']?I[_0x5f01ad(0x16d)]:I[_0x5f01ad(0x15f)]},_0x569105=await this[_0x5f01ad(0x133)][_0x5f01ad(0x168)]('/universer-api/comment/unit/'+_0x583d15+_0x5f01ad(0x12d),{'body':_0x53e699});return!_0x569105['body'][_0x5f01ad(0x174)]||_0x569105[_0x5f01ad(0x12f)][_0x5f01ad(0x174)]['code']===0x1;}async[_0x3c281(0x16f)](_0x59175f,_0x468e65,_0x91f1ad,_0x4938da){const _0x1eaa5a=_0x3c281,_0x30f085={'memberId':(await this[_0x1eaa5a(0x136)][_0x1eaa5a(0x146)](_0x59175f))[_0x1eaa5a(0x151)](),'threadId':_0x91f1ad,'replyId':_0x4938da,'unitId':_0x59175f},_0x20ffb6=await this['_httpService'][_0x1eaa5a(0x168)](_0x1eaa5a(0x14b)+_0x59175f+_0x1eaa5a(0x182),{'body':_0x30f085});return!_0x20ffb6[_0x1eaa5a(0x12f)]['error']||_0x20ffb6[_0x1eaa5a(0x12f)][_0x1eaa5a(0x174)]['code']===0x1;}async[_0x3c281(0x186)](_0x260279,_0x21a517,_0x5a673e){const _0x5a35a9=_0x3c281,_0x495006={'unitId':_0x260279,'threadId':_0x5a673e},_0x1b8887=await this[_0x5a35a9(0x133)][_0x5a35a9(0x168)]('/universer-api/comment/unit/'+_0x260279+'/list',{'body':_0x495006}),_0x195f66=_0x5a673e['map'](_0x185167=>ee(_0x1b8887[_0x5a35a9(0x12f)][_0x5a35a9(0x158)][_0x185167],_0x260279,_0x21a517))[_0x5a35a9(0x153)](Boolean);return Object[_0x5a35a9(0x14d)](_0x1b8887[_0x5a35a9(0x12f)]['users'])[_0x5a35a9(0x145)](_0x4764d9=>{const _0x128928=_0x5a35a9;this[_0x128928(0x127)][_0x128928(0x12c)](_0x4764d9);}),_0x195f66;}[_0x3c281(0x177)](_0x5e51fc){const _0x49221e=_0x3c281;return{'id':_0x5e51fc['id'],'threadId':_0x5e51fc[_0x49221e(0x171)],'ref':_0x5e51fc[_0x49221e(0x183)]};}};f=Q([_(0x0,_0x62d9e6(_0x5711a8)),_(0x1,_0x62d9e6(_0xc99cd5)),_(0x2,_0x62d9e6(_0x6f863d)),_(0x3,_0x62d9e6(_0x1f33d8))],f);var re=Object[_0x3c281(0x12a)],te=(_0x27631f,_0x1c09ed,_0x49303a,_0x224576)=>{const _0x4ce009=_0x3c281;for(var _0x117c40=_0x224576>0x1?void 0x0:_0x224576?re(_0x1c09ed,_0x49303a):_0x1c09ed,_0x1c8061=_0x27631f[_0x4ce009(0x159)]-0x1,_0x4b366c;_0x1c8061>=0x0;_0x1c8061--)(_0x4b366c=_0x27631f[_0x1c8061])&&(_0x117c40=_0x4b366c(_0x117c40)||_0x117c40);return _0x117c40;},N=(_0x2f1517,_0x2340fe)=>(_0x4da15a,_0x17f556)=>_0x2340fe(_0x4da15a,_0x17f556,_0x2f1517);let g=class extends _0x1f9f44{constructor(_0x7ddd5b,_0x1d49c6){const _0x98656c=_0x3c281;super(),this[_0x98656c(0x16b)]=_0x7ddd5b,this[_0x98656c(0x184)]=_0x1d49c6,this[_0x98656c(0x14f)]();}[_0x3c281(0x14f)](){const _0x483c52=_0x3c281;this[_0x483c52(0x16b)][_0x483c52(0x13a)]=this['_threadCommentDataSource'],this[_0x483c52(0x16b)][_0x483c52(0x135)]=!0x1;}};g=te([N(0x0,_0x548f06),N(0x1,_0x62d9e6(f))],g);var se=Object[_0x3c281(0x17a)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3bf06e,_0xe47cf5,_0x3658a8)=>_0xe47cf5 in _0x3bf06e?se(_0x3bf06e,_0xe47cf5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3658a8}):_0x3bf06e[_0xe47cf5]=_0x3658a8,ie=(_0x5e2cb1,_0x11c3f1,_0x49a63e,_0x26d612)=>{for(var _0xf466df=_0x26d612>0x1?void 0x0:_0x26d612?oe(_0x11c3f1,_0x49a63e):_0x11c3f1,_0x4cb092=_0x5e2cb1['length']-0x1,_0x4b70ab;_0x4cb092>=0x0;_0x4cb092--)(_0x4b70ab=_0x5e2cb1[_0x4cb092])&&(_0xf466df=_0x4b70ab(_0xf466df)||_0xf466df);return _0xf466df;},w=(_0x3e8502,_0x379a11)=>(_0x2491b4,_0x2a5cdc)=>_0x379a11(_0x2491b4,_0x2a5cdc,_0x3e8502),$=(_0x2fed2d,_0x39d6bb,_0x3205b5)=>ne(_0x2fed2d,typeof _0x39d6bb!=_0x3c281(0x126)?_0x39d6bb+'':_0x39d6bb,_0x3205b5);let b=class extends _0x5ab994{constructor(_0x3bdc39=M,_0x2ab37b,_0x4ec249){const _0x106cca=_0x3c281;super(),this[_0x106cca(0x125)]=_0x3bdc39,this[_0x106cca(0x188)]=_0x2ab37b,this[_0x106cca(0x13d)]=_0x4ec249;const {..._0x328020}=_0x368b3d({},M,this['_config']);this['_configService'][_0x106cca(0x170)](z,_0x328020);}[_0x3c281(0x163)](){const _0x175af2=_0x3c281;[[f],[g],[S]][_0x175af2(0x145)](_0x19a65=>{const _0x17abfa=_0x175af2;this[_0x17abfa(0x188)][_0x17abfa(0x13c)](_0x19a65);});}[_0x3c281(0x18c)](){const _0x300ca3=_0x3c281;this[_0x300ca3(0x188)][_0x300ca3(0x15d)](g),this[_0x300ca3(0x188)][_0x300ca3(0x15d)](S);}};$(b,_0x3c281(0x181),W),$(b,_0x3c281(0x143),_0x5b7fe7['UNIVER_UNKNOWN']),b=ie([_0x513514(_0x4a0e2a,_0x254876,_0x30ad46),w(0x1,_0x62d9e6(_0x1f33d8)),w(0x2,_0x2bf430)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x28d8(_0x2e18a7,_0x1c4bd5){const _0xe45183=_0xe451();return _0x28d8=function(_0x28d830,_0x1952ac){_0x28d830=_0x28d830-0x115;let _0x1a0f71=_0xe45183[_0x28d830];return _0x1a0f71;},_0x28d8(_0x2e18a7,_0x1c4bd5);}(function(_0x737da0,_0x2ebf78){const _0x440944=_0x28d8,_0x5deac3=_0x737da0();while(!![]){try{const _0x280ceb=-parseInt(_0x440944(0x130))/0x1+-parseInt(_0x440944(0x17d))/0x2*(parseInt(_0x440944(0x17a))/0x3)+-parseInt(_0x440944(0x173))/0x4*(parseInt(_0x440944(0x135))/0x5)+-parseInt(_0x440944(0x167))/0x6+-parseInt(_0x440944(0x179))/0x7*(parseInt(_0x440944(0x17b))/0x8)+parseInt(_0x440944(0x159))/0x9+parseInt(_0x440944(0x150))/0xa;if(_0x280ceb===_0x2ebf78)break;else _0x5deac3['push'](_0x5deac3['shift']());}catch(_0x246cda){_0x5deac3['push'](_0x5deac3['shift']());}}}(_0xe451,0xd33db),function(_0x56e5c8,_0x3eb2fb){const _0xfe108b=_0x28d8;typeof exports==_0xfe108b(0x160)&&typeof module<'u'?_0x3eb2fb(exports,require('@univerjs-pro/collaboration-client'),require(_0xfe108b(0x15e)),require(_0xfe108b(0x174)),require(_0xfe108b(0x151)),require(_0xfe108b(0x13d)),require(_0xfe108b(0x161)),require(_0xfe108b(0x158))):typeof define==_0xfe108b(0x15b)&&define[_0xfe108b(0x184)]?define([_0xfe108b(0x188),'@univerjs-pro/collaboration-client',_0xfe108b(0x15e),_0xfe108b(0x174),_0xfe108b(0x151),_0xfe108b(0x13d),_0xfe108b(0x161),_0xfe108b(0x158)],_0x3eb2fb):(_0x56e5c8=typeof globalThis<'u'?globalThis:_0x56e5c8||self,_0x3eb2fb(_0x56e5c8[_0xfe108b(0x180)]={},_0x56e5c8['UniverProCollaborationClient'],_0x56e5c8[_0xfe108b(0x183)],_0x56e5c8[_0xfe108b(0x162)],_0x56e5c8['UniverThreadCommentUi'],_0x56e5c8[_0xfe108b(0x178)],_0x56e5c8[_0xfe108b(0x161)],_0x56e5c8[_0xfe108b(0x12a)]));}(this,function(_0x3bc6a7,_0x433cce,_0x1b2383,_0x514b15,_0x561bbe,_0x289cbf,_0x250e03,_0x488e04){'use strict';const _0x39ff1a=_0x28d8;const _0x4e1eaa=_0x39ff1a(0x18d);var _0x299546=(_0x212bf6=>(_0x212bf6[_0x212bf6['OpenOrReOpen']=0x0]=_0x39ff1a(0x125),_0x212bf6[_0x212bf6[_0x39ff1a(0x12e)]=0x1]=_0x39ff1a(0x12e),_0x212bf6[_0x212bf6[_0x39ff1a(0x194)]=-0x1]='UNRECOGNIZED',_0x212bf6))(_0x299546||{}),_0x5fb325=(_0x3fd63b=>(_0x3fd63b[_0x3fd63b[_0x39ff1a(0x168)]=0x0]=_0x39ff1a(0x168),_0x3fd63b[_0x3fd63b['Add']=0x1]=_0x39ff1a(0x153),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x134)]=0x2]=_0x39ff1a(0x134),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x126)]=0x3]=_0x39ff1a(0x126),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x166)]=0x4]=_0x39ff1a(0x166),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x163)]=0x5]=_0x39ff1a(0x163),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x194)]=-0x1]=_0x39ff1a(0x194),_0x3fd63b))(_0x5fb325||{});const _0x261f0d=_0x40603b=>_0x514b15[_0x39ff1a(0x14b)](new Date(+_0x40603b))[_0x39ff1a(0x13b)](_0x39ff1a(0x11a)),_0x2ba4ef=async(_0x16c1a8,_0x30ae07)=>{const _0x2cf05a=_0x39ff1a,_0x37ae9f=_0x16c1a8[_0x2cf05a(0x16b)](_0x514b15[_0x2cf05a(0x147)]),_0x40c3f1=_0x16c1a8[_0x2cf05a(0x16b)](_0x488e04[_0x2cf05a(0x120)]);_0x30ae07['forEach'](_0x48c749=>{_0x37ae9f['getUser'](_0x48c749)&&_0x30ae07['delete'](_0x48c749);}),_0x30ae07[_0x2cf05a(0x136)]&&(await _0x40c3f1[_0x2cf05a(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x30ae07]}}))[_0x2cf05a(0x142)]['users'][_0x2cf05a(0x15c)](_0x581abf=>{const _0x385168=_0x2cf05a;_0x581abf&&_0x37ae9f[_0x385168(0x143)](_0x581abf);});};var _0x3e7340=Object['getOwnPropertyDescriptor'],_0x43b55f=(_0x3e2d90,_0x42c2cc,_0x5bae41,_0xb22255)=>{const _0x3e524c=_0x39ff1a;for(var _0x3a3b7f=_0xb22255>0x1?void 0x0:_0xb22255?_0x3e7340(_0x42c2cc,_0x5bae41):_0x42c2cc,_0x48690a=_0x3e2d90[_0x3e524c(0x118)]-0x1,_0x5b1768;_0x48690a>=0x0;_0x48690a--)(_0x5b1768=_0x3e2d90[_0x48690a])&&(_0x3a3b7f=_0x5b1768(_0x3a3b7f)||_0x3a3b7f);return _0x3a3b7f;},_0x62c980=(_0x18c22c,_0x43fb89)=>(_0x3ec1fa,_0x1833da)=>_0x43fb89(_0x3ec1fa,_0x1833da,_0x18c22c);let _0x52e0e4=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x5f3ab3,_0x2df38e,_0x52008d,_0xa513c7){const _0x56a037=_0x39ff1a;super(),this[_0x56a037(0x175)]=_0x5f3ab3,this[_0x56a037(0x140)]=_0x2df38e,this['_userService']=_0x52008d,this[_0x56a037(0x181)]=_0xa513c7,this[_0x56a037(0x131)](),this[_0x56a037(0x141)]();}[_0x39ff1a(0x141)](){const _0xcc0314=_0x39ff1a;this['disposeWithMe'](this[_0xcc0314(0x140)]['commentUpdate$'][_0xcc0314(0x145)](_0x250e03[_0xcc0314(0x123)](0x10))[_0xcc0314(0x11e)](_0x4557ea=>{const _0xbe4a9f=_0xcc0314,_0x506999=new Set();_0x4557ea[_0xbe4a9f(0x15c)](_0x277ffe=>{const _0x190a29=_0xbe4a9f;switch(_0x277ffe['type']){case _0x190a29(0x17f):{const _0x3288d9=_0x277ffe['payload'][_0x190a29(0x16f)];_0x506999[_0x190a29(0x17f)](_0x3288d9);break;}}}),_0x2ba4ef(this[_0xbe4a9f(0x181)],_0x506999);}));}[_0x39ff1a(0x131)](){const _0x10fab1=_0x39ff1a;this[_0x10fab1(0x18b)](this[_0x10fab1(0x175)]['commentUpdate$'][_0x10fab1(0x11e)](async _0x1175f9=>{const _0x3c4531=_0x10fab1;var _0x3ab5d3,_0x74ea7a,_0x2fd40b,_0x5d4d14;const _0x51b733=(_0x3ab5d3=this[_0x3c4531(0x140)][_0x3c4531(0x177)](_0x1175f9['unitId'])[_0x3c4531(0x154)](_0x6d54f3=>_0x6d54f3[_0x3c4531(0x137)]===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x3ab5d3[_0x3c4531(0x122)];if(!_0x51b733)return;const {unitId:_0x42f872,subUnitId:_0x2a5642}=_0x51b733;switch(_0x1175f9[_0x3c4531(0x18a)]&&this['_userService'][_0x3c4531(0x143)](_0x1175f9[_0x3c4531(0x18a)]),_0x1175f9[_0x3c4531(0x124)]){case _0x5fb325[_0x3c4531(0x153)]:break;case _0x5fb325[_0x3c4531(0x134)]:{this['_threadCommentModel'][_0x3c4531(0x12f)](_0x42f872,_0x2a5642,{'unitId':_0x42f872,'subUnitId':_0x2a5642,'ref':'','id':_0x1175f9[_0x3c4531(0x189)],'dT':_0x261f0d(+_0x1175f9[_0x3c4531(0x14d)]),'threadId':_0x1175f9['threadId'],'personId':(_0x2fd40b=(_0x74ea7a=_0x1175f9[_0x3c4531(0x18a)])==null?void 0x0:_0x74ea7a[_0x3c4531(0x185)])!=null?_0x2fd40b:_0x1175f9[_0x3c4531(0x171)],'text':JSON[_0x3c4531(0x148)](_0x1175f9[_0x3c4531(0x13a)]),'parentId':_0x51b733['id']});break;}case _0x5fb325['Delete']:{const _0x135f5a=this['_threadCommentModel'][_0x3c4531(0x13f)](_0x42f872,_0x2a5642,_0x1175f9[_0x3c4531(0x189)]);_0x135f5a&&_0x135f5a['parentId']&&this[_0x3c4531(0x140)][_0x3c4531(0x182)](_0x42f872,_0x2a5642,_0x1175f9['replyId']);break;}case _0x5fb325['Edit']:{this[_0x3c4531(0x140)][_0x3c4531(0x12d)](_0x42f872,_0x2a5642,{'commentId':_0x1175f9['replyId'],'text':JSON['parse'](_0x1175f9[_0x3c4531(0x13a)])});break;}case _0x5fb325[_0x3c4531(0x163)]:{const _0x5ec84e=(_0x5d4d14=this[_0x3c4531(0x140)]['getUnit'](_0x1175f9[_0x3c4531(0x121)])[_0x3c4531(0x154)](_0xf016b1=>_0xf016b1['threadId']===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x5d4d14[_0x3c4531(0x122)];_0x5ec84e&&this['_threadCommentModel']['resolveComment'](_0x42f872,_0x2a5642,_0x5ec84e['id'],_0x1175f9['solved']===_0x299546[_0x3c4531(0x12e)]);break;}}}));}};_0x52e0e4=_0x43b55f([_0x62c980(0x0,_0x514b15['Inject'](_0x433cce[_0x39ff1a(0x156)])),_0x62c980(0x1,_0x514b15['Inject'](_0x289cbf[_0x39ff1a(0x165)])),_0x62c980(0x2,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x147)])),_0x62c980(0x3,_0x514b15['Inject'](_0x514b15['Injector']))],_0x52e0e4);const _0x32ebf5='thread-comment-data-source.config',_0x4e82a1={};var _0x2ce1e1=Object[_0x39ff1a(0x11f)],_0x32318a=(_0x23b9b2,_0x5d4ced,_0x1e8177,_0x1d7d5b)=>{const _0x1b8973=_0x39ff1a;for(var _0x4fa3c5=_0x1d7d5b>0x1?void 0x0:_0x1d7d5b?_0x2ce1e1(_0x5d4ced,_0x1e8177):_0x5d4ced,_0x2d2cd7=_0x23b9b2[_0x1b8973(0x118)]-0x1,_0x2c78f5;_0x2d2cd7>=0x0;_0x2d2cd7--)(_0x2c78f5=_0x23b9b2[_0x2d2cd7])&&(_0x4fa3c5=_0x2c78f5(_0x4fa3c5)||_0x4fa3c5);return _0x4fa3c5;},_0x1c4644=(_0x3b983c,_0x3b9658)=>(_0x22fd22,_0x356069)=>_0x3b9658(_0x22fd22,_0x356069,_0x3b983c);function _0x1de4da(_0x129b7b,_0x47e127){const _0x112af7=_0x39ff1a,_0x525712=_0x129b7b['replies'][0x0];return{..._0x47e127,'id':_0x525712[_0x112af7(0x189)],'resolved':_0x129b7b[_0x112af7(0x14a)]===0x1,'dT':_0x261f0d(_0x525712[_0x112af7(0x14d)]),'personId':_0x525712[_0x112af7(0x171)],'threadId':_0x525712[_0x112af7(0x137)]};}function _0x909113(_0x539bbd,_0x210351,_0x3f87e1){const _0x3db8f2=_0x39ff1a;var _0x1fa803,_0x5d0fa3;if(((_0x5d0fa3=(_0x1fa803=_0x539bbd==null?void 0x0:_0x539bbd[_0x3db8f2(0x176)])==null?void 0x0:_0x1fa803[_0x3db8f2(0x118)])!=null?_0x5d0fa3:0x0)>0x0){const _0x3ef28d=(_0x2bf431,_0x22d6c4)=>({'id':_0x2bf431[_0x3db8f2(0x189)],'threadId':_0x2bf431[_0x3db8f2(0x137)],'dT':_0x261f0d(_0x2bf431[_0x3db8f2(0x14d)]),'personId':_0x2bf431[_0x3db8f2(0x171)],'resolved':_0x539bbd['solved']===_0x299546[_0x3db8f2(0x12e)],'unitId':_0x210351,'subUnitId':_0x3f87e1,'text':JSON[_0x3db8f2(0x148)](_0x2bf431[_0x3db8f2(0x13a)]),'parentId':_0x22d6c4}),_0x2eb553=_0x3ef28d(_0x539bbd[_0x3db8f2(0x176)][0x0]);return{..._0x2eb553,'children':_0x539bbd[_0x3db8f2(0x176)][_0x3db8f2(0x11b)](0x1)[_0x3db8f2(0x149)](_0x4ddce8=>_0x3ef28d(_0x4ddce8,_0x2eb553['id']))};}return null;}let _0xc24ad0=class{constructor(_0x24026f,_0x5f245d,_0x2ba8d7,_0x17f2ad){const _0x2e0ec3=_0x39ff1a;this[_0x2e0ec3(0x17c)]=_0x24026f,this['_userService']=_0x5f245d,this['_sessionService']=_0x2ba8d7,this[_0x2e0ec3(0x181)]=_0x17f2ad;}async[_0x39ff1a(0x12f)](_0x1f2a98){const _0x38c028=_0x39ff1a;var _0x1720f7,_0x347cb5;const {parentId:_0x4ef067,unitId:_0x166a6d,text:_0x150974,threadId:_0x3e08f6}=_0x1f2a98,_0x500840=(_0x347cb5=(_0x1720f7=_0x150974[_0x38c028(0x18c)])==null?void 0x0:_0x1720f7[_0x38c028(0x127)](_0x8227b6=>_0x8227b6[_0x38c028(0x11d)]===_0x514b15['CustomRangeType'][_0x38c028(0x195)])[_0x38c028(0x149)](_0x145cb4=>_0x145cb4['rangeId']))!=null?_0x347cb5:[],_0x4859ab=JSON[_0x38c028(0x155)](_0x150974),_0x29fdb8=(await this[_0x38c028(0x157)]['requireSession'](_0x166a6d))[_0x38c028(0x16e)]();if(_0x4ef067){const _0x5a1d12={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840,'threadId':_0x3e08f6},_0x51ef3f=(await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/reply',{'body':_0x5a1d12}))[_0x38c028(0x142)][_0x38c028(0x15a)];return{..._0x1f2a98,'id':_0x51ef3f['replyId'],'dT':_0x514b15['dayjs'](+_0x51ef3f[_0x38c028(0x14d)])['format'](_0x38c028(0x11a)),'personId':_0x51ef3f['userId']};}else{const _0x36e0ff={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840},_0x73d9a3=await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/add',{'body':_0x36e0ff});return _0x1de4da(_0x73d9a3[_0x38c028(0x142)][_0x38c028(0x169)],_0x1f2a98);}}async[_0x39ff1a(0x12d)](_0x5a9fe3){const _0x4e620c=_0x39ff1a;var _0x4795ad,_0x26c8a7;const {text:_0x25c4ab,unitId:_0xe7c26a}=_0x5a9fe3,_0x1ec216=(_0x26c8a7=(_0x4795ad=_0x25c4ab['customRanges'])==null?void 0x0:_0x4795ad[_0x4e620c(0x127)](_0x5ab97d=>_0x5ab97d[_0x4e620c(0x11d)]===_0x514b15['CustomRangeType'][_0x4e620c(0x195)])[_0x4e620c(0x149)](_0x12dcdd=>_0x12dcdd[_0x4e620c(0x17e)]))!=null?_0x26c8a7:[],_0x14b51b=JSON[_0x4e620c(0x155)](_0x25c4ab),_0x12f209=_0x5a9fe3[_0x4e620c(0x137)],_0x5cac7e=_0x5a9fe3['id'],_0x426872={'memberId':(await this['_sessionService']['requireSession'](_0xe7c26a))[_0x4e620c(0x16e)](),'unitId':_0xe7c26a,'threadId':_0x12f209,'mention':_0x1ec216,'content':_0x14b51b,'replyId':_0x5cac7e},_0x50e5ea=await this['_httpService'][_0x4e620c(0x138)](_0x4e620c(0x18f)+_0xe7c26a+_0x4e620c(0x14e),{'body':_0x426872});return!_0x50e5ea[_0x4e620c(0x142)]['error']||_0x50e5ea[_0x4e620c(0x142)][_0x4e620c(0x12c)][_0x4e620c(0x193)]===0x1;}async[_0x39ff1a(0x116)](_0x5d8f3f){const _0x33234b=_0x39ff1a,{unitId:_0x3b60bf}=_0x5d8f3f,_0x2a40c9=_0x5d8f3f['threadId'],_0x4bcc0d={'memberId':this[_0x33234b(0x15f)][_0x33234b(0x146)]()[_0x33234b(0x185)],'unitId':_0x3b60bf,'threadId':_0x2a40c9,'solved':_0x5d8f3f[_0x33234b(0x12b)]?_0x299546[_0x33234b(0x12e)]:_0x299546[_0x33234b(0x125)]},_0x33528e=await this[_0x33234b(0x17c)]['post'](_0x33234b(0x18f)+_0x3b60bf+_0x33234b(0x129),{'body':_0x4bcc0d});return!_0x33528e['body']['error']||_0x33528e[_0x33234b(0x142)][_0x33234b(0x12c)][_0x33234b(0x193)]===0x1;}async[_0x39ff1a(0x182)](_0xca75ce,_0x35d151,_0x15dcd2,_0x2c0d7b){const _0x598356=_0x39ff1a,_0x16ef66={'memberId':(await this[_0x598356(0x157)]['requireSession'](_0xca75ce))['getMemberID'](),'threadId':_0x15dcd2,'replyId':_0x2c0d7b,'unitId':_0xca75ce},_0x2c6aad=await this['_httpService'][_0x598356(0x138)](_0x598356(0x18f)+_0xca75ce+_0x598356(0x133),{'body':_0x16ef66});return!_0x2c6aad[_0x598356(0x142)][_0x598356(0x12c)]||_0x2c6aad[_0x598356(0x142)]['error']['code']===0x1;}async['listComments'](_0x9e41a8,_0x22a1ee,_0x30617f){const _0x572724=_0x39ff1a,_0x127b24={'unitId':_0x9e41a8,'threadId':_0x30617f},_0x15eb15=await this['_httpService'][_0x572724(0x138)](_0x572724(0x18f)+_0x9e41a8+_0x572724(0x190),{'body':_0x127b24}),_0x2943e0=_0x30617f[_0x572724(0x149)](_0xab23a0=>_0x909113(_0x15eb15['body'][_0x572724(0x132)][_0xab23a0],_0x9e41a8,_0x22a1ee))[_0x572724(0x127)](Boolean);return Object['values'](_0x15eb15['body'][_0x572724(0x117)])[_0x572724(0x15c)](_0x459b1f=>{const _0x162f58=_0x572724;this[_0x162f58(0x15f)][_0x162f58(0x143)](_0x459b1f);}),_0x2943e0;}['saveCommentToSnapshot'](_0x2873ec){const _0x10c9eb=_0x39ff1a;return{'id':_0x2873ec['id'],'threadId':_0x2873ec[_0x10c9eb(0x137)],'ref':_0x2873ec[_0x10c9eb(0x16d)]};}};_0xc24ad0=_0x32318a([_0x1c4644(0x0,_0x514b15[_0x39ff1a(0x144)](_0x488e04[_0x39ff1a(0x120)])),_0x1c4644(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['UserManagerService'])),_0x1c4644(0x2,_0x514b15[_0x39ff1a(0x144)](_0x433cce[_0x39ff1a(0x14c)])),_0x1c4644(0x3,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x16a)]))],_0xc24ad0);var _0x3e8732=Object[_0x39ff1a(0x11f)],_0x295c63=(_0x31f1b2,_0x3dea74,_0x5b028f,_0x5337a6)=>{const _0x29e976=_0x39ff1a;for(var _0x3fb7b6=_0x5337a6>0x1?void 0x0:_0x5337a6?_0x3e8732(_0x3dea74,_0x5b028f):_0x3dea74,_0x3bf6e6=_0x31f1b2[_0x29e976(0x118)]-0x1,_0x493d50;_0x3bf6e6>=0x0;_0x3bf6e6--)(_0x493d50=_0x31f1b2[_0x3bf6e6])&&(_0x3fb7b6=_0x493d50(_0x3fb7b6)||_0x3fb7b6);return _0x3fb7b6;},_0x36e747=(_0x1252c7,_0x1148cb)=>(_0x3888bd,_0xbb72ce)=>_0x1148cb(_0x3888bd,_0xbb72ce,_0x1252c7);let _0xce4b48=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x568040,_0x4d1166){const _0x4a2326=_0x39ff1a;super(),this[_0x4a2326(0x191)]=_0x568040,this['_threadCommentDataSource']=_0x4d1166,this['_initDataSource']();}[_0x39ff1a(0x15d)](){const _0x54159b=_0x39ff1a;this[_0x54159b(0x191)]['dataSource']=this[_0x54159b(0x16c)],this[_0x54159b(0x191)]['syncUpdateMutationToColla']=!0x1;}};_0xce4b48=_0x295c63([_0x36e747(0x0,_0x289cbf[_0x39ff1a(0x13c)]),_0x36e747(0x1,_0x514b15[_0x39ff1a(0x144)](_0xc24ad0))],_0xce4b48);var _0x4c7c2f=Object[_0x39ff1a(0x115)],_0x5d2e2b=Object[_0x39ff1a(0x11f)],_0xe8cb57=(_0x19a10a,_0x228aa3,_0x35eab3)=>_0x228aa3 in _0x19a10a?_0x4c7c2f(_0x19a10a,_0x228aa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35eab3}):_0x19a10a[_0x228aa3]=_0x35eab3,_0x58fa7b=(_0x1c1a31,_0x28d79a,_0x563487,_0x34197b)=>{const _0x5329ad=_0x39ff1a;for(var _0x46326a=_0x34197b>0x1?void 0x0:_0x34197b?_0x5d2e2b(_0x28d79a,_0x563487):_0x28d79a,_0x484530=_0x1c1a31[_0x5329ad(0x118)]-0x1,_0x207d85;_0x484530>=0x0;_0x484530--)(_0x207d85=_0x1c1a31[_0x484530])&&(_0x46326a=_0x207d85(_0x46326a)||_0x46326a);return _0x46326a;},_0x45423c=(_0x4fd6a5,_0x408011)=>(_0x43ea0c,_0x562c54)=>_0x408011(_0x43ea0c,_0x562c54,_0x4fd6a5),_0x1b9ecd=(_0x27fb26,_0x381767,_0x41265f)=>_0xe8cb57(_0x27fb26,typeof _0x381767!=_0x39ff1a(0x11c)?_0x381767+'':_0x381767,_0x41265f);_0x3bc6a7['UniverThreadCommentDataSourcePlugin']=class extends _0x514b15[_0x39ff1a(0x172)]{constructor(_0x198908=_0x4e82a1,_0x33cb24,_0x578cd2){const _0x12963a=_0x39ff1a;super(),this[_0x12963a(0x119)]=_0x198908,this[_0x12963a(0x181)]=_0x33cb24,this[_0x12963a(0x186)]=_0x578cd2;const {..._0x352027}=_0x514b15['merge']({},_0x4e82a1,this[_0x12963a(0x119)]);this[_0x12963a(0x186)][_0x12963a(0x170)](_0x32ebf5,_0x352027);}[_0x39ff1a(0x128)](){const _0x2e6d0a=_0x39ff1a;[[_0xc24ad0],[_0xce4b48],[_0x52e0e4]][_0x2e6d0a(0x15c)](_0x38e6a9=>{this['_injector']['add'](_0x38e6a9);});}['onReady'](){const _0x29da50=_0x39ff1a;this[_0x29da50(0x181)][_0x29da50(0x16b)](_0xce4b48),this[_0x29da50(0x181)][_0x29da50(0x16b)](_0x52e0e4);}},_0x1b9ecd(_0x3bc6a7['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4e1eaa),_0x1b9ecd(_0x3bc6a7[_0x39ff1a(0x139)],_0x39ff1a(0x124),_0x514b15['UniverInstanceType'][_0x39ff1a(0x196)]),_0x3bc6a7[_0x39ff1a(0x139)]=_0x58fa7b([_0x514b15['DependentOn'](_0x561bbe[_0x39ff1a(0x13e)],_0x433cce[_0x39ff1a(0x192)],_0x1b2383[_0x39ff1a(0x14f)]),_0x45423c(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['Injector'])),_0x45423c(0x2,_0x514b15[_0x39ff1a(0x18e)])],_0x3bc6a7['UniverThreadCommentDataSourcePlugin']),Object[_0x39ff1a(0x115)](_0x3bc6a7,Symbol[_0x39ff1a(0x187)],{'value':_0x39ff1a(0x152)});}));function _0xe451(){const _0x1bda40=['resolveComment','users','length','_config','YYYY/MM/DD\x20HH:mm','slice','symbol','rangeType','subscribe','getOwnPropertyDescriptor','HTTPService','unitId','root','bufferTime','type','OpenOrReOpen','Edit','filter','onStarting','/solved','UniverNetwork','resolved','error','updateComment','Solved','addComment','1108509bhQbDs','_init','comments','/delete','Reply','155QEVSbh','size','threadId','post','UniverThreadCommentDataSourcePlugin','content','format','IThreadCommentDataSourceService','@univerjs/thread-comment','UniverThreadCommentUIPlugin','getComment','_threadCommentModel','_initUserSync','body','addUser','Inject','pipe','getCurrentUser','UserManagerService','parse','map','solved','dayjs','CollaborationSessionService','createTimestamp','/edit','UniverLicensePlugin','46848700YClbAh','@univerjs/thread-comment-ui','Module','Add','find','stringify','CommentService','_sessionService','@univerjs/network','3832911jGSiKB','reply','function','forEach','_initDataSource','@univerjs-pro/license','_userService','object','rxjs','UniverCore','Solve','Disposable','ThreadCommentModel','Delete','5526948swRozM','Unknown','comment','Injector','get','_threadCommentDataSource','ref','getMemberID','personId','setConfig','userId','Plugin','175196xsjvlw','@univerjs/core','_commentService','replies','getUnit','UniverThreadComment','19369URKQPz','141QTFfyu','952dOunuF','_httpService','22502dOOGLQ','rangeId','add','UniverProThreadCommentDatasource','_injector','deleteComment','UniverProLicense','amd','userID','_configService','toStringTag','exports','replyId','user','disposeWithMe','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','/universer-api/comment/unit/','/list','_threadCommentDataSourceService','UniverCollaborationClientPlugin','code','UNRECOGNIZED','COMMENT','UNIVER_UNKNOWN','defineProperty'];_0xe451=function(){return _0x1bda40;};return _0xe451();}
|
|
1
|
+
(function(_0x49fa1c,_0x1aeeb1){const _0x4239fc=_0x2057,_0x1f924b=_0x49fa1c();while(!![]){try{const _0xd15132=parseInt(_0x4239fc(0x15d))/0x1*(-parseInt(_0x4239fc(0x190))/0x2)+parseInt(_0x4239fc(0x18f))/0x3*(-parseInt(_0x4239fc(0x160))/0x4)+-parseInt(_0x4239fc(0x130))/0x5*(-parseInt(_0x4239fc(0x121))/0x6)+parseInt(_0x4239fc(0x17c))/0x7*(parseInt(_0x4239fc(0x195))/0x8)+parseInt(_0x4239fc(0x143))/0x9*(-parseInt(_0x4239fc(0x135))/0xa)+parseInt(_0x4239fc(0x18c))/0xb*(parseInt(_0x4239fc(0x162))/0xc)+parseInt(_0x4239fc(0x11d))/0xd*(-parseInt(_0x4239fc(0x18b))/0xe);if(_0xd15132===_0x1aeeb1)break;else _0x1f924b['push'](_0x1f924b['shift']());}catch(_0x5a47c4){_0x1f924b['push'](_0x1f924b['shift']());}}}(_0x5760,0x8c010),function(_0x18033f,_0xee7de5){const _0x10cf19=_0x2057;typeof exports=='object'&&typeof module<'u'?_0xee7de5(exports,require('@univerjs-pro/collaboration-client'),require(_0x10cf19(0x159)),require('@univerjs/core'),require(_0x10cf19(0x189)),require(_0x10cf19(0x177)),require('rxjs'),require(_0x10cf19(0x12d))):typeof define==_0x10cf19(0x146)&&define[_0x10cf19(0x136)]?define([_0x10cf19(0x120),_0x10cf19(0x142),'@univerjs-pro/license',_0x10cf19(0x13b),_0x10cf19(0x189),_0x10cf19(0x177),_0x10cf19(0x141),'@univerjs/network'],_0xee7de5):(_0x18033f=typeof globalThis<'u'?globalThis:_0x18033f||self,_0xee7de5(_0x18033f[_0x10cf19(0x144)]={},_0x18033f[_0x10cf19(0x145)],_0x18033f[_0x10cf19(0x155)],_0x18033f[_0x10cf19(0x163)],_0x18033f[_0x10cf19(0x13a)],_0x18033f[_0x10cf19(0x153)],_0x18033f[_0x10cf19(0x141)],_0x18033f[_0x10cf19(0x174)]));}(this,function(_0x50604a,_0xf19672,_0x23383b,_0x5ad25b,_0x12ceec,_0x3d8f57,_0x254147,_0x3e73bd){'use strict';const _0x187b52=_0x2057;const _0x2e0783='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x5bc3fb=(_0x37328e=>(_0x37328e[_0x37328e['OpenOrReOpen']=0x0]=_0x187b52(0x180),_0x37328e[_0x37328e[_0x187b52(0x187)]=0x1]=_0x187b52(0x187),_0x37328e[_0x37328e[_0x187b52(0x134)]=-0x1]=_0x187b52(0x134),_0x37328e))(_0x5bc3fb||{}),_0x4a3867=(_0x5382b2=>(_0x5382b2[_0x5382b2[_0x187b52(0x17f)]=0x0]=_0x187b52(0x17f),_0x5382b2[_0x5382b2[_0x187b52(0x10a)]=0x1]=_0x187b52(0x10a),_0x5382b2[_0x5382b2[_0x187b52(0x12f)]=0x2]=_0x187b52(0x12f),_0x5382b2[_0x5382b2[_0x187b52(0x110)]=0x3]='Edit',_0x5382b2[_0x5382b2['Delete']=0x4]=_0x187b52(0x13f),_0x5382b2[_0x5382b2['Solve']=0x5]=_0x187b52(0x169),_0x5382b2[_0x5382b2['UNRECOGNIZED']=-0x1]=_0x187b52(0x134),_0x5382b2))(_0x4a3867||{});const _0x5608ed=_0x849151=>_0x5ad25b[_0x187b52(0x188)](new Date(+_0x849151))[_0x187b52(0x181)](_0x187b52(0x140)),_0x20b559=async(_0x441627,_0x534769)=>{const _0x8dfa5f=_0x187b52,_0x50c5ce=_0x441627[_0x8dfa5f(0x16f)](_0x5ad25b[_0x8dfa5f(0x10c)]),_0xddbf34=_0x441627['get'](_0x3e73bd['HTTPService']);_0x534769['forEach'](_0x2426c0=>{const _0x4a71f4=_0x8dfa5f;_0x50c5ce[_0x4a71f4(0x194)](_0x2426c0)&&_0x534769['delete'](_0x2426c0);}),_0x534769['size']&&(await _0xddbf34[_0x8dfa5f(0x16f)](_0x8dfa5f(0x184),{'params':{'userIDs':[..._0x534769]}}))['body'][_0x8dfa5f(0x154)][_0x8dfa5f(0x12b)](_0xbbf76=>{const _0x1fb24f=_0x8dfa5f;_0xbbf76&&_0x50c5ce[_0x1fb24f(0x12e)](_0xbbf76);});};var _0x5ed0d0=Object[_0x187b52(0x11c)],_0x198c27=(_0x220006,_0x34a94f,_0x5a5a1d,_0x1d5b67)=>{for(var _0x588228=_0x1d5b67>0x1?void 0x0:_0x1d5b67?_0x5ed0d0(_0x34a94f,_0x5a5a1d):_0x34a94f,_0x54a7c8=_0x220006['length']-0x1,_0x128cfc;_0x54a7c8>=0x0;_0x54a7c8--)(_0x128cfc=_0x220006[_0x54a7c8])&&(_0x588228=_0x128cfc(_0x588228)||_0x588228);return _0x588228;},_0x2f43b3=(_0x42af30,_0x433174)=>(_0x533222,_0x60510d)=>_0x433174(_0x533222,_0x60510d,_0x42af30);let _0x2eeec9=class extends _0x5ad25b[_0x187b52(0x171)]{constructor(_0x3aa5a3,_0x5f5df6,_0x95eb1b,_0x35548a){const _0x2b5506=_0x187b52;super(),this[_0x2b5506(0x10d)]=_0x3aa5a3,this[_0x2b5506(0x173)]=_0x5f5df6,this[_0x2b5506(0x172)]=_0x95eb1b,this['_injector']=_0x35548a,this[_0x2b5506(0x115)](),this['_initUserSync']();}[_0x187b52(0x16e)](){const _0x51ab84=_0x187b52;this[_0x51ab84(0x18d)](this[_0x51ab84(0x173)]['commentUpdate$'][_0x51ab84(0x116)](_0x254147[_0x51ab84(0x13c)](0x10))[_0x51ab84(0x10b)](_0x2e670b=>{const _0x1fb069=_0x51ab84,_0x2efaab=new Set();_0x2e670b[_0x1fb069(0x12b)](_0x2ff3b6=>{const _0xe1299d=_0x1fb069;switch(_0x2ff3b6['type']){case'add':{const _0x2161b1=_0x2ff3b6[_0xe1299d(0x151)]['personId'];_0x2efaab[_0xe1299d(0x111)](_0x2161b1);break;}}}),_0x20b559(this[_0x1fb069(0x14c)],_0x2efaab);}));}['_init'](){const _0x4b0877=_0x187b52;this[_0x4b0877(0x18d)](this[_0x4b0877(0x10d)][_0x4b0877(0x16b)][_0x4b0877(0x10b)](async _0x596f4a=>{const _0x5939cb=_0x4b0877;var _0x4c98a3,_0xd32ecc,_0x3abd88,_0x39f467;const _0x2c4780=(_0x4c98a3=this[_0x5939cb(0x173)]['getUnit'](_0x596f4a[_0x5939cb(0x175)])[_0x5939cb(0x14b)](_0x235e7a=>_0x235e7a['threadId']===_0x596f4a[_0x5939cb(0x119)]))==null?void 0x0:_0x4c98a3[_0x5939cb(0x133)];if(!_0x2c4780)return;const {unitId:_0x582864,subUnitId:_0x2301a5}=_0x2c4780;switch(_0x596f4a['user']&&this[_0x5939cb(0x172)][_0x5939cb(0x12e)](_0x596f4a[_0x5939cb(0x17d)]),_0x596f4a[_0x5939cb(0x129)]){case _0x4a3867[_0x5939cb(0x10a)]:break;case _0x4a3867[_0x5939cb(0x12f)]:{this['_threadCommentModel'][_0x5939cb(0x15b)](_0x582864,_0x2301a5,{'unitId':_0x582864,'subUnitId':_0x2301a5,'ref':'','id':_0x596f4a[_0x5939cb(0x132)],'dT':_0x5608ed(+_0x596f4a[_0x5939cb(0x16c)]),'threadId':_0x596f4a[_0x5939cb(0x119)],'personId':(_0x3abd88=(_0xd32ecc=_0x596f4a[_0x5939cb(0x17d)])==null?void 0x0:_0xd32ecc['userID'])!=null?_0x3abd88:_0x596f4a['userId'],'text':JSON['parse'](_0x596f4a[_0x5939cb(0x186)]),'parentId':_0x2c4780['id']});break;}case _0x4a3867[_0x5939cb(0x13f)]:{const _0x206f11=this[_0x5939cb(0x173)][_0x5939cb(0x149)](_0x582864,_0x2301a5,_0x596f4a[_0x5939cb(0x132)]);_0x206f11&&_0x206f11[_0x5939cb(0x161)]&&this[_0x5939cb(0x173)][_0x5939cb(0x13e)](_0x582864,_0x2301a5,_0x596f4a['replyId']);break;}case _0x4a3867['Edit']:{this[_0x5939cb(0x173)][_0x5939cb(0x16a)](_0x582864,_0x2301a5,{'commentId':_0x596f4a['replyId'],'text':JSON[_0x5939cb(0x114)](_0x596f4a[_0x5939cb(0x186)])});break;}case _0x4a3867[_0x5939cb(0x169)]:{const _0x32e5b4=(_0x39f467=this[_0x5939cb(0x173)][_0x5939cb(0x112)](_0x596f4a[_0x5939cb(0x175)])['find'](_0x2e01c8=>_0x2e01c8[_0x5939cb(0x119)]===_0x596f4a[_0x5939cb(0x119)]))==null?void 0x0:_0x39f467[_0x5939cb(0x133)];_0x32e5b4&&this[_0x5939cb(0x173)]['resolveComment'](_0x582864,_0x2301a5,_0x32e5b4['id'],_0x596f4a[_0x5939cb(0x124)]===_0x5bc3fb[_0x5939cb(0x187)]);break;}}}));}};_0x2eeec9=_0x198c27([_0x2f43b3(0x0,_0x5ad25b[_0x187b52(0x10f)](_0xf19672['CommentService'])),_0x2f43b3(0x1,_0x5ad25b[_0x187b52(0x10f)](_0x3d8f57[_0x187b52(0x148)])),_0x2f43b3(0x2,_0x5ad25b['Inject'](_0x5ad25b[_0x187b52(0x10c)])),_0x2f43b3(0x3,_0x5ad25b[_0x187b52(0x10f)](_0x5ad25b[_0x187b52(0x18a)]))],_0x2eeec9);const _0x3ce4b3='thread-comment-data-source.config',_0x122fae={};var _0x1f7fb8=Object[_0x187b52(0x11c)],_0x6ee811=(_0x2c0666,_0x10b07f,_0x406a7b,_0x126454)=>{for(var _0x5f5a18=_0x126454>0x1?void 0x0:_0x126454?_0x1f7fb8(_0x10b07f,_0x406a7b):_0x10b07f,_0x4bd796=_0x2c0666['length']-0x1,_0x3f1d4f;_0x4bd796>=0x0;_0x4bd796--)(_0x3f1d4f=_0x2c0666[_0x4bd796])&&(_0x5f5a18=_0x3f1d4f(_0x5f5a18)||_0x5f5a18);return _0x5f5a18;},_0x14df67=(_0x5c8656,_0x12672f)=>(_0x34173c,_0x3f7b3e)=>_0x12672f(_0x34173c,_0x3f7b3e,_0x5c8656);function _0x57b871(_0x46b8d8,_0x1ffc8b){const _0x32d039=_0x187b52,_0x434f7d=_0x46b8d8[_0x32d039(0x131)][0x0];return{..._0x1ffc8b,'id':_0x434f7d[_0x32d039(0x132)],'resolved':_0x46b8d8[_0x32d039(0x124)]===0x1,'dT':_0x5608ed(_0x434f7d[_0x32d039(0x16c)]),'personId':_0x434f7d[_0x32d039(0x11e)],'threadId':_0x434f7d[_0x32d039(0x119)]};}function _0x4e8109(_0x56deed,_0x18721f,_0x388fa){const _0x3097e2=_0x187b52;var _0x165a7c,_0x49fd03;if(((_0x49fd03=(_0x165a7c=_0x56deed==null?void 0x0:_0x56deed['replies'])==null?void 0x0:_0x165a7c['length'])!=null?_0x49fd03:0x0)>0x0){const _0xc23af0=(_0x318a52,_0x5274d1)=>({'id':_0x318a52[_0x3097e2(0x132)],'threadId':_0x318a52['threadId'],'dT':_0x5608ed(_0x318a52[_0x3097e2(0x16c)]),'personId':_0x318a52['userId'],'resolved':_0x56deed[_0x3097e2(0x124)]===_0x5bc3fb[_0x3097e2(0x187)],'unitId':_0x18721f,'subUnitId':_0x388fa,'text':JSON[_0x3097e2(0x114)](_0x318a52['content']),'parentId':_0x5274d1}),_0x1911ac=_0xc23af0(_0x56deed['replies'][0x0]);return{..._0x1911ac,'children':_0x56deed[_0x3097e2(0x131)][_0x3097e2(0x14a)](0x1)[_0x3097e2(0x123)](_0x323e1d=>_0xc23af0(_0x323e1d,_0x1911ac['id']))};}return null;}let _0x3977e4=class{constructor(_0x55692b,_0x11b711,_0x5ebcb7,_0xe3f6ae){const _0x24a8cc=_0x187b52;this[_0x24a8cc(0x178)]=_0x55692b,this[_0x24a8cc(0x172)]=_0x11b711,this[_0x24a8cc(0x17a)]=_0x5ebcb7,this[_0x24a8cc(0x14c)]=_0xe3f6ae;}async[_0x187b52(0x15b)](_0x4e952b){const _0x1916f1=_0x187b52;var _0x234bc5,_0xb7cc2f;const {parentId:_0x31017f,unitId:_0x235c77,text:_0x2e61a9,threadId:_0x3f2ce0}=_0x4e952b,_0x2af599=(_0xb7cc2f=(_0x234bc5=_0x2e61a9[_0x1916f1(0x166)])==null?void 0x0:_0x234bc5[_0x1916f1(0x193)](_0x4acb17=>_0x4acb17['rangeType']===_0x5ad25b[_0x1916f1(0x18e)][_0x1916f1(0x13d)])[_0x1916f1(0x123)](_0x573786=>_0x573786[_0x1916f1(0x170)]))!=null?_0xb7cc2f:[],_0x4eb006=JSON[_0x1916f1(0x15a)](_0x2e61a9),_0x48fc2e=(await this['_sessionService']['requireSession'](_0x235c77))[_0x1916f1(0x122)]();if(_0x31017f){const _0x2537a7={'memberId':_0x48fc2e,'unitId':_0x235c77,'content':_0x4eb006,'mention':_0x2af599,'threadId':_0x3f2ce0},_0x20e297=(await this[_0x1916f1(0x178)][_0x1916f1(0x113)](_0x1916f1(0x179)+_0x235c77+'/reply',{'body':_0x2537a7}))[_0x1916f1(0x15e)][_0x1916f1(0x17e)];return{..._0x4e952b,'id':_0x20e297[_0x1916f1(0x132)],'dT':_0x5ad25b[_0x1916f1(0x188)](+_0x20e297[_0x1916f1(0x16c)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x20e297[_0x1916f1(0x11e)]};}else{const _0x5e674f={'memberId':_0x48fc2e,'unitId':_0x235c77,'content':_0x4eb006,'mention':_0x2af599},_0x245efb=await this[_0x1916f1(0x178)][_0x1916f1(0x113)]('/universer-api/comment/unit/'+_0x235c77+'/add',{'body':_0x5e674f});return _0x57b871(_0x245efb[_0x1916f1(0x15e)][_0x1916f1(0x11f)],_0x4e952b);}}async[_0x187b52(0x16a)](_0x295c05){const _0x2d46fa=_0x187b52;var _0x508d61,_0x49a1d0;const {text:_0x196b99,unitId:_0x37dd95}=_0x295c05,_0x40d84=(_0x49a1d0=(_0x508d61=_0x196b99[_0x2d46fa(0x166)])==null?void 0x0:_0x508d61[_0x2d46fa(0x193)](_0x51d640=>_0x51d640[_0x2d46fa(0x11a)]===_0x5ad25b['CustomRangeType'][_0x2d46fa(0x13d)])['map'](_0xcd143e=>_0xcd143e[_0x2d46fa(0x170)]))!=null?_0x49a1d0:[],_0x554e3a=JSON[_0x2d46fa(0x15a)](_0x196b99),_0x512707=_0x295c05['threadId'],_0x20a94c=_0x295c05['id'],_0xca6824={'memberId':(await this['_sessionService']['requireSession'](_0x37dd95))[_0x2d46fa(0x122)](),'unitId':_0x37dd95,'threadId':_0x512707,'mention':_0x40d84,'content':_0x554e3a,'replyId':_0x20a94c},_0x3698d1=await this[_0x2d46fa(0x178)][_0x2d46fa(0x113)](_0x2d46fa(0x179)+_0x37dd95+'/edit',{'body':_0xca6824});return!_0x3698d1[_0x2d46fa(0x15e)]['error']||_0x3698d1[_0x2d46fa(0x15e)][_0x2d46fa(0x12c)][_0x2d46fa(0x15c)]===0x1;}async[_0x187b52(0x157)](_0x2e101a){const _0x535f5e=_0x187b52,{unitId:_0x40d75a}=_0x2e101a,_0x94366d=_0x2e101a[_0x535f5e(0x119)],_0x1f517e={'memberId':this[_0x535f5e(0x172)]['getCurrentUser']()[_0x535f5e(0x168)],'unitId':_0x40d75a,'threadId':_0x94366d,'solved':_0x2e101a[_0x535f5e(0x185)]?_0x5bc3fb['Solved']:_0x5bc3fb[_0x535f5e(0x180)]},_0xab21a6=await this['_httpService'][_0x535f5e(0x113)](_0x535f5e(0x179)+_0x40d75a+'/solved',{'body':_0x1f517e});return!_0xab21a6['body']['error']||_0xab21a6[_0x535f5e(0x15e)][_0x535f5e(0x12c)][_0x535f5e(0x15c)]===0x1;}async[_0x187b52(0x13e)](_0x184f58,_0x434bf7,_0x34285b,_0x1da156){const _0x49b9b8=_0x187b52,_0xeb5dd={'memberId':(await this[_0x49b9b8(0x17a)][_0x49b9b8(0x10e)](_0x184f58))[_0x49b9b8(0x122)](),'threadId':_0x34285b,'replyId':_0x1da156,'unitId':_0x184f58},_0x32ae3b=await this[_0x49b9b8(0x178)]['post'](_0x49b9b8(0x179)+_0x184f58+_0x49b9b8(0x192),{'body':_0xeb5dd});return!_0x32ae3b[_0x49b9b8(0x15e)][_0x49b9b8(0x12c)]||_0x32ae3b[_0x49b9b8(0x15e)][_0x49b9b8(0x12c)][_0x49b9b8(0x15c)]===0x1;}async[_0x187b52(0x15f)](_0x15d6a9,_0x128538,_0x40e46e){const _0x17b216=_0x187b52,_0x4a319d={'unitId':_0x15d6a9,'threadId':_0x40e46e},_0x431bfb=await this['_httpService'][_0x17b216(0x113)](_0x17b216(0x179)+_0x15d6a9+'/list',{'body':_0x4a319d}),_0x9e7c68=_0x40e46e['map'](_0x3cfb44=>_0x4e8109(_0x431bfb[_0x17b216(0x15e)][_0x17b216(0x117)][_0x3cfb44],_0x15d6a9,_0x128538))[_0x17b216(0x193)](Boolean);return Object[_0x17b216(0x17b)](_0x431bfb[_0x17b216(0x15e)][_0x17b216(0x154)])['forEach'](_0x1fca4a=>{const _0xf6daf1=_0x17b216;this[_0xf6daf1(0x172)][_0xf6daf1(0x12e)](_0x1fca4a);}),_0x9e7c68;}[_0x187b52(0x150)](_0x3092fe){const _0x1574f0=_0x187b52;return{'id':_0x3092fe['id'],'threadId':_0x3092fe[_0x1574f0(0x119)],'ref':_0x3092fe[_0x1574f0(0x118)]};}};_0x3977e4=_0x6ee811([_0x14df67(0x0,_0x5ad25b['Inject'](_0x3e73bd[_0x187b52(0x16d)])),_0x14df67(0x1,_0x5ad25b['Inject'](_0x5ad25b[_0x187b52(0x10c)])),_0x14df67(0x2,_0x5ad25b[_0x187b52(0x10f)](_0xf19672[_0x187b52(0x165)])),_0x14df67(0x3,_0x5ad25b[_0x187b52(0x10f)](_0x5ad25b['Injector']))],_0x3977e4);var _0x3efd35=Object[_0x187b52(0x11c)],_0x284815=(_0x259214,_0x1365d0,_0x434e5d,_0x267e5f)=>{const _0x478778=_0x187b52;for(var _0x57ecce=_0x267e5f>0x1?void 0x0:_0x267e5f?_0x3efd35(_0x1365d0,_0x434e5d):_0x1365d0,_0x1ee21a=_0x259214[_0x478778(0x191)]-0x1,_0x14774f;_0x1ee21a>=0x0;_0x1ee21a--)(_0x14774f=_0x259214[_0x1ee21a])&&(_0x57ecce=_0x14774f(_0x57ecce)||_0x57ecce);return _0x57ecce;},_0x2bfdbf=(_0x46e366,_0x4eb082)=>(_0x2a3341,_0x5a43ba)=>_0x4eb082(_0x2a3341,_0x5a43ba,_0x46e366);let _0x4dfbdd=class extends _0x5ad25b[_0x187b52(0x171)]{constructor(_0x7c0be6,_0x224358){const _0x11be1e=_0x187b52;super(),this[_0x11be1e(0x126)]=_0x7c0be6,this[_0x11be1e(0x125)]=_0x224358,this[_0x11be1e(0x11b)]();}['_initDataSource'](){const _0x30b515=_0x187b52;this['_threadCommentDataSourceService'][_0x30b515(0x167)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x30b515(0x14e)]=!0x1;}};_0x4dfbdd=_0x284815([_0x2bfdbf(0x0,_0x3d8f57[_0x187b52(0x139)]),_0x2bfdbf(0x1,_0x5ad25b[_0x187b52(0x10f)](_0x3977e4))],_0x4dfbdd);var _0x2a19a8=Object[_0x187b52(0x14d)],_0x89884b=Object['getOwnPropertyDescriptor'],_0x3c4107=(_0x2f9a08,_0x3979e0,_0x525a35)=>_0x3979e0 in _0x2f9a08?_0x2a19a8(_0x2f9a08,_0x3979e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x525a35}):_0x2f9a08[_0x3979e0]=_0x525a35,_0x546dd1=(_0x5ca13a,_0x301a29,_0x45c37e,_0x2bbbd5)=>{const _0x24a486=_0x187b52;for(var _0x4370d1=_0x2bbbd5>0x1?void 0x0:_0x2bbbd5?_0x89884b(_0x301a29,_0x45c37e):_0x301a29,_0x380525=_0x5ca13a[_0x24a486(0x191)]-0x1,_0xd8be6b;_0x380525>=0x0;_0x380525--)(_0xd8be6b=_0x5ca13a[_0x380525])&&(_0x4370d1=_0xd8be6b(_0x4370d1)||_0x4370d1);return _0x4370d1;},_0x22e0a0=(_0x346932,_0x3567b2)=>(_0x20b430,_0x8ac8f0)=>_0x3567b2(_0x20b430,_0x8ac8f0,_0x346932),_0x47f651=(_0x53c6a1,_0x2f00e3,_0x5156c1)=>_0x3c4107(_0x53c6a1,typeof _0x2f00e3!=_0x187b52(0x182)?_0x2f00e3+'':_0x2f00e3,_0x5156c1);_0x50604a['UniverThreadCommentDataSourcePlugin']=class extends _0x5ad25b['Plugin']{constructor(_0x41306c=_0x122fae,_0x57fb9f,_0x5918b8){const _0x22ee75=_0x187b52;super(),this[_0x22ee75(0x156)]=_0x41306c,this[_0x22ee75(0x14c)]=_0x57fb9f,this[_0x22ee75(0x14f)]=_0x5918b8;const {..._0xa36933}=_0x5ad25b[_0x22ee75(0x127)]({},_0x122fae,this[_0x22ee75(0x156)]);this['_configService'][_0x22ee75(0x128)](_0x3ce4b3,_0xa36933);}['onStarting'](){const _0x1eb306=_0x187b52;[[_0x3977e4],[_0x4dfbdd],[_0x2eeec9]][_0x1eb306(0x12b)](_0x26a4a3=>{this['_injector']['add'](_0x26a4a3);});}[_0x187b52(0x164)](){const _0x14fb04=_0x187b52;this[_0x14fb04(0x14c)][_0x14fb04(0x16f)](_0x4dfbdd),this[_0x14fb04(0x14c)][_0x14fb04(0x16f)](_0x2eeec9);}},_0x47f651(_0x50604a['UniverThreadCommentDataSourcePlugin'],_0x187b52(0x137),_0x2e0783),_0x47f651(_0x50604a['UniverThreadCommentDataSourcePlugin'],_0x187b52(0x129),_0x5ad25b[_0x187b52(0x152)][_0x187b52(0x183)]),_0x50604a[_0x187b52(0x12a)]=_0x546dd1([_0x5ad25b[_0x187b52(0x138)](_0x12ceec['UniverThreadCommentUIPlugin'],_0xf19672['UniverCollaborationClientPlugin'],_0x23383b[_0x187b52(0x176)]),_0x22e0a0(0x1,_0x5ad25b[_0x187b52(0x10f)](_0x5ad25b[_0x187b52(0x18a)])),_0x22e0a0(0x2,_0x5ad25b[_0x187b52(0x147)])],_0x50604a[_0x187b52(0x12a)]),Object[_0x187b52(0x14d)](_0x50604a,Symbol[_0x187b52(0x158)],{'value':'Module'});}));function _0x2057(_0x2bb9e9,_0x1d1e1d){const _0x576097=_0x5760();return _0x2057=function(_0x205759,_0x1fceca){_0x205759=_0x205759-0x10a;let _0x2cb18a=_0x576097[_0x205759];return _0x2cb18a;},_0x2057(_0x2bb9e9,_0x1d1e1d);}function _0x5760(){const _0x4ed170=['UniverProThreadCommentDatasource','UniverProCollaborationClient','function','IConfigService','ThreadCommentModel','getComment','slice','find','_injector','defineProperty','syncUpdateMutationToColla','_configService','saveCommentToSnapshot','payload','UniverInstanceType','UniverThreadComment','users','UniverProLicense','_config','resolveComment','toStringTag','@univerjs-pro/license','stringify','addComment','code','73739PWokQa','body','listComments','1743028zOypPU','parentId','25104moXnOS','UniverCore','onReady','CollaborationSessionService','customRanges','dataSource','userID','Solve','updateComment','commentUpdate$','createTimestamp','HTTPService','_initUserSync','get','rangeId','Disposable','_userService','_threadCommentModel','UniverNetwork','unitId','UniverLicensePlugin','@univerjs/thread-comment','_httpService','/universer-api/comment/unit/','_sessionService','values','7qxdcZr','user','reply','Unknown','OpenOrReOpen','format','symbol','UNIVER_UNKNOWN','/universer-api/user/list','resolved','content','Solved','dayjs','@univerjs/thread-comment-ui','Injector','2912TegBZo','5027xQyihC','disposeWithMe','CustomRangeType','3KTyMVc','6rcqEeo','length','/delete','filter','getUser','4408088xsXnpm','Add','subscribe','UserManagerService','_commentService','requireSession','Inject','Edit','add','getUnit','post','parse','_init','pipe','comments','ref','threadId','rangeType','_initDataSource','getOwnPropertyDescriptor','79625NXCcrJ','userId','comment','exports','3391356wbMdio','getMemberID','map','solved','_threadCommentDataSource','_threadCommentDataSourceService','merge','setConfig','type','UniverThreadCommentDataSourcePlugin','forEach','error','@univerjs/network','addUser','Reply','10vxriRQ','replies','replyId','root','UNRECOGNIZED','210jEMxYp','amd','pluginName','DependentOn','IThreadCommentDataSourceService','UniverThreadCommentUi','@univerjs/core','bufferTime','COMMENT','deleteComment','Delete','YYYY/MM/DD\x20HH:mm','rxjs','@univerjs-pro/collaboration-client','57033peoOeG'];_0x5760=function(){return _0x4ed170;};return _0x5760();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3-nightly.202503051607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
48
|
+
"@univerjs-pro/license": "0.6.3-nightly.202503051607",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.6.3-nightly.202503051607",
|
|
50
|
+
"@univerjs/core": "0.6.3-nightly.202503051607",
|
|
51
|
+
"@univerjs/network": "0.6.3-nightly.202503051607",
|
|
49
52
|
"@univerjs/protocol": "0.1.44-alpha.3",
|
|
50
|
-
"@univerjs-
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/network": "0.6.2",
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.2",
|
|
54
|
-
"@univerjs/thread-comment": "0.6.2"
|
|
53
|
+
"@univerjs/thread-comment": "0.6.3-nightly.202503051607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.3-nightly.202503051607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
|
-
"typescript": "^5.
|
|
58
|
+
"typescript": "^5.8.2",
|
|
59
59
|
"vite": "^6.2.0",
|
|
60
60
|
"vitest": "^3.0.7",
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
61
|
+
"@univerjs-infra/shared": "0.6.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|