(function() {
  (function($) {
    return $(function() {
      return $('[data-toggle="tooltip"]').tooltip();
    });
  })($);

}).call(this);
; 
(function() {
  (function($, _) {
    return $.fn.toggleWrapper = function(obj, cid, init) {
      var dimensions, methods;
      if (obj == null) {
        obj = {};
      }
      methods = {
        getWrapperByCid: function(cid) {
          return $("[data-wrapper='" + cid + "']");
        },
        isTransparent: function(bg) {
          return /transparent|rgba/.test(bg);
        },
        setBackgroundColor: function(bg) {
          if (this.isTransparent(bg)) {
            return "white";
          } else {
            return bg;
          }
        },
        walkDownToChild: function(el) {
          return this.getDimensions(el.children());
        },
        hasDimensions: function(vals) {
          return vals.width > 0 && vals.height > 0;
        },
        getDimensions: function(el) {
          var vals;
          vals = {
            offset: el.offset(),
            width: el.outerWidth(false),
            height: el.outerHeight(false)
          };
          if (this.hasDimensions(vals) || el.children().length === 0) {
            return vals;
          }
          return this.walkDownToChild(el);
        }
      };
      _.defaults(obj, {
        className: "",
        backgroundColor: methods.setBackgroundColor(this.css("backgroundColor")),
        zIndex: this.css("zIndex") === "auto" || 0 ? 1000 : Number(this.css("zIndex"))
      });
      dimensions = methods.getDimensions(this);
      if (init) {
        if (methods.getWrapperByCid(cid).length) {
          return;
        }
        return $("<div>").appendTo("body").addClass(obj.className).attr("data-wrapper", cid).css({
          width: dimensions.width,
          height: dimensions.height,
          top: dimensions.offset.top,
          left: dimensions.offset.left,
          position: "absolute",
          zIndex: obj.zIndex + 1,
          backgroundColor: obj.backgroundColor
        });
      } else {
        return methods.getWrapperByCid(cid).remove();
      }
    };
  })($, _);

}).call(this);
; 
(function() {
  this.App = (function(Backbone, Marionette) {
    var App, about, debug, projects, updates, updating;
    about = function() {
      return App.vent.trigger("start:about:app", App.aboutRegion);
    };
    debug = function() {
      return App.vent.trigger("start:debug:app", App.debugRegion);
    };
    updates = function() {
      return App.vent.trigger("start:updates:app", App.updatesRegion);
    };
    updating = function(options) {
      return App.execute("start:updates:applied:app");
    };
    projects = function() {
      return App.ipc("get:current:user").then(function(user) {
        App.execute("set:current:user", user);
        if (user && (user.session_token != null)) {
          App.vent.trigger("start:projects:app");
        } else {
          App.vent.trigger("start:login:app");
        }
        return App.vent.trigger("start:footer:app");
      });
    };
    App = new Marionette.Application;
    App.addRegions({
      updatesRegion: "#updates-region",
      aboutRegion: "#about-region",
      debugRegion: "#debug-region",
      mainRegion: "#main-region",
      footerRegion: "#footer-region"
    });
    App.reqres.setHandler("default:region", function() {
      return App.mainRegion;
    });
    App.on("start", function(mode) {
      return App.ipc("get:options").then(function(options) {
        var sendErr;
        if (options == null) {
          options = {};
        }
        App.config = App.request("config:entity", options);
        App.updater = App.request("new:updater:entity", options.version);
        sendErr = function(err) {
          return App.ipc("gui:error", _.pick(err, "name", "message", "stack"));
        };
        window.onerror = function(message, source, lineno, colno, err) {
          return sendErr(err);
        };
        window.onunhandledrejection = sendErr;
        if (options.updating) {
          return updating(options);
        }
        switch (mode) {
          case "about":
            return about();
          case "debug":
            return debug();
          case "updates":
            return updates();
          default:
            return projects();
        }
      });
    });
    return App;
  })(Backbone, Marionette);

}).call(this);
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/lib/templates/_empty"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push("<" + this.containerTag + ">");
    
      __out.push('\n  <span>\n    ');
    
      __out.push(__sanitize(this.content));
    
      __out.push('\n  </span>\n');
    
      __out.push("</" + this.containerTag + ">");
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    return Entities.Collection = (function(superClass) {
      extend(Collection, superClass);

      function Collection() {
        return Collection.__super__.constructor.apply(this, arguments);
      }

      return Collection;

    })(Backbone.Collection);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    Entities.Model = (function(superClass) {
      extend(Model, superClass);

      function Model() {
        return Model.__super__.constructor.apply(this, arguments);
      }

      return Model;

    })(Backbone.Model);
    return App.reqres.setHandler("new:entity", function(attrs) {
      if (attrs == null) {
        attrs = {};
      }
      return new Entities.Model(attrs);
    });
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var API, alreadyOpen;
    alreadyOpen = function(err) {
      return err && err.alreadyOpen;
    };
    API = {
      loginRequest: function() {
        return App.ipc("window:open", {
          position: "center",
          focus: true,
          width: 1000,
          height: 635,
          preload: false,
          title: "Login",
          type: "GITHUB_LOGIN"
        }).then(function(code) {
          App.currentUser.loggingIn();
          return App.ipc("log:in", code);
        }).then(function(user) {
          App.currentUser.loggedIn(user);
          return App.vent.trigger("start:projects:app");
        })["catch"](alreadyOpen, function(err) {})["catch"](function(err) {
          return App.currentUser.setLoginError(err);
        });
      },
      logOut: function(user) {
        App.vent.trigger("start:login:app");
        return App.ipc("log:out").then(function() {
          return App.ipc("clear:github:cookies");
        });
      }
    };
    App.commands.setHandler("login:request", function() {
      return API.loginRequest();
    });
    App.reqres.setHandler("current:user", function() {
      return App.currentUser || (function() {
        throw new Error("No current user set on App!");
      })();
    });
    App.commands.setHandler("set:current:user", function(attrs) {
      if (attrs == null) {
        attrs = {};
      }
      return App.currentUser = App.request("new:user:entity", attrs);
    });
    return App.vent.on("log:out", function(user) {
      return API.logOut(user);
    });
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var API, windows;
    windows = {};
    API = {
      startChromium: function(src, options) {
        var chromium, win;
        if (options == null) {
          options = {};
        }
        if (win = windows.chromium) {
          win.close(true);
        }
        if (!src) {
          throw new Error("Missing src for tests to run. Cannot start Chromium.");
        }
        _.defaults(options, {
          headless: false,
          onReady: function() {}
        });
        chromium = App.request("gui:open", src, {
          show: !options.headless,
          frame: !options.headless,
          position: "center",
          width: 1280,
          height: 720,
          title: "Running Tests"
        });
        chromium.once("document-end", function() {
          return options.onReady(chromium);
        });
        return windows.chromium = chromium;
      }
    };
    return App.commands.setHandler("start:chromium:run", function(src, options) {
      return API.startChromium(src, options);
    });
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    return App.silenceConsole = function() {
      var c;
      c = console;
      return _.each(["log", "warn", "info", "error"], function(fn) {
        return c[fn] = function() {};
      });
    };
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var flattenedFetches;
    flattenedFetches = function(entities) {
      return _.chain([entities]).flatten().compact().pluck("_fetch").value();
    };
    App.commands.setHandler("when:fetched", function(entities, callback) {
      var xhrs;
      xhrs = flattenedFetches(entities);
      return $.when.apply($, xhrs).done(function() {
        return callback();
      });
    });
    return App.reqres.setHandler("fetched:entities", function(entities) {
      return flattenedFetches(entities);
    });
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var API, windows;
    windows = {};
    API = {
      about: function() {
        return App.ipc("window:open", {
          position: "center",
          width: 300,
          height: 230,
          toolbar: false,
          title: "About",
          type: "ABOUT"
        });
      },
      updates: function() {
        return App.ipc("window:open", {
          position: "center",
          width: 300,
          height: 210,
          toolbar: false,
          title: "Updates",
          type: "UPDATES"
        });
      },
      debug: function() {
        return App.ipc("window:open", {
          position: "center",
          width: 800,
          height: 400,
          toolbar: false,
          title: "Debug Console",
          type: "DEBUG"
        });
      },
      preferences: function() {
        return App.ipc("window:open", {
          position: "center",
          width: 520,
          height: 270,
          toolbar: false,
          title: "Preferences",
          type: "PREFERENCES"
        });
      },
      tests: function() {
        var tests;
        if (!App.config.get("debug")) {
          return;
        }
        tests = App.request("gui:open", "http://localhost:3500", {
          position: "center",
          height: 1024,
          width: 768,
          title: "Cypress Tests"
        });
        return tests.once("loaded", function() {
          return tests.showDevTools();
        });
      }
    };
    App.reqres.setHandler("gui:open", function(url, options) {
      if (options == null) {
        options = {};
      }
      return API.open(url, options);
    });
    App.commands.setHandler("gui:check:for:updates", function() {
      return API.updates();
    });
    App.commands.setHandler("gui:debug", function() {
      return API.debug();
    });
    App.commands.setHandler("gui:tests", function() {
      return API.tests();
    });
    App.commands.setHandler("gui:about", function() {
      return API.about();
    });
    return App.commands.setHandler("gui:preferences", function() {
      return API.preferences();
    });
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var API;
    API = {
      startIdGenerator: function(path) {
        var ref;
        if (!path) {
          throw new Error("Missing http path to ID Generator.  Cannot start ID Generator.");
        }
        if ((ref = this.idGenerator) != null) {
          ref.close();
        }
        return this.idGenerator = App.request("gui:open", path, {
          show: false
        });
      }
    };
    return App.commands.setHandler("start:id:generator", function(path) {
      return API.startIdGenerator(path);
    });
  });

}).call(this);
; 
(function() {
  var slice = [].slice;

  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var addMsg, createIpc, ipc, msgs, removeMsgById, removeMsgsByEvent;
    msgs = {};
    addMsg = function(id, event, fn) {
      return msgs[id] = {
        event: event,
        fn: fn
      };
    };
    removeMsgsByEvent = function(event) {
      return msgs = _(msgs).omit(function(msg) {
        return msg.event === event;
      });
    };
    removeMsgById = function(id) {
      return msgs = _(msgs).omit("" + id);
    };
    createIpc = function() {
      var responses;
      console.warn("Missing 'ipc'. Polyfilling in development mode.");
      responses = [];
      return {
        on: function() {},
        off: function() {},
        send: function(resp, id, event) {
          var response;
          if (response = _.find(responses, {
            event: event
          })) {
            responses = _.without(responses, response);
            return Promise.delay(1).then((function(_this) {
              return function() {
                _this.handle(event, response.err, response.data);
                return response.resolve();
              };
            })(this));
          }
        },
        handle: function(event, err, data) {
          return new Promise(function(resolve, reject) {
            var msg;
            msg = _.chain(msgs).where({
              event: event
            }).first().value();
            if (msg) {
              msg.fn(err, data);
              return resolve();
            } else {
              return responses.push({
                event: event,
                err: err,
                data: data,
                resolve: resolve
              });
            }
          });
        }
      };
    };
    ipc = window.ipc != null ? window.ipc : window.ipc = createIpc();
    ipc.on("response", function(event, obj) {
      var __error, data, id, msg;
      if (obj == null) {
        obj = {};
      }
      id = obj.id, __error = obj.__error, data = obj.data;
      if (msg = msgs[id]) {
        return msg.fn(__error, data);
      }
    });
    App.ipc = function() {
      var args, event, fn, id, lastArg;
      args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
      if (args.length === 0) {
        return msgs;
      }
      id = Math.random();
      event = args[0];
      lastArg = args.pop();
      if (lastArg && _.isFunction(lastArg)) {
        fn = function() {
          return addMsg(id, event, lastArg);
        };
      } else {
        args.push(lastArg);
        fn = function() {
          return new Promise(function(resolve, reject) {
            return addMsg(id, event, function(err, data) {
              removeMsgById(id);
              if (err) {
                return reject(err);
              } else {
                return resolve(data);
              }
            });
          });
        };
      }
      ipc.send.apply(ipc, ["request", id].concat(args));
      return fn();
    };
    return App.ipc.off = function(event) {
      return removeMsgsByEvent(event);
    };
  });

}).call(this);
; 
(function() {
  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    var methods;
    methods = {
      lookups: ["backbone/apps/", "backbone/lib/components/", "backbone/lib/templates/", "support/"],
      withTemplate: function(string) {
        var array;
        array = string.split("/");
        array.splice(-1, 0, "templates");
        return array.join("/");
      }
    };
    return _.extend(Marionette.Renderer, {
      render: function(template, data) {
        var path;
        if (data == null) {
          data = {};
        }
        if (template === false) {
          return;
        }
        path = this.getTemplate(template);
        if (!path) {
          throw new Error("Template " + template + " not found!");
        }
        return path(data);
      },
      getTemplate: function(template) {
        var i, j, len, len1, lookup, path, ref, ref1;
        ref = methods.lookups;
        for (i = 0, len = ref.length; i < len; i++) {
          lookup = ref[i];
          ref1 = [template, methods.withTemplate(template)];
          for (j = 0, len1 = ref1.length; j < len1; j++) {
            path = ref1[j];
            if (JST[lookup + path]) {
              return JST[lookup + path];
            }
          }
        }
      },
      templateExists: function(path) {
        return !!this.getTemplate(path);
      }
    });
  });

}).call(this);
; 
(function() {
  var slice = [].slice;

  this.App.module("Utilities", function(Utilities, App, Backbone, Marionette, $, _) {
    return window.Routes = (function(_, Backbone) {
      var Routes, addRoutes, createPathFn, extractObjectParams, extractParams, getParams, getQueryParams, parseArray, parseObject, r, replacePath;
      getParams = /(:([\w\d]+)|\*([\w\d]+))/g;
      replacePath = function(path, part, replacement) {
        if (replacement != null) {
          return path.replace(part, replacement);
        } else {
          return path;
        }
      };
      parseObject = function(parts, path, obj) {
        return _.reduce(parts, function(memo, part, index) {
          var sliced;
          sliced = part.slice(1);
          return memo = replacePath(memo, part, obj[sliced]);
        }, path);
      };
      parseArray = function(parts, path, args) {
        return _.reduce(parts, function(memo, part, index) {
          return memo = replacePath(memo, part, args[index]);
        }, path);
      };
      extractParams = function(args, parts) {
        var count;
        if (parts == null) {
          parts = [];
        }
        count = _.isObject(args[0]) ? _.keys(args[0]).length : args.length;
        if (count <= parts.length) {
          return;
        }
        if (_.isObject(args[0])) {
          return extractObjectParams(args[0], parts);
        } else {
          return args.pop();
        }
      };
      extractObjectParams = function(obj, parts) {
        var partsOfRoute, ref;
        partsOfRoute = _.map(parts, function(part) {
          return part.replace(/(:|\*)/, "");
        });
        return (ref = _(obj)).omit.apply(ref, partsOfRoute);
      };
      getQueryParams = function(path, args, parts) {
        var params;
        params = extractParams(args, parts);
        if (!params) {
          return path;
        }
        return Backbone.Router.prototype.toFragment(path, params);
      };
      createPathFn = function(pathString) {
        var parts;
        parts = pathString.match(getParams);
        return function() {
          var args, path;
          args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
          path = pathString.toString();
          if (args.length) {
            path = (function() {
              switch (false) {
                case !_.isObject(args[0]):
                  return parseObject(parts, path, args[0]);
                default:
                  return parseArray(parts, path, args);
              }
            })();
          }
          if (!/^(http|\/\/)/.test(path)) {
            path = "/" + path;
          }
          path = getQueryParams(path, args, parts);
          return path;
        };
      };
      addRoutes = function(obj, routes) {
        var name, path, results;
        results = [];
        for (name in routes) {
          path = routes[name];
          obj.routes[name] = path;
          results.push(obj[name + "_path"] = createPathFn(path));
        }
        return results;
      };
      Routes = (function() {
        function Routes(routes1) {
          this.routes = routes1 != null ? routes1 : {};
        }

        return Routes;

      })();
      r = new Routes;
      r.url_for = function(name) {
        return this.routes[name];
      };
      r.create = function() {
        var args, path;
        path = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
        return createPathFn(path).apply(this, args);
      };
      return r;
    })(_, Backbone);
  });

}).call(this);
; 
(function() {
  this.App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
    var _mixinTemplateHelpers;
    _mixinTemplateHelpers = Marionette.View.prototype.mixinTemplateHelpers;
    return _.extend(Marionette.View.prototype, {
      addOpacityWrapper: function(init, options) {
        if (init == null) {
          init = true;
        }
        if (options == null) {
          options = {};
        }
        _.defaults(options, {
          className: "opacity"
        });
        return this.$el.toggleWrapper(options, this.cid, init);
      },
      mixinTemplateHelpers: function(target) {
        target.env = App.config.env();
        target.debug = App.config.get("debug");
        return _mixinTemplateHelpers.call(this, target);
      },
      stopProp: function(e) {
        return e.stopPropagation();
      }
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
    return Views.CollectionView = (function(superClass) {
      extend(CollectionView, superClass);

      function CollectionView() {
        return CollectionView.__super__.constructor.apply(this, arguments);
      }

      CollectionView.prototype.childViewOptions = function(model, index) {
        var options;
        options = {};
        if (this.tagName === "ul") {
          options.tagName = "li";
        }
        return options;
      };

      return CollectionView;

    })(Marionette.CollectionView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
    return Views.CompositeView = (function(superClass) {
      extend(CompositeView, superClass);

      function CompositeView() {
        var options;
        CompositeView.__super__.constructor.apply(this, arguments);
        options = {};
        if (this.isTbody()) {
          options.tagName = "tr";
        }
        if (this.isUl()) {
          options.tagName = "li";
        }
        this.childViewOptions = _.extend({}, _.result(this, "childViewOptions"), options);
      }

      CompositeView.prototype.buildChildView = function(item, childViewType, childViewOptions) {
        if (this.isTbody()) {
          childViewOptions.tableColumns = this.$el.find("th").length;
        }
        return CompositeView.__super__.buildChildView.apply(this, arguments);
      };

      CompositeView.prototype.isTbody = function() {
        return this.childViewContainer === "tbody";
      };

      CompositeView.prototype.isUl = function() {
        return this.childViewContainer === "ul";
      };

      return CompositeView;

    })(Marionette.CompositeView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
    return Views.EmptyView = (function(superClass) {
      extend(EmptyView, superClass);

      EmptyView.prototype.template = "_empty";

      EmptyView.prototype.ui = {
        container: ":first"
      };

      function EmptyView() {
        EmptyView.__super__.constructor.apply(this, arguments);
        this.$el.addClass("empty");
      }

      EmptyView.prototype.serializeData = function() {
        var ref;
        return {
          containerTag: this.getContainerTag(),
          content: (ref = _.result(this, "content")) != null ? ref : "No items found."
        };
      };

      EmptyView.prototype.onShow = function() {
        if (this.isRow()) {
          return this.ui.container.prop("colspan", this.options.tableColumns);
        }
      };

      EmptyView.prototype.isRow = function() {
        return this.tagName === "tr";
      };

      EmptyView.prototype.getContainerTag = function() {
        if (this.isRow()) {
          return "td";
        }
        return "div";
      };

      return EmptyView;

    })(Marionette.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
    return Views.ItemView = (function(superClass) {
      extend(ItemView, superClass);

      function ItemView() {
        return ItemView.__super__.constructor.apply(this, arguments);
      }

      return ItemView;

    })(Marionette.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
    return Views.LayoutView = (function(superClass) {
      var regionRegex;

      extend(LayoutView, superClass);

      function LayoutView() {
        return LayoutView.__super__.constructor.apply(this, arguments);
      }

      regionRegex = /(.+)-region/;

      LayoutView.prototype.getRegionsByEl = true;

      LayoutView.prototype.render = function() {
        LayoutView.__super__.render.apply(this, arguments);
        return this._getRegionsByEl();
      };

      LayoutView.prototype._childNodes = function() {
        return this.$el.find("*");
      };

      LayoutView.prototype._getRegionsByEl = function() {
        var regions, selectors;
        if (!this.getRegionsByEl || !this.$el) {
          return;
        }
        selectors = _.reduce(this._childNodes(), function(memo, e) {
          var match;
          match = regionRegex.exec($(e).prop("id"));
          if (match) {
            memo.push(match[0]);
          }
          return memo;
        }, []);
        regions = _.reduce(selectors, function(memo, region) {
          memo[_.str.camelize(region)] = "#" + region;
          return memo;
        }, {});
        return this.addRegions(regions);
      };

      return LayoutView;

    })(Marionette.LayoutView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Controllers", function(Controllers, App, Backbone, Marionette, $, _) {
    return Controllers.Application = (function(superClass) {
      extend(Application, superClass);

      function Application(options) {
        var ref;
        if (options == null) {
          options = {};
        }
        this.region = (ref = options.region) != null ? ref : App.request("default:region");
        Application.__super__.constructor.apply(this, arguments);
      }

      Application.prototype.show = function(view, options) {
        var ref;
        if (options == null) {
          options = {};
        }
        view = view instanceof Controllers.Application ? view.getMainView() : view;
        if (!view) {
          throw new Error("getMainView() did not return a view instance or " + (view != null ? (ref = view.constructor) != null ? ref.name : void 0 : void 0) + " is not a view instance");
        }
        _.defaults(options, {
          loading: false,
          region: this.region
        });
        this.setMainView(view);
        return this._manageView(view, options);
      };

      Application.prototype.getMainView = function() {
        return this._mainView;
      };

      Application.prototype.setMainView = function(view) {
        if (this._mainView) {
          return;
        }
        this._mainView = view;
        return this.listenTo(view, "destroy", this.destroy);
      };

      Application.prototype.onMainShow = function() {};

      Application.prototype._manageView = function(view, options) {
        if (options.loading) {
          return App.execute("show:loading", view, options);
        } else {
          if (options.region) {
            return options.region.show(view);
          }
        }
      };

      return Application;

    })(Marionette.Controller);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Components.Loading", function(Loading, App, Backbone, Marionette, $, _) {
    Loading.LoadingController = (function(superClass) {
      extend(LoadingController, superClass);

      function LoadingController() {
        return LoadingController.__super__.constructor.apply(this, arguments);
      }

      LoadingController.prototype.initialize = function(options) {
        var config, loadingView, view;
        view = options.view, config = options.config;
        config = _.isBoolean(config) ? {} : config;
        _.defaults(config, {
          loadingType: "spinner",
          entities: this.getEntities(view),
          debug: false,
          done: function() {}
        });
        switch (config.loadingType) {
          case "opacity":
            if (this.region.currentView) {
              this.region.currentView.addOpacityWrapper();
            }
            break;
          case "spinner":
            loadingView = this.getLoadingView();
            this.show(loadingView);
            break;
          default:
            throw new Error("Invalid loadingType");
        }
        return this.showRealView(view, loadingView, config);
      };

      LoadingController.prototype.showRealView = function(realView, loadingView, config) {
        var oldView, xhrs;
        xhrs = App.request("fetched:entities", config.entities);
        oldView = this.region.currentView;
        if (config.loadingType === "opacity" && oldView) {
          this.listenTo(oldView, "destroy", (function(_this) {
            return function() {
              return _this.removeOpacity(oldView);
            };
          })(this));
        }
        $.when.apply($, xhrs).done((function(_this) {
          return function() {
            if (loadingView && (_this.region.currentView !== loadingView)) {
              return realView.destroy();
            }
            if (!config.debug) {
              _this.show(realView);
            }
            return config.done(realView);
          };
        })(this));
        $.when.apply($, xhrs).fail((function(_this) {
          return function() {
            if (_this.region.currentView !== realView) {
              return realView.destroy();
            }
          };
        })(this));
        return $.when.apply($, xhrs).always((function(_this) {
          return function() {
            if (config.debug) {
              return;
            }
            if (config.loadingType === "opacity") {
              _this.removeOpacity(oldView);
            }
            if (loadingView != null) {
              loadingView.destroy();
            }
            _this.destroy();
            return _this.clearFetches(config.entities);
          };
        })(this));
      };

      LoadingController.prototype.getEntities = function(view) {
        return _.chain(view).pick("model", "collection").toArray().compact().value();
      };

      LoadingController.prototype.getLoadingView = function() {
        return new Loading.LoadingView;
      };

      LoadingController.prototype.removeOpacity = function(oldView) {
        if (!oldView) {
          return;
        }
        return oldView.addOpacityWrapper(false);
      };

      LoadingController.prototype.clearFetches = function(entities) {
        var entity, i, len, ref, results;
        ref = _(entities).compact();
        results = [];
        for (i = 0, len = ref.length; i < len; i++) {
          entity = ref[i];
          results.push(delete entity._fetch);
        }
        return results;
      };

      return LoadingController;

    })(App.Controllers.Application);
    return App.commands.setHandler("show:loading", function(view, options) {
      return new Loading.LoadingController({
        view: view,
        region: options.region,
        config: options.loading
      });
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Components.Loading", function(Loading, App, Backbone, Marionette, $, _) {
    return Loading.LoadingView = (function(superClass) {
      extend(LoadingView, superClass);

      function LoadingView() {
        return LoadingView.__super__.constructor.apply(this, arguments);
      }

      LoadingView.prototype.template = false;

      LoadingView.prototype.className = "loading-container";

      LoadingView.prototype.dialog = {
        title: "Loading...",
        size: "small"
      };

      LoadingView.prototype.onShow = function() {
        var opts;
        opts = this._getOptions();
        return this.$el.spin(opts);
      };

      LoadingView.prototype.onDestroy = function() {
        return this.$el.spin(false);
      };

      LoadingView.prototype._getOptions = function() {
        return {
          lines: 10,
          length: 5,
          width: 2.0,
          radius: 6,
          corners: 1,
          rotate: 9,
          direction: 1,
          color: '#000',
          speed: 1,
          trail: 60,
          shadow: false,
          hwaccel: true,
          className: 'spinner',
          zIndex: 2e9,
          top: 'auto',
          left: 'auto'
        };
      };

      return LoadingView;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var slice = [].slice;

  this.App.module("Routers", function(Routers, App, Backbone, Marionette, $, _) {
    var routeParams;
    routeParams = /(:([\w\d]+)|\*([\w\d]+))/g;
    Routers.Application = (function() {
      Application.prototype.initialize = true;

      Application.prototype.module = void 0;

      Application.prototype.updateUrl = true;

      Application.prototype.before = function() {};

      Application.prototype.after = function() {};

      Application.prototype.controllerMap = {
        "list": "List",
        "show": "Show",
        "edit": "Edit",
        "new": "New",
        "destroy": "Destroy"
      };

      function Application() {
        this.routes = this._createRoutes();
        this.handlers = this._createHandlers();
        if (this.initialize && this.hasRoutes()) {
          App.addRouter(this);
        }
      }

      Application.prototype.to = function(action, options) {
        if (options == null) {
          options = {};
        }
        return this.handlers[action](options);
      };

      Application.prototype.hasRoutes = function() {
        return !_.isEmpty(this.routes);
      };

      Application.prototype._createRoutes = function() {
        var routes;
        routes = this._getActions((function(_this) {
          return function(action, key) {
            if (_.isUndefined(action) || !_(action).has("route")) {
              return [];
            }
            return [action.route, key];
          };
        })(this));
        return this._toObject(routes);
      };

      Application.prototype._createHandlers = function() {
        var handlers;
        handlers = this._getActions((function(_this) {
          return function(action, key) {
            var fn;
            fn = function(options) {
              var controller, resolve;
              resolve = options.resolve;
              controller = new (_this._getController(action, key))(options);
              return typeof resolve === "function" ? resolve(controller) : void 0;
            };
            fn = _.wrap(fn, function() {
              var args, before, df, options, orig;
              orig = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
              options = _this._normalizeArguments(args, action, key);
              df = $.Deferred();
              df._id = _.uniqueId("deferred");
              _.defaults(options, {
                resolve: df.resolve
              });
              if (!options.resolve) {
                options.deferred = df;
              }
              before = _this._invokeBefore(options, action);
              if (before === false) {
                return;
              }
              if (_this._shouldUpdateUrl(action, args)) {
                _this._updateUrl(action, options);
              }
              $.when(before).done(function() {
                return orig.call(_this, options);
              });
              return df;
            });
            return [key, fn];
          };
        })(this));
        return this._toObject(handlers);
      };

      Application.prototype._normalizeArguments = function(args, action, key) {
        var defaultParams;
        if (this._argsArePresentAndStrings(args)) {
          args[0] = this._parseStringMatches(args, action, key);
        }
        if (args[0] == null) {
          args[0] = {};
        }
        defaultParams = _.isFunction(action != null ? action.defaultParams : void 0) ? action.defaultParams.call(this) : action != null ? action.defaultParams : void 0;
        _.defaults(args[0], defaultParams || {});
        return args[0];
      };

      Application.prototype._parseStringMatches = function(args, action, key) {
        var matches, params, queryParams, route, strings;
        route = action != null ? action.route : void 0;
        if (!route) {
          throw new Error("Routes must be defined on the action: " + key);
        }
        matches = route.match(routeParams);
        queryParams = this._getObjsFromArgs(args);
        strings = this._getStringsFromArgs(args);
        params = _.reduce(strings, function(memo, arg, i) {
          memo[matches[i].slice(1)] = arg;
          return memo;
        }, {});
        return _.extend({}, queryParams, params);
      };

      Application.prototype._getObjsFromArgs = function(args) {
        args = _(args).filter(_.isObject);
        return _.extend.apply(_, [{}].concat(slice.call(args)));
      };

      Application.prototype._getStringsFromArgs = function(args) {
        return _(args).filter(_.isString);
      };

      Application.prototype._invokeBefore = function(options, action) {
        var before;
        if (!(before = this._shouldInvokeBefore(action))) {
          return;
        }
        return before.call(this, options);
      };

      Application.prototype._shouldInvokeBefore = function(action) {
        return (action != null ? action.before : void 0) || this.before;
      };

      Application.prototype._interpolateUrl = function(action, options) {
        options = _(options).reduce(function(memo, value, key) {
          if (!_.isObject(value) || _.isArray(value)) {
            memo[key] = value;
          }
          return memo;
        }, {});
        return Routes.create(action.route, options);
      };

      Application.prototype._updateUrl = function(action, options) {
        var route;
        route = this._interpolateUrl(action, options);
        if (App.currentRoute() !== route.replace(/^\//, "")) {
          return App.visit(route);
        }
      };

      Application.prototype._shouldUpdateUrl = function(action, args) {
        if (!(action != null ? action.route : void 0) || this._argsArePresentAndStrings(args)) {
          return false;
        }
        if (action && _(action).has("updateUrl")) {
          return action != null ? action.updateUrl : void 0;
        }
        return this.updateUrl;
      };

      Application.prototype._getActions = function(fn) {
        return _(this.actions).map((function(_this) {
          return function(action, key) {
            action = _.result(_this.actions, key);
            return fn(action, key);
          };
        })(this));
      };

      Application.prototype._getController = function(action, key) {
        switch (false) {
          case !_.isFunction(action != null ? action.controller : void 0):
            return action.controller;
          case !_.isUndefined(this.module):
            throw new Error("Module must be defined on the resource in order to instantiate a controller");
            break;
          case !_.isString(action != null ? action.controller : void 0):
            return this._getControllerConstructor(this.module[action.controller]);
          default:
            return this._getControllerConstructor(this.module[this.controllerMap[key]], this.controllerMap[key], this.module.moduleName);
        }
      };

      Application.prototype._getControllerConstructor = function(obj, key, module) {
        var err, error;
        try {
          if (_.isFunction(obj)) {
            return obj;
          } else {
            return obj.Controller;
          }
        } catch (error) {
          err = error;
          throw new Error("The '" + key + "' Controller was not found for for the module: '" + module + "'");
        }
      };

      Application.prototype._argsArePresentAndStrings = function(args) {
        return !_.isEmpty(args) && _.any(args, _.isString);
      };

      Application.prototype._toObject = function(array) {
        return _.chain(array).reject(_.isEmpty).object().value();
      };

      return Application;

    })();
    return App.addRouter = function(resource) {
      return App.addInitializer(function() {
        return new Marionette.AppRouter({
          appRoutes: resource.routes,
          controller: resource.handlers
        });
      });
    };
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    Entities.Config = (function(superClass) {
      extend(Config, superClass);

      function Config() {
        return Config.__super__.constructor.apply(this, arguments);
      }

      Config.prototype.env = function(str) {
        var env;
        env = this.get("env");
        switch (false) {
          case !_.isString(str):
            return env === str;
          default:
            return env;
        }
      };

      Config.prototype.log = function(text, data) {
        if (data == null) {
          data = {};
        }
        data.type = "native";
        return this.getLog().log("info", text, data);
      };

      Config.prototype.getToken = function(user) {
        return this.getCache().getToken(user.get("session_token"));
      };

      Config.prototype.generateToken = function(user) {
        return this.getCache().generateToken(user.get("session_token"));
      };

      return Config;

    })(Entities.Model);
    return App.reqres.setHandler("config:entity", function(attrs) {
      if (attrs == null) {
        attrs = {};
      }
      return new Entities.Config(attrs);
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    var API;
    Entities.Log = (function(superClass) {
      extend(Log, superClass);

      function Log() {
        return Log.__super__.constructor.apply(this, arguments);
      }

      Log.prototype.mutators = {
        dataFormatted: function() {
          var data, error;
          if (_.isEmpty(this.get("data"))) {
            return "";
          }
          try {
            data = JSON.stringify(this.get("data"));
            return _.str.truncate(data, 85);
          } catch (error) {
            return "";
          }
        },
        timestampFormatted: function() {
          var date;
          if (date = this.get("timestamp")) {
            return moment(date).fromNow(true);
          }
        }
      };

      return Log;

    })(Entities.Model);
    Entities.LogsCollection = (function(superClass) {
      extend(LogsCollection, superClass);

      function LogsCollection() {
        return LogsCollection.__super__.constructor.apply(this, arguments);
      }

      LogsCollection.prototype.model = Entities.Log;

      LogsCollection.prototype.comparator = function(log) {
        var date;
        if (date = log.get("timestamp")) {
          return -moment(date).unix();
        }
      };

      LogsCollection.prototype.refresh = function() {
        this.reset();
        return this.fetch();
      };

      LogsCollection.prototype.fetch = function() {
        return App.ipc("get:logs").bind(this).then(this.add);
      };

      return LogsCollection;

    })(Entities.Collection);
    API = {
      getLogs: function() {
        var logs;
        logs = new Entities.LogsCollection;
        logs.fetch();
        return logs;
      }
    };
    return App.reqres.setHandler("log:entities", function(transport) {
      return API.getLogs(transport);
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    Entities.Preferences = (function(superClass) {
      extend(Preferences, superClass);

      function Preferences() {
        return Preferences.__super__.constructor.apply(this, arguments);
      }

      Preferences.prototype.defaults = function() {
        return {
          token: null,
          error: false,
          runOnStartup: false,
          generatingToken: false
        };
      };

      Preferences.prototype.setToken = function(token) {
        this.set("generatingToken", false);
        return this.set("token", token);
      };

      Preferences.prototype.generateToken = function() {
        return this.set("generatingToken", true);
      };

      Preferences.prototype.isGeneratingToken = function() {
        return this.get("generatingToken");
      };

      Preferences.prototype.setError = function() {
        return this.set("error", true);
      };

      return Preferences;

    })(Entities.Model);
    return App.reqres.setHandler("new:preferences:entity", function(attrs) {
      if (attrs == null) {
        attrs = {};
      }
      return new Entities.Preferences(attrs);
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    var API, stringify;
    stringify = function(err) {
      return [err.name, err.message].join(": ");
    };
    Entities.Project = (function(superClass) {
      extend(Project, superClass);

      function Project() {
        return Project.__super__.constructor.apply(this, arguments);
      }

      Project.prototype.defaults = {
        loading: false
      };

      Project.prototype.initialize = function() {
        return this.setName();
      };

      Project.prototype.loaded = function() {
        return this.set("loading", false);
      };

      Project.prototype.isLoading = function() {
        return !!this.get("loading");
      };

      Project.prototype.setName = function() {
        return this.set({
          name: this.getNameFromPath()
        });
      };

      Project.prototype.getNameFromPath = function() {
        return _(this.get("path").split("/")).last();
      };

      Project.prototype.setClientUrl = function(url, display) {
        return this.set({
          clientUrl: url,
          clientUrlDisplay: display
        });
      };

      Project.prototype.setError = function(err) {
        if (err.portInUse) {
          this.set("portInUse", true);
        }
        return this.set("error", stringify(err));
      };

      Project.prototype.reset = function() {
        var props;
        props = {
          error: null,
          portInUse: null,
          clientUrl: null,
          clientUrlDisplay: null
        };
        this.set(props, {
          silent: true
        });
        return this.trigger("rebooted");
      };

      return Project;

    })(Entities.Model);
    Entities.ProjectsCollection = (function(superClass) {
      extend(ProjectsCollection, superClass);

      function ProjectsCollection() {
        return ProjectsCollection.__super__.constructor.apply(this, arguments);
      }

      ProjectsCollection.prototype.model = Entities.Project;

      ProjectsCollection.prototype.getProjectByPath = function(path) {
        return this.findWhere({
          path: path
        });
      };

      return ProjectsCollection;

    })(Entities.Collection);
    API = {
      getProjects: function() {
        var projects;
        projects = new Entities.ProjectsCollection;
        App.ipc("get:project:paths").then(function(paths) {
          projects.add(_(paths).map(function(path) {
            return {
              path: path
            };
          }));
          return projects.trigger("fetched");
        });
        return projects;
      }
    };
    return App.reqres.setHandler("project:entities", function() {
      return API.getProjects();
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    var API;
    Entities.Updater = (function(superClass) {
      extend(Updater, superClass);

      function Updater() {
        return Updater.__super__.constructor.apply(this, arguments);
      }

      Updater.prototype.defaults = function() {
        return {
          finished: false,
          updatesAvailable: false
        };
      };

      Updater.prototype.mutators = {
        stateFormatted: function() {
          switch (this.get("state")) {
            case "checking":
              return "Checking for updates...";
            case "downloading":
              return "Downloading updates...";
            case "applying":
              return "Applying updates...";
            case "done":
              return "Updates ready";
            case "none":
              return "No updates available";
            case "error":
              return "An error occurred updating";
          }
        },
        buttonFormatted: function() {
          if (this.get("state") === "done") {
            return "Restart";
          } else {
            return "Done";
          }
        }
      };

      Updater.prototype.setState = function(state) {
        switch (state) {
          case "error":
          case "done":
          case "none":
            this.setFinished();
        }
        return this.set("state", state);
      };

      Updater.prototype.setNewVersion = function(newVersion) {
        return this.set("newVersion", newVersion);
      };

      Updater.prototype.setFinished = function() {
        return this.set("finished", true);
      };

      Updater.prototype.hasError = function() {
        return this.get("state") === "error";
      };

      Updater.prototype.isDone = function() {
        return this.get("state") === "done";
      };

      Updater.prototype.updatesAvailable = function(bool) {
        if (bool == null) {
          bool = true;
        }
        return this.set("updatesAvailable", bool);
      };

      Updater.prototype.check = function() {
        return App.ipc("updater:check").then((function(_this) {
          return function(version) {
            if (version) {
              return _this.updatesAvailable();
            } else {
              return _this.updatesAvailable(false);
            }
          };
        })(this));
      };

      return Updater;

    })(Entities.Model);
    API = {
      newUpdater: function(version) {
        return new Entities.Updater({
          version: version
        });
      }
    };
    return App.reqres.setHandler("new:updater:entity", function(version) {
      return API.newUpdater(version);
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("Entities", function(Entities, App, Backbone, Marionette, $, _) {
    Entities.User = (function(superClass) {
      extend(User, superClass);

      function User() {
        return User.__super__.constructor.apply(this, arguments);
      }

      User.prototype.defaults = function() {
        return {
          loggingIn: false
        };
      };

      User.prototype.mutators = {
        greeting: function() {
          return this.attributes.name || this.attributes.email;
        }
      };

      User.prototype.loggingIn = function() {
        return this.set("loggingIn", true);
      };

      User.prototype.loggedIn = function(attrs) {
        this.set("loggingIn", false);
        return this.set(attrs);
      };

      User.prototype.setLoginError = function(err) {
        this.set("loggingIn", false, {
          silent: true
        });
        return this.set("error", err.message);
      };

      return User;

    })(Entities.Model);
    return App.reqres.setHandler("new:user:entity", function(attrs) {
      if (attrs == null) {
        attrs = {};
      }
      return new Entities.User(attrs);
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("AboutApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function(options) {
        var updater;
        if (options == null) {
          options = {};
        }
        updater = App.updater;
        return App.ipc("get:about:logo:src").then((function(_this) {
          return function(src) {
            return _this.showAboutView(updater, src);
          };
        })(this))["catch"]((function(_this) {
          return function(err) {
            return _this.showAboutView(updater);
          };
        })(this));
      };

      Controller.prototype.showAboutView = function(updater, src) {
        var aboutView;
        if (src == null) {
          src = "";
        }
        aboutView = this.getAboutView(updater, src);
        this.listenTo(aboutView, "page:clicked", function() {
          return App.ipc("external:open", "https://cypress.io");
        });
        return this.show(aboutView);
      };

      Controller.prototype.getAboutView = function(updater, src) {
        return new Show.About({
          model: updater,
          src: src
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("AboutApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.About = (function(superClass) {
      extend(About, superClass);

      function About() {
        return About.__super__.constructor.apply(this, arguments);
      }

      About.prototype.template = "about/show/_about";

      About.prototype.ui = {
        "page": "[data-page]"
      };

      About.prototype.triggers = {
        "click @ui.page": "page:clicked"
      };

      About.prototype.templateHelpers = function() {
        return {
          src: this.options.src
        };
      };

      return About;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("LoginApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function() {
        var loginView, user;
        user = App.request("current:user");
        loginView = this.getLoginView(user);
        this.listenTo(loginView, "login:clicked", function(view, obj) {
          user.unset("error");
          return App.execute("login:request");
        });
        this.listenTo(loginView, "help:clicked", function() {
          return App.ipc("external:open", "https://docs.cypress.io");
        });
        return this.show(loginView);
      };

      Controller.prototype.getLoginView = function(user) {
        return new Show.Login({
          model: user
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("LoginApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Login = (function(superClass) {
      extend(Login, superClass);

      function Login() {
        return Login.__super__.constructor.apply(this, arguments);
      }

      Login.prototype.template = "login/show/login";

      Login.prototype.ui = {
        login: "[data-login]",
        retry: "[data-retry]",
        help: "[data-js=help]"
      };

      Login.prototype.triggers = {
        "click @ui.login": "login:clicked",
        "click @ui.help": "help:clicked"
      };

      Login.prototype.modelEvents = {
        "change:loggingIn": "render",
        "change:error": "render"
      };

      Login.prototype.onShow = function() {
        return $("html").addClass("login");
      };

      Login.prototype.onRender = function() {
        var loggingIn;
        loggingIn = this.model.get("loggingIn");
        return this.ui.login.toggleClass("disabled", loggingIn).attr("disabled", loggingIn);
      };

      Login.prototype.onDestroy = function() {
        return $("html").removeClass("login");
      };

      return Login;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("DebugApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function(options) {
        var debugView, logs;
        if (options == null) {
          options = {};
        }
        logs = App.request("log:entities");
        App.ipc("on:log", function(err, log) {
          if (log == null) {
            log = {};
          }
          return logs.add(log);
        });
        debugView = this.getDebugView(logs);
        this.listenTo(debugView, "clear:clicked", function() {
          return App.ipc("clear:logs").then(function() {
            return logs.reset();
          });
        });
        this.listenTo(debugView, "refresh:clicked", function() {
          return logs.refresh();
        });
        return this.show(debugView);
      };

      Controller.prototype.onDestroy = function() {
        return App.ipc("off:log");
      };

      Controller.prototype.getDebugView = function(logs) {
        return new Show.Debug({
          collection: logs
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("DebugApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    Show.Log = (function(superClass) {
      extend(Log, superClass);

      function Log() {
        return Log.__super__.constructor.apply(this, arguments);
      }

      Log.prototype.template = "debug/show/_log";

      return Log;

    })(App.Views.ItemView);
    Show.Empty = (function(superClass) {
      extend(Empty, superClass);

      function Empty() {
        return Empty.__super__.constructor.apply(this, arguments);
      }

      Empty.prototype.content = "Can't find any logs";

      return Empty;

    })(App.Views.EmptyView);
    return Show.Debug = (function(superClass) {
      extend(Debug, superClass);

      function Debug() {
        return Debug.__super__.constructor.apply(this, arguments);
      }

      Debug.prototype.template = "debug/show/debug";

      Debug.prototype.emptyView = Show.Empty;

      Debug.prototype.childView = Show.Log;

      Debug.prototype.childViewContainer = "tbody";

      Debug.prototype.ui = {
        "clear": "[data-clear]",
        "refresh": "[data-refresh]"
      };

      Debug.prototype.triggers = {
        "click @ui.clear": "clear:clicked",
        "click @ui.refresh": "refresh:clicked"
      };

      return Debug;

    })(App.Views.CompositeView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("FooterApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function() {
        var layoutView;
        layoutView = this.getLayoutView();
        this.listenTo(layoutView, "show", function() {
          this.updateRegion(layoutView.updateRegion);
          return this.bottomRegion(layoutView.bottomRegion);
        });
        return this.show(layoutView);
      };

      Controller.prototype.updateRegion = function(region) {
        var check, updateView, updater;
        updater = App.updater;
        check = function() {
          return updater.check();
        };
        updateView = this.getUpdateView(updater);
        this.listenTo(updateView, "show", function() {
          this.checkId = setInterval(check, 5 * 60 * 1000);
          return check();
        });
        this.listenTo(updateView, "download:update:clicked", function() {
          return App.execute("gui:check:for:updates");
        });
        return this.show(updateView, {
          region: region
        });
      };

      Controller.prototype.onDestroy = function() {
        return clearInterval(this.checkId);
      };

      Controller.prototype.bottomRegion = function(region) {
        var bottomView;
        bottomView = this.getBottomView();
        this.listenTo(bottomView, "tests:clicked", function() {
          return App.execute("gui:tests");
        });
        this.listenTo(bottomView, "quit:clicked", function() {
          return App.ipc("quit");
        });
        this.listenTo(bottomView, "updates:clicked", function() {
          return App.execute("gui:check:for:updates");
        });
        this.listenTo(bottomView, "debug:clicked", function() {
          return App.execute("gui:debug");
        });
        this.listenTo(bottomView, "about:clicked", function() {
          return App.execute("gui:about");
        });
        this.listenTo(bottomView, "preferences:clicked", function() {
          return App.execute("gui:preferences");
        });
        return this.show(bottomView, {
          region: region
        });
      };

      Controller.prototype.getLayoutView = function() {
        return new Show.Layout;
      };

      Controller.prototype.getUpdateView = function(updater) {
        return new Show.Update({
          model: updater
        });
      };

      Controller.prototype.getBottomView = function() {
        return new Show.Bottom;
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("FooterApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    Show.Layout = (function(superClass) {
      extend(Layout, superClass);

      function Layout() {
        return Layout.__super__.constructor.apply(this, arguments);
      }

      Layout.prototype.template = "footer/show/layout";

      return Layout;

    })(App.Views.LayoutView);
    Show.Update = (function(superClass) {
      extend(Update, superClass);

      function Update() {
        return Update.__super__.constructor.apply(this, arguments);
      }

      Update.prototype.template = "footer/show/_update";

      Update.prototype.triggers = {
        "click [data-js='download-update']": "download:update:clicked"
      };

      Update.prototype.modelEvents = {
        "change:updatesAvailable": "render"
      };

      Update.prototype.onRender = function() {
        return $("html").toggleClass("has-updates", this.model.get("updatesAvailable"));
      };

      Update.prototype.onDestroy = function() {
        return $("html").removeClass("has-updates");
      };

      return Update;

    })(App.Views.ItemView);
    return Show.Bottom = (function(superClass) {
      extend(Bottom, superClass);

      function Bottom() {
        return Bottom.__super__.constructor.apply(this, arguments);
      }

      Bottom.prototype.template = "footer/show/_bottom";

      Bottom.prototype.ui = {
        settings: "[data-js='options']",
        cog: ".fa-cog",
        quit: "[data-quit]",
        updates: "[data-updates]",
        debug: "[data-debug]",
        tests: "[data-tests]",
        about: "[data-about]",
        preferences: "[data-preferences]"
      };

      Bottom.prototype.triggers = {
        "click @ui.quit": "quit:clicked",
        "click @ui.settings": "settings:clicked",
        "click @ui.updates": "updates:clicked",
        "click @ui.debug": "debug:clicked",
        "click @ui.tests": "tests:clicked",
        "click @ui.about": "about:clicked",
        "click @ui.preferences": "preferences:clicked"
      };

      Bottom.prototype.events = {
        "click .dropdown-menu a": "aClicked"
      };

      Bottom.prototype.onRender = function() {
        return this.ui.cog.dropdown();
      };

      Bottom.prototype.onShow = function() {
        return this.ui.settings.tooltip({
          title: "Options",
          placement: "left"
        });
      };

      Bottom.prototype.aClicked = function() {
        return this.ui.cog.dropdown("toggle");
      };

      Bottom.prototype.onDestroy = function() {
        return this.ui.settings.tooltip("destroy");
      };

      return Bottom;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("PreferencesApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function(options) {
        var preferences, preferencesView, setError, setToken, user, window;
        if (options == null) {
          options = {};
        }
        window = options.window;
        user = App.request("current:user");
        preferences = App.request("new:preferences:entity");
        setToken = function(token) {
          return preferences.setToken(token);
        };
        setError = function(err) {
          return preferences.setError();
        };
        App.config.getToken(user).then(setToken)["catch"](setError);
        preferencesView = this.getPreferencesView(preferences);
        this.listenTo(preferencesView, "generate:clicked", function() {
          if (preferences.isGeneratingToken()) {
            return;
          }
          preferences.unset("error");
          preferences.generateToken();
          return App.config.generateToken(user).then(setToken)["catch"](setError);
        });
        return this.show(preferencesView);
      };

      Controller.prototype.getPreferencesView = function(preferences) {
        return new Show.Preferences({
          model: preferences
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("PreferencesApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Preferences = (function(superClass) {
      extend(Preferences, superClass);

      function Preferences() {
        return Preferences.__super__.constructor.apply(this, arguments);
      }

      Preferences.prototype.template = "preferences/show/preferences";

      Preferences.prototype.ui = {
        key: "#api-key",
        generate: "#generate-api-key",
        refresh: "i.fa-refresh"
      };

      Preferences.prototype.events = {
        "click @ui.key": "keyClicked"
      };

      Preferences.prototype.triggers = {
        "click @ui.generate": "generate:clicked"
      };

      Preferences.prototype.modelEvents = {
        "change:token": "render",
        "change:error": "render",
        "change:generatingToken": "generatingTokenChanged"
      };

      Preferences.prototype.generatingTokenChanged = function(model, value) {
        if (value) {
          this.ui.generate.attr("disabled", "disabled");
        } else {
          this.ui.generate.removeAttr("disabled");
        }
        return this.ui.refresh.toggleClass("fa-spin", value);
      };

      Preferences.prototype.keyClicked = function(e) {
        return this.ui.key.select();
      };

      return Preferences;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("ProjectsApp.List", function(List, App, Backbone, Marionette, $, _) {
    return List.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function() {
        var addProject, projects, projectsView, startProject, user;
        projects = App.request("project:entities");
        user = App.request("current:user");
        projectsView = this.getProjectsView(projects, user);
        addProject = (function(_this) {
          return function() {
            return App.ipc("show:directory:dialog").then(function(dirPath) {
              var project;
              if (!dirPath) {
                return;
              }
              project = projects.add({
                path: dirPath,
                loading: true
              });
              return Promise.all([App.ipc("add:project", dirPath), Promise.delay(750)]).then(function() {
                return project.loaded();
              });
            })["catch"](function(err) {
              return _this.displayError(err.message);
            });
          };
        })(this);
        startProject = function(project, options) {
          if (options == null) {
            options = {};
          }
          return App.vent.trigger("project:clicked", project, options);
        };
        this.listenTo(projectsView, "add:project:clicked", addProject);
        this.listenTo(projectsView, "childview:add:project:clicked", addProject);
        this.listenTo(projectsView, "childview:help:clicked", function() {
          return App.ipc("external:open", "https://on.cypress.io/guides/installing-and-running/#section-adding-projects");
        });
        this.listenTo(projectsView, "sign:out:clicked", function() {
          return App.vent.trigger("log:out", user);
        });
        this.listenTo(projectsView, "childview:project:clicked", function(iv, obj) {
          var project;
          project = obj.model;
          if (project.isLoading()) {
            return;
          }
          return startProject(project);
        });
        this.listenTo(projectsView, "childview:project:remove:clicked", function(iv, project) {
          projects.remove(project);
          return App.ipc("remove:project", project.get("path"));
        });
        return this.listenTo(projects, "fetched", function() {
          return this.show(projectsView);
        });
      };

      Controller.prototype.displayError = function(msg) {
        var errorView;
        errorView = this.getErrorView(msg);
        this.show(errorView);
        return this.listenTo(errorView, "ok:clicked", function() {
          return this.initialize();
        });
      };

      Controller.prototype.getErrorView = function(msg) {
        return new List.Error({
          message: msg
        });
      };

      Controller.prototype.getProjectsView = function(projects, user) {
        return new List.Projects({
          collection: projects,
          model: user
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("ProjectsApp.List", function(List, App, Backbone, Marionette, $, _) {
    List.Error = (function(superClass) {
      extend(Error, superClass);

      function Error() {
        return Error.__super__.constructor.apply(this, arguments);
      }

      Error.prototype.template = "projects/list/_error";

      Error.prototype.templateHelpers = function() {
        return {
          message: this.options.message
        };
      };

      Error.prototype.triggers = {
        "click [data-ok]": "ok:clicked"
      };

      return Error;

    })(App.Views.ItemView);
    List.Project = (function(superClass) {
      extend(Project, superClass);

      function Project() {
        return Project.__super__.constructor.apply(this, arguments);
      }

      Project.prototype.template = "projects/list/_project";

      Project.prototype.tagName = "li";

      Project.prototype.className = "project";

      Project.prototype.modelEvents = {
        "change:loading": "render"
      };

      Project.prototype.triggers = {
        "click": "project:clicked"
      };

      Project.prototype.onRender = function() {
        this.$el.toggleClass("loading", this.model.isLoading());
        return this.$el.toggleClass("loaded", !this.model.isLoading());
      };

      Project.prototype.onShow = function() {
        return this.$el.contextmenu({
          target: this.options.contextMenu,
          onItem: (function(_this) {
            return function() {
              return _.defer(function() {
                return _this.trigger("project:remove:clicked", _this.model);
              });
            };
          })(this)
        });
      };

      Project.prototype.onDestroy = function() {
        return this.$el.contextmenu("destroy");
      };

      return Project;

    })(App.Views.ItemView);
    List.Empty = (function(superClass) {
      extend(Empty, superClass);

      function Empty() {
        return Empty.__super__.constructor.apply(this, arguments);
      }

      Empty.prototype.template = "projects/list/_empty";

      Empty.prototype.tagName = "li";

      Empty.prototype.className = "empty";

      Empty.prototype.ui = {
        "addProject": "[data-js='add-project']",
        "help": "[data-js='help']"
      };

      Empty.prototype.triggers = {
        "click @ui.addProject": "add:project:clicked",
        "click @ui.help": "help:clicked"
      };

      return Empty;

    })(App.Views.ItemView);
    return List.Projects = (function(superClass) {
      extend(Projects, superClass);

      function Projects() {
        return Projects.__super__.constructor.apply(this, arguments);
      }

      Projects.prototype.template = "projects/list/projects";

      Projects.prototype.childView = List.Project;

      Projects.prototype.emptyView = List.Empty;

      Projects.prototype.childViewContainer = "ul#projects-container";

      Projects.prototype.childViewOptions = {
        "contextMenu": "#context-menu"
      };

      Projects.prototype.ui = {
        "addProject": "[data-js='add-project']",
        "input": "input",
        "signout": "li[data-signout]"
      };

      Projects.prototype.events = {
        "mousedown @ui.signout": "signOutClicked",
        "change @ui.input": "inputChanged"
      };

      Projects.prototype.triggers = {
        "click @ui.addProject": "add:project:clicked"
      };

      Projects.prototype.signOutClicked = function(e) {
        return this.trigger("sign:out:clicked");
      };

      Projects.prototype.onRender = function() {
        return this.ui.signout.dropdown();
      };

      Projects.prototype.onShow = function() {
        return this.ui.addProject.tooltip({
          title: "Add project",
          placement: "left"
        });
      };

      Projects.prototype.onDestroy = function() {
        return this.ui.addProject.tooltip("destroy");
      };

      return Projects;

    })(App.Views.CompositeView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("ProjectsApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function(params) {
        var project, projectView;
        project = params.project;
        projectView = this.getProjectView(project);
        this.listenTo(projectView, "client:url:clicked", function() {
          return App.ipc("external:open", project.get("clientUrl"));
        });
        this.listenTo(projectView, "stop:clicked ok:clicked", function() {
          return this.closeProject().then(function() {
            return App.vent.trigger("start:projects:app");
          });
        });
        this.listenTo(projectView, "show", function() {
          return _.delay((function(_this) {
            return function() {
              return _this.openProject(project);
            };
          })(this), 100);
        });
        return this.show(projectView);
      };

      Controller.prototype.reboot = function(project) {
        project.reset();
        return this.closeProject().then((function(_this) {
          return function() {
            return _this.openProject(project);
          };
        })(this));
      };

      Controller.prototype.closeProject = function() {
        App.ipc.off("on:project:settings:change");
        return App.ipc("close:project");
      };

      Controller.prototype.openProject = function(project) {
        return Promise.all([App.ipc("open:project", project.get("path")), Promise.delay(500)]).spread(function(config) {
          return project.setClientUrl(config.clientUrl, config.clientUrlDisplay);
        }).then(function() {
          return App.ipc("on:project:settings:change");
        }).then((function(_this) {
          return function() {
            return _this.reboot(project);
          };
        })(this))["catch"](function(err) {
          return project.setError(err);
        });
      };

      Controller.prototype.getProjectView = function(project) {
        return new Show.Project({
          model: project
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("ProjectsApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Project = (function(superClass) {
      extend(Project, superClass);

      function Project() {
        return Project.__super__.constructor.apply(this, arguments);
      }

      Project.prototype.template = "projects/show/project";

      Project.prototype.modelEvents = {
        "rebooted": "render",
        "change:clientUrl": "render",
        "change:error": "render"
      };

      Project.prototype.triggers = {
        "click a": "client:url:clicked",
        "click [data-stop]": "stop:clicked",
        "click [data-ok]": "ok:clicked"
      };

      Project.prototype.onShow = function() {
        return $("html").addClass("project-show");
      };

      Project.prototype.onDestroy = function() {
        return $("html").removeClass("project-show");
      };

      return Project;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("UpdatesAppliedApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function(options) {
        var updatesView;
        updatesView = this.getUpdatesView();
        return this.show(updatesView);
      };

      Controller.prototype.getUpdatesView = function() {
        return new Show.UpdatesApplied;
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("UpdatesAppliedApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.UpdatesApplied = (function(superClass) {
      extend(UpdatesApplied, superClass);

      function UpdatesApplied() {
        return UpdatesApplied.__super__.constructor.apply(this, arguments);
      }

      UpdatesApplied.prototype.template = "updates_applied/show/_updates_applied";

      return UpdatesApplied;

    })(App.Views.ItemView);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("UpdatesApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Controller = (function(superClass) {
      extend(Controller, superClass);

      function Controller() {
        return Controller.__super__.constructor.apply(this, arguments);
      }

      Controller.prototype.initialize = function(options) {
        var set, updater, updatesView;
        if (options == null) {
          options = {};
        }
        updater = App.updater;
        updatesView = this.getUpdatesView(updater);
        this.listenTo(updatesView, "button:clicked", function() {
          return App.ipc("window:close");
        });
        this.listenTo(updatesView, "changelog:clicked", function() {
          return App.ipc("external:open", "https://on.cypress.io/changelog");
        });
        set = function(state) {
          return updater.setState(state);
        };
        this.listenTo(updatesView, "show", function() {
          return App.ipc("updater:run", function(err, data) {
            if (data == null) {
              data = {};
            }
            switch (data.event) {
              case "start":
                return set("checking");
              case "apply":
                return set("applying");
              case "error":
                return set("error");
              case "done":
                return set("done");
              case "none":
                return set("none");
              case "download":
                updater.setNewVersion(data.version);
                return set("downloading");
            }
          });
        });
        return this.show(updatesView);
      };

      Controller.prototype.onDestroy = function() {
        return App.ipc.off("updater:run");
      };

      Controller.prototype.getUpdatesView = function(updater) {
        return new Show.Updates({
          model: updater
        });
      };

      return Controller;

    })(App.Controllers.Application);
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("UpdatesApp.Show", function(Show, App, Backbone, Marionette, $, _) {
    return Show.Updates = (function(superClass) {
      extend(Updates, superClass);

      function Updates() {
        return Updates.__super__.constructor.apply(this, arguments);
      }

      Updates.prototype.template = "updates/show/updates";

      Updates.prototype.ui = {
        "state": ".state",
        "button": "button",
        "changelog": "[data-changelog]"
      };

      Updates.prototype.triggers = {
        "click @ui.button": "button:clicked",
        "click @ui.changelog": "changelog:clicked"
      };

      Updates.prototype.modelEvents = {
        "change:state": "render"
      };

      Updates.prototype.onRender = function() {
        if (this.model.hasError()) {
          return this.ui.state.addClass("text-danger");
        }
      };

      return Updates;

    })(App.Views.ItemView);
  });

}).call(this);
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/about/show/templates/_about"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="about">\n  <img src="file://');
    
      __out.push(__sanitize(this.src));
    
      __out.push('" />\n  <p>\n    <strong>Cypress</strong>\n  </p>\n  <p class="version">\n    <span>Version ');
    
      __out.push(__sanitize(this.version));
    
      __out.push('</span>\n  </p>\n  <p>\n    <a data-page href="#">\n      www.cypress.io\n    </a>\n  </p>\n  <p class="copyright">\n    © ');
    
      __out.push(__sanitize(moment().year()));
    
      __out.push(' Cypress.io, LLC\n  </p>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/login/show/templates/login"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="login">\n  <h3>Cypress.io</h3>\n  <div class="well well-lg">\n    <button data-login class="btn btn-primary btn-login">\n      <i class="fa fa-github"></i>\n      Login with GitHub\n    </button>\n  </div>\n  ');
    
      if (this.error) {
        __out.push('\n    <div class="alert alert-danger">\n      <p>\n        <i class="fa fa-warning"></i>\n        <strong>Can\'t login</strong></p>\n      <p>\n        ');
        __out.push(__sanitize(this.error));
        __out.push('\n      </p>\n    </div>\n  ');
      }
    
      __out.push('\n  ');
    
      if (this.loggingIn) {
        __out.push('\n    <div class="login-spinner">\n      <i class="fa fa-spinner fa-spin"></i>\n      Logging in...\n    </div>\n  ');
      }
    
      __out.push('\n  <div class="helper-line">\n    <a data-js="help" class="helper-docs-link">\n      <i class="fa fa-question-circle"></i>\n      Need help?\n    </a>\n  </div>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/debug/show/templates/_empty"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
    
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/debug/show/templates/_log"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<td>\n  ');
    
      if (this.timestampFormatted) {
        __out.push('\n    <em>');
        __out.push(__sanitize(this.timestampFormatted));
        __out.push(' ago</em>\n  ');
      }
    
      __out.push('\n</td>\n<td>');
    
      __out.push(__sanitize(this.type));
    
      __out.push('</td>\n<td>');
    
      __out.push(__sanitize(this.message));
    
      __out.push('</td>\n<td class="data">');
    
      __out.push(__sanitize(this.dataFormatted));
    
      __out.push('</td>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/debug/show/templates/debug"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="debug">\n  <div class="panel">\n    <button data-clear class="btn btn-xs btn-danger pull-right">\n      <i class="fa fa-minus-circle"></i>\n      Clear\n    </button>\n    <button data-refresh class="btn btn-xs btn-default pull-left">\n      <i class="fa fa-refresh"></i>\n      Refresh\n    </button>\n  </div>\n  <div id="code">\n    <table class="table table-bordered table-condensed">\n      <tbody></tbody>\n    </table>\n  </div>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/footer/show/templates/_bottom"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="footer">\n  <span class="pull-right">\n    <div data-js="options" class="dropup">\n      <i class="fa fa-cog dropdown-toggle" data-toggle="dropdown"></i>\n      <ul class="dropdown-menu dropdown-menu-right">\n        ');
    
      if (this.debug) {
        __out.push('\n          <li data-tests>\n            <a href="#">Tests</a>\n          </li>\n          <li class="divider"></li>\n        ');
      }
    
      __out.push('\n        <li>\n        <li data-about>\n          <a href="#">About</a>\n        </li>\n        <li data-debug>\n          <a href="#">Debug Console</a>\n        </li>\n        <li data-updates>\n          <a href="#">Check for updates</a>\n        </li>\n        <!-- <li class="divider"></li>\n        <li data-preferences>\n          <a href="#">Preferences...</a>\n        </li> -->\n        <li class="divider"></li>\n        <li data-quit>\n          <a href="#">Quit</a>\n        </li>\n      </ul>\n    </div>\n  </span>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/footer/show/templates/_update"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      if (this.updatesAvailable) {
        __out.push('\n  <div id="updates-available">\n    New updates are available\n    <strong data-js="download-update">\n      <i class="fa fa-download"></i>\n      Update\n    </strong>\n  </div>\n');
      }
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/footer/show/templates/layout"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="update-region"></div>\n<div id="bottom-region"></div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/preferences/show/templates/preferences"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      var ref;
    
      __out.push('<div id="preferences">\n  <section>\n    <div class="container">\n      <form class="form-inline">\n        <div class="form-group">\n          <label class="col-xs-4">General Settings:</label>\n          <div class="col-xs-8">\n            <div class="checkbox-inline">\n              <label>\n                <input type="checkbox"> Start Cypress at login\n              </label>\n            </div>\n          </div>\n        </div>\n      </form>\n    </div>\n  </section>\n  <section>\n    <div class="container">\n      <form class="form-inline">\n        <div class="form-group ');
    
      __out.push(__sanitize(this.error ? 'has-error' : ''));
    
      __out.push('">\n          <label class="col-xs-4 control-label">Your API Key:</label>\n          <div class="col-xs-8" id="api-key-container">\n            <input id="api-key" class="form-control col-xs-10 input-sm" type="text" value="');
    
      __out.push(__sanitize((ref = this.token) != null ? ref : 'Loading...'));
    
      __out.push('" readonly>\n            <button id="generate-api-key" type="button" class="btn btn-default btn-sm">\n              <i class="fa fa-refresh"></i>\n            </button>\n            ');
    
      if (this.error) {
        __out.push('\n              <p class="help-block">\n                <small>An error occured receiving token.</small>\n              </p>\n            ');
      }
    
      __out.push('\n          </div>\n        </div>\n      </form>\n    </div>\n  </section>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/projects/list/templates/_empty"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<h4>Add your first project</h4>\n<p>To begin testing, choose a folder directory.</p>\n<button data-js="add-project" class="btn btn-success">\n  <span class="add-project fa-stack">\n    <i class="fa fa-folder-o fa-stack-2x"></i>\n    <i class="fa fa-plus fa-stack-1x"></i>\n  </span>\n  Add Project\n</button>\n<div class="helper-line">\n  <a class="helper-docs-link" data-js="help" href="#">\n    <i class="fa fa-question-circle"></i>\n    Need help?\n  </a>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/projects/list/templates/_error"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="projects">\n  <div class="alert alert-danger error">\n    <p>\n      <i class="fa fa-warning"></i>\n      <strong>Project can\'t be added</strong>\n    </p>\n    <p class="bg-danger">\n      ');
    
      __out.push(this.message.replace("\n", "<br /><br />"));
    
      __out.push('\n    </p>\n    <button data-ok class="btn btn-default btn-sm">\n      Dismiss\n    </button>\n  </div>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/projects/list/templates/_project"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<h4>\n  ');
    
      __out.push(__sanitize(this.name));
    
      __out.push('\n</h4>\n<small>');
    
      __out.push(__sanitize(this.path));
    
      __out.push('</small>\n');
    
      if (this.loading) {
        __out.push('\n  <i class="fa fa-spinner fa-spin"></i>\n');
      } else {
        __out.push('\n  <i class="fa fa-angle-right"></i>\n');
      }
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/projects/list/templates/projects"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="projects">\n  <header>\n    <div class="user-name">\n      <div class="dropdown pull-left">\n        <a href="#" data-toggle="dropdown">\n          <i class="fa fa-user"></i>\n          ');
    
      __out.push(__sanitize(this.greeting));
    
      __out.push('\n          <i class="fa fa-caret-down"></i>\n        </a>\n        <ul class="dropdown-menu">\n          <li data-signout>\n            <a href="#">Logout</a>\n          </li>\n        </ul>\n      </div>\n    </div>\n    <span data-js="add-project" class="add-project fa-stack pull-right">\n      <i class="fa fa-folder-o fa-stack-2x"></i>\n      <i class="fa fa-plus fa-stack-1x"></i>\n    </span>\n    <input type="file" nwdirectory class="hidden" />\n  </header>\n  <ul class="list-unstyled" id="projects-container"></ul>\n  <div id="context-menu">\n    <ul class="dropdown-menu">\n      <li data-remove>\n        <a href="#">Remove project</a>\n      </li>\n    </ul>\n  </div>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/projects/show/templates/project"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="project">\n  <h3>');
    
      __out.push(__sanitize(this.name));
    
      __out.push('</h3>\n  <p class="project-path">');
    
      __out.push(__sanitize(this.path));
    
      __out.push('</p>\n  ');
    
      if (this.error) {
        __out.push('\n    <div class="alert alert-danger error">\n      <p>\n        <i class="fa fa-warning"></i>\n        <strong>Can\'t start server</strong>\n      </p>\n      <p>\n        ');
        __out.push(this.error.replace("\n", "<br /><br />"));
        __out.push('\n      </p>\n      ');
        if (this.portInUse) {
          __out.push('\n        <hr>\n        <p>To fix, stop the other running process or change the port in cypress.json</p>\n      ');
        }
        __out.push('\n      <button data-ok class="btn btn-default btn-sm">\n        Dismiss\n      </button>\n    </div>\n  ');
      } else {
        __out.push('\n    ');
        if (this.clientUrl) {
          __out.push('\n      <div class="well well-lg">\n        <div>Server running</div>\n        <div>\n          <a href="#">');
          __out.push(__sanitize(this.clientUrlDisplay));
          __out.push('</a>\n        </div>\n      </div>\n      <button data-stop class="btn btn-danger">Stop server</button>\n    ');
        } else {
          __out.push('\n      <span>\n        <i class="fa fa-spinner fa-spin"></i>\n        Starting server...\n      </span>\n    ');
        }
        __out.push('\n  ');
      }
    
      __out.push('\n</div>\n');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/updates_applied/show/templates/_updates_applied"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="updates-applied">\n  <h3>\n    <p>Cypress.io</p>\n  </h3>\n  <div class="well well-lg">\n    <span>\n      <i class="fa fa-spinner fa-spin"></i>\n      Applying updates and restarting...\n    </span>\n  </div>\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
if (!window.JST) {
  window.JST = {};
}
window.JST["backbone/apps/updates/show/templates/updates"] = function (__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
    };
  }
  (function() {
    (function() {
      __out.push('<div id="updates">\n  <p>\n    <a data-changelog href="#">\n      View Changelog\n    </a>\n  </p>\n  ');
    
      if (this.version) {
        __out.push('\n    <p class="version">\n      <b>Current Version: </b>\n      <span>');
        __out.push(__sanitize(this.version));
        __out.push('</span>\n    </p>\n  ');
      }
    
      __out.push('\n  ');
    
      if (this.newVersion) {
        __out.push('\n    <p class="new-version">\n      <b>New Version: </b>\n      <span>');
        __out.push(__sanitize(this.newVersion));
        __out.push('</span>\n    </p>\n  ');
      }
    
      __out.push('\n  ');
    
      if (this.state) {
        __out.push('\n    <p class="state">\n      ');
        if (!this.finished) {
          __out.push('\n        <i class="fa fa-spinner fa-spin"></i>\n      ');
        }
        __out.push('\n      ');
        __out.push(__sanitize(this.stateFormatted));
        __out.push('\n    </p>\n    ');
        if (this.finished) {
          __out.push('\n      <div>\n        <button class="btn btn-default">');
          __out.push(__sanitize(this.buttonFormatted));
          __out.push('</button>\n      </div>\n    ');
        }
        __out.push('\n  ');
      }
    
      __out.push('\n</div>');
    
    }).call(this);
    
  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
};
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("AboutApp", function(AboutApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = AboutApp;

      Router.prototype.actions = {
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.vent.on("start:about:app", function(region) {
      return router.to("show", {
        region: region
      });
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("LoginApp", function(LoginApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = LoginApp;

      Router.prototype.actions = {
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.vent.on("start:login:app", function() {
      return router.to("show");
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("DebugApp", function(DebugApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = DebugApp;

      Router.prototype.actions = {
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.vent.on("start:debug:app", function(region) {
      return router.to("show", {
        region: region
      });
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("FooterApp", function(FooterApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = FooterApp;

      Router.prototype.actions = {
        show: function() {
          return {
            defaultParams: function() {
              return {
                region: App.footerRegion
              };
            }
          };
        }
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.vent.on("start:footer:app", function() {
      return router.to("show");
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("PreferencesApp", function(PreferencesApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = PreferencesApp;

      Router.prototype.actions = {
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.vent.on("start:preferences:app", function(region, win) {
      return router.to("show", {
        region: region,
        window: win
      });
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("ProjectsApp", function(ProjectsApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = ProjectsApp;

      Router.prototype.actions = {
        list: function() {},
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    App.vent.on("start:projects:app", function() {
      return router.to("list");
    });
    return App.vent.on("project:clicked", function(project, options) {
      return router.to("show", {
        project: project,
        options: options
      });
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("UpdatesAppliedApp", function(UpdatesAppliedApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = UpdatesAppliedApp;

      Router.prototype.actions = {
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.commands.setHandler("start:updates:applied:app", function() {
      return router.to("show");
    });
  });

}).call(this);
; 
(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  this.App.module("UpdatesApp", function(UpdatesApp, App, Backbone, Marionette, $, _) {
    var Router, router;
    Router = (function(superClass) {
      extend(Router, superClass);

      function Router() {
        return Router.__super__.constructor.apply(this, arguments);
      }

      Router.prototype.module = UpdatesApp;

      Router.prototype.actions = {
        show: function() {}
      };

      return Router;

    })(App.Routers.Application);
    router = new Router;
    return App.vent.on("start:updates:app", function(region) {
      return router.to("show", {
        region: region
      });
    });
  });

}).call(this);
