@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505201607 → 0.7.0-nightly.202505221607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x54d2b6=_0x4e5f;(function(_0x500d0d,_0x118707){const _0x5eaefd=_0x4e5f,_0x5a4f37=_0x500d0d();while(!![]){try{const _0x489c8c=-parseInt(_0x5eaefd(0x88))/0x1*(parseInt(_0x5eaefd(0xe5))/0x2)+parseInt(_0x5eaefd(0xdd))/0x3*(parseInt(_0x5eaefd(0xb0))/0x4)+parseInt(_0x5eaefd(0xb9))/0x5+parseInt(_0x5eaefd(0x84))/0x6*(-parseInt(_0x5eaefd(0xa5))/0x7)+parseInt(_0x5eaefd(0x72))/0x8*(parseInt(_0x5eaefd(0xd6))/0x9)+-parseInt(_0x5eaefd(0xda))/0xa+parseInt(_0x5eaefd(0xe7))/0xb;if(_0x489c8c===_0x118707)break;else _0x5a4f37['push'](_0x5a4f37['shift']());}catch(_0x5b2525){_0x5a4f37['push'](_0x5a4f37['shift']());}}}(_0xcfff,0x38cca));Object['defineProperty'](exports,Symbol[_0x54d2b6(0xc3)],{'value':_0x54d2b6(0x81)});const b=require(_0x54d2b6(0x77)),T=require('@univerjs-pro/license'),c=require(_0x54d2b6(0xd0)),j=require(_0x54d2b6(0xd3)),M=require(_0x54d2b6(0xb2)),w=require(_0x54d2b6(0xc2)),P=require('@univerjs/network'),U=_0x54d2b6(0x99);var I=(_0xd81179=>(_0xd81179[_0xd81179['OpenOrReOpen']=0x0]=_0x54d2b6(0xc5),_0xd81179[_0xd81179[_0x54d2b6(0xc6)]=0x1]=_0x54d2b6(0xc6),_0xd81179[_0xd81179['UNRECOGNIZED']=-0x1]=_0x54d2b6(0xb8),_0xd81179))(I||{}),v=(_0x4256f3=>(_0x4256f3[_0x4256f3[_0x54d2b6(0x7c)]=0x0]=_0x54d2b6(0x7c),_0x4256f3[_0x4256f3['Add']=0x1]='Add',_0x4256f3[_0x4256f3[_0x54d2b6(0x85)]=0x2]='Reply',_0x4256f3[_0x4256f3[_0x54d2b6(0xc7)]=0x3]=_0x54d2b6(0xc7),_0x4256f3[_0x4256f3[_0x54d2b6(0xbc)]=0x4]=_0x54d2b6(0xbc),_0x4256f3[_0x4256f3[_0x54d2b6(0xe1)]=0x5]=_0x54d2b6(0xe1),_0x4256f3[_0x4256f3[_0x54d2b6(0xb8)]=-0x1]=_0x54d2b6(0xb8),_0x4256f3))(v||{});const f=_0x47eec8=>c[_0x54d2b6(0xd4)](new Date(+_0x47eec8))[_0x54d2b6(0xa2)](_0x54d2b6(0xe0)),R=async(_0x23efbd,_0x5dd69b)=>{const _0x30ea7d=_0x54d2b6,_0x4be781=_0x23efbd['get'](c['UserManagerService']),_0xf637fc=_0x23efbd['get'](P[_0x30ea7d(0xa7)]);_0x5dd69b['forEach'](_0x1efdad=>{const _0x3a6043=_0x30ea7d;_0x4be781['getUser'](_0x1efdad)&&_0x5dd69b[_0x3a6043(0xe4)](_0x1efdad);}),_0x5dd69b['size']&&(await _0xf637fc[_0x30ea7d(0xa1)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5dd69b]}}))[_0x30ea7d(0xe6)][_0x30ea7d(0xad)]['forEach'](_0x36770d=>{const _0x355a8a=_0x30ea7d;_0x36770d&&_0x4be781[_0x355a8a(0x73)](_0x36770d);});};function _0x4e5f(_0x976592,_0x3d7f7f){const _0xcfff69=_0xcfff();return _0x4e5f=function(_0x4e5ff6,_0x4705d4){_0x4e5ff6=_0x4e5ff6-0x6e;let _0x444ae0=_0xcfff69[_0x4e5ff6];return _0x444ae0;},_0x4e5f(_0x976592,_0x3d7f7f);}function _0xcfff(){const _0x30b276=['find','commentUpdate$','Inject','@univerjs/core','userId','UniverLicensePlugin','@univerjs/thread-comment-ui','dayjs','requireSession','369ZejqLT','Injector','code','disposeWithMe','1245080qEqmZb','_httpService','threadId','3sVvawn','Plugin','_init','YYYY/MM/DD\x20HH:mm','Solve','listComments','post','delete','466FERhXK','body','415008XesoDY','DependentOn','_sessionService','customRanges','comment','addComment','64440pqBuaM','addUser','getOwnPropertyDescriptor','pipe','replyId','@univerjs-pro/collaboration-client','stringify','root','UniverThreadCommentUIPlugin','/delete','Unknown','userID','symbol','payload','IConfigService','Module','forEach','resolveComment','18OOqPHr','Reply','comments','_threadCommentDataSourceService','1052mEMiwN','syncUpdateMutationToColla','ref','pluginName','IThreadCommentDataSourceService','values','onReady','updateComment','_threadCommentDataSource','rangeType','error','createTimestamp','reply','parse','map','subscribe','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','COMMENT','CustomRangeType','_config','getMemberID','length','UniverThreadCommentDataSourcePlugin','get','format','getUnit','filter','699139zQPJri','content','HTTPService','getCurrentUser','_injector','slice','/universer-api/comment/unit/','_initDataSource','users','_configService','saveCommentToSnapshot','637148BtlUSg','_initUserSync','@univerjs/thread-comment','deleteComment','Disposable','_threadCommentModel','rangeId','onStarting','UNRECOGNIZED','1873175nltUPi','_commentService','type','Delete','solved','bufferTime','user','add','getComment','rxjs','toStringTag','replies','OpenOrReOpen','Solved','Edit','personId','parentId','/reply','UserManagerService','unitId'];_0xcfff=function(){return _0x30b276;};return _0xcfff();}var $=Object[_0x54d2b6(0x74)],E=(_0x32e8c5,_0x3bbc1c,_0x3cd596,_0x58ee1e)=>{const _0x143e61=_0x54d2b6;for(var _0xa1505e=_0x58ee1e>0x1?void 0x0:_0x58ee1e?$(_0x3bbc1c,_0x3cd596):_0x3bbc1c,_0x3182bb=_0x32e8c5[_0x143e61(0x9f)]-0x1,_0x208ea1;_0x3182bb>=0x0;_0x3182bb--)(_0x208ea1=_0x32e8c5[_0x3182bb])&&(_0xa1505e=_0x208ea1(_0xa1505e)||_0xa1505e);return _0xa1505e;},S=(_0x6e72f2,_0x414da5)=>(_0x298c3b,_0x2514f9)=>_0x414da5(_0x298c3b,_0x2514f9,_0x6e72f2);let p=class extends c[_0x54d2b6(0xb4)]{constructor(_0x374d6f,_0x48b41f,_0x2085ab,_0x36397f){const _0x423911=_0x54d2b6;super(),this[_0x423911(0xba)]=_0x374d6f,this[_0x423911(0xb5)]=_0x48b41f,this['_userService']=_0x2085ab,this[_0x423911(0xa9)]=_0x36397f,this[_0x423911(0xdf)](),this['_initUserSync']();}[_0x54d2b6(0xb1)](){const _0x19d1f5=_0x54d2b6;this[_0x19d1f5(0xd9)](this[_0x19d1f5(0xb5)][_0x19d1f5(0xce)][_0x19d1f5(0x75)](w[_0x19d1f5(0xbe)](0x10))[_0x19d1f5(0x97)](_0x40df0a=>{const _0x3d8150=_0x19d1f5,_0x17fffc=new Set();_0x40df0a['forEach'](_0x105235=>{const _0x5668f7=_0x4e5f;switch(_0x105235[_0x5668f7(0xbb)]){case'add':{const _0x2e0df1=_0x105235[_0x5668f7(0x7f)][_0x5668f7(0xc8)];_0x17fffc[_0x5668f7(0xc0)](_0x2e0df1);break;}}}),R(this[_0x3d8150(0xa9)],_0x17fffc);}));}[_0x54d2b6(0xdf)](){const _0x590ee8=_0x54d2b6;this[_0x590ee8(0xd9)](this[_0x590ee8(0xba)][_0x590ee8(0xce)][_0x590ee8(0x97)](async _0x39d8d5=>{const _0x969405=_0x590ee8;var _0x28c620,_0x24db95,_0x1d7ccc,_0x3e83a4;const _0x5a0f31=(_0x28c620=this['_threadCommentModel'][_0x969405(0xa3)](_0x39d8d5[_0x969405(0xcc)])[_0x969405(0xcd)](_0x5ae67e=>_0x5ae67e[_0x969405(0xdc)]===_0x39d8d5[_0x969405(0xdc)]))==null?void 0x0:_0x28c620[_0x969405(0x79)];if(!_0x5a0f31)return;const {unitId:_0x2ee970,subUnitId:_0x238e2a}=_0x5a0f31;switch(_0x39d8d5['user']&&this[_0x969405(0x9a)][_0x969405(0x73)](_0x39d8d5[_0x969405(0xbf)]),_0x39d8d5[_0x969405(0xbb)]){case v['Add']:break;case v[_0x969405(0x85)]:{this[_0x969405(0xb5)][_0x969405(0x71)](_0x2ee970,_0x238e2a,{'unitId':_0x2ee970,'subUnitId':_0x238e2a,'ref':'','id':_0x39d8d5[_0x969405(0x76)],'dT':f(+_0x39d8d5['createTimestamp']),'threadId':_0x39d8d5[_0x969405(0xdc)],'personId':(_0x1d7ccc=(_0x24db95=_0x39d8d5[_0x969405(0xbf)])==null?void 0x0:_0x24db95[_0x969405(0x7d)])!=null?_0x1d7ccc:_0x39d8d5[_0x969405(0xd1)],'text':JSON[_0x969405(0x95)](_0x39d8d5['content']),'parentId':_0x5a0f31['id']});break;}case v['Delete']:{const _0x19e470=this[_0x969405(0xb5)][_0x969405(0xc1)](_0x2ee970,_0x238e2a,_0x39d8d5[_0x969405(0x76)]);_0x19e470&&_0x19e470[_0x969405(0xc9)]&&this['_threadCommentModel'][_0x969405(0xb3)](_0x2ee970,_0x238e2a,_0x39d8d5[_0x969405(0x76)]);break;}case v[_0x969405(0xc7)]:{this[_0x969405(0xb5)][_0x969405(0x8f)](_0x2ee970,_0x238e2a,{'commentId':_0x39d8d5[_0x969405(0x76)],'text':JSON[_0x969405(0x95)](_0x39d8d5[_0x969405(0xa6)])});break;}case v[_0x969405(0xe1)]:{const _0x3c988b=(_0x3e83a4=this['_threadCommentModel'][_0x969405(0xa3)](_0x39d8d5[_0x969405(0xcc)])['find'](_0x441646=>_0x441646[_0x969405(0xdc)]===_0x39d8d5[_0x969405(0xdc)]))==null?void 0x0:_0x3e83a4[_0x969405(0x79)];_0x3c988b&&this[_0x969405(0xb5)][_0x969405(0x83)](_0x2ee970,_0x238e2a,_0x3c988b['id'],_0x39d8d5[_0x969405(0xbd)]===I[_0x969405(0xc6)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x54d2b6(0x98)])),S(0x1,c[_0x54d2b6(0xcf)](M['ThreadCommentModel'])),S(0x2,c[_0x54d2b6(0xcf)](c[_0x54d2b6(0xcb)])),S(0x3,c[_0x54d2b6(0xcf)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x54d2b6(0x74)],x=(_0x575574,_0xb5ce43,_0xb9767e,_0x3e90d0)=>{const _0x1a127a=_0x54d2b6;for(var _0x26c60e=_0x3e90d0>0x1?void 0x0:_0x3e90d0?A(_0xb5ce43,_0xb9767e):_0xb5ce43,_0x583db8=_0x575574[_0x1a127a(0x9f)]-0x1,_0x110fe1;_0x583db8>=0x0;_0x583db8--)(_0x110fe1=_0x575574[_0x583db8])&&(_0x26c60e=_0x110fe1(_0x26c60e)||_0x26c60e);return _0x26c60e;},_=(_0x25f9a0,_0x3cd812)=>(_0x7e3d4c,_0x5c252b)=>_0x3cd812(_0x7e3d4c,_0x5c252b,_0x25f9a0);function Y(_0x3830e6,_0x17002c){const _0x5c82e2=_0x54d2b6,_0x1af852=_0x3830e6[_0x5c82e2(0xc4)][0x0];return{..._0x17002c,'id':_0x1af852['replyId'],'resolved':_0x3830e6[_0x5c82e2(0xbd)]===0x1,'dT':f(_0x1af852[_0x5c82e2(0x93)]),'personId':_0x1af852[_0x5c82e2(0xd1)],'threadId':_0x1af852['threadId']};}function G(_0x3ed7fc,_0xf8674,_0x50406e){const _0x2e22c8=_0x54d2b6;var _0x4e98c9,_0x11dde5;if(((_0x11dde5=(_0x4e98c9=_0x3ed7fc==null?void 0x0:_0x3ed7fc['replies'])==null?void 0x0:_0x4e98c9['length'])!=null?_0x11dde5:0x0)>0x0){const _0x593fdd=(_0x460531,_0x2015f7)=>({'id':_0x460531[_0x2e22c8(0x76)],'threadId':_0x460531['threadId'],'dT':f(_0x460531[_0x2e22c8(0x93)]),'personId':_0x460531[_0x2e22c8(0xd1)],'resolved':_0x3ed7fc['solved']===I[_0x2e22c8(0xc6)],'unitId':_0xf8674,'subUnitId':_0x50406e,'text':JSON[_0x2e22c8(0x95)](_0x460531[_0x2e22c8(0xa6)]),'parentId':_0x2015f7}),_0x36d63f=_0x593fdd(_0x3ed7fc['replies'][0x0]);return{..._0x36d63f,'children':_0x3ed7fc[_0x2e22c8(0xc4)][_0x2e22c8(0xaa)](0x1)[_0x2e22c8(0x96)](_0x2700b0=>_0x593fdd(_0x2700b0,_0x36d63f['id']))};}return null;}let g=class{constructor(_0x250fa3,_0x37d81c,_0xf08d44,_0x5be0f7){const _0x2244bc=_0x54d2b6;this[_0x2244bc(0xdb)]=_0x250fa3,this[_0x2244bc(0x9a)]=_0x37d81c,this['_sessionService']=_0xf08d44,this[_0x2244bc(0xa9)]=_0x5be0f7;}async[_0x54d2b6(0x71)](_0x50c067){const _0x1de139=_0x54d2b6;var _0x47aafa,_0x1d9705;const {parentId:_0x5a3415,unitId:_0x4677e0,text:_0xb40a97,threadId:_0x42fc97}=_0x50c067,_0x180665=(_0x1d9705=(_0x47aafa=_0xb40a97[_0x1de139(0x6f)])==null?void 0x0:_0x47aafa[_0x1de139(0xa4)](_0x23b8dd=>_0x23b8dd[_0x1de139(0x91)]===c[_0x1de139(0x9c)]['COMMENT'])[_0x1de139(0x96)](_0x4e51d4=>_0x4e51d4[_0x1de139(0xb6)]))!=null?_0x1d9705:[],_0x1f80c2=JSON[_0x1de139(0x78)](_0xb40a97),_0x5d7541=(await this[_0x1de139(0x6e)]['requireSession'](_0x4677e0))[_0x1de139(0x9e)]();if(_0x5a3415){const _0x2106f4={'memberId':_0x5d7541,'unitId':_0x4677e0,'content':_0x1f80c2,'mention':_0x180665,'threadId':_0x42fc97},_0x1a8c9d=(await this[_0x1de139(0xdb)][_0x1de139(0xe3)](_0x1de139(0xab)+_0x4677e0+_0x1de139(0xca),{'body':_0x2106f4}))[_0x1de139(0xe6)][_0x1de139(0x94)];return{..._0x50c067,'id':_0x1a8c9d[_0x1de139(0x76)],'dT':c[_0x1de139(0xd4)](+_0x1a8c9d[_0x1de139(0x93)])[_0x1de139(0xa2)](_0x1de139(0xe0)),'personId':_0x1a8c9d[_0x1de139(0xd1)]};}else{const _0x1e7eee={'memberId':_0x5d7541,'unitId':_0x4677e0,'content':_0x1f80c2,'mention':_0x180665},_0x1eb2d0=await this['_httpService'][_0x1de139(0xe3)](_0x1de139(0xab)+_0x4677e0+'/add',{'body':_0x1e7eee});return Y(_0x1eb2d0[_0x1de139(0xe6)][_0x1de139(0x70)],_0x50c067);}}async[_0x54d2b6(0x8f)](_0x579fef){const _0x24775d=_0x54d2b6;var _0x5329af,_0x2d4b50;const {text:_0x4caa1f,unitId:_0x43cf58}=_0x579fef,_0x30e715=(_0x2d4b50=(_0x5329af=_0x4caa1f[_0x24775d(0x6f)])==null?void 0x0:_0x5329af['filter'](_0x2d8d41=>_0x2d8d41[_0x24775d(0x91)]===c[_0x24775d(0x9c)][_0x24775d(0x9b)])['map'](_0x45bc60=>_0x45bc60[_0x24775d(0xb6)]))!=null?_0x2d4b50:[],_0x5730a4=JSON['stringify'](_0x4caa1f),_0xb79d65=_0x579fef['threadId'],_0x13d139=_0x579fef['id'],_0x2a7013={'memberId':(await this[_0x24775d(0x6e)][_0x24775d(0xd5)](_0x43cf58))['getMemberID'](),'unitId':_0x43cf58,'threadId':_0xb79d65,'mention':_0x30e715,'content':_0x5730a4,'replyId':_0x13d139},_0x23c277=await this[_0x24775d(0xdb)]['post']('/universer-api/comment/unit/'+_0x43cf58+'/edit',{'body':_0x2a7013});return!_0x23c277[_0x24775d(0xe6)][_0x24775d(0x92)]||_0x23c277[_0x24775d(0xe6)][_0x24775d(0x92)]['code']===0x1;}async[_0x54d2b6(0x83)](_0x3970cc){const _0x560e75=_0x54d2b6,{unitId:_0x2f8b68}=_0x3970cc,_0x1ef2c1=_0x3970cc['threadId'],_0xa388c9={'memberId':this['_userService'][_0x560e75(0xa8)]()[_0x560e75(0x7d)],'unitId':_0x2f8b68,'threadId':_0x1ef2c1,'solved':_0x3970cc['resolved']?I[_0x560e75(0xc6)]:I[_0x560e75(0xc5)]},_0x4319f6=await this[_0x560e75(0xdb)][_0x560e75(0xe3)](_0x560e75(0xab)+_0x2f8b68+'/solved',{'body':_0xa388c9});return!_0x4319f6[_0x560e75(0xe6)][_0x560e75(0x92)]||_0x4319f6['body'][_0x560e75(0x92)][_0x560e75(0xd8)]===0x1;}async[_0x54d2b6(0xb3)](_0x32639e,_0x1b5992,_0x465600,_0x4a0d5c){const _0x271554=_0x54d2b6,_0x8cad2a={'memberId':(await this[_0x271554(0x6e)][_0x271554(0xd5)](_0x32639e))['getMemberID'](),'threadId':_0x465600,'replyId':_0x4a0d5c,'unitId':_0x32639e},_0x307c8d=await this[_0x271554(0xdb)][_0x271554(0xe3)](_0x271554(0xab)+_0x32639e+_0x271554(0x7b),{'body':_0x8cad2a});return!_0x307c8d[_0x271554(0xe6)][_0x271554(0x92)]||_0x307c8d[_0x271554(0xe6)][_0x271554(0x92)][_0x271554(0xd8)]===0x1;}async[_0x54d2b6(0xe2)](_0x486a58,_0x9309b,_0x3287d8){const _0xb3ac84=_0x54d2b6,_0xe2bd36={'unitId':_0x486a58,'threadId':_0x3287d8},_0xe243f4=await this['_httpService'][_0xb3ac84(0xe3)](_0xb3ac84(0xab)+_0x486a58+'/list',{'body':_0xe2bd36}),_0x258dcc=_0x3287d8['map'](_0x328f93=>G(_0xe243f4[_0xb3ac84(0xe6)][_0xb3ac84(0x86)][_0x328f93],_0x486a58,_0x9309b))[_0xb3ac84(0xa4)](Boolean);return Object[_0xb3ac84(0x8d)](_0xe243f4[_0xb3ac84(0xe6)][_0xb3ac84(0xad)])['forEach'](_0x408dd0=>{const _0x2b177b=_0xb3ac84;this[_0x2b177b(0x9a)]['addUser'](_0x408dd0);}),_0x258dcc;}[_0x54d2b6(0xaf)](_0x4e6c69){const _0x493702=_0x54d2b6;return{'id':_0x4e6c69['id'],'threadId':_0x4e6c69[_0x493702(0xdc)],'ref':_0x4e6c69[_0x493702(0x8a)]};}};g=x([_(0x0,c[_0x54d2b6(0xcf)](P['HTTPService'])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x54d2b6(0xcf)](b['CollaborationSessionService'])),_(0x3,c[_0x54d2b6(0xcf)](c[_0x54d2b6(0xd7)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x165231,_0x43bb64,_0x1a7a27,_0x51c89d)=>{const _0x6c0fcd=_0x54d2b6;for(var _0x5b264f=_0x51c89d>0x1?void 0x0:_0x51c89d?H(_0x43bb64,_0x1a7a27):_0x43bb64,_0x5aaf5e=_0x165231[_0x6c0fcd(0x9f)]-0x1,_0x29892c;_0x5aaf5e>=0x0;_0x5aaf5e--)(_0x29892c=_0x165231[_0x5aaf5e])&&(_0x5b264f=_0x29892c(_0x5b264f)||_0x5b264f);return _0x5b264f;},y=(_0x481818,_0x29a272)=>(_0x1a891e,_0x40097b)=>_0x29a272(_0x1a891e,_0x40097b,_0x481818);let C=class extends c[_0x54d2b6(0xb4)]{constructor(_0x4300a6,_0x1e20a6){const _0xdde43c=_0x54d2b6;super(),this[_0xdde43c(0x87)]=_0x4300a6,this[_0xdde43c(0x90)]=_0x1e20a6,this[_0xdde43c(0xac)]();}[_0x54d2b6(0xac)](){const _0x402ec6=_0x54d2b6;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x402ec6(0x87)][_0x402ec6(0x89)]=!0x1;}};C=J([y(0x0,M[_0x54d2b6(0x8c)]),y(0x1,c[_0x54d2b6(0xcf)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x25a770,_0x3796b1,_0x5bca13)=>_0x3796b1 in _0x25a770?F(_0x25a770,_0x3796b1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bca13}):_0x25a770[_0x3796b1]=_0x5bca13,W=(_0x423547,_0x1d4ec9,_0x560521,_0x2c61e6)=>{const _0x589a15=_0x54d2b6;for(var _0x12dce6=_0x2c61e6>0x1?void 0x0:_0x2c61e6?L(_0x1d4ec9,_0x560521):_0x1d4ec9,_0x1a4829=_0x423547[_0x589a15(0x9f)]-0x1,_0x3798b3;_0x1a4829>=0x0;_0x1a4829--)(_0x3798b3=_0x423547[_0x1a4829])&&(_0x12dce6=_0x3798b3(_0x12dce6)||_0x12dce6);return _0x12dce6;},O=(_0x46675b,_0x1914e2)=>(_0x23c9e8,_0x26df91)=>_0x1914e2(_0x23c9e8,_0x26df91,_0x46675b),N=(_0x556760,_0x290fe0,_0x5f3e32)=>Z(_0x556760,typeof _0x290fe0!=_0x54d2b6(0x7e)?_0x290fe0+'':_0x290fe0,_0x5f3e32);exports[_0x54d2b6(0xa0)]=class extends c[_0x54d2b6(0xde)]{constructor(_0x2a4197=D,_0x31525f,_0x5bbf7f){const _0x1cf3e6=_0x54d2b6;super(),this[_0x1cf3e6(0x9d)]=_0x2a4197,this['_injector']=_0x31525f,this[_0x1cf3e6(0xae)]=_0x5bbf7f;const {..._0x4bf596}=c['merge']({},D,this[_0x1cf3e6(0x9d)]);this[_0x1cf3e6(0xae)]['setConfig'](q,_0x4bf596);}[_0x54d2b6(0xb7)](){const _0x396d9d=_0x54d2b6;[[g],[C],[p]][_0x396d9d(0x82)](_0x5a9f5d=>{const _0x3ba1cc=_0x396d9d;this['_injector'][_0x3ba1cc(0xc0)](_0x5a9f5d);});}[_0x54d2b6(0x8e)](){const _0x3655ad=_0x54d2b6;this[_0x3655ad(0xa9)]['get'](C),this[_0x3655ad(0xa9)][_0x3655ad(0xa1)](p);}},N(exports[_0x54d2b6(0xa0)],_0x54d2b6(0x8b),U),N(exports[_0x54d2b6(0xa0)],_0x54d2b6(0xbb),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x54d2b6(0xa0)]=W([c[_0x54d2b6(0xe8)](j[_0x54d2b6(0x7a)],b['UniverCollaborationClientPlugin'],T[_0x54d2b6(0xd2)]),O(0x1,c['Inject'](c[_0x54d2b6(0xd7)])),O(0x2,c[_0x54d2b6(0x80)])],exports[_0x54d2b6(0xa0)]);
|
|
1
|
+
'use strict';const _0x29ba3e=_0x42d2;(function(_0x5d45a6,_0x8cc893){const _0x2c1263=_0x42d2,_0x3c8d93=_0x5d45a6();while(!![]){try{const _0x424b78=-parseInt(_0x2c1263(0x175))/0x1*(-parseInt(_0x2c1263(0x193))/0x2)+-parseInt(_0x2c1263(0x18e))/0x3+parseInt(_0x2c1263(0x176))/0x4+parseInt(_0x2c1263(0x172))/0x5+-parseInt(_0x2c1263(0x1c9))/0x6*(-parseInt(_0x2c1263(0x181))/0x7)+parseInt(_0x2c1263(0x1b6))/0x8+-parseInt(_0x2c1263(0x16e))/0x9*(parseInt(_0x2c1263(0x185))/0xa);if(_0x424b78===_0x8cc893)break;else _0x3c8d93['push'](_0x3c8d93['shift']());}catch(_0x5e1c76){_0x3c8d93['push'](_0x3c8d93['shift']());}}}(_0x8817,0x82d21));Object[_0x29ba3e(0x163)](exports,Symbol[_0x29ba3e(0x1ac)],{'value':'Module'});const b=require(_0x29ba3e(0x1b1)),T=require(_0x29ba3e(0x190)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x29ba3e(0x15c)),U=_0x29ba3e(0x18d);var I=(_0x52631b=>(_0x52631b[_0x52631b[_0x29ba3e(0x1be)]=0x0]='OpenOrReOpen',_0x52631b[_0x52631b[_0x29ba3e(0x1b4)]=0x1]='Solved',_0x52631b[_0x52631b[_0x29ba3e(0x1a2)]=-0x1]=_0x29ba3e(0x1a2),_0x52631b))(I||{}),v=(_0x5c064d=>(_0x5c064d[_0x5c064d[_0x29ba3e(0x1bb)]=0x0]=_0x29ba3e(0x1bb),_0x5c064d[_0x5c064d[_0x29ba3e(0x18a)]=0x1]='Add',_0x5c064d[_0x5c064d[_0x29ba3e(0x1a8)]=0x2]=_0x29ba3e(0x1a8),_0x5c064d[_0x5c064d[_0x29ba3e(0x160)]=0x3]='Edit',_0x5c064d[_0x5c064d[_0x29ba3e(0x189)]=0x4]=_0x29ba3e(0x189),_0x5c064d[_0x5c064d[_0x29ba3e(0x18c)]=0x5]=_0x29ba3e(0x18c),_0x5c064d[_0x5c064d[_0x29ba3e(0x1a2)]=-0x1]='UNRECOGNIZED',_0x5c064d))(v||{});const f=_0x45bef4=>c[_0x29ba3e(0x15f)](new Date(+_0x45bef4))[_0x29ba3e(0x1ab)](_0x29ba3e(0x156)),R=async(_0x3ffed0,_0x205ba9)=>{const _0x11c995=_0x29ba3e,_0x381057=_0x3ffed0[_0x11c995(0x199)](c['UserManagerService']),_0x3a6d7c=_0x3ffed0[_0x11c995(0x199)](P[_0x11c995(0x184)]);_0x205ba9['forEach'](_0x5bc10b=>{const _0x2301c9=_0x11c995;_0x381057[_0x2301c9(0x168)](_0x5bc10b)&&_0x205ba9['delete'](_0x5bc10b);}),_0x205ba9[_0x11c995(0x170)]&&(await _0x3a6d7c['get'](_0x11c995(0x1a5),{'params':{'userIDs':[..._0x205ba9]}}))['body'][_0x11c995(0x16c)][_0x11c995(0x1c7)](_0x2ae752=>{_0x2ae752&&_0x381057['addUser'](_0x2ae752);});};var $=Object[_0x29ba3e(0x1b7)],E=(_0x2e2ab,_0x78d144,_0x16e023,_0x568d1a)=>{const _0x26e969=_0x29ba3e;for(var _0x1a63ff=_0x568d1a>0x1?void 0x0:_0x568d1a?$(_0x78d144,_0x16e023):_0x78d144,_0x4b529b=_0x2e2ab[_0x26e969(0x174)]-0x1,_0x8ec4d5;_0x4b529b>=0x0;_0x4b529b--)(_0x8ec4d5=_0x2e2ab[_0x4b529b])&&(_0x1a63ff=_0x8ec4d5(_0x1a63ff)||_0x1a63ff);return _0x1a63ff;},S=(_0x3400d1,_0x313575)=>(_0x315a61,_0x151635)=>_0x313575(_0x315a61,_0x151635,_0x3400d1);let p=class extends c[_0x29ba3e(0x198)]{constructor(_0x18ee51,_0x4c5f64,_0x4517d1,_0x4632dd){const _0x23e5a1=_0x29ba3e;super(),this[_0x23e5a1(0x159)]=_0x18ee51,this['_threadCommentModel']=_0x4c5f64,this[_0x23e5a1(0x1b3)]=_0x4517d1,this[_0x23e5a1(0x16f)]=_0x4632dd,this[_0x23e5a1(0x165)](),this['_initUserSync']();}['_initUserSync'](){const _0x5dfcaa=_0x29ba3e;this[_0x5dfcaa(0x1c4)](this[_0x5dfcaa(0x1c6)]['commentUpdate$'][_0x5dfcaa(0x191)](w['bufferTime'](0x10))[_0x5dfcaa(0x1b0)](_0x587042=>{const _0x1e65b8=_0x5dfcaa,_0x499d3c=new Set();_0x587042[_0x1e65b8(0x1c7)](_0x22bfa0=>{const _0x4f1faf=_0x1e65b8;switch(_0x22bfa0[_0x4f1faf(0x19a)]){case _0x4f1faf(0x19f):{const _0x1de6ca=_0x22bfa0[_0x4f1faf(0x173)]['personId'];_0x499d3c[_0x4f1faf(0x19f)](_0x1de6ca);break;}}}),R(this['_injector'],_0x499d3c);}));}[_0x29ba3e(0x165)](){const _0x367f1c=_0x29ba3e;this['disposeWithMe'](this[_0x367f1c(0x159)][_0x367f1c(0x153)][_0x367f1c(0x1b0)](async _0x287429=>{const _0x599086=_0x367f1c;var _0x3c687d,_0x5eb102,_0x26c427,_0x4ba7c4;const _0x2e51ec=(_0x3c687d=this['_threadCommentModel']['getUnit'](_0x287429[_0x599086(0x179)])[_0x599086(0x19c)](_0xb737ec=>_0xb737ec[_0x599086(0x1a6)]===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x3c687d['root'];if(!_0x2e51ec)return;const {unitId:_0x136fb5,subUnitId:_0x40e679}=_0x2e51ec;switch(_0x287429[_0x599086(0x167)]&&this[_0x599086(0x1b3)][_0x599086(0x1b9)](_0x287429[_0x599086(0x167)]),_0x287429[_0x599086(0x19a)]){case v['Add']:break;case v['Reply']:{this[_0x599086(0x1c6)][_0x599086(0x17b)](_0x136fb5,_0x40e679,{'unitId':_0x136fb5,'subUnitId':_0x40e679,'ref':'','id':_0x287429['replyId'],'dT':f(+_0x287429['createTimestamp']),'threadId':_0x287429[_0x599086(0x1a6)],'personId':(_0x26c427=(_0x5eb102=_0x287429[_0x599086(0x167)])==null?void 0x0:_0x5eb102[_0x599086(0x187)])!=null?_0x26c427:_0x287429[_0x599086(0x197)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)]),'parentId':_0x2e51ec['id']});break;}case v[_0x599086(0x189)]:{const _0xa24e4e=this['_threadCommentModel']['getComment'](_0x136fb5,_0x40e679,_0x287429[_0x599086(0x1ba)]);_0xa24e4e&&_0xa24e4e[_0x599086(0x157)]&&this[_0x599086(0x1c6)][_0x599086(0x195)](_0x136fb5,_0x40e679,_0x287429['replyId']);break;}case v[_0x599086(0x160)]:{this[_0x599086(0x1c6)][_0x599086(0x18b)](_0x136fb5,_0x40e679,{'commentId':_0x287429[_0x599086(0x1ba)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)])});break;}case v[_0x599086(0x18c)]:{const _0x28d01f=(_0x4ba7c4=this[_0x599086(0x1c6)][_0x599086(0x1bc)](_0x287429[_0x599086(0x179)])['find'](_0x101927=>_0x101927['threadId']===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x4ba7c4[_0x599086(0x1bd)];_0x28d01f&&this[_0x599086(0x1c6)][_0x599086(0x166)](_0x136fb5,_0x40e679,_0x28d01f['id'],_0x287429[_0x599086(0x17e)]===I[_0x599086(0x1b4)]);break;}}}));}};p=E([S(0x0,c[_0x29ba3e(0x1ad)](b['CommentService'])),S(0x1,c[_0x29ba3e(0x1ad)](M[_0x29ba3e(0x16b)])),S(0x2,c['Inject'](c[_0x29ba3e(0x194)])),S(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],p);const q=_0x29ba3e(0x158),D={};var A=Object[_0x29ba3e(0x1b7)],x=(_0x527584,_0x4cd8ba,_0x5cb583,_0x109986)=>{const _0x4f9734=_0x29ba3e;for(var _0x31ddce=_0x109986>0x1?void 0x0:_0x109986?A(_0x4cd8ba,_0x5cb583):_0x4cd8ba,_0xbc1539=_0x527584[_0x4f9734(0x174)]-0x1,_0x192794;_0xbc1539>=0x0;_0xbc1539--)(_0x192794=_0x527584[_0xbc1539])&&(_0x31ddce=_0x192794(_0x31ddce)||_0x31ddce);return _0x31ddce;},_=(_0x37100c,_0x46f863)=>(_0x3820d2,_0x115cac)=>_0x46f863(_0x3820d2,_0x115cac,_0x37100c);function Y(_0x4b13e7,_0x559fd4){const _0x4a0711=_0x29ba3e,_0x5f43bc=_0x4b13e7[_0x4a0711(0x188)][0x0];return{..._0x559fd4,'id':_0x5f43bc[_0x4a0711(0x1ba)],'resolved':_0x4b13e7[_0x4a0711(0x17e)]===0x1,'dT':f(_0x5f43bc[_0x4a0711(0x1a3)]),'personId':_0x5f43bc[_0x4a0711(0x197)],'threadId':_0x5f43bc['threadId']};}function _0x42d2(_0x51c127,_0xe29ca6){const _0x881725=_0x8817();return _0x42d2=function(_0x42d236,_0x111f92){_0x42d236=_0x42d236-0x153;let _0x2865af=_0x881725[_0x42d236];return _0x2865af;},_0x42d2(_0x51c127,_0xe29ca6);}function G(_0x5f2fba,_0x2e0ea,_0x3922d2){const _0x149fee=_0x29ba3e;var _0x4a2923,_0x35e003;if(((_0x35e003=(_0x4a2923=_0x5f2fba==null?void 0x0:_0x5f2fba[_0x149fee(0x188)])==null?void 0x0:_0x4a2923[_0x149fee(0x174)])!=null?_0x35e003:0x0)>0x0){const _0x515348=(_0x3d7c57,_0x20cb50)=>({'id':_0x3d7c57[_0x149fee(0x1ba)],'threadId':_0x3d7c57[_0x149fee(0x1a6)],'dT':f(_0x3d7c57['createTimestamp']),'personId':_0x3d7c57[_0x149fee(0x197)],'resolved':_0x5f2fba['solved']===I[_0x149fee(0x1b4)],'unitId':_0x2e0ea,'subUnitId':_0x3922d2,'text':JSON[_0x149fee(0x1ae)](_0x3d7c57[_0x149fee(0x1a9)]),'parentId':_0x20cb50}),_0x56ec88=_0x515348(_0x5f2fba[_0x149fee(0x188)][0x0]);return{..._0x56ec88,'children':_0x5f2fba[_0x149fee(0x188)]['slice'](0x1)['map'](_0xbf0aa4=>_0x515348(_0xbf0aa4,_0x56ec88['id']))};}return null;}let g=class{constructor(_0x5b1acf,_0x4d9ea7,_0x407894,_0x3b77b7){const _0x29b49f=_0x29ba3e;this[_0x29b49f(0x1a7)]=_0x5b1acf,this[_0x29b49f(0x1b3)]=_0x4d9ea7,this[_0x29b49f(0x15a)]=_0x407894,this[_0x29b49f(0x16f)]=_0x3b77b7;}async[_0x29ba3e(0x17b)](_0x22c0b1){const _0x37af6d=_0x29ba3e;var _0x3391f4,_0x3110f0;const {parentId:_0x38d3b6,unitId:_0x1e3dbb,text:_0x22f85f,threadId:_0xcc623c}=_0x22c0b1,_0x4b70b8=(_0x3110f0=(_0x3391f4=_0x22f85f['customRanges'])==null?void 0x0:_0x3391f4[_0x37af6d(0x19b)](_0x453b89=>_0x453b89[_0x37af6d(0x15b)]===c[_0x37af6d(0x19d)][_0x37af6d(0x1c8)])['map'](_0x159e80=>_0x159e80[_0x37af6d(0x196)]))!=null?_0x3110f0:[],_0xc50bb8=JSON['stringify'](_0x22f85f),_0x59a5ac=(await this[_0x37af6d(0x15a)]['requireSession'](_0x1e3dbb))[_0x37af6d(0x16a)]();if(_0x38d3b6){const _0x1ecaad={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8,'threadId':_0xcc623c},_0x57a297=(await this[_0x37af6d(0x1a7)]['post']('/universer-api/comment/unit/'+_0x1e3dbb+'/reply',{'body':_0x1ecaad}))[_0x37af6d(0x1a0)]['reply'];return{..._0x22c0b1,'id':_0x57a297['replyId'],'dT':c[_0x37af6d(0x15f)](+_0x57a297[_0x37af6d(0x1a3)])[_0x37af6d(0x1ab)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x57a297['userId']};}else{const _0xda3c93={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8},_0x3e2684=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1e3dbb+_0x37af6d(0x178),{'body':_0xda3c93});return Y(_0x3e2684[_0x37af6d(0x1a0)][_0x37af6d(0x180)],_0x22c0b1);}}async['updateComment'](_0x1fb8ce){const _0x46289b=_0x29ba3e;var _0x4cbd7b,_0x5492fb;const {text:_0x49c924,unitId:_0x3bc5db}=_0x1fb8ce,_0x1a885d=(_0x5492fb=(_0x4cbd7b=_0x49c924['customRanges'])==null?void 0x0:_0x4cbd7b[_0x46289b(0x19b)](_0x536682=>_0x536682[_0x46289b(0x15b)]===c['CustomRangeType'][_0x46289b(0x1c8)])[_0x46289b(0x192)](_0x35affc=>_0x35affc[_0x46289b(0x196)]))!=null?_0x5492fb:[],_0x34edbe=JSON[_0x46289b(0x16d)](_0x49c924),_0xa6c5ba=_0x1fb8ce[_0x46289b(0x1a6)],_0x231ae8=_0x1fb8ce['id'],_0x138f09={'memberId':(await this[_0x46289b(0x15a)]['requireSession'](_0x3bc5db))[_0x46289b(0x16a)](),'unitId':_0x3bc5db,'threadId':_0xa6c5ba,'mention':_0x1a885d,'content':_0x34edbe,'replyId':_0x231ae8},_0x30dd91=await this[_0x46289b(0x1a7)][_0x46289b(0x17f)]('/universer-api/comment/unit/'+_0x3bc5db+_0x46289b(0x161),{'body':_0x138f09});return!_0x30dd91[_0x46289b(0x1a0)]['error']||_0x30dd91[_0x46289b(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x166)](_0x268390){const _0x4c2cc8=_0x29ba3e,{unitId:_0x50aee9}=_0x268390,_0x34580d=_0x268390[_0x4c2cc8(0x1a6)],_0x1e420c={'memberId':this['_userService']['getCurrentUser']()[_0x4c2cc8(0x187)],'unitId':_0x50aee9,'threadId':_0x34580d,'solved':_0x268390[_0x4c2cc8(0x1b8)]?I[_0x4c2cc8(0x1b4)]:I[_0x4c2cc8(0x1be)]},_0xab983=await this[_0x4c2cc8(0x1a7)][_0x4c2cc8(0x17f)](_0x4c2cc8(0x15e)+_0x50aee9+_0x4c2cc8(0x154),{'body':_0x1e420c});return!_0xab983[_0x4c2cc8(0x1a0)]['error']||_0xab983[_0x4c2cc8(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x195)](_0x338e58,_0x1b8299,_0x244d52,_0x340385){const _0x3d3794=_0x29ba3e,_0x3e8244={'memberId':(await this[_0x3d3794(0x15a)][_0x3d3794(0x183)](_0x338e58))[_0x3d3794(0x16a)](),'threadId':_0x244d52,'replyId':_0x340385,'unitId':_0x338e58},_0x926209=await this[_0x3d3794(0x1a7)][_0x3d3794(0x17f)]('/universer-api/comment/unit/'+_0x338e58+_0x3d3794(0x186),{'body':_0x3e8244});return!_0x926209[_0x3d3794(0x1a0)][_0x3d3794(0x1af)]||_0x926209['body'][_0x3d3794(0x1af)][_0x3d3794(0x1c1)]===0x1;}async[_0x29ba3e(0x17d)](_0x2abea5,_0x10e06e,_0x5216d4){const _0x3b600c=_0x29ba3e,_0x157346={'unitId':_0x2abea5,'threadId':_0x5216d4},_0x141444=await this[_0x3b600c(0x1a7)]['post'](_0x3b600c(0x15e)+_0x2abea5+_0x3b600c(0x1c0),{'body':_0x157346}),_0x5b0e5d=_0x5216d4[_0x3b600c(0x192)](_0x1503be=>G(_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x18f)][_0x1503be],_0x2abea5,_0x10e06e))[_0x3b600c(0x19b)](Boolean);return Object['values'](_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x16c)])[_0x3b600c(0x1c7)](_0x3b5b56=>{const _0x511c95=_0x3b600c;this[_0x511c95(0x1b3)][_0x511c95(0x1b9)](_0x3b5b56);}),_0x5b0e5d;}[_0x29ba3e(0x19e)](_0x47e4ce){const _0x5ba665=_0x29ba3e;return{'id':_0x47e4ce['id'],'threadId':_0x47e4ce[_0x5ba665(0x1a6)],'ref':_0x47e4ce[_0x5ba665(0x15d)]};}};g=x([_(0x0,c[_0x29ba3e(0x1ad)](P[_0x29ba3e(0x184)])),_(0x1,c[_0x29ba3e(0x1ad)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x29ba3e(0x1bf)])),_(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],g);var H=Object[_0x29ba3e(0x1b7)],J=(_0x56d558,_0x432744,_0x3578f0,_0x397593)=>{const _0x3b2071=_0x29ba3e;for(var _0x38c00e=_0x397593>0x1?void 0x0:_0x397593?H(_0x432744,_0x3578f0):_0x432744,_0x28340d=_0x56d558[_0x3b2071(0x174)]-0x1,_0x37b19f;_0x28340d>=0x0;_0x28340d--)(_0x37b19f=_0x56d558[_0x28340d])&&(_0x38c00e=_0x37b19f(_0x38c00e)||_0x38c00e);return _0x38c00e;},y=(_0x1b439a,_0x23a21b)=>(_0x175ee7,_0x2b492f)=>_0x23a21b(_0x175ee7,_0x2b492f,_0x1b439a);let C=class extends c[_0x29ba3e(0x198)]{constructor(_0x44d03b,_0x1211a8){const _0xb1f8fe=_0x29ba3e;super(),this[_0xb1f8fe(0x162)]=_0x44d03b,this['_threadCommentDataSource']=_0x1211a8,this[_0xb1f8fe(0x164)]();}[_0x29ba3e(0x164)](){const _0x5274ba=_0x29ba3e;this[_0x5274ba(0x162)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5274ba(0x155)]=!0x1;}};function _0x8817(){const _0x1cdb8f=['stringify','15669QvepVh','_injector','size','_configService','4843100SmhNeW','payload','length','6OLXrZG','1511332iOrfQb','_config','/add','unitId','UniverThreadCommentDataSourcePlugin','addComment','pluginName','listComments','solved','post','comment','2908997tvCAHe','UniverInstanceType','requireSession','HTTPService','10690QZuzYO','/delete','userID','replies','Delete','Add','updateComment','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','792288YHcSzi','comments','@univerjs-pro/license','pipe','map','135444nBLfKj','UserManagerService','deleteComment','rangeId','userId','Disposable','get','type','filter','find','CustomRangeType','saveCommentToSnapshot','add','body','UniverCollaborationClientPlugin','UNRECOGNIZED','createTimestamp','DependentOn','/universer-api/user/list','threadId','_httpService','Reply','content','onReady','format','toStringTag','Inject','parse','error','subscribe','@univerjs-pro/collaboration-client','Injector','_userService','Solved','setConfig','3941680chATMC','getOwnPropertyDescriptor','resolved','addUser','replyId','Unknown','getUnit','root','OpenOrReOpen','CollaborationSessionService','/list','code','UNIVER_UNKNOWN','onStarting','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','forEach','COMMENT','6RxzXyX','commentUpdate$','/solved','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','parentId','thread-comment-data-source.config','_commentService','_sessionService','rangeType','@univerjs/network','ref','/universer-api/comment/unit/','dayjs','Edit','/edit','_threadCommentDataSourceService','defineProperty','_initDataSource','_init','resolveComment','user','getUser','Plugin','getMemberID','ThreadCommentModel','users'];_0x8817=function(){return _0x1cdb8f;};return _0x8817();}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x29ba3e(0x1ad)](g))],C);var F=Object[_0x29ba3e(0x163)],L=Object[_0x29ba3e(0x1b7)],Z=(_0x1cea6a,_0x4d17ba,_0x1ef833)=>_0x4d17ba in _0x1cea6a?F(_0x1cea6a,_0x4d17ba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ef833}):_0x1cea6a[_0x4d17ba]=_0x1ef833,W=(_0xb01c79,_0x43434f,_0x5b4263,_0x242243)=>{const _0x4ec4b0=_0x29ba3e;for(var _0x35e6d0=_0x242243>0x1?void 0x0:_0x242243?L(_0x43434f,_0x5b4263):_0x43434f,_0x509ddc=_0xb01c79[_0x4ec4b0(0x174)]-0x1,_0x110e25;_0x509ddc>=0x0;_0x509ddc--)(_0x110e25=_0xb01c79[_0x509ddc])&&(_0x35e6d0=_0x110e25(_0x35e6d0)||_0x35e6d0);return _0x35e6d0;},O=(_0x3b9d12,_0x4856d6)=>(_0x39deb1,_0x1dc8c7)=>_0x4856d6(_0x39deb1,_0x1dc8c7,_0x3b9d12),N=(_0x4ae883,_0x2b2c66,_0x2c6642)=>Z(_0x4ae883,typeof _0x2b2c66!='symbol'?_0x2b2c66+'':_0x2b2c66,_0x2c6642);exports[_0x29ba3e(0x17a)]=class extends c[_0x29ba3e(0x169)]{constructor(_0x48f3e3=D,_0x10944d,_0xa8d975){const _0x19c68e=_0x29ba3e;super(),this[_0x19c68e(0x177)]=_0x48f3e3,this[_0x19c68e(0x16f)]=_0x10944d,this[_0x19c68e(0x171)]=_0xa8d975;const {..._0x1fe772}=c['merge']({},D,this['_config']);this[_0x19c68e(0x171)][_0x19c68e(0x1b5)](q,_0x1fe772);}[_0x29ba3e(0x1c3)](){const _0x29c652=_0x29ba3e;[[g],[C],[p]][_0x29c652(0x1c7)](_0x39bd34=>{const _0x19515c=_0x29c652;this[_0x19515c(0x16f)][_0x19515c(0x19f)](_0x39bd34);});}[_0x29ba3e(0x1aa)](){const _0x8b9e61=_0x29ba3e;this['_injector'][_0x8b9e61(0x199)](C),this['_injector'][_0x8b9e61(0x199)](p);}},N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x17c),U),N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x19a),c[_0x29ba3e(0x182)][_0x29ba3e(0x1c2)]),exports[_0x29ba3e(0x17a)]=W([c[_0x29ba3e(0x1a4)](j[_0x29ba3e(0x1c5)],b[_0x29ba3e(0x1a1)],T['UniverLicensePlugin']),O(0x1,c[_0x29ba3e(0x1ad)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2410e5=_0x4b6a;(function(_0x54248b,_0x4d1961){const _0x31c1b1=_0x4b6a,_0x55f0a7=_0x54248b();while(!![]){try{const _0x58f5e2=-parseInt(_0x31c1b1(0x1b5))/0x1*(parseInt(_0x31c1b1(0x180))/0x2)+-parseInt(_0x31c1b1(0x1a8))/0x3+parseInt(_0x31c1b1(0x1ab))/0x4+-parseInt(_0x31c1b1(0x193))/0x5*(-parseInt(_0x31c1b1(0x1bf))/0x6)+-parseInt(_0x31c1b1(0x17d))/0x7*(parseInt(_0x31c1b1(0x1a0))/0x8)+-parseInt(_0x31c1b1(0x1a3))/0x9*(-parseInt(_0x31c1b1(0x18b))/0xa)+parseInt(_0x31c1b1(0x1b1))/0xb;if(_0x58f5e2===_0x4d1961)break;else _0x55f0a7['push'](_0x55f0a7['shift']());}catch(_0x5a1313){_0x55f0a7['push'](_0x55f0a7['shift']());}}}(_0x3382,0xd8b6b));import{CommentService as _0x52a730,CollaborationSessionService as _0x1bcb6a,UniverCollaborationClientPlugin as _0x54e958}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x171464}from'@univerjs-pro/license';import{dayjs as _0x44a548,UserManagerService as _0x48ddeb,Inject as _0x242445,Injector as _0x2598ce,Disposable as _0x3f72a7,CustomRangeType as _0x2453e6,UniverInstanceType as _0x28a7b0,DependentOn as _0xea713d,IConfigService as _0x1580e0,Plugin as _0x17faa2,merge as _0x529fa5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1e752b}from'@univerjs/thread-comment-ui';function _0x4b6a(_0x217636,_0x5c5cd0){const _0x33828f=_0x3382();return _0x4b6a=function(_0x4b6a54,_0x17998d){_0x4b6a54=_0x4b6a54-0x16e;let _0x29b66f=_0x33828f[_0x4b6a54];return _0x29b66f;},_0x4b6a(_0x217636,_0x5c5cd0);}import{ThreadCommentModel as _0x5e8297,IThreadCommentDataSourceService as _0x4e5822}from'@univerjs/thread-comment';import{bufferTime as _0x40b7dd}from'rxjs';import{HTTPService as _0xdc3710}from'@univerjs/network';const W=_0x2410e5(0x1b6);var I=(_0x41f863=>(_0x41f863[_0x41f863[_0x2410e5(0x1b0)]=0x0]=_0x2410e5(0x1b0),_0x41f863[_0x41f863[_0x2410e5(0x17b)]=0x1]=_0x2410e5(0x17b),_0x41f863[_0x41f863[_0x2410e5(0x173)]=-0x1]=_0x2410e5(0x173),_0x41f863))(I||{}),v=(_0x5dd029=>(_0x5dd029[_0x5dd029[_0x2410e5(0x19a)]=0x0]=_0x2410e5(0x19a),_0x5dd029[_0x5dd029[_0x2410e5(0x1aa)]=0x1]=_0x2410e5(0x1aa),_0x5dd029[_0x5dd029[_0x2410e5(0x19c)]=0x2]=_0x2410e5(0x19c),_0x5dd029[_0x5dd029[_0x2410e5(0x1b7)]=0x3]=_0x2410e5(0x1b7),_0x5dd029[_0x5dd029['Delete']=0x4]=_0x2410e5(0x184),_0x5dd029[_0x5dd029['Solve']=0x5]='Solve',_0x5dd029[_0x5dd029[_0x2410e5(0x173)]=-0x1]='UNRECOGNIZED',_0x5dd029))(v||{});const D=_0x96802f=>_0x44a548(new Date(+_0x96802f))[_0x2410e5(0x172)](_0x2410e5(0x1bb)),B=async(_0x1770f9,_0x1cd85a)=>{const _0x4f0ef0=_0x2410e5,_0x15555c=_0x1770f9['get'](_0x48ddeb),_0x30680d=_0x1770f9['get'](_0xdc3710);_0x1cd85a['forEach'](_0x368461=>{const _0x62680d=_0x4b6a;_0x15555c[_0x62680d(0x1d0)](_0x368461)&&_0x1cd85a[_0x62680d(0x17a)](_0x368461);}),_0x1cd85a['size']&&(await _0x30680d[_0x4f0ef0(0x1c3)](_0x4f0ef0(0x1cc),{'params':{'userIDs':[..._0x1cd85a]}}))[_0x4f0ef0(0x17e)][_0x4f0ef0(0x1b4)][_0x4f0ef0(0x1bc)](_0x27355c=>{const _0x4163b0=_0x4f0ef0;_0x27355c&&_0x15555c[_0x4163b0(0x179)](_0x27355c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d474d,_0x3af0ae,_0x29d1da,_0xc6d2eb)=>{const _0x467abe=_0x2410e5;for(var _0x2d6e53=_0xc6d2eb>0x1?void 0x0:_0xc6d2eb?K(_0x3af0ae,_0x29d1da):_0x3af0ae,_0x3cce0a=_0x3d474d[_0x467abe(0x1c2)]-0x1,_0x33a45e;_0x3cce0a>=0x0;_0x3cce0a--)(_0x33a45e=_0x3d474d[_0x3cce0a])&&(_0x2d6e53=_0x33a45e(_0x2d6e53)||_0x2d6e53);return _0x2d6e53;},p=(_0x124707,_0x5eefe5)=>(_0x16053c,_0x5283dd)=>_0x5eefe5(_0x16053c,_0x5283dd,_0x124707);let S=class extends _0x3f72a7{constructor(_0x1b3909,_0x10fc5b,_0x163f6f,_0x30bab3){const _0x214331=_0x2410e5;super(),this['_commentService']=_0x1b3909,this[_0x214331(0x1c1)]=_0x10fc5b,this[_0x214331(0x1c5)]=_0x163f6f,this[_0x214331(0x1d1)]=_0x30bab3,this[_0x214331(0x1a1)](),this['_initUserSync']();}['_initUserSync'](){const _0x3b308d=_0x2410e5;this[_0x3b308d(0x194)](this['_threadCommentModel']['commentUpdate$'][_0x3b308d(0x1ba)](_0x40b7dd(0x10))[_0x3b308d(0x174)](_0x1cdb36=>{const _0x2668c4=_0x3b308d,_0xa1c514=new Set();_0x1cdb36[_0x2668c4(0x1bc)](_0x52e708=>{const _0x53608f=_0x2668c4;switch(_0x52e708['type']){case'add':{const _0x2b07da=_0x52e708['payload'][_0x53608f(0x176)];_0xa1c514[_0x53608f(0x18e)](_0x2b07da);break;}}}),B(this[_0x2668c4(0x1d1)],_0xa1c514);}));}[_0x2410e5(0x1a1)](){const _0x1674ee=_0x2410e5;this[_0x1674ee(0x194)](this[_0x1674ee(0x189)][_0x1674ee(0x1a6)]['subscribe'](async _0x4aed82=>{const _0x2f5fda=_0x1674ee;var _0x3a3279,_0x1fa207,_0x3cf015,_0x2450c4;const _0x554bbc=(_0x3a3279=this[_0x2f5fda(0x1c1)]['getUnit'](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x377dc2=>_0x377dc2['threadId']===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x3a3279['root'];if(!_0x554bbc)return;const {unitId:_0x3df3ac,subUnitId:_0x24c24f}=_0x554bbc;switch(_0x4aed82[_0x2f5fda(0x1cb)]&&this['_userService']['addUser'](_0x4aed82[_0x2f5fda(0x1cb)]),_0x4aed82[_0x2f5fda(0x1ae)]){case v[_0x2f5fda(0x1aa)]:break;case v[_0x2f5fda(0x19c)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18d)](_0x3df3ac,_0x24c24f,{'unitId':_0x3df3ac,'subUnitId':_0x24c24f,'ref':'','id':_0x4aed82[_0x2f5fda(0x181)],'dT':D(+_0x4aed82[_0x2f5fda(0x1be)]),'threadId':_0x4aed82[_0x2f5fda(0x1b9)],'personId':(_0x3cf015=(_0x1fa207=_0x4aed82[_0x2f5fda(0x1cb)])==null?void 0x0:_0x1fa207['userID'])!=null?_0x3cf015:_0x4aed82[_0x2f5fda(0x192)],'text':JSON['parse'](_0x4aed82['content']),'parentId':_0x554bbc['id']});break;}case v['Delete']:{const _0x15ae54=this['_threadCommentModel'][_0x2f5fda(0x170)](_0x3df3ac,_0x24c24f,_0x4aed82['replyId']);_0x15ae54&&_0x15ae54['parentId']&&this[_0x2f5fda(0x1c1)][_0x2f5fda(0x177)](_0x3df3ac,_0x24c24f,_0x4aed82[_0x2f5fda(0x181)]);break;}case v[_0x2f5fda(0x1b7)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18f)](_0x3df3ac,_0x24c24f,{'commentId':_0x4aed82['replyId'],'text':JSON[_0x2f5fda(0x1c7)](_0x4aed82[_0x2f5fda(0x191)])});break;}case v[_0x2f5fda(0x17c)]:{const _0x3e33de=(_0x2450c4=this[_0x2f5fda(0x1c1)][_0x2f5fda(0x186)](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x248556=>_0x248556[_0x2f5fda(0x1b9)]===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x2450c4[_0x2f5fda(0x1b2)];_0x3e33de&&this['_threadCommentModel'][_0x2f5fda(0x19b)](_0x3df3ac,_0x24c24f,_0x3e33de['id'],_0x4aed82[_0x2f5fda(0x16f)]===I[_0x2f5fda(0x17b)]);break;}}}));}};S=V([p(0x0,_0x242445(_0x52a730)),p(0x1,_0x242445(_0x5e8297)),p(0x2,_0x242445(_0x48ddeb)),p(0x3,_0x242445(_0x2598ce))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x2410e5(0x185)],Q=(_0x699e42,_0x28a0d7,_0x1ab014,_0x5f0088)=>{const _0x25c08d=_0x2410e5;for(var _0x44014b=_0x5f0088>0x1?void 0x0:_0x5f0088?k(_0x28a0d7,_0x1ab014):_0x28a0d7,_0x14dd9a=_0x699e42[_0x25c08d(0x1c2)]-0x1,_0x203361;_0x14dd9a>=0x0;_0x14dd9a--)(_0x203361=_0x699e42[_0x14dd9a])&&(_0x44014b=_0x203361(_0x44014b)||_0x44014b);return _0x44014b;},_=(_0x45a154,_0x1f79c1)=>(_0x1db020,_0x36b377)=>_0x1f79c1(_0x1db020,_0x36b377,_0x45a154);function X(_0x3c67fb,_0x38fa33){const _0x545b55=_0x2410e5,_0x5778d7=_0x3c67fb[_0x545b55(0x1b3)][0x0];return{..._0x38fa33,'id':_0x5778d7[_0x545b55(0x181)],'resolved':_0x3c67fb[_0x545b55(0x16f)]===0x1,'dT':D(_0x5778d7[_0x545b55(0x1be)]),'personId':_0x5778d7[_0x545b55(0x192)],'threadId':_0x5778d7['threadId']};}function ee(_0x17b5f7,_0x5e3ff9,_0x5694f){const _0x4e6185=_0x2410e5;var _0x218ba8,_0x2ef392;if(((_0x2ef392=(_0x218ba8=_0x17b5f7==null?void 0x0:_0x17b5f7[_0x4e6185(0x1b3)])==null?void 0x0:_0x218ba8[_0x4e6185(0x1c2)])!=null?_0x2ef392:0x0)>0x0){const _0x2a8bc5=(_0x17b1f0,_0x2e0264)=>({'id':_0x17b1f0[_0x4e6185(0x181)],'threadId':_0x17b1f0[_0x4e6185(0x1b9)],'dT':D(_0x17b1f0['createTimestamp']),'personId':_0x17b1f0[_0x4e6185(0x192)],'resolved':_0x17b5f7[_0x4e6185(0x16f)]===I[_0x4e6185(0x17b)],'unitId':_0x5e3ff9,'subUnitId':_0x5694f,'text':JSON[_0x4e6185(0x1c7)](_0x17b1f0[_0x4e6185(0x191)]),'parentId':_0x2e0264}),_0x29e24d=_0x2a8bc5(_0x17b5f7[_0x4e6185(0x1b3)][0x0]);return{..._0x29e24d,'children':_0x17b5f7[_0x4e6185(0x1b3)][_0x4e6185(0x1cf)](0x1)[_0x4e6185(0x16e)](_0x3fb438=>_0x2a8bc5(_0x3fb438,_0x29e24d['id']))};}return null;}let f=class{constructor(_0x1344ad,_0x282938,_0x408534,_0x373c56){const _0xc9aacb=_0x2410e5;this['_httpService']=_0x1344ad,this['_userService']=_0x282938,this[_0xc9aacb(0x1cd)]=_0x408534,this[_0xc9aacb(0x1d1)]=_0x373c56;}async['addComment'](_0x3eb50e){const _0xcc6bbb=_0x2410e5;var _0x25bb37,_0x1102d3;const {parentId:_0x5ae26a,unitId:_0x13f933,text:_0x4387ba,threadId:_0x3d7906}=_0x3eb50e,_0x3c0c6d=(_0x1102d3=(_0x25bb37=_0x4387ba[_0xcc6bbb(0x1ce)])==null?void 0x0:_0x25bb37[_0xcc6bbb(0x19d)](_0x3bee86=>_0x3bee86['rangeType']===_0x2453e6[_0xcc6bbb(0x1d4)])['map'](_0x22cbf8=>_0x22cbf8[_0xcc6bbb(0x1a9)]))!=null?_0x1102d3:[],_0x59f443=JSON[_0xcc6bbb(0x1d3)](_0x4387ba),_0x24a6a8=(await this[_0xcc6bbb(0x1cd)][_0xcc6bbb(0x1a4)](_0x13f933))['getMemberID']();if(_0x5ae26a){const _0x5b61a5={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d,'threadId':_0x3d7906},_0x2fb2fb=(await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)](_0xcc6bbb(0x1c6)+_0x13f933+_0xcc6bbb(0x1c9),{'body':_0x5b61a5}))[_0xcc6bbb(0x17e)][_0xcc6bbb(0x1ad)];return{..._0x3eb50e,'id':_0x2fb2fb[_0xcc6bbb(0x181)],'dT':_0x44a548(+_0x2fb2fb['createTimestamp'])[_0xcc6bbb(0x172)](_0xcc6bbb(0x1bb)),'personId':_0x2fb2fb[_0xcc6bbb(0x192)]};}else{const _0x12127e={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d},_0x277808=await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)]('/universer-api/comment/unit/'+_0x13f933+_0xcc6bbb(0x18a),{'body':_0x12127e});return X(_0x277808[_0xcc6bbb(0x17e)][_0xcc6bbb(0x171)],_0x3eb50e);}}async[_0x2410e5(0x18f)](_0x43b857){const _0x2d9c55=_0x2410e5;var _0x35020b,_0x12d7cf;const {text:_0x33227b,unitId:_0x431792}=_0x43b857,_0x5ab77c=(_0x12d7cf=(_0x35020b=_0x33227b['customRanges'])==null?void 0x0:_0x35020b[_0x2d9c55(0x19d)](_0x555c8e=>_0x555c8e['rangeType']===_0x2453e6['COMMENT'])['map'](_0x20ee6=>_0x20ee6['rangeId']))!=null?_0x12d7cf:[],_0x41f0b6=JSON['stringify'](_0x33227b),_0x1cfc24=_0x43b857[_0x2d9c55(0x1b9)],_0x4e1223=_0x43b857['id'],_0x347a63={'memberId':(await this[_0x2d9c55(0x1cd)][_0x2d9c55(0x1a4)](_0x431792))['getMemberID'](),'unitId':_0x431792,'threadId':_0x1cfc24,'mention':_0x5ab77c,'content':_0x41f0b6,'replyId':_0x4e1223},_0xb6eeb1=await this[_0x2d9c55(0x19e)][_0x2d9c55(0x199)](_0x2d9c55(0x1c6)+_0x431792+_0x2d9c55(0x178),{'body':_0x347a63});return!_0xb6eeb1[_0x2d9c55(0x17e)][_0x2d9c55(0x1a5)]||_0xb6eeb1['body'][_0x2d9c55(0x1a5)][_0x2d9c55(0x183)]===0x1;}async[_0x2410e5(0x19b)](_0x368e1e){const _0x5adbce=_0x2410e5,{unitId:_0x5bdfea}=_0x368e1e,_0x4df1d0=_0x368e1e['threadId'],_0x43e8b8={'memberId':this[_0x5adbce(0x1c5)][_0x5adbce(0x1bd)]()['userID'],'unitId':_0x5bdfea,'threadId':_0x4df1d0,'solved':_0x368e1e[_0x5adbce(0x1a2)]?I[_0x5adbce(0x17b)]:I['OpenOrReOpen']},_0x283e19=await this[_0x5adbce(0x19e)][_0x5adbce(0x199)](_0x5adbce(0x1c6)+_0x5bdfea+_0x5adbce(0x1a7),{'body':_0x43e8b8});return!_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)]||_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)][_0x5adbce(0x183)]===0x1;}async[_0x2410e5(0x177)](_0x34e1d8,_0x426e58,_0x3f269e,_0x4cf0f7){const _0xfb1a1d=_0x2410e5,_0x4053e1={'memberId':(await this[_0xfb1a1d(0x1cd)]['requireSession'](_0x34e1d8))[_0xfb1a1d(0x18c)](),'threadId':_0x3f269e,'replyId':_0x4cf0f7,'unitId':_0x34e1d8},_0x3891ae=await this[_0xfb1a1d(0x19e)][_0xfb1a1d(0x199)]('/universer-api/comment/unit/'+_0x34e1d8+'/delete',{'body':_0x4053e1});return!_0x3891ae['body']['error']||_0x3891ae[_0xfb1a1d(0x17e)][_0xfb1a1d(0x1a5)][_0xfb1a1d(0x183)]===0x1;}async[_0x2410e5(0x197)](_0x4bab33,_0x5c1eb0,_0x4f2be8){const _0x418282=_0x2410e5,_0x17caac={'unitId':_0x4bab33,'threadId':_0x4f2be8},_0x3fd059=await this['_httpService']['post'](_0x418282(0x1c6)+_0x4bab33+_0x418282(0x1b8),{'body':_0x17caac}),_0x53325e=_0x4f2be8[_0x418282(0x16e)](_0x251d66=>ee(_0x3fd059[_0x418282(0x17e)][_0x418282(0x1ac)][_0x251d66],_0x4bab33,_0x5c1eb0))[_0x418282(0x19d)](Boolean);return Object[_0x418282(0x195)](_0x3fd059['body'][_0x418282(0x1b4)])[_0x418282(0x1bc)](_0x425499=>{const _0x59e482=_0x418282;this[_0x59e482(0x1c5)][_0x59e482(0x179)](_0x425499);}),_0x53325e;}[_0x2410e5(0x175)](_0x4e672e){const _0x4694d5=_0x2410e5;return{'id':_0x4e672e['id'],'threadId':_0x4e672e['threadId'],'ref':_0x4e672e[_0x4694d5(0x188)]};}};f=Q([_(0x0,_0x242445(_0xdc3710)),_(0x1,_0x242445(_0x48ddeb)),_(0x2,_0x242445(_0x1bcb6a)),_(0x3,_0x242445(_0x2598ce))],f);function _0x3382(){const _0x23d14f=['getComment','comment','format','UNRECOGNIZED','subscribe','saveCommentToSnapshot','personId','deleteComment','/edit','addUser','delete','Solved','Solve','2919644vOZaiM','body','_threadCommentDataSource','10yErazo','replyId','dataSource','code','Delete','getOwnPropertyDescriptor','getUnit','onReady','ref','_commentService','/add','600jbqNmG','getMemberID','addComment','add','updateComment','symbol','content','userId','805gzPFMA','disposeWithMe','values','_threadCommentDataSourceService','listComments','_configService','post','Unknown','resolveComment','Reply','filter','_httpService','_initDataSource','32JLEGzS','_init','resolved','33372aAHcHx','requireSession','error','commentUpdate$','/solved','3798117fTDBRI','rangeId','Add','6365064ndAYgs','comments','reply','type','onStarting','OpenOrReOpen','18166203YYlfHu','root','replies','users','281768rZePpj','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','/list','threadId','pipe','YYYY/MM/DD\x20HH:mm','forEach','getCurrentUser','createTimestamp','65802IaJzil','unitId','_threadCommentModel','length','get','find','_userService','/universer-api/comment/unit/','parse','pluginName','/reply','UNIVER_UNKNOWN','user','/universer-api/user/list','_sessionService','customRanges','slice','getUser','_injector','_config','stringify','COMMENT','map','solved'];_0x3382=function(){return _0x23d14f;};return _0x3382();}var re=Object[_0x2410e5(0x185)],te=(_0x1bed3c,_0x12576f,_0x2968a1,_0x1a13ca)=>{const _0x588ed9=_0x2410e5;for(var _0x723de9=_0x1a13ca>0x1?void 0x0:_0x1a13ca?re(_0x12576f,_0x2968a1):_0x12576f,_0x135474=_0x1bed3c[_0x588ed9(0x1c2)]-0x1,_0x54cdf1;_0x135474>=0x0;_0x135474--)(_0x54cdf1=_0x1bed3c[_0x135474])&&(_0x723de9=_0x54cdf1(_0x723de9)||_0x723de9);return _0x723de9;},N=(_0x37743c,_0x4fdb42)=>(_0x2cbcbb,_0x427891)=>_0x4fdb42(_0x2cbcbb,_0x427891,_0x37743c);let g=class extends _0x3f72a7{constructor(_0x2b9864,_0x475ab6){const _0x5596ed=_0x2410e5;super(),this['_threadCommentDataSourceService']=_0x2b9864,this[_0x5596ed(0x17f)]=_0x475ab6,this[_0x5596ed(0x19f)]();}[_0x2410e5(0x19f)](){const _0x3e0afb=_0x2410e5;this['_threadCommentDataSourceService'][_0x3e0afb(0x182)]=this['_threadCommentDataSource'],this[_0x3e0afb(0x196)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4e5822),N(0x1,_0x242445(f))],g);var se=Object['defineProperty'],oe=Object[_0x2410e5(0x185)],ne=(_0x1653cd,_0x2f98ea,_0x2d7bf1)=>_0x2f98ea in _0x1653cd?se(_0x1653cd,_0x2f98ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d7bf1}):_0x1653cd[_0x2f98ea]=_0x2d7bf1,ie=(_0x52b8f0,_0x20a987,_0xde68c7,_0x1bb2a7)=>{const _0x118216=_0x2410e5;for(var _0x3f2125=_0x1bb2a7>0x1?void 0x0:_0x1bb2a7?oe(_0x20a987,_0xde68c7):_0x20a987,_0x19e9cb=_0x52b8f0[_0x118216(0x1c2)]-0x1,_0x1b6ed2;_0x19e9cb>=0x0;_0x19e9cb--)(_0x1b6ed2=_0x52b8f0[_0x19e9cb])&&(_0x3f2125=_0x1b6ed2(_0x3f2125)||_0x3f2125);return _0x3f2125;},w=(_0x4f2f64,_0x46afd1)=>(_0x890f8c,_0x203444)=>_0x46afd1(_0x890f8c,_0x203444,_0x4f2f64),$=(_0x525889,_0x400275,_0x2ad653)=>ne(_0x525889,typeof _0x400275!=_0x2410e5(0x190)?_0x400275+'':_0x400275,_0x2ad653);let b=class extends _0x17faa2{constructor(_0x1311c4=M,_0x3c9838,_0x116c54){const _0x24e1c9=_0x2410e5;super(),this[_0x24e1c9(0x1d2)]=_0x1311c4,this['_injector']=_0x3c9838,this[_0x24e1c9(0x198)]=_0x116c54;const {..._0x196701}=_0x529fa5({},M,this[_0x24e1c9(0x1d2)]);this[_0x24e1c9(0x198)]['setConfig'](z,_0x196701);}[_0x2410e5(0x1af)](){const _0x26afdc=_0x2410e5;[[f],[g],[S]][_0x26afdc(0x1bc)](_0x194d81=>{this['_injector']['add'](_0x194d81);});}[_0x2410e5(0x187)](){const _0x5ba4a8=_0x2410e5;this[_0x5ba4a8(0x1d1)]['get'](g),this[_0x5ba4a8(0x1d1)][_0x5ba4a8(0x1c3)](S);}};$(b,_0x2410e5(0x1c8),W),$(b,_0x2410e5(0x1ae),_0x28a7b0[_0x2410e5(0x1ca)]),b=ie([_0xea713d(_0x1e752b,_0x54e958,_0x171464),w(0x1,_0x242445(_0x2598ce)),w(0x2,_0x1580e0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2410e5=_0x4b6a;(function(_0x54248b,_0x4d1961){const _0x31c1b1=_0x4b6a,_0x55f0a7=_0x54248b();while(!![]){try{const _0x58f5e2=-parseInt(_0x31c1b1(0x1b5))/0x1*(parseInt(_0x31c1b1(0x180))/0x2)+-parseInt(_0x31c1b1(0x1a8))/0x3+parseInt(_0x31c1b1(0x1ab))/0x4+-parseInt(_0x31c1b1(0x193))/0x5*(-parseInt(_0x31c1b1(0x1bf))/0x6)+-parseInt(_0x31c1b1(0x17d))/0x7*(parseInt(_0x31c1b1(0x1a0))/0x8)+-parseInt(_0x31c1b1(0x1a3))/0x9*(-parseInt(_0x31c1b1(0x18b))/0xa)+parseInt(_0x31c1b1(0x1b1))/0xb;if(_0x58f5e2===_0x4d1961)break;else _0x55f0a7['push'](_0x55f0a7['shift']());}catch(_0x5a1313){_0x55f0a7['push'](_0x55f0a7['shift']());}}}(_0x3382,0xd8b6b));import{CommentService as _0x52a730,CollaborationSessionService as _0x1bcb6a,UniverCollaborationClientPlugin as _0x54e958}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x171464}from'@univerjs-pro/license';import{dayjs as _0x44a548,UserManagerService as _0x48ddeb,Inject as _0x242445,Injector as _0x2598ce,Disposable as _0x3f72a7,CustomRangeType as _0x2453e6,UniverInstanceType as _0x28a7b0,DependentOn as _0xea713d,IConfigService as _0x1580e0,Plugin as _0x17faa2,merge as _0x529fa5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1e752b}from'@univerjs/thread-comment-ui';function _0x4b6a(_0x217636,_0x5c5cd0){const _0x33828f=_0x3382();return _0x4b6a=function(_0x4b6a54,_0x17998d){_0x4b6a54=_0x4b6a54-0x16e;let _0x29b66f=_0x33828f[_0x4b6a54];return _0x29b66f;},_0x4b6a(_0x217636,_0x5c5cd0);}import{ThreadCommentModel as _0x5e8297,IThreadCommentDataSourceService as _0x4e5822}from'@univerjs/thread-comment';import{bufferTime as _0x40b7dd}from'rxjs';import{HTTPService as _0xdc3710}from'@univerjs/network';const W=_0x2410e5(0x1b6);var I=(_0x41f863=>(_0x41f863[_0x41f863[_0x2410e5(0x1b0)]=0x0]=_0x2410e5(0x1b0),_0x41f863[_0x41f863[_0x2410e5(0x17b)]=0x1]=_0x2410e5(0x17b),_0x41f863[_0x41f863[_0x2410e5(0x173)]=-0x1]=_0x2410e5(0x173),_0x41f863))(I||{}),v=(_0x5dd029=>(_0x5dd029[_0x5dd029[_0x2410e5(0x19a)]=0x0]=_0x2410e5(0x19a),_0x5dd029[_0x5dd029[_0x2410e5(0x1aa)]=0x1]=_0x2410e5(0x1aa),_0x5dd029[_0x5dd029[_0x2410e5(0x19c)]=0x2]=_0x2410e5(0x19c),_0x5dd029[_0x5dd029[_0x2410e5(0x1b7)]=0x3]=_0x2410e5(0x1b7),_0x5dd029[_0x5dd029['Delete']=0x4]=_0x2410e5(0x184),_0x5dd029[_0x5dd029['Solve']=0x5]='Solve',_0x5dd029[_0x5dd029[_0x2410e5(0x173)]=-0x1]='UNRECOGNIZED',_0x5dd029))(v||{});const D=_0x96802f=>_0x44a548(new Date(+_0x96802f))[_0x2410e5(0x172)](_0x2410e5(0x1bb)),B=async(_0x1770f9,_0x1cd85a)=>{const _0x4f0ef0=_0x2410e5,_0x15555c=_0x1770f9['get'](_0x48ddeb),_0x30680d=_0x1770f9['get'](_0xdc3710);_0x1cd85a['forEach'](_0x368461=>{const _0x62680d=_0x4b6a;_0x15555c[_0x62680d(0x1d0)](_0x368461)&&_0x1cd85a[_0x62680d(0x17a)](_0x368461);}),_0x1cd85a['size']&&(await _0x30680d[_0x4f0ef0(0x1c3)](_0x4f0ef0(0x1cc),{'params':{'userIDs':[..._0x1cd85a]}}))[_0x4f0ef0(0x17e)][_0x4f0ef0(0x1b4)][_0x4f0ef0(0x1bc)](_0x27355c=>{const _0x4163b0=_0x4f0ef0;_0x27355c&&_0x15555c[_0x4163b0(0x179)](_0x27355c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d474d,_0x3af0ae,_0x29d1da,_0xc6d2eb)=>{const _0x467abe=_0x2410e5;for(var _0x2d6e53=_0xc6d2eb>0x1?void 0x0:_0xc6d2eb?K(_0x3af0ae,_0x29d1da):_0x3af0ae,_0x3cce0a=_0x3d474d[_0x467abe(0x1c2)]-0x1,_0x33a45e;_0x3cce0a>=0x0;_0x3cce0a--)(_0x33a45e=_0x3d474d[_0x3cce0a])&&(_0x2d6e53=_0x33a45e(_0x2d6e53)||_0x2d6e53);return _0x2d6e53;},p=(_0x124707,_0x5eefe5)=>(_0x16053c,_0x5283dd)=>_0x5eefe5(_0x16053c,_0x5283dd,_0x124707);let S=class extends _0x3f72a7{constructor(_0x1b3909,_0x10fc5b,_0x163f6f,_0x30bab3){const _0x214331=_0x2410e5;super(),this['_commentService']=_0x1b3909,this[_0x214331(0x1c1)]=_0x10fc5b,this[_0x214331(0x1c5)]=_0x163f6f,this[_0x214331(0x1d1)]=_0x30bab3,this[_0x214331(0x1a1)](),this['_initUserSync']();}['_initUserSync'](){const _0x3b308d=_0x2410e5;this[_0x3b308d(0x194)](this['_threadCommentModel']['commentUpdate$'][_0x3b308d(0x1ba)](_0x40b7dd(0x10))[_0x3b308d(0x174)](_0x1cdb36=>{const _0x2668c4=_0x3b308d,_0xa1c514=new Set();_0x1cdb36[_0x2668c4(0x1bc)](_0x52e708=>{const _0x53608f=_0x2668c4;switch(_0x52e708['type']){case'add':{const _0x2b07da=_0x52e708['payload'][_0x53608f(0x176)];_0xa1c514[_0x53608f(0x18e)](_0x2b07da);break;}}}),B(this[_0x2668c4(0x1d1)],_0xa1c514);}));}[_0x2410e5(0x1a1)](){const _0x1674ee=_0x2410e5;this[_0x1674ee(0x194)](this[_0x1674ee(0x189)][_0x1674ee(0x1a6)]['subscribe'](async _0x4aed82=>{const _0x2f5fda=_0x1674ee;var _0x3a3279,_0x1fa207,_0x3cf015,_0x2450c4;const _0x554bbc=(_0x3a3279=this[_0x2f5fda(0x1c1)]['getUnit'](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x377dc2=>_0x377dc2['threadId']===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x3a3279['root'];if(!_0x554bbc)return;const {unitId:_0x3df3ac,subUnitId:_0x24c24f}=_0x554bbc;switch(_0x4aed82[_0x2f5fda(0x1cb)]&&this['_userService']['addUser'](_0x4aed82[_0x2f5fda(0x1cb)]),_0x4aed82[_0x2f5fda(0x1ae)]){case v[_0x2f5fda(0x1aa)]:break;case v[_0x2f5fda(0x19c)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18d)](_0x3df3ac,_0x24c24f,{'unitId':_0x3df3ac,'subUnitId':_0x24c24f,'ref':'','id':_0x4aed82[_0x2f5fda(0x181)],'dT':D(+_0x4aed82[_0x2f5fda(0x1be)]),'threadId':_0x4aed82[_0x2f5fda(0x1b9)],'personId':(_0x3cf015=(_0x1fa207=_0x4aed82[_0x2f5fda(0x1cb)])==null?void 0x0:_0x1fa207['userID'])!=null?_0x3cf015:_0x4aed82[_0x2f5fda(0x192)],'text':JSON['parse'](_0x4aed82['content']),'parentId':_0x554bbc['id']});break;}case v['Delete']:{const _0x15ae54=this['_threadCommentModel'][_0x2f5fda(0x170)](_0x3df3ac,_0x24c24f,_0x4aed82['replyId']);_0x15ae54&&_0x15ae54['parentId']&&this[_0x2f5fda(0x1c1)][_0x2f5fda(0x177)](_0x3df3ac,_0x24c24f,_0x4aed82[_0x2f5fda(0x181)]);break;}case v[_0x2f5fda(0x1b7)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18f)](_0x3df3ac,_0x24c24f,{'commentId':_0x4aed82['replyId'],'text':JSON[_0x2f5fda(0x1c7)](_0x4aed82[_0x2f5fda(0x191)])});break;}case v[_0x2f5fda(0x17c)]:{const _0x3e33de=(_0x2450c4=this[_0x2f5fda(0x1c1)][_0x2f5fda(0x186)](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x248556=>_0x248556[_0x2f5fda(0x1b9)]===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x2450c4[_0x2f5fda(0x1b2)];_0x3e33de&&this['_threadCommentModel'][_0x2f5fda(0x19b)](_0x3df3ac,_0x24c24f,_0x3e33de['id'],_0x4aed82[_0x2f5fda(0x16f)]===I[_0x2f5fda(0x17b)]);break;}}}));}};S=V([p(0x0,_0x242445(_0x52a730)),p(0x1,_0x242445(_0x5e8297)),p(0x2,_0x242445(_0x48ddeb)),p(0x3,_0x242445(_0x2598ce))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x2410e5(0x185)],Q=(_0x699e42,_0x28a0d7,_0x1ab014,_0x5f0088)=>{const _0x25c08d=_0x2410e5;for(var _0x44014b=_0x5f0088>0x1?void 0x0:_0x5f0088?k(_0x28a0d7,_0x1ab014):_0x28a0d7,_0x14dd9a=_0x699e42[_0x25c08d(0x1c2)]-0x1,_0x203361;_0x14dd9a>=0x0;_0x14dd9a--)(_0x203361=_0x699e42[_0x14dd9a])&&(_0x44014b=_0x203361(_0x44014b)||_0x44014b);return _0x44014b;},_=(_0x45a154,_0x1f79c1)=>(_0x1db020,_0x36b377)=>_0x1f79c1(_0x1db020,_0x36b377,_0x45a154);function X(_0x3c67fb,_0x38fa33){const _0x545b55=_0x2410e5,_0x5778d7=_0x3c67fb[_0x545b55(0x1b3)][0x0];return{..._0x38fa33,'id':_0x5778d7[_0x545b55(0x181)],'resolved':_0x3c67fb[_0x545b55(0x16f)]===0x1,'dT':D(_0x5778d7[_0x545b55(0x1be)]),'personId':_0x5778d7[_0x545b55(0x192)],'threadId':_0x5778d7['threadId']};}function ee(_0x17b5f7,_0x5e3ff9,_0x5694f){const _0x4e6185=_0x2410e5;var _0x218ba8,_0x2ef392;if(((_0x2ef392=(_0x218ba8=_0x17b5f7==null?void 0x0:_0x17b5f7[_0x4e6185(0x1b3)])==null?void 0x0:_0x218ba8[_0x4e6185(0x1c2)])!=null?_0x2ef392:0x0)>0x0){const _0x2a8bc5=(_0x17b1f0,_0x2e0264)=>({'id':_0x17b1f0[_0x4e6185(0x181)],'threadId':_0x17b1f0[_0x4e6185(0x1b9)],'dT':D(_0x17b1f0['createTimestamp']),'personId':_0x17b1f0[_0x4e6185(0x192)],'resolved':_0x17b5f7[_0x4e6185(0x16f)]===I[_0x4e6185(0x17b)],'unitId':_0x5e3ff9,'subUnitId':_0x5694f,'text':JSON[_0x4e6185(0x1c7)](_0x17b1f0[_0x4e6185(0x191)]),'parentId':_0x2e0264}),_0x29e24d=_0x2a8bc5(_0x17b5f7[_0x4e6185(0x1b3)][0x0]);return{..._0x29e24d,'children':_0x17b5f7[_0x4e6185(0x1b3)][_0x4e6185(0x1cf)](0x1)[_0x4e6185(0x16e)](_0x3fb438=>_0x2a8bc5(_0x3fb438,_0x29e24d['id']))};}return null;}let f=class{constructor(_0x1344ad,_0x282938,_0x408534,_0x373c56){const _0xc9aacb=_0x2410e5;this['_httpService']=_0x1344ad,this['_userService']=_0x282938,this[_0xc9aacb(0x1cd)]=_0x408534,this[_0xc9aacb(0x1d1)]=_0x373c56;}async['addComment'](_0x3eb50e){const _0xcc6bbb=_0x2410e5;var _0x25bb37,_0x1102d3;const {parentId:_0x5ae26a,unitId:_0x13f933,text:_0x4387ba,threadId:_0x3d7906}=_0x3eb50e,_0x3c0c6d=(_0x1102d3=(_0x25bb37=_0x4387ba[_0xcc6bbb(0x1ce)])==null?void 0x0:_0x25bb37[_0xcc6bbb(0x19d)](_0x3bee86=>_0x3bee86['rangeType']===_0x2453e6[_0xcc6bbb(0x1d4)])['map'](_0x22cbf8=>_0x22cbf8[_0xcc6bbb(0x1a9)]))!=null?_0x1102d3:[],_0x59f443=JSON[_0xcc6bbb(0x1d3)](_0x4387ba),_0x24a6a8=(await this[_0xcc6bbb(0x1cd)][_0xcc6bbb(0x1a4)](_0x13f933))['getMemberID']();if(_0x5ae26a){const _0x5b61a5={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d,'threadId':_0x3d7906},_0x2fb2fb=(await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)](_0xcc6bbb(0x1c6)+_0x13f933+_0xcc6bbb(0x1c9),{'body':_0x5b61a5}))[_0xcc6bbb(0x17e)][_0xcc6bbb(0x1ad)];return{..._0x3eb50e,'id':_0x2fb2fb[_0xcc6bbb(0x181)],'dT':_0x44a548(+_0x2fb2fb['createTimestamp'])[_0xcc6bbb(0x172)](_0xcc6bbb(0x1bb)),'personId':_0x2fb2fb[_0xcc6bbb(0x192)]};}else{const _0x12127e={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d},_0x277808=await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)]('/universer-api/comment/unit/'+_0x13f933+_0xcc6bbb(0x18a),{'body':_0x12127e});return X(_0x277808[_0xcc6bbb(0x17e)][_0xcc6bbb(0x171)],_0x3eb50e);}}async[_0x2410e5(0x18f)](_0x43b857){const _0x2d9c55=_0x2410e5;var _0x35020b,_0x12d7cf;const {text:_0x33227b,unitId:_0x431792}=_0x43b857,_0x5ab77c=(_0x12d7cf=(_0x35020b=_0x33227b['customRanges'])==null?void 0x0:_0x35020b[_0x2d9c55(0x19d)](_0x555c8e=>_0x555c8e['rangeType']===_0x2453e6['COMMENT'])['map'](_0x20ee6=>_0x20ee6['rangeId']))!=null?_0x12d7cf:[],_0x41f0b6=JSON['stringify'](_0x33227b),_0x1cfc24=_0x43b857[_0x2d9c55(0x1b9)],_0x4e1223=_0x43b857['id'],_0x347a63={'memberId':(await this[_0x2d9c55(0x1cd)][_0x2d9c55(0x1a4)](_0x431792))['getMemberID'](),'unitId':_0x431792,'threadId':_0x1cfc24,'mention':_0x5ab77c,'content':_0x41f0b6,'replyId':_0x4e1223},_0xb6eeb1=await this[_0x2d9c55(0x19e)][_0x2d9c55(0x199)](_0x2d9c55(0x1c6)+_0x431792+_0x2d9c55(0x178),{'body':_0x347a63});return!_0xb6eeb1[_0x2d9c55(0x17e)][_0x2d9c55(0x1a5)]||_0xb6eeb1['body'][_0x2d9c55(0x1a5)][_0x2d9c55(0x183)]===0x1;}async[_0x2410e5(0x19b)](_0x368e1e){const _0x5adbce=_0x2410e5,{unitId:_0x5bdfea}=_0x368e1e,_0x4df1d0=_0x368e1e['threadId'],_0x43e8b8={'memberId':this[_0x5adbce(0x1c5)][_0x5adbce(0x1bd)]()['userID'],'unitId':_0x5bdfea,'threadId':_0x4df1d0,'solved':_0x368e1e[_0x5adbce(0x1a2)]?I[_0x5adbce(0x17b)]:I['OpenOrReOpen']},_0x283e19=await this[_0x5adbce(0x19e)][_0x5adbce(0x199)](_0x5adbce(0x1c6)+_0x5bdfea+_0x5adbce(0x1a7),{'body':_0x43e8b8});return!_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)]||_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)][_0x5adbce(0x183)]===0x1;}async[_0x2410e5(0x177)](_0x34e1d8,_0x426e58,_0x3f269e,_0x4cf0f7){const _0xfb1a1d=_0x2410e5,_0x4053e1={'memberId':(await this[_0xfb1a1d(0x1cd)]['requireSession'](_0x34e1d8))[_0xfb1a1d(0x18c)](),'threadId':_0x3f269e,'replyId':_0x4cf0f7,'unitId':_0x34e1d8},_0x3891ae=await this[_0xfb1a1d(0x19e)][_0xfb1a1d(0x199)]('/universer-api/comment/unit/'+_0x34e1d8+'/delete',{'body':_0x4053e1});return!_0x3891ae['body']['error']||_0x3891ae[_0xfb1a1d(0x17e)][_0xfb1a1d(0x1a5)][_0xfb1a1d(0x183)]===0x1;}async[_0x2410e5(0x197)](_0x4bab33,_0x5c1eb0,_0x4f2be8){const _0x418282=_0x2410e5,_0x17caac={'unitId':_0x4bab33,'threadId':_0x4f2be8},_0x3fd059=await this['_httpService']['post'](_0x418282(0x1c6)+_0x4bab33+_0x418282(0x1b8),{'body':_0x17caac}),_0x53325e=_0x4f2be8[_0x418282(0x16e)](_0x251d66=>ee(_0x3fd059[_0x418282(0x17e)][_0x418282(0x1ac)][_0x251d66],_0x4bab33,_0x5c1eb0))[_0x418282(0x19d)](Boolean);return Object[_0x418282(0x195)](_0x3fd059['body'][_0x418282(0x1b4)])[_0x418282(0x1bc)](_0x425499=>{const _0x59e482=_0x418282;this[_0x59e482(0x1c5)][_0x59e482(0x179)](_0x425499);}),_0x53325e;}[_0x2410e5(0x175)](_0x4e672e){const _0x4694d5=_0x2410e5;return{'id':_0x4e672e['id'],'threadId':_0x4e672e['threadId'],'ref':_0x4e672e[_0x4694d5(0x188)]};}};f=Q([_(0x0,_0x242445(_0xdc3710)),_(0x1,_0x242445(_0x48ddeb)),_(0x2,_0x242445(_0x1bcb6a)),_(0x3,_0x242445(_0x2598ce))],f);function _0x3382(){const _0x23d14f=['getComment','comment','format','UNRECOGNIZED','subscribe','saveCommentToSnapshot','personId','deleteComment','/edit','addUser','delete','Solved','Solve','2919644vOZaiM','body','_threadCommentDataSource','10yErazo','replyId','dataSource','code','Delete','getOwnPropertyDescriptor','getUnit','onReady','ref','_commentService','/add','600jbqNmG','getMemberID','addComment','add','updateComment','symbol','content','userId','805gzPFMA','disposeWithMe','values','_threadCommentDataSourceService','listComments','_configService','post','Unknown','resolveComment','Reply','filter','_httpService','_initDataSource','32JLEGzS','_init','resolved','33372aAHcHx','requireSession','error','commentUpdate$','/solved','3798117fTDBRI','rangeId','Add','6365064ndAYgs','comments','reply','type','onStarting','OpenOrReOpen','18166203YYlfHu','root','replies','users','281768rZePpj','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','/list','threadId','pipe','YYYY/MM/DD\x20HH:mm','forEach','getCurrentUser','createTimestamp','65802IaJzil','unitId','_threadCommentModel','length','get','find','_userService','/universer-api/comment/unit/','parse','pluginName','/reply','UNIVER_UNKNOWN','user','/universer-api/user/list','_sessionService','customRanges','slice','getUser','_injector','_config','stringify','COMMENT','map','solved'];_0x3382=function(){return _0x23d14f;};return _0x3382();}var re=Object[_0x2410e5(0x185)],te=(_0x1bed3c,_0x12576f,_0x2968a1,_0x1a13ca)=>{const _0x588ed9=_0x2410e5;for(var _0x723de9=_0x1a13ca>0x1?void 0x0:_0x1a13ca?re(_0x12576f,_0x2968a1):_0x12576f,_0x135474=_0x1bed3c[_0x588ed9(0x1c2)]-0x1,_0x54cdf1;_0x135474>=0x0;_0x135474--)(_0x54cdf1=_0x1bed3c[_0x135474])&&(_0x723de9=_0x54cdf1(_0x723de9)||_0x723de9);return _0x723de9;},N=(_0x37743c,_0x4fdb42)=>(_0x2cbcbb,_0x427891)=>_0x4fdb42(_0x2cbcbb,_0x427891,_0x37743c);let g=class extends _0x3f72a7{constructor(_0x2b9864,_0x475ab6){const _0x5596ed=_0x2410e5;super(),this['_threadCommentDataSourceService']=_0x2b9864,this[_0x5596ed(0x17f)]=_0x475ab6,this[_0x5596ed(0x19f)]();}[_0x2410e5(0x19f)](){const _0x3e0afb=_0x2410e5;this['_threadCommentDataSourceService'][_0x3e0afb(0x182)]=this['_threadCommentDataSource'],this[_0x3e0afb(0x196)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4e5822),N(0x1,_0x242445(f))],g);var se=Object['defineProperty'],oe=Object[_0x2410e5(0x185)],ne=(_0x1653cd,_0x2f98ea,_0x2d7bf1)=>_0x2f98ea in _0x1653cd?se(_0x1653cd,_0x2f98ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d7bf1}):_0x1653cd[_0x2f98ea]=_0x2d7bf1,ie=(_0x52b8f0,_0x20a987,_0xde68c7,_0x1bb2a7)=>{const _0x118216=_0x2410e5;for(var _0x3f2125=_0x1bb2a7>0x1?void 0x0:_0x1bb2a7?oe(_0x20a987,_0xde68c7):_0x20a987,_0x19e9cb=_0x52b8f0[_0x118216(0x1c2)]-0x1,_0x1b6ed2;_0x19e9cb>=0x0;_0x19e9cb--)(_0x1b6ed2=_0x52b8f0[_0x19e9cb])&&(_0x3f2125=_0x1b6ed2(_0x3f2125)||_0x3f2125);return _0x3f2125;},w=(_0x4f2f64,_0x46afd1)=>(_0x890f8c,_0x203444)=>_0x46afd1(_0x890f8c,_0x203444,_0x4f2f64),$=(_0x525889,_0x400275,_0x2ad653)=>ne(_0x525889,typeof _0x400275!=_0x2410e5(0x190)?_0x400275+'':_0x400275,_0x2ad653);let b=class extends _0x17faa2{constructor(_0x1311c4=M,_0x3c9838,_0x116c54){const _0x24e1c9=_0x2410e5;super(),this[_0x24e1c9(0x1d2)]=_0x1311c4,this['_injector']=_0x3c9838,this[_0x24e1c9(0x198)]=_0x116c54;const {..._0x196701}=_0x529fa5({},M,this[_0x24e1c9(0x1d2)]);this[_0x24e1c9(0x198)]['setConfig'](z,_0x196701);}[_0x2410e5(0x1af)](){const _0x26afdc=_0x2410e5;[[f],[g],[S]][_0x26afdc(0x1bc)](_0x194d81=>{this['_injector']['add'](_0x194d81);});}[_0x2410e5(0x187)](){const _0x5ba4a8=_0x2410e5;this[_0x5ba4a8(0x1d1)]['get'](g),this[_0x5ba4a8(0x1d1)][_0x5ba4a8(0x1c3)](S);}};$(b,_0x2410e5(0x1c8),W),$(b,_0x2410e5(0x1ae),_0x28a7b0[_0x2410e5(0x1ca)]),b=ie([_0xea713d(_0x1e752b,_0x54e958,_0x171464),w(0x1,_0x242445(_0x2598ce)),w(0x2,_0x1580e0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2834(){const _0x5a2e04=['@univerjs/thread-comment-ui','merge','defineProperty','deleteComment','stringify','customRanges','post','38zZwzbO','_userService','replies','UniverCollaborationClientPlugin','/reply','rxjs','UniverCore','/solved','UniverProLicense','getCurrentUser','resolved','bufferTime','@univerjs/core','_threadCommentDataSource','Solve','getUnit','rangeType','/delete','parse','Reply','user','root','@univerjs-pro/license','setConfig','_threadCommentDataSourceService','map','getOwnPropertyDescriptor','CollaborationSessionService','_initUserSync','UniverProThreadCommentDatasource','reply','object','updateComment','find','_init','Disposable','_config','thread-comment-data-source.config','UniverProCollaborationClient','/add','code','_configService','Edit','getUser','values','_sessionService','OpenOrReOpen','4870dmbAde','subscribe','comment','IThreadCommentDataSourceService','IConfigService','commentUpdate$','body','listComments','symbol','Inject','8tQgLoi','4724bbjQfl','onReady','filter','_initDataSource','error','createTimestamp','getMemberID','YYYY/MM/DD\x20HH:mm','@univerjs/network','88JhempU','Add','COMMENT','DependentOn','addUser','syncUpdateMutationToColla','CustomRangeType','rangeId','UNRECOGNIZED','UniverThreadComment','@univerjs-pro/collaboration-client','personId','UniverThreadCommentDataSourcePlugin','userID','ThreadCommentModel','add','_injector','get','@univerjs/thread-comment','/universer-api/user/list','users','resolveComment','ref','replyId','HTTPService','364932WBWGzu','UniverThreadCommentUIPlugin','50188qaLzUn','size','requireSession','/edit','solved','Module','Delete','7224427vIdrRT','_commentService','content','_threadCommentModel','delete','UserManagerService','threadId','UNIVER_UNKNOWN','dataSource','amd','Plugin','getComment','unitId','format','Injector','type','forEach','3407610qSiQjC','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','length','exports','parentId','_httpService','userId','Unknown','4802244pnlmfi','8721423xYQUPs','disposeWithMe','Solved','addComment','pluginName'];_0x2834=function(){return _0x5a2e04;};return _0x2834();}function _0x3204(_0x387fdb,_0x28e565){const _0x2834e4=_0x2834();return _0x3204=function(_0x3204f7,_0x24ca26){_0x3204f7=_0x3204f7-0x89;let _0x23f547=_0x2834e4[_0x3204f7];return _0x23f547;},_0x3204(_0x387fdb,_0x28e565);}(function(_0x66dde0,_0x4d5935){const _0x54f45c=_0x3204,_0x31cde5=_0x66dde0();while(!![]){try{const _0x4354f8=parseInt(_0x54f45c(0xaf))/0x1*(parseInt(_0x54f45c(0x10d))/0x2)+parseInt(_0x54f45c(0x10b))/0x3+-parseInt(_0x54f45c(0xe9))/0x4*(-parseInt(_0x54f45c(0xde))/0x5)+-parseInt(_0x54f45c(0xa2))/0x6+parseInt(_0x54f45c(0x114))/0x7+-parseInt(_0x54f45c(0xe8))/0x8*(-parseInt(_0x54f45c(0xa3))/0x9)+parseInt(_0x54f45c(0x99))/0xa*(-parseInt(_0x54f45c(0xf2))/0xb);if(_0x4354f8===_0x4d5935)break;else _0x31cde5['push'](_0x31cde5['shift']());}catch(_0x433822){_0x31cde5['push'](_0x31cde5['shift']());}}}(_0x2834,0xaaefc),function(_0x12b489,_0x4d08ed){const _0x411320=_0x3204;typeof exports==_0x411320(0xce)&&typeof module<'u'?_0x4d08ed(exports,require(_0x411320(0xfc)),require('@univerjs-pro/license'),require(_0x411320(0xbb)),require(_0x411320(0xa8)),require(_0x411320(0x104)),require(_0x411320(0xb4)),require(_0x411320(0xf1))):typeof define=='function'&&define[_0x411320(0x91)]?define([_0x411320(0x9d),_0x411320(0xfc),_0x411320(0xc5),_0x411320(0xbb),_0x411320(0xa8),_0x411320(0x104),_0x411320(0xb4),_0x411320(0xf1)],_0x4d08ed):(_0x12b489=typeof globalThis<'u'?globalThis:_0x12b489||self,_0x4d08ed(_0x12b489[_0x411320(0xcc)]={},_0x12b489[_0x411320(0xd5)],_0x12b489[_0x411320(0xb7)],_0x12b489[_0x411320(0xb5)],_0x12b489['UniverThreadCommentUi'],_0x12b489[_0x411320(0xfb)],_0x12b489[_0x411320(0xb4)],_0x12b489['UniverNetwork']));}(this,function(_0x321e48,_0x182396,_0x14c201,_0x151fa6,_0x5f4ed7,_0x1650f0,_0x68007b,_0xfa25ec){'use strict';const _0x591f68=_0x3204;const _0x58b3e4=_0x591f68(0x9a);var _0x37ebf4=(_0x1b8e99=>(_0x1b8e99[_0x1b8e99[_0x591f68(0xdd)]=0x0]=_0x591f68(0xdd),_0x1b8e99[_0x1b8e99[_0x591f68(0xa5)]=0x1]=_0x591f68(0xa5),_0x1b8e99[_0x1b8e99['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1b8e99))(_0x37ebf4||{}),_0x40cbd3=(_0x2dbf52=>(_0x2dbf52[_0x2dbf52[_0x591f68(0xa1)]=0x0]=_0x591f68(0xa1),_0x2dbf52[_0x2dbf52['Add']=0x1]='Add',_0x2dbf52[_0x2dbf52[_0x591f68(0xc2)]=0x2]='Reply',_0x2dbf52[_0x2dbf52[_0x591f68(0xd9)]=0x3]=_0x591f68(0xd9),_0x2dbf52[_0x2dbf52[_0x591f68(0x113)]=0x4]=_0x591f68(0x113),_0x2dbf52[_0x2dbf52[_0x591f68(0xbd)]=0x5]=_0x591f68(0xbd),_0x2dbf52[_0x2dbf52[_0x591f68(0xfa)]=-0x1]=_0x591f68(0xfa),_0x2dbf52))(_0x40cbd3||{});const _0x4f5f2a=_0x556077=>_0x151fa6['dayjs'](new Date(+_0x556077))[_0x591f68(0x95)](_0x591f68(0xf0)),_0x49ec44=async(_0x3d9529,_0x4c4a9a)=>{const _0x46f547=_0x591f68,_0x27a463=_0x3d9529[_0x46f547(0x103)](_0x151fa6[_0x46f547(0x8d)]),_0x2bebf3=_0x3d9529['get'](_0xfa25ec[_0x46f547(0x10a)]);_0x4c4a9a[_0x46f547(0x98)](_0x5c91ae=>{const _0x67ffc3=_0x46f547;_0x27a463[_0x67ffc3(0xda)](_0x5c91ae)&&_0x4c4a9a[_0x67ffc3(0x8c)](_0x5c91ae);}),_0x4c4a9a[_0x46f547(0x10e)]&&(await _0x2bebf3[_0x46f547(0x103)](_0x46f547(0x105),{'params':{'userIDs':[..._0x4c4a9a]}}))[_0x46f547(0xe4)]['users'][_0x46f547(0x98)](_0x43e595=>{const _0x565d02=_0x46f547;_0x43e595&&_0x27a463[_0x565d02(0xf6)](_0x43e595);});};var _0x5bed7c=Object[_0x591f68(0xc9)],_0x5edcc7=(_0x58aceb,_0x5396f2,_0x49ec16,_0xce402b)=>{const _0x328681=_0x591f68;for(var _0x55e6fd=_0xce402b>0x1?void 0x0:_0xce402b?_0x5bed7c(_0x5396f2,_0x49ec16):_0x5396f2,_0x297fa2=_0x58aceb[_0x328681(0x9c)]-0x1,_0x411f46;_0x297fa2>=0x0;_0x297fa2--)(_0x411f46=_0x58aceb[_0x297fa2])&&(_0x55e6fd=_0x411f46(_0x55e6fd)||_0x55e6fd);return _0x55e6fd;},_0x46cf7d=(_0x548a71,_0x267290)=>(_0x4ff830,_0x5b9baa)=>_0x267290(_0x4ff830,_0x5b9baa,_0x548a71);let _0x2232cc=class extends _0x151fa6[_0x591f68(0xd2)]{constructor(_0x153efa,_0x2983e2,_0x2a20d0,_0x2d0e54){const _0xfded7a=_0x591f68;super(),this['_commentService']=_0x153efa,this[_0xfded7a(0x8b)]=_0x2983e2,this[_0xfded7a(0xb0)]=_0x2a20d0,this[_0xfded7a(0x102)]=_0x2d0e54,this['_init'](),this[_0xfded7a(0xcb)]();}[_0x591f68(0xcb)](){const _0x927726=_0x591f68;this[_0x927726(0xa4)](this[_0x927726(0x8b)][_0x927726(0xe3)]['pipe'](_0x68007b[_0x927726(0xba)](0x10))['subscribe'](_0x1ff493=>{const _0x33398d=_0x927726,_0x2505a7=new Set();_0x1ff493[_0x33398d(0x98)](_0x5b73c8=>{const _0x139fdd=_0x33398d;switch(_0x5b73c8[_0x139fdd(0x97)]){case _0x139fdd(0x101):{const _0x19af81=_0x5b73c8['payload'][_0x139fdd(0xfd)];_0x2505a7[_0x139fdd(0x101)](_0x19af81);break;}}}),_0x49ec44(this[_0x33398d(0x102)],_0x2505a7);}));}[_0x591f68(0xd1)](){const _0x5105a3=_0x591f68;this[_0x5105a3(0xa4)](this[_0x5105a3(0x89)][_0x5105a3(0xe3)][_0x5105a3(0xdf)](async _0x26cfa1=>{const _0x1292b0=_0x5105a3;var _0x19a9d4,_0x4dd764,_0x238576,_0x468231;const _0x431740=(_0x19a9d4=this[_0x1292b0(0x8b)][_0x1292b0(0xbe)](_0x26cfa1[_0x1292b0(0x94)])[_0x1292b0(0xd0)](_0x39599d=>_0x39599d[_0x1292b0(0x8e)]===_0x26cfa1['threadId']))==null?void 0x0:_0x19a9d4[_0x1292b0(0xc4)];if(!_0x431740)return;const {unitId:_0x2e0f3c,subUnitId:_0x5d9bb1}=_0x431740;switch(_0x26cfa1[_0x1292b0(0xc3)]&&this[_0x1292b0(0xb0)][_0x1292b0(0xf6)](_0x26cfa1[_0x1292b0(0xc3)]),_0x26cfa1['type']){case _0x40cbd3[_0x1292b0(0xf3)]:break;case _0x40cbd3['Reply']:{this['_threadCommentModel'][_0x1292b0(0xa6)](_0x2e0f3c,_0x5d9bb1,{'unitId':_0x2e0f3c,'subUnitId':_0x5d9bb1,'ref':'','id':_0x26cfa1[_0x1292b0(0x109)],'dT':_0x4f5f2a(+_0x26cfa1[_0x1292b0(0xee)]),'threadId':_0x26cfa1[_0x1292b0(0x8e)],'personId':(_0x238576=(_0x4dd764=_0x26cfa1[_0x1292b0(0xc3)])==null?void 0x0:_0x4dd764[_0x1292b0(0xff)])!=null?_0x238576:_0x26cfa1[_0x1292b0(0xa0)],'text':JSON[_0x1292b0(0xc1)](_0x26cfa1[_0x1292b0(0x8a)]),'parentId':_0x431740['id']});break;}case _0x40cbd3[_0x1292b0(0x113)]:{const _0x222496=this[_0x1292b0(0x8b)][_0x1292b0(0x93)](_0x2e0f3c,_0x5d9bb1,_0x26cfa1[_0x1292b0(0x109)]);_0x222496&&_0x222496[_0x1292b0(0x9e)]&&this[_0x1292b0(0x8b)]['deleteComment'](_0x2e0f3c,_0x5d9bb1,_0x26cfa1[_0x1292b0(0x109)]);break;}case _0x40cbd3[_0x1292b0(0xd9)]:{this[_0x1292b0(0x8b)][_0x1292b0(0xcf)](_0x2e0f3c,_0x5d9bb1,{'commentId':_0x26cfa1[_0x1292b0(0x109)],'text':JSON[_0x1292b0(0xc1)](_0x26cfa1['content'])});break;}case _0x40cbd3['Solve']:{const _0x15bc78=(_0x468231=this[_0x1292b0(0x8b)][_0x1292b0(0xbe)](_0x26cfa1[_0x1292b0(0x94)])[_0x1292b0(0xd0)](_0x3eaa3e=>_0x3eaa3e[_0x1292b0(0x8e)]===_0x26cfa1[_0x1292b0(0x8e)]))==null?void 0x0:_0x468231[_0x1292b0(0xc4)];_0x15bc78&&this[_0x1292b0(0x8b)][_0x1292b0(0x107)](_0x2e0f3c,_0x5d9bb1,_0x15bc78['id'],_0x26cfa1[_0x1292b0(0x111)]===_0x37ebf4[_0x1292b0(0xa5)]);break;}}}));}};_0x2232cc=_0x5edcc7([_0x46cf7d(0x0,_0x151fa6[_0x591f68(0xe7)](_0x182396['CommentService'])),_0x46cf7d(0x1,_0x151fa6[_0x591f68(0xe7)](_0x1650f0[_0x591f68(0x100)])),_0x46cf7d(0x2,_0x151fa6[_0x591f68(0xe7)](_0x151fa6[_0x591f68(0x8d)])),_0x46cf7d(0x3,_0x151fa6[_0x591f68(0xe7)](_0x151fa6[_0x591f68(0x96)]))],_0x2232cc);const _0x23ed33=_0x591f68(0xd4),_0x31f529={};var _0x202b9f=Object['getOwnPropertyDescriptor'],_0x523dcf=(_0x3598ad,_0x2341d5,_0x1c47ee,_0x186091)=>{const _0x53b717=_0x591f68;for(var _0x3993fe=_0x186091>0x1?void 0x0:_0x186091?_0x202b9f(_0x2341d5,_0x1c47ee):_0x2341d5,_0x37ebe7=_0x3598ad[_0x53b717(0x9c)]-0x1,_0x5cfa7f;_0x37ebe7>=0x0;_0x37ebe7--)(_0x5cfa7f=_0x3598ad[_0x37ebe7])&&(_0x3993fe=_0x5cfa7f(_0x3993fe)||_0x3993fe);return _0x3993fe;},_0x952504=(_0x487477,_0x2eff42)=>(_0x4e6788,_0x231564)=>_0x2eff42(_0x4e6788,_0x231564,_0x487477);function _0x16ac71(_0x1d6b9b,_0x21fc5e){const _0x5d74e5=_0x591f68,_0x480ad0=_0x1d6b9b[_0x5d74e5(0xb1)][0x0];return{..._0x21fc5e,'id':_0x480ad0[_0x5d74e5(0x109)],'resolved':_0x1d6b9b[_0x5d74e5(0x111)]===0x1,'dT':_0x4f5f2a(_0x480ad0[_0x5d74e5(0xee)]),'personId':_0x480ad0['userId'],'threadId':_0x480ad0[_0x5d74e5(0x8e)]};}function _0x3212ca(_0x5efa6b,_0x5f7df6,_0x4f45d2){const _0x5dcb63=_0x591f68;var _0x1e3df1,_0x32ff26;if(((_0x32ff26=(_0x1e3df1=_0x5efa6b==null?void 0x0:_0x5efa6b[_0x5dcb63(0xb1)])==null?void 0x0:_0x1e3df1[_0x5dcb63(0x9c)])!=null?_0x32ff26:0x0)>0x0){const _0x1db11b=(_0x39ca3a,_0x517d3a)=>({'id':_0x39ca3a[_0x5dcb63(0x109)],'threadId':_0x39ca3a[_0x5dcb63(0x8e)],'dT':_0x4f5f2a(_0x39ca3a[_0x5dcb63(0xee)]),'personId':_0x39ca3a[_0x5dcb63(0xa0)],'resolved':_0x5efa6b['solved']===_0x37ebf4['Solved'],'unitId':_0x5f7df6,'subUnitId':_0x4f45d2,'text':JSON[_0x5dcb63(0xc1)](_0x39ca3a[_0x5dcb63(0x8a)]),'parentId':_0x517d3a}),_0x59d225=_0x1db11b(_0x5efa6b['replies'][0x0]);return{..._0x59d225,'children':_0x5efa6b[_0x5dcb63(0xb1)]['slice'](0x1)[_0x5dcb63(0xc8)](_0x5a3b86=>_0x1db11b(_0x5a3b86,_0x59d225['id']))};}return null;}let _0x22c519=class{constructor(_0x22223b,_0x3e0423,_0x2d09cd,_0x5ca60f){const _0x23e9c2=_0x591f68;this['_httpService']=_0x22223b,this[_0x23e9c2(0xb0)]=_0x3e0423,this[_0x23e9c2(0xdc)]=_0x2d09cd,this['_injector']=_0x5ca60f;}async[_0x591f68(0xa6)](_0x20af83){const _0x53c072=_0x591f68;var _0x56b22b,_0x1e6555;const {parentId:_0x7d3ae4,unitId:_0x15b5f7,text:_0x18bd38,threadId:_0x4e2077}=_0x20af83,_0x3e3746=(_0x1e6555=(_0x56b22b=_0x18bd38[_0x53c072(0xad)])==null?void 0x0:_0x56b22b[_0x53c072(0xeb)](_0x13c418=>_0x13c418[_0x53c072(0xbf)]===_0x151fa6[_0x53c072(0xf8)]['COMMENT'])['map'](_0x4711d3=>_0x4711d3[_0x53c072(0xf9)]))!=null?_0x1e6555:[],_0x3e1fa7=JSON['stringify'](_0x18bd38),_0x3805e8=(await this[_0x53c072(0xdc)][_0x53c072(0x10f)](_0x15b5f7))[_0x53c072(0xef)]();if(_0x7d3ae4){const _0x2e5043={'memberId':_0x3805e8,'unitId':_0x15b5f7,'content':_0x3e1fa7,'mention':_0x3e3746,'threadId':_0x4e2077},_0x2686b7=(await this[_0x53c072(0x9f)][_0x53c072(0xae)](_0x53c072(0x9b)+_0x15b5f7+_0x53c072(0xb3),{'body':_0x2e5043}))[_0x53c072(0xe4)][_0x53c072(0xcd)];return{..._0x20af83,'id':_0x2686b7[_0x53c072(0x109)],'dT':_0x151fa6['dayjs'](+_0x2686b7['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2686b7[_0x53c072(0xa0)]};}else{const _0x26a2e2={'memberId':_0x3805e8,'unitId':_0x15b5f7,'content':_0x3e1fa7,'mention':_0x3e3746},_0x589df6=await this['_httpService'][_0x53c072(0xae)](_0x53c072(0x9b)+_0x15b5f7+_0x53c072(0xd6),{'body':_0x26a2e2});return _0x16ac71(_0x589df6[_0x53c072(0xe4)][_0x53c072(0xe0)],_0x20af83);}}async['updateComment'](_0x1b8937){const _0x4846cb=_0x591f68;var _0x3ea558,_0x242c34;const {text:_0x3e4d6b,unitId:_0x2d9637}=_0x1b8937,_0x3cca61=(_0x242c34=(_0x3ea558=_0x3e4d6b[_0x4846cb(0xad)])==null?void 0x0:_0x3ea558['filter'](_0x406ba7=>_0x406ba7[_0x4846cb(0xbf)]===_0x151fa6[_0x4846cb(0xf8)][_0x4846cb(0xf4)])[_0x4846cb(0xc8)](_0x47a021=>_0x47a021['rangeId']))!=null?_0x242c34:[],_0x8bcd8b=JSON[_0x4846cb(0xac)](_0x3e4d6b),_0x1d8821=_0x1b8937[_0x4846cb(0x8e)],_0x3f0c37=_0x1b8937['id'],_0x4a9b67={'memberId':(await this[_0x4846cb(0xdc)]['requireSession'](_0x2d9637))[_0x4846cb(0xef)](),'unitId':_0x2d9637,'threadId':_0x1d8821,'mention':_0x3cca61,'content':_0x8bcd8b,'replyId':_0x3f0c37},_0x31d8af=await this[_0x4846cb(0x9f)][_0x4846cb(0xae)](_0x4846cb(0x9b)+_0x2d9637+_0x4846cb(0x110),{'body':_0x4a9b67});return!_0x31d8af['body'][_0x4846cb(0xed)]||_0x31d8af[_0x4846cb(0xe4)][_0x4846cb(0xed)][_0x4846cb(0xd7)]===0x1;}async['resolveComment'](_0xcafcc9){const _0x45ec97=_0x591f68,{unitId:_0x45a25f}=_0xcafcc9,_0x40c451=_0xcafcc9[_0x45ec97(0x8e)],_0x47638f={'memberId':this[_0x45ec97(0xb0)][_0x45ec97(0xb8)]()[_0x45ec97(0xff)],'unitId':_0x45a25f,'threadId':_0x40c451,'solved':_0xcafcc9[_0x45ec97(0xb9)]?_0x37ebf4['Solved']:_0x37ebf4[_0x45ec97(0xdd)]},_0xa46a85=await this['_httpService'][_0x45ec97(0xae)]('/universer-api/comment/unit/'+_0x45a25f+_0x45ec97(0xb6),{'body':_0x47638f});return!_0xa46a85['body']['error']||_0xa46a85[_0x45ec97(0xe4)][_0x45ec97(0xed)][_0x45ec97(0xd7)]===0x1;}async[_0x591f68(0xab)](_0x5b1b03,_0x473a29,_0x328b95,_0x2de5c2){const _0x299214=_0x591f68,_0x128747={'memberId':(await this['_sessionService'][_0x299214(0x10f)](_0x5b1b03))[_0x299214(0xef)](),'threadId':_0x328b95,'replyId':_0x2de5c2,'unitId':_0x5b1b03},_0x2e7e4d=await this[_0x299214(0x9f)]['post'](_0x299214(0x9b)+_0x5b1b03+_0x299214(0xc0),{'body':_0x128747});return!_0x2e7e4d[_0x299214(0xe4)][_0x299214(0xed)]||_0x2e7e4d[_0x299214(0xe4)][_0x299214(0xed)][_0x299214(0xd7)]===0x1;}async[_0x591f68(0xe5)](_0x3a55d9,_0x5755e1,_0x3736eb){const _0xf616d7=_0x591f68,_0x3824e9={'unitId':_0x3a55d9,'threadId':_0x3736eb},_0x417f0f=await this[_0xf616d7(0x9f)]['post'](_0xf616d7(0x9b)+_0x3a55d9+'/list',{'body':_0x3824e9}),_0xdf3050=_0x3736eb[_0xf616d7(0xc8)](_0x61a6ae=>_0x3212ca(_0x417f0f[_0xf616d7(0xe4)]['comments'][_0x61a6ae],_0x3a55d9,_0x5755e1))['filter'](Boolean);return Object[_0xf616d7(0xdb)](_0x417f0f[_0xf616d7(0xe4)][_0xf616d7(0x106)])[_0xf616d7(0x98)](_0x14e5be=>{const _0x4ac085=_0xf616d7;this[_0x4ac085(0xb0)][_0x4ac085(0xf6)](_0x14e5be);}),_0xdf3050;}['saveCommentToSnapshot'](_0x193524){const _0x82d3a3=_0x591f68;return{'id':_0x193524['id'],'threadId':_0x193524[_0x82d3a3(0x8e)],'ref':_0x193524[_0x82d3a3(0x108)]};}};_0x22c519=_0x523dcf([_0x952504(0x0,_0x151fa6[_0x591f68(0xe7)](_0xfa25ec[_0x591f68(0x10a)])),_0x952504(0x1,_0x151fa6['Inject'](_0x151fa6[_0x591f68(0x8d)])),_0x952504(0x2,_0x151fa6[_0x591f68(0xe7)](_0x182396[_0x591f68(0xca)])),_0x952504(0x3,_0x151fa6[_0x591f68(0xe7)](_0x151fa6['Injector']))],_0x22c519);var _0x24b408=Object[_0x591f68(0xc9)],_0x4553f8=(_0x465afa,_0x46e9df,_0x34c0b5,_0xcb9e8f)=>{for(var _0x1281d5=_0xcb9e8f>0x1?void 0x0:_0xcb9e8f?_0x24b408(_0x46e9df,_0x34c0b5):_0x46e9df,_0x5cb80e=_0x465afa['length']-0x1,_0x4017ca;_0x5cb80e>=0x0;_0x5cb80e--)(_0x4017ca=_0x465afa[_0x5cb80e])&&(_0x1281d5=_0x4017ca(_0x1281d5)||_0x1281d5);return _0x1281d5;},_0x23d751=(_0x34edef,_0x11648f)=>(_0x27a4c1,_0x159667)=>_0x11648f(_0x27a4c1,_0x159667,_0x34edef);let _0x49b07e=class extends _0x151fa6[_0x591f68(0xd2)]{constructor(_0x446c22,_0x1a7c8a){const _0x2092f6=_0x591f68;super(),this[_0x2092f6(0xc7)]=_0x446c22,this[_0x2092f6(0xbc)]=_0x1a7c8a,this['_initDataSource']();}[_0x591f68(0xec)](){const _0x3dcbd2=_0x591f68;this[_0x3dcbd2(0xc7)][_0x3dcbd2(0x90)]=this[_0x3dcbd2(0xbc)],this[_0x3dcbd2(0xc7)][_0x3dcbd2(0xf7)]=!0x1;}};_0x49b07e=_0x4553f8([_0x23d751(0x0,_0x1650f0[_0x591f68(0xe1)]),_0x23d751(0x1,_0x151fa6[_0x591f68(0xe7)](_0x22c519))],_0x49b07e);var _0x130bd4=Object['defineProperty'],_0x373e95=Object[_0x591f68(0xc9)],_0x2225d9=(_0x30cfaf,_0x4ed427,_0x37d1a3)=>_0x4ed427 in _0x30cfaf?_0x130bd4(_0x30cfaf,_0x4ed427,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37d1a3}):_0x30cfaf[_0x4ed427]=_0x37d1a3,_0x48bb38=(_0x439de5,_0x38ecf2,_0x1cf9a0,_0x4b20bb)=>{const _0x1e41a5=_0x591f68;for(var _0x27f783=_0x4b20bb>0x1?void 0x0:_0x4b20bb?_0x373e95(_0x38ecf2,_0x1cf9a0):_0x38ecf2,_0x494d41=_0x439de5[_0x1e41a5(0x9c)]-0x1,_0x8ea9c0;_0x494d41>=0x0;_0x494d41--)(_0x8ea9c0=_0x439de5[_0x494d41])&&(_0x27f783=_0x8ea9c0(_0x27f783)||_0x27f783);return _0x27f783;},_0x30ff86=(_0xfd8066,_0x3513fe)=>(_0x39a9e6,_0x5dcde4)=>_0x3513fe(_0x39a9e6,_0x5dcde4,_0xfd8066),_0x3f44cd=(_0x95d6a1,_0xed0ecb,_0x2788c7)=>_0x2225d9(_0x95d6a1,typeof _0xed0ecb!=_0x591f68(0xe6)?_0xed0ecb+'':_0xed0ecb,_0x2788c7);_0x321e48[_0x591f68(0xfe)]=class extends _0x151fa6[_0x591f68(0x92)]{constructor(_0x4fb092=_0x31f529,_0x26fad8,_0x3e303f){const _0x7ed6a3=_0x591f68;super(),this[_0x7ed6a3(0xd3)]=_0x4fb092,this['_injector']=_0x26fad8,this[_0x7ed6a3(0xd8)]=_0x3e303f;const {..._0x283788}=_0x151fa6[_0x7ed6a3(0xa9)]({},_0x31f529,this[_0x7ed6a3(0xd3)]);this[_0x7ed6a3(0xd8)][_0x7ed6a3(0xc6)](_0x23ed33,_0x283788);}['onStarting'](){[[_0x22c519],[_0x49b07e],[_0x2232cc]]['forEach'](_0x51a747=>{const _0x506ca2=_0x3204;this[_0x506ca2(0x102)][_0x506ca2(0x101)](_0x51a747);});}[_0x591f68(0xea)](){const _0x50565c=_0x591f68;this[_0x50565c(0x102)][_0x50565c(0x103)](_0x49b07e),this['_injector']['get'](_0x2232cc);}},_0x3f44cd(_0x321e48[_0x591f68(0xfe)],_0x591f68(0xa7),_0x58b3e4),_0x3f44cd(_0x321e48[_0x591f68(0xfe)],_0x591f68(0x97),_0x151fa6['UniverInstanceType'][_0x591f68(0x8f)]),_0x321e48[_0x591f68(0xfe)]=_0x48bb38([_0x151fa6[_0x591f68(0xf5)](_0x5f4ed7[_0x591f68(0x10c)],_0x182396[_0x591f68(0xb2)],_0x14c201['UniverLicensePlugin']),_0x30ff86(0x1,_0x151fa6[_0x591f68(0xe7)](_0x151fa6['Injector'])),_0x30ff86(0x2,_0x151fa6[_0x591f68(0xe2)])],_0x321e48['UniverThreadCommentDataSourcePlugin']),Object[_0x591f68(0xaa)](_0x321e48,Symbol['toStringTag'],{'value':_0x591f68(0x112)});}));
|
|
1
|
+
function _0x4398(_0x461641,_0x467d6e){const _0x47e643=_0x47e6();return _0x4398=function(_0x439832,_0x5bb3a7){_0x439832=_0x439832-0x173;let _0x9c74f1=_0x47e643[_0x439832];return _0x9c74f1;},_0x4398(_0x461641,_0x467d6e);}(function(_0x20d3d8,_0x5292c9){const _0x34ae38=_0x4398,_0x3b1fa0=_0x20d3d8();while(!![]){try{const _0x19e5dd=-parseInt(_0x34ae38(0x180))/0x1+-parseInt(_0x34ae38(0x185))/0x2*(-parseInt(_0x34ae38(0x1d1))/0x3)+-parseInt(_0x34ae38(0x18a))/0x4+-parseInt(_0x34ae38(0x188))/0x5*(parseInt(_0x34ae38(0x1b7))/0x6)+-parseInt(_0x34ae38(0x1eb))/0x7*(parseInt(_0x34ae38(0x1e3))/0x8)+-parseInt(_0x34ae38(0x1c7))/0x9+-parseInt(_0x34ae38(0x1ad))/0xa*(-parseInt(_0x34ae38(0x1c5))/0xb);if(_0x19e5dd===_0x5292c9)break;else _0x3b1fa0['push'](_0x3b1fa0['shift']());}catch(_0x34472b){_0x3b1fa0['push'](_0x3b1fa0['shift']());}}}(_0x47e6,0x2a2f1),function(_0xfd4b7b,_0x834232){const _0x269ed4=_0x4398;typeof exports==_0x269ed4(0x17a)&&typeof module<'u'?_0x834232(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x269ed4(0x1bc)),require(_0x269ed4(0x18d)),require(_0x269ed4(0x1cb)),require(_0x269ed4(0x1a0)),require('@univerjs/network')):typeof define==_0x269ed4(0x1c2)&&define[_0x269ed4(0x1ca)]?define([_0x269ed4(0x1b8),'@univerjs-pro/collaboration-client',_0x269ed4(0x1ce),_0x269ed4(0x1bc),_0x269ed4(0x18d),_0x269ed4(0x1cb),'rxjs',_0x269ed4(0x1d5)],_0x834232):(_0xfd4b7b=typeof globalThis<'u'?globalThis:_0xfd4b7b||self,_0x834232(_0xfd4b7b['UniverProThreadCommentDatasource']={},_0xfd4b7b['UniverProCollaborationClient'],_0xfd4b7b[_0x269ed4(0x1d4)],_0xfd4b7b[_0x269ed4(0x1ea)],_0xfd4b7b['UniverThreadCommentUi'],_0xfd4b7b[_0x269ed4(0x1a6)],_0xfd4b7b[_0x269ed4(0x1a0)],_0xfd4b7b[_0x269ed4(0x1f3)]));}(this,function(_0x11ecc3,_0x5d20d9,_0x11ab02,_0x3c648d,_0x20cd00,_0x3b1059,_0xd85e6f,_0x48603c){'use strict';const _0x3f0ee5=_0x4398;const _0x29c887=_0x3f0ee5(0x191);var _0x8e7e8b=(_0x7fdf33=>(_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x184)]=0x0]=_0x3f0ee5(0x184),_0x7fdf33[_0x7fdf33['Solved']=0x1]=_0x3f0ee5(0x1d7),_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x1e1)]=-0x1]=_0x3f0ee5(0x1e1),_0x7fdf33))(_0x8e7e8b||{}),_0x7af052=(_0x1b5562=>(_0x1b5562[_0x1b5562['Unknown']=0x0]=_0x3f0ee5(0x1d6),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e8)]=0x1]=_0x3f0ee5(0x1e8),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1f2)]=0x2]=_0x3f0ee5(0x1f2),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1cd)]=0x3]=_0x3f0ee5(0x1cd),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1c9)]=0x4]=_0x3f0ee5(0x1c9),_0x1b5562[_0x1b5562[_0x3f0ee5(0x189)]=0x5]=_0x3f0ee5(0x189),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e1)]=-0x1]='UNRECOGNIZED',_0x1b5562))(_0x7af052||{});const _0x2a4927=_0x35fe8e=>_0x3c648d[_0x3f0ee5(0x19a)](new Date(+_0x35fe8e))['format']('YYYY/MM/DD\x20HH:mm'),_0x4a1b1f=async(_0x142d99,_0x3d0266)=>{const _0x4cbb8d=_0x3f0ee5,_0x91f4bb=_0x142d99['get'](_0x3c648d[_0x4cbb8d(0x19b)]),_0x2424fc=_0x142d99[_0x4cbb8d(0x1bf)](_0x48603c[_0x4cbb8d(0x1b4)]);_0x3d0266[_0x4cbb8d(0x1ab)](_0x1cc6a6=>{const _0x510e8a=_0x4cbb8d;_0x91f4bb[_0x510e8a(0x177)](_0x1cc6a6)&&_0x3d0266[_0x510e8a(0x1a1)](_0x1cc6a6);}),_0x3d0266['size']&&(await _0x2424fc[_0x4cbb8d(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3d0266]}}))[_0x4cbb8d(0x1d3)]['users'][_0x4cbb8d(0x1ab)](_0x249f94=>{const _0x2edff5=_0x4cbb8d;_0x249f94&&_0x91f4bb[_0x2edff5(0x18b)](_0x249f94);});};var _0x53e6be=Object[_0x3f0ee5(0x1f8)],_0x26083b=(_0x3ecb63,_0x11377e,_0x116f94,_0x2eed99)=>{const _0x4bcd19=_0x3f0ee5;for(var _0x2f7a34=_0x2eed99>0x1?void 0x0:_0x2eed99?_0x53e6be(_0x11377e,_0x116f94):_0x11377e,_0x12b210=_0x3ecb63[_0x4bcd19(0x199)]-0x1,_0x4276e0;_0x12b210>=0x0;_0x12b210--)(_0x4276e0=_0x3ecb63[_0x12b210])&&(_0x2f7a34=_0x4276e0(_0x2f7a34)||_0x2f7a34);return _0x2f7a34;},_0x4ffaf4=(_0x3cfbed,_0x1842ae)=>(_0x107fbb,_0x11981e)=>_0x1842ae(_0x107fbb,_0x11981e,_0x3cfbed);let _0xe4df36=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x36d134,_0x1f7351,_0x591a2b,_0x2fb144){const _0x52c7e0=_0x3f0ee5;super(),this[_0x52c7e0(0x1aa)]=_0x36d134,this[_0x52c7e0(0x1f0)]=_0x1f7351,this[_0x52c7e0(0x1ee)]=_0x591a2b,this[_0x52c7e0(0x1d2)]=_0x2fb144,this['_init'](),this[_0x52c7e0(0x1af)]();}['_initUserSync'](){const _0x423b42=_0x3f0ee5;this[_0x423b42(0x1e7)](this[_0x423b42(0x1f0)][_0x423b42(0x179)][_0x423b42(0x183)](_0xd85e6f[_0x423b42(0x1dc)](0x10))[_0x423b42(0x19f)](_0x746cf8=>{const _0x43efdc=new Set();_0x746cf8['forEach'](_0x2bc85d=>{const _0x12b575=_0x4398;switch(_0x2bc85d[_0x12b575(0x187)]){case _0x12b575(0x176):{const _0x33cd34=_0x2bc85d['payload'][_0x12b575(0x19c)];_0x43efdc[_0x12b575(0x176)](_0x33cd34);break;}}}),_0x4a1b1f(this['_injector'],_0x43efdc);}));}[_0x3f0ee5(0x1f4)](){const _0x51a79c=_0x3f0ee5;this['disposeWithMe'](this[_0x51a79c(0x1aa)][_0x51a79c(0x179)][_0x51a79c(0x19f)](async _0x39f27e=>{const _0x5ee7f3=_0x51a79c;var _0x154b1b,_0x230e6b,_0x3397ac,_0x37082b;const _0x29bfc5=(_0x154b1b=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x517ee7=>_0x517ee7[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x154b1b[_0x5ee7f3(0x1ba)];if(!_0x29bfc5)return;const {unitId:_0x4e1cdc,subUnitId:_0x556f1c}=_0x29bfc5;switch(_0x39f27e[_0x5ee7f3(0x186)]&&this[_0x5ee7f3(0x1ee)][_0x5ee7f3(0x18b)](_0x39f27e[_0x5ee7f3(0x186)]),_0x39f27e[_0x5ee7f3(0x187)]){case _0x7af052[_0x5ee7f3(0x1e8)]:break;case _0x7af052[_0x5ee7f3(0x1f2)]:{this['_threadCommentModel']['addComment'](_0x4e1cdc,_0x556f1c,{'unitId':_0x4e1cdc,'subUnitId':_0x556f1c,'ref':'','id':_0x39f27e[_0x5ee7f3(0x1bd)],'dT':_0x2a4927(+_0x39f27e['createTimestamp']),'threadId':_0x39f27e[_0x5ee7f3(0x1c1)],'personId':(_0x3397ac=(_0x230e6b=_0x39f27e[_0x5ee7f3(0x186)])==null?void 0x0:_0x230e6b[_0x5ee7f3(0x1c3)])!=null?_0x3397ac:_0x39f27e[_0x5ee7f3(0x1d9)],'text':JSON[_0x5ee7f3(0x17e)](_0x39f27e[_0x5ee7f3(0x1a2)]),'parentId':_0x29bfc5['id']});break;}case _0x7af052['Delete']:{const _0x368463=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1ac)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);_0x368463&&_0x368463[_0x5ee7f3(0x1ef)]&&this['_threadCommentModel'][_0x5ee7f3(0x1a7)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);break;}case _0x7af052[_0x5ee7f3(0x1cd)]:{this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x17c)](_0x4e1cdc,_0x556f1c,{'commentId':_0x39f27e[_0x5ee7f3(0x1bd)],'text':JSON['parse'](_0x39f27e[_0x5ee7f3(0x1a2)])});break;}case _0x7af052[_0x5ee7f3(0x189)]:{const _0x29719b=(_0x37082b=this['_threadCommentModel'][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x2a1dee=>_0x2a1dee[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x37082b[_0x5ee7f3(0x1ba)];_0x29719b&&this['_threadCommentModel'][_0x5ee7f3(0x1a9)](_0x4e1cdc,_0x556f1c,_0x29719b['id'],_0x39f27e[_0x5ee7f3(0x1e9)]===_0x8e7e8b[_0x5ee7f3(0x1d7)]);break;}}}));}};_0xe4df36=_0x26083b([_0x4ffaf4(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x5d20d9[_0x3f0ee5(0x1e2)])),_0x4ffaf4(0x1,_0x3c648d['Inject'](_0x3b1059['ThreadCommentModel'])),_0x4ffaf4(0x2,_0x3c648d[_0x3f0ee5(0x1c0)](_0x3c648d[_0x3f0ee5(0x19b)])),_0x4ffaf4(0x3,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x1de)]))],_0xe4df36);const _0x3a876c=_0x3f0ee5(0x1e5),_0x1e4835={};var _0x20a5a8=Object['getOwnPropertyDescriptor'],_0x4f199e=(_0x1115d3,_0x406fc6,_0x62fb81,_0x19bf26)=>{for(var _0x3c981b=_0x19bf26>0x1?void 0x0:_0x19bf26?_0x20a5a8(_0x406fc6,_0x62fb81):_0x406fc6,_0x1ccb63=_0x1115d3['length']-0x1,_0x4d8b7f;_0x1ccb63>=0x0;_0x1ccb63--)(_0x4d8b7f=_0x1115d3[_0x1ccb63])&&(_0x3c981b=_0x4d8b7f(_0x3c981b)||_0x3c981b);return _0x3c981b;},_0x346b08=(_0x9ac741,_0x1997cb)=>(_0x5cc502,_0x10277c)=>_0x1997cb(_0x5cc502,_0x10277c,_0x9ac741);function _0x115485(_0x4dc836,_0x1d2a90){const _0x2755c8=_0x3f0ee5,_0x294372=_0x4dc836[_0x2755c8(0x17b)][0x0];return{..._0x1d2a90,'id':_0x294372[_0x2755c8(0x1bd)],'resolved':_0x4dc836[_0x2755c8(0x1e9)]===0x1,'dT':_0x2a4927(_0x294372[_0x2755c8(0x1c4)]),'personId':_0x294372[_0x2755c8(0x1d9)],'threadId':_0x294372[_0x2755c8(0x1c1)]};}function _0x532479(_0x188679,_0x16d735,_0xfbdf15){const _0x258c42=_0x3f0ee5;var _0x2b2a02,_0x508eb0;if(((_0x508eb0=(_0x2b2a02=_0x188679==null?void 0x0:_0x188679[_0x258c42(0x17b)])==null?void 0x0:_0x2b2a02[_0x258c42(0x199)])!=null?_0x508eb0:0x0)>0x0){const _0x1aed6b=(_0x9bbad3,_0x27e5c5)=>({'id':_0x9bbad3[_0x258c42(0x1bd)],'threadId':_0x9bbad3[_0x258c42(0x1c1)],'dT':_0x2a4927(_0x9bbad3[_0x258c42(0x1c4)]),'personId':_0x9bbad3[_0x258c42(0x1d9)],'resolved':_0x188679[_0x258c42(0x1e9)]===_0x8e7e8b[_0x258c42(0x1d7)],'unitId':_0x16d735,'subUnitId':_0xfbdf15,'text':JSON[_0x258c42(0x17e)](_0x9bbad3[_0x258c42(0x1a2)]),'parentId':_0x27e5c5}),_0x4f61a4=_0x1aed6b(_0x188679['replies'][0x0]);return{..._0x4f61a4,'children':_0x188679[_0x258c42(0x17b)][_0x258c42(0x1b6)](0x1)[_0x258c42(0x19e)](_0x243efa=>_0x1aed6b(_0x243efa,_0x4f61a4['id']))};}return null;}let _0x474c81=class{constructor(_0x30773b,_0x55b807,_0xdd47ff,_0x23fd3e){const _0x7c1530=_0x3f0ee5;this[_0x7c1530(0x1f5)]=_0x30773b,this[_0x7c1530(0x1ee)]=_0x55b807,this['_sessionService']=_0xdd47ff,this[_0x7c1530(0x1d2)]=_0x23fd3e;}async[_0x3f0ee5(0x1e0)](_0x2397f4){const _0x26a1e6=_0x3f0ee5;var _0x391b24,_0x5371db;const {parentId:_0x444621,unitId:_0xa1e839,text:_0x2eefdf,threadId:_0x32b298}=_0x2397f4,_0x4f9d41=(_0x5371db=(_0x391b24=_0x2eefdf['customRanges'])==null?void 0x0:_0x391b24[_0x26a1e6(0x182)](_0x1da5b7=>_0x1da5b7[_0x26a1e6(0x1b1)]===_0x3c648d[_0x26a1e6(0x1e6)][_0x26a1e6(0x1f7)])[_0x26a1e6(0x19e)](_0xf6d126=>_0xf6d126['rangeId']))!=null?_0x5371db:[],_0x2a765e=JSON['stringify'](_0x2eefdf),_0x4dd0d3=(await this[_0x26a1e6(0x1ed)][_0x26a1e6(0x1a4)](_0xa1e839))['getMemberID']();if(_0x444621){const _0x1b194d={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41,'threadId':_0x32b298},_0x2f80fd=(await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)]('/universer-api/comment/unit/'+_0xa1e839+_0x26a1e6(0x18c),{'body':_0x1b194d}))['body']['reply'];return{..._0x2397f4,'id':_0x2f80fd[_0x26a1e6(0x1bd)],'dT':_0x3c648d[_0x26a1e6(0x19a)](+_0x2f80fd[_0x26a1e6(0x1c4)])['format'](_0x26a1e6(0x1be)),'personId':_0x2f80fd[_0x26a1e6(0x1d9)]};}else{const _0x33b255={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41},_0x400ff1=await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)](_0x26a1e6(0x1da)+_0xa1e839+'/add',{'body':_0x33b255});return _0x115485(_0x400ff1['body'][_0x26a1e6(0x1d8)],_0x2397f4);}}async[_0x3f0ee5(0x17c)](_0x14700b){const _0x59762f=_0x3f0ee5;var _0x1b9466,_0xc7f378;const {text:_0x1041b5,unitId:_0x55907b}=_0x14700b,_0x5c9b21=(_0xc7f378=(_0x1b9466=_0x1041b5['customRanges'])==null?void 0x0:_0x1b9466['filter'](_0x393031=>_0x393031['rangeType']===_0x3c648d[_0x59762f(0x1e6)][_0x59762f(0x1f7)])[_0x59762f(0x19e)](_0x1eabaa=>_0x1eabaa[_0x59762f(0x1df)]))!=null?_0xc7f378:[],_0x2364dc=JSON[_0x59762f(0x1a3)](_0x1041b5),_0x579876=_0x14700b[_0x59762f(0x1c1)],_0x2481e8=_0x14700b['id'],_0x2b4bac={'memberId':(await this[_0x59762f(0x1ed)][_0x59762f(0x1a4)](_0x55907b))['getMemberID'](),'unitId':_0x55907b,'threadId':_0x579876,'mention':_0x5c9b21,'content':_0x2364dc,'replyId':_0x2481e8},_0x50fa94=await this[_0x59762f(0x1f5)]['post'](_0x59762f(0x1da)+_0x55907b+'/edit',{'body':_0x2b4bac});return!_0x50fa94[_0x59762f(0x1d3)][_0x59762f(0x17d)]||_0x50fa94[_0x59762f(0x1d3)]['error'][_0x59762f(0x196)]===0x1;}async['resolveComment'](_0x1cf1cd){const _0x8dad33=_0x3f0ee5,{unitId:_0x259342}=_0x1cf1cd,_0x442187=_0x1cf1cd[_0x8dad33(0x1c1)],_0x250538={'memberId':this['_userService'][_0x8dad33(0x1cf)]()['userID'],'unitId':_0x259342,'threadId':_0x442187,'solved':_0x1cf1cd[_0x8dad33(0x18f)]?_0x8e7e8b[_0x8dad33(0x1d7)]:_0x8e7e8b[_0x8dad33(0x184)]},_0x35c96a=await this[_0x8dad33(0x1f5)]['post'](_0x8dad33(0x1da)+_0x259342+'/solved',{'body':_0x250538});return!_0x35c96a[_0x8dad33(0x1d3)][_0x8dad33(0x17d)]||_0x35c96a['body'][_0x8dad33(0x17d)][_0x8dad33(0x196)]===0x1;}async[_0x3f0ee5(0x1a7)](_0x20431c,_0x2baf60,_0x88c2c,_0x2e3f6b){const _0x32fbd7=_0x3f0ee5,_0x53d7a9={'memberId':(await this[_0x32fbd7(0x1ed)][_0x32fbd7(0x1a4)](_0x20431c))[_0x32fbd7(0x1e4)](),'threadId':_0x88c2c,'replyId':_0x2e3f6b,'unitId':_0x20431c},_0x44e8b2=await this[_0x32fbd7(0x1f5)][_0x32fbd7(0x193)]('/universer-api/comment/unit/'+_0x20431c+_0x32fbd7(0x1ae),{'body':_0x53d7a9});return!_0x44e8b2[_0x32fbd7(0x1d3)]['error']||_0x44e8b2[_0x32fbd7(0x1d3)][_0x32fbd7(0x17d)]['code']===0x1;}async[_0x3f0ee5(0x1c6)](_0x4af09a,_0x3b9d05,_0x5afc38){const _0x267a51=_0x3f0ee5,_0x3996ed={'unitId':_0x4af09a,'threadId':_0x5afc38},_0x50f02b=await this[_0x267a51(0x1f5)][_0x267a51(0x193)](_0x267a51(0x1da)+_0x4af09a+_0x267a51(0x19d),{'body':_0x3996ed}),_0x37a4e4=_0x5afc38[_0x267a51(0x19e)](_0x4cf015=>_0x532479(_0x50f02b['body'][_0x267a51(0x1d0)][_0x4cf015],_0x4af09a,_0x3b9d05))[_0x267a51(0x182)](Boolean);return Object[_0x267a51(0x17f)](_0x50f02b[_0x267a51(0x1d3)][_0x267a51(0x1a8)])['forEach'](_0x151181=>{const _0x56a2c7=_0x267a51;this[_0x56a2c7(0x1ee)]['addUser'](_0x151181);}),_0x37a4e4;}[_0x3f0ee5(0x1c8)](_0x1e00a9){const _0x7e38fa=_0x3f0ee5;return{'id':_0x1e00a9['id'],'threadId':_0x1e00a9['threadId'],'ref':_0x1e00a9[_0x7e38fa(0x1b2)]};}};_0x474c81=_0x4f199e([_0x346b08(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x48603c[_0x3f0ee5(0x1b4)])),_0x346b08(0x1,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x19b)])),_0x346b08(0x2,_0x3c648d['Inject'](_0x5d20d9[_0x3f0ee5(0x1ec)])),_0x346b08(0x3,_0x3c648d['Inject'](_0x3c648d['Injector']))],_0x474c81);var _0x252caa=Object[_0x3f0ee5(0x1f8)],_0x3c1b13=(_0x4db7a4,_0x26b578,_0x14d82b,_0x923c9d)=>{const _0x4c60ed=_0x3f0ee5;for(var _0x4ead20=_0x923c9d>0x1?void 0x0:_0x923c9d?_0x252caa(_0x26b578,_0x14d82b):_0x26b578,_0x3c33d6=_0x4db7a4[_0x4c60ed(0x199)]-0x1,_0x35134f;_0x3c33d6>=0x0;_0x3c33d6--)(_0x35134f=_0x4db7a4[_0x3c33d6])&&(_0x4ead20=_0x35134f(_0x4ead20)||_0x4ead20);return _0x4ead20;},_0x5089b5=(_0x593b97,_0x178217)=>(_0x47a566,_0x51bf38)=>_0x178217(_0x47a566,_0x51bf38,_0x593b97);let _0xd69d66=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x483156,_0x52bda5){const _0x3200e7=_0x3f0ee5;super(),this[_0x3200e7(0x174)]=_0x483156,this['_threadCommentDataSource']=_0x52bda5,this[_0x3200e7(0x1dd)]();}[_0x3f0ee5(0x1dd)](){const _0x708a65=_0x3f0ee5;this['_threadCommentDataSourceService'][_0x708a65(0x190)]=this[_0x708a65(0x175)],this[_0x708a65(0x174)][_0x708a65(0x194)]=!0x1;}};_0xd69d66=_0x3c1b13([_0x5089b5(0x0,_0x3b1059[_0x3f0ee5(0x1bb)]),_0x5089b5(0x1,_0x3c648d[_0x3f0ee5(0x1c0)](_0x474c81))],_0xd69d66);var _0x212fd9=Object[_0x3f0ee5(0x1b0)],_0x1034f4=Object['getOwnPropertyDescriptor'],_0x168ad9=(_0x389b70,_0x164419,_0xb43a44)=>_0x164419 in _0x389b70?_0x212fd9(_0x389b70,_0x164419,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb43a44}):_0x389b70[_0x164419]=_0xb43a44,_0x542e7c=(_0x4377a4,_0x1bb03a,_0x2be553,_0x2b124c)=>{for(var _0x1bbc95=_0x2b124c>0x1?void 0x0:_0x2b124c?_0x1034f4(_0x1bb03a,_0x2be553):_0x1bb03a,_0x5c2fab=_0x4377a4['length']-0x1,_0x218a73;_0x5c2fab>=0x0;_0x5c2fab--)(_0x218a73=_0x4377a4[_0x5c2fab])&&(_0x1bbc95=_0x218a73(_0x1bbc95)||_0x1bbc95);return _0x1bbc95;},_0x57ee6b=(_0x4c0563,_0x10a7a2)=>(_0x595f52,_0x107929)=>_0x10a7a2(_0x595f52,_0x107929,_0x4c0563),_0x507446=(_0x996b54,_0x2e29fa,_0x2c5fff)=>_0x168ad9(_0x996b54,typeof _0x2e29fa!=_0x3f0ee5(0x1cc)?_0x2e29fa+'':_0x2e29fa,_0x2c5fff);_0x11ecc3[_0x3f0ee5(0x18e)]=class extends _0x3c648d['Plugin']{constructor(_0x1ae307=_0x1e4835,_0xbdb220,_0x43550a){const _0x11341=_0x3f0ee5;super(),this[_0x11341(0x1a5)]=_0x1ae307,this['_injector']=_0xbdb220,this['_configService']=_0x43550a;const {..._0xf4be42}=_0x3c648d[_0x11341(0x198)]({},_0x1e4835,this['_config']);this['_configService']['setConfig'](_0x3a876c,_0xf4be42);}[_0x3f0ee5(0x1f1)](){const _0x334300=_0x3f0ee5;[[_0x474c81],[_0xd69d66],[_0xe4df36]][_0x334300(0x1ab)](_0x5464b8=>{const _0x57f151=_0x334300;this[_0x57f151(0x1d2)]['add'](_0x5464b8);});}[_0x3f0ee5(0x1b5)](){const _0x15a2d3=_0x3f0ee5;this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xd69d66),this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xe4df36);}},_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x1b9),_0x29c887),_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x187),_0x3c648d[_0x3f0ee5(0x173)]['UNIVER_UNKNOWN']),_0x11ecc3['UniverThreadCommentDataSourcePlugin']=_0x542e7c([_0x3c648d[_0x3f0ee5(0x1f6)](_0x20cd00['UniverThreadCommentUIPlugin'],_0x5d20d9[_0x3f0ee5(0x178)],_0x11ab02[_0x3f0ee5(0x192)]),_0x57ee6b(0x1,_0x3c648d['Inject'](_0x3c648d['Injector'])),_0x57ee6b(0x2,_0x3c648d['IConfigService'])],_0x11ecc3[_0x3f0ee5(0x18e)]),Object[_0x3f0ee5(0x1b0)](_0x11ecc3,Symbol[_0x3f0ee5(0x195)],{'value':'Module'});}));function _0x47e6(){const _0x654b07=['onStarting','Reply','UniverNetwork','_init','_httpService','DependentOn','COMMENT','getOwnPropertyDescriptor','UniverInstanceType','_threadCommentDataSourceService','_threadCommentDataSource','add','getUser','UniverCollaborationClientPlugin','commentUpdate$','object','replies','updateComment','error','parse','values','235704ZrvHJl','find','filter','pipe','OpenOrReOpen','525810SnWKhA','user','type','64810YvrpQv','Solve','621744oQxwKT','addUser','/reply','@univerjs/thread-comment-ui','UniverThreadCommentDataSourcePlugin','resolved','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverLicensePlugin','post','syncUpdateMutationToColla','toStringTag','code','unitId','merge','length','dayjs','UserManagerService','personId','/list','map','subscribe','rxjs','delete','content','stringify','requireSession','_config','UniverThreadComment','deleteComment','users','resolveComment','_commentService','forEach','getComment','10yJXpld','/delete','_initUserSync','defineProperty','rangeType','ref','getUnit','HTTPService','onReady','slice','6Wyrbiq','exports','pluginName','root','IThreadCommentDataSourceService','@univerjs/core','replyId','YYYY/MM/DD\x20HH:mm','get','Inject','threadId','function','userID','createTimestamp','9977198WSAziX','listComments','3000780DgpskA','saveCommentToSnapshot','Delete','amd','@univerjs/thread-comment','symbol','Edit','@univerjs-pro/license','getCurrentUser','comments','3XwUWBE','_injector','body','UniverProLicense','@univerjs/network','Unknown','Solved','comment','userId','/universer-api/comment/unit/','Disposable','bufferTime','_initDataSource','Injector','rangeId','addComment','UNRECOGNIZED','CommentService','9272qjAZVp','getMemberID','thread-comment-data-source.config','CustomRangeType','disposeWithMe','Add','solved','UniverCore','1568wKsHLq','CollaborationSessionService','_sessionService','_userService','parentId','_threadCommentModel'];_0x47e6=function(){return _0x654b07;};return _0x47e6();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505221607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505221607",
|
|
49
|
+
"@univerjs/core": "0.7.0-nightly.202505221607",
|
|
50
|
+
"@univerjs/network": "0.7.0-nightly.202505221607",
|
|
51
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505221607",
|
|
53
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505221607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505221607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
|
-
"vitest": "^3.1.
|
|
60
|
+
"vitest": "^3.1.4",
|
|
61
61
|
"@univerjs-infra/shared": "0.7.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|