@univerjs-pro/collaboration-client 1.0.4 → 1.2.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.
Files changed (102) hide show
  1. package/README.md +2 -0
  2. package/lib/cjs/facade.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/ar-SA.js +1 -1
  5. package/lib/cjs/locale/ca-ES.js +1 -1
  6. package/lib/cjs/locale/de-DE.js +1 -1
  7. package/lib/cjs/locale/en-US.js +1 -1
  8. package/lib/cjs/locale/es-ES.js +1 -1
  9. package/lib/cjs/locale/fa-IR.js +1 -1
  10. package/lib/cjs/locale/fr-FR.js +1 -1
  11. package/lib/cjs/locale/id-ID.js +1 -1
  12. package/lib/cjs/locale/it-IT.js +1 -1
  13. package/lib/cjs/locale/ja-JP.js +1 -1
  14. package/lib/cjs/locale/ko-KR.js +1 -1
  15. package/lib/cjs/locale/pl-PL.js +1 -1
  16. package/lib/cjs/locale/pt-BR.js +1 -1
  17. package/lib/cjs/locale/ru-RU.js +1 -1
  18. package/lib/cjs/locale/sk-SK.js +1 -1
  19. package/lib/cjs/locale/vi-VN.js +1 -1
  20. package/lib/cjs/locale/zh-CN.js +1 -1
  21. package/lib/cjs/locale/zh-HK.js +1 -1
  22. package/lib/cjs/locale/zh-TW.js +1 -1
  23. package/lib/es/facade.js +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/locale/ar-SA.js +1 -1
  26. package/lib/es/locale/ca-ES.js +1 -1
  27. package/lib/es/locale/de-DE.js +1 -1
  28. package/lib/es/locale/en-US.js +1 -1
  29. package/lib/es/locale/es-ES.js +1 -1
  30. package/lib/es/locale/fa-IR.js +1 -1
  31. package/lib/es/locale/fr-FR.js +1 -1
  32. package/lib/es/locale/id-ID.js +1 -1
  33. package/lib/es/locale/it-IT.js +1 -1
  34. package/lib/es/locale/ja-JP.js +1 -1
  35. package/lib/es/locale/ko-KR.js +1 -1
  36. package/lib/es/locale/pl-PL.js +1 -1
  37. package/lib/es/locale/pt-BR.js +1 -1
  38. package/lib/es/locale/ru-RU.js +1 -1
  39. package/lib/es/locale/sk-SK.js +1 -1
  40. package/lib/es/locale/vi-VN.js +1 -1
  41. package/lib/es/locale/zh-CN.js +1 -1
  42. package/lib/es/locale/zh-HK.js +1 -1
  43. package/lib/es/locale/zh-TW.js +1 -1
  44. package/lib/facade.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/config/config.d.ts +19 -0
  66. package/lib/types/controllers/collaboration/changeset-submitter.d.ts +132 -0
  67. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +28 -1
  68. package/lib/types/controllers/collaboration/collaboration-state.d.ts +175 -43
  69. package/lib/types/controllers/collaboration/collaboration.controller.d.ts +7 -0
  70. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +7 -3
  71. package/lib/types/facade/f-collaboration.d.ts +20 -4
  72. package/lib/types/facade/f-event.d.ts +87 -2
  73. package/lib/types/index.d.ts +5 -3
  74. package/lib/types/services/collaboration-session/collaboration-session.d.ts +4 -8
  75. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +4 -4
  76. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +9 -0
  77. package/lib/types/services/data-loader/data-loader.service.d.ts +9 -2
  78. package/lib/types/services/local-cache/local-cache.service.d.ts +11 -6
  79. package/lib/types/services/socket/collaboration-socket.service.d.ts +10 -2
  80. package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +5 -0
  81. package/lib/umd/facade.js +1 -1
  82. package/lib/umd/index.js +1 -1
  83. package/lib/umd/locale/ar-SA.js +1 -1
  84. package/lib/umd/locale/ca-ES.js +1 -1
  85. package/lib/umd/locale/de-DE.js +1 -1
  86. package/lib/umd/locale/en-US.js +1 -1
  87. package/lib/umd/locale/es-ES.js +1 -1
  88. package/lib/umd/locale/fa-IR.js +1 -1
  89. package/lib/umd/locale/fr-FR.js +1 -1
  90. package/lib/umd/locale/id-ID.js +1 -1
  91. package/lib/umd/locale/it-IT.js +1 -1
  92. package/lib/umd/locale/ja-JP.js +1 -1
  93. package/lib/umd/locale/ko-KR.js +1 -1
  94. package/lib/umd/locale/pl-PL.js +1 -1
  95. package/lib/umd/locale/pt-BR.js +1 -1
  96. package/lib/umd/locale/ru-RU.js +1 -1
  97. package/lib/umd/locale/sk-SK.js +1 -1
  98. package/lib/umd/locale/vi-VN.js +1 -1
  99. package/lib/umd/locale/zh-CN.js +1 -1
  100. package/lib/umd/locale/zh-HK.js +1 -1
  101. package/lib/umd/locale/zh-TW.js +1 -1
  102. package/package.json +16 -16
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x51c992=_0x3ab5;(function(_0x47e575,_0x3f131f){const _0x13a324=_0x3ab5,_0x9de24d=_0x47e575();while(!![]){try{const _0x4a868f=parseInt(_0x13a324(0x33a))/0x1*(parseInt(_0x13a324(0x2ef))/0x2)+parseInt(_0x13a324(0x46f))/0x3*(-parseInt(_0x13a324(0x220))/0x4)+-parseInt(_0x13a324(0x347))/0x5*(-parseInt(_0x13a324(0x36a))/0x6)+-parseInt(_0x13a324(0x32b))/0x7+-parseInt(_0x13a324(0x18f))/0x8*(parseInt(_0x13a324(0x2da))/0x9)+-parseInt(_0x13a324(0x218))/0xa*(parseInt(_0x13a324(0x236))/0xb)+parseInt(_0x13a324(0x266))/0xc;if(_0x4a868f===_0x3f131f)break;else _0x9de24d['push'](_0x9de24d['shift']());}catch(_0x2a143d){_0x9de24d['push'](_0x9de24d['shift']());}}}(_0x60bf,0xc7868),Object['defineProperty'](exports,Symbol[_0x51c992(0x452)],{'value':'Module'}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('@univerjs/protocol'),o=require('@univerjs/telemetry'),s=require('rxjs/operators'),c=require('@univerjs-pro/slides'),l=require('@univerjs/network'),u=require('@univerjs-pro/license'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js'),p=require('@univerjs/drawing');const m=_0x51c992(0x39b),ee={};function te(_0x41472c){const _0x2adb6c=_0x51c992;return JSON[_0x2adb6c(0x45d)](_0x41472c)[_0x2adb6c(0x187)];}function h(_0x442285){'@babel/helpers - typeof';const _0x4d94bd=_0x51c992;return h=typeof Symbol==_0x4d94bd(0x2b3)&&typeof Symbol[_0x4d94bd(0x3ef)]=='symbol'?function(_0x2fcef0){return typeof _0x2fcef0;}:function(_0x3b5eb1){const _0x4bc191=_0x4d94bd;return _0x3b5eb1&&typeof Symbol==_0x4bc191(0x2b3)&&_0x3b5eb1['constructor']===Symbol&&_0x3b5eb1!==Symbol[_0x4bc191(0x3fa)]?_0x4bc191(0x407):typeof _0x3b5eb1;},h(_0x442285);}function ne(_0x67a18f,_0x458af9){const _0x1b313e=_0x51c992;if(h(_0x67a18f)!='object'||!_0x67a18f)return _0x67a18f;var _0x3f67e1=_0x67a18f[Symbol[_0x1b313e(0x3f0)]];if(_0x3f67e1!==void 0x0){var _0x33a8cd=_0x3f67e1[_0x1b313e(0x454)](_0x67a18f,_0x458af9||_0x1b313e(0x19a));if(h(_0x33a8cd)!=_0x1b313e(0x31b))return _0x33a8cd;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x458af9===_0x1b313e(0x2dc)?String:Number)(_0x67a18f);}function re(_0x4e4aab){const _0x162027=_0x51c992;var _0x97f0df=ne(_0x4e4aab,_0x162027(0x2dc));return h(_0x97f0df)==_0x162027(0x407)?_0x97f0df:_0x97f0df+'';}function g(_0x458fe6,_0x5403d6,_0x36c256){return(_0x5403d6=re(_0x5403d6))in _0x458fe6?Object['defineProperty'](_0x458fe6,_0x5403d6,{'value':_0x36c256,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x458fe6[_0x5403d6]=_0x36c256,_0x458fe6;}let ie=function(_0xc7c05e){const _0x3f3525=_0x51c992;return _0xc7c05e[_0x3f3525(0x289)]=_0x3f3525(0x289),_0xc7c05e[_0x3f3525(0x3ae)]='PERMISSION_DENIED',_0xc7c05e[_0x3f3525(0x3af)]=_0x3f3525(0x3af),_0xc7c05e[_0x3f3525(0x25e)]=_0x3f3525(0x25e),_0xc7c05e[_0x3f3525(0x1ad)]=_0x3f3525(0x1ad),_0xc7c05e[_0x3f3525(0x2cf)]=_0x3f3525(0x2cf),_0xc7c05e[_0x3f3525(0x237)]='JOIN_ROOM_FAILED',_0xc7c05e[_0x3f3525(0x43a)]=_0x3f3525(0x43a),_0xc7c05e['SOCKET_FAILED']=_0x3f3525(0x1ce),_0xc7c05e[_0x3f3525(0x33c)]=_0x3f3525(0x33c),_0xc7c05e;}({});var _=class{constructor(){const _0x13f38a=_0x51c992;g(this,_0x13f38a(0x1e5),new i[(_0x13f38a(0x29d))]()),g(this,'event$',this[_0x13f38a(0x1e5)][_0x13f38a(0x3e3)]());}[_0x51c992(0x3e8)](_0x99385d){const _0x2bc159=_0x51c992;this[_0x2bc159(0x1e5)]['next'](_0x99385d);}},ae=class{constructor(){const _0x2da332=_0x51c992;g(this,_0x2da332(0x42a),new i[(_0x2da332(0x29d))]()),g(this,'commentUpdate$',this[_0x2da332(0x42a)][_0x2da332(0x3e3)]());}[_0x51c992(0x2aa)](_0x2af392){const _0x1aefac=_0x51c992;this[_0x1aefac(0x42a)][_0x1aefac(0x443)](_0x2af392);}};function v(_0x50110d,_0x4f07a0){return function(_0x57c8b9,_0x295836){_0x4f07a0(_0x57c8b9,_0x295836,_0x50110d);};}function y(_0x27adb2,_0x33ef4d,_0x81ee6,_0x33ff1a){const _0x15a711=_0x51c992;var _0x1167b6=arguments[_0x15a711(0x187)],_0x538276=_0x1167b6<0x3?_0x33ef4d:_0x33ff1a===null?_0x33ff1a=Object[_0x15a711(0x304)](_0x33ef4d,_0x81ee6):_0x33ff1a,_0x1e6dfb;if(typeof Reflect==_0x15a711(0x31b)&&typeof Reflect[_0x15a711(0x36c)]==_0x15a711(0x2b3))_0x538276=Reflect[_0x15a711(0x36c)](_0x27adb2,_0x33ef4d,_0x81ee6,_0x33ff1a);else{for(var _0x25e6fe=_0x27adb2[_0x15a711(0x187)]-0x1;_0x25e6fe>=0x0;_0x25e6fe--)(_0x1e6dfb=_0x27adb2[_0x25e6fe])&&(_0x538276=(_0x1167b6<0x3?_0x1e6dfb(_0x538276):_0x1167b6>0x3?_0x1e6dfb(_0x33ef4d,_0x81ee6,_0x538276):_0x1e6dfb(_0x33ef4d,_0x81ee6))||_0x538276);}return _0x1167b6>0x3&&_0x538276&&Object[_0x15a711(0x478)](_0x33ef4d,_0x81ee6,_0x538276),_0x538276;}let b=class extends t[_0x51c992(0x3ac)]{constructor(_0x4f3784){const _0x1725f2=_0x51c992;super(),this[_0x1725f2(0x322)]=_0x4f3784,g(this,_0x1725f2(0x1aa),new Map()),g(this,_0x1725f2(0x49e),new i[(_0x1725f2(0x29d))]()),this['disposeWithMe']((0x0,i[_0x1725f2(0x335)])(this[_0x1725f2(0x322)]['getTypeOfUnitDisposed$'](t[_0x1725f2(0x2b4)][_0x1725f2(0x3f5)])['pipe']((0x0,s[_0x1725f2(0x231)])(_0x4714d2=>_0x4714d2[_0x1725f2(0x1c8)]())),this['_univerInstanceService'][_0x1725f2(0x29f)](t['UniverInstanceType'][_0x1725f2(0x47c)])[_0x1725f2(0x3a2)]((0x0,s[_0x1725f2(0x231)])(_0xeb7993=>_0xeb7993[_0x1725f2(0x1c8)]())),this[_0x1725f2(0x322)][_0x1725f2(0x29f)](t['UniverInstanceType']['UNIVER_BOARD'])['pipe']((0x0,s[_0x1725f2(0x231)])(_0x2bf1bf=>_0x2bf1bf['getUnitId']())),this[_0x1725f2(0x322)]['getTypeOfUnitDisposed$'](t[_0x1725f2(0x2b4)][_0x1725f2(0x387)])[_0x1725f2(0x3a2)]((0x0,s[_0x1725f2(0x231)])(_0x390e25=>_0x390e25[_0x1725f2(0x1c8)]())))[_0x1725f2(0x481)](_0x338eb5=>this[_0x1725f2(0x2cb)](_0x338eb5)));}[_0x51c992(0x2e9)](_0x22aaf3){const _0x373407=_0x51c992;return this[_0x373407(0x1aa)][_0x373407(0x2d4)](_0x22aaf3)?(0x0,i['of'])(this['_roomMembers'][_0x373407(0x403)](_0x22aaf3)):this[_0x373407(0x49e)][_0x373407(0x3a2)]((0x0,s[_0x373407(0x231)])(_0x2e0e09=>{const _0x51ea73=_0x373407;if(_0x2e0e09===_0x22aaf3)return this[_0x51ea73(0x1aa)][_0x51ea73(0x403)](_0x2e0e09);}));}[_0x51c992(0x1eb)](_0xb22e6f,_0x13e768){const _0xa388a7=_0x51c992;let _0x4e459b=this[_0xa388a7(0x1aa)][_0xa388a7(0x403)](_0xb22e6f);_0x4e459b||(_0x4e459b=new oe(),this['_roomMembers']['set'](_0xb22e6f,_0x4e459b),this['_roomCreated$'][_0xa388a7(0x443)](_0xb22e6f)),_0x4e459b[_0xa388a7(0x1eb)](_0x13e768);}[_0x51c992(0x179)](_0x302306,_0x13c954){const _0x155fd4=_0x51c992;let _0x34f340=this[_0x155fd4(0x1aa)]['get'](_0x302306);_0x34f340&&_0x34f340[_0x155fd4(0x179)](_0x13c954);}['getRoom'](_0x270175){const _0x547a64=_0x51c992;return this['_roomMembers'][_0x547a64(0x403)](_0x270175);}[_0x51c992(0x1b5)](_0x2d0462,_0x5e43be){const _0x48ce24=_0x51c992;let _0x513812=this['_roomMembers'][_0x48ce24(0x403)](_0x2d0462);if(_0x513812)return _0x513812[_0x48ce24(0x1b5)](_0x5e43be);}[_0x51c992(0x2cb)](_0x4b8aa4){const _0x30c77a=_0x51c992;let _0x2ca327=this[_0x30c77a(0x1aa)]['get'](_0x4b8aa4);_0x2ca327&&(_0x2ca327['dispose'](),this[_0x30c77a(0x1aa)][_0x30c77a(0x404)](_0x4b8aa4));}[_0x51c992(0x37b)](){const _0x3f4178=_0x51c992;this[_0x3f4178(0x1aa)]['forEach'](_0x3ffde1=>_0x3ffde1[_0x3f4178(0x37b)]()),this[_0x3f4178(0x1aa)][_0x3f4178(0x47a)](),this[_0x3f4178(0x49e)][_0x3f4178(0x3a9)]();}};b=y([v(0x0,t[_0x51c992(0x1dd)])],b);var oe=class extends t[_0x51c992(0x3ac)]{constructor(..._0x524f3c){const _0x5c303d=_0x51c992;super(..._0x524f3c),g(this,_0x5c303d(0x3ad),new Map()),g(this,_0x5c303d(0x380),new i[(_0x5c303d(0x3f2))](this['_members'])),g(this,_0x5c303d(0x2a3),this[_0x5c303d(0x380)]['asObservable']());}[_0x51c992(0x37b)](){const _0x2b0961=_0x51c992;this['_members']['clear'](),this[_0x2b0961(0x380)]['complete']();}[_0x51c992(0x1eb)](_0x32b77b){const _0x3acbf9=_0x51c992;this['_members'][_0x3acbf9(0x35e)](_0x32b77b[_0x3acbf9(0x44a)],_0x32b77b),this[_0x3acbf9(0x1fc)]();}[_0x51c992(0x179)](_0x3a2340){const _0x35419e=_0x51c992;this[_0x35419e(0x3ad)][_0x35419e(0x404)](_0x3a2340),this[_0x35419e(0x1fc)]();}[_0x51c992(0x1b5)](_0x36691b){const _0x115a04=_0x51c992;return this[_0x115a04(0x3ad)][_0x115a04(0x403)](_0x36691b);}[_0x51c992(0x3ea)](){const _0x22213e=_0x51c992;return Array[_0x22213e(0x1f3)](this['_members'][_0x22213e(0x215)]());}[_0x51c992(0x1fc)](){const _0x1eac08=_0x51c992;this[_0x1eac08(0x380)][_0x1eac08(0x443)](this[_0x1eac08(0x3ad)]);}};function se(_0x4edd19,_0x5038a1){const _0x25f9ec=_0x51c992;if(le(_0x4edd19))return _0x5038a1;if(_0x5038a1[_0x25f9ec(0x309)]===e['CollaborationEvent'][_0x25f9ec(0x1de)]){let _0x30ecaa=me(_0x4edd19),_0x31401c=_0x5038a1;return{..._0x31401c,'data':{..._0x31401c[_0x25f9ec(0x2e1)],'unitID':_0x4edd19[_0x25f9ec(0x280)]['unitId'],'unitType':_0x4edd19[_0x25f9ec(0x280)]['unitType']??_0x31401c[_0x25f9ec(0x2e1)][_0x25f9ec(0x19c)],'changeset':_0x30ecaa[_0x25f9ec(0x3c7)](_0x31401c['data'][_0x25f9ec(0x184)],he(_0x4edd19))}};}if(_0x5038a1[_0x25f9ec(0x309)]===e[_0x25f9ec(0x496)]['FETCH_MISSING']){let _0x274f10=_0x5038a1;return{..._0x274f10,'data':{..._0x274f10[_0x25f9ec(0x2e1)],'unitID':_0x4edd19[_0x25f9ec(0x280)][_0x25f9ec(0x44c)],'unitType':_0x4edd19[_0x25f9ec(0x280)][_0x25f9ec(0x19c)]??_0x274f10[_0x25f9ec(0x2e1)]['unitType']}};}return _0x5038a1;}function ce(_0x199dc9,_0x421f30){const _0x2da760=_0x51c992;if(le(_0x199dc9))return[_0x421f30];switch(_0x421f30[_0x2da760(0x309)]){case e['CollaborationEvent']['NEW_CHANGESETS']:return[ue(_0x199dc9,_0x421f30)];case e[_0x2da760(0x496)][_0x2da760(0x40a)]:return[fe(_0x199dc9,_0x421f30)];case e['CollaborationEvent'][_0x2da760(0x2cd)]:return[de(_0x199dc9,_0x421f30)];default:return[_0x421f30];}}function le(_0x265422){const _0x3d79ca=_0x51c992;return _0x265422['target'][_0x3d79ca(0x2ee)]==null&&_0x265422[_0x3d79ca(0x280)][_0x3d79ca(0x44c)]===_0x265422['localUnitId']&&!_0x265422[_0x3d79ca(0x184)];}function ue(_0x10d8bb,_0x48b003){const _0x1d6e54=_0x51c992;return{..._0x48b003,'data':(0x0,e[_0x1d6e54(0x225)])(pe(_0x10d8bb,(0x0,e[_0x1d6e54(0x3a5)])(_0x48b003[_0x1d6e54(0x2e1)])))};}function de(_0x104bb5,_0x4d5843){const _0x2d806b=_0x51c992;return{..._0x4d5843,'data':pe(_0x104bb5,_0x4d5843[_0x2d806b(0x2e1)])};}function fe(_0x15102e,_0x4bf32e){const _0x537816=_0x51c992;let _0x2ea62d=_0x4bf32e[_0x537816(0x2e1)];return{..._0x4bf32e,'data':{..._0x2ea62d,'changesets':_0x2ea62d[_0x537816(0x1b9)]['map'](_0x24ef97=>(0x0,e[_0x537816(0x225)])(pe(_0x15102e,(0x0,e[_0x537816(0x3a5)])(_0x24ef97))))}};}function pe(_0x90073f,_0x5e26cc){const _0x79d4ce=_0x51c992;return me(_0x90073f)[_0x79d4ce(0x2c5)](_0x5e26cc,he(_0x90073f));}function me(_0x13af7d){const _0x679ebe=_0x51c992;if(!_0x13af7d[_0x679ebe(0x184)])throw Error('COLLABORATION_CHANGESET_TRANSLATION_REQUIRED');return _0x13af7d[_0x679ebe(0x184)];}function he(_0x3339a7){const _0x14ac1b=_0x51c992;return{'localUnitId':_0x3339a7[_0x14ac1b(0x242)],'unitType':_0x3339a7[_0x14ac1b(0x19c)],'target':_0x3339a7['target']};}let ge=function(_0x1a423c){const _0x319e25=_0x51c992;return _0x1a423c[_0x1a423c[_0x319e25(0x406)]=0x0]=_0x319e25(0x406),_0x1a423c[_0x1a423c[_0x319e25(0x3aa)]=0x1]=_0x319e25(0x3aa),_0x1a423c[_0x1a423c[_0x319e25(0x40d)]=0x2]=_0x319e25(0x40d),_0x1a423c[_0x1a423c['ONLINE']=0x3]='ONLINE',_0x1a423c;}({});const _e={[a['CmdRspCode'][_0x51c992(0x425)]]:_0x51c992(0x3c2),[a['CmdRspCode'][_0x51c992(0x1a1)]]:_0x51c992(0x395),[a[_0x51c992(0x28c)][_0x51c992(0x2f1)]]:_0x51c992(0x441),[a[_0x51c992(0x28c)][_0x51c992(0x2f3)]]:_0x51c992(0x490),[a[_0x51c992(0x28c)]['GLOBAL_ROOMS_CNT_EXCEEDS']]:_0x51c992(0x495)};let ve=class extends t[_0x51c992(0x251)]{get[_0x51c992(0x3ab)](){const _0x413dec=_0x51c992;return this[_0x413dec(0x1e1)][_0x413dec(0x2a8)]();}constructor(_0x59743f,_0x332d33,_0x544092,_0x109538,_0x392908,_0x3be8f8,_0xf9fe9a,_0x77a54c){const _0x52621e=_0x51c992;super(),this[_0x52621e(0x38d)]=_0x59743f,this[_0x52621e(0x396)]=_0x544092,this[_0x52621e(0x214)]=_0x109538,this[_0x52621e(0x2c0)]=_0x392908,this[_0x52621e(0x2c6)]=_0x3be8f8,this[_0x52621e(0x2f5)]=_0xf9fe9a,this['_telemetryService']=_0x77a54c,g(this,_0x52621e(0x1e1),new i[(_0x52621e(0x3f2))](0x0)),g(this,'sessionStatus$',this['_sessionStatus$'][_0x52621e(0x3e3)]()),g(this,_0x52621e(0x1e5),new i['Subject']()),g(this,_0x52621e(0x40b),this[_0x52621e(0x1e5)][_0x52621e(0x3e3)]()),g(this,'_socket',void 0x0),g(this,_0x52621e(0x447),void 0x0),g(this,_0x52621e(0x273),void 0x0),g(this,'_shouldReportTelemetry',!0x1),g(this,_0x52621e(0x3c1),null),this['_shouldReportTelemetry']=!!this[_0x52621e(0x22c)],_0x332d33[_0x52621e(0x3a2)]((0x0,i[_0x52621e(0x2ec)])(this[_0x52621e(0x257)]))[_0x52621e(0x481)](_0x1618e9=>{const _0x1632c1=_0x52621e;if(_0x1618e9!==void 0x0){if(this[_0x1632c1(0x429)]=_0x1618e9,_0x1618e9)this[_0x1632c1(0x1dc)](_0x1618e9),this[_0x1632c1(0x447)]=_0x1618e9[_0x1632c1(0x194)]['subscribe'](_0x359a28=>{const _0x1b6552=_0x1632c1;_0x359a28[_0x1b6552(0x308)]===this[_0x1b6552(0x38d)][_0x1b6552(0x280)]['unitId']&&this[_0x1b6552(0x265)](_0x359a28);});else{var _0x21ae00;this[_0x1632c1(0x332)](),this['_sessionStatus$'][_0x1632c1(0x443)](0x2),(_0x21ae00=this[_0x1632c1(0x447)])==null||_0x21ae00[_0x1632c1(0x2df)](),this[_0x1632c1(0x447)]=null;}}});}[_0x51c992(0x30d)](){const _0x3a945b=_0x51c992;var _0x19baad;return((_0x19baad=this['_socket'])==null?void 0x0:_0x19baad[_0x3a945b(0x44a)])??null;}[_0x51c992(0x37b)](){const _0x5904b7=_0x51c992;super[_0x5904b7(0x37b)](),this[_0x5904b7(0x35f)](),this[_0x5904b7(0x257)]['next'](),this[_0x5904b7(0x257)][_0x5904b7(0x3a9)]();}['close'](){const _0x5c3b59=_0x51c992;var _0x59540b;this[_0x5c3b59(0x332)](),(_0x59540b=this[_0x5c3b59(0x429)])==null||_0x59540b[_0x5c3b59(0x2a9)]({'cmd':a[_0x5c3b59(0x399)][_0x5c3b59(0x442)],'data':{'roomID':this[_0x5c3b59(0x38d)][_0x5c3b59(0x280)]['unitId']}}),this[_0x5c3b59(0x1e5)][_0x5c3b59(0x3a9)](),this[_0x5c3b59(0x1e1)][_0x5c3b59(0x3a9)]();}[_0x51c992(0x265)](_0x47368b){const _0x1e63ad=_0x51c992;_0x47368b[_0x1e63ad(0x19b)]===a[_0x1e63ad(0x399)][_0x1e63ad(0x1af)]?this[_0x1e63ad(0x244)](_0x47368b):_0x47368b[_0x1e63ad(0x19b)]===a[_0x1e63ad(0x399)][_0x1e63ad(0x3ce)]&&this[_0x1e63ad(0x2ae)](_0x47368b);}['_joinRoom'](_0x43c62e){const _0x1a6fed=_0x51c992;this[_0x1a6fed(0x1e1)][_0x1a6fed(0x443)](0x1),_0x43c62e['send']({'cmd':a[_0x1a6fed(0x399)][_0x1a6fed(0x1af)],'routeKey':this[_0x1a6fed(0x38d)][_0x1a6fed(0x280)][_0x1a6fed(0x44c)],'routeType':'','data':{'rooms':[{'roomID':this[_0x1a6fed(0x38d)][_0x1a6fed(0x280)][_0x1a6fed(0x44c)]}]}});}['_onJoinRoomEvent'](_0x2503e7){const _0x37034f=_0x51c992;var _0x4af724;if(_0x2503e7['code']in _e){this[_0x37034f(0x2f5)][_0x37034f(0x3e8)]({'id':_0x37034f(0x237),'data':_e[_0x2503e7[_0x37034f(0x25c)]]}),this[_0x37034f(0x1e1)][_0x37034f(0x443)](0x2);return;}this['_sessionStatus$'][_0x37034f(0x443)](0x3);let _0x32d1de=(_0x4af724=_0x2503e7['data'][_0x37034f(0x1fa)][this['_identity'][_0x37034f(0x280)]['unitId']])==null?void 0x0:_0x4af724[_0x37034f(0x28f)];_0x32d1de&&_0x32d1de[_0x37034f(0x1be)](_0x1139b6=>this[_0x37034f(0x2c0)]['updateMember'](this['_identity'][_0x37034f(0x242)],_0x1139b6));}['_onRecvEvent'](_0x2ae878){const _0xef1b7a=_0x51c992;try{let _0x4eebe2=ce(this['_identity'],_0x2ae878['data']);for(let _0x13703f of _0x4eebe2)switch(_0x13703f[_0xef1b7a(0x309)]){case e[_0xef1b7a(0x496)][_0xef1b7a(0x2c2)]:this[_0xef1b7a(0x493)](_0x13703f),this['_event$'][_0xef1b7a(0x443)](_0x13703f);break;case e[_0xef1b7a(0x496)][_0xef1b7a(0x34e)]:this['_onUserLeave'](_0x13703f),this['_event$']['next'](_0x13703f);break;case e[_0xef1b7a(0x496)]['CHANGESET_ACK']:case e[_0xef1b7a(0x496)][_0xef1b7a(0x2cd)]:this['_stopTelemetryCollaborationNewChangeset'](),this[_0xef1b7a(0x41e)](),this['_event$'][_0xef1b7a(0x443)](_0x13703f);break;case e[_0xef1b7a(0x496)][_0xef1b7a(0x1c6)]:this[_0xef1b7a(0x396)][_0xef1b7a(0x420)](_0xef1b7a(0x24b)+JSON[_0xef1b7a(0x45d)](_0x13703f)),this[_0xef1b7a(0x1e5)][_0xef1b7a(0x443)](_0x13703f);break;case e['CollaborationEvent'][_0xef1b7a(0x2c8)]:this[_0xef1b7a(0x2c6)][_0xef1b7a(0x2aa)](_0x13703f['data']),this['_event$'][_0xef1b7a(0x443)](_0x13703f);break;default:this[_0xef1b7a(0x1e5)][_0xef1b7a(0x443)](_0x13703f);}}catch(_0xc9433a){this[_0xef1b7a(0x396)]['error'](_0xc9433a,_0x2ae878);}}[_0x51c992(0x493)](_0x5136d3){const _0x51e78f=_0x51c992;this[_0x51e78f(0x2c0)][_0x51e78f(0x1eb)](this[_0x51e78f(0x38d)]['localUnitId'],_0x5136d3[_0x51e78f(0x2e1)]);}['_onUserLeave'](_0x2744a5){const _0x3c7d50=_0x51c992;this[_0x3c7d50(0x2c0)]['removeMember'](this[_0x3c7d50(0x38d)][_0x3c7d50(0x242)],_0x2744a5[_0x3c7d50(0x2e1)]['memberID']);}async[_0x51c992(0x2a9)](_0xb10f22,_0x4bd263){const _0x3a41f2=_0x51c992;if(this[_0x3a41f2(0x3ab)]!==0x3||!this[_0x3a41f2(0x429)])throw Error(_0x3a41f2(0x455));try{let _0x2b338d=se(this['_identity'],_0xb10f22);_0x2b338d[_0x3a41f2(0x309)]===e[_0x3a41f2(0x496)]['SUBMIT_CHANGESET']&&(this[_0x3a41f2(0x239)](),this[_0x3a41f2(0x315)](_0x2b338d)),this['_socket'][_0x3a41f2(0x2a9)]({'cmd':a[_0x3a41f2(0x399)][_0x3a41f2(0x37f)],'routeKey':this[_0x3a41f2(0x38d)][_0x3a41f2(0x280)]['unitId'],'routeType':'','data':_0x2b338d});}catch(_0x3e7e56){this['_logService'][_0x3a41f2(0x420)](_0x3e7e56);}}[_0x51c992(0x239)](){const _0x32e721=_0x51c992;this[_0x32e721(0x273)]=setTimeout(()=>{const _0x3301c6=_0x32e721;this['_collaborationTimeoutTimer']=null,this['_collaborationUIEventService'][_0x3301c6(0x3e8)]({'id':_0x3301c6(0x33c)});},this[_0x32e721(0x214)][_0x32e721(0x310)]('HEARTBEAT_TIMEOUT')??0x4e20);}[_0x51c992(0x41e)](){const _0x4fbc67=_0x51c992;this['_collaborationTimeoutTimer']&&=(clearTimeout(this[_0x4fbc67(0x273)]),null);}['_startTelemetryCollaborationNewChangeset'](_0xdd6da1){const _0x212f49=_0x51c992;if(!this[_0x212f49(0x39d)])return;let {data:_0x5b495c}=_0xdd6da1,{unitID:_0x470d16,changeset:_0x1a77e8}=_0x5b495c,{mutations:_0x2dce5f,type:_0x477c31}=_0x1a77e8;this[_0x212f49(0x3c1)]={'unitId':_0x470d16,'type':_0x477c31,'startTime':performance[_0x212f49(0x472)](),'stopTime':0x0,'duration':0x0,'size':te(_0x2dce5f)};}[_0x51c992(0x24d)](){const _0x5a2d23=_0x51c992;if(this['_shouldReportTelemetry']){if(!this[_0x5a2d23(0x3c1)]){this[_0x5a2d23(0x396)][_0x5a2d23(0x420)](_0x5a2d23(0x1d7),_0x5a2d23(0x2fb));return;}this[_0x5a2d23(0x3c1)][_0x5a2d23(0x416)]=performance['now'](),this[_0x5a2d23(0x3c1)][_0x5a2d23(0x3df)]=this['_telemetryInfo']['stopTime']-this['_telemetryInfo'][_0x5a2d23(0x176)],this['_telemetryService'][_0x5a2d23(0x460)]('collaboration_new_changeset',this['_telemetryInfo']),this[_0x5a2d23(0x3c1)]=null;}}[_0x51c992(0x332)](){const _0x11d6bf=_0x51c992;this[_0x11d6bf(0x3c1)]=null;}};ve=y([v(0x2,t[_0x51c992(0x291)]),v(0x3,t[_0x51c992(0x46e)]),v(0x4,(0x0,t['Inject'])(b)),v(0x5,(0x0,t[_0x51c992(0x1ba)])(ae)),v(0x6,(0x0,t['Inject'])(_)),v(0x7,(0x0,t[_0x51c992(0x47e)])(o[_0x51c992(0x205)]))],ve);const x=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x44b));function ye(_0x56b8a3){const _0x1d19d7=_0x51c992;return _0x1d19d7(0x17e)+_0x56b8a3;}function be(_0x4dbcae){const _0x1d17b1=_0x51c992;let {unitID:_0x3bfb87,mutations:_0x210123}=_0x4dbcae;return{'unitId':_0x3bfb87,'subUnitId':_0x210123[_0x1d17b1(0x187)]>0x0?_0x210123[0x0][_0x1d17b1(0x2a5)][_0x1d17b1(0x26b)]:null};}let S=class{constructor(_0x3f9894,_0x4efaee,_0x39c671){const _0x1f5936=_0x51c992;this['_injector']=_0x3f9894,this[_0x1f5936(0x364)]=_0x4efaee,this[_0x1f5936(0x2ba)]=_0x39c671;}[_0x51c992(0x24e)](_0x377342){const _0x361d11=_0x51c992;var _0x14da3d,_0x20416b;let _0x9dc1d7=this[_0x361d11(0x4a1)][_0x361d11(0x403)](r[_0x361d11(0x46b)]),{unitId:_0x2d30f9,subUnitId:_0x1976f3}=be(_0x377342),_0x5e7331=_0x9dc1d7==null?void 0x0:_0x9dc1d7[_0x361d11(0x279)](_0x2d30f9)[_0x361d11(0x26e)](),_0x56c600=(_0x14da3d=this[_0x361d11(0x2ba)][_0x361d11(0x2e2)](_0x2d30f9))==null||(_0x14da3d=_0x14da3d[_0x361d11(0x286)]())==null?void 0x0:_0x14da3d[_0x361d11(0x2d6)]();if(_0x5e7331[_0x361d11(0x187)]===0x0||!_0x2d30f9||!_0x1976f3)return;let _0x2c8905=[{'id':r[_0x361d11(0x474)]['id'],'params':{'unitId':_0x2d30f9,'subUnitId':_0x56c600,'selections':t['Tools'][_0x361d11(0x290)](_0x5e7331)}}],_0x540d65=this[_0x361d11(0x364)][_0x361d11(0x262)](_0x377342,_0x2c8905);if(!(0x0,e[_0x361d11(0x21b)])(_0x540d65))throw _0x540d65[_0x361d11(0x420)];let _0x477c2c=(_0x20416b=_0x540d65[_0x361d11(0x1d1)][0x0])==null||(_0x20416b=_0x20416b[_0x361d11(0x2a5)])==null?void 0x0:_0x20416b[_0x361d11(0x30b)];if(Array[_0x361d11(0x29b)](_0x477c2c)&&_0x477c2c['length']){if(_0x477c2c[_0x361d11(0x187)]===_0x2c8905[0x0][_0x361d11(0x2a5)]['selections'][_0x361d11(0x187)]&&_0x477c2c[_0x361d11(0x1cb)]((_0x32740f,_0x3aa5a2)=>t[_0x361d11(0x294)][_0x361d11(0x43b)](_0x32740f[_0x361d11(0x1e4)],_0x2c8905[0x0][_0x361d11(0x2a5)]['selections'][_0x3aa5a2]['range'])))return;this[_0x361d11(0x4a1)][_0x361d11(0x403)](t[_0x361d11(0x48c)])[_0x361d11(0x1f8)](r['SetSelectionsOperation']['id'],{'unitId':_0x2d30f9,'subUnitId':_0x56c600,'selections':_0x477c2c});}}};S=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x1,e[_0x51c992(0x354)]),v(0x2,t[_0x51c992(0x1dd)])],S);function _0x3ab5(_0x515c6d,_0x30aaa8){_0x515c6d=_0x515c6d-0x176;const _0x60bff3=_0x60bf();let _0x3ab550=_0x60bff3[_0x515c6d];return _0x3ab550;}const C=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x32e));let xe=function(_0xb6e8e1){const _0x14b742=_0x51c992;return _0xb6e8e1[_0xb6e8e1[_0x14b742(0x2b7)]=0x0]=_0x14b742(0x2b7),_0xb6e8e1[_0xb6e8e1[_0x14b742(0x2f2)]=0x1]=_0x14b742(0x2f2),_0xb6e8e1;}({});function Se(_0x5f6e4f){const _0x19832d=_0x51c992;var _0x129e53;return!!((_0x129e53=_0x5f6e4f[_0x19832d(0x2a5)])!=null&&_0x129e53['__splitChunk__']);}const Ce=new Set([r['InsertSheetMutation']['id']]),we=new Set([c['AddSlidePageMutation']['id'],c[_0x51c992(0x40c)]['id'],c[_0x51c992(0x32a)]['id'],c[_0x51c992(0x219)]['id']]);function Te(_0xe8027c,_0x1b04cf=Ce){const _0x3ae594=_0x51c992;let _0x5f00bc=[];for(let _0x5d7750 of _0xe8027c){if(_0x1b04cf[_0x3ae594(0x2d4)](_0x5d7750['id'])){if(_0x5f00bc['length']>0x0)break;_0x5f00bc[_0x3ae594(0x499)](_0x5d7750);break;}if(Se(_0x5d7750)){if(_0x5f00bc['length']>0x0)break;_0x5f00bc[_0x3ae594(0x499)](_0x5d7750);break;}_0x5f00bc['push'](_0x5d7750);}return _0x5f00bc;}function w(_0x10c00f,_0x5144b4,_0x40e328,_0x51a6a8,_0x5e87c4){const _0x363816=_0x51c992;let _0x1de105=Te(_0x10c00f),_0x3ff42b=_0x5e87c4['getCurrentUser'](),_0x531c41=(_0x3ff42b==null?void 0x0:_0x3ff42b['userID'])??_0x363816(0x216),_0x51845e=(_0x3ff42b==null?void 0x0:_0x3ff42b[_0x363816(0x44a)])??_0x363816(0x216);return{'changeset':{'unitID':_0x5144b4,'type':(0x0,e[_0x363816(0x180)])(_0x40e328[_0x363816(0x188)](_0x5144b4)),'baseRev':_0x51a6a8['getCurrentRevOfUnit'](_0x5144b4),'revision':0x0,'userID':_0x531c41,'memberID':_0x51845e,'mutations':_0x1de105},'pendingMutations':_0x10c00f[_0x363816(0x1f1)](_0x1de105[_0x363816(0x187)])};}const Ee=w;function De(_0x2f6f43,_0x53c992,_0x35d1cf,_0x5203b1,_0x163bf8){const _0x5d9783=_0x51c992;let _0x185ace=Te(_0x2f6f43,we),_0x161f46=_0x163bf8[_0x5d9783(0x28d)](),_0x55ad2c=(_0x161f46==null?void 0x0:_0x161f46[_0x5d9783(0x183)])??'unknown',_0x2d0242=(_0x161f46==null?void 0x0:_0x161f46[_0x5d9783(0x44a)])??_0x5d9783(0x216);return{'changeset':{'unitID':_0x53c992,'type':(0x0,e['mapDocumentTypeToUniverInstanceType'])(_0x35d1cf[_0x5d9783(0x188)](_0x53c992)),'baseRev':_0x5203b1['getCurrentRevOfUnit'](_0x53c992),'revision':0x0,'userID':_0x55ad2c,'memberID':_0x2d0242,'mutations':_0x185ace},'pendingMutations':_0x2f6f43[_0x5d9783(0x1f1)](_0x185ace[_0x5d9783(0x187)])};}function Oe(_0x3a4719,_0x3077ab,_0x599cf7,_0x66ab5f,_0x277d6c){const _0x5b4905=_0x51c992;let _0xcdbb4f=_0x3a4719[_0x5b4905(0x42c)]((_0x1de8a8,_0x56f733)=>{const _0x507fea=_0x5b4905;let _0x3a1381=_0x1de8a8[_0x1de8a8['length']-0x1],{id:_0x5c157d}=_0x3a1381??{},{id:_0x39e1f5,type:_0x2f5d10}=_0x56f733,_0x5a7601=_0x56f733[_0x507fea(0x2a5)];if(_0x5c157d&&_0x5c157d!==_0x39e1f5)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0x5c157d+_0x507fea(0x485)+_0x39e1f5+'.');if(!_0x3a1381)return[{'id':_0x39e1f5,'type':_0x2f5d10,'params':{'unitId':_0x5a7601[_0x507fea(0x44c)],'textRanges':_0x5a7601[_0x507fea(0x30f)],'actions':_0x5a7601['actions']}}];let _0x1c5457=_0x3a1381[_0x507fea(0x2a5)];return ke(_0x1c5457,_0x5a7601)?[..._0x1de8a8[_0x507fea(0x1f1)](0x0,-0x1),{..._0x3a1381,'id':_0x39e1f5,'type':_0x2f5d10,'params':{'unitId':_0x5a7601[_0x507fea(0x44c)],'textRanges':_0x5a7601[_0x507fea(0x30f)],'actions':t['JSONX']['compose'](_0x1c5457[_0x507fea(0x27c)],_0x5a7601[_0x507fea(0x27c)])}}]:[..._0x1de8a8,{'id':_0x39e1f5,'type':_0x2f5d10,'params':{'unitId':_0x5a7601['unitId'],'textRanges':_0x5a7601['textRanges'],'actions':_0x5a7601['actions']}}];},[]),_0x56ed63=_0x277d6c[_0x5b4905(0x28d)](),_0x5493e4=(_0x56ed63==null?void 0x0:_0x56ed63['userID'])??_0x5b4905(0x216),_0x30c85c=(_0x56ed63==null?void 0x0:_0x56ed63[_0x5b4905(0x44a)])??'unknown';return{'changeset':{'unitID':_0x3077ab,'type':(0x0,e[_0x5b4905(0x180)])(_0x599cf7[_0x5b4905(0x188)](_0x3077ab)),'baseRev':_0x66ab5f[_0x5b4905(0x388)](_0x3077ab),'revision':0x0,'userID':_0x5493e4,'memberID':_0x30c85c,'mutations':_0xcdbb4f},'pendingMutations':_0x3a4719[_0x5b4905(0x1f1)](_0x3a4719[_0x5b4905(0x187)])};}function ke(_0x4e7090,_0x49db5b){const _0x1cd00b=_0x51c992;return!Ae(_0x4e7090)&&!Ae(_0x49db5b)&&je(_0x4e7090[_0x1cd00b(0x27c)],_0x49db5b[_0x1cd00b(0x27c)]);}function _0x60bf(){const _0x3e21ef=['_type','toggleOnline','RETRY_CONNECTING_MAX_COUNT','getOwnPropertyDescriptor','_resendWithTimeout','_prepareTransformSelections','retryConnectingTimer','routeKey','eventID','loadOfflineData','selections','loadPdf','getMemberID','_submitChangeset','textRanges','getConfig','HEARTBEAT','listRoles','CollaborationEntity','_transformStack','_startTelemetryCollaborationNewChangeset','&to=','getLatestCsReqIdBySid','CollaborationSession','NEW_CHANGESETS','Base','object','_lockTransition','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','unitInfo$','_createHandler','resolveUnit','create','_univerInstanceService','refreshUnit','action','SheetTransformSelectionsService','_onRemoteChangeset','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','ReplaySubject','name','MoveSlidePageMutation','10436867wZyTYG','_sendingTimer','sort','univer-pro.collaboration-client.single-active-unit-service','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','subject','copyFileMeta','_throwTelemetryCollaborationNewChangeset','retryConnectingInterval','_unitLoaded$','merge','_tryReconnect','SYNCED','entries','signUrlServerUrl','67388QCHVxk','ImageUploadStatusType','SUBMIT_CHANGESET_TIMEOUT','tables','univer-pro.collaboration-client-socket-service','onTransformState','FETCH_MISSING','setWaitCount','RevisionService','_imageSourceCache','_collaborationPaused','requireSession','INetworkConditionService','4145xlStyd','__Key__','registerDependencies','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','headers','DocCollaborationEntity','registerHTTPInterceptor','USERS_LEAVE','CollaborationStatus','UnitEmbedded','SlideCollaborationEntity','_getDownloadEndpointURL','text-x','ITransformService','sheets','ERROR_IMAGE','_change$','ISingleActiveUnitService','ICollaborationSocketService','Failed\x20to\x20update\x20permission\x20point','_waitCount','appendMutation','pending','set','close','isPermissionRej','loadDoc','_initDependencies','/universer-api/oidc/authpage','_transformService','columnGroups','maxSize','DependentOn','liveShareOperation','fetch_missing','9906oMnNzO','onload','decorate','encrypt','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','_closedUnits','CollaborationImageIoService','socket\x20open.','getResourcesRequest','_incrementRevisionNumber','getUnitOnRev','responseType','pauseCollaboration','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','touchDependencies','_collabSessionService','_transformIMECache','dispose','_transformSelections','_onRemoteRetry','localeService','INGEST','_members$','update','_getUploadFileURL','_createInitialState','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','/new_changes','/universer-api/stream/file/upload','UNIVER_BASE','getCurrentRevOfUnit','getTypeOfUnitAdded$','FileSource','error$','_acknowledgedAwaitingRevision','_identity','toggleOffline','/collaborator','IUndoRedoService','_config','_transformStateCache','_initMergeInterceptor','submit\x20changeset\x20error!','session.room-full','_logService','catch','BASE64','CombCmd','enableCollaboration','collaboration-client.config','_initCloseConn','_shouldReportTelemetry','_pendingMutations','PERMISSION_REJ','LocalUndoRedoService','/allowed','pipe','charCodeAt','_getSocketChannel','parseProtocolChangeset','SNAPSHOT_URL_KEY','requestParams','onTransformRemoteChangesetByIMECache','complete','JOINING','sessionStatus','Disposable','_members','PERMISSION_DENIED','CONFLICT_PROCESSING','?size=','_onRemoteRejected','onMissedChangesetFetched','roles','onSyncEditingCollabCursor','_refreshUnitPermission','socketMessageSubscription','AuthzIoHttpService','allowed','DataLoaderService','_changesetSessionId','collaborators','BoardCollaborationEntity','conflict','packageName','awaiting_with_pending','textEncoder','_telemetryInfo','session.join-failed','getLocalCacheKey','getDeserializedSheetBlock','ws://127.0.0.1:8000/universer-api/comb/connect','c1Prime','toRemote','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','ISocketService','\x0aAfter:\x20','sendChangesetTimeout','localCacheService','_toggleOffline','RECV','createSocket','resend','commentUpdateEvent','UnitStatus','_cfgEnableObjInherit','resolveWithBasePath','_localeService','toString','_HTTPService','filter','_clearScheduledTask','updateOfflineData','LIVESHARE_OPERATION','updateCursorEvent','UNISCRIPT_RUN','_pendingSessions','duration','SHOULD_CLOSE_CONN','[OfflineState]:\x20received\x20rejection.','UUID','asObservable','_commandService','socket$','_sheetTransformSelectionsService','HEARTBEAT_INTERVAL','emitEvent','initWorkbookPermissionChange','getAllMembers','UNIVER_PDF','isTransformChangesetsSuccess','objectID','permissionRejEvent','iterator','toPrimitive','DisposableCollection','BehaviorSubject','UNIVER_BOARD','AWAITING_WITH_PENDING','UNIVER_SHEET','list','[CollaborationState]:\x20apply\x20error!','awaitingChangeset','ImageSourceType','prototype','createInstance','type','DEFAULT_COLLAB_WEB_SOCKET_URL','/universer-api/uniscript','_userManagerService','Edit','Injector','_compressMutationService','get','delete','_fetchMissChangesets','IDLE','symbol','url','setConfig','PSEUDO_FETCH_MISSING_RESULT','event$','EnsureSlideMasterPageMutation','OFFLINE','FetchingMissState','_handlerCallback','IAttachmentIoService','loadBase','&assign=','clearOfflineData','onStarting','_resendTimeout','stopTime','onlyLocal','saveAttachment','&source=','updateSnapshot','COMPRESS_MUTATION_SEND','PERSON','transformStack\x20failed!','_clearCollaborationTimeoutTimer','endpointKey','error','_handler','isTransformMutationsWithChangesetFailure','objectType','joinRsp','FAIL','_onConnectionOpen','setShowComponents','sendHeartbeatTimer','_socket','_commentUpdate$','getCollabEntity$','reduce','addImageSourceCache','toDisposable','objectId','_remoteChangesetQueue','_sender','session','unitLoaded$','status$','_state$','[PendingState]:\x20unhandled\x20univer\x20type:\x20','UNIVER_COLLABORATION_CLIENT_PLUGIN','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','UNIVER_SLIDE','SOCKET_FAILED_RETRY','equals','ISnapshotServerService','loadSheet','onRemoteChangeset','fromCollab','debug','session.room-not-exists','LEAVE','next','put','UniverLicensePlugin','_isEchoedAwaitingChangeset','_socketMessageSubscription','_upload','POST','memberID','collaboration-client.local-cache-service','unitId','CollaborationController','onRemoteRej','ObjectPermissionService','authzUrl','_localCacheService','toStringTag','_tryEnsureSocket','call','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','status','WorkbookEditablePermission','onRemoteAck','method','add','replace','avatar','stringify','_resendTimer','fetchMissingChangesets','capture','revision','_transitionLocked','CHANGESET_REJ','COLLABORATION_ENDPOINT_INVALID','transformUndoRedo','loadUnitOfRevision','\x0aCurrent:\x20','/role','result','_onOffline','SheetsSelectionsService','_unlockTransition','resolve','IConfigService','3JOqZIc','_substituteUndoStack','SnapshotServerOverHTTPService','now','csRejEvent','SetSelectionsOperation','transformChangesets','UPDATE_CURSOR','startsWith','defineProperty','getAllPermissionPoint','clear','_onFetchMissResult','UNIVER_DOC','accept','Optional','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','CollaborationSocketService','subscribe','ConflictState','append','post','\x20-\x20','indexOf','SyncedState','MUTATION','_transformRemoteChangesetByIMECache','[CollaborationSessionService]','_onConnectionFailed','ICommandService','encodeURIComponent','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','findIndex','session.room-permission-denied','objectPermissionTypes','HTTPService','_onUserJoin','_changesetReqId','session.room-cnt-exceeds','CollaborationEvent','_awaitingChangeset','_hasSessionsForEndpoint','push','saveChangeset','addHandlerCallback','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','_getAPIPrefix','_roomCreated$','_clearTimeoutTimer','/universer-api/file/{fileID}/sign-url','_injector','HTTPRequest','_transformUndoredo','fetchMiss','UPDATE_PERMISSION_OBJ','LIVESHARE_NEW_HOST','awaiting','_listenToNetworkCondition','size','onTransformIME','_schedule','getAttachmentUrl','_getLoginPath','UserManagerService','editing\x20status\x20changed\x20to','endsWith','startTime','_authzIoService','snapshot','removeMember','subType','_queuedRemoteChangesets','some','floor','unit-cache-','updatePermissionPoint','mapDocumentTypeToUniverInstanceType','updateCollaborator','liveShareNewHost','userID','changeset','file','CollaborationSessionService','length','getUnitType','patch','uploadFileServerUrl','_createSocket','[SyncedState]:\x20received\x20rejection.','socketService','_undoStacks','173784mAcdpr','number','_getRedoStack','_docStateChangeManagerService','_socketService','message$','docStateChange$','onTransformRemoteChangesetByStateCache','[FetchMissState]','/unit/','_showConflictProcessingNotification','default','cmd','unitType','_acknowledgeAwaitingIfReady','/fetchmissing?from=','UniverCollaborationClientPlugin','_executeRemoteChangeset','JOIN_ROOM_FULL','DEFAULT_FILE_NAME','_updateStatus','_prepareConflictRecovery','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','missingChangesets','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','_clearHeartbeatTimer','apply','_roomMembers','_permissionService','sid','CONFLICT','min','JOIN','_rescheduleHeartbeat','_acknowledgeAwaiting','socketReady','_replayCachedMutations','failed\x20to\x20apply\x20missed\x20changesets!','getMember','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','PdfCollaborationEntity','MentionIoHttpService','changesets','Inject','joinEvent','isInternalEditorID','/-/object/-/batch_allowed','forEach','saveImage','getCollabEntity','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','SessionStatus','MemberService','onSendChangeset','getImage','MSG_FOR_ERROR','not_collab','getUnitId','/universer-api/authz','onMutationExecutedForCollab','every','_onLocalMutation','delay','SOCKET_FAILED','getSnapshotAPIPath','hasOwnProperty','m2Prime','DRAWING_IMAGE_ALLOW_IMAGE_LIST','baseRev','Plugin','_initRequestHeader','loadSlide','[CollaborationSession]','_snapshotServerService','_networkConditionService','_getSignURL','[PendingState]:\x20received\x20acknowledgement.','_joinRoom','IUniverInstanceService','SUBMIT_CHANGESET','UnitObject','ErrorCode','_sessionStatus$','{fileID}','take','range','_event$','reconnect','HELLO','location','clearUnit','_initUnitPermissionChange','updateMember','_socketChannels','SnapshotService','_sessions','unitDisposed$','CompressMutationService','slice','_createSession','from','_getCtorByUniverInstanceType','_onConflict','onLocalMutation','univer-pro.collaboration-client.network-condition.service','executeCommand','shareReplay','roomInfos','/universer-api/user/session-ticket','_emitMembers','[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.','_onRemoteACK','\x20in\x20_schedule.','CommentService','fromCharCode','_transformRemoteChangesetByStateCache','OfflineState','_exhaustRemoteChangesetQueue','ITelemetryService','state','loadUnit','_getSendChangesetTimeout','_waitForHeartbeatResponse','timeoutTimer','/universer-api/snapshot/','encode','COMPRESS_MUTATION_APPLY','_replaceFileID','retryCount','fetchThroughInterceptors','unit','origin','_applyRemoteChangeset','_configService','values','unknown','supports','316760QxdHWz','RemoveSlidePageMutation','LIVESHARE_FETCH_OPERATIONS','isTransformMutationsWithChangesetSuccess','_updateState','trim','batchAllowed','version','6355948UEhxKj','onRemoteRetry','src','_init','reqId','parseChangesetToProtocol','workbook','[PendingState]:\x20received\x20rejection.','_getConfig','loadBoard','_sendHeartbeat','ICollaborationClientAdapterService','_telemetryService','_scheduleCompleteTimestamp','then','_httpService','_resolveSessionIdentity','map','MergeInterceptorFactory','getTime','firstValueFrom','NOT_COLLAB','418yiizuc','JOIN_ROOM_FAILED','resourceIDs','_scheduleCollaborationTimeoutTimer','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','unitID','_transformAndApplyRemoteChangeset','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','fetching\x20missing\x20changesets\x20from\x20','_revisionService','HEARTBEAT_TIMEOUT','_getUnitPermissionPoints','localUnitId','LOCAL_CACHE_INTERVAL','_onJoinRoomEvent','close$','_undoRedoService','parse','_substituteRedoStack','max','ERROR_IMAGE_TYPE','save\x20fail\x20reason\x20is\x20','downloadEndpointUrl','_stopTelemetryCollaborationNewChangeset','transformSelections','_unitInfo$','href','RxDisposable','LIVESHARE_TERMINATE','body','@univerjs-pro/collaboration-client','IPermissionService','leaveEvent','dispose$','/object/','_status$','_startCollaboration','Board','code','_toggleOnline','CONFLICT_CACHE_CLEAR_FAILED','MentionType','mergeOverrideWithDependencies','reject','transformMutationsWithChangeset','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','/block/','_onCombEvent','57687456psknzA','?url=','cbc','[DataLoaderService]','_clearRetryConnectingTimer','subUnitId','putCollaborators','enableAuthServer','getCurrentSelections','_showConflictNotification','AwaitingWithPendingState','getSheetBlock','_adapter','_collaborationTimeoutTimer','interceptor','enableOfflineEditing','_sessionChannels','OPTIONAL','setCfgEnableObjInherit','getWorkbookSelections','RichTextEditingMutation','c2Prime','actions','_entityInit$','_updateUnitPermissionPoint','backupOfflineData','target','collabWebSocketUrl','LIVESHARE_REQUEST_HOST','CommandType','IAuthzIoService','/-/object/list','getActiveSheet','1.0.4','connection\x20error','OTHER_CLIENT_EDITING','_entities','synced','CmdRspCode','getCurrentUser','_getUndoStack','members','deepClone','ILogService','concatMap','offline','Rectangle','_createInitialStateImpl','loginUrlKey','_maxTotalRetryTimeout','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','_disableEditing','readyForCollab','isArray','onPrepareTransformSelections','Subject','LocaleService','getTypeOfUnitDisposed$','originalMeta','_getCurrentRevision','mutations','members$','candidateSocket','params','confirm','includes','getValue','send','onCommentUpdate','change$','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','FileId','_onRecvEvent','OBJECT_PERMISSION_CONFIG_KEY','_redoStacks','_singleActiveUnitService','onMissingChangesets','function','UniverInstanceType','[CollaborationEntity]','init','NO_OTHER_CLIENTS_EDITING','People','online$','_instanceService','title','_clearRedo','_state','_disposed','_registerDependencies','_memberService','_snapshotService','USERS_ENTER','_getAPIPrefixPath','Slide','toLocal','_commentService','collaMsg','COMMENT_UPDATE','Workbook','BaseCollaborationEntity','_removeRoom','_updateLocalCache','CHANGESET_SHOULD_RETRY','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','CLOSE_ROOM','onTransformSelections','/object','closeSession','LOCAL_CACHE_INTERVAL_KEY','has','concatBytes','getSheetId','disposeWithMe','_decreaseWaiting','_collaborationSessionService','585HRRiKh','editingUnit','string','base-ui.attachment-io.service','_syncEditingCollabCursor','unsubscribe','sessionStatus$','data','getUnit','createIdentifier','[SyncedState]:\x20received\x20acknowledgement.','HEARTBEAT_INTERVAL_KEY','EmptyMutationInfo','SheetPermissionInitController','UnitAction','waitForRoom$','find','UniverNetworkPlugin','takeUntil','getUploadOptions','endpoint','10tRhrKe','IImageIoService','JOIN_ROOM_NOT_EXISTS','OTHER_CLIENTS_EDITING','JOIN_ROOM_PERMISSION_DENIED','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','_collaborationUIEventService','csAckEvent','_handleRemoteChangesets','CollaborationAttachmentIoService','_checkMissing','blockRanges','telemetry\x20info\x20is\x20not\x20initialized','CollaborationUIEventService','getFocusedUnit','getInterceptPoints','UniverCollaborationPlugin','override'];_0x60bf=function(){return _0x3e21ef;};return _0x60bf();}function Ae(_0x54ace6){return _0x54ace6['isCompositionEnd']!==void 0x0;}function je(_0x28dcc9,_0x19cf50){return Me(_0x28dcc9)&&Me(_0x19cf50)&&!Pe(_0x28dcc9)&&!Pe(_0x19cf50)&&!Ne(_0x28dcc9)&&!Ne(_0x19cf50);}function Me(_0x4636f4){const _0x2aa571=_0x51c992;return Fe(_0x4636f4)[_0x2aa571(0x17c)](_0x254b77=>T(_0x254b77)&&_0x254b77['et']==='text-x');}function Ne(_0x45713d){const _0x4c8df4=_0x51c992;return Fe(_0x45713d)[_0x4c8df4(0x17c)](_0x4694bf=>Array[_0x4c8df4(0x29b)](_0x4694bf)||typeof _0x4694bf==_0x4c8df4(0x2dc)||typeof _0x4694bf==_0x4c8df4(0x190));}function Pe(_0x36825c){const _0x3e65c2=_0x51c992;return Fe(_0x36825c)[_0x3e65c2(0x17c)](_0x4bdcdb=>!T(_0x4bdcdb)||_0x4bdcdb['et']!==_0x3e65c2(0x353)||!Array['isArray'](_0x4bdcdb['e'])?!0x1:_0x4bdcdb['e'][_0x3e65c2(0x17c)](_0x6742a5=>!T(_0x6742a5)||!T(_0x6742a5[_0x3e65c2(0x253)])?!0x1:Object[_0x3e65c2(0x3fa)][_0x3e65c2(0x1d0)][_0x3e65c2(0x454)](_0x6742a5[_0x3e65c2(0x253)],_0x3e65c2(0x33d))||Object[_0x3e65c2(0x3fa)][_0x3e65c2(0x1d0)][_0x3e65c2(0x454)](_0x6742a5[_0x3e65c2(0x253)],_0x3e65c2(0x365))||Object['prototype'][_0x3e65c2(0x1d0)]['call'](_0x6742a5[_0x3e65c2(0x253)],_0x3e65c2(0x2fa))));}function Fe(_0xc0f098){const _0x4eb05a=_0x51c992;if(!Array[_0x4eb05a(0x29b)](_0xc0f098))return[];let _0x3fb27f=_0xc0f098[_0x4eb05a(0x2a7)]('body')?_0xc0f098:_0xc0f098['find'](_0x76b6d9=>Array['isArray'](_0x76b6d9)&&_0x76b6d9[_0x4eb05a(0x2a7)](_0x4eb05a(0x253)));if(!Array['isArray'](_0x3fb27f))return[];let _0x3c43cb=_0x3fb27f[_0x4eb05a(0x486)]('body');return _0x3c43cb===-0x1?[]:_0x3fb27f[_0x4eb05a(0x1f1)](_0x3c43cb+0x1);}function T(_0x5cc325){const _0x3aefe1=_0x51c992;return typeof _0x5cc325==_0x3aefe1(0x31b)&&!!_0x5cc325&&!Array[_0x3aefe1(0x29b)](_0x5cc325);}function Ie(_0x41fc09,_0x41b860){const _0x5d03fa=_0x51c992;let _0x2a8577=new i[(_0x5d03fa(0x328))](0x1);return setTimeout(()=>_0x2a8577[_0x5d03fa(0x443)](_0x41b860),_0x41fc09),_0x2a8577[_0x5d03fa(0x3e3)]()[_0x5d03fa(0x3a2)]((0x0,i[_0x5d03fa(0x1e3)])(0x1));}var Le,Re,ze;let Be=function(_0x4054ac){const _0x1d7116=_0x51c992;return _0x4054ac[_0x1d7116(0x235)]=_0x1d7116(0x1c7),_0x4054ac[_0x1d7116(0x337)]=_0x1d7116(0x28b),_0x4054ac['PENDING']='pending',_0x4054ac['AWAITING']=_0x1d7116(0x4a7),_0x4054ac[_0x1d7116(0x3f4)]=_0x1d7116(0x3bf),_0x4054ac['FETCH_MISS']=_0x1d7116(0x369),_0x4054ac['CONFLICT']='conflict',_0x4054ac['OFFLINE']=_0x1d7116(0x293),_0x4054ac;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0x4bb309,_0x5aeebc,_0x529176,_0x58c52e,_0xe8b9ac,_0x55a151,_0xb074d3,_0x3b141a,_0x456dd7){const _0x33a60c=_0x51c992;this[_0x33a60c(0x23b)]=_0x4bb309,this[_0x33a60c(0x3fc)]=_0x5aeebc,this[_0x33a60c(0x421)]=_0xe8b9ac,this['_commandService']=_0x55a151,this['_undoRedoService']=_0xb074d3,this['_revisionService']=_0x3b141a,this['_localCacheService']=_0x456dd7,g(this,'_awaitingChangeset',null),g(this,_0x33a60c(0x39e),[]),this[_0x33a60c(0x497)]=_0x529176,this['_pendingMutations']=_0x58c52e;}[_0x51c992(0x2f9)](_0x481026){const _0x43327a=_0x51c992;let _0x23127d=this[_0x43327a(0x23f)][_0x43327a(0x388)](this[_0x43327a(0x23b)]);return _0x481026[_0x43327a(0x461)]>_0x23127d+0x1&&(this[_0x43327a(0x421)][_0x43327a(0x2b2)]({'from':_0x23127d,'to':_0x481026[_0x43327a(0x461)]-0x1}),!0x0);}[_0x51c992(0x4a3)](_0x141780){const _0x4b087a=_0x51c992;this[_0x4b087a(0x246)][_0x4b087a(0x465)](this['unitID'],_0x141780);}[_0x51c992(0x37c)](_0x12e90c){const _0x518bfc=_0x51c992;var _0xa5d106,_0x3bf1f0;(_0xa5d106=(_0x3bf1f0=this[_0x518bfc(0x421)])[_0x518bfc(0x2d0)])==null||_0xa5d106[_0x518bfc(0x454)](_0x3bf1f0,_0x12e90c);}['_prepareTransformSelections'](_0x15b024){const _0x1b44bf=_0x51c992;var _0xfea5c6,_0x169bde;return((_0xfea5c6=(_0x169bde=this[_0x1b44bf(0x421)])[_0x1b44bf(0x29c)])==null?void 0x0:_0xfea5c6[_0x1b44bf(0x454)](_0x169bde,_0x15b024))??null;}[_0x51c992(0x37a)](_0x4eb9a4){const _0x2100d7=_0x51c992;var _0x1aff26,_0x2ae71a;return(_0x1aff26=(_0x2ae71a=this[_0x2100d7(0x421)])[_0x2100d7(0x4aa)])==null?void 0x0:_0x1aff26['call'](_0x2ae71a,_0x4eb9a4);}[_0x51c992(0x392)](_0x137f2d){const _0x3eb8f0=_0x51c992;var _0x20096e,_0x16f78d;return(_0x20096e=(_0x16f78d=this[_0x3eb8f0(0x421)])['onTransformState'])==null?void 0x0:_0x20096e[_0x3eb8f0(0x454)](_0x16f78d,_0x137f2d);}[_0x51c992(0x489)](_0x2e46b3){const _0x5e9fd3=_0x51c992;var _0x331b5a,_0x5d8295;return((_0x331b5a=(_0x5d8295=this[_0x5e9fd3(0x421)])['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x331b5a['call'](_0x5d8295,_0x2e46b3))??_0x2e46b3;}['_transformRemoteChangesetByStateCache'](_0x479094){const _0x50118a=_0x51c992;var _0x4340e5,_0x2b2a53;return((_0x4340e5=(_0x2b2a53=this[_0x50118a(0x421)])[_0x50118a(0x196)])==null?void 0x0:_0x4340e5[_0x50118a(0x454)](_0x2b2a53,_0x479094))??_0x479094;}[_0x51c992(0x2de)](_0x576d14){const _0xca601b=_0x51c992;if(this[_0xca601b(0x3fc)]===t[_0xca601b(0x2b4)]['UNIVER_DOC']){let {unitID:_0x2ff851,mutations:_0x465e64,memberID:_0x264867}=_0x576d14,_0x2c9354=_0x465e64[_0xca601b(0x187)]>0x0?_0x465e64[0x0]['params']['textRanges']:[];if(Array[_0xca601b(0x29b)](_0x2c9354)&&_0x2c9354[_0xca601b(0x187)]>0x0){var _0x52feec,_0x289989;(_0x52feec=(_0x289989=this['_handler'])[_0xca601b(0x3b4)])==null||_0x52feec[_0xca601b(0x454)](_0x289989,{'unitID':_0x2ff851,'memberID':_0x264867,'textRanges':_0x2c9354});}}}[_0x51c992(0x2cc)](){const _0xaa134d=_0x51c992;var _0x5b6f2e;(_0x5b6f2e=this[_0xaa134d(0x451)])==null||_0x5b6f2e[_0xaa134d(0x3da)](this[_0xaa134d(0x23b)],this[_0xaa134d(0x3fc)],this['_awaitingChangeset'],this[_0xaa134d(0x39e)]);}[_0x51c992(0x2a1)](){const _0x3802ce=_0x51c992;return this[_0x3802ce(0x23f)]['getCurrentRevOfUnit'](this[_0x3802ce(0x23b)]);}['_incrementRevisionNumber'](){const _0x2c76b0=_0x51c992;this['_revisionService']['incrementRevOfUnit'](this[_0x2c76b0(0x23b)]);}[_0x51c992(0x1a0)](_0x26a213){const _0xac6726=_0x51c992;let _0x47db18=this[_0xac6726(0x489)](_0x26a213);_0x47db18=this[_0xac6726(0x202)](_0x47db18);let _0x381393=this[_0xac6726(0x306)](_0x47db18),_0x17547c=(0x0,t['sequenceExecute'])(_0x47db18[_0xac6726(0x2a2)],this[_0xac6726(0x3e4)],{'fromCollab':!0x0});if(!_0x17547c[_0xac6726(0x469)])throw _0x381393==null||_0x381393['rollback'](),_0x17547c[_0xac6726(0x420)]instanceof Error?_0x17547c[_0xac6726(0x420)]:Error(_0x17547c['error']??_0xac6726(0x3f7));_0x381393==null||_0x381393['commit'](),this[_0xac6726(0x37a)](_0x47db18),this[_0xac6726(0x392)](_0x47db18),this['_transformUndoredo'](_0x26a213),this[_0xac6726(0x37c)](_0x47db18),this[_0xac6726(0x2de)](_0x47db18),this[_0xac6726(0x373)]();}};let D=class extends E{constructor(_0x40c01c,_0x2d2a0d,_0x1e18b2,_0x39a9ac,_0x2284be,_0x303210,_0x3e6c7f,_0x7d0e0,_0x29b317,_0x57cc7e){const _0x521399=_0x51c992;super(_0x40c01c,_0x2d2a0d,null,[],_0x1e18b2,_0x3e6c7f,_0x303210,_0x39a9ac,_0x57cc7e),this[_0x521399(0x4a1)]=_0x2284be,this[_0x521399(0x396)]=_0x7d0e0,this[_0x521399(0x364)]=_0x29b317,this[_0x521399(0x3cc)]=_0x57cc7e,g(this,_0x521399(0x456),_0x521399(0x28b));}[_0x51c992(0x35c)](_0xfcae97){const _0x1ae72a=_0x51c992;let _0x2348da=this[_0x1ae72a(0x4a1)][_0x1ae72a(0x3fb)](O,this[_0x1ae72a(0x23b)],this[_0x1ae72a(0x3fc)],[_0xfcae97],this['_handler']);return _0x2348da[_0x1ae72a(0x4ab)](),_0x2348da[_0x1ae72a(0x2cc)](),_0x2348da;}[_0x51c992(0x43e)](_0x432ec2){const _0x5e8801=_0x51c992;if(this['_checkMissing'](_0x432ec2))return this[_0x5e8801(0x4a1)][_0x5e8801(0x3fb)](N,this[_0x5e8801(0x23b)],this['type'],null,[],null,[_0x432ec2],this['_handler']);try{let _0x2758b3=this[_0x5e8801(0x364)]['transformMutationsWithChangeset'](_0x432ec2,[e[_0x5e8801(0x2e6)]]);if((0x0,e[_0x5e8801(0x21b)])(_0x2758b3)){let {c1Prime:_0x9b541}=_0x2758b3;return this[_0x5e8801(0x1a0)](_0x9b541),this;}throw _0x2758b3[_0x5e8801(0x420)];}catch(_0x491080){return this[_0x5e8801(0x396)][_0x5e8801(0x420)](_0x491080),this[_0x5e8801(0x1f5)](!0x1);}}[_0x51c992(0x1f5)](_0x24f39c){const _0x447c5d=_0x51c992;return this[_0x447c5d(0x4a1)]['createInstance'](j,this[_0x447c5d(0x23b)],this[_0x447c5d(0x3fc)],null,[],this['_handler'],_0x24f39c);}[_0x51c992(0x458)](_0x49a055){const _0x135c2e=_0x51c992;if(_0x49a055[_0x135c2e(0x461)]<=this[_0x135c2e(0x2a1)]())return this;throw Error(_0x135c2e(0x2e4));}[_0x51c992(0x44e)](){const _0xea515c=_0x51c992;throw Error(_0xea515c(0x18c));}[_0x51c992(0x221)](){return this;}['toggleOffline'](){const _0x52ca75=_0x51c992;return this['_injector'][_0x52ca75(0x3fb)](M,this[_0x52ca75(0x23b)],this[_0x52ca75(0x3fc)],null,[],this[_0x52ca75(0x421)]);}['toggleOnline'](){return this;}[_0x51c992(0x3d0)](){const _0x2f62b8=_0x51c992;throw Error(_0x2f62b8(0x384));}[_0x51c992(0x4a4)](){const _0x3cb776=_0x51c992;let _0x1788c9=this[_0x3cb776(0x23f)]['getCurrentRevOfUnit'](this[_0x3cb776(0x23b)]);return this['_handler'][_0x3cb776(0x2b2)]({'from':_0x1788c9,'to':0x0}),this[_0x3cb776(0x4a1)][_0x3cb776(0x3fb)](N,this['unitID'],this[_0x3cb776(0x3fc)],null,[],null,[],this[_0x3cb776(0x421)]);}};D=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x5,t['IUndoRedoService']),v(0x6,t['ICommandService']),v(0x7,t[_0x51c992(0x291)]),v(0x8,e[_0x51c992(0x354)]),v(0x9,(0x0,t[_0x51c992(0x47e)])(x))],D);let O=Le=class extends E{constructor(_0x5b4cc2,_0x56c11f,_0x567983,_0x84317b,_0x4adb91,_0x189a01,_0x1957a1,_0x56f046,_0x135ef4,_0x4d606e,_0x5de1f6,_0x41f0b0,_0x53c319,_0x179b4d){const _0x137d65=_0x51c992;super(_0x5b4cc2,_0x56c11f,null,_0x567983,_0x84317b,_0x135ef4,_0x53c319,_0x189a01,_0x179b4d),this[_0x137d65(0x4a1)]=_0x4adb91,this[_0x137d65(0x3ff)]=_0x1957a1,this[_0x137d65(0x396)]=_0x56f046,this[_0x137d65(0x214)]=_0x4d606e,this[_0x137d65(0x364)]=_0x5de1f6,this[_0x137d65(0x322)]=_0x41f0b0,g(this,'status',_0x137d65(0x35d)),g(this,_0x137d65(0x22d),null),g(this,_0x137d65(0x32c),null);}[_0x51c992(0x35c)](_0x1405e2){const _0x2cb7c2=_0x51c992;return this[_0x2cb7c2(0x39e)][_0x2cb7c2(0x499)](_0x1405e2),this[_0x2cb7c2(0x2cc)](),this;}[_0x51c992(0x43e)](_0x373d86){const _0x49f85b=_0x51c992;if(this['_checkMissing'](_0x373d86))return this[_0x49f85b(0x3d9)](),this[_0x49f85b(0x4a1)][_0x49f85b(0x3fb)](N,this[_0x49f85b(0x23b)],this[_0x49f85b(0x3fc)],null,this[_0x49f85b(0x39e)],null,[_0x373d86],this[_0x49f85b(0x421)]);try{let _0x38efc3=this[_0x49f85b(0x364)][_0x49f85b(0x262)](_0x373d86,this['_pendingMutations']);if((0x0,e[_0x49f85b(0x21b)])(_0x38efc3)){let {c1Prime:_0x403ca8,m2Prime:_0x34971e}=_0x38efc3;this[_0x49f85b(0x1a0)](_0x403ca8);let _0x2daae2=this[_0x49f85b(0x4a1)][_0x49f85b(0x3fb)](Le,this['unitID'],this[_0x49f85b(0x3fc)],_0x34971e,this[_0x49f85b(0x421)]);this['_clearScheduledTask']();let _0x14e5e9=new Date()[_0x49f85b(0x233)](),_0x448eda=this[_0x49f85b(0x22d)]?Math[_0x49f85b(0x249)](this[_0x49f85b(0x22d)]-_0x14e5e9,0x0):this[_0x49f85b(0x208)]();return _0x2daae2['_schedule'](_0x448eda),_0x2daae2;}throw _0x38efc3[_0x49f85b(0x420)];}catch(_0x280fbd){return this[_0x49f85b(0x396)][_0x49f85b(0x420)](_0x280fbd),this['_onConflict'](!0x1);}}[_0x51c992(0x458)](_0x11f37f){const _0x5e13d4=_0x51c992;if(_0x11f37f[_0x5e13d4(0x461)]<=this[_0x5e13d4(0x2a1)]())return this;throw Error(_0x5e13d4(0x1db));}[_0x51c992(0x44e)](){const _0xc24246=_0x51c992;throw Error(_0xc24246(0x227));}[_0x51c992(0x221)](){return this;}[_0x51c992(0x38e)](){const _0x392537=_0x51c992;return this[_0x392537(0x3d9)](),this[_0x392537(0x4a1)]['createInstance'](M,this[_0x392537(0x23b)],this[_0x392537(0x3fc)],null,this[_0x392537(0x39e)],this[_0x392537(0x421)]);}[_0x51c992(0x302)](){return this;}['_schedule'](_0x54dc92){const _0x2d066a=_0x51c992;let _0x3bf86e=_0x54dc92??this[_0x2d066a(0x208)]();this[_0x2d066a(0x22d)]=new Date()[_0x2d066a(0x233)]()+_0x3bf86e,this[_0x2d066a(0x32c)]=setTimeout(()=>{const _0x3e73a1=_0x2d066a;this[_0x3e73a1(0x3d9)]();let _0x36fc1f=null;switch(this[_0x3e73a1(0x3fc)]){case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x3f5)]:_0x36fc1f=w(this['_pendingMutations'],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this[_0x3e73a1(0x3ff)]);break;case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x47c)]:_0x36fc1f=this['_pendingMutations'][_0x3e73a1(0x1cb)](_0x3729b0=>_0x3729b0['id']===n['RichTextEditingMutation']['id'])?Oe(this['_pendingMutations'],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this['_userManagerService']):w(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this['_univerInstanceService'],this[_0x3e73a1(0x23f)],this['_userManagerService']);break;case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x439)]:_0x36fc1f=De(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this[_0x3e73a1(0x3ff)]);break;case t['UniverInstanceType'][_0x3e73a1(0x3eb)]:_0x36fc1f=Ee(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this['_revisionService'],this[_0x3e73a1(0x3ff)]);break;case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x3f3)]:_0x36fc1f=w(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this['_revisionService'],this[_0x3e73a1(0x3ff)]);break;case t['UniverInstanceType'][_0x3e73a1(0x387)]:_0x36fc1f=w(this[_0x3e73a1(0x39e)],this['unitID'],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this['_userManagerService']);break;default:throw Error(_0x3e73a1(0x436)+this['type']+_0x3e73a1(0x1ff));}let {changeset:_0x50a6ff,pendingMutations:_0x46b4c6}=_0x36fc1f;this['_handler']['onSendChangeset'](_0x50a6ff);let _0x20a62c=_0x46b4c6[_0x3e73a1(0x187)]?this[_0x3e73a1(0x4a1)]['createInstance'](A,this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x3fc)],_0x50a6ff,_0x46b4c6,this['_handler'],void 0x0):this[_0x3e73a1(0x4a1)][_0x3e73a1(0x3fb)](k,this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x3fc)],_0x50a6ff,this['_handler']);_0x20a62c['_updateLocalCache'](),this[_0x3e73a1(0x421)]['onStateChange'](this,_0x20a62c);},_0x3bf86e);}[_0x51c992(0x208)](){const _0xb60b02=_0x51c992;let _0x187996=this[_0xb60b02(0x214)]['getConfig'](m);return(_0x187996==null?void 0x0:_0x187996[_0xb60b02(0x3cb)])??0x7d0;}[_0x51c992(0x3d0)](){const _0x43575e=_0x51c992;throw Error(_0x43575e(0x377));}['_clearScheduledTask'](){const _0x4f313a=_0x51c992;this[_0x4f313a(0x32c)]!=null&&(clearTimeout(this[_0x4f313a(0x32c)]),this[_0x4f313a(0x32c)]=null);}[_0x51c992(0x1f5)](_0x5ba2c3){const _0x4b716f=_0x51c992;return this[_0x4b716f(0x3d9)](),this[_0x4b716f(0x4a1)][_0x4b716f(0x3fb)](j,this[_0x4b716f(0x23b)],this[_0x4b716f(0x3fc)],null,this[_0x4b716f(0x39e)],this['_handler'],_0x5ba2c3);}};O=Le=y([v(0x4,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(e['RevisionService'])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x4ae)])),v(0x7,t[_0x51c992(0x291)]),v(0x8,t['ICommandService']),v(0x9,t[_0x51c992(0x46e)]),v(0xa,e['ITransformService']),v(0xb,t[_0x51c992(0x1dd)]),v(0xc,t[_0x51c992(0x390)]),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],O);let k=Re=class extends E{constructor(_0x246c0a,_0xe22b53,_0x4a9670,_0x3026d8,_0x19a16b,_0x29dd0f,_0x4cf4e8,_0x4dfb2f,_0x2835d3,_0x515bd0,_0x277fe7){const _0x424fd7=_0x51c992;super(_0x246c0a,_0xe22b53,_0x4a9670,[],_0x3026d8,_0x4cf4e8,_0x515bd0,_0x29dd0f,_0x277fe7),this['_injector']=_0x19a16b,this[_0x424fd7(0x396)]=_0x4dfb2f,this[_0x424fd7(0x364)]=_0x2835d3,g(this,_0x424fd7(0x456),'awaiting'),g(this,_0x424fd7(0x415),0x0),g(this,_0x424fd7(0x297),0x0),g(this,_0x424fd7(0x45e),void 0x0),g(this,_0x424fd7(0x431),void 0x0);}[_0x51c992(0x35c)](_0x14a1c5){const _0x427896=_0x51c992;this['_clearScheduledTask']();let _0x25c9bb=this['_injector'][_0x427896(0x3fb)](A,this[_0x427896(0x23b)],this[_0x427896(0x3fc)],this['_awaitingChangeset'],[_0x14a1c5],this[_0x427896(0x421)],this[_0x427896(0x45e)]);return _0x25c9bb['_updateLocalCache'](),_0x25c9bb;}[_0x51c992(0x43e)](_0x410727){const _0x1434ea=_0x51c992;if(this['_checkMissing'](_0x410727))return this[_0x1434ea(0x3d9)](),this[_0x1434ea(0x4a1)][_0x1434ea(0x3fb)](N,this[_0x1434ea(0x23b)],this['type'],this['_awaitingChangeset'],[],null,[_0x410727],this[_0x1434ea(0x421)]);try{let _0x4d1865=this['_transformService'][_0x1434ea(0x475)]([_0x410727],[this['_awaitingChangeset']],!0x1);if((0x0,e[_0x1434ea(0x3ec)])(_0x4d1865)){let {c1Prime:_0x9804fa,c2Prime:_0x3644b0}=_0x4d1865;this[_0x1434ea(0x1a0)](_0x9804fa[0x0]),_0x3644b0[0x0][_0x1434ea(0x1d3)]=this[_0x1434ea(0x2a1)](),this['_clearScheduledTask']();let _0x161a5f=this[_0x1434ea(0x4a1)][_0x1434ea(0x3fb)](Re,this[_0x1434ea(0x23b)],this[_0x1434ea(0x3fc)],_0x3644b0[0x0],this[_0x1434ea(0x421)]);return _0x161a5f[_0x1434ea(0x2cc)](),_0x161a5f;}throw _0x4d1865['error'];}catch(_0x36eca5){return this[_0x1434ea(0x396)][_0x1434ea(0x420)](_0x36eca5),this[_0x1434ea(0x1f5)](!0x1);}}[_0x51c992(0x458)](_0x5723d2){const _0x4a0aa2=_0x51c992;this[_0x4a0aa2(0x3d9)]();let _0xb1a49b=this[_0x4a0aa2(0x23f)][_0x4a0aa2(0x388)](this[_0x4a0aa2(0x23b)]);if(_0x5723d2[_0x4a0aa2(0x461)]<=_0xb1a49b)return this;if(this['_checkMissing'](_0x5723d2))return this[_0x4a0aa2(0x4a1)][_0x4a0aa2(0x3fb)](N,this['unitID'],this[_0x4a0aa2(0x3fc)],this[_0x4a0aa2(0x497)],[],_0x5723d2[_0x4a0aa2(0x461)],[],this[_0x4a0aa2(0x421)]);this[_0x4a0aa2(0x373)]();let _0xba813c=this[_0x4a0aa2(0x4a1)][_0x4a0aa2(0x3fb)](D,this[_0x4a0aa2(0x23b)],this[_0x4a0aa2(0x3fc)],this[_0x4a0aa2(0x421)]);return _0xba813c[_0x4a0aa2(0x2cc)](),_0xba813c;}['onRemoteRej'](_0x4d7697){const _0x3dea02=_0x51c992;return this[_0x3dea02(0x1f5)](!!(_0x4d7697!=null&&_0x4d7697[_0x3dea02(0x360)]));}['onRemoteRetry'](_0x14b3bf){const _0x34960d=_0x51c992;return this[_0x34960d(0x297)]>He?this[_0x34960d(0x38e)]():(this[_0x34960d(0x45e)]=Ie(this['_resendTimeout'],{'timeout':this[_0x34960d(0x415)],'reqId':_0x14b3bf[_0x34960d(0x224)]}),this['_sender']=this[_0x34960d(0x45e)][_0x34960d(0x481)](({reqId:_0x42903a,timeout:_0x52bfdf})=>{this['_resendWithTimeout'](_0x42903a,_0x52bfdf);}),this);}[_0x51c992(0x38e)](){const _0x3dd071=_0x51c992;return this['_clearScheduledTask'](),this[_0x3dd071(0x4a1)][_0x3dd071(0x3fb)](M,this['unitID'],this[_0x3dd071(0x3fc)],this[_0x3dd071(0x497)],[],this['_handler']);}[_0x51c992(0x302)](){return this;}['resend'](){const _0x25e08e=_0x51c992;this[_0x25e08e(0x421)][_0x25e08e(0x1c4)](this[_0x25e08e(0x497)]);}[_0x51c992(0x1f5)](_0x54c698){const _0x1bdef8=_0x51c992;return this[_0x1bdef8(0x3d9)](),this[_0x1bdef8(0x4a1)]['createInstance'](j,this[_0x1bdef8(0x23b)],this[_0x1bdef8(0x3fc)],this['_awaitingChangeset'],[],this['_handler'],_0x54c698);}[_0x51c992(0x305)](_0x4a9cae,_0x206f5d){const _0x4135c9=_0x51c992;var _0x1c0007;_0x4a9cae===((_0x1c0007=this[_0x4135c9(0x497)])==null?void 0x0:_0x1c0007[_0x4135c9(0x224)])&&(this[_0x4135c9(0x3d0)](),this[_0x4135c9(0x415)]=_0x206f5d===0x0?0x3e8:Math[_0x4135c9(0x1ae)](_0x206f5d*0x2,Ve),this[_0x4135c9(0x297)]+=this['_resendTimeout']);}[_0x51c992(0x3d9)](){const _0xdf5285=_0x51c992;var _0x4f927e;(_0x4f927e=this[_0xdf5285(0x431)])==null||_0x4f927e[_0xdf5285(0x2df)](),this[_0xdf5285(0x415)]=0x0,this[_0xdf5285(0x297)]=0x0;}};k=Re=y([v(0x4,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x6,t[_0x51c992(0x48c)]),v(0x7,t[_0x51c992(0x291)]),v(0x8,e[_0x51c992(0x354)]),v(0x9,t[_0x51c992(0x390)]),v(0xa,(0x0,t['Optional'])(x))],k);let A=ze=class extends E{constructor(_0x1074dc,_0x1cdf9e,_0x55273f,_0x4a5b30,_0x1cfaa3,_0x357dba,_0x7399af,_0x2fb937,_0x564ffc,_0x27c190,_0x378ae1,_0x4e1b35,_0x42dcdf){const _0x4e6c9d=_0x51c992;super(_0x1074dc,_0x1cdf9e,_0x55273f,_0x4a5b30,_0x1cfaa3,_0x564ffc,_0x4e1b35,_0x2fb937,_0x42dcdf),this['_injector']=_0x7399af,this[_0x4e6c9d(0x396)]=_0x27c190,this[_0x4e6c9d(0x364)]=_0x378ae1,this['localCacheService']=_0x42dcdf,g(this,_0x4e6c9d(0x456),_0x4e6c9d(0x3bf)),g(this,_0x4e6c9d(0x415),0x0),g(this,_0x4e6c9d(0x297),0x0),g(this,'_resendTimer',void 0x0),g(this,'_sender',void 0x0),_0x357dba&&(this[_0x4e6c9d(0x45e)]=_0x357dba,this[_0x4e6c9d(0x431)]=this[_0x4e6c9d(0x45e)]['subscribe'](({reqId:_0x4a977d,timeout:_0x441b8e})=>{const _0x4bb7ab=_0x4e6c9d;this[_0x4bb7ab(0x305)](_0x4a977d,_0x441b8e);}));}[_0x51c992(0x35c)](_0x2e526b){const _0x30fbd6=_0x51c992;return this['_pendingMutations'][_0x30fbd6(0x499)](_0x2e526b),this;}['onRemoteChangeset'](_0x3a407e){const _0x28810c=_0x51c992;if(this['_checkMissing'](_0x3a407e))return this[_0x28810c(0x3d9)](),this[_0x28810c(0x4a1)]['createInstance'](N,this[_0x28810c(0x23b)],this[_0x28810c(0x3fc)],this['_awaitingChangeset'],this[_0x28810c(0x39e)],null,[_0x3a407e],this[_0x28810c(0x421)]);try{let _0x1cdd2c=this[_0x28810c(0x364)]['transformChangesets']([_0x3a407e],[this[_0x28810c(0x497)]],!0x1);if((0x0,e[_0x28810c(0x3ec)])(_0x1cdd2c)){let {c1Prime:_0x81fc2,c2Prime:_0x272928}=_0x1cdd2c,_0x1fb399=this[_0x28810c(0x364)][_0x28810c(0x262)](_0x81fc2[0x0],this[_0x28810c(0x39e)]);if((0x0,e[_0x28810c(0x21b)])(_0x1fb399)){let {c1Prime:_0x3347c9,m2Prime:_0x243adc}=_0x1fb399;return this[_0x28810c(0x1a0)](_0x3347c9),_0x272928[0x0][_0x28810c(0x1d3)]=this[_0x28810c(0x2a1)](),this[_0x28810c(0x3d9)](),this[_0x28810c(0x4a1)][_0x28810c(0x3fb)](ze,this[_0x28810c(0x23b)],this[_0x28810c(0x3fc)],_0x272928[0x0],_0x243adc,this[_0x28810c(0x421)],void 0x0);}throw _0x1fb399[_0x28810c(0x420)];}throw _0x1cdd2c[_0x28810c(0x420)];}catch(_0x45c19b){return this[_0x28810c(0x396)]['error'](_0x45c19b),this['_onConflict'](!0x1);}}[_0x51c992(0x458)](_0x4dc351){const _0x503c0a=_0x51c992;this[_0x503c0a(0x3d9)]();let _0x335f63=this[_0x503c0a(0x2a1)]();if(_0x4dc351[_0x503c0a(0x461)]<=_0x335f63)return this;if(this[_0x503c0a(0x2f9)](_0x4dc351))return this[_0x503c0a(0x4a1)][_0x503c0a(0x3fb)](N,this[_0x503c0a(0x23b)],this['type'],this[_0x503c0a(0x497)],this[_0x503c0a(0x39e)],_0x4dc351['revision'],[],this['_handler']);this['_incrementRevisionNumber']();let _0x26ffc5=this[_0x503c0a(0x4a1)]['createInstance'](O,this[_0x503c0a(0x23b)],this['type'],this['_pendingMutations'],this[_0x503c0a(0x421)]);return _0x26ffc5['_schedule'](),_0x26ffc5['_updateLocalCache'](),_0x26ffc5;}[_0x51c992(0x44e)](_0x4adbb2){const _0x50f4cf=_0x51c992;return this[_0x50f4cf(0x1f5)](!!(_0x4adbb2!=null&&_0x4adbb2['isPermissionRej']));}[_0x51c992(0x221)](_0x3587cc){const _0x199a28=_0x51c992;return this[_0x199a28(0x297)]>He?this[_0x199a28(0x38e)]():(this[_0x199a28(0x45e)]=Ie(this[_0x199a28(0x415)],{'timeout':this[_0x199a28(0x415)],'reqId':_0x3587cc['reqId']}),this[_0x199a28(0x431)]=this[_0x199a28(0x45e)][_0x199a28(0x481)](({reqId:_0x1963ea,timeout:_0x1c05ec})=>{const _0x577e93=_0x199a28;this[_0x577e93(0x305)](_0x1963ea,_0x1c05ec);}),this);}[_0x51c992(0x38e)](){const _0x1cf06e=_0x51c992;return this[_0x1cf06e(0x3d9)](),this[_0x1cf06e(0x4a1)][_0x1cf06e(0x3fb)](M,this[_0x1cf06e(0x23b)],this['type'],this[_0x1cf06e(0x497)],this['_pendingMutations'],this['_handler']);}[_0x51c992(0x302)](){return this;}['resend'](){const _0x4413c2=_0x51c992;this['_handler'][_0x4413c2(0x1c4)](this[_0x4413c2(0x497)]);}[_0x51c992(0x1f5)](_0x5a2568){const _0x7da8d7=_0x51c992;return this['_clearScheduledTask'](),this[_0x7da8d7(0x4a1)][_0x7da8d7(0x3fb)](j,this['unitID'],this['type'],null,this[_0x7da8d7(0x39e)],this[_0x7da8d7(0x421)],_0x5a2568);}[_0x51c992(0x305)](_0x1abbf8,_0x5e539a){const _0x4705f7=_0x51c992;var _0x5e7d0e;_0x1abbf8===((_0x5e7d0e=this[_0x4705f7(0x497)])==null?void 0x0:_0x5e7d0e['reqId'])&&(this[_0x4705f7(0x3d0)](),this[_0x4705f7(0x415)]=_0x5e539a===0x0?0x3e8:Math[_0x4705f7(0x1ae)](_0x5e539a*0x2,Ve),this['_maxTotalRetryTimeout']+=this[_0x4705f7(0x415)]);}[_0x51c992(0x3d9)](){const _0x54a2ef=_0x51c992;var _0x4eb1eb;(_0x4eb1eb=this[_0x54a2ef(0x431)])==null||_0x4eb1eb[_0x54a2ef(0x2df)](),this[_0x54a2ef(0x415)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};A=ze=y([v(0x6,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x8,t[_0x51c992(0x48c)]),v(0x9,t['ILogService']),v(0xa,e[_0x51c992(0x354)]),v(0xb,t[_0x51c992(0x390)]),v(0xc,(0x0,t[_0x51c992(0x47e)])(x))],A);let j=class extends E{constructor(_0x3c732c,_0x7efc6c,_0xce16f3,_0x576b33,_0x331eed,_0x2a6f84=!0x1,_0x5decdd,_0x3749a1,_0x29bd16,_0x4c385b,_0x1cad44,_0x1cdc9b,_0x546d6f){const _0x243661=_0x51c992;super(_0x3c732c,_0x7efc6c,_0xce16f3,_0x576b33,_0x331eed,_0x3749a1,_0x29bd16,_0x4c385b,_0x546d6f),this['_isPermissionRej']=_0x2a6f84,this['_permissionService']=_0x5decdd,this[_0x243661(0x3d5)]=_0x1cad44,this[_0x243661(0x2f5)]=_0x1cdc9b,this[_0x243661(0x3cc)]=_0x546d6f,g(this,'status',_0x243661(0x3bd)),this[_0x243661(0x299)](),this[_0x243661(0x199)](),this[_0x243661(0x1a4)]();}['appendMutation'](){return this;}[_0x51c992(0x43e)](){return this;}[_0x51c992(0x458)](){return this;}[_0x51c992(0x44e)](){return this;}['onRemoteRetry'](){return this;}[_0x51c992(0x38e)](){return this;}[_0x51c992(0x302)](){return this;}[_0x51c992(0x3d0)](){const _0x45e4cb=_0x51c992;throw Error(_0x45e4cb(0x32f));}async['_prepareConflictRecovery'](){const _0x3e3b9d=_0x51c992;var _0x2f7a5d,_0x37f62d;await((_0x2f7a5d=this['_localCacheService'])==null||(_0x37f62d=_0x2f7a5d[_0x3e3b9d(0x27f)])==null?void 0x0:_0x37f62d[_0x3e3b9d(0x454)](_0x2f7a5d,this[_0x3e3b9d(0x23b)],_0x3e3b9d(0x3bd))['catch'](()=>void 0x0));try{var _0x260ee9;await((_0x260ee9=this[_0x3e3b9d(0x451)])==null?void 0x0:_0x260ee9[_0x3e3b9d(0x413)](this['unitID']));}catch{this[_0x3e3b9d(0x2f5)][_0x3e3b9d(0x3e8)]({'id':_0x3e3b9d(0x25e),'unitID':this['unitID']});return;}this['_showConflictNotification']();}['_showConflictProcessingNotification'](){const _0x10f033=_0x51c992;this[_0x10f033(0x2f5)][_0x10f033(0x3e8)]({'id':_0x10f033(0x3af)});}[_0x51c992(0x26f)](){const _0x33e505=_0x51c992;this['_isPermissionRej']?this['_collaborationUIEventService'][_0x33e505(0x3e8)]({'id':_0x33e505(0x3ae)}):this['_collaborationUIEventService']['emitEvent']({'id':'CONFLICT'});}['_disableEditing'](){const _0x34f8c0=_0x51c992;this[_0x34f8c0(0x1ab)][_0x34f8c0(0x17f)](new r['WorkbookEditablePermission'](this[_0x34f8c0(0x23b)])['id'],!0x1);}};j=y([v(0x6,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x255)])),v(0x7,t[_0x51c992(0x48c)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x51c992(0x1ba)])(e['RevisionService'])),v(0xa,(0x0,t[_0x51c992(0x1ba)])(t['LocaleService'])),v(0xb,(0x0,t[_0x51c992(0x1ba)])(_)),v(0xc,(0x0,t['Optional'])(x))],j);let M=class extends E{constructor(_0x30d1c0,_0x5c7c32,_0x16fd8e,_0x539fab,_0x8f2acd,_0x36b913,_0x1f431a,_0x1a04ae,_0x1a88a7,_0x22de51){const _0x5ef6bc=_0x51c992;super(_0x30d1c0,_0x5c7c32,_0x16fd8e,_0x539fab,_0x8f2acd,_0x1a04ae,_0x1a88a7,_0x1f431a,_0x22de51),this[_0x5ef6bc(0x4a1)]=_0x36b913,g(this,_0x5ef6bc(0x456),'offline');}[_0x51c992(0x35c)](_0x23235d){const _0x296746=_0x51c992;return this[_0x296746(0x39e)][_0x296746(0x499)](_0x23235d),this[_0x296746(0x2cc)](),this;}[_0x51c992(0x43e)](_0x34c80f){throw Error('[OfflineState]:\x20received\x20changeset.');}['onRemoteAck'](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x51c992(0x44e)](){const _0x4b1fa9=_0x51c992;throw Error(_0x4b1fa9(0x3e1));}['onRemoteRetry'](){return this;}[_0x51c992(0x38e)](){return this;}[_0x51c992(0x302)](){const _0x278954=_0x51c992;let {_injector:_0x2028b4,_pendingMutations:_0x49122e,_awaitingChangeset:_0x46dc73,unitID:_0x2dcb7a,_handler:_0x3c1e14,type:_0x314a3a}=this,_0x35c576=Ue(_0x2028b4,_0x2dcb7a,_0x314a3a,_0x46dc73,_0x49122e,_0x3c1e14);return _0x35c576 instanceof O?_0x35c576[_0x278954(0x4ab)]():(_0x35c576 instanceof A||_0x35c576 instanceof k)&&_0x35c576[_0x278954(0x3d0)](),_0x35c576;}[_0x51c992(0x3d0)](){const _0x510aa8=_0x51c992;throw Error(_0x510aa8(0x1a5));}};M=y([v(0x5,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,t[_0x51c992(0x48c)]),v(0x8,t[_0x51c992(0x390)]),v(0x9,(0x0,t[_0x51c992(0x47e)])(x))],M);let N=class extends E{constructor(_0x430e71,_0x2f5e1e,_0x26b6f7,_0x39d590,_0x30cc93,_0x2db25a,_0x21f467,_0x283f83,_0x231752,_0x584586,_0x381b11,_0x45505b,_0x11f525,_0x38fe89){const _0x5338dd=_0x51c992;super(_0x430e71,_0x2f5e1e,_0x26b6f7,_0x39d590,_0x21f467,_0x381b11,_0x45505b,_0x231752,_0x38fe89),this[_0x5338dd(0x38c)]=_0x30cc93,this['_queuedRemoteChangesets']=_0x2db25a,this[_0x5338dd(0x4a1)]=_0x283f83,this['_logService']=_0x584586,this[_0x5338dd(0x364)]=_0x11f525,this['localCacheService']=_0x38fe89,g(this,_0x5338dd(0x456),_0x5338dd(0x369));}[_0x51c992(0x3b2)](_0x12ae72){const _0x4297e9=_0x51c992;try{if(this[_0x4297e9(0x2f7)](_0x12ae72)[_0x4297e9(0x1a6)])throw Error(_0x4297e9(0x2f4));if(this[_0x4297e9(0x2f7)]([...this['_queuedRemoteChangesets']][_0x4297e9(0x32d)]((_0x2edeae,_0x6749f2)=>_0x2edeae[_0x4297e9(0x461)]-_0x6749f2['revision']))[_0x4297e9(0x1a6)])return this[_0x4297e9(0x17b)]=[],this['_updateLocalCache'](),this['_handler'][_0x4297e9(0x2b2)]({'from':this[_0x4297e9(0x2a1)](),'to':0x0}),this;let _0x46eb60=this[_0x4297e9(0x497)],_0x3574c4=this['_pendingMutations'],_0x3d64e0;if(_0x46eb60&&_0x3574c4[_0x4297e9(0x187)]!==0x0)_0x3d64e0=this['_injector']['createInstance'](A,this[_0x4297e9(0x23b)],this[_0x4297e9(0x3fc)],_0x46eb60,_0x3574c4,this[_0x4297e9(0x421)],void 0x0);else{if(_0x46eb60&&_0x3574c4[_0x4297e9(0x187)]===0x0)_0x46eb60[_0x4297e9(0x1d3)]=this[_0x4297e9(0x2a1)](),_0x3d64e0=this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](k,this['unitID'],this[_0x4297e9(0x3fc)],_0x46eb60,this[_0x4297e9(0x421)]);else{if(_0x3574c4[_0x4297e9(0x187)]!==0x0){let _0x2b5042=this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](O,this[_0x4297e9(0x23b)],this[_0x4297e9(0x3fc)],_0x3574c4,this[_0x4297e9(0x421)]);_0x2b5042[_0x4297e9(0x4ab)](),_0x3d64e0=_0x2b5042;}else _0x3d64e0=this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](D,this[_0x4297e9(0x23b)],this[_0x4297e9(0x3fc)],this['_handler']);}}return _0x3d64e0['_updateLocalCache'](),_0x3d64e0;}catch(_0x5926c1){return this[_0x4297e9(0x396)][_0x4297e9(0x420)](_0x4297e9(0x197),_0x4297e9(0x1b4),_0x5926c1),this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](j,this[_0x4297e9(0x23b)],this['type'],this['_awaitingChangeset'],this[_0x4297e9(0x39e)],this[_0x4297e9(0x421)],!0x1);}}['_handleRemoteChangesets'](_0x1fa111){const _0xcd615d=_0x51c992;this[_0xcd615d(0x19d)]();for(let _0x4dd0f5=0x0;_0x4dd0f5<_0x1fa111[_0xcd615d(0x187)];_0x4dd0f5++){let _0x4bb712=_0x1fa111[_0x4dd0f5],_0x5b4d4f=this['_getCurrentRevision']();if(!(_0x4bb712['revision']<=_0x5b4d4f)){if(_0x4bb712[_0xcd615d(0x461)]>_0x5b4d4f+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x4bb712)){this[_0xcd615d(0x1b1)]();continue;}this[_0xcd615d(0x23c)](_0x4bb712),this[_0xcd615d(0x19d)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x4d8623){const _0xcb8d45=_0x51c992;let _0x130e55=_0x4d8623,_0x4024a8=this[_0xcb8d45(0x497)];if(_0x4024a8){let _0x53af4f=this[_0xcb8d45(0x364)][_0xcb8d45(0x475)]([_0x4d8623],[_0x4024a8],!0x1);if(!(0x0,e[_0xcb8d45(0x3ec)])(_0x53af4f))throw _0x53af4f[_0xcb8d45(0x420)];_0x130e55=_0x53af4f['c1Prime'][0x0],_0x4024a8=_0x53af4f[_0xcb8d45(0x27b)][0x0];}let _0x46f292=this['_pendingMutations'];if(_0x46f292['length']){let _0x36b9b2=this['_transformService'][_0xcb8d45(0x262)](_0x130e55,_0x46f292);if(!(0x0,e[_0xcb8d45(0x21b)])(_0x36b9b2))throw _0x36b9b2['error'];_0x130e55=_0x36b9b2[_0xcb8d45(0x3c6)],_0x46f292=_0x36b9b2[_0xcb8d45(0x1d1)];}this[_0xcb8d45(0x1a0)](_0x130e55),_0x4024a8&&(_0x4024a8['baseRev']=this['_getCurrentRevision']()),this['_awaitingChangeset']=_0x4024a8,this['_pendingMutations']=_0x46f292;}['_acknowledgeAwaitingIfReady'](){const _0x381aca=_0x51c992;if(!this['_awaitingChangeset']||this['_acknowledgedAwaitingRevision']==null)return;let _0x5ef4ef=this[_0x381aca(0x2a1)]();if(this['_acknowledgedAwaitingRevision']<=_0x5ef4ef)throw Error(_0x381aca(0x438)+this['_acknowledgedAwaitingRevision']+'.');this[_0x381aca(0x38c)]===_0x5ef4ef+0x1&&this['_acknowledgeAwaiting']();}[_0x51c992(0x1b1)](){const _0x2a257b=_0x51c992;this['_incrementRevisionNumber'](),this['_awaitingChangeset']=null,this[_0x2a257b(0x38c)]=null;}[_0x51c992(0x446)](_0x10dcdd){const _0x4ec41c=_0x51c992;let _0x105d01=this[_0x4ec41c(0x497)];return!_0x105d01||!_0x105d01[_0x4ec41c(0x1ac)]||_0x105d01[_0x4ec41c(0x224)]===null||_0x105d01[_0x4ec41c(0x224)]===void 0x0?!0x1:_0x10dcdd['unitID']===_0x105d01[_0x4ec41c(0x23b)]&&_0x10dcdd[_0x4ec41c(0x1ac)]===_0x105d01['sid']&&_0x10dcdd[_0x4ec41c(0x224)]===_0x105d01['reqId'];}[_0x51c992(0x3d0)](){const _0x4589a6=_0x51c992;throw Error(_0x4589a6(0x31d));}[_0x51c992(0x35c)](_0x24dd7e){const _0x122855=_0x51c992;return this[_0x122855(0x39e)][_0x122855(0x499)](_0x24dd7e),this;}[_0x51c992(0x43e)](_0x3ada0c){return this['_queuedRemoteChangesets']['push'](_0x3ada0c),this;}[_0x51c992(0x458)](_0x4a55b6){const _0x15379a=_0x51c992;if(this[_0x15379a(0x497)]){let _0x322bfd=this[_0x15379a(0x2a1)]();return _0x4a55b6[_0x15379a(0x461)]<=_0x322bfd||(_0x322bfd+0x1===_0x4a55b6[_0x15379a(0x461)]?(this['_incrementRevisionNumber'](),this[_0x15379a(0x497)]=null,this[_0x15379a(0x38c)]=null):this[_0x15379a(0x38c)]=_0x4a55b6[_0x15379a(0x461)]),this;}if(_0x4a55b6[_0x15379a(0x461)]<=this[_0x15379a(0x2a1)]())return this;throw Error(_0x15379a(0x48e));}[_0x51c992(0x44e)](_0x5dc207){const _0x1ee985=_0x51c992;return this[_0x1ee985(0x1f5)](!!(_0x5dc207!=null&&_0x5dc207[_0x1ee985(0x360)]));}['onRemoteRetry'](){return this;}[_0x51c992(0x38e)](){const _0x1710d6=_0x51c992;return this['_injector'][_0x1710d6(0x3fb)](M,this[_0x1710d6(0x23b)],this[_0x1710d6(0x3fc)],this[_0x1710d6(0x497)],this[_0x1710d6(0x39e)],this[_0x1710d6(0x421)]);}[_0x51c992(0x302)](){return this;}[_0x51c992(0x1f5)](_0x2bf965){const _0x321559=_0x51c992;return this[_0x321559(0x4a1)][_0x321559(0x3fb)](j,this['unitID'],this[_0x321559(0x3fc)],this['_awaitingChangeset'],this[_0x321559(0x39e)],this[_0x321559(0x421)],_0x2bf965);}};N=y([v(0x7,(0x0,t['Inject'])(t['Injector'])),v(0x8,(0x0,t[_0x51c992(0x1ba)])(e['RevisionService'])),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t['IUndoRedoService']),v(0xc,e[_0x51c992(0x354)]),v(0xd,(0x0,t['Optional'])(x))],N);function Ue(_0x56c24b,_0x82daf5,_0x5974c4,_0x222a1f,_0x176f30,_0x594494){const _0x5504bc=_0x51c992;return _0x222a1f&&_0x176f30[_0x5504bc(0x187)]?_0x56c24b[_0x5504bc(0x3fb)](A,_0x82daf5,_0x5974c4,_0x222a1f,_0x176f30,_0x594494,void 0x0):_0x222a1f?_0x56c24b[_0x5504bc(0x3fb)](k,_0x82daf5,_0x5974c4,_0x222a1f,_0x594494):_0x176f30['length']?_0x56c24b[_0x5504bc(0x3fb)](O,_0x82daf5,_0x5974c4,_0x176f30,_0x594494):_0x56c24b[_0x5504bc(0x3fb)](D,_0x82daf5,_0x5974c4,_0x594494);}let P=class extends t[_0x51c992(0x251)]{get['state'](){return this['_state'];}constructor(_0x3a421f,_0x4c19b4,_0x56b4d0,_0x26a6f0,_0xafed40,_0xc0cf92,_0x5a221a,_0x4d307e,_0x24506f,_0x1eccdb,_0x5cad82,_0x5f0e37,_0x567a7b,_0x34324a){const _0x4c04f0=_0x51c992;super(),this[_0x4c04f0(0x23b)]=_0x3a421f,this[_0x4c04f0(0x432)]=_0x4c19b4,this[_0x4c04f0(0x301)]=_0x56b4d0,this[_0x4c04f0(0x4a1)]=_0x26a6f0,this[_0x4c04f0(0x402)]=_0xafed40,this[_0x4c04f0(0x3d5)]=_0xc0cf92,this['_revisionService']=_0x5a221a,this['_eventService']=_0x4d307e,this[_0x4c04f0(0x322)]=_0x24506f,this['_logService']=_0x1eccdb,this[_0x4c04f0(0x3e4)]=_0x5cad82,this[_0x4c04f0(0x1ab)]=_0x5f0e37,this[_0x4c04f0(0x2b1)]=_0x567a7b,this[_0x4c04f0(0x451)]=_0x34324a,g(this,_0x4c04f0(0x435),new i[(_0x4c04f0(0x3f2))](null)),g(this,'state$',this[_0x4c04f0(0x435)][_0x4c04f0(0x3e3)]()),g(this,'_state',void 0x0),g(this,_0x4c04f0(0x344),!0x1),g(this,_0x4c04f0(0x3ba),''),g(this,_0x4c04f0(0x494),0x0),g(this,_0x4c04f0(0x434),this['state$'][_0x4c04f0(0x3a2)]((0x0,i['map'])(_0x143a08=>_0x143a08?_0x143a08[_0x4c04f0(0x456)]:_0x4c04f0(0x293)),(0x0,i[_0x4c04f0(0x1f9)])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x4c04f0(0x462),!0x1),g(this,_0x4c04f0(0x430),[]);}async[_0x51c992(0x2b6)](){const _0x563df0=_0x51c992;if(this[_0x563df0(0x206)])throw Error(_0x563df0(0x47f));await this[_0x563df0(0x223)]();}[_0x51c992(0x376)](){const _0x3d16f1=_0x51c992;return this[_0x3d16f1(0x344)]=!0x0,(0x0,t[_0x3d16f1(0x42e)])(()=>{const _0x2ae6d1=_0x3d16f1;this[_0x2ae6d1(0x344)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x51c992(0x1f6)](_0x3f36eb){const _0x1287f7=_0x51c992;this[_0x1287f7(0x1cc)](_0x3f36eb);}[_0x51c992(0x21c)](_0x4f942b){const _0x3b70b4=_0x51c992;this[_0x3b70b4(0x2bd)]=_0x4f942b,this[_0x3b70b4(0x435)][_0x3b70b4(0x443)](_0x4f942b);}async[_0x51c992(0x223)](){const _0x1aae5b=_0x51c992;if(this[_0x1aae5b(0x21c)](await this[_0x1aae5b(0x383)]()),this[_0x1aae5b(0x2b1)]){var _0x5a6725;(_0x5a6725=this['_singleActiveUnitService'])==null||_0x5a6725[_0x1aae5b(0x2db)](this[_0x1aae5b(0x23b)]),this[_0x1aae5b(0x2d7)](this[_0x1aae5b(0x2b1)]['getUnitStatus$'](this[_0x1aae5b(0x23b)])['subscribe'](_0x64935a=>{const _0x493c73=_0x1aae5b;this[_0x493c73(0x396)][_0x493c73(0x440)](_0x493c73(0x2b5),_0x493c73(0x4af),_0x64935a),_0x64935a===0x1?(this['_eventService'][_0x493c73(0x3e8)]({'id':'OTHER_CLIENT_EDITING'}),this['_permissionService'][_0x493c73(0x17f)](new r['WorkbookEditablePermission'](this[_0x493c73(0x23b)])['id'],!0x1),this[_0x493c73(0x1ab)][_0x493c73(0x427)](!0x1)):(this[_0x493c73(0x1ab)][_0x493c73(0x17f)](new r[(_0x493c73(0x457))](this['unitID'])['id'],!0x0),this[_0x493c73(0x1ab)][_0x493c73(0x427)](!0x0));}));}let _0x56b66b=!0x1;return this['disposeWithMe'](this[_0x1aae5b(0x432)][_0x1aae5b(0x2e0)][_0x1aae5b(0x481)](_0x5d400c=>{const _0x1d445c=_0x1aae5b;_0x5d400c===0x3?this[_0x1d445c(0x25d)](_0x56b66b):_0x5d400c===0x2&&(_0x56b66b=!0x0,this[_0x1d445c(0x3cd)]());})),this[_0x1aae5b(0x2d7)](this[_0x1aae5b(0x432)][_0x1aae5b(0x40b)]['subscribe'](_0x56431e=>{const _0x10b766=_0x1aae5b;try{switch(_0x56431e[_0x10b766(0x309)]){case e[_0x10b766(0x496)]['NEW_CHANGESETS']:this[_0x10b766(0x326)]((0x0,e['parseProtocolChangeset'])(_0x56431e[_0x10b766(0x2e1)]));break;case e[_0x10b766(0x496)]['CHANGESET_ACK']:this[_0x10b766(0x1fe)](_0x56431e[_0x10b766(0x2e1)]);break;case e[_0x10b766(0x496)][_0x10b766(0x463)]:this['_onRemoteRejected']();break;case e[_0x10b766(0x496)][_0x10b766(0x2cd)]:this[_0x10b766(0x37d)](_0x56431e[_0x10b766(0x2e1)]);break;case e['CollaborationEvent']['PSEUDO_FETCH_MISSING_RESULT']:this[_0x10b766(0x47b)](_0x56431e[_0x10b766(0x2e1)][_0x10b766(0x1b9)][_0x10b766(0x231)](_0x16d9e3=>(0x0,e[_0x10b766(0x3a5)])(_0x16d9e3)));break;case e['CollaborationEvent']['PERMISSION_REJ']:this[_0x10b766(0x3b1)]({'isPermissionRej':!0x0});break;case e['CollaborationEvent'][_0x10b766(0x3dd)]:}}catch(_0x2a5428){throw console[_0x10b766(0x420)]('Error\x20on\x20receiving\x20event',_0x2a5428),_0x2a5428;}})),this[_0x1aae5b(0x2bd)];}[_0x51c992(0x46c)](){this['_transitionLocked']=!0x1;}[_0x51c992(0x31c)](){const _0x369d9b=_0x51c992;if(this[_0x369d9b(0x462)])throw Error(_0x369d9b(0x1fd));this[_0x369d9b(0x462)]=!0x0;}['_onLocalMutation'](_0x2e3a6d){const _0x3aa625=_0x51c992;this[_0x3aa625(0x31c)](),this[_0x3aa625(0x21c)](this[_0x3aa625(0x2bd)][_0x3aa625(0x35c)](_0x2e3a6d)),this[_0x3aa625(0x46c)]();}[_0x51c992(0x326)](_0x1cf938){const _0x1729db=_0x51c992;if(!(_0x1cf938[_0x1729db(0x461)]<=this[_0x1729db(0x23f)][_0x1729db(0x388)](this[_0x1729db(0x23b)]))){if(this[_0x1729db(0x344)]){this[_0x1729db(0x430)][_0x1729db(0x499)](_0x1cf938);return;}this[_0x1729db(0x213)](_0x1cf938);}}[_0x51c992(0x204)](){const _0x598575=_0x51c992;this[_0x598575(0x430)][_0x598575(0x1be)](_0x6d9153=>this[_0x598575(0x213)](_0x6d9153)),this[_0x598575(0x430)]=[];}[_0x51c992(0x213)](_0x18ba61){const _0x1dd471=_0x51c992;let _0x4c2b90=this[_0x1dd471(0x402)][_0x1dd471(0x274)][_0x1dd471(0x210)](this[_0x1dd471(0x402)][_0x1dd471(0x274)]['getInterceptPoints']()[_0x1dd471(0x20d)])(_0x18ba61[_0x1dd471(0x2a2)],null)||_0x18ba61['mutations'],_0x4a59b6={..._0x18ba61,'mutations':_0x4c2b90};this[_0x1dd471(0x31c)](),this['_updateState'](this['_state'][_0x1dd471(0x43e)](_0x4a59b6)),this[_0x1dd471(0x46c)]();}[_0x51c992(0x1fe)](_0xbdc927){const _0xa8ea21=_0x51c992;this[_0xa8ea21(0x31c)](),this[_0xa8ea21(0x21c)](this[_0xa8ea21(0x2bd)][_0xa8ea21(0x458)](_0xbdc927)),this[_0xa8ea21(0x46c)]();}[_0x51c992(0x3b1)](_0x1519db){const _0x284da5=_0x51c992;this['_lockTransition'](),this[_0x284da5(0x21c)](this[_0x284da5(0x2bd)][_0x284da5(0x44e)](_0x1519db)),this[_0x284da5(0x46c)]();}[_0x51c992(0x37d)](_0x33dbc8){const _0x32f1e8=_0x51c992;this[_0x32f1e8(0x31c)](),this[_0x32f1e8(0x21c)](this[_0x32f1e8(0x2bd)][_0x32f1e8(0x221)](_0x33dbc8)),this['_unlockTransition']();}[_0x51c992(0x47b)](_0x5c6a04){const _0x3be0c5=_0x51c992;if(!(this[_0x3be0c5(0x2bd)]instanceof N))throw TypeError(_0x3be0c5(0x23d));let _0x19294f=_0x5c6a04[_0x3be0c5(0x231)](_0x1c8898=>{const _0x1fa1b7=_0x3be0c5;let _0x211117=this[_0x1fa1b7(0x402)][_0x1fa1b7(0x274)][_0x1fa1b7(0x210)](this['_compressMutationService'][_0x1fa1b7(0x274)][_0x1fa1b7(0x2fe)]()[_0x1fa1b7(0x20d)])(_0x1c8898['mutations'],null)||_0x1c8898['mutations'];return{..._0x1c8898,'mutations':_0x211117};});this[_0x3be0c5(0x31c)](),this[_0x3be0c5(0x21c)](this[_0x3be0c5(0x2bd)][_0x3be0c5(0x3b2)](_0x19294f)),this[_0x3be0c5(0x46c)]();}['_toggleOffline'](){const _0xa7d5d6=_0x51c992;this['_lockTransition'](),this[_0xa7d5d6(0x21c)](this['_state'][_0xa7d5d6(0x38e)]()),this[_0xa7d5d6(0x46c)]();}[_0x51c992(0x25d)](_0x13856b=!0x1){const _0x1628fe=_0x51c992;this[_0x1628fe(0x31c)](),this[_0x1628fe(0x21c)](this[_0x1628fe(0x2bd)][_0x1628fe(0x302)]()),this[_0x1628fe(0x46c)]();let _0x2e1376=this[_0x1628fe(0x2bd)];_0x13856b&&_0x2e1376 instanceof D&&(this[_0x1628fe(0x31c)](),this[_0x1628fe(0x21c)](_0x2e1376[_0x1628fe(0x4a4)]()),this[_0x1628fe(0x46c)]());}async[_0x51c992(0x383)](){return new Promise(_0x21c790=>{const _0x4e4f82=_0x3ab5;this[_0x4e4f82(0x432)][_0x4e4f82(0x2e0)][_0x4e4f82(0x3a2)]((0x0,i[_0x4e4f82(0x1e3)])(0x1))[_0x4e4f82(0x481)](async _0x505ce6=>{const _0x1f4e34=_0x4e4f82;_0x21c790(await this[_0x1f4e34(0x295)](_0x505ce6===0x3));});});}[_0x51c992(0x31f)](){let _0x1af68a=this['unitID'];return{'onStateChange':(_0x3a789c,_0x4f44df)=>{const _0x1148db=_0x3ab5;if(_0x3a789c!==this[_0x1148db(0x2bd)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x3a789c[_0x1148db(0x456)]+_0x1148db(0x3ca)+_0x4f44df['status']+_0x1148db(0x467)+this[_0x1148db(0x2bd)]['status']);this['_updateState'](_0x4f44df);},'onSendChangeset':_0x1e1321=>{const _0x5e50e5=_0x3ab5;_0x1e1321[_0x5e50e5(0x1ac)]||(_0x1e1321[_0x5e50e5(0x1ac)]=this[_0x5e50e5(0x3ba)],_0x1e1321[_0x5e50e5(0x224)]=++this['_changesetReqId']);let _0x53e3df={'eventID':e[_0x5e50e5(0x496)][_0x5e50e5(0x1de)],'data':{'unitID':_0x1e1321[_0x5e50e5(0x23b)],'unitType':this[_0x5e50e5(0x301)],'changeset':_0x1e1321,'memberID':this[_0x5e50e5(0x432)][_0x5e50e5(0x30d)]()}};this[_0x5e50e5(0x432)]['send'](_0x53e3df,this['unitID']);},'onMissingChangesets':({from:_0x289a6f,to:_0x1661a8})=>{const _0x24962e=_0x3ab5;this[_0x24962e(0x396)]['debug'](_0x24962e(0x2b5),_0x24962e(0x23e)+_0x289a6f+'\x20to\x20'+_0x1661a8);let _0x525bad={'eventID':e[_0x24962e(0x496)][_0x24962e(0x340)],'data':{'unitID':_0x1af68a,'unitType':this[_0x24962e(0x301)],'from':_0x289a6f,'to':_0x1661a8}};this['session'][_0x24962e(0x2a9)](_0x525bad,this[_0x24962e(0x23b)]);}};}async[_0x51c992(0x295)](_0x47db5a){const _0x11041a=_0x51c992;var _0x24194e;let _0x1cf1d7=await((_0x24194e=this[_0x11041a(0x451)])==null?void 0x0:_0x24194e[_0x11041a(0x30a)](this[_0x11041a(0x23b)])),_0x2bcd5e=(_0x1cf1d7==null?void 0x0:_0x1cf1d7[_0x11041a(0x2a2)])??[],_0x4b6841=(_0x1cf1d7==null?void 0x0:_0x1cf1d7[_0x11041a(0x3f8)])??null,_0xc51812=!!(_0x4b6841!=null&&_0x4b6841['sid'])&&!!(_0x4b6841!=null&&_0x4b6841[_0x11041a(0x224)]);this[_0x11041a(0x3ba)]=_0xc51812?_0x4b6841[_0x11041a(0x1ac)]:(0x0,e['uuidv4'])(),this[_0x11041a(0x494)]=_0xc51812?_0x4b6841[_0x11041a(0x224)]:0x0;let _0x4604ba=this[_0x11041a(0x23b)];try{this[_0x11041a(0x1b3)](_0x4b6841,_0x2bcd5e);}catch(_0x52b838){this[_0x11041a(0x396)][_0x11041a(0x420)](_0x52b838);}let _0x2dbe45=this[_0x11041a(0x31f)]();if(_0x47db5a){let _0x426479=Ue(this[_0x11041a(0x4a1)],_0x4604ba,this['_type'],_0x4b6841,_0x2bcd5e,_0x2dbe45);return _0x426479 instanceof O?_0x426479['_schedule']():(_0x426479 instanceof A||_0x426479 instanceof k)&&_0x426479[_0x11041a(0x3d0)](),_0x426479;}return this['_injector'][_0x11041a(0x3fb)](M,_0x4604ba,this[_0x11041a(0x301)],_0x4b6841,_0x2bcd5e,_0x2dbe45);}['_replayCachedMutations'](_0x2cc63a,_0x259af1){const _0x45a9e1=_0x51c992;var _0x28e2a7,_0x133626;let _0x2055d5=this['_compressMutationService']['interceptor'][_0x45a9e1(0x210)](this['_compressMutationService'][_0x45a9e1(0x274)][_0x45a9e1(0x2fe)]()[_0x45a9e1(0x20d)]);(_0x28e2a7=_0x2055d5((_0x2cc63a==null?void 0x0:_0x2cc63a[_0x45a9e1(0x2a2)])||[],null))==null||_0x28e2a7['forEach'](_0x15f3e2=>this[_0x45a9e1(0x3e4)][_0x45a9e1(0x1f8)](_0x15f3e2['id'],_0x15f3e2[_0x45a9e1(0x2a5)])),(_0x133626=_0x2055d5(_0x259af1||[],null))==null||_0x133626[_0x45a9e1(0x1be)](_0x184bd7=>this[_0x45a9e1(0x3e4)][_0x45a9e1(0x1f8)](_0x184bd7['id'],_0x184bd7[_0x45a9e1(0x2a5)]));}};P=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(t['Injector'])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x51c992(0x291)]),v(0xa,t['ICommandService']),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t[_0x51c992(0x47e)])(C)),v(0xd,(0x0,t['Optional'])(x))],P);let F=class extends P{constructor(_0xa6d2a5,_0x9b71d7,_0x36aca9,_0x31b9a0,_0x164683,_0x2ba182,_0x315963,_0x8812d7,_0x168a5d,_0x178f88,_0x4160c9,_0x25ad35,_0x2547da,_0xd98bb2,_0x56a5dd){const _0x38bd60=_0x51c992;super(_0xa6d2a5,_0x36aca9,_0x9b71d7,_0x31b9a0,_0x164683,_0x2ba182,_0x315963,_0x8812d7,_0x168a5d,_0x178f88,_0x4160c9,_0x25ad35,_0xd98bb2,_0x56a5dd),this[_0x38bd60(0x23b)]=_0xa6d2a5,this[_0x38bd60(0x3fc)]=_0x9b71d7,this[_0x38bd60(0x192)]=_0x2547da,g(this,_0x38bd60(0x40f),null);}[_0x51c992(0x49b)](_0x438fa8){const _0x4fe58c=_0x51c992;this[_0x4fe58c(0x40f)]=_0x438fa8;}[_0x51c992(0x37b)](){const _0x505037=_0x51c992;this[_0x505037(0x40f)]=null,super[_0x505037(0x37b)]();}[_0x51c992(0x31f)](){const _0x12b22e=_0x51c992;let _0x472e0c=super[_0x12b22e(0x31f)]();return _0x472e0c[_0x12b22e(0x4aa)]=_0x36e73b=>{const _0xc6ab8c=_0x12b22e;var _0x98f2dd,_0x34baca;return(_0x98f2dd=this[_0xc6ab8c(0x40f)])==null||(_0x34baca=_0x98f2dd[_0xc6ab8c(0x4aa)])==null?void 0x0:_0x34baca[_0xc6ab8c(0x454)](_0x98f2dd,_0x36e73b);},_0x472e0c['onTransformState']=_0x228cde=>{const _0x92e9d5=_0x12b22e;var _0xb99196,_0x91c330;return(_0xb99196=this[_0x92e9d5(0x40f)])==null||(_0x91c330=_0xb99196[_0x92e9d5(0x33f)])==null?void 0x0:_0x91c330['call'](_0xb99196,_0x228cde);},_0x472e0c[_0x12b22e(0x29c)]=_0x9e1335=>{const _0x2bf898=_0x12b22e;var _0x5203aa,_0x5e1501;return((_0x5203aa=this['_handlerCallback'])==null||(_0x5e1501=_0x5203aa[_0x2bf898(0x29c)])==null?void 0x0:_0x5e1501[_0x2bf898(0x454)](_0x5203aa,_0x9e1335))??null;},_0x472e0c[_0x12b22e(0x2d0)]=_0x2c9792=>{const _0x2fdf35=_0x12b22e;var _0x2487d9,_0x138ac7;return(_0x2487d9=this[_0x2fdf35(0x40f)])==null||(_0x138ac7=_0x2487d9[_0x2fdf35(0x2d0)])==null?void 0x0:_0x138ac7[_0x2fdf35(0x454)](_0x2487d9,_0x2c9792);},_0x472e0c['onSyncEditingCollabCursor']=_0x11b8de=>{const _0x5eaf11=_0x12b22e;var _0x1a4d6a,_0x259f38;return(_0x1a4d6a=this[_0x5eaf11(0x40f)])==null||(_0x259f38=_0x1a4d6a[_0x5eaf11(0x3b4)])==null?void 0x0:_0x259f38[_0x5eaf11(0x454)](_0x1a4d6a,_0x11b8de);},_0x472e0c[_0x12b22e(0x3a8)]=_0x47213e=>{const _0x42c63b=_0x12b22e;var _0x460fa7,_0x27e298;return((_0x460fa7=this[_0x42c63b(0x40f)])==null||(_0x27e298=_0x460fa7[_0x42c63b(0x3a8)])==null?void 0x0:_0x27e298[_0x42c63b(0x454)](_0x460fa7,_0x47213e))??_0x47213e;},_0x472e0c[_0x12b22e(0x196)]=_0x425730=>{const _0x4bf654=_0x12b22e;var _0x30e766,_0x2a0e35;return((_0x30e766=this[_0x4bf654(0x40f)])==null||(_0x2a0e35=_0x30e766[_0x4bf654(0x196)])==null?void 0x0:_0x2a0e35[_0x4bf654(0x454)](_0x30e766,_0x425730))??_0x425730;},_0x472e0c;}async[_0x51c992(0x223)](){const _0x1207a8=_0x51c992;let _0x4a5ec2=await super[_0x1207a8(0x223)]();return this[_0x1207a8(0x2d7)](this[_0x1207a8(0x192)][_0x1207a8(0x195)][_0x1207a8(0x481)](_0x4cd293=>{const _0x5cbacc=_0x1207a8;if(_0x4cd293==null||_0x4cd293[_0x5cbacc(0x44c)]!==this[_0x5cbacc(0x23b)])return;let {commandId:_0x133560,redoState:_0x2b163d,unitId:_0x358171}=_0x4cd293,_0x4c62d7={'id':_0x133560,'type':t[_0x5cbacc(0x283)][_0x5cbacc(0x488)],'params':{'unitId':_0x358171,'actions':_0x2b163d[_0x5cbacc(0x27c)],'textRanges':null}};this[_0x5cbacc(0x1cc)](_0x4c62d7);})),this[_0x1207a8(0x2d7)](this[_0x1207a8(0x3e4)][_0x1207a8(0x1ca)]((_0x479f02,_0x704dd3)=>{const _0xed864=_0x1207a8;if(_0x479f02['type']!==t['CommandType'][_0xed864(0x488)]||_0x704dd3!=null&&_0x704dd3[_0xed864(0x43f)]||_0x704dd3!=null&&_0x704dd3['onlyLocal']||_0x479f02['id']===n[_0xed864(0x27a)]['id'])return;let _0x320190=_0x479f02['params'];if((_0x320190==null?void 0x0:_0x320190[_0xed864(0x44c)])!==this[_0xed864(0x23b)])return;let _0x402211=_0x479f02,_0x5efa99=this[_0xed864(0x402)]['interceptor'][_0xed864(0x210)](this['_compressMutationService'][_0xed864(0x274)][_0xed864(0x2fe)]()[_0xed864(0x41b)])([_0x402211],this[_0xed864(0x322)])||[_0x402211];this[_0xed864(0x1cc)](_0x5efa99[0x0]);})),_0x4a5ec2;}};F=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t[_0x51c992(0x1ba)])(n['DocStateChangeManagerService'])),v(0xd,(0x0,t[_0x51c992(0x47e)])(C)),v(0xe,(0x0,t[_0x51c992(0x47e)])(x))],F);let I=class extends P{constructor(_0x56500a,_0x330b54,_0x3b2090,_0x5909d5,_0x17f023,_0x134557,_0x57e365,_0x4c5c51,_0x44a835,_0x56d048,_0xb9bc3a,_0x4c9d8f,_0x48395b,_0x4b3255){const _0x38897d=_0x51c992;super(_0x56500a,_0x3b2090,_0x330b54,_0x5909d5,_0x17f023,_0x134557,_0x57e365,_0x4c5c51,_0x44a835,_0x56d048,_0xb9bc3a,_0x4c9d8f,_0x48395b,_0x4b3255),this['unitID']=_0x56500a,this[_0x38897d(0x3fc)]=_0x330b54;}async['_init'](){const _0x21d788=_0x51c992;let _0x4c520b=await super[_0x21d788(0x223)]();return this[_0x21d788(0x2d7)](this[_0x21d788(0x3e4)][_0x21d788(0x1ca)]((_0x26fe0d,_0x298b3f)=>{const _0x8dcd71=_0x21d788;if(_0x26fe0d[_0x8dcd71(0x3fc)]!==t[_0x8dcd71(0x283)][_0x8dcd71(0x488)]||_0x298b3f!=null&&_0x298b3f[_0x8dcd71(0x43f)]||_0x298b3f!=null&&_0x298b3f['onlyLocal'])return;let _0x1b30c0=_0x26fe0d['params'];if((_0x1b30c0==null?void 0x0:_0x1b30c0[_0x8dcd71(0x44c)])!==this['unitID'])return;let _0x8f2c3f=_0x26fe0d,_0x368735=this[_0x8dcd71(0x402)][_0x8dcd71(0x274)][_0x8dcd71(0x210)](this[_0x8dcd71(0x402)][_0x8dcd71(0x274)][_0x8dcd71(0x2fe)]()[_0x8dcd71(0x41b)])([_0x8f2c3f],this[_0x8dcd71(0x322)])||[_0x8f2c3f];this[_0x8dcd71(0x1cc)](_0x368735[0x0]);})),_0x4c520b;}};I=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e['CompressMutationService'])),v(0x5,(0x0,t['Inject'])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e[_0x51c992(0x342)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],I);let L=class extends P{constructor(_0x1a95e6,_0x52ff4c,_0x19d3ad,_0x34df9f,_0x530c70,_0x1b7eaf,_0x55ed53,_0x14f1db,_0xaf56bd,_0x5a27a7,_0x1514c3,_0x54e9ed,_0x38121a,_0xf342f9,_0x2c3146){const _0x3a22d1=_0x51c992;super(_0x1a95e6,_0x19d3ad,_0x52ff4c,_0x34df9f,_0x530c70,_0x1b7eaf,_0x55ed53,_0xaf56bd,_0x5a27a7,_0x1514c3,_0x54e9ed,_0x38121a,_0xf342f9,_0x2c3146),this[_0x3a22d1(0x23b)]=_0x1a95e6,this[_0x3a22d1(0x3fc)]=_0x52ff4c,this[_0x3a22d1(0x3e6)]=_0x14f1db;}[_0x51c992(0x31f)](){const _0xeb8d04=_0x51c992;let _0x5b3ad2=super['_createHandler']();return _0x5b3ad2[_0xeb8d04(0x2d0)]=_0x5a9f80=>this[_0xeb8d04(0x3e6)][_0xeb8d04(0x24e)](_0x5a9f80),_0x5b3ad2;}async[_0x51c992(0x223)](){const _0x298e3e=_0x51c992;let _0x62405e=await super[_0x298e3e(0x223)]();return this[_0x298e3e(0x2d7)](this[_0x298e3e(0x3e4)][_0x298e3e(0x1ca)]((_0x46f616,_0x4d3c92)=>{const _0x210659=_0x298e3e;if(_0x46f616[_0x210659(0x3fc)]!==t['CommandType'][_0x210659(0x488)]||_0x4d3c92!=null&&_0x4d3c92[_0x210659(0x43f)]||_0x4d3c92!=null&&_0x4d3c92[_0x210659(0x417)])return;let _0x5c4020=_0x46f616[_0x210659(0x2a5)];if((_0x5c4020==null?void 0x0:_0x5c4020[_0x210659(0x44c)])!==this[_0x210659(0x23b)])return;let _0x1a29df=_0x46f616,_0x357b66=this[_0x210659(0x402)][_0x210659(0x274)][_0x210659(0x210)](this[_0x210659(0x402)][_0x210659(0x274)][_0x210659(0x2fe)]()[_0x210659(0x41b)])([_0x1a29df],this[_0x210659(0x322)])||[_0x1a29df];this[_0x210659(0x1cc)](_0x357b66[0x0]);})),_0x62405e;}};L=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t['Inject'])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e[_0x51c992(0x342)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(S)),v(0x8,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x9,t['IUniverInstanceService']),v(0xa,t['ILogService']),v(0xb,t[_0x51c992(0x48c)]),v(0xc,t[_0x51c992(0x255)]),v(0xd,(0x0,t[_0x51c992(0x47e)])(C)),v(0xe,(0x0,t[_0x51c992(0x47e)])(x))],L);let R=class extends P{constructor(_0x4ba393,_0x2c050c,_0x3facce,_0x124d54,_0x18f7d0,_0x2d1794,_0x250655,_0x544f0e,_0x4c35ae,_0x124621,_0x4e34a9,_0x28acb4,_0x52fd80,_0x18c375){const _0xabf747=_0x51c992;super(_0x4ba393,_0x3facce,_0x2c050c,_0x124d54,_0x18f7d0,_0x2d1794,_0x250655,_0x544f0e,_0x4c35ae,_0x124621,_0x4e34a9,_0x28acb4,_0x52fd80,_0x18c375),this[_0xabf747(0x23b)]=_0x4ba393,this[_0xabf747(0x3fc)]=_0x2c050c;}async['_init'](){const _0xac2454=_0x51c992;let _0x5b012b=await super[_0xac2454(0x223)]();return this['disposeWithMe'](this[_0xac2454(0x3e4)][_0xac2454(0x1ca)]((_0x144355,_0x1fbee2)=>{const _0x5b2a1d=_0xac2454;if(_0x144355[_0x5b2a1d(0x3fc)]!==t['CommandType']['MUTATION']||_0x1fbee2!=null&&_0x1fbee2[_0x5b2a1d(0x43f)]||_0x1fbee2!=null&&_0x1fbee2[_0x5b2a1d(0x417)])return;let _0x4625db=_0x144355[_0x5b2a1d(0x2a5)];if((_0x4625db==null?void 0x0:_0x4625db['unitId'])!==this[_0x5b2a1d(0x23b)])return;let _0x1ffba8=_0x144355,_0x122989=this['_compressMutationService'][_0x5b2a1d(0x274)][_0x5b2a1d(0x210)](this[_0x5b2a1d(0x402)][_0x5b2a1d(0x274)]['getInterceptPoints']()[_0x5b2a1d(0x41b)])([_0x1ffba8],this[_0x5b2a1d(0x322)])||[_0x1ffba8];this[_0x5b2a1d(0x1cc)](_0x122989[0x0]);})),_0x5b012b;}};R=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t['LocaleService'])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t[_0x51c992(0x291)]),v(0xa,t['ICommandService']),v(0xb,t['IPermissionService']),v(0xc,(0x0,t[_0x51c992(0x47e)])(C)),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],R);let z=class extends P{constructor(_0x6df323,_0x1cdc87,_0x29c3bf,_0x1ab627,_0x2a4d66,_0x5cb0ee,_0x12d33c,_0x5c2c9c,_0xf5cf0,_0x1bad75,_0x2e6e8f,_0x2b79a0,_0x5a9b76,_0x342304){const _0x300911=_0x51c992;super(_0x6df323,_0x29c3bf,_0x1cdc87,_0x1ab627,_0x2a4d66,_0x5cb0ee,_0x12d33c,_0x5c2c9c,_0xf5cf0,_0x1bad75,_0x2e6e8f,_0x2b79a0,_0x5a9b76,_0x342304),this['unitID']=_0x6df323,this[_0x300911(0x3fc)]=_0x1cdc87;}async[_0x51c992(0x223)](){const _0x394f4b=_0x51c992;let _0x335bb2=await super[_0x394f4b(0x223)]();return this['disposeWithMe'](this[_0x394f4b(0x3e4)][_0x394f4b(0x1ca)]((_0x443cf8,_0x1c2463)=>{const _0x1d32e3=_0x394f4b;if(_0x443cf8[_0x1d32e3(0x3fc)]!==t[_0x1d32e3(0x283)][_0x1d32e3(0x488)]||_0x1c2463!=null&&_0x1c2463[_0x1d32e3(0x43f)]||_0x1c2463!=null&&_0x1c2463[_0x1d32e3(0x417)])return;let _0x42f638=_0x443cf8['params'];if((_0x42f638==null?void 0x0:_0x42f638['unitId'])!==this[_0x1d32e3(0x23b)])return;let _0xcf01ff=_0x443cf8,_0x1bdbd7=this['_compressMutationService']['interceptor'][_0x1d32e3(0x210)](this[_0x1d32e3(0x402)]['interceptor'][_0x1d32e3(0x2fe)]()['COMPRESS_MUTATION_SEND'])([_0xcf01ff],this[_0x1d32e3(0x322)])||[_0xcf01ff];this[_0x1d32e3(0x1cc)](_0x1bdbd7[0x0]);})),_0x335bb2;}};z=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t['Inject'])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e[_0x51c992(0x342)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t['Optional'])(x))],z);let B=class extends P{constructor(_0x4af697,_0x7ee5e5,_0x1d4ad1,_0x39dd5e,_0x2786ef,_0x5776d1,_0x3aef2b,_0x50d545,_0x50a873,_0x357e4a,_0x114bf6,_0x50d231,_0x437091,_0x470eb9){const _0x3dec0d=_0x51c992;super(_0x4af697,_0x1d4ad1,_0x7ee5e5,_0x39dd5e,_0x2786ef,_0x5776d1,_0x3aef2b,_0x50d545,_0x50a873,_0x357e4a,_0x114bf6,_0x50d231,_0x437091,_0x470eb9),this[_0x3dec0d(0x23b)]=_0x4af697,this[_0x3dec0d(0x3fc)]=_0x7ee5e5;}async[_0x51c992(0x223)](){const _0x485434=_0x51c992;let _0x353bad=await super['_init']();return this[_0x485434(0x2d7)](this[_0x485434(0x3e4)]['onMutationExecutedForCollab']((_0x13ae5c,_0x5be509)=>{const _0x490030=_0x485434;if(_0x13ae5c['type']!==t['CommandType'][_0x490030(0x488)]||_0x5be509!=null&&_0x5be509['fromCollab']||_0x5be509!=null&&_0x5be509[_0x490030(0x417)])return;let _0xea1c8c=_0x13ae5c[_0x490030(0x2a5)];if((_0xea1c8c==null?void 0x0:_0xea1c8c[_0x490030(0x44c)])!==this[_0x490030(0x23b)])return;let _0x91cac3=_0x13ae5c,_0x54fa9b=this[_0x490030(0x402)]['interceptor']['fetchThroughInterceptors'](this[_0x490030(0x402)]['interceptor'][_0x490030(0x2fe)]()[_0x490030(0x41b)])([_0x91cac3],this[_0x490030(0x322)])||[_0x91cac3];this[_0x490030(0x1cc)](_0x54fa9b[0x0]);})),_0x353bad;}};B=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t['Inject'])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t['LocaleService'])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t['ILogService']),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t['IPermissionService']),v(0xc,(0x0,t[_0x51c992(0x47e)])(C)),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],B);const We=(0x0,t['createIdentifier'])(_0x51c992(0x1f7));function Ge(_0x551367){const _0x42afb3=_0x51c992;let _0x1f371c=_0x551367[_0x42afb3(0x2e1)],_0x2f6993=JSON[_0x42afb3(0x247)](_0x1f371c);switch(_0x2f6993[_0x42afb3(0x19b)]){case a[_0x42afb3(0x399)]['HEARTBEAT']:case a['CombCmd'][_0x42afb3(0x1e7)]:{let _0x403bdf=_0x2f6993['infoRsp'];return{..._0x2f6993,'data':_0x403bdf,'cmd':_0x2f6993[_0x42afb3(0x19b)]};}case a[_0x42afb3(0x399)][_0x42afb3(0x1af)]:{let _0x3dc1fb=_0x2f6993[_0x42afb3(0x424)];return{..._0x2f6993,'data':_0x3dc1fb,'cmd':_0x2f6993['cmd']};}case a[_0x42afb3(0x399)]['RECV']:{let _0x350c65=_0x2f6993[_0x42afb3(0x2c7)];switch(_0x350c65[_0x42afb3(0x309)]){case e[_0x42afb3(0x496)][_0x42afb3(0x39f)]:var _0x2cad05;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x2cad05=_0x350c65[_0x42afb3(0x3ee)])==null?void 0x0:_0x2cad05['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['CHANGESET_ACK']:var _0x5e8ed4;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x5e8ed4=_0x350c65[_0x42afb3(0x2f6)])==null?void 0x0:_0x5e8ed4['cs']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)][_0x42afb3(0x319)]:var _0x4b7599;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x4b7599=_0x350c65['newCsEvent'])==null?void 0x0:_0x4b7599['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x463)]:var _0x36f9cc;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x36f9cc=_0x350c65[_0x42afb3(0x473)])==null?void 0x0:_0x36f9cc['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x2cd)]:var _0x304c81;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x304c81=_0x350c65['csShouldRetryEvent'])==null?void 0x0:_0x304c81['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x476)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x3dc)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['USERS_ENTER']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x1bb)]},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['USERS_LEAVE']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x256)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x4a6)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x182)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x21a)]:case e[_0x42afb3(0x496)][_0x42afb3(0x3db)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x368)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['LIVESHARE_TERMINATE']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['liveShareNewHost']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['MSG_FOR_ERROR']:return{..._0x2f6993,'data':_0x350c65,'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['COMMENT_UPDATE']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x3d1)]},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)][_0x42afb3(0x4a5)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['updatePermissionObjEvent']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['SHOULD_CLOSE_CONN']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['shouldCloseConn']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['UNISCRIPT_RUN']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['uniscriptRunEvent']},'cmd':_0x2f6993['cmd']};default:return _0x2f6993;}}default:return _0x2f6993;}}function Ke(_0x1386af){const _0x12294a=_0x51c992;switch(_0x1386af[_0x12294a(0x19b)]){case a['CombCmd'][_0x12294a(0x311)]:case a['CombCmd'][_0x12294a(0x1e7)]:return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af['routeKey']});case a[_0x12294a(0x399)][_0x12294a(0x37f)]:{let _0x5993ef;switch(_0x1386af['data']['eventID']){case e[_0x12294a(0x496)]['UPDATE_CURSOR']:_0x5993ef={'eventID':e['CollaborationEvent']['UPDATE_CURSOR'],'updateCursorEvent':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e['CollaborationEvent'][_0x12294a(0x34e)]:_0x5993ef={'eventID':e[_0x12294a(0x496)]['USERS_LEAVE'],'leaveEvent':_0x1386af['data'][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)][_0x12294a(0x2c2)]:_0x5993ef={'eventID':e['CollaborationEvent'][_0x12294a(0x2c2)],'joinEvent':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)][_0x12294a(0x4a6)]:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x4a6)],'liveShareNewHost':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)]['LIVESHARE_OPERATION']:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x3db)],'liveShareOperation':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)]['LIVESHARE_TERMINATE']:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x252)],'liveShareTerminate':_0x1386af[_0x12294a(0x2e1)]['data']};break;case e[_0x12294a(0x496)][_0x12294a(0x282)]:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x282)],'liveShareRequestHost':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e['CollaborationEvent'][_0x12294a(0x21a)]:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x21a)]};break;default:_0x5993ef={'eventID':_0x1386af['data'][_0x12294a(0x309)]};}return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af[_0x12294a(0x308)],'collaMsg':_0x5993ef});}case a[_0x12294a(0x399)][_0x12294a(0x1af)]:return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af[_0x12294a(0x308)],'joinReq':_0x1386af[_0x12294a(0x2e1)]});case a[_0x12294a(0x399)][_0x12294a(0x442)]:return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af['routeKey'],'leaveReq':_0x1386af[_0x12294a(0x2e1)]});default:throw Error(_0x12294a(0x298));}}const qe=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x33e));function Je(_0x204d6f,_0x2c37ba,_0x2641ba){const _0x2254b2=_0x51c992;return _0x204d6f+'/'+_0x2c37ba+_0x2254b2(0x198)+_0x2641ba+_0x2254b2(0x385);}let Ye=class extends t[_0x51c992(0x3ac)]{constructor(_0x138473,_0x2e5708,_0x54763c,_0x40127f,_0x1de40e){const _0x24379c=_0x51c992;super(),this[_0x24379c(0x4a1)]=_0x138473,this['_httpService']=_0x2e5708,this['_configService']=_0x54763c,this[_0x24379c(0x396)]=_0x40127f,this['_snapshotServerService']=_0x1de40e;}['_doCreateSocket'](_0x62b799){const _0x26db32=_0x51c992;let _0x5d8c73=this[_0x26db32(0x4a1)][_0x26db32(0x403)](l[_0x26db32(0x3c9)]);if(!_0x5d8c73)throw Error(_0x26db32(0x36e));let _0x269e56=_0x5d8c73[_0x26db32(0x3cf)](_0x62b799);if(!_0x269e56)throw Error(_0x26db32(0x34a));let _0x4e7b5b=new t[(_0x26db32(0x3f1))](),_0xdc7753=new i[(_0x26db32(0x29d))]();_0x4e7b5b[_0x26db32(0x45a)](_0x269e56[_0x26db32(0x245)]['subscribe'](_0x1b9ceb=>_0xdc7753[_0x26db32(0x443)](_0x1b9ceb))),_0x4e7b5b['add']((0x0,t[_0x26db32(0x42e)])(()=>_0xdc7753['complete']()));let _0x25fdda=new i[(_0x26db32(0x29d))]();_0x4e7b5b[_0x26db32(0x45a)](_0x269e56[_0x26db32(0x38b)]['subscribe'](_0x4ea30a=>_0x25fdda[_0x26db32(0x443)](_0x4ea30a))),_0x4e7b5b[_0x26db32(0x45a)]((0x0,t[_0x26db32(0x42e)])(()=>_0x25fdda[_0x26db32(0x3a9)]()));let _0x4ee658=new i[(_0x26db32(0x29d))]();_0x4e7b5b[_0x26db32(0x45a)](_0x269e56[_0x26db32(0x194)][_0x26db32(0x481)](_0x3c3cfe=>{let _0x174d08=Ge(_0x3c3cfe);_0x4ee658['next'](_0x174d08);})),_0x4e7b5b[_0x26db32(0x45a)]((0x0,t['toDisposable'])(()=>_0x4ee658['complete']()));let _0x3f6e35,_0x25a264=()=>{const _0x4445f9=_0x26db32;_0x25fdda[_0x4445f9(0x443)](new Event(_0x4445f9(0x288))),_0xdc7753[_0x4445f9(0x443)](new Event('connection\x20error')),_0x3f6e35[_0x4445f9(0x35f)]();};return _0x3f6e35={'memberID':'','close$':_0xdc7753[_0x26db32(0x3e3)](),'error$':_0x25fdda[_0x26db32(0x3e3)](),'open$':_0x269e56['open$'],'message$':_0x4ee658[_0x26db32(0x3e3)](),'send':_0x4fd21a=>{const _0x5cf6c0=_0x26db32;if(_0x4fd21a['cmd']===a[_0x5cf6c0(0x399)][_0x5cf6c0(0x37f)]){if(_0x4fd21a[_0x5cf6c0(0x2e1)][_0x5cf6c0(0x309)]===e['CollaborationEvent']['SUBMIT_CHANGESET']){this[_0x5cf6c0(0x30e)](_0x3f6e35,_0x4fd21a[_0x5cf6c0(0x2e1)])[_0x5cf6c0(0x397)](_0x3d6203=>{this['_logService']['error'](_0x3d6203),_0x25a264();});return;}if(_0x4fd21a['data'][_0x5cf6c0(0x309)]===e[_0x5cf6c0(0x496)][_0x5cf6c0(0x340)]){let _0x4e255b=_0x4fd21a[_0x5cf6c0(0x2e1)];this[_0x5cf6c0(0x405)](_0x4e255b)[_0x5cf6c0(0x22e)](_0x1fe412=>{const _0x344c20=_0x5cf6c0;_0x4ee658[_0x344c20(0x443)]({'cmd':a[_0x344c20(0x399)][_0x344c20(0x3ce)],'code':a[_0x344c20(0x28c)]['OK'],'routeKey':_0x4e255b[_0x344c20(0x2e1)]['unitID'],'routeType':'','data':{'eventID':e[_0x344c20(0x496)][_0x344c20(0x40a)],'data':{'changesets':_0x1fe412}}});})[_0x5cf6c0(0x397)](_0x5352f8=>{const _0x43ae87=_0x5cf6c0;this[_0x43ae87(0x396)][_0x43ae87(0x420)](_0x5352f8),_0x25a264();});return;}}_0x269e56[_0x5cf6c0(0x2a9)](Ke(_0x4fd21a));},'close':()=>{const _0xf3753a=_0x26db32;_0x269e56[_0xf3753a(0x35f)](),_0x4e7b5b[_0xf3753a(0x37b)]();}},_0x3f6e35;}async['_submitChangeset'](_0x53f117,_0x23343c){const _0x18a059=_0x51c992;let {unitType:_0xa4aeb,unitID:_0x1fdc39,changeset:_0x308564}=_0x23343c[_0x18a059(0x2e1)],_0x34ad8b={'unitID':_0x1fdc39,'memberID':_0x53f117[_0x18a059(0x44a)],'type':_0xa4aeb,'changeset':(0x0,e[_0x18a059(0x225)])(_0x308564)},_0x1518c5=this[_0x18a059(0x214)]['getConfig'](m),_0x1e8626=Je((_0x1518c5==null?void 0x0:_0x1518c5['collabSubmitChangesetUrl'])??'/universer-api/comb',_0xa4aeb,_0x1fdc39);try{await this[_0x18a059(0x22f)][_0x18a059(0x484)](_0x1e8626,{'body':_0x34ad8b});}catch(_0x2edbb1){throw this[_0x18a059(0x396)][_0x18a059(0x420)](_0x18a059(0x1d7),_0x18a059(0x394)),_0x2edbb1;}}async['_fetchMissChangesets'](_0x2d631a){const _0x3a3806=_0x51c992;let {unitID:_0x2c4585,from:_0x37778b,to:_0x5c77c0,unitType:_0x4d1b27}=_0x2d631a['data'];return(await this[_0x3a3806(0x1d8)][_0x3a3806(0x45f)]({'metadata':void 0x0},{'unitID':_0x2c4585,'type':_0x4d1b27,'from':_0x37778b,'to':_0x5c77c0}))['changesets'][_0x3a3806(0x231)](_0x47727f=>((_0x47727f[_0x3a3806(0x2a2)]===null||_0x47727f['mutations']===void 0x0)&&(_0x47727f[_0x3a3806(0x2a2)]=[]),_0x47727f));}};Ye=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x1,(0x0,t['Inject'])(l[_0x51c992(0x492)])),v(0x2,t['IConfigService']),v(0x3,t[_0x51c992(0x291)]),v(0x4,e[_0x51c992(0x43c)])],Ye);const Xe=(0x0,t[_0x51c992(0x2e3)])('univer-pro.collaboration-client-adapter-service');function Ze(_0x4b12a8={}){const _0x1b9554=_0x51c992;return _0x4b12a8['resolveUnit']?{'resolveUnit':_0x4b12a8[_0x1b9554(0x320)]}:{'resolveUnit':_0x409f45=>({'target':{'unitId':_0x409f45[_0x1b9554(0x44c)],'unitType':_0x409f45[_0x1b9554(0x19c)]}})};}function Qe(_0x6ebaab,_0x9749cf,_0x2c8406){const _0x52f59a=_0x51c992;let _0x4f3dd1=_0x2c8406[_0x52f59a(0x280)][_0x52f59a(0x2ee)];if(_0x4f3dd1!=null&&_0x4f3dd1[_0x52f59a(0x21d)]()==='')throw Error(_0x52f59a(0x464));if(!_0x2c8406[_0x52f59a(0x280)]['unitId'])throw Error(_0x52f59a(0x2ce));return{'localUnitId':_0x6ebaab,'unitType':_0x9749cf,'target':{'endpoint':_0x4f3dd1,'unitId':_0x2c8406[_0x52f59a(0x280)][_0x52f59a(0x44c)],'unitType':_0x2c8406[_0x52f59a(0x280)][_0x52f59a(0x19c)]??_0x9749cf},'changeset':_0x2c8406['changeset']};}let V=class extends t[_0x51c992(0x3ac)]{constructor(_0x5159cb,_0x1edb03,_0x2cb815,_0x2b8737,_0x1092a8,_0x94aa78,_0x2f6d87){const _0xfe0df1=_0x51c992;super(),this['_injector']=_0x5159cb,this['_logService']=_0x1edb03,this['_configService']=_0x2cb815,this['_socketService']=_0x2b8737,this[_0xfe0df1(0x2f5)]=_0x1092a8,this[_0xfe0df1(0x272)]=_0x94aa78,this[_0xfe0df1(0x1d9)]=_0x2f6d87,g(this,'_sessions',new Map()),g(this,_0xfe0df1(0x3de),new Map()),g(this,_0xfe0df1(0x276),new Map()),g(this,_0xfe0df1(0x1ec),new Map()),g(this,_0xfe0df1(0x3e5),this[_0xfe0df1(0x3a4)](void 0x0)[_0xfe0df1(0x3e5)][_0xfe0df1(0x3e3)]()),g(this,_0xfe0df1(0x259),new i[(_0xfe0df1(0x3f2))](0x0)),g(this,'status$',this[_0xfe0df1(0x259)][_0xfe0df1(0x3e3)]()),this['_listenToNetworkCondition']();}[_0x51c992(0x4a8)](){const _0x1a1419=_0x51c992;this[_0x1a1419(0x1d9)]&&this[_0x1a1419(0x2d7)](this[_0x1a1419(0x1d9)][_0x1a1419(0x2b9)][_0x1a1419(0x481)](_0x2ee3c1=>{const _0x264104=_0x1a1419;_0x2ee3c1&&this['reconnect'](),_0x2ee3c1||this[_0x264104(0x1ec)][_0x264104(0x1be)](_0x26086e=>this[_0x264104(0x46a)](_0x26086e));}));}[_0x51c992(0x37b)](){const _0x3d90bf=_0x51c992;super[_0x3d90bf(0x37b)](),this['_socketChannels'][_0x3d90bf(0x1be)](_0x562a5b=>{const _0x57efd7=_0x3d90bf;var _0x5b956a,_0x42ca15;(_0x5b956a=_0x562a5b[_0x57efd7(0x3b6)])==null||_0x5b956a['unsubscribe'](),_0x562a5b[_0x57efd7(0x3b6)]=null,this[_0x57efd7(0x26a)](_0x562a5b),this[_0x57efd7(0x49f)](_0x562a5b),this[_0x57efd7(0x1a8)](_0x562a5b),(_0x42ca15=_0x562a5b[_0x57efd7(0x3e5)][_0x57efd7(0x2a8)]())==null||_0x42ca15['close'](),_0x562a5b[_0x57efd7(0x3e5)][_0x57efd7(0x3a9)]();}),this['_socketChannels'][_0x3d90bf(0x47a)](),this[_0x3d90bf(0x1ee)][_0x3d90bf(0x1be)](_0x232663=>_0x232663['dispose']()),this[_0x3d90bf(0x1ee)][_0x3d90bf(0x47a)](),this[_0x3d90bf(0x276)]['clear'](),this[_0x3d90bf(0x259)][_0x3d90bf(0x3a9)]();}async[_0x51c992(0x345)](_0x1e450f,_0x5d1912){const _0x37874e=_0x51c992;if(this[_0x37874e(0x1ee)][_0x37874e(0x2d4)](_0x1e450f))return this[_0x37874e(0x1ee)]['get'](_0x1e450f);let _0x503962=this[_0x37874e(0x3de)][_0x37874e(0x403)](_0x1e450f);if(_0x503962)return _0x503962;let _0x5784f8=this[_0x37874e(0x1f2)](_0x1e450f,_0x5d1912);this['_pendingSessions'][_0x37874e(0x35e)](_0x1e450f,_0x5784f8);try{return await _0x5784f8;}finally{this[_0x37874e(0x3de)][_0x37874e(0x404)](_0x1e450f);}}async[_0x51c992(0x1f2)](_0x3156c0,_0x303bda){const _0x29405e=_0x51c992;let _0x476612=await this[_0x29405e(0x230)](_0x3156c0,_0x303bda),_0x2d26a9=this[_0x29405e(0x3a4)](_0x476612[_0x29405e(0x280)][_0x29405e(0x2ee)]);this[_0x29405e(0x453)](_0x2d26a9);let _0x225c5b=this[_0x29405e(0x4a1)][_0x29405e(0x3fb)](ve,_0x476612,_0x2d26a9[_0x29405e(0x3e5)][_0x29405e(0x3e3)]());return this[_0x29405e(0x1ee)][_0x29405e(0x35e)](_0x3156c0,_0x225c5b),this[_0x29405e(0x276)][_0x29405e(0x35e)](_0x3156c0,_0x2d26a9[_0x29405e(0x41f)]),_0x225c5b;}[_0x51c992(0x2d2)](_0x5f3003){const _0x423b39=_0x51c992;let _0x3867aa=this[_0x423b39(0x1ee)][_0x423b39(0x403)](_0x5f3003),_0x291eda=this[_0x423b39(0x276)][_0x423b39(0x403)](_0x5f3003);if(_0x3867aa&&(this[_0x423b39(0x1ee)][_0x423b39(0x404)](_0x5f3003),this[_0x423b39(0x276)][_0x423b39(0x404)](_0x5f3003),_0x3867aa[_0x423b39(0x35f)]()),_0x291eda&&!this['_hasSessionsForEndpoint'](_0x291eda)){var _0x1a7fea;let _0x32c911=this[_0x423b39(0x1ec)][_0x423b39(0x403)](_0x291eda);_0x32c911==null||(_0x1a7fea=_0x32c911[_0x423b39(0x3e5)][_0x423b39(0x2a8)]())==null||_0x1a7fea[_0x423b39(0x35f)]();}}[_0x51c992(0x1e6)](){const _0x50ffa1=_0x51c992;(this[_0x50ffa1(0x1ec)]['size']?[...this[_0x50ffa1(0x1ec)]['values']()]:[this[_0x50ffa1(0x3a4)](void 0x0)])['forEach'](_0x3843fc=>{const _0x44e8d6=_0x50ffa1;_0x3843fc['retryCount']=0x0,this['_clearRetryConnectingTimer'](_0x3843fc),this[_0x44e8d6(0x336)](_0x3843fc);});}[_0x51c992(0x26a)](_0xecc639){const _0x14e93b=_0x51c992;_0xecc639['retryConnectingTimer']!=null&&(clearTimeout(_0xecc639[_0x14e93b(0x307)]),_0xecc639[_0x14e93b(0x307)]=null);}async[_0x51c992(0x18b)](_0x3d5503){const _0x444638=_0x51c992;let _0x353cc5=this[_0x444638(0x214)][_0x444638(0x310)](m),_0x2d6f88=_0x3d5503['endpoint']??(_0x353cc5==null?void 0x0:_0x353cc5[_0x444638(0x281)])??_0x444638(0x3c5),_0x58c1fe=await this[_0x444638(0x193)][_0x444638(0x3cf)](_0x2d6f88);return _0x3d5503[_0x444638(0x2a4)]=_0x58c1fe,_0x58c1fe;}async[_0x51c992(0x453)](_0x240d01){const _0x133d8b=_0x51c992;try{let _0x430971=_0x240d01[_0x133d8b(0x3e5)][_0x133d8b(0x2a8)]()??_0x240d01['candidateSocket']??await this[_0x133d8b(0x18b)](_0x240d01);if(_0x430971){var _0x39343c;let _0x218de5=_0x430971[_0x133d8b(0x2a9)];_0x430971['send']=_0x169b36=>(_0x169b36[_0x133d8b(0x19b)]!==a[_0x133d8b(0x399)][_0x133d8b(0x442)]&&this[_0x133d8b(0x1b0)](_0x240d01),_0x218de5[_0x133d8b(0x1a9)](_0x430971,[_0x169b36])),(_0x39343c=_0x240d01[_0x133d8b(0x3b6)])==null||_0x39343c[_0x133d8b(0x2df)](),_0x240d01[_0x133d8b(0x3b6)]=null,_0x240d01['socketMessageSubscription']=_0x430971[_0x133d8b(0x194)][_0x133d8b(0x481)](_0x2d79ed=>this['_onMessage'](_0x240d01,_0x430971,_0x2d79ed)),_0x430971[_0x133d8b(0x38b)][_0x133d8b(0x3a2)]((0x0,s[_0x133d8b(0x1e3)])(0x1))[_0x133d8b(0x481)](_0x3906a1=>this['_logService'][_0x133d8b(0x420)]('[CollaborationSessionService]:\x20socket\x20error',_0x3906a1)),_0x430971['open$']['pipe']((0x0,s[_0x133d8b(0x1e3)])(0x1))[_0x133d8b(0x481)](()=>{this['_onConnectionOpen'](_0x240d01,_0x430971);}),_0x430971[_0x133d8b(0x245)][_0x133d8b(0x3a2)]((0x0,s[_0x133d8b(0x1e3)])(0x1))[_0x133d8b(0x481)](_0x5b1708=>{const _0x374499=_0x133d8b;this[_0x374499(0x396)][_0x374499(0x440)](_0x374499(0x48a),'socket\x20close',_0x5b1708),this[_0x374499(0x48b)](_0x240d01);});}}catch(_0x88d9d2){this['_logService'][_0x133d8b(0x420)](_0x88d9d2),this[_0x133d8b(0x48b)](_0x240d01);}}[_0x51c992(0x426)](_0x172964,_0x4094d2){const _0x29b25e=_0x51c992;this[_0x29b25e(0x396)][_0x29b25e(0x440)]('[CollaborationSessionService]',_0x29b25e(0x371)),_0x4094d2[_0x29b25e(0x2a9)]({'cmd':a[_0x29b25e(0x399)][_0x29b25e(0x1e7)]}),this[_0x29b25e(0x1b0)](_0x172964);}['_onOffline'](_0x2b687b){const _0x22eb6a=_0x51c992;_0x2b687b[_0x22eb6a(0x1b2)]=!0x1,_0x2b687b[_0x22eb6a(0x2a4)]=null,this[_0x22eb6a(0x259)]['next'](0x2),_0x2b687b[_0x22eb6a(0x3e5)]['next'](null),this['_clearTimeoutTimer'](_0x2b687b),this['_clearHeartbeatTimer'](_0x2b687b);}[_0x51c992(0x48b)](_0x43b23f){const _0x3498c2=_0x51c992;this[_0x3498c2(0x46a)](_0x43b23f),this['_hasSessionsForEndpoint'](_0x43b23f[_0x3498c2(0x41f)])&&(_0x43b23f['retryCount']<(this[_0x3498c2(0x214)]['getConfig'](_0x3498c2(0x303))??0x3)?(this[_0x3498c2(0x2f5)]['emitEvent']({'id':_0x3498c2(0x43a)}),this[_0x3498c2(0x336)](_0x43b23f)):this[_0x3498c2(0x2f5)][_0x3498c2(0x3e8)]({'id':_0x3498c2(0x1ce)}));}['_tryReconnect'](_0x1d0fbf){const _0x577a8e=_0x51c992;let _0x1ca6dc=_0x1d0fbf[_0x577a8e(0x20f)],_0x586389=this[_0x577a8e(0x214)][_0x577a8e(0x310)](m),_0x217546=_0x1ca6dc===0x0?0x0:((_0x586389==null?void 0x0:_0x586389[_0x577a8e(0x333)])??0x4e20)*0x2**_0x1ca6dc;_0x1d0fbf[_0x577a8e(0x307)]=setTimeout(()=>{const _0x4d9c67=_0x577a8e;clearTimeout(_0x1d0fbf[_0x4d9c67(0x307)]),_0x1d0fbf[_0x4d9c67(0x307)]=null,this[_0x4d9c67(0x453)](_0x1d0fbf);},_0x217546),_0x1d0fbf[_0x577a8e(0x20f)]+=0x1;}async[_0x51c992(0x230)](_0x106e89,_0xb007bd){const _0x8e7b58=_0x51c992;return Qe(_0x106e89,_0xb007bd,await this[_0x8e7b58(0x272)][_0x8e7b58(0x320)]({'unitId':_0x106e89,'unitType':_0xb007bd}));}['_onMessage'](_0x7d23ea,_0x35122a,_0x6d2799){const _0x1594b0=_0x51c992;let {cmd:_0x5a2896}=_0x6d2799;_0x5a2896===a[_0x1594b0(0x399)][_0x1594b0(0x1e7)]&&!_0x7d23ea[_0x1594b0(0x1b2)]&&(_0x35122a[_0x1594b0(0x44a)]=_0x6d2799[_0x1594b0(0x2e1)][_0x1594b0(0x44a)],_0x7d23ea[_0x1594b0(0x20f)]=0x0,_0x7d23ea[_0x1594b0(0x3e5)][_0x1594b0(0x443)](_0x35122a),this['_status$']['next'](0x3),_0x7d23ea[_0x1594b0(0x1b2)]=!0x0,_0x7d23ea[_0x1594b0(0x2a4)]=null),_0x5a2896===a[_0x1594b0(0x399)]['HEARTBEAT']&&this[_0x1594b0(0x49f)](_0x7d23ea),this['_rescheduleHeartbeat'](_0x7d23ea);}[_0x51c992(0x498)](_0x3a5cd8){const _0x3d64da=_0x51c992;return[...this[_0x3d64da(0x276)][_0x3d64da(0x215)]()][_0x3d64da(0x17c)](_0x5b74fa=>_0x5b74fa===_0x3a5cd8);}[_0x51c992(0x3a4)](_0x19a859){const _0x2faf41=_0x51c992;let _0x1f6a63=_0x19a859??'',_0x298556=this[_0x2faf41(0x1ec)][_0x2faf41(0x403)](_0x1f6a63);if(_0x298556)return _0x298556;let _0x507543={'endpointKey':_0x1f6a63,'endpoint':_0x19a859,'socket$':new i[(_0x2faf41(0x3f2))](void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x2faf41(0x1ec)][_0x2faf41(0x35e)](_0x1f6a63,_0x507543),_0x507543;}['_rescheduleHeartbeat'](_0x2e58f1){const _0x4926f6=_0x51c992;this['_clearHeartbeatTimer'](_0x2e58f1),_0x2e58f1['sendHeartbeatTimer']=setTimeout(()=>this['_sendHeartbeat'](_0x2e58f1),this[_0x4926f6(0x214)]['getConfig']('HEARTBEAT_INTERVAL')??0x7530);}[_0x51c992(0x22a)](_0x2c21b8){const _0x3e95b8=_0x51c992;_0x2c21b8[_0x3e95b8(0x3e5)][_0x3e95b8(0x2a8)]()[_0x3e95b8(0x2a9)]({'cmd':a[_0x3e95b8(0x399)][_0x3e95b8(0x311)]}),this[_0x3e95b8(0x209)](_0x2c21b8);}[_0x51c992(0x209)](_0x104fd9){const _0xc93118=_0x51c992;_0x104fd9[_0xc93118(0x20a)]=setTimeout(()=>this[_0xc93118(0x48b)](_0x104fd9),this[_0xc93118(0x214)][_0xc93118(0x310)](_0xc93118(0x240))??0x4e20);}[_0x51c992(0x1a8)](_0x261da3){const _0x50be68=_0x51c992;_0x261da3[_0x50be68(0x428)]!=null&&(clearTimeout(_0x261da3[_0x50be68(0x428)]),_0x261da3['sendHeartbeatTimer']=null);}[_0x51c992(0x49f)](_0x3377b2){const _0x38ff1a=_0x51c992;_0x3377b2[_0x38ff1a(0x20a)]!=null&&(clearTimeout(_0x3377b2[_0x38ff1a(0x20a)]),_0x3377b2[_0x38ff1a(0x20a)]=null);}};V=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t['Injector'])),v(0x1,t[_0x51c992(0x291)]),v(0x2,t['IConfigService']),v(0x3,qe),v(0x4,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x5,Xe),v(0x6,(0x0,t[_0x51c992(0x47e)])(We))],V);let H=class extends t[_0x51c992(0x251)]{constructor(_0x4a50c3,_0xa9cf14,_0x45754b,_0x590ed4){const _0x2a66ba=_0x51c992;var _0x4839eb;super(),this[_0x2a66ba(0x4a1)]=_0x4a50c3,this[_0x2a66ba(0x379)]=_0xa9cf14,this[_0x2a66ba(0x214)]=_0x45754b,this['_univerInstanceService']=_0x590ed4,g(this,_0x2a66ba(0x28a),new Map()),g(this,'_entityInit$',new i[(_0x2a66ba(0x29d))]()),g(this,'entityInit$',this[_0x2a66ba(0x27d)][_0x2a66ba(0x3e3)]()),((_0x4839eb=this['_configService'][_0x2a66ba(0x310)]('collaboration-client.config'))==null?void 0x0:_0x4839eb[_0x2a66ba(0x39a)])!==!0x1&&this['_init']();}[_0x51c992(0x37b)](){const _0x1b361a=_0x51c992;super[_0x1b361a(0x37b)](),this['_entities'][_0x1b361a(0x1be)](_0x10e273=>_0x10e273[_0x1b361a(0x37b)]()),this[_0x1b361a(0x28a)][_0x1b361a(0x47a)]();}['getCollabEntity'](_0x371a5e){const _0x2c8cfb=_0x51c992;return this[_0x2c8cfb(0x28a)][_0x2c8cfb(0x403)](_0x371a5e)??null;}[_0x51c992(0x42b)](_0x5939e9){const _0x330305=_0x51c992;let _0x4f94e3=this[_0x330305(0x1c0)](_0x5939e9);return _0x4f94e3?(0x0,i['of'])(_0x4f94e3):this[_0x330305(0x27d)][_0x330305(0x3a2)]((0x0,s[_0x330305(0x3d8)])(_0x21e873=>_0x21e873[_0x330305(0x23b)]===_0x5939e9));}[_0x51c992(0x29a)](_0x3d0217){const _0x360de9=_0x51c992;return(0x0,i[_0x360de9(0x234)])(this[_0x360de9(0x42b)](_0x3d0217)['pipe']((0x0,s[_0x360de9(0x231)])(()=>void 0x0)));}['_init'](){const _0x506138=_0x51c992;this['_univerInstanceService'][_0x506138(0x389)](t['UniverInstanceType'][_0x506138(0x3f5)])[_0x506138(0x3a2)]((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))['subscribe'](async _0x2afd0c=>{const _0x2f09a6=_0x506138;let _0x3796c0=_0x2afd0c[_0x2f09a6(0x211)][_0x2f09a6(0x1c8)](),_0x35ec15=await this[_0x2f09a6(0x25a)](_0x3796c0,t[_0x2f09a6(0x2b4)][_0x2f09a6(0x3f5)]);this['_entities'][_0x2f09a6(0x35e)](_0x3796c0,_0x35ec15);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)]['UNIVER_DOC'])['pipe']((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))[_0x506138(0x3a2)]((0x0,s[_0x506138(0x3d8)])(_0x291014=>!_0x291014[_0x506138(0x211)]['getUnitId']()['startsWith']('__')))[_0x506138(0x481)](async _0x55479c=>{const _0x54b13c=_0x506138;let _0x2a4189=_0x55479c[_0x54b13c(0x211)][_0x54b13c(0x1c8)](),_0x5e631c=await this[_0x54b13c(0x25a)](_0x2a4189,t['UniverInstanceType'][_0x54b13c(0x47c)]);this['_entities']['set'](_0x2a4189,_0x5e631c);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)][_0x506138(0x439)])[_0x506138(0x3a2)]((0x0,i['takeUntil'])(this[_0x506138(0x257)]),(0x0,s['delay'])(0x10))[_0x506138(0x481)](async _0x301cdc=>{const _0x583d55=_0x506138;let _0x5d5c08=_0x301cdc[_0x583d55(0x211)][_0x583d55(0x1c8)](),_0x14fc82=await this[_0x583d55(0x25a)](_0x5d5c08,t[_0x583d55(0x2b4)][_0x583d55(0x439)]);this[_0x583d55(0x28a)][_0x583d55(0x35e)](_0x5d5c08,_0x14fc82);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)][_0x506138(0x3f3)])['pipe']((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))[_0x506138(0x481)](async _0x1d5746=>{const _0x52156a=_0x506138;let _0x202aef=_0x1d5746[_0x52156a(0x211)][_0x52156a(0x1c8)](),_0x2f64b7=await this[_0x52156a(0x25a)](_0x202aef,t['UniverInstanceType'][_0x52156a(0x3f3)]);this[_0x52156a(0x28a)][_0x52156a(0x35e)](_0x202aef,_0x2f64b7);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)]['UNIVER_BASE'])[_0x506138(0x3a2)]((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s['delay'])(0x10))[_0x506138(0x481)](async _0x32077d=>{const _0x341b3b=_0x506138;let _0x44846a=_0x32077d[_0x341b3b(0x211)][_0x341b3b(0x1c8)](),_0x6436d0=await this[_0x341b3b(0x25a)](_0x44846a,t[_0x341b3b(0x2b4)][_0x341b3b(0x387)]);this[_0x341b3b(0x28a)][_0x341b3b(0x35e)](_0x44846a,_0x6436d0);}),this['_univerInstanceService'][_0x506138(0x389)](t['UniverInstanceType'][_0x506138(0x3eb)])[_0x506138(0x3a2)]((0x0,i['takeUntil'])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))[_0x506138(0x481)](async _0x4aa921=>{const _0x14e353=_0x506138;let _0x41846b=_0x4aa921[_0x14e353(0x211)][_0x14e353(0x1c8)](),_0x57eefd=await this[_0x14e353(0x25a)](_0x41846b,t['UniverInstanceType'][_0x14e353(0x3eb)]);this['_entities'][_0x14e353(0x35e)](_0x41846b,_0x57eefd);}),(0x0,i[_0x506138(0x335)])(this[_0x506138(0x322)][_0x506138(0x29f)](t[_0x506138(0x2b4)][_0x506138(0x3f5)]),this[_0x506138(0x322)][_0x506138(0x29f)](t['UniverInstanceType'][_0x506138(0x47c)]),this[_0x506138(0x322)][_0x506138(0x29f)](t[_0x506138(0x2b4)][_0x506138(0x439)]),this[_0x506138(0x322)][_0x506138(0x29f)](t[_0x506138(0x2b4)][_0x506138(0x3f3)]),this[_0x506138(0x322)]['getTypeOfUnitDisposed$'](t['UniverInstanceType'][_0x506138(0x387)]),this['_univerInstanceService']['getTypeOfUnitDisposed$'](t[_0x506138(0x2b4)]['UNIVER_PDF']))[_0x506138(0x3a2)]((0x0,i['takeUntil'])(this['dispose$']))[_0x506138(0x481)](_0x27da31=>{const _0x1107b1=_0x506138;let _0x29bd0d=_0x27da31[_0x1107b1(0x1c8)](),_0x3dc018=this[_0x1107b1(0x28a)][_0x1107b1(0x403)](_0x29bd0d);_0x3dc018&&(_0x3dc018['dispose'](),this[_0x1107b1(0x28a)]['delete'](_0x29bd0d));});}async[_0x51c992(0x25a)](_0x5eb336,_0x49228c){const _0x20b998=_0x51c992;let _0x560659=await this[_0x20b998(0x379)][_0x20b998(0x345)](_0x5eb336),_0x405e72=this[_0x20b998(0x4a1)][_0x20b998(0x3fb)](this[_0x20b998(0x1f4)](_0x49228c),_0x5eb336,_0x49228c,_0x560659);return await _0x405e72[_0x20b998(0x2b6)](),this[_0x20b998(0x27d)][_0x20b998(0x443)](_0x405e72),_0x405e72;}[_0x51c992(0x1f4)](_0x32e7e1){const _0x3a2f7e=_0x51c992;switch(_0x32e7e1){case t[_0x3a2f7e(0x2b4)][_0x3a2f7e(0x47c)]:return F;case t['UniverInstanceType'][_0x3a2f7e(0x3f5)]:return L;case t[_0x3a2f7e(0x2b4)][_0x3a2f7e(0x439)]:return R;case t['UniverInstanceType'][_0x3a2f7e(0x3f3)]:return z;case t['UniverInstanceType'][_0x3a2f7e(0x387)]:return I;case t[_0x3a2f7e(0x2b4)][_0x3a2f7e(0x3eb)]:return B;default:throw Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x32e7e1);}}};H=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x1,(0x0,t['Inject'])(V)),v(0x2,t[_0x51c992(0x46e)]),v(0x3,t[_0x51c992(0x1dd)])],H);var $e=_0x51c992(0x254),et=_0x51c992(0x287);let tt=class extends t[_0x51c992(0x3ac)]{constructor(_0x502e64,_0x43bb28){const _0x3733ac=_0x51c992;super(),this[_0x3733ac(0x322)]=_0x502e64,this['_configService']=_0x43bb28,this[_0x3733ac(0x223)]();}[_0x51c992(0x223)](){const _0x53d731=_0x51c992;this[_0x53d731(0x2d7)](this[_0x53d731(0x322)]['focused$'][_0x53d731(0x481)](()=>{const _0x85026d=_0x53d731;let _0x2d09f8=this[_0x85026d(0x322)][_0x85026d(0x2fd)](),_0x132533=this[_0x85026d(0x214)]['getConfig'](_0x85026d(0x1a2))??'Univer';_0x2d09f8 instanceof t[_0x85026d(0x2c9)]&&(_0x132533=_0x2d09f8[_0x85026d(0x329)]),document[_0x85026d(0x2bb)]=_0x132533;}));}};tt=y([v(0x0,t[_0x51c992(0x1dd)]),v(0x1,t['IConfigService'])],tt);const nt=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x2dd));let U=class{constructor(_0x245b7c,_0x205079,_0x8e13d9){const _0x4b1e4e=_0x51c992;this[_0x4b1e4e(0x22f)]=_0x245b7c,this[_0x4b1e4e(0x214)]=_0x205079,this['_univerInstanceService']=_0x8e13d9;}[_0x51c992(0x2ed)](){return this['_getConfig']()['attachment']??{};}async[_0x51c992(0x418)](_0x559265){const _0x26fd71=_0x51c992;let _0x107bc4=this[_0x26fd71(0x2ed)]();if(rt(_0x559265,_0x107bc4),_0x107bc4['upload'])return _0x107bc4['upload'](_0x559265);let _0x20cf8f=await this['_upload'](_0x559265);return{'id':_0x20cf8f,'name':_0x559265[_0x26fd71(0x329)],'mimeType':_0x559265[_0x26fd71(0x3fc)],'size':_0x559265[_0x26fd71(0x4a9)],'sourceType':t['ImageSourceType']['UUID'],'source':_0x20cf8f};}async[_0x51c992(0x4ac)](_0x4142b0,_0x33c562){const _0x437255=_0x51c992;if(_0x33c562!==t['ImageSourceType'][_0x437255(0x3e2)])return _0x4142b0;let _0x54db2b=(await this['_httpService']['get'](this['_getSignURL']()[_0x437255(0x45b)]('{fileID}',_0x4142b0)))[_0x437255(0x253)];if(_0x54db2b[_0x437255(0x420)]&&_0x54db2b['error'][_0x437255(0x25c)]!==a[_0x437255(0x1e0)]['OK'])throw _0x54db2b[_0x437255(0x420)];if(!_0x54db2b[_0x437255(0x408)])throw Error(_0x437255(0x263));return(0x0,t[_0x437255(0x3d4)])(_0x54db2b[_0x437255(0x408)],this['_getDownloadEndpointURL']());}async[_0x51c992(0x448)](_0x21724f){const _0x4f88a0=_0x51c992;let _0x51fa8b=this[_0x4f88a0(0x322)][_0x4f88a0(0x2fd)](),_0x31f787=_0x51fa8b==null?void 0x0:_0x51fa8b[_0x4f88a0(0x1c8)]();if(!_0x31f787)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0xdd9e95=new FormData();_0xdd9e95['append']('file',_0x21724f);let _0x2691ef=this[_0x4f88a0(0x382)]()+_0x4f88a0(0x3b0)+_0x21724f[_0x4f88a0(0x4a9)]['toString']()+_0x4f88a0(0x419)+a[_0x4f88a0(0x38a)][_0x4f88a0(0x350)]+_0x4f88a0(0x412)+encodeURIComponent(_0x31f787),_0xf21fe1=(await this[_0x4f88a0(0x22f)][_0x4f88a0(0x484)](_0x2691ef,{'body':_0xdd9e95}))[_0x4f88a0(0x253)]['FileId'];if(typeof _0xf21fe1!=_0x4f88a0(0x2dc)||!_0xf21fe1)throw Error(_0x4f88a0(0x1a7));return _0xf21fe1;}['_getUploadFileURL'](){const _0xa58e22=_0x51c992;return this['_getConfig']()[_0xa58e22(0x18a)]??_0xa58e22(0x386);}['_getSignURL'](){const _0x7cbbc=_0x51c992;return this['_getConfig']()[_0x7cbbc(0x339)]??_0x7cbbc(0x4a0);}['_getDownloadEndpointURL'](){const _0x71427a=_0x51c992;let _0x1f3edf=this[_0x71427a(0x228)]();return _0x1f3edf[_0x71427a(0x24c)]?_0x1f3edf[_0x71427a(0x24c)]:typeof location<'u'?location[_0x71427a(0x212)]:_0x1f3edf[_0x71427a(0x18a)]??'';}[_0x51c992(0x228)](){const _0x2b9e7c=_0x51c992;return this[_0x2b9e7c(0x214)][_0x2b9e7c(0x310)](_0x2b9e7c(0x39b))??{};}};U=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(l[_0x51c992(0x492)])),v(0x1,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x46e)])),v(0x2,(0x0,t['Inject'])(t[_0x51c992(0x1dd)]))],U);function rt(_0x4fee15,_0x236720){const _0x29163e=_0x51c992;var _0x4a7775;if(_0x236720[_0x29163e(0x366)]!=null&&_0x4fee15[_0x29163e(0x4a9)]>_0x236720[_0x29163e(0x366)])throw Error(_0x29163e(0x2ac));if((_0x4a7775=_0x236720[_0x29163e(0x47d)])!=null&&_0x4a7775[_0x29163e(0x187)]&&!_0x236720[_0x29163e(0x47d)][_0x29163e(0x17c)](_0x18812c=>_0x4fee15[_0x29163e(0x3fc)]===_0x18812c||_0x4fee15['name']['endsWith'](_0x18812c)||_0x18812c[_0x29163e(0x4b0)]('/*')&&_0x4fee15[_0x29163e(0x3fc)][_0x29163e(0x477)](_0x18812c[_0x29163e(0x1f1)](0x0,-0x1))))throw Error('[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.');}let W=class{constructor(_0x5268d3,_0x38cb38,_0x48d447){const _0x2a2f44=_0x51c992;this[_0x2a2f44(0x214)]=_0x5268d3,this['_httpService']=_0x38cb38,this['localeService']=_0x48d447,this[_0x2a2f44(0x2b6)]();}[_0x51c992(0x2b6)](){const _0x235e15=_0x51c992;this['_httpService']['registerHTTPInterceptor']({'priority':0x1,'interceptor':(_0x3e9fd3,_0x4e806c)=>_0x4e806c(_0x3e9fd3)[_0x235e15(0x3a2)]((0x0,i[_0x235e15(0x292)])(async _0x30cbd6=>{const _0x4f65a7=_0x235e15;let _0x1109f7=_0x30cbd6;if(_0x1109f7[_0x4f65a7(0x456)]===0x191){if(typeof window>'u')throw Error(_0x4f65a7(0x3c8));if(window[_0x4f65a7(0x2a6)](this[_0x4f65a7(0x37e)]['t']('collaboration-client.auth.needGotoLoginAlert'))){let _0x5da0b7=window[_0x4f65a7(0x48d)](window[_0x4f65a7(0x1e8)][_0x4f65a7(0x250)]);window[_0x4f65a7(0x1e8)][_0x4f65a7(0x250)]=this[_0x4f65a7(0x4ad)]()+_0x4f65a7(0x267)+_0x5da0b7;}}return _0x1109f7;}))});}['_getLoginPath'](){const _0x4ca2a9=_0x51c992;let _0x3d5307=this[_0x4ca2a9(0x214)]['getConfig'](m);return(_0x3d5307==null?void 0x0:_0x3d5307[_0x4ca2a9(0x296)])??_0x4ca2a9(0x363);}};W=y([v(0x0,t[_0x51c992(0x46e)]),v(0x1,(0x0,t[_0x51c992(0x1ba)])(l[_0x51c992(0x492)])),v(0x2,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x29e)]))],W);let G=class extends t[_0x51c992(0x3ac)]{constructor(_0x2e662d,_0x57125b){const _0x310145=_0x51c992;super(),this[_0x310145(0x3d7)]=_0x2e662d,this[_0x310145(0x214)]=_0x57125b,g(this,_0x310145(0x3d3),!0x1),this[_0x310145(0x393)]();}['_initMergeInterceptor'](){const _0x363ca6=_0x51c992;let _0xab5921=this;this[_0x363ca6(0x2d7)](this[_0x363ca6(0x3d7)][_0x363ca6(0x34d)]({'priority':0x3e7,'interceptor':(0x0,l[_0x363ca6(0x232)])({'isMatch'(_0xfa213d){const _0x37047f=_0x363ca6;var _0x41ccf7;if(_0xfa213d[_0x37047f(0x459)]===_0x37047f(0x449)&&(_0x41ccf7=_0xfa213d[_0x37047f(0x3a7)])!=null&&_0x41ccf7[_0x37047f(0x253)]){let {objectID:_0x33cb1c,objectType:_0xe8b6d8}=_0xfa213d['requestParams']['body']||{};if(!_0x33cb1c||_0xe8b6d8===void 0x0)return!0x1;let _0x559d30=_0xab5921['_getAPIPrefixPath']()+'/'+_0xe8b6d8+_0x37047f(0x258)+encodeURIComponent(_0x33cb1c)+_0x37047f(0x3a1);if(_0xfa213d[_0x37047f(0x408)]===_0x559d30)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x5ed801){const _0x373ea4=_0x363ca6;var _0x4f0a08;return(_0x4f0a08=_0x5ed801['requestParams'])==null?void 0x0:_0x4f0a08[_0x373ea4(0x253)];},'mergeParamsToRequest'(_0x49eb3b,_0x109605){const _0x467249=_0x363ca6;let _0x150bfe=_0xab5921[_0x467249(0x2c3)]()+_0x467249(0x1bd),_0x217b04=_0x49eb3b[_0x467249(0x42c)]((_0x24ebbc,_0x1664d1)=>{const _0x239216=_0x467249;let {unitID:_0x34e02e,objectID:_0x1a2d05,objectType:_0x4850e6,actions:_0x4f56d2}=_0x1664d1;return _0x24ebbc[_0x34e02e]||(_0x24ebbc[_0x34e02e]=Object['create'](null)),_0x24ebbc[_0x34e02e][_0x1a2d05]||(_0x24ebbc[_0x34e02e][_0x1a2d05]={'objectID':_0x1a2d05,'objectType':_0x4850e6,'actions':[]}),_0x24ebbc[_0x34e02e][_0x1a2d05][_0x239216(0x27c)][_0x239216(0x499)](..._0x4f56d2),_0x24ebbc;},Object[_0x467249(0x321)](null)),_0xe2f026=[];for(let _0x4ae2ee in _0x217b04)for(let _0x4e81c5 in _0x217b04[_0x4ae2ee]){let {actions:_0x510780,objectType:_0x4382a3}=_0x217b04[_0x4ae2ee][_0x4e81c5],_0x16ae24=[...new Set(_0x510780)];_0xe2f026[_0x467249(0x499)]({'unitID':_0x4ae2ee,'objectID':_0x4e81c5,'objectType':_0x4382a3,'actions':_0x16ae24});}return new l[(_0x467249(0x4a2))](_0x467249(0x449),_0x150bfe,{'headers':_0x109605[_0x467249(0x34b)],'withCredentials':_0x109605['withCredentials'],'responseType':_0x109605[_0x467249(0x375)],'body':{'requests':_0xe2f026}});}},{'distributeResult'(_0x5f15ed,_0x3cb4b0){const _0x30008e=_0x363ca6;let {objectActions:_0x4e766a}=_0x5f15ed;return _0x3cb4b0[_0x30008e(0x231)](_0x4c262d=>{const _0x3692f3=_0x30008e;let {unitID:_0x2780dd,objectID:_0x51f698,actions:_0x2dbebb}=_0x4c262d,_0x1d505e=_0x4e766a[_0x3692f3(0x2ea)](_0x59bf1=>_0x59bf1[_0x3692f3(0x23b)]===_0x2780dd&&_0x59bf1[_0x3692f3(0x3ed)]===_0x51f698);return{'config':_0x4c262d,'result':{'actions':_0x2dbebb[_0x3692f3(0x231)](_0x4c6d53=>_0x1d505e==null?void 0x0:_0x1d505e[_0x3692f3(0x27c)][_0x3692f3(0x2ea)](_0xbd2abd=>_0xbd2abd[_0x3692f3(0x324)]===_0x4c6d53))[_0x3692f3(0x3d8)](_0x16c932=>!!_0x16c932),'error':_0x5f15ed[_0x3692f3(0x420)]}};});}})}));}[_0x51c992(0x2c3)](){const _0x36238b=_0x51c992;let _0x4ee7bd=this['_configService'][_0x36238b(0x310)](m);return(_0x4ee7bd==null?void 0x0:_0x4ee7bd[_0x36238b(0x450)])??_0x36238b(0x1c9);}async[_0x51c992(0x321)](_0x4ff883){const _0x3dba07=_0x51c992;let _0x520ff2=this[_0x3dba07(0x2c3)]()+'/'+_0x4ff883[_0x3dba07(0x423)]+_0x3dba07(0x2d1);return(await this[_0x3dba07(0x3d7)]['post'](_0x520ff2,{'body':_0x4ff883}))[_0x3dba07(0x253)][_0x3dba07(0x3ed)]||'';}async[_0x51c992(0x3f6)](_0x4ee9d0){const _0x449df8=_0x51c992;let _0x17711d=this[_0x449df8(0x2c3)]()+_0x449df8(0x285);return(await this['_HTTPService'][_0x449df8(0x484)](_0x17711d,{'body':_0x4ee9d0}))['body']['objects'];}async[_0x51c992(0x381)](_0x4d3d51){const _0x477ef4=_0x51c992;var _0x1de6ab;let _0x5c66cb=this[_0x477ef4(0x2c3)]()+'/'+_0x4d3d51['objectType']+'/object/'+encodeURIComponent(_0x4d3d51['objectID']),_0x59dcdf=await this['_HTTPService'][_0x477ef4(0x444)](_0x5c66cb,{'body':_0x4d3d51});if((_0x59dcdf==null||(_0x1de6ab=_0x59dcdf[_0x477ef4(0x253)])==null||(_0x1de6ab=_0x1de6ab['error'])==null?void 0x0:_0x1de6ab[_0x477ef4(0x25c)])!==0x1)throw Error(_0x477ef4(0x35a));}async['allowed'](_0x29da46){const _0xcc82d8=_0x51c992;let _0x42b822=this[_0xcc82d8(0x2c3)]()+'/'+_0x29da46[_0xcc82d8(0x423)]+_0xcc82d8(0x258)+encodeURIComponent(_0x29da46[_0xcc82d8(0x3ed)])+'/allowed';return(await this[_0xcc82d8(0x3d7)][_0xcc82d8(0x484)](_0x42b822,{'body':_0x29da46}))['body'][_0xcc82d8(0x27c)];}async[_0x51c992(0x21e)](_0x3fa583){const _0x2bac27=_0x51c992;let _0x35e83a=this[_0x2bac27(0x2c3)]()+'/-/object/-/batch_allowed';return(await this[_0x2bac27(0x3d7)][_0x2bac27(0x484)](_0x35e83a,{'body':{'requests':_0x3fa583}}))[_0x2bac27(0x253)]['objectActions'];}async[_0x51c992(0x312)](_0x9e5037){const _0x51e4c0=_0x51c992;let _0x3abde1=this[_0x51e4c0(0x2c3)]()+'/'+_0x9e5037[_0x51e4c0(0x423)]+_0x51e4c0(0x468),_0x16e1d2=await this[_0x51e4c0(0x3d7)][_0x51e4c0(0x484)](_0x3abde1,{'body':_0x9e5037});return{'roles':_0x16e1d2[_0x51e4c0(0x253)][_0x51e4c0(0x3b3)],'actions':_0x16e1d2[_0x51e4c0(0x253)][_0x51e4c0(0x27c)]};}async['deleteCollaborator'](_0xdea229){const _0x521f88=_0x51c992;let _0xd72854=this['_getAPIPrefixPath']()+'/collaborator';await this[_0x521f88(0x3d7)][_0x521f88(0x404)](_0xd72854,{'params':{'collaboratorID':_0xdea229['collaboratorID'],'objectID':_0xdea229['objectID'],'unitID':_0xdea229[_0x521f88(0x23b)]}});}async[_0x51c992(0x181)](_0x46cc0b){const _0x205c15=_0x51c992;let _0x5af393=this[_0x205c15(0x2c3)]()+_0x205c15(0x38f);await this[_0x205c15(0x3d7)][_0x205c15(0x189)](_0x5af393,{'body':_0x46cc0b});}async['createCollaborator'](_0x16465f){const _0x1ae1e3=_0x51c992;let _0x149ca2=this[_0x1ae1e3(0x2c3)]()+'/collaborator';await this[_0x1ae1e3(0x3d7)][_0x1ae1e3(0x484)](_0x149ca2,{'body':_0x16465f});}async['listCollaborators'](_0x904f09){const _0x3fadfc=_0x51c992;let _0x3b3aa6=this[_0x3fadfc(0x2c3)]()+_0x3fadfc(0x38f),_0x3e6c2a=await this[_0x3fadfc(0x3d7)][_0x3fadfc(0x403)](_0x3b3aa6,{'params':{'objectID':_0x904f09['objectID'],'unitID':_0x904f09[_0x3fadfc(0x23b)]}});return this[_0x3fadfc(0x278)](_0x3e6c2a[_0x3fadfc(0x253)]['cfgEnableObjInherit']??!0x1),_0x3e6c2a[_0x3fadfc(0x253)][_0x3fadfc(0x3bb)];}async[_0x51c992(0x26c)](_0xf33740){const _0x130e07=_0x51c992;let _0x3b08bb=this[_0x130e07(0x2c3)]()+_0x130e07(0x38f);await this['_HTTPService'][_0x130e07(0x444)](_0x3b08bb,{'body':_0xf33740});}[_0x51c992(0x278)](_0x3d82a8){const _0x3152f3=_0x51c992;this[_0x3152f3(0x3d3)]=_0x3d82a8;}['getCfgEnableObjInherit'](){const _0x17dd5c=_0x51c992;return this[_0x17dd5c(0x3d3)];}};G=y([v(0x0,(0x0,t['Inject'])(l[_0x51c992(0x492)])),v(0x1,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x46e)]))],G);function it(_0x5980d5){const _0x56f57f=_0x51c992;let _0x18f4a8=atob(_0x5980d5),_0x263c48=new Uint8Array(_0x18f4a8[_0x56f57f(0x187)]);for(let _0x10ad63=0x0;_0x10ad63<_0x18f4a8[_0x56f57f(0x187)];_0x10ad63++)_0x263c48[_0x10ad63]=_0x18f4a8[_0x56f57f(0x3a3)](_0x10ad63);return _0x263c48;}function at(_0x53e850){const _0x5be70e=_0x51c992;let _0x2ae03c='';for(let _0x1454b1=0x0;_0x1454b1<_0x53e850[_0x5be70e(0x187)];_0x1454b1++)_0x2ae03c+=String[_0x5be70e(0x201)](_0x53e850[_0x1454b1]);return btoa(_0x2ae03c);}function ot(_0x390d21,_0x457e26){const _0x557a5d=_0x51c992;let _0x2fc667=it(_0x457e26),_0x82aeb3=(0x0,f['randomBytes'])(0x10),_0x3aa137=(0x0,d[_0x557a5d(0x268)])(_0x2fc667,_0x82aeb3)[_0x557a5d(0x36d)]((0x0,f['utf8ToBytes'])(_0x390d21));return at((0x0,f[_0x557a5d(0x2d5)])(_0x82aeb3,_0x3aa137));}function st(){const _0x5dd0e7=_0x51c992;let _0x2ea16b=(0x0,u['getGlobalObject'])()[_0x5dd0e7(0x348)];if(typeof window<'u'&&window[_0x5dd0e7(0x1e8)]!==void 0x0&&_0x2ea16b){let _0x2da395={'time':Math[_0x5dd0e7(0x17d)](Date[_0x5dd0e7(0x472)]()/0x3e8),'domain':location['hostname']};return ot(JSON[_0x5dd0e7(0x45d)](_0x2da395),_0x2ea16b);}}let K=class{constructor(_0x58c2e9){const _0x5eb440=_0x51c992;this[_0x5eb440(0x22f)]=_0x58c2e9,this['_initRequestHeader']();}[_0x51c992(0x1d5)](){const _0x2aa034=_0x51c992;this['_httpService'][_0x2aa034(0x34d)]({'interceptor':(_0x1ff340,_0x34d96c)=>{const _0x24d059=_0x2aa034;let _0xf5a294=st();return _0xf5a294&&_0x1ff340['headers'][_0x24d059(0x35e)]('x-univer-host',_0xf5a294),_0x34d96c(_0x1ff340);}});}};K=y([v(0x0,(0x0,t['Inject'])(l['HTTPService']))],K);let q=class extends t[_0x51c992(0x251)]{constructor(_0xee4fbc,_0x5eb423,_0x19faa7){const _0x4de05e=_0x51c992;super(),this['_logService']=_0xee4fbc,this['_snapshotService']=_0x5eb423,this[_0x4de05e(0x451)]=_0x19faa7,g(this,_0x4de05e(0x24f),new i[(_0x4de05e(0x3f2))](null)),g(this,_0x4de05e(0x334),new i['Subject']()),g(this,_0x4de05e(0x31e),this[_0x4de05e(0x24f)][_0x4de05e(0x3e3)]()),g(this,_0x4de05e(0x433),this[_0x4de05e(0x334)]['asObservable']());}[_0x51c992(0x37b)](){const _0x1aef3c=_0x51c992;super[_0x1aef3c(0x37b)](),this[_0x1aef3c(0x334)]['complete'](),this[_0x1aef3c(0x24f)][_0x1aef3c(0x3a9)]();}async[_0x51c992(0x466)](_0x2dd0f6,_0x396349,_0x48008e,_0x29ac26){const _0x35904d=_0x51c992;this[_0x35904d(0x24f)]['next']({'unitId':_0x2dd0f6,'type':_0x396349,'subUnitId':_0x29ac26});let _0x23e66f=null;switch(_0x396349){case t[_0x35904d(0x2b4)][_0x35904d(0x3f5)]:_0x23e66f=await this[_0x35904d(0x2c1)][_0x35904d(0x43d)](_0x2dd0f6,_0x48008e,void 0x0,{'initialSubUnitId':_0x29ac26});break;case t[_0x35904d(0x2b4)][_0x35904d(0x47c)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x361)](_0x2dd0f6,_0x48008e);break;case t['UniverInstanceType'][_0x35904d(0x439)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x1d6)](_0x2dd0f6,_0x48008e);break;case t[_0x35904d(0x2b4)][_0x35904d(0x3f3)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x229)](_0x2dd0f6,_0x48008e);break;case t[_0x35904d(0x2b4)]['UNIVER_BASE']:_0x23e66f=await this[_0x35904d(0x2c1)][_0x35904d(0x411)](_0x2dd0f6,_0x48008e);break;case t['UniverInstanceType'][_0x35904d(0x3eb)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x30c)](_0x2dd0f6,_0x48008e);break;default:this[_0x35904d(0x396)][_0x35904d(0x420)](_0x35904d(0x269),'Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');}return _0x23e66f&&this[_0x35904d(0x334)][_0x35904d(0x443)](_0x23e66f),_0x23e66f;}async[_0x51c992(0x207)](_0x274556,_0x2b3ab9,_0x20c806){const _0x653113=_0x51c992;var _0x4158b6;this['_unitInfo$'][_0x653113(0x443)]({'unitId':_0x274556,'type':_0x2b3ab9,'subUnitId':_0x20c806});let _0x221edd=0x0,_0x7238b4=await((_0x4158b6=this[_0x653113(0x451)])==null?void 0x0:_0x4158b6[_0x653113(0x30a)](_0x274556));return _0x7238b4&&(_0x7238b4[_0x653113(0x3f8)]||_0x7238b4[_0x653113(0x2a2)]['length']!==0x0)&&(_0x221edd=_0x7238b4['rev']),_0x221edd===0x0&&this[_0x653113(0x396)]['debug'](_0x653113(0x269),_0x653113(0x1c1)),this[_0x653113(0x466)](_0x274556,_0x2b3ab9,_0x221edd,_0x20c806);}};q=y([v(0x0,t[_0x51c992(0x291)]),v(0x1,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1ed)])),v(0x2,(0x0,t[_0x51c992(0x47e)])(x))],q);let J=class{constructor(_0x5b51b2,_0x11ab21,_0x2ff0ab){const _0x1bf070=_0x51c992;this[_0x1bf070(0x22f)]=_0x5b51b2,this['_configService']=_0x11ab21,this[_0x1bf070(0x322)]=_0x2ff0ab,g(this,'_waitCount',0x0),g(this,_0x1bf070(0x357),new i[(_0x1bf070(0x29d))]()),g(this,_0x1bf070(0x2ab),this[_0x1bf070(0x357)]),g(this,_0x1bf070(0x343),new Map());}[_0x51c992(0x341)](_0x52a8d4){const _0x24eef5=_0x51c992;this[_0x24eef5(0x35b)]=_0x52a8d4,this[_0x24eef5(0x357)][_0x24eef5(0x443)](_0x52a8d4);}['getImageSourceCache'](_0x538024,_0x67566c){const _0x390f41=_0x51c992;if(_0x67566c===t[_0x390f41(0x3f9)][_0x390f41(0x398)]){let _0x1033a5=new Image();return _0x1033a5[_0x390f41(0x222)]=_0x538024,_0x1033a5;}return this[_0x390f41(0x343)][_0x390f41(0x403)](_0x538024);}[_0x51c992(0x42d)](_0xad7f43,_0x25baf2,_0x457db3){const _0x19998f=_0x51c992;_0x25baf2!==t[_0x19998f(0x3f9)][_0x19998f(0x398)]&&_0x457db3!=null&&this[_0x19998f(0x343)][_0x19998f(0x35e)](_0xad7f43,_0x457db3);}async[_0x51c992(0x1c5)](_0x241eea){const _0xa2f05=_0x51c992;try{let _0x28d167=this['_replaceFileID'](this[_0xa2f05(0x1da)](),''+_0x241eea),_0x2a09a5=(await this[_0xa2f05(0x22f)][_0xa2f05(0x403)](_0x28d167))[_0xa2f05(0x253)];if(_0x2a09a5[_0xa2f05(0x420)]&&_0x2a09a5['error'][_0xa2f05(0x25c)]===a[_0xa2f05(0x1e0)]['OK']){let _0x1add89=(0x0,t[_0xa2f05(0x3d4)])(_0x2a09a5['url'],this[_0xa2f05(0x352)]());return Promise[_0xa2f05(0x46d)](_0x1add89);}return Promise['reject'](_0x2a09a5['error']);}catch(_0x3b66f2){return Promise[_0xa2f05(0x261)](_0x3b66f2);}}async[_0x51c992(0x1bf)](_0x46e2c7){const _0x4de2a5=_0x51c992;let _0x53310c='';if(!p[_0x4de2a5(0x1d2)]['includes'](_0x46e2c7[_0x4de2a5(0x3fc)]))return this[_0x4de2a5(0x2d8)](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)][_0x4de2a5(0x24a)]));if(_0x46e2c7['size']>(0x0,p['getDrawingImageAllowSize'])())return this[_0x4de2a5(0x2d8)](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)]['ERROR_EXCEED_SIZE']));try{let _0x345a47=new FormData();_0x345a47[_0x4de2a5(0x483)](_0x4de2a5(0x185),_0x46e2c7);let _0x4922fe=this[_0x4de2a5(0x322)]['getFocusedUnit'](),_0x532426=_0x4922fe==null?void 0x0:_0x4922fe['getUnitId']();if(!_0x532426)throw Error('unitId\x20is\x20not\x20found');let _0x55ebd1=this[_0x4de2a5(0x382)]()+_0x4de2a5(0x3b0)+_0x46e2c7['size'][_0x4de2a5(0x3d6)]()+_0x4de2a5(0x419)+a[_0x4de2a5(0x38a)][_0x4de2a5(0x350)]+_0x4de2a5(0x412)+encodeURIComponent(_0x532426),_0x4187d7={'body':_0x345a47},_0x5700fb=(await this[_0x4de2a5(0x22f)][_0x4de2a5(0x484)](_0x55ebd1,_0x4187d7))[_0x4de2a5(0x253)];if(typeof _0x5700fb[_0x4de2a5(0x2ad)]!=_0x4de2a5(0x2dc))return this[_0x4de2a5(0x2d8)](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)][_0x4de2a5(0x356)]));_0x53310c=_0x5700fb[_0x4de2a5(0x2ad)];}catch{return this['_decreaseWaiting'](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)][_0x4de2a5(0x356)]));}return new Promise((_0x3ab916,_0x29ee65)=>{const _0x1941fc=_0x4de2a5;let _0x56fc15=new FileReader();_0x56fc15['readAsDataURL'](_0x46e2c7),_0x56fc15[_0x1941fc(0x36b)]=_0x5c5767=>{const _0x27af25=_0x1941fc;var _0x5b9611;let _0x7dddc2=(_0x5b9611=_0x5c5767[_0x27af25(0x280)])==null?void 0x0:_0x5b9611[_0x27af25(0x469)];if(_0x7dddc2==null){this[_0x27af25(0x2d8)](),_0x29ee65(Error(t['ImageUploadStatusType']['ERROR_IMAGE']));return;}_0x3ab916({'imageId':(0x0,t['generateRandomId'])(0x6),'imageSourceType':t['ImageSourceType'][_0x27af25(0x3e2)],'source':_0x53310c,'base64Cache':_0x7dddc2,'status':t['ImageUploadStatusType']['SUCCUSS']}),this[_0x27af25(0x2d8)]();};});}[_0x51c992(0x382)](){const _0x35f0d4=_0x51c992;let _0x215aa6=this[_0x35f0d4(0x214)][_0x35f0d4(0x310)](m);return(_0x215aa6==null?void 0x0:_0x215aa6[_0x35f0d4(0x18a)])??_0x35f0d4(0x386);}['_getSignURL'](){const _0x28d058=_0x51c992;let _0x2d48a7=this[_0x28d058(0x214)][_0x28d058(0x310)](m);return(_0x2d48a7==null?void 0x0:_0x2d48a7[_0x28d058(0x339)])??_0x28d058(0x4a0);}['_getDownloadEndpointURL'](){const _0x49923d=_0x51c992;let _0x1025f1=this[_0x49923d(0x214)][_0x49923d(0x310)](m);return(_0x1025f1==null?void 0x0:_0x1025f1[_0x49923d(0x24c)])??location['origin'];}[_0x51c992(0x20e)](_0x12f535,_0x525c49){const _0x14dd87=_0x51c992;return _0x12f535[_0x14dd87(0x45b)](_0x14dd87(0x1e2),_0x525c49);}[_0x51c992(0x2d8)](){const _0x8485d=_0x51c992;--this[_0x8485d(0x35b)],this[_0x8485d(0x357)][_0x8485d(0x443)](this[_0x8485d(0x35b)]);}};J=y([v(0x0,(0x0,t['Inject'])(l[_0x51c992(0x492)])),v(0x1,t['IConfigService']),v(0x2,(0x0,t['Inject'])(t['IUniverInstanceService']))],J);let Y=class{constructor(_0x158775,_0xd0472c){const _0x78f829=_0x51c992;this[_0x78f829(0x214)]=_0x158775,this[_0x78f829(0x3d7)]=_0xd0472c;}[_0x51c992(0x2c3)](){const _0x357278=_0x51c992;let _0x2a7c42=this[_0x357278(0x214)]['getConfig'](m);return(_0x2a7c42==null?void 0x0:_0x2a7c42[_0x357278(0x450)])??'/universer-api/authz';}async[_0x51c992(0x3f6)](_0x1bf1e6){const _0x4a6b0a=_0x51c992;let _0x3dc237=this['_getAPIPrefixPath']()+_0x4a6b0a(0x38f);return{'list':[{'title':_0x4a6b0a(0x2b8),'mentions':(await this[_0x4a6b0a(0x3d7)][_0x4a6b0a(0x403)](_0x3dc237,{'params':{'objectID':_0x1bf1e6['unitId'],'unitID':_0x1bf1e6[_0x4a6b0a(0x44c)]}}))['body']['collaborators'][_0x4a6b0a(0x231)](_0x33d23d=>({'objectId':_0x33d23d['id'],'name':_0x33d23d[_0x4a6b0a(0x330)][_0x4a6b0a(0x329)],'metadata':{'icon':_0x33d23d['subject'][_0x4a6b0a(0x45c)]},'label':_0x33d23d['subject'][_0x4a6b0a(0x329)],'objectType':t['MentionType'][_0x4a6b0a(0x41c)]})),'metadata':{},'type':t[_0x4a6b0a(0x25f)]['PERSON']}]};}};Y=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x46e)])),v(0x1,(0x0,t['Inject'])(l[_0x51c992(0x492)]))],Y);let X=class extends t[_0x51c992(0x251)]{constructor(_0x50f839,_0x98ad1a,_0x30e917,_0xb5c4f5,_0x14d38b,_0xf5fa98){const _0x19b981=_0x51c992;super(),this[_0x19b981(0x4a1)]=_0x50f839,this[_0x19b981(0x322)]=_0x98ad1a,this[_0x19b981(0x1ab)]=_0x30e917,this[_0x19b981(0x177)]=_0xb5c4f5,this[_0x19b981(0x2d9)]=_0x14d38b,this[_0x19b981(0x2f5)]=_0xf5fa98,g(this,_0x19b981(0x36f),new Set()),this[_0x19b981(0x2d7)](()=>this[_0x19b981(0x36f)]['clear']()),this['disposeWithMe'](ct(this[_0x19b981(0x322)])[_0x19b981(0x481)](({unitId:_0x43bfad})=>this[_0x19b981(0x36f)][_0x19b981(0x404)](_0x43bfad))),this[_0x19b981(0x1ea)](),this['_initCloseConn'](),[t['UniverInstanceType']['UNIVER_DOC'],t['UniverInstanceType'][_0x19b981(0x439)],t['UniverInstanceType']['UNIVER_BASE'],t[_0x19b981(0x2b4)][_0x19b981(0x3f3)]][_0x19b981(0x1be)](_0x444e4f=>{const _0x1bdb9c=_0x19b981;this['disposeWithMe'](this[_0x1bdb9c(0x322)]['getTypeOfUnitDisposed$'](_0x444e4f)[_0x1bdb9c(0x481)](_0x1da032=>{const _0x4bb9e9=_0x1bdb9c;this['_closedUnits']['add'](_0x1da032[_0x4bb9e9(0x1c8)]()),this[_0x4bb9e9(0x4a1)]['get'](t[_0x4bb9e9(0x44f)])[_0x4bb9e9(0x1e9)](_0x1da032['getUnitId']());}));});}[_0x51c992(0x39c)](){const _0x34806e=_0x51c992;let _0x3e824f=async(_0x5a1b74,_0x57af0f)=>{const _0x1f87ac=_0x3ab5;let _0x41c6d3=await this[_0x1f87ac(0x2d9)][_0x1f87ac(0x345)](_0x5a1b74);this[_0x1f87ac(0x2be)]||this[_0x1f87ac(0x36f)][_0x1f87ac(0x2d4)](_0x5a1b74)||!this[_0x1f87ac(0x322)][_0x1f87ac(0x2e2)](_0x5a1b74)||_0x41c6d3[_0x1f87ac(0x40b)][_0x1f87ac(0x3a2)]((0x0,s[_0x1f87ac(0x3d8)])(_0x5cd221=>_0x5cd221[_0x1f87ac(0x309)]===e[_0x1f87ac(0x496)][_0x1f87ac(0x3e0)]),(0x0,s[_0x1f87ac(0x2ec)])((0x0,i[_0x1f87ac(0x335)])(this[_0x1f87ac(0x257)],this['_univerInstanceService'][_0x1f87ac(0x1ef)][_0x1f87ac(0x3a2)]((0x0,s[_0x1f87ac(0x3d8)])(_0x5074db=>_0x5074db[_0x1f87ac(0x1c8)]()===_0x5a1b74)))))[_0x1f87ac(0x481)](_0x5bd9df=>{const _0x59b820=_0x1f87ac;let {reason:_0x4c3968}=_0x5bd9df[_0x59b820(0x2e1)];this[_0x59b820(0x2f5)][_0x59b820(0x3e8)]({'id':_0x59b820(0x2cf),'data':_0x4c3968}),this[_0x59b820(0x36f)][_0x59b820(0x45a)](_0x5a1b74),this[_0x59b820(0x4a1)][_0x59b820(0x403)](t[_0x59b820(0x44f)])[_0x59b820(0x1e9)](_0x5a1b74);let _0x34f7f0=lt(_0x57af0f);_0x34f7f0!=null&&this[_0x59b820(0x27e)](_0x5a1b74,_0x34f7f0,a[_0x59b820(0x2e8)][_0x59b820(0x400)],!0x1),this[_0x59b820(0x2d9)][_0x59b820(0x2d2)](_0x5a1b74);});};ct(this[_0x34806e(0x322)])['pipe']((0x0,s[_0x34806e(0x3d8)])(({unitId:_0x59ee24})=>!(0x0,t[_0x34806e(0x1bc)])(_0x59ee24)),(0x0,s['takeUntil'])(this[_0x34806e(0x257)]))[_0x34806e(0x481)](({type:_0x3deefe,unitId:_0x5397d2})=>{const _0xd3bf2c=_0x34806e;_0x3e824f(_0x5397d2,_0x3deefe)[_0xd3bf2c(0x397)](_0x20ae69=>this[_0xd3bf2c(0x4a1)][_0xd3bf2c(0x403)](t[_0xd3bf2c(0x291)])['error'](_0x20ae69));});}[_0x51c992(0x1ea)](){const _0x3a1688=_0x51c992;let _0x283cb0=async(_0x287949,_0x57277a)=>{const _0x4fe940=_0x3ab5;let _0x39d624=await this[_0x4fe940(0x2d9)]['requireSession'](_0x287949);if(!(this[_0x4fe940(0x2be)]||this[_0x4fe940(0x36f)][_0x4fe940(0x2d4)](_0x287949)||!this[_0x4fe940(0x322)][_0x4fe940(0x2e2)](_0x287949))){if(_0x57277a===t[_0x4fe940(0x2b4)][_0x4fe940(0x3f5)]){let _0x84833c=this[_0x4fe940(0x4a1)][_0x4fe940(0x403)](r[_0x4fe940(0x2e7)]);await _0x84833c['initWorkbookPermissionChange'](_0x287949),_0x39d624[_0x4fe940(0x40b)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x2b93d3=>_0x2b93d3[_0x4fe940(0x309)]===e[_0x4fe940(0x496)][_0x4fe940(0x4a5)]),(0x0,s[_0x4fe940(0x2ec)])((0x0,i['merge'])(this[_0x4fe940(0x257)],_0x39d624[_0x4fe940(0x40b)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x46ccd3=>_0x46ccd3[_0x4fe940(0x309)]===e[_0x4fe940(0x496)]['SHOULD_CLOSE_CONN'])),this[_0x4fe940(0x322)][_0x4fe940(0x1ef)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x16665f=>_0x16665f[_0x4fe940(0x1c8)]()===_0x287949)))))[_0x4fe940(0x481)](_0x3ff0a0=>{const _0x4b8c33=_0x4fe940;let {objectId:_0x340e41}=_0x3ff0a0['data'];_0x340e41===_0x287949?_0x84833c[_0x4b8c33(0x3e9)](_0x287949):_0x84833c['refreshPermission'](_0x287949,_0x340e41);});return;}_0x39d624['event$']['pipe']((0x0,s[_0x4fe940(0x3d8)])(_0xbedd25=>_0xbedd25[_0x4fe940(0x309)]===e['CollaborationEvent']['UPDATE_PERMISSION_OBJ']),(0x0,s[_0x4fe940(0x2ec)])((0x0,i['merge'])(this[_0x4fe940(0x257)],_0x39d624[_0x4fe940(0x40b)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x720cc9=>_0x720cc9[_0x4fe940(0x309)]===e[_0x4fe940(0x496)][_0x4fe940(0x3e0)])),this[_0x4fe940(0x322)][_0x4fe940(0x1ef)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x1f02c0=>_0x1f02c0[_0x4fe940(0x1c8)]()===_0x287949)))))[_0x4fe940(0x481)](()=>{const _0x412f9d=_0x4fe940;this[_0x412f9d(0x3b5)](_0x287949,_0x57277a)[_0x412f9d(0x397)](_0x32f7c3=>this[_0x412f9d(0x4a1)][_0x412f9d(0x403)](t[_0x412f9d(0x291)])[_0x412f9d(0x420)](_0x32f7c3));}),await this[_0x4fe940(0x3b5)](_0x287949,_0x57277a);}};ct(this[_0x3a1688(0x322)])[_0x3a1688(0x3a2)]((0x0,s[_0x3a1688(0x3d8)])(({unitId:_0x466cb5})=>!(0x0,t[_0x3a1688(0x1bc)])(_0x466cb5)),(0x0,s['takeUntil'])(this[_0x3a1688(0x257)]))[_0x3a1688(0x481)](({type:_0x5647c2,unitId:_0x165c68})=>{const _0x8be8f3=_0x3a1688;_0x283cb0(_0x165c68,_0x5647c2)[_0x8be8f3(0x397)](_0x559aab=>this[_0x8be8f3(0x4a1)][_0x8be8f3(0x403)](t[_0x8be8f3(0x291)])[_0x8be8f3(0x420)](_0x559aab));});}async['_refreshUnitPermission'](_0x390d5d,_0x5cec4b){const _0x185e9d=_0x51c992;let _0x2928f1=lt(_0x5cec4b);if(_0x2928f1==null)return;let _0x5c8d9b=this[_0x185e9d(0x4a1)][_0x185e9d(0x403)](t['ObjectPermissionService']);if(_0x5c8d9b[_0x185e9d(0x217)]({'unitId':_0x390d5d,'objectId':_0x390d5d,'objectType':_0x2928f1})){await _0x5c8d9b[_0x185e9d(0x323)](_0x390d5d);return;}let _0x452c25=this[_0x185e9d(0x241)](_0x390d5d,_0x2928f1);if(!_0x452c25[_0x185e9d(0x187)])return;let _0x609719=await this[_0x185e9d(0x177)][_0x185e9d(0x3b8)]({'objectID':_0x390d5d,'objectType':_0x2928f1,'unitID':_0x390d5d,'actions':_0x452c25[_0x185e9d(0x231)](({action:_0x1263f2})=>_0x1263f2)});this[_0x185e9d(0x2be)]||this[_0x185e9d(0x36f)][_0x185e9d(0x2d4)](_0x390d5d)||!this[_0x185e9d(0x322)][_0x185e9d(0x2e2)](_0x390d5d)||_0x609719['forEach'](_0x35b40a=>{const _0x4afd7d=_0x185e9d;let _0x4da73a=_0x35b40a[_0x4afd7d(0x324)],_0x5955b8=_0x35b40a[_0x4afd7d(0x3b8)];_0x4da73a!=null&&_0x5955b8!=null&&_0x452c25[_0x4afd7d(0x3d8)](_0x1e7595=>_0x1e7595[_0x4afd7d(0x324)]===_0x4da73a)[_0x4afd7d(0x1be)](_0x5d2021=>this[_0x4afd7d(0x1ab)][_0x4afd7d(0x17f)](_0x5d2021['id'],_0x5955b8));});}['_getUnitPermissionPoints'](_0x2174ac,_0x29756f){const _0x19ce86=_0x51c992;let _0x1ab609=[];return this[_0x19ce86(0x1ab)][_0x19ce86(0x479)]()['forEach']((_0x48698d,_0x1c49d3)=>{const _0x516883=_0x19ce86;_0x48698d[_0x516883(0x481)](_0x35b6a8=>{const _0x297943=_0x516883;_0x35b6a8[_0x297943(0x3fc)]===_0x29756f&&_0x297943(0x44c)in _0x35b6a8&&_0x35b6a8[_0x297943(0x44c)]===_0x2174ac&&(!('objectId'in _0x35b6a8)||_0x35b6a8[_0x297943(0x42f)]===_0x2174ac)&&_0x1ab609[_0x297943(0x499)]({'id':_0x1c49d3,'action':_0x35b6a8[_0x297943(0x17a)]});})[_0x516883(0x2df)]();}),_0x1ab609;}[_0x51c992(0x27e)](_0x1f9e0f,_0x4db4ef,_0x533500,_0x2263d6){const _0x158903=_0x51c992;this[_0x158903(0x1ab)][_0x158903(0x479)]()[_0x158903(0x1be)]((_0x238329,_0x3dadb7)=>{const _0xf7db5d=_0x158903;let _0x179bd6=!0x1;_0x238329['subscribe'](_0x38e81f=>{const _0x5f15cb=_0x3ab5;_0x179bd6=_0x38e81f[_0x5f15cb(0x3fc)]===_0x4db4ef&&_0x38e81f[_0x5f15cb(0x17a)]===_0x533500&&'unitId'in _0x38e81f&&_0x38e81f[_0x5f15cb(0x44c)]===_0x1f9e0f&&(!(_0x5f15cb(0x42f)in _0x38e81f)||_0x38e81f[_0x5f15cb(0x42f)]===_0x1f9e0f);})[_0xf7db5d(0x2df)](),_0x179bd6&&this['_permissionService'][_0xf7db5d(0x17f)](_0x3dadb7,_0x2263d6);});}};X=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t['Injector'])),v(0x1,t[_0x51c992(0x1dd)]),v(0x2,t[_0x51c992(0x255)]),v(0x3,t[_0x51c992(0x284)]),v(0x4,(0x0,t[_0x51c992(0x1ba)])(V)),v(0x5,(0x0,t[_0x51c992(0x1ba)])(_))],X);function ct(_0x46ef50){const _0x3b1477=_0x51c992;return(0x0,i[_0x3b1477(0x335)])(...[t[_0x3b1477(0x2b4)]['UNIVER_SHEET'],t[_0x3b1477(0x2b4)][_0x3b1477(0x47c)],t[_0x3b1477(0x2b4)]['UNIVER_SLIDE'],t[_0x3b1477(0x2b4)]['UNIVER_BOARD'],t[_0x3b1477(0x2b4)][_0x3b1477(0x387)]][_0x3b1477(0x231)](_0x546d8e=>_0x46ef50[_0x3b1477(0x389)](_0x546d8e)['pipe']((0x0,s[_0x3b1477(0x231)])(_0x45c565=>({'type':_0x546d8e,'unitId':_0x45c565[_0x3b1477(0x211)][_0x3b1477(0x1c8)]()})))));}function lt(_0x371436){const _0x3fe99c=_0x51c992;switch(_0x371436){case t[_0x3fe99c(0x2b4)]['UNIVER_SHEET']:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x2c9)];case t[_0x3fe99c(0x2b4)][_0x3fe99c(0x47c)]:return a[_0x3fe99c(0x1df)]['Document'];case t['UniverInstanceType'][_0x3fe99c(0x439)]:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x2c4)];case t[_0x3fe99c(0x2b4)][_0x3fe99c(0x3f3)]:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x25b)];case t[_0x3fe99c(0x2b4)][_0x3fe99c(0x387)]:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x31a)];default:return;}}let Z=class{constructor(_0x27abbf,_0x513d82){const _0x301cd2=_0x51c992;this[_0x301cd2(0x214)]=_0x27abbf,this[_0x301cd2(0x22f)]=_0x513d82;}async[_0x51c992(0x374)](_0x1f1eb6,_0x2eaa46){const _0x9c96e0=_0x51c992;var _0x2e82c3;let {unitID:_0x4f9be7,type:_0x270141,revision:_0x197767=0x0}=_0x2eaa46,_0x360909=this[_0x9c96e0(0x1cf)]()+'/'+_0x270141+'/unit/'+_0x4f9be7+'/rev/'+_0x197767,_0x44b37a=(await this[_0x9c96e0(0x22f)][_0x9c96e0(0x403)](_0x360909))[_0x9c96e0(0x253)],_0x224636=(_0x2e82c3=_0x44b37a[_0x9c96e0(0x178)])==null?void 0x0:_0x2e82c3[_0x9c96e0(0x226)];if(_0x224636){let _0x286d96=_0x224636==null?void 0x0:_0x224636[_0x9c96e0(0x2a0)];_0x224636[_0x9c96e0(0x2a0)]=e[_0x9c96e0(0x3c0)][_0x9c96e0(0x20c)]((0x0,e['b64DecodeUnicode'])(_0x286d96)),Object[_0x9c96e0(0x338)](_0x224636[_0x9c96e0(0x355)])[_0x9c96e0(0x1be)](([,_0x3013a3])=>{const _0x38ece8=_0x9c96e0;let _0xf7f5cb=_0x3013a3[_0x38ece8(0x2a0)];_0x3013a3['originalMeta']=e[_0x38ece8(0x3c0)]['encode']((0x0,e['b64DecodeUnicode'])(_0xf7f5cb));});}return _0x44b37a;}async[_0x51c992(0x271)](_0x5aa90f,_0x37d0e4){const _0x22e5b9=_0x51c992;let {unitID:_0x7591d7,type:_0x362093,blockID:_0x399342}=_0x37d0e4,_0x1bce01=this[_0x22e5b9(0x49d)]()+'/'+_0x362093+_0x22e5b9(0x198)+_0x7591d7+_0x22e5b9(0x264)+_0x399342;return(await this[_0x22e5b9(0x22f)]['get'](_0x1bce01))[_0x22e5b9(0x253)];}async[_0x51c992(0x3c4)](_0x4fc7a1,_0x53f7cf){const _0x141776=_0x51c992;let {unitID:_0x10d93c,type:_0x55cc37,blockID:_0x286e91}=_0x53f7cf,_0x1a22a6=this['_getAPIPrefix']()+'/block/'+_0x55cc37+_0x141776(0x198)+_0x10d93c+_0x141776(0x264)+_0x286e91;return(await this[_0x141776(0x22f)][_0x141776(0x403)](_0x1a22a6))[_0x141776(0x253)];}async[_0x51c992(0x45f)](_0x4bf44d,_0x1dbc64){const _0x4927aa=_0x51c992;let {unitID:_0x144848,type:_0x8da564,from:_0x2e4210,to:_0x485595}=_0x1dbc64,_0x6983d7=this[_0x4927aa(0x49d)]()+'/'+_0x8da564+'/unit/'+_0x144848+_0x4927aa(0x19e)+_0x2e4210+_0x4927aa(0x316)+_0x485595;return(await this[_0x4927aa(0x22f)][_0x4927aa(0x403)](_0x6983d7))['body'];}['getSnapshotAPIPath'](){const _0x4671a5=_0x51c992;return this[_0x4671a5(0x214)][_0x4671a5(0x310)](_0x4671a5(0x3a6))??this[_0x4671a5(0x49d)]();}[_0x51c992(0x49d)](){const _0x3a147d=_0x51c992;let _0x26951b=this[_0x3a147d(0x214)]['getConfig'](m);return(_0x26951b==null?void 0x0:_0x26951b['snapshotServerUrl'])??'/universer-api/snapshot';}async[_0x51c992(0x372)](_0x2a08d7,_0x3e9795){const _0x51c236=_0x51c992;let _0x35a72e=_0x51c236(0x20b)+_0x3e9795[_0x51c236(0x3fc)]+_0x51c236(0x198)+_0x3e9795[_0x51c236(0x23b)]+'/resources';return(await this['_httpService'][_0x51c236(0x403)](_0x35a72e,{'params':{'resourceId':JSON[_0x51c236(0x45d)](_0x3e9795[_0x51c236(0x238)])}}))[_0x51c236(0x253)];}['saveSnapshot'](){const _0x2da311=_0x51c992;throw Error(_0x2da311(0x1b6));}[_0x51c992(0x41a)](){const _0x153487=_0x51c992;throw Error(_0x153487(0x1b6));}['saveSheetBlock'](){const _0x417b9c=_0x51c992;throw Error(_0x417b9c(0x1b6));}[_0x51c992(0x49a)](){const _0x48ae7d=_0x51c992;throw Error(_0x48ae7d(0x1b6));}[_0x51c992(0x331)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x51c992(0x317)](){const _0x179602=_0x51c992;throw Error(_0x179602(0x1b6));}};Z=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x51c992(0x1ba)])(l['HTTPService']))],Z);let Q=class extends t[_0x51c992(0x3a0)]{constructor(_0x41c03e,_0x3aade6,_0x2eca12,_0x576a39,_0x46d183,_0x5aaa45){const _0x4a6c15=_0x51c992;super(_0x41c03e,_0x3aade6,_0x2eca12,_0x576a39),this[_0x4a6c15(0x364)]=_0x46d183,this[_0x4a6c15(0x396)]=_0x5aaa45;}[_0x51c992(0x465)](_0x5db439,_0x21d7af){const _0x111691=_0x51c992;let _0x305a84=this[_0x111691(0x28e)](_0x5db439);if(_0x305a84)try{let _0x2c7a1c=this[_0x111691(0x314)](_0x305a84,_0x21d7af);this['_substituteUndoStack'](_0x5db439,_0x2c7a1c);}catch(_0x4396a0){this[_0x111691(0x396)]['error']('[CollaborationUndoRedoService]',_0x4396a0),this['_clearUndo'](_0x5db439);}let _0x480f02=this[_0x111691(0x191)](_0x5db439);if(_0x480f02)try{let _0x28f8b3=this[_0x111691(0x314)](_0x480f02,_0x21d7af);this[_0x111691(0x248)](_0x5db439,_0x28f8b3);}catch(_0x51a071){this['_logService'][_0x111691(0x420)](_0x51a071),this[_0x111691(0x2bc)](_0x5db439);}}['_clearUndo'](_0x161795){const _0x440561=_0x51c992;let _0x2d46a3=this[_0x440561(0x28e)](_0x161795);_0x2d46a3&&(_0x2d46a3[_0x440561(0x187)]=0x0,this['_updateStatus']());}['_clearRedo'](_0x3f77f6){const _0x5ca949=_0x51c992;let _0xee0cd=this[_0x5ca949(0x191)](_0x3f77f6);_0xee0cd&&(_0xee0cd[_0x5ca949(0x187)]=0x0,this['_updateStatus']());}[_0x51c992(0x470)](_0x58b5b1,_0xae4c49){const _0x2b892b=_0x51c992;this[_0x2b892b(0x18e)][_0x2b892b(0x35e)](_0x58b5b1,_0xae4c49),this['_updateStatus']();}[_0x51c992(0x248)](_0x2f0f07,_0x248524){const _0x53091a=_0x51c992;this[_0x53091a(0x2b0)][_0x53091a(0x35e)](_0x2f0f07,_0x248524),this[_0x53091a(0x1a3)]();}[_0x51c992(0x314)](_0x4edba5,_0xaa8263){const _0x32e180=_0x51c992;let _0x37eff6=[],_0x5facb3=_0xaa8263,_0x2d0804=_0xaa8263;for(let _0x2ca198=_0x4edba5[_0x32e180(0x187)]-0x1;_0x2ca198>=0x0;_0x2ca198--){let {unitID:_0x4a2043,undoMutations:_0x1606d0,redoMutations:_0x5cc682}=_0x4edba5[_0x2ca198],_0x317568=this[_0x32e180(0x364)][_0x32e180(0x262)](_0x5facb3,_0x1606d0),_0x45a465=this[_0x32e180(0x364)][_0x32e180(0x262)](_0x2d0804,_0x5cc682);if((0x0,e[_0x32e180(0x422)])(_0x317568)||(0x0,e[_0x32e180(0x422)])(_0x45a465)){this[_0x32e180(0x396)][_0x32e180(0x420)]('[CollaborationUndoRedoService]',_0x32e180(0x41d),_0x317568,_0x45a465);break;}_0x5facb3=_0x317568[_0x32e180(0x3c6)],_0x2d0804=_0x45a465['c1Prime'],_0x37eff6[_0x32e180(0x499)]({'unitID':_0x4a2043,'undoMutations':_0x317568[_0x32e180(0x1d1)],'redoMutations':_0x45a465[_0x32e180(0x1d1)]});}return _0x37eff6['reverse']();}};Q=y([v(0x0,t[_0x51c992(0x1dd)]),v(0x1,t['ICommandService']),v(0x2,t['IContextService']),v(0x3,t[_0x51c992(0x46e)]),v(0x4,e['ITransformService']),v(0x5,t[_0x51c992(0x291)])],Q);let $=class extends t[_0x51c992(0x1d4)]{constructor(_0x4dfe6d=ee,_0x56147d,_0x38f399,_0x13f469){const _0x2c5d2c=_0x51c992;super(),this['_config']=_0x4dfe6d,this[_0x2c5d2c(0x396)]=_0x56147d,this[_0x2c5d2c(0x4a1)]=_0x38f399,this[_0x2c5d2c(0x214)]=_0x13f469;let {..._0x5eea75}=(0x0,t[_0x2c5d2c(0x335)])({},ee,this[_0x2c5d2c(0x391)]);if(!_0x5eea75[_0x2c5d2c(0x18d)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this['_config']=_0x5eea75,this['_configService'][_0x2c5d2c(0x409)](m,_0x5eea75);}[_0x51c992(0x414)](){const _0x27eeda=_0x51c992;this[_0x27eeda(0x214)][_0x27eeda(0x409)](t[_0x27eeda(0x2af)],this[_0x27eeda(0x391)][_0x27eeda(0x491)]??[]),this[_0x27eeda(0x2bf)](),this[_0x27eeda(0x362)]();}[_0x51c992(0x2bf)](){const _0x25225d=_0x51c992;var _0x3fd2a2,_0x31dbe2;this[_0x25225d(0x4a1)][_0x25225d(0x2d4)](t['IUndoRedoService'])&&this[_0x25225d(0x396)][_0x25225d(0x420)]('[UniverCollaborationClientPlugin]','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!');let _0x491d01=(0x0,t[_0x25225d(0x260)])([[t[_0x25225d(0x390)],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this[_0x25225d(0x391)]['socketService']}],[e[_0x25225d(0x43c)],{'useClass':Z}],[t[_0x25225d(0x284)],{'useClass':G}],[t[_0x25225d(0x2f0)],{'useClass':J}],[nt,{'useClass':U}],[t['IMentionIOService'],{'useClass':Y}],[H],[tt]],(_0x3fd2a2=this[_0x25225d(0x391)])==null?void 0x0:_0x3fd2a2[_0x25225d(0x300)]);if(!((_0x31dbe2=this[_0x25225d(0x391)])!=null&&_0x31dbe2['enableSingleActiveInstanceLock'])){let _0x93b5c0=_0x491d01[_0x25225d(0x48f)](([_0xc9cc7d])=>_0xc9cc7d===C);_0x93b5c0!==-0x1&&_0x491d01['splice'](_0x93b5c0,0x1);}(0x0,t[_0x25225d(0x349)])(this[_0x25225d(0x4a1)],_0x491d01);}['_initDependencies'](){const _0x1ff06=_0x51c992;var _0x2c72af,_0x582561;if(this[_0x1ff06(0x4a1)]['get'](l['HTTPService'])[_0x1ff06(0x34d)]({'priority':0x14,'interceptor':(0x0,l['ThresholdInterceptorFactory'])({'maxParallel':0x6})}),!((_0x2c72af=this['_config'])!=null&&_0x2c72af[_0x1ff06(0x275)])){var _0x3dcd49;(_0x3dcd49=this[_0x1ff06(0x4a1)]['get'](x,t['Quantity'][_0x1ff06(0x277)]))==null||_0x3dcd49['disableLocalCache']();}(_0x582561=this[_0x1ff06(0x391)])!=null&&_0x582561[_0x1ff06(0x26d)]&&(0x0,t[_0x1ff06(0x378)])(this[_0x1ff06(0x4a1)],[[W]]),(0x0,t[_0x1ff06(0x378)])(this['_injector'],[[K],[H],[X]]);}};g($,'pluginName',_0x51c992(0x437)),g($,_0x51c992(0x3be),$e),g($,_0x51c992(0x21f),et),$=y([(0x0,t[_0x51c992(0x367)])(u[_0x51c992(0x445)],l[_0x51c992(0x2eb)],e[_0x51c992(0x2ff)]),v(0x1,t['ILogService']),v(0x2,(0x0,t['Inject'])(t['Injector'])),v(0x3,t[_0x51c992(0x46e)])],$),Object[_0x51c992(0x478)](exports,_0x51c992(0x3b7),{'enumerable':!0x0,'get':function(){return G;}}),Object['defineProperty'](exports,'AwaitingState',{'enumerable':!0x0,'get':function(){return k;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x270),{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x2ca),{'enumerable':!0x0,'get':function(){return I;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x3bc),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x51c992(0x49c)]=m,Object[_0x51c992(0x478)](exports,_0x51c992(0x2f8),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x44d),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x313),{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x370),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x318),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x186),{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x480),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x51c992(0x34f)]=Be,exports['CollaborationUIEventId']=ie,exports[_0x51c992(0x2fc)]=_,Object[_0x51c992(0x478)](exports,'CollaborativeUndoRedoService',{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x51c992(0x200)]=ae,Object[_0x51c992(0x478)](exports,_0x51c992(0x482),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x51c992(0x3fd)]=_0x51c992(0x3c5),exports['DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT']=_0x51c992(0x3fe),exports['DEFAULT_WS_SESSION_TICKET_URL']=_0x51c992(0x1fb),Object['defineProperty'](exports,_0x51c992(0x3b9),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x34c),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x40e),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x51c992(0x2e5)]=_0x51c992(0x3e7),exports['HEARTBEAT_TIMEOUT_KEY']=_0x51c992(0x240),exports[_0x51c992(0x410)]=nt,exports[_0x51c992(0x22b)]=Xe,exports[_0x51c992(0x359)]=qe,exports['ILocalCacheService']=x,exports[_0x51c992(0x346)]=We,exports[_0x51c992(0x358)]=C,exports[_0x51c992(0x243)]=0x3e8,exports[_0x51c992(0x2d3)]=_0x51c992(0x243),Object[_0x51c992(0x478)](exports,_0x51c992(0x1c3),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x1b8),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x203),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x1b7),{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x51c992(0x478)](exports,'PendingState',{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x51c992(0x23a)]=_0x51c992(0x327),exports['RETRY_CONNECTING_MAX_COUNT_KEY']=_0x51c992(0x303),exports[_0x51c992(0x1c2)]=ge,Object[_0x51c992(0x478)](exports,'SheetCollaborationEntity',{'enumerable':!0x0,'get':function(){return L;}}),Object['defineProperty'](exports,_0x51c992(0x325),{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,_0x51c992(0x351),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x471),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x487),{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x51c992(0x3d2)]=xe,Object['defineProperty'](exports,_0x51c992(0x19f),{'enumerable':!0x0,'get':function(){return $;}}),exports['createUniverCollaborationAdapter']=Ze,exports['deserializeToCombResponse']=Ge,exports[_0x51c992(0x3c3)]=ye,exports['serializeCombRequest']=Ke;
1
+ const _0x28bbb9=_0x53d0;(function(_0x595e4b,_0x280e2d){const _0x46e188=_0x53d0,_0x5aa3db=_0x595e4b();while(!![]){try{const _0x133258=parseInt(_0x46e188(0x45d))/0x1*(-parseInt(_0x46e188(0x2ce))/0x2)+parseInt(_0x46e188(0x416))/0x3*(-parseInt(_0x46e188(0x42c))/0x4)+parseInt(_0x46e188(0x1fc))/0x5*(-parseInt(_0x46e188(0x2a7))/0x6)+-parseInt(_0x46e188(0x4f2))/0x7+parseInt(_0x46e188(0x3be))/0x8+-parseInt(_0x46e188(0x25d))/0x9*(parseInt(_0x46e188(0x4af))/0xa)+parseInt(_0x46e188(0x4c8))/0xb;if(_0x133258===_0x280e2d)break;else _0x5aa3db['push'](_0x5aa3db['shift']());}catch(_0x57c9c6){_0x5aa3db['push'](_0x5aa3db['shift']());}}}(_0x1757,0xf26c5),Object['defineProperty'](exports,Symbol[_0x28bbb9(0x315)],{'value':'Module'}));let e=require('@univerjs/network'),t=require('rxjs'),n=require('@univerjs-pro/collaboration'),r=require('@univerjs/core'),i=require('@univerjs/docs'),a=require('@univerjs/sheets'),o=require('@univerjs/protocol'),s=require('@univerjs/telemetry'),c=require('rxjs/operators'),l=require('@univerjs-pro/slides'),u=require('@univerjs-pro/license'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js'),p=require('@univerjs/drawing');const m='collaboration-client.config',h={};function g(_0x1ccc31){'@babel/helpers - typeof';const _0x193dcf=_0x28bbb9;return g=typeof Symbol==_0x193dcf(0x258)&&typeof Symbol['iterator']==_0x193dcf(0x302)?function(_0x13f3a7){return typeof _0x13f3a7;}:function(_0x8e196){const _0x18c4e8=_0x193dcf;return _0x8e196&&typeof Symbol==_0x18c4e8(0x258)&&_0x8e196[_0x18c4e8(0x274)]===Symbol&&_0x8e196!==Symbol['prototype']?_0x18c4e8(0x302):typeof _0x8e196;},g(_0x1ccc31);}function ee(_0x9dc7ec,_0x2a6f7d){const _0x49b740=_0x28bbb9;if(g(_0x9dc7ec)!=_0x49b740(0x25b)||!_0x9dc7ec)return _0x9dc7ec;var _0xd2bae4=_0x9dc7ec[Symbol[_0x49b740(0x2d0)]];if(_0xd2bae4!==void 0x0){var _0x417900=_0xd2bae4['call'](_0x9dc7ec,_0x2a6f7d||'default');if(g(_0x417900)!=_0x49b740(0x25b))return _0x417900;throw TypeError(_0x49b740(0x205));}return(_0x2a6f7d===_0x49b740(0x2d4)?String:Number)(_0x9dc7ec);}function te(_0x256c48){const _0x49f750=_0x28bbb9;var _0x39add3=ee(_0x256c48,_0x49f750(0x2d4));return g(_0x39add3)==_0x49f750(0x302)?_0x39add3:_0x39add3+'';}function _(_0x296558,_0x4b7012,_0x41a371){const _0x4ea6dc=_0x28bbb9;return(_0x4b7012=te(_0x4b7012))in _0x296558?Object[_0x4ea6dc(0x41f)](_0x296558,_0x4b7012,{'value':_0x41a371,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x296558[_0x4b7012]=_0x41a371,_0x296558;}var ne=class{constructor(_0x1ce8a5,_0x2596b7,_0xe9bdcd={}){const _0x319a36=_0x28bbb9;this['_send']=_0x2596b7,this[_0x319a36(0x261)]=_0xe9bdcd,_(this,'_attempt',0x0),_(this,'_firstSentAt',void 0x0),_(this,_0x319a36(0x201),void 0x0),_(this,'_maxAckTimeout',void 0x0),_(this,_0x319a36(0x1c4),0x0),_(this,_0x319a36(0x44f),0x0),_(this,_0x319a36(0x510),null),_(this,_0x319a36(0x4ee),null),_(this,_0x319a36(0x48a),null),_(this,_0x319a36(0x247),0x0),_(this,_0x319a36(0x1c7),!0x1),_(this,_0x319a36(0x2a2),void 0x0),_(this,_0x319a36(0x255),void 0x0),this[_0x319a36(0x255)]=_0x1ce8a5,this[_0x319a36(0x201)]=_0xe9bdcd['ackTimeout']??0x4e20,this[_0x319a36(0x4cc)]=Math[_0x319a36(0x3fc)](_0xe9bdcd[_0x319a36(0x4ca)]??0x1d4c0,this[_0x319a36(0x201)]),this[_0x319a36(0x2a2)]=_0xe9bdcd[_0x319a36(0x4a3)]??(()=>Date[_0x319a36(0x4a3)]()),this[_0x319a36(0x4c4)]=this[_0x319a36(0x2a2)]();}get['reqId'](){const _0x27511b=_0x28bbb9;return this[_0x27511b(0x255)];}get[_0x28bbb9(0x543)](){const _0x3e9d36=_0x28bbb9;return this[_0x3e9d36(0x439)];}get[_0x28bbb9(0x4f0)](){const _0x24f7e2=_0x28bbb9;return this[_0x24f7e2(0x44f)];}get[_0x28bbb9(0x51a)](){const _0x51a368=_0x28bbb9;return this[_0x51a368(0x2a2)]()-this[_0x51a368(0x4c4)];}[_0x28bbb9(0x260)](_0x4517a2){const _0x1434e5=_0x28bbb9;if(this[_0x1434e5(0x1c7)])return;this['_source']=_0x4517a2;let _0xcaa421=this[_0x1434e5(0x4ee)];_0xcaa421&&(this[_0x1434e5(0x4ee)]=null,this[_0x1434e5(0x2ed)](_0xcaa421));}[_0x28bbb9(0x3ef)](){const _0x35a47d=_0x28bbb9;this[_0x35a47d(0x48a)]=null;}[_0x28bbb9(0x1c1)](_0x12c0c5,_0x1cd681,_0x52f27f){const _0x16cabd=_0x28bbb9;this[_0x16cabd(0x1c7)]||(_0x52f27f&&this[_0x16cabd(0x53f)](_0x52f27f),this['armAckTimeout'](),this[_0x16cabd(0x470)](_0x12c0c5),this['_reqId']=_0x12c0c5[_0x16cabd(0x4cd)]??this['_reqId'],_0x52f27f&&this[_0x16cabd(0x451)](_0x52f27f,_0x1cd681));}[_0x28bbb9(0x25e)](){const _0x713283=_0x28bbb9;this['_schedule'](this['_ackTimeout'],_0x713283(0x23f));}['requestRetry'](){const _0x300c1d=_0x28bbb9;this[_0x300c1d(0x3d2)](this['_retryBackoff'],'should_retry');}[_0x28bbb9(0x3ac)](){const _0x39da6d=_0x28bbb9;this[_0x39da6d(0x1c7)]=!0x0,this[_0x39da6d(0x3d4)](),this[_0x39da6d(0x48a)]=null,this[_0x39da6d(0x4ee)]=null;}[_0x28bbb9(0x470)](_0x181324){const _0x5d67a1=_0x28bbb9;let _0x289cba=++this[_0x5d67a1(0x247)],_0x406055;try{_0x406055=this[_0x5d67a1(0x31a)](_0x181324,{'timeout':this['_ackTimeout']});}catch(_0x3ff000){this[_0x5d67a1(0x259)](_0x289cba,_0x3ff000);return;}_0x406055 instanceof Promise&&_0x406055[_0x5d67a1(0x4a4)](_0x5ad0b3=>this[_0x5d67a1(0x259)](_0x289cba,_0x5ad0b3));}[_0x28bbb9(0x259)](_0x164a1d,_0x50c847){const _0x147c03=_0x28bbb9;if(this[_0x147c03(0x1c7)]||_0x164a1d!==this[_0x147c03(0x247)])return;let _0x2f5981=re(_0x50c847,this[_0x147c03(0x1c4)]);_0x2f5981!==null&&this[_0x147c03(0x3d2)](_0x2f5981,_0x147c03(0x27e));}['_schedule'](_0x14b52a,_0xf8330d){const _0x5e4230=_0x28bbb9;this[_0x5e4230(0x1c7)]||(this[_0x5e4230(0x3d4)](),this[_0x5e4230(0x4ee)]=null,this[_0x5e4230(0x44f)]=_0x14b52a,this[_0x5e4230(0x510)]=setTimeout(()=>{const _0x43afd7=_0x5e4230;this[_0x43afd7(0x510)]=null,this['_source']?this[_0x43afd7(0x2ed)](_0xf8330d):this[_0x43afd7(0x4ee)]=_0xf8330d;},_0x14b52a));}[_0x28bbb9(0x2ed)](_0xb0c1d3){const _0xd32630=_0x28bbb9;let _0x5f2f53=this['_source'];if(!_0x5f2f53||this[_0xd32630(0x1c7)])return;let {changeset:_0x54a2b5,unsyncedMutationCount:_0x4fdc76}=_0x5f2f53();this[_0xd32630(0x53f)](_0xb0c1d3),this[_0xd32630(0x25e)](),this[_0xd32630(0x470)](_0x54a2b5),this[_0xd32630(0x255)]=_0x54a2b5[_0xd32630(0x4cd)]??this[_0xd32630(0x255)],this['_notifyResend'](_0xb0c1d3,_0x4fdc76);}[_0x28bbb9(0x53f)](_0x340792){const _0x3f3b03=_0x28bbb9;this[_0x3f3b03(0x439)]+=0x1,_0x340792==='should_retry'||_0x340792===_0x3f3b03(0x27e)?this[_0x3f3b03(0x1c4)]=this['_retryBackoff']===0x0?0x3e8:Math[_0x3f3b03(0x492)](this[_0x3f3b03(0x1c4)]*0x2,0x4e20):_0x340792===_0x3f3b03(0x23f)&&(this['_ackTimeout']=Math[_0x3f3b03(0x492)](this[_0x3f3b03(0x201)]*0x2,this[_0x3f3b03(0x4cc)]));}['_notifyResend'](_0x3c175a,_0x3d2cb3){const _0x354118=_0x28bbb9;var _0x5f4cc7,_0x448dd7;this[_0x354118(0x1c7)]||(_0x5f4cc7=(_0x448dd7=this[_0x354118(0x261)])[_0x354118(0x526)])==null||_0x5f4cc7[_0x354118(0x446)](_0x448dd7,{'reqId':this[_0x354118(0x255)],'reason':_0x3c175a,'attempt':this['_attempt'],'elapsedMs':this[_0x354118(0x51a)],'unsyncedMutationCount':_0x3d2cb3,'nextDelayMs':this['_ackTimeout']});}['_clearTimer'](){const _0x57958c=_0x28bbb9;this[_0x57958c(0x510)]!=null&&(clearTimeout(this[_0x57958c(0x510)]),this[_0x57958c(0x510)]=null);}};function re(_0x3abeb6,_0x5624ea){const _0x2c8002=_0x28bbb9;if(_0x3abeb6 instanceof t[_0x2c8002(0x4bc)])return null;if(_0x3abeb6 instanceof e['HTTPResponseError']){let _0x501ec1=_0x3abeb6[_0x2c8002(0x290)]??0x0;return _0x501ec1===0x0||_0x501ec1===0x198||_0x501ec1===0x1ad||_0x501ec1>=0x1f4?Math[_0x2c8002(0x3fc)](_0x5624ea,ie(_0x3abeb6)):null;}return _0x5624ea;}function ie(_0x14f364){const _0x33a044=_0x28bbb9;var _0x31bb9e;let _0x3c9446=(_0x31bb9e=_0x14f364[_0x33a044(0x1bd)])==null||(_0x31bb9e=_0x31bb9e['get']('retry-after'))==null?void 0x0:_0x31bb9e[0x0],_0x6eaed0=_0x3c9446===void 0x0?NaN:Number(_0x3c9446);return Number[_0x33a044(0x425)](_0x6eaed0)&&_0x6eaed0>0x0?_0x6eaed0*0x3e8:0x0;}function ae(_0x19bc83){const _0x5dff42=_0x28bbb9;return JSON[_0x5dff42(0x4d3)](_0x19bc83)[_0x5dff42(0x47a)];}let oe=function(_0x484f59){const _0x2e3d21=_0x28bbb9;return _0x484f59[_0x2e3d21(0x4da)]='OTHER_CLIENT_EDITING',_0x484f59['PERMISSION_DENIED']=_0x2e3d21(0x1d7),_0x484f59[_0x2e3d21(0x4b3)]=_0x2e3d21(0x4b3),_0x484f59[_0x2e3d21(0x503)]='CONFLICT_CACHE_CLEAR_FAILED',_0x484f59['CONFLICT']='CONFLICT',_0x484f59[_0x2e3d21(0x2f0)]=_0x2e3d21(0x2f0),_0x484f59['JOIN_ROOM_FAILED']=_0x2e3d21(0x353),_0x484f59['SOCKET_FAILED_RETRY']='SOCKET_FAILED_RETRY',_0x484f59[_0x2e3d21(0x46b)]='SOCKET_FAILED',_0x484f59[_0x2e3d21(0x20a)]=_0x2e3d21(0x20a),_0x484f59;}({});var v=class{constructor(){const _0x218013=_0x28bbb9;_(this,_0x218013(0x228),new t[(_0x218013(0x39a))]()),_(this,_0x218013(0x2f3),this[_0x218013(0x228)][_0x218013(0x32f)]());}['emitEvent'](_0x33a58e){this['_event$']['next'](_0x33a58e);}},se=class{constructor(){const _0x27ac54=_0x28bbb9;_(this,_0x27ac54(0x54d),new t[(_0x27ac54(0x39a))]()),_(this,_0x27ac54(0x224),this[_0x27ac54(0x54d)][_0x27ac54(0x32f)]());}['onCommentUpdate'](_0x37de6a){const _0x2c5971=_0x28bbb9;this[_0x2c5971(0x54d)]['next'](_0x37de6a);}};function y(_0x3d6b4a,_0x40849a){return function(_0x2a0a14,_0x5eb887){_0x40849a(_0x2a0a14,_0x5eb887,_0x3d6b4a);};}function b(_0x33dc08,_0x2dabac,_0x410ee0,_0x514fbf){const _0x521219=_0x28bbb9;var _0x25abde=arguments[_0x521219(0x47a)],_0x20b739=_0x25abde<0x3?_0x2dabac:_0x514fbf===null?_0x514fbf=Object[_0x521219(0x3f2)](_0x2dabac,_0x410ee0):_0x514fbf,_0x3eb2b6;if(typeof Reflect==_0x521219(0x25b)&&typeof Reflect['decorate']=='function')_0x20b739=Reflect[_0x521219(0x360)](_0x33dc08,_0x2dabac,_0x410ee0,_0x514fbf);else{for(var _0xa6da60=_0x33dc08[_0x521219(0x47a)]-0x1;_0xa6da60>=0x0;_0xa6da60--)(_0x3eb2b6=_0x33dc08[_0xa6da60])&&(_0x20b739=(_0x25abde<0x3?_0x3eb2b6(_0x20b739):_0x25abde>0x3?_0x3eb2b6(_0x2dabac,_0x410ee0,_0x20b739):_0x3eb2b6(_0x2dabac,_0x410ee0))||_0x20b739);}return _0x25abde>0x3&&_0x20b739&&Object[_0x521219(0x41f)](_0x2dabac,_0x410ee0,_0x20b739),_0x20b739;}let x=class extends r[_0x28bbb9(0x3ad)]{constructor(_0x5601b1){const _0x5ab4c3=_0x28bbb9;super(),this[_0x5ab4c3(0x4b7)]=_0x5601b1,_(this,_0x5ab4c3(0x2b0),new Map()),_(this,_0x5ab4c3(0x27d),new t[(_0x5ab4c3(0x39a))]()),this[_0x5ab4c3(0x457)]((0x0,t[_0x5ab4c3(0x3e1)])(this[_0x5ab4c3(0x4b7)][_0x5ab4c3(0x3ce)](r['UniverInstanceType'][_0x5ab4c3(0x486)])[_0x5ab4c3(0x213)]((0x0,c[_0x5ab4c3(0x485)])(_0x4196d4=>_0x4196d4[_0x5ab4c3(0x3e7)]())),this[_0x5ab4c3(0x4b7)]['getTypeOfUnitDisposed$'](r[_0x5ab4c3(0x24b)][_0x5ab4c3(0x297)])[_0x5ab4c3(0x213)]((0x0,c['map'])(_0x1b30bf=>_0x1b30bf[_0x5ab4c3(0x3e7)]())),this['_univerInstanceService']['getTypeOfUnitDisposed$'](r[_0x5ab4c3(0x24b)]['UNIVER_BOARD'])['pipe']((0x0,c[_0x5ab4c3(0x485)])(_0x3e2cee=>_0x3e2cee[_0x5ab4c3(0x3e7)]())),this[_0x5ab4c3(0x4b7)][_0x5ab4c3(0x3ce)](r[_0x5ab4c3(0x24b)][_0x5ab4c3(0x3bb)])[_0x5ab4c3(0x213)]((0x0,c[_0x5ab4c3(0x485)])(_0x306803=>_0x306803[_0x5ab4c3(0x3e7)]())))['subscribe'](_0x3a3fc1=>this[_0x5ab4c3(0x568)](_0x3a3fc1)));}[_0x28bbb9(0x52c)](_0x403f7d){const _0x540622=_0x28bbb9;return this[_0x540622(0x2b0)][_0x540622(0x546)](_0x403f7d)?(0x0,t['of'])(this['_roomMembers']['get'](_0x403f7d)):this[_0x540622(0x27d)][_0x540622(0x213)]((0x0,c[_0x540622(0x485)])(_0x5efc94=>{const _0x545475=_0x540622;if(_0x5efc94===_0x403f7d)return this['_roomMembers'][_0x545475(0x285)](_0x5efc94);}));}['updateMember'](_0x2f3c2a,_0x55042a){const _0x30992b=_0x28bbb9;let _0x3261f8=this[_0x30992b(0x2b0)][_0x30992b(0x285)](_0x2f3c2a);_0x3261f8||(_0x3261f8=new ce(),this[_0x30992b(0x2b0)][_0x30992b(0x36a)](_0x2f3c2a,_0x3261f8),this['_roomCreated$'][_0x30992b(0x512)](_0x2f3c2a)),_0x3261f8[_0x30992b(0x434)](_0x55042a);}[_0x28bbb9(0x1d1)](_0x2c98f7,_0x556961){const _0x145000=_0x28bbb9;let _0x79b7d2=this[_0x145000(0x2b0)][_0x145000(0x285)](_0x2c98f7);_0x79b7d2&&_0x79b7d2[_0x145000(0x1d1)](_0x556961);}[_0x28bbb9(0x2f9)](_0x37c7ad){const _0xc895b3=_0x28bbb9;return this['_roomMembers'][_0xc895b3(0x285)](_0x37c7ad);}[_0x28bbb9(0x262)](_0x3b076f,_0x2fdfa7){const _0x2f6abc=_0x28bbb9;let _0x856721=this[_0x2f6abc(0x2b0)][_0x2f6abc(0x285)](_0x3b076f);if(_0x856721)return _0x856721[_0x2f6abc(0x262)](_0x2fdfa7);}[_0x28bbb9(0x568)](_0x41d259){const _0x556706=_0x28bbb9;let _0xe79f89=this[_0x556706(0x2b0)]['get'](_0x41d259);_0xe79f89&&(_0xe79f89[_0x556706(0x3ac)](),this['_roomMembers']['delete'](_0x41d259));}['dispose'](){const _0x204d50=_0x28bbb9;this[_0x204d50(0x2b0)]['forEach'](_0x1a030b=>_0x1a030b[_0x204d50(0x3ac)]()),this['_roomMembers']['clear'](),this[_0x204d50(0x27d)][_0x204d50(0x30f)]();}};x=b([y(0x0,r[_0x28bbb9(0x51c)])],x);var ce=class extends r[_0x28bbb9(0x3ad)]{constructor(..._0x5c4d20){const _0x18f845=_0x28bbb9;super(..._0x5c4d20),_(this,_0x18f845(0x30d),new Map()),_(this,_0x18f845(0x2e5),new t[(_0x18f845(0x45f))](this[_0x18f845(0x30d)])),_(this,_0x18f845(0x441),this['_members$'][_0x18f845(0x32f)]());}[_0x28bbb9(0x3ac)](){const _0x54d3b5=_0x28bbb9;this[_0x54d3b5(0x30d)][_0x54d3b5(0x311)](),this[_0x54d3b5(0x2e5)]['complete']();}['updateMember'](_0x1b77ba){const _0x2f2274=_0x28bbb9;this[_0x2f2274(0x30d)][_0x2f2274(0x36a)](_0x1b77ba[_0x2f2274(0x362)],_0x1b77ba),this[_0x2f2274(0x1d2)]();}[_0x28bbb9(0x1d1)](_0x538894){const _0x43929b=_0x28bbb9;this[_0x43929b(0x30d)][_0x43929b(0x551)](_0x538894),this[_0x43929b(0x1d2)]();}[_0x28bbb9(0x262)](_0x584756){const _0x4762ae=_0x28bbb9;return this[_0x4762ae(0x30d)][_0x4762ae(0x285)](_0x584756);}[_0x28bbb9(0x393)](){const _0x3782f5=_0x28bbb9;return Array[_0x3782f5(0x3f8)](this[_0x3782f5(0x30d)]['values']());}[_0x28bbb9(0x1d2)](){this['_members$']['next'](this['_members']);}};function le(_0x6b064c,_0x20f2ca){const _0x587b16=_0x28bbb9;if(de(_0x6b064c))return _0x20f2ca;if(_0x20f2ca[_0x587b16(0x2ff)]===n[_0x587b16(0x33f)][_0x587b16(0x296)]){let _0x4bb809=ge(_0x6b064c),_0x1f7e0b=_0x20f2ca;return{..._0x1f7e0b,'data':{..._0x1f7e0b[_0x587b16(0x350)],'unitID':_0x6b064c[_0x587b16(0x29d)][_0x587b16(0x212)],'unitType':_0x6b064c[_0x587b16(0x29d)][_0x587b16(0x3da)]??_0x1f7e0b['data'][_0x587b16(0x3da)],'changeset':_0x4bb809[_0x587b16(0x407)](_0x1f7e0b['data'][_0x587b16(0x2d9)],_e(_0x6b064c))}};}if(_0x20f2ca[_0x587b16(0x2ff)]===n[_0x587b16(0x33f)]['FETCH_MISSING']){let _0x2db5ec=_0x20f2ca;return{..._0x2db5ec,'data':{..._0x2db5ec[_0x587b16(0x350)],'unitID':_0x6b064c[_0x587b16(0x29d)][_0x587b16(0x212)],'unitType':_0x6b064c[_0x587b16(0x29d)][_0x587b16(0x3da)]??_0x2db5ec[_0x587b16(0x350)][_0x587b16(0x3da)]}};}return _0x20f2ca;}function ue(_0x5f5ced,_0x437dfc){const _0x4310ad=_0x28bbb9;if(de(_0x5f5ced))return[_0x437dfc];switch(_0x437dfc[_0x4310ad(0x2ff)]){case n[_0x4310ad(0x33f)][_0x4310ad(0x49b)]:return[fe(_0x5f5ced,_0x437dfc)];case n[_0x4310ad(0x33f)]['PSEUDO_FETCH_MISSING_RESULT']:return[me(_0x5f5ced,_0x437dfc)];case n[_0x4310ad(0x33f)][_0x4310ad(0x422)]:return[pe(_0x5f5ced,_0x437dfc)];default:return[_0x437dfc];}}function de(_0x2093da){const _0x32f645=_0x28bbb9;return _0x2093da['target'][_0x32f645(0x1e4)]==null&&_0x2093da[_0x32f645(0x29d)][_0x32f645(0x212)]===_0x2093da[_0x32f645(0x4f9)]&&!_0x2093da[_0x32f645(0x2d9)];}function fe(_0x19cf3e,_0x4dabf3){const _0x3b2dc4=_0x28bbb9;return{..._0x4dabf3,'data':(0x0,n[_0x3b2dc4(0x50d)])(he(_0x19cf3e,(0x0,n[_0x3b2dc4(0x4e4)])(_0x4dabf3[_0x3b2dc4(0x350)])))};}function pe(_0x5b2733,_0x43ac4d){const _0x434554=_0x28bbb9;return{..._0x43ac4d,'data':he(_0x5b2733,_0x43ac4d[_0x434554(0x350)])};}function me(_0x1878a1,_0x4057bd){const _0x522930=_0x28bbb9;let _0x533b0a=_0x4057bd[_0x522930(0x350)];return{..._0x4057bd,'data':{..._0x533b0a,'changesets':_0x533b0a[_0x522930(0x509)][_0x522930(0x485)](_0x4a6660=>(0x0,n['parseChangesetToProtocol'])(he(_0x1878a1,(0x0,n[_0x522930(0x4e4)])(_0x4a6660))))}};}function he(_0x53acd4,_0x6c88cb){const _0xa9f688=_0x28bbb9;return ge(_0x53acd4)[_0xa9f688(0x231)](_0x6c88cb,_e(_0x53acd4));}function ge(_0x324662){const _0x5360ed=_0x28bbb9;if(!_0x324662['changeset'])throw Error(_0x5360ed(0x3f6));return _0x324662[_0x5360ed(0x2d9)];}function _e(_0x4a70c7){const _0x4dfc29=_0x28bbb9;return{'localUnitId':_0x4a70c7[_0x4dfc29(0x4f9)],'unitType':_0x4a70c7[_0x4dfc29(0x3da)],'target':_0x4a70c7[_0x4dfc29(0x29d)]};}let ve=function(_0x369069){const _0x1ecc87=_0x28bbb9;return _0x369069[_0x369069[_0x1ecc87(0x237)]=0x0]=_0x1ecc87(0x237),_0x369069[_0x369069[_0x1ecc87(0x4f1)]=0x1]=_0x1ecc87(0x4f1),_0x369069[_0x369069[_0x1ecc87(0x35a)]=0x2]=_0x1ecc87(0x35a),_0x369069[_0x369069['ONLINE']=0x3]='ONLINE',_0x369069;}({});const ye={[o[_0x28bbb9(0x2e7)][_0x28bbb9(0x316)]]:'session.join-failed',[o['CmdRspCode']['JOIN_ROOM_FULL']]:_0x28bbb9(0x1e5),[o[_0x28bbb9(0x2e7)]['JOIN_ROOM_NOT_EXISTS']]:_0x28bbb9(0x4e0),[o[_0x28bbb9(0x2e7)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x28bbb9(0x26e),[o[_0x28bbb9(0x2e7)][_0x28bbb9(0x44e)]]:_0x28bbb9(0x437)};let S=class extends r[_0x28bbb9(0x22c)]{get['sessionStatus'](){const _0x1ee7d1=_0x28bbb9;return this[_0x1ee7d1(0x537)]['getValue']();}constructor(_0x250ecd,_0x3e5de1,_0x3a2b56,_0x173abb,_0x390966,_0x2544f1,_0x5aa390){const _0x2a9a41=_0x28bbb9;super(),this[_0x2a9a41(0x399)]=_0x250ecd,this[_0x2a9a41(0x41e)]=_0x3a2b56,this[_0x2a9a41(0x334)]=_0x173abb,this['_commentService']=_0x390966,this[_0x2a9a41(0x3b5)]=_0x2544f1,this['_telemetryService']=_0x5aa390,_(this,'_sessionStatus$',new t[(_0x2a9a41(0x45f))](0x0)),_(this,_0x2a9a41(0x3f5),this[_0x2a9a41(0x537)]['asObservable']()),_(this,_0x2a9a41(0x228),new t[(_0x2a9a41(0x39a))]()),_(this,_0x2a9a41(0x2f3),this['_event$']['asObservable']()),_(this,_0x2a9a41(0x308),void 0x0),_(this,_0x2a9a41(0x37e),void 0x0),_(this,_0x2a9a41(0x2ee),!0x1),_(this,_0x2a9a41(0x508),null),this[_0x2a9a41(0x2ee)]=!!this[_0x2a9a41(0x553)],_0x3e5de1[_0x2a9a41(0x213)]((0x0,t[_0x2a9a41(0x418)])(this[_0x2a9a41(0x55d)]))[_0x2a9a41(0x264)](_0x5dd4f5=>{const _0x182b23=_0x2a9a41;if(_0x5dd4f5!==void 0x0){if(this[_0x182b23(0x308)]=_0x5dd4f5,_0x5dd4f5)this[_0x182b23(0x514)](_0x5dd4f5),this['_socketMessageSubscription']=_0x5dd4f5[_0x182b23(0x3fa)][_0x182b23(0x264)](_0xcbe643=>{const _0x5880d6=_0x182b23;_0xcbe643[_0x5880d6(0x1e3)]===this[_0x5880d6(0x399)][_0x5880d6(0x29d)][_0x5880d6(0x212)]&&this[_0x5880d6(0x4a6)](_0xcbe643);});else{var _0x477c32;this['_throwTelemetryCollaborationNewChangeset'](),this[_0x182b23(0x537)][_0x182b23(0x512)](0x2),(_0x477c32=this[_0x182b23(0x37e)])==null||_0x477c32[_0x182b23(0x3c7)](),this[_0x182b23(0x37e)]=null;}}});}[_0x28bbb9(0x268)](){const _0x234d90=_0x28bbb9;var _0x161b51;return((_0x161b51=this[_0x234d90(0x308)])==null?void 0x0:_0x161b51[_0x234d90(0x362)])??null;}[_0x28bbb9(0x3ac)](){const _0x1825c5=_0x28bbb9;super[_0x1825c5(0x3ac)](),this[_0x1825c5(0x326)](),this[_0x1825c5(0x55d)][_0x1825c5(0x512)](),this['dispose$']['complete']();}[_0x28bbb9(0x326)](){const _0x5aacad=_0x28bbb9;var _0x125e2f;this[_0x5aacad(0x39e)](),(_0x125e2f=this[_0x5aacad(0x308)])==null||_0x125e2f[_0x5aacad(0x1d8)]({'cmd':o[_0x5aacad(0x291)]['LEAVE'],'data':{'roomID':this['_identity'][_0x5aacad(0x29d)]['unitId']}}),this[_0x5aacad(0x228)][_0x5aacad(0x30f)](),this[_0x5aacad(0x537)][_0x5aacad(0x30f)]();}[_0x28bbb9(0x4a6)](_0x399e34){const _0x497f6e=_0x28bbb9;_0x399e34[_0x497f6e(0x329)]===o[_0x497f6e(0x291)]['JOIN']?this[_0x497f6e(0x1f9)](_0x399e34):_0x399e34[_0x497f6e(0x329)]===o[_0x497f6e(0x291)][_0x497f6e(0x540)]&&this[_0x497f6e(0x272)](_0x399e34);}[_0x28bbb9(0x514)](_0x12ed63){const _0x1e273d=_0x28bbb9;this[_0x1e273d(0x537)]['next'](0x1),_0x12ed63['send']({'cmd':o['CombCmd'][_0x1e273d(0x21f)],'routeKey':this['_identity'][_0x1e273d(0x29d)]['unitId'],'routeType':'','data':{'rooms':[{'roomID':this[_0x1e273d(0x399)][_0x1e273d(0x29d)]['unitId']}]}});}[_0x28bbb9(0x1f9)](_0x5cd57d){const _0x3f4411=_0x28bbb9;var _0x391949;if(_0x5cd57d[_0x3f4411(0x4d2)]in ye){this[_0x3f4411(0x3b5)][_0x3f4411(0x40c)]({'id':_0x3f4411(0x353),'data':ye[_0x5cd57d[_0x3f4411(0x4d2)]]}),this['_sessionStatus$'][_0x3f4411(0x512)](0x2);return;}this[_0x3f4411(0x537)]['next'](0x3);let _0x4401e7=(_0x391949=_0x5cd57d[_0x3f4411(0x350)][_0x3f4411(0x204)][this['_identity']['target'][_0x3f4411(0x212)]])==null?void 0x0:_0x391949[_0x3f4411(0x2c6)];_0x4401e7&&_0x4401e7[_0x3f4411(0x3e9)](_0xfbf782=>this[_0x3f4411(0x334)]['updateMember'](this[_0x3f4411(0x399)]['localUnitId'],_0xfbf782));}[_0x28bbb9(0x272)](_0x5ac1db){const _0x18da65=_0x28bbb9;try{let _0x488d7e=ue(this['_identity'],_0x5ac1db[_0x18da65(0x350)]);for(let _0x2778df of _0x488d7e)switch(_0x2778df['eventID']){case n['CollaborationEvent'][_0x18da65(0x313)]:this[_0x18da65(0x330)](_0x2778df),this[_0x18da65(0x228)]['next'](_0x2778df);break;case n['CollaborationEvent'][_0x18da65(0x3e8)]:this['_onUserLeave'](_0x2778df),this[_0x18da65(0x228)][_0x18da65(0x512)](_0x2778df);break;case n[_0x18da65(0x33f)][_0x18da65(0x31f)]:case n[_0x18da65(0x33f)][_0x18da65(0x422)]:this[_0x18da65(0x3dc)](),this[_0x18da65(0x228)][_0x18da65(0x512)](_0x2778df);break;case n[_0x18da65(0x33f)][_0x18da65(0x346)]:this[_0x18da65(0x41e)][_0x18da65(0x456)](_0x18da65(0x4c7)+JSON['stringify'](_0x2778df)),this[_0x18da65(0x228)][_0x18da65(0x512)](_0x2778df);break;case n[_0x18da65(0x33f)][_0x18da65(0x43c)]:this[_0x18da65(0x1cb)]['onCommentUpdate'](_0x2778df[_0x18da65(0x350)]),this['_event$'][_0x18da65(0x512)](_0x2778df);break;default:this['_event$'][_0x18da65(0x512)](_0x2778df);}}catch(_0x2815f4){this['_logService'][_0x18da65(0x456)](_0x2815f4,_0x5ac1db);}}[_0x28bbb9(0x330)](_0x1ed8aa){const _0x46cab2=_0x28bbb9;this['_memberService'][_0x46cab2(0x434)](this[_0x46cab2(0x399)][_0x46cab2(0x4f9)],_0x1ed8aa['data']);}['_onUserLeave'](_0x3ef6b8){const _0x387077=_0x28bbb9;this['_memberService']['removeMember'](this[_0x387077(0x399)][_0x387077(0x4f9)],_0x3ef6b8['data'][_0x387077(0x362)]);}async[_0x28bbb9(0x1d8)](_0x12194b,_0xc749be,_0x51e855){const _0x5a5fec=_0x28bbb9;if(this[_0x5a5fec(0x3a8)]!==0x3||!this['_socket'])throw Error(_0x5a5fec(0x414));try{let _0x1e4a69=le(this[_0x5a5fec(0x399)],_0x12194b);_0x1e4a69[_0x5a5fec(0x2ff)]===n['CollaborationEvent']['SUBMIT_CHANGESET']&&this[_0x5a5fec(0x467)](_0x1e4a69);let _0x15f29e={'cmd':o[_0x5a5fec(0x291)][_0x5a5fec(0x31c)],'routeKey':this['_identity'][_0x5a5fec(0x29d)]['unitId'],'routeType':'','data':_0x1e4a69};return _0x51e855===void 0x0?this['_socket'][_0x5a5fec(0x1d8)](_0x15f29e):this[_0x5a5fec(0x308)][_0x5a5fec(0x1d8)](_0x15f29e,_0x51e855);}catch(_0x2c6c04){this[_0x5a5fec(0x41e)]['error'](_0x2c6c04);}}[_0x28bbb9(0x467)](_0x1353de){const _0x208e3e=_0x28bbb9;if(!this[_0x208e3e(0x2ee)])return;let {data:_0x5156ae}=_0x1353de,{unitID:_0x419f7f,changeset:_0x460159}=_0x5156ae,{mutations:_0x453943,type:_0x33dde1}=_0x460159;this[_0x208e3e(0x508)]={'unitId':_0x419f7f,'type':_0x33dde1,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':ae(_0x453943)};}[_0x28bbb9(0x3dc)](){const _0x5c7082=_0x28bbb9;this[_0x5c7082(0x2ee)]&&(this[_0x5c7082(0x508)]?(this['_telemetryInfo']['stopTime']=performance['now'](),this[_0x5c7082(0x508)][_0x5c7082(0x211)]=this[_0x5c7082(0x508)][_0x5c7082(0x2c5)]-this[_0x5c7082(0x508)][_0x5c7082(0x53a)],this['_telemetryService'][_0x5c7082(0x4d1)](_0x5c7082(0x3bc),this[_0x5c7082(0x508)]),this[_0x5c7082(0x508)]=null):this[_0x5c7082(0x41e)]['error']('[CollaborationSession]',_0x5c7082(0x28f)));}['_throwTelemetryCollaborationNewChangeset'](){const _0x3dfaa1=_0x28bbb9;this[_0x3dfaa1(0x508)]=null;}};S=b([y(0x2,r[_0x28bbb9(0x369)]),y(0x3,(0x0,r[_0x28bbb9(0x431)])(x)),y(0x4,(0x0,r[_0x28bbb9(0x431)])(se)),y(0x5,(0x0,r['Inject'])(v)),y(0x6,(0x0,r[_0x28bbb9(0x1cd)])(s[_0x28bbb9(0x558)]))],S);const C=(0x0,r[_0x28bbb9(0x45b)])(_0x28bbb9(0x21d));function be(_0x505801,_0x3acce1){const _0x23b2ef=_0x28bbb9;return _0x3acce1===''||_0x3acce1==null?_0x23b2ef(0x1c3)+_0x505801:_0x23b2ef(0x1c3)+_0x505801+'-'+encodeURIComponent(_0x3acce1);}function xe(_0x23f990){const _0x530660=_0x28bbb9;let {unitID:_0x5e4ddb,mutations:_0xb801eb}=_0x23f990;return{'unitId':_0x5e4ddb,'subUnitId':_0xb801eb[_0x530660(0x47a)]>0x0?_0xb801eb[0x0][_0x530660(0x453)][_0x530660(0x3f9)]:null};}let w=class{constructor(_0x5aff56,_0x171c47,_0x15a562){const _0x3213ca=_0x28bbb9;this[_0x3213ca(0x475)]=_0x5aff56,this[_0x3213ca(0x1f2)]=_0x171c47,this[_0x3213ca(0x2db)]=_0x15a562;}[_0x28bbb9(0x2df)](_0x36d572){const _0x149e15=_0x28bbb9;var _0x52c233,_0x2d30ad;let _0x2679c3=this['_injector'][_0x149e15(0x285)](a['SheetsSelectionsService']),{unitId:_0x2ded11,subUnitId:_0x2e0eb2}=xe(_0x36d572),_0x1f2afe=_0x2679c3==null?void 0x0:_0x2679c3[_0x149e15(0x210)](_0x2ded11)['getCurrentSelections'](),_0x3c30ac=(_0x52c233=this['_instanceService'][_0x149e15(0x1e2)](_0x2ded11))==null||(_0x52c233=_0x52c233[_0x149e15(0x1db)]())==null?void 0x0:_0x52c233[_0x149e15(0x388)]();if(_0x1f2afe['length']===0x0||!_0x2ded11||!_0x2e0eb2)return;let _0x50e951=[{'id':a[_0x149e15(0x2a3)]['id'],'params':{'unitId':_0x2ded11,'subUnitId':_0x3c30ac,'selections':r[_0x149e15(0x4cf)][_0x149e15(0x417)](_0x1f2afe)}}],_0x88490a=this[_0x149e15(0x1f2)][_0x149e15(0x541)](_0x36d572,_0x50e951);if(!(0x0,n['isTransformMutationsWithChangesetSuccess'])(_0x88490a))throw _0x88490a[_0x149e15(0x456)];let _0x48bde5=(_0x2d30ad=_0x88490a[_0x149e15(0x3bd)][0x0])==null||(_0x2d30ad=_0x2d30ad['params'])==null?void 0x0:_0x2d30ad[_0x149e15(0x3c1)];if(Array[_0x149e15(0x2e8)](_0x48bde5)&&_0x48bde5[_0x149e15(0x47a)]){if(_0x48bde5['length']===_0x50e951[0x0][_0x149e15(0x453)][_0x149e15(0x3c1)][_0x149e15(0x47a)]&&_0x48bde5[_0x149e15(0x219)]((_0x1d1777,_0x1ac32b)=>r[_0x149e15(0x3e3)][_0x149e15(0x4c2)](_0x1d1777[_0x149e15(0x2ae)],_0x50e951[0x0]['params'][_0x149e15(0x3c1)][_0x1ac32b][_0x149e15(0x2ae)])))return;this[_0x149e15(0x475)]['get'](r[_0x149e15(0x382)])[_0x149e15(0x2bd)](a['SetSelectionsOperation']['id'],{'unitId':_0x2ded11,'subUnitId':_0x3c30ac,'selections':_0x48bde5});}}};w=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x1,n[_0x28bbb9(0x4fc)]),y(0x2,r['IUniverInstanceService'])],w);const T=(0x0,r[_0x28bbb9(0x45b)])(_0x28bbb9(0x3a6));let Se=function(_0x26309b){const _0x41638f=_0x28bbb9;return _0x26309b[_0x26309b['NO_OTHER_CLIENTS_EDITING']=0x0]='NO_OTHER_CLIENTS_EDITING',_0x26309b[_0x26309b['OTHER_CLIENTS_EDITING']=0x1]=_0x41638f(0x2eb),_0x26309b;}({});function Ce(_0xd6c3f0){const _0x1fe896=_0x28bbb9;var _0x234dbd;return!!((_0x234dbd=_0xd6c3f0[_0x1fe896(0x453)])!=null&&_0x234dbd[_0x1fe896(0x236)]);}const we=new Set([a[_0x28bbb9(0x1c5)]['id']]),Te=new Set([l[_0x28bbb9(0x4bb)]['id'],l['EnsureSlideMasterPageMutation']['id'],l[_0x28bbb9(0x1ba)]['id'],l[_0x28bbb9(0x56b)]['id']]);function Ee(_0x5a6432,_0x59741e=we){const _0x3297c0=_0x28bbb9;let _0x2d78ae=[];for(let _0xdc67c6 of _0x5a6432){if(_0x59741e[_0x3297c0(0x546)](_0xdc67c6['id'])||Ce(_0xdc67c6)){if(_0x2d78ae[_0x3297c0(0x47a)]>0x0)break;_0x2d78ae[_0x3297c0(0x4ec)](_0xdc67c6);break;}_0x2d78ae[_0x3297c0(0x4ec)](_0xdc67c6);}return _0x2d78ae;}function E(_0x5211fa,_0x1b405e,_0x1a2654,_0x51dc10,_0x453d4f){const _0x4dc86b=_0x28bbb9;let _0x2ae2b8=Ee(_0x5211fa),_0x1c9e4c=_0x453d4f[_0x4dc86b(0x1f5)](),_0x482d42=(_0x1c9e4c==null?void 0x0:_0x1c9e4c['userID'])??_0x4dc86b(0x4e3),_0xe3ccbc=(_0x1c9e4c==null?void 0x0:_0x1c9e4c[_0x4dc86b(0x362)])??'unknown';return{'changeset':{'unitID':_0x1b405e,'type':(0x0,n[_0x4dc86b(0x38e)])(_0x1a2654['getUnitType'](_0x1b405e)),'baseRev':_0x51dc10[_0x4dc86b(0x1f3)](_0x1b405e),'revision':0x0,'userID':_0x482d42,'memberID':_0xe3ccbc,'mutations':_0x2ae2b8},'pendingMutations':_0x5211fa[_0x4dc86b(0x4e6)](_0x2ae2b8[_0x4dc86b(0x47a)])};}const De=E;function Oe(_0x2cd178,_0x248195,_0x46d0cc,_0x3c7785,_0x116244){const _0x272a82=_0x28bbb9;let _0x2a3715=Ee(_0x2cd178,Te),_0x45b761=_0x116244[_0x272a82(0x1f5)](),_0x278d77=(_0x45b761==null?void 0x0:_0x45b761[_0x272a82(0x47b)])??'unknown',_0x110319=(_0x45b761==null?void 0x0:_0x45b761['memberID'])??_0x272a82(0x4e3);return{'changeset':{'unitID':_0x248195,'type':(0x0,n[_0x272a82(0x38e)])(_0x46d0cc[_0x272a82(0x286)](_0x248195)),'baseRev':_0x3c7785['getCurrentRevOfUnit'](_0x248195),'revision':0x0,'userID':_0x278d77,'memberID':_0x110319,'mutations':_0x2a3715},'pendingMutations':_0x2cd178['slice'](_0x2a3715[_0x272a82(0x47a)])};}function ke(_0x19e2a7,_0x21f7b6,_0x45f9aa,_0x44cf4f,_0xd5ba42){const _0x1c5961=_0x28bbb9;let _0x19a2a8=_0x19e2a7[_0x1c5961(0x3b9)]((_0x8876e6,_0x50fe1f)=>{const _0x2398ec=_0x1c5961;let _0x3698ec=_0x8876e6[_0x8876e6[_0x2398ec(0x47a)]-0x1],{id:_0x2afa1a}=_0x3698ec??{},{id:_0x46e83b,type:_0x479d6f}=_0x50fe1f,_0x4486d8=_0x50fe1f[_0x2398ec(0x453)];if(_0x2afa1a&&_0x2afa1a!==_0x46e83b)throw Error(_0x2398ec(0x359)+_0x2afa1a+'\x20-\x20'+_0x46e83b+'.');if(!_0x3698ec)return[{'id':_0x46e83b,'type':_0x479d6f,'params':{'unitId':_0x4486d8[_0x2398ec(0x212)],'textRanges':_0x4486d8[_0x2398ec(0x41a)],'actions':_0x4486d8[_0x2398ec(0x3d1)]}}];let _0x227cf8=_0x3698ec[_0x2398ec(0x453)];return Ae(_0x227cf8,_0x4486d8)?[..._0x8876e6[_0x2398ec(0x4e6)](0x0,-0x1),{..._0x3698ec,'id':_0x46e83b,'type':_0x479d6f,'params':{'unitId':_0x4486d8['unitId'],'textRanges':_0x4486d8[_0x2398ec(0x41a)],'actions':r[_0x2398ec(0x413)]['compose'](_0x227cf8[_0x2398ec(0x3d1)],_0x4486d8[_0x2398ec(0x3d1)])}}]:[..._0x8876e6,{'id':_0x46e83b,'type':_0x479d6f,'params':{'unitId':_0x4486d8[_0x2398ec(0x212)],'textRanges':_0x4486d8['textRanges'],'actions':_0x4486d8[_0x2398ec(0x3d1)]}}];},[]),_0x168c56=_0xd5ba42['getCurrentUser'](),_0x453f00=(_0x168c56==null?void 0x0:_0x168c56[_0x1c5961(0x47b)])??'unknown',_0x1d042e=(_0x168c56==null?void 0x0:_0x168c56['memberID'])??_0x1c5961(0x4e3);return{'changeset':{'unitID':_0x21f7b6,'type':(0x0,n[_0x1c5961(0x38e)])(_0x45f9aa[_0x1c5961(0x286)](_0x21f7b6)),'baseRev':_0x44cf4f[_0x1c5961(0x1f3)](_0x21f7b6),'revision':0x0,'userID':_0x453f00,'memberID':_0x1d042e,'mutations':_0x19a2a8},'pendingMutations':_0x19e2a7['slice'](_0x19e2a7['length'])};}function Ae(_0x4df04a,_0x213c73){const _0x348c19=_0x28bbb9;return!je(_0x4df04a)&&!je(_0x213c73)&&Me(_0x4df04a[_0x348c19(0x3d1)],_0x213c73[_0x348c19(0x3d1)]);}function je(_0x5add37){return _0x5add37['isCompositionEnd']!==void 0x0;}function Me(_0x1b22ae,_0x5a806b){return Ne(_0x1b22ae)&&Ne(_0x5a806b)&&!Fe(_0x1b22ae)&&!Fe(_0x5a806b)&&!Pe(_0x1b22ae)&&!Pe(_0x5a806b);}function Ne(_0x22dfec){const _0x24610b=_0x28bbb9;return Ie(_0x22dfec)[_0x24610b(0x33e)](_0x2f68e8=>D(_0x2f68e8)&&_0x2f68e8['et']==='text-x');}function Pe(_0xdd4a19){const _0x2210e1=_0x28bbb9;return Ie(_0xdd4a19)[_0x2210e1(0x33e)](_0x1c5615=>Array[_0x2210e1(0x2e8)](_0x1c5615)||typeof _0x1c5615==_0x2210e1(0x2d4)||typeof _0x1c5615==_0x2210e1(0x378));}function Fe(_0x46d851){const _0x19d36a=_0x28bbb9;return Ie(_0x46d851)['some'](_0x42be8e=>!D(_0x42be8e)||_0x42be8e['et']!=='text-x'||!Array[_0x19d36a(0x2e8)](_0x42be8e['e'])?!0x1:_0x42be8e['e'][_0x19d36a(0x33e)](_0x22fb98=>!D(_0x22fb98)||!D(_0x22fb98[_0x19d36a(0x340)])?!0x1:Object['prototype']['hasOwnProperty'][_0x19d36a(0x446)](_0x22fb98[_0x19d36a(0x340)],_0x19d36a(0x428))||Object[_0x19d36a(0x30e)][_0x19d36a(0x36d)]['call'](_0x22fb98[_0x19d36a(0x340)],'columnGroups')||Object['prototype'][_0x19d36a(0x36d)][_0x19d36a(0x446)](_0x22fb98[_0x19d36a(0x340)],_0x19d36a(0x3a4))));}function Ie(_0x5ab935){const _0x2fac49=_0x28bbb9;if(!Array[_0x2fac49(0x2e8)](_0x5ab935))return[];let _0x4fef3c=_0x5ab935[_0x2fac49(0x539)](_0x2fac49(0x340))?_0x5ab935:_0x5ab935['find'](_0x1a5491=>Array[_0x2fac49(0x2e8)](_0x1a5491)&&_0x1a5491['includes']('body'));if(!Array[_0x2fac49(0x2e8)](_0x4fef3c))return[];let _0x54c7dc=_0x4fef3c[_0x2fac49(0x383)]('body');return _0x54c7dc===-0x1?[]:_0x4fef3c[_0x2fac49(0x4e6)](_0x54c7dc+0x1);}function D(_0x1a2c43){const _0x55e5ef=_0x28bbb9;return typeof _0x1a2c43==_0x55e5ef(0x25b)&&!!_0x1a2c43&&!Array[_0x55e5ef(0x2e8)](_0x1a2c43);}function Le(_0x3b98e5,_0x178115){const _0x27cf20=_0x28bbb9;for(let _0x2317bb of _0x3b98e5[_0x27cf20(0x220)]){if(_0x2317bb['id']!==n[_0x27cf20(0x1bc)]['id'])continue;let _0xb860ee=_0x2317bb[_0x27cf20(0x453)];if((_0xb860ee==null?void 0x0:_0xb860ee[_0x27cf20(0x212)])===_0x178115&&typeof _0xb860ee['revision']==_0x27cf20(0x378))return{'unitId':_0xb860ee[_0x27cf20(0x212)],'revision':_0xb860ee[_0x27cf20(0x27c)]};}return null;}var Re,ze,Be,Ve=class extends Error{constructor(_0x3a868f){const _0x28f07f=_0x28bbb9;super(_0x3a868f instanceof Error?_0x3a868f['message']:typeof _0x3a868f=='string'?_0x3a868f:'[CollaborationState]:\x20apply\x20error!'),this[_0x28f07f(0x415)]=_0x3a868f,this['name']=_0x28f07f(0x2f8);}},He=class extends Error{constructor(_0x2bd778){const _0x4575e7=_0x28bbb9;var _0x37609c;super('[CollaborationState]:\x20the\x20unit\x20was\x20reverted\x20to\x20revision\x20'+((_0x37609c=_0x2bd778[_0x4575e7(0x34f)])==null?void 0x0:_0x37609c[_0x4575e7(0x27c)])+'.'),this['info']=_0x2bd778,this[_0x4575e7(0x234)]=_0x4575e7(0x2ad);}};let Ue=function(_0x527c46){const _0x179bfc=_0x28bbb9;return _0x527c46['NOT_COLLAB']='not_collab',_0x527c46['SYNCED']=_0x179bfc(0x4e8),_0x527c46[_0x179bfc(0x4e9)]=_0x179bfc(0x432),_0x527c46[_0x179bfc(0x349)]='awaiting',_0x527c46['AWAITING_WITH_PENDING']=_0x179bfc(0x472),_0x527c46[_0x179bfc(0x4a0)]=_0x179bfc(0x48c),_0x527c46[_0x179bfc(0x2b1)]=_0x179bfc(0x257),_0x527c46['OFFLINE']='offline',_0x527c46;}({});var O=class{constructor(_0x8ebd13,_0x30500e,_0x1d1528,_0x43ba5c,_0x5b423a,_0x402a96,_0x2bf7a5,_0x5dc368,_0x29b634){const _0x2a6c2a=_0x28bbb9;this[_0x2a6c2a(0x2e9)]=_0x8ebd13,this[_0x2a6c2a(0x538)]=_0x30500e,this[_0x2a6c2a(0x2a8)]=_0x5b423a,this[_0x2a6c2a(0x265)]=_0x402a96,this[_0x2a6c2a(0x377)]=_0x2bf7a5,this[_0x2a6c2a(0x460)]=_0x5dc368,this[_0x2a6c2a(0x4a5)]=_0x29b634,_(this,_0x2a6c2a(0x524),null),_(this,_0x2a6c2a(0x4f8),[]),this[_0x2a6c2a(0x524)]=_0x1d1528,this[_0x2a6c2a(0x4f8)]=_0x43ba5c;}[_0x28bbb9(0x40b)](){const _0x43b9cc=_0x28bbb9;return!!this[_0x43b9cc(0x524)]||this['_pendingMutations'][_0x43b9cc(0x47a)]>0x0;}[_0x28bbb9(0x3ac)](){}[_0x28bbb9(0x4b2)](){const _0x24ea80=_0x28bbb9;var _0x207997;return(((_0x207997=this[_0x24ea80(0x524)])==null?void 0x0:_0x207997[_0x24ea80(0x220)][_0x24ea80(0x47a)])??0x0)+this['_pendingMutations'][_0x24ea80(0x47a)];}[_0x28bbb9(0x478)](_0x4e067c){const _0x17d1a6=_0x28bbb9;return new ne(_0x4e067c[_0x17d1a6(0x4cd)]??0x0,(_0x45d6fc,_0x2a2786)=>this[_0x17d1a6(0x2a8)][_0x17d1a6(0x49a)](_0x45d6fc,_0x2a2786),{...this['_handler'][_0x17d1a6(0x245)],'onResend':_0x3dbe8d=>{const _0x1f2538=_0x17d1a6;var _0x57b89b,_0x5b0873;return(_0x57b89b=(_0x5b0873=this[_0x1f2538(0x2a8)])['onChangesetResend'])==null?void 0x0:_0x57b89b[_0x1f2538(0x446)](_0x5b0873,_0x3dbe8d);}});}[_0x28bbb9(0x4d6)](_0x143464){const _0x527e70=_0x28bbb9;if(this[_0x527e70(0x53b)](_0x143464))return _0x527e70(0x1ec);if(Le(_0x143464,this[_0x527e70(0x2e9)]))return _0x527e70(0x318);let _0x2c63ab=this['_getCurrentRevision']();return _0x143464['revision']<=_0x2c63ab?_0x527e70(0x363):_0x143464[_0x527e70(0x27c)]>_0x2c63ab+0x1?_0x527e70(0x518):_0x527e70(0x1ea);}[_0x28bbb9(0x373)](_0xc76ab9){const _0x3ee7f9=_0x28bbb9;let _0x4009ec=this['_getCurrentRevision']();return _0xc76ab9[_0x3ee7f9(0x27c)]<=_0x4009ec?this[_0x3ee7f9(0x502)](_0xc76ab9)?_0x3ee7f9(0x497):_0x3ee7f9(0x338):_0xc76ab9['revision']>_0x4009ec+0x1?_0x3ee7f9(0x518):_0x3ee7f9(0x512);}[_0x28bbb9(0x2bc)](_0x4107af,_0x59ec2d){const _0x4d9330=_0x28bbb9;switch(this['_classifyRemoteChangeset'](_0x4107af)){case'echo':return this['onRemoteAck'](_0x4107af);case _0x4d9330(0x318):return _0x59ec2d[_0x4d9330(0x2e0)](_0x4107af);case _0x4d9330(0x363):return this;case _0x4d9330(0x518):return this[_0x4d9330(0x429)](_0x4107af[_0x4d9330(0x27c)]),_0x59ec2d['onMissing'](_0x4107af);case _0x4d9330(0x1ea):return _0x59ec2d[_0x4d9330(0x459)](_0x4107af);}}['_remoteRevertInfo'](_0x4f6642){const _0x4d1478=_0x28bbb9;return{'reason':'remote_revert','revert':{'revision':Le(_0x4f6642,this['unitID'])[_0x4d1478(0x27c)],'memberId':_0x4f6642[_0x4d1478(0x362)],'userId':_0x4f6642[_0x4d1478(0x47b)]}};}[_0x28bbb9(0x4c5)](_0x4bd102){const _0x39d85a=_0x28bbb9;return{'reason':_0x4bd102 instanceof Ve?_0x39d85a(0x3bf):_0x39d85a(0x20e),'message':_0x4bd102 instanceof Error?_0x4bd102[_0x39d85a(0x34c)]:typeof _0x4bd102==_0x39d85a(0x2d4)?_0x4bd102:void 0x0};}[_0x28bbb9(0x37a)](_0x365a91){const _0x5bd19c=_0x28bbb9;return{'reason':_0x365a91!=null&&_0x365a91['isPermissionRej']?_0x5bd19c(0x3cd):_0x5bd19c(0x2a0)};}['_requestMissingChangesets'](_0x1b877c){const _0x447d53=_0x28bbb9;this[_0x447d53(0x2a8)][_0x447d53(0x241)]({'from':this[_0x447d53(0x2b6)](),'to':_0x1b877c-0x1});}[_0x28bbb9(0x46a)](_0x4dc70e){const _0x3bb9a2=_0x28bbb9;this['_undoRedoService'][_0x3bb9a2(0x2be)](this[_0x3bb9a2(0x2e9)],_0x4dc70e);}[_0x28bbb9(0x495)](_0x2e6b8b){const _0x112ab6=_0x28bbb9;var _0x250da4,_0xc3d981;(_0x250da4=(_0xc3d981=this[_0x112ab6(0x2a8)])['onTransformSelections'])==null||_0x250da4[_0x112ab6(0x446)](_0xc3d981,_0x2e6b8b);}[_0x28bbb9(0x3d0)](_0x367495){const _0x58c1a=_0x28bbb9;var _0x3ea1a2,_0x4d062c;return((_0x3ea1a2=(_0x4d062c=this['_handler'])[_0x58c1a(0x51d)])==null?void 0x0:_0x3ea1a2['call'](_0x4d062c,_0x367495))??null;}[_0x28bbb9(0x3f3)](_0x2f8239){const _0x1a0088=_0x28bbb9;var _0x4b112a,_0x30efe2;return(_0x4b112a=(_0x30efe2=this[_0x1a0088(0x2a8)])[_0x1a0088(0x317)])==null?void 0x0:_0x4b112a[_0x1a0088(0x446)](_0x30efe2,_0x2f8239);}[_0x28bbb9(0x3ca)](_0x4edef5){const _0x26391d=_0x28bbb9;var _0x2619ec,_0x33f959;return(_0x2619ec=(_0x33f959=this[_0x26391d(0x2a8)])['onTransformState'])==null?void 0x0:_0x2619ec['call'](_0x33f959,_0x4edef5);}[_0x28bbb9(0x51e)](_0x56c47e){const _0xbcd0e3=_0x28bbb9;var _0x5d7174,_0x213920;return((_0x5d7174=(_0x213920=this[_0xbcd0e3(0x2a8)])[_0xbcd0e3(0x348)])==null?void 0x0:_0x5d7174['call'](_0x213920,_0x56c47e))??_0x56c47e;}[_0x28bbb9(0x517)](_0x3575f5){const _0x430e23=_0x28bbb9;var _0x5ba327,_0x21e778;return((_0x5ba327=(_0x21e778=this['_handler'])['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x5ba327[_0x430e23(0x446)](_0x21e778,_0x3575f5))??_0x3575f5;}[_0x28bbb9(0x435)](_0x46492f){const _0x63f775=_0x28bbb9;if(this['type']===r['UniverInstanceType'][_0x63f775(0x297)]){let {unitID:_0x4f9c32,mutations:_0xc215b2,memberID:_0x122d5b}=_0x46492f,_0xe12b32=_0xc215b2['length']>0x0?_0xc215b2[0x0]['params'][_0x63f775(0x41a)]:[];if(Array['isArray'](_0xe12b32)&&_0xe12b32['length']>0x0){var _0x22f5be,_0x7236fe;(_0x22f5be=(_0x7236fe=this[_0x63f775(0x2a8)])[_0x63f775(0x2a6)])==null||_0x22f5be['call'](_0x7236fe,{'unitID':_0x4f9c32,'memberID':_0x122d5b,'textRanges':_0xe12b32});}}}[_0x28bbb9(0x2ac)](){const _0x105a89=_0x28bbb9;var _0x510a7f;(_0x510a7f=this['_localCacheService'])==null||_0x510a7f[_0x105a89(0x55b)](this[_0x105a89(0x2e9)],this[_0x105a89(0x538)],this[_0x105a89(0x524)],this['_pendingMutations']);}['_getCurrentRevision'](){const _0x8b7869=_0x28bbb9;return this[_0x8b7869(0x460)]['getCurrentRevOfUnit'](this[_0x8b7869(0x2e9)]);}[_0x28bbb9(0x53b)](_0x25bced){const _0x5bd553=_0x28bbb9;let _0x1f6a02=this[_0x5bd553(0x524)];return!_0x1f6a02||!_0x1f6a02[_0x5bd553(0x32d)]||_0x1f6a02['reqId']===null||_0x1f6a02[_0x5bd553(0x4cd)]===void 0x0?!0x1:_0x25bced[_0x5bd553(0x2e9)]===_0x1f6a02['unitID']&&_0x25bced[_0x5bd553(0x32d)]===_0x1f6a02[_0x5bd553(0x32d)]&&_0x25bced['reqId']===_0x1f6a02[_0x5bd553(0x4cd)];}['_isAckOfAwaitingChangeset'](_0x32499d){const _0x1b0b08=_0x28bbb9;let _0x25f4fc=this[_0x1b0b08(0x524)];return!(_0x25f4fc!=null&&_0x25f4fc[_0x1b0b08(0x32d)])||_0x25f4fc[_0x1b0b08(0x4cd)]==null||!_0x32499d[_0x1b0b08(0x32d)]||_0x32499d[_0x1b0b08(0x4cd)]==null?!0x1:_0x32499d['sid']===_0x25f4fc[_0x1b0b08(0x32d)]&&_0x32499d[_0x1b0b08(0x4cd)]===_0x25f4fc[_0x1b0b08(0x4cd)];}['_incrementRevisionNumber'](){const _0x52312d=_0x28bbb9;this[_0x52312d(0x460)]['incrementRevOfUnit'](this[_0x52312d(0x2e9)]);}[_0x28bbb9(0x3c5)](_0x551b9b){const _0x52eece=_0x28bbb9;let _0x2087a5=this[_0x52eece(0x51e)](_0x551b9b);_0x2087a5=this[_0x52eece(0x517)](_0x2087a5);let _0x2cde65=this[_0x52eece(0x3d0)](_0x2087a5),_0xad7c3f=(0x0,r['sequenceExecute'])(_0x2087a5[_0x52eece(0x220)],this[_0x52eece(0x265)],{'fromCollab':!0x0});if(!_0xad7c3f['result'])throw _0x2cde65==null||_0x2cde65[_0x52eece(0x2d6)](),new Ve(_0xad7c3f[_0x52eece(0x456)]);_0x2cde65==null||_0x2cde65[_0x52eece(0x4b6)](),this[_0x52eece(0x3f3)](_0x2087a5),this[_0x52eece(0x3ca)](_0x2087a5),this['_transformUndoredo'](_0x551b9b),this[_0x52eece(0x495)](_0x2087a5),this['_syncEditingCollabCursor'](_0x2087a5),this['_incrementRevisionNumber']();}};let k=class extends O{constructor(_0x526a7c,_0x576622,_0x49e89e,_0x5347b5,_0x3df163,_0x96b77b,_0x57dc9b,_0x230e1d,_0x52c31b,_0x1260b5){const _0x438bea=_0x28bbb9;super(_0x526a7c,_0x576622,null,[],_0x49e89e,_0x57dc9b,_0x96b77b,_0x5347b5,_0x1260b5),this[_0x438bea(0x475)]=_0x3df163,this[_0x438bea(0x41e)]=_0x230e1d,this[_0x438bea(0x1f2)]=_0x52c31b,this[_0x438bea(0x28a)]=_0x1260b5,_(this,_0x438bea(0x290),_0x438bea(0x4e8));}['appendMutation'](_0x5ccd84){const _0x25f5b3=_0x28bbb9;let _0x351aa0=this[_0x25f5b3(0x475)]['createInstance'](A,this['unitID'],this['type'],[_0x5ccd84],this['_handler']);return _0x351aa0[_0x25f5b3(0x3d2)](),_0x351aa0[_0x25f5b3(0x2ac)](),_0x351aa0;}[_0x28bbb9(0x458)](_0x4f63e1){const _0x16bd97=_0x28bbb9;return this[_0x16bd97(0x2bc)](_0x4f63e1,{'onMissing':()=>this['_injector'][_0x16bd97(0x3e2)](F,this['unitID'],this['type'],null,[],null,[_0x4f63e1],this[_0x16bd97(0x2a8)],void 0x0),'onApply':()=>this['_transformAndApply'](_0x4f63e1),'onRemoteRevert':()=>this[_0x16bd97(0x1c0)](this[_0x16bd97(0x208)](_0x4f63e1))});}['_transformAndApply'](_0x558f79){const _0x138a1f=_0x28bbb9;try{let _0x1f287d=this[_0x138a1f(0x1f2)]['transformMutationsWithChangeset'](_0x558f79,[n[_0x138a1f(0x324)]]);if((0x0,n[_0x138a1f(0x4a7)])(_0x1f287d)){let {c1Prime:_0x4630ae}=_0x1f287d;return this[_0x138a1f(0x3c5)](_0x4630ae),this;}throw _0x1f287d[_0x138a1f(0x456)];}catch(_0xe26467){return this['_logService'][_0x138a1f(0x456)](_0xe26467),this['_onConflict'](this['_conflictInfoFromError'](_0xe26467));}}[_0x28bbb9(0x1c0)](_0x4a3238){const _0x168397=_0x28bbb9;return this[_0x168397(0x475)][_0x168397(0x3e2)](N,this[_0x168397(0x2e9)],this[_0x168397(0x538)],null,[],this[_0x168397(0x2a8)],_0x4a3238);}[_0x28bbb9(0x48f)](_0x1964a1){const _0x5e750f=_0x28bbb9;if(this[_0x5e750f(0x373)](_0x1964a1)==='stale')return this;throw Error(_0x5e750f(0x226));}[_0x28bbb9(0x4df)](){const _0x1eea3e=_0x28bbb9;throw Error(_0x1eea3e(0x385));}[_0x28bbb9(0x49f)](){return this;}[_0x28bbb9(0x27a)](){const _0xb2e0f3=_0x28bbb9;return this[_0xb2e0f3(0x475)][_0xb2e0f3(0x3e2)](P,this[_0xb2e0f3(0x2e9)],this['type'],null,[],this['_handler']);}[_0x28bbb9(0x2e4)](){return this;}[_0x28bbb9(0x462)](){const _0x153d95=_0x28bbb9;throw Error(_0x153d95(0x42f));}[_0x28bbb9(0x202)](){const _0xdbcd49=_0x28bbb9;let _0x4e49eb=this[_0xdbcd49(0x460)]['getCurrentRevOfUnit'](this[_0xdbcd49(0x2e9)]);return this['_handler']['onMissingChangesets']({'from':_0x4e49eb,'to':0x0}),this[_0xdbcd49(0x475)][_0xdbcd49(0x3e2)](F,this[_0xdbcd49(0x2e9)],this[_0xdbcd49(0x538)],null,[],null,[],this[_0xdbcd49(0x2a8)],void 0x0);}};k=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x4,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x5,r['IUndoRedoService']),y(0x6,r['ICommandService']),y(0x7,r[_0x28bbb9(0x369)]),y(0x8,n[_0x28bbb9(0x4fc)]),y(0x9,(0x0,r[_0x28bbb9(0x1cd)])(C))],k);let A=Re=class extends O{constructor(_0x427d55,_0x5d6fe6,_0x2a7e53,_0x2c78c0,_0x302ae3,_0xa5a2fc,_0x46f361,_0x57898b,_0x1b55fe,_0x4d4719,_0x1b0c8b,_0x2cece4,_0x512a12,_0x29e1b6){const _0x469d5d=_0x28bbb9;super(_0x427d55,_0x5d6fe6,null,_0x2a7e53,_0x2c78c0,_0x1b55fe,_0x512a12,_0xa5a2fc,_0x29e1b6),this[_0x469d5d(0x475)]=_0x302ae3,this['_userManagerService']=_0x46f361,this['_logService']=_0x57898b,this[_0x469d5d(0x2c8)]=_0x4d4719,this['_transformService']=_0x1b0c8b,this[_0x469d5d(0x4b7)]=_0x2cece4,_(this,_0x469d5d(0x290),_0x469d5d(0x432)),_(this,_0x469d5d(0x442),null),_(this,'_sendingTimer',null);}[_0x28bbb9(0x2b9)](_0x211a19){const _0x35fb5b=_0x28bbb9;return this[_0x35fb5b(0x4f8)][_0x35fb5b(0x4ec)](_0x211a19),this['_updateLocalCache'](),this;}[_0x28bbb9(0x458)](_0x4a7731){const _0x2d0f5c=_0x28bbb9;return this[_0x2d0f5c(0x2bc)](_0x4a7731,{'onMissing':()=>(this[_0x2d0f5c(0x54a)](),this[_0x2d0f5c(0x475)]['createInstance'](F,this[_0x2d0f5c(0x2e9)],this[_0x2d0f5c(0x538)],null,this[_0x2d0f5c(0x4f8)],null,[_0x4a7731],this['_handler'],void 0x0)),'onApply':()=>this['_transformAndApply'](_0x4a7731),'onRemoteRevert':()=>this[_0x2d0f5c(0x1c0)](this[_0x2d0f5c(0x208)](_0x4a7731))});}[_0x28bbb9(0x47f)](_0x1ee4cc){const _0x3d2c69=_0x28bbb9;try{let _0x5f247d=this[_0x3d2c69(0x1f2)][_0x3d2c69(0x541)](_0x1ee4cc,this[_0x3d2c69(0x4f8)]);if((0x0,n['isTransformMutationsWithChangesetSuccess'])(_0x5f247d)){let {c1Prime:_0xd7db23,m2Prime:_0x3fd5dc}=_0x5f247d;this[_0x3d2c69(0x3c5)](_0xd7db23);let _0x3733f1=this[_0x3d2c69(0x475)][_0x3d2c69(0x3e2)](Re,this['unitID'],this[_0x3d2c69(0x538)],_0x3fd5dc,this[_0x3d2c69(0x2a8)]);_0x3733f1[_0x3d2c69(0x2ac)](),this['_clearScheduledTask']();let _0x277771=new Date()[_0x3d2c69(0x402)](),_0x41d52a=this[_0x3d2c69(0x442)]?Math[_0x3d2c69(0x3fc)](this['_scheduleCompleteTimestamp']-_0x277771,0x0):this[_0x3d2c69(0x379)]();return _0x3733f1[_0x3d2c69(0x3d2)](_0x41d52a),_0x3733f1;}throw _0x5f247d['error'];}catch(_0x316a09){return this['_logService'][_0x3d2c69(0x456)](_0x316a09),this['_onConflict'](this[_0x3d2c69(0x4c5)](_0x316a09));}}[_0x28bbb9(0x48f)](_0x5d18b8){const _0x179854=_0x28bbb9;if(this[_0x179854(0x373)](_0x5d18b8)==='stale')return this;throw Error(_0x179854(0x20d));}['onRemoteRej'](){const _0x178853=_0x28bbb9;throw Error(_0x178853(0x37b));}['onRemoteRetry'](){return this;}['toggleOffline'](){const _0x301647=_0x28bbb9;return this[_0x301647(0x54a)](),this[_0x301647(0x475)]['createInstance'](P,this['unitID'],this[_0x301647(0x538)],null,this[_0x301647(0x4f8)],this[_0x301647(0x2a8)]);}['toggleOnline'](){return this;}[_0x28bbb9(0x3d2)](_0xc686bc){const _0x4603c5=_0x28bbb9;let _0x592302=_0xc686bc??this[_0x4603c5(0x379)]();this['_scheduleCompleteTimestamp']=new Date()[_0x4603c5(0x402)]()+_0x592302,this[_0x4603c5(0x2c9)]=setTimeout(()=>{const _0x439b4f=_0x4603c5;this[_0x439b4f(0x54a)]();let _0x15dbb0=null;switch(this[_0x439b4f(0x538)]){case r[_0x439b4f(0x24b)]['UNIVER_SHEET']:_0x15dbb0=E(this[_0x439b4f(0x4f8)],this[_0x439b4f(0x2e9)],this[_0x439b4f(0x4b7)],this[_0x439b4f(0x460)],this[_0x439b4f(0x433)]);break;case r['UniverInstanceType']['UNIVER_DOC']:_0x15dbb0=this[_0x439b4f(0x4f8)]['every'](_0x632e86=>_0x632e86['id']===i[_0x439b4f(0x4d7)]['id'])?ke(this[_0x439b4f(0x4f8)],this[_0x439b4f(0x2e9)],this[_0x439b4f(0x4b7)],this[_0x439b4f(0x460)],this['_userManagerService']):E(this[_0x439b4f(0x4f8)],this['unitID'],this[_0x439b4f(0x4b7)],this[_0x439b4f(0x460)],this[_0x439b4f(0x433)]);break;case r[_0x439b4f(0x24b)][_0x439b4f(0x405)]:_0x15dbb0=Oe(this[_0x439b4f(0x4f8)],this[_0x439b4f(0x2e9)],this['_univerInstanceService'],this['_revisionService'],this[_0x439b4f(0x433)]);break;case r[_0x439b4f(0x24b)][_0x439b4f(0x367)]:_0x15dbb0=De(this[_0x439b4f(0x4f8)],this[_0x439b4f(0x2e9)],this[_0x439b4f(0x4b7)],this[_0x439b4f(0x460)],this[_0x439b4f(0x433)]);break;case r[_0x439b4f(0x24b)][_0x439b4f(0x449)]:_0x15dbb0=E(this[_0x439b4f(0x4f8)],this['unitID'],this[_0x439b4f(0x4b7)],this[_0x439b4f(0x460)],this[_0x439b4f(0x433)]);break;case r[_0x439b4f(0x24b)][_0x439b4f(0x3bb)]:_0x15dbb0=E(this[_0x439b4f(0x4f8)],this['unitID'],this[_0x439b4f(0x4b7)],this['_revisionService'],this[_0x439b4f(0x433)]);break;default:throw Error(_0x439b4f(0x1f6)+this[_0x439b4f(0x538)]+_0x439b4f(0x30c));}let {changeset:_0x341044,pendingMutations:_0x33f476}=_0x15dbb0,_0x15e6cb=this[_0x439b4f(0x478)](_0x341044);_0x15e6cb[_0x439b4f(0x1c1)](_0x341044,_0x341044[_0x439b4f(0x220)][_0x439b4f(0x47a)]+_0x33f476[_0x439b4f(0x47a)]);let _0x347e4e=_0x33f476['length']?this[_0x439b4f(0x475)][_0x439b4f(0x3e2)](M,this[_0x439b4f(0x2e9)],this[_0x439b4f(0x538)],_0x341044,_0x33f476,this[_0x439b4f(0x2a8)],_0x15e6cb):this[_0x439b4f(0x475)][_0x439b4f(0x3e2)](j,this[_0x439b4f(0x2e9)],this[_0x439b4f(0x538)],_0x341044,this['_handler'],_0x15e6cb);_0x347e4e['_updateLocalCache'](),this['_handler'][_0x439b4f(0x20c)](this,_0x347e4e);},_0x592302);}[_0x28bbb9(0x379)](){const _0x4d7231=_0x28bbb9;let _0x31bb7d=this['_configService'][_0x4d7231(0x230)](m);return(_0x31bb7d==null?void 0x0:_0x31bb7d[_0x4d7231(0x306)])??0x7d0;}[_0x28bbb9(0x462)](){throw Error('[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x28bbb9(0x54a)](){const _0x7023c5=_0x28bbb9;this[_0x7023c5(0x2c9)]!=null&&(clearTimeout(this[_0x7023c5(0x2c9)]),this['_sendingTimer']=null);}['dispose'](){this['_clearScheduledTask']();}[_0x28bbb9(0x1c0)](_0x618426){const _0x38ac6f=_0x28bbb9;return this[_0x38ac6f(0x54a)](),this['_injector'][_0x38ac6f(0x3e2)](N,this[_0x38ac6f(0x2e9)],this[_0x38ac6f(0x538)],null,this[_0x38ac6f(0x4f8)],this['_handler'],_0x618426);}};A=Re=b([y(0x4,(0x0,r[_0x28bbb9(0x431)])(r['Injector'])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x6,(0x0,r['Inject'])(r[_0x28bbb9(0x42e)])),y(0x7,r[_0x28bbb9(0x369)]),y(0x8,r['ICommandService']),y(0x9,r[_0x28bbb9(0x421)]),y(0xa,n[_0x28bbb9(0x4fc)]),y(0xb,r['IUniverInstanceService']),y(0xc,r['IUndoRedoService']),y(0xd,(0x0,r[_0x28bbb9(0x1cd)])(C))],A);let j=ze=class extends O{constructor(_0x51d913,_0x44f327,_0x3d874d,_0x503792,_0x4ac092,_0x3802d9,_0x2c5040,_0x2c2a18,_0xf012c2,_0x4c2b23,_0x4b1150,_0x3ecb36){const _0x432333=_0x28bbb9;super(_0x51d913,_0x44f327,_0x3d874d,[],_0x503792,_0x2c2a18,_0x4b1150,_0x2c5040,_0x3ecb36),this[_0x432333(0x475)]=_0x3802d9,this[_0x432333(0x41e)]=_0xf012c2,this[_0x432333(0x1f2)]=_0x4c2b23,_(this,_0x432333(0x290),_0x432333(0x35e)),_(this,_0x432333(0x455),void 0x0),this[_0x432333(0x455)]=_0x4ac092??this[_0x432333(0x478)](_0x3d874d),this[_0x432333(0x455)][_0x432333(0x260)](()=>({'changeset':this[_0x432333(0x524)],'unsyncedMutationCount':this[_0x432333(0x4b2)]()})),_0x4ac092||this['_submitter'][_0x432333(0x25e)]();}[_0x28bbb9(0x2b9)](_0x23f6f5){const _0x11b43a=_0x28bbb9;this[_0x11b43a(0x375)]();let _0x5eaaf4=this[_0x11b43a(0x475)][_0x11b43a(0x3e2)](M,this[_0x11b43a(0x2e9)],this[_0x11b43a(0x538)],this['_awaitingChangeset'],[_0x23f6f5],this[_0x11b43a(0x2a8)],this['_submitter']);return _0x5eaaf4['_updateLocalCache'](),_0x5eaaf4;}[_0x28bbb9(0x458)](_0x394f60){const _0x54f0dc=_0x28bbb9;return this[_0x54f0dc(0x2bc)](_0x394f60,{'onMissing':()=>(this['_detachSubmitter'](),this[_0x54f0dc(0x475)]['createInstance'](F,this[_0x54f0dc(0x2e9)],this[_0x54f0dc(0x538)],this[_0x54f0dc(0x524)],[],null,[_0x394f60],this[_0x54f0dc(0x2a8)],this[_0x54f0dc(0x455)])),'onApply':()=>this['_transformAndApply'](_0x394f60),'onRemoteRevert':()=>this[_0x54f0dc(0x1c0)](this['_remoteRevertInfo'](_0x394f60))});}[_0x28bbb9(0x47f)](_0x1f9753){const _0x450247=_0x28bbb9;try{let _0x15aa77=this[_0x450247(0x1f2)]['transformChangesets']([_0x1f9753],[this[_0x450247(0x524)]],!0x1);if((0x0,n[_0x450247(0x55e)])(_0x15aa77)){let {c1Prime:_0x318060,c2Prime:_0x287a2b}=_0x15aa77;this[_0x450247(0x3c5)](_0x318060[0x0]),_0x287a2b[0x0]['baseRev']=this[_0x450247(0x2b6)](),this[_0x450247(0x375)]();let _0x508479=this[_0x450247(0x475)][_0x450247(0x3e2)](ze,this[_0x450247(0x2e9)],this['type'],_0x287a2b[0x0],this[_0x450247(0x2a8)],this[_0x450247(0x455)]);return _0x508479[_0x450247(0x2ac)](),_0x508479;}throw _0x15aa77[_0x450247(0x456)];}catch(_0x4cec7f){return this[_0x450247(0x41e)][_0x450247(0x456)](_0x4cec7f),this['_onConflict'](this[_0x450247(0x4c5)](_0x4cec7f));}}['onRemoteAck'](_0x1ea40e){const _0x1cd3a1=_0x28bbb9;switch(this[_0x1cd3a1(0x373)](_0x1ea40e)){case _0x1cd3a1(0x338):return this[_0x1cd3a1(0x41e)][_0x1cd3a1(0x2ba)]('[AwaitingState]',_0x1cd3a1(0x1cc)+_0x1ea40e[_0x1cd3a1(0x27c)]+_0x1cd3a1(0x561)+this[_0x1cd3a1(0x2b6)]()+'.'),this;case _0x1cd3a1(0x497):return this['_submitter'][_0x1cd3a1(0x3ac)](),this[_0x1cd3a1(0x4fd)]();case _0x1cd3a1(0x518):return this[_0x1cd3a1(0x455)][_0x1cd3a1(0x3ac)](),this[_0x1cd3a1(0x429)](_0x1ea40e[_0x1cd3a1(0x27c)]),this[_0x1cd3a1(0x475)][_0x1cd3a1(0x3e2)](F,this[_0x1cd3a1(0x2e9)],this[_0x1cd3a1(0x538)],this[_0x1cd3a1(0x524)],[],_0x1ea40e['revision'],[],this[_0x1cd3a1(0x2a8)],void 0x0);case'next':return this['_submitter'][_0x1cd3a1(0x3ac)](),this['_incrementRevisionNumber'](),this[_0x1cd3a1(0x4fd)]();}}[_0x28bbb9(0x4fd)](){const _0x19ebc1=_0x28bbb9;let _0x45bc4e=this['_injector']['createInstance'](k,this[_0x19ebc1(0x2e9)],this['type'],this[_0x19ebc1(0x2a8)]);return _0x45bc4e[_0x19ebc1(0x2ac)](),_0x45bc4e;}['onRemoteRej'](_0x5d1b73){const _0x4bbf41=_0x28bbb9;return this[_0x4bbf41(0x1c0)](this['_rejectionInfo'](_0x5d1b73));}[_0x28bbb9(0x49f)](_0x42dba6){const _0x5bd0eb=_0x28bbb9;var _0x63c731;return _0x42dba6[_0x5bd0eb(0x4cd)]===((_0x63c731=this[_0x5bd0eb(0x524)])==null?void 0x0:_0x63c731[_0x5bd0eb(0x4cd)])&&this[_0x5bd0eb(0x455)][_0x5bd0eb(0x34d)](),this;}[_0x28bbb9(0x27a)](){const _0x542bc8=_0x28bbb9;return this['_submitter'][_0x542bc8(0x3ac)](),this['_injector'][_0x542bc8(0x3e2)](P,this['unitID'],this[_0x542bc8(0x538)],this['_awaitingChangeset'],[],this[_0x542bc8(0x2a8)]);}[_0x28bbb9(0x2e4)](){return this;}['resend'](_0x514999=_0x28bbb9(0x4d8)){const _0x565232=_0x28bbb9;this[_0x565232(0x455)][_0x565232(0x1c1)](this[_0x565232(0x524)],this[_0x565232(0x4b2)](),_0x514999);}[_0x28bbb9(0x1c0)](_0x25e9f1){const _0x37d05f=_0x28bbb9;return this[_0x37d05f(0x455)][_0x37d05f(0x3ac)](),this['_injector'][_0x37d05f(0x3e2)](N,this[_0x37d05f(0x2e9)],this[_0x37d05f(0x538)],this[_0x37d05f(0x524)],[],this[_0x37d05f(0x2a8)],_0x25e9f1);}[_0x28bbb9(0x3ac)](){const _0x11ccbb=_0x28bbb9;this['_submitter'][_0x11ccbb(0x3ac)]();}[_0x28bbb9(0x375)](){const _0x6cc1d5=_0x28bbb9;this[_0x6cc1d5(0x455)][_0x6cc1d5(0x3ef)]();}};j=ze=b([y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x7,r[_0x28bbb9(0x382)]),y(0x8,r['ILogService']),y(0x9,n[_0x28bbb9(0x4fc)]),y(0xa,r['IUndoRedoService']),y(0xb,(0x0,r['Optional'])(C))],j);let M=Be=class extends O{constructor(_0x286811,_0x29fa0c,_0x5473f5,_0x33d931,_0x312750,_0x1dfe05,_0x357794,_0x44d6c0,_0x8cd02f,_0xe55954,_0xb94652,_0xc745d7,_0xe098b9){const _0x3bbcfa=_0x28bbb9;super(_0x286811,_0x29fa0c,_0x5473f5,_0x33d931,_0x312750,_0x8cd02f,_0xc745d7,_0x44d6c0,_0xe098b9),this[_0x3bbcfa(0x475)]=_0x357794,this['_logService']=_0xe55954,this[_0x3bbcfa(0x1f2)]=_0xb94652,this['localCacheService']=_0xe098b9,_(this,_0x3bbcfa(0x290),_0x3bbcfa(0x472)),_(this,_0x3bbcfa(0x455),void 0x0),this[_0x3bbcfa(0x455)]=_0x1dfe05??this[_0x3bbcfa(0x478)](_0x5473f5),this[_0x3bbcfa(0x455)][_0x3bbcfa(0x260)](()=>({'changeset':this[_0x3bbcfa(0x524)],'unsyncedMutationCount':this['_unsyncedMutationCount']()})),_0x1dfe05||this[_0x3bbcfa(0x455)]['armAckTimeout']();}[_0x28bbb9(0x2b9)](_0x563aad){const _0x2a869a=_0x28bbb9;return this[_0x2a869a(0x4f8)][_0x2a869a(0x4ec)](_0x563aad),this['_updateLocalCache'](),this;}[_0x28bbb9(0x458)](_0x25d26f){const _0x452204=_0x28bbb9;return this[_0x452204(0x2bc)](_0x25d26f,{'onMissing':()=>(this[_0x452204(0x375)](),this['_injector'][_0x452204(0x3e2)](F,this[_0x452204(0x2e9)],this[_0x452204(0x538)],this[_0x452204(0x524)],this[_0x452204(0x4f8)],null,[_0x25d26f],this[_0x452204(0x2a8)],this['_submitter'])),'onApply':()=>this['_transformAndApply'](_0x25d26f),'onRemoteRevert':()=>this[_0x452204(0x1c0)](this[_0x452204(0x208)](_0x25d26f))});}[_0x28bbb9(0x47f)](_0x42a231){const _0x4c9b70=_0x28bbb9;try{let _0x3bdc25=this['_transformService']['transformChangesets']([_0x42a231],[this[_0x4c9b70(0x524)]],!0x1);if((0x0,n[_0x4c9b70(0x55e)])(_0x3bdc25)){let {c1Prime:_0x1ecc76,c2Prime:_0x56b8d2}=_0x3bdc25,_0x22fe67=this[_0x4c9b70(0x1f2)][_0x4c9b70(0x541)](_0x1ecc76[0x0],this[_0x4c9b70(0x4f8)]);if((0x0,n[_0x4c9b70(0x4a7)])(_0x22fe67)){let {c1Prime:_0x226004,m2Prime:_0x4c0a17}=_0x22fe67;this[_0x4c9b70(0x3c5)](_0x226004),_0x56b8d2[0x0][_0x4c9b70(0x3a5)]=this[_0x4c9b70(0x2b6)](),this[_0x4c9b70(0x375)]();let _0x4f8d27=this[_0x4c9b70(0x475)][_0x4c9b70(0x3e2)](Be,this[_0x4c9b70(0x2e9)],this[_0x4c9b70(0x538)],_0x56b8d2[0x0],_0x4c0a17,this['_handler'],this['_submitter']);return _0x4f8d27[_0x4c9b70(0x2ac)](),_0x4f8d27;}throw _0x22fe67[_0x4c9b70(0x456)];}throw _0x3bdc25[_0x4c9b70(0x456)];}catch(_0x1f8469){return this['_logService'][_0x4c9b70(0x456)](_0x1f8469),this['_onConflict'](this[_0x4c9b70(0x4c5)](_0x1f8469));}}[_0x28bbb9(0x48f)](_0x4ead12){const _0x3d2474=_0x28bbb9;switch(this[_0x3d2474(0x373)](_0x4ead12)){case _0x3d2474(0x338):return this[_0x3d2474(0x41e)][_0x3d2474(0x2ba)]('[AwaitingWithPendingState]','ignored\x20stale\x20ack\x20of\x20revision\x20'+_0x4ead12[_0x3d2474(0x27c)]+'\x20at\x20revision\x20'+this[_0x3d2474(0x2b6)]()+'.'),this;case _0x3d2474(0x497):return this[_0x3d2474(0x455)][_0x3d2474(0x3ac)](),this[_0x3d2474(0x347)]();case _0x3d2474(0x518):return this[_0x3d2474(0x455)][_0x3d2474(0x3ac)](),this[_0x3d2474(0x429)](_0x4ead12[_0x3d2474(0x27c)]),this[_0x3d2474(0x475)]['createInstance'](F,this[_0x3d2474(0x2e9)],this[_0x3d2474(0x538)],this[_0x3d2474(0x524)],this['_pendingMutations'],_0x4ead12['revision'],[],this[_0x3d2474(0x2a8)],void 0x0);case _0x3d2474(0x512):return this[_0x3d2474(0x455)]['dispose'](),this['_incrementRevisionNumber'](),this[_0x3d2474(0x347)]();}}[_0x28bbb9(0x347)](){const _0x335efb=_0x28bbb9;let _0x316270=this[_0x335efb(0x475)][_0x335efb(0x3e2)](A,this['unitID'],this[_0x335efb(0x538)],this[_0x335efb(0x4f8)],this[_0x335efb(0x2a8)]);return _0x316270[_0x335efb(0x3d2)](),_0x316270[_0x335efb(0x2ac)](),_0x316270;}[_0x28bbb9(0x4df)](_0x54b292){const _0x7fd001=_0x28bbb9;return this[_0x7fd001(0x1c0)](this[_0x7fd001(0x37a)](_0x54b292));}[_0x28bbb9(0x49f)](_0x304313){const _0xce9ba=_0x28bbb9;var _0x242ee8;return _0x304313[_0xce9ba(0x4cd)]===((_0x242ee8=this[_0xce9ba(0x524)])==null?void 0x0:_0x242ee8[_0xce9ba(0x4cd)])&&this[_0xce9ba(0x455)][_0xce9ba(0x34d)](),this;}[_0x28bbb9(0x27a)](){const _0x285743=_0x28bbb9;return this[_0x285743(0x455)]['dispose'](),this[_0x285743(0x475)][_0x285743(0x3e2)](P,this['unitID'],this[_0x285743(0x538)],this[_0x285743(0x524)],this['_pendingMutations'],this[_0x285743(0x2a8)]);}['toggleOnline'](){return this;}['resend'](_0x386f0f=_0x28bbb9(0x4d8)){const _0xfb8486=_0x28bbb9;this['_submitter'][_0xfb8486(0x1c1)](this['_awaitingChangeset'],this[_0xfb8486(0x4b2)](),_0x386f0f);}[_0x28bbb9(0x1c0)](_0x5240d8){const _0x4629bb=_0x28bbb9;return this[_0x4629bb(0x455)][_0x4629bb(0x3ac)](),this[_0x4629bb(0x475)][_0x4629bb(0x3e2)](N,this[_0x4629bb(0x2e9)],this['type'],this[_0x4629bb(0x524)],this[_0x4629bb(0x4f8)],this[_0x4629bb(0x2a8)],_0x5240d8);}[_0x28bbb9(0x3ac)](){const _0xbf9dff=_0x28bbb9;this[_0xbf9dff(0x455)][_0xbf9dff(0x3ac)]();}['_detachSubmitter'](){const _0x4ca758=_0x28bbb9;this[_0x4ca758(0x455)]['unbind']();}};M=Be=b([y(0x6,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x7,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x8,r['ICommandService']),y(0x9,r['ILogService']),y(0xa,n[_0x28bbb9(0x4fc)]),y(0xb,r['IUndoRedoService']),y(0xc,(0x0,r[_0x28bbb9(0x1cd)])(C))],M);let N=class extends O{constructor(_0x4c3f5f,_0x3a894f,_0x508978,_0x20bfcf,_0x54c62f,_0x2b5f80,_0x2d7218,_0x20c26e,_0xaad8fe,_0xbdc42e,_0x2b216d,_0x2253d8,_0x26cb95,_0x12b021){const _0x1e64f6=_0x28bbb9;var _0x2bb17e;super(_0x4c3f5f,_0x3a894f,_0x508978,_0x20bfcf,_0x54c62f,_0x20c26e,_0xaad8fe,_0xbdc42e,_0x12b021),this['info']=_0x2b5f80,this[_0x1e64f6(0x370)]=_0x2d7218,this[_0x1e64f6(0x433)]=_0x2b216d,this[_0x1e64f6(0x41e)]=_0x2253d8,this[_0x1e64f6(0x3b5)]=_0x26cb95,this[_0x1e64f6(0x28a)]=_0x12b021,_(this,'status','conflict'),_(this,_0x1e64f6(0x4ac),void 0x0);let _0x1989f0=((_0x2bb17e=this[_0x1e64f6(0x433)][_0x1e64f6(0x1f5)]())==null?void 0x0:_0x2bb17e['userID'])??'';this[_0x1e64f6(0x4ac)]=_0x508978||_0x20bfcf[_0x1e64f6(0x47a)]?{'unitID':_0x4c3f5f,'userId':_0x1989f0||void 0x0,'type':_0x3a894f,'rev':this['_getCurrentRevision'](),'awaitingChangeset':_0x508978,'mutations':_0x20bfcf}:null,this[_0x1e64f6(0x39d)](),this[_0x1e64f6(0x550)](),this[_0x1e64f6(0x3e6)](_0x1989f0)[_0x1e64f6(0x4a4)](_0x1b78e3=>this[_0x1e64f6(0x41e)][_0x1e64f6(0x456)](_0x1b78e3));}async[_0x28bbb9(0x3e6)](_0x3230e2){const _0x425032=_0x28bbb9;var _0x2b6dc2,_0x9cde12,_0x1b3cf5,_0x2a450a;await((_0x2b6dc2=this[_0x425032(0x4a5)])==null||(_0x9cde12=_0x2b6dc2['backupOfflineData'])==null?void 0x0:_0x9cde12['call'](_0x2b6dc2,this[_0x425032(0x2e9)],this[_0x425032(0x520)][_0x425032(0x489)],_0x3230e2)['catch'](()=>void 0x0));let _0x222edb=!0x0;try{var _0x59c548;await((_0x59c548=this[_0x425032(0x4a5)])==null?void 0x0:_0x59c548['clearOfflineData'](this[_0x425032(0x2e9)],_0x3230e2));}catch{_0x222edb=!0x1,this[_0x425032(0x3b5)][_0x425032(0x40c)]({'id':_0x425032(0x503),'unitID':this['unitID'],'userId':_0x3230e2});}(_0x1b3cf5=(_0x2a450a=this[_0x425032(0x2a8)])[_0x425032(0x248)])==null||_0x1b3cf5['call'](_0x2a450a,this[_0x425032(0x520)],this['localChanges'],_0x222edb);}[_0x28bbb9(0x2b9)](){return this;}[_0x28bbb9(0x458)](){return this;}['onRemoteAck'](){return this;}[_0x28bbb9(0x4df)](){return this;}['onRemoteRetry'](){return this;}[_0x28bbb9(0x27a)](){return this;}[_0x28bbb9(0x2e4)](){return this;}[_0x28bbb9(0x462)](){throw Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}['_showConflictProcessingNotification'](){const _0x284cf4=_0x28bbb9;this[_0x284cf4(0x3b5)][_0x284cf4(0x40c)]({'id':'CONFLICT_PROCESSING','unitID':this[_0x284cf4(0x2e9)]});}[_0x28bbb9(0x39d)](){const _0x1a5844=_0x28bbb9;this[_0x1a5844(0x370)][_0x1a5844(0x3cc)](new a[(_0x1a5844(0x371))](this[_0x1a5844(0x2e9)])['id'],!0x1);}};N=b([y(0x6,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x427)])),y(0x7,r[_0x28bbb9(0x382)]),y(0x8,r[_0x28bbb9(0x493)]),y(0x9,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0xa,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x42e)])),y(0xb,r[_0x28bbb9(0x369)]),y(0xc,(0x0,r[_0x28bbb9(0x431)])(v)),y(0xd,(0x0,r[_0x28bbb9(0x1cd)])(C))],N);let P=class extends O{constructor(_0x1fc119,_0x160ffa,_0x5d3a05,_0x25616b,_0x2de8e8,_0x4cc16d,_0x12e180,_0x111b6a,_0x1d3d10,_0x42adde,_0x3aecb2){const _0x1888a2=_0x28bbb9;super(_0x1fc119,_0x160ffa,_0x5d3a05,_0x25616b,_0x2de8e8,_0x111b6a,_0x1d3d10,_0x12e180,_0x3aecb2),this[_0x1888a2(0x475)]=_0x4cc16d,this[_0x1888a2(0x41e)]=_0x42adde,_(this,_0x1888a2(0x290),_0x1888a2(0x203));}[_0x28bbb9(0x2b9)](_0x411c0e){const _0x324915=_0x28bbb9;return this['_pendingMutations']['push'](_0x411c0e),this[_0x324915(0x2ac)](),this;}[_0x28bbb9(0x458)](_0x59ae22){const _0x5420b1=_0x28bbb9;return this[_0x5420b1(0x41e)][_0x5420b1(0x2ba)]('[OfflineState]',_0x5420b1(0x3c6)+_0x59ae22[_0x5420b1(0x27c)]+'.'),this;}['onRemoteAck'](_0x1f11ee){const _0x48d50c=_0x28bbb9;return this[_0x48d50c(0x41e)][_0x48d50c(0x2ba)](_0x48d50c(0x47c),_0x48d50c(0x2e2)+_0x1f11ee[_0x48d50c(0x27c)]+'.'),this;}[_0x28bbb9(0x4df)](){const _0x417452=_0x28bbb9;return this[_0x417452(0x41e)][_0x417452(0x2ba)](_0x417452(0x47c),'ignored\x20rejection.'),this;}['onRemoteRetry'](){return this;}[_0x28bbb9(0x27a)](){return this;}[_0x28bbb9(0x2e4)](){const _0x5d1a25=_0x28bbb9;let {_injector:_0x3c8f76,_pendingMutations:_0x4f8098,_awaitingChangeset:_0x53e2f7,unitID:_0x222b80,_handler:_0xd7b2fd,type:_0x544c45}=this,_0x1cff36=We(_0x3c8f76,_0x222b80,_0x544c45,_0x53e2f7,_0x4f8098,_0xd7b2fd);return _0x1cff36 instanceof A?_0x1cff36[_0x5d1a25(0x3d2)]():(_0x1cff36 instanceof M||_0x1cff36 instanceof j)&&_0x1cff36[_0x5d1a25(0x462)](),_0x1cff36;}['resend'](){throw Error('[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.');}};P=b([y(0x5,(0x0,r['Inject'])(r[_0x28bbb9(0x506)])),y(0x6,(0x0,r['Inject'])(n[_0x28bbb9(0x49e)])),y(0x7,r[_0x28bbb9(0x382)]),y(0x8,r[_0x28bbb9(0x493)]),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,(0x0,r[_0x28bbb9(0x1cd)])(C))],P);let F=class extends O{constructor(_0x5428ba,_0x4ec649,_0x5a19d4,_0x500cfe,_0x17ff7e,_0x271b46,_0x4152c0,_0x300c7c,_0x9706cd,_0x4ad3ba,_0x10e3f5,_0x283de0,_0x4a150f,_0x3bf167,_0x1c3b93){const _0x3d1e86=_0x28bbb9;super(_0x5428ba,_0x4ec649,_0x5a19d4,_0x500cfe,_0x4152c0,_0x283de0,_0x4a150f,_0x4ad3ba,_0x1c3b93),this[_0x3d1e86(0x21b)]=_0x17ff7e,this[_0x3d1e86(0x392)]=_0x271b46,this[_0x3d1e86(0x455)]=_0x300c7c,this[_0x3d1e86(0x475)]=_0x9706cd,this['_logService']=_0x10e3f5,this[_0x3d1e86(0x1f2)]=_0x3bf167,this[_0x3d1e86(0x28a)]=_0x1c3b93,_(this,'status',_0x3d1e86(0x48c));}[_0x28bbb9(0x4f6)](_0x1c378e){const _0x11f103=_0x28bbb9;try{if(this[_0x11f103(0x406)](_0x1c378e)['missingChangesets'])throw Error(_0x11f103(0x293));if(this[_0x11f103(0x406)]([...this[_0x11f103(0x392)]][_0x11f103(0x26b)]((_0x56fdba,_0xb49833)=>_0x56fdba[_0x11f103(0x27c)]-_0xb49833[_0x11f103(0x27c)]))[_0x11f103(0x366)])return this['_queuedRemoteChangesets']=[],this['_updateLocalCache'](),this[_0x11f103(0x2a8)][_0x11f103(0x241)]({'from':this[_0x11f103(0x2b6)](),'to':0x0}),this;let _0x52ebd0=this[_0x11f103(0x524)],_0x42c3ce=this['_pendingMutations'],_0x121c64;if(_0x52ebd0&&_0x42c3ce[_0x11f103(0x47a)]!==0x0)_0x121c64=this['_injector'][_0x11f103(0x3e2)](M,this['unitID'],this[_0x11f103(0x538)],_0x52ebd0,_0x42c3ce,this[_0x11f103(0x2a8)],this[_0x11f103(0x455)]);else{if(_0x52ebd0&&_0x42c3ce['length']===0x0)_0x52ebd0['baseRev']=this[_0x11f103(0x2b6)](),_0x121c64=this[_0x11f103(0x475)][_0x11f103(0x3e2)](j,this[_0x11f103(0x2e9)],this[_0x11f103(0x538)],_0x52ebd0,this[_0x11f103(0x2a8)],this[_0x11f103(0x455)]);else{if(_0x42c3ce[_0x11f103(0x47a)]!==0x0){let _0x30e805=this[_0x11f103(0x475)]['createInstance'](A,this['unitID'],this[_0x11f103(0x538)],_0x42c3ce,this[_0x11f103(0x2a8)]);_0x30e805['_schedule'](),_0x121c64=_0x30e805;}else _0x121c64=this[_0x11f103(0x475)][_0x11f103(0x3e2)](k,this[_0x11f103(0x2e9)],this[_0x11f103(0x538)],this[_0x11f103(0x2a8)]);}}return _0x121c64[_0x11f103(0x2ac)](),_0x121c64;}catch(_0x36f16f){return _0x36f16f instanceof He?(this['_logService'][_0x11f103(0x2ba)]('[FetchMissState]',_0x36f16f[_0x11f103(0x34c)]),this[_0x11f103(0x1c0)](_0x36f16f[_0x11f103(0x520)])):(this['_logService'][_0x11f103(0x456)](_0x11f103(0x479),'failed\x20to\x20apply\x20missed\x20changesets!',_0x36f16f),this[_0x11f103(0x1c0)](this[_0x11f103(0x4c5)](_0x36f16f)));}}['_handleRemoteChangesets'](_0x5b95ab){const _0x54ef7e=_0x28bbb9;this['_acknowledgeAwaitingIfReady']();for(let _0x1dc71b=0x0;_0x1dc71b<_0x5b95ab[_0x54ef7e(0x47a)];_0x1dc71b++){let _0x42d67f=_0x5b95ab[_0x1dc71b];switch(this['_classifyRemoteChangeset'](_0x42d67f)){case'echo':{let _0x30376c=this['_getCurrentRevision']();if(_0x42d67f[_0x54ef7e(0x27c)]>_0x30376c+0x1)return{'missingChangesets':!0x0};_0x42d67f[_0x54ef7e(0x27c)]<=_0x30376c?this[_0x54ef7e(0x40f)]():this['_acknowledgeAwaiting']();break;}case _0x54ef7e(0x318):throw new He(this[_0x54ef7e(0x208)](_0x42d67f));case _0x54ef7e(0x363):break;case'missing':return{'missingChangesets':!0x0};case _0x54ef7e(0x1ea):this[_0x54ef7e(0x44b)](_0x42d67f),this[_0x54ef7e(0x3b3)]();}}return{'missingChangesets':!0x1};}[_0x28bbb9(0x44b)](_0x2fd23d){const _0x3320aa=_0x28bbb9;let _0x1b1b4a=_0x2fd23d,_0x227b7f=this[_0x3320aa(0x524)];if(_0x227b7f){let _0x46b3a8=this[_0x3320aa(0x1f2)][_0x3320aa(0x515)]([_0x2fd23d],[_0x227b7f],!0x1);if(!(0x0,n[_0x3320aa(0x55e)])(_0x46b3a8))throw _0x46b3a8['error'];_0x1b1b4a=_0x46b3a8[_0x3320aa(0x310)][0x0],_0x227b7f=_0x46b3a8[_0x3320aa(0x254)][0x0];}let _0x4fb769=this[_0x3320aa(0x4f8)];if(_0x4fb769[_0x3320aa(0x47a)]){let _0x478396=this[_0x3320aa(0x1f2)][_0x3320aa(0x541)](_0x1b1b4a,_0x4fb769);if(!(0x0,n[_0x3320aa(0x4a7)])(_0x478396))throw _0x478396['error'];_0x1b1b4a=_0x478396[_0x3320aa(0x310)],_0x4fb769=_0x478396[_0x3320aa(0x3bd)];}this[_0x3320aa(0x3c5)](_0x1b1b4a),_0x227b7f&&(_0x227b7f['baseRev']=this[_0x3320aa(0x2b6)]()),this['_awaitingChangeset']=_0x227b7f,this['_pendingMutations']=_0x4fb769;}['_acknowledgeAwaitingIfReady'](){const _0xc52883=_0x28bbb9;if(!this[_0xc52883(0x524)]||this['_acknowledgedAwaitingRevision']==null)return;let _0xefeddc=this['_getCurrentRevision']();if(this[_0xc52883(0x21b)]<=_0xefeddc)throw Error(_0xc52883(0x4a9)+this['_acknowledgedAwaitingRevision']+'.');this[_0xc52883(0x21b)]===_0xefeddc+0x1&&this[_0xc52883(0x35d)]();}[_0x28bbb9(0x35d)](){const _0x2c679e=_0x28bbb9;this['_incrementRevisionNumber'](),this[_0x2c679e(0x40f)]();}[_0x28bbb9(0x40f)](){const _0x53d614=_0x28bbb9;this[_0x53d614(0x524)]=null,this['_acknowledgedAwaitingRevision']=null,this[_0x53d614(0x42d)]();}['_disposeSubmitter'](){const _0x70cbdc=_0x28bbb9;var _0x35bc27;(_0x35bc27=this[_0x70cbdc(0x455)])==null||_0x35bc27[_0x70cbdc(0x3ac)](),this['_submitter']=void 0x0;}['dispose'](){const _0x4e0289=_0x28bbb9;this[_0x4e0289(0x42d)]();}[_0x28bbb9(0x462)](){const _0x31cd2d=_0x28bbb9;throw Error(_0x31cd2d(0x3a9));}[_0x28bbb9(0x2b9)](_0x34b04a){const _0x59f29a=_0x28bbb9;return this[_0x59f29a(0x4f8)]['push'](_0x34b04a),this[_0x59f29a(0x2ac)](),this;}[_0x28bbb9(0x458)](_0x25c986){const _0x171f0f=_0x28bbb9;return this[_0x171f0f(0x392)][_0x171f0f(0x4ec)](_0x25c986),this;}[_0x28bbb9(0x48f)](_0x1cb8fd){const _0x4013e4=_0x28bbb9;let _0x501c90=this['_classifyAck'](_0x1cb8fd);if(this[_0x4013e4(0x524)]){switch(_0x501c90){case'ack_of_awaiting':this[_0x4013e4(0x40f)]();break;case'stale':break;case _0x4013e4(0x512):this[_0x4013e4(0x35d)]();break;case _0x4013e4(0x518):this[_0x4013e4(0x21b)]=_0x1cb8fd[_0x4013e4(0x27c)],this['_disposeSubmitter']();}return this;}if(_0x501c90==='stale')return this;throw Error(_0x4013e4(0x4a1));}[_0x28bbb9(0x4df)](_0x1cf335){const _0x174bf2=_0x28bbb9;return this[_0x174bf2(0x1c0)](this['_rejectionInfo'](_0x1cf335));}[_0x28bbb9(0x49f)](_0x57f361){const _0x4000d9=_0x28bbb9;var _0x325d50;return this[_0x4000d9(0x21b)]!=null||_0x57f361[_0x4000d9(0x4cd)]!==((_0x325d50=this[_0x4000d9(0x524)])==null?void 0x0:_0x325d50[_0x4000d9(0x4cd)])||(this[_0x4000d9(0x455)]??=this['_createChangesetSubmitter'](this[_0x4000d9(0x524)]),this[_0x4000d9(0x455)][_0x4000d9(0x34d)]()),this;}[_0x28bbb9(0x27a)](){const _0x5a1718=_0x28bbb9;return this[_0x5a1718(0x42d)](),this[_0x5a1718(0x475)]['createInstance'](P,this[_0x5a1718(0x2e9)],this[_0x5a1718(0x538)],this[_0x5a1718(0x524)],this[_0x5a1718(0x4f8)],this[_0x5a1718(0x2a8)]);}[_0x28bbb9(0x2e4)](){return this;}[_0x28bbb9(0x1c0)](_0x4883b9){const _0x16ef32=_0x28bbb9;return this[_0x16ef32(0x42d)](),this[_0x16ef32(0x475)][_0x16ef32(0x3e2)](N,this['unitID'],this['type'],this['_awaitingChangeset'],this[_0x16ef32(0x4f8)],this[_0x16ef32(0x2a8)],_0x4883b9);}};F=b([y(0x8,(0x0,r['Inject'])(r[_0x28bbb9(0x506)])),y(0x9,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0xa,r[_0x28bbb9(0x369)]),y(0xb,r[_0x28bbb9(0x382)]),y(0xc,r['IUndoRedoService']),y(0xd,n[_0x28bbb9(0x4fc)]),y(0xe,(0x0,r[_0x28bbb9(0x1cd)])(C))],F);function _0x1757(){const _0x10b0f4=['forEach','confirm','deleteCollaborator','liveShareOperation','_refreshUnitPermission','_clearRedo','unbind','getLatestCsReqIdBySid','liveShareNewHost','getOwnPropertyDescriptor','_transformIMECache','allowed','sessionStatus$','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','_hasSessionsForEndpoint','from','subUnitId','message$','maxSize','max','LIVESHARE_OPERATION','createSocket','HTTPService','univer-pro.collaboration-client-socket-service','_upload','getTime','_waitForHeartbeatResponse','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','UNIVER_SLIDE','_handleRemoteChangesets','toRemote','/-/object/list','_createInitialState','[DataLoaderService]','hasLocalChanges','emitEvent','refreshPermission','putCollaborators','_dropAcknowledgedAwaiting','Slide','/universer-api/oidc/authpage','PSEUDO_FETCH_MISSING_RESULT','JSONX','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','applyError','6gYFRkN','deepClone','takeUntil','infoRsp','textRanges','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','_transit','Base','_logService','defineProperty','deleteProperty','IConfigService','CHANGESET_SHOULD_RETRY','setCfgEnableObjInherit','getFocusedUnit','isFinite','/fetchmissing?from=','IPermissionService','tables','_requestMissingChangesets','_adapter','candidateSocket','1977772EhjSud','_disposeSubmitter','UserManagerService','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','_initRequestHeader','Inject','pending','_userManagerService','updateMember','_syncEditingCollabCursor','getUploadOptions','session.room-cnt-exceeds','awaitingChangeset','_attempt','_status$','_sendHeartbeat','COMMENT_UPDATE','UnitEmbedded','_onOffline','IMentionIOService','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','members$','_scheduleCompleteTimestamp','enableSingleActiveInstanceLock','_loadSnapshot','newCsEvent','call','workbook','csShouldRetryEvent','UNIVER_BOARD','CollaborationSession','_transformAndApplyRemoteChangeset','collaborators','LIVESHARE_NEW_HOST','GLOBAL_ROOMS_CNT_EXCEEDS','_nextDelay','_getSocketChannel','_notifyResend','ICollaborationSocketService','params','text-x','_submitter','error','disposeWithMe','onRemoteChangeset','onApply','REPLACE','createIdentifier','_onRemoteRetry','433hVzgDk','LEAVE','BehaviorSubject','_revisionService','_undoStacks','resend','_redoStacks','RETRY_CONNECTING_MAX_COUNT_KEY','_updateState','\x20to\x20','_startTelemetryCollaborationNewChangeset','_eventService','upload','_transformUndoredo','SOCKET_FAILED','len','retryConnectingTimer','_getAPIPrefix','filter','_deliver','SnapshotService','awaiting_with_pending','_docStateChangeManagerService','IAttachmentIoService','_injector','packageName','univer-pro.collaboration-client.network-condition.service','_createChangesetSubmitter','[FetchMissState]','length','userID','[OfflineState]','loginUrlKey','objectActions','_transformAndApply','sheets','reject','_lockTransition','session','replace','map','UNIVER_SHEET','invertWithDoc','_onMessage','reason','_source','resent\x20changeset\x20','fetch_missing','enableAuthServer','changesetAckTimeout','onRemoteAck','b64DecodeUnicode','delay','min','IUndoRedoService','_snapshotService','_transformSelections','?url=','ack_of_awaiting','FETCH_MISSING','HEARTBEAT','onSendChangeset','NEW_CHANGESETS','writeAtPath','registerHTTPInterceptor','RevisionService','onRemoteRetry','FETCH_MISS','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_fetchMissChangesets','now','catch','_localCacheService','_onCombEvent','isTransformMutationsWithChangesetSuccess','createUniverCollaborationAdapter','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','MUTATION','_transformStack','localChanges','saveImage','updateCollaborator','2046070JosXRQ','MemberService','findIndex','_unsyncedMutationCount','CONFLICT_PROCESSING','then','UnitAction','commit','_univerInstanceService','_socketService','collaboratorID','/-/object/-/batch_allowed','AddSlidePageMutation','TimeoutError','_submitChangeset','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','connection\x20error','toString','action','equals','UNIVER_COLLABORATION_CLIENT_PLUGIN','_firstSentAt','_conflictInfoFromError','getCollabEntity','save\x20fail\x20reason\x20is\x20','49749513ulYfjy','_createSocket','maxAckTimeout','state$','_maxAckTimeout','reqId','_initMergeInterceptor','Tools','[CollaborationSocketService]','capture','code','stringify','endsWith','authzUrl','_classifyRemoteChangeset','RichTextEditingMutation','reconnect','_unlockTransition','OTHER_CLIENT_EDITING','trim','COMPRESS_MUTATION_SEND','startsWith','withCredentials','onRemoteRej','session.room-not-exists','PERSON','_state','unknown','parseProtocolChangeset','Failed\x20to\x20update\x20permission\x20point','slice','_handlerCallback','synced','PENDING','_onConnectionOpen','UpdateDocsAttributeType','push','SnapshotServerOverHTTPService','_pendingReason','_registerDependencies','nextDelayMs','JOINING','3884363PDbCxW','ImageSourceType','RETAIN','getGlobalObject','onMissedChangesetFetched','_clearHandshakeTimer','_pendingMutations','localUnitId','/universer-api/authz','keys','ITransformService','_toSynced','CollaborationStatus','/universer-api/user/session-ticket','_waitCount','create','_isAckOfAwaitingChangeset','CONFLICT_CACHE_CLEAR_FAILED','submitting\x20changeset\x20','_invertDocumentHistory','Injector','DocCollaborationEntity','_telemetryInfo','changesets','People','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','state','parseChangesetToProtocol','MentionType','PendingState','_timer','getAttachmentUrl','next','entityInit$','_joinRoom','transformChangesets','_getUploadFileURL','_transformRemoteChangesetByStateCache','missing','pauseCollaboration','elapsedMs','CollaborationSocketService','IUniverInstanceService','onPrepareTransformSelections','_transformRemoteChangesetByIMECache','tableSource','info','diffValue','Plugin','createCollaborator','_awaitingChangeset','TextXActionType','onResend','getImage','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','/resources','HELLO','_clearRetryConnectingTimer','waitForRoom$','SheetCollaborationEntity','socketReady','Error\x20on\x20receiving\x20event','_tryReconnect','conflict$','_socketChannels','UNISCRIPT_RUN','isObject','disableLocalCache','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','_sessionStatus$','type','includes','startTime','_isEchoedAwaitingChangeset','enableCollaboration','isInternalEditorID','retryConnectingInterval','_countResend','RECV','transformMutationsWithChangeset','collabSubmitChangesetUrl','attempt','{fileID}','/universer-api/file/{fileID}/sign-url','has','_change$','cbc','DisposableCollection','_clearScheduledTask','_loadUnit','/universer-api/snapshot','_commentUpdate$','SessionStatus','unit','_showConflictProcessingNotification','delete','find','_telemetryService','_initUnitPermissionChange','ICollaborationClientAdapterService','fetchMissingChangesets','collaboration-client.auth.needGotoLoginAlert','ITelemetryService','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_toggleOnline','updateOfflineData','saveChangeset','dispose$','isTransformChangesetsSuccess','loadUnit','updateCursorEvent','\x20at\x20revision\x20','_toggleOffline','ImageUploadStatusType','getSheetBlock','ws://127.0.0.1:8000/universer-api/comb/connect','unitInfo$','enableOfflineEditing','_removeRoom','Edit','_closedUnits','RemoveSlidePageMutation','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','snapshotServerUrl','/object','ErrorCode','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','[UniverCollaborationClientPlugin]','MoveSlidePageMutation','BASE64','RevertRevisionMutation','headers','_onLocalMutation','editingUnit','_onConflict','submit','/universer-api/stream/file/upload','unit-cache-','_retryBackoff','InsertSheetMutation','_clearUndo','_disposed','_updateUnitPermissionPoint','addHandlerCallback','splice','_commentService','ignored\x20stale\x20ack\x20of\x20revision\x20','Optional','loadSheet','[CollaborationSessionService]','\x0aCurrent:\x20','removeMember','_emitMembers','UUID','_sheetTransformSelectionsService','ConflictState','version','PERMISSION_DENIED','send','serializeCombRequest','_sessions','getActiveSheet','UniverLicensePlugin','getUnitStatus$','_conflict$','CompressMutationService','refreshUnit','_decreaseWaiting','getUnit','routeKey','endpoint','session.room-full','_changesetSessionId','collabWebSocketUrl','size','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','apply','_createInitialStateImpl','echo','uploadFileServerUrl','UPDATE_CURSOR','append','CollaborationSessionService','getSnapshot','_transformService','getCurrentRevOfUnit','\x0aAfter:\x20','getCurrentUser','[PendingState]:\x20unhandled\x20univer\x20type:\x20','_pendingSessions','close$','_onJoinRoomEvent','Univer','DEFAULT_ACK_TIMEOUT','329790lYNSju','/collaborator','_rescheduleHeartbeat','interceptor','closeSession','_ackTimeout','fetchMiss','offline','roomInfos','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','loadDoc','hasWritePending','_remoteRevertInfo','concatMap','SUBMIT_CHANGESET_TIMEOUT','_substituteUndoStack','onStateChange','[PendingState]:\x20received\x20acknowledgement.','transform_failed','_unitInfo$','getWorkbookSelections','duration','unitId','pipe','objects','entries','encode','FileId','Workbook','every','__Key__','_acknowledgedAwaitingRevision','_entities','collaboration-client.local-cache-service','sendHeartbeatTimer','JOIN','mutations','[CollaborationEntity]','_localeService','CommentService','commentUpdate$','_authzIoService','[SyncedState]:\x20received\x20acknowledgement.','_remoteChangesetQueue','_event$','[CollaborationSessionService]:\x20socket\x20error','SHOULD_CLOSE_CONN','unitDisposed$','RxDisposable','_collaborationSessionService','readyForCollab','closed','getConfig','toLocal','SUCCUSS','_singleActiveUnitService','name','_clearTimeoutTimer','__splitChunk__','IDLE','_collaborationPaused','/object/','Subscription','collaMsg','_getCtorByUniverInstanceType','_transitionLocked','writeCursor','ack_timeout','_init','onMissingChangesets','objectID','base-ui.attachment-io.service','_onConnectionFailed','resendTimeouts','file','_sendToken','onConflict','supports','ISingleActiveUnitService','UniverInstanceType','compose','_HTTPService','location','generateRandomId','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','getAllPermissionPoint','_clearHeartbeatTimer','stream','c2Prime','_reqId','getImageSourceCache','conflict','function','_onRequestFailed','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','object','LocaleService','45RFfapT','armAckTimeout','_rebaseUnchangedAttributes','bind','_options','getMember','hostname','subscribe','_commandService','onMutationExecutedForCollab','PdfCollaborationEntity','getMemberID','HEARTBEAT_TIMEOUT','getSnapshotAPIPath','sort','_entityInit$','POST','session.room-permission-denied','requestParams','CollaborationController','UniverCollaborationPlugin','_onRecvEvent','_initCloseConn','constructor','reverse','_getRedoStack','objectType','toDisposable','coverType','toggleOffline','_state$','revision','_roomCreated$','request_failed','/universer-api/uniscript','LocalUndoRedoService','endpointKey','getInterceptPoints','LIVESHARE_FETCH_OPERATIONS','_replayCachedMutations','get','getUnitType','OBJECT_PERMISSION_CONFIG_KEY','[CollaborationUndoRedoService]','href','localCacheService','_listenToNetworkCondition','resolveWithBasePath','HTTPRequest','AwaitingWithPendingState','telemetry\x20info\x20is\x20not\x20initialized','status','CombCmd','_filterTableActions','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','getCollabEntities','registerDependencies','SUBMIT_CHANGESET','UNIVER_DOC','socket$','status$','paragraphId','SlideCollaborationEntity','_createHandler','target','timeout','attachment','changeset_rejected','addImageSourceCache','_now','SetSelectionsOperation','_httpService','_substituteRedoStack','onSyncEditingCollabCursor','66pyjrjD','_handler','/allowed','saveAttachment','_compressMutationService','_updateLocalCache','RemoteRevertError','range','signUrlServerUrl','_roomMembers','CONFLICT','_type','timeoutTimer','HTTPResponseError','Response','_getCurrentRevision','_networkConditionService','mergeOverrideWithDependencies','appendMutation','debug','onStarting','_dispatchRemoteChangeset','executeCommand','transformUndoRedo','AwaitingState','SNAPSHOT_URL_KEY','DEFAULT_COLLAB_WEB_SOCKET_URL','ThresholdInterceptorFactory','isTransformMutationsWithChangesetFailure','UnitObject','stopTime','members','_config','_configService','_sendingTimer','CollaborationUIEventId','_cfgEnableObjInherit','getValue','roles','3226KQYVYD','?size=','toPrimitive','_changesetReqId','encodeURIComponent','AuthzIoHttpService','string','subject','rollback','touchDependencies','_getUndoStack','changeset','setConfig','_instanceService','_rebaseParagraphHistory','uniscriptRunEvent','onTransformRemoteChangesetByStateCache','transformSelections','onRemoteRevert','_getAPIPrefixPath','ignored\x20acknowledgement\x20of\x20revision\x20','origin','toggleOnline','_members$','handshakeTimer','CmdRspCode','isArray','unitID','localeService','OTHER_CLIENTS_EDITING','retryCount','_resend','_shouldReportTelemetry','_getSignURL','CLOSE_ROOM','resolveUnit','_getUnitPermissionPoints','event$','subType','_tryEnsureSocket','online','getDrawingImageAllowSize','RemoteChangesetApplyError','getRoom','_onRemoteChangeset','DEFAULT_FILE_NAME','&source=','getCollabEntity$','values','eventID','/unit/','fetchThroughInterceptors','symbol','RETRY_CONNECTING_MAX_COUNT','deserializeToCombResponse','&to=','sendChangesetTimeout','_applyRemoteChangeset','_socket','startIndex','paragraph','_onRemoteRejected','\x20in\x20_schedule.','_members','prototype','complete','c1Prime','clear','unitLoaded$','USERS_ENTER','CommandType','toStringTag','FAIL','onTransformIME','remote_revert','result','_send','updatePermissionObjEvent','INGEST','url','readAsDataURL','CHANGESET_ACK','ISocketService','uuidv4','ChangesetSubmitter','CollaborativeUndoRedoService','EmptyMutationInfo','leaveEvent','close','onlyLocal','paragraphs','cmd','OPTIONAL','fromCollab','clearUnit','sid','COLLABORATION_ENDPOINT_INVALID','asObservable','_onUserJoin','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','LOCAL_CACHE_INTERVAL_KEY','src','_memberService','CollaborationImageIoService','listCollaborators','loadBase','stale','override','onLocalMutation','isNoop','saveSheetBlock','getPath','some','CollaborationEvent','body','_startCollaboration','getTypeOfUnitAdded$','MergeInterceptorFactory','_sessionChannels','requireSession','MSG_FOR_ERROR','_toPending','onTransformRemoteChangesetByIMECache','AWAITING','readCursor','/universer-api/snapshot/','message','requestRetry','_unitLoaded$','revert','data','editing\x20status\x20changed\x20to','focused$','JOIN_ROOM_FAILED','init','textEncoder','HEARTBEAT_INTERVAL_KEY','Document','pluginName','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','OFFLINE','joinRsp','LIVESHARE_TERMINATE','_acknowledgeAwaiting','awaiting','ISnapshotServerService','decorate','initWorkbookPermissionChange','memberID','applied','getResourcesRequest','DependentOn','missingChangesets','UNIVER_PDF','SyncedState','ILogService','set','post','originalMeta','hasOwnProperty','open$','@univerjs-pro/collaboration-client','_permissionService','WorkbookEditablePermission','objectPermissionTypes','_classifyAck','_onFetchMissResult','_detachSubmitter','transformStack\x20failed!','_undoRedoService','number','_getSendChangesetTimeout','_rejectionInfo','[PendingState]:\x20received\x20rejection.','setWaitCount','UPDATE_PERMISSION_OBJ','_socketMessageSubscription','CHANGESET_REJ','downloadEndpointUrl','randomBytes','ICommandService','indexOf','socketService','[SyncedState]:\x20received\x20rejection.','_getLoginPath','_onRemoteACK','getSheetId','CollaborationEntity','[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.','getDeserializedSheetBlock','CollaborationUIEventService','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','mapDocumentTypeToUniverInstanceType','charCodeAt','utf8ToBytes','onTransformSelections','_queuedRemoteChangesets','getAllMembers','objectId','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','Board','_changesetResend$','copyFileMeta','_identity','Subject','HEARTBEAT_INTERVAL','error$','_disableEditing','_throwTelemetryCollaborationNewChangeset','saveSnapshot','connectionAttempt','PERMISSION_REJ','LOCAL_CACHE_INTERVAL','add','blockRanges','baseRev','univer-pro.collaboration-client.single-active-unit-service','_createSession','sessionStatus','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','DocStateChangeManagerService','HTTP\x20','dispose','Disposable','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','rev','_updateStatus','socketSubscription','IAuthzIoService','_acknowledgeAwaitingIfReady','MAX_ACK_TIMEOUT','_collaborationUIEventService','LIVESHARE_REQUEST_HOST','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','loadOfflineData','reduce','ObjectPermissionService','UNIVER_BASE','collaboration_new_changeset','m2Prime','3688632YtMDKx','apply_failed','_getConfig','selections','_imageSourceCache','/new_changes','HTTPEventType','_executeRemoteChangeset','ignored\x20remote\x20changeset\x20of\x20revision\x20','unsubscribe','BaseCollaborationEntity','_transformHistoryMutations','_transformStateCache','take','updatePermissionPoint','permission_rejected','getTypeOfUnitDisposed$','socket\x20open.','_prepareTransformSelections','actions','_schedule','JSON1','_clearTimer','/block/','commentUpdateEvent','loadSlide','_replaceFileID','_exhaustRemoteChangesetQueue','unitType','Quantity','_stopTelemetryCollaborationNewChangeset','_initDependencies','csAckEvent','_getDownloadEndpointURL','_resolveSessionIdentity','merge','createInstance','Rectangle','INSERT','traverse','_prepareConflictRecovery','getUnitId','USERS_LEAVE'];_0x1757=function(){return _0x10b0f4;};return _0x1757();}function We(_0x476143,_0x3e9aad,_0x18247e,_0x55e8ff,_0x316f3a,_0x5d3f8c){const _0x19d168=_0x28bbb9;return _0x55e8ff&&_0x316f3a[_0x19d168(0x47a)]?_0x476143[_0x19d168(0x3e2)](M,_0x3e9aad,_0x18247e,_0x55e8ff,_0x316f3a,_0x5d3f8c,void 0x0):_0x55e8ff?_0x476143[_0x19d168(0x3e2)](j,_0x3e9aad,_0x18247e,_0x55e8ff,_0x5d3f8c,void 0x0):_0x316f3a[_0x19d168(0x47a)]?_0x476143[_0x19d168(0x3e2)](A,_0x3e9aad,_0x18247e,_0x316f3a,_0x5d3f8c):_0x476143[_0x19d168(0x3e2)](k,_0x3e9aad,_0x18247e,_0x5d3f8c);}let I=class extends r['RxDisposable']{get[_0x28bbb9(0x50c)](){return this['_state'];}constructor(_0x2a92fe,_0x1e3d30,_0x356965,_0x45c54a,_0x5b6d18,_0xb0120e,_0x21f09a,_0x472fce,_0x205cb4,_0x17a613,_0x490e3c,_0x12b434,_0x3524d1,_0x1b7f96){const _0x4f1443=_0x28bbb9;super(),this[_0x4f1443(0x2e9)]=_0x2a92fe,this[_0x4f1443(0x483)]=_0x1e3d30,this[_0x4f1443(0x2b2)]=_0x356965,this[_0x4f1443(0x475)]=_0x45c54a,this[_0x4f1443(0x2ab)]=_0x5b6d18,this[_0x4f1443(0x222)]=_0xb0120e,this[_0x4f1443(0x460)]=_0x21f09a,this[_0x4f1443(0x468)]=_0x472fce,this[_0x4f1443(0x4b7)]=_0x205cb4,this['_logService']=_0x17a613,this['_commandService']=_0x490e3c,this[_0x4f1443(0x370)]=_0x12b434,this[_0x4f1443(0x233)]=_0x3524d1,this[_0x4f1443(0x4a5)]=_0x1b7f96,_(this,_0x4f1443(0x27b),new t[(_0x4f1443(0x45f))](null)),_(this,_0x4f1443(0x4cb),this['_state$'][_0x4f1443(0x32f)]()),_(this,'_state',void 0x0),_(this,_0x4f1443(0x238),!0x1),_(this,'_changesetSessionId',''),_(this,'_changesetReqId',0x0),_(this,_0x4f1443(0x299),this[_0x4f1443(0x4cb)][_0x4f1443(0x213)]((0x0,t[_0x4f1443(0x485)])(_0x10f010=>_0x10f010?_0x10f010['status']:_0x4f1443(0x203)),(0x0,t['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),_(this,_0x4f1443(0x397),new t[(_0x4f1443(0x39a))]()),_(this,'changesetResend$',this[_0x4f1443(0x397)][_0x4f1443(0x32f)]()),_(this,_0x4f1443(0x1de),new t[(_0x4f1443(0x39a))]()),_(this,_0x4f1443(0x531),this['_conflict$'][_0x4f1443(0x32f)]()),_(this,_0x4f1443(0x23d),!0x1),_(this,_0x4f1443(0x227),[]);}async[_0x28bbb9(0x354)](){const _0x3e7b1e=_0x28bbb9;if(this[_0x3e7b1e(0x50c)])throw Error(_0x3e7b1e(0x56c));await this[_0x3e7b1e(0x240)]();}[_0x28bbb9(0x519)](){return this['_collaborationPaused']=!0x0,(0x0,r['toDisposable'])(()=>{const _0x5f3317=_0x53d0;this[_0x5f3317(0x238)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x28bbb9(0x33a)](_0x5eb3a0){const _0x55d191=_0x28bbb9;this[_0x55d191(0x1be)](_0x5eb3a0);}['hasWritePending'](){const _0x1c33b4=_0x28bbb9;var _0x234f6c;return((_0x234f6c=this['_state'])==null?void 0x0:_0x234f6c[_0x1c33b4(0x40b)]())??!0x1;}[_0x28bbb9(0x3ac)](){const _0x590fbe=_0x28bbb9;var _0x46b8c3;super['dispose'](),(_0x46b8c3=this[_0x590fbe(0x4e2)])==null||_0x46b8c3['dispose'](),this[_0x590fbe(0x397)][_0x590fbe(0x30f)](),this[_0x590fbe(0x1de)][_0x590fbe(0x30f)]();}['_updateState'](_0x211cec){const _0x24daa1=_0x28bbb9;this[_0x24daa1(0x4e2)]=_0x211cec,this[_0x24daa1(0x27b)]['next'](_0x211cec);}async['_init'](){const _0x104f31=_0x28bbb9;if(this[_0x104f31(0x465)](await this[_0x104f31(0x409)]()),this[_0x104f31(0x233)]){var _0x15561c;(_0x15561c=this[_0x104f31(0x233)])==null||_0x15561c[_0x104f31(0x1bf)](this[_0x104f31(0x2e9)]),this[_0x104f31(0x457)](this['_singleActiveUnitService'][_0x104f31(0x1dd)](this[_0x104f31(0x2e9)])[_0x104f31(0x264)](_0x284cad=>{const _0x1031d6=_0x104f31;this[_0x1031d6(0x41e)][_0x1031d6(0x2ba)](_0x1031d6(0x221),_0x1031d6(0x351),_0x284cad),_0x284cad===0x1?(this[_0x1031d6(0x468)][_0x1031d6(0x40c)]({'id':_0x1031d6(0x4da)}),this[_0x1031d6(0x370)][_0x1031d6(0x3cc)](new a[(_0x1031d6(0x371))](this['unitID'])['id'],!0x1),this['_permissionService']['setShowComponents'](!0x1)):(this['_permissionService'][_0x1031d6(0x3cc)](new a['WorkbookEditablePermission'](this[_0x1031d6(0x2e9)])['id'],!0x0),this[_0x1031d6(0x370)]['setShowComponents'](!0x0));}));}let _0x4b8ae8=!0x1;return this[_0x104f31(0x457)](this['session'][_0x104f31(0x3f5)][_0x104f31(0x264)](_0x1928ba=>{const _0x1ecc34=_0x104f31;_0x1928ba===0x3?this[_0x1ecc34(0x55a)](_0x4b8ae8):_0x1928ba===0x2&&(_0x4b8ae8=!0x0,this['_toggleOffline']());})),this[_0x104f31(0x457)](this[_0x104f31(0x483)][_0x104f31(0x2f3)][_0x104f31(0x264)](_0x31d114=>{const _0x5bd0bf=_0x104f31;try{switch(_0x31d114[_0x5bd0bf(0x2ff)]){case n[_0x5bd0bf(0x33f)]['NEW_CHANGESETS']:this[_0x5bd0bf(0x2fa)]((0x0,n[_0x5bd0bf(0x4e4)])(_0x31d114[_0x5bd0bf(0x350)]));break;case n[_0x5bd0bf(0x33f)][_0x5bd0bf(0x31f)]:this[_0x5bd0bf(0x387)](_0x31d114[_0x5bd0bf(0x350)]);break;case n[_0x5bd0bf(0x33f)][_0x5bd0bf(0x37f)]:this[_0x5bd0bf(0x30b)]();break;case n['CollaborationEvent'][_0x5bd0bf(0x422)]:this[_0x5bd0bf(0x45c)](_0x31d114[_0x5bd0bf(0x350)]);break;case n[_0x5bd0bf(0x33f)][_0x5bd0bf(0x412)]:this[_0x5bd0bf(0x374)](_0x31d114[_0x5bd0bf(0x350)][_0x5bd0bf(0x509)][_0x5bd0bf(0x485)](_0x4c02ed=>(0x0,n[_0x5bd0bf(0x4e4)])(_0x4c02ed)));break;case n[_0x5bd0bf(0x33f)][_0x5bd0bf(0x3a1)]:this[_0x5bd0bf(0x30b)]({'isPermissionRej':!0x0});break;case n['CollaborationEvent']['UNISCRIPT_RUN']:}}catch(_0x357388){throw console[_0x5bd0bf(0x456)](_0x5bd0bf(0x52f),_0x357388),_0x357388;}})),this['_state'];}[_0x28bbb9(0x4d9)](){this['_transitionLocked']=!0x1;}[_0x28bbb9(0x482)](){const _0x2a1484=_0x28bbb9;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[_0x2a1484(0x23d)]=!0x0;}[_0x28bbb9(0x41c)](_0x2b073a){const _0x10baa7=_0x28bbb9;this['_lockTransition']();try{this[_0x10baa7(0x465)](_0x2b073a());}finally{this[_0x10baa7(0x4d9)]();}}[_0x28bbb9(0x1be)](_0x2ef994){const _0x22f7d1=_0x28bbb9;this['_transit'](()=>this[_0x22f7d1(0x4e2)][_0x22f7d1(0x2b9)](_0x2ef994));}['_onRemoteChangeset'](_0x2985a1){const _0x3bb587=_0x28bbb9;this[_0x3bb587(0x238)]?this[_0x3bb587(0x227)]['push'](_0x2985a1):this[_0x3bb587(0x307)](_0x2985a1);}[_0x28bbb9(0x3d9)](){const _0x3556e7=_0x28bbb9;this[_0x3556e7(0x227)]['forEach'](_0x28683d=>this[_0x3556e7(0x307)](_0x28683d)),this['_remoteChangesetQueue']=[];}['_applyRemoteChangeset'](_0x142168){const _0x49f46c=_0x28bbb9;let _0x57540b=this['_compressMutationService'][_0x49f46c(0x1ff)][_0x49f46c(0x301)](this['_compressMutationService'][_0x49f46c(0x1ff)][_0x49f46c(0x282)]()['COMPRESS_MUTATION_APPLY'])(_0x142168['mutations'],null)||_0x142168['mutations'],_0x5efe4a={..._0x142168,'mutations':_0x57540b};this[_0x49f46c(0x41c)](()=>this[_0x49f46c(0x4e2)][_0x49f46c(0x458)](_0x5efe4a));}['_onRemoteACK'](_0x35c5a8){const _0x2cb4b5=_0x28bbb9;this[_0x2cb4b5(0x41c)](()=>this['_state'][_0x2cb4b5(0x48f)](_0x35c5a8));}[_0x28bbb9(0x30b)](_0xf024d6){const _0x1f3ed2=_0x28bbb9;this[_0x1f3ed2(0x41c)](()=>this[_0x1f3ed2(0x4e2)][_0x1f3ed2(0x4df)](_0xf024d6));}['_onRemoteRetry'](_0x2daebe){const _0x33cb97=_0x28bbb9;this[_0x33cb97(0x41c)](()=>this[_0x33cb97(0x4e2)][_0x33cb97(0x49f)](_0x2daebe));}[_0x28bbb9(0x374)](_0xe3a8ca){const _0x4bfa84=_0x28bbb9;let _0x1b954f=this[_0x4bfa84(0x4e2)];if(!(_0x1b954f instanceof F))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x5dd757=_0xe3a8ca[_0x4bfa84(0x485)](_0x1af16f=>{const _0x237c28=_0x4bfa84;let _0x3f2b07=this['_compressMutationService'][_0x237c28(0x1ff)]['fetchThroughInterceptors'](this[_0x237c28(0x2ab)][_0x237c28(0x1ff)][_0x237c28(0x282)]()['COMPRESS_MUTATION_APPLY'])(_0x1af16f[_0x237c28(0x220)],null)||_0x1af16f[_0x237c28(0x220)];return{..._0x1af16f,'mutations':_0x3f2b07};});this['_transit'](()=>_0x1b954f[_0x4bfa84(0x4f6)](_0x5dd757));}[_0x28bbb9(0x562)](){const _0x39379e=_0x28bbb9;this[_0x39379e(0x41c)](()=>this['_state'][_0x39379e(0x27a)]());}[_0x28bbb9(0x55a)](_0x48c511=!0x1){const _0x2502fc=_0x28bbb9;this[_0x2502fc(0x41c)](()=>this[_0x2502fc(0x4e2)][_0x2502fc(0x2e4)]());let _0x348725=this[_0x2502fc(0x4e2)];_0x48c511&&_0x348725 instanceof k&&this['_transit'](()=>_0x348725[_0x2502fc(0x202)]());}async['_createInitialState'](){return new Promise(_0x5e4987=>{const _0x17098d=_0x53d0;this[_0x17098d(0x483)][_0x17098d(0x3f5)]['pipe']((0x0,t[_0x17098d(0x3cb)])(0x1))['subscribe'](async _0x40607d=>{_0x5e4987(await this['_createInitialStateImpl'](_0x40607d===0x3));});});}['_createHandler'](){const _0x3cc255=_0x28bbb9;let _0x46c168=this[_0x3cc255(0x2e9)],_0x1d1b39=this[_0x3cc255(0x475)][_0x3cc255(0x285)](r['IConfigService'])[_0x3cc255(0x230)](m);return{'resendTimeouts':{'ackTimeout':_0x1d1b39==null?void 0x0:_0x1d1b39[_0x3cc255(0x48e)],'maxAckTimeout':_0x1d1b39==null?void 0x0:_0x1d1b39['maxChangesetAckTimeout']},'onStateChange':(_0x519d12,_0x21b04a)=>{const _0x41c08b=_0x3cc255;if(_0x519d12!==this[_0x41c08b(0x4e2)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x519d12[_0x41c08b(0x290)]+_0x41c08b(0x1f4)+_0x21b04a[_0x41c08b(0x290)]+_0x41c08b(0x1d0)+this['_state'][_0x41c08b(0x290)]);this[_0x41c08b(0x465)](_0x21b04a);},'onSendChangeset':(_0x10546b,_0x9e6383)=>{const _0x33ab73=_0x3cc255;_0x10546b[_0x33ab73(0x32d)]||(_0x10546b[_0x33ab73(0x32d)]=this[_0x33ab73(0x1e6)],_0x10546b[_0x33ab73(0x4cd)]=++this['_changesetReqId']);let _0x507a97={'eventID':n[_0x33ab73(0x33f)]['SUBMIT_CHANGESET'],'data':{'unitID':_0x10546b[_0x33ab73(0x2e9)],'unitType':this[_0x33ab73(0x2b2)],'changeset':_0x10546b,'memberID':this['session'][_0x33ab73(0x268)]()}};return this[_0x33ab73(0x483)][_0x33ab73(0x1d8)](_0x507a97,this[_0x33ab73(0x2e9)],_0x9e6383);},'onConflict':(_0x1f28e8,_0x11f147,_0x3656d5)=>{const _0x44da31=_0x3cc255;this[_0x44da31(0x1de)][_0x44da31(0x22f)]||this[_0x44da31(0x1de)][_0x44da31(0x512)]({'unitID':_0x46c168,..._0x1f28e8,'localChanges':_0x11f147,'cacheCleared':_0x3656d5});},'onChangesetResend':_0x2e2e61=>{const _0x5cc95f=_0x3cc255;this[_0x5cc95f(0x41e)]['debug'](_0x5cc95f(0x221),_0x5cc95f(0x48b)+_0x2e2e61['reqId']+'\x20('+_0x2e2e61[_0x5cc95f(0x489)]+',\x20attempt\x20'+_0x2e2e61[_0x5cc95f(0x543)]+')'),queueMicrotask(()=>{const _0x3b0a6a=_0x5cc95f;this['_changesetResend$']['closed']||this[_0x3b0a6a(0x397)]['next']({'unitID':_0x46c168,..._0x2e2e61});});},'onMissingChangesets':({from:_0x355732,to:_0x4536c9})=>{const _0x4b1a50=_0x3cc255;this[_0x4b1a50(0x41e)][_0x4b1a50(0x2ba)](_0x4b1a50(0x221),'fetching\x20missing\x20changesets\x20from\x20'+_0x355732+_0x4b1a50(0x466)+_0x4536c9);let _0x3eba17={'eventID':n[_0x4b1a50(0x33f)][_0x4b1a50(0x498)],'data':{'unitID':_0x46c168,'unitType':this[_0x4b1a50(0x2b2)],'from':_0x355732,'to':_0x4536c9}};this['session']['send'](_0x3eba17,this['unitID']);}};}async[_0x28bbb9(0x1eb)](_0x38c913){const _0x2d00c3=_0x28bbb9;var _0x1b6c24;let _0x1fb57b=await((_0x1b6c24=this[_0x2d00c3(0x4a5)])==null?void 0x0:_0x1b6c24['loadOfflineData'](this['unitID'])),_0x431d9f=(_0x1fb57b==null?void 0x0:_0x1fb57b['mutations'])??[],_0x189cfa=(_0x1fb57b==null?void 0x0:_0x1fb57b[_0x2d00c3(0x438)])??null,_0x235bd6=!!(_0x189cfa!=null&&_0x189cfa['sid'])&&!!(_0x189cfa!=null&&_0x189cfa[_0x2d00c3(0x4cd)]);this[_0x2d00c3(0x1e6)]=_0x235bd6?_0x189cfa[_0x2d00c3(0x32d)]:(0x0,n[_0x2d00c3(0x321)])(),this[_0x2d00c3(0x2d1)]=_0x235bd6?_0x189cfa[_0x2d00c3(0x4cd)]:0x0;let _0x4b8bd3=this['unitID'];try{this[_0x2d00c3(0x284)](_0x189cfa,_0x431d9f);}catch(_0x3dced6){this['_logService'][_0x2d00c3(0x456)](_0x3dced6);}let _0xdad307=this[_0x2d00c3(0x29c)]();if(_0x38c913){let _0x2b93ac=We(this[_0x2d00c3(0x475)],_0x4b8bd3,this['_type'],_0x189cfa,_0x431d9f,_0xdad307);return _0x2b93ac instanceof A?_0x2b93ac[_0x2d00c3(0x3d2)]():(_0x2b93ac instanceof M||_0x2b93ac instanceof j)&&_0x2b93ac['resend'](),_0x2b93ac;}return this[_0x2d00c3(0x475)][_0x2d00c3(0x3e2)](P,_0x4b8bd3,this[_0x2d00c3(0x2b2)],_0x189cfa,_0x431d9f,_0xdad307);}[_0x28bbb9(0x284)](_0x1df330,_0x5b0445){const _0x6947f6=_0x28bbb9;var _0x4e53a6,_0x40d28c;let _0x9483d2=this[_0x6947f6(0x2ab)]['interceptor'][_0x6947f6(0x301)](this[_0x6947f6(0x2ab)][_0x6947f6(0x1ff)][_0x6947f6(0x282)]()['COMPRESS_MUTATION_APPLY']);(_0x4e53a6=_0x9483d2((_0x1df330==null?void 0x0:_0x1df330[_0x6947f6(0x220)])||[],null))==null||_0x4e53a6[_0x6947f6(0x3e9)](_0xc091d5=>this[_0x6947f6(0x265)][_0x6947f6(0x2bd)](_0xc091d5['id'],_0xc091d5[_0x6947f6(0x453)])),(_0x40d28c=_0x9483d2(_0x5b0445||[],null))==null||_0x40d28c[_0x6947f6(0x3e9)](_0x38f18d=>this[_0x6947f6(0x265)][_0x6947f6(0x2bd)](_0x38f18d['id'],_0x38f18d[_0x6947f6(0x453)]));}};I=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x4,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x1df)])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x7,(0x0,r[_0x28bbb9(0x431)])(v)),y(0x8,r['IUniverInstanceService']),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,r['ICommandService']),y(0xb,r[_0x28bbb9(0x427)]),y(0xc,(0x0,r[_0x28bbb9(0x1cd)])(T)),y(0xd,(0x0,r['Optional'])(C))],I);let L=class extends I{constructor(_0x4391ef,_0x3f55af,_0x21127f,_0x496040,_0xb33541,_0x267c46,_0x5736e6,_0xa0242,_0x5770a5,_0x337f27,_0x133e46,_0x4b305e,_0x3cf5b0,_0xf077bf,_0x5f1951){const _0x41a241=_0x28bbb9;super(_0x4391ef,_0x21127f,_0x3f55af,_0x496040,_0xb33541,_0x267c46,_0x5736e6,_0xa0242,_0x5770a5,_0x337f27,_0x133e46,_0x4b305e,_0xf077bf,_0x5f1951),this['unitID']=_0x4391ef,this[_0x41a241(0x538)]=_0x3f55af,this[_0x41a241(0x473)]=_0x3cf5b0,_(this,_0x41a241(0x4e7),null);}[_0x28bbb9(0x1c9)](_0x5df634){const _0x564297=_0x28bbb9;this[_0x564297(0x4e7)]=_0x5df634;}[_0x28bbb9(0x3ac)](){const _0x1ce794=_0x28bbb9;this[_0x1ce794(0x4e7)]=null,super[_0x1ce794(0x3ac)]();}[_0x28bbb9(0x29c)](){const _0x467d70=_0x28bbb9;let _0x43c8e0=super[_0x467d70(0x29c)]();return _0x43c8e0[_0x467d70(0x317)]=_0x428f6d=>{const _0x13da0c=_0x467d70;var _0xf0569d,_0x12e616;return(_0xf0569d=this[_0x13da0c(0x4e7)])==null||(_0x12e616=_0xf0569d[_0x13da0c(0x317)])==null?void 0x0:_0x12e616[_0x13da0c(0x446)](_0xf0569d,_0x428f6d);},_0x43c8e0['onTransformState']=_0x397d0c=>{const _0x18da02=_0x467d70;var _0x164c76,_0x5e17ce;return(_0x164c76=this[_0x18da02(0x4e7)])==null||(_0x5e17ce=_0x164c76['onTransformState'])==null?void 0x0:_0x5e17ce['call'](_0x164c76,_0x397d0c);},_0x43c8e0['onPrepareTransformSelections']=_0x179ea1=>{const _0x5708b7=_0x467d70;var _0x319773,_0x2fafef;return((_0x319773=this[_0x5708b7(0x4e7)])==null||(_0x2fafef=_0x319773[_0x5708b7(0x51d)])==null?void 0x0:_0x2fafef[_0x5708b7(0x446)](_0x319773,_0x179ea1))??null;},_0x43c8e0[_0x467d70(0x391)]=_0x1eb729=>{const _0x297669=_0x467d70;var _0x3c9197,_0x5c4c9b;return(_0x3c9197=this[_0x297669(0x4e7)])==null||(_0x5c4c9b=_0x3c9197[_0x297669(0x391)])==null?void 0x0:_0x5c4c9b[_0x297669(0x446)](_0x3c9197,_0x1eb729);},_0x43c8e0[_0x467d70(0x2a6)]=_0x161030=>{const _0x3e818a=_0x467d70;var _0x533deb,_0x186d33;return(_0x533deb=this[_0x3e818a(0x4e7)])==null||(_0x186d33=_0x533deb[_0x3e818a(0x2a6)])==null?void 0x0:_0x186d33[_0x3e818a(0x446)](_0x533deb,_0x161030);},_0x43c8e0['onTransformRemoteChangesetByIMECache']=_0x17aa52=>{const _0x2cadf8=_0x467d70;var _0x304d11,_0x1d7286;return((_0x304d11=this[_0x2cadf8(0x4e7)])==null||(_0x1d7286=_0x304d11[_0x2cadf8(0x348)])==null?void 0x0:_0x1d7286[_0x2cadf8(0x446)](_0x304d11,_0x17aa52))??_0x17aa52;},_0x43c8e0[_0x467d70(0x2de)]=_0x18ea56=>{const _0x5e183d=_0x467d70;var _0xf07aaf,_0xc116f9;return((_0xf07aaf=this[_0x5e183d(0x4e7)])==null||(_0xc116f9=_0xf07aaf[_0x5e183d(0x2de)])==null?void 0x0:_0xc116f9[_0x5e183d(0x446)](_0xf07aaf,_0x18ea56))??_0x18ea56;},_0x43c8e0;}async['_init'](){const _0x21c210=_0x28bbb9;let _0x284f03=await super[_0x21c210(0x240)]();return this['disposeWithMe'](this[_0x21c210(0x473)]['docStateChange$'][_0x21c210(0x264)](_0x12110c=>{const _0x2b02ed=_0x21c210;if(_0x12110c==null||_0x12110c['unitId']!==this[_0x2b02ed(0x2e9)])return;let {commandId:_0x3c6d2f,redoState:_0x5230d9,unitId:_0x12ae03}=_0x12110c,_0x1c9d42={'id':_0x3c6d2f,'type':r[_0x2b02ed(0x314)][_0x2b02ed(0x4aa)],'params':{'unitId':_0x12ae03,'actions':_0x5230d9['actions'],'textRanges':null}};this[_0x2b02ed(0x1be)](_0x1c9d42);})),this[_0x21c210(0x457)](this['_commandService'][_0x21c210(0x266)]((_0x25c0ec,_0x1d76e2)=>{const _0x53d424=_0x21c210;if(_0x25c0ec[_0x53d424(0x538)]!==r[_0x53d424(0x314)][_0x53d424(0x4aa)]||_0x1d76e2!=null&&_0x1d76e2[_0x53d424(0x32b)]||_0x1d76e2!=null&&_0x1d76e2[_0x53d424(0x327)]||_0x25c0ec['id']===i['RichTextEditingMutation']['id'])return;let _0x356666=_0x25c0ec['params'];if((_0x356666==null?void 0x0:_0x356666[_0x53d424(0x212)])!==this['unitID'])return;let _0x500f3b=_0x25c0ec,_0x39e368=this[_0x53d424(0x2ab)][_0x53d424(0x1ff)][_0x53d424(0x301)](this['_compressMutationService'][_0x53d424(0x1ff)][_0x53d424(0x282)]()[_0x53d424(0x4dc)])([_0x500f3b],this[_0x53d424(0x4b7)])||[_0x500f3b];this[_0x53d424(0x1be)](_0x39e368[0x0]);})),_0x284f03;}};L=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r['Injector'])),y(0x4,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x1df)])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)])),y(0x6,(0x0,r['Inject'])(n[_0x28bbb9(0x49e)])),y(0x7,(0x0,r['Inject'])(v)),y(0x8,r['IUniverInstanceService']),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,r['ICommandService']),y(0xb,r[_0x28bbb9(0x427)]),y(0xc,(0x0,r[_0x28bbb9(0x431)])(i[_0x28bbb9(0x3aa)])),y(0xd,(0x0,r[_0x28bbb9(0x1cd)])(T)),y(0xe,(0x0,r['Optional'])(C))],L);let R=class extends I{constructor(_0x2108e1,_0x1610fa,_0x19e8b0,_0x39f73d,_0x4e057c,_0x513185,_0x4d1a43,_0x197b45,_0x130f3e,_0x4c882a,_0x3cfde2,_0x546d4b,_0x145833,_0x5b022c){const _0x29a43b=_0x28bbb9;super(_0x2108e1,_0x19e8b0,_0x1610fa,_0x39f73d,_0x4e057c,_0x513185,_0x4d1a43,_0x197b45,_0x130f3e,_0x4c882a,_0x3cfde2,_0x546d4b,_0x145833,_0x5b022c),this[_0x29a43b(0x2e9)]=_0x2108e1,this[_0x29a43b(0x538)]=_0x1610fa;}async[_0x28bbb9(0x240)](){const _0x3e1bf3=_0x28bbb9;let _0x40ce42=await super['_init']();return this['disposeWithMe'](this[_0x3e1bf3(0x265)]['onMutationExecutedForCollab']((_0xbe6314,_0x1d4915)=>{const _0x259c1a=_0x3e1bf3;if(_0xbe6314[_0x259c1a(0x538)]!==r[_0x259c1a(0x314)][_0x259c1a(0x4aa)]||_0x1d4915!=null&&_0x1d4915[_0x259c1a(0x32b)]||_0x1d4915!=null&&_0x1d4915[_0x259c1a(0x327)])return;let _0x34520b=_0xbe6314[_0x259c1a(0x453)];if((_0x34520b==null?void 0x0:_0x34520b[_0x259c1a(0x212)])!==this['unitID'])return;let _0x1ba166=_0xbe6314,_0x8f592e=this[_0x259c1a(0x2ab)][_0x259c1a(0x1ff)][_0x259c1a(0x301)](this[_0x259c1a(0x2ab)][_0x259c1a(0x1ff)][_0x259c1a(0x282)]()[_0x259c1a(0x4dc)])([_0x1ba166],this[_0x259c1a(0x4b7)])||[_0x1ba166];this[_0x259c1a(0x1be)](_0x8f592e[0x0]);})),_0x40ce42;}};R=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r['Injector'])),y(0x4,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x1df)])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n['RevisionService'])),y(0x7,(0x0,r[_0x28bbb9(0x431)])(v)),y(0x8,r[_0x28bbb9(0x51c)]),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,r[_0x28bbb9(0x382)]),y(0xb,r[_0x28bbb9(0x427)]),y(0xc,(0x0,r[_0x28bbb9(0x1cd)])(T)),y(0xd,(0x0,r[_0x28bbb9(0x1cd)])(C))],R);let z=class extends I{constructor(_0x570b6c,_0x58ef12,_0x3baba3,_0x1dd776,_0x31b799,_0x5f48a8,_0x2a5b45,_0x25c240,_0x42f302,_0x500cd5,_0x151782,_0x16e351,_0x2b512a,_0x4d600e,_0x597fb3){const _0x22f194=_0x28bbb9;super(_0x570b6c,_0x3baba3,_0x58ef12,_0x1dd776,_0x31b799,_0x5f48a8,_0x2a5b45,_0x42f302,_0x500cd5,_0x151782,_0x16e351,_0x2b512a,_0x4d600e,_0x597fb3),this[_0x22f194(0x2e9)]=_0x570b6c,this['type']=_0x58ef12,this[_0x22f194(0x1d4)]=_0x25c240;}[_0x28bbb9(0x29c)](){const _0x3319c0=_0x28bbb9;let _0x23c915=super['_createHandler']();return _0x23c915[_0x3319c0(0x391)]=_0x5c46b2=>this[_0x3319c0(0x1d4)][_0x3319c0(0x2df)](_0x5c46b2),_0x23c915;}async[_0x28bbb9(0x240)](){const _0xa9eba1=_0x28bbb9;let _0x527abb=await super[_0xa9eba1(0x240)]();return this[_0xa9eba1(0x457)](this[_0xa9eba1(0x265)]['onMutationExecutedForCollab']((_0x4758e9,_0x23b730)=>{const _0xbfeb75=_0xa9eba1;if(_0x4758e9[_0xbfeb75(0x538)]!==r[_0xbfeb75(0x314)][_0xbfeb75(0x4aa)]||_0x23b730!=null&&_0x23b730[_0xbfeb75(0x32b)]||_0x23b730!=null&&_0x23b730[_0xbfeb75(0x327)])return;let _0xeecaaa=_0x4758e9[_0xbfeb75(0x453)];if((_0xeecaaa==null?void 0x0:_0xeecaaa[_0xbfeb75(0x212)])!==this[_0xbfeb75(0x2e9)])return;let _0x5d5a0d=_0x4758e9,_0x106941=this[_0xbfeb75(0x2ab)][_0xbfeb75(0x1ff)][_0xbfeb75(0x301)](this['_compressMutationService'][_0xbfeb75(0x1ff)][_0xbfeb75(0x282)]()[_0xbfeb75(0x4dc)])([_0x5d5a0d],this['_univerInstanceService'])||[_0x5d5a0d];this[_0xbfeb75(0x1be)](_0x106941[0x0]);})),_0x527abb;}};z=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x4,(0x0,r[_0x28bbb9(0x431)])(n['CompressMutationService'])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r['LocaleService'])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x7,(0x0,r[_0x28bbb9(0x431)])(w)),y(0x8,(0x0,r[_0x28bbb9(0x431)])(v)),y(0x9,r[_0x28bbb9(0x51c)]),y(0xa,r[_0x28bbb9(0x369)]),y(0xb,r[_0x28bbb9(0x382)]),y(0xc,r[_0x28bbb9(0x427)]),y(0xd,(0x0,r['Optional'])(T)),y(0xe,(0x0,r[_0x28bbb9(0x1cd)])(C))],z);let B=class extends I{constructor(_0x426b28,_0x572139,_0x1abeaa,_0x202abf,_0x20458c,_0x12de6e,_0x408984,_0x12943e,_0x5f20f9,_0x8233f1,_0x14c779,_0x1520ab,_0x54e99e,_0x4137ec){const _0x26d8fd=_0x28bbb9;super(_0x426b28,_0x1abeaa,_0x572139,_0x202abf,_0x20458c,_0x12de6e,_0x408984,_0x12943e,_0x5f20f9,_0x8233f1,_0x14c779,_0x1520ab,_0x54e99e,_0x4137ec),this[_0x26d8fd(0x2e9)]=_0x426b28,this[_0x26d8fd(0x538)]=_0x572139;}async['_init'](){const _0x9f3ee=_0x28bbb9;let _0x437fe6=await super['_init']();return this[_0x9f3ee(0x457)](this['_commandService'][_0x9f3ee(0x266)]((_0x4cb48c,_0x3ec3ac)=>{const _0x32fef6=_0x9f3ee;if(_0x4cb48c[_0x32fef6(0x538)]!==r[_0x32fef6(0x314)][_0x32fef6(0x4aa)]||_0x3ec3ac!=null&&_0x3ec3ac[_0x32fef6(0x32b)]||_0x3ec3ac!=null&&_0x3ec3ac[_0x32fef6(0x327)])return;let _0x17fd52=_0x4cb48c['params'];if((_0x17fd52==null?void 0x0:_0x17fd52[_0x32fef6(0x212)])!==this['unitID'])return;let _0x208256=_0x4cb48c,_0x414604=this[_0x32fef6(0x2ab)][_0x32fef6(0x1ff)]['fetchThroughInterceptors'](this['_compressMutationService']['interceptor'][_0x32fef6(0x282)]()[_0x32fef6(0x4dc)])([_0x208256],this[_0x32fef6(0x4b7)])||[_0x208256];this[_0x32fef6(0x1be)](_0x414604[0x0]);})),_0x437fe6;}};B=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x4,(0x0,r['Inject'])(n[_0x28bbb9(0x1df)])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x7,(0x0,r[_0x28bbb9(0x431)])(v)),y(0x8,r[_0x28bbb9(0x51c)]),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,r[_0x28bbb9(0x382)]),y(0xb,r[_0x28bbb9(0x427)]),y(0xc,(0x0,r[_0x28bbb9(0x1cd)])(T)),y(0xd,(0x0,r['Optional'])(C))],B);let V=class extends I{constructor(_0x261d73,_0x3fad4f,_0x25aad7,_0x4ebb08,_0x3be3f3,_0x1e7e34,_0xac4f66,_0x32b2c9,_0x36de61,_0x3a11e3,_0x45c8d8,_0x3891c1,_0x5316b1,_0x19b6c0){const _0x10c5ef=_0x28bbb9;super(_0x261d73,_0x25aad7,_0x3fad4f,_0x4ebb08,_0x3be3f3,_0x1e7e34,_0xac4f66,_0x32b2c9,_0x36de61,_0x3a11e3,_0x45c8d8,_0x3891c1,_0x5316b1,_0x19b6c0),this[_0x10c5ef(0x2e9)]=_0x261d73,this[_0x10c5ef(0x538)]=_0x3fad4f;}async[_0x28bbb9(0x240)](){const _0x3e65e3=_0x28bbb9;let _0x54a705=await super[_0x3e65e3(0x240)]();return this[_0x3e65e3(0x457)](this['_commandService']['onMutationExecutedForCollab']((_0x50573c,_0x457a3f)=>{const _0x81d55a=_0x3e65e3;if(_0x50573c[_0x81d55a(0x538)]!==r[_0x81d55a(0x314)]['MUTATION']||_0x457a3f!=null&&_0x457a3f[_0x81d55a(0x32b)]||_0x457a3f!=null&&_0x457a3f[_0x81d55a(0x327)])return;let _0x5a1fba=_0x50573c[_0x81d55a(0x453)];if((_0x5a1fba==null?void 0x0:_0x5a1fba['unitId'])!==this[_0x81d55a(0x2e9)])return;let _0x283eac=_0x50573c,_0x158a41=this[_0x81d55a(0x2ab)]['interceptor'][_0x81d55a(0x301)](this[_0x81d55a(0x2ab)][_0x81d55a(0x1ff)]['getInterceptPoints']()[_0x81d55a(0x4dc)])([_0x283eac],this[_0x81d55a(0x4b7)])||[_0x283eac];this[_0x81d55a(0x1be)](_0x158a41[0x0]);})),_0x54a705;}};V=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x4,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x1df)])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x7,(0x0,r[_0x28bbb9(0x431)])(v)),y(0x8,r[_0x28bbb9(0x51c)]),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,r['ICommandService']),y(0xb,r[_0x28bbb9(0x427)]),y(0xc,(0x0,r['Optional'])(T)),y(0xd,(0x0,r[_0x28bbb9(0x1cd)])(C))],V);let H=class extends I{constructor(_0x5cd0c0,_0x3f028b,_0x13e4b2,_0x5b29a2,_0x33c6a2,_0x231296,_0x501059,_0x2693dc,_0x1499bf,_0x147839,_0x1f1c2c,_0x3304c2,_0x3432f4,_0x1ae6e8){const _0x55e856=_0x28bbb9;super(_0x5cd0c0,_0x13e4b2,_0x3f028b,_0x5b29a2,_0x33c6a2,_0x231296,_0x501059,_0x2693dc,_0x1499bf,_0x147839,_0x1f1c2c,_0x3304c2,_0x3432f4,_0x1ae6e8),this['unitID']=_0x5cd0c0,this[_0x55e856(0x538)]=_0x3f028b;}async['_init'](){const _0x2f082b=_0x28bbb9;let _0xf3484b=await super[_0x2f082b(0x240)]();return this[_0x2f082b(0x457)](this[_0x2f082b(0x265)]['onMutationExecutedForCollab']((_0x2dd136,_0x3469cf)=>{const _0x572d27=_0x2f082b;if(_0x2dd136[_0x572d27(0x538)]!==r[_0x572d27(0x314)]['MUTATION']||_0x3469cf!=null&&_0x3469cf[_0x572d27(0x32b)]||_0x3469cf!=null&&_0x3469cf[_0x572d27(0x327)])return;let _0x45c1fc=_0x2dd136[_0x572d27(0x453)];if((_0x45c1fc==null?void 0x0:_0x45c1fc[_0x572d27(0x212)])!==this[_0x572d27(0x2e9)])return;let _0x1f3176=_0x2dd136,_0x4d1e2a=this['_compressMutationService'][_0x572d27(0x1ff)]['fetchThroughInterceptors'](this[_0x572d27(0x2ab)]['interceptor'][_0x572d27(0x282)]()[_0x572d27(0x4dc)])([_0x1f3176],this['_univerInstanceService'])||[_0x1f3176];this[_0x572d27(0x1be)](_0x4d1e2a[0x0]);})),_0xf3484b;}};H=b([y(0x3,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x4,(0x0,r['Inject'])(n['CompressMutationService'])),y(0x5,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)])),y(0x6,(0x0,r[_0x28bbb9(0x431)])(n[_0x28bbb9(0x49e)])),y(0x7,(0x0,r['Inject'])(v)),y(0x8,r[_0x28bbb9(0x51c)]),y(0x9,r[_0x28bbb9(0x369)]),y(0xa,r[_0x28bbb9(0x382)]),y(0xb,r[_0x28bbb9(0x427)]),y(0xc,(0x0,r[_0x28bbb9(0x1cd)])(T)),y(0xd,(0x0,r['Optional'])(C))],H);const Ge=(0x0,r[_0x28bbb9(0x45b)])(_0x28bbb9(0x477));function Ke(_0x4b6bad){const _0x2ede10=_0x28bbb9;let _0x5ee1b0=_0x4b6bad['data'],_0x1e6eb0=JSON['parse'](_0x5ee1b0);switch(_0x1e6eb0['cmd']){case o['CombCmd'][_0x2ede10(0x499)]:case o[_0x2ede10(0x291)][_0x2ede10(0x52a)]:{let _0xedd6bd=_0x1e6eb0[_0x2ede10(0x419)];return{..._0x1e6eb0,'data':_0xedd6bd,'cmd':_0x1e6eb0[_0x2ede10(0x329)]};}case o[_0x2ede10(0x291)][_0x2ede10(0x21f)]:{let _0x101df6=_0x1e6eb0[_0x2ede10(0x35b)];return{..._0x1e6eb0,'data':_0x101df6,'cmd':_0x1e6eb0[_0x2ede10(0x329)]};}case o[_0x2ede10(0x291)][_0x2ede10(0x540)]:{let _0x14ed50=_0x1e6eb0[_0x2ede10(0x23b)];switch(_0x14ed50[_0x2ede10(0x2ff)]){case n['CollaborationEvent'][_0x2ede10(0x3a1)]:var _0x1c9b30;return{..._0x1e6eb0,'data':{..._0x14ed50,'data':(_0x1c9b30=_0x14ed50['permissionRejEvent'])==null?void 0x0:_0x1c9b30['cs']},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)]['CHANGESET_ACK']:var _0x36bef5;return{..._0x1e6eb0,'data':{..._0x14ed50,'data':(_0x36bef5=_0x14ed50[_0x2ede10(0x3de)])==null?void 0x0:_0x36bef5['cs']},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)][_0x2ede10(0x49b)]:var _0xe6e0e9;return{..._0x1e6eb0,'data':{..._0x14ed50,'data':(_0xe6e0e9=_0x14ed50[_0x2ede10(0x445)])==null?void 0x0:_0xe6e0e9['cs']},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)][_0x2ede10(0x37f)]:var _0xf3ab76;return{..._0x1e6eb0,'data':{..._0x14ed50,'data':(_0xf3ab76=_0x14ed50['csRejEvent'])==null?void 0x0:_0xf3ab76['cs']},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n['CollaborationEvent'][_0x2ede10(0x422)]:var _0xe501d;return{..._0x1e6eb0,'data':{..._0x14ed50,'data':(_0xe501d=_0x14ed50[_0x2ede10(0x448)])==null?void 0x0:_0xe501d['cs']},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)][_0x2ede10(0x1ee)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x560)]},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)][_0x2ede10(0x313)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50['joinEvent']},'cmd':_0x1e6eb0['cmd']};case n[_0x2ede10(0x33f)]['USERS_LEAVE']:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x325)]},'cmd':_0x1e6eb0['cmd']};case n['CollaborationEvent']['LIVESHARE_NEW_HOST']:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x3f1)]},'cmd':_0x1e6eb0['cmd']};case n['CollaborationEvent'][_0x2ede10(0x283)]:case n[_0x2ede10(0x33f)][_0x2ede10(0x3fd)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x3ec)]},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)][_0x2ede10(0x35c)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x3f1)]},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)]['MSG_FOR_ERROR']:return{..._0x1e6eb0,'data':_0x14ed50,'cmd':_0x1e6eb0['cmd']};case n['CollaborationEvent'][_0x2ede10(0x43c)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x3d6)]},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n['CollaborationEvent'][_0x2ede10(0x37d)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x31b)]},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};case n[_0x2ede10(0x33f)]['SHOULD_CLOSE_CONN']:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50['shouldCloseConn']},'cmd':_0x1e6eb0['cmd']};case n[_0x2ede10(0x33f)][_0x2ede10(0x533)]:return{..._0x1e6eb0,'data':{..._0x14ed50,'data':_0x14ed50[_0x2ede10(0x2dd)]},'cmd':_0x1e6eb0[_0x2ede10(0x329)]};default:return _0x1e6eb0;}}default:return _0x1e6eb0;}}function qe(_0x4f78c8){const _0x138381=_0x28bbb9;switch(_0x4f78c8['cmd']){case o[_0x138381(0x291)][_0x138381(0x499)]:case o[_0x138381(0x291)]['HELLO']:return JSON[_0x138381(0x4d3)]({'cmd':_0x4f78c8[_0x138381(0x329)],'routeKey':_0x4f78c8[_0x138381(0x1e3)]});case o[_0x138381(0x291)]['INGEST']:{let _0x404959;switch(_0x4f78c8[_0x138381(0x350)][_0x138381(0x2ff)]){case n[_0x138381(0x33f)][_0x138381(0x1ee)]:_0x404959={'eventID':n[_0x138381(0x33f)][_0x138381(0x1ee)],'updateCursorEvent':_0x4f78c8[_0x138381(0x350)][_0x138381(0x350)]};break;case n[_0x138381(0x33f)][_0x138381(0x3e8)]:_0x404959={'eventID':n[_0x138381(0x33f)][_0x138381(0x3e8)],'leaveEvent':_0x4f78c8[_0x138381(0x350)][_0x138381(0x350)]};break;case n[_0x138381(0x33f)][_0x138381(0x313)]:_0x404959={'eventID':n[_0x138381(0x33f)][_0x138381(0x313)],'joinEvent':_0x4f78c8[_0x138381(0x350)]['data']};break;case n[_0x138381(0x33f)][_0x138381(0x44d)]:_0x404959={'eventID':n[_0x138381(0x33f)][_0x138381(0x44d)],'liveShareNewHost':_0x4f78c8[_0x138381(0x350)]['data']};break;case n[_0x138381(0x33f)][_0x138381(0x3fd)]:_0x404959={'eventID':n[_0x138381(0x33f)]['LIVESHARE_OPERATION'],'liveShareOperation':_0x4f78c8[_0x138381(0x350)][_0x138381(0x350)]};break;case n[_0x138381(0x33f)][_0x138381(0x35c)]:_0x404959={'eventID':n['CollaborationEvent'][_0x138381(0x35c)],'liveShareTerminate':_0x4f78c8[_0x138381(0x350)]['data']};break;case n[_0x138381(0x33f)][_0x138381(0x3b6)]:_0x404959={'eventID':n[_0x138381(0x33f)]['LIVESHARE_REQUEST_HOST'],'liveShareRequestHost':_0x4f78c8['data']['data']};break;case n['CollaborationEvent'][_0x138381(0x283)]:_0x404959={'eventID':n[_0x138381(0x33f)][_0x138381(0x283)]};break;default:_0x404959={'eventID':_0x4f78c8['data'][_0x138381(0x2ff)]};}return JSON[_0x138381(0x4d3)]({'cmd':_0x4f78c8[_0x138381(0x329)],'routeKey':_0x4f78c8[_0x138381(0x1e3)],'collaMsg':_0x404959});}case o[_0x138381(0x291)][_0x138381(0x21f)]:return JSON[_0x138381(0x4d3)]({'cmd':_0x4f78c8[_0x138381(0x329)],'routeKey':_0x4f78c8['routeKey'],'joinReq':_0x4f78c8[_0x138381(0x350)]});case o['CombCmd'][_0x138381(0x45e)]:return JSON['stringify']({'cmd':_0x4f78c8[_0x138381(0x329)],'routeKey':_0x4f78c8[_0x138381(0x1e3)],'leaveReq':_0x4f78c8[_0x138381(0x350)]});default:throw Error(_0x138381(0x25a));}}const Je=(0x0,r[_0x28bbb9(0x45b)])(_0x28bbb9(0x400));function Ye(_0x167730,_0x385838,_0x134e24){const _0x46c5e6=_0x28bbb9;return _0x167730+'/'+_0x385838+_0x46c5e6(0x300)+_0x134e24+_0x46c5e6(0x3c3);}let Xe=class extends r[_0x28bbb9(0x3ad)]{constructor(_0xc38506,_0x1a8230,_0x362406,_0x87ab5,_0x52d211){const _0x5389c6=_0x28bbb9;super(),this['_injector']=_0xc38506,this[_0x5389c6(0x2a4)]=_0x1a8230,this[_0x5389c6(0x2c8)]=_0x362406,this[_0x5389c6(0x41e)]=_0x87ab5,this['_snapshotServerService']=_0x52d211;}['_doCreateSocket'](_0x5a7098){const _0xeb189f=_0x28bbb9;let _0x43eee6=this[_0xeb189f(0x475)][_0xeb189f(0x285)](e[_0xeb189f(0x320)]);if(!_0x43eee6)throw Error(_0xeb189f(0x3b7));let _0x2f101b=_0x43eee6[_0xeb189f(0x3fe)](_0x5a7098);if(!_0x2f101b)throw Error(_0xeb189f(0x3ae));let _0x2e27ea=new r[(_0xeb189f(0x549))](),_0x32de0d=new t['Subject']();_0x2e27ea['add'](_0x2f101b['close$'][_0xeb189f(0x264)](_0x303951=>_0x32de0d[_0xeb189f(0x512)](_0x303951))),_0x2e27ea[_0xeb189f(0x3a3)]((0x0,r[_0xeb189f(0x278)])(()=>_0x32de0d[_0xeb189f(0x30f)]()));let _0x37bb1e=new t[(_0xeb189f(0x39a))]();_0x2e27ea[_0xeb189f(0x3a3)](_0x2f101b[_0xeb189f(0x39c)][_0xeb189f(0x264)](_0x133be2=>_0x37bb1e[_0xeb189f(0x512)](_0x133be2))),_0x2e27ea[_0xeb189f(0x3a3)]((0x0,r[_0xeb189f(0x278)])(()=>_0x37bb1e['complete']()));let _0x142c34=new t[(_0xeb189f(0x39a))]();_0x2e27ea[_0xeb189f(0x3a3)](_0x2f101b[_0xeb189f(0x3fa)][_0xeb189f(0x264)](_0x344404=>{const _0x89b1db=_0xeb189f;let _0x3a91cf=Ke(_0x344404);_0x142c34[_0x89b1db(0x512)](_0x3a91cf);})),_0x2e27ea[_0xeb189f(0x3a3)]((0x0,r['toDisposable'])(()=>_0x142c34['complete']()));let _0x5a80fc,_0x36e1c8=()=>{const _0x4c87c5=_0xeb189f;_0x37bb1e[_0x4c87c5(0x512)](new Event(_0x4c87c5(0x4bf))),_0x32de0d['next'](new Event('connection\x20error')),_0x5a80fc['close']();};return _0x5a80fc={'memberID':'','close$':_0x32de0d[_0xeb189f(0x32f)](),'error$':_0x37bb1e['asObservable'](),'open$':_0x2f101b[_0xeb189f(0x36e)],'message$':_0x142c34[_0xeb189f(0x32f)](),'send':(_0x22ac73,_0x477ac1)=>{const _0x2fa564=_0xeb189f;if(_0x22ac73[_0x2fa564(0x329)]===o[_0x2fa564(0x291)][_0x2fa564(0x31c)]){if(_0x22ac73['data']['eventID']===n[_0x2fa564(0x33f)]['SUBMIT_CHANGESET']){let _0x221692=this[_0x2fa564(0x4bd)](_0x5a80fc,_0x22ac73['data'],(_0x477ac1==null?void 0x0:_0x477ac1[_0x2fa564(0x29e)])??0x1d4c0);return _0x221692[_0x2fa564(0x4a4)](()=>void 0x0),_0x221692;}if(_0x22ac73[_0x2fa564(0x350)][_0x2fa564(0x2ff)]===n['CollaborationEvent']['FETCH_MISSING']){let _0x2d5ed3=_0x22ac73['data'];this[_0x2fa564(0x4a2)](_0x2d5ed3)[_0x2fa564(0x4b4)](_0x14940a=>{const _0x4114e4=_0x2fa564;_0x142c34[_0x4114e4(0x512)]({'cmd':o[_0x4114e4(0x291)][_0x4114e4(0x540)],'code':o[_0x4114e4(0x2e7)]['OK'],'routeKey':_0x2d5ed3['data']['unitID'],'routeType':'','data':{'eventID':n[_0x4114e4(0x33f)][_0x4114e4(0x412)],'data':{'changesets':_0x14940a}}});})[_0x2fa564(0x4a4)](_0xb532cc=>{const _0x239c31=_0x2fa564;this[_0x239c31(0x41e)][_0x239c31(0x456)](_0xb532cc),_0x36e1c8();});return;}}_0x2f101b[_0x2fa564(0x1d8)](qe(_0x22ac73));},'close':()=>{_0x2f101b['close'](),_0x2e27ea['dispose']();}},_0x5a80fc;}[_0x28bbb9(0x4bd)](_0x1c6bb1,_0x3f4a07,_0x1af040){const _0x6a2fe3=_0x28bbb9;let {unitType:_0x94888,unitID:_0x151f34,changeset:_0x252f48}=_0x3f4a07[_0x6a2fe3(0x350)],_0x4f02cf={'unitID':_0x151f34,'memberID':_0x1c6bb1['memberID'],'type':_0x94888,'changeset':(0x0,n[_0x6a2fe3(0x50d)])(_0x252f48)},_0xd5fe9b=this[_0x6a2fe3(0x2c8)][_0x6a2fe3(0x230)](m),_0xb09f3f=Ye((_0xd5fe9b==null?void 0x0:_0xd5fe9b[_0x6a2fe3(0x542)])??'/universer-api/comb',_0x94888,_0x151f34);return(0x0,t['firstValueFrom'])(this[_0x6a2fe3(0x2a4)][_0x6a2fe3(0x253)]('POST',_0xb09f3f,{'body':_0x4f02cf})[_0x6a2fe3(0x213)]((0x0,t[_0x6a2fe3(0x46f)])(_0x541c99=>_0x541c99[_0x6a2fe3(0x538)]===e[_0x6a2fe3(0x3c4)][_0x6a2fe3(0x2b5)]),(0x0,t[_0x6a2fe3(0x29e)])(_0x1af040)))[_0x6a2fe3(0x4b4)](()=>void 0x0,_0x5b202d=>{const _0x471b3f=_0x6a2fe3;throw this[_0x471b3f(0x41e)]['warn'](_0x471b3f(0x4d0),_0x471b3f(0x504)+_0x252f48['sid']+':'+_0x252f48[_0x471b3f(0x4cd)]+'\x20failed:\x20'+Ze(_0x5b202d)),_0x5b202d;});}async[_0x28bbb9(0x4a2)](_0x3ed87d){const _0x3e6b2f=_0x28bbb9;let {unitID:_0x1959f6,from:_0x4ab51d,to:_0x10c388,unitType:_0x3a2302}=_0x3ed87d[_0x3e6b2f(0x350)];return(await this['_snapshotServerService'][_0x3e6b2f(0x556)]({'metadata':void 0x0},{'unitID':_0x1959f6,'type':_0x3a2302,'from':_0x4ab51d,'to':_0x10c388}))[_0x3e6b2f(0x509)][_0x3e6b2f(0x485)](_0xb2207a=>((_0xb2207a[_0x3e6b2f(0x220)]===null||_0xb2207a[_0x3e6b2f(0x220)]===void 0x0)&&(_0xb2207a['mutations']=[]),_0xb2207a));}};Xe=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x1,(0x0,r['Inject'])(e['HTTPService'])),y(0x2,r[_0x28bbb9(0x421)]),y(0x3,r[_0x28bbb9(0x369)]),y(0x4,n[_0x28bbb9(0x35f)])],Xe);function Ze(_0x402950){const _0x40a6b7=_0x28bbb9;return _0x402950 instanceof e[_0x40a6b7(0x2b4)]?_0x40a6b7(0x3ab)+(_0x402950['status']??0x0):_0x402950 instanceof Error?_0x402950['name']:String(_0x402950);}const Qe=(0x0,r[_0x28bbb9(0x45b)])('univer-pro.collaboration-client-adapter-service');function $e(_0x305898={}){const _0x8884bc=_0x28bbb9;return _0x305898[_0x8884bc(0x2f1)]?{'resolveUnit':_0x305898[_0x8884bc(0x2f1)]}:{'resolveUnit':_0x23d778=>({'target':{'unitId':_0x23d778[_0x8884bc(0x212)],'unitType':_0x23d778[_0x8884bc(0x3da)]}})};}function et(_0x220e7d,_0xa69128,_0x7b30fa){const _0x31c49a=_0x28bbb9;let _0x349358=_0x7b30fa[_0x31c49a(0x29d)][_0x31c49a(0x1e4)];if(_0x349358!=null&&_0x349358[_0x31c49a(0x4db)]()==='')throw Error(_0x31c49a(0x32e));if(!_0x7b30fa[_0x31c49a(0x29d)][_0x31c49a(0x212)])throw Error(_0x31c49a(0x331));return{'localUnitId':_0x220e7d,'unitType':_0xa69128,'target':{'endpoint':_0x349358,'unitId':_0x7b30fa[_0x31c49a(0x29d)][_0x31c49a(0x212)],'unitType':_0x7b30fa['target'][_0x31c49a(0x3da)]??_0xa69128},'changeset':_0x7b30fa[_0x31c49a(0x2d9)]};}let U=class extends r[_0x28bbb9(0x3ad)]{constructor(_0x1902d7,_0x66e012,_0x4e7bc5,_0x5721dd,_0x4b3e02,_0x307fbf){const _0x45327d=_0x28bbb9;super(),this[_0x45327d(0x475)]=_0x1902d7,this[_0x45327d(0x41e)]=_0x66e012,this[_0x45327d(0x2c8)]=_0x4e7bc5,this[_0x45327d(0x4b8)]=_0x5721dd,this[_0x45327d(0x3b5)]=_0x4b3e02,this[_0x45327d(0x42a)]=_0x307fbf,_(this,_0x45327d(0x1da),new Map()),_(this,'_pendingSessions',new Map()),_(this,_0x45327d(0x344),new Map()),_(this,_0x45327d(0x532),new Map()),_(this,'_networkConditionService',void 0x0),_(this,'socket$',this[_0x45327d(0x450)](void 0x0)[_0x45327d(0x298)][_0x45327d(0x32f)]()),_(this,_0x45327d(0x43a),new t[(_0x45327d(0x45f))](0x0)),_(this,_0x45327d(0x299),this['_status$'][_0x45327d(0x32f)]());}[_0x28bbb9(0x28b)](){const _0x1a7a54=_0x28bbb9;this['_networkConditionService']||(this[_0x1a7a54(0x2b7)]=this[_0x1a7a54(0x475)][_0x1a7a54(0x285)](Ge,r[_0x1a7a54(0x3db)][_0x1a7a54(0x32a)])??void 0x0,this['_networkConditionService']&&this[_0x1a7a54(0x457)](this[_0x1a7a54(0x2b7)]['online$'][_0x1a7a54(0x264)](_0x4c1bfc=>{const _0x44a246=_0x1a7a54;_0x4c1bfc&&this[_0x44a246(0x4d8)](),_0x4c1bfc||this[_0x44a246(0x532)][_0x44a246(0x3e9)](_0x3ac2f3=>this[_0x44a246(0x43e)](_0x3ac2f3));})));}['dispose'](){const _0x2f5c58=_0x28bbb9;super[_0x2f5c58(0x3ac)](),this[_0x2f5c58(0x532)][_0x2f5c58(0x3e9)](_0x3401ea=>{const _0x53eb32=_0x2f5c58;var _0x47465c,_0x5f5ae2,_0x5b3a82;(_0x47465c=_0x3401ea['socketSubscription'])==null||_0x47465c[_0x53eb32(0x3c7)](),_0x3401ea[_0x53eb32(0x3b1)]=null,this[_0x53eb32(0x4f7)](_0x3401ea),this[_0x53eb32(0x52b)](_0x3401ea),this[_0x53eb32(0x235)](_0x3401ea),this['_clearHeartbeatTimer'](_0x3401ea),(_0x5f5ae2=_0x3401ea[_0x53eb32(0x298)][_0x53eb32(0x2cc)]())==null||_0x5f5ae2[_0x53eb32(0x326)](),(_0x5b3a82=_0x3401ea[_0x53eb32(0x42b)])==null||_0x5b3a82[_0x53eb32(0x326)](),_0x3401ea['socket$'][_0x53eb32(0x30f)]();}),this['_socketChannels']['clear'](),this[_0x2f5c58(0x1da)]['forEach'](_0xeb2640=>_0xeb2640[_0x2f5c58(0x3ac)]()),this[_0x2f5c58(0x1da)][_0x2f5c58(0x311)](),this[_0x2f5c58(0x344)]['clear'](),this['_status$'][_0x2f5c58(0x30f)]();}async[_0x28bbb9(0x345)](_0x3a8e0d,_0x57a685){const _0x2cdcd0=_0x28bbb9;if(this['_listenToNetworkCondition'](),this[_0x2cdcd0(0x1da)][_0x2cdcd0(0x546)](_0x3a8e0d))return this['_sessions'][_0x2cdcd0(0x285)](_0x3a8e0d);let _0x30f82c=this[_0x2cdcd0(0x1f7)][_0x2cdcd0(0x285)](_0x3a8e0d);if(_0x30f82c)return _0x30f82c;let _0x49cb81=this[_0x2cdcd0(0x3a7)](_0x3a8e0d,_0x57a685);this[_0x2cdcd0(0x1f7)][_0x2cdcd0(0x36a)](_0x3a8e0d,_0x49cb81);try{return await _0x49cb81;}finally{this[_0x2cdcd0(0x1f7)][_0x2cdcd0(0x551)](_0x3a8e0d);}}async[_0x28bbb9(0x3a7)](_0x2b4116,_0x365054){const _0x4ee3ee=_0x28bbb9;let _0x4ae5da=await this[_0x4ee3ee(0x3e0)](_0x2b4116,_0x365054),_0x2a087e=this[_0x4ee3ee(0x450)](_0x4ae5da[_0x4ee3ee(0x29d)]['endpoint']);this[_0x4ee3ee(0x2f5)](_0x2a087e);let _0x30e04a=this[_0x4ee3ee(0x475)][_0x4ee3ee(0x3e2)](S,_0x4ae5da,_0x2a087e[_0x4ee3ee(0x298)][_0x4ee3ee(0x32f)]());return this['_sessions']['set'](_0x2b4116,_0x30e04a),this[_0x4ee3ee(0x344)][_0x4ee3ee(0x36a)](_0x2b4116,_0x2a087e['endpointKey']),_0x30e04a;}[_0x28bbb9(0x200)](_0x184cdf){const _0x35aa0a=_0x28bbb9;let _0x17c6ff=this[_0x35aa0a(0x1da)]['get'](_0x184cdf),_0x318d82=this[_0x35aa0a(0x344)][_0x35aa0a(0x285)](_0x184cdf);if(_0x17c6ff&&(this[_0x35aa0a(0x1da)]['delete'](_0x184cdf),this['_sessionChannels'][_0x35aa0a(0x551)](_0x184cdf),_0x17c6ff[_0x35aa0a(0x326)]()),_0x318d82!==void 0x0&&!this[_0x35aa0a(0x3f7)](_0x318d82)){let _0x4613aa=this['_socketChannels'][_0x35aa0a(0x285)](_0x318d82);_0x4613aa&&this[_0x35aa0a(0x43e)](_0x4613aa);}}[_0x28bbb9(0x4d8)](){const _0x161149=_0x28bbb9;(this[_0x161149(0x532)][_0x161149(0x1e8)]?[...this[_0x161149(0x532)][_0x161149(0x2fe)]()]:[this[_0x161149(0x450)](void 0x0)])[_0x161149(0x3e9)](_0x5e59bc=>{const _0x3f50a2=_0x161149;!this[_0x3f50a2(0x3f7)](_0x5e59bc[_0x3f50a2(0x281)])||_0x5e59bc['socketReady']||_0x5e59bc[_0x3f50a2(0x42b)]||_0x5e59bc['connectionAttempt']||(_0x5e59bc[_0x3f50a2(0x2ec)]=0x0,this[_0x3f50a2(0x52b)](_0x5e59bc),this[_0x3f50a2(0x530)](_0x5e59bc));});}['_clearRetryConnectingTimer'](_0x3bdcbe){const _0x4239dd=_0x28bbb9;_0x3bdcbe[_0x4239dd(0x46d)]!=null&&(clearTimeout(_0x3bdcbe[_0x4239dd(0x46d)]),_0x3bdcbe['retryConnectingTimer']=null);}[_0x28bbb9(0x4c9)](_0x564de5){const _0x5adf1a=_0x28bbb9;let _0x591b84=this[_0x5adf1a(0x2c8)][_0x5adf1a(0x230)](m),_0x3f05d9=_0x564de5[_0x5adf1a(0x1e4)]??(_0x591b84==null?void 0x0:_0x591b84[_0x5adf1a(0x1e7)])??_0x5adf1a(0x565);return this['_socketService'][_0x5adf1a(0x3fe)](_0x3f05d9);}async[_0x28bbb9(0x2f5)](_0xb291a4){const _0x53c5c7=_0x28bbb9;var _0x59476c;if(this[_0x53c5c7(0x1c7)]||((_0x59476c=this[_0x53c5c7(0x2b7)])==null?void 0x0:_0x59476c['online'])===!0x1||_0xb291a4[_0x53c5c7(0x52e)]||_0xb291a4[_0x53c5c7(0x42b)]||_0xb291a4[_0x53c5c7(0x3a0)])return;let _0x57df96={};_0xb291a4[_0x53c5c7(0x3a0)]=_0x57df96;try{let _0x76c655=await this[_0x53c5c7(0x4c9)](_0xb291a4);if(this[_0x53c5c7(0x1c7)]||_0xb291a4[_0x53c5c7(0x3a0)]!==_0x57df96){_0x76c655==null||_0x76c655[_0x53c5c7(0x326)]();return;}if(_0x76c655){var _0x38e425;_0xb291a4[_0x53c5c7(0x42b)]=_0x76c655,_0xb291a4['handshakeTimer']=setTimeout(()=>{const _0x552894=_0x53c5c7;!this['_disposed']&&_0xb291a4['candidateSocket']===_0x76c655&&this[_0x552894(0x244)](_0xb291a4);},0x4e20);let _0x2e0456=_0x76c655[_0x53c5c7(0x1d8)];_0x76c655[_0x53c5c7(0x1d8)]=(_0x1a6a53,_0x386b31)=>(_0x1a6a53[_0x53c5c7(0x329)]!==o['CombCmd']['LEAVE']&&!tt(_0x1a6a53)&&_0xb291a4['socketReady']&&_0xb291a4[_0x53c5c7(0x298)][_0x53c5c7(0x2cc)]()===_0x76c655&&this[_0x53c5c7(0x1fe)](_0xb291a4),_0x386b31===void 0x0?_0x2e0456[_0x53c5c7(0x446)](_0x76c655,_0x1a6a53):_0x2e0456[_0x53c5c7(0x446)](_0x76c655,_0x1a6a53,_0x386b31)),(_0x38e425=_0xb291a4[_0x53c5c7(0x3b1)])==null||_0x38e425[_0x53c5c7(0x3c7)]();let _0x2010cf=new t[(_0x53c5c7(0x23a))]();_0xb291a4[_0x53c5c7(0x3b1)]=_0x2010cf,_0x2010cf[_0x53c5c7(0x3a3)](_0x76c655['message$'][_0x53c5c7(0x264)](_0x6ef193=>this[_0x53c5c7(0x488)](_0xb291a4,_0x76c655,_0x6ef193))),_0x2010cf[_0x53c5c7(0x3a3)](_0x76c655[_0x53c5c7(0x39c)][_0x53c5c7(0x213)]((0x0,c[_0x53c5c7(0x3cb)])(0x1))[_0x53c5c7(0x264)](_0x4ae2c2=>this[_0x53c5c7(0x41e)][_0x53c5c7(0x456)](_0x53c5c7(0x229),_0x4ae2c2))),_0x2010cf[_0x53c5c7(0x3a3)](_0x76c655['open$'][_0x53c5c7(0x213)]((0x0,c[_0x53c5c7(0x3cb)])(0x1))[_0x53c5c7(0x264)](()=>{const _0x1cac00=_0x53c5c7;this[_0x1cac00(0x4ea)](_0xb291a4,_0x76c655);})),_0x2010cf['add'](_0x76c655[_0x53c5c7(0x1f8)][_0x53c5c7(0x213)]((0x0,c[_0x53c5c7(0x3cb)])(0x1))[_0x53c5c7(0x264)](_0x8b2514=>{const _0x208d06=_0x53c5c7;(_0xb291a4['candidateSocket']===_0x76c655||_0xb291a4[_0x208d06(0x298)][_0x208d06(0x2cc)]()===_0x76c655)&&(this[_0x208d06(0x41e)][_0x208d06(0x2ba)]('[CollaborationSessionService]','socket\x20close',_0x8b2514),this[_0x208d06(0x244)](_0xb291a4));}));}}catch(_0x11ab9b){if(_0xb291a4[_0x53c5c7(0x3a0)]!==_0x57df96)return;this[_0x53c5c7(0x41e)][_0x53c5c7(0x456)](_0x11ab9b),this[_0x53c5c7(0x244)](_0xb291a4);}finally{_0xb291a4[_0x53c5c7(0x3a0)]===_0x57df96&&(_0xb291a4[_0x53c5c7(0x3a0)]=null);}}[_0x28bbb9(0x4ea)](_0x3dd350,_0x38de64){const _0x1a5218=_0x28bbb9;this['_disposed']||_0x3dd350['candidateSocket']!==_0x38de64||(this[_0x1a5218(0x41e)]['debug'](_0x1a5218(0x1cf),_0x1a5218(0x3cf)),_0x38de64['send']({'cmd':o['CombCmd']['HELLO']}));}[_0x28bbb9(0x43e)](_0x7fdcb6){const _0x4275c3=_0x28bbb9;var _0x5ea74d;let _0x2d9c4f=_0x7fdcb6[_0x4275c3(0x298)][_0x4275c3(0x2cc)]()??_0x7fdcb6[_0x4275c3(0x42b)];_0x7fdcb6[_0x4275c3(0x3a0)]=null,_0x7fdcb6[_0x4275c3(0x52e)]=!0x1,_0x7fdcb6[_0x4275c3(0x42b)]=null,(_0x5ea74d=_0x7fdcb6[_0x4275c3(0x3b1)])==null||_0x5ea74d[_0x4275c3(0x3c7)](),_0x7fdcb6[_0x4275c3(0x3b1)]=null,this['_status$'][_0x4275c3(0x512)](0x2),_0x7fdcb6['socket$']['next'](null),this[_0x4275c3(0x52b)](_0x7fdcb6),this[_0x4275c3(0x4f7)](_0x7fdcb6),this[_0x4275c3(0x235)](_0x7fdcb6),this['_clearHeartbeatTimer'](_0x7fdcb6),_0x2d9c4f==null||_0x2d9c4f[_0x4275c3(0x326)]();}['_onConnectionFailed'](_0x4db6e7){const _0x4581d3=_0x28bbb9;var _0x4bda13;this[_0x4581d3(0x43e)](_0x4db6e7),!this[_0x4581d3(0x1c7)]&&((_0x4bda13=this[_0x4581d3(0x2b7)])==null?void 0x0:_0x4bda13[_0x4581d3(0x2f6)])!==!0x1&&this[_0x4581d3(0x3f7)](_0x4db6e7['endpointKey'])&&(_0x4db6e7['retryCount']<(this[_0x4581d3(0x2c8)]['getConfig'](_0x4581d3(0x303))??0x3)?(this[_0x4581d3(0x3b5)]['emitEvent']({'id':'SOCKET_FAILED_RETRY'}),this[_0x4581d3(0x530)](_0x4db6e7)):this[_0x4581d3(0x3b5)]['emitEvent']({'id':'SOCKET_FAILED'}));}[_0x28bbb9(0x530)](_0x3a3841){const _0x5da755=_0x28bbb9;let _0x4b888e=_0x3a3841[_0x5da755(0x2ec)],_0x4ea66c=this['_configService'][_0x5da755(0x230)](m),_0x4bee2a=_0x4b888e===0x0?0x0:((_0x4ea66c==null?void 0x0:_0x4ea66c[_0x5da755(0x53e)])??0x4e20)*0x2**_0x4b888e;_0x3a3841[_0x5da755(0x46d)]=setTimeout(()=>{const _0x3ed724=_0x5da755;clearTimeout(_0x3a3841[_0x3ed724(0x46d)]),_0x3a3841['retryConnectingTimer']=null,this[_0x3ed724(0x2f5)](_0x3a3841);},_0x4bee2a),_0x3a3841[_0x5da755(0x2ec)]+=0x1;}async[_0x28bbb9(0x3e0)](_0x3ecd08,_0x3a55c0){const _0x454d61=_0x28bbb9;return et(_0x3ecd08,_0x3a55c0,await this[_0x454d61(0x42a)][_0x454d61(0x2f1)]({'unitId':_0x3ecd08,'unitType':_0x3a55c0}));}['_onMessage'](_0x5cf24f,_0xbce756,_0x35de7c){const _0x4e9d52=_0x28bbb9;if(this[_0x4e9d52(0x1c7)]||_0x5cf24f[_0x4e9d52(0x42b)]!==_0xbce756&&_0x5cf24f['socket$']['getValue']()!==_0xbce756)return;let {cmd:_0x28a626}=_0x35de7c;if(_0x28a626===o[_0x4e9d52(0x291)]['HELLO']&&!_0x5cf24f['socketReady']){var _0x4f53c2;if((_0x35de7c[_0x4e9d52(0x4d2)]??o[_0x4e9d52(0x2e7)]['OK'])!==o[_0x4e9d52(0x2e7)]['OK']||!((_0x4f53c2=_0x35de7c[_0x4e9d52(0x350)])!=null&&_0x4f53c2[_0x4e9d52(0x362)])){this[_0x4e9d52(0x244)](_0x5cf24f);return;}this[_0x4e9d52(0x4f7)](_0x5cf24f),_0xbce756['memberID']=_0x35de7c['data'][_0x4e9d52(0x362)],_0x5cf24f['retryCount']=0x0,_0x5cf24f[_0x4e9d52(0x52e)]=!0x0,_0x5cf24f[_0x4e9d52(0x42b)]=null,_0x5cf24f[_0x4e9d52(0x298)]['next'](_0xbce756),this[_0x4e9d52(0x43a)][_0x4e9d52(0x512)](0x3);}_0x28a626===o[_0x4e9d52(0x291)][_0x4e9d52(0x499)]&&this[_0x4e9d52(0x235)](_0x5cf24f),this[_0x4e9d52(0x1fe)](_0x5cf24f);}[_0x28bbb9(0x3f7)](_0x267143){const _0x36e9ac=_0x28bbb9;return[...this[_0x36e9ac(0x344)][_0x36e9ac(0x2fe)]()][_0x36e9ac(0x33e)](_0x28494e=>_0x28494e===_0x267143);}[_0x28bbb9(0x450)](_0x5ed8dd){const _0x49e4e5=_0x28bbb9;let _0x6eecfd=_0x5ed8dd??'',_0x282c62=this[_0x49e4e5(0x532)][_0x49e4e5(0x285)](_0x6eecfd);if(_0x282c62)return _0x282c62;let _0x4c34b8={'endpointKey':_0x6eecfd,'endpoint':_0x5ed8dd,'socket$':new t[(_0x49e4e5(0x45f))](void 0x0),'candidateSocket':null,'connectionAttempt':null,'socketReady':!0x1,'socketSubscription':null,'handshakeTimer':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this['_socketChannels'][_0x49e4e5(0x36a)](_0x6eecfd,_0x4c34b8),_0x4c34b8;}[_0x28bbb9(0x4f7)](_0x851f3f){const _0x58a14a=_0x28bbb9;_0x851f3f[_0x58a14a(0x2e6)]!=null&&(clearTimeout(_0x851f3f[_0x58a14a(0x2e6)]),_0x851f3f['handshakeTimer']=null);}[_0x28bbb9(0x1fe)](_0x2a2bde){const _0xeff5bb=_0x28bbb9;this['_clearHeartbeatTimer'](_0x2a2bde),_0x2a2bde['socketReady']&&(_0x2a2bde[_0xeff5bb(0x21e)]=setTimeout(()=>this[_0xeff5bb(0x43b)](_0x2a2bde),this[_0xeff5bb(0x2c8)][_0xeff5bb(0x230)]('HEARTBEAT_INTERVAL')??0x7530));}[_0x28bbb9(0x43b)](_0x50f77d){const _0x2a3ca0=_0x28bbb9;let _0x43ead1=_0x50f77d[_0x2a3ca0(0x298)][_0x2a3ca0(0x2cc)]();_0x50f77d['socketReady']&&_0x43ead1&&(_0x43ead1[_0x2a3ca0(0x1d8)]({'cmd':o[_0x2a3ca0(0x291)]['HEARTBEAT']}),this[_0x2a3ca0(0x403)](_0x50f77d));}['_waitForHeartbeatResponse'](_0x324ba7){const _0x21637b=_0x28bbb9;_0x324ba7[_0x21637b(0x2b3)]=setTimeout(()=>this['_onConnectionFailed'](_0x324ba7),this['_configService']['getConfig'](_0x21637b(0x269))??0x4e20);}[_0x28bbb9(0x252)](_0x3b0c3a){const _0x1cc49d=_0x28bbb9;_0x3b0c3a[_0x1cc49d(0x21e)]!=null&&(clearTimeout(_0x3b0c3a['sendHeartbeatTimer']),_0x3b0c3a[_0x1cc49d(0x21e)]=null);}[_0x28bbb9(0x235)](_0x5c962e){const _0x12acbe=_0x28bbb9;_0x5c962e['timeoutTimer']!=null&&(clearTimeout(_0x5c962e[_0x12acbe(0x2b3)]),_0x5c962e[_0x12acbe(0x2b3)]=null);}};function _0x53d0(_0x58f3f8,_0x3d0e11){_0x58f3f8=_0x58f3f8-0x1b5;const _0x175792=_0x1757();let _0x53d08b=_0x175792[_0x58f3f8];return _0x53d08b;}U=b([y(0x0,(0x0,r['Inject'])(r[_0x28bbb9(0x506)])),y(0x1,r[_0x28bbb9(0x369)]),y(0x2,r['IConfigService']),y(0x3,Je),y(0x4,(0x0,r[_0x28bbb9(0x431)])(v)),y(0x5,Qe)],U);function tt(_0x4aca3e){const _0x11626c=_0x28bbb9;if(_0x4aca3e[_0x11626c(0x329)]!==o[_0x11626c(0x291)][_0x11626c(0x31c)])return!0x1;let _0x223e63=_0x4aca3e[_0x11626c(0x350)]['eventID'];return _0x223e63===n[_0x11626c(0x33f)][_0x11626c(0x296)]||_0x223e63===n['CollaborationEvent']['FETCH_MISSING'];}let W=class extends r[_0x28bbb9(0x22c)]{constructor(_0x1a718a,_0x1bbfde,_0x421e46,_0x39e6e4){const _0x473404=_0x28bbb9;var _0x19c178;super(),this[_0x473404(0x475)]=_0x1a718a,this['_collabSessionService']=_0x1bbfde,this[_0x473404(0x2c8)]=_0x421e46,this['_univerInstanceService']=_0x39e6e4,_(this,_0x473404(0x21c),new Map()),_(this,_0x473404(0x26c),new t[(_0x473404(0x39a))]()),_(this,_0x473404(0x513),this[_0x473404(0x26c)][_0x473404(0x32f)]()),((_0x19c178=this[_0x473404(0x2c8)]['getConfig']('collaboration-client.config'))==null?void 0x0:_0x19c178[_0x473404(0x53c)])!==!0x1&&this['_init']();}[_0x28bbb9(0x3ac)](){const _0x462d2b=_0x28bbb9;super['dispose'](),this[_0x462d2b(0x21c)][_0x462d2b(0x3e9)](_0x29c404=>_0x29c404[_0x462d2b(0x3ac)]()),this['_entities'][_0x462d2b(0x311)]();}[_0x28bbb9(0x4c6)](_0x1d3b62){const _0x519ab7=_0x28bbb9;return this[_0x519ab7(0x21c)][_0x519ab7(0x285)](_0x1d3b62)??null;}[_0x28bbb9(0x294)](){const _0x4a739b=_0x28bbb9;return Array[_0x4a739b(0x3f8)](this[_0x4a739b(0x21c)][_0x4a739b(0x2fe)]());}[_0x28bbb9(0x2fd)](_0xdcb763){const _0x1d5258=_0x28bbb9;let _0x53c029=this[_0x1d5258(0x4c6)](_0xdcb763);return _0x53c029?(0x0,t['of'])(_0x53c029):this[_0x1d5258(0x26c)][_0x1d5258(0x213)]((0x0,c[_0x1d5258(0x46f)])(_0xe74755=>_0xe74755['unitID']===_0xdcb763));}[_0x28bbb9(0x22e)](_0x112f50){const _0x566905=_0x28bbb9;return(0x0,t['firstValueFrom'])(this[_0x566905(0x2fd)](_0x112f50)[_0x566905(0x213)]((0x0,c[_0x566905(0x485)])(()=>void 0x0)));}[_0x28bbb9(0x207)](_0xb7b911){const _0x38af60=_0x28bbb9;if(_0xb7b911!==void 0x0){var _0xf95834;return((_0xf95834=this[_0x38af60(0x21c)]['get'](_0xb7b911))==null?void 0x0:_0xf95834[_0x38af60(0x207)]())??!0x1;}for(let _0x3380ea of this[_0x38af60(0x21c)][_0x38af60(0x2fe)]())if(_0x3380ea[_0x38af60(0x207)]())return!0x0;return!0x1;}[_0x28bbb9(0x240)](){const _0x47900f=_0x28bbb9;this[_0x47900f(0x4b7)]['getTypeOfUnitAdded$'](r[_0x47900f(0x24b)]['UNIVER_SHEET'])[_0x47900f(0x213)]((0x0,t[_0x47900f(0x418)])(this[_0x47900f(0x55d)]),(0x0,c[_0x47900f(0x491)])(0x10))[_0x47900f(0x264)](async _0x1712f0=>{const _0x436c49=_0x47900f;let _0x474a9e=_0x1712f0[_0x436c49(0x54f)][_0x436c49(0x3e7)](),_0x28dd4b=await this[_0x436c49(0x341)](_0x474a9e,r[_0x436c49(0x24b)][_0x436c49(0x486)]);this[_0x436c49(0x21c)]['set'](_0x474a9e,_0x28dd4b);}),this[_0x47900f(0x4b7)][_0x47900f(0x342)](r[_0x47900f(0x24b)]['UNIVER_DOC'])[_0x47900f(0x213)]((0x0,t['takeUntil'])(this[_0x47900f(0x55d)]),(0x0,c[_0x47900f(0x491)])(0x10))[_0x47900f(0x213)]((0x0,c[_0x47900f(0x46f)])(_0x389b76=>!_0x389b76[_0x47900f(0x54f)][_0x47900f(0x3e7)]()['startsWith']('__')))['subscribe'](async _0xf6ec7=>{const _0x3d7702=_0x47900f;let _0x3e7097=_0xf6ec7['unit'][_0x3d7702(0x3e7)](),_0x1007e1=await this[_0x3d7702(0x341)](_0x3e7097,r[_0x3d7702(0x24b)]['UNIVER_DOC']);this[_0x3d7702(0x21c)][_0x3d7702(0x36a)](_0x3e7097,_0x1007e1);}),this[_0x47900f(0x4b7)][_0x47900f(0x342)](r[_0x47900f(0x24b)]['UNIVER_SLIDE'])[_0x47900f(0x213)]((0x0,t[_0x47900f(0x418)])(this[_0x47900f(0x55d)]),(0x0,c[_0x47900f(0x491)])(0x10))[_0x47900f(0x264)](async _0x541d8a=>{const _0x493de4=_0x47900f;let _0x2834b1=_0x541d8a['unit'][_0x493de4(0x3e7)](),_0x73e1e1=await this[_0x493de4(0x341)](_0x2834b1,r[_0x493de4(0x24b)]['UNIVER_SLIDE']);this['_entities'][_0x493de4(0x36a)](_0x2834b1,_0x73e1e1);}),this[_0x47900f(0x4b7)][_0x47900f(0x342)](r['UniverInstanceType']['UNIVER_BOARD'])[_0x47900f(0x213)]((0x0,t[_0x47900f(0x418)])(this[_0x47900f(0x55d)]),(0x0,c['delay'])(0x10))[_0x47900f(0x264)](async _0x2bd0bb=>{const _0x246475=_0x47900f;let _0x1acfe4=_0x2bd0bb[_0x246475(0x54f)]['getUnitId'](),_0x575d9c=await this['_startCollaboration'](_0x1acfe4,r['UniverInstanceType'][_0x246475(0x449)]);this['_entities'][_0x246475(0x36a)](_0x1acfe4,_0x575d9c);}),this[_0x47900f(0x4b7)][_0x47900f(0x342)](r[_0x47900f(0x24b)][_0x47900f(0x3bb)])[_0x47900f(0x213)]((0x0,t[_0x47900f(0x418)])(this[_0x47900f(0x55d)]),(0x0,c['delay'])(0x10))['subscribe'](async _0x38af90=>{const _0x57cdb2=_0x47900f;let _0xbdbad=_0x38af90[_0x57cdb2(0x54f)]['getUnitId'](),_0x3f86c5=await this[_0x57cdb2(0x341)](_0xbdbad,r[_0x57cdb2(0x24b)][_0x57cdb2(0x3bb)]);this['_entities'][_0x57cdb2(0x36a)](_0xbdbad,_0x3f86c5);}),this['_univerInstanceService'][_0x47900f(0x342)](r[_0x47900f(0x24b)]['UNIVER_PDF'])[_0x47900f(0x213)]((0x0,t[_0x47900f(0x418)])(this['dispose$']),(0x0,c[_0x47900f(0x491)])(0x10))[_0x47900f(0x264)](async _0x5bc2f4=>{const _0x3f6d9c=_0x47900f;let _0x1c5865=_0x5bc2f4[_0x3f6d9c(0x54f)][_0x3f6d9c(0x3e7)](),_0x195756=await this[_0x3f6d9c(0x341)](_0x1c5865,r[_0x3f6d9c(0x24b)][_0x3f6d9c(0x367)]);this[_0x3f6d9c(0x21c)]['set'](_0x1c5865,_0x195756);}),(0x0,t[_0x47900f(0x3e1)])(this[_0x47900f(0x4b7)][_0x47900f(0x3ce)](r['UniverInstanceType'][_0x47900f(0x486)]),this[_0x47900f(0x4b7)][_0x47900f(0x3ce)](r['UniverInstanceType'][_0x47900f(0x297)]),this[_0x47900f(0x4b7)][_0x47900f(0x3ce)](r[_0x47900f(0x24b)][_0x47900f(0x405)]),this[_0x47900f(0x4b7)][_0x47900f(0x3ce)](r[_0x47900f(0x24b)][_0x47900f(0x449)]),this[_0x47900f(0x4b7)][_0x47900f(0x3ce)](r[_0x47900f(0x24b)][_0x47900f(0x3bb)]),this[_0x47900f(0x4b7)][_0x47900f(0x3ce)](r[_0x47900f(0x24b)][_0x47900f(0x367)]))['pipe']((0x0,t[_0x47900f(0x418)])(this[_0x47900f(0x55d)]))[_0x47900f(0x264)](_0x2dd825=>{const _0x39a13b=_0x47900f;let _0x218092=_0x2dd825['getUnitId'](),_0x507cb7=this['_entities']['get'](_0x218092);_0x507cb7&&(_0x507cb7[_0x39a13b(0x3ac)](),this[_0x39a13b(0x21c)]['delete'](_0x218092));});}async[_0x28bbb9(0x341)](_0x5c4921,_0x58ca0b){const _0x663165=_0x28bbb9;let _0x359cb8=await this['_collabSessionService'][_0x663165(0x345)](_0x5c4921),_0xa34501=this[_0x663165(0x475)][_0x663165(0x3e2)](this[_0x663165(0x23c)](_0x58ca0b),_0x5c4921,_0x58ca0b,_0x359cb8);return await _0xa34501['init'](),this[_0x663165(0x26c)]['next'](_0xa34501),_0xa34501;}[_0x28bbb9(0x23c)](_0x4b3b9b){const _0x2fe2cc=_0x28bbb9;switch(_0x4b3b9b){case r[_0x2fe2cc(0x24b)][_0x2fe2cc(0x297)]:return L;case r['UniverInstanceType'][_0x2fe2cc(0x486)]:return z;case r['UniverInstanceType']['UNIVER_SLIDE']:return B;case r[_0x2fe2cc(0x24b)][_0x2fe2cc(0x449)]:return V;case r[_0x2fe2cc(0x24b)][_0x2fe2cc(0x3bb)]:return R;case r[_0x2fe2cc(0x24b)][_0x2fe2cc(0x367)]:return H;default:throw Error(_0x2fe2cc(0x404)+_0x4b3b9b);}}};W=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x1,(0x0,r[_0x28bbb9(0x431)])(U)),y(0x2,r[_0x28bbb9(0x421)]),y(0x3,r[_0x28bbb9(0x51c)])],W);var nt=_0x28bbb9(0x36f),rt='1.2.0';let it=class extends r['Disposable']{constructor(_0x311fb8,_0x4e69f4){const _0x4a899b=_0x28bbb9;super(),this['_univerInstanceService']=_0x311fb8,this[_0x4a899b(0x2c8)]=_0x4e69f4,this[_0x4a899b(0x240)]();}[_0x28bbb9(0x240)](){const _0x2c3dea=_0x28bbb9;this['disposeWithMe'](this['_univerInstanceService'][_0x2c3dea(0x352)][_0x2c3dea(0x264)](()=>{const _0x318ffb=_0x2c3dea;let _0x3da952=this[_0x318ffb(0x4b7)][_0x318ffb(0x424)](),_0x18815f=this['_configService'][_0x318ffb(0x230)](_0x318ffb(0x2fb))??_0x318ffb(0x1fa);_0x3da952 instanceof r[_0x318ffb(0x218)]&&(_0x18815f=_0x3da952[_0x318ffb(0x234)]),document['title']=_0x18815f;}));}};it=b([y(0x0,r[_0x28bbb9(0x51c)]),y(0x1,r['IConfigService'])],it);const at=(0x0,r['createIdentifier'])(_0x28bbb9(0x243));let G=class{constructor(_0x3764be,_0xc7075e,_0x19ca76){const _0x4b6d1b=_0x28bbb9;this[_0x4b6d1b(0x2a4)]=_0x3764be,this[_0x4b6d1b(0x2c8)]=_0xc7075e,this[_0x4b6d1b(0x4b7)]=_0x19ca76;}['getUploadOptions'](){const _0x19d827=_0x28bbb9;return this[_0x19d827(0x3c0)]()[_0x19d827(0x29f)]??{};}async[_0x28bbb9(0x2aa)](_0x10813b){const _0x1ca5eb=_0x28bbb9;let _0x1fd27b=this[_0x1ca5eb(0x436)]();if(ot(_0x10813b,_0x1fd27b),_0x1fd27b[_0x1ca5eb(0x469)])return _0x1fd27b['upload'](_0x10813b);let _0x4ea171=await this[_0x1ca5eb(0x401)](_0x10813b);return{'id':_0x4ea171,'name':_0x10813b[_0x1ca5eb(0x234)],'mimeType':_0x10813b[_0x1ca5eb(0x538)],'size':_0x10813b['size'],'sourceType':r['ImageSourceType']['UUID'],'source':_0x4ea171};}async[_0x28bbb9(0x511)](_0x7de473,_0x4025fa){const _0x54f1e7=_0x28bbb9;if(_0x4025fa!==r['ImageSourceType'][_0x54f1e7(0x1d3)])return _0x7de473;let _0x148238=(await this[_0x54f1e7(0x2a4)]['get'](this[_0x54f1e7(0x2ef)]()['replace'](_0x54f1e7(0x544),_0x7de473)))[_0x54f1e7(0x340)];if(_0x148238[_0x54f1e7(0x456)]&&_0x148238[_0x54f1e7(0x456)][_0x54f1e7(0x4d2)]!==o[_0x54f1e7(0x1b7)]['OK'])throw _0x148238['error'];if(!_0x148238[_0x54f1e7(0x31d)])throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.');return(0x0,r[_0x54f1e7(0x28c)])(_0x148238[_0x54f1e7(0x31d)],this['_getDownloadEndpointURL']());}async['_upload'](_0x1b4378){const _0x3faab4=_0x28bbb9;let _0x5ae676=this[_0x3faab4(0x4b7)][_0x3faab4(0x424)](),_0x67e9ef=_0x5ae676==null?void 0x0:_0x5ae676[_0x3faab4(0x3e7)]();if(!_0x67e9ef)throw Error(_0x3faab4(0x38a));let _0x4fecf9=new FormData();_0x4fecf9[_0x3faab4(0x1ef)](_0x3faab4(0x246),_0x1b4378);let _0x28c2e9=this['_getUploadFileURL']()+_0x3faab4(0x2cf)+_0x1b4378['size'][_0x3faab4(0x4c0)]()+_0x3faab4(0x2fc)+o['FileSource'][_0x3faab4(0x43d)]+'&assign='+encodeURIComponent(_0x67e9ef),_0x5206d0=(await this['_httpService'][_0x3faab4(0x36b)](_0x28c2e9,{'body':_0x4fecf9}))[_0x3faab4(0x340)][_0x3faab4(0x217)];if(typeof _0x5206d0!=_0x3faab4(0x2d4)||!_0x5206d0)throw Error(_0x3faab4(0x50b));return _0x5206d0;}[_0x28bbb9(0x516)](){const _0x59cb40=_0x28bbb9;return this['_getConfig']()['uploadFileServerUrl']??_0x59cb40(0x1c2);}[_0x28bbb9(0x2ef)](){const _0x2935eb=_0x28bbb9;return this[_0x2935eb(0x3c0)]()[_0x2935eb(0x2af)]??_0x2935eb(0x545);}[_0x28bbb9(0x3df)](){const _0x2b9418=_0x28bbb9;let _0x31280c=this[_0x2b9418(0x3c0)]();return _0x31280c[_0x2b9418(0x380)]?_0x31280c[_0x2b9418(0x380)]:typeof location<'u'?location[_0x2b9418(0x2e3)]:_0x31280c['uploadFileServerUrl']??'';}[_0x28bbb9(0x3c0)](){const _0x332fce=_0x28bbb9;return this['_configService'][_0x332fce(0x230)]('collaboration-client.config')??{};}};G=b([y(0x0,(0x0,r['Inject'])(e['HTTPService'])),y(0x1,(0x0,r[_0x28bbb9(0x431)])(r['IConfigService'])),y(0x2,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x51c)]))],G);function ot(_0x2b8fab,_0x5d71b1){const _0x298d70=_0x28bbb9;var _0x4fde8c;if(_0x5d71b1['maxSize']!=null&&_0x2b8fab[_0x298d70(0x1e8)]>_0x5d71b1[_0x298d70(0x3fb)])throw Error(_0x298d70(0x1b8));if((_0x4fde8c=_0x5d71b1['accept'])!=null&&_0x4fde8c[_0x298d70(0x47a)]&&!_0x5d71b1['accept'][_0x298d70(0x33e)](_0x49e26b=>_0x2b8fab[_0x298d70(0x538)]===_0x49e26b||_0x2b8fab[_0x298d70(0x234)][_0x298d70(0x4d4)](_0x49e26b)||_0x49e26b['endsWith']('/*')&&_0x2b8fab[_0x298d70(0x538)][_0x298d70(0x4dd)](_0x49e26b[_0x298d70(0x4e6)](0x0,-0x1))))throw Error(_0x298d70(0x250));}let K=class{constructor(_0x5c9d87,_0x492847,_0x3b7d79){const _0x59ff52=_0x28bbb9;this[_0x59ff52(0x2c8)]=_0x5c9d87,this[_0x59ff52(0x2a4)]=_0x492847,this['localeService']=_0x3b7d79,this['init']();}[_0x28bbb9(0x354)](){const _0x228ecc=_0x28bbb9;this[_0x228ecc(0x2a4)][_0x228ecc(0x49d)]({'priority':0x1,'interceptor':(_0x187b0e,_0x3920d7)=>_0x3920d7(_0x187b0e)[_0x228ecc(0x213)]((0x0,t[_0x228ecc(0x209)])(async _0x2674b3=>{const _0x199eaa=_0x228ecc;let _0x173d3d=_0x2674b3;if(_0x173d3d[_0x199eaa(0x290)]===0x191){if(typeof window>'u')throw Error(_0x199eaa(0x528));if(window[_0x199eaa(0x3ea)](this[_0x199eaa(0x2ea)]['t'](_0x199eaa(0x557)))){let _0x538e03=window[_0x199eaa(0x2d2)](window[_0x199eaa(0x24e)][_0x199eaa(0x289)]);window[_0x199eaa(0x24e)][_0x199eaa(0x289)]=this[_0x199eaa(0x386)]()+_0x199eaa(0x496)+_0x538e03;}}return _0x173d3d;}))});}[_0x28bbb9(0x386)](){const _0x9b14dc=_0x28bbb9;let _0x57221b=this[_0x9b14dc(0x2c8)]['getConfig'](m);return(_0x57221b==null?void 0x0:_0x57221b[_0x9b14dc(0x47d)])??_0x9b14dc(0x411);}};K=b([y(0x0,r[_0x28bbb9(0x421)]),y(0x1,(0x0,r[_0x28bbb9(0x431)])(e[_0x28bbb9(0x3ff)])),y(0x2,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x25c)]))],K);let q=class extends r[_0x28bbb9(0x3ad)]{constructor(_0x366185,_0x3df6f1){const _0x3adc49=_0x28bbb9;super(),this[_0x3adc49(0x24d)]=_0x366185,this[_0x3adc49(0x2c8)]=_0x3df6f1,_(this,_0x3adc49(0x2cb),!0x1),this[_0x3adc49(0x4ce)]();}[_0x28bbb9(0x4ce)](){const _0xced2c5=_0x28bbb9;let _0x357be2=this;this['disposeWithMe'](this[_0xced2c5(0x24d)][_0xced2c5(0x49d)]({'priority':0x3e7,'interceptor':(0x0,e[_0xced2c5(0x343)])({'isMatch'(_0x39d9bb){const _0x40607e=_0xced2c5;var _0x1cc6e8;if(_0x39d9bb['method']===_0x40607e(0x26d)&&(_0x1cc6e8=_0x39d9bb[_0x40607e(0x26f)])!=null&&_0x1cc6e8[_0x40607e(0x340)]){let {objectID:_0x7945e1,objectType:_0x398b21}=_0x39d9bb[_0x40607e(0x26f)][_0x40607e(0x340)]||{};if(!_0x7945e1||_0x398b21===void 0x0)return!0x1;let _0x540d2a=_0x357be2['_getAPIPrefixPath']()+'/'+_0x398b21+_0x40607e(0x239)+encodeURIComponent(_0x7945e1)+_0x40607e(0x2a9);if(_0x39d9bb[_0x40607e(0x31d)]===_0x540d2a)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x2f496e){const _0x21f29a=_0xced2c5;var _0x78438;return(_0x78438=_0x2f496e['requestParams'])==null?void 0x0:_0x78438[_0x21f29a(0x340)];},'mergeParamsToRequest'(_0x3956ea,_0x4c231c){const _0x5e81e3=_0xced2c5;let _0xb0b62e=_0x357be2[_0x5e81e3(0x2e1)]()+_0x5e81e3(0x4ba),_0x5cd883=_0x3956ea[_0x5e81e3(0x3b9)]((_0x21b407,_0x153a6f)=>{const _0x2afc16=_0x5e81e3;let {unitID:_0x46efd6,objectID:_0x3ec70c,objectType:_0x21496f,actions:_0x449bb8}=_0x153a6f;return _0x21b407[_0x46efd6]||(_0x21b407[_0x46efd6]=Object['create'](null)),_0x21b407[_0x46efd6][_0x3ec70c]||(_0x21b407[_0x46efd6][_0x3ec70c]={'objectID':_0x3ec70c,'objectType':_0x21496f,'actions':[]}),_0x21b407[_0x46efd6][_0x3ec70c][_0x2afc16(0x3d1)][_0x2afc16(0x4ec)](..._0x449bb8),_0x21b407;},Object[_0x5e81e3(0x501)](null)),_0x6e32f9=[];for(let _0x10fc56 in _0x5cd883)for(let _0x4341be in _0x5cd883[_0x10fc56]){let {actions:_0x416f17,objectType:_0x7a8dc6}=_0x5cd883[_0x10fc56][_0x4341be],_0x6d2525=[...new Set(_0x416f17)];_0x6e32f9[_0x5e81e3(0x4ec)]({'unitID':_0x10fc56,'objectID':_0x4341be,'objectType':_0x7a8dc6,'actions':_0x6d2525});}return new e[(_0x5e81e3(0x28d))]('POST',_0xb0b62e,{'headers':_0x4c231c['headers'],'withCredentials':_0x4c231c[_0x5e81e3(0x4de)],'responseType':_0x4c231c['responseType'],'body':{'requests':_0x6e32f9}});}},{'distributeResult'(_0x4f768b,_0x427454){const _0x516681=_0xced2c5;let {objectActions:_0x3285f5}=_0x4f768b;return _0x427454[_0x516681(0x485)](_0x29d219=>{const _0x45fa89=_0x516681;let {unitID:_0xe9e810,objectID:_0x53cdfe,actions:_0x38d139}=_0x29d219,_0x19f829=_0x3285f5[_0x45fa89(0x552)](_0x59f698=>_0x59f698[_0x45fa89(0x2e9)]===_0xe9e810&&_0x59f698[_0x45fa89(0x242)]===_0x53cdfe);return{'config':_0x29d219,'result':{'actions':_0x38d139[_0x45fa89(0x485)](_0x2ab671=>_0x19f829==null?void 0x0:_0x19f829[_0x45fa89(0x3d1)][_0x45fa89(0x552)](_0x311165=>_0x311165[_0x45fa89(0x4c1)]===_0x2ab671))[_0x45fa89(0x46f)](_0xb50ffc=>!!_0xb50ffc),'error':_0x4f768b[_0x45fa89(0x456)]}};});}})}));}[_0x28bbb9(0x2e1)](){const _0x2486ba=_0x28bbb9;let _0x8aa7df=this[_0x2486ba(0x2c8)]['getConfig'](m);return(_0x8aa7df==null?void 0x0:_0x8aa7df[_0x2486ba(0x4d5)])??_0x2486ba(0x4fa);}async[_0x28bbb9(0x501)](_0x11d25d){const _0x4fc330=_0x28bbb9;let _0x679600=this[_0x4fc330(0x2e1)]()+'/'+_0x11d25d[_0x4fc330(0x277)]+_0x4fc330(0x1b6);return(await this[_0x4fc330(0x24d)][_0x4fc330(0x36b)](_0x679600,{'body':_0x11d25d}))[_0x4fc330(0x340)][_0x4fc330(0x242)]||'';}async['list'](_0x82ae19){const _0x30fb20=_0x28bbb9;let _0x514190=this[_0x30fb20(0x2e1)]()+_0x30fb20(0x408);return(await this['_HTTPService'][_0x30fb20(0x36b)](_0x514190,{'body':_0x82ae19}))['body'][_0x30fb20(0x214)];}async['update'](_0x161520){const _0x195370=_0x28bbb9;var _0x5b5726;let _0x596022=this[_0x195370(0x2e1)]()+'/'+_0x161520[_0x195370(0x277)]+_0x195370(0x239)+encodeURIComponent(_0x161520[_0x195370(0x242)]),_0x38b23f=await this[_0x195370(0x24d)]['put'](_0x596022,{'body':_0x161520});if((_0x38b23f==null||(_0x5b5726=_0x38b23f[_0x195370(0x340)])==null||(_0x5b5726=_0x5b5726[_0x195370(0x456)])==null?void 0x0:_0x5b5726[_0x195370(0x4d2)])!==0x1)throw Error(_0x195370(0x4e5));}async[_0x28bbb9(0x3f4)](_0x55268f){const _0x1c6e2a=_0x28bbb9;let _0x21a8b7=this['_getAPIPrefixPath']()+'/'+_0x55268f[_0x1c6e2a(0x277)]+_0x1c6e2a(0x239)+encodeURIComponent(_0x55268f['objectID'])+'/allowed';return(await this[_0x1c6e2a(0x24d)]['post'](_0x21a8b7,{'body':_0x55268f}))[_0x1c6e2a(0x340)][_0x1c6e2a(0x3d1)];}async['batchAllowed'](_0x3188f3){const _0xe4f176=_0x28bbb9;let _0x1c0ec3=this[_0xe4f176(0x2e1)]()+'/-/object/-/batch_allowed';return(await this[_0xe4f176(0x24d)][_0xe4f176(0x36b)](_0x1c0ec3,{'body':{'requests':_0x3188f3}}))[_0xe4f176(0x340)][_0xe4f176(0x47e)];}async['listRoles'](_0x751340){const _0x412db7=_0x28bbb9;let _0x52cb58=this[_0x412db7(0x2e1)]()+'/'+_0x751340['objectType']+'/role',_0x150f2f=await this[_0x412db7(0x24d)][_0x412db7(0x36b)](_0x52cb58,{'body':_0x751340});return{'roles':_0x150f2f[_0x412db7(0x340)][_0x412db7(0x2cd)],'actions':_0x150f2f[_0x412db7(0x340)][_0x412db7(0x3d1)]};}async[_0x28bbb9(0x3eb)](_0x5a09fe){const _0x582feb=_0x28bbb9;let _0x4a7fed=this[_0x582feb(0x2e1)]()+_0x582feb(0x1fd);await this[_0x582feb(0x24d)][_0x582feb(0x551)](_0x4a7fed,{'params':{'collaboratorID':_0x5a09fe[_0x582feb(0x4b9)],'objectID':_0x5a09fe['objectID'],'unitID':_0x5a09fe[_0x582feb(0x2e9)]}});}async[_0x28bbb9(0x4ae)](_0x4c43a2){const _0x375d0e=_0x28bbb9;let _0x3e6510=this[_0x375d0e(0x2e1)]()+_0x375d0e(0x1fd);await this[_0x375d0e(0x24d)]['patch'](_0x3e6510,{'body':_0x4c43a2});}async[_0x28bbb9(0x523)](_0x376979){const _0xe71979=_0x28bbb9;let _0x21c404=this[_0xe71979(0x2e1)]()+_0xe71979(0x1fd);await this[_0xe71979(0x24d)][_0xe71979(0x36b)](_0x21c404,{'body':_0x376979});}async[_0x28bbb9(0x336)](_0x46bef5){const _0x23fef4=_0x28bbb9;let _0x1b1425=this[_0x23fef4(0x2e1)]()+_0x23fef4(0x1fd),_0x5d575f=await this['_HTTPService'][_0x23fef4(0x285)](_0x1b1425,{'params':{'objectID':_0x46bef5[_0x23fef4(0x242)],'unitID':_0x46bef5['unitID']}});return this[_0x23fef4(0x423)](_0x5d575f[_0x23fef4(0x340)]['cfgEnableObjInherit']??!0x1),_0x5d575f[_0x23fef4(0x340)][_0x23fef4(0x44c)];}async[_0x28bbb9(0x40e)](_0x10b568){const _0x22f09c=_0x28bbb9;let _0x5d3a58=this[_0x22f09c(0x2e1)]()+'/collaborator';await this[_0x22f09c(0x24d)]['put'](_0x5d3a58,{'body':_0x10b568});}[_0x28bbb9(0x423)](_0x24dd26){const _0x293bc2=_0x28bbb9;this[_0x293bc2(0x2cb)]=_0x24dd26;}['getCfgEnableObjInherit'](){const _0x47ffdf=_0x28bbb9;return this[_0x47ffdf(0x2cb)];}};q=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(e[_0x28bbb9(0x3ff)])),y(0x1,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x421)]))],q);function st(_0x2d4863){const _0x19562e=_0x28bbb9;let _0xbae5f3=atob(_0x2d4863),_0x318e06=new Uint8Array(_0xbae5f3[_0x19562e(0x47a)]);for(let _0x19ceff=0x0;_0x19ceff<_0xbae5f3['length'];_0x19ceff++)_0x318e06[_0x19ceff]=_0xbae5f3[_0x19562e(0x38f)](_0x19ceff);return _0x318e06;}function ct(_0x3535cd){const _0x500913=_0x28bbb9;let _0x5907eb='';for(let _0x266efa=0x0;_0x266efa<_0x3535cd[_0x500913(0x47a)];_0x266efa++)_0x5907eb+=String['fromCharCode'](_0x3535cd[_0x266efa]);return btoa(_0x5907eb);}function lt(_0x1daf59,_0x296371){const _0x2ec6f6=_0x28bbb9;let _0x5ea617=st(_0x296371),_0x2adcfa=(0x0,f[_0x2ec6f6(0x381)])(0x10),_0x1434bb=(0x0,d[_0x2ec6f6(0x548)])(_0x5ea617,_0x2adcfa)['encrypt']((0x0,f[_0x2ec6f6(0x390)])(_0x1daf59));return ct((0x0,f['concatBytes'])(_0x2adcfa,_0x1434bb));}function ut(){const _0x227614=_0x28bbb9;let _0x5eaf19=(0x0,u[_0x227614(0x4f5)])()[_0x227614(0x21a)];if(typeof window<'u'&&window['location']!==void 0x0&&_0x5eaf19){let _0x4db7fa={'time':Math['floor'](Date[_0x227614(0x4a3)]()/0x3e8),'domain':location[_0x227614(0x263)]};return lt(JSON[_0x227614(0x4d3)](_0x4db7fa),_0x5eaf19);}}let J=class{constructor(_0x8b52b5){const _0x2441de=_0x28bbb9;this[_0x2441de(0x2a4)]=_0x8b52b5,this[_0x2441de(0x430)]();}[_0x28bbb9(0x430)](){this['_httpService']['registerHTTPInterceptor']({'interceptor':(_0x1589c3,_0x310eab)=>{const _0x54e7aa=_0x53d0;let _0x35541f=ut();return _0x35541f&&_0x1589c3['headers'][_0x54e7aa(0x36a)]('x-univer-host',_0x35541f),_0x310eab(_0x1589c3);}});}};J=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(e['HTTPService']))],J);let Y=class extends r['RxDisposable']{constructor(_0x42a047,_0xe81de1,_0xd96e7d){const _0x4bf90f=_0x28bbb9;super(),this[_0x4bf90f(0x41e)]=_0x42a047,this[_0x4bf90f(0x494)]=_0xe81de1,this[_0x4bf90f(0x4a5)]=_0xd96e7d,_(this,'_unitInfo$',new t[(_0x4bf90f(0x45f))](null)),_(this,_0x4bf90f(0x34e),new t[(_0x4bf90f(0x39a))]()),_(this,_0x4bf90f(0x566),this[_0x4bf90f(0x20f)][_0x4bf90f(0x32f)]()),_(this,_0x4bf90f(0x312),this['_unitLoaded$'][_0x4bf90f(0x32f)]());}[_0x28bbb9(0x3ac)](){const _0x13480c=_0x28bbb9;super[_0x13480c(0x3ac)](),this['_unitLoaded$'][_0x13480c(0x30f)](),this[_0x13480c(0x20f)][_0x13480c(0x30f)]();}['loadUnitOfRevision'](_0x554788,_0x3a41c3,_0x4fffcf,_0x4850e7,_0xefd3c4){return this['_loadUnit'](_0x554788,_0x3a41c3,_0x4fffcf,_0x4850e7,_0xefd3c4);}[_0x28bbb9(0x55f)](_0x48b8f,_0x37eaca,_0x4d61ce,_0x1e5f60){const _0x2f4647=_0x28bbb9;return this[_0x2f4647(0x54b)](_0x48b8f,_0x37eaca,void 0x0,_0x4d61ce,_0x1e5f60);}async[_0x28bbb9(0x54b)](_0x24de53,_0x30e847,_0x528d17,_0x1c7c6a,_0x1b8799){const _0x393911=_0x28bbb9;this[_0x393911(0x20f)][_0x393911(0x512)]({'unitId':_0x24de53,'type':_0x30e847,'subUnitId':_0x1c7c6a});let _0x306e70=_0x528d17;if(_0x306e70===void 0x0){var _0x50a06c;let _0x511c47=await((_0x50a06c=this[_0x393911(0x4a5)])==null?void 0x0:_0x50a06c[_0x393911(0x3b8)](_0x24de53));_0x306e70=_0x511c47&&(_0x511c47[_0x393911(0x438)]||_0x511c47[_0x393911(0x220)][_0x393911(0x47a)]!==0x0)?_0x511c47[_0x393911(0x3af)]:0x0,_0x306e70===0x0&&this[_0x393911(0x41e)][_0x393911(0x2ba)](_0x393911(0x40a),_0x393911(0x559));}return this[_0x393911(0x444)](_0x24de53,_0x30e847,_0x306e70,_0x1c7c6a,_0x1b8799);}async['_loadSnapshot'](_0x3b2e95,_0x33176b,_0x55c09b,_0x293ea9,_0x20a06a){const _0x34caef=_0x28bbb9;let _0xac0583=null;switch(_0x33176b){case r[_0x34caef(0x24b)][_0x34caef(0x486)]:_0xac0583=await this[_0x34caef(0x494)][_0x34caef(0x1ce)](_0x3b2e95,_0x55c09b,_0x20a06a,{'initialSubUnitId':_0x293ea9});break;case r[_0x34caef(0x24b)][_0x34caef(0x297)]:_0xac0583=await this['_snapshotService'][_0x34caef(0x206)](_0x3b2e95,_0x55c09b,_0x20a06a);break;case r[_0x34caef(0x24b)][_0x34caef(0x405)]:_0xac0583=await this['_snapshotService'][_0x34caef(0x3d7)](_0x3b2e95,_0x55c09b,_0x20a06a);break;case r[_0x34caef(0x24b)][_0x34caef(0x449)]:_0xac0583=await this['_snapshotService']['loadBoard'](_0x3b2e95,_0x55c09b,_0x20a06a);break;case r[_0x34caef(0x24b)][_0x34caef(0x3bb)]:_0xac0583=await this['_snapshotService'][_0x34caef(0x337)](_0x3b2e95,_0x55c09b,_0x20a06a);break;case r[_0x34caef(0x24b)][_0x34caef(0x367)]:_0xac0583=await this['_snapshotService']['loadPdf'](_0x3b2e95,_0x55c09b,_0x20a06a);break;default:this[_0x34caef(0x41e)][_0x34caef(0x456)](_0x34caef(0x40a),'Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');}return _0xac0583&&this[_0x34caef(0x34e)][_0x34caef(0x512)](_0xac0583),_0xac0583;}};Y=b([y(0x0,r[_0x28bbb9(0x369)]),y(0x1,(0x0,r['Inject'])(n[_0x28bbb9(0x471)])),y(0x2,(0x0,r[_0x28bbb9(0x1cd)])(C))],Y);let X=class{constructor(_0x2913ae,_0x22a6c9,_0x34a138){const _0x4040fa=_0x28bbb9;this[_0x4040fa(0x2a4)]=_0x2913ae,this['_configService']=_0x22a6c9,this[_0x4040fa(0x4b7)]=_0x34a138,_(this,'_waitCount',0x0),_(this,_0x4040fa(0x547),new t[(_0x4040fa(0x39a))]()),_(this,'change$',this[_0x4040fa(0x547)]),_(this,_0x4040fa(0x3c2),new Map());}[_0x28bbb9(0x37c)](_0x428a9c){const _0x191d24=_0x28bbb9;this['_waitCount']=_0x428a9c,this[_0x191d24(0x547)]['next'](_0x428a9c);}[_0x28bbb9(0x256)](_0x22611c,_0x3090d1){const _0x2fcb3d=_0x28bbb9;if(_0x3090d1===r[_0x2fcb3d(0x4f3)]['BASE64']){let _0x48c750=new Image();return _0x48c750[_0x2fcb3d(0x333)]=_0x22611c,_0x48c750;}return this[_0x2fcb3d(0x3c2)][_0x2fcb3d(0x285)](_0x22611c);}[_0x28bbb9(0x2a1)](_0x29bd6a,_0x4ab156,_0x2c64d7){const _0x2cde2c=_0x28bbb9;_0x4ab156!==r[_0x2cde2c(0x4f3)][_0x2cde2c(0x1bb)]&&_0x2c64d7!=null&&this[_0x2cde2c(0x3c2)]['set'](_0x29bd6a,_0x2c64d7);}async[_0x28bbb9(0x527)](_0xeb13d){const _0x328baf=_0x28bbb9;try{let _0x316fb8=this[_0x328baf(0x3d8)](this[_0x328baf(0x2ef)](),''+_0xeb13d),_0x5ee50b=(await this['_httpService'][_0x328baf(0x285)](_0x316fb8))[_0x328baf(0x340)];if(_0x5ee50b['error']&&_0x5ee50b['error']['code']===o[_0x328baf(0x1b7)]['OK']){let _0x2cf382=(0x0,r[_0x328baf(0x28c)])(_0x5ee50b['url'],this[_0x328baf(0x3df)]());return Promise['resolve'](_0x2cf382);}return Promise[_0x328baf(0x481)](_0x5ee50b[_0x328baf(0x456)]);}catch(_0x44e53c){return Promise[_0x328baf(0x481)](_0x44e53c);}}async[_0x28bbb9(0x4ad)](_0x8ba2cc){const _0x1b9cff=_0x28bbb9;let _0x305644='';if(!p['DRAWING_IMAGE_ALLOW_IMAGE_LIST'][_0x1b9cff(0x539)](_0x8ba2cc[_0x1b9cff(0x538)]))return this['_decreaseWaiting'](),Promise[_0x1b9cff(0x481)](Error(r[_0x1b9cff(0x563)]['ERROR_IMAGE_TYPE']));if(_0x8ba2cc['size']>(0x0,p[_0x1b9cff(0x2f7)])())return this[_0x1b9cff(0x1e1)](),Promise['reject'](Error(r['ImageUploadStatusType']['ERROR_EXCEED_SIZE']));try{let _0x1234f8=new FormData();_0x1234f8[_0x1b9cff(0x1ef)](_0x1b9cff(0x246),_0x8ba2cc);let _0x5176ed=this['_univerInstanceService']['getFocusedUnit'](),_0x15a5ba=_0x5176ed==null?void 0x0:_0x5176ed[_0x1b9cff(0x3e7)]();if(!_0x15a5ba)throw Error('unitId\x20is\x20not\x20found');let _0x16a6c2=this[_0x1b9cff(0x516)]()+'?size='+_0x8ba2cc[_0x1b9cff(0x1e8)][_0x1b9cff(0x4c0)]()+_0x1b9cff(0x2fc)+o['FileSource'][_0x1b9cff(0x43d)]+'&assign='+encodeURIComponent(_0x15a5ba),_0x5bf507={'body':_0x1234f8},_0x8b8c42=(await this['_httpService'][_0x1b9cff(0x36b)](_0x16a6c2,_0x5bf507))[_0x1b9cff(0x340)];if(typeof _0x8b8c42['FileId']!=_0x1b9cff(0x2d4))return this[_0x1b9cff(0x1e1)](),Promise[_0x1b9cff(0x481)](Error(r[_0x1b9cff(0x563)]['ERROR_IMAGE']));_0x305644=_0x8b8c42[_0x1b9cff(0x217)];}catch{return this['_decreaseWaiting'](),Promise[_0x1b9cff(0x481)](Error(r[_0x1b9cff(0x563)]['ERROR_IMAGE']));}return new Promise((_0x36bb09,_0x246328)=>{const _0x82ca04=_0x1b9cff;let _0xb43a39=new FileReader();_0xb43a39[_0x82ca04(0x31e)](_0x8ba2cc),_0xb43a39['onload']=_0x3dc964=>{const _0x47f873=_0x82ca04;var _0x4039af;let _0x442a80=(_0x4039af=_0x3dc964[_0x47f873(0x29d)])==null?void 0x0:_0x4039af[_0x47f873(0x319)];_0x442a80==null?(this[_0x47f873(0x1e1)](),_0x246328(Error(r[_0x47f873(0x563)]['ERROR_IMAGE']))):(_0x36bb09({'imageId':(0x0,r[_0x47f873(0x24f)])(0x6),'imageSourceType':r[_0x47f873(0x4f3)]['UUID'],'source':_0x305644,'base64Cache':_0x442a80,'status':r[_0x47f873(0x563)][_0x47f873(0x232)]}),this['_decreaseWaiting']());};});}['_getUploadFileURL'](){const _0x4826c5=_0x28bbb9;let _0x7f8794=this['_configService'][_0x4826c5(0x230)](m);return(_0x7f8794==null?void 0x0:_0x7f8794[_0x4826c5(0x1ed)])??_0x4826c5(0x1c2);}[_0x28bbb9(0x2ef)](){const _0x102eef=_0x28bbb9;let _0x2aa09f=this['_configService']['getConfig'](m);return(_0x2aa09f==null?void 0x0:_0x2aa09f[_0x102eef(0x2af)])??_0x102eef(0x545);}[_0x28bbb9(0x3df)](){const _0x53dbe4=_0x28bbb9;let _0x4d6ede=this[_0x53dbe4(0x2c8)][_0x53dbe4(0x230)](m);return(_0x4d6ede==null?void 0x0:_0x4d6ede[_0x53dbe4(0x380)])??location[_0x53dbe4(0x2e3)];}[_0x28bbb9(0x3d8)](_0x525b40,_0x1488a0){const _0x17d529=_0x28bbb9;return _0x525b40[_0x17d529(0x484)](_0x17d529(0x544),_0x1488a0);}[_0x28bbb9(0x1e1)](){const _0x561f43=_0x28bbb9;--this[_0x561f43(0x500)],this[_0x561f43(0x547)][_0x561f43(0x512)](this[_0x561f43(0x500)]);}};X=b([y(0x0,(0x0,r['Inject'])(e['HTTPService'])),y(0x1,r[_0x28bbb9(0x421)]),y(0x2,(0x0,r['Inject'])(r['IUniverInstanceService']))],X);let Z=class{constructor(_0x19ee94,_0x3d532){const _0x386bcb=_0x28bbb9;this['_configService']=_0x19ee94,this[_0x386bcb(0x24d)]=_0x3d532;}[_0x28bbb9(0x2e1)](){const _0x1d371d=_0x28bbb9;let _0x17e2e5=this[_0x1d371d(0x2c8)][_0x1d371d(0x230)](m);return(_0x17e2e5==null?void 0x0:_0x17e2e5[_0x1d371d(0x4d5)])??'/universer-api/authz';}async['list'](_0x4330da){const _0x3c0f93=_0x28bbb9;let _0x3c54bf=this[_0x3c0f93(0x2e1)]()+_0x3c0f93(0x1fd);return{'list':[{'title':_0x3c0f93(0x50a),'mentions':(await this[_0x3c0f93(0x24d)][_0x3c0f93(0x285)](_0x3c54bf,{'params':{'objectID':_0x4330da[_0x3c0f93(0x212)],'unitID':_0x4330da[_0x3c0f93(0x212)]}}))['body']['collaborators'][_0x3c0f93(0x485)](_0x4b9923=>({'objectId':_0x4b9923['id'],'name':_0x4b9923[_0x3c0f93(0x2d5)][_0x3c0f93(0x234)],'metadata':{'icon':_0x4b9923[_0x3c0f93(0x2d5)]['avatar']},'label':_0x4b9923[_0x3c0f93(0x2d5)]['name'],'objectType':r[_0x3c0f93(0x50e)]['PERSON']})),'metadata':{},'type':r['MentionType'][_0x3c0f93(0x4e1)]}]};}};Z=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x421)])),y(0x1,(0x0,r[_0x28bbb9(0x431)])(e[_0x28bbb9(0x3ff)]))],Z);let Q=class extends r[_0x28bbb9(0x22c)]{constructor(_0x34c637,_0x2f1071,_0x51e64c,_0x18835c,_0x45e2e5,_0x4a536a){const _0x444068=_0x28bbb9;super(),this['_injector']=_0x34c637,this['_univerInstanceService']=_0x2f1071,this[_0x444068(0x370)]=_0x51e64c,this[_0x444068(0x225)]=_0x18835c,this[_0x444068(0x22d)]=_0x45e2e5,this[_0x444068(0x3b5)]=_0x4a536a,_(this,_0x444068(0x56a),new Set()),this[_0x444068(0x457)](()=>this[_0x444068(0x56a)]['clear']()),this['disposeWithMe'](dt(this[_0x444068(0x4b7)])[_0x444068(0x264)](({unitId:_0x45c6f5})=>this['_closedUnits'][_0x444068(0x551)](_0x45c6f5))),this['_initUnitPermissionChange'](),this[_0x444068(0x273)](),[r[_0x444068(0x24b)][_0x444068(0x297)],r[_0x444068(0x24b)][_0x444068(0x405)],r[_0x444068(0x24b)][_0x444068(0x3bb)],r[_0x444068(0x24b)][_0x444068(0x449)]]['forEach'](_0x5cafea=>{const _0x52ca24=_0x444068;this[_0x52ca24(0x457)](this[_0x52ca24(0x4b7)][_0x52ca24(0x3ce)](_0x5cafea)[_0x52ca24(0x264)](_0x3cc33c=>{const _0x414d93=_0x52ca24;this[_0x414d93(0x56a)][_0x414d93(0x3a3)](_0x3cc33c[_0x414d93(0x3e7)]()),this[_0x414d93(0x475)]['get'](r[_0x414d93(0x3ba)])['clearUnit'](_0x3cc33c['getUnitId']());}));});}[_0x28bbb9(0x273)](){const _0x9af16c=_0x28bbb9;let _0x29f560=async(_0x3702b2,_0x149226)=>{const _0x4c9eac=_0x53d0;let _0x4a6e49=await this['_collaborationSessionService'][_0x4c9eac(0x345)](_0x3702b2);this['_disposed']||this['_closedUnits']['has'](_0x3702b2)||!this[_0x4c9eac(0x4b7)][_0x4c9eac(0x1e2)](_0x3702b2)||_0x4a6e49[_0x4c9eac(0x2f3)][_0x4c9eac(0x213)]((0x0,c[_0x4c9eac(0x46f)])(_0x294ad9=>_0x294ad9[_0x4c9eac(0x2ff)]===n['CollaborationEvent']['SHOULD_CLOSE_CONN']),(0x0,c['takeUntil'])((0x0,t[_0x4c9eac(0x3e1)])(this[_0x4c9eac(0x55d)],this[_0x4c9eac(0x4b7)][_0x4c9eac(0x22b)][_0x4c9eac(0x213)]((0x0,c['filter'])(_0x2e2b18=>_0x2e2b18[_0x4c9eac(0x3e7)]()===_0x3702b2)))))[_0x4c9eac(0x264)](_0xc3ef60=>{const _0x27b2a8=_0x4c9eac;let {reason:_0x1539a3}=_0xc3ef60[_0x27b2a8(0x350)];this[_0x27b2a8(0x3b5)][_0x27b2a8(0x40c)]({'id':'CLOSE_ROOM','data':_0x1539a3}),this[_0x27b2a8(0x56a)][_0x27b2a8(0x3a3)](_0x3702b2),this[_0x27b2a8(0x475)][_0x27b2a8(0x285)](r[_0x27b2a8(0x3ba)])[_0x27b2a8(0x32c)](_0x3702b2);let _0x6a4c3b=ft(_0x149226);_0x6a4c3b!=null&&this[_0x27b2a8(0x1c8)](_0x3702b2,_0x6a4c3b,o[_0x27b2a8(0x4b5)][_0x27b2a8(0x569)],!0x1),this[_0x27b2a8(0x22d)][_0x27b2a8(0x200)](_0x3702b2);});};dt(this[_0x9af16c(0x4b7)])[_0x9af16c(0x213)]((0x0,c[_0x9af16c(0x46f)])(({unitId:_0x4a00fd})=>!(0x0,r[_0x9af16c(0x53d)])(_0x4a00fd)),(0x0,c['takeUntil'])(this[_0x9af16c(0x55d)]))[_0x9af16c(0x264)](({type:_0x40b18f,unitId:_0x5a2460})=>{const _0x4d9fbb=_0x9af16c;_0x29f560(_0x5a2460,_0x40b18f)['catch'](_0x17354b=>this['_injector'][_0x4d9fbb(0x285)](r[_0x4d9fbb(0x369)])['error'](_0x17354b));});}[_0x28bbb9(0x554)](){const _0x18e54c=_0x28bbb9;let _0x5ae7db=async(_0x223bbd,_0xcbaecb)=>{const _0x2c1613=_0x53d0;let _0x5d48f5=await this[_0x2c1613(0x22d)]['requireSession'](_0x223bbd);if(!(this[_0x2c1613(0x1c7)]||this[_0x2c1613(0x56a)][_0x2c1613(0x546)](_0x223bbd)||!this[_0x2c1613(0x4b7)]['getUnit'](_0x223bbd))){if(_0xcbaecb===r[_0x2c1613(0x24b)][_0x2c1613(0x486)]){let _0x5380c0=this[_0x2c1613(0x475)][_0x2c1613(0x285)](a['SheetPermissionInitController']);await _0x5380c0[_0x2c1613(0x361)](_0x223bbd),_0x5d48f5[_0x2c1613(0x2f3)][_0x2c1613(0x213)]((0x0,c['filter'])(_0x56c413=>_0x56c413[_0x2c1613(0x2ff)]===n['CollaborationEvent']['UPDATE_PERMISSION_OBJ']),(0x0,c[_0x2c1613(0x418)])((0x0,t['merge'])(this[_0x2c1613(0x55d)],_0x5d48f5[_0x2c1613(0x2f3)][_0x2c1613(0x213)]((0x0,c[_0x2c1613(0x46f)])(_0x5c0273=>_0x5c0273[_0x2c1613(0x2ff)]===n[_0x2c1613(0x33f)][_0x2c1613(0x22a)])),this[_0x2c1613(0x4b7)]['unitDisposed$']['pipe']((0x0,c[_0x2c1613(0x46f)])(_0x5ecbb7=>_0x5ecbb7[_0x2c1613(0x3e7)]()===_0x223bbd)))))[_0x2c1613(0x264)](_0x55d6a7=>{const _0x315d7a=_0x2c1613;let {objectId:_0x2f4ebb}=_0x55d6a7[_0x315d7a(0x350)];_0x2f4ebb===_0x223bbd?_0x5380c0['initWorkbookPermissionChange'](_0x223bbd):_0x5380c0[_0x315d7a(0x40d)](_0x223bbd,_0x2f4ebb);});}else _0x5d48f5[_0x2c1613(0x2f3)]['pipe']((0x0,c[_0x2c1613(0x46f)])(_0x25942a=>_0x25942a[_0x2c1613(0x2ff)]===n[_0x2c1613(0x33f)]['UPDATE_PERMISSION_OBJ']),(0x0,c[_0x2c1613(0x418)])((0x0,t[_0x2c1613(0x3e1)])(this[_0x2c1613(0x55d)],_0x5d48f5[_0x2c1613(0x2f3)][_0x2c1613(0x213)]((0x0,c[_0x2c1613(0x46f)])(_0x28e153=>_0x28e153[_0x2c1613(0x2ff)]===n[_0x2c1613(0x33f)]['SHOULD_CLOSE_CONN'])),this[_0x2c1613(0x4b7)][_0x2c1613(0x22b)]['pipe']((0x0,c['filter'])(_0xf4919c=>_0xf4919c[_0x2c1613(0x3e7)]()===_0x223bbd)))))[_0x2c1613(0x264)](()=>{const _0x25f1ca=_0x2c1613;this[_0x25f1ca(0x3ed)](_0x223bbd,_0xcbaecb)[_0x25f1ca(0x4a4)](_0x5f0cf6=>this[_0x25f1ca(0x475)][_0x25f1ca(0x285)](r[_0x25f1ca(0x369)])[_0x25f1ca(0x456)](_0x5f0cf6));}),await this[_0x2c1613(0x3ed)](_0x223bbd,_0xcbaecb);}};dt(this[_0x18e54c(0x4b7)])['pipe']((0x0,c[_0x18e54c(0x46f)])(({unitId:_0x18ba12})=>!(0x0,r[_0x18e54c(0x53d)])(_0x18ba12)),(0x0,c[_0x18e54c(0x418)])(this[_0x18e54c(0x55d)]))[_0x18e54c(0x264)](({type:_0x2b4eea,unitId:_0x51e246})=>{const _0x458272=_0x18e54c;_0x5ae7db(_0x51e246,_0x2b4eea)['catch'](_0x4764e9=>this['_injector']['get'](r[_0x458272(0x369)])[_0x458272(0x456)](_0x4764e9));});}async[_0x28bbb9(0x3ed)](_0x4c19db,_0x571908){const _0x3384ba=_0x28bbb9;let _0xa4c899=ft(_0x571908);if(_0xa4c899==null)return;let _0x553be6=this['_injector'][_0x3384ba(0x285)](r[_0x3384ba(0x3ba)]);if(_0x553be6[_0x3384ba(0x249)]({'unitId':_0x4c19db,'objectId':_0x4c19db,'objectType':_0xa4c899})){await _0x553be6[_0x3384ba(0x1e0)](_0x4c19db);return;}let _0x2afd38=this[_0x3384ba(0x2f2)](_0x4c19db,_0xa4c899);if(!_0x2afd38[_0x3384ba(0x47a)])return;let _0x232247=await this[_0x3384ba(0x225)][_0x3384ba(0x3f4)]({'objectID':_0x4c19db,'objectType':_0xa4c899,'unitID':_0x4c19db,'actions':_0x2afd38[_0x3384ba(0x485)](({action:_0x57f9ab})=>_0x57f9ab)});this[_0x3384ba(0x1c7)]||this['_closedUnits'][_0x3384ba(0x546)](_0x4c19db)||!this[_0x3384ba(0x4b7)][_0x3384ba(0x1e2)](_0x4c19db)||_0x232247[_0x3384ba(0x3e9)](_0x20e190=>{const _0x1eceb4=_0x3384ba;let _0x498595=_0x20e190[_0x1eceb4(0x4c1)],_0xcb80df=_0x20e190[_0x1eceb4(0x3f4)];_0x498595!=null&&_0xcb80df!=null&&_0x2afd38[_0x1eceb4(0x46f)](_0x32af35=>_0x32af35[_0x1eceb4(0x4c1)]===_0x498595)[_0x1eceb4(0x3e9)](_0x7cfb7f=>this['_permissionService'][_0x1eceb4(0x3cc)](_0x7cfb7f['id'],_0xcb80df));});}['_getUnitPermissionPoints'](_0x4358d4,_0x241f39){const _0x4050e7=_0x28bbb9;let _0x5495bd=[];return this[_0x4050e7(0x370)][_0x4050e7(0x251)]()[_0x4050e7(0x3e9)]((_0x1065f3,_0x25b261)=>{_0x1065f3['subscribe'](_0x284c23=>{const _0x3dd4f0=_0x53d0;_0x284c23[_0x3dd4f0(0x538)]===_0x241f39&&_0x3dd4f0(0x212)in _0x284c23&&_0x284c23[_0x3dd4f0(0x212)]===_0x4358d4&&(!(_0x3dd4f0(0x394)in _0x284c23)||_0x284c23['objectId']===_0x4358d4)&&_0x5495bd[_0x3dd4f0(0x4ec)]({'id':_0x25b261,'action':_0x284c23[_0x3dd4f0(0x2f4)]});})['unsubscribe']();}),_0x5495bd;}[_0x28bbb9(0x1c8)](_0x4c7508,_0x41a119,_0x4c0862,_0x3f69ce){const _0x1cadb9=_0x28bbb9;this['_permissionService'][_0x1cadb9(0x251)]()[_0x1cadb9(0x3e9)]((_0x30e853,_0x1cf78f)=>{const _0x160a04=_0x1cadb9;let _0x1a8410=!0x1;_0x30e853['subscribe'](_0x2dbf55=>{const _0x4d3f08=_0x53d0;_0x1a8410=_0x2dbf55[_0x4d3f08(0x538)]===_0x41a119&&_0x2dbf55[_0x4d3f08(0x2f4)]===_0x4c0862&&_0x4d3f08(0x212)in _0x2dbf55&&_0x2dbf55['unitId']===_0x4c7508&&(!(_0x4d3f08(0x394)in _0x2dbf55)||_0x2dbf55[_0x4d3f08(0x394)]===_0x4c7508);})[_0x160a04(0x3c7)](),_0x1a8410&&this[_0x160a04(0x370)][_0x160a04(0x3cc)](_0x1cf78f,_0x3f69ce);});}};Q=b([y(0x0,(0x0,r[_0x28bbb9(0x431)])(r['Injector'])),y(0x1,r[_0x28bbb9(0x51c)]),y(0x2,r['IPermissionService']),y(0x3,r[_0x28bbb9(0x3b2)]),y(0x4,(0x0,r['Inject'])(U)),y(0x5,(0x0,r[_0x28bbb9(0x431)])(v))],Q);function dt(_0x14ba21){const _0x5d29c2=_0x28bbb9;return(0x0,t[_0x5d29c2(0x3e1)])(...[r[_0x5d29c2(0x24b)][_0x5d29c2(0x486)],r['UniverInstanceType'][_0x5d29c2(0x297)],r['UniverInstanceType'][_0x5d29c2(0x405)],r['UniverInstanceType']['UNIVER_BOARD'],r[_0x5d29c2(0x24b)]['UNIVER_BASE']][_0x5d29c2(0x485)](_0x5921f6=>_0x14ba21[_0x5d29c2(0x342)](_0x5921f6)[_0x5d29c2(0x213)]((0x0,c['map'])(_0x3be352=>({'type':_0x5921f6,'unitId':_0x3be352[_0x5d29c2(0x54f)][_0x5d29c2(0x3e7)]()})))));}function ft(_0x5d134d){const _0x39ff35=_0x28bbb9;switch(_0x5d134d){case r[_0x39ff35(0x24b)][_0x39ff35(0x486)]:return o[_0x39ff35(0x2c4)][_0x39ff35(0x218)];case r[_0x39ff35(0x24b)][_0x39ff35(0x297)]:return o[_0x39ff35(0x2c4)][_0x39ff35(0x357)];case r[_0x39ff35(0x24b)][_0x39ff35(0x405)]:return o[_0x39ff35(0x2c4)][_0x39ff35(0x410)];case r[_0x39ff35(0x24b)][_0x39ff35(0x449)]:return o[_0x39ff35(0x2c4)][_0x39ff35(0x396)];case r['UniverInstanceType'][_0x39ff35(0x3bb)]:return o[_0x39ff35(0x2c4)][_0x39ff35(0x41d)];default:return;}}let pt=class{constructor(_0x6d69b6,_0x45e2ac){const _0x3f9e91=_0x28bbb9;this[_0x3f9e91(0x2c8)]=_0x6d69b6,this['_httpService']=_0x45e2ac;}async['getUnitOnRev'](_0x17e73c,_0x27050d){const _0x1a58c7=_0x28bbb9;var _0xf73452;let {unitID:_0x30cebf,type:_0x43fa26,revision:_0xf195fb=0x0}=_0x27050d,_0x4b9a99=this[_0x1a58c7(0x26a)]()+'/'+_0x43fa26+_0x1a58c7(0x300)+_0x30cebf+'/rev/'+_0xf195fb,_0xea705f=(await this[_0x1a58c7(0x2a4)]['get'](_0x4b9a99))['body'],_0x430789=(_0xf73452=_0xea705f['snapshot'])==null?void 0x0:_0xf73452[_0x1a58c7(0x447)];if(_0x430789){let _0xfdea4d=_0x430789==null?void 0x0:_0x430789[_0x1a58c7(0x36c)];_0x430789[_0x1a58c7(0x36c)]=n[_0x1a58c7(0x355)][_0x1a58c7(0x216)]((0x0,n[_0x1a58c7(0x490)])(_0xfdea4d)),Object[_0x1a58c7(0x215)](_0x430789[_0x1a58c7(0x480)])[_0x1a58c7(0x3e9)](([,_0x488dbd])=>{const _0x50a2f6=_0x1a58c7;let _0x367679=_0x488dbd['originalMeta'];_0x488dbd[_0x50a2f6(0x36c)]=n[_0x50a2f6(0x355)][_0x50a2f6(0x216)]((0x0,n[_0x50a2f6(0x490)])(_0x367679));});}return _0xea705f;}async[_0x28bbb9(0x564)](_0x31b213,_0x32d7c0){const _0x4b81fb=_0x28bbb9;let {unitID:_0x4296e0,type:_0xbf222f,blockID:_0x55128e}=_0x32d7c0,_0x401e1a=this[_0x4b81fb(0x46e)]()+'/'+_0xbf222f+_0x4b81fb(0x300)+_0x4296e0+_0x4b81fb(0x3d5)+_0x55128e;return(await this['_httpService'][_0x4b81fb(0x285)](_0x401e1a))[_0x4b81fb(0x340)];}async[_0x28bbb9(0x38b)](_0x46edca,_0xf78edc){const _0x48082e=_0x28bbb9;let {unitID:_0x3e6eab,type:_0x1205c0,blockID:_0x333fb8}=_0xf78edc,_0x3cef51=this[_0x48082e(0x46e)]()+_0x48082e(0x3d5)+_0x1205c0+_0x48082e(0x300)+_0x3e6eab+_0x48082e(0x3d5)+_0x333fb8;return(await this[_0x48082e(0x2a4)][_0x48082e(0x285)](_0x3cef51))[_0x48082e(0x340)];}async[_0x28bbb9(0x556)](_0x2b850f,_0x22a44b){const _0x4d43fd=_0x28bbb9;let {unitID:_0x14a18f,type:_0x2a697d,from:_0x5f0a2b,to:_0x4c991d}=_0x22a44b,_0x3b7b9b=this[_0x4d43fd(0x46e)]()+'/'+_0x2a697d+_0x4d43fd(0x300)+_0x14a18f+_0x4d43fd(0x426)+_0x5f0a2b+_0x4d43fd(0x305)+_0x4c991d;return(await this[_0x4d43fd(0x2a4)][_0x4d43fd(0x285)](_0x3b7b9b))[_0x4d43fd(0x340)];}['getSnapshotAPIPath'](){const _0x51f96b=_0x28bbb9;return this[_0x51f96b(0x2c8)][_0x51f96b(0x230)](_0x51f96b(0x2c0))??this[_0x51f96b(0x46e)]();}[_0x28bbb9(0x46e)](){const _0x30c156=_0x28bbb9;let _0x1ef613=this[_0x30c156(0x2c8)][_0x30c156(0x230)](m);return(_0x1ef613==null?void 0x0:_0x1ef613[_0x30c156(0x1b5)])??_0x30c156(0x54c);}async[_0x28bbb9(0x364)](_0x205861,_0x684f18){const _0x3606fe=_0x28bbb9;let _0x2b67a4=_0x3606fe(0x34b)+_0x684f18['type']+'/unit/'+_0x684f18['unitID']+_0x3606fe(0x529);return(await this[_0x3606fe(0x2a4)][_0x3606fe(0x285)](_0x2b67a4,{'params':{'resourceId':JSON['stringify'](_0x684f18['resourceIDs'])}}))[_0x3606fe(0x340)];}[_0x28bbb9(0x39f)](){const _0x54d2c4=_0x28bbb9;throw Error(_0x54d2c4(0x536));}['updateSnapshot'](){const _0x4592e6=_0x28bbb9;throw Error(_0x4592e6(0x536));}[_0x28bbb9(0x33c)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x28bbb9(0x55c)](){const _0x186f82=_0x28bbb9;throw Error(_0x186f82(0x536));}[_0x28bbb9(0x398)](){const _0xfe465c=_0x28bbb9;throw Error(_0xfe465c(0x536));}[_0x28bbb9(0x3f0)](){const _0x1f13c2=_0x28bbb9;throw Error(_0x1f13c2(0x536));}};pt=b([y(0x0,r['IConfigService']),y(0x1,(0x0,r[_0x28bbb9(0x431)])(e[_0x28bbb9(0x3ff)]))],pt);let mt=class extends r[_0x28bbb9(0x280)]{constructor(_0x1e0218,_0x2cec4a,_0x49970a,_0x59e61f,_0x2a5bb2,_0x75fa72){const _0x38dfa5=_0x28bbb9;super(_0x1e0218,_0x2cec4a,_0x49970a,_0x59e61f),this[_0x38dfa5(0x1f2)]=_0x2a5bb2,this['_logService']=_0x75fa72;}[_0x28bbb9(0x2be)](_0x446ab7,_0x8170d5){const _0x12a77c=_0x28bbb9;let _0x11c848=this[_0x12a77c(0x2d8)](_0x446ab7);if(_0x11c848)try{let _0x324fed=this[_0x12a77c(0x4ab)](_0x11c848,_0x8170d5);this['_substituteUndoStack'](_0x446ab7,_0x324fed);}catch(_0x539ced){this[_0x12a77c(0x41e)][_0x12a77c(0x456)](_0x12a77c(0x288),_0x539ced),this['_clearUndo'](_0x446ab7);}let _0x29c106=this[_0x12a77c(0x276)](_0x446ab7);if(_0x29c106)try{let _0x3de0a5=this[_0x12a77c(0x4ab)](_0x29c106,_0x8170d5,!0x0);this['_substituteRedoStack'](_0x446ab7,_0x3de0a5);}catch(_0xf3c114){this['_logService']['error'](_0xf3c114),this[_0x12a77c(0x3ee)](_0x446ab7);}}[_0x28bbb9(0x1c6)](_0x593656){const _0x53440f=_0x28bbb9;let _0x54d1a1=this[_0x53440f(0x2d8)](_0x593656);_0x54d1a1&&(_0x54d1a1[_0x53440f(0x47a)]=0x0,this[_0x53440f(0x3b0)]());}['_clearRedo'](_0x53e3e9){const _0x3b7978=_0x28bbb9;let _0x4cdd6c=this['_getRedoStack'](_0x53e3e9);_0x4cdd6c&&(_0x4cdd6c[_0x3b7978(0x47a)]=0x0,this[_0x3b7978(0x3b0)]());}[_0x28bbb9(0x20b)](_0x4940ad,_0x22526e){const _0x444e0f=_0x28bbb9;this[_0x444e0f(0x461)]['set'](_0x4940ad,_0x22526e),this['_updateStatus']();}[_0x28bbb9(0x2a5)](_0x5d6c03,_0x361d6f){const _0x2b7fe4=_0x28bbb9;this[_0x2b7fe4(0x463)][_0x2b7fe4(0x36a)](_0x5d6c03,_0x361d6f),this[_0x2b7fe4(0x3b0)]();}[_0x28bbb9(0x4ab)](_0x26b3d5,_0x48ffd2,_0x252352=!0x1){const _0x135d51=_0x28bbb9;if(!_0x26b3d5['length'])return[];let _0x5e2495=[],_0x18ac63=_0x48ffd2,_0x3a3d68=_0x48ffd2['type']===r[_0x135d51(0x24b)]['UNIVER_DOC']?this[_0x135d51(0x4b7)]['getUnit'](_0x48ffd2['unitID'],r[_0x135d51(0x24b)]['UNIVER_DOC']):null,_0x363c5f=_0x3a3d68?{'id':_0x3a3d68[_0x135d51(0x3e7)](),'documentStyle':{},'tableSource':r[_0x135d51(0x4cf)]['deepClone'](_0x3a3d68[_0x135d51(0x1f1)]()[_0x135d51(0x51f)]??{})}:null;for(let _0x403d90=_0x26b3d5[_0x135d51(0x47a)]-0x1;_0x403d90>=0x0;_0x403d90--){let {unitID:_0x181808,undoMutations:_0x414ce7,redoMutations:_0x54be73}=_0x26b3d5[_0x403d90],_0xe2b6cf=_0x252352?_0x54be73:_0x414ce7,_0x1a9a13=this[_0x135d51(0x3c9)](_0x18ac63,_0xe2b6cf);if((0x0,n[_0x135d51(0x2c3)])(_0x1a9a13)){this[_0x135d51(0x41e)]['error'](_0x135d51(0x288),_0x135d51(0x376),_0x1a9a13);break;}let _0x1bb0fe=_0x252352?_0x414ce7:_0x54be73,_0x131e0d=this[_0x135d51(0x3c9)](_0x1a9a13[_0x135d51(0x310)],_0x1bb0fe);if((0x0,n[_0x135d51(0x2c3)])(_0x131e0d)){this[_0x135d51(0x41e)]['error'](_0x135d51(0x288),_0x135d51(0x376),_0x131e0d);break;}let _0xc523f2=_0x252352?_0x131e0d:_0x1a9a13,_0x50ef10=_0x252352?_0x1a9a13:_0x131e0d;_0x18ac63=_0x1a9a13['c1Prime'],_0x363c5f&&=this[_0x135d51(0x505)](_0x363c5f,_0x1a9a13['m2Prime'],_0x131e0d[_0x135d51(0x3bd)]),_0x5e2495[_0x135d51(0x4ec)]({'unitID':_0x181808,'undoMutations':_0xc523f2[_0x135d51(0x3bd)],'redoMutations':_0x50ef10['m2Prime']});}return _0x5e2495[_0x135d51(0x275)]();}[_0x28bbb9(0x3c9)](_0x258c4c,_0x244afe){const _0x1c1ccc=_0x28bbb9;if(_0x258c4c[_0x1c1ccc(0x538)]!==r['UniverInstanceType'][_0x1c1ccc(0x297)]||_0x244afe[_0x1c1ccc(0x33e)](_0x4981a1=>_0x4981a1['id']!==i[_0x1c1ccc(0x4d7)]['id']))return this[_0x1c1ccc(0x1f2)]['transformMutationsWithChangeset'](_0x258c4c,_0x244afe);let _0x579bc7=r['Tools'][_0x1c1ccc(0x417)](_0x244afe),_0x46a132=[];for(let _0xa7c975 of _0x258c4c[_0x1c1ccc(0x220)]){let _0x2efcbf={..._0x258c4c,'mutations':[_0xa7c975]},_0x13c0fa=[];for(let _0x5c4832 of _0x579bc7){_0x2efcbf=this['_rebaseParagraphHistory'](_0x2efcbf,[_0x5c4832]);let _0x4ca4be=this[_0x1c1ccc(0x1f2)][_0x1c1ccc(0x541)](_0x2efcbf,[_0x5c4832]);if((0x0,n[_0x1c1ccc(0x2c3)])(_0x4ca4be))return _0x4ca4be;_0x2efcbf=_0x4ca4be[_0x1c1ccc(0x310)],_0x13c0fa[_0x1c1ccc(0x4ec)](..._0x4ca4be[_0x1c1ccc(0x3bd)]);}_0x579bc7=_0x13c0fa,_0x46a132['push'](..._0x2efcbf[_0x1c1ccc(0x220)]);}return{'m2Prime':_0x579bc7,'c1Prime':{..._0x258c4c,'mutations':_0x46a132}};}[_0x28bbb9(0x2dc)](_0x5be293,_0x36fbe5){const _0xf7e4d8=_0x28bbb9;let _0x47381c=new Map(),_0x49fc8e=r[_0xf7e4d8(0x3d3)][_0xf7e4d8(0x538)][_0xf7e4d8(0x34a)](_0x36fbe5[0x0][_0xf7e4d8(0x453)][_0xf7e4d8(0x3d1)]);if(_0x49fc8e[_0xf7e4d8(0x3e5)](null,_0x109907=>{const _0x3100a3=_0xf7e4d8;if(_0x109907['et']!==_0x3100a3(0x454))return;let _0xf06ea3=JSON[_0x3100a3(0x4d3)](_0x49fc8e[_0x3100a3(0x33d)]()),_0x1b96a9=_0x47381c['get'](_0xf06ea3)??new Map(),_0x549684=0x0;for(let _0x5f357f of _0x109907['e']){if(_0x5f357f['t']===r[_0x3100a3(0x525)]['RETAIN']){var _0x12dded;for(let _0x3e6a52 of((_0x12dded=_0x5f357f[_0x3100a3(0x340)])==null?void 0x0:_0x12dded[_0x3100a3(0x328)])??[])_0x1b96a9[_0x3100a3(0x36a)](_0x549684+_0x3e6a52[_0x3100a3(0x309)],{'paragraph':_0x3e6a52,'replace':_0x5f357f[_0x3100a3(0x279)]===r[_0x3100a3(0x4eb)][_0x3100a3(0x45a)]});}_0x5f357f['t']!==r[_0x3100a3(0x525)][_0x3100a3(0x3e4)]&&(_0x549684+=_0x5f357f[_0x3100a3(0x46c)]);}_0x1b96a9[_0x3100a3(0x1e8)]>0x0&&_0x47381c[_0x3100a3(0x36a)](_0xf06ea3,_0x1b96a9);}),_0x47381c[_0xf7e4d8(0x1e8)]===0x0)return _0x5be293;let _0x352904=r[_0xf7e4d8(0x4cf)][_0xf7e4d8(0x417)](_0x5be293);for(let _0x48b538 of _0x352904[_0xf7e4d8(0x220)]){if(_0x48b538['id']!==i['RichTextEditingMutation']['id'])continue;let _0x4aa48b=r[_0xf7e4d8(0x3d3)][_0xf7e4d8(0x538)][_0xf7e4d8(0x34a)](_0x48b538[_0xf7e4d8(0x453)][_0xf7e4d8(0x3d1)]);_0x4aa48b[_0xf7e4d8(0x3e5)](null,_0x5da7d9=>{const _0x1d2fdc=_0xf7e4d8;if(_0x5da7d9['et']!=='text-x')return;let _0x58fa2d=JSON['stringify'](_0x4aa48b[_0x1d2fdc(0x33d)]()),_0x572346=_0x47381c['get'](_0x58fa2d);if(!(_0x572346!=null&&_0x572346[_0x1d2fdc(0x1e8)]))return;let _0x47d08b=0x0;for(let _0x1445ee of _0x5da7d9['e']){if(_0x1445ee['t']===r['TextXActionType'][_0x1d2fdc(0x4f4)]&&_0x1445ee[_0x1d2fdc(0x279)]===r[_0x1d2fdc(0x4eb)][_0x1d2fdc(0x45a)]){var _0x56bbe8;for(let _0x18375c of((_0x56bbe8=_0x1445ee['body'])==null?void 0x0:_0x56bbe8[_0x1d2fdc(0x328)])??[]){var _0x46bcbf;let _0xabf1a7=(_0x46bcbf=_0x1445ee['oldBody'])==null||(_0x46bcbf=_0x46bcbf['paragraphs'])==null?void 0x0:_0x46bcbf[_0x1d2fdc(0x552)](_0x1ce1ac=>_0x1ce1ac[_0x1d2fdc(0x309)]===_0x18375c[_0x1d2fdc(0x309)]),_0x21c18a=_0x572346[_0x1d2fdc(0x285)](_0x47d08b+_0x18375c[_0x1d2fdc(0x309)]);if(_0xabf1a7&&_0x21c18a){this[_0x1d2fdc(0x25f)](_0x18375c,_0xabf1a7,_0x21c18a[_0x1d2fdc(0x30a)],_0x21c18a[_0x1d2fdc(0x484)]);let _0x5e9463=_0x21c18a['replace']?new Set([...Object['keys'](_0x21c18a['paragraph']),...Object[_0x1d2fdc(0x4fb)](_0x18375c)]):Object[_0x1d2fdc(0x4fb)](_0x21c18a[_0x1d2fdc(0x30a)]);for(let _0xe144a1 of _0x5e9463){if(_0xe144a1===_0x1d2fdc(0x309)||_0xe144a1===_0x1d2fdc(0x29a))continue;let _0x3f43f3=Reflect[_0x1d2fdc(0x285)](_0x18375c,_0xe144a1);_0x3f43f3===void 0x0?Reflect[_0x1d2fdc(0x420)](_0x21c18a[_0x1d2fdc(0x30a)],_0xe144a1):Reflect[_0x1d2fdc(0x36a)](_0x21c18a['paragraph'],_0xe144a1,r[_0x1d2fdc(0x4cf)][_0x1d2fdc(0x417)](_0x3f43f3));}}}}_0x1445ee['t']!==r[_0x1d2fdc(0x525)][_0x1d2fdc(0x3e4)]&&(_0x47d08b+=_0x1445ee[_0x1d2fdc(0x46c)]);}});}return _0x352904;}[_0x28bbb9(0x25f)](_0x392ae0,_0x515069,_0x34c531,_0x200a76){const _0x24716b=_0x28bbb9;let _0x2233fe=new Set([...Object[_0x24716b(0x4fb)](_0x392ae0),...Object[_0x24716b(0x4fb)](_0x515069),...Object[_0x24716b(0x4fb)](_0x34c531)]);for(let _0x5d20af of _0x2233fe){if(_0x5d20af===_0x24716b(0x309)||_0x5d20af===_0x24716b(0x29a))continue;let _0x2224a9=Reflect[_0x24716b(0x285)](_0x392ae0,_0x5d20af),_0xe5dd64=Reflect[_0x24716b(0x285)](_0x515069,_0x5d20af),_0x47077b=Reflect[_0x24716b(0x285)](_0x34c531,_0x5d20af);if(_0x200a76||_0x47077b!==void 0x0){if(r['Tools'][_0x24716b(0x521)](_0x2224a9,_0xe5dd64))_0x47077b===void 0x0?(Reflect[_0x24716b(0x420)](_0x392ae0,_0x5d20af),Reflect[_0x24716b(0x420)](_0x515069,_0x5d20af)):(Reflect[_0x24716b(0x36a)](_0x392ae0,_0x5d20af,r[_0x24716b(0x4cf)][_0x24716b(0x417)](_0x47077b)),Reflect[_0x24716b(0x36a)](_0x515069,_0x5d20af,r[_0x24716b(0x4cf)][_0x24716b(0x417)](_0x47077b)));else{if(r[_0x24716b(0x4cf)]['isObject'](_0x2224a9)&&(r['Tools'][_0x24716b(0x534)](_0xe5dd64)||_0xe5dd64===void 0x0)){let _0x5896d1=_0xe5dd64??{};this[_0x24716b(0x25f)](_0x2224a9,_0x5896d1,r['Tools'][_0x24716b(0x534)](_0x47077b)?_0x47077b:{},_0x200a76),(_0xe5dd64!==void 0x0||Object['keys'](_0x5896d1)[_0x24716b(0x47a)]>0x0)&&Reflect[_0x24716b(0x36a)](_0x515069,_0x5d20af,_0x5896d1);}}}}}[_0x28bbb9(0x505)](_0x196f80,_0x98632e,_0x349bb8){const _0x4d7ee9=_0x28bbb9;if(_0x98632e['length']!==0x1||_0x349bb8[_0x4d7ee9(0x47a)]!==0x1||_0x98632e[0x0]['id']!==i[_0x4d7ee9(0x4d7)]['id']||_0x349bb8[0x0]['id']!==i['RichTextEditingMutation']['id'])return _0x196f80;let _0x53941f=_0x98632e[0x0][_0x4d7ee9(0x453)],_0x5955c3=_0x349bb8[0x0][_0x4d7ee9(0x453)],_0x5be373=this[_0x4d7ee9(0x292)](_0x53941f[_0x4d7ee9(0x3d1)],!0x0);return r[_0x4d7ee9(0x413)][_0x4d7ee9(0x33b)](_0x5be373)?_0x196f80:(_0x5955c3[_0x4d7ee9(0x3d1)]=r[_0x4d7ee9(0x413)][_0x4d7ee9(0x24c)](this[_0x4d7ee9(0x292)](_0x5955c3['actions'],!0x1),r[_0x4d7ee9(0x413)][_0x4d7ee9(0x487)](_0x5be373,_0x196f80)),r[_0x4d7ee9(0x413)]['apply'](_0x196f80,_0x5be373)??_0x196f80);}[_0x28bbb9(0x292)](_0x3280fe,_0x3855fd){const _0x358b5b=_0x28bbb9;let _0x5be5e4=r['JSON1'][_0x358b5b(0x538)][_0x358b5b(0x34a)](_0x3280fe),_0x1211a4=r[_0x358b5b(0x3d3)]['type'][_0x358b5b(0x23e)]();return _0x5be5e4[_0x358b5b(0x3e5)](null,_0x3a0d68=>{const _0x1f1576=_0x358b5b;let _0x34ce05=_0x5be5e4[_0x1f1576(0x33d)]();if(_0x34ce05[0x0]===_0x1f1576(0x51f)===_0x3855fd){for(let _0x35c44b of Object[_0x1f1576(0x4fb)](_0x3a0d68))_0x1211a4[_0x1f1576(0x49c)](_0x34ce05,_0x35c44b,_0x3a0d68[_0x35c44b]);}}),_0x1211a4[_0x358b5b(0x285)]();}};mt=b([y(0x0,r['IUniverInstanceService']),y(0x1,r['ICommandService']),y(0x2,r['IContextService']),y(0x3,r[_0x28bbb9(0x421)]),y(0x4,n[_0x28bbb9(0x4fc)]),y(0x5,r[_0x28bbb9(0x369)])],mt);let $=class extends r[_0x28bbb9(0x522)]{constructor(_0x588744=h,_0x2a9aab,_0x112115,_0x50e49e){const _0x559972=_0x28bbb9;super(),this[_0x559972(0x2c7)]=_0x588744,this[_0x559972(0x41e)]=_0x2a9aab,this[_0x559972(0x475)]=_0x112115,this[_0x559972(0x2c8)]=_0x50e49e;let {..._0x41bd80}=(0x0,r[_0x559972(0x3e1)])({},h,this[_0x559972(0x2c7)]);if(!_0x41bd80['socketService'])throw Error(_0x559972(0x1e9));this['_config']=_0x41bd80,this[_0x559972(0x2c8)][_0x559972(0x2da)](m,_0x41bd80);}[_0x28bbb9(0x2bb)](){const _0x4b1ba2=_0x28bbb9;this[_0x4b1ba2(0x2c8)][_0x4b1ba2(0x2da)](r[_0x4b1ba2(0x287)],this[_0x4b1ba2(0x2c7)][_0x4b1ba2(0x372)]??[]),this[_0x4b1ba2(0x4ef)](),this[_0x4b1ba2(0x3dd)]();}[_0x28bbb9(0x4ef)](){const _0x22befe=_0x28bbb9;var _0x4a3d3b,_0x3e0aaa;this['_injector'][_0x22befe(0x546)](r[_0x22befe(0x493)])&&this[_0x22befe(0x41e)]['error'](_0x22befe(0x1b9),_0x22befe(0x440));let _0x479c55=(0x0,r[_0x22befe(0x2b8)])([[r['IUndoRedoService'],{'useClass':mt}],[Qe,{'useValue':$e()}],[U],[x],[w],[K],[J],[se],[Q],[v],[Y],[Je,{'useClass':this['_config'][_0x22befe(0x384)]}],[n[_0x22befe(0x35f)],{'useClass':pt}],[r[_0x22befe(0x3b2)],{'useClass':q}],[r['IImageIoService'],{'useClass':X}],[at,{'useClass':G}],[r[_0x22befe(0x43f)],{'useClass':Z}],[W],[it]],(_0x4a3d3b=this[_0x22befe(0x2c7)])==null?void 0x0:_0x4a3d3b[_0x22befe(0x339)]);if(!((_0x3e0aaa=this['_config'])!=null&&_0x3e0aaa[_0x22befe(0x443)])){let _0x363010=_0x479c55[_0x22befe(0x4b1)](([_0x65565b])=>_0x65565b===T);_0x363010!==-0x1&&_0x479c55[_0x22befe(0x1ca)](_0x363010,0x1);}(0x0,r[_0x22befe(0x295)])(this[_0x22befe(0x475)],_0x479c55);}[_0x28bbb9(0x3dd)](){const _0xc80d94=_0x28bbb9;var _0x5ffd34,_0x366c6c;if(this['_injector'][_0xc80d94(0x285)](e[_0xc80d94(0x3ff)])['registerHTTPInterceptor']({'priority':0x14,'interceptor':(0x0,e[_0xc80d94(0x2c2)])({'maxParallel':0x6})}),!((_0x5ffd34=this['_config'])!=null&&_0x5ffd34[_0xc80d94(0x567)])){var _0x3e97ee;(_0x3e97ee=this[_0xc80d94(0x475)][_0xc80d94(0x285)](C,r[_0xc80d94(0x3db)][_0xc80d94(0x32a)]))==null||_0x3e97ee[_0xc80d94(0x535)]();}(_0x366c6c=this['_config'])!=null&&_0x366c6c[_0xc80d94(0x48d)]&&(0x0,r[_0xc80d94(0x2d7)])(this[_0xc80d94(0x475)],[[K]]),(0x0,r[_0xc80d94(0x2d7)])(this[_0xc80d94(0x475)],[[J],[W],[Q]]);}};_($,_0x28bbb9(0x358),_0x28bbb9(0x4c3)),_($,_0x28bbb9(0x476),nt),_($,_0x28bbb9(0x1d6),rt),$=b([(0x0,r[_0x28bbb9(0x365)])(u[_0x28bbb9(0x1dc)],e['UniverNetworkPlugin'],n[_0x28bbb9(0x271)]),y(0x1,r[_0x28bbb9(0x369)]),y(0x2,(0x0,r[_0x28bbb9(0x431)])(r[_0x28bbb9(0x506)])),y(0x3,r['IConfigService'])],$),Object['defineProperty'](exports,_0x28bbb9(0x2d3),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x2bf),{'enumerable':!0x0,'get':function(){return j;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x28e),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x3c8),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x28bbb9(0x41f)](exports,'BoardCollaborationEntity',{'enumerable':!0x0,'get':function(){return V;}}),exports[_0x28bbb9(0x38d)]=m,exports[_0x28bbb9(0x322)]=ne,Object[_0x28bbb9(0x41f)](exports,'CollaborationAttachmentIoService',{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x270),{'enumerable':!0x0,'get':function(){return W;}}),Object['defineProperty'](exports,_0x28bbb9(0x389),{'enumerable':!0x0,'get':function(){return I;}}),Object['defineProperty'](exports,_0x28bbb9(0x335),{'enumerable':!0x0,'get':function(){return X;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x44a),{'enumerable':!0x0,'get':function(){return S;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x1f0),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x51b),{'enumerable':!0x0,'get':function(){return Xe;}}),exports[_0x28bbb9(0x4fe)]=Ue,exports[_0x28bbb9(0x2ca)]=oe,exports[_0x28bbb9(0x38c)]=v,Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x323),{'enumerable':!0x0,'get':function(){return mt;}}),exports[_0x28bbb9(0x223)]=se,Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x1d5),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x28bbb9(0x1fb)]=0x4e20,exports[_0x28bbb9(0x2c1)]='ws://127.0.0.1:8000/universer-api/comb/connect',exports[_0x28bbb9(0x41b)]=_0x28bbb9(0x27f),exports['DEFAULT_WS_SESSION_TICKET_URL']=_0x28bbb9(0x4ff),Object[_0x28bbb9(0x41f)](exports,'DataLoaderService',{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x507),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x28bbb9(0x41f)](exports,'FetchingMissState',{'enumerable':!0x0,'get':function(){return F;}}),exports[_0x28bbb9(0x356)]=_0x28bbb9(0x39b),exports['HEARTBEAT_TIMEOUT_KEY']=_0x28bbb9(0x269),exports[_0x28bbb9(0x474)]=at,exports[_0x28bbb9(0x555)]=Qe,exports[_0x28bbb9(0x452)]=Je,exports['ILocalCacheService']=C,exports['INetworkConditionService']=Ge,exports[_0x28bbb9(0x24a)]=T,exports[_0x28bbb9(0x3a2)]=0x3e8,exports[_0x28bbb9(0x332)]=_0x28bbb9(0x3a2),exports[_0x28bbb9(0x3b4)]=0x1d4c0,Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x4b0),{'enumerable':!0x0,'get':function(){return x;}}),Object[_0x28bbb9(0x41f)](exports,'MentionIoHttpService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x28bbb9(0x41f)](exports,'OfflineState',{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x267),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x50f),{'enumerable':!0x0,'get':function(){return A;}}),exports[_0x28bbb9(0x4be)]=_0x28bbb9(0x395),exports[_0x28bbb9(0x464)]='RETRY_CONNECTING_MAX_COUNT',exports[_0x28bbb9(0x54e)]=ve,Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x52d),{'enumerable':!0x0,'get':function(){return z;}}),Object['defineProperty'](exports,'SheetTransformSelectionsService',{'enumerable':!0x0,'get':function(){return w;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x29b),{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x4ed),{'enumerable':!0x0,'get':function(){return pt;}}),Object[_0x28bbb9(0x41f)](exports,_0x28bbb9(0x368),{'enumerable':!0x0,'get':function(){return k;}}),exports['UnitStatus']=Se,Object[_0x28bbb9(0x41f)](exports,'UniverCollaborationClientPlugin',{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x28bbb9(0x4a8)]=$e,exports[_0x28bbb9(0x304)]=Ke,exports['getLocalCacheKey']=be,exports[_0x28bbb9(0x1d9)]=qe;