@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506121607 → 0.8.1-nightly.202506141606
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 _0x30385e=_0x4d03;(function(_0x11dc63,_0x1b9ab1){const _0x448a06=_0x4d03,_0x4d18b7=_0x11dc63();while(!![]){try{const _0x3077f1=-parseInt(_0x448a06(0x1a5))/0x1*(-parseInt(_0x448a06(0x17f))/0x2)+parseInt(_0x448a06(0x17c))/0x3*(parseInt(_0x448a06(0x19c))/0x4)+-parseInt(_0x448a06(0x1c4))/0x5*(parseInt(_0x448a06(0x1c5))/0x6)+parseInt(_0x448a06(0x1d0))/0x7+parseInt(_0x448a06(0x1d1))/0x8*(parseInt(_0x448a06(0x19f))/0x9)+parseInt(_0x448a06(0x176))/0xa*(parseInt(_0x448a06(0x1e0))/0xb)+parseInt(_0x448a06(0x1e7))/0xc*(-parseInt(_0x448a06(0x170))/0xd);if(_0x3077f1===_0x1b9ab1)break;else _0x4d18b7['push'](_0x4d18b7['shift']());}catch(_0x320ad0){_0x4d18b7['push'](_0x4d18b7['shift']());}}}(_0x404b,0x327a3));function _0x4d03(_0x500194,_0x498bb6){const _0x404bdc=_0x404b();return _0x4d03=function(_0x4d0371,_0x49265a){_0x4d0371=_0x4d0371-0x169;let _0x46312f=_0x404bdc[_0x4d0371];return _0x46312f;},_0x4d03(_0x500194,_0x498bb6);}function _0x404b(){const _0x48e958=['UNIVER_UNKNOWN','addComment','resolved','setConfig','Unknown','format','size','40SxcFnx','180138mHRkUJ','@univerjs/thread-comment-ui','createTimestamp','_userService','values','_config','_threadCommentModel','Disposable','map','Solved','userID','2652769gHrLNj','147416cSTEgo','Injector','add','customRanges','getUnit','forEach','ThreadCommentModel','/universer-api/comment/unit/','Reply','resolveComment','_initDataSource','Delete','pipe','length','/solved','55rUuBYK','@univerjs-pro/license','IConfigService','Add','rxjs','deleteComment','filter','204dajxup','CommentService','onReady','_sessionService','body','/reply','Module','toStringTag','rangeType','error','replyId','UniverLicensePlugin','merge','DependentOn','_init','disposeWithMe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','784628dtkAXx','@univerjs/thread-comment','type','reply','ref','/edit','259550PuCiYi','root','slice','_threadCommentDataSource','replies','getUser','46701HlOwPv','Edit','defineProperty','1614eAagNE','UniverInstanceType','dayjs','/delete','unitId','/list','UNRECOGNIZED','updateComment','subscribe','find','UserManagerService','saveCommentToSnapshot','users','code','content','threadId','listComments','_commentService','pluginName','_injector','dataSource','bufferTime','rangeId','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','solved','userId','UniverThreadCommentDataSourcePlugin','CustomRangeType','76MOIGcC','@univerjs-pro/collaboration-client','addUser','198nGZWkS','Plugin','requireSession','user','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','326hCfBYj','parse','/add','personId','post','commentUpdate$','HTTPService','@univerjs/network','_httpService','getMemberID','@univerjs/core','CollaborationSessionService','stringify','_threadCommentDataSourceService','_configService','_initUserSync','comment','getOwnPropertyDescriptor','Inject','delete','thread-comment-data-source.config','get','Solve','parentId'];_0x404b=function(){return _0x48e958;};return _0x404b();}Object[_0x30385e(0x17e)](exports,Symbol[_0x30385e(0x1ee)],{'value':_0x30385e(0x1ed)});const b=require(_0x30385e(0x19d)),T=require(_0x30385e(0x1e1)),c=require(_0x30385e(0x1af)),j=require(_0x30385e(0x1c6)),M=require(_0x30385e(0x171)),w=require(_0x30385e(0x1e4)),P=require(_0x30385e(0x1ac)),U=_0x30385e(0x16e);var I=(_0xab9ba9=>(_0xab9ba9[_0xab9ba9[_0x30385e(0x196)]=0x0]=_0x30385e(0x196),_0xab9ba9[_0xab9ba9['Solved']=0x1]=_0x30385e(0x1ce),_0xab9ba9[_0xab9ba9[_0x30385e(0x185)]=-0x1]=_0x30385e(0x185),_0xab9ba9))(I||{}),v=(_0x51d47a=>(_0x51d47a[_0x51d47a[_0x30385e(0x1c1)]=0x0]=_0x30385e(0x1c1),_0x51d47a[_0x51d47a[_0x30385e(0x1e3)]=0x1]=_0x30385e(0x1e3),_0x51d47a[_0x51d47a['Reply']=0x2]=_0x30385e(0x1d9),_0x51d47a[_0x51d47a[_0x30385e(0x17d)]=0x3]='Edit',_0x51d47a[_0x51d47a[_0x30385e(0x1dc)]=0x4]='Delete',_0x51d47a[_0x51d47a[_0x30385e(0x1bb)]=0x5]=_0x30385e(0x1bb),_0x51d47a[_0x51d47a[_0x30385e(0x185)]=-0x1]=_0x30385e(0x185),_0x51d47a))(v||{});const f=_0x28f04d=>c[_0x30385e(0x181)](new Date(+_0x28f04d))[_0x30385e(0x1c2)](_0x30385e(0x197)),R=async(_0x3d42f,_0x149f9d)=>{const _0x40c486=_0x30385e,_0x156a17=_0x3d42f[_0x40c486(0x1ba)](c[_0x40c486(0x189)]),_0x5c9ee2=_0x3d42f[_0x40c486(0x1ba)](P[_0x40c486(0x1ab)]);_0x149f9d[_0x40c486(0x1d6)](_0x3cb6f6=>{const _0x213d22=_0x40c486;_0x156a17[_0x213d22(0x17b)](_0x3cb6f6)&&_0x149f9d[_0x213d22(0x1b8)](_0x3cb6f6);}),_0x149f9d[_0x40c486(0x1c3)]&&(await _0x5c9ee2['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x149f9d]}}))[_0x40c486(0x1eb)][_0x40c486(0x18b)][_0x40c486(0x1d6)](_0x2d9777=>{const _0x5a17b4=_0x40c486;_0x2d9777&&_0x156a17[_0x5a17b4(0x19e)](_0x2d9777);});};var $=Object[_0x30385e(0x1b6)],E=(_0x51cf3d,_0x266ebd,_0x4cce8e,_0x29198e)=>{const _0x3f44da=_0x30385e;for(var _0x1e983c=_0x29198e>0x1?void 0x0:_0x29198e?$(_0x266ebd,_0x4cce8e):_0x266ebd,_0x22d63c=_0x51cf3d[_0x3f44da(0x1de)]-0x1,_0x329961;_0x22d63c>=0x0;_0x22d63c--)(_0x329961=_0x51cf3d[_0x22d63c])&&(_0x1e983c=_0x329961(_0x1e983c)||_0x1e983c);return _0x1e983c;},S=(_0x188ce2,_0x4ca3a8)=>(_0x759276,_0x19e7fd)=>_0x4ca3a8(_0x759276,_0x19e7fd,_0x188ce2);let p=class extends c['Disposable']{constructor(_0x234434,_0x262cac,_0x2867e9,_0xb0bb34){const _0x9cc101=_0x30385e;super(),this['_commentService']=_0x234434,this[_0x9cc101(0x1cb)]=_0x262cac,this[_0x9cc101(0x1c8)]=_0x2867e9,this[_0x9cc101(0x192)]=_0xb0bb34,this[_0x9cc101(0x16c)](),this[_0x9cc101(0x1b4)]();}['_initUserSync'](){const _0x2d79d2=_0x30385e;this[_0x2d79d2(0x16d)](this[_0x2d79d2(0x1cb)][_0x2d79d2(0x1aa)][_0x2d79d2(0x1dd)](w[_0x2d79d2(0x194)](0x10))['subscribe'](_0x59a69b=>{const _0x593eb8=_0x2d79d2,_0x2f2dd3=new Set();_0x59a69b[_0x593eb8(0x1d6)](_0x5818c8=>{const _0x4d10d9=_0x593eb8;switch(_0x5818c8[_0x4d10d9(0x172)]){case _0x4d10d9(0x1d3):{const _0x144b6c=_0x5818c8['payload'][_0x4d10d9(0x1a8)];_0x2f2dd3[_0x4d10d9(0x1d3)](_0x144b6c);break;}}}),R(this[_0x593eb8(0x192)],_0x2f2dd3);}));}['_init'](){const _0x4d615e=_0x30385e;this[_0x4d615e(0x16d)](this[_0x4d615e(0x190)]['commentUpdate$'][_0x4d615e(0x187)](async _0x278470=>{const _0x48f1f5=_0x4d615e;var _0x15dd97,_0x340d13,_0xde6727,_0x250d6a;const _0x54543e=(_0x15dd97=this[_0x48f1f5(0x1cb)][_0x48f1f5(0x1d5)](_0x278470['unitId'])[_0x48f1f5(0x188)](_0x4a3112=>_0x4a3112[_0x48f1f5(0x18e)]===_0x278470['threadId']))==null?void 0x0:_0x15dd97['root'];if(!_0x54543e)return;const {unitId:_0x515e97,subUnitId:_0x34b008}=_0x54543e;switch(_0x278470[_0x48f1f5(0x1a2)]&&this[_0x48f1f5(0x1c8)][_0x48f1f5(0x19e)](_0x278470[_0x48f1f5(0x1a2)]),_0x278470['type']){case v['Add']:break;case v[_0x48f1f5(0x1d9)]:{this[_0x48f1f5(0x1cb)][_0x48f1f5(0x1be)](_0x515e97,_0x34b008,{'unitId':_0x515e97,'subUnitId':_0x34b008,'ref':'','id':_0x278470[_0x48f1f5(0x1f1)],'dT':f(+_0x278470['createTimestamp']),'threadId':_0x278470['threadId'],'personId':(_0xde6727=(_0x340d13=_0x278470[_0x48f1f5(0x1a2)])==null?void 0x0:_0x340d13['userID'])!=null?_0xde6727:_0x278470[_0x48f1f5(0x199)],'text':JSON[_0x48f1f5(0x1a6)](_0x278470[_0x48f1f5(0x18d)]),'parentId':_0x54543e['id']});break;}case v[_0x48f1f5(0x1dc)]:{const _0x46443d=this['_threadCommentModel']['getComment'](_0x515e97,_0x34b008,_0x278470['replyId']);_0x46443d&&_0x46443d[_0x48f1f5(0x1bc)]&&this[_0x48f1f5(0x1cb)][_0x48f1f5(0x1e5)](_0x515e97,_0x34b008,_0x278470[_0x48f1f5(0x1f1)]);break;}case v[_0x48f1f5(0x17d)]:{this[_0x48f1f5(0x1cb)]['updateComment'](_0x515e97,_0x34b008,{'commentId':_0x278470[_0x48f1f5(0x1f1)],'text':JSON[_0x48f1f5(0x1a6)](_0x278470[_0x48f1f5(0x18d)])});break;}case v[_0x48f1f5(0x1bb)]:{const _0x3169f1=(_0x250d6a=this[_0x48f1f5(0x1cb)]['getUnit'](_0x278470[_0x48f1f5(0x183)])['find'](_0x329e95=>_0x329e95[_0x48f1f5(0x18e)]===_0x278470[_0x48f1f5(0x18e)]))==null?void 0x0:_0x250d6a[_0x48f1f5(0x177)];_0x3169f1&&this[_0x48f1f5(0x1cb)][_0x48f1f5(0x1da)](_0x515e97,_0x34b008,_0x3169f1['id'],_0x278470['solved']===I[_0x48f1f5(0x1ce)]);break;}}}));}};p=E([S(0x0,c[_0x30385e(0x1b7)](b[_0x30385e(0x1e8)])),S(0x1,c[_0x30385e(0x1b7)](M[_0x30385e(0x1d7)])),S(0x2,c[_0x30385e(0x1b7)](c[_0x30385e(0x189)])),S(0x3,c[_0x30385e(0x1b7)](c[_0x30385e(0x1d2)]))],p);const q=_0x30385e(0x1b9),D={};var A=Object[_0x30385e(0x1b6)],x=(_0x1de20b,_0x3cb751,_0x1d4a8c,_0xa3e37d)=>{const _0x3d6ece=_0x30385e;for(var _0x411135=_0xa3e37d>0x1?void 0x0:_0xa3e37d?A(_0x3cb751,_0x1d4a8c):_0x3cb751,_0x573a74=_0x1de20b[_0x3d6ece(0x1de)]-0x1,_0x5d436a;_0x573a74>=0x0;_0x573a74--)(_0x5d436a=_0x1de20b[_0x573a74])&&(_0x411135=_0x5d436a(_0x411135)||_0x411135);return _0x411135;},_=(_0x2e3c92,_0x4c3fec)=>(_0x53d6ee,_0x4112cf)=>_0x4c3fec(_0x53d6ee,_0x4112cf,_0x2e3c92);function Y(_0x4f70c5,_0x15ecd2){const _0x57ff4e=_0x30385e,_0x445c1c=_0x4f70c5[_0x57ff4e(0x17a)][0x0];return{..._0x15ecd2,'id':_0x445c1c[_0x57ff4e(0x1f1)],'resolved':_0x4f70c5['solved']===0x1,'dT':f(_0x445c1c[_0x57ff4e(0x1c7)]),'personId':_0x445c1c[_0x57ff4e(0x199)],'threadId':_0x445c1c[_0x57ff4e(0x18e)]};}function G(_0x5cc8e1,_0x26acb9,_0x39006e){const _0x395ef4=_0x30385e;var _0x27536e,_0x5ce601;if(((_0x5ce601=(_0x27536e=_0x5cc8e1==null?void 0x0:_0x5cc8e1[_0x395ef4(0x17a)])==null?void 0x0:_0x27536e[_0x395ef4(0x1de)])!=null?_0x5ce601:0x0)>0x0){const _0x63990d=(_0x12c3a4,_0xba0ea4)=>({'id':_0x12c3a4[_0x395ef4(0x1f1)],'threadId':_0x12c3a4[_0x395ef4(0x18e)],'dT':f(_0x12c3a4[_0x395ef4(0x1c7)]),'personId':_0x12c3a4['userId'],'resolved':_0x5cc8e1[_0x395ef4(0x198)]===I[_0x395ef4(0x1ce)],'unitId':_0x26acb9,'subUnitId':_0x39006e,'text':JSON['parse'](_0x12c3a4[_0x395ef4(0x18d)]),'parentId':_0xba0ea4}),_0x10e415=_0x63990d(_0x5cc8e1[_0x395ef4(0x17a)][0x0]);return{..._0x10e415,'children':_0x5cc8e1[_0x395ef4(0x17a)][_0x395ef4(0x178)](0x1)['map'](_0xd4ea09=>_0x63990d(_0xd4ea09,_0x10e415['id']))};}return null;}let g=class{constructor(_0x11a27b,_0xdda661,_0x2c9b3e,_0x33a884){const _0x168934=_0x30385e;this[_0x168934(0x1ad)]=_0x11a27b,this[_0x168934(0x1c8)]=_0xdda661,this['_sessionService']=_0x2c9b3e,this[_0x168934(0x192)]=_0x33a884;}async['addComment'](_0x509ee7){const _0x1f9941=_0x30385e;var _0x59b5e6,_0x4cb448;const {parentId:_0x273121,unitId:_0x292190,text:_0x38488a,threadId:_0x4693e7}=_0x509ee7,_0x213b93=(_0x4cb448=(_0x59b5e6=_0x38488a['customRanges'])==null?void 0x0:_0x59b5e6['filter'](_0x30f25b=>_0x30f25b[_0x1f9941(0x1ef)]===c[_0x1f9941(0x19b)]['COMMENT'])[_0x1f9941(0x1cd)](_0x1e1869=>_0x1e1869[_0x1f9941(0x195)]))!=null?_0x4cb448:[],_0x321737=JSON['stringify'](_0x38488a),_0x4a79b0=(await this[_0x1f9941(0x1ea)]['requireSession'](_0x292190))[_0x1f9941(0x1ae)]();if(_0x273121){const _0x38ec4c={'memberId':_0x4a79b0,'unitId':_0x292190,'content':_0x321737,'mention':_0x213b93,'threadId':_0x4693e7},_0x1f9e21=(await this['_httpService'][_0x1f9941(0x1a9)](_0x1f9941(0x1d8)+_0x292190+_0x1f9941(0x1ec),{'body':_0x38ec4c}))[_0x1f9941(0x1eb)][_0x1f9941(0x173)];return{..._0x509ee7,'id':_0x1f9e21['replyId'],'dT':c['dayjs'](+_0x1f9e21[_0x1f9941(0x1c7)])[_0x1f9941(0x1c2)](_0x1f9941(0x197)),'personId':_0x1f9e21[_0x1f9941(0x199)]};}else{const _0x57c2e5={'memberId':_0x4a79b0,'unitId':_0x292190,'content':_0x321737,'mention':_0x213b93},_0x3a2fdc=await this[_0x1f9941(0x1ad)][_0x1f9941(0x1a9)](_0x1f9941(0x1d8)+_0x292190+_0x1f9941(0x1a7),{'body':_0x57c2e5});return Y(_0x3a2fdc[_0x1f9941(0x1eb)][_0x1f9941(0x1b5)],_0x509ee7);}}async[_0x30385e(0x186)](_0x4fdab7){const _0x4a2490=_0x30385e;var _0x405487,_0x3b3403;const {text:_0x3653e3,unitId:_0x30ec38}=_0x4fdab7,_0x3b3d35=(_0x3b3403=(_0x405487=_0x3653e3[_0x4a2490(0x1d4)])==null?void 0x0:_0x405487[_0x4a2490(0x1e6)](_0x3a606b=>_0x3a606b[_0x4a2490(0x1ef)]===c[_0x4a2490(0x19b)]['COMMENT'])[_0x4a2490(0x1cd)](_0x43ac91=>_0x43ac91[_0x4a2490(0x195)]))!=null?_0x3b3403:[],_0xb2ecbd=JSON[_0x4a2490(0x1b1)](_0x3653e3),_0x290730=_0x4fdab7[_0x4a2490(0x18e)],_0x4f334b=_0x4fdab7['id'],_0x4b5e78={'memberId':(await this['_sessionService'][_0x4a2490(0x1a1)](_0x30ec38))[_0x4a2490(0x1ae)](),'unitId':_0x30ec38,'threadId':_0x290730,'mention':_0x3b3d35,'content':_0xb2ecbd,'replyId':_0x4f334b},_0x1228c5=await this[_0x4a2490(0x1ad)]['post'](_0x4a2490(0x1d8)+_0x30ec38+_0x4a2490(0x175),{'body':_0x4b5e78});return!_0x1228c5['body'][_0x4a2490(0x1f0)]||_0x1228c5[_0x4a2490(0x1eb)][_0x4a2490(0x1f0)]['code']===0x1;}async['resolveComment'](_0x498668){const _0x12a7d6=_0x30385e,{unitId:_0x2bf86a}=_0x498668,_0x20d412=_0x498668[_0x12a7d6(0x18e)],_0x4d33fa={'memberId':this[_0x12a7d6(0x1c8)]['getCurrentUser']()[_0x12a7d6(0x1cf)],'unitId':_0x2bf86a,'threadId':_0x20d412,'solved':_0x498668[_0x12a7d6(0x1bf)]?I[_0x12a7d6(0x1ce)]:I[_0x12a7d6(0x196)]},_0x486267=await this[_0x12a7d6(0x1ad)][_0x12a7d6(0x1a9)](_0x12a7d6(0x1d8)+_0x2bf86a+_0x12a7d6(0x1df),{'body':_0x4d33fa});return!_0x486267[_0x12a7d6(0x1eb)]['error']||_0x486267[_0x12a7d6(0x1eb)][_0x12a7d6(0x1f0)][_0x12a7d6(0x18c)]===0x1;}async[_0x30385e(0x1e5)](_0x3dda47,_0x36314d,_0x1f8cac,_0x4a75cf){const _0xc5d68b=_0x30385e,_0x5ba373={'memberId':(await this['_sessionService'][_0xc5d68b(0x1a1)](_0x3dda47))['getMemberID'](),'threadId':_0x1f8cac,'replyId':_0x4a75cf,'unitId':_0x3dda47},_0x103885=await this[_0xc5d68b(0x1ad)][_0xc5d68b(0x1a9)](_0xc5d68b(0x1d8)+_0x3dda47+_0xc5d68b(0x182),{'body':_0x5ba373});return!_0x103885[_0xc5d68b(0x1eb)][_0xc5d68b(0x1f0)]||_0x103885[_0xc5d68b(0x1eb)][_0xc5d68b(0x1f0)]['code']===0x1;}async[_0x30385e(0x18f)](_0x1a8b76,_0x1a9ca5,_0xb5d2da){const _0x45f515=_0x30385e,_0x399333={'unitId':_0x1a8b76,'threadId':_0xb5d2da},_0x5bfb66=await this['_httpService'][_0x45f515(0x1a9)](_0x45f515(0x1d8)+_0x1a8b76+_0x45f515(0x184),{'body':_0x399333}),_0x3ecc89=_0xb5d2da[_0x45f515(0x1cd)](_0xf9677c=>G(_0x5bfb66[_0x45f515(0x1eb)]['comments'][_0xf9677c],_0x1a8b76,_0x1a9ca5))[_0x45f515(0x1e6)](Boolean);return Object[_0x45f515(0x1c9)](_0x5bfb66[_0x45f515(0x1eb)][_0x45f515(0x18b)])[_0x45f515(0x1d6)](_0x3e8ef8=>{const _0x820fa0=_0x45f515;this[_0x820fa0(0x1c8)][_0x820fa0(0x19e)](_0x3e8ef8);}),_0x3ecc89;}[_0x30385e(0x18a)](_0x3ff467){const _0x4db0d9=_0x30385e;return{'id':_0x3ff467['id'],'threadId':_0x3ff467[_0x4db0d9(0x18e)],'ref':_0x3ff467[_0x4db0d9(0x174)]};}};g=x([_(0x0,c[_0x30385e(0x1b7)](P['HTTPService'])),_(0x1,c[_0x30385e(0x1b7)](c[_0x30385e(0x189)])),_(0x2,c[_0x30385e(0x1b7)](b[_0x30385e(0x1b0)])),_(0x3,c[_0x30385e(0x1b7)](c['Injector']))],g);var H=Object[_0x30385e(0x1b6)],J=(_0x36f883,_0x2bba8d,_0x18fa67,_0xdbb4e7)=>{const _0x399a43=_0x30385e;for(var _0x2d91aa=_0xdbb4e7>0x1?void 0x0:_0xdbb4e7?H(_0x2bba8d,_0x18fa67):_0x2bba8d,_0x46020d=_0x36f883[_0x399a43(0x1de)]-0x1,_0x463dc1;_0x46020d>=0x0;_0x46020d--)(_0x463dc1=_0x36f883[_0x46020d])&&(_0x2d91aa=_0x463dc1(_0x2d91aa)||_0x2d91aa);return _0x2d91aa;},y=(_0x2a1253,_0x442559)=>(_0x3c34d6,_0x1b1d69)=>_0x442559(_0x3c34d6,_0x1b1d69,_0x2a1253);let C=class extends c[_0x30385e(0x1cc)]{constructor(_0x2a1446,_0x5f1d43){const _0x1bc0ea=_0x30385e;super(),this[_0x1bc0ea(0x1b2)]=_0x2a1446,this['_threadCommentDataSource']=_0x5f1d43,this[_0x1bc0ea(0x1db)]();}[_0x30385e(0x1db)](){const _0x42b3fe=_0x30385e;this[_0x42b3fe(0x1b2)][_0x42b3fe(0x193)]=this[_0x42b3fe(0x179)],this[_0x42b3fe(0x1b2)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x30385e(0x1a3)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x30385e(0x17e)],L=Object[_0x30385e(0x1b6)],Z=(_0x534450,_0x3c33f5,_0x3dce03)=>_0x3c33f5 in _0x534450?F(_0x534450,_0x3c33f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dce03}):_0x534450[_0x3c33f5]=_0x3dce03,W=(_0x57e2af,_0x3a0fa0,_0x312ad8,_0x346df5)=>{const _0x5142e1=_0x30385e;for(var _0x19f909=_0x346df5>0x1?void 0x0:_0x346df5?L(_0x3a0fa0,_0x312ad8):_0x3a0fa0,_0xa733ba=_0x57e2af[_0x5142e1(0x1de)]-0x1,_0x548018;_0xa733ba>=0x0;_0xa733ba--)(_0x548018=_0x57e2af[_0xa733ba])&&(_0x19f909=_0x548018(_0x19f909)||_0x19f909);return _0x19f909;},O=(_0x1c823e,_0x3c7088)=>(_0x25fc21,_0x40d584)=>_0x3c7088(_0x25fc21,_0x40d584,_0x1c823e),N=(_0x3be42d,_0x2983e1,_0x14a5a3)=>Z(_0x3be42d,typeof _0x2983e1!='symbol'?_0x2983e1+'':_0x2983e1,_0x14a5a3);exports[_0x30385e(0x19a)]=class extends c[_0x30385e(0x1a0)]{constructor(_0x1adf55=D,_0x69d5ee,_0x1ad147){const _0x5df7f3=_0x30385e;super(),this[_0x5df7f3(0x1ca)]=_0x1adf55,this[_0x5df7f3(0x192)]=_0x69d5ee,this[_0x5df7f3(0x1b3)]=_0x1ad147;const {..._0x21b908}=c[_0x5df7f3(0x16a)]({},D,this[_0x5df7f3(0x1ca)]);this[_0x5df7f3(0x1b3)][_0x5df7f3(0x1c0)](q,_0x21b908);}[_0x30385e(0x16f)](){[[g],[C],[p]]['forEach'](_0x50898b=>{const _0x399efe=_0x4d03;this[_0x399efe(0x192)][_0x399efe(0x1d3)](_0x50898b);});}[_0x30385e(0x1e9)](){const _0x210a83=_0x30385e;this[_0x210a83(0x192)][_0x210a83(0x1ba)](C),this[_0x210a83(0x192)][_0x210a83(0x1ba)](p);}},N(exports[_0x30385e(0x19a)],_0x30385e(0x191),U),N(exports[_0x30385e(0x19a)],_0x30385e(0x172),c[_0x30385e(0x180)][_0x30385e(0x1bd)]),exports[_0x30385e(0x19a)]=W([c[_0x30385e(0x16b)](j[_0x30385e(0x1a4)],b['UniverCollaborationClientPlugin'],T[_0x30385e(0x169)]),O(0x1,c[_0x30385e(0x1b7)](c[_0x30385e(0x1d2)])),O(0x2,c[_0x30385e(0x1e2)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x34c9d3=_0x1012;(function(_0x42e8ea,_0x2f22a7){const _0xf7b0d=_0x1012,_0x300649=_0x42e8ea();while(!![]){try{const _0x38d2bb=parseInt(_0xf7b0d(0x225))/0x1+parseInt(_0xf7b0d(0x1de))/0x2*(parseInt(_0xf7b0d(0x1ea))/0x3)+-parseInt(_0xf7b0d(0x1da))/0x4*(parseInt(_0xf7b0d(0x20f))/0x5)+-parseInt(_0xf7b0d(0x208))/0x6*(-parseInt(_0xf7b0d(0x1fc))/0x7)+-parseInt(_0xf7b0d(0x214))/0x8+-parseInt(_0xf7b0d(0x1e1))/0x9*(parseInt(_0xf7b0d(0x1ec))/0xa)+parseInt(_0xf7b0d(0x1c1))/0xb;if(_0x38d2bb===_0x2f22a7)break;else _0x300649['push'](_0x300649['shift']());}catch(_0x51d758){_0x300649['push'](_0x300649['shift']());}}}(_0x289e,0xe45c8));Object[_0x34c9d3(0x1dc)](exports,Symbol['toStringTag'],{'value':_0x34c9d3(0x1b7)});const b=require(_0x34c9d3(0x228)),T=require(_0x34c9d3(0x1f4)),c=require('@univerjs/core'),j=require(_0x34c9d3(0x1bb)),M=require(_0x34c9d3(0x213)),w=require(_0x34c9d3(0x207)),P=require('@univerjs/network'),U=_0x34c9d3(0x1c8);function _0x1012(_0x1d639f,_0x3af2de){const _0x289e25=_0x289e();return _0x1012=function(_0x1012f8,_0x3da381){_0x1012f8=_0x1012f8-0x1b3;let _0x444c90=_0x289e25[_0x1012f8];return _0x444c90;},_0x1012(_0x1d639f,_0x3af2de);}var I=(_0x24083d=>(_0x24083d[_0x24083d[_0x34c9d3(0x1dd)]=0x0]=_0x34c9d3(0x1dd),_0x24083d[_0x24083d[_0x34c9d3(0x202)]=0x1]='Solved',_0x24083d[_0x24083d[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x24083d))(I||{}),v=(_0x257672=>(_0x257672[_0x257672[_0x34c9d3(0x1c0)]=0x0]='Unknown',_0x257672[_0x257672[_0x34c9d3(0x20b)]=0x1]=_0x34c9d3(0x20b),_0x257672[_0x257672[_0x34c9d3(0x21a)]=0x2]=_0x34c9d3(0x21a),_0x257672[_0x257672[_0x34c9d3(0x1f9)]=0x3]=_0x34c9d3(0x1f9),_0x257672[_0x257672[_0x34c9d3(0x1ed)]=0x4]=_0x34c9d3(0x1ed),_0x257672[_0x257672[_0x34c9d3(0x1bf)]=0x5]='Solve',_0x257672[_0x257672[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x257672))(v||{});const f=_0x252ac2=>c[_0x34c9d3(0x221)](new Date(+_0x252ac2))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x229240,_0x2181f6)=>{const _0x33a30b=_0x34c9d3,_0x206b83=_0x229240[_0x33a30b(0x1c7)](c[_0x33a30b(0x22c)]),_0x2100cb=_0x229240['get'](P[_0x33a30b(0x203)]);_0x2181f6[_0x33a30b(0x1ef)](_0x344aff=>{const _0x1c58e6=_0x33a30b;_0x206b83['getUser'](_0x344aff)&&_0x2181f6[_0x1c58e6(0x1c4)](_0x344aff);}),_0x2181f6['size']&&(await _0x2100cb[_0x33a30b(0x1c7)](_0x33a30b(0x1cc),{'params':{'userIDs':[..._0x2181f6]}}))[_0x33a30b(0x224)][_0x33a30b(0x1d1)][_0x33a30b(0x1ef)](_0x49dcec=>{const _0x5e1751=_0x33a30b;_0x49dcec&&_0x206b83[_0x5e1751(0x231)](_0x49dcec);});};var $=Object[_0x34c9d3(0x1c6)],E=(_0x4f253c,_0x3efce2,_0x13fd0c,_0x29d451)=>{const _0x5a2fae=_0x34c9d3;for(var _0xb88696=_0x29d451>0x1?void 0x0:_0x29d451?$(_0x3efce2,_0x13fd0c):_0x3efce2,_0xe82e3e=_0x4f253c[_0x5a2fae(0x212)]-0x1,_0x5a3bf4;_0xe82e3e>=0x0;_0xe82e3e--)(_0x5a3bf4=_0x4f253c[_0xe82e3e])&&(_0xb88696=_0x5a3bf4(_0xb88696)||_0xb88696);return _0xb88696;},S=(_0x3b80df,_0x4fa89f)=>(_0x4f93d,_0x3fa97c)=>_0x4fa89f(_0x4f93d,_0x3fa97c,_0x3b80df);let p=class extends c['Disposable']{constructor(_0x4d6931,_0x36f65e,_0xdffb34,_0x40ed09){const _0x661e9a=_0x34c9d3;super(),this[_0x661e9a(0x234)]=_0x4d6931,this['_threadCommentModel']=_0x36f65e,this[_0x661e9a(0x1f3)]=_0xdffb34,this[_0x661e9a(0x1b5)]=_0x40ed09,this['_init'](),this[_0x661e9a(0x1e3)]();}['_initUserSync'](){const _0x37a837=_0x34c9d3;this[_0x37a837(0x1e8)](this['_threadCommentModel'][_0x37a837(0x1ce)][_0x37a837(0x1d2)](w[_0x37a837(0x216)](0x10))[_0x37a837(0x22e)](_0x172899=>{const _0x44393b=_0x37a837,_0xf093f5=new Set();_0x172899['forEach'](_0x58d908=>{const _0x20cc59=_0x1012;switch(_0x58d908[_0x20cc59(0x1cf)]){case _0x20cc59(0x223):{const _0x3db0dc=_0x58d908['payload'][_0x20cc59(0x1d0)];_0xf093f5[_0x20cc59(0x223)](_0x3db0dc);break;}}}),R(this[_0x44393b(0x1b5)],_0xf093f5);}));}[_0x34c9d3(0x21f)](){const _0x58fba3=_0x34c9d3;this[_0x58fba3(0x1e8)](this[_0x58fba3(0x234)][_0x58fba3(0x1ce)][_0x58fba3(0x22e)](async _0x300010=>{const _0x115ed6=_0x58fba3;var _0x366762,_0x5f4cd2,_0x5e003e,_0x33685f;const _0x321e80=(_0x366762=this[_0x115ed6(0x1bc)]['getUnit'](_0x300010['unitId'])[_0x115ed6(0x21e)](_0x37d584=>_0x37d584[_0x115ed6(0x1fb)]===_0x300010['threadId']))==null?void 0x0:_0x366762[_0x115ed6(0x206)];if(!_0x321e80)return;const {unitId:_0x111fc5,subUnitId:_0x45849d}=_0x321e80;switch(_0x300010[_0x115ed6(0x1c2)]&&this['_userService'][_0x115ed6(0x231)](_0x300010[_0x115ed6(0x1c2)]),_0x300010[_0x115ed6(0x1cf)]){case v['Add']:break;case v[_0x115ed6(0x21a)]:{this[_0x115ed6(0x1bc)][_0x115ed6(0x210)](_0x111fc5,_0x45849d,{'unitId':_0x111fc5,'subUnitId':_0x45849d,'ref':'','id':_0x300010[_0x115ed6(0x205)],'dT':f(+_0x300010[_0x115ed6(0x1d7)]),'threadId':_0x300010[_0x115ed6(0x1fb)],'personId':(_0x5e003e=(_0x5f4cd2=_0x300010[_0x115ed6(0x1c2)])==null?void 0x0:_0x5f4cd2[_0x115ed6(0x20d)])!=null?_0x5e003e:_0x300010['userId'],'text':JSON[_0x115ed6(0x1e0)](_0x300010[_0x115ed6(0x1d5)]),'parentId':_0x321e80['id']});break;}case v[_0x115ed6(0x1ed)]:{const _0xcabfc3=this[_0x115ed6(0x1bc)][_0x115ed6(0x1b6)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);_0xcabfc3&&_0xcabfc3[_0x115ed6(0x1d6)]&&this['_threadCommentModel'][_0x115ed6(0x1eb)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);break;}case v[_0x115ed6(0x1f9)]:{this[_0x115ed6(0x1bc)]['updateComment'](_0x111fc5,_0x45849d,{'commentId':_0x300010[_0x115ed6(0x205)],'text':JSON['parse'](_0x300010[_0x115ed6(0x1d5)])});break;}case v[_0x115ed6(0x1bf)]:{const _0x175c6e=(_0x33685f=this[_0x115ed6(0x1bc)][_0x115ed6(0x1bd)](_0x300010[_0x115ed6(0x1db)])[_0x115ed6(0x21e)](_0x503e9f=>_0x503e9f[_0x115ed6(0x1fb)]===_0x300010[_0x115ed6(0x1fb)]))==null?void 0x0:_0x33685f[_0x115ed6(0x206)];_0x175c6e&&this[_0x115ed6(0x1bc)][_0x115ed6(0x1fe)](_0x111fc5,_0x45849d,_0x175c6e['id'],_0x300010['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x1d9)])),S(0x1,c[_0x34c9d3(0x1e2)](M[_0x34c9d3(0x1c3)])),S(0x2,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),S(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],p);const q=_0x34c9d3(0x22a),D={};var A=Object[_0x34c9d3(0x1c6)],x=(_0x379452,_0x4e4f0f,_0x56743d,_0x4310ef)=>{const _0x1d4c7e=_0x34c9d3;for(var _0x369920=_0x4310ef>0x1?void 0x0:_0x4310ef?A(_0x4e4f0f,_0x56743d):_0x4e4f0f,_0x2ea787=_0x379452[_0x1d4c7e(0x212)]-0x1,_0x16b3f3;_0x2ea787>=0x0;_0x2ea787--)(_0x16b3f3=_0x379452[_0x2ea787])&&(_0x369920=_0x16b3f3(_0x369920)||_0x369920);return _0x369920;},_=(_0x553b3d,_0x3fcdd6)=>(_0x5dec22,_0x940576)=>_0x3fcdd6(_0x5dec22,_0x940576,_0x553b3d);function Y(_0x4f884a,_0xd0bd13){const _0x1e3f18=_0x34c9d3,_0x251c8c=_0x4f884a[_0x1e3f18(0x1cd)][0x0];return{..._0xd0bd13,'id':_0x251c8c[_0x1e3f18(0x205)],'resolved':_0x4f884a[_0x1e3f18(0x1ca)]===0x1,'dT':f(_0x251c8c[_0x1e3f18(0x1d7)]),'personId':_0x251c8c[_0x1e3f18(0x21c)],'threadId':_0x251c8c[_0x1e3f18(0x1fb)]};}function _0x289e(){const _0x183ea7=['syncUpdateMutationToColla','resolveComment','COMMENT','IThreadCommentDataSourceService','CollaborationSessionService','Solved','HTTPService','UniverLicensePlugin','replyId','root','rxjs','3951978lCvTRJ','comments','_httpService','Add','onReady','userID','filter','7435jNLGXW','addComment','ref','length','@univerjs/thread-comment','12523584IKJKQW','dataSource','bufferTime','CustomRangeType','UNIVER_UNKNOWN','onStarting','Reply','resolved','userId','/reply','find','_init','map','dayjs','/edit','add','body','1572119KkzitM','slice','pluginName','@univerjs-pro/collaboration-client','DependentOn','thread-comment-data-source.config','UniverCollaborationClientPlugin','UserManagerService','/add','subscribe','symbol','/delete','addUser','_sessionService','getCurrentUser','_commentService','/universer-api/comment/unit/','comment','format','_injector','getComment','Module','updateComment','merge','stringify','@univerjs/thread-comment-ui','_threadCommentModel','getUnit','requireSession','Solve','Unknown','16882547WPbRVz','user','ThreadCommentModel','delete','_initDataSource','getOwnPropertyDescriptor','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','solved','_config','/universer-api/user/list','replies','commentUpdate$','type','personId','users','pipe','listComments','getMemberID','content','parentId','createTimestamp','values','CommentService','3876dVvrWn','unitId','defineProperty','OpenOrReOpen','6TNFTnj','Injector','parse','54GQoBSI','Inject','_initUserSync','customRanges','IConfigService','rangeType','reply','disposeWithMe','/list','1774314TSQCgY','deleteComment','2663590CBGFFh','Delete','_configService','forEach','Disposable','rangeId','code','_userService','@univerjs-pro/license','_threadCommentDataSource','error','UNRECOGNIZED','post','Edit','_threadCommentDataSourceService','threadId','7mxJIIT'];_0x289e=function(){return _0x183ea7;};return _0x289e();}function G(_0x4aec79,_0x36a157,_0x487d2f){const _0x452633=_0x34c9d3;var _0x47edbe,_0x5de2f3;if(((_0x5de2f3=(_0x47edbe=_0x4aec79==null?void 0x0:_0x4aec79[_0x452633(0x1cd)])==null?void 0x0:_0x47edbe[_0x452633(0x212)])!=null?_0x5de2f3:0x0)>0x0){const _0x2cbc4a=(_0x1c056b,_0x2ff5d0)=>({'id':_0x1c056b[_0x452633(0x205)],'threadId':_0x1c056b[_0x452633(0x1fb)],'dT':f(_0x1c056b['createTimestamp']),'personId':_0x1c056b[_0x452633(0x21c)],'resolved':_0x4aec79[_0x452633(0x1ca)]===I[_0x452633(0x202)],'unitId':_0x36a157,'subUnitId':_0x487d2f,'text':JSON[_0x452633(0x1e0)](_0x1c056b[_0x452633(0x1d5)]),'parentId':_0x2ff5d0}),_0x2a35ab=_0x2cbc4a(_0x4aec79[_0x452633(0x1cd)][0x0]);return{..._0x2a35ab,'children':_0x4aec79[_0x452633(0x1cd)][_0x452633(0x226)](0x1)['map'](_0x2e8d71=>_0x2cbc4a(_0x2e8d71,_0x2a35ab['id']))};}return null;}let g=class{constructor(_0x367ebc,_0x1943da,_0x39cd4f,_0x39e7bf){const _0x171b70=_0x34c9d3;this['_httpService']=_0x367ebc,this[_0x171b70(0x1f3)]=_0x1943da,this[_0x171b70(0x232)]=_0x39cd4f,this['_injector']=_0x39e7bf;}async[_0x34c9d3(0x210)](_0x45915a){const _0x2fb839=_0x34c9d3;var _0x92bdc1,_0x535fb9;const {parentId:_0x34e78d,unitId:_0x77dbb1,text:_0x263a49,threadId:_0x47e800}=_0x45915a,_0x16ddb6=(_0x535fb9=(_0x92bdc1=_0x263a49[_0x2fb839(0x1e4)])==null?void 0x0:_0x92bdc1[_0x2fb839(0x20e)](_0x15e588=>_0x15e588[_0x2fb839(0x1e6)]===c[_0x2fb839(0x217)][_0x2fb839(0x1ff)])['map'](_0xf56af8=>_0xf56af8[_0x2fb839(0x1f1)]))!=null?_0x535fb9:[],_0xcf4396=JSON[_0x2fb839(0x1ba)](_0x263a49),_0x78f452=(await this[_0x2fb839(0x232)][_0x2fb839(0x1be)](_0x77dbb1))[_0x2fb839(0x1d4)]();if(_0x34e78d){const _0x3fbe93={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6,'threadId':_0x47e800},_0x109fdb=(await this['_httpService'][_0x2fb839(0x1f8)](_0x2fb839(0x235)+_0x77dbb1+_0x2fb839(0x21d),{'body':_0x3fbe93}))[_0x2fb839(0x224)][_0x2fb839(0x1e7)];return{..._0x45915a,'id':_0x109fdb['replyId'],'dT':c['dayjs'](+_0x109fdb[_0x2fb839(0x1d7)])[_0x2fb839(0x1b4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x109fdb[_0x2fb839(0x21c)]};}else{const _0x41d972={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6},_0x29b9df=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x77dbb1+_0x2fb839(0x22d),{'body':_0x41d972});return Y(_0x29b9df[_0x2fb839(0x224)][_0x2fb839(0x1b3)],_0x45915a);}}async[_0x34c9d3(0x1b8)](_0x45e56d){const _0xb1b234=_0x34c9d3;var _0x16040b,_0x3df359;const {text:_0x11e502,unitId:_0x3d7f3a}=_0x45e56d,_0x4e7da5=(_0x3df359=(_0x16040b=_0x11e502['customRanges'])==null?void 0x0:_0x16040b['filter'](_0x1f759e=>_0x1f759e[_0xb1b234(0x1e6)]===c[_0xb1b234(0x217)]['COMMENT'])[_0xb1b234(0x220)](_0x520d0c=>_0x520d0c[_0xb1b234(0x1f1)]))!=null?_0x3df359:[],_0x2d9e12=JSON['stringify'](_0x11e502),_0x53f67d=_0x45e56d[_0xb1b234(0x1fb)],_0xfbb47=_0x45e56d['id'],_0x121de6={'memberId':(await this['_sessionService'][_0xb1b234(0x1be)](_0x3d7f3a))[_0xb1b234(0x1d4)](),'unitId':_0x3d7f3a,'threadId':_0x53f67d,'mention':_0x4e7da5,'content':_0x2d9e12,'replyId':_0xfbb47},_0x40ab00=await this['_httpService'][_0xb1b234(0x1f8)](_0xb1b234(0x235)+_0x3d7f3a+_0xb1b234(0x222),{'body':_0x121de6});return!_0x40ab00[_0xb1b234(0x224)]['error']||_0x40ab00[_0xb1b234(0x224)][_0xb1b234(0x1f6)][_0xb1b234(0x1f2)]===0x1;}async[_0x34c9d3(0x1fe)](_0x660ed4){const _0x3dc4d7=_0x34c9d3,{unitId:_0x4432a0}=_0x660ed4,_0x12cd23=_0x660ed4['threadId'],_0x3761e7={'memberId':this[_0x3dc4d7(0x1f3)][_0x3dc4d7(0x233)]()[_0x3dc4d7(0x20d)],'unitId':_0x4432a0,'threadId':_0x12cd23,'solved':_0x660ed4[_0x3dc4d7(0x21b)]?I['Solved']:I['OpenOrReOpen']},_0x11350e=await this[_0x3dc4d7(0x20a)][_0x3dc4d7(0x1f8)](_0x3dc4d7(0x235)+_0x4432a0+'/solved',{'body':_0x3761e7});return!_0x11350e['body'][_0x3dc4d7(0x1f6)]||_0x11350e[_0x3dc4d7(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1eb)](_0x20fd5a,_0x3616c2,_0x43ea44,_0x1351b1){const _0x319a03=_0x34c9d3,_0x1695c9={'memberId':(await this[_0x319a03(0x232)][_0x319a03(0x1be)](_0x20fd5a))[_0x319a03(0x1d4)](),'threadId':_0x43ea44,'replyId':_0x1351b1,'unitId':_0x20fd5a},_0x125bcc=await this[_0x319a03(0x20a)]['post'](_0x319a03(0x235)+_0x20fd5a+_0x319a03(0x230),{'body':_0x1695c9});return!_0x125bcc[_0x319a03(0x224)][_0x319a03(0x1f6)]||_0x125bcc[_0x319a03(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1d3)](_0x3e1300,_0x162693,_0x11f347){const _0x4073c6=_0x34c9d3,_0x592dbd={'unitId':_0x3e1300,'threadId':_0x11f347},_0x49e150=await this[_0x4073c6(0x20a)]['post'](_0x4073c6(0x235)+_0x3e1300+_0x4073c6(0x1e9),{'body':_0x592dbd}),_0x72ef08=_0x11f347['map'](_0x410c5b=>G(_0x49e150[_0x4073c6(0x224)][_0x4073c6(0x209)][_0x410c5b],_0x3e1300,_0x162693))[_0x4073c6(0x20e)](Boolean);return Object[_0x4073c6(0x1d8)](_0x49e150['body']['users'])['forEach'](_0x58cbd8=>{const _0x39f56a=_0x4073c6;this[_0x39f56a(0x1f3)]['addUser'](_0x58cbd8);}),_0x72ef08;}['saveCommentToSnapshot'](_0x36823c){const _0x166abc=_0x34c9d3;return{'id':_0x36823c['id'],'threadId':_0x36823c[_0x166abc(0x1fb)],'ref':_0x36823c[_0x166abc(0x211)]};}};g=x([_(0x0,c['Inject'](P[_0x34c9d3(0x203)])),_(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),_(0x2,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x201)])),_(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],g);var H=Object[_0x34c9d3(0x1c6)],J=(_0x14f027,_0x1e5ffa,_0x689dfc,_0x1dcdde)=>{const _0x3de6bd=_0x34c9d3;for(var _0x57b34d=_0x1dcdde>0x1?void 0x0:_0x1dcdde?H(_0x1e5ffa,_0x689dfc):_0x1e5ffa,_0x3b0168=_0x14f027[_0x3de6bd(0x212)]-0x1,_0x340d03;_0x3b0168>=0x0;_0x3b0168--)(_0x340d03=_0x14f027[_0x3b0168])&&(_0x57b34d=_0x340d03(_0x57b34d)||_0x57b34d);return _0x57b34d;},y=(_0x480305,_0x3dad4e)=>(_0x107c72,_0x6b88e0)=>_0x3dad4e(_0x107c72,_0x6b88e0,_0x480305);let C=class extends c[_0x34c9d3(0x1f0)]{constructor(_0x2b51d6,_0x2483fa){const _0x2ce469=_0x34c9d3;super(),this['_threadCommentDataSourceService']=_0x2b51d6,this[_0x2ce469(0x1f5)]=_0x2483fa,this[_0x2ce469(0x1c5)]();}[_0x34c9d3(0x1c5)](){const _0x1c7934=_0x34c9d3;this[_0x1c7934(0x1fa)][_0x1c7934(0x215)]=this[_0x1c7934(0x1f5)],this[_0x1c7934(0x1fa)][_0x1c7934(0x1fd)]=!0x1;}};C=J([y(0x0,M[_0x34c9d3(0x200)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x34c9d3(0x1dc)],L=Object[_0x34c9d3(0x1c6)],Z=(_0x196b8a,_0x4d0d8e,_0x1e1cfb)=>_0x4d0d8e in _0x196b8a?F(_0x196b8a,_0x4d0d8e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e1cfb}):_0x196b8a[_0x4d0d8e]=_0x1e1cfb,W=(_0x56b858,_0x3a0fd3,_0xbf323e,_0x2a3c07)=>{const _0x441eed=_0x34c9d3;for(var _0x6b97ff=_0x2a3c07>0x1?void 0x0:_0x2a3c07?L(_0x3a0fd3,_0xbf323e):_0x3a0fd3,_0x3f21b0=_0x56b858[_0x441eed(0x212)]-0x1,_0x3a6c63;_0x3f21b0>=0x0;_0x3f21b0--)(_0x3a6c63=_0x56b858[_0x3f21b0])&&(_0x6b97ff=_0x3a6c63(_0x6b97ff)||_0x6b97ff);return _0x6b97ff;},O=(_0x5c6b74,_0x2233ec)=>(_0x513270,_0x402655)=>_0x2233ec(_0x513270,_0x402655,_0x5c6b74),N=(_0x4c9118,_0x4d7b7d,_0x1c5dc6)=>Z(_0x4c9118,typeof _0x4d7b7d!=_0x34c9d3(0x22f)?_0x4d7b7d+'':_0x4d7b7d,_0x1c5dc6);exports[_0x34c9d3(0x1c9)]=class extends c['Plugin']{constructor(_0x562ae3=D,_0x513023,_0x365f54){const _0x3ade65=_0x34c9d3;super(),this[_0x3ade65(0x1cb)]=_0x562ae3,this[_0x3ade65(0x1b5)]=_0x513023,this[_0x3ade65(0x1ee)]=_0x365f54;const {..._0xbea690}=c[_0x3ade65(0x1b9)]({},D,this['_config']);this[_0x3ade65(0x1ee)]['setConfig'](q,_0xbea690);}[_0x34c9d3(0x219)](){[[g],[C],[p]]['forEach'](_0x3ef8ca=>{const _0x25ab1a=_0x1012;this[_0x25ab1a(0x1b5)]['add'](_0x3ef8ca);});}[_0x34c9d3(0x20c)](){const _0x1ee295=_0x34c9d3;this['_injector'][_0x1ee295(0x1c7)](C),this[_0x1ee295(0x1b5)][_0x1ee295(0x1c7)](p);}},N(exports[_0x34c9d3(0x1c9)],_0x34c9d3(0x227),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34c9d3(0x1cf),c['UniverInstanceType'][_0x34c9d3(0x218)]),exports[_0x34c9d3(0x1c9)]=W([c[_0x34c9d3(0x229)](j['UniverThreadCommentUIPlugin'],b[_0x34c9d3(0x22b)],T[_0x34c9d3(0x204)]),O(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)])),O(0x2,c[_0x34c9d3(0x1e5)])],exports[_0x34c9d3(0x1c9)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8f8025=_0x5718;(function(_0x153ca4,_0x2e0e78){const _0x57a602=_0x5718,_0x439e06=_0x153ca4();while(!![]){try{const _0x5f5b0f=-parseInt(_0x57a602(0x217))/0x1*(-parseInt(_0x57a602(0x20a))/0x2)+parseInt(_0x57a602(0x1fa))/0x3+parseInt(_0x57a602(0x22e))/0x4+-parseInt(_0x57a602(0x1cd))/0x5*(-parseInt(_0x57a602(0x229))/0x6)+parseInt(_0x57a602(0x214))/0x7*(parseInt(_0x57a602(0x230))/0x8)+parseInt(_0x57a602(0x1eb))/0x9+parseInt(_0x57a602(0x1e9))/0xa*(-parseInt(_0x57a602(0x1f8))/0xb);if(_0x5f5b0f===_0x2e0e78)break;else _0x439e06['push'](_0x439e06['shift']());}catch(_0x1a2f2f){_0x439e06['push'](_0x439e06['shift']());}}}(_0x7ab1,0x6c6c1));function _0x7ab1(){const _0x3f6890=['users','1206540BeukyH','user','delete','onStarting','commentUpdate$','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','threadId','_injector','Edit','post','updateComment','173107DfQqeQ','customRanges','1464033XQtJMe','length','comments','pluginName','stringify','filter','resolveComment','payload','reply','root','thread-comment-data-source.config','values','_threadCommentDataSource','resolved','dataSource','defineProperty','4RaAEDd','_initUserSync','Add','find','disposeWithMe','map','getMemberID','addComment','/universer-api/comment/unit/','content','273602kVhIpi','userId','format','381022BOMyrl','_commentService','getOwnPropertyDescriptor','replies','get','/reply','setConfig','createTimestamp','_initDataSource','OpenOrReOpen','requireSession','slice','type','ref','body','error','_httpService','_threadCommentModel','1974Fldlhi','addUser','add','Unknown','rangeId','122516uhbdyD','_config','136JjsCxm','Delete','_configService','5285eRXiKq','_init','pipe','forEach','subscribe','Solved','/list','Reply','getUnit','deleteComment','/edit','getCurrentUser','COMMENT','personId','/delete','Solve','userID','parse','YYYY/MM/DD\x20HH:mm','solved','_userService','replyId','_sessionService','rangeType','/solved','getComment','code','_threadCommentDataSourceService','1260SEEOZM'];_0x7ab1=function(){return _0x3f6890;};return _0x7ab1();}import{CommentService as _0x18a01f,CollaborationSessionService as _0x5bef75,UniverCollaborationClientPlugin as _0x1e8c7d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3c8b88}from'@univerjs-pro/license';import{dayjs as _0x544cf6,UserManagerService as _0x369ab3,Inject as _0x33d325,Injector as _0x4076f3,Disposable as _0x5d3e8a,CustomRangeType as _0x41cadb,UniverInstanceType as _0xa87ba3,DependentOn as _0x4aae9b,IConfigService as _0x46a7ac,Plugin as _0x1ed00a,merge as _0x1c1862}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e9fef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x169dae,IThreadCommentDataSourceService as _0x33aaea}from'@univerjs/thread-comment';import{bufferTime as _0x58d00a}from'rxjs';import{HTTPService as _0x24bf18}from'@univerjs/network';const W=_0x8f8025(0x1f1);var I=(_0x9e2332=>(_0x9e2332[_0x9e2332[_0x8f8025(0x220)]=0x0]='OpenOrReOpen',_0x9e2332[_0x9e2332['Solved']=0x1]=_0x8f8025(0x1d2),_0x9e2332[_0x9e2332['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e2332))(I||{}),v=(_0x2bc772=>(_0x2bc772[_0x2bc772[_0x8f8025(0x22c)]=0x0]=_0x8f8025(0x22c),_0x2bc772[_0x2bc772[_0x8f8025(0x20c)]=0x1]=_0x8f8025(0x20c),_0x2bc772[_0x2bc772[_0x8f8025(0x1d4)]=0x2]='Reply',_0x2bc772[_0x2bc772['Edit']=0x3]=_0x8f8025(0x1f5),_0x2bc772[_0x2bc772[_0x8f8025(0x231)]=0x4]='Delete',_0x2bc772[_0x2bc772[_0x8f8025(0x1dc)]=0x5]='Solve',_0x2bc772[_0x2bc772['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2bc772))(v||{});const D=_0x5212ec=>_0x544cf6(new Date(+_0x5212ec))[_0x8f8025(0x216)](_0x8f8025(0x1df)),B=async(_0x11de9d,_0x340471)=>{const _0x818b0b=_0x8f8025,_0x1da264=_0x11de9d['get'](_0x369ab3),_0x5c857b=_0x11de9d[_0x818b0b(0x21b)](_0x24bf18);_0x340471[_0x818b0b(0x1d0)](_0x14ff01=>{const _0x3099af=_0x818b0b;_0x1da264['getUser'](_0x14ff01)&&_0x340471[_0x3099af(0x1ed)](_0x14ff01);}),_0x340471[_0x818b0b(0x1f0)]&&(await _0x5c857b[_0x818b0b(0x21b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x340471]}}))['body'][_0x818b0b(0x1ea)][_0x818b0b(0x1d0)](_0x5c53e8=>{const _0x109cc2=_0x818b0b;_0x5c53e8&&_0x1da264[_0x109cc2(0x22a)](_0x5c53e8);});};var K=Object[_0x8f8025(0x219)],V=(_0x16cf28,_0x5c2a8c,_0x4e605a,_0x354653)=>{for(var _0x287cd4=_0x354653>0x1?void 0x0:_0x354653?K(_0x5c2a8c,_0x4e605a):_0x5c2a8c,_0x39da3d=_0x16cf28['length']-0x1,_0x36fdd7;_0x39da3d>=0x0;_0x39da3d--)(_0x36fdd7=_0x16cf28[_0x39da3d])&&(_0x287cd4=_0x36fdd7(_0x287cd4)||_0x287cd4);return _0x287cd4;},p=(_0x10e601,_0x14adef)=>(_0x2771de,_0x55c50a)=>_0x14adef(_0x2771de,_0x55c50a,_0x10e601);let S=class extends _0x5d3e8a{constructor(_0x4a5b88,_0x1ef360,_0x4e87ec,_0x983195){const _0x33e22b=_0x8f8025;super(),this['_commentService']=_0x4a5b88,this[_0x33e22b(0x228)]=_0x1ef360,this[_0x33e22b(0x1e1)]=_0x4e87ec,this[_0x33e22b(0x1f4)]=_0x983195,this['_init'](),this['_initUserSync']();}[_0x8f8025(0x20b)](){const _0x58d288=_0x8f8025;this[_0x58d288(0x20e)](this[_0x58d288(0x228)][_0x58d288(0x1ef)][_0x58d288(0x1cf)](_0x58d00a(0x10))[_0x58d288(0x1d1)](_0x573840=>{const _0x272ed0=_0x58d288,_0xc5decb=new Set();_0x573840['forEach'](_0x41186b=>{const _0x2790a8=_0x5718;switch(_0x41186b[_0x2790a8(0x223)]){case _0x2790a8(0x22b):{const _0x4f0719=_0x41186b[_0x2790a8(0x201)][_0x2790a8(0x1da)];_0xc5decb['add'](_0x4f0719);break;}}}),B(this[_0x272ed0(0x1f4)],_0xc5decb);}));}[_0x8f8025(0x1ce)](){const _0x5d7527=_0x8f8025;this[_0x5d7527(0x20e)](this[_0x5d7527(0x218)][_0x5d7527(0x1ef)]['subscribe'](async _0x476304=>{const _0xbe81e9=_0x5d7527;var _0x372a63,_0x17d835,_0x1ec898,_0xc58787;const _0x3868df=(_0x372a63=this[_0xbe81e9(0x228)][_0xbe81e9(0x1d5)](_0x476304['unitId'])[_0xbe81e9(0x20d)](_0x5c396a=>_0x5c396a[_0xbe81e9(0x1f3)]===_0x476304[_0xbe81e9(0x1f3)]))==null?void 0x0:_0x372a63['root'];if(!_0x3868df)return;const {unitId:_0x2a63b3,subUnitId:_0x547ab7}=_0x3868df;switch(_0x476304['user']&&this[_0xbe81e9(0x1e1)][_0xbe81e9(0x22a)](_0x476304[_0xbe81e9(0x1ec)]),_0x476304['type']){case v['Add']:break;case v[_0xbe81e9(0x1d4)]:{this['_threadCommentModel'][_0xbe81e9(0x211)](_0x2a63b3,_0x547ab7,{'unitId':_0x2a63b3,'subUnitId':_0x547ab7,'ref':'','id':_0x476304['replyId'],'dT':D(+_0x476304[_0xbe81e9(0x21e)]),'threadId':_0x476304[_0xbe81e9(0x1f3)],'personId':(_0x1ec898=(_0x17d835=_0x476304['user'])==null?void 0x0:_0x17d835[_0xbe81e9(0x1dd)])!=null?_0x1ec898:_0x476304[_0xbe81e9(0x215)],'text':JSON[_0xbe81e9(0x1de)](_0x476304[_0xbe81e9(0x213)]),'parentId':_0x3868df['id']});break;}case v[_0xbe81e9(0x231)]:{const _0x394c6a=this[_0xbe81e9(0x228)][_0xbe81e9(0x1e6)](_0x2a63b3,_0x547ab7,_0x476304[_0xbe81e9(0x1e2)]);_0x394c6a&&_0x394c6a['parentId']&&this['_threadCommentModel'][_0xbe81e9(0x1d6)](_0x2a63b3,_0x547ab7,_0x476304[_0xbe81e9(0x1e2)]);break;}case v[_0xbe81e9(0x1f5)]:{this[_0xbe81e9(0x228)][_0xbe81e9(0x1f7)](_0x2a63b3,_0x547ab7,{'commentId':_0x476304[_0xbe81e9(0x1e2)],'text':JSON[_0xbe81e9(0x1de)](_0x476304[_0xbe81e9(0x213)])});break;}case v[_0xbe81e9(0x1dc)]:{const _0x55006d=(_0xc58787=this['_threadCommentModel'][_0xbe81e9(0x1d5)](_0x476304[_0xbe81e9(0x1f2)])[_0xbe81e9(0x20d)](_0x29ae62=>_0x29ae62[_0xbe81e9(0x1f3)]===_0x476304[_0xbe81e9(0x1f3)]))==null?void 0x0:_0xc58787[_0xbe81e9(0x203)];_0x55006d&&this['_threadCommentModel'][_0xbe81e9(0x200)](_0x2a63b3,_0x547ab7,_0x55006d['id'],_0x476304[_0xbe81e9(0x1e0)]===I[_0xbe81e9(0x1d2)]);break;}}}));}};S=V([p(0x0,_0x33d325(_0x18a01f)),p(0x1,_0x33d325(_0x169dae)),p(0x2,_0x33d325(_0x369ab3)),p(0x3,_0x33d325(_0x4076f3))],S);const z=_0x8f8025(0x204),M={};var k=Object[_0x8f8025(0x219)],Q=(_0x3a8ca7,_0x375119,_0x5442c5,_0x27871f)=>{const _0xacef10=_0x8f8025;for(var _0x44542d=_0x27871f>0x1?void 0x0:_0x27871f?k(_0x375119,_0x5442c5):_0x375119,_0x5c2e78=_0x3a8ca7[_0xacef10(0x1fb)]-0x1,_0x20c065;_0x5c2e78>=0x0;_0x5c2e78--)(_0x20c065=_0x3a8ca7[_0x5c2e78])&&(_0x44542d=_0x20c065(_0x44542d)||_0x44542d);return _0x44542d;},_=(_0x4acf4f,_0xdcd2f6)=>(_0x7a7d2,_0x4170f3)=>_0xdcd2f6(_0x7a7d2,_0x4170f3,_0x4acf4f);function X(_0x2c65e8,_0x1f9834){const _0x1abb1c=_0x8f8025,_0x32065a=_0x2c65e8['replies'][0x0];return{..._0x1f9834,'id':_0x32065a[_0x1abb1c(0x1e2)],'resolved':_0x2c65e8[_0x1abb1c(0x1e0)]===0x1,'dT':D(_0x32065a[_0x1abb1c(0x21e)]),'personId':_0x32065a[_0x1abb1c(0x215)],'threadId':_0x32065a[_0x1abb1c(0x1f3)]};}function ee(_0x535ad1,_0x217672,_0x3cc0a7){const _0x279f58=_0x8f8025;var _0x31dc37,_0x4ef816;if(((_0x4ef816=(_0x31dc37=_0x535ad1==null?void 0x0:_0x535ad1['replies'])==null?void 0x0:_0x31dc37[_0x279f58(0x1fb)])!=null?_0x4ef816:0x0)>0x0){const _0xe22f7c=(_0x18c67b,_0x208010)=>({'id':_0x18c67b[_0x279f58(0x1e2)],'threadId':_0x18c67b[_0x279f58(0x1f3)],'dT':D(_0x18c67b[_0x279f58(0x21e)]),'personId':_0x18c67b['userId'],'resolved':_0x535ad1[_0x279f58(0x1e0)]===I['Solved'],'unitId':_0x217672,'subUnitId':_0x3cc0a7,'text':JSON['parse'](_0x18c67b[_0x279f58(0x213)]),'parentId':_0x208010}),_0x5aa13b=_0xe22f7c(_0x535ad1[_0x279f58(0x21a)][0x0]);return{..._0x5aa13b,'children':_0x535ad1[_0x279f58(0x21a)][_0x279f58(0x222)](0x1)[_0x279f58(0x20f)](_0x4f5dbb=>_0xe22f7c(_0x4f5dbb,_0x5aa13b['id']))};}return null;}let f=class{constructor(_0x565dd2,_0x65f4e6,_0x9096e8,_0x331ab6){const _0x3c066f=_0x8f8025;this[_0x3c066f(0x227)]=_0x565dd2,this['_userService']=_0x65f4e6,this[_0x3c066f(0x1e3)]=_0x9096e8,this['_injector']=_0x331ab6;}async[_0x8f8025(0x211)](_0x3dcf13){const _0x5310e7=_0x8f8025;var _0x1198dc,_0x384122;const {parentId:_0x37a409,unitId:_0x1cec67,text:_0xa09656,threadId:_0x2dc300}=_0x3dcf13,_0x141805=(_0x384122=(_0x1198dc=_0xa09656[_0x5310e7(0x1f9)])==null?void 0x0:_0x1198dc['filter'](_0x498dcc=>_0x498dcc[_0x5310e7(0x1e4)]===_0x41cadb[_0x5310e7(0x1d9)])[_0x5310e7(0x20f)](_0x11f42c=>_0x11f42c['rangeId']))!=null?_0x384122:[],_0x46483e=JSON[_0x5310e7(0x1fe)](_0xa09656),_0x5a8f85=(await this['_sessionService']['requireSession'](_0x1cec67))[_0x5310e7(0x210)]();if(_0x37a409){const _0x32f3f2={'memberId':_0x5a8f85,'unitId':_0x1cec67,'content':_0x46483e,'mention':_0x141805,'threadId':_0x2dc300},_0x120525=(await this[_0x5310e7(0x227)]['post'](_0x5310e7(0x212)+_0x1cec67+_0x5310e7(0x21c),{'body':_0x32f3f2}))[_0x5310e7(0x225)][_0x5310e7(0x202)];return{..._0x3dcf13,'id':_0x120525['replyId'],'dT':_0x544cf6(+_0x120525['createTimestamp'])[_0x5310e7(0x216)](_0x5310e7(0x1df)),'personId':_0x120525[_0x5310e7(0x215)]};}else{const _0x45d4f6={'memberId':_0x5a8f85,'unitId':_0x1cec67,'content':_0x46483e,'mention':_0x141805},_0x15a851=await this[_0x5310e7(0x227)][_0x5310e7(0x1f6)](_0x5310e7(0x212)+_0x1cec67+'/add',{'body':_0x45d4f6});return X(_0x15a851['body']['comment'],_0x3dcf13);}}async[_0x8f8025(0x1f7)](_0x5dbcae){const _0x27dc82=_0x8f8025;var _0x39caf1,_0x15ad92;const {text:_0x4c20d8,unitId:_0x14c8a6}=_0x5dbcae,_0x4305ff=(_0x15ad92=(_0x39caf1=_0x4c20d8[_0x27dc82(0x1f9)])==null?void 0x0:_0x39caf1[_0x27dc82(0x1ff)](_0x25cb7d=>_0x25cb7d['rangeType']===_0x41cadb[_0x27dc82(0x1d9)])[_0x27dc82(0x20f)](_0x2dd46f=>_0x2dd46f[_0x27dc82(0x22d)]))!=null?_0x15ad92:[],_0x5bbb9d=JSON['stringify'](_0x4c20d8),_0x581926=_0x5dbcae[_0x27dc82(0x1f3)],_0x5e8fb3=_0x5dbcae['id'],_0x39019b={'memberId':(await this['_sessionService'][_0x27dc82(0x221)](_0x14c8a6))[_0x27dc82(0x210)](),'unitId':_0x14c8a6,'threadId':_0x581926,'mention':_0x4305ff,'content':_0x5bbb9d,'replyId':_0x5e8fb3},_0x59c2b0=await this[_0x27dc82(0x227)][_0x27dc82(0x1f6)]('/universer-api/comment/unit/'+_0x14c8a6+_0x27dc82(0x1d7),{'body':_0x39019b});return!_0x59c2b0['body'][_0x27dc82(0x226)]||_0x59c2b0[_0x27dc82(0x225)][_0x27dc82(0x226)][_0x27dc82(0x1e7)]===0x1;}async[_0x8f8025(0x200)](_0x3106d5){const _0xb0efd7=_0x8f8025,{unitId:_0xd3aa1b}=_0x3106d5,_0x2c7596=_0x3106d5[_0xb0efd7(0x1f3)],_0x320efc={'memberId':this[_0xb0efd7(0x1e1)][_0xb0efd7(0x1d8)]()[_0xb0efd7(0x1dd)],'unitId':_0xd3aa1b,'threadId':_0x2c7596,'solved':_0x3106d5[_0xb0efd7(0x207)]?I[_0xb0efd7(0x1d2)]:I[_0xb0efd7(0x220)]},_0x45cd29=await this[_0xb0efd7(0x227)][_0xb0efd7(0x1f6)](_0xb0efd7(0x212)+_0xd3aa1b+_0xb0efd7(0x1e5),{'body':_0x320efc});return!_0x45cd29[_0xb0efd7(0x225)]['error']||_0x45cd29[_0xb0efd7(0x225)][_0xb0efd7(0x226)][_0xb0efd7(0x1e7)]===0x1;}async[_0x8f8025(0x1d6)](_0x23203c,_0x946469,_0x3e445e,_0x2d9a50){const _0x43c557=_0x8f8025,_0x2e74f1={'memberId':(await this[_0x43c557(0x1e3)][_0x43c557(0x221)](_0x23203c))[_0x43c557(0x210)](),'threadId':_0x3e445e,'replyId':_0x2d9a50,'unitId':_0x23203c},_0x37ee09=await this['_httpService'][_0x43c557(0x1f6)](_0x43c557(0x212)+_0x23203c+_0x43c557(0x1db),{'body':_0x2e74f1});return!_0x37ee09['body'][_0x43c557(0x226)]||_0x37ee09[_0x43c557(0x225)]['error'][_0x43c557(0x1e7)]===0x1;}async['listComments'](_0x231c58,_0x586eb2,_0x83d15d){const _0x680d71=_0x8f8025,_0x280a20={'unitId':_0x231c58,'threadId':_0x83d15d},_0x5595b2=await this[_0x680d71(0x227)]['post']('/universer-api/comment/unit/'+_0x231c58+_0x680d71(0x1d3),{'body':_0x280a20}),_0x200049=_0x83d15d[_0x680d71(0x20f)](_0xdbc7f4=>ee(_0x5595b2[_0x680d71(0x225)][_0x680d71(0x1fc)][_0xdbc7f4],_0x231c58,_0x586eb2))[_0x680d71(0x1ff)](Boolean);return Object[_0x680d71(0x205)](_0x5595b2[_0x680d71(0x225)]['users'])[_0x680d71(0x1d0)](_0x409e46=>{const _0x1f4ba0=_0x680d71;this[_0x1f4ba0(0x1e1)]['addUser'](_0x409e46);}),_0x200049;}['saveCommentToSnapshot'](_0x42d577){const _0x550905=_0x8f8025;return{'id':_0x42d577['id'],'threadId':_0x42d577['threadId'],'ref':_0x42d577[_0x550905(0x224)]};}};f=Q([_(0x0,_0x33d325(_0x24bf18)),_(0x1,_0x33d325(_0x369ab3)),_(0x2,_0x33d325(_0x5bef75)),_(0x3,_0x33d325(_0x4076f3))],f);var re=Object[_0x8f8025(0x219)],te=(_0x4fee17,_0x3cfee9,_0x462e6b,_0x410a3e)=>{for(var _0x5d7b5d=_0x410a3e>0x1?void 0x0:_0x410a3e?re(_0x3cfee9,_0x462e6b):_0x3cfee9,_0x1517d0=_0x4fee17['length']-0x1,_0x3e9ad8;_0x1517d0>=0x0;_0x1517d0--)(_0x3e9ad8=_0x4fee17[_0x1517d0])&&(_0x5d7b5d=_0x3e9ad8(_0x5d7b5d)||_0x5d7b5d);return _0x5d7b5d;},N=(_0x3e07ab,_0x505e7f)=>(_0xc35d4a,_0xf65d16)=>_0x505e7f(_0xc35d4a,_0xf65d16,_0x3e07ab);let g=class extends _0x5d3e8a{constructor(_0x535402,_0x304f97){const _0x1e5b7b=_0x8f8025;super(),this[_0x1e5b7b(0x1e8)]=_0x535402,this[_0x1e5b7b(0x206)]=_0x304f97,this['_initDataSource']();}[_0x8f8025(0x21f)](){const _0x1a9a1a=_0x8f8025;this[_0x1a9a1a(0x1e8)][_0x1a9a1a(0x208)]=this[_0x1a9a1a(0x206)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x33aaea),N(0x1,_0x33d325(f))],g);var se=Object[_0x8f8025(0x209)],oe=Object[_0x8f8025(0x219)],ne=(_0x10cc8d,_0x380706,_0x2db734)=>_0x380706 in _0x10cc8d?se(_0x10cc8d,_0x380706,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2db734}):_0x10cc8d[_0x380706]=_0x2db734,ie=(_0x2d09f4,_0x1c9bc6,_0x2b6fd3,_0xd470de)=>{const _0x259507=_0x8f8025;for(var _0x2587b6=_0xd470de>0x1?void 0x0:_0xd470de?oe(_0x1c9bc6,_0x2b6fd3):_0x1c9bc6,_0x4ffb3a=_0x2d09f4[_0x259507(0x1fb)]-0x1,_0x3c6b1c;_0x4ffb3a>=0x0;_0x4ffb3a--)(_0x3c6b1c=_0x2d09f4[_0x4ffb3a])&&(_0x2587b6=_0x3c6b1c(_0x2587b6)||_0x2587b6);return _0x2587b6;},w=(_0x2977e3,_0x1850be)=>(_0x259e2d,_0x31e573)=>_0x1850be(_0x259e2d,_0x31e573,_0x2977e3),$=(_0x1e6b9a,_0x8be6f2,_0x5555fe)=>ne(_0x1e6b9a,typeof _0x8be6f2!='symbol'?_0x8be6f2+'':_0x8be6f2,_0x5555fe);let b=class extends _0x1ed00a{constructor(_0x5ada21=M,_0x1f230c,_0x3e9e1e){const _0x5dfc90=_0x8f8025;super(),this[_0x5dfc90(0x22f)]=_0x5ada21,this[_0x5dfc90(0x1f4)]=_0x1f230c,this[_0x5dfc90(0x1cc)]=_0x3e9e1e;const {..._0x3a07d3}=_0x1c1862({},M,this[_0x5dfc90(0x22f)]);this[_0x5dfc90(0x1cc)][_0x5dfc90(0x21d)](z,_0x3a07d3);}[_0x8f8025(0x1ee)](){const _0x424f04=_0x8f8025;[[f],[g],[S]][_0x424f04(0x1d0)](_0x2e370a=>{const _0x367047=_0x424f04;this[_0x367047(0x1f4)][_0x367047(0x22b)](_0x2e370a);});}['onReady'](){const _0x2acc88=_0x8f8025;this[_0x2acc88(0x1f4)][_0x2acc88(0x21b)](g),this[_0x2acc88(0x1f4)][_0x2acc88(0x21b)](S);}};function _0x5718(_0x3b303f,_0x1daaa5){const _0x7ab194=_0x7ab1();return _0x5718=function(_0x5718d6,_0x45a8d3){_0x5718d6=_0x5718d6-0x1cc;let _0x177767=_0x7ab194[_0x5718d6];return _0x177767;},_0x5718(_0x3b303f,_0x1daaa5);}$(b,_0x8f8025(0x1fd),W),$(b,_0x8f8025(0x223),_0xa87ba3['UNIVER_UNKNOWN']),b=ie([_0x4aae9b(_0x5e9fef,_0x1e8c7d,_0x3c8b88),w(0x1,_0x33d325(_0x4076f3)),w(0x2,_0x46a7ac)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8f8025=_0x5718;(function(_0x153ca4,_0x2e0e78){const _0x57a602=_0x5718,_0x439e06=_0x153ca4();while(!![]){try{const _0x5f5b0f=-parseInt(_0x57a602(0x217))/0x1*(-parseInt(_0x57a602(0x20a))/0x2)+parseInt(_0x57a602(0x1fa))/0x3+parseInt(_0x57a602(0x22e))/0x4+-parseInt(_0x57a602(0x1cd))/0x5*(-parseInt(_0x57a602(0x229))/0x6)+parseInt(_0x57a602(0x214))/0x7*(parseInt(_0x57a602(0x230))/0x8)+parseInt(_0x57a602(0x1eb))/0x9+parseInt(_0x57a602(0x1e9))/0xa*(-parseInt(_0x57a602(0x1f8))/0xb);if(_0x5f5b0f===_0x2e0e78)break;else _0x439e06['push'](_0x439e06['shift']());}catch(_0x1a2f2f){_0x439e06['push'](_0x439e06['shift']());}}}(_0x7ab1,0x6c6c1));function _0x7ab1(){const _0x3f6890=['users','1206540BeukyH','user','delete','onStarting','commentUpdate$','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','threadId','_injector','Edit','post','updateComment','173107DfQqeQ','customRanges','1464033XQtJMe','length','comments','pluginName','stringify','filter','resolveComment','payload','reply','root','thread-comment-data-source.config','values','_threadCommentDataSource','resolved','dataSource','defineProperty','4RaAEDd','_initUserSync','Add','find','disposeWithMe','map','getMemberID','addComment','/universer-api/comment/unit/','content','273602kVhIpi','userId','format','381022BOMyrl','_commentService','getOwnPropertyDescriptor','replies','get','/reply','setConfig','createTimestamp','_initDataSource','OpenOrReOpen','requireSession','slice','type','ref','body','error','_httpService','_threadCommentModel','1974Fldlhi','addUser','add','Unknown','rangeId','122516uhbdyD','_config','136JjsCxm','Delete','_configService','5285eRXiKq','_init','pipe','forEach','subscribe','Solved','/list','Reply','getUnit','deleteComment','/edit','getCurrentUser','COMMENT','personId','/delete','Solve','userID','parse','YYYY/MM/DD\x20HH:mm','solved','_userService','replyId','_sessionService','rangeType','/solved','getComment','code','_threadCommentDataSourceService','1260SEEOZM'];_0x7ab1=function(){return _0x3f6890;};return _0x7ab1();}import{CommentService as _0x18a01f,CollaborationSessionService as _0x5bef75,UniverCollaborationClientPlugin as _0x1e8c7d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3c8b88}from'@univerjs-pro/license';import{dayjs as _0x544cf6,UserManagerService as _0x369ab3,Inject as _0x33d325,Injector as _0x4076f3,Disposable as _0x5d3e8a,CustomRangeType as _0x41cadb,UniverInstanceType as _0xa87ba3,DependentOn as _0x4aae9b,IConfigService as _0x46a7ac,Plugin as _0x1ed00a,merge as _0x1c1862}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e9fef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x169dae,IThreadCommentDataSourceService as _0x33aaea}from'@univerjs/thread-comment';import{bufferTime as _0x58d00a}from'rxjs';import{HTTPService as _0x24bf18}from'@univerjs/network';const W=_0x8f8025(0x1f1);var I=(_0x9e2332=>(_0x9e2332[_0x9e2332[_0x8f8025(0x220)]=0x0]='OpenOrReOpen',_0x9e2332[_0x9e2332['Solved']=0x1]=_0x8f8025(0x1d2),_0x9e2332[_0x9e2332['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e2332))(I||{}),v=(_0x2bc772=>(_0x2bc772[_0x2bc772[_0x8f8025(0x22c)]=0x0]=_0x8f8025(0x22c),_0x2bc772[_0x2bc772[_0x8f8025(0x20c)]=0x1]=_0x8f8025(0x20c),_0x2bc772[_0x2bc772[_0x8f8025(0x1d4)]=0x2]='Reply',_0x2bc772[_0x2bc772['Edit']=0x3]=_0x8f8025(0x1f5),_0x2bc772[_0x2bc772[_0x8f8025(0x231)]=0x4]='Delete',_0x2bc772[_0x2bc772[_0x8f8025(0x1dc)]=0x5]='Solve',_0x2bc772[_0x2bc772['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2bc772))(v||{});const D=_0x5212ec=>_0x544cf6(new Date(+_0x5212ec))[_0x8f8025(0x216)](_0x8f8025(0x1df)),B=async(_0x11de9d,_0x340471)=>{const _0x818b0b=_0x8f8025,_0x1da264=_0x11de9d['get'](_0x369ab3),_0x5c857b=_0x11de9d[_0x818b0b(0x21b)](_0x24bf18);_0x340471[_0x818b0b(0x1d0)](_0x14ff01=>{const _0x3099af=_0x818b0b;_0x1da264['getUser'](_0x14ff01)&&_0x340471[_0x3099af(0x1ed)](_0x14ff01);}),_0x340471[_0x818b0b(0x1f0)]&&(await _0x5c857b[_0x818b0b(0x21b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x340471]}}))['body'][_0x818b0b(0x1ea)][_0x818b0b(0x1d0)](_0x5c53e8=>{const _0x109cc2=_0x818b0b;_0x5c53e8&&_0x1da264[_0x109cc2(0x22a)](_0x5c53e8);});};var K=Object[_0x8f8025(0x219)],V=(_0x16cf28,_0x5c2a8c,_0x4e605a,_0x354653)=>{for(var _0x287cd4=_0x354653>0x1?void 0x0:_0x354653?K(_0x5c2a8c,_0x4e605a):_0x5c2a8c,_0x39da3d=_0x16cf28['length']-0x1,_0x36fdd7;_0x39da3d>=0x0;_0x39da3d--)(_0x36fdd7=_0x16cf28[_0x39da3d])&&(_0x287cd4=_0x36fdd7(_0x287cd4)||_0x287cd4);return _0x287cd4;},p=(_0x10e601,_0x14adef)=>(_0x2771de,_0x55c50a)=>_0x14adef(_0x2771de,_0x55c50a,_0x10e601);let S=class extends _0x5d3e8a{constructor(_0x4a5b88,_0x1ef360,_0x4e87ec,_0x983195){const _0x33e22b=_0x8f8025;super(),this['_commentService']=_0x4a5b88,this[_0x33e22b(0x228)]=_0x1ef360,this[_0x33e22b(0x1e1)]=_0x4e87ec,this[_0x33e22b(0x1f4)]=_0x983195,this['_init'](),this['_initUserSync']();}[_0x8f8025(0x20b)](){const _0x58d288=_0x8f8025;this[_0x58d288(0x20e)](this[_0x58d288(0x228)][_0x58d288(0x1ef)][_0x58d288(0x1cf)](_0x58d00a(0x10))[_0x58d288(0x1d1)](_0x573840=>{const _0x272ed0=_0x58d288,_0xc5decb=new Set();_0x573840['forEach'](_0x41186b=>{const _0x2790a8=_0x5718;switch(_0x41186b[_0x2790a8(0x223)]){case _0x2790a8(0x22b):{const _0x4f0719=_0x41186b[_0x2790a8(0x201)][_0x2790a8(0x1da)];_0xc5decb['add'](_0x4f0719);break;}}}),B(this[_0x272ed0(0x1f4)],_0xc5decb);}));}[_0x8f8025(0x1ce)](){const _0x5d7527=_0x8f8025;this[_0x5d7527(0x20e)](this[_0x5d7527(0x218)][_0x5d7527(0x1ef)]['subscribe'](async _0x476304=>{const _0xbe81e9=_0x5d7527;var _0x372a63,_0x17d835,_0x1ec898,_0xc58787;const _0x3868df=(_0x372a63=this[_0xbe81e9(0x228)][_0xbe81e9(0x1d5)](_0x476304['unitId'])[_0xbe81e9(0x20d)](_0x5c396a=>_0x5c396a[_0xbe81e9(0x1f3)]===_0x476304[_0xbe81e9(0x1f3)]))==null?void 0x0:_0x372a63['root'];if(!_0x3868df)return;const {unitId:_0x2a63b3,subUnitId:_0x547ab7}=_0x3868df;switch(_0x476304['user']&&this[_0xbe81e9(0x1e1)][_0xbe81e9(0x22a)](_0x476304[_0xbe81e9(0x1ec)]),_0x476304['type']){case v['Add']:break;case v[_0xbe81e9(0x1d4)]:{this['_threadCommentModel'][_0xbe81e9(0x211)](_0x2a63b3,_0x547ab7,{'unitId':_0x2a63b3,'subUnitId':_0x547ab7,'ref':'','id':_0x476304['replyId'],'dT':D(+_0x476304[_0xbe81e9(0x21e)]),'threadId':_0x476304[_0xbe81e9(0x1f3)],'personId':(_0x1ec898=(_0x17d835=_0x476304['user'])==null?void 0x0:_0x17d835[_0xbe81e9(0x1dd)])!=null?_0x1ec898:_0x476304[_0xbe81e9(0x215)],'text':JSON[_0xbe81e9(0x1de)](_0x476304[_0xbe81e9(0x213)]),'parentId':_0x3868df['id']});break;}case v[_0xbe81e9(0x231)]:{const _0x394c6a=this[_0xbe81e9(0x228)][_0xbe81e9(0x1e6)](_0x2a63b3,_0x547ab7,_0x476304[_0xbe81e9(0x1e2)]);_0x394c6a&&_0x394c6a['parentId']&&this['_threadCommentModel'][_0xbe81e9(0x1d6)](_0x2a63b3,_0x547ab7,_0x476304[_0xbe81e9(0x1e2)]);break;}case v[_0xbe81e9(0x1f5)]:{this[_0xbe81e9(0x228)][_0xbe81e9(0x1f7)](_0x2a63b3,_0x547ab7,{'commentId':_0x476304[_0xbe81e9(0x1e2)],'text':JSON[_0xbe81e9(0x1de)](_0x476304[_0xbe81e9(0x213)])});break;}case v[_0xbe81e9(0x1dc)]:{const _0x55006d=(_0xc58787=this['_threadCommentModel'][_0xbe81e9(0x1d5)](_0x476304[_0xbe81e9(0x1f2)])[_0xbe81e9(0x20d)](_0x29ae62=>_0x29ae62[_0xbe81e9(0x1f3)]===_0x476304[_0xbe81e9(0x1f3)]))==null?void 0x0:_0xc58787[_0xbe81e9(0x203)];_0x55006d&&this['_threadCommentModel'][_0xbe81e9(0x200)](_0x2a63b3,_0x547ab7,_0x55006d['id'],_0x476304[_0xbe81e9(0x1e0)]===I[_0xbe81e9(0x1d2)]);break;}}}));}};S=V([p(0x0,_0x33d325(_0x18a01f)),p(0x1,_0x33d325(_0x169dae)),p(0x2,_0x33d325(_0x369ab3)),p(0x3,_0x33d325(_0x4076f3))],S);const z=_0x8f8025(0x204),M={};var k=Object[_0x8f8025(0x219)],Q=(_0x3a8ca7,_0x375119,_0x5442c5,_0x27871f)=>{const _0xacef10=_0x8f8025;for(var _0x44542d=_0x27871f>0x1?void 0x0:_0x27871f?k(_0x375119,_0x5442c5):_0x375119,_0x5c2e78=_0x3a8ca7[_0xacef10(0x1fb)]-0x1,_0x20c065;_0x5c2e78>=0x0;_0x5c2e78--)(_0x20c065=_0x3a8ca7[_0x5c2e78])&&(_0x44542d=_0x20c065(_0x44542d)||_0x44542d);return _0x44542d;},_=(_0x4acf4f,_0xdcd2f6)=>(_0x7a7d2,_0x4170f3)=>_0xdcd2f6(_0x7a7d2,_0x4170f3,_0x4acf4f);function X(_0x2c65e8,_0x1f9834){const _0x1abb1c=_0x8f8025,_0x32065a=_0x2c65e8['replies'][0x0];return{..._0x1f9834,'id':_0x32065a[_0x1abb1c(0x1e2)],'resolved':_0x2c65e8[_0x1abb1c(0x1e0)]===0x1,'dT':D(_0x32065a[_0x1abb1c(0x21e)]),'personId':_0x32065a[_0x1abb1c(0x215)],'threadId':_0x32065a[_0x1abb1c(0x1f3)]};}function ee(_0x535ad1,_0x217672,_0x3cc0a7){const _0x279f58=_0x8f8025;var _0x31dc37,_0x4ef816;if(((_0x4ef816=(_0x31dc37=_0x535ad1==null?void 0x0:_0x535ad1['replies'])==null?void 0x0:_0x31dc37[_0x279f58(0x1fb)])!=null?_0x4ef816:0x0)>0x0){const _0xe22f7c=(_0x18c67b,_0x208010)=>({'id':_0x18c67b[_0x279f58(0x1e2)],'threadId':_0x18c67b[_0x279f58(0x1f3)],'dT':D(_0x18c67b[_0x279f58(0x21e)]),'personId':_0x18c67b['userId'],'resolved':_0x535ad1[_0x279f58(0x1e0)]===I['Solved'],'unitId':_0x217672,'subUnitId':_0x3cc0a7,'text':JSON['parse'](_0x18c67b[_0x279f58(0x213)]),'parentId':_0x208010}),_0x5aa13b=_0xe22f7c(_0x535ad1[_0x279f58(0x21a)][0x0]);return{..._0x5aa13b,'children':_0x535ad1[_0x279f58(0x21a)][_0x279f58(0x222)](0x1)[_0x279f58(0x20f)](_0x4f5dbb=>_0xe22f7c(_0x4f5dbb,_0x5aa13b['id']))};}return null;}let f=class{constructor(_0x565dd2,_0x65f4e6,_0x9096e8,_0x331ab6){const _0x3c066f=_0x8f8025;this[_0x3c066f(0x227)]=_0x565dd2,this['_userService']=_0x65f4e6,this[_0x3c066f(0x1e3)]=_0x9096e8,this['_injector']=_0x331ab6;}async[_0x8f8025(0x211)](_0x3dcf13){const _0x5310e7=_0x8f8025;var _0x1198dc,_0x384122;const {parentId:_0x37a409,unitId:_0x1cec67,text:_0xa09656,threadId:_0x2dc300}=_0x3dcf13,_0x141805=(_0x384122=(_0x1198dc=_0xa09656[_0x5310e7(0x1f9)])==null?void 0x0:_0x1198dc['filter'](_0x498dcc=>_0x498dcc[_0x5310e7(0x1e4)]===_0x41cadb[_0x5310e7(0x1d9)])[_0x5310e7(0x20f)](_0x11f42c=>_0x11f42c['rangeId']))!=null?_0x384122:[],_0x46483e=JSON[_0x5310e7(0x1fe)](_0xa09656),_0x5a8f85=(await this['_sessionService']['requireSession'](_0x1cec67))[_0x5310e7(0x210)]();if(_0x37a409){const _0x32f3f2={'memberId':_0x5a8f85,'unitId':_0x1cec67,'content':_0x46483e,'mention':_0x141805,'threadId':_0x2dc300},_0x120525=(await this[_0x5310e7(0x227)]['post'](_0x5310e7(0x212)+_0x1cec67+_0x5310e7(0x21c),{'body':_0x32f3f2}))[_0x5310e7(0x225)][_0x5310e7(0x202)];return{..._0x3dcf13,'id':_0x120525['replyId'],'dT':_0x544cf6(+_0x120525['createTimestamp'])[_0x5310e7(0x216)](_0x5310e7(0x1df)),'personId':_0x120525[_0x5310e7(0x215)]};}else{const _0x45d4f6={'memberId':_0x5a8f85,'unitId':_0x1cec67,'content':_0x46483e,'mention':_0x141805},_0x15a851=await this[_0x5310e7(0x227)][_0x5310e7(0x1f6)](_0x5310e7(0x212)+_0x1cec67+'/add',{'body':_0x45d4f6});return X(_0x15a851['body']['comment'],_0x3dcf13);}}async[_0x8f8025(0x1f7)](_0x5dbcae){const _0x27dc82=_0x8f8025;var _0x39caf1,_0x15ad92;const {text:_0x4c20d8,unitId:_0x14c8a6}=_0x5dbcae,_0x4305ff=(_0x15ad92=(_0x39caf1=_0x4c20d8[_0x27dc82(0x1f9)])==null?void 0x0:_0x39caf1[_0x27dc82(0x1ff)](_0x25cb7d=>_0x25cb7d['rangeType']===_0x41cadb[_0x27dc82(0x1d9)])[_0x27dc82(0x20f)](_0x2dd46f=>_0x2dd46f[_0x27dc82(0x22d)]))!=null?_0x15ad92:[],_0x5bbb9d=JSON['stringify'](_0x4c20d8),_0x581926=_0x5dbcae[_0x27dc82(0x1f3)],_0x5e8fb3=_0x5dbcae['id'],_0x39019b={'memberId':(await this['_sessionService'][_0x27dc82(0x221)](_0x14c8a6))[_0x27dc82(0x210)](),'unitId':_0x14c8a6,'threadId':_0x581926,'mention':_0x4305ff,'content':_0x5bbb9d,'replyId':_0x5e8fb3},_0x59c2b0=await this[_0x27dc82(0x227)][_0x27dc82(0x1f6)]('/universer-api/comment/unit/'+_0x14c8a6+_0x27dc82(0x1d7),{'body':_0x39019b});return!_0x59c2b0['body'][_0x27dc82(0x226)]||_0x59c2b0[_0x27dc82(0x225)][_0x27dc82(0x226)][_0x27dc82(0x1e7)]===0x1;}async[_0x8f8025(0x200)](_0x3106d5){const _0xb0efd7=_0x8f8025,{unitId:_0xd3aa1b}=_0x3106d5,_0x2c7596=_0x3106d5[_0xb0efd7(0x1f3)],_0x320efc={'memberId':this[_0xb0efd7(0x1e1)][_0xb0efd7(0x1d8)]()[_0xb0efd7(0x1dd)],'unitId':_0xd3aa1b,'threadId':_0x2c7596,'solved':_0x3106d5[_0xb0efd7(0x207)]?I[_0xb0efd7(0x1d2)]:I[_0xb0efd7(0x220)]},_0x45cd29=await this[_0xb0efd7(0x227)][_0xb0efd7(0x1f6)](_0xb0efd7(0x212)+_0xd3aa1b+_0xb0efd7(0x1e5),{'body':_0x320efc});return!_0x45cd29[_0xb0efd7(0x225)]['error']||_0x45cd29[_0xb0efd7(0x225)][_0xb0efd7(0x226)][_0xb0efd7(0x1e7)]===0x1;}async[_0x8f8025(0x1d6)](_0x23203c,_0x946469,_0x3e445e,_0x2d9a50){const _0x43c557=_0x8f8025,_0x2e74f1={'memberId':(await this[_0x43c557(0x1e3)][_0x43c557(0x221)](_0x23203c))[_0x43c557(0x210)](),'threadId':_0x3e445e,'replyId':_0x2d9a50,'unitId':_0x23203c},_0x37ee09=await this['_httpService'][_0x43c557(0x1f6)](_0x43c557(0x212)+_0x23203c+_0x43c557(0x1db),{'body':_0x2e74f1});return!_0x37ee09['body'][_0x43c557(0x226)]||_0x37ee09[_0x43c557(0x225)]['error'][_0x43c557(0x1e7)]===0x1;}async['listComments'](_0x231c58,_0x586eb2,_0x83d15d){const _0x680d71=_0x8f8025,_0x280a20={'unitId':_0x231c58,'threadId':_0x83d15d},_0x5595b2=await this[_0x680d71(0x227)]['post']('/universer-api/comment/unit/'+_0x231c58+_0x680d71(0x1d3),{'body':_0x280a20}),_0x200049=_0x83d15d[_0x680d71(0x20f)](_0xdbc7f4=>ee(_0x5595b2[_0x680d71(0x225)][_0x680d71(0x1fc)][_0xdbc7f4],_0x231c58,_0x586eb2))[_0x680d71(0x1ff)](Boolean);return Object[_0x680d71(0x205)](_0x5595b2[_0x680d71(0x225)]['users'])[_0x680d71(0x1d0)](_0x409e46=>{const _0x1f4ba0=_0x680d71;this[_0x1f4ba0(0x1e1)]['addUser'](_0x409e46);}),_0x200049;}['saveCommentToSnapshot'](_0x42d577){const _0x550905=_0x8f8025;return{'id':_0x42d577['id'],'threadId':_0x42d577['threadId'],'ref':_0x42d577[_0x550905(0x224)]};}};f=Q([_(0x0,_0x33d325(_0x24bf18)),_(0x1,_0x33d325(_0x369ab3)),_(0x2,_0x33d325(_0x5bef75)),_(0x3,_0x33d325(_0x4076f3))],f);var re=Object[_0x8f8025(0x219)],te=(_0x4fee17,_0x3cfee9,_0x462e6b,_0x410a3e)=>{for(var _0x5d7b5d=_0x410a3e>0x1?void 0x0:_0x410a3e?re(_0x3cfee9,_0x462e6b):_0x3cfee9,_0x1517d0=_0x4fee17['length']-0x1,_0x3e9ad8;_0x1517d0>=0x0;_0x1517d0--)(_0x3e9ad8=_0x4fee17[_0x1517d0])&&(_0x5d7b5d=_0x3e9ad8(_0x5d7b5d)||_0x5d7b5d);return _0x5d7b5d;},N=(_0x3e07ab,_0x505e7f)=>(_0xc35d4a,_0xf65d16)=>_0x505e7f(_0xc35d4a,_0xf65d16,_0x3e07ab);let g=class extends _0x5d3e8a{constructor(_0x535402,_0x304f97){const _0x1e5b7b=_0x8f8025;super(),this[_0x1e5b7b(0x1e8)]=_0x535402,this[_0x1e5b7b(0x206)]=_0x304f97,this['_initDataSource']();}[_0x8f8025(0x21f)](){const _0x1a9a1a=_0x8f8025;this[_0x1a9a1a(0x1e8)][_0x1a9a1a(0x208)]=this[_0x1a9a1a(0x206)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x33aaea),N(0x1,_0x33d325(f))],g);var se=Object[_0x8f8025(0x209)],oe=Object[_0x8f8025(0x219)],ne=(_0x10cc8d,_0x380706,_0x2db734)=>_0x380706 in _0x10cc8d?se(_0x10cc8d,_0x380706,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2db734}):_0x10cc8d[_0x380706]=_0x2db734,ie=(_0x2d09f4,_0x1c9bc6,_0x2b6fd3,_0xd470de)=>{const _0x259507=_0x8f8025;for(var _0x2587b6=_0xd470de>0x1?void 0x0:_0xd470de?oe(_0x1c9bc6,_0x2b6fd3):_0x1c9bc6,_0x4ffb3a=_0x2d09f4[_0x259507(0x1fb)]-0x1,_0x3c6b1c;_0x4ffb3a>=0x0;_0x4ffb3a--)(_0x3c6b1c=_0x2d09f4[_0x4ffb3a])&&(_0x2587b6=_0x3c6b1c(_0x2587b6)||_0x2587b6);return _0x2587b6;},w=(_0x2977e3,_0x1850be)=>(_0x259e2d,_0x31e573)=>_0x1850be(_0x259e2d,_0x31e573,_0x2977e3),$=(_0x1e6b9a,_0x8be6f2,_0x5555fe)=>ne(_0x1e6b9a,typeof _0x8be6f2!='symbol'?_0x8be6f2+'':_0x8be6f2,_0x5555fe);let b=class extends _0x1ed00a{constructor(_0x5ada21=M,_0x1f230c,_0x3e9e1e){const _0x5dfc90=_0x8f8025;super(),this[_0x5dfc90(0x22f)]=_0x5ada21,this[_0x5dfc90(0x1f4)]=_0x1f230c,this[_0x5dfc90(0x1cc)]=_0x3e9e1e;const {..._0x3a07d3}=_0x1c1862({},M,this[_0x5dfc90(0x22f)]);this[_0x5dfc90(0x1cc)][_0x5dfc90(0x21d)](z,_0x3a07d3);}[_0x8f8025(0x1ee)](){const _0x424f04=_0x8f8025;[[f],[g],[S]][_0x424f04(0x1d0)](_0x2e370a=>{const _0x367047=_0x424f04;this[_0x367047(0x1f4)][_0x367047(0x22b)](_0x2e370a);});}['onReady'](){const _0x2acc88=_0x8f8025;this[_0x2acc88(0x1f4)][_0x2acc88(0x21b)](g),this[_0x2acc88(0x1f4)][_0x2acc88(0x21b)](S);}};function _0x5718(_0x3b303f,_0x1daaa5){const _0x7ab194=_0x7ab1();return _0x5718=function(_0x5718d6,_0x45a8d3){_0x5718d6=_0x5718d6-0x1cc;let _0x177767=_0x7ab194[_0x5718d6];return _0x177767;},_0x5718(_0x3b303f,_0x1daaa5);}$(b,_0x8f8025(0x1fd),W),$(b,_0x8f8025(0x223),_0xa87ba3['UNIVER_UNKNOWN']),b=ie([_0x4aae9b(_0x5e9fef,_0x1e8c7d,_0x3c8b88),w(0x1,_0x33d325(_0x4076f3)),w(0x2,_0x46a7ac)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4ca1(_0x6fe6d3,_0x3e321f){const _0x58c156=_0x58c1();return _0x4ca1=function(_0x4ca12a,_0x329041){_0x4ca12a=_0x4ca12a-0x173;let _0x3d6735=_0x58c156[_0x4ca12a];return _0x3d6735;},_0x4ca1(_0x6fe6d3,_0x3e321f);}(function(_0x4552d8,_0x5d205d){const _0x533fd6=_0x4ca1,_0x320b52=_0x4552d8();while(!![]){try{const _0x49db1a=-parseInt(_0x533fd6(0x18b))/0x1+parseInt(_0x533fd6(0x19c))/0x2+parseInt(_0x533fd6(0x1f3))/0x3+parseInt(_0x533fd6(0x1a6))/0x4*(-parseInt(_0x533fd6(0x1e2))/0x5)+parseInt(_0x533fd6(0x173))/0x6*(-parseInt(_0x533fd6(0x18f))/0x7)+parseInt(_0x533fd6(0x1c7))/0x8+parseInt(_0x533fd6(0x1c3))/0x9*(parseInt(_0x533fd6(0x19e))/0xa);if(_0x49db1a===_0x5d205d)break;else _0x320b52['push'](_0x320b52['shift']());}catch(_0x3c95c2){_0x320b52['push'](_0x320b52['shift']());}}}(_0x58c1,0xc9757),function(_0x2cbbe5,_0x590734){const _0x35a16e=_0x4ca1;typeof exports==_0x35a16e(0x1d4)&&typeof module<'u'?_0x590734(exports,require(_0x35a16e(0x1ad)),require('@univerjs-pro/license'),require(_0x35a16e(0x1f7)),require(_0x35a16e(0x1b0)),require(_0x35a16e(0x19b)),require(_0x35a16e(0x1bd)),require(_0x35a16e(0x1ea))):typeof define==_0x35a16e(0x1ab)&&define['amd']?define([_0x35a16e(0x1c6),_0x35a16e(0x1ad),'@univerjs-pro/license','@univerjs/core',_0x35a16e(0x1b0),_0x35a16e(0x19b),_0x35a16e(0x1bd),_0x35a16e(0x1ea)],_0x590734):(_0x2cbbe5=typeof globalThis<'u'?globalThis:_0x2cbbe5||self,_0x590734(_0x2cbbe5[_0x35a16e(0x1ba)]={},_0x2cbbe5[_0x35a16e(0x19d)],_0x2cbbe5[_0x35a16e(0x1f2)],_0x2cbbe5[_0x35a16e(0x1b7)],_0x2cbbe5['UniverThreadCommentUi'],_0x2cbbe5[_0x35a16e(0x18a)],_0x2cbbe5[_0x35a16e(0x1bd)],_0x2cbbe5[_0x35a16e(0x1c0)]));}(this,function(_0x374824,_0x3297fa,_0x31c75c,_0x41e612,_0x2416ea,_0x3128e1,_0x3808fa,_0x120887){'use strict';const _0x90dff3=_0x4ca1;const _0x59cbe7=_0x90dff3(0x193);var _0x3d692f=(_0xc31d74=>(_0xc31d74[_0xc31d74['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xc31d74[_0xc31d74[_0x90dff3(0x182)]=0x1]=_0x90dff3(0x182),_0xc31d74[_0xc31d74[_0x90dff3(0x1bf)]=-0x1]=_0x90dff3(0x1bf),_0xc31d74))(_0x3d692f||{}),_0x38ae46=(_0x46d893=>(_0x46d893[_0x46d893['Unknown']=0x0]=_0x90dff3(0x1e9),_0x46d893[_0x46d893['Add']=0x1]=_0x90dff3(0x1d6),_0x46d893[_0x46d893[_0x90dff3(0x175)]=0x2]=_0x90dff3(0x175),_0x46d893[_0x46d893[_0x90dff3(0x199)]=0x3]=_0x90dff3(0x199),_0x46d893[_0x46d893[_0x90dff3(0x1dd)]=0x4]=_0x90dff3(0x1dd),_0x46d893[_0x46d893[_0x90dff3(0x1cd)]=0x5]=_0x90dff3(0x1cd),_0x46d893[_0x46d893[_0x90dff3(0x1bf)]=-0x1]=_0x90dff3(0x1bf),_0x46d893))(_0x38ae46||{});const _0x5822a5=_0x14c077=>_0x41e612[_0x90dff3(0x18d)](new Date(+_0x14c077))[_0x90dff3(0x1fb)]('YYYY/MM/DD\x20HH:mm'),_0xd9bc79=async(_0xede15f,_0x51fcd1)=>{const _0x28a58c=_0x90dff3,_0x24df73=_0xede15f[_0x28a58c(0x1b5)](_0x41e612['UserManagerService']),_0x3fd8f4=_0xede15f[_0x28a58c(0x1b5)](_0x120887['HTTPService']);_0x51fcd1[_0x28a58c(0x188)](_0x1e6ec2=>{const _0x452a4a=_0x28a58c;_0x24df73[_0x452a4a(0x180)](_0x1e6ec2)&&_0x51fcd1[_0x452a4a(0x1af)](_0x1e6ec2);}),_0x51fcd1['size']&&(await _0x3fd8f4['get'](_0x28a58c(0x1cf),{'params':{'userIDs':[..._0x51fcd1]}}))['body'][_0x28a58c(0x1eb)]['forEach'](_0xa5b483=>{const _0x17e922=_0x28a58c;_0xa5b483&&_0x24df73[_0x17e922(0x1de)](_0xa5b483);});};var _0x327b0f=Object['getOwnPropertyDescriptor'],_0xc958a1=(_0x1539a4,_0x253807,_0x211b60,_0x21005b)=>{const _0x5941cf=_0x90dff3;for(var _0xeda2fd=_0x21005b>0x1?void 0x0:_0x21005b?_0x327b0f(_0x253807,_0x211b60):_0x253807,_0x226b6d=_0x1539a4[_0x5941cf(0x1da)]-0x1,_0xa65553;_0x226b6d>=0x0;_0x226b6d--)(_0xa65553=_0x1539a4[_0x226b6d])&&(_0xeda2fd=_0xa65553(_0xeda2fd)||_0xeda2fd);return _0xeda2fd;},_0x1c7093=(_0x18f888,_0x47ae0f)=>(_0x39816b,_0x22efa1)=>_0x47ae0f(_0x39816b,_0x22efa1,_0x18f888);let _0x3bf950=class extends _0x41e612['Disposable']{constructor(_0x2a1fab,_0x381ea0,_0x5b00a9,_0xf5927b){const _0x5f58c9=_0x90dff3;super(),this[_0x5f58c9(0x1e5)]=_0x2a1fab,this[_0x5f58c9(0x1d2)]=_0x381ea0,this[_0x5f58c9(0x19f)]=_0x5b00a9,this[_0x5f58c9(0x1c2)]=_0xf5927b,this[_0x5f58c9(0x1b8)](),this[_0x5f58c9(0x1ef)]();}[_0x90dff3(0x1ef)](){const _0x52a3c6=_0x90dff3;this['disposeWithMe'](this[_0x52a3c6(0x1d2)]['commentUpdate$'][_0x52a3c6(0x17e)](_0x3808fa[_0x52a3c6(0x1c1)](0x10))['subscribe'](_0x1ae174=>{const _0x28275b=_0x52a3c6,_0x55ae48=new Set();_0x1ae174[_0x28275b(0x188)](_0xe14ae=>{const _0x582b4c=_0x28275b;switch(_0xe14ae[_0x582b4c(0x1fa)]){case'add':{const _0x4ed1f4=_0xe14ae['payload'][_0x582b4c(0x1a2)];_0x55ae48['add'](_0x4ed1f4);break;}}}),_0xd9bc79(this[_0x28275b(0x1c2)],_0x55ae48);}));}[_0x90dff3(0x1b8)](){const _0x191b62=_0x90dff3;this['disposeWithMe'](this[_0x191b62(0x1e5)][_0x191b62(0x1ac)][_0x191b62(0x196)](async _0x1968f7=>{const _0x47d6c0=_0x191b62;var _0x3c4743,_0x3f74ce,_0x1ca908,_0x58e5b2;const _0x546245=(_0x3c4743=this[_0x47d6c0(0x1d2)]['getUnit'](_0x1968f7['unitId'])[_0x47d6c0(0x1f0)](_0xa9ec56=>_0xa9ec56[_0x47d6c0(0x1f8)]===_0x1968f7[_0x47d6c0(0x1f8)]))==null?void 0x0:_0x3c4743[_0x47d6c0(0x1f9)];if(!_0x546245)return;const {unitId:_0x20a088,subUnitId:_0xa63f8f}=_0x546245;switch(_0x1968f7[_0x47d6c0(0x1d7)]&&this['_userService'][_0x47d6c0(0x1de)](_0x1968f7[_0x47d6c0(0x1d7)]),_0x1968f7[_0x47d6c0(0x1fa)]){case _0x38ae46['Add']:break;case _0x38ae46[_0x47d6c0(0x175)]:{this[_0x47d6c0(0x1d2)]['addComment'](_0x20a088,_0xa63f8f,{'unitId':_0x20a088,'subUnitId':_0xa63f8f,'ref':'','id':_0x1968f7['replyId'],'dT':_0x5822a5(+_0x1968f7[_0x47d6c0(0x1d0)]),'threadId':_0x1968f7[_0x47d6c0(0x1f8)],'personId':(_0x1ca908=(_0x3f74ce=_0x1968f7[_0x47d6c0(0x1d7)])==null?void 0x0:_0x3f74ce[_0x47d6c0(0x190)])!=null?_0x1ca908:_0x1968f7[_0x47d6c0(0x187)],'text':JSON[_0x47d6c0(0x1a8)](_0x1968f7[_0x47d6c0(0x1a4)]),'parentId':_0x546245['id']});break;}case _0x38ae46[_0x47d6c0(0x1dd)]:{const _0x128939=this['_threadCommentModel']['getComment'](_0x20a088,_0xa63f8f,_0x1968f7[_0x47d6c0(0x185)]);_0x128939&&_0x128939[_0x47d6c0(0x1a1)]&&this['_threadCommentModel'][_0x47d6c0(0x19a)](_0x20a088,_0xa63f8f,_0x1968f7[_0x47d6c0(0x185)]);break;}case _0x38ae46[_0x47d6c0(0x199)]:{this[_0x47d6c0(0x1d2)][_0x47d6c0(0x1e0)](_0x20a088,_0xa63f8f,{'commentId':_0x1968f7[_0x47d6c0(0x185)],'text':JSON[_0x47d6c0(0x1a8)](_0x1968f7[_0x47d6c0(0x1a4)])});break;}case _0x38ae46[_0x47d6c0(0x1cd)]:{const _0xdb1ee9=(_0x58e5b2=this['_threadCommentModel'][_0x47d6c0(0x17d)](_0x1968f7[_0x47d6c0(0x1db)])['find'](_0xc79c4e=>_0xc79c4e[_0x47d6c0(0x1f8)]===_0x1968f7[_0x47d6c0(0x1f8)]))==null?void 0x0:_0x58e5b2[_0x47d6c0(0x1f9)];_0xdb1ee9&&this[_0x47d6c0(0x1d2)]['resolveComment'](_0x20a088,_0xa63f8f,_0xdb1ee9['id'],_0x1968f7['solved']===_0x3d692f[_0x47d6c0(0x182)]);break;}}}));}};_0x3bf950=_0xc958a1([_0x1c7093(0x0,_0x41e612[_0x90dff3(0x184)](_0x3297fa[_0x90dff3(0x177)])),_0x1c7093(0x1,_0x41e612[_0x90dff3(0x184)](_0x3128e1['ThreadCommentModel'])),_0x1c7093(0x2,_0x41e612[_0x90dff3(0x184)](_0x41e612['UserManagerService'])),_0x1c7093(0x3,_0x41e612['Inject'](_0x41e612[_0x90dff3(0x1cc)]))],_0x3bf950);const _0x1e226a=_0x90dff3(0x1e7),_0x4d4dc6={};var _0xefa162=Object[_0x90dff3(0x18e)],_0x394cd7=(_0x5689dc,_0x2ad567,_0x538170,_0x397685)=>{const _0xca4127=_0x90dff3;for(var _0x1ca454=_0x397685>0x1?void 0x0:_0x397685?_0xefa162(_0x2ad567,_0x538170):_0x2ad567,_0x225f61=_0x5689dc[_0xca4127(0x1da)]-0x1,_0x361ac1;_0x225f61>=0x0;_0x225f61--)(_0x361ac1=_0x5689dc[_0x225f61])&&(_0x1ca454=_0x361ac1(_0x1ca454)||_0x1ca454);return _0x1ca454;},_0x20bf20=(_0x314dc2,_0x2a09a0)=>(_0x2c7b1f,_0x40ff2e)=>_0x2a09a0(_0x2c7b1f,_0x40ff2e,_0x314dc2);function _0x4ab704(_0x378b9f,_0x3921a3){const _0xaeebf5=_0x90dff3,_0x3d2304=_0x378b9f[_0xaeebf5(0x1ae)][0x0];return{..._0x3921a3,'id':_0x3d2304[_0xaeebf5(0x185)],'resolved':_0x378b9f[_0xaeebf5(0x183)]===0x1,'dT':_0x5822a5(_0x3d2304[_0xaeebf5(0x1d0)]),'personId':_0x3d2304[_0xaeebf5(0x187)],'threadId':_0x3d2304[_0xaeebf5(0x1f8)]};}function _0x2aa467(_0x2ab7a9,_0x3be0fc,_0x62034e){const _0xdf9c8c=_0x90dff3;var _0x51a3c1,_0x429de0;if(((_0x429de0=(_0x51a3c1=_0x2ab7a9==null?void 0x0:_0x2ab7a9['replies'])==null?void 0x0:_0x51a3c1[_0xdf9c8c(0x1da)])!=null?_0x429de0:0x0)>0x0){const _0x440983=(_0x127dbb,_0x3beb53)=>({'id':_0x127dbb[_0xdf9c8c(0x185)],'threadId':_0x127dbb[_0xdf9c8c(0x1f8)],'dT':_0x5822a5(_0x127dbb['createTimestamp']),'personId':_0x127dbb[_0xdf9c8c(0x187)],'resolved':_0x2ab7a9[_0xdf9c8c(0x183)]===_0x3d692f[_0xdf9c8c(0x182)],'unitId':_0x3be0fc,'subUnitId':_0x62034e,'text':JSON[_0xdf9c8c(0x1a8)](_0x127dbb[_0xdf9c8c(0x1a4)]),'parentId':_0x3beb53}),_0x47aefd=_0x440983(_0x2ab7a9['replies'][0x0]);return{..._0x47aefd,'children':_0x2ab7a9[_0xdf9c8c(0x1ae)][_0xdf9c8c(0x17a)](0x1)[_0xdf9c8c(0x176)](_0x38eb9e=>_0x440983(_0x38eb9e,_0x47aefd['id']))};}return null;}let _0x1084ba=class{constructor(_0x1adef7,_0x280bc2,_0x2a7efe,_0x12a0fd){const _0x41e47e=_0x90dff3;this[_0x41e47e(0x1e8)]=_0x1adef7,this['_userService']=_0x280bc2,this[_0x41e47e(0x198)]=_0x2a7efe,this['_injector']=_0x12a0fd;}async['addComment'](_0x4cd585){const _0x5a22aa=_0x90dff3;var _0x12e253,_0x4095a0;const {parentId:_0x551ffd,unitId:_0x2880ad,text:_0x3bfac6,threadId:_0x1fe1aa}=_0x4cd585,_0x1a3a6e=(_0x4095a0=(_0x12e253=_0x3bfac6['customRanges'])==null?void 0x0:_0x12e253[_0x5a22aa(0x1c8)](_0x1ee864=>_0x1ee864[_0x5a22aa(0x1d5)]===_0x41e612[_0x5a22aa(0x1dc)]['COMMENT'])['map'](_0x54355e=>_0x54355e[_0x5a22aa(0x1e1)]))!=null?_0x4095a0:[],_0x284da1=JSON[_0x5a22aa(0x1be)](_0x3bfac6),_0x487cb7=(await this[_0x5a22aa(0x198)][_0x5a22aa(0x194)](_0x2880ad))[_0x5a22aa(0x1d3)]();if(_0x551ffd){const _0x41f096={'memberId':_0x487cb7,'unitId':_0x2880ad,'content':_0x284da1,'mention':_0x1a3a6e,'threadId':_0x1fe1aa},_0x3e7570=(await this['_httpService'][_0x5a22aa(0x1b6)](_0x5a22aa(0x1ee)+_0x2880ad+_0x5a22aa(0x174),{'body':_0x41f096}))[_0x5a22aa(0x1d1)][_0x5a22aa(0x1c9)];return{..._0x4cd585,'id':_0x3e7570[_0x5a22aa(0x185)],'dT':_0x41e612[_0x5a22aa(0x18d)](+_0x3e7570['createTimestamp'])[_0x5a22aa(0x1fb)](_0x5a22aa(0x1c5)),'personId':_0x3e7570[_0x5a22aa(0x187)]};}else{const _0x5e9a02={'memberId':_0x487cb7,'unitId':_0x2880ad,'content':_0x284da1,'mention':_0x1a3a6e},_0x4f19e6=await this[_0x5a22aa(0x1e8)][_0x5a22aa(0x1b6)](_0x5a22aa(0x1ee)+_0x2880ad+_0x5a22aa(0x1b1),{'body':_0x5e9a02});return _0x4ab704(_0x4f19e6[_0x5a22aa(0x1d1)][_0x5a22aa(0x1e4)],_0x4cd585);}}async['updateComment'](_0x5f2ebf){const _0x9b0c52=_0x90dff3;var _0x1e52a7,_0x353998;const {text:_0x5967f6,unitId:_0x1743c6}=_0x5f2ebf,_0x546900=(_0x353998=(_0x1e52a7=_0x5967f6[_0x9b0c52(0x1c4)])==null?void 0x0:_0x1e52a7[_0x9b0c52(0x1c8)](_0x4af87e=>_0x4af87e[_0x9b0c52(0x1d5)]===_0x41e612[_0x9b0c52(0x1dc)][_0x9b0c52(0x189)])[_0x9b0c52(0x176)](_0x1d063f=>_0x1d063f[_0x9b0c52(0x1e1)]))!=null?_0x353998:[],_0x37be32=JSON[_0x9b0c52(0x1be)](_0x5967f6),_0x5b32c4=_0x5f2ebf['threadId'],_0x14828e=_0x5f2ebf['id'],_0x432c2f={'memberId':(await this[_0x9b0c52(0x198)][_0x9b0c52(0x194)](_0x1743c6))[_0x9b0c52(0x1d3)](),'unitId':_0x1743c6,'threadId':_0x5b32c4,'mention':_0x546900,'content':_0x37be32,'replyId':_0x14828e},_0xc462b2=await this[_0x9b0c52(0x1e8)][_0x9b0c52(0x1b6)]('/universer-api/comment/unit/'+_0x1743c6+_0x9b0c52(0x1bb),{'body':_0x432c2f});return!_0xc462b2[_0x9b0c52(0x1d1)][_0x9b0c52(0x178)]||_0xc462b2[_0x9b0c52(0x1d1)][_0x9b0c52(0x178)][_0x9b0c52(0x1e6)]===0x1;}async[_0x90dff3(0x1bc)](_0x5a882a){const _0x4e2e12=_0x90dff3,{unitId:_0x281ded}=_0x5a882a,_0x41f757=_0x5a882a['threadId'],_0x4a7f4f={'memberId':this[_0x4e2e12(0x19f)][_0x4e2e12(0x197)]()['userID'],'unitId':_0x281ded,'threadId':_0x41f757,'solved':_0x5a882a[_0x4e2e12(0x1ce)]?_0x3d692f[_0x4e2e12(0x182)]:_0x3d692f[_0x4e2e12(0x1a3)]},_0x123001=await this[_0x4e2e12(0x1e8)][_0x4e2e12(0x1b6)]('/universer-api/comment/unit/'+_0x281ded+_0x4e2e12(0x1aa),{'body':_0x4a7f4f});return!_0x123001[_0x4e2e12(0x1d1)][_0x4e2e12(0x178)]||_0x123001['body'][_0x4e2e12(0x178)][_0x4e2e12(0x1e6)]===0x1;}async[_0x90dff3(0x19a)](_0x5db6e7,_0x3e7a24,_0x5d4b9c,_0x5536ef){const _0xe378e2=_0x90dff3,_0x570618={'memberId':(await this[_0xe378e2(0x198)]['requireSession'](_0x5db6e7))[_0xe378e2(0x1d3)](),'threadId':_0x5d4b9c,'replyId':_0x5536ef,'unitId':_0x5db6e7},_0x20c2c2=await this[_0xe378e2(0x1e8)]['post'](_0xe378e2(0x1ee)+_0x5db6e7+_0xe378e2(0x17f),{'body':_0x570618});return!_0x20c2c2['body'][_0xe378e2(0x178)]||_0x20c2c2[_0xe378e2(0x1d1)][_0xe378e2(0x178)][_0xe378e2(0x1e6)]===0x1;}async['listComments'](_0x366d0c,_0x3fc92e,_0x6a8cb){const _0x54abfc=_0x90dff3,_0x45bc45={'unitId':_0x366d0c,'threadId':_0x6a8cb},_0x11270d=await this[_0x54abfc(0x1e8)]['post']('/universer-api/comment/unit/'+_0x366d0c+_0x54abfc(0x1f5),{'body':_0x45bc45}),_0x30e9f2=_0x6a8cb[_0x54abfc(0x176)](_0x4036a=>_0x2aa467(_0x11270d[_0x54abfc(0x1d1)]['comments'][_0x4036a],_0x366d0c,_0x3fc92e))['filter'](Boolean);return Object[_0x54abfc(0x1b3)](_0x11270d[_0x54abfc(0x1d1)][_0x54abfc(0x1eb)])[_0x54abfc(0x188)](_0xa09769=>{const _0x540112=_0x54abfc;this[_0x540112(0x19f)]['addUser'](_0xa09769);}),_0x30e9f2;}[_0x90dff3(0x1a7)](_0x55896d){return{'id':_0x55896d['id'],'threadId':_0x55896d['threadId'],'ref':_0x55896d['ref']};}};_0x1084ba=_0x394cd7([_0x20bf20(0x0,_0x41e612[_0x90dff3(0x184)](_0x120887['HTTPService'])),_0x20bf20(0x1,_0x41e612[_0x90dff3(0x184)](_0x41e612['UserManagerService'])),_0x20bf20(0x2,_0x41e612[_0x90dff3(0x184)](_0x3297fa[_0x90dff3(0x1e3)])),_0x20bf20(0x3,_0x41e612['Inject'](_0x41e612[_0x90dff3(0x1cc)]))],_0x1084ba);var _0x1dccf4=Object[_0x90dff3(0x18e)],_0x30555d=(_0x5d4349,_0x47d8ed,_0x5ca067,_0x204513)=>{const _0x116396=_0x90dff3;for(var _0x355781=_0x204513>0x1?void 0x0:_0x204513?_0x1dccf4(_0x47d8ed,_0x5ca067):_0x47d8ed,_0x38018f=_0x5d4349[_0x116396(0x1da)]-0x1,_0x13a547;_0x38018f>=0x0;_0x38018f--)(_0x13a547=_0x5d4349[_0x38018f])&&(_0x355781=_0x13a547(_0x355781)||_0x355781);return _0x355781;},_0x4f39b6=(_0x2afe2a,_0x27e144)=>(_0x52a6b2,_0x40b659)=>_0x27e144(_0x52a6b2,_0x40b659,_0x2afe2a);let _0x1b4466=class extends _0x41e612[_0x90dff3(0x1f4)]{constructor(_0xe4c281,_0x5f2181){const _0x18d3e8=_0x90dff3;super(),this[_0x18d3e8(0x191)]=_0xe4c281,this[_0x18d3e8(0x1ed)]=_0x5f2181,this[_0x18d3e8(0x1df)]();}['_initDataSource'](){const _0x16b5ca=_0x90dff3;this['_threadCommentDataSourceService'][_0x16b5ca(0x1a0)]=this[_0x16b5ca(0x1ed)],this[_0x16b5ca(0x191)]['syncUpdateMutationToColla']=!0x1;}};_0x1b4466=_0x30555d([_0x4f39b6(0x0,_0x3128e1['IThreadCommentDataSourceService']),_0x4f39b6(0x1,_0x41e612[_0x90dff3(0x184)](_0x1084ba))],_0x1b4466);var _0x13af5f=Object[_0x90dff3(0x181)],_0x366012=Object[_0x90dff3(0x18e)],_0x7750d4=(_0x17ce86,_0x22f8c1,_0x53bb40)=>_0x22f8c1 in _0x17ce86?_0x13af5f(_0x17ce86,_0x22f8c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x53bb40}):_0x17ce86[_0x22f8c1]=_0x53bb40,_0x354d41=(_0x3c10a7,_0x57aac3,_0x4dc81e,_0x2f5731)=>{const _0x1f1832=_0x90dff3;for(var _0x4976ec=_0x2f5731>0x1?void 0x0:_0x2f5731?_0x366012(_0x57aac3,_0x4dc81e):_0x57aac3,_0x344631=_0x3c10a7[_0x1f1832(0x1da)]-0x1,_0x3f0d8d;_0x344631>=0x0;_0x344631--)(_0x3f0d8d=_0x3c10a7[_0x344631])&&(_0x4976ec=_0x3f0d8d(_0x4976ec)||_0x4976ec);return _0x4976ec;},_0x53ac4e=(_0x1c0d93,_0x5a0556)=>(_0x5627f3,_0x4d8733)=>_0x5a0556(_0x5627f3,_0x4d8733,_0x1c0d93),_0x4a9f0a=(_0x4aacd0,_0xfe2e41,_0x270485)=>_0x7750d4(_0x4aacd0,typeof _0xfe2e41!=_0x90dff3(0x1ca)?_0xfe2e41+'':_0xfe2e41,_0x270485);_0x374824[_0x90dff3(0x192)]=class extends _0x41e612[_0x90dff3(0x1f6)]{constructor(_0x46b19d=_0x4d4dc6,_0x22212a,_0x13697e){const _0x55c289=_0x90dff3;super(),this[_0x55c289(0x1b2)]=_0x46b19d,this['_injector']=_0x22212a,this[_0x55c289(0x17c)]=_0x13697e;const {..._0x348ac8}=_0x41e612[_0x55c289(0x1ec)]({},_0x4d4dc6,this[_0x55c289(0x1b2)]);this[_0x55c289(0x17c)][_0x55c289(0x1d9)](_0x1e226a,_0x348ac8);}[_0x90dff3(0x195)](){const _0x1be4f4=_0x90dff3;[[_0x1084ba],[_0x1b4466],[_0x3bf950]][_0x1be4f4(0x188)](_0x13e0bb=>{const _0x1018dc=_0x1be4f4;this[_0x1018dc(0x1c2)]['add'](_0x13e0bb);});}[_0x90dff3(0x179)](){const _0x509d7c=_0x90dff3;this[_0x509d7c(0x1c2)][_0x509d7c(0x1b5)](_0x1b4466),this[_0x509d7c(0x1c2)]['get'](_0x3bf950);}},_0x4a9f0a(_0x374824[_0x90dff3(0x192)],_0x90dff3(0x1f1),_0x59cbe7),_0x4a9f0a(_0x374824[_0x90dff3(0x192)],_0x90dff3(0x1fa),_0x41e612[_0x90dff3(0x18c)][_0x90dff3(0x1a9)]),_0x374824[_0x90dff3(0x192)]=_0x354d41([_0x41e612[_0x90dff3(0x1b4)](_0x2416ea[_0x90dff3(0x1a5)],_0x3297fa[_0x90dff3(0x17b)],_0x31c75c[_0x90dff3(0x1d8)]),_0x53ac4e(0x1,_0x41e612[_0x90dff3(0x184)](_0x41e612['Injector'])),_0x53ac4e(0x2,_0x41e612[_0x90dff3(0x1cb)])],_0x374824[_0x90dff3(0x192)]),Object[_0x90dff3(0x181)](_0x374824,Symbol[_0x90dff3(0x186)],{'value':_0x90dff3(0x1b9)});}));function _0x58c1(){const _0x224bdc=['values','DependentOn','get','post','UniverCore','_init','Module','UniverProThreadCommentDatasource','/edit','resolveComment','rxjs','stringify','UNRECOGNIZED','UniverNetwork','bufferTime','_injector','63tPzime','customRanges','YYYY/MM/DD\x20HH:mm','exports','4644424oISlRE','filter','reply','symbol','IConfigService','Injector','Solve','resolved','/universer-api/user/list','createTimestamp','body','_threadCommentModel','getMemberID','object','rangeType','Add','user','UniverLicensePlugin','setConfig','length','unitId','CustomRangeType','Delete','addUser','_initDataSource','updateComment','rangeId','36035mJawTp','CollaborationSessionService','comment','_commentService','code','thread-comment-data-source.config','_httpService','Unknown','@univerjs/network','users','merge','_threadCommentDataSource','/universer-api/comment/unit/','_initUserSync','find','pluginName','UniverProLicense','1129200YTHVOf','Disposable','/list','Plugin','@univerjs/core','threadId','root','type','format','3407634XxptOe','/reply','Reply','map','CommentService','error','onReady','slice','UniverCollaborationClientPlugin','_configService','getUnit','pipe','/delete','getUser','defineProperty','Solved','solved','Inject','replyId','toStringTag','userId','forEach','COMMENT','UniverThreadComment','640103yUAqwY','UniverInstanceType','dayjs','getOwnPropertyDescriptor','7sNZIVe','userID','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','onStarting','subscribe','getCurrentUser','_sessionService','Edit','deleteComment','@univerjs/thread-comment','1207828hORxNW','UniverProCollaborationClient','2682450oFcdwo','_userService','dataSource','parentId','personId','OpenOrReOpen','content','UniverThreadCommentUIPlugin','780wLqIOb','saveCommentToSnapshot','parse','UNIVER_UNKNOWN','/solved','function','commentUpdate$','@univerjs-pro/collaboration-client','replies','delete','@univerjs/thread-comment-ui','/add','_config'];_0x58c1=function(){return _0x224bdc;};return _0x58c1();}
|
|
1
|
+
(function(_0x399842,_0x678b65){const _0x349275=_0x48db,_0xa9a1bb=_0x399842();while(!![]){try{const _0x39f9f7=-parseInt(_0x349275(0x16c))/0x1*(-parseInt(_0x349275(0x1b3))/0x2)+-parseInt(_0x349275(0x190))/0x3+-parseInt(_0x349275(0x19a))/0x4*(parseInt(_0x349275(0x1a9))/0x5)+parseInt(_0x349275(0x177))/0x6*(parseInt(_0x349275(0x15c))/0x7)+parseInt(_0x349275(0x18b))/0x8+parseInt(_0x349275(0x12d))/0x9+parseInt(_0x349275(0x141))/0xa*(-parseInt(_0x349275(0x1ad))/0xb);if(_0x39f9f7===_0x678b65)break;else _0xa9a1bb['push'](_0xa9a1bb['shift']());}catch(_0x3cf7b5){_0xa9a1bb['push'](_0xa9a1bb['shift']());}}}(_0x55dd,0x9bf2f),function(_0x54cc7a,_0x3ff013){const _0x552634=_0x48db;typeof exports==_0x552634(0x156)&&typeof module<'u'?_0x3ff013(exports,require(_0x552634(0x1a6)),require('@univerjs-pro/license'),require(_0x552634(0x185)),require(_0x552634(0x163)),require(_0x552634(0x133)),require(_0x552634(0x1ae)),require('@univerjs/network')):typeof define==_0x552634(0x158)&&define['amd']?define([_0x552634(0x1b9),_0x552634(0x1a6),_0x552634(0x140),'@univerjs/core','@univerjs/thread-comment-ui',_0x552634(0x133),_0x552634(0x1ae),_0x552634(0x169)],_0x3ff013):(_0x54cc7a=typeof globalThis<'u'?globalThis:_0x54cc7a||self,_0x3ff013(_0x54cc7a[_0x552634(0x155)]={},_0x54cc7a[_0x552634(0x18c)],_0x54cc7a[_0x552634(0x171)],_0x54cc7a[_0x552634(0x191)],_0x54cc7a[_0x552634(0x17e)],_0x54cc7a[_0x552634(0x166)],_0x54cc7a[_0x552634(0x1ae)],_0x54cc7a['UniverNetwork']));}(this,function(_0x2fd347,_0x23a190,_0x450f12,_0x31b5ed,_0x1cf185,_0x4be181,_0x5ea329,_0x1acb3){'use strict';const _0x3c1854=_0x48db;const _0x5f4667=_0x3c1854(0x152);var _0x58a685=(_0x2c42da=>(_0x2c42da[_0x2c42da[_0x3c1854(0x12b)]=0x0]=_0x3c1854(0x12b),_0x2c42da[_0x2c42da[_0x3c1854(0x170)]=0x1]=_0x3c1854(0x170),_0x2c42da[_0x2c42da[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x2c42da))(_0x58a685||{}),_0x303ad1=(_0x125df2=>(_0x125df2[_0x125df2[_0x3c1854(0x159)]=0x0]='Unknown',_0x125df2[_0x125df2[_0x3c1854(0x1a7)]=0x1]='Add',_0x125df2[_0x125df2['Reply']=0x2]=_0x3c1854(0x1b7),_0x125df2[_0x125df2[_0x3c1854(0x178)]=0x3]=_0x3c1854(0x178),_0x125df2[_0x125df2[_0x3c1854(0x184)]=0x4]=_0x3c1854(0x184),_0x125df2[_0x125df2[_0x3c1854(0x196)]=0x5]=_0x3c1854(0x196),_0x125df2[_0x125df2[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x125df2))(_0x303ad1||{});const _0x14753e=_0x1184d1=>_0x31b5ed[_0x3c1854(0x161)](new Date(+_0x1184d1))[_0x3c1854(0x18d)](_0x3c1854(0x13c)),_0x5472eb=async(_0x5db649,_0x303d49)=>{const _0x3a1594=_0x3c1854,_0x510118=_0x5db649[_0x3a1594(0x15a)](_0x31b5ed[_0x3a1594(0x135)]),_0x45836c=_0x5db649[_0x3a1594(0x15a)](_0x1acb3[_0x3a1594(0x15b)]);_0x303d49['forEach'](_0x569e18=>{const _0xa620f8=_0x3a1594;_0x510118[_0xa620f8(0x147)](_0x569e18)&&_0x303d49[_0xa620f8(0x19f)](_0x569e18);}),_0x303d49['size']&&(await _0x45836c[_0x3a1594(0x15a)](_0x3a1594(0x16b),{'params':{'userIDs':[..._0x303d49]}}))[_0x3a1594(0x197)][_0x3a1594(0x1b8)][_0x3a1594(0x16f)](_0x4d2760=>{_0x4d2760&&_0x510118['addUser'](_0x4d2760);});};var _0x343e00=Object[_0x3c1854(0x148)],_0x24381b=(_0x182179,_0x3d1fc8,_0x5b731f,_0x32286e)=>{const _0x36983b=_0x3c1854;for(var _0x9ba9b8=_0x32286e>0x1?void 0x0:_0x32286e?_0x343e00(_0x3d1fc8,_0x5b731f):_0x3d1fc8,_0x211770=_0x182179[_0x36983b(0x13a)]-0x1,_0x2a691c;_0x211770>=0x0;_0x211770--)(_0x2a691c=_0x182179[_0x211770])&&(_0x9ba9b8=_0x2a691c(_0x9ba9b8)||_0x9ba9b8);return _0x9ba9b8;},_0x2c86d3=(_0x2b85aa,_0x4e3fd2)=>(_0x424968,_0x337e1c)=>_0x4e3fd2(_0x424968,_0x337e1c,_0x2b85aa);let _0x39bcf5=class extends _0x31b5ed['Disposable']{constructor(_0x217376,_0x26996a,_0x46e95c,_0x8a353c){const _0x3510b0=_0x3c1854;super(),this[_0x3510b0(0x199)]=_0x217376,this[_0x3510b0(0x1b2)]=_0x26996a,this[_0x3510b0(0x168)]=_0x46e95c,this[_0x3510b0(0x189)]=_0x8a353c,this[_0x3510b0(0x130)](),this[_0x3510b0(0x145)]();}[_0x3c1854(0x145)](){const _0x425e60=_0x3c1854;this[_0x425e60(0x17d)](this[_0x425e60(0x1b2)][_0x425e60(0x176)][_0x425e60(0x18e)](_0x5ea329[_0x425e60(0x192)](0x10))[_0x425e60(0x1b1)](_0x3ef80a=>{const _0x42ab36=_0x425e60,_0x5eb31e=new Set();_0x3ef80a[_0x42ab36(0x16f)](_0x3b829e=>{const _0xdd7dd4=_0x42ab36;switch(_0x3b829e[_0xdd7dd4(0x134)]){case _0xdd7dd4(0x12e):{const _0x5f3ac8=_0x3b829e[_0xdd7dd4(0x17b)][_0xdd7dd4(0x14e)];_0x5eb31e[_0xdd7dd4(0x12e)](_0x5f3ac8);break;}}}),_0x5472eb(this[_0x42ab36(0x189)],_0x5eb31e);}));}[_0x3c1854(0x130)](){const _0x2e320a=_0x3c1854;this[_0x2e320a(0x17d)](this[_0x2e320a(0x199)][_0x2e320a(0x176)][_0x2e320a(0x1b1)](async _0x2fd2f7=>{const _0x4c60dd=_0x2e320a;var _0x2da656,_0x91ef1b,_0x247494,_0x5d2257;const _0x1608c6=(_0x2da656=this['_threadCommentModel'][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])['find'](_0x508dcf=>_0x508dcf['threadId']===_0x2fd2f7['threadId']))==null?void 0x0:_0x2da656[_0x4c60dd(0x146)];if(!_0x1608c6)return;const {unitId:_0xbe1311,subUnitId:_0x13b6c}=_0x1608c6;switch(_0x2fd2f7[_0x4c60dd(0x188)]&&this['_userService']['addUser'](_0x2fd2f7['user']),_0x2fd2f7[_0x4c60dd(0x134)]){case _0x303ad1[_0x4c60dd(0x1a7)]:break;case _0x303ad1[_0x4c60dd(0x1b7)]:{this[_0x4c60dd(0x1b2)][_0x4c60dd(0x16a)](_0xbe1311,_0x13b6c,{'unitId':_0xbe1311,'subUnitId':_0x13b6c,'ref':'','id':_0x2fd2f7[_0x4c60dd(0x162)],'dT':_0x14753e(+_0x2fd2f7[_0x4c60dd(0x19b)]),'threadId':_0x2fd2f7[_0x4c60dd(0x1a4)],'personId':(_0x247494=(_0x91ef1b=_0x2fd2f7['user'])==null?void 0x0:_0x91ef1b['userID'])!=null?_0x247494:_0x2fd2f7['userId'],'text':JSON[_0x4c60dd(0x15f)](_0x2fd2f7[_0x4c60dd(0x137)]),'parentId':_0x1608c6['id']});break;}case _0x303ad1[_0x4c60dd(0x184)]:{const _0x5530c9=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19c)](_0xbe1311,_0x13b6c,_0x2fd2f7['replyId']);_0x5530c9&&_0x5530c9[_0x4c60dd(0x160)]&&this[_0x4c60dd(0x1b2)][_0x4c60dd(0x1a0)](_0xbe1311,_0x13b6c,_0x2fd2f7[_0x4c60dd(0x162)]);break;}case _0x303ad1[_0x4c60dd(0x178)]:{this[_0x4c60dd(0x1b2)]['updateComment'](_0xbe1311,_0x13b6c,{'commentId':_0x2fd2f7[_0x4c60dd(0x162)],'text':JSON['parse'](_0x2fd2f7[_0x4c60dd(0x137)])});break;}case _0x303ad1[_0x4c60dd(0x196)]:{const _0x124bb7=(_0x5d2257=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])[_0x4c60dd(0x173)](_0x72b413=>_0x72b413['threadId']===_0x2fd2f7[_0x4c60dd(0x1a4)]))==null?void 0x0:_0x5d2257[_0x4c60dd(0x146)];_0x124bb7&&this[_0x4c60dd(0x1b2)]['resolveComment'](_0xbe1311,_0x13b6c,_0x124bb7['id'],_0x2fd2f7[_0x4c60dd(0x14b)]===_0x58a685[_0x4c60dd(0x170)]);break;}}}));}};_0x39bcf5=_0x24381b([_0x2c86d3(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x13f)])),_0x2c86d3(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x4be181[_0x3c1854(0x13b)])),_0x2c86d3(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['UserManagerService'])),_0x2c86d3(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['Injector']))],_0x39bcf5);const _0x4181c5=_0x3c1854(0x172),_0x1e063c={};var _0x4a23e3=Object[_0x3c1854(0x148)],_0x1d0e4b=(_0x81d9b5,_0x436413,_0x55ca19,_0x25fe95)=>{const _0x24bc8d=_0x3c1854;for(var _0x534a61=_0x25fe95>0x1?void 0x0:_0x25fe95?_0x4a23e3(_0x436413,_0x55ca19):_0x436413,_0x3a03a8=_0x81d9b5[_0x24bc8d(0x13a)]-0x1,_0x145c8a;_0x3a03a8>=0x0;_0x3a03a8--)(_0x145c8a=_0x81d9b5[_0x3a03a8])&&(_0x534a61=_0x145c8a(_0x534a61)||_0x534a61);return _0x534a61;},_0x26aded=(_0x2d7910,_0x5ae583)=>(_0x585d56,_0x5c12bc)=>_0x5ae583(_0x585d56,_0x5c12bc,_0x2d7910);function _0x438791(_0x59c7d3,_0x9897fc){const _0x2445f5=_0x3c1854,_0x3ef798=_0x59c7d3[_0x2445f5(0x139)][0x0];return{..._0x9897fc,'id':_0x3ef798[_0x2445f5(0x162)],'resolved':_0x59c7d3['solved']===0x1,'dT':_0x14753e(_0x3ef798[_0x2445f5(0x19b)]),'personId':_0x3ef798[_0x2445f5(0x186)],'threadId':_0x3ef798[_0x2445f5(0x1a4)]};}function _0x28440b(_0x4953c1,_0x5163f9,_0x3d8607){const _0x21476=_0x3c1854;var _0x1ac6e9,_0x4e6b60;if(((_0x4e6b60=(_0x1ac6e9=_0x4953c1==null?void 0x0:_0x4953c1['replies'])==null?void 0x0:_0x1ac6e9[_0x21476(0x13a)])!=null?_0x4e6b60:0x0)>0x0){const _0x50ad0b=(_0x4ea1ab,_0x474187)=>({'id':_0x4ea1ab[_0x21476(0x162)],'threadId':_0x4ea1ab['threadId'],'dT':_0x14753e(_0x4ea1ab[_0x21476(0x19b)]),'personId':_0x4ea1ab[_0x21476(0x186)],'resolved':_0x4953c1['solved']===_0x58a685[_0x21476(0x170)],'unitId':_0x5163f9,'subUnitId':_0x3d8607,'text':JSON[_0x21476(0x15f)](_0x4ea1ab[_0x21476(0x137)]),'parentId':_0x474187}),_0x5b06cd=_0x50ad0b(_0x4953c1[_0x21476(0x139)][0x0]);return{..._0x5b06cd,'children':_0x4953c1[_0x21476(0x139)][_0x21476(0x1a5)](0x1)[_0x21476(0x182)](_0x2bbb49=>_0x50ad0b(_0x2bbb49,_0x5b06cd['id']))};}return null;}let _0x35de67=class{constructor(_0x59b516,_0x499013,_0x4563ea,_0x25e3c9){const _0x47594e=_0x3c1854;this['_httpService']=_0x59b516,this[_0x47594e(0x168)]=_0x499013,this['_sessionService']=_0x4563ea,this[_0x47594e(0x189)]=_0x25e3c9;}async[_0x3c1854(0x16a)](_0x5c085e){const _0xa79f1a=_0x3c1854;var _0x2d64e8,_0x3f1da8;const {parentId:_0x1c2317,unitId:_0x2cdcdd,text:_0x5744b2,threadId:_0x149cab}=_0x5c085e,_0x3129f4=(_0x3f1da8=(_0x2d64e8=_0x5744b2[_0xa79f1a(0x175)])==null?void 0x0:_0x2d64e8[_0xa79f1a(0x15e)](_0x57aaaf=>_0x57aaaf['rangeType']===_0x31b5ed[_0xa79f1a(0x14f)]['COMMENT'])[_0xa79f1a(0x182)](_0x3f3b6d=>_0x3f3b6d[_0xa79f1a(0x19e)]))!=null?_0x3f1da8:[],_0x181d9c=JSON[_0xa79f1a(0x16e)](_0x5744b2),_0x27d9cf=(await this[_0xa79f1a(0x165)][_0xa79f1a(0x183)](_0x2cdcdd))[_0xa79f1a(0x142)]();if(_0x1c2317){const _0x453bc8={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4,'threadId':_0x149cab},_0x3c5dc6=(await this['_httpService'][_0xa79f1a(0x14d)]('/universer-api/comment/unit/'+_0x2cdcdd+_0xa79f1a(0x14c),{'body':_0x453bc8}))[_0xa79f1a(0x197)][_0xa79f1a(0x1a2)];return{..._0x5c085e,'id':_0x3c5dc6[_0xa79f1a(0x162)],'dT':_0x31b5ed[_0xa79f1a(0x161)](+_0x3c5dc6[_0xa79f1a(0x19b)])[_0xa79f1a(0x18d)](_0xa79f1a(0x13c)),'personId':_0x3c5dc6[_0xa79f1a(0x186)]};}else{const _0x45a774={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4},_0x229231=await this[_0xa79f1a(0x167)][_0xa79f1a(0x14d)](_0xa79f1a(0x154)+_0x2cdcdd+_0xa79f1a(0x1a3),{'body':_0x45a774});return _0x438791(_0x229231[_0xa79f1a(0x197)][_0xa79f1a(0x15d)],_0x5c085e);}}async['updateComment'](_0x48bd5b){const _0x3971bf=_0x3c1854;var _0x2d47a0,_0x182aa6;const {text:_0x3c6cbb,unitId:_0xfa845c}=_0x48bd5b,_0x416bc6=(_0x182aa6=(_0x2d47a0=_0x3c6cbb[_0x3971bf(0x175)])==null?void 0x0:_0x2d47a0['filter'](_0x8c26ca=>_0x8c26ca[_0x3971bf(0x198)]===_0x31b5ed[_0x3971bf(0x14f)][_0x3971bf(0x17a)])[_0x3971bf(0x182)](_0x198d9f=>_0x198d9f['rangeId']))!=null?_0x182aa6:[],_0x59d1b2=JSON[_0x3971bf(0x16e)](_0x3c6cbb),_0x283b84=_0x48bd5b['threadId'],_0x38e2a8=_0x48bd5b['id'],_0x2987b3={'memberId':(await this[_0x3971bf(0x165)][_0x3971bf(0x183)](_0xfa845c))[_0x3971bf(0x142)](),'unitId':_0xfa845c,'threadId':_0x283b84,'mention':_0x416bc6,'content':_0x59d1b2,'replyId':_0x38e2a8},_0x51bb2a=await this['_httpService']['post'](_0x3971bf(0x154)+_0xfa845c+_0x3971bf(0x1a1),{'body':_0x2987b3});return!_0x51bb2a[_0x3971bf(0x197)][_0x3971bf(0x13d)]||_0x51bb2a['body'][_0x3971bf(0x13d)][_0x3971bf(0x143)]===0x1;}async[_0x3c1854(0x138)](_0x3fd858){const _0x5c62ce=_0x3c1854,{unitId:_0x444221}=_0x3fd858,_0x1b51fd=_0x3fd858[_0x5c62ce(0x1a4)],_0x3a0f40={'memberId':this['_userService'][_0x5c62ce(0x151)]()[_0x5c62ce(0x1b5)],'unitId':_0x444221,'threadId':_0x1b51fd,'solved':_0x3fd858[_0x5c62ce(0x1af)]?_0x58a685[_0x5c62ce(0x170)]:_0x58a685[_0x5c62ce(0x12b)]},_0x5251bb=await this[_0x5c62ce(0x167)][_0x5c62ce(0x14d)](_0x5c62ce(0x154)+_0x444221+_0x5c62ce(0x136),{'body':_0x3a0f40});return!_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)]||_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)][_0x5c62ce(0x143)]===0x1;}async['deleteComment'](_0x187ca5,_0xd4397b,_0x427a5e,_0x2f2f44){const _0x1ae570=_0x3c1854,_0x47f304={'memberId':(await this[_0x1ae570(0x165)][_0x1ae570(0x183)](_0x187ca5))[_0x1ae570(0x142)](),'threadId':_0x427a5e,'replyId':_0x2f2f44,'unitId':_0x187ca5},_0x3320f6=await this[_0x1ae570(0x167)][_0x1ae570(0x14d)](_0x1ae570(0x154)+_0x187ca5+_0x1ae570(0x193),{'body':_0x47f304});return!_0x3320f6['body'][_0x1ae570(0x13d)]||_0x3320f6[_0x1ae570(0x197)][_0x1ae570(0x13d)][_0x1ae570(0x143)]===0x1;}async[_0x3c1854(0x194)](_0x544894,_0xa6d5b4,_0x174bdb){const _0x1d8e56=_0x3c1854,_0x1a45a0={'unitId':_0x544894,'threadId':_0x174bdb},_0x2fe925=await this[_0x1d8e56(0x167)][_0x1d8e56(0x14d)]('/universer-api/comment/unit/'+_0x544894+_0x1d8e56(0x180),{'body':_0x1a45a0}),_0x4aa752=_0x174bdb[_0x1d8e56(0x182)](_0x118adb=>_0x28440b(_0x2fe925['body'][_0x1d8e56(0x132)][_0x118adb],_0x544894,_0xa6d5b4))['filter'](Boolean);return Object[_0x1d8e56(0x150)](_0x2fe925['body'][_0x1d8e56(0x1b8)])['forEach'](_0x841bce=>{const _0x17d0ea=_0x1d8e56;this[_0x17d0ea(0x168)][_0x17d0ea(0x195)](_0x841bce);}),_0x4aa752;}[_0x3c1854(0x1ba)](_0xfacb39){const _0x21eee2=_0x3c1854;return{'id':_0xfacb39['id'],'threadId':_0xfacb39[_0x21eee2(0x1a4)],'ref':_0xfacb39[_0x21eee2(0x179)]};}};_0x35de67=_0x1d0e4b([_0x26aded(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x1acb3[_0x3c1854(0x15b)])),_0x26aded(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x135)])),_0x26aded(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x1aa)])),_0x26aded(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x13e)]))],_0x35de67);var _0x204296=Object['getOwnPropertyDescriptor'],_0x5ad891=(_0x184abf,_0x288700,_0x222bb5,_0x3752c7)=>{const _0x4d11cb=_0x3c1854;for(var _0x4af454=_0x3752c7>0x1?void 0x0:_0x3752c7?_0x204296(_0x288700,_0x222bb5):_0x288700,_0x59d982=_0x184abf[_0x4d11cb(0x13a)]-0x1,_0x299281;_0x59d982>=0x0;_0x59d982--)(_0x299281=_0x184abf[_0x59d982])&&(_0x4af454=_0x299281(_0x4af454)||_0x4af454);return _0x4af454;},_0x313e1f=(_0x239ec1,_0x1884e2)=>(_0x11f0f3,_0x51bd37)=>_0x1884e2(_0x11f0f3,_0x51bd37,_0x239ec1);let _0x422b03=class extends _0x31b5ed[_0x3c1854(0x1ac)]{constructor(_0x7365fb,_0x8b25f0){const _0x1e2450=_0x3c1854;super(),this[_0x1e2450(0x1a8)]=_0x7365fb,this['_threadCommentDataSource']=_0x8b25f0,this['_initDataSource']();}[_0x3c1854(0x1ab)](){const _0x281760=_0x3c1854;this[_0x281760(0x1a8)]['dataSource']=this[_0x281760(0x131)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x422b03=_0x5ad891([_0x313e1f(0x0,_0x4be181[_0x3c1854(0x16d)]),_0x313e1f(0x1,_0x31b5ed['Inject'](_0x35de67))],_0x422b03);var _0x55ed3c=Object[_0x3c1854(0x164)],_0x29e6ed=Object[_0x3c1854(0x148)],_0x3028c0=(_0x303be0,_0x4a2aa2,_0x1d6fd8)=>_0x4a2aa2 in _0x303be0?_0x55ed3c(_0x303be0,_0x4a2aa2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d6fd8}):_0x303be0[_0x4a2aa2]=_0x1d6fd8,_0x42f70c=(_0x104b6f,_0x52cc55,_0x1db5b4,_0x367080)=>{const _0x2de97e=_0x3c1854;for(var _0x23cbc4=_0x367080>0x1?void 0x0:_0x367080?_0x29e6ed(_0x52cc55,_0x1db5b4):_0x52cc55,_0x19db4e=_0x104b6f[_0x2de97e(0x13a)]-0x1,_0x43f490;_0x19db4e>=0x0;_0x19db4e--)(_0x43f490=_0x104b6f[_0x19db4e])&&(_0x23cbc4=_0x43f490(_0x23cbc4)||_0x23cbc4);return _0x23cbc4;},_0x3a4ad8=(_0x10949e,_0x515292)=>(_0x5ae607,_0x1b5c44)=>_0x515292(_0x5ae607,_0x1b5c44,_0x10949e),_0xc8db96=(_0x175bb8,_0x3ce3ea,_0xcaa187)=>_0x3028c0(_0x175bb8,typeof _0x3ce3ea!='symbol'?_0x3ce3ea+'':_0x3ce3ea,_0xcaa187);_0x2fd347['UniverThreadCommentDataSourcePlugin']=class extends _0x31b5ed[_0x3c1854(0x14a)]{constructor(_0x10800c=_0x1e063c,_0x5a1b6a,_0x470a96){const _0x1ad798=_0x3c1854;super(),this[_0x1ad798(0x187)]=_0x10800c,this[_0x1ad798(0x189)]=_0x5a1b6a,this[_0x1ad798(0x1b4)]=_0x470a96;const {..._0xc96025}=_0x31b5ed['merge']({},_0x1e063c,this['_config']);this[_0x1ad798(0x1b4)]['setConfig'](_0x4181c5,_0xc96025);}[_0x3c1854(0x157)](){const _0x4a7814=_0x3c1854;[[_0x35de67],[_0x422b03],[_0x39bcf5]][_0x4a7814(0x16f)](_0x191175=>{const _0x24afe1=_0x4a7814;this['_injector'][_0x24afe1(0x12e)](_0x191175);});}[_0x3c1854(0x17f)](){const _0x1c9351=_0x3c1854;this['_injector'][_0x1c9351(0x15a)](_0x422b03),this[_0x1c9351(0x189)][_0x1c9351(0x15a)](_0x39bcf5);}},_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x18a),_0x5f4667),_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x134),_0x31b5ed['UniverInstanceType'][_0x3c1854(0x12f)]),_0x2fd347[_0x3c1854(0x153)]=_0x42f70c([_0x31b5ed[_0x3c1854(0x18f)](_0x1cf185[_0x3c1854(0x1b0)],_0x23a190[_0x3c1854(0x1b6)],_0x450f12['UniverLicensePlugin']),_0x3a4ad8(0x1,_0x31b5ed['Inject'](_0x31b5ed['Injector'])),_0x3a4ad8(0x2,_0x31b5ed[_0x3c1854(0x144)])],_0x2fd347['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2fd347,Symbol[_0x3c1854(0x174)],{'value':_0x3c1854(0x181)});}));function _0x48db(_0x17f3c3,_0x456988){const _0x55dd9e=_0x55dd();return _0x48db=function(_0x48dbab,_0x2d901a){_0x48dbab=_0x48dbab-0x12b;let _0xf0f8e=_0x55dd9e[_0x48dbab];return _0xf0f8e;},_0x48db(_0x17f3c3,_0x456988);}function _0x55dd(){const _0x46068c=['_initUserSync','root','getUser','getOwnPropertyDescriptor','UNRECOGNIZED','Plugin','solved','/reply','post','personId','CustomRangeType','values','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','UniverProThreadCommentDatasource','object','onStarting','function','Unknown','get','HTTPService','98QmqpLQ','comment','filter','parse','parentId','dayjs','replyId','@univerjs/thread-comment-ui','defineProperty','_sessionService','UniverThreadComment','_httpService','_userService','@univerjs/network','addComment','/universer-api/user/list','245842BVoOqQ','IThreadCommentDataSourceService','stringify','forEach','Solved','UniverProLicense','thread-comment-data-source.config','find','toStringTag','customRanges','commentUpdate$','447654EBWXiv','Edit','ref','COMMENT','payload','unitId','disposeWithMe','UniverThreadCommentUi','onReady','/list','Module','map','requireSession','Delete','@univerjs/core','userId','_config','user','_injector','pluginName','8585328ONQEHG','UniverProCollaborationClient','format','pipe','DependentOn','2297919bCMUqP','UniverCore','bufferTime','/delete','listComments','addUser','Solve','body','rangeType','_commentService','8OnKxTG','createTimestamp','getComment','getUnit','rangeId','delete','deleteComment','/edit','reply','/add','threadId','slice','@univerjs-pro/collaboration-client','Add','_threadCommentDataSourceService','896840EEHYdE','CollaborationSessionService','_initDataSource','Disposable','15464086qSCojv','rxjs','resolved','UniverThreadCommentUIPlugin','subscribe','_threadCommentModel','10SIUFNJ','_configService','userID','UniverCollaborationClientPlugin','Reply','users','exports','saveCommentToSnapshot','OpenOrReOpen','Inject','11054034qJBijR','add','UNIVER_UNKNOWN','_init','_threadCommentDataSource','comments','@univerjs/thread-comment','type','UserManagerService','/solved','content','resolveComment','replies','length','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','error','Injector','CommentService','@univerjs-pro/license','20CzXvlc','getMemberID','code','IConfigService'];_0x55dd=function(){return _0x46068c;};return _0x55dd();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.1-nightly.
|
|
3
|
+
"version": "0.8.1-nightly.202506141606",
|
|
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.8.1-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.1-nightly.
|
|
50
|
-
"@univerjs/core": "0.8.1-nightly.202506121607",
|
|
51
|
-
"@univerjs/network": "0.8.1-nightly.202506121607",
|
|
52
|
-
"@univerjs/thread-comment": "0.8.1-nightly.202506121607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.1-nightly.202506141606",
|
|
49
|
+
"@univerjs-pro/license": "0.8.1-nightly.202506141606",
|
|
53
50
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/
|
|
51
|
+
"@univerjs/network": "0.8.1-nightly.202506141606",
|
|
52
|
+
"@univerjs/core": "0.8.1-nightly.202506141606",
|
|
53
|
+
"@univerjs/thread-comment": "0.8.1-nightly.202506141606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506141606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
|
-
"vitest": "^3.2.
|
|
60
|
+
"vitest": "^3.2.3",
|
|
61
61
|
"@univerjs-infra/shared": "0.8.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|