// TODO(bep) replace with distribution once merged.
livereloadJS=`(functione(t,n,o){functioni(s,l){if(!n[s]){if(!t[s]){varc=typeofrequire=="function"&&require;if(!l&&c)returnc(s,!0);if(r)returnr(s,!0);vara=newError("Cannot find module '"+s+"'");throwa.code="MODULE_NOT_FOUND",a}varh=n[s]={exports:{}};t[s][0].call(h.exports,function(e){varn=t[s][1][e];returni(n?n:e)},h,h.exports,e,t,n,o)}returnn[s].exports}varr=typeofrequire=="function"&&require;for(vars=0;s<o.length;s++)i(o[s]);returni})({1:[function(e,t,n){(function(){vart,o,i,r,s,l;l=e("./protocol"),r=l.Parser,o=l.PROTOCOL_6,i=l.PROTOCOL_7;s="2.2.2";n.Connector=t=function(){functione(e,t,n,o){this.options=e;this.WebSocket=t;this.Timer=n;this.handlers=o;this._uri="ws"+(this.options.https?"s":"")+"://"+this.options.host+":"+this.options.port+"/livereload";this._nextDelay=this.options.mindelay;this._connectionDesired=false;this.protocol=0;this.protocolParser=newr({connected:function(e){returnfunction(t){e.protocol=t;e._handshakeTimeout.stop();e._nextDelay=e.options.mindelay;e._disconnectionReason="broken";returne.handlers.connected(t)}}(this),error:function(e){returnfunction(t){e.handlers.error(t);returne._closeOnError()}}(this),message:function(e){returnfunction(t){returne.handlers.message(t)}}(this)});this._handshakeTimeout=newn(function(e){returnfunction(){if(!e._isSocketConnected()){return}e._disconnectionReason="handshake-timeout";returne.socket.close()}}(this));this._reconnectTimer=newn(function(e){returnfunction(){if(!e._connectionDesired){return}returne.connect()}}(this));this.connect()}e.prototype._isSocketConnected=function(){returnthis.socket&&this.socket.readyState===this.WebSocket.OPEN};e.prototype.connect=function(){this._connectionDesired=true;if(this._isSocketConnected()){return}this._reconnectTimer.stop();this._disconnectionReason="cannot-connect";this.protocolParser.reset();this.handlers.connecting();this.socket=newthis.WebSocket(this._uri);this.socket.onopen=function(e){returnfunction(t){returne._onopen(t)}}(this);this.socket.onclose=function(e){returnfunction(t){returne._onclose(t)}}(this);this.socket.onmessage=function(e){returnfunction(t){returne._onmessage(t)}}(this);returnthis.socket.onerror=function(e){returnfunction(t){returne._onerror(t)}}(this)};e.prototype.disconnect=function(){this._connectionDesired=false;this._reconnectTimer.stop();if(!this._isSocketConnected()){return}this._disconnectionReason="manual";returnthis.socket.close()};e.prototype._scheduleReconnection=function(){if(!this._connectionDesired){return}if(!this._reconnectTimer.running){this._reconnectTimer.start(this._nextDelay);returnthis._nextDelay=Math.min(this.options.maxdelay,this._nextDelay*2)}};e.prototype.sendCommand=function(e){if(this.protocol==null){return}returnthis._sendCommand(e)};e.prototype._sendCommand=function(e){returnthis.socket.send(JSON.stringify(e))};e.prototype._closeOnError=function(){this._handshakeTimeout.stop();this._disconnectionReason="error";returnthis.socket.close()};e.prototype._onopen=function(e){vart;this.handlers.socketConnected();this._disconnectionReason="handshake-failed";t={command:"hello",protocols:[o,i]};t.ver=s;if(this.options.ext){t.ext=this.options.ext}if(this.options.extver){t.extver=this.options.extver}if(this.options.snipver){t.snipver=this.options.snipver}this._sendCommand(t);returnthis._handshakeTimeout.start(this.options.handshake_timeout)};e.prototype._onclose=function(e){this.protocol=0;this.handlers.disconnected(this._disconnectionReason,this._nextDelay);returnthis._scheduleReconnection()};e.prototype._onerror=function(e){};e.prototype._onmessage=function(e){returnthis.protocolParser.process(e.data)};returne}()}).call(this)},{"./protocol":6}],2:[function(e,t,n){(function(){vare;e={bind:function(e,t,n){if(e.addEventListener){returne.addEventListener(t,n,false)}elseif(e.attachEvent){e[t]=1;returne.attachEvent("onpropertychange",function(e){if(e.propertyName===t){returnn()}})}else{thrownewError("Attempt to attach custom event "+t+" to something which isn't a DOMElement")}},fire:function(e,t){varn;if(e.addEventList