@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-aa3ee78 → 0.6.7-experimental.20250331-d1f1879
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x37702a=_0x4e19;(function(_0x281143,_0x279203){const _0x2eacfa=_0x4e19,_0x1229f3=_0x281143();while(!![]){try{const _0x8b8a60=parseInt(_0x2eacfa(0xed))/0x1*(-parseInt(_0x2eacfa(0xbd))/0x2)+parseInt(_0x2eacfa(0xdc))/0x3*(parseInt(_0x2eacfa(0x119))/0x4)+parseInt(_0x2eacfa(0x101))/0x5+-parseInt(_0x2eacfa(0xd7))/0x6*(parseInt(_0x2eacfa(0x12d))/0x7)+parseInt(_0x2eacfa(0xbe))/0x8*(parseInt(_0x2eacfa(0xf1))/0x9)+-parseInt(_0x2eacfa(0xfb))/0xa+-parseInt(_0x2eacfa(0x12e))/0xb*(-parseInt(_0x2eacfa(0xfe))/0xc);if(_0x8b8a60===_0x279203)break;else _0x1229f3['push'](_0x1229f3['shift']());}catch(_0x391373){_0x1229f3['push'](_0x1229f3['shift']());}}}(_0x1243,0x9b5aa));function _0x4e19(_0x20bb99,_0x50e313){const _0x124359=_0x1243();return _0x4e19=function(_0x4e196e,_0x4a90c5){_0x4e196e=_0x4e196e-0xbd;let _0x249553=_0x124359[_0x4e196e];return _0x249553;},_0x4e19(_0x20bb99,_0x50e313);}Object['defineProperty'](exports,Symbol[_0x37702a(0xd6)],{'value':_0x37702a(0x130)});const b=require(_0x37702a(0x12f)),T=require('@univerjs-pro/license'),c=require(_0x37702a(0x104)),j=require(_0x37702a(0x131)),M=require('@univerjs/thread-comment'),w=require(_0x37702a(0xee)),P=require(_0x37702a(0x10a)),U=_0x37702a(0xfa);var I=(_0x52eb67=>(_0x52eb67[_0x52eb67[_0x37702a(0xbf)]=0x0]=_0x37702a(0xbf),_0x52eb67[_0x52eb67[_0x37702a(0xc2)]=0x1]='Solved',_0x52eb67[_0x52eb67[_0x37702a(0xec)]=-0x1]=_0x37702a(0xec),_0x52eb67))(I||{}),v=(_0x5a535e=>(_0x5a535e[_0x5a535e[_0x37702a(0xe9)]=0x0]='Unknown',_0x5a535e[_0x5a535e[_0x37702a(0xf7)]=0x1]='Add',_0x5a535e[_0x5a535e[_0x37702a(0xf4)]=0x2]='Reply',_0x5a535e[_0x5a535e[_0x37702a(0xd2)]=0x3]=_0x37702a(0xd2),_0x5a535e[_0x5a535e[_0x37702a(0xf3)]=0x4]=_0x37702a(0xf3),_0x5a535e[_0x5a535e['Solve']=0x5]=_0x37702a(0x11c),_0x5a535e[_0x5a535e[_0x37702a(0xec)]=-0x1]='UNRECOGNIZED',_0x5a535e))(v||{});const f=_0x19ebb9=>c[_0x37702a(0xf6)](new Date(+_0x19ebb9))['format'](_0x37702a(0xca)),R=async(_0x4ff715,_0x51a3c7)=>{const _0x2d1af0=_0x37702a,_0x2c9752=_0x4ff715[_0x2d1af0(0x11e)](c[_0x2d1af0(0xf2)]),_0x13d939=_0x4ff715['get'](P[_0x2d1af0(0x113)]);_0x51a3c7[_0x2d1af0(0xeb)](_0x3c59aa=>{const _0x37d078=_0x2d1af0;_0x2c9752[_0x37d078(0xf9)](_0x3c59aa)&&_0x51a3c7[_0x37d078(0x106)](_0x3c59aa);}),_0x51a3c7[_0x2d1af0(0xce)]&&(await _0x13d939['get'](_0x2d1af0(0xc5),{'params':{'userIDs':[..._0x51a3c7]}}))[_0x2d1af0(0x117)][_0x2d1af0(0x139)][_0x2d1af0(0xeb)](_0x42a6b9=>{const _0x59b9c1=_0x2d1af0;_0x42a6b9&&_0x2c9752[_0x59b9c1(0x132)](_0x42a6b9);});};var $=Object[_0x37702a(0x105)],E=(_0x5a0ebf,_0x1023af,_0x2ecaeb,_0x151b7d)=>{const _0x3fd42d=_0x37702a;for(var _0x34658a=_0x151b7d>0x1?void 0x0:_0x151b7d?$(_0x1023af,_0x2ecaeb):_0x1023af,_0x2ccd2b=_0x5a0ebf[_0x3fd42d(0xe5)]-0x1,_0x20e524;_0x2ccd2b>=0x0;_0x2ccd2b--)(_0x20e524=_0x5a0ebf[_0x2ccd2b])&&(_0x34658a=_0x20e524(_0x34658a)||_0x34658a);return _0x34658a;},S=(_0x530dac,_0x1ddd90)=>(_0x1e1c03,_0x24e58b)=>_0x1ddd90(_0x1e1c03,_0x24e58b,_0x530dac);let p=class extends c[_0x37702a(0xe2)]{constructor(_0x2f9403,_0x4e8f5b,_0x69577b,_0x204e77){const _0x45318d=_0x37702a;super(),this['_commentService']=_0x2f9403,this[_0x45318d(0xcf)]=_0x4e8f5b,this[_0x45318d(0x11b)]=_0x69577b,this['_injector']=_0x204e77,this[_0x45318d(0xdb)](),this['_initUserSync']();}[_0x37702a(0xe3)](){const _0x24e2d7=_0x37702a;this[_0x24e2d7(0xde)](this[_0x24e2d7(0xcf)][_0x24e2d7(0x12c)][_0x24e2d7(0xcc)](w[_0x24e2d7(0xea)](0x10))[_0x24e2d7(0x110)](_0x58f7e2=>{const _0x2afac9=_0x24e2d7,_0x42b98b=new Set();_0x58f7e2[_0x2afac9(0xeb)](_0x3423f7=>{const _0x450573=_0x2afac9;switch(_0x3423f7[_0x450573(0x10c)]){case _0x450573(0x133):{const _0x456fa7=_0x3423f7[_0x450573(0x112)]['personId'];_0x42b98b[_0x450573(0x133)](_0x456fa7);break;}}}),R(this[_0x2afac9(0x120)],_0x42b98b);}));}[_0x37702a(0xdb)](){const _0x40e04d=_0x37702a;this[_0x40e04d(0xde)](this['_commentService'][_0x40e04d(0x12c)]['subscribe'](async _0x5dee67=>{const _0x4eba51=_0x40e04d;var _0x213d8f,_0x3bca80,_0x2cc8f6,_0x43ab6c;const _0x40e9ed=(_0x213d8f=this['_threadCommentModel'][_0x4eba51(0xc1)](_0x5dee67['unitId'])['find'](_0x3e6a73=>_0x3e6a73[_0x4eba51(0xe8)]===_0x5dee67[_0x4eba51(0xe8)]))==null?void 0x0:_0x213d8f['root'];if(!_0x40e9ed)return;const {unitId:_0x448f36,subUnitId:_0x2ff2ba}=_0x40e9ed;switch(_0x5dee67['user']&&this[_0x4eba51(0x11b)][_0x4eba51(0x132)](_0x5dee67[_0x4eba51(0x107)]),_0x5dee67[_0x4eba51(0x10c)]){case v[_0x4eba51(0xf7)]:break;case v[_0x4eba51(0xf4)]:{this['_threadCommentModel'][_0x4eba51(0xc4)](_0x448f36,_0x2ff2ba,{'unitId':_0x448f36,'subUnitId':_0x2ff2ba,'ref':'','id':_0x5dee67[_0x4eba51(0x136)],'dT':f(+_0x5dee67[_0x4eba51(0x118)]),'threadId':_0x5dee67[_0x4eba51(0xe8)],'personId':(_0x2cc8f6=(_0x3bca80=_0x5dee67[_0x4eba51(0x107)])==null?void 0x0:_0x3bca80[_0x4eba51(0x11a)])!=null?_0x2cc8f6:_0x5dee67[_0x4eba51(0x122)],'text':JSON[_0x4eba51(0xe1)](_0x5dee67[_0x4eba51(0xc6)]),'parentId':_0x40e9ed['id']});break;}case v[_0x4eba51(0xf3)]:{const _0x49c9a0=this[_0x4eba51(0xcf)][_0x4eba51(0xe6)](_0x448f36,_0x2ff2ba,_0x5dee67[_0x4eba51(0x136)]);_0x49c9a0&&_0x49c9a0['parentId']&&this[_0x4eba51(0xcf)][_0x4eba51(0xda)](_0x448f36,_0x2ff2ba,_0x5dee67[_0x4eba51(0x136)]);break;}case v[_0x4eba51(0xd2)]:{this[_0x4eba51(0xcf)][_0x4eba51(0x10f)](_0x448f36,_0x2ff2ba,{'commentId':_0x5dee67[_0x4eba51(0x136)],'text':JSON[_0x4eba51(0xe1)](_0x5dee67[_0x4eba51(0xc6)])});break;}case v[_0x4eba51(0x11c)]:{const _0x4ab5d7=(_0x43ab6c=this[_0x4eba51(0xcf)][_0x4eba51(0xc1)](_0x5dee67[_0x4eba51(0x109)])[_0x4eba51(0xd5)](_0x4fa7dc=>_0x4fa7dc['threadId']===_0x5dee67[_0x4eba51(0xe8)]))==null?void 0x0:_0x43ab6c[_0x4eba51(0x134)];_0x4ab5d7&&this[_0x4eba51(0xcf)]['resolveComment'](_0x448f36,_0x2ff2ba,_0x4ab5d7['id'],_0x5dee67['solved']===I[_0x4eba51(0xc2)]);break;}}}));}};p=E([S(0x0,c[_0x37702a(0x10d)](b['CommentService'])),S(0x1,c[_0x37702a(0x10d)](M[_0x37702a(0xd1)])),S(0x2,c[_0x37702a(0x10d)](c[_0x37702a(0xf2)])),S(0x3,c[_0x37702a(0x10d)](c[_0x37702a(0xd9)]))],p);const q=_0x37702a(0x11d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3932ad,_0x4c6327,_0x5bf3c0,_0x16a57b)=>{const _0x477b66=_0x37702a;for(var _0x3eeebd=_0x16a57b>0x1?void 0x0:_0x16a57b?A(_0x4c6327,_0x5bf3c0):_0x4c6327,_0x254288=_0x3932ad[_0x477b66(0xe5)]-0x1,_0x578ace;_0x254288>=0x0;_0x254288--)(_0x578ace=_0x3932ad[_0x254288])&&(_0x3eeebd=_0x578ace(_0x3eeebd)||_0x3eeebd);return _0x3eeebd;},_=(_0x399038,_0x454d31)=>(_0x2d3102,_0x36bc08)=>_0x454d31(_0x2d3102,_0x36bc08,_0x399038);function _0x1243(){const _0x3f702f=['addComment','/universer-api/user/list','content','/add','filter','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','/reply','pipe','DependentOn','size','_threadCommentModel','symbol','ThreadCommentModel','Edit','UniverThreadCommentDataSourcePlugin','IThreadCommentDataSourceService','find','toStringTag','54ZeUvAg','requireSession','Injector','deleteComment','_init','290529RmKlME','error','disposeWithMe','merge','syncUpdateMutationToColla','parse','Disposable','_initUserSync','comment','length','getComment','IConfigService','threadId','Unknown','bufferTime','forEach','UNRECOGNIZED','1XduUQb','rxjs','listComments','COMMENT','8010FHEGOO','UserManagerService','Delete','Reply','rangeId','dayjs','Add','CollaborationSessionService','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','973830QZtwTW','_threadCommentDataSource','pluginName','14175456aSdSHe','map','post','2808490gtcVSw','/edit','resolved','@univerjs/core','getOwnPropertyDescriptor','delete','user','_sessionService','unitId','@univerjs/network','ref','type','Inject','_httpService','updateComment','subscribe','onStarting','payload','HTTPService','comments','stringify','format','body','createTimestamp','8WsaFkp','userID','_userService','Solve','thread-comment-data-source.config','get','getMemberID','_injector','_config','userId','/universer-api/comment/unit/','replies','code','UniverThreadCommentUIPlugin','/solved','solved','_configService','rangeType','resolveComment','commentUpdate$','818503McChwM','11eCYIdJ','@univerjs-pro/collaboration-client','Module','@univerjs/thread-comment-ui','addUser','add','root','getCurrentUser','replyId','/delete','UniverCollaborationClientPlugin','users','674996PNKoal','1680QgSUuB','OpenOrReOpen','customRanges','getUnit','Solved','Plugin'];_0x1243=function(){return _0x3f702f;};return _0x1243();}function Y(_0x404d7c,_0x32ef80){const _0x12f903=_0x37702a,_0x3cad46=_0x404d7c[_0x12f903(0x124)][0x0];return{..._0x32ef80,'id':_0x3cad46['replyId'],'resolved':_0x404d7c[_0x12f903(0x128)]===0x1,'dT':f(_0x3cad46[_0x12f903(0x118)]),'personId':_0x3cad46[_0x12f903(0x122)],'threadId':_0x3cad46[_0x12f903(0xe8)]};}function G(_0x1e4fd7,_0x19043d,_0x3163d6){const _0x486e68=_0x37702a;var _0x2e2b24,_0x53f64c;if(((_0x53f64c=(_0x2e2b24=_0x1e4fd7==null?void 0x0:_0x1e4fd7[_0x486e68(0x124)])==null?void 0x0:_0x2e2b24['length'])!=null?_0x53f64c:0x0)>0x0){const _0x115e26=(_0x20c33e,_0x10ec38)=>({'id':_0x20c33e[_0x486e68(0x136)],'threadId':_0x20c33e[_0x486e68(0xe8)],'dT':f(_0x20c33e['createTimestamp']),'personId':_0x20c33e['userId'],'resolved':_0x1e4fd7[_0x486e68(0x128)]===I['Solved'],'unitId':_0x19043d,'subUnitId':_0x3163d6,'text':JSON[_0x486e68(0xe1)](_0x20c33e[_0x486e68(0xc6)]),'parentId':_0x10ec38}),_0x5c5a23=_0x115e26(_0x1e4fd7[_0x486e68(0x124)][0x0]);return{..._0x5c5a23,'children':_0x1e4fd7[_0x486e68(0x124)]['slice'](0x1)[_0x486e68(0xff)](_0x3892ba=>_0x115e26(_0x3892ba,_0x5c5a23['id']))};}return null;}let g=class{constructor(_0x28e338,_0x1e9d94,_0x461168,_0x25fc20){const _0x357f64=_0x37702a;this['_httpService']=_0x28e338,this[_0x357f64(0x11b)]=_0x1e9d94,this[_0x357f64(0x108)]=_0x461168,this['_injector']=_0x25fc20;}async[_0x37702a(0xc4)](_0x2b326f){const _0x28152d=_0x37702a;var _0x187b5f,_0x376498;const {parentId:_0x1b0c27,unitId:_0x29abe0,text:_0x43a3ff,threadId:_0x14496b}=_0x2b326f,_0x283d24=(_0x376498=(_0x187b5f=_0x43a3ff[_0x28152d(0xc0)])==null?void 0x0:_0x187b5f[_0x28152d(0xc8)](_0x11c82b=>_0x11c82b[_0x28152d(0x12a)]===c['CustomRangeType'][_0x28152d(0xf0)])['map'](_0x3df206=>_0x3df206[_0x28152d(0xf5)]))!=null?_0x376498:[],_0x5d092f=JSON[_0x28152d(0x115)](_0x43a3ff),_0x48dae8=(await this[_0x28152d(0x108)][_0x28152d(0xd8)](_0x29abe0))['getMemberID']();if(_0x1b0c27){const _0x4d528e={'memberId':_0x48dae8,'unitId':_0x29abe0,'content':_0x5d092f,'mention':_0x283d24,'threadId':_0x14496b},_0x2b1f81=(await this[_0x28152d(0x10e)][_0x28152d(0x100)](_0x28152d(0x123)+_0x29abe0+_0x28152d(0xcb),{'body':_0x4d528e}))[_0x28152d(0x117)]['reply'];return{..._0x2b326f,'id':_0x2b1f81['replyId'],'dT':c[_0x28152d(0xf6)](+_0x2b1f81[_0x28152d(0x118)])[_0x28152d(0x116)](_0x28152d(0xca)),'personId':_0x2b1f81[_0x28152d(0x122)]};}else{const _0x925215={'memberId':_0x48dae8,'unitId':_0x29abe0,'content':_0x5d092f,'mention':_0x283d24},_0x22fd30=await this[_0x28152d(0x10e)]['post'](_0x28152d(0x123)+_0x29abe0+_0x28152d(0xc7),{'body':_0x925215});return Y(_0x22fd30[_0x28152d(0x117)][_0x28152d(0xe4)],_0x2b326f);}}async['updateComment'](_0x4f8430){const _0x432958=_0x37702a;var _0x3fdeac,_0x2c745f;const {text:_0xbc3c6d,unitId:_0x29d6b3}=_0x4f8430,_0x3cd94e=(_0x2c745f=(_0x3fdeac=_0xbc3c6d[_0x432958(0xc0)])==null?void 0x0:_0x3fdeac[_0x432958(0xc8)](_0xb44e04=>_0xb44e04[_0x432958(0x12a)]===c['CustomRangeType'][_0x432958(0xf0)])[_0x432958(0xff)](_0xe0f962=>_0xe0f962[_0x432958(0xf5)]))!=null?_0x2c745f:[],_0x17551c=JSON[_0x432958(0x115)](_0xbc3c6d),_0x321943=_0x4f8430[_0x432958(0xe8)],_0xbf9178=_0x4f8430['id'],_0x2dee88={'memberId':(await this['_sessionService'][_0x432958(0xd8)](_0x29d6b3))[_0x432958(0x11f)](),'unitId':_0x29d6b3,'threadId':_0x321943,'mention':_0x3cd94e,'content':_0x17551c,'replyId':_0xbf9178},_0x18be0e=await this['_httpService'][_0x432958(0x100)](_0x432958(0x123)+_0x29d6b3+_0x432958(0x102),{'body':_0x2dee88});return!_0x18be0e[_0x432958(0x117)][_0x432958(0xdd)]||_0x18be0e['body'][_0x432958(0xdd)][_0x432958(0x125)]===0x1;}async[_0x37702a(0x12b)](_0x570c2c){const _0x49d92f=_0x37702a,{unitId:_0x59543f}=_0x570c2c,_0x1de2b7=_0x570c2c[_0x49d92f(0xe8)],_0x352d33={'memberId':this[_0x49d92f(0x11b)][_0x49d92f(0x135)]()[_0x49d92f(0x11a)],'unitId':_0x59543f,'threadId':_0x1de2b7,'solved':_0x570c2c[_0x49d92f(0x103)]?I[_0x49d92f(0xc2)]:I[_0x49d92f(0xbf)]},_0x55cd1f=await this[_0x49d92f(0x10e)]['post'](_0x49d92f(0x123)+_0x59543f+_0x49d92f(0x127),{'body':_0x352d33});return!_0x55cd1f['body'][_0x49d92f(0xdd)]||_0x55cd1f[_0x49d92f(0x117)]['error'][_0x49d92f(0x125)]===0x1;}async[_0x37702a(0xda)](_0x5484bb,_0x5b8360,_0x118f3e,_0x3a5236){const _0x235ed5=_0x37702a,_0x11daa7={'memberId':(await this[_0x235ed5(0x108)][_0x235ed5(0xd8)](_0x5484bb))[_0x235ed5(0x11f)](),'threadId':_0x118f3e,'replyId':_0x3a5236,'unitId':_0x5484bb},_0x33fe90=await this[_0x235ed5(0x10e)]['post'](_0x235ed5(0x123)+_0x5484bb+_0x235ed5(0x137),{'body':_0x11daa7});return!_0x33fe90[_0x235ed5(0x117)][_0x235ed5(0xdd)]||_0x33fe90[_0x235ed5(0x117)]['error'][_0x235ed5(0x125)]===0x1;}async[_0x37702a(0xef)](_0x1c80fa,_0x34f614,_0x34e9ed){const _0x549370=_0x37702a,_0xeab30b={'unitId':_0x1c80fa,'threadId':_0x34e9ed},_0x1a317e=await this[_0x549370(0x10e)][_0x549370(0x100)]('/universer-api/comment/unit/'+_0x1c80fa+'/list',{'body':_0xeab30b}),_0x52424c=_0x34e9ed[_0x549370(0xff)](_0x5b1f60=>G(_0x1a317e[_0x549370(0x117)][_0x549370(0x114)][_0x5b1f60],_0x1c80fa,_0x34f614))[_0x549370(0xc8)](Boolean);return Object['values'](_0x1a317e[_0x549370(0x117)][_0x549370(0x139)])[_0x549370(0xeb)](_0x1b9e76=>{const _0x36f050=_0x549370;this[_0x36f050(0x11b)][_0x36f050(0x132)](_0x1b9e76);}),_0x52424c;}['saveCommentToSnapshot'](_0x4fb178){const _0x478028=_0x37702a;return{'id':_0x4fb178['id'],'threadId':_0x4fb178[_0x478028(0xe8)],'ref':_0x4fb178[_0x478028(0x10b)]};}};g=x([_(0x0,c[_0x37702a(0x10d)](P[_0x37702a(0x113)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x37702a(0x10d)](b[_0x37702a(0xf8)])),_(0x3,c[_0x37702a(0x10d)](c[_0x37702a(0xd9)]))],g);var H=Object[_0x37702a(0x105)],J=(_0x15c8ff,_0x2964c3,_0x3bc372,_0x192e98)=>{for(var _0x5a258e=_0x192e98>0x1?void 0x0:_0x192e98?H(_0x2964c3,_0x3bc372):_0x2964c3,_0x36c0ff=_0x15c8ff['length']-0x1,_0x271d61;_0x36c0ff>=0x0;_0x36c0ff--)(_0x271d61=_0x15c8ff[_0x36c0ff])&&(_0x5a258e=_0x271d61(_0x5a258e)||_0x5a258e);return _0x5a258e;},y=(_0x111bf0,_0x5e8688)=>(_0x4031be,_0x3a6440)=>_0x5e8688(_0x4031be,_0x3a6440,_0x111bf0);let C=class extends c[_0x37702a(0xe2)]{constructor(_0x2adf42,_0x209c73){const _0x1ec668=_0x37702a;super(),this['_threadCommentDataSourceService']=_0x2adf42,this[_0x1ec668(0xfc)]=_0x209c73,this['_initDataSource']();}['_initDataSource'](){const _0x3c258b=_0x37702a;this[_0x3c258b(0xc9)]['dataSource']=this[_0x3c258b(0xfc)],this['_threadCommentDataSourceService'][_0x3c258b(0xe0)]=!0x1;}};C=J([y(0x0,M[_0x37702a(0xd4)]),y(0x1,c[_0x37702a(0x10d)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x565b51,_0x17b960,_0x30b842)=>_0x17b960 in _0x565b51?F(_0x565b51,_0x17b960,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30b842}):_0x565b51[_0x17b960]=_0x30b842,W=(_0x686a4c,_0x56d923,_0x58db55,_0x177367)=>{const _0x58a411=_0x37702a;for(var _0x7c5207=_0x177367>0x1?void 0x0:_0x177367?L(_0x56d923,_0x58db55):_0x56d923,_0x262d5a=_0x686a4c[_0x58a411(0xe5)]-0x1,_0x41f9b2;_0x262d5a>=0x0;_0x262d5a--)(_0x41f9b2=_0x686a4c[_0x262d5a])&&(_0x7c5207=_0x41f9b2(_0x7c5207)||_0x7c5207);return _0x7c5207;},O=(_0x3d4c43,_0x3beb3d)=>(_0x571329,_0x14f3c9)=>_0x3beb3d(_0x571329,_0x14f3c9,_0x3d4c43),N=(_0x43abbf,_0xd78623,_0x3140a8)=>Z(_0x43abbf,typeof _0xd78623!=_0x37702a(0xd0)?_0xd78623+'':_0xd78623,_0x3140a8);exports[_0x37702a(0xd3)]=class extends c[_0x37702a(0xc3)]{constructor(_0x2a704e=D,_0x47916a,_0x35b356){const _0x559cec=_0x37702a;super(),this[_0x559cec(0x121)]=_0x2a704e,this['_injector']=_0x47916a,this[_0x559cec(0x129)]=_0x35b356;const {..._0x2fc598}=c[_0x559cec(0xdf)]({},D,this[_0x559cec(0x121)]);this[_0x559cec(0x129)]['setConfig'](q,_0x2fc598);}[_0x37702a(0x111)](){const _0x2c8fac=_0x37702a;[[g],[C],[p]][_0x2c8fac(0xeb)](_0x54702e=>{const _0x393ac2=_0x2c8fac;this[_0x393ac2(0x120)][_0x393ac2(0x133)](_0x54702e);});}['onReady'](){const _0x169579=_0x37702a;this[_0x169579(0x120)]['get'](C),this[_0x169579(0x120)][_0x169579(0x11e)](p);}},N(exports[_0x37702a(0xd3)],_0x37702a(0xfd),U),N(exports[_0x37702a(0xd3)],_0x37702a(0x10c),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x37702a(0xd3)]=W([c[_0x37702a(0xcd)](j[_0x37702a(0x126)],b[_0x37702a(0x138)],T['UniverLicensePlugin']),O(0x1,c[_0x37702a(0x10d)](c['Injector'])),O(0x2,c[_0x37702a(0xe7)])],exports[_0x37702a(0xd3)]);
|
|
1
|
+
'use strict';const _0x4949ed=_0x1bb9;(function(_0x1ae3c9,_0x5d2845){const _0x34d747=_0x1bb9,_0x13d18d=_0x1ae3c9();while(!![]){try{const _0x209727=-parseInt(_0x34d747(0xfd))/0x1*(-parseInt(_0x34d747(0xbb))/0x2)+-parseInt(_0x34d747(0x10e))/0x3*(-parseInt(_0x34d747(0x111))/0x4)+-parseInt(_0x34d747(0x108))/0x5*(parseInt(_0x34d747(0x11e))/0x6)+parseInt(_0x34d747(0xbf))/0x7+-parseInt(_0x34d747(0x123))/0x8*(parseInt(_0x34d747(0xf8))/0x9)+-parseInt(_0x34d747(0xcb))/0xa+parseInt(_0x34d747(0xfa))/0xb;if(_0x209727===_0x5d2845)break;else _0x13d18d['push'](_0x13d18d['shift']());}catch(_0x344d0b){_0x13d18d['push'](_0x13d18d['shift']());}}}(_0x4866,0x46cb6));function _0x1bb9(_0x921c7c,_0x497816){const _0x4866e1=_0x4866();return _0x1bb9=function(_0x1bb984,_0x135729){_0x1bb984=_0x1bb984-0xb6;let _0x541ef0=_0x4866e1[_0x1bb984];return _0x541ef0;},_0x1bb9(_0x921c7c,_0x497816);}Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x4949ed(0xcc)),j=require(_0x4949ed(0xd6)),M=require(_0x4949ed(0x10b)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4949ed(0xd5);var I=(_0x4eb64f=>(_0x4eb64f[_0x4eb64f[_0x4949ed(0xce)]=0x0]=_0x4949ed(0xce),_0x4eb64f[_0x4eb64f[_0x4949ed(0x129)]=0x1]=_0x4949ed(0x129),_0x4eb64f[_0x4eb64f[_0x4949ed(0xe2)]=-0x1]=_0x4949ed(0xe2),_0x4eb64f))(I||{}),v=(_0x1fa885=>(_0x1fa885[_0x1fa885[_0x4949ed(0xc7)]=0x0]='Unknown',_0x1fa885[_0x1fa885[_0x4949ed(0xb8)]=0x1]=_0x4949ed(0xb8),_0x1fa885[_0x1fa885[_0x4949ed(0x10d)]=0x2]=_0x4949ed(0x10d),_0x1fa885[_0x1fa885[_0x4949ed(0xd1)]=0x3]=_0x4949ed(0xd1),_0x1fa885[_0x1fa885['Delete']=0x4]=_0x4949ed(0x107),_0x1fa885[_0x1fa885[_0x4949ed(0x114)]=0x5]=_0x4949ed(0x114),_0x1fa885[_0x1fa885[_0x4949ed(0xe2)]=-0x1]='UNRECOGNIZED',_0x1fa885))(v||{});const f=_0xd725e4=>c[_0x4949ed(0xf2)](new Date(+_0xd725e4))[_0x4949ed(0x115)](_0x4949ed(0x10a)),R=async(_0x5b48d5,_0x190282)=>{const _0x2eafd6=_0x4949ed,_0x19c858=_0x5b48d5[_0x2eafd6(0xf6)](c['UserManagerService']),_0xc77bc6=_0x5b48d5['get'](P[_0x2eafd6(0x11f)]);_0x190282[_0x2eafd6(0xd9)](_0x151641=>{const _0x44dad7=_0x2eafd6;_0x19c858[_0x44dad7(0xfc)](_0x151641)&&_0x190282[_0x44dad7(0xc3)](_0x151641);}),_0x190282[_0x2eafd6(0xc2)]&&(await _0xc77bc6[_0x2eafd6(0xf6)]('/universer-api/user/list',{'params':{'userIDs':[..._0x190282]}}))[_0x2eafd6(0xbc)][_0x2eafd6(0xd2)][_0x2eafd6(0xd9)](_0x8551ee=>{const _0x52a4ab=_0x2eafd6;_0x8551ee&&_0x19c858[_0x52a4ab(0xb7)](_0x8551ee);});};function _0x4866(){const _0x33e779=['setConfig','UserManagerService','UNIVER_UNKNOWN','updateComment','stringify','disposeWithMe','/list','_userService','content','_threadCommentDataSourceService','Disposable','dayjs','requireSession','createTimestamp','_threadCommentModel','get','thread-comment-data-source.config','9pjkFTX','userID','2396031xzQRab','parentId','getUser','9dRyWfX','error','rangeId','_configService','IConfigService','threadId','Injector','ref','resolveComment','getOwnPropertyDescriptor','Delete','25jVVUoG','/delete','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','user','Reply','498vpodhs','/add','UniverThreadCommentDataSourcePlugin','11364ldgwmQ','CustomRangeType','rangeType','Solve','format','syncUpdateMutationToColla','unitId','UniverLicensePlugin','_commentService','_initUserSync','reply','deleteComment','resolved','677202iTlCHk','HTTPService','post','addComment','type','1835416QzDQdb','userId','onStarting','merge','personId','filter','Solved','payload','DependentOn','values','addUser','Add','COMMENT','getUnit','6522ysJFeS','body','getMemberID','ThreadCommentModel','3698632BRLmcq','Inject','code','size','delete','_httpService','/universer-api/comment/unit/','_initDataSource','Unknown','_sessionService','UniverInstanceType','add','1634160JTYNzK','@univerjs/core','map','OpenOrReOpen','IThreadCommentDataSourceService','replies','Edit','users','solved','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/thread-comment-ui','comment','UniverThreadCommentUIPlugin','forEach','_threadCommentDataSource','subscribe','dataSource','_init','_config','pluginName','commentUpdate$','UniverCollaborationClientPlugin','UNRECOGNIZED','replyId','parse','find','_injector'];_0x4866=function(){return _0x33e779;};return _0x4866();}var $=Object[_0x4949ed(0x106)],E=(_0x158720,_0x5c91f8,_0x13592a,_0x5c2d74)=>{const _0x435331=_0x4949ed;for(var _0x3568b1=_0x5c2d74>0x1?void 0x0:_0x5c2d74?$(_0x5c91f8,_0x13592a):_0x5c91f8,_0x893977=_0x158720[_0x435331(0xd4)]-0x1,_0x3dc064;_0x893977>=0x0;_0x893977--)(_0x3dc064=_0x158720[_0x893977])&&(_0x3568b1=_0x3dc064(_0x3568b1)||_0x3568b1);return _0x3568b1;},S=(_0x15bd44,_0xf24e9f)=>(_0x2667fb,_0x8eb754)=>_0xf24e9f(_0x2667fb,_0x8eb754,_0x15bd44);let p=class extends c[_0x4949ed(0xf1)]{constructor(_0x37857b,_0x15f3cd,_0x222f8b,_0x11d609){const _0x1b0744=_0x4949ed;super(),this['_commentService']=_0x37857b,this[_0x1b0744(0xf5)]=_0x15f3cd,this[_0x1b0744(0xee)]=_0x222f8b,this['_injector']=_0x11d609,this[_0x1b0744(0xdd)](),this[_0x1b0744(0x11a)]();}[_0x4949ed(0x11a)](){const _0x30be08=_0x4949ed;this['disposeWithMe'](this['_threadCommentModel'][_0x30be08(0xe0)]['pipe'](w['bufferTime'](0x10))[_0x30be08(0xdb)](_0x4aa356=>{const _0x9a9b61=_0x30be08,_0x13dd0a=new Set();_0x4aa356['forEach'](_0x3f161c=>{const _0xefef80=_0x1bb9;switch(_0x3f161c['type']){case'add':{const _0x320d6e=_0x3f161c[_0xefef80(0x12a)][_0xefef80(0x127)];_0x13dd0a[_0xefef80(0xca)](_0x320d6e);break;}}}),R(this[_0x9a9b61(0xe6)],_0x13dd0a);}));}[_0x4949ed(0xdd)](){const _0x145d4f=_0x4949ed;this[_0x145d4f(0xec)](this[_0x145d4f(0x119)]['commentUpdate$']['subscribe'](async _0x11cdda=>{const _0x4a05d1=_0x145d4f;var _0x7132d5,_0x37dc7d,_0x23961e,_0x48aa1c;const _0x2d2d71=(_0x7132d5=this[_0x4a05d1(0xf5)][_0x4a05d1(0xba)](_0x11cdda[_0x4a05d1(0x117)])[_0x4a05d1(0xe5)](_0x223d61=>_0x223d61[_0x4a05d1(0x102)]===_0x11cdda[_0x4a05d1(0x102)]))==null?void 0x0:_0x7132d5['root'];if(!_0x2d2d71)return;const {unitId:_0x546b9b,subUnitId:_0x17f8b7}=_0x2d2d71;switch(_0x11cdda[_0x4a05d1(0x10c)]&&this[_0x4a05d1(0xee)]['addUser'](_0x11cdda['user']),_0x11cdda[_0x4a05d1(0x122)]){case v[_0x4a05d1(0xb8)]:break;case v[_0x4a05d1(0x10d)]:{this['_threadCommentModel'][_0x4a05d1(0x121)](_0x546b9b,_0x17f8b7,{'unitId':_0x546b9b,'subUnitId':_0x17f8b7,'ref':'','id':_0x11cdda[_0x4a05d1(0xe3)],'dT':f(+_0x11cdda['createTimestamp']),'threadId':_0x11cdda[_0x4a05d1(0x102)],'personId':(_0x23961e=(_0x37dc7d=_0x11cdda[_0x4a05d1(0x10c)])==null?void 0x0:_0x37dc7d[_0x4a05d1(0xf9)])!=null?_0x23961e:_0x11cdda[_0x4a05d1(0x124)],'text':JSON[_0x4a05d1(0xe4)](_0x11cdda['content']),'parentId':_0x2d2d71['id']});break;}case v[_0x4a05d1(0x107)]:{const _0x1110fe=this[_0x4a05d1(0xf5)]['getComment'](_0x546b9b,_0x17f8b7,_0x11cdda[_0x4a05d1(0xe3)]);_0x1110fe&&_0x1110fe[_0x4a05d1(0xfb)]&&this['_threadCommentModel'][_0x4a05d1(0x11c)](_0x546b9b,_0x17f8b7,_0x11cdda['replyId']);break;}case v['Edit']:{this[_0x4a05d1(0xf5)]['updateComment'](_0x546b9b,_0x17f8b7,{'commentId':_0x11cdda[_0x4a05d1(0xe3)],'text':JSON[_0x4a05d1(0xe4)](_0x11cdda[_0x4a05d1(0xef)])});break;}case v[_0x4a05d1(0x114)]:{const _0x2d04a4=(_0x48aa1c=this['_threadCommentModel']['getUnit'](_0x11cdda['unitId'])[_0x4a05d1(0xe5)](_0xb1cb00=>_0xb1cb00['threadId']===_0x11cdda[_0x4a05d1(0x102)]))==null?void 0x0:_0x48aa1c['root'];_0x2d04a4&&this[_0x4a05d1(0xf5)][_0x4a05d1(0x105)](_0x546b9b,_0x17f8b7,_0x2d04a4['id'],_0x11cdda[_0x4a05d1(0xd3)]===I[_0x4a05d1(0x129)]);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x4949ed(0xc0)](M[_0x4949ed(0xbe)])),S(0x2,c[_0x4949ed(0xc0)](c[_0x4949ed(0xe8)])),S(0x3,c[_0x4949ed(0xc0)](c[_0x4949ed(0x103)]))],p);const q=_0x4949ed(0xf7),D={};var A=Object[_0x4949ed(0x106)],x=(_0x5ee785,_0x3740d3,_0x1a1c49,_0x596a65)=>{const _0x3401b4=_0x4949ed;for(var _0x5572bb=_0x596a65>0x1?void 0x0:_0x596a65?A(_0x3740d3,_0x1a1c49):_0x3740d3,_0xcd7501=_0x5ee785[_0x3401b4(0xd4)]-0x1,_0x2fb573;_0xcd7501>=0x0;_0xcd7501--)(_0x2fb573=_0x5ee785[_0xcd7501])&&(_0x5572bb=_0x2fb573(_0x5572bb)||_0x5572bb);return _0x5572bb;},_=(_0x21d415,_0x12ef09)=>(_0x168c14,_0x41e6dc)=>_0x12ef09(_0x168c14,_0x41e6dc,_0x21d415);function Y(_0x4ca8c7,_0x300813){const _0x261781=_0x4949ed,_0x49c50d=_0x4ca8c7['replies'][0x0];return{..._0x300813,'id':_0x49c50d[_0x261781(0xe3)],'resolved':_0x4ca8c7[_0x261781(0xd3)]===0x1,'dT':f(_0x49c50d[_0x261781(0xf4)]),'personId':_0x49c50d['userId'],'threadId':_0x49c50d[_0x261781(0x102)]};}function G(_0x32f119,_0x4cc224,_0x89edce){const _0x53461a=_0x4949ed;var _0x15a28a,_0xbca8d9;if(((_0xbca8d9=(_0x15a28a=_0x32f119==null?void 0x0:_0x32f119[_0x53461a(0xd0)])==null?void 0x0:_0x15a28a[_0x53461a(0xd4)])!=null?_0xbca8d9:0x0)>0x0){const _0x3b687a=(_0x5e3517,_0x5f4cdc)=>({'id':_0x5e3517[_0x53461a(0xe3)],'threadId':_0x5e3517[_0x53461a(0x102)],'dT':f(_0x5e3517[_0x53461a(0xf4)]),'personId':_0x5e3517[_0x53461a(0x124)],'resolved':_0x32f119['solved']===I[_0x53461a(0x129)],'unitId':_0x4cc224,'subUnitId':_0x89edce,'text':JSON['parse'](_0x5e3517[_0x53461a(0xef)]),'parentId':_0x5f4cdc}),_0x4c7fe3=_0x3b687a(_0x32f119[_0x53461a(0xd0)][0x0]);return{..._0x4c7fe3,'children':_0x32f119['replies']['slice'](0x1)[_0x53461a(0xcd)](_0x1bb036=>_0x3b687a(_0x1bb036,_0x4c7fe3['id']))};}return null;}let g=class{constructor(_0x593841,_0x168b5d,_0xb6462e,_0x13feaa){const _0x57c9d7=_0x4949ed;this[_0x57c9d7(0xc4)]=_0x593841,this[_0x57c9d7(0xee)]=_0x168b5d,this[_0x57c9d7(0xc8)]=_0xb6462e,this[_0x57c9d7(0xe6)]=_0x13feaa;}async['addComment'](_0x511b24){const _0x2829e5=_0x4949ed;var _0x1d8249,_0x559b1b;const {parentId:_0x3a1a94,unitId:_0x7c43a0,text:_0x34ff37,threadId:_0x5d31c7}=_0x511b24,_0x5473bb=(_0x559b1b=(_0x1d8249=_0x34ff37['customRanges'])==null?void 0x0:_0x1d8249[_0x2829e5(0x128)](_0x5cf403=>_0x5cf403[_0x2829e5(0x113)]===c[_0x2829e5(0x112)][_0x2829e5(0xb9)])[_0x2829e5(0xcd)](_0x300ffd=>_0x300ffd[_0x2829e5(0xff)]))!=null?_0x559b1b:[],_0x29b803=JSON[_0x2829e5(0xeb)](_0x34ff37),_0x5bd601=(await this[_0x2829e5(0xc8)][_0x2829e5(0xf3)](_0x7c43a0))[_0x2829e5(0xbd)]();if(_0x3a1a94){const _0x4dbdad={'memberId':_0x5bd601,'unitId':_0x7c43a0,'content':_0x29b803,'mention':_0x5473bb,'threadId':_0x5d31c7},_0x7be29=(await this['_httpService'][_0x2829e5(0x120)](_0x2829e5(0xc5)+_0x7c43a0+'/reply',{'body':_0x4dbdad}))[_0x2829e5(0xbc)][_0x2829e5(0x11b)];return{..._0x511b24,'id':_0x7be29['replyId'],'dT':c[_0x2829e5(0xf2)](+_0x7be29[_0x2829e5(0xf4)])['format'](_0x2829e5(0x10a)),'personId':_0x7be29[_0x2829e5(0x124)]};}else{const _0x385f6b={'memberId':_0x5bd601,'unitId':_0x7c43a0,'content':_0x29b803,'mention':_0x5473bb},_0x4945ea=await this[_0x2829e5(0xc4)][_0x2829e5(0x120)](_0x2829e5(0xc5)+_0x7c43a0+_0x2829e5(0x10f),{'body':_0x385f6b});return Y(_0x4945ea['body'][_0x2829e5(0xd7)],_0x511b24);}}async[_0x4949ed(0xea)](_0x1d9d81){const _0x3bc1d0=_0x4949ed;var _0x4b5687,_0x76f28e;const {text:_0x985332,unitId:_0x50d433}=_0x1d9d81,_0x53bc1a=(_0x76f28e=(_0x4b5687=_0x985332['customRanges'])==null?void 0x0:_0x4b5687[_0x3bc1d0(0x128)](_0x38488e=>_0x38488e[_0x3bc1d0(0x113)]===c[_0x3bc1d0(0x112)]['COMMENT'])[_0x3bc1d0(0xcd)](_0x54f32b=>_0x54f32b[_0x3bc1d0(0xff)]))!=null?_0x76f28e:[],_0x5364d7=JSON[_0x3bc1d0(0xeb)](_0x985332),_0x5a2918=_0x1d9d81[_0x3bc1d0(0x102)],_0x356f16=_0x1d9d81['id'],_0x46e126={'memberId':(await this[_0x3bc1d0(0xc8)][_0x3bc1d0(0xf3)](_0x50d433))['getMemberID'](),'unitId':_0x50d433,'threadId':_0x5a2918,'mention':_0x53bc1a,'content':_0x5364d7,'replyId':_0x356f16},_0x31dc0b=await this[_0x3bc1d0(0xc4)]['post']('/universer-api/comment/unit/'+_0x50d433+'/edit',{'body':_0x46e126});return!_0x31dc0b['body'][_0x3bc1d0(0xfe)]||_0x31dc0b['body'][_0x3bc1d0(0xfe)][_0x3bc1d0(0xc1)]===0x1;}async['resolveComment'](_0x595a79){const _0x5f41d3=_0x4949ed,{unitId:_0x2007fd}=_0x595a79,_0x16c754=_0x595a79['threadId'],_0x2499b9={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2007fd,'threadId':_0x16c754,'solved':_0x595a79[_0x5f41d3(0x11d)]?I[_0x5f41d3(0x129)]:I['OpenOrReOpen']},_0x1c9adb=await this['_httpService'][_0x5f41d3(0x120)](_0x5f41d3(0xc5)+_0x2007fd+'/solved',{'body':_0x2499b9});return!_0x1c9adb[_0x5f41d3(0xbc)]['error']||_0x1c9adb['body']['error']['code']===0x1;}async['deleteComment'](_0x283a3e,_0x25ae49,_0x205430,_0x2b8173){const _0x1a95c4=_0x4949ed,_0xba3021={'memberId':(await this[_0x1a95c4(0xc8)][_0x1a95c4(0xf3)](_0x283a3e))[_0x1a95c4(0xbd)](),'threadId':_0x205430,'replyId':_0x2b8173,'unitId':_0x283a3e},_0x308632=await this[_0x1a95c4(0xc4)][_0x1a95c4(0x120)](_0x1a95c4(0xc5)+_0x283a3e+_0x1a95c4(0x109),{'body':_0xba3021});return!_0x308632[_0x1a95c4(0xbc)][_0x1a95c4(0xfe)]||_0x308632[_0x1a95c4(0xbc)][_0x1a95c4(0xfe)][_0x1a95c4(0xc1)]===0x1;}async['listComments'](_0x2954c3,_0x14b85b,_0x17a5b8){const _0x8b405d=_0x4949ed,_0x97d207={'unitId':_0x2954c3,'threadId':_0x17a5b8},_0x45d55d=await this[_0x8b405d(0xc4)][_0x8b405d(0x120)](_0x8b405d(0xc5)+_0x2954c3+_0x8b405d(0xed),{'body':_0x97d207}),_0x50a75b=_0x17a5b8['map'](_0x28d873=>G(_0x45d55d[_0x8b405d(0xbc)]['comments'][_0x28d873],_0x2954c3,_0x14b85b))[_0x8b405d(0x128)](Boolean);return Object[_0x8b405d(0xb6)](_0x45d55d[_0x8b405d(0xbc)]['users'])[_0x8b405d(0xd9)](_0x389b4e=>{const _0x1229cf=_0x8b405d;this['_userService'][_0x1229cf(0xb7)](_0x389b4e);}),_0x50a75b;}['saveCommentToSnapshot'](_0x35921f){const _0x548fd1=_0x4949ed;return{'id':_0x35921f['id'],'threadId':_0x35921f[_0x548fd1(0x102)],'ref':_0x35921f[_0x548fd1(0x104)]};}};g=x([_(0x0,c[_0x4949ed(0xc0)](P[_0x4949ed(0x11f)])),_(0x1,c[_0x4949ed(0xc0)](c[_0x4949ed(0xe8)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x4949ed(0x103)]))],g);var H=Object[_0x4949ed(0x106)],J=(_0x50c2af,_0xee9f8e,_0x11284f,_0x4e6170)=>{for(var _0x175b28=_0x4e6170>0x1?void 0x0:_0x4e6170?H(_0xee9f8e,_0x11284f):_0xee9f8e,_0x49be50=_0x50c2af['length']-0x1,_0x1f061e;_0x49be50>=0x0;_0x49be50--)(_0x1f061e=_0x50c2af[_0x49be50])&&(_0x175b28=_0x1f061e(_0x175b28)||_0x175b28);return _0x175b28;},y=(_0x539fe0,_0x184fff)=>(_0x4d0119,_0xf8e165)=>_0x184fff(_0x4d0119,_0xf8e165,_0x539fe0);let C=class extends c[_0x4949ed(0xf1)]{constructor(_0x30eb37,_0x46d864){const _0x13c241=_0x4949ed;super(),this[_0x13c241(0xf0)]=_0x30eb37,this[_0x13c241(0xda)]=_0x46d864,this[_0x13c241(0xc6)]();}[_0x4949ed(0xc6)](){const _0x50eca5=_0x4949ed;this[_0x50eca5(0xf0)][_0x50eca5(0xdc)]=this['_threadCommentDataSource'],this[_0x50eca5(0xf0)][_0x50eca5(0x116)]=!0x1;}};C=J([y(0x0,M[_0x4949ed(0xcf)]),y(0x1,c[_0x4949ed(0xc0)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x1c2a1b,_0x3b7beb,_0x24f58e)=>_0x3b7beb in _0x1c2a1b?F(_0x1c2a1b,_0x3b7beb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24f58e}):_0x1c2a1b[_0x3b7beb]=_0x24f58e,W=(_0x57122c,_0x320888,_0x41f582,_0x55018e)=>{const _0x21bb12=_0x4949ed;for(var _0x2fe681=_0x55018e>0x1?void 0x0:_0x55018e?L(_0x320888,_0x41f582):_0x320888,_0x2650d8=_0x57122c[_0x21bb12(0xd4)]-0x1,_0x420898;_0x2650d8>=0x0;_0x2650d8--)(_0x420898=_0x57122c[_0x2650d8])&&(_0x2fe681=_0x420898(_0x2fe681)||_0x2fe681);return _0x2fe681;},O=(_0x22583b,_0x1ab173)=>(_0xcd8dda,_0x5af4e1)=>_0x1ab173(_0xcd8dda,_0x5af4e1,_0x22583b),N=(_0x55f34a,_0x328c32,_0x16c766)=>Z(_0x55f34a,typeof _0x328c32!='symbol'?_0x328c32+'':_0x328c32,_0x16c766);exports[_0x4949ed(0x110)]=class extends c['Plugin']{constructor(_0x226e9f=D,_0x4446ab,_0x4ee07b){const _0x282518=_0x4949ed;super(),this[_0x282518(0xde)]=_0x226e9f,this[_0x282518(0xe6)]=_0x4446ab,this[_0x282518(0x100)]=_0x4ee07b;const {..._0xde9ca8}=c[_0x282518(0x126)]({},D,this['_config']);this[_0x282518(0x100)][_0x282518(0xe7)](q,_0xde9ca8);}[_0x4949ed(0x125)](){const _0x33cd65=_0x4949ed;[[g],[C],[p]][_0x33cd65(0xd9)](_0x5991d4=>{const _0x4e1f26=_0x33cd65;this['_injector'][_0x4e1f26(0xca)](_0x5991d4);});}['onReady'](){const _0x32cd8c=_0x4949ed;this[_0x32cd8c(0xe6)][_0x32cd8c(0xf6)](C),this[_0x32cd8c(0xe6)][_0x32cd8c(0xf6)](p);}},N(exports[_0x4949ed(0x110)],_0x4949ed(0xdf),U),N(exports[_0x4949ed(0x110)],_0x4949ed(0x122),c[_0x4949ed(0xc9)][_0x4949ed(0xe9)]),exports[_0x4949ed(0x110)]=W([c[_0x4949ed(0x12b)](j[_0x4949ed(0xd8)],b[_0x4949ed(0xe1)],T[_0x4949ed(0x118)]),O(0x1,c[_0x4949ed(0xc0)](c[_0x4949ed(0x103)])),O(0x2,c[_0x4949ed(0x101)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4f0f(_0xa30d,_0x2c98c8){const _0x85decc=_0x85de();return _0x4f0f=function(_0x4f0fdb,_0x36032b){_0x4f0fdb=_0x4f0fdb-0xcc;let _0x10021b=_0x85decc[_0x4f0fdb];return _0x10021b;},_0x4f0f(_0xa30d,_0x2c98c8);}const _0x79c709=_0x4f0f;(function(_0x192fba,_0x3043a4){const _0x4557e9=_0x4f0f,_0x33dac2=_0x192fba();while(!![]){try{const _0x25264a=parseInt(_0x4557e9(0x10b))/0x1*(parseInt(_0x4557e9(0x109))/0x2)+-parseInt(_0x4557e9(0x118))/0x3*(parseInt(_0x4557e9(0xda))/0x4)+parseInt(_0x4557e9(0x10c))/0x5*(-parseInt(_0x4557e9(0x112))/0x6)+-parseInt(_0x4557e9(0xf3))/0x7+-parseInt(_0x4557e9(0x101))/0x8*(-parseInt(_0x4557e9(0xdb))/0x9)+parseInt(_0x4557e9(0xdf))/0xa+-parseInt(_0x4557e9(0xeb))/0xb;if(_0x25264a===_0x3043a4)break;else _0x33dac2['push'](_0x33dac2['shift']());}catch(_0x5b8c60){_0x33dac2['push'](_0x33dac2['shift']());}}}(_0x85de,0x3a7cc));import{CommentService as _0x1f19d6,CollaborationSessionService as _0x26a704,UniverCollaborationClientPlugin as _0x516c07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x325da3}from'@univerjs-pro/license';import{dayjs as _0x22132e,UserManagerService as _0x21757a,Inject as _0x55a458,Injector as _0x6b939,Disposable as _0x636f8c,CustomRangeType as _0x16308c,UniverInstanceType as _0x22d56f,DependentOn as _0x35d16d,IConfigService as _0x32f453,Plugin as _0x5e5613,merge as _0x1d7b32}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x88d24a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x58222f,IThreadCommentDataSourceService as _0x467247}from'@univerjs/thread-comment';import{bufferTime as _0x2364d4}from'rxjs';import{HTTPService as _0x333036}from'@univerjs/network';const W=_0x79c709(0xe8);var I=(_0x18acb9=>(_0x18acb9[_0x18acb9[_0x79c709(0x111)]=0x0]=_0x79c709(0x111),_0x18acb9[_0x18acb9['Solved']=0x1]=_0x79c709(0x107),_0x18acb9[_0x18acb9[_0x79c709(0x113)]=-0x1]=_0x79c709(0x113),_0x18acb9))(I||{}),v=(_0x43313a=>(_0x43313a[_0x43313a['Unknown']=0x0]='Unknown',_0x43313a[_0x43313a['Add']=0x1]='Add',_0x43313a[_0x43313a['Reply']=0x2]=_0x79c709(0xf9),_0x43313a[_0x43313a[_0x79c709(0xd4)]=0x3]=_0x79c709(0xd4),_0x43313a[_0x43313a[_0x79c709(0x114)]=0x4]='Delete',_0x43313a[_0x43313a[_0x79c709(0xcd)]=0x5]=_0x79c709(0xcd),_0x43313a[_0x43313a[_0x79c709(0x113)]=-0x1]=_0x79c709(0x113),_0x43313a))(v||{});const D=_0x19bf97=>_0x22132e(new Date(+_0x19bf97))['format'](_0x79c709(0x11c)),B=async(_0x29fd74,_0xca375e)=>{const _0x2802f6=_0x79c709,_0x32ae76=_0x29fd74[_0x2802f6(0xf5)](_0x21757a),_0x2dadb2=_0x29fd74['get'](_0x333036);_0xca375e[_0x2802f6(0x124)](_0xe904aa=>{const _0x262e87=_0x2802f6;_0x32ae76[_0x262e87(0xfd)](_0xe904aa)&&_0xca375e[_0x262e87(0xf1)](_0xe904aa);}),_0xca375e['size']&&(await _0x2dadb2[_0x2802f6(0xf5)](_0x2802f6(0xe2),{'params':{'userIDs':[..._0xca375e]}}))[_0x2802f6(0xe6)][_0x2802f6(0xcf)][_0x2802f6(0x124)](_0x1ea1d8=>{const _0x303a8b=_0x2802f6;_0x1ea1d8&&_0x32ae76[_0x303a8b(0xfe)](_0x1ea1d8);});};function _0x85de(){const _0x299192=['_init','_config','pluginName','symbol','onReady','delete','find','179956XHojwm','error','get','parse','createTimestamp','userId','Reply','filter','setConfig','content','getUser','addUser','/list','comment','1432pSGzZf','/edit','getMemberID','resolved','root','/reply','Solved','values','4pYPwLT','threadId','79363xahrrU','185QZkVoB','replyId','user','listComments','_threadCommentDataSource','OpenOrReOpen','36636UxjyMb','UNRECOGNIZED','Delete','map','/delete','_httpService','37689EYJIIq','getComment','/universer-api/comment/unit/','rangeType','YYYY/MM/DD\x20HH:mm','add','_commentService','replies','rangeId','getUnit','addComment','_threadCommentDataSourceService','forEach','requireSession','syncUpdateMutationToColla','post','pipe','_userService','COMMENT','solved','_threadCommentModel','getOwnPropertyDescriptor','_configService','code','_initDataSource','Solve','Add','users','userID','length','resolveComment','_injector','Edit','commentUpdate$','stringify','type','reply','_initUserSync','4dFdQGn','11862owfHcG','saveCommentToSnapshot','comments','customRanges','3159850JtxqBJ','updateComment','disposeWithMe','/universer-api/user/list','unitId','getCurrentUser','UNIVER_UNKNOWN','body','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','dataSource','2275636rxiSJz'];_0x85de=function(){return _0x299192;};return _0x85de();}var K=Object[_0x79c709(0x12d)],V=(_0x586e20,_0x20c312,_0x5a4e49,_0x2c2756)=>{const _0xaf5de9=_0x79c709;for(var _0x1cc3f2=_0x2c2756>0x1?void 0x0:_0x2c2756?K(_0x20c312,_0x5a4e49):_0x20c312,_0x195c40=_0x586e20[_0xaf5de9(0xd1)]-0x1,_0x3367b9;_0x195c40>=0x0;_0x195c40--)(_0x3367b9=_0x586e20[_0x195c40])&&(_0x1cc3f2=_0x3367b9(_0x1cc3f2)||_0x1cc3f2);return _0x1cc3f2;},p=(_0x109af2,_0x38bf0e)=>(_0x544f4e,_0x311400)=>_0x38bf0e(_0x544f4e,_0x311400,_0x109af2);let S=class extends _0x636f8c{constructor(_0x2f2b20,_0x55c1fb,_0x5d2571,_0x20766b){const _0x4bd3a7=_0x79c709;super(),this[_0x4bd3a7(0x11e)]=_0x2f2b20,this[_0x4bd3a7(0x12c)]=_0x55c1fb,this[_0x4bd3a7(0x129)]=_0x5d2571,this['_injector']=_0x20766b,this[_0x4bd3a7(0xec)](),this[_0x4bd3a7(0xd9)]();}[_0x79c709(0xd9)](){const _0x2df58b=_0x79c709;this[_0x2df58b(0xe1)](this[_0x2df58b(0x12c)][_0x2df58b(0xd5)][_0x2df58b(0x128)](_0x2364d4(0x10))[_0x2df58b(0xe7)](_0x2e1b56=>{const _0x4d0b67=_0x2df58b,_0x430f78=new Set();_0x2e1b56[_0x4d0b67(0x124)](_0x485e31=>{const _0x259aff=_0x4d0b67;switch(_0x485e31[_0x259aff(0xd7)]){case _0x259aff(0x11d):{const _0x34ad39=_0x485e31['payload']['personId'];_0x430f78[_0x259aff(0x11d)](_0x34ad39);break;}}}),B(this[_0x4d0b67(0xd3)],_0x430f78);}));}[_0x79c709(0xec)](){const _0x2294f7=_0x79c709;this[_0x2294f7(0xe1)](this[_0x2294f7(0x11e)][_0x2294f7(0xd5)][_0x2294f7(0xe7)](async _0x64d63a=>{const _0x4ab770=_0x2294f7;var _0x4884f0,_0x38b499,_0x1d4889,_0x4c77b9;const _0x31900a=(_0x4884f0=this[_0x4ab770(0x12c)][_0x4ab770(0x121)](_0x64d63a[_0x4ab770(0xe3)])[_0x4ab770(0xf2)](_0x3f0f67=>_0x3f0f67[_0x4ab770(0x10a)]===_0x64d63a[_0x4ab770(0x10a)]))==null?void 0x0:_0x4884f0[_0x4ab770(0x105)];if(!_0x31900a)return;const {unitId:_0x5ee3ae,subUnitId:_0x44327d}=_0x31900a;switch(_0x64d63a['user']&&this['_userService'][_0x4ab770(0xfe)](_0x64d63a[_0x4ab770(0x10e)]),_0x64d63a[_0x4ab770(0xd7)]){case v[_0x4ab770(0xce)]:break;case v[_0x4ab770(0xf9)]:{this[_0x4ab770(0x12c)][_0x4ab770(0x122)](_0x5ee3ae,_0x44327d,{'unitId':_0x5ee3ae,'subUnitId':_0x44327d,'ref':'','id':_0x64d63a[_0x4ab770(0x10d)],'dT':D(+_0x64d63a[_0x4ab770(0xf7)]),'threadId':_0x64d63a[_0x4ab770(0x10a)],'personId':(_0x1d4889=(_0x38b499=_0x64d63a[_0x4ab770(0x10e)])==null?void 0x0:_0x38b499['userID'])!=null?_0x1d4889:_0x64d63a[_0x4ab770(0xf8)],'text':JSON[_0x4ab770(0xf6)](_0x64d63a[_0x4ab770(0xfc)]),'parentId':_0x31900a['id']});break;}case v[_0x4ab770(0x114)]:{const _0x58f67d=this[_0x4ab770(0x12c)][_0x4ab770(0x119)](_0x5ee3ae,_0x44327d,_0x64d63a[_0x4ab770(0x10d)]);_0x58f67d&&_0x58f67d['parentId']&&this['_threadCommentModel']['deleteComment'](_0x5ee3ae,_0x44327d,_0x64d63a[_0x4ab770(0x10d)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4ab770(0xe0)](_0x5ee3ae,_0x44327d,{'commentId':_0x64d63a[_0x4ab770(0x10d)],'text':JSON[_0x4ab770(0xf6)](_0x64d63a['content'])});break;}case v['Solve']:{const _0x24295f=(_0x4c77b9=this[_0x4ab770(0x12c)]['getUnit'](_0x64d63a[_0x4ab770(0xe3)])['find'](_0x2caa70=>_0x2caa70[_0x4ab770(0x10a)]===_0x64d63a['threadId']))==null?void 0x0:_0x4c77b9[_0x4ab770(0x105)];_0x24295f&&this['_threadCommentModel'][_0x4ab770(0xd2)](_0x5ee3ae,_0x44327d,_0x24295f['id'],_0x64d63a[_0x4ab770(0x12b)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x55a458(_0x1f19d6)),p(0x1,_0x55a458(_0x58222f)),p(0x2,_0x55a458(_0x21757a)),p(0x3,_0x55a458(_0x6b939))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x79c709(0x12d)],Q=(_0x43920b,_0x5d8c3d,_0x4ba3c5,_0x37fe6a)=>{const _0x47a52e=_0x79c709;for(var _0x2de93e=_0x37fe6a>0x1?void 0x0:_0x37fe6a?k(_0x5d8c3d,_0x4ba3c5):_0x5d8c3d,_0x1fdfae=_0x43920b[_0x47a52e(0xd1)]-0x1,_0x1ca2f1;_0x1fdfae>=0x0;_0x1fdfae--)(_0x1ca2f1=_0x43920b[_0x1fdfae])&&(_0x2de93e=_0x1ca2f1(_0x2de93e)||_0x2de93e);return _0x2de93e;},_=(_0xa600f3,_0x328283)=>(_0x444cfd,_0x2d409)=>_0x328283(_0x444cfd,_0x2d409,_0xa600f3);function X(_0x5a7043,_0x2ce2f5){const _0x1321bc=_0x79c709,_0x1d5b1b=_0x5a7043[_0x1321bc(0x11f)][0x0];return{..._0x2ce2f5,'id':_0x1d5b1b[_0x1321bc(0x10d)],'resolved':_0x5a7043[_0x1321bc(0x12b)]===0x1,'dT':D(_0x1d5b1b[_0x1321bc(0xf7)]),'personId':_0x1d5b1b[_0x1321bc(0xf8)],'threadId':_0x1d5b1b['threadId']};}function ee(_0x27a304,_0x571549,_0x10a21d){const _0x5072b1=_0x79c709;var _0x19bf20,_0x139a25;if(((_0x139a25=(_0x19bf20=_0x27a304==null?void 0x0:_0x27a304[_0x5072b1(0x11f)])==null?void 0x0:_0x19bf20[_0x5072b1(0xd1)])!=null?_0x139a25:0x0)>0x0){const _0x30b529=(_0x10bb5e,_0x52ee06)=>({'id':_0x10bb5e[_0x5072b1(0x10d)],'threadId':_0x10bb5e[_0x5072b1(0x10a)],'dT':D(_0x10bb5e[_0x5072b1(0xf7)]),'personId':_0x10bb5e[_0x5072b1(0xf8)],'resolved':_0x27a304[_0x5072b1(0x12b)]===I[_0x5072b1(0x107)],'unitId':_0x571549,'subUnitId':_0x10a21d,'text':JSON[_0x5072b1(0xf6)](_0x10bb5e[_0x5072b1(0xfc)]),'parentId':_0x52ee06}),_0x6046ea=_0x30b529(_0x27a304['replies'][0x0]);return{..._0x6046ea,'children':_0x27a304[_0x5072b1(0x11f)]['slice'](0x1)[_0x5072b1(0x115)](_0x2dcc8f=>_0x30b529(_0x2dcc8f,_0x6046ea['id']))};}return null;}let f=class{constructor(_0x1f7d7c,_0x4cc603,_0xfcaefc,_0x13a008){const _0x37b6d1=_0x79c709;this[_0x37b6d1(0x117)]=_0x1f7d7c,this[_0x37b6d1(0x129)]=_0x4cc603,this[_0x37b6d1(0xe9)]=_0xfcaefc,this[_0x37b6d1(0xd3)]=_0x13a008;}async[_0x79c709(0x122)](_0x4d52b1){const _0x3f0466=_0x79c709;var _0x510b62,_0x2c8122;const {parentId:_0x510afa,unitId:_0x39a18e,text:_0x222549,threadId:_0x296d09}=_0x4d52b1,_0x2fd144=(_0x2c8122=(_0x510b62=_0x222549[_0x3f0466(0xde)])==null?void 0x0:_0x510b62[_0x3f0466(0xfa)](_0x1b7cec=>_0x1b7cec[_0x3f0466(0x11b)]===_0x16308c[_0x3f0466(0x12a)])[_0x3f0466(0x115)](_0x5ad0a9=>_0x5ad0a9[_0x3f0466(0x120)]))!=null?_0x2c8122:[],_0x28f383=JSON[_0x3f0466(0xd6)](_0x222549),_0x15cc83=(await this[_0x3f0466(0xe9)][_0x3f0466(0x125)](_0x39a18e))['getMemberID']();if(_0x510afa){const _0x1cf72c={'memberId':_0x15cc83,'unitId':_0x39a18e,'content':_0x28f383,'mention':_0x2fd144,'threadId':_0x296d09},_0x740b02=(await this['_httpService'][_0x3f0466(0x127)](_0x3f0466(0x11a)+_0x39a18e+_0x3f0466(0x106),{'body':_0x1cf72c}))[_0x3f0466(0xe6)][_0x3f0466(0xd8)];return{..._0x4d52b1,'id':_0x740b02[_0x3f0466(0x10d)],'dT':_0x22132e(+_0x740b02[_0x3f0466(0xf7)])['format'](_0x3f0466(0x11c)),'personId':_0x740b02[_0x3f0466(0xf8)]};}else{const _0x45c983={'memberId':_0x15cc83,'unitId':_0x39a18e,'content':_0x28f383,'mention':_0x2fd144},_0x8e030a=await this[_0x3f0466(0x117)]['post']('/universer-api/comment/unit/'+_0x39a18e+'/add',{'body':_0x45c983});return X(_0x8e030a[_0x3f0466(0xe6)][_0x3f0466(0x100)],_0x4d52b1);}}async[_0x79c709(0xe0)](_0x391fac){const _0x275789=_0x79c709;var _0x914c34,_0x400f43;const {text:_0x51bea4,unitId:_0x236259}=_0x391fac,_0x2a4539=(_0x400f43=(_0x914c34=_0x51bea4['customRanges'])==null?void 0x0:_0x914c34[_0x275789(0xfa)](_0xa81f7f=>_0xa81f7f[_0x275789(0x11b)]===_0x16308c[_0x275789(0x12a)])[_0x275789(0x115)](_0x412767=>_0x412767[_0x275789(0x120)]))!=null?_0x400f43:[],_0x2e423d=JSON[_0x275789(0xd6)](_0x51bea4),_0x3bd236=_0x391fac[_0x275789(0x10a)],_0x2e8fd9=_0x391fac['id'],_0x277d74={'memberId':(await this['_sessionService'][_0x275789(0x125)](_0x236259))['getMemberID'](),'unitId':_0x236259,'threadId':_0x3bd236,'mention':_0x2a4539,'content':_0x2e423d,'replyId':_0x2e8fd9},_0xac3259=await this[_0x275789(0x117)][_0x275789(0x127)](_0x275789(0x11a)+_0x236259+_0x275789(0x102),{'body':_0x277d74});return!_0xac3259['body'][_0x275789(0xf4)]||_0xac3259['body']['error'][_0x275789(0x12f)]===0x1;}async[_0x79c709(0xd2)](_0x50fad5){const _0x5bc47b=_0x79c709,{unitId:_0x1cf4c9}=_0x50fad5,_0x2a2f23=_0x50fad5[_0x5bc47b(0x10a)],_0x1b0149={'memberId':this[_0x5bc47b(0x129)][_0x5bc47b(0xe4)]()[_0x5bc47b(0xd0)],'unitId':_0x1cf4c9,'threadId':_0x2a2f23,'solved':_0x50fad5[_0x5bc47b(0x104)]?I['Solved']:I['OpenOrReOpen']},_0x4131b8=await this[_0x5bc47b(0x117)][_0x5bc47b(0x127)](_0x5bc47b(0x11a)+_0x1cf4c9+'/solved',{'body':_0x1b0149});return!_0x4131b8['body'][_0x5bc47b(0xf4)]||_0x4131b8[_0x5bc47b(0xe6)][_0x5bc47b(0xf4)][_0x5bc47b(0x12f)]===0x1;}async['deleteComment'](_0x4f5f34,_0x5f26ef,_0x2787e2,_0x1d5466){const _0x180514=_0x79c709,_0x33a83b={'memberId':(await this[_0x180514(0xe9)][_0x180514(0x125)](_0x4f5f34))[_0x180514(0x103)](),'threadId':_0x2787e2,'replyId':_0x1d5466,'unitId':_0x4f5f34},_0x2b2162=await this[_0x180514(0x117)][_0x180514(0x127)](_0x180514(0x11a)+_0x4f5f34+_0x180514(0x116),{'body':_0x33a83b});return!_0x2b2162['body'][_0x180514(0xf4)]||_0x2b2162[_0x180514(0xe6)][_0x180514(0xf4)]['code']===0x1;}async[_0x79c709(0x10f)](_0x51b3e8,_0x3dd85e,_0xcbfc4f){const _0x3883a5=_0x79c709,_0x5f102b={'unitId':_0x51b3e8,'threadId':_0xcbfc4f},_0x4f3f06=await this[_0x3883a5(0x117)][_0x3883a5(0x127)]('/universer-api/comment/unit/'+_0x51b3e8+_0x3883a5(0xff),{'body':_0x5f102b}),_0x3d4b8d=_0xcbfc4f[_0x3883a5(0x115)](_0x2630fb=>ee(_0x4f3f06[_0x3883a5(0xe6)][_0x3883a5(0xdd)][_0x2630fb],_0x51b3e8,_0x3dd85e))[_0x3883a5(0xfa)](Boolean);return Object[_0x3883a5(0x108)](_0x4f3f06[_0x3883a5(0xe6)]['users'])[_0x3883a5(0x124)](_0x347317=>{const _0x42fe60=_0x3883a5;this['_userService'][_0x42fe60(0xfe)](_0x347317);}),_0x3d4b8d;}[_0x79c709(0xdc)](_0x3e14ce){const _0x461aaf=_0x79c709;return{'id':_0x3e14ce['id'],'threadId':_0x3e14ce[_0x461aaf(0x10a)],'ref':_0x3e14ce['ref']};}};f=Q([_(0x0,_0x55a458(_0x333036)),_(0x1,_0x55a458(_0x21757a)),_(0x2,_0x55a458(_0x26a704)),_(0x3,_0x55a458(_0x6b939))],f);var re=Object[_0x79c709(0x12d)],te=(_0x352eef,_0x22163d,_0x282e9e,_0x570268)=>{const _0x21e07c=_0x79c709;for(var _0x257cb3=_0x570268>0x1?void 0x0:_0x570268?re(_0x22163d,_0x282e9e):_0x22163d,_0x19f4fc=_0x352eef[_0x21e07c(0xd1)]-0x1,_0x4c3b44;_0x19f4fc>=0x0;_0x19f4fc--)(_0x4c3b44=_0x352eef[_0x19f4fc])&&(_0x257cb3=_0x4c3b44(_0x257cb3)||_0x257cb3);return _0x257cb3;},N=(_0x4a4b3e,_0x8576e8)=>(_0x56f4b5,_0x388c60)=>_0x8576e8(_0x56f4b5,_0x388c60,_0x4a4b3e);let g=class extends _0x636f8c{constructor(_0x4a476e,_0x2886da){const _0x54a268=_0x79c709;super(),this['_threadCommentDataSourceService']=_0x4a476e,this[_0x54a268(0x110)]=_0x2886da,this[_0x54a268(0xcc)]();}['_initDataSource'](){const _0x41d503=_0x79c709;this['_threadCommentDataSourceService'][_0x41d503(0xea)]=this['_threadCommentDataSource'],this[_0x41d503(0x123)][_0x41d503(0x126)]=!0x1;}};g=te([N(0x0,_0x467247),N(0x1,_0x55a458(f))],g);var se=Object['defineProperty'],oe=Object[_0x79c709(0x12d)],ne=(_0xd59380,_0x14a5f1,_0x5ce2ab)=>_0x14a5f1 in _0xd59380?se(_0xd59380,_0x14a5f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ce2ab}):_0xd59380[_0x14a5f1]=_0x5ce2ab,ie=(_0xe6954d,_0x58a1cf,_0xf7ec4a,_0x490308)=>{const _0x4ef994=_0x79c709;for(var _0xff291c=_0x490308>0x1?void 0x0:_0x490308?oe(_0x58a1cf,_0xf7ec4a):_0x58a1cf,_0x3f9454=_0xe6954d[_0x4ef994(0xd1)]-0x1,_0x3a9535;_0x3f9454>=0x0;_0x3f9454--)(_0x3a9535=_0xe6954d[_0x3f9454])&&(_0xff291c=_0x3a9535(_0xff291c)||_0xff291c);return _0xff291c;},w=(_0x2da935,_0x25cccd)=>(_0x5c00ca,_0xd66b71)=>_0x25cccd(_0x5c00ca,_0xd66b71,_0x2da935),$=(_0x2cc14,_0x2669a4,_0x4f9d85)=>ne(_0x2cc14,typeof _0x2669a4!=_0x79c709(0xef)?_0x2669a4+'':_0x2669a4,_0x4f9d85);let b=class extends _0x5e5613{constructor(_0x305630=M,_0x360edc,_0x5df1f4){const _0x1fda19=_0x79c709;super(),this[_0x1fda19(0xed)]=_0x305630,this['_injector']=_0x360edc,this[_0x1fda19(0x12e)]=_0x5df1f4;const {..._0x4a33e5}=_0x1d7b32({},M,this[_0x1fda19(0xed)]);this[_0x1fda19(0x12e)][_0x1fda19(0xfb)](z,_0x4a33e5);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x4154fb=>{const _0x3393f6=_0x4f0f;this[_0x3393f6(0xd3)][_0x3393f6(0x11d)](_0x4154fb);});}[_0x79c709(0xf0)](){const _0xbb7514=_0x79c709;this[_0xbb7514(0xd3)][_0xbb7514(0xf5)](g),this[_0xbb7514(0xd3)][_0xbb7514(0xf5)](S);}};$(b,_0x79c709(0xee),W),$(b,'type',_0x22d56f[_0x79c709(0xe5)]),b=ie([_0x35d16d(_0x88d24a,_0x516c07,_0x325da3),w(0x1,_0x55a458(_0x6b939)),w(0x2,_0x32f453)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x563e4d=_0x2d1b;(function(_0x5b1f29,_0x25949c){const _0x5e2444=_0x2d1b,_0x1af306=_0x5b1f29();while(!![]){try{const _0x3ac455=-parseInt(_0x5e2444(0x155))/0x1*(-parseInt(_0x5e2444(0x106))/0x2)+-parseInt(_0x5e2444(0x133))/0x3*(-parseInt(_0x5e2444(0x102))/0x4)+-parseInt(_0x5e2444(0x134))/0x5+parseInt(_0x5e2444(0x105))/0x6+-parseInt(_0x5e2444(0x13d))/0x7+-parseInt(_0x5e2444(0xff))/0x8+-parseInt(_0x5e2444(0x126))/0x9*(parseInt(_0x5e2444(0x10e))/0xa);if(_0x3ac455===_0x25949c)break;else _0x1af306['push'](_0x1af306['shift']());}catch(_0x158af5){_0x1af306['push'](_0x1af306['shift']());}}}(_0x3266,0x707b7));import{CommentService as _0x37c928,CollaborationSessionService as _0xebc7db,UniverCollaborationClientPlugin as _0x26ed2b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2daddd}from'@univerjs-pro/license';import{dayjs as _0x2319f2,UserManagerService as _0xbdaef0,Inject as _0x49cb55,Injector as _0x227d72,Disposable as _0x58abef,CustomRangeType as _0xacacc4,UniverInstanceType as _0x31d14d,DependentOn as _0x20dfb6,IConfigService as _0x5470ab,Plugin as _0x15ce6a,merge as _0xfa84a5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26a489}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x67d0d0,IThreadCommentDataSourceService as _0x23bb20}from'@univerjs/thread-comment';import{bufferTime as _0x1f3a72}from'rxjs';import{HTTPService as _0x686b7a}from'@univerjs/network';const W=_0x563e4d(0x10c);var I=(_0x1554e9=>(_0x1554e9[_0x1554e9[_0x563e4d(0x10b)]=0x0]=_0x563e4d(0x10b),_0x1554e9[_0x1554e9[_0x563e4d(0x15f)]=0x1]=_0x563e4d(0x15f),_0x1554e9[_0x1554e9[_0x563e4d(0x14a)]=-0x1]='UNRECOGNIZED',_0x1554e9))(I||{}),v=(_0x3f65f7=>(_0x3f65f7[_0x3f65f7['Unknown']=0x0]='Unknown',_0x3f65f7[_0x3f65f7['Add']=0x1]='Add',_0x3f65f7[_0x3f65f7[_0x563e4d(0x103)]=0x2]=_0x563e4d(0x103),_0x3f65f7[_0x3f65f7[_0x563e4d(0x11f)]=0x3]='Edit',_0x3f65f7[_0x3f65f7[_0x563e4d(0x157)]=0x4]='Delete',_0x3f65f7[_0x3f65f7[_0x563e4d(0x115)]=0x5]=_0x563e4d(0x115),_0x3f65f7[_0x3f65f7[_0x563e4d(0x14a)]=-0x1]='UNRECOGNIZED',_0x3f65f7))(v||{});const D=_0x150322=>_0x2319f2(new Date(+_0x150322))[_0x563e4d(0x158)](_0x563e4d(0x120)),B=async(_0x297efc,_0x175225)=>{const _0x52abbb=_0x563e4d,_0x440818=_0x297efc[_0x52abbb(0x12a)](_0xbdaef0),_0x371069=_0x297efc['get'](_0x686b7a);_0x175225[_0x52abbb(0x110)](_0x149fae=>{const _0x195f9e=_0x52abbb;_0x440818['getUser'](_0x149fae)&&_0x175225[_0x195f9e(0x118)](_0x149fae);}),_0x175225[_0x52abbb(0x128)]&&(await _0x371069[_0x52abbb(0x12a)](_0x52abbb(0x160),{'params':{'userIDs':[..._0x175225]}}))['body'][_0x52abbb(0x10d)][_0x52abbb(0x110)](_0x279ed5=>{const _0x270fbb=_0x52abbb;_0x279ed5&&_0x440818[_0x270fbb(0x116)](_0x279ed5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x526b74,_0x1a026c,_0x82196a,_0x5dceac)=>{const _0x1c43fb=_0x563e4d;for(var _0x23f76c=_0x5dceac>0x1?void 0x0:_0x5dceac?K(_0x1a026c,_0x82196a):_0x1a026c,_0x3c26ba=_0x526b74[_0x1c43fb(0x123)]-0x1,_0x32dab3;_0x3c26ba>=0x0;_0x3c26ba--)(_0x32dab3=_0x526b74[_0x3c26ba])&&(_0x23f76c=_0x32dab3(_0x23f76c)||_0x23f76c);return _0x23f76c;},p=(_0x4f029e,_0x535940)=>(_0x536e9f,_0x6c23e)=>_0x535940(_0x536e9f,_0x6c23e,_0x4f029e);let S=class extends _0x58abef{constructor(_0x1fa31d,_0x373f5a,_0x598bc0,_0x262439){const _0x4fb8bf=_0x563e4d;super(),this[_0x4fb8bf(0x108)]=_0x1fa31d,this[_0x4fb8bf(0x145)]=_0x373f5a,this[_0x4fb8bf(0x10f)]=_0x598bc0,this[_0x4fb8bf(0x10a)]=_0x262439,this[_0x4fb8bf(0x119)](),this[_0x4fb8bf(0x11e)]();}['_initUserSync'](){const _0x30b636=_0x563e4d;this[_0x30b636(0x143)](this[_0x30b636(0x145)][_0x30b636(0x14f)][_0x30b636(0x14c)](_0x1f3a72(0x10))[_0x30b636(0x156)](_0x58e085=>{const _0x293b42=_0x30b636,_0x34a1df=new Set();_0x58e085[_0x293b42(0x110)](_0x29a2cb=>{const _0x41a9e8=_0x293b42;switch(_0x29a2cb[_0x41a9e8(0x121)]){case _0x41a9e8(0x137):{const _0x45ee3b=_0x29a2cb['payload'][_0x41a9e8(0x142)];_0x34a1df[_0x41a9e8(0x137)](_0x45ee3b);break;}}}),B(this[_0x293b42(0x10a)],_0x34a1df);}));}[_0x563e4d(0x119)](){const _0x4b1323=_0x563e4d;this[_0x4b1323(0x143)](this[_0x4b1323(0x108)][_0x4b1323(0x14f)][_0x4b1323(0x156)](async _0x1a1781=>{const _0x255e18=_0x4b1323;var _0x243ead,_0x93eb64,_0x7ee768,_0x392b34;const _0x1302f4=(_0x243ead=this[_0x255e18(0x145)]['getUnit'](_0x1a1781[_0x255e18(0x15c)])[_0x255e18(0x15a)](_0xa518d5=>_0xa518d5[_0x255e18(0x12f)]===_0x1a1781[_0x255e18(0x12f)]))==null?void 0x0:_0x243ead[_0x255e18(0x147)];if(!_0x1302f4)return;const {unitId:_0x43e3d4,subUnitId:_0x28b8e4}=_0x1302f4;switch(_0x1a1781['user']&&this['_userService'][_0x255e18(0x116)](_0x1a1781[_0x255e18(0x132)]),_0x1a1781[_0x255e18(0x121)]){case v['Add']:break;case v[_0x255e18(0x103)]:{this[_0x255e18(0x145)]['addComment'](_0x43e3d4,_0x28b8e4,{'unitId':_0x43e3d4,'subUnitId':_0x28b8e4,'ref':'','id':_0x1a1781['replyId'],'dT':D(+_0x1a1781[_0x255e18(0x14e)]),'threadId':_0x1a1781['threadId'],'personId':(_0x7ee768=(_0x93eb64=_0x1a1781[_0x255e18(0x132)])==null?void 0x0:_0x93eb64[_0x255e18(0x113)])!=null?_0x7ee768:_0x1a1781[_0x255e18(0x148)],'text':JSON[_0x255e18(0x12c)](_0x1a1781['content']),'parentId':_0x1302f4['id']});break;}case v[_0x255e18(0x157)]:{const _0x10c403=this[_0x255e18(0x145)]['getComment'](_0x43e3d4,_0x28b8e4,_0x1a1781['replyId']);_0x10c403&&_0x10c403[_0x255e18(0x104)]&&this[_0x255e18(0x145)]['deleteComment'](_0x43e3d4,_0x28b8e4,_0x1a1781[_0x255e18(0x100)]);break;}case v[_0x255e18(0x11f)]:{this[_0x255e18(0x145)][_0x255e18(0x14d)](_0x43e3d4,_0x28b8e4,{'commentId':_0x1a1781[_0x255e18(0x100)],'text':JSON[_0x255e18(0x12c)](_0x1a1781['content'])});break;}case v[_0x255e18(0x115)]:{const _0x2950aa=(_0x392b34=this['_threadCommentModel'][_0x255e18(0x14b)](_0x1a1781[_0x255e18(0x15c)])[_0x255e18(0x15a)](_0x6819f3=>_0x6819f3['threadId']===_0x1a1781['threadId']))==null?void 0x0:_0x392b34[_0x255e18(0x147)];_0x2950aa&&this['_threadCommentModel']['resolveComment'](_0x43e3d4,_0x28b8e4,_0x2950aa['id'],_0x1a1781[_0x255e18(0x13b)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x49cb55(_0x37c928)),p(0x1,_0x49cb55(_0x67d0d0)),p(0x2,_0x49cb55(_0xbdaef0)),p(0x3,_0x49cb55(_0x227d72))],S);const z=_0x563e4d(0x141),M={};var k=Object[_0x563e4d(0x125)],Q=(_0x127b8a,_0x336c8a,_0x4410a6,_0x488514)=>{for(var _0x153aaa=_0x488514>0x1?void 0x0:_0x488514?k(_0x336c8a,_0x4410a6):_0x336c8a,_0x306c57=_0x127b8a['length']-0x1,_0x53a69e;_0x306c57>=0x0;_0x306c57--)(_0x53a69e=_0x127b8a[_0x306c57])&&(_0x153aaa=_0x53a69e(_0x153aaa)||_0x153aaa);return _0x153aaa;},_=(_0x2c459a,_0x20ae9f)=>(_0x328939,_0x10ee30)=>_0x20ae9f(_0x328939,_0x10ee30,_0x2c459a);function X(_0x45a127,_0x3783cb){const _0x776827=_0x563e4d,_0x15e4ba=_0x45a127[_0x776827(0x15e)][0x0];return{..._0x3783cb,'id':_0x15e4ba[_0x776827(0x100)],'resolved':_0x45a127[_0x776827(0x13b)]===0x1,'dT':D(_0x15e4ba['createTimestamp']),'personId':_0x15e4ba[_0x776827(0x148)],'threadId':_0x15e4ba['threadId']};}function _0x3266(){const _0x1e8203=['customRanges','513648OlriFK','replyId','comments','1228YohBdd','Reply','parentId','1070202EwarOk','2AJCoFN','post','_commentService','_threadCommentDataSourceService','_injector','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','20UdjvQV','_userService','forEach','_httpService','code','userID','_initDataSource','Solve','addUser','UNIVER_UNKNOWN','delete','_init','syncUpdateMutationToColla','_sessionService','reply','/reply','_initUserSync','Edit','YYYY/MM/DD\x20HH:mm','type','content','length','_config','getOwnPropertyDescriptor','1771452AHIYfx','addComment','size','deleteComment','get','rangeId','parse','COMMENT','_threadCommentDataSource','threadId','symbol','resolved','user','4761YipRVF','2469760oxgvRV','map','body','add','listComments','error','/list','solved','/edit','351876qlDqAG','requireSession','stringify','onStarting','thread-comment-data-source.config','personId','disposeWithMe','rangeType','_threadCommentModel','slice','root','userId','defineProperty','UNRECOGNIZED','getUnit','pipe','updateComment','createTimestamp','commentUpdate$','getMemberID','filter','_configService','/delete','values','797233kqwORP','subscribe','Delete','format','/universer-api/comment/unit/','find','onReady','unitId','comment','replies','Solved','/universer-api/user/list','/add','dataSource','setConfig','pluginName'];_0x3266=function(){return _0x1e8203;};return _0x3266();}function ee(_0x1c2925,_0x3c62f4,_0x4611d8){const _0x409b0d=_0x563e4d;var _0x2c97cc,_0x1440eb;if(((_0x1440eb=(_0x2c97cc=_0x1c2925==null?void 0x0:_0x1c2925[_0x409b0d(0x15e)])==null?void 0x0:_0x2c97cc['length'])!=null?_0x1440eb:0x0)>0x0){const _0x3e535f=(_0x2f0b1c,_0xee1674)=>({'id':_0x2f0b1c[_0x409b0d(0x100)],'threadId':_0x2f0b1c[_0x409b0d(0x12f)],'dT':D(_0x2f0b1c[_0x409b0d(0x14e)]),'personId':_0x2f0b1c['userId'],'resolved':_0x1c2925[_0x409b0d(0x13b)]===I[_0x409b0d(0x15f)],'unitId':_0x3c62f4,'subUnitId':_0x4611d8,'text':JSON['parse'](_0x2f0b1c[_0x409b0d(0x122)]),'parentId':_0xee1674}),_0x40a450=_0x3e535f(_0x1c2925[_0x409b0d(0x15e)][0x0]);return{..._0x40a450,'children':_0x1c2925[_0x409b0d(0x15e)][_0x409b0d(0x146)](0x1)['map'](_0x245ad8=>_0x3e535f(_0x245ad8,_0x40a450['id']))};}return null;}let f=class{constructor(_0x2115e0,_0x1e97e7,_0x7b55d7,_0x5e53dc){const _0x4cde04=_0x563e4d;this['_httpService']=_0x2115e0,this[_0x4cde04(0x10f)]=_0x1e97e7,this[_0x4cde04(0x11b)]=_0x7b55d7,this[_0x4cde04(0x10a)]=_0x5e53dc;}async[_0x563e4d(0x127)](_0x2bb2e2){const _0x35a7cd=_0x563e4d;var _0x16d414,_0x26fff0;const {parentId:_0x2e6a0a,unitId:_0x1e85b1,text:_0x307238,threadId:_0x1c28da}=_0x2bb2e2,_0x46354e=(_0x26fff0=(_0x16d414=_0x307238[_0x35a7cd(0xfe)])==null?void 0x0:_0x16d414['filter'](_0x4f1003=>_0x4f1003[_0x35a7cd(0x144)]===_0xacacc4[_0x35a7cd(0x12d)])[_0x35a7cd(0x135)](_0x5ccc68=>_0x5ccc68['rangeId']))!=null?_0x26fff0:[],_0x38d34a=JSON['stringify'](_0x307238),_0x30fedb=(await this['_sessionService'][_0x35a7cd(0x13e)](_0x1e85b1))[_0x35a7cd(0x150)]();if(_0x2e6a0a){const _0x4ff696={'memberId':_0x30fedb,'unitId':_0x1e85b1,'content':_0x38d34a,'mention':_0x46354e,'threadId':_0x1c28da},_0x41a58e=(await this[_0x35a7cd(0x111)][_0x35a7cd(0x107)](_0x35a7cd(0x159)+_0x1e85b1+_0x35a7cd(0x11d),{'body':_0x4ff696}))[_0x35a7cd(0x136)][_0x35a7cd(0x11c)];return{..._0x2bb2e2,'id':_0x41a58e[_0x35a7cd(0x100)],'dT':_0x2319f2(+_0x41a58e[_0x35a7cd(0x14e)])['format'](_0x35a7cd(0x120)),'personId':_0x41a58e[_0x35a7cd(0x148)]};}else{const _0x2c9634={'memberId':_0x30fedb,'unitId':_0x1e85b1,'content':_0x38d34a,'mention':_0x46354e},_0x5e1753=await this[_0x35a7cd(0x111)][_0x35a7cd(0x107)]('/universer-api/comment/unit/'+_0x1e85b1+_0x35a7cd(0x161),{'body':_0x2c9634});return X(_0x5e1753[_0x35a7cd(0x136)][_0x35a7cd(0x15d)],_0x2bb2e2);}}async[_0x563e4d(0x14d)](_0xa475e0){const _0x4a6b8c=_0x563e4d;var _0x209897,_0x2a9dfa;const {text:_0x1ddf2d,unitId:_0x1aa674}=_0xa475e0,_0x14f60b=(_0x2a9dfa=(_0x209897=_0x1ddf2d[_0x4a6b8c(0xfe)])==null?void 0x0:_0x209897[_0x4a6b8c(0x151)](_0xebb845=>_0xebb845[_0x4a6b8c(0x144)]===_0xacacc4[_0x4a6b8c(0x12d)])[_0x4a6b8c(0x135)](_0x44a1a6=>_0x44a1a6[_0x4a6b8c(0x12b)]))!=null?_0x2a9dfa:[],_0x3de328=JSON[_0x4a6b8c(0x13f)](_0x1ddf2d),_0x134cb4=_0xa475e0[_0x4a6b8c(0x12f)],_0x48110a=_0xa475e0['id'],_0x5d9002={'memberId':(await this[_0x4a6b8c(0x11b)][_0x4a6b8c(0x13e)](_0x1aa674))[_0x4a6b8c(0x150)](),'unitId':_0x1aa674,'threadId':_0x134cb4,'mention':_0x14f60b,'content':_0x3de328,'replyId':_0x48110a},_0x227d6a=await this[_0x4a6b8c(0x111)]['post'](_0x4a6b8c(0x159)+_0x1aa674+_0x4a6b8c(0x13c),{'body':_0x5d9002});return!_0x227d6a[_0x4a6b8c(0x136)][_0x4a6b8c(0x139)]||_0x227d6a[_0x4a6b8c(0x136)][_0x4a6b8c(0x139)]['code']===0x1;}async['resolveComment'](_0x11767f){const _0x3d247b=_0x563e4d,{unitId:_0x49dd6f}=_0x11767f,_0x7f61e1=_0x11767f[_0x3d247b(0x12f)],_0xf1e2bc={'memberId':this[_0x3d247b(0x10f)]['getCurrentUser']()[_0x3d247b(0x113)],'unitId':_0x49dd6f,'threadId':_0x7f61e1,'solved':_0x11767f[_0x3d247b(0x131)]?I['Solved']:I['OpenOrReOpen']},_0x482743=await this['_httpService'][_0x3d247b(0x107)](_0x3d247b(0x159)+_0x49dd6f+'/solved',{'body':_0xf1e2bc});return!_0x482743[_0x3d247b(0x136)][_0x3d247b(0x139)]||_0x482743[_0x3d247b(0x136)][_0x3d247b(0x139)][_0x3d247b(0x112)]===0x1;}async[_0x563e4d(0x129)](_0x337c88,_0x2bef6e,_0x2e2e0c,_0x58dab9){const _0x2e25c5=_0x563e4d,_0xae17f8={'memberId':(await this[_0x2e25c5(0x11b)]['requireSession'](_0x337c88))[_0x2e25c5(0x150)](),'threadId':_0x2e2e0c,'replyId':_0x58dab9,'unitId':_0x337c88},_0x3900ab=await this[_0x2e25c5(0x111)][_0x2e25c5(0x107)](_0x2e25c5(0x159)+_0x337c88+_0x2e25c5(0x153),{'body':_0xae17f8});return!_0x3900ab['body'][_0x2e25c5(0x139)]||_0x3900ab[_0x2e25c5(0x136)]['error']['code']===0x1;}async[_0x563e4d(0x138)](_0x44636b,_0x2751bf,_0x437ccd){const _0x1e0968=_0x563e4d,_0x4a3189={'unitId':_0x44636b,'threadId':_0x437ccd},_0x6af455=await this[_0x1e0968(0x111)][_0x1e0968(0x107)](_0x1e0968(0x159)+_0x44636b+_0x1e0968(0x13a),{'body':_0x4a3189}),_0x422c90=_0x437ccd['map'](_0x1be2d5=>ee(_0x6af455['body'][_0x1e0968(0x101)][_0x1be2d5],_0x44636b,_0x2751bf))[_0x1e0968(0x151)](Boolean);return Object[_0x1e0968(0x154)](_0x6af455['body'][_0x1e0968(0x10d)])['forEach'](_0xf6eca4=>{this['_userService']['addUser'](_0xf6eca4);}),_0x422c90;}['saveCommentToSnapshot'](_0x36632b){const _0x1a787b=_0x563e4d;return{'id':_0x36632b['id'],'threadId':_0x36632b[_0x1a787b(0x12f)],'ref':_0x36632b['ref']};}};f=Q([_(0x0,_0x49cb55(_0x686b7a)),_(0x1,_0x49cb55(_0xbdaef0)),_(0x2,_0x49cb55(_0xebc7db)),_(0x3,_0x49cb55(_0x227d72))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x5da473,_0x20c2f3,_0x4fd4a7,_0x254646)=>{const _0x20c9be=_0x563e4d;for(var _0x7f7b12=_0x254646>0x1?void 0x0:_0x254646?re(_0x20c2f3,_0x4fd4a7):_0x20c2f3,_0x457e63=_0x5da473[_0x20c9be(0x123)]-0x1,_0x7e90c7;_0x457e63>=0x0;_0x457e63--)(_0x7e90c7=_0x5da473[_0x457e63])&&(_0x7f7b12=_0x7e90c7(_0x7f7b12)||_0x7f7b12);return _0x7f7b12;},N=(_0xe8c6ad,_0x15c3d0)=>(_0x1eaf06,_0x184ddd)=>_0x15c3d0(_0x1eaf06,_0x184ddd,_0xe8c6ad);let g=class extends _0x58abef{constructor(_0x325de8,_0x1e1037){const _0x3e8271=_0x563e4d;super(),this[_0x3e8271(0x109)]=_0x325de8,this[_0x3e8271(0x12e)]=_0x1e1037,this['_initDataSource']();}[_0x563e4d(0x114)](){const _0x2ef894=_0x563e4d;this[_0x2ef894(0x109)][_0x2ef894(0x162)]=this['_threadCommentDataSource'],this[_0x2ef894(0x109)][_0x2ef894(0x11a)]=!0x1;}};g=te([N(0x0,_0x23bb20),N(0x1,_0x49cb55(f))],g);var se=Object[_0x563e4d(0x149)],oe=Object[_0x563e4d(0x125)],ne=(_0x21cb71,_0x13e3a4,_0x31a1b2)=>_0x13e3a4 in _0x21cb71?se(_0x21cb71,_0x13e3a4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31a1b2}):_0x21cb71[_0x13e3a4]=_0x31a1b2,ie=(_0x4f46ee,_0x21233f,_0x5bbe69,_0x2d5aaf)=>{for(var _0x15e3ca=_0x2d5aaf>0x1?void 0x0:_0x2d5aaf?oe(_0x21233f,_0x5bbe69):_0x21233f,_0x942d30=_0x4f46ee['length']-0x1,_0x18f7e5;_0x942d30>=0x0;_0x942d30--)(_0x18f7e5=_0x4f46ee[_0x942d30])&&(_0x15e3ca=_0x18f7e5(_0x15e3ca)||_0x15e3ca);return _0x15e3ca;},w=(_0x2a6f20,_0x4a9c25)=>(_0x1b784e,_0x168af3)=>_0x4a9c25(_0x1b784e,_0x168af3,_0x2a6f20),$=(_0xf12e98,_0x610400,_0x17103b)=>ne(_0xf12e98,typeof _0x610400!=_0x563e4d(0x130)?_0x610400+'':_0x610400,_0x17103b);function _0x2d1b(_0x3cb162,_0x2c1da5){const _0x3266c0=_0x3266();return _0x2d1b=function(_0x2d1b37,_0xb28dc4){_0x2d1b37=_0x2d1b37-0xfd;let _0x2dce20=_0x3266c0[_0x2d1b37];return _0x2dce20;},_0x2d1b(_0x3cb162,_0x2c1da5);}let b=class extends _0x15ce6a{constructor(_0x46ca7e=M,_0x43a563,_0x16ddef){const _0x21af81=_0x563e4d;super(),this[_0x21af81(0x124)]=_0x46ca7e,this[_0x21af81(0x10a)]=_0x43a563,this[_0x21af81(0x152)]=_0x16ddef;const {..._0x11d1c4}=_0xfa84a5({},M,this[_0x21af81(0x124)]);this[_0x21af81(0x152)][_0x21af81(0x163)](z,_0x11d1c4);}[_0x563e4d(0x140)](){const _0x995b2d=_0x563e4d;[[f],[g],[S]][_0x995b2d(0x110)](_0x537c59=>{const _0x1bf2a0=_0x995b2d;this[_0x1bf2a0(0x10a)][_0x1bf2a0(0x137)](_0x537c59);});}[_0x563e4d(0x15b)](){const _0x3a4329=_0x563e4d;this[_0x3a4329(0x10a)]['get'](g),this[_0x3a4329(0x10a)][_0x3a4329(0x12a)](S);}};$(b,_0x563e4d(0xfd),W),$(b,_0x563e4d(0x121),_0x31d14d[_0x563e4d(0x117)]),b=ie([_0x20dfb6(_0x26a489,_0x26ed2b,_0x2daddd),w(0x1,_0x49cb55(_0x227d72)),w(0x2,_0x5470ab)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4f0f(_0xa30d,_0x2c98c8){const _0x85decc=_0x85de();return _0x4f0f=function(_0x4f0fdb,_0x36032b){_0x4f0fdb=_0x4f0fdb-0xcc;let _0x10021b=_0x85decc[_0x4f0fdb];return _0x10021b;},_0x4f0f(_0xa30d,_0x2c98c8);}const _0x79c709=_0x4f0f;(function(_0x192fba,_0x3043a4){const _0x4557e9=_0x4f0f,_0x33dac2=_0x192fba();while(!![]){try{const _0x25264a=parseInt(_0x4557e9(0x10b))/0x1*(parseInt(_0x4557e9(0x109))/0x2)+-parseInt(_0x4557e9(0x118))/0x3*(parseInt(_0x4557e9(0xda))/0x4)+parseInt(_0x4557e9(0x10c))/0x5*(-parseInt(_0x4557e9(0x112))/0x6)+-parseInt(_0x4557e9(0xf3))/0x7+-parseInt(_0x4557e9(0x101))/0x8*(-parseInt(_0x4557e9(0xdb))/0x9)+parseInt(_0x4557e9(0xdf))/0xa+-parseInt(_0x4557e9(0xeb))/0xb;if(_0x25264a===_0x3043a4)break;else _0x33dac2['push'](_0x33dac2['shift']());}catch(_0x5b8c60){_0x33dac2['push'](_0x33dac2['shift']());}}}(_0x85de,0x3a7cc));import{CommentService as _0x1f19d6,CollaborationSessionService as _0x26a704,UniverCollaborationClientPlugin as _0x516c07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x325da3}from'@univerjs-pro/license';import{dayjs as _0x22132e,UserManagerService as _0x21757a,Inject as _0x55a458,Injector as _0x6b939,Disposable as _0x636f8c,CustomRangeType as _0x16308c,UniverInstanceType as _0x22d56f,DependentOn as _0x35d16d,IConfigService as _0x32f453,Plugin as _0x5e5613,merge as _0x1d7b32}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x88d24a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x58222f,IThreadCommentDataSourceService as _0x467247}from'@univerjs/thread-comment';import{bufferTime as _0x2364d4}from'rxjs';import{HTTPService as _0x333036}from'@univerjs/network';const W=_0x79c709(0xe8);var I=(_0x18acb9=>(_0x18acb9[_0x18acb9[_0x79c709(0x111)]=0x0]=_0x79c709(0x111),_0x18acb9[_0x18acb9['Solved']=0x1]=_0x79c709(0x107),_0x18acb9[_0x18acb9[_0x79c709(0x113)]=-0x1]=_0x79c709(0x113),_0x18acb9))(I||{}),v=(_0x43313a=>(_0x43313a[_0x43313a['Unknown']=0x0]='Unknown',_0x43313a[_0x43313a['Add']=0x1]='Add',_0x43313a[_0x43313a['Reply']=0x2]=_0x79c709(0xf9),_0x43313a[_0x43313a[_0x79c709(0xd4)]=0x3]=_0x79c709(0xd4),_0x43313a[_0x43313a[_0x79c709(0x114)]=0x4]='Delete',_0x43313a[_0x43313a[_0x79c709(0xcd)]=0x5]=_0x79c709(0xcd),_0x43313a[_0x43313a[_0x79c709(0x113)]=-0x1]=_0x79c709(0x113),_0x43313a))(v||{});const D=_0x19bf97=>_0x22132e(new Date(+_0x19bf97))['format'](_0x79c709(0x11c)),B=async(_0x29fd74,_0xca375e)=>{const _0x2802f6=_0x79c709,_0x32ae76=_0x29fd74[_0x2802f6(0xf5)](_0x21757a),_0x2dadb2=_0x29fd74['get'](_0x333036);_0xca375e[_0x2802f6(0x124)](_0xe904aa=>{const _0x262e87=_0x2802f6;_0x32ae76[_0x262e87(0xfd)](_0xe904aa)&&_0xca375e[_0x262e87(0xf1)](_0xe904aa);}),_0xca375e['size']&&(await _0x2dadb2[_0x2802f6(0xf5)](_0x2802f6(0xe2),{'params':{'userIDs':[..._0xca375e]}}))[_0x2802f6(0xe6)][_0x2802f6(0xcf)][_0x2802f6(0x124)](_0x1ea1d8=>{const _0x303a8b=_0x2802f6;_0x1ea1d8&&_0x32ae76[_0x303a8b(0xfe)](_0x1ea1d8);});};function _0x85de(){const _0x299192=['_init','_config','pluginName','symbol','onReady','delete','find','179956XHojwm','error','get','parse','createTimestamp','userId','Reply','filter','setConfig','content','getUser','addUser','/list','comment','1432pSGzZf','/edit','getMemberID','resolved','root','/reply','Solved','values','4pYPwLT','threadId','79363xahrrU','185QZkVoB','replyId','user','listComments','_threadCommentDataSource','OpenOrReOpen','36636UxjyMb','UNRECOGNIZED','Delete','map','/delete','_httpService','37689EYJIIq','getComment','/universer-api/comment/unit/','rangeType','YYYY/MM/DD\x20HH:mm','add','_commentService','replies','rangeId','getUnit','addComment','_threadCommentDataSourceService','forEach','requireSession','syncUpdateMutationToColla','post','pipe','_userService','COMMENT','solved','_threadCommentModel','getOwnPropertyDescriptor','_configService','code','_initDataSource','Solve','Add','users','userID','length','resolveComment','_injector','Edit','commentUpdate$','stringify','type','reply','_initUserSync','4dFdQGn','11862owfHcG','saveCommentToSnapshot','comments','customRanges','3159850JtxqBJ','updateComment','disposeWithMe','/universer-api/user/list','unitId','getCurrentUser','UNIVER_UNKNOWN','body','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','dataSource','2275636rxiSJz'];_0x85de=function(){return _0x299192;};return _0x85de();}var K=Object[_0x79c709(0x12d)],V=(_0x586e20,_0x20c312,_0x5a4e49,_0x2c2756)=>{const _0xaf5de9=_0x79c709;for(var _0x1cc3f2=_0x2c2756>0x1?void 0x0:_0x2c2756?K(_0x20c312,_0x5a4e49):_0x20c312,_0x195c40=_0x586e20[_0xaf5de9(0xd1)]-0x1,_0x3367b9;_0x195c40>=0x0;_0x195c40--)(_0x3367b9=_0x586e20[_0x195c40])&&(_0x1cc3f2=_0x3367b9(_0x1cc3f2)||_0x1cc3f2);return _0x1cc3f2;},p=(_0x109af2,_0x38bf0e)=>(_0x544f4e,_0x311400)=>_0x38bf0e(_0x544f4e,_0x311400,_0x109af2);let S=class extends _0x636f8c{constructor(_0x2f2b20,_0x55c1fb,_0x5d2571,_0x20766b){const _0x4bd3a7=_0x79c709;super(),this[_0x4bd3a7(0x11e)]=_0x2f2b20,this[_0x4bd3a7(0x12c)]=_0x55c1fb,this[_0x4bd3a7(0x129)]=_0x5d2571,this['_injector']=_0x20766b,this[_0x4bd3a7(0xec)](),this[_0x4bd3a7(0xd9)]();}[_0x79c709(0xd9)](){const _0x2df58b=_0x79c709;this[_0x2df58b(0xe1)](this[_0x2df58b(0x12c)][_0x2df58b(0xd5)][_0x2df58b(0x128)](_0x2364d4(0x10))[_0x2df58b(0xe7)](_0x2e1b56=>{const _0x4d0b67=_0x2df58b,_0x430f78=new Set();_0x2e1b56[_0x4d0b67(0x124)](_0x485e31=>{const _0x259aff=_0x4d0b67;switch(_0x485e31[_0x259aff(0xd7)]){case _0x259aff(0x11d):{const _0x34ad39=_0x485e31['payload']['personId'];_0x430f78[_0x259aff(0x11d)](_0x34ad39);break;}}}),B(this[_0x4d0b67(0xd3)],_0x430f78);}));}[_0x79c709(0xec)](){const _0x2294f7=_0x79c709;this[_0x2294f7(0xe1)](this[_0x2294f7(0x11e)][_0x2294f7(0xd5)][_0x2294f7(0xe7)](async _0x64d63a=>{const _0x4ab770=_0x2294f7;var _0x4884f0,_0x38b499,_0x1d4889,_0x4c77b9;const _0x31900a=(_0x4884f0=this[_0x4ab770(0x12c)][_0x4ab770(0x121)](_0x64d63a[_0x4ab770(0xe3)])[_0x4ab770(0xf2)](_0x3f0f67=>_0x3f0f67[_0x4ab770(0x10a)]===_0x64d63a[_0x4ab770(0x10a)]))==null?void 0x0:_0x4884f0[_0x4ab770(0x105)];if(!_0x31900a)return;const {unitId:_0x5ee3ae,subUnitId:_0x44327d}=_0x31900a;switch(_0x64d63a['user']&&this['_userService'][_0x4ab770(0xfe)](_0x64d63a[_0x4ab770(0x10e)]),_0x64d63a[_0x4ab770(0xd7)]){case v[_0x4ab770(0xce)]:break;case v[_0x4ab770(0xf9)]:{this[_0x4ab770(0x12c)][_0x4ab770(0x122)](_0x5ee3ae,_0x44327d,{'unitId':_0x5ee3ae,'subUnitId':_0x44327d,'ref':'','id':_0x64d63a[_0x4ab770(0x10d)],'dT':D(+_0x64d63a[_0x4ab770(0xf7)]),'threadId':_0x64d63a[_0x4ab770(0x10a)],'personId':(_0x1d4889=(_0x38b499=_0x64d63a[_0x4ab770(0x10e)])==null?void 0x0:_0x38b499['userID'])!=null?_0x1d4889:_0x64d63a[_0x4ab770(0xf8)],'text':JSON[_0x4ab770(0xf6)](_0x64d63a[_0x4ab770(0xfc)]),'parentId':_0x31900a['id']});break;}case v[_0x4ab770(0x114)]:{const _0x58f67d=this[_0x4ab770(0x12c)][_0x4ab770(0x119)](_0x5ee3ae,_0x44327d,_0x64d63a[_0x4ab770(0x10d)]);_0x58f67d&&_0x58f67d['parentId']&&this['_threadCommentModel']['deleteComment'](_0x5ee3ae,_0x44327d,_0x64d63a[_0x4ab770(0x10d)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4ab770(0xe0)](_0x5ee3ae,_0x44327d,{'commentId':_0x64d63a[_0x4ab770(0x10d)],'text':JSON[_0x4ab770(0xf6)](_0x64d63a['content'])});break;}case v['Solve']:{const _0x24295f=(_0x4c77b9=this[_0x4ab770(0x12c)]['getUnit'](_0x64d63a[_0x4ab770(0xe3)])['find'](_0x2caa70=>_0x2caa70[_0x4ab770(0x10a)]===_0x64d63a['threadId']))==null?void 0x0:_0x4c77b9[_0x4ab770(0x105)];_0x24295f&&this['_threadCommentModel'][_0x4ab770(0xd2)](_0x5ee3ae,_0x44327d,_0x24295f['id'],_0x64d63a[_0x4ab770(0x12b)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x55a458(_0x1f19d6)),p(0x1,_0x55a458(_0x58222f)),p(0x2,_0x55a458(_0x21757a)),p(0x3,_0x55a458(_0x6b939))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x79c709(0x12d)],Q=(_0x43920b,_0x5d8c3d,_0x4ba3c5,_0x37fe6a)=>{const _0x47a52e=_0x79c709;for(var _0x2de93e=_0x37fe6a>0x1?void 0x0:_0x37fe6a?k(_0x5d8c3d,_0x4ba3c5):_0x5d8c3d,_0x1fdfae=_0x43920b[_0x47a52e(0xd1)]-0x1,_0x1ca2f1;_0x1fdfae>=0x0;_0x1fdfae--)(_0x1ca2f1=_0x43920b[_0x1fdfae])&&(_0x2de93e=_0x1ca2f1(_0x2de93e)||_0x2de93e);return _0x2de93e;},_=(_0xa600f3,_0x328283)=>(_0x444cfd,_0x2d409)=>_0x328283(_0x444cfd,_0x2d409,_0xa600f3);function X(_0x5a7043,_0x2ce2f5){const _0x1321bc=_0x79c709,_0x1d5b1b=_0x5a7043[_0x1321bc(0x11f)][0x0];return{..._0x2ce2f5,'id':_0x1d5b1b[_0x1321bc(0x10d)],'resolved':_0x5a7043[_0x1321bc(0x12b)]===0x1,'dT':D(_0x1d5b1b[_0x1321bc(0xf7)]),'personId':_0x1d5b1b[_0x1321bc(0xf8)],'threadId':_0x1d5b1b['threadId']};}function ee(_0x27a304,_0x571549,_0x10a21d){const _0x5072b1=_0x79c709;var _0x19bf20,_0x139a25;if(((_0x139a25=(_0x19bf20=_0x27a304==null?void 0x0:_0x27a304[_0x5072b1(0x11f)])==null?void 0x0:_0x19bf20[_0x5072b1(0xd1)])!=null?_0x139a25:0x0)>0x0){const _0x30b529=(_0x10bb5e,_0x52ee06)=>({'id':_0x10bb5e[_0x5072b1(0x10d)],'threadId':_0x10bb5e[_0x5072b1(0x10a)],'dT':D(_0x10bb5e[_0x5072b1(0xf7)]),'personId':_0x10bb5e[_0x5072b1(0xf8)],'resolved':_0x27a304[_0x5072b1(0x12b)]===I[_0x5072b1(0x107)],'unitId':_0x571549,'subUnitId':_0x10a21d,'text':JSON[_0x5072b1(0xf6)](_0x10bb5e[_0x5072b1(0xfc)]),'parentId':_0x52ee06}),_0x6046ea=_0x30b529(_0x27a304['replies'][0x0]);return{..._0x6046ea,'children':_0x27a304[_0x5072b1(0x11f)]['slice'](0x1)[_0x5072b1(0x115)](_0x2dcc8f=>_0x30b529(_0x2dcc8f,_0x6046ea['id']))};}return null;}let f=class{constructor(_0x1f7d7c,_0x4cc603,_0xfcaefc,_0x13a008){const _0x37b6d1=_0x79c709;this[_0x37b6d1(0x117)]=_0x1f7d7c,this[_0x37b6d1(0x129)]=_0x4cc603,this[_0x37b6d1(0xe9)]=_0xfcaefc,this[_0x37b6d1(0xd3)]=_0x13a008;}async[_0x79c709(0x122)](_0x4d52b1){const _0x3f0466=_0x79c709;var _0x510b62,_0x2c8122;const {parentId:_0x510afa,unitId:_0x39a18e,text:_0x222549,threadId:_0x296d09}=_0x4d52b1,_0x2fd144=(_0x2c8122=(_0x510b62=_0x222549[_0x3f0466(0xde)])==null?void 0x0:_0x510b62[_0x3f0466(0xfa)](_0x1b7cec=>_0x1b7cec[_0x3f0466(0x11b)]===_0x16308c[_0x3f0466(0x12a)])[_0x3f0466(0x115)](_0x5ad0a9=>_0x5ad0a9[_0x3f0466(0x120)]))!=null?_0x2c8122:[],_0x28f383=JSON[_0x3f0466(0xd6)](_0x222549),_0x15cc83=(await this[_0x3f0466(0xe9)][_0x3f0466(0x125)](_0x39a18e))['getMemberID']();if(_0x510afa){const _0x1cf72c={'memberId':_0x15cc83,'unitId':_0x39a18e,'content':_0x28f383,'mention':_0x2fd144,'threadId':_0x296d09},_0x740b02=(await this['_httpService'][_0x3f0466(0x127)](_0x3f0466(0x11a)+_0x39a18e+_0x3f0466(0x106),{'body':_0x1cf72c}))[_0x3f0466(0xe6)][_0x3f0466(0xd8)];return{..._0x4d52b1,'id':_0x740b02[_0x3f0466(0x10d)],'dT':_0x22132e(+_0x740b02[_0x3f0466(0xf7)])['format'](_0x3f0466(0x11c)),'personId':_0x740b02[_0x3f0466(0xf8)]};}else{const _0x45c983={'memberId':_0x15cc83,'unitId':_0x39a18e,'content':_0x28f383,'mention':_0x2fd144},_0x8e030a=await this[_0x3f0466(0x117)]['post']('/universer-api/comment/unit/'+_0x39a18e+'/add',{'body':_0x45c983});return X(_0x8e030a[_0x3f0466(0xe6)][_0x3f0466(0x100)],_0x4d52b1);}}async[_0x79c709(0xe0)](_0x391fac){const _0x275789=_0x79c709;var _0x914c34,_0x400f43;const {text:_0x51bea4,unitId:_0x236259}=_0x391fac,_0x2a4539=(_0x400f43=(_0x914c34=_0x51bea4['customRanges'])==null?void 0x0:_0x914c34[_0x275789(0xfa)](_0xa81f7f=>_0xa81f7f[_0x275789(0x11b)]===_0x16308c[_0x275789(0x12a)])[_0x275789(0x115)](_0x412767=>_0x412767[_0x275789(0x120)]))!=null?_0x400f43:[],_0x2e423d=JSON[_0x275789(0xd6)](_0x51bea4),_0x3bd236=_0x391fac[_0x275789(0x10a)],_0x2e8fd9=_0x391fac['id'],_0x277d74={'memberId':(await this['_sessionService'][_0x275789(0x125)](_0x236259))['getMemberID'](),'unitId':_0x236259,'threadId':_0x3bd236,'mention':_0x2a4539,'content':_0x2e423d,'replyId':_0x2e8fd9},_0xac3259=await this[_0x275789(0x117)][_0x275789(0x127)](_0x275789(0x11a)+_0x236259+_0x275789(0x102),{'body':_0x277d74});return!_0xac3259['body'][_0x275789(0xf4)]||_0xac3259['body']['error'][_0x275789(0x12f)]===0x1;}async[_0x79c709(0xd2)](_0x50fad5){const _0x5bc47b=_0x79c709,{unitId:_0x1cf4c9}=_0x50fad5,_0x2a2f23=_0x50fad5[_0x5bc47b(0x10a)],_0x1b0149={'memberId':this[_0x5bc47b(0x129)][_0x5bc47b(0xe4)]()[_0x5bc47b(0xd0)],'unitId':_0x1cf4c9,'threadId':_0x2a2f23,'solved':_0x50fad5[_0x5bc47b(0x104)]?I['Solved']:I['OpenOrReOpen']},_0x4131b8=await this[_0x5bc47b(0x117)][_0x5bc47b(0x127)](_0x5bc47b(0x11a)+_0x1cf4c9+'/solved',{'body':_0x1b0149});return!_0x4131b8['body'][_0x5bc47b(0xf4)]||_0x4131b8[_0x5bc47b(0xe6)][_0x5bc47b(0xf4)][_0x5bc47b(0x12f)]===0x1;}async['deleteComment'](_0x4f5f34,_0x5f26ef,_0x2787e2,_0x1d5466){const _0x180514=_0x79c709,_0x33a83b={'memberId':(await this[_0x180514(0xe9)][_0x180514(0x125)](_0x4f5f34))[_0x180514(0x103)](),'threadId':_0x2787e2,'replyId':_0x1d5466,'unitId':_0x4f5f34},_0x2b2162=await this[_0x180514(0x117)][_0x180514(0x127)](_0x180514(0x11a)+_0x4f5f34+_0x180514(0x116),{'body':_0x33a83b});return!_0x2b2162['body'][_0x180514(0xf4)]||_0x2b2162[_0x180514(0xe6)][_0x180514(0xf4)]['code']===0x1;}async[_0x79c709(0x10f)](_0x51b3e8,_0x3dd85e,_0xcbfc4f){const _0x3883a5=_0x79c709,_0x5f102b={'unitId':_0x51b3e8,'threadId':_0xcbfc4f},_0x4f3f06=await this[_0x3883a5(0x117)][_0x3883a5(0x127)]('/universer-api/comment/unit/'+_0x51b3e8+_0x3883a5(0xff),{'body':_0x5f102b}),_0x3d4b8d=_0xcbfc4f[_0x3883a5(0x115)](_0x2630fb=>ee(_0x4f3f06[_0x3883a5(0xe6)][_0x3883a5(0xdd)][_0x2630fb],_0x51b3e8,_0x3dd85e))[_0x3883a5(0xfa)](Boolean);return Object[_0x3883a5(0x108)](_0x4f3f06[_0x3883a5(0xe6)]['users'])[_0x3883a5(0x124)](_0x347317=>{const _0x42fe60=_0x3883a5;this['_userService'][_0x42fe60(0xfe)](_0x347317);}),_0x3d4b8d;}[_0x79c709(0xdc)](_0x3e14ce){const _0x461aaf=_0x79c709;return{'id':_0x3e14ce['id'],'threadId':_0x3e14ce[_0x461aaf(0x10a)],'ref':_0x3e14ce['ref']};}};f=Q([_(0x0,_0x55a458(_0x333036)),_(0x1,_0x55a458(_0x21757a)),_(0x2,_0x55a458(_0x26a704)),_(0x3,_0x55a458(_0x6b939))],f);var re=Object[_0x79c709(0x12d)],te=(_0x352eef,_0x22163d,_0x282e9e,_0x570268)=>{const _0x21e07c=_0x79c709;for(var _0x257cb3=_0x570268>0x1?void 0x0:_0x570268?re(_0x22163d,_0x282e9e):_0x22163d,_0x19f4fc=_0x352eef[_0x21e07c(0xd1)]-0x1,_0x4c3b44;_0x19f4fc>=0x0;_0x19f4fc--)(_0x4c3b44=_0x352eef[_0x19f4fc])&&(_0x257cb3=_0x4c3b44(_0x257cb3)||_0x257cb3);return _0x257cb3;},N=(_0x4a4b3e,_0x8576e8)=>(_0x56f4b5,_0x388c60)=>_0x8576e8(_0x56f4b5,_0x388c60,_0x4a4b3e);let g=class extends _0x636f8c{constructor(_0x4a476e,_0x2886da){const _0x54a268=_0x79c709;super(),this['_threadCommentDataSourceService']=_0x4a476e,this[_0x54a268(0x110)]=_0x2886da,this[_0x54a268(0xcc)]();}['_initDataSource'](){const _0x41d503=_0x79c709;this['_threadCommentDataSourceService'][_0x41d503(0xea)]=this['_threadCommentDataSource'],this[_0x41d503(0x123)][_0x41d503(0x126)]=!0x1;}};g=te([N(0x0,_0x467247),N(0x1,_0x55a458(f))],g);var se=Object['defineProperty'],oe=Object[_0x79c709(0x12d)],ne=(_0xd59380,_0x14a5f1,_0x5ce2ab)=>_0x14a5f1 in _0xd59380?se(_0xd59380,_0x14a5f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ce2ab}):_0xd59380[_0x14a5f1]=_0x5ce2ab,ie=(_0xe6954d,_0x58a1cf,_0xf7ec4a,_0x490308)=>{const _0x4ef994=_0x79c709;for(var _0xff291c=_0x490308>0x1?void 0x0:_0x490308?oe(_0x58a1cf,_0xf7ec4a):_0x58a1cf,_0x3f9454=_0xe6954d[_0x4ef994(0xd1)]-0x1,_0x3a9535;_0x3f9454>=0x0;_0x3f9454--)(_0x3a9535=_0xe6954d[_0x3f9454])&&(_0xff291c=_0x3a9535(_0xff291c)||_0xff291c);return _0xff291c;},w=(_0x2da935,_0x25cccd)=>(_0x5c00ca,_0xd66b71)=>_0x25cccd(_0x5c00ca,_0xd66b71,_0x2da935),$=(_0x2cc14,_0x2669a4,_0x4f9d85)=>ne(_0x2cc14,typeof _0x2669a4!=_0x79c709(0xef)?_0x2669a4+'':_0x2669a4,_0x4f9d85);let b=class extends _0x5e5613{constructor(_0x305630=M,_0x360edc,_0x5df1f4){const _0x1fda19=_0x79c709;super(),this[_0x1fda19(0xed)]=_0x305630,this['_injector']=_0x360edc,this[_0x1fda19(0x12e)]=_0x5df1f4;const {..._0x4a33e5}=_0x1d7b32({},M,this[_0x1fda19(0xed)]);this[_0x1fda19(0x12e)][_0x1fda19(0xfb)](z,_0x4a33e5);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x4154fb=>{const _0x3393f6=_0x4f0f;this[_0x3393f6(0xd3)][_0x3393f6(0x11d)](_0x4154fb);});}[_0x79c709(0xf0)](){const _0xbb7514=_0x79c709;this[_0xbb7514(0xd3)][_0xbb7514(0xf5)](g),this[_0xbb7514(0xd3)][_0xbb7514(0xf5)](S);}};$(b,_0x79c709(0xee),W),$(b,'type',_0x22d56f[_0x79c709(0xe5)]),b=ie([_0x35d16d(_0x88d24a,_0x516c07,_0x325da3),w(0x1,_0x55a458(_0x6b939)),w(0x2,_0x32f453)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x563e4d=_0x2d1b;(function(_0x5b1f29,_0x25949c){const _0x5e2444=_0x2d1b,_0x1af306=_0x5b1f29();while(!![]){try{const _0x3ac455=-parseInt(_0x5e2444(0x155))/0x1*(-parseInt(_0x5e2444(0x106))/0x2)+-parseInt(_0x5e2444(0x133))/0x3*(-parseInt(_0x5e2444(0x102))/0x4)+-parseInt(_0x5e2444(0x134))/0x5+parseInt(_0x5e2444(0x105))/0x6+-parseInt(_0x5e2444(0x13d))/0x7+-parseInt(_0x5e2444(0xff))/0x8+-parseInt(_0x5e2444(0x126))/0x9*(parseInt(_0x5e2444(0x10e))/0xa);if(_0x3ac455===_0x25949c)break;else _0x1af306['push'](_0x1af306['shift']());}catch(_0x158af5){_0x1af306['push'](_0x1af306['shift']());}}}(_0x3266,0x707b7));import{CommentService as _0x37c928,CollaborationSessionService as _0xebc7db,UniverCollaborationClientPlugin as _0x26ed2b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2daddd}from'@univerjs-pro/license';import{dayjs as _0x2319f2,UserManagerService as _0xbdaef0,Inject as _0x49cb55,Injector as _0x227d72,Disposable as _0x58abef,CustomRangeType as _0xacacc4,UniverInstanceType as _0x31d14d,DependentOn as _0x20dfb6,IConfigService as _0x5470ab,Plugin as _0x15ce6a,merge as _0xfa84a5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26a489}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x67d0d0,IThreadCommentDataSourceService as _0x23bb20}from'@univerjs/thread-comment';import{bufferTime as _0x1f3a72}from'rxjs';import{HTTPService as _0x686b7a}from'@univerjs/network';const W=_0x563e4d(0x10c);var I=(_0x1554e9=>(_0x1554e9[_0x1554e9[_0x563e4d(0x10b)]=0x0]=_0x563e4d(0x10b),_0x1554e9[_0x1554e9[_0x563e4d(0x15f)]=0x1]=_0x563e4d(0x15f),_0x1554e9[_0x1554e9[_0x563e4d(0x14a)]=-0x1]='UNRECOGNIZED',_0x1554e9))(I||{}),v=(_0x3f65f7=>(_0x3f65f7[_0x3f65f7['Unknown']=0x0]='Unknown',_0x3f65f7[_0x3f65f7['Add']=0x1]='Add',_0x3f65f7[_0x3f65f7[_0x563e4d(0x103)]=0x2]=_0x563e4d(0x103),_0x3f65f7[_0x3f65f7[_0x563e4d(0x11f)]=0x3]='Edit',_0x3f65f7[_0x3f65f7[_0x563e4d(0x157)]=0x4]='Delete',_0x3f65f7[_0x3f65f7[_0x563e4d(0x115)]=0x5]=_0x563e4d(0x115),_0x3f65f7[_0x3f65f7[_0x563e4d(0x14a)]=-0x1]='UNRECOGNIZED',_0x3f65f7))(v||{});const D=_0x150322=>_0x2319f2(new Date(+_0x150322))[_0x563e4d(0x158)](_0x563e4d(0x120)),B=async(_0x297efc,_0x175225)=>{const _0x52abbb=_0x563e4d,_0x440818=_0x297efc[_0x52abbb(0x12a)](_0xbdaef0),_0x371069=_0x297efc['get'](_0x686b7a);_0x175225[_0x52abbb(0x110)](_0x149fae=>{const _0x195f9e=_0x52abbb;_0x440818['getUser'](_0x149fae)&&_0x175225[_0x195f9e(0x118)](_0x149fae);}),_0x175225[_0x52abbb(0x128)]&&(await _0x371069[_0x52abbb(0x12a)](_0x52abbb(0x160),{'params':{'userIDs':[..._0x175225]}}))['body'][_0x52abbb(0x10d)][_0x52abbb(0x110)](_0x279ed5=>{const _0x270fbb=_0x52abbb;_0x279ed5&&_0x440818[_0x270fbb(0x116)](_0x279ed5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x526b74,_0x1a026c,_0x82196a,_0x5dceac)=>{const _0x1c43fb=_0x563e4d;for(var _0x23f76c=_0x5dceac>0x1?void 0x0:_0x5dceac?K(_0x1a026c,_0x82196a):_0x1a026c,_0x3c26ba=_0x526b74[_0x1c43fb(0x123)]-0x1,_0x32dab3;_0x3c26ba>=0x0;_0x3c26ba--)(_0x32dab3=_0x526b74[_0x3c26ba])&&(_0x23f76c=_0x32dab3(_0x23f76c)||_0x23f76c);return _0x23f76c;},p=(_0x4f029e,_0x535940)=>(_0x536e9f,_0x6c23e)=>_0x535940(_0x536e9f,_0x6c23e,_0x4f029e);let S=class extends _0x58abef{constructor(_0x1fa31d,_0x373f5a,_0x598bc0,_0x262439){const _0x4fb8bf=_0x563e4d;super(),this[_0x4fb8bf(0x108)]=_0x1fa31d,this[_0x4fb8bf(0x145)]=_0x373f5a,this[_0x4fb8bf(0x10f)]=_0x598bc0,this[_0x4fb8bf(0x10a)]=_0x262439,this[_0x4fb8bf(0x119)](),this[_0x4fb8bf(0x11e)]();}['_initUserSync'](){const _0x30b636=_0x563e4d;this[_0x30b636(0x143)](this[_0x30b636(0x145)][_0x30b636(0x14f)][_0x30b636(0x14c)](_0x1f3a72(0x10))[_0x30b636(0x156)](_0x58e085=>{const _0x293b42=_0x30b636,_0x34a1df=new Set();_0x58e085[_0x293b42(0x110)](_0x29a2cb=>{const _0x41a9e8=_0x293b42;switch(_0x29a2cb[_0x41a9e8(0x121)]){case _0x41a9e8(0x137):{const _0x45ee3b=_0x29a2cb['payload'][_0x41a9e8(0x142)];_0x34a1df[_0x41a9e8(0x137)](_0x45ee3b);break;}}}),B(this[_0x293b42(0x10a)],_0x34a1df);}));}[_0x563e4d(0x119)](){const _0x4b1323=_0x563e4d;this[_0x4b1323(0x143)](this[_0x4b1323(0x108)][_0x4b1323(0x14f)][_0x4b1323(0x156)](async _0x1a1781=>{const _0x255e18=_0x4b1323;var _0x243ead,_0x93eb64,_0x7ee768,_0x392b34;const _0x1302f4=(_0x243ead=this[_0x255e18(0x145)]['getUnit'](_0x1a1781[_0x255e18(0x15c)])[_0x255e18(0x15a)](_0xa518d5=>_0xa518d5[_0x255e18(0x12f)]===_0x1a1781[_0x255e18(0x12f)]))==null?void 0x0:_0x243ead[_0x255e18(0x147)];if(!_0x1302f4)return;const {unitId:_0x43e3d4,subUnitId:_0x28b8e4}=_0x1302f4;switch(_0x1a1781['user']&&this['_userService'][_0x255e18(0x116)](_0x1a1781[_0x255e18(0x132)]),_0x1a1781[_0x255e18(0x121)]){case v['Add']:break;case v[_0x255e18(0x103)]:{this[_0x255e18(0x145)]['addComment'](_0x43e3d4,_0x28b8e4,{'unitId':_0x43e3d4,'subUnitId':_0x28b8e4,'ref':'','id':_0x1a1781['replyId'],'dT':D(+_0x1a1781[_0x255e18(0x14e)]),'threadId':_0x1a1781['threadId'],'personId':(_0x7ee768=(_0x93eb64=_0x1a1781[_0x255e18(0x132)])==null?void 0x0:_0x93eb64[_0x255e18(0x113)])!=null?_0x7ee768:_0x1a1781[_0x255e18(0x148)],'text':JSON[_0x255e18(0x12c)](_0x1a1781['content']),'parentId':_0x1302f4['id']});break;}case v[_0x255e18(0x157)]:{const _0x10c403=this[_0x255e18(0x145)]['getComment'](_0x43e3d4,_0x28b8e4,_0x1a1781['replyId']);_0x10c403&&_0x10c403[_0x255e18(0x104)]&&this[_0x255e18(0x145)]['deleteComment'](_0x43e3d4,_0x28b8e4,_0x1a1781[_0x255e18(0x100)]);break;}case v[_0x255e18(0x11f)]:{this[_0x255e18(0x145)][_0x255e18(0x14d)](_0x43e3d4,_0x28b8e4,{'commentId':_0x1a1781[_0x255e18(0x100)],'text':JSON[_0x255e18(0x12c)](_0x1a1781['content'])});break;}case v[_0x255e18(0x115)]:{const _0x2950aa=(_0x392b34=this['_threadCommentModel'][_0x255e18(0x14b)](_0x1a1781[_0x255e18(0x15c)])[_0x255e18(0x15a)](_0x6819f3=>_0x6819f3['threadId']===_0x1a1781['threadId']))==null?void 0x0:_0x392b34[_0x255e18(0x147)];_0x2950aa&&this['_threadCommentModel']['resolveComment'](_0x43e3d4,_0x28b8e4,_0x2950aa['id'],_0x1a1781[_0x255e18(0x13b)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x49cb55(_0x37c928)),p(0x1,_0x49cb55(_0x67d0d0)),p(0x2,_0x49cb55(_0xbdaef0)),p(0x3,_0x49cb55(_0x227d72))],S);const z=_0x563e4d(0x141),M={};var k=Object[_0x563e4d(0x125)],Q=(_0x127b8a,_0x336c8a,_0x4410a6,_0x488514)=>{for(var _0x153aaa=_0x488514>0x1?void 0x0:_0x488514?k(_0x336c8a,_0x4410a6):_0x336c8a,_0x306c57=_0x127b8a['length']-0x1,_0x53a69e;_0x306c57>=0x0;_0x306c57--)(_0x53a69e=_0x127b8a[_0x306c57])&&(_0x153aaa=_0x53a69e(_0x153aaa)||_0x153aaa);return _0x153aaa;},_=(_0x2c459a,_0x20ae9f)=>(_0x328939,_0x10ee30)=>_0x20ae9f(_0x328939,_0x10ee30,_0x2c459a);function X(_0x45a127,_0x3783cb){const _0x776827=_0x563e4d,_0x15e4ba=_0x45a127[_0x776827(0x15e)][0x0];return{..._0x3783cb,'id':_0x15e4ba[_0x776827(0x100)],'resolved':_0x45a127[_0x776827(0x13b)]===0x1,'dT':D(_0x15e4ba['createTimestamp']),'personId':_0x15e4ba[_0x776827(0x148)],'threadId':_0x15e4ba['threadId']};}function _0x3266(){const _0x1e8203=['customRanges','513648OlriFK','replyId','comments','1228YohBdd','Reply','parentId','1070202EwarOk','2AJCoFN','post','_commentService','_threadCommentDataSourceService','_injector','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','20UdjvQV','_userService','forEach','_httpService','code','userID','_initDataSource','Solve','addUser','UNIVER_UNKNOWN','delete','_init','syncUpdateMutationToColla','_sessionService','reply','/reply','_initUserSync','Edit','YYYY/MM/DD\x20HH:mm','type','content','length','_config','getOwnPropertyDescriptor','1771452AHIYfx','addComment','size','deleteComment','get','rangeId','parse','COMMENT','_threadCommentDataSource','threadId','symbol','resolved','user','4761YipRVF','2469760oxgvRV','map','body','add','listComments','error','/list','solved','/edit','351876qlDqAG','requireSession','stringify','onStarting','thread-comment-data-source.config','personId','disposeWithMe','rangeType','_threadCommentModel','slice','root','userId','defineProperty','UNRECOGNIZED','getUnit','pipe','updateComment','createTimestamp','commentUpdate$','getMemberID','filter','_configService','/delete','values','797233kqwORP','subscribe','Delete','format','/universer-api/comment/unit/','find','onReady','unitId','comment','replies','Solved','/universer-api/user/list','/add','dataSource','setConfig','pluginName'];_0x3266=function(){return _0x1e8203;};return _0x3266();}function ee(_0x1c2925,_0x3c62f4,_0x4611d8){const _0x409b0d=_0x563e4d;var _0x2c97cc,_0x1440eb;if(((_0x1440eb=(_0x2c97cc=_0x1c2925==null?void 0x0:_0x1c2925[_0x409b0d(0x15e)])==null?void 0x0:_0x2c97cc['length'])!=null?_0x1440eb:0x0)>0x0){const _0x3e535f=(_0x2f0b1c,_0xee1674)=>({'id':_0x2f0b1c[_0x409b0d(0x100)],'threadId':_0x2f0b1c[_0x409b0d(0x12f)],'dT':D(_0x2f0b1c[_0x409b0d(0x14e)]),'personId':_0x2f0b1c['userId'],'resolved':_0x1c2925[_0x409b0d(0x13b)]===I[_0x409b0d(0x15f)],'unitId':_0x3c62f4,'subUnitId':_0x4611d8,'text':JSON['parse'](_0x2f0b1c[_0x409b0d(0x122)]),'parentId':_0xee1674}),_0x40a450=_0x3e535f(_0x1c2925[_0x409b0d(0x15e)][0x0]);return{..._0x40a450,'children':_0x1c2925[_0x409b0d(0x15e)][_0x409b0d(0x146)](0x1)['map'](_0x245ad8=>_0x3e535f(_0x245ad8,_0x40a450['id']))};}return null;}let f=class{constructor(_0x2115e0,_0x1e97e7,_0x7b55d7,_0x5e53dc){const _0x4cde04=_0x563e4d;this['_httpService']=_0x2115e0,this[_0x4cde04(0x10f)]=_0x1e97e7,this[_0x4cde04(0x11b)]=_0x7b55d7,this[_0x4cde04(0x10a)]=_0x5e53dc;}async[_0x563e4d(0x127)](_0x2bb2e2){const _0x35a7cd=_0x563e4d;var _0x16d414,_0x26fff0;const {parentId:_0x2e6a0a,unitId:_0x1e85b1,text:_0x307238,threadId:_0x1c28da}=_0x2bb2e2,_0x46354e=(_0x26fff0=(_0x16d414=_0x307238[_0x35a7cd(0xfe)])==null?void 0x0:_0x16d414['filter'](_0x4f1003=>_0x4f1003[_0x35a7cd(0x144)]===_0xacacc4[_0x35a7cd(0x12d)])[_0x35a7cd(0x135)](_0x5ccc68=>_0x5ccc68['rangeId']))!=null?_0x26fff0:[],_0x38d34a=JSON['stringify'](_0x307238),_0x30fedb=(await this['_sessionService'][_0x35a7cd(0x13e)](_0x1e85b1))[_0x35a7cd(0x150)]();if(_0x2e6a0a){const _0x4ff696={'memberId':_0x30fedb,'unitId':_0x1e85b1,'content':_0x38d34a,'mention':_0x46354e,'threadId':_0x1c28da},_0x41a58e=(await this[_0x35a7cd(0x111)][_0x35a7cd(0x107)](_0x35a7cd(0x159)+_0x1e85b1+_0x35a7cd(0x11d),{'body':_0x4ff696}))[_0x35a7cd(0x136)][_0x35a7cd(0x11c)];return{..._0x2bb2e2,'id':_0x41a58e[_0x35a7cd(0x100)],'dT':_0x2319f2(+_0x41a58e[_0x35a7cd(0x14e)])['format'](_0x35a7cd(0x120)),'personId':_0x41a58e[_0x35a7cd(0x148)]};}else{const _0x2c9634={'memberId':_0x30fedb,'unitId':_0x1e85b1,'content':_0x38d34a,'mention':_0x46354e},_0x5e1753=await this[_0x35a7cd(0x111)][_0x35a7cd(0x107)]('/universer-api/comment/unit/'+_0x1e85b1+_0x35a7cd(0x161),{'body':_0x2c9634});return X(_0x5e1753[_0x35a7cd(0x136)][_0x35a7cd(0x15d)],_0x2bb2e2);}}async[_0x563e4d(0x14d)](_0xa475e0){const _0x4a6b8c=_0x563e4d;var _0x209897,_0x2a9dfa;const {text:_0x1ddf2d,unitId:_0x1aa674}=_0xa475e0,_0x14f60b=(_0x2a9dfa=(_0x209897=_0x1ddf2d[_0x4a6b8c(0xfe)])==null?void 0x0:_0x209897[_0x4a6b8c(0x151)](_0xebb845=>_0xebb845[_0x4a6b8c(0x144)]===_0xacacc4[_0x4a6b8c(0x12d)])[_0x4a6b8c(0x135)](_0x44a1a6=>_0x44a1a6[_0x4a6b8c(0x12b)]))!=null?_0x2a9dfa:[],_0x3de328=JSON[_0x4a6b8c(0x13f)](_0x1ddf2d),_0x134cb4=_0xa475e0[_0x4a6b8c(0x12f)],_0x48110a=_0xa475e0['id'],_0x5d9002={'memberId':(await this[_0x4a6b8c(0x11b)][_0x4a6b8c(0x13e)](_0x1aa674))[_0x4a6b8c(0x150)](),'unitId':_0x1aa674,'threadId':_0x134cb4,'mention':_0x14f60b,'content':_0x3de328,'replyId':_0x48110a},_0x227d6a=await this[_0x4a6b8c(0x111)]['post'](_0x4a6b8c(0x159)+_0x1aa674+_0x4a6b8c(0x13c),{'body':_0x5d9002});return!_0x227d6a[_0x4a6b8c(0x136)][_0x4a6b8c(0x139)]||_0x227d6a[_0x4a6b8c(0x136)][_0x4a6b8c(0x139)]['code']===0x1;}async['resolveComment'](_0x11767f){const _0x3d247b=_0x563e4d,{unitId:_0x49dd6f}=_0x11767f,_0x7f61e1=_0x11767f[_0x3d247b(0x12f)],_0xf1e2bc={'memberId':this[_0x3d247b(0x10f)]['getCurrentUser']()[_0x3d247b(0x113)],'unitId':_0x49dd6f,'threadId':_0x7f61e1,'solved':_0x11767f[_0x3d247b(0x131)]?I['Solved']:I['OpenOrReOpen']},_0x482743=await this['_httpService'][_0x3d247b(0x107)](_0x3d247b(0x159)+_0x49dd6f+'/solved',{'body':_0xf1e2bc});return!_0x482743[_0x3d247b(0x136)][_0x3d247b(0x139)]||_0x482743[_0x3d247b(0x136)][_0x3d247b(0x139)][_0x3d247b(0x112)]===0x1;}async[_0x563e4d(0x129)](_0x337c88,_0x2bef6e,_0x2e2e0c,_0x58dab9){const _0x2e25c5=_0x563e4d,_0xae17f8={'memberId':(await this[_0x2e25c5(0x11b)]['requireSession'](_0x337c88))[_0x2e25c5(0x150)](),'threadId':_0x2e2e0c,'replyId':_0x58dab9,'unitId':_0x337c88},_0x3900ab=await this[_0x2e25c5(0x111)][_0x2e25c5(0x107)](_0x2e25c5(0x159)+_0x337c88+_0x2e25c5(0x153),{'body':_0xae17f8});return!_0x3900ab['body'][_0x2e25c5(0x139)]||_0x3900ab[_0x2e25c5(0x136)]['error']['code']===0x1;}async[_0x563e4d(0x138)](_0x44636b,_0x2751bf,_0x437ccd){const _0x1e0968=_0x563e4d,_0x4a3189={'unitId':_0x44636b,'threadId':_0x437ccd},_0x6af455=await this[_0x1e0968(0x111)][_0x1e0968(0x107)](_0x1e0968(0x159)+_0x44636b+_0x1e0968(0x13a),{'body':_0x4a3189}),_0x422c90=_0x437ccd['map'](_0x1be2d5=>ee(_0x6af455['body'][_0x1e0968(0x101)][_0x1be2d5],_0x44636b,_0x2751bf))[_0x1e0968(0x151)](Boolean);return Object[_0x1e0968(0x154)](_0x6af455['body'][_0x1e0968(0x10d)])['forEach'](_0xf6eca4=>{this['_userService']['addUser'](_0xf6eca4);}),_0x422c90;}['saveCommentToSnapshot'](_0x36632b){const _0x1a787b=_0x563e4d;return{'id':_0x36632b['id'],'threadId':_0x36632b[_0x1a787b(0x12f)],'ref':_0x36632b['ref']};}};f=Q([_(0x0,_0x49cb55(_0x686b7a)),_(0x1,_0x49cb55(_0xbdaef0)),_(0x2,_0x49cb55(_0xebc7db)),_(0x3,_0x49cb55(_0x227d72))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x5da473,_0x20c2f3,_0x4fd4a7,_0x254646)=>{const _0x20c9be=_0x563e4d;for(var _0x7f7b12=_0x254646>0x1?void 0x0:_0x254646?re(_0x20c2f3,_0x4fd4a7):_0x20c2f3,_0x457e63=_0x5da473[_0x20c9be(0x123)]-0x1,_0x7e90c7;_0x457e63>=0x0;_0x457e63--)(_0x7e90c7=_0x5da473[_0x457e63])&&(_0x7f7b12=_0x7e90c7(_0x7f7b12)||_0x7f7b12);return _0x7f7b12;},N=(_0xe8c6ad,_0x15c3d0)=>(_0x1eaf06,_0x184ddd)=>_0x15c3d0(_0x1eaf06,_0x184ddd,_0xe8c6ad);let g=class extends _0x58abef{constructor(_0x325de8,_0x1e1037){const _0x3e8271=_0x563e4d;super(),this[_0x3e8271(0x109)]=_0x325de8,this[_0x3e8271(0x12e)]=_0x1e1037,this['_initDataSource']();}[_0x563e4d(0x114)](){const _0x2ef894=_0x563e4d;this[_0x2ef894(0x109)][_0x2ef894(0x162)]=this['_threadCommentDataSource'],this[_0x2ef894(0x109)][_0x2ef894(0x11a)]=!0x1;}};g=te([N(0x0,_0x23bb20),N(0x1,_0x49cb55(f))],g);var se=Object[_0x563e4d(0x149)],oe=Object[_0x563e4d(0x125)],ne=(_0x21cb71,_0x13e3a4,_0x31a1b2)=>_0x13e3a4 in _0x21cb71?se(_0x21cb71,_0x13e3a4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31a1b2}):_0x21cb71[_0x13e3a4]=_0x31a1b2,ie=(_0x4f46ee,_0x21233f,_0x5bbe69,_0x2d5aaf)=>{for(var _0x15e3ca=_0x2d5aaf>0x1?void 0x0:_0x2d5aaf?oe(_0x21233f,_0x5bbe69):_0x21233f,_0x942d30=_0x4f46ee['length']-0x1,_0x18f7e5;_0x942d30>=0x0;_0x942d30--)(_0x18f7e5=_0x4f46ee[_0x942d30])&&(_0x15e3ca=_0x18f7e5(_0x15e3ca)||_0x15e3ca);return _0x15e3ca;},w=(_0x2a6f20,_0x4a9c25)=>(_0x1b784e,_0x168af3)=>_0x4a9c25(_0x1b784e,_0x168af3,_0x2a6f20),$=(_0xf12e98,_0x610400,_0x17103b)=>ne(_0xf12e98,typeof _0x610400!=_0x563e4d(0x130)?_0x610400+'':_0x610400,_0x17103b);function _0x2d1b(_0x3cb162,_0x2c1da5){const _0x3266c0=_0x3266();return _0x2d1b=function(_0x2d1b37,_0xb28dc4){_0x2d1b37=_0x2d1b37-0xfd;let _0x2dce20=_0x3266c0[_0x2d1b37];return _0x2dce20;},_0x2d1b(_0x3cb162,_0x2c1da5);}let b=class extends _0x15ce6a{constructor(_0x46ca7e=M,_0x43a563,_0x16ddef){const _0x21af81=_0x563e4d;super(),this[_0x21af81(0x124)]=_0x46ca7e,this[_0x21af81(0x10a)]=_0x43a563,this[_0x21af81(0x152)]=_0x16ddef;const {..._0x11d1c4}=_0xfa84a5({},M,this[_0x21af81(0x124)]);this[_0x21af81(0x152)][_0x21af81(0x163)](z,_0x11d1c4);}[_0x563e4d(0x140)](){const _0x995b2d=_0x563e4d;[[f],[g],[S]][_0x995b2d(0x110)](_0x537c59=>{const _0x1bf2a0=_0x995b2d;this[_0x1bf2a0(0x10a)][_0x1bf2a0(0x137)](_0x537c59);});}[_0x563e4d(0x15b)](){const _0x3a4329=_0x563e4d;this[_0x3a4329(0x10a)]['get'](g),this[_0x3a4329(0x10a)][_0x3a4329(0x12a)](S);}};$(b,_0x563e4d(0xfd),W),$(b,_0x563e4d(0x121),_0x31d14d[_0x563e4d(0x117)]),b=ie([_0x20dfb6(_0x26a489,_0x26ed2b,_0x2daddd),w(0x1,_0x49cb55(_0x227d72)),w(0x2,_0x5470ab)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x147f(){const _0x260b96=['Module','toStringTag','customRanges','38924ienvlw','UniverThreadCommentDataSourcePlugin','object','post','subscribe','thread-comment-data-source.config','UniverCollaborationClientPlugin','user','map','code','UNIVER_UNKNOWN','_threadCommentDataSourceService','body','_initUserSync','payload','resolved','rangeType','455gYxlLO','getUser','8755848hVKZqX','Solve','forEach','CollaborationSessionService','@univerjs/network','COMMENT','setConfig','commentUpdate$','getComment','stringify','Reply','getOwnPropertyDescriptor','3072ocuXvx','filter','_threadCommentDataSource','8114701CDkWIV','UniverProCollaborationClient','rxjs','users','updateComment','amd','Inject','unitId','IConfigService','@univerjs-pro/license','CustomRangeType','Solved','15545060eTJnCi','Edit','values','addUser','/reply','HTTPService','ThreadCommentModel','_init','IThreadCommentDataSourceService','exports','/add','replies','defineProperty','Injector','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','solved','type','find','onStarting','parentId','_httpService','pipe','getUnit','Delete','comment','3610884LXxGER','_commentService','@univerjs/core','function','dayjs','Add','format','getMemberID','UniverThreadCommentUi','/universer-api/comment/unit/','_configService','createTimestamp','threadId','syncUpdateMutationToColla','deleteComment','replyId','getCurrentUser','UserManagerService','_config','Disposable','/list','UniverNetwork','length','/delete','CommentService','UniverLicensePlugin','dataSource','730026IHgWTc','_initDataSource','UNRECOGNIZED','UniverInstanceType','Unknown','YYYY/MM/DD\x20HH:mm','error','content','requireSession','UniverThreadCommentUIPlugin','addComment','get','_userService','_sessionService','_injector','UniverThreadComment','disposeWithMe','size','root','DependentOn','OpenOrReOpen','@univerjs/thread-comment','1548WfMIow','add','userId','personId','9DkYgFN','_threadCommentModel','ref','userID','listComments','merge','parse','rangeId','resolveComment'];_0x147f=function(){return _0x260b96;};return _0x147f();}function _0x45cd(_0x4d1d4b,_0x457dbf){const _0x147f57=_0x147f();return _0x45cd=function(_0x45cd85,_0x2b82e7){_0x45cd85=_0x45cd85-0x1a3;let _0x1d4d44=_0x147f57[_0x45cd85];return _0x1d4d44;},_0x45cd(_0x4d1d4b,_0x457dbf);}(function(_0x40fc22,_0x597503){const _0x4cc68f=_0x45cd,_0x34ca1a=_0x40fc22();while(!![]){try{const _0x263b3e=-parseInt(_0x4cc68f(0x1c5))/0x1+parseInt(_0x4cc68f(0x20a))/0x2*(-parseInt(_0x4cc68f(0x1db))/0x3)+-parseInt(_0x4cc68f(0x1eb))/0x4*(-parseInt(_0x4cc68f(0x1fc))/0x5)+parseInt(_0x4cc68f(0x1aa))/0x6+parseInt(_0x4cc68f(0x20d))/0x7+parseInt(_0x4cc68f(0x1fe))/0x8+-parseInt(_0x4cc68f(0x1df))/0x9*(parseInt(_0x4cc68f(0x219))/0xa);if(_0x263b3e===_0x597503)break;else _0x34ca1a['push'](_0x34ca1a['shift']());}catch(_0x4ca30d){_0x34ca1a['push'](_0x34ca1a['shift']());}}}(_0x147f,0xa218f),function(_0x57aaf5,_0x5d0bc4){const _0x727513=_0x45cd;typeof exports==_0x727513(0x1ed)&&typeof module<'u'?_0x5d0bc4(exports,require(_0x727513(0x227)),require(_0x727513(0x216)),require(_0x727513(0x1ac)),require(_0x727513(0x228)),require('@univerjs/thread-comment'),require(_0x727513(0x20f)),require(_0x727513(0x202))):typeof define==_0x727513(0x1ad)&&define[_0x727513(0x212)]?define([_0x727513(0x222),_0x727513(0x227),'@univerjs-pro/license',_0x727513(0x1ac),'@univerjs/thread-comment-ui',_0x727513(0x1da),'rxjs','@univerjs/network'],_0x5d0bc4):(_0x57aaf5=typeof globalThis<'u'?globalThis:_0x57aaf5||self,_0x5d0bc4(_0x57aaf5['UniverProThreadCommentDatasource']={},_0x57aaf5[_0x727513(0x20e)],_0x57aaf5['UniverProLicense'],_0x57aaf5['UniverCore'],_0x57aaf5[_0x727513(0x1b2)],_0x57aaf5[_0x727513(0x1d4)],_0x57aaf5[_0x727513(0x20f)],_0x57aaf5[_0x727513(0x1bf)]));}(this,function(_0x2ca9dc,_0xdde3f0,_0x342b2f,_0x42ade5,_0x3f2565,_0x31b875,_0x4610b3,_0x30ffd7){'use strict';const _0x513199=_0x45cd;const _0x1cae8b='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x340980=(_0x220257=>(_0x220257[_0x220257['OpenOrReOpen']=0x0]=_0x513199(0x1d9),_0x220257[_0x220257[_0x513199(0x218)]=0x1]=_0x513199(0x218),_0x220257[_0x220257['UNRECOGNIZED']=-0x1]=_0x513199(0x1c7),_0x220257))(_0x340980||{}),_0x5d8fbd=(_0x4a7565=>(_0x4a7565[_0x4a7565[_0x513199(0x1c9)]=0x0]='Unknown',_0x4a7565[_0x4a7565[_0x513199(0x1af)]=0x1]=_0x513199(0x1af),_0x4a7565[_0x4a7565['Reply']=0x2]=_0x513199(0x208),_0x4a7565[_0x4a7565['Edit']=0x3]=_0x513199(0x21a),_0x4a7565[_0x4a7565[_0x513199(0x1a8)]=0x4]=_0x513199(0x1a8),_0x4a7565[_0x4a7565['Solve']=0x5]=_0x513199(0x1ff),_0x4a7565[_0x4a7565['UNRECOGNIZED']=-0x1]=_0x513199(0x1c7),_0x4a7565))(_0x5d8fbd||{});const _0x5de0ca=_0x305ce9=>_0x42ade5[_0x513199(0x1ae)](new Date(+_0x305ce9))[_0x513199(0x1b0)](_0x513199(0x1ca)),_0x5a9ba1=async(_0x40d043,_0x4d9b09)=>{const _0x2ddc71=_0x513199,_0x4f7cae=_0x40d043[_0x2ddc71(0x1d0)](_0x42ade5[_0x2ddc71(0x1bb)]),_0x330d1b=_0x40d043[_0x2ddc71(0x1d0)](_0x30ffd7[_0x2ddc71(0x21e)]);_0x4d9b09[_0x2ddc71(0x200)](_0x39186c=>{const _0x3faef9=_0x2ddc71;_0x4f7cae[_0x3faef9(0x1fd)](_0x39186c)&&_0x4d9b09['delete'](_0x39186c);}),_0x4d9b09[_0x2ddc71(0x1d6)]&&(await _0x330d1b[_0x2ddc71(0x1d0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4d9b09]}}))['body'][_0x2ddc71(0x210)][_0x2ddc71(0x200)](_0x47626b=>{const _0x2d708d=_0x2ddc71;_0x47626b&&_0x4f7cae[_0x2d708d(0x21c)](_0x47626b);});};var _0x58e638=Object['getOwnPropertyDescriptor'],_0x414982=(_0x39bd5f,_0x9d5860,_0x494dbd,_0x33b7bc)=>{const _0x387c24=_0x513199;for(var _0x3c69f9=_0x33b7bc>0x1?void 0x0:_0x33b7bc?_0x58e638(_0x9d5860,_0x494dbd):_0x9d5860,_0x3a52bd=_0x39bd5f[_0x387c24(0x1c0)]-0x1,_0x2be10b;_0x3a52bd>=0x0;_0x3a52bd--)(_0x2be10b=_0x39bd5f[_0x3a52bd])&&(_0x3c69f9=_0x2be10b(_0x3c69f9)||_0x3c69f9);return _0x3c69f9;},_0x480f45=(_0x44715a,_0x175f0b)=>(_0x56e802,_0x1a6566)=>_0x175f0b(_0x56e802,_0x1a6566,_0x44715a);let _0x4386d9=class extends _0x42ade5['Disposable']{constructor(_0x57294b,_0x9847bb,_0x41cb23,_0x1f87a4){const _0x1d32e7=_0x513199;super(),this['_commentService']=_0x57294b,this[_0x1d32e7(0x1e0)]=_0x9847bb,this[_0x1d32e7(0x1d1)]=_0x41cb23,this[_0x1d32e7(0x1d3)]=_0x1f87a4,this[_0x1d32e7(0x220)](),this[_0x1d32e7(0x1f8)]();}[_0x513199(0x1f8)](){const _0x2f1c29=_0x513199;this[_0x2f1c29(0x1d5)](this[_0x2f1c29(0x1e0)]['commentUpdate$'][_0x2f1c29(0x1a6)](_0x4610b3['bufferTime'](0x10))[_0x2f1c29(0x1ef)](_0x4d1ce0=>{const _0x5b75b8=_0x2f1c29,_0x44d29c=new Set();_0x4d1ce0[_0x5b75b8(0x200)](_0x2450ac=>{const _0x1a8ae9=_0x5b75b8;switch(_0x2450ac['type']){case _0x1a8ae9(0x1dc):{const _0x9f4092=_0x2450ac[_0x1a8ae9(0x1f9)][_0x1a8ae9(0x1de)];_0x44d29c[_0x1a8ae9(0x1dc)](_0x9f4092);break;}}}),_0x5a9ba1(this[_0x5b75b8(0x1d3)],_0x44d29c);}));}['_init'](){const _0x1b87fc=_0x513199;this[_0x1b87fc(0x1d5)](this[_0x1b87fc(0x1ab)][_0x1b87fc(0x205)][_0x1b87fc(0x1ef)](async _0x4c1c4c=>{const _0x2eaabd=_0x1b87fc;var _0x14edc0,_0x26f608,_0x15b6e1,_0x53b9c0;const _0x570dac=(_0x14edc0=this[_0x2eaabd(0x1e0)]['getUnit'](_0x4c1c4c[_0x2eaabd(0x214)])['find'](_0x4f4f8b=>_0x4f4f8b[_0x2eaabd(0x1b6)]===_0x4c1c4c[_0x2eaabd(0x1b6)]))==null?void 0x0:_0x14edc0['root'];if(!_0x570dac)return;const {unitId:_0x33abaf,subUnitId:_0x29d9d5}=_0x570dac;switch(_0x4c1c4c[_0x2eaabd(0x1f2)]&&this[_0x2eaabd(0x1d1)][_0x2eaabd(0x21c)](_0x4c1c4c[_0x2eaabd(0x1f2)]),_0x4c1c4c[_0x2eaabd(0x22a)]){case _0x5d8fbd[_0x2eaabd(0x1af)]:break;case _0x5d8fbd['Reply']:{this[_0x2eaabd(0x1e0)][_0x2eaabd(0x1cf)](_0x33abaf,_0x29d9d5,{'unitId':_0x33abaf,'subUnitId':_0x29d9d5,'ref':'','id':_0x4c1c4c['replyId'],'dT':_0x5de0ca(+_0x4c1c4c[_0x2eaabd(0x1b5)]),'threadId':_0x4c1c4c[_0x2eaabd(0x1b6)],'personId':(_0x15b6e1=(_0x26f608=_0x4c1c4c['user'])==null?void 0x0:_0x26f608[_0x2eaabd(0x1e2)])!=null?_0x15b6e1:_0x4c1c4c[_0x2eaabd(0x1dd)],'text':JSON[_0x2eaabd(0x1e5)](_0x4c1c4c['content']),'parentId':_0x570dac['id']});break;}case _0x5d8fbd[_0x2eaabd(0x1a8)]:{const _0x22070b=this[_0x2eaabd(0x1e0)][_0x2eaabd(0x206)](_0x33abaf,_0x29d9d5,_0x4c1c4c[_0x2eaabd(0x1b9)]);_0x22070b&&_0x22070b[_0x2eaabd(0x1a4)]&&this[_0x2eaabd(0x1e0)][_0x2eaabd(0x1b8)](_0x33abaf,_0x29d9d5,_0x4c1c4c['replyId']);break;}case _0x5d8fbd['Edit']:{this[_0x2eaabd(0x1e0)]['updateComment'](_0x33abaf,_0x29d9d5,{'commentId':_0x4c1c4c[_0x2eaabd(0x1b9)],'text':JSON['parse'](_0x4c1c4c[_0x2eaabd(0x1cc)])});break;}case _0x5d8fbd[_0x2eaabd(0x1ff)]:{const _0x2f0b28=(_0x53b9c0=this['_threadCommentModel'][_0x2eaabd(0x1a7)](_0x4c1c4c[_0x2eaabd(0x214)])[_0x2eaabd(0x22b)](_0x77ac6e=>_0x77ac6e[_0x2eaabd(0x1b6)]===_0x4c1c4c[_0x2eaabd(0x1b6)]))==null?void 0x0:_0x53b9c0[_0x2eaabd(0x1d7)];_0x2f0b28&&this['_threadCommentModel'][_0x2eaabd(0x1e7)](_0x33abaf,_0x29d9d5,_0x2f0b28['id'],_0x4c1c4c[_0x2eaabd(0x229)]===_0x340980[_0x2eaabd(0x218)]);break;}}}));}};_0x4386d9=_0x414982([_0x480f45(0x0,_0x42ade5[_0x513199(0x213)](_0xdde3f0[_0x513199(0x1c2)])),_0x480f45(0x1,_0x42ade5['Inject'](_0x31b875[_0x513199(0x21f)])),_0x480f45(0x2,_0x42ade5[_0x513199(0x213)](_0x42ade5[_0x513199(0x1bb)])),_0x480f45(0x3,_0x42ade5['Inject'](_0x42ade5['Injector']))],_0x4386d9);const _0x420338=_0x513199(0x1f0),_0x2418e9={};var _0x3384f4=Object['getOwnPropertyDescriptor'],_0x358118=(_0x3d0b48,_0x3e334b,_0x47cdca,_0x3ff48d)=>{const _0x4feb7b=_0x513199;for(var _0x1626f8=_0x3ff48d>0x1?void 0x0:_0x3ff48d?_0x3384f4(_0x3e334b,_0x47cdca):_0x3e334b,_0x458a44=_0x3d0b48[_0x4feb7b(0x1c0)]-0x1,_0xf8fee;_0x458a44>=0x0;_0x458a44--)(_0xf8fee=_0x3d0b48[_0x458a44])&&(_0x1626f8=_0xf8fee(_0x1626f8)||_0x1626f8);return _0x1626f8;},_0x556599=(_0x4faa20,_0x40548a)=>(_0x1ba049,_0x2c3601)=>_0x40548a(_0x1ba049,_0x2c3601,_0x4faa20);function _0x6ad32e(_0x23f8ed,_0xf55af){const _0x4d58e0=_0x513199,_0x30141f=_0x23f8ed[_0x4d58e0(0x224)][0x0];return{..._0xf55af,'id':_0x30141f['replyId'],'resolved':_0x23f8ed[_0x4d58e0(0x229)]===0x1,'dT':_0x5de0ca(_0x30141f[_0x4d58e0(0x1b5)]),'personId':_0x30141f[_0x4d58e0(0x1dd)],'threadId':_0x30141f['threadId']};}function _0x1d798f(_0x1dd1eb,_0x2f828e,_0xca258){const _0x4ceff7=_0x513199;var _0x1f372b,_0x47f6a6;if(((_0x47f6a6=(_0x1f372b=_0x1dd1eb==null?void 0x0:_0x1dd1eb[_0x4ceff7(0x224)])==null?void 0x0:_0x1f372b[_0x4ceff7(0x1c0)])!=null?_0x47f6a6:0x0)>0x0){const _0x38f677=(_0x4d6e14,_0x2e7c02)=>({'id':_0x4d6e14[_0x4ceff7(0x1b9)],'threadId':_0x4d6e14[_0x4ceff7(0x1b6)],'dT':_0x5de0ca(_0x4d6e14[_0x4ceff7(0x1b5)]),'personId':_0x4d6e14[_0x4ceff7(0x1dd)],'resolved':_0x1dd1eb[_0x4ceff7(0x229)]===_0x340980[_0x4ceff7(0x218)],'unitId':_0x2f828e,'subUnitId':_0xca258,'text':JSON[_0x4ceff7(0x1e5)](_0x4d6e14[_0x4ceff7(0x1cc)]),'parentId':_0x2e7c02}),_0x3e7e5c=_0x38f677(_0x1dd1eb[_0x4ceff7(0x224)][0x0]);return{..._0x3e7e5c,'children':_0x1dd1eb[_0x4ceff7(0x224)]['slice'](0x1)[_0x4ceff7(0x1f3)](_0x4bc3d1=>_0x38f677(_0x4bc3d1,_0x3e7e5c['id']))};}return null;}let _0xe0f43=class{constructor(_0x41834d,_0x4ba390,_0x435c78,_0x228242){const _0x19cca8=_0x513199;this[_0x19cca8(0x1a5)]=_0x41834d,this[_0x19cca8(0x1d1)]=_0x4ba390,this[_0x19cca8(0x1d2)]=_0x435c78,this['_injector']=_0x228242;}async[_0x513199(0x1cf)](_0xdf41a0){const _0x2af097=_0x513199;var _0x58591d,_0x228474;const {parentId:_0x1d21ca,unitId:_0x2963f1,text:_0x39db0d,threadId:_0x4c4b04}=_0xdf41a0,_0x537d82=(_0x228474=(_0x58591d=_0x39db0d['customRanges'])==null?void 0x0:_0x58591d['filter'](_0x42cd1f=>_0x42cd1f[_0x2af097(0x1fb)]===_0x42ade5[_0x2af097(0x217)][_0x2af097(0x203)])[_0x2af097(0x1f3)](_0x2c6a56=>_0x2c6a56['rangeId']))!=null?_0x228474:[],_0x3c123b=JSON[_0x2af097(0x207)](_0x39db0d),_0xc115c2=(await this[_0x2af097(0x1d2)][_0x2af097(0x1cd)](_0x2963f1))['getMemberID']();if(_0x1d21ca){const _0x50544f={'memberId':_0xc115c2,'unitId':_0x2963f1,'content':_0x3c123b,'mention':_0x537d82,'threadId':_0x4c4b04},_0x31df3f=(await this[_0x2af097(0x1a5)][_0x2af097(0x1ee)](_0x2af097(0x1b3)+_0x2963f1+_0x2af097(0x21d),{'body':_0x50544f}))['body']['reply'];return{..._0xdf41a0,'id':_0x31df3f[_0x2af097(0x1b9)],'dT':_0x42ade5[_0x2af097(0x1ae)](+_0x31df3f[_0x2af097(0x1b5)])[_0x2af097(0x1b0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x31df3f[_0x2af097(0x1dd)]};}else{const _0x277be2={'memberId':_0xc115c2,'unitId':_0x2963f1,'content':_0x3c123b,'mention':_0x537d82},_0x358361=await this[_0x2af097(0x1a5)]['post'](_0x2af097(0x1b3)+_0x2963f1+_0x2af097(0x223),{'body':_0x277be2});return _0x6ad32e(_0x358361[_0x2af097(0x1f7)][_0x2af097(0x1a9)],_0xdf41a0);}}async[_0x513199(0x211)](_0x1f5aaa){const _0x32f34b=_0x513199;var _0x30d6d3,_0x2d47d5;const {text:_0x51deac,unitId:_0x4163a8}=_0x1f5aaa,_0x54b8a7=(_0x2d47d5=(_0x30d6d3=_0x51deac[_0x32f34b(0x1ea)])==null?void 0x0:_0x30d6d3[_0x32f34b(0x20b)](_0x5d9c2e=>_0x5d9c2e[_0x32f34b(0x1fb)]===_0x42ade5[_0x32f34b(0x217)]['COMMENT'])['map'](_0xdb530a=>_0xdb530a[_0x32f34b(0x1e6)]))!=null?_0x2d47d5:[],_0xed512e=JSON[_0x32f34b(0x207)](_0x51deac),_0x1e7a30=_0x1f5aaa[_0x32f34b(0x1b6)],_0x5388e4=_0x1f5aaa['id'],_0x26129f={'memberId':(await this[_0x32f34b(0x1d2)]['requireSession'](_0x4163a8))[_0x32f34b(0x1b1)](),'unitId':_0x4163a8,'threadId':_0x1e7a30,'mention':_0x54b8a7,'content':_0xed512e,'replyId':_0x5388e4},_0x20e0fa=await this['_httpService'][_0x32f34b(0x1ee)](_0x32f34b(0x1b3)+_0x4163a8+'/edit',{'body':_0x26129f});return!_0x20e0fa['body'][_0x32f34b(0x1cb)]||_0x20e0fa[_0x32f34b(0x1f7)][_0x32f34b(0x1cb)]['code']===0x1;}async[_0x513199(0x1e7)](_0x190f65){const _0x5e8a2d=_0x513199,{unitId:_0x49f86d}=_0x190f65,_0xacded4=_0x190f65[_0x5e8a2d(0x1b6)],_0x4fa737={'memberId':this['_userService'][_0x5e8a2d(0x1ba)]()[_0x5e8a2d(0x1e2)],'unitId':_0x49f86d,'threadId':_0xacded4,'solved':_0x190f65[_0x5e8a2d(0x1fa)]?_0x340980[_0x5e8a2d(0x218)]:_0x340980[_0x5e8a2d(0x1d9)]},_0x4ba80b=await this[_0x5e8a2d(0x1a5)][_0x5e8a2d(0x1ee)](_0x5e8a2d(0x1b3)+_0x49f86d+'/solved',{'body':_0x4fa737});return!_0x4ba80b[_0x5e8a2d(0x1f7)]['error']||_0x4ba80b[_0x5e8a2d(0x1f7)][_0x5e8a2d(0x1cb)][_0x5e8a2d(0x1f4)]===0x1;}async[_0x513199(0x1b8)](_0x38fdf6,_0x104674,_0x3ed404,_0xc648ce){const _0x114d59=_0x513199,_0x425b0d={'memberId':(await this[_0x114d59(0x1d2)][_0x114d59(0x1cd)](_0x38fdf6))['getMemberID'](),'threadId':_0x3ed404,'replyId':_0xc648ce,'unitId':_0x38fdf6},_0x1836c0=await this[_0x114d59(0x1a5)]['post'](_0x114d59(0x1b3)+_0x38fdf6+_0x114d59(0x1c1),{'body':_0x425b0d});return!_0x1836c0[_0x114d59(0x1f7)]['error']||_0x1836c0['body'][_0x114d59(0x1cb)][_0x114d59(0x1f4)]===0x1;}async[_0x513199(0x1e3)](_0x57e88a,_0x58fbff,_0x2a58c7){const _0x4974be=_0x513199,_0x5c8708={'unitId':_0x57e88a,'threadId':_0x2a58c7},_0x1fcf28=await this[_0x4974be(0x1a5)]['post'](_0x4974be(0x1b3)+_0x57e88a+_0x4974be(0x1be),{'body':_0x5c8708}),_0xb30f72=_0x2a58c7['map'](_0x1c7a57=>_0x1d798f(_0x1fcf28['body']['comments'][_0x1c7a57],_0x57e88a,_0x58fbff))[_0x4974be(0x20b)](Boolean);return Object[_0x4974be(0x21b)](_0x1fcf28[_0x4974be(0x1f7)][_0x4974be(0x210)])[_0x4974be(0x200)](_0x32a38a=>{const _0x4cd5a4=_0x4974be;this[_0x4cd5a4(0x1d1)][_0x4cd5a4(0x21c)](_0x32a38a);}),_0xb30f72;}['saveCommentToSnapshot'](_0xd312a){const _0x74a5d7=_0x513199;return{'id':_0xd312a['id'],'threadId':_0xd312a[_0x74a5d7(0x1b6)],'ref':_0xd312a[_0x74a5d7(0x1e1)]};}};_0xe0f43=_0x358118([_0x556599(0x0,_0x42ade5[_0x513199(0x213)](_0x30ffd7[_0x513199(0x21e)])),_0x556599(0x1,_0x42ade5[_0x513199(0x213)](_0x42ade5['UserManagerService'])),_0x556599(0x2,_0x42ade5[_0x513199(0x213)](_0xdde3f0[_0x513199(0x201)])),_0x556599(0x3,_0x42ade5['Inject'](_0x42ade5['Injector']))],_0xe0f43);var _0x4d5a25=Object[_0x513199(0x209)],_0x153c09=(_0x3ea0a2,_0x29234e,_0x22e882,_0x1d5632)=>{for(var _0x4b3810=_0x1d5632>0x1?void 0x0:_0x1d5632?_0x4d5a25(_0x29234e,_0x22e882):_0x29234e,_0x1aacc8=_0x3ea0a2['length']-0x1,_0x4203c8;_0x1aacc8>=0x0;_0x1aacc8--)(_0x4203c8=_0x3ea0a2[_0x1aacc8])&&(_0x4b3810=_0x4203c8(_0x4b3810)||_0x4b3810);return _0x4b3810;},_0x18e140=(_0x315f69,_0x1cf3bb)=>(_0x24db0e,_0x569486)=>_0x1cf3bb(_0x24db0e,_0x569486,_0x315f69);let _0x2cf4c1=class extends _0x42ade5[_0x513199(0x1bd)]{constructor(_0x370774,_0x2b39fe){const _0x2264ab=_0x513199;super(),this[_0x2264ab(0x1f6)]=_0x370774,this[_0x2264ab(0x20c)]=_0x2b39fe,this[_0x2264ab(0x1c6)]();}[_0x513199(0x1c6)](){const _0x453909=_0x513199;this[_0x453909(0x1f6)][_0x453909(0x1c4)]=this['_threadCommentDataSource'],this[_0x453909(0x1f6)][_0x453909(0x1b7)]=!0x1;}};_0x2cf4c1=_0x153c09([_0x18e140(0x0,_0x31b875[_0x513199(0x221)]),_0x18e140(0x1,_0x42ade5['Inject'](_0xe0f43))],_0x2cf4c1);var _0x43b251=Object['defineProperty'],_0x53cbd6=Object[_0x513199(0x209)],_0x39b733=(_0x2b02d8,_0x59cf35,_0x6d9b8)=>_0x59cf35 in _0x2b02d8?_0x43b251(_0x2b02d8,_0x59cf35,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6d9b8}):_0x2b02d8[_0x59cf35]=_0x6d9b8,_0x3052f4=(_0x57a667,_0xc51ff6,_0x2bf004,_0x3c521b)=>{const _0x152218=_0x513199;for(var _0x149192=_0x3c521b>0x1?void 0x0:_0x3c521b?_0x53cbd6(_0xc51ff6,_0x2bf004):_0xc51ff6,_0x5893e6=_0x57a667[_0x152218(0x1c0)]-0x1,_0x4baf34;_0x5893e6>=0x0;_0x5893e6--)(_0x4baf34=_0x57a667[_0x5893e6])&&(_0x149192=_0x4baf34(_0x149192)||_0x149192);return _0x149192;},_0xf62f8d=(_0x3aadd5,_0x105a40)=>(_0x4f55e6,_0x316448)=>_0x105a40(_0x4f55e6,_0x316448,_0x3aadd5),_0x2ed856=(_0x22e39f,_0x45240b,_0x448726)=>_0x39b733(_0x22e39f,typeof _0x45240b!='symbol'?_0x45240b+'':_0x45240b,_0x448726);_0x2ca9dc['UniverThreadCommentDataSourcePlugin']=class extends _0x42ade5['Plugin']{constructor(_0x2ad00d=_0x2418e9,_0x935ed6,_0x5cd5ea){const _0x46c841=_0x513199;super(),this[_0x46c841(0x1bc)]=_0x2ad00d,this['_injector']=_0x935ed6,this[_0x46c841(0x1b4)]=_0x5cd5ea;const {..._0x3843ed}=_0x42ade5[_0x46c841(0x1e4)]({},_0x2418e9,this[_0x46c841(0x1bc)]);this[_0x46c841(0x1b4)][_0x46c841(0x204)](_0x420338,_0x3843ed);}[_0x513199(0x1a3)](){[[_0xe0f43],[_0x2cf4c1],[_0x4386d9]]['forEach'](_0x38c1b7=>{const _0x124c8e=_0x45cd;this[_0x124c8e(0x1d3)]['add'](_0x38c1b7);});}['onReady'](){const _0x4d1717=_0x513199;this[_0x4d1717(0x1d3)][_0x4d1717(0x1d0)](_0x2cf4c1),this[_0x4d1717(0x1d3)][_0x4d1717(0x1d0)](_0x4386d9);}},_0x2ed856(_0x2ca9dc['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1cae8b),_0x2ed856(_0x2ca9dc[_0x513199(0x1ec)],_0x513199(0x22a),_0x42ade5[_0x513199(0x1c8)][_0x513199(0x1f5)]),_0x2ca9dc[_0x513199(0x1ec)]=_0x3052f4([_0x42ade5[_0x513199(0x1d8)](_0x3f2565[_0x513199(0x1ce)],_0xdde3f0[_0x513199(0x1f1)],_0x342b2f[_0x513199(0x1c3)]),_0xf62f8d(0x1,_0x42ade5[_0x513199(0x213)](_0x42ade5[_0x513199(0x226)])),_0xf62f8d(0x2,_0x42ade5[_0x513199(0x215)])],_0x2ca9dc[_0x513199(0x1ec)]),Object[_0x513199(0x225)](_0x2ca9dc,Symbol[_0x513199(0x1e9)],{'value':_0x513199(0x1e8)});}));
|
|
1
|
+
function _0x2b57(_0x4634df,_0x595b1d){const _0x4ce23f=_0x4ce2();return _0x2b57=function(_0x2b573d,_0x59a369){_0x2b573d=_0x2b573d-0x158;let _0x955630=_0x4ce23f[_0x2b573d];return _0x955630;},_0x2b57(_0x4634df,_0x595b1d);}(function(_0x16bf3e,_0x3a6428){const _0x41fedc=_0x2b57,_0x164e83=_0x16bf3e();while(!![]){try{const _0x4a5989=-parseInt(_0x41fedc(0x1cf))/0x1*(parseInt(_0x41fedc(0x18e))/0x2)+parseInt(_0x41fedc(0x190))/0x3*(-parseInt(_0x41fedc(0x1a9))/0x4)+parseInt(_0x41fedc(0x166))/0x5*(-parseInt(_0x41fedc(0x1a2))/0x6)+-parseInt(_0x41fedc(0x1b2))/0x7+-parseInt(_0x41fedc(0x1dc))/0x8+-parseInt(_0x41fedc(0x198))/0x9+-parseInt(_0x41fedc(0x18b))/0xa*(-parseInt(_0x41fedc(0x174))/0xb);if(_0x4a5989===_0x3a6428)break;else _0x164e83['push'](_0x164e83['shift']());}catch(_0xa8a8a1){_0x164e83['push'](_0x164e83['shift']());}}}(_0x4ce2,0x82948),function(_0xde43d3,_0xcfb7d){const _0x504bc=_0x2b57;typeof exports==_0x504bc(0x199)&&typeof module<'u'?_0xcfb7d(exports,require(_0x504bc(0x162)),require(_0x504bc(0x173)),require(_0x504bc(0x17f)),require(_0x504bc(0x1ad)),require(_0x504bc(0x19e)),require(_0x504bc(0x1a5)),require(_0x504bc(0x1da))):typeof define==_0x504bc(0x16d)&&define[_0x504bc(0x164)]?define([_0x504bc(0x1e0),'@univerjs-pro/collaboration-client',_0x504bc(0x173),_0x504bc(0x17f),_0x504bc(0x1ad),_0x504bc(0x19e),'rxjs',_0x504bc(0x1da)],_0xcfb7d):(_0xde43d3=typeof globalThis<'u'?globalThis:_0xde43d3||self,_0xcfb7d(_0xde43d3['UniverProThreadCommentDatasource']={},_0xde43d3[_0x504bc(0x183)],_0xde43d3[_0x504bc(0x1db)],_0xde43d3['UniverCore'],_0xde43d3['UniverThreadCommentUi'],_0xde43d3['UniverThreadComment'],_0xde43d3[_0x504bc(0x1a5)],_0xde43d3[_0x504bc(0x1d9)]));}(this,function(_0x54b517,_0x506598,_0x127fbe,_0x144298,_0x2afa75,_0x28671d,_0x69c7f7,_0x3db2f3){'use strict';const _0xd08b78=_0x2b57;const _0x4a5494=_0xd08b78(0x196);var _0x226b4d=(_0x709c29=>(_0x709c29[_0x709c29[_0xd08b78(0x175)]=0x0]=_0xd08b78(0x175),_0x709c29[_0x709c29[_0xd08b78(0x1c2)]=0x1]='Solved',_0x709c29[_0x709c29[_0xd08b78(0x1c0)]=-0x1]=_0xd08b78(0x1c0),_0x709c29))(_0x226b4d||{}),_0x4c02dc=(_0x1f4f68=>(_0x1f4f68[_0x1f4f68[_0xd08b78(0x1d0)]=0x0]=_0xd08b78(0x1d0),_0x1f4f68[_0x1f4f68[_0xd08b78(0x193)]=0x1]=_0xd08b78(0x193),_0x1f4f68[_0x1f4f68[_0xd08b78(0x192)]=0x2]=_0xd08b78(0x192),_0x1f4f68[_0x1f4f68[_0xd08b78(0x1c7)]=0x3]=_0xd08b78(0x1c7),_0x1f4f68[_0x1f4f68[_0xd08b78(0x1b5)]=0x4]='Delete',_0x1f4f68[_0x1f4f68[_0xd08b78(0x19a)]=0x5]=_0xd08b78(0x19a),_0x1f4f68[_0x1f4f68[_0xd08b78(0x1c0)]=-0x1]=_0xd08b78(0x1c0),_0x1f4f68))(_0x4c02dc||{});const _0x11200b=_0xc9f1cd=>_0x144298['dayjs'](new Date(+_0xc9f1cd))[_0xd08b78(0x1aa)](_0xd08b78(0x15b)),_0xb7fad1=async(_0x54dd8b,_0x13a07d)=>{const _0x5a1a52=_0xd08b78,_0x216453=_0x54dd8b[_0x5a1a52(0x1b9)](_0x144298['UserManagerService']),_0x475c32=_0x54dd8b[_0x5a1a52(0x1b9)](_0x3db2f3['HTTPService']);_0x13a07d[_0x5a1a52(0x1b0)](_0x26a827=>{const _0x434170=_0x5a1a52;_0x216453[_0x434170(0x1d7)](_0x26a827)&&_0x13a07d[_0x434170(0x1d8)](_0x26a827);}),_0x13a07d[_0x5a1a52(0x1d4)]&&(await _0x475c32[_0x5a1a52(0x1b9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a07d]}}))[_0x5a1a52(0x188)][_0x5a1a52(0x1b1)][_0x5a1a52(0x1b0)](_0x1d4579=>{const _0x4cc8a1=_0x5a1a52;_0x1d4579&&_0x216453[_0x4cc8a1(0x1a7)](_0x1d4579);});};var _0x16bfa6=Object[_0xd08b78(0x158)],_0x38cfe6=(_0x32a086,_0x156a6c,_0x4a0b2e,_0x26a7de)=>{const _0x315e19=_0xd08b78;for(var _0x2d65f9=_0x26a7de>0x1?void 0x0:_0x26a7de?_0x16bfa6(_0x156a6c,_0x4a0b2e):_0x156a6c,_0x5a7268=_0x32a086[_0x315e19(0x19c)]-0x1,_0x24011f;_0x5a7268>=0x0;_0x5a7268--)(_0x24011f=_0x32a086[_0x5a7268])&&(_0x2d65f9=_0x24011f(_0x2d65f9)||_0x2d65f9);return _0x2d65f9;},_0x4fdb0f=(_0x40cca0,_0x1ec2ee)=>(_0x415316,_0x125fc2)=>_0x1ec2ee(_0x415316,_0x125fc2,_0x40cca0);let _0x313c83=class extends _0x144298[_0xd08b78(0x180)]{constructor(_0x38d32b,_0x29c51f,_0x436585,_0x4e2f6b){const _0x267d70=_0xd08b78;super(),this[_0x267d70(0x1d2)]=_0x38d32b,this[_0x267d70(0x181)]=_0x29c51f,this[_0x267d70(0x178)]=_0x436585,this[_0x267d70(0x15f)]=_0x4e2f6b,this['_init'](),this[_0x267d70(0x195)]();}[_0xd08b78(0x195)](){const _0x338259=_0xd08b78;this[_0x338259(0x1c8)](this[_0x338259(0x181)][_0x338259(0x176)]['pipe'](_0x69c7f7[_0x338259(0x1b7)](0x10))[_0x338259(0x163)](_0x460855=>{const _0x4b4783=_0x338259,_0x5ab6f8=new Set();_0x460855['forEach'](_0x1f331e=>{const _0x2b5201=_0x2b57;switch(_0x1f331e[_0x2b5201(0x168)]){case _0x2b5201(0x1cd):{const _0x3ff9f7=_0x1f331e[_0x2b5201(0x1a4)]['personId'];_0x5ab6f8[_0x2b5201(0x1cd)](_0x3ff9f7);break;}}}),_0xb7fad1(this[_0x4b4783(0x15f)],_0x5ab6f8);}));}[_0xd08b78(0x1cc)](){const _0x2d3a1e=_0xd08b78;this[_0x2d3a1e(0x1c8)](this['_commentService']['commentUpdate$']['subscribe'](async _0x5bbb40=>{const _0x4e2525=_0x2d3a1e;var _0x838258,_0x2dfaab,_0x28eb90,_0x38a647;const _0x2a1e7d=(_0x838258=this['_threadCommentModel'][_0x4e2525(0x1ae)](_0x5bbb40[_0x4e2525(0x165)])[_0x4e2525(0x1a8)](_0x3d34d9=>_0x3d34d9[_0x4e2525(0x1d1)]===_0x5bbb40['threadId']))==null?void 0x0:_0x838258[_0x4e2525(0x1d3)];if(!_0x2a1e7d)return;const {unitId:_0x37238e,subUnitId:_0x49ee3f}=_0x2a1e7d;switch(_0x5bbb40['user']&&this['_userService'][_0x4e2525(0x1a7)](_0x5bbb40[_0x4e2525(0x18f)]),_0x5bbb40[_0x4e2525(0x168)]){case _0x4c02dc[_0x4e2525(0x193)]:break;case _0x4c02dc[_0x4e2525(0x192)]:{this['_threadCommentModel'][_0x4e2525(0x1a3)](_0x37238e,_0x49ee3f,{'unitId':_0x37238e,'subUnitId':_0x49ee3f,'ref':'','id':_0x5bbb40[_0x4e2525(0x160)],'dT':_0x11200b(+_0x5bbb40[_0x4e2525(0x1c4)]),'threadId':_0x5bbb40['threadId'],'personId':(_0x28eb90=(_0x2dfaab=_0x5bbb40[_0x4e2525(0x18f)])==null?void 0x0:_0x2dfaab['userID'])!=null?_0x28eb90:_0x5bbb40['userId'],'text':JSON[_0x4e2525(0x1ce)](_0x5bbb40[_0x4e2525(0x1ba)]),'parentId':_0x2a1e7d['id']});break;}case _0x4c02dc['Delete']:{const _0x50f0c2=this['_threadCommentModel'][_0x4e2525(0x15d)](_0x37238e,_0x49ee3f,_0x5bbb40[_0x4e2525(0x160)]);_0x50f0c2&&_0x50f0c2[_0x4e2525(0x170)]&&this['_threadCommentModel']['deleteComment'](_0x37238e,_0x49ee3f,_0x5bbb40[_0x4e2525(0x160)]);break;}case _0x4c02dc['Edit']:{this[_0x4e2525(0x181)]['updateComment'](_0x37238e,_0x49ee3f,{'commentId':_0x5bbb40['replyId'],'text':JSON[_0x4e2525(0x1ce)](_0x5bbb40[_0x4e2525(0x1ba)])});break;}case _0x4c02dc[_0x4e2525(0x19a)]:{const _0xff72a4=(_0x38a647=this['_threadCommentModel'][_0x4e2525(0x1ae)](_0x5bbb40[_0x4e2525(0x165)])[_0x4e2525(0x1a8)](_0x144d50=>_0x144d50['threadId']===_0x5bbb40[_0x4e2525(0x1d1)]))==null?void 0x0:_0x38a647[_0x4e2525(0x1d3)];_0xff72a4&&this[_0x4e2525(0x181)]['resolveComment'](_0x37238e,_0x49ee3f,_0xff72a4['id'],_0x5bbb40[_0x4e2525(0x18d)]===_0x226b4d[_0x4e2525(0x1c2)]);break;}}}));}};_0x313c83=_0x38cfe6([_0x4fdb0f(0x0,_0x144298[_0xd08b78(0x15c)](_0x506598[_0xd08b78(0x1be)])),_0x4fdb0f(0x1,_0x144298[_0xd08b78(0x15c)](_0x28671d[_0xd08b78(0x1d5)])),_0x4fdb0f(0x2,_0x144298[_0xd08b78(0x15c)](_0x144298[_0xd08b78(0x1df)])),_0x4fdb0f(0x3,_0x144298[_0xd08b78(0x15c)](_0x144298[_0xd08b78(0x1b8)]))],_0x313c83);const _0x221b0b=_0xd08b78(0x191),_0x25db8a={};var _0x2cea02=Object['getOwnPropertyDescriptor'],_0x50cebc=(_0x1dc6ea,_0x51a92c,_0x458bbe,_0xa44461)=>{const _0x404ef1=_0xd08b78;for(var _0xda9238=_0xa44461>0x1?void 0x0:_0xa44461?_0x2cea02(_0x51a92c,_0x458bbe):_0x51a92c,_0x1ea245=_0x1dc6ea[_0x404ef1(0x19c)]-0x1,_0x23bc9f;_0x1ea245>=0x0;_0x1ea245--)(_0x23bc9f=_0x1dc6ea[_0x1ea245])&&(_0xda9238=_0x23bc9f(_0xda9238)||_0xda9238);return _0xda9238;},_0x4a8b4e=(_0xdd77fd,_0x1dc351)=>(_0x4c75f1,_0x31012f)=>_0x1dc351(_0x4c75f1,_0x31012f,_0xdd77fd);function _0x55015f(_0x5b0f94,_0x1e36c9){const _0x250c14=_0xd08b78,_0x36a50c=_0x5b0f94[_0x250c14(0x19d)][0x0];return{..._0x1e36c9,'id':_0x36a50c[_0x250c14(0x160)],'resolved':_0x5b0f94['solved']===0x1,'dT':_0x11200b(_0x36a50c[_0x250c14(0x1c4)]),'personId':_0x36a50c[_0x250c14(0x1bd)],'threadId':_0x36a50c[_0x250c14(0x1d1)]};}function _0x42a485(_0x3f826a,_0x1d634e,_0x2c8e27){const _0x2989d7=_0xd08b78;var _0x394316,_0x2048be;if(((_0x2048be=(_0x394316=_0x3f826a==null?void 0x0:_0x3f826a[_0x2989d7(0x19d)])==null?void 0x0:_0x394316[_0x2989d7(0x19c)])!=null?_0x2048be:0x0)>0x0){const _0x1ebe4a=(_0x526d2a,_0x36a913)=>({'id':_0x526d2a[_0x2989d7(0x160)],'threadId':_0x526d2a[_0x2989d7(0x1d1)],'dT':_0x11200b(_0x526d2a[_0x2989d7(0x1c4)]),'personId':_0x526d2a[_0x2989d7(0x1bd)],'resolved':_0x3f826a['solved']===_0x226b4d[_0x2989d7(0x1c2)],'unitId':_0x1d634e,'subUnitId':_0x2c8e27,'text':JSON[_0x2989d7(0x1ce)](_0x526d2a[_0x2989d7(0x1ba)]),'parentId':_0x36a913}),_0x1489a7=_0x1ebe4a(_0x3f826a[_0x2989d7(0x19d)][0x0]);return{..._0x1489a7,'children':_0x3f826a[_0x2989d7(0x19d)][_0x2989d7(0x1c1)](0x1)[_0x2989d7(0x1c3)](_0x46b78c=>_0x1ebe4a(_0x46b78c,_0x1489a7['id']))};}return null;}let _0x4c3bbf=class{constructor(_0x283bd9,_0x365b02,_0x4004f4,_0x349578){const _0x4aaf8a=_0xd08b78;this[_0x4aaf8a(0x1ca)]=_0x283bd9,this[_0x4aaf8a(0x178)]=_0x365b02,this[_0x4aaf8a(0x16a)]=_0x4004f4,this[_0x4aaf8a(0x15f)]=_0x349578;}async[_0xd08b78(0x1a3)](_0x329e30){const _0x172a40=_0xd08b78;var _0x3efe64,_0x3f2f56;const {parentId:_0x2cc8c7,unitId:_0x2a2a4d,text:_0x372ca5,threadId:_0x59f674}=_0x329e30,_0x402e7c=(_0x3f2f56=(_0x3efe64=_0x372ca5[_0x172a40(0x1bb)])==null?void 0x0:_0x3efe64['filter'](_0x5de436=>_0x5de436[_0x172a40(0x18a)]===_0x144298['CustomRangeType'][_0x172a40(0x1de)])[_0x172a40(0x1c3)](_0x416e7e=>_0x416e7e[_0x172a40(0x1ab)]))!=null?_0x3f2f56:[],_0x58209b=JSON[_0x172a40(0x17a)](_0x372ca5),_0x1430e6=(await this['_sessionService'][_0x172a40(0x19b)](_0x2a2a4d))[_0x172a40(0x16f)]();if(_0x2cc8c7){const _0x3e05e0={'memberId':_0x1430e6,'unitId':_0x2a2a4d,'content':_0x58209b,'mention':_0x402e7c,'threadId':_0x59f674},_0x3baba5=(await this[_0x172a40(0x1ca)]['post'](_0x172a40(0x169)+_0x2a2a4d+'/reply',{'body':_0x3e05e0}))[_0x172a40(0x188)][_0x172a40(0x172)];return{..._0x329e30,'id':_0x3baba5[_0x172a40(0x160)],'dT':_0x144298[_0x172a40(0x1b6)](+_0x3baba5[_0x172a40(0x1c4)])[_0x172a40(0x1aa)](_0x172a40(0x15b)),'personId':_0x3baba5['userId']};}else{const _0x95bff={'memberId':_0x1430e6,'unitId':_0x2a2a4d,'content':_0x58209b,'mention':_0x402e7c},_0x3940a7=await this[_0x172a40(0x1ca)][_0x172a40(0x179)]('/universer-api/comment/unit/'+_0x2a2a4d+_0x172a40(0x184),{'body':_0x95bff});return _0x55015f(_0x3940a7['body']['comment'],_0x329e30);}}async[_0xd08b78(0x182)](_0x578204){const _0x2db8d6=_0xd08b78;var _0x510b26,_0x4c1918;const {text:_0x26176f,unitId:_0x4b4a80}=_0x578204,_0xe7ccb9=(_0x4c1918=(_0x510b26=_0x26176f[_0x2db8d6(0x1bb)])==null?void 0x0:_0x510b26[_0x2db8d6(0x1b3)](_0x56fb1d=>_0x56fb1d[_0x2db8d6(0x18a)]===_0x144298[_0x2db8d6(0x17d)]['COMMENT'])[_0x2db8d6(0x1c3)](_0x316c48=>_0x316c48[_0x2db8d6(0x1ab)]))!=null?_0x4c1918:[],_0x23512a=JSON['stringify'](_0x26176f),_0x36d421=_0x578204[_0x2db8d6(0x1d1)],_0x22f8cf=_0x578204['id'],_0x442a5e={'memberId':(await this['_sessionService'][_0x2db8d6(0x19b)](_0x4b4a80))[_0x2db8d6(0x16f)](),'unitId':_0x4b4a80,'threadId':_0x36d421,'mention':_0xe7ccb9,'content':_0x23512a,'replyId':_0x22f8cf},_0x1292d0=await this[_0x2db8d6(0x1ca)][_0x2db8d6(0x179)](_0x2db8d6(0x169)+_0x4b4a80+_0x2db8d6(0x194),{'body':_0x442a5e});return!_0x1292d0[_0x2db8d6(0x188)]['error']||_0x1292d0[_0x2db8d6(0x188)][_0x2db8d6(0x17b)]['code']===0x1;}async[_0xd08b78(0x161)](_0x242471){const _0x2ab170=_0xd08b78,{unitId:_0x1937b0}=_0x242471,_0x211d41=_0x242471['threadId'],_0x541b64={'memberId':this[_0x2ab170(0x178)][_0x2ab170(0x187)]()[_0x2ab170(0x1a6)],'unitId':_0x1937b0,'threadId':_0x211d41,'solved':_0x242471['resolved']?_0x226b4d['Solved']:_0x226b4d['OpenOrReOpen']},_0x46d6bc=await this[_0x2ab170(0x1ca)][_0x2ab170(0x179)](_0x2ab170(0x169)+_0x1937b0+_0x2ab170(0x15e),{'body':_0x541b64});return!_0x46d6bc[_0x2ab170(0x188)]['error']||_0x46d6bc[_0x2ab170(0x188)][_0x2ab170(0x17b)][_0x2ab170(0x1bf)]===0x1;}async[_0xd08b78(0x1c5)](_0x23ac46,_0x4f6340,_0x25d8ae,_0x5f4ec1){const _0x514893=_0xd08b78,_0x48e1a1={'memberId':(await this[_0x514893(0x16a)][_0x514893(0x19b)](_0x23ac46))['getMemberID'](),'threadId':_0x25d8ae,'replyId':_0x5f4ec1,'unitId':_0x23ac46},_0x2e1c49=await this[_0x514893(0x1ca)][_0x514893(0x179)](_0x514893(0x169)+_0x23ac46+_0x514893(0x16e),{'body':_0x48e1a1});return!_0x2e1c49[_0x514893(0x188)]['error']||_0x2e1c49['body'][_0x514893(0x17b)][_0x514893(0x1bf)]===0x1;}async[_0xd08b78(0x1cb)](_0x571c05,_0x318a85,_0x4449ae){const _0x3778a2=_0xd08b78,_0x16120b={'unitId':_0x571c05,'threadId':_0x4449ae},_0x34fce4=await this['_httpService'][_0x3778a2(0x179)](_0x3778a2(0x169)+_0x571c05+_0x3778a2(0x1af),{'body':_0x16120b}),_0x318528=_0x4449ae[_0x3778a2(0x1c3)](_0x1eafcb=>_0x42a485(_0x34fce4[_0x3778a2(0x188)]['comments'][_0x1eafcb],_0x571c05,_0x318a85))[_0x3778a2(0x1b3)](Boolean);return Object[_0x3778a2(0x1ac)](_0x34fce4[_0x3778a2(0x188)][_0x3778a2(0x1b1)])[_0x3778a2(0x1b0)](_0x33187d=>{const _0x2013f7=_0x3778a2;this['_userService'][_0x2013f7(0x1a7)](_0x33187d);}),_0x318528;}[_0xd08b78(0x177)](_0x517efc){const _0x357038=_0xd08b78;return{'id':_0x517efc['id'],'threadId':_0x517efc[_0x357038(0x1d1)],'ref':_0x517efc[_0x357038(0x1a0)]};}};_0x4c3bbf=_0x50cebc([_0x4a8b4e(0x0,_0x144298[_0xd08b78(0x15c)](_0x3db2f3[_0xd08b78(0x1a1)])),_0x4a8b4e(0x1,_0x144298[_0xd08b78(0x15c)](_0x144298[_0xd08b78(0x1df)])),_0x4a8b4e(0x2,_0x144298['Inject'](_0x506598[_0xd08b78(0x171)])),_0x4a8b4e(0x3,_0x144298[_0xd08b78(0x15c)](_0x144298[_0xd08b78(0x1b8)]))],_0x4c3bbf);var _0x2381d0=Object[_0xd08b78(0x158)],_0x51b7e2=(_0x3d158a,_0x41c208,_0x24fbd7,_0x4e20d9)=>{const _0x3c7419=_0xd08b78;for(var _0x505783=_0x4e20d9>0x1?void 0x0:_0x4e20d9?_0x2381d0(_0x41c208,_0x24fbd7):_0x41c208,_0x2d063f=_0x3d158a[_0x3c7419(0x19c)]-0x1,_0x5d8cd5;_0x2d063f>=0x0;_0x2d063f--)(_0x5d8cd5=_0x3d158a[_0x2d063f])&&(_0x505783=_0x5d8cd5(_0x505783)||_0x505783);return _0x505783;},_0x7b120=(_0xec517,_0x36d9c5)=>(_0xd17a9d,_0x4bca41)=>_0x36d9c5(_0xd17a9d,_0x4bca41,_0xec517);let _0xef2fcb=class extends _0x144298[_0xd08b78(0x180)]{constructor(_0x169200,_0x12fcc9){const _0x502920=_0xd08b78;super(),this['_threadCommentDataSourceService']=_0x169200,this['_threadCommentDataSource']=_0x12fcc9,this[_0x502920(0x1c6)]();}[_0xd08b78(0x1c6)](){const _0x279716=_0xd08b78;this[_0x279716(0x1bc)][_0x279716(0x16b)]=this[_0x279716(0x19f)],this['_threadCommentDataSourceService'][_0x279716(0x1dd)]=!0x1;}};_0xef2fcb=_0x51b7e2([_0x7b120(0x0,_0x28671d[_0xd08b78(0x197)]),_0x7b120(0x1,_0x144298[_0xd08b78(0x15c)](_0x4c3bbf))],_0xef2fcb);var _0x56aa7c=Object['defineProperty'],_0x5daa08=Object[_0xd08b78(0x158)],_0x2550d2=(_0x4d9f05,_0x4195c6,_0x32fb7a)=>_0x4195c6 in _0x4d9f05?_0x56aa7c(_0x4d9f05,_0x4195c6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32fb7a}):_0x4d9f05[_0x4195c6]=_0x32fb7a,_0x5453c1=(_0x9e46d1,_0x173df1,_0x2da77d,_0x5cc7e1)=>{const _0x48e5af=_0xd08b78;for(var _0x4c93f9=_0x5cc7e1>0x1?void 0x0:_0x5cc7e1?_0x5daa08(_0x173df1,_0x2da77d):_0x173df1,_0x2a2b4f=_0x9e46d1[_0x48e5af(0x19c)]-0x1,_0x590259;_0x2a2b4f>=0x0;_0x2a2b4f--)(_0x590259=_0x9e46d1[_0x2a2b4f])&&(_0x4c93f9=_0x590259(_0x4c93f9)||_0x4c93f9);return _0x4c93f9;},_0x2d0321=(_0x1b5aca,_0x2a4d1f)=>(_0xdaa60a,_0x21ab87)=>_0x2a4d1f(_0xdaa60a,_0x21ab87,_0x1b5aca),_0x590c67=(_0x1ad96d,_0xcaf355,_0x500992)=>_0x2550d2(_0x1ad96d,typeof _0xcaf355!='symbol'?_0xcaf355+'':_0xcaf355,_0x500992);_0x54b517[_0xd08b78(0x189)]=class extends _0x144298[_0xd08b78(0x185)]{constructor(_0x5d5527=_0x25db8a,_0x162145,_0x21f977){const _0x11edc5=_0xd08b78;super(),this[_0x11edc5(0x186)]=_0x5d5527,this[_0x11edc5(0x15f)]=_0x162145,this[_0x11edc5(0x159)]=_0x21f977;const {..._0x5e60b4}=_0x144298['merge']({},_0x25db8a,this[_0x11edc5(0x186)]);this[_0x11edc5(0x159)]['setConfig'](_0x221b0b,_0x5e60b4);}[_0xd08b78(0x1c9)](){const _0x2896e0=_0xd08b78;[[_0x4c3bbf],[_0xef2fcb],[_0x313c83]][_0x2896e0(0x1b0)](_0x556cc4=>{const _0x2c2ce2=_0x2896e0;this[_0x2c2ce2(0x15f)][_0x2c2ce2(0x1cd)](_0x556cc4);});}['onReady'](){const _0x39a8c6=_0xd08b78;this['_injector']['get'](_0xef2fcb),this[_0x39a8c6(0x15f)][_0x39a8c6(0x1b9)](_0x313c83);}},_0x590c67(_0x54b517['UniverThreadCommentDataSourcePlugin'],_0xd08b78(0x15a),_0x4a5494),_0x590c67(_0x54b517[_0xd08b78(0x189)],_0xd08b78(0x168),_0x144298[_0xd08b78(0x1b4)]['UNIVER_UNKNOWN']),_0x54b517['UniverThreadCommentDataSourcePlugin']=_0x5453c1([_0x144298[_0xd08b78(0x16c)](_0x2afa75['UniverThreadCommentUIPlugin'],_0x506598[_0xd08b78(0x1d6)],_0x127fbe[_0xd08b78(0x167)]),_0x2d0321(0x1,_0x144298[_0xd08b78(0x15c)](_0x144298['Injector'])),_0x2d0321(0x2,_0x144298[_0xd08b78(0x17c)])],_0x54b517['UniverThreadCommentDataSourcePlugin']),Object[_0xd08b78(0x18c)](_0x54b517,Symbol[_0xd08b78(0x17e)],{'value':'Module'});}));function _0x4ce2(){const _0x258ca9=['code','UNRECOGNIZED','slice','Solved','map','createTimestamp','deleteComment','_initDataSource','Edit','disposeWithMe','onStarting','_httpService','listComments','_init','add','parse','58631jvQVdy','Unknown','threadId','_commentService','root','size','ThreadCommentModel','UniverCollaborationClientPlugin','getUser','delete','UniverNetwork','@univerjs/network','UniverProLicense','7719848xPprSB','syncUpdateMutationToColla','COMMENT','UserManagerService','exports','getOwnPropertyDescriptor','_configService','pluginName','YYYY/MM/DD\x20HH:mm','Inject','getComment','/solved','_injector','replyId','resolveComment','@univerjs-pro/collaboration-client','subscribe','amd','unitId','85OyqFFt','UniverLicensePlugin','type','/universer-api/comment/unit/','_sessionService','dataSource','DependentOn','function','/delete','getMemberID','parentId','CollaborationSessionService','reply','@univerjs-pro/license','11BgIyPD','OpenOrReOpen','commentUpdate$','saveCommentToSnapshot','_userService','post','stringify','error','IConfigService','CustomRangeType','toStringTag','@univerjs/core','Disposable','_threadCommentModel','updateComment','UniverProCollaborationClient','/add','Plugin','_config','getCurrentUser','body','UniverThreadCommentDataSourcePlugin','rangeType','47257830xgpeiW','defineProperty','solved','4OIJzHj','user','1984809HDQRnT','thread-comment-data-source.config','Reply','Add','/edit','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','5252985xojrKh','object','Solve','requireSession','length','replies','@univerjs/thread-comment','_threadCommentDataSource','ref','HTTPService','304206cxYwEa','addComment','payload','rxjs','userID','addUser','find','4saxZQh','format','rangeId','values','@univerjs/thread-comment-ui','getUnit','/list','forEach','users','7010493RRIlCk','filter','UniverInstanceType','Delete','dayjs','bufferTime','Injector','get','content','customRanges','_threadCommentDataSourceService','userId','CommentService'];_0x4ce2=function(){return _0x258ca9;};return _0x4ce2();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.7-experimental.20250331-
|
|
3
|
+
"version": "0.6.7-experimental.20250331-d1f1879",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs-pro/license": "0.6.7-experimental.20250331-aa3ee78",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-d1f1879",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-experimental.20250331-d1f1879",
|
|
51
50
|
"@univerjs/protocol": "0.1.45",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
51
|
+
"@univerjs/core": "0.6.7-experimental.20250331-d1f1879",
|
|
52
|
+
"@univerjs/network": "0.6.7-experimental.20250331-d1f1879",
|
|
53
|
+
"@univerjs/thread-comment": "0.6.7-experimental.20250331-d1f1879",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-d1f1879"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|