úÎIŽDÚ8      !"#$%&'()*+,-./01234567 Safe-Inferred!"(=K 8       8 Safe-Inferred2468;Apply an operation to a document, producing a new document.Composes two operations a and b , producing c , such that c= has the same effect when applied to a document as applying a and b one after another.%Transforms two concurrent operations a and b , producing a' and b' such that b' " a == a' " b.9:;<=>?@ABCDEFG9:;<=>?@ABCDEFGNone+2346B BAn operation bundled with the cursor position after the operation.A cursor has a  and a M. Both are zero-based indexes into the document. When nothing is selected,  is equal to . When there is a selection, R is always the side of the selection that would move if you pressed an arrow key.çAn edit on plain text documents. An operation consists of multiple actions that change the document at the current cursor position or advance the cursor. After applying all actions, the cursor must be at the end of the document. JAn action changes the text at the current position or advances the cursor.!Delete the next n characters.".Insert the given text at the current position.#Skip the next n characters.HZMerges actions, removes empty ops and makes insert ops come before delete ops. Propertys: Idempotence: 0canonicalize op = canonicalize (canonicalize op)"Preserves the effect under apply: *apply op doc = apply (canonicalize op) doc$CComputes the inverse of an operation. Useful for implementing undo.%+Update cursor with respect to an operation." !"#IJKH$ An operation.*Document before the operation was applied.%LMNOPQRSTUVWXY !"#$% #"!$% #"!IJKH$%LMNOPQRSTUVWXY Safe-Inferred&(b " a)(d) = a(b(d)) where a and b% are two consecutive operations and d is the initial document.'b'(a(d)) = a'(b(d)) where a and b are random operations, d is the initial document and (a', b') = transform(a, b).(b' " a = a' " b where a and b are random operations and (a', b') = transform(a, b)–. Note that this is a stronger property than prop_transform_apply, because prop_transform_compose and prop_compose_apply imply prop_transform_apply.)l Transformation is compatible with composition on the left. That is, if we have two consecutive operations a and b and a concurrent operation c:, then it doesn't make a difference whether we transform c against a and then against b or transform c against the composition of a and b. In other terms,  c'_1 = c'_2 where (_, c'_1) = transform(b " a, c), (_, c') = transform(a, c) and (_, c'_2) = transform(b, c').*6 Transformation is compatible with composition on the right.Z[&'()*&'()*&'()*Z[&'()* Safe-Inferred+6At every moment, the client is in one of three states.,pThe client is waiting for an acknowledgement for a pending operation and the client is buffering local changes.-_The client has sent an operation to the server and it is still waiting for an acknowledgement..DAll of the client's operations have been acknowledged by the server./;The state a newly connected client starts in (synonym for .).0!Handle user-generated operations.1+Handle incoming operations from the server.2Handle acknowledgements.+,-./0;The operation the user has performed on the local document.TWhether to send the operation to the server and the new client state (or an error).1bThe transformed operation that must be applied to local document and the new state (or an error).2TAn optional operation that must be sent to the server if present and the new state.+,-./012+.-,/012+.-,/012 Safe-Inferred3yThe server keeps the current revision number and a list of previous operations to transform incoming operations against.7Handles incoming operations.34567]The latest operation that the client has received from the server when it sent the operation.'The operation received from the client.¸The operation to broadcast to all connected clients (except the client which has created the operation; that client must be sent an acknowledgement) and the new state (or an error).345675346734567\       !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ ot-0.1.2.2&Control.OperationalTransformation.List!Control.OperationalTransformation&Control.OperationalTransformation.Text,Control.OperationalTransformation.Properties(Control.OperationalTransformation.Client(Control.OperationalTransformation.ServerTransformedPairTP OperationDeleteOpInsertOpRetainOpEmptyOpVectorConsVEmptyVNSZapplycompose transformOTSystemOTComposableOperation OTOperationAugmentedTextOperationaugmentedCursoraugmentedOperationCursorcursorPositioncursorSelectionEnd TextOperationActionDeleteInsertRetaininvertOperation updateCursorprop_compose_applyprop_transform_applyprop_transform_composeprop_transform_compose_compat_lprop_transform_compose_compat_r ClientStateClientWaitingWithBuffer ClientWaitingClientSynchronizedinitialClientState applyClient applyServer serverAck ServerStateRevisioninitialServerStateapplyOperation addDeleteOp$fOTSystem(,,,,)(,,,,)$fOTComposableOperation(,,,,)$fOTOperation(,,,,)$fOTSystem(,,,)(,,,)$fOTComposableOperation(,,,)$fOTOperation(,,,)$fOTSystem(,,)(,,)$fOTComposableOperation(,,)$fOTOperation(,,)$fOTSystem(,)(,)$fOTComposableOperation(,)$fOTOperation(,)$fOTSystemdoc[]$fOTComposableOperation[]$fOTOperation[] canonicalize addRetain addInsert addDelete#$fOTSystemdocAugmentedTextOperation-$fOTComposableOperationAugmentedTextOperation#$fOTOperationAugmentedTextOperation $fFromJSONAugmentedTextOperation$fToJSONAugmentedTextOperation$fFromJSONCursor$fToJSONCursor$fOTSystemTextTextOperation$$fOTComposableOperationTextOperation$fOTOperationTextOperation$fEqTextOperation$fFromJSONAction$fToJSONAction$fBinaryAction==?eitherProperty