@univerjs-pro/collaboration-client 0.5.0-alpha.0 → 0.5.0-beta.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 (84) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/en-US.js +1 -1
  3. package/lib/cjs/locale/fa-IR.js +1 -1
  4. package/lib/cjs/locale/ru-RU.js +1 -1
  5. package/lib/cjs/locale/vi-VN.js +1 -1
  6. package/lib/cjs/locale/zh-CN.js +1 -1
  7. package/lib/cjs/locale/zh-TW.js +1 -1
  8. package/lib/es/index.js +1 -1
  9. package/lib/es/locale/en-US.js +1 -1
  10. package/lib/es/locale/fa-IR.js +1 -1
  11. package/lib/es/locale/ru-RU.js +1 -1
  12. package/lib/es/locale/vi-VN.js +1 -1
  13. package/lib/es/locale/zh-CN.js +1 -1
  14. package/lib/es/locale/zh-TW.js +1 -1
  15. package/lib/types/config/config.d.ts +49 -0
  16. package/lib/types/controllers/collab-cursor/__tests__/doc-collab-cursor.controller.spec.d.ts +23 -0
  17. package/lib/types/controllers/collab-cursor/__tests__/serialize-text-ranges.spec.d.ts +1 -0
  18. package/lib/types/controllers/collab-cursor/__tests__/sheet-collab-cursor.controller.spec.d.ts +1 -0
  19. package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +22 -0
  20. package/lib/types/controllers/collab-cursor/doc-collab-cursor-entity.d.ts +38 -0
  21. package/lib/types/controllers/collab-cursor/doc-collab-cursor-render.controller.d.ts +24 -0
  22. package/lib/types/controllers/collab-cursor/serialize-text-ranges.d.ts +3 -0
  23. package/lib/types/controllers/collab-cursor/sheet-collab-cursor-entity.d.ts +39 -0
  24. package/lib/types/controllers/collab-cursor/sheet-collab-cursor-render.controller.d.ts +21 -0
  25. package/lib/types/controllers/collab-status/collab-status.controller.d.ts +18 -0
  26. package/lib/types/controllers/collaboration/__tests__/collaboration.controller.spec.d.ts +4 -0
  27. package/lib/types/controllers/collaboration/__tests__/mock-text-selection-render-manager.service.d.ts +0 -0
  28. package/lib/types/controllers/collaboration/__tests__/mocks.d.ts +58 -0
  29. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +91 -0
  30. package/lib/types/controllers/collaboration/collaboration-state.d.ts +303 -0
  31. package/lib/types/controllers/collaboration/collaboration.controller.d.ts +24 -0
  32. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +18 -0
  33. package/lib/types/controllers/collaboration/utils/empty.d.ts +2 -0
  34. package/lib/types/controllers/config.schema.d.ts +33 -0
  35. package/lib/types/controllers/data-loader/__tests__/data-loader.controller.spec.d.ts +1 -0
  36. package/lib/types/controllers/data-loader/data-loader.controller.d.ts +22 -0
  37. package/lib/types/controllers/file-name/file-name.controller.d.ts +12 -0
  38. package/lib/types/controllers/telemetry.d.ts +11 -0
  39. package/lib/types/index.d.ts +35 -890
  40. package/lib/types/locale/en-US.d.ts +3 -0
  41. package/lib/types/locale/fa-IR.d.ts +3 -0
  42. package/lib/types/locale/ru-RU.d.ts +3 -0
  43. package/lib/types/locale/vi-VN.d.ts +3 -0
  44. package/lib/types/locale/zh-CN.d.ts +39 -0
  45. package/lib/types/locale/zh-TW.d.ts +3 -0
  46. package/lib/types/models/cursor.d.ts +30 -0
  47. package/lib/types/plugin.d.ts +18 -0
  48. package/lib/types/services/auth-server/auth-server.service.d.ts +10 -0
  49. package/lib/types/services/auth-server/authz-io-http.service.d.ts +30 -0
  50. package/lib/types/services/auth-server/domain-request.service.d.ts +6 -0
  51. package/lib/types/services/auth-server/util.d.ts +1 -0
  52. package/lib/types/services/collaboration-session/collaboration-session.d.ts +59 -0
  53. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +75 -0
  54. package/lib/types/services/color-assign/color-assign.service.d.ts +10 -0
  55. package/lib/types/services/comment/comment.service.d.ts +6 -0
  56. package/lib/types/services/image-remote/image-io.service.d.ts +34 -0
  57. package/lib/types/services/ime-cache-transform/doc-transform-ime-cache.service.d.ts +13 -0
  58. package/lib/types/services/local-cache/local-cache.service.d.ts +37 -0
  59. package/lib/types/services/member/member.service.d.ts +77 -0
  60. package/lib/types/services/permission/permission.service.d.ts +12 -0
  61. package/lib/types/services/range-selection/sheet-transform-selections.service.d.ts +13 -0
  62. package/lib/types/services/single-active-unit/single-active-unit.service.d.ts +39 -0
  63. package/lib/types/services/snapshot-server/snapshot-server.service.d.ts +21 -0
  64. package/lib/types/services/socket/collaboration-socket.service.d.ts +34 -0
  65. package/lib/types/services/socket/serialize.d.ts +3 -0
  66. package/lib/types/services/state-cache-transform/doc-transform-state-cache.service.d.ts +12 -0
  67. package/lib/types/services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service.d.ts +13 -0
  68. package/lib/types/services/text-selection/doc-transform-selections.service.d.ts +8 -0
  69. package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +19 -0
  70. package/lib/types/services/url/url.service.d.ts +12 -0
  71. package/lib/types/services/url/web-url.service.d.ts +10 -0
  72. package/lib/types/views/components/CollabStatus.d.ts +10 -0
  73. package/lib/types/views/components/CollabStatus.stories.d.ts +8 -0
  74. package/lib/types/views/shapes/doc-collab-cursor.d.ts +27 -0
  75. package/lib/types/views/shapes/sheet-collab-cursor.shape.d.ts +27 -0
  76. package/lib/types/views/shapes/text-bubble.shape.d.ts +19 -0
  77. package/lib/umd/index.js +1 -1
  78. package/lib/umd/locale/en-US.js +1 -1
  79. package/lib/umd/locale/fa-IR.js +1 -1
  80. package/lib/umd/locale/ru-RU.js +1 -1
  81. package/lib/umd/locale/vi-VN.js +1 -1
  82. package/lib/umd/locale/zh-CN.js +1 -1
  83. package/lib/umd/locale/zh-TW.js +1 -1
  84. package/package.json +23 -24
