@univerjs-pro/thread-comment-datasource 0.25.1 → 1.0.0-alpha.1

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
- const _0x4c6b37=_0x31d6;(function(_0x50dc1c,_0xc6eb47){const _0x2a8cfc=_0x31d6,_0x1fed79=_0x50dc1c();while(!![]){try{const _0x18a1b9=-parseInt(_0x2a8cfc(0x13a))/0x1*(-parseInt(_0x2a8cfc(0x18b))/0x2)+parseInt(_0x2a8cfc(0x11f))/0x3+parseInt(_0x2a8cfc(0x11d))/0x4+-parseInt(_0x2a8cfc(0x152))/0x5*(parseInt(_0x2a8cfc(0x113))/0x6)+-parseInt(_0x2a8cfc(0x16f))/0x7+-parseInt(_0x2a8cfc(0x129))/0x8*(-parseInt(_0x2a8cfc(0x11c))/0x9)+parseInt(_0x2a8cfc(0x150))/0xa*(parseInt(_0x2a8cfc(0x15f))/0xb);if(_0x18a1b9===_0xc6eb47)break;else _0x1fed79['push'](_0x1fed79['shift']());}catch(_0x45e02c){_0x1fed79['push'](_0x1fed79['shift']());}}}(_0x30a1,0x66179),Object['defineProperty'](exports,Symbol[_0x4c6b37(0x164)],{'value':_0x4c6b37(0x126)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');var c=_0x4c6b37(0x116),l='0.25.1';const u=_0x54c3a8=>(0x0,n[_0x4c6b37(0x14d)])(new Date(+_0x54c3a8))[_0x4c6b37(0x131)](_0x4c6b37(0x171)),d=async(_0x3c770f,_0xab6e5b)=>{const _0x2b25bb=_0x4c6b37;let _0xd15b92=_0x3c770f['get'](n[_0x2b25bb(0x128)]),_0x373b04=_0x3c770f['get'](s[_0x2b25bb(0x144)]);_0xab6e5b[_0x2b25bb(0x16d)](_0x4b9cab=>{const _0xae46d2=_0x2b25bb;_0xd15b92[_0xae46d2(0x121)](_0x4b9cab)&&_0xab6e5b[_0xae46d2(0x17d)](_0x4b9cab);}),_0xab6e5b[_0x2b25bb(0x139)]&&(await _0x373b04[_0x2b25bb(0x15c)](_0x2b25bb(0x173),{'params':{'userIDs':[..._0xab6e5b]}}))[_0x2b25bb(0x125)][_0x2b25bb(0x130)][_0x2b25bb(0x16d)](_0x40c518=>{_0x40c518&&_0xd15b92['addUser'](_0x40c518);});};function f(_0x32daae,_0x34a6ff){return function(_0x20ff42,_0x53c656){_0x34a6ff(_0x20ff42,_0x53c656,_0x32daae);};}function p(_0x4df889,_0x54e9d2,_0x52be09,_0x4a0dc8){const _0x16f40e=_0x4c6b37;var _0x3a45c1=arguments[_0x16f40e(0x141)],_0x562038=_0x3a45c1<0x3?_0x54e9d2:_0x4a0dc8===null?_0x4a0dc8=Object[_0x16f40e(0x158)](_0x54e9d2,_0x52be09):_0x4a0dc8,_0x5c85e3;if(typeof Reflect=='object'&&typeof Reflect[_0x16f40e(0x138)]==_0x16f40e(0x15d))_0x562038=Reflect[_0x16f40e(0x138)](_0x4df889,_0x54e9d2,_0x52be09,_0x4a0dc8);else{for(var _0x2787e8=_0x4df889[_0x16f40e(0x141)]-0x1;_0x2787e8>=0x0;_0x2787e8--)(_0x5c85e3=_0x4df889[_0x2787e8])&&(_0x562038=(_0x3a45c1<0x3?_0x5c85e3(_0x562038):_0x3a45c1>0x3?_0x5c85e3(_0x54e9d2,_0x52be09,_0x562038):_0x5c85e3(_0x54e9d2,_0x52be09))||_0x562038);}return _0x3a45c1>0x3&&_0x562038&&Object[_0x16f40e(0x177)](_0x54e9d2,_0x52be09,_0x562038),_0x562038;}let m=class extends n['Disposable']{constructor(_0x10611d,_0x22675d,_0x316936,_0xb4718){const _0x4f8b90=_0x4c6b37;super(),this[_0x4f8b90(0x16b)]=_0x10611d,this[_0x4f8b90(0x13f)]=_0x22675d,this[_0x4f8b90(0x157)]=_0x316936,this[_0x4f8b90(0x14e)]=_0xb4718,this[_0x4f8b90(0x16e)](),this['_initUserSync']();}[_0x4c6b37(0x188)](){const _0x492932=_0x4c6b37;this[_0x492932(0x12b)](this[_0x492932(0x13f)][_0x492932(0x174)]['pipe']((0x0,o['bufferTime'])(0x10))[_0x492932(0x12e)](_0x516f87=>{const _0x46f4ab=_0x492932;let _0x48272b=new Set();_0x516f87[_0x46f4ab(0x16d)](_0x38942c=>{const _0x2d7990=_0x46f4ab;switch(_0x38942c[_0x2d7990(0x146)]){case _0x2d7990(0x185):{let _0xdb24ad=_0x38942c[_0x2d7990(0x182)]['personId'];_0x48272b[_0x2d7990(0x185)](_0xdb24ad);break;}default:break;}}),d(this[_0x46f4ab(0x14e)],_0x48272b);}));}[_0x4c6b37(0x16e)](){const _0x5e6bad=_0x4c6b37;this[_0x5e6bad(0x12b)](this[_0x5e6bad(0x16b)][_0x5e6bad(0x174)][_0x5e6bad(0x12e)](async _0x30d660=>{const _0x3cfdc9=_0x5e6bad;var _0x49df9e;let _0x4d15c7=(_0x49df9e=this[_0x3cfdc9(0x13f)][_0x3cfdc9(0x10e)](_0x30d660[_0x3cfdc9(0x114)])[_0x3cfdc9(0x13d)](_0x5e8582=>_0x5e8582['threadId']===_0x30d660[_0x3cfdc9(0x12c)]))==null?void 0x0:_0x49df9e['root'];if(!_0x4d15c7)return;let {unitId:_0x367c83,subUnitId:_0x437fde}=_0x4d15c7;switch(_0x30d660[_0x3cfdc9(0x17a)]&&this[_0x3cfdc9(0x157)]['addUser'](_0x30d660['user']),_0x30d660['type']){case i['CommentUpdateEventType'][_0x3cfdc9(0x160)]:break;case i[_0x3cfdc9(0x178)][_0x3cfdc9(0x176)]:var _0x14dadd,_0x23ec22;this['_threadCommentModel'][_0x3cfdc9(0x135)](_0x367c83,_0x437fde,{'unitId':_0x367c83,'subUnitId':_0x437fde,'ref':'','id':_0x30d660[_0x3cfdc9(0x11a)],'dT':u(+_0x30d660['createTimestamp']),'threadId':_0x30d660[_0x3cfdc9(0x12c)],'personId':(_0x14dadd=(_0x23ec22=_0x30d660[_0x3cfdc9(0x17a)])==null?void 0x0:_0x23ec22[_0x3cfdc9(0x18c)])==null?_0x30d660[_0x3cfdc9(0x15a)]:_0x14dadd,'text':JSON['parse'](_0x30d660['content']),'parentId':_0x4d15c7['id']});break;case i['CommentUpdateEventType'][_0x3cfdc9(0x17f)]:{let _0x201e23=this[_0x3cfdc9(0x13f)][_0x3cfdc9(0x187)](_0x367c83,_0x437fde,_0x30d660[_0x3cfdc9(0x11a)]);_0x201e23&&_0x201e23[_0x3cfdc9(0x14b)]&&this['_threadCommentModel'][_0x3cfdc9(0x13c)](_0x367c83,_0x437fde,_0x30d660['replyId']);break;}case i[_0x3cfdc9(0x178)][_0x3cfdc9(0x15e)]:this['_threadCommentModel'][_0x3cfdc9(0x154)](_0x367c83,_0x437fde,{'commentId':_0x30d660[_0x3cfdc9(0x11a)],'text':JSON['parse'](_0x30d660[_0x3cfdc9(0x191)])});break;case i[_0x3cfdc9(0x178)][_0x3cfdc9(0x151)]:{var _0x14fba5;let _0x52a42b=(_0x14fba5=this[_0x3cfdc9(0x13f)][_0x3cfdc9(0x10e)](_0x30d660[_0x3cfdc9(0x114)])['find'](_0x23db13=>_0x23db13[_0x3cfdc9(0x12c)]===_0x30d660[_0x3cfdc9(0x12c)]))==null?void 0x0:_0x14fba5[_0x3cfdc9(0x120)];_0x52a42b&&this[_0x3cfdc9(0x13f)]['resolveComment'](_0x367c83,_0x437fde,_0x52a42b['id'],_0x30d660['solved']===i[_0x3cfdc9(0x14f)][_0x3cfdc9(0x12d)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x4c6b37(0x10d)])(e['CommentService'])),f(0x1,(0x0,n[_0x4c6b37(0x10d)])(a[_0x4c6b37(0x13b)])),f(0x2,(0x0,n[_0x4c6b37(0x10d)])(n['UserManagerService'])),f(0x3,(0x0,n[_0x4c6b37(0x10d)])(n[_0x4c6b37(0x168)]))],m);const h={};function g(_0x1b037b,_0x3d2e85){const _0xd2eb9f=_0x4c6b37;let _0x5b7d70=_0x1b037b['replies'][0x0];return{..._0x3d2e85,'id':_0x5b7d70[_0xd2eb9f(0x11a)],'resolved':_0x1b037b[_0xd2eb9f(0x15b)]===0x1,'dT':u(_0x5b7d70[_0xd2eb9f(0x12f)]),'personId':_0x5b7d70[_0xd2eb9f(0x15a)],'threadId':_0x5b7d70[_0xd2eb9f(0x12c)]};}function _(_0x490504,_0x5ce6ab,_0x40a729){const _0x3d7298=_0x4c6b37;var _0x15f1b3,_0x2b66b9;if(((_0x15f1b3=_0x490504==null||(_0x2b66b9=_0x490504['replies'])==null?void 0x0:_0x2b66b9[_0x3d7298(0x141)])==null?0x0:_0x15f1b3)>0x0){let _0x52a09f=(_0x16e326,_0x3b2c72)=>({'id':_0x16e326[_0x3d7298(0x11a)],'threadId':_0x16e326[_0x3d7298(0x12c)],'dT':u(_0x16e326['createTimestamp']),'personId':_0x16e326['userId'],'resolved':_0x490504[_0x3d7298(0x15b)]===i[_0x3d7298(0x14f)][_0x3d7298(0x12d)],'unitId':_0x5ce6ab,'subUnitId':_0x40a729,'text':JSON[_0x3d7298(0x137)](_0x16e326[_0x3d7298(0x191)]),'parentId':_0x3b2c72}),_0x48fc33=_0x52a09f(_0x490504['replies'][0x0]);return{..._0x48fc33,'children':_0x490504[_0x3d7298(0x18f)][_0x3d7298(0x16a)](0x1)[_0x3d7298(0x10f)](_0x5464b4=>_0x52a09f(_0x5464b4,_0x48fc33['id']))};}return null;}let v=class{constructor(_0x58c12f,_0x310d2a,_0x475335){const _0x1c076c=_0x4c6b37;this[_0x1c076c(0x175)]=_0x58c12f,this[_0x1c076c(0x157)]=_0x310d2a,this[_0x1c076c(0x110)]=_0x475335;}async['addComment'](_0x4d2b5a){const _0x1a6826=_0x4c6b37;var _0x201bc7,_0x5085ea;let {parentId:_0x3adde0,unitId:_0x5b202c,text:_0x23cc8e,threadId:_0x575bf9}=_0x4d2b5a,_0x2061ff=(_0x201bc7=(_0x5085ea=_0x23cc8e['customRanges'])==null?void 0x0:_0x5085ea[_0x1a6826(0x180)](_0x4376f0=>_0x4376f0[_0x1a6826(0x140)]===n[_0x1a6826(0x149)][_0x1a6826(0x190)])[_0x1a6826(0x10f)](_0x4a298a=>_0x4a298a[_0x1a6826(0x12a)]))==null?[]:_0x201bc7,_0xb64b17=JSON[_0x1a6826(0x10b)](_0x23cc8e),_0x5a7a5f=(await this[_0x1a6826(0x110)][_0x1a6826(0x18d)](_0x5b202c))[_0x1a6826(0x186)]();if(_0x3adde0){let _0x263888={'memberId':_0x5a7a5f,'unitId':_0x5b202c,'content':_0xb64b17,'mention':_0x2061ff,'threadId':_0x575bf9},_0x1d0580=(await this[_0x1a6826(0x175)][_0x1a6826(0x145)](_0x1a6826(0x118)+_0x5b202c+_0x1a6826(0x134),{'body':_0x263888}))[_0x1a6826(0x125)][_0x1a6826(0x189)];return{..._0x4d2b5a,'id':_0x1d0580[_0x1a6826(0x11a)],'dT':(0x0,n['dateKit'])(+_0x1d0580[_0x1a6826(0x12f)])['format'](_0x1a6826(0x171)),'personId':_0x1d0580[_0x1a6826(0x15a)]};}else{let _0x440797={'memberId':_0x5a7a5f,'unitId':_0x5b202c,'content':_0xb64b17,'mention':_0x2061ff};return g((await this[_0x1a6826(0x175)]['post'](_0x1a6826(0x118)+_0x5b202c+_0x1a6826(0x170),{'body':_0x440797}))[_0x1a6826(0x125)][_0x1a6826(0x153)],_0x4d2b5a);}}async[_0x4c6b37(0x154)](_0x168dd8){const _0x528ad1=_0x4c6b37;var _0x4253ee,_0x485074;let {text:_0xe40a3f,unitId:_0xfcb3b5}=_0x168dd8,_0x295aed=(_0x4253ee=(_0x485074=_0xe40a3f['customRanges'])==null?void 0x0:_0x485074[_0x528ad1(0x180)](_0x1e0a18=>_0x1e0a18['rangeType']===n[_0x528ad1(0x149)][_0x528ad1(0x190)])[_0x528ad1(0x10f)](_0xdc6167=>_0xdc6167[_0x528ad1(0x12a)]))==null?[]:_0x4253ee,_0x465977=JSON[_0x528ad1(0x10b)](_0xe40a3f),_0x28284a=_0x168dd8['threadId'],_0x4f2d20=_0x168dd8['id'],_0x559a30={'memberId':(await this[_0x528ad1(0x110)][_0x528ad1(0x18d)](_0xfcb3b5))[_0x528ad1(0x186)](),'unitId':_0xfcb3b5,'threadId':_0x28284a,'mention':_0x295aed,'content':_0x465977,'replyId':_0x4f2d20},_0x467e0f=await this[_0x528ad1(0x175)][_0x528ad1(0x145)](_0x528ad1(0x118)+_0xfcb3b5+_0x528ad1(0x123),{'body':_0x559a30});return!_0x467e0f[_0x528ad1(0x125)][_0x528ad1(0x10c)]||_0x467e0f['body'][_0x528ad1(0x10c)][_0x528ad1(0x111)]===0x1;}async[_0x4c6b37(0x147)](_0xbc89fb){const _0x310762=_0x4c6b37;let {unitId:_0x3683b9}=_0xbc89fb,_0x329521=_0xbc89fb[_0x310762(0x12c)],_0x537ca2={'memberId':this[_0x310762(0x157)][_0x310762(0x133)]()[_0x310762(0x18c)],'unitId':_0x3683b9,'threadId':_0x329521,'solved':_0xbc89fb['resolved']?i[_0x310762(0x14f)][_0x310762(0x12d)]:i['CommentSolvedStatus'][_0x310762(0x117)]},_0x3ab45a=await this[_0x310762(0x175)][_0x310762(0x145)](_0x310762(0x118)+_0x3683b9+_0x310762(0x14a),{'body':_0x537ca2});return!_0x3ab45a[_0x310762(0x125)][_0x310762(0x10c)]||_0x3ab45a[_0x310762(0x125)][_0x310762(0x10c)]['code']===0x1;}async[_0x4c6b37(0x13c)](_0x3e95cb,_0x4f727e,_0x39d10f,_0x51513e){const _0x2690b6=_0x4c6b37;let _0x3eb6a7={'memberId':(await this[_0x2690b6(0x110)][_0x2690b6(0x18d)](_0x3e95cb))[_0x2690b6(0x186)](),'threadId':_0x39d10f,'replyId':_0x51513e,'unitId':_0x3e95cb},_0x34d12f=await this[_0x2690b6(0x175)][_0x2690b6(0x145)](_0x2690b6(0x118)+_0x3e95cb+_0x2690b6(0x148),{'body':_0x3eb6a7});return!_0x34d12f[_0x2690b6(0x125)]['error']||_0x34d12f[_0x2690b6(0x125)]['error'][_0x2690b6(0x111)]===0x1;}async[_0x4c6b37(0x132)](_0x1e37c1,_0x14c082,_0x711abd){const _0x1be11e=_0x4c6b37;let _0x37a442={'unitId':_0x1e37c1,'threadId':_0x711abd},_0x3d3a9b=await this[_0x1be11e(0x175)][_0x1be11e(0x145)](_0x1be11e(0x118)+_0x1e37c1+_0x1be11e(0x136),{'body':_0x37a442}),_0x198d5d=_0x711abd['map'](_0x3342aa=>_(_0x3d3a9b[_0x1be11e(0x125)]['comments'][_0x3342aa],_0x1e37c1,_0x14c082))[_0x1be11e(0x180)](Boolean);return Object[_0x1be11e(0x184)](_0x3d3a9b[_0x1be11e(0x125)][_0x1be11e(0x130)])['forEach'](_0x2f87c4=>{const _0x2c83b2=_0x1be11e;this[_0x2c83b2(0x157)]['addUser'](_0x2f87c4);}),_0x198d5d;}[_0x4c6b37(0x124)](_0x1b3bbe){const _0x16cd08=_0x4c6b37;return{'id':_0x1b3bbe['id'],'threadId':_0x1b3bbe[_0x16cd08(0x12c)],'ref':_0x1b3bbe[_0x16cd08(0x11b)]};}};v=p([f(0x0,(0x0,n['Inject'])(s[_0x4c6b37(0x144)])),f(0x1,(0x0,n['Inject'])(n[_0x4c6b37(0x128)])),f(0x2,(0x0,n[_0x4c6b37(0x10d)])(e[_0x4c6b37(0x163)]))],v);let y=class extends n[_0x4c6b37(0x16c)]{constructor(_0x205747,_0x47a867){const _0x1bdeae=_0x4c6b37;super(),this[_0x1bdeae(0x169)]=_0x205747,this['_threadCommentDataSource']=_0x47a867,this['_initDataSource']();}['_initDataSource'](){const _0x25c13b=_0x4c6b37;this[_0x25c13b(0x169)][_0x25c13b(0x166)]=this[_0x25c13b(0x119)],this[_0x25c13b(0x169)][_0x25c13b(0x13e)]=!0x1;}};y=p([f(0x0,a[_0x4c6b37(0x127)]),f(0x1,(0x0,n['Inject'])(v))],y);function b(_0x69d4a7){'@babel/helpers - typeof';const _0x36c815=_0x4c6b37;return b=typeof Symbol==_0x36c815(0x15d)&&typeof Symbol[_0x36c815(0x143)]=='symbol'?function(_0x582a87){return typeof _0x582a87;}:function(_0x245bc6){const _0xf620fd=_0x36c815;return _0x245bc6&&typeof Symbol==_0xf620fd(0x15d)&&_0x245bc6[_0xf620fd(0x115)]===Symbol&&_0x245bc6!==Symbol[_0xf620fd(0x179)]?_0xf620fd(0x11e):typeof _0x245bc6;},b(_0x69d4a7);}function x(_0x49ce75,_0x4ddbb5){const _0x102e5a=_0x4c6b37;if(b(_0x49ce75)!=_0x102e5a(0x181)||!_0x49ce75)return _0x49ce75;var _0xefc069=_0x49ce75[Symbol[_0x102e5a(0x155)]];if(_0xefc069!==void 0x0){var _0x5580c4=_0xefc069[_0x102e5a(0x18a)](_0x49ce75,_0x4ddbb5||_0x102e5a(0x14c));if(b(_0x5580c4)!='object')return _0x5580c4;throw TypeError(_0x102e5a(0x165));}return(_0x4ddbb5===_0x102e5a(0x159)?String:Number)(_0x49ce75);}function S(_0x104980){var _0x5f22ce=x(_0x104980,'string');return b(_0x5f22ce)=='symbol'?_0x5f22ce:_0x5f22ce+'';}function C(_0x5e98ad,_0x1a8632,_0x26b432){const _0x49c1e2=_0x4c6b37;return(_0x1a8632=S(_0x1a8632))in _0x5e98ad?Object[_0x49c1e2(0x177)](_0x5e98ad,_0x1a8632,{'value':_0x26b432,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5e98ad[_0x1a8632]=_0x26b432,_0x5e98ad;}function _0x31d6(_0x2540e5,_0x455136){_0x2540e5=_0x2540e5-0x10b;const _0x30a12e=_0x30a1();let _0x31d6af=_0x30a12e[_0x2540e5];return _0x31d6af;}function _0x30a1(){const _0xe3124f=['getOwnPropertyDescriptor','string','userId','solved','get','function','Edit','3968591HFesKW','Add','UniverThreadCommentUIPlugin','version','CollaborationSessionService','toStringTag','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','dataSource','merge','Injector','_threadCommentDataSourceService','slice','_commentService','Disposable','forEach','_init','4434808VoZuri','/add','YYYY/MM/DD\x20HH:mm','Plugin','/universer-api/user/list','commentUpdate$','_httpService','Reply','defineProperty','CommentUpdateEventType','prototype','user','IConfigService','DependentOn','delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','filter','object','payload','_config','values','add','getMemberID','getComment','_initUserSync','reply','call','911042EBIpek','userID','requireSession','UniverThreadCommentDataSourcePlugin','replies','COMMENT','content','stringify','error','Inject','getUnit','map','_sessionService','code','UniverCollaborationClientPlugin','4258830ZRoyGx','unitId','constructor','@univerjs-pro/thread-comment-datasource','OpenOrReOpen','/universer-api/comment/unit/','_threadCommentDataSource','replyId','ref','1350CuutTZ','134208lBIsep','symbol','445656ZRLKYR','root','getUser','setConfig','/edit','saveCommentToSnapshot','body','Module','IThreadCommentDataSourceService','UserManagerService','2216lhQhxL','rangeId','disposeWithMe','threadId','Solved','subscribe','createTimestamp','users','format','listComments','getCurrentUser','/reply','addComment','/list','parse','decorate','size','1nEtJOc','ThreadCommentModel','deleteComment','find','syncUpdateMutationToColla','_threadCommentModel','rangeType','length','packageName','iterator','HTTPService','post','type','resolveComment','/delete','CustomRangeType','/solved','parentId','default','dateKit','_injector','CommentSolvedStatus','30NXnRHs','Solve','5CIvvQE','comment','updateComment','toPrimitive','_configService','_userService'];_0x30a1=function(){return _0xe3124f;};return _0x30a1();}let w=class extends n[_0x4c6b37(0x172)]{constructor(_0x4c63b3=h,_0x46b423,_0x35cf0b){const _0x350b2a=_0x4c6b37;super(),this[_0x350b2a(0x183)]=_0x4c63b3,this[_0x350b2a(0x14e)]=_0x46b423,this[_0x350b2a(0x156)]=_0x35cf0b;let {..._0xf2a53d}=(0x0,n[_0x350b2a(0x167)])({},h,this[_0x350b2a(0x183)]);this[_0x350b2a(0x156)][_0x350b2a(0x122)]('thread-comment-data-source.config',_0xf2a53d);}['onStarting'](){[[v],[y],[m]]['forEach'](_0x517658=>{const _0x154f47=_0x31d6;this[_0x154f47(0x14e)][_0x154f47(0x185)](_0x517658);});}['onReady'](){const _0x4fa94e=_0x4c6b37;this[_0x4fa94e(0x14e)][_0x4fa94e(0x15c)](y),this[_0x4fa94e(0x14e)][_0x4fa94e(0x15c)](m);}};C(w,'pluginName',_0x4c6b37(0x17e)),C(w,_0x4c6b37(0x142),c),C(w,_0x4c6b37(0x162),l),w=p([(0x0,n[_0x4c6b37(0x17c)])(r[_0x4c6b37(0x161)],e[_0x4c6b37(0x112)],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x4c6b37(0x10d)])(n[_0x4c6b37(0x168)])),f(0x2,n[_0x4c6b37(0x17b)])],w),Object[_0x4c6b37(0x177)](exports,_0x4c6b37(0x18e),{'enumerable':!0x0,'get':function(){return w;}});
1
+ const _0x1e471b=_0x4310;function _0x1e8f(){const _0x29d2ff=['add','536qpmEjc','filter','_initUserSync','createTimestamp','52lpyEPQ','personId','COMMENT','function','UserManagerService','resolveComment','get','slice','string','comments','pipe','_httpService','toStringTag','CommentUpdateEventType','pluginName','size','15OdWAWP','saveCommentToSnapshot','5961680HDdUxr','375935AMGOtb','_commentService','payload','IConfigService','getComment','symbol','/universer-api/comment/unit/','threadId','replies','23191BVAiFZ','type','length','defineProperty','merge','_sessionService','constructor','requireSession','ThreadCommentModel','Solve','decorate','forEach','replyId','version','userId','_config','1626957YanHGz','37338GcOKAj','CommentSolvedStatus','syncUpdateMutationToColla','UniverThreadCommentDataSourcePlugin','root','_init','HTTPService','dataSource','Plugin','stringify','onStarting','_threadCommentModel','addComment','IThreadCommentDataSourceService','6483YwLuIT','reply','body','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UniverCollaborationClientPlugin','listComments','DependentOn','unitId','dateKit','/edit','customRanges','_threadCommentDataSource','addUser','deleteComment','code','Disposable','parentId','content','CollaborationSessionService','/delete','/list','error','updateComment','Injector','find','getCurrentUser','Module','toPrimitive','call','OpenOrReOpen','_injector','getMemberID','980244KSgwnR','post','UniverThreadCommentUIPlugin','user','/solved','Inject','getUnit','default','format','users','solved','_configService','_initDataSource','1.0.0-alpha.1','setConfig','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','userID','Edit','ref','onReady','map','object','Solved','_userService','rangeType','parse','commentUpdate$','disposeWithMe','CustomRangeType'];_0x1e8f=function(){return _0x29d2ff;};return _0x1e8f();}(function(_0x36a7fa,_0x3b5f25){const _0x471af3=_0x4310,_0x1758ba=_0x36a7fa();while(!![]){try{const _0x4dbfae=-parseInt(_0x471af3(0x11a))/0x1+parseInt(_0x471af3(0x134))/0x2+parseInt(_0x471af3(0x142))/0x3*(parseInt(_0x471af3(0x107))/0x4)+-parseInt(_0x471af3(0x117))/0x5*(-parseInt(_0x471af3(0xe4))/0x6)+-parseInt(_0x471af3(0x123))/0x7*(parseInt(_0x471af3(0x103))/0x8)+-parseInt(_0x471af3(0x133))/0x9+parseInt(_0x471af3(0x119))/0xa;if(_0x4dbfae===_0x3b5f25)break;else _0x1758ba['push'](_0x1758ba['shift']());}catch(_0x183556){_0x1758ba['push'](_0x1758ba['shift']());}}}(_0x1e8f,0x56845),Object[_0x1e471b(0x126)](exports,Symbol[_0x1e471b(0x113)],{'value':_0x1e471b(0xde)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');function _0x4310(_0x146c74,_0x115503){_0x146c74=_0x146c74-0xc8;const _0x1e8fc8=_0x1e8f();let _0x43109b=_0x1e8fc8[_0x146c74];return _0x43109b;}var c='@univerjs-pro/thread-comment-datasource',l=_0x1e471b(0xf1);const u=_0x177f2b=>(0x0,n[_0x1e471b(0xcc)])(new Date(+_0x177f2b))[_0x1e471b(0xec)](_0x1e471b(0xf3)),d=async(_0x3a4f52,_0x522637)=>{const _0x2c9838=_0x1e471b;let _0x4c4fde=_0x3a4f52[_0x2c9838(0x10d)](n['UserManagerService']),_0x5d80b3=_0x3a4f52[_0x2c9838(0x10d)](s[_0x2c9838(0x13a)]);_0x522637[_0x2c9838(0x12e)](_0xa03cd4=>{_0x4c4fde['getUser'](_0xa03cd4)&&_0x522637['delete'](_0xa03cd4);}),_0x522637[_0x2c9838(0x116)]&&(await _0x5d80b3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x522637]}}))['body'][_0x2c9838(0xed)]['forEach'](_0x2e3021=>{const _0x7bc311=_0x2c9838;_0x2e3021&&_0x4c4fde[_0x7bc311(0xd0)](_0x2e3021);});};function f(_0x4a2e0a,_0x13589e){return function(_0x48419c,_0x5a883d){_0x13589e(_0x48419c,_0x5a883d,_0x4a2e0a);};}function p(_0x3c07d3,_0x3913bf,_0x5d901f,_0x3e1eac){const _0xa4d4e7=_0x1e471b;var _0x3d794a=arguments['length'],_0x49e39b=_0x3d794a<0x3?_0x3913bf:_0x3e1eac===null?_0x3e1eac=Object['getOwnPropertyDescriptor'](_0x3913bf,_0x5d901f):_0x3e1eac,_0x38084d;if(typeof Reflect==_0xa4d4e7(0xfa)&&typeof Reflect[_0xa4d4e7(0x12d)]==_0xa4d4e7(0x10a))_0x49e39b=Reflect[_0xa4d4e7(0x12d)](_0x3c07d3,_0x3913bf,_0x5d901f,_0x3e1eac);else{for(var _0x5bd8fb=_0x3c07d3[_0xa4d4e7(0x125)]-0x1;_0x5bd8fb>=0x0;_0x5bd8fb--)(_0x38084d=_0x3c07d3[_0x5bd8fb])&&(_0x49e39b=(_0x3d794a<0x3?_0x38084d(_0x49e39b):_0x3d794a>0x3?_0x38084d(_0x3913bf,_0x5d901f,_0x49e39b):_0x38084d(_0x3913bf,_0x5d901f))||_0x49e39b);}return _0x3d794a>0x3&&_0x49e39b&&Object[_0xa4d4e7(0x126)](_0x3913bf,_0x5d901f,_0x49e39b),_0x49e39b;}let m=class extends n[_0x1e471b(0xd3)]{constructor(_0x6670cf,_0x54945b,_0x5f5d64,_0x453217){const _0x2cf7f8=_0x1e471b;super(),this[_0x2cf7f8(0x11b)]=_0x6670cf,this[_0x2cf7f8(0x13f)]=_0x54945b,this['_userService']=_0x5f5d64,this[_0x2cf7f8(0xe2)]=_0x453217,this[_0x2cf7f8(0x139)](),this[_0x2cf7f8(0x105)]();}[_0x1e471b(0x105)](){const _0x2de9e1=_0x1e471b;this['disposeWithMe'](this[_0x2de9e1(0x13f)]['commentUpdate$'][_0x2de9e1(0x111)]((0x0,o['bufferTime'])(0x10))['subscribe'](_0x12f29e=>{const _0x41ec16=_0x2de9e1;let _0x19248f=new Set();_0x12f29e[_0x41ec16(0x12e)](_0x36daf5=>{const _0x454598=_0x41ec16;switch(_0x36daf5[_0x454598(0x124)]){case _0x454598(0x102):{let _0x48e85b=_0x36daf5[_0x454598(0x11c)][_0x454598(0x108)];_0x19248f[_0x454598(0x102)](_0x48e85b);break;}default:break;}}),d(this['_injector'],_0x19248f);}));}[_0x1e471b(0x139)](){const _0x2e8d73=_0x1e471b;this[_0x2e8d73(0x100)](this[_0x2e8d73(0x11b)][_0x2e8d73(0xff)]['subscribe'](async _0xf63bef=>{const _0x531b25=_0x2e8d73;var _0x425452;let _0x8e6875=(_0x425452=this['_threadCommentModel'][_0x531b25(0xea)](_0xf63bef[_0x531b25(0xcb)])[_0x531b25(0xdc)](_0x509a96=>_0x509a96[_0x531b25(0x121)]===_0xf63bef[_0x531b25(0x121)]))==null?void 0x0:_0x425452[_0x531b25(0x138)];if(!_0x8e6875)return;let {unitId:_0x45fcfc,subUnitId:_0x1dd4a3}=_0x8e6875;switch(_0xf63bef[_0x531b25(0xe7)]&&this[_0x531b25(0xfc)][_0x531b25(0xd0)](_0xf63bef[_0x531b25(0xe7)]),_0xf63bef[_0x531b25(0x124)]){case i['CommentUpdateEventType']['Add']:break;case i[_0x531b25(0x114)]['Reply']:var _0x3f7521,_0x401bc0;this['_threadCommentModel'][_0x531b25(0x140)](_0x45fcfc,_0x1dd4a3,{'unitId':_0x45fcfc,'subUnitId':_0x1dd4a3,'ref':'','id':_0xf63bef[_0x531b25(0x12f)],'dT':u(+_0xf63bef[_0x531b25(0x106)]),'threadId':_0xf63bef[_0x531b25(0x121)],'personId':(_0x3f7521=(_0x401bc0=_0xf63bef['user'])==null?void 0x0:_0x401bc0[_0x531b25(0xf5)])==null?_0xf63bef[_0x531b25(0x131)]:_0x3f7521,'text':JSON[_0x531b25(0xfe)](_0xf63bef[_0x531b25(0xd5)]),'parentId':_0x8e6875['id']});break;case i[_0x531b25(0x114)]['Delete']:{let _0xcdc09d=this['_threadCommentModel'][_0x531b25(0x11e)](_0x45fcfc,_0x1dd4a3,_0xf63bef['replyId']);_0xcdc09d&&_0xcdc09d[_0x531b25(0xd4)]&&this[_0x531b25(0x13f)][_0x531b25(0xd1)](_0x45fcfc,_0x1dd4a3,_0xf63bef['replyId']);break;}case i[_0x531b25(0x114)][_0x531b25(0xf6)]:this[_0x531b25(0x13f)][_0x531b25(0xda)](_0x45fcfc,_0x1dd4a3,{'commentId':_0xf63bef[_0x531b25(0x12f)],'text':JSON['parse'](_0xf63bef[_0x531b25(0xd5)])});break;case i['CommentUpdateEventType'][_0x531b25(0x12c)]:{var _0x39ef67;let _0x9fbb90=(_0x39ef67=this[_0x531b25(0x13f)][_0x531b25(0xea)](_0xf63bef[_0x531b25(0xcb)])[_0x531b25(0xdc)](_0x358a21=>_0x358a21[_0x531b25(0x121)]===_0xf63bef[_0x531b25(0x121)]))==null?void 0x0:_0x39ef67[_0x531b25(0x138)];_0x9fbb90&&this['_threadCommentModel'][_0x531b25(0x10c)](_0x45fcfc,_0x1dd4a3,_0x9fbb90['id'],_0xf63bef[_0x531b25(0xee)]===i[_0x531b25(0x135)][_0x531b25(0xfb)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x1e471b(0xe9)])(e['CommentService'])),f(0x1,(0x0,n[_0x1e471b(0xe9)])(a[_0x1e471b(0x12b)])),f(0x2,(0x0,n[_0x1e471b(0xe9)])(n['UserManagerService'])),f(0x3,(0x0,n[_0x1e471b(0xe9)])(n[_0x1e471b(0xdb)]))],m);const h={};function g(_0x367897,_0x1e5f64){const _0x5901a0=_0x1e471b;let _0x14a42f=_0x367897['replies'][0x0];return{..._0x1e5f64,'id':_0x14a42f['replyId'],'resolved':_0x367897[_0x5901a0(0xee)]===0x1,'dT':u(_0x14a42f[_0x5901a0(0x106)]),'personId':_0x14a42f[_0x5901a0(0x131)],'threadId':_0x14a42f[_0x5901a0(0x121)]};}function _(_0x5090d8,_0x8a9f06,_0x38e498){const _0xb5e5c8=_0x1e471b;var _0x56ed10,_0x26fa46;if(((_0x56ed10=_0x5090d8==null||(_0x26fa46=_0x5090d8[_0xb5e5c8(0x122)])==null?void 0x0:_0x26fa46[_0xb5e5c8(0x125)])==null?0x0:_0x56ed10)>0x0){let _0x424988=(_0x2f7e10,_0x342469)=>({'id':_0x2f7e10[_0xb5e5c8(0x12f)],'threadId':_0x2f7e10[_0xb5e5c8(0x121)],'dT':u(_0x2f7e10[_0xb5e5c8(0x106)]),'personId':_0x2f7e10[_0xb5e5c8(0x131)],'resolved':_0x5090d8[_0xb5e5c8(0xee)]===i[_0xb5e5c8(0x135)][_0xb5e5c8(0xfb)],'unitId':_0x8a9f06,'subUnitId':_0x38e498,'text':JSON[_0xb5e5c8(0xfe)](_0x2f7e10['content']),'parentId':_0x342469}),_0x4dc022=_0x424988(_0x5090d8[_0xb5e5c8(0x122)][0x0]);return{..._0x4dc022,'children':_0x5090d8[_0xb5e5c8(0x122)][_0xb5e5c8(0x10e)](0x1)[_0xb5e5c8(0xf9)](_0x273e87=>_0x424988(_0x273e87,_0x4dc022['id']))};}return null;}let v=class{constructor(_0x302d1c,_0x2c8eef,_0x22b355){const _0x23ebac=_0x1e471b;this[_0x23ebac(0x112)]=_0x302d1c,this['_userService']=_0x2c8eef,this['_sessionService']=_0x22b355;}async['addComment'](_0x368aa2){const _0x3c91e2=_0x1e471b;var _0x1a1cee,_0x499601;let {parentId:_0x17169b,unitId:_0x3282e9,text:_0x351446,threadId:_0x940a5e}=_0x368aa2,_0xecfdb1=(_0x1a1cee=(_0x499601=_0x351446[_0x3c91e2(0xce)])==null?void 0x0:_0x499601[_0x3c91e2(0x104)](_0x4507b5=>_0x4507b5[_0x3c91e2(0xfd)]===n['CustomRangeType'][_0x3c91e2(0x109)])['map'](_0x3c8073=>_0x3c8073['rangeId']))==null?[]:_0x1a1cee,_0x19f776=JSON[_0x3c91e2(0x13d)](_0x351446),_0xc20af6=(await this[_0x3c91e2(0x128)][_0x3c91e2(0x12a)](_0x3282e9))[_0x3c91e2(0xe3)]();if(_0x17169b){let _0x1f8ad8={'memberId':_0xc20af6,'unitId':_0x3282e9,'content':_0x19f776,'mention':_0xecfdb1,'threadId':_0x940a5e},_0x31da6d=(await this['_httpService'][_0x3c91e2(0xe5)](_0x3c91e2(0x120)+_0x3282e9+'/reply',{'body':_0x1f8ad8}))[_0x3c91e2(0x144)][_0x3c91e2(0x143)];return{..._0x368aa2,'id':_0x31da6d[_0x3c91e2(0x12f)],'dT':(0x0,n[_0x3c91e2(0xcc)])(+_0x31da6d[_0x3c91e2(0x106)])['format'](_0x3c91e2(0xf3)),'personId':_0x31da6d[_0x3c91e2(0x131)]};}else{let _0x249d90={'memberId':_0xc20af6,'unitId':_0x3282e9,'content':_0x19f776,'mention':_0xecfdb1};return g((await this[_0x3c91e2(0x112)][_0x3c91e2(0xe5)](_0x3c91e2(0x120)+_0x3282e9+'/add',{'body':_0x249d90}))['body']['comment'],_0x368aa2);}}async[_0x1e471b(0xda)](_0xa739e2){const _0x2f305b=_0x1e471b;var _0x191190,_0x268e8b;let {text:_0x31e078,unitId:_0x228bba}=_0xa739e2,_0x26746c=(_0x191190=(_0x268e8b=_0x31e078[_0x2f305b(0xce)])==null?void 0x0:_0x268e8b[_0x2f305b(0x104)](_0x5d7c3c=>_0x5d7c3c[_0x2f305b(0xfd)]===n[_0x2f305b(0x101)][_0x2f305b(0x109)])[_0x2f305b(0xf9)](_0x4661ed=>_0x4661ed['rangeId']))==null?[]:_0x191190,_0x5cd3cc=JSON['stringify'](_0x31e078),_0x53c384=_0xa739e2[_0x2f305b(0x121)],_0x10adaf=_0xa739e2['id'],_0x42d46a={'memberId':(await this[_0x2f305b(0x128)]['requireSession'](_0x228bba))[_0x2f305b(0xe3)](),'unitId':_0x228bba,'threadId':_0x53c384,'mention':_0x26746c,'content':_0x5cd3cc,'replyId':_0x10adaf},_0x4ecfab=await this[_0x2f305b(0x112)][_0x2f305b(0xe5)](_0x2f305b(0x120)+_0x228bba+_0x2f305b(0xcd),{'body':_0x42d46a});return!_0x4ecfab[_0x2f305b(0x144)][_0x2f305b(0xd9)]||_0x4ecfab[_0x2f305b(0x144)][_0x2f305b(0xd9)][_0x2f305b(0xd2)]===0x1;}async[_0x1e471b(0x10c)](_0x38c97f){const _0x1e1e21=_0x1e471b;let {unitId:_0x12d7ac}=_0x38c97f,_0x3fb898=_0x38c97f[_0x1e1e21(0x121)],_0x3938a3={'memberId':this[_0x1e1e21(0xfc)][_0x1e1e21(0xdd)]()['userID'],'unitId':_0x12d7ac,'threadId':_0x3fb898,'solved':_0x38c97f['resolved']?i[_0x1e1e21(0x135)][_0x1e1e21(0xfb)]:i['CommentSolvedStatus'][_0x1e1e21(0xe1)]},_0x4b5fbc=await this[_0x1e1e21(0x112)]['post'](_0x1e1e21(0x120)+_0x12d7ac+_0x1e1e21(0xe8),{'body':_0x3938a3});return!_0x4b5fbc[_0x1e1e21(0x144)][_0x1e1e21(0xd9)]||_0x4b5fbc['body']['error'][_0x1e1e21(0xd2)]===0x1;}async[_0x1e471b(0xd1)](_0x4ac599,_0x152518,_0x1e2965,_0x1f422d){const _0x30d63c=_0x1e471b;let _0x51e649={'memberId':(await this['_sessionService'][_0x30d63c(0x12a)](_0x4ac599))[_0x30d63c(0xe3)](),'threadId':_0x1e2965,'replyId':_0x1f422d,'unitId':_0x4ac599},_0x20a481=await this[_0x30d63c(0x112)][_0x30d63c(0xe5)](_0x30d63c(0x120)+_0x4ac599+_0x30d63c(0xd7),{'body':_0x51e649});return!_0x20a481[_0x30d63c(0x144)][_0x30d63c(0xd9)]||_0x20a481[_0x30d63c(0x144)]['error'][_0x30d63c(0xd2)]===0x1;}async[_0x1e471b(0xc9)](_0x133ec3,_0x289a01,_0x4bfa7b){const _0x2e1fbc=_0x1e471b;let _0x4c6052={'unitId':_0x133ec3,'threadId':_0x4bfa7b},_0xea1fd8=await this['_httpService'][_0x2e1fbc(0xe5)]('/universer-api/comment/unit/'+_0x133ec3+_0x2e1fbc(0xd8),{'body':_0x4c6052}),_0x3048a0=_0x4bfa7b[_0x2e1fbc(0xf9)](_0x373c08=>_(_0xea1fd8[_0x2e1fbc(0x144)][_0x2e1fbc(0x110)][_0x373c08],_0x133ec3,_0x289a01))['filter'](Boolean);return Object['values'](_0xea1fd8['body']['users'])[_0x2e1fbc(0x12e)](_0x48cb1c=>{const _0x4ae511=_0x2e1fbc;this[_0x4ae511(0xfc)][_0x4ae511(0xd0)](_0x48cb1c);}),_0x3048a0;}[_0x1e471b(0x118)](_0x494f97){const _0x52878d=_0x1e471b;return{'id':_0x494f97['id'],'threadId':_0x494f97[_0x52878d(0x121)],'ref':_0x494f97[_0x52878d(0xf7)]};}};v=p([f(0x0,(0x0,n['Inject'])(s['HTTPService'])),f(0x1,(0x0,n[_0x1e471b(0xe9)])(n[_0x1e471b(0x10b)])),f(0x2,(0x0,n[_0x1e471b(0xe9)])(e[_0x1e471b(0xd6)]))],v);let y=class extends n[_0x1e471b(0xd3)]{constructor(_0x34c979,_0x1ba149){const _0x3bd011=_0x1e471b;super(),this[_0x3bd011(0xf4)]=_0x34c979,this[_0x3bd011(0xcf)]=_0x1ba149,this[_0x3bd011(0xf0)]();}['_initDataSource'](){const _0x48eb4e=_0x1e471b;this[_0x48eb4e(0xf4)][_0x48eb4e(0x13b)]=this['_threadCommentDataSource'],this[_0x48eb4e(0xf4)][_0x48eb4e(0x136)]=!0x1;}};y=p([f(0x0,a[_0x1e471b(0x141)]),f(0x1,(0x0,n[_0x1e471b(0xe9)])(v))],y);function b(_0x584aab){'@babel/helpers - typeof';const _0x216868=_0x1e471b;return b=typeof Symbol==_0x216868(0x10a)&&typeof Symbol['iterator']=='symbol'?function(_0x139f61){return typeof _0x139f61;}:function(_0x38415f){const _0x5204d2=_0x216868;return _0x38415f&&typeof Symbol=='function'&&_0x38415f[_0x5204d2(0x129)]===Symbol&&_0x38415f!==Symbol['prototype']?'symbol':typeof _0x38415f;},b(_0x584aab);}function x(_0x2ef6eb,_0x1d733c){const _0x4bf79f=_0x1e471b;if(b(_0x2ef6eb)!=_0x4bf79f(0xfa)||!_0x2ef6eb)return _0x2ef6eb;var _0x53867d=_0x2ef6eb[Symbol[_0x4bf79f(0xdf)]];if(_0x53867d!==void 0x0){var _0x563dc1=_0x53867d[_0x4bf79f(0xe0)](_0x2ef6eb,_0x1d733c||_0x4bf79f(0xeb));if(b(_0x563dc1)!=_0x4bf79f(0xfa))return _0x563dc1;throw TypeError(_0x4bf79f(0x145));}return(_0x1d733c===_0x4bf79f(0x10f)?String:Number)(_0x2ef6eb);}function S(_0x183f9f){const _0x3d642a=_0x1e471b;var _0x1a0835=x(_0x183f9f,_0x3d642a(0x10f));return b(_0x1a0835)==_0x3d642a(0x11f)?_0x1a0835:_0x1a0835+'';}function C(_0x3ed7ec,_0x53660c,_0x37a809){const _0xd09e11=_0x1e471b;return(_0x53660c=S(_0x53660c))in _0x3ed7ec?Object[_0xd09e11(0x126)](_0x3ed7ec,_0x53660c,{'value':_0x37a809,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ed7ec[_0x53660c]=_0x37a809,_0x3ed7ec;}let w=class extends n[_0x1e471b(0x13c)]{constructor(_0x595ac3=h,_0x1abe27,_0x33cc39){const _0x33eb62=_0x1e471b;super(),this[_0x33eb62(0x132)]=_0x595ac3,this[_0x33eb62(0xe2)]=_0x1abe27,this['_configService']=_0x33cc39;let {..._0x3e9094}=(0x0,n[_0x33eb62(0x127)])({},h,this[_0x33eb62(0x132)]);this[_0x33eb62(0xef)][_0x33eb62(0xf2)]('thread-comment-data-source.config',_0x3e9094);}[_0x1e471b(0x13e)](){[[v],[y],[m]]['forEach'](_0x3b5235=>{const _0x19b69f=_0x4310;this[_0x19b69f(0xe2)][_0x19b69f(0x102)](_0x3b5235);});}[_0x1e471b(0xf8)](){const _0x2f6ca8=_0x1e471b;this[_0x2f6ca8(0xe2)][_0x2f6ca8(0x10d)](y),this[_0x2f6ca8(0xe2)][_0x2f6ca8(0x10d)](m);}};C(w,_0x1e471b(0x115),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),C(w,'packageName',c),C(w,_0x1e471b(0x130),l),w=p([(0x0,n[_0x1e471b(0xca)])(r[_0x1e471b(0xe6)],e[_0x1e471b(0xc8)],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x1e471b(0xe9)])(n[_0x1e471b(0xdb)])),f(0x2,n[_0x1e471b(0x11d)])],w),Object['defineProperty'](exports,_0x1e471b(0x137),{'enumerable':!0x0,'get':function(){return w;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x24acd3=_0x39e8;(function(_0x2a93d6,_0x3a5e4b){const _0x2314c8=_0x39e8,_0x5c9a6c=_0x2a93d6();while(!![]){try{const _0x5c82ff=parseInt(_0x2314c8(0xa6))/0x1*(-parseInt(_0x2314c8(0xf2))/0x2)+-parseInt(_0x2314c8(0xab))/0x3+parseInt(_0x2314c8(0xbd))/0x4+-parseInt(_0x2314c8(0xfb))/0x5*(parseInt(_0x2314c8(0xa2))/0x6)+-parseInt(_0x2314c8(0xbb))/0x7*(-parseInt(_0x2314c8(0xaf))/0x8)+parseInt(_0x2314c8(0xb6))/0x9+parseInt(_0x2314c8(0xd8))/0xa;if(_0x5c82ff===_0x3a5e4b)break;else _0x5c9a6c['push'](_0x5c9a6c['shift']());}catch(_0x592f1a){_0x5c9a6c['push'](_0x5c9a6c['shift']());}}}(_0x54e5,0x205de));import{CollaborationSessionService as _0x549419,CommentService as _0x210ea5,UniverCollaborationClientPlugin as _0x47bbe9}from'@univerjs-pro/collaboration-client';function _0x39e8(_0x3a7771,_0x563b8e){_0x3a7771=_0x3a7771-0x92;const _0x54e582=_0x54e5();let _0x39e896=_0x54e582[_0x3a7771];return _0x39e896;}import{UniverLicensePlugin as _0x5ccbdc}from'@univerjs-pro/license';import{CustomRangeType as _0x55bffa,DependentOn as _0x4924db,Disposable as _0x342d50,IConfigService as _0x1812ba,Inject as _0x5da4f4,Injector as _0x536f47,Plugin as _0x31f5c5,UserManagerService as _0x45ef85,dateKit as _0x4abfbd,merge as _0x31c2fd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26a07e}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x4f3934,CommentUpdateEventType as _0x53a39d}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x448d8f,ThreadCommentModel as _0x3b0840}from'@univerjs/thread-comment';import{bufferTime as _0x306e76}from'rxjs';import{HTTPService as _0x4b97da}from'@univerjs/network';var x=_0x24acd3(0xc1),S=_0x24acd3(0xf5);const C=_0x291d0e=>_0x4abfbd(new Date(+_0x291d0e))[_0x24acd3(0xe6)](_0x24acd3(0xda)),w=async(_0x12b975,_0x5c229e)=>{const _0x7c3f2c=_0x24acd3;let _0x195174=_0x12b975['get'](_0x45ef85),_0x32b62d=_0x12b975[_0x7c3f2c(0xe5)](_0x4b97da);_0x5c229e['forEach'](_0x26510a=>{const _0x2d9438=_0x7c3f2c;_0x195174[_0x2d9438(0xf8)](_0x26510a)&&_0x5c229e['delete'](_0x26510a);}),_0x5c229e[_0x7c3f2c(0xdc)]&&(await _0x32b62d[_0x7c3f2c(0xe5)](_0x7c3f2c(0xf6),{'params':{'userIDs':[..._0x5c229e]}}))['body'][_0x7c3f2c(0xdb)][_0x7c3f2c(0x96)](_0x54a051=>{_0x54a051&&_0x195174['addUser'](_0x54a051);});};function T(_0x3f5c2c,_0x1d1bda){return function(_0x27ab11,_0x5d2b8d){_0x1d1bda(_0x27ab11,_0x5d2b8d,_0x3f5c2c);};}function E(_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf){const _0x3c62a8=_0x24acd3;var _0xcdd043=arguments[_0x3c62a8(0x94)],_0x32d010=_0xcdd043<0x3?_0x39d806:_0x17dfcf===null?_0x17dfcf=Object['getOwnPropertyDescriptor'](_0x39d806,_0xd72a11):_0x17dfcf,_0x510d0f;if(typeof Reflect==_0x3c62a8(0xb7)&&typeof Reflect[_0x3c62a8(0xee)]==_0x3c62a8(0xf4))_0x32d010=Reflect[_0x3c62a8(0xee)](_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf);else{for(var _0xb49db=_0x3b8efa[_0x3c62a8(0x94)]-0x1;_0xb49db>=0x0;_0xb49db--)(_0x510d0f=_0x3b8efa[_0xb49db])&&(_0x32d010=(_0xcdd043<0x3?_0x510d0f(_0x32d010):_0xcdd043>0x3?_0x510d0f(_0x39d806,_0xd72a11,_0x32d010):_0x510d0f(_0x39d806,_0xd72a11))||_0x32d010);}return _0xcdd043>0x3&&_0x32d010&&Object['defineProperty'](_0x39d806,_0xd72a11,_0x32d010),_0x32d010;}let D=class extends _0x342d50{constructor(_0x5d165f,_0x2bff6f,_0x773819,_0x6df37b){const _0xc08f54=_0x24acd3;super(),this[_0xc08f54(0xa1)]=_0x5d165f,this[_0xc08f54(0x9b)]=_0x2bff6f,this[_0xc08f54(0xd0)]=_0x773819,this['_injector']=_0x6df37b,this[_0xc08f54(0xa5)](),this[_0xc08f54(0xce)]();}[_0x24acd3(0xce)](){const _0x258172=_0x24acd3;this['disposeWithMe'](this[_0x258172(0x9b)]['commentUpdate$'][_0x258172(0xd1)](_0x306e76(0x10))[_0x258172(0xba)](_0x355dc7=>{const _0x39ae22=_0x258172;let _0x55d635=new Set();_0x355dc7[_0x39ae22(0x96)](_0x4cc324=>{const _0x1b923b=_0x39ae22;switch(_0x4cc324[_0x1b923b(0xcd)]){case _0x1b923b(0xe1):{let _0x20a06a=_0x4cc324[_0x1b923b(0xc3)][_0x1b923b(0xe7)];_0x55d635['add'](_0x20a06a);break;}default:break;}}),w(this[_0x39ae22(0xa3)],_0x55d635);}));}[_0x24acd3(0xa5)](){const _0x3b69aa=_0x24acd3;this[_0x3b69aa(0xe0)](this['_commentService'][_0x3b69aa(0xdf)][_0x3b69aa(0xba)](async _0x1d7362=>{const _0x42494a=_0x3b69aa;var _0x1d6c46;let _0x2aec70=(_0x1d6c46=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362[_0x42494a(0xd4)])['find'](_0xe9a3d6=>_0xe9a3d6[_0x42494a(0xb1)]===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x1d6c46[_0x42494a(0xb8)];if(!_0x2aec70)return;let {unitId:_0x4692b9,subUnitId:_0x56df8a}=_0x2aec70;switch(_0x1d7362['user']&&this['_userService'][_0x42494a(0xd5)](_0x1d7362['user']),_0x1d7362[_0x42494a(0xcd)]){case _0x53a39d['Add']:break;case _0x53a39d[_0x42494a(0xa8)]:var _0x1eaa59,_0x2d595b;this['_threadCommentModel'][_0x42494a(0xa0)](_0x4692b9,_0x56df8a,{'unitId':_0x4692b9,'subUnitId':_0x56df8a,'ref':'','id':_0x1d7362[_0x42494a(0xe4)],'dT':C(+_0x1d7362[_0x42494a(0xe2)]),'threadId':_0x1d7362[_0x42494a(0xb1)],'personId':(_0x1eaa59=(_0x2d595b=_0x1d7362[_0x42494a(0xbc)])==null?void 0x0:_0x2d595b['userID'])==null?_0x1d7362[_0x42494a(0x9d)]:_0x1eaa59,'text':JSON['parse'](_0x1d7362['content']),'parentId':_0x2aec70['id']});break;case _0x53a39d['Delete']:{let _0x5995c6=this[_0x42494a(0x9b)][_0x42494a(0xf9)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);_0x5995c6&&_0x5995c6[_0x42494a(0xc8)]&&this[_0x42494a(0x9b)][_0x42494a(0xd6)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);break;}case _0x53a39d[_0x42494a(0xec)]:this[_0x42494a(0x9b)][_0x42494a(0xef)](_0x4692b9,_0x56df8a,{'commentId':_0x1d7362[_0x42494a(0xe4)],'text':JSON[_0x42494a(0xde)](_0x1d7362[_0x42494a(0xc5)])});break;case _0x53a39d[_0x42494a(0xac)]:{var _0x130222;let _0x3a8a1f=(_0x130222=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362['unitId'])[_0x42494a(0xc9)](_0x2f5f2d=>_0x2f5f2d['threadId']===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x130222[_0x42494a(0xb8)];_0x3a8a1f&&this[_0x42494a(0x9b)][_0x42494a(0xc0)](_0x4692b9,_0x56df8a,_0x3a8a1f['id'],_0x1d7362[_0x42494a(0x95)]===_0x4f3934[_0x42494a(0xc2)]);break;}default:break;}}));}};D=E([T(0x0,_0x5da4f4(_0x210ea5)),T(0x1,_0x5da4f4(_0x3b0840)),T(0x2,_0x5da4f4(_0x45ef85)),T(0x3,_0x5da4f4(_0x536f47))],D);const O={};function k(_0x3d90b7,_0x1871aa){const _0xad39ce=_0x24acd3;let _0x53dc2d=_0x3d90b7[_0xad39ce(0xe8)][0x0];return{..._0x1871aa,'id':_0x53dc2d[_0xad39ce(0xe4)],'resolved':_0x3d90b7[_0xad39ce(0x95)]===0x1,'dT':C(_0x53dc2d[_0xad39ce(0xe2)]),'personId':_0x53dc2d[_0xad39ce(0x9d)],'threadId':_0x53dc2d[_0xad39ce(0xb1)]};}function A(_0x6b217b,_0x3df929,_0x1f19eb){const _0x35a93a=_0x24acd3;var _0x36d169,_0x41f264;if(((_0x36d169=_0x6b217b==null||(_0x41f264=_0x6b217b[_0x35a93a(0xe8)])==null?void 0x0:_0x41f264[_0x35a93a(0x94)])==null?0x0:_0x36d169)>0x0){let _0x1a2cd1=(_0x571c82,_0x51870b)=>({'id':_0x571c82['replyId'],'threadId':_0x571c82[_0x35a93a(0xb1)],'dT':C(_0x571c82[_0x35a93a(0xe2)]),'personId':_0x571c82[_0x35a93a(0x9d)],'resolved':_0x6b217b[_0x35a93a(0x95)]===_0x4f3934[_0x35a93a(0xc2)],'unitId':_0x3df929,'subUnitId':_0x1f19eb,'text':JSON[_0x35a93a(0xde)](_0x571c82[_0x35a93a(0xc5)]),'parentId':_0x51870b}),_0x3deb14=_0x1a2cd1(_0x6b217b[_0x35a93a(0xe8)][0x0]);return{..._0x3deb14,'children':_0x6b217b[_0x35a93a(0xe8)][_0x35a93a(0xc4)](0x1)[_0x35a93a(0xae)](_0x11ef58=>_0x1a2cd1(_0x11ef58,_0x3deb14['id']))};}return null;}function _0x54e5(){const _0x291d64=['resolveComment','@univerjs-pro/thread-comment-datasource','Solved','payload','slice','content','prototype','post','parentId','find','toPrimitive','thread-comment-data-source.config','_config','type','_initUserSync','comment','_userService','pipe','error','userID','unitId','addUser','deleteComment','_sessionService','2729650IZCrsf','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','users','size','string','parse','commentUpdate$','disposeWithMe','add','createTimestamp','constructor','replyId','get','format','personId','replies','symbol','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','customRanges','decorate','updateComment','/edit','rangeType','68462ezTOLe','COMMENT','function','0.25.1','/universer-api/user/list','getUnit','getUser','getComment','version','10xDAXSM','stringify','_initDataSource','OpenOrReOpen','length','solved','forEach','default','defineProperty','filter','/list','_threadCommentModel','call','userId','body','code','addComment','_commentService','502392ZiELDC','_injector','getMemberID','_init','7WNrAMk','iterator','Reply','saveCommentToSnapshot','/delete','581988RiDhoI','Solve','syncUpdateMutationToColla','map','1815640KzmUrH','rangeId','threadId','ref','_threadCommentDataSource','/reply','_threadCommentDataSourceService','752571mmrUtg','object','root','_configService','subscribe','7DxmBJg','user','600448bcBhdL','onStarting','requireSession'];_0x54e5=function(){return _0x291d64;};return _0x54e5();}let j=class{constructor(_0x200ec5,_0x4779c1,_0x3b55e4){const _0x48e10e=_0x24acd3;this[_0x48e10e(0xea)]=_0x200ec5,this[_0x48e10e(0xd0)]=_0x4779c1,this[_0x48e10e(0xd7)]=_0x3b55e4;}async[_0x24acd3(0xa0)](_0x3185a4){const _0x29185d=_0x24acd3;var _0x408b88,_0x592d01;let {parentId:_0x3785f9,unitId:_0x4a4570,text:_0x4d4cdb,threadId:_0x365890}=_0x3185a4,_0x4c0730=(_0x408b88=(_0x592d01=_0x4d4cdb['customRanges'])==null?void 0x0:_0x592d01[_0x29185d(0x99)](_0xaa1f4=>_0xaa1f4[_0x29185d(0xf1)]===_0x55bffa[_0x29185d(0xf3)])[_0x29185d(0xae)](_0x31784d=>_0x31784d[_0x29185d(0xb0)]))==null?[]:_0x408b88,_0x4a9488=JSON[_0x29185d(0xfc)](_0x4d4cdb),_0xc5dad9=(await this[_0x29185d(0xd7)][_0x29185d(0xbf)](_0x4a4570))['getMemberID']();if(_0x3785f9){let _0x3a55eb={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730,'threadId':_0x365890},_0x40f120=(await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+_0x29185d(0xb4),{'body':_0x3a55eb}))[_0x29185d(0x9e)]['reply'];return{..._0x3185a4,'id':_0x40f120[_0x29185d(0xe4)],'dT':_0x4abfbd(+_0x40f120[_0x29185d(0xe2)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x40f120[_0x29185d(0x9d)]};}else{let _0x2883fc={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730};return k((await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+'/add',{'body':_0x2883fc}))[_0x29185d(0x9e)][_0x29185d(0xcf)],_0x3185a4);}}async[_0x24acd3(0xef)](_0x533cb7){const _0xd153f7=_0x24acd3;var _0x558b51,_0x5ebd5d;let {text:_0x116f99,unitId:_0xba2143}=_0x533cb7,_0x2c8ad9=(_0x558b51=(_0x5ebd5d=_0x116f99[_0xd153f7(0xed)])==null?void 0x0:_0x5ebd5d[_0xd153f7(0x99)](_0x57d374=>_0x57d374[_0xd153f7(0xf1)]===_0x55bffa['COMMENT'])[_0xd153f7(0xae)](_0x426074=>_0x426074[_0xd153f7(0xb0)]))==null?[]:_0x558b51,_0x3faed3=JSON[_0xd153f7(0xfc)](_0x116f99),_0x3d03be=_0x533cb7[_0xd153f7(0xb1)],_0x322b41=_0x533cb7['id'],_0x552043={'memberId':(await this[_0xd153f7(0xd7)][_0xd153f7(0xbf)](_0xba2143))[_0xd153f7(0xa4)](),'unitId':_0xba2143,'threadId':_0x3d03be,'mention':_0x2c8ad9,'content':_0x3faed3,'replyId':_0x322b41},_0x30f023=await this[_0xd153f7(0xea)]['post'](_0xd153f7(0xd9)+_0xba2143+_0xd153f7(0xf0),{'body':_0x552043});return!_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)]||_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)][_0xd153f7(0x9f)]===0x1;}async[_0x24acd3(0xc0)](_0x30ad4f){const _0x1afcca=_0x24acd3;let {unitId:_0x44f50e}=_0x30ad4f,_0x4e435c=_0x30ad4f[_0x1afcca(0xb1)],_0x3adaa4={'memberId':this['_userService']['getCurrentUser']()[_0x1afcca(0xd3)],'unitId':_0x44f50e,'threadId':_0x4e435c,'solved':_0x30ad4f['resolved']?_0x4f3934[_0x1afcca(0xc2)]:_0x4f3934[_0x1afcca(0x93)]},_0x3e7a49=await this[_0x1afcca(0xea)][_0x1afcca(0xc7)](_0x1afcca(0xd9)+_0x44f50e+'/solved',{'body':_0x3adaa4});return!_0x3e7a49['body'][_0x1afcca(0xd2)]||_0x3e7a49['body'][_0x1afcca(0xd2)][_0x1afcca(0x9f)]===0x1;}async[_0x24acd3(0xd6)](_0x5ee32f,_0x448583,_0xc8e4f8,_0x26451f){const _0x33fc85=_0x24acd3;let _0x4d73d3={'memberId':(await this[_0x33fc85(0xd7)]['requireSession'](_0x5ee32f))['getMemberID'](),'threadId':_0xc8e4f8,'replyId':_0x26451f,'unitId':_0x5ee32f},_0x19fb06=await this[_0x33fc85(0xea)][_0x33fc85(0xc7)]('/universer-api/comment/unit/'+_0x5ee32f+_0x33fc85(0xaa),{'body':_0x4d73d3});return!_0x19fb06[_0x33fc85(0x9e)]['error']||_0x19fb06['body'][_0x33fc85(0xd2)]['code']===0x1;}async['listComments'](_0xad7b9,_0x59a0fd,_0x32bb0b){const _0x2b9c76=_0x24acd3;let _0x299530={'unitId':_0xad7b9,'threadId':_0x32bb0b},_0x5b42da=await this[_0x2b9c76(0xea)][_0x2b9c76(0xc7)](_0x2b9c76(0xd9)+_0xad7b9+_0x2b9c76(0x9a),{'body':_0x299530}),_0xa566de=_0x32bb0b[_0x2b9c76(0xae)](_0x574020=>A(_0x5b42da[_0x2b9c76(0x9e)]['comments'][_0x574020],_0xad7b9,_0x59a0fd))[_0x2b9c76(0x99)](Boolean);return Object['values'](_0x5b42da['body'][_0x2b9c76(0xdb)])['forEach'](_0x31939f=>{const _0x13461e=_0x2b9c76;this[_0x13461e(0xd0)][_0x13461e(0xd5)](_0x31939f);}),_0xa566de;}[_0x24acd3(0xa9)](_0x4c9a21){const _0x2d9b42=_0x24acd3;return{'id':_0x4c9a21['id'],'threadId':_0x4c9a21[_0x2d9b42(0xb1)],'ref':_0x4c9a21[_0x2d9b42(0xb2)]};}};j=E([T(0x0,_0x5da4f4(_0x4b97da)),T(0x1,_0x5da4f4(_0x45ef85)),T(0x2,_0x5da4f4(_0x549419))],j);let M=class extends _0x342d50{constructor(_0x1c5125,_0x3b1865){const _0x439b07=_0x24acd3;super(),this[_0x439b07(0xb5)]=_0x1c5125,this[_0x439b07(0xb3)]=_0x3b1865,this[_0x439b07(0x92)]();}[_0x24acd3(0x92)](){const _0x3cacf2=_0x24acd3;this[_0x3cacf2(0xb5)]['dataSource']=this['_threadCommentDataSource'],this[_0x3cacf2(0xb5)][_0x3cacf2(0xad)]=!0x1;}};M=E([T(0x0,_0x448d8f),T(0x1,_0x5da4f4(j))],M);function N(_0x3209ad){'@babel/helpers - typeof';const _0x408d7c=_0x24acd3;return N=typeof Symbol==_0x408d7c(0xf4)&&typeof Symbol[_0x408d7c(0xa7)]=='symbol'?function(_0x452f1c){return typeof _0x452f1c;}:function(_0x854b23){const _0x519483=_0x408d7c;return _0x854b23&&typeof Symbol==_0x519483(0xf4)&&_0x854b23[_0x519483(0xe3)]===Symbol&&_0x854b23!==Symbol[_0x519483(0xc6)]?'symbol':typeof _0x854b23;},N(_0x3209ad);}function P(_0xeb782,_0x2d8502){const _0x48f160=_0x24acd3;if(N(_0xeb782)!='object'||!_0xeb782)return _0xeb782;var _0x578782=_0xeb782[Symbol[_0x48f160(0xca)]];if(_0x578782!==void 0x0){var _0x5df045=_0x578782[_0x48f160(0x9c)](_0xeb782,_0x2d8502||_0x48f160(0x97));if(N(_0x5df045)!=_0x48f160(0xb7))return _0x5df045;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2d8502==='string'?String:Number)(_0xeb782);}function F(_0x5cd295){const _0x4b95d5=_0x24acd3;var _0x2928a9=P(_0x5cd295,_0x4b95d5(0xdd));return N(_0x2928a9)==_0x4b95d5(0xe9)?_0x2928a9:_0x2928a9+'';}function I(_0x1b0afa,_0x2d6d8c,_0x97eb01){const _0x16ef3=_0x24acd3;return(_0x2d6d8c=F(_0x2d6d8c))in _0x1b0afa?Object[_0x16ef3(0x98)](_0x1b0afa,_0x2d6d8c,{'value':_0x97eb01,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1b0afa[_0x2d6d8c]=_0x97eb01,_0x1b0afa;}let L=class extends _0x31f5c5{constructor(_0x542cc7=O,_0xb45a14,_0x1f3c7){const _0x3e5b0f=_0x24acd3;super(),this[_0x3e5b0f(0xcc)]=_0x542cc7,this[_0x3e5b0f(0xa3)]=_0xb45a14,this['_configService']=_0x1f3c7;let {..._0xdcf65e}=_0x31c2fd({},O,this[_0x3e5b0f(0xcc)]);this[_0x3e5b0f(0xb9)]['setConfig'](_0x3e5b0f(0xcb),_0xdcf65e);}[_0x24acd3(0xbe)](){const _0xb521c4=_0x24acd3;[[j],[M],[D]][_0xb521c4(0x96)](_0x6d6dda=>{const _0x48db2f=_0xb521c4;this[_0x48db2f(0xa3)][_0x48db2f(0xe1)](_0x6d6dda);});}['onReady'](){const _0x24a3b0=_0x24acd3;this['_injector'][_0x24a3b0(0xe5)](M),this[_0x24a3b0(0xa3)]['get'](D);}};I(L,'pluginName',_0x24acd3(0xeb)),I(L,'packageName',x),I(L,_0x24acd3(0xfa),S),L=E([_0x4924db(_0x26a07e,_0x47bbe9,_0x5ccbdc),T(0x1,_0x5da4f4(_0x536f47)),T(0x2,_0x1812ba)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ function _0x5863(){const _0x47dcd2=['getOwnPropertyDescriptor','/universer-api/comment/unit/','95iizQNo','addUser','content','1.0.0-alpha.1','_configService','commentUpdate$','_initDataSource','prototype','object','_threadCommentDataSourceService','rangeType','OpenOrReOpen','disposeWithMe','unitId','/delete','error','post','stringify','pipe','/edit','_threadCommentDataSource','8963235sUySJb','replyId','/add','Solve','saveCommentToSnapshot','_init','/reply','version','format','pluginName','createTimestamp','decorate','comments','addComment','filter','add','delete','_httpService','length','239271zxfzvb','find','deleteComment','getUnit','defineProperty','call','onReady','YYYY/MM/DD\x20HH:mm','_userService','dataSource','parentId','resolveComment','@univerjs-pro/thread-comment-datasource','get','parse','_injector','34iXmOzb','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','user','values','/universer-api/user/list','_sessionService','getCurrentUser','threadId','COMMENT','264668pFBOvM','comment','rangeId','requireSession','code','ref','symbol','48QItkQd','replies','function','solved','root','getComment','5888930GsMGfR','Delete','onStarting','_config','10030200xbmnDp','userID','customRanges','getMemberID','Solved','resolved','138761ywDOTr','listComments','setConfig','constructor','_threadCommentModel','personId','684060EsifXW','map','subscribe','string','toPrimitive','type','users','payload','userId','slice','/list','_commentService'];_0x5863=function(){return _0x47dcd2;};return _0x5863();}const _0xd15b79=_0x5542;(function(_0x123280,_0x478ef4){const _0x1b9fbe=_0x5542,_0x1c2850=_0x123280();while(!![]){try{const _0x23232c=-parseInt(_0x1b9fbe(0x11e))/0x1+parseInt(_0x1b9fbe(0x164))/0x2*(-parseInt(_0x1b9fbe(0x154))/0x3)+parseInt(_0x1b9fbe(0x16f))/0x4*(parseInt(_0x1b9fbe(0x12c))/0x5)+-parseInt(_0x1b9fbe(0x176))/0x6*(parseInt(_0x1b9fbe(0x118))/0x7)+parseInt(_0x1b9fbe(0x112))/0x8+parseInt(_0x1b9fbe(0x141))/0x9+-parseInt(_0x1b9fbe(0x10e))/0xa;if(_0x23232c===_0x478ef4)break;else _0x1c2850['push'](_0x1c2850['shift']());}catch(_0x2d44fb){_0x1c2850['push'](_0x1c2850['shift']());}}}(_0x5863,0xafa61));import{CollaborationSessionService as _0x5d52fa,CommentService as _0x25f6af,UniverCollaborationClientPlugin as _0x457666}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1afcd4}from'@univerjs-pro/license';function _0x5542(_0x4c9a49,_0x5d4972){_0x4c9a49=_0x4c9a49-0x10b;const _0x5863b3=_0x5863();let _0x55427b=_0x5863b3[_0x4c9a49];return _0x55427b;}import{CustomRangeType as _0x57416f,DependentOn as _0x2c6682,Disposable as _0x964a78,IConfigService as _0x5a4188,Inject as _0x5882d4,Injector as _0x43fc57,Plugin as _0x12c11e,UserManagerService as _0x3c2081,dateKit as _0x41cc06,merge as _0xa513a0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ab3d2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x377cc0,CommentUpdateEventType as _0x22b8b2}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x59905f,ThreadCommentModel as _0x51f282}from'@univerjs/thread-comment';import{bufferTime as _0x487a59}from'rxjs';import{HTTPService as _0x4965c2}from'@univerjs/network';var x=_0xd15b79(0x160),S=_0xd15b79(0x12f);const C=_0x21fb7c=>_0x41cc06(new Date(+_0x21fb7c))[_0xd15b79(0x149)]('YYYY/MM/DD\x20HH:mm'),w=async(_0x13db5e,_0x5327aa)=>{const _0x26961f=_0xd15b79;let _0x447f1d=_0x13db5e[_0x26961f(0x161)](_0x3c2081),_0x15807e=_0x13db5e['get'](_0x4965c2);_0x5327aa[_0x26961f(0x165)](_0x1579c6=>{const _0x1b81cb=_0x26961f;_0x447f1d['getUser'](_0x1579c6)&&_0x5327aa[_0x1b81cb(0x151)](_0x1579c6);}),_0x5327aa['size']&&(await _0x15807e[_0x26961f(0x161)](_0x26961f(0x16a),{'params':{'userIDs':[..._0x5327aa]}}))[_0x26961f(0x167)][_0x26961f(0x124)][_0x26961f(0x165)](_0x1b8b45=>{const _0x1053f3=_0x26961f;_0x1b8b45&&_0x447f1d[_0x1053f3(0x12d)](_0x1b8b45);});};function T(_0x38e7b9,_0xd296b5){return function(_0x38d60a,_0x55f28a){_0xd296b5(_0x38d60a,_0x55f28a,_0x38e7b9);};}function E(_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6){const _0x42b769=_0xd15b79;var _0xaa7867=arguments['length'],_0xce857d=_0xaa7867<0x3?_0x5f11b6:_0x304bc6===null?_0x304bc6=Object[_0x42b769(0x12a)](_0x5f11b6,_0x4cff74):_0x304bc6,_0x3dd5f4;if(typeof Reflect==_0x42b769(0x134)&&typeof Reflect[_0x42b769(0x14c)]=='function')_0xce857d=Reflect[_0x42b769(0x14c)](_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6);else{for(var _0x1c2dc2=_0x2a2cfe[_0x42b769(0x153)]-0x1;_0x1c2dc2>=0x0;_0x1c2dc2--)(_0x3dd5f4=_0x2a2cfe[_0x1c2dc2])&&(_0xce857d=(_0xaa7867<0x3?_0x3dd5f4(_0xce857d):_0xaa7867>0x3?_0x3dd5f4(_0x5f11b6,_0x4cff74,_0xce857d):_0x3dd5f4(_0x5f11b6,_0x4cff74))||_0xce857d);}return _0xaa7867>0x3&&_0xce857d&&Object[_0x42b769(0x158)](_0x5f11b6,_0x4cff74,_0xce857d),_0xce857d;}let D=class extends _0x964a78{constructor(_0x248389,_0x4b2280,_0x481f59,_0x345168){const _0x65c9b7=_0xd15b79;super(),this[_0x65c9b7(0x129)]=_0x248389,this[_0x65c9b7(0x11c)]=_0x4b2280,this[_0x65c9b7(0x15c)]=_0x481f59,this[_0x65c9b7(0x163)]=_0x345168,this[_0x65c9b7(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x19022e=_0xd15b79;this[_0x19022e(0x138)](this[_0x19022e(0x11c)][_0x19022e(0x131)][_0x19022e(0x13e)](_0x487a59(0x10))[_0x19022e(0x120)](_0x50f22c=>{const _0x2fb1f5=_0x19022e;let _0xea3f22=new Set();_0x50f22c['forEach'](_0x38c9c7=>{const _0x4f178f=_0x5542;switch(_0x38c9c7[_0x4f178f(0x123)]){case _0x4f178f(0x150):{let _0x32020c=_0x38c9c7[_0x4f178f(0x125)][_0x4f178f(0x11d)];_0xea3f22[_0x4f178f(0x150)](_0x32020c);break;}default:break;}}),w(this[_0x2fb1f5(0x163)],_0xea3f22);}));}['_init'](){const _0x176ef9=_0xd15b79;this['disposeWithMe'](this[_0x176ef9(0x129)]['commentUpdate$'][_0x176ef9(0x120)](async _0x542773=>{const _0x5c100e=_0x176ef9;var _0x12b9a9;let _0x53a8a0=(_0x12b9a9=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x46e00d=>_0x46e00d['threadId']===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x12b9a9['root'];if(!_0x53a8a0)return;let {unitId:_0x557afb,subUnitId:_0x527440}=_0x53a8a0;switch(_0x542773[_0x5c100e(0x168)]&&this[_0x5c100e(0x15c)][_0x5c100e(0x12d)](_0x542773[_0x5c100e(0x168)]),_0x542773[_0x5c100e(0x123)]){case _0x22b8b2['Add']:break;case _0x22b8b2['Reply']:var _0x177a11,_0x2d2d75;this[_0x5c100e(0x11c)][_0x5c100e(0x14e)](_0x557afb,_0x527440,{'unitId':_0x557afb,'subUnitId':_0x527440,'ref':'','id':_0x542773['replyId'],'dT':C(+_0x542773['createTimestamp']),'threadId':_0x542773[_0x5c100e(0x16d)],'personId':(_0x177a11=(_0x2d2d75=_0x542773['user'])==null?void 0x0:_0x2d2d75[_0x5c100e(0x113)])==null?_0x542773[_0x5c100e(0x126)]:_0x177a11,'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)]),'parentId':_0x53a8a0['id']});break;case _0x22b8b2[_0x5c100e(0x10f)]:{let _0x4bf8e2=this[_0x5c100e(0x11c)][_0x5c100e(0x10d)](_0x557afb,_0x527440,_0x542773['replyId']);_0x4bf8e2&&_0x4bf8e2[_0x5c100e(0x15e)]&&this[_0x5c100e(0x11c)][_0x5c100e(0x156)](_0x557afb,_0x527440,_0x542773[_0x5c100e(0x142)]);break;}case _0x22b8b2['Edit']:this['_threadCommentModel']['updateComment'](_0x557afb,_0x527440,{'commentId':_0x542773['replyId'],'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)])});break;case _0x22b8b2[_0x5c100e(0x144)]:{var _0x138db3;let _0x3c0b89=(_0x138db3=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x6c76cb=>_0x6c76cb[_0x5c100e(0x16d)]===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x138db3[_0x5c100e(0x10c)];_0x3c0b89&&this[_0x5c100e(0x11c)][_0x5c100e(0x15f)](_0x557afb,_0x527440,_0x3c0b89['id'],_0x542773[_0x5c100e(0x10b)]===_0x377cc0['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x5882d4(_0x25f6af)),T(0x1,_0x5882d4(_0x51f282)),T(0x2,_0x5882d4(_0x3c2081)),T(0x3,_0x5882d4(_0x43fc57))],D);const O={};function k(_0xa841da,_0x196f2d){const _0x378891=_0xd15b79;let _0x3ba332=_0xa841da[_0x378891(0x177)][0x0];return{..._0x196f2d,'id':_0x3ba332['replyId'],'resolved':_0xa841da[_0x378891(0x10b)]===0x1,'dT':C(_0x3ba332[_0x378891(0x14b)]),'personId':_0x3ba332['userId'],'threadId':_0x3ba332['threadId']};}function A(_0x2e3ae1,_0x3fd916,_0x4aad09){const _0x5b8a4f=_0xd15b79;var _0x26cbaa,_0xddab36;if(((_0x26cbaa=_0x2e3ae1==null||(_0xddab36=_0x2e3ae1[_0x5b8a4f(0x177)])==null?void 0x0:_0xddab36[_0x5b8a4f(0x153)])==null?0x0:_0x26cbaa)>0x0){let _0x11a96d=(_0x1fe7e9,_0x44b4ac)=>({'id':_0x1fe7e9[_0x5b8a4f(0x142)],'threadId':_0x1fe7e9[_0x5b8a4f(0x16d)],'dT':C(_0x1fe7e9[_0x5b8a4f(0x14b)]),'personId':_0x1fe7e9[_0x5b8a4f(0x126)],'resolved':_0x2e3ae1[_0x5b8a4f(0x10b)]===_0x377cc0[_0x5b8a4f(0x116)],'unitId':_0x3fd916,'subUnitId':_0x4aad09,'text':JSON[_0x5b8a4f(0x162)](_0x1fe7e9[_0x5b8a4f(0x12e)]),'parentId':_0x44b4ac}),_0x58779e=_0x11a96d(_0x2e3ae1['replies'][0x0]);return{..._0x58779e,'children':_0x2e3ae1[_0x5b8a4f(0x177)][_0x5b8a4f(0x127)](0x1)[_0x5b8a4f(0x11f)](_0x4a1301=>_0x11a96d(_0x4a1301,_0x58779e['id']))};}return null;}let j=class{constructor(_0x4ac3e3,_0x40942b,_0xb86c1c){const _0x2574c5=_0xd15b79;this[_0x2574c5(0x152)]=_0x4ac3e3,this[_0x2574c5(0x15c)]=_0x40942b,this[_0x2574c5(0x16b)]=_0xb86c1c;}async['addComment'](_0x2c59de){const _0x1151a0=_0xd15b79;var _0x51a82c,_0x592397;let {parentId:_0x1650bb,unitId:_0x504390,text:_0x61dcf5,threadId:_0x4639d2}=_0x2c59de,_0xf6285a=(_0x51a82c=(_0x592397=_0x61dcf5[_0x1151a0(0x114)])==null?void 0x0:_0x592397['filter'](_0x2a064b=>_0x2a064b[_0x1151a0(0x136)]===_0x57416f[_0x1151a0(0x16e)])[_0x1151a0(0x11f)](_0x2fbc02=>_0x2fbc02[_0x1151a0(0x171)]))==null?[]:_0x51a82c,_0x125694=JSON[_0x1151a0(0x13d)](_0x61dcf5),_0x394d61=(await this['_sessionService'][_0x1151a0(0x172)](_0x504390))['getMemberID']();if(_0x1650bb){let _0x7d7930={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a,'threadId':_0x4639d2},_0x49e559=(await this[_0x1151a0(0x152)]['post'](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x147),{'body':_0x7d7930}))[_0x1151a0(0x167)]['reply'];return{..._0x2c59de,'id':_0x49e559[_0x1151a0(0x142)],'dT':_0x41cc06(+_0x49e559[_0x1151a0(0x14b)])[_0x1151a0(0x149)](_0x1151a0(0x15b)),'personId':_0x49e559[_0x1151a0(0x126)]};}else{let _0x6b35ad={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a};return k((await this[_0x1151a0(0x152)][_0x1151a0(0x13c)](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x143),{'body':_0x6b35ad}))['body'][_0x1151a0(0x170)],_0x2c59de);}}async['updateComment'](_0x2fcb08){const _0x1c017a=_0xd15b79;var _0x166e26,_0xd26345;let {text:_0x1f9092,unitId:_0x2bc514}=_0x2fcb08,_0x389fc3=(_0x166e26=(_0xd26345=_0x1f9092[_0x1c017a(0x114)])==null?void 0x0:_0xd26345[_0x1c017a(0x14f)](_0x22bbdf=>_0x22bbdf['rangeType']===_0x57416f[_0x1c017a(0x16e)])['map'](_0x400104=>_0x400104[_0x1c017a(0x171)]))==null?[]:_0x166e26,_0x296eb6=JSON[_0x1c017a(0x13d)](_0x1f9092),_0xaf692f=_0x2fcb08[_0x1c017a(0x16d)],_0xf9b763=_0x2fcb08['id'],_0x75df5f={'memberId':(await this['_sessionService']['requireSession'](_0x2bc514))[_0x1c017a(0x115)](),'unitId':_0x2bc514,'threadId':_0xaf692f,'mention':_0x389fc3,'content':_0x296eb6,'replyId':_0xf9b763},_0x321219=await this[_0x1c017a(0x152)][_0x1c017a(0x13c)](_0x1c017a(0x12b)+_0x2bc514+_0x1c017a(0x13f),{'body':_0x75df5f});return!_0x321219[_0x1c017a(0x167)][_0x1c017a(0x13b)]||_0x321219[_0x1c017a(0x167)]['error']['code']===0x1;}async[_0xd15b79(0x15f)](_0x5e34b1){const _0x32da46=_0xd15b79;let {unitId:_0x16388b}=_0x5e34b1,_0x16d222=_0x5e34b1['threadId'],_0x33b25c={'memberId':this[_0x32da46(0x15c)][_0x32da46(0x16c)]()[_0x32da46(0x113)],'unitId':_0x16388b,'threadId':_0x16d222,'solved':_0x5e34b1[_0x32da46(0x117)]?_0x377cc0['Solved']:_0x377cc0[_0x32da46(0x137)]},_0x120a92=await this[_0x32da46(0x152)][_0x32da46(0x13c)]('/universer-api/comment/unit/'+_0x16388b+'/solved',{'body':_0x33b25c});return!_0x120a92['body'][_0x32da46(0x13b)]||_0x120a92[_0x32da46(0x167)][_0x32da46(0x13b)][_0x32da46(0x173)]===0x1;}async[_0xd15b79(0x156)](_0x3993a9,_0x1b0dc3,_0x201f54,_0x34dcd4){const _0x2bbb08=_0xd15b79;let _0x23f612={'memberId':(await this[_0x2bbb08(0x16b)][_0x2bbb08(0x172)](_0x3993a9))[_0x2bbb08(0x115)](),'threadId':_0x201f54,'replyId':_0x34dcd4,'unitId':_0x3993a9},_0xe32e47=await this[_0x2bbb08(0x152)][_0x2bbb08(0x13c)](_0x2bbb08(0x12b)+_0x3993a9+_0x2bbb08(0x13a),{'body':_0x23f612});return!_0xe32e47['body'][_0x2bbb08(0x13b)]||_0xe32e47[_0x2bbb08(0x167)][_0x2bbb08(0x13b)][_0x2bbb08(0x173)]===0x1;}async[_0xd15b79(0x119)](_0x5242fa,_0x5838d3,_0x556e31){const _0x2c49c2=_0xd15b79;let _0x2f89aa={'unitId':_0x5242fa,'threadId':_0x556e31},_0x2f6f0c=await this[_0x2c49c2(0x152)]['post'](_0x2c49c2(0x12b)+_0x5242fa+_0x2c49c2(0x128),{'body':_0x2f89aa}),_0x248ecb=_0x556e31[_0x2c49c2(0x11f)](_0x3de4ce=>A(_0x2f6f0c[_0x2c49c2(0x167)][_0x2c49c2(0x14d)][_0x3de4ce],_0x5242fa,_0x5838d3))[_0x2c49c2(0x14f)](Boolean);return Object[_0x2c49c2(0x169)](_0x2f6f0c['body']['users'])[_0x2c49c2(0x165)](_0x3b6694=>{const _0x151045=_0x2c49c2;this[_0x151045(0x15c)]['addUser'](_0x3b6694);}),_0x248ecb;}[_0xd15b79(0x145)](_0x25fe57){const _0x503dbf=_0xd15b79;return{'id':_0x25fe57['id'],'threadId':_0x25fe57[_0x503dbf(0x16d)],'ref':_0x25fe57[_0x503dbf(0x174)]};}};j=E([T(0x0,_0x5882d4(_0x4965c2)),T(0x1,_0x5882d4(_0x3c2081)),T(0x2,_0x5882d4(_0x5d52fa))],j);let M=class extends _0x964a78{constructor(_0x49a199,_0x44691d){const _0x240d7d=_0xd15b79;super(),this[_0x240d7d(0x135)]=_0x49a199,this[_0x240d7d(0x140)]=_0x44691d,this[_0x240d7d(0x132)]();}[_0xd15b79(0x132)](){const _0x132133=_0xd15b79;this[_0x132133(0x135)][_0x132133(0x15d)]=this['_threadCommentDataSource'],this[_0x132133(0x135)]['syncUpdateMutationToColla']=!0x1;}};M=E([T(0x0,_0x59905f),T(0x1,_0x5882d4(j))],M);function N(_0x313aff){'@babel/helpers - typeof';const _0x5eb410=_0xd15b79;return N=typeof Symbol==_0x5eb410(0x178)&&typeof Symbol['iterator']==_0x5eb410(0x175)?function(_0x309e2f){return typeof _0x309e2f;}:function(_0xe99024){const _0x3107ed=_0x5eb410;return _0xe99024&&typeof Symbol==_0x3107ed(0x178)&&_0xe99024[_0x3107ed(0x11b)]===Symbol&&_0xe99024!==Symbol[_0x3107ed(0x133)]?_0x3107ed(0x175):typeof _0xe99024;},N(_0x313aff);}function P(_0x5b59e0,_0x1e32fe){const _0x2beae5=_0xd15b79;if(N(_0x5b59e0)!=_0x2beae5(0x134)||!_0x5b59e0)return _0x5b59e0;var _0xd577e4=_0x5b59e0[Symbol[_0x2beae5(0x122)]];if(_0xd577e4!==void 0x0){var _0x47a6d5=_0xd577e4[_0x2beae5(0x159)](_0x5b59e0,_0x1e32fe||'default');if(N(_0x47a6d5)!=_0x2beae5(0x134))return _0x47a6d5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x1e32fe==='string'?String:Number)(_0x5b59e0);}function F(_0x46591e){const _0x4fb0f4=_0xd15b79;var _0x2afe7b=P(_0x46591e,_0x4fb0f4(0x121));return N(_0x2afe7b)==_0x4fb0f4(0x175)?_0x2afe7b:_0x2afe7b+'';}function I(_0x1160f3,_0x3bd374,_0x23cee7){const _0x13746c=_0xd15b79;return(_0x3bd374=F(_0x3bd374))in _0x1160f3?Object[_0x13746c(0x158)](_0x1160f3,_0x3bd374,{'value':_0x23cee7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1160f3[_0x3bd374]=_0x23cee7,_0x1160f3;}let L=class extends _0x12c11e{constructor(_0x1896df=O,_0x19f372,_0x13f453){const _0x3cedf0=_0xd15b79;super(),this[_0x3cedf0(0x111)]=_0x1896df,this[_0x3cedf0(0x163)]=_0x19f372,this[_0x3cedf0(0x130)]=_0x13f453;let {..._0x3dd6bb}=_0xa513a0({},O,this[_0x3cedf0(0x111)]);this[_0x3cedf0(0x130)][_0x3cedf0(0x11a)]('thread-comment-data-source.config',_0x3dd6bb);}[_0xd15b79(0x110)](){[[j],[M],[D]]['forEach'](_0x45ac52=>{const _0x473b14=_0x5542;this[_0x473b14(0x163)][_0x473b14(0x150)](_0x45ac52);});}[_0xd15b79(0x15a)](){const _0x5bab25=_0xd15b79;this[_0x5bab25(0x163)][_0x5bab25(0x161)](M),this[_0x5bab25(0x163)][_0x5bab25(0x161)](D);}};I(L,_0xd15b79(0x14a),_0xd15b79(0x166)),I(L,'packageName',x),I(L,_0xd15b79(0x148),S),L=E([_0x2c6682(_0x5ab3d2,_0x457666,_0x1afcd4),T(0x1,_0x5882d4(_0x43fc57)),T(0x2,_0x5a4188)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x24acd3=_0x39e8;(function(_0x2a93d6,_0x3a5e4b){const _0x2314c8=_0x39e8,_0x5c9a6c=_0x2a93d6();while(!![]){try{const _0x5c82ff=parseInt(_0x2314c8(0xa6))/0x1*(-parseInt(_0x2314c8(0xf2))/0x2)+-parseInt(_0x2314c8(0xab))/0x3+parseInt(_0x2314c8(0xbd))/0x4+-parseInt(_0x2314c8(0xfb))/0x5*(parseInt(_0x2314c8(0xa2))/0x6)+-parseInt(_0x2314c8(0xbb))/0x7*(-parseInt(_0x2314c8(0xaf))/0x8)+parseInt(_0x2314c8(0xb6))/0x9+parseInt(_0x2314c8(0xd8))/0xa;if(_0x5c82ff===_0x3a5e4b)break;else _0x5c9a6c['push'](_0x5c9a6c['shift']());}catch(_0x592f1a){_0x5c9a6c['push'](_0x5c9a6c['shift']());}}}(_0x54e5,0x205de));import{CollaborationSessionService as _0x549419,CommentService as _0x210ea5,UniverCollaborationClientPlugin as _0x47bbe9}from'@univerjs-pro/collaboration-client';function _0x39e8(_0x3a7771,_0x563b8e){_0x3a7771=_0x3a7771-0x92;const _0x54e582=_0x54e5();let _0x39e896=_0x54e582[_0x3a7771];return _0x39e896;}import{UniverLicensePlugin as _0x5ccbdc}from'@univerjs-pro/license';import{CustomRangeType as _0x55bffa,DependentOn as _0x4924db,Disposable as _0x342d50,IConfigService as _0x1812ba,Inject as _0x5da4f4,Injector as _0x536f47,Plugin as _0x31f5c5,UserManagerService as _0x45ef85,dateKit as _0x4abfbd,merge as _0x31c2fd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26a07e}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x4f3934,CommentUpdateEventType as _0x53a39d}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x448d8f,ThreadCommentModel as _0x3b0840}from'@univerjs/thread-comment';import{bufferTime as _0x306e76}from'rxjs';import{HTTPService as _0x4b97da}from'@univerjs/network';var x=_0x24acd3(0xc1),S=_0x24acd3(0xf5);const C=_0x291d0e=>_0x4abfbd(new Date(+_0x291d0e))[_0x24acd3(0xe6)](_0x24acd3(0xda)),w=async(_0x12b975,_0x5c229e)=>{const _0x7c3f2c=_0x24acd3;let _0x195174=_0x12b975['get'](_0x45ef85),_0x32b62d=_0x12b975[_0x7c3f2c(0xe5)](_0x4b97da);_0x5c229e['forEach'](_0x26510a=>{const _0x2d9438=_0x7c3f2c;_0x195174[_0x2d9438(0xf8)](_0x26510a)&&_0x5c229e['delete'](_0x26510a);}),_0x5c229e[_0x7c3f2c(0xdc)]&&(await _0x32b62d[_0x7c3f2c(0xe5)](_0x7c3f2c(0xf6),{'params':{'userIDs':[..._0x5c229e]}}))['body'][_0x7c3f2c(0xdb)][_0x7c3f2c(0x96)](_0x54a051=>{_0x54a051&&_0x195174['addUser'](_0x54a051);});};function T(_0x3f5c2c,_0x1d1bda){return function(_0x27ab11,_0x5d2b8d){_0x1d1bda(_0x27ab11,_0x5d2b8d,_0x3f5c2c);};}function E(_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf){const _0x3c62a8=_0x24acd3;var _0xcdd043=arguments[_0x3c62a8(0x94)],_0x32d010=_0xcdd043<0x3?_0x39d806:_0x17dfcf===null?_0x17dfcf=Object['getOwnPropertyDescriptor'](_0x39d806,_0xd72a11):_0x17dfcf,_0x510d0f;if(typeof Reflect==_0x3c62a8(0xb7)&&typeof Reflect[_0x3c62a8(0xee)]==_0x3c62a8(0xf4))_0x32d010=Reflect[_0x3c62a8(0xee)](_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf);else{for(var _0xb49db=_0x3b8efa[_0x3c62a8(0x94)]-0x1;_0xb49db>=0x0;_0xb49db--)(_0x510d0f=_0x3b8efa[_0xb49db])&&(_0x32d010=(_0xcdd043<0x3?_0x510d0f(_0x32d010):_0xcdd043>0x3?_0x510d0f(_0x39d806,_0xd72a11,_0x32d010):_0x510d0f(_0x39d806,_0xd72a11))||_0x32d010);}return _0xcdd043>0x3&&_0x32d010&&Object['defineProperty'](_0x39d806,_0xd72a11,_0x32d010),_0x32d010;}let D=class extends _0x342d50{constructor(_0x5d165f,_0x2bff6f,_0x773819,_0x6df37b){const _0xc08f54=_0x24acd3;super(),this[_0xc08f54(0xa1)]=_0x5d165f,this[_0xc08f54(0x9b)]=_0x2bff6f,this[_0xc08f54(0xd0)]=_0x773819,this['_injector']=_0x6df37b,this[_0xc08f54(0xa5)](),this[_0xc08f54(0xce)]();}[_0x24acd3(0xce)](){const _0x258172=_0x24acd3;this['disposeWithMe'](this[_0x258172(0x9b)]['commentUpdate$'][_0x258172(0xd1)](_0x306e76(0x10))[_0x258172(0xba)](_0x355dc7=>{const _0x39ae22=_0x258172;let _0x55d635=new Set();_0x355dc7[_0x39ae22(0x96)](_0x4cc324=>{const _0x1b923b=_0x39ae22;switch(_0x4cc324[_0x1b923b(0xcd)]){case _0x1b923b(0xe1):{let _0x20a06a=_0x4cc324[_0x1b923b(0xc3)][_0x1b923b(0xe7)];_0x55d635['add'](_0x20a06a);break;}default:break;}}),w(this[_0x39ae22(0xa3)],_0x55d635);}));}[_0x24acd3(0xa5)](){const _0x3b69aa=_0x24acd3;this[_0x3b69aa(0xe0)](this['_commentService'][_0x3b69aa(0xdf)][_0x3b69aa(0xba)](async _0x1d7362=>{const _0x42494a=_0x3b69aa;var _0x1d6c46;let _0x2aec70=(_0x1d6c46=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362[_0x42494a(0xd4)])['find'](_0xe9a3d6=>_0xe9a3d6[_0x42494a(0xb1)]===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x1d6c46[_0x42494a(0xb8)];if(!_0x2aec70)return;let {unitId:_0x4692b9,subUnitId:_0x56df8a}=_0x2aec70;switch(_0x1d7362['user']&&this['_userService'][_0x42494a(0xd5)](_0x1d7362['user']),_0x1d7362[_0x42494a(0xcd)]){case _0x53a39d['Add']:break;case _0x53a39d[_0x42494a(0xa8)]:var _0x1eaa59,_0x2d595b;this['_threadCommentModel'][_0x42494a(0xa0)](_0x4692b9,_0x56df8a,{'unitId':_0x4692b9,'subUnitId':_0x56df8a,'ref':'','id':_0x1d7362[_0x42494a(0xe4)],'dT':C(+_0x1d7362[_0x42494a(0xe2)]),'threadId':_0x1d7362[_0x42494a(0xb1)],'personId':(_0x1eaa59=(_0x2d595b=_0x1d7362[_0x42494a(0xbc)])==null?void 0x0:_0x2d595b['userID'])==null?_0x1d7362[_0x42494a(0x9d)]:_0x1eaa59,'text':JSON['parse'](_0x1d7362['content']),'parentId':_0x2aec70['id']});break;case _0x53a39d['Delete']:{let _0x5995c6=this[_0x42494a(0x9b)][_0x42494a(0xf9)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);_0x5995c6&&_0x5995c6[_0x42494a(0xc8)]&&this[_0x42494a(0x9b)][_0x42494a(0xd6)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);break;}case _0x53a39d[_0x42494a(0xec)]:this[_0x42494a(0x9b)][_0x42494a(0xef)](_0x4692b9,_0x56df8a,{'commentId':_0x1d7362[_0x42494a(0xe4)],'text':JSON[_0x42494a(0xde)](_0x1d7362[_0x42494a(0xc5)])});break;case _0x53a39d[_0x42494a(0xac)]:{var _0x130222;let _0x3a8a1f=(_0x130222=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362['unitId'])[_0x42494a(0xc9)](_0x2f5f2d=>_0x2f5f2d['threadId']===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x130222[_0x42494a(0xb8)];_0x3a8a1f&&this[_0x42494a(0x9b)][_0x42494a(0xc0)](_0x4692b9,_0x56df8a,_0x3a8a1f['id'],_0x1d7362[_0x42494a(0x95)]===_0x4f3934[_0x42494a(0xc2)]);break;}default:break;}}));}};D=E([T(0x0,_0x5da4f4(_0x210ea5)),T(0x1,_0x5da4f4(_0x3b0840)),T(0x2,_0x5da4f4(_0x45ef85)),T(0x3,_0x5da4f4(_0x536f47))],D);const O={};function k(_0x3d90b7,_0x1871aa){const _0xad39ce=_0x24acd3;let _0x53dc2d=_0x3d90b7[_0xad39ce(0xe8)][0x0];return{..._0x1871aa,'id':_0x53dc2d[_0xad39ce(0xe4)],'resolved':_0x3d90b7[_0xad39ce(0x95)]===0x1,'dT':C(_0x53dc2d[_0xad39ce(0xe2)]),'personId':_0x53dc2d[_0xad39ce(0x9d)],'threadId':_0x53dc2d[_0xad39ce(0xb1)]};}function A(_0x6b217b,_0x3df929,_0x1f19eb){const _0x35a93a=_0x24acd3;var _0x36d169,_0x41f264;if(((_0x36d169=_0x6b217b==null||(_0x41f264=_0x6b217b[_0x35a93a(0xe8)])==null?void 0x0:_0x41f264[_0x35a93a(0x94)])==null?0x0:_0x36d169)>0x0){let _0x1a2cd1=(_0x571c82,_0x51870b)=>({'id':_0x571c82['replyId'],'threadId':_0x571c82[_0x35a93a(0xb1)],'dT':C(_0x571c82[_0x35a93a(0xe2)]),'personId':_0x571c82[_0x35a93a(0x9d)],'resolved':_0x6b217b[_0x35a93a(0x95)]===_0x4f3934[_0x35a93a(0xc2)],'unitId':_0x3df929,'subUnitId':_0x1f19eb,'text':JSON[_0x35a93a(0xde)](_0x571c82[_0x35a93a(0xc5)]),'parentId':_0x51870b}),_0x3deb14=_0x1a2cd1(_0x6b217b[_0x35a93a(0xe8)][0x0]);return{..._0x3deb14,'children':_0x6b217b[_0x35a93a(0xe8)][_0x35a93a(0xc4)](0x1)[_0x35a93a(0xae)](_0x11ef58=>_0x1a2cd1(_0x11ef58,_0x3deb14['id']))};}return null;}function _0x54e5(){const _0x291d64=['resolveComment','@univerjs-pro/thread-comment-datasource','Solved','payload','slice','content','prototype','post','parentId','find','toPrimitive','thread-comment-data-source.config','_config','type','_initUserSync','comment','_userService','pipe','error','userID','unitId','addUser','deleteComment','_sessionService','2729650IZCrsf','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','users','size','string','parse','commentUpdate$','disposeWithMe','add','createTimestamp','constructor','replyId','get','format','personId','replies','symbol','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','customRanges','decorate','updateComment','/edit','rangeType','68462ezTOLe','COMMENT','function','0.25.1','/universer-api/user/list','getUnit','getUser','getComment','version','10xDAXSM','stringify','_initDataSource','OpenOrReOpen','length','solved','forEach','default','defineProperty','filter','/list','_threadCommentModel','call','userId','body','code','addComment','_commentService','502392ZiELDC','_injector','getMemberID','_init','7WNrAMk','iterator','Reply','saveCommentToSnapshot','/delete','581988RiDhoI','Solve','syncUpdateMutationToColla','map','1815640KzmUrH','rangeId','threadId','ref','_threadCommentDataSource','/reply','_threadCommentDataSourceService','752571mmrUtg','object','root','_configService','subscribe','7DxmBJg','user','600448bcBhdL','onStarting','requireSession'];_0x54e5=function(){return _0x291d64;};return _0x54e5();}let j=class{constructor(_0x200ec5,_0x4779c1,_0x3b55e4){const _0x48e10e=_0x24acd3;this[_0x48e10e(0xea)]=_0x200ec5,this[_0x48e10e(0xd0)]=_0x4779c1,this[_0x48e10e(0xd7)]=_0x3b55e4;}async[_0x24acd3(0xa0)](_0x3185a4){const _0x29185d=_0x24acd3;var _0x408b88,_0x592d01;let {parentId:_0x3785f9,unitId:_0x4a4570,text:_0x4d4cdb,threadId:_0x365890}=_0x3185a4,_0x4c0730=(_0x408b88=(_0x592d01=_0x4d4cdb['customRanges'])==null?void 0x0:_0x592d01[_0x29185d(0x99)](_0xaa1f4=>_0xaa1f4[_0x29185d(0xf1)]===_0x55bffa[_0x29185d(0xf3)])[_0x29185d(0xae)](_0x31784d=>_0x31784d[_0x29185d(0xb0)]))==null?[]:_0x408b88,_0x4a9488=JSON[_0x29185d(0xfc)](_0x4d4cdb),_0xc5dad9=(await this[_0x29185d(0xd7)][_0x29185d(0xbf)](_0x4a4570))['getMemberID']();if(_0x3785f9){let _0x3a55eb={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730,'threadId':_0x365890},_0x40f120=(await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+_0x29185d(0xb4),{'body':_0x3a55eb}))[_0x29185d(0x9e)]['reply'];return{..._0x3185a4,'id':_0x40f120[_0x29185d(0xe4)],'dT':_0x4abfbd(+_0x40f120[_0x29185d(0xe2)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x40f120[_0x29185d(0x9d)]};}else{let _0x2883fc={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730};return k((await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+'/add',{'body':_0x2883fc}))[_0x29185d(0x9e)][_0x29185d(0xcf)],_0x3185a4);}}async[_0x24acd3(0xef)](_0x533cb7){const _0xd153f7=_0x24acd3;var _0x558b51,_0x5ebd5d;let {text:_0x116f99,unitId:_0xba2143}=_0x533cb7,_0x2c8ad9=(_0x558b51=(_0x5ebd5d=_0x116f99[_0xd153f7(0xed)])==null?void 0x0:_0x5ebd5d[_0xd153f7(0x99)](_0x57d374=>_0x57d374[_0xd153f7(0xf1)]===_0x55bffa['COMMENT'])[_0xd153f7(0xae)](_0x426074=>_0x426074[_0xd153f7(0xb0)]))==null?[]:_0x558b51,_0x3faed3=JSON[_0xd153f7(0xfc)](_0x116f99),_0x3d03be=_0x533cb7[_0xd153f7(0xb1)],_0x322b41=_0x533cb7['id'],_0x552043={'memberId':(await this[_0xd153f7(0xd7)][_0xd153f7(0xbf)](_0xba2143))[_0xd153f7(0xa4)](),'unitId':_0xba2143,'threadId':_0x3d03be,'mention':_0x2c8ad9,'content':_0x3faed3,'replyId':_0x322b41},_0x30f023=await this[_0xd153f7(0xea)]['post'](_0xd153f7(0xd9)+_0xba2143+_0xd153f7(0xf0),{'body':_0x552043});return!_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)]||_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)][_0xd153f7(0x9f)]===0x1;}async[_0x24acd3(0xc0)](_0x30ad4f){const _0x1afcca=_0x24acd3;let {unitId:_0x44f50e}=_0x30ad4f,_0x4e435c=_0x30ad4f[_0x1afcca(0xb1)],_0x3adaa4={'memberId':this['_userService']['getCurrentUser']()[_0x1afcca(0xd3)],'unitId':_0x44f50e,'threadId':_0x4e435c,'solved':_0x30ad4f['resolved']?_0x4f3934[_0x1afcca(0xc2)]:_0x4f3934[_0x1afcca(0x93)]},_0x3e7a49=await this[_0x1afcca(0xea)][_0x1afcca(0xc7)](_0x1afcca(0xd9)+_0x44f50e+'/solved',{'body':_0x3adaa4});return!_0x3e7a49['body'][_0x1afcca(0xd2)]||_0x3e7a49['body'][_0x1afcca(0xd2)][_0x1afcca(0x9f)]===0x1;}async[_0x24acd3(0xd6)](_0x5ee32f,_0x448583,_0xc8e4f8,_0x26451f){const _0x33fc85=_0x24acd3;let _0x4d73d3={'memberId':(await this[_0x33fc85(0xd7)]['requireSession'](_0x5ee32f))['getMemberID'](),'threadId':_0xc8e4f8,'replyId':_0x26451f,'unitId':_0x5ee32f},_0x19fb06=await this[_0x33fc85(0xea)][_0x33fc85(0xc7)]('/universer-api/comment/unit/'+_0x5ee32f+_0x33fc85(0xaa),{'body':_0x4d73d3});return!_0x19fb06[_0x33fc85(0x9e)]['error']||_0x19fb06['body'][_0x33fc85(0xd2)]['code']===0x1;}async['listComments'](_0xad7b9,_0x59a0fd,_0x32bb0b){const _0x2b9c76=_0x24acd3;let _0x299530={'unitId':_0xad7b9,'threadId':_0x32bb0b},_0x5b42da=await this[_0x2b9c76(0xea)][_0x2b9c76(0xc7)](_0x2b9c76(0xd9)+_0xad7b9+_0x2b9c76(0x9a),{'body':_0x299530}),_0xa566de=_0x32bb0b[_0x2b9c76(0xae)](_0x574020=>A(_0x5b42da[_0x2b9c76(0x9e)]['comments'][_0x574020],_0xad7b9,_0x59a0fd))[_0x2b9c76(0x99)](Boolean);return Object['values'](_0x5b42da['body'][_0x2b9c76(0xdb)])['forEach'](_0x31939f=>{const _0x13461e=_0x2b9c76;this[_0x13461e(0xd0)][_0x13461e(0xd5)](_0x31939f);}),_0xa566de;}[_0x24acd3(0xa9)](_0x4c9a21){const _0x2d9b42=_0x24acd3;return{'id':_0x4c9a21['id'],'threadId':_0x4c9a21[_0x2d9b42(0xb1)],'ref':_0x4c9a21[_0x2d9b42(0xb2)]};}};j=E([T(0x0,_0x5da4f4(_0x4b97da)),T(0x1,_0x5da4f4(_0x45ef85)),T(0x2,_0x5da4f4(_0x549419))],j);let M=class extends _0x342d50{constructor(_0x1c5125,_0x3b1865){const _0x439b07=_0x24acd3;super(),this[_0x439b07(0xb5)]=_0x1c5125,this[_0x439b07(0xb3)]=_0x3b1865,this[_0x439b07(0x92)]();}[_0x24acd3(0x92)](){const _0x3cacf2=_0x24acd3;this[_0x3cacf2(0xb5)]['dataSource']=this['_threadCommentDataSource'],this[_0x3cacf2(0xb5)][_0x3cacf2(0xad)]=!0x1;}};M=E([T(0x0,_0x448d8f),T(0x1,_0x5da4f4(j))],M);function N(_0x3209ad){'@babel/helpers - typeof';const _0x408d7c=_0x24acd3;return N=typeof Symbol==_0x408d7c(0xf4)&&typeof Symbol[_0x408d7c(0xa7)]=='symbol'?function(_0x452f1c){return typeof _0x452f1c;}:function(_0x854b23){const _0x519483=_0x408d7c;return _0x854b23&&typeof Symbol==_0x519483(0xf4)&&_0x854b23[_0x519483(0xe3)]===Symbol&&_0x854b23!==Symbol[_0x519483(0xc6)]?'symbol':typeof _0x854b23;},N(_0x3209ad);}function P(_0xeb782,_0x2d8502){const _0x48f160=_0x24acd3;if(N(_0xeb782)!='object'||!_0xeb782)return _0xeb782;var _0x578782=_0xeb782[Symbol[_0x48f160(0xca)]];if(_0x578782!==void 0x0){var _0x5df045=_0x578782[_0x48f160(0x9c)](_0xeb782,_0x2d8502||_0x48f160(0x97));if(N(_0x5df045)!=_0x48f160(0xb7))return _0x5df045;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2d8502==='string'?String:Number)(_0xeb782);}function F(_0x5cd295){const _0x4b95d5=_0x24acd3;var _0x2928a9=P(_0x5cd295,_0x4b95d5(0xdd));return N(_0x2928a9)==_0x4b95d5(0xe9)?_0x2928a9:_0x2928a9+'';}function I(_0x1b0afa,_0x2d6d8c,_0x97eb01){const _0x16ef3=_0x24acd3;return(_0x2d6d8c=F(_0x2d6d8c))in _0x1b0afa?Object[_0x16ef3(0x98)](_0x1b0afa,_0x2d6d8c,{'value':_0x97eb01,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1b0afa[_0x2d6d8c]=_0x97eb01,_0x1b0afa;}let L=class extends _0x31f5c5{constructor(_0x542cc7=O,_0xb45a14,_0x1f3c7){const _0x3e5b0f=_0x24acd3;super(),this[_0x3e5b0f(0xcc)]=_0x542cc7,this[_0x3e5b0f(0xa3)]=_0xb45a14,this['_configService']=_0x1f3c7;let {..._0xdcf65e}=_0x31c2fd({},O,this[_0x3e5b0f(0xcc)]);this[_0x3e5b0f(0xb9)]['setConfig'](_0x3e5b0f(0xcb),_0xdcf65e);}[_0x24acd3(0xbe)](){const _0xb521c4=_0x24acd3;[[j],[M],[D]][_0xb521c4(0x96)](_0x6d6dda=>{const _0x48db2f=_0xb521c4;this[_0x48db2f(0xa3)][_0x48db2f(0xe1)](_0x6d6dda);});}['onReady'](){const _0x24a3b0=_0x24acd3;this['_injector'][_0x24a3b0(0xe5)](M),this[_0x24a3b0(0xa3)]['get'](D);}};I(L,'pluginName',_0x24acd3(0xeb)),I(L,'packageName',x),I(L,_0x24acd3(0xfa),S),L=E([_0x4924db(_0x26a07e,_0x47bbe9,_0x5ccbdc),T(0x1,_0x5da4f4(_0x536f47)),T(0x2,_0x1812ba)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ function _0x5863(){const _0x47dcd2=['getOwnPropertyDescriptor','/universer-api/comment/unit/','95iizQNo','addUser','content','1.0.0-alpha.1','_configService','commentUpdate$','_initDataSource','prototype','object','_threadCommentDataSourceService','rangeType','OpenOrReOpen','disposeWithMe','unitId','/delete','error','post','stringify','pipe','/edit','_threadCommentDataSource','8963235sUySJb','replyId','/add','Solve','saveCommentToSnapshot','_init','/reply','version','format','pluginName','createTimestamp','decorate','comments','addComment','filter','add','delete','_httpService','length','239271zxfzvb','find','deleteComment','getUnit','defineProperty','call','onReady','YYYY/MM/DD\x20HH:mm','_userService','dataSource','parentId','resolveComment','@univerjs-pro/thread-comment-datasource','get','parse','_injector','34iXmOzb','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','user','values','/universer-api/user/list','_sessionService','getCurrentUser','threadId','COMMENT','264668pFBOvM','comment','rangeId','requireSession','code','ref','symbol','48QItkQd','replies','function','solved','root','getComment','5888930GsMGfR','Delete','onStarting','_config','10030200xbmnDp','userID','customRanges','getMemberID','Solved','resolved','138761ywDOTr','listComments','setConfig','constructor','_threadCommentModel','personId','684060EsifXW','map','subscribe','string','toPrimitive','type','users','payload','userId','slice','/list','_commentService'];_0x5863=function(){return _0x47dcd2;};return _0x5863();}const _0xd15b79=_0x5542;(function(_0x123280,_0x478ef4){const _0x1b9fbe=_0x5542,_0x1c2850=_0x123280();while(!![]){try{const _0x23232c=-parseInt(_0x1b9fbe(0x11e))/0x1+parseInt(_0x1b9fbe(0x164))/0x2*(-parseInt(_0x1b9fbe(0x154))/0x3)+parseInt(_0x1b9fbe(0x16f))/0x4*(parseInt(_0x1b9fbe(0x12c))/0x5)+-parseInt(_0x1b9fbe(0x176))/0x6*(parseInt(_0x1b9fbe(0x118))/0x7)+parseInt(_0x1b9fbe(0x112))/0x8+parseInt(_0x1b9fbe(0x141))/0x9+-parseInt(_0x1b9fbe(0x10e))/0xa;if(_0x23232c===_0x478ef4)break;else _0x1c2850['push'](_0x1c2850['shift']());}catch(_0x2d44fb){_0x1c2850['push'](_0x1c2850['shift']());}}}(_0x5863,0xafa61));import{CollaborationSessionService as _0x5d52fa,CommentService as _0x25f6af,UniverCollaborationClientPlugin as _0x457666}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1afcd4}from'@univerjs-pro/license';function _0x5542(_0x4c9a49,_0x5d4972){_0x4c9a49=_0x4c9a49-0x10b;const _0x5863b3=_0x5863();let _0x55427b=_0x5863b3[_0x4c9a49];return _0x55427b;}import{CustomRangeType as _0x57416f,DependentOn as _0x2c6682,Disposable as _0x964a78,IConfigService as _0x5a4188,Inject as _0x5882d4,Injector as _0x43fc57,Plugin as _0x12c11e,UserManagerService as _0x3c2081,dateKit as _0x41cc06,merge as _0xa513a0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ab3d2}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x377cc0,CommentUpdateEventType as _0x22b8b2}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x59905f,ThreadCommentModel as _0x51f282}from'@univerjs/thread-comment';import{bufferTime as _0x487a59}from'rxjs';import{HTTPService as _0x4965c2}from'@univerjs/network';var x=_0xd15b79(0x160),S=_0xd15b79(0x12f);const C=_0x21fb7c=>_0x41cc06(new Date(+_0x21fb7c))[_0xd15b79(0x149)]('YYYY/MM/DD\x20HH:mm'),w=async(_0x13db5e,_0x5327aa)=>{const _0x26961f=_0xd15b79;let _0x447f1d=_0x13db5e[_0x26961f(0x161)](_0x3c2081),_0x15807e=_0x13db5e['get'](_0x4965c2);_0x5327aa[_0x26961f(0x165)](_0x1579c6=>{const _0x1b81cb=_0x26961f;_0x447f1d['getUser'](_0x1579c6)&&_0x5327aa[_0x1b81cb(0x151)](_0x1579c6);}),_0x5327aa['size']&&(await _0x15807e[_0x26961f(0x161)](_0x26961f(0x16a),{'params':{'userIDs':[..._0x5327aa]}}))[_0x26961f(0x167)][_0x26961f(0x124)][_0x26961f(0x165)](_0x1b8b45=>{const _0x1053f3=_0x26961f;_0x1b8b45&&_0x447f1d[_0x1053f3(0x12d)](_0x1b8b45);});};function T(_0x38e7b9,_0xd296b5){return function(_0x38d60a,_0x55f28a){_0xd296b5(_0x38d60a,_0x55f28a,_0x38e7b9);};}function E(_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6){const _0x42b769=_0xd15b79;var _0xaa7867=arguments['length'],_0xce857d=_0xaa7867<0x3?_0x5f11b6:_0x304bc6===null?_0x304bc6=Object[_0x42b769(0x12a)](_0x5f11b6,_0x4cff74):_0x304bc6,_0x3dd5f4;if(typeof Reflect==_0x42b769(0x134)&&typeof Reflect[_0x42b769(0x14c)]=='function')_0xce857d=Reflect[_0x42b769(0x14c)](_0x2a2cfe,_0x5f11b6,_0x4cff74,_0x304bc6);else{for(var _0x1c2dc2=_0x2a2cfe[_0x42b769(0x153)]-0x1;_0x1c2dc2>=0x0;_0x1c2dc2--)(_0x3dd5f4=_0x2a2cfe[_0x1c2dc2])&&(_0xce857d=(_0xaa7867<0x3?_0x3dd5f4(_0xce857d):_0xaa7867>0x3?_0x3dd5f4(_0x5f11b6,_0x4cff74,_0xce857d):_0x3dd5f4(_0x5f11b6,_0x4cff74))||_0xce857d);}return _0xaa7867>0x3&&_0xce857d&&Object[_0x42b769(0x158)](_0x5f11b6,_0x4cff74,_0xce857d),_0xce857d;}let D=class extends _0x964a78{constructor(_0x248389,_0x4b2280,_0x481f59,_0x345168){const _0x65c9b7=_0xd15b79;super(),this[_0x65c9b7(0x129)]=_0x248389,this[_0x65c9b7(0x11c)]=_0x4b2280,this[_0x65c9b7(0x15c)]=_0x481f59,this[_0x65c9b7(0x163)]=_0x345168,this[_0x65c9b7(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x19022e=_0xd15b79;this[_0x19022e(0x138)](this[_0x19022e(0x11c)][_0x19022e(0x131)][_0x19022e(0x13e)](_0x487a59(0x10))[_0x19022e(0x120)](_0x50f22c=>{const _0x2fb1f5=_0x19022e;let _0xea3f22=new Set();_0x50f22c['forEach'](_0x38c9c7=>{const _0x4f178f=_0x5542;switch(_0x38c9c7[_0x4f178f(0x123)]){case _0x4f178f(0x150):{let _0x32020c=_0x38c9c7[_0x4f178f(0x125)][_0x4f178f(0x11d)];_0xea3f22[_0x4f178f(0x150)](_0x32020c);break;}default:break;}}),w(this[_0x2fb1f5(0x163)],_0xea3f22);}));}['_init'](){const _0x176ef9=_0xd15b79;this['disposeWithMe'](this[_0x176ef9(0x129)]['commentUpdate$'][_0x176ef9(0x120)](async _0x542773=>{const _0x5c100e=_0x176ef9;var _0x12b9a9;let _0x53a8a0=(_0x12b9a9=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x46e00d=>_0x46e00d['threadId']===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x12b9a9['root'];if(!_0x53a8a0)return;let {unitId:_0x557afb,subUnitId:_0x527440}=_0x53a8a0;switch(_0x542773[_0x5c100e(0x168)]&&this[_0x5c100e(0x15c)][_0x5c100e(0x12d)](_0x542773[_0x5c100e(0x168)]),_0x542773[_0x5c100e(0x123)]){case _0x22b8b2['Add']:break;case _0x22b8b2['Reply']:var _0x177a11,_0x2d2d75;this[_0x5c100e(0x11c)][_0x5c100e(0x14e)](_0x557afb,_0x527440,{'unitId':_0x557afb,'subUnitId':_0x527440,'ref':'','id':_0x542773['replyId'],'dT':C(+_0x542773['createTimestamp']),'threadId':_0x542773[_0x5c100e(0x16d)],'personId':(_0x177a11=(_0x2d2d75=_0x542773['user'])==null?void 0x0:_0x2d2d75[_0x5c100e(0x113)])==null?_0x542773[_0x5c100e(0x126)]:_0x177a11,'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)]),'parentId':_0x53a8a0['id']});break;case _0x22b8b2[_0x5c100e(0x10f)]:{let _0x4bf8e2=this[_0x5c100e(0x11c)][_0x5c100e(0x10d)](_0x557afb,_0x527440,_0x542773['replyId']);_0x4bf8e2&&_0x4bf8e2[_0x5c100e(0x15e)]&&this[_0x5c100e(0x11c)][_0x5c100e(0x156)](_0x557afb,_0x527440,_0x542773[_0x5c100e(0x142)]);break;}case _0x22b8b2['Edit']:this['_threadCommentModel']['updateComment'](_0x557afb,_0x527440,{'commentId':_0x542773['replyId'],'text':JSON[_0x5c100e(0x162)](_0x542773[_0x5c100e(0x12e)])});break;case _0x22b8b2[_0x5c100e(0x144)]:{var _0x138db3;let _0x3c0b89=(_0x138db3=this[_0x5c100e(0x11c)][_0x5c100e(0x157)](_0x542773[_0x5c100e(0x139)])[_0x5c100e(0x155)](_0x6c76cb=>_0x6c76cb[_0x5c100e(0x16d)]===_0x542773[_0x5c100e(0x16d)]))==null?void 0x0:_0x138db3[_0x5c100e(0x10c)];_0x3c0b89&&this[_0x5c100e(0x11c)][_0x5c100e(0x15f)](_0x557afb,_0x527440,_0x3c0b89['id'],_0x542773[_0x5c100e(0x10b)]===_0x377cc0['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x5882d4(_0x25f6af)),T(0x1,_0x5882d4(_0x51f282)),T(0x2,_0x5882d4(_0x3c2081)),T(0x3,_0x5882d4(_0x43fc57))],D);const O={};function k(_0xa841da,_0x196f2d){const _0x378891=_0xd15b79;let _0x3ba332=_0xa841da[_0x378891(0x177)][0x0];return{..._0x196f2d,'id':_0x3ba332['replyId'],'resolved':_0xa841da[_0x378891(0x10b)]===0x1,'dT':C(_0x3ba332[_0x378891(0x14b)]),'personId':_0x3ba332['userId'],'threadId':_0x3ba332['threadId']};}function A(_0x2e3ae1,_0x3fd916,_0x4aad09){const _0x5b8a4f=_0xd15b79;var _0x26cbaa,_0xddab36;if(((_0x26cbaa=_0x2e3ae1==null||(_0xddab36=_0x2e3ae1[_0x5b8a4f(0x177)])==null?void 0x0:_0xddab36[_0x5b8a4f(0x153)])==null?0x0:_0x26cbaa)>0x0){let _0x11a96d=(_0x1fe7e9,_0x44b4ac)=>({'id':_0x1fe7e9[_0x5b8a4f(0x142)],'threadId':_0x1fe7e9[_0x5b8a4f(0x16d)],'dT':C(_0x1fe7e9[_0x5b8a4f(0x14b)]),'personId':_0x1fe7e9[_0x5b8a4f(0x126)],'resolved':_0x2e3ae1[_0x5b8a4f(0x10b)]===_0x377cc0[_0x5b8a4f(0x116)],'unitId':_0x3fd916,'subUnitId':_0x4aad09,'text':JSON[_0x5b8a4f(0x162)](_0x1fe7e9[_0x5b8a4f(0x12e)]),'parentId':_0x44b4ac}),_0x58779e=_0x11a96d(_0x2e3ae1['replies'][0x0]);return{..._0x58779e,'children':_0x2e3ae1[_0x5b8a4f(0x177)][_0x5b8a4f(0x127)](0x1)[_0x5b8a4f(0x11f)](_0x4a1301=>_0x11a96d(_0x4a1301,_0x58779e['id']))};}return null;}let j=class{constructor(_0x4ac3e3,_0x40942b,_0xb86c1c){const _0x2574c5=_0xd15b79;this[_0x2574c5(0x152)]=_0x4ac3e3,this[_0x2574c5(0x15c)]=_0x40942b,this[_0x2574c5(0x16b)]=_0xb86c1c;}async['addComment'](_0x2c59de){const _0x1151a0=_0xd15b79;var _0x51a82c,_0x592397;let {parentId:_0x1650bb,unitId:_0x504390,text:_0x61dcf5,threadId:_0x4639d2}=_0x2c59de,_0xf6285a=(_0x51a82c=(_0x592397=_0x61dcf5[_0x1151a0(0x114)])==null?void 0x0:_0x592397['filter'](_0x2a064b=>_0x2a064b[_0x1151a0(0x136)]===_0x57416f[_0x1151a0(0x16e)])[_0x1151a0(0x11f)](_0x2fbc02=>_0x2fbc02[_0x1151a0(0x171)]))==null?[]:_0x51a82c,_0x125694=JSON[_0x1151a0(0x13d)](_0x61dcf5),_0x394d61=(await this['_sessionService'][_0x1151a0(0x172)](_0x504390))['getMemberID']();if(_0x1650bb){let _0x7d7930={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a,'threadId':_0x4639d2},_0x49e559=(await this[_0x1151a0(0x152)]['post'](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x147),{'body':_0x7d7930}))[_0x1151a0(0x167)]['reply'];return{..._0x2c59de,'id':_0x49e559[_0x1151a0(0x142)],'dT':_0x41cc06(+_0x49e559[_0x1151a0(0x14b)])[_0x1151a0(0x149)](_0x1151a0(0x15b)),'personId':_0x49e559[_0x1151a0(0x126)]};}else{let _0x6b35ad={'memberId':_0x394d61,'unitId':_0x504390,'content':_0x125694,'mention':_0xf6285a};return k((await this[_0x1151a0(0x152)][_0x1151a0(0x13c)](_0x1151a0(0x12b)+_0x504390+_0x1151a0(0x143),{'body':_0x6b35ad}))['body'][_0x1151a0(0x170)],_0x2c59de);}}async['updateComment'](_0x2fcb08){const _0x1c017a=_0xd15b79;var _0x166e26,_0xd26345;let {text:_0x1f9092,unitId:_0x2bc514}=_0x2fcb08,_0x389fc3=(_0x166e26=(_0xd26345=_0x1f9092[_0x1c017a(0x114)])==null?void 0x0:_0xd26345[_0x1c017a(0x14f)](_0x22bbdf=>_0x22bbdf['rangeType']===_0x57416f[_0x1c017a(0x16e)])['map'](_0x400104=>_0x400104[_0x1c017a(0x171)]))==null?[]:_0x166e26,_0x296eb6=JSON[_0x1c017a(0x13d)](_0x1f9092),_0xaf692f=_0x2fcb08[_0x1c017a(0x16d)],_0xf9b763=_0x2fcb08['id'],_0x75df5f={'memberId':(await this['_sessionService']['requireSession'](_0x2bc514))[_0x1c017a(0x115)](),'unitId':_0x2bc514,'threadId':_0xaf692f,'mention':_0x389fc3,'content':_0x296eb6,'replyId':_0xf9b763},_0x321219=await this[_0x1c017a(0x152)][_0x1c017a(0x13c)](_0x1c017a(0x12b)+_0x2bc514+_0x1c017a(0x13f),{'body':_0x75df5f});return!_0x321219[_0x1c017a(0x167)][_0x1c017a(0x13b)]||_0x321219[_0x1c017a(0x167)]['error']['code']===0x1;}async[_0xd15b79(0x15f)](_0x5e34b1){const _0x32da46=_0xd15b79;let {unitId:_0x16388b}=_0x5e34b1,_0x16d222=_0x5e34b1['threadId'],_0x33b25c={'memberId':this[_0x32da46(0x15c)][_0x32da46(0x16c)]()[_0x32da46(0x113)],'unitId':_0x16388b,'threadId':_0x16d222,'solved':_0x5e34b1[_0x32da46(0x117)]?_0x377cc0['Solved']:_0x377cc0[_0x32da46(0x137)]},_0x120a92=await this[_0x32da46(0x152)][_0x32da46(0x13c)]('/universer-api/comment/unit/'+_0x16388b+'/solved',{'body':_0x33b25c});return!_0x120a92['body'][_0x32da46(0x13b)]||_0x120a92[_0x32da46(0x167)][_0x32da46(0x13b)][_0x32da46(0x173)]===0x1;}async[_0xd15b79(0x156)](_0x3993a9,_0x1b0dc3,_0x201f54,_0x34dcd4){const _0x2bbb08=_0xd15b79;let _0x23f612={'memberId':(await this[_0x2bbb08(0x16b)][_0x2bbb08(0x172)](_0x3993a9))[_0x2bbb08(0x115)](),'threadId':_0x201f54,'replyId':_0x34dcd4,'unitId':_0x3993a9},_0xe32e47=await this[_0x2bbb08(0x152)][_0x2bbb08(0x13c)](_0x2bbb08(0x12b)+_0x3993a9+_0x2bbb08(0x13a),{'body':_0x23f612});return!_0xe32e47['body'][_0x2bbb08(0x13b)]||_0xe32e47[_0x2bbb08(0x167)][_0x2bbb08(0x13b)][_0x2bbb08(0x173)]===0x1;}async[_0xd15b79(0x119)](_0x5242fa,_0x5838d3,_0x556e31){const _0x2c49c2=_0xd15b79;let _0x2f89aa={'unitId':_0x5242fa,'threadId':_0x556e31},_0x2f6f0c=await this[_0x2c49c2(0x152)]['post'](_0x2c49c2(0x12b)+_0x5242fa+_0x2c49c2(0x128),{'body':_0x2f89aa}),_0x248ecb=_0x556e31[_0x2c49c2(0x11f)](_0x3de4ce=>A(_0x2f6f0c[_0x2c49c2(0x167)][_0x2c49c2(0x14d)][_0x3de4ce],_0x5242fa,_0x5838d3))[_0x2c49c2(0x14f)](Boolean);return Object[_0x2c49c2(0x169)](_0x2f6f0c['body']['users'])[_0x2c49c2(0x165)](_0x3b6694=>{const _0x151045=_0x2c49c2;this[_0x151045(0x15c)]['addUser'](_0x3b6694);}),_0x248ecb;}[_0xd15b79(0x145)](_0x25fe57){const _0x503dbf=_0xd15b79;return{'id':_0x25fe57['id'],'threadId':_0x25fe57[_0x503dbf(0x16d)],'ref':_0x25fe57[_0x503dbf(0x174)]};}};j=E([T(0x0,_0x5882d4(_0x4965c2)),T(0x1,_0x5882d4(_0x3c2081)),T(0x2,_0x5882d4(_0x5d52fa))],j);let M=class extends _0x964a78{constructor(_0x49a199,_0x44691d){const _0x240d7d=_0xd15b79;super(),this[_0x240d7d(0x135)]=_0x49a199,this[_0x240d7d(0x140)]=_0x44691d,this[_0x240d7d(0x132)]();}[_0xd15b79(0x132)](){const _0x132133=_0xd15b79;this[_0x132133(0x135)][_0x132133(0x15d)]=this['_threadCommentDataSource'],this[_0x132133(0x135)]['syncUpdateMutationToColla']=!0x1;}};M=E([T(0x0,_0x59905f),T(0x1,_0x5882d4(j))],M);function N(_0x313aff){'@babel/helpers - typeof';const _0x5eb410=_0xd15b79;return N=typeof Symbol==_0x5eb410(0x178)&&typeof Symbol['iterator']==_0x5eb410(0x175)?function(_0x309e2f){return typeof _0x309e2f;}:function(_0xe99024){const _0x3107ed=_0x5eb410;return _0xe99024&&typeof Symbol==_0x3107ed(0x178)&&_0xe99024[_0x3107ed(0x11b)]===Symbol&&_0xe99024!==Symbol[_0x3107ed(0x133)]?_0x3107ed(0x175):typeof _0xe99024;},N(_0x313aff);}function P(_0x5b59e0,_0x1e32fe){const _0x2beae5=_0xd15b79;if(N(_0x5b59e0)!=_0x2beae5(0x134)||!_0x5b59e0)return _0x5b59e0;var _0xd577e4=_0x5b59e0[Symbol[_0x2beae5(0x122)]];if(_0xd577e4!==void 0x0){var _0x47a6d5=_0xd577e4[_0x2beae5(0x159)](_0x5b59e0,_0x1e32fe||'default');if(N(_0x47a6d5)!=_0x2beae5(0x134))return _0x47a6d5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x1e32fe==='string'?String:Number)(_0x5b59e0);}function F(_0x46591e){const _0x4fb0f4=_0xd15b79;var _0x2afe7b=P(_0x46591e,_0x4fb0f4(0x121));return N(_0x2afe7b)==_0x4fb0f4(0x175)?_0x2afe7b:_0x2afe7b+'';}function I(_0x1160f3,_0x3bd374,_0x23cee7){const _0x13746c=_0xd15b79;return(_0x3bd374=F(_0x3bd374))in _0x1160f3?Object[_0x13746c(0x158)](_0x1160f3,_0x3bd374,{'value':_0x23cee7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1160f3[_0x3bd374]=_0x23cee7,_0x1160f3;}let L=class extends _0x12c11e{constructor(_0x1896df=O,_0x19f372,_0x13f453){const _0x3cedf0=_0xd15b79;super(),this[_0x3cedf0(0x111)]=_0x1896df,this[_0x3cedf0(0x163)]=_0x19f372,this[_0x3cedf0(0x130)]=_0x13f453;let {..._0x3dd6bb}=_0xa513a0({},O,this[_0x3cedf0(0x111)]);this[_0x3cedf0(0x130)][_0x3cedf0(0x11a)]('thread-comment-data-source.config',_0x3dd6bb);}[_0xd15b79(0x110)](){[[j],[M],[D]]['forEach'](_0x45ac52=>{const _0x473b14=_0x5542;this[_0x473b14(0x163)][_0x473b14(0x150)](_0x45ac52);});}[_0xd15b79(0x15a)](){const _0x5bab25=_0xd15b79;this[_0x5bab25(0x163)][_0x5bab25(0x161)](M),this[_0x5bab25(0x163)][_0x5bab25(0x161)](D);}};I(L,_0xd15b79(0x14a),_0xd15b79(0x166)),I(L,'packageName',x),I(L,_0xd15b79(0x148),S),L=E([_0x2c6682(_0x5ab3d2,_0x457666,_0x1afcd4),T(0x1,_0x5882d4(_0x43fc57)),T(0x2,_0x5a4188)],L);export{L as UniverThreadCommentDataSourcePlugin};
@@ -1,2 +1,2 @@
1
- export type { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
1
+ export type { IUniverThreadCommentDataSourceConfig } from './config/config';
2
2
  export { UniverThreadCommentDataSourcePlugin } from './plugin';
@@ -1,4 +1,4 @@
1
- import type { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
1
+ import type { IUniverThreadCommentDataSourceConfig } from './config/config';
2
2
  import { IConfigService, Injector, Plugin } from '@univerjs/core';
3
3
  export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
4
4
  private readonly _config;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5ebb(_0x5364e5,_0x5d2c8b){_0x5364e5=_0x5364e5-0x12d;const _0x1704cf=_0x1704();let _0x5ebbfc=_0x1704cf[_0x5364e5];return _0x5ebbfc;}function _0x1704(){const _0x614eb=['744780PRbKZP','exports','CustomRangeType','symbol','Solved','delete','getComment','onStarting','UserManagerService','_httpService','@univerjs/thread-comment','Delete','get','UniverThreadCommentUIPlugin','22281tudmAf','@univerjs/protocol','UniverProLicense','listComments','amd','_sessionService','534kYwJYm','pipe','IThreadCommentDataSourceService','requireSession','Solve','bufferTime','Inject','UniverProThreadCommentDatasource','payload','onReady','UniverProCollaborationClient','map','COMMENT','getUnit','OpenOrReOpen','270288OXFEXS','Add','users','userID','disposeWithMe','Disposable','_threadCommentDataSource','/delete','@univerjs/thread-comment-ui','_threadCommentModel','DependentOn','packageName','content','body','_init','slice','IConfigService','addComment','unitId','_commentService','stringify','136xdOIgL','1616vxypTs','getUser','type','personId','1584162oHlPZb','toPrimitive','_config','_userService','forEach','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Reply','@univerjs/core','prototype','getCurrentUser','values','dateKit','@univerjs-pro/thread-comment-datasource','commentUpdate$','_configService','0.25.1','length','/universer-api/comment/unit/','HTTPService','post','customRanges','_threadCommentDataSourceService','/universer-api/user/list','UniverCore','CommentUpdateEventType','comments','UniverCollaborationClientPlugin','17427dmaKiM','/solved','replies','saveCommentToSnapshot','deleteComment','CommentSolvedStatus','toStringTag','addUser','@univerjs/network','replyId','size','getMemberID','call','filter','3207017EMQVWq','decorate','ThreadCommentModel','format','find','/reply','UniverThreadCommentUi','CommentService','comment','solved','UniverProtocol','UniverThreadCommentDataSourcePlugin','10YzmEpS','reply','@univerjs-pro/license','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','default','rxjs','root','function','rangeId','parse','Injector','error','userId','subscribe','syncUpdateMutationToColla','parentId','UniverThreadComment','/add','threadId','defineProperty','CollaborationSessionService','/edit','user','_injector','object','string','updateComment','Plugin','code','createTimestamp','UniverNetwork','resolved','2QLVzid'];_0x1704=function(){return _0x614eb;};return _0x1704();}(function(_0x339319,_0x459c98){const _0x2090e4=_0x5ebb,_0x55ce25=_0x339319();while(!![]){try{const _0x4ae687=parseInt(_0x2090e4(0x164))/0x1*(parseInt(_0x2090e4(0x1a0))/0x2)+parseInt(_0x2090e4(0x1b5))/0x3*(-parseInt(_0x2090e4(0x145))/0x4)+parseInt(_0x2090e4(0x1a1))/0x5+-parseInt(_0x2090e4(0x12f))/0x6+parseInt(_0x2090e4(0x1af))/0x7*(-parseInt(_0x2090e4(0x144))/0x8)+parseInt(_0x2090e4(0x149))/0x9*(-parseInt(_0x2090e4(0x17e))/0xa)+parseInt(_0x2090e4(0x172))/0xb;if(_0x4ae687===_0x459c98)break;else _0x55ce25['push'](_0x55ce25['shift']());}catch(_0x1d8066){_0x55ce25['push'](_0x55ce25['shift']());}}}(_0x1704,0x1b0f9),function(_0x3706bb,_0x3706c7){const _0x519a8d=_0x5ebb;typeof exports==_0x519a8d(0x198)&&typeof module<'u'?_0x3706c7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x519a8d(0x187)&&define[_0x519a8d(0x1b3)]?define([_0x519a8d(0x1a2),'@univerjs-pro/collaboration-client',_0x519a8d(0x180),_0x519a8d(0x150),_0x519a8d(0x137),_0x519a8d(0x1b0),_0x519a8d(0x1ab),_0x519a8d(0x185),_0x519a8d(0x16c)],_0x3706c7):(_0x3706bb=typeof globalThis<'u'?globalThis:_0x3706bb||self,_0x3706c7(_0x3706bb[_0x519a8d(0x1bc)]={},_0x3706bb[_0x519a8d(0x1bf)],_0x3706bb[_0x519a8d(0x1b1)],_0x3706bb[_0x519a8d(0x160)],_0x3706bb[_0x519a8d(0x178)],_0x3706bb[_0x519a8d(0x17c)],_0x3706bb[_0x519a8d(0x190)],_0x3706bb[_0x519a8d(0x185)],_0x3706bb[_0x519a8d(0x19e)]));}(this,function(_0x33f0e5,_0x24426e,_0x4a513d,_0xcafa72,_0x48398d,_0x34bcc5,_0x36a034,_0x4d6f3c,_0x54a381){const _0x282255=_0x5ebb;Object['defineProperty'](_0x33f0e5,Symbol[_0x282255(0x16a)],{'value':'Module'});var _0xee7654=_0x282255(0x155),_0x1b82ed=_0x282255(0x158);let _0x2793cb=_0x2e070e=>(0x0,_0xcafa72[_0x282255(0x154)])(new Date(+_0x2e070e))[_0x282255(0x175)]('YYYY/MM/DD\x20HH:mm'),_0x1d3002=async(_0x4de39d,_0x2f4b21)=>{const _0x5f59ae=_0x282255;let _0x174d81=_0x4de39d[_0x5f59ae(0x1ad)](_0xcafa72[_0x5f59ae(0x1a9)]),_0x100ae1=_0x4de39d[_0x5f59ae(0x1ad)](_0x54a381['HTTPService']);_0x2f4b21[_0x5f59ae(0x14d)](_0x109ad4=>{const _0xbc0340=_0x5f59ae;_0x174d81[_0xbc0340(0x146)](_0x109ad4)&&_0x2f4b21[_0xbc0340(0x1a6)](_0x109ad4);}),_0x2f4b21[_0x5f59ae(0x16e)]&&(await _0x100ae1['get'](_0x5f59ae(0x15f),{'params':{'userIDs':[..._0x2f4b21]}}))[_0x5f59ae(0x13c)][_0x5f59ae(0x131)]['forEach'](_0x2158c3=>{const _0x1b393d=_0x5f59ae;_0x2158c3&&_0x174d81[_0x1b393d(0x16b)](_0x2158c3);});};function _0x12fa85(_0x6faef3,_0x3a908a){return function(_0x1421bf,_0x884309){_0x3a908a(_0x1421bf,_0x884309,_0x6faef3);};}function _0x443909(_0x4c8afc,_0x420bfc,_0x54af09,_0x2c892d){const _0x3ad38f=_0x282255;var _0x51163b=arguments[_0x3ad38f(0x159)],_0x37a471=_0x51163b<0x3?_0x420bfc:_0x2c892d===null?_0x2c892d=Object['getOwnPropertyDescriptor'](_0x420bfc,_0x54af09):_0x2c892d,_0x447d2a;if(typeof Reflect==_0x3ad38f(0x198)&&typeof Reflect[_0x3ad38f(0x173)]==_0x3ad38f(0x187))_0x37a471=Reflect[_0x3ad38f(0x173)](_0x4c8afc,_0x420bfc,_0x54af09,_0x2c892d);else{for(var _0x318b3e=_0x4c8afc[_0x3ad38f(0x159)]-0x1;_0x318b3e>=0x0;_0x318b3e--)(_0x447d2a=_0x4c8afc[_0x318b3e])&&(_0x37a471=(_0x51163b<0x3?_0x447d2a(_0x37a471):_0x51163b>0x3?_0x447d2a(_0x420bfc,_0x54af09,_0x37a471):_0x447d2a(_0x420bfc,_0x54af09))||_0x37a471);}return _0x51163b>0x3&&_0x37a471&&Object[_0x3ad38f(0x193)](_0x420bfc,_0x54af09,_0x37a471),_0x37a471;}let _0x51eb27=class extends _0xcafa72[_0x282255(0x134)]{constructor(_0x177ecb,_0x39698c,_0x476560,_0x417068){const _0xb600c8=_0x282255;super(),this[_0xb600c8(0x142)]=_0x177ecb,this['_threadCommentModel']=_0x39698c,this[_0xb600c8(0x14c)]=_0x476560,this[_0xb600c8(0x197)]=_0x417068,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x41e85f=_0x282255;this[_0x41e85f(0x133)](this['_threadCommentModel'][_0x41e85f(0x156)][_0x41e85f(0x1b6)]((0x0,_0x4d6f3c[_0x41e85f(0x1ba)])(0x10))[_0x41e85f(0x18d)](_0x46233d=>{const _0x5bd83e=_0x41e85f;let _0x5b668f=new Set();_0x46233d['forEach'](_0x24fd19=>{const _0x1b08e4=_0x5ebb;switch(_0x24fd19[_0x1b08e4(0x147)]){case _0x1b08e4(0x181):{let _0x3215c9=_0x24fd19[_0x1b08e4(0x1bd)][_0x1b08e4(0x148)];_0x5b668f[_0x1b08e4(0x181)](_0x3215c9);break;}default:break;}}),_0x1d3002(this[_0x5bd83e(0x197)],_0x5b668f);}));}[_0x282255(0x13d)](){const _0x4bde80=_0x282255;this[_0x4bde80(0x133)](this[_0x4bde80(0x142)][_0x4bde80(0x156)][_0x4bde80(0x18d)](async _0x5c44d1=>{const _0x4b9353=_0x4bde80;var _0x1cc970;let _0x1cfaf1=(_0x1cc970=this['_threadCommentModel'][_0x4b9353(0x12d)](_0x5c44d1[_0x4b9353(0x141)])['find'](_0x35101f=>_0x35101f[_0x4b9353(0x192)]===_0x5c44d1['threadId']))==null?void 0x0:_0x1cc970['root'];if(!_0x1cfaf1)return;let {unitId:_0x55130a,subUnitId:_0x582222}=_0x1cfaf1;switch(_0x5c44d1[_0x4b9353(0x196)]&&this['_userService'][_0x4b9353(0x16b)](_0x5c44d1[_0x4b9353(0x196)]),_0x5c44d1[_0x4b9353(0x147)]){case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x130)]:break;case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x14f)]:var _0x1259a2,_0x41a9cb;this[_0x4b9353(0x138)][_0x4b9353(0x140)](_0x55130a,_0x582222,{'unitId':_0x55130a,'subUnitId':_0x582222,'ref':'','id':_0x5c44d1[_0x4b9353(0x16d)],'dT':_0x2793cb(+_0x5c44d1[_0x4b9353(0x19d)]),'threadId':_0x5c44d1[_0x4b9353(0x192)],'personId':(_0x1259a2=(_0x41a9cb=_0x5c44d1[_0x4b9353(0x196)])==null?void 0x0:_0x41a9cb['userID'])==null?_0x5c44d1['userId']:_0x1259a2,'text':JSON[_0x4b9353(0x189)](_0x5c44d1[_0x4b9353(0x13b)]),'parentId':_0x1cfaf1['id']});break;case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x1ac)]:{let _0x1690f7=this['_threadCommentModel'][_0x4b9353(0x1a7)](_0x55130a,_0x582222,_0x5c44d1[_0x4b9353(0x16d)]);_0x1690f7&&_0x1690f7[_0x4b9353(0x18f)]&&this['_threadCommentModel'][_0x4b9353(0x168)](_0x55130a,_0x582222,_0x5c44d1[_0x4b9353(0x16d)]);break;}case _0x34bcc5[_0x4b9353(0x161)]['Edit']:this[_0x4b9353(0x138)][_0x4b9353(0x19a)](_0x55130a,_0x582222,{'commentId':_0x5c44d1[_0x4b9353(0x16d)],'text':JSON[_0x4b9353(0x189)](_0x5c44d1['content'])});break;case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x1b9)]:{var _0x1b3b84;let _0x4257fa=(_0x1b3b84=this['_threadCommentModel'][_0x4b9353(0x12d)](_0x5c44d1[_0x4b9353(0x141)])[_0x4b9353(0x176)](_0x3b7099=>_0x3b7099[_0x4b9353(0x192)]===_0x5c44d1[_0x4b9353(0x192)]))==null?void 0x0:_0x1b3b84[_0x4b9353(0x186)];_0x4257fa&&this['_threadCommentModel']['resolveComment'](_0x55130a,_0x582222,_0x4257fa['id'],_0x5c44d1[_0x4b9353(0x17b)]===_0x34bcc5[_0x4b9353(0x169)][_0x4b9353(0x1a5)]);break;}default:break;}}));}};_0x51eb27=_0x443909([_0x12fa85(0x0,(0x0,_0xcafa72['Inject'])(_0x24426e[_0x282255(0x179)])),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0x36a034[_0x282255(0x174)])),_0x12fa85(0x2,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x1a9)])),_0x12fa85(0x3,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x18a)]))],_0x51eb27);let _0x59a1a7={};function _0x27cc44(_0x60304c,_0x1be19b){const _0x2f0ab5=_0x282255;let _0x441010=_0x60304c[_0x2f0ab5(0x166)][0x0];return{..._0x1be19b,'id':_0x441010[_0x2f0ab5(0x16d)],'resolved':_0x60304c[_0x2f0ab5(0x17b)]===0x1,'dT':_0x2793cb(_0x441010[_0x2f0ab5(0x19d)]),'personId':_0x441010[_0x2f0ab5(0x18c)],'threadId':_0x441010['threadId']};}function _0x57f6cb(_0x1ccc0c,_0x1d418c,_0x855974){const _0x3f88d9=_0x282255;var _0x56e5f9,_0x279784;if(((_0x56e5f9=_0x1ccc0c==null||(_0x279784=_0x1ccc0c[_0x3f88d9(0x166)])==null?void 0x0:_0x279784['length'])==null?0x0:_0x56e5f9)>0x0){let _0x5447f9=(_0x411b3c,_0x518b6a)=>({'id':_0x411b3c[_0x3f88d9(0x16d)],'threadId':_0x411b3c['threadId'],'dT':_0x2793cb(_0x411b3c[_0x3f88d9(0x19d)]),'personId':_0x411b3c[_0x3f88d9(0x18c)],'resolved':_0x1ccc0c['solved']===_0x34bcc5['CommentSolvedStatus'][_0x3f88d9(0x1a5)],'unitId':_0x1d418c,'subUnitId':_0x855974,'text':JSON[_0x3f88d9(0x189)](_0x411b3c['content']),'parentId':_0x518b6a}),_0x291921=_0x5447f9(_0x1ccc0c[_0x3f88d9(0x166)][0x0]);return{..._0x291921,'children':_0x1ccc0c[_0x3f88d9(0x166)][_0x3f88d9(0x13e)](0x1)[_0x3f88d9(0x1c0)](_0x51f602=>_0x5447f9(_0x51f602,_0x291921['id']))};}return null;}let _0xed0191=class{constructor(_0x287cd6,_0x38e343,_0x4d2667){const _0x3defc6=_0x282255;this[_0x3defc6(0x1aa)]=_0x287cd6,this[_0x3defc6(0x14c)]=_0x38e343,this[_0x3defc6(0x1b4)]=_0x4d2667;}async['addComment'](_0x1968c2){const _0x4d825b=_0x282255;var _0x356122,_0x5073df;let {parentId:_0x20ae10,unitId:_0x4109a3,text:_0x32fc71,threadId:_0x416361}=_0x1968c2,_0x45a5a1=(_0x356122=(_0x5073df=_0x32fc71[_0x4d825b(0x15d)])==null?void 0x0:_0x5073df['filter'](_0x3076d3=>_0x3076d3['rangeType']===_0xcafa72['CustomRangeType'][_0x4d825b(0x1c1)])[_0x4d825b(0x1c0)](_0x559545=>_0x559545['rangeId']))==null?[]:_0x356122,_0x1ae202=JSON[_0x4d825b(0x143)](_0x32fc71),_0x758534=(await this[_0x4d825b(0x1b4)]['requireSession'](_0x4109a3))['getMemberID']();if(_0x20ae10){let _0x68c23={'memberId':_0x758534,'unitId':_0x4109a3,'content':_0x1ae202,'mention':_0x45a5a1,'threadId':_0x416361},_0x1266cf=(await this[_0x4d825b(0x1aa)][_0x4d825b(0x15c)](_0x4d825b(0x15a)+_0x4109a3+_0x4d825b(0x177),{'body':_0x68c23}))[_0x4d825b(0x13c)][_0x4d825b(0x17f)];return{..._0x1968c2,'id':_0x1266cf[_0x4d825b(0x16d)],'dT':(0x0,_0xcafa72[_0x4d825b(0x154)])(+_0x1266cf['createTimestamp'])[_0x4d825b(0x175)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1266cf['userId']};}else{let _0x29495d={'memberId':_0x758534,'unitId':_0x4109a3,'content':_0x1ae202,'mention':_0x45a5a1};return _0x27cc44((await this[_0x4d825b(0x1aa)][_0x4d825b(0x15c)]('/universer-api/comment/unit/'+_0x4109a3+_0x4d825b(0x191),{'body':_0x29495d}))[_0x4d825b(0x13c)][_0x4d825b(0x17a)],_0x1968c2);}}async['updateComment'](_0x48af7a){const _0x428da3=_0x282255;var _0x1cfd85,_0x3dbd25;let {text:_0x539d3b,unitId:_0x5cf529}=_0x48af7a,_0x146065=(_0x1cfd85=(_0x3dbd25=_0x539d3b['customRanges'])==null?void 0x0:_0x3dbd25[_0x428da3(0x171)](_0x2af93b=>_0x2af93b['rangeType']===_0xcafa72[_0x428da3(0x1a3)][_0x428da3(0x1c1)])['map'](_0x11429e=>_0x11429e[_0x428da3(0x188)]))==null?[]:_0x1cfd85,_0x38debc=JSON['stringify'](_0x539d3b),_0x4a4415=_0x48af7a[_0x428da3(0x192)],_0x364861=_0x48af7a['id'],_0x569828={'memberId':(await this[_0x428da3(0x1b4)][_0x428da3(0x1b8)](_0x5cf529))[_0x428da3(0x16f)](),'unitId':_0x5cf529,'threadId':_0x4a4415,'mention':_0x146065,'content':_0x38debc,'replyId':_0x364861},_0x5b7db0=await this[_0x428da3(0x1aa)][_0x428da3(0x15c)](_0x428da3(0x15a)+_0x5cf529+_0x428da3(0x195),{'body':_0x569828});return!_0x5b7db0[_0x428da3(0x13c)][_0x428da3(0x18b)]||_0x5b7db0['body'][_0x428da3(0x18b)][_0x428da3(0x19c)]===0x1;}async['resolveComment'](_0x3c0325){const _0x251a29=_0x282255;let {unitId:_0x290a2b}=_0x3c0325,_0x8b6e7d=_0x3c0325['threadId'],_0x5aa88b={'memberId':this['_userService'][_0x251a29(0x152)]()[_0x251a29(0x132)],'unitId':_0x290a2b,'threadId':_0x8b6e7d,'solved':_0x3c0325[_0x251a29(0x19f)]?_0x34bcc5[_0x251a29(0x169)]['Solved']:_0x34bcc5[_0x251a29(0x169)][_0x251a29(0x12e)]},_0x1ea437=await this[_0x251a29(0x1aa)]['post'](_0x251a29(0x15a)+_0x290a2b+_0x251a29(0x165),{'body':_0x5aa88b});return!_0x1ea437[_0x251a29(0x13c)][_0x251a29(0x18b)]||_0x1ea437[_0x251a29(0x13c)]['error'][_0x251a29(0x19c)]===0x1;}async[_0x282255(0x168)](_0x1c3013,_0x525dd7,_0x9ffb92,_0x510f82){const _0xc976b4=_0x282255;let _0xd104f5={'memberId':(await this['_sessionService'][_0xc976b4(0x1b8)](_0x1c3013))[_0xc976b4(0x16f)](),'threadId':_0x9ffb92,'replyId':_0x510f82,'unitId':_0x1c3013},_0x2dc3b6=await this[_0xc976b4(0x1aa)][_0xc976b4(0x15c)](_0xc976b4(0x15a)+_0x1c3013+_0xc976b4(0x136),{'body':_0xd104f5});return!_0x2dc3b6[_0xc976b4(0x13c)][_0xc976b4(0x18b)]||_0x2dc3b6[_0xc976b4(0x13c)]['error'][_0xc976b4(0x19c)]===0x1;}async[_0x282255(0x1b2)](_0x229519,_0x3f105b,_0x355f14){const _0x23b20c=_0x282255;let _0x294902={'unitId':_0x229519,'threadId':_0x355f14},_0x58feaa=await this['_httpService']['post'](_0x23b20c(0x15a)+_0x229519+'/list',{'body':_0x294902}),_0x303f54=_0x355f14[_0x23b20c(0x1c0)](_0x5f2cae=>_0x57f6cb(_0x58feaa['body'][_0x23b20c(0x162)][_0x5f2cae],_0x229519,_0x3f105b))['filter'](Boolean);return Object[_0x23b20c(0x153)](_0x58feaa[_0x23b20c(0x13c)][_0x23b20c(0x131)])['forEach'](_0x2c6bad=>{const _0x3fdbbd=_0x23b20c;this[_0x3fdbbd(0x14c)][_0x3fdbbd(0x16b)](_0x2c6bad);}),_0x303f54;}[_0x282255(0x167)](_0x5c6b7f){const _0x8304ae=_0x282255;return{'id':_0x5c6b7f['id'],'threadId':_0x5c6b7f[_0x8304ae(0x192)],'ref':_0x5c6b7f['ref']};}};_0xed0191=_0x443909([_0x12fa85(0x0,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0x54a381[_0x282255(0x15b)])),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x1a9)])),_0x12fa85(0x2,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0x24426e[_0x282255(0x194)]))],_0xed0191);let _0x3824e5=class extends _0xcafa72[_0x282255(0x134)]{constructor(_0x326af4,_0x5aed8f){const _0x12dd6c=_0x282255;super(),this[_0x12dd6c(0x15e)]=_0x326af4,this[_0x12dd6c(0x135)]=_0x5aed8f,this[_0x12dd6c(0x183)]();}[_0x282255(0x183)](){const _0x5c6d31=_0x282255;this[_0x5c6d31(0x15e)]['dataSource']=this[_0x5c6d31(0x135)],this['_threadCommentDataSourceService'][_0x5c6d31(0x18e)]=!0x1;}};_0x3824e5=_0x443909([_0x12fa85(0x0,_0x36a034[_0x282255(0x1b7)]),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xed0191))],_0x3824e5);function _0x39446a(_0x29c46c){'@babel/helpers - typeof';const _0x1b66ac=_0x282255;return _0x39446a=typeof Symbol==_0x1b66ac(0x187)&&typeof Symbol['iterator']=='symbol'?function(_0x3a4e50){return typeof _0x3a4e50;}:function(_0xbe2e2d){const _0x200ed6=_0x1b66ac;return _0xbe2e2d&&typeof Symbol==_0x200ed6(0x187)&&_0xbe2e2d['constructor']===Symbol&&_0xbe2e2d!==Symbol[_0x200ed6(0x151)]?_0x200ed6(0x1a4):typeof _0xbe2e2d;},_0x39446a(_0x29c46c);}function _0x37691a(_0x5d5835,_0x137d55){const _0x1f7164=_0x282255;if(_0x39446a(_0x5d5835)!=_0x1f7164(0x198)||!_0x5d5835)return _0x5d5835;var _0x313f72=_0x5d5835[Symbol[_0x1f7164(0x14a)]];if(_0x313f72!==void 0x0){var _0x5883fa=_0x313f72[_0x1f7164(0x170)](_0x5d5835,_0x137d55||_0x1f7164(0x184));if(_0x39446a(_0x5883fa)!=_0x1f7164(0x198))return _0x5883fa;throw TypeError(_0x1f7164(0x14e));}return(_0x137d55===_0x1f7164(0x199)?String:Number)(_0x5d5835);}function _0x369642(_0x5e7d56){const _0xa31c96=_0x282255;var _0x1ad395=_0x37691a(_0x5e7d56,_0xa31c96(0x199));return _0x39446a(_0x1ad395)==_0xa31c96(0x1a4)?_0x1ad395:_0x1ad395+'';}function _0xba2950(_0x3ba3c0,_0x257317,_0x50bf5f){const _0x37916f=_0x282255;return(_0x257317=_0x369642(_0x257317))in _0x3ba3c0?Object[_0x37916f(0x193)](_0x3ba3c0,_0x257317,{'value':_0x50bf5f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ba3c0[_0x257317]=_0x50bf5f,_0x3ba3c0;}let _0xd1b644=class extends _0xcafa72[_0x282255(0x19b)]{constructor(_0x58de19=_0x59a1a7,_0x511526,_0x35f073){const _0x457cee=_0x282255;super(),this[_0x457cee(0x14b)]=_0x58de19,this[_0x457cee(0x197)]=_0x511526,this[_0x457cee(0x157)]=_0x35f073;let {..._0xe96e15}=(0x0,_0xcafa72['merge'])({},_0x59a1a7,this['_config']);this[_0x457cee(0x157)]['setConfig']('thread-comment-data-source.config',_0xe96e15);}[_0x282255(0x1a8)](){[[_0xed0191],[_0x3824e5],[_0x51eb27]]['forEach'](_0x15d335=>{const _0x3e61bb=_0x5ebb;this[_0x3e61bb(0x197)]['add'](_0x15d335);});}[_0x282255(0x1be)](){const _0xe0cca=_0x282255;this['_injector'][_0xe0cca(0x1ad)](_0x3824e5),this['_injector'][_0xe0cca(0x1ad)](_0x51eb27);}};_0xba2950(_0xd1b644,'pluginName',_0x282255(0x182)),_0xba2950(_0xd1b644,_0x282255(0x13a),_0xee7654),_0xba2950(_0xd1b644,'version',_0x1b82ed),_0xd1b644=_0x443909([(0x0,_0xcafa72[_0x282255(0x139)])(_0x48398d[_0x282255(0x1ae)],_0x24426e[_0x282255(0x163)],_0x4a513d['UniverLicensePlugin']),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x18a)])),_0x12fa85(0x2,_0xcafa72[_0x282255(0x13f)])],_0xd1b644),Object['defineProperty'](_0x33f0e5,_0x282255(0x17d),{'enumerable':!0x0,'get':function(){return _0xd1b644;}});}));
