@univerjs-pro/thread-comment-datasource 0.23.0 → 0.24.0
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 +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16b441=_0x41c5;(function(_0x528cf4,_0xdc50e6){const _0x35128c=_0x41c5,_0x4f92c2=_0x528cf4();while(!![]){try{const _0x357cba=-parseInt(_0x35128c(0x122))/0x1+-parseInt(_0x35128c(0x10f))/0x2+-parseInt(_0x35128c(0xed))/0x3*(-parseInt(_0x35128c(0x101))/0x4)+-parseInt(_0x35128c(0xf7))/0x5*(-parseInt(_0x35128c(0x10e))/0x6)+parseInt(_0x35128c(0xdd))/0x7+parseInt(_0x35128c(0xee))/0x8+-parseInt(_0x35128c(0x10a))/0x9;if(_0x357cba===_0xdc50e6)break;else _0x4f92c2['push'](_0x4f92c2['shift']());}catch(_0x378014){_0x4f92c2['push'](_0x4f92c2['shift']());}}}(_0x3b8e,0x19629),Object[_0x16b441(0xd6)](exports,Symbol['toStringTag'],{'value':_0x16b441(0xff)}));function _0x41c5(_0x4cc7da,_0x53c7c4){_0x4cc7da=_0x4cc7da-0xd1;const _0x3b8ebb=_0x3b8e();let _0x41c5ab=_0x3b8ebb[_0x4cc7da];return _0x41c5ab;}let e=require(`@univerjs-pro/collaboration-client`),t=require(`@univerjs-pro/license`),n=require(`@univerjs/core`),r=require(`@univerjs/thread-comment-ui`),i=require(`@univerjs/protocol`),a=require(`@univerjs/thread-comment`),o=require(`rxjs`),s=require(`@univerjs/network`);var c=_0x16b441(0xfc),l=_0x16b441(0x147);const u=_0x398d90=>(0x0,n[_0x16b441(0x124)])(new Date(+_0x398d90))[_0x16b441(0x14e)](_0x16b441(0x143)),d=async(_0x1373af,_0x5083aa)=>{const _0x15d6a2=_0x16b441;let _0x2ba683=_0x1373af[_0x15d6a2(0xfd)](n[_0x15d6a2(0x112)]),_0x1daaed=_0x1373af[_0x15d6a2(0xfd)](s[_0x15d6a2(0x12d)]);_0x5083aa[_0x15d6a2(0x137)](_0x168cb2=>{const _0x1f7a84=_0x15d6a2;_0x2ba683['getUser'](_0x168cb2)&&_0x5083aa[_0x1f7a84(0xde)](_0x168cb2);}),_0x5083aa['size']&&(await _0x1daaed[_0x15d6a2(0xfd)](_0x15d6a2(0xec),{'params':{'userIDs':[..._0x5083aa]}}))[_0x15d6a2(0xf2)][_0x15d6a2(0xe9)][_0x15d6a2(0x137)](_0x1992ec=>{const _0x10d4bb=_0x15d6a2;_0x1992ec&&_0x2ba683[_0x10d4bb(0x140)](_0x1992ec);});};function f(_0x4e11fc,_0xea9727){return function(_0x342db3,_0x1fe965){_0xea9727(_0x342db3,_0x1fe965,_0x4e11fc);};}function p(_0x2270d6,_0x18d3af,_0x5a43d8,_0x198b5a){const _0x199fee=_0x16b441;var _0x4317e9=arguments['length'],_0x2b18ec=_0x4317e9<0x3?_0x18d3af:_0x198b5a===null?_0x198b5a=Object[_0x199fee(0x103)](_0x18d3af,_0x5a43d8):_0x198b5a,_0x8c718d;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x2b18ec=Reflect['decorate'](_0x2270d6,_0x18d3af,_0x5a43d8,_0x198b5a);else{for(var _0x5b418e=_0x2270d6[_0x199fee(0x123)]-0x1;_0x5b418e>=0x0;_0x5b418e--)(_0x8c718d=_0x2270d6[_0x5b418e])&&(_0x2b18ec=(_0x4317e9<0x3?_0x8c718d(_0x2b18ec):_0x4317e9>0x3?_0x8c718d(_0x18d3af,_0x5a43d8,_0x2b18ec):_0x8c718d(_0x18d3af,_0x5a43d8))||_0x2b18ec);}return _0x4317e9>0x3&&_0x2b18ec&&Object[_0x199fee(0xd6)](_0x18d3af,_0x5a43d8,_0x2b18ec),_0x2b18ec;}let m=class extends n[_0x16b441(0x14a)]{constructor(_0x223a6e,_0x32d70a,_0x219665,_0x52abbb){const _0x10e1a4=_0x16b441;super(),this[_0x10e1a4(0x108)]=_0x223a6e,this[_0x10e1a4(0x100)]=_0x32d70a,this['_userService']=_0x219665,this[_0x10e1a4(0xea)]=_0x52abbb,this[_0x10e1a4(0x145)](),this[_0x10e1a4(0x14c)]();}[_0x16b441(0x14c)](){const _0x533619=_0x16b441;this[_0x533619(0x12c)](this[_0x533619(0x100)][_0x533619(0x10b)][_0x533619(0x120)]((0x0,o['bufferTime'])(0x10))['subscribe'](_0x4d05cd=>{const _0x2e99da=_0x533619;let _0x111504=new Set();_0x4d05cd[_0x2e99da(0x137)](_0xe1faa9=>{const _0x2616e6=_0x2e99da;switch(_0xe1faa9[_0x2616e6(0xf8)]){case _0x2616e6(0xfb):{let _0x17df41=_0xe1faa9[_0x2616e6(0x11c)]['personId'];_0x111504[_0x2616e6(0xfb)](_0x17df41);break;}default:break;}}),d(this[_0x2e99da(0xea)],_0x111504);}));}[_0x16b441(0x145)](){const _0x547315=_0x16b441;this[_0x547315(0x12c)](this[_0x547315(0x108)]['commentUpdate$'][_0x547315(0xdf)](async _0x41b1f1=>{const _0xe8e5dc=_0x547315;var _0x3b7008;let _0x476a49=(_0x3b7008=this[_0xe8e5dc(0x100)][_0xe8e5dc(0xef)](_0x41b1f1[_0xe8e5dc(0x133)])[_0xe8e5dc(0x138)](_0x73ecab=>_0x73ecab[_0xe8e5dc(0x14d)]===_0x41b1f1[_0xe8e5dc(0x14d)]))==null?void 0x0:_0x3b7008[_0xe8e5dc(0xe6)];if(!_0x476a49)return;let {unitId:_0x2dcaa4,subUnitId:_0x5580c2}=_0x476a49;switch(_0x41b1f1['user']&&this[_0xe8e5dc(0x13c)]['addUser'](_0x41b1f1[_0xe8e5dc(0xd4)]),_0x41b1f1[_0xe8e5dc(0xf8)]){case i[_0xe8e5dc(0xeb)][_0xe8e5dc(0x13b)]:break;case i['CommentUpdateEventType'][_0xe8e5dc(0xe1)]:var _0x58cf0a,_0x3f8e82;this[_0xe8e5dc(0x100)][_0xe8e5dc(0xd8)](_0x2dcaa4,_0x5580c2,{'unitId':_0x2dcaa4,'subUnitId':_0x5580c2,'ref':'','id':_0x41b1f1['replyId'],'dT':u(+_0x41b1f1[_0xe8e5dc(0x132)]),'threadId':_0x41b1f1[_0xe8e5dc(0x14d)],'personId':(_0x58cf0a=(_0x3f8e82=_0x41b1f1[_0xe8e5dc(0xd4)])==null?void 0x0:_0x3f8e82['userID'])==null?_0x41b1f1[_0xe8e5dc(0x118)]:_0x58cf0a,'text':JSON[_0xe8e5dc(0x127)](_0x41b1f1[_0xe8e5dc(0x10c)]),'parentId':_0x476a49['id']});break;case i['CommentUpdateEventType'][_0xe8e5dc(0x114)]:{let _0xdd802d=this[_0xe8e5dc(0x100)][_0xe8e5dc(0xd5)](_0x2dcaa4,_0x5580c2,_0x41b1f1[_0xe8e5dc(0xf6)]);_0xdd802d&&_0xdd802d['parentId']&&this['_threadCommentModel'][_0xe8e5dc(0x13a)](_0x2dcaa4,_0x5580c2,_0x41b1f1[_0xe8e5dc(0xf6)]);break;}case i[_0xe8e5dc(0xeb)]['Edit']:this[_0xe8e5dc(0x100)][_0xe8e5dc(0x146)](_0x2dcaa4,_0x5580c2,{'commentId':_0x41b1f1[_0xe8e5dc(0xf6)],'text':JSON[_0xe8e5dc(0x127)](_0x41b1f1[_0xe8e5dc(0x10c)])});break;case i[_0xe8e5dc(0xeb)][_0xe8e5dc(0x12a)]:{var _0x450098;let _0x4311c7=(_0x450098=this['_threadCommentModel']['getUnit'](_0x41b1f1[_0xe8e5dc(0x133)])['find'](_0x1da20e=>_0x1da20e[_0xe8e5dc(0x14d)]===_0x41b1f1[_0xe8e5dc(0x14d)]))==null?void 0x0:_0x450098[_0xe8e5dc(0xe6)];_0x4311c7&&this[_0xe8e5dc(0x100)][_0xe8e5dc(0x11e)](_0x2dcaa4,_0x5580c2,_0x4311c7['id'],_0x41b1f1['solved']===i['CommentSolvedStatus']['Solved']);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x16b441(0x11f)])(e[_0x16b441(0x111)])),f(0x1,(0x0,n['Inject'])(a['ThreadCommentModel'])),f(0x2,(0x0,n[_0x16b441(0x11f)])(n[_0x16b441(0x112)])),f(0x3,(0x0,n[_0x16b441(0x11f)])(n[_0x16b441(0xd2)]))],m);const h=_0x16b441(0x149);Symbol(h);const g={};function _(_0x534d84,_0x2a6808){const _0x4f8ae7=_0x16b441;let _0x317763=_0x534d84['replies'][0x0];return{..._0x2a6808,'id':_0x317763[_0x4f8ae7(0xf6)],'resolved':_0x534d84['solved']===0x1,'dT':u(_0x317763[_0x4f8ae7(0x132)]),'personId':_0x317763[_0x4f8ae7(0x118)],'threadId':_0x317763[_0x4f8ae7(0x14d)]};}function v(_0x366c86,_0xc2bf75,_0x1b3c32){const _0x268cc8=_0x16b441;var _0x12e69a,_0x15e867;if(((_0x12e69a=_0x366c86==null||(_0x15e867=_0x366c86[_0x268cc8(0x115)])==null?void 0x0:_0x15e867[_0x268cc8(0x123)])==null?0x0:_0x12e69a)>0x0){let _0x4c7956=(_0x4aebcf,_0x3c5dc1)=>({'id':_0x4aebcf[_0x268cc8(0xf6)],'threadId':_0x4aebcf[_0x268cc8(0x14d)],'dT':u(_0x4aebcf[_0x268cc8(0x132)]),'personId':_0x4aebcf[_0x268cc8(0x118)],'resolved':_0x366c86[_0x268cc8(0x10d)]===i[_0x268cc8(0xe5)]['Solved'],'unitId':_0xc2bf75,'subUnitId':_0x1b3c32,'text':JSON[_0x268cc8(0x127)](_0x4aebcf[_0x268cc8(0x10c)]),'parentId':_0x3c5dc1}),_0x431d5b=_0x4c7956(_0x366c86[_0x268cc8(0x115)][0x0]);return{..._0x431d5b,'children':_0x366c86[_0x268cc8(0x115)][_0x268cc8(0xd1)](0x1)['map'](_0x2857bf=>_0x4c7956(_0x2857bf,_0x431d5b['id']))};}return null;}let y=class{constructor(_0xb839d4,_0x13c490,_0x39bc98){const _0x5a6059=_0x16b441;this[_0x5a6059(0x125)]=_0xb839d4,this[_0x5a6059(0x13c)]=_0x13c490,this['_sessionService']=_0x39bc98;}async[_0x16b441(0xd8)](_0x2f2ed0){const _0x2c41fb=_0x16b441;var _0x10d924,_0x594a7d;let {parentId:_0x4eb2cb,unitId:_0x40c81d,text:_0x55f279,threadId:_0x159302}=_0x2f2ed0,_0x921de6=(_0x10d924=(_0x594a7d=_0x55f279[_0x2c41fb(0x148)])==null?void 0x0:_0x594a7d[_0x2c41fb(0xf0)](_0x4fd7d1=>_0x4fd7d1[_0x2c41fb(0xf1)]===n[_0x2c41fb(0x110)]['COMMENT'])['map'](_0x4db513=>_0x4db513['rangeId']))==null?[]:_0x10d924,_0x1b4f14=JSON[_0x2c41fb(0x11a)](_0x55f279),_0xc7cb66=(await this[_0x2c41fb(0x134)][_0x2c41fb(0xf3)](_0x40c81d))['getMemberID']();if(_0x4eb2cb){let _0x55515e={'memberId':_0xc7cb66,'unitId':_0x40c81d,'content':_0x1b4f14,'mention':_0x921de6,'threadId':_0x159302},_0x3e271c=(await this[_0x2c41fb(0x125)][_0x2c41fb(0x105)]('/universer-api/comment/unit/'+_0x40c81d+'/reply',{'body':_0x55515e}))[_0x2c41fb(0xf2)][_0x2c41fb(0xf9)];return{..._0x2f2ed0,'id':_0x3e271c['replyId'],'dT':(0x0,n[_0x2c41fb(0x124)])(+_0x3e271c[_0x2c41fb(0x132)])[_0x2c41fb(0x14e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e271c[_0x2c41fb(0x118)]};}else{let _0x489e09={'memberId':_0xc7cb66,'unitId':_0x40c81d,'content':_0x1b4f14,'mention':_0x921de6};return _((await this[_0x2c41fb(0x125)][_0x2c41fb(0x105)]('/universer-api/comment/unit/'+_0x40c81d+_0x2c41fb(0x142),{'body':_0x489e09}))['body'][_0x2c41fb(0xfa)],_0x2f2ed0);}}async[_0x16b441(0x146)](_0x16596b){const _0x40e8e1=_0x16b441;var _0x35c4d5,_0x146611;let {text:_0x4f1942,unitId:_0x4572cb}=_0x16596b,_0x1accaa=(_0x35c4d5=(_0x146611=_0x4f1942['customRanges'])==null?void 0x0:_0x146611[_0x40e8e1(0xf0)](_0x2323a3=>_0x2323a3[_0x40e8e1(0xf1)]===n[_0x40e8e1(0x110)][_0x40e8e1(0x117)])[_0x40e8e1(0x119)](_0x5c5e95=>_0x5c5e95[_0x40e8e1(0x12e)]))==null?[]:_0x35c4d5,_0x21613e=JSON[_0x40e8e1(0x11a)](_0x4f1942),_0x12a212=_0x16596b[_0x40e8e1(0x14d)],_0x323bc0=_0x16596b['id'],_0x3b7fca={'memberId':(await this[_0x40e8e1(0x134)]['requireSession'](_0x4572cb))[_0x40e8e1(0xd7)](),'unitId':_0x4572cb,'threadId':_0x12a212,'mention':_0x1accaa,'content':_0x21613e,'replyId':_0x323bc0},_0xaca428=await this[_0x40e8e1(0x125)][_0x40e8e1(0x105)]('/universer-api/comment/unit/'+_0x4572cb+_0x40e8e1(0x12f),{'body':_0x3b7fca});return!_0xaca428['body'][_0x40e8e1(0x131)]||_0xaca428[_0x40e8e1(0xf2)][_0x40e8e1(0x131)][_0x40e8e1(0x107)]===0x1;}async[_0x16b441(0x11e)](_0x3fc663){const _0x3dc0b5=_0x16b441;let {unitId:_0x3f4114}=_0x3fc663,_0x2e8c60=_0x3fc663[_0x3dc0b5(0x14d)],_0x47dd02={'memberId':this['_userService'][_0x3dc0b5(0x144)]()['userID'],'unitId':_0x3f4114,'threadId':_0x2e8c60,'solved':_0x3fc663['resolved']?i[_0x3dc0b5(0xe5)][_0x3dc0b5(0x130)]:i[_0x3dc0b5(0xe5)]['OpenOrReOpen']},_0x514e77=await this[_0x3dc0b5(0x125)]['post'](_0x3dc0b5(0xe8)+_0x3f4114+_0x3dc0b5(0x135),{'body':_0x47dd02});return!_0x514e77[_0x3dc0b5(0xf2)][_0x3dc0b5(0x131)]||_0x514e77['body'][_0x3dc0b5(0x131)][_0x3dc0b5(0x107)]===0x1;}async[_0x16b441(0x13a)](_0x285ca4,_0x2ba32d,_0x5b201e,_0x56fa5a){const _0x324b9d=_0x16b441;let _0x2a3704={'memberId':(await this[_0x324b9d(0x134)][_0x324b9d(0xf3)](_0x285ca4))[_0x324b9d(0xd7)](),'threadId':_0x5b201e,'replyId':_0x56fa5a,'unitId':_0x285ca4},_0x427fea=await this['_httpService'][_0x324b9d(0x105)](_0x324b9d(0xe8)+_0x285ca4+_0x324b9d(0xf5),{'body':_0x2a3704});return!_0x427fea['body'][_0x324b9d(0x131)]||_0x427fea[_0x324b9d(0xf2)][_0x324b9d(0x131)][_0x324b9d(0x107)]===0x1;}async[_0x16b441(0x116)](_0x378e88,_0x3f505f,_0x1680e6){const _0x4a2955=_0x16b441;let _0x44569d={'unitId':_0x378e88,'threadId':_0x1680e6},_0x6507f3=await this[_0x4a2955(0x125)][_0x4a2955(0x105)](_0x4a2955(0xe8)+_0x378e88+_0x4a2955(0xda),{'body':_0x44569d}),_0x1c59f6=_0x1680e6['map'](_0x146401=>v(_0x6507f3['body'][_0x4a2955(0xd3)][_0x146401],_0x378e88,_0x3f505f))[_0x4a2955(0xf0)](Boolean);return Object[_0x4a2955(0xd9)](_0x6507f3['body'][_0x4a2955(0xe9)])[_0x4a2955(0x137)](_0x43eb2f=>{const _0x1fcfe4=_0x4a2955;this[_0x1fcfe4(0x13c)][_0x1fcfe4(0x140)](_0x43eb2f);}),_0x1c59f6;}[_0x16b441(0x141)](_0x5dc810){const _0x28a3da=_0x16b441;return{'id':_0x5dc810['id'],'threadId':_0x5dc810[_0x28a3da(0x14d)],'ref':_0x5dc810[_0x28a3da(0xdc)]};}};y=p([f(0x0,(0x0,n[_0x16b441(0x11f)])(s[_0x16b441(0x12d)])),f(0x1,(0x0,n['Inject'])(n['UserManagerService'])),f(0x2,(0x0,n[_0x16b441(0x11f)])(e[_0x16b441(0x136)]))],y);function _0x3b8e(){const _0x1d5cbe=['Module','_threadCommentModel','2748aIJbRR','default','getOwnPropertyDescriptor','pluginName','post','_configService','code','_commentService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','1532934SmuVoe','commentUpdate$','content','solved','661506VRtlBF','312980JosAcK','CustomRangeType','CommentService','UserManagerService','object','Delete','replies','listComments','COMMENT','userId','map','stringify','UniverLicensePlugin','payload','syncUpdateMutationToColla','resolveComment','Inject','pipe','DependentOn','188389oYIqqr','length','dateKit','_httpService','dataSource','parse','toPrimitive','_threadCommentDataSourceService','Solve','Plugin','disposeWithMe','HTTPService','rangeId','/edit','Solved','error','createTimestamp','unitId','_sessionService','/solved','CollaborationSessionService','forEach','find','function','deleteComment','Add','_userService','prototype','onReady','_threadCommentDataSource','addUser','saveCommentToSnapshot','/add','YYYY/MM/DD\x20HH:mm','getCurrentUser','_init','updateComment','0.23.0','customRanges','thread-comment-data-source.config','Disposable','_initDataSource','_initUserSync','threadId','format','slice','Injector','comments','user','getComment','defineProperty','getMemberID','addComment','values','/list','packageName','ref','1206394GgVseu','delete','subscribe','_config','Reply','symbol','IThreadCommentDataSourceService','constructor','CommentSolvedStatus','root','string','/universer-api/comment/unit/','users','_injector','CommentUpdateEventType','/universer-api/user/list','597EvjWGy','1599008prdBVW','getUnit','filter','rangeType','body','requireSession','onStarting','/delete','replyId','5oDfotb','type','reply','comment','add','@univerjs-pro/thread-comment-datasource','get','UniverThreadCommentDataSourcePlugin'];_0x3b8e=function(){return _0x1d5cbe;};return _0x3b8e();}let b=class extends n[_0x16b441(0x14a)]{constructor(_0x44edb7,_0x32ab64){const _0x13fa2a=_0x16b441;super(),this[_0x13fa2a(0x129)]=_0x44edb7,this[_0x13fa2a(0x13f)]=_0x32ab64,this[_0x13fa2a(0x14b)]();}[_0x16b441(0x14b)](){const _0x22e4cb=_0x16b441;this[_0x22e4cb(0x129)][_0x22e4cb(0x126)]=this['_threadCommentDataSource'],this[_0x22e4cb(0x129)][_0x22e4cb(0x11d)]=!0x1;}};b=p([f(0x0,a[_0x16b441(0xe3)]),f(0x1,(0x0,n['Inject'])(y))],b);function x(_0x24c5d1){'@babel/helpers - typeof';const _0x54f244=_0x16b441;return x=typeof Symbol==_0x54f244(0x139)&&typeof Symbol['iterator']==_0x54f244(0xe2)?function(_0x265894){return typeof _0x265894;}:function(_0x70df68){const _0x4c6667=_0x54f244;return _0x70df68&&typeof Symbol==_0x4c6667(0x139)&&_0x70df68[_0x4c6667(0xe4)]===Symbol&&_0x70df68!==Symbol[_0x4c6667(0x13d)]?_0x4c6667(0xe2):typeof _0x70df68;},x(_0x24c5d1);}function S(_0x470c01,_0x419809){const _0x201b62=_0x16b441;if(x(_0x470c01)!='object'||!_0x470c01)return _0x470c01;var _0xca08e1=_0x470c01[Symbol[_0x201b62(0x128)]];if(_0xca08e1!==void 0x0){var _0x6c8edb=_0xca08e1['call'](_0x470c01,_0x419809||_0x201b62(0x102));if(x(_0x6c8edb)!=_0x201b62(0x113))return _0x6c8edb;throw TypeError(_0x201b62(0x109));}return(_0x419809===_0x201b62(0xe7)?String:Number)(_0x470c01);}function C(_0x57944a){const _0x445a48=_0x16b441;var _0x124d23=S(_0x57944a,_0x445a48(0xe7));return x(_0x124d23)==_0x445a48(0xe2)?_0x124d23:_0x124d23+'';}function w(_0x59e9dd,_0x28d980,_0x5acfde){const _0x46d201=_0x16b441;return(_0x28d980=C(_0x28d980))in _0x59e9dd?Object[_0x46d201(0xd6)](_0x59e9dd,_0x28d980,{'value':_0x5acfde,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x59e9dd[_0x28d980]=_0x5acfde,_0x59e9dd;}let T=class extends n[_0x16b441(0x12b)]{constructor(_0xd15f6b=g,_0x34fb8e,_0x666a45){const _0x2fae5f=_0x16b441;super(),this['_config']=_0xd15f6b,this['_injector']=_0x34fb8e,this[_0x2fae5f(0x106)]=_0x666a45;let {..._0xb6f0e9}=(0x0,n['merge'])({},g,this[_0x2fae5f(0xe0)]);this[_0x2fae5f(0x106)]['setConfig'](h,_0xb6f0e9);}[_0x16b441(0xf4)](){[[y],[b],[m]]['forEach'](_0x859e2e=>{const _0x130d1b=_0x41c5;this[_0x130d1b(0xea)][_0x130d1b(0xfb)](_0x859e2e);});}[_0x16b441(0x13e)](){const _0x26c6ba=_0x16b441;this[_0x26c6ba(0xea)][_0x26c6ba(0xfd)](b),this['_injector'][_0x26c6ba(0xfd)](m);}};w(T,_0x16b441(0x104),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),w(T,_0x16b441(0xdb),c),w(T,'version',l),T=p([(0x0,n[_0x16b441(0x121)])(r['UniverThreadCommentUIPlugin'],e['UniverCollaborationClientPlugin'],t[_0x16b441(0x11b)]),f(0x1,(0x0,n[_0x16b441(0x11f)])(n[_0x16b441(0xd2)])),f(0x2,n['IConfigService'])],T),Object[_0x16b441(0xd6)](exports,_0x16b441(0xfe),{'enumerable':!0x0,'get':function(){return T;}});
|
|
1
|
+
const _0x4e8059=_0x23bf;(function(_0xbcf9ca,_0xb49e82){const _0x855c97=_0x23bf,_0x3af9c6=_0xbcf9ca();while(!![]){try{const _0x165ed1=-parseInt(_0x855c97(0xf8))/0x1+parseInt(_0x855c97(0x12e))/0x2+-parseInt(_0x855c97(0x140))/0x3+-parseInt(_0x855c97(0x11b))/0x4+parseInt(_0x855c97(0x161))/0x5+-parseInt(_0x855c97(0x14f))/0x6*(-parseInt(_0x855c97(0x10f))/0x7)+-parseInt(_0x855c97(0x120))/0x8*(-parseInt(_0x855c97(0x156))/0x9);if(_0x165ed1===_0xb49e82)break;else _0x3af9c6['push'](_0x3af9c6['shift']());}catch(_0x190294){_0x3af9c6['push'](_0x3af9c6['shift']());}}}(_0xc8bc,0xd8ef5),Object[_0x4e8059(0x10e)](exports,Symbol[_0x4e8059(0x160)],{'value':_0x4e8059(0x158)}));function _0x23bf(_0x2ea274,_0x104ec5){_0x2ea274=_0x2ea274-0xf1;const _0xc8bcba=_0xc8bc();let _0x23bfcc=_0xc8bcba[_0x2ea274];return _0x23bfcc;}let e=require(`@univerjs-pro/collaboration-client`),t=require(`@univerjs-pro/license`),n=require(`@univerjs/core`),r=require(`@univerjs/thread-comment-ui`),i=require(`@univerjs/protocol`),a=require(`@univerjs/thread-comment`),o=require(`rxjs`),s=require(`@univerjs/network`);var c=_0x4e8059(0x150),l='0.24.0';const u=_0x4da32c=>(0x0,n[_0x4e8059(0x12f)])(new Date(+_0x4da32c))[_0x4e8059(0x13a)](_0x4e8059(0x165)),d=async(_0x4d0d5a,_0x24e762)=>{const _0x49823c=_0x4e8059;let _0x480cc0=_0x4d0d5a[_0x49823c(0x12c)](n[_0x49823c(0x13d)]),_0x3584ec=_0x4d0d5a[_0x49823c(0x12c)](s['HTTPService']);_0x24e762[_0x49823c(0x14c)](_0x3b6ee7=>{const _0x43bd03=_0x49823c;_0x480cc0['getUser'](_0x3b6ee7)&&_0x24e762[_0x43bd03(0x106)](_0x3b6ee7);}),_0x24e762[_0x49823c(0x128)]&&(await _0x3584ec['get'](_0x49823c(0x14a),{'params':{'userIDs':[..._0x24e762]}}))[_0x49823c(0x16e)][_0x49823c(0x147)][_0x49823c(0x14c)](_0x6bed80=>{const _0x12a6bf=_0x49823c;_0x6bed80&&_0x480cc0[_0x12a6bf(0x143)](_0x6bed80);});};function f(_0x2a0fdc,_0x42beba){return function(_0x1c4132,_0x23dddc){_0x42beba(_0x1c4132,_0x23dddc,_0x2a0fdc);};}function p(_0x4111d9,_0xc1850f,_0x38c507,_0x2b76d7){const _0x145c99=_0x4e8059;var _0xbdb3a8=arguments[_0x145c99(0x14e)],_0x443593=_0xbdb3a8<0x3?_0xc1850f:_0x2b76d7===null?_0x2b76d7=Object[_0x145c99(0x129)](_0xc1850f,_0x38c507):_0x2b76d7,_0x3049a0;if(typeof Reflect==_0x145c99(0x16d)&&typeof Reflect[_0x145c99(0x11d)]==_0x145c99(0xf4))_0x443593=Reflect[_0x145c99(0x11d)](_0x4111d9,_0xc1850f,_0x38c507,_0x2b76d7);else{for(var _0x57a297=_0x4111d9[_0x145c99(0x14e)]-0x1;_0x57a297>=0x0;_0x57a297--)(_0x3049a0=_0x4111d9[_0x57a297])&&(_0x443593=(_0xbdb3a8<0x3?_0x3049a0(_0x443593):_0xbdb3a8>0x3?_0x3049a0(_0xc1850f,_0x38c507,_0x443593):_0x3049a0(_0xc1850f,_0x38c507))||_0x443593);}return _0xbdb3a8>0x3&&_0x443593&&Object['defineProperty'](_0xc1850f,_0x38c507,_0x443593),_0x443593;}let m=class extends n[_0x4e8059(0x139)]{constructor(_0x588023,_0x223824,_0x3b3dd3,_0xe92b55){const _0x8633b7=_0x4e8059;super(),this[_0x8633b7(0x169)]=_0x588023,this['_threadCommentModel']=_0x223824,this[_0x8633b7(0x155)]=_0x3b3dd3,this[_0x8633b7(0x136)]=_0xe92b55,this['_init'](),this['_initUserSync']();}[_0x4e8059(0x102)](){const _0x333ba9=_0x4e8059;this['disposeWithMe'](this[_0x333ba9(0x10b)][_0x333ba9(0xfa)][_0x333ba9(0x132)]((0x0,o[_0x333ba9(0x113)])(0x10))[_0x333ba9(0x170)](_0x5b648d=>{const _0x2e640c=_0x333ba9;let _0x59bdf5=new Set();_0x5b648d['forEach'](_0x38e99e=>{const _0x20c35f=_0x23bf;switch(_0x38e99e[_0x20c35f(0x16f)]){case _0x20c35f(0x13f):{let _0xda62dc=_0x38e99e[_0x20c35f(0x12b)][_0x20c35f(0x13e)];_0x59bdf5['add'](_0xda62dc);break;}default:break;}}),d(this[_0x2e640c(0x136)],_0x59bdf5);}));}[_0x4e8059(0x162)](){const _0x471dba=_0x4e8059;this[_0x471dba(0x101)](this[_0x471dba(0x169)][_0x471dba(0xfa)][_0x471dba(0x170)](async _0x447e70=>{const _0xebe350=_0x471dba;var _0x5e7361;let _0x5bd10c=(_0x5e7361=this[_0xebe350(0x10b)][_0xebe350(0x15e)](_0x447e70[_0xebe350(0x15b)])[_0xebe350(0x124)](_0x55e7c4=>_0x55e7c4[_0xebe350(0xf7)]===_0x447e70[_0xebe350(0xf7)]))==null?void 0x0:_0x5e7361[_0xebe350(0xfd)];if(!_0x5bd10c)return;let {unitId:_0x48c082,subUnitId:_0x392539}=_0x5bd10c;switch(_0x447e70['user']&&this[_0xebe350(0x155)][_0xebe350(0x143)](_0x447e70[_0xebe350(0x112)]),_0x447e70[_0xebe350(0x16f)]){case i[_0xebe350(0x10c)][_0xebe350(0x15c)]:break;case i['CommentUpdateEventType'][_0xebe350(0x126)]:var _0x1381b7,_0x52ae65;this[_0xebe350(0x10b)]['addComment'](_0x48c082,_0x392539,{'unitId':_0x48c082,'subUnitId':_0x392539,'ref':'','id':_0x447e70[_0xebe350(0x130)],'dT':u(+_0x447e70[_0xebe350(0x166)]),'threadId':_0x447e70['threadId'],'personId':(_0x1381b7=(_0x52ae65=_0x447e70[_0xebe350(0x112)])==null?void 0x0:_0x52ae65[_0xebe350(0x154)])==null?_0x447e70[_0xebe350(0x146)]:_0x1381b7,'text':JSON[_0xebe350(0xff)](_0x447e70['content']),'parentId':_0x5bd10c['id']});break;case i[_0xebe350(0x10c)][_0xebe350(0x108)]:{let _0x2e79d3=this[_0xebe350(0x10b)]['getComment'](_0x48c082,_0x392539,_0x447e70[_0xebe350(0x130)]);_0x2e79d3&&_0x2e79d3[_0xebe350(0xf5)]&&this[_0xebe350(0x10b)][_0xebe350(0x151)](_0x48c082,_0x392539,_0x447e70['replyId']);break;}case i[_0xebe350(0x10c)][_0xebe350(0xfe)]:this['_threadCommentModel']['updateComment'](_0x48c082,_0x392539,{'commentId':_0x447e70[_0xebe350(0x130)],'text':JSON[_0xebe350(0xff)](_0x447e70['content'])});break;case i[_0xebe350(0x10c)][_0xebe350(0x131)]:{var _0x41a8d8;let _0x17f5f6=(_0x41a8d8=this[_0xebe350(0x10b)][_0xebe350(0x15e)](_0x447e70[_0xebe350(0x15b)])[_0xebe350(0x124)](_0x4909e8=>_0x4909e8[_0xebe350(0xf7)]===_0x447e70[_0xebe350(0xf7)]))==null?void 0x0:_0x41a8d8[_0xebe350(0xfd)];_0x17f5f6&&this['_threadCommentModel'][_0xebe350(0x11e)](_0x48c082,_0x392539,_0x17f5f6['id'],_0x447e70[_0xebe350(0x103)]===i[_0xebe350(0x15d)][_0xebe350(0x16b)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x4e8059(0x11c)])(e[_0x4e8059(0x138)])),f(0x1,(0x0,n[_0x4e8059(0x11c)])(a[_0x4e8059(0x15a)])),f(0x2,(0x0,n[_0x4e8059(0x11c)])(n[_0x4e8059(0x13d)])),f(0x3,(0x0,n['Inject'])(n[_0x4e8059(0x14b)]))],m);const h='thread-comment-data-source.config';Symbol(h);const g={};function _(_0x5037e6,_0x4ad869){const _0x5f220b=_0x4e8059;let _0x4081ea=_0x5037e6[_0x5f220b(0xfb)][0x0];return{..._0x4ad869,'id':_0x4081ea[_0x5f220b(0x130)],'resolved':_0x5037e6[_0x5f220b(0x103)]===0x1,'dT':u(_0x4081ea[_0x5f220b(0x166)]),'personId':_0x4081ea['userId'],'threadId':_0x4081ea[_0x5f220b(0xf7)]};}function v(_0x409cba,_0x184081,_0x44171f){const _0x325241=_0x4e8059;var _0xa87839,_0x495c28;if(((_0xa87839=_0x409cba==null||(_0x495c28=_0x409cba[_0x325241(0xfb)])==null?void 0x0:_0x495c28[_0x325241(0x14e)])==null?0x0:_0xa87839)>0x0){let _0x496fad=(_0x17d706,_0x1a6967)=>({'id':_0x17d706[_0x325241(0x130)],'threadId':_0x17d706['threadId'],'dT':u(_0x17d706[_0x325241(0x166)]),'personId':_0x17d706[_0x325241(0x146)],'resolved':_0x409cba[_0x325241(0x103)]===i[_0x325241(0x15d)][_0x325241(0x16b)],'unitId':_0x184081,'subUnitId':_0x44171f,'text':JSON[_0x325241(0xff)](_0x17d706[_0x325241(0x133)]),'parentId':_0x1a6967}),_0x8998da=_0x496fad(_0x409cba[_0x325241(0xfb)][0x0]);return{..._0x8998da,'children':_0x409cba[_0x325241(0xfb)]['slice'](0x1)[_0x325241(0x117)](_0x326464=>_0x496fad(_0x326464,_0x8998da['id']))};}return null;}let y=class{constructor(_0x327c84,_0x107a2d,_0x169c6f){const _0x2baaa6=_0x4e8059;this[_0x2baaa6(0x152)]=_0x327c84,this['_userService']=_0x107a2d,this[_0x2baaa6(0x127)]=_0x169c6f;}async[_0x4e8059(0x16a)](_0xdc28f2){const _0x2291e7=_0x4e8059;var _0x9cd8c8,_0x42aff6;let {parentId:_0x49daad,unitId:_0x7290a6,text:_0x1e9a6a,threadId:_0x688d1a}=_0xdc28f2,_0x529a3f=(_0x9cd8c8=(_0x42aff6=_0x1e9a6a[_0x2291e7(0xf3)])==null?void 0x0:_0x42aff6[_0x2291e7(0x12d)](_0xe06e8e=>_0xe06e8e[_0x2291e7(0x142)]===n['CustomRangeType']['COMMENT'])[_0x2291e7(0x117)](_0x2ae65d=>_0x2ae65d[_0x2291e7(0x15f)]))==null?[]:_0x9cd8c8,_0x192b29=JSON[_0x2291e7(0x163)](_0x1e9a6a),_0xccd2bd=(await this[_0x2291e7(0x127)]['requireSession'](_0x7290a6))[_0x2291e7(0x144)]();if(_0x49daad){let _0x4f943d={'memberId':_0xccd2bd,'unitId':_0x7290a6,'content':_0x192b29,'mention':_0x529a3f,'threadId':_0x688d1a},_0x2ec1c8=(await this[_0x2291e7(0x152)][_0x2291e7(0x11a)](_0x2291e7(0x141)+_0x7290a6+'/reply',{'body':_0x4f943d}))[_0x2291e7(0x16e)][_0x2291e7(0x157)];return{..._0xdc28f2,'id':_0x2ec1c8[_0x2291e7(0x130)],'dT':(0x0,n[_0x2291e7(0x12f)])(+_0x2ec1c8[_0x2291e7(0x166)])['format'](_0x2291e7(0x165)),'personId':_0x2ec1c8[_0x2291e7(0x146)]};}else{let _0x14f7e5={'memberId':_0xccd2bd,'unitId':_0x7290a6,'content':_0x192b29,'mention':_0x529a3f};return _((await this[_0x2291e7(0x152)][_0x2291e7(0x11a)](_0x2291e7(0x141)+_0x7290a6+'/add',{'body':_0x14f7e5}))[_0x2291e7(0x16e)]['comment'],_0xdc28f2);}}async[_0x4e8059(0x11f)](_0x407d2d){const _0x3d9a63=_0x4e8059;var _0x5d3ba9,_0x3fc49f;let {text:_0xe942d6,unitId:_0x6908c8}=_0x407d2d,_0x34e7a6=(_0x5d3ba9=(_0x3fc49f=_0xe942d6[_0x3d9a63(0xf3)])==null?void 0x0:_0x3fc49f[_0x3d9a63(0x12d)](_0x5c493e=>_0x5c493e['rangeType']===n[_0x3d9a63(0xf9)][_0x3d9a63(0xf6)])['map'](_0x11cb57=>_0x11cb57[_0x3d9a63(0x15f)]))==null?[]:_0x5d3ba9,_0x5381d8=JSON[_0x3d9a63(0x163)](_0xe942d6),_0xfe545d=_0x407d2d[_0x3d9a63(0xf7)],_0x148c06=_0x407d2d['id'],_0x12bd0b={'memberId':(await this['_sessionService'][_0x3d9a63(0x12a)](_0x6908c8))[_0x3d9a63(0x144)](),'unitId':_0x6908c8,'threadId':_0xfe545d,'mention':_0x34e7a6,'content':_0x5381d8,'replyId':_0x148c06},_0x32f0bf=await this[_0x3d9a63(0x152)]['post'](_0x3d9a63(0x141)+_0x6908c8+_0x3d9a63(0x114),{'body':_0x12bd0b});return!_0x32f0bf[_0x3d9a63(0x16e)]['error']||_0x32f0bf['body']['error'][_0x3d9a63(0x171)]===0x1;}async[_0x4e8059(0x11e)](_0x141aba){const _0xaa8aae=_0x4e8059;let {unitId:_0x2ec86d}=_0x141aba,_0x47a1d6=_0x141aba['threadId'],_0x26dfcf={'memberId':this[_0xaa8aae(0x155)]['getCurrentUser']()[_0xaa8aae(0x154)],'unitId':_0x2ec86d,'threadId':_0x47a1d6,'solved':_0x141aba[_0xaa8aae(0x159)]?i[_0xaa8aae(0x15d)]['Solved']:i[_0xaa8aae(0x15d)][_0xaa8aae(0x172)]},_0x17082c=await this[_0xaa8aae(0x152)][_0xaa8aae(0x11a)](_0xaa8aae(0x141)+_0x2ec86d+_0xaa8aae(0x13c),{'body':_0x26dfcf});return!_0x17082c[_0xaa8aae(0x16e)][_0xaa8aae(0x13b)]||_0x17082c[_0xaa8aae(0x16e)][_0xaa8aae(0x13b)][_0xaa8aae(0x171)]===0x1;}async[_0x4e8059(0x151)](_0xe2120c,_0x9b1d9e,_0x1d1d9c,_0xc0f9fe){const _0x200fc5=_0x4e8059;let _0x55b02c={'memberId':(await this[_0x200fc5(0x127)]['requireSession'](_0xe2120c))[_0x200fc5(0x144)](),'threadId':_0x1d1d9c,'replyId':_0xc0f9fe,'unitId':_0xe2120c},_0x500ef2=await this['_httpService'][_0x200fc5(0x11a)]('/universer-api/comment/unit/'+_0xe2120c+'/delete',{'body':_0x55b02c});return!_0x500ef2[_0x200fc5(0x16e)][_0x200fc5(0x13b)]||_0x500ef2[_0x200fc5(0x16e)]['error'][_0x200fc5(0x171)]===0x1;}async[_0x4e8059(0x14d)](_0xcc79b4,_0x5350b6,_0x593f23){const _0x50259a=_0x4e8059;let _0x2223db={'unitId':_0xcc79b4,'threadId':_0x593f23},_0x32489b=await this[_0x50259a(0x152)][_0x50259a(0x11a)]('/universer-api/comment/unit/'+_0xcc79b4+'/list',{'body':_0x2223db}),_0x31da35=_0x593f23[_0x50259a(0x117)](_0x3201bf=>v(_0x32489b[_0x50259a(0x16e)][_0x50259a(0x116)][_0x3201bf],_0xcc79b4,_0x5350b6))[_0x50259a(0x12d)](Boolean);return Object[_0x50259a(0x148)](_0x32489b[_0x50259a(0x16e)][_0x50259a(0x147)])[_0x50259a(0x14c)](_0x3b84ea=>{const _0x1a64bd=_0x50259a;this[_0x1a64bd(0x155)][_0x1a64bd(0x143)](_0x3b84ea);}),_0x31da35;}[_0x4e8059(0x119)](_0x27a27e){const _0x82974f=_0x4e8059;return{'id':_0x27a27e['id'],'threadId':_0x27a27e[_0x82974f(0xf7)],'ref':_0x27a27e[_0x82974f(0x135)]};}};function _0xc8bc(){const _0x40b2a1=['536IRrOZY','DependentOn','symbol','IThreadCommentDataSourceService','find','setConfig','Reply','_sessionService','size','getOwnPropertyDescriptor','requireSession','payload','get','filter','2307678txZcOa','dateKit','replyId','Solve','pipe','content','packageName','ref','_injector','HTTPService','CommentService','Disposable','format','error','/solved','UserManagerService','personId','add','4200642zHBeTb','/universer-api/comment/unit/','rangeType','addUser','getMemberID','version','userId','users','values','prototype','/universer-api/user/list','Injector','forEach','listComments','length','9722010HIssJX','@univerjs-pro/thread-comment-datasource','deleteComment','_httpService','UniverThreadCommentUIPlugin','userID','_userService','235467xOYvba','reply','Module','resolved','ThreadCommentModel','unitId','Add','CommentSolvedStatus','getUnit','rangeId','toStringTag','772370pXCayM','_init','stringify','dataSource','YYYY/MM/DD\x20HH:mm','createTimestamp','_config','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commentService','addComment','Solved','onReady','object','body','type','subscribe','code','OpenOrReOpen','iterator','constructor','string','customRanges','function','parentId','COMMENT','threadId','1635175TZblyU','CustomRangeType','commentUpdate$','replies','UniverThreadCommentDataSourcePlugin','root','Edit','parse','_threadCommentDataSource','disposeWithMe','_initUserSync','solved','call','_threadCommentDataSourceService','delete','_initDataSource','Delete','_configService','pluginName','_threadCommentModel','CommentUpdateEventType','toPrimitive','defineProperty','7zdOxOR','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','user','bufferTime','/edit','onStarting','comments','map','default','saveCommentToSnapshot','post','3030460KJDdvz','Inject','decorate','resolveComment','updateComment'];_0xc8bc=function(){return _0x40b2a1;};return _0xc8bc();}y=p([f(0x0,(0x0,n[_0x4e8059(0x11c)])(s[_0x4e8059(0x137)])),f(0x1,(0x0,n['Inject'])(n[_0x4e8059(0x13d)])),f(0x2,(0x0,n[_0x4e8059(0x11c)])(e['CollaborationSessionService']))],y);let b=class extends n[_0x4e8059(0x139)]{constructor(_0x84bd32,_0xbaa2a7){const _0x47da72=_0x4e8059;super(),this[_0x47da72(0x105)]=_0x84bd32,this[_0x47da72(0x100)]=_0xbaa2a7,this[_0x47da72(0x107)]();}[_0x4e8059(0x107)](){const _0x357cfb=_0x4e8059;this[_0x357cfb(0x105)][_0x357cfb(0x164)]=this[_0x357cfb(0x100)],this[_0x357cfb(0x105)]['syncUpdateMutationToColla']=!0x1;}};b=p([f(0x0,a[_0x4e8059(0x123)]),f(0x1,(0x0,n[_0x4e8059(0x11c)])(y))],b);function x(_0x2c3e44){'@babel/helpers - typeof';const _0x1b7b51=_0x4e8059;return x=typeof Symbol==_0x1b7b51(0xf4)&&typeof Symbol[_0x1b7b51(0x173)]==_0x1b7b51(0x122)?function(_0x46d987){return typeof _0x46d987;}:function(_0x5b2f3e){const _0x55acfe=_0x1b7b51;return _0x5b2f3e&&typeof Symbol=='function'&&_0x5b2f3e[_0x55acfe(0xf1)]===Symbol&&_0x5b2f3e!==Symbol[_0x55acfe(0x149)]?'symbol':typeof _0x5b2f3e;},x(_0x2c3e44);}function S(_0x35a996,_0x332bb2){const _0x25715a=_0x4e8059;if(x(_0x35a996)!=_0x25715a(0x16d)||!_0x35a996)return _0x35a996;var _0x2e7a24=_0x35a996[Symbol[_0x25715a(0x10d)]];if(_0x2e7a24!==void 0x0){var _0x5d1c16=_0x2e7a24[_0x25715a(0x104)](_0x35a996,_0x332bb2||_0x25715a(0x118));if(x(_0x5d1c16)!=_0x25715a(0x16d))return _0x5d1c16;throw TypeError(_0x25715a(0x168));}return(_0x332bb2===_0x25715a(0xf2)?String:Number)(_0x35a996);}function C(_0x42a502){const _0xb693b4=_0x4e8059;var _0xc58d62=S(_0x42a502,_0xb693b4(0xf2));return x(_0xc58d62)==_0xb693b4(0x122)?_0xc58d62:_0xc58d62+'';}function w(_0x339271,_0x330568,_0xdb53e3){const _0x10c870=_0x4e8059;return(_0x330568=C(_0x330568))in _0x339271?Object[_0x10c870(0x10e)](_0x339271,_0x330568,{'value':_0xdb53e3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x339271[_0x330568]=_0xdb53e3,_0x339271;}let T=class extends n['Plugin']{constructor(_0x42401b=g,_0x2e0f8f,_0x25f402){const _0x4288ce=_0x4e8059;super(),this['_config']=_0x42401b,this[_0x4288ce(0x136)]=_0x2e0f8f,this[_0x4288ce(0x109)]=_0x25f402;let {..._0x3acd8e}=(0x0,n['merge'])({},g,this[_0x4288ce(0x167)]);this['_configService'][_0x4288ce(0x125)](h,_0x3acd8e);}[_0x4e8059(0x115)](){const _0x3cfbbb=_0x4e8059;[[y],[b],[m]][_0x3cfbbb(0x14c)](_0x55f20f=>{const _0x337bc3=_0x3cfbbb;this[_0x337bc3(0x136)][_0x337bc3(0x13f)](_0x55f20f);});}[_0x4e8059(0x16c)](){const _0x3fc1f1=_0x4e8059;this['_injector'][_0x3fc1f1(0x12c)](b),this[_0x3fc1f1(0x136)][_0x3fc1f1(0x12c)](m);}};w(T,_0x4e8059(0x10a),_0x4e8059(0x110)),w(T,_0x4e8059(0x134),c),w(T,_0x4e8059(0x145),l),T=p([(0x0,n[_0x4e8059(0x121)])(r[_0x4e8059(0x153)],e['UniverCollaborationClientPlugin'],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x4e8059(0x11c)])(n['Injector'])),f(0x2,n[_0x4e8059(0x111)])],T),Object[_0x4e8059(0x10e)](exports,_0x4e8059(0xfc),{'enumerable':!0x0,'get':function(){return T;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2d26a6=_0x2ba5;(function(_0x21e4ce,_0x42e270){const _0xb8fbad=_0x2ba5,_0x3cb9c9=_0x21e4ce();while(!![]){try{const _0x23bf7c=parseInt(_0xb8fbad(0x19b))/0x1+parseInt(_0xb8fbad(0x185))/0x2*(-parseInt(_0xb8fbad(0x14c))/0x3)+-parseInt(_0xb8fbad(0x134))/0x4*(parseInt(_0xb8fbad(0x171))/0x5)+parseInt(_0xb8fbad(0x16c))/0x6*(parseInt(_0xb8fbad(0x130))/0x7)+parseInt(_0xb8fbad(0x140))/0x8*(-parseInt(_0xb8fbad(0x195))/0x9)+-parseInt(_0xb8fbad(0x16e))/0xa+parseInt(_0xb8fbad(0x174))/0xb;if(_0x23bf7c===_0x42e270)break;else _0x3cb9c9['push'](_0x3cb9c9['shift']());}catch(_0x2c32c7){_0x3cb9c9['push'](_0x3cb9c9['shift']());}}}(_0x290d,0x90b33));import{CollaborationSessionService as _0xd87e6b,CommentService as _0x586dcc,UniverCollaborationClientPlugin as _0x460a44}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e0834}from'@univerjs-pro/license';import{CustomRangeType as _0x3127fb,DependentOn as _0x175384,Disposable as _0x58c259,IConfigService as _0x59450d,Inject as _0xdf2566,Injector as _0x1f4feb,Plugin as _0x4a5d56,UserManagerService as _0x4eed35,dateKit as _0x2614e0,merge as _0x1c1028}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ecaf2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x46cb72,CommentUpdateEventType as _0x4d74d2}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x4cbc31,ThreadCommentModel as _0x516c61}from'@univerjs/thread-comment';import{bufferTime as _0x4099c8}from'rxjs';import{HTTPService as _0x5d2e8b}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S='0.23.0';const C=_0x1b3731=>_0x2614e0(new Date(+_0x1b3731))[_0x2d26a6(0x166)](_0x2d26a6(0x17b)),w=async(_0x245547,_0x134fcd)=>{const _0x50984=_0x2d26a6;let _0x3b3d66=_0x245547[_0x50984(0x186)](_0x4eed35),_0x2b75ab=_0x245547[_0x50984(0x186)](_0x5d2e8b);_0x134fcd[_0x50984(0x182)](_0x4c80ca=>{const _0x4e6535=_0x50984;_0x3b3d66[_0x4e6535(0x196)](_0x4c80ca)&&_0x134fcd[_0x4e6535(0x17c)](_0x4c80ca);}),_0x134fcd[_0x50984(0x183)]&&(await _0x2b75ab[_0x50984(0x186)]('/universer-api/user/list',{'params':{'userIDs':[..._0x134fcd]}}))['body'][_0x50984(0x18c)][_0x50984(0x182)](_0x3c87c6=>{const _0x276569=_0x50984;_0x3c87c6&&_0x3b3d66[_0x276569(0x13e)](_0x3c87c6);});};function T(_0x18e753,_0x2b12d3){return function(_0x3786ac,_0x1aa819){_0x2b12d3(_0x3786ac,_0x1aa819,_0x18e753);};}function _0x290d(){const _0x4b6597=['Edit','thread-comment-data-source.config','onReady','_threadCommentDataSourceService','_injector','content','replyId','solved','getUnit','/solved','parentId','comment','dataSource','/list','replies','default','_httpService','post','userId','resolveComment','iterator','slice','length','format','Solve','find','Solved','listComments','decorate','12QNjpLu','saveCommentToSnapshot','11593120DotlRv','map','rangeId','5672795BhqXDW','/universer-api/comment/unit/','_config','32142704FVDXNf','parse','_sessionService','_commentService','packageName','addComment','Add','YYYY/MM/DD\x20HH:mm','delete','syncUpdateMutationToColla','unitId','type','stringify','getMemberID','forEach','size','_init','210AUfoZy','get','deleteComment','add','OpenOrReOpen','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','constructor','error','resolved','user','/delete','createTimestamp','code','_initUserSync','392652jtiYCp','getUser','Reply','_configService','function','customRanges','219361BKEZLw','2792566qFCdCy','object','setConfig','symbol','4vnLxYl','getOwnPropertyDescriptor','commentUpdate$','payload','body','getCurrentUser','_threadCommentModel','ref','comments','COMMENT','addUser','string','144wAUEZJ','rangeType','_userService','getComment','reply','values','prototype','updateComment','disposeWithMe','_threadCommentDataSource','_initDataSource','userID','7641YFrOUw','pipe','threadId'];_0x290d=function(){return _0x4b6597;};return _0x290d();}function E(_0x2a2a8b,_0x12fb2d,_0x152f32,_0x4bef7d){const _0x556c7b=_0x2d26a6;var _0xaeae04=arguments[_0x556c7b(0x165)],_0x1edb6d=_0xaeae04<0x3?_0x12fb2d:_0x4bef7d===null?_0x4bef7d=Object[_0x556c7b(0x135)](_0x12fb2d,_0x152f32):_0x4bef7d,_0x2f8ead;if(typeof Reflect==_0x556c7b(0x131)&&typeof Reflect['decorate']==_0x556c7b(0x199))_0x1edb6d=Reflect[_0x556c7b(0x16b)](_0x2a2a8b,_0x12fb2d,_0x152f32,_0x4bef7d);else{for(var _0x5c78b3=_0x2a2a8b[_0x556c7b(0x165)]-0x1;_0x5c78b3>=0x0;_0x5c78b3--)(_0x2f8ead=_0x2a2a8b[_0x5c78b3])&&(_0x1edb6d=(_0xaeae04<0x3?_0x2f8ead(_0x1edb6d):_0xaeae04>0x3?_0x2f8ead(_0x12fb2d,_0x152f32,_0x1edb6d):_0x2f8ead(_0x12fb2d,_0x152f32))||_0x1edb6d);}return _0xaeae04>0x3&&_0x1edb6d&&Object['defineProperty'](_0x12fb2d,_0x152f32,_0x1edb6d),_0x1edb6d;}let D=class extends _0x58c259{constructor(_0x536d99,_0x40c92e,_0x4e98d8,_0x3ae393){const _0x3ffbcc=_0x2d26a6;super(),this[_0x3ffbcc(0x177)]=_0x536d99,this[_0x3ffbcc(0x13a)]=_0x40c92e,this[_0x3ffbcc(0x142)]=_0x4e98d8,this[_0x3ffbcc(0x153)]=_0x3ae393,this[_0x3ffbcc(0x184)](),this[_0x3ffbcc(0x194)]();}[_0x2d26a6(0x194)](){const _0x184eff=_0x2d26a6;this['disposeWithMe'](this['_threadCommentModel'][_0x184eff(0x136)][_0x184eff(0x14d)](_0x4099c8(0x10))['subscribe'](_0x1f948f=>{const _0x505e49=_0x184eff;let _0x5ce95f=new Set();_0x1f948f[_0x505e49(0x182)](_0x45661d=>{const _0x78774=_0x505e49;switch(_0x45661d[_0x78774(0x17f)]){case _0x78774(0x188):{let _0x20c76e=_0x45661d[_0x78774(0x137)]['personId'];_0x5ce95f[_0x78774(0x188)](_0x20c76e);break;}default:break;}}),w(this[_0x505e49(0x153)],_0x5ce95f);}));}['_init'](){const _0x4ac7ee=_0x2d26a6;this[_0x4ac7ee(0x148)](this[_0x4ac7ee(0x177)][_0x4ac7ee(0x136)]['subscribe'](async _0x59090e=>{const _0x1c6e89=_0x4ac7ee;var _0x5d9186;let _0x572ab6=(_0x5d9186=this[_0x1c6e89(0x13a)][_0x1c6e89(0x157)](_0x59090e[_0x1c6e89(0x17e)])[_0x1c6e89(0x168)](_0x5bb261=>_0x5bb261[_0x1c6e89(0x14e)]===_0x59090e['threadId']))==null?void 0x0:_0x5d9186['root'];if(!_0x572ab6)return;let {unitId:_0x5bfe07,subUnitId:_0x68ed10}=_0x572ab6;switch(_0x59090e[_0x1c6e89(0x190)]&&this[_0x1c6e89(0x142)][_0x1c6e89(0x13e)](_0x59090e[_0x1c6e89(0x190)]),_0x59090e[_0x1c6e89(0x17f)]){case _0x4d74d2[_0x1c6e89(0x17a)]:break;case _0x4d74d2[_0x1c6e89(0x197)]:var _0x25904a,_0x27db30;this['_threadCommentModel'][_0x1c6e89(0x179)](_0x5bfe07,_0x68ed10,{'unitId':_0x5bfe07,'subUnitId':_0x68ed10,'ref':'','id':_0x59090e['replyId'],'dT':C(+_0x59090e[_0x1c6e89(0x192)]),'threadId':_0x59090e[_0x1c6e89(0x14e)],'personId':(_0x25904a=(_0x27db30=_0x59090e[_0x1c6e89(0x190)])==null?void 0x0:_0x27db30[_0x1c6e89(0x14b)])==null?_0x59090e['userId']:_0x25904a,'text':JSON[_0x1c6e89(0x175)](_0x59090e['content']),'parentId':_0x572ab6['id']});break;case _0x4d74d2['Delete']:{let _0x39da31=this[_0x1c6e89(0x13a)][_0x1c6e89(0x143)](_0x5bfe07,_0x68ed10,_0x59090e[_0x1c6e89(0x155)]);_0x39da31&&_0x39da31[_0x1c6e89(0x159)]&&this['_threadCommentModel'][_0x1c6e89(0x187)](_0x5bfe07,_0x68ed10,_0x59090e[_0x1c6e89(0x155)]);break;}case _0x4d74d2[_0x1c6e89(0x14f)]:this[_0x1c6e89(0x13a)][_0x1c6e89(0x147)](_0x5bfe07,_0x68ed10,{'commentId':_0x59090e[_0x1c6e89(0x155)],'text':JSON[_0x1c6e89(0x175)](_0x59090e[_0x1c6e89(0x154)])});break;case _0x4d74d2[_0x1c6e89(0x167)]:{var _0x1d7d6c;let _0x2b5e7a=(_0x1d7d6c=this[_0x1c6e89(0x13a)][_0x1c6e89(0x157)](_0x59090e[_0x1c6e89(0x17e)])[_0x1c6e89(0x168)](_0x24851a=>_0x24851a[_0x1c6e89(0x14e)]===_0x59090e[_0x1c6e89(0x14e)]))==null?void 0x0:_0x1d7d6c['root'];_0x2b5e7a&&this[_0x1c6e89(0x13a)][_0x1c6e89(0x162)](_0x5bfe07,_0x68ed10,_0x2b5e7a['id'],_0x59090e[_0x1c6e89(0x156)]===_0x46cb72[_0x1c6e89(0x169)]);break;}default:break;}}));}};D=E([T(0x0,_0xdf2566(_0x586dcc)),T(0x1,_0xdf2566(_0x516c61)),T(0x2,_0xdf2566(_0x4eed35)),T(0x3,_0xdf2566(_0x1f4feb))],D);const O=_0x2d26a6(0x150);Symbol(O);const k={};function _0x2ba5(_0x5cd984,_0x823ffa){_0x5cd984=_0x5cd984-0x130;const _0x290d17=_0x290d();let _0x2ba583=_0x290d17[_0x5cd984];return _0x2ba583;}function A(_0x1238ce,_0x26ae3f){const _0x3ccaf0=_0x2d26a6;let _0x53d403=_0x1238ce['replies'][0x0];return{..._0x26ae3f,'id':_0x53d403['replyId'],'resolved':_0x1238ce[_0x3ccaf0(0x156)]===0x1,'dT':C(_0x53d403['createTimestamp']),'personId':_0x53d403[_0x3ccaf0(0x161)],'threadId':_0x53d403['threadId']};}function j(_0x582fc1,_0x63c974,_0x2ebd13){const _0x140708=_0x2d26a6;var _0x54104c,_0x5bc8e0;if(((_0x54104c=_0x582fc1==null||(_0x5bc8e0=_0x582fc1[_0x140708(0x15d)])==null?void 0x0:_0x5bc8e0[_0x140708(0x165)])==null?0x0:_0x54104c)>0x0){let _0x416dc1=(_0x23eeb3,_0x4331b1)=>({'id':_0x23eeb3[_0x140708(0x155)],'threadId':_0x23eeb3[_0x140708(0x14e)],'dT':C(_0x23eeb3['createTimestamp']),'personId':_0x23eeb3['userId'],'resolved':_0x582fc1['solved']===_0x46cb72[_0x140708(0x169)],'unitId':_0x63c974,'subUnitId':_0x2ebd13,'text':JSON['parse'](_0x23eeb3['content']),'parentId':_0x4331b1}),_0x179126=_0x416dc1(_0x582fc1[_0x140708(0x15d)][0x0]);return{..._0x179126,'children':_0x582fc1[_0x140708(0x15d)][_0x140708(0x164)](0x1)[_0x140708(0x16f)](_0x4f51e8=>_0x416dc1(_0x4f51e8,_0x179126['id']))};}return null;}let M=class{constructor(_0x213e5b,_0x589a77,_0x43b3f7){const _0x302133=_0x2d26a6;this[_0x302133(0x15f)]=_0x213e5b,this['_userService']=_0x589a77,this[_0x302133(0x176)]=_0x43b3f7;}async['addComment'](_0x70cc19){const _0x56dda1=_0x2d26a6;var _0x43daaf,_0x2b7b9e;let {parentId:_0x12d7de,unitId:_0x3904fe,text:_0x478315,threadId:_0x4b3a1f}=_0x70cc19,_0x923872=(_0x43daaf=(_0x2b7b9e=_0x478315[_0x56dda1(0x19a)])==null?void 0x0:_0x2b7b9e['filter'](_0x5c683e=>_0x5c683e[_0x56dda1(0x141)]===_0x3127fb['COMMENT'])['map'](_0x11270f=>_0x11270f[_0x56dda1(0x170)]))==null?[]:_0x43daaf,_0xf60eb7=JSON[_0x56dda1(0x180)](_0x478315),_0x670d0d=(await this['_sessionService'][_0x56dda1(0x18a)](_0x3904fe))['getMemberID']();if(_0x12d7de){let _0x231330={'memberId':_0x670d0d,'unitId':_0x3904fe,'content':_0xf60eb7,'mention':_0x923872,'threadId':_0x4b3a1f},_0x5263d3=(await this[_0x56dda1(0x15f)][_0x56dda1(0x160)](_0x56dda1(0x172)+_0x3904fe+'/reply',{'body':_0x231330}))['body'][_0x56dda1(0x144)];return{..._0x70cc19,'id':_0x5263d3[_0x56dda1(0x155)],'dT':_0x2614e0(+_0x5263d3[_0x56dda1(0x192)])['format'](_0x56dda1(0x17b)),'personId':_0x5263d3[_0x56dda1(0x161)]};}else{let _0x453e82={'memberId':_0x670d0d,'unitId':_0x3904fe,'content':_0xf60eb7,'mention':_0x923872};return A((await this['_httpService'][_0x56dda1(0x160)](_0x56dda1(0x172)+_0x3904fe+'/add',{'body':_0x453e82}))[_0x56dda1(0x138)][_0x56dda1(0x15a)],_0x70cc19);}}async[_0x2d26a6(0x147)](_0x3e410e){const _0x47787e=_0x2d26a6;var _0x2a01b,_0x45d856;let {text:_0x9f000a,unitId:_0x4bd959}=_0x3e410e,_0xb74161=(_0x2a01b=(_0x45d856=_0x9f000a[_0x47787e(0x19a)])==null?void 0x0:_0x45d856['filter'](_0x4f4bd3=>_0x4f4bd3['rangeType']===_0x3127fb[_0x47787e(0x13d)])[_0x47787e(0x16f)](_0x4dc3aa=>_0x4dc3aa[_0x47787e(0x170)]))==null?[]:_0x2a01b,_0x571cca=JSON[_0x47787e(0x180)](_0x9f000a),_0x4fa012=_0x3e410e[_0x47787e(0x14e)],_0x14d74f=_0x3e410e['id'],_0x3b7895={'memberId':(await this[_0x47787e(0x176)][_0x47787e(0x18a)](_0x4bd959))[_0x47787e(0x181)](),'unitId':_0x4bd959,'threadId':_0x4fa012,'mention':_0xb74161,'content':_0x571cca,'replyId':_0x14d74f},_0x5ea6e3=await this[_0x47787e(0x15f)]['post'](_0x47787e(0x172)+_0x4bd959+'/edit',{'body':_0x3b7895});return!_0x5ea6e3[_0x47787e(0x138)]['error']||_0x5ea6e3[_0x47787e(0x138)]['error'][_0x47787e(0x193)]===0x1;}async[_0x2d26a6(0x162)](_0x1fdb11){const _0x41c4a1=_0x2d26a6;let {unitId:_0x530d51}=_0x1fdb11,_0x577280=_0x1fdb11['threadId'],_0x1ed450={'memberId':this[_0x41c4a1(0x142)][_0x41c4a1(0x139)]()['userID'],'unitId':_0x530d51,'threadId':_0x577280,'solved':_0x1fdb11[_0x41c4a1(0x18f)]?_0x46cb72['Solved']:_0x46cb72[_0x41c4a1(0x189)]},_0x1481e6=await this[_0x41c4a1(0x15f)][_0x41c4a1(0x160)](_0x41c4a1(0x172)+_0x530d51+_0x41c4a1(0x158),{'body':_0x1ed450});return!_0x1481e6[_0x41c4a1(0x138)][_0x41c4a1(0x18e)]||_0x1481e6['body']['error']['code']===0x1;}async[_0x2d26a6(0x187)](_0xa10768,_0x12dcb9,_0x3e347e,_0x551e75){const _0xd758c4=_0x2d26a6;let _0xd747f7={'memberId':(await this[_0xd758c4(0x176)]['requireSession'](_0xa10768))['getMemberID'](),'threadId':_0x3e347e,'replyId':_0x551e75,'unitId':_0xa10768},_0x168ae7=await this[_0xd758c4(0x15f)][_0xd758c4(0x160)](_0xd758c4(0x172)+_0xa10768+_0xd758c4(0x191),{'body':_0xd747f7});return!_0x168ae7[_0xd758c4(0x138)][_0xd758c4(0x18e)]||_0x168ae7[_0xd758c4(0x138)][_0xd758c4(0x18e)][_0xd758c4(0x193)]===0x1;}async[_0x2d26a6(0x16a)](_0x140baf,_0x878594,_0x2a5d51){const _0x3fe828=_0x2d26a6;let _0x2d4436={'unitId':_0x140baf,'threadId':_0x2a5d51},_0x2782b2=await this[_0x3fe828(0x15f)][_0x3fe828(0x160)](_0x3fe828(0x172)+_0x140baf+_0x3fe828(0x15c),{'body':_0x2d4436}),_0x4272ba=_0x2a5d51[_0x3fe828(0x16f)](_0x48f2e7=>j(_0x2782b2[_0x3fe828(0x138)][_0x3fe828(0x13c)][_0x48f2e7],_0x140baf,_0x878594))['filter'](Boolean);return Object[_0x3fe828(0x145)](_0x2782b2[_0x3fe828(0x138)]['users'])[_0x3fe828(0x182)](_0x5606fa=>{const _0x3589a6=_0x3fe828;this['_userService'][_0x3589a6(0x13e)](_0x5606fa);}),_0x4272ba;}[_0x2d26a6(0x16d)](_0x2816ec){const _0x51362e=_0x2d26a6;return{'id':_0x2816ec['id'],'threadId':_0x2816ec['threadId'],'ref':_0x2816ec[_0x51362e(0x13b)]};}};M=E([T(0x0,_0xdf2566(_0x5d2e8b)),T(0x1,_0xdf2566(_0x4eed35)),T(0x2,_0xdf2566(_0xd87e6b))],M);let N=class extends _0x58c259{constructor(_0x29cce9,_0x2e8657){const _0xc3731e=_0x2d26a6;super(),this[_0xc3731e(0x152)]=_0x29cce9,this['_threadCommentDataSource']=_0x2e8657,this['_initDataSource']();}[_0x2d26a6(0x14a)](){const _0x3cfeaf=_0x2d26a6;this[_0x3cfeaf(0x152)][_0x3cfeaf(0x15b)]=this[_0x3cfeaf(0x149)],this[_0x3cfeaf(0x152)][_0x3cfeaf(0x17d)]=!0x1;}};N=E([T(0x0,_0x4cbc31),T(0x1,_0xdf2566(M))],N);function P(_0x4a80d6){'@babel/helpers - typeof';const _0x14f63f=_0x2d26a6;return P=typeof Symbol=='function'&&typeof Symbol[_0x14f63f(0x163)]=='symbol'?function(_0x17a81b){return typeof _0x17a81b;}:function(_0x221a1b){const _0x1990ea=_0x14f63f;return _0x221a1b&&typeof Symbol==_0x1990ea(0x199)&&_0x221a1b[_0x1990ea(0x18d)]===Symbol&&_0x221a1b!==Symbol[_0x1990ea(0x146)]?_0x1990ea(0x133):typeof _0x221a1b;},P(_0x4a80d6);}function F(_0x35bd12,_0x5085a4){const _0x533cc1=_0x2d26a6;if(P(_0x35bd12)!=_0x533cc1(0x131)||!_0x35bd12)return _0x35bd12;var _0x3957b0=_0x35bd12[Symbol['toPrimitive']];if(_0x3957b0!==void 0x0){var _0x102eb8=_0x3957b0['call'](_0x35bd12,_0x5085a4||_0x533cc1(0x15e));if(P(_0x102eb8)!=_0x533cc1(0x131))return _0x102eb8;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5085a4==='string'?String:Number)(_0x35bd12);}function I(_0x5b4c2b){const _0x7ceb78=_0x2d26a6;var _0x44e358=F(_0x5b4c2b,_0x7ceb78(0x13f));return P(_0x44e358)==_0x7ceb78(0x133)?_0x44e358:_0x44e358+'';}function L(_0x17cb96,_0xf98b65,_0x2422c4){return(_0xf98b65=I(_0xf98b65))in _0x17cb96?Object['defineProperty'](_0x17cb96,_0xf98b65,{'value':_0x2422c4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x17cb96[_0xf98b65]=_0x2422c4,_0x17cb96;}let R=class extends _0x4a5d56{constructor(_0x1279fd=k,_0x26b6b1,_0x5470a9){const _0x210f05=_0x2d26a6;super(),this['_config']=_0x1279fd,this[_0x210f05(0x153)]=_0x26b6b1,this[_0x210f05(0x198)]=_0x5470a9;let {..._0x5ea9ee}=_0x1c1028({},k,this[_0x210f05(0x173)]);this['_configService'][_0x210f05(0x132)](O,_0x5ea9ee);}['onStarting'](){[[M],[N],[D]]['forEach'](_0x414233=>{const _0x581557=_0x2ba5;this[_0x581557(0x153)][_0x581557(0x188)](_0x414233);});}[_0x2d26a6(0x151)](){const _0x2686dc=_0x2d26a6;this[_0x2686dc(0x153)][_0x2686dc(0x186)](N),this[_0x2686dc(0x153)][_0x2686dc(0x186)](D);}};L(R,'pluginName',_0x2d26a6(0x18b)),L(R,_0x2d26a6(0x178),x),L(R,'version',S),R=E([_0x175384(_0x5ecaf2,_0x460a44,_0x5e0834),T(0x1,_0xdf2566(_0x1f4feb)),T(0x2,_0x59450d)],R);export{R as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x24c5c3=_0x5900;(function(_0x553a0c,_0x4a2a8f){const _0x2a2031=_0x5900,_0x121997=_0x553a0c();while(!![]){try{const _0xe2541b=-parseInt(_0x2a2031(0x10d))/0x1+-parseInt(_0x2a2031(0x100))/0x2+-parseInt(_0x2a2031(0x119))/0x3*(-parseInt(_0x2a2031(0x139))/0x4)+-parseInt(_0x2a2031(0x10b))/0x5*(parseInt(_0x2a2031(0x145))/0x6)+parseInt(_0x2a2031(0xf2))/0x7*(parseInt(_0x2a2031(0x13a))/0x8)+-parseInt(_0x2a2031(0x143))/0x9*(-parseInt(_0x2a2031(0x132))/0xa)+-parseInt(_0x2a2031(0x106))/0xb*(-parseInt(_0x2a2031(0x118))/0xc);if(_0xe2541b===_0x4a2a8f)break;else _0x121997['push'](_0x121997['shift']());}catch(_0x3a7009){_0x121997['push'](_0x121997['shift']());}}}(_0x2d56,0x31105));import{CollaborationSessionService as _0x19b44,CommentService as _0x24e92c,UniverCollaborationClientPlugin as _0x3f9642}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3dce09}from'@univerjs-pro/license';import{CustomRangeType as _0x5a9d83,DependentOn as _0x140f68,Disposable as _0x163bfc,IConfigService as _0x4f4aa1,Inject as _0x2bff0e,Injector as _0xc96534,Plugin as _0x1a5129,UserManagerService as _0x2d0607,dateKit as _0x2ad89d,merge as _0x33d367}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42b7ee}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x20f75b,CommentUpdateEventType as _0x558fda}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0xebaadb,ThreadCommentModel as _0x192dc2}from'@univerjs/thread-comment';function _0x5900(_0x5aeda0,_0x30b58a){_0x5aeda0=_0x5aeda0-0xe4;const _0x2d56f7=_0x2d56();let _0x5900d8=_0x2d56f7[_0x5aeda0];return _0x5900d8;}import{bufferTime as _0x2f4805}from'rxjs';import{HTTPService as _0x5a5f64}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S=_0x24c5c3(0x128);const C=_0x5b4d20=>_0x2ad89d(new Date(+_0x5b4d20))[_0x24c5c3(0x134)](_0x24c5c3(0x14b)),w=async(_0x2ce6f7,_0x10599c)=>{const _0x4c49c1=_0x24c5c3;let _0x3d39f8=_0x2ce6f7[_0x4c49c1(0xf0)](_0x2d0607),_0x968fce=_0x2ce6f7[_0x4c49c1(0xf0)](_0x5a5f64);_0x10599c[_0x4c49c1(0x12d)](_0x10980a=>{const _0x4497fa=_0x4c49c1;_0x3d39f8[_0x4497fa(0x11e)](_0x10980a)&&_0x10599c['delete'](_0x10980a);}),_0x10599c['size']&&(await _0x968fce['get'](_0x4c49c1(0x138),{'params':{'userIDs':[..._0x10599c]}}))[_0x4c49c1(0x147)]['users'][_0x4c49c1(0x12d)](_0x5dc0a5=>{_0x5dc0a5&&_0x3d39f8['addUser'](_0x5dc0a5);});};function T(_0x5e840d,_0x5b0e60){return function(_0x5a3bdb,_0x3c0d20){_0x5b0e60(_0x5a3bdb,_0x3c0d20,_0x5e840d);};}function E(_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f){const _0x5e4a6a=_0x24c5c3;var _0x32bb00=arguments[_0x5e4a6a(0x13d)],_0x3677d3=_0x32bb00<0x3?_0x39a30b:_0x315a5f===null?_0x315a5f=Object['getOwnPropertyDescriptor'](_0x39a30b,_0xbc01dd):_0x315a5f,_0x178738;if(typeof Reflect=='object'&&typeof Reflect[_0x5e4a6a(0x114)]==_0x5e4a6a(0x130))_0x3677d3=Reflect[_0x5e4a6a(0x114)](_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f);else{for(var _0x288038=_0x51e779[_0x5e4a6a(0x13d)]-0x1;_0x288038>=0x0;_0x288038--)(_0x178738=_0x51e779[_0x288038])&&(_0x3677d3=(_0x32bb00<0x3?_0x178738(_0x3677d3):_0x32bb00>0x3?_0x178738(_0x39a30b,_0xbc01dd,_0x3677d3):_0x178738(_0x39a30b,_0xbc01dd))||_0x3677d3);}return _0x32bb00>0x3&&_0x3677d3&&Object[_0x5e4a6a(0x123)](_0x39a30b,_0xbc01dd,_0x3677d3),_0x3677d3;}let D=class extends _0x163bfc{constructor(_0x2ecab8,_0x562d35,_0x43a27d,_0x5626c3){const _0x539a12=_0x24c5c3;super(),this[_0x539a12(0x12c)]=_0x2ecab8,this[_0x539a12(0x129)]=_0x562d35,this['_userService']=_0x43a27d,this['_injector']=_0x5626c3,this['_init'](),this['_initUserSync']();}[_0x24c5c3(0x14a)](){const _0xf73f7c=_0x24c5c3;this['disposeWithMe'](this[_0xf73f7c(0x129)][_0xf73f7c(0x13b)][_0xf73f7c(0xe4)](_0x2f4805(0x10))[_0xf73f7c(0x117)](_0x6fe9cc=>{const _0x5e6af9=_0xf73f7c;let _0xfd89ee=new Set();_0x6fe9cc[_0x5e6af9(0x12d)](_0x276dcd=>{const _0xedc54b=_0x5e6af9;switch(_0x276dcd[_0xedc54b(0xf5)]){case _0xedc54b(0x131):{let _0x39913b=_0x276dcd[_0xedc54b(0x112)][_0xedc54b(0x113)];_0xfd89ee[_0xedc54b(0x131)](_0x39913b);break;}default:break;}}),w(this[_0x5e6af9(0x146)],_0xfd89ee);}));}[_0x24c5c3(0xeb)](){const _0x117ea2=_0x24c5c3;this[_0x117ea2(0x110)](this[_0x117ea2(0x12c)][_0x117ea2(0x13b)][_0x117ea2(0x117)](async _0x24df94=>{const _0x25c1cd=_0x117ea2;var _0x52bba0;let _0x1ac1fa=(_0x52bba0=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x7f9a56=>_0x7f9a56[_0x25c1cd(0x109)]===_0x24df94['threadId']))==null?void 0x0:_0x52bba0[_0x25c1cd(0x121)];if(!_0x1ac1fa)return;let {unitId:_0x1ce9f5,subUnitId:_0x1383d5}=_0x1ac1fa;switch(_0x24df94['user']&&this[_0x25c1cd(0xed)][_0x25c1cd(0xe6)](_0x24df94[_0x25c1cd(0x149)]),_0x24df94[_0x25c1cd(0xf5)]){case _0x558fda['Add']:break;case _0x558fda[_0x25c1cd(0x111)]:var _0xc75f62,_0x56cf40;this[_0x25c1cd(0x129)][_0x25c1cd(0x135)](_0x1ce9f5,_0x1383d5,{'unitId':_0x1ce9f5,'subUnitId':_0x1383d5,'ref':'','id':_0x24df94[_0x25c1cd(0x14d)],'dT':C(+_0x24df94[_0x25c1cd(0x140)]),'threadId':_0x24df94[_0x25c1cd(0x109)],'personId':(_0xc75f62=(_0x56cf40=_0x24df94[_0x25c1cd(0x149)])==null?void 0x0:_0x56cf40[_0x25c1cd(0xe5)])==null?_0x24df94['userId']:_0xc75f62,'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)]),'parentId':_0x1ac1fa['id']});break;case _0x558fda[_0x25c1cd(0x13c)]:{let _0x5985db=this[_0x25c1cd(0x129)][_0x25c1cd(0xe9)](_0x1ce9f5,_0x1383d5,_0x24df94['replyId']);_0x5985db&&_0x5985db['parentId']&&this[_0x25c1cd(0x129)][_0x25c1cd(0x13e)](_0x1ce9f5,_0x1383d5,_0x24df94[_0x25c1cd(0x14d)]);break;}case _0x558fda['Edit']:this[_0x25c1cd(0x129)]['updateComment'](_0x1ce9f5,_0x1383d5,{'commentId':_0x24df94['replyId'],'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)])});break;case _0x558fda[_0x25c1cd(0x103)]:{var _0x487ab4;let _0x17542d=(_0x487ab4=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x5d3f95=>_0x5d3f95['threadId']===_0x24df94[_0x25c1cd(0x109)]))==null?void 0x0:_0x487ab4[_0x25c1cd(0x121)];_0x17542d&&this[_0x25c1cd(0x129)][_0x25c1cd(0xf9)](_0x1ce9f5,_0x1383d5,_0x17542d['id'],_0x24df94[_0x25c1cd(0x108)]===_0x20f75b[_0x25c1cd(0xef)]);break;}default:break;}}));}};D=E([T(0x0,_0x2bff0e(_0x24e92c)),T(0x1,_0x2bff0e(_0x192dc2)),T(0x2,_0x2bff0e(_0x2d0607)),T(0x3,_0x2bff0e(_0xc96534))],D);const O='thread-comment-data-source.config';Symbol(O);const k={};function A(_0x2890d4,_0x13d050){const _0x49cf9c=_0x24c5c3;let _0x2378a8=_0x2890d4[_0x49cf9c(0x137)][0x0];return{..._0x13d050,'id':_0x2378a8[_0x49cf9c(0x14d)],'resolved':_0x2890d4[_0x49cf9c(0x108)]===0x1,'dT':C(_0x2378a8[_0x49cf9c(0x140)]),'personId':_0x2378a8[_0x49cf9c(0x105)],'threadId':_0x2378a8[_0x49cf9c(0x109)]};}function _0x2d56(){const _0x3cae25=['_threadCommentDataSource','root','customRanges','defineProperty','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','/universer-api/comment/unit/','_httpService','toPrimitive','0.24.0','_threadCommentModel','/reply','values','_commentService','forEach','symbol','syncUpdateMutationToColla','function','add','20CcruKl','/edit','format','addComment','_config','replies','/universer-api/user/list','36KYFtQV','2288leTztJ','commentUpdate$','Delete','length','deleteComment','parse','createTimestamp','object','stringify','903366xEVOKz','ref','6OPsOtN','_injector','body','default','user','_initUserSync','YYYY/MM/DD\x20HH:mm','listComments','replyId','pipe','userID','addUser','getUnit','onReady','getComment','_configService','_init','rangeId','_userService','dataSource','Solved','get','filter','9373xdIcmN','saveCommentToSnapshot','map','type','unitId','COMMENT','rangeType','resolveComment','requireSession','constructor','resolved','code','_sessionService','getMemberID','247898xdMqpk','/add','call','Solve','version','userId','15598FgmBrc','error','solved','threadId','packageName','268310CQNkgp','comments','384848vrNYdm','content','post','disposeWithMe','Reply','payload','personId','decorate','_initDataSource','onStarting','subscribe','672LzQQnd','33438iEEbfp','find','OpenOrReOpen','pluginName','_threadCommentDataSourceService','getUser','iterator'];_0x2d56=function(){return _0x3cae25;};return _0x2d56();}function j(_0x5df83d,_0x54d4a3,_0x3929da){const _0x356783=_0x24c5c3;var _0x239006,_0x5d9189;if(((_0x239006=_0x5df83d==null||(_0x5d9189=_0x5df83d[_0x356783(0x137)])==null?void 0x0:_0x5d9189['length'])==null?0x0:_0x239006)>0x0){let _0x2c7c02=(_0x36cc43,_0x10accb)=>({'id':_0x36cc43[_0x356783(0x14d)],'threadId':_0x36cc43['threadId'],'dT':C(_0x36cc43[_0x356783(0x140)]),'personId':_0x36cc43[_0x356783(0x105)],'resolved':_0x5df83d['solved']===_0x20f75b[_0x356783(0xef)],'unitId':_0x54d4a3,'subUnitId':_0x3929da,'text':JSON[_0x356783(0x13f)](_0x36cc43[_0x356783(0x10e)]),'parentId':_0x10accb}),_0xa2a6c=_0x2c7c02(_0x5df83d['replies'][0x0]);return{..._0xa2a6c,'children':_0x5df83d[_0x356783(0x137)]['slice'](0x1)[_0x356783(0xf4)](_0x1f27cf=>_0x2c7c02(_0x1f27cf,_0xa2a6c['id']))};}return null;}let M=class{constructor(_0x96c43a,_0x35052b,_0x5cd31d){const _0x51a981=_0x24c5c3;this[_0x51a981(0x126)]=_0x96c43a,this['_userService']=_0x35052b,this[_0x51a981(0xfe)]=_0x5cd31d;}async[_0x24c5c3(0x135)](_0x36e456){const _0x1c2285=_0x24c5c3;var _0x300f2e,_0x1de19b;let {parentId:_0x19af64,unitId:_0x93938b,text:_0x1ffdeb,threadId:_0x1b65de}=_0x36e456,_0x568464=(_0x300f2e=(_0x1de19b=_0x1ffdeb[_0x1c2285(0x122)])==null?void 0x0:_0x1de19b[_0x1c2285(0xf1)](_0x12a39c=>_0x12a39c[_0x1c2285(0xf8)]===_0x5a9d83[_0x1c2285(0xf7)])[_0x1c2285(0xf4)](_0x1e0578=>_0x1e0578[_0x1c2285(0xec)]))==null?[]:_0x300f2e,_0x4db456=JSON['stringify'](_0x1ffdeb),_0x53fa50=(await this[_0x1c2285(0xfe)][_0x1c2285(0xfa)](_0x93938b))['getMemberID']();if(_0x19af64){let _0x459c1d={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464,'threadId':_0x1b65de},_0x8cc736=(await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x12a),{'body':_0x459c1d}))[_0x1c2285(0x147)]['reply'];return{..._0x36e456,'id':_0x8cc736[_0x1c2285(0x14d)],'dT':_0x2ad89d(+_0x8cc736[_0x1c2285(0x140)])[_0x1c2285(0x134)](_0x1c2285(0x14b)),'personId':_0x8cc736[_0x1c2285(0x105)]};}else{let _0x289eb6={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464};return A((await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x101),{'body':_0x289eb6}))[_0x1c2285(0x147)]['comment'],_0x36e456);}}async['updateComment'](_0x50fe5b){const _0x58ec21=_0x24c5c3;var _0xda8f9f,_0x4a8384;let {text:_0x4416d6,unitId:_0x2c2f4a}=_0x50fe5b,_0x522789=(_0xda8f9f=(_0x4a8384=_0x4416d6[_0x58ec21(0x122)])==null?void 0x0:_0x4a8384[_0x58ec21(0xf1)](_0x3521ac=>_0x3521ac['rangeType']===_0x5a9d83[_0x58ec21(0xf7)])[_0x58ec21(0xf4)](_0x40c32d=>_0x40c32d[_0x58ec21(0xec)]))==null?[]:_0xda8f9f,_0x591c89=JSON[_0x58ec21(0x142)](_0x4416d6),_0x4a08ed=_0x50fe5b[_0x58ec21(0x109)],_0x413c77=_0x50fe5b['id'],_0x3ea597={'memberId':(await this['_sessionService'][_0x58ec21(0xfa)](_0x2c2f4a))[_0x58ec21(0xff)](),'unitId':_0x2c2f4a,'threadId':_0x4a08ed,'mention':_0x522789,'content':_0x591c89,'replyId':_0x413c77},_0x84bf4c=await this[_0x58ec21(0x126)][_0x58ec21(0x10f)]('/universer-api/comment/unit/'+_0x2c2f4a+_0x58ec21(0x133),{'body':_0x3ea597});return!_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)]||_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)][_0x58ec21(0xfd)]===0x1;}async[_0x24c5c3(0xf9)](_0x1dc2d8){const _0x497f4a=_0x24c5c3;let {unitId:_0x1a73f9}=_0x1dc2d8,_0x52433b=_0x1dc2d8[_0x497f4a(0x109)],_0x1cc4f4={'memberId':this[_0x497f4a(0xed)]['getCurrentUser']()[_0x497f4a(0xe5)],'unitId':_0x1a73f9,'threadId':_0x52433b,'solved':_0x1dc2d8[_0x497f4a(0xfc)]?_0x20f75b[_0x497f4a(0xef)]:_0x20f75b[_0x497f4a(0x11b)]},_0xf3909a=await this[_0x497f4a(0x126)][_0x497f4a(0x10f)](_0x497f4a(0x125)+_0x1a73f9+'/solved',{'body':_0x1cc4f4});return!_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)]||_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)][_0x497f4a(0xfd)]===0x1;}async[_0x24c5c3(0x13e)](_0x4cb99a,_0x344ff7,_0x530db3,_0x2b1f67){const _0x218fc5=_0x24c5c3;let _0x99762b={'memberId':(await this[_0x218fc5(0xfe)][_0x218fc5(0xfa)](_0x4cb99a))[_0x218fc5(0xff)](),'threadId':_0x530db3,'replyId':_0x2b1f67,'unitId':_0x4cb99a},_0x19d51c=await this['_httpService'][_0x218fc5(0x10f)](_0x218fc5(0x125)+_0x4cb99a+'/delete',{'body':_0x99762b});return!_0x19d51c[_0x218fc5(0x147)][_0x218fc5(0x107)]||_0x19d51c[_0x218fc5(0x147)]['error'][_0x218fc5(0xfd)]===0x1;}async[_0x24c5c3(0x14c)](_0x33ad97,_0x4edc46,_0x5cd8cd){const _0x13c0d5=_0x24c5c3;let _0x1fd9fd={'unitId':_0x33ad97,'threadId':_0x5cd8cd},_0x1f5f1c=await this[_0x13c0d5(0x126)][_0x13c0d5(0x10f)](_0x13c0d5(0x125)+_0x33ad97+'/list',{'body':_0x1fd9fd}),_0x63d95c=_0x5cd8cd[_0x13c0d5(0xf4)](_0x6a589f=>j(_0x1f5f1c[_0x13c0d5(0x147)][_0x13c0d5(0x10c)][_0x6a589f],_0x33ad97,_0x4edc46))['filter'](Boolean);return Object[_0x13c0d5(0x12b)](_0x1f5f1c['body']['users'])['forEach'](_0x325695=>{const _0x148b94=_0x13c0d5;this[_0x148b94(0xed)][_0x148b94(0xe6)](_0x325695);}),_0x63d95c;}[_0x24c5c3(0xf3)](_0xd54aa6){const _0x492f2e=_0x24c5c3;return{'id':_0xd54aa6['id'],'threadId':_0xd54aa6[_0x492f2e(0x109)],'ref':_0xd54aa6[_0x492f2e(0x144)]};}};M=E([T(0x0,_0x2bff0e(_0x5a5f64)),T(0x1,_0x2bff0e(_0x2d0607)),T(0x2,_0x2bff0e(_0x19b44))],M);let N=class extends _0x163bfc{constructor(_0x172dc9,_0x3e7705){const _0x250df3=_0x24c5c3;super(),this['_threadCommentDataSourceService']=_0x172dc9,this[_0x250df3(0x120)]=_0x3e7705,this[_0x250df3(0x115)]();}[_0x24c5c3(0x115)](){const _0x509cbd=_0x24c5c3;this[_0x509cbd(0x11d)][_0x509cbd(0xee)]=this[_0x509cbd(0x120)],this[_0x509cbd(0x11d)][_0x509cbd(0x12f)]=!0x1;}};N=E([T(0x0,_0xebaadb),T(0x1,_0x2bff0e(M))],N);function P(_0x3a08ad){'@babel/helpers - typeof';const _0x210936=_0x24c5c3;return P=typeof Symbol=='function'&&typeof Symbol[_0x210936(0x11f)]==_0x210936(0x12e)?function(_0x3acfd3){return typeof _0x3acfd3;}:function(_0x5417f4){const _0x300b55=_0x210936;return _0x5417f4&&typeof Symbol=='function'&&_0x5417f4[_0x300b55(0xfb)]===Symbol&&_0x5417f4!==Symbol['prototype']?_0x300b55(0x12e):typeof _0x5417f4;},P(_0x3a08ad);}function F(_0x434e2d,_0x38b588){const _0x428543=_0x24c5c3;if(P(_0x434e2d)!='object'||!_0x434e2d)return _0x434e2d;var _0x3b4f82=_0x434e2d[Symbol[_0x428543(0x127)]];if(_0x3b4f82!==void 0x0){var _0x2e5374=_0x3b4f82[_0x428543(0x102)](_0x434e2d,_0x38b588||_0x428543(0x148));if(P(_0x2e5374)!=_0x428543(0x141))return _0x2e5374;throw TypeError(_0x428543(0x124));}return(_0x38b588==='string'?String:Number)(_0x434e2d);}function I(_0x20c87){const _0x1079a1=_0x24c5c3;var _0x28bbcc=F(_0x20c87,'string');return P(_0x28bbcc)==_0x1079a1(0x12e)?_0x28bbcc:_0x28bbcc+'';}function L(_0x1e0fa6,_0x1333a9,_0x3e3558){const _0x397a58=_0x24c5c3;return(_0x1333a9=I(_0x1333a9))in _0x1e0fa6?Object[_0x397a58(0x123)](_0x1e0fa6,_0x1333a9,{'value':_0x3e3558,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e0fa6[_0x1333a9]=_0x3e3558,_0x1e0fa6;}let R=class extends _0x1a5129{constructor(_0x4eba27=k,_0x50453a,_0x7eb3ac){const _0x5a8a08=_0x24c5c3;super(),this[_0x5a8a08(0x136)]=_0x4eba27,this['_injector']=_0x50453a,this[_0x5a8a08(0xea)]=_0x7eb3ac;let {..._0x4828ff}=_0x33d367({},k,this[_0x5a8a08(0x136)]);this[_0x5a8a08(0xea)]['setConfig'](O,_0x4828ff);}[_0x24c5c3(0x116)](){const _0x2e85fc=_0x24c5c3;[[M],[N],[D]][_0x2e85fc(0x12d)](_0xc70a5b=>{const _0x1287a8=_0x2e85fc;this[_0x1287a8(0x146)]['add'](_0xc70a5b);});}[_0x24c5c3(0xe8)](){const _0x163bed=_0x24c5c3;this[_0x163bed(0x146)]['get'](N),this[_0x163bed(0x146)][_0x163bed(0xf0)](D);}};L(R,_0x24c5c3(0x11c),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),L(R,_0x24c5c3(0x10a),x),L(R,_0x24c5c3(0x104),S),R=E([_0x140f68(_0x42b7ee,_0x3f9642,_0x3dce09),T(0x1,_0x2bff0e(_0xc96534)),T(0x2,_0x4f4aa1)],R);export{R as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2d26a6=_0x2ba5;(function(_0x21e4ce,_0x42e270){const _0xb8fbad=_0x2ba5,_0x3cb9c9=_0x21e4ce();while(!![]){try{const _0x23bf7c=parseInt(_0xb8fbad(0x19b))/0x1+parseInt(_0xb8fbad(0x185))/0x2*(-parseInt(_0xb8fbad(0x14c))/0x3)+-parseInt(_0xb8fbad(0x134))/0x4*(parseInt(_0xb8fbad(0x171))/0x5)+parseInt(_0xb8fbad(0x16c))/0x6*(parseInt(_0xb8fbad(0x130))/0x7)+parseInt(_0xb8fbad(0x140))/0x8*(-parseInt(_0xb8fbad(0x195))/0x9)+-parseInt(_0xb8fbad(0x16e))/0xa+parseInt(_0xb8fbad(0x174))/0xb;if(_0x23bf7c===_0x42e270)break;else _0x3cb9c9['push'](_0x3cb9c9['shift']());}catch(_0x2c32c7){_0x3cb9c9['push'](_0x3cb9c9['shift']());}}}(_0x290d,0x90b33));import{CollaborationSessionService as _0xd87e6b,CommentService as _0x586dcc,UniverCollaborationClientPlugin as _0x460a44}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e0834}from'@univerjs-pro/license';import{CustomRangeType as _0x3127fb,DependentOn as _0x175384,Disposable as _0x58c259,IConfigService as _0x59450d,Inject as _0xdf2566,Injector as _0x1f4feb,Plugin as _0x4a5d56,UserManagerService as _0x4eed35,dateKit as _0x2614e0,merge as _0x1c1028}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ecaf2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x46cb72,CommentUpdateEventType as _0x4d74d2}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x4cbc31,ThreadCommentModel as _0x516c61}from'@univerjs/thread-comment';import{bufferTime as _0x4099c8}from'rxjs';import{HTTPService as _0x5d2e8b}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S='0.23.0';const C=_0x1b3731=>_0x2614e0(new Date(+_0x1b3731))[_0x2d26a6(0x166)](_0x2d26a6(0x17b)),w=async(_0x245547,_0x134fcd)=>{const _0x50984=_0x2d26a6;let _0x3b3d66=_0x245547[_0x50984(0x186)](_0x4eed35),_0x2b75ab=_0x245547[_0x50984(0x186)](_0x5d2e8b);_0x134fcd[_0x50984(0x182)](_0x4c80ca=>{const _0x4e6535=_0x50984;_0x3b3d66[_0x4e6535(0x196)](_0x4c80ca)&&_0x134fcd[_0x4e6535(0x17c)](_0x4c80ca);}),_0x134fcd[_0x50984(0x183)]&&(await _0x2b75ab[_0x50984(0x186)]('/universer-api/user/list',{'params':{'userIDs':[..._0x134fcd]}}))['body'][_0x50984(0x18c)][_0x50984(0x182)](_0x3c87c6=>{const _0x276569=_0x50984;_0x3c87c6&&_0x3b3d66[_0x276569(0x13e)](_0x3c87c6);});};function T(_0x18e753,_0x2b12d3){return function(_0x3786ac,_0x1aa819){_0x2b12d3(_0x3786ac,_0x1aa819,_0x18e753);};}function _0x290d(){const _0x4b6597=['Edit','thread-comment-data-source.config','onReady','_threadCommentDataSourceService','_injector','content','replyId','solved','getUnit','/solved','parentId','comment','dataSource','/list','replies','default','_httpService','post','userId','resolveComment','iterator','slice','length','format','Solve','find','Solved','listComments','decorate','12QNjpLu','saveCommentToSnapshot','11593120DotlRv','map','rangeId','5672795BhqXDW','/universer-api/comment/unit/','_config','32142704FVDXNf','parse','_sessionService','_commentService','packageName','addComment','Add','YYYY/MM/DD\x20HH:mm','delete','syncUpdateMutationToColla','unitId','type','stringify','getMemberID','forEach','size','_init','210AUfoZy','get','deleteComment','add','OpenOrReOpen','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','constructor','error','resolved','user','/delete','createTimestamp','code','_initUserSync','392652jtiYCp','getUser','Reply','_configService','function','customRanges','219361BKEZLw','2792566qFCdCy','object','setConfig','symbol','4vnLxYl','getOwnPropertyDescriptor','commentUpdate$','payload','body','getCurrentUser','_threadCommentModel','ref','comments','COMMENT','addUser','string','144wAUEZJ','rangeType','_userService','getComment','reply','values','prototype','updateComment','disposeWithMe','_threadCommentDataSource','_initDataSource','userID','7641YFrOUw','pipe','threadId'];_0x290d=function(){return _0x4b6597;};return _0x290d();}function E(_0x2a2a8b,_0x12fb2d,_0x152f32,_0x4bef7d){const _0x556c7b=_0x2d26a6;var _0xaeae04=arguments[_0x556c7b(0x165)],_0x1edb6d=_0xaeae04<0x3?_0x12fb2d:_0x4bef7d===null?_0x4bef7d=Object[_0x556c7b(0x135)](_0x12fb2d,_0x152f32):_0x4bef7d,_0x2f8ead;if(typeof Reflect==_0x556c7b(0x131)&&typeof Reflect['decorate']==_0x556c7b(0x199))_0x1edb6d=Reflect[_0x556c7b(0x16b)](_0x2a2a8b,_0x12fb2d,_0x152f32,_0x4bef7d);else{for(var _0x5c78b3=_0x2a2a8b[_0x556c7b(0x165)]-0x1;_0x5c78b3>=0x0;_0x5c78b3--)(_0x2f8ead=_0x2a2a8b[_0x5c78b3])&&(_0x1edb6d=(_0xaeae04<0x3?_0x2f8ead(_0x1edb6d):_0xaeae04>0x3?_0x2f8ead(_0x12fb2d,_0x152f32,_0x1edb6d):_0x2f8ead(_0x12fb2d,_0x152f32))||_0x1edb6d);}return _0xaeae04>0x3&&_0x1edb6d&&Object['defineProperty'](_0x12fb2d,_0x152f32,_0x1edb6d),_0x1edb6d;}let D=class extends _0x58c259{constructor(_0x536d99,_0x40c92e,_0x4e98d8,_0x3ae393){const _0x3ffbcc=_0x2d26a6;super(),this[_0x3ffbcc(0x177)]=_0x536d99,this[_0x3ffbcc(0x13a)]=_0x40c92e,this[_0x3ffbcc(0x142)]=_0x4e98d8,this[_0x3ffbcc(0x153)]=_0x3ae393,this[_0x3ffbcc(0x184)](),this[_0x3ffbcc(0x194)]();}[_0x2d26a6(0x194)](){const _0x184eff=_0x2d26a6;this['disposeWithMe'](this['_threadCommentModel'][_0x184eff(0x136)][_0x184eff(0x14d)](_0x4099c8(0x10))['subscribe'](_0x1f948f=>{const _0x505e49=_0x184eff;let _0x5ce95f=new Set();_0x1f948f[_0x505e49(0x182)](_0x45661d=>{const _0x78774=_0x505e49;switch(_0x45661d[_0x78774(0x17f)]){case _0x78774(0x188):{let _0x20c76e=_0x45661d[_0x78774(0x137)]['personId'];_0x5ce95f[_0x78774(0x188)](_0x20c76e);break;}default:break;}}),w(this[_0x505e49(0x153)],_0x5ce95f);}));}['_init'](){const _0x4ac7ee=_0x2d26a6;this[_0x4ac7ee(0x148)](this[_0x4ac7ee(0x177)][_0x4ac7ee(0x136)]['subscribe'](async _0x59090e=>{const _0x1c6e89=_0x4ac7ee;var _0x5d9186;let _0x572ab6=(_0x5d9186=this[_0x1c6e89(0x13a)][_0x1c6e89(0x157)](_0x59090e[_0x1c6e89(0x17e)])[_0x1c6e89(0x168)](_0x5bb261=>_0x5bb261[_0x1c6e89(0x14e)]===_0x59090e['threadId']))==null?void 0x0:_0x5d9186['root'];if(!_0x572ab6)return;let {unitId:_0x5bfe07,subUnitId:_0x68ed10}=_0x572ab6;switch(_0x59090e[_0x1c6e89(0x190)]&&this[_0x1c6e89(0x142)][_0x1c6e89(0x13e)](_0x59090e[_0x1c6e89(0x190)]),_0x59090e[_0x1c6e89(0x17f)]){case _0x4d74d2[_0x1c6e89(0x17a)]:break;case _0x4d74d2[_0x1c6e89(0x197)]:var _0x25904a,_0x27db30;this['_threadCommentModel'][_0x1c6e89(0x179)](_0x5bfe07,_0x68ed10,{'unitId':_0x5bfe07,'subUnitId':_0x68ed10,'ref':'','id':_0x59090e['replyId'],'dT':C(+_0x59090e[_0x1c6e89(0x192)]),'threadId':_0x59090e[_0x1c6e89(0x14e)],'personId':(_0x25904a=(_0x27db30=_0x59090e[_0x1c6e89(0x190)])==null?void 0x0:_0x27db30[_0x1c6e89(0x14b)])==null?_0x59090e['userId']:_0x25904a,'text':JSON[_0x1c6e89(0x175)](_0x59090e['content']),'parentId':_0x572ab6['id']});break;case _0x4d74d2['Delete']:{let _0x39da31=this[_0x1c6e89(0x13a)][_0x1c6e89(0x143)](_0x5bfe07,_0x68ed10,_0x59090e[_0x1c6e89(0x155)]);_0x39da31&&_0x39da31[_0x1c6e89(0x159)]&&this['_threadCommentModel'][_0x1c6e89(0x187)](_0x5bfe07,_0x68ed10,_0x59090e[_0x1c6e89(0x155)]);break;}case _0x4d74d2[_0x1c6e89(0x14f)]:this[_0x1c6e89(0x13a)][_0x1c6e89(0x147)](_0x5bfe07,_0x68ed10,{'commentId':_0x59090e[_0x1c6e89(0x155)],'text':JSON[_0x1c6e89(0x175)](_0x59090e[_0x1c6e89(0x154)])});break;case _0x4d74d2[_0x1c6e89(0x167)]:{var _0x1d7d6c;let _0x2b5e7a=(_0x1d7d6c=this[_0x1c6e89(0x13a)][_0x1c6e89(0x157)](_0x59090e[_0x1c6e89(0x17e)])[_0x1c6e89(0x168)](_0x24851a=>_0x24851a[_0x1c6e89(0x14e)]===_0x59090e[_0x1c6e89(0x14e)]))==null?void 0x0:_0x1d7d6c['root'];_0x2b5e7a&&this[_0x1c6e89(0x13a)][_0x1c6e89(0x162)](_0x5bfe07,_0x68ed10,_0x2b5e7a['id'],_0x59090e[_0x1c6e89(0x156)]===_0x46cb72[_0x1c6e89(0x169)]);break;}default:break;}}));}};D=E([T(0x0,_0xdf2566(_0x586dcc)),T(0x1,_0xdf2566(_0x516c61)),T(0x2,_0xdf2566(_0x4eed35)),T(0x3,_0xdf2566(_0x1f4feb))],D);const O=_0x2d26a6(0x150);Symbol(O);const k={};function _0x2ba5(_0x5cd984,_0x823ffa){_0x5cd984=_0x5cd984-0x130;const _0x290d17=_0x290d();let _0x2ba583=_0x290d17[_0x5cd984];return _0x2ba583;}function A(_0x1238ce,_0x26ae3f){const _0x3ccaf0=_0x2d26a6;let _0x53d403=_0x1238ce['replies'][0x0];return{..._0x26ae3f,'id':_0x53d403['replyId'],'resolved':_0x1238ce[_0x3ccaf0(0x156)]===0x1,'dT':C(_0x53d403['createTimestamp']),'personId':_0x53d403[_0x3ccaf0(0x161)],'threadId':_0x53d403['threadId']};}function j(_0x582fc1,_0x63c974,_0x2ebd13){const _0x140708=_0x2d26a6;var _0x54104c,_0x5bc8e0;if(((_0x54104c=_0x582fc1==null||(_0x5bc8e0=_0x582fc1[_0x140708(0x15d)])==null?void 0x0:_0x5bc8e0[_0x140708(0x165)])==null?0x0:_0x54104c)>0x0){let _0x416dc1=(_0x23eeb3,_0x4331b1)=>({'id':_0x23eeb3[_0x140708(0x155)],'threadId':_0x23eeb3[_0x140708(0x14e)],'dT':C(_0x23eeb3['createTimestamp']),'personId':_0x23eeb3['userId'],'resolved':_0x582fc1['solved']===_0x46cb72[_0x140708(0x169)],'unitId':_0x63c974,'subUnitId':_0x2ebd13,'text':JSON['parse'](_0x23eeb3['content']),'parentId':_0x4331b1}),_0x179126=_0x416dc1(_0x582fc1[_0x140708(0x15d)][0x0]);return{..._0x179126,'children':_0x582fc1[_0x140708(0x15d)][_0x140708(0x164)](0x1)[_0x140708(0x16f)](_0x4f51e8=>_0x416dc1(_0x4f51e8,_0x179126['id']))};}return null;}let M=class{constructor(_0x213e5b,_0x589a77,_0x43b3f7){const _0x302133=_0x2d26a6;this[_0x302133(0x15f)]=_0x213e5b,this['_userService']=_0x589a77,this[_0x302133(0x176)]=_0x43b3f7;}async['addComment'](_0x70cc19){const _0x56dda1=_0x2d26a6;var _0x43daaf,_0x2b7b9e;let {parentId:_0x12d7de,unitId:_0x3904fe,text:_0x478315,threadId:_0x4b3a1f}=_0x70cc19,_0x923872=(_0x43daaf=(_0x2b7b9e=_0x478315[_0x56dda1(0x19a)])==null?void 0x0:_0x2b7b9e['filter'](_0x5c683e=>_0x5c683e[_0x56dda1(0x141)]===_0x3127fb['COMMENT'])['map'](_0x11270f=>_0x11270f[_0x56dda1(0x170)]))==null?[]:_0x43daaf,_0xf60eb7=JSON[_0x56dda1(0x180)](_0x478315),_0x670d0d=(await this['_sessionService'][_0x56dda1(0x18a)](_0x3904fe))['getMemberID']();if(_0x12d7de){let _0x231330={'memberId':_0x670d0d,'unitId':_0x3904fe,'content':_0xf60eb7,'mention':_0x923872,'threadId':_0x4b3a1f},_0x5263d3=(await this[_0x56dda1(0x15f)][_0x56dda1(0x160)](_0x56dda1(0x172)+_0x3904fe+'/reply',{'body':_0x231330}))['body'][_0x56dda1(0x144)];return{..._0x70cc19,'id':_0x5263d3[_0x56dda1(0x155)],'dT':_0x2614e0(+_0x5263d3[_0x56dda1(0x192)])['format'](_0x56dda1(0x17b)),'personId':_0x5263d3[_0x56dda1(0x161)]};}else{let _0x453e82={'memberId':_0x670d0d,'unitId':_0x3904fe,'content':_0xf60eb7,'mention':_0x923872};return A((await this['_httpService'][_0x56dda1(0x160)](_0x56dda1(0x172)+_0x3904fe+'/add',{'body':_0x453e82}))[_0x56dda1(0x138)][_0x56dda1(0x15a)],_0x70cc19);}}async[_0x2d26a6(0x147)](_0x3e410e){const _0x47787e=_0x2d26a6;var _0x2a01b,_0x45d856;let {text:_0x9f000a,unitId:_0x4bd959}=_0x3e410e,_0xb74161=(_0x2a01b=(_0x45d856=_0x9f000a[_0x47787e(0x19a)])==null?void 0x0:_0x45d856['filter'](_0x4f4bd3=>_0x4f4bd3['rangeType']===_0x3127fb[_0x47787e(0x13d)])[_0x47787e(0x16f)](_0x4dc3aa=>_0x4dc3aa[_0x47787e(0x170)]))==null?[]:_0x2a01b,_0x571cca=JSON[_0x47787e(0x180)](_0x9f000a),_0x4fa012=_0x3e410e[_0x47787e(0x14e)],_0x14d74f=_0x3e410e['id'],_0x3b7895={'memberId':(await this[_0x47787e(0x176)][_0x47787e(0x18a)](_0x4bd959))[_0x47787e(0x181)](),'unitId':_0x4bd959,'threadId':_0x4fa012,'mention':_0xb74161,'content':_0x571cca,'replyId':_0x14d74f},_0x5ea6e3=await this[_0x47787e(0x15f)]['post'](_0x47787e(0x172)+_0x4bd959+'/edit',{'body':_0x3b7895});return!_0x5ea6e3[_0x47787e(0x138)]['error']||_0x5ea6e3[_0x47787e(0x138)]['error'][_0x47787e(0x193)]===0x1;}async[_0x2d26a6(0x162)](_0x1fdb11){const _0x41c4a1=_0x2d26a6;let {unitId:_0x530d51}=_0x1fdb11,_0x577280=_0x1fdb11['threadId'],_0x1ed450={'memberId':this[_0x41c4a1(0x142)][_0x41c4a1(0x139)]()['userID'],'unitId':_0x530d51,'threadId':_0x577280,'solved':_0x1fdb11[_0x41c4a1(0x18f)]?_0x46cb72['Solved']:_0x46cb72[_0x41c4a1(0x189)]},_0x1481e6=await this[_0x41c4a1(0x15f)][_0x41c4a1(0x160)](_0x41c4a1(0x172)+_0x530d51+_0x41c4a1(0x158),{'body':_0x1ed450});return!_0x1481e6[_0x41c4a1(0x138)][_0x41c4a1(0x18e)]||_0x1481e6['body']['error']['code']===0x1;}async[_0x2d26a6(0x187)](_0xa10768,_0x12dcb9,_0x3e347e,_0x551e75){const _0xd758c4=_0x2d26a6;let _0xd747f7={'memberId':(await this[_0xd758c4(0x176)]['requireSession'](_0xa10768))['getMemberID'](),'threadId':_0x3e347e,'replyId':_0x551e75,'unitId':_0xa10768},_0x168ae7=await this[_0xd758c4(0x15f)][_0xd758c4(0x160)](_0xd758c4(0x172)+_0xa10768+_0xd758c4(0x191),{'body':_0xd747f7});return!_0x168ae7[_0xd758c4(0x138)][_0xd758c4(0x18e)]||_0x168ae7[_0xd758c4(0x138)][_0xd758c4(0x18e)][_0xd758c4(0x193)]===0x1;}async[_0x2d26a6(0x16a)](_0x140baf,_0x878594,_0x2a5d51){const _0x3fe828=_0x2d26a6;let _0x2d4436={'unitId':_0x140baf,'threadId':_0x2a5d51},_0x2782b2=await this[_0x3fe828(0x15f)][_0x3fe828(0x160)](_0x3fe828(0x172)+_0x140baf+_0x3fe828(0x15c),{'body':_0x2d4436}),_0x4272ba=_0x2a5d51[_0x3fe828(0x16f)](_0x48f2e7=>j(_0x2782b2[_0x3fe828(0x138)][_0x3fe828(0x13c)][_0x48f2e7],_0x140baf,_0x878594))['filter'](Boolean);return Object[_0x3fe828(0x145)](_0x2782b2[_0x3fe828(0x138)]['users'])[_0x3fe828(0x182)](_0x5606fa=>{const _0x3589a6=_0x3fe828;this['_userService'][_0x3589a6(0x13e)](_0x5606fa);}),_0x4272ba;}[_0x2d26a6(0x16d)](_0x2816ec){const _0x51362e=_0x2d26a6;return{'id':_0x2816ec['id'],'threadId':_0x2816ec['threadId'],'ref':_0x2816ec[_0x51362e(0x13b)]};}};M=E([T(0x0,_0xdf2566(_0x5d2e8b)),T(0x1,_0xdf2566(_0x4eed35)),T(0x2,_0xdf2566(_0xd87e6b))],M);let N=class extends _0x58c259{constructor(_0x29cce9,_0x2e8657){const _0xc3731e=_0x2d26a6;super(),this[_0xc3731e(0x152)]=_0x29cce9,this['_threadCommentDataSource']=_0x2e8657,this['_initDataSource']();}[_0x2d26a6(0x14a)](){const _0x3cfeaf=_0x2d26a6;this[_0x3cfeaf(0x152)][_0x3cfeaf(0x15b)]=this[_0x3cfeaf(0x149)],this[_0x3cfeaf(0x152)][_0x3cfeaf(0x17d)]=!0x1;}};N=E([T(0x0,_0x4cbc31),T(0x1,_0xdf2566(M))],N);function P(_0x4a80d6){'@babel/helpers - typeof';const _0x14f63f=_0x2d26a6;return P=typeof Symbol=='function'&&typeof Symbol[_0x14f63f(0x163)]=='symbol'?function(_0x17a81b){return typeof _0x17a81b;}:function(_0x221a1b){const _0x1990ea=_0x14f63f;return _0x221a1b&&typeof Symbol==_0x1990ea(0x199)&&_0x221a1b[_0x1990ea(0x18d)]===Symbol&&_0x221a1b!==Symbol[_0x1990ea(0x146)]?_0x1990ea(0x133):typeof _0x221a1b;},P(_0x4a80d6);}function F(_0x35bd12,_0x5085a4){const _0x533cc1=_0x2d26a6;if(P(_0x35bd12)!=_0x533cc1(0x131)||!_0x35bd12)return _0x35bd12;var _0x3957b0=_0x35bd12[Symbol['toPrimitive']];if(_0x3957b0!==void 0x0){var _0x102eb8=_0x3957b0['call'](_0x35bd12,_0x5085a4||_0x533cc1(0x15e));if(P(_0x102eb8)!=_0x533cc1(0x131))return _0x102eb8;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5085a4==='string'?String:Number)(_0x35bd12);}function I(_0x5b4c2b){const _0x7ceb78=_0x2d26a6;var _0x44e358=F(_0x5b4c2b,_0x7ceb78(0x13f));return P(_0x44e358)==_0x7ceb78(0x133)?_0x44e358:_0x44e358+'';}function L(_0x17cb96,_0xf98b65,_0x2422c4){return(_0xf98b65=I(_0xf98b65))in _0x17cb96?Object['defineProperty'](_0x17cb96,_0xf98b65,{'value':_0x2422c4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x17cb96[_0xf98b65]=_0x2422c4,_0x17cb96;}let R=class extends _0x4a5d56{constructor(_0x1279fd=k,_0x26b6b1,_0x5470a9){const _0x210f05=_0x2d26a6;super(),this['_config']=_0x1279fd,this[_0x210f05(0x153)]=_0x26b6b1,this[_0x210f05(0x198)]=_0x5470a9;let {..._0x5ea9ee}=_0x1c1028({},k,this[_0x210f05(0x173)]);this['_configService'][_0x210f05(0x132)](O,_0x5ea9ee);}['onStarting'](){[[M],[N],[D]]['forEach'](_0x414233=>{const _0x581557=_0x2ba5;this[_0x581557(0x153)][_0x581557(0x188)](_0x414233);});}[_0x2d26a6(0x151)](){const _0x2686dc=_0x2d26a6;this[_0x2686dc(0x153)][_0x2686dc(0x186)](N),this[_0x2686dc(0x153)][_0x2686dc(0x186)](D);}};L(R,'pluginName',_0x2d26a6(0x18b)),L(R,_0x2d26a6(0x178),x),L(R,'version',S),R=E([_0x175384(_0x5ecaf2,_0x460a44,_0x5e0834),T(0x1,_0xdf2566(_0x1f4feb)),T(0x2,_0x59450d)],R);export{R as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x24c5c3=_0x5900;(function(_0x553a0c,_0x4a2a8f){const _0x2a2031=_0x5900,_0x121997=_0x553a0c();while(!![]){try{const _0xe2541b=-parseInt(_0x2a2031(0x10d))/0x1+-parseInt(_0x2a2031(0x100))/0x2+-parseInt(_0x2a2031(0x119))/0x3*(-parseInt(_0x2a2031(0x139))/0x4)+-parseInt(_0x2a2031(0x10b))/0x5*(parseInt(_0x2a2031(0x145))/0x6)+parseInt(_0x2a2031(0xf2))/0x7*(parseInt(_0x2a2031(0x13a))/0x8)+-parseInt(_0x2a2031(0x143))/0x9*(-parseInt(_0x2a2031(0x132))/0xa)+-parseInt(_0x2a2031(0x106))/0xb*(-parseInt(_0x2a2031(0x118))/0xc);if(_0xe2541b===_0x4a2a8f)break;else _0x121997['push'](_0x121997['shift']());}catch(_0x3a7009){_0x121997['push'](_0x121997['shift']());}}}(_0x2d56,0x31105));import{CollaborationSessionService as _0x19b44,CommentService as _0x24e92c,UniverCollaborationClientPlugin as _0x3f9642}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3dce09}from'@univerjs-pro/license';import{CustomRangeType as _0x5a9d83,DependentOn as _0x140f68,Disposable as _0x163bfc,IConfigService as _0x4f4aa1,Inject as _0x2bff0e,Injector as _0xc96534,Plugin as _0x1a5129,UserManagerService as _0x2d0607,dateKit as _0x2ad89d,merge as _0x33d367}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42b7ee}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x20f75b,CommentUpdateEventType as _0x558fda}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0xebaadb,ThreadCommentModel as _0x192dc2}from'@univerjs/thread-comment';function _0x5900(_0x5aeda0,_0x30b58a){_0x5aeda0=_0x5aeda0-0xe4;const _0x2d56f7=_0x2d56();let _0x5900d8=_0x2d56f7[_0x5aeda0];return _0x5900d8;}import{bufferTime as _0x2f4805}from'rxjs';import{HTTPService as _0x5a5f64}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S=_0x24c5c3(0x128);const C=_0x5b4d20=>_0x2ad89d(new Date(+_0x5b4d20))[_0x24c5c3(0x134)](_0x24c5c3(0x14b)),w=async(_0x2ce6f7,_0x10599c)=>{const _0x4c49c1=_0x24c5c3;let _0x3d39f8=_0x2ce6f7[_0x4c49c1(0xf0)](_0x2d0607),_0x968fce=_0x2ce6f7[_0x4c49c1(0xf0)](_0x5a5f64);_0x10599c[_0x4c49c1(0x12d)](_0x10980a=>{const _0x4497fa=_0x4c49c1;_0x3d39f8[_0x4497fa(0x11e)](_0x10980a)&&_0x10599c['delete'](_0x10980a);}),_0x10599c['size']&&(await _0x968fce['get'](_0x4c49c1(0x138),{'params':{'userIDs':[..._0x10599c]}}))[_0x4c49c1(0x147)]['users'][_0x4c49c1(0x12d)](_0x5dc0a5=>{_0x5dc0a5&&_0x3d39f8['addUser'](_0x5dc0a5);});};function T(_0x5e840d,_0x5b0e60){return function(_0x5a3bdb,_0x3c0d20){_0x5b0e60(_0x5a3bdb,_0x3c0d20,_0x5e840d);};}function E(_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f){const _0x5e4a6a=_0x24c5c3;var _0x32bb00=arguments[_0x5e4a6a(0x13d)],_0x3677d3=_0x32bb00<0x3?_0x39a30b:_0x315a5f===null?_0x315a5f=Object['getOwnPropertyDescriptor'](_0x39a30b,_0xbc01dd):_0x315a5f,_0x178738;if(typeof Reflect=='object'&&typeof Reflect[_0x5e4a6a(0x114)]==_0x5e4a6a(0x130))_0x3677d3=Reflect[_0x5e4a6a(0x114)](_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f);else{for(var _0x288038=_0x51e779[_0x5e4a6a(0x13d)]-0x1;_0x288038>=0x0;_0x288038--)(_0x178738=_0x51e779[_0x288038])&&(_0x3677d3=(_0x32bb00<0x3?_0x178738(_0x3677d3):_0x32bb00>0x3?_0x178738(_0x39a30b,_0xbc01dd,_0x3677d3):_0x178738(_0x39a30b,_0xbc01dd))||_0x3677d3);}return _0x32bb00>0x3&&_0x3677d3&&Object[_0x5e4a6a(0x123)](_0x39a30b,_0xbc01dd,_0x3677d3),_0x3677d3;}let D=class extends _0x163bfc{constructor(_0x2ecab8,_0x562d35,_0x43a27d,_0x5626c3){const _0x539a12=_0x24c5c3;super(),this[_0x539a12(0x12c)]=_0x2ecab8,this[_0x539a12(0x129)]=_0x562d35,this['_userService']=_0x43a27d,this['_injector']=_0x5626c3,this['_init'](),this['_initUserSync']();}[_0x24c5c3(0x14a)](){const _0xf73f7c=_0x24c5c3;this['disposeWithMe'](this[_0xf73f7c(0x129)][_0xf73f7c(0x13b)][_0xf73f7c(0xe4)](_0x2f4805(0x10))[_0xf73f7c(0x117)](_0x6fe9cc=>{const _0x5e6af9=_0xf73f7c;let _0xfd89ee=new Set();_0x6fe9cc[_0x5e6af9(0x12d)](_0x276dcd=>{const _0xedc54b=_0x5e6af9;switch(_0x276dcd[_0xedc54b(0xf5)]){case _0xedc54b(0x131):{let _0x39913b=_0x276dcd[_0xedc54b(0x112)][_0xedc54b(0x113)];_0xfd89ee[_0xedc54b(0x131)](_0x39913b);break;}default:break;}}),w(this[_0x5e6af9(0x146)],_0xfd89ee);}));}[_0x24c5c3(0xeb)](){const _0x117ea2=_0x24c5c3;this[_0x117ea2(0x110)](this[_0x117ea2(0x12c)][_0x117ea2(0x13b)][_0x117ea2(0x117)](async _0x24df94=>{const _0x25c1cd=_0x117ea2;var _0x52bba0;let _0x1ac1fa=(_0x52bba0=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x7f9a56=>_0x7f9a56[_0x25c1cd(0x109)]===_0x24df94['threadId']))==null?void 0x0:_0x52bba0[_0x25c1cd(0x121)];if(!_0x1ac1fa)return;let {unitId:_0x1ce9f5,subUnitId:_0x1383d5}=_0x1ac1fa;switch(_0x24df94['user']&&this[_0x25c1cd(0xed)][_0x25c1cd(0xe6)](_0x24df94[_0x25c1cd(0x149)]),_0x24df94[_0x25c1cd(0xf5)]){case _0x558fda['Add']:break;case _0x558fda[_0x25c1cd(0x111)]:var _0xc75f62,_0x56cf40;this[_0x25c1cd(0x129)][_0x25c1cd(0x135)](_0x1ce9f5,_0x1383d5,{'unitId':_0x1ce9f5,'subUnitId':_0x1383d5,'ref':'','id':_0x24df94[_0x25c1cd(0x14d)],'dT':C(+_0x24df94[_0x25c1cd(0x140)]),'threadId':_0x24df94[_0x25c1cd(0x109)],'personId':(_0xc75f62=(_0x56cf40=_0x24df94[_0x25c1cd(0x149)])==null?void 0x0:_0x56cf40[_0x25c1cd(0xe5)])==null?_0x24df94['userId']:_0xc75f62,'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)]),'parentId':_0x1ac1fa['id']});break;case _0x558fda[_0x25c1cd(0x13c)]:{let _0x5985db=this[_0x25c1cd(0x129)][_0x25c1cd(0xe9)](_0x1ce9f5,_0x1383d5,_0x24df94['replyId']);_0x5985db&&_0x5985db['parentId']&&this[_0x25c1cd(0x129)][_0x25c1cd(0x13e)](_0x1ce9f5,_0x1383d5,_0x24df94[_0x25c1cd(0x14d)]);break;}case _0x558fda['Edit']:this[_0x25c1cd(0x129)]['updateComment'](_0x1ce9f5,_0x1383d5,{'commentId':_0x24df94['replyId'],'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)])});break;case _0x558fda[_0x25c1cd(0x103)]:{var _0x487ab4;let _0x17542d=(_0x487ab4=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x5d3f95=>_0x5d3f95['threadId']===_0x24df94[_0x25c1cd(0x109)]))==null?void 0x0:_0x487ab4[_0x25c1cd(0x121)];_0x17542d&&this[_0x25c1cd(0x129)][_0x25c1cd(0xf9)](_0x1ce9f5,_0x1383d5,_0x17542d['id'],_0x24df94[_0x25c1cd(0x108)]===_0x20f75b[_0x25c1cd(0xef)]);break;}default:break;}}));}};D=E([T(0x0,_0x2bff0e(_0x24e92c)),T(0x1,_0x2bff0e(_0x192dc2)),T(0x2,_0x2bff0e(_0x2d0607)),T(0x3,_0x2bff0e(_0xc96534))],D);const O='thread-comment-data-source.config';Symbol(O);const k={};function A(_0x2890d4,_0x13d050){const _0x49cf9c=_0x24c5c3;let _0x2378a8=_0x2890d4[_0x49cf9c(0x137)][0x0];return{..._0x13d050,'id':_0x2378a8[_0x49cf9c(0x14d)],'resolved':_0x2890d4[_0x49cf9c(0x108)]===0x1,'dT':C(_0x2378a8[_0x49cf9c(0x140)]),'personId':_0x2378a8[_0x49cf9c(0x105)],'threadId':_0x2378a8[_0x49cf9c(0x109)]};}function _0x2d56(){const _0x3cae25=['_threadCommentDataSource','root','customRanges','defineProperty','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','/universer-api/comment/unit/','_httpService','toPrimitive','0.24.0','_threadCommentModel','/reply','values','_commentService','forEach','symbol','syncUpdateMutationToColla','function','add','20CcruKl','/edit','format','addComment','_config','replies','/universer-api/user/list','36KYFtQV','2288leTztJ','commentUpdate$','Delete','length','deleteComment','parse','createTimestamp','object','stringify','903366xEVOKz','ref','6OPsOtN','_injector','body','default','user','_initUserSync','YYYY/MM/DD\x20HH:mm','listComments','replyId','pipe','userID','addUser','getUnit','onReady','getComment','_configService','_init','rangeId','_userService','dataSource','Solved','get','filter','9373xdIcmN','saveCommentToSnapshot','map','type','unitId','COMMENT','rangeType','resolveComment','requireSession','constructor','resolved','code','_sessionService','getMemberID','247898xdMqpk','/add','call','Solve','version','userId','15598FgmBrc','error','solved','threadId','packageName','268310CQNkgp','comments','384848vrNYdm','content','post','disposeWithMe','Reply','payload','personId','decorate','_initDataSource','onStarting','subscribe','672LzQQnd','33438iEEbfp','find','OpenOrReOpen','pluginName','_threadCommentDataSourceService','getUser','iterator'];_0x2d56=function(){return _0x3cae25;};return _0x2d56();}function j(_0x5df83d,_0x54d4a3,_0x3929da){const _0x356783=_0x24c5c3;var _0x239006,_0x5d9189;if(((_0x239006=_0x5df83d==null||(_0x5d9189=_0x5df83d[_0x356783(0x137)])==null?void 0x0:_0x5d9189['length'])==null?0x0:_0x239006)>0x0){let _0x2c7c02=(_0x36cc43,_0x10accb)=>({'id':_0x36cc43[_0x356783(0x14d)],'threadId':_0x36cc43['threadId'],'dT':C(_0x36cc43[_0x356783(0x140)]),'personId':_0x36cc43[_0x356783(0x105)],'resolved':_0x5df83d['solved']===_0x20f75b[_0x356783(0xef)],'unitId':_0x54d4a3,'subUnitId':_0x3929da,'text':JSON[_0x356783(0x13f)](_0x36cc43[_0x356783(0x10e)]),'parentId':_0x10accb}),_0xa2a6c=_0x2c7c02(_0x5df83d['replies'][0x0]);return{..._0xa2a6c,'children':_0x5df83d[_0x356783(0x137)]['slice'](0x1)[_0x356783(0xf4)](_0x1f27cf=>_0x2c7c02(_0x1f27cf,_0xa2a6c['id']))};}return null;}let M=class{constructor(_0x96c43a,_0x35052b,_0x5cd31d){const _0x51a981=_0x24c5c3;this[_0x51a981(0x126)]=_0x96c43a,this['_userService']=_0x35052b,this[_0x51a981(0xfe)]=_0x5cd31d;}async[_0x24c5c3(0x135)](_0x36e456){const _0x1c2285=_0x24c5c3;var _0x300f2e,_0x1de19b;let {parentId:_0x19af64,unitId:_0x93938b,text:_0x1ffdeb,threadId:_0x1b65de}=_0x36e456,_0x568464=(_0x300f2e=(_0x1de19b=_0x1ffdeb[_0x1c2285(0x122)])==null?void 0x0:_0x1de19b[_0x1c2285(0xf1)](_0x12a39c=>_0x12a39c[_0x1c2285(0xf8)]===_0x5a9d83[_0x1c2285(0xf7)])[_0x1c2285(0xf4)](_0x1e0578=>_0x1e0578[_0x1c2285(0xec)]))==null?[]:_0x300f2e,_0x4db456=JSON['stringify'](_0x1ffdeb),_0x53fa50=(await this[_0x1c2285(0xfe)][_0x1c2285(0xfa)](_0x93938b))['getMemberID']();if(_0x19af64){let _0x459c1d={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464,'threadId':_0x1b65de},_0x8cc736=(await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x12a),{'body':_0x459c1d}))[_0x1c2285(0x147)]['reply'];return{..._0x36e456,'id':_0x8cc736[_0x1c2285(0x14d)],'dT':_0x2ad89d(+_0x8cc736[_0x1c2285(0x140)])[_0x1c2285(0x134)](_0x1c2285(0x14b)),'personId':_0x8cc736[_0x1c2285(0x105)]};}else{let _0x289eb6={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464};return A((await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x101),{'body':_0x289eb6}))[_0x1c2285(0x147)]['comment'],_0x36e456);}}async['updateComment'](_0x50fe5b){const _0x58ec21=_0x24c5c3;var _0xda8f9f,_0x4a8384;let {text:_0x4416d6,unitId:_0x2c2f4a}=_0x50fe5b,_0x522789=(_0xda8f9f=(_0x4a8384=_0x4416d6[_0x58ec21(0x122)])==null?void 0x0:_0x4a8384[_0x58ec21(0xf1)](_0x3521ac=>_0x3521ac['rangeType']===_0x5a9d83[_0x58ec21(0xf7)])[_0x58ec21(0xf4)](_0x40c32d=>_0x40c32d[_0x58ec21(0xec)]))==null?[]:_0xda8f9f,_0x591c89=JSON[_0x58ec21(0x142)](_0x4416d6),_0x4a08ed=_0x50fe5b[_0x58ec21(0x109)],_0x413c77=_0x50fe5b['id'],_0x3ea597={'memberId':(await this['_sessionService'][_0x58ec21(0xfa)](_0x2c2f4a))[_0x58ec21(0xff)](),'unitId':_0x2c2f4a,'threadId':_0x4a08ed,'mention':_0x522789,'content':_0x591c89,'replyId':_0x413c77},_0x84bf4c=await this[_0x58ec21(0x126)][_0x58ec21(0x10f)]('/universer-api/comment/unit/'+_0x2c2f4a+_0x58ec21(0x133),{'body':_0x3ea597});return!_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)]||_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)][_0x58ec21(0xfd)]===0x1;}async[_0x24c5c3(0xf9)](_0x1dc2d8){const _0x497f4a=_0x24c5c3;let {unitId:_0x1a73f9}=_0x1dc2d8,_0x52433b=_0x1dc2d8[_0x497f4a(0x109)],_0x1cc4f4={'memberId':this[_0x497f4a(0xed)]['getCurrentUser']()[_0x497f4a(0xe5)],'unitId':_0x1a73f9,'threadId':_0x52433b,'solved':_0x1dc2d8[_0x497f4a(0xfc)]?_0x20f75b[_0x497f4a(0xef)]:_0x20f75b[_0x497f4a(0x11b)]},_0xf3909a=await this[_0x497f4a(0x126)][_0x497f4a(0x10f)](_0x497f4a(0x125)+_0x1a73f9+'/solved',{'body':_0x1cc4f4});return!_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)]||_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)][_0x497f4a(0xfd)]===0x1;}async[_0x24c5c3(0x13e)](_0x4cb99a,_0x344ff7,_0x530db3,_0x2b1f67){const _0x218fc5=_0x24c5c3;let _0x99762b={'memberId':(await this[_0x218fc5(0xfe)][_0x218fc5(0xfa)](_0x4cb99a))[_0x218fc5(0xff)](),'threadId':_0x530db3,'replyId':_0x2b1f67,'unitId':_0x4cb99a},_0x19d51c=await this['_httpService'][_0x218fc5(0x10f)](_0x218fc5(0x125)+_0x4cb99a+'/delete',{'body':_0x99762b});return!_0x19d51c[_0x218fc5(0x147)][_0x218fc5(0x107)]||_0x19d51c[_0x218fc5(0x147)]['error'][_0x218fc5(0xfd)]===0x1;}async[_0x24c5c3(0x14c)](_0x33ad97,_0x4edc46,_0x5cd8cd){const _0x13c0d5=_0x24c5c3;let _0x1fd9fd={'unitId':_0x33ad97,'threadId':_0x5cd8cd},_0x1f5f1c=await this[_0x13c0d5(0x126)][_0x13c0d5(0x10f)](_0x13c0d5(0x125)+_0x33ad97+'/list',{'body':_0x1fd9fd}),_0x63d95c=_0x5cd8cd[_0x13c0d5(0xf4)](_0x6a589f=>j(_0x1f5f1c[_0x13c0d5(0x147)][_0x13c0d5(0x10c)][_0x6a589f],_0x33ad97,_0x4edc46))['filter'](Boolean);return Object[_0x13c0d5(0x12b)](_0x1f5f1c['body']['users'])['forEach'](_0x325695=>{const _0x148b94=_0x13c0d5;this[_0x148b94(0xed)][_0x148b94(0xe6)](_0x325695);}),_0x63d95c;}[_0x24c5c3(0xf3)](_0xd54aa6){const _0x492f2e=_0x24c5c3;return{'id':_0xd54aa6['id'],'threadId':_0xd54aa6[_0x492f2e(0x109)],'ref':_0xd54aa6[_0x492f2e(0x144)]};}};M=E([T(0x0,_0x2bff0e(_0x5a5f64)),T(0x1,_0x2bff0e(_0x2d0607)),T(0x2,_0x2bff0e(_0x19b44))],M);let N=class extends _0x163bfc{constructor(_0x172dc9,_0x3e7705){const _0x250df3=_0x24c5c3;super(),this['_threadCommentDataSourceService']=_0x172dc9,this[_0x250df3(0x120)]=_0x3e7705,this[_0x250df3(0x115)]();}[_0x24c5c3(0x115)](){const _0x509cbd=_0x24c5c3;this[_0x509cbd(0x11d)][_0x509cbd(0xee)]=this[_0x509cbd(0x120)],this[_0x509cbd(0x11d)][_0x509cbd(0x12f)]=!0x1;}};N=E([T(0x0,_0xebaadb),T(0x1,_0x2bff0e(M))],N);function P(_0x3a08ad){'@babel/helpers - typeof';const _0x210936=_0x24c5c3;return P=typeof Symbol=='function'&&typeof Symbol[_0x210936(0x11f)]==_0x210936(0x12e)?function(_0x3acfd3){return typeof _0x3acfd3;}:function(_0x5417f4){const _0x300b55=_0x210936;return _0x5417f4&&typeof Symbol=='function'&&_0x5417f4[_0x300b55(0xfb)]===Symbol&&_0x5417f4!==Symbol['prototype']?_0x300b55(0x12e):typeof _0x5417f4;},P(_0x3a08ad);}function F(_0x434e2d,_0x38b588){const _0x428543=_0x24c5c3;if(P(_0x434e2d)!='object'||!_0x434e2d)return _0x434e2d;var _0x3b4f82=_0x434e2d[Symbol[_0x428543(0x127)]];if(_0x3b4f82!==void 0x0){var _0x2e5374=_0x3b4f82[_0x428543(0x102)](_0x434e2d,_0x38b588||_0x428543(0x148));if(P(_0x2e5374)!=_0x428543(0x141))return _0x2e5374;throw TypeError(_0x428543(0x124));}return(_0x38b588==='string'?String:Number)(_0x434e2d);}function I(_0x20c87){const _0x1079a1=_0x24c5c3;var _0x28bbcc=F(_0x20c87,'string');return P(_0x28bbcc)==_0x1079a1(0x12e)?_0x28bbcc:_0x28bbcc+'';}function L(_0x1e0fa6,_0x1333a9,_0x3e3558){const _0x397a58=_0x24c5c3;return(_0x1333a9=I(_0x1333a9))in _0x1e0fa6?Object[_0x397a58(0x123)](_0x1e0fa6,_0x1333a9,{'value':_0x3e3558,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e0fa6[_0x1333a9]=_0x3e3558,_0x1e0fa6;}let R=class extends _0x1a5129{constructor(_0x4eba27=k,_0x50453a,_0x7eb3ac){const _0x5a8a08=_0x24c5c3;super(),this[_0x5a8a08(0x136)]=_0x4eba27,this['_injector']=_0x50453a,this[_0x5a8a08(0xea)]=_0x7eb3ac;let {..._0x4828ff}=_0x33d367({},k,this[_0x5a8a08(0x136)]);this[_0x5a8a08(0xea)]['setConfig'](O,_0x4828ff);}[_0x24c5c3(0x116)](){const _0x2e85fc=_0x24c5c3;[[M],[N],[D]][_0x2e85fc(0x12d)](_0xc70a5b=>{const _0x1287a8=_0x2e85fc;this[_0x1287a8(0x146)]['add'](_0xc70a5b);});}[_0x24c5c3(0xe8)](){const _0x163bed=_0x24c5c3;this[_0x163bed(0x146)]['get'](N),this[_0x163bed(0x146)][_0x163bed(0xf0)](D);}};L(R,_0x24c5c3(0x11c),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),L(R,_0x24c5c3(0x10a),x),L(R,_0x24c5c3(0x104),S),R=E([_0x140f68(_0x42b7ee,_0x3f9642,_0x3dce09),T(0x1,_0x2bff0e(_0xc96534)),T(0x2,_0x4f4aa1)],R);export{R as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3985(_0x5e660a,_0x460ed2){_0x5e660a=_0x5e660a-0x103;const _0xd3fade=_0xd3fa();let _0x398570=_0xd3fade[_0x5e660a];return _0x398570;}(function(_0x418650,_0x54a410){const _0x278efa=_0x3985,_0x32521b=_0x418650();while(!![]){try{const _0x56116b=parseInt(_0x278efa(0x108))/0x1+-parseInt(_0x278efa(0x135))/0x2+parseInt(_0x278efa(0x17b))/0x3+parseInt(_0x278efa(0x113))/0x4+parseInt(_0x278efa(0x119))/0x5*(-parseInt(_0x278efa(0x118))/0x6)+parseInt(_0x278efa(0x11c))/0x7+-parseInt(_0x278efa(0x16d))/0x8;if(_0x56116b===_0x54a410)break;else _0x32521b['push'](_0x32521b['shift']());}catch(_0x5137fb){_0x32521b['push'](_0x32521b['shift']());}}}(_0xd3fa,0x9bb9d),function(_0xff6056,_0x2a8345){const _0x52bcbd=_0x3985;typeof exports=='object'&&typeof module<'u'?_0x2a8345(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs-pro/license`),require(`@univerjs/core`),require(`@univerjs/thread-comment-ui`),require(`@univerjs/protocol`),require(`@univerjs/thread-comment`),require(`rxjs`),require(`@univerjs/network`)):typeof define=='function'&&define['amd']?define([_0x52bcbd(0x16a),_0x52bcbd(0x13b),_0x52bcbd(0x123),_0x52bcbd(0x159),_0x52bcbd(0x143),'@univerjs/protocol','@univerjs/thread-comment','rxjs',_0x52bcbd(0x10d)],_0x2a8345):(_0xff6056=typeof globalThis<'u'?globalThis:_0xff6056||self,_0x2a8345(_0xff6056[_0x52bcbd(0x169)]={},_0xff6056['UniverProCollaborationClient'],_0xff6056['UniverProLicense'],_0xff6056['UniverCore'],_0xff6056[_0x52bcbd(0x13a)],_0xff6056['UniverProtocol'],_0xff6056[_0x52bcbd(0x114)],_0xff6056['rxjs'],_0xff6056['UniverNetwork']));}(this,function(_0x297754,_0x4f17b3,_0x3368a3,_0x2c58cf,_0x3c1ec9,_0x592667,_0x1daa07,_0xa4f2cb,_0x103802){const _0x2612aa=_0x3985;Object['defineProperty'](_0x297754,Symbol[_0x2612aa(0x127)],{'value':'Module'});var _0x30a7df=_0x2612aa(0x165),_0xb95e6b=_0x2612aa(0x168);let _0x2d011f=_0x3e17fc=>(0x0,_0x2c58cf['dateKit'])(new Date(+_0x3e17fc))['format'](_0x2612aa(0x171)),_0x339137=async(_0xa299c2,_0x3173d7)=>{const _0x596a7a=_0x2612aa;let _0x1f6e40=_0xa299c2[_0x596a7a(0x15a)](_0x2c58cf[_0x596a7a(0x11f)]),_0x53d652=_0xa299c2[_0x596a7a(0x15a)](_0x103802[_0x596a7a(0x11a)]);_0x3173d7[_0x596a7a(0x16b)](_0x2969ca=>{const _0x1ad7f0=_0x596a7a;_0x1f6e40['getUser'](_0x2969ca)&&_0x3173d7[_0x1ad7f0(0x125)](_0x2969ca);}),_0x3173d7[_0x596a7a(0x154)]&&(await _0x53d652[_0x596a7a(0x15a)](_0x596a7a(0x18e),{'params':{'userIDs':[..._0x3173d7]}}))['body'][_0x596a7a(0x152)][_0x596a7a(0x16b)](_0x320f8b=>{const _0x21c13a=_0x596a7a;_0x320f8b&&_0x1f6e40[_0x21c13a(0x177)](_0x320f8b);});};function _0x20278e(_0x5a463b,_0x158857){return function(_0x18701,_0x2013d3){_0x158857(_0x18701,_0x2013d3,_0x5a463b);};}function _0x4c3f8f(_0x413825,_0x460ef6,_0x5ad761,_0x328338){const _0x3da1b9=_0x2612aa;var _0x25f39d=arguments[_0x3da1b9(0x134)],_0xcf636e=_0x25f39d<0x3?_0x460ef6:_0x328338===null?_0x328338=Object[_0x3da1b9(0x188)](_0x460ef6,_0x5ad761):_0x328338,_0x238b5c;if(typeof Reflect==_0x3da1b9(0x103)&&typeof Reflect[_0x3da1b9(0x10b)]==_0x3da1b9(0x12d))_0xcf636e=Reflect['decorate'](_0x413825,_0x460ef6,_0x5ad761,_0x328338);else{for(var _0x355c42=_0x413825[_0x3da1b9(0x134)]-0x1;_0x355c42>=0x0;_0x355c42--)(_0x238b5c=_0x413825[_0x355c42])&&(_0xcf636e=(_0x25f39d<0x3?_0x238b5c(_0xcf636e):_0x25f39d>0x3?_0x238b5c(_0x460ef6,_0x5ad761,_0xcf636e):_0x238b5c(_0x460ef6,_0x5ad761))||_0xcf636e);}return _0x25f39d>0x3&&_0xcf636e&&Object[_0x3da1b9(0x11b)](_0x460ef6,_0x5ad761,_0xcf636e),_0xcf636e;}let _0x1e0ae7=class extends _0x2c58cf[_0x2612aa(0x158)]{constructor(_0x546f6b,_0x3d7222,_0x4c0731,_0x3a6730){const _0x228735=_0x2612aa;super(),this[_0x228735(0x15d)]=_0x546f6b,this['_threadCommentModel']=_0x3d7222,this['_userService']=_0x4c0731,this[_0x228735(0x144)]=_0x3a6730,this[_0x228735(0x157)](),this['_initUserSync']();}[_0x2612aa(0x12f)](){const _0xc774ad=_0x2612aa;this[_0xc774ad(0x185)](this[_0xc774ad(0x164)][_0xc774ad(0x180)]['pipe']((0x0,_0xa4f2cb['bufferTime'])(0x10))[_0xc774ad(0x133)](_0x343f13=>{const _0x474721=_0xc774ad;let _0xe46493=new Set();_0x343f13['forEach'](_0x31a8c9=>{const _0x12b0a2=_0x3985;switch(_0x31a8c9[_0x12b0a2(0x142)]){case'add':{let _0x51ef90=_0x31a8c9[_0x12b0a2(0x18c)][_0x12b0a2(0x131)];_0xe46493[_0x12b0a2(0x15c)](_0x51ef90);break;}default:break;}}),_0x339137(this[_0x474721(0x144)],_0xe46493);}));}[_0x2612aa(0x157)](){const _0xc46425=_0x2612aa;this[_0xc46425(0x185)](this[_0xc46425(0x15d)][_0xc46425(0x180)][_0xc46425(0x133)](async _0x5227d1=>{const _0x290083=_0xc46425;var _0x551ed9;let _0x3f6b85=(_0x551ed9=this[_0x290083(0x164)][_0x290083(0x14d)](_0x5227d1[_0x290083(0x156)])['find'](_0x4d3c6c=>_0x4d3c6c['threadId']===_0x5227d1['threadId']))==null?void 0x0:_0x551ed9[_0x290083(0x13c)];if(!_0x3f6b85)return;let {unitId:_0x2ed252,subUnitId:_0x344197}=_0x3f6b85;switch(_0x5227d1[_0x290083(0x12b)]&&this[_0x290083(0x15b)][_0x290083(0x177)](_0x5227d1['user']),_0x5227d1['type']){case _0x592667[_0x290083(0x18a)]['Add']:break;case _0x592667[_0x290083(0x18a)][_0x290083(0x124)]:var _0x2e8504,_0x1fbfb2;this['_threadCommentModel'][_0x290083(0x147)](_0x2ed252,_0x344197,{'unitId':_0x2ed252,'subUnitId':_0x344197,'ref':'','id':_0x5227d1[_0x290083(0x14e)],'dT':_0x2d011f(+_0x5227d1[_0x290083(0x166)]),'threadId':_0x5227d1[_0x290083(0x121)],'personId':(_0x2e8504=(_0x1fbfb2=_0x5227d1['user'])==null?void 0x0:_0x1fbfb2['userID'])==null?_0x5227d1['userId']:_0x2e8504,'text':JSON[_0x290083(0x10f)](_0x5227d1['content']),'parentId':_0x3f6b85['id']});break;case _0x592667[_0x290083(0x18a)][_0x290083(0x183)]:{let _0x2b8d30=this['_threadCommentModel'][_0x290083(0x10a)](_0x2ed252,_0x344197,_0x5227d1['replyId']);_0x2b8d30&&_0x2b8d30[_0x290083(0x186)]&&this['_threadCommentModel']['deleteComment'](_0x2ed252,_0x344197,_0x5227d1['replyId']);break;}case _0x592667[_0x290083(0x18a)][_0x290083(0x14a)]:this[_0x290083(0x164)][_0x290083(0x161)](_0x2ed252,_0x344197,{'commentId':_0x5227d1[_0x290083(0x14e)],'text':JSON[_0x290083(0x10f)](_0x5227d1[_0x290083(0x17a)])});break;case _0x592667[_0x290083(0x18a)][_0x290083(0x14b)]:{var _0x471eef;let _0x5774e0=(_0x471eef=this['_threadCommentModel']['getUnit'](_0x5227d1[_0x290083(0x156)])['find'](_0x533a4e=>_0x533a4e[_0x290083(0x121)]===_0x5227d1[_0x290083(0x121)]))==null?void 0x0:_0x471eef[_0x290083(0x13c)];_0x5774e0&&this[_0x290083(0x164)][_0x290083(0x105)](_0x2ed252,_0x344197,_0x5774e0['id'],_0x5227d1['solved']===_0x592667['CommentSolvedStatus'][_0x290083(0x173)]);break;}default:break;}}));}};_0x1e0ae7=_0x4c3f8f([_0x20278e(0x0,(0x0,_0x2c58cf[_0x2612aa(0x11d)])(_0x4f17b3['CommentService'])),_0x20278e(0x1,(0x0,_0x2c58cf['Inject'])(_0x1daa07[_0x2612aa(0x110)])),_0x20278e(0x2,(0x0,_0x2c58cf['Inject'])(_0x2c58cf[_0x2612aa(0x11f)])),_0x20278e(0x3,(0x0,_0x2c58cf[_0x2612aa(0x11d)])(_0x2c58cf['Injector']))],_0x1e0ae7);let _0x5e8814=_0x2612aa(0x179);Symbol(_0x5e8814);let _0x1bc728={};function _0x5b2ed8(_0x3f63a4,_0x2613f2){const _0x16c592=_0x2612aa;let _0x2ccfd3=_0x3f63a4[_0x16c592(0x132)][0x0];return{..._0x2613f2,'id':_0x2ccfd3[_0x16c592(0x14e)],'resolved':_0x3f63a4[_0x16c592(0x160)]===0x1,'dT':_0x2d011f(_0x2ccfd3[_0x16c592(0x166)]),'personId':_0x2ccfd3[_0x16c592(0x139)],'threadId':_0x2ccfd3[_0x16c592(0x121)]};}function _0x5cee8d(_0x1941d3,_0x10e228,_0x42d42d){const _0x5ac84d=_0x2612aa;var _0x37d471,_0x149a35;if(((_0x37d471=_0x1941d3==null||(_0x149a35=_0x1941d3[_0x5ac84d(0x132)])==null?void 0x0:_0x149a35[_0x5ac84d(0x134)])==null?0x0:_0x37d471)>0x0){let _0x5e79e9=(_0x3d6791,_0xb8a8b7)=>({'id':_0x3d6791['replyId'],'threadId':_0x3d6791[_0x5ac84d(0x121)],'dT':_0x2d011f(_0x3d6791[_0x5ac84d(0x166)]),'personId':_0x3d6791[_0x5ac84d(0x139)],'resolved':_0x1941d3[_0x5ac84d(0x160)]===_0x592667[_0x5ac84d(0x189)][_0x5ac84d(0x173)],'unitId':_0x10e228,'subUnitId':_0x42d42d,'text':JSON[_0x5ac84d(0x10f)](_0x3d6791[_0x5ac84d(0x17a)]),'parentId':_0xb8a8b7}),_0x2a017f=_0x5e79e9(_0x1941d3[_0x5ac84d(0x132)][0x0]);return{..._0x2a017f,'children':_0x1941d3[_0x5ac84d(0x132)][_0x5ac84d(0x172)](0x1)['map'](_0x285797=>_0x5e79e9(_0x285797,_0x2a017f['id']))};}return null;}let _0x1636e2=class{constructor(_0x2700b7,_0x832c14,_0x367277){const _0x3f3447=_0x2612aa;this[_0x3f3447(0x120)]=_0x2700b7,this['_userService']=_0x832c14,this[_0x3f3447(0x15e)]=_0x367277;}async[_0x2612aa(0x147)](_0x409578){const _0x51047e=_0x2612aa;var _0xd8fae1,_0x16e97a;let {parentId:_0x36b3fd,unitId:_0x4b15bd,text:_0x687c6c,threadId:_0x412948}=_0x409578,_0x41e867=(_0xd8fae1=(_0x16e97a=_0x687c6c[_0x51047e(0x145)])==null?void 0x0:_0x16e97a['filter'](_0x3e8cac=>_0x3e8cac[_0x51047e(0x181)]===_0x2c58cf[_0x51047e(0x176)][_0x51047e(0x111)])[_0x51047e(0x115)](_0x37f75a=>_0x37f75a['rangeId']))==null?[]:_0xd8fae1,_0x20a312=JSON[_0x51047e(0x122)](_0x687c6c),_0x841934=(await this[_0x51047e(0x15e)][_0x51047e(0x130)](_0x4b15bd))['getMemberID']();if(_0x36b3fd){let _0x36b01e={'memberId':_0x841934,'unitId':_0x4b15bd,'content':_0x20a312,'mention':_0x41e867,'threadId':_0x412948},_0x5ca2ce=(await this['_httpService'][_0x51047e(0x128)](_0x51047e(0x14f)+_0x4b15bd+_0x51047e(0x13d),{'body':_0x36b01e}))[_0x51047e(0x12a)][_0x51047e(0x17d)];return{..._0x409578,'id':_0x5ca2ce[_0x51047e(0x14e)],'dT':(0x0,_0x2c58cf[_0x51047e(0x13e)])(+_0x5ca2ce[_0x51047e(0x166)])[_0x51047e(0x153)](_0x51047e(0x171)),'personId':_0x5ca2ce['userId']};}else{let _0x36a005={'memberId':_0x841934,'unitId':_0x4b15bd,'content':_0x20a312,'mention':_0x41e867};return _0x5b2ed8((await this['_httpService'][_0x51047e(0x128)](_0x51047e(0x14f)+_0x4b15bd+_0x51047e(0x16c),{'body':_0x36a005}))[_0x51047e(0x12a)][_0x51047e(0x137)],_0x409578);}}async[_0x2612aa(0x161)](_0x37381a){const _0x350c99=_0x2612aa;var _0x46522e,_0x15f651;let {text:_0x2bca00,unitId:_0x1df453}=_0x37381a,_0x1d981d=(_0x46522e=(_0x15f651=_0x2bca00[_0x350c99(0x145)])==null?void 0x0:_0x15f651[_0x350c99(0x136)](_0x5f3630=>_0x5f3630['rangeType']===_0x2c58cf[_0x350c99(0x176)][_0x350c99(0x111)])['map'](_0x364f37=>_0x364f37['rangeId']))==null?[]:_0x46522e,_0x224735=JSON[_0x350c99(0x122)](_0x2bca00),_0x24b774=_0x37381a['threadId'],_0x532efd=_0x37381a['id'],_0x3a7a74={'memberId':(await this['_sessionService'][_0x350c99(0x130)](_0x1df453))['getMemberID'](),'unitId':_0x1df453,'threadId':_0x24b774,'mention':_0x1d981d,'content':_0x224735,'replyId':_0x532efd},_0x3aafcc=await this[_0x350c99(0x120)][_0x350c99(0x128)]('/universer-api/comment/unit/'+_0x1df453+_0x350c99(0x182),{'body':_0x3a7a74});return!_0x3aafcc[_0x350c99(0x12a)][_0x350c99(0x151)]||_0x3aafcc[_0x350c99(0x12a)][_0x350c99(0x151)][_0x350c99(0x17f)]===0x1;}async[_0x2612aa(0x105)](_0x101c85){const _0x3304b4=_0x2612aa;let {unitId:_0x2cdc1a}=_0x101c85,_0x23f4df=_0x101c85[_0x3304b4(0x121)],_0x3b0012={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2cdc1a,'threadId':_0x23f4df,'solved':_0x101c85['resolved']?_0x592667['CommentSolvedStatus'][_0x3304b4(0x173)]:_0x592667[_0x3304b4(0x189)][_0x3304b4(0x155)]},_0x1361d2=await this[_0x3304b4(0x120)][_0x3304b4(0x128)](_0x3304b4(0x14f)+_0x2cdc1a+_0x3304b4(0x140),{'body':_0x3b0012});return!_0x1361d2[_0x3304b4(0x12a)][_0x3304b4(0x151)]||_0x1361d2[_0x3304b4(0x12a)][_0x3304b4(0x151)][_0x3304b4(0x17f)]===0x1;}async[_0x2612aa(0x18b)](_0x3b2a56,_0x52b0cf,_0x1d9406,_0x2e0197){const _0x58dd16=_0x2612aa;let _0x530b5c={'memberId':(await this[_0x58dd16(0x15e)][_0x58dd16(0x130)](_0x3b2a56))[_0x58dd16(0x162)](),'threadId':_0x1d9406,'replyId':_0x2e0197,'unitId':_0x3b2a56},_0x12e10c=await this['_httpService'][_0x58dd16(0x128)](_0x58dd16(0x14f)+_0x3b2a56+_0x58dd16(0x146),{'body':_0x530b5c});return!_0x12e10c[_0x58dd16(0x12a)]['error']||_0x12e10c[_0x58dd16(0x12a)][_0x58dd16(0x151)][_0x58dd16(0x17f)]===0x1;}async[_0x2612aa(0x141)](_0x317561,_0x183c9e,_0x2c7dbd){const _0xe6d458=_0x2612aa;let _0xff02db={'unitId':_0x317561,'threadId':_0x2c7dbd},_0xebdefe=await this[_0xe6d458(0x120)][_0xe6d458(0x128)]('/universer-api/comment/unit/'+_0x317561+_0xe6d458(0x10c),{'body':_0xff02db}),_0x3c9198=_0x2c7dbd[_0xe6d458(0x115)](_0x5d4657=>_0x5cee8d(_0xebdefe[_0xe6d458(0x12a)]['comments'][_0x5d4657],_0x317561,_0x183c9e))[_0xe6d458(0x136)](Boolean);return Object[_0xe6d458(0x170)](_0xebdefe[_0xe6d458(0x12a)][_0xe6d458(0x152)])[_0xe6d458(0x16b)](_0x3b3925=>{const _0xc3c4e=_0xe6d458;this['_userService'][_0xc3c4e(0x177)](_0x3b3925);}),_0x3c9198;}[_0x2612aa(0x112)](_0x4c705d){const _0x46f17c=_0x2612aa;return{'id':_0x4c705d['id'],'threadId':_0x4c705d['threadId'],'ref':_0x4c705d[_0x46f17c(0x150)]};}};_0x1636e2=_0x4c3f8f([_0x20278e(0x0,(0x0,_0x2c58cf[_0x2612aa(0x11d)])(_0x103802[_0x2612aa(0x11a)])),_0x20278e(0x1,(0x0,_0x2c58cf[_0x2612aa(0x11d)])(_0x2c58cf[_0x2612aa(0x11f)])),_0x20278e(0x2,(0x0,_0x2c58cf[_0x2612aa(0x11d)])(_0x4f17b3[_0x2612aa(0x16e)]))],_0x1636e2);let _0x227132=class extends _0x2c58cf[_0x2612aa(0x158)]{constructor(_0x93087f,_0x15f87d){const _0x38daf3=_0x2612aa;super(),this['_threadCommentDataSourceService']=_0x93087f,this[_0x38daf3(0x12e)]=_0x15f87d,this[_0x38daf3(0x138)]();}['_initDataSource'](){const _0xac010d=_0x2612aa;this[_0xac010d(0x178)][_0xac010d(0x148)]=this[_0xac010d(0x12e)],this['_threadCommentDataSourceService'][_0xac010d(0x163)]=!0x1;}};_0x227132=_0x4c3f8f([_0x20278e(0x0,_0x1daa07[_0x2612aa(0x14c)]),_0x20278e(0x1,(0x0,_0x2c58cf[_0x2612aa(0x11d)])(_0x1636e2))],_0x227132);function _0xe219fd(_0x27e7eb){'@babel/helpers - typeof';const _0xb2957f=_0x2612aa;return _0xe219fd=typeof Symbol==_0xb2957f(0x12d)&&typeof Symbol[_0xb2957f(0x11e)]=='symbol'?function(_0x2a2742){return typeof _0x2a2742;}:function(_0x3bfdd2){const _0x1b847c=_0xb2957f;return _0x3bfdd2&&typeof Symbol==_0x1b847c(0x12d)&&_0x3bfdd2[_0x1b847c(0x13f)]===Symbol&&_0x3bfdd2!==Symbol[_0x1b847c(0x149)]?'symbol':typeof _0x3bfdd2;},_0xe219fd(_0x27e7eb);}function _0x188a63(_0x165bd7,_0x4f04c5){const _0xec8747=_0x2612aa;if(_0xe219fd(_0x165bd7)!=_0xec8747(0x103)||!_0x165bd7)return _0x165bd7;var _0x4db143=_0x165bd7[Symbol[_0xec8747(0x15f)]];if(_0x4db143!==void 0x0){var _0x8e4155=_0x4db143[_0xec8747(0x117)](_0x165bd7,_0x4f04c5||_0xec8747(0x106));if(_0xe219fd(_0x8e4155)!=_0xec8747(0x103))return _0x8e4155;throw TypeError(_0xec8747(0x184));}return(_0x4f04c5===_0xec8747(0x167)?String:Number)(_0x165bd7);}function _0xb10601(_0x11d98e){const _0x52efbd=_0x2612aa;var _0x2cfec4=_0x188a63(_0x11d98e,_0x52efbd(0x167));return _0xe219fd(_0x2cfec4)=='symbol'?_0x2cfec4:_0x2cfec4+'';}function _0x43f6f3(_0x62d02e,_0x417c4a,_0x3e3998){const _0x341543=_0x2612aa;return(_0x417c4a=_0xb10601(_0x417c4a))in _0x62d02e?Object[_0x341543(0x11b)](_0x62d02e,_0x417c4a,{'value':_0x3e3998,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x62d02e[_0x417c4a]=_0x3e3998,_0x62d02e;}let _0x502e31=class extends _0x2c58cf[_0x2612aa(0x175)]{constructor(_0x37d97f=_0x1bc728,_0x11728e,_0x564be6){const _0x184def=_0x2612aa;super(),this['_config']=_0x37d97f,this['_injector']=_0x11728e,this[_0x184def(0x129)]=_0x564be6;let {..._0x7e8536}=(0x0,_0x2c58cf[_0x184def(0x107)])({},_0x1bc728,this['_config']);this[_0x184def(0x129)]['setConfig'](_0x5e8814,_0x7e8536);}['onStarting'](){const _0x8bc117=_0x2612aa;[[_0x1636e2],[_0x227132],[_0x1e0ae7]][_0x8bc117(0x16b)](_0x2c3e1e=>{const _0x1c20de=_0x8bc117;this[_0x1c20de(0x144)][_0x1c20de(0x15c)](_0x2c3e1e);});}[_0x2612aa(0x17c)](){const _0x53c8ad=_0x2612aa;this['_injector']['get'](_0x227132),this[_0x53c8ad(0x144)]['get'](_0x1e0ae7);}};_0x43f6f3(_0x502e31,_0x2612aa(0x16f),_0x2612aa(0x104)),_0x43f6f3(_0x502e31,_0x2612aa(0x109),_0x30a7df),_0x43f6f3(_0x502e31,_0x2612aa(0x17e),_0xb95e6b),_0x502e31=_0x4c3f8f([(0x0,_0x2c58cf[_0x2612aa(0x116)])(_0x3c1ec9[_0x2612aa(0x126)],_0x4f17b3[_0x2612aa(0x10e)],_0x3368a3[_0x2612aa(0x12c)]),_0x20278e(0x1,(0x0,_0x2c58cf['Inject'])(_0x2c58cf[_0x2612aa(0x18d)])),_0x20278e(0x2,_0x2c58cf[_0x2612aa(0x187)])],_0x502e31),Object['defineProperty'](_0x297754,_0x2612aa(0x174),{'enumerable':!0x0,'get':function(){return _0x502e31;}});}));function _0xd3fa(){const _0x3a25f6=['/universer-api/user/list','object','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolveComment','default','merge','212169SmWzFT','packageName','getComment','decorate','/list','@univerjs/network','UniverCollaborationClientPlugin','parse','ThreadCommentModel','COMMENT','saveCommentToSnapshot','4653788WmhAHd','UniverThreadComment','map','DependentOn','call','8112BOYSoT','2845byzFFm','HTTPService','defineProperty','1935829tWFXQD','Inject','iterator','UserManagerService','_httpService','threadId','stringify','@univerjs-pro/license','Reply','delete','UniverThreadCommentUIPlugin','toStringTag','post','_configService','body','user','UniverLicensePlugin','function','_threadCommentDataSource','_initUserSync','requireSession','personId','replies','subscribe','length','798782aeTifP','filter','comment','_initDataSource','userId','UniverThreadCommentUi','@univerjs-pro/collaboration-client','root','/reply','dateKit','constructor','/solved','listComments','type','@univerjs/thread-comment-ui','_injector','customRanges','/delete','addComment','dataSource','prototype','Edit','Solve','IThreadCommentDataSourceService','getUnit','replyId','/universer-api/comment/unit/','ref','error','users','format','size','OpenOrReOpen','unitId','_init','Disposable','@univerjs/core','get','_userService','add','_commentService','_sessionService','toPrimitive','solved','updateComment','getMemberID','syncUpdateMutationToColla','_threadCommentModel','@univerjs-pro/thread-comment-datasource','createTimestamp','string','0.23.0','UniverProThreadCommentDatasource','exports','forEach','/add','8615592ibyjug','CollaborationSessionService','pluginName','values','YYYY/MM/DD\x20HH:mm','slice','Solved','UniverThreadCommentDataSourcePlugin','Plugin','CustomRangeType','addUser','_threadCommentDataSourceService','thread-comment-data-source.config','content','3693954tSEofK','onReady','reply','version','code','commentUpdate$','rangeType','/edit','Delete','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','disposeWithMe','parentId','IConfigService','getOwnPropertyDescriptor','CommentSolvedStatus','CommentUpdateEventType','deleteComment','payload','Injector'];_0xd3fa=function(){return _0x3a25f6;};return _0xd3fa();}
|
|
1
|
+
function _0x2f62(){const _0x1f0810=['deleteComment','dateKit','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment','_commentService','getOwnPropertyDescriptor','add','code','121SbDhEx','5EVjXfi','resolveComment','ThreadCommentModel','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','@univerjs/core','error','18qVCZOB','rangeId','93SzWKOG','Edit','rangeType','onReady','filter','setConfig','UniverProThreadCommentDatasource','unitId','toStringTag','root','Solve','object','default','post','Solved','DependentOn','/solved','HTTPService','Plugin','onStarting','Reply','bufferTime','pluginName','/reply','getMemberID','CommentUpdateEventType','1025370euRfQh','addComment','saveCommentToSnapshot','toPrimitive','0.24.0','dataSource','delete','amd','content','replies','requireSession','_sessionService','OpenOrReOpen','@univerjs/protocol','string','users','symbol','YYYY/MM/DD\x20HH:mm','getUnit','_httpService','pipe','createTimestamp','3812CvyYPm','/edit','/list','CustomRangeType','Injector','@univerjs/network','format','listComments','1392392NlwGzq','userID','_initDataSource','UniverLicensePlugin','713120FnwPMi','stringify','get','body','type','COMMENT','resolved','defineProperty','updateComment','_userService','getCurrentUser','Disposable','_initUserSync','addUser','/add','replyId','rxjs','subscribe','comment','getComment','size','268701AIXSRd','67790NMLROo','syncUpdateMutationToColla','@univerjs-pro/collaboration-client','length','_injector','CommentSolvedStatus','find','UniverProCollaborationClient','/universer-api/user/list','/universer-api/comment/unit/','solved','1302343zGCqvx','UniverProLicense','disposeWithMe','prototype','_threadCommentDataSourceService','comments','iterator','decorate','_threadCommentDataSource','user','getUser','merge','UniverThreadCommentUIPlugin','@univerjs-pro/thread-comment-datasource','Inject','map','commentUpdate$','parse','slice','UniverThreadComment','_configService','threadId','customRanges','_threadCommentModel','userId','function','UserManagerService','UniverCollaborationClientPlugin','forEach','_init','CollaborationSessionService'];_0x2f62=function(){return _0x1f0810;};return _0x2f62();}function _0x191e(_0x218c3a,_0x57f561){_0x218c3a=_0x218c3a-0x1dd;const _0x2f62b9=_0x2f62();let _0x191e96=_0x2f62b9[_0x218c3a];return _0x191e96;}(function(_0x28db60,_0x538abd){const _0x573f0b=_0x191e,_0x492bad=_0x28db60();while(!![]){try{const _0x50b44a=-parseInt(_0x573f0b(0x219))/0x1+parseInt(_0x573f0b(0x204))/0x2+parseInt(_0x573f0b(0x255))/0x3*(parseInt(_0x573f0b(0x1f8))/0x4)+-parseInt(_0x573f0b(0x24d))/0x5*(parseInt(_0x573f0b(0x1e2))/0x6)+-parseInt(_0x573f0b(0x225))/0x7+parseInt(_0x573f0b(0x200))/0x8*(parseInt(_0x573f0b(0x253))/0x9)+parseInt(_0x573f0b(0x21a))/0xa*(parseInt(_0x573f0b(0x24c))/0xb);if(_0x50b44a===_0x538abd)break;else _0x492bad['push'](_0x492bad['shift']());}catch(_0x5cebfd){_0x492bad['push'](_0x492bad['shift']());}}}(_0x2f62,0x2cb55),function(_0x53159a,_0x174943){const _0x2049c3=_0x191e;typeof exports==_0x2049c3(0x260)&&typeof module<'u'?_0x174943(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs-pro/license`),require(`@univerjs/core`),require(`@univerjs/thread-comment-ui`),require(`@univerjs/protocol`),require(`@univerjs/thread-comment`),require(`rxjs`),require(`@univerjs/network`)):typeof define==_0x2049c3(0x23e)&&define[_0x2049c3(0x1e9)]?define(['exports',_0x2049c3(0x21c),'@univerjs-pro/license',_0x2049c3(0x251),'@univerjs/thread-comment-ui',_0x2049c3(0x1ef),_0x2049c3(0x247),'rxjs',_0x2049c3(0x1fd)],_0x174943):(_0x53159a=typeof globalThis<'u'?globalThis:_0x53159a||self,_0x174943(_0x53159a[_0x2049c3(0x25b)]={},_0x53159a[_0x2049c3(0x221)],_0x53159a[_0x2049c3(0x226)],_0x53159a['UniverCore'],_0x53159a['UniverThreadCommentUi'],_0x53159a['UniverProtocol'],_0x53159a[_0x2049c3(0x238)],_0x53159a[_0x2049c3(0x214)],_0x53159a['UniverNetwork']));}(this,function(_0x233f00,_0x4a3ce9,_0x326ba7,_0x5eb30e,_0x2a2e4d,_0x264b49,_0x3ea412,_0x2f852d,_0x265398){const _0x5de8ba=_0x191e;Object['defineProperty'](_0x233f00,Symbol[_0x5de8ba(0x25d)],{'value':'Module'});var _0x4a79c2=_0x5de8ba(0x232),_0x205c7e=_0x5de8ba(0x1e6);let _0x1ae6db=_0x45d5cc=>(0x0,_0x5eb30e[_0x5de8ba(0x245)])(new Date(+_0x45d5cc))[_0x5de8ba(0x1fe)]('YYYY/MM/DD\x20HH:mm'),_0x335c2b=async(_0x551ca6,_0xea1169)=>{const _0xa34fc1=_0x5de8ba;let _0x86f069=_0x551ca6[_0xa34fc1(0x206)](_0x5eb30e[_0xa34fc1(0x23f)]),_0x3f8d4f=_0x551ca6['get'](_0x265398['HTTPService']);_0xea1169[_0xa34fc1(0x241)](_0x566c6f=>{const _0x4a10ec=_0xa34fc1;_0x86f069[_0x4a10ec(0x22f)](_0x566c6f)&&_0xea1169[_0x4a10ec(0x1e8)](_0x566c6f);}),_0xea1169[_0xa34fc1(0x218)]&&(await _0x3f8d4f[_0xa34fc1(0x206)](_0xa34fc1(0x222),{'params':{'userIDs':[..._0xea1169]}}))[_0xa34fc1(0x207)]['users']['forEach'](_0x63f32a=>{const _0x186cfd=_0xa34fc1;_0x63f32a&&_0x86f069[_0x186cfd(0x211)](_0x63f32a);});};function _0x3c1fef(_0x22d707,_0x2f4778){return function(_0x3b59d8,_0x2ca084){_0x2f4778(_0x3b59d8,_0x2ca084,_0x22d707);};}function _0x4c09c4(_0x1e9c5e,_0x4d30d0,_0x6f5771,_0x2d9769){const _0x2dfac1=_0x5de8ba;var _0x4259c5=arguments['length'],_0x2c5a9e=_0x4259c5<0x3?_0x4d30d0:_0x2d9769===null?_0x2d9769=Object[_0x2dfac1(0x249)](_0x4d30d0,_0x6f5771):_0x2d9769,_0x4bcaee;if(typeof Reflect==_0x2dfac1(0x260)&&typeof Reflect['decorate']==_0x2dfac1(0x23e))_0x2c5a9e=Reflect[_0x2dfac1(0x22c)](_0x1e9c5e,_0x4d30d0,_0x6f5771,_0x2d9769);else{for(var _0xb8d169=_0x1e9c5e[_0x2dfac1(0x21d)]-0x1;_0xb8d169>=0x0;_0xb8d169--)(_0x4bcaee=_0x1e9c5e[_0xb8d169])&&(_0x2c5a9e=(_0x4259c5<0x3?_0x4bcaee(_0x2c5a9e):_0x4259c5>0x3?_0x4bcaee(_0x4d30d0,_0x6f5771,_0x2c5a9e):_0x4bcaee(_0x4d30d0,_0x6f5771))||_0x2c5a9e);}return _0x4259c5>0x3&&_0x2c5a9e&&Object[_0x2dfac1(0x20b)](_0x4d30d0,_0x6f5771,_0x2c5a9e),_0x2c5a9e;}let _0x4d71b0=class extends _0x5eb30e[_0x5de8ba(0x20f)]{constructor(_0x1a5c92,_0x435571,_0x64e61d,_0x108538){const _0x393af0=_0x5de8ba;super(),this[_0x393af0(0x248)]=_0x1a5c92,this[_0x393af0(0x23c)]=_0x435571,this[_0x393af0(0x20d)]=_0x64e61d,this[_0x393af0(0x21e)]=_0x108538,this[_0x393af0(0x242)](),this['_initUserSync']();}[_0x5de8ba(0x210)](){const _0x10fade=_0x5de8ba;this['disposeWithMe'](this[_0x10fade(0x23c)][_0x10fade(0x235)][_0x10fade(0x1f6)]((0x0,_0x2f852d[_0x10fade(0x1dd)])(0x10))['subscribe'](_0x1552e6=>{const _0x4cf9b5=_0x10fade;let _0x1fe51a=new Set();_0x1552e6[_0x4cf9b5(0x241)](_0x1d9b65=>{const _0x274323=_0x4cf9b5;switch(_0x1d9b65[_0x274323(0x208)]){case _0x274323(0x24a):{let _0x30ec20=_0x1d9b65['payload']['personId'];_0x1fe51a[_0x274323(0x24a)](_0x30ec20);break;}default:break;}}),_0x335c2b(this[_0x4cf9b5(0x21e)],_0x1fe51a);}));}[_0x5de8ba(0x242)](){const _0x28330c=_0x5de8ba;this[_0x28330c(0x227)](this[_0x28330c(0x248)]['commentUpdate$'][_0x28330c(0x215)](async _0x66e48=>{const _0x3a9323=_0x28330c;var _0x2e0be2;let _0x36f5d3=(_0x2e0be2=this[_0x3a9323(0x23c)]['getUnit'](_0x66e48[_0x3a9323(0x25c)])[_0x3a9323(0x220)](_0x1fc93e=>_0x1fc93e['threadId']===_0x66e48[_0x3a9323(0x23a)]))==null?void 0x0:_0x2e0be2['root'];if(!_0x36f5d3)return;let {unitId:_0x52dba2,subUnitId:_0x4b2edc}=_0x36f5d3;switch(_0x66e48[_0x3a9323(0x22e)]&&this[_0x3a9323(0x20d)][_0x3a9323(0x211)](_0x66e48[_0x3a9323(0x22e)]),_0x66e48[_0x3a9323(0x208)]){case _0x264b49[_0x3a9323(0x1e1)]['Add']:break;case _0x264b49[_0x3a9323(0x1e1)][_0x3a9323(0x269)]:var _0x544e16,_0x1f099b;this['_threadCommentModel'][_0x3a9323(0x1e3)](_0x52dba2,_0x4b2edc,{'unitId':_0x52dba2,'subUnitId':_0x4b2edc,'ref':'','id':_0x66e48[_0x3a9323(0x213)],'dT':_0x1ae6db(+_0x66e48['createTimestamp']),'threadId':_0x66e48['threadId'],'personId':(_0x544e16=(_0x1f099b=_0x66e48[_0x3a9323(0x22e)])==null?void 0x0:_0x1f099b[_0x3a9323(0x201)])==null?_0x66e48[_0x3a9323(0x23d)]:_0x544e16,'text':JSON[_0x3a9323(0x236)](_0x66e48[_0x3a9323(0x1ea)]),'parentId':_0x36f5d3['id']});break;case _0x264b49['CommentUpdateEventType']['Delete']:{let _0x5bac74=this[_0x3a9323(0x23c)][_0x3a9323(0x217)](_0x52dba2,_0x4b2edc,_0x66e48['replyId']);_0x5bac74&&_0x5bac74['parentId']&&this[_0x3a9323(0x23c)]['deleteComment'](_0x52dba2,_0x4b2edc,_0x66e48[_0x3a9323(0x213)]);break;}case _0x264b49[_0x3a9323(0x1e1)][_0x3a9323(0x256)]:this[_0x3a9323(0x23c)][_0x3a9323(0x20c)](_0x52dba2,_0x4b2edc,{'commentId':_0x66e48[_0x3a9323(0x213)],'text':JSON[_0x3a9323(0x236)](_0x66e48[_0x3a9323(0x1ea)])});break;case _0x264b49[_0x3a9323(0x1e1)][_0x3a9323(0x25f)]:{var _0x5e5e47;let _0xd9f7d6=(_0x5e5e47=this[_0x3a9323(0x23c)][_0x3a9323(0x1f4)](_0x66e48['unitId'])['find'](_0x5bee1d=>_0x5bee1d[_0x3a9323(0x23a)]===_0x66e48[_0x3a9323(0x23a)]))==null?void 0x0:_0x5e5e47[_0x3a9323(0x25e)];_0xd9f7d6&&this[_0x3a9323(0x23c)][_0x3a9323(0x24e)](_0x52dba2,_0x4b2edc,_0xd9f7d6['id'],_0x66e48[_0x3a9323(0x224)]===_0x264b49['CommentSolvedStatus'][_0x3a9323(0x263)]);break;}default:break;}}));}};_0x4d71b0=_0x4c09c4([_0x3c1fef(0x0,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x4a3ce9['CommentService'])),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x3ea412[_0x5de8ba(0x24f)])),_0x3c1fef(0x2,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e['UserManagerService'])),_0x3c1fef(0x3,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e['Injector']))],_0x4d71b0);let _0xa8911f='thread-comment-data-source.config';Symbol(_0xa8911f);let _0xabf9ce={};function _0x49a6f4(_0x3e9f34,_0x165fe5){const _0x44ed9c=_0x5de8ba;let _0x193313=_0x3e9f34[_0x44ed9c(0x1eb)][0x0];return{..._0x165fe5,'id':_0x193313['replyId'],'resolved':_0x3e9f34[_0x44ed9c(0x224)]===0x1,'dT':_0x1ae6db(_0x193313[_0x44ed9c(0x1f7)]),'personId':_0x193313[_0x44ed9c(0x23d)],'threadId':_0x193313[_0x44ed9c(0x23a)]};}function _0x57ba87(_0xd8ed19,_0x47e5c3,_0x43bf61){const _0x25b2a1=_0x5de8ba;var _0x1b329a,_0x392033;if(((_0x1b329a=_0xd8ed19==null||(_0x392033=_0xd8ed19['replies'])==null?void 0x0:_0x392033[_0x25b2a1(0x21d)])==null?0x0:_0x1b329a)>0x0){let _0x391a6d=(_0x30ba65,_0x4b0602)=>({'id':_0x30ba65[_0x25b2a1(0x213)],'threadId':_0x30ba65['threadId'],'dT':_0x1ae6db(_0x30ba65['createTimestamp']),'personId':_0x30ba65[_0x25b2a1(0x23d)],'resolved':_0xd8ed19['solved']===_0x264b49['CommentSolvedStatus']['Solved'],'unitId':_0x47e5c3,'subUnitId':_0x43bf61,'text':JSON[_0x25b2a1(0x236)](_0x30ba65[_0x25b2a1(0x1ea)]),'parentId':_0x4b0602}),_0x1866df=_0x391a6d(_0xd8ed19[_0x25b2a1(0x1eb)][0x0]);return{..._0x1866df,'children':_0xd8ed19[_0x25b2a1(0x1eb)][_0x25b2a1(0x237)](0x1)[_0x25b2a1(0x234)](_0x15d8e3=>_0x391a6d(_0x15d8e3,_0x1866df['id']))};}return null;}let _0xd01958=class{constructor(_0x3f65e6,_0x429d36,_0x373e7c){const _0x5ab179=_0x5de8ba;this[_0x5ab179(0x1f5)]=_0x3f65e6,this[_0x5ab179(0x20d)]=_0x429d36,this[_0x5ab179(0x1ed)]=_0x373e7c;}async[_0x5de8ba(0x1e3)](_0x54adc0){const _0x464876=_0x5de8ba;var _0x10e6da,_0xd0ebc8;let {parentId:_0x2596a7,unitId:_0x31c039,text:_0x568189,threadId:_0x4abd54}=_0x54adc0,_0x174914=(_0x10e6da=(_0xd0ebc8=_0x568189[_0x464876(0x23b)])==null?void 0x0:_0xd0ebc8[_0x464876(0x259)](_0xe392e0=>_0xe392e0[_0x464876(0x257)]===_0x5eb30e[_0x464876(0x1fb)][_0x464876(0x209)])['map'](_0x8c0b9b=>_0x8c0b9b[_0x464876(0x254)]))==null?[]:_0x10e6da,_0x462f95=JSON['stringify'](_0x568189),_0x11dd74=(await this[_0x464876(0x1ed)][_0x464876(0x1ec)](_0x31c039))[_0x464876(0x1e0)]();if(_0x2596a7){let _0x5a6a62={'memberId':_0x11dd74,'unitId':_0x31c039,'content':_0x462f95,'mention':_0x174914,'threadId':_0x4abd54},_0x3fd4b4=(await this[_0x464876(0x1f5)]['post'](_0x464876(0x223)+_0x31c039+_0x464876(0x1df),{'body':_0x5a6a62}))[_0x464876(0x207)]['reply'];return{..._0x54adc0,'id':_0x3fd4b4[_0x464876(0x213)],'dT':(0x0,_0x5eb30e[_0x464876(0x245)])(+_0x3fd4b4['createTimestamp'])[_0x464876(0x1fe)](_0x464876(0x1f3)),'personId':_0x3fd4b4[_0x464876(0x23d)]};}else{let _0x4640b2={'memberId':_0x11dd74,'unitId':_0x31c039,'content':_0x462f95,'mention':_0x174914};return _0x49a6f4((await this['_httpService'][_0x464876(0x262)](_0x464876(0x223)+_0x31c039+_0x464876(0x212),{'body':_0x4640b2}))[_0x464876(0x207)][_0x464876(0x216)],_0x54adc0);}}async[_0x5de8ba(0x20c)](_0x505fa3){const _0x159139=_0x5de8ba;var _0x3f66d0,_0x122b97;let {text:_0x38455e,unitId:_0x84ec45}=_0x505fa3,_0x1c3a90=(_0x3f66d0=(_0x122b97=_0x38455e[_0x159139(0x23b)])==null?void 0x0:_0x122b97[_0x159139(0x259)](_0x2f79f5=>_0x2f79f5[_0x159139(0x257)]===_0x5eb30e[_0x159139(0x1fb)][_0x159139(0x209)])[_0x159139(0x234)](_0x2c25a9=>_0x2c25a9[_0x159139(0x254)]))==null?[]:_0x3f66d0,_0x2150a6=JSON[_0x159139(0x205)](_0x38455e),_0x19ee5e=_0x505fa3[_0x159139(0x23a)],_0x2f4dd6=_0x505fa3['id'],_0x215e29={'memberId':(await this['_sessionService'][_0x159139(0x1ec)](_0x84ec45))['getMemberID'](),'unitId':_0x84ec45,'threadId':_0x19ee5e,'mention':_0x1c3a90,'content':_0x2150a6,'replyId':_0x2f4dd6},_0x32b456=await this['_httpService'][_0x159139(0x262)](_0x159139(0x223)+_0x84ec45+_0x159139(0x1f9),{'body':_0x215e29});return!_0x32b456[_0x159139(0x207)]['error']||_0x32b456['body']['error']['code']===0x1;}async[_0x5de8ba(0x24e)](_0x17c862){const _0xfc38cc=_0x5de8ba;let {unitId:_0x373983}=_0x17c862,_0x44a523=_0x17c862[_0xfc38cc(0x23a)],_0x467bd0={'memberId':this[_0xfc38cc(0x20d)][_0xfc38cc(0x20e)]()[_0xfc38cc(0x201)],'unitId':_0x373983,'threadId':_0x44a523,'solved':_0x17c862[_0xfc38cc(0x20a)]?_0x264b49[_0xfc38cc(0x21f)]['Solved']:_0x264b49[_0xfc38cc(0x21f)][_0xfc38cc(0x1ee)]},_0x4ac969=await this[_0xfc38cc(0x1f5)][_0xfc38cc(0x262)](_0xfc38cc(0x223)+_0x373983+_0xfc38cc(0x265),{'body':_0x467bd0});return!_0x4ac969['body'][_0xfc38cc(0x252)]||_0x4ac969[_0xfc38cc(0x207)]['error'][_0xfc38cc(0x24b)]===0x1;}async[_0x5de8ba(0x244)](_0xd830b4,_0xee8061,_0x536675,_0x4a76e0){const _0x1a8d8e=_0x5de8ba;let _0x48834f={'memberId':(await this[_0x1a8d8e(0x1ed)][_0x1a8d8e(0x1ec)](_0xd830b4))[_0x1a8d8e(0x1e0)](),'threadId':_0x536675,'replyId':_0x4a76e0,'unitId':_0xd830b4},_0x1da15d=await this[_0x1a8d8e(0x1f5)][_0x1a8d8e(0x262)](_0x1a8d8e(0x223)+_0xd830b4+'/delete',{'body':_0x48834f});return!_0x1da15d[_0x1a8d8e(0x207)][_0x1a8d8e(0x252)]||_0x1da15d['body'][_0x1a8d8e(0x252)][_0x1a8d8e(0x24b)]===0x1;}async[_0x5de8ba(0x1ff)](_0x3775e2,_0x4355a3,_0x3db5ad){const _0x4a2a55=_0x5de8ba;let _0x94d430={'unitId':_0x3775e2,'threadId':_0x3db5ad},_0x3766cf=await this['_httpService'][_0x4a2a55(0x262)](_0x4a2a55(0x223)+_0x3775e2+_0x4a2a55(0x1fa),{'body':_0x94d430}),_0x52d1bd=_0x3db5ad[_0x4a2a55(0x234)](_0x442013=>_0x57ba87(_0x3766cf[_0x4a2a55(0x207)][_0x4a2a55(0x22a)][_0x442013],_0x3775e2,_0x4355a3))[_0x4a2a55(0x259)](Boolean);return Object['values'](_0x3766cf[_0x4a2a55(0x207)][_0x4a2a55(0x1f1)])[_0x4a2a55(0x241)](_0x46b68f=>{const _0x4faa33=_0x4a2a55;this[_0x4faa33(0x20d)][_0x4faa33(0x211)](_0x46b68f);}),_0x52d1bd;}[_0x5de8ba(0x1e4)](_0x332ac7){const _0x332c94=_0x5de8ba;return{'id':_0x332ac7['id'],'threadId':_0x332ac7[_0x332c94(0x23a)],'ref':_0x332ac7['ref']};}};_0xd01958=_0x4c09c4([_0x3c1fef(0x0,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x265398[_0x5de8ba(0x266)])),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e[_0x5de8ba(0x23f)])),_0x3c1fef(0x2,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x4a3ce9[_0x5de8ba(0x243)]))],_0xd01958);let _0x248d24=class extends _0x5eb30e[_0x5de8ba(0x20f)]{constructor(_0x198290,_0x368aa5){const _0x3677fc=_0x5de8ba;super(),this[_0x3677fc(0x229)]=_0x198290,this['_threadCommentDataSource']=_0x368aa5,this[_0x3677fc(0x202)]();}[_0x5de8ba(0x202)](){const _0x3de160=_0x5de8ba;this[_0x3de160(0x229)][_0x3de160(0x1e7)]=this[_0x3de160(0x22d)],this['_threadCommentDataSourceService'][_0x3de160(0x21b)]=!0x1;}};_0x248d24=_0x4c09c4([_0x3c1fef(0x0,_0x3ea412['IThreadCommentDataSourceService']),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0xd01958))],_0x248d24);function _0x938851(_0x4c1982){'@babel/helpers - typeof';const _0x471a62=_0x5de8ba;return _0x938851=typeof Symbol==_0x471a62(0x23e)&&typeof Symbol[_0x471a62(0x22b)]==_0x471a62(0x1f2)?function(_0x11b824){return typeof _0x11b824;}:function(_0x3aa073){const _0x3ab0ef=_0x471a62;return _0x3aa073&&typeof Symbol=='function'&&_0x3aa073['constructor']===Symbol&&_0x3aa073!==Symbol[_0x3ab0ef(0x228)]?'symbol':typeof _0x3aa073;},_0x938851(_0x4c1982);}function _0x159e94(_0x3b6ef2,_0x4bcfe2){const _0x37e035=_0x5de8ba;if(_0x938851(_0x3b6ef2)!=_0x37e035(0x260)||!_0x3b6ef2)return _0x3b6ef2;var _0x4c02f3=_0x3b6ef2[Symbol[_0x37e035(0x1e5)]];if(_0x4c02f3!==void 0x0){var _0x4038f7=_0x4c02f3['call'](_0x3b6ef2,_0x4bcfe2||_0x37e035(0x261));if(_0x938851(_0x4038f7)!='object')return _0x4038f7;throw TypeError(_0x37e035(0x250));}return(_0x4bcfe2==='string'?String:Number)(_0x3b6ef2);}function _0xfaf3b(_0x16369a){const _0x4880c8=_0x5de8ba;var _0x5c7d9d=_0x159e94(_0x16369a,_0x4880c8(0x1f0));return _0x938851(_0x5c7d9d)==_0x4880c8(0x1f2)?_0x5c7d9d:_0x5c7d9d+'';}function _0x1b1519(_0x27f2b3,_0x3c00c5,_0x134b64){return(_0x3c00c5=_0xfaf3b(_0x3c00c5))in _0x27f2b3?Object['defineProperty'](_0x27f2b3,_0x3c00c5,{'value':_0x134b64,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x27f2b3[_0x3c00c5]=_0x134b64,_0x27f2b3;}let _0x2429e9=class extends _0x5eb30e[_0x5de8ba(0x267)]{constructor(_0x2c7f0c=_0xabf9ce,_0x572c31,_0x44df6f){const _0x3a9d74=_0x5de8ba;super(),this['_config']=_0x2c7f0c,this[_0x3a9d74(0x21e)]=_0x572c31,this[_0x3a9d74(0x239)]=_0x44df6f;let {..._0x27e6bb}=(0x0,_0x5eb30e[_0x3a9d74(0x230)])({},_0xabf9ce,this['_config']);this[_0x3a9d74(0x239)][_0x3a9d74(0x25a)](_0xa8911f,_0x27e6bb);}[_0x5de8ba(0x268)](){[[_0xd01958],[_0x248d24],[_0x4d71b0]]['forEach'](_0x1142b8=>{const _0x501776=_0x191e;this[_0x501776(0x21e)][_0x501776(0x24a)](_0x1142b8);});}[_0x5de8ba(0x258)](){const _0x26888f=_0x5de8ba;this[_0x26888f(0x21e)][_0x26888f(0x206)](_0x248d24),this[_0x26888f(0x21e)][_0x26888f(0x206)](_0x4d71b0);}};_0x1b1519(_0x2429e9,_0x5de8ba(0x1de),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),_0x1b1519(_0x2429e9,'packageName',_0x4a79c2),_0x1b1519(_0x2429e9,'version',_0x205c7e),_0x2429e9=_0x4c09c4([(0x0,_0x5eb30e[_0x5de8ba(0x264)])(_0x2a2e4d[_0x5de8ba(0x231)],_0x4a3ce9[_0x5de8ba(0x240)],_0x326ba7[_0x5de8ba(0x203)]),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e[_0x5de8ba(0x1fc)])),_0x3c1fef(0x2,_0x5eb30e['IConfigService'])],_0x2429e9),Object['defineProperty'](_0x233f00,_0x5de8ba(0x246),{'enumerable':!0x0,'get':function(){return _0x2429e9;}});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Remote data source integration for Univer thread comments.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"rxjs": ">=7.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@univerjs-pro/license": "0.
|
|
55
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
56
|
-
"@univerjs/network": "0.
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/thread-comment": "0.
|
|
54
|
+
"@univerjs-pro/license": "0.24.0",
|
|
55
|
+
"@univerjs-pro/collaboration-client": "0.24.0",
|
|
56
|
+
"@univerjs/network": "0.24.0",
|
|
57
|
+
"@univerjs/core": "0.24.0",
|
|
58
|
+
"@univerjs/protocol": "0.24.0",
|
|
59
|
+
"@univerjs/thread-comment-ui": "0.24.0",
|
|
60
|
+
"@univerjs/thread-comment": "0.24.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"rxjs": "7.8.2",
|
|
64
64
|
"typescript": "^6.0.3",
|
|
65
|
-
"vitest": "^4.1.
|
|
66
|
-
"@univerjs-infra/shared": "0.
|
|
65
|
+
"vitest": "^4.1.6",
|
|
66
|
+
"@univerjs-infra/shared": "0.24.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"test": "vitest run",
|