anchor.diff:  'use strict';
   $(() => {
   
  -  // Do repl-state change the same way as the traffic-light
  -  // click review-state change. Viz, a page-flip.
  -
     const kataPage = $('#kata-page');
     const replPage = $('#repl-page');
     const resumeButton = $('.resume-button', replPage);
  +  const kataId = "<%= @kata.id %>";
  +  const replUrl = () => `${location.hostname}/repler/${kataId}-${sessionId}`;
  +  const httpUrl = () => `http://${replUrl()}`;
  +  const socketUrl = () => `ws://${replUrl()}`;
     let sessionId = null;
   
     cd.openReplPage = () => {
  -    // If the repl docker container's id was based *only* on the kata-id,
  -    // then creating a new repl could  fail if there was a very recent
  -    // [resume], which caused a repl DELETE request, but the docker daemon
  -    // had not yet actually deleted the repl container.
  -    // So the repl and socket Urls for a repl session have a random suffix.
  -    sessionId = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0,6);
       kataPage.fadeOut('slow', () => {
         replPage.fadeIn('slow', () => {
           replInit();
  
positive.code:     terminal.winptyCompatInit();
      terminal.fit();
      terminal.focus();
      return terminal;
    };
  
    //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    const kataId = "<%= @kata.id %>";
    const replUrl = () => `${location.hostname}/repler/${kataId}-${sessionId}`;
    const httpUrl = () => `http://${replUrl()}`;
    const socketUrl = () => `ws://${replUrl()}`;
  
    const inGreen = (s) => {
      const greenCode = '\u001b[32m';
      const resetCode = '\u001b[0m';
      return `${greenCode}${s}${resetCode}`;
    };
  
    const createRepl = (terminal) => {
      // Request that a REPL be created.
      // Returns the promise for the POST request.
      terminal.writeln(inGreen('Connecting to REPL'));
      console.log('creating repl');
      cd.saveCodeFromSyntaxHighlightEditors();
      const requestParams = {
        method: 'POST',
  
negative.code:     return fetch(httpUrl(), requestParams);
    };
  
    const deleteRepl = (terminal) => {
      // Request that the REPL be terminated.
      // Returns the promise for the DELETE request.
      terminal.greenWriteln('Deleting the REPL');
      return fetch(httpUrl(), { method: 'DELETE' });
    };
  
  