1
+ function _0x17a8(){const _0x3560dd=['OpenOrReOpen','UniverThreadCommentUi','@univerjs-pro/license','filter','amd','COMMENT','getUser','Injector','error','_initDataSource','content','default','defineProperty','requireSession','IConfigService','Solve','/add','reply','exports','HTTPService','28820BZsRFy','2704597ITALhF','replies','3716184wptFNE','userId','CollaborationSessionService','getMemberID','pluginName','ref','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','@univerjs-pro/thread-comment-datasource','rangeType','call','YYYY/MM/DD\x20HH:mm','code','getUnit','/universer-api/comment/unit/','40456juJbYO','packageName','subscribe','1.0.0-alpha.1','rangeId','bufferTime','userID','resolveComment','forEach','ThreadCommentModel','UniverThreadComment','1378431RssmNY','deleteComment','getComment','dateKit','get','addComment','pipe','4232464oFclFk','comments','syncUpdateMutationToColla','Solved','_userService','@univerjs-pro/collaboration-client','Module','@univerjs/protocol','UniverLicensePlugin','4jewsgJ','disposeWithMe','root','@univerjs/network','_threadCommentModel','slice','length','Edit','15FeiYjY','add','comment','_httpService','replyId','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Inject','body','getOwnPropertyDescriptor','@univerjs/core','/delete','onReady','_sessionService','41570RbFykR','function','size','decorate','solved','find','rxjs','createTimestamp','737cHopEF','payload','type','iterator','/solved','prototype','/list','thread-comment-data-source.config','CustomRangeType','Reply','delete','getCurrentUser','_config','setConfig','post','stringify','UniverThreadCommentUIPlugin','commentUpdate$','Add','CommentUpdateEventType','dataSource','Delete','updateComment','/universer-api/user/list','symbol','users','onStarting','UserManagerService','user','string','_configService','CommentSolvedStatus','Plugin','customRanges','_initUserSync','9EMixOh','UniverProCollaborationClient','parentId','_threadCommentDataSourceService','threadId','map','addUser','Disposable','_commentService','object','UniverNetwork','unitId','@univerjs/thread-comment'];_0x17a8=function(){return _0x3560dd;};return _0x17a8();}function _0x40c8(_0x2c7970,_0xb51c37){_0x2c7970=_0x2c7970-0x109;const _0x17a8f8=_0x17a8();let _0x40c86a=_0x17a8f8[_0x2c7970];return _0x40c86a;}(function(_0x2d6561,_0x4a2640){const _0x3b4e56=_0x40c8,_0x5639dc=_0x2d6561();while(!![]){try{const _0x38e116=-parseInt(_0x3b4e56(0x151))/0x1*(-parseInt(_0x3b4e56(0x16c))/0x2)+parseInt(_0x3b4e56(0x15c))/0x3+-parseInt(_0x3b4e56(0x13e))/0x4*(parseInt(_0x3b4e56(0x174))/0x5)+-parseInt(_0x3b4e56(0x141))/0x6+-parseInt(_0x3b4e56(0x13f))/0x7+-parseInt(_0x3b4e56(0x163))/0x8*(-parseInt(_0x3b4e56(0x11d))/0x9)+parseInt(_0x3b4e56(0x181))/0xa*(parseInt(_0x3b4e56(0x189))/0xb);if(_0x38e116===_0x4a2640)break;else _0x5639dc['push'](_0x5639dc['shift']());}catch(_0x4b2998){_0x5639dc['push'](_0x5639dc['shift']());}}}(_0x17a8,0x4e468),function(_0x254997,_0x1952ef){const _0x4e357e=_0x40c8;typeof exports==_0x4e357e(0x126)&&typeof module<'u'?_0x1952ef(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x4e357e(0x182)&&define[_0x4e357e(0x12e)]?define([_0x4e357e(0x13c),_0x4e357e(0x168),_0x4e357e(0x12c),_0x4e357e(0x17d),'@univerjs/thread-comment-ui',_0x4e357e(0x16a),_0x4e357e(0x129),_0x4e357e(0x187),_0x4e357e(0x16f)],_0x1952ef):(_0x254997=typeof globalThis<'u'?globalThis:_0x254997||self,_0x1952ef(_0x254997['UniverProThreadCommentDatasource']={},_0x254997[_0x4e357e(0x11e)],_0x254997['UniverProLicense'],_0x254997['UniverCore'],_0x254997[_0x4e357e(0x12b)],_0x254997['UniverProtocol'],_0x254997[_0x4e357e(0x15b)],_0x254997['rxjs'],_0x254997[_0x4e357e(0x127)]));}(this,function(_0xe16ac3,_0x19c609,_0x5bb6b3,_0x56fec2,_0x4ee8fc,_0x5aaa67,_0x4edabe,_0x10b5fd,_0x52e141){const _0x3e11c3=_0x40c8;Object['defineProperty'](_0xe16ac3,Symbol['toStringTag'],{'value':_0x3e11c3(0x169)});var _0x28ccec=_0x3e11c3(0x14a),_0x29db91=_0x3e11c3(0x154);let _0x1a5763=_0x3d65d8=>(0x0,_0x56fec2['dateKit'])(new Date(+_0x3d65d8))[_0x3e11c3(0x149)]('YYYY/MM/DD\x20HH:mm'),_0x181f09=async(_0x2e6e19,_0x12707a)=>{const _0x2784ba=_0x3e11c3;let _0x2a6b05=_0x2e6e19['get'](_0x56fec2[_0x2784ba(0x115)]),_0xf93607=_0x2e6e19['get'](_0x52e141['HTTPService']);_0x12707a[_0x2784ba(0x159)](_0x3c6791=>{const _0x188480=_0x2784ba;_0x2a6b05[_0x188480(0x130)](_0x3c6791)&&_0x12707a[_0x188480(0x193)](_0x3c6791);}),_0x12707a[_0x2784ba(0x183)]&&(await _0xf93607[_0x2784ba(0x160)](_0x2784ba(0x111),{'params':{'userIDs':[..._0x12707a]}}))[_0x2784ba(0x17b)]['users'][_0x2784ba(0x159)](_0x19ef73=>{const _0x35d105=_0x2784ba;_0x19ef73&&_0x2a6b05[_0x35d105(0x123)](_0x19ef73);});};function _0x57d8a5(_0x213afb,_0x1fbd2a){return function(_0x4d5b7f,_0x18d316){_0x1fbd2a(_0x4d5b7f,_0x18d316,_0x213afb);};}function _0x30face(_0x3d5e38,_0x23b615,_0x1736c0,_0x255cdd){const _0x4b08c3=_0x3e11c3;var _0x30d70a=arguments['length'],_0x527467=_0x30d70a<0x3?_0x23b615:_0x255cdd===null?_0x255cdd=Object[_0x4b08c3(0x17c)](_0x23b615,_0x1736c0):_0x255cdd,_0x24898a;if(typeof Reflect=='object'&&typeof Reflect[_0x4b08c3(0x184)]==_0x4b08c3(0x182))_0x527467=Reflect[_0x4b08c3(0x184)](_0x3d5e38,_0x23b615,_0x1736c0,_0x255cdd);else{for(var _0x30f683=_0x3d5e38['length']-0x1;_0x30f683>=0x0;_0x30f683--)(_0x24898a=_0x3d5e38[_0x30f683])&&(_0x527467=(_0x30d70a<0x3?_0x24898a(_0x527467):_0x30d70a>0x3?_0x24898a(_0x23b615,_0x1736c0,_0x527467):_0x24898a(_0x23b615,_0x1736c0))||_0x527467);}return _0x30d70a>0x3&&_0x527467&&Object[_0x4b08c3(0x136)](_0x23b615,_0x1736c0,_0x527467),_0x527467;}let _0x44056e=class extends _0x56fec2[_0x3e11c3(0x124)]{constructor(_0xe3cefc,_0x2cb2fd,_0x395a17,_0x725013){const _0x1e4d4a=_0x3e11c3;super(),this[_0x1e4d4a(0x125)]=_0xe3cefc,this[_0x1e4d4a(0x170)]=_0x2cb2fd,this[_0x1e4d4a(0x167)]=_0x395a17,this[_0x1e4d4a(0x147)]=_0x725013,this['_init'](),this['_initUserSync']();}[_0x3e11c3(0x11c)](){const _0x18aeda=_0x3e11c3;this[_0x18aeda(0x16d)](this[_0x18aeda(0x170)][_0x18aeda(0x10b)][_0x18aeda(0x162)]((0x0,_0x10b5fd[_0x18aeda(0x156)])(0x10))[_0x18aeda(0x153)](_0x3cc7cc=>{const _0x5a354c=_0x18aeda;let _0x396087=new Set();_0x3cc7cc[_0x5a354c(0x159)](_0x246c7e=>{const _0x2229dc=_0x5a354c;switch(_0x246c7e[_0x2229dc(0x18b)]){case'add':{let _0x243cfb=_0x246c7e[_0x2229dc(0x18a)]['personId'];_0x396087['add'](_0x243cfb);break;}default:break;}}),_0x181f09(this['_injector'],_0x396087);}));}['_init'](){const _0x371361=_0x3e11c3;this[_0x371361(0x16d)](this['_commentService'][_0x371361(0x10b)][_0x371361(0x153)](async _0x362e51=>{const _0x46d2de=_0x371361;var _0x158454;let _0x19a828=(_0x158454=this['_threadCommentModel'][_0x46d2de(0x14f)](_0x362e51[_0x46d2de(0x128)])[_0x46d2de(0x186)](_0x3a3357=>_0x3a3357[_0x46d2de(0x121)]===_0x362e51[_0x46d2de(0x121)]))==null?void 0x0:_0x158454[_0x46d2de(0x16e)];if(!_0x19a828)return;let {unitId:_0x17a550,subUnitId:_0x5342b9}=_0x19a828;switch(_0x362e51['user']&&this[_0x46d2de(0x167)]['addUser'](_0x362e51[_0x46d2de(0x116)]),_0x362e51[_0x46d2de(0x18b)]){case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x10c)]:break;case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x192)]:var _0x471e8a,_0x52b450;this[_0x46d2de(0x170)][_0x46d2de(0x161)](_0x17a550,_0x5342b9,{'unitId':_0x17a550,'subUnitId':_0x5342b9,'ref':'','id':_0x362e51[_0x46d2de(0x178)],'dT':_0x1a5763(+_0x362e51['createTimestamp']),'threadId':_0x362e51[_0x46d2de(0x121)],'personId':(_0x471e8a=(_0x52b450=_0x362e51[_0x46d2de(0x116)])==null?void 0x0:_0x52b450[_0x46d2de(0x157)])==null?_0x362e51[_0x46d2de(0x142)]:_0x471e8a,'text':JSON['parse'](_0x362e51[_0x46d2de(0x134)]),'parentId':_0x19a828['id']});break;case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x10f)]:{let _0x44c9f3=this[_0x46d2de(0x170)][_0x46d2de(0x15e)](_0x17a550,_0x5342b9,_0x362e51[_0x46d2de(0x178)]);_0x44c9f3&&_0x44c9f3[_0x46d2de(0x11f)]&&this['_threadCommentModel'][_0x46d2de(0x15d)](_0x17a550,_0x5342b9,_0x362e51[_0x46d2de(0x178)]);break;}case _0x5aaa67[_0x46d2de(0x10d)][_0x46d2de(0x173)]:this[_0x46d2de(0x170)][_0x46d2de(0x110)](_0x17a550,_0x5342b9,{'commentId':_0x362e51[_0x46d2de(0x178)],'text':JSON['parse'](_0x362e51[_0x46d2de(0x134)])});break;case _0x5aaa67['CommentUpdateEventType'][_0x46d2de(0x139)]:{var _0x13ef4e;let _0x2f7baa=(_0x13ef4e=this[_0x46d2de(0x170)][_0x46d2de(0x14f)](_0x362e51[_0x46d2de(0x128)])[_0x46d2de(0x186)](_0x197ca8=>_0x197ca8[_0x46d2de(0x121)]===_0x362e51[_0x46d2de(0x121)]))==null?void 0x0:_0x13ef4e[_0x46d2de(0x16e)];_0x2f7baa&&this[_0x46d2de(0x170)][_0x46d2de(0x158)](_0x17a550,_0x5342b9,_0x2f7baa['id'],_0x362e51['solved']===_0x5aaa67[_0x46d2de(0x119)]['Solved']);break;}default:break;}}));}};_0x44056e=_0x30face([_0x57d8a5(0x0,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x19c609['CommentService'])),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x4edabe[_0x3e11c3(0x15a)])),_0x57d8a5(0x2,(0x0,_0x56fec2['Inject'])(_0x56fec2['UserManagerService'])),_0x57d8a5(0x3,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x56fec2[_0x3e11c3(0x131)]))],_0x44056e);let _0x168d87={};function _0x2749ac(_0xfa36e3,_0x190a06){const _0x38c669=_0x3e11c3;let _0x3a3eda=_0xfa36e3[_0x38c669(0x140)][0x0];return{..._0x190a06,'id':_0x3a3eda[_0x38c669(0x178)],'resolved':_0xfa36e3[_0x38c669(0x185)]===0x1,'dT':_0x1a5763(_0x3a3eda['createTimestamp']),'personId':_0x3a3eda[_0x38c669(0x142)],'threadId':_0x3a3eda[_0x38c669(0x121)]};}function _0x40a562(_0x15d969,_0x102953,_0x17c763){const _0x29e0e8=_0x3e11c3;var _0x4214f4,_0x3246c4;if(((_0x4214f4=_0x15d969==null||(_0x3246c4=_0x15d969['replies'])==null?void 0x0:_0x3246c4[_0x29e0e8(0x172)])==null?0x0:_0x4214f4)>0x0){let _0x3cc84b=(_0x1c3eb2,_0x1e5945)=>({'id':_0x1c3eb2[_0x29e0e8(0x178)],'threadId':_0x1c3eb2[_0x29e0e8(0x121)],'dT':_0x1a5763(_0x1c3eb2[_0x29e0e8(0x188)]),'personId':_0x1c3eb2[_0x29e0e8(0x142)],'resolved':_0x15d969[_0x29e0e8(0x185)]===_0x5aaa67[_0x29e0e8(0x119)][_0x29e0e8(0x166)],'unitId':_0x102953,'subUnitId':_0x17c763,'text':JSON['parse'](_0x1c3eb2[_0x29e0e8(0x134)]),'parentId':_0x1e5945}),_0x2b257f=_0x3cc84b(_0x15d969[_0x29e0e8(0x140)][0x0]);return{..._0x2b257f,'children':_0x15d969[_0x29e0e8(0x140)][_0x29e0e8(0x171)](0x1)[_0x29e0e8(0x122)](_0x4dfa50=>_0x3cc84b(_0x4dfa50,_0x2b257f['id']))};}return null;}let _0x2a4a40=class{constructor(_0x28fb39,_0x4147df,_0x4127bf){const _0x481b9d=_0x3e11c3;this[_0x481b9d(0x177)]=_0x28fb39,this[_0x481b9d(0x167)]=_0x4147df,this[_0x481b9d(0x180)]=_0x4127bf;}async[_0x3e11c3(0x161)](_0x3ee1ed){const _0x2a1d3=_0x3e11c3;var _0x334fd5,_0x2dc991;let {parentId:_0x2a7ed8,unitId:_0x3fc052,text:_0x5c5a02,threadId:_0x3aeb71}=_0x3ee1ed,_0x50d204=(_0x334fd5=(_0x2dc991=_0x5c5a02[_0x2a1d3(0x11b)])==null?void 0x0:_0x2dc991[_0x2a1d3(0x12d)](_0x46fccd=>_0x46fccd[_0x2a1d3(0x14b)]===_0x56fec2[_0x2a1d3(0x191)][_0x2a1d3(0x12f)])[_0x2a1d3(0x122)](_0x2655c9=>_0x2655c9[_0x2a1d3(0x155)]))==null?[]:_0x334fd5,_0x4e6829=JSON['stringify'](_0x5c5a02),_0x959f16=(await this['_sessionService'][_0x2a1d3(0x137)](_0x3fc052))[_0x2a1d3(0x144)]();if(_0x2a7ed8){let _0x188ab6={'memberId':_0x959f16,'unitId':_0x3fc052,'content':_0x4e6829,'mention':_0x50d204,'threadId':_0x3aeb71},_0x140591=(await this[_0x2a1d3(0x177)][_0x2a1d3(0x197)]('/universer-api/comment/unit/'+_0x3fc052+'/reply',{'body':_0x188ab6}))[_0x2a1d3(0x17b)][_0x2a1d3(0x13b)];return{..._0x3ee1ed,'id':_0x140591['replyId'],'dT':(0x0,_0x56fec2[_0x2a1d3(0x15f)])(+_0x140591['createTimestamp'])[_0x2a1d3(0x149)](_0x2a1d3(0x14d)),'personId':_0x140591[_0x2a1d3(0x142)]};}else{let _0x39df19={'memberId':_0x959f16,'unitId':_0x3fc052,'content':_0x4e6829,'mention':_0x50d204};return _0x2749ac((await this[_0x2a1d3(0x177)][_0x2a1d3(0x197)]('/universer-api/comment/unit/'+_0x3fc052+_0x2a1d3(0x13a),{'body':_0x39df19}))[_0x2a1d3(0x17b)][_0x2a1d3(0x176)],_0x3ee1ed);}}async[_0x3e11c3(0x110)](_0x17cfff){const _0xb3eeed=_0x3e11c3;var _0x31fd22,_0x4b25a1;let {text:_0xd73e94,unitId:_0x5ebdfa}=_0x17cfff,_0x446dec=(_0x31fd22=(_0x4b25a1=_0xd73e94[_0xb3eeed(0x11b)])==null?void 0x0:_0x4b25a1['filter'](_0x45d75e=>_0x45d75e['rangeType']===_0x56fec2[_0xb3eeed(0x191)][_0xb3eeed(0x12f)])['map'](_0x761a27=>_0x761a27[_0xb3eeed(0x155)]))==null?[]:_0x31fd22,_0xf88174=JSON[_0xb3eeed(0x109)](_0xd73e94),_0x17c0b3=_0x17cfff[_0xb3eeed(0x121)],_0x2474e5=_0x17cfff['id'],_0x54e578={'memberId':(await this[_0xb3eeed(0x180)][_0xb3eeed(0x137)](_0x5ebdfa))[_0xb3eeed(0x144)](),'unitId':_0x5ebdfa,'threadId':_0x17c0b3,'mention':_0x446dec,'content':_0xf88174,'replyId':_0x2474e5},_0x5ddd3e=await this[_0xb3eeed(0x177)]['post']('/universer-api/comment/unit/'+_0x5ebdfa+'/edit',{'body':_0x54e578});return!_0x5ddd3e[_0xb3eeed(0x17b)][_0xb3eeed(0x132)]||_0x5ddd3e[_0xb3eeed(0x17b)][_0xb3eeed(0x132)][_0xb3eeed(0x14e)]===0x1;}async[_0x3e11c3(0x158)](_0x40c9ef){const _0x419c64=_0x3e11c3;let {unitId:_0x575ed5}=_0x40c9ef,_0x33c580=_0x40c9ef[_0x419c64(0x121)],_0x5c1a4e={'memberId':this['_userService'][_0x419c64(0x194)]()[_0x419c64(0x157)],'unitId':_0x575ed5,'threadId':_0x33c580,'solved':_0x40c9ef['resolved']?_0x5aaa67[_0x419c64(0x119)][_0x419c64(0x166)]:_0x5aaa67[_0x419c64(0x119)][_0x419c64(0x12a)]},_0x15b27f=await this[_0x419c64(0x177)][_0x419c64(0x197)](_0x419c64(0x150)+_0x575ed5+_0x419c64(0x18d),{'body':_0x5c1a4e});return!_0x15b27f[_0x419c64(0x17b)][_0x419c64(0x132)]||_0x15b27f['body'][_0x419c64(0x132)][_0x419c64(0x14e)]===0x1;}async['deleteComment'](_0x4bd8c7,_0x3ff2a0,_0x487d77,_0x1bfeca){const _0x5c2a47=_0x3e11c3;let _0x585e49={'memberId':(await this[_0x5c2a47(0x180)][_0x5c2a47(0x137)](_0x4bd8c7))['getMemberID'](),'threadId':_0x487d77,'replyId':_0x1bfeca,'unitId':_0x4bd8c7},_0x52aabd=await this[_0x5c2a47(0x177)][_0x5c2a47(0x197)](_0x5c2a47(0x150)+_0x4bd8c7+_0x5c2a47(0x17e),{'body':_0x585e49});return!_0x52aabd[_0x5c2a47(0x17b)][_0x5c2a47(0x132)]||_0x52aabd['body'][_0x5c2a47(0x132)]['code']===0x1;}async['listComments'](_0x4d1105,_0x59b239,_0x4f1cba){const _0x3a093d=_0x3e11c3;let _0x348755={'unitId':_0x4d1105,'threadId':_0x4f1cba},_0x4ff23c=await this['_httpService']['post'](_0x3a093d(0x150)+_0x4d1105+_0x3a093d(0x18f),{'body':_0x348755}),_0x440e08=_0x4f1cba['map'](_0x1ef926=>_0x40a562(_0x4ff23c['body'][_0x3a093d(0x164)][_0x1ef926],_0x4d1105,_0x59b239))[_0x3a093d(0x12d)](Boolean);return Object['values'](_0x4ff23c['body'][_0x3a093d(0x113)])['forEach'](_0x1a0a41=>{const _0x3e2c37=_0x3a093d;this[_0x3e2c37(0x167)][_0x3e2c37(0x123)](_0x1a0a41);}),_0x440e08;}['saveCommentToSnapshot'](_0x14bff9){const _0x381cd1=_0x3e11c3;return{'id':_0x14bff9['id'],'threadId':_0x14bff9[_0x381cd1(0x121)],'ref':_0x14bff9[_0x381cd1(0x146)]};}};_0x2a4a40=_0x30face([_0x57d8a5(0x0,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x52e141[_0x3e11c3(0x13d)])),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x56fec2[_0x3e11c3(0x115)])),_0x57d8a5(0x2,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x19c609[_0x3e11c3(0x143)]))],_0x2a4a40);let _0x5c5a47=class extends _0x56fec2[_0x3e11c3(0x124)]{constructor(_0x45304f,_0x309052){const _0xcc3f32=_0x3e11c3;super(),this[_0xcc3f32(0x120)]=_0x45304f,this['_threadCommentDataSource']=_0x309052,this[_0xcc3f32(0x133)]();}[_0x3e11c3(0x133)](){const _0x44d043=_0x3e11c3;this[_0x44d043(0x120)][_0x44d043(0x10e)]=this['_threadCommentDataSource'],this[_0x44d043(0x120)][_0x44d043(0x165)]=!0x1;}};_0x5c5a47=_0x30face([_0x57d8a5(0x0,_0x4edabe['IThreadCommentDataSourceService']),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x2a4a40))],_0x5c5a47);function _0x535b59(_0x21df6c){'@babel/helpers - typeof';const _0x480529=_0x3e11c3;return _0x535b59=typeof Symbol=='function'&&typeof Symbol[_0x480529(0x18c)]==_0x480529(0x112)?function(_0x233b86){return typeof _0x233b86;}:function(_0x3c69c4){const _0x8c8e42=_0x480529;return _0x3c69c4&&typeof Symbol=='function'&&_0x3c69c4['constructor']===Symbol&&_0x3c69c4!==Symbol[_0x8c8e42(0x18e)]?'symbol':typeof _0x3c69c4;},_0x535b59(_0x21df6c);}function _0x5dcd6f(_0x32bcf1,_0x5151ea){const _0x3f1be3=_0x3e11c3;if(_0x535b59(_0x32bcf1)!=_0x3f1be3(0x126)||!_0x32bcf1)return _0x32bcf1;var _0x164732=_0x32bcf1[Symbol['toPrimitive']];if(_0x164732!==void 0x0){var _0x263e46=_0x164732[_0x3f1be3(0x14c)](_0x32bcf1,_0x5151ea||_0x3f1be3(0x135));if(_0x535b59(_0x263e46)!=_0x3f1be3(0x126))return _0x263e46;throw TypeError(_0x3f1be3(0x179));}return(_0x5151ea==='string'?String:Number)(_0x32bcf1);}function _0x47c5c2(_0x51605f){const _0x3e5400=_0x3e11c3;var _0x27bf0f=_0x5dcd6f(_0x51605f,_0x3e5400(0x117));return _0x535b59(_0x27bf0f)==_0x3e5400(0x112)?_0x27bf0f:_0x27bf0f+'';}function _0x2a2722(_0x454a76,_0x303f17,_0x3c6d0b){return(_0x303f17=_0x47c5c2(_0x303f17))in _0x454a76?Object['defineProperty'](_0x454a76,_0x303f17,{'value':_0x3c6d0b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x454a76[_0x303f17]=_0x3c6d0b,_0x454a76;}let _0x12bf40=class extends _0x56fec2[_0x3e11c3(0x11a)]{constructor(_0x300596=_0x168d87,_0x2b7570,_0xedb30d){const _0x1414d3=_0x3e11c3;super(),this['_config']=_0x300596,this[_0x1414d3(0x147)]=_0x2b7570,this['_configService']=_0xedb30d;let {..._0x1692fd}=(0x0,_0x56fec2['merge'])({},_0x168d87,this[_0x1414d3(0x195)]);this[_0x1414d3(0x118)][_0x1414d3(0x196)](_0x1414d3(0x190),_0x1692fd);}[_0x3e11c3(0x114)](){[[_0x2a4a40],[_0x5c5a47],[_0x44056e]]['forEach'](_0x5485c6=>{const _0x49c08c=_0x40c8;this[_0x49c08c(0x147)][_0x49c08c(0x175)](_0x5485c6);});}[_0x3e11c3(0x17f)](){const _0x32d627=_0x3e11c3;this[_0x32d627(0x147)][_0x32d627(0x160)](_0x5c5a47),this[_0x32d627(0x147)][_0x32d627(0x160)](_0x44056e);}};_0x2a2722(_0x12bf40,_0x3e11c3(0x145),_0x3e11c3(0x148)),_0x2a2722(_0x12bf40,_0x3e11c3(0x152),_0x28ccec),_0x2a2722(_0x12bf40,'version',_0x29db91),_0x12bf40=_0x30face([(0x0,_0x56fec2['DependentOn'])(_0x4ee8fc[_0x3e11c3(0x10a)],_0x19c609['UniverCollaborationClientPlugin'],_0x5bb6b3[_0x3e11c3(0x16b)]),_0x57d8a5(0x1,(0x0,_0x56fec2[_0x3e11c3(0x17a)])(_0x56fec2[_0x3e11c3(0x131)])),_0x57d8a5(0x2,_0x56fec2[_0x3e11c3(0x138)])],_0x12bf40),Object['defineProperty'](_0xe16ac3,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return _0x12bf40;}});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.25.1",
3
+ "version": "1.0.0-alpha.1",
4
4
  "private": false,