@@ -1 +1 @@
1
- function _0xcc84(){const _0x19c2b7=['895380eaRIXV','Synced','699MYpVWf','3946wMKqQT','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','Collaboration\x20Conflict','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','Edit\x20conflicts','Syncing...','Syncing\x20server\x20data...','Local\x20file','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','12647590fiwtrL','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','325193MLqRpR','6770428xoprKg','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','1138959gLvgHI','5gmGDMO','1886260dSifjM','56ROJAHp','Click\x20to\x20Reconnect'];_0xcc84=function(){return _0x19c2b7;};return _0xcc84();}const _0x111aa9=_0x4039;(function(_0x203a45,_0x1d278a){const _0x539105=_0x4039,_0x3aecf4=_0x203a45();while(!![]){try{const _0x2b02c4=parseInt(_0x539105(0x93))/0x1+parseInt(_0x539105(0x9e))/0x2*(-parseInt(_0x539105(0x9d))/0x3)+parseInt(_0x539105(0x98))/0x4*(-parseInt(_0x539105(0x97))/0x5)+-parseInt(_0x539105(0x9b))/0x6+parseInt(_0x539105(0x94))/0x7+-parseInt(_0x539105(0x99))/0x8*(parseInt(_0x539105(0x96))/0x9)+parseInt(_0x539105(0x90))/0xa;if(_0x2b02c4===_0x1d278a)break;else _0x3aecf4['push'](_0x3aecf4['shift']());}catch(_0x3d37f3){_0x3aecf4['push'](_0x3aecf4['shift']());}}}(_0xcc84,0x903cb));function _0x4039(_0x9dffe7,_0x55a2ba){const _0xcc848b=_0xcc84();return _0x4039=function(_0x403957,_0x2ea62b){_0x403957=_0x403957-0x8b;let _0x5a44d9=_0xcc848b[_0x403957];return _0x5a44d9;},_0x4039(_0x9dffe7,_0x55a2ba);}const e={'collab-client':{'tooltip':{'reconnect':_0x111aa9(0x9a)}},'collabStatus':{'fetchMiss':_0x111aa9(0x8d),'conflict':_0x111aa9(0x8b),'notCollab':_0x111aa9(0x8e),'synced':_0x111aa9(0x9c),'syncing':_0x111aa9(0x8c),'offline':'Offline,\x20edits\x20would\x20be\x20save\x20on\x20local'},'session':{'connection-failed':'Connection\x20failed,\x20please\x20check\x20your\x20network.','will-retry':'Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','room-full':_0x111aa9(0x91),'collaboration-timeout':'The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.'},'conflict':{'title':_0x111aa9(0xa0),'content':_0x111aa9(0x95)},'permission':{'title':'Authentication\x20Error','content':_0x111aa9(0xa1)},'collaboration':{'single-unit':{'warning':_0x111aa9(0x8f)},'closeRoom':_0x111aa9(0x9f)},'auth':{'needGotoLoginAlert':_0x111aa9(0x92)}};export{e as default};
1
+ function _0x416a(){const _0x4e4a95=['You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','207dVdHpg','7523iBAawc','6575789gnGBnc','10VwLFjO','Local\x20file','6YlzwJS','1317365ocoLzB','Connection\x20failed,\x20please\x20check\x20your\x20network.','Authentication\x20Error','186320kywaRq','Syncing...','Synced','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','6062550YpwUXQ','69ftWimg','1796NlNIKx','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','Click\x20to\x20Reconnect','15524976NlPuYr','Edit\x20conflicts','Collaboration\x20Conflict','5FVicCg','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.'];_0x416a=function(){return _0x4e4a95;};return _0x416a();}const _0x3e0381=_0x5c03;function _0x5c03(_0x4e8e0d,_0x3d995a){const _0x416a61=_0x416a();return _0x5c03=function(_0x5c03e6,_0x1f3a8b){_0x5c03e6=_0x5c03e6-0x145;let _0x2fc95e=_0x416a61[_0x5c03e6];return _0x2fc95e;},_0x5c03(_0x4e8e0d,_0x3d995a);}(function(_0x389043,_0x2418f1){const _0x17ce68=_0x5c03,_0x573b52=_0x389043();while(!![]){try{const _0x577ce0=parseInt(_0x17ce68(0x147))/0x1*(parseInt(_0x17ce68(0x14b))/0x2)+parseInt(_0x17ce68(0x154))/0x3*(-parseInt(_0x17ce68(0x155))/0x4)+-parseInt(_0x17ce68(0x15b))/0x5*(parseInt(_0x17ce68(0x153))/0x6)+parseInt(_0x17ce68(0x14c))/0x7+-parseInt(_0x17ce68(0x14f))/0x8*(parseInt(_0x17ce68(0x146))/0x9)+parseInt(_0x17ce68(0x149))/0xa*(parseInt(_0x17ce68(0x148))/0xb)+parseInt(_0x17ce68(0x158))/0xc;if(_0x577ce0===_0x2418f1)break;else _0x573b52['push'](_0x573b52['shift']());}catch(_0x42b8c7){_0x573b52['push'](_0x573b52['shift']());}}}(_0x416a,0x85461));const e={'collab-client':{'tooltip':{'reconnect':_0x3e0381(0x157)}},'collabStatus':{'fetchMiss':'Syncing\x20server\x20data...','conflict':_0x3e0381(0x159),'notCollab':_0x3e0381(0x14a),'synced':_0x3e0381(0x151),'syncing':_0x3e0381(0x150),'offline':_0x3e0381(0x145)},'session':{'connection-failed':_0x3e0381(0x14d),'will-retry':'Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','room-full':'Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','collaboration-timeout':_0x3e0381(0x152)},'conflict':{'title':_0x3e0381(0x15a),'content':_0x3e0381(0x156)},'permission':{'title':_0x3e0381(0x14e),'content':_0x3e0381(0x15c)},'collaboration':{'single-unit':{'warning':_0x3e0381(0x15d)},'closeRoom':'Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.'},'auth':{'needGotoLoginAlert':'Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.'}};export{e as default};
@@ -1 +1 @@
1
- const _0x2579e1=_0xc956;(function(_0x26d57d,_0x5255ab){const _0x4857b0=_0xc956,_0x31181a=_0x26d57d();while(!![]){try{const _0x39e987=-parseInt(_0x4857b0(0xb8))/0x1+parseInt(_0x4857b0(0xbf))/0x2+-parseInt(_0x4857b0(0xbd))/0x3*(parseInt(_0x4857b0(0xba))/0x4)+parseInt(_0x4857b0(0xb4))/0x5*(-parseInt(_0x4857b0(0xbe))/0x6)+-parseInt(_0x4857b0(0xc0))/0x7+-parseInt(_0x4857b0(0xbc))/0x8*(-parseInt(_0x4857b0(0xb0))/0x9)+parseInt(_0x4857b0(0xc2))/0xa*(parseInt(_0x4857b0(0xc1))/0xb);if(_0x39e987===_0x5255ab)break;else _0x31181a['push'](_0x31181a['shift']());}catch(_0x53a9bd){_0x31181a['push'](_0x31181a['shift']());}}}(_0x4d13,0xed0b7));function _0xc956(_0x47c5ce,_0x295cde){const _0x4d136b=_0x4d13();return _0xc956=function(_0xc9566a,_0x1c1d77){_0xc9566a=_0xc9566a-0xb0;let _0x14c5a7=_0x4d136b[_0xc9566a];return _0x14c5a7;},_0xc956(_0x47c5ce,_0x295cde);}function _0x4d13(){const _0x5044e9=['965742vCyXBu','3051768mfIdZj','10501414knKbYz','12804piMhkI','36710psFtad','سرور\x20به\x20درخواست\x20همکاری\x20شما\x20پاسخ\x20نمی\x20دهد.\x20ویرایش\x20های\x20شما\x20در\x20محلی\x20ذخیره\x20می\x20شوند.','22041ESByoq','همگام\x20سازی','امتیازات\x20ویرایش\x20به\x20دلیل\x20بسته\x20شدن\x20اتاق\x20همکاری\x20لغو\x20شد.','تداخل\x20ویرایش','50qdaCGd','اتصال\x20ناموفق\x20بود،\x20لطفا\x20شبکه\x20خود\x20را\x20بررسی\x20کنید.','اتاق\x20همکاری\x20پر\x20است.\x20شما\x20ویرایش\x20های\x20خود\x20را\x20در\x20محلی\x20ذخیره\x20خواهید\x20کرد.','پرونده\x20محلی','1705418inejLH','یک\x20تداخل\x20بین\x20نسخه\x20محلی\x20شما\x20و\x20نسخه\x20در\x20سرور\x20وجود\x20دارد.\x20لطفاً\x20ویرایش\x20های\x20محلی\x20خود\x20را\x20ذخیره\x20کنید،\x20زیرا\x20آنها\x20پس\x20از\x20بازیابی\x20صفحه\x20از\x20بین\x20خواهند\x20رفت.','8MDSlzC','در\x20حال\x20همگام\x20سازی\x20داده\x20های\x20سرور...','1240hpgUwX','588597ZksNZk'];_0x4d13=function(){return _0x5044e9;};return _0x4d13();}const o={'collab-client':{'tooltip':{'reconnect':'برای\x20اتصال\x20مجدد\x20کلیک\x20کنید'}},'collabStatus':{'fetchMiss':_0x2579e1(0xbb),'conflict':_0x2579e1(0xb3),'notCollab':_0x2579e1(0xb7),'synced':_0x2579e1(0xb1),'syncing':'در\x20حال\x20همگام\x20سازی...','offline':'آفلاین،\x20ویرایش\x20ها\x20در\x20محلی\x20ذخیره\x20می\x20شوند'},'session':{'connection-failed':_0x2579e1(0xb5),'will-retry':'اتصال\x20ناموفق\x20بود،\x20ما\x20بعداً\x20دوباره\x20تلاش\x20می\x20کنیم.','room-full':_0x2579e1(0xb6),'collaboration-timeout':_0x2579e1(0xc3)},'conflict':{'title':'تداخل\x20همکاری','content':_0x2579e1(0xb9)},'permission':{'title':'خطای\x20اعتبارسنجی','content':'اعمال\x20شما\x20با\x20مجوزهای\x20سرور\x20تداخل\x20دارد.\x20لطفاً\x20ویرایش\x20های\x20محلی\x20خود\x20را\x20در\x20جای\x20دیگر\x20ذخیره\x20کنید\x20زیرا\x20پس\x20از\x20تازه\x20سازی\x20صفحه\x20از\x20بین\x20خواهند\x20رفت.'},'collaboration':{'single-unit':{'warning':'شما\x20همان\x20پرونده\x20را\x20در\x20یک\x20تب\x20دیگر\x20باز\x20کرده\x20اید.\x20در\x20صورت\x20عدم\x20وجود\x20داده،\x20نمی\x20توانید\x20در\x20این\x20تب\x20ویرایش\x20کنید.'},'closeRoom':_0x2579e1(0xb2)},'auth':{'needGotoLoginAlert':'ورود\x20شما\x20منقضی\x20شده\x20است،\x20برای\x20ورود\x20مجدد\x20کلیک\x20کنید،\x20برای\x20ذخیره\x20ویرایش\x20های\x20محلی\x20خود\x20کلیک\x20کنید.'}};export{o as default};
1
+ const _0x5b3eeb=_0x4fe5;(function(_0x3c18c5,_0x311a6f){const _0x5b1a91=_0x4fe5,_0x93babf=_0x3c18c5();while(!![]){try{const _0x1776bd=parseInt(_0x5b1a91(0x14b))/0x1+parseInt(_0x5b1a91(0x146))/0x2+-parseInt(_0x5b1a91(0x14a))/0x3+-parseInt(_0x5b1a91(0x152))/0x4+parseInt(_0x5b1a91(0x158))/0x5*(-parseInt(_0x5b1a91(0x143))/0x6)+-parseInt(_0x5b1a91(0x141))/0x7*(parseInt(_0x5b1a91(0x14e))/0x8)+-parseInt(_0x5b1a91(0x144))/0x9*(-parseInt(_0x5b1a91(0x156))/0xa);if(_0x1776bd===_0x311a6f)break;else _0x93babf['push'](_0x93babf['shift']());}catch(_0x43b047){_0x93babf['push'](_0x93babf['shift']());}}}(_0xcccd,0x202d2));function _0xcccd(){const _0x45192b=['خطای\x20اعتبارسنجی','پرونده\x20محلی','8eNhGVK','تداخل\x20همکاری','تداخل\x20ویرایش','یک\x20تداخل\x20بین\x20نسخه\x20محلی\x20شما\x20و\x20نسخه\x20در\x20سرور\x20وجود\x20دارد.\x20لطفاً\x20ویرایش\x20های\x20محلی\x20خود\x20را\x20ذخیره\x20کنید،\x20زیرا\x20آنها\x20پس\x20از\x20بازیابی\x20صفحه\x20از\x20بین\x20خواهند\x20رفت.','354428UejCvC','اتصال\x20ناموفق\x20بود،\x20لطفا\x20شبکه\x20خود\x20را\x20بررسی\x20کنید.','ورود\x20شما\x20منقضی\x20شده\x20است،\x20برای\x20ورود\x20مجدد\x20کلیک\x20کنید،\x20برای\x20ذخیره\x20ویرایش\x20های\x20محلی\x20خود\x20کلیک\x20کنید.','شما\x20همان\x20پرونده\x20را\x20در\x20یک\x20تب\x20دیگر\x20باز\x20کرده\x20اید.\x20در\x20صورت\x20عدم\x20وجود\x20داده،\x20نمی\x20توانید\x20در\x20این\x20تب\x20ویرایش\x20کنید.','77930WJKlVV','امتیازات\x20ویرایش\x20به\x20دلیل\x20بسته\x20شدن\x20اتاق\x20همکاری\x20لغو\x20شد.','230495yxDAsw','سرور\x20به\x20درخواست\x20همکاری\x20شما\x20پاسخ\x20نمی\x20دهد.\x20ویرایش\x20های\x20شما\x20در\x20محلی\x20ذخیره\x20می\x20شوند.','471205wKfpGl','در\x20حال\x20همگام\x20سازی\x20داده\x20های\x20سرور...','6CJbJNJ','297vLuEdT','اتصال\x20ناموفق\x20بود،\x20ما\x20بعداً\x20دوباره\x20تلاش\x20می\x20کنیم.','456294MkIrQY','همگام\x20سازی','اعمال\x20شما\x20با\x20مجوزهای\x20سرور\x20تداخل\x20دارد.\x20لطفاً\x20ویرایش\x20های\x20محلی\x20خود\x20را\x20در\x20جای\x20دیگر\x20ذخیره\x20کنید\x20زیرا\x20پس\x20از\x20تازه\x20سازی\x20صفحه\x20از\x20بین\x20خواهند\x20رفت.','اتاق\x20همکاری\x20پر\x20است.\x20شما\x20ویرایش\x20های\x20خود\x20را\x20در\x20محلی\x20ذخیره\x20خواهید\x20کرد.','611277lgBVAP','52258DtzOqF'];_0xcccd=function(){return _0x45192b;};return _0xcccd();}function _0x4fe5(_0x244fac,_0x507f1d){const _0xcccd3b=_0xcccd();return _0x4fe5=function(_0x4fe595,_0x7e1ab4){_0x4fe595=_0x4fe595-0x140;let _0x3812d1=_0xcccd3b[_0x4fe595];return _0x3812d1;},_0x4fe5(_0x244fac,_0x507f1d);}const o={'collab-client':{'tooltip':{'reconnect':'برای\x20اتصال\x20مجدد\x20کلیک\x20کنید'}},'collabStatus':{'fetchMiss':_0x5b3eeb(0x142),'conflict':_0x5b3eeb(0x150),'notCollab':_0x5b3eeb(0x14d),'synced':_0x5b3eeb(0x147),'syncing':'در\x20حال\x20همگام\x20سازی...','offline':'آفلاین،\x20ویرایش\x20ها\x20در\x20محلی\x20ذخیره\x20می\x20شوند'},'session':{'connection-failed':_0x5b3eeb(0x153),'will-retry':_0x5b3eeb(0x145),'room-full':_0x5b3eeb(0x149),'collaboration-timeout':_0x5b3eeb(0x140)},'conflict':{'title':_0x5b3eeb(0x14f),'content':_0x5b3eeb(0x151)},'permission':{'title':_0x5b3eeb(0x14c),'content':_0x5b3eeb(0x148)},'collaboration':{'single-unit':{'warning':_0x5b3eeb(0x155)},'closeRoom':_0x5b3eeb(0x157)},'auth':{'needGotoLoginAlert':_0x5b3eeb(0x154)}};export{o as default};
@@ -1 +1 @@
1
- function _0x261e(_0x4d9d63,_0xa8eb0e){const _0x39bbf7=_0x39bb();return _0x261e=function(_0x261e09,_0x5477b1){_0x261e09=_0x261e09-0x116;let _0xc28f53=_0x39bbf7[_0x261e09];return _0xc28f53;},_0x261e(_0x4d9d63,_0xa8eb0e);}const _0x434c2a=_0x261e;(function(_0x1e5948,_0x3225){const _0x48c694=_0x261e,_0x16038c=_0x1e5948();while(!![]){try{const _0xdd9060=parseInt(_0x48c694(0x117))/0x1*(parseInt(_0x48c694(0x122))/0x2)+-parseInt(_0x48c694(0x11a))/0x3*(-parseInt(_0x48c694(0x123))/0x4)+-parseInt(_0x48c694(0x119))/0x5+parseInt(_0x48c694(0x127))/0x6+-parseInt(_0x48c694(0x128))/0x7+-parseInt(_0x48c694(0x126))/0x8*(parseInt(_0x48c694(0x125))/0x9)+-parseInt(_0x48c694(0x120))/0xa*(-parseInt(_0x48c694(0x124))/0xb);if(_0xdd9060===_0x3225)break;else _0x16038c['push'](_0x16038c['shift']());}catch(_0x57ff3b){_0x16038c['push'](_0x16038c['shift']());}}}(_0x39bb,0xb3272));const e={'collab-client':{'tooltip':{'reconnect':_0x434c2a(0x11e)}},'collabStatus':{'fetchMiss':'Syncing\x20server\x20data...','conflict':'Edit\x20conflicts','notCollab':_0x434c2a(0x118),'synced':'Synced','syncing':_0x434c2a(0x11c),'offline':_0x434c2a(0x11b)},'session':{'connection-failed':'Connection\x20failed,\x20please\x20check\x20your\x20network.','will-retry':_0x434c2a(0x11d),'room-full':'Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','collaboration-timeout':_0x434c2a(0x116)},'conflict':{'title':'Collaboration\x20Conflict','content':_0x434c2a(0x121)},'permission':{'title':_0x434c2a(0x11f),'content':'Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.'},'collaboration':{'single-unit':{'warning':'You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.'},'closeRoom':'Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.'},'auth':{'needGotoLoginAlert':'Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.'}},o=e;function _0x39bb(){const _0x2db324=['1626615AsyehB','16CGvwDl','7906512OGCOPl','6941095tOGRzD','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','324nMTeHI','Local\x20file','6637415cYZeeJ','17826fbHXOH','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','Syncing...','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','Click\x20to\x20Reconnect','Authentication\x20Error','60380AlcsOG','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','6022NLiJUG','588OpxpRG','451gJkzeq'];_0x39bb=function(){return _0x2db324;};return _0x39bb();}export{o as default};
1
+ const _0x556dae=_0x16ed;function _0x2e9a(){const _0x4791d1=['Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','Connection\x20failed,\x20please\x20check\x20your\x20network.','Synced','1894828lXsRZj','Syncing\x20server\x20data...','45KGqGxR','1103895haviVq','696440hXFEeJ','6UZTKVG','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','5692870ADYCXQ','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','20457300QNhhEQ','Syncing...','Click\x20to\x20Reconnect','1520744bprvJN','3VFquYt','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','Local\x20file','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Collaboration\x20Conflict','1666294kqSvjc','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.'];_0x2e9a=function(){return _0x4791d1;};return _0x2e9a();}(function(_0x48a122,_0x5282d4){const _0x56c3c5=_0x16ed,_0x805286=_0x48a122();while(!![]){try{const _0xc20b99=parseInt(_0x56c3c5(0x1ab))/0x1+-parseInt(_0x56c3c5(0x1a8))/0x2+parseInt(_0x56c3c5(0x19e))/0x3*(parseInt(_0x56c3c5(0x1ac))/0x4)+-parseInt(_0x56c3c5(0x1af))/0x5*(-parseInt(_0x56c3c5(0x1ad))/0x6)+parseInt(_0x56c3c5(0x1a3))/0x7+parseInt(_0x56c3c5(0x19d))/0x8*(parseInt(_0x56c3c5(0x1aa))/0x9)+-parseInt(_0x56c3c5(0x19a))/0xa;if(_0xc20b99===_0x5282d4)break;else _0x805286['push'](_0x805286['shift']());}catch(_0x3382d4){_0x805286['push'](_0x805286['shift']());}}}(_0x2e9a,0x95666));function _0x16ed(_0x4265f4,_0x89cb9c){const _0x2e9a13=_0x2e9a();return _0x16ed=function(_0x16ed80,_0x206a04){_0x16ed80=_0x16ed80-0x19a;let _0x41ecab=_0x2e9a13[_0x16ed80];return _0x41ecab;},_0x16ed(_0x4265f4,_0x89cb9c);}const e={'collab-client':{'tooltip':{'reconnect':_0x556dae(0x19c)}},'collabStatus':{'fetchMiss':_0x556dae(0x1a9),'conflict':'Edit\x20conflicts','notCollab':_0x556dae(0x1a0),'synced':_0x556dae(0x1a7),'syncing':_0x556dae(0x19b),'offline':'Offline,\x20edits\x20would\x20be\x20save\x20on\x20local'},'session':{'connection-failed':_0x556dae(0x1a6),'will-retry':_0x556dae(0x19f),'room-full':_0x556dae(0x1a1),'collaboration-timeout':_0x556dae(0x1a4)},'conflict':{'title':_0x556dae(0x1a2),'content':'There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.'},'permission':{'title':'Authentication\x20Error','content':_0x556dae(0x1ae)},'collaboration':{'single-unit':{'warning':_0x556dae(0x1b0)},'closeRoom':_0x556dae(0x1b1)},'auth':{'needGotoLoginAlert':_0x556dae(0x1a5)}},o=e;export{o as default};
@@ -1 +1 @@
1
- const _0x3241a2=_0x5e68;(function(_0x5f3ce6,_0x2f743e){const _0x51f994=_0x5e68,_0x1b7022=_0x5f3ce6();while(!![]){try{const _0x421d9b=parseInt(_0x51f994(0xb1))/0x1*(-parseInt(_0x51f994(0xaa))/0x2)+-parseInt(_0x51f994(0xa8))/0x3*(parseInt(_0x51f994(0xaf))/0x4)+-parseInt(_0x51f994(0xb5))/0x5*(-parseInt(_0x51f994(0xb0))/0x6)+-parseInt(_0x51f994(0xac))/0x7*(-parseInt(_0x51f994(0xa9))/0x8)+parseInt(_0x51f994(0xb8))/0x9*(parseInt(_0x51f994(0xb7))/0xa)+-parseInt(_0x51f994(0xa7))/0xb+parseInt(_0x51f994(0xb4))/0xc*(-parseInt(_0x51f994(0xb9))/0xd);if(_0x421d9b===_0x2f743e)break;else _0x1b7022['push'](_0x1b7022['shift']());}catch(_0x10b324){_0x1b7022['push'](_0x1b7022['shift']());}}}(_0x3717,0x8c5af));const e={'collab-client':{'tooltip':{'reconnect':'Click\x20to\x20Reconnect'}},'collabStatus':{'fetchMiss':_0x3241a2(0xb2),'conflict':_0x3241a2(0xad),'notCollab':'Local\x20file','synced':'Synced','syncing':_0x3241a2(0xa6),'offline':'Offline,\x20edits\x20would\x20be\x20save\x20on\x20local'},'session':{'connection-failed':_0x3241a2(0xb3),'will-retry':_0x3241a2(0xab),'room-full':_0x3241a2(0xbb),'collaboration-timeout':_0x3241a2(0xa5)},'conflict':{'title':_0x3241a2(0xba),'content':'There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.'},'permission':{'title':'Authentication\x20Error','content':'Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.'},'collaboration':{'single-unit':{'warning':_0x3241a2(0xae)},'closeRoom':_0x3241a2(0xb6)},'auth':{'needGotoLoginAlert':_0x3241a2(0xa4)}},o=e;export{o as default};function _0x5e68(_0x32f88e,_0x4afb42){const _0x37174d=_0x3717();return _0x5e68=function(_0x5e68e2,_0x41af0c){_0x5e68e2=_0x5e68e2-0xa4;let _0x5a5b67=_0x37174d[_0x5e68e2];return _0x5a5b67;},_0x5e68(_0x32f88e,_0x4afb42);}function _0x3717(){const _0x3b7114=['569569vcZzCF','23511iHslFO','136jMiWqH','22NBbzTI','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','224399ZvYaco','Edit\x20conflicts','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','204PDgYHV','667950eCYqYq','18967kQjbFf','Syncing\x20server\x20data...','Connection\x20failed,\x20please\x20check\x20your\x20network.','846096eGdgfl','15QwHNDC','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','50OSPzKt','1529298PJOOFp','91RauKtF','Collaboration\x20Conflict','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','Syncing...'];_0x3717=function(){return _0x3b7114;};return _0x3717();}
1
+ const _0x4385d3=_0x4d0f;function _0x5226(){const _0xae0eba=['Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','2168koQAXU','10pHdYKg','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','10rZPsjU','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','4092750ljbwxA','7135212RSsHdS','279466NShXBU','3189435SEEDjH','3358852YGseHY','Syncing...','22127giGlal','Collaboration\x20Conflict','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','Authentication\x20Error','12262716RhyGdK'];_0x5226=function(){return _0xae0eba;};return _0x5226();}(function(_0x360270,_0x3df72d){const _0x446b70=_0x4d0f,_0x491612=_0x360270();while(!![]){try{const _0x1c3d17=parseInt(_0x446b70(0x129))/0x1*(parseInt(_0x446b70(0x12d))/0x2)+-parseInt(_0x446b70(0x12b))/0x3+parseInt(_0x446b70(0x12f))/0x4+-parseInt(_0x446b70(0x12e))/0x5+parseInt(_0x446b70(0x12c))/0x6+-parseInt(_0x446b70(0x131))/0x7*(-parseInt(_0x446b70(0x123))/0x8)+-parseInt(_0x446b70(0x135))/0x9*(parseInt(_0x446b70(0x124))/0xa);if(_0x1c3d17===_0x3df72d)break;else _0x491612['push'](_0x491612['shift']());}catch(_0x2c55da){_0x491612['push'](_0x491612['shift']());}}}(_0x5226,0xe02c7));function _0x4d0f(_0x1afe03,_0xcb9064){const _0x52266d=_0x5226();return _0x4d0f=function(_0x4d0ff4,_0x2adee9){_0x4d0ff4=_0x4d0ff4-0x122;let _0x436f73=_0x52266d[_0x4d0ff4];return _0x436f73;},_0x4d0f(_0x1afe03,_0xcb9064);}const e={'collab-client':{'tooltip':{'reconnect':'Click\x20to\x20Reconnect'}},'collabStatus':{'fetchMiss':'Syncing\x20server\x20data...','conflict':'Edit\x20conflicts','notCollab':'Local\x20file','synced':'Synced','syncing':_0x4385d3(0x130),'offline':_0x4385d3(0x133)},'session':{'connection-failed':'Connection\x20failed,\x20please\x20check\x20your\x20network.','will-retry':_0x4385d3(0x127),'room-full':_0x4385d3(0x122),'collaboration-timeout':_0x4385d3(0x126)},'conflict':{'title':_0x4385d3(0x132),'content':_0x4385d3(0x125)},'permission':{'title':_0x4385d3(0x134),'content':_0x4385d3(0x128)},'collaboration':{'single-unit':{'warning':'You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.'},'closeRoom':'Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.'},'auth':{'needGotoLoginAlert':_0x4385d3(0x12a)}},o=e;export{o as default};
@@ -1 +1 @@
1
- const _0x296d3b=_0x7fc9;(function(_0x334ae4,_0x59946f){const _0x25c7b5=_0x7fc9,_0x30a272=_0x334ae4();while(!![]){try{const _0x2ee0e5=-parseInt(_0x25c7b5(0x1ea))/0x1*(-parseInt(_0x25c7b5(0x1fa))/0x2)+-parseInt(_0x25c7b5(0x1f3))/0x3*(parseInt(_0x25c7b5(0x1f0))/0x4)+-parseInt(_0x25c7b5(0x1f7))/0x5+parseInt(_0x25c7b5(0x1ee))/0x6*(parseInt(_0x25c7b5(0x1fd))/0x7)+-parseInt(_0x25c7b5(0x1ff))/0x8+-parseInt(_0x25c7b5(0x1e8))/0x9*(-parseInt(_0x25c7b5(0x201))/0xa)+parseInt(_0x25c7b5(0x1f9))/0xb*(parseInt(_0x25c7b5(0x1f5))/0xc);if(_0x2ee0e5===_0x59946f)break;else _0x30a272['push'](_0x30a272['shift']());}catch(_0x31861f){_0x30a272['push'](_0x30a272['shift']());}}}(_0x93ac,0x389e7));const o={'collab-client':{'tooltip':{'reconnect':_0x296d3b(0x1eb)}},'collabStatus':{'fetchMiss':_0x296d3b(0x1f2),'conflict':_0x296d3b(0x1f8),'notCollab':'本地文件','synced':_0x296d3b(0x1e9),'syncing':_0x296d3b(0x1f6),'offline':_0x296d3b(0x1ef)},'session':{'connection-failed':_0x296d3b(0x1ed),'will-retry':_0x296d3b(0x200),'room-full':'协同房间已满,你的编辑将在本地缓存','collaboration-timeout':'服务器未响应,你的编辑将在本地缓存'},'conflict':{'title':_0x296d3b(0x1ec),'content':_0x296d3b(0x1f4)},'permission':{'title':_0x296d3b(0x1fb),'content':_0x296d3b(0x1fe)},'collaboration':{'single-unit':{'warning':_0x296d3b(0x1f1)},'closeRoom':_0x296d3b(0x1fc)},'auth':{'needGotoLoginAlert':'你的登录已过期,点击确认重新登陆,点击取消去保存你的本地编辑。'}};function _0x7fc9(_0x494256,_0x52782c){const _0x93ac07=_0x93ac();return _0x7fc9=function(_0x7fc9fa,_0x136977){_0x7fc9fa=_0x7fc9fa-0x1e8;let _0x1e7458=_0x93ac07[_0x7fc9fa];return _0x1e7458;},_0x7fc9(_0x494256,_0x52782c);}function _0x93ac(){const _0x9675e6=['连接失败,将在一会儿之后重试连接','410RsNWMZ','26010jDIejn','已同步','1qLBYTt','点击重新连接','协同冲突','连接失败,请检查你的网络','1548MIvUVU','已离线,编辑将在本地缓存','1801292PDABOM','你在另一个标签页打开了同一个文件。为了避免数据丢失,这个标签页的编辑行为将会被限制。','正在拉取服务端数据...','3uDNDWH','你的本地文档和服务器的文档存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','11052kIjKlG','保存中...','431005wOLmLX','编辑冲突','4356zUkxVR','765938drStxF','权限错误','由于协同房间被关闭,编辑权限被收回。','7070upDumy','你的操作和服务器的权限存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','2866560KAmxrM'];_0x93ac=function(){return _0x9675e6;};return _0x93ac();}export{o as default};
1
+ function _0x3928(){const _0x59ae55=['点击重新连接','权限错误','协同冲突','4830036qyjnDr','连接失败,将在一会儿之后重试连接','本地文件','638870WbDyjB','已离线,编辑将在本地缓存','3934930SsUzHd','22rWzFPC','172064luhJuQ','189QyZTIz','你的操作和服务器的权限存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','保存中...','1TIjyZO','1040478RJEZmu','你的登录已过期,点击确认重新登陆,点击取消去保存你的本地编辑。','协同房间已满,你的编辑将在本地缓存','2337546kfRqDA','服务器未响应,你的编辑将在本地缓存','你的本地文档和服务器的文档存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','7PagMGl','31905pmtDrb','108tQqukz'];_0x3928=function(){return _0x59ae55;};return _0x3928();}function _0x2925(_0x22e405,_0x327e02){const _0x392872=_0x3928();return _0x2925=function(_0x292501,_0x4aecd8){_0x292501=_0x292501-0x74;let _0x4a2063=_0x392872[_0x292501];return _0x4a2063;},_0x2925(_0x22e405,_0x327e02);}const _0x250417=_0x2925;(function(_0x3606f6,_0x37ab41){const _0xfcbc5d=_0x2925,_0x20739a=_0x3606f6();while(!![]){try{const _0x24e863=-parseInt(_0xfcbc5d(0x79))/0x1*(-parseInt(_0xfcbc5d(0x89))/0x2)+-parseInt(_0xfcbc5d(0x7a))/0x3+parseInt(_0xfcbc5d(0x82))/0x4*(-parseInt(_0xfcbc5d(0x81))/0x5)+parseInt(_0xfcbc5d(0x7d))/0x6*(parseInt(_0xfcbc5d(0x80))/0x7)+-parseInt(_0xfcbc5d(0x75))/0x8*(-parseInt(_0xfcbc5d(0x76))/0x9)+parseInt(_0xfcbc5d(0x8b))/0xa+parseInt(_0xfcbc5d(0x74))/0xb*(-parseInt(_0xfcbc5d(0x86))/0xc);if(_0x24e863===_0x37ab41)break;else _0x20739a['push'](_0x20739a['shift']());}catch(_0x4704f5){_0x20739a['push'](_0x20739a['shift']());}}}(_0x3928,0x382b4));const o={'collab-client':{'tooltip':{'reconnect':_0x250417(0x83)}},'collabStatus':{'fetchMiss':'正在拉取服务端数据...','conflict':'编辑冲突','notCollab':_0x250417(0x88),'synced':'已同步','syncing':_0x250417(0x78),'offline':_0x250417(0x8a)},'session':{'connection-failed':'连接失败,请检查你的网络','will-retry':_0x250417(0x87),'room-full':_0x250417(0x7c),'collaboration-timeout':_0x250417(0x7e)},'conflict':{'title':_0x250417(0x85),'content':_0x250417(0x7f)},'permission':{'title':_0x250417(0x84),'content':_0x250417(0x77)},'collaboration':{'single-unit':{'warning':'你在另一个标签页打开了同一个文件。为了避免数据丢失,这个标签页的编辑行为将会被限制。'},'closeRoom':'由于协同房间被关闭,编辑权限被收回。'},'auth':{'needGotoLoginAlert':_0x250417(0x7b)}};export{o as default};
@@ -1 +1 @@
1
- function _0x4894(_0x42d850,_0x49b83f){const _0x588aac=_0x588a();return _0x4894=function(_0x4894f7,_0x1d2cb3){_0x4894f7=_0x4894f7-0x92;let _0x5a3cca=_0x588aac[_0x4894f7];return _0x5a3cca;},_0x4894(_0x42d850,_0x49b83f);}const _0xb94fc8=_0x4894;(function(_0x181fe8,_0x400dfe){const _0x22365f=_0x4894,_0x208e0f=_0x181fe8();while(!![]){try{const _0x59421f=parseInt(_0x22365f(0xa6))/0x1*(parseInt(_0x22365f(0x97))/0x2)+-parseInt(_0x22365f(0xa2))/0x3+parseInt(_0x22365f(0x9b))/0x4*(-parseInt(_0x22365f(0x96))/0x5)+parseInt(_0x22365f(0x92))/0x6*(-parseInt(_0x22365f(0xa5))/0x7)+-parseInt(_0x22365f(0x95))/0x8+-parseInt(_0x22365f(0x93))/0x9+parseInt(_0x22365f(0x99))/0xa;if(_0x59421f===_0x400dfe)break;else _0x208e0f['push'](_0x208e0f['shift']());}catch(_0x5bc5cd){_0x208e0f['push'](_0x208e0f['shift']());}}}(_0x588a,0xe9578));function _0x588a(){const _0x48e55d=['9944056ZlORfO','230kGsMKj','2GDqSXR','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','27943860pzEDnk','Syncing\x20server\x20data...','6204NBXqdp','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','Synced','Click\x20to\x20Reconnect','Syncing...','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Edit\x20conflicts','2386272pwKjTQ','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','13118ZUhyOd','1322377XvPpCq','Connection\x20failed,\x20please\x20check\x20your\x20network.','Authentication\x20Error','Local\x20file','3282sFgiuy','235260jElFtt','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.'];_0x588a=function(){return _0x48e55d;};return _0x588a();}const e={'collab-client':{'tooltip':{'reconnect':_0xb94fc8(0x9e)}},'collabStatus':{'fetchMiss':_0xb94fc8(0x9a),'conflict':_0xb94fc8(0xa1),'notCollab':_0xb94fc8(0xa9),'synced':_0xb94fc8(0x9d),'syncing':_0xb94fc8(0x9f),'offline':_0xb94fc8(0x98)},'session':{'connection-failed':_0xb94fc8(0xa7),'will-retry':_0xb94fc8(0xa3),'room-full':_0xb94fc8(0xa0),'collaboration-timeout':_0xb94fc8(0xa4)},'conflict':{'title':'Collaboration\x20Conflict','content':'There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.'},'permission':{'title':_0xb94fc8(0xa8),'content':'Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.'},'collaboration':{'single-unit':{'warning':_0xb94fc8(0x9c)},'closeRoom':'Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.'},'auth':{'needGotoLoginAlert':_0xb94fc8(0x94)}},o=e;export{o as default};
1
+ const _0xde1a2b=_0x146c;(function(_0x363ada,_0x50426c){const _0x571cab=_0x146c,_0x5bd4fe=_0x363ada();while(!![]){try{const _0x502f0c=parseInt(_0x571cab(0x1b5))/0x1+parseInt(_0x571cab(0x1a8))/0x2*(parseInt(_0x571cab(0x1b3))/0x3)+parseInt(_0x571cab(0x1ae))/0x4+-parseInt(_0x571cab(0x1a9))/0x5*(-parseInt(_0x571cab(0x1b2))/0x6)+-parseInt(_0x571cab(0x1a7))/0x7*(parseInt(_0x571cab(0x1be))/0x8)+parseInt(_0x571cab(0x1bb))/0x9*(-parseInt(_0x571cab(0x1b0))/0xa)+-parseInt(_0x571cab(0x1b1))/0xb;if(_0x502f0c===_0x50426c)break;else _0x5bd4fe['push'](_0x5bd4fe['shift']());}catch(_0x4257d7){_0x5bd4fe['push'](_0x5bd4fe['shift']());}}}(_0x4da9,0xda28b));const e={'collab-client':{'tooltip':{'reconnect':'Click\x20to\x20Reconnect'}},'collabStatus':{'fetchMiss':_0xde1a2b(0x1bd),'conflict':_0xde1a2b(0x1b6),'notCollab':_0xde1a2b(0x1af),'synced':_0xde1a2b(0x1b8),'syncing':'Syncing...','offline':_0xde1a2b(0x1ac)},'session':{'connection-failed':'Connection\x20failed,\x20please\x20check\x20your\x20network.','will-retry':_0xde1a2b(0x1ba),'room-full':_0xde1a2b(0x1bf),'collaboration-timeout':_0xde1a2b(0x1b7)},'conflict':{'title':_0xde1a2b(0x1b4),'content':'There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.'},'permission':{'title':_0xde1a2b(0x1b9),'content':_0xde1a2b(0x1aa)},'collaboration':{'single-unit':{'warning':_0xde1a2b(0x1ad)},'closeRoom':_0xde1a2b(0x1ab)},'auth':{'needGotoLoginAlert':_0xde1a2b(0x1bc)}},o=e;function _0x146c(_0x5ab067,_0x4080f0){const _0x4da95c=_0x4da9();return _0x146c=function(_0x146ca2,_0x428ea1){_0x146ca2=_0x146ca2-0x1a7;let _0x2a8428=_0x4da95c[_0x146ca2];return _0x2a8428;},_0x146c(_0x5ab067,_0x4080f0);}function _0x4da9(){const _0x2bde04=['Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','147tzRXSX','11498VuuUSX','7507105plABRa','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','5413908gaiuAh','Local\x20file','197510tekUIE','64922MhiSkJ','6ZmJWyC','138kugpGk','Collaboration\x20Conflict','216888noiinT','Edit\x20conflicts','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','Synced','Authentication\x20Error','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','810AYIkcH','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','Syncing\x20server\x20data...','251112CEbaOW'];_0x4da9=function(){return _0x2bde04;};return _0x4da9();}export{o as default};
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The config key to determined the URL provided by the snapshot server
3
+ * to load snapshot. The URL should not ends with a slash.
4
+ */
5
+ /** @deprecated Will be removed in the 0.2.19 release */
6
+ export declare const SNAPSHOT_SERVER_URL_KEY = "SNAPSHOT_SERVER_URL_KEY";
7
+ /**
8
+ * Default value for `SNAPSHOT_SERVER_URL_KEY`.
9
+ *
10
+ * Determined in the protocol file in `submodules/protocol/universer/v1/snapshot.proto`.
11
+ */
12
+ export declare const DEFAULT_SNAPSHOT_SERVER_URL = "/universer-api/snapshot";
13
+ /**
14
+ * @ignore
15
+ */
16
+ export declare const SNAPSHOT_URL_KEY = "SNAPSHOT_URL_KEY";
17
+ /**
18
+ * Determines how often should we send changesets.
19
+ */
20
+ /** @deprecated Will be removed in the 0.2.19 release */
21
+ export declare const SEND_CHANGESET_TIMEOUT_KEY = "SEND_CHANGESET_TIMEOUT";
22
+ export declare const DEFAULT_SEND_CHANGESET_TIMEOUT = 2000;
23
+ /** @deprecated Will be removed in the 0.2.19 release */
24
+ export declare const COLLAB_WEB_SOCKET_URL_KEY = "COLLAB_WEB_SOCKET_URL";
25
+ export declare const DEFAULT_COLLAB_WEB_SOCKET_URL = "ws://127.0.0.1:8000/universer-api/comb/connect";
26
+ export declare const DEFAULT_WS_SESSION_TICKET_URL = "/universer-api/user/session-ticket";
27
+ /** The heartbeat interval in milliseconds. */
28
+ export declare const HEARTBEAT_INTERVAL_KEY = "HEARTBEAT_INTERVAL";
29
+ export declare const DEFAULT_HEARTBEAT_INTERVAL = 30000;
30
+ export declare const HEARTBEAT_TIMEOUT_KEY = "HEARTBEAT_TIMEOUT";
31
+ export declare const DEFAULT_HEARTBEAT_TIMEOUT = 20000;
32
+ export declare const DEFAULT_RETRY_CONNECTING_INTERVAL = 20000;
33
+ export declare const RETRY_CONNECTING_MAX_COUNT_KEY = "RETRY_CONNECTING_MAX_COUNT";
34
+ export declare const DEFAULT_RETRY_CONNECTING_MAX_COUNT = 3;
35
+ /**
36
+ * A config key to determine how often should Univer save local edits.
37
+ */
38
+ export declare const LOCAL_CACHE_INTERVAL_KEY = "LOCAL_CACHE_INTERVAL";
39
+ export declare const LOCAL_CACHE_INTERVAL = 1000;
40
+ /** @deprecated Will be removed in the 0.2.19 release */
41
+ export declare const COLLAB_SUBMIT_CHANGESET_URL_KEY = "COLLAB_SUBMIT_CHANGESET_URL";
42
+ /** The url prefix is determined by protocol in submodules/protocol/universer/v1/comb.proto */
43
+ export declare const DEFAULT_COLLAB_SUBMIT_CHANGESET_URL = "/universer-api/comb";
44
+ /**
45
+ * The config key to determined the URL provided by the auth server
46
+ */
47
+ /** @deprecated Will be removed in the 0.2.19 release */
48
+ export declare const LOGIN_URL_KEY = "LOGIN_URL_KEY";
49
+ export declare const DEFAULT_LOGIN_URL = "/universer-api/oidc/authpage";
@@ -0,0 +1,23 @@
1
+ import { DocumentDataModel, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
+ import { DocumentSkeleton, IRender, IRenderContext, IRenderModule, DocumentViewModel, IRenderManagerService } from '@univerjs/engine-render';
3
+ import { Nullable } from 'vitest';
4
+ export declare class MockRenderManagerService implements Pick<IRenderManagerService, 'getRenderById'> {
5
+ private readonly _injector;
6
+ constructor(_injector: Injector);
7
+ getRenderById(_unitId: string): Nullable<IRender>;
8
+ }
9
+ export declare class MockDocSkeletonManagerService extends RxDisposable implements IRenderModule {
10
+ private readonly _context;
11
+ private readonly _univerInstanceService;
12
+ private _docViewModel;
13
+ private readonly _currentSkeleton$;
14
+ readonly currentSkeleton$: import('rxjs').Observable<Nullable<DocumentSkeleton>>;
15
+ private readonly _currentSkeletonBefore$;
16
+ readonly currentSkeletonBefore$: import('rxjs').Observable<Nullable<DocumentSkeleton>>;
17
+ constructor(_context: IRenderContext<DocumentDataModel>, _univerInstanceService: IUniverInstanceService);
18
+ dispose(): void;
19
+ private _update;
20
+ getSkeleton(): DocumentSkeleton;
21
+ getViewModel(): DocumentViewModel;
22
+ private _buildDocViewModel;
23
+ }
@@ -0,0 +1,22 @@
1
+ import { Observable } from 'rxjs';
2
+ import { IDocCollabCursor, ISheetCollabCursor } from '../../models/cursor';
3
+ import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
4
+ import { CollaborationSessionService } from '../../services/collaboration-session/collaboration-session.service';
5
+ /**
6
+ * This controller adds collaboration cursors to Univer. It works with `CollabCursorRenderController`.
7
+ *
8
+ * This controller is also responsible for managing online collaborators' data.
9
+ */
10
+ export declare class CollabCursorController extends RxDisposable {
11
+ private readonly _univerInstanceService;
12
+ private readonly _injector;
13
+ private readonly _collabSessionService;
14
+ private readonly _entities;
15
+ private readonly _entityInit$;
16
+ constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collabSessionService: CollaborationSessionService);
17
+ dispose(): void;
18
+ getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor>>;
19
+ private _init;
20
+ private _startSheetCollabCursor;
21
+ private _startDocCollabCursor;
22
+ }
@@ -0,0 +1,38 @@
1
+ import { ICollaborationUser, ITransformService } from '@univerjs-pro/collaboration';
2
+ import { IDocCollabCursor } from '../../models/cursor';
3
+ import { ICommandService, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
4
+ import { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
5
+ import { ColorAssignService } from '../../services/color-assign/color-assign.service';
6
+ import { MemberService } from '../../services/member/member.service';
7
+ import { DocSyncEditingCollabCursorService } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
8
+ /**
9
+ * Each univer document instance would map to an `CollabCursorEntity` to handle collaborated editing events.
10
+ */
11
+ export declare class DocCollabCursorEntity extends RxDisposable {
12
+ readonly unitID: string;
13
+ private readonly _session;
14
+ private readonly _injector;
15
+ private readonly _colorAssignService;
16
+ private readonly _memberService;
17
+ private readonly _syncEditingCollabCursorService;
18
+ private readonly _transformService;
19
+ private readonly _univerInstanceService;
20
+ private readonly _commandService;
21
+ private _online;
22
+ private _init;
23
+ /** Cursor info of the collaboration room members. The key would be the memberID. */
24
+ private _cursorInfo$;
25
+ cursorInfo$: import('rxjs').Observable<Map<string, IDocCollabCursor>>;
26
+ get cursorInfo(): Readonly<Map<string, IDocCollabCursor>>;
27
+ private _roomMembers$;
28
+ roomMembers$: import('rxjs').Observable<ICollaborationUser[]>;
29
+ get roomMembers(): Readonly<ICollaborationUser[]>;
30
+ constructor(unitID: string, _session: CollaborationSession, _injector: Injector, _colorAssignService: ColorAssignService, _memberService: MemberService, _syncEditingCollabCursorService: DocSyncEditingCollabCursorService, _transformService: ITransformService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
31
+ dispose(): void;
32
+ init(): void;
33
+ private _onCursorUpdate;
34
+ private _onCursorDelete;
35
+ private _updateLocalCursor;
36
+ private _toggleOnline;
37
+ private _toggleOffline;
38
+ }
@@ -0,0 +1,24 @@
1
+ import { DocumentDataModel, ICommandService, RxDisposable, ThemeService } from '@univerjs/core';
2
+ import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
+ import { DocSkeletonManagerService } from '@univerjs/docs';
4
+ import { CollabCursorController } from './collab-cursor.controller';
5
+ /**
6
+ * This controller works with `CollabCursorController` to render doc collaboration cursors.
7
+ */
8
+ export declare class DocCollabCursorRenderController extends RxDisposable implements IRenderModule {
9
+ private readonly _context;
10
+ private readonly _docSkeletonManagerService;
11
+ private readonly _collabCursorController;
12
+ private readonly _commandService;
13
+ private readonly _themeService;
14
+ /** Cursors stored for different Workbooks. */
15
+ private _cursorShapes;
16
+ private _cursors;
17
+ constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService, _collabCursorController: CollabCursorController, _commandService: ICommandService, _themeService: ThemeService);
18
+ private _init;
19
+ private _updateCollabCursors;
20
+ private _refreshCollabCursors;
21
+ private _removeCollabCursors;
22
+ private _initCommandExecutedListener;
23
+ private _initResize;
24
+ }
@@ -0,0 +1,3 @@
1
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
2
+ export declare function serializeDocTextRanges(ranges: ITextRangeWithStyle[]): string;
3
+ export declare function deserializeDocTextRanges(serializedTextRanges: string): ITextRangeWithStyle[];
@@ -0,0 +1,39 @@
1
+ import { ICollaborationUser } from '@univerjs-pro/collaboration';
2
+ import { ISheetCollabCursor } from '../../models/cursor';
3
+ import { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
4
+ import { ICommandService, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
5
+ import { RefRangeService } from '@univerjs/sheets';
6
+ import { ColorAssignService } from '../../services/color-assign/color-assign.service';
7
+ import { MemberService } from '../../services/member/member.service';
8
+ /**
9
+ * Each univer document instance would map to an `CollabCursorEntity` to handle collaborated editing events.
10
+ */
11
+ export declare class SheetCollabCursorEntity extends RxDisposable {
12
+ readonly unitID: string;
13
+ private readonly _session;
14
+ private readonly _injector;
15
+ private readonly _colorAssignService;
16
+ private readonly _memberService;
17
+ private readonly _univerInstanceService;
18
+ private readonly _commandService;
19
+ private _refRangeService;
20
+ private _online;
21
+ private _init;
22
+ /** Cursor info of the collaboration room members. The key would be the memberID. */
23
+ private _cursorInfo$;
24
+ cursorInfo$: import('rxjs').Observable<Map<string, ISheetCollabCursor>>;
25
+ get cursorInfo(): Readonly<Map<string, ISheetCollabCursor>>;
26
+ private _roomMembers$;
27
+ roomMembers$: import('rxjs').Observable<ICollaborationUser[]>;
28
+ get roomMembers(): Readonly<ICollaborationUser[]>;
29
+ constructor(unitID: string, _session: CollaborationSession, _injector: Injector, _colorAssignService: ColorAssignService, _memberService: MemberService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _refRangeService: RefRangeService);
30
+ dispose(): void;
31
+ init(): void;
32
+ private _onCursorUpdate;
33
+ private _onCursorDelete;
34
+ private _getMergeRange;
35
+ private _onRefRangeChange;
36
+ private _updateLocalCursor;
37
+ private _toggleOnline;
38
+ private _toggleOffline;
39
+ }
@@ -0,0 +1,21 @@
1
+ import { Workbook, RxDisposable, ThemeService } from '@univerjs/core';
2
+ import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
+ import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
4
+ import { CollabCursorController } from './collab-cursor.controller';
5
+ /**
6
+ * This controller works with `CollabCursorController` to render sheet collaboration cursors.
7
+ */
8
+ export declare class SheetCollabCursorRenderController extends RxDisposable implements IRenderModule {
9
+ private readonly _context;
10
+ private readonly _sheetSkeletonManagerService;
11
+ private readonly _collabCursorController;
12
+ private readonly _themeService;
13
+ /** Cursors stored for different Workbooks. */
14
+ private _cursors;
15
+ private _lastPointer;
16
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _collabCursorController: CollabCursorController, _themeService: ThemeService);
17
+ private _init;
18
+ private _updateCollabCursors;
19
+ private _removeCollabCursors;
20
+ private _getSheetObject;
21
+ }
@@ -0,0 +1,18 @@
1
+ import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
+ import { IUIPartsService } from '@univerjs/ui';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { CollaborationController } from '../collaboration/collaboration.controller';
5
+ import { CollaborationStatus } from '../collaboration/collaboration-state';
6
+ /**
7
+ * This controller is responsible for monitoring the collaboration status of the currently focused unit.
8
+ */
9
+ export declare class DesktopCollaborationStatusDisplayController extends Disposable {
10
+ private readonly _univerInstanceService;
11
+ private readonly _uiPartsService;
12
+ private readonly _injector;
13
+ private readonly _collaborationController;
14
+ protected readonly _status$: BehaviorSubject<CollaborationStatus>;
15
+ constructor(_univerInstanceService: IUniverInstanceService, _uiPartsService: IUIPartsService, _injector: Injector, _collaborationController: CollaborationController);
16
+ private _initStatusListener;
17
+ protected _initStatusComponent(): void;
18
+ }
@@ -0,0 +1,4 @@
1
+ import { IWorkbookData } from '@univerjs/core';
2
+ export declare const TEST_UNIT_ID = "test";
3
+ export declare const ANOTHER_TEST_UNIT_ID = "test2";
4
+ export declare function getTestSheetData(id?: string): IWorkbookData;
@@ -0,0 +1,58 @@
1
+ import { IDisposable, ILocalStorageService, Nullable, ILogService } from '@univerjs/core';
2
+ import { IMessageOptions, IMessageProps } from '@univerjs/design';
3
+ import { HTTPResponse } from '@univerjs/network';
4
+ import { IBeforeCloseService, IMessageService, INotificationService } from '@univerjs/ui';
5
+ import { ICombResponseEvent } from '@univerjs-pro/collaboration';
6
+ import { ICollaborationSocket, ICollaborationSocketService } from '../../../services/socket/collaboration-socket.service';
7
+ import { Subject } from 'rxjs';
8
+ /**
9
+ * The handler object for a mocked socket connection. You can terminate, send messages / error through this object.
10
+ */
11
+ export interface IMockCollabSessionSocketHandler extends ICollaborationSocket {
12
+ socket: ICollaborationSocket;
13
+ close$: Subject<CloseEvent>;
14
+ error$: Subject<Event>;
15
+ open$: Subject<Event>;
16
+ message$: Subject<ICombResponseEvent>;
17
+ }
18
+ /**
19
+ * This service provides a mocked
20
+ */
21
+ export declare class MockCollaborationSocketService implements ICollaborationSocketService {
22
+ private readonly _logService;
23
+ private readonly _handlers;
24
+ constructor(_logService: ILogService);
25
+ createSocket(url: string): Nullable<ICollaborationSocket>;
26
+ /** Test scripts could get the session handler from this method to mock network events. */
27
+ getHandler(url: string): Nullable<IMockCollabSessionSocketHandler>;
28
+ }
29
+ export declare class MockBeforeCloseService implements IBeforeCloseService {
30
+ private _onCloseCallbacks;
31
+ private _beforeCloseCallbacks;
32
+ registerBeforeClose(callback: () => string | undefined): IDisposable;
33
+ registerOnClose(callback: () => void): IDisposable;
34
+ }
35
+ /**
36
+ * A mocked local storage service which use in-memory storage.
37
+ */
38
+ export declare class MockLocalStorageService implements ILocalStorageService {
39
+ private readonly _inMemoryCache;
40
+ getItem<T>(key: string): Promise<T | null>;
41
+ setItem<T>(key: string, value: T): Promise<T>;
42
+ removeItem(_key: string): Promise<void>;
43
+ clear(): Promise<void>;
44
+ key(_index: number): Promise<string | null>;
45
+ keys(): Promise<string[]>;
46
+ iterate<T, U>(_iteratee: (value: T, key: string, iterationNumber: number) => U): Promise<U>;
47
+ }
48
+ export declare class MockMessageService implements IMessageService {
49
+ show(_options: IMessageOptions & Omit<IMessageProps, 'key'>): IDisposable;
50
+ setContainer(_container: HTMLElement): void;
51
+ getContainer(): HTMLElement;
52
+ }
53
+ export declare class MockNotificationService implements INotificationService {
54
+ show(): IDisposable;
55
+ }
56
+ export declare class MockHTTPService {
57
+ get(url: string): Promise<HTTPResponse<any>>;
58
+ }
@@ -0,0 +1,91 @@
1
+ import { IDisposable, IMutationInfo, Nullable, ICommandService, ILogService, Injector, IPermissionService, LocaleService, RxDisposable } from '@univerjs/core';
2
+ import { UniverType } from '@univerjs/protocol';
3
+ import { Observable, BehaviorSubject } from 'rxjs';
4
+ import { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
5
+ import { CollaborationState, ICollaborationStateHandler, CollaborationStatus } from './collaboration-state';
6
+ import { DocStateChangeManagerService } from '@univerjs/docs-ui';
7
+ import { IMessageService } from '@univerjs/ui';
8
+ import { CompressMutationService, RevisionService } from '@univerjs-pro/collaboration';
9
+ import { DocTransformIMECacheService } from '../../services/ime-cache-transform/doc-transform-ime-cache.service';
10
+ import { LocalCacheService } from '../../services/local-cache/local-cache.service';
11
+ import { SheetTransformSelectionsService } from '../../services/range-selection/sheet-transform-selections.service';
12
+ import { ISingleActiveUnitService } from '../../services/single-active-unit/single-active-unit.service';
13
+ import { DocTransformStateCacheService } from '../../services/state-cache-transform/doc-transform-state-cache.service';
14
+ import { DocSyncEditingCollabCursorService } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
15
+ import { DocTransformSelectionsService } from '../../services/text-selection/doc-transform-selections.service';
16
+ /**
17
+ * Each univer document instance would map to an `CollaborationEntity` to handle collaborated editing events.
18
+ */
19
+ export declare abstract class CollaborationEntity extends RxDisposable {
20
+ readonly unitID: string;
21
+ readonly session: CollaborationSession;
22
+ protected readonly _type: UniverType;
23
+ protected readonly _injector: Injector;
24
+ protected readonly _localCacheService: LocalCacheService;
25
+ protected readonly _compressMutationService: CompressMutationService;
26
+ protected readonly _localeService: LocaleService;
27
+ protected readonly _revisionService: RevisionService;
28
+ protected readonly _logService: ILogService;
29
+ protected readonly _commandService: ICommandService;
30
+ protected readonly _messageService: IMessageService;
31
+ private _permissionService;
32
+ protected readonly _singleActiveUnitService?: ISingleActiveUnitService | undefined;
33
+ protected _state$: BehaviorSubject<Nullable<CollaborationState>>;
34
+ readonly state$: Observable<Nullable<CollaborationState>>;
35
+ protected _state: CollaborationState;
36
+ get state(): CollaborationState;
37
+ protected _collaborationPaused: boolean;
38
+ protected _changesetSessionId: string;
39
+ protected _changesetReqId: number;
40
+ readonly status$: Observable<CollaborationStatus>;
41
+ constructor(unitID: string, session: CollaborationSession, _type: UniverType, _injector: Injector, _localCacheService: LocalCacheService, _compressMutationService: CompressMutationService, _localeService: LocaleService, _revisionService: RevisionService, _logService: ILogService, _commandService: ICommandService, _messageService: IMessageService, _permissionService: IPermissionService, _singleActiveUnitService?: ISingleActiveUnitService | undefined);
42
+ init(): Promise<void>;
43
+ /**
44
+ * Pause collaboration on the document. Remote changesets would be inserted to a queue and wait for resuming.
45
+ * @returns a disposable which will resume collaboration when called.
46
+ */
47
+ pauseCollaboration(): IDisposable;
48
+ private _updateState;
49
+ protected _init(): Promise<CollaborationState>;
50
+ /**
51
+ * Could not transit the state twice at the same time. So we put a lock here in case of implementation fault.
52
+ */
53
+ private _transitionLocked;
54
+ private _unlockTransition;
55
+ private _lockTransition;
56
+ protected _onLocalMutation(command: IMutationInfo): void;
57
+ private _remoteChangesetQueue;
58
+ private _onRemoteChangeset;
59
+ private _exhaustRemoteChangesetQueue;
60
+ private _applyRemoteChangeset;
61
+ private _onRemoteACK;
62
+ private _onRemoteRejected;
63
+ private _onRemoteRetry;
64
+ private _onFetchMissResult;
65
+ private _toggleOffline;
66
+ private _toggleOnline;
67
+ private _createInitialState;
68
+ protected _createHandler(): ICollaborationStateHandler;
69
+ private _createInitialStateImpl;
70
+ private _replayCachedMutations;
71
+ }
72
+ export declare class DocCollaborationEntity extends CollaborationEntity {
73
+ readonly unitID: string;
74
+ readonly type: UniverType;
75
+ private readonly _docStateChangeManagerService;
76
+ private readonly _docTransformIMECacheService;
77
+ private readonly _docTransformStateCacheService;
78
+ private readonly _docTransformSelectionsService;
79
+ private readonly _docSyncEditingCollabCursorService;
80
+ constructor(unitID: string, type: UniverType, session: CollaborationSession, injector: Injector, localCacheService: LocalCacheService, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, _docStateChangeManagerService: DocStateChangeManagerService, _docTransformIMECacheService: DocTransformIMECacheService, _docTransformStateCacheService: DocTransformStateCacheService, _docTransformSelectionsService: DocTransformSelectionsService, _docSyncEditingCollabCursorService: DocSyncEditingCollabCursorService, logService: ILogService, commandService: ICommandService, messageService: IMessageService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService);
81
+ protected _createHandler(): ICollaborationStateHandler;
82
+ protected _init(): Promise<CollaborationState>;
83
+ }
84
+ export declare class SheetCollaborationEntity extends CollaborationEntity {
85
+ readonly unitID: string;
86
+ readonly type: UniverType;
87
+ private readonly _sheetTransformSelectionsService;
88
+ constructor(unitID: string, type: UniverType, session: CollaborationSession, injector: Injector, localCacheService: LocalCacheService, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, _sheetTransformSelectionsService: SheetTransformSelectionsService, logService: ILogService, commandService: ICommandService, messageService: IMessageService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService);
89
+ protected _createHandler(): ICollaborationStateHandler;
90
+ protected _init(): Promise<CollaborationState>;
91
+ }