@univer-cli/univer-collaboration-runtime 1.0.2 → 1.0.3

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 (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +12 -12
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0x28a351=_0x2b76;(function(_0x2ad9db,_0x1f1a92){const _0x2f2ee3=_0x2b76,_0x46b724=_0x2ad9db();while(!![]){try{const _0x28f08c=-parseInt(_0x2f2ee3(0x266))/0x1+parseInt(_0x2f2ee3(0x265))/0x2+parseInt(_0x2f2ee3(0x2c4))/0x3*(-parseInt(_0x2f2ee3(0x237))/0x4)+-parseInt(_0x2f2ee3(0x337))/0x5+parseInt(_0x2f2ee3(0x2cc))/0x6*(-parseInt(_0x2f2ee3(0x345))/0x7)+-parseInt(_0x2f2ee3(0x2e6))/0x8*(parseInt(_0x2f2ee3(0x284))/0x9)+-parseInt(_0x2f2ee3(0x1ff))/0xa*(-parseInt(_0x2f2ee3(0x249))/0xb);if(_0x28f08c===_0x1f1a92)break;else _0x46b724['push'](_0x46b724['shift']());}catch(_0x385133){_0x46b724['push'](_0x46b724['shift']());}}}(_0x2e3a,0x958dd));import{CommandType as _0x56c714,DependentOn as _0x47e19f,ICommandService as _0x24a215,IUniverInstanceService as _0x4f82f9,Inject as _0x407b4d,Injector as _0x419b26,Plugin as _0x45c71a,UniverInstanceType as _0x27cc9f,registerDependencies as _0x9caa23,sequenceExecute as _0x2648cd,toDisposable as _0x1752eb}from'@univerjs/core';function _0x2e3a(){const _0x5e2b40=['1010201qfgxMU','_closeAfterFatalError','formula.mutation.set-trigger-formula-calculation-stop','readyState','permission','save','_scheduleReconnect','splice','protocol','_setTransformConflict','OPEN','closed','Collaboration\x20WebSocket\x20is\x20not\x20online','type','COLLABORATION_INVALID_INPUT','permission-denied','collaMsg','RECV','suppress','latestRevision','m2Prime','UNIVER_SLIDE','_awaiting','mutations','acceptedChangeset','status','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','has','Collaboration\x20HELLO\x20response\x20is\x20invalid','randomUUID','45BGSuwq','dispose','pathname','UNIVER_BOARD','takeInboundChangesets','_tail','awaiting-ack','up-to-date','\x20cannot\x20capture\x20mutation\x20','cmd','online','_ensureConnected','createPresentation','unknown','univerAPI','COLLABORATION_CLOSED','onMutationExecutedForCollab','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','snapshotServerService','Changeset\x20submission\x20was\x20rejected','reject','searchParams','min','_nextReqId','slice','getBoard','memberId','open','application/json','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','_socket','pending','permission_rej','isArray','_capture','index','board','fetchThroughInterceptors','formula.mutation.set-calculation-result','wsSessionTicketUrl','Event','changesets','\x20cannot\x20call\x20','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_suppressionDepth','findIndex','ticket','promise','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','subscribe','length','leases','ack','kind','http:','_injector','registerPlugin','POST','createDocument','changeset_should_retry','values','_connect','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','_joined','387eNieAN','MUTATION','catch','_waitForSubmission','result','workbook','data','snapshotServerUrl','6hicmZd','_connection','snapshot','_replayRemoteChangesets','createBase','_config','prependPending','\x20returned\x20a\x20different\x20block\x20identity','revisionService','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','permission-rejected','maxCodeLength','pull','read','compressMutationService','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','fetchmissing','entries','formula.mutation.set-formula-data','formula.mutation.set-trigger-formula-calculation-start','return\x20(async\x20()\x20=>\x20{\x20','object','write','some','createBoard','routeKey','1262264frYPwe','unit','backend','incrementRevOfUnit','reconnecting','prototype','sort','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','getDocument','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','target','blockMeta','unsubscribe','COMPRESS_MUTATION_SEND','fetchChangesets','json','rejected','close','unitData','_state','unchanged','commitTimeoutMs','_closeOwnedResources','_reconnectTimer','_baseRevision','_closePromise','ws:','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','_validateAcceptedChangeset','_join','createUnit','_requestCommand','_startHeartbeat','sheet.mutation.send-init-pivot-text-local','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','docStateChange$','Single-Unit\x20runtime\x20for\x20','string','UNIVER_DOC','changeset_rej','_executor','Collaboration\x20WebSocket\x20closed','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','Failed\x20to\x20rejoin\x20Unit\x20room','HELLO','UNIVER_BASE','takePending','csAckEvent','offline','find','Failed\x20to\x20join\x20Unit\x20room','_captureCommandMutation','_closed','Unit\x20','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','collabSubmitChangesetUrl','newCsEvent','_bufferedChangesets','originalMeta','COMPRESS_MUTATION_APPLY','onlyLocal','LEAVE','interceptor','stringify','clear','_unitId','Unsupported\x20collaboration\x20Unit\x20type:\x20','nothing-to-commit','error','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','redoState','unit-data','_release','execute','transform-failed','rev','sid','fetch','pull-required','injector','5490055cDXqCK','conflict','COLLABORATION_PROTOCOL_ERROR','_target','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','COLLABORATION_LOAD_FAILED','includes','acquire','exportUnitData','_subscribeToDocumentState','getBase','delete','createWorkbook','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','6742582HaQQdo','Runtime\x20for\x20','reqId','onStarting','addEventListener','BeforeCommandExecute','new_changes','isSafeInteger','UNIVER_SHEET','_operations','GET','run','_createAwaitingFromPending','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','eventID','changeset-rejected','_consumeBufferedPrecedingChangesets','isFinite','JOIN','_commandWaiters','confirmed','getState','size','_handleCollaborationEvent','memberID','unitId','m1Prime','COMMAND','snapshotFrom','_lease','transformService','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','map','actions','_sid','https:','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','sheets','timer','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','Collaboration\x20WebSocket\x20closed\x20before\x20opening','\x20})();','_handle','_univer','transformMutations','invalid','replace','Backend\x20changesets\x20must\x20be\x20an\x20array','get','Collaboration\x20HTTP\x20request\x20failed','awaitingMutations','10GMvvXK','block','then','unitID','remote','HEARTBEAT','removeEventListener','collabWebSocketUrl','all','resolve','send','boolean','infoRsp','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','getPrototypeOf','changeset','_stopHeartbeat','_inbound','commandId','submitChangeset','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','unitType','COLLABORATION_UNAVAILABLE','instanceService','changeset_ack','race','_kernel','Code\x20is\x20longer\x20than\x20the\x20','\x20for\x20Unit\x20','revision','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','disposeUnit','_pending','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','timeout','_submissionWaiters','ensureOnline','format','replacePending','_handleMessage','trim','retry','getPresentation','baseRev','_reconcilePrecedingChangesets','push','getConnectionState','Backend\x20returned\x20no\x20Unit\x20snapshot','_disposables','_fetchChangesets','_conflict','\x20character\x20limit','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','_heartbeat','replacePendingMutations','code','23496IsiThq','sessionTicket','message','new_changesets','unshift','csRejEvent','Changeset\x20submission\x20was\x20denied','from','_assertMutableState','getInterceptPoints','httpRequest','parse','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','mode','_knownHeadRevision','Failed\x20to\x20fetch\x20preceding\x20changesets','\x20request\x20is\x20already\x20active\x20for\x20','reason','51723001abtrtH','cancel','retryable','add','_reconnectAttempts','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','set','fromEntries','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','\x20is\x20unavailable','addEvent','bind','number','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','Connection\x20timed\x20out','createUniver','commandService','fetched','_rejectIfNotAccepting','_memberId','precedingChangesets','commit','Snapshot\x20block\x20','invalid-revision','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','wss:','No\x20active\x20Unit\x20leases','_connectPromise','1057162blCWKk'];_0x2e3a=function(){return _0x5e2b40;};return _0x2e3a();}import{CompressMutationService as _0x45cd35,ISnapshotServerService as _0x2114fe,ITransformService as _0x309abf,RevertRevisionMutation as _0x4d191d,RevisionService as _0x56a7c3,SnapshotService as _0x3e3e5b,UniverCollaborationPlugin as _0x91edc2,isTransformMutationsSuccess as _0x74ccd6,parseChangesetToProtocol as _0x54e5d7,parseMutationToProtocol as _0x4dcbdd,parseProtocolChangeset as _0xeb2c40,transformSnapshotToBaseData as _0x16c6bc,transformSnapshotToBoardData as _0x641f7a,transformSnapshotToDocumentData as _0x6ffd28,transformSnapshotToSlideData as _0x1ce93e,transformSnapshotToWorkbookData as _0x25d93a}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x3c1c2d}from'@univerjs/engine-formula';import{CmdRspCode as _0x90bf3a,CombCmd as _0x9b7859,isError as _0x1d0608}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x564f99}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x27b5b6,RichTextEditingMutation as _0x21e09d}from'@univerjs/docs';import{IRenderManagerService as _0x12089b}from'@univerjs/engine-render';import{FUniver as _0x264464}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0x45e199 from'@oxc-project/runtime/helpers/decorateParam';import _0x5bf473 from'@oxc-project/runtime/helpers/decorate';function _0x2b76(_0x1112d3,_0x30c2cc){_0x1112d3=_0x1112d3-0x1f2;const _0x2e3ab5=_0x2e3a();let _0x2b760f=_0x2e3ab5[_0x1112d3];return _0x2b760f;}var j=class extends Error{[_0x28a351(0x236)];[_0x28a351(0x24b)];constructor(_0x407ec0,_0x2da8be,_0x183878={}){const _0x214b03=_0x28a351;super(_0x2da8be,_0x183878),this['name']='CollaborationRuntimeError',this['code']=_0x407ec0,this[_0x214b03(0x24b)]=_0x183878['retryable']??!0x1;}},se=class{[_0x28a351(0x219)];[_0x28a351(0x328)];[_0x28a351(0x21f)]=[];[_0x28a351(0x22f)]=[];[_0x28a351(0x2b0)]=0x0;constructor(_0x4a8f4b,_0x334e1f,_0x274cb1){const _0x32ddf3=_0x28a351;this['_kernel']=_0x4a8f4b,this[_0x32ddf3(0x328)]=_0x334e1f,this[_0x32ddf3(0x22f)][_0x32ddf3(0x22c)](_0x4a8f4b[_0x32ddf3(0x259)][_0x32ddf3(0x294)]((_0x4f1fd3,_0x767716)=>{const _0x55fae2=_0x32ddf3;this[_0x55fae2(0x31a)](_0x4f1fd3,_0x767716,_0x274cb1);})),_0x274cb1===_0x27cc9f[_0x32ddf3(0x30d)]&&(_0x4a8f4b[_0x32ddf3(0x336)][_0x32ddf3(0x1fc)](_0x12089b),this[_0x32ddf3(0x340)]());}get['pending'](){const _0x52d10c=_0x28a351;return this[_0x52d10c(0x21f)];}[_0x28a351(0x361)](_0x3d53e9){const _0x3d69ca=_0x28a351;return this[_0x3d69ca(0x21f)]['slice'](_0x3d53e9);}[_0x28a351(0x225)](_0x46d258){const _0x4f1af2=_0x28a351;this['_pending']['splice'](0x0,this[_0x4f1af2(0x21f)][_0x4f1af2(0x2b6)],..._0x46d258);}[_0x28a351(0x315)](){const _0x1db120=_0x28a351;return this['_pending'][_0x1db120(0x26d)](0x0);}['prependPending'](_0x362002){const _0x4fac40=_0x28a351;this[_0x4fac40(0x21f)][_0x4fac40(0x23b)](..._0x362002);}async[_0x28a351(0x278)](_0x47b19e){const _0x10f312=_0x28a351;this[_0x10f312(0x2b0)]+=0x1;try{return await _0x47b19e();}finally{--this[_0x10f312(0x2b0)];}}[_0x28a351(0x285)](){const _0x50272f=_0x28a351;for(let _0x17bfb4 of this[_0x50272f(0x22f)]['splice'](0x0))_0x17bfb4[_0x50272f(0x285)]();}['_captureCommandMutation'](_0x368e2b,_0xcc3c51,_0x45e06c){const _0x115f06=_0x28a351;if(this[_0x115f06(0x2b0)]>0x0||_0x368e2b[_0x115f06(0x273)]!==_0x56c714[_0x115f06(0x2c5)]||_0xcc3c51?.['fromCollab']||_0xcc3c51?.['fromChangeset']||_0xcc3c51?.[_0x115f06(0x323)])return;let _0x39df56=_0x368e2b['params'];if(_0x39df56?.[_0x115f06(0x35e)]!==void 0x0&&_0x39df56[_0x115f06(0x35e)]!==this[_0x115f06(0x328)]){if(_0x39df56['trigger']===_0x564f99['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x115f06(0x346)+this[_0x115f06(0x328)]+_0x115f06(0x28c)+_0x368e2b['id']+_0x115f06(0x21b)+String(_0x39df56['unitId']));}if(_0x39df56?.[_0x115f06(0x35e)]===void 0x0||_0x45e06c===_0x27cc9f[_0x115f06(0x30d)]&&_0x368e2b['id']===_0x21e09d['id'])return;if(_0x368e2b['id']===_0x4d191d['id'])throw new j('COLLABORATION_INVALID_INPUT',_0x115f06(0x36a));let _0x3b9076=_0x368e2b,_0x2fafd8=this[_0x115f06(0x219)][_0x115f06(0x2da)][_0x115f06(0x325)][_0x115f06(0x240)]()[_0x115f06(0x2f3)],_0x1328aa=(this[_0x115f06(0x219)][_0x115f06(0x2da)][_0x115f06(0x325)]['fetchThroughInterceptors'](_0x2fafd8)([_0x3b9076],this[_0x115f06(0x219)][_0x115f06(0x216)])??[_0x3b9076])[0x0];_0x1328aa&&this[_0x115f06(0x21f)]['push'](_0x4dcbdd(_0x1328aa));}[_0x28a351(0x340)](){const _0x105ff3=_0x28a351;let _0x12a6e5=this[_0x105ff3(0x219)][_0x105ff3(0x336)][_0x105ff3(0x1fc)](_0x27b5b6)[_0x105ff3(0x30a)][_0x105ff3(0x2b5)](_0x4d8aa4=>{const _0x2ae199=_0x105ff3;if(this['_suppressionDepth']>0x0||_0x4d8aa4?.[_0x2ae199(0x35e)]!==this[_0x2ae199(0x328)])return;let _0x40644c={'id':_0x4d8aa4[_0x2ae199(0x211)],'params':{'actions':_0x4d8aa4[_0x2ae199(0x32d)][_0x2ae199(0x367)],'textRanges':null,'unitId':_0x4d8aa4[_0x2ae199(0x35e)]},'type':_0x56c714[_0x2ae199(0x2c5)]};this[_0x2ae199(0x21f)]['push'](_0x4dcbdd(_0x40644c));});this[_0x105ff3(0x22f)][_0x105ff3(0x22c)](_0x1752eb(()=>_0x12a6e5[_0x105ff3(0x2f2)]()));}},ce=new Set([_0x28a351(0x2df),_0x28a351(0x268),'formula.mutation.set-trigger-formula-calculation',_0x28a351(0x2aa),'formula.mutation.set-array-formula-data',_0x28a351(0x2de),_0x28a351(0x308)]),le=new Set([_0x28a351(0x2d0),_0x28a351(0x2e4),_0x28a351(0x343),_0x28a351(0x2be),_0x28a351(0x290),'createUniverSheet',_0x28a351(0x21e)]);function ue(_0x1915e7,_0x42067e,_0x43b00e){let _0x4abcf7=_0x264464['newAPI'](_0x1915e7);return{async 'execute'(_0x16077e,_0x3e1105){const _0x4f3531=_0x2b76;if(_0x16077e[_0x4f3531(0x2b6)]>_0x43b00e)throw new j(_0x4f3531(0x274),_0x4f3531(0x21a)+_0x43b00e+_0x4f3531(0x232));let _0xec9be3=_0x3e1105===_0x4f3531(0x2d9)?M(_0x4abcf7):void 0x0,_0x51a4a4=de(_0x4abcf7,_0x42067e);try{return await Function(_0x4f3531(0x292),_0x4f3531(0x2e0)+_0x16077e+_0x4f3531(0x1f5))(_0x51a4a4);}finally{_0xec9be3?.[_0x4f3531(0x285)]();}}};}function de(_0x268c0b,_0x37dd51){return new Proxy(_0x268c0b,{'get'(_0x4438f1,_0xaead89,_0x58aa86){const _0x3d84e8=_0x2b76;return le[_0x3d84e8(0x281)](_0xaead89)?()=>{const _0x5c8314=_0x3d84e8;throw new j('COLLABORATION_INVALID_INPUT',_0x5c8314(0x30b)+_0x37dd51+_0x5c8314(0x2ae)+String(_0xaead89));}:Reflect[_0x3d84e8(0x1fc)](_0x4438f1,_0xaead89,_0x58aa86);}});}function M(_0x1c08a6){const _0x22d95e=_0x28a351;return _0x1c08a6[_0x22d95e(0x253)](_0x1c08a6[_0x22d95e(0x2ac)][_0x22d95e(0x34a)],_0x1b88a0=>{const _0xe6e842=_0x22d95e;let _0x104d91=_0x1b88a0;if(N(_0x104d91))throw _0x104d91[_0xe6e842(0x24a)]=!0x0,new j('COLLABORATION_INVALID_INPUT','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20'+_0x104d91['id']);});}function N(_0x5452af){const _0x1449dc=_0x28a351;return _0x5452af['type']===_0x56c714[_0x1449dc(0x360)]||_0x5452af['type']===_0x56c714[_0x1449dc(0x2c5)]&&!ce[_0x1449dc(0x281)](_0x5452af['id']);}function P(_0xac4d7c){const _0x1a5a25=_0x28a351;if(_0xac4d7c===void 0x0)return null;if(_0xac4d7c===null||typeof _0xac4d7c==_0x1a5a25(0x20a)||typeof _0xac4d7c==_0x1a5a25(0x30c))return _0xac4d7c;if(typeof _0xac4d7c==_0x1a5a25(0x255)){if(Number[_0x1a5a25(0x356)](_0xac4d7c))return _0xac4d7c;throw I();}if(Array[_0x1a5a25(0x2a5)](_0xac4d7c))return _0xac4d7c[_0x1a5a25(0x366)](P);if(F(_0xac4d7c))return Object[_0x1a5a25(0x250)](Object[_0x1a5a25(0x2dd)](_0xac4d7c)['map'](([_0x57b0cd,_0x43d133])=>[_0x57b0cd,P(_0x43d133)]));throw I();}function F(_0x354545){const _0x18bcb8=_0x28a351;if(typeof _0x354545!=_0x18bcb8(0x2e1)||!_0x354545)return!0x1;let _0x2708b3=Object[_0x18bcb8(0x20d)](_0x354545);return _0x2708b3===Object[_0x18bcb8(0x2eb)]||_0x2708b3===null;}function I(){const _0x5172ee=_0x28a351;return new j(_0x5172ee(0x274),_0x5172ee(0x295));}var L=class{[_0x28a351(0x289)]=Promise[_0x28a351(0x208)]();[_0x28a351(0x350)](_0x2f9385){const _0x346e99=_0x28a351;let _0x113bc6=this['_tail'][_0x346e99(0x201)](_0x2f9385,_0x2f9385);return this[_0x346e99(0x289)]=_0x113bc6[_0x346e99(0x201)](()=>void 0x0,()=>void 0x0),_0x113bc6;}};function R(_0x1cb8e0,_0x4f5031,_0x1b1f15,_0x3610a8){const _0x68132f=_0x28a351;if(!Array[_0x68132f(0x2a5)](_0x1cb8e0))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x68132f(0x1fb));let _0x3f21d5=[..._0x1cb8e0][_0x68132f(0x2ec)]((_0x2ccca9,_0x419e5a)=>_0x2ccca9[_0x68132f(0x21c)]-_0x419e5a[_0x68132f(0x21c)]),_0x4a7bc7=_0x3610a8;for(let _0x5567a5 of _0x3f21d5){if(!_0x5567a5||typeof _0x5567a5!=_0x68132f(0x2e1)||!Array[_0x68132f(0x2a5)](_0x5567a5[_0x68132f(0x27d)])||_0x5567a5[_0x68132f(0x27d)]['some'](_0x5cbbe7=>!_0x5cbbe7||typeof _0x5cbbe7!=_0x68132f(0x2e1)||!('id'in _0x5cbbe7)||typeof _0x5cbbe7['id']!=_0x68132f(0x30c)||!('data'in _0x5cbbe7)||typeof _0x5cbbe7[_0x68132f(0x2ca)]!=_0x68132f(0x30c))||!Number[_0x68132f(0x34c)](_0x5567a5[_0x68132f(0x22a)])||!Number[_0x68132f(0x34c)](_0x5567a5[_0x68132f(0x21c)])||_0x5567a5[_0x68132f(0x202)]!==_0x4f5031||_0x5567a5['type']!==_0x1b1f15||_0x5567a5['baseRev']!==_0x4a7bc7||_0x5567a5['revision']!==_0x4a7bc7+0x1)throw new j(_0x68132f(0x339),_0x68132f(0x311));_0x4a7bc7=_0x5567a5[_0x68132f(0x21c)];}return _0x3f21d5;}function z(_0x4a608a){const _0x4236eb=_0x28a351;return{'baseRevision':_0x4a608a[_0x4236eb(0x22a)],'mutationCount':_0x4a608a[_0x4236eb(0x27d)][_0x4236eb(0x2b6)],'revision':_0x4a608a[_0x4236eb(0x21c)],..._0x4a608a[_0x4236eb(0x333)]===void 0x0?{}:{'sid':_0x4a608a[_0x4236eb(0x333)]},..._0x4a608a[_0x4236eb(0x347)]===void 0x0?{}:{'reqId':_0x4a608a[_0x4236eb(0x347)]}};}function B(_0x395568,_0x336574,_0x20b82c,_0x428633,_0x583445,_0x340c29='initial'){const _0x3b505c=_0x28a351;if(_0x583445[_0x3b505c(0x2e3)](_0x40cb7c=>_0x40cb7c[_0x3b505c(0x27d)]['some'](_0x2a8d81=>_0x2a8d81['id']===_0x4d191d['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x3b505c(0x2db));let _0xf0b43e=_0x428633;for(let _0x23a24f of _0x583445){let _0xfdbcd0=_0xf0b43e+0x1;if(_0x23a24f['unitID']!==_0x336574||_0x23a24f['type']!==_0x20b82c||_0x23a24f['baseRev']!==_0xf0b43e||_0x23a24f['revision']!==_0xfdbcd0)throw new j(_0x3b505c(0x339),_0x3b505c(0x243));let _0x3dd3e4=_0xeb2c40(_0x23a24f),_0x52a5e5=_0x395568['compressMutationService'][_0x3b505c(0x325)][_0x3b505c(0x240)]()[_0x3b505c(0x322)],_0x4caeef=_0x395568[_0x3b505c(0x2da)][_0x3b505c(0x325)][_0x3b505c(0x2a9)](_0x52a5e5)(_0x3dd3e4['mutations'],null)??_0x3dd3e4['mutations'],_0xfd54f0=_0x2648cd(_0x4caeef,_0x395568[_0x3b505c(0x259)],_0x340c29==='initial'?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0xfd54f0[_0x3b505c(0x2c8)])throw new j(_0x3b505c(0x33c),_0x3b505c(0x21d)+_0xfd54f0[_0x3b505c(0x2a7)]+':\x20'+String(_0xfd54f0['error']));let _0x3e306c=_0x395568[_0x3b505c(0x2d4)]['incrementRevOfUnit'](_0x336574);if(_0x3e306c!==_0xfdbcd0)throw new j(_0x3b505c(0x339),_0x3b505c(0x33b));_0xf0b43e=_0x3e306c;}return _0xf0b43e;}function V(_0x5adeb2,_0x5e6682,_0x4bf1d9){const _0x25595d=_0x28a351;let _0x5a13e0=_0x264464['newAPI'](_0x5adeb2);switch(_0x4bf1d9){case _0x27cc9f[_0x25595d(0x34d)]:return H(_0x5a13e0['getWorkbook'](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x30d)]:return H(_0x5a13e0[_0x25595d(0x2ee)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f['UNIVER_SLIDE']:return H(_0x5a13e0[_0x25595d(0x229)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x314)]:return H(_0x5a13e0[_0x25595d(0x341)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x287)]:return H(_0x5a13e0[_0x25595d(0x29d)](_0x5e6682)?.['save'](),_0x5e6682);default:throw new j(_0x25595d(0x274),_0x25595d(0x329)+_0x4bf1d9);}}function H(_0x2a263f,_0x3722ad){const _0x2bb8c5=_0x28a351;if(_0x2a263f===void 0x0)throw new j(_0x2bb8c5(0x33c),_0x2bb8c5(0x31c)+_0x3722ad+_0x2bb8c5(0x252));return structuredClone(_0x2a263f);}var fe=class{['unitId'];['unitType'];[_0x28a351(0x2fe)];[_0x28a351(0x1f6)];[_0x28a351(0x1f7)];[_0x28a351(0x219)];['_closePromise'];['_acceptingOperations']=!0x0;['_closed']=!0x1;[_0x28a351(0x2a6)];[_0x28a351(0x30f)];['_operations']=new L();[_0x28a351(0x320)]=[];['_knownHeadRevision'];[_0x28a351(0x231)]=null;['_awaiting']=null;[_0x28a351(0x368)]=crypto[_0x28a351(0x283)]();[_0x28a351(0x29b)]=0x1;constructor(_0x3e265a,_0x5d5ace,_0x358dd3,_0x1f263f,_0x3d5bc4,_0x514476,_0x1a5140){const _0x41ac87=_0x28a351;this[_0x41ac87(0x35e)]=_0x3e265a,this[_0x41ac87(0x214)]=_0x5d5ace,this['_baseRevision']=_0x358dd3,this['_handle']=_0x1f263f,this[_0x41ac87(0x1f7)]=_0x3d5bc4,this[_0x41ac87(0x219)]=_0x514476,this[_0x41ac87(0x245)]=_0x358dd3,this[_0x41ac87(0x2a6)]=new se(_0x514476,_0x3e265a,_0x5d5ace),this[_0x41ac87(0x30f)]=ue(_0x3d5bc4,_0x3e265a,_0x1a5140);}[_0x28a351(0x35a)](){const _0x422229=_0x28a351;return{'awaitingChangeset':this[_0x422229(0x27c)]===null?null:U(this[_0x422229(0x27c)]),'baseRevision':this[_0x422229(0x2fe)],'bufferedChangesetCount':this['_bufferedChangesets'][_0x422229(0x2b6)],'conflict':this[_0x422229(0x231)],'connection':this[_0x422229(0x31b)]?_0x422229(0x271):this['_handle'][_0x422229(0x22d)](),'knownHeadRevision':this['_knownHeadRevision'],'pendingMutationCount':this[_0x422229(0x2a6)]['pending'][_0x422229(0x2b6)]};}['getPendingMutations'](){const _0x3cfb81=_0x28a351;return structuredClone(this['_capture'][_0x3cfb81(0x2a3)]);}[_0x28a351(0x334)](){const _0x1175d8=_0x28a351;return this[_0x1175d8(0x25b)]()||this[_0x1175d8(0x34e)][_0x1175d8(0x350)](async()=>(this[_0x1175d8(0x23f)](_0x1175d8(0x334)),await this['_fetchChangesets']()));}['pull'](){const _0x47c47b=_0x28a351;return this[_0x47c47b(0x25b)]()||this[_0x47c47b(0x34e)][_0x47c47b(0x350)](async()=>{const _0x45d567=_0x47c47b;if(this[_0x45d567(0x23f)](_0x45d567(0x2d8)),await this[_0x45d567(0x230)](),this[_0x45d567(0x320)][_0x45d567(0x2b6)]===0x0)return{'state':this[_0x45d567(0x35a)](),'status':_0x45d567(0x28b)};let _0x24bba0=[...this[_0x45d567(0x320)]];if(_0x24bba0['some'](_0x337cd4=>_0x337cd4[_0x45d567(0x27d)][_0x45d567(0x2e3)](_0x941a5c=>_0x941a5c['id']===_0x4d191d['id'])))throw new j(_0x45d567(0x339),_0x45d567(0x2ef));let _0x267a96=this['_baseRevision'],_0x4fbefd=this[_0x45d567(0x27c)]?W(this[_0x45d567(0x27c)]['mutations'],this[_0x45d567(0x35e)],this[_0x45d567(0x214)],this['_baseRevision']):null,_0x51a6e6=_0xeb2c40({'baseRev':this[_0x45d567(0x2fe)],'memberID':'','mutations':[...this['_capture']['pending']],'revision':0x0,'type':this['unitType'],'unitID':this['unitId'],'userID':''})[_0x45d567(0x27d)],_0x1f61ac=[];for(let _0x247bad of _0x24bba0){let _0x2cb592=_0xeb2c40(_0x247bad);if(this[_0x45d567(0x27c)]!==null&&_0x247bad['sid']===this[_0x45d567(0x27c)][_0x45d567(0x333)]&&_0x247bad[_0x45d567(0x347)]===this[_0x45d567(0x27c)][_0x45d567(0x347)]){let _0x1792c3=(_0x4fbefd??[])[_0x45d567(0x366)](_0x4dcbdd);G(_0x247bad[_0x45d567(0x27d)],_0x1792c3)||await this['_closeAfterFatalError'](new j('COLLABORATION_PROTOCOL_ERROR',_0x45d567(0x301))),_0x1f61ac[_0x45d567(0x22c)]({'changeset':_0x247bad,'kind':_0x45d567(0x28a)}),_0x4fbefd=null;continue;}let _0x3bd524=_0x2cb592['mutations'];if(_0x4fbefd!==null){let _0x5397ac=this[_0x45d567(0x219)][_0x45d567(0x363)][_0x45d567(0x1f8)](_0x3bd524,_0x4fbefd,!0x1);if(!_0x74ccd6(_0x5397ac))return this[_0x45d567(0x231)]={'message':_0x5397ac[_0x45d567(0x32b)][_0x45d567(0x239)],'operation':'pull','reason':_0x45d567(0x331)},{'conflict':this['_conflict'],'state':this['getState'](),'status':_0x45d567(0x338)};_0x3bd524=_0x5397ac[_0x45d567(0x35f)],_0x4fbefd=_0x5397ac[_0x45d567(0x27a)];}let _0x2a85d3=this[_0x45d567(0x219)][_0x45d567(0x363)][_0x45d567(0x1f8)](_0x3bd524,_0x51a6e6,!0x1);if(!_0x74ccd6(_0x2a85d3))return this['_conflict']={'message':_0x2a85d3[_0x45d567(0x32b)][_0x45d567(0x239)],'operation':_0x45d567(0x2d8),'reason':_0x45d567(0x331)},{'conflict':this[_0x45d567(0x231)],'state':this[_0x45d567(0x35a)](),'status':'conflict'};_0x1f61ac['push']({'changeset':_0x54e5d7({..._0x2cb592,'mutations':_0x2a85d3['m1Prime']}),'kind':'remote'}),_0x51a6e6=_0x2a85d3['m2Prime'];}let _0x3443cb=_0x267a96;for(let _0x3a28a5 of _0x1f61ac){if(_0x3a28a5[_0x45d567(0x2b9)]==='awaiting-ack'){let _0x511c4f=this[_0x45d567(0x219)][_0x45d567(0x2d4)][_0x45d567(0x2e9)](this[_0x45d567(0x35e)]);_0x511c4f!==_0x3a28a5[_0x45d567(0x20e)][_0x45d567(0x21c)]&&await this[_0x45d567(0x267)](new j('COLLABORATION_PROTOCOL_ERROR',_0x45d567(0x2c2))),_0x3443cb=_0x511c4f;continue;}_0x3443cb=await this['_replayRemoteChangesets'](_0x3443cb,[_0x3a28a5[_0x45d567(0x20e)]]);}return this['_capture'][_0x45d567(0x225)](_0x51a6e6[_0x45d567(0x366)](_0x4dcbdd)),this[_0x45d567(0x27c)]!==null&&(this['_awaiting']=_0x4fbefd===null?null:{...this[_0x45d567(0x27c)],'baseRev':_0x3443cb,'mutations':_0x4fbefd[_0x45d567(0x366)](_0x4dcbdd)}),this[_0x45d567(0x2fe)]=_0x3443cb,this['_bufferedChangesets'][_0x45d567(0x26d)](0x0),{'appliedChangesets':_0x24bba0[_0x45d567(0x366)](z),'fromRevision':_0x267a96,'state':this[_0x45d567(0x35a)](),'status':'pulled','toRevision':_0x3443cb,'transformedPendingMutationCount':_0x51a6e6['length']};});}['commit'](){const _0x2b06f5=_0x28a351;return this[_0x2b06f5(0x25b)]()||this[_0x2b06f5(0x34e)]['run'](async()=>{const _0x42fd70=_0x2b06f5;this[_0x42fd70(0x23f)](_0x42fd70(0x25e));let _0x5d1868=[],_0x1c8e11=[];if(this[_0x42fd70(0x27c)]===null){if(this['_capture']['pending'][_0x42fd70(0x2b6)]===0x0)return{'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x32a)};if(await this[_0x42fd70(0x230)](),this['_bufferedChangesets']['length']>0x0)return{'baseRevision':this[_0x42fd70(0x2fe)],'confirmedChangesets':_0x5d1868,'knownHeadRevision':this[_0x42fd70(0x245)],'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x335)};this[_0x42fd70(0x351)]();}for(;this[_0x42fd70(0x27c)]!==null;){let _0x52b2c9=this[_0x42fd70(0x27c)],_0x167703;try{_0x167703=await this[_0x42fd70(0x1f6)][_0x42fd70(0x212)](_0x52b2c9);}catch{return{'changeset':U(_0x52b2c9),'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':'unknown'};}if(_0x167703[_0x42fd70(0x27f)]===_0x42fd70(0x228)||_0x167703[_0x42fd70(0x27f)]==='unknown')return{'changeset':U(_0x52b2c9),'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x167703[_0x42fd70(0x27f)]};if(_0x167703[_0x42fd70(0x27f)]===_0x42fd70(0x2f6))return _0x167703['reason']===_0x42fd70(0x260)?(this['_capture'][_0x42fd70(0x2d2)](_0x52b2c9['mutations']),this[_0x42fd70(0x27c)]=null,await this['_fetchChangesets'](),{'baseRevision':this[_0x42fd70(0x2fe)],'confirmedChangesets':_0x5d1868,'knownHeadRevision':this[_0x42fd70(0x245)],'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x335)}):(this[_0x42fd70(0x231)]={'message':_0x167703[_0x42fd70(0x239)],'operation':_0x42fd70(0x25e),'reason':_0x167703['reason']===_0x42fd70(0x275)?_0x42fd70(0x2d6):_0x42fd70(0x354)},{'conflict':this[_0x42fd70(0x231)],'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x338)});let _0x40d47f=_0x167703[_0x42fd70(0x27e)];try{this[_0x42fd70(0x303)](_0x52b2c9,_0x167703[_0x42fd70(0x25d)],_0x40d47f);}catch(_0x251dd1){await this[_0x42fd70(0x267)](_0x251dd1);}let _0x2243c4=_0x52b2c9['mutations'];if(_0x167703[_0x42fd70(0x25d)][_0x42fd70(0x2b6)]>0x0){let _0x300fb1=await this[_0x42fd70(0x22b)](_0x52b2c9,_0x167703[_0x42fd70(0x25d)]);if(_0x300fb1===null)return{'conflict':this[_0x42fd70(0x231)],'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x338)};_0x2243c4=_0x300fb1[_0x42fd70(0x1fe)];try{this[_0x42fd70(0x355)](_0x167703['precedingChangesets']);}catch(_0x19872a){await this['_closeAfterFatalError'](_0x19872a);}_0x1c8e11[_0x42fd70(0x22c)](..._0x167703[_0x42fd70(0x25d)][_0x42fd70(0x366)](z));}G(_0x40d47f['mutations'],_0x2243c4)||await this['_closeAfterFatalError'](new j(_0x42fd70(0x339),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0xb231fa=this[_0x42fd70(0x219)][_0x42fd70(0x2d4)]['incrementRevOfUnit'](this[_0x42fd70(0x35e)]);if(_0xb231fa!==_0x40d47f[_0x42fd70(0x21c)]&&await this['_closeAfterFatalError'](new j(_0x42fd70(0x339),_0x42fd70(0x233))),this[_0x42fd70(0x2fe)]=_0xb231fa,this[_0x42fd70(0x245)]=Math['max'](this[_0x42fd70(0x245)],_0xb231fa),this[_0x42fd70(0x27c)]=null,_0x5d1868[_0x42fd70(0x22c)](z(_0x40d47f)),this[_0x42fd70(0x2a6)][_0x42fd70(0x2a3)][_0x42fd70(0x2b6)]===0x0)break;this['_createAwaitingFromPending']();}return{'confirmedChangesets':_0x5d1868,'reconciledChangesets':_0x1c8e11,'state':this[_0x42fd70(0x35a)](),'status':'confirmed'};});}async['_fetchChangesets'](){const _0x2d2a16=_0x28a351;let _0x511128=this[_0x2d2a16(0x245)],_0x5bf891=await this[_0x2d2a16(0x1f6)][_0x2d2a16(0x2f4)](_0x511128,void 0x0);if(_0x1d0608(_0x5bf891['error'])){let _0x44dc50=_0x5bf891[_0x2d2a16(0x32b)];throw new j(_0x2d2a16(0x215),_0x44dc50?.[_0x2d2a16(0x239)]||'Backend\x20failed\x20to\x20fetch\x20changesets',{'retryable':!0x0});}let _0x2f17ac=R(_0x5bf891[_0x2d2a16(0x2ad)],this[_0x2d2a16(0x35e)],this[_0x2d2a16(0x214)],_0x511128),_0x4a101d=_0x2f17ac['at'](-0x1)?.['revision']??_0x511128;if(_0x5bf891[_0x2d2a16(0x279)]!==void 0x0&&_0x5bf891['latestRevision']!==_0x4a101d)throw new j(_0x2d2a16(0x339),_0x2d2a16(0x20c));return _0x2f17ac[_0x2d2a16(0x2b6)]===0x0?{'knownHeadRevision':this[_0x2d2a16(0x245)],'state':this[_0x2d2a16(0x35a)](),'status':_0x2d2a16(0x2fa)}:(this['_bufferedChangesets'][_0x2d2a16(0x22c)](..._0x2f17ac),this['_knownHeadRevision']=_0x4a101d,{'changesets':_0x2f17ac[_0x2d2a16(0x366)](z),'fromRevision':_0x511128,'state':this[_0x2d2a16(0x35a)](),'status':_0x2d2a16(0x25a),'toRevision':_0x4a101d});}[_0x28a351(0x351)](){const _0x11d735=_0x28a351;let _0x255a8b=this[_0x11d735(0x2a6)][_0x11d735(0x315)]();this[_0x11d735(0x27c)]={'baseRev':this[_0x11d735(0x2fe)],'mutations':_0x255a8b,'reqId':this[_0x11d735(0x29b)],'sid':this['_sid']},this[_0x11d735(0x29b)]+=0x1;}[_0x28a351(0x303)](_0x28bbed,_0x2c16ff,_0x22c075){const _0x16861d=_0x28a351;let _0x15f185=R(_0x2c16ff,this[_0x16861d(0x35e)],this[_0x16861d(0x214)],this[_0x16861d(0x2fe)])['at'](-0x1)?.[_0x16861d(0x21c)]??this['_baseRevision'];if(_0x22c075[_0x16861d(0x202)]!==this[_0x16861d(0x35e)]||_0x22c075[_0x16861d(0x273)]!==this[_0x16861d(0x214)]||_0x22c075[_0x16861d(0x333)]!==_0x28bbed[_0x16861d(0x333)]||_0x22c075[_0x16861d(0x347)]!==_0x28bbed[_0x16861d(0x347)]||_0x22c075[_0x16861d(0x22a)]!==_0x15f185||_0x22c075[_0x16861d(0x21c)]!==_0x15f185+0x1)throw new j(_0x16861d(0x339),'Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset');}async['_reconcilePrecedingChangesets'](_0x1f7a18,_0x2e683e){const _0x462844=_0x28a351;let _0x49bd9a=W(_0x1f7a18[_0x462844(0x27d)],this[_0x462844(0x35e)],this[_0x462844(0x214)],this[_0x462844(0x2fe)]),_0x8b8565=W(this[_0x462844(0x2a6)][_0x462844(0x2a3)],this[_0x462844(0x35e)],this[_0x462844(0x214)],this[_0x462844(0x2fe)]),_0xa56e9e=[];for(let _0x46eda8 of _0x2e683e){let _0x1787d7=_0xeb2c40(_0x46eda8),_0xabebbe=this[_0x462844(0x219)][_0x462844(0x363)][_0x462844(0x1f8)](_0x1787d7[_0x462844(0x27d)],_0x49bd9a,!0x1);if(!_0x74ccd6(_0xabebbe))return this[_0x462844(0x26f)](_0x462844(0x25e),_0xabebbe[_0x462844(0x32b)]),null;_0x49bd9a=_0xabebbe['m2Prime'];let _0x1223f6=this['_kernel'][_0x462844(0x363)][_0x462844(0x1f8)](_0xabebbe[_0x462844(0x35f)],_0x8b8565,!0x1);if(!_0x74ccd6(_0x1223f6))return this['_setTransformConflict'](_0x462844(0x25e),_0x1223f6['error']),null;_0x8b8565=_0x1223f6[_0x462844(0x27a)],_0xa56e9e['push'](_0x54e5d7({..._0x1787d7,'mutations':_0x1223f6[_0x462844(0x35f)]}));}let _0x57149a=await this['_replayRemoteChangesets'](this['_baseRevision'],_0xa56e9e);return this['_capture'][_0x462844(0x225)](_0x8b8565[_0x462844(0x366)](_0x4dcbdd)),this[_0x462844(0x2fe)]=_0x57149a,{'awaitingMutations':_0x49bd9a[_0x462844(0x366)](_0x4dcbdd),'revision':_0x57149a};}[_0x28a351(0x26f)](_0x40f67e,_0x2eb99b){const _0xcf3eda=_0x28a351;this[_0xcf3eda(0x231)]={'message':_0x2eb99b[_0xcf3eda(0x239)],'operation':_0x40f67e,'reason':_0xcf3eda(0x331)};}async[_0x28a351(0x2cf)](_0x143a39,_0x3838c1){const _0xdb1c06=_0x28a351;try{return await this['_capture'][_0xdb1c06(0x278)](async()=>B(this['_kernel'],this[_0xdb1c06(0x35e)],this['unitType'],_0x143a39,_0x3838c1,_0xdb1c06(0x203)));}catch(_0x5ad12b){return await this['_closeAfterFatalError'](_0x5ad12b);}}async[_0x28a351(0x267)](_0x103bab){const _0x48e56f=_0x28a351;this['_acceptingOperations']=!0x1,this[_0x48e56f(0x2ff)]??=this[_0x48e56f(0x2fc)]();try{await this[_0x48e56f(0x2ff)];}catch{}throw _0x103bab;}['_consumeBufferedPrecedingChangesets'](_0x1337fa){const _0x310270=_0x28a351;let _0x412ada=_0x1337fa['at'](-0x1)?.[_0x310270(0x21c)];if(_0x412ada===void 0x0||this['_bufferedChangesets'][_0x310270(0x2b6)]===0x0)return;let _0x2dde5a=this['_bufferedChangesets'][_0x310270(0x2b1)](({revision:_0x2f3144})=>_0x2f3144>_0x412ada),_0x10bd1f=this[_0x310270(0x320)][_0x310270(0x29c)](0x0,_0x2dde5a===-0x1?this[_0x310270(0x320)][_0x310270(0x2b6)]:_0x2dde5a);for(let _0x49bf1e of _0x10bd1f){let _0x4587aa=_0x1337fa[_0x310270(0x318)](({revision:_0x757a0e})=>_0x757a0e===_0x49bf1e['revision']);if(!_0x4587aa||!pe(_0x49bf1e,_0x4587aa))throw new j(_0x310270(0x339),_0x310270(0x2af));}this[_0x310270(0x320)]['splice'](0x0,_0x10bd1f['length']);}[_0x28a351(0x330)](_0x297624){const _0x19e756=_0x28a351;return this[_0x19e756(0x25b)]()||this[_0x19e756(0x34e)][_0x19e756(0x350)](async()=>{const _0x57c968=_0x19e756;_0x297624[_0x57c968(0x244)]===_0x57c968(0x2e2)&&this['_assertMutableState'](_0x57c968(0x2e2));let _0x50cbaf=this[_0x57c968(0x2a6)][_0x57c968(0x2a3)][_0x57c968(0x2b6)],_0x506fc1=P(await this[_0x57c968(0x30f)][_0x57c968(0x330)](_0x297624['code'],_0x297624['mode']));return _0x297624['mode']===_0x57c968(0x2d9)?{'state':this['getState'](),'value':_0x506fc1}:{'mutations':this['_capture'][_0x57c968(0x361)](_0x50cbaf),'state':this[_0x57c968(0x35a)](),'value':_0x506fc1};});}[_0x28a351(0x235)](_0x379ece){const _0x2cf981=_0x28a351;return this['_rejectIfNotAccepting']()||this[_0x2cf981(0x34e)]['run'](async()=>{const _0x98aa00=_0x2cf981;if(this[_0x98aa00(0x23f)]('replace\x20mutations'),this[_0x98aa00(0x27c)]!==null)throw new j(_0x98aa00(0x274),_0x98aa00(0x352));let _0x4b2b1d=me(_0x379ece),_0x58d3b5=[...this['_capture'][_0x98aa00(0x2a3)]];this[_0x98aa00(0x2a6)]['replacePending'](_0x4b2b1d);let _0x1a4250=this['getState']();return{'pendingMutationCount':_0x4b2b1d[_0x98aa00(0x2b6)],'previousMutationCount':_0x58d3b5[_0x98aa00(0x2b6)],'state':_0x1a4250};});}[_0x28a351(0x33f)](){const _0xdf58cb=_0x28a351;return this[_0xdf58cb(0x25b)]()||this[_0xdf58cb(0x34e)][_0xdf58cb(0x350)](async()=>V(this['_univer'],this[_0xdf58cb(0x35e)],this[_0xdf58cb(0x214)]));}[_0x28a351(0x2f7)](){const _0x25bb3c=_0x28a351;return this['_closePromise']?this[_0x25bb3c(0x2ff)]:(this['_acceptingOperations']=!0x1,this[_0x25bb3c(0x2ff)]=this[_0x25bb3c(0x34e)][_0x25bb3c(0x350)](async()=>await this[_0x25bb3c(0x2fc)]()),this[_0x25bb3c(0x2ff)]);}async[_0x28a351(0x2fc)](){const _0x4903ad=_0x28a351;try{this['_capture'][_0x4903ad(0x285)](),await this[_0x4903ad(0x1f6)][_0x4903ad(0x2f7)]();}finally{try{this[_0x4903ad(0x1f7)][_0x4903ad(0x285)]();}finally{this[_0x4903ad(0x31b)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x42f481=_0x28a351;return this['_acceptingOperations']?null:Promise[_0x42f481(0x298)](new j(_0x42f481(0x293),'Collaboration\x20runtime\x20is\x20closing\x20or\x20closed'));}['_assertMutableState'](_0x27d61d){const _0x39eccb=_0x28a351;if(this[_0x39eccb(0x231)]!==null)throw new j(_0x39eccb(0x274),'Cannot\x20'+_0x27d61d+_0x39eccb(0x1f3));}};function U(_0xbee2d0){const _0x3f0cc6=_0x28a351;return{'baseRevision':_0xbee2d0[_0x3f0cc6(0x22a)],'mutationCount':_0xbee2d0[_0x3f0cc6(0x27d)][_0x3f0cc6(0x2b6)],'reqId':_0xbee2d0[_0x3f0cc6(0x347)],'revision':0x0,'sid':_0xbee2d0[_0x3f0cc6(0x333)]};}function W(_0xbd5e4a,_0x356f1c,_0x1ea63d,_0x224d85){const _0x5cf181=_0x28a351;return _0xeb2c40({'baseRev':_0x224d85,'memberID':'','mutations':[..._0xbd5e4a],'revision':0x0,'type':_0x1ea63d,'unitID':_0x356f1c,'userID':''})[_0x5cf181(0x27d)];}function pe(_0xd65412,_0x545986){const _0x15d709=_0x28a351;return _0xd65412[_0x15d709(0x202)]===_0x545986[_0x15d709(0x202)]&&_0xd65412[_0x15d709(0x273)]===_0x545986[_0x15d709(0x273)]&&_0xd65412['baseRev']===_0x545986['baseRev']&&_0xd65412[_0x15d709(0x21c)]===_0x545986['revision']&&_0xd65412['sid']===_0x545986[_0x15d709(0x333)]&&_0xd65412[_0x15d709(0x347)]===_0x545986[_0x15d709(0x347)]&&JSON['stringify'](_0xd65412[_0x15d709(0x27d)])===JSON[_0x15d709(0x326)](_0x545986[_0x15d709(0x27d)]);}function G(_0x1383ec,_0x48bed1){const _0x38c23a=_0x28a351;return _0x1383ec[_0x38c23a(0x2b6)]===_0x48bed1[_0x38c23a(0x2b6)]&&_0x1383ec['every']((_0x51f9fc,_0x155f3d)=>_0x51f9fc['id']===_0x48bed1[_0x155f3d]?.['id']&&_0x51f9fc[_0x38c23a(0x2ca)]===_0x48bed1[_0x155f3d]?.[_0x38c23a(0x2ca)]);}function me(_0x11aa9f){const _0xb54418=_0x28a351;if(!Array['isArray'](_0x11aa9f))throw new j(_0xb54418(0x274),'Replacement\x20mutations\x20must\x20be\x20an\x20array');return _0x11aa9f[_0xb54418(0x366)](_0x193497=>{const _0x1763b5=_0xb54418;if(!_0x193497||typeof _0x193497!='object'||typeof _0x193497['id']!='string'||_0x193497['id'][_0x1763b5(0x2b6)]===0x0||typeof _0x193497['data']!=_0x1763b5(0x30c))throw new j(_0x1763b5(0x274),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x193497[_0x1763b5(0x2ca)],'id':_0x193497['id']};});}var K=class extends _0x45c71a{['_config'];[_0x28a351(0x2bb)];static ['pluginName']=_0x28a351(0x309);constructor(_0x13c6e7,_0x43e55a){const _0x2e6442=_0x28a351;super(),this[_0x2e6442(0x2d1)]=_0x13c6e7,this['_injector']=_0x43e55a;}[_0x28a351(0x348)](){const _0x1e7867=_0x28a351;this['_config'][_0x1e7867(0x296)]!==void 0x0&&_0x9caa23(this[_0x1e7867(0x2bb)],[[_0x2114fe,{'useValue':this[_0x1e7867(0x2d1)]['snapshotServerService']}]]),this[_0x1e7867(0x2d1)][_0x1e7867(0x348)]({'commandService':this[_0x1e7867(0x2bb)]['get'](_0x24a215),'compressMutationService':this['_injector'][_0x1e7867(0x1fc)](_0x45cd35),'instanceService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x4f82f9),'injector':this[_0x1e7867(0x2bb)],'revisionService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x56a7c3),'transformService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x309abf)});}};K=_0x5bf473([_0x47e19f(_0x91edc2),_0x45e199(0x1,_0x407b4d(_0x419b26))],K);function he(_0xf07488,_0x1ca6da){const _0x1260ac=_0x28a351;let _0x409ce4;if(_0xf07488[_0x1260ac(0x2bc)](K,{'onStarting'(_0xc544d5){_0x409ce4=_0xc544d5;},..._0x1ca6da===void 0x0?{}:{'snapshotServerService':_0x1ca6da}}),!_0x409ce4)throw Error('Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle');return _0x409ce4;}async function ge(_0x1adf9b,_0x2a4472,_0xe24771){const _0x53f509=_0x28a351;let _0x2cabd7=await _0x1adf9b['getUnitOnRev'](0x0);if(_0x1d0608(_0x2cabd7[_0x53f509(0x32b)])){let _0x18f087=_0x2cabd7[_0x53f509(0x32b)];throw new j('COLLABORATION_LOAD_FAILED',_0x18f087?.[_0x53f509(0x239)]||_0x53f509(0x24e));}let _0x42f6b7=_0x2cabd7['snapshot'];if(!_0x42f6b7)throw new j(_0x53f509(0x33c),_0x53f509(0x22e));_e(_0x42f6b7,_0x2a4472,_0xe24771);try{switch(_0xe24771){case _0x27cc9f['UNIVER_SHEET']:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':await _0x25d93a(_0x42f6b7,await q(_0x1adf9b,_0x42f6b7)),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x30d)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x6ffd28(_0x42f6b7),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x27b)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x1ce93e(_0x42f6b7),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x314)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':await _0x16c6bc(_0x42f6b7,await q(_0x1adf9b,_0x42f6b7)),'unitType':_0xe24771};case _0x27cc9f['UNIVER_BOARD']:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x641f7a(_0x42f6b7),'unitType':_0xe24771};default:throw new j('COLLABORATION_INVALID_INPUT',_0x53f509(0x329)+_0xe24771);}}catch(_0x79c59f){throw _0x79c59f instanceof j?_0x79c59f:new j(_0x53f509(0x33c),_0x53f509(0x2b4),{'cause':_0x79c59f});}}function _e(_0x33bddd,_0x19bb2e,_0x218abb){const _0x509d61=_0x28a351;if(_0x33bddd[_0x509d61(0x202)]!==_0x19bb2e||_0x33bddd[_0x509d61(0x273)]!==_0x218abb)throw new j(_0x509d61(0x33c),_0x509d61(0x302));if(!Number[_0x509d61(0x34c)](_0x33bddd['rev'])||_0x33bddd[_0x509d61(0x332)]<0x1)throw new j(_0x509d61(0x33c),_0x509d61(0x280));}async function q(_0x3e6191,_0x39af6c){const _0x361d84=_0x28a351;let _0x4dee71=_0x39af6c['workbook'];if(!_0x4dee71)throw new j(_0x361d84(0x33c),_0x361d84(0x213));let _0x46c330=Object[_0x361d84(0x2c0)](_0x4dee71[_0x361d84(0x2f1)])['flatMap'](({blocks:_0x222826})=>_0x222826);if(new Set(_0x46c330)['size']!==_0x46c330['length'])throw new j(_0x361d84(0x33c),'Snapshot\x20contains\x20duplicate\x20block\x20ids');return await Promise[_0x361d84(0x207)](_0x46c330[_0x361d84(0x366)](async _0x493db7=>{const _0xf96ed8=_0x361d84;let _0x374b36=await _0x3e6191['getSheetBlock'](_0x493db7);if(_0x1d0608(_0x374b36[_0xf96ed8(0x32b)])||!_0x374b36[_0xf96ed8(0x200)])throw new j('COLLABORATION_LOAD_FAILED',_0x374b36[_0xf96ed8(0x32b)]?.[_0xf96ed8(0x239)]||_0xf96ed8(0x25f)+_0x493db7+'\x20is\x20unavailable');if(_0x374b36[_0xf96ed8(0x200)]['id']!==_0x493db7)throw new j(_0xf96ed8(0x33c),_0xf96ed8(0x25f)+_0x493db7+_0xf96ed8(0x2d3));return _0x374b36['block'];}));}function ve(_0x1a7642){const _0xcab7ad=_0x28a351;let _0x362da0=_0x1a7642[_0xcab7ad(0x2d7)]??0xa00000;if(!Number[_0xcab7ad(0x34c)](_0x362da0)||_0x362da0<=0x0)throw new j(_0xcab7ad(0x274),_0xcab7ad(0x2ed));return{async 'load'(_0xca669f,_0x232a06){const _0x2a3805=_0xcab7ad;be(_0xca669f,_0x232a06);let _0x62a189,_0x532810={'unitId':_0xca669f,'unitType':_0x232a06},_0x120d31={'unitId':_0xca669f,'unitType':_0x232a06,..._0x1a7642['snapshotServerService']===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x12ea2c=_0x2b76;if(_0x62a189===void 0x0)throw new j(_0x12ea2c(0x33c),_0x12ea2c(0x32c));return _0x62a189;}}},_0x57cd07;try{_0x57cd07=await _0x1a7642[_0x2a3805(0x2e8)][_0x2a3805(0x29f)](_0x532810);}catch(_0x263b2a){throw new j(_0x2a3805(0x215),'Failed\x20to\x20open\x20the\x20collaboration\x20backend',{'cause':_0x263b2a,'retryable':!0x0});}let _0x31cc16;try{_0x31cc16=await _0x1a7642[_0x2a3805(0x258)](_0x120d31);let _0x37bcdd=he(_0x31cc16,_0x1a7642[_0x2a3805(0x296)]);_0x1a7642[_0x2a3805(0x296)]!==void 0x0&&(_0x62a189=_0x37bcdd['injector'][_0x2a3805(0x1fc)](_0x3e3e5b));let _0x42de48=await xe(_0x57cd07,_0xca669f,_0x232a06);Se(_0x42de48,_0x532810),Ce(_0x31cc16,_0x42de48);let _0x5913a1=B(_0x37bcdd,_0xca669f,_0x232a06,J(_0x42de48[_0x2a3805(0x2f8)]),_0x42de48[_0x2a3805(0x2ad)]),_0x56f844=await _0x57cd07[_0x2a3805(0x2f4)](_0x5913a1,void 0x0);if(_0x1d0608(_0x56f844[_0x2a3805(0x32b)])){let _0x42be9d=_0x56f844['error'];throw new j(_0x2a3805(0x215),_0x42be9d?.[_0x2a3805(0x239)]||_0x2a3805(0x251),{'retryable':!0x0});}let _0x4fa8d9=R(_0x56f844[_0x2a3805(0x2ad)],_0xca669f,_0x232a06,_0x5913a1),_0x89871a=_0x4fa8d9['at'](-0x1)?.[_0x2a3805(0x21c)]??_0x5913a1;if(_0x56f844['latestRevision']!==void 0x0&&_0x56f844['latestRevision']!==_0x89871a)throw new j(_0x2a3805(0x339),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range');return _0x5913a1=B(_0x37bcdd,_0xca669f,_0x232a06,_0x5913a1,_0x4fa8d9),await ye(_0x37bcdd),new fe(_0xca669f,_0x232a06,_0x5913a1,_0x57cd07,_0x31cc16,_0x37bcdd,_0x362da0);}catch(_0x4b2902){try{await _0x57cd07[_0x2a3805(0x2f7)]();}catch{}try{_0x31cc16?.[_0x2a3805(0x285)]();}catch{}throw _0x4b2902 instanceof j?_0x4b2902:new j(_0x2a3805(0x33c),_0x2a3805(0x261),{'cause':_0x4b2902});}}};}async function ye(_0x5b5282){const _0x1d1b0f=_0x28a351;_0x5b5282['injector'][_0x1d1b0f(0x281)](_0x3c1c2d)&&await _0x5b5282[_0x1d1b0f(0x336)][_0x1d1b0f(0x1fc)](_0x3c1c2d)['waitForLatestApplied']();}function be(_0x294f24,_0x3ae24e){const _0x19cc8d=_0x28a351;if(_0x294f24[_0x19cc8d(0x227)]()[_0x19cc8d(0x2b6)]===0x0)throw new j(_0x19cc8d(0x274),'unitId\x20must\x20not\x20be\x20empty');if(_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x34d)]&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x30d)]&&_0x3ae24e!==_0x27cc9f['UNIVER_SLIDE']&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x314)]&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x287)])throw new j(_0x19cc8d(0x274),_0x19cc8d(0x329)+_0x3ae24e);}async function xe(_0x58deee,_0x5a64fa,_0x2147d0){const _0x1563b8=_0x28a351;return _0x58deee[_0x1563b8(0x224)]===_0x1563b8(0x32e)?await _0x58deee['getUnitData']():await ge(_0x58deee,_0x5a64fa,_0x2147d0);}function Se(_0x187856,_0x5f4bcc){const _0x263e0d=_0x28a351;if(_0x187856[_0x263e0d(0x214)]!==_0x5f4bcc[_0x263e0d(0x214)])throw new j(_0x263e0d(0x33c),'Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type');if(_0x187856[_0x263e0d(0x2f8)]['id']!==_0x5f4bcc[_0x263e0d(0x35e)])throw new j(_0x263e0d(0x33c),'Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id');J(_0x187856['unitData']);}function J(_0x39f194){const _0x8c1f12=_0x28a351;let _0x3646be=_0x39f194['rev'];if(!Number[_0x8c1f12(0x34c)](_0x3646be)||_0x3646be===void 0x0||_0x3646be<0x1)throw new j(_0x8c1f12(0x33c),_0x8c1f12(0x256));return _0x3646be;}function Ce(_0x35efa3,_0x2a899d){const _0x3f5ab8=_0x28a351;switch(_0x2a899d['unitType']){case _0x27cc9f[_0x3f5ab8(0x34d)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f[_0x3f5ab8(0x30d)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f['UNIVER_SLIDE']:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f[_0x3f5ab8(0x314)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d['unitType'],structuredClone(_0x2a899d['unitData']));return;case _0x27cc9f[_0x3f5ab8(0x287)]:_0x35efa3['createUnit'](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;}}var we=class{[_0x28a351(0x2d1)];[_0x28a351(0x33a)];['_lease'];['format']=_0x28a351(0x2ce);constructor(_0x70606f,_0x2674ce,_0x5e7f07){const _0x14e8a9=_0x28a351;this[_0x14e8a9(0x2d1)]=_0x70606f,this['_target']=_0x2674ce,this[_0x14e8a9(0x362)]=_0x5e7f07;}[_0x28a351(0x22d)](){const _0x5c0cbd=_0x28a351;return this['_lease'][_0x5c0cbd(0x22d)]();}async['getUnitOnRev'](_0x523ff5=0x0){const _0x435ac3=_0x28a351;let _0x1ef906=X(this[_0x435ac3(0x2d1)][_0x435ac3(0x2cb)],this[_0x435ac3(0x33a)][_0x435ac3(0x214)],'unit',this[_0x435ac3(0x33a)][_0x435ac3(0x35e)],_0x435ac3(0x332),_0x523ff5),_0x55652d=await Y(this[_0x435ac3(0x2d1)],_0x1ef906);return Te(_0x55652d[_0x435ac3(0x2ce)]),_0x55652d;}async['getSheetBlock'](_0x33300c){const _0x2d84fb=_0x28a351;let _0x464f49=X(this[_0x2d84fb(0x2d1)][_0x2d84fb(0x2cb)],this[_0x2d84fb(0x33a)][_0x2d84fb(0x214)],_0x2d84fb(0x2e7),this[_0x2d84fb(0x33a)]['unitId'],'block',_0x33300c),_0x160346=await Y(this[_0x2d84fb(0x2d1)],_0x464f49);return _0x160346[_0x2d84fb(0x200)]&&typeof _0x160346[_0x2d84fb(0x200)][_0x2d84fb(0x2ca)]==_0x2d84fb(0x30c)&&(_0x160346[_0x2d84fb(0x200)][_0x2d84fb(0x2ca)]=Z(_0x160346[_0x2d84fb(0x200)]['data'])),_0x160346;}async[_0x28a351(0x2f4)](_0x10606c,_0x2cd081=0x0){const _0x253736=_0x28a351;let _0x278290=X(this[_0x253736(0x2d1)]['snapshotServerUrl'],this[_0x253736(0x33a)][_0x253736(0x214)],'unit',this[_0x253736(0x33a)]['unitId'],_0x253736(0x2dc));_0x278290[_0x253736(0x299)][_0x253736(0x24f)](_0x253736(0x23e),String(_0x10606c)),_0x278290[_0x253736(0x299)][_0x253736(0x24f)]('to',String(_0x2cd081));let _0x426e91=await Y(this[_0x253736(0x2d1)],_0x278290);return this[_0x253736(0x362)][_0x253736(0x288)](),_0x426e91;}async[_0x28a351(0x212)](_0x1d74aa){const _0x221179=_0x28a351;await this['_lease'][_0x221179(0x223)]();let _0x1b454a=this[_0x221179(0x362)]['waitForSubmission'](_0x1d74aa[_0x221179(0x333)],_0x1d74aa['reqId']),_0x2b1e8b={..._0x1d74aa,'memberID':this[_0x221179(0x362)][_0x221179(0x29e)],'revision':0x0,'type':this[_0x221179(0x33a)]['unitType'],'unitID':this[_0x221179(0x33a)][_0x221179(0x35e)],'userID':''},_0x27f835=X(this[_0x221179(0x2d1)][_0x221179(0x31e)],this['_target'][_0x221179(0x214)],_0x221179(0x2e7),this[_0x221179(0x33a)]['unitId'],_0x221179(0x34b)),_0x416c75=this[_0x221179(0x2d1)][_0x221179(0x241)](_0x27f835,{'body':JSON[_0x221179(0x326)]({'changeset':_0x2b1e8b,'memberID':this[_0x221179(0x362)][_0x221179(0x29e)],'type':this[_0x221179(0x33a)][_0x221179(0x214)],'unitID':this[_0x221179(0x33a)][_0x221179(0x35e)]}),'headers':{'content-type':_0x221179(0x2a0)},'method':_0x221179(0x2bd)})[_0x221179(0x201)](async _0x543f19=>_0x543f19[_0x221179(0x27f)]===0x191||_0x543f19[_0x221179(0x27f)]===0x193?_0x221179(0x26a):_0x543f19[_0x221179(0x27f)]===0x190||_0x543f19['status']===0x199?_0x221179(0x1f9):_0x543f19['ok']?'accepted':_0x221179(0x291))[_0x221179(0x2c6)](()=>_0x221179(0x291)),_0x21ac53=Ee(this['_config']['commitTimeoutMs']),_0x453708=_0x416c75['then'](_0x23b30d=>_0x23b30d===_0x221179(0x26a)?{'status':_0x221179(0x2d6)}:_0x23b30d===_0x221179(0x1f9)?{'status':_0x221179(0x354)}:new Promise(()=>void 0x0)),_0x376e66=await Promise[_0x221179(0x218)]([_0x1b454a['promise'],_0x453708,_0x21ac53[_0x221179(0x2b3)][_0x221179(0x201)](()=>({'status':'timeout'}))])['finally'](()=>{const _0x2447e9=_0x221179;_0x1b454a[_0x2447e9(0x24a)](),_0x21ac53[_0x2447e9(0x24a)]();});if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x221)){let _0x2e9352=await _0x416c75;return _0x2e9352==='permission'?{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x221179(0x275),'status':_0x221179(0x2f6)}:_0x2e9352===_0x221179(0x1f9)?{'message':_0x221179(0x297),'reason':'invalid-changeset','status':_0x221179(0x2f6)}:{'status':_0x221179(0x291)};}if(_0x376e66['status']==='closed')return{'status':_0x221179(0x291)};if(_0x376e66[_0x221179(0x27f)]==='retry')return{'status':_0x221179(0x228)};if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x2d6))return{'message':_0x221179(0x23d),'reason':'permission-denied','status':_0x221179(0x2f6)};if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x354)){let _0x1c589e=await this[_0x221179(0x2f4)](_0x1d74aa['baseRev'],_0x1d74aa['baseRev']);return{'message':_0x221179(0x297),'reason':_0x1c589e[_0x221179(0x279)]!==void 0x0&&_0x1c589e[_0x221179(0x279)]<_0x1d74aa[_0x221179(0x22a)]?'invalid-revision':'invalid-changeset','status':'rejected'};}let _0x417133=_0x376e66[_0x221179(0x20e)],_0x4a949b=await this[_0x221179(0x2f4)](_0x1d74aa[_0x221179(0x22a)],_0x417133[_0x221179(0x21c)]-0x1);if(_0x1d0608(_0x4a949b[_0x221179(0x32b)])){let _0x28bf7f=_0x4a949b['error'];throw new j(_0x221179(0x215),_0x28bf7f?.[_0x221179(0x239)]||_0x221179(0x246),{'retryable':!0x0});}return{'acceptedChangeset':_0x417133,'precedingChangesets':_0x4a949b[_0x221179(0x2ad)],'status':_0x221179(0x359)};}async[_0x28a351(0x2f7)](){const _0x544007=_0x28a351;await this['_lease'][_0x544007(0x2f7)]();}};async function Y(_0x2628c7,_0x20e4d1){const _0x380303=_0x28a351;let _0x38f634;try{_0x38f634=await _0x2628c7[_0x380303(0x241)](_0x20e4d1,{'method':'GET'});}catch(_0x83a00b){throw new j(_0x380303(0x215),_0x380303(0x1fd),{'cause':_0x83a00b,'retryable':!0x0});}if(!_0x38f634['ok'])throw new j(_0x380303(0x215),_0x380303(0x365)+_0x38f634[_0x380303(0x27f)],{'retryable':_0x38f634[_0x380303(0x27f)]>=0x1f4});try{return await _0x38f634[_0x380303(0x2f5)]();}catch(_0x158a5c){throw new j(_0x380303(0x339),'Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON',{'cause':_0x158a5c});}}function X(_0x13131d,..._0x45fc92){const _0x4ab38c=_0x28a351;let _0x1a15e4=new URL(_0x13131d);return _0x1a15e4[_0x4ab38c(0x286)]=_0x1a15e4[_0x4ab38c(0x286)][_0x4ab38c(0x1fa)](/\/$/,'')+'/'+_0x45fc92[_0x4ab38c(0x366)](_0x691694=>encodeURIComponent(String(_0x691694)))['join']('/'),_0x1a15e4;}function Te(_0xa7ada0){const _0x50f83f=_0x28a351;if(!_0xa7ada0)return;let _0x1203a7=[_0xa7ada0['workbook'],_0xa7ada0['doc'],_0xa7ada0['slide'],_0xa7ada0[_0x50f83f(0x2a8)]];for(let _0x468615 of _0x1203a7)_0x468615&&typeof _0x468615[_0x50f83f(0x321)]==_0x50f83f(0x30c)&&(_0x468615[_0x50f83f(0x321)]=Z(_0x468615[_0x50f83f(0x321)]));if(_0xa7ada0['workbook']){for(let _0x32598a of Object[_0x50f83f(0x2c0)](_0xa7ada0[_0x50f83f(0x2c9)][_0x50f83f(0x36b)]))typeof _0x32598a[_0x50f83f(0x321)]=='string'&&(_0x32598a[_0x50f83f(0x321)]=Z(_0x32598a[_0x50f83f(0x321)]));}}function Z(_0x34ddad){const _0x5da7be=_0x28a351;return Uint8Array[_0x5da7be(0x23e)](Buffer[_0x5da7be(0x23e)](_0x34ddad,'base64'));}function Ee(_0x20da55){let _0x489c6a;return{'cancel':()=>{_0x489c6a!==void 0x0&&clearTimeout(_0x489c6a);},'promise':new Promise(_0x4a3549=>{_0x489c6a=setTimeout(_0x4a3549,_0x20da55);})};}var De=class{[_0x28a351(0x2d1)];[_0x28a351(0x2f9)]='offline';['_socket'];[_0x28a351(0x264)];[_0x28a351(0x25c)]='';[_0x28a351(0x2c3)]=new Map();[_0x28a351(0x358)]=new Map();[_0x28a351(0x222)]=new Map();[_0x28a351(0x210)]=new Map();[_0x28a351(0x234)];['_reconnectTimer'];[_0x28a351(0x24d)]=0x0;constructor(_0x219382){const _0x5b3a28=_0x28a351;this[_0x5b3a28(0x2d1)]=_0x219382;}async[_0x28a351(0x33e)](_0x53bf2c){const _0x22e7d9=_0x28a351;let _0xa280bd=this[_0x22e7d9(0x2c3)][_0x22e7d9(0x1fc)](_0x53bf2c['unitId']);if(_0xa280bd&&_0xa280bd[_0x22e7d9(0x2f0)][_0x22e7d9(0x214)]!==_0x53bf2c[_0x22e7d9(0x214)])throw new j(_0x22e7d9(0x274),_0x22e7d9(0x220));if(await this['_ensureConnected'](),_0xa280bd)_0xa280bd[_0x22e7d9(0x2b7)]+=0x1;else{try{await this[_0x22e7d9(0x304)](_0x53bf2c);}catch(_0x264f09){throw this['_joined'][_0x22e7d9(0x35b)]===0x0&&(this['_state']=_0x22e7d9(0x271),this[_0x22e7d9(0x20f)](),this[_0x22e7d9(0x2a2)]?.[_0x22e7d9(0x2f7)](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x22e7d9(0x2a2)]=void 0x0,this[_0x22e7d9(0x25c)]=''),_0x264f09;}this[_0x22e7d9(0x2c3)][_0x22e7d9(0x24f)](_0x53bf2c[_0x22e7d9(0x35e)],{'leases':0x1,'target':_0x53bf2c});}let _0x12d6ed=!0x1,_0x576d26=()=>this['_memberId'],_0x20b210=new Set();return{'close':async()=>{const _0x26861f=_0x22e7d9;if(!_0x12d6ed){_0x12d6ed=!0x0;for(let _0x463d34 of _0x20b210)_0x463d34[_0x26861f(0x24a)]();_0x20b210[_0x26861f(0x327)](),await this[_0x26861f(0x32f)](_0x53bf2c['unitId']);}},'ensureOnline':async()=>await this[_0x22e7d9(0x28f)](),'getConnectionState':()=>_0x12d6ed?_0x22e7d9(0x271):this[_0x22e7d9(0x2f9)],get 'memberId'(){return _0x576d26();},'takeInboundChangesets':()=>{const _0x57b78c=_0x22e7d9;let _0x182f7f=this[_0x57b78c(0x210)][_0x57b78c(0x1fc)](_0x53bf2c[_0x57b78c(0x35e)])??[];return this[_0x57b78c(0x210)][_0x57b78c(0x342)](_0x53bf2c[_0x57b78c(0x35e)]),_0x182f7f;},'waitForSubmission':(_0x29b89b,_0x283063)=>{const _0x12b2bb=_0x22e7d9;let _0x668040=this[_0x12b2bb(0x2c7)](_0x29b89b,_0x283063);return _0x20b210[_0x12b2bb(0x24c)](_0x668040),_0x668040[_0x12b2bb(0x2b3)][_0x12b2bb(0x201)](()=>_0x20b210['delete'](_0x668040),()=>_0x20b210[_0x12b2bb(0x342)](_0x668040)),{'cancel':()=>{const _0x5912dd=_0x12b2bb;_0x20b210[_0x5912dd(0x342)](_0x668040),_0x668040[_0x5912dd(0x24a)]();},'promise':_0x668040[_0x12b2bb(0x2b3)]};}};}async[_0x28a351(0x28f)](){const _0x57a9db=_0x28a351;if(this[_0x57a9db(0x2f9)]!=='online'||this[_0x57a9db(0x2a2)]?.[_0x57a9db(0x269)]!==WebSocket[_0x57a9db(0x270)]){this[_0x57a9db(0x2fd)]!==void 0x0&&clearTimeout(this[_0x57a9db(0x2fd)]),this[_0x57a9db(0x2fd)]=void 0x0,this[_0x57a9db(0x264)]??=this[_0x57a9db(0x2c1)]();try{await this[_0x57a9db(0x264)];}finally{this[_0x57a9db(0x264)]=void 0x0;}}}async[_0x28a351(0x2c1)](){const _0xd94e01=_0x28a351;this['_state']=_0xd94e01(0x2ea);let _0x12c2e9=await this[_0xd94e01(0x2d1)][_0xd94e01(0x241)](this[_0xd94e01(0x2d1)][_0xd94e01(0x2ab)],{'headers':{'content-type':_0xd94e01(0x2a0)},'method':_0xd94e01(0x34f)});if(!_0x12c2e9['ok'])throw this['_state']=_0xd94e01(0x317),new j(_0xd94e01(0x215),_0xd94e01(0x2a1)+_0x12c2e9[_0xd94e01(0x27f)],{'retryable':_0x12c2e9[_0xd94e01(0x27f)]>=0x1f4});let _0x43d872=await _0x12c2e9[_0xd94e01(0x2f5)]();if(typeof _0x43d872[_0xd94e01(0x2b2)]!='string'||_0x43d872['ticket'][_0xd94e01(0x2b6)]===0x0)throw this[_0xd94e01(0x2f9)]='offline',new j(_0xd94e01(0x339),_0xd94e01(0x344));let _0x4caa4b=new URL(this[_0xd94e01(0x2d1)][_0xd94e01(0x206)]);_0x4caa4b[_0xd94e01(0x299)][_0xd94e01(0x24f)](_0xd94e01(0x238),_0x43d872[_0xd94e01(0x2b2)]);let _0x470c58=new WebSocket(_0x4caa4b);this[_0xd94e01(0x2a2)]=_0x470c58,_0x470c58[_0xd94e01(0x349)](_0xd94e01(0x239),_0x2487cc=>this[_0xd94e01(0x226)](_0x2487cc)),_0x470c58['addEventListener']('close',()=>{const _0x20fd07=_0xd94e01;this[_0x20fd07(0x2a2)]===_0x470c58&&(this[_0x20fd07(0x20f)](),this['_failCommandWaiters'](new j('COLLABORATION_UNAVAILABLE',_0x20fd07(0x310),{'retryable':!0x0})),this[_0x20fd07(0x2f9)]=this[_0x20fd07(0x2c3)][_0x20fd07(0x35b)]===0x0?_0x20fd07(0x271):_0x20fd07(0x2ea),this['_joined'][_0x20fd07(0x35b)]>0x0&&this[_0x20fd07(0x26c)]());}),await Oe(_0x470c58);let _0x372be2=await this[_0xd94e01(0x306)](_0x9b7859[_0xd94e01(0x313)],'',{'cmd':_0x9b7859[_0xd94e01(0x313)],'routeKey':''});if(_0x372be2[_0xd94e01(0x236)]!==_0x90bf3a['OK']||typeof _0x372be2[_0xd94e01(0x20b)]?.[_0xd94e01(0x35d)]!='string')throw _0x470c58[_0xd94e01(0x2f7)](),new j(_0xd94e01(0x339),_0xd94e01(0x282));this['_memberId']=_0x372be2[_0xd94e01(0x20b)][_0xd94e01(0x35d)],this[_0xd94e01(0x2f9)]=_0xd94e01(0x28e);for(let {target:_0x290f1b}of this[_0xd94e01(0x2c3)]['values']())try{await this[_0xd94e01(0x304)](_0x290f1b);}catch(_0x4abd55){throw _0x470c58[_0xd94e01(0x2f7)](0x3f3,_0xd94e01(0x312)),_0x4abd55;}this[_0xd94e01(0x24d)]=0x0,this[_0xd94e01(0x307)]();}async[_0x28a351(0x304)](_0x2616f0){const _0x14f407=_0x28a351;let _0x47aa78=await this[_0x14f407(0x306)](_0x9b7859['JOIN'],_0x2616f0[_0x14f407(0x35e)],{'cmd':_0x9b7859['JOIN'],'joinReq':{'rooms':[{'args':'','roomID':_0x2616f0[_0x14f407(0x35e)]}]},'routeKey':_0x2616f0[_0x14f407(0x35e)]});if(_0x47aa78[_0x14f407(0x236)]!==_0x90bf3a['OK'])throw new j('COLLABORATION_UNAVAILABLE',typeof _0x47aa78[_0x14f407(0x248)]==_0x14f407(0x30c)?_0x47aa78[_0x14f407(0x248)]:_0x14f407(0x319));}[_0x28a351(0x306)](_0x5a1e4e,_0x1acae0,_0x2681ea){const _0x29c247=_0x28a351;let _0x456c00=this[_0x29c247(0x2a2)];if(!_0x456c00||_0x456c00['readyState']!==WebSocket[_0x29c247(0x270)])return Promise['reject'](new j(_0x29c247(0x215),_0x29c247(0x272),{'retryable':!0x0}));let _0x4d2e8d=_0x5a1e4e+':'+_0x1acae0;return new Promise((_0x31c9b1,_0x483d0c)=>{const _0x1860bd=_0x29c247;if(this[_0x1860bd(0x358)][_0x1860bd(0x281)](_0x4d2e8d)){_0x483d0c(new j(_0x1860bd(0x339),'A\x20'+_0x5a1e4e+_0x1860bd(0x247)+_0x1acae0));return;}let _0x33334f=setTimeout(()=>{const _0x53a27f=_0x1860bd;this['_commandWaiters'][_0x53a27f(0x342)](_0x4d2e8d),_0x483d0c(new j(_0x53a27f(0x215),_0x53a27f(0x31d)+_0x5a1e4e,{'retryable':!0x0}));},0x7530);this[_0x1860bd(0x358)][_0x1860bd(0x24f)](_0x4d2e8d,{'reject':_0x483d0c,'resolve':_0x31c9b1,'timer':_0x33334f});try{_0x456c00[_0x1860bd(0x209)](JSON[_0x1860bd(0x326)](_0x2681ea));}catch(_0x4c4e92){this['_commandWaiters'][_0x1860bd(0x342)](_0x4d2e8d),clearTimeout(_0x33334f),_0x483d0c(new j(_0x1860bd(0x215),'Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command',{'cause':_0x4c4e92,'retryable':!0x0}));}});}[_0x28a351(0x226)](_0x3b6017){const _0xd17c37=_0x28a351;if(typeof _0x3b6017['data']!=_0xd17c37(0x30c))return;let _0x56f461;try{_0x56f461=JSON[_0xd17c37(0x242)](_0x3b6017[_0xd17c37(0x2ca)]);}catch{this[_0xd17c37(0x2a2)]?.[_0xd17c37(0x2f7)](0x3eb,'Invalid\x20JSON\x20response');return;}let _0x112735=typeof _0x56f461[_0xd17c37(0x2e5)]==_0xd17c37(0x30c)?_0x56f461[_0xd17c37(0x2e5)]:'';if(_0x56f461['cmd']===_0x9b7859[_0xd17c37(0x313)]||_0x56f461[_0xd17c37(0x28d)]===_0x9b7859[_0xd17c37(0x357)]||_0x56f461[_0xd17c37(0x28d)]===_0x9b7859['HEARTBEAT']){let _0x8ddf80=_0x56f461['cmd']+':'+_0x112735,_0x130d06=this[_0xd17c37(0x358)][_0xd17c37(0x1fc)](_0x8ddf80);_0x130d06&&(this[_0xd17c37(0x358)][_0xd17c37(0x342)](_0x8ddf80),clearTimeout(_0x130d06[_0xd17c37(0x1f2)]),_0x130d06[_0xd17c37(0x208)](_0x56f461));return;}_0x56f461[_0xd17c37(0x28d)]!==_0x9b7859[_0xd17c37(0x277)]||!_0x56f461['collaMsg']||this[_0xd17c37(0x35c)](_0x112735,_0x56f461[_0xd17c37(0x276)]);}[_0x28a351(0x35c)](_0xe5df58,_0x84292d){const _0x1ff846=_0x28a351;let _0x2aaa06=_0x84292d[_0x1ff846(0x353)],_0x31da67=_0x2aaa06===_0x1ff846(0x217)?_0x1ff846(0x316):_0x2aaa06===_0x1ff846(0x30e)?_0x1ff846(0x23c):_0x2aaa06===_0x1ff846(0x2bf)?'csShouldRetryEvent':_0x2aaa06==='permission_rej'?'permissionRejEvent':_0x2aaa06===_0x1ff846(0x23a)?_0x1ff846(0x31f):void 0x0;if(!_0x31da67)return;let _0x3231f9=ke(_0x84292d[_0x31da67]);if(!_0x3231f9||_0x3231f9['unitID']!==_0xe5df58)return;if(_0x2aaa06==='new_changesets'){let _0x50d304=this[_0x1ff846(0x210)]['get'](_0xe5df58)??[];_0x50d304['push'](_0x3231f9),this['_inbound'][_0x1ff846(0x24f)](_0xe5df58,_0x50d304);return;}let _0x5066e1=Q(_0x3231f9[_0x1ff846(0x333)],_0x3231f9[_0x1ff846(0x347)]),_0x20a4bc=this['_submissionWaiters'][_0x1ff846(0x1fc)](_0x5066e1);_0x20a4bc&&_0x20a4bc(_0x2aaa06===_0x1ff846(0x217)?{'changeset':_0x3231f9,'status':_0x1ff846(0x2b8)}:_0x2aaa06==='changeset_should_retry'?{'status':_0x1ff846(0x228)}:_0x2aaa06===_0x1ff846(0x2a4)?{'status':_0x1ff846(0x2d6)}:{'status':_0x1ff846(0x354)});}['_waitForSubmission'](_0x389e73,_0x2a42b1){const _0x5f1393=_0x28a351;let _0xaa9725=Q(_0x389e73,_0x2a42b1);if(this['_submissionWaiters']['has'](_0xaa9725))return{'cancel':()=>void 0x0,'promise':Promise[_0x5f1393(0x298)](new j(_0x5f1393(0x274),'The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight'))};let _0x5d862b=()=>void 0x0;return{'cancel':()=>_0x5d862b({'status':'closed'}),'promise':new Promise(_0x5e1e56=>{const _0x482225=_0x5f1393;_0x5d862b=_0x40b2d4=>{const _0x3d5906=_0x2b76;this[_0x3d5906(0x222)][_0x3d5906(0x342)](_0xaa9725)&&_0x5e1e56(_0x40b2d4);},this[_0x482225(0x222)][_0x482225(0x24f)](_0xaa9725,_0x5d862b);})};}async[_0x28a351(0x32f)](_0x54bade){const _0x50c802=_0x28a351;let _0x35639b=this[_0x50c802(0x2c3)][_0x50c802(0x1fc)](_0x54bade);_0x35639b&&(--_0x35639b['leases'],!(_0x35639b['leases']>0x0)&&(this[_0x50c802(0x2c3)][_0x50c802(0x342)](_0x54bade),this[_0x50c802(0x210)][_0x50c802(0x342)](_0x54bade),this[_0x50c802(0x2a2)]?.[_0x50c802(0x269)]===WebSocket[_0x50c802(0x270)]&&this[_0x50c802(0x2a2)][_0x50c802(0x209)](JSON['stringify']({'cmd':_0x9b7859[_0x50c802(0x324)],'leaveReq':{'args':'','roomID':_0x54bade},'routeKey':_0x54bade})),this[_0x50c802(0x2c3)]['size']===0x0&&(this[_0x50c802(0x2f9)]=_0x50c802(0x271),this[_0x50c802(0x2fd)]!==void 0x0&&clearTimeout(this[_0x50c802(0x2fd)]),this[_0x50c802(0x2fd)]=void 0x0,this['_stopHeartbeat'](),this[_0x50c802(0x2a2)]?.['close'](0x3e8,_0x50c802(0x263)),this['_socket']=void 0x0,this[_0x50c802(0x25c)]='')));}[_0x28a351(0x26c)](){const _0x580da2=_0x28a351;if(this[_0x580da2(0x2fd)]!==void 0x0||this[_0x580da2(0x24d)]>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x580da2(0x2f9)]=_0x580da2(0x317));return;}let _0x2de381=Math[_0x580da2(0x29a)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x580da2(0x24d)]+=0x1,this[_0x580da2(0x2fd)]=setTimeout(()=>{const _0x5229a9=_0x580da2;this['_reconnectTimer']=void 0x0,this[_0x5229a9(0x264)]??=this[_0x5229a9(0x2c1)](),this['_connectPromise'][_0x5229a9(0x2c6)](()=>this[_0x5229a9(0x26c)]())['finally'](()=>{const _0x1a3206=_0x5229a9;this[_0x1a3206(0x264)]=void 0x0;});},_0x2de381);}[_0x28a351(0x307)](){const _0x21aae6=_0x28a351;this['_stopHeartbeat'](),this[_0x21aae6(0x234)]=setInterval(()=>{const _0x5157ca=_0x21aae6;this['_state']==='online'&&this['_requestCommand'](_0x9b7859['HEARTBEAT'],'',{'cmd':_0x9b7859[_0x5157ca(0x204)],'routeKey':''})[_0x5157ca(0x2c6)](()=>this[_0x5157ca(0x2a2)]?.[_0x5157ca(0x2f7)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x28a351(0x20f)](){const _0x4aedc0=_0x28a351;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x4aedc0(0x234)]),this[_0x4aedc0(0x234)]=void 0x0;}['_failCommandWaiters'](_0x16e359){const _0xf3725b=_0x28a351;for(let _0x531925 of this['_commandWaiters'][_0xf3725b(0x2c0)]())clearTimeout(_0x531925['timer']),_0x531925['reject'](_0x16e359);this[_0xf3725b(0x358)][_0xf3725b(0x327)]();}};function Oe(_0x5116b4){return new Promise((_0xbf8474,_0x20cfc6)=>{const _0xaf17ca=_0x2b76;let _0x23844c=()=>{const _0x2e4825=_0x2b76;clearTimeout(_0x1da7f7),_0x5116b4[_0x2e4825(0x205)]('close',_0x5544eb),_0x5116b4[_0x2e4825(0x205)](_0x2e4825(0x32b),_0x1e7e74),_0x5116b4[_0x2e4825(0x205)](_0x2e4825(0x29f),_0x592937);},_0x2b967c=_0x4220c1=>{_0x23844c(),_0x20cfc6(new j('COLLABORATION_UNAVAILABLE',_0x4220c1,{'retryable':!0x0}));},_0x5544eb=()=>_0x2b967c(_0xaf17ca(0x1f4)),_0x1e7e74=()=>_0x2b967c(_0xaf17ca(0x2d5)),_0x592937=()=>{_0x23844c(),_0xbf8474();},_0x1da7f7=setTimeout(()=>{const _0xe8c6c2=_0xaf17ca;_0x2b967c('Timed\x20out\x20establishing\x20Collaboration\x20WebSocket'),_0x5116b4[_0xe8c6c2(0x2f7)](0x3e8,_0xe8c6c2(0x257));},0x7530);_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x2f7),_0x5544eb,{'once':!0x0}),_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x32b),_0x1e7e74,{'once':!0x0}),_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x29f),_0x592937,{'once':!0x0});});}function ke(_0x252cb9){const _0x15049a=_0x28a351;if(!_0x252cb9||typeof _0x252cb9!=_0x15049a(0x2e1))return null;let _0x3d8764=_0x252cb9['cs'];return _0x3d8764&&typeof _0x3d8764=='object'?_0x3d8764:null;}function Q(_0x2da2eb,_0x168ce9){return(_0x2da2eb??'')+':'+(_0x168ce9??0x0);}var Ae=class{[_0x28a351(0x2d1)];[_0x28a351(0x2cd)];constructor(_0x9e8a97){const _0x15e102=_0x28a351;this['_config']=je(_0x9e8a97),this[_0x15e102(0x2cd)]=new De(this[_0x15e102(0x2d1)]);}async[_0x28a351(0x29f)](_0x2e8750){const _0x2e6ef8=_0x28a351;let _0x4d29e1=await this[_0x2e6ef8(0x2cd)][_0x2e6ef8(0x33e)](_0x2e8750);return new we(this[_0x2e6ef8(0x2d1)],_0x2e8750,_0x4d29e1);}};function je(_0x4827f3){const _0x4d2a9e=_0x28a351;let _0x4c5f87=$(_0x4827f3[_0x4d2a9e(0x2cb)],'snapshotServerUrl',[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x566b83=$(_0x4827f3['collabSubmitChangesetUrl'],_0x4d2a9e(0x31e),[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x14b636=$(_0x4827f3[_0x4d2a9e(0x206)],_0x4d2a9e(0x206),[_0x4d2a9e(0x300),_0x4d2a9e(0x262),_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]);_0x14b636['protocol']===_0x4d2a9e(0x2ba)&&(_0x14b636['protocol']='ws:'),_0x14b636['protocol']===_0x4d2a9e(0x369)&&(_0x14b636['protocol']=_0x4d2a9e(0x262));let _0x2ff778=$(_0x4827f3['wsSessionTicketUrl'],'wsSessionTicketUrl',[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x36f54b=_0x4827f3[_0x4d2a9e(0x2fb)]??0x7530;if(!Number['isSafeInteger'](_0x36f54b)||_0x36f54b<=0x0)throw new j(_0x4d2a9e(0x274),_0x4d2a9e(0x364));return{'collabSubmitChangesetUrl':_0x566b83,'collabWebSocketUrl':_0x14b636,'commitTimeoutMs':_0x36f54b,'httpRequest':_0x4827f3[_0x4d2a9e(0x241)]??globalThis['fetch'][_0x4d2a9e(0x254)](globalThis),'snapshotServerUrl':_0x4c5f87,'wsSessionTicketUrl':_0x2ff778};}function $(_0x4f9062,_0x53fb1b,_0x55bec9){const _0x3a750f=_0x28a351;let _0x25cffa;try{_0x25cffa=new URL(_0x4f9062);}catch{throw new j(_0x3a750f(0x274),_0x53fb1b+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x55bec9[_0x3a750f(0x33d)](_0x25cffa[_0x3a750f(0x26e)]))throw new j(_0x3a750f(0x274),_0x53fb1b+'\x20uses\x20an\x20unsupported\x20protocol');return _0x25cffa;}function Me(_0xca302f){return new Ae(_0xca302f);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
1
+ const _0x1c125c=_0x205e;(function(_0xd0a31e,_0x385939){const _0x1af7aa=_0x205e,_0x432097=_0xd0a31e();while(!![]){try{const _0x44baf2=parseInt(_0x1af7aa(0x27d))/0x1*(-parseInt(_0x1af7aa(0x2d1))/0x2)+-parseInt(_0x1af7aa(0x307))/0x3+-parseInt(_0x1af7aa(0x206))/0x4+-parseInt(_0x1af7aa(0x359))/0x5*(-parseInt(_0x1af7aa(0x304))/0x6)+parseInt(_0x1af7aa(0x2be))/0x7*(-parseInt(_0x1af7aa(0x1f9))/0x8)+-parseInt(_0x1af7aa(0x23a))/0x9+parseInt(_0x1af7aa(0x285))/0xa*(parseInt(_0x1af7aa(0x312))/0xb);if(_0x44baf2===_0x385939)break;else _0x432097['push'](_0x432097['shift']());}catch(_0x321984){_0x432097['push'](_0x432097['shift']());}}}(_0x3bd6,0xeb682));import{CommandType as _0x29521d,DependentOn as _0x4fbdae,ICommandService as _0x1a2933,IUniverInstanceService as _0x5d7beb,Inject as _0x55309b,Injector as _0x2314e0,Plugin as _0xfcc3bd,UniverInstanceType as _0x13c60c,registerDependencies as _0x3f6423,sequenceExecute as _0x4123c5,toDisposable as _0xa88a70}from'@univerjs/core';import{CompressMutationService as _0x430ed9,ISnapshotServerService as _0x5264f8,ITransformService as _0xdf6557,RevertRevisionMutation as _0x38238c,RevisionService as _0x486697,SnapshotService as _0x3a88f9,UniverCollaborationPlugin as _0x55aba4,isTransformMutationsSuccess as _0x1409d9,parseChangesetToProtocol as _0xeaf139,parseMutationToProtocol as _0x5e4dde,parseProtocolChangeset as _0x533c3a,transformSnapshotToBaseData as _0x3838dc,transformSnapshotToBoardData as _0x93bace,transformSnapshotToDocumentData as _0xd2df7d,transformSnapshotToSlideData as _0x72938,transformSnapshotToWorkbookData as _0x3ad34b}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x1b53cc}from'@univerjs/engine-formula';import{CmdRspCode as _0x434455,CombCmd as _0x21f97d,isError as _0x368375}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x382ebb}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x182541,RichTextEditingMutation as _0x8456f6}from'@univerjs/docs';import{IRenderManagerService as _0x31684c}from'@univerjs/engine-render';import{FUniver as _0x1880d0}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0x277511 from'@oxc-project/runtime/helpers/decorateParam';import _0x316c9f from'@oxc-project/runtime/helpers/decorate';function _0x3bd6(){const _0x3b91e2=['eventID','flatMap','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','No\x20active\x20Unit\x20leases','csRejEvent','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','confirmed','cancel','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','COMPRESS_MUTATION_SEND','Event','error','reject','open','transform-failed','1531818dBexZI','_replayRemoteChangesets','_handle','compressMutationService','cmd','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','run','onMutationExecutedForCollab','getState','getSheetBlock','_executor','rev','_univer','application/json','sort','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','_connectPromise','_socket','remote','createBoard','disposeUnit','_baseRevision','_awaiting','Heartbeat\x20failed','_disposables','transformMutations','unitData','collabWebSocketUrl','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','injector','getUnitOnRev','new_changes','_reconnectAttempts','join','result','MUTATION','doc','ack','_knownHeadRevision','dispose','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','getPendingMutations','replacePending','submitChangeset','Failed\x20to\x20rejoin\x20Unit\x20room','_stopHeartbeat','_lease','_waitForSubmission','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','fetch','_fetchChangesets','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','m2Prime','_closed','Backend\x20failed\x20to\x20fetch\x20changesets','fromChangeset','_reconcilePrecedingChangesets','size','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','interceptor','getInterceptPoints','_closeAfterFatalError','_validateAcceptedChangeset','\x20for\x20Unit\x20','commandService','stringify','1qBlqAq','message','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','changeset-rejected','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','httpRequest','_rejectIfNotAccepting','pathname','1105270sxLuex','catch','conflict','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type','_config','collabSubmitChangesetUrl','retryable','routeKey','find','takePending','_assertMutableState','Cannot\x20','timeout','format','formula.mutation.set-formula-data','_tail','infoRsp','entries','waitForLatestApplied','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','reqId','Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset','COLLABORATION_LOAD_FAILED','number','Changeset\x20submission\x20was\x20rejected','resolve','read','Backend\x20returned\x20no\x20Unit\x20snapshot','workbook','pending','invalid','maxCodeLength','closed','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','wsSessionTicketUrl','addEventListener','latestRevision','from','Changeset\x20submission\x20was\x20denied','Snapshot\x20block\x20','target','\x20character\x20limit','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','_commandWaiters','commit','removeEventListener','isArray','csAckEvent','getDocument','splice','write','length','unitId','pull','_startHeartbeat','2247FZLeRO','waitForSubmission','kind','newAPI','leases','\x20is\x20unavailable','sheet.mutation.send-init-pivot-text-local','_ensureConnected','protocol','changeset','\x20uses\x20an\x20unsupported\x20protocol','COLLABORATION_UNAVAILABLE','_state','unitId\x20must\x20not\x20be\x20empty','Backend\x20changesets\x20must\x20be\x20an\x20array','rejected','unitType','transformService','acquire','1832288ZVulYr','reason','createUnit','object','_connect','LEAVE','registerPlugin','changesets','_reconnectTimer','getConnectionState','Failed\x20to\x20fetch\x20preceding\x20changesets','unshift','COLLABORATION_INVALID_INPUT','permissionRejEvent','then','_requestCommand','parse','map','_joined','formula.mutation.set-trigger-formula-calculation-stop','sessionTicket','incrementRevOfUnit','memberId','json','unsubscribe','fetchmissing','mode','searchParams','slide','Failed\x20to\x20join\x20Unit\x20room','_memberId','mutations','Snapshot\x20contains\x20duplicate\x20block\x20ids','BeforeCommandExecute','UNIVER_SHEET','Runtime\x20for\x20','_release','some','prependPending','UNIVER_DOC','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','execute','revisionService','close','COLLABORATION_CLOSED','unknown','_createAwaitingFromPending','newCsEvent','snapshotServerUrl','data','_nextReqId','42PyCbGY','unit','has','4783389CEpTrm','fetchChangesets','save','\x20})();','max','_handleMessage','new_changesets','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','Replacement\x20mutations\x20must\x20be\x20an\x20array','commandId','_conflict','616mzWUNj','delete','_injector','getUnitData','online','getWorkbook','initial','_sid','wss:','index','string','values','get','RECV','_target','UNIVER_BOARD','all','_closePromise','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','block','replace\x20mutations','subscribe','formula.mutation.set-calculation-result','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','retry','permission-rejected','add','collaMsg','Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','csShouldRetryEvent','_unitId','readyState','_kernel','board','awaiting-ack','ticket','HELLO','_handleCollaborationEvent','commitTimeoutMs','HEARTBEAT','suppress','changeset_should_retry','UNIVER_SLIDE','pluginName','trigger','return\x20(async\x20()\x20=>\x20{\x20','_capture','onlyLocal','_submissionWaiters','fetched','_scheduleReconnect','slice','blockMeta','Unsupported\x20collaboration\x20Unit\x20type:\x20','OPEN','addEvent','permission','promise','takeInboundChangesets','revision','\x20cannot\x20capture\x20mutation\x20','instanceService','status','m1Prime','ws:','Collaboration\x20HTTP\x20request\x20failed','offline','prototype','createUniverSheet','_captureCommandMutation','349115SYQfwV','pull-required','UNIVER_BASE','\x20cannot\x20call\x20','sid','_pending','Failed\x20to\x20open\x20the\x20collaboration\x20backend','COMPRESS_MUTATION_APPLY','_inbound','Invalid\x20JSON\x20response','_subscribeToDocumentState','snapshotServerService','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','https:','_bufferedChangesets','name','_operations','min','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','send','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','sheets','baseRev','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','push','pulled','clear','invalid-changeset','code','_acceptingOperations','createWorkbook','createUniver','44928wrYWUw','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','reconnecting','fetchThroughInterceptors','COLLABORATION_PROTOCOL_ERROR','JOIN','changeset_ack','randomUUID','isFinite','POST','_consumeBufferedPrecedingChangesets','type','isSafeInteger','4922008IrNnBR','permission_rej','CollaborationRuntimeError','snapshotFrom','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','nothing-to-commit','createBase','finally','Unit\x20','getBoard','_closeOwnedResources','snapshot','precedingChangesets','createPresentation','univerAPI','replacePendingMutations','http:','Collaboration\x20HELLO\x20response\x20is\x20invalid','GET','changeset_rej','unitID','_setTransformConflict','originalMeta','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','memberID','set','_suppressionDepth','Collaboration\x20WebSocket\x20closed','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','_join','trim','_heartbeat','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','unit-data','Collaboration\x20WebSocket\x20is\x20not\x20online','permission-denied','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20'];_0x3bd6=function(){return _0x3b91e2;};return _0x3bd6();}var j=class extends Error{[_0x1c125c(0x1f5)];[_0x1c125c(0x28d)];constructor(_0x156c80,_0x270db1,_0x30e036={}){const _0x1437ee=_0x1c125c;super(_0x270db1,_0x30e036),this[_0x1437ee(0x368)]=_0x1437ee(0x208),this[_0x1437ee(0x1f5)]=_0x156c80,this[_0x1437ee(0x28d)]=_0x30e036[_0x1437ee(0x28d)]??!0x1;}},se=class{[_0x1c125c(0x333)];[_0x1c125c(0x331)];['_pending']=[];[_0x1c125c(0x252)]=[];[_0x1c125c(0x220)]=0x0;constructor(_0x13faef,_0x2b2b28,_0x5ad9b0){const _0x55d375=_0x1c125c;this['_kernel']=_0x13faef,this['_unitId']=_0x2b2b28,this[_0x55d375(0x252)][_0x55d375(0x1f1)](_0x13faef[_0x55d375(0x27b)][_0x55d375(0x241)]((_0x40563c,_0x3dde02)=>{const _0x1b8b40=_0x55d375;this[_0x1b8b40(0x358)](_0x40563c,_0x3dde02,_0x5ad9b0);})),_0x5ad9b0===_0x13c60c[_0x55d375(0x2f8)]&&(_0x13faef[_0x55d375(0x257)][_0x55d375(0x31e)](_0x31684c),this[_0x55d375(0x363)]());}get[_0x1c125c(0x2a4)](){const _0x2a8841=_0x1c125c;return this[_0x2a8841(0x35e)];}['snapshotFrom'](_0x1dead0){const _0x5b4d3d=_0x1c125c;return this[_0x5b4d3d(0x35e)][_0x5b4d3d(0x346)](_0x1dead0);}['replacePending'](_0x507974){const _0x236927=_0x1c125c;this[_0x236927(0x35e)][_0x236927(0x2b8)](0x0,this[_0x236927(0x35e)]['length'],..._0x507974);}[_0x1c125c(0x290)](){const _0x4f39a7=_0x1c125c;return this[_0x4f39a7(0x35e)][_0x4f39a7(0x2b8)](0x0);}[_0x1c125c(0x2f7)](_0x3013bc){const _0x333e47=_0x1c125c;this[_0x333e47(0x35e)][_0x333e47(0x2dc)](..._0x3013bc);}async['suppress'](_0x162191){const _0x5d763c=_0x1c125c;this[_0x5d763c(0x220)]+=0x1;try{return await _0x162191();}finally{--this[_0x5d763c(0x220)];}}[_0x1c125c(0x261)](){const _0x548d7a=_0x1c125c;for(let _0x627cf8 of this[_0x548d7a(0x252)][_0x548d7a(0x2b8)](0x0))_0x627cf8['dispose']();}['_captureCommandMutation'](_0x3c2a45,_0x189286,_0x22eb03){const _0x105cab=_0x1c125c;if(this[_0x105cab(0x220)]>0x0||_0x3c2a45[_0x105cab(0x204)]!==_0x29521d[_0x105cab(0x25d)]||_0x189286?.['fromCollab']||_0x189286?.[_0x105cab(0x272)]||_0x189286?.[_0x105cab(0x342)])return;let _0x2d72ba=_0x3c2a45['params'];if(_0x2d72ba?.[_0x105cab(0x2bb)]!==void 0x0&&_0x2d72ba[_0x105cab(0x2bb)]!==this[_0x105cab(0x331)]){if(_0x2d72ba[_0x105cab(0x33f)]===_0x382ebb['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x105cab(0x2f4)+this[_0x105cab(0x331)]+_0x105cab(0x34f)+_0x3c2a45['id']+_0x105cab(0x27a)+String(_0x2d72ba['unitId']));}if(_0x2d72ba?.[_0x105cab(0x2bb)]===void 0x0||_0x22eb03===_0x13c60c['UNIVER_DOC']&&_0x3c2a45['id']===_0x8456f6['id'])return;if(_0x3c2a45['id']===_0x38238c['id'])throw new j(_0x105cab(0x2dd),_0x105cab(0x329));let _0x22c573=_0x3c2a45,_0x1a86c0=this['_kernel']['compressMutationService'][_0x105cab(0x276)][_0x105cab(0x277)]()[_0x105cab(0x234)],_0x387044=(this['_kernel'][_0x105cab(0x23d)][_0x105cab(0x276)]['fetchThroughInterceptors'](_0x1a86c0)([_0x22c573],this['_kernel'][_0x105cab(0x350)])??[_0x22c573])[0x0];_0x387044&&this[_0x105cab(0x35e)][_0x105cab(0x1f1)](_0x5e4dde(_0x387044));}[_0x1c125c(0x363)](){const _0x36e938=_0x1c125c;let _0x11a2ee=this[_0x36e938(0x333)][_0x36e938(0x257)][_0x36e938(0x31e)](_0x182541)['docStateChange$'][_0x36e938(0x327)](_0x2bfd04=>{const _0x21e24e=_0x36e938;if(this[_0x21e24e(0x220)]>0x0||_0x2bfd04?.[_0x21e24e(0x2bb)]!==this[_0x21e24e(0x331)])return;let _0x355096={'id':_0x2bfd04[_0x21e24e(0x310)],'params':{'actions':_0x2bfd04['redoState']['actions'],'textRanges':null,'unitId':_0x2bfd04[_0x21e24e(0x2bb)]},'type':_0x29521d[_0x21e24e(0x25d)]};this[_0x21e24e(0x35e)]['push'](_0x5e4dde(_0x355096));});this['_disposables']['push'](_0xa88a70(()=>_0x11a2ee[_0x36e938(0x2e9)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x1c125c(0x2e4),'formula.mutation.set-trigger-formula-calculation',_0x1c125c(0x328),'formula.mutation.set-array-formula-data',_0x1c125c(0x295),_0x1c125c(0x2c4)]),le=new Set([_0x1c125c(0x20c),_0x1c125c(0x24d),_0x1c125c(0x1f7),'createDocument',_0x1c125c(0x213),_0x1c125c(0x357),_0x1c125c(0x24e)]);function ue(_0x3f55f7,_0x4cde30,_0x2710e7){let _0x4ff3fa=_0x1880d0['newAPI'](_0x3f55f7);return{async 'execute'(_0x2073c2,_0x5a6230){const _0x1e2b5f=_0x205e;if(_0x2073c2[_0x1e2b5f(0x2ba)]>_0x2710e7)throw new j(_0x1e2b5f(0x2dd),'Code\x20is\x20longer\x20than\x20the\x20'+_0x2710e7+_0x1e2b5f(0x2b0));let _0x722391=_0x5a6230===_0x1e2b5f(0x2a1)?M(_0x4ff3fa):void 0x0,_0x58c3b1=de(_0x4ff3fa,_0x4cde30);try{return await Function(_0x1e2b5f(0x214),_0x1e2b5f(0x340)+_0x2073c2+_0x1e2b5f(0x30a))(_0x58c3b1);}finally{_0x722391?.[_0x1e2b5f(0x261)]();}}};}function de(_0x4e442f,_0x4f3233){return new Proxy(_0x4e442f,{'get'(_0x3d403b,_0x128458,_0x4d1e80){const _0x15a430=_0x205e;return le[_0x15a430(0x306)](_0x128458)?()=>{const _0x454311=_0x15a430;throw new j(_0x454311(0x2dd),'Single-Unit\x20runtime\x20for\x20'+_0x4f3233+_0x454311(0x35c)+String(_0x128458));}:Reflect[_0x15a430(0x31e)](_0x3d403b,_0x128458,_0x4d1e80);}});}function M(_0x516b47){const _0x1cd953=_0x1c125c;return _0x516b47[_0x1cd953(0x34a)](_0x516b47[_0x1cd953(0x235)][_0x1cd953(0x2f2)],_0x80b592=>{const _0x4cb7bd=_0x1cd953;let _0x34528f=_0x80b592;if(N(_0x34528f))throw _0x34528f[_0x4cb7bd(0x232)]=!0x0,new j(_0x4cb7bd(0x2dd),'Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20'+_0x34528f['id']);});}function N(_0x4f9c23){const _0x57f955=_0x1c125c;return _0x4f9c23[_0x57f955(0x204)]===_0x29521d['COMMAND']||_0x4f9c23[_0x57f955(0x204)]===_0x29521d[_0x57f955(0x25d)]&&!ce['has'](_0x4f9c23['id']);}function P(_0xdb256d){const _0x211f38=_0x1c125c;if(_0xdb256d===void 0x0)return null;if(_0xdb256d===null||typeof _0xdb256d=='boolean'||typeof _0xdb256d=='string')return _0xdb256d;if(typeof _0xdb256d==_0x211f38(0x29e)){if(Number[_0x211f38(0x201)](_0xdb256d))return _0xdb256d;throw I();}if(Array['isArray'](_0xdb256d))return _0xdb256d['map'](P);if(F(_0xdb256d))return Object['fromEntries'](Object[_0x211f38(0x298)](_0xdb256d)[_0x211f38(0x2e2)](([_0x288166,_0x4b0a42])=>[_0x288166,P(_0x4b0a42)]));throw I();}function F(_0x113fb3){const _0x38e77a=_0x1c125c;if(typeof _0x113fb3!='object'||!_0x113fb3)return!0x1;let _0x54efef=Object['getPrototypeOf'](_0x113fb3);return _0x54efef===Object[_0x38e77a(0x356)]||_0x54efef===null;}function I(){const _0x766ac1=_0x1c125c;return new j(_0x766ac1(0x2dd),_0x766ac1(0x288));}var L=class{[_0x1c125c(0x296)]=Promise[_0x1c125c(0x2a0)]();[_0x1c125c(0x240)](_0x4c2941){const _0x7b5359=_0x1c125c;let _0x1ea28c=this[_0x7b5359(0x296)]['then'](_0x4c2941,_0x4c2941);return this[_0x7b5359(0x296)]=_0x1ea28c[_0x7b5359(0x2df)](()=>void 0x0,()=>void 0x0),_0x1ea28c;}};function R(_0x237eed,_0x4c16d0,_0xf37d2,_0x17e67c){const _0x405abd=_0x1c125c;if(!Array[_0x405abd(0x2b5)](_0x237eed))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x405abd(0x2cc));let _0x383e47=[..._0x237eed][_0x405abd(0x248)]((_0x493158,_0x3056c6)=>_0x493158['revision']-_0x3056c6[_0x405abd(0x34e)]),_0x197768=_0x17e67c;for(let _0x59458f of _0x383e47){if(!_0x59458f||typeof _0x59458f!=_0x405abd(0x2d4)||!Array[_0x405abd(0x2b5)](_0x59458f['mutations'])||_0x59458f[_0x405abd(0x2f0)][_0x405abd(0x2f6)](_0x3b58b4=>!_0x3b58b4||typeof _0x3b58b4!=_0x405abd(0x2d4)||!('id'in _0x3b58b4)||typeof _0x3b58b4['id']!=_0x405abd(0x31c)||!(_0x405abd(0x302)in _0x3b58b4)||typeof _0x3b58b4[_0x405abd(0x302)]!=_0x405abd(0x31c))||!Number[_0x405abd(0x205)](_0x59458f[_0x405abd(0x1ef)])||!Number['isSafeInteger'](_0x59458f[_0x405abd(0x34e)])||_0x59458f[_0x405abd(0x21a)]!==_0x4c16d0||_0x59458f[_0x405abd(0x204)]!==_0xf37d2||_0x59458f[_0x405abd(0x1ef)]!==_0x197768||_0x59458f['revision']!==_0x197768+0x1)throw new j(_0x405abd(0x1fd),_0x405abd(0x365));_0x197768=_0x59458f[_0x405abd(0x34e)];}return _0x383e47;}function z(_0x3c3745){const _0x4ea137=_0x1c125c;return{'baseRevision':_0x3c3745['baseRev'],'mutationCount':_0x3c3745[_0x4ea137(0x2f0)][_0x4ea137(0x2ba)],'revision':_0x3c3745[_0x4ea137(0x34e)],..._0x3c3745[_0x4ea137(0x35d)]===void 0x0?{}:{'sid':_0x3c3745[_0x4ea137(0x35d)]},..._0x3c3745[_0x4ea137(0x29b)]===void 0x0?{}:{'reqId':_0x3c3745[_0x4ea137(0x29b)]}};}function B(_0x29eaf1,_0x29aded,_0x316f48,_0x2194bf,_0x316f3a,_0x3e82be=_0x1c125c(0x318)){const _0x18d9e4=_0x1c125c;if(_0x316f3a['some'](_0x2bd0cb=>_0x2bd0cb['mutations'][_0x18d9e4(0x2f6)](_0x4d1512=>_0x4d1512['id']===_0x38238c['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place');let _0x27ffbb=_0x2194bf;for(let _0x4d4707 of _0x316f3a){let _0x174f80=_0x27ffbb+0x1;if(_0x4d4707[_0x18d9e4(0x21a)]!==_0x29aded||_0x4d4707['type']!==_0x316f48||_0x4d4707['baseRev']!==_0x27ffbb||_0x4d4707[_0x18d9e4(0x34e)]!==_0x174f80)throw new j(_0x18d9e4(0x1fd),_0x18d9e4(0x281));let _0x4617ad=_0x533c3a(_0x4d4707),_0x424e5a=_0x29eaf1[_0x18d9e4(0x23d)][_0x18d9e4(0x276)][_0x18d9e4(0x277)]()[_0x18d9e4(0x360)],_0x3cb4f8=_0x29eaf1[_0x18d9e4(0x23d)][_0x18d9e4(0x276)][_0x18d9e4(0x1fc)](_0x424e5a)(_0x4617ad['mutations'],null)??_0x4617ad[_0x18d9e4(0x2f0)],_0x567b89=_0x4123c5(_0x3cb4f8,_0x29eaf1[_0x18d9e4(0x27b)],_0x3e82be===_0x18d9e4(0x318)?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x567b89[_0x18d9e4(0x25c)])throw new j('COLLABORATION_LOAD_FAILED',_0x18d9e4(0x26b)+_0x567b89[_0x18d9e4(0x31b)]+':\x20'+String(_0x567b89[_0x18d9e4(0x236)]));let _0x191a09=_0x29eaf1[_0x18d9e4(0x2fb)][_0x18d9e4(0x2e6)](_0x29aded);if(_0x191a09!==_0x174f80)throw new j(_0x18d9e4(0x1fd),_0x18d9e4(0x21d));_0x27ffbb=_0x191a09;}return _0x27ffbb;}function V(_0x112930,_0x3aa907,_0x236325){const _0x14f405=_0x1c125c;let _0x4d61c4=_0x1880d0[_0x14f405(0x2c1)](_0x112930);switch(_0x236325){case _0x13c60c[_0x14f405(0x2f3)]:return H(_0x4d61c4[_0x14f405(0x317)](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c[_0x14f405(0x2f8)]:return H(_0x4d61c4[_0x14f405(0x2b7)](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c[_0x14f405(0x33d)]:return H(_0x4d61c4['getPresentation'](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c[_0x14f405(0x35b)]:return H(_0x4d61c4['getBase'](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c['UNIVER_BOARD']:return H(_0x4d61c4[_0x14f405(0x20f)](_0x3aa907)?.['save'](),_0x3aa907);default:throw new j(_0x14f405(0x2dd),_0x14f405(0x348)+_0x236325);}}function H(_0x422ec4,_0xdbe208){const _0x55d2df=_0x1c125c;if(_0x422ec4===void 0x0)throw new j('COLLABORATION_LOAD_FAILED',_0x55d2df(0x20e)+_0xdbe208+_0x55d2df(0x2c3));return structuredClone(_0x422ec4);}var fe=class{['unitId'];[_0x1c125c(0x2ce)];[_0x1c125c(0x24f)];[_0x1c125c(0x23c)];[_0x1c125c(0x246)];[_0x1c125c(0x333)];['_closePromise'];[_0x1c125c(0x1f6)]=!0x0;[_0x1c125c(0x270)]=!0x1;['_capture'];[_0x1c125c(0x244)];[_0x1c125c(0x369)]=new L();['_bufferedChangesets']=[];[_0x1c125c(0x260)];[_0x1c125c(0x311)]=null;[_0x1c125c(0x250)]=null;[_0x1c125c(0x319)]=crypto[_0x1c125c(0x200)]();[_0x1c125c(0x303)]=0x1;constructor(_0x8cef46,_0x487fbe,_0x20bac5,_0x35e5b3,_0x3d1eca,_0x15c9c6,_0x51def7){const _0x1c4101=_0x1c125c;this['unitId']=_0x8cef46,this['unitType']=_0x487fbe,this[_0x1c4101(0x24f)]=_0x20bac5,this[_0x1c4101(0x23c)]=_0x35e5b3,this['_univer']=_0x3d1eca,this['_kernel']=_0x15c9c6,this[_0x1c4101(0x260)]=_0x20bac5,this[_0x1c4101(0x341)]=new se(_0x15c9c6,_0x8cef46,_0x487fbe),this['_executor']=ue(_0x3d1eca,_0x8cef46,_0x51def7);}[_0x1c125c(0x242)](){const _0xbabb2e=_0x1c125c;return{'awaitingChangeset':this[_0xbabb2e(0x250)]===null?null:U(this['_awaiting']),'baseRevision':this[_0xbabb2e(0x24f)],'bufferedChangesetCount':this[_0xbabb2e(0x367)][_0xbabb2e(0x2ba)],'conflict':this[_0xbabb2e(0x311)],'connection':this[_0xbabb2e(0x270)]?_0xbabb2e(0x2a7):this[_0xbabb2e(0x23c)][_0xbabb2e(0x2da)](),'knownHeadRevision':this['_knownHeadRevision'],'pendingMutationCount':this[_0xbabb2e(0x341)]['pending'][_0xbabb2e(0x2ba)]};}[_0x1c125c(0x263)](){const _0x3eb4a8=_0x1c125c;return structuredClone(this[_0x3eb4a8(0x341)][_0x3eb4a8(0x2a4)]);}[_0x1c125c(0x26c)](){const _0x4bca8f=_0x1c125c;return this[_0x4bca8f(0x283)]()||this['_operations'][_0x4bca8f(0x240)](async()=>(this['_assertMutableState'](_0x4bca8f(0x26c)),await this[_0x4bca8f(0x26d)]()));}[_0x1c125c(0x2bc)](){const _0x1942c7=_0x1c125c;return this[_0x1942c7(0x283)]()||this[_0x1942c7(0x369)]['run'](async()=>{const _0x4904dd=_0x1942c7;if(this[_0x4904dd(0x291)](_0x4904dd(0x2bc)),await this[_0x4904dd(0x26d)](),this[_0x4904dd(0x367)][_0x4904dd(0x2ba)]===0x0)return{'state':this[_0x4904dd(0x242)](),'status':'up-to-date'};let _0x9cd0bd=[...this[_0x4904dd(0x367)]];if(_0x9cd0bd[_0x4904dd(0x2f6)](_0x5550b1=>_0x5550b1[_0x4904dd(0x2f0)][_0x4904dd(0x2f6)](_0x574dd7=>_0x574dd7['id']===_0x38238c['id'])))throw new j(_0x4904dd(0x1fd),_0x4904dd(0x26a));let _0xbdb35a=this[_0x4904dd(0x24f)],_0x1db210=this[_0x4904dd(0x250)]?W(this['_awaiting'][_0x4904dd(0x2f0)],this['unitId'],this[_0x4904dd(0x2ce)],this[_0x4904dd(0x24f)]):null,_0x3e5ebd=_0x533c3a({'baseRev':this[_0x4904dd(0x24f)],'memberID':'','mutations':[...this['_capture']['pending']],'revision':0x0,'type':this[_0x4904dd(0x2ce)],'unitID':this['unitId'],'userID':''})[_0x4904dd(0x2f0)],_0x2758cd=[];for(let _0xbcdfc9 of _0x9cd0bd){let _0x1dc3aa=_0x533c3a(_0xbcdfc9);if(this[_0x4904dd(0x250)]!==null&&_0xbcdfc9[_0x4904dd(0x35d)]===this[_0x4904dd(0x250)][_0x4904dd(0x35d)]&&_0xbcdfc9[_0x4904dd(0x29b)]===this['_awaiting'][_0x4904dd(0x29b)]){let _0x4ccbe8=(_0x1db210??[])['map'](_0x5e4dde);G(_0xbcdfc9['mutations'],_0x4ccbe8)||await this['_closeAfterFatalError'](new j(_0x4904dd(0x1fd),_0x4904dd(0x36b))),_0x2758cd[_0x4904dd(0x1f1)]({'changeset':_0xbcdfc9,'kind':_0x4904dd(0x335)}),_0x1db210=null;continue;}let _0x4e65f8=_0x1dc3aa[_0x4904dd(0x2f0)];if(_0x1db210!==null){let _0x216537=this[_0x4904dd(0x333)][_0x4904dd(0x2cf)][_0x4904dd(0x253)](_0x4e65f8,_0x1db210,!0x1);if(!_0x1409d9(_0x216537))return this[_0x4904dd(0x311)]={'message':_0x216537['error'][_0x4904dd(0x27e)],'operation':_0x4904dd(0x2bc),'reason':_0x4904dd(0x239)},{'conflict':this[_0x4904dd(0x311)],'state':this[_0x4904dd(0x242)](),'status':'conflict'};_0x4e65f8=_0x216537[_0x4904dd(0x352)],_0x1db210=_0x216537[_0x4904dd(0x26f)];}let _0x3dd7a9=this[_0x4904dd(0x333)]['transformService'][_0x4904dd(0x253)](_0x4e65f8,_0x3e5ebd,!0x1);if(!_0x1409d9(_0x3dd7a9))return this[_0x4904dd(0x311)]={'message':_0x3dd7a9[_0x4904dd(0x236)][_0x4904dd(0x27e)],'operation':_0x4904dd(0x2bc),'reason':'transform-failed'},{'conflict':this['_conflict'],'state':this['getState'](),'status':_0x4904dd(0x287)};_0x2758cd['push']({'changeset':_0xeaf139({..._0x1dc3aa,'mutations':_0x3dd7a9[_0x4904dd(0x352)]}),'kind':_0x4904dd(0x24c)}),_0x3e5ebd=_0x3dd7a9[_0x4904dd(0x26f)];}let _0x2e4ef7=_0xbdb35a;for(let _0x4cc22b of _0x2758cd){if(_0x4cc22b[_0x4904dd(0x2c0)]===_0x4904dd(0x335)){let _0x4ac9fd=this[_0x4904dd(0x333)][_0x4904dd(0x2fb)][_0x4904dd(0x2e6)](this[_0x4904dd(0x2bb)]);_0x4ac9fd!==_0x4cc22b[_0x4904dd(0x2c7)][_0x4904dd(0x34e)]&&await this[_0x4904dd(0x278)](new j(_0x4904dd(0x1fd),'Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision')),_0x2e4ef7=_0x4ac9fd;continue;}_0x2e4ef7=await this['_replayRemoteChangesets'](_0x2e4ef7,[_0x4cc22b['changeset']]);}return this[_0x4904dd(0x341)][_0x4904dd(0x264)](_0x3e5ebd[_0x4904dd(0x2e2)](_0x5e4dde)),this[_0x4904dd(0x250)]!==null&&(this[_0x4904dd(0x250)]=_0x1db210===null?null:{...this[_0x4904dd(0x250)],'baseRev':_0x2e4ef7,'mutations':_0x1db210[_0x4904dd(0x2e2)](_0x5e4dde)}),this[_0x4904dd(0x24f)]=_0x2e4ef7,this[_0x4904dd(0x367)][_0x4904dd(0x2b8)](0x0),{'appliedChangesets':_0x9cd0bd[_0x4904dd(0x2e2)](z),'fromRevision':_0xbdb35a,'state':this[_0x4904dd(0x242)](),'status':_0x4904dd(0x1f2),'toRevision':_0x2e4ef7,'transformedPendingMutationCount':_0x3e5ebd[_0x4904dd(0x2ba)]};});}[_0x1c125c(0x2b3)](){const _0x5498ec=_0x1c125c;return this[_0x5498ec(0x283)]()||this[_0x5498ec(0x369)][_0x5498ec(0x240)](async()=>{const _0x2c3b30=_0x5498ec;this[_0x2c3b30(0x291)]('commit');let _0x3f67fb=[],_0x13800e=[];if(this[_0x2c3b30(0x250)]===null){if(this[_0x2c3b30(0x341)][_0x2c3b30(0x2a4)][_0x2c3b30(0x2ba)]===0x0)return{'state':this[_0x2c3b30(0x242)](),'status':_0x2c3b30(0x20b)};if(await this['_fetchChangesets'](),this[_0x2c3b30(0x367)][_0x2c3b30(0x2ba)]>0x0)return{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x3f67fb,'knownHeadRevision':this[_0x2c3b30(0x260)],'state':this[_0x2c3b30(0x242)](),'status':_0x2c3b30(0x35a)};this[_0x2c3b30(0x2ff)]();}for(;this[_0x2c3b30(0x250)]!==null;){let _0x40e4be=this[_0x2c3b30(0x250)],_0x25eddb;try{_0x25eddb=await this[_0x2c3b30(0x23c)][_0x2c3b30(0x265)](_0x40e4be);}catch{return{'changeset':U(_0x40e4be),'confirmedChangesets':_0x3f67fb,'state':this['getState'](),'status':_0x2c3b30(0x2fe)};}if(_0x25eddb['status']===_0x2c3b30(0x32a)||_0x25eddb[_0x2c3b30(0x351)]===_0x2c3b30(0x2fe))return{'changeset':U(_0x40e4be),'confirmedChangesets':_0x3f67fb,'state':this[_0x2c3b30(0x242)](),'status':_0x25eddb[_0x2c3b30(0x351)]};if(_0x25eddb[_0x2c3b30(0x351)]==='rejected')return _0x25eddb[_0x2c3b30(0x2d2)]==='invalid-revision'?(this[_0x2c3b30(0x341)][_0x2c3b30(0x2f7)](_0x40e4be[_0x2c3b30(0x2f0)]),this['_awaiting']=null,await this[_0x2c3b30(0x26d)](),{'baseRevision':this[_0x2c3b30(0x24f)],'confirmedChangesets':_0x3f67fb,'knownHeadRevision':this[_0x2c3b30(0x260)],'state':this[_0x2c3b30(0x242)](),'status':'pull-required'}):(this[_0x2c3b30(0x311)]={'message':_0x25eddb[_0x2c3b30(0x27e)],'operation':'commit','reason':_0x25eddb[_0x2c3b30(0x2d2)]===_0x2c3b30(0x229)?_0x2c3b30(0x32b):'changeset-rejected'},{'conflict':this[_0x2c3b30(0x311)],'confirmedChangesets':_0x3f67fb,'state':this[_0x2c3b30(0x242)](),'status':'conflict'});let _0x2011a2=_0x25eddb['acceptedChangeset'];try{this[_0x2c3b30(0x279)](_0x40e4be,_0x25eddb['precedingChangesets'],_0x2011a2);}catch(_0x1eef98){await this[_0x2c3b30(0x278)](_0x1eef98);}let _0x598a48=_0x40e4be[_0x2c3b30(0x2f0)];if(_0x25eddb[_0x2c3b30(0x212)][_0x2c3b30(0x2ba)]>0x0){let _0xd5bbdf=await this[_0x2c3b30(0x273)](_0x40e4be,_0x25eddb['precedingChangesets']);if(_0xd5bbdf===null)return{'conflict':this[_0x2c3b30(0x311)],'confirmedChangesets':_0x3f67fb,'state':this[_0x2c3b30(0x242)](),'status':'conflict'};_0x598a48=_0xd5bbdf['awaitingMutations'];try{this[_0x2c3b30(0x203)](_0x25eddb['precedingChangesets']);}catch(_0x11f848){await this[_0x2c3b30(0x278)](_0x11f848);}_0x13800e[_0x2c3b30(0x1f1)](..._0x25eddb[_0x2c3b30(0x212)][_0x2c3b30(0x2e2)](z));}G(_0x2011a2[_0x2c3b30(0x2f0)],_0x598a48)||await this['_closeAfterFatalError'](new j(_0x2c3b30(0x1fd),_0x2c3b30(0x29c)));let _0x4ab51e=this[_0x2c3b30(0x333)][_0x2c3b30(0x2fb)][_0x2c3b30(0x2e6)](this[_0x2c3b30(0x2bb)]);if(_0x4ab51e!==_0x2011a2[_0x2c3b30(0x34e)]&&await this[_0x2c3b30(0x278)](new j(_0x2c3b30(0x1fd),_0x2c3b30(0x27f))),this[_0x2c3b30(0x24f)]=_0x4ab51e,this['_knownHeadRevision']=Math[_0x2c3b30(0x30b)](this[_0x2c3b30(0x260)],_0x4ab51e),this[_0x2c3b30(0x250)]=null,_0x3f67fb[_0x2c3b30(0x1f1)](z(_0x2011a2)),this[_0x2c3b30(0x341)][_0x2c3b30(0x2a4)]['length']===0x0)break;this['_createAwaitingFromPending']();}return{'confirmedChangesets':_0x3f67fb,'reconciledChangesets':_0x13800e,'state':this[_0x2c3b30(0x242)](),'status':_0x2c3b30(0x231)};});}async[_0x1c125c(0x26d)](){const _0x11aee8=_0x1c125c;let _0x111017=this[_0x11aee8(0x260)],_0x289cef=await this[_0x11aee8(0x23c)][_0x11aee8(0x308)](_0x111017,void 0x0);if(_0x368375(_0x289cef[_0x11aee8(0x236)])){let _0x5d3097=_0x289cef['error'];throw new j('COLLABORATION_UNAVAILABLE',_0x5d3097?.[_0x11aee8(0x27e)]||_0x11aee8(0x271),{'retryable':!0x0});}let _0x220644=R(_0x289cef[_0x11aee8(0x2d8)],this[_0x11aee8(0x2bb)],this['unitType'],_0x111017),_0xf36a26=_0x220644['at'](-0x1)?.[_0x11aee8(0x34e)]??_0x111017;if(_0x289cef[_0x11aee8(0x2ab)]!==void 0x0&&_0x289cef['latestRevision']!==_0xf36a26)throw new j(_0x11aee8(0x1fd),_0x11aee8(0x29a));return _0x220644[_0x11aee8(0x2ba)]===0x0?{'knownHeadRevision':this[_0x11aee8(0x260)],'state':this[_0x11aee8(0x242)](),'status':'unchanged'}:(this[_0x11aee8(0x367)][_0x11aee8(0x1f1)](..._0x220644),this[_0x11aee8(0x260)]=_0xf36a26,{'changesets':_0x220644[_0x11aee8(0x2e2)](z),'fromRevision':_0x111017,'state':this['getState'](),'status':_0x11aee8(0x344),'toRevision':_0xf36a26});}[_0x1c125c(0x2ff)](){const _0x47a405=_0x1c125c;let _0x2f1fba=this['_capture'][_0x47a405(0x290)]();this[_0x47a405(0x250)]={'baseRev':this[_0x47a405(0x24f)],'mutations':_0x2f1fba,'reqId':this[_0x47a405(0x303)],'sid':this[_0x47a405(0x319)]},this['_nextReqId']+=0x1;}[_0x1c125c(0x279)](_0x5e5048,_0x521c30,_0x591bdd){const _0x278bed=_0x1c125c;let _0x31dff4=R(_0x521c30,this['unitId'],this['unitType'],this[_0x278bed(0x24f)])['at'](-0x1)?.[_0x278bed(0x34e)]??this['_baseRevision'];if(_0x591bdd[_0x278bed(0x21a)]!==this[_0x278bed(0x2bb)]||_0x591bdd[_0x278bed(0x204)]!==this[_0x278bed(0x2ce)]||_0x591bdd[_0x278bed(0x35d)]!==_0x5e5048[_0x278bed(0x35d)]||_0x591bdd[_0x278bed(0x29b)]!==_0x5e5048['reqId']||_0x591bdd[_0x278bed(0x1ef)]!==_0x31dff4||_0x591bdd['revision']!==_0x31dff4+0x1)throw new j(_0x278bed(0x1fd),_0x278bed(0x222));}async[_0x1c125c(0x273)](_0x5573b7,_0x4126ca){const _0x3b9f2e=_0x1c125c;let _0x4dc497=W(_0x5573b7[_0x3b9f2e(0x2f0)],this[_0x3b9f2e(0x2bb)],this[_0x3b9f2e(0x2ce)],this[_0x3b9f2e(0x24f)]),_0x56995d=W(this[_0x3b9f2e(0x341)][_0x3b9f2e(0x2a4)],this[_0x3b9f2e(0x2bb)],this[_0x3b9f2e(0x2ce)],this['_baseRevision']),_0x186fc5=[];for(let _0x12b657 of _0x4126ca){let _0x200e35=_0x533c3a(_0x12b657),_0x19bc47=this[_0x3b9f2e(0x333)][_0x3b9f2e(0x2cf)][_0x3b9f2e(0x253)](_0x200e35[_0x3b9f2e(0x2f0)],_0x4dc497,!0x1);if(!_0x1409d9(_0x19bc47))return this['_setTransformConflict'](_0x3b9f2e(0x2b3),_0x19bc47[_0x3b9f2e(0x236)]),null;_0x4dc497=_0x19bc47['m2Prime'];let _0x407436=this[_0x3b9f2e(0x333)][_0x3b9f2e(0x2cf)][_0x3b9f2e(0x253)](_0x19bc47[_0x3b9f2e(0x352)],_0x56995d,!0x1);if(!_0x1409d9(_0x407436))return this[_0x3b9f2e(0x21b)]('commit',_0x407436[_0x3b9f2e(0x236)]),null;_0x56995d=_0x407436[_0x3b9f2e(0x26f)],_0x186fc5['push'](_0xeaf139({..._0x200e35,'mutations':_0x407436[_0x3b9f2e(0x352)]}));}let _0x3b5dcb=await this[_0x3b9f2e(0x23b)](this['_baseRevision'],_0x186fc5);return this[_0x3b9f2e(0x341)][_0x3b9f2e(0x264)](_0x56995d[_0x3b9f2e(0x2e2)](_0x5e4dde)),this[_0x3b9f2e(0x24f)]=_0x3b5dcb,{'awaitingMutations':_0x4dc497[_0x3b9f2e(0x2e2)](_0x5e4dde),'revision':_0x3b5dcb};}['_setTransformConflict'](_0x3d1f85,_0x4b7b82){const _0x12939e=_0x1c125c;this[_0x12939e(0x311)]={'message':_0x4b7b82[_0x12939e(0x27e)],'operation':_0x3d1f85,'reason':_0x12939e(0x239)};}async[_0x1c125c(0x23b)](_0x281814,_0x4f0337){const _0x4b8947=_0x1c125c;try{return await this[_0x4b8947(0x341)][_0x4b8947(0x33b)](async()=>B(this[_0x4b8947(0x333)],this['unitId'],this[_0x4b8947(0x2ce)],_0x281814,_0x4f0337,_0x4b8947(0x24c)));}catch(_0x2b9fe8){return await this['_closeAfterFatalError'](_0x2b9fe8);}}async[_0x1c125c(0x278)](_0x2ac446){const _0x770db4=_0x1c125c;this[_0x770db4(0x1f6)]=!0x1,this[_0x770db4(0x323)]??=this[_0x770db4(0x210)]();try{await this[_0x770db4(0x323)];}catch{}throw _0x2ac446;}[_0x1c125c(0x203)](_0x37e69a){const _0x4dacb7=_0x1c125c;let _0x1b02de=_0x37e69a['at'](-0x1)?.['revision'];if(_0x1b02de===void 0x0||this[_0x4dacb7(0x367)]['length']===0x0)return;let _0x492711=this[_0x4dacb7(0x367)]['findIndex'](({revision:_0x53621b})=>_0x53621b>_0x1b02de),_0x307470=this[_0x4dacb7(0x367)][_0x4dacb7(0x346)](0x0,_0x492711===-0x1?this[_0x4dacb7(0x367)][_0x4dacb7(0x2ba)]:_0x492711);for(let _0x2db18b of _0x307470){let _0x5c2ac9=_0x37e69a[_0x4dacb7(0x28f)](({revision:_0x7205a6})=>_0x7205a6===_0x2db18b[_0x4dacb7(0x34e)]);if(!_0x5c2ac9||!pe(_0x2db18b,_0x5c2ac9))throw new j('COLLABORATION_PROTOCOL_ERROR','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset');}this[_0x4dacb7(0x367)][_0x4dacb7(0x2b8)](0x0,_0x307470[_0x4dacb7(0x2ba)]);}['execute'](_0x235516){const _0x5d91cf=_0x1c125c;return this[_0x5d91cf(0x283)]()||this[_0x5d91cf(0x369)][_0x5d91cf(0x240)](async()=>{const _0x119b7f=_0x5d91cf;_0x235516[_0x119b7f(0x2eb)]===_0x119b7f(0x2b9)&&this[_0x119b7f(0x291)](_0x119b7f(0x2b9));let _0xd4b288=this['_capture'][_0x119b7f(0x2a4)][_0x119b7f(0x2ba)],_0x18e3c0=P(await this['_executor'][_0x119b7f(0x2fa)](_0x235516['code'],_0x235516[_0x119b7f(0x2eb)]));return _0x235516[_0x119b7f(0x2eb)]===_0x119b7f(0x2a1)?{'state':this[_0x119b7f(0x242)](),'value':_0x18e3c0}:{'mutations':this[_0x119b7f(0x341)][_0x119b7f(0x209)](_0xd4b288),'state':this[_0x119b7f(0x242)](),'value':_0x18e3c0};});}[_0x1c125c(0x215)](_0x294c60){const _0x4ec849=_0x1c125c;return this['_rejectIfNotAccepting']()||this[_0x4ec849(0x369)][_0x4ec849(0x240)](async()=>{const _0x51cdc2=_0x4ec849;if(this['_assertMutableState'](_0x51cdc2(0x326)),this[_0x51cdc2(0x250)]!==null)throw new j(_0x51cdc2(0x2dd),'Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation');let _0x3a489e=me(_0x294c60),_0xb0945e=[...this[_0x51cdc2(0x341)][_0x51cdc2(0x2a4)]];this[_0x51cdc2(0x341)][_0x51cdc2(0x264)](_0x3a489e);let _0x26e275=this[_0x51cdc2(0x242)]();return{'pendingMutationCount':_0x3a489e['length'],'previousMutationCount':_0xb0945e[_0x51cdc2(0x2ba)],'state':_0x26e275};});}['exportUnitData'](){const _0x14391b=_0x1c125c;return this[_0x14391b(0x283)]()||this[_0x14391b(0x369)][_0x14391b(0x240)](async()=>V(this[_0x14391b(0x246)],this[_0x14391b(0x2bb)],this['unitType']));}[_0x1c125c(0x2fc)](){const _0x1b74d8=_0x1c125c;return this[_0x1b74d8(0x323)]?this[_0x1b74d8(0x323)]:(this[_0x1b74d8(0x1f6)]=!0x1,this[_0x1b74d8(0x323)]=this['_operations'][_0x1b74d8(0x240)](async()=>await this[_0x1b74d8(0x210)]()),this[_0x1b74d8(0x323)]);}async[_0x1c125c(0x210)](){const _0x46f04a=_0x1c125c;try{this[_0x46f04a(0x341)][_0x46f04a(0x261)](),await this[_0x46f04a(0x23c)][_0x46f04a(0x2fc)]();}finally{try{this[_0x46f04a(0x246)]['dispose']();}finally{this[_0x46f04a(0x270)]=!0x0;}}}[_0x1c125c(0x283)](){const _0x4c524a=_0x1c125c;return this[_0x4c524a(0x1f6)]?null:Promise[_0x4c524a(0x237)](new j(_0x4c524a(0x2fd),_0x4c524a(0x20a)));}[_0x1c125c(0x291)](_0x330a7f){const _0x4d60ed=_0x1c125c;if(this[_0x4d60ed(0x311)]!==null)throw new j(_0x4d60ed(0x2dd),_0x4d60ed(0x292)+_0x330a7f+_0x4d60ed(0x1f0));}};function U(_0x4a390e){const _0x1b4d79=_0x1c125c;return{'baseRevision':_0x4a390e[_0x1b4d79(0x1ef)],'mutationCount':_0x4a390e['mutations']['length'],'reqId':_0x4a390e['reqId'],'revision':0x0,'sid':_0x4a390e[_0x1b4d79(0x35d)]};}function _0x205e(_0x8e356c,_0x415eb5){_0x8e356c=_0x8e356c-0x1ee;const _0x3bd627=_0x3bd6();let _0x205e77=_0x3bd627[_0x8e356c];return _0x205e77;}function W(_0x3eefd5,_0x3b8eb0,_0x5e423e,_0x10c77c){return _0x533c3a({'baseRev':_0x10c77c,'memberID':'','mutations':[..._0x3eefd5],'revision':0x0,'type':_0x5e423e,'unitID':_0x3b8eb0,'userID':''})['mutations'];}function pe(_0x3053fb,_0x219213){const _0x28fa16=_0x1c125c;return _0x3053fb['unitID']===_0x219213[_0x28fa16(0x21a)]&&_0x3053fb[_0x28fa16(0x204)]===_0x219213['type']&&_0x3053fb[_0x28fa16(0x1ef)]===_0x219213[_0x28fa16(0x1ef)]&&_0x3053fb[_0x28fa16(0x34e)]===_0x219213['revision']&&_0x3053fb[_0x28fa16(0x35d)]===_0x219213['sid']&&_0x3053fb['reqId']===_0x219213[_0x28fa16(0x29b)]&&JSON[_0x28fa16(0x27c)](_0x3053fb['mutations'])===JSON[_0x28fa16(0x27c)](_0x219213[_0x28fa16(0x2f0)]);}function G(_0x1cf528,_0x431ce5){const _0x306b79=_0x1c125c;return _0x1cf528[_0x306b79(0x2ba)]===_0x431ce5[_0x306b79(0x2ba)]&&_0x1cf528['every']((_0x104d09,_0x4d8f5a)=>_0x104d09['id']===_0x431ce5[_0x4d8f5a]?.['id']&&_0x104d09[_0x306b79(0x302)]===_0x431ce5[_0x4d8f5a]?.[_0x306b79(0x302)]);}function me(_0x1fad32){const _0x58dc86=_0x1c125c;if(!Array[_0x58dc86(0x2b5)](_0x1fad32))throw new j('COLLABORATION_INVALID_INPUT',_0x58dc86(0x30f));return _0x1fad32[_0x58dc86(0x2e2)](_0x1d5c8b=>{const _0x11427c=_0x58dc86;if(!_0x1d5c8b||typeof _0x1d5c8b!=_0x11427c(0x2d4)||typeof _0x1d5c8b['id']!='string'||_0x1d5c8b['id'][_0x11427c(0x2ba)]===0x0||typeof _0x1d5c8b[_0x11427c(0x302)]!=_0x11427c(0x31c))throw new j('COLLABORATION_INVALID_INPUT',_0x11427c(0x32e));return{'data':_0x1d5c8b[_0x11427c(0x302)],'id':_0x1d5c8b['id']};});}var K=class extends _0xfcc3bd{[_0x1c125c(0x28b)];[_0x1c125c(0x314)];static [_0x1c125c(0x33e)]=_0x1c125c(0x256);constructor(_0x3cd7e6,_0x22c3e0){const _0x352d0c=_0x1c125c;super(),this[_0x352d0c(0x28b)]=_0x3cd7e6,this[_0x352d0c(0x314)]=_0x22c3e0;}['onStarting'](){const _0x59de1c=_0x1c125c;this[_0x59de1c(0x28b)]['snapshotServerService']!==void 0x0&&_0x3f6423(this[_0x59de1c(0x314)],[[_0x5264f8,{'useValue':this[_0x59de1c(0x28b)][_0x59de1c(0x364)]}]]),this['_config']['onStarting']({'commandService':this['_injector'][_0x59de1c(0x31e)](_0x1a2933),'compressMutationService':this[_0x59de1c(0x314)][_0x59de1c(0x31e)](_0x430ed9),'instanceService':this['_injector']['get'](_0x5d7beb),'injector':this[_0x59de1c(0x314)],'revisionService':this[_0x59de1c(0x314)][_0x59de1c(0x31e)](_0x486697),'transformService':this[_0x59de1c(0x314)][_0x59de1c(0x31e)](_0xdf6557)});}};K=_0x316c9f([_0x4fbdae(_0x55aba4),_0x277511(0x1,_0x55309b(_0x2314e0))],K);function he(_0x35e8b1,_0x50b887){const _0x4d4e28=_0x1c125c;let _0x4a4acf;if(_0x35e8b1[_0x4d4e28(0x2d7)](K,{'onStarting'(_0x1d0e18){_0x4a4acf=_0x1d0e18;},..._0x50b887===void 0x0?{}:{'snapshotServerService':_0x50b887}}),!_0x4a4acf)throw Error(_0x4d4e28(0x2f9));return _0x4a4acf;}async function ge(_0x3b1255,_0x160d5e,_0x54e5b2){const _0x10d323=_0x1c125c;let _0x5b4988=await _0x3b1255[_0x10d323(0x258)](0x0);if(_0x368375(_0x5b4988[_0x10d323(0x236)])){let _0xa2859f=_0x5b4988[_0x10d323(0x236)];throw new j(_0x10d323(0x29d),_0xa2859f?.['message']||_0x10d323(0x30e));}let _0x44d880=_0x5b4988['snapshot'];if(!_0x44d880)throw new j(_0x10d323(0x29d),_0x10d323(0x2a2));_e(_0x44d880,_0x160d5e,_0x54e5b2);try{switch(_0x54e5b2){case _0x13c60c[_0x10d323(0x2f3)]:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':await _0x3ad34b(_0x44d880,await q(_0x3b1255,_0x44d880)),'unitType':_0x54e5b2};case _0x13c60c['UNIVER_DOC']:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':_0xd2df7d(_0x44d880),'unitType':_0x54e5b2};case _0x13c60c[_0x10d323(0x33d)]:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':_0x72938(_0x44d880),'unitType':_0x54e5b2};case _0x13c60c['UNIVER_BASE']:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':await _0x3838dc(_0x44d880,await q(_0x3b1255,_0x44d880)),'unitType':_0x54e5b2};case _0x13c60c[_0x10d323(0x321)]:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':_0x93bace(_0x44d880),'unitType':_0x54e5b2};default:throw new j(_0x10d323(0x2dd),_0x10d323(0x348)+_0x54e5b2);}}catch(_0x58abde){throw _0x58abde instanceof j?_0x58abde:new j(_0x10d323(0x29d),_0x10d323(0x262),{'cause':_0x58abde});}}function _e(_0x557296,_0x5ca2e5,_0xb6bec8){const _0x5e4e4e=_0x1c125c;if(_0x557296[_0x5e4e4e(0x21a)]!==_0x5ca2e5||_0x557296[_0x5e4e4e(0x204)]!==_0xb6bec8)throw new j(_0x5e4e4e(0x29d),_0x5e4e4e(0x36e));if(!Number[_0x5e4e4e(0x205)](_0x557296[_0x5e4e4e(0x245)])||_0x557296[_0x5e4e4e(0x245)]<0x1)throw new j(_0x5e4e4e(0x29d),_0x5e4e4e(0x26e));}async function q(_0x15e987,_0x472bad){const _0x5a12ab=_0x1c125c;let _0x4df9d6=_0x472bad[_0x5a12ab(0x2a3)];if(!_0x4df9d6)throw new j(_0x5a12ab(0x29d),_0x5a12ab(0x2a8));let _0x36c762=Object[_0x5a12ab(0x31d)](_0x4df9d6[_0x5a12ab(0x347)])[_0x5a12ab(0x22c)](({blocks:_0x3802a7})=>_0x3802a7);if(new Set(_0x36c762)['size']!==_0x36c762[_0x5a12ab(0x2ba)])throw new j(_0x5a12ab(0x29d),_0x5a12ab(0x2f1));return await Promise[_0x5a12ab(0x322)](_0x36c762[_0x5a12ab(0x2e2)](async _0x209d9c=>{const _0x5428cc=_0x5a12ab;let _0x3ce35c=await _0x15e987[_0x5428cc(0x243)](_0x209d9c);if(_0x368375(_0x3ce35c[_0x5428cc(0x236)])||!_0x3ce35c[_0x5428cc(0x325)])throw new j(_0x5428cc(0x29d),_0x3ce35c['error']?.[_0x5428cc(0x27e)]||_0x5428cc(0x2ae)+_0x209d9c+_0x5428cc(0x2c3));if(_0x3ce35c['block']['id']!==_0x209d9c)throw new j('COLLABORATION_LOAD_FAILED',_0x5428cc(0x2ae)+_0x209d9c+'\x20returned\x20a\x20different\x20block\x20identity');return _0x3ce35c[_0x5428cc(0x325)];}));}function ve(_0x1eb420){const _0x11ed99=_0x1c125c;let _0x42b174=_0x1eb420[_0x11ed99(0x2a6)]??0xa00000;if(!Number[_0x11ed99(0x205)](_0x42b174)||_0x42b174<=0x0)throw new j(_0x11ed99(0x2dd),_0x11ed99(0x249));return{async 'load'(_0x2d5457,_0x1b6122){const _0x236398=_0x11ed99;be(_0x2d5457,_0x1b6122);let _0x4478fd,_0x105ca1={'unitId':_0x2d5457,'unitType':_0x1b6122},_0x5205f5={'unitId':_0x2d5457,'unitType':_0x1b6122,..._0x1eb420['snapshotServerService']===void 0x0?{}:{'resolveSnapshotService':()=>{const _0xa8417a=_0x205e;if(_0x4478fd===void 0x0)throw new j(_0xa8417a(0x29d),_0xa8417a(0x289));return _0x4478fd;}}},_0x47f4c9;try{_0x47f4c9=await _0x1eb420['backend'][_0x236398(0x238)](_0x105ca1);}catch(_0x3c3ef3){throw new j(_0x236398(0x2c9),_0x236398(0x35f),{'cause':_0x3c3ef3,'retryable':!0x0});}let _0x2c2876;try{_0x2c2876=await _0x1eb420[_0x236398(0x1f8)](_0x5205f5);let _0x2fc080=he(_0x2c2876,_0x1eb420[_0x236398(0x364)]);_0x1eb420[_0x236398(0x364)]!==void 0x0&&(_0x4478fd=_0x2fc080[_0x236398(0x257)]['get'](_0x3a88f9));let _0x386eda=await xe(_0x47f4c9,_0x2d5457,_0x1b6122);Se(_0x386eda,_0x105ca1),Ce(_0x2c2876,_0x386eda);let _0x4fc88d=B(_0x2fc080,_0x2d5457,_0x1b6122,J(_0x386eda[_0x236398(0x254)]),_0x386eda['changesets']),_0x190111=await _0x47f4c9['fetchChangesets'](_0x4fc88d,void 0x0);if(_0x368375(_0x190111[_0x236398(0x236)])){let _0x570060=_0x190111['error'];throw new j(_0x236398(0x2c9),_0x570060?.[_0x236398(0x27e)]||_0x236398(0x2b1),{'retryable':!0x0});}let _0x4127cc=R(_0x190111[_0x236398(0x2d8)],_0x2d5457,_0x1b6122,_0x4fc88d),_0x1be2b9=_0x4127cc['at'](-0x1)?.[_0x236398(0x34e)]??_0x4fc88d;if(_0x190111[_0x236398(0x2ab)]!==void 0x0&&_0x190111[_0x236398(0x2ab)]!==_0x1be2b9)throw new j(_0x236398(0x1fd),_0x236398(0x22d));return _0x4fc88d=B(_0x2fc080,_0x2d5457,_0x1b6122,_0x4fc88d,_0x4127cc),await ye(_0x2fc080),new fe(_0x2d5457,_0x1b6122,_0x4fc88d,_0x47f4c9,_0x2c2876,_0x2fc080,_0x42b174);}catch(_0x4b51fe){try{await _0x47f4c9[_0x236398(0x2fc)]();}catch{}try{_0x2c2876?.[_0x236398(0x261)]();}catch{}throw _0x4b51fe instanceof j?_0x4b51fe:new j(_0x236398(0x29d),'Failed\x20to\x20create\x20the\x20collaboration\x20runtime',{'cause':_0x4b51fe});}}};}async function ye(_0xcca90f){const _0x16a34a=_0x1c125c;_0xcca90f[_0x16a34a(0x257)][_0x16a34a(0x306)](_0x1b53cc)&&await _0xcca90f[_0x16a34a(0x257)][_0x16a34a(0x31e)](_0x1b53cc)[_0x16a34a(0x299)]();}function be(_0x50073f,_0x43aa9f){const _0xec45ab=_0x1c125c;if(_0x50073f[_0xec45ab(0x224)]()[_0xec45ab(0x2ba)]===0x0)throw new j('COLLABORATION_INVALID_INPUT',_0xec45ab(0x2cb));if(_0x43aa9f!==_0x13c60c[_0xec45ab(0x2f3)]&&_0x43aa9f!==_0x13c60c[_0xec45ab(0x2f8)]&&_0x43aa9f!==_0x13c60c['UNIVER_SLIDE']&&_0x43aa9f!==_0x13c60c[_0xec45ab(0x35b)]&&_0x43aa9f!==_0x13c60c[_0xec45ab(0x321)])throw new j('COLLABORATION_INVALID_INPUT',_0xec45ab(0x348)+_0x43aa9f);}async function xe(_0x2f070d,_0x13d26d,_0x8498d1){const _0x2e546d=_0x1c125c;return _0x2f070d[_0x2e546d(0x294)]===_0x2e546d(0x227)?await _0x2f070d[_0x2e546d(0x315)]():await ge(_0x2f070d,_0x13d26d,_0x8498d1);}function Se(_0x26d906,_0x5c699d){const _0x41a519=_0x1c125c;if(_0x26d906[_0x41a519(0x2ce)]!==_0x5c699d['unitType'])throw new j(_0x41a519(0x29d),_0x41a519(0x28a));if(_0x26d906[_0x41a519(0x254)]['id']!==_0x5c699d['unitId'])throw new j('COLLABORATION_LOAD_FAILED',_0x41a519(0x1fa));J(_0x26d906['unitData']);}function J(_0x1d24bd){const _0x53230a=_0x1c125c;let _0x31d7e1=_0x1d24bd[_0x53230a(0x245)];if(!Number[_0x53230a(0x205)](_0x31d7e1)||_0x31d7e1===void 0x0||_0x31d7e1<0x1)throw new j('COLLABORATION_LOAD_FAILED',_0x53230a(0x233));return _0x31d7e1;}function Ce(_0x27ec6c,_0x47460b){const _0xfe5a70=_0x1c125c;switch(_0x47460b[_0xfe5a70(0x2ce)]){case _0x13c60c['UNIVER_SHEET']:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;case _0x13c60c[_0xfe5a70(0x2f8)]:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;case _0x13c60c[_0xfe5a70(0x33d)]:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b['unitData']));return;case _0x13c60c[_0xfe5a70(0x35b)]:_0x27ec6c['createUnit'](_0x47460b['unitType'],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;case _0x13c60c['UNIVER_BOARD']:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;}}var we=class{[_0x1c125c(0x28b)];[_0x1c125c(0x320)];[_0x1c125c(0x268)];['format']=_0x1c125c(0x211);constructor(_0x462923,_0x5d46f4,_0x710b37){const _0x442ba5=_0x1c125c;this[_0x442ba5(0x28b)]=_0x462923,this[_0x442ba5(0x320)]=_0x5d46f4,this[_0x442ba5(0x268)]=_0x710b37;}[_0x1c125c(0x2da)](){const _0xe458ab=_0x1c125c;return this[_0xe458ab(0x268)][_0xe458ab(0x2da)]();}async[_0x1c125c(0x258)](_0x42c6e0=0x0){const _0x5f0a35=_0x1c125c;let _0x4bdd21=X(this['_config'][_0x5f0a35(0x301)],this['_target'][_0x5f0a35(0x2ce)],_0x5f0a35(0x305),this[_0x5f0a35(0x320)][_0x5f0a35(0x2bb)],_0x5f0a35(0x245),_0x42c6e0),_0x50bbf8=await Y(this[_0x5f0a35(0x28b)],_0x4bdd21);return Te(_0x50bbf8[_0x5f0a35(0x211)]),_0x50bbf8;}async['getSheetBlock'](_0x72459f){const _0x405da8=_0x1c125c;let _0x766c40=X(this[_0x405da8(0x28b)][_0x405da8(0x301)],this[_0x405da8(0x320)][_0x405da8(0x2ce)],_0x405da8(0x305),this[_0x405da8(0x320)][_0x405da8(0x2bb)],_0x405da8(0x325),_0x72459f),_0x1d92ac=await Y(this[_0x405da8(0x28b)],_0x766c40);return _0x1d92ac[_0x405da8(0x325)]&&typeof _0x1d92ac[_0x405da8(0x325)][_0x405da8(0x302)]=='string'&&(_0x1d92ac[_0x405da8(0x325)][_0x405da8(0x302)]=Z(_0x1d92ac[_0x405da8(0x325)][_0x405da8(0x302)])),_0x1d92ac;}async['fetchChangesets'](_0x2d2e17,_0x3cb34b=0x0){const _0x3998a2=_0x1c125c;let _0x1884ee=X(this['_config'][_0x3998a2(0x301)],this[_0x3998a2(0x320)][_0x3998a2(0x2ce)],_0x3998a2(0x305),this[_0x3998a2(0x320)][_0x3998a2(0x2bb)],_0x3998a2(0x2ea));_0x1884ee[_0x3998a2(0x2ec)][_0x3998a2(0x21f)](_0x3998a2(0x2ac),String(_0x2d2e17)),_0x1884ee[_0x3998a2(0x2ec)]['set']('to',String(_0x3cb34b));let _0x1bd8a6=await Y(this['_config'],_0x1884ee);return this[_0x3998a2(0x268)][_0x3998a2(0x34d)](),_0x1bd8a6;}async[_0x1c125c(0x265)](_0xcf3d5e){const _0x101bbc=_0x1c125c;await this[_0x101bbc(0x268)]['ensureOnline']();let _0x4d1ba4=this[_0x101bbc(0x268)][_0x101bbc(0x2bf)](_0xcf3d5e[_0x101bbc(0x35d)],_0xcf3d5e[_0x101bbc(0x29b)]),_0x5d9ddc={..._0xcf3d5e,'memberID':this[_0x101bbc(0x268)][_0x101bbc(0x2e7)],'revision':0x0,'type':this[_0x101bbc(0x320)][_0x101bbc(0x2ce)],'unitID':this[_0x101bbc(0x320)][_0x101bbc(0x2bb)],'userID':''},_0xb9d70b=X(this[_0x101bbc(0x28b)][_0x101bbc(0x28c)],this[_0x101bbc(0x320)][_0x101bbc(0x2ce)],_0x101bbc(0x305),this['_target'][_0x101bbc(0x2bb)],_0x101bbc(0x259)),_0x92b2af=this[_0x101bbc(0x28b)][_0x101bbc(0x282)](_0xb9d70b,{'body':JSON[_0x101bbc(0x27c)]({'changeset':_0x5d9ddc,'memberID':this[_0x101bbc(0x268)][_0x101bbc(0x2e7)],'type':this[_0x101bbc(0x320)]['unitType'],'unitID':this[_0x101bbc(0x320)]['unitId']}),'headers':{'content-type':_0x101bbc(0x247)},'method':_0x101bbc(0x202)})[_0x101bbc(0x2df)](async _0x2cb285=>_0x2cb285[_0x101bbc(0x351)]===0x191||_0x2cb285['status']===0x193?_0x101bbc(0x34b):_0x2cb285[_0x101bbc(0x351)]===0x190||_0x2cb285[_0x101bbc(0x351)]===0x199?_0x101bbc(0x2a5):_0x2cb285['ok']?'accepted':'unknown')[_0x101bbc(0x286)](()=>_0x101bbc(0x2fe)),_0x181fc1=Ee(this[_0x101bbc(0x28b)]['commitTimeoutMs']),_0x590baa=_0x92b2af[_0x101bbc(0x2df)](_0x255b77=>_0x255b77==='permission'?{'status':'permission-rejected'}:_0x255b77===_0x101bbc(0x2a5)?{'status':'changeset-rejected'}:new Promise(()=>void 0x0)),_0x1f0f33=await Promise['race']([_0x4d1ba4['promise'],_0x590baa,_0x181fc1[_0x101bbc(0x34c)]['then'](()=>({'status':_0x101bbc(0x293)}))])['finally'](()=>{const _0xdf6a29=_0x101bbc;_0x4d1ba4[_0xdf6a29(0x232)](),_0x181fc1[_0xdf6a29(0x232)]();});if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x293)){let _0x5f30f0=await _0x92b2af;return _0x5f30f0===_0x101bbc(0x34b)?{'message':_0x101bbc(0x2ad),'reason':_0x101bbc(0x229),'status':_0x101bbc(0x2cd)}:_0x5f30f0===_0x101bbc(0x2a5)?{'message':_0x101bbc(0x29f),'reason':_0x101bbc(0x1f4),'status':_0x101bbc(0x2cd)}:{'status':'unknown'};}if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x2a7))return{'status':_0x101bbc(0x2fe)};if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x32a))return{'status':_0x101bbc(0x32a)};if(_0x1f0f33[_0x101bbc(0x351)]==='permission-rejected')return{'message':_0x101bbc(0x2ad),'reason':_0x101bbc(0x229),'status':_0x101bbc(0x2cd)};if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x280)){let _0x331be9=await this[_0x101bbc(0x308)](_0xcf3d5e[_0x101bbc(0x1ef)],_0xcf3d5e[_0x101bbc(0x1ef)]);return{'message':_0x101bbc(0x29f),'reason':_0x331be9['latestRevision']!==void 0x0&&_0x331be9[_0x101bbc(0x2ab)]<_0xcf3d5e[_0x101bbc(0x1ef)]?'invalid-revision':_0x101bbc(0x1f4),'status':_0x101bbc(0x2cd)};}let _0x1d5898=_0x1f0f33[_0x101bbc(0x2c7)],_0x4fe65a=await this[_0x101bbc(0x308)](_0xcf3d5e[_0x101bbc(0x1ef)],_0x1d5898[_0x101bbc(0x34e)]-0x1);if(_0x368375(_0x4fe65a[_0x101bbc(0x236)])){let _0x41237f=_0x4fe65a[_0x101bbc(0x236)];throw new j(_0x101bbc(0x2c9),_0x41237f?.[_0x101bbc(0x27e)]||_0x101bbc(0x2db),{'retryable':!0x0});}return{'acceptedChangeset':_0x1d5898,'precedingChangesets':_0x4fe65a[_0x101bbc(0x2d8)],'status':'confirmed'};}async[_0x1c125c(0x2fc)](){const _0x508a19=_0x1c125c;await this[_0x508a19(0x268)]['close']();}};async function Y(_0x2a910b,_0x5e0980){const _0x339a24=_0x1c125c;let _0x1f44d6;try{_0x1f44d6=await _0x2a910b[_0x339a24(0x282)](_0x5e0980,{'method':_0x339a24(0x218)});}catch(_0x153906){throw new j(_0x339a24(0x2c9),_0x339a24(0x354),{'cause':_0x153906,'retryable':!0x0});}if(!_0x1f44d6['ok'])throw new j(_0x339a24(0x2c9),'Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20'+_0x1f44d6[_0x339a24(0x351)],{'retryable':_0x1f44d6[_0x339a24(0x351)]>=0x1f4});try{return await _0x1f44d6[_0x339a24(0x2e8)]();}catch(_0x2140c3){throw new j(_0x339a24(0x1fd),_0x339a24(0x36d),{'cause':_0x2140c3});}}function X(_0x5abf05,..._0xbf6f9b){const _0x4a2b04=_0x1c125c;let _0x578650=new URL(_0x5abf05);return _0x578650['pathname']=_0x578650[_0x4a2b04(0x284)]['replace'](/\/$/,'')+'/'+_0xbf6f9b[_0x4a2b04(0x2e2)](_0x83555=>encodeURIComponent(String(_0x83555)))[_0x4a2b04(0x25b)]('/'),_0x578650;}function Te(_0xb2ee6c){const _0x405585=_0x1c125c;if(!_0xb2ee6c)return;let _0x1c76a8=[_0xb2ee6c[_0x405585(0x2a3)],_0xb2ee6c[_0x405585(0x25e)],_0xb2ee6c[_0x405585(0x2ed)],_0xb2ee6c[_0x405585(0x334)]];for(let _0x5d2ee6 of _0x1c76a8)_0x5d2ee6&&typeof _0x5d2ee6['originalMeta']==_0x405585(0x31c)&&(_0x5d2ee6[_0x405585(0x21c)]=Z(_0x5d2ee6[_0x405585(0x21c)]));if(_0xb2ee6c[_0x405585(0x2a3)]){for(let _0x4c2a48 of Object[_0x405585(0x31d)](_0xb2ee6c[_0x405585(0x2a3)][_0x405585(0x1ee)]))typeof _0x4c2a48['originalMeta']==_0x405585(0x31c)&&(_0x4c2a48['originalMeta']=Z(_0x4c2a48[_0x405585(0x21c)]));}}function Z(_0x221ee4){const _0x21bc3a=_0x1c125c;return Uint8Array[_0x21bc3a(0x2ac)](Buffer[_0x21bc3a(0x2ac)](_0x221ee4,'base64'));}function Ee(_0x6f29c3){let _0x4e8bf1;return{'cancel':()=>{_0x4e8bf1!==void 0x0&&clearTimeout(_0x4e8bf1);},'promise':new Promise(_0x348001=>{_0x4e8bf1=setTimeout(_0x348001,_0x6f29c3);})};}var De=class{[_0x1c125c(0x28b)];[_0x1c125c(0x2ca)]='offline';[_0x1c125c(0x24b)];['_connectPromise'];[_0x1c125c(0x2ef)]='';[_0x1c125c(0x2e3)]=new Map();[_0x1c125c(0x2b2)]=new Map();['_submissionWaiters']=new Map();[_0x1c125c(0x361)]=new Map();[_0x1c125c(0x225)];['_reconnectTimer'];[_0x1c125c(0x25a)]=0x0;constructor(_0x27850c){this['_config']=_0x27850c;}async[_0x1c125c(0x2d0)](_0x42e5c0){const _0x302ef1=_0x1c125c;let _0x2a147b=this[_0x302ef1(0x2e3)]['get'](_0x42e5c0[_0x302ef1(0x2bb)]);if(_0x2a147b&&_0x2a147b[_0x302ef1(0x2af)][_0x302ef1(0x2ce)]!==_0x42e5c0[_0x302ef1(0x2ce)])throw new j(_0x302ef1(0x2dd),_0x302ef1(0x275));if(await this[_0x302ef1(0x2c5)](),_0x2a147b)_0x2a147b['leases']+=0x1;else{try{await this['_join'](_0x42e5c0);}catch(_0x18455a){throw this[_0x302ef1(0x2e3)]['size']===0x0&&(this['_state']=_0x302ef1(0x2a7),this['_stopHeartbeat'](),this[_0x302ef1(0x24b)]?.['close'](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x302ef1(0x24b)]=void 0x0,this[_0x302ef1(0x2ef)]=''),_0x18455a;}this[_0x302ef1(0x2e3)][_0x302ef1(0x21f)](_0x42e5c0['unitId'],{'leases':0x1,'target':_0x42e5c0});}let _0x29563a=!0x1,_0x1f0a7f=()=>this[_0x302ef1(0x2ef)],_0x2985cf=new Set();return{'close':async()=>{const _0x21361b=_0x302ef1;if(!_0x29563a){_0x29563a=!0x0;for(let _0x3f22ff of _0x2985cf)_0x3f22ff[_0x21361b(0x232)]();_0x2985cf[_0x21361b(0x1f3)](),await this[_0x21361b(0x2f5)](_0x42e5c0[_0x21361b(0x2bb)]);}},'ensureOnline':async()=>await this['_ensureConnected'](),'getConnectionState':()=>_0x29563a?_0x302ef1(0x2a7):this[_0x302ef1(0x2ca)],get 'memberId'(){return _0x1f0a7f();},'takeInboundChangesets':()=>{const _0x936094=_0x302ef1;let _0x57ea35=this[_0x936094(0x361)][_0x936094(0x31e)](_0x42e5c0['unitId'])??[];return this[_0x936094(0x361)]['delete'](_0x42e5c0['unitId']),_0x57ea35;},'waitForSubmission':(_0x4a45be,_0x235d72)=>{const _0x22da84=_0x302ef1;let _0x2d209b=this[_0x22da84(0x269)](_0x4a45be,_0x235d72);return _0x2985cf[_0x22da84(0x32c)](_0x2d209b),_0x2d209b[_0x22da84(0x34c)][_0x22da84(0x2df)](()=>_0x2985cf['delete'](_0x2d209b),()=>_0x2985cf[_0x22da84(0x313)](_0x2d209b)),{'cancel':()=>{_0x2985cf['delete'](_0x2d209b),_0x2d209b['cancel']();},'promise':_0x2d209b[_0x22da84(0x34c)]};}};}async[_0x1c125c(0x2c5)](){const _0xf4256=_0x1c125c;if(this[_0xf4256(0x2ca)]!==_0xf4256(0x316)||this[_0xf4256(0x24b)]?.[_0xf4256(0x332)]!==WebSocket[_0xf4256(0x349)]){this[_0xf4256(0x2d9)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0xf4256(0x2d9)]=void 0x0,this[_0xf4256(0x24a)]??=this[_0xf4256(0x2d5)]();try{await this[_0xf4256(0x24a)];}finally{this[_0xf4256(0x24a)]=void 0x0;}}}async[_0x1c125c(0x2d5)](){const _0x139232=_0x1c125c;this[_0x139232(0x2ca)]='reconnecting';let _0x4b693f=await this[_0x139232(0x28b)][_0x139232(0x282)](this[_0x139232(0x28b)][_0x139232(0x2a9)],{'headers':{'content-type':_0x139232(0x247)},'method':_0x139232(0x218)});if(!_0x4b693f['ok'])throw this[_0x139232(0x2ca)]=_0x139232(0x355),new j(_0x139232(0x2c9),_0x139232(0x23f)+_0x4b693f[_0x139232(0x351)],{'retryable':_0x4b693f[_0x139232(0x351)]>=0x1f4});let _0x13f10d=await _0x4b693f['json']();if(typeof _0x13f10d[_0x139232(0x336)]!=_0x139232(0x31c)||_0x13f10d[_0x139232(0x336)][_0x139232(0x2ba)]===0x0)throw this[_0x139232(0x2ca)]=_0x139232(0x355),new j(_0x139232(0x1fd),'Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket');let _0x7a543=new URL(this[_0x139232(0x28b)][_0x139232(0x255)]);_0x7a543[_0x139232(0x2ec)][_0x139232(0x21f)](_0x139232(0x2e5),_0x13f10d[_0x139232(0x336)]);let _0xf570a0=new WebSocket(_0x7a543);this['_socket']=_0xf570a0,_0xf570a0[_0x139232(0x2aa)]('message',_0x46264b=>this[_0x139232(0x30c)](_0x46264b)),_0xf570a0[_0x139232(0x2aa)](_0x139232(0x2fc),()=>{const _0x1e0a2a=_0x139232;this[_0x1e0a2a(0x24b)]===_0xf570a0&&(this[_0x1e0a2a(0x267)](),this['_failCommandWaiters'](new j(_0x1e0a2a(0x2c9),_0x1e0a2a(0x221),{'retryable':!0x0})),this[_0x1e0a2a(0x2ca)]=this['_joined'][_0x1e0a2a(0x274)]===0x0?'closed':_0x1e0a2a(0x1fb),this[_0x1e0a2a(0x2e3)][_0x1e0a2a(0x274)]>0x0&&this[_0x1e0a2a(0x345)]());}),await Oe(_0xf570a0);let _0x570b47=await this['_requestCommand'](_0x21f97d['HELLO'],'',{'cmd':_0x21f97d[_0x139232(0x337)],'routeKey':''});if(_0x570b47[_0x139232(0x1f5)]!==_0x434455['OK']||typeof _0x570b47[_0x139232(0x297)]?.[_0x139232(0x21e)]!=_0x139232(0x31c))throw _0xf570a0[_0x139232(0x2fc)](),new j(_0x139232(0x1fd),_0x139232(0x217));this[_0x139232(0x2ef)]=_0x570b47[_0x139232(0x297)][_0x139232(0x21e)],this[_0x139232(0x2ca)]='online';for(let {target:_0x2ae989}of this[_0x139232(0x2e3)]['values']())try{await this['_join'](_0x2ae989);}catch(_0xed686){throw _0xf570a0[_0x139232(0x2fc)](0x3f3,_0x139232(0x266)),_0xed686;}this[_0x139232(0x25a)]=0x0,this[_0x139232(0x2bd)]();}async[_0x1c125c(0x223)](_0x283fcc){const _0x3b5fb4=_0x1c125c;let _0x845d22=await this['_requestCommand'](_0x21f97d['JOIN'],_0x283fcc['unitId'],{'cmd':_0x21f97d[_0x3b5fb4(0x1fe)],'joinReq':{'rooms':[{'args':'','roomID':_0x283fcc[_0x3b5fb4(0x2bb)]}]},'routeKey':_0x283fcc['unitId']});if(_0x845d22[_0x3b5fb4(0x1f5)]!==_0x434455['OK'])throw new j('COLLABORATION_UNAVAILABLE',typeof _0x845d22['reason']==_0x3b5fb4(0x31c)?_0x845d22[_0x3b5fb4(0x2d2)]:_0x3b5fb4(0x2ee));}['_requestCommand'](_0x4e9235,_0x443134,_0x269d2c){const _0x18c612=_0x1c125c;let _0x25aaff=this[_0x18c612(0x24b)];if(!_0x25aaff||_0x25aaff['readyState']!==WebSocket[_0x18c612(0x349)])return Promise[_0x18c612(0x237)](new j('COLLABORATION_UNAVAILABLE',_0x18c612(0x228),{'retryable':!0x0}));let _0x3c8ecb=_0x4e9235+':'+_0x443134;return new Promise((_0x4d5ba4,_0xc0197e)=>{const _0x41c9e0=_0x18c612;if(this['_commandWaiters'][_0x41c9e0(0x306)](_0x3c8ecb)){_0xc0197e(new j(_0x41c9e0(0x1fd),'A\x20'+_0x4e9235+'\x20request\x20is\x20already\x20active\x20for\x20'+_0x443134));return;}let _0x2cc4ad=setTimeout(()=>{const _0x1bed5e=_0x41c9e0;this[_0x1bed5e(0x2b2)][_0x1bed5e(0x313)](_0x3c8ecb),_0xc0197e(new j(_0x1bed5e(0x2c9),_0x1bed5e(0x22a)+_0x4e9235,{'retryable':!0x0}));},0x7530);this[_0x41c9e0(0x2b2)][_0x41c9e0(0x21f)](_0x3c8ecb,{'reject':_0xc0197e,'resolve':_0x4d5ba4,'timer':_0x2cc4ad});try{_0x25aaff['send'](JSON[_0x41c9e0(0x27c)](_0x269d2c));}catch(_0x3bcef6){this[_0x41c9e0(0x2b2)][_0x41c9e0(0x313)](_0x3c8ecb),clearTimeout(_0x2cc4ad),_0xc0197e(new j(_0x41c9e0(0x2c9),_0x41c9e0(0x230),{'cause':_0x3bcef6,'retryable':!0x0}));}});}[_0x1c125c(0x30c)](_0x506cbd){const _0x5b53cc=_0x1c125c;if(typeof _0x506cbd[_0x5b53cc(0x302)]!='string')return;let _0x4e6ca6;try{_0x4e6ca6=JSON[_0x5b53cc(0x2e1)](_0x506cbd[_0x5b53cc(0x302)]);}catch{this[_0x5b53cc(0x24b)]?.[_0x5b53cc(0x2fc)](0x3eb,_0x5b53cc(0x362));return;}let _0x536907=typeof _0x4e6ca6[_0x5b53cc(0x28e)]==_0x5b53cc(0x31c)?_0x4e6ca6[_0x5b53cc(0x28e)]:'';if(_0x4e6ca6[_0x5b53cc(0x23e)]===_0x21f97d[_0x5b53cc(0x337)]||_0x4e6ca6[_0x5b53cc(0x23e)]===_0x21f97d[_0x5b53cc(0x1fe)]||_0x4e6ca6[_0x5b53cc(0x23e)]===_0x21f97d[_0x5b53cc(0x33a)]){let _0x453890=_0x4e6ca6[_0x5b53cc(0x23e)]+':'+_0x536907,_0x7df65b=this[_0x5b53cc(0x2b2)][_0x5b53cc(0x31e)](_0x453890);_0x7df65b&&(this[_0x5b53cc(0x2b2)]['delete'](_0x453890),clearTimeout(_0x7df65b['timer']),_0x7df65b[_0x5b53cc(0x2a0)](_0x4e6ca6));return;}_0x4e6ca6['cmd']!==_0x21f97d[_0x5b53cc(0x31f)]||!_0x4e6ca6['collaMsg']||this['_handleCollaborationEvent'](_0x536907,_0x4e6ca6[_0x5b53cc(0x32d)]);}[_0x1c125c(0x338)](_0x21587e,_0x206e86){const _0x30f050=_0x1c125c;let _0x56679a=_0x206e86[_0x30f050(0x22b)],_0x2bd38a=_0x56679a==='changeset_ack'?_0x30f050(0x2b6):_0x56679a===_0x30f050(0x219)?_0x30f050(0x22f):_0x56679a===_0x30f050(0x33c)?_0x30f050(0x330):_0x56679a===_0x30f050(0x207)?_0x30f050(0x2de):_0x56679a===_0x30f050(0x30d)?_0x30f050(0x300):void 0x0;if(!_0x2bd38a)return;let _0x5d1cbf=ke(_0x206e86[_0x2bd38a]);if(!_0x5d1cbf||_0x5d1cbf[_0x30f050(0x21a)]!==_0x21587e)return;if(_0x56679a===_0x30f050(0x30d)){let _0x34744b=this[_0x30f050(0x361)][_0x30f050(0x31e)](_0x21587e)??[];_0x34744b[_0x30f050(0x1f1)](_0x5d1cbf),this[_0x30f050(0x361)][_0x30f050(0x21f)](_0x21587e,_0x34744b);return;}let _0xea876=Q(_0x5d1cbf[_0x30f050(0x35d)],_0x5d1cbf[_0x30f050(0x29b)]),_0x23ab31=this[_0x30f050(0x343)]['get'](_0xea876);_0x23ab31&&_0x23ab31(_0x56679a===_0x30f050(0x1ff)?{'changeset':_0x5d1cbf,'status':_0x30f050(0x25f)}:_0x56679a===_0x30f050(0x33c)?{'status':'retry'}:_0x56679a===_0x30f050(0x207)?{'status':_0x30f050(0x32b)}:{'status':_0x30f050(0x280)});}['_waitForSubmission'](_0x424d03,_0x30779c){const _0x4c79c7=_0x1c125c;let _0x5566ff=Q(_0x424d03,_0x30779c);if(this[_0x4c79c7(0x343)][_0x4c79c7(0x306)](_0x5566ff))return{'cancel':()=>void 0x0,'promise':Promise[_0x4c79c7(0x237)](new j(_0x4c79c7(0x2dd),'The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight'))};let _0x56c23a=()=>void 0x0;return{'cancel':()=>_0x56c23a({'status':_0x4c79c7(0x2a7)}),'promise':new Promise(_0x45a8c2=>{const _0xac75d4=_0x4c79c7;_0x56c23a=_0xd72b89=>{const _0x4b3900=_0x205e;this[_0x4b3900(0x343)][_0x4b3900(0x313)](_0x5566ff)&&_0x45a8c2(_0xd72b89);},this[_0xac75d4(0x343)][_0xac75d4(0x21f)](_0x5566ff,_0x56c23a);})};}async['_release'](_0x47e180){const _0x1a31e8=_0x1c125c;let _0x267f0c=this['_joined'][_0x1a31e8(0x31e)](_0x47e180);_0x267f0c&&(--_0x267f0c[_0x1a31e8(0x2c2)],!(_0x267f0c[_0x1a31e8(0x2c2)]>0x0)&&(this[_0x1a31e8(0x2e3)][_0x1a31e8(0x313)](_0x47e180),this[_0x1a31e8(0x361)]['delete'](_0x47e180),this['_socket']?.[_0x1a31e8(0x332)]===WebSocket[_0x1a31e8(0x349)]&&this[_0x1a31e8(0x24b)][_0x1a31e8(0x36c)](JSON['stringify']({'cmd':_0x21f97d[_0x1a31e8(0x2d6)],'leaveReq':{'args':'','roomID':_0x47e180},'routeKey':_0x47e180})),this[_0x1a31e8(0x2e3)][_0x1a31e8(0x274)]===0x0&&(this[_0x1a31e8(0x2ca)]=_0x1a31e8(0x2a7),this[_0x1a31e8(0x2d9)]!==void 0x0&&clearTimeout(this[_0x1a31e8(0x2d9)]),this['_reconnectTimer']=void 0x0,this[_0x1a31e8(0x267)](),this[_0x1a31e8(0x24b)]?.[_0x1a31e8(0x2fc)](0x3e8,_0x1a31e8(0x22e)),this[_0x1a31e8(0x24b)]=void 0x0,this[_0x1a31e8(0x2ef)]='')));}['_scheduleReconnect'](){const _0x71d9b0=_0x1c125c;if(this[_0x71d9b0(0x2d9)]!==void 0x0||this[_0x71d9b0(0x25a)]>=0x3){this[_0x71d9b0(0x25a)]>=0x3&&(this[_0x71d9b0(0x2ca)]='offline');return;}let _0x18ac2d=Math[_0x71d9b0(0x36a)](0x3e8*0x2**this[_0x71d9b0(0x25a)],0x4e20);this[_0x71d9b0(0x25a)]+=0x1,this[_0x71d9b0(0x2d9)]=setTimeout(()=>{const _0x310596=_0x71d9b0;this['_reconnectTimer']=void 0x0,this[_0x310596(0x24a)]??=this[_0x310596(0x2d5)](),this['_connectPromise']['catch'](()=>this[_0x310596(0x345)]())[_0x310596(0x20d)](()=>{this['_connectPromise']=void 0x0;});},_0x18ac2d);}[_0x1c125c(0x2bd)](){const _0x56242c=_0x1c125c;this[_0x56242c(0x267)](),this[_0x56242c(0x225)]=setInterval(()=>{const _0x158eeb=_0x56242c;this[_0x158eeb(0x2ca)]==='online'&&this[_0x158eeb(0x2e0)](_0x21f97d[_0x158eeb(0x33a)],'',{'cmd':_0x21f97d[_0x158eeb(0x33a)],'routeKey':''})['catch'](()=>this['_socket']?.[_0x158eeb(0x2fc)](0x3f3,_0x158eeb(0x251)));},0x7530);}['_stopHeartbeat'](){const _0x56e796=_0x1c125c;this[_0x56e796(0x225)]!==void 0x0&&clearInterval(this['_heartbeat']),this['_heartbeat']=void 0x0;}['_failCommandWaiters'](_0xfebe40){const _0x2c9f23=_0x1c125c;for(let _0x599935 of this[_0x2c9f23(0x2b2)][_0x2c9f23(0x31d)]())clearTimeout(_0x599935['timer']),_0x599935[_0x2c9f23(0x237)](_0xfebe40);this['_commandWaiters']['clear']();}};function Oe(_0x2b24ca){return new Promise((_0x354d32,_0xc8eab6)=>{const _0x503030=_0x205e;let _0x4f2ce6=()=>{const _0x3d5973=_0x205e;clearTimeout(_0x591018),_0x2b24ca[_0x3d5973(0x2b4)](_0x3d5973(0x2fc),_0x48aa56),_0x2b24ca[_0x3d5973(0x2b4)](_0x3d5973(0x236),_0x502cf8),_0x2b24ca['removeEventListener']('open',_0x30ccdd);},_0x27e0aa=_0x1c220d=>{_0x4f2ce6(),_0xc8eab6(new j('COLLABORATION_UNAVAILABLE',_0x1c220d,{'retryable':!0x0}));},_0x48aa56=()=>_0x27e0aa('Collaboration\x20WebSocket\x20closed\x20before\x20opening'),_0x502cf8=()=>_0x27e0aa(_0x503030(0x226)),_0x30ccdd=()=>{_0x4f2ce6(),_0x354d32();},_0x591018=setTimeout(()=>{const _0x153331=_0x503030;_0x27e0aa(_0x153331(0x32f)),_0x2b24ca[_0x153331(0x2fc)](0x3e8,'Connection\x20timed\x20out');},0x7530);_0x2b24ca[_0x503030(0x2aa)](_0x503030(0x2fc),_0x48aa56,{'once':!0x0}),_0x2b24ca[_0x503030(0x2aa)](_0x503030(0x236),_0x502cf8,{'once':!0x0}),_0x2b24ca[_0x503030(0x2aa)](_0x503030(0x238),_0x30ccdd,{'once':!0x0});});}function ke(_0x324ebd){const _0x5c68c8=_0x1c125c;if(!_0x324ebd||typeof _0x324ebd!=_0x5c68c8(0x2d4))return null;let _0x1e5266=_0x324ebd['cs'];return _0x1e5266&&typeof _0x1e5266==_0x5c68c8(0x2d4)?_0x1e5266:null;}function Q(_0x2bc875,_0x582b9b){return(_0x2bc875??'')+':'+(_0x582b9b??0x0);}var Ae=class{[_0x1c125c(0x28b)];['_connection'];constructor(_0x573e3f){const _0x20af1a=_0x1c125c;this[_0x20af1a(0x28b)]=je(_0x573e3f),this['_connection']=new De(this[_0x20af1a(0x28b)]);}async[_0x1c125c(0x238)](_0x592a21){const _0x49c4ce=_0x1c125c;let _0x5f1a52=await this['_connection'][_0x49c4ce(0x2d0)](_0x592a21);return new we(this[_0x49c4ce(0x28b)],_0x592a21,_0x5f1a52);}};function je(_0x540124){const _0xad6e2d=_0x1c125c;let _0xf7f56=$(_0x540124[_0xad6e2d(0x301)],'snapshotServerUrl',[_0xad6e2d(0x216),'https:']),_0x3f19d5=$(_0x540124[_0xad6e2d(0x28c)],'collabSubmitChangesetUrl',['http:','https:']),_0x1a1421=$(_0x540124[_0xad6e2d(0x255)],_0xad6e2d(0x255),['ws:','wss:',_0xad6e2d(0x216),_0xad6e2d(0x366)]);_0x1a1421[_0xad6e2d(0x2c6)]===_0xad6e2d(0x216)&&(_0x1a1421[_0xad6e2d(0x2c6)]=_0xad6e2d(0x353)),_0x1a1421[_0xad6e2d(0x2c6)]===_0xad6e2d(0x366)&&(_0x1a1421['protocol']=_0xad6e2d(0x31a));let _0x6140d7=$(_0x540124[_0xad6e2d(0x2a9)],'wsSessionTicketUrl',['http:',_0xad6e2d(0x366)]),_0x4759a0=_0x540124[_0xad6e2d(0x339)]??0x7530;if(!Number[_0xad6e2d(0x205)](_0x4759a0)||_0x4759a0<=0x0)throw new j(_0xad6e2d(0x2dd),_0xad6e2d(0x324));return{'collabSubmitChangesetUrl':_0x3f19d5,'collabWebSocketUrl':_0x1a1421,'commitTimeoutMs':_0x4759a0,'httpRequest':_0x540124[_0xad6e2d(0x282)]??globalThis[_0xad6e2d(0x26c)]['bind'](globalThis),'snapshotServerUrl':_0xf7f56,'wsSessionTicketUrl':_0x6140d7};}function $(_0x167278,_0x3876d9,_0xaac17){const _0x4d0545=_0x1c125c;let _0x38d7fd;try{_0x38d7fd=new URL(_0x167278);}catch{throw new j(_0x4d0545(0x2dd),_0x3876d9+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0xaac17['includes'](_0x38d7fd[_0x4d0545(0x2c6)]))throw new j(_0x4d0545(0x2dd),_0x3876d9+_0x4d0545(0x2c8));return _0x38d7fd;}function Me(_0x4205e7){return new Ae(_0x4205e7);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/univer-collaboration-runtime",
3
3
  "type": "module",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -19,16 +19,16 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@oxc-project/runtime": "0.142.0",
22
- "@univerjs-pro/bases": "1.0.2",
23
- "@univerjs-pro/boards": "1.0.2",
24
- "@univerjs-pro/collaboration": "1.0.2",
25
- "@univerjs-pro/engine-formula": "1.0.2",
26
- "@univerjs-pro/slides": "1.0.2",
27
- "@univerjs/core": "1.0.2",
28
- "@univerjs/docs": "1.0.2",
29
- "@univerjs/engine-formula": "1.0.2",
30
- "@univerjs/engine-render": "1.0.2",
31
- "@univerjs/protocol": "1.0.2",
32
- "@univerjs/sheets": "1.0.2"
22
+ "@univerjs-pro/bases": "1.0.3",
23
+ "@univerjs-pro/boards": "1.0.3",
24
+ "@univerjs-pro/collaboration": "1.0.3",
25
+ "@univerjs-pro/engine-formula": "1.0.3",
26
+ "@univerjs-pro/slides": "1.0.3",
27
+ "@univerjs/core": "1.0.3",
28
+ "@univerjs/docs": "1.0.3",
29
+ "@univerjs/engine-formula": "1.0.3",
30
+ "@univerjs/engine-render": "1.0.3",
31
+ "@univerjs/protocol": "1.0.3",
32
+ "@univerjs/sheets": "1.0.3"
33
33
  }
34
34
  }