5
5
  "description": "Remote data source integration for Univer thread comments.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -51,19 +51,19 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@univerjs-pro/collaboration-client": "0.25.1",
55
- "@univerjs/core": "0.25.1",
56
- "@univerjs-pro/license": "0.25.1",
57
- "@univerjs/network": "0.25.1",
58
- "@univerjs/thread-comment": "0.25.1",
59
- "@univerjs/thread-comment-ui": "0.25.1",
60
- "@univerjs/protocol": "0.25.1"
54
+ "@univerjs-pro/collaboration-client": "1.0.0-alpha.1",
55
+ "@univerjs-pro/license": "1.0.0-alpha.1",
56
+ "@univerjs/core": "1.0.0-alpha.1",
57
+ "@univerjs/network": "1.0.0-alpha.1",
58
+ "@univerjs/protocol": "1.0.0-alpha.1",
59
+ "@univerjs/thread-comment-ui": "1.0.0-alpha.1",
60
+ "@univerjs/thread-comment": "1.0.0-alpha.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "rxjs": "7.8.2",
64
64
  "typescript": "^6.0.3",
65
- "vitest": "^4.1.6",
66
- "@univerjs-infra/shared": "0.25.1"
65
+ "vitest": "^4.1.9",
66
+ "@univerjs-infra/shared": "1.0.0-alpha.1"
67
67
  },
68
68
  "scripts": {
69
69
  "test": "vitest run",