@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-aa3ee78 → 0.6.7-experimental.20250331-1a09136

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 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 _0x4f7d5f=_0x4576;(function(_0x1ed414,_0x53fd5c){const _0x57a443=_0x4576,_0x5d9ee5=_0x1ed414();while(!![]){try{const _0x585afb=-parseInt(_0x57a443(0xfa))/0x1+-parseInt(_0x57a443(0x132))/0x2*(parseInt(_0x57a443(0x135))/0x3)+-parseInt(_0x57a443(0x123))/0x4+-parseInt(_0x57a443(0x160))/0x5+parseInt(_0x57a443(0x12e))/0x6+parseInt(_0x57a443(0x143))/0x7*(parseInt(_0x57a443(0x16e))/0x8)+parseInt(_0x57a443(0x164))/0x9;if(_0x585afb===_0x53fd5c)break;else _0x5d9ee5['push'](_0x5d9ee5['shift']());}catch(_0x3a3f5a){_0x5d9ee5['push'](_0x5d9ee5['shift']());}}}(_0x105b,0x3592d));Object['defineProperty'](exports,Symbol[_0x4f7d5f(0x104)],{'value':_0x4f7d5f(0x12d)});const b=require(_0x4f7d5f(0x13a)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x4f7d5f(0xfb)),M=require(_0x4f7d5f(0x129)),w=require(_0x4f7d5f(0x150)),P=require(_0x4f7d5f(0x157)),U=_0x4f7d5f(0x141);var I=(_0x18c264=>(_0x18c264[_0x18c264[_0x4f7d5f(0x112)]=0x0]=_0x4f7d5f(0x112),_0x18c264[_0x18c264[_0x4f7d5f(0x156)]=0x1]=_0x4f7d5f(0x156),_0x18c264[_0x18c264[_0x4f7d5f(0x12f)]=-0x1]=_0x4f7d5f(0x12f),_0x18c264))(I||{}),v=(_0x339c76=>(_0x339c76[_0x339c76['Unknown']=0x0]=_0x4f7d5f(0x12a),_0x339c76[_0x339c76['Add']=0x1]='Add',_0x339c76[_0x339c76[_0x4f7d5f(0x154)]=0x2]=_0x4f7d5f(0x154),_0x339c76[_0x339c76[_0x4f7d5f(0x140)]=0x3]=_0x4f7d5f(0x140),_0x339c76[_0x339c76[_0x4f7d5f(0x158)]=0x4]='Delete',_0x339c76[_0x339c76[_0x4f7d5f(0x14b)]=0x5]=_0x4f7d5f(0x14b),_0x339c76[_0x339c76[_0x4f7d5f(0x12f)]=-0x1]=_0x4f7d5f(0x12f),_0x339c76))(v||{});const f=_0x1c0a9c=>c[_0x4f7d5f(0x162)](new Date(+_0x1c0a9c))[_0x4f7d5f(0x167)](_0x4f7d5f(0x126)),R=async(_0x480a90,_0x12e826)=>{const _0x3e61b6=_0x4f7d5f,_0x4967ba=_0x480a90[_0x3e61b6(0x161)](c[_0x3e61b6(0x151)]),_0x211123=_0x480a90[_0x3e61b6(0x161)](P[_0x3e61b6(0x138)]);_0x12e826['forEach'](_0x265931=>{const _0x4c7217=_0x3e61b6;_0x4967ba[_0x4c7217(0x14e)](_0x265931)&&_0x12e826['delete'](_0x265931);}),_0x12e826[_0x3e61b6(0x169)]&&(await _0x211123[_0x3e61b6(0x161)](_0x3e61b6(0x15c),{'params':{'userIDs':[..._0x12e826]}}))[_0x3e61b6(0xfd)][_0x3e61b6(0x153)][_0x3e61b6(0x133)](_0x2cac8f=>{const _0x2cad4f=_0x3e61b6;_0x2cac8f&&_0x4967ba[_0x2cad4f(0x148)](_0x2cac8f);});};function _0x105b(){const _0x397150=['resolveComment','_configService','rangeType','comments','_httpService','OpenOrReOpen','disposeWithMe','DependentOn','error','COMMENT','updateComment','Plugin','content','thread-comment-data-source.config','filter','/reply','length','root','CollaborationSessionService','UniverCollaborationClientPlugin','replies','createTimestamp','1067644VPBAmZ','symbol','dataSource','YYYY/MM/DD\x20HH:mm','getMemberID','onReady','@univerjs/thread-comment','Unknown','reply','requireSession','Module','1609542DtaLNc','UNRECOGNIZED','stringify','onStarting','558rJvgrI','forEach','_init','2511mePNMO','_threadCommentModel','_initUserSync','HTTPService','commentUpdate$','@univerjs-pro/collaboration-client','_injector','post','Disposable','_initDataSource','CustomRangeType','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','235459VwPgib','Add','_config','_commentService','/add','addUser','Inject','userID','Solve','subscribe','UNIVER_UNKNOWN','getUser','defineProperty','rxjs','UserManagerService','userId','users','Reply','getOwnPropertyDescriptor','Solved','@univerjs/network','Delete','UniverLicensePlugin','/universer-api/comment/unit/','_threadCommentDataSource','/universer-api/user/list','IConfigService','Injector','getComment','191405WEZpny','get','dayjs','rangeId','7667064MZVoYw','/edit','listComments','format','/delete','size','values','pluginName','UniverThreadCommentDataSourcePlugin','IThreadCommentDataSourceService','8EinSNx','add','/list','parentId','_sessionService','UniverInstanceType','slice','map','395638OaPWXr','@univerjs/thread-comment-ui','threadId','body','customRanges','comment','getCurrentUser','user','replyId','_threadCommentDataSourceService','toStringTag','ThreadCommentModel','payload','unitId','pipe','type','addComment','find','solved'];_0x105b=function(){return _0x397150;};return _0x105b();}var $=Object[_0x4f7d5f(0x155)],E=(_0x4f2e79,_0x85a310,_0x36ca61,_0x1f576a)=>{const _0x2e9135=_0x4f7d5f;for(var _0x57a948=_0x1f576a>0x1?void 0x0:_0x1f576a?$(_0x85a310,_0x36ca61):_0x85a310,_0x11f1ac=_0x4f2e79[_0x2e9135(0x11d)]-0x1,_0x492fff;_0x11f1ac>=0x0;_0x11f1ac--)(_0x492fff=_0x4f2e79[_0x11f1ac])&&(_0x57a948=_0x492fff(_0x57a948)||_0x57a948);return _0x57a948;},S=(_0x1a23f5,_0x2bace4)=>(_0x35799e,_0x505618)=>_0x2bace4(_0x35799e,_0x505618,_0x1a23f5);let p=class extends c[_0x4f7d5f(0x13d)]{constructor(_0x442acb,_0xad4e6,_0x3d1574,_0x36b384){const _0x916dd8=_0x4f7d5f;super(),this[_0x916dd8(0x146)]=_0x442acb,this[_0x916dd8(0x136)]=_0xad4e6,this[_0x916dd8(0x142)]=_0x3d1574,this[_0x916dd8(0x13b)]=_0x36b384,this['_init'](),this[_0x916dd8(0x137)]();}[_0x4f7d5f(0x137)](){const _0x2b536b=_0x4f7d5f;this['disposeWithMe'](this[_0x2b536b(0x136)][_0x2b536b(0x139)][_0x2b536b(0x108)](w['bufferTime'](0x10))[_0x2b536b(0x14c)](_0x1797a0=>{const _0x5bb6d7=_0x2b536b,_0x374349=new Set();_0x1797a0['forEach'](_0x4d27f2=>{const _0x440eed=_0x4576;switch(_0x4d27f2[_0x440eed(0x109)]){case _0x440eed(0x16f):{const _0x1a4b82=_0x4d27f2[_0x440eed(0x106)]['personId'];_0x374349['add'](_0x1a4b82);break;}}}),R(this[_0x5bb6d7(0x13b)],_0x374349);}));}[_0x4f7d5f(0x134)](){const _0x450168=_0x4f7d5f;this[_0x450168(0x113)](this[_0x450168(0x146)][_0x450168(0x139)][_0x450168(0x14c)](async _0x358cc3=>{const _0x1ce19e=_0x450168;var _0x27533e,_0xe17254,_0x4131ce,_0x232e31;const _0x380eb0=(_0x27533e=this[_0x1ce19e(0x136)]['getUnit'](_0x358cc3[_0x1ce19e(0x107)])['find'](_0x22ef04=>_0x22ef04[_0x1ce19e(0xfc)]===_0x358cc3[_0x1ce19e(0xfc)]))==null?void 0x0:_0x27533e['root'];if(!_0x380eb0)return;const {unitId:_0x1dda9a,subUnitId:_0xec946c}=_0x380eb0;switch(_0x358cc3[_0x1ce19e(0x101)]&&this[_0x1ce19e(0x142)]['addUser'](_0x358cc3['user']),_0x358cc3[_0x1ce19e(0x109)]){case v[_0x1ce19e(0x144)]:break;case v[_0x1ce19e(0x154)]:{this[_0x1ce19e(0x136)]['addComment'](_0x1dda9a,_0xec946c,{'unitId':_0x1dda9a,'subUnitId':_0xec946c,'ref':'','id':_0x358cc3[_0x1ce19e(0x102)],'dT':f(+_0x358cc3[_0x1ce19e(0x122)]),'threadId':_0x358cc3[_0x1ce19e(0xfc)],'personId':(_0x4131ce=(_0xe17254=_0x358cc3['user'])==null?void 0x0:_0xe17254[_0x1ce19e(0x14a)])!=null?_0x4131ce:_0x358cc3[_0x1ce19e(0x152)],'text':JSON['parse'](_0x358cc3[_0x1ce19e(0x119)]),'parentId':_0x380eb0['id']});break;}case v['Delete']:{const _0x505038=this[_0x1ce19e(0x136)][_0x1ce19e(0x15f)](_0x1dda9a,_0xec946c,_0x358cc3[_0x1ce19e(0x102)]);_0x505038&&_0x505038[_0x1ce19e(0x171)]&&this[_0x1ce19e(0x136)]['deleteComment'](_0x1dda9a,_0xec946c,_0x358cc3[_0x1ce19e(0x102)]);break;}case v[_0x1ce19e(0x140)]:{this['_threadCommentModel'][_0x1ce19e(0x117)](_0x1dda9a,_0xec946c,{'commentId':_0x358cc3[_0x1ce19e(0x102)],'text':JSON['parse'](_0x358cc3['content'])});break;}case v[_0x1ce19e(0x14b)]:{const _0x45e0c3=(_0x232e31=this[_0x1ce19e(0x136)]['getUnit'](_0x358cc3['unitId'])[_0x1ce19e(0x10b)](_0x53569a=>_0x53569a[_0x1ce19e(0xfc)]===_0x358cc3[_0x1ce19e(0xfc)]))==null?void 0x0:_0x232e31[_0x1ce19e(0x11e)];_0x45e0c3&&this['_threadCommentModel']['resolveComment'](_0x1dda9a,_0xec946c,_0x45e0c3['id'],_0x358cc3[_0x1ce19e(0x10c)]===I[_0x1ce19e(0x156)]);break;}}}));}};p=E([S(0x0,c[_0x4f7d5f(0x149)](b['CommentService'])),S(0x1,c[_0x4f7d5f(0x149)](M[_0x4f7d5f(0x105)])),S(0x2,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x151)])),S(0x3,c['Inject'](c[_0x4f7d5f(0x15e)]))],p);const q=_0x4f7d5f(0x11a),D={};var A=Object[_0x4f7d5f(0x155)],x=(_0x4fc890,_0xbba8cd,_0x142db5,_0x392614)=>{for(var _0x56af93=_0x392614>0x1?void 0x0:_0x392614?A(_0xbba8cd,_0x142db5):_0xbba8cd,_0x1175a1=_0x4fc890['length']-0x1,_0x27e5e1;_0x1175a1>=0x0;_0x1175a1--)(_0x27e5e1=_0x4fc890[_0x1175a1])&&(_0x56af93=_0x27e5e1(_0x56af93)||_0x56af93);return _0x56af93;},_=(_0x42ad0c,_0x3dccb0)=>(_0x3f9f1e,_0x33d027)=>_0x3dccb0(_0x3f9f1e,_0x33d027,_0x42ad0c);function _0x4576(_0x569a68,_0x2cee1c){const _0x105b7b=_0x105b();return _0x4576=function(_0x457621,_0x1b754e){_0x457621=_0x457621-0xf7;let _0x50dfda=_0x105b7b[_0x457621];return _0x50dfda;},_0x4576(_0x569a68,_0x2cee1c);}function Y(_0x1ad10e,_0x2717c4){const _0x3005bd=_0x4f7d5f,_0x2a4a62=_0x1ad10e[_0x3005bd(0x121)][0x0];return{..._0x2717c4,'id':_0x2a4a62[_0x3005bd(0x102)],'resolved':_0x1ad10e['solved']===0x1,'dT':f(_0x2a4a62['createTimestamp']),'personId':_0x2a4a62[_0x3005bd(0x152)],'threadId':_0x2a4a62['threadId']};}function G(_0x140a35,_0xcd6c9d,_0x2dca0e){const _0x120678=_0x4f7d5f;var _0x57ae3b,_0x47914b;if(((_0x47914b=(_0x57ae3b=_0x140a35==null?void 0x0:_0x140a35['replies'])==null?void 0x0:_0x57ae3b[_0x120678(0x11d)])!=null?_0x47914b:0x0)>0x0){const _0x4eb57f=(_0x5bd891,_0x2a6b29)=>({'id':_0x5bd891[_0x120678(0x102)],'threadId':_0x5bd891[_0x120678(0xfc)],'dT':f(_0x5bd891[_0x120678(0x122)]),'personId':_0x5bd891[_0x120678(0x152)],'resolved':_0x140a35[_0x120678(0x10c)]===I[_0x120678(0x156)],'unitId':_0xcd6c9d,'subUnitId':_0x2dca0e,'text':JSON['parse'](_0x5bd891[_0x120678(0x119)]),'parentId':_0x2a6b29}),_0x1a40aa=_0x4eb57f(_0x140a35[_0x120678(0x121)][0x0]);return{..._0x1a40aa,'children':_0x140a35[_0x120678(0x121)][_0x120678(0xf8)](0x1)[_0x120678(0xf9)](_0x32e6b4=>_0x4eb57f(_0x32e6b4,_0x1a40aa['id']))};}return null;}let g=class{constructor(_0x38056a,_0x204f9c,_0x357958,_0x1d8ac1){const _0x572664=_0x4f7d5f;this[_0x572664(0x111)]=_0x38056a,this[_0x572664(0x142)]=_0x204f9c,this[_0x572664(0x172)]=_0x357958,this[_0x572664(0x13b)]=_0x1d8ac1;}async[_0x4f7d5f(0x10a)](_0xb4aa23){const _0x2d5a52=_0x4f7d5f;var _0x523c5a,_0x563a80;const {parentId:_0x5a4e6a,unitId:_0x2cef49,text:_0xa52d48,threadId:_0x200bd9}=_0xb4aa23,_0x42a1a3=(_0x563a80=(_0x523c5a=_0xa52d48[_0x2d5a52(0xfe)])==null?void 0x0:_0x523c5a[_0x2d5a52(0x11b)](_0x2d4fcd=>_0x2d4fcd[_0x2d5a52(0x10f)]===c[_0x2d5a52(0x13f)][_0x2d5a52(0x116)])[_0x2d5a52(0xf9)](_0x2faffa=>_0x2faffa['rangeId']))!=null?_0x563a80:[],_0x48c2ee=JSON[_0x2d5a52(0x130)](_0xa52d48),_0x1007b2=(await this[_0x2d5a52(0x172)][_0x2d5a52(0x12c)](_0x2cef49))['getMemberID']();if(_0x5a4e6a){const _0x45afaa={'memberId':_0x1007b2,'unitId':_0x2cef49,'content':_0x48c2ee,'mention':_0x42a1a3,'threadId':_0x200bd9},_0x48986b=(await this[_0x2d5a52(0x111)][_0x2d5a52(0x13c)](_0x2d5a52(0x15a)+_0x2cef49+_0x2d5a52(0x11c),{'body':_0x45afaa}))['body'][_0x2d5a52(0x12b)];return{..._0xb4aa23,'id':_0x48986b[_0x2d5a52(0x102)],'dT':c[_0x2d5a52(0x162)](+_0x48986b[_0x2d5a52(0x122)])[_0x2d5a52(0x167)](_0x2d5a52(0x126)),'personId':_0x48986b['userId']};}else{const _0x490233={'memberId':_0x1007b2,'unitId':_0x2cef49,'content':_0x48c2ee,'mention':_0x42a1a3},_0x229271=await this[_0x2d5a52(0x111)][_0x2d5a52(0x13c)](_0x2d5a52(0x15a)+_0x2cef49+_0x2d5a52(0x147),{'body':_0x490233});return Y(_0x229271['body'][_0x2d5a52(0xff)],_0xb4aa23);}}async[_0x4f7d5f(0x117)](_0x1d2473){const _0x184ac8=_0x4f7d5f;var _0x11f30f,_0x3fab2c;const {text:_0x36604a,unitId:_0x43fc73}=_0x1d2473,_0xc50916=(_0x3fab2c=(_0x11f30f=_0x36604a[_0x184ac8(0xfe)])==null?void 0x0:_0x11f30f[_0x184ac8(0x11b)](_0x4439fb=>_0x4439fb[_0x184ac8(0x10f)]===c[_0x184ac8(0x13f)][_0x184ac8(0x116)])[_0x184ac8(0xf9)](_0x2aa148=>_0x2aa148[_0x184ac8(0x163)]))!=null?_0x3fab2c:[],_0x138543=JSON[_0x184ac8(0x130)](_0x36604a),_0x211ba0=_0x1d2473['threadId'],_0x1e13f1=_0x1d2473['id'],_0x960fa0={'memberId':(await this[_0x184ac8(0x172)][_0x184ac8(0x12c)](_0x43fc73))[_0x184ac8(0x127)](),'unitId':_0x43fc73,'threadId':_0x211ba0,'mention':_0xc50916,'content':_0x138543,'replyId':_0x1e13f1},_0x3dc6de=await this['_httpService'][_0x184ac8(0x13c)](_0x184ac8(0x15a)+_0x43fc73+_0x184ac8(0x165),{'body':_0x960fa0});return!_0x3dc6de[_0x184ac8(0xfd)][_0x184ac8(0x115)]||_0x3dc6de[_0x184ac8(0xfd)][_0x184ac8(0x115)]['code']===0x1;}async[_0x4f7d5f(0x10d)](_0x185f27){const _0x4ee2cb=_0x4f7d5f,{unitId:_0x22d3b7}=_0x185f27,_0x51150a=_0x185f27[_0x4ee2cb(0xfc)],_0x30fcec={'memberId':this[_0x4ee2cb(0x142)][_0x4ee2cb(0x100)]()[_0x4ee2cb(0x14a)],'unitId':_0x22d3b7,'threadId':_0x51150a,'solved':_0x185f27['resolved']?I[_0x4ee2cb(0x156)]:I['OpenOrReOpen']},_0x32ed56=await this[_0x4ee2cb(0x111)][_0x4ee2cb(0x13c)](_0x4ee2cb(0x15a)+_0x22d3b7+'/solved',{'body':_0x30fcec});return!_0x32ed56[_0x4ee2cb(0xfd)][_0x4ee2cb(0x115)]||_0x32ed56['body'][_0x4ee2cb(0x115)]['code']===0x1;}async['deleteComment'](_0xed0726,_0xe28250,_0x5ac9d4,_0x93973e){const _0x4b631a=_0x4f7d5f,_0x368aa3={'memberId':(await this[_0x4b631a(0x172)][_0x4b631a(0x12c)](_0xed0726))[_0x4b631a(0x127)](),'threadId':_0x5ac9d4,'replyId':_0x93973e,'unitId':_0xed0726},_0x22b7f8=await this[_0x4b631a(0x111)][_0x4b631a(0x13c)]('/universer-api/comment/unit/'+_0xed0726+_0x4b631a(0x168),{'body':_0x368aa3});return!_0x22b7f8[_0x4b631a(0xfd)][_0x4b631a(0x115)]||_0x22b7f8[_0x4b631a(0xfd)][_0x4b631a(0x115)]['code']===0x1;}async[_0x4f7d5f(0x166)](_0x415fcc,_0xbb663c,_0x3c10bb){const _0x44f773=_0x4f7d5f,_0x36fa87={'unitId':_0x415fcc,'threadId':_0x3c10bb},_0x103a13=await this[_0x44f773(0x111)][_0x44f773(0x13c)](_0x44f773(0x15a)+_0x415fcc+_0x44f773(0x170),{'body':_0x36fa87}),_0x5b36d4=_0x3c10bb[_0x44f773(0xf9)](_0x213104=>G(_0x103a13['body'][_0x44f773(0x110)][_0x213104],_0x415fcc,_0xbb663c))[_0x44f773(0x11b)](Boolean);return Object[_0x44f773(0x16a)](_0x103a13[_0x44f773(0xfd)][_0x44f773(0x153)])[_0x44f773(0x133)](_0x4ff936=>{const _0x4db673=_0x44f773;this[_0x4db673(0x142)]['addUser'](_0x4ff936);}),_0x5b36d4;}['saveCommentToSnapshot'](_0x566549){const _0x5a6f08=_0x4f7d5f;return{'id':_0x566549['id'],'threadId':_0x566549[_0x5a6f08(0xfc)],'ref':_0x566549['ref']};}};g=x([_(0x0,c[_0x4f7d5f(0x149)](P[_0x4f7d5f(0x138)])),_(0x1,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x151)])),_(0x2,c['Inject'](b[_0x4f7d5f(0x11f)])),_(0x3,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x15e)]))],g);var H=Object[_0x4f7d5f(0x155)],J=(_0x5a8a4e,_0x510c24,_0x428176,_0x4edcf1)=>{const _0xffaf5b=_0x4f7d5f;for(var _0x4f9870=_0x4edcf1>0x1?void 0x0:_0x4edcf1?H(_0x510c24,_0x428176):_0x510c24,_0x5ae0f6=_0x5a8a4e[_0xffaf5b(0x11d)]-0x1,_0x37af9c;_0x5ae0f6>=0x0;_0x5ae0f6--)(_0x37af9c=_0x5a8a4e[_0x5ae0f6])&&(_0x4f9870=_0x37af9c(_0x4f9870)||_0x4f9870);return _0x4f9870;},y=(_0x30937d,_0x33fa3b)=>(_0x5b3084,_0x3cf5ca)=>_0x33fa3b(_0x5b3084,_0x3cf5ca,_0x30937d);let C=class extends c[_0x4f7d5f(0x13d)]{constructor(_0x326dbc,_0x510996){const _0xc79541=_0x4f7d5f;super(),this[_0xc79541(0x103)]=_0x326dbc,this[_0xc79541(0x15b)]=_0x510996,this[_0xc79541(0x13e)]();}[_0x4f7d5f(0x13e)](){const _0x1c5b6e=_0x4f7d5f;this[_0x1c5b6e(0x103)][_0x1c5b6e(0x125)]=this['_threadCommentDataSource'],this[_0x1c5b6e(0x103)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4f7d5f(0x16d)]),y(0x1,c[_0x4f7d5f(0x149)](g))],C);var F=Object[_0x4f7d5f(0x14f)],L=Object[_0x4f7d5f(0x155)],Z=(_0x46f35d,_0x35dc4b,_0x2d1168)=>_0x35dc4b in _0x46f35d?F(_0x46f35d,_0x35dc4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d1168}):_0x46f35d[_0x35dc4b]=_0x2d1168,W=(_0x4d478e,_0x3cd590,_0x12fd7d,_0x2c7e70)=>{const _0x49abea=_0x4f7d5f;for(var _0x4e678b=_0x2c7e70>0x1?void 0x0:_0x2c7e70?L(_0x3cd590,_0x12fd7d):_0x3cd590,_0x560264=_0x4d478e[_0x49abea(0x11d)]-0x1,_0x48db85;_0x560264>=0x0;_0x560264--)(_0x48db85=_0x4d478e[_0x560264])&&(_0x4e678b=_0x48db85(_0x4e678b)||_0x4e678b);return _0x4e678b;},O=(_0x4a0076,_0x156de8)=>(_0x29d0fc,_0x120fea)=>_0x156de8(_0x29d0fc,_0x120fea,_0x4a0076),N=(_0x376330,_0x170af0,_0x2756f4)=>Z(_0x376330,typeof _0x170af0!=_0x4f7d5f(0x124)?_0x170af0+'':_0x170af0,_0x2756f4);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4f7d5f(0x118)]{constructor(_0x5394b9=D,_0x266dfb,_0x5077e4){const _0x290b5c=_0x4f7d5f;super(),this[_0x290b5c(0x145)]=_0x5394b9,this[_0x290b5c(0x13b)]=_0x266dfb,this[_0x290b5c(0x10e)]=_0x5077e4;const {..._0x519c85}=c['merge']({},D,this[_0x290b5c(0x145)]);this[_0x290b5c(0x10e)]['setConfig'](q,_0x519c85);}[_0x4f7d5f(0x131)](){const _0x3f3005=_0x4f7d5f;[[g],[C],[p]][_0x3f3005(0x133)](_0x12d738=>{const _0x229420=_0x3f3005;this[_0x229420(0x13b)][_0x229420(0x16f)](_0x12d738);});}[_0x4f7d5f(0x128)](){const _0x5a10f8=_0x4f7d5f;this[_0x5a10f8(0x13b)][_0x5a10f8(0x161)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4f7d5f(0x16b),U),N(exports[_0x4f7d5f(0x16c)],_0x4f7d5f(0x109),c[_0x4f7d5f(0xf7)][_0x4f7d5f(0x14d)]),exports[_0x4f7d5f(0x16c)]=W([c[_0x4f7d5f(0x114)](j['UniverThreadCommentUIPlugin'],b[_0x4f7d5f(0x120)],T[_0x4f7d5f(0x159)]),O(0x1,c['Inject'](c[_0x4f7d5f(0x15e)])),O(0x2,c[_0x4f7d5f(0x15d)])],exports[_0x4f7d5f(0x16c)]);
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 _0x4b07e7=_0x181b;(function(_0x2791fb,_0x4da5a1){const _0x521bea=_0x181b,_0x550324=_0x2791fb();while(!![]){try{const _0x1a9c71=-parseInt(_0x521bea(0x106))/0x1*(-parseInt(_0x521bea(0x151))/0x2)+parseInt(_0x521bea(0xf8))/0x3*(parseInt(_0x521bea(0x120))/0x4)+-parseInt(_0x521bea(0x121))/0x5+-parseInt(_0x521bea(0x154))/0x6*(-parseInt(_0x521bea(0x107))/0x7)+parseInt(_0x521bea(0x134))/0x8*(parseInt(_0x521bea(0x110))/0x9)+-parseInt(_0x521bea(0x13f))/0xa*(-parseInt(_0x521bea(0x108))/0xb)+-parseInt(_0x521bea(0x14c))/0xc*(parseInt(_0x521bea(0x10b))/0xd);if(_0x1a9c71===_0x4da5a1)break;else _0x550324['push'](_0x550324['shift']());}catch(_0x2d228d){_0x550324['push'](_0x550324['shift']());}}}(_0x1923,0x7b47f));import{CommentService as _0x1a1583,CollaborationSessionService as _0x1fd658,UniverCollaborationClientPlugin as _0x3d47fa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21e0fd}from'@univerjs-pro/license';import{dayjs as _0x471760,UserManagerService as _0x416fe6,Inject as _0x3c112c,Injector as _0x15e34d,Disposable as _0x6c7d02,CustomRangeType as _0x23fccf,UniverInstanceType as _0x514331,DependentOn as _0x5e5e54,IConfigService as _0x1e0359,Plugin as _0x2f5ef4,merge as _0x4a2386}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe804bc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52f7ea,IThreadCommentDataSourceService as _0x4013bc}from'@univerjs/thread-comment';import{bufferTime as _0x5984f4}from'rxjs';import{HTTPService as _0x3849c5}from'@univerjs/network';const W=_0x4b07e7(0xf7);function _0x1923(){const _0x5595fb=['_threadCommentDataSourceService','_sessionService','COMMENT','unitId','get','_commentService','symbol','defineProperty','filter','disposeWithMe','241448yIyFkS','pluginName','YYYY/MM/DD\x20HH:mm','getUnit','userId','_userService','addUser','users','/delete','getMemberID','getOwnPropertyDescriptor','27460jbIabh','delete','user','values','personId','solved','Reply','code','syncUpdateMutationToColla','_config','slice','getComment','_configService','98664bwJkjc','UNRECOGNIZED','format','threadId','commentUpdate$','2EkVeVN','replyId','comment','6slXwyg','_injector','rangeId','thread-comment-data-source.config','OpenOrReOpen','stringify','content','Delete','addComment','ref','Edit','find','requireSession','forEach','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3AYQNmX','size','subscribe','length','Add','updateComment','Solved','/universer-api/comment/unit/','createTimestamp','rangeType','parse','resolved','/list','/edit','507930tvnOII','4267585kMQSso','2651HoayUC','pipe','replies','3653zSsDez','getUser','deleteComment','add','parentId','171XKoZlS','setConfig','error','post','dataSource','_initUserSync','getCurrentUser','/universer-api/user/list','/reply','map','Solve','root','_threadCommentDataSource','userID','resolveComment','type','1853308qdwozu','3980aQywqa','_threadCommentModel','onStarting','_init','body','_initDataSource','_httpService','payload','Unknown'];_0x1923=function(){return _0x5595fb;};return _0x1923();}var I=(_0x31d8b8=>(_0x31d8b8[_0x31d8b8[_0x4b07e7(0x158)]=0x0]='OpenOrReOpen',_0x31d8b8[_0x31d8b8['Solved']=0x1]=_0x4b07e7(0xfe),_0x31d8b8[_0x31d8b8[_0x4b07e7(0x14d)]=-0x1]='UNRECOGNIZED',_0x31d8b8))(I||{}),v=(_0x5d3573=>(_0x5d3573[_0x5d3573[_0x4b07e7(0x129)]=0x0]=_0x4b07e7(0x129),_0x5d3573[_0x5d3573[_0x4b07e7(0xfc)]=0x1]=_0x4b07e7(0xfc),_0x5d3573[_0x5d3573[_0x4b07e7(0x145)]=0x2]=_0x4b07e7(0x145),_0x5d3573[_0x5d3573['Edit']=0x3]=_0x4b07e7(0x15e),_0x5d3573[_0x5d3573['Delete']=0x4]=_0x4b07e7(0x15b),_0x5d3573[_0x5d3573[_0x4b07e7(0x11a)]=0x5]=_0x4b07e7(0x11a),_0x5d3573[_0x5d3573[_0x4b07e7(0x14d)]=-0x1]=_0x4b07e7(0x14d),_0x5d3573))(v||{});const D=_0x3c2d82=>_0x471760(new Date(+_0x3c2d82))[_0x4b07e7(0x14e)](_0x4b07e7(0x136)),B=async(_0x1cde4d,_0xe92fe5)=>{const _0xaa6722=_0x4b07e7,_0xab947f=_0x1cde4d[_0xaa6722(0x12e)](_0x416fe6),_0x1ef13a=_0x1cde4d[_0xaa6722(0x12e)](_0x3849c5);_0xe92fe5['forEach'](_0x5a1bdb=>{const _0x5de147=_0xaa6722;_0xab947f[_0x5de147(0x10c)](_0x5a1bdb)&&_0xe92fe5[_0x5de147(0x140)](_0x5a1bdb);}),_0xe92fe5[_0xaa6722(0xf9)]&&(await _0x1ef13a['get'](_0xaa6722(0x117),{'params':{'userIDs':[..._0xe92fe5]}}))[_0xaa6722(0x125)][_0xaa6722(0x13b)]['forEach'](_0x406591=>{const _0x3be61b=_0xaa6722;_0x406591&&_0xab947f[_0x3be61b(0x13a)](_0x406591);});};var K=Object[_0x4b07e7(0x13e)],V=(_0x2a6c1b,_0xd948de,_0x508d56,_0xaca8b0)=>{const _0x1deed3=_0x4b07e7;for(var _0x5844b2=_0xaca8b0>0x1?void 0x0:_0xaca8b0?K(_0xd948de,_0x508d56):_0xd948de,_0x5766e1=_0x2a6c1b[_0x1deed3(0xfb)]-0x1,_0x54902d;_0x5766e1>=0x0;_0x5766e1--)(_0x54902d=_0x2a6c1b[_0x5766e1])&&(_0x5844b2=_0x54902d(_0x5844b2)||_0x5844b2);return _0x5844b2;},p=(_0x5b1438,_0x1d7b6b)=>(_0x1ef566,_0x3ea25f)=>_0x1d7b6b(_0x1ef566,_0x3ea25f,_0x5b1438);let S=class extends _0x6c7d02{constructor(_0x19bb64,_0x218317,_0x4ce68c,_0x4922a3){const _0x237b44=_0x4b07e7;super(),this[_0x237b44(0x12f)]=_0x19bb64,this[_0x237b44(0x122)]=_0x218317,this['_userService']=_0x4ce68c,this['_injector']=_0x4922a3,this[_0x237b44(0x124)](),this[_0x237b44(0x115)]();}[_0x4b07e7(0x115)](){const _0x42c3b3=_0x4b07e7;this['disposeWithMe'](this[_0x42c3b3(0x122)]['commentUpdate$'][_0x42c3b3(0x109)](_0x5984f4(0x10))[_0x42c3b3(0xfa)](_0xf821f6=>{const _0x1c1c92=_0x42c3b3,_0x11dfb5=new Set();_0xf821f6['forEach'](_0x3926f1=>{const _0x942c36=_0x181b;switch(_0x3926f1[_0x942c36(0x11f)]){case _0x942c36(0x10e):{const _0x2cf316=_0x3926f1[_0x942c36(0x128)][_0x942c36(0x143)];_0x11dfb5[_0x942c36(0x10e)](_0x2cf316);break;}}}),B(this[_0x1c1c92(0x155)],_0x11dfb5);}));}[_0x4b07e7(0x124)](){const _0x1a1700=_0x4b07e7;this[_0x1a1700(0x133)](this['_commentService'][_0x1a1700(0x150)][_0x1a1700(0xfa)](async _0x483617=>{const _0x31cf19=_0x1a1700;var _0x4dddb6,_0x8c2546,_0x33af4c,_0xd89e1a;const _0x187d48=(_0x4dddb6=this[_0x31cf19(0x122)][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])['find'](_0xb1ef45=>_0xb1ef45[_0x31cf19(0x14f)]===_0x483617['threadId']))==null?void 0x0:_0x4dddb6[_0x31cf19(0x11b)];if(!_0x187d48)return;const {unitId:_0x80eb4b,subUnitId:_0x599791}=_0x187d48;switch(_0x483617[_0x31cf19(0x141)]&&this['_userService'][_0x31cf19(0x13a)](_0x483617[_0x31cf19(0x141)]),_0x483617[_0x31cf19(0x11f)]){case v['Add']:break;case v[_0x31cf19(0x145)]:{this[_0x31cf19(0x122)]['addComment'](_0x80eb4b,_0x599791,{'unitId':_0x80eb4b,'subUnitId':_0x599791,'ref':'','id':_0x483617[_0x31cf19(0x152)],'dT':D(+_0x483617[_0x31cf19(0x100)]),'threadId':_0x483617[_0x31cf19(0x14f)],'personId':(_0x33af4c=(_0x8c2546=_0x483617[_0x31cf19(0x141)])==null?void 0x0:_0x8c2546['userID'])!=null?_0x33af4c:_0x483617['userId'],'text':JSON[_0x31cf19(0x102)](_0x483617['content']),'parentId':_0x187d48['id']});break;}case v[_0x31cf19(0x15b)]:{const _0x4e0c9a=this[_0x31cf19(0x122)][_0x31cf19(0x14a)](_0x80eb4b,_0x599791,_0x483617[_0x31cf19(0x152)]);_0x4e0c9a&&_0x4e0c9a[_0x31cf19(0x10f)]&&this[_0x31cf19(0x122)][_0x31cf19(0x10d)](_0x80eb4b,_0x599791,_0x483617['replyId']);break;}case v[_0x31cf19(0x15e)]:{this[_0x31cf19(0x122)][_0x31cf19(0xfd)](_0x80eb4b,_0x599791,{'commentId':_0x483617['replyId'],'text':JSON['parse'](_0x483617[_0x31cf19(0x15a)])});break;}case v['Solve']:{const _0x8cf9d8=(_0xd89e1a=this['_threadCommentModel'][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])[_0x31cf19(0x15f)](_0x4001df=>_0x4001df[_0x31cf19(0x14f)]===_0x483617[_0x31cf19(0x14f)]))==null?void 0x0:_0xd89e1a[_0x31cf19(0x11b)];_0x8cf9d8&&this[_0x31cf19(0x122)][_0x31cf19(0x11e)](_0x80eb4b,_0x599791,_0x8cf9d8['id'],_0x483617[_0x31cf19(0x144)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c112c(_0x1a1583)),p(0x1,_0x3c112c(_0x52f7ea)),p(0x2,_0x3c112c(_0x416fe6)),p(0x3,_0x3c112c(_0x15e34d))],S);const z=_0x4b07e7(0x157),M={};var k=Object[_0x4b07e7(0x13e)],Q=(_0x1950c6,_0x4cf0e0,_0x49ccc0,_0x33a086)=>{const _0x273370=_0x4b07e7;for(var _0xec26fb=_0x33a086>0x1?void 0x0:_0x33a086?k(_0x4cf0e0,_0x49ccc0):_0x4cf0e0,_0x3359eb=_0x1950c6[_0x273370(0xfb)]-0x1,_0x2a84f7;_0x3359eb>=0x0;_0x3359eb--)(_0x2a84f7=_0x1950c6[_0x3359eb])&&(_0xec26fb=_0x2a84f7(_0xec26fb)||_0xec26fb);return _0xec26fb;},_=(_0x2ee0ab,_0x344c50)=>(_0x1c2240,_0xa54929)=>_0x344c50(_0x1c2240,_0xa54929,_0x2ee0ab);function _0x181b(_0xb1ae11,_0x318b9f){const _0x192349=_0x1923();return _0x181b=function(_0x181bd3,_0x418c9d){_0x181bd3=_0x181bd3-0xf5;let _0x4defb7=_0x192349[_0x181bd3];return _0x4defb7;},_0x181b(_0xb1ae11,_0x318b9f);}function X(_0x25bb61,_0xe72036){const _0x286d65=_0x4b07e7,_0x8e733f=_0x25bb61[_0x286d65(0x10a)][0x0];return{..._0xe72036,'id':_0x8e733f['replyId'],'resolved':_0x25bb61['solved']===0x1,'dT':D(_0x8e733f[_0x286d65(0x100)]),'personId':_0x8e733f[_0x286d65(0x138)],'threadId':_0x8e733f[_0x286d65(0x14f)]};}function ee(_0x34270e,_0x3c5a87,_0x6b82ad){const _0x4a34f9=_0x4b07e7;var _0x30047c,_0x4aeb13;if(((_0x4aeb13=(_0x30047c=_0x34270e==null?void 0x0:_0x34270e[_0x4a34f9(0x10a)])==null?void 0x0:_0x30047c[_0x4a34f9(0xfb)])!=null?_0x4aeb13:0x0)>0x0){const _0x3cc799=(_0x474b6b,_0x632057)=>({'id':_0x474b6b[_0x4a34f9(0x152)],'threadId':_0x474b6b['threadId'],'dT':D(_0x474b6b[_0x4a34f9(0x100)]),'personId':_0x474b6b['userId'],'resolved':_0x34270e[_0x4a34f9(0x144)]===I[_0x4a34f9(0xfe)],'unitId':_0x3c5a87,'subUnitId':_0x6b82ad,'text':JSON['parse'](_0x474b6b[_0x4a34f9(0x15a)]),'parentId':_0x632057}),_0x5b5a02=_0x3cc799(_0x34270e['replies'][0x0]);return{..._0x5b5a02,'children':_0x34270e[_0x4a34f9(0x10a)][_0x4a34f9(0x149)](0x1)[_0x4a34f9(0x119)](_0x4e43f9=>_0x3cc799(_0x4e43f9,_0x5b5a02['id']))};}return null;}let f=class{constructor(_0xa96396,_0xf6c0e7,_0x25aae8,_0xa13c7a){const _0x349230=_0x4b07e7;this[_0x349230(0x127)]=_0xa96396,this[_0x349230(0x139)]=_0xf6c0e7,this[_0x349230(0x12b)]=_0x25aae8,this[_0x349230(0x155)]=_0xa13c7a;}async[_0x4b07e7(0x15c)](_0x268f50){const _0x492111=_0x4b07e7;var _0x26e451,_0xc31f89;const {parentId:_0x4d0ae6,unitId:_0x2ffe0e,text:_0x2f6cc1,threadId:_0xd0ceb5}=_0x268f50,_0x5b0c99=(_0xc31f89=(_0x26e451=_0x2f6cc1['customRanges'])==null?void 0x0:_0x26e451[_0x492111(0x132)](_0x5c52ac=>_0x5c52ac[_0x492111(0x101)]===_0x23fccf[_0x492111(0x12c)])[_0x492111(0x119)](_0x396ad5=>_0x396ad5[_0x492111(0x156)]))!=null?_0xc31f89:[],_0x223fe2=JSON[_0x492111(0x159)](_0x2f6cc1),_0x578938=(await this[_0x492111(0x12b)][_0x492111(0x160)](_0x2ffe0e))['getMemberID']();if(_0x4d0ae6){const _0x22a6ab={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99,'threadId':_0xd0ceb5},_0x307626=(await this['_httpService']['post'](_0x492111(0xff)+_0x2ffe0e+_0x492111(0x118),{'body':_0x22a6ab}))[_0x492111(0x125)]['reply'];return{..._0x268f50,'id':_0x307626[_0x492111(0x152)],'dT':_0x471760(+_0x307626[_0x492111(0x100)])[_0x492111(0x14e)](_0x492111(0x136)),'personId':_0x307626[_0x492111(0x138)]};}else{const _0x38e7be={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99},_0x56dca0=await this[_0x492111(0x127)][_0x492111(0x113)]('/universer-api/comment/unit/'+_0x2ffe0e+'/add',{'body':_0x38e7be});return X(_0x56dca0[_0x492111(0x125)][_0x492111(0x153)],_0x268f50);}}async[_0x4b07e7(0xfd)](_0x2b5825){const _0x43bce7=_0x4b07e7;var _0xb1a846,_0x37e651;const {text:_0x3d9ae5,unitId:_0x20c932}=_0x2b5825,_0x6841ec=(_0x37e651=(_0xb1a846=_0x3d9ae5['customRanges'])==null?void 0x0:_0xb1a846[_0x43bce7(0x132)](_0x349cb4=>_0x349cb4[_0x43bce7(0x101)]===_0x23fccf['COMMENT'])[_0x43bce7(0x119)](_0x11c5df=>_0x11c5df[_0x43bce7(0x156)]))!=null?_0x37e651:[],_0x35375a=JSON[_0x43bce7(0x159)](_0x3d9ae5),_0x1dbf12=_0x2b5825['threadId'],_0x4f956c=_0x2b5825['id'],_0xdf99f8={'memberId':(await this[_0x43bce7(0x12b)]['requireSession'](_0x20c932))[_0x43bce7(0x13d)](),'unitId':_0x20c932,'threadId':_0x1dbf12,'mention':_0x6841ec,'content':_0x35375a,'replyId':_0x4f956c},_0x4c504c=await this[_0x43bce7(0x127)][_0x43bce7(0x113)](_0x43bce7(0xff)+_0x20c932+_0x43bce7(0x105),{'body':_0xdf99f8});return!_0x4c504c[_0x43bce7(0x125)]['error']||_0x4c504c['body'][_0x43bce7(0x112)][_0x43bce7(0x146)]===0x1;}async['resolveComment'](_0xeda29b){const _0x23942d=_0x4b07e7,{unitId:_0x106db7}=_0xeda29b,_0x2e58a0=_0xeda29b[_0x23942d(0x14f)],_0x586e94={'memberId':this[_0x23942d(0x139)][_0x23942d(0x116)]()[_0x23942d(0x11d)],'unitId':_0x106db7,'threadId':_0x2e58a0,'solved':_0xeda29b[_0x23942d(0x103)]?I[_0x23942d(0xfe)]:I[_0x23942d(0x158)]},_0x47f213=await this[_0x23942d(0x127)]['post']('/universer-api/comment/unit/'+_0x106db7+'/solved',{'body':_0x586e94});return!_0x47f213['body'][_0x23942d(0x112)]||_0x47f213[_0x23942d(0x125)][_0x23942d(0x112)][_0x23942d(0x146)]===0x1;}async[_0x4b07e7(0x10d)](_0x52f61f,_0x24553e,_0x3d6b6e,_0x4d1b87){const _0x4825c8=_0x4b07e7,_0x24be61={'memberId':(await this[_0x4825c8(0x12b)][_0x4825c8(0x160)](_0x52f61f))[_0x4825c8(0x13d)](),'threadId':_0x3d6b6e,'replyId':_0x4d1b87,'unitId':_0x52f61f},_0x3740a2=await this['_httpService']['post'](_0x4825c8(0xff)+_0x52f61f+_0x4825c8(0x13c),{'body':_0x24be61});return!_0x3740a2[_0x4825c8(0x125)][_0x4825c8(0x112)]||_0x3740a2['body'][_0x4825c8(0x112)][_0x4825c8(0x146)]===0x1;}async[_0x4b07e7(0xf6)](_0xb39f73,_0x9fb586,_0x43b657){const _0x3127e2=_0x4b07e7,_0x35685f={'unitId':_0xb39f73,'threadId':_0x43b657},_0x1323e3=await this['_httpService'][_0x3127e2(0x113)]('/universer-api/comment/unit/'+_0xb39f73+_0x3127e2(0x104),{'body':_0x35685f}),_0x1e6210=_0x43b657[_0x3127e2(0x119)](_0x464aad=>ee(_0x1323e3[_0x3127e2(0x125)]['comments'][_0x464aad],_0xb39f73,_0x9fb586))[_0x3127e2(0x132)](Boolean);return Object[_0x3127e2(0x142)](_0x1323e3['body'][_0x3127e2(0x13b)])[_0x3127e2(0xf5)](_0x457901=>{const _0x3beb47=_0x3127e2;this[_0x3beb47(0x139)][_0x3beb47(0x13a)](_0x457901);}),_0x1e6210;}['saveCommentToSnapshot'](_0x4cdda2){const _0x347081=_0x4b07e7;return{'id':_0x4cdda2['id'],'threadId':_0x4cdda2['threadId'],'ref':_0x4cdda2[_0x347081(0x15d)]};}};f=Q([_(0x0,_0x3c112c(_0x3849c5)),_(0x1,_0x3c112c(_0x416fe6)),_(0x2,_0x3c112c(_0x1fd658)),_(0x3,_0x3c112c(_0x15e34d))],f);var re=Object[_0x4b07e7(0x13e)],te=(_0x35f8b3,_0x572dc3,_0x31f1d6,_0x5e12e9)=>{const _0x3ed32d=_0x4b07e7;for(var _0x448a9e=_0x5e12e9>0x1?void 0x0:_0x5e12e9?re(_0x572dc3,_0x31f1d6):_0x572dc3,_0x3da971=_0x35f8b3[_0x3ed32d(0xfb)]-0x1,_0x226144;_0x3da971>=0x0;_0x3da971--)(_0x226144=_0x35f8b3[_0x3da971])&&(_0x448a9e=_0x226144(_0x448a9e)||_0x448a9e);return _0x448a9e;},N=(_0x225574,_0x52e624)=>(_0x48768a,_0x4b2472)=>_0x52e624(_0x48768a,_0x4b2472,_0x225574);let g=class extends _0x6c7d02{constructor(_0x511312,_0x556241){const _0x209718=_0x4b07e7;super(),this[_0x209718(0x12a)]=_0x511312,this[_0x209718(0x11c)]=_0x556241,this[_0x209718(0x126)]();}['_initDataSource'](){const _0x5e7ed7=_0x4b07e7;this['_threadCommentDataSourceService'][_0x5e7ed7(0x114)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5e7ed7(0x147)]=!0x1;}};g=te([N(0x0,_0x4013bc),N(0x1,_0x3c112c(f))],g);var se=Object[_0x4b07e7(0x131)],oe=Object[_0x4b07e7(0x13e)],ne=(_0x23ed34,_0x149197,_0xf47f53)=>_0x149197 in _0x23ed34?se(_0x23ed34,_0x149197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf47f53}):_0x23ed34[_0x149197]=_0xf47f53,ie=(_0x30f388,_0x4f08ba,_0x28af5a,_0x36b259)=>{const _0x42e9e8=_0x4b07e7;for(var _0xb1b034=_0x36b259>0x1?void 0x0:_0x36b259?oe(_0x4f08ba,_0x28af5a):_0x4f08ba,_0x2f1e0b=_0x30f388[_0x42e9e8(0xfb)]-0x1,_0x559d65;_0x2f1e0b>=0x0;_0x2f1e0b--)(_0x559d65=_0x30f388[_0x2f1e0b])&&(_0xb1b034=_0x559d65(_0xb1b034)||_0xb1b034);return _0xb1b034;},w=(_0x292aee,_0x414712)=>(_0x167677,_0xb23af6)=>_0x414712(_0x167677,_0xb23af6,_0x292aee),$=(_0x2d8b37,_0x791142,_0x3859c1)=>ne(_0x2d8b37,typeof _0x791142!=_0x4b07e7(0x130)?_0x791142+'':_0x791142,_0x3859c1);let b=class extends _0x2f5ef4{constructor(_0x39969e=M,_0x292be0,_0x38ca6c){const _0x3d7004=_0x4b07e7;super(),this['_config']=_0x39969e,this['_injector']=_0x292be0,this[_0x3d7004(0x14b)]=_0x38ca6c;const {..._0x3a1b14}=_0x4a2386({},M,this[_0x3d7004(0x148)]);this[_0x3d7004(0x14b)][_0x3d7004(0x111)](z,_0x3a1b14);}[_0x4b07e7(0x123)](){const _0x4f8495=_0x4b07e7;[[f],[g],[S]][_0x4f8495(0xf5)](_0x45d384=>{const _0x281297=_0x4f8495;this[_0x281297(0x155)][_0x281297(0x10e)](_0x45d384);});}['onReady'](){const _0x4943ec=_0x4b07e7;this['_injector'][_0x4943ec(0x12e)](g),this['_injector']['get'](S);}};$(b,_0x4b07e7(0x135),W),$(b,'type',_0x514331['UNIVER_UNKNOWN']),b=ie([_0x5e5e54(_0xe804bc,_0x3d47fa,_0x21e0fd),w(0x1,_0x3c112c(_0x15e34d)),w(0x2,_0x1e0359)],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 _0x4b07e7=_0x181b;(function(_0x2791fb,_0x4da5a1){const _0x521bea=_0x181b,_0x550324=_0x2791fb();while(!![]){try{const _0x1a9c71=-parseInt(_0x521bea(0x106))/0x1*(-parseInt(_0x521bea(0x151))/0x2)+parseInt(_0x521bea(0xf8))/0x3*(parseInt(_0x521bea(0x120))/0x4)+-parseInt(_0x521bea(0x121))/0x5+-parseInt(_0x521bea(0x154))/0x6*(-parseInt(_0x521bea(0x107))/0x7)+parseInt(_0x521bea(0x134))/0x8*(parseInt(_0x521bea(0x110))/0x9)+-parseInt(_0x521bea(0x13f))/0xa*(-parseInt(_0x521bea(0x108))/0xb)+-parseInt(_0x521bea(0x14c))/0xc*(parseInt(_0x521bea(0x10b))/0xd);if(_0x1a9c71===_0x4da5a1)break;else _0x550324['push'](_0x550324['shift']());}catch(_0x2d228d){_0x550324['push'](_0x550324['shift']());}}}(_0x1923,0x7b47f));import{CommentService as _0x1a1583,CollaborationSessionService as _0x1fd658,UniverCollaborationClientPlugin as _0x3d47fa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21e0fd}from'@univerjs-pro/license';import{dayjs as _0x471760,UserManagerService as _0x416fe6,Inject as _0x3c112c,Injector as _0x15e34d,Disposable as _0x6c7d02,CustomRangeType as _0x23fccf,UniverInstanceType as _0x514331,DependentOn as _0x5e5e54,IConfigService as _0x1e0359,Plugin as _0x2f5ef4,merge as _0x4a2386}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe804bc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52f7ea,IThreadCommentDataSourceService as _0x4013bc}from'@univerjs/thread-comment';import{bufferTime as _0x5984f4}from'rxjs';import{HTTPService as _0x3849c5}from'@univerjs/network';const W=_0x4b07e7(0xf7);function _0x1923(){const _0x5595fb=['_threadCommentDataSourceService','_sessionService','COMMENT','unitId','get','_commentService','symbol','defineProperty','filter','disposeWithMe','241448yIyFkS','pluginName','YYYY/MM/DD\x20HH:mm','getUnit','userId','_userService','addUser','users','/delete','getMemberID','getOwnPropertyDescriptor','27460jbIabh','delete','user','values','personId','solved','Reply','code','syncUpdateMutationToColla','_config','slice','getComment','_configService','98664bwJkjc','UNRECOGNIZED','format','threadId','commentUpdate$','2EkVeVN','replyId','comment','6slXwyg','_injector','rangeId','thread-comment-data-source.config','OpenOrReOpen','stringify','content','Delete','addComment','ref','Edit','find','requireSession','forEach','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3AYQNmX','size','subscribe','length','Add','updateComment','Solved','/universer-api/comment/unit/','createTimestamp','rangeType','parse','resolved','/list','/edit','507930tvnOII','4267585kMQSso','2651HoayUC','pipe','replies','3653zSsDez','getUser','deleteComment','add','parentId','171XKoZlS','setConfig','error','post','dataSource','_initUserSync','getCurrentUser','/universer-api/user/list','/reply','map','Solve','root','_threadCommentDataSource','userID','resolveComment','type','1853308qdwozu','3980aQywqa','_threadCommentModel','onStarting','_init','body','_initDataSource','_httpService','payload','Unknown'];_0x1923=function(){return _0x5595fb;};return _0x1923();}var I=(_0x31d8b8=>(_0x31d8b8[_0x31d8b8[_0x4b07e7(0x158)]=0x0]='OpenOrReOpen',_0x31d8b8[_0x31d8b8['Solved']=0x1]=_0x4b07e7(0xfe),_0x31d8b8[_0x31d8b8[_0x4b07e7(0x14d)]=-0x1]='UNRECOGNIZED',_0x31d8b8))(I||{}),v=(_0x5d3573=>(_0x5d3573[_0x5d3573[_0x4b07e7(0x129)]=0x0]=_0x4b07e7(0x129),_0x5d3573[_0x5d3573[_0x4b07e7(0xfc)]=0x1]=_0x4b07e7(0xfc),_0x5d3573[_0x5d3573[_0x4b07e7(0x145)]=0x2]=_0x4b07e7(0x145),_0x5d3573[_0x5d3573['Edit']=0x3]=_0x4b07e7(0x15e),_0x5d3573[_0x5d3573['Delete']=0x4]=_0x4b07e7(0x15b),_0x5d3573[_0x5d3573[_0x4b07e7(0x11a)]=0x5]=_0x4b07e7(0x11a),_0x5d3573[_0x5d3573[_0x4b07e7(0x14d)]=-0x1]=_0x4b07e7(0x14d),_0x5d3573))(v||{});const D=_0x3c2d82=>_0x471760(new Date(+_0x3c2d82))[_0x4b07e7(0x14e)](_0x4b07e7(0x136)),B=async(_0x1cde4d,_0xe92fe5)=>{const _0xaa6722=_0x4b07e7,_0xab947f=_0x1cde4d[_0xaa6722(0x12e)](_0x416fe6),_0x1ef13a=_0x1cde4d[_0xaa6722(0x12e)](_0x3849c5);_0xe92fe5['forEach'](_0x5a1bdb=>{const _0x5de147=_0xaa6722;_0xab947f[_0x5de147(0x10c)](_0x5a1bdb)&&_0xe92fe5[_0x5de147(0x140)](_0x5a1bdb);}),_0xe92fe5[_0xaa6722(0xf9)]&&(await _0x1ef13a['get'](_0xaa6722(0x117),{'params':{'userIDs':[..._0xe92fe5]}}))[_0xaa6722(0x125)][_0xaa6722(0x13b)]['forEach'](_0x406591=>{const _0x3be61b=_0xaa6722;_0x406591&&_0xab947f[_0x3be61b(0x13a)](_0x406591);});};var K=Object[_0x4b07e7(0x13e)],V=(_0x2a6c1b,_0xd948de,_0x508d56,_0xaca8b0)=>{const _0x1deed3=_0x4b07e7;for(var _0x5844b2=_0xaca8b0>0x1?void 0x0:_0xaca8b0?K(_0xd948de,_0x508d56):_0xd948de,_0x5766e1=_0x2a6c1b[_0x1deed3(0xfb)]-0x1,_0x54902d;_0x5766e1>=0x0;_0x5766e1--)(_0x54902d=_0x2a6c1b[_0x5766e1])&&(_0x5844b2=_0x54902d(_0x5844b2)||_0x5844b2);return _0x5844b2;},p=(_0x5b1438,_0x1d7b6b)=>(_0x1ef566,_0x3ea25f)=>_0x1d7b6b(_0x1ef566,_0x3ea25f,_0x5b1438);let S=class extends _0x6c7d02{constructor(_0x19bb64,_0x218317,_0x4ce68c,_0x4922a3){const _0x237b44=_0x4b07e7;super(),this[_0x237b44(0x12f)]=_0x19bb64,this[_0x237b44(0x122)]=_0x218317,this['_userService']=_0x4ce68c,this['_injector']=_0x4922a3,this[_0x237b44(0x124)](),this[_0x237b44(0x115)]();}[_0x4b07e7(0x115)](){const _0x42c3b3=_0x4b07e7;this['disposeWithMe'](this[_0x42c3b3(0x122)]['commentUpdate$'][_0x42c3b3(0x109)](_0x5984f4(0x10))[_0x42c3b3(0xfa)](_0xf821f6=>{const _0x1c1c92=_0x42c3b3,_0x11dfb5=new Set();_0xf821f6['forEach'](_0x3926f1=>{const _0x942c36=_0x181b;switch(_0x3926f1[_0x942c36(0x11f)]){case _0x942c36(0x10e):{const _0x2cf316=_0x3926f1[_0x942c36(0x128)][_0x942c36(0x143)];_0x11dfb5[_0x942c36(0x10e)](_0x2cf316);break;}}}),B(this[_0x1c1c92(0x155)],_0x11dfb5);}));}[_0x4b07e7(0x124)](){const _0x1a1700=_0x4b07e7;this[_0x1a1700(0x133)](this['_commentService'][_0x1a1700(0x150)][_0x1a1700(0xfa)](async _0x483617=>{const _0x31cf19=_0x1a1700;var _0x4dddb6,_0x8c2546,_0x33af4c,_0xd89e1a;const _0x187d48=(_0x4dddb6=this[_0x31cf19(0x122)][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])['find'](_0xb1ef45=>_0xb1ef45[_0x31cf19(0x14f)]===_0x483617['threadId']))==null?void 0x0:_0x4dddb6[_0x31cf19(0x11b)];if(!_0x187d48)return;const {unitId:_0x80eb4b,subUnitId:_0x599791}=_0x187d48;switch(_0x483617[_0x31cf19(0x141)]&&this['_userService'][_0x31cf19(0x13a)](_0x483617[_0x31cf19(0x141)]),_0x483617[_0x31cf19(0x11f)]){case v['Add']:break;case v[_0x31cf19(0x145)]:{this[_0x31cf19(0x122)]['addComment'](_0x80eb4b,_0x599791,{'unitId':_0x80eb4b,'subUnitId':_0x599791,'ref':'','id':_0x483617[_0x31cf19(0x152)],'dT':D(+_0x483617[_0x31cf19(0x100)]),'threadId':_0x483617[_0x31cf19(0x14f)],'personId':(_0x33af4c=(_0x8c2546=_0x483617[_0x31cf19(0x141)])==null?void 0x0:_0x8c2546['userID'])!=null?_0x33af4c:_0x483617['userId'],'text':JSON[_0x31cf19(0x102)](_0x483617['content']),'parentId':_0x187d48['id']});break;}case v[_0x31cf19(0x15b)]:{const _0x4e0c9a=this[_0x31cf19(0x122)][_0x31cf19(0x14a)](_0x80eb4b,_0x599791,_0x483617[_0x31cf19(0x152)]);_0x4e0c9a&&_0x4e0c9a[_0x31cf19(0x10f)]&&this[_0x31cf19(0x122)][_0x31cf19(0x10d)](_0x80eb4b,_0x599791,_0x483617['replyId']);break;}case v[_0x31cf19(0x15e)]:{this[_0x31cf19(0x122)][_0x31cf19(0xfd)](_0x80eb4b,_0x599791,{'commentId':_0x483617['replyId'],'text':JSON['parse'](_0x483617[_0x31cf19(0x15a)])});break;}case v['Solve']:{const _0x8cf9d8=(_0xd89e1a=this['_threadCommentModel'][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])[_0x31cf19(0x15f)](_0x4001df=>_0x4001df[_0x31cf19(0x14f)]===_0x483617[_0x31cf19(0x14f)]))==null?void 0x0:_0xd89e1a[_0x31cf19(0x11b)];_0x8cf9d8&&this[_0x31cf19(0x122)][_0x31cf19(0x11e)](_0x80eb4b,_0x599791,_0x8cf9d8['id'],_0x483617[_0x31cf19(0x144)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c112c(_0x1a1583)),p(0x1,_0x3c112c(_0x52f7ea)),p(0x2,_0x3c112c(_0x416fe6)),p(0x3,_0x3c112c(_0x15e34d))],S);const z=_0x4b07e7(0x157),M={};var k=Object[_0x4b07e7(0x13e)],Q=(_0x1950c6,_0x4cf0e0,_0x49ccc0,_0x33a086)=>{const _0x273370=_0x4b07e7;for(var _0xec26fb=_0x33a086>0x1?void 0x0:_0x33a086?k(_0x4cf0e0,_0x49ccc0):_0x4cf0e0,_0x3359eb=_0x1950c6[_0x273370(0xfb)]-0x1,_0x2a84f7;_0x3359eb>=0x0;_0x3359eb--)(_0x2a84f7=_0x1950c6[_0x3359eb])&&(_0xec26fb=_0x2a84f7(_0xec26fb)||_0xec26fb);return _0xec26fb;},_=(_0x2ee0ab,_0x344c50)=>(_0x1c2240,_0xa54929)=>_0x344c50(_0x1c2240,_0xa54929,_0x2ee0ab);function _0x181b(_0xb1ae11,_0x318b9f){const _0x192349=_0x1923();return _0x181b=function(_0x181bd3,_0x418c9d){_0x181bd3=_0x181bd3-0xf5;let _0x4defb7=_0x192349[_0x181bd3];return _0x4defb7;},_0x181b(_0xb1ae11,_0x318b9f);}function X(_0x25bb61,_0xe72036){const _0x286d65=_0x4b07e7,_0x8e733f=_0x25bb61[_0x286d65(0x10a)][0x0];return{..._0xe72036,'id':_0x8e733f['replyId'],'resolved':_0x25bb61['solved']===0x1,'dT':D(_0x8e733f[_0x286d65(0x100)]),'personId':_0x8e733f[_0x286d65(0x138)],'threadId':_0x8e733f[_0x286d65(0x14f)]};}function ee(_0x34270e,_0x3c5a87,_0x6b82ad){const _0x4a34f9=_0x4b07e7;var _0x30047c,_0x4aeb13;if(((_0x4aeb13=(_0x30047c=_0x34270e==null?void 0x0:_0x34270e[_0x4a34f9(0x10a)])==null?void 0x0:_0x30047c[_0x4a34f9(0xfb)])!=null?_0x4aeb13:0x0)>0x0){const _0x3cc799=(_0x474b6b,_0x632057)=>({'id':_0x474b6b[_0x4a34f9(0x152)],'threadId':_0x474b6b['threadId'],'dT':D(_0x474b6b[_0x4a34f9(0x100)]),'personId':_0x474b6b['userId'],'resolved':_0x34270e[_0x4a34f9(0x144)]===I[_0x4a34f9(0xfe)],'unitId':_0x3c5a87,'subUnitId':_0x6b82ad,'text':JSON['parse'](_0x474b6b[_0x4a34f9(0x15a)]),'parentId':_0x632057}),_0x5b5a02=_0x3cc799(_0x34270e['replies'][0x0]);return{..._0x5b5a02,'children':_0x34270e[_0x4a34f9(0x10a)][_0x4a34f9(0x149)](0x1)[_0x4a34f9(0x119)](_0x4e43f9=>_0x3cc799(_0x4e43f9,_0x5b5a02['id']))};}return null;}let f=class{constructor(_0xa96396,_0xf6c0e7,_0x25aae8,_0xa13c7a){const _0x349230=_0x4b07e7;this[_0x349230(0x127)]=_0xa96396,this[_0x349230(0x139)]=_0xf6c0e7,this[_0x349230(0x12b)]=_0x25aae8,this[_0x349230(0x155)]=_0xa13c7a;}async[_0x4b07e7(0x15c)](_0x268f50){const _0x492111=_0x4b07e7;var _0x26e451,_0xc31f89;const {parentId:_0x4d0ae6,unitId:_0x2ffe0e,text:_0x2f6cc1,threadId:_0xd0ceb5}=_0x268f50,_0x5b0c99=(_0xc31f89=(_0x26e451=_0x2f6cc1['customRanges'])==null?void 0x0:_0x26e451[_0x492111(0x132)](_0x5c52ac=>_0x5c52ac[_0x492111(0x101)]===_0x23fccf[_0x492111(0x12c)])[_0x492111(0x119)](_0x396ad5=>_0x396ad5[_0x492111(0x156)]))!=null?_0xc31f89:[],_0x223fe2=JSON[_0x492111(0x159)](_0x2f6cc1),_0x578938=(await this[_0x492111(0x12b)][_0x492111(0x160)](_0x2ffe0e))['getMemberID']();if(_0x4d0ae6){const _0x22a6ab={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99,'threadId':_0xd0ceb5},_0x307626=(await this['_httpService']['post'](_0x492111(0xff)+_0x2ffe0e+_0x492111(0x118),{'body':_0x22a6ab}))[_0x492111(0x125)]['reply'];return{..._0x268f50,'id':_0x307626[_0x492111(0x152)],'dT':_0x471760(+_0x307626[_0x492111(0x100)])[_0x492111(0x14e)](_0x492111(0x136)),'personId':_0x307626[_0x492111(0x138)]};}else{const _0x38e7be={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99},_0x56dca0=await this[_0x492111(0x127)][_0x492111(0x113)]('/universer-api/comment/unit/'+_0x2ffe0e+'/add',{'body':_0x38e7be});return X(_0x56dca0[_0x492111(0x125)][_0x492111(0x153)],_0x268f50);}}async[_0x4b07e7(0xfd)](_0x2b5825){const _0x43bce7=_0x4b07e7;var _0xb1a846,_0x37e651;const {text:_0x3d9ae5,unitId:_0x20c932}=_0x2b5825,_0x6841ec=(_0x37e651=(_0xb1a846=_0x3d9ae5['customRanges'])==null?void 0x0:_0xb1a846[_0x43bce7(0x132)](_0x349cb4=>_0x349cb4[_0x43bce7(0x101)]===_0x23fccf['COMMENT'])[_0x43bce7(0x119)](_0x11c5df=>_0x11c5df[_0x43bce7(0x156)]))!=null?_0x37e651:[],_0x35375a=JSON[_0x43bce7(0x159)](_0x3d9ae5),_0x1dbf12=_0x2b5825['threadId'],_0x4f956c=_0x2b5825['id'],_0xdf99f8={'memberId':(await this[_0x43bce7(0x12b)]['requireSession'](_0x20c932))[_0x43bce7(0x13d)](),'unitId':_0x20c932,'threadId':_0x1dbf12,'mention':_0x6841ec,'content':_0x35375a,'replyId':_0x4f956c},_0x4c504c=await this[_0x43bce7(0x127)][_0x43bce7(0x113)](_0x43bce7(0xff)+_0x20c932+_0x43bce7(0x105),{'body':_0xdf99f8});return!_0x4c504c[_0x43bce7(0x125)]['error']||_0x4c504c['body'][_0x43bce7(0x112)][_0x43bce7(0x146)]===0x1;}async['resolveComment'](_0xeda29b){const _0x23942d=_0x4b07e7,{unitId:_0x106db7}=_0xeda29b,_0x2e58a0=_0xeda29b[_0x23942d(0x14f)],_0x586e94={'memberId':this[_0x23942d(0x139)][_0x23942d(0x116)]()[_0x23942d(0x11d)],'unitId':_0x106db7,'threadId':_0x2e58a0,'solved':_0xeda29b[_0x23942d(0x103)]?I[_0x23942d(0xfe)]:I[_0x23942d(0x158)]},_0x47f213=await this[_0x23942d(0x127)]['post']('/universer-api/comment/unit/'+_0x106db7+'/solved',{'body':_0x586e94});return!_0x47f213['body'][_0x23942d(0x112)]||_0x47f213[_0x23942d(0x125)][_0x23942d(0x112)][_0x23942d(0x146)]===0x1;}async[_0x4b07e7(0x10d)](_0x52f61f,_0x24553e,_0x3d6b6e,_0x4d1b87){const _0x4825c8=_0x4b07e7,_0x24be61={'memberId':(await this[_0x4825c8(0x12b)][_0x4825c8(0x160)](_0x52f61f))[_0x4825c8(0x13d)](),'threadId':_0x3d6b6e,'replyId':_0x4d1b87,'unitId':_0x52f61f},_0x3740a2=await this['_httpService']['post'](_0x4825c8(0xff)+_0x52f61f+_0x4825c8(0x13c),{'body':_0x24be61});return!_0x3740a2[_0x4825c8(0x125)][_0x4825c8(0x112)]||_0x3740a2['body'][_0x4825c8(0x112)][_0x4825c8(0x146)]===0x1;}async[_0x4b07e7(0xf6)](_0xb39f73,_0x9fb586,_0x43b657){const _0x3127e2=_0x4b07e7,_0x35685f={'unitId':_0xb39f73,'threadId':_0x43b657},_0x1323e3=await this['_httpService'][_0x3127e2(0x113)]('/universer-api/comment/unit/'+_0xb39f73+_0x3127e2(0x104),{'body':_0x35685f}),_0x1e6210=_0x43b657[_0x3127e2(0x119)](_0x464aad=>ee(_0x1323e3[_0x3127e2(0x125)]['comments'][_0x464aad],_0xb39f73,_0x9fb586))[_0x3127e2(0x132)](Boolean);return Object[_0x3127e2(0x142)](_0x1323e3['body'][_0x3127e2(0x13b)])[_0x3127e2(0xf5)](_0x457901=>{const _0x3beb47=_0x3127e2;this[_0x3beb47(0x139)][_0x3beb47(0x13a)](_0x457901);}),_0x1e6210;}['saveCommentToSnapshot'](_0x4cdda2){const _0x347081=_0x4b07e7;return{'id':_0x4cdda2['id'],'threadId':_0x4cdda2['threadId'],'ref':_0x4cdda2[_0x347081(0x15d)]};}};f=Q([_(0x0,_0x3c112c(_0x3849c5)),_(0x1,_0x3c112c(_0x416fe6)),_(0x2,_0x3c112c(_0x1fd658)),_(0x3,_0x3c112c(_0x15e34d))],f);var re=Object[_0x4b07e7(0x13e)],te=(_0x35f8b3,_0x572dc3,_0x31f1d6,_0x5e12e9)=>{const _0x3ed32d=_0x4b07e7;for(var _0x448a9e=_0x5e12e9>0x1?void 0x0:_0x5e12e9?re(_0x572dc3,_0x31f1d6):_0x572dc3,_0x3da971=_0x35f8b3[_0x3ed32d(0xfb)]-0x1,_0x226144;_0x3da971>=0x0;_0x3da971--)(_0x226144=_0x35f8b3[_0x3da971])&&(_0x448a9e=_0x226144(_0x448a9e)||_0x448a9e);return _0x448a9e;},N=(_0x225574,_0x52e624)=>(_0x48768a,_0x4b2472)=>_0x52e624(_0x48768a,_0x4b2472,_0x225574);let g=class extends _0x6c7d02{constructor(_0x511312,_0x556241){const _0x209718=_0x4b07e7;super(),this[_0x209718(0x12a)]=_0x511312,this[_0x209718(0x11c)]=_0x556241,this[_0x209718(0x126)]();}['_initDataSource'](){const _0x5e7ed7=_0x4b07e7;this['_threadCommentDataSourceService'][_0x5e7ed7(0x114)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5e7ed7(0x147)]=!0x1;}};g=te([N(0x0,_0x4013bc),N(0x1,_0x3c112c(f))],g);var se=Object[_0x4b07e7(0x131)],oe=Object[_0x4b07e7(0x13e)],ne=(_0x23ed34,_0x149197,_0xf47f53)=>_0x149197 in _0x23ed34?se(_0x23ed34,_0x149197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf47f53}):_0x23ed34[_0x149197]=_0xf47f53,ie=(_0x30f388,_0x4f08ba,_0x28af5a,_0x36b259)=>{const _0x42e9e8=_0x4b07e7;for(var _0xb1b034=_0x36b259>0x1?void 0x0:_0x36b259?oe(_0x4f08ba,_0x28af5a):_0x4f08ba,_0x2f1e0b=_0x30f388[_0x42e9e8(0xfb)]-0x1,_0x559d65;_0x2f1e0b>=0x0;_0x2f1e0b--)(_0x559d65=_0x30f388[_0x2f1e0b])&&(_0xb1b034=_0x559d65(_0xb1b034)||_0xb1b034);return _0xb1b034;},w=(_0x292aee,_0x414712)=>(_0x167677,_0xb23af6)=>_0x414712(_0x167677,_0xb23af6,_0x292aee),$=(_0x2d8b37,_0x791142,_0x3859c1)=>ne(_0x2d8b37,typeof _0x791142!=_0x4b07e7(0x130)?_0x791142+'':_0x791142,_0x3859c1);let b=class extends _0x2f5ef4{constructor(_0x39969e=M,_0x292be0,_0x38ca6c){const _0x3d7004=_0x4b07e7;super(),this['_config']=_0x39969e,this['_injector']=_0x292be0,this[_0x3d7004(0x14b)]=_0x38ca6c;const {..._0x3a1b14}=_0x4a2386({},M,this[_0x3d7004(0x148)]);this[_0x3d7004(0x14b)][_0x3d7004(0x111)](z,_0x3a1b14);}[_0x4b07e7(0x123)](){const _0x4f8495=_0x4b07e7;[[f],[g],[S]][_0x4f8495(0xf5)](_0x45d384=>{const _0x281297=_0x4f8495;this[_0x281297(0x155)][_0x281297(0x10e)](_0x45d384);});}['onReady'](){const _0x4943ec=_0x4b07e7;this['_injector'][_0x4943ec(0x12e)](g),this['_injector']['get'](S);}};$(b,_0x4b07e7(0x135),W),$(b,'type',_0x514331['UNIVER_UNKNOWN']),b=ie([_0x5e5e54(_0xe804bc,_0x3d47fa,_0x21e0fd),w(0x1,_0x3c112c(_0x15e34d)),w(0x2,_0x1e0359)],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 _0x495c(_0x20bd29,_0x30fb79){const _0x408862=_0x4088();return _0x495c=function(_0x495c7d,_0x5fd996){_0x495c7d=_0x495c7d-0xbd;let _0x393b7b=_0x408862[_0x495c7d];return _0x393b7b;},_0x495c(_0x20bd29,_0x30fb79);}(function(_0xa3c9a7,_0x2703f6){const _0x357327=_0x495c,_0x56e544=_0xa3c9a7();while(!![]){try{const _0x5bd3ec=parseInt(_0x357327(0xe7))/0x1+-parseInt(_0x357327(0xbd))/0x2*(parseInt(_0x357327(0xd1))/0x3)+-parseInt(_0x357327(0xda))/0x4+-parseInt(_0x357327(0x10f))/0x5*(parseInt(_0x357327(0x117))/0x6)+parseInt(_0x357327(0x131))/0x7+parseInt(_0x357327(0x10a))/0x8+parseInt(_0x357327(0xf3))/0x9*(parseInt(_0x357327(0x123))/0xa);if(_0x5bd3ec===_0x2703f6)break;else _0x56e544['push'](_0x56e544['shift']());}catch(_0x251772){_0x56e544['push'](_0x56e544['shift']());}}}(_0x4088,0xa6a3f),function(_0x3486ea,_0x317126){const _0x36df24=_0x495c;typeof exports==_0x36df24(0xd3)&&typeof module<'u'?_0x317126(exports,require('@univerjs-pro/collaboration-client'),require(_0x36df24(0x134)),require(_0x36df24(0xf6)),require(_0x36df24(0xea)),require(_0x36df24(0xfe)),require('rxjs'),require(_0x36df24(0xca))):typeof define==_0x36df24(0xe6)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x36df24(0x134),_0x36df24(0xf6),'@univerjs/thread-comment-ui',_0x36df24(0xfe),'rxjs','@univerjs/network'],_0x317126):(_0x3486ea=typeof globalThis<'u'?globalThis:_0x3486ea||self,_0x317126(_0x3486ea['UniverProThreadCommentDatasource']={},_0x3486ea[_0x36df24(0x11a)],_0x3486ea['UniverProLicense'],_0x3486ea[_0x36df24(0x13c)],_0x3486ea[_0x36df24(0xe4)],_0x3486ea[_0x36df24(0xc5)],_0x3486ea[_0x36df24(0xf0)],_0x3486ea['UniverNetwork']));}(this,function(_0x4f4d62,_0x4be1ec,_0x5699d5,_0xab27a6,_0x4df0d4,_0x313a66,_0x257afd,_0x4f5a03){'use strict';const _0x4d69f0=_0x495c;const _0x43a0a7=_0x4d69f0(0x100);var _0x523864=(_0x4e6981=>(_0x4e6981[_0x4e6981[_0x4d69f0(0x13e)]=0x0]=_0x4d69f0(0x13e),_0x4e6981[_0x4e6981[_0x4d69f0(0x10d)]=0x1]=_0x4d69f0(0x10d),_0x4e6981[_0x4e6981[_0x4d69f0(0x12b)]=-0x1]=_0x4d69f0(0x12b),_0x4e6981))(_0x523864||{}),_0x37cf78=(_0x5c11a0=>(_0x5c11a0[_0x5c11a0['Unknown']=0x0]=_0x4d69f0(0x133),_0x5c11a0[_0x5c11a0[_0x4d69f0(0xf8)]=0x1]=_0x4d69f0(0xf8),_0x5c11a0[_0x5c11a0['Reply']=0x2]='Reply',_0x5c11a0[_0x5c11a0[_0x4d69f0(0x124)]=0x3]=_0x4d69f0(0x124),_0x5c11a0[_0x5c11a0['Delete']=0x4]='Delete',_0x5c11a0[_0x5c11a0['Solve']=0x5]=_0x4d69f0(0x138),_0x5c11a0[_0x5c11a0['UNRECOGNIZED']=-0x1]=_0x4d69f0(0x12b),_0x5c11a0))(_0x37cf78||{});const _0x21145a=_0x1ee46e=>_0xab27a6[_0x4d69f0(0xf4)](new Date(+_0x1ee46e))[_0x4d69f0(0xc1)](_0x4d69f0(0x11b)),_0x6824af=async(_0x302bbd,_0x4d4fb1)=>{const _0x5e068d=_0x4d69f0,_0x4c9815=_0x302bbd[_0x5e068d(0x112)](_0xab27a6[_0x5e068d(0x122)]),_0x3f9578=_0x302bbd[_0x5e068d(0x112)](_0x4f5a03[_0x5e068d(0xf1)]);_0x4d4fb1[_0x5e068d(0xde)](_0x37ce4a=>{const _0x59a987=_0x5e068d;_0x4c9815[_0x59a987(0xef)](_0x37ce4a)&&_0x4d4fb1['delete'](_0x37ce4a);}),_0x4d4fb1['size']&&(await _0x3f9578[_0x5e068d(0x112)](_0x5e068d(0x105),{'params':{'userIDs':[..._0x4d4fb1]}}))['body'][_0x5e068d(0x126)][_0x5e068d(0xde)](_0x2e1f25=>{const _0x2dff17=_0x5e068d;_0x2e1f25&&_0x4c9815[_0x2dff17(0xc2)](_0x2e1f25);});};var _0x4aff70=Object[_0x4d69f0(0xdb)],_0x4b0991=(_0x205b53,_0x4b65ca,_0x3a3f34,_0x7feb2c)=>{const _0x2a24ef=_0x4d69f0;for(var _0x5de04b=_0x7feb2c>0x1?void 0x0:_0x7feb2c?_0x4aff70(_0x4b65ca,_0x3a3f34):_0x4b65ca,_0x3b0051=_0x205b53[_0x2a24ef(0xc7)]-0x1,_0x2f53c1;_0x3b0051>=0x0;_0x3b0051--)(_0x2f53c1=_0x205b53[_0x3b0051])&&(_0x5de04b=_0x2f53c1(_0x5de04b)||_0x5de04b);return _0x5de04b;},_0x507ccd=(_0x17a9e4,_0x28f1d8)=>(_0x5eeaa3,_0x3d51ff)=>_0x28f1d8(_0x5eeaa3,_0x3d51ff,_0x17a9e4);let _0x1aa0a9=class extends _0xab27a6[_0x4d69f0(0xc9)]{constructor(_0x11dc96,_0x5cc002,_0x3b9b1d,_0x5101a3){const _0x3ca6e4=_0x4d69f0;super(),this[_0x3ca6e4(0xe8)]=_0x11dc96,this[_0x3ca6e4(0xd4)]=_0x5cc002,this[_0x3ca6e4(0xf9)]=_0x3b9b1d,this['_injector']=_0x5101a3,this['_init'](),this[_0x3ca6e4(0x11e)]();}[_0x4d69f0(0x11e)](){const _0x4abcf2=_0x4d69f0;this[_0x4abcf2(0x12a)](this[_0x4abcf2(0xd4)][_0x4abcf2(0x110)]['pipe'](_0x257afd[_0x4abcf2(0x129)](0x10))[_0x4abcf2(0xd7)](_0x3c2d90=>{const _0x3ad64d=_0x4abcf2,_0x545905=new Set();_0x3c2d90[_0x3ad64d(0xde)](_0x39dc87=>{const _0x13e8de=_0x3ad64d;switch(_0x39dc87[_0x13e8de(0x130)]){case _0x13e8de(0xd9):{const _0x39018f=_0x39dc87[_0x13e8de(0x139)][_0x13e8de(0x11c)];_0x545905['add'](_0x39018f);break;}}}),_0x6824af(this['_injector'],_0x545905);}));}[_0x4d69f0(0xc0)](){const _0x7346b3=_0x4d69f0;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x7346b3(0xd7)](async _0x1a1917=>{const _0x3a5a33=_0x7346b3;var _0x44a090,_0x359ff5,_0x56a2f2,_0x10e22d;const _0x59e5f3=(_0x44a090=this[_0x3a5a33(0xd4)][_0x3a5a33(0xd5)](_0x1a1917[_0x3a5a33(0xe5)])[_0x3a5a33(0xbe)](_0x431753=>_0x431753['threadId']===_0x1a1917['threadId']))==null?void 0x0:_0x44a090[_0x3a5a33(0xf2)];if(!_0x59e5f3)return;const {unitId:_0x11b199,subUnitId:_0x5940d5}=_0x59e5f3;switch(_0x1a1917[_0x3a5a33(0xc8)]&&this[_0x3a5a33(0xf9)][_0x3a5a33(0xc2)](_0x1a1917['user']),_0x1a1917['type']){case _0x37cf78['Add']:break;case _0x37cf78[_0x3a5a33(0xed)]:{this[_0x3a5a33(0xd4)][_0x3a5a33(0xeb)](_0x11b199,_0x5940d5,{'unitId':_0x11b199,'subUnitId':_0x5940d5,'ref':'','id':_0x1a1917['replyId'],'dT':_0x21145a(+_0x1a1917['createTimestamp']),'threadId':_0x1a1917[_0x3a5a33(0xcf)],'personId':(_0x56a2f2=(_0x359ff5=_0x1a1917[_0x3a5a33(0xc8)])==null?void 0x0:_0x359ff5[_0x3a5a33(0x119)])!=null?_0x56a2f2:_0x1a1917[_0x3a5a33(0x12f)],'text':JSON[_0x3a5a33(0x128)](_0x1a1917[_0x3a5a33(0x115)]),'parentId':_0x59e5f3['id']});break;}case _0x37cf78[_0x3a5a33(0x108)]:{const _0x111d26=this[_0x3a5a33(0xd4)]['getComment'](_0x11b199,_0x5940d5,_0x1a1917[_0x3a5a33(0xcd)]);_0x111d26&&_0x111d26[_0x3a5a33(0xd8)]&&this[_0x3a5a33(0xd4)][_0x3a5a33(0x13a)](_0x11b199,_0x5940d5,_0x1a1917[_0x3a5a33(0xcd)]);break;}case _0x37cf78[_0x3a5a33(0x124)]:{this[_0x3a5a33(0xd4)][_0x3a5a33(0x107)](_0x11b199,_0x5940d5,{'commentId':_0x1a1917['replyId'],'text':JSON[_0x3a5a33(0x128)](_0x1a1917[_0x3a5a33(0x115)])});break;}case _0x37cf78[_0x3a5a33(0x138)]:{const _0x24d6bc=(_0x10e22d=this[_0x3a5a33(0xd4)][_0x3a5a33(0xd5)](_0x1a1917['unitId'])[_0x3a5a33(0xbe)](_0x59a370=>_0x59a370[_0x3a5a33(0xcf)]===_0x1a1917['threadId']))==null?void 0x0:_0x10e22d[_0x3a5a33(0xf2)];_0x24d6bc&&this[_0x3a5a33(0xd4)][_0x3a5a33(0x11f)](_0x11b199,_0x5940d5,_0x24d6bc['id'],_0x1a1917[_0x3a5a33(0x127)]===_0x523864['Solved']);break;}}}));}};_0x1aa0a9=_0x4b0991([_0x507ccd(0x0,_0xab27a6['Inject'](_0x4be1ec[_0x4d69f0(0xe9)])),_0x507ccd(0x1,_0xab27a6['Inject'](_0x313a66[_0x4d69f0(0x11d)])),_0x507ccd(0x2,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0x122)])),_0x507ccd(0x3,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)]))],_0x1aa0a9);const _0x1f5605=_0x4d69f0(0x10c),_0x4b6f52={};var _0x36980a=Object['getOwnPropertyDescriptor'],_0x166a2d=(_0x475e2b,_0x4013b2,_0x1d4ee8,_0x227916)=>{const _0xceba13=_0x4d69f0;for(var _0x15bebd=_0x227916>0x1?void 0x0:_0x227916?_0x36980a(_0x4013b2,_0x1d4ee8):_0x4013b2,_0x4bac9b=_0x475e2b[_0xceba13(0xc7)]-0x1,_0x2cc268;_0x4bac9b>=0x0;_0x4bac9b--)(_0x2cc268=_0x475e2b[_0x4bac9b])&&(_0x15bebd=_0x2cc268(_0x15bebd)||_0x15bebd);return _0x15bebd;},_0x125dc5=(_0xb73bf3,_0x3c159d)=>(_0x25e4f7,_0x4525b4)=>_0x3c159d(_0x25e4f7,_0x4525b4,_0xb73bf3);function _0x5729bb(_0x4d85eb,_0x1b974a){const _0x26dcad=_0x4d69f0,_0x27d1bd=_0x4d85eb[_0x26dcad(0xff)][0x0];return{..._0x1b974a,'id':_0x27d1bd[_0x26dcad(0xcd)],'resolved':_0x4d85eb[_0x26dcad(0x127)]===0x1,'dT':_0x21145a(_0x27d1bd[_0x26dcad(0x10e)]),'personId':_0x27d1bd['userId'],'threadId':_0x27d1bd['threadId']};}function _0x1a2f96(_0x34efd0,_0x19f6e1,_0x30587b){const _0x3f1935=_0x4d69f0;var _0x2a410f,_0x3975f7;if(((_0x3975f7=(_0x2a410f=_0x34efd0==null?void 0x0:_0x34efd0[_0x3f1935(0xff)])==null?void 0x0:_0x2a410f['length'])!=null?_0x3975f7:0x0)>0x0){const _0x4ba5c1=(_0x256ffc,_0x85ccf6)=>({'id':_0x256ffc[_0x3f1935(0xcd)],'threadId':_0x256ffc[_0x3f1935(0xcf)],'dT':_0x21145a(_0x256ffc[_0x3f1935(0x10e)]),'personId':_0x256ffc[_0x3f1935(0x12f)],'resolved':_0x34efd0[_0x3f1935(0x127)]===_0x523864[_0x3f1935(0x10d)],'unitId':_0x19f6e1,'subUnitId':_0x30587b,'text':JSON[_0x3f1935(0x128)](_0x256ffc[_0x3f1935(0x115)]),'parentId':_0x85ccf6}),_0x74174c=_0x4ba5c1(_0x34efd0[_0x3f1935(0xff)][0x0]);return{..._0x74174c,'children':_0x34efd0[_0x3f1935(0xff)][_0x3f1935(0x125)](0x1)[_0x3f1935(0x101)](_0x2037b3=>_0x4ba5c1(_0x2037b3,_0x74174c['id']))};}return null;}let _0x45c26b=class{constructor(_0x15cd4f,_0x60b8bf,_0x40a9a0,_0x53f914){const _0x3861a9=_0x4d69f0;this[_0x3861a9(0x12c)]=_0x15cd4f,this[_0x3861a9(0xf9)]=_0x60b8bf,this[_0x3861a9(0xcb)]=_0x40a9a0,this[_0x3861a9(0x136)]=_0x53f914;}async[_0x4d69f0(0xeb)](_0x53d4bc){const _0x15169a=_0x4d69f0;var _0x475079,_0x5880a9;const {parentId:_0x104d37,unitId:_0x4f3653,text:_0x1eec2e,threadId:_0x2aa013}=_0x53d4bc,_0x428023=(_0x5880a9=(_0x475079=_0x1eec2e['customRanges'])==null?void 0x0:_0x475079[_0x15169a(0xdd)](_0x568119=>_0x568119[_0x15169a(0xce)]===_0xab27a6[_0x15169a(0xd2)]['COMMENT'])['map'](_0x57f7d7=>_0x57f7d7['rangeId']))!=null?_0x5880a9:[],_0x204d80=JSON[_0x15169a(0xf7)](_0x1eec2e),_0x1dfbbe=(await this[_0x15169a(0xcb)][_0x15169a(0xfc)](_0x4f3653))['getMemberID']();if(_0x104d37){const _0x501b0f={'memberId':_0x1dfbbe,'unitId':_0x4f3653,'content':_0x204d80,'mention':_0x428023,'threadId':_0x2aa013},_0x235249=(await this['_httpService']['post'](_0x15169a(0x106)+_0x4f3653+_0x15169a(0xd0),{'body':_0x501b0f}))[_0x15169a(0x13f)][_0x15169a(0x114)];return{..._0x53d4bc,'id':_0x235249[_0x15169a(0xcd)],'dT':_0xab27a6['dayjs'](+_0x235249[_0x15169a(0x10e)])[_0x15169a(0xc1)](_0x15169a(0x11b)),'personId':_0x235249['userId']};}else{const _0x205c3e={'memberId':_0x1dfbbe,'unitId':_0x4f3653,'content':_0x204d80,'mention':_0x428023},_0x50453d=await this[_0x15169a(0x12c)][_0x15169a(0x104)](_0x15169a(0x106)+_0x4f3653+_0x15169a(0x116),{'body':_0x205c3e});return _0x5729bb(_0x50453d[_0x15169a(0x13f)][_0x15169a(0xdf)],_0x53d4bc);}}async[_0x4d69f0(0x107)](_0x101936){const _0x1d8674=_0x4d69f0;var _0x411dc6,_0x30ea97;const {text:_0x19f7d4,unitId:_0x5e130f}=_0x101936,_0x1f4ac3=(_0x30ea97=(_0x411dc6=_0x19f7d4[_0x1d8674(0xcc)])==null?void 0x0:_0x411dc6['filter'](_0x62b157=>_0x62b157[_0x1d8674(0xce)]===_0xab27a6[_0x1d8674(0xd2)][_0x1d8674(0x132)])[_0x1d8674(0x101)](_0x4afa6c=>_0x4afa6c['rangeId']))!=null?_0x30ea97:[],_0x338f3f=JSON[_0x1d8674(0xf7)](_0x19f7d4),_0xba0fed=_0x101936[_0x1d8674(0xcf)],_0x4aa8dd=_0x101936['id'],_0x2775c0={'memberId':(await this[_0x1d8674(0xcb)][_0x1d8674(0xfc)](_0x5e130f))[_0x1d8674(0x12d)](),'unitId':_0x5e130f,'threadId':_0xba0fed,'mention':_0x1f4ac3,'content':_0x338f3f,'replyId':_0x4aa8dd},_0x2eaf6e=await this[_0x1d8674(0x12c)][_0x1d8674(0x104)]('/universer-api/comment/unit/'+_0x5e130f+_0x1d8674(0x109),{'body':_0x2775c0});return!_0x2eaf6e[_0x1d8674(0x13f)][_0x1d8674(0x113)]||_0x2eaf6e['body'][_0x1d8674(0x113)][_0x1d8674(0xec)]===0x1;}async['resolveComment'](_0x25eeec){const _0x3282c8=_0x4d69f0,{unitId:_0x37d67a}=_0x25eeec,_0x34c00a=_0x25eeec[_0x3282c8(0xcf)],_0x5cf4e8={'memberId':this[_0x3282c8(0xf9)]['getCurrentUser']()['userID'],'unitId':_0x37d67a,'threadId':_0x34c00a,'solved':_0x25eeec[_0x3282c8(0x10b)]?_0x523864[_0x3282c8(0x10d)]:_0x523864[_0x3282c8(0x13e)]},_0x4af850=await this['_httpService']['post'](_0x3282c8(0x106)+_0x37d67a+_0x3282c8(0x118),{'body':_0x5cf4e8});return!_0x4af850[_0x3282c8(0x13f)][_0x3282c8(0x113)]||_0x4af850[_0x3282c8(0x13f)]['error'][_0x3282c8(0xec)]===0x1;}async[_0x4d69f0(0x13a)](_0x1d507a,_0x3ff1ea,_0xf521a5,_0x2b29d8){const _0x1b55b1=_0x4d69f0,_0x10af34={'memberId':(await this[_0x1b55b1(0xcb)]['requireSession'](_0x1d507a))[_0x1b55b1(0x12d)](),'threadId':_0xf521a5,'replyId':_0x2b29d8,'unitId':_0x1d507a},_0xd04208=await this['_httpService'][_0x1b55b1(0x104)]('/universer-api/comment/unit/'+_0x1d507a+_0x1b55b1(0xe1),{'body':_0x10af34});return!_0xd04208[_0x1b55b1(0x13f)][_0x1b55b1(0x113)]||_0xd04208['body']['error'][_0x1b55b1(0xec)]===0x1;}async['listComments'](_0x3b0fe4,_0x4ab459,_0x222c24){const _0x59e2c9=_0x4d69f0,_0x3f0c53={'unitId':_0x3b0fe4,'threadId':_0x222c24},_0x27ae75=await this[_0x59e2c9(0x12c)][_0x59e2c9(0x104)](_0x59e2c9(0x106)+_0x3b0fe4+_0x59e2c9(0xee),{'body':_0x3f0c53}),_0x35711b=_0x222c24[_0x59e2c9(0x101)](_0x24a639=>_0x1a2f96(_0x27ae75[_0x59e2c9(0x13f)]['comments'][_0x24a639],_0x3b0fe4,_0x4ab459))['filter'](Boolean);return Object[_0x59e2c9(0x120)](_0x27ae75['body'][_0x59e2c9(0x126)])[_0x59e2c9(0xde)](_0x324968=>{const _0x2c2ba4=_0x59e2c9;this[_0x2c2ba4(0xf9)]['addUser'](_0x324968);}),_0x35711b;}[_0x4d69f0(0xc3)](_0x8eb15){const _0x3e7396=_0x4d69f0;return{'id':_0x8eb15['id'],'threadId':_0x8eb15[_0x3e7396(0xcf)],'ref':_0x8eb15[_0x3e7396(0xe2)]};}};_0x45c26b=_0x166a2d([_0x125dc5(0x0,_0xab27a6[_0x4d69f0(0xc4)](_0x4f5a03['HTTPService'])),_0x125dc5(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0x122)])),_0x125dc5(0x2,_0xab27a6[_0x4d69f0(0xc4)](_0x4be1ec[_0x4d69f0(0x12e)])),_0x125dc5(0x3,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)]))],_0x45c26b);var _0x2c83e3=Object['getOwnPropertyDescriptor'],_0x20ce87=(_0x5614aa,_0x2ef186,_0x1a0ae4,_0x1373ed)=>{const _0x1afad1=_0x4d69f0;for(var _0x57d500=_0x1373ed>0x1?void 0x0:_0x1373ed?_0x2c83e3(_0x2ef186,_0x1a0ae4):_0x2ef186,_0x4bdae2=_0x5614aa[_0x1afad1(0xc7)]-0x1,_0xd695b8;_0x4bdae2>=0x0;_0x4bdae2--)(_0xd695b8=_0x5614aa[_0x4bdae2])&&(_0x57d500=_0xd695b8(_0x57d500)||_0x57d500);return _0x57d500;},_0xf66220=(_0x52ddc6,_0xe9fc40)=>(_0x4e8c4f,_0x18d8e6)=>_0xe9fc40(_0x4e8c4f,_0x18d8e6,_0x52ddc6);let _0x4643c0=class extends _0xab27a6[_0x4d69f0(0xc9)]{constructor(_0x10dc9d,_0x1476b2){const _0x4d62ed=_0x4d69f0;super(),this['_threadCommentDataSourceService']=_0x10dc9d,this[_0x4d62ed(0xe3)]=_0x1476b2,this['_initDataSource']();}['_initDataSource'](){const _0x44945a=_0x4d69f0;this[_0x44945a(0x103)]['dataSource']=this[_0x44945a(0xe3)],this[_0x44945a(0x103)][_0x44945a(0x137)]=!0x1;}};_0x4643c0=_0x20ce87([_0xf66220(0x0,_0x313a66[_0x4d69f0(0xbf)]),_0xf66220(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0x45c26b))],_0x4643c0);var _0x13c838=Object[_0x4d69f0(0xf5)],_0x3d8df0=Object['getOwnPropertyDescriptor'],_0x51c580=(_0x538264,_0x19cf21,_0x4ad2e0)=>_0x19cf21 in _0x538264?_0x13c838(_0x538264,_0x19cf21,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ad2e0}):_0x538264[_0x19cf21]=_0x4ad2e0,_0x24f5c2=(_0x3231aa,_0x1f1dfd,_0x20c0b5,_0x5bf2b7)=>{for(var _0x49efc7=_0x5bf2b7>0x1?void 0x0:_0x5bf2b7?_0x3d8df0(_0x1f1dfd,_0x20c0b5):_0x1f1dfd,_0x42308c=_0x3231aa['length']-0x1,_0x1be820;_0x42308c>=0x0;_0x42308c--)(_0x1be820=_0x3231aa[_0x42308c])&&(_0x49efc7=_0x1be820(_0x49efc7)||_0x49efc7);return _0x49efc7;},_0xb7e5b8=(_0x37f166,_0x1de625)=>(_0xf7fdb1,_0x2375d8)=>_0x1de625(_0xf7fdb1,_0x2375d8,_0x37f166),_0x1d6842=(_0x37d0dc,_0x5b8408,_0x2ae1ce)=>_0x51c580(_0x37d0dc,typeof _0x5b8408!='symbol'?_0x5b8408+'':_0x5b8408,_0x2ae1ce);_0x4f4d62[_0x4d69f0(0xfa)]=class extends _0xab27a6[_0x4d69f0(0x121)]{constructor(_0x1ad055=_0x4b6f52,_0x248c69,_0x543aa4){const _0x3de0f2=_0x4d69f0;super(),this['_config']=_0x1ad055,this['_injector']=_0x248c69,this[_0x3de0f2(0x102)]=_0x543aa4;const {..._0x276d8a}=_0xab27a6[_0x3de0f2(0x13b)]({},_0x4b6f52,this[_0x3de0f2(0x13d)]);this[_0x3de0f2(0x102)]['setConfig'](_0x1f5605,_0x276d8a);}['onStarting'](){const _0x48ce7d=_0x4d69f0;[[_0x45c26b],[_0x4643c0],[_0x1aa0a9]][_0x48ce7d(0xde)](_0x2dca17=>{const _0x1e44e7=_0x48ce7d;this[_0x1e44e7(0x136)][_0x1e44e7(0xd9)](_0x2dca17);});}['onReady'](){const _0x3f0d19=_0x4d69f0;this[_0x3f0d19(0x136)][_0x3f0d19(0x112)](_0x4643c0),this[_0x3f0d19(0x136)][_0x3f0d19(0x112)](_0x1aa0a9);}},_0x1d6842(_0x4f4d62[_0x4d69f0(0xfa)],_0x4d69f0(0xdc),_0x43a0a7),_0x1d6842(_0x4f4d62[_0x4d69f0(0xfa)],'type',_0xab27a6['UniverInstanceType'][_0x4d69f0(0xe0)]),_0x4f4d62[_0x4d69f0(0xfa)]=_0x24f5c2([_0xab27a6[_0x4d69f0(0xfd)](_0x4df0d4[_0x4d69f0(0x135)],_0x4be1ec[_0x4d69f0(0xfb)],_0x5699d5['UniverLicensePlugin']),_0xb7e5b8(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)])),_0xb7e5b8(0x2,_0xab27a6[_0x4d69f0(0xc6)])],_0x4f4d62['UniverThreadCommentDataSourcePlugin']),Object[_0x4d69f0(0xf5)](_0x4f4d62,Symbol['toStringTag'],{'value':_0x4d69f0(0x111)});}));function _0x4088(){const _0xfee050=['reply','content','/add','24TpXImn','/solved','userID','UniverProCollaborationClient','YYYY/MM/DD\x20HH:mm','personId','ThreadCommentModel','_initUserSync','resolveComment','values','Plugin','UserManagerService','10BsRNhH','Edit','slice','users','solved','parse','bufferTime','disposeWithMe','UNRECOGNIZED','_httpService','getMemberID','CollaborationSessionService','userId','type','5500306PMZbmN','COMMENT','Unknown','@univerjs-pro/license','UniverThreadCommentUIPlugin','_injector','syncUpdateMutationToColla','Solve','payload','deleteComment','merge','UniverCore','_config','OpenOrReOpen','body','330452dbAkFm','find','IThreadCommentDataSourceService','_init','format','addUser','saveCommentToSnapshot','Inject','UniverThreadComment','IConfigService','length','user','Disposable','@univerjs/network','_sessionService','customRanges','replyId','rangeType','threadId','/reply','18XAAFfm','CustomRangeType','object','_threadCommentModel','getUnit','Injector','subscribe','parentId','add','1475836jSqCGl','getOwnPropertyDescriptor','pluginName','filter','forEach','comment','UNIVER_UNKNOWN','/delete','ref','_threadCommentDataSource','UniverThreadCommentUi','unitId','function','1115818aPIYoa','_commentService','CommentService','@univerjs/thread-comment-ui','addComment','code','Reply','/list','getUser','rxjs','HTTPService','root','4625568iXOnUQ','dayjs','defineProperty','@univerjs/core','stringify','Add','_userService','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','requireSession','DependentOn','@univerjs/thread-comment','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','_configService','_threadCommentDataSourceService','post','/universer-api/user/list','/universer-api/comment/unit/','updateComment','Delete','/edit','3099664zTYMMk','resolved','thread-comment-data-source.config','Solved','createTimestamp','950140HYBvgU','commentUpdate$','Module','get','error'];_0x4088=function(){return _0xfee050;};return _0x4088();}
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-aa3ee78",
3
+ "version": "0.6.7-experimental.20250331-1a09136",
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-aa3ee78",
49
- "@univerjs/core": "0.6.7-experimental.20250331-aa3ee78",
50
- "@univerjs-pro/license": "0.6.7-experimental.20250331-aa3ee78",
48
+ "@univerjs-pro/license": "0.6.7-experimental.20250331-1a09136",
49
+ "@univerjs/core": "0.6.7-experimental.20250331-1a09136",
50
+ "@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-1a09136",
51
+ "@univerjs/network": "0.6.7-experimental.20250331-1a09136",
51
52
  "@univerjs/protocol": "0.1.45",
52
- "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-aa3ee78",
53
- "@univerjs/thread-comment": "0.6.7-experimental.20250331-aa3ee78",
54
- "@univerjs/network": "0.6.7-experimental.20250331-aa3ee78"
53
+ "@univerjs/thread-comment": "0.6.7-experimental.20250331-1a09136",
54
+ "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-1a09136"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",