@univerjs-pro/thread-comment-datasource 0.2.13 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x24cf61=_0x2330;(function(_0x373bb6,_0x2214d3){const _0x51a8f3=_0x2330,_0x258ff2=_0x373bb6();while(!![]){try{const _0x19ea01=-parseInt(_0x51a8f3(0x136))/0x1*(parseInt(_0x51a8f3(0xc6))/0x2)+-parseInt(_0x51a8f3(0xc1))/0x3+parseInt(_0x51a8f3(0x10e))/0x4*(-parseInt(_0x51a8f3(0xcf))/0x5)+-parseInt(_0x51a8f3(0xed))/0x6*(parseInt(_0x51a8f3(0x112))/0x7)+-parseInt(_0x51a8f3(0xdc))/0x8*(parseInt(_0x51a8f3(0xcb))/0x9)+-parseInt(_0x51a8f3(0x12b))/0xa*(parseInt(_0x51a8f3(0xf9))/0xb)+parseInt(_0x51a8f3(0x102))/0xc*(parseInt(_0x51a8f3(0xff))/0xd);if(_0x19ea01===_0x2214d3)break;else _0x258ff2['push'](_0x258ff2['shift']());}catch(_0x5017d3){_0x258ff2['push'](_0x258ff2['shift']());}}}(_0x2e01,0x25aa2));Object['defineProperty'](exports,Symbol[_0x24cf61(0xe6)],{'value':_0x24cf61(0xc9)});const c=require('@univerjs/core'),g=require(_0x24cf61(0x122)),N=require(_0x24cf61(0xc2)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x24cf61(0xec)),$=require(_0x24cf61(0x119)),E=require(_0x24cf61(0xf4)),q=_0x24cf61(0xc5);var p=(_0xf6f2cb=>(_0xf6f2cb[_0xf6f2cb[_0x24cf61(0xbe)]=0x0]=_0x24cf61(0xbe),_0xf6f2cb[_0xf6f2cb[_0x24cf61(0xc0)]=0x1]=_0x24cf61(0xc0),_0xf6f2cb[_0xf6f2cb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf6f2cb))(p||{}),v=(_0x15a9c9=>(_0x15a9c9[_0x15a9c9['Unknown']=0x0]=_0x24cf61(0xfa),_0x15a9c9[_0x15a9c9[_0x24cf61(0xf7)]=0x1]=_0x24cf61(0xf7),_0x15a9c9[_0x15a9c9[_0x24cf61(0xeb)]=0x2]=_0x24cf61(0xeb),_0x15a9c9[_0x15a9c9['Edit']=0x3]=_0x24cf61(0xd3),_0x15a9c9[_0x15a9c9[_0x24cf61(0xf3)]=0x4]=_0x24cf61(0xf3),_0x15a9c9[_0x15a9c9[_0x24cf61(0x13c)]=0x5]=_0x24cf61(0x13c),_0x15a9c9[_0x15a9c9[_0x24cf61(0x104)]=-0x1]='UNRECOGNIZED',_0x15a9c9))(v||{});function _0x2330(_0x1ea35a,_0x465c7f){const _0x2e014f=_0x2e01();return _0x2330=function(_0x23306a,_0x330aef){_0x23306a=_0x23306a-0xbb;let _0x394168=_0x2e014f[_0x23306a];return _0x394168;},_0x2330(_0x1ea35a,_0x465c7f);}const P=_0x519275=>$(new Date(+_0x519275))[_0x24cf61(0x13d)](_0x24cf61(0xd4)),x=async(_0x54e68b,_0xf415d6)=>{const _0x23f86b=_0x24cf61,_0x29ff0e=_0x54e68b[_0x23f86b(0x139)](c[_0x23f86b(0x10d)]),_0x58761c=_0x54e68b[_0x23f86b(0x139)](O[_0x23f86b(0x114)]);_0xf415d6['forEach'](_0x437df2=>{_0x29ff0e['getUser'](_0x437df2)&&_0xf415d6['delete'](_0x437df2);}),_0xf415d6['size']&&(await _0x58761c[_0x23f86b(0x139)]('/universer-api/user/list',{'params':{'userIDs':[..._0xf415d6]}}))[_0x23f86b(0xc8)][_0x23f86b(0x105)][_0x23f86b(0x11f)](_0x4af2d3=>{_0x4af2d3&&_0x29ff0e['addUser'](_0x4af2d3);});};var Y=Object[_0x24cf61(0x13f)],G=Object[_0x24cf61(0x12a)],H=(_0x4dfc1e,_0x1557c5,_0x11030e,_0x25107b)=>{const _0x4c6a07=_0x24cf61;for(var _0x187288=_0x25107b>0x1?void 0x0:_0x25107b?G(_0x1557c5,_0x11030e):_0x1557c5,_0x1f2727=_0x4dfc1e[_0x4c6a07(0x124)]-0x1,_0x31a100;_0x1f2727>=0x0;_0x1f2727--)(_0x31a100=_0x4dfc1e[_0x1f2727])&&(_0x187288=(_0x25107b?_0x31a100(_0x1557c5,_0x11030e,_0x187288):_0x31a100(_0x187288))||_0x187288);return _0x25107b&&_0x187288&&Y(_0x1557c5,_0x11030e,_0x187288),_0x187288;},I=(_0x596145,_0x1e883b)=>(_0x164ff5,_0x9d3b45)=>_0x1e883b(_0x164ff5,_0x9d3b45,_0x596145);function L(_0x451234,_0x2c9c05){const _0x1b7a63=_0x24cf61,_0x744397=_0x451234[_0x1b7a63(0xf2)][0x0];return{..._0x2c9c05,'id':_0x744397[_0x1b7a63(0x132)],'resolved':_0x451234['solved']===0x1,'dT':P(_0x744397[_0x1b7a63(0x103)]),'personId':_0x744397[_0x1b7a63(0xd1)],'threadId':_0x744397[_0x1b7a63(0x130)]};}function A(_0x2adafe,_0x2be33f,_0x3d52b0){const _0x58f5c0=_0x24cf61;var _0x1694d5,_0x23c5da;if(((_0x23c5da=(_0x1694d5=_0x2adafe==null?void 0x0:_0x2adafe['replies'])==null?void 0x0:_0x1694d5[_0x58f5c0(0x124)])!=null?_0x23c5da:0x0)>0x0){const _0x4f9240=(_0x4735ce,_0x58eda5)=>({'id':_0x4735ce['replyId'],'threadId':_0x4735ce[_0x58f5c0(0x130)],'dT':P(_0x4735ce[_0x58f5c0(0x103)]),'personId':_0x4735ce[_0x58f5c0(0xd1)],'resolved':_0x2adafe[_0x58f5c0(0xda)]===p[_0x58f5c0(0xc0)],'unitId':_0x2be33f,'subUnitId':_0x3d52b0,'text':JSON[_0x58f5c0(0x10c)](_0x4735ce[_0x58f5c0(0xfe)]),'parentId':_0x58eda5}),_0x26d72e=_0x4f9240(_0x2adafe['replies'][0x0]);return{..._0x26d72e,'children':_0x2adafe[_0x58f5c0(0xf2)]['slice'](0x1)[_0x58f5c0(0xe0)](_0xfab8c=>_0x4f9240(_0xfab8c,_0x26d72e['id']))};}return null;}let C=class{constructor(_0x540051,_0xffad9a,_0x6e74ec,_0x4624a2){const _0x18fc19=_0x24cf61;this['_httpService']=_0x540051,this[_0x18fc19(0x135)]=_0xffad9a,this[_0x18fc19(0xe5)]=_0x6e74ec,this['_injector']=_0x4624a2;}async[_0x24cf61(0xe2)](_0x3a1c68){const _0x46005b=_0x24cf61;var _0x420fef,_0x21d2e2;const {parentId:_0x5db820,unitId:_0x6192b7,text:_0x5e97ab,threadId:_0x44bd5a}=_0x3a1c68,_0x4d62de=(_0x21d2e2=(_0x420fef=_0x5e97ab[_0x46005b(0x10f)])==null?void 0x0:_0x420fef[_0x46005b(0xfc)](_0x14888e=>_0x14888e[_0x46005b(0xc3)]===c['CustomRangeType'][_0x46005b(0x10a)])[_0x46005b(0xe0)](_0x33ed9a=>_0x33ed9a[_0x46005b(0x140)]))!=null?_0x21d2e2:[],_0xe628fe=JSON['stringify'](_0x5e97ab),_0x2117f5=(await this[_0x46005b(0xe5)][_0x46005b(0x142)](_0x6192b7))['getMemberID']();if(_0x5db820){const _0x5dd6b7={'memberId':_0x2117f5,'unitId':_0x6192b7,'content':_0xe628fe,'mention':_0x4d62de,'threadId':_0x44bd5a},_0x5e3674=(await this[_0x46005b(0x107)][_0x46005b(0xd0)](_0x46005b(0xd8)+_0x6192b7+'/reply',{'body':_0x5dd6b7}))[_0x46005b(0xc8)][_0x46005b(0x133)];return{..._0x3a1c68,'id':_0x5e3674[_0x46005b(0x132)],'dT':$(+_0x5e3674[_0x46005b(0x103)])[_0x46005b(0x13d)](_0x46005b(0xd4)),'personId':_0x5e3674[_0x46005b(0xd1)]};}else{const _0x2b2e4f={'memberId':_0x2117f5,'unitId':_0x6192b7,'content':_0xe628fe,'mention':_0x4d62de},_0x59a149=await this[_0x46005b(0x107)][_0x46005b(0xd0)](_0x46005b(0xd8)+_0x6192b7+_0x46005b(0xe4),{'body':_0x2b2e4f});return L(_0x59a149[_0x46005b(0xc8)][_0x46005b(0x123)],_0x3a1c68);}}async[_0x24cf61(0x113)](_0x533a45){const _0x4e9139=_0x24cf61;var _0x25b0e4,_0xd56e68;const {text:_0x1662cb,unitId:_0x58e2d2}=_0x533a45,_0x24127c=(_0xd56e68=(_0x25b0e4=_0x1662cb['customRanges'])==null?void 0x0:_0x25b0e4[_0x4e9139(0xfc)](_0x2f1175=>_0x2f1175[_0x4e9139(0xc3)]===c[_0x4e9139(0x12f)][_0x4e9139(0x10a)])['map'](_0x58c6da=>_0x58c6da[_0x4e9139(0x140)]))!=null?_0xd56e68:[],_0xed0633=JSON['stringify'](_0x1662cb),_0x373fcf=_0x533a45[_0x4e9139(0x130)],_0x3c7852=_0x533a45['id'],_0x2cb91a={'memberId':(await this[_0x4e9139(0xe5)][_0x4e9139(0x142)](_0x58e2d2))[_0x4e9139(0x13a)](),'unitId':_0x58e2d2,'threadId':_0x373fcf,'mention':_0x24127c,'content':_0xed0633,'replyId':_0x3c7852},_0x3a94d0=await this[_0x4e9139(0x107)][_0x4e9139(0xd0)](_0x4e9139(0xd8)+_0x58e2d2+_0x4e9139(0xf0),{'body':_0x2cb91a});return!_0x3a94d0[_0x4e9139(0xc8)][_0x4e9139(0x13e)]||_0x3a94d0[_0x4e9139(0xc8)][_0x4e9139(0x13e)]['code']===0x1;}async[_0x24cf61(0xfd)](_0x4f7b20){const _0x3291d0=_0x24cf61,{unitId:_0x17a43d}=_0x4f7b20,_0x295a26=_0x4f7b20[_0x3291d0(0x130)],_0x53f44e={'memberId':this[_0x3291d0(0x135)][_0x3291d0(0xf6)]()[_0x3291d0(0x125)],'unitId':_0x17a43d,'threadId':_0x295a26,'solved':_0x4f7b20[_0x3291d0(0xd6)]?p[_0x3291d0(0xc0)]:p[_0x3291d0(0xbe)]},_0x132772=await this[_0x3291d0(0x107)]['post'](_0x3291d0(0xd8)+_0x17a43d+_0x3291d0(0x127),{'body':_0x53f44e});return!_0x132772['body']['error']||_0x132772[_0x3291d0(0xc8)]['error'][_0x3291d0(0x108)]===0x1;}async['deleteComment'](_0x29bb99,_0x282cce,_0x480369,_0x27f7c6){const _0x174990=_0x24cf61,_0x585340={'memberId':(await this[_0x174990(0xe5)][_0x174990(0x142)](_0x29bb99))[_0x174990(0x13a)](),'threadId':_0x480369,'replyId':_0x27f7c6,'unitId':_0x29bb99},_0x4882f2=await this[_0x174990(0x107)][_0x174990(0xd0)](_0x174990(0xd8)+_0x29bb99+_0x174990(0xd5),{'body':_0x585340});return!_0x4882f2['body'][_0x174990(0x13e)]||_0x4882f2[_0x174990(0xc8)][_0x174990(0x13e)][_0x174990(0x108)]===0x1;}async[_0x24cf61(0xfb)](_0x2f8595,_0x5f2be4,_0x31c2e7){const _0x236f21=_0x24cf61,_0x33d1d9={'unitId':_0x2f8595,'threadId':_0x31c2e7},_0x3b4482=await this[_0x236f21(0x107)][_0x236f21(0xd0)](_0x236f21(0xd8)+_0x2f8595+_0x236f21(0xbd),{'body':_0x33d1d9}),_0x32de62=_0x31c2e7[_0x236f21(0xe0)](_0x15e9ca=>A(_0x3b4482[_0x236f21(0xc8)]['comments'][_0x15e9ca],_0x2f8595,_0x5f2be4))[_0x236f21(0xfc)](Boolean);return Object[_0x236f21(0x106)](_0x3b4482['body'][_0x236f21(0x105)])[_0x236f21(0x11f)](_0x29ff79=>{const _0x748310=_0x236f21;this[_0x748310(0x135)][_0x748310(0xf8)](_0x29ff79);}),_0x32de62;}[_0x24cf61(0x117)](_0xf84de5){const _0xa6b2ec=_0x24cf61;return{'id':_0xf84de5['id'],'threadId':_0xf84de5[_0xa6b2ec(0x130)],'ref':_0xf84de5[_0xa6b2ec(0x13b)]};}};C=H([I(0x0,c['Inject'](O['HTTPService'])),I(0x1,c['Inject'](c[_0x24cf61(0x10d)])),I(0x2,c[_0x24cf61(0x11e)](y[_0x24cf61(0x137)])),I(0x3,c[_0x24cf61(0x11e)](c['Injector']))],C);var J=Object[_0x24cf61(0x13f)],F=Object[_0x24cf61(0x12a)],Z=(_0x552214,_0x490a3b,_0x2d4401,_0x1e5cc8)=>{for(var _0x56f7f6=_0x1e5cc8>0x1?void 0x0:_0x1e5cc8?F(_0x490a3b,_0x2d4401):_0x490a3b,_0x4117d7=_0x552214['length']-0x1,_0xedee0c;_0x4117d7>=0x0;_0x4117d7--)(_0xedee0c=_0x552214[_0x4117d7])&&(_0x56f7f6=(_0x1e5cc8?_0xedee0c(_0x490a3b,_0x2d4401,_0x56f7f6):_0xedee0c(_0x56f7f6))||_0x56f7f6);return _0x1e5cc8&&_0x56f7f6&&J(_0x490a3b,_0x2d4401,_0x56f7f6),_0x56f7f6;},W=(_0x196aac,_0x1b7d3b)=>(_0x281b38,_0x1fffcc)=>_0x1b7d3b(_0x281b38,_0x1fffcc,_0x196aac);let D=class{constructor(_0x3f7205){const _0x4a82d8=_0x24cf61;this[_0x4a82d8(0x107)]=_0x3f7205;}async[_0x24cf61(0xdd)](_0x4fd94a,_0x31f520,_0x1707be){const _0x5b33dc=_0x24cf61,_0x10a1bb=new URL(window[_0x5b33dc(0xef)][_0x5b33dc(0x12e)])[_0x5b33dc(0x116)][_0x5b33dc(0x139)](_0x5b33dc(0x11c));if(!_0x10a1bb)return[];const _0xd23156=window[_0x5b33dc(0xef)]['host'],_0x5670aa=window['location'][_0x5b33dc(0xe1)]==='https:'?_0x5b33dc(0xd7):'http';return(await this[_0x5b33dc(0x107)][_0x5b33dc(0x139)](_0x5670aa+_0x5b33dc(0xf1)+_0xd23156+'/universer-api/authz/collaborator',{'params':{'objectID':_0x10a1bb,'unitID':_0x10a1bb}}))['body']['collaborators'][_0x5b33dc(0xe0)](_0x2231d3=>{const _0x236af0=_0x5b33dc;var _0x1f8e05,_0x70a783,_0x240b2b,_0x7086b0,_0x3cc1fb,_0xca2d9b;return{'id':(_0x70a783=(_0x1f8e05=_0x2231d3[_0x236af0(0xdf)])==null?void 0x0:_0x1f8e05[_0x236af0(0x125)])!=null?_0x70a783:'','label':(_0x7086b0=(_0x240b2b=_0x2231d3['subject'])==null?void 0x0:_0x240b2b['name'])!=null?_0x7086b0:'','icon':(_0xca2d9b=(_0x3cc1fb=_0x2231d3[_0x236af0(0xdf)])==null?void 0x0:_0x3cc1fb[_0x236af0(0x110)])!=null?_0xca2d9b:'','type':_0x236af0(0x101)};});}};function _0x2e01(){const _0x4f61ed=['updateComment','HTTPService','UniverThreadCommentPlugin','searchParams','saveCommentToSnapshot','Disposable','dayjs','_configService','_threadCommentMentionDataSource','unit','pipe','Inject','forEach','Starting','IThreadCommentMentionDataService','@univerjs/thread-comment','comment','length','userID','_commentService','/solved','personId','dataSource','getOwnPropertyDescriptor','796490gYtGmi','_threadCommentMentionDataService','UniverCollaborationClientPlugin','href','CustomRangeType','threadId','IConfigService','replyId','reply','UniverThreadCommentDataSourcePlugin','_userService','2hGzNWC','CollaborationSessionService','LifecycleStages','get','getMemberID','ref','Solve','format','error','defineProperty','rangeId','type','requireSession','subscribe','UniverInstanceType','/list','OpenOrReOpen','_initDataSource','Solved','497313NoQtEv','@univerjs/thread-comment-ui','rangeType','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','91478SpGokK','OnLifecycle','body','Module','commentUpdate$','837AqYRZK','parentId','_injector','_initUserSync','405095mdZhGU','post','userId','setConfig','Edit','YYYY/MM/DD\x20HH:mm','/delete','resolved','https','/universer-api/comment/unit/','Plugin','solved','ThreadCommentModel','12416MhCerO','getMentions','deleteComment','subject','map','protocol','addComment','getThread','/add','_sessionService','toStringTag','_threadCommentDataSourceService','IThreadCommentDataSourceService','add','onStarting','Reply','@univerjs/network','61206hgoLYd','_threadCommentDataSource','location','/edit','://','replies','Delete','rxjs','_threadCommentModel','getCurrentUser','Add','addUser','22JwYGZS','Unknown','listComments','filter','resolveComment','content','65rMbBXK','_init','user','2375988RqnwhF','createTimestamp','UNRECOGNIZED','users','values','_httpService','code','Injector','COMMENT','_config','parse','UserManagerService','4ijEtXZ','customRanges','avatar','unitId','133hXMGdu'];_0x2e01=function(){return _0x4f61ed;};return _0x2e01();}D=Z([W(0x0,c[_0x24cf61(0x11e)](O[_0x24cf61(0x114)]))],D);var z=Object[_0x24cf61(0x13f)],B=Object[_0x24cf61(0x12a)],K=(_0x4541ac,_0x23debe,_0x3af438,_0x3ef201)=>{const _0x454f9f=_0x24cf61;for(var _0x586c4a=_0x3ef201>0x1?void 0x0:_0x3ef201?B(_0x23debe,_0x3af438):_0x23debe,_0x628980=_0x4541ac[_0x454f9f(0x124)]-0x1,_0x3c280a;_0x628980>=0x0;_0x628980--)(_0x3c280a=_0x4541ac[_0x628980])&&(_0x586c4a=(_0x3ef201?_0x3c280a(_0x23debe,_0x3af438,_0x586c4a):_0x3c280a(_0x586c4a))||_0x586c4a);return _0x3ef201&&_0x586c4a&&z(_0x23debe,_0x3af438,_0x586c4a),_0x586c4a;},S=(_0x4d6dc0,_0x30e84e)=>(_0x9e331b,_0x338c29)=>_0x30e84e(_0x9e331b,_0x338c29,_0x4d6dc0);let f=class extends c[_0x24cf61(0x118)]{constructor(_0x31ab4b,_0x1cddf4,_0x173a45,_0x5f2178){const _0x5f2d95=_0x24cf61;super(),this[_0x5f2d95(0xe7)]=_0x31ab4b,this[_0x5f2d95(0xee)]=_0x1cddf4,this['_threadCommentMentionDataService']=_0x173a45,this[_0x5f2d95(0x11b)]=_0x5f2178,this[_0x5f2d95(0xbf)]();}[_0x24cf61(0xbf)](){const _0x3c485b=_0x24cf61;this['_threadCommentDataSourceService'][_0x3c485b(0x129)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this[_0x3c485b(0x12c)][_0x3c485b(0x129)]=this[_0x3c485b(0x11b)];}};f=K([c[_0x24cf61(0xc7)](c['LifecycleStages'][_0x24cf61(0x120)],f),S(0x0,g[_0x24cf61(0xe8)]),S(0x1,c[_0x24cf61(0x11e)](C)),S(0x2,N[_0x24cf61(0x121)]),S(0x3,c['Inject'](D))],f);var V=Object['defineProperty'],Q=Object['getOwnPropertyDescriptor'],X=(_0xc31d7f,_0x4b2617,_0x3c52b2,_0x17b898)=>{const _0x5b6156=_0x24cf61;for(var _0x58702c=_0x17b898>0x1?void 0x0:_0x17b898?Q(_0x4b2617,_0x3c52b2):_0x4b2617,_0x2f6d82=_0xc31d7f[_0x5b6156(0x124)]-0x1,_0x4d43d2;_0x2f6d82>=0x0;_0x2f6d82--)(_0x4d43d2=_0xc31d7f[_0x2f6d82])&&(_0x58702c=(_0x17b898?_0x4d43d2(_0x4b2617,_0x3c52b2,_0x58702c):_0x4d43d2(_0x58702c))||_0x58702c);return _0x17b898&&_0x58702c&&V(_0x4b2617,_0x3c52b2,_0x58702c),_0x58702c;},_=(_0x4acdf8,_0x202ea9)=>(_0x5421eb,_0x1ab26d)=>_0x202ea9(_0x5421eb,_0x1ab26d,_0x4acdf8);let b=class extends c[_0x24cf61(0x118)]{constructor(_0x46e296,_0x4b26b0,_0x2de952,_0x4f9252){const _0x2a8a42=_0x24cf61;super(),this['_commentService']=_0x46e296,this['_threadCommentModel']=_0x4b26b0,this['_userService']=_0x2de952,this[_0x2a8a42(0xcd)]=_0x4f9252,this['_init'](),this[_0x2a8a42(0xce)]();}['_initUserSync'](){const _0xf15f13=_0x24cf61;this['disposeWithMe'](this[_0xf15f13(0xf5)][_0xf15f13(0xca)][_0xf15f13(0x11d)](E[_0xf15f13(0xc4)](0x10))[_0xf15f13(0xbb)](_0x37be64=>{const _0x1eb9d7=new Set();_0x37be64['forEach'](_0x1f3143=>{const _0x5f3034=_0x2330;switch(_0x1f3143[_0x5f3034(0x141)]){case'add':{const _0x101759=_0x1f3143['payload'][_0x5f3034(0x128)];_0x1eb9d7[_0x5f3034(0xe9)](_0x101759);break;}}}),x(this['_injector'],_0x1eb9d7);}));}[_0x24cf61(0x100)](){const _0x5cda00=_0x24cf61;this['disposeWithMe'](this[_0x5cda00(0x126)][_0x5cda00(0xca)][_0x5cda00(0xbb)](async _0x4665cb=>{const _0x2953b0=_0x5cda00;var _0x124d91,_0x10aa3c;const _0x5a3866=this[_0x2953b0(0xf5)][_0x2953b0(0xe3)](_0x4665cb[_0x2953b0(0x111)],_0x4665cb['threadId']);if(!_0x5a3866)return;const {unitId:_0x123932,subUnitId:_0x5e3526}=_0x5a3866;switch(_0x4665cb[_0x2953b0(0x101)]&&this[_0x2953b0(0x135)][_0x2953b0(0xf8)](_0x4665cb[_0x2953b0(0x101)]),_0x4665cb[_0x2953b0(0x141)]){case v['Add']:break;case v['Reply']:{this[_0x2953b0(0xf5)][_0x2953b0(0xe2)](_0x123932,_0x5e3526,{'unitId':_0x123932,'subUnitId':_0x5e3526,'ref':'','id':_0x4665cb[_0x2953b0(0x132)],'dT':P(+_0x4665cb[_0x2953b0(0x103)]),'threadId':_0x4665cb['threadId'],'personId':(_0x10aa3c=(_0x124d91=_0x4665cb[_0x2953b0(0x101)])==null?void 0x0:_0x124d91[_0x2953b0(0x125)])!=null?_0x10aa3c:_0x4665cb[_0x2953b0(0xd1)],'text':JSON['parse'](_0x4665cb[_0x2953b0(0xfe)]),'parentId':_0x5a3866['id']});break;}case v['Delete']:{const _0x10fa66=this[_0x2953b0(0xf5)]['getComment'](_0x123932,_0x5e3526,_0x4665cb[_0x2953b0(0x132)]);_0x10fa66&&_0x10fa66[_0x2953b0(0xcc)]&&this['_threadCommentModel'][_0x2953b0(0xde)](_0x123932,_0x5e3526,_0x4665cb[_0x2953b0(0x132)]);break;}case v[_0x2953b0(0xd3)]:{this[_0x2953b0(0xf5)][_0x2953b0(0x113)](_0x123932,_0x5e3526,{'commentId':_0x4665cb[_0x2953b0(0x132)],'text':JSON['parse'](_0x4665cb[_0x2953b0(0xfe)])});break;}case v[_0x2953b0(0x13c)]:{const _0x292d9c=this['_threadCommentModel']['getThread'](_0x123932,_0x4665cb[_0x2953b0(0x130)]);_0x292d9c&&this['_threadCommentModel']['resolveComment'](_0x123932,_0x5e3526,_0x292d9c['id'],_0x4665cb[_0x2953b0(0xda)]===p[_0x2953b0(0xc0)]);break;}}}));}};b=X([c[_0x24cf61(0xc7)](c[_0x24cf61(0x138)]['Ready'],b),_(0x0,c[_0x24cf61(0x11e)](y['CommentService'])),_(0x1,c[_0x24cf61(0x11e)](g[_0x24cf61(0xdb)])),_(0x2,c[_0x24cf61(0x11e)](c[_0x24cf61(0x10d)])),_(0x3,c[_0x24cf61(0x11e)](c['Injector']))],b);const k='thread-comment-data-source.config',ee={};var U=Object[_0x24cf61(0x13f)],re=Object[_0x24cf61(0x12a)],te=(_0x18d4bb,_0x57a2cf,_0x125dd7)=>_0x57a2cf in _0x18d4bb?U(_0x18d4bb,_0x57a2cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x125dd7}):_0x18d4bb[_0x57a2cf]=_0x125dd7,se=(_0x35e948,_0x4a4092,_0x482052,_0x575fc0)=>{const _0x17a77f=_0x24cf61;for(var _0x5f4b32=_0x575fc0>0x1?void 0x0:_0x575fc0?re(_0x4a4092,_0x482052):_0x4a4092,_0x7b3d29=_0x35e948[_0x17a77f(0x124)]-0x1,_0x4921f5;_0x7b3d29>=0x0;_0x7b3d29--)(_0x4921f5=_0x35e948[_0x7b3d29])&&(_0x5f4b32=(_0x575fc0?_0x4921f5(_0x4a4092,_0x482052,_0x5f4b32):_0x4921f5(_0x5f4b32))||_0x5f4b32);return _0x575fc0&&_0x5f4b32&&U(_0x4a4092,_0x482052,_0x5f4b32),_0x5f4b32;},T=(_0x1cf239,_0x472621)=>(_0x1bd994,_0x42faaf)=>_0x472621(_0x1bd994,_0x42faaf,_0x1cf239),R=(_0x4b0607,_0x535aeb,_0x440981)=>te(_0x4b0607,typeof _0x535aeb!='symbol'?_0x535aeb+'':_0x535aeb,_0x440981);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x24cf61(0xd9)]{constructor(_0x2f62ad=ee,_0x2faa90,_0x59e400){const _0x50597b=_0x24cf61;super(),this[_0x50597b(0x10b)]=_0x2f62ad,this['_injector']=_0x2faa90,this[_0x50597b(0x11a)]=_0x59e400;const {..._0x39340d}=this['_config'];this[_0x50597b(0x11a)][_0x50597b(0xd2)](k,_0x39340d);}[_0x24cf61(0xea)](){[[D],[C],[f],[b]]['forEach'](_0x257d9e=>{const _0xaba8e4=_0x2330;this[_0xaba8e4(0xcd)]['add'](_0x257d9e);});}},R(exports[_0x24cf61(0x134)],'pluginName',q),R(exports[_0x24cf61(0x134)],'type',c[_0x24cf61(0xbc)]['UNIVER_UNKNOWN']),exports[_0x24cf61(0x134)]=se([c['DependentOn'](g[_0x24cf61(0x115)],N['UniverThreadCommentUIPlugin'],y[_0x24cf61(0x12d)]),T(0x1,c['Inject'](c[_0x24cf61(0x109)])),T(0x2,c[_0x24cf61(0x131)])],exports[_0x24cf61(0x134)]);
1
+ 'use strict';const _0x536ebc=_0x59a4;(function(_0x350a04,_0x4838c4){const _0x1dbccc=_0x59a4,_0x4cf48f=_0x350a04();while(!![]){try{const _0x502143=parseInt(_0x1dbccc(0x1ed))/0x1*(parseInt(_0x1dbccc(0x20f))/0x2)+parseInt(_0x1dbccc(0x260))/0x3*(parseInt(_0x1dbccc(0x20c))/0x4)+-parseInt(_0x1dbccc(0x246))/0x5+-parseInt(_0x1dbccc(0x235))/0x6*(parseInt(_0x1dbccc(0x251))/0x7)+parseInt(_0x1dbccc(0x26d))/0x8*(-parseInt(_0x1dbccc(0x269))/0x9)+parseInt(_0x1dbccc(0x25b))/0xa+parseInt(_0x1dbccc(0x25c))/0xb*(parseInt(_0x1dbccc(0x21e))/0xc);if(_0x502143===_0x4838c4)break;else _0x4cf48f['push'](_0x4cf48f['shift']());}catch(_0x1f5428){_0x4cf48f['push'](_0x4cf48f['shift']());}}}(_0x5035,0x36516));Object['defineProperty'](exports,Symbol[_0x536ebc(0x23a)],{'value':_0x536ebc(0x259)});const c=require('@univerjs/core'),g=require(_0x536ebc(0x230)),N=require('@univerjs/thread-comment-ui'),y=require('@univerjs-pro/collaboration-client'),O=require(_0x536ebc(0x1fb)),$=require(_0x536ebc(0x20b)),E=require(_0x536ebc(0x22d)),q=_0x536ebc(0x211);var p=(_0x50afc6=>(_0x50afc6[_0x50afc6[_0x536ebc(0x226)]=0x0]='OpenOrReOpen',_0x50afc6[_0x50afc6[_0x536ebc(0x247)]=0x1]=_0x536ebc(0x247),_0x50afc6[_0x50afc6[_0x536ebc(0x25d)]=-0x1]=_0x536ebc(0x25d),_0x50afc6))(p||{}),v=(_0x54be3a=>(_0x54be3a[_0x54be3a[_0x536ebc(0x233)]=0x0]=_0x536ebc(0x233),_0x54be3a[_0x54be3a[_0x536ebc(0x1ff)]=0x1]='Add',_0x54be3a[_0x54be3a['Reply']=0x2]=_0x536ebc(0x20a),_0x54be3a[_0x54be3a[_0x536ebc(0x262)]=0x3]=_0x536ebc(0x262),_0x54be3a[_0x54be3a[_0x536ebc(0x270)]=0x4]=_0x536ebc(0x270),_0x54be3a[_0x54be3a[_0x536ebc(0x200)]=0x5]=_0x536ebc(0x200),_0x54be3a[_0x54be3a[_0x536ebc(0x25d)]=-0x1]=_0x536ebc(0x25d),_0x54be3a))(v||{});const P=_0x25d8e4=>$(new Date(+_0x25d8e4))[_0x536ebc(0x238)](_0x536ebc(0x237)),x=async(_0x5ecd41,_0x4e67f8)=>{const _0x181eab=_0x536ebc,_0x228d36=_0x5ecd41[_0x181eab(0x1f5)](c['UserManagerService']),_0x45f6ac=_0x5ecd41[_0x181eab(0x1f5)](O[_0x181eab(0x23c)]);_0x4e67f8[_0x181eab(0x24b)](_0x276e60=>{const _0x2b2009=_0x181eab;_0x228d36[_0x2b2009(0x218)](_0x276e60)&&_0x4e67f8[_0x2b2009(0x26e)](_0x276e60);}),_0x4e67f8['size']&&(await _0x45f6ac[_0x181eab(0x1f5)](_0x181eab(0x263),{'params':{'userIDs':[..._0x4e67f8]}}))[_0x181eab(0x206)]['users'][_0x181eab(0x24b)](_0x54aa91=>{_0x54aa91&&_0x228d36['addUser'](_0x54aa91);});};var Y=Object['defineProperty'],G=Object[_0x536ebc(0x1e6)],H=(_0x502a3b,_0x59388c,_0x19248b,_0x46e96b)=>{const _0x5894fa=_0x536ebc;for(var _0x2c47f5=_0x46e96b>0x1?void 0x0:_0x46e96b?G(_0x59388c,_0x19248b):_0x59388c,_0x95ff48=_0x502a3b[_0x5894fa(0x216)]-0x1,_0x430ec3;_0x95ff48>=0x0;_0x95ff48--)(_0x430ec3=_0x502a3b[_0x95ff48])&&(_0x2c47f5=(_0x46e96b?_0x430ec3(_0x59388c,_0x19248b,_0x2c47f5):_0x430ec3(_0x2c47f5))||_0x2c47f5);return _0x46e96b&&_0x2c47f5&&Y(_0x59388c,_0x19248b,_0x2c47f5),_0x2c47f5;},I=(_0x306af0,_0x5a2db4)=>(_0x17863d,_0x50ff6c)=>_0x5a2db4(_0x17863d,_0x50ff6c,_0x306af0);function L(_0xee56d4,_0x148655){const _0x13e410=_0x536ebc,_0x5e3efe=_0xee56d4['replies'][0x0];return{..._0x148655,'id':_0x5e3efe['replyId'],'resolved':_0xee56d4[_0x13e410(0x234)]===0x1,'dT':P(_0x5e3efe['createTimestamp']),'personId':_0x5e3efe[_0x13e410(0x244)],'threadId':_0x5e3efe[_0x13e410(0x231)]};}function _0x59a4(_0x828c8f,_0x4bac1f){const _0x5035bd=_0x5035();return _0x59a4=function(_0x59a48a,_0x1769a1){_0x59a48a=_0x59a48a-0x1e5;let _0x22ccc9=_0x5035bd[_0x59a48a];return _0x22ccc9;},_0x59a4(_0x828c8f,_0x4bac1f);}function A(_0x5deea0,_0x52fec1,_0x51356f){const _0x1c9a1a=_0x536ebc;var _0x4e71d6,_0xd545d0;if(((_0xd545d0=(_0x4e71d6=_0x5deea0==null?void 0x0:_0x5deea0[_0x1c9a1a(0x1f7)])==null?void 0x0:_0x4e71d6[_0x1c9a1a(0x216)])!=null?_0xd545d0:0x0)>0x0){const _0x315e13=(_0x3bdb9b,_0x196083)=>({'id':_0x3bdb9b[_0x1c9a1a(0x22b)],'threadId':_0x3bdb9b['threadId'],'dT':P(_0x3bdb9b[_0x1c9a1a(0x239)]),'personId':_0x3bdb9b[_0x1c9a1a(0x244)],'resolved':_0x5deea0[_0x1c9a1a(0x234)]===p['Solved'],'unitId':_0x52fec1,'subUnitId':_0x51356f,'text':JSON['parse'](_0x3bdb9b['content']),'parentId':_0x196083}),_0x1a9cff=_0x315e13(_0x5deea0[_0x1c9a1a(0x1f7)][0x0]);return{..._0x1a9cff,'children':_0x5deea0[_0x1c9a1a(0x1f7)]['slice'](0x1)[_0x1c9a1a(0x214)](_0x154fb6=>_0x315e13(_0x154fb6,_0x1a9cff['id']))};}return null;}let C=class{constructor(_0x2d251a,_0x3e7b00,_0xf3e4fb,_0x4bef29){const _0x48c6fd=_0x536ebc;this[_0x48c6fd(0x21c)]=_0x2d251a,this[_0x48c6fd(0x24e)]=_0x3e7b00,this[_0x48c6fd(0x204)]=_0xf3e4fb,this[_0x48c6fd(0x1e9)]=_0x4bef29;}async[_0x536ebc(0x245)](_0x78ae26){const _0x386fdb=_0x536ebc;var _0x56c71d,_0x3689d7;const {parentId:_0x449725,unitId:_0x47619d,text:_0x155e87,threadId:_0x36eb3d}=_0x78ae26,_0x7d9217=(_0x3689d7=(_0x56c71d=_0x155e87[_0x386fdb(0x25e)])==null?void 0x0:_0x56c71d['filter'](_0x15076c=>_0x15076c[_0x386fdb(0x265)]===c[_0x386fdb(0x217)][_0x386fdb(0x1e8)])[_0x386fdb(0x214)](_0x3efc9d=>_0x3efc9d[_0x386fdb(0x23f)]))!=null?_0x3689d7:[],_0x390c3a=JSON['stringify'](_0x155e87),_0x4c79f6=(await this['_sessionService'][_0x386fdb(0x210)](_0x47619d))[_0x386fdb(0x219)]();if(_0x449725){const _0x31c7f6={'memberId':_0x4c79f6,'unitId':_0x47619d,'content':_0x390c3a,'mention':_0x7d9217,'threadId':_0x36eb3d},_0x20f148=(await this['_httpService'][_0x386fdb(0x266)]('/universer-api/comment/unit/'+_0x47619d+_0x386fdb(0x22e),{'body':_0x31c7f6}))[_0x386fdb(0x206)]['reply'];return{..._0x78ae26,'id':_0x20f148[_0x386fdb(0x22b)],'dT':$(+_0x20f148[_0x386fdb(0x239)])[_0x386fdb(0x238)](_0x386fdb(0x237)),'personId':_0x20f148['userId']};}else{const _0x368a25={'memberId':_0x4c79f6,'unitId':_0x47619d,'content':_0x390c3a,'mention':_0x7d9217},_0x5ec89=await this[_0x386fdb(0x21c)]['post']('/universer-api/comment/unit/'+_0x47619d+_0x386fdb(0x1e5),{'body':_0x368a25});return L(_0x5ec89[_0x386fdb(0x206)]['comment'],_0x78ae26);}}async['updateComment'](_0x16d46e){const _0x4fbbb5=_0x536ebc;var _0xd21ab3,_0xd80823;const {text:_0x5a30df,unitId:_0x13a60f}=_0x16d46e,_0x53f6ac=(_0xd80823=(_0xd21ab3=_0x5a30df[_0x4fbbb5(0x25e)])==null?void 0x0:_0xd21ab3[_0x4fbbb5(0x255)](_0x5d787c=>_0x5d787c[_0x4fbbb5(0x265)]===c['CustomRangeType'][_0x4fbbb5(0x1e8)])[_0x4fbbb5(0x214)](_0x533658=>_0x533658[_0x4fbbb5(0x23f)]))!=null?_0xd80823:[],_0x2e4fc9=JSON['stringify'](_0x5a30df),_0x5bcc7c=_0x16d46e[_0x4fbbb5(0x231)],_0x1c427d=_0x16d46e['id'],_0x3eb5c0={'memberId':(await this[_0x4fbbb5(0x204)]['requireSession'](_0x13a60f))[_0x4fbbb5(0x219)](),'unitId':_0x13a60f,'threadId':_0x5bcc7c,'mention':_0x53f6ac,'content':_0x2e4fc9,'replyId':_0x1c427d},_0x486ec1=await this[_0x4fbbb5(0x21c)][_0x4fbbb5(0x266)](_0x4fbbb5(0x23e)+_0x13a60f+_0x4fbbb5(0x276),{'body':_0x3eb5c0});return!_0x486ec1[_0x4fbbb5(0x206)][_0x4fbbb5(0x215)]||_0x486ec1['body'][_0x4fbbb5(0x215)][_0x4fbbb5(0x232)]===0x1;}async[_0x536ebc(0x273)](_0x37e425){const _0x9fca3b=_0x536ebc,{unitId:_0x1998f1}=_0x37e425,_0xb6323b=_0x37e425['threadId'],_0x41c8b8={'memberId':this['_userService'][_0x9fca3b(0x25a)]()[_0x9fca3b(0x1e7)],'unitId':_0x1998f1,'threadId':_0xb6323b,'solved':_0x37e425[_0x9fca3b(0x1f6)]?p[_0x9fca3b(0x247)]:p[_0x9fca3b(0x226)]},_0x1200bb=await this['_httpService']['post'](_0x9fca3b(0x23e)+_0x1998f1+_0x9fca3b(0x250),{'body':_0x41c8b8});return!_0x1200bb[_0x9fca3b(0x206)][_0x9fca3b(0x215)]||_0x1200bb[_0x9fca3b(0x206)][_0x9fca3b(0x215)][_0x9fca3b(0x232)]===0x1;}async['deleteComment'](_0xc23769,_0x2e0cdf,_0xb47a52,_0x4c247b){const _0x3f0894=_0x536ebc,_0x159287={'memberId':(await this[_0x3f0894(0x204)][_0x3f0894(0x210)](_0xc23769))[_0x3f0894(0x219)](),'threadId':_0xb47a52,'replyId':_0x4c247b,'unitId':_0xc23769},_0x49c952=await this[_0x3f0894(0x21c)][_0x3f0894(0x266)](_0x3f0894(0x23e)+_0xc23769+_0x3f0894(0x24f),{'body':_0x159287});return!_0x49c952['body']['error']||_0x49c952[_0x3f0894(0x206)][_0x3f0894(0x215)][_0x3f0894(0x232)]===0x1;}async[_0x536ebc(0x26c)](_0x348e78,_0x169b3f,_0x4a1834){const _0x39d94e=_0x536ebc,_0x100aad={'unitId':_0x348e78,'threadId':_0x4a1834},_0x24deba=await this[_0x39d94e(0x21c)][_0x39d94e(0x266)](_0x39d94e(0x23e)+_0x348e78+_0x39d94e(0x23b),{'body':_0x100aad}),_0x20a5ed=_0x4a1834['map'](_0x53673f=>A(_0x24deba['body'][_0x39d94e(0x1f1)][_0x53673f],_0x348e78,_0x169b3f))[_0x39d94e(0x255)](Boolean);return Object[_0x39d94e(0x23d)](_0x24deba[_0x39d94e(0x206)][_0x39d94e(0x267)])['forEach'](_0x10d57d=>{const _0x1637d9=_0x39d94e;this['_userService'][_0x1637d9(0x24a)](_0x10d57d);}),_0x20a5ed;}[_0x536ebc(0x264)](_0x17e470){const _0x9b0865=_0x536ebc;return{'id':_0x17e470['id'],'threadId':_0x17e470['threadId'],'ref':_0x17e470[_0x9b0865(0x1fc)]};}};C=H([I(0x0,c[_0x536ebc(0x1f0)](O[_0x536ebc(0x23c)])),I(0x1,c[_0x536ebc(0x1f0)](c['UserManagerService'])),I(0x2,c[_0x536ebc(0x1f0)](y['CollaborationSessionService'])),I(0x3,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x1ef)]))],C);var J=Object[_0x536ebc(0x25f)],F=Object[_0x536ebc(0x1e6)],Z=(_0x359ebf,_0x51c582,_0x14e1fa,_0x4bf2c5)=>{const _0x29e1e9=_0x536ebc;for(var _0x132dcd=_0x4bf2c5>0x1?void 0x0:_0x4bf2c5?F(_0x51c582,_0x14e1fa):_0x51c582,_0x3d1497=_0x359ebf[_0x29e1e9(0x216)]-0x1,_0x210a50;_0x3d1497>=0x0;_0x3d1497--)(_0x210a50=_0x359ebf[_0x3d1497])&&(_0x132dcd=(_0x4bf2c5?_0x210a50(_0x51c582,_0x14e1fa,_0x132dcd):_0x210a50(_0x132dcd))||_0x132dcd);return _0x4bf2c5&&_0x132dcd&&J(_0x51c582,_0x14e1fa,_0x132dcd),_0x132dcd;},W=(_0x3f913f,_0x34b321)=>(_0x41b74a,_0x4848b0)=>_0x34b321(_0x41b74a,_0x4848b0,_0x3f913f);function _0x5035(){const _0x357a86=['syncUpdateMutationToColla','Edit','/universer-api/user/list','saveCommentToSnapshot','rangeType','post','users','UniverThreadCommentUIPlugin','27NiiBVO','UserManagerService','location','listComments','484648ZvPoiu','delete','searchParams','Delete','updateComment','type','resolveComment','avatar','UNIVER_UNKNOWN','/edit','_threadCommentMentionDataService','/add','getOwnPropertyDescriptor','userID','COMMENT','_injector','disposeWithMe','_initDataSource','http','3628fgIjbe','ThreadCommentModel','Injector','Inject','comments','LifecycleStages','setConfig','host','get','resolved','replies','Plugin','thread-comment-data-source.config','commentUpdate$','@univerjs/network','ref','add','OnLifecycle','Add','Solve','deleteComment','DependentOn','_threadCommentDataSourceService','_sessionService','IThreadCommentMentionDataService','body','Disposable','unit','Ready','Reply','dayjs','12uTrebJ','_threadCommentModel','/universer-api/authz/collaborator','4LdItYp','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','onStarting','map','error','length','CustomRangeType','getUser','getMemberID','collaborators','href','_httpService','://','12MgRARj','subject','_initUserSync','dataSource','bufferTime','Starting','protocol','_threadCommentMentionDataSource','OpenOrReOpen','getMentions','UniverThreadCommentDataSourcePlugin','getComment','CommentService','replyId','IThreadCommentDataSourceService','rxjs','/reply','content','@univerjs/thread-comment','threadId','code','Unknown','solved','880926JVrGdT','IConfigService','YYYY/MM/DD\x20HH:mm','format','createTimestamp','toStringTag','/list','HTTPService','values','/universer-api/comment/unit/','rangeId','parse','_config','name','payload','userId','addComment','1087390EAlbuW','Solved','_commentService','_init','addUser','forEach','user','_configService','_userService','/delete','/solved','21jccqvZ','https','unitId','pipe','filter','symbol','_threadCommentDataSource','UniverThreadCommentPlugin','Module','getCurrentUser','1589980xpyRKn','7753273iHvaym','UNRECOGNIZED','customRanges','defineProperty','191073WSNVtR'];_0x5035=function(){return _0x357a86;};return _0x5035();}let D=class{constructor(_0x2ca1d6){this['_httpService']=_0x2ca1d6;}async[_0x536ebc(0x227)](_0x4452be,_0x2e4623,_0x5bcecd){const _0x489ad1=_0x536ebc,_0x30fa45=new URL(window[_0x489ad1(0x26b)][_0x489ad1(0x21b)])[_0x489ad1(0x26f)]['get'](_0x489ad1(0x208));if(!_0x30fa45)return[];const _0x288a06=window['location'][_0x489ad1(0x1f4)],_0x4fc6aa=window[_0x489ad1(0x26b)][_0x489ad1(0x224)]==='https:'?_0x489ad1(0x252):_0x489ad1(0x1ec);return(await this[_0x489ad1(0x21c)][_0x489ad1(0x1f5)](_0x4fc6aa+_0x489ad1(0x21d)+_0x288a06+_0x489ad1(0x20e),{'params':{'objectID':_0x30fa45,'unitID':_0x30fa45}}))[_0x489ad1(0x206)][_0x489ad1(0x21a)][_0x489ad1(0x214)](_0x6d1f28=>{const _0x340dbb=_0x489ad1;var _0x4b5377,_0x1a5788,_0x21af4b,_0x1484fa,_0x59984b,_0xbc1561;return{'id':(_0x1a5788=(_0x4b5377=_0x6d1f28[_0x340dbb(0x21f)])==null?void 0x0:_0x4b5377[_0x340dbb(0x1e7)])!=null?_0x1a5788:'','label':(_0x1484fa=(_0x21af4b=_0x6d1f28[_0x340dbb(0x21f)])==null?void 0x0:_0x21af4b[_0x340dbb(0x242)])!=null?_0x1484fa:'','icon':(_0xbc1561=(_0x59984b=_0x6d1f28['subject'])==null?void 0x0:_0x59984b[_0x340dbb(0x274)])!=null?_0xbc1561:'','type':_0x340dbb(0x24c)};});}};D=Z([W(0x0,c[_0x536ebc(0x1f0)](O[_0x536ebc(0x23c)]))],D);var z=Object[_0x536ebc(0x25f)],B=Object[_0x536ebc(0x1e6)],K=(_0x350aa2,_0x1251f9,_0x464ee4,_0x26f1ae)=>{const _0x49977a=_0x536ebc;for(var _0x5e6123=_0x26f1ae>0x1?void 0x0:_0x26f1ae?B(_0x1251f9,_0x464ee4):_0x1251f9,_0x3aa74e=_0x350aa2[_0x49977a(0x216)]-0x1,_0x5385b1;_0x3aa74e>=0x0;_0x3aa74e--)(_0x5385b1=_0x350aa2[_0x3aa74e])&&(_0x5e6123=(_0x26f1ae?_0x5385b1(_0x1251f9,_0x464ee4,_0x5e6123):_0x5385b1(_0x5e6123))||_0x5e6123);return _0x26f1ae&&_0x5e6123&&z(_0x1251f9,_0x464ee4,_0x5e6123),_0x5e6123;},S=(_0x3efb86,_0x5739ba)=>(_0x296c7f,_0x4a08e8)=>_0x5739ba(_0x296c7f,_0x4a08e8,_0x3efb86);let f=class extends c[_0x536ebc(0x207)]{constructor(_0x51a609,_0x4d01d7,_0x3e12d5,_0x451f0a){const _0x54e86d=_0x536ebc;super(),this[_0x54e86d(0x203)]=_0x51a609,this[_0x54e86d(0x257)]=_0x4d01d7,this[_0x54e86d(0x277)]=_0x3e12d5,this[_0x54e86d(0x225)]=_0x451f0a,this['_initDataSource']();}[_0x536ebc(0x1eb)](){const _0x362a79=_0x536ebc;this[_0x362a79(0x203)][_0x362a79(0x221)]=this[_0x362a79(0x257)],this[_0x362a79(0x203)][_0x362a79(0x261)]=!0x1,this[_0x362a79(0x277)][_0x362a79(0x221)]=this[_0x362a79(0x225)];}};f=K([c[_0x536ebc(0x1fe)](c[_0x536ebc(0x1f2)][_0x536ebc(0x223)],f),S(0x0,g[_0x536ebc(0x22c)]),S(0x1,c[_0x536ebc(0x1f0)](C)),S(0x2,N[_0x536ebc(0x205)]),S(0x3,c['Inject'](D))],f);var V=Object[_0x536ebc(0x25f)],Q=Object[_0x536ebc(0x1e6)],X=(_0x4bce33,_0x2f48af,_0x3711b6,_0x5db39f)=>{const _0x2f0766=_0x536ebc;for(var _0x2ebdd7=_0x5db39f>0x1?void 0x0:_0x5db39f?Q(_0x2f48af,_0x3711b6):_0x2f48af,_0x133b66=_0x4bce33[_0x2f0766(0x216)]-0x1,_0x3edb2e;_0x133b66>=0x0;_0x133b66--)(_0x3edb2e=_0x4bce33[_0x133b66])&&(_0x2ebdd7=(_0x5db39f?_0x3edb2e(_0x2f48af,_0x3711b6,_0x2ebdd7):_0x3edb2e(_0x2ebdd7))||_0x2ebdd7);return _0x5db39f&&_0x2ebdd7&&V(_0x2f48af,_0x3711b6,_0x2ebdd7),_0x2ebdd7;},_=(_0x2eaba9,_0x3dd236)=>(_0x61b382,_0x2f05fb)=>_0x3dd236(_0x61b382,_0x2f05fb,_0x2eaba9);let b=class extends c[_0x536ebc(0x207)]{constructor(_0x5a0aa7,_0x1ab882,_0x15eb73,_0xd1e1e4){const _0x549611=_0x536ebc;super(),this['_commentService']=_0x5a0aa7,this[_0x549611(0x20d)]=_0x1ab882,this[_0x549611(0x24e)]=_0x15eb73,this[_0x549611(0x1e9)]=_0xd1e1e4,this[_0x549611(0x249)](),this[_0x549611(0x220)]();}[_0x536ebc(0x220)](){const _0x13da7f=_0x536ebc;this[_0x13da7f(0x1ea)](this[_0x13da7f(0x20d)][_0x13da7f(0x1fa)][_0x13da7f(0x254)](E[_0x13da7f(0x222)](0x10))['subscribe'](_0x173cc9=>{const _0x33fa40=_0x13da7f,_0x4c0b55=new Set();_0x173cc9[_0x33fa40(0x24b)](_0x42be1f=>{const _0x4b2711=_0x33fa40;switch(_0x42be1f['type']){case _0x4b2711(0x1fd):{const _0x2705f5=_0x42be1f[_0x4b2711(0x243)]['personId'];_0x4c0b55[_0x4b2711(0x1fd)](_0x2705f5);break;}}}),x(this['_injector'],_0x4c0b55);}));}[_0x536ebc(0x249)](){const _0x33e86e=_0x536ebc;this[_0x33e86e(0x1ea)](this[_0x33e86e(0x248)][_0x33e86e(0x1fa)][_0x33e86e(0x212)](async _0x1add53=>{const _0x39fd20=_0x33e86e;var _0x2d15e2,_0x11f9b0;const _0x524163=this[_0x39fd20(0x20d)]['getThread'](_0x1add53[_0x39fd20(0x253)],_0x1add53[_0x39fd20(0x231)]);if(!_0x524163)return;const {unitId:_0x50cf01,subUnitId:_0x3cef35}=_0x524163;switch(_0x1add53[_0x39fd20(0x24c)]&&this[_0x39fd20(0x24e)][_0x39fd20(0x24a)](_0x1add53[_0x39fd20(0x24c)]),_0x1add53[_0x39fd20(0x272)]){case v[_0x39fd20(0x1ff)]:break;case v[_0x39fd20(0x20a)]:{this[_0x39fd20(0x20d)][_0x39fd20(0x245)](_0x50cf01,_0x3cef35,{'unitId':_0x50cf01,'subUnitId':_0x3cef35,'ref':'','id':_0x1add53[_0x39fd20(0x22b)],'dT':P(+_0x1add53[_0x39fd20(0x239)]),'threadId':_0x1add53[_0x39fd20(0x231)],'personId':(_0x11f9b0=(_0x2d15e2=_0x1add53[_0x39fd20(0x24c)])==null?void 0x0:_0x2d15e2[_0x39fd20(0x1e7)])!=null?_0x11f9b0:_0x1add53[_0x39fd20(0x244)],'text':JSON[_0x39fd20(0x240)](_0x1add53[_0x39fd20(0x22f)]),'parentId':_0x524163['id']});break;}case v[_0x39fd20(0x270)]:{const _0x40fec5=this[_0x39fd20(0x20d)][_0x39fd20(0x229)](_0x50cf01,_0x3cef35,_0x1add53[_0x39fd20(0x22b)]);_0x40fec5&&_0x40fec5['parentId']&&this['_threadCommentModel'][_0x39fd20(0x201)](_0x50cf01,_0x3cef35,_0x1add53[_0x39fd20(0x22b)]);break;}case v[_0x39fd20(0x262)]:{this[_0x39fd20(0x20d)][_0x39fd20(0x271)](_0x50cf01,_0x3cef35,{'commentId':_0x1add53['replyId'],'text':JSON[_0x39fd20(0x240)](_0x1add53[_0x39fd20(0x22f)])});break;}case v[_0x39fd20(0x200)]:{const _0x353df7=this['_threadCommentModel']['getThread'](_0x50cf01,_0x1add53[_0x39fd20(0x231)]);_0x353df7&&this[_0x39fd20(0x20d)][_0x39fd20(0x273)](_0x50cf01,_0x3cef35,_0x353df7['id'],_0x1add53[_0x39fd20(0x234)]===p[_0x39fd20(0x247)]);break;}}}));}};b=X([c[_0x536ebc(0x1fe)](c[_0x536ebc(0x1f2)][_0x536ebc(0x209)],b),_(0x0,c['Inject'](y[_0x536ebc(0x22a)])),_(0x1,c[_0x536ebc(0x1f0)](g[_0x536ebc(0x1ee)])),_(0x2,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x26a)])),_(0x3,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x1ef)]))],b);const k=_0x536ebc(0x1f9),ee={};var U=Object[_0x536ebc(0x25f)],re=Object[_0x536ebc(0x1e6)],te=(_0x5e6a34,_0x5dc25a,_0x209448)=>_0x5dc25a in _0x5e6a34?U(_0x5e6a34,_0x5dc25a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x209448}):_0x5e6a34[_0x5dc25a]=_0x209448,se=(_0x564ab8,_0x11c431,_0x1663a9,_0x3d644b)=>{const _0x58bcfc=_0x536ebc;for(var _0x4e00e1=_0x3d644b>0x1?void 0x0:_0x3d644b?re(_0x11c431,_0x1663a9):_0x11c431,_0x55277b=_0x564ab8[_0x58bcfc(0x216)]-0x1,_0x1c5eeb;_0x55277b>=0x0;_0x55277b--)(_0x1c5eeb=_0x564ab8[_0x55277b])&&(_0x4e00e1=(_0x3d644b?_0x1c5eeb(_0x11c431,_0x1663a9,_0x4e00e1):_0x1c5eeb(_0x4e00e1))||_0x4e00e1);return _0x3d644b&&_0x4e00e1&&U(_0x11c431,_0x1663a9,_0x4e00e1),_0x4e00e1;},T=(_0x56227b,_0x51befa)=>(_0x3b65bb,_0x2c6695)=>_0x51befa(_0x3b65bb,_0x2c6695,_0x56227b),R=(_0x9a3f92,_0x3a34a7,_0x23b946)=>te(_0x9a3f92,typeof _0x3a34a7!=_0x536ebc(0x256)?_0x3a34a7+'':_0x3a34a7,_0x23b946);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x536ebc(0x1f8)]{constructor(_0x31f21e=ee,_0xb96424,_0x1186fc){const _0x2151f4=_0x536ebc;super(),this[_0x2151f4(0x241)]=_0x31f21e,this['_injector']=_0xb96424,this[_0x2151f4(0x24d)]=_0x1186fc;const {..._0x5a7e93}=this[_0x2151f4(0x241)];this[_0x2151f4(0x24d)][_0x2151f4(0x1f3)](k,_0x5a7e93);}[_0x536ebc(0x213)](){const _0x60b0b1=_0x536ebc;[[D],[C],[f],[b]][_0x60b0b1(0x24b)](_0x4c80bf=>{const _0xf6b1ce=_0x60b0b1;this['_injector'][_0xf6b1ce(0x1fd)](_0x4c80bf);});}},R(exports[_0x536ebc(0x228)],'pluginName',q),R(exports[_0x536ebc(0x228)],_0x536ebc(0x272),c['UniverInstanceType'][_0x536ebc(0x275)]),exports['UniverThreadCommentDataSourcePlugin']=se([c[_0x536ebc(0x202)](g[_0x536ebc(0x258)],N[_0x536ebc(0x268)],y['UniverCollaborationClientPlugin']),T(0x1,c['Inject'](c[_0x536ebc(0x1ef)])),T(0x2,c[_0x536ebc(0x236)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x52c2db=_0x47bd;(function(_0x2b79b,_0x4e69ff){const _0x3dc6f5=_0x47bd,_0x2608a5=_0x2b79b();while(!![]){try{const _0x26b0f5=-parseInt(_0x3dc6f5(0x1b7))/0x1*(-parseInt(_0x3dc6f5(0x1ad))/0x2)+parseInt(_0x3dc6f5(0x1e8))/0x3+parseInt(_0x3dc6f5(0x1df))/0x4+-parseInt(_0x3dc6f5(0x1fa))/0x5+parseInt(_0x3dc6f5(0x1e7))/0x6*(-parseInt(_0x3dc6f5(0x1ed))/0x7)+-parseInt(_0x3dc6f5(0x1da))/0x8*(parseInt(_0x3dc6f5(0x1a3))/0x9)+parseInt(_0x3dc6f5(0x1b6))/0xa*(-parseInt(_0x3dc6f5(0x1ff))/0xb);if(_0x26b0f5===_0x4e69ff)break;else _0x2608a5['push'](_0x2608a5['shift']());}catch(_0x5772e6){_0x2608a5['push'](_0x2608a5['shift']());}}}(_0xa5c1,0xbcd8c));import{UserManagerService as _0x12f40d,Inject as _0x508cfb,Injector as _0xf07d08,CustomRangeType as _0x4e8be3,OnLifecycle as _0x434295,LifecycleStages as _0x546710,Disposable as _0x38d9cd,UniverInstanceType as _0xa6f5ec,DependentOn as _0x393f2c,Plugin as _0x9eeb51,IConfigService as _0x1f0a03}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x2a8168,ThreadCommentModel as _0xb93b3,UniverThreadCommentPlugin as _0x3e9257}from'@univerjs/thread-comment';function _0x47bd(_0x43d2da,_0x3f447e){const _0xa5c1a6=_0xa5c1();return _0x47bd=function(_0x47bd48,_0x31b11b){_0x47bd48=_0x47bd48-0x19a;let _0x4ff5fe=_0xa5c1a6[_0x47bd48];return _0x4ff5fe;},_0x47bd(_0x43d2da,_0x3f447e);}import{IThreadCommentMentionDataService as _0x50f397,UniverThreadCommentUIPlugin as _0x161cc5}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x39f594,CommentService as _0x5283c4,UniverCollaborationClientPlugin as _0x56cf5c}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x433401}from'@univerjs/network';import _0xd56be6 from'dayjs';import{bufferTime as _0x190db0}from'rxjs';const X=_0x52c2db(0x1e5);var v=(_0x427101=>(_0x427101[_0x427101[_0x52c2db(0x1a4)]=0x0]=_0x52c2db(0x1a4),_0x427101[_0x427101[_0x52c2db(0x1ab)]=0x1]=_0x52c2db(0x1ab),_0x427101[_0x427101[_0x52c2db(0x1fb)]=-0x1]=_0x52c2db(0x1fb),_0x427101))(v||{}),p=(_0x1d5455=>(_0x1d5455[_0x1d5455['Unknown']=0x0]='Unknown',_0x1d5455[_0x1d5455['Add']=0x1]=_0x52c2db(0x1f8),_0x1d5455[_0x1d5455[_0x52c2db(0x1d6)]=0x2]=_0x52c2db(0x1d6),_0x1d5455[_0x1d5455[_0x52c2db(0x1e1)]=0x3]='Edit',_0x1d5455[_0x1d5455[_0x52c2db(0x1d5)]=0x4]='Delete',_0x1d5455[_0x1d5455[_0x52c2db(0x1c5)]=0x5]=_0x52c2db(0x1c5),_0x1d5455[_0x1d5455[_0x52c2db(0x1fb)]=-0x1]=_0x52c2db(0x1fb),_0x1d5455))(p||{});const w=_0x5d0989=>_0xd56be6(new Date(+_0x5d0989))[_0x52c2db(0x1cb)](_0x52c2db(0x204)),k=async(_0xf4e999,_0x42e1ed)=>{const _0x42e696=_0x52c2db,_0x2ea3f0=_0xf4e999[_0x42e696(0x1ce)](_0x12f40d),_0xe2e7c8=_0xf4e999[_0x42e696(0x1ce)](_0x433401);_0x42e1ed[_0x42e696(0x1d1)](_0x3142b9=>{const _0x118eb1=_0x42e696;_0x2ea3f0[_0x118eb1(0x201)](_0x3142b9)&&_0x42e1ed['delete'](_0x3142b9);}),_0x42e1ed[_0x42e696(0x1e6)]&&(await _0xe2e7c8[_0x42e696(0x1ce)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e1ed]}}))[_0x42e696(0x1ba)]['users'][_0x42e696(0x1d1)](_0x10313a=>{_0x10313a&&_0x2ea3f0['addUser'](_0x10313a);});};var ee=Object[_0x52c2db(0x1dd)],re=Object[_0x52c2db(0x1f3)],te=(_0x33676d,_0x3b9fa8,_0x47531e,_0x3e3ebd)=>{const _0x4bd9f8=_0x52c2db;for(var _0x2c82a4=_0x3e3ebd>0x1?void 0x0:_0x3e3ebd?re(_0x3b9fa8,_0x47531e):_0x3b9fa8,_0x40846b=_0x33676d[_0x4bd9f8(0x1b2)]-0x1,_0x23fd3e;_0x40846b>=0x0;_0x40846b--)(_0x23fd3e=_0x33676d[_0x40846b])&&(_0x2c82a4=(_0x3e3ebd?_0x23fd3e(_0x3b9fa8,_0x47531e,_0x2c82a4):_0x23fd3e(_0x2c82a4))||_0x2c82a4);return _0x3e3ebd&&_0x2c82a4&&ee(_0x3b9fa8,_0x47531e,_0x2c82a4),_0x2c82a4;},_=(_0x382fab,_0x21b545)=>(_0x6bbdb2,_0xa5632b)=>_0x21b545(_0x6bbdb2,_0xa5632b,_0x382fab);function se(_0xc9ce24,_0x1a01a3){const _0x4fac6c=_0x52c2db,_0x3d32c4=_0xc9ce24[_0x4fac6c(0x1c6)][0x0];return{..._0x1a01a3,'id':_0x3d32c4['replyId'],'resolved':_0xc9ce24[_0x4fac6c(0x1f7)]===0x1,'dT':w(_0x3d32c4[_0x4fac6c(0x1a2)]),'personId':_0x3d32c4['userId'],'threadId':_0x3d32c4['threadId']};}function oe(_0x22863a,_0x5e8613,_0x27191d){const _0x2abc2d=_0x52c2db;var _0xb5f7eb,_0x87bb32;if(((_0x87bb32=(_0xb5f7eb=_0x22863a==null?void 0x0:_0x22863a[_0x2abc2d(0x1c6)])==null?void 0x0:_0xb5f7eb[_0x2abc2d(0x1b2)])!=null?_0x87bb32:0x0)>0x0){const _0x596971=(_0x59bba0,_0x18bfb2)=>({'id':_0x59bba0[_0x2abc2d(0x207)],'threadId':_0x59bba0[_0x2abc2d(0x1fd)],'dT':w(_0x59bba0[_0x2abc2d(0x1a2)]),'personId':_0x59bba0[_0x2abc2d(0x1be)],'resolved':_0x22863a[_0x2abc2d(0x1f7)]===v[_0x2abc2d(0x1ab)],'unitId':_0x5e8613,'subUnitId':_0x27191d,'text':JSON[_0x2abc2d(0x1b3)](_0x59bba0[_0x2abc2d(0x19f)]),'parentId':_0x18bfb2}),_0x4efb5c=_0x596971(_0x22863a['replies'][0x0]);return{..._0x4efb5c,'children':_0x22863a[_0x2abc2d(0x1c6)][_0x2abc2d(0x1c7)](0x1)['map'](_0x71b14b=>_0x596971(_0x71b14b,_0x4efb5c['id']))};}return null;}let D=class{constructor(_0x5aa338,_0x5d2058,_0x419332,_0x3ba1d2){const _0x34187d=_0x52c2db;this[_0x34187d(0x1a9)]=_0x5aa338,this[_0x34187d(0x1d7)]=_0x5d2058,this[_0x34187d(0x1eb)]=_0x419332,this[_0x34187d(0x1f9)]=_0x3ba1d2;}async[_0x52c2db(0x19d)](_0x490671){const _0x3f75dd=_0x52c2db;var _0xc45131,_0x237433;const {parentId:_0x38a210,unitId:_0x57da2e,text:_0x36728e,threadId:_0x82a958}=_0x490671,_0x38c469=(_0x237433=(_0xc45131=_0x36728e[_0x3f75dd(0x1ec)])==null?void 0x0:_0xc45131[_0x3f75dd(0x1c1)](_0x425274=>_0x425274[_0x3f75dd(0x205)]===_0x4e8be3['COMMENT'])[_0x3f75dd(0x1d8)](_0x38541e=>_0x38541e[_0x3f75dd(0x1b1)]))!=null?_0x237433:[],_0x64c4ff=JSON[_0x3f75dd(0x1f4)](_0x36728e),_0x120406=(await this[_0x3f75dd(0x1eb)][_0x3f75dd(0x1d2)](_0x57da2e))[_0x3f75dd(0x1e2)]();if(_0x38a210){const _0x43d4c4={'memberId':_0x120406,'unitId':_0x57da2e,'content':_0x64c4ff,'mention':_0x38c469,'threadId':_0x82a958},_0x4092da=(await this['_httpService']['post'](_0x3f75dd(0x1b5)+_0x57da2e+_0x3f75dd(0x1e4),{'body':_0x43d4c4}))[_0x3f75dd(0x1ba)][_0x3f75dd(0x1a8)];return{..._0x490671,'id':_0x4092da['replyId'],'dT':_0xd56be6(+_0x4092da[_0x3f75dd(0x1a2)])[_0x3f75dd(0x1cb)](_0x3f75dd(0x204)),'personId':_0x4092da['userId']};}else{const _0x3b3423={'memberId':_0x120406,'unitId':_0x57da2e,'content':_0x64c4ff,'mention':_0x38c469},_0x53ac2f=await this[_0x3f75dd(0x1a9)]['post']('/universer-api/comment/unit/'+_0x57da2e+'/add',{'body':_0x3b3423});return se(_0x53ac2f[_0x3f75dd(0x1ba)]['comment'],_0x490671);}}async[_0x52c2db(0x1a0)](_0x4389fd){const _0x4a6739=_0x52c2db;var _0x4b0765,_0x567e19;const {text:_0x211975,unitId:_0x352c8c}=_0x4389fd,_0x5ab723=(_0x567e19=(_0x4b0765=_0x211975[_0x4a6739(0x1ec)])==null?void 0x0:_0x4b0765['filter'](_0x2a5a67=>_0x2a5a67[_0x4a6739(0x205)]===_0x4e8be3[_0x4a6739(0x1b4)])[_0x4a6739(0x1d8)](_0x1f1c38=>_0x1f1c38[_0x4a6739(0x1b1)]))!=null?_0x567e19:[],_0xcf0495=JSON['stringify'](_0x211975),_0x58fbe8=_0x4389fd['threadId'],_0x2343a7=_0x4389fd['id'],_0x2d0b95={'memberId':(await this[_0x4a6739(0x1eb)][_0x4a6739(0x1d2)](_0x352c8c))['getMemberID'](),'unitId':_0x352c8c,'threadId':_0x58fbe8,'mention':_0x5ab723,'content':_0xcf0495,'replyId':_0x2343a7},_0x3a25e7=await this[_0x4a6739(0x1a9)][_0x4a6739(0x1e0)](_0x4a6739(0x1b5)+_0x352c8c+_0x4a6739(0x1cf),{'body':_0x2d0b95});return!_0x3a25e7[_0x4a6739(0x1ba)][_0x4a6739(0x19e)]||_0x3a25e7[_0x4a6739(0x1ba)][_0x4a6739(0x19e)][_0x4a6739(0x1bd)]===0x1;}async[_0x52c2db(0x1bb)](_0x53bde3){const _0x4ebdd1=_0x52c2db,{unitId:_0x35d5c0}=_0x53bde3,_0x597d16=_0x53bde3[_0x4ebdd1(0x1fd)],_0x11a36d={'memberId':this[_0x4ebdd1(0x1d7)]['getCurrentUser']()[_0x4ebdd1(0x1f1)],'unitId':_0x35d5c0,'threadId':_0x597d16,'solved':_0x53bde3['resolved']?v[_0x4ebdd1(0x1ab)]:v[_0x4ebdd1(0x1a4)]},_0x381844=await this[_0x4ebdd1(0x1a9)][_0x4ebdd1(0x1e0)]('/universer-api/comment/unit/'+_0x35d5c0+_0x4ebdd1(0x1d4),{'body':_0x11a36d});return!_0x381844[_0x4ebdd1(0x1ba)][_0x4ebdd1(0x19e)]||_0x381844[_0x4ebdd1(0x1ba)][_0x4ebdd1(0x19e)][_0x4ebdd1(0x1bd)]===0x1;}async[_0x52c2db(0x203)](_0x871446,_0xd7ad30,_0x3ac3c0,_0x13b204){const _0x1924cc=_0x52c2db,_0x4c4512={'memberId':(await this['_sessionService'][_0x1924cc(0x1d2)](_0x871446))[_0x1924cc(0x1e2)](),'threadId':_0x3ac3c0,'replyId':_0x13b204,'unitId':_0x871446},_0x31b294=await this[_0x1924cc(0x1a9)][_0x1924cc(0x1e0)](_0x1924cc(0x1b5)+_0x871446+_0x1924cc(0x1c3),{'body':_0x4c4512});return!_0x31b294[_0x1924cc(0x1ba)][_0x1924cc(0x19e)]||_0x31b294['body'][_0x1924cc(0x19e)][_0x1924cc(0x1bd)]===0x1;}async[_0x52c2db(0x1db)](_0x58520e,_0x9a3a58,_0x4f24ae){const _0x18fd8d=_0x52c2db,_0x52d3b8={'unitId':_0x58520e,'threadId':_0x4f24ae},_0xb93de6=await this[_0x18fd8d(0x1a9)][_0x18fd8d(0x1e0)](_0x18fd8d(0x1b5)+_0x58520e+_0x18fd8d(0x1ee),{'body':_0x52d3b8}),_0x9c1b2e=_0x4f24ae[_0x18fd8d(0x1d8)](_0x9f812e=>oe(_0xb93de6[_0x18fd8d(0x1ba)][_0x18fd8d(0x1a6)][_0x9f812e],_0x58520e,_0x9a3a58))[_0x18fd8d(0x1c1)](Boolean);return Object['values'](_0xb93de6[_0x18fd8d(0x1ba)][_0x18fd8d(0x19b)])['forEach'](_0x334896=>{const _0x277ede=_0x18fd8d;this[_0x277ede(0x1d7)][_0x277ede(0x1c2)](_0x334896);}),_0x9c1b2e;}[_0x52c2db(0x1f6)](_0x235cb2){const _0x2eec31=_0x52c2db;return{'id':_0x235cb2['id'],'threadId':_0x235cb2[_0x2eec31(0x1fd)],'ref':_0x235cb2[_0x2eec31(0x1dc)]};}};D=te([_(0x0,_0x508cfb(_0x433401)),_(0x1,_0x508cfb(_0x12f40d)),_(0x2,_0x508cfb(_0x39f594)),_(0x3,_0x508cfb(_0xf07d08))],D);var ne=Object[_0x52c2db(0x1dd)],ie=Object[_0x52c2db(0x1f3)],ae=(_0x1f0afb,_0x4a4903,_0x295e68,_0x26ecfe)=>{const _0x208755=_0x52c2db;for(var _0x818e42=_0x26ecfe>0x1?void 0x0:_0x26ecfe?ie(_0x4a4903,_0x295e68):_0x4a4903,_0x4bb04e=_0x1f0afb[_0x208755(0x1b2)]-0x1,_0x19f9cb;_0x4bb04e>=0x0;_0x4bb04e--)(_0x19f9cb=_0x1f0afb[_0x4bb04e])&&(_0x818e42=(_0x26ecfe?_0x19f9cb(_0x4a4903,_0x295e68,_0x818e42):_0x19f9cb(_0x818e42))||_0x818e42);return _0x26ecfe&&_0x818e42&&ne(_0x4a4903,_0x295e68,_0x818e42),_0x818e42;},ce=(_0x86a27b,_0xd314af)=>(_0x5b6f44,_0x121a37)=>_0xd314af(_0x5b6f44,_0x121a37,_0x86a27b);let C=class{constructor(_0x435f75){const _0x570b14=_0x52c2db;this[_0x570b14(0x1a9)]=_0x435f75;}async['getMentions'](_0x9ae124,_0x2a0b78,_0xf4bef9){const _0x2f6e1b=_0x52c2db,_0x3c3ed1=new URL(window[_0x2f6e1b(0x1d0)]['href'])[_0x2f6e1b(0x1bc)]['get'](_0x2f6e1b(0x1aa));if(!_0x3c3ed1)return[];const _0x33cf13=window[_0x2f6e1b(0x1d0)]['host'],_0x88e602=window['location']['protocol']===_0x2f6e1b(0x208)?_0x2f6e1b(0x202):_0x2f6e1b(0x1d3);return(await this['_httpService'][_0x2f6e1b(0x1ce)](_0x88e602+_0x2f6e1b(0x1ea)+_0x33cf13+_0x2f6e1b(0x1ac),{'params':{'objectID':_0x3c3ed1,'unitID':_0x3c3ed1}}))[_0x2f6e1b(0x1ba)]['collaborators'][_0x2f6e1b(0x1d8)](_0x275af5=>{const _0xb0df81=_0x2f6e1b;var _0x18fae6,_0x1d82a1,_0x2a8e10,_0x1e2e1f,_0x2c7d34,_0x533ac1;return{'id':(_0x1d82a1=(_0x18fae6=_0x275af5[_0xb0df81(0x1fe)])==null?void 0x0:_0x18fae6[_0xb0df81(0x1f1)])!=null?_0x1d82a1:'','label':(_0x1e2e1f=(_0x2a8e10=_0x275af5[_0xb0df81(0x1fe)])==null?void 0x0:_0x2a8e10['name'])!=null?_0x1e2e1f:'','icon':(_0x533ac1=(_0x2c7d34=_0x275af5[_0xb0df81(0x1fe)])==null?void 0x0:_0x2c7d34['avatar'])!=null?_0x533ac1:'','type':_0xb0df81(0x1b9)};});}};C=ae([ce(0x0,_0x508cfb(_0x433401))],C);var de=Object['defineProperty'],me=Object[_0x52c2db(0x1f3)],le=(_0x1f28ed,_0x11e171,_0x4b7357,_0x22fb9b)=>{for(var _0xfc7829=_0x22fb9b>0x1?void 0x0:_0x22fb9b?me(_0x11e171,_0x4b7357):_0x11e171,_0x326d08=_0x1f28ed['length']-0x1,_0x2ca464;_0x326d08>=0x0;_0x326d08--)(_0x2ca464=_0x1f28ed[_0x326d08])&&(_0xfc7829=(_0x22fb9b?_0x2ca464(_0x11e171,_0x4b7357,_0xfc7829):_0x2ca464(_0xfc7829))||_0xfc7829);return _0x22fb9b&&_0xfc7829&&de(_0x11e171,_0x4b7357,_0xfc7829),_0xfc7829;},f=(_0x225103,_0x56e41e)=>(_0x8e52c5,_0xc466cd)=>_0x56e41e(_0x8e52c5,_0xc466cd,_0x225103);let S=class extends _0x38d9cd{constructor(_0x3a0d7f,_0x467f7d,_0x1a02d2,_0x514053){const _0x14d5da=_0x52c2db;super(),this[_0x14d5da(0x1e9)]=_0x3a0d7f,this[_0x14d5da(0x1a5)]=_0x467f7d,this[_0x14d5da(0x1e3)]=_0x1a02d2,this[_0x14d5da(0x1ca)]=_0x514053,this[_0x14d5da(0x206)]();}['_initDataSource'](){const _0x2cea1e=_0x52c2db;this[_0x2cea1e(0x1e9)][_0x2cea1e(0x1af)]=this[_0x2cea1e(0x1a5)],this[_0x2cea1e(0x1e9)][_0x2cea1e(0x200)]=!0x1,this[_0x2cea1e(0x1e3)][_0x2cea1e(0x1af)]=this[_0x2cea1e(0x1ca)];}};S=le([_0x434295(_0x546710[_0x52c2db(0x19a)],S),f(0x0,_0x2a8168),f(0x1,_0x508cfb(D)),f(0x2,_0x50f397),f(0x3,_0x508cfb(C))],S);var he=Object['defineProperty'],ue=Object[_0x52c2db(0x1f3)],pe=(_0x3aaf9d,_0x5af99c,_0x4eabfc,_0x3cbd20)=>{const _0x5ad83c=_0x52c2db;for(var _0x46d9a9=_0x3cbd20>0x1?void 0x0:_0x3cbd20?ue(_0x5af99c,_0x4eabfc):_0x5af99c,_0x20f213=_0x3aaf9d[_0x5ad83c(0x1b2)]-0x1,_0x8d4342;_0x20f213>=0x0;_0x20f213--)(_0x8d4342=_0x3aaf9d[_0x20f213])&&(_0x46d9a9=(_0x3cbd20?_0x8d4342(_0x5af99c,_0x4eabfc,_0x46d9a9):_0x8d4342(_0x46d9a9))||_0x46d9a9);return _0x3cbd20&&_0x46d9a9&&he(_0x5af99c,_0x4eabfc,_0x46d9a9),_0x46d9a9;},I=(_0x42a9d6,_0x353a6c)=>(_0x24f0f6,_0x60a6cc)=>_0x353a6c(_0x24f0f6,_0x60a6cc,_0x42a9d6);let b=class extends _0x38d9cd{constructor(_0x3fcadb,_0x3ea0cd,_0x5611e6,_0x1e285c){const _0x14acfa=_0x52c2db;super(),this[_0x14acfa(0x1ef)]=_0x3fcadb,this[_0x14acfa(0x1c0)]=_0x3ea0cd,this[_0x14acfa(0x1d7)]=_0x5611e6,this[_0x14acfa(0x1f9)]=_0x1e285c,this[_0x14acfa(0x1c8)](),this[_0x14acfa(0x1b8)]();}['_initUserSync'](){const _0xbd2463=_0x52c2db;this[_0xbd2463(0x1b0)](this['_threadCommentModel'][_0xbd2463(0x1cd)][_0xbd2463(0x1c4)](_0x190db0(0x10))['subscribe'](_0x532eb7=>{const _0x19d418=_0xbd2463,_0x334a94=new Set();_0x532eb7[_0x19d418(0x1d1)](_0x3c5f3d=>{const _0x5f4841=_0x19d418;switch(_0x3c5f3d[_0x5f4841(0x1f5)]){case'add':{const _0x3b1087=_0x3c5f3d['payload'][_0x5f4841(0x1ae)];_0x334a94[_0x5f4841(0x1d9)](_0x3b1087);break;}}}),k(this[_0x19d418(0x1f9)],_0x334a94);}));}[_0x52c2db(0x1c8)](){const _0x2e76e0=_0x52c2db;this[_0x2e76e0(0x1b0)](this[_0x2e76e0(0x1ef)]['commentUpdate$'][_0x2e76e0(0x1fc)](async _0x23e7c1=>{const _0x40d9d8=_0x2e76e0;var _0x4e3cb9,_0x270339;const _0x1a4559=this[_0x40d9d8(0x1c0)][_0x40d9d8(0x1f2)](_0x23e7c1['unitId'],_0x23e7c1['threadId']);if(!_0x1a4559)return;const {unitId:_0x562d3a,subUnitId:_0x14a2bc}=_0x1a4559;switch(_0x23e7c1[_0x40d9d8(0x1b9)]&&this[_0x40d9d8(0x1d7)][_0x40d9d8(0x1c2)](_0x23e7c1[_0x40d9d8(0x1b9)]),_0x23e7c1[_0x40d9d8(0x1f5)]){case p['Add']:break;case p[_0x40d9d8(0x1d6)]:{this[_0x40d9d8(0x1c0)][_0x40d9d8(0x19d)](_0x562d3a,_0x14a2bc,{'unitId':_0x562d3a,'subUnitId':_0x14a2bc,'ref':'','id':_0x23e7c1['replyId'],'dT':w(+_0x23e7c1[_0x40d9d8(0x1a2)]),'threadId':_0x23e7c1[_0x40d9d8(0x1fd)],'personId':(_0x270339=(_0x4e3cb9=_0x23e7c1[_0x40d9d8(0x1b9)])==null?void 0x0:_0x4e3cb9[_0x40d9d8(0x1f1)])!=null?_0x270339:_0x23e7c1[_0x40d9d8(0x1be)],'text':JSON[_0x40d9d8(0x1b3)](_0x23e7c1['content']),'parentId':_0x1a4559['id']});break;}case p['Delete']:{const _0x34f9fe=this['_threadCommentModel']['getComment'](_0x562d3a,_0x14a2bc,_0x23e7c1[_0x40d9d8(0x207)]);_0x34f9fe&&_0x34f9fe['parentId']&&this['_threadCommentModel']['deleteComment'](_0x562d3a,_0x14a2bc,_0x23e7c1[_0x40d9d8(0x207)]);break;}case p[_0x40d9d8(0x1e1)]:{this['_threadCommentModel'][_0x40d9d8(0x1a0)](_0x562d3a,_0x14a2bc,{'commentId':_0x23e7c1[_0x40d9d8(0x207)],'text':JSON[_0x40d9d8(0x1b3)](_0x23e7c1[_0x40d9d8(0x19f)])});break;}case p[_0x40d9d8(0x1c5)]:{const _0x3607d7=this[_0x40d9d8(0x1c0)][_0x40d9d8(0x1f2)](_0x562d3a,_0x23e7c1[_0x40d9d8(0x1fd)]);_0x3607d7&&this[_0x40d9d8(0x1c0)][_0x40d9d8(0x1bb)](_0x562d3a,_0x14a2bc,_0x3607d7['id'],_0x23e7c1[_0x40d9d8(0x1f7)]===v[_0x40d9d8(0x1ab)]);break;}}}));}};b=pe([_0x434295(_0x546710[_0x52c2db(0x1bf)],b),I(0x0,_0x508cfb(_0x5283c4)),I(0x1,_0x508cfb(_0xb93b3)),I(0x2,_0x508cfb(_0x12f40d)),I(0x3,_0x508cfb(_0xf07d08))],b);function _0xa5c1(){const _0x944d54=['subscribe','threadId','subject','11JjWmhP','syncUpdateMutationToColla','getUser','https','deleteComment','YYYY/MM/DD\x20HH:mm','rangeType','_initDataSource','replyId','https:','Starting','users','onStarting','addComment','error','content','updateComment','pluginName','createTimestamp','1698066QoFycF','OpenOrReOpen','_threadCommentDataSource','comments','_config','reply','_httpService','unit','Solved','/universer-api/authz/collaborator','4vYsrrw','personId','dataSource','disposeWithMe','rangeId','length','parse','COMMENT','/universer-api/comment/unit/','2752990aNHbef','462359eadkPG','_initUserSync','user','body','resolveComment','searchParams','code','userId','Ready','_threadCommentModel','filter','addUser','/delete','pipe','Solve','replies','slice','_init','UNIVER_UNKNOWN','_threadCommentMentionDataSource','format','symbol','commentUpdate$','get','/edit','location','forEach','requireSession','http','/solved','Delete','Reply','_userService','map','add','16crxPgl','listComments','ref','defineProperty','_configService','3496964tjLsZM','post','Edit','getMemberID','_threadCommentMentionDataService','/reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','11124xxxOuE','2012976JnkHid','_threadCommentDataSourceService','://','_sessionService','customRanges','3871TuhcJf','/list','_commentService','thread-comment-data-source.config','userID','getThread','getOwnPropertyDescriptor','stringify','type','saveCommentToSnapshot','solved','Add','_injector','92630UiKTJL','UNRECOGNIZED'];_0xa5c1=function(){return _0x944d54;};return _0xa5c1();}const ve=_0x52c2db(0x1f0),_e={};var Y=Object[_0x52c2db(0x1dd)],fe=Object[_0x52c2db(0x1f3)],Ie=(_0x4e5e56,_0x5903cb,_0x9fc624)=>_0x5903cb in _0x4e5e56?Y(_0x4e5e56,_0x5903cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x9fc624}):_0x4e5e56[_0x5903cb]=_0x9fc624,Se=(_0x174cbc,_0x1febf2,_0x3ea23d,_0x438470)=>{const _0x50218f=_0x52c2db;for(var _0x3f630d=_0x438470>0x1?void 0x0:_0x438470?fe(_0x1febf2,_0x3ea23d):_0x1febf2,_0x52b73c=_0x174cbc[_0x50218f(0x1b2)]-0x1,_0x49c479;_0x52b73c>=0x0;_0x52b73c--)(_0x49c479=_0x174cbc[_0x52b73c])&&(_0x3f630d=(_0x438470?_0x49c479(_0x1febf2,_0x3ea23d,_0x3f630d):_0x49c479(_0x3f630d))||_0x3f630d);return _0x438470&&_0x3f630d&&Y(_0x1febf2,_0x3ea23d,_0x3f630d),_0x3f630d;},j=(_0x52d494,_0xe28ac9)=>(_0x52872c,_0x586e96)=>_0xe28ac9(_0x52872c,_0x586e96,_0x52d494),G=(_0x12e6ae,_0x4a33d1,_0x4bbd30)=>Ie(_0x12e6ae,typeof _0x4a33d1!=_0x52c2db(0x1cc)?_0x4a33d1+'':_0x4a33d1,_0x4bbd30);let O=class extends _0x9eeb51{constructor(_0x5769c0=_e,_0x1c03ba,_0x2f34d9){const _0x4762b9=_0x52c2db;super(),this[_0x4762b9(0x1a7)]=_0x5769c0,this[_0x4762b9(0x1f9)]=_0x1c03ba,this[_0x4762b9(0x1de)]=_0x2f34d9;const {..._0x37df49}=this['_config'];this['_configService']['setConfig'](ve,_0x37df49);}[_0x52c2db(0x19c)](){const _0x5df330=_0x52c2db;[[C],[D],[S],[b]][_0x5df330(0x1d1)](_0x3c0a14=>{const _0x561c57=_0x5df330;this[_0x561c57(0x1f9)][_0x561c57(0x1d9)](_0x3c0a14);});}};G(O,_0x52c2db(0x1a1),X),G(O,'type',_0xa6f5ec[_0x52c2db(0x1c9)]),O=Se([_0x393f2c(_0x3e9257,_0x161cc5,_0x56cf5c),j(0x1,_0x508cfb(_0xf07d08)),j(0x2,_0x1f0a03)],O);export{O as UniverThreadCommentDataSourcePlugin};
1
+ const _0x31765f=_0x49f7;(function(_0x27b174,_0x351bf8){const _0x47081f=_0x49f7,_0x3d77cc=_0x27b174();while(!![]){try{const _0x15a444=parseInt(_0x47081f(0x1c7))/0x1+-parseInt(_0x47081f(0x198))/0x2+parseInt(_0x47081f(0x1fb))/0x3*(-parseInt(_0x47081f(0x1e7))/0x4)+parseInt(_0x47081f(0x1a6))/0x5+-parseInt(_0x47081f(0x1ba))/0x6+-parseInt(_0x47081f(0x1e0))/0x7*(parseInt(_0x47081f(0x1a2))/0x8)+parseInt(_0x47081f(0x1ab))/0x9*(parseInt(_0x47081f(0x19d))/0xa);if(_0x15a444===_0x351bf8)break;else _0x3d77cc['push'](_0x3d77cc['shift']());}catch(_0x4f2f97){_0x3d77cc['push'](_0x3d77cc['shift']());}}}(_0x4272,0x78e20));import{UserManagerService as _0x528d19,Inject as _0x239a9d,Injector as _0x2bb676,CustomRangeType as _0x3f4ed2,OnLifecycle as _0x5ed997,LifecycleStages as _0x10741d,Disposable as _0x2aabe1,UniverInstanceType as _0x339b2a,DependentOn as _0x126a73,Plugin as _0x51349b,IConfigService as _0x15d434}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x28c019,ThreadCommentModel as _0x299de3,UniverThreadCommentPlugin as _0x52dd79}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0xac6a15,UniverThreadCommentUIPlugin as _0x2efec0}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x94fa52,CommentService as _0x56df0e,UniverCollaborationClientPlugin as _0x41305d}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x2944ec}from'@univerjs/network';import _0x4468e2 from'dayjs';import{bufferTime as _0x357fd5}from'rxjs';const X=_0x31765f(0x1b3);var v=(_0x1c4bdb=>(_0x1c4bdb[_0x1c4bdb[_0x31765f(0x1c9)]=0x0]=_0x31765f(0x1c9),_0x1c4bdb[_0x1c4bdb[_0x31765f(0x19b)]=0x1]='Solved',_0x1c4bdb[_0x1c4bdb[_0x31765f(0x196)]=-0x1]=_0x31765f(0x196),_0x1c4bdb))(v||{}),p=(_0x29c962=>(_0x29c962[_0x29c962['Unknown']=0x0]=_0x31765f(0x1c0),_0x29c962[_0x29c962[_0x31765f(0x1cd)]=0x1]=_0x31765f(0x1cd),_0x29c962[_0x29c962[_0x31765f(0x1da)]=0x2]=_0x31765f(0x1da),_0x29c962[_0x29c962[_0x31765f(0x1a8)]=0x3]='Edit',_0x29c962[_0x29c962['Delete']=0x4]='Delete',_0x29c962[_0x29c962[_0x31765f(0x18c)]=0x5]='Solve',_0x29c962[_0x29c962['UNRECOGNIZED']=-0x1]=_0x31765f(0x196),_0x29c962))(p||{});function _0x49f7(_0x43b3c0,_0x18f6ac){const _0x42720e=_0x4272();return _0x49f7=function(_0x49f759,_0x52d958){_0x49f759=_0x49f759-0x189;let _0x472675=_0x42720e[_0x49f759];return _0x472675;},_0x49f7(_0x43b3c0,_0x18f6ac);}const w=_0x25961a=>_0x4468e2(new Date(+_0x25961a))[_0x31765f(0x1eb)](_0x31765f(0x1f6)),k=async(_0x357a2e,_0x4c97d0)=>{const _0xca85ef=_0x31765f,_0x293576=_0x357a2e[_0xca85ef(0x1aa)](_0x528d19),_0x31203e=_0x357a2e['get'](_0x2944ec);_0x4c97d0['forEach'](_0x5aba22=>{const _0x50fefc=_0xca85ef;_0x293576[_0x50fefc(0x1c4)](_0x5aba22)&&_0x4c97d0[_0x50fefc(0x1bc)](_0x5aba22);}),_0x4c97d0[_0xca85ef(0x1af)]&&(await _0x31203e[_0xca85ef(0x1aa)](_0xca85ef(0x1f2),{'params':{'userIDs':[..._0x4c97d0]}}))[_0xca85ef(0x193)][_0xca85ef(0x19a)][_0xca85ef(0x1de)](_0x4f8a4d=>{const _0x3a60f3=_0xca85ef;_0x4f8a4d&&_0x293576[_0x3a60f3(0x1b8)](_0x4f8a4d);});};var ee=Object[_0x31765f(0x18a)],re=Object['getOwnPropertyDescriptor'],te=(_0x177611,_0x5780c9,_0x27e1af,_0x34fbd7)=>{for(var _0x1f0374=_0x34fbd7>0x1?void 0x0:_0x34fbd7?re(_0x5780c9,_0x27e1af):_0x5780c9,_0x51cae4=_0x177611['length']-0x1,_0x117cce;_0x51cae4>=0x0;_0x51cae4--)(_0x117cce=_0x177611[_0x51cae4])&&(_0x1f0374=(_0x34fbd7?_0x117cce(_0x5780c9,_0x27e1af,_0x1f0374):_0x117cce(_0x1f0374))||_0x1f0374);return _0x34fbd7&&_0x1f0374&&ee(_0x5780c9,_0x27e1af,_0x1f0374),_0x1f0374;},_=(_0x4d161b,_0x554e91)=>(_0x87cdc,_0x412e08)=>_0x554e91(_0x87cdc,_0x412e08,_0x4d161b);function se(_0x4986dd,_0x17afb7){const _0x83943b=_0x31765f,_0x2dea7a=_0x4986dd[_0x83943b(0x1a5)][0x0];return{..._0x17afb7,'id':_0x2dea7a[_0x83943b(0x1b9)],'resolved':_0x4986dd['solved']===0x1,'dT':w(_0x2dea7a['createTimestamp']),'personId':_0x2dea7a[_0x83943b(0x1ca)],'threadId':_0x2dea7a[_0x83943b(0x18f)]};}function oe(_0x13c882,_0x5244e6,_0x1912be){const _0x2e5bb8=_0x31765f;var _0x20aa65,_0x1aa4fc;if(((_0x1aa4fc=(_0x20aa65=_0x13c882==null?void 0x0:_0x13c882['replies'])==null?void 0x0:_0x20aa65[_0x2e5bb8(0x1e9)])!=null?_0x1aa4fc:0x0)>0x0){const _0x1a05d4=(_0x2e2e10,_0x12d4be)=>({'id':_0x2e2e10['replyId'],'threadId':_0x2e2e10[_0x2e5bb8(0x18f)],'dT':w(_0x2e2e10[_0x2e5bb8(0x1b5)]),'personId':_0x2e2e10[_0x2e5bb8(0x1ca)],'resolved':_0x13c882[_0x2e5bb8(0x1b4)]===v[_0x2e5bb8(0x19b)],'unitId':_0x5244e6,'subUnitId':_0x1912be,'text':JSON['parse'](_0x2e2e10[_0x2e5bb8(0x1ac)]),'parentId':_0x12d4be}),_0x882f13=_0x1a05d4(_0x13c882[_0x2e5bb8(0x1a5)][0x0]);return{..._0x882f13,'children':_0x13c882[_0x2e5bb8(0x1a5)][_0x2e5bb8(0x1ae)](0x1)['map'](_0x18f6dd=>_0x1a05d4(_0x18f6dd,_0x882f13['id']))};}return null;}let D=class{constructor(_0x76ef52,_0xe25453,_0x3dcea3,_0x4c89cb){const _0x10f4da=_0x31765f;this[_0x10f4da(0x1a7)]=_0x76ef52,this['_userService']=_0xe25453,this[_0x10f4da(0x1dd)]=_0x3dcea3,this[_0x10f4da(0x194)]=_0x4c89cb;}async[_0x31765f(0x1c6)](_0x51dc9e){const _0x1080ec=_0x31765f;var _0x245c6f,_0xe03186;const {parentId:_0x5a1501,unitId:_0x4b4d1e,text:_0x215906,threadId:_0x43b229}=_0x51dc9e,_0x62ef96=(_0xe03186=(_0x245c6f=_0x215906['customRanges'])==null?void 0x0:_0x245c6f[_0x1080ec(0x1ed)](_0x165785=>_0x165785[_0x1080ec(0x1cc)]===_0x3f4ed2[_0x1080ec(0x1e6)])['map'](_0x546704=>_0x546704[_0x1080ec(0x1a1)]))!=null?_0xe03186:[],_0x14dfdf=JSON[_0x1080ec(0x1c8)](_0x215906),_0x1e2fb5=(await this[_0x1080ec(0x1dd)][_0x1080ec(0x1a9)](_0x4b4d1e))[_0x1080ec(0x1f8)]();if(_0x5a1501){const _0x35f7fc={'memberId':_0x1e2fb5,'unitId':_0x4b4d1e,'content':_0x14dfdf,'mention':_0x62ef96,'threadId':_0x43b229},_0x11ef3f=(await this[_0x1080ec(0x1a7)]['post'](_0x1080ec(0x1d0)+_0x4b4d1e+_0x1080ec(0x1f9),{'body':_0x35f7fc}))[_0x1080ec(0x193)][_0x1080ec(0x1f3)];return{..._0x51dc9e,'id':_0x11ef3f['replyId'],'dT':_0x4468e2(+_0x11ef3f['createTimestamp'])[_0x1080ec(0x1eb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x11ef3f['userId']};}else{const _0x1fbf7d={'memberId':_0x1e2fb5,'unitId':_0x4b4d1e,'content':_0x14dfdf,'mention':_0x62ef96},_0xfbc2b0=await this[_0x1080ec(0x1a7)][_0x1080ec(0x195)](_0x1080ec(0x1d0)+_0x4b4d1e+_0x1080ec(0x1fa),{'body':_0x1fbf7d});return se(_0xfbc2b0[_0x1080ec(0x193)][_0x1080ec(0x19c)],_0x51dc9e);}}async[_0x31765f(0x1c5)](_0x44a7af){const _0x4990c6=_0x31765f;var _0x3fb743,_0x169945;const {text:_0x568730,unitId:_0x4dcb20}=_0x44a7af,_0x2c29fa=(_0x169945=(_0x3fb743=_0x568730['customRanges'])==null?void 0x0:_0x3fb743['filter'](_0x3eb537=>_0x3eb537[_0x4990c6(0x1cc)]===_0x3f4ed2[_0x4990c6(0x1e6)])[_0x4990c6(0x1bf)](_0x1be5f5=>_0x1be5f5[_0x4990c6(0x1a1)]))!=null?_0x169945:[],_0x53df80=JSON[_0x4990c6(0x1c8)](_0x568730),_0x50f60c=_0x44a7af[_0x4990c6(0x18f)],_0x50dead=_0x44a7af['id'],_0x398903={'memberId':(await this['_sessionService']['requireSession'](_0x4dcb20))[_0x4990c6(0x1f8)](),'unitId':_0x4dcb20,'threadId':_0x50f60c,'mention':_0x2c29fa,'content':_0x53df80,'replyId':_0x50dead},_0x17d5b2=await this[_0x4990c6(0x1a7)][_0x4990c6(0x195)](_0x4990c6(0x1d0)+_0x4dcb20+_0x4990c6(0x18b),{'body':_0x398903});return!_0x17d5b2[_0x4990c6(0x193)][_0x4990c6(0x1b7)]||_0x17d5b2[_0x4990c6(0x193)][_0x4990c6(0x1b7)]['code']===0x1;}async[_0x31765f(0x1f0)](_0x238e00){const _0x18b39f=_0x31765f,{unitId:_0x190f79}=_0x238e00,_0x5b317f=_0x238e00[_0x18b39f(0x18f)],_0x4b8448={'memberId':this[_0x18b39f(0x1b2)][_0x18b39f(0x1ea)]()[_0x18b39f(0x1d6)],'unitId':_0x190f79,'threadId':_0x5b317f,'solved':_0x238e00[_0x18b39f(0x1c3)]?v[_0x18b39f(0x19b)]:v[_0x18b39f(0x1c9)]},_0x5c8149=await this[_0x18b39f(0x1a7)]['post']('/universer-api/comment/unit/'+_0x190f79+_0x18b39f(0x1d3),{'body':_0x4b8448});return!_0x5c8149[_0x18b39f(0x193)]['error']||_0x5c8149[_0x18b39f(0x193)][_0x18b39f(0x1b7)][_0x18b39f(0x1d7)]===0x1;}async[_0x31765f(0x1e2)](_0x4099b1,_0x25d029,_0x4e03dd,_0x1fbe03){const _0x90bdfe=_0x31765f,_0x427ee6={'memberId':(await this['_sessionService'][_0x90bdfe(0x1a9)](_0x4099b1))['getMemberID'](),'threadId':_0x4e03dd,'replyId':_0x1fbe03,'unitId':_0x4099b1},_0x549f9c=await this[_0x90bdfe(0x1a7)]['post']('/universer-api/comment/unit/'+_0x4099b1+'/delete',{'body':_0x427ee6});return!_0x549f9c['body'][_0x90bdfe(0x1b7)]||_0x549f9c[_0x90bdfe(0x193)][_0x90bdfe(0x1b7)]['code']===0x1;}async['listComments'](_0x5d4ac1,_0x21b1d1,_0x178acd){const _0x3c76c8=_0x31765f,_0xd0c769={'unitId':_0x5d4ac1,'threadId':_0x178acd},_0x455aa4=await this[_0x3c76c8(0x1a7)]['post'](_0x3c76c8(0x1d0)+_0x5d4ac1+_0x3c76c8(0x1ce),{'body':_0xd0c769}),_0x20eb12=_0x178acd[_0x3c76c8(0x1bf)](_0x4569f3=>oe(_0x455aa4['body']['comments'][_0x4569f3],_0x5d4ac1,_0x21b1d1))['filter'](Boolean);return Object[_0x3c76c8(0x1e1)](_0x455aa4[_0x3c76c8(0x193)][_0x3c76c8(0x19a)])[_0x3c76c8(0x1de)](_0x4d15bf=>{const _0x24758a=_0x3c76c8;this[_0x24758a(0x1b2)][_0x24758a(0x1b8)](_0x4d15bf);}),_0x20eb12;}[_0x31765f(0x19f)](_0x470de4){const _0x5f2734=_0x31765f;return{'id':_0x470de4['id'],'threadId':_0x470de4[_0x5f2734(0x18f)],'ref':_0x470de4[_0x5f2734(0x1e5)]};}};D=te([_(0x0,_0x239a9d(_0x2944ec)),_(0x1,_0x239a9d(_0x528d19)),_(0x2,_0x239a9d(_0x94fa52)),_(0x3,_0x239a9d(_0x2bb676))],D);var ne=Object[_0x31765f(0x18a)],ie=Object['getOwnPropertyDescriptor'],ae=(_0xa84aaa,_0x120271,_0x152121,_0xe8727d)=>{const _0x8147f2=_0x31765f;for(var _0x43aaf1=_0xe8727d>0x1?void 0x0:_0xe8727d?ie(_0x120271,_0x152121):_0x120271,_0xcd7f3d=_0xa84aaa[_0x8147f2(0x1e9)]-0x1,_0x4b4098;_0xcd7f3d>=0x0;_0xcd7f3d--)(_0x4b4098=_0xa84aaa[_0xcd7f3d])&&(_0x43aaf1=(_0xe8727d?_0x4b4098(_0x120271,_0x152121,_0x43aaf1):_0x4b4098(_0x43aaf1))||_0x43aaf1);return _0xe8727d&&_0x43aaf1&&ne(_0x120271,_0x152121,_0x43aaf1),_0x43aaf1;},ce=(_0x169dcc,_0x51921e)=>(_0x3f9085,_0xcb1c19)=>_0x51921e(_0x3f9085,_0xcb1c19,_0x169dcc);let C=class{constructor(_0x3adf80){const _0x1c0b81=_0x31765f;this[_0x1c0b81(0x1a7)]=_0x3adf80;}async[_0x31765f(0x1b0)](_0x77ed5c,_0x138dcc,_0x1547e1){const _0x23d305=_0x31765f,_0x3e7f91=new URL(window[_0x23d305(0x1f1)]['href'])[_0x23d305(0x197)][_0x23d305(0x1aa)]('unit');if(!_0x3e7f91)return[];const _0x1e478b=window['location'][_0x23d305(0x1d4)],_0x1815e3=window['location']['protocol']==='https:'?_0x23d305(0x1a4):_0x23d305(0x1a0);return(await this['_httpService'][_0x23d305(0x1aa)](_0x1815e3+_0x23d305(0x1c1)+_0x1e478b+_0x23d305(0x1be),{'params':{'objectID':_0x3e7f91,'unitID':_0x3e7f91}}))[_0x23d305(0x193)]['collaborators'][_0x23d305(0x1bf)](_0x174129=>{const _0x3625a8=_0x23d305;var _0x26a3ec,_0x148f5d,_0x10ebfb,_0x2f0041,_0x16e2af,_0x5486c4;return{'id':(_0x148f5d=(_0x26a3ec=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x26a3ec[_0x3625a8(0x1d6)])!=null?_0x148f5d:'','label':(_0x2f0041=(_0x10ebfb=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x10ebfb[_0x3625a8(0x1ad)])!=null?_0x2f0041:'','icon':(_0x5486c4=(_0x16e2af=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x16e2af[_0x3625a8(0x1d8)])!=null?_0x5486c4:'','type':_0x3625a8(0x1db)};});}};C=ae([ce(0x0,_0x239a9d(_0x2944ec))],C);var de=Object['defineProperty'],me=Object[_0x31765f(0x1e4)],le=(_0x27a0d2,_0x166e2a,_0x3dd188,_0x56102a)=>{const _0x3956bb=_0x31765f;for(var _0x341dec=_0x56102a>0x1?void 0x0:_0x56102a?me(_0x166e2a,_0x3dd188):_0x166e2a,_0x2da5c8=_0x27a0d2[_0x3956bb(0x1e9)]-0x1,_0x3b0d02;_0x2da5c8>=0x0;_0x2da5c8--)(_0x3b0d02=_0x27a0d2[_0x2da5c8])&&(_0x341dec=(_0x56102a?_0x3b0d02(_0x166e2a,_0x3dd188,_0x341dec):_0x3b0d02(_0x341dec))||_0x341dec);return _0x56102a&&_0x341dec&&de(_0x166e2a,_0x3dd188,_0x341dec),_0x341dec;},f=(_0x4a582c,_0x18c048)=>(_0x588c1f,_0x16c7ed)=>_0x18c048(_0x588c1f,_0x16c7ed,_0x4a582c);let S=class extends _0x2aabe1{constructor(_0x1bacde,_0x3f895e,_0x2332ec,_0x3b6a92){const _0x23037c=_0x31765f;super(),this[_0x23037c(0x190)]=_0x1bacde,this[_0x23037c(0x191)]=_0x3f895e,this[_0x23037c(0x1b6)]=_0x2332ec,this[_0x23037c(0x1d5)]=_0x3b6a92,this[_0x23037c(0x1d2)]();}[_0x31765f(0x1d2)](){const _0x380d0c=_0x31765f;this[_0x380d0c(0x190)][_0x380d0c(0x1c2)]=this[_0x380d0c(0x191)],this[_0x380d0c(0x190)][_0x380d0c(0x192)]=!0x1,this['_threadCommentMentionDataService'][_0x380d0c(0x1c2)]=this['_threadCommentMentionDataSource'];}};S=le([_0x5ed997(_0x10741d[_0x31765f(0x18d)],S),f(0x0,_0x28c019),f(0x1,_0x239a9d(D)),f(0x2,_0xac6a15),f(0x3,_0x239a9d(C))],S);var he=Object[_0x31765f(0x18a)],ue=Object[_0x31765f(0x1e4)],pe=(_0x2fd3b5,_0x3c3af6,_0x16a15f,_0x582dcc)=>{const _0x4f9016=_0x31765f;for(var _0xe74216=_0x582dcc>0x1?void 0x0:_0x582dcc?ue(_0x3c3af6,_0x16a15f):_0x3c3af6,_0x402a3d=_0x2fd3b5[_0x4f9016(0x1e9)]-0x1,_0x205b1a;_0x402a3d>=0x0;_0x402a3d--)(_0x205b1a=_0x2fd3b5[_0x402a3d])&&(_0xe74216=(_0x582dcc?_0x205b1a(_0x3c3af6,_0x16a15f,_0xe74216):_0x205b1a(_0xe74216))||_0xe74216);return _0x582dcc&&_0xe74216&&he(_0x3c3af6,_0x16a15f,_0xe74216),_0xe74216;},I=(_0x539204,_0x2f5f91)=>(_0x3b3a37,_0x51b68a)=>_0x2f5f91(_0x3b3a37,_0x51b68a,_0x539204);let b=class extends _0x2aabe1{constructor(_0x3a3eea,_0x3bacce,_0x3807fd,_0x56910d){const _0x1812d5=_0x31765f;super(),this[_0x1812d5(0x199)]=_0x3a3eea,this[_0x1812d5(0x1f4)]=_0x3bacce,this[_0x1812d5(0x1b2)]=_0x3807fd,this[_0x1812d5(0x194)]=_0x56910d,this[_0x1812d5(0x1ee)](),this[_0x1812d5(0x1ef)]();}['_initUserSync'](){const _0x194d1f=_0x31765f;this[_0x194d1f(0x1e8)](this[_0x194d1f(0x1f4)][_0x194d1f(0x1d9)][_0x194d1f(0x18e)](_0x357fd5(0x10))[_0x194d1f(0x1dc)](_0x1c4d80=>{const _0x533f33=new Set();_0x1c4d80['forEach'](_0x316229=>{const _0x355ab2=_0x49f7;switch(_0x316229['type']){case _0x355ab2(0x1d1):{const _0x10a50a=_0x316229['payload'][_0x355ab2(0x189)];_0x533f33[_0x355ab2(0x1d1)](_0x10a50a);break;}}}),k(this['_injector'],_0x533f33);}));}[_0x31765f(0x1ee)](){const _0x450306=_0x31765f;this[_0x450306(0x1e8)](this[_0x450306(0x199)]['commentUpdate$'][_0x450306(0x1dc)](async _0x5e0f08=>{const _0xd25802=_0x450306;var _0x3a250a,_0x49f5d0;const _0x1ccf95=this[_0xd25802(0x1f4)]['getThread'](_0x5e0f08[_0xd25802(0x1b1)],_0x5e0f08[_0xd25802(0x18f)]);if(!_0x1ccf95)return;const {unitId:_0x17e7bd,subUnitId:_0x202b06}=_0x1ccf95;switch(_0x5e0f08[_0xd25802(0x1db)]&&this[_0xd25802(0x1b2)]['addUser'](_0x5e0f08['user']),_0x5e0f08[_0xd25802(0x1cf)]){case p['Add']:break;case p[_0xd25802(0x1da)]:{this[_0xd25802(0x1f4)]['addComment'](_0x17e7bd,_0x202b06,{'unitId':_0x17e7bd,'subUnitId':_0x202b06,'ref':'','id':_0x5e0f08[_0xd25802(0x1b9)],'dT':w(+_0x5e0f08[_0xd25802(0x1b5)]),'threadId':_0x5e0f08[_0xd25802(0x18f)],'personId':(_0x49f5d0=(_0x3a250a=_0x5e0f08[_0xd25802(0x1db)])==null?void 0x0:_0x3a250a[_0xd25802(0x1d6)])!=null?_0x49f5d0:_0x5e0f08[_0xd25802(0x1ca)],'text':JSON[_0xd25802(0x1f5)](_0x5e0f08[_0xd25802(0x1ac)]),'parentId':_0x1ccf95['id']});break;}case p[_0xd25802(0x1bb)]:{const _0x295d47=this['_threadCommentModel'][_0xd25802(0x19e)](_0x17e7bd,_0x202b06,_0x5e0f08['replyId']);_0x295d47&&_0x295d47[_0xd25802(0x1df)]&&this[_0xd25802(0x1f4)][_0xd25802(0x1e2)](_0x17e7bd,_0x202b06,_0x5e0f08['replyId']);break;}case p[_0xd25802(0x1a8)]:{this[_0xd25802(0x1f4)]['updateComment'](_0x17e7bd,_0x202b06,{'commentId':_0x5e0f08[_0xd25802(0x1b9)],'text':JSON['parse'](_0x5e0f08[_0xd25802(0x1ac)])});break;}case p[_0xd25802(0x18c)]:{const _0x51b2b2=this[_0xd25802(0x1f4)][_0xd25802(0x1a3)](_0x17e7bd,_0x5e0f08[_0xd25802(0x18f)]);_0x51b2b2&&this[_0xd25802(0x1f4)][_0xd25802(0x1f0)](_0x17e7bd,_0x202b06,_0x51b2b2['id'],_0x5e0f08['solved']===v[_0xd25802(0x19b)]);break;}}}));}};b=pe([_0x5ed997(_0x10741d[_0x31765f(0x1e3)],b),I(0x0,_0x239a9d(_0x56df0e)),I(0x1,_0x239a9d(_0x299de3)),I(0x2,_0x239a9d(_0x528d19)),I(0x3,_0x239a9d(_0x2bb676))],b);function _0x4272(){const _0x5b4ace=['/solved','host','_threadCommentMentionDataSource','userID','code','avatar','commentUpdate$','Reply','user','subscribe','_sessionService','forEach','parentId','686qmOutL','values','deleteComment','Ready','getOwnPropertyDescriptor','ref','COMMENT','276sOhkKJ','disposeWithMe','length','getCurrentUser','format','subject','filter','_init','_initUserSync','resolveComment','location','/universer-api/user/list','reply','_threadCommentModel','parse','YYYY/MM/DD\x20HH:mm','_config','getMemberID','/reply','/add','26694KIXHIX','personId','defineProperty','/edit','Solve','Starting','pipe','threadId','_threadCommentDataSourceService','_threadCommentDataSource','syncUpdateMutationToColla','body','_injector','post','UNRECOGNIZED','searchParams','1855198XIUluK','_commentService','users','Solved','comment','280MONmQI','getComment','saveCommentToSnapshot','http','rangeId','78824gQlFqm','getThread','https','replies','331570TxwVOm','_httpService','Edit','requireSession','get','998388BhLRDA','content','name','slice','size','getMentions','unitId','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','createTimestamp','_threadCommentMentionDataService','error','addUser','replyId','5265192andlMg','Delete','delete','_configService','/universer-api/authz/collaborator','map','Unknown','://','dataSource','resolved','getUser','updateComment','addComment','707413nxknAd','stringify','OpenOrReOpen','userId','onStarting','rangeType','Add','/list','type','/universer-api/comment/unit/','add','_initDataSource'];_0x4272=function(){return _0x5b4ace;};return _0x4272();}const ve='thread-comment-data-source.config',_e={};var Y=Object[_0x31765f(0x18a)],fe=Object[_0x31765f(0x1e4)],Ie=(_0x242dca,_0x37a461,_0x492287)=>_0x37a461 in _0x242dca?Y(_0x242dca,_0x37a461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x492287}):_0x242dca[_0x37a461]=_0x492287,Se=(_0x565948,_0x228ffa,_0x15cee4,_0x14af0c)=>{const _0x547ec1=_0x31765f;for(var _0x3df0a0=_0x14af0c>0x1?void 0x0:_0x14af0c?fe(_0x228ffa,_0x15cee4):_0x228ffa,_0xc7eb5b=_0x565948[_0x547ec1(0x1e9)]-0x1,_0x53c17b;_0xc7eb5b>=0x0;_0xc7eb5b--)(_0x53c17b=_0x565948[_0xc7eb5b])&&(_0x3df0a0=(_0x14af0c?_0x53c17b(_0x228ffa,_0x15cee4,_0x3df0a0):_0x53c17b(_0x3df0a0))||_0x3df0a0);return _0x14af0c&&_0x3df0a0&&Y(_0x228ffa,_0x15cee4,_0x3df0a0),_0x3df0a0;},j=(_0x1de245,_0xe7f0c2)=>(_0x5167fa,_0x3f8856)=>_0xe7f0c2(_0x5167fa,_0x3f8856,_0x1de245),G=(_0x112ae7,_0x3f3a9a,_0x4ed1cc)=>Ie(_0x112ae7,typeof _0x3f3a9a!='symbol'?_0x3f3a9a+'':_0x3f3a9a,_0x4ed1cc);let O=class extends _0x51349b{constructor(_0x1f77c2=_e,_0xaecccf,_0x228b3e){const _0x2cc739=_0x31765f;super(),this[_0x2cc739(0x1f7)]=_0x1f77c2,this[_0x2cc739(0x194)]=_0xaecccf,this['_configService']=_0x228b3e;const {..._0x27b173}=this[_0x2cc739(0x1f7)];this[_0x2cc739(0x1bd)]['setConfig'](ve,_0x27b173);}[_0x31765f(0x1cb)](){const _0x6c530f=_0x31765f;[[C],[D],[S],[b]][_0x6c530f(0x1de)](_0x6dec22=>{const _0x17a663=_0x6c530f;this[_0x17a663(0x194)][_0x17a663(0x1d1)](_0x6dec22);});}};G(O,'pluginName',X),G(O,_0x31765f(0x1cf),_0x339b2a['UNIVER_UNKNOWN']),O=Se([_0x126a73(_0x52dd79,_0x2efec0,_0x41305d),j(0x1,_0x239a9d(_0x2bb676)),j(0x2,_0x15d434)],O);export{O as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x50ad10,_0x5df032){const _0x11442e=_0x3e43,_0x91b148=_0x50ad10();while(!![]){try{const _0x13eb09=parseInt(_0x11442e(0x223))/0x1+-parseInt(_0x11442e(0x1f1))/0x2+-parseInt(_0x11442e(0x22e))/0x3+parseInt(_0x11442e(0x22a))/0x4*(parseInt(_0x11442e(0x259))/0x5)+-parseInt(_0x11442e(0x230))/0x6+-parseInt(_0x11442e(0x224))/0x7*(parseInt(_0x11442e(0x239))/0x8)+parseInt(_0x11442e(0x236))/0x9;if(_0x13eb09===_0x5df032)break;else _0x91b148['push'](_0x91b148['shift']());}catch(_0x295e3a){_0x91b148['push'](_0x91b148['shift']());}}}(_0x4841,0x46aa2),function(_0x1e2260,_0x35a5ad){const _0xbfa50f=_0x3e43;typeof exports=='object'&&typeof module<'u'?_0x35a5ad(exports,require(_0xbfa50f(0x214)),require(_0xbfa50f(0x275)),require(_0xbfa50f(0x23c)),require(_0xbfa50f(0x271)),require(_0xbfa50f(0x24b)),require(_0xbfa50f(0x212)),require(_0xbfa50f(0x270))):typeof define==_0xbfa50f(0x1fe)&&define[_0xbfa50f(0x27f)]?define(['exports','@univerjs/core','@univerjs/thread-comment',_0xbfa50f(0x23c),_0xbfa50f(0x271),_0xbfa50f(0x24b),'dayjs',_0xbfa50f(0x270)],_0x35a5ad):(_0x1e2260=typeof globalThis<'u'?globalThis:_0x1e2260||self,_0x35a5ad(_0x1e2260[_0xbfa50f(0x242)]={},_0x1e2260[_0xbfa50f(0x251)],_0x1e2260[_0xbfa50f(0x219)],_0x1e2260[_0xbfa50f(0x208)],_0x1e2260[_0xbfa50f(0x260)],_0x1e2260[_0xbfa50f(0x279)],_0x1e2260[_0xbfa50f(0x212)],_0x1e2260[_0xbfa50f(0x270)]));}(this,function(_0x2e12ec,_0x2d4db3,_0x1e3a23,_0xa92f27,_0x4f26eb,_0x235884,_0x5b4d9b,_0x3d8b35){'use strict';const _0x4c9014=_0x3e43;const _0x5e0ba8=_0x4c9014(0x258);var _0x50ab58=(_0x3b10b3=>(_0x3b10b3[_0x3b10b3[_0x4c9014(0x272)]=0x0]=_0x4c9014(0x272),_0x3b10b3[_0x3b10b3['Solved']=0x1]=_0x4c9014(0x209),_0x3b10b3[_0x3b10b3[_0x4c9014(0x277)]=-0x1]=_0x4c9014(0x277),_0x3b10b3))(_0x50ab58||{}),_0xb83c57=(_0x11125c=>(_0x11125c[_0x11125c[_0x4c9014(0x26a)]=0x0]=_0x4c9014(0x26a),_0x11125c[_0x11125c[_0x4c9014(0x26f)]=0x1]=_0x4c9014(0x26f),_0x11125c[_0x11125c[_0x4c9014(0x20d)]=0x2]=_0x4c9014(0x20d),_0x11125c[_0x11125c[_0x4c9014(0x201)]=0x3]='Edit',_0x11125c[_0x11125c['Delete']=0x4]='Delete',_0x11125c[_0x11125c[_0x4c9014(0x274)]=0x5]=_0x4c9014(0x274),_0x11125c[_0x11125c[_0x4c9014(0x277)]=-0x1]='UNRECOGNIZED',_0x11125c))(_0xb83c57||{});const _0xca81b4=_0xf65523=>_0x5b4d9b(new Date(+_0xf65523))[_0x4c9014(0x226)](_0x4c9014(0x1fd)),_0x2974fd=async(_0x3f11e9,_0x5e08ba)=>{const _0x39db1b=_0x4c9014,_0x53cdf7=_0x3f11e9[_0x39db1b(0x255)](_0x2d4db3[_0x39db1b(0x233)]),_0x39a618=_0x3f11e9['get'](_0x235884[_0x39db1b(0x269)]);_0x5e08ba[_0x39db1b(0x25f)](_0x62e3d7=>{_0x53cdf7['getUser'](_0x62e3d7)&&_0x5e08ba['delete'](_0x62e3d7);}),_0x5e08ba['size']&&(await _0x39a618['get'](_0x39db1b(0x252),{'params':{'userIDs':[..._0x5e08ba]}}))['body'][_0x39db1b(0x262)][_0x39db1b(0x25f)](_0xb971b6=>{_0xb971b6&&_0x53cdf7['addUser'](_0xb971b6);});};var _0x192859=Object[_0x4c9014(0x249)],_0x3cba8f=Object[_0x4c9014(0x221)],_0x1c0bb2=(_0x4ac78d,_0x47ec12,_0x210eec,_0x66d8f4)=>{for(var _0x2504e3=_0x66d8f4>0x1?void 0x0:_0x66d8f4?_0x3cba8f(_0x47ec12,_0x210eec):_0x47ec12,_0x29c38d=_0x4ac78d['length']-0x1,_0x4def93;_0x29c38d>=0x0;_0x29c38d--)(_0x4def93=_0x4ac78d[_0x29c38d])&&(_0x2504e3=(_0x66d8f4?_0x4def93(_0x47ec12,_0x210eec,_0x2504e3):_0x4def93(_0x2504e3))||_0x2504e3);return _0x66d8f4&&_0x2504e3&&_0x192859(_0x47ec12,_0x210eec,_0x2504e3),_0x2504e3;},_0x7d39b1=(_0x5c1382,_0xdd329e)=>(_0x4adc3c,_0x414eb8)=>_0xdd329e(_0x4adc3c,_0x414eb8,_0x5c1382);function _0x3895eb(_0x132873,_0x2a9066){const _0x5cdc4a=_0x4c9014,_0x2ecd42=_0x132873['replies'][0x0];return{..._0x2a9066,'id':_0x2ecd42[_0x5cdc4a(0x225)],'resolved':_0x132873[_0x5cdc4a(0x263)]===0x1,'dT':_0xca81b4(_0x2ecd42[_0x5cdc4a(0x25e)]),'personId':_0x2ecd42[_0x5cdc4a(0x20e)],'threadId':_0x2ecd42[_0x5cdc4a(0x22d)]};}function _0x304d8c(_0x24b9d8,_0x24e766,_0xaafa8e){const _0xbf53b5=_0x4c9014;var _0x5dd527,_0x4b9cc9;if(((_0x4b9cc9=(_0x5dd527=_0x24b9d8==null?void 0x0:_0x24b9d8['replies'])==null?void 0x0:_0x5dd527[_0xbf53b5(0x202)])!=null?_0x4b9cc9:0x0)>0x0){const _0xb6f37d=(_0x5053f9,_0x312511)=>({'id':_0x5053f9[_0xbf53b5(0x225)],'threadId':_0x5053f9[_0xbf53b5(0x22d)],'dT':_0xca81b4(_0x5053f9[_0xbf53b5(0x25e)]),'personId':_0x5053f9[_0xbf53b5(0x20e)],'resolved':_0x24b9d8['solved']===_0x50ab58['Solved'],'unitId':_0x24e766,'subUnitId':_0xaafa8e,'text':JSON[_0xbf53b5(0x24e)](_0x5053f9['content']),'parentId':_0x312511}),_0x5b41dc=_0xb6f37d(_0x24b9d8[_0xbf53b5(0x1f5)][0x0]);return{..._0x5b41dc,'children':_0x24b9d8[_0xbf53b5(0x1f5)][_0xbf53b5(0x227)](0x1)['map'](_0x571e87=>_0xb6f37d(_0x571e87,_0x5b41dc['id']))};}return null;}let _0x17f3d5=class{constructor(_0xfc981d,_0x595643,_0xccd42e,_0x26c44c){const _0x47d3f1=_0x4c9014;this[_0x47d3f1(0x241)]=_0xfc981d,this[_0x47d3f1(0x20f)]=_0x595643,this[_0x47d3f1(0x222)]=_0xccd42e,this['_injector']=_0x26c44c;}async['addComment'](_0x5c6f31){const _0xe1103d=_0x4c9014;var _0x4a064e,_0x4c5eab;const {parentId:_0x4cff92,unitId:_0x39a73e,text:_0x5ab61a,threadId:_0x69dc0d}=_0x5c6f31,_0x1c785e=(_0x4c5eab=(_0x4a064e=_0x5ab61a[_0xe1103d(0x21a)])==null?void 0x0:_0x4a064e[_0xe1103d(0x218)](_0x49b928=>_0x49b928['rangeType']===_0x2d4db3[_0xe1103d(0x210)][_0xe1103d(0x26d)])[_0xe1103d(0x23b)](_0xe8ac7c=>_0xe8ac7c[_0xe1103d(0x27b)]))!=null?_0x4c5eab:[],_0x4f2459=JSON[_0xe1103d(0x26e)](_0x5ab61a),_0x2895b6=(await this['_sessionService']['requireSession'](_0x39a73e))[_0xe1103d(0x280)]();if(_0x4cff92){const _0x39c025={'memberId':_0x2895b6,'unitId':_0x39a73e,'content':_0x4f2459,'mention':_0x1c785e,'threadId':_0x69dc0d},_0x3c1f75=(await this['_httpService']['post'](_0xe1103d(0x204)+_0x39a73e+_0xe1103d(0x22c),{'body':_0x39c025}))[_0xe1103d(0x231)]['reply'];return{..._0x5c6f31,'id':_0x3c1f75[_0xe1103d(0x225)],'dT':_0x5b4d9b(+_0x3c1f75[_0xe1103d(0x25e)])['format'](_0xe1103d(0x1fd)),'personId':_0x3c1f75['userId']};}else{const _0x49e2f0={'memberId':_0x2895b6,'unitId':_0x39a73e,'content':_0x4f2459,'mention':_0x1c785e},_0x5dd0bb=await this['_httpService'][_0xe1103d(0x257)](_0xe1103d(0x204)+_0x39a73e+_0xe1103d(0x27a),{'body':_0x49e2f0});return _0x3895eb(_0x5dd0bb['body']['comment'],_0x5c6f31);}}async['updateComment'](_0x3a996e){const _0x1cff68=_0x4c9014;var _0x56c7ca,_0x3df95d;const {text:_0x32c16d,unitId:_0x843140}=_0x3a996e,_0x57d202=(_0x3df95d=(_0x56c7ca=_0x32c16d[_0x1cff68(0x21a)])==null?void 0x0:_0x56c7ca[_0x1cff68(0x218)](_0x38cff5=>_0x38cff5[_0x1cff68(0x248)]===_0x2d4db3['CustomRangeType'][_0x1cff68(0x26d)])[_0x1cff68(0x23b)](_0x2dd110=>_0x2dd110['rangeId']))!=null?_0x3df95d:[],_0x4050d2=JSON[_0x1cff68(0x26e)](_0x32c16d),_0x2ce9e8=_0x3a996e['threadId'],_0x132d31=_0x3a996e['id'],_0x457607={'memberId':(await this['_sessionService'][_0x1cff68(0x217)](_0x843140))['getMemberID'](),'unitId':_0x843140,'threadId':_0x2ce9e8,'mention':_0x57d202,'content':_0x4050d2,'replyId':_0x132d31},_0x23b7e2=await this['_httpService'][_0x1cff68(0x257)](_0x1cff68(0x204)+_0x843140+_0x1cff68(0x203),{'body':_0x457607});return!_0x23b7e2[_0x1cff68(0x231)][_0x1cff68(0x21f)]||_0x23b7e2[_0x1cff68(0x231)][_0x1cff68(0x21f)][_0x1cff68(0x23f)]===0x1;}async[_0x4c9014(0x253)](_0x4ced48){const _0x58b145=_0x4c9014,{unitId:_0xa0b002}=_0x4ced48,_0x516879=_0x4ced48[_0x58b145(0x22d)],_0x334bdd={'memberId':this['_userService'][_0x58b145(0x22f)]()['userID'],'unitId':_0xa0b002,'threadId':_0x516879,'solved':_0x4ced48[_0x58b145(0x1f2)]?_0x50ab58[_0x58b145(0x209)]:_0x50ab58[_0x58b145(0x272)]},_0x20f1de=await this[_0x58b145(0x241)][_0x58b145(0x257)](_0x58b145(0x204)+_0xa0b002+_0x58b145(0x25a),{'body':_0x334bdd});return!_0x20f1de[_0x58b145(0x231)][_0x58b145(0x21f)]||_0x20f1de['body'][_0x58b145(0x21f)][_0x58b145(0x23f)]===0x1;}async[_0x4c9014(0x1fc)](_0x187219,_0x334f83,_0x19ed5c,_0x739fe9){const _0x35c828=_0x4c9014,_0x4645bd={'memberId':(await this[_0x35c828(0x222)]['requireSession'](_0x187219))[_0x35c828(0x280)](),'threadId':_0x19ed5c,'replyId':_0x739fe9,'unitId':_0x187219},_0xefb72e=await this[_0x35c828(0x241)][_0x35c828(0x257)](_0x35c828(0x204)+_0x187219+_0x35c828(0x207),{'body':_0x4645bd});return!_0xefb72e['body'][_0x35c828(0x21f)]||_0xefb72e[_0x35c828(0x231)][_0x35c828(0x21f)][_0x35c828(0x23f)]===0x1;}async[_0x4c9014(0x250)](_0x5cb50c,_0x2f4ab0,_0x553812){const _0x2b4c6a=_0x4c9014,_0x36e23f={'unitId':_0x5cb50c,'threadId':_0x553812},_0x1c6452=await this[_0x2b4c6a(0x241)][_0x2b4c6a(0x257)]('/universer-api/comment/unit/'+_0x5cb50c+'/list',{'body':_0x36e23f}),_0x4529bc=_0x553812['map'](_0xe03887=>_0x304d8c(_0x1c6452['body']['comments'][_0xe03887],_0x5cb50c,_0x2f4ab0))[_0x2b4c6a(0x218)](Boolean);return Object['values'](_0x1c6452[_0x2b4c6a(0x231)][_0x2b4c6a(0x262)])[_0x2b4c6a(0x25f)](_0x471576=>{this['_userService']['addUser'](_0x471576);}),_0x4529bc;}[_0x4c9014(0x1f7)](_0x4f6597){const _0x5e8797=_0x4c9014;return{'id':_0x4f6597['id'],'threadId':_0x4f6597[_0x5e8797(0x22d)],'ref':_0x4f6597['ref']};}};_0x17f3d5=_0x1c0bb2([_0x7d39b1(0x0,_0x2d4db3['Inject'](_0x235884[_0x4c9014(0x269)])),_0x7d39b1(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x2d4db3['UserManagerService'])),_0x7d39b1(0x2,_0x2d4db3[_0x4c9014(0x278)](_0x4f26eb[_0x4c9014(0x213)])),_0x7d39b1(0x3,_0x2d4db3['Inject'](_0x2d4db3['Injector']))],_0x17f3d5);var _0x24649d=Object[_0x4c9014(0x249)],_0x53a32f=Object[_0x4c9014(0x221)],_0x247bbd=(_0xea7176,_0x661cd1,_0x488212,_0xb02f86)=>{for(var _0x3e4dd7=_0xb02f86>0x1?void 0x0:_0xb02f86?_0x53a32f(_0x661cd1,_0x488212):_0x661cd1,_0x400d81=_0xea7176['length']-0x1,_0x252459;_0x400d81>=0x0;_0x400d81--)(_0x252459=_0xea7176[_0x400d81])&&(_0x3e4dd7=(_0xb02f86?_0x252459(_0x661cd1,_0x488212,_0x3e4dd7):_0x252459(_0x3e4dd7))||_0x3e4dd7);return _0xb02f86&&_0x3e4dd7&&_0x24649d(_0x661cd1,_0x488212,_0x3e4dd7),_0x3e4dd7;},_0x13176b=(_0x21ac4a,_0x64fdf4)=>(_0x502154,_0x421f12)=>_0x64fdf4(_0x502154,_0x421f12,_0x21ac4a);let _0x489acc=class{constructor(_0x46e7ac){const _0x249dcb=_0x4c9014;this[_0x249dcb(0x241)]=_0x46e7ac;}async[_0x4c9014(0x21e)](_0x41dcca,_0x3c7ae7,_0x5c8471){const _0x80a1b5=_0x4c9014,_0x56b10d=new URL(window['location']['href'])['searchParams'][_0x80a1b5(0x255)](_0x80a1b5(0x267));if(!_0x56b10d)return[];const _0x4268ea=window[_0x80a1b5(0x235)]['host'],_0x19bffc=window['location']['protocol']==='https:'?_0x80a1b5(0x1fb):_0x80a1b5(0x244);return(await this[_0x80a1b5(0x241)][_0x80a1b5(0x255)](_0x19bffc+_0x80a1b5(0x215)+_0x4268ea+_0x80a1b5(0x24f),{'params':{'objectID':_0x56b10d,'unitID':_0x56b10d}}))[_0x80a1b5(0x231)][_0x80a1b5(0x265)][_0x80a1b5(0x23b)](_0x1dfcbf=>{const _0x49d62b=_0x80a1b5;var _0x436327,_0x32fe0d,_0x72b10c,_0x229694,_0x127782,_0x4847f4;return{'id':(_0x32fe0d=(_0x436327=_0x1dfcbf[_0x49d62b(0x22b)])==null?void 0x0:_0x436327[_0x49d62b(0x1f4)])!=null?_0x32fe0d:'','label':(_0x229694=(_0x72b10c=_0x1dfcbf[_0x49d62b(0x22b)])==null?void 0x0:_0x72b10c[_0x49d62b(0x256)])!=null?_0x229694:'','icon':(_0x4847f4=(_0x127782=_0x1dfcbf[_0x49d62b(0x22b)])==null?void 0x0:_0x127782[_0x49d62b(0x232)])!=null?_0x4847f4:'','type':_0x49d62b(0x273)};});}};_0x489acc=_0x247bbd([_0x13176b(0x0,_0x2d4db3[_0x4c9014(0x278)](_0x235884['HTTPService']))],_0x489acc);var _0x15d2a9=Object[_0x4c9014(0x249)],_0x291e3f=Object[_0x4c9014(0x221)],_0x2bcf90=(_0x4638d3,_0x2411a6,_0x2e39bc,_0x561da1)=>{for(var _0x26f385=_0x561da1>0x1?void 0x0:_0x561da1?_0x291e3f(_0x2411a6,_0x2e39bc):_0x2411a6,_0x4956e7=_0x4638d3['length']-0x1,_0x503ed5;_0x4956e7>=0x0;_0x4956e7--)(_0x503ed5=_0x4638d3[_0x4956e7])&&(_0x26f385=(_0x561da1?_0x503ed5(_0x2411a6,_0x2e39bc,_0x26f385):_0x503ed5(_0x26f385))||_0x26f385);return _0x561da1&&_0x26f385&&_0x15d2a9(_0x2411a6,_0x2e39bc,_0x26f385),_0x26f385;},_0x2176f9=(_0x39dad0,_0x190b79)=>(_0x13ac22,_0x27cde7)=>_0x190b79(_0x13ac22,_0x27cde7,_0x39dad0);let _0x10f5a5=class extends _0x2d4db3[_0x4c9014(0x237)]{constructor(_0x52b09c,_0x3ed397,_0x43a129,_0x2fe269){const _0x2233b0=_0x4c9014;super(),this[_0x2233b0(0x25c)]=_0x52b09c,this['_threadCommentDataSource']=_0x3ed397,this[_0x2233b0(0x211)]=_0x43a129,this['_threadCommentMentionDataSource']=_0x2fe269,this['_initDataSource']();}[_0x4c9014(0x25b)](){const _0x3cd784=_0x4c9014;this['_threadCommentDataSourceService'][_0x3cd784(0x1f9)]=this['_threadCommentDataSource'],this[_0x3cd784(0x25c)][_0x3cd784(0x240)]=!0x1,this['_threadCommentMentionDataService']['dataSource']=this[_0x3cd784(0x228)];}};_0x10f5a5=_0x2bcf90([_0x2d4db3[_0x4c9014(0x25d)](_0x2d4db3[_0x4c9014(0x21d)][_0x4c9014(0x200)],_0x10f5a5),_0x2176f9(0x0,_0x1e3a23[_0x4c9014(0x264)]),_0x2176f9(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x17f3d5)),_0x2176f9(0x2,_0xa92f27[_0x4c9014(0x245)]),_0x2176f9(0x3,_0x2d4db3[_0x4c9014(0x278)](_0x489acc))],_0x10f5a5);var _0x273984=Object[_0x4c9014(0x249)],_0x413ca2=Object[_0x4c9014(0x221)],_0xb5a44=(_0x3edc0b,_0x1b77b0,_0x488edb,_0x495ea9)=>{const _0xa837bc=_0x4c9014;for(var _0x237d56=_0x495ea9>0x1?void 0x0:_0x495ea9?_0x413ca2(_0x1b77b0,_0x488edb):_0x1b77b0,_0x39954e=_0x3edc0b[_0xa837bc(0x202)]-0x1,_0xa1ee1;_0x39954e>=0x0;_0x39954e--)(_0xa1ee1=_0x3edc0b[_0x39954e])&&(_0x237d56=(_0x495ea9?_0xa1ee1(_0x1b77b0,_0x488edb,_0x237d56):_0xa1ee1(_0x237d56))||_0x237d56);return _0x495ea9&&_0x237d56&&_0x273984(_0x1b77b0,_0x488edb,_0x237d56),_0x237d56;},_0x3be18a=(_0x4daf08,_0x3f3513)=>(_0x34878b,_0x3dfda9)=>_0x3f3513(_0x34878b,_0x3dfda9,_0x4daf08);let _0x4fbaf8=class extends _0x2d4db3['Disposable']{constructor(_0x4c09cf,_0x10a54a,_0x5549f3,_0x3ac8e5){const _0x1a26ad=_0x4c9014;super(),this[_0x1a26ad(0x216)]=_0x4c09cf,this[_0x1a26ad(0x24c)]=_0x10a54a,this[_0x1a26ad(0x20f)]=_0x5549f3,this['_injector']=_0x3ac8e5,this[_0x1a26ad(0x1fa)](),this[_0x1a26ad(0x254)]();}['_initUserSync'](){const _0x4d249b=_0x4c9014;this[_0x4d249b(0x27c)](this[_0x4d249b(0x24c)][_0x4d249b(0x1ff)][_0x4d249b(0x26b)](_0x3d8b35[_0x4d249b(0x20b)](0x10))[_0x4d249b(0x234)](_0x531c73=>{const _0x53547a=_0x4d249b,_0x1a48b8=new Set();_0x531c73[_0x53547a(0x25f)](_0x137b5c=>{const _0x3e18b5=_0x53547a;switch(_0x137b5c[_0x3e18b5(0x27d)]){case _0x3e18b5(0x206):{const _0x1ae7ca=_0x137b5c['payload'][_0x3e18b5(0x24d)];_0x1a48b8[_0x3e18b5(0x206)](_0x1ae7ca);break;}}}),_0x2974fd(this[_0x53547a(0x27e)],_0x1a48b8);}));}['_init'](){const _0x2a5e1c=_0x4c9014;this[_0x2a5e1c(0x27c)](this[_0x2a5e1c(0x216)][_0x2a5e1c(0x1ff)][_0x2a5e1c(0x234)](async _0x44710a=>{const _0x736f48=_0x2a5e1c;var _0x234af9,_0x32d2a5;const _0x287abd=this[_0x736f48(0x24c)]['getThread'](_0x44710a['unitId'],_0x44710a[_0x736f48(0x22d)]);if(!_0x287abd)return;const {unitId:_0x27baf3,subUnitId:_0x32f642}=_0x287abd;switch(_0x44710a[_0x736f48(0x273)]&&this[_0x736f48(0x20f)]['addUser'](_0x44710a[_0x736f48(0x273)]),_0x44710a['type']){case _0xb83c57['Add']:break;case _0xb83c57[_0x736f48(0x20d)]:{this[_0x736f48(0x24c)][_0x736f48(0x261)](_0x27baf3,_0x32f642,{'unitId':_0x27baf3,'subUnitId':_0x32f642,'ref':'','id':_0x44710a[_0x736f48(0x225)],'dT':_0xca81b4(+_0x44710a[_0x736f48(0x25e)]),'threadId':_0x44710a[_0x736f48(0x22d)],'personId':(_0x32d2a5=(_0x234af9=_0x44710a['user'])==null?void 0x0:_0x234af9['userID'])!=null?_0x32d2a5:_0x44710a[_0x736f48(0x20e)],'text':JSON['parse'](_0x44710a[_0x736f48(0x205)]),'parentId':_0x287abd['id']});break;}case _0xb83c57[_0x736f48(0x229)]:{const _0x5db6cd=this[_0x736f48(0x24c)][_0x736f48(0x1f6)](_0x27baf3,_0x32f642,_0x44710a[_0x736f48(0x225)]);_0x5db6cd&&_0x5db6cd[_0x736f48(0x20a)]&&this[_0x736f48(0x24c)][_0x736f48(0x1fc)](_0x27baf3,_0x32f642,_0x44710a[_0x736f48(0x225)]);break;}case _0xb83c57[_0x736f48(0x201)]:{this[_0x736f48(0x24c)][_0x736f48(0x20c)](_0x27baf3,_0x32f642,{'commentId':_0x44710a['replyId'],'text':JSON[_0x736f48(0x24e)](_0x44710a[_0x736f48(0x205)])});break;}case _0xb83c57[_0x736f48(0x274)]:{const _0x4ff36d=this[_0x736f48(0x24c)][_0x736f48(0x243)](_0x27baf3,_0x44710a['threadId']);_0x4ff36d&&this[_0x736f48(0x24c)]['resolveComment'](_0x27baf3,_0x32f642,_0x4ff36d['id'],_0x44710a[_0x736f48(0x263)]===_0x50ab58[_0x736f48(0x209)]);break;}}}));}};_0x4fbaf8=_0xb5a44([_0x2d4db3[_0x4c9014(0x25d)](_0x2d4db3[_0x4c9014(0x21d)][_0x4c9014(0x1f8)],_0x4fbaf8),_0x3be18a(0x0,_0x2d4db3[_0x4c9014(0x278)](_0x4f26eb[_0x4c9014(0x21c)])),_0x3be18a(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x1e3a23['ThreadCommentModel'])),_0x3be18a(0x2,_0x2d4db3['Inject'](_0x2d4db3[_0x4c9014(0x233)])),_0x3be18a(0x3,_0x2d4db3[_0x4c9014(0x278)](_0x2d4db3['Injector']))],_0x4fbaf8);const _0x279681=_0x4c9014(0x23d),_0x56b9b8={};var _0xafdab1=Object[_0x4c9014(0x249)],_0x234b1c=Object[_0x4c9014(0x221)],_0x23061e=(_0x5c93bd,_0x3ca02c,_0x4ecd4b)=>_0x3ca02c in _0x5c93bd?_0xafdab1(_0x5c93bd,_0x3ca02c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ecd4b}):_0x5c93bd[_0x3ca02c]=_0x4ecd4b,_0x4e4f2f=(_0x263f10,_0x867f80,_0x4e9c57,_0x24d9bb)=>{const _0xe01c85=_0x4c9014;for(var _0x3a5d2c=_0x24d9bb>0x1?void 0x0:_0x24d9bb?_0x234b1c(_0x867f80,_0x4e9c57):_0x867f80,_0x489ae0=_0x263f10[_0xe01c85(0x202)]-0x1,_0x53a705;_0x489ae0>=0x0;_0x489ae0--)(_0x53a705=_0x263f10[_0x489ae0])&&(_0x3a5d2c=(_0x24d9bb?_0x53a705(_0x867f80,_0x4e9c57,_0x3a5d2c):_0x53a705(_0x3a5d2c))||_0x3a5d2c);return _0x24d9bb&&_0x3a5d2c&&_0xafdab1(_0x867f80,_0x4e9c57,_0x3a5d2c),_0x3a5d2c;},_0x5ec150=(_0x2f7eaa,_0x37d0bb)=>(_0x230b89,_0xeb553)=>_0x37d0bb(_0x230b89,_0xeb553,_0x2f7eaa),_0x1275be=(_0xc2c692,_0x52d231,_0x498133)=>_0x23061e(_0xc2c692,typeof _0x52d231!=_0x4c9014(0x246)?_0x52d231+'':_0x52d231,_0x498133);_0x2e12ec['UniverThreadCommentDataSourcePlugin']=class extends _0x2d4db3['Plugin']{constructor(_0x4bf996=_0x56b9b8,_0x4d879e,_0x2f1def){const _0x43ce68=_0x4c9014;super(),this[_0x43ce68(0x281)]=_0x4bf996,this['_injector']=_0x4d879e,this[_0x43ce68(0x268)]=_0x2f1def;const {..._0x370534}=this[_0x43ce68(0x281)];this[_0x43ce68(0x268)][_0x43ce68(0x238)](_0x279681,_0x370534);}[_0x4c9014(0x23a)](){const _0x4b69a7=_0x4c9014;[[_0x489acc],[_0x17f3d5],[_0x10f5a5],[_0x4fbaf8]][_0x4b69a7(0x25f)](_0x5f3814=>{const _0x3e063d=_0x4b69a7;this['_injector'][_0x3e063d(0x206)](_0x5f3814);});}},_0x1275be(_0x2e12ec[_0x4c9014(0x247)],_0x4c9014(0x21b),_0x5e0ba8),_0x1275be(_0x2e12ec[_0x4c9014(0x247)],'type',_0x2d4db3[_0x4c9014(0x220)][_0x4c9014(0x1f3)]),_0x2e12ec[_0x4c9014(0x247)]=_0x4e4f2f([_0x2d4db3[_0x4c9014(0x23e)](_0x1e3a23['UniverThreadCommentPlugin'],_0xa92f27['UniverThreadCommentUIPlugin'],_0x4f26eb[_0x4c9014(0x24a)]),_0x5ec150(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x2d4db3[_0x4c9014(0x26c)])),_0x5ec150(0x2,_0x2d4db3['IConfigService'])],_0x2e12ec[_0x4c9014(0x247)]),Object[_0x4c9014(0x249)](_0x2e12ec,Symbol[_0x4c9014(0x276)],{'value':_0x4c9014(0x266)});}));function _0x3e43(_0x50533b,_0x33e529){const _0x48411a=_0x4841();return _0x3e43=function(_0x3e439e,_0x566044){_0x3e439e=_0x3e439e-0x1f1;let _0x2b895e=_0x48411a[_0x3e439e];return _0x2b895e;},_0x3e43(_0x50533b,_0x33e529);}function _0x4841(){const _0x1a58f6=['content','add','/delete','UniverThreadCommentUi','Solved','parentId','bufferTime','updateComment','Reply','userId','_userService','CustomRangeType','_threadCommentMentionDataService','dayjs','CollaborationSessionService','@univerjs/core','://','_commentService','requireSession','filter','UniverThreadComment','customRanges','pluginName','CommentService','LifecycleStages','getMentions','error','UniverInstanceType','getOwnPropertyDescriptor','_sessionService','189778WIMjBJ','14623JljRZm','replyId','format','slice','_threadCommentMentionDataSource','Delete','16960vgbNNs','subject','/reply','threadId','1518495rsscpk','getCurrentUser','702264RXfVle','body','avatar','UserManagerService','subscribe','location','9659448ciMxmx','Disposable','setConfig','1592qCgcfM','onStarting','map','@univerjs/thread-comment-ui','thread-comment-data-source.config','DependentOn','code','syncUpdateMutationToColla','_httpService','UniverThreadCommentDatasource','getThread','http','IThreadCommentMentionDataService','symbol','UniverThreadCommentDataSourcePlugin','rangeType','defineProperty','UniverCollaborationClientPlugin','@univerjs/network','_threadCommentModel','personId','parse','/universer-api/authz/collaborator','listComments','UniverCore','/universer-api/user/list','resolveComment','_initUserSync','get','name','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','265mDsbCH','/solved','_initDataSource','_threadCommentDataSourceService','OnLifecycle','createTimestamp','forEach','UniverCollaborationClient','addComment','users','solved','IThreadCommentDataSourceService','collaborators','Module','unit','_configService','HTTPService','Unknown','pipe','Injector','COMMENT','stringify','Add','rxjs','@univerjs-pro/collaboration-client','OpenOrReOpen','user','Solve','@univerjs/thread-comment','toStringTag','UNRECOGNIZED','Inject','UniverNetwork','/add','rangeId','disposeWithMe','type','_injector','amd','getMemberID','_config','318816poKclM','resolved','UNIVER_UNKNOWN','userID','replies','getComment','saveCommentToSnapshot','Ready','dataSource','_init','https','deleteComment','YYYY/MM/DD\x20HH:mm','function','commentUpdate$','Starting','Edit','length','/edit','/universer-api/comment/unit/'];_0x4841=function(){return _0x1a58f6;};return _0x4841();}
1
+ (function(_0x502dd8,_0x2676d8){const _0x5eea22=_0xb838,_0x51178d=_0x502dd8();while(!![]){try{const _0x4dadd1=-parseInt(_0x5eea22(0x131))/0x1+-parseInt(_0x5eea22(0x14d))/0x2*(parseInt(_0x5eea22(0x161))/0x3)+-parseInt(_0x5eea22(0x12b))/0x4*(-parseInt(_0x5eea22(0x18f))/0x5)+-parseInt(_0x5eea22(0x167))/0x6+-parseInt(_0x5eea22(0x180))/0x7*(parseInt(_0x5eea22(0x162))/0x8)+parseInt(_0x5eea22(0x179))/0x9+parseInt(_0x5eea22(0x156))/0xa*(parseInt(_0x5eea22(0x151))/0xb);if(_0x4dadd1===_0x2676d8)break;else _0x51178d['push'](_0x51178d['shift']());}catch(_0x119c52){_0x51178d['push'](_0x51178d['shift']());}}}(_0x34ea,0x6bf02),function(_0x125a08,_0x3ddc67){const _0x304f4f=_0xb838;typeof exports==_0x304f4f(0x133)&&typeof module<'u'?_0x3ddc67(exports,require('@univerjs/core'),require(_0x304f4f(0x168)),require(_0x304f4f(0x11c)),require(_0x304f4f(0x108)),require(_0x304f4f(0x121)),require('dayjs'),require(_0x304f4f(0x15c))):typeof define==_0x304f4f(0x10d)&&define['amd']?define([_0x304f4f(0x123),_0x304f4f(0x174),_0x304f4f(0x168),_0x304f4f(0x11c),_0x304f4f(0x108),_0x304f4f(0x121),_0x304f4f(0xff),_0x304f4f(0x15c)],_0x3ddc67):(_0x125a08=typeof globalThis<'u'?globalThis:_0x125a08||self,_0x3ddc67(_0x125a08['UniverThreadCommentDatasource']={},_0x125a08['UniverCore'],_0x125a08['UniverThreadComment'],_0x125a08['UniverThreadCommentUi'],_0x125a08[_0x304f4f(0x146)],_0x125a08[_0x304f4f(0x150)],_0x125a08[_0x304f4f(0xff)],_0x125a08[_0x304f4f(0x15c)]));}(this,function(_0x28ff37,_0x2f8dfc,_0x1e41b5,_0x403a44,_0x354310,_0x98bdec,_0x460625,_0x3f660d){'use strict';const _0x17094c=_0xb838;const _0x40cf9a='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2d95cc=(_0x49ee54=>(_0x49ee54[_0x49ee54[_0x17094c(0x18b)]=0x0]=_0x17094c(0x18b),_0x49ee54[_0x49ee54[_0x17094c(0x17e)]=0x1]=_0x17094c(0x17e),_0x49ee54[_0x49ee54[_0x17094c(0x106)]=-0x1]=_0x17094c(0x106),_0x49ee54))(_0x2d95cc||{}),_0x13fb68=(_0x1b5117=>(_0x1b5117[_0x1b5117[_0x17094c(0x115)]=0x0]=_0x17094c(0x115),_0x1b5117[_0x1b5117[_0x17094c(0x11e)]=0x1]=_0x17094c(0x11e),_0x1b5117[_0x1b5117[_0x17094c(0x125)]=0x2]=_0x17094c(0x125),_0x1b5117[_0x1b5117['Edit']=0x3]=_0x17094c(0x135),_0x1b5117[_0x1b5117[_0x17094c(0x126)]=0x4]=_0x17094c(0x126),_0x1b5117[_0x1b5117['Solve']=0x5]=_0x17094c(0x142),_0x1b5117[_0x1b5117[_0x17094c(0x106)]=-0x1]=_0x17094c(0x106),_0x1b5117))(_0x13fb68||{});const _0x3bbabd=_0x86d533=>_0x460625(new Date(+_0x86d533))['format'](_0x17094c(0x14c)),_0x21f452=async(_0x1a3f6e,_0x1a4f81)=>{const _0xa26d8e=_0x17094c,_0x5e45b8=_0x1a3f6e['get'](_0x2f8dfc[_0xa26d8e(0x14b)]),_0x20dd2f=_0x1a3f6e[_0xa26d8e(0x173)](_0x98bdec[_0xa26d8e(0x155)]);_0x1a4f81[_0xa26d8e(0x185)](_0x13e94f=>{const _0x276df3=_0xa26d8e;_0x5e45b8[_0x276df3(0x186)](_0x13e94f)&&_0x1a4f81[_0x276df3(0x110)](_0x13e94f);}),_0x1a4f81[_0xa26d8e(0x15b)]&&(await _0x20dd2f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x1a4f81]}}))[_0xa26d8e(0x10b)][_0xa26d8e(0x103)][_0xa26d8e(0x185)](_0x4890a5=>{_0x4890a5&&_0x5e45b8['addUser'](_0x4890a5);});};var _0x39a016=Object[_0x17094c(0x147)],_0x25aa48=Object[_0x17094c(0x17f)],_0x395ce1=(_0x1b2929,_0x206e73,_0x8d4b61,_0x36689f)=>{const _0x4653cd=_0x17094c;for(var _0x404fd3=_0x36689f>0x1?void 0x0:_0x36689f?_0x25aa48(_0x206e73,_0x8d4b61):_0x206e73,_0x3929f8=_0x1b2929[_0x4653cd(0x16e)]-0x1,_0x3488cd;_0x3929f8>=0x0;_0x3929f8--)(_0x3488cd=_0x1b2929[_0x3929f8])&&(_0x404fd3=(_0x36689f?_0x3488cd(_0x206e73,_0x8d4b61,_0x404fd3):_0x3488cd(_0x404fd3))||_0x404fd3);return _0x36689f&&_0x404fd3&&_0x39a016(_0x206e73,_0x8d4b61,_0x404fd3),_0x404fd3;},_0x18a7d9=(_0x55ebd3,_0x323745)=>(_0x2ef8bc,_0x3fe8a5)=>_0x323745(_0x2ef8bc,_0x3fe8a5,_0x55ebd3);function _0x3ce615(_0x1ec25d,_0x4e956c){const _0x350ea0=_0x17094c,_0x10fa95=_0x1ec25d['replies'][0x0];return{..._0x4e956c,'id':_0x10fa95[_0x350ea0(0x177)],'resolved':_0x1ec25d[_0x350ea0(0x17b)]===0x1,'dT':_0x3bbabd(_0x10fa95[_0x350ea0(0x120)]),'personId':_0x10fa95[_0x350ea0(0x13f)],'threadId':_0x10fa95[_0x350ea0(0x15a)]};}function _0x55a5a6(_0x2bc5db,_0x278895,_0x25b000){const _0x3f8a65=_0x17094c;var _0x35173a,_0xcd08f2;if(((_0xcd08f2=(_0x35173a=_0x2bc5db==null?void 0x0:_0x2bc5db[_0x3f8a65(0x15f)])==null?void 0x0:_0x35173a[_0x3f8a65(0x16e)])!=null?_0xcd08f2:0x0)>0x0){const _0x3f8bf9=(_0x21875b,_0x2a06e2)=>({'id':_0x21875b[_0x3f8a65(0x177)],'threadId':_0x21875b[_0x3f8a65(0x15a)],'dT':_0x3bbabd(_0x21875b[_0x3f8a65(0x120)]),'personId':_0x21875b['userId'],'resolved':_0x2bc5db[_0x3f8a65(0x17b)]===_0x2d95cc['Solved'],'unitId':_0x278895,'subUnitId':_0x25b000,'text':JSON[_0x3f8a65(0x16f)](_0x21875b['content']),'parentId':_0x2a06e2}),_0x19d842=_0x3f8bf9(_0x2bc5db[_0x3f8a65(0x15f)][0x0]);return{..._0x19d842,'children':_0x2bc5db[_0x3f8a65(0x15f)][_0x3f8a65(0x171)](0x1)[_0x3f8a65(0x183)](_0x5d0786=>_0x3f8bf9(_0x5d0786,_0x19d842['id']))};}return null;}let _0x4851af=class{constructor(_0x17bfa0,_0xd7f138,_0x3114dc,_0x555ef6){const _0x1540f2=_0x17094c;this['_httpService']=_0x17bfa0,this[_0x1540f2(0x145)]=_0xd7f138,this[_0x1540f2(0x14f)]=_0x3114dc,this[_0x1540f2(0x172)]=_0x555ef6;}async[_0x17094c(0x113)](_0x421f88){const _0x255a3c=_0x17094c;var _0x32fc19,_0x49e733;const {parentId:_0x5830a4,unitId:_0x279795,text:_0x576051,threadId:_0x4e1417}=_0x421f88,_0x416f6b=(_0x49e733=(_0x32fc19=_0x576051[_0x255a3c(0x11a)])==null?void 0x0:_0x32fc19[_0x255a3c(0x102)](_0x5e5999=>_0x5e5999[_0x255a3c(0x11b)]===_0x2f8dfc[_0x255a3c(0x14a)][_0x255a3c(0x153)])[_0x255a3c(0x183)](_0x4006de=>_0x4006de[_0x255a3c(0x178)]))!=null?_0x49e733:[],_0x558b6c=JSON[_0x255a3c(0x16c)](_0x576051),_0x4971db=(await this[_0x255a3c(0x14f)]['requireSession'](_0x279795))[_0x255a3c(0x188)]();if(_0x5830a4){const _0x27379a={'memberId':_0x4971db,'unitId':_0x279795,'content':_0x558b6c,'mention':_0x416f6b,'threadId':_0x4e1417},_0x1b825b=(await this['_httpService']['post'](_0x255a3c(0x159)+_0x279795+_0x255a3c(0x15e),{'body':_0x27379a}))[_0x255a3c(0x10b)][_0x255a3c(0x10a)];return{..._0x421f88,'id':_0x1b825b[_0x255a3c(0x177)],'dT':_0x460625(+_0x1b825b[_0x255a3c(0x120)])[_0x255a3c(0x17c)](_0x255a3c(0x14c)),'personId':_0x1b825b[_0x255a3c(0x13f)]};}else{const _0x5f1823={'memberId':_0x4971db,'unitId':_0x279795,'content':_0x558b6c,'mention':_0x416f6b},_0x121109=await this['_httpService']['post'](_0x255a3c(0x159)+_0x279795+_0x255a3c(0x137),{'body':_0x5f1823});return _0x3ce615(_0x121109[_0x255a3c(0x10b)][_0x255a3c(0x141)],_0x421f88);}}async[_0x17094c(0x100)](_0x9157d6){const _0x295bd0=_0x17094c;var _0x1d760c,_0x473913;const {text:_0x412edc,unitId:_0x1e1b6c}=_0x9157d6,_0x4db60d=(_0x473913=(_0x1d760c=_0x412edc[_0x295bd0(0x11a)])==null?void 0x0:_0x1d760c[_0x295bd0(0x102)](_0x2bfef2=>_0x2bfef2['rangeType']===_0x2f8dfc[_0x295bd0(0x14a)][_0x295bd0(0x153)])[_0x295bd0(0x183)](_0x3c0beb=>_0x3c0beb[_0x295bd0(0x178)]))!=null?_0x473913:[],_0x1723c4=JSON[_0x295bd0(0x16c)](_0x412edc),_0x4bf73d=_0x9157d6[_0x295bd0(0x15a)],_0x2ff47a=_0x9157d6['id'],_0x5a5e22={'memberId':(await this[_0x295bd0(0x14f)]['requireSession'](_0x1e1b6c))[_0x295bd0(0x188)](),'unitId':_0x1e1b6c,'threadId':_0x4bf73d,'mention':_0x4db60d,'content':_0x1723c4,'replyId':_0x2ff47a},_0x28cb67=await this[_0x295bd0(0x176)][_0x295bd0(0x17a)](_0x295bd0(0x159)+_0x1e1b6c+_0x295bd0(0x143),{'body':_0x5a5e22});return!_0x28cb67[_0x295bd0(0x10b)][_0x295bd0(0x10f)]||_0x28cb67[_0x295bd0(0x10b)][_0x295bd0(0x10f)]['code']===0x1;}async['resolveComment'](_0x37067b){const _0x5939be=_0x17094c,{unitId:_0x991f60}=_0x37067b,_0x4ef1d1=_0x37067b[_0x5939be(0x15a)],_0x694cf2={'memberId':this[_0x5939be(0x145)][_0x5939be(0xfb)]()[_0x5939be(0xfc)],'unitId':_0x991f60,'threadId':_0x4ef1d1,'solved':_0x37067b[_0x5939be(0x13b)]?_0x2d95cc[_0x5939be(0x17e)]:_0x2d95cc[_0x5939be(0x18b)]},_0x21dbcc=await this[_0x5939be(0x176)]['post'](_0x5939be(0x159)+_0x991f60+'/solved',{'body':_0x694cf2});return!_0x21dbcc[_0x5939be(0x10b)][_0x5939be(0x10f)]||_0x21dbcc['body']['error'][_0x5939be(0x144)]===0x1;}async[_0x17094c(0x14e)](_0x3f748e,_0x375b65,_0xdb279,_0x41d1a4){const _0x5d6efa=_0x17094c,_0x2525be={'memberId':(await this[_0x5d6efa(0x14f)][_0x5d6efa(0x10c)](_0x3f748e))[_0x5d6efa(0x188)](),'threadId':_0xdb279,'replyId':_0x41d1a4,'unitId':_0x3f748e},_0x28a358=await this['_httpService'][_0x5d6efa(0x17a)](_0x5d6efa(0x159)+_0x3f748e+_0x5d6efa(0x13c),{'body':_0x2525be});return!_0x28a358[_0x5d6efa(0x10b)][_0x5d6efa(0x10f)]||_0x28a358[_0x5d6efa(0x10b)]['error'][_0x5d6efa(0x144)]===0x1;}async[_0x17094c(0x152)](_0x971b75,_0xc3272d,_0x55e76c){const _0x387e14=_0x17094c,_0x5b2acc={'unitId':_0x971b75,'threadId':_0x55e76c},_0x580b27=await this[_0x387e14(0x176)][_0x387e14(0x17a)]('/universer-api/comment/unit/'+_0x971b75+_0x387e14(0xfe),{'body':_0x5b2acc}),_0x5ead10=_0x55e76c[_0x387e14(0x183)](_0x25d59e=>_0x55a5a6(_0x580b27[_0x387e14(0x10b)]['comments'][_0x25d59e],_0x971b75,_0xc3272d))['filter'](Boolean);return Object['values'](_0x580b27['body']['users'])[_0x387e14(0x185)](_0x377e12=>{const _0x223437=_0x387e14;this[_0x223437(0x145)]['addUser'](_0x377e12);}),_0x5ead10;}['saveCommentToSnapshot'](_0xc105b0){const _0x575ae8=_0x17094c;return{'id':_0xc105b0['id'],'threadId':_0xc105b0[_0x575ae8(0x15a)],'ref':_0xc105b0[_0x575ae8(0xfd)]};}};_0x4851af=_0x395ce1([_0x18a7d9(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x98bdec[_0x17094c(0x155)])),_0x18a7d9(0x1,_0x2f8dfc['Inject'](_0x2f8dfc[_0x17094c(0x14b)])),_0x18a7d9(0x2,_0x2f8dfc[_0x17094c(0x116)](_0x354310[_0x17094c(0x12d)])),_0x18a7d9(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)]))],_0x4851af);var _0x98df18=Object[_0x17094c(0x147)],_0xf6a991=Object['getOwnPropertyDescriptor'],_0x4d47d5=(_0x32a395,_0x33b436,_0x5386a6,_0x3837b2)=>{const _0x14f9f8=_0x17094c;for(var _0x5473f7=_0x3837b2>0x1?void 0x0:_0x3837b2?_0xf6a991(_0x33b436,_0x5386a6):_0x33b436,_0x458406=_0x32a395[_0x14f9f8(0x16e)]-0x1,_0x55a69d;_0x458406>=0x0;_0x458406--)(_0x55a69d=_0x32a395[_0x458406])&&(_0x5473f7=(_0x3837b2?_0x55a69d(_0x33b436,_0x5386a6,_0x5473f7):_0x55a69d(_0x5473f7))||_0x5473f7);return _0x3837b2&&_0x5473f7&&_0x98df18(_0x33b436,_0x5386a6,_0x5473f7),_0x5473f7;},_0x4d3475=(_0x33041d,_0x153a31)=>(_0x495c72,_0x3e856f)=>_0x153a31(_0x495c72,_0x3e856f,_0x33041d);let _0x43e2b7=class{constructor(_0x35271b){const _0x381cb7=_0x17094c;this[_0x381cb7(0x176)]=_0x35271b;}async[_0x17094c(0x148)](_0x1e5045,_0x5d07cb,_0x4de3ca){const _0x25d0e4=_0x17094c,_0x589aec=new URL(window['location'][_0x25d0e4(0x10e)])[_0x25d0e4(0x114)]['get'](_0x25d0e4(0x149));if(!_0x589aec)return[];const _0x5d2457=window['location'][_0x25d0e4(0x182)],_0x39a9c4=window['location'][_0x25d0e4(0x160)]===_0x25d0e4(0x101)?_0x25d0e4(0x18a):_0x25d0e4(0x175);return(await this['_httpService'][_0x25d0e4(0x173)](_0x39a9c4+_0x25d0e4(0x140)+_0x5d2457+_0x25d0e4(0x158),{'params':{'objectID':_0x589aec,'unitID':_0x589aec}}))[_0x25d0e4(0x10b)]['collaborators'][_0x25d0e4(0x183)](_0x4aeffb=>{const _0x17b416=_0x25d0e4;var _0xfd8929,_0x320491,_0x2ff8e4,_0x318123,_0x254230,_0x2df42f;return{'id':(_0x320491=(_0xfd8929=_0x4aeffb['subject'])==null?void 0x0:_0xfd8929[_0x17b416(0xfc)])!=null?_0x320491:'','label':(_0x318123=(_0x2ff8e4=_0x4aeffb[_0x17b416(0x129)])==null?void 0x0:_0x2ff8e4[_0x17b416(0x132)])!=null?_0x318123:'','icon':(_0x2df42f=(_0x254230=_0x4aeffb['subject'])==null?void 0x0:_0x254230['avatar'])!=null?_0x2df42f:'','type':_0x17b416(0x11f)};});}};_0x43e2b7=_0x4d47d5([_0x4d3475(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x98bdec['HTTPService']))],_0x43e2b7);var _0x494236=Object[_0x17094c(0x147)],_0x5c6e76=Object[_0x17094c(0x17f)],_0x4c3795=(_0x470cf0,_0xc05c00,_0x41a88b,_0x515f16)=>{const _0x2ce0bc=_0x17094c;for(var _0x470d21=_0x515f16>0x1?void 0x0:_0x515f16?_0x5c6e76(_0xc05c00,_0x41a88b):_0xc05c00,_0x23b51a=_0x470cf0[_0x2ce0bc(0x16e)]-0x1,_0x483708;_0x23b51a>=0x0;_0x23b51a--)(_0x483708=_0x470cf0[_0x23b51a])&&(_0x470d21=(_0x515f16?_0x483708(_0xc05c00,_0x41a88b,_0x470d21):_0x483708(_0x470d21))||_0x470d21);return _0x515f16&&_0x470d21&&_0x494236(_0xc05c00,_0x41a88b,_0x470d21),_0x470d21;},_0x3f38be=(_0x61a94a,_0x568f56)=>(_0x5056b1,_0x418fdf)=>_0x568f56(_0x5056b1,_0x418fdf,_0x61a94a);let _0x2a1206=class extends _0x2f8dfc[_0x17094c(0x18c)]{constructor(_0x327058,_0x4ddf68,_0x52f602,_0x1ec06f){const _0x1af0a2=_0x17094c;super(),this[_0x1af0a2(0x163)]=_0x327058,this[_0x1af0a2(0x111)]=_0x4ddf68,this['_threadCommentMentionDataService']=_0x52f602,this[_0x1af0a2(0x130)]=_0x1ec06f,this[_0x1af0a2(0x127)]();}[_0x17094c(0x127)](){const _0x1abcce=_0x17094c;this[_0x1abcce(0x163)][_0x1abcce(0x105)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1abcce(0x107)]=!0x1,this[_0x1abcce(0x12c)]['dataSource']=this[_0x1abcce(0x130)];}};_0x2a1206=_0x4c3795([_0x2f8dfc[_0x17094c(0x154)](_0x2f8dfc['LifecycleStages'][_0x17094c(0x12e)],_0x2a1206),_0x3f38be(0x0,_0x1e41b5[_0x17094c(0x164)]),_0x3f38be(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x4851af)),_0x3f38be(0x2,_0x403a44[_0x17094c(0x15d)]),_0x3f38be(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x43e2b7))],_0x2a1206);var _0x4a73b9=Object[_0x17094c(0x147)],_0x5c3794=Object[_0x17094c(0x17f)],_0xe972dc=(_0x5785a7,_0x4b76fd,_0xc709bc,_0x39a4f3)=>{const _0x52987b=_0x17094c;for(var _0x2abec6=_0x39a4f3>0x1?void 0x0:_0x39a4f3?_0x5c3794(_0x4b76fd,_0xc709bc):_0x4b76fd,_0x5f1686=_0x5785a7[_0x52987b(0x16e)]-0x1,_0xaa75c1;_0x5f1686>=0x0;_0x5f1686--)(_0xaa75c1=_0x5785a7[_0x5f1686])&&(_0x2abec6=(_0x39a4f3?_0xaa75c1(_0x4b76fd,_0xc709bc,_0x2abec6):_0xaa75c1(_0x2abec6))||_0x2abec6);return _0x39a4f3&&_0x2abec6&&_0x4a73b9(_0x4b76fd,_0xc709bc,_0x2abec6),_0x2abec6;},_0x168bd3=(_0x4a06ba,_0x1d5dd3)=>(_0x361a3b,_0x46a223)=>_0x1d5dd3(_0x361a3b,_0x46a223,_0x4a06ba);let _0x26b888=class extends _0x2f8dfc[_0x17094c(0x18c)]{constructor(_0x18e101,_0x21056a,_0x2f1a28,_0x1599ac){const _0x22398f=_0x17094c;super(),this[_0x22398f(0x184)]=_0x18e101,this['_threadCommentModel']=_0x21056a,this[_0x22398f(0x145)]=_0x2f1a28,this[_0x22398f(0x172)]=_0x1599ac,this[_0x22398f(0x124)](),this['_initUserSync']();}[_0x17094c(0x136)](){const _0x13109e=_0x17094c;this[_0x13109e(0x166)](this[_0x13109e(0x11d)][_0x13109e(0x16b)]['pipe'](_0x3f660d[_0x13109e(0x138)](0x10))[_0x13109e(0x13a)](_0x3b4cab=>{const _0xcedc97=_0x13109e,_0xc53499=new Set();_0x3b4cab['forEach'](_0x1db675=>{const _0x9de3ca=_0xb838;switch(_0x1db675[_0x9de3ca(0x112)]){case _0x9de3ca(0x13e):{const _0xe8d7bc=_0x1db675[_0x9de3ca(0x18d)]['personId'];_0xc53499['add'](_0xe8d7bc);break;}}}),_0x21f452(this[_0xcedc97(0x172)],_0xc53499);}));}['_init'](){const _0x544507=_0x17094c;this[_0x544507(0x166)](this['_commentService'][_0x544507(0x16b)][_0x544507(0x13a)](async _0x1594e5=>{const _0xc47650=_0x544507;var _0x145808,_0x53a1c1;const _0x5725f3=this[_0xc47650(0x11d)][_0xc47650(0x169)](_0x1594e5['unitId'],_0x1594e5['threadId']);if(!_0x5725f3)return;const {unitId:_0x19c4aa,subUnitId:_0x82f081}=_0x5725f3;switch(_0x1594e5[_0xc47650(0x11f)]&&this[_0xc47650(0x145)][_0xc47650(0x122)](_0x1594e5[_0xc47650(0x11f)]),_0x1594e5[_0xc47650(0x112)]){case _0x13fb68[_0xc47650(0x11e)]:break;case _0x13fb68[_0xc47650(0x125)]:{this[_0xc47650(0x11d)][_0xc47650(0x113)](_0x19c4aa,_0x82f081,{'unitId':_0x19c4aa,'subUnitId':_0x82f081,'ref':'','id':_0x1594e5[_0xc47650(0x177)],'dT':_0x3bbabd(+_0x1594e5[_0xc47650(0x120)]),'threadId':_0x1594e5[_0xc47650(0x15a)],'personId':(_0x53a1c1=(_0x145808=_0x1594e5['user'])==null?void 0x0:_0x145808[_0xc47650(0xfc)])!=null?_0x53a1c1:_0x1594e5[_0xc47650(0x13f)],'text':JSON[_0xc47650(0x16f)](_0x1594e5['content']),'parentId':_0x5725f3['id']});break;}case _0x13fb68['Delete']:{const _0x4e533f=this[_0xc47650(0x11d)]['getComment'](_0x19c4aa,_0x82f081,_0x1594e5['replyId']);_0x4e533f&&_0x4e533f[_0xc47650(0x118)]&&this[_0xc47650(0x11d)][_0xc47650(0x14e)](_0x19c4aa,_0x82f081,_0x1594e5[_0xc47650(0x177)]);break;}case _0x13fb68[_0xc47650(0x135)]:{this['_threadCommentModel'][_0xc47650(0x100)](_0x19c4aa,_0x82f081,{'commentId':_0x1594e5[_0xc47650(0x177)],'text':JSON[_0xc47650(0x16f)](_0x1594e5[_0xc47650(0x165)])});break;}case _0x13fb68[_0xc47650(0x142)]:{const _0x30e169=this['_threadCommentModel'][_0xc47650(0x169)](_0x19c4aa,_0x1594e5[_0xc47650(0x15a)]);_0x30e169&&this[_0xc47650(0x11d)]['resolveComment'](_0x19c4aa,_0x82f081,_0x30e169['id'],_0x1594e5['solved']===_0x2d95cc[_0xc47650(0x17e)]);break;}}}));}};_0x26b888=_0xe972dc([_0x2f8dfc[_0x17094c(0x154)](_0x2f8dfc[_0x17094c(0x18e)]['Ready'],_0x26b888),_0x168bd3(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x354310[_0x17094c(0x12f)])),_0x168bd3(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x1e41b5[_0x17094c(0x104)])),_0x168bd3(0x2,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x14b)])),_0x168bd3(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)]))],_0x26b888);const _0x4895a5=_0x17094c(0x181),_0x4729d6={};var _0x419c73=Object[_0x17094c(0x147)],_0x561cca=Object[_0x17094c(0x17f)],_0x3f3fa2=(_0x516804,_0xd93909,_0x15e32e)=>_0xd93909 in _0x516804?_0x419c73(_0x516804,_0xd93909,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15e32e}):_0x516804[_0xd93909]=_0x15e32e,_0x599226=(_0x2038de,_0x371610,_0x517f75,_0x178d56)=>{const _0x1e61a3=_0x17094c;for(var _0x5870f4=_0x178d56>0x1?void 0x0:_0x178d56?_0x561cca(_0x371610,_0x517f75):_0x371610,_0xb0edf0=_0x2038de[_0x1e61a3(0x16e)]-0x1,_0x1d9a02;_0xb0edf0>=0x0;_0xb0edf0--)(_0x1d9a02=_0x2038de[_0xb0edf0])&&(_0x5870f4=(_0x178d56?_0x1d9a02(_0x371610,_0x517f75,_0x5870f4):_0x1d9a02(_0x5870f4))||_0x5870f4);return _0x178d56&&_0x5870f4&&_0x419c73(_0x371610,_0x517f75,_0x5870f4),_0x5870f4;},_0x27a95a=(_0x3877f1,_0x11f81b)=>(_0x183022,_0x4c0a43)=>_0x11f81b(_0x183022,_0x4c0a43,_0x3877f1),_0x219808=(_0x5e7a2c,_0x4d5421,_0x41ada8)=>_0x3f3fa2(_0x5e7a2c,typeof _0x4d5421!=_0x17094c(0x119)?_0x4d5421+'':_0x4d5421,_0x41ada8);_0x28ff37['UniverThreadCommentDataSourcePlugin']=class extends _0x2f8dfc['Plugin']{constructor(_0x3dc7c1=_0x4729d6,_0x28602d,_0x58b021){const _0x5998bd=_0x17094c;super(),this[_0x5998bd(0x157)]=_0x3dc7c1,this[_0x5998bd(0x172)]=_0x28602d,this[_0x5998bd(0x109)]=_0x58b021;const {..._0x34e9e6}=this[_0x5998bd(0x157)];this[_0x5998bd(0x109)][_0x5998bd(0x134)](_0x4895a5,_0x34e9e6);}[_0x17094c(0x13d)](){const _0x6d190c=_0x17094c;[[_0x43e2b7],[_0x4851af],[_0x2a1206],[_0x26b888]][_0x6d190c(0x185)](_0x1f3572=>{const _0xa27f38=_0x6d190c;this[_0xa27f38(0x172)][_0xa27f38(0x13e)](_0x1f3572);});}},_0x219808(_0x28ff37[_0x17094c(0x16d)],_0x17094c(0x12a),_0x40cf9a),_0x219808(_0x28ff37[_0x17094c(0x16d)],_0x17094c(0x112),_0x2f8dfc[_0x17094c(0x187)][_0x17094c(0x16a)]),_0x28ff37[_0x17094c(0x16d)]=_0x599226([_0x2f8dfc[_0x17094c(0x139)](_0x1e41b5[_0x17094c(0x17d)],_0x403a44['UniverThreadCommentUIPlugin'],_0x354310[_0x17094c(0x170)]),_0x27a95a(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)])),_0x27a95a(0x2,_0x2f8dfc[_0x17094c(0x117)])],_0x28ff37['UniverThreadCommentDataSourcePlugin']),Object[_0x17094c(0x147)](_0x28ff37,Symbol['toStringTag'],{'value':_0x17094c(0x128)});}));function _0xb838(_0x4fad82,_0x193ad5){const _0x34eacb=_0x34ea();return _0xb838=function(_0xb83829,_0xf65a9e){_0xb83829=_0xb83829-0xfb;let _0xb25501=_0x34eacb[_0xb83829];return _0xb25501;},_0xb838(_0x4fad82,_0x193ad5);}function _0x34ea(){const _0x8e8250=['Injector','https','OpenOrReOpen','Disposable','payload','LifecycleStages','544445umdrsw','getCurrentUser','userID','ref','/list','dayjs','updateComment','https:','filter','users','ThreadCommentModel','dataSource','UNRECOGNIZED','syncUpdateMutationToColla','@univerjs-pro/collaboration-client','_configService','reply','body','requireSession','function','href','error','delete','_threadCommentDataSource','type','addComment','searchParams','Unknown','Inject','IConfigService','parentId','symbol','customRanges','rangeType','@univerjs/thread-comment-ui','_threadCommentModel','Add','user','createTimestamp','@univerjs/network','addUser','exports','_init','Reply','Delete','_initDataSource','Module','subject','pluginName','24yxPgMl','_threadCommentMentionDataService','CollaborationSessionService','Starting','CommentService','_threadCommentMentionDataSource','452059XmmYYO','name','object','setConfig','Edit','_initUserSync','/add','bufferTime','DependentOn','subscribe','resolved','/delete','onStarting','add','userId','://','comment','Solve','/edit','code','_userService','UniverCollaborationClient','defineProperty','getMentions','unit','CustomRangeType','UserManagerService','YYYY/MM/DD\x20HH:mm','1042134ZWDacG','deleteComment','_sessionService','UniverNetwork','913cddXxQ','listComments','COMMENT','OnLifecycle','HTTPService','85620GTjrkh','_config','/universer-api/authz/collaborator','/universer-api/comment/unit/','threadId','size','rxjs','IThreadCommentMentionDataService','/reply','replies','protocol','3GhCdJn','8904TloJKl','_threadCommentDataSourceService','IThreadCommentDataSourceService','content','disposeWithMe','1473414AvEMBc','@univerjs/thread-comment','getThread','UNIVER_UNKNOWN','commentUpdate$','stringify','UniverThreadCommentDataSourcePlugin','length','parse','UniverCollaborationClientPlugin','slice','_injector','get','@univerjs/core','http','_httpService','replyId','rangeId','5806782HaDqQo','post','solved','format','UniverThreadCommentPlugin','Solved','getOwnPropertyDescriptor','2191RENyoG','thread-comment-data-source.config','host','map','_commentService','forEach','getUser','UniverInstanceType','getMemberID'];_0x34ea=function(){return _0x8e8250;};return _0x34ea();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,26 +45,26 @@
45
45
  "peerDependencies": {
46
46
  "dayjs": ">=1.11.0",
47
47
  "rxjs": ">=7.0.0",
48
- "@univerjs/core": "0.2.13",
49
- "@univerjs-pro/collaboration-client": "0.2.13",
50
- "@univerjs/network": "0.2.13",
51
- "@univerjs/thread-comment-ui": "0.2.13",
52
- "@univerjs/thread-comment": "0.2.13"
48
+ "@univerjs-pro/collaboration-client": "0.2.15",
49
+ "@univerjs/core": "0.2.15",
50
+ "@univerjs/network": "0.2.15",
51
+ "@univerjs/thread-comment": "0.2.15",
52
+ "@univerjs/thread-comment-ui": "0.2.15"
53
53
  },
54
54
  "dependencies": {
55
55
  "dayjs": "^1.11.13",
56
- "@univerjs-pro/facade": "0.2.13",
57
- "@univerjs/uniscript": "0.2.13",
56
+ "@univerjs-pro/facade": "0.2.15",
57
+ "@univerjs/core": "0.2.15",
58
58
  "@univerjs/protocol": "0.1.39-alpha.15",
59
- "@univerjs/core": "0.2.13",
60
- "@univerjs/network": "0.2.13"
59
+ "@univerjs/uniscript": "0.2.15",
60
+ "@univerjs/network": "0.2.15"
61
61
  },
62
62
  "devDependencies": {
63
63
  "rxjs": "^7.8.1",
64
64
  "typescript": "^5.6.2",
65
- "vite": "^5.4.3",
66
- "vitest": "^2.0.5",
67
- "@univerjs-infra/shared": "0.2.13"
65
+ "vite": "^5.4.5",
66
+ "vitest": "^2.1.0",
67
+ "@univerjs-infra/shared": "0.2.15"
68
68
  },
69
69
  "univerSpace": {
70
70
  ".": {