@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506181607 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x115ab7=_0x5725;(function(_0x1e0bae,_0xa9a9f0){const _0x1822dd=_0x5725,_0x2c9e10=_0x1e0bae();while(!![]){try{const _0x36006c=-parseInt(_0x1822dd(0x22e))/0x1+parseInt(_0x1822dd(0x1fe))/0x2*(parseInt(_0x1822dd(0x268))/0x3)+parseInt(_0x1822dd(0x1fa))/0x4*(parseInt(_0x1822dd(0x204))/0x5)+-parseInt(_0x1822dd(0x1f6))/0x6*(-parseInt(_0x1822dd(0x211))/0x7)+parseInt(_0x1822dd(0x236))/0x8*(parseInt(_0x1822dd(0x231))/0x9)+parseInt(_0x1822dd(0x1f3))/0xa+-parseInt(_0x1822dd(0x258))/0xb;if(_0x36006c===_0xa9a9f0)break;else _0x2c9e10['push'](_0x2c9e10['shift']());}catch(_0x2b7b23){_0x2c9e10['push'](_0x2c9e10['shift']());}}}(_0x486e,0x8315b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x115ab7(0x217)});function _0x5725(_0x5653db,_0x154d51){const _0x486e47=_0x486e();return _0x5725=function(_0x572522,_0x18cae7){_0x572522=_0x572522-0x1e8;let _0x13f5b7=_0x486e47[_0x572522];return _0x13f5b7;},_0x5725(_0x5653db,_0x154d51);}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x115ab7(0x1f7)),M=require(_0x115ab7(0x26d)),w=require(_0x115ab7(0x251)),P=require(_0x115ab7(0x1e9)),U=_0x115ab7(0x225);var I=(_0x2fdcc2=>(_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x1f1)]=0x0]='OpenOrReOpen',_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x21b)]=0x1]=_0x115ab7(0x21b),_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x22a)]=-0x1]=_0x115ab7(0x22a),_0x2fdcc2))(I||{}),v=(_0x594017=>(_0x594017[_0x594017['Unknown']=0x0]=_0x115ab7(0x259),_0x594017[_0x594017[_0x115ab7(0x1fb)]=0x1]=_0x115ab7(0x1fb),_0x594017[_0x594017[_0x115ab7(0x247)]=0x2]=_0x115ab7(0x247),_0x594017[_0x594017[_0x115ab7(0x24b)]=0x3]=_0x115ab7(0x24b),_0x594017[_0x594017[_0x115ab7(0x250)]=0x4]=_0x115ab7(0x250),_0x594017[_0x594017[_0x115ab7(0x203)]=0x5]=_0x115ab7(0x203),_0x594017[_0x594017[_0x115ab7(0x22a)]=-0x1]=_0x115ab7(0x22a),_0x594017))(v||{});const f=_0x359066=>c[_0x115ab7(0x266)](new Date(+_0x359066))[_0x115ab7(0x20a)](_0x115ab7(0x210)),R=async(_0x8c682e,_0x2d616b)=>{const _0x22ec69=_0x115ab7,_0xc23481=_0x8c682e[_0x22ec69(0x21e)](c['UserManagerService']),_0x51bbce=_0x8c682e[_0x22ec69(0x21e)](P[_0x22ec69(0x24e)]);_0x2d616b['forEach'](_0x2dae2c=>{const _0x2d42ac=_0x22ec69;_0xc23481[_0x2d42ac(0x216)](_0x2dae2c)&&_0x2d616b[_0x2d42ac(0x1f4)](_0x2dae2c);}),_0x2d616b[_0x22ec69(0x239)]&&(await _0x51bbce[_0x22ec69(0x21e)](_0x22ec69(0x238),{'params':{'userIDs':[..._0x2d616b]}}))[_0x22ec69(0x25e)][_0x22ec69(0x20c)]['forEach'](_0x55c7a4=>{const _0x8f126b=_0x22ec69;_0x55c7a4&&_0xc23481[_0x8f126b(0x226)](_0x55c7a4);});};var $=Object[_0x115ab7(0x23d)],E=(_0x558e27,_0x43e14d,_0x295484,_0x28e870)=>{const _0x297dcc=_0x115ab7;for(var _0x4c9d86=_0x28e870>0x1?void 0x0:_0x28e870?$(_0x43e14d,_0x295484):_0x43e14d,_0x3924cd=_0x558e27[_0x297dcc(0x222)]-0x1,_0x44bbef;_0x3924cd>=0x0;_0x3924cd--)(_0x44bbef=_0x558e27[_0x3924cd])&&(_0x4c9d86=_0x44bbef(_0x4c9d86)||_0x4c9d86);return _0x4c9d86;},S=(_0x1e986c,_0x26c25d)=>(_0x5bcb28,_0x586aad)=>_0x26c25d(_0x5bcb28,_0x586aad,_0x1e986c);let p=class extends c[_0x115ab7(0x1f0)]{constructor(_0x27f1ee,_0x196f63,_0x447464,_0x1e8a4f){const _0x2430c7=_0x115ab7;super(),this[_0x2430c7(0x264)]=_0x27f1ee,this[_0x2430c7(0x1ef)]=_0x196f63,this['_userService']=_0x447464,this['_injector']=_0x1e8a4f,this['_init'](),this[_0x2430c7(0x212)]();}[_0x115ab7(0x212)](){const _0x153cec=_0x115ab7;this[_0x153cec(0x22d)](this[_0x153cec(0x1ef)][_0x153cec(0x20e)]['pipe'](w[_0x153cec(0x23a)](0x10))[_0x153cec(0x25b)](_0x250a70=>{const _0x1d6d73=_0x153cec,_0x40a42c=new Set();_0x250a70[_0x1d6d73(0x263)](_0xfeec2e=>{const _0x5d288f=_0x1d6d73;switch(_0xfeec2e[_0x5d288f(0x220)]){case'add':{const _0x543761=_0xfeec2e[_0x5d288f(0x252)][_0x5d288f(0x260)];_0x40a42c[_0x5d288f(0x246)](_0x543761);break;}}}),R(this[_0x1d6d73(0x249)],_0x40a42c);}));}[_0x115ab7(0x21a)](){const _0x3c721e=_0x115ab7;this['disposeWithMe'](this[_0x3c721e(0x264)][_0x3c721e(0x20e)]['subscribe'](async _0x524362=>{const _0x220abb=_0x3c721e;var _0x4aab8e,_0x54366f,_0x1ef2fc,_0x1b5ce9;const _0x5c9723=(_0x4aab8e=this['_threadCommentModel'][_0x220abb(0x25f)](_0x524362[_0x220abb(0x24c)])[_0x220abb(0x229)](_0x356a8a=>_0x356a8a['threadId']===_0x524362[_0x220abb(0x261)]))==null?void 0x0:_0x4aab8e[_0x220abb(0x21f)];if(!_0x5c9723)return;const {unitId:_0x3b7dbd,subUnitId:_0x3645b6}=_0x5c9723;switch(_0x524362[_0x220abb(0x206)]&&this[_0x220abb(0x224)]['addUser'](_0x524362[_0x220abb(0x206)]),_0x524362[_0x220abb(0x220)]){case v[_0x220abb(0x1fb)]:break;case v['Reply']:{this[_0x220abb(0x1ef)][_0x220abb(0x23c)](_0x3b7dbd,_0x3645b6,{'unitId':_0x3b7dbd,'subUnitId':_0x3645b6,'ref':'','id':_0x524362[_0x220abb(0x26b)],'dT':f(+_0x524362[_0x220abb(0x256)]),'threadId':_0x524362[_0x220abb(0x261)],'personId':(_0x1ef2fc=(_0x54366f=_0x524362[_0x220abb(0x206)])==null?void 0x0:_0x54366f[_0x220abb(0x262)])!=null?_0x1ef2fc:_0x524362[_0x220abb(0x209)],'text':JSON[_0x220abb(0x240)](_0x524362['content']),'parentId':_0x5c9723['id']});break;}case v[_0x220abb(0x250)]:{const _0x11b978=this['_threadCommentModel'][_0x220abb(0x269)](_0x3b7dbd,_0x3645b6,_0x524362[_0x220abb(0x26b)]);_0x11b978&&_0x11b978['parentId']&&this[_0x220abb(0x1ef)][_0x220abb(0x230)](_0x3b7dbd,_0x3645b6,_0x524362[_0x220abb(0x26b)]);break;}case v[_0x220abb(0x24b)]:{this[_0x220abb(0x1ef)][_0x220abb(0x221)](_0x3b7dbd,_0x3645b6,{'commentId':_0x524362[_0x220abb(0x26b)],'text':JSON[_0x220abb(0x240)](_0x524362[_0x220abb(0x1ff)])});break;}case v[_0x220abb(0x203)]:{const _0x1534a8=(_0x1b5ce9=this[_0x220abb(0x1ef)][_0x220abb(0x25f)](_0x524362[_0x220abb(0x24c)])['find'](_0x36eab1=>_0x36eab1[_0x220abb(0x261)]===_0x524362[_0x220abb(0x261)]))==null?void 0x0:_0x1b5ce9[_0x220abb(0x21f)];_0x1534a8&&this['_threadCommentModel'][_0x220abb(0x1fd)](_0x3b7dbd,_0x3645b6,_0x1534a8['id'],_0x524362[_0x220abb(0x219)]===I[_0x220abb(0x21b)]);break;}}}));}};p=E([S(0x0,c[_0x115ab7(0x24d)](b[_0x115ab7(0x223)])),S(0x1,c[_0x115ab7(0x24d)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x115ab7(0x25d)])),S(0x3,c[_0x115ab7(0x24d)](c['Injector']))],p);const q=_0x115ab7(0x22f),D={};var A=Object[_0x115ab7(0x23d)],x=(_0xac559a,_0x192cf3,_0x2ddab4,_0xe56f05)=>{const _0x12a496=_0x115ab7;for(var _0x5ce218=_0xe56f05>0x1?void 0x0:_0xe56f05?A(_0x192cf3,_0x2ddab4):_0x192cf3,_0x4d8141=_0xac559a[_0x12a496(0x222)]-0x1,_0x2857fb;_0x4d8141>=0x0;_0x4d8141--)(_0x2857fb=_0xac559a[_0x4d8141])&&(_0x5ce218=_0x2857fb(_0x5ce218)||_0x5ce218);return _0x5ce218;},_=(_0x5349ea,_0xe16d3b)=>(_0x2e3688,_0x49f2bf)=>_0xe16d3b(_0x2e3688,_0x49f2bf,_0x5349ea);function Y(_0x5c157e,_0x186906){const _0x265f41=_0x115ab7,_0x4b521c=_0x5c157e[_0x265f41(0x23e)][0x0];return{..._0x186906,'id':_0x4b521c['replyId'],'resolved':_0x5c157e[_0x265f41(0x219)]===0x1,'dT':f(_0x4b521c['createTimestamp']),'personId':_0x4b521c['userId'],'threadId':_0x4b521c['threadId']};}function G(_0x530f33,_0x262db4,_0x4e1356){const _0x7d77f8=_0x115ab7;var _0x540d6a,_0x37e6f5;if(((_0x37e6f5=(_0x540d6a=_0x530f33==null?void 0x0:_0x530f33[_0x7d77f8(0x23e)])==null?void 0x0:_0x540d6a[_0x7d77f8(0x222)])!=null?_0x37e6f5:0x0)>0x0){const _0x15ae20=(_0x3c4b72,_0x2fd86f)=>({'id':_0x3c4b72['replyId'],'threadId':_0x3c4b72['threadId'],'dT':f(_0x3c4b72[_0x7d77f8(0x256)]),'personId':_0x3c4b72[_0x7d77f8(0x209)],'resolved':_0x530f33[_0x7d77f8(0x219)]===I[_0x7d77f8(0x21b)],'unitId':_0x262db4,'subUnitId':_0x4e1356,'text':JSON[_0x7d77f8(0x240)](_0x3c4b72[_0x7d77f8(0x1ff)]),'parentId':_0x2fd86f}),_0x39d1ce=_0x15ae20(_0x530f33[_0x7d77f8(0x23e)][0x0]);return{..._0x39d1ce,'children':_0x530f33[_0x7d77f8(0x23e)][_0x7d77f8(0x265)](0x1)['map'](_0x5ea7ef=>_0x15ae20(_0x5ea7ef,_0x39d1ce['id']))};}return null;}let g=class{constructor(_0x2f05ed,_0x4c7de2,_0x78893a,_0x4f02af){const _0x33b693=_0x115ab7;this[_0x33b693(0x200)]=_0x2f05ed,this[_0x33b693(0x224)]=_0x4c7de2,this[_0x33b693(0x207)]=_0x78893a,this['_injector']=_0x4f02af;}async[_0x115ab7(0x23c)](_0x53ac95){const _0xc88fd2=_0x115ab7;var _0xa0cf9c,_0x4a5542;const {parentId:_0x317716,unitId:_0x3bb78b,text:_0x26b1a8,threadId:_0x54355d}=_0x53ac95,_0x5031ec=(_0x4a5542=(_0xa0cf9c=_0x26b1a8[_0xc88fd2(0x1ec)])==null?void 0x0:_0xa0cf9c['filter'](_0x3a8db0=>_0x3a8db0[_0xc88fd2(0x22c)]===c[_0xc88fd2(0x21c)][_0xc88fd2(0x1f5)])['map'](_0xd4320c=>_0xd4320c[_0xc88fd2(0x26c)]))!=null?_0x4a5542:[],_0x358f50=JSON[_0xc88fd2(0x20f)](_0x26b1a8),_0x5ccbbb=(await this[_0xc88fd2(0x207)][_0xc88fd2(0x235)](_0x3bb78b))[_0xc88fd2(0x213)]();if(_0x317716){const _0x49961b={'memberId':_0x5ccbbb,'unitId':_0x3bb78b,'content':_0x358f50,'mention':_0x5031ec,'threadId':_0x54355d},_0x45d93a=(await this[_0xc88fd2(0x200)]['post'](_0xc88fd2(0x228)+_0x3bb78b+_0xc88fd2(0x1fc),{'body':_0x49961b}))[_0xc88fd2(0x25e)][_0xc88fd2(0x1ed)];return{..._0x53ac95,'id':_0x45d93a['replyId'],'dT':c[_0xc88fd2(0x266)](+_0x45d93a['createTimestamp'])[_0xc88fd2(0x20a)](_0xc88fd2(0x210)),'personId':_0x45d93a[_0xc88fd2(0x209)]};}else{const _0x3eed09={'memberId':_0x5ccbbb,'unitId':_0x3bb78b,'content':_0x358f50,'mention':_0x5031ec},_0x60955b=await this[_0xc88fd2(0x200)][_0xc88fd2(0x1f2)](_0xc88fd2(0x228)+_0x3bb78b+_0xc88fd2(0x23b),{'body':_0x3eed09});return Y(_0x60955b[_0xc88fd2(0x25e)][_0xc88fd2(0x1ee)],_0x53ac95);}}async[_0x115ab7(0x221)](_0x34c480){const _0x1b14f1=_0x115ab7;var _0x27b426,_0x5ac05c;const {text:_0x35eecc,unitId:_0x2e3b2f}=_0x34c480,_0x461433=(_0x5ac05c=(_0x27b426=_0x35eecc[_0x1b14f1(0x1ec)])==null?void 0x0:_0x27b426[_0x1b14f1(0x241)](_0x50c230=>_0x50c230['rangeType']===c[_0x1b14f1(0x21c)][_0x1b14f1(0x1f5)])[_0x1b14f1(0x25c)](_0x20d523=>_0x20d523[_0x1b14f1(0x26c)]))!=null?_0x5ac05c:[],_0x2842af=JSON[_0x1b14f1(0x20f)](_0x35eecc),_0x1e673d=_0x34c480[_0x1b14f1(0x261)],_0x4ff7be=_0x34c480['id'],_0x3ded1d={'memberId':(await this[_0x1b14f1(0x207)][_0x1b14f1(0x235)](_0x2e3b2f))[_0x1b14f1(0x213)](),'unitId':_0x2e3b2f,'threadId':_0x1e673d,'mention':_0x461433,'content':_0x2842af,'replyId':_0x4ff7be},_0x35924d=await this[_0x1b14f1(0x200)][_0x1b14f1(0x1f2)](_0x1b14f1(0x228)+_0x2e3b2f+'/edit',{'body':_0x3ded1d});return!_0x35924d[_0x1b14f1(0x25e)][_0x1b14f1(0x208)]||_0x35924d[_0x1b14f1(0x25e)][_0x1b14f1(0x208)][_0x1b14f1(0x20d)]===0x1;}async[_0x115ab7(0x1fd)](_0x544431){const _0x51d017=_0x115ab7,{unitId:_0x503a1b}=_0x544431,_0x20f1fb=_0x544431[_0x51d017(0x261)],_0x380ca3={'memberId':this[_0x51d017(0x224)][_0x51d017(0x253)]()['userID'],'unitId':_0x503a1b,'threadId':_0x20f1fb,'solved':_0x544431[_0x51d017(0x242)]?I[_0x51d017(0x21b)]:I[_0x51d017(0x1f1)]},_0x261e56=await this[_0x51d017(0x200)][_0x51d017(0x1f2)](_0x51d017(0x228)+_0x503a1b+_0x51d017(0x201),{'body':_0x380ca3});return!_0x261e56[_0x51d017(0x25e)]['error']||_0x261e56[_0x51d017(0x25e)][_0x51d017(0x208)][_0x51d017(0x20d)]===0x1;}async[_0x115ab7(0x230)](_0x2f70dc,_0x1e6334,_0x5c0842,_0x181a12){const _0x1e6e3e=_0x115ab7,_0x4b17a0={'memberId':(await this[_0x1e6e3e(0x207)][_0x1e6e3e(0x235)](_0x2f70dc))[_0x1e6e3e(0x213)](),'threadId':_0x5c0842,'replyId':_0x181a12,'unitId':_0x2f70dc},_0x19ac5=await this['_httpService'][_0x1e6e3e(0x1f2)](_0x1e6e3e(0x228)+_0x2f70dc+_0x1e6e3e(0x243),{'body':_0x4b17a0});return!_0x19ac5['body'][_0x1e6e3e(0x208)]||_0x19ac5['body']['error'][_0x1e6e3e(0x20d)]===0x1;}async[_0x115ab7(0x1ea)](_0x172694,_0x29989a,_0x152cae){const _0x1cbbda=_0x115ab7,_0x4abb74={'unitId':_0x172694,'threadId':_0x152cae},_0x5ac064=await this[_0x1cbbda(0x200)]['post'](_0x1cbbda(0x228)+_0x172694+'/list',{'body':_0x4abb74}),_0x8ed1f6=_0x152cae['map'](_0xe5fedd=>G(_0x5ac064['body'][_0x1cbbda(0x1eb)][_0xe5fedd],_0x172694,_0x29989a))[_0x1cbbda(0x241)](Boolean);return Object[_0x1cbbda(0x267)](_0x5ac064['body'][_0x1cbbda(0x20c)])[_0x1cbbda(0x263)](_0x2c69e4=>{const _0x3ebd75=_0x1cbbda;this[_0x3ebd75(0x224)][_0x3ebd75(0x226)](_0x2c69e4);}),_0x8ed1f6;}[_0x115ab7(0x233)](_0x562899){return{'id':_0x562899['id'],'threadId':_0x562899['threadId'],'ref':_0x562899['ref']};}};g=x([_(0x0,c['Inject'](P[_0x115ab7(0x24e)])),_(0x1,c[_0x115ab7(0x24d)](c[_0x115ab7(0x25d)])),_(0x2,c[_0x115ab7(0x24d)](b[_0x115ab7(0x257)])),_(0x3,c[_0x115ab7(0x24d)](c[_0x115ab7(0x1f8)]))],g);var H=Object[_0x115ab7(0x23d)],J=(_0x3e2f3e,_0x927222,_0x5f0e00,_0x5af020)=>{const _0x13f0db=_0x115ab7;for(var _0x51020e=_0x5af020>0x1?void 0x0:_0x5af020?H(_0x927222,_0x5f0e00):_0x927222,_0x52ae40=_0x3e2f3e[_0x13f0db(0x222)]-0x1,_0x381e7f;_0x52ae40>=0x0;_0x52ae40--)(_0x381e7f=_0x3e2f3e[_0x52ae40])&&(_0x51020e=_0x381e7f(_0x51020e)||_0x51020e);return _0x51020e;},y=(_0x4948ee,_0x4b3a14)=>(_0x4ea3c4,_0x29103d)=>_0x4b3a14(_0x4ea3c4,_0x29103d,_0x4948ee);let C=class extends c[_0x115ab7(0x1f0)]{constructor(_0x4a95db,_0x115a20){const _0x858b8d=_0x115ab7;super(),this['_threadCommentDataSourceService']=_0x4a95db,this[_0x858b8d(0x248)]=_0x115a20,this['_initDataSource']();}[_0x115ab7(0x20b)](){const _0x1a0bc1=_0x115ab7;this[_0x1a0bc1(0x245)][_0x1a0bc1(0x255)]=this[_0x1a0bc1(0x248)],this[_0x1a0bc1(0x245)][_0x1a0bc1(0x23f)]=!0x1;}};C=J([y(0x0,M[_0x115ab7(0x1e8)]),y(0x1,c[_0x115ab7(0x24d)](g))],C);var F=Object[_0x115ab7(0x24f)],L=Object[_0x115ab7(0x23d)],Z=(_0x4b5c9f,_0x59f114,_0x27b8ef)=>_0x59f114 in _0x4b5c9f?F(_0x4b5c9f,_0x59f114,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27b8ef}):_0x4b5c9f[_0x59f114]=_0x27b8ef,W=(_0x5dcc13,_0x3b6c39,_0x503855,_0x4a2d2d)=>{const _0x5a2734=_0x115ab7;for(var _0x541791=_0x4a2d2d>0x1?void 0x0:_0x4a2d2d?L(_0x3b6c39,_0x503855):_0x3b6c39,_0x41436d=_0x5dcc13[_0x5a2734(0x222)]-0x1,_0x10efc0;_0x41436d>=0x0;_0x41436d--)(_0x10efc0=_0x5dcc13[_0x41436d])&&(_0x541791=_0x10efc0(_0x541791)||_0x541791);return _0x541791;},O=(_0x153995,_0x14f635)=>(_0x545c7d,_0x2f1da7)=>_0x14f635(_0x545c7d,_0x2f1da7,_0x153995),N=(_0x37c1d5,_0x56bcbd,_0x3c1775)=>Z(_0x37c1d5,typeof _0x56bcbd!=_0x115ab7(0x244)?_0x56bcbd+'':_0x56bcbd,_0x3c1775);exports[_0x115ab7(0x254)]=class extends c[_0x115ab7(0x25a)]{constructor(_0x381cc6=D,_0x25bc17,_0x237783){const _0x57631e=_0x115ab7;super(),this[_0x57631e(0x24a)]=_0x381cc6,this[_0x57631e(0x249)]=_0x25bc17,this[_0x57631e(0x237)]=_0x237783;const {..._0x43df38}=c[_0x57631e(0x234)]({},D,this['_config']);this['_configService'][_0x57631e(0x215)](q,_0x43df38);}[_0x115ab7(0x21d)](){[[g],[C],[p]]['forEach'](_0xf82b90=>{const _0x259f26=_0x5725;this['_injector'][_0x259f26(0x246)](_0xf82b90);});}[_0x115ab7(0x202)](){const _0x43f7c1=_0x115ab7;this[_0x43f7c1(0x249)][_0x43f7c1(0x21e)](C),this[_0x43f7c1(0x249)][_0x43f7c1(0x21e)](p);}},N(exports[_0x115ab7(0x254)],_0x115ab7(0x218),U),N(exports[_0x115ab7(0x254)],_0x115ab7(0x220),c[_0x115ab7(0x205)][_0x115ab7(0x227)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x115ab7(0x214)](j[_0x115ab7(0x232)],b[_0x115ab7(0x1f9)],T[_0x115ab7(0x26a)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x115ab7(0x22b)])],exports[_0x115ab7(0x254)]);function _0x486e(){const _0x3b90fa=['replies','syncUpdateMutationToColla','parse','filter','resolved','/delete','symbol','_threadCommentDataSourceService','add','Reply','_threadCommentDataSource','_injector','_config','Edit','unitId','Inject','HTTPService','defineProperty','Delete','rxjs','payload','getCurrentUser','UniverThreadCommentDataSourcePlugin','dataSource','createTimestamp','CollaborationSessionService','16255613zJgQdL','Unknown','Plugin','subscribe','map','UserManagerService','body','getUnit','personId','threadId','userID','forEach','_commentService','slice','dayjs','values','1038354sDtuya','getComment','UniverLicensePlugin','replyId','rangeId','@univerjs/thread-comment','IThreadCommentDataSourceService','@univerjs/network','listComments','comments','customRanges','reply','comment','_threadCommentModel','Disposable','OpenOrReOpen','post','10708420doPToc','delete','COMMENT','6LIOnbe','@univerjs/thread-comment-ui','Injector','UniverCollaborationClientPlugin','2276356nhEfGk','Add','/reply','resolveComment','2jjKUwH','content','_httpService','/solved','onReady','Solve','5AOxZrf','UniverInstanceType','user','_sessionService','error','userId','format','_initDataSource','users','code','commentUpdate$','stringify','YYYY/MM/DD\x20HH:mm','46501zNaceb','_initUserSync','getMemberID','DependentOn','setConfig','getUser','Module','pluginName','solved','_init','Solved','CustomRangeType','onStarting','get','root','type','updateComment','length','CommentService','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','UNIVER_UNKNOWN','/universer-api/comment/unit/','find','UNRECOGNIZED','IConfigService','rangeType','disposeWithMe','423277gLFpEe','thread-comment-data-source.config','deleteComment','4007619OgiskN','UniverThreadCommentUIPlugin','saveCommentToSnapshot','merge','requireSession','8udnhCy','_configService','/universer-api/user/list','size','bufferTime','/add','addComment','getOwnPropertyDescriptor'];_0x486e=function(){return _0x3b90fa;};return _0x486e();}
|
|
1
|
+
'use strict';const _0xacc0dc=_0x4991;(function(_0x2bc06a,_0x1acfd9){const _0x5c8396=_0x4991,_0x2dfd5b=_0x2bc06a();while(!![]){try{const _0x49ecf0=parseInt(_0x5c8396(0xb7))/0x1*(parseInt(_0x5c8396(0xdf))/0x2)+-parseInt(_0x5c8396(0x96))/0x3*(-parseInt(_0x5c8396(0x8f))/0x4)+-parseInt(_0x5c8396(0xab))/0x5+-parseInt(_0x5c8396(0x7d))/0x6+-parseInt(_0x5c8396(0xc8))/0x7*(-parseInt(_0x5c8396(0x72))/0x8)+parseInt(_0x5c8396(0x85))/0x9+-parseInt(_0x5c8396(0x6f))/0xa;if(_0x49ecf0===_0x1acfd9)break;else _0x2dfd5b['push'](_0x2dfd5b['shift']());}catch(_0x534b49){_0x2dfd5b['push'](_0x2dfd5b['shift']());}}}(_0x5d89,0x99ca3));Object[_0xacc0dc(0x9c)](exports,Symbol[_0xacc0dc(0xb1)],{'value':_0xacc0dc(0x88)});const b=require(_0xacc0dc(0x94)),T=require(_0xacc0dc(0xce)),c=require('@univerjs/core'),j=require(_0xacc0dc(0xb8)),M=require(_0xacc0dc(0xe7)),w=require(_0xacc0dc(0xa1)),P=require(_0xacc0dc(0xc2)),U=_0xacc0dc(0x76);var I=(_0x39efc9=>(_0x39efc9[_0x39efc9['OpenOrReOpen']=0x0]=_0xacc0dc(0xaf),_0x39efc9[_0x39efc9['Solved']=0x1]=_0xacc0dc(0x9d),_0x39efc9[_0x39efc9['UNRECOGNIZED']=-0x1]=_0xacc0dc(0xa2),_0x39efc9))(I||{}),v=(_0x6daa98=>(_0x6daa98[_0x6daa98[_0xacc0dc(0xc7)]=0x0]=_0xacc0dc(0xc7),_0x6daa98[_0x6daa98[_0xacc0dc(0x9a)]=0x1]=_0xacc0dc(0x9a),_0x6daa98[_0x6daa98[_0xacc0dc(0xc5)]=0x2]=_0xacc0dc(0xc5),_0x6daa98[_0x6daa98[_0xacc0dc(0x91)]=0x3]='Edit',_0x6daa98[_0x6daa98['Delete']=0x4]=_0xacc0dc(0xa4),_0x6daa98[_0x6daa98[_0xacc0dc(0x95)]=0x5]=_0xacc0dc(0x95),_0x6daa98[_0x6daa98[_0xacc0dc(0xa2)]=-0x1]='UNRECOGNIZED',_0x6daa98))(v||{});const f=_0x2db392=>c['dayjs'](new Date(+_0x2db392))[_0xacc0dc(0xd2)](_0xacc0dc(0xc4)),R=async(_0x1b7511,_0x48ff34)=>{const _0x310d52=_0xacc0dc,_0x314c32=_0x1b7511[_0x310d52(0xe4)](c['UserManagerService']),_0x5dabfe=_0x1b7511[_0x310d52(0xe4)](P['HTTPService']);_0x48ff34[_0x310d52(0xc6)](_0x430181=>{const _0x2f5b10=_0x310d52;_0x314c32[_0x2f5b10(0x78)](_0x430181)&&_0x48ff34[_0x2f5b10(0x8b)](_0x430181);}),_0x48ff34[_0x310d52(0xbf)]&&(await _0x5dabfe['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x48ff34]}}))[_0x310d52(0xad)][_0x310d52(0xdb)][_0x310d52(0xc6)](_0x564492=>{const _0x5896ec=_0x310d52;_0x564492&&_0x314c32[_0x5896ec(0xcd)](_0x564492);});};var $=Object[_0xacc0dc(0x6e)],E=(_0x4c53d9,_0x1ecb62,_0x2e805c,_0x4ed1fe)=>{for(var _0x57e292=_0x4ed1fe>0x1?void 0x0:_0x4ed1fe?$(_0x1ecb62,_0x2e805c):_0x1ecb62,_0x589b95=_0x4c53d9['length']-0x1,_0x116e6b;_0x589b95>=0x0;_0x589b95--)(_0x116e6b=_0x4c53d9[_0x589b95])&&(_0x57e292=_0x116e6b(_0x57e292)||_0x57e292);return _0x57e292;},S=(_0x225a52,_0x1f6607)=>(_0x52a105,_0x493543)=>_0x1f6607(_0x52a105,_0x493543,_0x225a52);let p=class extends c[_0xacc0dc(0xd3)]{constructor(_0x1fb404,_0x2e25cb,_0x47a6f0,_0x309528){const _0x4a29c3=_0xacc0dc;super(),this[_0x4a29c3(0xaa)]=_0x1fb404,this[_0x4a29c3(0xa0)]=_0x2e25cb,this[_0x4a29c3(0x89)]=_0x47a6f0,this[_0x4a29c3(0xd8)]=_0x309528,this[_0x4a29c3(0x93)](),this[_0x4a29c3(0x9b)]();}['_initUserSync'](){const _0x970c36=_0xacc0dc;this[_0x970c36(0xd6)](this[_0x970c36(0xa0)]['commentUpdate$'][_0x970c36(0xd0)](w[_0x970c36(0xa7)](0x10))[_0x970c36(0xb9)](_0x1d57bb=>{const _0x831b4f=_0x970c36,_0x44368e=new Set();_0x1d57bb[_0x831b4f(0xc6)](_0x26e25e=>{const _0x11c457=_0x831b4f;switch(_0x26e25e['type']){case'add':{const _0x147ffd=_0x26e25e['payload'][_0x11c457(0xb4)];_0x44368e[_0x11c457(0x79)](_0x147ffd);break;}}}),R(this[_0x831b4f(0xd8)],_0x44368e);}));}['_init'](){const _0x3988e6=_0xacc0dc;this['disposeWithMe'](this['_commentService'][_0x3988e6(0xa5)]['subscribe'](async _0x3b4a63=>{const _0x31d90b=_0x3988e6;var _0x5217a0,_0x49a9cb,_0x3c0090,_0x461d5c;const _0x19faeb=(_0x5217a0=this[_0x31d90b(0xa0)]['getUnit'](_0x3b4a63[_0x31d90b(0xc1)])[_0x31d90b(0xcc)](_0x3c7ad2=>_0x3c7ad2['threadId']===_0x3b4a63[_0x31d90b(0xbb)]))==null?void 0x0:_0x5217a0[_0x31d90b(0x81)];if(!_0x19faeb)return;const {unitId:_0x26f9ab,subUnitId:_0xe60df9}=_0x19faeb;switch(_0x3b4a63[_0x31d90b(0xe9)]&&this[_0x31d90b(0x89)][_0x31d90b(0xcd)](_0x3b4a63[_0x31d90b(0xe9)]),_0x3b4a63['type']){case v['Add']:break;case v[_0x31d90b(0xc5)]:{this['_threadCommentModel']['addComment'](_0x26f9ab,_0xe60df9,{'unitId':_0x26f9ab,'subUnitId':_0xe60df9,'ref':'','id':_0x3b4a63[_0x31d90b(0xb2)],'dT':f(+_0x3b4a63['createTimestamp']),'threadId':_0x3b4a63[_0x31d90b(0xbb)],'personId':(_0x3c0090=(_0x49a9cb=_0x3b4a63[_0x31d90b(0xe9)])==null?void 0x0:_0x49a9cb['userID'])!=null?_0x3c0090:_0x3b4a63[_0x31d90b(0xdd)],'text':JSON[_0x31d90b(0xd5)](_0x3b4a63[_0x31d90b(0xb6)]),'parentId':_0x19faeb['id']});break;}case v[_0x31d90b(0xa4)]:{const _0x15b847=this[_0x31d90b(0xa0)][_0x31d90b(0x8d)](_0x26f9ab,_0xe60df9,_0x3b4a63[_0x31d90b(0xb2)]);_0x15b847&&_0x15b847[_0x31d90b(0x7c)]&&this[_0x31d90b(0xa0)][_0x31d90b(0x9e)](_0x26f9ab,_0xe60df9,_0x3b4a63['replyId']);break;}case v[_0x31d90b(0x91)]:{this[_0x31d90b(0xa0)][_0x31d90b(0xc9)](_0x26f9ab,_0xe60df9,{'commentId':_0x3b4a63[_0x31d90b(0xb2)],'text':JSON[_0x31d90b(0xd5)](_0x3b4a63['content'])});break;}case v[_0x31d90b(0x95)]:{const _0x4c4cf5=(_0x461d5c=this['_threadCommentModel'][_0x31d90b(0xcf)](_0x3b4a63[_0x31d90b(0xc1)])[_0x31d90b(0xcc)](_0xfceea3=>_0xfceea3[_0x31d90b(0xbb)]===_0x3b4a63['threadId']))==null?void 0x0:_0x461d5c[_0x31d90b(0x81)];_0x4c4cf5&&this['_threadCommentModel']['resolveComment'](_0x26f9ab,_0xe60df9,_0x4c4cf5['id'],_0x3b4a63[_0x31d90b(0x86)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0xacc0dc(0xbe)](b[_0xacc0dc(0x73)])),S(0x1,c[_0xacc0dc(0xbe)](M['ThreadCommentModel'])),S(0x2,c[_0xacc0dc(0xbe)](c[_0xacc0dc(0x8c)])),S(0x3,c[_0xacc0dc(0xbe)](c[_0xacc0dc(0x97)]))],p);const q=_0xacc0dc(0x87),D={};var A=Object[_0xacc0dc(0x6e)],x=(_0x515f63,_0x1c6cf4,_0x3e1baa,_0x22770e)=>{for(var _0xf19488=_0x22770e>0x1?void 0x0:_0x22770e?A(_0x1c6cf4,_0x3e1baa):_0x1c6cf4,_0x2791d9=_0x515f63['length']-0x1,_0x1cfa0d;_0x2791d9>=0x0;_0x2791d9--)(_0x1cfa0d=_0x515f63[_0x2791d9])&&(_0xf19488=_0x1cfa0d(_0xf19488)||_0xf19488);return _0xf19488;},_=(_0x204410,_0x322682)=>(_0x186e27,_0x192e9c)=>_0x322682(_0x186e27,_0x192e9c,_0x204410);function _0x4991(_0x4f0b0c,_0xf2ad7d){const _0x5d895e=_0x5d89();return _0x4991=function(_0x49914b,_0x454795){_0x49914b=_0x49914b-0x6e;let _0x23a1e6=_0x5d895e[_0x49914b];return _0x23a1e6;},_0x4991(_0x4f0b0c,_0xf2ad7d);}function Y(_0x1050d0,_0x1e28c5){const _0x4eab83=_0xacc0dc,_0x45df5e=_0x1050d0[_0x4eab83(0x71)][0x0];return{..._0x1e28c5,'id':_0x45df5e[_0x4eab83(0xb2)],'resolved':_0x1050d0[_0x4eab83(0x86)]===0x1,'dT':f(_0x45df5e[_0x4eab83(0xac)]),'personId':_0x45df5e[_0x4eab83(0xdd)],'threadId':_0x45df5e['threadId']};}function G(_0xc4d11d,_0x336d6a,_0x3fcbbe){const _0x460485=_0xacc0dc;var _0x33c840,_0x5521f7;if(((_0x5521f7=(_0x33c840=_0xc4d11d==null?void 0x0:_0xc4d11d['replies'])==null?void 0x0:_0x33c840['length'])!=null?_0x5521f7:0x0)>0x0){const _0x3949e7=(_0x3b2c8c,_0xe42131)=>({'id':_0x3b2c8c[_0x460485(0xb2)],'threadId':_0x3b2c8c[_0x460485(0xbb)],'dT':f(_0x3b2c8c[_0x460485(0xac)]),'personId':_0x3b2c8c[_0x460485(0xdd)],'resolved':_0xc4d11d[_0x460485(0x86)]===I[_0x460485(0x9d)],'unitId':_0x336d6a,'subUnitId':_0x3fcbbe,'text':JSON[_0x460485(0xd5)](_0x3b2c8c[_0x460485(0xb6)]),'parentId':_0xe42131}),_0x9ed8be=_0x3949e7(_0xc4d11d['replies'][0x0]);return{..._0x9ed8be,'children':_0xc4d11d[_0x460485(0x71)][_0x460485(0x90)](0x1)[_0x460485(0x7a)](_0x4947a9=>_0x3949e7(_0x4947a9,_0x9ed8be['id']))};}return null;}let g=class{constructor(_0x343433,_0x18bc1b,_0x10965e,_0x86fe6a){const _0x11587a=_0xacc0dc;this['_httpService']=_0x343433,this[_0x11587a(0x89)]=_0x18bc1b,this['_sessionService']=_0x10965e,this[_0x11587a(0xd8)]=_0x86fe6a;}async[_0xacc0dc(0x9f)](_0x107268){const _0x184694=_0xacc0dc;var _0x110cf7,_0x2579d6;const {parentId:_0x7f0257,unitId:_0x22ffd3,text:_0x142c87,threadId:_0x460a7a}=_0x107268,_0xc6e069=(_0x2579d6=(_0x110cf7=_0x142c87[_0x184694(0xae)])==null?void 0x0:_0x110cf7['filter'](_0x26d63f=>_0x26d63f['rangeType']===c[_0x184694(0x80)][_0x184694(0xe5)])[_0x184694(0x7a)](_0x571881=>_0x571881[_0x184694(0xeb)]))!=null?_0x2579d6:[],_0x78b4a1=JSON[_0x184694(0x82)](_0x142c87),_0x2c9f7c=(await this[_0x184694(0x7e)][_0x184694(0xa8)](_0x22ffd3))[_0x184694(0xe6)]();if(_0x7f0257){const _0x17a0c4={'memberId':_0x2c9f7c,'unitId':_0x22ffd3,'content':_0x78b4a1,'mention':_0xc6e069,'threadId':_0x460a7a},_0x28d88e=(await this[_0x184694(0xb3)][_0x184694(0xd9)]('/universer-api/comment/unit/'+_0x22ffd3+'/reply',{'body':_0x17a0c4}))[_0x184694(0xad)][_0x184694(0xcb)];return{..._0x107268,'id':_0x28d88e[_0x184694(0xb2)],'dT':c[_0x184694(0xe2)](+_0x28d88e[_0x184694(0xac)])['format'](_0x184694(0xc4)),'personId':_0x28d88e[_0x184694(0xdd)]};}else{const _0x24c353={'memberId':_0x2c9f7c,'unitId':_0x22ffd3,'content':_0x78b4a1,'mention':_0xc6e069},_0x29968a=await this[_0x184694(0xb3)][_0x184694(0xd9)](_0x184694(0x7f)+_0x22ffd3+_0x184694(0x83),{'body':_0x24c353});return Y(_0x29968a[_0x184694(0xad)]['comment'],_0x107268);}}async[_0xacc0dc(0xc9)](_0x216f85){const _0xcc1add=_0xacc0dc;var _0x555b56,_0xdcd369;const {text:_0x22bbd8,unitId:_0x10afe2}=_0x216f85,_0x4cab16=(_0xdcd369=(_0x555b56=_0x22bbd8['customRanges'])==null?void 0x0:_0x555b56['filter'](_0x31c62b=>_0x31c62b[_0xcc1add(0xef)]===c['CustomRangeType']['COMMENT'])[_0xcc1add(0x7a)](_0x2cf34f=>_0x2cf34f[_0xcc1add(0xeb)]))!=null?_0xdcd369:[],_0xa25bf4=JSON[_0xcc1add(0x82)](_0x22bbd8),_0x8c2a1a=_0x216f85[_0xcc1add(0xbb)],_0x520c7d=_0x216f85['id'],_0x2eb1e8={'memberId':(await this['_sessionService']['requireSession'](_0x10afe2))[_0xcc1add(0xe6)](),'unitId':_0x10afe2,'threadId':_0x8c2a1a,'mention':_0x4cab16,'content':_0xa25bf4,'replyId':_0x520c7d},_0x273585=await this[_0xcc1add(0xb3)]['post'](_0xcc1add(0x7f)+_0x10afe2+_0xcc1add(0xca),{'body':_0x2eb1e8});return!_0x273585[_0xcc1add(0xad)]['error']||_0x273585[_0xcc1add(0xad)][_0xcc1add(0xe3)]['code']===0x1;}async[_0xacc0dc(0xba)](_0x3139fb){const _0x13250f=_0xacc0dc,{unitId:_0x1c169c}=_0x3139fb,_0x345675=_0x3139fb[_0x13250f(0xbb)],_0x376fe0={'memberId':this['_userService'][_0x13250f(0xbd)]()[_0x13250f(0xd1)],'unitId':_0x1c169c,'threadId':_0x345675,'solved':_0x3139fb['resolved']?I[_0x13250f(0x9d)]:I[_0x13250f(0xaf)]},_0x4c4e36=await this[_0x13250f(0xb3)][_0x13250f(0xd9)]('/universer-api/comment/unit/'+_0x1c169c+_0x13250f(0xb0),{'body':_0x376fe0});return!_0x4c4e36[_0x13250f(0xad)]['error']||_0x4c4e36[_0x13250f(0xad)][_0x13250f(0xe3)][_0x13250f(0xe8)]===0x1;}async[_0xacc0dc(0x9e)](_0x4a5be2,_0x10a65f,_0x172cef,_0x491009){const _0x17f27b=_0xacc0dc,_0x3b02c3={'memberId':(await this[_0x17f27b(0x7e)][_0x17f27b(0xa8)](_0x4a5be2))[_0x17f27b(0xe6)](),'threadId':_0x172cef,'replyId':_0x491009,'unitId':_0x4a5be2},_0x3f13c6=await this[_0x17f27b(0xb3)][_0x17f27b(0xd9)](_0x17f27b(0x7f)+_0x4a5be2+_0x17f27b(0x70),{'body':_0x3b02c3});return!_0x3f13c6['body'][_0x17f27b(0xe3)]||_0x3f13c6[_0x17f27b(0xad)]['error'][_0x17f27b(0xe8)]===0x1;}async[_0xacc0dc(0xda)](_0x41d170,_0x4223,_0x8ecd0e){const _0x12b770=_0xacc0dc,_0x26f59d={'unitId':_0x41d170,'threadId':_0x8ecd0e},_0xef5891=await this[_0x12b770(0xb3)][_0x12b770(0xd9)](_0x12b770(0x7f)+_0x41d170+_0x12b770(0xdc),{'body':_0x26f59d}),_0x567961=_0x8ecd0e[_0x12b770(0x7a)](_0x1813a5=>G(_0xef5891['body'][_0x12b770(0xe0)][_0x1813a5],_0x41d170,_0x4223))['filter'](Boolean);return Object[_0x12b770(0xc0)](_0xef5891['body'][_0x12b770(0xdb)])[_0x12b770(0xc6)](_0x3c1d2b=>{const _0x23f1ec=_0x12b770;this[_0x23f1ec(0x89)][_0x23f1ec(0xcd)](_0x3c1d2b);}),_0x567961;}[_0xacc0dc(0xe1)](_0x2016b8){const _0x5dfcc7=_0xacc0dc;return{'id':_0x2016b8['id'],'threadId':_0x2016b8[_0x5dfcc7(0xbb)],'ref':_0x2016b8[_0x5dfcc7(0x98)]};}};g=x([_(0x0,c[_0xacc0dc(0xbe)](P[_0xacc0dc(0xd4)])),_(0x1,c['Inject'](c[_0xacc0dc(0x8c)])),_(0x2,c['Inject'](b[_0xacc0dc(0x99)])),_(0x3,c[_0xacc0dc(0xbe)](c[_0xacc0dc(0x97)]))],g);var H=Object[_0xacc0dc(0x6e)],J=(_0x5928f5,_0x54708e,_0x570611,_0x8208db)=>{const _0x229f36=_0xacc0dc;for(var _0x165eb0=_0x8208db>0x1?void 0x0:_0x8208db?H(_0x54708e,_0x570611):_0x54708e,_0x2dea77=_0x5928f5[_0x229f36(0xde)]-0x1,_0x1778a5;_0x2dea77>=0x0;_0x2dea77--)(_0x1778a5=_0x5928f5[_0x2dea77])&&(_0x165eb0=_0x1778a5(_0x165eb0)||_0x165eb0);return _0x165eb0;},y=(_0x510ffd,_0x2d67fb)=>(_0x1c3db2,_0xa69259)=>_0x2d67fb(_0x1c3db2,_0xa69259,_0x510ffd);function _0x5d89(){const _0x143ac5=['Solve','124503bUDAXa','Injector','ref','CollaborationSessionService','Add','_initUserSync','defineProperty','Solved','deleteComment','addComment','_threadCommentModel','rxjs','UNRECOGNIZED','_threadCommentDataSourceService','Delete','commentUpdate$','type','bufferTime','requireSession','UniverCollaborationClientPlugin','_commentService','1990945gKMOnQ','createTimestamp','body','customRanges','OpenOrReOpen','/solved','toStringTag','replyId','_httpService','personId','setConfig','content','1AzwyVp','@univerjs/thread-comment-ui','subscribe','resolveComment','threadId','dataSource','getCurrentUser','Inject','size','values','unitId','@univerjs/network','pluginName','YYYY/MM/DD\x20HH:mm','Reply','forEach','Unknown','7kCxwbd','updateComment','/edit','reply','find','addUser','@univerjs-pro/license','getUnit','pipe','userID','format','Disposable','HTTPService','parse','disposeWithMe','_configService','_injector','post','listComments','users','/list','userId','length','634094tlPFpW','comments','saveCommentToSnapshot','dayjs','error','get','COMMENT','getMemberID','@univerjs/thread-comment','code','user','UniverLicensePlugin','rangeId','onStarting','UNIVER_UNKNOWN','merge','rangeType','getOwnPropertyDescriptor','11284890xnkCLf','/delete','replies','1739336olajSX','CommentService','UniverThreadCommentDataSourcePlugin','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','getUser','add','map','syncUpdateMutationToColla','parentId','4928754mAoCqZ','_sessionService','/universer-api/comment/unit/','CustomRangeType','root','stringify','/add','IConfigService','11160603oSuxsw','solved','thread-comment-data-source.config','Module','_userService','Plugin','delete','UserManagerService','getComment','_config','116hTLiYG','slice','Edit','_threadCommentDataSource','_init','@univerjs-pro/collaboration-client'];_0x5d89=function(){return _0x143ac5;};return _0x5d89();}let C=class extends c[_0xacc0dc(0xd3)]{constructor(_0x560001,_0x512ad2){const _0x4e28fe=_0xacc0dc;super(),this[_0x4e28fe(0xa3)]=_0x560001,this[_0x4e28fe(0x92)]=_0x512ad2,this[_0x4e28fe(0x77)]();}['_initDataSource'](){const _0x2d1b9d=_0xacc0dc;this[_0x2d1b9d(0xa3)][_0x2d1b9d(0xbc)]=this[_0x2d1b9d(0x92)],this[_0x2d1b9d(0xa3)][_0x2d1b9d(0x7b)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xacc0dc(0xbe)](g))],C);var F=Object[_0xacc0dc(0x9c)],L=Object[_0xacc0dc(0x6e)],Z=(_0x43684a,_0x33b55a,_0x5dc0f9)=>_0x33b55a in _0x43684a?F(_0x43684a,_0x33b55a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dc0f9}):_0x43684a[_0x33b55a]=_0x5dc0f9,W=(_0x1a26ad,_0x19a471,_0x102ad4,_0x11b4ad)=>{const _0x35f692=_0xacc0dc;for(var _0x34031c=_0x11b4ad>0x1?void 0x0:_0x11b4ad?L(_0x19a471,_0x102ad4):_0x19a471,_0x2a6b46=_0x1a26ad[_0x35f692(0xde)]-0x1,_0x5d5688;_0x2a6b46>=0x0;_0x2a6b46--)(_0x5d5688=_0x1a26ad[_0x2a6b46])&&(_0x34031c=_0x5d5688(_0x34031c)||_0x34031c);return _0x34031c;},O=(_0xe54a1c,_0x44cbb1)=>(_0x4854f5,_0x1a213c)=>_0x44cbb1(_0x4854f5,_0x1a213c,_0xe54a1c),N=(_0x49b3e1,_0x1c7381,_0x1fd920)=>Z(_0x49b3e1,typeof _0x1c7381!='symbol'?_0x1c7381+'':_0x1c7381,_0x1fd920);exports[_0xacc0dc(0x74)]=class extends c[_0xacc0dc(0x8a)]{constructor(_0x4e937f=D,_0x599a27,_0x1d2eeb){const _0x847f35=_0xacc0dc;super(),this[_0x847f35(0x8e)]=_0x4e937f,this[_0x847f35(0xd8)]=_0x599a27,this['_configService']=_0x1d2eeb;const {..._0x4b3f4d}=c[_0x847f35(0xee)]({},D,this['_config']);this[_0x847f35(0xd7)][_0x847f35(0xb5)](q,_0x4b3f4d);}[_0xacc0dc(0xec)](){[[g],[C],[p]]['forEach'](_0x3b4fbe=>{const _0x15cd87=_0x4991;this[_0x15cd87(0xd8)][_0x15cd87(0x79)](_0x3b4fbe);});}[_0xacc0dc(0x75)](){const _0x5050ba=_0xacc0dc;this[_0x5050ba(0xd8)][_0x5050ba(0xe4)](C),this[_0x5050ba(0xd8)][_0x5050ba(0xe4)](p);}},N(exports[_0xacc0dc(0x74)],_0xacc0dc(0xc3),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xacc0dc(0xa6),c['UniverInstanceType'][_0xacc0dc(0xed)]),exports[_0xacc0dc(0x74)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0xacc0dc(0xa9)],T[_0xacc0dc(0xea)]),O(0x1,c[_0xacc0dc(0xbe)](c[_0xacc0dc(0x97)])),O(0x2,c[_0xacc0dc(0x84)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3c63ed=_0x686a;(function(_0x404739,_0x224a0e){const _0x3b87b4=_0x686a,_0x239fda=_0x404739();while(!![]){try{const _0x14235d=parseInt(_0x3b87b4(0x18c))/0x1+parseInt(_0x3b87b4(0x177))/0x2*(-parseInt(_0x3b87b4(0x1a8))/0x3)+-parseInt(_0x3b87b4(0x19c))/0x4*(parseInt(_0x3b87b4(0x16b))/0x5)+parseInt(_0x3b87b4(0x166))/0x6+-parseInt(_0x3b87b4(0x181))/0x7*(parseInt(_0x3b87b4(0x158))/0x8)+-parseInt(_0x3b87b4(0x185))/0x9+parseInt(_0x3b87b4(0x167))/0xa;if(_0x14235d===_0x224a0e)break;else _0x239fda['push'](_0x239fda['shift']());}catch(_0x5a5390){_0x239fda['push'](_0x239fda['shift']());}}}(_0x3bff,0x58c59));import{CommentService as _0x1f5f6e,CollaborationSessionService as _0x30fdc0,UniverCollaborationClientPlugin as _0x1f70fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1df8ef}from'@univerjs-pro/license';import{dayjs as _0x14457b,UserManagerService as _0x317ae9,Inject as _0x425bc5,Injector as _0x344a66,Disposable as _0x2716e8,CustomRangeType as _0x4c58ab,UniverInstanceType as _0xe14618,DependentOn as _0x440a04,IConfigService as _0x5bacb3,Plugin as _0x417ad6,merge as _0x4aed61}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21fc1f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59fb27,IThreadCommentDataSourceService as _0x581906}from'@univerjs/thread-comment';import{bufferTime as _0x96ccfa}from'rxjs';import{HTTPService as _0x304e86}from'@univerjs/network';const W=_0x3c63ed(0x1aa);var I=(_0x2e779d=>(_0x2e779d[_0x2e779d[_0x3c63ed(0x1a7)]=0x0]=_0x3c63ed(0x1a7),_0x2e779d[_0x2e779d[_0x3c63ed(0x189)]=0x1]=_0x3c63ed(0x189),_0x2e779d[_0x2e779d[_0x3c63ed(0x19b)]=-0x1]=_0x3c63ed(0x19b),_0x2e779d))(I||{}),v=(_0x55c348=>(_0x55c348[_0x55c348[_0x3c63ed(0x1ac)]=0x0]=_0x3c63ed(0x1ac),_0x55c348[_0x55c348[_0x3c63ed(0x18e)]=0x1]=_0x3c63ed(0x18e),_0x55c348[_0x55c348[_0x3c63ed(0x151)]=0x2]=_0x3c63ed(0x151),_0x55c348[_0x55c348[_0x3c63ed(0x1b2)]=0x3]=_0x3c63ed(0x1b2),_0x55c348[_0x55c348['Delete']=0x4]='Delete',_0x55c348[_0x55c348['Solve']=0x5]=_0x3c63ed(0x196),_0x55c348[_0x55c348[_0x3c63ed(0x19b)]=-0x1]='UNRECOGNIZED',_0x55c348))(v||{});const D=_0x3fe9d5=>_0x14457b(new Date(+_0x3fe9d5))[_0x3c63ed(0x19a)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1663fe,_0x58047a)=>{const _0x4cad74=_0x3c63ed,_0x572cc1=_0x1663fe[_0x4cad74(0x171)](_0x317ae9),_0x35d323=_0x1663fe[_0x4cad74(0x171)](_0x304e86);_0x58047a[_0x4cad74(0x16c)](_0x2f3979=>{_0x572cc1['getUser'](_0x2f3979)&&_0x58047a['delete'](_0x2f3979);}),_0x58047a['size']&&(await _0x35d323['get'](_0x4cad74(0x15b),{'params':{'userIDs':[..._0x58047a]}}))[_0x4cad74(0x172)]['users'][_0x4cad74(0x16c)](_0x5d1c9d=>{const _0x451b88=_0x4cad74;_0x5d1c9d&&_0x572cc1[_0x451b88(0x1a1)](_0x5d1c9d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x451b27,_0x283e3c,_0x2793f8,_0x1b07cd)=>{const _0x58b18b=_0x3c63ed;for(var _0x6418b7=_0x1b07cd>0x1?void 0x0:_0x1b07cd?K(_0x283e3c,_0x2793f8):_0x283e3c,_0x14aaac=_0x451b27[_0x58b18b(0x183)]-0x1,_0x3c8ced;_0x14aaac>=0x0;_0x14aaac--)(_0x3c8ced=_0x451b27[_0x14aaac])&&(_0x6418b7=_0x3c8ced(_0x6418b7)||_0x6418b7);return _0x6418b7;},p=(_0x4f1aa2,_0x4012d1)=>(_0xa393cb,_0x26d387)=>_0x4012d1(_0xa393cb,_0x26d387,_0x4f1aa2);let S=class extends _0x2716e8{constructor(_0x23c5b7,_0x745ff8,_0x56678e,_0x128501){const _0xfa3853=_0x3c63ed;super(),this['_commentService']=_0x23c5b7,this[_0xfa3853(0x1a9)]=_0x745ff8,this[_0xfa3853(0x17d)]=_0x56678e,this[_0xfa3853(0x15c)]=_0x128501,this[_0xfa3853(0x14d)](),this[_0xfa3853(0x159)]();}[_0x3c63ed(0x159)](){const _0x5e4b01=_0x3c63ed;this['disposeWithMe'](this['_threadCommentModel'][_0x5e4b01(0x18a)][_0x5e4b01(0x18f)](_0x96ccfa(0x10))[_0x5e4b01(0x1a2)](_0x2682e5=>{const _0x480d90=_0x5e4b01,_0x32e5b3=new Set();_0x2682e5[_0x480d90(0x16c)](_0x3623e6=>{const _0x5bc62f=_0x480d90;switch(_0x3623e6[_0x5bc62f(0x165)]){case _0x5bc62f(0x164):{const _0x436779=_0x3623e6[_0x5bc62f(0x162)][_0x5bc62f(0x17e)];_0x32e5b3['add'](_0x436779);break;}}}),B(this[_0x480d90(0x15c)],_0x32e5b3);}));}[_0x3c63ed(0x14d)](){const _0xae3974=_0x3c63ed;this[_0xae3974(0x17a)](this[_0xae3974(0x1a6)][_0xae3974(0x18a)][_0xae3974(0x1a2)](async _0x5cc814=>{const _0x222feb=_0xae3974;var _0x3e32e0,_0x44e89d,_0x1eaf2e,_0x3f3b6e;const _0x2afde6=(_0x3e32e0=this[_0x222feb(0x1a9)][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x475902=>_0x475902[_0x222feb(0x14f)]===_0x5cc814['threadId']))==null?void 0x0:_0x3e32e0[_0x222feb(0x180)];if(!_0x2afde6)return;const {unitId:_0x36011c,subUnitId:_0xa120c9}=_0x2afde6;switch(_0x5cc814[_0x222feb(0x150)]&&this[_0x222feb(0x17d)][_0x222feb(0x1a1)](_0x5cc814[_0x222feb(0x150)]),_0x5cc814[_0x222feb(0x165)]){case v['Add']:break;case v[_0x222feb(0x151)]:{this[_0x222feb(0x1a9)][_0x222feb(0x156)](_0x36011c,_0xa120c9,{'unitId':_0x36011c,'subUnitId':_0xa120c9,'ref':'','id':_0x5cc814[_0x222feb(0x15d)],'dT':D(+_0x5cc814[_0x222feb(0x15e)]),'threadId':_0x5cc814['threadId'],'personId':(_0x1eaf2e=(_0x44e89d=_0x5cc814[_0x222feb(0x150)])==null?void 0x0:_0x44e89d[_0x222feb(0x192)])!=null?_0x1eaf2e:_0x5cc814[_0x222feb(0x193)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)]),'parentId':_0x2afde6['id']});break;}case v[_0x222feb(0x184)]:{const _0x3ebf55=this[_0x222feb(0x1a9)]['getComment'](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);_0x3ebf55&&_0x3ebf55[_0x222feb(0x18d)]&&this[_0x222feb(0x1a9)][_0x222feb(0x1ad)](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);break;}case v[_0x222feb(0x1b2)]:{this[_0x222feb(0x1a9)][_0x222feb(0x16f)](_0x36011c,_0xa120c9,{'commentId':_0x5cc814[_0x222feb(0x15d)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)])});break;}case v[_0x222feb(0x196)]:{const _0x426ab9=(_0x3f3b6e=this['_threadCommentModel'][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x5b4af8=>_0x5b4af8['threadId']===_0x5cc814['threadId']))==null?void 0x0:_0x3f3b6e[_0x222feb(0x180)];_0x426ab9&&this[_0x222feb(0x1a9)][_0x222feb(0x191)](_0x36011c,_0xa120c9,_0x426ab9['id'],_0x5cc814['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x425bc5(_0x1f5f6e)),p(0x1,_0x425bc5(_0x59fb27)),p(0x2,_0x425bc5(_0x317ae9)),p(0x3,_0x425bc5(_0x344a66))],S);const z=_0x3c63ed(0x174),M={};function _0x3bff(){const _0x355f1=['root','7xabFUC','code','length','Delete','6131556mzMgCx','post','YYYY/MM/DD\x20HH:mm','/list','Solved','commentUpdate$','comment','115822UkcxlL','parentId','Add','pipe','dataSource','resolveComment','userID','userId','map','getUnit','Solve','UNIVER_UNKNOWN','/edit','error','format','UNRECOGNIZED','2208904qfMuHp','symbol','_threadCommentDataSourceService','getOwnPropertyDescriptor','rangeId','addUser','subscribe','rangeType','/add','content','_commentService','OpenOrReOpen','98922IlwSnS','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Unknown','deleteComment','getMemberID','_httpService','solved','values','Edit','resolved','/universer-api/comment/unit/','find','_init','getCurrentUser','threadId','user','Reply','ref','_threadCommentDataSource','_sessionService','COMMENT','addComment','_config','4588808VLXIcy','_initUserSync','/solved','/universer-api/user/list','_injector','replyId','createTimestamp','defineProperty','syncUpdateMutationToColla','/delete','payload','slice','add','type','1837644xLbrNr','24740520IWwCBE','comments','parse','_configService','5gdDrDg','forEach','stringify','_initDataSource','updateComment','replies','get','body','unitId','thread-comment-data-source.config','filter','customRanges','44WDSRZx','users','requireSession','disposeWithMe','pluginName','saveCommentToSnapshot','_userService','personId','onReady'];_0x3bff=function(){return _0x355f1;};return _0x3bff();}var k=Object[_0x3c63ed(0x19f)],Q=(_0x2a53df,_0x46ffd6,_0x3eaaf3,_0x6fd965)=>{const _0x5ef11b=_0x3c63ed;for(var _0x41d4fc=_0x6fd965>0x1?void 0x0:_0x6fd965?k(_0x46ffd6,_0x3eaaf3):_0x46ffd6,_0x2b3a8a=_0x2a53df[_0x5ef11b(0x183)]-0x1,_0xdcbdb3;_0x2b3a8a>=0x0;_0x2b3a8a--)(_0xdcbdb3=_0x2a53df[_0x2b3a8a])&&(_0x41d4fc=_0xdcbdb3(_0x41d4fc)||_0x41d4fc);return _0x41d4fc;},_=(_0x307121,_0x2a147f)=>(_0x3b7da5,_0x296027)=>_0x2a147f(_0x3b7da5,_0x296027,_0x307121);function X(_0x24292c,_0x1654b7){const _0x52c8bd=_0x3c63ed,_0x1abff8=_0x24292c['replies'][0x0];return{..._0x1654b7,'id':_0x1abff8[_0x52c8bd(0x15d)],'resolved':_0x24292c[_0x52c8bd(0x1b0)]===0x1,'dT':D(_0x1abff8[_0x52c8bd(0x15e)]),'personId':_0x1abff8['userId'],'threadId':_0x1abff8[_0x52c8bd(0x14f)]};}function _0x686a(_0x5c6a6e,_0x288393){const _0x3bff5c=_0x3bff();return _0x686a=function(_0x686a8c,_0x412f48){_0x686a8c=_0x686a8c-0x14a;let _0x5f3735=_0x3bff5c[_0x686a8c];return _0x5f3735;},_0x686a(_0x5c6a6e,_0x288393);}function ee(_0x3305ff,_0x51a84d,_0x50c7b9){const _0x52f9b2=_0x3c63ed;var _0x477239,_0x4c047a;if(((_0x4c047a=(_0x477239=_0x3305ff==null?void 0x0:_0x3305ff['replies'])==null?void 0x0:_0x477239[_0x52f9b2(0x183)])!=null?_0x4c047a:0x0)>0x0){const _0x100400=(_0x20adbf,_0x20531b)=>({'id':_0x20adbf['replyId'],'threadId':_0x20adbf[_0x52f9b2(0x14f)],'dT':D(_0x20adbf[_0x52f9b2(0x15e)]),'personId':_0x20adbf[_0x52f9b2(0x193)],'resolved':_0x3305ff[_0x52f9b2(0x1b0)]===I['Solved'],'unitId':_0x51a84d,'subUnitId':_0x50c7b9,'text':JSON[_0x52f9b2(0x169)](_0x20adbf[_0x52f9b2(0x1a5)]),'parentId':_0x20531b}),_0xdd1115=_0x100400(_0x3305ff[_0x52f9b2(0x170)][0x0]);return{..._0xdd1115,'children':_0x3305ff[_0x52f9b2(0x170)][_0x52f9b2(0x163)](0x1)[_0x52f9b2(0x194)](_0x332701=>_0x100400(_0x332701,_0xdd1115['id']))};}return null;}let f=class{constructor(_0x47b64e,_0x425db8,_0x1cffad,_0x49b19a){const _0x2422cb=_0x3c63ed;this['_httpService']=_0x47b64e,this['_userService']=_0x425db8,this[_0x2422cb(0x154)]=_0x1cffad,this[_0x2422cb(0x15c)]=_0x49b19a;}async['addComment'](_0x18a112){const _0x37b0b0=_0x3c63ed;var _0x4de9cd,_0x5cc8a4;const {parentId:_0x18c17b,unitId:_0x268d8f,text:_0x13845d,threadId:_0x141ba7}=_0x18a112,_0xa56beb=(_0x5cc8a4=(_0x4de9cd=_0x13845d['customRanges'])==null?void 0x0:_0x4de9cd[_0x37b0b0(0x175)](_0x3e5fcd=>_0x3e5fcd['rangeType']===_0x4c58ab[_0x37b0b0(0x155)])[_0x37b0b0(0x194)](_0x5eea5a=>_0x5eea5a[_0x37b0b0(0x1a0)]))!=null?_0x5cc8a4:[],_0x1a54a2=JSON[_0x37b0b0(0x16d)](_0x13845d),_0x437d03=(await this[_0x37b0b0(0x154)]['requireSession'](_0x268d8f))[_0x37b0b0(0x1ae)]();if(_0x18c17b){const _0x440ce9={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb,'threadId':_0x141ba7},_0x2889dd=(await this[_0x37b0b0(0x1af)][_0x37b0b0(0x186)]('/universer-api/comment/unit/'+_0x268d8f+'/reply',{'body':_0x440ce9}))[_0x37b0b0(0x172)]['reply'];return{..._0x18a112,'id':_0x2889dd[_0x37b0b0(0x15d)],'dT':_0x14457b(+_0x2889dd[_0x37b0b0(0x15e)])[_0x37b0b0(0x19a)](_0x37b0b0(0x187)),'personId':_0x2889dd[_0x37b0b0(0x193)]};}else{const _0x5020e4={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb},_0x2e81b4=await this[_0x37b0b0(0x1af)]['post'](_0x37b0b0(0x14b)+_0x268d8f+_0x37b0b0(0x1a4),{'body':_0x5020e4});return X(_0x2e81b4[_0x37b0b0(0x172)][_0x37b0b0(0x18b)],_0x18a112);}}async[_0x3c63ed(0x16f)](_0x249932){const _0x5f4b14=_0x3c63ed;var _0x3ec8a5,_0x4e2358;const {text:_0x197fc4,unitId:_0x7f71fa}=_0x249932,_0x23abbe=(_0x4e2358=(_0x3ec8a5=_0x197fc4[_0x5f4b14(0x176)])==null?void 0x0:_0x3ec8a5[_0x5f4b14(0x175)](_0x444088=>_0x444088[_0x5f4b14(0x1a3)]===_0x4c58ab[_0x5f4b14(0x155)])[_0x5f4b14(0x194)](_0x367d9b=>_0x367d9b[_0x5f4b14(0x1a0)]))!=null?_0x4e2358:[],_0x4cbbb6=JSON[_0x5f4b14(0x16d)](_0x197fc4),_0x1aa320=_0x249932[_0x5f4b14(0x14f)],_0x46b9da=_0x249932['id'],_0x35c560={'memberId':(await this[_0x5f4b14(0x154)][_0x5f4b14(0x179)](_0x7f71fa))[_0x5f4b14(0x1ae)](),'unitId':_0x7f71fa,'threadId':_0x1aa320,'mention':_0x23abbe,'content':_0x4cbbb6,'replyId':_0x46b9da},_0x4f1b47=await this[_0x5f4b14(0x1af)][_0x5f4b14(0x186)](_0x5f4b14(0x14b)+_0x7f71fa+_0x5f4b14(0x198),{'body':_0x35c560});return!_0x4f1b47['body'][_0x5f4b14(0x199)]||_0x4f1b47[_0x5f4b14(0x172)][_0x5f4b14(0x199)][_0x5f4b14(0x182)]===0x1;}async[_0x3c63ed(0x191)](_0x392ce4){const _0x27730d=_0x3c63ed,{unitId:_0x2867dd}=_0x392ce4,_0x1d2b9d=_0x392ce4[_0x27730d(0x14f)],_0x4f08c0={'memberId':this['_userService'][_0x27730d(0x14e)]()[_0x27730d(0x192)],'unitId':_0x2867dd,'threadId':_0x1d2b9d,'solved':_0x392ce4[_0x27730d(0x14a)]?I[_0x27730d(0x189)]:I[_0x27730d(0x1a7)]},_0x5dd1d7=await this['_httpService'][_0x27730d(0x186)](_0x27730d(0x14b)+_0x2867dd+_0x27730d(0x15a),{'body':_0x4f08c0});return!_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)]||_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)][_0x27730d(0x182)]===0x1;}async[_0x3c63ed(0x1ad)](_0x94fe1e,_0x2ef399,_0x20550b,_0x294995){const _0xd1603e=_0x3c63ed,_0x12c4e1={'memberId':(await this['_sessionService'][_0xd1603e(0x179)](_0x94fe1e))[_0xd1603e(0x1ae)](),'threadId':_0x20550b,'replyId':_0x294995,'unitId':_0x94fe1e},_0x5481e4=await this[_0xd1603e(0x1af)][_0xd1603e(0x186)]('/universer-api/comment/unit/'+_0x94fe1e+_0xd1603e(0x161),{'body':_0x12c4e1});return!_0x5481e4['body'][_0xd1603e(0x199)]||_0x5481e4['body'][_0xd1603e(0x199)]['code']===0x1;}async['listComments'](_0x321d5c,_0x4b8858,_0xac451c){const _0x2c0667=_0x3c63ed,_0x25052d={'unitId':_0x321d5c,'threadId':_0xac451c},_0x1e52a4=await this[_0x2c0667(0x1af)]['post'](_0x2c0667(0x14b)+_0x321d5c+_0x2c0667(0x188),{'body':_0x25052d}),_0x56a9dd=_0xac451c['map'](_0x3a1138=>ee(_0x1e52a4['body'][_0x2c0667(0x168)][_0x3a1138],_0x321d5c,_0x4b8858))[_0x2c0667(0x175)](Boolean);return Object[_0x2c0667(0x1b1)](_0x1e52a4[_0x2c0667(0x172)][_0x2c0667(0x178)])[_0x2c0667(0x16c)](_0x1fc7b3=>{const _0x439cf7=_0x2c0667;this[_0x439cf7(0x17d)][_0x439cf7(0x1a1)](_0x1fc7b3);}),_0x56a9dd;}[_0x3c63ed(0x17c)](_0x537f4b){const _0x21bf08=_0x3c63ed;return{'id':_0x537f4b['id'],'threadId':_0x537f4b[_0x21bf08(0x14f)],'ref':_0x537f4b[_0x21bf08(0x152)]};}};f=Q([_(0x0,_0x425bc5(_0x304e86)),_(0x1,_0x425bc5(_0x317ae9)),_(0x2,_0x425bc5(_0x30fdc0)),_(0x3,_0x425bc5(_0x344a66))],f);var re=Object[_0x3c63ed(0x19f)],te=(_0x34183c,_0x4e4908,_0x4231c3,_0x40a9a0)=>{const _0x5da59a=_0x3c63ed;for(var _0x235181=_0x40a9a0>0x1?void 0x0:_0x40a9a0?re(_0x4e4908,_0x4231c3):_0x4e4908,_0x237e65=_0x34183c[_0x5da59a(0x183)]-0x1,_0x2f0892;_0x237e65>=0x0;_0x237e65--)(_0x2f0892=_0x34183c[_0x237e65])&&(_0x235181=_0x2f0892(_0x235181)||_0x235181);return _0x235181;},N=(_0x31157a,_0x51530e)=>(_0x543ed6,_0x1076f5)=>_0x51530e(_0x543ed6,_0x1076f5,_0x31157a);let g=class extends _0x2716e8{constructor(_0x2cd2c9,_0x51b281){const _0x365d70=_0x3c63ed;super(),this[_0x365d70(0x19e)]=_0x2cd2c9,this[_0x365d70(0x153)]=_0x51b281,this[_0x365d70(0x16e)]();}[_0x3c63ed(0x16e)](){const _0x2e4853=_0x3c63ed;this[_0x2e4853(0x19e)][_0x2e4853(0x190)]=this[_0x2e4853(0x153)],this['_threadCommentDataSourceService'][_0x2e4853(0x160)]=!0x1;}};g=te([N(0x0,_0x581906),N(0x1,_0x425bc5(f))],g);var se=Object[_0x3c63ed(0x15f)],oe=Object[_0x3c63ed(0x19f)],ne=(_0x479751,_0x4511e8,_0xd8d38)=>_0x4511e8 in _0x479751?se(_0x479751,_0x4511e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd8d38}):_0x479751[_0x4511e8]=_0xd8d38,ie=(_0x5b84ea,_0x10579c,_0x4e461a,_0x1ea4d7)=>{const _0x44fd1d=_0x3c63ed;for(var _0x496f45=_0x1ea4d7>0x1?void 0x0:_0x1ea4d7?oe(_0x10579c,_0x4e461a):_0x10579c,_0x50cf11=_0x5b84ea[_0x44fd1d(0x183)]-0x1,_0x132741;_0x50cf11>=0x0;_0x50cf11--)(_0x132741=_0x5b84ea[_0x50cf11])&&(_0x496f45=_0x132741(_0x496f45)||_0x496f45);return _0x496f45;},w=(_0xcff464,_0x3f2ac1)=>(_0x1c76e7,_0x4831f0)=>_0x3f2ac1(_0x1c76e7,_0x4831f0,_0xcff464),$=(_0x26f3f0,_0x38520f,_0x2a7ef9)=>ne(_0x26f3f0,typeof _0x38520f!=_0x3c63ed(0x19d)?_0x38520f+'':_0x38520f,_0x2a7ef9);let b=class extends _0x417ad6{constructor(_0x15f88f=M,_0x160114,_0x298029){const _0x11e597=_0x3c63ed;super(),this[_0x11e597(0x157)]=_0x15f88f,this[_0x11e597(0x15c)]=_0x160114,this[_0x11e597(0x16a)]=_0x298029;const {..._0x35d6f0}=_0x4aed61({},M,this['_config']);this[_0x11e597(0x16a)][_0x11e597(0x1ab)](z,_0x35d6f0);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5dac36=>{const _0x153554=_0x686a;this[_0x153554(0x15c)]['add'](_0x5dac36);});}[_0x3c63ed(0x17f)](){const _0x5ef403=_0x3c63ed;this[_0x5ef403(0x15c)]['get'](g),this['_injector'][_0x5ef403(0x171)](S);}};$(b,_0x3c63ed(0x17b),W),$(b,_0x3c63ed(0x165),_0xe14618[_0x3c63ed(0x197)]),b=ie([_0x440a04(_0x21fc1f,_0x1f70fd,_0x1df8ef),w(0x1,_0x425bc5(_0x344a66)),w(0x2,_0x5bacb3)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xc6c135=_0x35e4;function _0x35e4(_0x4c599a,_0x3aa4d2){const _0x4115b3=_0x4115();return _0x35e4=function(_0x35e4fb,_0x436346){_0x35e4fb=_0x35e4fb-0x159;let _0x347a43=_0x4115b3[_0x35e4fb];return _0x347a43;},_0x35e4(_0x4c599a,_0x3aa4d2);}(function(_0x42f958,_0x43eb22){const _0x5a6d36=_0x35e4,_0xff005e=_0x42f958();while(!![]){try{const _0x26b285=parseInt(_0x5a6d36(0x1ac))/0x1+parseInt(_0x5a6d36(0x175))/0x2*(parseInt(_0x5a6d36(0x1bc))/0x3)+parseInt(_0x5a6d36(0x1b4))/0x4*(-parseInt(_0x5a6d36(0x183))/0x5)+-parseInt(_0x5a6d36(0x17c))/0x6+parseInt(_0x5a6d36(0x196))/0x7*(parseInt(_0x5a6d36(0x191))/0x8)+parseInt(_0x5a6d36(0x1a5))/0x9+-parseInt(_0x5a6d36(0x164))/0xa;if(_0x26b285===_0x43eb22)break;else _0xff005e['push'](_0xff005e['shift']());}catch(_0x45f609){_0xff005e['push'](_0xff005e['shift']());}}}(_0x4115,0xcfe72));import{CommentService as _0x75a96,CollaborationSessionService as _0x280790,UniverCollaborationClientPlugin as _0xa3f3e9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x9765a9}from'@univerjs-pro/license';import{dayjs as _0x5ef481,UserManagerService as _0x574c01,Inject as _0x84ffbf,Injector as _0x93512b,Disposable as _0x2bdf5c,CustomRangeType as _0x4dc66a,UniverInstanceType as _0x382fac,DependentOn as _0x4a801c,IConfigService as _0x45c697,Plugin as _0x5c11fa,merge as _0xebc91d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x203cc9}from'@univerjs/thread-comment-ui';function _0x4115(){const _0x140b6f=['userId','onReady','subscribe','_userService','length','requireSession','content','values','getOwnPropertyDescriptor','rangeId','6foBYnj','delete','dataSource','root','solved','saveCommentToSnapshot','/solved','2380230BZmims','error','getUnit','parentId','find','/universer-api/user/list','stringify','83485bCKcdS','getCurrentUser','Solve','add','_initUserSync','threadId','disposeWithMe','defineProperty','_threadCommentModel','rangeType','replyId','_commentService','updateComment','_sessionService','4846976vwqoDF','_threadCommentDataSource','map','_init','get','7OnlmfA','body','UNIVER_UNKNOWN','addComment','format','setConfig','/list','deleteComment','UNRECOGNIZED','OpenOrReOpen','parse','pipe','Solved','createTimestamp','_config','11950227LtCRCg','_httpService','Delete','_injector','replies','onStarting','/reply','1011996RZVWCj','syncUpdateMutationToColla','resolveComment','commentUpdate$','getUser','comment','symbol','listComments','328xMbwvo','YYYY/MM/DD\x20HH:mm','_initDataSource','addUser','_configService','Add','/universer-api/comment/unit/','getMemberID','1680543RVQVUW','userID','Reply','user','customRanges','getComment','Unknown','pluginName','type','COMMENT','_threadCommentDataSourceService','reply','forEach','20087850DoXYLP','post','Edit','filter','slice','code','users'];_0x4115=function(){return _0x140b6f;};return _0x4115();}import{ThreadCommentModel as _0x23537b,IThreadCommentDataSourceService as _0x55654f}from'@univerjs/thread-comment';import{bufferTime as _0x7ec75b}from'rxjs';import{HTTPService as _0x36743b}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5af3a3=>(_0x5af3a3[_0x5af3a3[_0xc6c135(0x19f)]=0x0]=_0xc6c135(0x19f),_0x5af3a3[_0x5af3a3[_0xc6c135(0x1a2)]=0x1]='Solved',_0x5af3a3[_0x5af3a3[_0xc6c135(0x19e)]=-0x1]='UNRECOGNIZED',_0x5af3a3))(I||{}),v=(_0x517804=>(_0x517804[_0x517804[_0xc6c135(0x15d)]=0x0]='Unknown',_0x517804[_0x517804['Add']=0x1]='Add',_0x517804[_0x517804[_0xc6c135(0x159)]=0x2]='Reply',_0x517804[_0x517804[_0xc6c135(0x166)]=0x3]=_0xc6c135(0x166),_0x517804[_0x517804[_0xc6c135(0x1a7)]=0x4]=_0xc6c135(0x1a7),_0x517804[_0x517804[_0xc6c135(0x185)]=0x5]=_0xc6c135(0x185),_0x517804[_0x517804[_0xc6c135(0x19e)]=-0x1]='UNRECOGNIZED',_0x517804))(v||{});const D=_0xb164d8=>_0x5ef481(new Date(+_0xb164d8))[_0xc6c135(0x19a)](_0xc6c135(0x1b5)),B=async(_0x4a5c5c,_0x18d7e0)=>{const _0x2d675f=_0xc6c135,_0x526635=_0x4a5c5c[_0x2d675f(0x195)](_0x574c01),_0x516eeb=_0x4a5c5c[_0x2d675f(0x195)](_0x36743b);_0x18d7e0[_0x2d675f(0x163)](_0x590bea=>{const _0x5063c7=_0x2d675f;_0x526635[_0x5063c7(0x1b0)](_0x590bea)&&_0x18d7e0[_0x5063c7(0x176)](_0x590bea);}),_0x18d7e0['size']&&(await _0x516eeb[_0x2d675f(0x195)](_0x2d675f(0x181),{'params':{'userIDs':[..._0x18d7e0]}}))[_0x2d675f(0x197)][_0x2d675f(0x16a)][_0x2d675f(0x163)](_0xa1f84b=>{_0xa1f84b&&_0x526635['addUser'](_0xa1f84b);});};var K=Object[_0xc6c135(0x173)],V=(_0x1f1cc6,_0x1ce59b,_0x202a30,_0x2c2dd9)=>{for(var _0x3e2c61=_0x2c2dd9>0x1?void 0x0:_0x2c2dd9?K(_0x1ce59b,_0x202a30):_0x1ce59b,_0x4eb968=_0x1f1cc6['length']-0x1,_0x1a8750;_0x4eb968>=0x0;_0x4eb968--)(_0x1a8750=_0x1f1cc6[_0x4eb968])&&(_0x3e2c61=_0x1a8750(_0x3e2c61)||_0x3e2c61);return _0x3e2c61;},p=(_0x420bdb,_0x36abbe)=>(_0x378123,_0x5092d4)=>_0x36abbe(_0x378123,_0x5092d4,_0x420bdb);let S=class extends _0x2bdf5c{constructor(_0x5bef9f,_0x1953ed,_0x5070bf,_0x27ef0e){const _0x4e017d=_0xc6c135;super(),this[_0x4e017d(0x18e)]=_0x5bef9f,this['_threadCommentModel']=_0x1953ed,this[_0x4e017d(0x16e)]=_0x5070bf,this[_0x4e017d(0x1a8)]=_0x27ef0e,this[_0x4e017d(0x194)](),this['_initUserSync']();}[_0xc6c135(0x187)](){const _0x26f7a9=_0xc6c135;this[_0x26f7a9(0x189)](this[_0x26f7a9(0x18b)][_0x26f7a9(0x1af)][_0x26f7a9(0x1a1)](_0x7ec75b(0x10))[_0x26f7a9(0x16d)](_0x47c63d=>{const _0x303021=_0x26f7a9,_0x271d0e=new Set();_0x47c63d[_0x303021(0x163)](_0x59cf7e=>{const _0xb020a5=_0x303021;switch(_0x59cf7e[_0xb020a5(0x15f)]){case _0xb020a5(0x186):{const _0x430fda=_0x59cf7e['payload']['personId'];_0x271d0e[_0xb020a5(0x186)](_0x430fda);break;}}}),B(this[_0x303021(0x1a8)],_0x271d0e);}));}[_0xc6c135(0x194)](){const _0x1c5fa0=_0xc6c135;this[_0x1c5fa0(0x189)](this[_0x1c5fa0(0x18e)][_0x1c5fa0(0x1af)][_0x1c5fa0(0x16d)](async _0x24a464=>{const _0x4d1ca4=_0x1c5fa0;var _0x3081f2,_0x484c5c,_0x1c8f1a,_0xcb7cfc;const _0x41721f=(_0x3081f2=this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x17e)](_0x24a464['unitId'])['find'](_0x13988c=>_0x13988c[_0x4d1ca4(0x188)]===_0x24a464[_0x4d1ca4(0x188)]))==null?void 0x0:_0x3081f2[_0x4d1ca4(0x178)];if(!_0x41721f)return;const {unitId:_0x4df85b,subUnitId:_0x3a3642}=_0x41721f;switch(_0x24a464[_0x4d1ca4(0x15a)]&&this[_0x4d1ca4(0x16e)]['addUser'](_0x24a464[_0x4d1ca4(0x15a)]),_0x24a464[_0x4d1ca4(0x15f)]){case v[_0x4d1ca4(0x1b9)]:break;case v[_0x4d1ca4(0x159)]:{this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x199)](_0x4df85b,_0x3a3642,{'unitId':_0x4df85b,'subUnitId':_0x3a3642,'ref':'','id':_0x24a464[_0x4d1ca4(0x18d)],'dT':D(+_0x24a464[_0x4d1ca4(0x1a3)]),'threadId':_0x24a464[_0x4d1ca4(0x188)],'personId':(_0x1c8f1a=(_0x484c5c=_0x24a464[_0x4d1ca4(0x15a)])==null?void 0x0:_0x484c5c[_0x4d1ca4(0x1bd)])!=null?_0x1c8f1a:_0x24a464[_0x4d1ca4(0x16b)],'text':JSON['parse'](_0x24a464[_0x4d1ca4(0x171)]),'parentId':_0x41721f['id']});break;}case v[_0x4d1ca4(0x1a7)]:{const _0x358eb8=this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x15c)](_0x4df85b,_0x3a3642,_0x24a464[_0x4d1ca4(0x18d)]);_0x358eb8&&_0x358eb8[_0x4d1ca4(0x17f)]&&this['_threadCommentModel'][_0x4d1ca4(0x19d)](_0x4df85b,_0x3a3642,_0x24a464['replyId']);break;}case v[_0x4d1ca4(0x166)]:{this[_0x4d1ca4(0x18b)]['updateComment'](_0x4df85b,_0x3a3642,{'commentId':_0x24a464[_0x4d1ca4(0x18d)],'text':JSON[_0x4d1ca4(0x1a0)](_0x24a464[_0x4d1ca4(0x171)])});break;}case v[_0x4d1ca4(0x185)]:{const _0x4c4242=(_0xcb7cfc=this['_threadCommentModel'][_0x4d1ca4(0x17e)](_0x24a464['unitId'])[_0x4d1ca4(0x180)](_0x1b9a83=>_0x1b9a83[_0x4d1ca4(0x188)]===_0x24a464[_0x4d1ca4(0x188)]))==null?void 0x0:_0xcb7cfc[_0x4d1ca4(0x178)];_0x4c4242&&this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x1ae)](_0x4df85b,_0x3a3642,_0x4c4242['id'],_0x24a464[_0x4d1ca4(0x179)]===I[_0x4d1ca4(0x1a2)]);break;}}}));}};S=V([p(0x0,_0x84ffbf(_0x75a96)),p(0x1,_0x84ffbf(_0x23537b)),p(0x2,_0x84ffbf(_0x574c01)),p(0x3,_0x84ffbf(_0x93512b))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0xc6c135(0x173)],Q=(_0x317af6,_0x36dfea,_0x1f66d0,_0x1f0268)=>{const _0x34b912=_0xc6c135;for(var _0x52a2ee=_0x1f0268>0x1?void 0x0:_0x1f0268?k(_0x36dfea,_0x1f66d0):_0x36dfea,_0x31a49a=_0x317af6[_0x34b912(0x16f)]-0x1,_0x21ff54;_0x31a49a>=0x0;_0x31a49a--)(_0x21ff54=_0x317af6[_0x31a49a])&&(_0x52a2ee=_0x21ff54(_0x52a2ee)||_0x52a2ee);return _0x52a2ee;},_=(_0x2b1997,_0x371502)=>(_0xde4616,_0x2165d5)=>_0x371502(_0xde4616,_0x2165d5,_0x2b1997);function X(_0x37d06e,_0x43b204){const _0x331cab=_0xc6c135,_0xe1138e=_0x37d06e[_0x331cab(0x1a9)][0x0];return{..._0x43b204,'id':_0xe1138e[_0x331cab(0x18d)],'resolved':_0x37d06e[_0x331cab(0x179)]===0x1,'dT':D(_0xe1138e['createTimestamp']),'personId':_0xe1138e['userId'],'threadId':_0xe1138e[_0x331cab(0x188)]};}function ee(_0x2c20d0,_0x4848cb,_0x3d2407){const _0x3b5010=_0xc6c135;var _0x1b8a35,_0x4b1a74;if(((_0x4b1a74=(_0x1b8a35=_0x2c20d0==null?void 0x0:_0x2c20d0[_0x3b5010(0x1a9)])==null?void 0x0:_0x1b8a35[_0x3b5010(0x16f)])!=null?_0x4b1a74:0x0)>0x0){const _0x525471=(_0x49be1d,_0x11e89c)=>({'id':_0x49be1d[_0x3b5010(0x18d)],'threadId':_0x49be1d['threadId'],'dT':D(_0x49be1d[_0x3b5010(0x1a3)]),'personId':_0x49be1d[_0x3b5010(0x16b)],'resolved':_0x2c20d0[_0x3b5010(0x179)]===I['Solved'],'unitId':_0x4848cb,'subUnitId':_0x3d2407,'text':JSON[_0x3b5010(0x1a0)](_0x49be1d['content']),'parentId':_0x11e89c}),_0x4511f5=_0x525471(_0x2c20d0[_0x3b5010(0x1a9)][0x0]);return{..._0x4511f5,'children':_0x2c20d0['replies'][_0x3b5010(0x168)](0x1)[_0x3b5010(0x193)](_0x4adbda=>_0x525471(_0x4adbda,_0x4511f5['id']))};}return null;}let f=class{constructor(_0xf593eb,_0x35e543,_0x48119d,_0xfe9d9d){const _0x4bf1a9=_0xc6c135;this[_0x4bf1a9(0x1a6)]=_0xf593eb,this[_0x4bf1a9(0x16e)]=_0x35e543,this[_0x4bf1a9(0x190)]=_0x48119d,this['_injector']=_0xfe9d9d;}async[_0xc6c135(0x199)](_0x5630a2){const _0x16e994=_0xc6c135;var _0x3c6fcd,_0x4977ad;const {parentId:_0x46f1fc,unitId:_0x2eaf17,text:_0x513170,threadId:_0x2bda43}=_0x5630a2,_0x54ec0a=(_0x4977ad=(_0x3c6fcd=_0x513170[_0x16e994(0x15b)])==null?void 0x0:_0x3c6fcd[_0x16e994(0x167)](_0x555b53=>_0x555b53['rangeType']===_0x4dc66a[_0x16e994(0x160)])['map'](_0x4c8902=>_0x4c8902['rangeId']))!=null?_0x4977ad:[],_0x11ad27=JSON[_0x16e994(0x182)](_0x513170),_0xccb56d=(await this['_sessionService']['requireSession'](_0x2eaf17))[_0x16e994(0x1bb)]();if(_0x46f1fc){const _0x5bc3f9={'memberId':_0xccb56d,'unitId':_0x2eaf17,'content':_0x11ad27,'mention':_0x54ec0a,'threadId':_0x2bda43},_0xd5a65f=(await this[_0x16e994(0x1a6)]['post'](_0x16e994(0x1ba)+_0x2eaf17+_0x16e994(0x1ab),{'body':_0x5bc3f9}))['body'][_0x16e994(0x162)];return{..._0x5630a2,'id':_0xd5a65f[_0x16e994(0x18d)],'dT':_0x5ef481(+_0xd5a65f[_0x16e994(0x1a3)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xd5a65f['userId']};}else{const _0x3ef24b={'memberId':_0xccb56d,'unitId':_0x2eaf17,'content':_0x11ad27,'mention':_0x54ec0a},_0x1832e2=await this[_0x16e994(0x1a6)][_0x16e994(0x165)](_0x16e994(0x1ba)+_0x2eaf17+'/add',{'body':_0x3ef24b});return X(_0x1832e2[_0x16e994(0x197)][_0x16e994(0x1b1)],_0x5630a2);}}async[_0xc6c135(0x18f)](_0x13233b){const _0x12cefb=_0xc6c135;var _0x42bb3a,_0x288531;const {text:_0x30ba29,unitId:_0x2c10c8}=_0x13233b,_0x54bc2c=(_0x288531=(_0x42bb3a=_0x30ba29[_0x12cefb(0x15b)])==null?void 0x0:_0x42bb3a[_0x12cefb(0x167)](_0x442c1e=>_0x442c1e[_0x12cefb(0x18c)]===_0x4dc66a[_0x12cefb(0x160)])[_0x12cefb(0x193)](_0x4b5ee1=>_0x4b5ee1[_0x12cefb(0x174)]))!=null?_0x288531:[],_0x394ec7=JSON['stringify'](_0x30ba29),_0x2ed110=_0x13233b[_0x12cefb(0x188)],_0x21fa3b=_0x13233b['id'],_0x551589={'memberId':(await this[_0x12cefb(0x190)][_0x12cefb(0x170)](_0x2c10c8))[_0x12cefb(0x1bb)](),'unitId':_0x2c10c8,'threadId':_0x2ed110,'mention':_0x54bc2c,'content':_0x394ec7,'replyId':_0x21fa3b},_0x47d089=await this[_0x12cefb(0x1a6)][_0x12cefb(0x165)]('/universer-api/comment/unit/'+_0x2c10c8+'/edit',{'body':_0x551589});return!_0x47d089[_0x12cefb(0x197)][_0x12cefb(0x17d)]||_0x47d089[_0x12cefb(0x197)][_0x12cefb(0x17d)][_0x12cefb(0x169)]===0x1;}async[_0xc6c135(0x1ae)](_0x14f2ed){const _0x56259f=_0xc6c135,{unitId:_0x7e080d}=_0x14f2ed,_0x275152=_0x14f2ed['threadId'],_0x48a8c2={'memberId':this['_userService'][_0x56259f(0x184)]()['userID'],'unitId':_0x7e080d,'threadId':_0x275152,'solved':_0x14f2ed['resolved']?I['Solved']:I[_0x56259f(0x19f)]},_0x4486a5=await this[_0x56259f(0x1a6)][_0x56259f(0x165)](_0x56259f(0x1ba)+_0x7e080d+_0x56259f(0x17b),{'body':_0x48a8c2});return!_0x4486a5['body'][_0x56259f(0x17d)]||_0x4486a5[_0x56259f(0x197)][_0x56259f(0x17d)][_0x56259f(0x169)]===0x1;}async[_0xc6c135(0x19d)](_0x3d9ef1,_0x2b2656,_0xd451a1,_0x32e08b){const _0x10a2d9=_0xc6c135,_0x304fdb={'memberId':(await this['_sessionService'][_0x10a2d9(0x170)](_0x3d9ef1))[_0x10a2d9(0x1bb)](),'threadId':_0xd451a1,'replyId':_0x32e08b,'unitId':_0x3d9ef1},_0x23329e=await this['_httpService'][_0x10a2d9(0x165)]('/universer-api/comment/unit/'+_0x3d9ef1+'/delete',{'body':_0x304fdb});return!_0x23329e[_0x10a2d9(0x197)]['error']||_0x23329e[_0x10a2d9(0x197)]['error'][_0x10a2d9(0x169)]===0x1;}async[_0xc6c135(0x1b3)](_0x3bbdd5,_0x3aa994,_0x8b3e29){const _0x3518e3=_0xc6c135,_0x39f113={'unitId':_0x3bbdd5,'threadId':_0x8b3e29},_0x812b7e=await this['_httpService']['post'](_0x3518e3(0x1ba)+_0x3bbdd5+_0x3518e3(0x19c),{'body':_0x39f113}),_0xac1b11=_0x8b3e29[_0x3518e3(0x193)](_0x240135=>ee(_0x812b7e[_0x3518e3(0x197)]['comments'][_0x240135],_0x3bbdd5,_0x3aa994))[_0x3518e3(0x167)](Boolean);return Object[_0x3518e3(0x172)](_0x812b7e[_0x3518e3(0x197)][_0x3518e3(0x16a)])['forEach'](_0x20a6f6=>{const _0x3c02a2=_0x3518e3;this[_0x3c02a2(0x16e)][_0x3c02a2(0x1b7)](_0x20a6f6);}),_0xac1b11;}[_0xc6c135(0x17a)](_0x1b2f41){const _0x23d9af=_0xc6c135;return{'id':_0x1b2f41['id'],'threadId':_0x1b2f41[_0x23d9af(0x188)],'ref':_0x1b2f41['ref']};}};f=Q([_(0x0,_0x84ffbf(_0x36743b)),_(0x1,_0x84ffbf(_0x574c01)),_(0x2,_0x84ffbf(_0x280790)),_(0x3,_0x84ffbf(_0x93512b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x38f05e,_0x12ad83,_0x239328,_0x510dd9)=>{const _0x12f537=_0xc6c135;for(var _0x516f96=_0x510dd9>0x1?void 0x0:_0x510dd9?re(_0x12ad83,_0x239328):_0x12ad83,_0x9444d=_0x38f05e[_0x12f537(0x16f)]-0x1,_0x281928;_0x9444d>=0x0;_0x9444d--)(_0x281928=_0x38f05e[_0x9444d])&&(_0x516f96=_0x281928(_0x516f96)||_0x516f96);return _0x516f96;},N=(_0x5de6e9,_0xf63117)=>(_0x1388ba,_0x160f6d)=>_0xf63117(_0x1388ba,_0x160f6d,_0x5de6e9);let g=class extends _0x2bdf5c{constructor(_0x1ff6f3,_0x18741d){const _0x11d391=_0xc6c135;super(),this['_threadCommentDataSourceService']=_0x1ff6f3,this[_0x11d391(0x192)]=_0x18741d,this[_0x11d391(0x1b6)]();}[_0xc6c135(0x1b6)](){const _0x5eb51c=_0xc6c135;this[_0x5eb51c(0x161)][_0x5eb51c(0x177)]=this[_0x5eb51c(0x192)],this[_0x5eb51c(0x161)][_0x5eb51c(0x1ad)]=!0x1;}};g=te([N(0x0,_0x55654f),N(0x1,_0x84ffbf(f))],g);var se=Object[_0xc6c135(0x18a)],oe=Object[_0xc6c135(0x173)],ne=(_0x2eb2b6,_0x244c20,_0x299ae7)=>_0x244c20 in _0x2eb2b6?se(_0x2eb2b6,_0x244c20,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x299ae7}):_0x2eb2b6[_0x244c20]=_0x299ae7,ie=(_0x268d11,_0x3d56cd,_0xbe0499,_0x27f3c3)=>{const _0xbcfdf8=_0xc6c135;for(var _0x3e1dcd=_0x27f3c3>0x1?void 0x0:_0x27f3c3?oe(_0x3d56cd,_0xbe0499):_0x3d56cd,_0x16cdd9=_0x268d11[_0xbcfdf8(0x16f)]-0x1,_0xeed554;_0x16cdd9>=0x0;_0x16cdd9--)(_0xeed554=_0x268d11[_0x16cdd9])&&(_0x3e1dcd=_0xeed554(_0x3e1dcd)||_0x3e1dcd);return _0x3e1dcd;},w=(_0x5ba4d7,_0x596810)=>(_0x95ba80,_0x404476)=>_0x596810(_0x95ba80,_0x404476,_0x5ba4d7),$=(_0xd1e8f4,_0x494af4,_0xa85fd)=>ne(_0xd1e8f4,typeof _0x494af4!=_0xc6c135(0x1b2)?_0x494af4+'':_0x494af4,_0xa85fd);let b=class extends _0x5c11fa{constructor(_0x27b627=M,_0x4b3019,_0x41c350){const _0x3cd3e5=_0xc6c135;super(),this[_0x3cd3e5(0x1a4)]=_0x27b627,this[_0x3cd3e5(0x1a8)]=_0x4b3019,this['_configService']=_0x41c350;const {..._0x32746b}=_0xebc91d({},M,this[_0x3cd3e5(0x1a4)]);this[_0x3cd3e5(0x1b8)][_0x3cd3e5(0x19b)](z,_0x32746b);}[_0xc6c135(0x1aa)](){const _0x243624=_0xc6c135;[[f],[g],[S]][_0x243624(0x163)](_0x2f5136=>{const _0x132f2f=_0x243624;this[_0x132f2f(0x1a8)]['add'](_0x2f5136);});}[_0xc6c135(0x16c)](){const _0x17264c=_0xc6c135;this[_0x17264c(0x1a8)]['get'](g),this['_injector']['get'](S);}};$(b,_0xc6c135(0x15e),W),$(b,_0xc6c135(0x15f),_0x382fac[_0xc6c135(0x198)]),b=ie([_0x4a801c(_0x203cc9,_0xa3f3e9,_0x9765a9),w(0x1,_0x84ffbf(_0x93512b)),w(0x2,_0x45c697)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3c63ed=_0x686a;(function(_0x404739,_0x224a0e){const _0x3b87b4=_0x686a,_0x239fda=_0x404739();while(!![]){try{const _0x14235d=parseInt(_0x3b87b4(0x18c))/0x1+parseInt(_0x3b87b4(0x177))/0x2*(-parseInt(_0x3b87b4(0x1a8))/0x3)+-parseInt(_0x3b87b4(0x19c))/0x4*(parseInt(_0x3b87b4(0x16b))/0x5)+parseInt(_0x3b87b4(0x166))/0x6+-parseInt(_0x3b87b4(0x181))/0x7*(parseInt(_0x3b87b4(0x158))/0x8)+-parseInt(_0x3b87b4(0x185))/0x9+parseInt(_0x3b87b4(0x167))/0xa;if(_0x14235d===_0x224a0e)break;else _0x239fda['push'](_0x239fda['shift']());}catch(_0x5a5390){_0x239fda['push'](_0x239fda['shift']());}}}(_0x3bff,0x58c59));import{CommentService as _0x1f5f6e,CollaborationSessionService as _0x30fdc0,UniverCollaborationClientPlugin as _0x1f70fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1df8ef}from'@univerjs-pro/license';import{dayjs as _0x14457b,UserManagerService as _0x317ae9,Inject as _0x425bc5,Injector as _0x344a66,Disposable as _0x2716e8,CustomRangeType as _0x4c58ab,UniverInstanceType as _0xe14618,DependentOn as _0x440a04,IConfigService as _0x5bacb3,Plugin as _0x417ad6,merge as _0x4aed61}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21fc1f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59fb27,IThreadCommentDataSourceService as _0x581906}from'@univerjs/thread-comment';import{bufferTime as _0x96ccfa}from'rxjs';import{HTTPService as _0x304e86}from'@univerjs/network';const W=_0x3c63ed(0x1aa);var I=(_0x2e779d=>(_0x2e779d[_0x2e779d[_0x3c63ed(0x1a7)]=0x0]=_0x3c63ed(0x1a7),_0x2e779d[_0x2e779d[_0x3c63ed(0x189)]=0x1]=_0x3c63ed(0x189),_0x2e779d[_0x2e779d[_0x3c63ed(0x19b)]=-0x1]=_0x3c63ed(0x19b),_0x2e779d))(I||{}),v=(_0x55c348=>(_0x55c348[_0x55c348[_0x3c63ed(0x1ac)]=0x0]=_0x3c63ed(0x1ac),_0x55c348[_0x55c348[_0x3c63ed(0x18e)]=0x1]=_0x3c63ed(0x18e),_0x55c348[_0x55c348[_0x3c63ed(0x151)]=0x2]=_0x3c63ed(0x151),_0x55c348[_0x55c348[_0x3c63ed(0x1b2)]=0x3]=_0x3c63ed(0x1b2),_0x55c348[_0x55c348['Delete']=0x4]='Delete',_0x55c348[_0x55c348['Solve']=0x5]=_0x3c63ed(0x196),_0x55c348[_0x55c348[_0x3c63ed(0x19b)]=-0x1]='UNRECOGNIZED',_0x55c348))(v||{});const D=_0x3fe9d5=>_0x14457b(new Date(+_0x3fe9d5))[_0x3c63ed(0x19a)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1663fe,_0x58047a)=>{const _0x4cad74=_0x3c63ed,_0x572cc1=_0x1663fe[_0x4cad74(0x171)](_0x317ae9),_0x35d323=_0x1663fe[_0x4cad74(0x171)](_0x304e86);_0x58047a[_0x4cad74(0x16c)](_0x2f3979=>{_0x572cc1['getUser'](_0x2f3979)&&_0x58047a['delete'](_0x2f3979);}),_0x58047a['size']&&(await _0x35d323['get'](_0x4cad74(0x15b),{'params':{'userIDs':[..._0x58047a]}}))[_0x4cad74(0x172)]['users'][_0x4cad74(0x16c)](_0x5d1c9d=>{const _0x451b88=_0x4cad74;_0x5d1c9d&&_0x572cc1[_0x451b88(0x1a1)](_0x5d1c9d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x451b27,_0x283e3c,_0x2793f8,_0x1b07cd)=>{const _0x58b18b=_0x3c63ed;for(var _0x6418b7=_0x1b07cd>0x1?void 0x0:_0x1b07cd?K(_0x283e3c,_0x2793f8):_0x283e3c,_0x14aaac=_0x451b27[_0x58b18b(0x183)]-0x1,_0x3c8ced;_0x14aaac>=0x0;_0x14aaac--)(_0x3c8ced=_0x451b27[_0x14aaac])&&(_0x6418b7=_0x3c8ced(_0x6418b7)||_0x6418b7);return _0x6418b7;},p=(_0x4f1aa2,_0x4012d1)=>(_0xa393cb,_0x26d387)=>_0x4012d1(_0xa393cb,_0x26d387,_0x4f1aa2);let S=class extends _0x2716e8{constructor(_0x23c5b7,_0x745ff8,_0x56678e,_0x128501){const _0xfa3853=_0x3c63ed;super(),this['_commentService']=_0x23c5b7,this[_0xfa3853(0x1a9)]=_0x745ff8,this[_0xfa3853(0x17d)]=_0x56678e,this[_0xfa3853(0x15c)]=_0x128501,this[_0xfa3853(0x14d)](),this[_0xfa3853(0x159)]();}[_0x3c63ed(0x159)](){const _0x5e4b01=_0x3c63ed;this['disposeWithMe'](this['_threadCommentModel'][_0x5e4b01(0x18a)][_0x5e4b01(0x18f)](_0x96ccfa(0x10))[_0x5e4b01(0x1a2)](_0x2682e5=>{const _0x480d90=_0x5e4b01,_0x32e5b3=new Set();_0x2682e5[_0x480d90(0x16c)](_0x3623e6=>{const _0x5bc62f=_0x480d90;switch(_0x3623e6[_0x5bc62f(0x165)]){case _0x5bc62f(0x164):{const _0x436779=_0x3623e6[_0x5bc62f(0x162)][_0x5bc62f(0x17e)];_0x32e5b3['add'](_0x436779);break;}}}),B(this[_0x480d90(0x15c)],_0x32e5b3);}));}[_0x3c63ed(0x14d)](){const _0xae3974=_0x3c63ed;this[_0xae3974(0x17a)](this[_0xae3974(0x1a6)][_0xae3974(0x18a)][_0xae3974(0x1a2)](async _0x5cc814=>{const _0x222feb=_0xae3974;var _0x3e32e0,_0x44e89d,_0x1eaf2e,_0x3f3b6e;const _0x2afde6=(_0x3e32e0=this[_0x222feb(0x1a9)][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x475902=>_0x475902[_0x222feb(0x14f)]===_0x5cc814['threadId']))==null?void 0x0:_0x3e32e0[_0x222feb(0x180)];if(!_0x2afde6)return;const {unitId:_0x36011c,subUnitId:_0xa120c9}=_0x2afde6;switch(_0x5cc814[_0x222feb(0x150)]&&this[_0x222feb(0x17d)][_0x222feb(0x1a1)](_0x5cc814[_0x222feb(0x150)]),_0x5cc814[_0x222feb(0x165)]){case v['Add']:break;case v[_0x222feb(0x151)]:{this[_0x222feb(0x1a9)][_0x222feb(0x156)](_0x36011c,_0xa120c9,{'unitId':_0x36011c,'subUnitId':_0xa120c9,'ref':'','id':_0x5cc814[_0x222feb(0x15d)],'dT':D(+_0x5cc814[_0x222feb(0x15e)]),'threadId':_0x5cc814['threadId'],'personId':(_0x1eaf2e=(_0x44e89d=_0x5cc814[_0x222feb(0x150)])==null?void 0x0:_0x44e89d[_0x222feb(0x192)])!=null?_0x1eaf2e:_0x5cc814[_0x222feb(0x193)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)]),'parentId':_0x2afde6['id']});break;}case v[_0x222feb(0x184)]:{const _0x3ebf55=this[_0x222feb(0x1a9)]['getComment'](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);_0x3ebf55&&_0x3ebf55[_0x222feb(0x18d)]&&this[_0x222feb(0x1a9)][_0x222feb(0x1ad)](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);break;}case v[_0x222feb(0x1b2)]:{this[_0x222feb(0x1a9)][_0x222feb(0x16f)](_0x36011c,_0xa120c9,{'commentId':_0x5cc814[_0x222feb(0x15d)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)])});break;}case v[_0x222feb(0x196)]:{const _0x426ab9=(_0x3f3b6e=this['_threadCommentModel'][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x5b4af8=>_0x5b4af8['threadId']===_0x5cc814['threadId']))==null?void 0x0:_0x3f3b6e[_0x222feb(0x180)];_0x426ab9&&this[_0x222feb(0x1a9)][_0x222feb(0x191)](_0x36011c,_0xa120c9,_0x426ab9['id'],_0x5cc814['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x425bc5(_0x1f5f6e)),p(0x1,_0x425bc5(_0x59fb27)),p(0x2,_0x425bc5(_0x317ae9)),p(0x3,_0x425bc5(_0x344a66))],S);const z=_0x3c63ed(0x174),M={};function _0x3bff(){const _0x355f1=['root','7xabFUC','code','length','Delete','6131556mzMgCx','post','YYYY/MM/DD\x20HH:mm','/list','Solved','commentUpdate$','comment','115822UkcxlL','parentId','Add','pipe','dataSource','resolveComment','userID','userId','map','getUnit','Solve','UNIVER_UNKNOWN','/edit','error','format','UNRECOGNIZED','2208904qfMuHp','symbol','_threadCommentDataSourceService','getOwnPropertyDescriptor','rangeId','addUser','subscribe','rangeType','/add','content','_commentService','OpenOrReOpen','98922IlwSnS','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Unknown','deleteComment','getMemberID','_httpService','solved','values','Edit','resolved','/universer-api/comment/unit/','find','_init','getCurrentUser','threadId','user','Reply','ref','_threadCommentDataSource','_sessionService','COMMENT','addComment','_config','4588808VLXIcy','_initUserSync','/solved','/universer-api/user/list','_injector','replyId','createTimestamp','defineProperty','syncUpdateMutationToColla','/delete','payload','slice','add','type','1837644xLbrNr','24740520IWwCBE','comments','parse','_configService','5gdDrDg','forEach','stringify','_initDataSource','updateComment','replies','get','body','unitId','thread-comment-data-source.config','filter','customRanges','44WDSRZx','users','requireSession','disposeWithMe','pluginName','saveCommentToSnapshot','_userService','personId','onReady'];_0x3bff=function(){return _0x355f1;};return _0x3bff();}var k=Object[_0x3c63ed(0x19f)],Q=(_0x2a53df,_0x46ffd6,_0x3eaaf3,_0x6fd965)=>{const _0x5ef11b=_0x3c63ed;for(var _0x41d4fc=_0x6fd965>0x1?void 0x0:_0x6fd965?k(_0x46ffd6,_0x3eaaf3):_0x46ffd6,_0x2b3a8a=_0x2a53df[_0x5ef11b(0x183)]-0x1,_0xdcbdb3;_0x2b3a8a>=0x0;_0x2b3a8a--)(_0xdcbdb3=_0x2a53df[_0x2b3a8a])&&(_0x41d4fc=_0xdcbdb3(_0x41d4fc)||_0x41d4fc);return _0x41d4fc;},_=(_0x307121,_0x2a147f)=>(_0x3b7da5,_0x296027)=>_0x2a147f(_0x3b7da5,_0x296027,_0x307121);function X(_0x24292c,_0x1654b7){const _0x52c8bd=_0x3c63ed,_0x1abff8=_0x24292c['replies'][0x0];return{..._0x1654b7,'id':_0x1abff8[_0x52c8bd(0x15d)],'resolved':_0x24292c[_0x52c8bd(0x1b0)]===0x1,'dT':D(_0x1abff8[_0x52c8bd(0x15e)]),'personId':_0x1abff8['userId'],'threadId':_0x1abff8[_0x52c8bd(0x14f)]};}function _0x686a(_0x5c6a6e,_0x288393){const _0x3bff5c=_0x3bff();return _0x686a=function(_0x686a8c,_0x412f48){_0x686a8c=_0x686a8c-0x14a;let _0x5f3735=_0x3bff5c[_0x686a8c];return _0x5f3735;},_0x686a(_0x5c6a6e,_0x288393);}function ee(_0x3305ff,_0x51a84d,_0x50c7b9){const _0x52f9b2=_0x3c63ed;var _0x477239,_0x4c047a;if(((_0x4c047a=(_0x477239=_0x3305ff==null?void 0x0:_0x3305ff['replies'])==null?void 0x0:_0x477239[_0x52f9b2(0x183)])!=null?_0x4c047a:0x0)>0x0){const _0x100400=(_0x20adbf,_0x20531b)=>({'id':_0x20adbf['replyId'],'threadId':_0x20adbf[_0x52f9b2(0x14f)],'dT':D(_0x20adbf[_0x52f9b2(0x15e)]),'personId':_0x20adbf[_0x52f9b2(0x193)],'resolved':_0x3305ff[_0x52f9b2(0x1b0)]===I['Solved'],'unitId':_0x51a84d,'subUnitId':_0x50c7b9,'text':JSON[_0x52f9b2(0x169)](_0x20adbf[_0x52f9b2(0x1a5)]),'parentId':_0x20531b}),_0xdd1115=_0x100400(_0x3305ff[_0x52f9b2(0x170)][0x0]);return{..._0xdd1115,'children':_0x3305ff[_0x52f9b2(0x170)][_0x52f9b2(0x163)](0x1)[_0x52f9b2(0x194)](_0x332701=>_0x100400(_0x332701,_0xdd1115['id']))};}return null;}let f=class{constructor(_0x47b64e,_0x425db8,_0x1cffad,_0x49b19a){const _0x2422cb=_0x3c63ed;this['_httpService']=_0x47b64e,this['_userService']=_0x425db8,this[_0x2422cb(0x154)]=_0x1cffad,this[_0x2422cb(0x15c)]=_0x49b19a;}async['addComment'](_0x18a112){const _0x37b0b0=_0x3c63ed;var _0x4de9cd,_0x5cc8a4;const {parentId:_0x18c17b,unitId:_0x268d8f,text:_0x13845d,threadId:_0x141ba7}=_0x18a112,_0xa56beb=(_0x5cc8a4=(_0x4de9cd=_0x13845d['customRanges'])==null?void 0x0:_0x4de9cd[_0x37b0b0(0x175)](_0x3e5fcd=>_0x3e5fcd['rangeType']===_0x4c58ab[_0x37b0b0(0x155)])[_0x37b0b0(0x194)](_0x5eea5a=>_0x5eea5a[_0x37b0b0(0x1a0)]))!=null?_0x5cc8a4:[],_0x1a54a2=JSON[_0x37b0b0(0x16d)](_0x13845d),_0x437d03=(await this[_0x37b0b0(0x154)]['requireSession'](_0x268d8f))[_0x37b0b0(0x1ae)]();if(_0x18c17b){const _0x440ce9={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb,'threadId':_0x141ba7},_0x2889dd=(await this[_0x37b0b0(0x1af)][_0x37b0b0(0x186)]('/universer-api/comment/unit/'+_0x268d8f+'/reply',{'body':_0x440ce9}))[_0x37b0b0(0x172)]['reply'];return{..._0x18a112,'id':_0x2889dd[_0x37b0b0(0x15d)],'dT':_0x14457b(+_0x2889dd[_0x37b0b0(0x15e)])[_0x37b0b0(0x19a)](_0x37b0b0(0x187)),'personId':_0x2889dd[_0x37b0b0(0x193)]};}else{const _0x5020e4={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb},_0x2e81b4=await this[_0x37b0b0(0x1af)]['post'](_0x37b0b0(0x14b)+_0x268d8f+_0x37b0b0(0x1a4),{'body':_0x5020e4});return X(_0x2e81b4[_0x37b0b0(0x172)][_0x37b0b0(0x18b)],_0x18a112);}}async[_0x3c63ed(0x16f)](_0x249932){const _0x5f4b14=_0x3c63ed;var _0x3ec8a5,_0x4e2358;const {text:_0x197fc4,unitId:_0x7f71fa}=_0x249932,_0x23abbe=(_0x4e2358=(_0x3ec8a5=_0x197fc4[_0x5f4b14(0x176)])==null?void 0x0:_0x3ec8a5[_0x5f4b14(0x175)](_0x444088=>_0x444088[_0x5f4b14(0x1a3)]===_0x4c58ab[_0x5f4b14(0x155)])[_0x5f4b14(0x194)](_0x367d9b=>_0x367d9b[_0x5f4b14(0x1a0)]))!=null?_0x4e2358:[],_0x4cbbb6=JSON[_0x5f4b14(0x16d)](_0x197fc4),_0x1aa320=_0x249932[_0x5f4b14(0x14f)],_0x46b9da=_0x249932['id'],_0x35c560={'memberId':(await this[_0x5f4b14(0x154)][_0x5f4b14(0x179)](_0x7f71fa))[_0x5f4b14(0x1ae)](),'unitId':_0x7f71fa,'threadId':_0x1aa320,'mention':_0x23abbe,'content':_0x4cbbb6,'replyId':_0x46b9da},_0x4f1b47=await this[_0x5f4b14(0x1af)][_0x5f4b14(0x186)](_0x5f4b14(0x14b)+_0x7f71fa+_0x5f4b14(0x198),{'body':_0x35c560});return!_0x4f1b47['body'][_0x5f4b14(0x199)]||_0x4f1b47[_0x5f4b14(0x172)][_0x5f4b14(0x199)][_0x5f4b14(0x182)]===0x1;}async[_0x3c63ed(0x191)](_0x392ce4){const _0x27730d=_0x3c63ed,{unitId:_0x2867dd}=_0x392ce4,_0x1d2b9d=_0x392ce4[_0x27730d(0x14f)],_0x4f08c0={'memberId':this['_userService'][_0x27730d(0x14e)]()[_0x27730d(0x192)],'unitId':_0x2867dd,'threadId':_0x1d2b9d,'solved':_0x392ce4[_0x27730d(0x14a)]?I[_0x27730d(0x189)]:I[_0x27730d(0x1a7)]},_0x5dd1d7=await this['_httpService'][_0x27730d(0x186)](_0x27730d(0x14b)+_0x2867dd+_0x27730d(0x15a),{'body':_0x4f08c0});return!_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)]||_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)][_0x27730d(0x182)]===0x1;}async[_0x3c63ed(0x1ad)](_0x94fe1e,_0x2ef399,_0x20550b,_0x294995){const _0xd1603e=_0x3c63ed,_0x12c4e1={'memberId':(await this['_sessionService'][_0xd1603e(0x179)](_0x94fe1e))[_0xd1603e(0x1ae)](),'threadId':_0x20550b,'replyId':_0x294995,'unitId':_0x94fe1e},_0x5481e4=await this[_0xd1603e(0x1af)][_0xd1603e(0x186)]('/universer-api/comment/unit/'+_0x94fe1e+_0xd1603e(0x161),{'body':_0x12c4e1});return!_0x5481e4['body'][_0xd1603e(0x199)]||_0x5481e4['body'][_0xd1603e(0x199)]['code']===0x1;}async['listComments'](_0x321d5c,_0x4b8858,_0xac451c){const _0x2c0667=_0x3c63ed,_0x25052d={'unitId':_0x321d5c,'threadId':_0xac451c},_0x1e52a4=await this[_0x2c0667(0x1af)]['post'](_0x2c0667(0x14b)+_0x321d5c+_0x2c0667(0x188),{'body':_0x25052d}),_0x56a9dd=_0xac451c['map'](_0x3a1138=>ee(_0x1e52a4['body'][_0x2c0667(0x168)][_0x3a1138],_0x321d5c,_0x4b8858))[_0x2c0667(0x175)](Boolean);return Object[_0x2c0667(0x1b1)](_0x1e52a4[_0x2c0667(0x172)][_0x2c0667(0x178)])[_0x2c0667(0x16c)](_0x1fc7b3=>{const _0x439cf7=_0x2c0667;this[_0x439cf7(0x17d)][_0x439cf7(0x1a1)](_0x1fc7b3);}),_0x56a9dd;}[_0x3c63ed(0x17c)](_0x537f4b){const _0x21bf08=_0x3c63ed;return{'id':_0x537f4b['id'],'threadId':_0x537f4b[_0x21bf08(0x14f)],'ref':_0x537f4b[_0x21bf08(0x152)]};}};f=Q([_(0x0,_0x425bc5(_0x304e86)),_(0x1,_0x425bc5(_0x317ae9)),_(0x2,_0x425bc5(_0x30fdc0)),_(0x3,_0x425bc5(_0x344a66))],f);var re=Object[_0x3c63ed(0x19f)],te=(_0x34183c,_0x4e4908,_0x4231c3,_0x40a9a0)=>{const _0x5da59a=_0x3c63ed;for(var _0x235181=_0x40a9a0>0x1?void 0x0:_0x40a9a0?re(_0x4e4908,_0x4231c3):_0x4e4908,_0x237e65=_0x34183c[_0x5da59a(0x183)]-0x1,_0x2f0892;_0x237e65>=0x0;_0x237e65--)(_0x2f0892=_0x34183c[_0x237e65])&&(_0x235181=_0x2f0892(_0x235181)||_0x235181);return _0x235181;},N=(_0x31157a,_0x51530e)=>(_0x543ed6,_0x1076f5)=>_0x51530e(_0x543ed6,_0x1076f5,_0x31157a);let g=class extends _0x2716e8{constructor(_0x2cd2c9,_0x51b281){const _0x365d70=_0x3c63ed;super(),this[_0x365d70(0x19e)]=_0x2cd2c9,this[_0x365d70(0x153)]=_0x51b281,this[_0x365d70(0x16e)]();}[_0x3c63ed(0x16e)](){const _0x2e4853=_0x3c63ed;this[_0x2e4853(0x19e)][_0x2e4853(0x190)]=this[_0x2e4853(0x153)],this['_threadCommentDataSourceService'][_0x2e4853(0x160)]=!0x1;}};g=te([N(0x0,_0x581906),N(0x1,_0x425bc5(f))],g);var se=Object[_0x3c63ed(0x15f)],oe=Object[_0x3c63ed(0x19f)],ne=(_0x479751,_0x4511e8,_0xd8d38)=>_0x4511e8 in _0x479751?se(_0x479751,_0x4511e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd8d38}):_0x479751[_0x4511e8]=_0xd8d38,ie=(_0x5b84ea,_0x10579c,_0x4e461a,_0x1ea4d7)=>{const _0x44fd1d=_0x3c63ed;for(var _0x496f45=_0x1ea4d7>0x1?void 0x0:_0x1ea4d7?oe(_0x10579c,_0x4e461a):_0x10579c,_0x50cf11=_0x5b84ea[_0x44fd1d(0x183)]-0x1,_0x132741;_0x50cf11>=0x0;_0x50cf11--)(_0x132741=_0x5b84ea[_0x50cf11])&&(_0x496f45=_0x132741(_0x496f45)||_0x496f45);return _0x496f45;},w=(_0xcff464,_0x3f2ac1)=>(_0x1c76e7,_0x4831f0)=>_0x3f2ac1(_0x1c76e7,_0x4831f0,_0xcff464),$=(_0x26f3f0,_0x38520f,_0x2a7ef9)=>ne(_0x26f3f0,typeof _0x38520f!=_0x3c63ed(0x19d)?_0x38520f+'':_0x38520f,_0x2a7ef9);let b=class extends _0x417ad6{constructor(_0x15f88f=M,_0x160114,_0x298029){const _0x11e597=_0x3c63ed;super(),this[_0x11e597(0x157)]=_0x15f88f,this[_0x11e597(0x15c)]=_0x160114,this[_0x11e597(0x16a)]=_0x298029;const {..._0x35d6f0}=_0x4aed61({},M,this['_config']);this[_0x11e597(0x16a)][_0x11e597(0x1ab)](z,_0x35d6f0);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5dac36=>{const _0x153554=_0x686a;this[_0x153554(0x15c)]['add'](_0x5dac36);});}[_0x3c63ed(0x17f)](){const _0x5ef403=_0x3c63ed;this[_0x5ef403(0x15c)]['get'](g),this['_injector'][_0x5ef403(0x171)](S);}};$(b,_0x3c63ed(0x17b),W),$(b,_0x3c63ed(0x165),_0xe14618[_0x3c63ed(0x197)]),b=ie([_0x440a04(_0x21fc1f,_0x1f70fd,_0x1df8ef),w(0x1,_0x425bc5(_0x344a66)),w(0x2,_0x5bacb3)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xc6c135=_0x35e4;function _0x35e4(_0x4c599a,_0x3aa4d2){const _0x4115b3=_0x4115();return _0x35e4=function(_0x35e4fb,_0x436346){_0x35e4fb=_0x35e4fb-0x159;let _0x347a43=_0x4115b3[_0x35e4fb];return _0x347a43;},_0x35e4(_0x4c599a,_0x3aa4d2);}(function(_0x42f958,_0x43eb22){const _0x5a6d36=_0x35e4,_0xff005e=_0x42f958();while(!![]){try{const _0x26b285=parseInt(_0x5a6d36(0x1ac))/0x1+parseInt(_0x5a6d36(0x175))/0x2*(parseInt(_0x5a6d36(0x1bc))/0x3)+parseInt(_0x5a6d36(0x1b4))/0x4*(-parseInt(_0x5a6d36(0x183))/0x5)+-parseInt(_0x5a6d36(0x17c))/0x6+parseInt(_0x5a6d36(0x196))/0x7*(parseInt(_0x5a6d36(0x191))/0x8)+parseInt(_0x5a6d36(0x1a5))/0x9+-parseInt(_0x5a6d36(0x164))/0xa;if(_0x26b285===_0x43eb22)break;else _0xff005e['push'](_0xff005e['shift']());}catch(_0x45f609){_0xff005e['push'](_0xff005e['shift']());}}}(_0x4115,0xcfe72));import{CommentService as _0x75a96,CollaborationSessionService as _0x280790,UniverCollaborationClientPlugin as _0xa3f3e9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x9765a9}from'@univerjs-pro/license';import{dayjs as _0x5ef481,UserManagerService as _0x574c01,Inject as _0x84ffbf,Injector as _0x93512b,Disposable as _0x2bdf5c,CustomRangeType as _0x4dc66a,UniverInstanceType as _0x382fac,DependentOn as _0x4a801c,IConfigService as _0x45c697,Plugin as _0x5c11fa,merge as _0xebc91d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x203cc9}from'@univerjs/thread-comment-ui';function _0x4115(){const _0x140b6f=['userId','onReady','subscribe','_userService','length','requireSession','content','values','getOwnPropertyDescriptor','rangeId','6foBYnj','delete','dataSource','root','solved','saveCommentToSnapshot','/solved','2380230BZmims','error','getUnit','parentId','find','/universer-api/user/list','stringify','83485bCKcdS','getCurrentUser','Solve','add','_initUserSync','threadId','disposeWithMe','defineProperty','_threadCommentModel','rangeType','replyId','_commentService','updateComment','_sessionService','4846976vwqoDF','_threadCommentDataSource','map','_init','get','7OnlmfA','body','UNIVER_UNKNOWN','addComment','format','setConfig','/list','deleteComment','UNRECOGNIZED','OpenOrReOpen','parse','pipe','Solved','createTimestamp','_config','11950227LtCRCg','_httpService','Delete','_injector','replies','onStarting','/reply','1011996RZVWCj','syncUpdateMutationToColla','resolveComment','commentUpdate$','getUser','comment','symbol','listComments','328xMbwvo','YYYY/MM/DD\x20HH:mm','_initDataSource','addUser','_configService','Add','/universer-api/comment/unit/','getMemberID','1680543RVQVUW','userID','Reply','user','customRanges','getComment','Unknown','pluginName','type','COMMENT','_threadCommentDataSourceService','reply','forEach','20087850DoXYLP','post','Edit','filter','slice','code','users'];_0x4115=function(){return _0x140b6f;};return _0x4115();}import{ThreadCommentModel as _0x23537b,IThreadCommentDataSourceService as _0x55654f}from'@univerjs/thread-comment';import{bufferTime as _0x7ec75b}from'rxjs';import{HTTPService as _0x36743b}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5af3a3=>(_0x5af3a3[_0x5af3a3[_0xc6c135(0x19f)]=0x0]=_0xc6c135(0x19f),_0x5af3a3[_0x5af3a3[_0xc6c135(0x1a2)]=0x1]='Solved',_0x5af3a3[_0x5af3a3[_0xc6c135(0x19e)]=-0x1]='UNRECOGNIZED',_0x5af3a3))(I||{}),v=(_0x517804=>(_0x517804[_0x517804[_0xc6c135(0x15d)]=0x0]='Unknown',_0x517804[_0x517804['Add']=0x1]='Add',_0x517804[_0x517804[_0xc6c135(0x159)]=0x2]='Reply',_0x517804[_0x517804[_0xc6c135(0x166)]=0x3]=_0xc6c135(0x166),_0x517804[_0x517804[_0xc6c135(0x1a7)]=0x4]=_0xc6c135(0x1a7),_0x517804[_0x517804[_0xc6c135(0x185)]=0x5]=_0xc6c135(0x185),_0x517804[_0x517804[_0xc6c135(0x19e)]=-0x1]='UNRECOGNIZED',_0x517804))(v||{});const D=_0xb164d8=>_0x5ef481(new Date(+_0xb164d8))[_0xc6c135(0x19a)](_0xc6c135(0x1b5)),B=async(_0x4a5c5c,_0x18d7e0)=>{const _0x2d675f=_0xc6c135,_0x526635=_0x4a5c5c[_0x2d675f(0x195)](_0x574c01),_0x516eeb=_0x4a5c5c[_0x2d675f(0x195)](_0x36743b);_0x18d7e0[_0x2d675f(0x163)](_0x590bea=>{const _0x5063c7=_0x2d675f;_0x526635[_0x5063c7(0x1b0)](_0x590bea)&&_0x18d7e0[_0x5063c7(0x176)](_0x590bea);}),_0x18d7e0['size']&&(await _0x516eeb[_0x2d675f(0x195)](_0x2d675f(0x181),{'params':{'userIDs':[..._0x18d7e0]}}))[_0x2d675f(0x197)][_0x2d675f(0x16a)][_0x2d675f(0x163)](_0xa1f84b=>{_0xa1f84b&&_0x526635['addUser'](_0xa1f84b);});};var K=Object[_0xc6c135(0x173)],V=(_0x1f1cc6,_0x1ce59b,_0x202a30,_0x2c2dd9)=>{for(var _0x3e2c61=_0x2c2dd9>0x1?void 0x0:_0x2c2dd9?K(_0x1ce59b,_0x202a30):_0x1ce59b,_0x4eb968=_0x1f1cc6['length']-0x1,_0x1a8750;_0x4eb968>=0x0;_0x4eb968--)(_0x1a8750=_0x1f1cc6[_0x4eb968])&&(_0x3e2c61=_0x1a8750(_0x3e2c61)||_0x3e2c61);return _0x3e2c61;},p=(_0x420bdb,_0x36abbe)=>(_0x378123,_0x5092d4)=>_0x36abbe(_0x378123,_0x5092d4,_0x420bdb);let S=class extends _0x2bdf5c{constructor(_0x5bef9f,_0x1953ed,_0x5070bf,_0x27ef0e){const _0x4e017d=_0xc6c135;super(),this[_0x4e017d(0x18e)]=_0x5bef9f,this['_threadCommentModel']=_0x1953ed,this[_0x4e017d(0x16e)]=_0x5070bf,this[_0x4e017d(0x1a8)]=_0x27ef0e,this[_0x4e017d(0x194)](),this['_initUserSync']();}[_0xc6c135(0x187)](){const _0x26f7a9=_0xc6c135;this[_0x26f7a9(0x189)](this[_0x26f7a9(0x18b)][_0x26f7a9(0x1af)][_0x26f7a9(0x1a1)](_0x7ec75b(0x10))[_0x26f7a9(0x16d)](_0x47c63d=>{const _0x303021=_0x26f7a9,_0x271d0e=new Set();_0x47c63d[_0x303021(0x163)](_0x59cf7e=>{const _0xb020a5=_0x303021;switch(_0x59cf7e[_0xb020a5(0x15f)]){case _0xb020a5(0x186):{const _0x430fda=_0x59cf7e['payload']['personId'];_0x271d0e[_0xb020a5(0x186)](_0x430fda);break;}}}),B(this[_0x303021(0x1a8)],_0x271d0e);}));}[_0xc6c135(0x194)](){const _0x1c5fa0=_0xc6c135;this[_0x1c5fa0(0x189)](this[_0x1c5fa0(0x18e)][_0x1c5fa0(0x1af)][_0x1c5fa0(0x16d)](async _0x24a464=>{const _0x4d1ca4=_0x1c5fa0;var _0x3081f2,_0x484c5c,_0x1c8f1a,_0xcb7cfc;const _0x41721f=(_0x3081f2=this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x17e)](_0x24a464['unitId'])['find'](_0x13988c=>_0x13988c[_0x4d1ca4(0x188)]===_0x24a464[_0x4d1ca4(0x188)]))==null?void 0x0:_0x3081f2[_0x4d1ca4(0x178)];if(!_0x41721f)return;const {unitId:_0x4df85b,subUnitId:_0x3a3642}=_0x41721f;switch(_0x24a464[_0x4d1ca4(0x15a)]&&this[_0x4d1ca4(0x16e)]['addUser'](_0x24a464[_0x4d1ca4(0x15a)]),_0x24a464[_0x4d1ca4(0x15f)]){case v[_0x4d1ca4(0x1b9)]:break;case v[_0x4d1ca4(0x159)]:{this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x199)](_0x4df85b,_0x3a3642,{'unitId':_0x4df85b,'subUnitId':_0x3a3642,'ref':'','id':_0x24a464[_0x4d1ca4(0x18d)],'dT':D(+_0x24a464[_0x4d1ca4(0x1a3)]),'threadId':_0x24a464[_0x4d1ca4(0x188)],'personId':(_0x1c8f1a=(_0x484c5c=_0x24a464[_0x4d1ca4(0x15a)])==null?void 0x0:_0x484c5c[_0x4d1ca4(0x1bd)])!=null?_0x1c8f1a:_0x24a464[_0x4d1ca4(0x16b)],'text':JSON['parse'](_0x24a464[_0x4d1ca4(0x171)]),'parentId':_0x41721f['id']});break;}case v[_0x4d1ca4(0x1a7)]:{const _0x358eb8=this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x15c)](_0x4df85b,_0x3a3642,_0x24a464[_0x4d1ca4(0x18d)]);_0x358eb8&&_0x358eb8[_0x4d1ca4(0x17f)]&&this['_threadCommentModel'][_0x4d1ca4(0x19d)](_0x4df85b,_0x3a3642,_0x24a464['replyId']);break;}case v[_0x4d1ca4(0x166)]:{this[_0x4d1ca4(0x18b)]['updateComment'](_0x4df85b,_0x3a3642,{'commentId':_0x24a464[_0x4d1ca4(0x18d)],'text':JSON[_0x4d1ca4(0x1a0)](_0x24a464[_0x4d1ca4(0x171)])});break;}case v[_0x4d1ca4(0x185)]:{const _0x4c4242=(_0xcb7cfc=this['_threadCommentModel'][_0x4d1ca4(0x17e)](_0x24a464['unitId'])[_0x4d1ca4(0x180)](_0x1b9a83=>_0x1b9a83[_0x4d1ca4(0x188)]===_0x24a464[_0x4d1ca4(0x188)]))==null?void 0x0:_0xcb7cfc[_0x4d1ca4(0x178)];_0x4c4242&&this[_0x4d1ca4(0x18b)][_0x4d1ca4(0x1ae)](_0x4df85b,_0x3a3642,_0x4c4242['id'],_0x24a464[_0x4d1ca4(0x179)]===I[_0x4d1ca4(0x1a2)]);break;}}}));}};S=V([p(0x0,_0x84ffbf(_0x75a96)),p(0x1,_0x84ffbf(_0x23537b)),p(0x2,_0x84ffbf(_0x574c01)),p(0x3,_0x84ffbf(_0x93512b))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0xc6c135(0x173)],Q=(_0x317af6,_0x36dfea,_0x1f66d0,_0x1f0268)=>{const _0x34b912=_0xc6c135;for(var _0x52a2ee=_0x1f0268>0x1?void 0x0:_0x1f0268?k(_0x36dfea,_0x1f66d0):_0x36dfea,_0x31a49a=_0x317af6[_0x34b912(0x16f)]-0x1,_0x21ff54;_0x31a49a>=0x0;_0x31a49a--)(_0x21ff54=_0x317af6[_0x31a49a])&&(_0x52a2ee=_0x21ff54(_0x52a2ee)||_0x52a2ee);return _0x52a2ee;},_=(_0x2b1997,_0x371502)=>(_0xde4616,_0x2165d5)=>_0x371502(_0xde4616,_0x2165d5,_0x2b1997);function X(_0x37d06e,_0x43b204){const _0x331cab=_0xc6c135,_0xe1138e=_0x37d06e[_0x331cab(0x1a9)][0x0];return{..._0x43b204,'id':_0xe1138e[_0x331cab(0x18d)],'resolved':_0x37d06e[_0x331cab(0x179)]===0x1,'dT':D(_0xe1138e['createTimestamp']),'personId':_0xe1138e['userId'],'threadId':_0xe1138e[_0x331cab(0x188)]};}function ee(_0x2c20d0,_0x4848cb,_0x3d2407){const _0x3b5010=_0xc6c135;var _0x1b8a35,_0x4b1a74;if(((_0x4b1a74=(_0x1b8a35=_0x2c20d0==null?void 0x0:_0x2c20d0[_0x3b5010(0x1a9)])==null?void 0x0:_0x1b8a35[_0x3b5010(0x16f)])!=null?_0x4b1a74:0x0)>0x0){const _0x525471=(_0x49be1d,_0x11e89c)=>({'id':_0x49be1d[_0x3b5010(0x18d)],'threadId':_0x49be1d['threadId'],'dT':D(_0x49be1d[_0x3b5010(0x1a3)]),'personId':_0x49be1d[_0x3b5010(0x16b)],'resolved':_0x2c20d0[_0x3b5010(0x179)]===I['Solved'],'unitId':_0x4848cb,'subUnitId':_0x3d2407,'text':JSON[_0x3b5010(0x1a0)](_0x49be1d['content']),'parentId':_0x11e89c}),_0x4511f5=_0x525471(_0x2c20d0[_0x3b5010(0x1a9)][0x0]);return{..._0x4511f5,'children':_0x2c20d0['replies'][_0x3b5010(0x168)](0x1)[_0x3b5010(0x193)](_0x4adbda=>_0x525471(_0x4adbda,_0x4511f5['id']))};}return null;}let f=class{constructor(_0xf593eb,_0x35e543,_0x48119d,_0xfe9d9d){const _0x4bf1a9=_0xc6c135;this[_0x4bf1a9(0x1a6)]=_0xf593eb,this[_0x4bf1a9(0x16e)]=_0x35e543,this[_0x4bf1a9(0x190)]=_0x48119d,this['_injector']=_0xfe9d9d;}async[_0xc6c135(0x199)](_0x5630a2){const _0x16e994=_0xc6c135;var _0x3c6fcd,_0x4977ad;const {parentId:_0x46f1fc,unitId:_0x2eaf17,text:_0x513170,threadId:_0x2bda43}=_0x5630a2,_0x54ec0a=(_0x4977ad=(_0x3c6fcd=_0x513170[_0x16e994(0x15b)])==null?void 0x0:_0x3c6fcd[_0x16e994(0x167)](_0x555b53=>_0x555b53['rangeType']===_0x4dc66a[_0x16e994(0x160)])['map'](_0x4c8902=>_0x4c8902['rangeId']))!=null?_0x4977ad:[],_0x11ad27=JSON[_0x16e994(0x182)](_0x513170),_0xccb56d=(await this['_sessionService']['requireSession'](_0x2eaf17))[_0x16e994(0x1bb)]();if(_0x46f1fc){const _0x5bc3f9={'memberId':_0xccb56d,'unitId':_0x2eaf17,'content':_0x11ad27,'mention':_0x54ec0a,'threadId':_0x2bda43},_0xd5a65f=(await this[_0x16e994(0x1a6)]['post'](_0x16e994(0x1ba)+_0x2eaf17+_0x16e994(0x1ab),{'body':_0x5bc3f9}))['body'][_0x16e994(0x162)];return{..._0x5630a2,'id':_0xd5a65f[_0x16e994(0x18d)],'dT':_0x5ef481(+_0xd5a65f[_0x16e994(0x1a3)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xd5a65f['userId']};}else{const _0x3ef24b={'memberId':_0xccb56d,'unitId':_0x2eaf17,'content':_0x11ad27,'mention':_0x54ec0a},_0x1832e2=await this[_0x16e994(0x1a6)][_0x16e994(0x165)](_0x16e994(0x1ba)+_0x2eaf17+'/add',{'body':_0x3ef24b});return X(_0x1832e2[_0x16e994(0x197)][_0x16e994(0x1b1)],_0x5630a2);}}async[_0xc6c135(0x18f)](_0x13233b){const _0x12cefb=_0xc6c135;var _0x42bb3a,_0x288531;const {text:_0x30ba29,unitId:_0x2c10c8}=_0x13233b,_0x54bc2c=(_0x288531=(_0x42bb3a=_0x30ba29[_0x12cefb(0x15b)])==null?void 0x0:_0x42bb3a[_0x12cefb(0x167)](_0x442c1e=>_0x442c1e[_0x12cefb(0x18c)]===_0x4dc66a[_0x12cefb(0x160)])[_0x12cefb(0x193)](_0x4b5ee1=>_0x4b5ee1[_0x12cefb(0x174)]))!=null?_0x288531:[],_0x394ec7=JSON['stringify'](_0x30ba29),_0x2ed110=_0x13233b[_0x12cefb(0x188)],_0x21fa3b=_0x13233b['id'],_0x551589={'memberId':(await this[_0x12cefb(0x190)][_0x12cefb(0x170)](_0x2c10c8))[_0x12cefb(0x1bb)](),'unitId':_0x2c10c8,'threadId':_0x2ed110,'mention':_0x54bc2c,'content':_0x394ec7,'replyId':_0x21fa3b},_0x47d089=await this[_0x12cefb(0x1a6)][_0x12cefb(0x165)]('/universer-api/comment/unit/'+_0x2c10c8+'/edit',{'body':_0x551589});return!_0x47d089[_0x12cefb(0x197)][_0x12cefb(0x17d)]||_0x47d089[_0x12cefb(0x197)][_0x12cefb(0x17d)][_0x12cefb(0x169)]===0x1;}async[_0xc6c135(0x1ae)](_0x14f2ed){const _0x56259f=_0xc6c135,{unitId:_0x7e080d}=_0x14f2ed,_0x275152=_0x14f2ed['threadId'],_0x48a8c2={'memberId':this['_userService'][_0x56259f(0x184)]()['userID'],'unitId':_0x7e080d,'threadId':_0x275152,'solved':_0x14f2ed['resolved']?I['Solved']:I[_0x56259f(0x19f)]},_0x4486a5=await this[_0x56259f(0x1a6)][_0x56259f(0x165)](_0x56259f(0x1ba)+_0x7e080d+_0x56259f(0x17b),{'body':_0x48a8c2});return!_0x4486a5['body'][_0x56259f(0x17d)]||_0x4486a5[_0x56259f(0x197)][_0x56259f(0x17d)][_0x56259f(0x169)]===0x1;}async[_0xc6c135(0x19d)](_0x3d9ef1,_0x2b2656,_0xd451a1,_0x32e08b){const _0x10a2d9=_0xc6c135,_0x304fdb={'memberId':(await this['_sessionService'][_0x10a2d9(0x170)](_0x3d9ef1))[_0x10a2d9(0x1bb)](),'threadId':_0xd451a1,'replyId':_0x32e08b,'unitId':_0x3d9ef1},_0x23329e=await this['_httpService'][_0x10a2d9(0x165)]('/universer-api/comment/unit/'+_0x3d9ef1+'/delete',{'body':_0x304fdb});return!_0x23329e[_0x10a2d9(0x197)]['error']||_0x23329e[_0x10a2d9(0x197)]['error'][_0x10a2d9(0x169)]===0x1;}async[_0xc6c135(0x1b3)](_0x3bbdd5,_0x3aa994,_0x8b3e29){const _0x3518e3=_0xc6c135,_0x39f113={'unitId':_0x3bbdd5,'threadId':_0x8b3e29},_0x812b7e=await this['_httpService']['post'](_0x3518e3(0x1ba)+_0x3bbdd5+_0x3518e3(0x19c),{'body':_0x39f113}),_0xac1b11=_0x8b3e29[_0x3518e3(0x193)](_0x240135=>ee(_0x812b7e[_0x3518e3(0x197)]['comments'][_0x240135],_0x3bbdd5,_0x3aa994))[_0x3518e3(0x167)](Boolean);return Object[_0x3518e3(0x172)](_0x812b7e[_0x3518e3(0x197)][_0x3518e3(0x16a)])['forEach'](_0x20a6f6=>{const _0x3c02a2=_0x3518e3;this[_0x3c02a2(0x16e)][_0x3c02a2(0x1b7)](_0x20a6f6);}),_0xac1b11;}[_0xc6c135(0x17a)](_0x1b2f41){const _0x23d9af=_0xc6c135;return{'id':_0x1b2f41['id'],'threadId':_0x1b2f41[_0x23d9af(0x188)],'ref':_0x1b2f41['ref']};}};f=Q([_(0x0,_0x84ffbf(_0x36743b)),_(0x1,_0x84ffbf(_0x574c01)),_(0x2,_0x84ffbf(_0x280790)),_(0x3,_0x84ffbf(_0x93512b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x38f05e,_0x12ad83,_0x239328,_0x510dd9)=>{const _0x12f537=_0xc6c135;for(var _0x516f96=_0x510dd9>0x1?void 0x0:_0x510dd9?re(_0x12ad83,_0x239328):_0x12ad83,_0x9444d=_0x38f05e[_0x12f537(0x16f)]-0x1,_0x281928;_0x9444d>=0x0;_0x9444d--)(_0x281928=_0x38f05e[_0x9444d])&&(_0x516f96=_0x281928(_0x516f96)||_0x516f96);return _0x516f96;},N=(_0x5de6e9,_0xf63117)=>(_0x1388ba,_0x160f6d)=>_0xf63117(_0x1388ba,_0x160f6d,_0x5de6e9);let g=class extends _0x2bdf5c{constructor(_0x1ff6f3,_0x18741d){const _0x11d391=_0xc6c135;super(),this['_threadCommentDataSourceService']=_0x1ff6f3,this[_0x11d391(0x192)]=_0x18741d,this[_0x11d391(0x1b6)]();}[_0xc6c135(0x1b6)](){const _0x5eb51c=_0xc6c135;this[_0x5eb51c(0x161)][_0x5eb51c(0x177)]=this[_0x5eb51c(0x192)],this[_0x5eb51c(0x161)][_0x5eb51c(0x1ad)]=!0x1;}};g=te([N(0x0,_0x55654f),N(0x1,_0x84ffbf(f))],g);var se=Object[_0xc6c135(0x18a)],oe=Object[_0xc6c135(0x173)],ne=(_0x2eb2b6,_0x244c20,_0x299ae7)=>_0x244c20 in _0x2eb2b6?se(_0x2eb2b6,_0x244c20,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x299ae7}):_0x2eb2b6[_0x244c20]=_0x299ae7,ie=(_0x268d11,_0x3d56cd,_0xbe0499,_0x27f3c3)=>{const _0xbcfdf8=_0xc6c135;for(var _0x3e1dcd=_0x27f3c3>0x1?void 0x0:_0x27f3c3?oe(_0x3d56cd,_0xbe0499):_0x3d56cd,_0x16cdd9=_0x268d11[_0xbcfdf8(0x16f)]-0x1,_0xeed554;_0x16cdd9>=0x0;_0x16cdd9--)(_0xeed554=_0x268d11[_0x16cdd9])&&(_0x3e1dcd=_0xeed554(_0x3e1dcd)||_0x3e1dcd);return _0x3e1dcd;},w=(_0x5ba4d7,_0x596810)=>(_0x95ba80,_0x404476)=>_0x596810(_0x95ba80,_0x404476,_0x5ba4d7),$=(_0xd1e8f4,_0x494af4,_0xa85fd)=>ne(_0xd1e8f4,typeof _0x494af4!=_0xc6c135(0x1b2)?_0x494af4+'':_0x494af4,_0xa85fd);let b=class extends _0x5c11fa{constructor(_0x27b627=M,_0x4b3019,_0x41c350){const _0x3cd3e5=_0xc6c135;super(),this[_0x3cd3e5(0x1a4)]=_0x27b627,this[_0x3cd3e5(0x1a8)]=_0x4b3019,this['_configService']=_0x41c350;const {..._0x32746b}=_0xebc91d({},M,this[_0x3cd3e5(0x1a4)]);this[_0x3cd3e5(0x1b8)][_0x3cd3e5(0x19b)](z,_0x32746b);}[_0xc6c135(0x1aa)](){const _0x243624=_0xc6c135;[[f],[g],[S]][_0x243624(0x163)](_0x2f5136=>{const _0x132f2f=_0x243624;this[_0x132f2f(0x1a8)]['add'](_0x2f5136);});}[_0xc6c135(0x16c)](){const _0x17264c=_0xc6c135;this[_0x17264c(0x1a8)]['get'](g),this['_injector']['get'](S);}};$(b,_0xc6c135(0x15e),W),$(b,_0xc6c135(0x15f),_0x382fac[_0xc6c135(0x198)]),b=ie([_0x4a801c(_0x203cc9,_0xa3f3e9,_0x9765a9),w(0x1,_0x84ffbf(_0x93512b)),w(0x2,_0x45c697)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4f425f,_0x553422){const _0x56e436=_0x1b96,_0x5700fa=_0x4f425f();while(!![]){try{const _0x1bb94c=-parseInt(_0x56e436(0x187))/0x1*(parseInt(_0x56e436(0x18a))/0x2)+parseInt(_0x56e436(0x169))/0x3+parseInt(_0x56e436(0x16d))/0x4*(-parseInt(_0x56e436(0x160))/0x5)+parseInt(_0x56e436(0x1c2))/0x6+parseInt(_0x56e436(0x1bb))/0x7*(-parseInt(_0x56e436(0x1a8))/0x8)+parseInt(_0x56e436(0x1d4))/0x9*(-parseInt(_0x56e436(0x164))/0xa)+-parseInt(_0x56e436(0x168))/0xb*(-parseInt(_0x56e436(0x195))/0xc);if(_0x1bb94c===_0x553422)break;else _0x5700fa['push'](_0x5700fa['shift']());}catch(_0x527b31){_0x5700fa['push'](_0x5700fa['shift']());}}}(_0xf592,0x1fb5d),function(_0x205938,_0x36ef6b){const _0x2b9140=_0x1b96;typeof exports=='object'&&typeof module<'u'?_0x36ef6b(exports,require(_0x2b9140(0x19a)),require(_0x2b9140(0x1b7)),require(_0x2b9140(0x182)),require(_0x2b9140(0x1d3)),require(_0x2b9140(0x1a7)),require('rxjs'),require(_0x2b9140(0x184))):typeof define==_0x2b9140(0x1c3)&&define[_0x2b9140(0x1c8)]?define([_0x2b9140(0x17f),_0x2b9140(0x19a),_0x2b9140(0x1b7),'@univerjs/core',_0x2b9140(0x1d3),_0x2b9140(0x1a7),_0x2b9140(0x199),_0x2b9140(0x184)],_0x36ef6b):(_0x205938=typeof globalThis<'u'?globalThis:_0x205938||self,_0x36ef6b(_0x205938['UniverProThreadCommentDatasource']={},_0x205938[_0x2b9140(0x1b2)],_0x205938[_0x2b9140(0x194)],_0x205938['UniverCore'],_0x205938['UniverThreadCommentUi'],_0x205938[_0x2b9140(0x186)],_0x205938[_0x2b9140(0x199)],_0x205938['UniverNetwork']));}(this,function(_0x5f2d29,_0x3114cb,_0xe7522b,_0x5a4584,_0x53ff76,_0x1d5bd1,_0x425f98,_0x5eae30){'use strict';const _0x523c32=_0x1b96;const _0x1891ac=_0x523c32(0x1d9);var _0x560a64=(_0x5bac7a=>(_0x5bac7a[_0x5bac7a[_0x523c32(0x191)]=0x0]='OpenOrReOpen',_0x5bac7a[_0x5bac7a[_0x523c32(0x1c0)]=0x1]=_0x523c32(0x1c0),_0x5bac7a[_0x5bac7a[_0x523c32(0x171)]=-0x1]=_0x523c32(0x171),_0x5bac7a))(_0x560a64||{}),_0x5a5ab7=(_0x497d86=>(_0x497d86[_0x497d86['Unknown']=0x0]='Unknown',_0x497d86[_0x497d86[_0x523c32(0x1b1)]=0x1]=_0x523c32(0x1b1),_0x497d86[_0x497d86[_0x523c32(0x19c)]=0x2]='Reply',_0x497d86[_0x497d86[_0x523c32(0x1a3)]=0x3]='Edit',_0x497d86[_0x497d86[_0x523c32(0x1dc)]=0x4]=_0x523c32(0x1dc),_0x497d86[_0x497d86[_0x523c32(0x190)]=0x5]='Solve',_0x497d86[_0x497d86[_0x523c32(0x171)]=-0x1]=_0x523c32(0x171),_0x497d86))(_0x5a5ab7||{});const _0x571b60=_0x1b4cfe=>_0x5a4584['dayjs'](new Date(+_0x1b4cfe))['format'](_0x523c32(0x16c)),_0x4b38a0=async(_0x3dd1b5,_0x435f88)=>{const _0x1f154c=_0x523c32,_0x28cd9c=_0x3dd1b5[_0x1f154c(0x1b0)](_0x5a4584[_0x1f154c(0x170)]),_0x20e528=_0x3dd1b5[_0x1f154c(0x1b0)](_0x5eae30[_0x1f154c(0x181)]);_0x435f88[_0x1f154c(0x192)](_0x50f032=>{const _0x4dd7ba=_0x1f154c;_0x28cd9c[_0x4dd7ba(0x178)](_0x50f032)&&_0x435f88['delete'](_0x50f032);}),_0x435f88[_0x1f154c(0x1c4)]&&(await _0x20e528[_0x1f154c(0x1b0)](_0x1f154c(0x166),{'params':{'userIDs':[..._0x435f88]}}))[_0x1f154c(0x1e0)][_0x1f154c(0x185)][_0x1f154c(0x192)](_0x19643a=>{const _0x16d852=_0x1f154c;_0x19643a&&_0x28cd9c[_0x16d852(0x1d0)](_0x19643a);});};var _0x3cbd06=Object[_0x523c32(0x1bc)],_0x489706=(_0x4f8e9f,_0x4ca9eb,_0x44603e,_0x2dd702)=>{const _0x3f6f39=_0x523c32;for(var _0x130810=_0x2dd702>0x1?void 0x0:_0x2dd702?_0x3cbd06(_0x4ca9eb,_0x44603e):_0x4ca9eb,_0x10549e=_0x4f8e9f[_0x3f6f39(0x188)]-0x1,_0x21ef0d;_0x10549e>=0x0;_0x10549e--)(_0x21ef0d=_0x4f8e9f[_0x10549e])&&(_0x130810=_0x21ef0d(_0x130810)||_0x130810);return _0x130810;},_0x203176=(_0x547b22,_0x5480fc)=>(_0x3b364e,_0x43a11c)=>_0x5480fc(_0x3b364e,_0x43a11c,_0x547b22);let _0x36954c=class extends _0x5a4584[_0x523c32(0x1a2)]{constructor(_0x4a336f,_0x5da394,_0x8a09c,_0x2203b3){const _0x1543be=_0x523c32;super(),this[_0x1543be(0x1aa)]=_0x4a336f,this[_0x1543be(0x183)]=_0x5da394,this[_0x1543be(0x17d)]=_0x8a09c,this[_0x1543be(0x167)]=_0x2203b3,this[_0x1543be(0x179)](),this['_initUserSync']();}['_initUserSync'](){const _0x11c5e4=_0x523c32;this['disposeWithMe'](this[_0x11c5e4(0x183)][_0x11c5e4(0x162)][_0x11c5e4(0x1a9)](_0x425f98['bufferTime'](0x10))[_0x11c5e4(0x1c6)](_0x4a3820=>{const _0x1674c4=_0x11c5e4,_0x6b65f0=new Set();_0x4a3820[_0x1674c4(0x192)](_0x3be6ce=>{const _0x11e75e=_0x1674c4;switch(_0x3be6ce[_0x11e75e(0x1c5)]){case'add':{const _0x56d92e=_0x3be6ce[_0x11e75e(0x1da)][_0x11e75e(0x1c7)];_0x6b65f0[_0x11e75e(0x16a)](_0x56d92e);break;}}}),_0x4b38a0(this[_0x1674c4(0x167)],_0x6b65f0);}));}['_init'](){const _0x180834=_0x523c32;this[_0x180834(0x1e3)](this[_0x180834(0x1aa)][_0x180834(0x162)][_0x180834(0x1c6)](async _0x11ff8b=>{const _0x44774c=_0x180834;var _0x138bde,_0x32e228,_0x99230,_0x283095;const _0x2a8ead=(_0x138bde=this[_0x44774c(0x183)]['getUnit'](_0x11ff8b['unitId'])[_0x44774c(0x180)](_0x520a14=>_0x520a14[_0x44774c(0x1a6)]===_0x11ff8b[_0x44774c(0x1a6)]))==null?void 0x0:_0x138bde[_0x44774c(0x173)];if(!_0x2a8ead)return;const {unitId:_0x13d5c1,subUnitId:_0x51e12a}=_0x2a8ead;switch(_0x11ff8b[_0x44774c(0x172)]&&this[_0x44774c(0x17d)][_0x44774c(0x1d0)](_0x11ff8b[_0x44774c(0x172)]),_0x11ff8b[_0x44774c(0x1c5)]){case _0x5a5ab7[_0x44774c(0x1b1)]:break;case _0x5a5ab7[_0x44774c(0x19c)]:{this[_0x44774c(0x183)][_0x44774c(0x1b6)](_0x13d5c1,_0x51e12a,{'unitId':_0x13d5c1,'subUnitId':_0x51e12a,'ref':'','id':_0x11ff8b['replyId'],'dT':_0x571b60(+_0x11ff8b[_0x44774c(0x1c1)]),'threadId':_0x11ff8b['threadId'],'personId':(_0x99230=(_0x32e228=_0x11ff8b[_0x44774c(0x172)])==null?void 0x0:_0x32e228[_0x44774c(0x17e)])!=null?_0x99230:_0x11ff8b[_0x44774c(0x1cc)],'text':JSON['parse'](_0x11ff8b[_0x44774c(0x17c)]),'parentId':_0x2a8ead['id']});break;}case _0x5a5ab7['Delete']:{const _0x4b5275=this['_threadCommentModel'][_0x44774c(0x174)](_0x13d5c1,_0x51e12a,_0x11ff8b[_0x44774c(0x1df)]);_0x4b5275&&_0x4b5275[_0x44774c(0x1d7)]&&this[_0x44774c(0x183)][_0x44774c(0x163)](_0x13d5c1,_0x51e12a,_0x11ff8b[_0x44774c(0x1df)]);break;}case _0x5a5ab7[_0x44774c(0x1a3)]:{this[_0x44774c(0x183)]['updateComment'](_0x13d5c1,_0x51e12a,{'commentId':_0x11ff8b[_0x44774c(0x1df)],'text':JSON['parse'](_0x11ff8b[_0x44774c(0x17c)])});break;}case _0x5a5ab7[_0x44774c(0x190)]:{const _0x42a482=(_0x283095=this[_0x44774c(0x183)][_0x44774c(0x19f)](_0x11ff8b['unitId'])[_0x44774c(0x180)](_0x4964cb=>_0x4964cb['threadId']===_0x11ff8b[_0x44774c(0x1a6)]))==null?void 0x0:_0x283095[_0x44774c(0x173)];_0x42a482&&this[_0x44774c(0x183)][_0x44774c(0x1b9)](_0x13d5c1,_0x51e12a,_0x42a482['id'],_0x11ff8b[_0x44774c(0x193)]===_0x560a64['Solved']);break;}}}));}};_0x36954c=_0x489706([_0x203176(0x0,_0x5a4584['Inject'](_0x3114cb[_0x523c32(0x1ab)])),_0x203176(0x1,_0x5a4584[_0x523c32(0x16e)](_0x1d5bd1[_0x523c32(0x19b)])),_0x203176(0x2,_0x5a4584['Inject'](_0x5a4584[_0x523c32(0x170)])),_0x203176(0x3,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)]))],_0x36954c);const _0x984f58=_0x523c32(0x1ac),_0x39a2df={};var _0x2c5f27=Object[_0x523c32(0x1bc)],_0x1013b6=(_0x1499a7,_0x7bd32a,_0x194dd3,_0xe76220)=>{const _0xa4ff4d=_0x523c32;for(var _0x57ed29=_0xe76220>0x1?void 0x0:_0xe76220?_0x2c5f27(_0x7bd32a,_0x194dd3):_0x7bd32a,_0x442813=_0x1499a7[_0xa4ff4d(0x188)]-0x1,_0x128bbd;_0x442813>=0x0;_0x442813--)(_0x128bbd=_0x1499a7[_0x442813])&&(_0x57ed29=_0x128bbd(_0x57ed29)||_0x57ed29);return _0x57ed29;},_0x2ad279=(_0x3cea7e,_0x418e71)=>(_0x45bd4d,_0xb58a7e)=>_0x418e71(_0x45bd4d,_0xb58a7e,_0x3cea7e);function _0x5aea21(_0x120db0,_0x39962b){const _0x186ea6=_0x523c32,_0x3806a6=_0x120db0[_0x186ea6(0x1bf)][0x0];return{..._0x39962b,'id':_0x3806a6[_0x186ea6(0x1df)],'resolved':_0x120db0['solved']===0x1,'dT':_0x571b60(_0x3806a6['createTimestamp']),'personId':_0x3806a6[_0x186ea6(0x1cc)],'threadId':_0x3806a6[_0x186ea6(0x1a6)]};}function _0x2d932d(_0xde81d0,_0x3379de,_0xa0f14){const _0x37f801=_0x523c32;var _0x780ccd,_0x5c0110;if(((_0x5c0110=(_0x780ccd=_0xde81d0==null?void 0x0:_0xde81d0[_0x37f801(0x1bf)])==null?void 0x0:_0x780ccd[_0x37f801(0x188)])!=null?_0x5c0110:0x0)>0x0){const _0x5309ab=(_0x4c7e82,_0xfaf77)=>({'id':_0x4c7e82['replyId'],'threadId':_0x4c7e82[_0x37f801(0x1a6)],'dT':_0x571b60(_0x4c7e82['createTimestamp']),'personId':_0x4c7e82['userId'],'resolved':_0xde81d0[_0x37f801(0x193)]===_0x560a64[_0x37f801(0x1c0)],'unitId':_0x3379de,'subUnitId':_0xa0f14,'text':JSON[_0x37f801(0x15d)](_0x4c7e82['content']),'parentId':_0xfaf77}),_0x31c47d=_0x5309ab(_0xde81d0[_0x37f801(0x1bf)][0x0]);return{..._0x31c47d,'children':_0xde81d0['replies'][_0x37f801(0x16b)](0x1)[_0x37f801(0x18f)](_0x4005b4=>_0x5309ab(_0x4005b4,_0x31c47d['id']))};}return null;}let _0x6b5dff=class{constructor(_0x184193,_0x151e82,_0x1d0121,_0x5053dc){const _0x39d7e4=_0x523c32;this[_0x39d7e4(0x15e)]=_0x184193,this[_0x39d7e4(0x17d)]=_0x151e82,this[_0x39d7e4(0x1a0)]=_0x1d0121,this[_0x39d7e4(0x167)]=_0x5053dc;}async['addComment'](_0x58e7cd){const _0x4410ae=_0x523c32;var _0x367885,_0x2fa9dd;const {parentId:_0x1820b9,unitId:_0x2032e1,text:_0x26360d,threadId:_0x217f3e}=_0x58e7cd,_0xe85873=(_0x2fa9dd=(_0x367885=_0x26360d[_0x4410ae(0x175)])==null?void 0x0:_0x367885['filter'](_0x5d6b3e=>_0x5d6b3e['rangeType']===_0x5a4584[_0x4410ae(0x18e)]['COMMENT'])['map'](_0x543560=>_0x543560[_0x4410ae(0x1de)]))!=null?_0x2fa9dd:[],_0x4b1225=JSON[_0x4410ae(0x1db)](_0x26360d),_0x5b8c16=(await this['_sessionService'][_0x4410ae(0x17b)](_0x2032e1))[_0x4410ae(0x161)]();if(_0x1820b9){const _0x5a61fd={'memberId':_0x5b8c16,'unitId':_0x2032e1,'content':_0x4b1225,'mention':_0xe85873,'threadId':_0x217f3e},_0x4872e4=(await this[_0x4410ae(0x15e)]['post'](_0x4410ae(0x1cd)+_0x2032e1+_0x4410ae(0x1b5),{'body':_0x5a61fd}))[_0x4410ae(0x1e0)][_0x4410ae(0x1cb)];return{..._0x58e7cd,'id':_0x4872e4[_0x4410ae(0x1df)],'dT':_0x5a4584['dayjs'](+_0x4872e4[_0x4410ae(0x1c1)])[_0x4410ae(0x1bd)](_0x4410ae(0x16c)),'personId':_0x4872e4[_0x4410ae(0x1cc)]};}else{const _0x426e7c={'memberId':_0x5b8c16,'unitId':_0x2032e1,'content':_0x4b1225,'mention':_0xe85873},_0x571881=await this[_0x4410ae(0x15e)][_0x4410ae(0x1dd)](_0x4410ae(0x1cd)+_0x2032e1+_0x4410ae(0x196),{'body':_0x426e7c});return _0x5aea21(_0x571881[_0x4410ae(0x1e0)][_0x4410ae(0x18d)],_0x58e7cd);}}async[_0x523c32(0x15f)](_0x355415){const _0x1d1911=_0x523c32;var _0x4692f9,_0x5c5c00;const {text:_0x3ba571,unitId:_0x15d66a}=_0x355415,_0xc8b0a8=(_0x5c5c00=(_0x4692f9=_0x3ba571[_0x1d1911(0x175)])==null?void 0x0:_0x4692f9[_0x1d1911(0x18b)](_0x1c0372=>_0x1c0372['rangeType']===_0x5a4584['CustomRangeType']['COMMENT'])[_0x1d1911(0x18f)](_0x408293=>_0x408293['rangeId']))!=null?_0x5c5c00:[],_0x4a15b6=JSON[_0x1d1911(0x1db)](_0x3ba571),_0x3449e7=_0x355415[_0x1d1911(0x1a6)],_0x45d0bc=_0x355415['id'],_0x1a490c={'memberId':(await this[_0x1d1911(0x1a0)][_0x1d1911(0x17b)](_0x15d66a))['getMemberID'](),'unitId':_0x15d66a,'threadId':_0x3449e7,'mention':_0xc8b0a8,'content':_0x4a15b6,'replyId':_0x45d0bc},_0x359370=await this[_0x1d1911(0x15e)]['post'](_0x1d1911(0x1cd)+_0x15d66a+_0x1d1911(0x1d1),{'body':_0x1a490c});return!_0x359370['body'][_0x1d1911(0x1a4)]||_0x359370[_0x1d1911(0x1e0)]['error'][_0x1d1911(0x177)]===0x1;}async[_0x523c32(0x1b9)](_0x2c62f1){const _0x3a96e7=_0x523c32,{unitId:_0x241de6}=_0x2c62f1,_0x317ed7=_0x2c62f1[_0x3a96e7(0x1a6)],_0x430810={'memberId':this[_0x3a96e7(0x17d)]['getCurrentUser']()[_0x3a96e7(0x17e)],'unitId':_0x241de6,'threadId':_0x317ed7,'solved':_0x2c62f1[_0x3a96e7(0x1d5)]?_0x560a64[_0x3a96e7(0x1c0)]:_0x560a64[_0x3a96e7(0x191)]},_0xd4c93b=await this[_0x3a96e7(0x15e)][_0x3a96e7(0x1dd)](_0x3a96e7(0x1cd)+_0x241de6+_0x3a96e7(0x19e),{'body':_0x430810});return!_0xd4c93b[_0x3a96e7(0x1e0)][_0x3a96e7(0x1a4)]||_0xd4c93b[_0x3a96e7(0x1e0)][_0x3a96e7(0x1a4)]['code']===0x1;}async['deleteComment'](_0x49256c,_0x4ec05c,_0x18ff4c,_0x1f74f7){const _0x4f5490=_0x523c32,_0x865bfb={'memberId':(await this['_sessionService'][_0x4f5490(0x17b)](_0x49256c))[_0x4f5490(0x161)](),'threadId':_0x18ff4c,'replyId':_0x1f74f7,'unitId':_0x49256c},_0x2c2329=await this['_httpService'][_0x4f5490(0x1dd)](_0x4f5490(0x1cd)+_0x49256c+_0x4f5490(0x1a5),{'body':_0x865bfb});return!_0x2c2329[_0x4f5490(0x1e0)][_0x4f5490(0x1a4)]||_0x2c2329[_0x4f5490(0x1e0)][_0x4f5490(0x1a4)][_0x4f5490(0x177)]===0x1;}async[_0x523c32(0x16f)](_0x2cf57a,_0x1824d7,_0x13418d){const _0x3eb49a=_0x523c32,_0x482ddd={'unitId':_0x2cf57a,'threadId':_0x13418d},_0xb8653d=await this[_0x3eb49a(0x15e)]['post'](_0x3eb49a(0x1cd)+_0x2cf57a+'/list',{'body':_0x482ddd}),_0x1019f2=_0x13418d[_0x3eb49a(0x18f)](_0x3da56a=>_0x2d932d(_0xb8653d[_0x3eb49a(0x1e0)]['comments'][_0x3da56a],_0x2cf57a,_0x1824d7))[_0x3eb49a(0x18b)](Boolean);return Object[_0x3eb49a(0x165)](_0xb8653d['body'][_0x3eb49a(0x185)])[_0x3eb49a(0x192)](_0x54c671=>{const _0x3aa476=_0x3eb49a;this[_0x3aa476(0x17d)][_0x3aa476(0x1d0)](_0x54c671);}),_0x1019f2;}[_0x523c32(0x1d2)](_0x5e8519){const _0x34494b=_0x523c32;return{'id':_0x5e8519['id'],'threadId':_0x5e8519[_0x34494b(0x1a6)],'ref':_0x5e8519[_0x34494b(0x1ad)]};}};_0x6b5dff=_0x1013b6([_0x2ad279(0x0,_0x5a4584[_0x523c32(0x16e)](_0x5eae30[_0x523c32(0x181)])),_0x2ad279(0x1,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x170)])),_0x2ad279(0x2,_0x5a4584['Inject'](_0x3114cb[_0x523c32(0x1ae)])),_0x2ad279(0x3,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)]))],_0x6b5dff);var _0x47818f=Object[_0x523c32(0x1bc)],_0x1d7b98=(_0x435dde,_0x2446ba,_0x1adb9d,_0xa54e68)=>{const _0xdaf0fa=_0x523c32;for(var _0x484cc2=_0xa54e68>0x1?void 0x0:_0xa54e68?_0x47818f(_0x2446ba,_0x1adb9d):_0x2446ba,_0xabb17b=_0x435dde[_0xdaf0fa(0x188)]-0x1,_0x1cc669;_0xabb17b>=0x0;_0xabb17b--)(_0x1cc669=_0x435dde[_0xabb17b])&&(_0x484cc2=_0x1cc669(_0x484cc2)||_0x484cc2);return _0x484cc2;},_0x48d4dc=(_0x110433,_0xd394e7)=>(_0x13d46d,_0x18a322)=>_0xd394e7(_0x13d46d,_0x18a322,_0x110433);let _0x3d2a45=class extends _0x5a4584['Disposable']{constructor(_0x24338f,_0x1b343a){const _0x396fd7=_0x523c32;super(),this[_0x396fd7(0x1b4)]=_0x24338f,this[_0x396fd7(0x1b8)]=_0x1b343a,this[_0x396fd7(0x1be)]();}[_0x523c32(0x1be)](){const _0x353d0e=_0x523c32;this[_0x353d0e(0x1b4)]['dataSource']=this[_0x353d0e(0x1b8)],this[_0x353d0e(0x1b4)][_0x353d0e(0x1e2)]=!0x1;}};_0x3d2a45=_0x1d7b98([_0x48d4dc(0x0,_0x1d5bd1[_0x523c32(0x176)]),_0x48d4dc(0x1,_0x5a4584[_0x523c32(0x16e)](_0x6b5dff))],_0x3d2a45);var _0x21e692=Object[_0x523c32(0x198)],_0x376899=Object[_0x523c32(0x1bc)],_0x12c9b0=(_0x54e692,_0x5c3a12,_0x371a2a)=>_0x5c3a12 in _0x54e692?_0x21e692(_0x54e692,_0x5c3a12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371a2a}):_0x54e692[_0x5c3a12]=_0x371a2a,_0x4177ba=(_0x3c85e7,_0x17ce88,_0x57c1ab,_0x28efd7)=>{const _0x108b2f=_0x523c32;for(var _0x23da03=_0x28efd7>0x1?void 0x0:_0x28efd7?_0x376899(_0x17ce88,_0x57c1ab):_0x17ce88,_0x17edd0=_0x3c85e7[_0x108b2f(0x188)]-0x1,_0xa0502d;_0x17edd0>=0x0;_0x17edd0--)(_0xa0502d=_0x3c85e7[_0x17edd0])&&(_0x23da03=_0xa0502d(_0x23da03)||_0x23da03);return _0x23da03;},_0x5259a4=(_0x1700e3,_0x1f65a4)=>(_0x1ae344,_0xe7a688)=>_0x1f65a4(_0x1ae344,_0xe7a688,_0x1700e3),_0x3e40b9=(_0x43aff6,_0x5eb7f8,_0x5195ab)=>_0x12c9b0(_0x43aff6,typeof _0x5eb7f8!='symbol'?_0x5eb7f8+'':_0x5eb7f8,_0x5195ab);_0x5f2d29['UniverThreadCommentDataSourcePlugin']=class extends _0x5a4584[_0x523c32(0x19d)]{constructor(_0x4cc9cc=_0x39a2df,_0x145dd8,_0x352bd0){const _0x299eb6=_0x523c32;super(),this[_0x299eb6(0x18c)]=_0x4cc9cc,this['_injector']=_0x145dd8,this[_0x299eb6(0x1d6)]=_0x352bd0;const {..._0x4fc6f1}=_0x5a4584['merge']({},_0x39a2df,this[_0x299eb6(0x18c)]);this[_0x299eb6(0x1d6)][_0x299eb6(0x1d8)](_0x984f58,_0x4fc6f1);}[_0x523c32(0x1a1)](){[[_0x6b5dff],[_0x3d2a45],[_0x36954c]]['forEach'](_0x5f1d0b=>{const _0x5a8e27=_0x1b96;this[_0x5a8e27(0x167)]['add'](_0x5f1d0b);});}['onReady'](){const _0x5c548e=_0x523c32;this[_0x5c548e(0x167)][_0x5c548e(0x1b0)](_0x3d2a45),this['_injector'][_0x5c548e(0x1b0)](_0x36954c);}},_0x3e40b9(_0x5f2d29[_0x523c32(0x1ba)],_0x523c32(0x1ce),_0x1891ac),_0x3e40b9(_0x5f2d29[_0x523c32(0x1ba)],_0x523c32(0x1c5),_0x5a4584[_0x523c32(0x1c9)][_0x523c32(0x1ca)]),_0x5f2d29[_0x523c32(0x1ba)]=_0x4177ba([_0x5a4584[_0x523c32(0x1cf)](_0x53ff76[_0x523c32(0x17a)],_0x3114cb[_0x523c32(0x1af)],_0xe7522b['UniverLicensePlugin']),_0x5259a4(0x1,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)])),_0x5259a4(0x2,_0x5a4584[_0x523c32(0x1b3)])],_0x5f2d29[_0x523c32(0x1ba)]),Object[_0x523c32(0x198)](_0x5f2d29,Symbol[_0x523c32(0x1e1)],{'value':_0x523c32(0x189)});}));function _0x1b96(_0x48bb6d,_0x225f6a){const _0xf59250=_0xf592();return _0x1b96=function(_0x1b96d1,_0x48ef0b){_0x1b96d1=_0x1b96d1-0x15d;let _0x1e17e8=_0xf59250[_0x1b96d1];return _0x1e17e8;},_0x1b96(_0x48bb6d,_0x225f6a);}function _0xf592(){const _0x48a465=['/reply','addComment','@univerjs-pro/license','_threadCommentDataSource','resolveComment','UniverThreadCommentDataSourcePlugin','49CdaOPX','getOwnPropertyDescriptor','format','_initDataSource','replies','Solved','createTimestamp','560388JndqEk','function','size','type','subscribe','personId','amd','UniverInstanceType','UNIVER_UNKNOWN','reply','userId','/universer-api/comment/unit/','pluginName','DependentOn','addUser','/edit','saveCommentToSnapshot','@univerjs/thread-comment-ui','27LMHwTo','resolved','_configService','parentId','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','stringify','Delete','post','rangeId','replyId','body','toStringTag','syncUpdateMutationToColla','disposeWithMe','parse','_httpService','updateComment','184015wghJvz','getMemberID','commentUpdate$','deleteComment','635980AvlcRI','values','/universer-api/user/list','_injector','131659TJiQAZ','597324gJBwzl','add','slice','YYYY/MM/DD\x20HH:mm','16yTLzfV','Inject','listComments','UserManagerService','UNRECOGNIZED','user','root','getComment','customRanges','IThreadCommentDataSourceService','code','getUser','_init','UniverThreadCommentUIPlugin','requireSession','content','_userService','userID','exports','find','HTTPService','@univerjs/core','_threadCommentModel','@univerjs/network','users','UniverThreadComment','486aFpQVG','length','Module','36arWYgC','filter','_config','comment','CustomRangeType','map','Solve','OpenOrReOpen','forEach','solved','UniverProLicense','276iieizD','/add','Injector','defineProperty','rxjs','@univerjs-pro/collaboration-client','ThreadCommentModel','Reply','Plugin','/solved','getUnit','_sessionService','onStarting','Disposable','Edit','error','/delete','threadId','@univerjs/thread-comment','104176pCyoJZ','pipe','_commentService','CommentService','thread-comment-data-source.config','ref','CollaborationSessionService','UniverCollaborationClientPlugin','get','Add','UniverProCollaborationClient','IConfigService','_threadCommentDataSourceService'];_0xf592=function(){return _0x48a465;};return _0xf592();}
|
|
1
|
+
function _0x2f33(_0x14a3d8,_0x363464){const _0x4dc32a=_0x4dc3();return _0x2f33=function(_0x2f33d9,_0x42c556){_0x2f33d9=_0x2f33d9-0x124;let _0x56eead=_0x4dc32a[_0x2f33d9];return _0x56eead;},_0x2f33(_0x14a3d8,_0x363464);}function _0x4dc3(){const _0x2b8c78=['function','requireSession','Inject','rangeId','reply','Disposable','add','onStarting','filter','customRanges','UniverNetwork','HTTPService','@univerjs-pro/license','disposeWithMe','content','447985SdjEzJ','addUser','getCurrentUser','object','getUser','users','UniverProCollaborationClient','bufferTime','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','userId','/edit','rxjs','resolved','Plugin','IConfigService','createTimestamp','addComment','_threadCommentModel','@univerjs/core','getMemberID','replies','73731HWAWXI','Unknown','OpenOrReOpen','CommentService','subscribe','UniverProThreadCommentDatasource','1784416VVjMBd','@univerjs/thread-comment-ui','resolveComment','UniverLicensePlugin','Solved','delete','find','/reply','_threadCommentDataSourceService','symbol','7237237lFcgGn','unitId','4VTmwOD','Injector','type','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','rangeType','userID','UniverThreadCommentUIPlugin','merge','CustomRangeType','error','UserManagerService','_config','comments','solved','thread-comment-data-source.config','post','length','_threadCommentDataSource','_initDataSource','getOwnPropertyDescriptor','get','_configService','ThreadCommentModel','toStringTag','/universer-api/comment/unit/','Solve','Reply','UniverThreadCommentDataSourcePlugin','_userService','UniverCollaborationClientPlugin','onReady','personId','Edit','stringify','_init','/universer-api/user/list','CollaborationSessionService','_httpService','IThreadCommentDataSourceService','dayjs','replyId','_commentService','pluginName','UNIVER_UNKNOWN','commentUpdate$','/add','2154246AyAEDb','syncUpdateMutationToColla','Add','UniverCore','forEach','UniverThreadComment','Delete','@univerjs/thread-comment','deleteComment','COMMENT','user','_initUserSync','ref','code','size','_sessionService','setConfig','27EdapZl','defineProperty','updateComment','/delete','/list','getUnit','UNRECOGNIZED','threadId','format','UniverThreadCommentUi','map','parse','getComment','parentId','1655976xaZOcd','comment','721797utMIrL','body','UniverInstanceType'];_0x4dc3=function(){return _0x2b8c78;};return _0x4dc3();}(function(_0x1b5d8f,_0x31296f){const _0x140a7e=_0x2f33,_0x5e7ce4=_0x1b5d8f();while(!![]){try{const _0x330999=-parseInt(_0x140a7e(0x17f))/0x1+-parseInt(_0x140a7e(0x17d))/0x2+-parseInt(_0x140a7e(0x1a8))/0x3*(-parseInt(_0x140a7e(0x12f))/0x4)+parseInt(_0x140a7e(0x191))/0x5+parseInt(_0x140a7e(0x15e))/0x6+parseInt(_0x140a7e(0x12d))/0x7+-parseInt(_0x140a7e(0x1ae))/0x8*(-parseInt(_0x140a7e(0x16f))/0x9);if(_0x330999===_0x31296f)break;else _0x5e7ce4['push'](_0x5e7ce4['shift']());}catch(_0x44d869){_0x5e7ce4['push'](_0x5e7ce4['shift']());}}}(_0x4dc3,0x98f2d),function(_0x4a88bd,_0x275b2c){const _0x1ba634=_0x2f33;typeof exports==_0x1ba634(0x194)&&typeof module<'u'?_0x275b2c(exports,require(_0x1ba634(0x132)),require(_0x1ba634(0x18e)),require(_0x1ba634(0x1a5)),require(_0x1ba634(0x124)),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1ba634(0x182)&&define['amd']?define(['exports',_0x1ba634(0x132),'@univerjs-pro/license',_0x1ba634(0x1a5),'@univerjs/thread-comment-ui',_0x1ba634(0x165),_0x1ba634(0x19e),'@univerjs/network'],_0x275b2c):(_0x4a88bd=typeof globalThis<'u'?globalThis:_0x4a88bd||self,_0x275b2c(_0x4a88bd[_0x1ba634(0x1ad)]={},_0x4a88bd[_0x1ba634(0x197)],_0x4a88bd['UniverProLicense'],_0x4a88bd[_0x1ba634(0x161)],_0x4a88bd[_0x1ba634(0x178)],_0x4a88bd[_0x1ba634(0x163)],_0x4a88bd[_0x1ba634(0x19e)],_0x4a88bd[_0x1ba634(0x18c)]));}(this,function(_0x109b9e,_0x2001fd,_0x4f35c2,_0x38678b,_0x2c84f5,_0x28374e,_0x477ad8,_0x1e130c){'use strict';const _0x5d7770=_0x2f33;const _0x58ed90=_0x5d7770(0x19a);var _0x47461c=(_0x35bb8d=>(_0x35bb8d[_0x35bb8d['OpenOrReOpen']=0x0]=_0x5d7770(0x1aa),_0x35bb8d[_0x35bb8d[_0x5d7770(0x127)]=0x1]=_0x5d7770(0x127),_0x35bb8d[_0x35bb8d[_0x5d7770(0x175)]=-0x1]=_0x5d7770(0x175),_0x35bb8d))(_0x47461c||{}),_0x428470=(_0x37cbd3=>(_0x37cbd3[_0x37cbd3['Unknown']=0x0]=_0x5d7770(0x1a9),_0x37cbd3[_0x37cbd3[_0x5d7770(0x160)]=0x1]=_0x5d7770(0x160),_0x37cbd3[_0x37cbd3[_0x5d7770(0x14a)]=0x2]=_0x5d7770(0x14a),_0x37cbd3[_0x37cbd3['Edit']=0x3]='Edit',_0x37cbd3[_0x37cbd3['Delete']=0x4]=_0x5d7770(0x164),_0x37cbd3[_0x37cbd3[_0x5d7770(0x149)]=0x5]=_0x5d7770(0x149),_0x37cbd3[_0x37cbd3['UNRECOGNIZED']=-0x1]=_0x5d7770(0x175),_0x37cbd3))(_0x428470||{});const _0x2ef296=_0x408e53=>_0x38678b[_0x5d7770(0x157)](new Date(+_0x408e53))[_0x5d7770(0x177)](_0x5d7770(0x133)),_0xc2133f=async(_0x44a1d4,_0x5eaa17)=>{const _0x57da23=_0x5d7770,_0x567929=_0x44a1d4[_0x57da23(0x144)](_0x38678b[_0x57da23(0x13a)]),_0x2555ae=_0x44a1d4[_0x57da23(0x144)](_0x1e130c[_0x57da23(0x18d)]);_0x5eaa17[_0x57da23(0x162)](_0x53312f=>{const _0x12735a=_0x57da23;_0x567929[_0x12735a(0x195)](_0x53312f)&&_0x5eaa17[_0x12735a(0x128)](_0x53312f);}),_0x5eaa17[_0x57da23(0x16c)]&&(await _0x2555ae[_0x57da23(0x144)](_0x57da23(0x153),{'params':{'userIDs':[..._0x5eaa17]}}))[_0x57da23(0x180)][_0x57da23(0x196)]['forEach'](_0x3e683e=>{const _0x3cfebd=_0x57da23;_0x3e683e&&_0x567929[_0x3cfebd(0x192)](_0x3e683e);});};var _0x1f4180=Object[_0x5d7770(0x143)],_0x118e34=(_0x5b0155,_0x3f9309,_0x492f78,_0xab0eae)=>{const _0x24eb66=_0x5d7770;for(var _0x10ddea=_0xab0eae>0x1?void 0x0:_0xab0eae?_0x1f4180(_0x3f9309,_0x492f78):_0x3f9309,_0x588c57=_0x5b0155[_0x24eb66(0x140)]-0x1,_0x340a06;_0x588c57>=0x0;_0x588c57--)(_0x340a06=_0x5b0155[_0x588c57])&&(_0x10ddea=_0x340a06(_0x10ddea)||_0x10ddea);return _0x10ddea;},_0x3469de=(_0x20d0f8,_0x56546f)=>(_0x2ea7ab,_0x247a6d)=>_0x56546f(_0x2ea7ab,_0x247a6d,_0x20d0f8);let _0x40c594=class extends _0x38678b[_0x5d7770(0x187)]{constructor(_0x7e8fa5,_0x4fedcb,_0x327158,_0x2bbc61){const _0x34a4b8=_0x5d7770;super(),this[_0x34a4b8(0x159)]=_0x7e8fa5,this['_threadCommentModel']=_0x4fedcb,this[_0x34a4b8(0x14c)]=_0x327158,this[_0x34a4b8(0x199)]=_0x2bbc61,this[_0x34a4b8(0x152)](),this[_0x34a4b8(0x169)]();}[_0x5d7770(0x169)](){const _0x1181b3=_0x5d7770;this[_0x1181b3(0x18f)](this[_0x1181b3(0x1a4)][_0x1181b3(0x15c)]['pipe'](_0x477ad8[_0x1181b3(0x198)](0x10))['subscribe'](_0x2a18fd=>{const _0x44069a=_0x1181b3,_0x2bc753=new Set();_0x2a18fd[_0x44069a(0x162)](_0x86b16e=>{const _0x5dd4c7=_0x44069a;switch(_0x86b16e[_0x5dd4c7(0x131)]){case _0x5dd4c7(0x188):{const _0xe3c489=_0x86b16e[_0x5dd4c7(0x19b)][_0x5dd4c7(0x14f)];_0x2bc753[_0x5dd4c7(0x188)](_0xe3c489);break;}}}),_0xc2133f(this[_0x44069a(0x199)],_0x2bc753);}));}[_0x5d7770(0x152)](){const _0x1a23df=_0x5d7770;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x1a23df(0x1ac)](async _0x105ca4=>{const _0x39e779=_0x1a23df;var _0x13022d,_0x27f951,_0x75457c,_0x45a904;const _0xc68242=(_0x13022d=this[_0x39e779(0x1a4)][_0x39e779(0x174)](_0x105ca4[_0x39e779(0x12e)])[_0x39e779(0x129)](_0x34c3a8=>_0x34c3a8['threadId']===_0x105ca4[_0x39e779(0x176)]))==null?void 0x0:_0x13022d['root'];if(!_0xc68242)return;const {unitId:_0xf017d4,subUnitId:_0x337697}=_0xc68242;switch(_0x105ca4[_0x39e779(0x168)]&&this[_0x39e779(0x14c)]['addUser'](_0x105ca4[_0x39e779(0x168)]),_0x105ca4[_0x39e779(0x131)]){case _0x428470[_0x39e779(0x160)]:break;case _0x428470[_0x39e779(0x14a)]:{this[_0x39e779(0x1a4)]['addComment'](_0xf017d4,_0x337697,{'unitId':_0xf017d4,'subUnitId':_0x337697,'ref':'','id':_0x105ca4['replyId'],'dT':_0x2ef296(+_0x105ca4[_0x39e779(0x1a2)]),'threadId':_0x105ca4[_0x39e779(0x176)],'personId':(_0x75457c=(_0x27f951=_0x105ca4[_0x39e779(0x168)])==null?void 0x0:_0x27f951[_0x39e779(0x135)])!=null?_0x75457c:_0x105ca4[_0x39e779(0x19c)],'text':JSON[_0x39e779(0x17a)](_0x105ca4[_0x39e779(0x190)]),'parentId':_0xc68242['id']});break;}case _0x428470[_0x39e779(0x164)]:{const _0x47ce9a=this[_0x39e779(0x1a4)][_0x39e779(0x17b)](_0xf017d4,_0x337697,_0x105ca4[_0x39e779(0x158)]);_0x47ce9a&&_0x47ce9a[_0x39e779(0x17c)]&&this[_0x39e779(0x1a4)][_0x39e779(0x166)](_0xf017d4,_0x337697,_0x105ca4['replyId']);break;}case _0x428470[_0x39e779(0x150)]:{this[_0x39e779(0x1a4)][_0x39e779(0x171)](_0xf017d4,_0x337697,{'commentId':_0x105ca4[_0x39e779(0x158)],'text':JSON[_0x39e779(0x17a)](_0x105ca4[_0x39e779(0x190)])});break;}case _0x428470[_0x39e779(0x149)]:{const _0x5b0b39=(_0x45a904=this[_0x39e779(0x1a4)][_0x39e779(0x174)](_0x105ca4[_0x39e779(0x12e)])['find'](_0x1c26fc=>_0x1c26fc[_0x39e779(0x176)]===_0x105ca4[_0x39e779(0x176)]))==null?void 0x0:_0x45a904['root'];_0x5b0b39&&this['_threadCommentModel'][_0x39e779(0x125)](_0xf017d4,_0x337697,_0x5b0b39['id'],_0x105ca4[_0x39e779(0x13d)]===_0x47461c[_0x39e779(0x127)]);break;}}}));}};_0x40c594=_0x118e34([_0x3469de(0x0,_0x38678b['Inject'](_0x2001fd[_0x5d7770(0x1ab)])),_0x3469de(0x1,_0x38678b[_0x5d7770(0x184)](_0x28374e[_0x5d7770(0x146)])),_0x3469de(0x2,_0x38678b[_0x5d7770(0x184)](_0x38678b[_0x5d7770(0x13a)])),_0x3469de(0x3,_0x38678b[_0x5d7770(0x184)](_0x38678b[_0x5d7770(0x130)]))],_0x40c594);const _0x593eb0=_0x5d7770(0x13e),_0x4bd544={};var _0x14877f=Object['getOwnPropertyDescriptor'],_0x1f857a=(_0x3dd325,_0x426b47,_0x5a91a4,_0x3c4f68)=>{const _0x46caef=_0x5d7770;for(var _0x1396aa=_0x3c4f68>0x1?void 0x0:_0x3c4f68?_0x14877f(_0x426b47,_0x5a91a4):_0x426b47,_0x159338=_0x3dd325[_0x46caef(0x140)]-0x1,_0x297cee;_0x159338>=0x0;_0x159338--)(_0x297cee=_0x3dd325[_0x159338])&&(_0x1396aa=_0x297cee(_0x1396aa)||_0x1396aa);return _0x1396aa;},_0x5ac744=(_0x18f5dd,_0x7c5ab)=>(_0x52c9ed,_0x31c607)=>_0x7c5ab(_0x52c9ed,_0x31c607,_0x18f5dd);function _0x1cfa3a(_0x251408,_0x216ea8){const _0x2bb684=_0x5d7770,_0x28aff4=_0x251408['replies'][0x0];return{..._0x216ea8,'id':_0x28aff4['replyId'],'resolved':_0x251408['solved']===0x1,'dT':_0x2ef296(_0x28aff4[_0x2bb684(0x1a2)]),'personId':_0x28aff4['userId'],'threadId':_0x28aff4[_0x2bb684(0x176)]};}function _0x58c7f8(_0x2d1f34,_0x3c9543,_0x1a0135){const _0x355a0a=_0x5d7770;var _0xc8295,_0x5379c8;if(((_0x5379c8=(_0xc8295=_0x2d1f34==null?void 0x0:_0x2d1f34[_0x355a0a(0x1a7)])==null?void 0x0:_0xc8295['length'])!=null?_0x5379c8:0x0)>0x0){const _0x55fbdf=(_0x7bff85,_0x49d15e)=>({'id':_0x7bff85[_0x355a0a(0x158)],'threadId':_0x7bff85['threadId'],'dT':_0x2ef296(_0x7bff85[_0x355a0a(0x1a2)]),'personId':_0x7bff85[_0x355a0a(0x19c)],'resolved':_0x2d1f34['solved']===_0x47461c[_0x355a0a(0x127)],'unitId':_0x3c9543,'subUnitId':_0x1a0135,'text':JSON[_0x355a0a(0x17a)](_0x7bff85[_0x355a0a(0x190)]),'parentId':_0x49d15e}),_0x236a48=_0x55fbdf(_0x2d1f34[_0x355a0a(0x1a7)][0x0]);return{..._0x236a48,'children':_0x2d1f34[_0x355a0a(0x1a7)]['slice'](0x1)[_0x355a0a(0x179)](_0x375225=>_0x55fbdf(_0x375225,_0x236a48['id']))};}return null;}let _0x563c7d=class{constructor(_0x4946c7,_0x5c0f3b,_0x2b7a57,_0x1916fa){const _0x398c56=_0x5d7770;this['_httpService']=_0x4946c7,this[_0x398c56(0x14c)]=_0x5c0f3b,this[_0x398c56(0x16d)]=_0x2b7a57,this['_injector']=_0x1916fa;}async[_0x5d7770(0x1a3)](_0x4e8c67){const _0x1011d8=_0x5d7770;var _0x865270,_0x24be4c;const {parentId:_0x3754e5,unitId:_0x1db013,text:_0x345ff0,threadId:_0xf9c20c}=_0x4e8c67,_0x154932=(_0x24be4c=(_0x865270=_0x345ff0[_0x1011d8(0x18b)])==null?void 0x0:_0x865270[_0x1011d8(0x18a)](_0xb0b033=>_0xb0b033[_0x1011d8(0x134)]===_0x38678b[_0x1011d8(0x138)][_0x1011d8(0x167)])[_0x1011d8(0x179)](_0x30d8ba=>_0x30d8ba[_0x1011d8(0x185)]))!=null?_0x24be4c:[],_0x1e6191=JSON[_0x1011d8(0x151)](_0x345ff0),_0x25d8e8=(await this[_0x1011d8(0x16d)][_0x1011d8(0x183)](_0x1db013))['getMemberID']();if(_0x3754e5){const _0x3b4299={'memberId':_0x25d8e8,'unitId':_0x1db013,'content':_0x1e6191,'mention':_0x154932,'threadId':_0xf9c20c},_0x2c956a=(await this[_0x1011d8(0x155)][_0x1011d8(0x13f)]('/universer-api/comment/unit/'+_0x1db013+_0x1011d8(0x12a),{'body':_0x3b4299}))[_0x1011d8(0x180)][_0x1011d8(0x186)];return{..._0x4e8c67,'id':_0x2c956a[_0x1011d8(0x158)],'dT':_0x38678b['dayjs'](+_0x2c956a[_0x1011d8(0x1a2)])[_0x1011d8(0x177)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c956a[_0x1011d8(0x19c)]};}else{const _0x21daba={'memberId':_0x25d8e8,'unitId':_0x1db013,'content':_0x1e6191,'mention':_0x154932},_0x2b80fd=await this['_httpService'][_0x1011d8(0x13f)](_0x1011d8(0x148)+_0x1db013+_0x1011d8(0x15d),{'body':_0x21daba});return _0x1cfa3a(_0x2b80fd['body'][_0x1011d8(0x17e)],_0x4e8c67);}}async[_0x5d7770(0x171)](_0x1c0f28){const _0x57df37=_0x5d7770;var _0x1a198d,_0x506979;const {text:_0x219793,unitId:_0x564765}=_0x1c0f28,_0x559663=(_0x506979=(_0x1a198d=_0x219793[_0x57df37(0x18b)])==null?void 0x0:_0x1a198d[_0x57df37(0x18a)](_0x58ef66=>_0x58ef66[_0x57df37(0x134)]===_0x38678b[_0x57df37(0x138)][_0x57df37(0x167)])[_0x57df37(0x179)](_0xe0facd=>_0xe0facd['rangeId']))!=null?_0x506979:[],_0xee3d54=JSON['stringify'](_0x219793),_0x2326af=_0x1c0f28[_0x57df37(0x176)],_0x56096b=_0x1c0f28['id'],_0x50ad0c={'memberId':(await this['_sessionService'][_0x57df37(0x183)](_0x564765))[_0x57df37(0x1a6)](),'unitId':_0x564765,'threadId':_0x2326af,'mention':_0x559663,'content':_0xee3d54,'replyId':_0x56096b},_0x45d14c=await this['_httpService']['post'](_0x57df37(0x148)+_0x564765+_0x57df37(0x19d),{'body':_0x50ad0c});return!_0x45d14c[_0x57df37(0x180)][_0x57df37(0x139)]||_0x45d14c[_0x57df37(0x180)][_0x57df37(0x139)][_0x57df37(0x16b)]===0x1;}async[_0x5d7770(0x125)](_0x4f252c){const _0x5bc462=_0x5d7770,{unitId:_0x32fdba}=_0x4f252c,_0x3738a2=_0x4f252c[_0x5bc462(0x176)],_0x596ea9={'memberId':this['_userService'][_0x5bc462(0x193)]()[_0x5bc462(0x135)],'unitId':_0x32fdba,'threadId':_0x3738a2,'solved':_0x4f252c[_0x5bc462(0x19f)]?_0x47461c[_0x5bc462(0x127)]:_0x47461c[_0x5bc462(0x1aa)]},_0x450caa=await this[_0x5bc462(0x155)][_0x5bc462(0x13f)](_0x5bc462(0x148)+_0x32fdba+'/solved',{'body':_0x596ea9});return!_0x450caa[_0x5bc462(0x180)][_0x5bc462(0x139)]||_0x450caa[_0x5bc462(0x180)]['error']['code']===0x1;}async[_0x5d7770(0x166)](_0x35275e,_0x12cc2e,_0x3beab9,_0x34bf90){const _0x40abb3=_0x5d7770,_0x51dd24={'memberId':(await this[_0x40abb3(0x16d)][_0x40abb3(0x183)](_0x35275e))[_0x40abb3(0x1a6)](),'threadId':_0x3beab9,'replyId':_0x34bf90,'unitId':_0x35275e},_0x41cede=await this[_0x40abb3(0x155)][_0x40abb3(0x13f)](_0x40abb3(0x148)+_0x35275e+_0x40abb3(0x172),{'body':_0x51dd24});return!_0x41cede[_0x40abb3(0x180)]['error']||_0x41cede[_0x40abb3(0x180)][_0x40abb3(0x139)][_0x40abb3(0x16b)]===0x1;}async['listComments'](_0x39849d,_0x429fd4,_0x1cd3c9){const _0x1b44de=_0x5d7770,_0x5af5f8={'unitId':_0x39849d,'threadId':_0x1cd3c9},_0xa5b614=await this[_0x1b44de(0x155)][_0x1b44de(0x13f)]('/universer-api/comment/unit/'+_0x39849d+_0x1b44de(0x173),{'body':_0x5af5f8}),_0xec603c=_0x1cd3c9['map'](_0x17a2ac=>_0x58c7f8(_0xa5b614[_0x1b44de(0x180)][_0x1b44de(0x13c)][_0x17a2ac],_0x39849d,_0x429fd4))[_0x1b44de(0x18a)](Boolean);return Object['values'](_0xa5b614[_0x1b44de(0x180)]['users'])[_0x1b44de(0x162)](_0x7e3b7c=>{const _0x14c456=_0x1b44de;this[_0x14c456(0x14c)][_0x14c456(0x192)](_0x7e3b7c);}),_0xec603c;}['saveCommentToSnapshot'](_0x4a4c04){const _0x5d6fd8=_0x5d7770;return{'id':_0x4a4c04['id'],'threadId':_0x4a4c04[_0x5d6fd8(0x176)],'ref':_0x4a4c04[_0x5d6fd8(0x16a)]};}};_0x563c7d=_0x1f857a([_0x5ac744(0x0,_0x38678b[_0x5d7770(0x184)](_0x1e130c[_0x5d7770(0x18d)])),_0x5ac744(0x1,_0x38678b[_0x5d7770(0x184)](_0x38678b['UserManagerService'])),_0x5ac744(0x2,_0x38678b[_0x5d7770(0x184)](_0x2001fd[_0x5d7770(0x154)])),_0x5ac744(0x3,_0x38678b[_0x5d7770(0x184)](_0x38678b[_0x5d7770(0x130)]))],_0x563c7d);var _0x422814=Object['getOwnPropertyDescriptor'],_0x298861=(_0x1f6963,_0x407bb7,_0x473686,_0xcce59)=>{const _0x57fb6e=_0x5d7770;for(var _0x37d3c1=_0xcce59>0x1?void 0x0:_0xcce59?_0x422814(_0x407bb7,_0x473686):_0x407bb7,_0x563133=_0x1f6963[_0x57fb6e(0x140)]-0x1,_0x5027e5;_0x563133>=0x0;_0x563133--)(_0x5027e5=_0x1f6963[_0x563133])&&(_0x37d3c1=_0x5027e5(_0x37d3c1)||_0x37d3c1);return _0x37d3c1;},_0x3f9b08=(_0x6b74a6,_0x106acc)=>(_0x11de00,_0x134506)=>_0x106acc(_0x11de00,_0x134506,_0x6b74a6);let _0xc834bd=class extends _0x38678b['Disposable']{constructor(_0x269cc2,_0x372aaa){const _0x52ceb2=_0x5d7770;super(),this[_0x52ceb2(0x12b)]=_0x269cc2,this[_0x52ceb2(0x141)]=_0x372aaa,this['_initDataSource']();}[_0x5d7770(0x142)](){const _0x6c39c0=_0x5d7770;this[_0x6c39c0(0x12b)]['dataSource']=this[_0x6c39c0(0x141)],this[_0x6c39c0(0x12b)][_0x6c39c0(0x15f)]=!0x1;}};_0xc834bd=_0x298861([_0x3f9b08(0x0,_0x28374e[_0x5d7770(0x156)]),_0x3f9b08(0x1,_0x38678b[_0x5d7770(0x184)](_0x563c7d))],_0xc834bd);var _0x44610b=Object[_0x5d7770(0x170)],_0x2c309a=Object[_0x5d7770(0x143)],_0x25e908=(_0x331fe6,_0x7d5dbc,_0x10513a)=>_0x7d5dbc in _0x331fe6?_0x44610b(_0x331fe6,_0x7d5dbc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x10513a}):_0x331fe6[_0x7d5dbc]=_0x10513a,_0x2791e9=(_0x105a21,_0xeeb0cc,_0xc8e2aa,_0x3f60e8)=>{const _0x1af9fd=_0x5d7770;for(var _0x245178=_0x3f60e8>0x1?void 0x0:_0x3f60e8?_0x2c309a(_0xeeb0cc,_0xc8e2aa):_0xeeb0cc,_0x801f2c=_0x105a21[_0x1af9fd(0x140)]-0x1,_0xb7bcfa;_0x801f2c>=0x0;_0x801f2c--)(_0xb7bcfa=_0x105a21[_0x801f2c])&&(_0x245178=_0xb7bcfa(_0x245178)||_0x245178);return _0x245178;},_0x1a8e5b=(_0x17c771,_0x53b1a0)=>(_0x33e65f,_0x5c6d23)=>_0x53b1a0(_0x33e65f,_0x5c6d23,_0x17c771),_0x169841=(_0x16d7bb,_0x10298a,_0x553820)=>_0x25e908(_0x16d7bb,typeof _0x10298a!=_0x5d7770(0x12c)?_0x10298a+'':_0x10298a,_0x553820);_0x109b9e[_0x5d7770(0x14b)]=class extends _0x38678b[_0x5d7770(0x1a0)]{constructor(_0x416aa0=_0x4bd544,_0x37e721,_0x5dd1e9){const _0x1a1639=_0x5d7770;super(),this[_0x1a1639(0x13b)]=_0x416aa0,this[_0x1a1639(0x199)]=_0x37e721,this[_0x1a1639(0x145)]=_0x5dd1e9;const {..._0x37f238}=_0x38678b[_0x1a1639(0x137)]({},_0x4bd544,this['_config']);this[_0x1a1639(0x145)][_0x1a1639(0x16e)](_0x593eb0,_0x37f238);}[_0x5d7770(0x189)](){const _0x204fc4=_0x5d7770;[[_0x563c7d],[_0xc834bd],[_0x40c594]][_0x204fc4(0x162)](_0x16738e=>{const _0x2e5afd=_0x204fc4;this[_0x2e5afd(0x199)][_0x2e5afd(0x188)](_0x16738e);});}[_0x5d7770(0x14e)](){const _0x1e8499=_0x5d7770;this[_0x1e8499(0x199)]['get'](_0xc834bd),this[_0x1e8499(0x199)][_0x1e8499(0x144)](_0x40c594);}},_0x169841(_0x109b9e[_0x5d7770(0x14b)],_0x5d7770(0x15a),_0x58ed90),_0x169841(_0x109b9e[_0x5d7770(0x14b)],_0x5d7770(0x131),_0x38678b[_0x5d7770(0x181)][_0x5d7770(0x15b)]),_0x109b9e[_0x5d7770(0x14b)]=_0x2791e9([_0x38678b['DependentOn'](_0x2c84f5[_0x5d7770(0x136)],_0x2001fd[_0x5d7770(0x14d)],_0x4f35c2[_0x5d7770(0x126)]),_0x1a8e5b(0x1,_0x38678b[_0x5d7770(0x184)](_0x38678b['Injector'])),_0x1a8e5b(0x2,_0x38678b[_0x5d7770(0x1a1)])],_0x109b9e[_0x5d7770(0x14b)]),Object['defineProperty'](_0x109b9e,Symbol[_0x5d7770(0x147)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.1
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/license": "0.8.1
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs-pro/collaboration-client": "0.8.1
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/license": "0.8.1",
|
|
49
|
+
"@univerjs/thread-comment": "0.8.1",
|
|
50
|
+
"@univerjs/thread-comment-ui": "0.8.1",
|
|
51
|
+
"@univerjs-pro/collaboration-client": "0.8.1",
|
|
52
|
+
"@univerjs/core": "0.8.1",
|
|
53
|
+
"@univerjs/network": "0.8.1",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
|
-
"vitest": "^3.2.
|
|
60
|
+
"vitest": "^3.2.0",
|
|
61
61
|
"@univerjs-infra/shared": "0.8.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|