text: /* global __PARCEL_HMR_HOST, __PARCEL_HMR_PORT, __PARCEL_BUNDLE_ID, __PARCEL_HMR_ENV_HASH */
  
  var OVERLAY_ID = '__parcel__error__overlay__';
  
  var OldModule = module.bundle.Module;
  
  function Module(moduleName) {
    OldModule.call(this, moduleName);
    this.hot = {
      data: module.bundle.hotData,
      _acceptCallbacks: [],
      _disposeCallbacks: [],
      accept: function(fn) {
        this._acceptCallbacks.push(fn || function() {});
      },
      dispose: function(fn) {
        this._disposeCallbacks.push(fn);
      },
    };
  
    module.bundle.hotData = null;
  }
  
  module.bundle.Module = Module;
  var checkedAssets, assetsToAccept, acceptedAssets;
  
  // eslint-disable-next-line no-redeclare
  var parent = module.bundle.parent;
  if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
    var hostname = __PARCEL_HMR_HOST || location.hostname;
    var port = __PARCEL_HMR_PORT || location.port;
    var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
    var ws = new WebSocket(
      protocol + '://' + hostname + (port ? ':' + port : '') + '/',
    );
    ws.onmessage = function(event) {
      checkedAssets = {};
      assetsToAccept = [];
      acceptedAssets = {};
  
      var data = JSON.parse(event.data);
  
      if (data.type === 'update') {
        // Remove error overlay if there is one
        removeErrorOverlay();
  
        let assets = data.assets.filter(
          asset => asset.envHash === __PARCEL_HMR_ENV_HASH,
        );
  
        // Handle HMR Update
        var handled = false;
        assets.forEach(asset => {
          var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
          if (didAccept) {
            handled = true;
          }
        });
  
        if (handled) {
          console.clear();
  
          assets.forEach(function(asset) {
            hmrApply(global.parcelRequire, asset);
          });
  
          for (var i = 0; i < assetsToAccept.length; i++) {
            var id = assetsToAccept[i][1];
            if (!acceptedAssets[id]) {
              hmrAcceptRun(assetsToAccept[i][0], id);
            }
          }
        } else {
          window.location.reload();
        }
      }
  
      if (data.type === 'error') {
        // Log parcel errors to console
        for (let ansiDiagnostic of data.diagnostics.ansi) {
          let stack = ansiDiagnostic.codeframe
            ? ansiDiagnostic.codeframe
            : ansiDiagnostic.stack;
  
          console.error(
            '🚨 [parcel]: ' +
              ansiDiagnostic.message +
              '\n' +
              stack +
              '\n\n' +
              ansiDiagnostic.hints.join('\n'),
          );
        }
  
        // Render the fancy html overlay
        removeErrorOverlay();
        var overlay = createErrorOverlay(data.diagnostics.html);
        document.body.appendChild(overlay);
      }
    };
    ws.onerror = function(e) {
      console.error(e.message);
    };
    ws.onclose = function(e) {
      console.warn('[parcel] 🚨 Connection to the HMR server was lost');
    };
  }
  
  function removeErrorOverlay() {
    var overlay = document.getElementById(OVERLAY_ID);
    if (overlay) {
      overlay.remove();
      console.log('[parcel] ✨ Error resolved');
    }
  }
  
  function createErrorOverlay(diagnostics) {
    var overlay = document.createElement('div');
    overlay.id = OVERLAY_ID;
  
    let errorHTML =
      '<div style="background: black; opacity: 0.85; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; font-family: Menlo, Consolas, monospace; z-index: 9999;">';
  
    for (let diagnostic of diagnostics) {
      let stack = diagnostic.codeframe ? diagnostic.codeframe : diagnostic.stack;
  
      errorHTML += `
        <div>
          <div style="font-size: 18px; font-weight: bold; margin-top: 20px;">
            🚨 ${diagnostic.message}
          </div>
          <pre>
            ${stack}
          </pre>
          <div>
            ${diagnostic.hints.map(hint => '<div>' + hint + '</div>').join('')}
          </div>
        </div>
      `;
    }
  
    errorHTML += '</div>';
  
    overlay.innerHTML = errorHTML;
  
    return overlay;
  }
  
  function getParents(bundle, id) {
    var modules = bundle.modules;
    if (!modules) {
      return [];
    }
  
    var parents = [];
    var k, d, dep;
  
    for (k in modules) {
      for (d in modules[k][1]) {
        dep = modules[k][1][d];
  
        if (dep === id || (Array.isArray(dep) && dep[dep.length - 1] === id)) {
          parents.push([bundle, k]);
        }
      }
    }
  
    if (bundle.parent) {
      parents = parents.concat(getParents(bundle.parent, id));
    }
  
    return parents;
  }
  
  function hmrApply(bundle, asset) {
    var modules = bundle.modules;
    if (!modules) {
      return;
    }
  
    if (modules[asset.id] || !bundle.parent) {
      var fn = new Function('require', 'module', 'exports', asset.output);
      modules[asset.id] = [fn, asset.depsByBundle[__PARCEL_BUNDLE_ID]];
    } else if (bundle.parent) {
      hmrApply(bundle.parent, asset);
    }
  }
  
  function hmrAcceptCheck(bundle, id) {
    var modules = bundle.modules;
  
    if (!modules) {
      return;
    }
  
    if (!modules[id] && bundle.parent) {
      return hmrAcceptCheck(bundle.parent, id);
    }
  
    if (checkedAssets[id]) {
      return;
    }
  
    checkedAssets[id] = true;
  
    var cached = bundle.cache[id];
  
    assetsToAccept.push([bundle, id]);
  
    if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
      return true;
    }
  
    return getParents(global.parcelRequire, id).some(function(v) {
      return hmrAcceptCheck(v[0], v[1]);
    });
  }
  
  function hmrAcceptRun(bundle, id) {
    var cached = bundle.cache[id];
    bundle.hotData = {};
    if (cached && cached.hot) {
      cached.hot.data = bundle.hotData;
    }
  
    if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
      cached.hot._disposeCallbacks.forEach(function(cb) {
        cb(bundle.hotData);
      });
    }
  
    delete bundle.cache[id];
    bundle(id);
  
    cached = bundle.cache[id];
    if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
      cached.hot._acceptCallbacks.forEach(function(cb) {
        var assetsToAlsoAccept = cb(function() {
          return getParents(global.parcelRequire, id);
        });
        if (assetsToAlsoAccept && assetsToAccept.length) {
          assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);
        }
      });
    }
    acceptedAssets[id] = true;
  }
  