@univerjs-pro/collaboration-client 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/controllers/collaboration/collaboration-entity.d.ts +7 -8
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +11 -12
- package/lib/types/controllers/collaboration/collaboration.controller.d.ts +1 -1
- package/lib/types/services/auth-server/util.d.ts +1 -0
- package/lib/types/services/data-loader/data-loader.service.d.ts +4 -5
- package/lib/types/services/local-cache/local-cache.service.d.ts +3 -4
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +15 -16
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5eca20=_0x2e22;(function(_0x266509,_0x170921){const _0x3152c8=_0x2e22,_0x3e9a36=_0x266509();while(!![]){try{const _0x56dcf1=parseInt(_0x3152c8(0x18d))/0x1+-parseInt(_0x3152c8(0x438))/0x2*(-parseInt(_0x3152c8(0x2f4))/0x3)+-parseInt(_0x3152c8(0x386))/0x4+parseInt(_0x3152c8(0x21d))/0x5+parseInt(_0x3152c8(0x1be))/0x6+parseInt(_0x3152c8(0x22a))/0x7*(-parseInt(_0x3152c8(0x398))/0x8)+parseInt(_0x3152c8(0x2ab))/0x9*(parseInt(_0x3152c8(0x2ad))/0xa);if(_0x56dcf1===_0x170921)break;else _0x3e9a36['push'](_0x3e9a36['shift']());}catch(_0x256dce){_0x3e9a36['push'](_0x3e9a36['shift']());}}}(_0x1565,0x2b17b),Object[_0x5eca20(0x29a)](exports,Symbol['toStringTag'],{'value':_0x5eca20(0x181)}));var e=Object[_0x5eca20(0x272)],t=Object[_0x5eca20(0x29a)],n=Object[_0x5eca20(0x289)],r=Object[_0x5eca20(0x340)],i=Object[_0x5eca20(0x3e4)],a=Object[_0x5eca20(0x3e6)][_0x5eca20(0x376)],o=(_0x23a4c2,_0xb8701c,_0xd9c702,_0x28c0a5)=>{const _0x14a4d3=_0x5eca20;if(_0xb8701c&&typeof _0xb8701c==_0x14a4d3(0x297)||typeof _0xb8701c=='function'){for(var _0x26bcf3=r(_0xb8701c),_0x1e58d8=0x0,_0x22e7ee=_0x26bcf3['length'],_0x2e1c9d;_0x1e58d8<_0x22e7ee;_0x1e58d8++)_0x2e1c9d=_0x26bcf3[_0x1e58d8],!a['call'](_0x23a4c2,_0x2e1c9d)&&_0x2e1c9d!==_0xd9c702&&t(_0x23a4c2,_0x2e1c9d,{'get':(_0x2e11f7=>_0xb8701c[_0x2e11f7])[_0x14a4d3(0x419)](null,_0x2e1c9d),'enumerable':!(_0x28c0a5=n(_0xb8701c,_0x2e1c9d))||_0x28c0a5['enumerable']});}return _0x23a4c2;},s=(_0x1c5fbd,_0x201938,_0x1619e5)=>(_0x1619e5=_0x1c5fbd==null?{}:e(i(_0x1c5fbd)),o(_0x201938||!_0x1c5fbd||!_0x1c5fbd[_0x5eca20(0x310)]?t(_0x1619e5,_0x5eca20(0x3d8),{'value':_0x1c5fbd,'enumerable':!0x0}):_0x1619e5,_0x1c5fbd));let c=require(`@univerjs-pro/collaboration`),l=require(`@univerjs/core`),u=require(`@univerjs/docs`),d=require(`@univerjs/sheets`),f=require(`rxjs`),p=require(`@univerjs/protocol`),ee=require(`@univerjs/telemetry`),m=require(`rxjs/operators`),h=require(`@univerjs/network`),te=require(`@univerjs-pro/license`),g=require(`@univerjs/drawing`),ne=require(`crypto-js/aes`);ne=s(ne);let _=require(`crypto-js/enc-base64`);_=s(_);let re=require(`crypto-js/enc-utf8`);re=s(re);let ie=require(`crypto-js/lib-typedarrays`);ie=s(ie);let ae=require(`crypto-js/pad-nopadding`);ae=s(ae);const oe='ws://127.0.0.1:8000/universer-api/comb/connect',se=0x4e20;function ce(_0xf3d66e){const _0x26f911=_0x5eca20;return JSON[_0x26f911(0x350)](_0xf3d66e)[_0x26f911(0x373)];}function v(_0x37d8c1){'@babel/helpers - typeof';const _0x45719a=_0x5eca20;return v=typeof Symbol==_0x45719a(0x2d8)&&typeof Symbol['iterator']=='symbol'?function(_0x31b6bd){return typeof _0x31b6bd;}:function(_0x2bcea0){const _0x2cb2d9=_0x45719a;return _0x2bcea0&&typeof Symbol==_0x2cb2d9(0x2d8)&&_0x2bcea0[_0x2cb2d9(0x1c4)]===Symbol&&_0x2bcea0!==Symbol[_0x2cb2d9(0x3e6)]?_0x2cb2d9(0x1ec):typeof _0x2bcea0;},v(_0x37d8c1);}function le(_0x35fe21,_0x47db1e){const _0x557420=_0x5eca20;if(v(_0x35fe21)!=_0x557420(0x297)||!_0x35fe21)return _0x35fe21;var _0x3bf7e8=_0x35fe21[Symbol[_0x557420(0x34f)]];if(_0x3bf7e8!==void 0x0){var _0x59777d=_0x3bf7e8[_0x557420(0x17e)](_0x35fe21,_0x47db1e||'default');if(v(_0x59777d)!=_0x557420(0x297))return _0x59777d;throw TypeError(_0x557420(0x26a));}return(_0x47db1e===_0x557420(0x358)?String:Number)(_0x35fe21);}function ue(_0x10d6fd){const _0x3a1b8d=_0x5eca20;var _0x3337dc=le(_0x10d6fd,'string');return v(_0x3337dc)==_0x3a1b8d(0x1ec)?_0x3337dc:_0x3337dc+'';}function y(_0x43275a,_0x27d656,_0x1e78fa){const _0x185bf6=_0x5eca20;return(_0x27d656=ue(_0x27d656))in _0x43275a?Object[_0x185bf6(0x29a)](_0x43275a,_0x27d656,{'value':_0x1e78fa,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43275a[_0x27d656]=_0x1e78fa,_0x43275a;}let b=function(_0x5ec94f){const _0x5965a=_0x5eca20;return _0x5ec94f['OTHER_CLIENT_EDITING']='OTHER_CLIENT_EDITING',_0x5ec94f[_0x5965a(0x1ee)]='PERMISSION_DENIED',_0x5ec94f['CONFLICT']=_0x5965a(0x1ca),_0x5ec94f[_0x5965a(0x24a)]=_0x5965a(0x24a),_0x5ec94f[_0x5965a(0x36d)]=_0x5965a(0x36d),_0x5ec94f[_0x5965a(0x356)]=_0x5965a(0x356),_0x5ec94f['SOCKET_FAILED']='SOCKET_FAILED',_0x5ec94f[_0x5965a(0x2bd)]='SUBMIT_CHANGESET_TIMEOUT',_0x5ec94f;}({});var x=class{constructor(){const _0x265807=_0x5eca20;y(this,'_event$',new f[(_0x265807(0x2a4))]()),y(this,'event$',this[_0x265807(0x36b)][_0x265807(0x1bd)]());}[_0x5eca20(0x3d0)](_0x28e294){const _0x52134f=_0x5eca20;this[_0x52134f(0x36b)]['next'](_0x28e294);}},de=class{constructor(){const _0x22a55f=_0x5eca20;y(this,_0x22a55f(0x432),new f[(_0x22a55f(0x2a4))]()),y(this,_0x22a55f(0x3ff),this[_0x22a55f(0x432)]['asObservable']());}['onCommentUpdate'](_0x3f2ccf){this['_commentUpdate$']['next'](_0x3f2ccf);}};function S(_0x17af88,_0x44b800){return function(_0x55a958,_0x6736e3){_0x44b800(_0x55a958,_0x6736e3,_0x17af88);};}function C(_0xffee89,_0x3f5986,_0x33b4ea,_0x5de527){const _0x28da07=_0x5eca20;var _0x34965a=arguments[_0x28da07(0x373)],_0x56468a=_0x34965a<0x3?_0x3f5986:_0x5de527===null?_0x5de527=Object['getOwnPropertyDescriptor'](_0x3f5986,_0x33b4ea):_0x5de527,_0x3fdbe6;if(typeof Reflect==_0x28da07(0x297)&&typeof Reflect[_0x28da07(0x337)]==_0x28da07(0x2d8))_0x56468a=Reflect[_0x28da07(0x337)](_0xffee89,_0x3f5986,_0x33b4ea,_0x5de527);else{for(var _0x3731ff=_0xffee89['length']-0x1;_0x3731ff>=0x0;_0x3731ff--)(_0x3fdbe6=_0xffee89[_0x3731ff])&&(_0x56468a=(_0x34965a<0x3?_0x3fdbe6(_0x56468a):_0x34965a>0x3?_0x3fdbe6(_0x3f5986,_0x33b4ea,_0x56468a):_0x3fdbe6(_0x3f5986,_0x33b4ea))||_0x56468a);}return _0x34965a>0x3&&_0x56468a&&Object['defineProperty'](_0x3f5986,_0x33b4ea,_0x56468a),_0x56468a;}let w=class extends l[_0x5eca20(0x2c3)]{constructor(_0x3604c3,_0x398273){const _0x519f6c=_0x5eca20;super(),this[_0x519f6c(0x27e)]=_0x3604c3,this['_userManagerService']=_0x398273,y(this,_0x519f6c(0x31e),new Map()),y(this,_0x519f6c(0x37e),new f['Subject']()),this[_0x519f6c(0x224)]((0x0,f[_0x519f6c(0x290)])(this[_0x519f6c(0x27e)][_0x519f6c(0x216)](l['UniverInstanceType'][_0x519f6c(0x416)])['pipe']((0x0,m['map'])(_0x574da3=>_0x574da3[_0x519f6c(0x397)]())),this['_univerInstanceService']['getTypeOfUnitDisposed$'](l[_0x519f6c(0x2f6)][_0x519f6c(0x2bf)])[_0x519f6c(0x1b4)]((0x0,m[_0x519f6c(0x29e)])(_0x1bf47a=>_0x1bf47a[_0x519f6c(0x397)]())),this[_0x519f6c(0x27e)][_0x519f6c(0x216)](l[_0x519f6c(0x2f6)][_0x519f6c(0x217)])[_0x519f6c(0x1b4)]((0x0,m[_0x519f6c(0x29e)])(_0x5ba198=>_0x5ba198[_0x519f6c(0x397)]())))[_0x519f6c(0x439)](_0x19feb3=>this[_0x519f6c(0x3d9)](_0x19feb3)));}[_0x5eca20(0x24e)](_0x535629){const _0x51c68f=_0x5eca20;return this['_roomMembers'][_0x51c68f(0x1a8)](_0x535629)?(0x0,f['of'])(this['_roomMembers'][_0x51c68f(0x1b6)](_0x535629)):this[_0x51c68f(0x37e)][_0x51c68f(0x1b4)]((0x0,m[_0x51c68f(0x29e)])(_0x1ae7fb=>{const _0xc8137a=_0x51c68f;if(_0x1ae7fb===_0x535629)return this[_0xc8137a(0x31e)][_0xc8137a(0x1b6)](_0x1ae7fb);}));}[_0x5eca20(0x3a4)](_0x18d1b5){const _0xe7235=_0x5eca20;this['_userManagerService'][_0xe7235(0x3a4)](_0x18d1b5);}['getCurrentUser'](){const _0x220e58=_0x5eca20;return this[_0x220e58(0x201)][_0x220e58(0x171)]();}[_0x5eca20(0x2a0)](_0x41b885,_0x59dc63){const _0x1e8b5e=_0x5eca20;let _0x127f94=this['_roomMembers'][_0x1e8b5e(0x1b6)](_0x41b885);_0x127f94||(_0x127f94=new fe(),this['_roomMembers'][_0x1e8b5e(0x28e)](_0x41b885,_0x127f94),this[_0x1e8b5e(0x37e)][_0x1e8b5e(0x1d2)](_0x41b885)),_0x127f94[_0x1e8b5e(0x2a0)](_0x59dc63);}[_0x5eca20(0x2fd)](_0x1057db,_0x597975){const _0x2cee16=_0x5eca20;let _0x4b1267=this[_0x2cee16(0x31e)][_0x2cee16(0x1b6)](_0x1057db);_0x4b1267&&_0x4b1267[_0x2cee16(0x2fd)](_0x597975);}['getRoom'](_0x552008){const _0x1a641e=_0x5eca20;return this[_0x1a641e(0x31e)][_0x1a641e(0x1b6)](_0x552008);}[_0x5eca20(0x287)](_0x1db230,_0x594634){const _0x749f59=_0x5eca20;let _0x257af7=this[_0x749f59(0x31e)]['get'](_0x1db230);if(_0x257af7)return _0x257af7['getMember'](_0x594634);}['_removeRoom'](_0x18b553){const _0x35d4bb=_0x5eca20;let _0x51a251=this[_0x35d4bb(0x31e)][_0x35d4bb(0x1b6)](_0x18b553);_0x51a251&&(_0x51a251[_0x35d4bb(0x30f)](),this['_roomMembers'][_0x35d4bb(0x349)](_0x18b553));}['dispose'](){const _0x2317f7=_0x5eca20;this['_roomMembers'][_0x2317f7(0x248)](_0x115835=>_0x115835[_0x2317f7(0x30f)]()),this['_roomMembers']['clear'](),this[_0x2317f7(0x37e)][_0x2317f7(0x284)]();}};w=C([S(0x0,l[_0x5eca20(0x205)]),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x1a1)]))],w);var fe=class extends l[_0x5eca20(0x2c3)]{constructor(..._0x11bc33){const _0x16df51=_0x5eca20;super(..._0x11bc33),y(this,'_members',new Map()),y(this,_0x16df51(0x1cf),new f['BehaviorSubject'](this['_members'])),y(this,'members$',this['_members$']['asObservable']());}[_0x5eca20(0x30f)](){const _0x180946=_0x5eca20;this[_0x180946(0x1cc)][_0x180946(0x16e)]();}[_0x5eca20(0x2a0)](_0x36fe95){const _0x1d05cd=_0x5eca20;this[_0x1d05cd(0x1cc)][_0x1d05cd(0x28e)](_0x36fe95['memberID'],_0x36fe95),this[_0x1d05cd(0x379)]();}['removeMember'](_0x560441){this['_members']['delete'](_0x560441);}['getMember'](_0x17cefb){const _0xc13969=_0x5eca20;return this[_0xc13969(0x1cc)]['get'](_0x17cefb);}[_0x5eca20(0x3e5)](){const _0x18cdb3=_0x5eca20;return Array[_0x18cdb3(0x30c)](this[_0x18cdb3(0x1cc)][_0x18cdb3(0x18c)]());}['_emitMembers'](){const _0x203270=_0x5eca20;this[_0x203270(0x1cf)][_0x203270(0x1d2)](this['_members']);}};let T=function(_0x4c3739){const _0x5e2dc1=_0x5eca20;return _0x4c3739[_0x4c3739[_0x5e2dc1(0x23a)]=0x0]='IDLE',_0x4c3739[_0x4c3739[_0x5e2dc1(0x37d)]=0x1]='JOINING',_0x4c3739[_0x4c3739[_0x5e2dc1(0x276)]=0x2]=_0x5e2dc1(0x276),_0x4c3739[_0x4c3739[_0x5e2dc1(0x2ea)]=0x3]='ONLINE',_0x4c3739;}({});const pe={[p[_0x5eca20(0x42b)][_0x5eca20(0x3bd)]]:_0x5eca20(0x417),[p[_0x5eca20(0x42b)][_0x5eca20(0x3ba)]]:_0x5eca20(0x427),[p[_0x5eca20(0x42b)]['JOIN_ROOM_NOT_EXISTS']]:'session.room-not-exists',[p[_0x5eca20(0x42b)][_0x5eca20(0x29f)]]:_0x5eca20(0x400),[p[_0x5eca20(0x42b)]['GLOBAL_ROOMS_CNT_EXCEEDS']]:_0x5eca20(0x20e)};let E=class extends l[_0x5eca20(0x3fc)]{get['sessionStatus'](){const _0x492580=_0x5eca20;return this[_0x492580(0x38b)]['getValue']();}constructor(_0x31db5b,_0x5699e8,_0x3aa54d,_0x45d1d5,_0x38791a,_0x23f4b1,_0x2080ca,_0x4c3093){const _0xcac089=_0x5eca20;super(),this[_0xcac089(0x2ed)]=_0x31db5b,this[_0xcac089(0x429)]=_0x3aa54d,this[_0xcac089(0x1e7)]=_0x45d1d5,this[_0xcac089(0x2e5)]=_0x38791a,this[_0xcac089(0x404)]=_0x23f4b1,this[_0xcac089(0x298)]=_0x2080ca,this['_telemetryService']=_0x4c3093,y(this,'_sessionStatus$',new f[(_0xcac089(0x196))](T[_0xcac089(0x23a)])),y(this,'sessionStatus$',this[_0xcac089(0x38b)]['asObservable']()),y(this,_0xcac089(0x36b),new f[(_0xcac089(0x2a4))]()),y(this,_0xcac089(0x218),this['_event$'][_0xcac089(0x1bd)]()),y(this,_0xcac089(0x247),void 0x0),y(this,_0xcac089(0x43f),void 0x0),y(this,_0xcac089(0x252),void 0x0),y(this,_0xcac089(0x407),!0x1),y(this,_0xcac089(0x3cd),null),this[_0xcac089(0x407)]=!!this[_0xcac089(0x29c)],_0x5699e8['pipe']((0x0,f[_0xcac089(0x1c5)])(this[_0xcac089(0x2fb)]))[_0xcac089(0x439)](_0x1ae853=>{const _0x270ea4=_0xcac089;if(_0x1ae853!==void 0x0){if(this['_socket']=_0x1ae853,_0x1ae853)this[_0x270ea4(0x3a7)](_0x1ae853),this['_socketMessageSubscription']=_0x1ae853[_0x270ea4(0x189)][_0x270ea4(0x439)](_0x195a96=>{const _0x27483b=_0x270ea4;_0x195a96[_0x27483b(0x207)]===this[_0x27483b(0x2ed)]&&this[_0x27483b(0x43d)](_0x195a96);});else{var _0x54b982;this[_0x270ea4(0x243)](),this['_sessionStatus$']['next'](T[_0x270ea4(0x276)]),(_0x54b982=this[_0x270ea4(0x43f)])==null||_0x54b982[_0x270ea4(0x413)](),this[_0x270ea4(0x43f)]=null;}}});}[_0x5eca20(0x27f)](){var _0x27947f,_0x1639ff;return(_0x27947f=(_0x1639ff=this['_socket'])==null?void 0x0:_0x1639ff['memberID'])==null?null:_0x27947f;}['dispose'](){const _0x132c25=_0x5eca20;super[_0x132c25(0x30f)](),this[_0x132c25(0x280)](),this[_0x132c25(0x2fb)][_0x132c25(0x1d2)](),this[_0x132c25(0x2fb)]['complete']();}[_0x5eca20(0x280)](){const _0x40f294=_0x5eca20;var _0x1542ae,_0x57a868;this[_0x40f294(0x243)](),(_0x1542ae=this[_0x40f294(0x247)])==null||_0x1542ae[_0x40f294(0x335)]({'cmd':p[_0x40f294(0x188)][_0x40f294(0x435)],'data':{'roomID':this['_unitID']}}),(_0x57a868=this['_socket'])==null||_0x57a868['close'](),this[_0x40f294(0x36b)][_0x40f294(0x284)](),this[_0x40f294(0x38b)]['complete']();}[_0x5eca20(0x43d)](_0x5d2729){const _0x2c1b13=_0x5eca20;_0x5d2729['cmd']===p[_0x2c1b13(0x188)][_0x2c1b13(0x3da)]?this[_0x2c1b13(0x274)](_0x5d2729):_0x5d2729['cmd']===p[_0x2c1b13(0x188)]['RECV']&&this['_onRecvEvent'](_0x5d2729);}[_0x5eca20(0x3a7)](_0x538133){const _0x1309e0=_0x5eca20;this['_sessionStatus$'][_0x1309e0(0x1d2)](T[_0x1309e0(0x37d)]),_0x538133[_0x1309e0(0x335)]({'cmd':p[_0x1309e0(0x188)][_0x1309e0(0x3da)],'routeKey':this[_0x1309e0(0x2ed)],'routeType':'','data':{'rooms':[{'roomID':this[_0x1309e0(0x2ed)]}]}});}[_0x5eca20(0x274)](_0x153719){const _0x22e5af=_0x5eca20;var _0x215a28;if(_0x153719[_0x22e5af(0x2bb)]in pe){this[_0x22e5af(0x298)]['emitEvent']({'id':b[_0x22e5af(0x36d)],'data':pe[_0x153719[_0x22e5af(0x2bb)]]}),this[_0x22e5af(0x38b)][_0x22e5af(0x1d2)](T['OFFLINE']);return;}this[_0x22e5af(0x38b)][_0x22e5af(0x1d2)](T['ONLINE']);let _0x47ce79=(_0x215a28=_0x153719[_0x22e5af(0x193)][_0x22e5af(0x36e)][this[_0x22e5af(0x2ed)]])==null?void 0x0:_0x215a28[_0x22e5af(0x3ae)];_0x47ce79&&_0x47ce79[_0x22e5af(0x248)](_0x2d2ffb=>this[_0x22e5af(0x2e5)][_0x22e5af(0x2a0)](this['_unitID'],_0x2d2ffb));}[_0x5eca20(0x18f)](_0x4daa4e){const _0x917955=_0x5eca20;try{let _0x4573c8=_0x4daa4e[_0x917955(0x193)];switch(_0x4573c8[_0x917955(0x315)]){case c['CollaborationEvent']['USERS_ENTER']:this[_0x917955(0x3ca)](_0x4573c8),this['_event$'][_0x917955(0x1d2)](_0x4573c8);break;case c[_0x917955(0x33c)][_0x917955(0x3a9)]:this['_onUserLeave'](_0x4573c8),this[_0x917955(0x36b)][_0x917955(0x1d2)](_0x4573c8);break;case c[_0x917955(0x33c)][_0x917955(0x25a)]:case c[_0x917955(0x33c)][_0x917955(0x40c)]:this[_0x917955(0x313)](),this[_0x917955(0x348)](),this[_0x917955(0x36b)]['next'](_0x4573c8);break;case c[_0x917955(0x33c)][_0x917955(0x382)]:this[_0x917955(0x429)][_0x917955(0x2dc)](_0x917955(0x403)+JSON['stringify'](_0x4573c8)),this[_0x917955(0x36b)][_0x917955(0x1d2)](_0x4573c8);break;case c[_0x917955(0x33c)][_0x917955(0x32d)]:this[_0x917955(0x404)]['onCommentUpdate'](_0x4573c8['data']),this['_event$'][_0x917955(0x1d2)](_0x4573c8);break;default:this[_0x917955(0x36b)][_0x917955(0x1d2)](_0x4573c8);}}catch(_0x6c7af8){this[_0x917955(0x429)][_0x917955(0x2dc)](_0x6c7af8,_0x4daa4e);}}['_onUserJoin'](_0x59663e){const _0xdff8af=_0x5eca20;this[_0xdff8af(0x2e5)][_0xdff8af(0x2a0)](this[_0xdff8af(0x2ed)],_0x59663e[_0xdff8af(0x193)]);}[_0x5eca20(0x2b0)](_0x4c7f22){const _0x36a917=_0x5eca20;this[_0x36a917(0x2e5)][_0x36a917(0x2fd)](this[_0x36a917(0x2ed)],_0x4c7f22[_0x36a917(0x193)]['memberID']);}async[_0x5eca20(0x335)](_0x45c329,_0x2ef8d8){const _0x30042c=_0x5eca20;if(this[_0x30042c(0x1da)]!==T['ONLINE']||!this[_0x30042c(0x247)])throw Error(_0x30042c(0x2f7));try{_0x45c329[_0x30042c(0x315)]===c[_0x30042c(0x33c)][_0x30042c(0x3db)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x30042c(0x43b)](_0x45c329)),this['_socket'][_0x30042c(0x335)]({'cmd':p[_0x30042c(0x188)][_0x30042c(0x21b)],'routeKey':_0x2ef8d8,'routeType':'','data':_0x45c329});}catch(_0x506ac6){this['_logService'][_0x30042c(0x2dc)](_0x506ac6);}}[_0x5eca20(0x3d1)](){const _0x59f7f8=_0x5eca20;var _0x2e4cbc;this[_0x59f7f8(0x252)]=setTimeout(()=>{const _0x57b97b=_0x59f7f8;this[_0x57b97b(0x252)]=null,this[_0x57b97b(0x298)][_0x57b97b(0x3d0)]({'id':b[_0x57b97b(0x2bd)]});},(_0x2e4cbc=this[_0x59f7f8(0x1e7)]['getConfig'](_0x59f7f8(0x1fa)))==null?se:_0x2e4cbc);}['_clearCollaborationTimeoutTimer'](){const _0x413684=_0x5eca20;this[_0x413684(0x252)]&&(clearTimeout(this[_0x413684(0x252)]),this['_collaborationTimeoutTimer']=null);}[_0x5eca20(0x43b)](_0x442ced){if(!this['_shouldReportTelemetry'])return;let {data:_0x8a4adf}=_0x442ced,{unitID:_0x5839f0,changeset:_0x294b2e}=_0x8a4adf,{mutations:_0x56e3c5,type:_0x58ec49}=_0x294b2e;this['_telemetryInfo']={'unitId':_0x5839f0,'type':_0x58ec49,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':ce(_0x56e3c5)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x4e6601=_0x5eca20;if(this[_0x4e6601(0x407)]){if(!this['_telemetryInfo']){this[_0x4e6601(0x429)]['error'](_0x4e6601(0x2b4),_0x4e6601(0x377));return;}this[_0x4e6601(0x3cd)][_0x4e6601(0x2db)]=performance[_0x4e6601(0x2dd)](),this[_0x4e6601(0x3cd)]['duration']=this['_telemetryInfo'][_0x4e6601(0x2db)]-this['_telemetryInfo'][_0x4e6601(0x3dd)],this[_0x4e6601(0x29c)]['capture'](_0x4e6601(0x378),this[_0x4e6601(0x3cd)]),this[_0x4e6601(0x3cd)]=null;}}[_0x5eca20(0x243)](){const _0x3667cf=_0x5eca20;this[_0x3667cf(0x3cd)]=null;}};E=C([S(0x2,l[_0x5eca20(0x3a3)]),S(0x3,l[_0x5eca20(0x195)]),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(w)),S(0x5,(0x0,l['Inject'])(de)),S(0x6,(0x0,l[_0x5eca20(0x3fa)])(x)),S(0x7,(0x0,l[_0x5eca20(0x2f5)])(ee[_0x5eca20(0x214)]))],E);const D=(0x0,l['createIdentifier'])(_0x5eca20(0x405));function me(_0x5a777c){const _0x484daf=_0x5eca20;return _0x484daf(0x2d7)+_0x5a777c;}function he(_0x4d1921){const _0x58fb2e=_0x5eca20;let {unitID:_0x7118b9,mutations:_0x4ac364}=_0x4d1921;return{'unitId':_0x7118b9,'subUnitId':_0x4ac364[_0x58fb2e(0x373)]>0x0?_0x4ac364[0x0][_0x58fb2e(0x351)][_0x58fb2e(0x26e)]:null};}let O=class{constructor(_0x4bce17,_0x46c6ea,_0x49ac28){this['_injector']=_0x4bce17,this['_transformService']=_0x46c6ea,this['_instanceService']=_0x49ac28;}[_0x5eca20(0x225)](_0xd8f67){const _0x2cc5cd=_0x5eca20;var _0x1deaa0,_0x31a5bc;let _0x3f96f6=this[_0x2cc5cd(0x161)]['get'](d['SheetsSelectionsService']),{unitId:_0x4ec150,subUnitId:_0xacdda8}=he(_0xd8f67),_0x42b9e8=_0x3f96f6==null?void 0x0:_0x3f96f6[_0x2cc5cd(0x258)](_0x4ec150)['getCurrentSelections'](),_0x93999a=(_0x1deaa0=this['_instanceService'][_0x2cc5cd(0x365)](_0x4ec150))==null||(_0x1deaa0=_0x1deaa0[_0x2cc5cd(0x249)]())==null?void 0x0:_0x1deaa0[_0x2cc5cd(0x2e4)]();if(_0x42b9e8[_0x2cc5cd(0x373)]===0x0||!_0x4ec150||!_0xacdda8)return;let _0x38c8b0=[{'id':d[_0x2cc5cd(0x242)]['id'],'params':{'unitId':_0x4ec150,'subUnitId':_0x93999a,'selections':l[_0x2cc5cd(0x2c6)][_0x2cc5cd(0x41a)](_0x42b9e8)}}],_0x2deb8a=this[_0x2cc5cd(0x1f9)]['transformMutationsWithChangeset'](_0xd8f67,_0x38c8b0);if(!(0x0,c[_0x2cc5cd(0x1ae)])(_0x2deb8a))throw _0x2deb8a[_0x2cc5cd(0x2dc)];let _0x1e638f=(_0x31a5bc=_0x2deb8a[_0x2cc5cd(0x25d)][0x0])==null||(_0x31a5bc=_0x31a5bc[_0x2cc5cd(0x351)])==null?void 0x0:_0x31a5bc[_0x2cc5cd(0x324)];if(Array[_0x2cc5cd(0x346)](_0x1e638f)&&_0x1e638f[_0x2cc5cd(0x373)]){if(_0x1e638f[_0x2cc5cd(0x373)]===_0x38c8b0[0x0][_0x2cc5cd(0x351)]['selections'][_0x2cc5cd(0x373)]&&_0x1e638f[_0x2cc5cd(0x20b)]((_0x513405,_0x4b300e)=>l[_0x2cc5cd(0x1e4)][_0x2cc5cd(0x2d0)](_0x513405[_0x2cc5cd(0x2d1)],_0x38c8b0[0x0][_0x2cc5cd(0x351)][_0x2cc5cd(0x324)][_0x4b300e]['range'])))return;this[_0x2cc5cd(0x161)][_0x2cc5cd(0x1b6)](l[_0x2cc5cd(0x2f0)])[_0x2cc5cd(0x229)](d[_0x2cc5cd(0x242)]['id'],{'unitId':_0x4ec150,'subUnitId':_0x93999a,'selections':_0x1e638f});}}};O=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x1,c[_0x5eca20(0x220)]),S(0x2,l['IUniverInstanceService'])],O);const k=(0x0,l[_0x5eca20(0x2d6)])(_0x5eca20(0x178));let ge=function(_0x4f24ef){const _0x3fac9c=_0x5eca20;return _0x4f24ef[_0x4f24ef[_0x3fac9c(0x393)]=0x0]=_0x3fac9c(0x393),_0x4f24ef[_0x4f24ef['OTHER_CLIENTS_EDITING']=0x1]=_0x3fac9c(0x31c),_0x4f24ef;}({});const A=_0x5eca20(0x32f);function _0x1565(){const _0x1fa405=['sendChangesetTimeout','toPrimitive','stringify','params','ThresholdInterceptorFactory','packageName','MergeInterceptorFactory','SyncedState','SOCKET_FAILED_RETRY','_resendTimer','string','objects','RevisionService','_networkConditionService','add','_fetchMissChangesets','override','\x0aCurrent:\x20','location','_clearTimeoutTimer','awaiting_with_pending','ErrorCode','FETCH_MISS','getUnit','SnapshotService','SOCKET_FAILED','[DataLoaderService]','CollaborationSocketService','DataLoaderService','_event$','[OfflineState]:\x20received\x20changeset.','JOIN_ROOM_FAILED','roomInfos','_retryCount','_updateStatus','splice','_init','length','onStarting','/role','hasOwnProperty','telemetry\x20info\x20is\x20not\x20initialized','collaboration_new_changeset','_emitMembers','[FetchMissState]','_socketService','UNISCRIPT_RUN','JOINING','_roomCreated$','&to=','LIVESHARE_REQUEST_HOST','encodeURIComponent','MSG_FOR_ERROR','_queuedRemoteChangesets','reqId','_undoRedoService','599584coVpXl','SYNCED','cmd','_onLocalMutation','transformMutationsWithChangeset','_sessionStatus$','permissionRejEvent','requestParams','/universer-api/oidc/authpage','_getLoginPath','FetchingMissState','_lockTransition','NOT_COLLAB','NO_OTHER_CLIENTS_EDITING','incrementRevOfUnit','toggleOnline','_changesetReqId','getUnitId','152dYubGH','min','_handler','includes','href','status$','_getAPIPrefix','delay','createSocket','[CollaborationEntity]','_getSendChangesetTimeout','ILogService','setCurrentUser','getImage','entityInit$','_joinRoom','_remoteChangesetQueue','USERS_LEAVE','not_collab','synced','loadDoc','getCfgEnableObjInherit','members','actions','_onConflict','_substituteUndoStack','_clearScheduledTask','_onRemoteRetry','[CollaborationUndoRedoService]','_state$','fetchMissingChangesets','_onMessage','Error\x20on\x20receiving\x20event','_incrementRevisionNumber','JOIN_ROOM_FULL','startsWith','_entityInit$','FAIL','_showConflictNotification','_clearUndo','_undoStacks','onload','listRoles','awaitingChangeset','_toggleOffline','__Key__','liveShareOperation','_sender','image/bmp','_onOffline','_onUserJoin','enableAuthServer','_permissionService','_telemetryInfo','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','_waitForHeartbeatResponse','emitEvent','_scheduleCollaborationTimeoutTimer','pluginName','COMPRESS_MUTATION_SEND','setCfgEnableObjInherit','state','reduce','snapshotServerUrl','default','_removeRoom','JOIN','SUBMIT_CHANGESET','getInterceptPoints','startTime','compose','onMissedChangesetFetched','collaborators','_clearRetryConnectingTimer','collabSubmitChangesetUrl','LOCAL_CACHE_INTERVAL_KEY','getPrototypeOf','getAllMembers','prototype','floor','/allowed','UNIVER_COLLABORATION_CLIENT_PLUGIN','_cfgEnableObjInherit','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','_localeService','CommandType','UniverCollaborationClientPlugin','conflict','editingUnit','/collaborator','AwaitingState','getResourcesRequest','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','updateOfflineData','image/jpeg','_rescheduleHeartbeat','onMissingChangesets','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','Inject','offline','RxDisposable','UniverType','[CollaborationState]:\x20apply\x20error!','commentUpdate$','session.room-permission-denied','_transitionLocked','type','save\x20fail\x20reason\x20is\x20','_commentService','collaboration-client.local-cache-service','_singleActiveUnitService','_shouldReportTelemetry','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','debug','addHandlerCallback','CHANGESET_SHOULD_RETRY','/universer-api/file/{fileID}/sign-url','_syncEditingCollabCursor','state$','onLocalMutation','joinRsp','BASE64','unsubscribe','serializeCombRequest','_commandService','UNIVER_SHEET','session.join-failed','toggleOffline','bind','deepClone','UnitEmbedded','readyForCollab','setConfig','updateSnapshot','action','unitId','_startCollaboration','socket$','ConflictState','_pendingMutations','_initUnitPermissionChange','_updateLocalCache','session.room-full','putCollaborators','_logService','unitID','CmdRspCode','updateCollaborator','MemberService','url','onRemoteAck','isPermissionRej','refreshPermission','_commentUpdate$','deleteCollaborator','onRemoteChangeset','LEAVE','PendingState','POST','2fMWQTS','subscribe','onRemoteRej','_startTelemetryCollaborationNewChangeset','PERMISSION_REJ','_onCombEvent','_retryConnectingTimer','_socketMessageSubscription','AwaitingWithPendingState','SUCCUSS','post','_collaborationSessionService','isTransformMutationsWithChangesetFailure','_injector','_transformUndoredo','leaveEvent','_snapshotServerService','online$','reject','_status$','CollaborationStatus','HEARTBEAT_TIMEOUT_KEY','_transformRemoteChangesetByIMECache','/new_changes','update','focused$','clear','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','listCollaborators','getCurrentUser','_httpService','getLatestCsReqIdBySid','sessionStatus$','firstValueFrom','_registerDependencies','Injector','univer-pro.collaboration-client.single-active-unit-service','NEW_CHANGESETS','rev','/resources','_clearRedo','reconnect','call','_onConnectionFailed','onSyncEditingCollabCursor','Module','append','result','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','socket\x20open.','resolve','file','CombCmd','message$','[CollaborationSessionService]','_collaborationPaused','values','143235segJoJ','sheets','_onRecvEvent','readAsDataURL','take','status','data','push','IConfigService','BehaviorSubject','_sendHeartbeatTimer','CollaborationEntity','_transformIMECache','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','onTransformRemoteChangesetByStateCache','IContextService','_initDependencies','IUndoRedoService','_changesetSessionId','enableSingleActiveInstanceLock','UserManagerService','\x0aAfter:\x20','getDeserializedSheetBlock','univer-pro.collaboration-client-socket-service','LIVESHARE_TERMINATE','Plugin','UPDATE_CURSOR','has','_createHandler','HEARTBEAT_INTERVAL','SessionStatus','name','_localCacheService','isTransformMutationsWithChangesetSuccess','change$','_sessions','filter','fetchMiss','infoRsp','pipe','subject','get','_timeoutTimer','\x20-\x20','WorkbookEditablePermission','ImageSourceType','Quantity','_initMergeInterceptor','asObservable','321462wrtkGL','closeSession','unitInfo$','_exhaustRemoteChangesetQueue','b64DecodeUnicode','SheetCollaborationEntity','constructor','takeUntil','pending','_snapshotService','updateCursorEvent','liveShareNewHost','CONFLICT','_onRemoteACK','_members','_HTTPService','[PendingState]:\x20received\x20rejection.','_members$','_submitChangeset','&source=','next','_collabSessionService','UniverNetworkPlugin','revision','cfgEnableObjInherit','_compressMutationService','apply','_decreaseWaiting','sessionStatus','_listenToNetworkCondition','toString','uuidv4','c1Prime','interceptor','SheetPermissionInitController','image/jpg','parseChangesetToProtocol','fetch_missing','Rectangle','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','sequenceExecute','_configService','objectID','/universer-api/snapshot','close$','getCurrentRevOfUnit','symbol','getCollabEntity$','PERMISSION_DENIED','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','downloadEndpointUrl','uploadFileServerUrl','_type','random','getFocusedUnit','People','_getDownloadEndpointURL','_disableEditing','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','_transformService','HEARTBEAT_TIMEOUT','getLocalCacheKey','ReplaySubject','onlyLocal','deserializeToCombResponse','/universer-api/authz','UniverCollaborationPlugin','_userManagerService','originalMeta','loadOfflineData','error$','IUniverInstanceService','_transformRemoteChangesetByStateCache','routeKey','/universer-api/stream/file/upload','initWorkbookPermissionChange','_executeRemoteChangeset','every','[PendingState]:\x20received\x20acknowledgement.','sid','session.room-cnt-exceeds','/object','loadSheet','auth.needGotoLoginAlert','_resendTimeout','_unitInfo$','ITelemetryService','_clearHeartbeatTimer','getTypeOfUnitDisposed$','UNIVER_SLIDE','event$','transformChangesets','_eventService','INGEST','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','92865UqWler','_socketReady','resourceIDs','ITransformService','/fetchmissing?from=','DEFAULT_WS_SESSION_TICKET_URL','[PendingState]:\x20unhandled\x20univer\x20type:\x20','disposeWithMe','transformSelections','EmptyMutationInfo','fromCharCode','open$','executeCommand','82432gCrgKf','size','LIVESHARE_NEW_HOST','HELLO','HTTPService','_candidateSocket','pauseCollaboration','mapDocumentTypeToUniverType','/universer-api/snapshot/','toDisposable','saveImage','RECV','failed\x20to\x20apply\x20missed\x20changesets!','roles','collaMsg','IPermissionService','IDLE','MentionIoHttpService','COMPRESS_MUTATION_APPLY','touchDependencies','_getCurrentRevision','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','CollaborationSessionService','_createSocket','SetSelectionsOperation','_throwTelemetryCollaborationNewChangeset','onTransformRemoteChangesetByIMECache','parse','textRanges','_socket','forEach','getActiveSheet','CLOSE_ROOM','shouldCloseConn','_initRequestHeader','_onConnectionOpen','waitForRoom$','MentionType','resend','_updateState','_collaborationTimeoutTimer','fromCollab','RETRY_CONNECTING_MAX_COUNT','getTypeOfUnitAdded$','isInternalEditorID','PSEUDO_FETCH_MISSING_RESULT','getWorkbookSelections','session','CHANGESET_ACK','_redoStacks','headers','m2Prime','textEncoder','CollaborationController','unknown','_sendingTimer','CollaborationSession','_getUndoStack','LIVESHARE_OPERATION','_getUploadFileURL','AWAITING','0.20.1','getUnitType','AuthzIoHttpService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','parseProtocolChangeset','_scheduleCompleteTimestamp','/universer-api/comb','subUnitId','_sendHeartbeat','Workbook','onMutationExecutedForCollab','create','onSendChangeset','_onJoinRoomEvent','body','OFFLINE','_socket$','getConfig','_onFetchMissResult','FileId','_config','loadUnitOfRevision','requireSession','_univerInstanceService','getMemberID','close','_replayCachedMutations','onTransformSelections','CommentService','complete','userID','OfflineState','getMember','memberID','getOwnPropertyDescriptor','withCredentials','connection\x20error','batchAllowed','ILocalCacheService','set','registerDependencies','merge','ImageUploadStatusType','copyFileMeta','LIVESHARE_FETCH_OPERATIONS','IAuthzIoService','LOCAL_CACHE_INTERVAL','init','object','_collaborationUIEventService','/block/','defineProperty','__splitChunk__','_telemetryService','InsertSheetMutation','map','JOIN_ROOM_PERMISSION_DENIED','updateMember','MUTATION','_initCloseConn','CHANGESET_REJ','Subject','fetchThroughInterceptors','_sheetTransformSelectionsService','_onRemoteChangeset','_toggleOnline','transformStack\x20failed!','_waitCount','2178VzukDs','createCollaborator','12240KDvbhB','OPTIONAL','_transformStack','_onUserLeave','getUnitStatus$','CollaborationImageIoService','workbook','[CollaborationSession]','shareReplay','/unit/','onTransformState','list','localCacheService','univer-pro.collaboration-client.network-condition.service','code','HEARTBEAT','SUBMIT_CHANGESET_TIMEOUT','reverse','UNIVER_DOC','find','registerHTTPInterceptor','ISnapshotServerService','Disposable','_resendWithTimeout','_state','Tools','origin','_handlerCallback','ISocketService','_createInitialState','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','avatar','/-/object/list','transformUndoRedo','authzUrl','equals','range','_substituteRedoStack','joinEvent','_change$','collabWebSocketUrl','createIdentifier','unit-cache-','function','RichTextEditingMutation','_clearLocalCache','stopTime','error','now','USERS_ENTER','concat','setShowComponents','getCollabEntity','onTransformIME','UPDATE_PERMISSION_OBJ','getSheetId','_memberService','localeService','DependentOn','CompressMutationService','_getAPIPrefixPath','ONLINE','_transformSelections','x-univer-host','_unitID','/object/','createInstance','ICommandService','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','_revisionService','_tryEnsureSocket','115662ZtrDsp','Optional','UniverInstanceType','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','[SyncedState]:\x20received\x20acknowledgement.','csShouldRetryEvent','baseRev','dispose$','PERSON','removeMember','getSheetBlock','socketService','\x20in\x20_schedule.','slice','updatePermissionPoint','then','_imageSourceCache','ERROR_IMAGE','put','image/png','_applyRemoteChangeset','_maxTotalRetryTimeout','snapshot','JSONX','from','AWAITING_WITH_PENDING','DisposableCollection','dispose','__esModule','unitId\x20is\x20not\x20found','SNAPSHOT_URL_KEY','_stopTelemetryCollaborationNewChangeset','?url=','eventID','catch','HEARTBEAT_INTERVAL_KEY','/-/object/-/batch_allowed','_onRemoteRejected','_transformStateCache','getSnapshotAPIPath','OTHER_CLIENTS_EDITING','_schedule','_roomMembers','collaboratorID','SheetTransformSelectionsService','FETCH_MISSING','appendMutation','CollaborationUIEventService','selections','_getSignURL','_getCtorByUniverType','onStateChange','CollaborativeUndoRedoService','ICollaborationSocketService','DocCollaborationEntity','_isPermissionRej','[UniverCollaborationClientPlugin]','COMMENT_UPDATE','encode','collaboration-client.config','LocaleService','IImageIoService','getTime','onRemoteRetry','HTTPRequest','send','onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.','decorate','_getRedoStack','_checkMissing','_tryReconnect','retryConnectingInterval','CollaborationEvent','ERROR_IMAGE_TYPE','objectType','saveChangeset','getOwnPropertyNames','DEFAULT_COLLAB_WEB_SOCKET_URL','_awaitingChangeset','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','mutations','_replaceFileID','isArray','_acknowledgedAwaitingChangeset','_clearCollaborationTimeoutTimer','delete','_unlockTransition','_entities','entries','PENDING'];_0x1565=function(){return _0x1fa405;};return _0x1565();}Symbol(A);const _e={};function ve(_0x683458){const _0x3ebe3f=_0x5eca20;var _0x1e0218;return!!((_0x1e0218=_0x683458['params'])!=null&&_0x1e0218[_0x3ebe3f(0x29b)]);}const ye=new Set([d[_0x5eca20(0x29d)]['id']]);function be(_0x4d5558,_0x4afe7a,_0x1c9e62,_0x41bd91,_0x46967b){const _0xa9d207=_0x5eca20;var _0x46b8f6,_0x524ff9,_0x3c6c56,_0x525813;let _0x372fda=[];for(let _0x31e68b of _0x4d5558){if(ye[_0xa9d207(0x1a8)](_0x31e68b['id'])){if(_0x372fda[_0xa9d207(0x373)]>0x0)break;_0x372fda[_0xa9d207(0x194)](_0x31e68b);break;}if(ve(_0x31e68b)){if(_0x372fda[_0xa9d207(0x373)]>0x0)break;_0x372fda[_0xa9d207(0x194)](_0x31e68b);break;}_0x372fda[_0xa9d207(0x194)](_0x31e68b);}let _0x3c4be4=(_0x46b8f6=(_0x524ff9=_0x46967b[_0xa9d207(0x171)]())==null?void 0x0:_0x524ff9[_0xa9d207(0x285)])==null?_0xa9d207(0x260):_0x46b8f6,_0x3d6ebb=(_0x3c6c56=(_0x525813=_0x46967b['getCurrentUser']())==null?void 0x0:_0x525813[_0xa9d207(0x288)])==null?_0xa9d207(0x260):_0x3c6c56;return{'changeset':{'unitID':_0x4afe7a,'type':(0x0,c[_0xa9d207(0x231)])(_0x1c9e62[_0xa9d207(0x268)](_0x4afe7a)),'baseRev':_0x41bd91[_0xa9d207(0x1eb)](_0x4afe7a),'revision':0x0,'userID':_0x3c4be4,'memberID':_0x3d6ebb,'mutations':_0x372fda},'pendingMutations':_0x4d5558[_0xa9d207(0x301)](_0x372fda['length'])};}function xe(_0x36f9c2,_0x26a4b8,_0x5d526a,_0x4396aa,_0x22e895){const _0x28868c=_0x5eca20;var _0xb9fe75,_0x2e56b4,_0x4c0190,_0x530dff;let _0x18d167=[_0x36f9c2[_0x28868c(0x3d6)]((_0x1d746c,_0x30a893)=>{const _0x2a3277=_0x28868c;var _0x17e5d2;let {id:_0x10afa6}=_0x1d746c,{id:_0x20907c,type:_0x5032f1}=_0x30a893,_0x204de0=(_0x17e5d2=_0x1d746c[_0x2a3277(0x351)])==null?{'actions':null}:_0x17e5d2,_0x4323e8=_0x30a893[_0x2a3277(0x351)];if(_0x10afa6&&_0x10afa6!==_0x20907c)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0x10afa6+_0x2a3277(0x1b8)+_0x20907c+'.');return{..._0x1d746c,'id':_0x20907c,'type':_0x5032f1,'params':{'unitId':_0x4323e8[_0x2a3277(0x420)],'textRanges':_0x4323e8[_0x2a3277(0x246)],'actions':l[_0x2a3277(0x30b)][_0x2a3277(0x3de)](_0x204de0[_0x2a3277(0x3af)],_0x4323e8[_0x2a3277(0x3af)])}};},{})],_0xed4e6b=(_0xb9fe75=(_0x2e56b4=_0x22e895['getCurrentUser']())==null?void 0x0:_0x2e56b4[_0x28868c(0x285)])==null?'unknown':_0xb9fe75,_0x296755=(_0x4c0190=(_0x530dff=_0x22e895[_0x28868c(0x171)]())==null?void 0x0:_0x530dff['memberID'])==null?_0x28868c(0x260):_0x4c0190;return{'changeset':{'unitID':_0x26a4b8,'type':(0x0,c[_0x28868c(0x231)])(_0x5d526a['getUnitType'](_0x26a4b8)),'baseRev':_0x4396aa['getCurrentRevOfUnit'](_0x26a4b8),'revision':0x0,'userID':_0xed4e6b,'memberID':_0x296755,'mutations':_0x18d167},'pendingMutations':[]};}function Se(_0x32a764,_0x3b854b){const _0x26e19c=_0x5eca20;let _0x579581=new f[(_0x26e19c(0x1fc))](0x1);return setTimeout(()=>_0x579581['next'](_0x3b854b),_0x32a764),_0x579581[_0x26e19c(0x1bd)]()[_0x26e19c(0x1b4)]((0x0,f[_0x26e19c(0x191)])(0x1));}var Ce,we,Te;let j=function(_0x49a2f7){const _0x26c9f5=_0x5eca20;return _0x49a2f7[_0x26c9f5(0x392)]=_0x26c9f5(0x3aa),_0x49a2f7['SYNCED']=_0x26c9f5(0x3ab),_0x49a2f7[_0x26c9f5(0x34d)]=_0x26c9f5(0x1c6),_0x49a2f7[_0x26c9f5(0x266)]='awaiting',_0x49a2f7[_0x26c9f5(0x30d)]=_0x26c9f5(0x362),_0x49a2f7['FETCH_MISS']=_0x26c9f5(0x1e3),_0x49a2f7['CONFLICT']=_0x26c9f5(0x3ef),_0x49a2f7['OFFLINE']=_0x26c9f5(0x3fb),_0x49a2f7;}({});const Ee=0x4e20,De=0x2bf20;var M=class{constructor(_0x30e6e0,_0x24a9e1,_0x3250da,_0x471d30,_0x20e193,_0x169c45,_0x2b3651,_0x505a67,_0x3719fe){const _0x1bc10f=_0x5eca20;this[_0x1bc10f(0x42a)]=_0x30e6e0,this['type']=_0x24a9e1,this[_0x1bc10f(0x39a)]=_0x20e193,this[_0x1bc10f(0x415)]=_0x169c45,this[_0x1bc10f(0x385)]=_0x2b3651,this[_0x1bc10f(0x2f2)]=_0x505a67,this[_0x1bc10f(0x1ad)]=_0x3719fe,y(this,_0x1bc10f(0x342),null),y(this,_0x1bc10f(0x424),[]),this[_0x1bc10f(0x342)]=_0x3250da,this[_0x1bc10f(0x424)]=_0x471d30;}['_checkMissing'](_0x2c4863){const _0x154222=_0x5eca20;let _0x4718bc=this[_0x154222(0x2f2)][_0x154222(0x1eb)](this['unitID']);return _0x2c4863['revision']>_0x4718bc+0x1?(this[_0x154222(0x39a)][_0x154222(0x3f8)]({'from':_0x4718bc,'to':_0x2c4863[_0x154222(0x1d5)]-0x1}),!0x0):!0x1;}[_0x5eca20(0x162)](_0x1d80f2){const _0x56afe6=_0x5eca20;this[_0x56afe6(0x385)]['transformUndoRedo'](this[_0x56afe6(0x42a)],_0x1d80f2);}[_0x5eca20(0x2eb)](_0x2f0f90){const _0x43c10c=_0x5eca20;var _0x3ef777,_0x17ab31;(_0x3ef777=(_0x17ab31=this[_0x43c10c(0x39a)])[_0x43c10c(0x282)])==null||_0x3ef777['call'](_0x17ab31,_0x2f0f90);}[_0x5eca20(0x199)](_0x1d7ca1){const _0x27b60e=_0x5eca20;var _0x58358c,_0x3d7ecc;return(_0x58358c=(_0x3d7ecc=this[_0x27b60e(0x39a)])[_0x27b60e(0x2e2)])==null?void 0x0:_0x58358c[_0x27b60e(0x17e)](_0x3d7ecc,_0x1d7ca1);}['_transformStateCache'](_0x1c49fe){const _0x55dd20=_0x5eca20;var _0x3022fd,_0x4e5d55;return(_0x3022fd=(_0x4e5d55=this[_0x55dd20(0x39a)])[_0x55dd20(0x2b7)])==null?void 0x0:_0x3022fd[_0x55dd20(0x17e)](_0x4e5d55,_0x1c49fe);}[_0x5eca20(0x16a)](_0x2f23a9){const _0x576cf6=_0x5eca20;var _0x3dc68a,_0x4093dc,_0xb22716;return(_0x3dc68a=(_0x4093dc=(_0xb22716=this[_0x576cf6(0x39a)])['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x4093dc[_0x576cf6(0x17e)](_0xb22716,_0x2f23a9))==null?_0x2f23a9:_0x3dc68a;}[_0x5eca20(0x206)](_0x55c89a){const _0xbbdbef=_0x5eca20;var _0x3526c1,_0x22e96c,_0x85ee2c;return(_0x3526c1=(_0x22e96c=(_0x85ee2c=this[_0xbbdbef(0x39a)])[_0xbbdbef(0x19b)])==null?void 0x0:_0x22e96c['call'](_0x85ee2c,_0x55c89a))==null?_0x55c89a:_0x3526c1;}[_0x5eca20(0x40e)](_0x2b2617){const _0x20581f=_0x5eca20;if(this[_0x20581f(0x402)]===p[_0x20581f(0x3fd)]['UNIVER_DOC']){let {unitID:_0x4a1d78,mutations:_0x23d1d1,memberID:_0x1fe600}=_0x2b2617,_0x5e623a=_0x23d1d1[_0x20581f(0x373)]>0x0?_0x23d1d1[0x0]['params'][_0x20581f(0x246)]:[];if(Array[_0x20581f(0x346)](_0x5e623a)&&_0x5e623a[_0x20581f(0x373)]>0x0){var _0x30d84a,_0x23e997;(_0x30d84a=(_0x23e997=this[_0x20581f(0x39a)])['onSyncEditingCollabCursor'])==null||_0x30d84a[_0x20581f(0x17e)](_0x23e997,{'unitID':_0x4a1d78,'memberID':_0x1fe600,'textRanges':_0x5e623a});}}}[_0x5eca20(0x426)](){const _0x44f05a=_0x5eca20;var _0x2d1536;(_0x2d1536=this[_0x44f05a(0x1ad)])==null||_0x2d1536[_0x44f05a(0x3f5)](this[_0x44f05a(0x42a)],this[_0x44f05a(0x402)],this['_awaitingChangeset'],this[_0x44f05a(0x424)]);}['_getCurrentRevision'](){const _0x26aa67=_0x5eca20;return this[_0x26aa67(0x2f2)][_0x26aa67(0x1eb)](this[_0x26aa67(0x42a)]);}['_incrementRevisionNumber'](){const _0x727624=_0x5eca20;this[_0x727624(0x2f2)][_0x727624(0x394)](this[_0x727624(0x42a)]);}[_0x5eca20(0x20a)](_0x32719d){const _0x435176=_0x5eca20;let _0x3e3ba3=this['_transformRemoteChangesetByIMECache'](_0x32719d);_0x3e3ba3=this[_0x435176(0x206)](_0x3e3ba3);let _0x3e657a=(0x0,l[_0x435176(0x1e6)])(_0x3e3ba3[_0x435176(0x344)],this[_0x435176(0x415)],{'fromCollab':!0x0});if(!_0x3e657a[_0x435176(0x183)]){var _0x206482;throw _0x3e657a[_0x435176(0x2dc)]instanceof Error?_0x3e657a['error']:Error((_0x206482=_0x3e657a[_0x435176(0x2dc)])==null?_0x435176(0x3fe):_0x206482);}this[_0x435176(0x199)](_0x3e3ba3),this[_0x435176(0x31a)](_0x3e3ba3),this[_0x435176(0x162)](_0x32719d),this['_transformSelections'](_0x3e3ba3),this[_0x435176(0x40e)](_0x3e3ba3),this['_incrementRevisionNumber']();}};let N=class extends M{constructor(_0x49efac,_0x571fc7,_0x27674f,_0xc66b86,_0x5bc4a6,_0xa314e3,_0x25e829,_0x1e8673,_0x281c8d,_0x2ea81b){const _0x715a69=_0x5eca20;super(_0x49efac,_0x571fc7,null,[],_0x27674f,_0x25e829,_0xa314e3,_0xc66b86,_0x2ea81b),this['_injector']=_0x5bc4a6,this[_0x715a69(0x429)]=_0x1e8673,this[_0x715a69(0x1f9)]=_0x281c8d,this[_0x715a69(0x2b9)]=_0x2ea81b,y(this,_0x715a69(0x192),j[_0x715a69(0x387)]);}[_0x5eca20(0x322)](_0x361b66){const _0x4f2956=_0x5eca20;let _0xb5cf2d=this[_0x4f2956(0x161)][_0x4f2956(0x2ef)](P,this[_0x4f2956(0x42a)],this[_0x4f2956(0x402)],[_0x361b66],this[_0x4f2956(0x39a)]);return _0xb5cf2d[_0x4f2956(0x31d)](),_0xb5cf2d[_0x4f2956(0x426)](),_0xb5cf2d;}['onRemoteChangeset'](_0x253fa5){const _0x179880=_0x5eca20;if(this['_checkMissing'](_0x253fa5))return this['_injector'][_0x179880(0x2ef)](z,this[_0x179880(0x42a)],this[_0x179880(0x402)],null,[],null,[_0x253fa5],this[_0x179880(0x39a)]);try{let _0x2ce86a=this[_0x179880(0x1f9)]['transformMutationsWithChangeset'](_0x253fa5,[c[_0x179880(0x226)]]);if((0x0,c[_0x179880(0x1ae)])(_0x2ce86a)){let {c1Prime:_0x35d761}=_0x2ce86a;return this[_0x179880(0x20a)](_0x35d761),this;}throw _0x2ce86a['error'];}catch(_0x246e08){return this[_0x179880(0x429)][_0x179880(0x2dc)](_0x246e08),this[_0x179880(0x3b0)](!0x1);}}[_0x5eca20(0x3b0)](_0x42907b){const _0x13fee4=_0x5eca20;return this[_0x13fee4(0x161)][_0x13fee4(0x2ef)](L,this[_0x13fee4(0x42a)],this[_0x13fee4(0x402)],null,[],this[_0x13fee4(0x39a)],_0x42907b);}[_0x5eca20(0x42f)](){const _0x2cde38=_0x5eca20;throw Error(_0x2cde38(0x2f8));}[_0x5eca20(0x43a)](){throw Error('[SyncedState]:\x20received\x20rejection.');}['onRemoteRetry'](){return this;}[_0x5eca20(0x418)](){const _0x27a97f=_0x5eca20;return this[_0x27a97f(0x161)][_0x27a97f(0x2ef)](R,this[_0x27a97f(0x42a)],this[_0x27a97f(0x402)],null,[],this[_0x27a97f(0x39a)]);}[_0x5eca20(0x395)](){return this;}[_0x5eca20(0x250)](){const _0x58706d=_0x5eca20;throw Error(_0x58706d(0x3eb));}[_0x5eca20(0x1b2)](){const _0x4ecb68=_0x5eca20;let _0x241dc6=this[_0x4ecb68(0x2f2)][_0x4ecb68(0x1eb)](this[_0x4ecb68(0x42a)]);return this[_0x4ecb68(0x39a)][_0x4ecb68(0x3f8)]({'from':_0x241dc6,'to':0x0}),this[_0x4ecb68(0x161)]['createInstance'](z,this['unitID'],this[_0x4ecb68(0x402)],null,[],null,[],this[_0x4ecb68(0x39a)]);}};N=C([S(0x3,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(l['Injector'])),S(0x5,l['IUndoRedoService']),S(0x6,l['ICommandService']),S(0x7,l['ILogService']),S(0x8,c[_0x5eca20(0x220)]),S(0x9,(0x0,l[_0x5eca20(0x2f5)])(D))],N);let P=Ce=class extends M{constructor(_0x2c5258,_0x2e741d,_0x229d9b,_0x156963,_0x3c9f37,_0x5e6af0,_0x1c4465,_0x39fe5b,_0x59a004,_0x5a9ccd,_0x1d52c0,_0x22db08,_0x122be0,_0x4127b4){const _0x2e8cdb=_0x5eca20;super(_0x2c5258,_0x2e741d,null,_0x229d9b,_0x156963,_0x59a004,_0x122be0,_0x5e6af0,_0x4127b4),this[_0x2e8cdb(0x161)]=_0x3c9f37,this[_0x2e8cdb(0x2e5)]=_0x1c4465,this[_0x2e8cdb(0x429)]=_0x39fe5b,this[_0x2e8cdb(0x1e7)]=_0x5a9ccd,this[_0x2e8cdb(0x1f9)]=_0x1d52c0,this[_0x2e8cdb(0x27e)]=_0x22db08,y(this,_0x2e8cdb(0x192),j[_0x2e8cdb(0x34d)]),y(this,_0x2e8cdb(0x26c),null),y(this,_0x2e8cdb(0x261),null);}[_0x5eca20(0x322)](_0x4d9b6a){const _0x3d4310=_0x5eca20;return this[_0x3d4310(0x424)][_0x3d4310(0x194)](_0x4d9b6a),this[_0x3d4310(0x426)](),this;}['onRemoteChangeset'](_0x467836){const _0x4b758c=_0x5eca20;if(this[_0x4b758c(0x339)](_0x467836))return this[_0x4b758c(0x3b2)](),this[_0x4b758c(0x161)][_0x4b758c(0x2ef)](z,this[_0x4b758c(0x42a)],this['type'],null,this[_0x4b758c(0x424)],null,[_0x467836],this[_0x4b758c(0x39a)]);try{let _0x43da6f=this[_0x4b758c(0x1f9)][_0x4b758c(0x38a)](_0x467836,this['_pendingMutations']);if((0x0,c[_0x4b758c(0x1ae)])(_0x43da6f)){let {c1Prime:_0x2e19ff,m2Prime:_0xc928ab}=_0x43da6f;this[_0x4b758c(0x20a)](_0x2e19ff);let _0x337b24=this['_injector']['createInstance'](Ce,this[_0x4b758c(0x42a)],this[_0x4b758c(0x402)],_0xc928ab,this[_0x4b758c(0x39a)]);this[_0x4b758c(0x3b2)]();let _0x4c5814=new Date()['getTime'](),_0x21caeb=this[_0x4b758c(0x26c)]?Math['max'](this[_0x4b758c(0x26c)]-_0x4c5814,0x0):this[_0x4b758c(0x3a2)]();return _0x337b24['_schedule'](_0x21caeb),_0x337b24;}throw _0x43da6f['error'];}catch(_0x3a5132){return this['_logService'][_0x4b758c(0x2dc)](_0x3a5132),this[_0x4b758c(0x3b0)](!0x1);}}['onRemoteAck'](){const _0x4e1112=_0x5eca20;throw Error(_0x4e1112(0x20c));}[_0x5eca20(0x43a)](){const _0x5debbf=_0x5eca20;throw Error(_0x5debbf(0x1ce));}[_0x5eca20(0x333)](){return this;}[_0x5eca20(0x418)](){const _0x5992bc=_0x5eca20;return this[_0x5992bc(0x3b2)](),this['_injector']['createInstance'](R,this[_0x5992bc(0x42a)],this[_0x5992bc(0x402)],null,this[_0x5992bc(0x424)],this[_0x5992bc(0x39a)]);}[_0x5eca20(0x395)](){return this;}[_0x5eca20(0x31d)](_0xc56270){const _0x19c35f=_0x5eca20;let _0x468c0d=_0xc56270==null?this[_0x19c35f(0x3a2)]():_0xc56270;this['_scheduleCompleteTimestamp']=new Date()[_0x19c35f(0x332)]()+_0x468c0d,this[_0x19c35f(0x261)]=setTimeout(()=>{const _0xf065de=_0x19c35f;this['_clearScheduledTask']();let _0x4a3540=null;switch(this[_0xf065de(0x402)]){case p[_0xf065de(0x3fd)][_0xf065de(0x416)]:_0x4a3540=be(this[_0xf065de(0x424)],this['unitID'],this[_0xf065de(0x27e)],this['_revisionService'],this[_0xf065de(0x2e5)]);break;case p[_0xf065de(0x3fd)][_0xf065de(0x2bf)]:_0x4a3540=this[_0xf065de(0x424)][_0xf065de(0x20b)](_0x53b4a6=>_0x53b4a6['id']===u[_0xf065de(0x2d9)]['id'])?xe(this['_pendingMutations'],this['unitID'],this[_0xf065de(0x27e)],this[_0xf065de(0x2f2)],this[_0xf065de(0x2e5)]):be(this[_0xf065de(0x424)],this[_0xf065de(0x42a)],this[_0xf065de(0x27e)],this[_0xf065de(0x2f2)],this[_0xf065de(0x2e5)]);break;default:throw Error(_0xf065de(0x223)+this[_0xf065de(0x402)]+_0xf065de(0x300));}let {changeset:_0x1eea53,pendingMutations:_0x380da3}=_0x4a3540;this[_0xf065de(0x39a)][_0xf065de(0x273)](_0x1eea53);let _0x25260e=_0x380da3['length']?this['_injector'][_0xf065de(0x2ef)](I,this['unitID'],this[_0xf065de(0x402)],_0x1eea53,_0x380da3,this[_0xf065de(0x39a)],void 0x0):this[_0xf065de(0x161)][_0xf065de(0x2ef)](F,this[_0xf065de(0x42a)],this[_0xf065de(0x402)],_0x1eea53,this[_0xf065de(0x39a)]);_0x25260e[_0xf065de(0x426)](),this['_handler'][_0xf065de(0x327)](this,_0x25260e);},_0x468c0d);}['_getSendChangesetTimeout'](){const _0x405fab=_0x5eca20;var _0x27d77b;let _0x2aec94=this['_configService'][_0x405fab(0x278)](A);return(_0x27d77b=_0x2aec94==null?void 0x0:_0x2aec94[_0x405fab(0x34e)])==null?0x7d0:_0x27d77b;}['resend'](){throw Error('[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x5eca20(0x3b2)](){const _0x5f0f82=_0x5eca20;this[_0x5f0f82(0x261)]!=null&&(clearTimeout(this[_0x5f0f82(0x261)]),this[_0x5f0f82(0x261)]=null);}[_0x5eca20(0x3b0)](_0x30e18e){const _0x7f1fbb=_0x5eca20;return this[_0x7f1fbb(0x3b2)](),this[_0x7f1fbb(0x161)][_0x7f1fbb(0x2ef)](L,this[_0x7f1fbb(0x42a)],this['type'],null,this[_0x7f1fbb(0x424)],this['_handler'],_0x30e18e);}};P=Ce=C([S(0x4,(0x0,l[_0x5eca20(0x3fa)])(l['Injector'])),S(0x5,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0x6,(0x0,l['Inject'])(w)),S(0x7,l['ILogService']),S(0x8,l[_0x5eca20(0x2f0)]),S(0x9,l[_0x5eca20(0x195)]),S(0xa,c[_0x5eca20(0x220)]),S(0xb,l[_0x5eca20(0x205)]),S(0xc,l[_0x5eca20(0x19e)]),S(0xd,(0x0,l[_0x5eca20(0x2f5)])(D))],P);let F=we=class extends M{constructor(_0x3881df,_0x49b584,_0x2adb0b,_0x5abbda,_0xa45aac,_0x358e62,_0x58bbfb,_0x39f0fd,_0x47ad97,_0x225bd1,_0x4f7c30){const _0xe609ac=_0x5eca20;super(_0x3881df,_0x49b584,_0x2adb0b,[],_0x5abbda,_0x58bbfb,_0x225bd1,_0x358e62,_0x4f7c30),this[_0xe609ac(0x161)]=_0xa45aac,this[_0xe609ac(0x429)]=_0x39f0fd,this['_transformService']=_0x47ad97,y(this,_0xe609ac(0x192),j[_0xe609ac(0x266)]),y(this,_0xe609ac(0x212),0x0),y(this,_0xe609ac(0x309),0x0),y(this,_0xe609ac(0x357),void 0x0),y(this,'_sender',void 0x0);}[_0x5eca20(0x322)](_0x1107fc){const _0x1ee9a5=_0x5eca20;this['_clearScheduledTask']();let _0x46418c=this[_0x1ee9a5(0x161)][_0x1ee9a5(0x2ef)](I,this[_0x1ee9a5(0x42a)],this['type'],this['_awaitingChangeset'],[_0x1107fc],this[_0x1ee9a5(0x39a)],this[_0x1ee9a5(0x357)]);return _0x46418c[_0x1ee9a5(0x426)](),_0x46418c;}[_0x5eca20(0x434)](_0x3445bb){const _0x1c69ce=_0x5eca20;if(this[_0x1c69ce(0x339)](_0x3445bb))return this[_0x1c69ce(0x3b2)](),this[_0x1c69ce(0x161)][_0x1c69ce(0x2ef)](z,this[_0x1c69ce(0x42a)],this[_0x1c69ce(0x402)],this['_awaitingChangeset'],[],null,[_0x3445bb],this[_0x1c69ce(0x39a)]);try{let _0x2b9d0b=this[_0x1c69ce(0x1f9)][_0x1c69ce(0x219)]([_0x3445bb],[this['_awaitingChangeset']],!0x1);if((0x0,c['isTransformChangesetsSuccess'])(_0x2b9d0b)){let {c1Prime:_0x5ed6b5,c2Prime:_0x349b50}=_0x2b9d0b;this['_executeRemoteChangeset'](_0x5ed6b5[0x0]),_0x349b50[0x0][_0x1c69ce(0x2fa)]=this[_0x1c69ce(0x23e)](),this[_0x1c69ce(0x3b2)]();let _0x56e815=this['_injector'][_0x1c69ce(0x2ef)](we,this[_0x1c69ce(0x42a)],this['type'],_0x349b50[0x0],this[_0x1c69ce(0x39a)]);return _0x56e815[_0x1c69ce(0x426)](),_0x56e815;}return this[_0x1c69ce(0x3b0)](!0x1);}catch(_0x2db0b5){return this['_logService'][_0x1c69ce(0x2dc)](_0x2db0b5),this[_0x1c69ce(0x3b0)](!0x1);}}['onRemoteAck'](_0x32daed){const _0xbff360=_0x5eca20;this['_clearScheduledTask']();let _0x148570=this[_0xbff360(0x2f2)]['getCurrentRevOfUnit'](this[_0xbff360(0x42a)]);if(_0x32daed['revision']<_0x148570-0x1)return this;if(this[_0xbff360(0x339)](_0x32daed))return this[_0xbff360(0x161)][_0xbff360(0x2ef)](z,this[_0xbff360(0x42a)],this[_0xbff360(0x402)],null,[],this[_0xbff360(0x342)],[],this[_0xbff360(0x39a)]);this[_0xbff360(0x3b9)]();let _0x7d35=this['_injector'][_0xbff360(0x2ef)](N,this[_0xbff360(0x42a)],this['type'],this[_0xbff360(0x39a)]);return _0x7d35['_updateLocalCache'](),_0x7d35;}[_0x5eca20(0x43a)](_0xe33c20){const _0x4c36d3=_0x5eca20;return this[_0x4c36d3(0x3b0)](!!(_0xe33c20!=null&&_0xe33c20['isPermissionRej']));}[_0x5eca20(0x333)](_0x32a79e){const _0x2657c1=_0x5eca20;return this['_maxTotalRetryTimeout']>De?this[_0x2657c1(0x418)]():(this[_0x2657c1(0x357)]=Se(this[_0x2657c1(0x212)],{'timeout':this[_0x2657c1(0x212)],'reqId':_0x32a79e[_0x2657c1(0x384)]}),this[_0x2657c1(0x3c7)]=this['_resendTimer'][_0x2657c1(0x439)](({reqId:_0x33729a,timeout:_0x382fb9})=>{const _0x1ff203=_0x2657c1;this[_0x1ff203(0x2c4)](_0x33729a,_0x382fb9);}),this);}[_0x5eca20(0x418)](){const _0x20bd7b=_0x5eca20;return this[_0x20bd7b(0x3b2)](),this[_0x20bd7b(0x161)]['createInstance'](R,this[_0x20bd7b(0x42a)],this[_0x20bd7b(0x402)],this[_0x20bd7b(0x342)],[],this[_0x20bd7b(0x39a)]);}[_0x5eca20(0x395)](){return this;}['resend'](){const _0x25a690=_0x5eca20;this[_0x25a690(0x39a)][_0x25a690(0x273)](this[_0x25a690(0x342)]);}[_0x5eca20(0x3b0)](_0x1a2a78){const _0x12451c=_0x5eca20;return this[_0x12451c(0x3b2)](),this[_0x12451c(0x161)]['createInstance'](L,this[_0x12451c(0x42a)],this[_0x12451c(0x402)],this['_awaitingChangeset'],[],this[_0x12451c(0x39a)],_0x1a2a78);}['_resendWithTimeout'](_0x5e1405,_0x5030cc){const _0xb94cee=_0x5eca20;var _0x3b6737;_0x5e1405===((_0x3b6737=this[_0xb94cee(0x342)])==null?void 0x0:_0x3b6737[_0xb94cee(0x384)])&&(this['resend'](),this[_0xb94cee(0x212)]=_0x5030cc===0x0?0x3e8:Math[_0xb94cee(0x399)](_0x5030cc*0x2,Ee),this[_0xb94cee(0x309)]+=this[_0xb94cee(0x212)]);}[_0x5eca20(0x3b2)](){const _0x2e90f1=_0x5eca20;var _0x16bdd7;(_0x16bdd7=this[_0x2e90f1(0x3c7)])==null||_0x16bdd7[_0x2e90f1(0x413)](),this[_0x2e90f1(0x212)]=0x0,this[_0x2e90f1(0x309)]=0x0;}};F=we=C([S(0x4,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x5,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0x6,l[_0x5eca20(0x2f0)]),S(0x7,l[_0x5eca20(0x3a3)]),S(0x8,c[_0x5eca20(0x220)]),S(0x9,l[_0x5eca20(0x19e)]),S(0xa,(0x0,l[_0x5eca20(0x2f5)])(D))],F);let I=Te=class extends M{constructor(_0x41d66c,_0x55e7c4,_0x20d4a,_0x2787a4,_0x24eecd,_0x2af2d9,_0x152920,_0x3777f0,_0x8ae16,_0x388a90,_0x451074,_0x11417e,_0x288c42){const _0x55a4ca=_0x5eca20;super(_0x41d66c,_0x55e7c4,_0x20d4a,_0x2787a4,_0x24eecd,_0x8ae16,_0x11417e,_0x3777f0,_0x288c42),this['_injector']=_0x152920,this[_0x55a4ca(0x429)]=_0x388a90,this[_0x55a4ca(0x1f9)]=_0x451074,this[_0x55a4ca(0x2b9)]=_0x288c42,y(this,'status',j[_0x55a4ca(0x30d)]),y(this,_0x55a4ca(0x212),0x0),y(this,'_maxTotalRetryTimeout',0x0),y(this,'_resendTimer',void 0x0),y(this,_0x55a4ca(0x3c7),void 0x0),_0x2af2d9&&(this[_0x55a4ca(0x357)]=_0x2af2d9,this[_0x55a4ca(0x3c7)]=this[_0x55a4ca(0x357)][_0x55a4ca(0x439)](({reqId:_0x3f6426,timeout:_0xef675c})=>{const _0x4fb44e=_0x55a4ca;this[_0x4fb44e(0x2c4)](_0x3f6426,_0xef675c);}));}[_0x5eca20(0x322)](_0x528f63){const _0x555dc6=_0x5eca20;return this[_0x555dc6(0x424)]['push'](_0x528f63),this;}[_0x5eca20(0x434)](_0x4ab854){const _0x17c013=_0x5eca20;if(this['_checkMissing'](_0x4ab854))return this[_0x17c013(0x3b2)](),this[_0x17c013(0x161)]['createInstance'](z,this[_0x17c013(0x42a)],this[_0x17c013(0x402)],this[_0x17c013(0x342)],this[_0x17c013(0x424)],null,[_0x4ab854],this[_0x17c013(0x39a)]);try{let _0xf7912c=this[_0x17c013(0x1f9)][_0x17c013(0x219)]([_0x4ab854],[this['_awaitingChangeset']],!0x1);if((0x0,c['isTransformChangesetsSuccess'])(_0xf7912c)){let {c1Prime:_0x5d48f7,c2Prime:_0x220393}=_0xf7912c,_0x38deed=this['_transformService']['transformMutationsWithChangeset'](_0x5d48f7[0x0],this[_0x17c013(0x424)]);if((0x0,c[_0x17c013(0x1ae)])(_0x38deed)){let {c1Prime:_0x54f51e,m2Prime:_0x5a3168}=_0x38deed;return this[_0x17c013(0x20a)](_0x54f51e),_0x220393[0x0][_0x17c013(0x2fa)]=this[_0x17c013(0x23e)](),this[_0x17c013(0x3b2)](),this['_injector']['createInstance'](Te,this['unitID'],this['type'],_0x220393[0x0],_0x5a3168,this['_handler'],void 0x0);}throw _0x38deed[_0x17c013(0x2dc)];}throw _0xf7912c['error'];}catch(_0x5148bc){return this['_logService'][_0x17c013(0x2dc)](_0x5148bc),this['_onConflict'](!0x1);}}[_0x5eca20(0x42f)](_0x59ec75){const _0x39ad2c=_0x5eca20;if(this[_0x39ad2c(0x3b2)](),this['_checkMissing'](_0x59ec75))return this[_0x39ad2c(0x161)][_0x39ad2c(0x2ef)](z,this[_0x39ad2c(0x42a)],this[_0x39ad2c(0x402)],null,this['_pendingMutations'],this[_0x39ad2c(0x342)],[],this['_handler']);this[_0x39ad2c(0x3b9)]();let _0x385bbd=this[_0x39ad2c(0x161)][_0x39ad2c(0x2ef)](P,this['unitID'],this[_0x39ad2c(0x402)],this[_0x39ad2c(0x424)],this[_0x39ad2c(0x39a)]);return _0x385bbd[_0x39ad2c(0x31d)](),_0x385bbd[_0x39ad2c(0x426)](),_0x385bbd;}[_0x5eca20(0x43a)](_0x220c4b){const _0x5ca318=_0x5eca20;return this[_0x5ca318(0x3b0)](!!(_0x220c4b!=null&&_0x220c4b['isPermissionRej']));}[_0x5eca20(0x333)](_0x2ff9e9){const _0x2ab134=_0x5eca20;return this[_0x2ab134(0x309)]>De?this[_0x2ab134(0x418)]():(this[_0x2ab134(0x357)]=Se(this[_0x2ab134(0x212)],{'timeout':this[_0x2ab134(0x212)],'reqId':_0x2ff9e9[_0x2ab134(0x384)]}),this['_sender']=this[_0x2ab134(0x357)]['subscribe'](({reqId:_0x3b2792,timeout:_0x5a34c0})=>{const _0x55b7a2=_0x2ab134;this[_0x55b7a2(0x2c4)](_0x3b2792,_0x5a34c0);}),this);}[_0x5eca20(0x418)](){const _0x5755a2=_0x5eca20;return this[_0x5755a2(0x3b2)](),this[_0x5755a2(0x161)][_0x5755a2(0x2ef)](R,this['unitID'],this[_0x5755a2(0x402)],this[_0x5755a2(0x342)],this[_0x5755a2(0x424)],this[_0x5755a2(0x39a)]);}[_0x5eca20(0x395)](){return this;}['resend'](){const _0x572bc4=_0x5eca20;this[_0x572bc4(0x39a)][_0x572bc4(0x273)](this['_awaitingChangeset']);}[_0x5eca20(0x3b0)](_0x374efb){const _0x197c8b=_0x5eca20;return this[_0x197c8b(0x3b2)](),this[_0x197c8b(0x161)][_0x197c8b(0x2ef)](L,this[_0x197c8b(0x42a)],this['type'],null,this['_pendingMutations'],this[_0x197c8b(0x39a)],_0x374efb);}['_resendWithTimeout'](_0x360c36,_0x3beafe){const _0x3ac6c9=_0x5eca20;var _0x5b3b7e;_0x360c36===((_0x5b3b7e=this[_0x3ac6c9(0x342)])==null?void 0x0:_0x5b3b7e[_0x3ac6c9(0x384)])&&(this[_0x3ac6c9(0x250)](),this[_0x3ac6c9(0x212)]=_0x3beafe===0x0?0x3e8:Math[_0x3ac6c9(0x399)](_0x3beafe*0x2,Ee),this[_0x3ac6c9(0x309)]+=this[_0x3ac6c9(0x212)]);}['_clearScheduledTask'](){const _0x401b9f=_0x5eca20;var _0x4114ad;(_0x4114ad=this['_sender'])==null||_0x4114ad[_0x401b9f(0x413)](),this['_resendTimeout']=0x0,this[_0x401b9f(0x309)]=0x0;}};I=Te=C([S(0x6,(0x0,l['Inject'])(l['Injector'])),S(0x7,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0x8,l[_0x5eca20(0x2f0)]),S(0x9,l['ILogService']),S(0xa,c[_0x5eca20(0x220)]),S(0xb,l[_0x5eca20(0x19e)]),S(0xc,(0x0,l[_0x5eca20(0x2f5)])(D))],I);let L=class extends M{constructor(_0x289972,_0x16f0b1,_0x3296be,_0x1ff719,_0x575a24,_0xb14e3c=!0x1,_0xe3a06b,_0x4c4665,_0x22a0a9,_0x24098d,_0x51497d,_0x348687,_0x2bcb06){const _0x432e5f=_0x5eca20;super(_0x289972,_0x16f0b1,_0x3296be,_0x1ff719,_0x575a24,_0x4c4665,_0x22a0a9,_0x24098d,_0x2bcb06),this[_0x432e5f(0x32b)]=_0xb14e3c,this[_0x432e5f(0x3cc)]=_0xe3a06b,this[_0x432e5f(0x3ec)]=_0x51497d,this[_0x432e5f(0x298)]=_0x348687,this[_0x432e5f(0x2b9)]=_0x2bcb06,y(this,_0x432e5f(0x192),j[_0x432e5f(0x1ca)]),this[_0x432e5f(0x3be)](),this[_0x432e5f(0x2da)](),this['_disableEditing']();}['appendMutation'](){return this;}[_0x5eca20(0x434)](){return this;}[_0x5eca20(0x42f)](){return this;}['onRemoteRej'](){return this;}[_0x5eca20(0x333)](){return this;}[_0x5eca20(0x418)](){return this;}['toggleOnline'](){return this;}[_0x5eca20(0x250)](){throw Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}['_clearLocalCache'](){const _0x187fe0=_0x5eca20;var _0x3440f0;(_0x3440f0=this[_0x187fe0(0x1ad)])==null||_0x3440f0[_0x187fe0(0x3f5)](this[_0x187fe0(0x42a)],this[_0x187fe0(0x402)],null,[]);}[_0x5eca20(0x3be)](){const _0x205c37=_0x5eca20;this[_0x205c37(0x32b)]?this[_0x205c37(0x298)]['emitEvent']({'id':b[_0x205c37(0x1ee)]}):this[_0x205c37(0x298)][_0x205c37(0x3d0)]({'id':b[_0x205c37(0x1ca)]});}[_0x5eca20(0x1f7)](){const _0x507802=_0x5eca20;this[_0x507802(0x3cc)][_0x507802(0x302)](new d[(_0x507802(0x1b9))](this[_0x507802(0x42a)])['id'],!0x1);}};L=C([S(0x6,(0x0,l['Inject'])(l['IPermissionService'])),S(0x7,l[_0x5eca20(0x2f0)]),S(0x8,l[_0x5eca20(0x19e)]),S(0x9,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0xa,(0x0,l[_0x5eca20(0x3fa)])(l['LocaleService'])),S(0xb,(0x0,l['Inject'])(x)),S(0xc,(0x0,l[_0x5eca20(0x2f5)])(D))],L);let R=class extends M{constructor(_0x4ae497,_0x3678e4,_0x1f9cc2,_0x422ade,_0x4c4293,_0x554038,_0x2b65e2,_0x26c215,_0x1efdca,_0x1e0863){const _0x54090e=_0x5eca20;super(_0x4ae497,_0x3678e4,_0x1f9cc2,_0x422ade,_0x4c4293,_0x26c215,_0x1efdca,_0x2b65e2,_0x1e0863),this[_0x54090e(0x161)]=_0x554038,y(this,_0x54090e(0x192),j['OFFLINE']);}['appendMutation'](_0x503795){const _0x2a9aed=_0x5eca20;return this[_0x2a9aed(0x424)][_0x2a9aed(0x194)](_0x503795),this[_0x2a9aed(0x426)](),this;}[_0x5eca20(0x434)](_0x565cd8){const _0x39bdd3=_0x5eca20;throw Error(_0x39bdd3(0x36c));}['onRemoteAck'](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x5eca20(0x43a)](){throw Error('[OfflineState]:\x20received\x20rejection.');}[_0x5eca20(0x333)](){return this;}['toggleOffline'](){return this;}['toggleOnline'](){let {_injector:_0x290841,_pendingMutations:_0x1253c7,_awaitingChangeset:_0x24ff78,unitID:_0x112177,_handler:_0x26a42a,type:_0x38a727}=this,_0x15bd95=Oe(_0x290841,_0x112177,_0x38a727,_0x24ff78,_0x1253c7,_0x26a42a);return _0x15bd95 instanceof P?_0x15bd95['_schedule']():(_0x15bd95 instanceof I||_0x15bd95 instanceof F)&&_0x15bd95['resend'](),_0x15bd95;}[_0x5eca20(0x250)](){const _0x1a1630=_0x5eca20;throw Error(_0x1a1630(0x2cb));}};R=C([S(0x5,(0x0,l['Inject'])(l['Injector'])),S(0x6,(0x0,l[_0x5eca20(0x3fa)])(c['RevisionService'])),S(0x7,l[_0x5eca20(0x2f0)]),S(0x8,l[_0x5eca20(0x19e)]),S(0x9,(0x0,l[_0x5eca20(0x2f5)])(D))],R);let z=class extends M{constructor(_0x1daca6,_0x5828ba,_0x34a3e1,_0x24e2c1,_0x2f2a14,_0x4c7ba4,_0x8c838a,_0x453769,_0x32feef,_0x5f1500,_0x4791f5,_0x2801e6,_0x25fda0,_0x142743){const _0xa5a74=_0x5eca20;super(_0x1daca6,_0x5828ba,_0x34a3e1,_0x24e2c1,_0x8c838a,_0x4791f5,_0x2801e6,_0x32feef,_0x142743),this['_acknowledgedAwaitingChangeset']=_0x2f2a14,this[_0xa5a74(0x383)]=_0x4c7ba4,this['_injector']=_0x453769,this[_0xa5a74(0x429)]=_0x5f1500,this[_0xa5a74(0x1f9)]=_0x25fda0,this['localCacheService']=_0x142743,y(this,_0xa5a74(0x192),j[_0xa5a74(0x364)]);}[_0x5eca20(0x3df)](_0x2404d9){const _0x4aabad=_0x5eca20;try{let _0x1517a5=[..._0x2404d9,...this[_0x4aabad(0x383)]],_0x40f82b=[this[_0x4aabad(0x342)]||this['_acknowledgedAwaitingChangeset']][_0x4aabad(0x1b1)](_0x3d9db5=>!!_0x3d9db5),_0x4c8b9a,_0xa32990;if(_0x40f82b[_0x4aabad(0x373)]){let _0x274703=this['_transformService'][_0x4aabad(0x219)](_0x1517a5,_0x40f82b,!0x1);if(!(0x0,c['isTransformChangesetsSuccess'])(_0x274703))throw _0x274703[_0x4aabad(0x2dc)];_0x4c8b9a=_0x274703[_0x4aabad(0x1de)],_0xa32990=_0x274703['c2Prime'];}else _0x4c8b9a=_0x1517a5,_0xa32990=[];let _0x5b3261=this[_0x4aabad(0x424)];_0x4c8b9a['forEach'](_0x5dfcdd=>{const _0x5a0508=_0x4aabad;let _0x42748e;if(_0x5b3261[_0x5a0508(0x373)]){let _0x4e12ef=this['_transformService'][_0x5a0508(0x38a)](_0x5dfcdd,_0x5b3261);if(!(0x0,c[_0x5a0508(0x1ae)])(_0x4e12ef))throw _0x4e12ef[_0x5a0508(0x2dc)];_0x42748e=_0x4e12ef[_0x5a0508(0x1de)],_0x5b3261=_0x4e12ef['m2Prime'];}else _0x42748e=_0x5dfcdd;this[_0x5a0508(0x20a)](_0x42748e);}),this[_0x4aabad(0x347)]&&this[_0x4aabad(0x3b9)](),this['_awaitingChangeset']&&_0xa32990[_0x4aabad(0x373)]&&(_0xa32990[0x0][_0x4aabad(0x2fa)]=this[_0x4aabad(0x23e)]());let _0x2b7621;if(this[_0x4aabad(0x342)]&&_0x5b3261[_0x4aabad(0x373)]!==0x0)_0x2b7621=this[_0x4aabad(0x161)][_0x4aabad(0x2ef)](I,this['unitID'],this['type'],_0xa32990[0x0],_0x5b3261,this[_0x4aabad(0x39a)],void 0x0);else{if(this[_0x4aabad(0x342)]&&_0x5b3261[_0x4aabad(0x373)]===0x0)_0xa32990[0x0][_0x4aabad(0x2fa)]=this[_0x4aabad(0x23e)](),_0x2b7621=this[_0x4aabad(0x161)][_0x4aabad(0x2ef)](F,this[_0x4aabad(0x42a)],this[_0x4aabad(0x402)],_0xa32990[0x0],this[_0x4aabad(0x39a)]);else{if(_0x5b3261[_0x4aabad(0x373)]!==0x0){let _0x276576=this[_0x4aabad(0x161)][_0x4aabad(0x2ef)](P,this[_0x4aabad(0x42a)],this[_0x4aabad(0x402)],_0x5b3261,this[_0x4aabad(0x39a)]);_0x276576[_0x4aabad(0x31d)](),_0x2b7621=_0x276576;}else _0x2b7621=this[_0x4aabad(0x161)][_0x4aabad(0x2ef)](N,this['unitID'],this[_0x4aabad(0x402)],this[_0x4aabad(0x39a)]);}}return _0x2b7621[_0x4aabad(0x426)](),_0x2b7621;}catch(_0x1ba65a){return this[_0x4aabad(0x429)][_0x4aabad(0x2dc)](_0x4aabad(0x37a),_0x4aabad(0x236),_0x1ba65a),this[_0x4aabad(0x161)][_0x4aabad(0x2ef)](L,this[_0x4aabad(0x42a)],this[_0x4aabad(0x402)],this['_awaitingChangeset'],this[_0x4aabad(0x424)],this[_0x4aabad(0x39a)],!0x1);}}[_0x5eca20(0x250)](){const _0x3705e0=_0x5eca20;throw Error(_0x3705e0(0x408));}[_0x5eca20(0x322)](_0xc2af98){const _0x591017=_0x5eca20;return this[_0x591017(0x424)][_0x591017(0x194)](_0xc2af98),this;}[_0x5eca20(0x434)](_0x181053){const _0x34c541=_0x5eca20;return this[_0x34c541(0x383)]['push'](_0x181053),this;}[_0x5eca20(0x42f)](_0x2de558){const _0xc520ac=_0x5eca20;if(this[_0xc520ac(0x342)])return this[_0xc520ac(0x347)]=this[_0xc520ac(0x342)],this[_0xc520ac(0x342)]=null,this;throw Error(_0xc520ac(0x184));}[_0x5eca20(0x43a)](_0x42de9c){const _0x4da0c6=_0x5eca20;return this[_0x4da0c6(0x3b0)](!!(_0x42de9c!=null&&_0x42de9c[_0x4da0c6(0x430)]));}[_0x5eca20(0x333)](){return this;}['toggleOffline'](){const _0x1b290b=_0x5eca20;return this[_0x1b290b(0x161)][_0x1b290b(0x2ef)](R,this[_0x1b290b(0x42a)],this[_0x1b290b(0x402)],this[_0x1b290b(0x342)],this[_0x1b290b(0x424)],this[_0x1b290b(0x39a)]);}[_0x5eca20(0x395)](){return this;}[_0x5eca20(0x3b0)](_0x4e999e){const _0x1ec7ef=_0x5eca20;return this['_injector'][_0x1ec7ef(0x2ef)](L,this[_0x1ec7ef(0x42a)],this['type'],this[_0x1ec7ef(0x342)],this['_pendingMutations'],this[_0x1ec7ef(0x39a)],_0x4e999e);}};z=C([S(0x7,(0x0,l['Inject'])(l[_0x5eca20(0x177)])),S(0x8,(0x0,l['Inject'])(c[_0x5eca20(0x35a)])),S(0x9,l[_0x5eca20(0x3a3)]),S(0xa,l[_0x5eca20(0x2f0)]),S(0xb,l['IUndoRedoService']),S(0xc,c[_0x5eca20(0x220)]),S(0xd,(0x0,l[_0x5eca20(0x2f5)])(D))],z);function Oe(_0x255052,_0x17d070,_0x394574,_0x28711c,_0x3fe523,_0x172648){const _0xcf3a04=_0x5eca20;return _0x28711c&&_0x3fe523[_0xcf3a04(0x373)]?_0x255052[_0xcf3a04(0x2ef)](I,_0x17d070,_0x394574,_0x28711c,_0x3fe523,_0x172648,void 0x0):_0x28711c?_0x255052[_0xcf3a04(0x2ef)](F,_0x17d070,_0x394574,_0x28711c,_0x172648):_0x3fe523[_0xcf3a04(0x373)]?_0x255052[_0xcf3a04(0x2ef)](P,_0x17d070,_0x394574,_0x3fe523,_0x172648):_0x255052[_0xcf3a04(0x2ef)](N,_0x17d070,_0x394574,_0x172648);}let B=class extends l[_0x5eca20(0x3fc)]{get[_0x5eca20(0x3d5)](){const _0x3f97cd=_0x5eca20;return this[_0x3f97cd(0x2c5)];}constructor(_0x3eee02,_0x23fe63,_0x3a49f3,_0x1f52e4,_0x5f50b5,_0x208b2b,_0x1779de,_0x547968,_0x177ff9,_0x5bb944,_0x11a883,_0x49ce7b,_0x3fa653,_0x4a64c4){const _0x1f2747=_0x5eca20;super(),this[_0x1f2747(0x42a)]=_0x3eee02,this[_0x1f2747(0x259)]=_0x23fe63,this[_0x1f2747(0x1f2)]=_0x3a49f3,this[_0x1f2747(0x161)]=_0x1f52e4,this['_compressMutationService']=_0x5f50b5,this[_0x1f2747(0x3ec)]=_0x208b2b,this[_0x1f2747(0x2f2)]=_0x1779de,this[_0x1f2747(0x21a)]=_0x547968,this[_0x1f2747(0x27e)]=_0x177ff9,this['_logService']=_0x5bb944,this[_0x1f2747(0x415)]=_0x11a883,this[_0x1f2747(0x3cc)]=_0x49ce7b,this[_0x1f2747(0x406)]=_0x3fa653,this[_0x1f2747(0x1ad)]=_0x4a64c4,y(this,'_state$',new f[(_0x1f2747(0x196))](null)),y(this,_0x1f2747(0x40f),this[_0x1f2747(0x3b5)][_0x1f2747(0x1bd)]()),y(this,_0x1f2747(0x2c5),void 0x0),y(this,_0x1f2747(0x18b),!0x1),y(this,_0x1f2747(0x19f),''),y(this,'_changesetReqId',0x0),y(this,_0x1f2747(0x39d),this[_0x1f2747(0x40f)]['pipe']((0x0,f[_0x1f2747(0x29e)])(_0x447a9e=>_0x447a9e?_0x447a9e[_0x1f2747(0x192)]:j[_0x1f2747(0x276)]),(0x0,f[_0x1f2747(0x2b5)])(0x1))),y(this,_0x1f2747(0x401),!0x1),y(this,'_remoteChangesetQueue',[]);}async['init'](){const _0x195707=_0x5eca20;if(this[_0x195707(0x3d5)])throw Error(_0x195707(0x3ce));await this[_0x195707(0x372)]();}[_0x5eca20(0x230)](){const _0x3ec6a6=_0x5eca20;return this[_0x3ec6a6(0x18b)]=!0x0,(0x0,l['toDisposable'])(()=>{const _0x292d1d=_0x3ec6a6;this[_0x292d1d(0x18b)]=!0x1,this[_0x292d1d(0x1c1)]();});}[_0x5eca20(0x410)](_0x300455){const _0xee0d7d=_0x5eca20;this[_0xee0d7d(0x389)](_0x300455);}['_updateState'](_0x16d657){const _0x9064bd=_0x5eca20;this[_0x9064bd(0x2c5)]=_0x16d657,this['_state$']['next'](_0x16d657);}async[_0x5eca20(0x372)](){const _0x58afc5=_0x5eca20;if(this['_updateState'](await this[_0x58afc5(0x2ca)]()),this[_0x58afc5(0x406)]){var _0xa2b3d8;(_0xa2b3d8=this[_0x58afc5(0x406)])==null||_0xa2b3d8[_0x58afc5(0x3f0)](this[_0x58afc5(0x42a)]),this[_0x58afc5(0x224)](this[_0x58afc5(0x406)][_0x58afc5(0x2b1)](this[_0x58afc5(0x42a)])[_0x58afc5(0x439)](_0x2266ee=>{const _0x4f034a=_0x58afc5;this['_logService'][_0x4f034a(0x40a)]('[CollaborationEntity]','editing\x20status\x20changed\x20to',_0x2266ee),_0x2266ee===ge[_0x4f034a(0x31c)]?(this[_0x4f034a(0x21a)][_0x4f034a(0x3d0)]({'id':b['OTHER_CLIENT_EDITING']}),this['_permissionService']['updatePermissionPoint'](new d[(_0x4f034a(0x1b9))](this[_0x4f034a(0x42a)])['id'],!0x1),this[_0x4f034a(0x3cc)][_0x4f034a(0x2e0)](!0x1)):(this[_0x4f034a(0x3cc)][_0x4f034a(0x302)](new d[(_0x4f034a(0x1b9))](this[_0x4f034a(0x42a)])['id'],!0x0),this[_0x4f034a(0x3cc)]['setShowComponents'](!0x0));}));}let _0x222939=!0x1;return this[_0x58afc5(0x224)](this[_0x58afc5(0x259)][_0x58afc5(0x174)][_0x58afc5(0x439)](_0x4d0144=>{const _0x11aa73=_0x58afc5;_0x4d0144===T[_0x11aa73(0x2ea)]?this['_toggleOnline'](_0x222939):_0x4d0144===T[_0x11aa73(0x276)]&&(_0x222939=!0x0,this['_toggleOffline']());})),this[_0x58afc5(0x224)](this['session']['event$']['subscribe'](_0x3d7222=>{const _0x31db60=_0x58afc5;try{switch(_0x3d7222['eventID']){case c[_0x31db60(0x33c)][_0x31db60(0x179)]:this[_0x31db60(0x2a7)]((0x0,c[_0x31db60(0x26b)])(_0x3d7222[_0x31db60(0x193)]));break;case c[_0x31db60(0x33c)][_0x31db60(0x25a)]:this['_onRemoteACK'](_0x3d7222['data']);break;case c[_0x31db60(0x33c)][_0x31db60(0x2a3)]:this[_0x31db60(0x319)]();break;case c[_0x31db60(0x33c)][_0x31db60(0x40c)]:this[_0x31db60(0x3b3)](_0x3d7222[_0x31db60(0x193)]);break;case c[_0x31db60(0x33c)][_0x31db60(0x257)]:this[_0x31db60(0x279)](_0x3d7222[_0x31db60(0x193)]['changesets'][_0x31db60(0x29e)](_0x55e967=>(0x0,c[_0x31db60(0x26b)])(_0x55e967)));break;case c['CollaborationEvent'][_0x31db60(0x43c)]:this[_0x31db60(0x319)]({'isPermissionRej':!0x0});break;case c[_0x31db60(0x33c)][_0x31db60(0x37c)]:break;}}catch(_0xf3c0cb){throw console[_0x31db60(0x2dc)](_0x31db60(0x3b8),_0xf3c0cb),_0xf3c0cb;}})),this[_0x58afc5(0x2c5)];}[_0x5eca20(0x34a)](){const _0xb472e3=_0x5eca20;this[_0xb472e3(0x401)]=!0x1;}[_0x5eca20(0x391)](){const _0x2c5536=_0x5eca20;if(this['_transitionLocked'])throw Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x2c5536(0x401)]=!0x0;}[_0x5eca20(0x389)](_0x55773c){const _0x477323=_0x5eca20;this['_lockTransition'](),this['_updateState'](this[_0x477323(0x2c5)][_0x477323(0x322)](_0x55773c)),this['_unlockTransition']();}['_onRemoteChangeset'](_0x5aa15e){const _0x3f5594=_0x5eca20;if(!(_0x5aa15e[_0x3f5594(0x1d5)]<=this['_revisionService'][_0x3f5594(0x1eb)](this[_0x3f5594(0x42a)]))){if(this[_0x3f5594(0x18b)]){this[_0x3f5594(0x3a8)]['push'](_0x5aa15e);return;}this['_applyRemoteChangeset'](_0x5aa15e);}}['_exhaustRemoteChangesetQueue'](){const _0x38bacb=_0x5eca20;this[_0x38bacb(0x3a8)][_0x38bacb(0x248)](_0x257764=>this['_applyRemoteChangeset'](_0x257764)),this[_0x38bacb(0x3a8)]=[];}[_0x5eca20(0x308)](_0x36599a){const _0x13ea34=_0x5eca20;let _0x335fec=this[_0x13ea34(0x1d7)]['interceptor']['fetchThroughInterceptors'](this[_0x13ea34(0x1d7)][_0x13ea34(0x1df)][_0x13ea34(0x3dc)]()['COMPRESS_MUTATION_APPLY'])(_0x36599a[_0x13ea34(0x344)],null)||_0x36599a[_0x13ea34(0x344)],_0x658944={..._0x36599a,'mutations':_0x335fec};this[_0x13ea34(0x391)](),this[_0x13ea34(0x251)](this[_0x13ea34(0x2c5)][_0x13ea34(0x434)](_0x658944)),this['_unlockTransition']();}[_0x5eca20(0x1cb)](_0x471db7){const _0x417d2e=_0x5eca20;this[_0x417d2e(0x391)](),this[_0x417d2e(0x251)](this[_0x417d2e(0x2c5)]['onRemoteAck'](_0x471db7)),this['_unlockTransition']();}['_onRemoteRejected'](_0x37a3e2){const _0x3507b5=_0x5eca20;this['_lockTransition'](),this[_0x3507b5(0x251)](this[_0x3507b5(0x2c5)]['onRemoteRej'](_0x37a3e2)),this[_0x3507b5(0x34a)]();}[_0x5eca20(0x3b3)](_0x40faf1){const _0x2d526a=_0x5eca20;this['_lockTransition'](),this[_0x2d526a(0x251)](this[_0x2d526a(0x2c5)][_0x2d526a(0x333)](_0x40faf1)),this[_0x2d526a(0x34a)]();}[_0x5eca20(0x279)](_0x45f04c){const _0x56dc54=_0x5eca20;if(!(this[_0x56dc54(0x2c5)]instanceof z))throw TypeError(_0x56dc54(0x3f9));let _0x428387=_0x45f04c[_0x56dc54(0x29e)](_0x1a5535=>{const _0x56b446=_0x56dc54;let _0x3cd917=this[_0x56b446(0x1d7)][_0x56b446(0x1df)][_0x56b446(0x2a5)](this[_0x56b446(0x1d7)][_0x56b446(0x1df)]['getInterceptPoints']()[_0x56b446(0x23c)])(_0x1a5535[_0x56b446(0x344)],null)||_0x1a5535[_0x56b446(0x344)];return{..._0x1a5535,'mutations':_0x3cd917};});this[_0x56dc54(0x391)](),this['_updateState'](this['_state'][_0x56dc54(0x3df)](_0x428387)),this[_0x56dc54(0x34a)]();}[_0x5eca20(0x3c4)](){const _0x28ae57=_0x5eca20;this[_0x28ae57(0x391)](),this[_0x28ae57(0x251)](this[_0x28ae57(0x2c5)][_0x28ae57(0x418)]()),this[_0x28ae57(0x34a)]();}[_0x5eca20(0x2a8)](_0x1c07a7=!0x1){const _0x3cf056=_0x5eca20;this[_0x3cf056(0x391)](),this[_0x3cf056(0x251)](this[_0x3cf056(0x2c5)][_0x3cf056(0x395)]()),this[_0x3cf056(0x34a)]();let _0x39f2df=this[_0x3cf056(0x2c5)];_0x1c07a7&&_0x39f2df instanceof N&&(this[_0x3cf056(0x391)](),this[_0x3cf056(0x251)](_0x39f2df[_0x3cf056(0x1b2)]()),this[_0x3cf056(0x34a)]());}async['_createInitialState'](){return new Promise(_0xb6672b=>{const _0x27778c=_0x2e22;this['session'][_0x27778c(0x174)]['pipe']((0x0,f[_0x27778c(0x191)])(0x1))[_0x27778c(0x439)](async _0x39d535=>{const _0x48393a=_0x27778c;_0xb6672b(await this['_createInitialStateImpl'](_0x39d535===T[_0x48393a(0x2ea)]));});});}[_0x5eca20(0x1a9)](){let _0x60fb6e=this['unitID'];return{'onStateChange':(_0x1e3b05,_0x2d6d78)=>{const _0x49696e=_0x2e22;if(_0x1e3b05!==this[_0x49696e(0x2c5)])throw Error(_0x49696e(0x2f1)+_0x1e3b05[_0x49696e(0x192)]+_0x49696e(0x1a2)+_0x2d6d78[_0x49696e(0x192)]+_0x49696e(0x35f)+this[_0x49696e(0x2c5)]['status']);this[_0x49696e(0x251)](_0x2d6d78);},'onSendChangeset':_0x4ebad3=>{const _0x4fa350=_0x2e22;_0x4ebad3[_0x4fa350(0x20d)]||(_0x4ebad3['sid']=this['_changesetSessionId'],_0x4ebad3[_0x4fa350(0x384)]=++this['_changesetReqId']);let _0x535ae6={'eventID':c['CollaborationEvent'][_0x4fa350(0x3db)],'data':{'unitID':_0x4ebad3['unitID'],'unitType':this['_type'],'changeset':_0x4ebad3,'memberID':this[_0x4fa350(0x259)][_0x4fa350(0x27f)]()}};this[_0x4fa350(0x259)][_0x4fa350(0x335)](_0x535ae6,this[_0x4fa350(0x42a)]);},'onMissingChangesets':({from:_0x3eec9a,to:_0x3e7bac})=>{const _0x1d4cba=_0x2e22;this[_0x1d4cba(0x429)][_0x1d4cba(0x40a)](_0x1d4cba(0x3a1),'fetching\x20missing\x20changesets\x20from\x20'+_0x3eec9a+'\x20to\x20'+_0x3e7bac);let _0x4fd403={'eventID':c[_0x1d4cba(0x33c)][_0x1d4cba(0x321)],'data':{'unitID':_0x60fb6e,'unitType':this['_type'],'from':_0x3eec9a,'to':_0x3e7bac}};this[_0x1d4cba(0x259)]['send'](_0x4fd403,this[_0x1d4cba(0x42a)]);}};}async['_createInitialStateImpl'](_0x410547){const _0x5dd290=_0x5eca20;var _0x7bd1fd,_0x845ba5,_0x2d27ed;let _0x21d5db=await((_0x7bd1fd=this[_0x5dd290(0x1ad)])==null?void 0x0:_0x7bd1fd[_0x5dd290(0x203)](this[_0x5dd290(0x42a)])),_0x583009=(_0x845ba5=_0x21d5db==null?void 0x0:_0x21d5db[_0x5dd290(0x344)])==null?[]:_0x845ba5,_0xd1d41f=(_0x2d27ed=_0x21d5db==null?void 0x0:_0x21d5db[_0x5dd290(0x3c3)])==null?null:_0x2d27ed,_0x46302e=!!(_0xd1d41f!=null&&_0xd1d41f[_0x5dd290(0x20d)])&&!!(_0xd1d41f!=null&&_0xd1d41f['reqId']);this['_changesetSessionId']=_0x46302e?_0xd1d41f[_0x5dd290(0x20d)]:(0x0,c[_0x5dd290(0x1dd)])(),this[_0x5dd290(0x396)]=_0x46302e?_0xd1d41f['reqId']:0x0;let _0x14fc56=this['unitID'];try{this[_0x5dd290(0x281)](_0xd1d41f,_0x583009);}catch(_0x2c857a){this[_0x5dd290(0x429)][_0x5dd290(0x2dc)](_0x2c857a);}let _0x5019a9=this['_createHandler']();if(_0x410547){let _0x44f58c=Oe(this[_0x5dd290(0x161)],_0x14fc56,this[_0x5dd290(0x1f2)],_0xd1d41f,_0x583009,_0x5019a9);return _0x44f58c instanceof P?_0x44f58c[_0x5dd290(0x31d)]():(_0x44f58c instanceof I||_0x44f58c instanceof F)&&_0x44f58c[_0x5dd290(0x250)](),_0x44f58c;}return this[_0x5dd290(0x161)][_0x5dd290(0x2ef)](R,_0x14fc56,this[_0x5dd290(0x1f2)],_0xd1d41f,_0x583009,_0x5019a9);}[_0x5eca20(0x281)](_0x44ba7e,_0x366a5d){const _0x2aceb6=_0x5eca20;var _0x29baef,_0x18eaec;let _0xc343d1=this[_0x2aceb6(0x1d7)][_0x2aceb6(0x1df)][_0x2aceb6(0x2a5)](this['_compressMutationService'][_0x2aceb6(0x1df)]['getInterceptPoints']()[_0x2aceb6(0x23c)]);(_0x29baef=_0xc343d1((_0x44ba7e==null?void 0x0:_0x44ba7e[_0x2aceb6(0x344)])||[],null))==null||_0x29baef[_0x2aceb6(0x248)](_0x1c36ce=>this[_0x2aceb6(0x415)]['executeCommand'](_0x1c36ce['id'],_0x1c36ce['params'])),(_0x18eaec=_0xc343d1(_0x366a5d||[],null))==null||_0x18eaec[_0x2aceb6(0x248)](_0x41bb63=>this[_0x2aceb6(0x415)]['executeCommand'](_0x41bb63['id'],_0x41bb63['params']));}};B=C([S(0x3,(0x0,l['Inject'])(l[_0x5eca20(0x177)])),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x2e8)])),S(0x5,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x330)])),S(0x6,(0x0,l['Inject'])(c[_0x5eca20(0x35a)])),S(0x7,(0x0,l[_0x5eca20(0x3fa)])(x)),S(0x8,l[_0x5eca20(0x205)]),S(0x9,l['ILogService']),S(0xa,l[_0x5eca20(0x2f0)]),S(0xb,l[_0x5eca20(0x239)]),S(0xc,(0x0,l['Optional'])(k)),S(0xd,(0x0,l['Optional'])(D))],B);let V=class extends B{constructor(_0x11164e,_0x23f55c,_0x2c7112,_0x13224f,_0x152ba2,_0x5f4cd7,_0x20c26f,_0x34ddb4,_0x1ebb9b,_0x390a64,_0x4301a6,_0x4bde26,_0x557132,_0x1443cd){const _0x795a1e=_0x5eca20;super(_0x11164e,_0x2c7112,_0x23f55c,_0x13224f,_0x152ba2,_0x5f4cd7,_0x20c26f,_0x34ddb4,_0x1ebb9b,_0x390a64,_0x4301a6,_0x4bde26,_0x557132,_0x1443cd),this[_0x795a1e(0x42a)]=_0x11164e,this['type']=_0x23f55c,y(this,_0x795a1e(0x2c8),null);}[_0x5eca20(0x40b)](_0x5097b6){this['_handlerCallback']=_0x5097b6;}[_0x5eca20(0x30f)](){const _0x1e7007=_0x5eca20;this[_0x1e7007(0x2c8)]=null,super[_0x1e7007(0x30f)]();}[_0x5eca20(0x1a9)](){const _0x5624e8=_0x5eca20;let _0x96dd48=super[_0x5624e8(0x1a9)]();return _0x96dd48[_0x5624e8(0x2e2)]=_0x1e33e6=>{const _0xff28d3=_0x5624e8;var _0x179a3d,_0x4da38d;return(_0x179a3d=this[_0xff28d3(0x2c8)])==null||(_0x4da38d=_0x179a3d[_0xff28d3(0x2e2)])==null?void 0x0:_0x4da38d[_0xff28d3(0x17e)](_0x179a3d,_0x1e33e6);},_0x96dd48[_0x5624e8(0x2b7)]=_0xe514b9=>{const _0x4ad73a=_0x5624e8;var _0x204b3f,_0x55d125;return(_0x204b3f=this[_0x4ad73a(0x2c8)])==null||(_0x55d125=_0x204b3f['onTransformState'])==null?void 0x0:_0x55d125[_0x4ad73a(0x17e)](_0x204b3f,_0xe514b9);},_0x96dd48['onTransformSelections']=_0x138177=>{const _0xf785e7=_0x5624e8;var _0x31cb2e,_0x379647;return(_0x31cb2e=this['_handlerCallback'])==null||(_0x379647=_0x31cb2e['onTransformSelections'])==null?void 0x0:_0x379647[_0xf785e7(0x17e)](_0x31cb2e,_0x138177);},_0x96dd48['onSyncEditingCollabCursor']=_0x58997a=>{const _0xdc3cf2=_0x5624e8;var _0x101e69,_0xcc2357;return(_0x101e69=this[_0xdc3cf2(0x2c8)])==null||(_0xcc2357=_0x101e69[_0xdc3cf2(0x180)])==null?void 0x0:_0xcc2357['call'](_0x101e69,_0x58997a);},_0x96dd48[_0x5624e8(0x244)]=_0x591cb7=>{const _0x4dd48c=_0x5624e8;var _0x682c8b,_0x1c85da,_0x5e07e2;if(!((_0x682c8b=this[_0x4dd48c(0x2c8)])!=null&&_0x682c8b[_0x4dd48c(0x244)]))throw Error('onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.');return(_0x1c85da=this['_handlerCallback'])==null||(_0x5e07e2=_0x1c85da[_0x4dd48c(0x244)])==null?void 0x0:_0x5e07e2[_0x4dd48c(0x17e)](_0x1c85da,_0x591cb7);},_0x96dd48[_0x5624e8(0x19b)]=_0x410feb=>{const _0x29e7a4=_0x5624e8;var _0xe6cd9e,_0x1a87ba,_0x48d9ad;if(!((_0xe6cd9e=this[_0x29e7a4(0x2c8)])!=null&&_0xe6cd9e['onTransformRemoteChangesetByStateCache']))throw Error(_0x29e7a4(0x336));return(_0x1a87ba=this[_0x29e7a4(0x2c8)])==null||(_0x48d9ad=_0x1a87ba[_0x29e7a4(0x19b)])==null?void 0x0:_0x48d9ad[_0x29e7a4(0x17e)](_0x1a87ba,_0x410feb);},_0x96dd48;}async['_init'](){const _0x3b1892=_0x5eca20;let _0x36e5c1=await super['_init']();return this[_0x3b1892(0x224)](this[_0x3b1892(0x415)][_0x3b1892(0x271)]((_0x247dfa,_0x5e1f1d)=>{const _0x586dfd=_0x3b1892;if(_0x247dfa[_0x586dfd(0x402)]!==l[_0x586dfd(0x3ed)][_0x586dfd(0x2a1)]||_0x5e1f1d!=null&&_0x5e1f1d[_0x586dfd(0x253)]||_0x5e1f1d!=null&&_0x5e1f1d[_0x586dfd(0x1fd)]||_0x247dfa['id']===u['RichTextEditingMutation']['id'])return;let _0x1d27d2=_0x247dfa[_0x586dfd(0x351)];if((_0x1d27d2==null?void 0x0:_0x1d27d2[_0x586dfd(0x420)])!==this['unitID'])return;let _0x433407=_0x247dfa,_0x4a0b2c=this[_0x586dfd(0x1d7)]['interceptor'][_0x586dfd(0x2a5)](this[_0x586dfd(0x1d7)][_0x586dfd(0x1df)][_0x586dfd(0x3dc)]()[_0x586dfd(0x3d3)])([_0x433407],this['_univerInstanceService'])||[_0x433407];this[_0x586dfd(0x389)](_0x4a0b2c[0x0]);})),_0x36e5c1;}};V=C([S(0x3,(0x0,l['Inject'])(l[_0x5eca20(0x177)])),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x2e8)])),S(0x5,(0x0,l[_0x5eca20(0x3fa)])(l['LocaleService'])),S(0x6,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0x7,(0x0,l['Inject'])(x)),S(0x8,l[_0x5eca20(0x205)]),S(0x9,l[_0x5eca20(0x3a3)]),S(0xa,l[_0x5eca20(0x2f0)]),S(0xb,l[_0x5eca20(0x239)]),S(0xc,(0x0,l['Optional'])(k)),S(0xd,(0x0,l['Optional'])(D))],V);let H=class extends B{constructor(_0x320fb2,_0x12778f,_0x3cb79b,_0x5eb40a,_0x286731,_0x50d0ab,_0x26bec9,_0x369789,_0x2f8ee7,_0x1331f5,_0x3b5ec0,_0x43f612,_0x3bd8c7,_0x4c782e,_0x245109){const _0x1732cc=_0x5eca20;super(_0x320fb2,_0x3cb79b,_0x12778f,_0x5eb40a,_0x286731,_0x50d0ab,_0x26bec9,_0x2f8ee7,_0x1331f5,_0x3b5ec0,_0x43f612,_0x3bd8c7,_0x4c782e,_0x245109),this['unitID']=_0x320fb2,this[_0x1732cc(0x402)]=_0x12778f,this[_0x1732cc(0x2a6)]=_0x369789;}[_0x5eca20(0x1a9)](){const _0xed4a1d=_0x5eca20;let _0x7355b4=super['_createHandler']();return _0x7355b4[_0xed4a1d(0x282)]=_0x5b33cd=>this[_0xed4a1d(0x2a6)][_0xed4a1d(0x225)](_0x5b33cd),_0x7355b4;}async[_0x5eca20(0x372)](){const _0x4af101=_0x5eca20;let _0x50db97=await super[_0x4af101(0x372)]();return this[_0x4af101(0x224)](this['_commandService'][_0x4af101(0x271)]((_0x38bf09,_0x3f1f59)=>{const _0x12eb27=_0x4af101;if(_0x38bf09[_0x12eb27(0x402)]!==l[_0x12eb27(0x3ed)][_0x12eb27(0x2a1)]||_0x3f1f59!=null&&_0x3f1f59[_0x12eb27(0x253)]||_0x3f1f59!=null&&_0x3f1f59[_0x12eb27(0x1fd)])return;let _0x2bf433=_0x38bf09[_0x12eb27(0x351)];if((_0x2bf433==null?void 0x0:_0x2bf433[_0x12eb27(0x420)])!==this['unitID'])return;let _0x213e7c=_0x38bf09,_0x56c8dc=this[_0x12eb27(0x1d7)]['interceptor']['fetchThroughInterceptors'](this['_compressMutationService'][_0x12eb27(0x1df)][_0x12eb27(0x3dc)]()['COMPRESS_MUTATION_SEND'])([_0x213e7c],this[_0x12eb27(0x27e)])||[_0x213e7c];this[_0x12eb27(0x389)](_0x56c8dc[0x0]);})),_0x50db97;}};H=C([S(0x3,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x2e8)])),S(0x5,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x330)])),S(0x6,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x35a)])),S(0x7,(0x0,l[_0x5eca20(0x3fa)])(O)),S(0x8,(0x0,l[_0x5eca20(0x3fa)])(x)),S(0x9,l[_0x5eca20(0x205)]),S(0xa,l[_0x5eca20(0x3a3)]),S(0xb,l[_0x5eca20(0x2f0)]),S(0xc,l[_0x5eca20(0x239)]),S(0xd,(0x0,l['Optional'])(k)),S(0xe,(0x0,l[_0x5eca20(0x2f5)])(D))],H);const ke=(0x0,l['createIdentifier'])(_0x5eca20(0x2ba));function Ae(_0x7e2011){const _0x363993=_0x5eca20;let _0x3f21d7=_0x7e2011['data'],_0x4d0ec4=JSON[_0x363993(0x245)](_0x3f21d7);switch(_0x4d0ec4[_0x363993(0x388)]){case p[_0x363993(0x188)][_0x363993(0x2bc)]:case p[_0x363993(0x188)][_0x363993(0x22d)]:{let _0x4daf99=_0x4d0ec4[_0x363993(0x1b3)];return{..._0x4d0ec4,'data':_0x4daf99,'cmd':_0x4d0ec4[_0x363993(0x388)]};}case p[_0x363993(0x188)][_0x363993(0x3da)]:{let _0x2ee92d=_0x4d0ec4[_0x363993(0x411)];return{..._0x4d0ec4,'data':_0x2ee92d,'cmd':_0x4d0ec4[_0x363993(0x388)]};}case p[_0x363993(0x188)]['RECV']:{let _0x1ddcd8=_0x4d0ec4[_0x363993(0x238)];switch(_0x1ddcd8['eventID']){case c[_0x363993(0x33c)][_0x363993(0x43c)]:var _0x5b58fc;return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':(_0x5b58fc=_0x1ddcd8[_0x363993(0x38c)])==null?void 0x0:_0x5b58fc['cs']},'cmd':_0x4d0ec4['cmd']};case c[_0x363993(0x33c)][_0x363993(0x25a)]:var _0x33d2a3;return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':(_0x33d2a3=_0x1ddcd8['csAckEvent'])==null?void 0x0:_0x33d2a3['cs']},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent'][_0x363993(0x179)]:var _0x26912c;return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':(_0x26912c=_0x1ddcd8['newCsEvent'])==null?void 0x0:_0x26912c['cs']},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent']['CHANGESET_REJ']:var _0x5c4282;return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':(_0x5c4282=_0x1ddcd8['csRejEvent'])==null?void 0x0:_0x5c4282['cs']},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c[_0x363993(0x33c)][_0x363993(0x40c)]:var _0xa6146;return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':(_0xa6146=_0x1ddcd8[_0x363993(0x2f9)])==null?void 0x0:_0xa6146['cs']},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c[_0x363993(0x33c)][_0x363993(0x1a7)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x1c8)]},'cmd':_0x4d0ec4['cmd']};case c[_0x363993(0x33c)][_0x363993(0x2de)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x2d3)]},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c[_0x363993(0x33c)][_0x363993(0x3a9)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x163)]},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent'][_0x363993(0x22c)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x1c9)]},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c[_0x363993(0x33c)][_0x363993(0x293)]:case c[_0x363993(0x33c)][_0x363993(0x264)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x3c6)]},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent'][_0x363993(0x1a5)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x1c9)]},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent'][_0x363993(0x382)]:return{..._0x4d0ec4,'data':_0x1ddcd8,'cmd':_0x4d0ec4['cmd']};case c[_0x363993(0x33c)][_0x363993(0x32d)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8['commentUpdateEvent']},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c[_0x363993(0x33c)][_0x363993(0x2e3)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8['updatePermissionObjEvent']},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent']['SHOULD_CLOSE_CONN']:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8[_0x363993(0x24b)]},'cmd':_0x4d0ec4[_0x363993(0x388)]};case c['CollaborationEvent'][_0x363993(0x37c)]:return{..._0x4d0ec4,'data':{..._0x1ddcd8,'data':_0x1ddcd8['uniscriptRunEvent']},'cmd':_0x4d0ec4['cmd']};default:return _0x4d0ec4;}}default:return _0x4d0ec4;}}function je(_0x1619d6){const _0x58d1e2=_0x5eca20;switch(_0x1619d6[_0x58d1e2(0x388)]){case p[_0x58d1e2(0x188)][_0x58d1e2(0x2bc)]:case p[_0x58d1e2(0x188)]['HELLO']:return JSON[_0x58d1e2(0x350)]({'cmd':_0x1619d6[_0x58d1e2(0x388)],'routeKey':_0x1619d6[_0x58d1e2(0x207)]});case p[_0x58d1e2(0x188)][_0x58d1e2(0x21b)]:{let _0x2ed436;switch(_0x1619d6[_0x58d1e2(0x193)][_0x58d1e2(0x315)]){case c[_0x58d1e2(0x33c)][_0x58d1e2(0x1a7)]:_0x2ed436={'eventID':c[_0x58d1e2(0x33c)]['UPDATE_CURSOR'],'updateCursorEvent':_0x1619d6[_0x58d1e2(0x193)]['data']};break;case c[_0x58d1e2(0x33c)][_0x58d1e2(0x3a9)]:_0x2ed436={'eventID':c[_0x58d1e2(0x33c)][_0x58d1e2(0x3a9)],'leaveEvent':_0x1619d6[_0x58d1e2(0x193)][_0x58d1e2(0x193)]};break;case c['CollaborationEvent'][_0x58d1e2(0x2de)]:_0x2ed436={'eventID':c['CollaborationEvent'][_0x58d1e2(0x2de)],'joinEvent':_0x1619d6['data']['data']};break;case c[_0x58d1e2(0x33c)][_0x58d1e2(0x22c)]:_0x2ed436={'eventID':c[_0x58d1e2(0x33c)][_0x58d1e2(0x22c)],'liveShareNewHost':_0x1619d6[_0x58d1e2(0x193)][_0x58d1e2(0x193)]};break;case c[_0x58d1e2(0x33c)][_0x58d1e2(0x264)]:_0x2ed436={'eventID':c['CollaborationEvent']['LIVESHARE_OPERATION'],'liveShareOperation':_0x1619d6[_0x58d1e2(0x193)]['data']};break;case c['CollaborationEvent'][_0x58d1e2(0x1a5)]:_0x2ed436={'eventID':c[_0x58d1e2(0x33c)][_0x58d1e2(0x1a5)],'liveShareTerminate':_0x1619d6[_0x58d1e2(0x193)][_0x58d1e2(0x193)]};break;case c[_0x58d1e2(0x33c)][_0x58d1e2(0x380)]:_0x2ed436={'eventID':c['CollaborationEvent'][_0x58d1e2(0x380)],'liveShareRequestHost':_0x1619d6['data']['data']};break;case c[_0x58d1e2(0x33c)]['LIVESHARE_FETCH_OPERATIONS']:_0x2ed436={'eventID':c['CollaborationEvent']['LIVESHARE_FETCH_OPERATIONS']};break;default:_0x2ed436={'eventID':_0x1619d6[_0x58d1e2(0x193)][_0x58d1e2(0x315)]};}return JSON['stringify']({'cmd':_0x1619d6[_0x58d1e2(0x388)],'routeKey':_0x1619d6[_0x58d1e2(0x207)],'collaMsg':_0x2ed436});}case p['CombCmd'][_0x58d1e2(0x3da)]:return JSON[_0x58d1e2(0x350)]({'cmd':_0x1619d6[_0x58d1e2(0x388)],'routeKey':_0x1619d6[_0x58d1e2(0x207)],'joinReq':_0x1619d6[_0x58d1e2(0x193)]});case p[_0x58d1e2(0x188)][_0x58d1e2(0x435)]:return JSON['stringify']({'cmd':_0x1619d6['cmd'],'routeKey':_0x1619d6['routeKey'],'leaveReq':_0x1619d6[_0x58d1e2(0x193)]});default:throw Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}function _0x2e22(_0x4b6b37,_0x1fcecd){_0x4b6b37=_0x4b6b37-0x15f;const _0x1565ab=_0x1565();let _0x2e220b=_0x1565ab[_0x4b6b37];return _0x2e220b;}const Me=(0x0,l[_0x5eca20(0x2d6)])(_0x5eca20(0x1a4));function Ne(_0x301e2b,_0x45bab3,_0x534184){const _0x311a86=_0x5eca20;return _0x301e2b+'/'+_0x45bab3+_0x311a86(0x2b6)+_0x534184+_0x311a86(0x16b);}let Pe=class extends l[_0x5eca20(0x2c3)]{constructor(_0x3ee281,_0x403663,_0x212c68,_0x4e4ff8,_0xda927c){const _0xac10f1=_0x5eca20;super(),this[_0xac10f1(0x161)]=_0x3ee281,this['_httpService']=_0x403663,this[_0xac10f1(0x1e7)]=_0x212c68,this[_0xac10f1(0x429)]=_0x4e4ff8,this[_0xac10f1(0x164)]=_0xda927c;}['_doCreateSocket'](_0x2a3f86){const _0x48cd21=_0x5eca20;let _0x2b839e=this[_0x48cd21(0x161)]['get'](h[_0x48cd21(0x2c9)]);if(!_0x2b839e)throw Error(_0x48cd21(0x19a));let _0x34a799=_0x2b839e[_0x48cd21(0x3a0)](_0x2a3f86);if(!_0x34a799)throw Error(_0x48cd21(0x16f));let _0x595e35=new l[(_0x48cd21(0x30e))](),_0x384758=new f[(_0x48cd21(0x2a4))]();_0x595e35[_0x48cd21(0x35c)](_0x34a799[_0x48cd21(0x1ea)]['subscribe'](_0xd569aa=>_0x384758[_0x48cd21(0x1d2)](_0xd569aa))),_0x595e35[_0x48cd21(0x35c)]((0x0,l[_0x48cd21(0x233)])(()=>_0x384758[_0x48cd21(0x284)]()));let _0x2e9384=new f[(_0x48cd21(0x2a4))]();_0x595e35[_0x48cd21(0x35c)](_0x34a799[_0x48cd21(0x204)][_0x48cd21(0x439)](_0x4c5ec3=>_0x2e9384[_0x48cd21(0x1d2)](_0x4c5ec3))),_0x595e35[_0x48cd21(0x35c)]((0x0,l[_0x48cd21(0x233)])(()=>_0x2e9384[_0x48cd21(0x284)]()));let _0x6640d9=new f[(_0x48cd21(0x2a4))]();_0x595e35[_0x48cd21(0x35c)](_0x34a799[_0x48cd21(0x189)][_0x48cd21(0x439)](_0x3bcf02=>{const _0x4033e7=_0x48cd21;let _0x1e6828=Ae(_0x3bcf02);_0x6640d9[_0x4033e7(0x1d2)](_0x1e6828);})),_0x595e35[_0x48cd21(0x35c)]((0x0,l[_0x48cd21(0x233)])(()=>_0x6640d9[_0x48cd21(0x284)]()));let _0x5e747a,_0x2869d1=()=>{const _0x490868=_0x48cd21;_0x2e9384[_0x490868(0x1d2)](new Event('connection\x20error')),_0x384758[_0x490868(0x1d2)](new Event(_0x490868(0x28b))),_0x5e747a[_0x490868(0x280)]();};return _0x5e747a={'memberID':'','close$':_0x384758[_0x48cd21(0x1bd)](),'error$':_0x2e9384[_0x48cd21(0x1bd)](),'open$':_0x34a799[_0x48cd21(0x228)],'message$':_0x6640d9[_0x48cd21(0x1bd)](),'send':_0x4539f3=>{const _0x22fa72=_0x48cd21;if(_0x4539f3['cmd']===p[_0x22fa72(0x188)][_0x22fa72(0x21b)]){if(_0x4539f3[_0x22fa72(0x193)][_0x22fa72(0x315)]===c['CollaborationEvent'][_0x22fa72(0x3db)]){this[_0x22fa72(0x1d0)](_0x5e747a,_0x4539f3[_0x22fa72(0x193)])['catch'](_0x35b337=>{const _0x232d64=_0x22fa72;this[_0x232d64(0x429)][_0x232d64(0x2dc)](_0x35b337),_0x2869d1();});return;}if(_0x4539f3[_0x22fa72(0x193)]['eventID']===c[_0x22fa72(0x33c)][_0x22fa72(0x321)]){let _0x4eb92d=_0x4539f3[_0x22fa72(0x193)];this[_0x22fa72(0x35d)](_0x4eb92d)[_0x22fa72(0x303)](_0x40b525=>{const _0x3589f4=_0x22fa72;_0x6640d9[_0x3589f4(0x1d2)]({'cmd':p[_0x3589f4(0x188)][_0x3589f4(0x235)],'code':p[_0x3589f4(0x42b)]['OK'],'routeKey':_0x4eb92d[_0x3589f4(0x193)][_0x3589f4(0x42a)],'routeType':'','data':{'eventID':c[_0x3589f4(0x33c)][_0x3589f4(0x257)],'data':{'changesets':_0x40b525}}});})[_0x22fa72(0x316)](_0x4cf524=>{const _0x1e16fb=_0x22fa72;this[_0x1e16fb(0x429)][_0x1e16fb(0x2dc)](_0x4cf524),_0x2869d1();});return;}}_0x34a799[_0x22fa72(0x335)](je(_0x4539f3));},'close':()=>{const _0x343c51=_0x48cd21;_0x34a799[_0x343c51(0x280)](),_0x595e35[_0x343c51(0x30f)]();}},_0x5e747a;}async[_0x5eca20(0x1d0)](_0x407cdd,_0x25bd61){const _0x19d636=_0x5eca20;var _0x4f4d5b;let {unitType:_0x5bc720,unitID:_0x444143,changeset:_0x4ca153}=_0x25bd61[_0x19d636(0x193)],_0x2b8c8f={'unitID':_0x444143,'memberID':_0x407cdd[_0x19d636(0x288)],'type':_0x5bc720,'changeset':(0x0,c[_0x19d636(0x1e2)])(_0x4ca153)},_0x40619f=this[_0x19d636(0x1e7)][_0x19d636(0x278)](A),_0x247d4d=Ne((_0x4f4d5b=_0x40619f==null?void 0x0:_0x40619f[_0x19d636(0x3e2)])==null?_0x19d636(0x26d):_0x4f4d5b,_0x5bc720,_0x444143);try{await this[_0x19d636(0x172)]['post'](_0x247d4d,{'body':_0x2b8c8f});}catch(_0x25ff02){throw this['_logService'][_0x19d636(0x2dc)](_0x19d636(0x2b4),'submit\x20changeset\x20error!'),_0x25ff02;}}async[_0x5eca20(0x35d)](_0x39feee){const _0x14972a=_0x5eca20;let {unitID:_0x27c7a4,from:_0x594839,to:_0x35b4d3,unitType:_0x2b774f}=_0x39feee[_0x14972a(0x193)];return(await this[_0x14972a(0x164)][_0x14972a(0x3b6)]({'metadata':void 0x0},{'unitID':_0x27c7a4,'type':_0x2b774f,'from':_0x594839,'to':_0x35b4d3}))['changesets']['map'](_0x13b0d1=>((_0x13b0d1[_0x14972a(0x344)]===null||_0x13b0d1[_0x14972a(0x344)]===void 0x0)&&(_0x13b0d1[_0x14972a(0x344)]=[]),_0x13b0d1));}};Pe=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(l['Injector'])),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(h[_0x5eca20(0x22e)])),S(0x2,l[_0x5eca20(0x195)]),S(0x3,l[_0x5eca20(0x3a3)]),S(0x4,c[_0x5eca20(0x2c2)])],Pe);let U=class extends l[_0x5eca20(0x2c3)]{get['_socket'](){return this['_socket$']['getValue']();}constructor(_0x5dcb05,_0x41b0af,_0x53e15c,_0x215a26,_0x2c0a03,_0x373570){const _0x31423c=_0x5eca20;super(),this['_injector']=_0x5dcb05,this[_0x31423c(0x429)]=_0x41b0af,this[_0x31423c(0x1e7)]=_0x53e15c,this[_0x31423c(0x37b)]=_0x215a26,this['_collaborationUIEventService']=_0x2c0a03,this[_0x31423c(0x35b)]=_0x373570,y(this,_0x31423c(0x277),new f[(_0x31423c(0x196))](void 0x0)),y(this,_0x31423c(0x422),this['_socket$'][_0x31423c(0x1bd)]()),y(this,_0x31423c(0x22f),null),y(this,_0x31423c(0x1b0),new Map()),y(this,_0x31423c(0x167),new f[(_0x31423c(0x196))](T['IDLE'])),y(this,_0x31423c(0x39d),this[_0x31423c(0x167)][_0x31423c(0x1bd)]()),y(this,_0x31423c(0x21e),!0x1),y(this,_0x31423c(0x43e),void 0x0),y(this,_0x31423c(0x36f),0x0),y(this,_0x31423c(0x197),void 0x0),y(this,'_timeoutTimer',void 0x0),this[_0x31423c(0x1db)]();}[_0x5eca20(0x1db)](){const _0x1ec1d0=_0x5eca20;this['_networkConditionService']&&this[_0x1ec1d0(0x224)](this[_0x1ec1d0(0x35b)][_0x1ec1d0(0x165)][_0x1ec1d0(0x439)](_0x20e2e0=>{const _0x20dafa=_0x1ec1d0;_0x20e2e0&&!this[_0x20dafa(0x247)]&&this['reconnect'](),_0x20e2e0||this[_0x20dafa(0x3c9)]();}));}[_0x5eca20(0x30f)](){const _0x5e637f=_0x5eca20;super[_0x5e637f(0x30f)](),this['_clearRetryConnectingTimer'](),this[_0x5e637f(0x361)](),this[_0x5e637f(0x215)](),this[_0x5e637f(0x1b0)][_0x5e637f(0x248)](_0x4116b5=>_0x4116b5[_0x5e637f(0x30f)]()),this['_sessions'][_0x5e637f(0x16e)](),this[_0x5e637f(0x167)][_0x5e637f(0x284)]();}async[_0x5eca20(0x27d)](_0x573175){const _0x2a30a6=_0x5eca20;if(this[_0x2a30a6(0x1b0)][_0x2a30a6(0x1a8)](_0x573175))return this['_sessions']['get'](_0x573175);this[_0x2a30a6(0x2f3)]();let _0x2f35a8=this[_0x2a30a6(0x161)][_0x2a30a6(0x2ef)](E,_0x573175,this[_0x2a30a6(0x277)]['asObservable']());return this[_0x2a30a6(0x1b0)][_0x2a30a6(0x28e)](_0x573175,_0x2f35a8),_0x2f35a8;}[_0x5eca20(0x1bf)](_0x5f04bc){const _0x195bb1=_0x5eca20;let _0x1f8667=this[_0x195bb1(0x1b0)][_0x195bb1(0x1b6)](_0x5f04bc);if(_0x1f8667&&(this[_0x195bb1(0x1b0)][_0x195bb1(0x349)](_0x5f04bc),_0x1f8667['close']()),!this[_0x195bb1(0x1b0)]['size']){var _0x2b05b2;(_0x2b05b2=this[_0x195bb1(0x247)])==null||_0x2b05b2['close']();}}[_0x5eca20(0x17d)](){const _0x16a4c8=_0x5eca20;this[_0x16a4c8(0x36f)]=0x0,this[_0x16a4c8(0x3e1)](),this['_tryReconnect']();}[_0x5eca20(0x3e1)](){const _0x168c6f=_0x5eca20;this[_0x168c6f(0x43e)]!=null&&(clearTimeout(this['_retryConnectingTimer']),this[_0x168c6f(0x43e)]=null);}async[_0x5eca20(0x241)](){const _0x3e536a=_0x5eca20;var _0x2c2698;let _0xbdf30=this[_0x3e536a(0x1e7)][_0x3e536a(0x278)](A),_0x1b2943=(_0x2c2698=_0xbdf30==null?void 0x0:_0xbdf30[_0x3e536a(0x2d5)])==null?oe:_0x2c2698,_0x28645f=await this[_0x3e536a(0x37b)][_0x3e536a(0x3a0)](_0x1b2943);return this['_candidateSocket']=_0x28645f,_0x28645f;}async[_0x5eca20(0x2f3)](){const _0x9f16bd=_0x5eca20;try{var _0x55e535,_0x298b42;let _0x56a1f0=(_0x55e535=(_0x298b42=this['_socket'])==null?this['_candidateSocket']:_0x298b42)==null?await this[_0x9f16bd(0x241)]():_0x55e535;if(_0x56a1f0){let _0x19c167=_0x56a1f0[_0x9f16bd(0x335)];_0x56a1f0[_0x9f16bd(0x335)]=_0x23dd0d=>(_0x23dd0d[_0x9f16bd(0x388)]!==p[_0x9f16bd(0x188)][_0x9f16bd(0x435)]&&this[_0x9f16bd(0x3f7)](),_0x19c167[_0x9f16bd(0x1d8)](_0x56a1f0,[_0x23dd0d])),_0x56a1f0[_0x9f16bd(0x189)]['subscribe'](_0x3c4c37=>this[_0x9f16bd(0x3b7)](_0x56a1f0,_0x3c4c37)),_0x56a1f0[_0x9f16bd(0x204)]['pipe']((0x0,m['take'])(0x1))[_0x9f16bd(0x439)](_0x3c5692=>this[_0x9f16bd(0x429)][_0x9f16bd(0x2dc)]('[CollaborationSessionService]:\x20socket\x20error',_0x3c5692)),_0x56a1f0[_0x9f16bd(0x228)][_0x9f16bd(0x1b4)]((0x0,m[_0x9f16bd(0x191)])(0x1))[_0x9f16bd(0x439)](()=>{const _0x16e09e=_0x9f16bd;this[_0x16e09e(0x24d)](_0x56a1f0);}),_0x56a1f0[_0x9f16bd(0x1ea)]['pipe']((0x0,m['take'])(0x1))[_0x9f16bd(0x439)](_0x2872af=>{const _0x376a07=_0x9f16bd;this[_0x376a07(0x429)][_0x376a07(0x40a)](_0x376a07(0x18a),'socket\x20close',_0x2872af),this[_0x376a07(0x17f)]();});}}catch(_0x520ef9){this[_0x9f16bd(0x429)][_0x9f16bd(0x2dc)](_0x520ef9),this[_0x9f16bd(0x17f)]();}}[_0x5eca20(0x24d)](_0x334de6){const _0xd35d07=_0x5eca20;this[_0xd35d07(0x429)][_0xd35d07(0x40a)](_0xd35d07(0x18a),_0xd35d07(0x185)),_0x334de6[_0xd35d07(0x335)]({'cmd':p[_0xd35d07(0x188)]['HELLO']}),this[_0xd35d07(0x3f7)]();}[_0x5eca20(0x3c9)](){const _0x5d6c68=_0x5eca20;this['_socketReady']=!0x1,this[_0x5d6c68(0x22f)]=null,this[_0x5d6c68(0x167)][_0x5d6c68(0x1d2)](T[_0x5d6c68(0x276)]),this['_socket$'][_0x5d6c68(0x1d2)](null),this[_0x5d6c68(0x361)](),this['_clearHeartbeatTimer']();}[_0x5eca20(0x17f)](){const _0x28d022=_0x5eca20;var _0x43e904;this[_0x28d022(0x3c9)](),this[_0x28d022(0x36f)]<((_0x43e904=this[_0x28d022(0x1e7)]['getConfig']('RETRY_CONNECTING_MAX_COUNT'))==null?0x3:_0x43e904)?(this['_collaborationUIEventService'][_0x28d022(0x3d0)]({'id':b['SOCKET_FAILED_RETRY']}),this[_0x28d022(0x33a)]()):this['_collaborationUIEventService']['emitEvent']({'id':b[_0x28d022(0x367)]});}[_0x5eca20(0x33a)](){const _0x2850b0=_0x5eca20;var _0x4fa079;let _0x5b5477=this['_retryCount'],_0x548811=this[_0x2850b0(0x1e7)][_0x2850b0(0x278)](A),_0x37f07b=_0x5b5477===0x0?0x0:((_0x4fa079=_0x548811==null?void 0x0:_0x548811[_0x2850b0(0x33b)])==null?0x4e20:_0x4fa079)*0x2**_0x5b5477;this[_0x2850b0(0x43e)]=setTimeout(()=>{const _0x1c461e=_0x2850b0;clearTimeout(this[_0x1c461e(0x43e)]),this[_0x1c461e(0x43e)]=null,this[_0x1c461e(0x2f3)]();},_0x37f07b),this[_0x2850b0(0x36f)]+=0x1;}[_0x5eca20(0x3b7)](_0x9dabe2,_0x24e1e6){const _0x19c18c=_0x5eca20;let {cmd:_0x4bf9f4}=_0x24e1e6;_0x4bf9f4===p[_0x19c18c(0x188)][_0x19c18c(0x22d)]&&!this[_0x19c18c(0x21e)]&&(_0x9dabe2[_0x19c18c(0x288)]=_0x24e1e6[_0x19c18c(0x193)][_0x19c18c(0x288)],this[_0x19c18c(0x277)][_0x19c18c(0x1d2)](_0x9dabe2),this[_0x19c18c(0x167)][_0x19c18c(0x1d2)](T[_0x19c18c(0x2ea)]),this[_0x19c18c(0x21e)]=!0x0,this['_candidateSocket']=null),_0x4bf9f4===p['CombCmd']['HEARTBEAT']&&this['_clearTimeoutTimer'](),this[_0x19c18c(0x3f7)]();}[_0x5eca20(0x3f7)](){const _0x3c3956=_0x5eca20;var _0x4cfacd;this['_clearHeartbeatTimer'](),this[_0x3c3956(0x197)]=setTimeout(()=>this[_0x3c3956(0x26f)](),(_0x4cfacd=this['_configService'][_0x3c3956(0x278)](_0x3c3956(0x1aa)))==null?0x7530:_0x4cfacd);}[_0x5eca20(0x26f)](){const _0x10fd80=_0x5eca20;this['_socket']['send']({'cmd':p['CombCmd'][_0x10fd80(0x2bc)]}),this[_0x10fd80(0x3cf)]();}[_0x5eca20(0x3cf)](){const _0xea80d9=_0x5eca20;var _0x4aea3f;this[_0xea80d9(0x1b7)]=setTimeout(()=>this[_0xea80d9(0x17f)](),(_0x4aea3f=this[_0xea80d9(0x1e7)]['getConfig'](_0xea80d9(0x1fa)))==null?se:_0x4aea3f);}[_0x5eca20(0x215)](){const _0x211a05=_0x5eca20;this[_0x211a05(0x197)]!=null&&(clearTimeout(this[_0x211a05(0x197)]),this['_sendHeartbeatTimer']=null);}[_0x5eca20(0x361)](){const _0x215f7d=_0x5eca20;this[_0x215f7d(0x1b7)]!=null&&(clearTimeout(this[_0x215f7d(0x1b7)]),this[_0x215f7d(0x1b7)]=null);}};U=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x1,l[_0x5eca20(0x3a3)]),S(0x2,l[_0x5eca20(0x195)]),S(0x3,Me),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(x)),S(0x5,(0x0,l[_0x5eca20(0x2f5)])(ke))],U);let W=class extends l[_0x5eca20(0x3fc)]{constructor(_0x5dabed,_0x4384cc,_0x462799,_0x31850c){const _0x2e601f=_0x5eca20;var _0x1d83eb;super(),this[_0x2e601f(0x161)]=_0x5dabed,this[_0x2e601f(0x1d3)]=_0x4384cc,this[_0x2e601f(0x1e7)]=_0x462799,this['_univerInstanceService']=_0x31850c,y(this,_0x2e601f(0x34b),new Map()),y(this,_0x2e601f(0x3bc),new f[(_0x2e601f(0x2a4))]()),y(this,_0x2e601f(0x3a6),this[_0x2e601f(0x3bc)][_0x2e601f(0x1bd)]()),((_0x1d83eb=this['_configService'][_0x2e601f(0x278)](_0x2e601f(0x32f)))==null?void 0x0:_0x1d83eb['enableCollaboration'])!==!0x1&&this[_0x2e601f(0x372)]();}[_0x5eca20(0x30f)](){const _0x3c5745=_0x5eca20;super[_0x3c5745(0x30f)](),this['_entities'][_0x3c5745(0x248)](_0x2be16f=>_0x2be16f[_0x3c5745(0x30f)]()),this[_0x3c5745(0x34b)]['clear']();}['getCollabEntity'](_0x3f0d4d){const _0x29c237=_0x5eca20;var _0xb1126c;return(_0xb1126c=this['_entities'][_0x29c237(0x1b6)](_0x3f0d4d))==null?null:_0xb1126c;}[_0x5eca20(0x1ed)](_0x1785a3){const _0x5dac8d=_0x5eca20;let _0x16918e=this[_0x5dac8d(0x2e1)](_0x1785a3);return _0x16918e?(0x0,f['of'])(_0x16918e):this[_0x5dac8d(0x3bc)][_0x5dac8d(0x1b4)]((0x0,m[_0x5dac8d(0x1b1)])(_0x582dcd=>_0x582dcd[_0x5dac8d(0x42a)]===_0x1785a3));}[_0x5eca20(0x41c)](_0x41ca9b){const _0x2ae67a=_0x5eca20;return(0x0,f[_0x2ae67a(0x175)])(this[_0x2ae67a(0x1ed)](_0x41ca9b)['pipe']((0x0,m[_0x2ae67a(0x29e)])(()=>void 0x0)));}['_init'](){const _0x5bfa8f=_0x5eca20;this[_0x5bfa8f(0x27e)]['getTypeOfUnitAdded$'](l[_0x5bfa8f(0x2f6)][_0x5bfa8f(0x416)])['pipe']((0x0,f['takeUntil'])(this['dispose$']),(0x0,m[_0x5bfa8f(0x39f)])(0x10))['subscribe'](async _0x146f33=>{const _0x2c27d4=_0x5bfa8f;let _0x49183a=_0x146f33[_0x2c27d4(0x397)](),_0x5835c8=await this[_0x2c27d4(0x421)](_0x49183a,p[_0x2c27d4(0x3fd)]['UNIVER_SHEET']);this['_entities'][_0x2c27d4(0x28e)](_0x49183a,_0x5835c8);}),this[_0x5bfa8f(0x27e)][_0x5bfa8f(0x255)](l[_0x5bfa8f(0x2f6)][_0x5bfa8f(0x2bf)])[_0x5bfa8f(0x1b4)]((0x0,f[_0x5bfa8f(0x1c5)])(this[_0x5bfa8f(0x2fb)]),(0x0,m['delay'])(0x10))[_0x5bfa8f(0x1b4)]((0x0,m[_0x5bfa8f(0x1b1)])(_0x123b61=>!_0x123b61[_0x5bfa8f(0x397)]()[_0x5bfa8f(0x3bb)]('__')))[_0x5bfa8f(0x439)](async _0x1b7ea9=>{const _0x441c17=_0x5bfa8f;let _0x81f4b5=_0x1b7ea9[_0x441c17(0x397)](),_0x1afa06=await this[_0x441c17(0x421)](_0x81f4b5,p[_0x441c17(0x3fd)][_0x441c17(0x2bf)]);this[_0x441c17(0x34b)][_0x441c17(0x28e)](_0x81f4b5,_0x1afa06);}),(0x0,f[_0x5bfa8f(0x290)])(this[_0x5bfa8f(0x27e)][_0x5bfa8f(0x216)](l[_0x5bfa8f(0x2f6)][_0x5bfa8f(0x416)]),this[_0x5bfa8f(0x27e)][_0x5bfa8f(0x216)](l['UniverInstanceType'][_0x5bfa8f(0x2bf)]))[_0x5bfa8f(0x1b4)]((0x0,f[_0x5bfa8f(0x1c5)])(this['dispose$']))[_0x5bfa8f(0x439)](_0x8b1d56=>{const _0x56f5eb=_0x5bfa8f;let _0x5473e7=_0x8b1d56[_0x56f5eb(0x397)](),_0x285d52=this[_0x56f5eb(0x34b)][_0x56f5eb(0x1b6)](_0x5473e7);_0x285d52&&(_0x285d52[_0x56f5eb(0x30f)](),this[_0x56f5eb(0x34b)][_0x56f5eb(0x349)](_0x5473e7));});}async[_0x5eca20(0x421)](_0x18a4e9,_0x13d893){const _0x334b93=_0x5eca20;let _0x3be545=await this[_0x334b93(0x1d3)]['requireSession'](_0x18a4e9),_0x45a2dd=this[_0x334b93(0x161)][_0x334b93(0x2ef)](this[_0x334b93(0x326)](_0x13d893),_0x18a4e9,_0x13d893,_0x3be545);return await _0x45a2dd[_0x334b93(0x296)](),this[_0x334b93(0x3bc)][_0x334b93(0x1d2)](_0x45a2dd),_0x45a2dd;}[_0x5eca20(0x326)](_0x30679e){const _0x102c63=_0x5eca20;switch(_0x30679e){case p[_0x102c63(0x3fd)][_0x102c63(0x2bf)]:return V;case p[_0x102c63(0x3fd)][_0x102c63(0x416)]:return H;default:throw Error(_0x102c63(0x21c)+_0x30679e);}}};W=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(U)),S(0x2,l[_0x5eca20(0x195)]),S(0x3,l[_0x5eca20(0x205)])],W);var Fe='@univerjs-pro/collaboration-client',Ie=_0x5eca20(0x267);let Le=class extends l[_0x5eca20(0x2c3)]{constructor(_0x5cb293,_0x2b6c6a){const _0x3a29e8=_0x5eca20;super(),this[_0x3a29e8(0x27e)]=_0x5cb293,this['_configService']=_0x2b6c6a,this[_0x3a29e8(0x372)]();}['_init'](){const _0x50bce6=_0x5eca20;this[_0x50bce6(0x224)](this['_univerInstanceService'][_0x50bce6(0x16d)]['subscribe'](()=>{const _0x437bd0=_0x50bce6;var _0x7a1b1e;let _0x2e07ab=this[_0x437bd0(0x27e)][_0x437bd0(0x1f4)](),_0x3df8c3=(_0x7a1b1e=this[_0x437bd0(0x1e7)]['getConfig']('DEFAULT_FILE_NAME'))==null?'Univer':_0x7a1b1e;_0x2e07ab instanceof l[_0x437bd0(0x270)]&&(_0x3df8c3=_0x2e07ab[_0x437bd0(0x1ac)]),document['title']=_0x3df8c3;}));}};Le=C([S(0x0,l[_0x5eca20(0x205)]),S(0x1,l[_0x5eca20(0x195)])],Le);let G=class{constructor(_0x3a775b,_0x3cf01d,_0x39862a){const _0x541815=_0x5eca20;this[_0x541815(0x1e7)]=_0x3a775b,this[_0x541815(0x172)]=_0x3cf01d,this[_0x541815(0x2e6)]=_0x39862a,this[_0x541815(0x296)]();}[_0x5eca20(0x296)](){const _0x20dc08=_0x5eca20;this['_httpService']['registerHTTPInterceptor']({'priority':0x1,'interceptor':(_0x4a402a,_0x303208)=>_0x303208(_0x4a402a)[_0x20dc08(0x1b4)]((0x0,f['concatMap'])(async _0x2a7d06=>{const _0x55ebc0=_0x20dc08;let _0x2fe8cd=_0x2a7d06;if(_0x2fe8cd['status']===0x191){if(typeof window>'u')throw Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window['confirm'](this[_0x55ebc0(0x2e6)]['t'](_0x55ebc0(0x211)))){let _0x2d3bc4=window[_0x55ebc0(0x381)](window['location'][_0x55ebc0(0x39c)]);window['location']['href']=this[_0x55ebc0(0x38f)]()+_0x55ebc0(0x314)+_0x2d3bc4;}}return _0x2fe8cd;}))});}['_getLoginPath'](){const _0x715a52=_0x5eca20;var _0x77076f;let _0x2291f2=this[_0x715a52(0x1e7)]['getConfig'](A);return(_0x77076f=_0x2291f2==null?void 0x0:_0x2291f2['loginUrlKey'])==null?_0x715a52(0x38e):_0x77076f;}};G=C([S(0x0,l[_0x5eca20(0x195)]),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(h[_0x5eca20(0x22e)])),S(0x2,(0x0,l[_0x5eca20(0x3fa)])(l['LocaleService']))],G);let K=class extends l[_0x5eca20(0x2c3)]{constructor(_0x572447,_0x21cacb){const _0x286fdb=_0x5eca20;super(),this['_HTTPService']=_0x572447,this[_0x286fdb(0x1e7)]=_0x21cacb,y(this,_0x286fdb(0x3ea),!0x1),this['_initMergeInterceptor']();}[_0x5eca20(0x1bc)](){const _0xd5f76a=_0x5eca20;let _0x154345=this;this[_0xd5f76a(0x224)](this['_HTTPService'][_0xd5f76a(0x2c1)]({'priority':0x3e7,'interceptor':(0x0,h[_0xd5f76a(0x354)])({'isMatch'(_0x371eec){const _0x4d6f28=_0xd5f76a;var _0x348f78;if(_0x371eec['method']==='POST'&&(_0x348f78=_0x371eec[_0x4d6f28(0x38d)])!=null&&_0x348f78[_0x4d6f28(0x275)]){let {objectID:_0x18e2e7,objectType:_0x2b5946}=_0x371eec[_0x4d6f28(0x38d)]['body']||{};if(!_0x18e2e7||_0x2b5946===void 0x0)return!0x1;let _0x447316=_0x154345[_0x4d6f28(0x2e9)]()+'/'+_0x2b5946+_0x4d6f28(0x2ee)+_0x18e2e7+_0x4d6f28(0x3e8);if(_0x371eec['url']===_0x447316)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x5a8d84){const _0x57bf4c=_0xd5f76a;var _0x170981;return(_0x170981=_0x5a8d84[_0x57bf4c(0x38d)])==null?void 0x0:_0x170981[_0x57bf4c(0x275)];},'mergeParamsToRequest'(_0x559670,_0x40062e){const _0x5c1d12=_0xd5f76a;let _0x1e7117=_0x154345[_0x5c1d12(0x2e9)]()+_0x5c1d12(0x318),_0x289ac8=_0x559670[_0x5c1d12(0x3d6)]((_0x4c3bb6,_0x430950)=>{const _0x1bd134=_0x5c1d12;let {unitID:_0xedec67,objectID:_0x293bc7,objectType:_0x432ef8,actions:_0x4aa38e}=_0x430950;return _0x4c3bb6[_0xedec67]||(_0x4c3bb6[_0xedec67]={}),_0x4c3bb6[_0xedec67][_0x293bc7]||(_0x4c3bb6[_0xedec67][_0x293bc7]={'objectID':_0x293bc7,'objectType':_0x432ef8,'actions':[]}),_0x4c3bb6[_0xedec67][_0x293bc7][_0x1bd134(0x3af)][_0x1bd134(0x194)](..._0x4aa38e),_0x4c3bb6;},{}),_0x259e8a=[];for(let _0x400af9 in _0x289ac8)for(let _0x1ce2f1 in _0x289ac8[_0x400af9]){let {actions:_0x5e2e67,objectType:_0x1a4859}=_0x289ac8[_0x400af9][_0x1ce2f1],_0x14a012=[...new Set(_0x5e2e67)];_0x259e8a[_0x5c1d12(0x194)]({'unitID':_0x400af9,'objectID':_0x1ce2f1,'objectType':_0x1a4859,'actions':_0x14a012});}return new h[(_0x5c1d12(0x334))](_0x5c1d12(0x437),_0x1e7117,{'headers':_0x40062e[_0x5c1d12(0x25c)],'withCredentials':_0x40062e[_0x5c1d12(0x28a)],'responseType':_0x40062e['responseType'],'body':{'requests':_0x259e8a}});}},{'distributeResult'(_0x23d89d,_0xbb7a7){const _0x422b5c=_0xd5f76a;let {objectActions:_0x2794c2}=_0x23d89d;return _0xbb7a7[_0x422b5c(0x29e)](_0x3025c7=>{const _0x1d4ff8=_0x422b5c;let {unitID:_0x2edef8,objectID:_0x3a4f7e,actions:_0x137c32}=_0x3025c7,_0x5b776f=_0x2794c2[_0x1d4ff8(0x2c0)](_0x593fa1=>_0x593fa1[_0x1d4ff8(0x42a)]===_0x2edef8&&_0x593fa1[_0x1d4ff8(0x1e8)]===_0x3a4f7e);return{'config':_0x3025c7,'result':{'actions':_0x137c32[_0x1d4ff8(0x29e)](_0x3cb7e3=>_0x5b776f==null?void 0x0:_0x5b776f[_0x1d4ff8(0x3af)][_0x1d4ff8(0x2c0)](_0xa519db=>_0xa519db[_0x1d4ff8(0x41f)]===_0x3cb7e3))['filter'](_0x2ff1c8=>!!_0x2ff1c8),'error':_0x23d89d[_0x1d4ff8(0x2dc)]}};});}})}));}[_0x5eca20(0x2e9)](){const _0x48edad=_0x5eca20;var _0x3ec967;let _0x2ad0bf=this[_0x48edad(0x1e7)][_0x48edad(0x278)](A);return(_0x3ec967=_0x2ad0bf==null?void 0x0:_0x2ad0bf['authzUrl'])==null?_0x48edad(0x1ff):_0x3ec967;}async['create'](_0x77b31a){const _0x306bbd=_0x5eca20;let _0x63f62d=this['_getAPIPrefixPath']()+'/'+_0x77b31a['objectType']+_0x306bbd(0x20f);return(await this[_0x306bbd(0x1cd)][_0x306bbd(0x442)](_0x63f62d,{'body':_0x77b31a}))[_0x306bbd(0x275)][_0x306bbd(0x1e8)]||'';}async[_0x5eca20(0x2b8)](_0x71b7a3){const _0x236726=_0x5eca20;let _0x3f310e=this['_getAPIPrefixPath']()+_0x236726(0x2cd);return(await this[_0x236726(0x1cd)][_0x236726(0x442)](_0x3f310e,{'body':_0x71b7a3}))[_0x236726(0x275)][_0x236726(0x359)];}async[_0x5eca20(0x16c)](_0x2f3aff){const _0x5da699=_0x5eca20;var _0x5ee9a1;let _0x1832a7=this[_0x5da699(0x2e9)]()+'/'+_0x2f3aff['objectType']+_0x5da699(0x2ee)+_0x2f3aff['objectID'],_0x3db7da=await this['_HTTPService'][_0x5da699(0x306)](_0x1832a7,{'body':_0x2f3aff});if((_0x3db7da==null||(_0x5ee9a1=_0x3db7da[_0x5da699(0x275)])==null||(_0x5ee9a1=_0x5ee9a1[_0x5da699(0x2dc)])==null?void 0x0:_0x5ee9a1[_0x5da699(0x2bb)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async['allowed'](_0x38c297){const _0x38980f=_0x5eca20;let _0x39fa80=this[_0x38980f(0x2e9)]()+'/'+_0x38c297[_0x38980f(0x33e)]+_0x38980f(0x2ee)+_0x38c297[_0x38980f(0x1e8)]+'/allowed';return(await this[_0x38980f(0x1cd)][_0x38980f(0x442)](_0x39fa80,{'body':_0x38c297}))[_0x38980f(0x275)]['actions'];}async[_0x5eca20(0x28c)](_0x4f13b4){const _0x1a49d4=_0x5eca20;let _0x14cee5=this[_0x1a49d4(0x2e9)]()+'/-/object/-/batch_allowed';return(await this[_0x1a49d4(0x1cd)][_0x1a49d4(0x442)](_0x14cee5,{'body':{'requests':_0x4f13b4}}))['body']['objectActions'];}async[_0x5eca20(0x3c2)](_0x2272ee){const _0x59b99d=_0x5eca20;let _0x53a1c9=this[_0x59b99d(0x2e9)]()+'/'+_0x2272ee[_0x59b99d(0x33e)]+_0x59b99d(0x375),_0x63f3e7=await this['_HTTPService'][_0x59b99d(0x442)](_0x53a1c9,{'body':_0x2272ee});return{'roles':_0x63f3e7['body'][_0x59b99d(0x237)],'actions':_0x63f3e7[_0x59b99d(0x275)][_0x59b99d(0x3af)]};}async[_0x5eca20(0x433)](_0x3ce260){const _0x21f829=_0x5eca20;let _0x57ff41=this[_0x21f829(0x2e9)]()+'/collaborator';await this[_0x21f829(0x1cd)][_0x21f829(0x349)](_0x57ff41,{'params':{'collaboratorID':_0x3ce260[_0x21f829(0x31f)],'objectID':_0x3ce260['objectID'],'unitID':_0x3ce260[_0x21f829(0x42a)]}});}async[_0x5eca20(0x42c)](_0x3c357a){const _0x2d5d0c=_0x5eca20;let _0x17de86=this[_0x2d5d0c(0x2e9)]()+_0x2d5d0c(0x3f1);await this[_0x2d5d0c(0x1cd)]['patch'](_0x17de86,{'body':_0x3c357a});}async[_0x5eca20(0x2ac)](_0x1acc72){const _0x34423f=_0x5eca20;let _0x24a42e=this[_0x34423f(0x2e9)]()+_0x34423f(0x3f1);await this['_HTTPService'][_0x34423f(0x442)](_0x24a42e,{'body':_0x1acc72});}async[_0x5eca20(0x170)](_0x51675f){const _0x1981a7=_0x5eca20;var _0x1d110a;let _0x7e93d1=this[_0x1981a7(0x2e9)]()+_0x1981a7(0x3f1),_0x6e3b84=await this['_HTTPService'][_0x1981a7(0x1b6)](_0x7e93d1,{'params':{'objectID':_0x51675f[_0x1981a7(0x1e8)],'unitID':_0x51675f['unitID']}});return this['setCfgEnableObjInherit']((_0x1d110a=_0x6e3b84[_0x1981a7(0x275)][_0x1981a7(0x1d6)])==null?!0x1:_0x1d110a),_0x6e3b84['body'][_0x1981a7(0x3e0)];}async[_0x5eca20(0x428)](_0x3bde9a){const _0x472bbb=_0x5eca20;let _0x32f6ae=this[_0x472bbb(0x2e9)]()+_0x472bbb(0x3f1);await this[_0x472bbb(0x1cd)][_0x472bbb(0x306)](_0x32f6ae,{'body':_0x3bde9a});}[_0x5eca20(0x3d4)](_0x660af9){const _0x5847fe=_0x5eca20;this[_0x5847fe(0x3ea)]=_0x660af9;}[_0x5eca20(0x3ad)](){const _0x3e1315=_0x5eca20;return this[_0x3e1315(0x3ea)];}};K=C([S(0x0,(0x0,l['Inject'])(h[_0x5eca20(0x22e)])),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x195)]))],K);function Re(_0x59b828,_0xcbe997){const _0xf7da53=_0x5eca20;let _0x525d84=_0xcbe997-_0x59b828[_0xf7da53(0x373)]%_0xcbe997;return _0x59b828+String[_0xf7da53(0x227)](_0x525d84)['repeat'](_0x525d84);}function ze(_0x462974,_0x3abf00){const _0xd099b2=_0x5eca20;let _0x553ce4=ie[_0xd099b2(0x3d8)][_0xd099b2(0x1f3)](0x10),_0x391973=Re(_0x462974,0x10),_0x3d74b6=ne[_0xd099b2(0x3d8)]['encrypt'](re[_0xd099b2(0x3d8)][_0xd099b2(0x245)](_0x391973),_[_0xd099b2(0x3d8)][_0xd099b2(0x245)](_0x3abf00),{'iv':_0x553ce4,'padding':ae[_0xd099b2(0x3d8)]});return _0x553ce4[_0xd099b2(0x2df)](_0x3d74b6['ciphertext'])[_0xd099b2(0x1dc)](_['default']);}function Be(){const _0x2efc7f=_0x5eca20;let _0x4f883d=(0x0,te['getGlobalObject'])()[_0x2efc7f(0x3c5)];if(typeof window<'u'&&window[_0x2efc7f(0x360)]!==void 0x0&&_0x4f883d){let _0x4d396f={'time':Math[_0x2efc7f(0x3e7)](Date[_0x2efc7f(0x2dd)]()/0x3e8),'domain':location['hostname']};return ze(JSON['stringify'](_0x4d396f),_0x4f883d);}}let q=class{constructor(_0x16bb20){const _0x3f7c6a=_0x5eca20;this[_0x3f7c6a(0x172)]=_0x16bb20,this[_0x3f7c6a(0x24c)]();}[_0x5eca20(0x24c)](){const _0x1abbcc=_0x5eca20;this[_0x1abbcc(0x172)]['registerHTTPInterceptor']({'interceptor':(_0x5baee5,_0x1376df)=>{const _0xb509bd=_0x1abbcc;let _0x2ad0c5=_0x5baee5['headers'],_0x248fc0=Be();return _0x248fc0&&_0x2ad0c5['set'](_0xb509bd(0x2ec),_0x248fc0),_0x1376df(_0x5baee5);}});}};q=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(h[_0x5eca20(0x22e)]))],q);let J=class extends l[_0x5eca20(0x3fc)]{constructor(_0x28418f,_0x5a1e4f,_0x39bd01){const _0x3518a8=_0x5eca20;super(),this[_0x3518a8(0x429)]=_0x28418f,this[_0x3518a8(0x1c7)]=_0x5a1e4f,this[_0x3518a8(0x1ad)]=_0x39bd01,y(this,'_unitInfo$',new f[(_0x3518a8(0x196))](null)),y(this,_0x3518a8(0x1c0),this['_unitInfo$'][_0x3518a8(0x1bd)]());}async[_0x5eca20(0x27c)](_0x5f3fd2,_0x43ebec,_0x9bd5a1){const _0x29f0a0=_0x5eca20;this[_0x29f0a0(0x213)][_0x29f0a0(0x1d2)]({'unitId':_0x5f3fd2,'type':_0x43ebec});let _0x666945=null;switch(_0x43ebec){case p[_0x29f0a0(0x3fd)][_0x29f0a0(0x416)]:_0x666945=await this[_0x29f0a0(0x1c7)][_0x29f0a0(0x210)](_0x5f3fd2,_0x9bd5a1);break;case p['UniverType'][_0x29f0a0(0x2bf)]:_0x666945=await this[_0x29f0a0(0x1c7)][_0x29f0a0(0x3ac)](_0x5f3fd2,_0x9bd5a1);break;default:this['_logService']['error']('[DataLoaderService]',_0x29f0a0(0x1f8));break;}return _0x666945;}async['loadUnit'](_0x2a186b,_0x598a65,_0x51ecdd){const _0x1c9018=_0x5eca20;var _0x140b2b;this[_0x1c9018(0x213)][_0x1c9018(0x1d2)]({'unitId':_0x2a186b,'type':_0x598a65,'subUnitId':_0x51ecdd});let _0x5e5f4c=0x0,_0x49e051=await((_0x140b2b=this['_localCacheService'])==null?void 0x0:_0x140b2b['loadOfflineData'](_0x2a186b));return _0x49e051&&(_0x49e051[_0x1c9018(0x3c3)]||_0x49e051[_0x1c9018(0x344)]['length']!==0x0)&&(_0x5e5f4c=_0x49e051[_0x1c9018(0x17a)]),_0x5e5f4c===0x0&&this['_logService'][_0x1c9018(0x40a)](_0x1c9018(0x368),_0x1c9018(0x343)),this[_0x1c9018(0x27c)](_0x2a186b,_0x598a65,_0x5e5f4c);}};J=C([S(0x0,l[_0x5eca20(0x3a3)]),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(c[_0x5eca20(0x366)])),S(0x2,(0x0,l[_0x5eca20(0x2f5)])(D))],J);const Ve=[_0x5eca20(0x307),_0x5eca20(0x3f6),_0x5eca20(0x1e1),'image/gif',_0x5eca20(0x3c8)];let Y=class{constructor(_0x65973b,_0x2212f8,_0x4adf17){const _0x5e8899=_0x5eca20;this['_httpService']=_0x65973b,this['_configService']=_0x2212f8,this['_univerInstanceService']=_0x4adf17,y(this,_0x5e8899(0x2aa),0x0),y(this,_0x5e8899(0x2d4),new f[(_0x5e8899(0x2a4))]()),y(this,_0x5e8899(0x1af),this[_0x5e8899(0x2d4)]),y(this,_0x5e8899(0x304),new Map());}['setWaitCount'](_0x1eaa23){const _0x3b7dbf=_0x5eca20;this[_0x3b7dbf(0x2aa)]=_0x1eaa23,this[_0x3b7dbf(0x2d4)][_0x3b7dbf(0x1d2)](_0x1eaa23);}['getImageSourceCache'](_0x459ed0,_0x5ce928){const _0x2dcd65=_0x5eca20;if(_0x5ce928===g[_0x2dcd65(0x1ba)]['BASE64']){let _0x22a631=new Image();return _0x22a631['src']=_0x459ed0,_0x22a631;}return this[_0x2dcd65(0x304)][_0x2dcd65(0x1b6)](_0x459ed0);}['addImageSourceCache'](_0x1979f6,_0x340203,_0x1ccc4f){const _0x42cdeb=_0x5eca20;_0x340203===g[_0x42cdeb(0x1ba)][_0x42cdeb(0x412)]||_0x1ccc4f==null||this[_0x42cdeb(0x304)][_0x42cdeb(0x28e)](_0x1979f6,_0x1ccc4f);}async[_0x5eca20(0x3a5)](_0x1bb325){const _0x133765=_0x5eca20;try{let _0x1a2932=this[_0x133765(0x345)](this['_getSignURL'](),''+_0x1bb325),_0x1b17ea=(await this[_0x133765(0x172)]['get'](_0x1a2932))[_0x133765(0x275)];if(_0x1b17ea[_0x133765(0x2dc)]&&_0x1b17ea['error']['code']===p[_0x133765(0x363)]['OK']){let _0x201be3=(0x0,l['resolveWithBasePath'])(_0x1b17ea[_0x133765(0x42e)],this[_0x133765(0x1f6)]());return Promise[_0x133765(0x186)](_0x201be3);}return Promise[_0x133765(0x166)](_0x1b17ea[_0x133765(0x2dc)]);}catch(_0x1a7812){return Promise[_0x133765(0x166)](_0x1a7812);}}async[_0x5eca20(0x234)](_0x23d8ca){const _0x3b7211=_0x5eca20;let _0x526ba0='';if(!Ve[_0x3b7211(0x39b)](_0x23d8ca['type']))return this['_decreaseWaiting'](),Promise[_0x3b7211(0x166)](Error(g[_0x3b7211(0x291)][_0x3b7211(0x33d)]));if(_0x23d8ca[_0x3b7211(0x22b)]>0x500000)return this['_decreaseWaiting'](),Promise[_0x3b7211(0x166)](Error(g[_0x3b7211(0x291)]['ERROR_EXCEED_SIZE']));try{let _0x481ed3=new FormData();_0x481ed3[_0x3b7211(0x182)](_0x3b7211(0x187),_0x23d8ca);let _0x2977c0=this['_univerInstanceService'][_0x3b7211(0x1f4)](),_0x530731=_0x2977c0==null?void 0x0:_0x2977c0[_0x3b7211(0x397)]();if(!_0x530731)throw Error(_0x3b7211(0x311));let _0x381dde=this['_getUploadFileURL']()+'?size='+_0x23d8ca[_0x3b7211(0x22b)]['toString']()+_0x3b7211(0x1d1)+p['FileSource'][_0x3b7211(0x41b)]+'&assign='+encodeURIComponent(_0x530731),_0x2344c0={'body':_0x481ed3},_0x17689a=(await this[_0x3b7211(0x172)]['post'](_0x381dde,_0x2344c0))['body'];if(typeof _0x17689a[_0x3b7211(0x27a)]!=_0x3b7211(0x358))return this['_decreaseWaiting'](),Promise[_0x3b7211(0x166)](Error(g[_0x3b7211(0x291)]['ERROR_IMAGE']));_0x526ba0=_0x17689a[_0x3b7211(0x27a)];}catch{return this[_0x3b7211(0x1d9)](),Promise['reject'](Error(g[_0x3b7211(0x291)][_0x3b7211(0x305)]));}return new Promise((_0x46374c,_0x15f14d)=>{const _0xdd73f5=_0x3b7211;let _0x100b52=new FileReader();_0x100b52[_0xdd73f5(0x190)](_0x23d8ca),_0x100b52[_0xdd73f5(0x3c1)]=_0x2af792=>{const _0x8a706e=_0xdd73f5;var _0xf903c4;let _0x2bc2e7=(_0xf903c4=_0x2af792['target'])==null?void 0x0:_0xf903c4['result'];if(_0x2bc2e7==null){this[_0x8a706e(0x1d9)](),_0x15f14d(Error(g[_0x8a706e(0x291)][_0x8a706e(0x305)]));return;}_0x46374c({'imageId':(0x0,l['generateRandomId'])(0x6),'imageSourceType':g['ImageSourceType']['UUID'],'source':_0x526ba0,'base64Cache':_0x2bc2e7,'status':g[_0x8a706e(0x291)][_0x8a706e(0x441)]}),this[_0x8a706e(0x1d9)]();};});}[_0x5eca20(0x265)](){const _0x2b8375=_0x5eca20;var _0x553f5b;let _0x5b9c99=this[_0x2b8375(0x1e7)][_0x2b8375(0x278)](A);return(_0x553f5b=_0x5b9c99==null?void 0x0:_0x5b9c99[_0x2b8375(0x1f1)])==null?_0x2b8375(0x208):_0x553f5b;}[_0x5eca20(0x325)](){const _0x37f3d9=_0x5eca20;var _0x2c3f95;let _0x28a423=this[_0x37f3d9(0x1e7)]['getConfig'](A);return(_0x2c3f95=_0x28a423==null?void 0x0:_0x28a423['signUrlServerUrl'])==null?_0x37f3d9(0x40d):_0x2c3f95;}[_0x5eca20(0x1f6)](){const _0x215870=_0x5eca20;var _0xf6185e;let _0x10060f=this[_0x215870(0x1e7)]['getConfig'](A);return(_0xf6185e=_0x10060f==null?void 0x0:_0x10060f[_0x215870(0x1f0)])==null?location[_0x215870(0x2c7)]:_0xf6185e;}[_0x5eca20(0x345)](_0x48bda0,_0x2d4fd8){return _0x48bda0['replace']('{fileID}',_0x2d4fd8);}[_0x5eca20(0x1d9)](){const _0x18f81a=_0x5eca20;--this[_0x18f81a(0x2aa)],this[_0x18f81a(0x2d4)][_0x18f81a(0x1d2)](this[_0x18f81a(0x2aa)]);}};Y=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(h[_0x5eca20(0x22e)])),S(0x1,l['IConfigService']),S(0x2,(0x0,l['Inject'])(l['IUniverInstanceService']))],Y);let X=class{constructor(_0x1098ff,_0x7b400d){const _0x3ae215=_0x5eca20;this[_0x3ae215(0x1e7)]=_0x1098ff,this['_HTTPService']=_0x7b400d;}[_0x5eca20(0x2e9)](){const _0x1c6d35=_0x5eca20;var _0x2d802b;let _0x6a8fb8=this['_configService']['getConfig'](A);return(_0x2d802b=_0x6a8fb8==null?void 0x0:_0x6a8fb8[_0x1c6d35(0x2cf)])==null?'/universer-api/authz':_0x2d802b;}async['list'](_0x47fb19){const _0x46a96f=_0x5eca20;let _0x63aa7c=this[_0x46a96f(0x2e9)]()+_0x46a96f(0x3f1);return{'list':[{'title':_0x46a96f(0x1f5),'mentions':(await this[_0x46a96f(0x1cd)][_0x46a96f(0x1b6)](_0x63aa7c,{'params':{'objectID':_0x47fb19['unitId'],'unitID':_0x47fb19['unitId']}}))[_0x46a96f(0x275)][_0x46a96f(0x3e0)][_0x46a96f(0x29e)](_0x19e723=>({'objectId':_0x19e723['id'],'name':_0x19e723[_0x46a96f(0x1b5)][_0x46a96f(0x1ac)],'metadata':{'icon':_0x19e723[_0x46a96f(0x1b5)][_0x46a96f(0x2cc)]},'label':_0x19e723[_0x46a96f(0x1b5)][_0x46a96f(0x1ac)],'objectType':l[_0x46a96f(0x24f)][_0x46a96f(0x2fc)]})),'metadata':{},'type':l['MentionType']['PERSON']}]};}};X=C([S(0x0,(0x0,l['Inject'])(l[_0x5eca20(0x195)])),S(0x1,(0x0,l['Inject'])(h['HTTPService']))],X);let He=class extends l[_0x5eca20(0x3fc)]{constructor(_0x35e0b8,_0x450c35,_0x53a1ad,_0x5eaa7a,_0x479efa){const _0x54addc=_0x5eca20;super(),this[_0x54addc(0x161)]=_0x35e0b8,this[_0x54addc(0x27e)]=_0x450c35,this['_permissionService']=_0x53a1ad,this[_0x54addc(0x15f)]=_0x5eaa7a,this[_0x54addc(0x298)]=_0x479efa,this[_0x54addc(0x425)](),this[_0x54addc(0x2a2)]();}[_0x5eca20(0x2a2)](){const _0x6db79d=_0x5eca20;let _0x3fda48=async _0x55a1f7=>{const _0x735729=_0x2e22;(await this[_0x735729(0x15f)][_0x735729(0x27d)](_0x55a1f7))[_0x735729(0x218)]['pipe']((0x0,m['filter'])(_0x17714c=>_0x17714c['eventID']===c[_0x735729(0x33c)]['SHOULD_CLOSE_CONN']),(0x0,m[_0x735729(0x1c5)])(this['dispose$']))['subscribe'](_0x13dddf=>{const _0x432a67=_0x735729;let {reason:_0x5d7a26}=_0x13dddf[_0x432a67(0x193)];this['_collaborationUIEventService'][_0x432a67(0x3d0)]({'id':b[_0x432a67(0x24a)],'data':_0x5d7a26}),this[_0x432a67(0x3cc)][_0x432a67(0x302)](new d[(_0x432a67(0x1b9))](_0x55a1f7)['id'],!0x1),this[_0x432a67(0x15f)][_0x432a67(0x1bf)](_0x55a1f7);});};(0x0,f['merge'])(this[_0x6db79d(0x27e)][_0x6db79d(0x255)](l['UniverInstanceType']['UNIVER_SHEET']),this[_0x6db79d(0x27e)]['getTypeOfUnitAdded$'](l[_0x6db79d(0x2f6)]['UNIVER_DOC']))[_0x6db79d(0x1b4)]((0x0,m[_0x6db79d(0x29e)])(_0x1ccfb7=>_0x1ccfb7['getUnitId']()),(0x0,m[_0x6db79d(0x1b1)])(_0x2e08bd=>!(0x0,l[_0x6db79d(0x256)])(_0x2e08bd)),(0x0,m[_0x6db79d(0x1c5)])(this['dispose$']))[_0x6db79d(0x439)](_0x3aa93c=>{_0x3fda48(_0x3aa93c);});}[_0x5eca20(0x425)](){const _0x20de8c=_0x5eca20;let _0x20deb0=async _0x5afebf=>{const _0x1ccb2d=_0x2e22;let _0x425d24=await this[_0x1ccb2d(0x15f)][_0x1ccb2d(0x27d)](_0x5afebf),_0x34ab50=this[_0x1ccb2d(0x161)][_0x1ccb2d(0x1b6)](d[_0x1ccb2d(0x1e0)]);_0x425d24['event$']['pipe']((0x0,m[_0x1ccb2d(0x1b1)])(_0x2f35da=>_0x2f35da['eventID']===c[_0x1ccb2d(0x33c)]['UPDATE_PERMISSION_OBJ']),(0x0,m[_0x1ccb2d(0x1c5)])(this[_0x1ccb2d(0x2fb)]))[_0x1ccb2d(0x439)](_0x3b7f0d=>{const _0x575c6b=_0x1ccb2d;let {objectId:_0x3540a5}=_0x3b7f0d[_0x575c6b(0x193)];_0x3540a5===_0x5afebf?_0x34ab50[_0x575c6b(0x209)](_0x5afebf):_0x34ab50[_0x575c6b(0x431)](_0x5afebf,_0x3540a5);});};(0x0,f[_0x20de8c(0x290)])(this['_univerInstanceService']['getTypeOfUnitAdded$'](l['UniverInstanceType'][_0x20de8c(0x416)]))[_0x20de8c(0x1b4)]((0x0,m[_0x20de8c(0x29e)])(_0x472258=>_0x472258[_0x20de8c(0x397)]()),(0x0,m[_0x20de8c(0x1b1)])(_0x13077c=>!(0x0,l[_0x20de8c(0x256)])(_0x13077c)),(0x0,m['takeUntil'])(this[_0x20de8c(0x2fb)]))[_0x20de8c(0x439)](_0x1fefa8=>{_0x20deb0(_0x1fefa8);});}};He=C([S(0x0,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x1,l['IUniverInstanceService']),S(0x2,l[_0x5eca20(0x239)]),S(0x3,(0x0,l[_0x5eca20(0x3fa)])(U)),S(0x4,(0x0,l[_0x5eca20(0x3fa)])(x))],He);let Z=class{constructor(_0x353c3f,_0x58d5e7){const _0x49ccdc=_0x5eca20;this[_0x49ccdc(0x1e7)]=_0x353c3f,this[_0x49ccdc(0x172)]=_0x58d5e7;}async['getUnitOnRev'](_0x2b5565,_0x18cc56){const _0xcfdb73=_0x5eca20;var _0x3eb5dd;let {unitID:_0xcc66ab,type:_0x43d6a8,revision:_0x418d1d=0x0}=_0x18cc56,_0x3c0e0e=this['getSnapshotAPIPath']()+'/'+_0x43d6a8+_0xcfdb73(0x2b6)+_0xcc66ab+'/rev/'+_0x418d1d,_0x3871e2=(await this[_0xcfdb73(0x172)][_0xcfdb73(0x1b6)](_0x3c0e0e))['body'],_0xd4e39c=(_0x3eb5dd=_0x3871e2[_0xcfdb73(0x30a)])==null?void 0x0:_0x3eb5dd[_0xcfdb73(0x2b3)];if(_0xd4e39c){let _0x57290a=_0xd4e39c==null?void 0x0:_0xd4e39c[_0xcfdb73(0x202)];_0xd4e39c[_0xcfdb73(0x202)]=c['textEncoder'][_0xcfdb73(0x32e)]((0x0,c[_0xcfdb73(0x1c2)])(_0x57290a)),Object[_0xcfdb73(0x34c)](_0xd4e39c[_0xcfdb73(0x18e)])[_0xcfdb73(0x248)](([,_0x5e68a8])=>{const _0x50690b=_0xcfdb73;let _0x273f08=_0x5e68a8[_0x50690b(0x202)];_0x5e68a8['originalMeta']=c[_0x50690b(0x25e)][_0x50690b(0x32e)]((0x0,c[_0x50690b(0x1c2)])(_0x273f08));});}return _0x3871e2;}async[_0x5eca20(0x2fe)](_0x3d11c2,_0xed9874){const _0x28106e=_0x5eca20;let {unitID:_0x46b5e8,type:_0x5e472b,blockID:_0x493085}=_0xed9874,_0x1e0240=this['_getAPIPrefix']()+'/'+_0x5e472b+_0x28106e(0x2b6)+_0x46b5e8+'/block/'+_0x493085;return(await this[_0x28106e(0x172)][_0x28106e(0x1b6)](_0x1e0240))[_0x28106e(0x275)];}async[_0x5eca20(0x1a3)](_0x31ced3,_0x1e57df){const _0x231a50=_0x5eca20;let {unitID:_0x1fe68a,type:_0x4a1673,blockID:_0x3dd7bd}=_0x1e57df,_0x9083d1=this[_0x231a50(0x39e)]()+_0x231a50(0x299)+_0x4a1673+'/unit/'+_0x1fe68a+_0x231a50(0x299)+_0x3dd7bd;return(await this['_httpService'][_0x231a50(0x1b6)](_0x9083d1))[_0x231a50(0x275)];}async[_0x5eca20(0x3b6)](_0xe7d5ea,_0x18b7a4){const _0x5cd81d=_0x5eca20;let {unitID:_0x33a498,type:_0xd63864,from:_0x120f0,to:_0x4e2871}=_0x18b7a4,_0x559f97=this['_getAPIPrefix']()+'/'+_0xd63864+'/unit/'+_0x33a498+_0x5cd81d(0x221)+_0x120f0+_0x5cd81d(0x37f)+_0x4e2871;return(await this[_0x5cd81d(0x172)][_0x5cd81d(0x1b6)](_0x559f97))[_0x5cd81d(0x275)];}[_0x5eca20(0x31b)](){const _0x327493=_0x5eca20;var _0x1e426d;return(_0x1e426d=this[_0x327493(0x1e7)][_0x327493(0x278)](_0x327493(0x312)))==null?this[_0x327493(0x39e)]():_0x1e426d;}['_getAPIPrefix'](){const _0x56878d=_0x5eca20;var _0x43c7ea;let _0x22d46a=this[_0x56878d(0x1e7)][_0x56878d(0x278)](A);return(_0x43c7ea=_0x22d46a==null?void 0x0:_0x22d46a[_0x56878d(0x3d7)])==null?_0x56878d(0x1e9):_0x43c7ea;}async[_0x5eca20(0x3f3)](_0x5ada6c,_0x5eb54c){const _0x524225=_0x5eca20;let _0x5a757=_0x524225(0x232)+_0x5eb54c[_0x524225(0x402)]+'/unit/'+_0x5eb54c[_0x524225(0x42a)]+_0x524225(0x17b);return(await this[_0x524225(0x172)][_0x524225(0x1b6)](_0x5a757,{'params':{'resourceId':JSON[_0x524225(0x350)](_0x5eb54c[_0x524225(0x21f)])}}))[_0x524225(0x275)];}['saveSnapshot'](){const _0x437f40=_0x5eca20;throw Error(_0x437f40(0x1e5));}[_0x5eca20(0x41e)](){const _0x3f865b=_0x5eca20;throw Error(_0x3f865b(0x1e5));}['saveSheetBlock'](){const _0x355dce=_0x5eca20;throw Error(_0x355dce(0x1e5));}[_0x5eca20(0x33f)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x5eca20(0x292)](){const _0x3ca12=_0x5eca20;throw Error(_0x3ca12(0x1e5));}[_0x5eca20(0x173)](){const _0x5de0a5=_0x5eca20;throw Error(_0x5de0a5(0x1e5));}};Z=C([S(0x0,l[_0x5eca20(0x195)]),S(0x1,(0x0,l[_0x5eca20(0x3fa)])(h[_0x5eca20(0x22e)]))],Z);let Q=class extends l['LocalUndoRedoService']{constructor(_0x474483,_0x25f9a1,_0x177c9e,_0xea8e36,_0x1d1c54){const _0x39ac26=_0x5eca20;super(_0x474483,_0x25f9a1,_0x177c9e),this[_0x39ac26(0x1f9)]=_0xea8e36,this[_0x39ac26(0x429)]=_0x1d1c54;}[_0x5eca20(0x2ce)](_0x158724,_0x8c4d54){const _0x135761=_0x5eca20;let _0x4d478a=this[_0x135761(0x263)](_0x158724);if(_0x4d478a)try{let _0x22491d=this[_0x135761(0x2af)](_0x4d478a,_0x8c4d54);this['_substituteUndoStack'](_0x158724,_0x22491d);}catch(_0x5af3ec){this[_0x135761(0x429)][_0x135761(0x2dc)](_0x135761(0x3b4),_0x5af3ec),this[_0x135761(0x3bf)](_0x158724);}let _0x32af4a=this[_0x135761(0x338)](_0x158724);if(_0x32af4a)try{let _0x4f931f=this[_0x135761(0x2af)](_0x32af4a,_0x8c4d54);this[_0x135761(0x2d2)](_0x158724,_0x4f931f);}catch(_0x457aab){this[_0x135761(0x429)][_0x135761(0x2dc)](_0x457aab),this['_clearRedo'](_0x158724);}}[_0x5eca20(0x3bf)](_0x1ec731){const _0xd7301f=_0x5eca20;let _0x35ec3e=this[_0xd7301f(0x263)](_0x1ec731);_0x35ec3e&&(_0x35ec3e['length']=0x0,this[_0xd7301f(0x370)]());}[_0x5eca20(0x17c)](_0x45dc1d){let _0x51e2b3=this['_getRedoStack'](_0x45dc1d);_0x51e2b3&&(_0x51e2b3['length']=0x0,this['_updateStatus']());}[_0x5eca20(0x3b1)](_0x354cc5,_0x3e5aba){const _0x5c9e5d=_0x5eca20;this[_0x5c9e5d(0x3c0)][_0x5c9e5d(0x28e)](_0x354cc5,_0x3e5aba),this[_0x5c9e5d(0x370)]();}['_substituteRedoStack'](_0x5e107e,_0xfa7518){const _0x3fd6fb=_0x5eca20;this[_0x3fd6fb(0x25b)][_0x3fd6fb(0x28e)](_0x5e107e,_0xfa7518),this[_0x3fd6fb(0x370)]();}['_transformStack'](_0x530e21,_0x132762){const _0x150f3c=_0x5eca20;let _0x2be795=[],_0x20eb75=_0x132762,_0x18cdb6=_0x132762;for(let _0x502375=_0x530e21[_0x150f3c(0x373)]-0x1;_0x502375>=0x0;_0x502375--){let {unitID:_0x2c3285,undoMutations:_0x4074d6,redoMutations:_0x5d4ea6}=_0x530e21[_0x502375],_0x7903c1=this[_0x150f3c(0x1f9)][_0x150f3c(0x38a)](_0x20eb75,_0x4074d6),_0x65c678=this[_0x150f3c(0x1f9)][_0x150f3c(0x38a)](_0x18cdb6,_0x5d4ea6);if((0x0,c[_0x150f3c(0x160)])(_0x7903c1)||(0x0,c[_0x150f3c(0x160)])(_0x65c678)){this['_logService']['error']('[CollaborationUndoRedoService]',_0x150f3c(0x2a9),_0x7903c1,_0x65c678);break;}_0x20eb75=_0x7903c1[_0x150f3c(0x1de)],_0x18cdb6=_0x65c678[_0x150f3c(0x1de)],_0x2be795[_0x150f3c(0x194)]({'unitID':_0x2c3285,'undoMutations':_0x7903c1[_0x150f3c(0x25d)],'redoMutations':_0x65c678[_0x150f3c(0x25d)]});}return _0x2be795[_0x150f3c(0x2be)]();}};Q=C([S(0x0,l['IUniverInstanceService']),S(0x1,l[_0x5eca20(0x2f0)]),S(0x2,l[_0x5eca20(0x19c)]),S(0x3,c['ITransformService']),S(0x4,l[_0x5eca20(0x3a3)])],Q);let $=class extends l[_0x5eca20(0x1a6)]{constructor(_0x2942f3={},_0x47afcc,_0x2148bb,_0x31a023){const _0x1362bb=_0x5eca20;super(),this[_0x1362bb(0x27b)]=_0x2942f3,this[_0x1362bb(0x429)]=_0x47afcc,this[_0x1362bb(0x161)]=_0x2148bb,this[_0x1362bb(0x1e7)]=_0x31a023;let {..._0x29359a}=(0x0,l[_0x1362bb(0x290)])({},_e,_0x2942f3);if(!_0x29359a[_0x1362bb(0x2ff)])throw Error(_0x1362bb(0x23f));this[_0x1362bb(0x27b)]=_0x29359a,this[_0x1362bb(0x1e7)][_0x1362bb(0x41d)](A,_0x29359a);}[_0x5eca20(0x374)](){const _0xb924c7=_0x5eca20;this['_registerDependencies'](),this[_0xb924c7(0x19d)]();}[_0x5eca20(0x176)](){const _0x1d7098=_0x5eca20;var _0x175a66,_0x353ba1;this[_0x1d7098(0x161)]['has'](l[_0x1d7098(0x19e)])&&this[_0x1d7098(0x429)]['error'](_0x1d7098(0x32c),_0x1d7098(0x409));let _0x4e353f=(0x0,l['mergeOverrideWithDependencies'])([[l[_0x1d7098(0x19e)],{'useClass':Q}],[U],[w],[O],[G],[q],[de],[He],[x],[J],[Me,{'useClass':this[_0x1d7098(0x27b)][_0x1d7098(0x2ff)]}],[c[_0x1d7098(0x2c2)],{'useClass':Z}],[l[_0x1d7098(0x294)],{'useClass':K}],[g[_0x1d7098(0x331)],{'useClass':Y}],[l['IMentionIOService'],{'useClass':X}],[W],[Le]],(_0x175a66=this[_0x1d7098(0x27b)])==null?void 0x0:_0x175a66[_0x1d7098(0x35e)]);if(!((_0x353ba1=this[_0x1d7098(0x27b)])!=null&&_0x353ba1[_0x1d7098(0x1a0)])){let _0x110cad=_0x4e353f['findIndex'](([_0x49255b])=>_0x49255b===k);_0x110cad!==-0x1&&_0x4e353f[_0x1d7098(0x371)](_0x110cad,0x1);}(0x0,l[_0x1d7098(0x28f)])(this[_0x1d7098(0x161)],_0x4e353f);}[_0x5eca20(0x19d)](){const _0x29b870=_0x5eca20;var _0x334557,_0x4798a9;if(this['_injector'][_0x29b870(0x1b6)](h['HTTPService'])[_0x29b870(0x2c1)]({'priority':0x14,'interceptor':(0x0,h[_0x29b870(0x352)])({'maxParallel':0x6})}),!((_0x334557=this[_0x29b870(0x27b)])!=null&&_0x334557['enableOfflineEditing'])){var _0xd78c1b;(_0xd78c1b=this['_injector'][_0x29b870(0x1b6)](D,l[_0x29b870(0x1bb)][_0x29b870(0x2ae)]))==null||_0xd78c1b['disableLocalCache']();}(_0x4798a9=this[_0x29b870(0x27b)])!=null&&_0x4798a9[_0x29b870(0x3cb)]&&(0x0,l['touchDependencies'])(this['_injector'],[[G]]),(0x0,l[_0x29b870(0x23d)])(this[_0x29b870(0x161)],[[q],[W],[He]]);}};y($,_0x5eca20(0x3d2),_0x5eca20(0x3e9)),y($,_0x5eca20(0x353),Fe),y($,'version',Ie),$=C([(0x0,l[_0x5eca20(0x2e7)])(te['UniverLicensePlugin'],c[_0x5eca20(0x200)],h[_0x5eca20(0x1d4)]),S(0x1,l[_0x5eca20(0x3a3)]),S(0x2,(0x0,l[_0x5eca20(0x3fa)])(l[_0x5eca20(0x177)])),S(0x3,l[_0x5eca20(0x195)])],$),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x269),{'enumerable':!0x0,'get':function(){return K;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x3f2),{'enumerable':!0x0,'get':function(){return F;}}),Object['defineProperty'](exports,_0x5eca20(0x440),{'enumerable':!0x0,'get':function(){return I;}}),exports[_0x5eca20(0x1ef)]=A,Object['defineProperty'](exports,_0x5eca20(0x25f),{'enumerable':!0x0,'get':function(){return W;}}),Object['defineProperty'](exports,_0x5eca20(0x198),{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x2b2),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x262),{'enumerable':!0x0,'get':function(){return E;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x240),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x369),{'enumerable':!0x0,'get':function(){return Pe;}}),exports[_0x5eca20(0x168)]=j,exports['CollaborationUIEventId']=b,exports[_0x5eca20(0x323)]=x,Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x328),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x5eca20(0x283)]=de,Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x423),{'enumerable':!0x0,'get':function(){return L;}}),exports[_0x5eca20(0x341)]=oe,exports['DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT']='/universer-api/uniscript',exports[_0x5eca20(0x222)]='/universer-api/user/session-ticket',Object['defineProperty'](exports,_0x5eca20(0x36a),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x32a),{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x390),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x5eca20(0x317)]=_0x5eca20(0x1aa),exports[_0x5eca20(0x169)]=_0x5eca20(0x1fa),exports[_0x5eca20(0x329)]=Me,exports[_0x5eca20(0x28d)]=D,exports['INetworkConditionService']=ke,exports['ISingleActiveUnitService']=k,exports[_0x5eca20(0x295)]=0x3e8,exports[_0x5eca20(0x3e3)]='LOCAL_CACHE_INTERVAL',Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x42d),{'enumerable':!0x0,'get':function(){return w;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x23b),{'enumerable':!0x0,'get':function(){return X;}}),Object['defineProperty'](exports,_0x5eca20(0x286),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x436),{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x5eca20(0x3f4)]='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',exports['RETRY_CONNECTING_MAX_COUNT_KEY']=_0x5eca20(0x254),exports[_0x5eca20(0x1ab)]=T,Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x1c3),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x320),{'enumerable':!0x0,'get':function(){return O;}}),Object['defineProperty'](exports,'SnapshotServerOverHTTPService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x355),{'enumerable':!0x0,'get':function(){return N;}}),exports['UnitStatus']=ge,Object[_0x5eca20(0x29a)](exports,_0x5eca20(0x3ee),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x5eca20(0x1fe)]=Ae,exports[_0x5eca20(0x1fb)]=me,exports[_0x5eca20(0x414)]=je;
|
|
1
|
+
const _0x35406f=_0x4d20;(function(_0x533e1f,_0x48f3ef){const _0x24995e=_0x4d20,_0x3f9b74=_0x533e1f();while(!![]){try{const _0x4b312a=parseInt(_0x24995e(0x102))/0x1*(parseInt(_0x24995e(0x290))/0x2)+parseInt(_0x24995e(0x282))/0x3+-parseInt(_0x24995e(0x38e))/0x4+parseInt(_0x24995e(0x3bb))/0x5+-parseInt(_0x24995e(0x289))/0x6+-parseInt(_0x24995e(0x2a5))/0x7+-parseInt(_0x24995e(0x2eb))/0x8;if(_0x4b312a===_0x48f3ef)break;else _0x3f9b74['push'](_0x3f9b74['shift']());}catch(_0x39ef3b){_0x3f9b74['push'](_0x3f9b74['shift']());}}}(_0x2fc4,0x5b2c2),Object[_0x35406f(0x105)](exports,Symbol[_0x35406f(0x11d)],{'value':'Module'}));let _univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_core=require('@univerjs/core'),_univerjs_docs=require('@univerjs/docs'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),_univerjs_protocol=require('@univerjs/protocol'),_univerjs_telemetry=require('@univerjs/telemetry'),rxjs_operators=require('rxjs/operators'),_univerjs_network=require('@univerjs/network'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing'),_noble_ciphers_aes_js=require('@noble/ciphers/aes.js'),_noble_ciphers_utils_js=require('@noble/ciphers/utils.js');const DEFAULT_SNAPSHOT_SERVER_URL='/universer-api/snapshot',SNAPSHOT_URL_KEY=_0x35406f(0x1d1),DEFAULT_SEND_CHANGESET_TIMEOUT=0x7d0,DEFAULT_COLLAB_WEB_SOCKET_URL='ws://127.0.0.1:8000/universer-api/comb/connect',DEFAULT_WS_SESSION_TICKET_URL=_0x35406f(0x315),HEARTBEAT_INTERVAL_KEY='HEARTBEAT_INTERVAL',DEFAULT_HEARTBEAT_INTERVAL=0x7530,HEARTBEAT_TIMEOUT_KEY='HEARTBEAT_TIMEOUT',DEFAULT_HEARTBEAT_TIMEOUT=0x4e20,DEFAULT_RETRY_CONNECTING_INTERVAL=0x4e20,RETRY_CONNECTING_MAX_COUNT_KEY=_0x35406f(0x38d),LOCAL_CACHE_INTERVAL_KEY=_0x35406f(0x366),LOCAL_CACHE_INTERVAL=0x3e8,DEFAULT_COLLAB_SUBMIT_CHANGESET_URL='/universer-api/comb',DEFAULT_LOGIN_URL=_0x35406f(0x2f6),REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY=_0x35406f(0x3c2),DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT=_0x35406f(0x214),TELEMETRY_COLLABORATION_NEW_CHANGESET=_0x35406f(0x160);function summaryChangesetSize(_0x164571){const _0x29d8f0=_0x35406f;return JSON[_0x29d8f0(0x2db)](_0x164571)[_0x29d8f0(0x332)];}function _typeof(_0x3312cf){'@babel/helpers - typeof';const _0x25306c=_0x35406f;return _typeof=_0x25306c(0x244)==typeof Symbol&&_0x25306c(0x116)==typeof Symbol['iterator']?function(_0xbb61dd){return typeof _0xbb61dd;}:function(_0x3b59bb){const _0x470b1c=_0x25306c;return _0x3b59bb&&_0x470b1c(0x244)==typeof Symbol&&_0x3b59bb[_0x470b1c(0x176)]===Symbol&&_0x3b59bb!==Symbol[_0x470b1c(0x1ee)]?'symbol':typeof _0x3b59bb;},_typeof(_0x3312cf);}function toPrimitive(_0x26f97b,_0x13851c){const _0x4eb69f=_0x35406f;if(_0x4eb69f(0x1fa)!=_typeof(_0x26f97b)||!_0x26f97b)return _0x26f97b;var _0x3b147b=_0x26f97b[Symbol[_0x4eb69f(0x304)]];if(void 0x0!==_0x3b147b){var _0x2b741b=_0x3b147b[_0x4eb69f(0x374)](_0x26f97b,_0x13851c||_0x4eb69f(0x17c));if(_0x4eb69f(0x1fa)!=_typeof(_0x2b741b))return _0x2b741b;throw new TypeError(_0x4eb69f(0x305));}return(_0x4eb69f(0x37d)===_0x13851c?String:Number)(_0x26f97b);}function toPropertyKey(_0xef7948){const _0x512e22=_0x35406f;var _0x4ced4d=toPrimitive(_0xef7948,_0x512e22(0x37d));return'symbol'==_typeof(_0x4ced4d)?_0x4ced4d:_0x4ced4d+'';}function _defineProperty(_0x68f084,_0x1916dc,_0x4c4586){const _0x44cf4a=_0x35406f;return(_0x1916dc=toPropertyKey(_0x1916dc))in _0x68f084?Object[_0x44cf4a(0x105)](_0x68f084,_0x1916dc,{'value':_0x4c4586,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x68f084[_0x1916dc]=_0x4c4586,_0x68f084;}let CollaborationUIEventId=function(_0x33c7b1){const _0x5aed1f=_0x35406f;return _0x33c7b1['OTHER_CLIENT_EDITING']='OTHER_CLIENT_EDITING',_0x33c7b1[_0x5aed1f(0x231)]=_0x5aed1f(0x231),_0x33c7b1['CONFLICT']=_0x5aed1f(0x111),_0x33c7b1[_0x5aed1f(0x248)]='CLOSE_ROOM',_0x33c7b1[_0x5aed1f(0x120)]=_0x5aed1f(0x120),_0x33c7b1[_0x5aed1f(0x377)]='SOCKET_FAILED_RETRY',_0x33c7b1[_0x5aed1f(0x240)]=_0x5aed1f(0x240),_0x33c7b1['SUBMIT_CHANGESET_TIMEOUT']='SUBMIT_CHANGESET_TIMEOUT',_0x33c7b1;}({});var CollaborationUIEventService=class{constructor(){const _0x2c2960=_0x35406f;_defineProperty(this,_0x2c2960(0x39d),new rxjs['Subject']()),_defineProperty(this,_0x2c2960(0x195),this[_0x2c2960(0x39d)][_0x2c2960(0x25c)]());}[_0x35406f(0x190)](_0x81c6c9){const _0x25b4f5=_0x35406f;this[_0x25b4f5(0x39d)][_0x25b4f5(0x2b4)](_0x81c6c9);}},CommentService=class{constructor(){const _0x2b9b08=_0x35406f;_defineProperty(this,_0x2b9b08(0x2dc),new rxjs[(_0x2b9b08(0x2bc))]()),_defineProperty(this,_0x2b9b08(0x2d1),this[_0x2b9b08(0x2dc)]['asObservable']());}['onCommentUpdate'](_0x210274){const _0x59c264=_0x35406f;this[_0x59c264(0x2dc)][_0x59c264(0x2b4)](_0x210274);}};function __decorateParam(_0x479884,_0x49f67c){return function(_0x308562,_0x33e7d0){_0x49f67c(_0x308562,_0x33e7d0,_0x479884);};}function __decorate(_0x1c1001,_0x494f42,_0x182efd,_0x57b81a){const _0x4e5ac8=_0x35406f;var _0x46df35=arguments[_0x4e5ac8(0x332)],_0x547f48=_0x46df35<0x3?_0x494f42:_0x57b81a===null?_0x57b81a=Object[_0x4e5ac8(0x1bd)](_0x494f42,_0x182efd):_0x57b81a,_0x335d5c;if(typeof Reflect==='object'&&typeof Reflect[_0x4e5ac8(0x3b6)]===_0x4e5ac8(0x244))_0x547f48=Reflect[_0x4e5ac8(0x3b6)](_0x1c1001,_0x494f42,_0x182efd,_0x57b81a);else{for(var _0x1dbf77=_0x1c1001['length']-0x1;_0x1dbf77>=0x0;_0x1dbf77--)if(_0x335d5c=_0x1c1001[_0x1dbf77])_0x547f48=(_0x46df35<0x3?_0x335d5c(_0x547f48):_0x46df35>0x3?_0x335d5c(_0x494f42,_0x182efd,_0x547f48):_0x335d5c(_0x494f42,_0x182efd))||_0x547f48;}return _0x46df35>0x3&&_0x547f48&&Object[_0x4e5ac8(0x105)](_0x494f42,_0x182efd,_0x547f48),_0x547f48;}let MemberService=class MemberService extends _univerjs_core[_0x35406f(0x163)]{constructor(_0x45c3e7,_0x3ce876){const _0x2589d8=_0x35406f;super(),this[_0x2589d8(0x3a3)]=_0x45c3e7,this[_0x2589d8(0x174)]=_0x3ce876,_defineProperty(this,'_roomMembers',new Map()),_defineProperty(this,_0x2589d8(0x180),new rxjs[(_0x2589d8(0x2bc))]()),this[_0x2589d8(0x367)]((0x0,rxjs['merge'])(this[_0x2589d8(0x3a3)][_0x2589d8(0x1e8)](_univerjs_core[_0x2589d8(0x3b4)][_0x2589d8(0x307)])[_0x2589d8(0x38a)]((0x0,rxjs_operators[_0x2589d8(0x173)])(_0x3afc34=>_0x3afc34[_0x2589d8(0x1bf)]())),this['_univerInstanceService'][_0x2589d8(0x1e8)](_univerjs_core[_0x2589d8(0x3b4)][_0x2589d8(0x319)])[_0x2589d8(0x38a)]((0x0,rxjs_operators[_0x2589d8(0x173)])(_0x413758=>_0x413758[_0x2589d8(0x1bf)]())))[_0x2589d8(0x2b5)](_0x2ac363=>this[_0x2589d8(0x142)](_0x2ac363)));}[_0x35406f(0x147)](_0x48a42e){const _0x32a5fa=_0x35406f;if(this[_0x32a5fa(0x23c)][_0x32a5fa(0x3d5)](_0x48a42e))return(0x0,rxjs['of'])(this['_roomMembers'][_0x32a5fa(0x2c5)](_0x48a42e));return this[_0x32a5fa(0x180)][_0x32a5fa(0x38a)]((0x0,rxjs_operators[_0x32a5fa(0x173)])(_0x4a68e9=>{const _0x58055f=_0x32a5fa;if(_0x4a68e9===_0x48a42e)return this[_0x58055f(0x23c)][_0x58055f(0x2c5)](_0x4a68e9);}));}['setCurrentUser'](_0xd473d5){const _0x29d69c=_0x35406f;this[_0x29d69c(0x174)][_0x29d69c(0xfe)](_0xd473d5);}[_0x35406f(0x2a8)](){const _0x1bbf7f=_0x35406f;return this[_0x1bbf7f(0x174)]['getCurrentUser']();}['updateMember'](_0x4f56f2,_0x53d8e1){const _0x3fa864=_0x35406f;let _0x59a3c4=this[_0x3fa864(0x23c)]['get'](_0x4f56f2);!_0x59a3c4&&(_0x59a3c4=new RoomMember(),this['_roomMembers']['set'](_0x4f56f2,_0x59a3c4),this[_0x3fa864(0x180)][_0x3fa864(0x2b4)](_0x4f56f2)),_0x59a3c4[_0x3fa864(0x31d)](_0x53d8e1);}[_0x35406f(0x21a)](_0x4ff175,_0x388fb5){const _0x57b670=_0x35406f,_0x195af7=this['_roomMembers'][_0x57b670(0x2c5)](_0x4ff175);if(_0x195af7)_0x195af7['removeMember'](_0x388fb5);}[_0x35406f(0x2d0)](_0x274bed){const _0x3c8b49=_0x35406f;return this['_roomMembers'][_0x3c8b49(0x2c5)](_0x274bed);}[_0x35406f(0x158)](_0x27efa0,_0x430d5c){const _0xb1f8b1=_0x35406f,_0x512cb6=this[_0xb1f8b1(0x23c)][_0xb1f8b1(0x2c5)](_0x27efa0);if(_0x512cb6)return _0x512cb6[_0xb1f8b1(0x158)](_0x430d5c);}[_0x35406f(0x142)](_0x50d1cd){const _0x51a2f9=_0x35406f,_0x4cb6d3=this['_roomMembers'][_0x51a2f9(0x2c5)](_0x50d1cd);_0x4cb6d3&&(_0x4cb6d3[_0x51a2f9(0x1db)](),this[_0x51a2f9(0x23c)][_0x51a2f9(0x202)](_0x50d1cd));}[_0x35406f(0x1db)](){const _0x3862f1=_0x35406f;this[_0x3862f1(0x23c)]['forEach'](_0x2d79ab=>_0x2d79ab[_0x3862f1(0x1db)]()),this['_roomMembers'][_0x3862f1(0x20f)](),this['_roomCreated$'][_0x3862f1(0x22c)]();}};MemberService=__decorate([__decorateParam(0x0,_univerjs_core['IUniverInstanceService']),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x1cb)]))],MemberService);var RoomMember=class extends _univerjs_core[_0x35406f(0x163)]{constructor(..._0x57a604){const _0x1f610b=_0x35406f;super(..._0x57a604),_defineProperty(this,_0x1f610b(0x363),new Map()),_defineProperty(this,_0x1f610b(0x376),new rxjs[(_0x1f610b(0x2a2))](this['_members'])),_defineProperty(this,'members$',this[_0x1f610b(0x376)]['asObservable']());}[_0x35406f(0x1db)](){const _0x4fd381=_0x35406f;this['_members'][_0x4fd381(0x20f)]();}[_0x35406f(0x31d)](_0x5e6722){const _0x3a701b=_0x35406f;this[_0x3a701b(0x363)]['set'](_0x5e6722[_0x3a701b(0x389)],_0x5e6722),this[_0x3a701b(0x197)]();}[_0x35406f(0x21a)](_0x212ac0){const _0xa54ce=_0x35406f;this[_0xa54ce(0x363)][_0xa54ce(0x202)](_0x212ac0);}[_0x35406f(0x158)](_0x41da67){const _0x345c02=_0x35406f;return this[_0x345c02(0x363)][_0x345c02(0x2c5)](_0x41da67);}[_0x35406f(0x1a0)](){const _0xadf036=_0x35406f;return Array['from'](this[_0xadf036(0x363)][_0xadf036(0x191)]());}[_0x35406f(0x197)](){const _0x132d8e=_0x35406f;this[_0x132d8e(0x376)][_0x132d8e(0x2b4)](this[_0x132d8e(0x363)]);}};let SessionStatus=function(_0x50c928){const _0x259c00=_0x35406f;return _0x50c928[_0x50c928[_0x259c00(0x15e)]=0x0]=_0x259c00(0x15e),_0x50c928[_0x50c928[_0x259c00(0x24e)]=0x1]=_0x259c00(0x24e),_0x50c928[_0x50c928['OFFLINE']=0x2]=_0x259c00(0x3af),_0x50c928[_0x50c928[_0x259c00(0x27c)]=0x3]='ONLINE',_0x50c928;}({});const FailedReason={[_univerjs_protocol[_0x35406f(0x360)][_0x35406f(0x277)]]:_0x35406f(0x133),[_univerjs_protocol[_0x35406f(0x360)][_0x35406f(0x3cd)]]:_0x35406f(0x31e),[_univerjs_protocol['CmdRspCode'][_0x35406f(0x10c)]]:_0x35406f(0x3ab),[_univerjs_protocol[_0x35406f(0x360)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x35406f(0x38f),[_univerjs_protocol['CmdRspCode'][_0x35406f(0x1dd)]]:'session.room-cnt-exceeds'};let CollaborationSession=class CollaborationSession extends _univerjs_core[_0x35406f(0x388)]{get[_0x35406f(0x1ed)](){const _0x4d5403=_0x35406f;return this[_0x4d5403(0x21b)][_0x4d5403(0x316)]();}constructor(_0x1e7c6d,_0x51e664,_0x53a276,_0x4885f8,_0xace138,_0x2f473e,_0x52f09d,_0x3570db){const _0x1bbf3f=_0x35406f;super(),this[_0x1bbf3f(0x2c6)]=_0x1e7c6d,this['_logService']=_0x53a276,this[_0x1bbf3f(0x279)]=_0x4885f8,this[_0x1bbf3f(0x23a)]=_0xace138,this[_0x1bbf3f(0x3d2)]=_0x2f473e,this[_0x1bbf3f(0x24d)]=_0x52f09d,this['_telemetryService']=_0x3570db,_defineProperty(this,_0x1bbf3f(0x21b),new rxjs[(_0x1bbf3f(0x2a2))](SessionStatus['IDLE'])),_defineProperty(this,_0x1bbf3f(0x1ce),this[_0x1bbf3f(0x21b)][_0x1bbf3f(0x25c)]()),_defineProperty(this,'_event$',new rxjs['Subject']()),_defineProperty(this,_0x1bbf3f(0x195),this[_0x1bbf3f(0x39d)][_0x1bbf3f(0x25c)]()),_defineProperty(this,_0x1bbf3f(0x386),void 0x0),_defineProperty(this,_0x1bbf3f(0x397),void 0x0),_defineProperty(this,_0x1bbf3f(0x259),void 0x0),_defineProperty(this,_0x1bbf3f(0x194),![]),_defineProperty(this,_0x1bbf3f(0x3a5),null),this[_0x1bbf3f(0x194)]=!!this[_0x1bbf3f(0x24b)],_0x51e664[_0x1bbf3f(0x38a)]((0x0,rxjs[_0x1bbf3f(0x3b3)])(this[_0x1bbf3f(0x378)]))[_0x1bbf3f(0x2b5)](_0x52a03b=>{const _0x3579a2=_0x1bbf3f;if(typeof _0x52a03b===_0x3579a2(0x384))return;this[_0x3579a2(0x386)]=_0x52a03b;if(_0x52a03b)this[_0x3579a2(0x350)](_0x52a03b),this[_0x3579a2(0x397)]=_0x52a03b[_0x3579a2(0x128)][_0x3579a2(0x2b5)](_0xf5e784=>{const _0x452774=_0x3579a2;if(_0xf5e784['routeKey']!==this[_0x452774(0x2c6)])return;this[_0x452774(0x1a7)](_0xf5e784);});else{var _0x2d031d;this['_throwTelemetryCollaborationNewChangeset'](),this['_sessionStatus$']['next'](SessionStatus[_0x3579a2(0x3af)]),(_0x2d031d=this[_0x3579a2(0x397)])===null||_0x2d031d===void 0x0||_0x2d031d[_0x3579a2(0x33a)](),this[_0x3579a2(0x397)]=null;}});}[_0x35406f(0x18d)](){const _0x37e3ac=_0x35406f;var _0xbe74d9,_0x544b97;return(_0xbe74d9=(_0x544b97=this['_socket'])===null||_0x544b97===void 0x0?void 0x0:_0x544b97[_0x37e3ac(0x389)])!==null&&_0xbe74d9!==void 0x0?_0xbe74d9:null;}[_0x35406f(0x1db)](){const _0x323085=_0x35406f;super[_0x323085(0x1db)](),this[_0x323085(0x208)](),this['dispose$']['next'](),this[_0x323085(0x378)][_0x323085(0x22c)]();}[_0x35406f(0x208)](){const _0x1bc0ff=_0x35406f;var _0x22e27b,_0x55e6b4;this[_0x1bc0ff(0x1c0)](),(_0x22e27b=this[_0x1bc0ff(0x386)])===null||_0x22e27b===void 0x0||_0x22e27b['send']({'cmd':_univerjs_protocol['CombCmd'][_0x1bc0ff(0x106)],'data':{'roomID':this[_0x1bc0ff(0x2c6)]}}),(_0x55e6b4=this[_0x1bc0ff(0x386)])===null||_0x55e6b4===void 0x0||_0x55e6b4[_0x1bc0ff(0x208)](),this[_0x1bc0ff(0x39d)][_0x1bc0ff(0x22c)](),this['_sessionStatus$']['complete']();}[_0x35406f(0x1a7)](_0x42d163){const _0x1c5f4a=_0x35406f;if(_0x42d163[_0x1c5f4a(0x1f7)]===_univerjs_protocol[_0x1c5f4a(0x245)]['JOIN'])this[_0x1c5f4a(0x1d0)](_0x42d163);else{if(_0x42d163['cmd']===_univerjs_protocol[_0x1c5f4a(0x245)][_0x1c5f4a(0x18a)])this[_0x1c5f4a(0x39f)](_0x42d163);}}['_joinRoom'](_0x4c654b){const _0x3d1186=_0x35406f;this[_0x3d1186(0x21b)][_0x3d1186(0x2b4)](SessionStatus['JOINING']),_0x4c654b[_0x3d1186(0xfd)]({'cmd':_univerjs_protocol[_0x3d1186(0x245)][_0x3d1186(0x2cb)],'routeKey':this['_unitID'],'routeType':'','data':{'rooms':[{'roomID':this[_0x3d1186(0x2c6)]}]}});}[_0x35406f(0x1d0)](_0x415ca7){const _0x5e723a=_0x35406f;var _0x8ccefc;if(_0x415ca7[_0x5e723a(0x1c7)]in FailedReason){this[_0x5e723a(0x24d)][_0x5e723a(0x190)]({'id':CollaborationUIEventId[_0x5e723a(0x120)],'data':FailedReason[_0x415ca7[_0x5e723a(0x1c7)]]}),this['_sessionStatus$'][_0x5e723a(0x2b4)](SessionStatus[_0x5e723a(0x3af)]);return;}this[_0x5e723a(0x21b)][_0x5e723a(0x2b4)](SessionStatus[_0x5e723a(0x27c)]);const _0x5627cc=(_0x8ccefc=_0x415ca7[_0x5e723a(0x1b8)][_0x5e723a(0x268)][this[_0x5e723a(0x2c6)]])===null||_0x8ccefc===void 0x0?void 0x0:_0x8ccefc[_0x5e723a(0x274)];if(_0x5627cc)_0x5627cc[_0x5e723a(0x320)](_0x151943=>this[_0x5e723a(0x23a)][_0x5e723a(0x31d)](this[_0x5e723a(0x2c6)],_0x151943));}['_onRecvEvent'](_0x38a70f){const _0x4f2f87=_0x35406f;try{const _0x23cb59=_0x38a70f[_0x4f2f87(0x1b8)];switch(_0x23cb59[_0x4f2f87(0x258)]){case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)]['USERS_ENTER']:this['_onUserJoin'](_0x23cb59),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)]['USERS_LEAVE']:this[_0x4f2f87(0x177)](_0x23cb59),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)][_0x4f2f87(0x2ec)]:case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)][_0x4f2f87(0x20c)]:this['_stopTelemetryCollaborationNewChangeset'](),this[_0x4f2f87(0x1f8)](),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration['CollaborationEvent']['MSG_FOR_ERROR']:this[_0x4f2f87(0x3ae)][_0x4f2f87(0x34c)](_0x4f2f87(0x3c7)+JSON[_0x4f2f87(0x2db)](_0x23cb59)),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x4f2f87(0x22f)]:this[_0x4f2f87(0x3d2)][_0x4f2f87(0x371)](_0x23cb59[_0x4f2f87(0x1b8)]),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;default:this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);}}catch(_0x904b83){this['_logService'][_0x4f2f87(0x34c)](_0x904b83,_0x38a70f);}}['_onUserJoin'](_0x69d034){const _0x2bfb24=_0x35406f;this['_memberService']['updateMember'](this[_0x2bfb24(0x2c6)],_0x69d034[_0x2bfb24(0x1b8)]);}['_onUserLeave'](_0x197846){const _0x3fd931=_0x35406f;this['_memberService'][_0x3fd931(0x21a)](this[_0x3fd931(0x2c6)],_0x197846['data'][_0x3fd931(0x389)]);}async[_0x35406f(0xfd)](_0x5586fa,_0x1aee7c){const _0x1183ce=_0x35406f;if(this['sessionStatus']!==SessionStatus[_0x1183ce(0x27c)]||!this['_socket'])throw new Error(_0x1183ce(0x14e));try{_0x5586fa[_0x1183ce(0x258)]===_univerjs_pro_collaboration[_0x1183ce(0x1ae)][_0x1183ce(0x2a1)]&&(this[_0x1183ce(0x34a)](),this[_0x1183ce(0x250)](_0x5586fa)),this['_socket'][_0x1183ce(0xfd)]({'cmd':_univerjs_protocol[_0x1183ce(0x245)]['INGEST'],'routeKey':_0x1aee7c,'routeType':'','data':_0x5586fa});}catch(_0x1b7442){this[_0x1183ce(0x3ae)]['error'](_0x1b7442);}}['_scheduleCollaborationTimeoutTimer'](){const _0x5a830e=_0x35406f;var _0x4e4d41;this[_0x5a830e(0x259)]=setTimeout(()=>{const _0x45b0f1=_0x5a830e;this[_0x45b0f1(0x259)]=null,this[_0x45b0f1(0x24d)][_0x45b0f1(0x190)]({'id':CollaborationUIEventId[_0x45b0f1(0x11e)]});},(_0x4e4d41=this[_0x5a830e(0x279)][_0x5a830e(0x38b)](_0x5a830e(0x221)))!==null&&_0x4e4d41!==void 0x0?_0x4e4d41:DEFAULT_HEARTBEAT_TIMEOUT);}[_0x35406f(0x1f8)](){const _0x4536fa=_0x35406f;this[_0x4536fa(0x259)]&&(clearTimeout(this[_0x4536fa(0x259)]),this[_0x4536fa(0x259)]=null);}[_0x35406f(0x250)](_0x381920){const _0x27fb83=_0x35406f;if(!this[_0x27fb83(0x194)])return;const {data:_0x5e1070}=_0x381920,{unitID:_0x2b50f7,changeset:_0x218c7f}=_0x5e1070,{mutations:_0x51b8dc,type:_0x384c1f}=_0x218c7f;this[_0x27fb83(0x3a5)]={'unitId':_0x2b50f7,'type':_0x384c1f,'startTime':performance[_0x27fb83(0x1b7)](),'stopTime':0x0,'duration':0x0,'size':summaryChangesetSize(_0x51b8dc)};}[_0x35406f(0x204)](){const _0x1c6748=_0x35406f;if(!this[_0x1c6748(0x194)])return;if(!this[_0x1c6748(0x3a5)]){this[_0x1c6748(0x3ae)][_0x1c6748(0x34c)](_0x1c6748(0x22b),_0x1c6748(0x19c));return;}this['_telemetryInfo'][_0x1c6748(0x2b3)]=performance[_0x1c6748(0x1b7)](),this['_telemetryInfo'][_0x1c6748(0x30e)]=this[_0x1c6748(0x3a5)][_0x1c6748(0x2b3)]-this['_telemetryInfo']['startTime'],this[_0x1c6748(0x24b)][_0x1c6748(0x26b)](TELEMETRY_COLLABORATION_NEW_CHANGESET,this[_0x1c6748(0x3a5)]),this[_0x1c6748(0x3a5)]=null;}['_throwTelemetryCollaborationNewChangeset'](){const _0x4e23c6=_0x35406f;this[_0x4e23c6(0x3a5)]=null;}};CollaborationSession=__decorate([__decorateParam(0x2,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x3,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(MemberService)),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(CommentService)),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService)),__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x2c9)])(_univerjs_telemetry['ITelemetryService']))],CollaborationSession);const ILocalCacheService=(0x0,_univerjs_core[_0x35406f(0x36d)])(_0x35406f(0x137));function getLocalCacheKey(_0x1070b4){return'unit-cache-'+_0x1070b4;}function extractTargetFromFirstChangeset(_0x118adc){const _0xbb8242=_0x35406f,{unitID:_0x409369,mutations:_0x53b9da}=_0x118adc;return{'unitId':_0x409369,'subUnitId':_0x53b9da[_0xbb8242(0x332)]>0x0?_0x53b9da[0x0][_0xbb8242(0x1de)][_0xbb8242(0x272)]:null};}let SheetTransformSelectionsService=class SheetTransformSelectionsService{constructor(_0x57c8e4,_0x1baf98,_0x1920f7){const _0x213895=_0x35406f;this[_0x213895(0x157)]=_0x57c8e4,this[_0x213895(0x300)]=_0x1baf98,this[_0x213895(0x3d3)]=_0x1920f7;}['transformSelections'](_0x4ab93f){const _0x14e286=_0x35406f;var _0x57914e,_0x3c7420;const _0x21c418=this[_0x14e286(0x157)]['get'](_univerjs_sheets[_0x14e286(0x3ce)]),{unitId:_0x5cc7f7,subUnitId:_0x14c761}=extractTargetFromFirstChangeset(_0x4ab93f),_0x3a64a5=_0x21c418===null||_0x21c418===void 0x0?void 0x0:_0x21c418[_0x14e286(0x19d)](_0x5cc7f7)[_0x14e286(0x2e1)](),_0x221018=(_0x57914e=this[_0x14e286(0x3d3)][_0x14e286(0x2d4)](_0x5cc7f7))===null||_0x57914e===void 0x0||(_0x57914e=_0x57914e[_0x14e286(0x13f)]())===null||_0x57914e===void 0x0?void 0x0:_0x57914e[_0x14e286(0x28d)]();if(_0x3a64a5[_0x14e286(0x332)]===0x0||!_0x5cc7f7||!_0x14c761)return;const _0x21cf70=[{'id':_univerjs_sheets[_0x14e286(0x238)]['id'],'params':{'unitId':_0x5cc7f7,'subUnitId':_0x221018,'selections':_univerjs_core[_0x14e286(0x152)]['deepClone'](_0x3a64a5)}}],_0x373608=this[_0x14e286(0x300)][_0x14e286(0x23f)](_0x4ab93f,_0x21cf70);if(!(0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetSuccess'])(_0x373608))throw _0x373608[_0x14e286(0x34c)];const _0x4a3aa4=(_0x3c7420=_0x373608[_0x14e286(0x1d6)][0x0])===null||_0x3c7420===void 0x0||(_0x3c7420=_0x3c7420[_0x14e286(0x1de)])===null||_0x3c7420===void 0x0?void 0x0:_0x3c7420[_0x14e286(0x31f)];if(Array[_0x14e286(0x118)](_0x4a3aa4)&&_0x4a3aa4[_0x14e286(0x332)]){if(_0x4a3aa4[_0x14e286(0x332)]===_0x21cf70[0x0]['params'][_0x14e286(0x31f)][_0x14e286(0x332)]&&_0x4a3aa4['every']((_0x192ece,_0xcf5934)=>_univerjs_core['Rectangle'][_0x14e286(0x334)](_0x192ece[_0x14e286(0x1a3)],_0x21cf70[0x0]['params']['selections'][_0xcf5934][_0x14e286(0x1a3)])))return;this[_0x14e286(0x157)][_0x14e286(0x2c5)](_univerjs_core['ICommandService'])[_0x14e286(0x3ca)](_univerjs_sheets[_0x14e286(0x238)]['id'],{'unitId':_0x5cc7f7,'subUnitId':_0x221018,'selections':_0x4a3aa4});}}};SheetTransformSelectionsService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0x2,_univerjs_core[_0x35406f(0x161)])],SheetTransformSelectionsService);const ISingleActiveUnitService=(0x0,_univerjs_core['createIdentifier'])('univer-pro.collaboration-client.single-active-unit-service');let UnitStatus=function(_0x422b7f){const _0x4a8dd3=_0x35406f;return _0x422b7f[_0x422b7f[_0x4a8dd3(0x1a1)]=0x0]=_0x4a8dd3(0x1a1),_0x422b7f[_0x422b7f['OTHER_CLIENTS_EDITING']=0x1]=_0x4a8dd3(0x2f4),_0x422b7f;}({});const COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY=_0x35406f(0x2b9),configSymbol=Symbol(COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function isSplitChunkMutation(_0x2e3763){const _0x222710=_0x35406f;var _0x359780;return!!((_0x359780=_0x2e3763[_0x222710(0x1de)])===null||_0x359780===void 0x0?void 0x0:_0x359780[_0x222710(0x167)]);}const SINGLE_CHANGESET_MUTATIONS=new Set([_univerjs_sheets[_0x35406f(0x265)]['id']]);function _0x2fc4(){const _0x5ee02d=['reduce','WorkbookEditablePermission','/universer-api/uniscript','_getCurrentRevision','loadUnitOfRevision','USERS_LEAVE','merge','transformStack\x20failed!','removeMember','_sessionStatus$','NOT_COLLAB','size','@univerjs-pro/collaboration-client','socket\x20open.','_getCtorByUniverInstanceType','HEARTBEAT_TIMEOUT','reverse','_registerDependencies','session','_transformUndoredo','OfflineState','listRoles','close$','body','loginUrlKey','[CollaborationSession]','complete','_lockTransition','ILocalCacheService','COMMENT_UPDATE','resolveWithBasePath','PERMISSION_DENIED','onTransformState','error$','setShowComponents','CollaborativeUndoRedoService','[FetchMissState]','onMissingChangesets','SetSelectionsOperation','_createInitialState','_memberService','add','_roomMembers','saveImage','_updateState','transformMutationsWithChangeset','SOCKET_FAILED','ERROR_IMAGE','0.21.0','CHANGESET_REJ','function','CombCmd','_isPermissionRej','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','CLOSE_ROOM','then','disableLocalCache','_telemetryService','_getSignURL','_collaborationUIEventService','JOINING','toggleOffline','_startTelemetryCollaborationNewChangeset','image/gif','JSONX','CommentService','_socket$','editing\x20status\x20changed\x20to','parseProtocolChangeset','_updateLocalCache','eventID','_collaborationTimeoutTimer','_clearTimeoutTimer','updatePermissionObjEvent','asObservable','conflict','ReplaySubject','x-univer-host','encodeURIComponent','FetchingMissState','_clearRetryConnectingTimer','onRemoteRej','location','InsertSheetMutation','toDisposable','RevisionService','roomInfos','_handlerCallback','_httpService','capture','AuthzIoHttpService','mapDocumentTypeToUniverInstanceType','[SyncedState]:\x20received\x20acknowledgement.','CollaborationUIEventId','/-/object/-/batch_allowed','onStateChange','subUnitId','listCollaborators','members','UPDATE_CURSOR','onMutationExecutedForCollab','FAIL','textRanges','_configService','unitID','batchAllowed','ONLINE','transformUndoRedo','_getUndoStack','_sendHeartbeat','cfgEnableObjInherit','result','1287303amTBXo','_getLoginPath','onTransformIME','type','IAuthzIoService','src','updateCursorEvent','2590038WtPtna','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','liveShareNewHost','revision','getSheetId','findIndex','image/jpg','4VFDosF','parse','url','_handler','collaboratorID','CollaborationSession','localCacheService','COMPRESS_MUTATION_SEND','PSEUDO_FETCH_MISSING_RESULT','resolve','loadSheet','infoRsp','authzUrl','ISingleActiveUnitService','updatePermissionPoint','getSheetBlock','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','SUBMIT_CHANGESET','BehaviorSubject','resend','__Key__','917546OjVsnj','_snapshotService','ISnapshotServerService','getCurrentUser','&source=','[PendingState]:\x20received\x20rejection.','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','[CollaborationSessionService]:\x20socket\x20error','_entities','mergeOverrideWithDependencies','_tryEnsureSocket','onLocalMutation','?size=','/allowed','stopTime','next','subscribe','_commandService','_waitForHeartbeatResponse','b64DecodeUnicode','collaboration-client.config','appendMutation','[PendingState]:\x20received\x20acknowledgement.','Subject','_changesetReqId','find','AWAITING','?url=','submit\x20changeset\x20error!','apply','joinEvent','refreshPermission','get','_unitID','_showConflictNotification','&assign=','Optional','reconnect','JOIN','deleteCollaborator','_localeService','_maxTotalRetryTimeout','deserializeToCombResponse','getRoom','commentUpdate$','randomBytes','catch','getUnit','requireSession','Error\x20on\x20receiving\x20event','_toggleOnline','_updateStatus','getDeserializedSheetBlock','_transformSelections','stringify','_commentUpdate$','SnapshotServerOverHTTPService','pending','_pendingMutations','/rev/','getCurrentSelections','onMissedChangesetFetched','snapshot','POST','routeKey','fromCollab','filter','[SyncedState]:\x20received\x20rejection.','_replaceFileID','CollaborationSessionService','3732288NPHnpE','CHANGESET_ACK','_status$','SyncedState','_singleActiveUnitService','SheetPermissionInitController','synced','_initUnitPermissionChange','permissionRejEvent','OTHER_CLIENTS_EDITING','originalMeta','/universer-api/oidc/authpage','debug','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','Injector','UNIVER_COLLABORATION_CLIENT_PLUGIN','_toggleOffline','_transformStack','snapshotServerUrl','_clearLocalCache','_getRedoStack','_transformService','firstValueFrom','c1Prime','unknown','toPrimitive','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_decreaseWaiting','UNIVER_SHEET','ITransformService','createSocket','updateOfflineData','isTransformMutationsWithChangesetSuccess','onRemoteRetry','_transformRemoteChangesetByStateCache','duration','_createHandler','_schedule','_transformStateCache','copyFileMeta','/resources','_onConflict','/universer-api/user/session-ticket','getValue','collabSubmitChangesetUrl','sendChangesetTimeout','UNIVER_DOC','isTransformMutationsWithChangesetFailure','[OfflineState]:\x20received\x20changeset.','transformChangesets','updateMember','session.room-full','selections','forEach','Plugin','failed\x20to\x20apply\x20missed\x20changesets!','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','ImageSourceType','enableOfflineEditing','IImageIoService','MergeInterceptorFactory','getImage','enableCollaboration','fetch_missing','ERROR_EXCEED_SIZE','_executeRemoteChangeset','getFocusedUnit','baseRev','status$','_onOffline','INGEST','length','_change$','equals','isInternalEditorID','/new_changes','[DataLoaderService]','_initRequestHeader','_substituteUndoStack','unsubscribe','Inject','_waitCount','requestParams','ILogService','sheets','addImageSourceCache','put','_HTTPService','[CollaborationEntity]','LIVESHARE_NEW_HOST','_onRemoteRejected','onSendChangeset','allowed','DEFAULT_WS_SESSION_TICKET_URL','unitId','_scheduleCollaborationTimeoutTimer','OPTIONAL','error','_getAPIPrefix','CommandType','updateSnapshot','_joinRoom','onTransformRemoteChangesetByIMECache','[CollaborationUndoRedoService]','/universer-api/authz','getUnitType','toString','encode','post','Univer','AwaitingState','loadUnit','init','_clearHeartbeatTimer','getImageSourceCache','avatar','FETCH_MISS','CmdRspCode','ConflictState','_state','_members','entityInit$','PENDING','LOCAL_CACHE_INTERVAL','disposeWithMe','RichTextEditingMutation','includes','HEARTBEAT_INTERVAL_KEY','_retryConnectingTimer','_remoteChangesetQueue','createIdentifier','_permissionService','_rescheduleHeartbeat','_fetchMissChangesets','onCommentUpdate','mutations','awaitingChangeset','call','fetchMissingChangesets','_members$','SOCKET_FAILED_RETRY','dispose$','ICollaborationSocketService','state$','onRemoteAck','getResourcesRequest','string','offline','commentUpdateEvent','_init','append','HEARTBEAT_INTERVAL','socket\x20close','undefined','socketService','_socket','method','RxDisposable','memberID','pipe','getConfig','getTime','RETRY_CONNECTING_MAX_COUNT','370304uZNhCd','session.room-permission-denied','_socketReady','_collabSessionService','retryConnectingInterval','joinRsp','pluginName','_sheetTransformSelectionsService','registerDependencies','_socketMessageSubscription','_initMergeInterceptor','_checkMissing','online$','_onRemoteRetry','isPermissionRej','_event$','_transitionLocked','_onRecvEvent','IMentionIOService','delay','SessionStatus','_univerInstanceService','_state$','_telemetryInfo','_disableEditing','DataLoaderService','fromCharCode','_revisionService','SheetTransformSelectionsService','session.room-not-exists','loadOfflineData','CompressMutationService','_logService','OFFLINE','_syncEditingCollabCursor','LIVESHARE_FETCH_OPERATIONS','/collaborator','takeUntil','UniverInstanceType','readAsDataURL','decorate','reqId','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','CollaborationImageIoService','liveShareOperation','2898330nchMpB','change$','_collaborationPaused','PERSON','getSnapshotAPIPath','MentionIoHttpService','_listenToNetworkCondition','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','uploadFileServerUrl','create','objectActions','_createInitialStateImpl','save\x20fail\x20reason\x20is\x20','concatMap','confirm','executeCommand','_config','_getAPIPrefixPath','JOIN_ROOM_FULL','SheetsSelectionsService','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','target','_getSendChangesetTimeout','_commentService','_instanceService','_localCacheService','has','_retryCount','interceptor','_imageSourceCache','OTHER_CLIENT_EDITING','send','setCurrentUser','_sender','take','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','243269cfESyA','collaborators','COMPRESS_MUTATION_APPLY','defineProperty','LEAVE','\x0aCurrent:\x20','/object','getTypeOfUnitAdded$','_onConnectionOpen','LocaleService','JOIN_ROOM_NOT_EXISTS','ICommandService','USERS_ENTER','href','_onLocalMutation','CONFLICT','csShouldRetryEvent','origin','_changesetSessionId','_resendWithTimeout','symbol','shareReplay','isArray','_incrementRevisionNumber','/fetchmissing?from=','LIVESHARE_REQUEST_HOST','workbook','toStringTag','SUBMIT_CHANGESET_TIMEOUT','closeSession','JOIN_ROOM_FAILED','LocalUndoRedoService','setCfgEnableObjInherit','uniscriptRunEvent','subject','UniverCollaborationPlugin','CollaborationSocketService','_createSocket','message$','getCurrentRevOfUnit','MUTATION','_cfgEnableObjInherit','_submitChangeset','AWAITING_WITH_PENDING','SheetCollaborationEntity','DEFAULT_FILE_NAME','UNISCRIPT_RUN','utf8ToBytes','objectType','session.join-failed','_socketService','fetching\x20missing\x20changesets\x20from\x20','SnapshotService','collaboration-client.local-cache-service','collaMsg','SHOULD_CLOSE_CONN','getCollabEntity$','HEARTBEAT','_type','newCsEvent','_transformRemoteChangesetByIMECache','getActiveSheet','_clearUndo','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_removeRoom','UPDATE_PERMISSION_OBJ','getUnitOnRev','uuidv4','userID','waitForRoom$','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','FETCH_MISSING','_unitInfo$','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','getLocalCacheKey','_undoRedoService','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','toggleOnline','/unit/','_scheduleCompleteTimestamp','Tools','/universer-api/snapshot/','getInterceptPoints','_timeoutTimer','touchDependencies','_injector','getMember','UUID','sid','_snapshotServerService','univer-pro.collaboration-client.network-condition.service','_clearRedo','IDLE','serializeCombRequest','collaboration_new_changeset','IUniverInstanceService','fetchThroughInterceptors','Disposable','_onMessage','_unlockTransition','[CollaborationState]:\x20apply\x20error!','__splitChunk__','\x20in\x20_schedule.','[PendingState]:\x20unhandled\x20univer\x20type:\x20','ISocketService','focused$','_sessions','ErrorCode','ThresholdInterceptorFactory','_transformIMECache','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','update','resourceIDs','map','_userManagerService','Failed\x20to\x20update\x20permission\x20point','constructor','_onUserLeave','_doCreateSocket','csRejEvent','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','push','default','image/jpeg','awaiting_with_pending','MemberService','_roomCreated$','parseChangesetToProtocol','textEncoder','_compressMutationService','action','MentionType','unitId\x20is\x20not\x20found','_initDependencies','LIVESHARE_TERMINATE','replace','RECV','downloadEndpointUrl','sequenceExecute','getMemberID','BASE64','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','emitEvent','values','IPermissionService','setConfig','_shouldReportTelemetry','event$','IConfigService','_emitMembers','override','actions','min','_collaborationSessionService','telemetry\x20info\x20is\x20not\x20initialized','getWorkbookSelections','_onRemoteChangeset','_acknowledgedAwaitingChangeset','getAllMembers','NO_OTHER_CLIENTS_EDITING','registerHTTPInterceptor','range','title','signUrlServerUrl','HELLO','_onCombEvent','onload','_clearScheduledTask','slice','_exhaustRemoteChangesetQueue','state','encrypt','CollaborationEvent','PERMISSION_REJ','ImageUploadStatusType','NEW_CHANGESETS','loadDoc','_networkConditionService','_queuedRemoteChangesets','/-/object/list','UniverCollaborationClientPlugin','now','data','_startCollaboration','&to=','[CollaborationSessionService]','/block/','getOwnPropertyDescriptor','connection\x20error','getUnitId','_throwTelemetryCollaborationNewChangeset','onlyLocal','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','every','_entityInit$','status','collabWebSocketUrl','code','_getDownloadEndpointURL','_candidateSocket','AwaitingWithPendingState','UserManagerService','reject','list','sessionStatus$','_sendHeartbeatTimer','_onJoinRoomEvent','SNAPSHOT_URL_KEY','entries','objectID','RETRY_CONNECTING_MAX_COUNT_KEY','createInstance','m2Prime','enableSingleActiveInstanceLock','updateCollaborator','addHandlerCallback','{fileID}','dispose','set','GLOBAL_ROOMS_CNT_EXCEEDS','params','name','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','LIVESHARE_OPERATION','open$','isTransformChangesetsSuccess','_sendingTimer','_substituteRedoStack','floor','HTTPService','getTypeOfUnitDisposed$','SYNCED','_resendTimer','DependentOn','onSyncEditingCollabCursor','sessionStatus','prototype','onRemoteChangeset','setWaitCount','responseType','localeService','onTransformRemoteChangesetByStateCache','onTransformSelections','MSG_FOR_ERROR','getGlobalObject','cmd','_clearCollaborationTimeoutTimer','_awaitingChangeset','object','_applyRemoteChangeset','packageName','_resendTimeout','_eventService','_onConnectionFailed','version','FileId','delete','csAckEvent','_stopTelemetryCollaborationNewChangeset','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','_initCloseConn','IUndoRedoService','close','cbc','enableAuthServer','changesets','CHANGESET_SHOULD_RETRY','Workbook','CollaborationStatus','clear','_tryReconnect','objects'];_0x2fc4=function(){return _0x5ee02d;};return _0x2fc4();}function assembleSheetChangeset(_0x1d36e1,_0x7da168,_0x252526,_0x3552b8,_0x1d4057){const _0x3678cc=_0x35406f;var _0x54fd88,_0x28c893,_0x1cfe16,_0x1402c5;const _0x311e76=[];for(const _0x22b8f2 of _0x1d36e1){if(SINGLE_CHANGESET_MUTATIONS['has'](_0x22b8f2['id'])){if(_0x311e76[_0x3678cc(0x332)]>0x0)break;_0x311e76['push'](_0x22b8f2);break;}if(isSplitChunkMutation(_0x22b8f2)){if(_0x311e76[_0x3678cc(0x332)]>0x0)break;_0x311e76['push'](_0x22b8f2);break;}_0x311e76['push'](_0x22b8f2);}const _0x58e09b=(_0x54fd88=(_0x28c893=_0x1d4057[_0x3678cc(0x2a8)]())===null||_0x28c893===void 0x0?void 0x0:_0x28c893['userID'])!==null&&_0x54fd88!==void 0x0?_0x54fd88:_0x3678cc(0x303),_0x10e87e=(_0x1cfe16=(_0x1402c5=_0x1d4057['getCurrentUser']())===null||_0x1402c5===void 0x0?void 0x0:_0x1402c5[_0x3678cc(0x389)])!==null&&_0x1cfe16!==void 0x0?_0x1cfe16:_0x3678cc(0x303);return{'changeset':{'unitID':_0x7da168,'type':(0x0,_univerjs_pro_collaboration[_0x3678cc(0x26d)])(_0x252526[_0x3678cc(0x354)](_0x7da168)),'baseRev':_0x3552b8[_0x3678cc(0x129)](_0x7da168),'revision':0x0,'userID':_0x58e09b,'memberID':_0x10e87e,'mutations':_0x311e76},'pendingMutations':_0x1d36e1[_0x3678cc(0x1aa)](_0x311e76[_0x3678cc(0x332)])};}function assembleDocChangeset(_0x51f011,_0x41b386,_0x51e036,_0x34f30b,_0x3e333e){const _0xd793a5=_0x35406f;var _0x548b09,_0xa274ae,_0x100e29,_0x4b0a00;const _0x1b209d=[_0x51f011[_0xd793a5(0x212)]((_0x4f7f2f,_0x51bf5b)=>{const _0x4318fa=_0xd793a5;var _0x36b801;const {id:_0x5ecd68}=_0x4f7f2f,{id:_0x51b904,type:_0x884c48}=_0x51bf5b,_0x3d3bec=(_0x36b801=_0x4f7f2f[_0x4318fa(0x1de)])!==null&&_0x36b801!==void 0x0?_0x36b801:{'actions':null},_0x778121=_0x51bf5b[_0x4318fa(0x1de)];if(_0x5ecd68&&_0x5ecd68!==_0x51b904)throw new Error(_0x4318fa(0x1c2)+_0x5ecd68+'\x20-\x20'+_0x51b904+'.');return{..._0x4f7f2f,'id':_0x51b904,'type':_0x884c48,'params':{'unitId':_0x778121['unitId'],'textRanges':_0x778121['textRanges'],'actions':_univerjs_core[_0x4318fa(0x252)]['compose'](_0x3d3bec['actions'],_0x778121[_0x4318fa(0x199)])}};},{})],_0x28b154=(_0x548b09=(_0xa274ae=_0x3e333e['getCurrentUser']())===null||_0xa274ae===void 0x0?void 0x0:_0xa274ae[_0xd793a5(0x146)])!==null&&_0x548b09!==void 0x0?_0x548b09:'unknown',_0x1f41f8=(_0x100e29=(_0x4b0a00=_0x3e333e[_0xd793a5(0x2a8)]())===null||_0x4b0a00===void 0x0?void 0x0:_0x4b0a00[_0xd793a5(0x389)])!==null&&_0x100e29!==void 0x0?_0x100e29:'unknown';return{'changeset':{'unitID':_0x41b386,'type':(0x0,_univerjs_pro_collaboration[_0xd793a5(0x26d)])(_0x51e036['getUnitType'](_0x41b386)),'baseRev':_0x34f30b[_0xd793a5(0x129)](_0x41b386),'revision':0x0,'userID':_0x28b154,'memberID':_0x1f41f8,'mutations':_0x1b209d},'pendingMutations':[]};}function createTimerObservable$(_0x2f336f,_0x7c65e){const _0x17cb0c=_0x35406f,_0x237f9c=new rxjs[(_0x17cb0c(0x25e))](0x1);return setTimeout(()=>_0x237f9c['next'](_0x7c65e),_0x2f336f),_0x237f9c[_0x17cb0c(0x25c)]()[_0x17cb0c(0x38a)]((0x0,rxjs['take'])(0x1));}var _PendingState,_AwaitingState,_AwaitingWithPendingState;let CollaborationStatus=function(_0x575fc3){const _0x4b8065=_0x35406f;return _0x575fc3[_0x4b8065(0x21c)]='not_collab',_0x575fc3['SYNCED']=_0x4b8065(0x2f1),_0x575fc3[_0x4b8065(0x365)]=_0x4b8065(0x2de),_0x575fc3[_0x4b8065(0x2bf)]='awaiting',_0x575fc3[_0x4b8065(0x12d)]=_0x4b8065(0x17e),_0x575fc3[_0x4b8065(0x35f)]=_0x4b8065(0x32a),_0x575fc3['CONFLICT']=_0x4b8065(0x25d),_0x575fc3[_0x4b8065(0x3af)]=_0x4b8065(0x37e),_0x575fc3;}({});const MAX_RETRY_TIMEOUT=0x4e20,MAX_RETRY_TOTAL_TIMEOUT=0x2bf20;var CollaborationState=class{constructor(_0x37ee0f,_0x1690c7,_0x476076,_0x238baa,_0x29fc4f,_0x58d1c4,_0x5b147d,_0x463cde,_0x26549f){const _0x19a0a2=_0x35406f;this[_0x19a0a2(0x27a)]=_0x37ee0f,this[_0x19a0a2(0x285)]=_0x1690c7,this['_handler']=_0x29fc4f,this[_0x19a0a2(0x2b6)]=_0x58d1c4,this[_0x19a0a2(0x14d)]=_0x5b147d,this[_0x19a0a2(0x3a9)]=_0x463cde,this[_0x19a0a2(0x3d4)]=_0x26549f,_defineProperty(this,_0x19a0a2(0x1f9),null),_defineProperty(this,_0x19a0a2(0x2df),[]),this[_0x19a0a2(0x1f9)]=_0x476076,this[_0x19a0a2(0x2df)]=_0x238baa;}['_checkMissing'](_0x4a9936){const _0x530130=_0x35406f,_0x2f071c=this[_0x530130(0x3a9)][_0x530130(0x129)](this['unitID']);if(_0x4a9936[_0x530130(0x28c)]>_0x2f071c+0x1)return this[_0x530130(0x293)][_0x530130(0x237)]({'from':_0x2f071c,'to':_0x4a9936[_0x530130(0x28c)]-0x1}),!![];return![];}[_0x35406f(0x225)](_0x4be050){const _0x579e6a=_0x35406f;this['_undoRedoService'][_0x579e6a(0x27d)](this[_0x579e6a(0x27a)],_0x4be050);}[_0x35406f(0x2da)](_0x4ae445){var _0x3d98ae,_0x1dae2d;(_0x3d98ae=(_0x1dae2d=this['_handler'])['onTransformSelections'])===null||_0x3d98ae===void 0x0||_0x3d98ae['call'](_0x1dae2d,_0x4ae445);}[_0x35406f(0x16f)](_0x2b71ac){const _0x5cc8f5=_0x35406f;var _0x1a8c4e,_0x7b7572;return(_0x1a8c4e=(_0x7b7572=this[_0x5cc8f5(0x293)])[_0x5cc8f5(0x284)])===null||_0x1a8c4e===void 0x0?void 0x0:_0x1a8c4e[_0x5cc8f5(0x374)](_0x7b7572,_0x2b71ac);}['_transformStateCache'](_0x32743f){var _0xe3e88,_0x51d6dd;return(_0xe3e88=(_0x51d6dd=this['_handler'])['onTransformState'])===null||_0xe3e88===void 0x0?void 0x0:_0xe3e88['call'](_0x51d6dd,_0x32743f);}[_0x35406f(0x13e)](_0x35a556){const _0xac56ae=_0x35406f;var _0x1b6f1d,_0x5af6d7,_0x37df5f;return(_0x1b6f1d=(_0x5af6d7=(_0x37df5f=this[_0xac56ae(0x293)])[_0xac56ae(0x351)])===null||_0x5af6d7===void 0x0?void 0x0:_0x5af6d7[_0xac56ae(0x374)](_0x37df5f,_0x35a556))!==null&&_0x1b6f1d!==void 0x0?_0x1b6f1d:_0x35a556;}['_transformRemoteChangesetByStateCache'](_0x5b8ec8){const _0x29f044=_0x35406f;var _0x283726,_0x266a06,_0x12ff27;return(_0x283726=(_0x266a06=(_0x12ff27=this[_0x29f044(0x293)])[_0x29f044(0x1f3)])===null||_0x266a06===void 0x0?void 0x0:_0x266a06[_0x29f044(0x374)](_0x12ff27,_0x5b8ec8))!==null&&_0x283726!==void 0x0?_0x283726:_0x5b8ec8;}[_0x35406f(0x3b0)](_0x189d7b){const _0x173123=_0x35406f;if(this[_0x173123(0x285)]===_univerjs_core[_0x173123(0x3b4)][_0x173123(0x319)]){const {unitID:_0x3212cc,mutations:_0x1bed36,memberID:_0x1c42f8}=_0x189d7b,_0x215f71=_0x1bed36[_0x173123(0x332)]>0x0?_0x1bed36[0x0][_0x173123(0x1de)][_0x173123(0x278)]:[];if(Array[_0x173123(0x118)](_0x215f71)&&_0x215f71['length']>0x0){var _0x3e6192,_0x61a68c;(_0x3e6192=(_0x61a68c=this[_0x173123(0x293)])[_0x173123(0x1ec)])===null||_0x3e6192===void 0x0||_0x3e6192['call'](_0x61a68c,{'unitID':_0x3212cc,'memberID':_0x1c42f8,'textRanges':_0x215f71});}}}[_0x35406f(0x257)](){const _0x445c3e=_0x35406f;var _0x20e244;(_0x20e244=this[_0x445c3e(0x3d4)])===null||_0x20e244===void 0x0||_0x20e244[_0x445c3e(0x30a)](this['unitID'],this[_0x445c3e(0x285)],this[_0x445c3e(0x1f9)],this[_0x445c3e(0x2df)]);}[_0x35406f(0x215)](){const _0x4958a3=_0x35406f;return this[_0x4958a3(0x3a9)][_0x4958a3(0x129)](this[_0x4958a3(0x27a)]);}['_incrementRevisionNumber'](){const _0x45714d=_0x35406f;this[_0x45714d(0x3a9)]['incrementRevOfUnit'](this[_0x45714d(0x27a)]);}['_executeRemoteChangeset'](_0x9986bd){const _0x38014a=_0x35406f;let _0x2bd85d=this[_0x38014a(0x13e)](_0x9986bd);_0x2bd85d=this[_0x38014a(0x30d)](_0x2bd85d);const _0x549f37=(0x0,_univerjs_core[_0x38014a(0x18c)])(_0x2bd85d['mutations'],this[_0x38014a(0x2b6)],{'fromCollab':!![]});if(!_0x549f37[_0x38014a(0x281)]){var _0x2985c9;if(_0x549f37[_0x38014a(0x34c)]instanceof Error)throw _0x549f37['error'];throw new Error((_0x2985c9=_0x549f37[_0x38014a(0x34c)])!==null&&_0x2985c9!==void 0x0?_0x2985c9:_0x38014a(0x166));}this['_transformIMECache'](_0x2bd85d),this[_0x38014a(0x311)](_0x2bd85d),this[_0x38014a(0x225)](_0x9986bd),this['_transformSelections'](_0x2bd85d),this['_syncEditingCollabCursor'](_0x2bd85d),this['_incrementRevisionNumber']();}};let SyncedState=class SyncedState extends CollaborationState{constructor(_0x585eea,_0x15cc5d,_0x2a5331,_0x22ce25,_0xa0ad49,_0x1c4318,_0xfb1e7d,_0x17ff2a,_0x3a5364,_0x5a7efe){const _0x3de83c=_0x35406f;super(_0x585eea,_0x15cc5d,null,[],_0x2a5331,_0xfb1e7d,_0x1c4318,_0x22ce25,_0x5a7efe),this[_0x3de83c(0x157)]=_0xa0ad49,this[_0x3de83c(0x3ae)]=_0x17ff2a,this[_0x3de83c(0x300)]=_0x3a5364,this['localCacheService']=_0x5a7efe,_defineProperty(this,'status',CollaborationStatus[_0x3de83c(0x1e9)]);}[_0x35406f(0x2ba)](_0x458e46){const _0x4ed8c8=_0x35406f,_0x26822b=this[_0x4ed8c8(0x157)]['createInstance'](PendingState,this[_0x4ed8c8(0x27a)],this['type'],[_0x458e46],this['_handler']);return _0x26822b[_0x4ed8c8(0x310)](),_0x26822b[_0x4ed8c8(0x257)](),_0x26822b;}[_0x35406f(0x1ef)](_0x2e6f9b){const _0x32b775=_0x35406f;if(this['_checkMissing'](_0x2e6f9b))return this['_injector']['createInstance'](FetchingMissState,this['unitID'],this['type'],null,[],null,[_0x2e6f9b],this[_0x32b775(0x293)]);try{const _0x4614e6=this[_0x32b775(0x300)][_0x32b775(0x23f)](_0x2e6f9b,[_univerjs_pro_collaboration['EmptyMutationInfo']]);if((0x0,_univerjs_pro_collaboration[_0x32b775(0x30b)])(_0x4614e6)){const {c1Prime:_0x10463d}=_0x4614e6;return this[_0x32b775(0x32c)](_0x10463d),this;}throw _0x4614e6[_0x32b775(0x34c)];}catch(_0x28ad9a){return this[_0x32b775(0x3ae)][_0x32b775(0x34c)](_0x28ad9a),this['_onConflict'](![]);}}[_0x35406f(0x314)](_0xb0c2c6){const _0x1f9518=_0x35406f;return this[_0x1f9518(0x157)][_0x1f9518(0x1d5)](ConflictState,this['unitID'],this[_0x1f9518(0x285)],null,[],this[_0x1f9518(0x293)],_0xb0c2c6);}[_0x35406f(0x37b)](){const _0x1bb927=_0x35406f;throw new Error(_0x1bb927(0x26e));}[_0x35406f(0x263)](){const _0x39f6b3=_0x35406f;throw new Error(_0x39f6b3(0x2e8));}[_0x35406f(0x30c)](){return this;}['toggleOffline'](){const _0x308323=_0x35406f;return this[_0x308323(0x157)][_0x308323(0x1d5)](OfflineState,this['unitID'],this[_0x308323(0x285)],null,[],this[_0x308323(0x293)]);}['toggleOnline'](){return this;}[_0x35406f(0x2a3)](){const _0x39cd23=_0x35406f;throw new Error(_0x39cd23(0x2a0));}['fetchMiss'](){const _0x5047e6=_0x35406f,_0x376ea5=this[_0x5047e6(0x3a9)][_0x5047e6(0x129)](this[_0x5047e6(0x27a)]);return this[_0x5047e6(0x293)][_0x5047e6(0x237)]({'from':_0x376ea5,'to':0x0}),this[_0x5047e6(0x157)][_0x5047e6(0x1d5)](FetchingMissState,this['unitID'],this[_0x5047e6(0x285)],null,[],null,[],this[_0x5047e6(0x293)]);}};SyncedState=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x5,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0x6,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x7,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x8,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0x9,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],SyncedState);let PendingState=_PendingState=class PendingState extends CollaborationState{constructor(_0x232d5c,_0x328c55,_0x3483ed,_0x35964b,_0x11fc8a,_0x4dcb78,_0x2a2cf5,_0x2905f7,_0x294458,_0x51c24d,_0x4865a1,_0x585651,_0x9f1093,_0x55e23e){const _0x357f73=_0x35406f;super(_0x232d5c,_0x328c55,null,_0x3483ed,_0x35964b,_0x294458,_0x9f1093,_0x4dcb78,_0x55e23e),this[_0x357f73(0x157)]=_0x11fc8a,this[_0x357f73(0x23a)]=_0x2a2cf5,this[_0x357f73(0x3ae)]=_0x2905f7,this[_0x357f73(0x279)]=_0x51c24d,this[_0x357f73(0x300)]=_0x4865a1,this[_0x357f73(0x3a3)]=_0x585651,_defineProperty(this,_0x357f73(0x1c5),CollaborationStatus[_0x357f73(0x365)]),_defineProperty(this,_0x357f73(0x151),null),_defineProperty(this,'_sendingTimer',null);}[_0x35406f(0x2ba)](_0x2e91b5){const _0x2985ee=_0x35406f;return this['_pendingMutations'][_0x2985ee(0x17b)](_0x2e91b5),this[_0x2985ee(0x257)](),this;}[_0x35406f(0x1ef)](_0x2d270c){const _0x176e3d=_0x35406f;if(this[_0x176e3d(0x399)](_0x2d270c))return this[_0x176e3d(0x1a9)](),this[_0x176e3d(0x157)]['createInstance'](FetchingMissState,this[_0x176e3d(0x27a)],this['type'],null,this[_0x176e3d(0x2df)],null,[_0x2d270c],this[_0x176e3d(0x293)]);try{const _0x246837=this[_0x176e3d(0x300)]['transformMutationsWithChangeset'](_0x2d270c,this['_pendingMutations']);if((0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetSuccess'])(_0x246837)){const {c1Prime:_0x30e356,m2Prime:_0x3d827c}=_0x246837;this['_executeRemoteChangeset'](_0x30e356);const _0x1bd3d9=this[_0x176e3d(0x157)][_0x176e3d(0x1d5)](_PendingState,this[_0x176e3d(0x27a)],this[_0x176e3d(0x285)],_0x3d827c,this[_0x176e3d(0x293)]);this[_0x176e3d(0x1a9)]();const _0x38f6d2=new Date()[_0x176e3d(0x38c)](),_0x25c08f=this[_0x176e3d(0x151)]?Math['max'](this[_0x176e3d(0x151)]-_0x38f6d2,0x0):this['_getSendChangesetTimeout']();return _0x1bd3d9['_schedule'](_0x25c08f),_0x1bd3d9;}throw _0x246837[_0x176e3d(0x34c)];}catch(_0xb56ee3){return this[_0x176e3d(0x3ae)][_0x176e3d(0x34c)](_0xb56ee3),this['_onConflict'](![]);}}[_0x35406f(0x37b)](){const _0x1d55c6=_0x35406f;throw new Error(_0x1d55c6(0x2bb));}[_0x35406f(0x263)](){const _0x351a91=_0x35406f;throw new Error(_0x351a91(0x2aa));}['onRemoteRetry'](){return this;}['toggleOffline'](){const _0x2e0a4d=_0x35406f;return this[_0x2e0a4d(0x1a9)](),this[_0x2e0a4d(0x157)][_0x2e0a4d(0x1d5)](OfflineState,this[_0x2e0a4d(0x27a)],this[_0x2e0a4d(0x285)],null,this[_0x2e0a4d(0x2df)],this['_handler']);}['toggleOnline'](){return this;}[_0x35406f(0x310)](_0x136a1b){const _0x31f1c8=_0x35406f,_0x3269d9=_0x136a1b!==null&&_0x136a1b!==void 0x0?_0x136a1b:this[_0x31f1c8(0x3d1)]();this[_0x31f1c8(0x151)]=new Date()[_0x31f1c8(0x38c)]()+_0x3269d9,this[_0x31f1c8(0x1e4)]=setTimeout(()=>{const _0x4503d6=_0x31f1c8;this[_0x4503d6(0x1a9)]();let _0x8c697d=null;switch(this[_0x4503d6(0x285)]){case _univerjs_core['UniverInstanceType'][_0x4503d6(0x307)]:_0x8c697d=assembleSheetChangeset(this['_pendingMutations'],this[_0x4503d6(0x27a)],this[_0x4503d6(0x3a3)],this[_0x4503d6(0x3a9)],this['_memberService']);break;case _univerjs_core[_0x4503d6(0x3b4)]['UNIVER_DOC']:if(this[_0x4503d6(0x2df)][_0x4503d6(0x1c3)](_0x34cfed=>_0x34cfed['id']===_univerjs_docs[_0x4503d6(0x368)]['id']))_0x8c697d=assembleDocChangeset(this[_0x4503d6(0x2df)],this[_0x4503d6(0x27a)],this[_0x4503d6(0x3a3)],this[_0x4503d6(0x3a9)],this[_0x4503d6(0x23a)]);else _0x8c697d=assembleSheetChangeset(this[_0x4503d6(0x2df)],this[_0x4503d6(0x27a)],this[_0x4503d6(0x3a3)],this[_0x4503d6(0x3a9)],this['_memberService']);break;default:throw new Error(_0x4503d6(0x169)+this[_0x4503d6(0x285)]+_0x4503d6(0x168));}const {changeset:_0x4922a4,pendingMutations:_0x1ba08b}=_0x8c697d;this[_0x4503d6(0x293)]['onSendChangeset'](_0x4922a4);const _0x2f31b3=_0x1ba08b[_0x4503d6(0x332)]?this[_0x4503d6(0x157)][_0x4503d6(0x1d5)](AwaitingWithPendingState,this[_0x4503d6(0x27a)],this[_0x4503d6(0x285)],_0x4922a4,_0x1ba08b,this[_0x4503d6(0x293)],void 0x0):this[_0x4503d6(0x157)][_0x4503d6(0x1d5)](AwaitingState,this[_0x4503d6(0x27a)],this['type'],_0x4922a4,this['_handler']);_0x2f31b3[_0x4503d6(0x257)](),this['_handler'][_0x4503d6(0x271)](this,_0x2f31b3);},_0x3269d9);}['_getSendChangesetTimeout'](){const _0x707f56=_0x35406f;var _0x1bc823;const _0x14dd64=this[_0x707f56(0x279)][_0x707f56(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x1bc823=_0x14dd64===null||_0x14dd64===void 0x0?void 0x0:_0x14dd64[_0x707f56(0x318)])!==null&&_0x1bc823!==void 0x0?_0x1bc823:DEFAULT_SEND_CHANGESET_TIMEOUT;}[_0x35406f(0x2a3)](){const _0x3fba3b=_0x35406f;throw new Error(_0x3fba3b(0x3cf));}['_clearScheduledTask'](){const _0x3fa74c=_0x35406f;this[_0x3fa74c(0x1e4)]!=null&&(clearTimeout(this[_0x3fa74c(0x1e4)]),this[_0x3fa74c(0x1e4)]=null);}[_0x35406f(0x314)](_0x45c938){const _0x3a7cbe=_0x35406f;return this[_0x3a7cbe(0x1a9)](),this['_injector']['createInstance'](ConflictState,this[_0x3a7cbe(0x27a)],this['type'],null,this[_0x3a7cbe(0x2df)],this[_0x3a7cbe(0x293)],_0x45c938);}};PendingState=_PendingState=__decorate([__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(MemberService)),__decorateParam(0x7,_univerjs_core['ILogService']),__decorateParam(0x8,_univerjs_core['ICommandService']),__decorateParam(0x9,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0xa,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0xb,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0xc,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0xd,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],PendingState);let AwaitingState=_AwaitingState=class AwaitingState extends CollaborationState{constructor(_0x5c1a81,_0x4f8abf,_0x275dbd,_0x29dd49,_0x3aa5ee,_0x20f202,_0x5167a4,_0x581ee2,_0x33d8c8,_0x3c8d5b,_0x3194f9){const _0xae0504=_0x35406f;super(_0x5c1a81,_0x4f8abf,_0x275dbd,[],_0x29dd49,_0x5167a4,_0x3c8d5b,_0x20f202,_0x3194f9),this['_injector']=_0x3aa5ee,this[_0xae0504(0x3ae)]=_0x581ee2,this[_0xae0504(0x300)]=_0x33d8c8,_defineProperty(this,'status',CollaborationStatus[_0xae0504(0x2bf)]),_defineProperty(this,_0xae0504(0x1fd),0x0),_defineProperty(this,_0xae0504(0x2ce),0x0),_defineProperty(this,_0xae0504(0x1ea),void 0x0),_defineProperty(this,'_sender',void 0x0);}[_0x35406f(0x2ba)](_0x729171){const _0x186ba4=_0x35406f;this[_0x186ba4(0x1a9)]();const _0x2ca7d9=this[_0x186ba4(0x157)][_0x186ba4(0x1d5)](AwaitingWithPendingState,this['unitID'],this[_0x186ba4(0x285)],this['_awaitingChangeset'],[_0x729171],this[_0x186ba4(0x293)],this[_0x186ba4(0x1ea)]);return _0x2ca7d9[_0x186ba4(0x257)](),_0x2ca7d9;}[_0x35406f(0x1ef)](_0x64412a){const _0x1339b0=_0x35406f;if(this[_0x1339b0(0x399)](_0x64412a))return this[_0x1339b0(0x1a9)](),this[_0x1339b0(0x157)][_0x1339b0(0x1d5)](FetchingMissState,this[_0x1339b0(0x27a)],this[_0x1339b0(0x285)],this[_0x1339b0(0x1f9)],[],null,[_0x64412a],this[_0x1339b0(0x293)]);try{const _0xb02f6=this[_0x1339b0(0x300)][_0x1339b0(0x31c)]([_0x64412a],[this[_0x1339b0(0x1f9)]],![]);if((0x0,_univerjs_pro_collaboration[_0x1339b0(0x1e3)])(_0xb02f6)){const {c1Prime:_0x5c0b0e,c2Prime:_0x346a64}=_0xb02f6;this[_0x1339b0(0x32c)](_0x5c0b0e[0x0]),_0x346a64[0x0]['baseRev']=this[_0x1339b0(0x215)](),this[_0x1339b0(0x1a9)]();const _0x448459=this['_injector'][_0x1339b0(0x1d5)](_AwaitingState,this[_0x1339b0(0x27a)],this[_0x1339b0(0x285)],_0x346a64[0x0],this[_0x1339b0(0x293)]);return _0x448459[_0x1339b0(0x257)](),_0x448459;}return this['_onConflict'](![]);}catch(_0xb0ae8){return this[_0x1339b0(0x3ae)]['error'](_0xb0ae8),this[_0x1339b0(0x314)](![]);}}[_0x35406f(0x37b)](_0x24ba4f){const _0x44c424=_0x35406f;this['_clearScheduledTask']();const _0x21f81c=this['_revisionService'][_0x44c424(0x129)](this[_0x44c424(0x27a)]);if(_0x24ba4f['revision']<_0x21f81c-0x1)return this;if(this[_0x44c424(0x399)](_0x24ba4f))return this[_0x44c424(0x157)][_0x44c424(0x1d5)](FetchingMissState,this[_0x44c424(0x27a)],this[_0x44c424(0x285)],null,[],this['_awaitingChangeset'],[],this[_0x44c424(0x293)]);this[_0x44c424(0x119)]();const _0x3f2beb=this[_0x44c424(0x157)][_0x44c424(0x1d5)](SyncedState,this[_0x44c424(0x27a)],this['type'],this['_handler']);return _0x3f2beb[_0x44c424(0x257)](),_0x3f2beb;}[_0x35406f(0x263)](_0x351ab7){const _0x2e8e57=_0x35406f;return this[_0x2e8e57(0x314)](!!(_0x351ab7===null||_0x351ab7===void 0x0?void 0x0:_0x351ab7[_0x2e8e57(0x39c)]));}[_0x35406f(0x30c)](_0x5144b7){const _0x2b8a62=_0x35406f;if(this[_0x2b8a62(0x2ce)]>MAX_RETRY_TOTAL_TIMEOUT)return this[_0x2b8a62(0x24f)]();return this[_0x2b8a62(0x1ea)]=createTimerObservable$(this[_0x2b8a62(0x1fd)],{'timeout':this[_0x2b8a62(0x1fd)],'reqId':_0x5144b7[_0x2b8a62(0x3b7)]}),this[_0x2b8a62(0xff)]=this[_0x2b8a62(0x1ea)][_0x2b8a62(0x2b5)](({reqId:_0x2cde62,timeout:_0x47518f})=>{const _0x5857ac=_0x2b8a62;this[_0x5857ac(0x115)](_0x2cde62,_0x47518f);}),this;}[_0x35406f(0x24f)](){const _0x356cd8=_0x35406f;return this[_0x356cd8(0x1a9)](),this[_0x356cd8(0x157)][_0x356cd8(0x1d5)](OfflineState,this['unitID'],this[_0x356cd8(0x285)],this[_0x356cd8(0x1f9)],[],this['_handler']);}[_0x35406f(0x14f)](){return this;}[_0x35406f(0x2a3)](){const _0x38d42e=_0x35406f;this[_0x38d42e(0x293)][_0x38d42e(0x346)](this[_0x38d42e(0x1f9)]);}['_onConflict'](_0x4956d5){const _0x20f38c=_0x35406f;return this[_0x20f38c(0x1a9)](),this[_0x20f38c(0x157)][_0x20f38c(0x1d5)](ConflictState,this[_0x20f38c(0x27a)],this[_0x20f38c(0x285)],this['_awaitingChangeset'],[],this[_0x20f38c(0x293)],_0x4956d5);}[_0x35406f(0x115)](_0x4ac136,_0x563e4b){const _0x5a6356=_0x35406f;var _0x28ab2a;_0x4ac136===((_0x28ab2a=this[_0x5a6356(0x1f9)])===null||_0x28ab2a===void 0x0?void 0x0:_0x28ab2a[_0x5a6356(0x3b7)])&&(this[_0x5a6356(0x2a3)](),this['_resendTimeout']=_0x563e4b===0x0?0x3e8:Math['min'](_0x563e4b*0x2,MAX_RETRY_TIMEOUT),this[_0x5a6356(0x2ce)]+=this[_0x5a6356(0x1fd)]);}[_0x35406f(0x1a9)](){var _0x2c897b;(_0x2c897b=this['_sender'])===null||_0x2c897b===void 0x0||_0x2c897b['unsubscribe'](),this['_resendTimeout']=0x0,this['_maxTotalRetryTimeout']=0x0;}};AwaitingState=_AwaitingState=__decorate([__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration['RevisionService'])),__decorateParam(0x6,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x7,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x8,_univerjs_pro_collaboration['ITransformService']),__decorateParam(0x9,_univerjs_core['IUndoRedoService']),__decorateParam(0xa,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],AwaitingState);let AwaitingWithPendingState=_AwaitingWithPendingState=class AwaitingWithPendingState extends CollaborationState{constructor(_0x377571,_0x3c8e47,_0x13a1c4,_0x42537d,_0x23a7e3,_0x2f1a0b,_0x56c187,_0x2d9755,_0x267f50,_0x1694d3,_0x40ac45,_0xb59d80,_0x7e5efe){const _0x35eceb=_0x35406f;super(_0x377571,_0x3c8e47,_0x13a1c4,_0x42537d,_0x23a7e3,_0x267f50,_0xb59d80,_0x2d9755,_0x7e5efe),this[_0x35eceb(0x157)]=_0x56c187,this[_0x35eceb(0x3ae)]=_0x1694d3,this['_transformService']=_0x40ac45,this['localCacheService']=_0x7e5efe,_defineProperty(this,'status',CollaborationStatus['AWAITING_WITH_PENDING']),_defineProperty(this,'_resendTimeout',0x0),_defineProperty(this,_0x35eceb(0x2ce),0x0),_defineProperty(this,'_resendTimer',void 0x0),_defineProperty(this,'_sender',void 0x0),_0x2f1a0b&&(this[_0x35eceb(0x1ea)]=_0x2f1a0b,this[_0x35eceb(0xff)]=this[_0x35eceb(0x1ea)]['subscribe'](({reqId:_0x59fb50,timeout:_0x1df7f5})=>{this['_resendWithTimeout'](_0x59fb50,_0x1df7f5);}));}[_0x35406f(0x2ba)](_0x402e66){const _0x61eb89=_0x35406f;return this[_0x61eb89(0x2df)][_0x61eb89(0x17b)](_0x402e66),this;}[_0x35406f(0x1ef)](_0x31052b){const _0x59b880=_0x35406f;if(this[_0x59b880(0x399)](_0x31052b))return this['_clearScheduledTask'](),this['_injector'][_0x59b880(0x1d5)](FetchingMissState,this[_0x59b880(0x27a)],this['type'],this[_0x59b880(0x1f9)],this['_pendingMutations'],null,[_0x31052b],this[_0x59b880(0x293)]);try{const _0xcbb666=this[_0x59b880(0x300)][_0x59b880(0x31c)]([_0x31052b],[this[_0x59b880(0x1f9)]],![]);if((0x0,_univerjs_pro_collaboration[_0x59b880(0x1e3)])(_0xcbb666)){const {c1Prime:_0x26986c,c2Prime:_0x5cf2d4}=_0xcbb666,_0x516fc9=this[_0x59b880(0x300)][_0x59b880(0x23f)](_0x26986c[0x0],this[_0x59b880(0x2df)]);if((0x0,_univerjs_pro_collaboration[_0x59b880(0x30b)])(_0x516fc9)){const {c1Prime:_0x4a180c,m2Prime:_0x331c23}=_0x516fc9;return this[_0x59b880(0x32c)](_0x4a180c),_0x5cf2d4[0x0]['baseRev']=this[_0x59b880(0x215)](),this[_0x59b880(0x1a9)](),this[_0x59b880(0x157)]['createInstance'](_AwaitingWithPendingState,this[_0x59b880(0x27a)],this[_0x59b880(0x285)],_0x5cf2d4[0x0],_0x331c23,this[_0x59b880(0x293)],void 0x0);}throw _0x516fc9[_0x59b880(0x34c)];}throw _0xcbb666['error'];}catch(_0xab23eb){return this['_logService'][_0x59b880(0x34c)](_0xab23eb),this[_0x59b880(0x314)](![]);}}[_0x35406f(0x37b)](_0x4981b7){const _0x5cec97=_0x35406f;this[_0x5cec97(0x1a9)]();if(this[_0x5cec97(0x399)](_0x4981b7))return this[_0x5cec97(0x157)]['createInstance'](FetchingMissState,this[_0x5cec97(0x27a)],this['type'],null,this['_pendingMutations'],this[_0x5cec97(0x1f9)],[],this[_0x5cec97(0x293)]);this['_incrementRevisionNumber']();const _0x1a7efe=this[_0x5cec97(0x157)][_0x5cec97(0x1d5)](PendingState,this[_0x5cec97(0x27a)],this[_0x5cec97(0x285)],this[_0x5cec97(0x2df)],this['_handler']);return _0x1a7efe[_0x5cec97(0x310)](),_0x1a7efe[_0x5cec97(0x257)](),_0x1a7efe;}['onRemoteRej'](_0x1b3c09){const _0x3256ba=_0x35406f;return this[_0x3256ba(0x314)](!!(_0x1b3c09===null||_0x1b3c09===void 0x0?void 0x0:_0x1b3c09[_0x3256ba(0x39c)]));}['onRemoteRetry'](_0x479797){const _0x537788=_0x35406f;if(this[_0x537788(0x2ce)]>MAX_RETRY_TOTAL_TIMEOUT)return this[_0x537788(0x24f)]();return this[_0x537788(0x1ea)]=createTimerObservable$(this['_resendTimeout'],{'timeout':this[_0x537788(0x1fd)],'reqId':_0x479797[_0x537788(0x3b7)]}),this['_sender']=this[_0x537788(0x1ea)][_0x537788(0x2b5)](({reqId:_0x343052,timeout:_0x93c133})=>{const _0x29a2d2=_0x537788;this[_0x29a2d2(0x115)](_0x343052,_0x93c133);}),this;}[_0x35406f(0x24f)](){const _0x6c4cf9=_0x35406f;return this[_0x6c4cf9(0x1a9)](),this['_injector'][_0x6c4cf9(0x1d5)](OfflineState,this[_0x6c4cf9(0x27a)],this['type'],this['_awaitingChangeset'],this[_0x6c4cf9(0x2df)],this[_0x6c4cf9(0x293)]);}[_0x35406f(0x14f)](){return this;}[_0x35406f(0x2a3)](){const _0x2a145c=_0x35406f;this[_0x2a145c(0x293)][_0x2a145c(0x346)](this[_0x2a145c(0x1f9)]);}['_onConflict'](_0x5f0f9f){const _0x3d54e9=_0x35406f;return this[_0x3d54e9(0x1a9)](),this['_injector'][_0x3d54e9(0x1d5)](ConflictState,this[_0x3d54e9(0x27a)],this[_0x3d54e9(0x285)],null,this['_pendingMutations'],this[_0x3d54e9(0x293)],_0x5f0f9f);}['_resendWithTimeout'](_0x5724a2,_0x3fca13){const _0x10dc9a=_0x35406f;var _0x12380b;_0x5724a2===((_0x12380b=this['_awaitingChangeset'])===null||_0x12380b===void 0x0?void 0x0:_0x12380b[_0x10dc9a(0x3b7)])&&(this[_0x10dc9a(0x2a3)](),this[_0x10dc9a(0x1fd)]=_0x3fca13===0x0?0x3e8:Math[_0x10dc9a(0x19a)](_0x3fca13*0x2,MAX_RETRY_TIMEOUT),this[_0x10dc9a(0x2ce)]+=this['_resendTimeout']);}[_0x35406f(0x1a9)](){const _0x4aa9fb=_0x35406f;var _0x4ba1ae;(_0x4ba1ae=this[_0x4aa9fb(0xff)])===null||_0x4ba1ae===void 0x0||_0x4ba1ae[_0x4aa9fb(0x33a)](),this['_resendTimeout']=0x0,this[_0x4aa9fb(0x2ce)]=0x0;}};AwaitingWithPendingState=_AwaitingWithPendingState=__decorate([__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x7,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x8,_univerjs_core['ICommandService']),__decorateParam(0x9,_univerjs_core['ILogService']),__decorateParam(0xa,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0xb,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],AwaitingWithPendingState);let ConflictState=class ConflictState extends CollaborationState{constructor(_0x124daa,_0x9ec5fd,_0x26d2aa,_0x222d90,_0x27754e,_0x4616ef=![],_0x255bbb,_0xae9a59,_0x207a1e,_0x58beba,_0x97157a,_0x330423,_0x2eb758){const _0x31a314=_0x35406f;super(_0x124daa,_0x9ec5fd,_0x26d2aa,_0x222d90,_0x27754e,_0xae9a59,_0x207a1e,_0x58beba,_0x2eb758),this[_0x31a314(0x246)]=_0x4616ef,this[_0x31a314(0x36e)]=_0x255bbb,this[_0x31a314(0x2cd)]=_0x97157a,this[_0x31a314(0x24d)]=_0x330423,this[_0x31a314(0x296)]=_0x2eb758,_defineProperty(this,_0x31a314(0x1c5),CollaborationStatus[_0x31a314(0x111)]),this['_showConflictNotification'](),this[_0x31a314(0x2fe)](),this[_0x31a314(0x3a6)]();}[_0x35406f(0x2ba)](){return this;}[_0x35406f(0x1ef)](){return this;}[_0x35406f(0x37b)](){return this;}[_0x35406f(0x263)](){return this;}[_0x35406f(0x30c)](){return this;}[_0x35406f(0x24f)](){return this;}[_0x35406f(0x14f)](){return this;}[_0x35406f(0x2a3)](){throw new Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x35406f(0x2fe)](){const _0x170240=_0x35406f;var _0x26570c;(_0x26570c=this['_localCacheService'])===null||_0x26570c===void 0x0||_0x26570c[_0x170240(0x30a)](this[_0x170240(0x27a)],this[_0x170240(0x285)],null,[]);}[_0x35406f(0x2c7)](){const _0x4ddd10=_0x35406f;if(this[_0x4ddd10(0x246)])this[_0x4ddd10(0x24d)][_0x4ddd10(0x190)]({'id':CollaborationUIEventId[_0x4ddd10(0x231)]});else this[_0x4ddd10(0x24d)]['emitEvent']({'id':CollaborationUIEventId[_0x4ddd10(0x111)]});}[_0x35406f(0x3a6)](){const _0x290177=_0x35406f;this[_0x290177(0x36e)][_0x290177(0x29e)](new _univerjs_sheets[(_0x290177(0x213))](this[_0x290177(0x27a)])['id'],![]);}};ConflictState=__decorate([__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x192)])),__decorateParam(0x7,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x8,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration['RevisionService'])),__decorateParam(0xa,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x10b)])),__decorateParam(0xb,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],ConflictState);let OfflineState=class OfflineState extends CollaborationState{constructor(_0x4d37dc,_0x4ee9e8,_0x43095d,_0x47c812,_0x5968f2,_0x3b4d39,_0x58a044,_0xad272a,_0x5b8e84,_0x12cb7d){const _0x1363aa=_0x35406f;super(_0x4d37dc,_0x4ee9e8,_0x43095d,_0x47c812,_0x5968f2,_0xad272a,_0x5b8e84,_0x58a044,_0x12cb7d),this[_0x1363aa(0x157)]=_0x3b4d39,_defineProperty(this,'status',CollaborationStatus[_0x1363aa(0x3af)]);}[_0x35406f(0x2ba)](_0x406fb){const _0xd04061=_0x35406f;return this[_0xd04061(0x2df)][_0xd04061(0x17b)](_0x406fb),this[_0xd04061(0x257)](),this;}[_0x35406f(0x1ef)](_0x1d65d2){const _0x4fdca8=_0x35406f;throw new Error(_0x4fdca8(0x31b));}[_0x35406f(0x37b)](){throw new Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x35406f(0x263)](){throw new Error('[OfflineState]:\x20received\x20rejection.');}[_0x35406f(0x30c)](){return this;}['toggleOffline'](){return this;}['toggleOnline'](){const _0x350592=_0x35406f,{_injector:_0x1fba6d,_pendingMutations:_0x48df61,_awaitingChangeset:_0x24afa6,unitID:_0x5071b4,_handler:_0x40a303,type:_0x1e313e}=this,_0x3d9627=createOnlineState(_0x1fba6d,_0x5071b4,_0x1e313e,_0x24afa6,_0x48df61,_0x40a303);if(_0x3d9627 instanceof PendingState)_0x3d9627['_schedule']();else{if(_0x3d9627 instanceof AwaitingWithPendingState||_0x3d9627 instanceof AwaitingState)_0x3d9627[_0x350592(0x2a3)]();}return _0x3d9627;}[_0x35406f(0x2a3)](){const _0x292fbf=_0x35406f;throw new Error(_0x292fbf(0x2f8));}};OfflineState=__decorate([__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x8,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],OfflineState);let FetchingMissState=class FetchingMissState extends CollaborationState{constructor(_0x3ff3f2,_0x1924ed,_0x33a369,_0x2d484d,_0x2c4006,_0x50ab2e,_0x25c839,_0x19c895,_0x33ce83,_0x401d20,_0xa18351,_0x50773b,_0x40bf56,_0x395283){const _0x3584a3=_0x35406f;super(_0x3ff3f2,_0x1924ed,_0x33a369,_0x2d484d,_0x25c839,_0xa18351,_0x50773b,_0x33ce83,_0x395283),this[_0x3584a3(0x19f)]=_0x2c4006,this[_0x3584a3(0x1b4)]=_0x50ab2e,this[_0x3584a3(0x157)]=_0x19c895,this[_0x3584a3(0x3ae)]=_0x401d20,this['_transformService']=_0x40bf56,this['localCacheService']=_0x395283,_defineProperty(this,_0x3584a3(0x1c5),CollaborationStatus[_0x3584a3(0x35f)]);}[_0x35406f(0x2e2)](_0x5354b1){const _0x39735d=_0x35406f;try{const _0x59dc3a=[..._0x5354b1,...this[_0x39735d(0x1b4)]],_0x1a8643=[this[_0x39735d(0x1f9)]||this[_0x39735d(0x19f)]][_0x39735d(0x2e7)](_0x37f27b=>!!_0x37f27b);let _0x486b4b,_0x2bf8dd;if(_0x1a8643['length']){const _0x4843c4=this['_transformService'][_0x39735d(0x31c)](_0x59dc3a,_0x1a8643,![]);if(!(0x0,_univerjs_pro_collaboration[_0x39735d(0x1e3)])(_0x4843c4))throw _0x4843c4[_0x39735d(0x34c)];_0x486b4b=_0x4843c4[_0x39735d(0x302)],_0x2bf8dd=_0x4843c4['c2Prime'];}else _0x486b4b=_0x59dc3a,_0x2bf8dd=[];let _0x2c5c5c=this[_0x39735d(0x2df)];_0x486b4b['forEach'](_0x32bc16=>{const _0x1f5414=_0x39735d;let _0x48359c;if(_0x2c5c5c[_0x1f5414(0x332)]){const _0x2e2088=this[_0x1f5414(0x300)][_0x1f5414(0x23f)](_0x32bc16,_0x2c5c5c);if(!(0x0,_univerjs_pro_collaboration[_0x1f5414(0x30b)])(_0x2e2088))throw _0x2e2088[_0x1f5414(0x34c)];_0x48359c=_0x2e2088[_0x1f5414(0x302)],_0x2c5c5c=_0x2e2088[_0x1f5414(0x1d6)];}else _0x48359c=_0x32bc16;this[_0x1f5414(0x32c)](_0x48359c);});if(this[_0x39735d(0x19f)])this[_0x39735d(0x119)]();if(this[_0x39735d(0x1f9)]&&_0x2bf8dd[_0x39735d(0x332)])_0x2bf8dd[0x0]['baseRev']=this[_0x39735d(0x215)]();let _0x2bd05b;if(this[_0x39735d(0x1f9)]&&_0x2c5c5c[_0x39735d(0x332)]!==0x0)_0x2bd05b=this[_0x39735d(0x157)]['createInstance'](AwaitingWithPendingState,this[_0x39735d(0x27a)],this[_0x39735d(0x285)],_0x2bf8dd[0x0],_0x2c5c5c,this['_handler'],void 0x0);else{if(this['_awaitingChangeset']&&_0x2c5c5c[_0x39735d(0x332)]===0x0)_0x2bf8dd[0x0][_0x39735d(0x32e)]=this[_0x39735d(0x215)](),_0x2bd05b=this['_injector'][_0x39735d(0x1d5)](AwaitingState,this[_0x39735d(0x27a)],this[_0x39735d(0x285)],_0x2bf8dd[0x0],this[_0x39735d(0x293)]);else{if(_0x2c5c5c[_0x39735d(0x332)]!==0x0){const _0x45490e=this[_0x39735d(0x157)]['createInstance'](PendingState,this[_0x39735d(0x27a)],this['type'],_0x2c5c5c,this['_handler']);_0x45490e[_0x39735d(0x310)](),_0x2bd05b=_0x45490e;}else _0x2bd05b=this[_0x39735d(0x157)][_0x39735d(0x1d5)](SyncedState,this[_0x39735d(0x27a)],this['type'],this[_0x39735d(0x293)]);}}return _0x2bd05b[_0x39735d(0x257)](),_0x2bd05b;}catch(_0x19e474){return this[_0x39735d(0x3ae)][_0x39735d(0x34c)](_0x39735d(0x236),_0x39735d(0x322),_0x19e474),this[_0x39735d(0x157)][_0x39735d(0x1d5)](ConflictState,this[_0x39735d(0x27a)],this[_0x39735d(0x285)],this[_0x39735d(0x1f9)],this['_pendingMutations'],this[_0x39735d(0x293)],![]);}}[_0x35406f(0x2a3)](){const _0x506fbb=_0x35406f;throw new Error(_0x506fbb(0x148));}[_0x35406f(0x2ba)](_0x5181ea){const _0x23b8f2=_0x35406f;return this[_0x23b8f2(0x2df)]['push'](_0x5181ea),this;}[_0x35406f(0x1ef)](_0x57328a){const _0x1e75e3=_0x35406f;return this[_0x1e75e3(0x1b4)][_0x1e75e3(0x17b)](_0x57328a),this;}[_0x35406f(0x37b)](_0x70df4){const _0x3ec9b4=_0x35406f;if(this[_0x3ec9b4(0x1f9)])return this[_0x3ec9b4(0x19f)]=this['_awaitingChangeset'],this['_awaitingChangeset']=null,this;throw new Error(_0x3ec9b4(0x18f));}['onRemoteRej'](_0x4d7c4e){const _0x5e1909=_0x35406f;return this[_0x5e1909(0x314)](!!(_0x4d7c4e===null||_0x4d7c4e===void 0x0?void 0x0:_0x4d7c4e[_0x5e1909(0x39c)]));}[_0x35406f(0x30c)](){return this;}['toggleOffline'](){const _0x2a6c18=_0x35406f;return this[_0x2a6c18(0x157)][_0x2a6c18(0x1d5)](OfflineState,this[_0x2a6c18(0x27a)],this[_0x2a6c18(0x285)],this[_0x2a6c18(0x1f9)],this[_0x2a6c18(0x2df)],this[_0x2a6c18(0x293)]);}['toggleOnline'](){return this;}[_0x35406f(0x314)](_0x22e115){const _0x19877d=_0x35406f;return this['_injector']['createInstance'](ConflictState,this[_0x19877d(0x27a)],this[_0x19877d(0x285)],this[_0x19877d(0x1f9)],this['_pendingMutations'],this[_0x19877d(0x293)],_0x22e115);}};FetchingMissState=__decorate([__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core['Injector'])),__decorateParam(0x8,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x9,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0xa,_univerjs_core['ICommandService']),__decorateParam(0xb,_univerjs_core['IUndoRedoService']),__decorateParam(0xc,_univerjs_pro_collaboration['ITransformService']),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],FetchingMissState);function createOnlineState(_0x1dae71,_0x3d4be9,_0x406632,_0x157567,_0x42fc1b,_0x2dd95b){const _0x3dece1=_0x35406f;if(_0x157567&&_0x42fc1b['length'])return _0x1dae71['createInstance'](AwaitingWithPendingState,_0x3d4be9,_0x406632,_0x157567,_0x42fc1b,_0x2dd95b,void 0x0);if(_0x157567)return _0x1dae71[_0x3dece1(0x1d5)](AwaitingState,_0x3d4be9,_0x406632,_0x157567,_0x2dd95b);if(_0x42fc1b[_0x3dece1(0x332)])return _0x1dae71[_0x3dece1(0x1d5)](PendingState,_0x3d4be9,_0x406632,_0x42fc1b,_0x2dd95b);return _0x1dae71[_0x3dece1(0x1d5)](SyncedState,_0x3d4be9,_0x406632,_0x2dd95b);}let CollaborationEntity=class CollaborationEntity extends _univerjs_core[_0x35406f(0x388)]{get[_0x35406f(0x1ac)](){const _0x3aa050=_0x35406f;return this[_0x3aa050(0x362)];}constructor(_0x440583,_0x4ca69c,_0x39bc1d,_0x160d3a,_0x579f98,_0x108f98,_0x5db4a2,_0x5e0e8a,_0x165f2f,_0x457b83,_0x32221d,_0x21fefa,_0xb3d0f7,_0x5ca859){const _0xb6c228=_0x35406f;super(),this[_0xb6c228(0x27a)]=_0x440583,this['session']=_0x4ca69c,this[_0xb6c228(0x13c)]=_0x39bc1d,this['_injector']=_0x160d3a,this[_0xb6c228(0x183)]=_0x579f98,this['_localeService']=_0x108f98,this[_0xb6c228(0x3a9)]=_0x5db4a2,this[_0xb6c228(0x1fe)]=_0x5e0e8a,this[_0xb6c228(0x3a3)]=_0x165f2f,this[_0xb6c228(0x3ae)]=_0x457b83,this[_0xb6c228(0x2b6)]=_0x32221d,this['_permissionService']=_0x21fefa,this['_singleActiveUnitService']=_0xb3d0f7,this[_0xb6c228(0x3d4)]=_0x5ca859,_defineProperty(this,_0xb6c228(0x3a4),new rxjs['BehaviorSubject'](null)),_defineProperty(this,_0xb6c228(0x37a),this[_0xb6c228(0x3a4)][_0xb6c228(0x25c)]()),_defineProperty(this,_0xb6c228(0x362),void 0x0),_defineProperty(this,_0xb6c228(0x3bd),![]),_defineProperty(this,_0xb6c228(0x114),''),_defineProperty(this,_0xb6c228(0x2bd),0x0),_defineProperty(this,_0xb6c228(0x32f),this[_0xb6c228(0x37a)][_0xb6c228(0x38a)]((0x0,rxjs[_0xb6c228(0x173)])(_0x5ca505=>{const _0x20f49b=_0xb6c228;if(_0x5ca505)return _0x5ca505[_0x20f49b(0x1c5)];return CollaborationStatus['OFFLINE'];}),(0x0,rxjs[_0xb6c228(0x117)])(0x1))),_defineProperty(this,_0xb6c228(0x39e),![]),_defineProperty(this,_0xb6c228(0x36c),[]);}async[_0x35406f(0x35b)](){const _0x50900=_0x35406f;if(this['state'])throw new Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x50900(0x380)]();}['pauseCollaboration'](){const _0x4f6765=_0x35406f;return this['_collaborationPaused']=!![],(0x0,_univerjs_core[_0x4f6765(0x266)])(()=>{const _0x41fac4=_0x4f6765;this[_0x41fac4(0x3bd)]=![],this[_0x41fac4(0x1ab)]();});}[_0x35406f(0x2b0)](_0x428775){const _0xf0ff4c=_0x35406f;this[_0xf0ff4c(0x110)](_0x428775);}[_0x35406f(0x23e)](_0xf54158){const _0x2a4501=_0x35406f;this[_0x2a4501(0x362)]=_0xf54158,this[_0x2a4501(0x3a4)][_0x2a4501(0x2b4)](_0xf54158);}async[_0x35406f(0x380)](){const _0x2b3124=_0x35406f;this[_0x2b3124(0x23e)](await this[_0x2b3124(0x239)]());if(this[_0x2b3124(0x2ef)]){var _0x21efb3;(_0x21efb3=this['_singleActiveUnitService'])===null||_0x21efb3===void 0x0||_0x21efb3['editingUnit'](this[_0x2b3124(0x27a)]),this[_0x2b3124(0x367)](this[_0x2b3124(0x2ef)]['getUnitStatus$'](this['unitID'])[_0x2b3124(0x2b5)](_0x3d3aef=>{const _0x48d80d=_0x2b3124;this[_0x48d80d(0x3ae)][_0x48d80d(0x2f7)](_0x48d80d(0x343),_0x48d80d(0x255),_0x3d3aef),_0x3d3aef===UnitStatus[_0x48d80d(0x2f4)]?(this[_0x48d80d(0x1fe)][_0x48d80d(0x190)]({'id':CollaborationUIEventId[_0x48d80d(0xfc)]}),this[_0x48d80d(0x36e)][_0x48d80d(0x29e)](new _univerjs_sheets[(_0x48d80d(0x213))](this[_0x48d80d(0x27a)])['id'],![]),this[_0x48d80d(0x36e)][_0x48d80d(0x234)](![])):(this[_0x48d80d(0x36e)][_0x48d80d(0x29e)](new _univerjs_sheets[(_0x48d80d(0x213))](this[_0x48d80d(0x27a)])['id'],!![]),this['_permissionService'][_0x48d80d(0x234)](!![]));}));}let _0x3efaed=![];return this[_0x2b3124(0x367)](this['session']['sessionStatus$'][_0x2b3124(0x2b5)](_0x4c99f4=>{const _0x47051d=_0x2b3124;if(_0x4c99f4===SessionStatus['ONLINE'])this[_0x47051d(0x2d7)](_0x3efaed);else _0x4c99f4===SessionStatus[_0x47051d(0x3af)]&&(_0x3efaed=!![],this['_toggleOffline']());})),this['disposeWithMe'](this[_0x2b3124(0x224)][_0x2b3124(0x195)][_0x2b3124(0x2b5)](_0x300a23=>{const _0x192c1c=_0x2b3124;try{switch(_0x300a23[_0x192c1c(0x258)]){case _univerjs_pro_collaboration[_0x192c1c(0x1ae)]['NEW_CHANGESETS']:this[_0x192c1c(0x19e)]((0x0,_univerjs_pro_collaboration['parseProtocolChangeset'])(_0x300a23[_0x192c1c(0x1b8)]));break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x2ec)]:this['_onRemoteACK'](_0x300a23[_0x192c1c(0x1b8)]);break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)]['CHANGESET_REJ']:this[_0x192c1c(0x345)]();break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x20c)]:this[_0x192c1c(0x39b)](_0x300a23[_0x192c1c(0x1b8)]);break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x298)]:this['_onFetchMissResult'](_0x300a23['data'][_0x192c1c(0x20b)][_0x192c1c(0x173)](_0x1c5f73=>(0x0,_univerjs_pro_collaboration[_0x192c1c(0x256)])(_0x1c5f73)));break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x1af)]:this[_0x192c1c(0x345)]({'isPermissionRej':!![]});break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x192c1c(0x130)]:break;}}catch(_0x19af34){console[_0x192c1c(0x34c)](_0x192c1c(0x2d6),_0x19af34);throw _0x19af34;}})),this['_state'];}[_0x35406f(0x165)](){const _0x234dc2=_0x35406f;this[_0x234dc2(0x39e)]=![];}[_0x35406f(0x22d)](){const _0x55a5ec=_0x35406f;if(this['_transitionLocked'])throw new Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x55a5ec(0x39e)]=!![];}[_0x35406f(0x110)](_0x5ee4b1){const _0x28143b=_0x35406f;this[_0x28143b(0x22d)](),this[_0x28143b(0x23e)](this[_0x28143b(0x362)][_0x28143b(0x2ba)](_0x5ee4b1)),this[_0x28143b(0x165)]();}[_0x35406f(0x19e)](_0x2170b9){const _0x3bc14e=_0x35406f;if(_0x2170b9['revision']<=this[_0x3bc14e(0x3a9)]['getCurrentRevOfUnit'](this[_0x3bc14e(0x27a)]))return;if(this[_0x3bc14e(0x3bd)]){this[_0x3bc14e(0x36c)]['push'](_0x2170b9);return;}this[_0x3bc14e(0x1fb)](_0x2170b9);}[_0x35406f(0x1ab)](){const _0x6528bd=_0x35406f;this[_0x6528bd(0x36c)][_0x6528bd(0x320)](_0x3f0949=>this[_0x6528bd(0x1fb)](_0x3f0949)),this[_0x6528bd(0x36c)]=[];}[_0x35406f(0x1fb)](_0x51017d){const _0x3b078c=_0x35406f,_0x113fa0=this['_compressMutationService']['interceptor'][_0x3b078c(0x162)](this[_0x3b078c(0x183)][_0x3b078c(0xfa)]['getInterceptPoints']()[_0x3b078c(0x104)])(_0x51017d['mutations'],null)||_0x51017d[_0x3b078c(0x372)],_0x4c15a7={..._0x51017d,'mutations':_0x113fa0};this['_lockTransition'](),this[_0x3b078c(0x23e)](this[_0x3b078c(0x362)][_0x3b078c(0x1ef)](_0x4c15a7)),this['_unlockTransition']();}['_onRemoteACK'](_0x579a08){const _0x4ed137=_0x35406f;this[_0x4ed137(0x22d)](),this['_updateState'](this[_0x4ed137(0x362)]['onRemoteAck'](_0x579a08)),this[_0x4ed137(0x165)]();}[_0x35406f(0x345)](_0x4a2115){const _0x3ee19e=_0x35406f;this['_lockTransition'](),this['_updateState'](this[_0x3ee19e(0x362)][_0x3ee19e(0x263)](_0x4a2115)),this[_0x3ee19e(0x165)]();}['_onRemoteRetry'](_0x554700){const _0x28ad73=_0x35406f;this['_lockTransition'](),this['_updateState'](this[_0x28ad73(0x362)][_0x28ad73(0x30c)](_0x554700)),this[_0x28ad73(0x165)]();}['_onFetchMissResult'](_0x40c43e){const _0x106c0f=_0x35406f;if(!(this[_0x106c0f(0x362)]instanceof FetchingMissState))throw new TypeError(_0x106c0f(0x1e0));const _0x39b01c=_0x40c43e['map'](_0x46d7a2=>{const _0x20ec93=_0x106c0f,_0x2be703=this[_0x20ec93(0x183)][_0x20ec93(0xfa)][_0x20ec93(0x162)](this[_0x20ec93(0x183)][_0x20ec93(0xfa)][_0x20ec93(0x154)]()['COMPRESS_MUTATION_APPLY'])(_0x46d7a2[_0x20ec93(0x372)],null)||_0x46d7a2[_0x20ec93(0x372)];return{..._0x46d7a2,'mutations':_0x2be703};});this['_lockTransition'](),this[_0x106c0f(0x23e)](this['_state'][_0x106c0f(0x2e2)](_0x39b01c)),this[_0x106c0f(0x165)]();}[_0x35406f(0x2fb)](){const _0x2c3da9=_0x35406f;this[_0x2c3da9(0x22d)](),this[_0x2c3da9(0x23e)](this[_0x2c3da9(0x362)][_0x2c3da9(0x24f)]()),this['_unlockTransition']();}[_0x35406f(0x2d7)](_0x1d6730=![]){const _0x5b60ec=_0x35406f;this[_0x5b60ec(0x22d)](),this[_0x5b60ec(0x23e)](this[_0x5b60ec(0x362)][_0x5b60ec(0x14f)]()),this[_0x5b60ec(0x165)]();const _0x1009f7=this['_state'];_0x1d6730&&_0x1009f7 instanceof SyncedState&&(this['_lockTransition'](),this['_updateState'](_0x1009f7['fetchMiss']()),this[_0x5b60ec(0x165)]());}async[_0x35406f(0x239)](){return new Promise(_0x542664=>{const _0x16b5ef=_0x4d20;this['session'][_0x16b5ef(0x1ce)][_0x16b5ef(0x38a)]((0x0,rxjs[_0x16b5ef(0x100)])(0x1))[_0x16b5ef(0x2b5)](async _0x1bcf5f=>{const _0x242437=_0x16b5ef;_0x542664(await this[_0x242437(0x3c6)](_0x1bcf5f===SessionStatus[_0x242437(0x27c)]));});});}['_createHandler'](){const _0x25f5fe=_0x35406f,_0x3571f5=this[_0x25f5fe(0x27a)];return{'onStateChange':(_0x5afd13,_0x345ddd)=>{const _0x32b109=_0x25f5fe;if(_0x5afd13!==this['_state'])throw new Error(_0x32b109(0x3b8)+_0x5afd13[_0x32b109(0x1c5)]+'\x0aAfter:\x20'+_0x345ddd[_0x32b109(0x1c5)]+_0x32b109(0x107)+this[_0x32b109(0x362)][_0x32b109(0x1c5)]);this[_0x32b109(0x23e)](_0x345ddd);},'onSendChangeset':_0x446717=>{const _0xcd71d=_0x25f5fe;!_0x446717[_0xcd71d(0x15a)]&&(_0x446717[_0xcd71d(0x15a)]=this[_0xcd71d(0x114)],_0x446717[_0xcd71d(0x3b7)]=++this[_0xcd71d(0x2bd)]);const _0x344f24={'eventID':_univerjs_pro_collaboration[_0xcd71d(0x1ae)][_0xcd71d(0x2a1)],'data':{'unitID':_0x446717[_0xcd71d(0x27a)],'unitType':this['_type'],'changeset':_0x446717,'memberID':this['session'][_0xcd71d(0x18d)]()}};this[_0xcd71d(0x224)][_0xcd71d(0xfd)](_0x344f24,this[_0xcd71d(0x27a)]);},'onMissingChangesets':({from:_0x4cb65a,to:_0x241e4b})=>{const _0x3c2fb0=_0x25f5fe;this['_logService'][_0x3c2fb0(0x2f7)]('[CollaborationEntity]',_0x3c2fb0(0x135)+_0x4cb65a+'\x20to\x20'+_0x241e4b);const _0x5b47c7={'eventID':_univerjs_pro_collaboration[_0x3c2fb0(0x1ae)][_0x3c2fb0(0x149)],'data':{'unitID':_0x3571f5,'unitType':this[_0x3c2fb0(0x13c)],'from':_0x4cb65a,'to':_0x241e4b}};this[_0x3c2fb0(0x224)]['send'](_0x5b47c7,this[_0x3c2fb0(0x27a)]);}};}async[_0x35406f(0x3c6)](_0x547e53){const _0x2f2f06=_0x35406f;var _0x4ea874,_0x248895,_0x39bff2;const _0x593bfc=await((_0x4ea874=this[_0x2f2f06(0x3d4)])===null||_0x4ea874===void 0x0?void 0x0:_0x4ea874[_0x2f2f06(0x3ac)](this[_0x2f2f06(0x27a)])),_0x1dce4b=(_0x248895=_0x593bfc===null||_0x593bfc===void 0x0?void 0x0:_0x593bfc[_0x2f2f06(0x372)])!==null&&_0x248895!==void 0x0?_0x248895:[],_0x1578eb=(_0x39bff2=_0x593bfc===null||_0x593bfc===void 0x0?void 0x0:_0x593bfc[_0x2f2f06(0x373)])!==null&&_0x39bff2!==void 0x0?_0x39bff2:null,_0x13e29c=!!(_0x1578eb===null||_0x1578eb===void 0x0?void 0x0:_0x1578eb['sid'])&&!!(_0x1578eb===null||_0x1578eb===void 0x0?void 0x0:_0x1578eb[_0x2f2f06(0x3b7)]);this[_0x2f2f06(0x114)]=_0x13e29c?_0x1578eb[_0x2f2f06(0x15a)]:(0x0,_univerjs_pro_collaboration[_0x2f2f06(0x145)])(),this[_0x2f2f06(0x2bd)]=_0x13e29c?_0x1578eb[_0x2f2f06(0x3b7)]:0x0;const _0x23d242=this[_0x2f2f06(0x27a)];try{this['_replayCachedMutations'](_0x1578eb,_0x1dce4b);}catch(_0x36da8f){this[_0x2f2f06(0x3ae)]['error'](_0x36da8f);}const _0x51c779=this['_createHandler']();if(_0x547e53){const _0x35327f=createOnlineState(this[_0x2f2f06(0x157)],_0x23d242,this[_0x2f2f06(0x13c)],_0x1578eb,_0x1dce4b,_0x51c779);if(_0x35327f instanceof PendingState)_0x35327f['_schedule']();else{if(_0x35327f instanceof AwaitingWithPendingState||_0x35327f instanceof AwaitingState)_0x35327f['resend']();}return _0x35327f;}return this[_0x2f2f06(0x157)][_0x2f2f06(0x1d5)](OfflineState,_0x23d242,this[_0x2f2f06(0x13c)],_0x1578eb,_0x1dce4b,_0x51c779);}['_replayCachedMutations'](_0x4e3f9a,_0x839cb2){const _0x47aa13=_0x35406f;var _0x21e184,_0x31301f;const _0x10f096=this['_compressMutationService'][_0x47aa13(0xfa)][_0x47aa13(0x162)](this[_0x47aa13(0x183)]['interceptor'][_0x47aa13(0x154)]()[_0x47aa13(0x104)]);(_0x21e184=_0x10f096((_0x4e3f9a===null||_0x4e3f9a===void 0x0?void 0x0:_0x4e3f9a['mutations'])||[],null))===null||_0x21e184===void 0x0||_0x21e184['forEach'](_0x436e63=>this[_0x47aa13(0x2b6)][_0x47aa13(0x3ca)](_0x436e63['id'],_0x436e63['params'])),(_0x31301f=_0x10f096(_0x839cb2||[],null))===null||_0x31301f===void 0x0||_0x31301f[_0x47aa13(0x320)](_0x2fe59e=>this[_0x47aa13(0x2b6)]['executeCommand'](_0x2fe59e['id'],_0x2fe59e[_0x47aa13(0x1de)]));}};CollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x3ad)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core['LocaleService'])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0x8,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x9,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0xa,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0xb,_univerjs_core[_0x35406f(0x192)]),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ISingleActiveUnitService)),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],CollaborationEntity);let DocCollaborationEntity=class DocCollaborationEntity extends CollaborationEntity{constructor(_0x4bd6a6,_0x233961,_0xc33968,_0x1f37ca,_0x59c21b,_0x5c90d7,_0xa62835,_0x41e872,_0xb3c6c5,_0x551317,_0x41d6fe,_0x3af401,_0xb651fd,_0x1b645c){const _0x4cbc9a=_0x35406f;super(_0x4bd6a6,_0xc33968,_0x233961,_0x1f37ca,_0x59c21b,_0x5c90d7,_0xa62835,_0x41e872,_0xb3c6c5,_0x551317,_0x41d6fe,_0x3af401,_0xb651fd,_0x1b645c),this[_0x4cbc9a(0x27a)]=_0x4bd6a6,this[_0x4cbc9a(0x285)]=_0x233961,_defineProperty(this,'_handlerCallback',null);}[_0x35406f(0x1d9)](_0x1d85d6){const _0x40a130=_0x35406f;this[_0x40a130(0x269)]=_0x1d85d6;}['dispose'](){const _0x4b69b0=_0x35406f;this['_handlerCallback']=null,super[_0x4b69b0(0x1db)]();}[_0x35406f(0x30f)](){const _0x41c45e=_0x35406f,_0x42ac67=super[_0x41c45e(0x30f)]();return _0x42ac67[_0x41c45e(0x284)]=_0xbbf42c=>{const _0x3584fa=_0x41c45e;var _0x56d552,_0x395180;return(_0x56d552=this[_0x3584fa(0x269)])===null||_0x56d552===void 0x0||(_0x395180=_0x56d552['onTransformIME'])===null||_0x395180===void 0x0?void 0x0:_0x395180[_0x3584fa(0x374)](_0x56d552,_0xbbf42c);},_0x42ac67[_0x41c45e(0x232)]=_0x54f329=>{const _0x2b7030=_0x41c45e;var _0x50d017,_0x3567aa;return(_0x50d017=this[_0x2b7030(0x269)])===null||_0x50d017===void 0x0||(_0x3567aa=_0x50d017['onTransformState'])===null||_0x3567aa===void 0x0?void 0x0:_0x3567aa[_0x2b7030(0x374)](_0x50d017,_0x54f329);},_0x42ac67[_0x41c45e(0x1f4)]=_0x256331=>{const _0x3f5a3b=_0x41c45e;var _0x4dd2b8,_0x2286c3;return(_0x4dd2b8=this[_0x3f5a3b(0x269)])===null||_0x4dd2b8===void 0x0||(_0x2286c3=_0x4dd2b8['onTransformSelections'])===null||_0x2286c3===void 0x0?void 0x0:_0x2286c3[_0x3f5a3b(0x374)](_0x4dd2b8,_0x256331);},_0x42ac67['onSyncEditingCollabCursor']=_0x265b4a=>{const _0x5c81b7=_0x41c45e;var _0x1754aa,_0x4b9110;return(_0x1754aa=this[_0x5c81b7(0x269)])===null||_0x1754aa===void 0x0||(_0x4b9110=_0x1754aa['onSyncEditingCollabCursor'])===null||_0x4b9110===void 0x0?void 0x0:_0x4b9110[_0x5c81b7(0x374)](_0x1754aa,_0x265b4a);},_0x42ac67['onTransformRemoteChangesetByIMECache']=_0x54431f=>{const _0x34e47e=_0x41c45e;var _0x3edbd0,_0x54360d,_0x1a4381;if(!((_0x3edbd0=this['_handlerCallback'])===null||_0x3edbd0===void 0x0?void 0x0:_0x3edbd0['onTransformRemoteChangesetByIMECache']))throw new Error(_0x34e47e(0x247));return(_0x54360d=this['_handlerCallback'])===null||_0x54360d===void 0x0||(_0x1a4381=_0x54360d[_0x34e47e(0x351)])===null||_0x1a4381===void 0x0?void 0x0:_0x1a4381[_0x34e47e(0x374)](_0x54360d,_0x54431f);},_0x42ac67[_0x41c45e(0x1f3)]=_0x42837d=>{const _0x29d46a=_0x41c45e;var _0xa85d3f,_0x3cb2e3,_0x3567f0;if(!((_0xa85d3f=this[_0x29d46a(0x269)])===null||_0xa85d3f===void 0x0?void 0x0:_0xa85d3f[_0x29d46a(0x1f3)]))throw new Error('onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.');return(_0x3cb2e3=this['_handlerCallback'])===null||_0x3cb2e3===void 0x0||(_0x3567f0=_0x3cb2e3[_0x29d46a(0x1f3)])===null||_0x3567f0===void 0x0?void 0x0:_0x3567f0[_0x29d46a(0x374)](_0x3cb2e3,_0x42837d);},_0x42ac67;}async[_0x35406f(0x380)](){const _0x22d56f=_0x35406f,_0x1be02f=await super['_init']();return this[_0x22d56f(0x367)](this[_0x22d56f(0x2b6)]['onMutationExecutedForCollab']((_0x5ee8ab,_0x3b5b22)=>{const _0xdbd7d2=_0x22d56f;if(_0x5ee8ab['type']!==_univerjs_core[_0xdbd7d2(0x34e)][_0xdbd7d2(0x12a)]||(_0x3b5b22===null||_0x3b5b22===void 0x0?void 0x0:_0x3b5b22[_0xdbd7d2(0x2e6)])||(_0x3b5b22===null||_0x3b5b22===void 0x0?void 0x0:_0x3b5b22[_0xdbd7d2(0x1c1)]))return;if(_0x5ee8ab['id']===_univerjs_docs['RichTextEditingMutation']['id'])return;const _0x4e0934=_0x5ee8ab['params'];if((_0x4e0934===null||_0x4e0934===void 0x0?void 0x0:_0x4e0934[_0xdbd7d2(0x349)])!==this['unitID'])return;const _0x2dec93=_0x5ee8ab,_0x1fb4b1=this[_0xdbd7d2(0x183)]['interceptor'][_0xdbd7d2(0x162)](this['_compressMutationService']['interceptor'][_0xdbd7d2(0x154)]()[_0xdbd7d2(0x297)])([_0x2dec93],this[_0xdbd7d2(0x3a3)])||[_0x2dec93];this[_0xdbd7d2(0x110)](_0x1fb4b1[0x0]);})),_0x1be02f;}};DocCollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core['Injector'])),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x3ad)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x10b)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService)),__decorateParam(0x8,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x9,_univerjs_core['ILogService']),__decorateParam(0xa,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0xb,_univerjs_core['IPermissionService']),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ISingleActiveUnitService)),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],DocCollaborationEntity);let SheetCollaborationEntity=class SheetCollaborationEntity extends CollaborationEntity{constructor(_0x1ef8a1,_0x2fbbbd,_0x36a404,_0x5a3226,_0x1658ae,_0xc863e6,_0x2ad410,_0x25cfe6,_0x183c72,_0x36344e,_0x35eaa4,_0x39dd69,_0x2c7de3,_0xabd3c6,_0x2a279d){const _0x1e811f=_0x35406f;super(_0x1ef8a1,_0x36a404,_0x2fbbbd,_0x5a3226,_0x1658ae,_0xc863e6,_0x2ad410,_0x183c72,_0x36344e,_0x35eaa4,_0x39dd69,_0x2c7de3,_0xabd3c6,_0x2a279d),this[_0x1e811f(0x27a)]=_0x1ef8a1,this[_0x1e811f(0x285)]=_0x2fbbbd,this[_0x1e811f(0x395)]=_0x25cfe6;}[_0x35406f(0x30f)](){const _0x5c6915=_0x35406f,_0xb34728=super[_0x5c6915(0x30f)]();return _0xb34728[_0x5c6915(0x1f4)]=_0x11770e=>this['_sheetTransformSelectionsService']['transformSelections'](_0x11770e),_0xb34728;}async[_0x35406f(0x380)](){const _0x12bb79=_0x35406f,_0x2c281e=await super[_0x12bb79(0x380)]();return this[_0x12bb79(0x367)](this[_0x12bb79(0x2b6)][_0x12bb79(0x276)]((_0x42bf12,_0x50b97e)=>{const _0x3720e7=_0x12bb79;if(_0x42bf12[_0x3720e7(0x285)]!==_univerjs_core[_0x3720e7(0x34e)][_0x3720e7(0x12a)]||(_0x50b97e===null||_0x50b97e===void 0x0?void 0x0:_0x50b97e['fromCollab'])||(_0x50b97e===null||_0x50b97e===void 0x0?void 0x0:_0x50b97e[_0x3720e7(0x1c1)]))return;const _0x5173c5=_0x42bf12['params'];if((_0x5173c5===null||_0x5173c5===void 0x0?void 0x0:_0x5173c5[_0x3720e7(0x349)])!==this[_0x3720e7(0x27a)])return;const _0x210b99=_0x42bf12,_0x143d62=this['_compressMutationService'][_0x3720e7(0xfa)]['fetchThroughInterceptors'](this[_0x3720e7(0x183)][_0x3720e7(0xfa)][_0x3720e7(0x154)]()[_0x3720e7(0x297)])([_0x210b99],this[_0x3720e7(0x3a3)])||[_0x210b99];this[_0x3720e7(0x110)](_0x143d62[0x0]);})),_0x2c281e;}};SheetCollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration['CompressMutationService'])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x10b)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x33b)])(SheetTransformSelectionsService)),__decorateParam(0x8,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0x9,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0xa,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0xb,_univerjs_core['ICommandService']),__decorateParam(0xc,_univerjs_core[_0x35406f(0x192)]),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ISingleActiveUnitService)),__decorateParam(0xe,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],SheetCollaborationEntity);const INetworkConditionService=(0x0,_univerjs_core['createIdentifier'])(_0x35406f(0x15c));function deserializeToCombResponse(_0x565aa5){const _0x31e4ba=_0x35406f,_0x20511c=_0x565aa5[_0x31e4ba(0x1b8)],_0x5f092a=JSON[_0x31e4ba(0x291)](_0x20511c);switch(_0x5f092a['cmd']){case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x13b)]:case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x1a6)]:{const _0x4e246c=_0x5f092a[_0x31e4ba(0x29b)];return{..._0x5f092a,'data':_0x4e246c,'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};}case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x2cb)]:{const _0xd6f4d9=_0x5f092a[_0x31e4ba(0x393)];return{..._0x5f092a,'data':_0xd6f4d9,'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};}case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x18a)]:{const _0x349d59=_0x5f092a[_0x31e4ba(0x138)];switch(_0x349d59[_0x31e4ba(0x258)]){case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x1af)]:var _0x514163;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x514163=_0x349d59[_0x31e4ba(0x2f3)])===null||_0x514163===void 0x0?void 0x0:_0x514163['cs']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x2ec)]:var _0x1d4a68;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x1d4a68=_0x349d59[_0x31e4ba(0x203)])===null||_0x1d4a68===void 0x0?void 0x0:_0x1d4a68['cs']},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x1b1)]:var _0x3a7eaa;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x3a7eaa=_0x349d59[_0x31e4ba(0x13d)])===null||_0x3a7eaa===void 0x0?void 0x0:_0x3a7eaa['cs']},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x243)]:var _0x3b22a8;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x3b22a8=_0x349d59[_0x31e4ba(0x179)])===null||_0x3b22a8===void 0x0?void 0x0:_0x3b22a8['cs']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x20c)]:var _0x200e0e;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x200e0e=_0x349d59[_0x31e4ba(0x112)])===null||_0x200e0e===void 0x0?void 0x0:_0x200e0e['cs']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x275)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x288)]},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x10e)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x2c3)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x217)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59['leaveEvent']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x344)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x28b)]},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x3b1)]:case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)]['LIVESHARE_OPERATION']:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x3ba)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x188)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x28b)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x1f5)]:return{..._0x5f092a,'data':_0x349d59,'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)]['COMMENT_UPDATE']:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x37f)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x143)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x25b)]},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x139)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59['shouldCloseConn']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x130)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x123)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};default:return _0x5f092a;}}default:return _0x5f092a;}}function serializeCombRequest(_0x356f6c){const _0x34f852=_0x35406f;switch(_0x356f6c[_0x34f852(0x1f7)]){case _univerjs_protocol[_0x34f852(0x245)][_0x34f852(0x13b)]:case _univerjs_protocol[_0x34f852(0x245)][_0x34f852(0x1a6)]:return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c['routeKey']});case _univerjs_protocol['CombCmd'][_0x34f852(0x331)]:{let _0x1e02eb;switch(_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x258)]){case _univerjs_pro_collaboration['CollaborationEvent']['UPDATE_CURSOR']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x275)],'updateCursorEvent':_0x356f6c['data']['data']};break;case _univerjs_pro_collaboration[_0x34f852(0x1ae)]['USERS_LEAVE']:_0x1e02eb={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x217)],'leaveEvent':_0x356f6c[_0x34f852(0x1b8)]['data']};break;case _univerjs_pro_collaboration['CollaborationEvent']['USERS_ENTER']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x10e)],'joinEvent':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x344)]:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x344)],'liveShareNewHost':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration[_0x34f852(0x1ae)]['LIVESHARE_OPERATION']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x1e1)],'liveShareOperation':_0x356f6c['data'][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration['CollaborationEvent']['LIVESHARE_TERMINATE']:_0x1e02eb={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x188)],'liveShareTerminate':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x11b)]:_0x1e02eb={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x11b)],'liveShareRequestHost':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration['CollaborationEvent']['LIVESHARE_FETCH_OPERATIONS']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)]['LIVESHARE_FETCH_OPERATIONS']};break;default:_0x1e02eb={'eventID':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x258)]};}return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c['routeKey'],'collaMsg':_0x1e02eb});}case _univerjs_protocol[_0x34f852(0x245)]['JOIN']:return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c[_0x34f852(0x2e5)],'joinReq':_0x356f6c[_0x34f852(0x1b8)]});case _univerjs_protocol[_0x34f852(0x245)][_0x34f852(0x106)]:return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c[_0x34f852(0x2e5)],'leaveReq':_0x356f6c['data']});default:throw new Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}const ICollaborationSocketService=(0x0,_univerjs_core[_0x35406f(0x36d)])('univer-pro.collaboration-client-socket-service');function generateSubmitChangesPath(_0x3e885c,_0x1b8a6e,_0x431602){const _0x5f4a5d=_0x35406f;return _0x3e885c+'/'+_0x1b8a6e+_0x5f4a5d(0x150)+_0x431602+_0x5f4a5d(0x336);}let CollaborationSocketService=class CollaborationSocketService extends _univerjs_core[_0x35406f(0x163)]{constructor(_0x5573a1,_0x791c56,_0x53094d,_0x313a65,_0x2e5b44){const _0x12572a=_0x35406f;super(),this[_0x12572a(0x157)]=_0x5573a1,this['_httpService']=_0x791c56,this['_configService']=_0x53094d,this[_0x12572a(0x3ae)]=_0x313a65,this['_snapshotServerService']=_0x2e5b44;}[_0x35406f(0x178)](_0x10ad8c){const _0x2c93c9=_0x35406f,_0x7ec904=this[_0x2c93c9(0x157)][_0x2c93c9(0x2c5)](_univerjs_network[_0x2c93c9(0x16a)]);if(!_0x7ec904)throw new Error(_0x2c93c9(0x17a));const _0x11d426=_0x7ec904[_0x2c93c9(0x309)](_0x10ad8c);if(!_0x11d426)throw new Error(_0x2c93c9(0x205));const _0x26dc25=new _univerjs_core['DisposableCollection'](),_0x451132=new rxjs[(_0x2c93c9(0x2bc))]();_0x26dc25[_0x2c93c9(0x23b)](_0x11d426[_0x2c93c9(0x228)][_0x2c93c9(0x2b5)](_0x1a894f=>_0x451132[_0x2c93c9(0x2b4)](_0x1a894f))),_0x26dc25[_0x2c93c9(0x23b)]((0x0,_univerjs_core[_0x2c93c9(0x266)])(()=>_0x451132['complete']()));const _0x1bc416=new rxjs['Subject']();_0x26dc25[_0x2c93c9(0x23b)](_0x11d426[_0x2c93c9(0x233)][_0x2c93c9(0x2b5)](_0x1423ef=>_0x1bc416['next'](_0x1423ef))),_0x26dc25[_0x2c93c9(0x23b)]((0x0,_univerjs_core[_0x2c93c9(0x266)])(()=>_0x1bc416['complete']()));const _0x4c2184=new rxjs['Subject']();_0x26dc25[_0x2c93c9(0x23b)](_0x11d426[_0x2c93c9(0x128)][_0x2c93c9(0x2b5)](_0x1a0316=>{const _0x36209e=deserializeToCombResponse(_0x1a0316);_0x4c2184['next'](_0x36209e);})),_0x26dc25[_0x2c93c9(0x23b)]((0x0,_univerjs_core[_0x2c93c9(0x266)])(()=>_0x4c2184[_0x2c93c9(0x22c)]()));let _0x3467e1;const _0x219b5e=()=>{const _0x542981=_0x2c93c9;_0x1bc416[_0x542981(0x2b4)](new Event(_0x542981(0x1be))),_0x451132[_0x542981(0x2b4)](new Event(_0x542981(0x1be))),_0x3467e1[_0x542981(0x208)]();};return _0x3467e1={'memberID':'','close$':_0x451132[_0x2c93c9(0x25c)](),'error$':_0x1bc416[_0x2c93c9(0x25c)](),'open$':_0x11d426[_0x2c93c9(0x1e2)],'message$':_0x4c2184[_0x2c93c9(0x25c)](),'send':_0x34380b=>{const _0x451fde=_0x2c93c9;if(_0x34380b[_0x451fde(0x1f7)]===_univerjs_protocol[_0x451fde(0x245)][_0x451fde(0x331)]){if(_0x34380b[_0x451fde(0x1b8)][_0x451fde(0x258)]===_univerjs_pro_collaboration[_0x451fde(0x1ae)][_0x451fde(0x2a1)]){this[_0x451fde(0x12c)](_0x3467e1,_0x34380b[_0x451fde(0x1b8)])[_0x451fde(0x2d3)](_0x25a798=>{const _0xb5bfc7=_0x451fde;this[_0xb5bfc7(0x3ae)]['error'](_0x25a798),_0x219b5e();});return;}if(_0x34380b[_0x451fde(0x1b8)][_0x451fde(0x258)]===_univerjs_pro_collaboration['CollaborationEvent'][_0x451fde(0x149)]){const _0x44043f=_0x34380b['data'];this['_fetchMissChangesets'](_0x44043f)[_0x451fde(0x249)](_0x277475=>{const _0x5d3c8f=_0x451fde;_0x4c2184[_0x5d3c8f(0x2b4)]({'cmd':_univerjs_protocol['CombCmd'][_0x5d3c8f(0x18a)],'code':_univerjs_protocol[_0x5d3c8f(0x360)]['OK'],'routeKey':_0x44043f['data'][_0x5d3c8f(0x27a)],'routeType':'','data':{'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x5d3c8f(0x298)],'data':{'changesets':_0x277475}}});})['catch'](_0x231437=>{const _0x2c81a1=_0x451fde;this[_0x2c81a1(0x3ae)][_0x2c81a1(0x34c)](_0x231437),_0x219b5e();});return;}}_0x11d426['send'](serializeCombRequest(_0x34380b));},'close':()=>{const _0x463f74=_0x2c93c9;_0x11d426[_0x463f74(0x208)](),_0x26dc25[_0x463f74(0x1db)]();}},_0x3467e1;}async[_0x35406f(0x12c)](_0x3aca8f,_0x50eb87){const _0x46bbf9=_0x35406f;var _0x123598;const {unitType:_0x542cb6,unitID:_0x1037e2,changeset:_0x130c47}=_0x50eb87[_0x46bbf9(0x1b8)],_0x36174d={'unitID':_0x1037e2,'memberID':_0x3aca8f[_0x46bbf9(0x389)],'type':_0x542cb6,'changeset':(0x0,_univerjs_pro_collaboration[_0x46bbf9(0x181)])(_0x130c47)},_0xb2c5d1=this[_0x46bbf9(0x279)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0xdb1ab6=generateSubmitChangesPath((_0x123598=_0xb2c5d1===null||_0xb2c5d1===void 0x0?void 0x0:_0xb2c5d1[_0x46bbf9(0x317)])!==null&&_0x123598!==void 0x0?_0x123598:DEFAULT_COLLAB_SUBMIT_CHANGESET_URL,_0x542cb6,_0x1037e2);try{await this[_0x46bbf9(0x26a)]['post'](_0xdb1ab6,{'body':_0x36174d});}catch(_0x1e511a){this[_0x46bbf9(0x3ae)]['error'](_0x46bbf9(0x22b),_0x46bbf9(0x2c1));throw _0x1e511a;}}async[_0x35406f(0x370)](_0x1dcf2f){const _0x3992c6=_0x35406f,{unitID:_0x21442f,from:_0x40905d,to:_0x5a863d,unitType:_0x37749f}=_0x1dcf2f['data'];return(await this[_0x3992c6(0x15b)][_0x3992c6(0x375)]({'metadata':void 0x0},{'unitID':_0x21442f,'type':_0x37749f,'from':_0x40905d,'to':_0x5a863d}))[_0x3992c6(0x20b)][_0x3992c6(0x173)](_0x8831ff=>{const _0x56ae86=_0x3992c6;if(_0x8831ff[_0x56ae86(0x372)]===null||_0x8831ff[_0x56ae86(0x372)]===void 0x0)_0x8831ff[_0x56ae86(0x372)]=[];return _0x8831ff;});}};CollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0x35406f(0x2a7)])],CollaborationSocketService);let CollaborationSessionService=class CollaborationSessionService extends _univerjs_core[_0x35406f(0x163)]{get['_socket'](){const _0x3cabe9=_0x35406f;return this['_socket$'][_0x3cabe9(0x316)]();}constructor(_0x5e5a9b,_0x10fa06,_0x472429,_0x42030b,_0x4a75f3,_0x4d35d3){const _0x47bcca=_0x35406f;super(),this['_injector']=_0x5e5a9b,this[_0x47bcca(0x3ae)]=_0x10fa06,this[_0x47bcca(0x279)]=_0x472429,this[_0x47bcca(0x134)]=_0x42030b,this['_collaborationUIEventService']=_0x4a75f3,this[_0x47bcca(0x1b3)]=_0x4d35d3,_defineProperty(this,_0x47bcca(0x254),new rxjs['BehaviorSubject'](void 0x0)),_defineProperty(this,'socket$',this['_socket$'][_0x47bcca(0x25c)]()),_defineProperty(this,_0x47bcca(0x1c9),null),_defineProperty(this,_0x47bcca(0x16c),new Map()),_defineProperty(this,_0x47bcca(0x2ed),new rxjs['BehaviorSubject'](SessionStatus[_0x47bcca(0x15e)])),_defineProperty(this,_0x47bcca(0x32f),this[_0x47bcca(0x2ed)]['asObservable']()),_defineProperty(this,'_socketReady',![]),_defineProperty(this,'_retryConnectingTimer',void 0x0),_defineProperty(this,_0x47bcca(0xf9),0x0),_defineProperty(this,_0x47bcca(0x1cf),void 0x0),_defineProperty(this,_0x47bcca(0x155),void 0x0),this[_0x47bcca(0x3c1)]();}[_0x35406f(0x3c1)](){const _0x5eb99a=_0x35406f;if(!this[_0x5eb99a(0x1b3)])return;this[_0x5eb99a(0x367)](this[_0x5eb99a(0x1b3)][_0x5eb99a(0x39a)][_0x5eb99a(0x2b5)](_0x167140=>{const _0x3bce74=_0x5eb99a;if(_0x167140&&!this[_0x3bce74(0x386)])this['reconnect']();if(!_0x167140)this['_onOffline']();}));}['dispose'](){const _0x54a1a9=_0x35406f;super[_0x54a1a9(0x1db)](),this[_0x54a1a9(0x262)](),this[_0x54a1a9(0x25a)](),this[_0x54a1a9(0x35c)](),this['_sessions'][_0x54a1a9(0x320)](_0x22df53=>_0x22df53['dispose']()),this[_0x54a1a9(0x16c)][_0x54a1a9(0x20f)](),this['_status$']['complete']();}async[_0x35406f(0x2d5)](_0x229f7d){const _0x49b07b=_0x35406f;if(this['_sessions'][_0x49b07b(0x3d5)](_0x229f7d))return this[_0x49b07b(0x16c)][_0x49b07b(0x2c5)](_0x229f7d);this[_0x49b07b(0x2af)]();const _0x44475c=this['_injector']['createInstance'](CollaborationSession,_0x229f7d,this[_0x49b07b(0x254)]['asObservable']());return this[_0x49b07b(0x16c)][_0x49b07b(0x1dc)](_0x229f7d,_0x44475c),_0x44475c;}[_0x35406f(0x11f)](_0x15be2e){const _0x395480=_0x35406f,_0xa26ffa=this[_0x395480(0x16c)]['get'](_0x15be2e);_0xa26ffa&&(this[_0x395480(0x16c)]['delete'](_0x15be2e),_0xa26ffa[_0x395480(0x208)]());if(!this[_0x395480(0x16c)][_0x395480(0x21d)]){var _0x234dbe;(_0x234dbe=this['_socket'])===null||_0x234dbe===void 0x0||_0x234dbe[_0x395480(0x208)]();}}[_0x35406f(0x2ca)](){const _0x4448a1=_0x35406f;this[_0x4448a1(0xf9)]=0x0,this[_0x4448a1(0x262)](),this[_0x4448a1(0x210)]();}[_0x35406f(0x262)](){const _0x58575f=_0x35406f;this[_0x58575f(0x36b)]!=null&&(clearTimeout(this[_0x58575f(0x36b)]),this[_0x58575f(0x36b)]=null);}async[_0x35406f(0x127)](){const _0x4e52d4=_0x35406f;var _0x13da33;const _0x210afe=this[_0x4e52d4(0x279)][_0x4e52d4(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x31991e=(_0x13da33=_0x210afe===null||_0x210afe===void 0x0?void 0x0:_0x210afe[_0x4e52d4(0x1c6)])!==null&&_0x13da33!==void 0x0?_0x13da33:DEFAULT_COLLAB_WEB_SOCKET_URL,_0x614b85=await this[_0x4e52d4(0x134)]['createSocket'](_0x31991e);return this[_0x4e52d4(0x1c9)]=_0x614b85,_0x614b85;}async[_0x35406f(0x2af)](){const _0xc74533=_0x35406f;try{var _0x23ed18,_0xd9ffa7;const _0x53e8fa=(_0x23ed18=(_0xd9ffa7=this[_0xc74533(0x386)])!==null&&_0xd9ffa7!==void 0x0?_0xd9ffa7:this[_0xc74533(0x1c9)])!==null&&_0x23ed18!==void 0x0?_0x23ed18:await this[_0xc74533(0x127)]();if(_0x53e8fa){const _0x517d63=_0x53e8fa[_0xc74533(0xfd)];_0x53e8fa[_0xc74533(0xfd)]=_0xf91b6d=>{const _0x59ae93=_0xc74533;if(_0xf91b6d[_0x59ae93(0x1f7)]!==_univerjs_protocol['CombCmd']['LEAVE'])this['_rescheduleHeartbeat']();return _0x517d63[_0x59ae93(0x2c2)](_0x53e8fa,[_0xf91b6d]);},_0x53e8fa['message$'][_0xc74533(0x2b5)](_0x43d289=>this[_0xc74533(0x164)](_0x53e8fa,_0x43d289)),_0x53e8fa['error$']['pipe']((0x0,rxjs_operators[_0xc74533(0x100)])(0x1))['subscribe'](_0x1aa516=>this['_logService'][_0xc74533(0x34c)](_0xc74533(0x2ac),_0x1aa516)),_0x53e8fa[_0xc74533(0x1e2)][_0xc74533(0x38a)]((0x0,rxjs_operators[_0xc74533(0x100)])(0x1))[_0xc74533(0x2b5)](()=>{const _0x4002da=_0xc74533;this[_0x4002da(0x10a)](_0x53e8fa);}),_0x53e8fa[_0xc74533(0x228)]['pipe']((0x0,rxjs_operators['take'])(0x1))[_0xc74533(0x2b5)](_0x3bfa1e=>{const _0x3c4003=_0xc74533;this[_0x3c4003(0x3ae)][_0x3c4003(0x2f7)](_0x3c4003(0x1bb),_0x3c4003(0x383),_0x3bfa1e),this['_onConnectionFailed']();});}}catch(_0x3c1d3e){this[_0xc74533(0x3ae)][_0xc74533(0x34c)](_0x3c1d3e),this['_onConnectionFailed']();}}[_0x35406f(0x10a)](_0x1791af){const _0x4afcaa=_0x35406f;this['_logService'][_0x4afcaa(0x2f7)](_0x4afcaa(0x1bb),_0x4afcaa(0x21f)),_0x1791af[_0x4afcaa(0xfd)]({'cmd':_univerjs_protocol[_0x4afcaa(0x245)][_0x4afcaa(0x1a6)]}),this['_rescheduleHeartbeat']();}[_0x35406f(0x330)](){const _0x4c0c95=_0x35406f;this[_0x4c0c95(0x390)]=![],this[_0x4c0c95(0x1c9)]=null,this[_0x4c0c95(0x2ed)]['next'](SessionStatus[_0x4c0c95(0x3af)]),this[_0x4c0c95(0x254)][_0x4c0c95(0x2b4)](null),this[_0x4c0c95(0x25a)](),this[_0x4c0c95(0x35c)]();}[_0x35406f(0x1ff)](){const _0x4bf2bd=_0x35406f;var _0x8c6e73;this[_0x4bf2bd(0x330)]();if(this[_0x4bf2bd(0xf9)]<((_0x8c6e73=this[_0x4bf2bd(0x279)][_0x4bf2bd(0x38b)](_0x4bf2bd(0x38d)))!==null&&_0x8c6e73!==void 0x0?_0x8c6e73:0x3))this['_collaborationUIEventService'][_0x4bf2bd(0x190)]({'id':CollaborationUIEventId[_0x4bf2bd(0x377)]}),this[_0x4bf2bd(0x210)]();else this[_0x4bf2bd(0x24d)][_0x4bf2bd(0x190)]({'id':CollaborationUIEventId[_0x4bf2bd(0x240)]});}[_0x35406f(0x210)](){const _0x1da172=_0x35406f;var _0x295c70;const _0xcb1b65=this['_retryCount'],_0x2211bf=this['_configService'][_0x1da172(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x4eb985=_0xcb1b65===0x0?0x0:((_0x295c70=_0x2211bf===null||_0x2211bf===void 0x0?void 0x0:_0x2211bf[_0x1da172(0x392)])!==null&&_0x295c70!==void 0x0?_0x295c70:DEFAULT_RETRY_CONNECTING_INTERVAL)*0x2**_0xcb1b65;this[_0x1da172(0x36b)]=setTimeout(()=>{const _0x1bfb35=_0x1da172;clearTimeout(this[_0x1bfb35(0x36b)]),this[_0x1bfb35(0x36b)]=null,this[_0x1bfb35(0x2af)]();},_0x4eb985),this[_0x1da172(0xf9)]+=0x1;}[_0x35406f(0x164)](_0x23cff6,_0xf94692){const _0x118424=_0x35406f,{cmd:_0xdf07f0}=_0xf94692;_0xdf07f0===_univerjs_protocol[_0x118424(0x245)][_0x118424(0x1a6)]&&!this[_0x118424(0x390)]&&(_0x23cff6[_0x118424(0x389)]=_0xf94692['data']['memberID'],this[_0x118424(0x254)]['next'](_0x23cff6),this[_0x118424(0x2ed)][_0x118424(0x2b4)](SessionStatus[_0x118424(0x27c)]),this[_0x118424(0x390)]=!![],this[_0x118424(0x1c9)]=null);if(_0xdf07f0===_univerjs_protocol[_0x118424(0x245)]['HEARTBEAT'])this[_0x118424(0x25a)]();this[_0x118424(0x36f)]();}[_0x35406f(0x36f)](){const _0x4ac6b9=_0x35406f;var _0x361ac7;this[_0x4ac6b9(0x35c)](),this['_sendHeartbeatTimer']=setTimeout(()=>this[_0x4ac6b9(0x27f)](),(_0x361ac7=this['_configService']['getConfig'](_0x4ac6b9(0x382)))!==null&&_0x361ac7!==void 0x0?_0x361ac7:DEFAULT_HEARTBEAT_INTERVAL);}[_0x35406f(0x27f)](){const _0x159357=_0x35406f;this[_0x159357(0x386)]['send']({'cmd':_univerjs_protocol['CombCmd'][_0x159357(0x13b)]}),this[_0x159357(0x2b7)]();}[_0x35406f(0x2b7)](){const _0x32a2b5=_0x35406f;var _0xb268bd;this[_0x32a2b5(0x155)]=setTimeout(()=>this[_0x32a2b5(0x1ff)](),(_0xb268bd=this[_0x32a2b5(0x279)][_0x32a2b5(0x38b)](_0x32a2b5(0x221)))!==null&&_0xb268bd!==void 0x0?_0xb268bd:DEFAULT_HEARTBEAT_TIMEOUT);}[_0x35406f(0x35c)](){const _0x43bcea=_0x35406f;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0x43bcea(0x1cf)]),this[_0x43bcea(0x1cf)]=null);}['_clearTimeoutTimer'](){const _0x19fe68=_0x35406f;this[_0x19fe68(0x155)]!=null&&(clearTimeout(this[_0x19fe68(0x155)]),this[_0x19fe68(0x155)]=null);}};CollaborationSessionService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,ICollaborationSocketService),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x2c9)])(INetworkConditionService))],CollaborationSessionService);let CollaborationController=class CollaborationController extends _univerjs_core['RxDisposable']{constructor(_0x38ab44,_0x134156,_0x559875,_0x5aa501){const _0x5111be=_0x35406f;var _0x31f01e;super(),this[_0x5111be(0x157)]=_0x38ab44,this[_0x5111be(0x391)]=_0x134156,this[_0x5111be(0x279)]=_0x559875,this[_0x5111be(0x3a3)]=_0x5aa501,_defineProperty(this,'_entities',new Map()),_defineProperty(this,_0x5111be(0x1c4),new rxjs[(_0x5111be(0x2bc))]()),_defineProperty(this,_0x5111be(0x364),this[_0x5111be(0x1c4)][_0x5111be(0x25c)]());if(((_0x31f01e=this[_0x5111be(0x279)]['getConfig'](_0x5111be(0x2b9)))===null||_0x31f01e===void 0x0?void 0x0:_0x31f01e[_0x5111be(0x329)])!==![])this[_0x5111be(0x380)]();}['dispose'](){const _0x401075=_0x35406f;super[_0x401075(0x1db)](),this[_0x401075(0x2ad)]['forEach'](_0x27bf2c=>_0x27bf2c[_0x401075(0x1db)]()),this[_0x401075(0x2ad)][_0x401075(0x20f)]();}['getCollabEntity'](_0x3cac0b){const _0x2bf49e=_0x35406f;var _0x452e9a;return(_0x452e9a=this[_0x2bf49e(0x2ad)][_0x2bf49e(0x2c5)](_0x3cac0b))!==null&&_0x452e9a!==void 0x0?_0x452e9a:null;}[_0x35406f(0x13a)](_0x598d7e){const _0x25a66b=_0x35406f,_0xc7d6d6=this['getCollabEntity'](_0x598d7e);if(_0xc7d6d6)return(0x0,rxjs['of'])(_0xc7d6d6);return this[_0x25a66b(0x1c4)][_0x25a66b(0x38a)]((0x0,rxjs_operators[_0x25a66b(0x2e7)])(_0x442f96=>_0x442f96[_0x25a66b(0x27a)]===_0x598d7e));}['readyForCollab'](_0x524e72){const _0x5051cd=_0x35406f;return(0x0,rxjs[_0x5051cd(0x301)])(this[_0x5051cd(0x13a)](_0x524e72)[_0x5051cd(0x38a)]((0x0,rxjs_operators[_0x5051cd(0x173)])(()=>void 0x0)));}['_init'](){const _0x564c2a=_0x35406f,_0x2bfc9c=0x10;this[_0x564c2a(0x3a3)]['getTypeOfUnitAdded$'](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x307)])[_0x564c2a(0x38a)]((0x0,rxjs[_0x564c2a(0x3b3)])(this['dispose$']),(0x0,rxjs_operators[_0x564c2a(0x3a1)])(_0x2bfc9c))[_0x564c2a(0x2b5)](async _0x12efe1=>{const _0x1e4f64=_0x564c2a,_0x174c28=_0x12efe1[_0x1e4f64(0x1bf)](),_0x35401d=await this['_startCollaboration'](_0x174c28,_univerjs_core[_0x1e4f64(0x3b4)][_0x1e4f64(0x307)]);this[_0x1e4f64(0x2ad)][_0x1e4f64(0x1dc)](_0x174c28,_0x35401d);}),this[_0x564c2a(0x3a3)][_0x564c2a(0x109)](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x319)])[_0x564c2a(0x38a)]((0x0,rxjs[_0x564c2a(0x3b3)])(this[_0x564c2a(0x378)]),(0x0,rxjs_operators[_0x564c2a(0x3a1)])(_0x2bfc9c))[_0x564c2a(0x38a)]((0x0,rxjs_operators['filter'])(_0x5dc2f6=>{const _0x4e048f=_0x564c2a;return!_0x5dc2f6[_0x4e048f(0x1bf)]()['startsWith']('__');}))[_0x564c2a(0x2b5)](async _0x3052d2=>{const _0x3330e2=_0x564c2a,_0x362836=_0x3052d2['getUnitId'](),_0x510a23=await this['_startCollaboration'](_0x362836,_univerjs_core[_0x3330e2(0x3b4)]['UNIVER_DOC']);this[_0x3330e2(0x2ad)]['set'](_0x362836,_0x510a23);}),(0x0,rxjs['merge'])(this['_univerInstanceService'][_0x564c2a(0x1e8)](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x307)]),this[_0x564c2a(0x3a3)][_0x564c2a(0x1e8)](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x319)]))[_0x564c2a(0x38a)]((0x0,rxjs[_0x564c2a(0x3b3)])(this[_0x564c2a(0x378)]))[_0x564c2a(0x2b5)](_0xda6816=>{const _0x101bf5=_0x564c2a,_0x4d25ee=_0xda6816[_0x101bf5(0x1bf)](),_0x21e2a0=this['_entities']['get'](_0x4d25ee);_0x21e2a0&&(_0x21e2a0[_0x101bf5(0x1db)](),this[_0x101bf5(0x2ad)]['delete'](_0x4d25ee));});}async[_0x35406f(0x1b9)](_0x49e47a,_0x40c04f){const _0x406ab6=_0x35406f,_0x312262=await this['_collabSessionService'][_0x406ab6(0x2d5)](_0x49e47a),_0x542356=this[_0x406ab6(0x157)][_0x406ab6(0x1d5)](this[_0x406ab6(0x220)](_0x40c04f),_0x49e47a,_0x40c04f,_0x312262);return await _0x542356[_0x406ab6(0x35b)](),this['_entityInit$']['next'](_0x542356),_0x542356;}['_getCtorByUniverInstanceType'](_0x2a35ad){const _0xdeea64=_0x35406f;switch(_0x2a35ad){case _univerjs_core[_0xdeea64(0x3b4)]['UNIVER_DOC']:return DocCollaborationEntity;case _univerjs_core[_0xdeea64(0x3b4)]['UNIVER_SHEET']:return SheetCollaborationEntity;default:throw new Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x2a35ad);}}};CollaborationController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationSessionService)),__decorateParam(0x2,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x3,_univerjs_core[_0x35406f(0x161)])],CollaborationController);var name=_0x35406f(0x21e),version=_0x35406f(0x242);const DEFAULT_FILE_NAME_KEY='DEFAULT_FILE_NAME',UNIVER_DEFAULT_FILE_NAME=_0x35406f(0x358);let FileNameController=class FileNameController extends _univerjs_core[_0x35406f(0x163)]{constructor(_0x1edba9,_0x5ccf52){const _0x40aefc=_0x35406f;super(),this[_0x40aefc(0x3a3)]=_0x1edba9,this[_0x40aefc(0x279)]=_0x5ccf52,this[_0x40aefc(0x380)]();}[_0x35406f(0x380)](){const _0x37e003=_0x35406f;this[_0x37e003(0x367)](this[_0x37e003(0x3a3)][_0x37e003(0x16b)][_0x37e003(0x2b5)](()=>{const _0x5216c9=_0x37e003;var _0xfe4bc1;const _0x32b6f2=this[_0x5216c9(0x3a3)]['getFocusedUnit']();let _0x8c2a9c=(_0xfe4bc1=this[_0x5216c9(0x279)]['getConfig'](_0x5216c9(0x12f)))!==null&&_0xfe4bc1!==void 0x0?_0xfe4bc1:UNIVER_DEFAULT_FILE_NAME;if(_0x32b6f2 instanceof _univerjs_core[_0x5216c9(0x20d)])_0x8c2a9c=_0x32b6f2['name'];document[_0x5216c9(0x1a4)]=_0x8c2a9c;}));}};FileNameController=__decorate([__decorateParam(0x0,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x1,_univerjs_core['IConfigService'])],FileNameController);let AuthServerService=class AuthServerService{constructor(_0x2bbed2,_0x437a9b,_0x312557){const _0x4007ca=_0x35406f;this[_0x4007ca(0x279)]=_0x2bbed2,this[_0x4007ca(0x26a)]=_0x437a9b,this[_0x4007ca(0x1f2)]=_0x312557,this[_0x4007ca(0x35b)]();}['init'](){const _0x103e13=_0x35406f;this[_0x103e13(0x26a)][_0x103e13(0x1a2)]({'priority':0x1,'interceptor':(_0x801a46,_0x38731b)=>{const _0x3acf62=_0x103e13;return _0x38731b(_0x801a46)[_0x3acf62(0x38a)]((0x0,rxjs[_0x3acf62(0x3c8)])(async _0x4fa49d=>{const _0x2212a0=_0x3acf62,_0x5c3fe1=_0x4fa49d;if(_0x5c3fe1[_0x2212a0(0x1c5)]===0x191){if(typeof window===_0x2212a0(0x384))throw new Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0x2212a0(0x3c9)](this[_0x2212a0(0x1f2)]['t']('auth.needGotoLoginAlert'))){const _0x52a1ac=window[_0x2212a0(0x260)](window[_0x2212a0(0x264)][_0x2212a0(0x10f)]);window[_0x2212a0(0x264)][_0x2212a0(0x10f)]=this[_0x2212a0(0x283)]()+_0x2212a0(0x2c0)+_0x52a1ac;}}return _0x5c3fe1;}));}});}['_getLoginPath'](){const _0x22f771=_0x35406f;var _0x545553;const _0x378998=this[_0x22f771(0x279)][_0x22f771(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x545553=_0x378998===null||_0x378998===void 0x0?void 0x0:_0x378998[_0x22f771(0x22a)])!==null&&_0x545553!==void 0x0?_0x545553:DEFAULT_LOGIN_URL;}};AuthServerService=__decorate([__decorateParam(0x0,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x10b)]))],AuthServerService);const DEFAULT_AUTHZ_URL_KEY$1=_0x35406f(0x353);let AuthzIoHttpService=class AuthzIoHttpService extends _univerjs_core['Disposable']{constructor(_0x182916,_0x28cd07){const _0x3905c7=_0x35406f;super(),this[_0x3905c7(0x342)]=_0x182916,this['_configService']=_0x28cd07,_defineProperty(this,_0x3905c7(0x12b),![]),this[_0x3905c7(0x398)]();}[_0x35406f(0x398)](){const _0x490aa5=_0x35406f,_0x232024=this;this['disposeWithMe'](this[_0x490aa5(0x342)][_0x490aa5(0x1a2)]({'priority':0x3e7,'interceptor':(0x0,_univerjs_network[_0x490aa5(0x327)])({'isMatch'(_0x2c4be1){const _0x1a4cd9=_0x490aa5;var _0x588b98;if(_0x2c4be1[_0x1a4cd9(0x387)]==='POST'&&((_0x588b98=_0x2c4be1[_0x1a4cd9(0x33d)])===null||_0x588b98===void 0x0?void 0x0:_0x588b98[_0x1a4cd9(0x229)])){const {objectID:_0x2452ed,objectType:_0x292221}=_0x2c4be1[_0x1a4cd9(0x33d)]['body']||{};if(!_0x2452ed||_0x292221===void 0x0)return![];const _0x56ee83=_0x232024[_0x1a4cd9(0x3cc)]()+'/'+_0x292221+'/object/'+_0x2452ed+_0x1a4cd9(0x2b2);if(_0x2c4be1[_0x1a4cd9(0x292)]===_0x56ee83)return!![];}return![];},'getParamsFromRequest'(_0x18e2a4){var _0xe02aac;return(_0xe02aac=_0x18e2a4['requestParams'])===null||_0xe02aac===void 0x0?void 0x0:_0xe02aac['body'];},'mergeParamsToRequest'(_0x17ffd9,_0x1ebb3b){const _0xd49043=_0x490aa5,_0x3b89aa=_0x232024[_0xd49043(0x3cc)]()+_0xd49043(0x270),_0xf3b48f=_0x17ffd9[_0xd49043(0x212)]((_0x2b3970,_0x2a30c3)=>{const _0x256657=_0xd49043,{unitID:_0x1a236a,objectID:_0x665eb8,objectType:_0x3f975c,actions:_0x5907dc}=_0x2a30c3;if(!_0x2b3970[_0x1a236a])_0x2b3970[_0x1a236a]={};if(!_0x2b3970[_0x1a236a][_0x665eb8])_0x2b3970[_0x1a236a][_0x665eb8]={'objectID':_0x665eb8,'objectType':_0x3f975c,'actions':[]};return _0x2b3970[_0x1a236a][_0x665eb8][_0x256657(0x199)]['push'](..._0x5907dc),_0x2b3970;},{}),_0x311b94=[];for(const _0x31c34b in _0xf3b48f)for(const _0xa16a89 in _0xf3b48f[_0x31c34b]){const {actions:_0x311087,objectType:_0x41bdec}=_0xf3b48f[_0x31c34b][_0xa16a89],_0x87e81=[...new Set(_0x311087)];_0x311b94[_0xd49043(0x17b)]({'unitID':_0x31c34b,'objectID':_0xa16a89,'objectType':_0x41bdec,'actions':_0x87e81});}return new _univerjs_network['HTTPRequest'](_0xd49043(0x2e4),_0x3b89aa,{'headers':_0x1ebb3b['headers'],'withCredentials':_0x1ebb3b['withCredentials'],'responseType':_0x1ebb3b[_0xd49043(0x1f1)],'body':{'requests':_0x311b94}});}},{'distributeResult'(_0x517b88,_0x341481){const {objectActions:_0x4c3f7a}=_0x517b88;return _0x341481['map'](_0x1a5a1d=>{const _0x17bb29=_0x4d20,{unitID:_0x534c11,objectID:_0x339b6f,actions:_0x3a9e4c}=_0x1a5a1d,_0x238ecf=_0x4c3f7a[_0x17bb29(0x2be)](_0x198124=>_0x198124[_0x17bb29(0x27a)]===_0x534c11&&_0x198124[_0x17bb29(0x1d3)]===_0x339b6f);return{'config':_0x1a5a1d,'result':{'actions':_0x3a9e4c[_0x17bb29(0x173)](_0x5e83d7=>_0x238ecf===null||_0x238ecf===void 0x0?void 0x0:_0x238ecf[_0x17bb29(0x199)][_0x17bb29(0x2be)](_0x1624d4=>_0x1624d4[_0x17bb29(0x184)]===_0x5e83d7))[_0x17bb29(0x2e7)](_0x18e05b=>!!_0x18e05b),'error':_0x517b88['error']}};});}})}));}[_0x35406f(0x3cc)](){const _0x2eec34=_0x35406f;var _0x1d2d56;const _0x346fdb=this[_0x2eec34(0x279)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x1d2d56=_0x346fdb===null||_0x346fdb===void 0x0?void 0x0:_0x346fdb[_0x2eec34(0x29c)])!==null&&_0x1d2d56!==void 0x0?_0x1d2d56:DEFAULT_AUTHZ_URL_KEY$1;}async[_0x35406f(0x3c4)](_0x428250){const _0x13b493=_0x35406f,_0x47ecd6=this[_0x13b493(0x3cc)]()+'/'+_0x428250[_0x13b493(0x132)]+_0x13b493(0x108);return(await this['_HTTPService'][_0x13b493(0x357)](_0x47ecd6,{'body':_0x428250}))[_0x13b493(0x229)][_0x13b493(0x1d3)]||'';}async['list'](_0xff043a){const _0x26b9f0=_0x35406f,_0x4838a7=this['_getAPIPrefixPath']()+_0x26b9f0(0x1b5);return(await this[_0x26b9f0(0x342)][_0x26b9f0(0x357)](_0x4838a7,{'body':_0xff043a}))[_0x26b9f0(0x229)][_0x26b9f0(0x211)];}async[_0x35406f(0x171)](_0x2b75da){const _0x31ce46=_0x35406f;var _0x5cd173;const _0x42820e=this[_0x31ce46(0x3cc)]()+'/'+_0x2b75da[_0x31ce46(0x132)]+'/object/'+_0x2b75da[_0x31ce46(0x1d3)],_0x4428ea=await this[_0x31ce46(0x342)]['put'](_0x42820e,{'body':_0x2b75da});if((_0x4428ea===null||_0x4428ea===void 0x0||(_0x5cd173=_0x4428ea[_0x31ce46(0x229)])===null||_0x5cd173===void 0x0||(_0x5cd173=_0x5cd173[_0x31ce46(0x34c)])===null||_0x5cd173===void 0x0?void 0x0:_0x5cd173['code'])!==0x1)throw new Error(_0x31ce46(0x175));}async[_0x35406f(0x347)](_0x2b4936){const _0x1555e8=_0x35406f,_0x42b3de=this[_0x1555e8(0x3cc)]()+'/'+_0x2b4936[_0x1555e8(0x132)]+'/object/'+_0x2b4936[_0x1555e8(0x1d3)]+_0x1555e8(0x2b2);return(await this[_0x1555e8(0x342)][_0x1555e8(0x357)](_0x42b3de,{'body':_0x2b4936}))[_0x1555e8(0x229)][_0x1555e8(0x199)];}async[_0x35406f(0x27b)](_0x45ab41){const _0x23884a=_0x35406f,_0x41611f=this[_0x23884a(0x3cc)]()+_0x23884a(0x270);return(await this[_0x23884a(0x342)][_0x23884a(0x357)](_0x41611f,{'body':{'requests':_0x45ab41}}))[_0x23884a(0x229)][_0x23884a(0x3c5)];}async[_0x35406f(0x227)](_0x1dff1f){const _0x1e676f=_0x35406f,_0x77e27=this[_0x1e676f(0x3cc)]()+'/'+_0x1dff1f['objectType']+'/role',_0x9338b6=await this[_0x1e676f(0x342)][_0x1e676f(0x357)](_0x77e27,{'body':_0x1dff1f});return{'roles':_0x9338b6[_0x1e676f(0x229)]['roles'],'actions':_0x9338b6[_0x1e676f(0x229)][_0x1e676f(0x199)]};}async[_0x35406f(0x2cc)](_0x293594){const _0x61c7c3=_0x35406f,_0x5cf970=this[_0x61c7c3(0x3cc)]()+_0x61c7c3(0x3b2);await this[_0x61c7c3(0x342)][_0x61c7c3(0x202)](_0x5cf970,{'params':{'collaboratorID':_0x293594[_0x61c7c3(0x294)],'objectID':_0x293594[_0x61c7c3(0x1d3)],'unitID':_0x293594[_0x61c7c3(0x27a)]}});}async[_0x35406f(0x1d8)](_0x79f3ba){const _0x5744d5=_0x35406f,_0xc28126=this[_0x5744d5(0x3cc)]()+'/collaborator';await this[_0x5744d5(0x342)]['patch'](_0xc28126,{'body':_0x79f3ba});}async['createCollaborator'](_0x21ba38){const _0x2d630c=_0x35406f,_0x21501a=this[_0x2d630c(0x3cc)]()+_0x2d630c(0x3b2);await this[_0x2d630c(0x342)][_0x2d630c(0x357)](_0x21501a,{'body':_0x21ba38});}async[_0x35406f(0x273)](_0x1a7607){const _0x59d42e=_0x35406f;var _0x4d8ba7;const _0x4c124c=this[_0x59d42e(0x3cc)]()+_0x59d42e(0x3b2),_0x5c165a=await this[_0x59d42e(0x342)][_0x59d42e(0x2c5)](_0x4c124c,{'params':{'objectID':_0x1a7607[_0x59d42e(0x1d3)],'unitID':_0x1a7607[_0x59d42e(0x27a)]}});return this[_0x59d42e(0x122)]((_0x4d8ba7=_0x5c165a[_0x59d42e(0x229)][_0x59d42e(0x280)])!==null&&_0x4d8ba7!==void 0x0?_0x4d8ba7:![]),_0x5c165a[_0x59d42e(0x229)][_0x59d42e(0x103)];}async['putCollaborators'](_0x2c8ced){const _0x2527c3=_0x35406f,_0x18484c=this['_getAPIPrefixPath']()+_0x2527c3(0x3b2);await this['_HTTPService'][_0x2527c3(0x341)](_0x18484c,{'body':_0x2c8ced});}[_0x35406f(0x122)](_0x1ebc02){const _0x2e7d1b=_0x35406f;this[_0x2e7d1b(0x12b)]=_0x1ebc02;}['getCfgEnableObjInherit'](){const _0x572c15=_0x35406f;return this[_0x572c15(0x12b)];}};AuthzIoHttpService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x196)]))],AuthzIoHttpService);function base64ToBytes(_0x45b80b){const _0x1fc2b6=atob(_0x45b80b),_0x584e9e=new Uint8Array(_0x1fc2b6['length']);for(let _0x1e208b=0x0;_0x1e208b<_0x1fc2b6['length'];_0x1e208b++)_0x584e9e[_0x1e208b]=_0x1fc2b6['charCodeAt'](_0x1e208b);return _0x584e9e;}function bytesToBase64(_0x250020){const _0x462fd6=_0x35406f;let _0xcd83ee='';for(let _0x1a3678=0x0;_0x1a3678<_0x250020[_0x462fd6(0x332)];_0x1a3678++)_0xcd83ee+=String[_0x462fd6(0x3a8)](_0x250020[_0x1a3678]);return btoa(_0xcd83ee);}function encrypt(_0xb8992e,_0x268780){const _0x29d4e7=_0x35406f,_0x3aedd3=base64ToBytes(_0x268780),_0x17db8d=(0x0,_noble_ciphers_utils_js[_0x29d4e7(0x2d2)])(0x10);return bytesToBase64((0x0,_noble_ciphers_utils_js['concatBytes'])(_0x17db8d,(0x0,_noble_ciphers_aes_js[_0x29d4e7(0x209)])(_0x3aedd3,_0x17db8d)[_0x29d4e7(0x1ad)]((0x0,_noble_ciphers_utils_js[_0x29d4e7(0x131)])(_0xb8992e))));}function getAttachHeader(){const _0x253a9b=_0x35406f,_0x859a8e=(0x0,_univerjs_pro_license[_0x253a9b(0x1f6)])()[_0x253a9b(0x2a4)];if(typeof window!==_0x253a9b(0x384)&&typeof window[_0x253a9b(0x264)]!==_0x253a9b(0x384)&&_0x859a8e){const _0x5b6463={'time':Math[_0x253a9b(0x1e6)](Date[_0x253a9b(0x1b7)]()/0x3e8),'domain':location['hostname']};return encrypt(JSON[_0x253a9b(0x2db)](_0x5b6463),_0x859a8e);}}let DomainRequestService=class DomainRequestService{constructor(_0x525154){const _0x39e595=_0x35406f;this[_0x39e595(0x26a)]=_0x525154,this[_0x39e595(0x338)]();}[_0x35406f(0x338)](){const _0x1554ed=_0x35406f;this[_0x1554ed(0x26a)][_0x1554ed(0x1a2)]({'interceptor':(_0x1526a4,_0x14b48a)=>{const _0x1dcb9a=_0x1554ed,_0x44f6d3=getAttachHeader();if(_0x44f6d3)_0x1526a4['headers'][_0x1dcb9a(0x1dc)](_0x1dcb9a(0x25f),_0x44f6d3);return _0x14b48a(_0x1526a4);}});}};DomainRequestService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0x35406f(0x1e7)]))],DomainRequestService);let DataLoaderService=class DataLoaderService extends _univerjs_core[_0x35406f(0x388)]{constructor(_0x5a19f4,_0x2917e2,_0x594044){const _0xf366=_0x35406f;super(),this[_0xf366(0x3ae)]=_0x5a19f4,this['_snapshotService']=_0x2917e2,this[_0xf366(0x3d4)]=_0x594044,_defineProperty(this,_0xf366(0x14a),new rxjs[(_0xf366(0x2a2))](null)),_defineProperty(this,'unitInfo$',this[_0xf366(0x14a)][_0xf366(0x25c)]());}async[_0x35406f(0x216)](_0x564634,_0x57f1a8,_0x656e18){const _0x4a5298=_0x35406f;this['_unitInfo$']['next']({'unitId':_0x564634,'type':_0x57f1a8});let _0x2d37d0=null;switch(_0x57f1a8){case _univerjs_core[_0x4a5298(0x3b4)][_0x4a5298(0x307)]:_0x2d37d0=await this[_0x4a5298(0x2a6)][_0x4a5298(0x29a)](_0x564634,_0x656e18);break;case _univerjs_core[_0x4a5298(0x3b4)]['UNIVER_DOC']:_0x2d37d0=await this[_0x4a5298(0x2a6)][_0x4a5298(0x1b2)](_0x564634,_0x656e18);break;default:this[_0x4a5298(0x3ae)][_0x4a5298(0x34c)](_0x4a5298(0x337),_0x4a5298(0x14b));break;}return _0x2d37d0;}async[_0x35406f(0x35a)](_0x565bb5,_0x4ae545,_0x5b28be){const _0x599c02=_0x35406f;var _0x311c87;this[_0x599c02(0x14a)][_0x599c02(0x2b4)]({'unitId':_0x565bb5,'type':_0x4ae545,'subUnitId':_0x5b28be});let _0x495fc8=0x0;const _0x1e3929=await((_0x311c87=this[_0x599c02(0x3d4)])===null||_0x311c87===void 0x0?void 0x0:_0x311c87[_0x599c02(0x3ac)](_0x565bb5));if(_0x1e3929&&(_0x1e3929[_0x599c02(0x373)]||_0x1e3929['mutations'][_0x599c02(0x332)]!==0x0))_0x495fc8=_0x1e3929['rev'];if(_0x495fc8===0x0)this['_logService'][_0x599c02(0x2f7)](_0x599c02(0x337),_0x599c02(0x101));return this[_0x599c02(0x216)](_0x565bb5,_0x4ae545,_0x495fc8);}};DataLoaderService=__decorate([__decorateParam(0x0,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x136)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],DataLoaderService);const ALLOW_IMAGE_LIST=['image/png',_0x35406f(0x17d),_0x35406f(0x28f),_0x35406f(0x251),'image/bmp'],ALLOW_IMAGE_SIZE=0x5*0x400*0x400,DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY='/universer-api/stream/file/upload',DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY='/universer-api/file/{fileID}/sign-url';let CollaborationImageIoService=class CollaborationImageIoService{constructor(_0x5a7809,_0x5a0b84,_0x18ad20){const _0x38d0bf=_0x35406f;this[_0x38d0bf(0x26a)]=_0x5a7809,this[_0x38d0bf(0x279)]=_0x5a0b84,this['_univerInstanceService']=_0x18ad20,_defineProperty(this,_0x38d0bf(0x33c),0x0),_defineProperty(this,'_change$',new rxjs[(_0x38d0bf(0x2bc))]()),_defineProperty(this,_0x38d0bf(0x3bc),this['_change$']),_defineProperty(this,_0x38d0bf(0xfb),new Map());}[_0x35406f(0x1f0)](_0x59a6a3){const _0x39ab07=_0x35406f;this[_0x39ab07(0x33c)]=_0x59a6a3,this['_change$'][_0x39ab07(0x2b4)](_0x59a6a3);}[_0x35406f(0x35d)](_0x1e569d,_0xdb88de){const _0x1e1181=_0x35406f;if(_0xdb88de===_univerjs_drawing[_0x1e1181(0x324)][_0x1e1181(0x18e)]){const _0x148496=new Image();return _0x148496[_0x1e1181(0x287)]=_0x1e569d,_0x148496;}return this[_0x1e1181(0xfb)][_0x1e1181(0x2c5)](_0x1e569d);}[_0x35406f(0x340)](_0x4933b6,_0x3437a3,_0x30c745){const _0x15e505=_0x35406f;if(_0x3437a3===_univerjs_drawing[_0x15e505(0x324)][_0x15e505(0x18e)]||_0x30c745==null)return;this[_0x15e505(0xfb)][_0x15e505(0x1dc)](_0x4933b6,_0x30c745);}async[_0x35406f(0x328)](_0x41a9dc){const _0x294f4a=_0x35406f;try{const _0x1c9417=this[_0x294f4a(0x2e9)](this[_0x294f4a(0x24c)](),''+_0x41a9dc),_0x383a3b=(await this[_0x294f4a(0x26a)][_0x294f4a(0x2c5)](_0x1c9417))[_0x294f4a(0x229)];if(_0x383a3b[_0x294f4a(0x34c)]&&_0x383a3b[_0x294f4a(0x34c)][_0x294f4a(0x1c7)]===_univerjs_protocol[_0x294f4a(0x16d)]['OK']){const _0x126580=(0x0,_univerjs_core[_0x294f4a(0x230)])(_0x383a3b[_0x294f4a(0x292)],this['_getDownloadEndpointURL']());return Promise[_0x294f4a(0x299)](_0x126580);}return Promise[_0x294f4a(0x1cc)](_0x383a3b[_0x294f4a(0x34c)]);}catch(_0x27ed10){return Promise[_0x294f4a(0x1cc)](_0x27ed10);}}async[_0x35406f(0x23d)](_0x14adf3){const _0x3c986b=_0x35406f;let _0x395d7e='';if(!ALLOW_IMAGE_LIST[_0x3c986b(0x369)](_0x14adf3[_0x3c986b(0x285)]))return this[_0x3c986b(0x306)](),Promise[_0x3c986b(0x1cc)](new Error(_univerjs_drawing[_0x3c986b(0x1b0)]['ERROR_IMAGE_TYPE']));if(_0x14adf3[_0x3c986b(0x21d)]>ALLOW_IMAGE_SIZE)return this[_0x3c986b(0x306)](),Promise[_0x3c986b(0x1cc)](new Error(_univerjs_drawing['ImageUploadStatusType'][_0x3c986b(0x32b)]));try{const _0x1e896e=new FormData();_0x1e896e[_0x3c986b(0x381)]('file',_0x14adf3);const _0x61ec16=this[_0x3c986b(0x3a3)][_0x3c986b(0x32d)](),_0x2d0f96=_0x61ec16===null||_0x61ec16===void 0x0?void 0x0:_0x61ec16['getUnitId']();if(!_0x2d0f96)throw new Error(_0x3c986b(0x186));const _0x1db012=this['_getUploadFileURL']()+_0x3c986b(0x2b1)+_0x14adf3[_0x3c986b(0x21d)][_0x3c986b(0x355)]()+_0x3c986b(0x2a9)+_univerjs_protocol['FileSource']['UnitEmbedded']+_0x3c986b(0x2c8)+encodeURIComponent(_0x2d0f96),_0x533810={'body':_0x1e896e},_0x9fecd2=(await this[_0x3c986b(0x26a)][_0x3c986b(0x357)](_0x1db012,_0x533810))[_0x3c986b(0x229)];if(typeof _0x9fecd2[_0x3c986b(0x201)]!==_0x3c986b(0x37d))return this[_0x3c986b(0x306)](),Promise['reject'](new Error(_univerjs_drawing[_0x3c986b(0x1b0)][_0x3c986b(0x241)]));_0x395d7e=_0x9fecd2['FileId'];}catch(_0x42aa2c){return this[_0x3c986b(0x306)](),Promise[_0x3c986b(0x1cc)](new Error(_univerjs_drawing[_0x3c986b(0x1b0)][_0x3c986b(0x241)]));}return new Promise((_0x5a12c0,_0xd98d9b)=>{const _0x5a230d=_0x3c986b,_0x5062a4=new FileReader();_0x5062a4[_0x5a230d(0x3b5)](_0x14adf3),_0x5062a4[_0x5a230d(0x1a8)]=_0x505917=>{const _0x3204e8=_0x5a230d;var _0x4385c3;const _0x548c3f=(_0x4385c3=_0x505917[_0x3204e8(0x3d0)])===null||_0x4385c3===void 0x0?void 0x0:_0x4385c3[_0x3204e8(0x281)];if(_0x548c3f==null){this['_decreaseWaiting'](),_0xd98d9b(new Error(_univerjs_drawing[_0x3204e8(0x1b0)][_0x3204e8(0x241)]));return;}_0x5a12c0({'imageId':(0x0,_univerjs_core['generateRandomId'])(0x6),'imageSourceType':_univerjs_drawing[_0x3204e8(0x324)][_0x3204e8(0x159)],'source':_0x395d7e,'base64Cache':_0x548c3f,'status':_univerjs_drawing['ImageUploadStatusType']['SUCCUSS']}),this[_0x3204e8(0x306)]();};});}['_getUploadFileURL'](){const _0x215cde=_0x35406f;var _0x440a9c;const _0x150b2d=this[_0x215cde(0x279)][_0x215cde(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x440a9c=_0x150b2d===null||_0x150b2d===void 0x0?void 0x0:_0x150b2d[_0x215cde(0x3c3)])!==null&&_0x440a9c!==void 0x0?_0x440a9c:DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY;}[_0x35406f(0x24c)](){const _0x5b2e39=_0x35406f;var _0x5c4f26;const _0x2785a5=this[_0x5b2e39(0x279)][_0x5b2e39(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x5c4f26=_0x2785a5===null||_0x2785a5===void 0x0?void 0x0:_0x2785a5[_0x5b2e39(0x1a5)])!==null&&_0x5c4f26!==void 0x0?_0x5c4f26:DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY;}[_0x35406f(0x1c8)](){const _0x3ee84c=_0x35406f;var _0x388ac6;const _0x4e49ae=this[_0x3ee84c(0x279)][_0x3ee84c(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x388ac6=_0x4e49ae===null||_0x4e49ae===void 0x0?void 0x0:_0x4e49ae[_0x3ee84c(0x18b)])!==null&&_0x388ac6!==void 0x0?_0x388ac6:location[_0x3ee84c(0x113)];}[_0x35406f(0x2e9)](_0xf8d93d,_0x5b513b){const _0x1eb30b=_0x35406f;return _0xf8d93d[_0x1eb30b(0x189)](_0x1eb30b(0x1da),_0x5b513b);}[_0x35406f(0x306)](){const _0x2af2a5=_0x35406f;this['_waitCount']-=0x1,this[_0x2af2a5(0x333)][_0x2af2a5(0x2b4)](this['_waitCount']);}};CollaborationImageIoService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x1,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x161)]))],CollaborationImageIoService);const DEFAULT_AUTHZ_URL_KEY=_0x35406f(0x353);let MentionIoHttpService=class MentionIoHttpService{constructor(_0x5176a0,_0x3ddc45){const _0x34fe1d=_0x35406f;this[_0x34fe1d(0x279)]=_0x5176a0,this['_HTTPService']=_0x3ddc45;}['_getAPIPrefixPath'](){const _0x3b7dca=_0x35406f;var _0x5c62dc;const _0x10ee7a=this[_0x3b7dca(0x279)][_0x3b7dca(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x5c62dc=_0x10ee7a===null||_0x10ee7a===void 0x0?void 0x0:_0x10ee7a[_0x3b7dca(0x29c)])!==null&&_0x5c62dc!==void 0x0?_0x5c62dc:DEFAULT_AUTHZ_URL_KEY;}async[_0x35406f(0x1cd)](_0x3b22b4){const _0xef5c39=_0x35406f,_0x1ecb2a=this['_getAPIPrefixPath']()+_0xef5c39(0x3b2);return{'list':[{'title':'People','mentions':(await this[_0xef5c39(0x342)]['get'](_0x1ecb2a,{'params':{'objectID':_0x3b22b4[_0xef5c39(0x349)],'unitID':_0x3b22b4[_0xef5c39(0x349)]}}))[_0xef5c39(0x229)][_0xef5c39(0x103)][_0xef5c39(0x173)](_0x2fd22a=>({'objectId':_0x2fd22a['id'],'name':_0x2fd22a['subject'][_0xef5c39(0x1df)],'metadata':{'icon':_0x2fd22a['subject'][_0xef5c39(0x35e)]},'label':_0x2fd22a[_0xef5c39(0x124)][_0xef5c39(0x1df)],'objectType':_univerjs_core[_0xef5c39(0x185)]['PERSON']})),'metadata':{},'type':_univerjs_core[_0xef5c39(0x185)][_0xef5c39(0x3be)]}]};}};MentionIoHttpService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x196)])),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0x35406f(0x1e7)]))],MentionIoHttpService);let PermissionService=class PermissionService extends _univerjs_core['RxDisposable']{constructor(_0x5db1ef,_0x2e43d7,_0x5880b5,_0x2f324b,_0x12a4e4){const _0x1b7f6c=_0x35406f;super(),this[_0x1b7f6c(0x157)]=_0x5db1ef,this[_0x1b7f6c(0x3a3)]=_0x2e43d7,this[_0x1b7f6c(0x36e)]=_0x5880b5,this[_0x1b7f6c(0x19b)]=_0x2f324b,this[_0x1b7f6c(0x24d)]=_0x12a4e4,this[_0x1b7f6c(0x2f2)](),this[_0x1b7f6c(0x206)]();}[_0x35406f(0x206)](){const _0x46dbed=_0x35406f,_0x51c267=async _0x44f647=>{const _0x5aa6f3=_0x4d20;(await this[_0x5aa6f3(0x19b)]['requireSession'](_0x44f647))[_0x5aa6f3(0x195)][_0x5aa6f3(0x38a)]((0x0,rxjs_operators[_0x5aa6f3(0x2e7)])(_0x1bdb82=>_0x1bdb82[_0x5aa6f3(0x258)]===_univerjs_pro_collaboration['CollaborationEvent']['SHOULD_CLOSE_CONN']),(0x0,rxjs_operators[_0x5aa6f3(0x3b3)])(this[_0x5aa6f3(0x378)]))[_0x5aa6f3(0x2b5)](_0x200482=>{const _0x518396=_0x5aa6f3,{reason:_0x5ef53d}=_0x200482['data'];this[_0x518396(0x24d)][_0x518396(0x190)]({'id':CollaborationUIEventId[_0x518396(0x248)],'data':_0x5ef53d}),this[_0x518396(0x36e)][_0x518396(0x29e)](new _univerjs_sheets[(_0x518396(0x213))](_0x44f647)['id'],![]),this[_0x518396(0x19b)][_0x518396(0x11f)](_0x44f647);});};(0x0,rxjs['merge'])(this['_univerInstanceService']['getTypeOfUnitAdded$'](_univerjs_core[_0x46dbed(0x3b4)]['UNIVER_SHEET']),this['_univerInstanceService'][_0x46dbed(0x109)](_univerjs_core['UniverInstanceType'][_0x46dbed(0x319)]))[_0x46dbed(0x38a)]((0x0,rxjs_operators['map'])(_0x153a3b=>_0x153a3b[_0x46dbed(0x1bf)]()),(0x0,rxjs_operators['filter'])(_0x259797=>!(0x0,_univerjs_core[_0x46dbed(0x335)])(_0x259797)),(0x0,rxjs_operators[_0x46dbed(0x3b3)])(this[_0x46dbed(0x378)]))[_0x46dbed(0x2b5)](_0x3c0fe7=>{_0x51c267(_0x3c0fe7);});}[_0x35406f(0x2f2)](){const _0xa159bc=_0x35406f,_0x374fb1=async _0x482aca=>{const _0x29eb4f=_0x4d20,_0x232ce6=await this['_collaborationSessionService'][_0x29eb4f(0x2d5)](_0x482aca),_0x168bce=this[_0x29eb4f(0x157)][_0x29eb4f(0x2c5)](_univerjs_sheets[_0x29eb4f(0x2f0)]);_0x232ce6[_0x29eb4f(0x195)][_0x29eb4f(0x38a)]((0x0,rxjs_operators[_0x29eb4f(0x2e7)])(_0x1d1fa2=>_0x1d1fa2[_0x29eb4f(0x258)]===_univerjs_pro_collaboration[_0x29eb4f(0x1ae)][_0x29eb4f(0x143)]),(0x0,rxjs_operators['takeUntil'])(this[_0x29eb4f(0x378)]))[_0x29eb4f(0x2b5)](_0x489a29=>{const _0x5e2fda=_0x29eb4f,{objectId:_0x3b763a}=_0x489a29[_0x5e2fda(0x1b8)];if(_0x3b763a===_0x482aca)_0x168bce['initWorkbookPermissionChange'](_0x482aca);else _0x168bce[_0x5e2fda(0x2c4)](_0x482aca,_0x3b763a);});};(0x0,rxjs['merge'])(this[_0xa159bc(0x3a3)][_0xa159bc(0x109)](_univerjs_core[_0xa159bc(0x3b4)][_0xa159bc(0x307)]))['pipe']((0x0,rxjs_operators[_0xa159bc(0x173)])(_0x2f4642=>_0x2f4642[_0xa159bc(0x1bf)]()),(0x0,rxjs_operators['filter'])(_0x6209d9=>!(0x0,_univerjs_core[_0xa159bc(0x335)])(_0x6209d9)),(0x0,rxjs_operators[_0xa159bc(0x3b3)])(this[_0xa159bc(0x378)]))[_0xa159bc(0x2b5)](_0x35aede=>{_0x374fb1(_0x35aede);});}};PermissionService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x2,_univerjs_core[_0x35406f(0x192)]),__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationSessionService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService))],PermissionService);let SnapshotServerOverHTTPService=class SnapshotServerOverHTTPService{constructor(_0x161474,_0x1d8d97){const _0x5db144=_0x35406f;this[_0x5db144(0x279)]=_0x161474,this['_httpService']=_0x1d8d97;}async[_0x35406f(0x144)](_0x2b574d,_0x1a370f){const _0x186511=_0x35406f;var _0x18ff91;const {unitID:_0x5ba10c,type:_0x3a5ce4,revision:revision=0x0}=_0x1a370f,_0x52bd50=this[_0x186511(0x3bf)]()+'/'+_0x3a5ce4+_0x186511(0x150)+_0x5ba10c+_0x186511(0x2e0)+revision,_0x36db18=(await this[_0x186511(0x26a)][_0x186511(0x2c5)](_0x52bd50))[_0x186511(0x229)],_0x43ee03=(_0x18ff91=_0x36db18[_0x186511(0x2e3)])===null||_0x18ff91===void 0x0?void 0x0:_0x18ff91[_0x186511(0x11c)];if(_0x43ee03){const _0x16c780=_0x43ee03===null||_0x43ee03===void 0x0?void 0x0:_0x43ee03['originalMeta'];_0x43ee03[_0x186511(0x2f5)]=_univerjs_pro_collaboration[_0x186511(0x182)][_0x186511(0x356)]((0x0,_univerjs_pro_collaboration[_0x186511(0x2b8)])(_0x16c780)),Object[_0x186511(0x1d2)](_0x43ee03[_0x186511(0x33f)])[_0x186511(0x320)](([,_0xd36b4])=>{const _0xa231e5=_0x186511,_0x276966=_0xd36b4[_0xa231e5(0x2f5)];_0xd36b4[_0xa231e5(0x2f5)]=_univerjs_pro_collaboration[_0xa231e5(0x182)][_0xa231e5(0x356)]((0x0,_univerjs_pro_collaboration[_0xa231e5(0x2b8)])(_0x276966));});}return _0x36db18;}async[_0x35406f(0x29f)](_0x47b89c,_0x38d83e){const _0x3db988=_0x35406f,{unitID:_0x1dc929,type:_0x166cac,blockID:_0x349edc}=_0x38d83e,_0x58c739=this[_0x3db988(0x34d)]()+'/'+_0x166cac+_0x3db988(0x150)+_0x1dc929+'/block/'+_0x349edc;return(await this[_0x3db988(0x26a)]['get'](_0x58c739))[_0x3db988(0x229)];}async[_0x35406f(0x2d9)](_0x11987d,_0x1fe2ea){const _0xe7f6bb=_0x35406f,{unitID:_0x4a0993,type:_0x386325,blockID:_0xe79289}=_0x1fe2ea,_0x438164=this['_getAPIPrefix']()+_0xe7f6bb(0x1bc)+_0x386325+_0xe7f6bb(0x150)+_0x4a0993+'/block/'+_0xe79289;return(await this[_0xe7f6bb(0x26a)][_0xe7f6bb(0x2c5)](_0x438164))[_0xe7f6bb(0x229)];}async['fetchMissingChangesets'](_0x35bd67,_0x26772d){const _0x223ea3=_0x35406f,{unitID:_0x3fda2f,type:_0xffc20c,from:_0x533c82,to:_0x2e3c35}=_0x26772d,_0x56c96f=this['_getAPIPrefix']()+'/'+_0xffc20c+_0x223ea3(0x150)+_0x3fda2f+_0x223ea3(0x11a)+_0x533c82+_0x223ea3(0x1ba)+_0x2e3c35;return(await this[_0x223ea3(0x26a)][_0x223ea3(0x2c5)](_0x56c96f))[_0x223ea3(0x229)];}[_0x35406f(0x3bf)](){const _0x4e1fb3=_0x35406f;var _0x5b24d4;return(_0x5b24d4=this['_configService'][_0x4e1fb3(0x38b)](_0x4e1fb3(0x1d1)))!==null&&_0x5b24d4!==void 0x0?_0x5b24d4:this['_getAPIPrefix']();}['_getAPIPrefix'](){const _0x48b0d4=_0x35406f;var _0x138650;const _0x5133f1=this[_0x48b0d4(0x279)][_0x48b0d4(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x138650=_0x5133f1===null||_0x5133f1===void 0x0?void 0x0:_0x5133f1[_0x48b0d4(0x2fd)])!==null&&_0x138650!==void 0x0?_0x138650:DEFAULT_SNAPSHOT_SERVER_URL;}async[_0x35406f(0x37c)](_0x24fcfe,_0x16e951){const _0x2e977f=_0x35406f,_0x1f040a=_0x2e977f(0x153)+_0x16e951[_0x2e977f(0x285)]+'/unit/'+_0x16e951[_0x2e977f(0x27a)]+_0x2e977f(0x313);return(await this[_0x2e977f(0x26a)][_0x2e977f(0x2c5)](_0x1f040a,{'params':{'resourceId':JSON[_0x2e977f(0x2db)](_0x16e951[_0x2e977f(0x172)])}}))[_0x2e977f(0x229)];}['saveSnapshot'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x35406f(0x34f)](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['saveSheetBlock'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['saveChangeset'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x35406f(0x312)](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['getLatestCsReqIdBySid'](){const _0x43e5bc=_0x35406f;throw new Error(_0x43e5bc(0x2ab));}};SnapshotServerOverHTTPService=__decorate([__decorateParam(0x0,_univerjs_core['IConfigService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network['HTTPService']))],SnapshotServerOverHTTPService);let CollaborativeUndoRedoService=class CollaborativeUndoRedoService extends _univerjs_core[_0x35406f(0x121)]{constructor(_0x2fe02c,_0x10d77a,_0x2ff7e6,_0x58eb20,_0x2c2eb7){const _0x266b99=_0x35406f;super(_0x2fe02c,_0x10d77a,_0x2ff7e6),this['_transformService']=_0x58eb20,this[_0x266b99(0x3ae)]=_0x2c2eb7;}[_0x35406f(0x27d)](_0x146998,_0x3fbc07){const _0x243440=_0x35406f,_0xc415aa=this[_0x243440(0x27e)](_0x146998);if(_0xc415aa)try{const _0xca7528=this[_0x243440(0x2fc)](_0xc415aa,_0x3fbc07);this[_0x243440(0x339)](_0x146998,_0xca7528);}catch(_0x31007e){this[_0x243440(0x3ae)]['error'](_0x243440(0x352),_0x31007e),this[_0x243440(0x140)](_0x146998);}const _0x2375cb=this[_0x243440(0x2ff)](_0x146998);if(_0x2375cb)try{const _0x4f21c8=this['_transformStack'](_0x2375cb,_0x3fbc07);this[_0x243440(0x1e5)](_0x146998,_0x4f21c8);}catch(_0x46237a){this['_logService']['error'](_0x46237a),this[_0x243440(0x15d)](_0x146998);}}[_0x35406f(0x140)](_0x21b075){const _0x4777b8=_0x35406f,_0x37d429=this[_0x4777b8(0x27e)](_0x21b075);_0x37d429&&(_0x37d429[_0x4777b8(0x332)]=0x0,this[_0x4777b8(0x2d8)]());}[_0x35406f(0x15d)](_0x5aa9fe){const _0x31abf4=_0x35406f,_0x21ad29=this['_getRedoStack'](_0x5aa9fe);_0x21ad29&&(_0x21ad29[_0x31abf4(0x332)]=0x0,this['_updateStatus']());}[_0x35406f(0x339)](_0x5cc7df,_0x5e1314){const _0x52eaad=_0x35406f;this['_undoStacks']['set'](_0x5cc7df,_0x5e1314),this[_0x52eaad(0x2d8)]();}[_0x35406f(0x1e5)](_0x1c5faa,_0x3960e2){const _0x563318=_0x35406f;this['_redoStacks'][_0x563318(0x1dc)](_0x1c5faa,_0x3960e2),this[_0x563318(0x2d8)]();}[_0x35406f(0x2fc)](_0x242f26,_0x30a9fe){const _0x573a38=_0x35406f,_0x251d88=[];let _0x1a1b09=_0x30a9fe,_0x43c53f=_0x30a9fe;for(let _0x3ddb45=_0x242f26[_0x573a38(0x332)]-0x1;_0x3ddb45>=0x0;_0x3ddb45--){const {unitID:_0x292b69,undoMutations:_0x32df0c,redoMutations:_0x567bdb}=_0x242f26[_0x3ddb45],_0x1de64f=this[_0x573a38(0x300)][_0x573a38(0x23f)](_0x1a1b09,_0x32df0c),_0x1dd052=this[_0x573a38(0x300)][_0x573a38(0x23f)](_0x43c53f,_0x567bdb);if((0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetFailure'])(_0x1de64f)||(0x0,_univerjs_pro_collaboration[_0x573a38(0x31a)])(_0x1dd052)){this[_0x573a38(0x3ae)][_0x573a38(0x34c)](_0x573a38(0x352),_0x573a38(0x219),_0x1de64f,_0x1dd052);break;}_0x1a1b09=_0x1de64f[_0x573a38(0x302)],_0x43c53f=_0x1dd052[_0x573a38(0x302)],_0x251d88[_0x573a38(0x17b)]({'unitID':_0x292b69,'undoMutations':_0x1de64f[_0x573a38(0x1d6)],'redoMutations':_0x1dd052[_0x573a38(0x1d6)]});}return _0x251d88[_0x573a38(0x222)]();}};CollaborativeUndoRedoService=__decorate([__decorateParam(0x0,_univerjs_core['IUniverInstanceService']),__decorateParam(0x1,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x2,_univerjs_core['IContextService']),__decorateParam(0x3,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0x4,_univerjs_core[_0x35406f(0x33e)])],CollaborativeUndoRedoService);let UniverCollaborationClientPlugin=class UniverCollaborationClientPlugin extends _univerjs_core[_0x35406f(0x321)]{constructor(_0x5af138={},_0x3ce254,_0x5c9d3a,_0x5af684){const _0x3abd05=_0x35406f;super(),this[_0x3abd05(0x3cb)]=_0x5af138,this[_0x3abd05(0x3ae)]=_0x3ce254,this[_0x3abd05(0x157)]=_0x5c9d3a,this[_0x3abd05(0x279)]=_0x5af684;const {..._0x59aee9}=(0x0,_univerjs_core[_0x3abd05(0x218)])({},defaultPluginConfig,_0x5af138);if(!_0x59aee9[_0x3abd05(0x385)])throw new Error(_0x3abd05(0x141));this['_config']=_0x59aee9,this[_0x3abd05(0x279)][_0x3abd05(0x193)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,_0x59aee9);}['onStarting'](){const _0x365f32=_0x35406f;this[_0x365f32(0x223)](),this[_0x365f32(0x187)]();}[_0x35406f(0x223)](){const _0x5d01da=_0x35406f;var _0x6f9173,_0x1422ed;if(this[_0x5d01da(0x157)][_0x5d01da(0x3d5)](_univerjs_core[_0x5d01da(0x207)]))this['_logService'][_0x5d01da(0x34c)]('[UniverCollaborationClientPlugin]',_0x5d01da(0x28a));const _0x1fe102=(0x0,_univerjs_core[_0x5d01da(0x2ae)])([[_univerjs_core[_0x5d01da(0x207)],{'useClass':CollaborativeUndoRedoService}],[CollaborationSessionService],[MemberService],[SheetTransformSelectionsService],[AuthServerService],[DomainRequestService],[CommentService],[PermissionService],[CollaborationUIEventService],[DataLoaderService],[ICollaborationSocketService,{'useClass':this[_0x5d01da(0x3cb)][_0x5d01da(0x385)]}],[_univerjs_pro_collaboration[_0x5d01da(0x2a7)],{'useClass':SnapshotServerOverHTTPService}],[_univerjs_core[_0x5d01da(0x286)],{'useClass':AuthzIoHttpService}],[_univerjs_drawing[_0x5d01da(0x326)],{'useClass':CollaborationImageIoService}],[_univerjs_core[_0x5d01da(0x3a0)],{'useClass':MentionIoHttpService}],[CollaborationController],[FileNameController]],(_0x6f9173=this[_0x5d01da(0x3cb)])===null||_0x6f9173===void 0x0?void 0x0:_0x6f9173[_0x5d01da(0x198)]);if(!((_0x1422ed=this[_0x5d01da(0x3cb)])===null||_0x1422ed===void 0x0?void 0x0:_0x1422ed[_0x5d01da(0x1d7)])){const _0x373afb=_0x1fe102[_0x5d01da(0x28e)](([_0x51513c])=>_0x51513c===ISingleActiveUnitService);if(_0x373afb!==-0x1)_0x1fe102['splice'](_0x373afb,0x1);}(0x0,_univerjs_core[_0x5d01da(0x396)])(this[_0x5d01da(0x157)],_0x1fe102);}['_initDependencies'](){const _0x47475e=_0x35406f;var _0x156971,_0x1bb86f;this[_0x47475e(0x157)][_0x47475e(0x2c5)](_univerjs_network['HTTPService'])[_0x47475e(0x1a2)]({'priority':0x14,'interceptor':(0x0,_univerjs_network[_0x47475e(0x16e)])({'maxParallel':0x6})});if(!((_0x156971=this['_config'])===null||_0x156971===void 0x0?void 0x0:_0x156971[_0x47475e(0x325)])){var _0x438ce2;(_0x438ce2=this[_0x47475e(0x157)][_0x47475e(0x2c5)](ILocalCacheService,_univerjs_core['Quantity'][_0x47475e(0x34b)]))===null||_0x438ce2===void 0x0||_0x438ce2[_0x47475e(0x24a)]();}if((_0x1bb86f=this['_config'])===null||_0x1bb86f===void 0x0?void 0x0:_0x1bb86f[_0x47475e(0x20a)])(0x0,_univerjs_core[_0x47475e(0x156)])(this[_0x47475e(0x157)],[[AuthServerService]]);(0x0,_univerjs_core[_0x47475e(0x156)])(this['_injector'],[[DomainRequestService],[CollaborationController],[PermissionService]]);}};function _0x4d20(_0x22b29f,_0x127a3c){_0x22b29f=_0x22b29f-0xf9;const _0x2fc44c=_0x2fc4();let _0x4d203e=_0x2fc44c[_0x22b29f];return _0x4d203e;}_defineProperty(UniverCollaborationClientPlugin,_0x35406f(0x394),_0x35406f(0x2fa)),_defineProperty(UniverCollaborationClientPlugin,_0x35406f(0x1fc),name),_defineProperty(UniverCollaborationClientPlugin,_0x35406f(0x200),version),UniverCollaborationClientPlugin=__decorate([(0x0,_univerjs_core[_0x35406f(0x1eb)])(_univerjs_pro_license['UniverLicensePlugin'],_univerjs_pro_collaboration[_0x35406f(0x125)],_univerjs_network['UniverNetworkPlugin']),__decorateParam(0x1,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x3,_univerjs_core[_0x35406f(0x196)])],UniverCollaborationClientPlugin),Object[_0x35406f(0x105)](exports,_0x35406f(0x26c),{'enumerable':!![],'get':function(){return AuthzIoHttpService;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x359),{'enumerable':!![],'get':function(){return AwaitingState;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x1ca),{'enumerable':!![],'get':function(){return AwaitingWithPendingState;}}),exports[_0x35406f(0x170)]=COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Object[_0x35406f(0x105)](exports,'CollaborationController',{'enumerable':!![],'get':function(){return CollaborationController;}}),Object['defineProperty'](exports,'CollaborationEntity',{'enumerable':!![],'get':function(){return CollaborationEntity;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x3b9),{'enumerable':!![],'get':function(){return CollaborationImageIoService;}}),Object['defineProperty'](exports,_0x35406f(0x295),{'enumerable':!![],'get':function(){return CollaborationSession;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x2ea),{'enumerable':!![],'get':function(){return CollaborationSessionService;}}),Object['defineProperty'](exports,_0x35406f(0x126),{'enumerable':!![],'get':function(){return CollaborationSocketService;}}),exports[_0x35406f(0x20e)]=CollaborationStatus,exports[_0x35406f(0x26f)]=CollaborationUIEventId,exports['CollaborationUIEventService']=CollaborationUIEventService,Object['defineProperty'](exports,_0x35406f(0x235),{'enumerable':!![],'get':function(){return CollaborativeUndoRedoService;}}),exports[_0x35406f(0x253)]=CommentService,Object[_0x35406f(0x105)](exports,_0x35406f(0x361),{'enumerable':!![],'get':function(){return ConflictState;}}),exports['DEFAULT_COLLAB_WEB_SOCKET_URL']=DEFAULT_COLLAB_WEB_SOCKET_URL,exports['DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT']=DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,exports[_0x35406f(0x348)]=DEFAULT_WS_SESSION_TICKET_URL,Object[_0x35406f(0x105)](exports,_0x35406f(0x3a7),{'enumerable':!![],'get':function(){return DataLoaderService;}}),Object[_0x35406f(0x105)](exports,'DocCollaborationEntity',{'enumerable':!![],'get':function(){return DocCollaborationEntity;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x261),{'enumerable':!![],'get':function(){return FetchingMissState;}}),exports[_0x35406f(0x36a)]=HEARTBEAT_INTERVAL_KEY,exports['HEARTBEAT_TIMEOUT_KEY']=HEARTBEAT_TIMEOUT_KEY,exports[_0x35406f(0x379)]=ICollaborationSocketService,exports[_0x35406f(0x22e)]=ILocalCacheService,exports['INetworkConditionService']=INetworkConditionService,exports[_0x35406f(0x29d)]=ISingleActiveUnitService,exports[_0x35406f(0x366)]=LOCAL_CACHE_INTERVAL,exports['LOCAL_CACHE_INTERVAL_KEY']=LOCAL_CACHE_INTERVAL_KEY,Object[_0x35406f(0x105)](exports,_0x35406f(0x17f),{'enumerable':!![],'get':function(){return MemberService;}}),Object['defineProperty'](exports,_0x35406f(0x3c0),{'enumerable':!![],'get':function(){return MentionIoHttpService;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x226),{'enumerable':!![],'get':function(){return OfflineState;}}),Object[_0x35406f(0x105)](exports,'PendingState',{'enumerable':!![],'get':function(){return PendingState;}}),exports[_0x35406f(0x323)]=REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,exports[_0x35406f(0x1d4)]=RETRY_CONNECTING_MAX_COUNT_KEY,exports[_0x35406f(0x3a2)]=SessionStatus,Object[_0x35406f(0x105)](exports,_0x35406f(0x12e),{'enumerable':!![],'get':function(){return SheetCollaborationEntity;}}),Object['defineProperty'](exports,_0x35406f(0x3aa),{'enumerable':!![],'get':function(){return SheetTransformSelectionsService;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x2dd),{'enumerable':!![],'get':function(){return SnapshotServerOverHTTPService;}}),Object['defineProperty'](exports,_0x35406f(0x2ee),{'enumerable':!![],'get':function(){return SyncedState;}}),exports['UnitStatus']=UnitStatus,Object['defineProperty'](exports,_0x35406f(0x1b6),{'enumerable':!![],'get':function(){return UniverCollaborationClientPlugin;}}),exports[_0x35406f(0x2cf)]=deserializeToCombResponse,exports[_0x35406f(0x14c)]=getLocalCacheKey,exports[_0x35406f(0x15f)]=serializeCombRequest;
|