function demo(){
  var $wnd_0 = window, $doc_0 = document, $stats = $wnd_0.__gwtStatsEvent?function(a){
    return $wnd_0.__gwtStatsEvent(a);
  }
  :null, scriptsDone, loadDone, bodyDone, base = '', metaProps = {}, values = [], providers = [], answers = [], onLoadErrorFunc, propertyErrorFunc;
  $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'begin'});
  if (!$wnd_0.__gwt_stylesLoaded) {
    $wnd_0.__gwt_stylesLoaded = {};
  }
  if (!$wnd_0.__gwt_scriptsLoaded) {
    $wnd_0.__gwt_scriptsLoaded = {};
  }
  function isHostedMode(){
    var result = false;
    try {
      var query = $wnd_0.location.search;
      return (query.indexOf('gwt.codesvr=') != -1 || (query.indexOf('gwt.hosted=') != -1 || $wnd_0.external && $wnd_0.external.gwtOnLoad)) && query.indexOf('gwt.hybrid') == -1;
    }
     catch (e) {
    }
    isHostedMode = function(){
      return result;
    }
    ;
    return result;
  }

  function maybeStartModule(){
    if (scriptsDone && loadDone) {
      var iframe = $doc_0.getElementById('demo');
      var frameWnd = iframe.contentWindow;
      if (isHostedMode()) {
        frameWnd.__gwt_getProperty = function(name_0){
          return computePropValue(name_0);
        }
        ;
      }
      demo = null;
      frameWnd.gwtOnLoad(onLoadErrorFunc, 'demo', base);
      $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date).getTime(), type:'end'});
    }
  }

  function computeScriptBase(){
    var thisScript, markerId = '__gwt_marker_demo', markerScript;
    $doc_0.write('<script id="' + markerId + '"><\/script>');
    markerScript = $doc_0.getElementById(markerId);
    thisScript = markerScript && markerScript.previousSibling;
    while (thisScript && thisScript.tagName != 'SCRIPT') {
      thisScript = thisScript.previousSibling;
    }
    function getDirectoryOfFile(path){
      var hashIndex = path.lastIndexOf('#');
      if (hashIndex == -1) {
        hashIndex = path.length;
      }
      var queryIndex = path.indexOf('?');
      if (queryIndex == -1) {
        queryIndex = path.length;
      }
      var slashIndex = path.lastIndexOf('/', Math.min(queryIndex, hashIndex));
      return slashIndex >= 0?path.substring(0, slashIndex + 1):'';
    }

    ;
    if (thisScript && thisScript.src) {
      base = getDirectoryOfFile(thisScript.src);
    }
    if (base == '') {
      var baseElements = $doc_0.getElementsByTagName('base');
      if (baseElements.length > 0) {
        base = baseElements[baseElements.length - 1].href;
      }
       else {
        base = getDirectoryOfFile($doc_0.location.href);
      }
    }
     else if (base.match(/^\w+:\/\//)) {
    }
     else {
      var img = $doc_0.createElement('img');
      img.src = base + 'clear.cache.gif';
      base = getDirectoryOfFile(img.src);
    }
    if (markerScript) {
      markerScript.parentNode.removeChild(markerScript);
    }
  }

  function processMetas(){
    var metas = document.getElementsByTagName('meta');
    for (var i_0 = 0, n = metas.length; i_0 < n; ++i_0) {
      var meta = metas[i_0], name_0 = meta.getAttribute('name'), content;
      if (name_0) {
        if (name_0 == 'gwt:property') {
          content = meta.getAttribute('content');
          if (content) {
            var value, eq = content.indexOf('=');
            if (eq >= 0) {
              name_0 = content.substring(0, eq);
              value = content.substring(eq + 1);
            }
             else {
              name_0 = content;
              value = '';
            }
            metaProps[name_0] = value;
          }
        }
         else if (name_0 == 'gwt:onPropertyErrorFn') {
          content = meta.getAttribute('content');
          if (content) {
            try {
              propertyErrorFunc = eval(content);
            }
             catch (e) {
              alert('Bad handler "' + content + '" for "gwt:onPropertyErrorFn"');
            }
          }
        }
         else if (name_0 == 'gwt:onLoadErrorFn') {
          content = meta.getAttribute('content');
          if (content) {
            try {
              onLoadErrorFunc = eval(content);
            }
             catch (e) {
              alert('Bad handler "' + content + '" for "gwt:onLoadErrorFn"');
            }
          }
        }
      }
    }
  }

  function __gwt_isKnownPropertyValue(propName, propValue){
    return propValue in values[propName];
  }

  function __gwt_getMetaProperty(name_0){
    var value = metaProps[name_0];
    return value == null?null:value;
  }

  function unflattenKeylistIntoAnswers(propValArray, value){
    var answer = answers;
    for (var i_0 = 0, n = propValArray.length - 1; i_0 < n; ++i_0) {
      answer = answer[propValArray[i_0]] || (answer[propValArray[i_0]] = []);
    }
    answer[propValArray[n]] = value;
  }

  function computePropValue(propName){
    var value = providers[propName](), allowedValuesMap = values[propName];
    if (value in allowedValuesMap) {
      return value;
    }
    var allowedValuesList = [];
    for (var k in allowedValuesMap) {
      allowedValuesList[allowedValuesMap[k]] = k;
    }
    if (propertyErrorFunc) {
      propertyErrorFunc(propName, allowedValuesList, value);
    }
    throw null;
  }

  var frameInjected;
  function maybeInjectFrame(){
    if (!frameInjected) {
      frameInjected = true;
      var iframe = $doc_0.createElement('iframe');
      iframe.src = "javascript:''";
      iframe.id = 'demo';
      iframe.style.cssText = 'position:absolute;width:0;height:0;border:none';
      iframe.tabIndex = -1;
      $doc_0.body.appendChild(iframe);
      $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date).getTime(), type:'moduleRequested'});
      iframe.contentWindow.location.replace(base + initialHtml);
    }
  }

  providers['log_level'] = function(){
    var log_level;
    if (log_level == null) {
      var regex = new RegExp('[\\?&]log_level=([^&#]*)');
      var results = regex.exec(location.search);
      if (results != null) {
        log_level = results[1];
      }
    }
    if (log_level == null) {
      log_level = __gwt_getMetaProperty('log_level');
    }
    if (!__gwt_isKnownPropertyValue('log_level', log_level)) {
      var levels = ['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL', 'OFF'];
      var possibleLevel = null;
      var foundRequestedLevel = false;
      for (i in levels) {
        foundRequestedLevel |= log_level == levels[i];
        if (__gwt_isKnownPropertyValue('log_level', levels[i])) {
          possibleLevel = levels[i];
        }
        if (i == levels.length - 1 || foundRequestedLevel && possibleLevel != null) {
          log_level = possibleLevel;
          break;
        }
      }
    }
    return log_level;
  }
  ;
  values['log_level'] = {DEBUG:0, ERROR:1, FATAL:2, INFO:3, OFF:4, TRACE:5, WARN:6};
  providers['user.agent'] = function(){
    var ua = navigator.userAgent.toLowerCase();
    var makeVersion = function(result){
      return parseInt(result[1]) * 1000 + parseInt(result[2]);
    }
    ;
    if (ua.indexOf('opera') != -1) {
      return 'opera';
    }
     else if (ua.indexOf('webkit') != -1) {
      return 'safari';
    }
     else if (ua.indexOf('msie') != -1) {
      if (document.documentMode >= 8) {
        return 'ie8';
      }
       else {
        var result_0 = /msie ([0-9]+)\.([0-9]+)/.exec(ua);
        if (result_0 && result_0.length == 3) {
          var v = makeVersion(result_0);
          if (v >= 6000) {
            return 'ie6';
          }
        }
      }
    }
     else if (ua.indexOf('gecko') != -1) {
      var result_0 = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
      if (result_0 && result_0.length == 3) {
        if (makeVersion(result_0) >= 1008)
          return 'gecko1_8';
      }
      return 'gecko';
    }
    return 'unknown';
  }
  ;
  values['user.agent'] = {gecko:0, gecko1_8:1, ie6:2, ie8:3, opera:4, safari:5};
  demo.onScriptLoad = function(){
    if (frameInjected) {
      loadDone = true;
      maybeStartModule();
    }
  }
  ;
  demo.onInjectionDone = function(){
    scriptsDone = true;
    $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'loadExternalRefs', millis:(new Date).getTime(), type:'end'});
    maybeStartModule();
  }
  ;
  computeScriptBase();
  var strongName;
  var initialHtml;
  if (isHostedMode()) {
    if ($wnd_0.external && ($wnd_0.external.initModule && $wnd_0.external.initModule('demo'))) {
      $wnd_0.location.reload();
      return;
    }
    initialHtml = 'hosted.html?demo';
    strongName = '';
  }
  processMetas();
  $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'});
  if (!isHostedMode()) {
    try {
      unflattenKeylistIntoAnswers(['OFF', 'ie6'], '0229BCE421D423423BD1F8EFBA48D9A9');
      unflattenKeylistIntoAnswers(['OFF', 'gecko1_8'], '0297445EBE3FD5F2D401DFBCA82AC9F3');
      unflattenKeylistIntoAnswers(['WARN', 'gecko'], '0B4494AD5E95B9B0DA364A8D4B18B9AE');
      unflattenKeylistIntoAnswers(['INFO', 'gecko'], '0E4DD70A56FCC78280BDC3BF372873A4');
      unflattenKeylistIntoAnswers(['ERROR', 'ie6'], '0ECD1D427EDE826F3DE03745ACF6E3A4');
      unflattenKeylistIntoAnswers(['TRACE', 'opera'], '0FC36413CAC46FC9D5CF4076339E6987');
      unflattenKeylistIntoAnswers(['DEBUG', 'ie8'], '14D898EF5E33C1D5E61CB23C0EEAA3F2');
      unflattenKeylistIntoAnswers(['DEBUG', 'opera'], '1E1698B328FE839D236792320224B1C9');
      unflattenKeylistIntoAnswers(['ERROR', 'opera'], '25956E02948F4C685FC31F6DD830A770');
      unflattenKeylistIntoAnswers(['TRACE', 'ie8'], '2B6A74581B01DBFD66F724347C7E7782');
      unflattenKeylistIntoAnswers(['INFO', 'ie6'], '3B223FC28DDE51284ED7E3C2D3BD87CA');
      unflattenKeylistIntoAnswers(['WARN', 'gecko1_8'], '3D8A3D99B99AF8C86ACB23F29A06EFEB');
      unflattenKeylistIntoAnswers(['INFO', 'opera'], '432D1344CA662A9CD4F512205A22E20B');
      unflattenKeylistIntoAnswers(['FATAL', 'safari'], '4E6197965EE3B57868B0A015985951AB');
      unflattenKeylistIntoAnswers(['INFO', 'safari'], '575E23B53CD761B68CAD01F4B9F2207A');
      unflattenKeylistIntoAnswers(['ERROR', 'ie8'], '5A49862D2EEF6956C179408EF7D04F59');
      unflattenKeylistIntoAnswers(['FATAL', 'opera'], '5F2940CD4846EE90DE3F72BE6CF832A6');
      unflattenKeylistIntoAnswers(['TRACE', 'gecko'], '6717D95ED1B3C5EB37E3FE9CBE39981E');
      unflattenKeylistIntoAnswers(['ERROR', 'gecko'], '7494DF16B06995C822F25455633B7AA9');
      unflattenKeylistIntoAnswers(['DEBUG', 'ie6'], '7B1C569369F6D0D92E1807FD2A33E387');
      unflattenKeylistIntoAnswers(['ERROR', 'gecko1_8'], '85AEF9E64525CFEC2111B8F44915C005');
      unflattenKeylistIntoAnswers(['DEBUG', 'safari'], '87FF7E8C9050DD8AF2BE40AD5AC700A5');
      unflattenKeylistIntoAnswers(['DEBUG', 'gecko'], '887A9C255E447A46B26E53C9DB325420');
      unflattenKeylistIntoAnswers(['WARN', 'safari'], '8ACC89446BF76BD803E4251F2DE2521A');
      unflattenKeylistIntoAnswers(['DEBUG', 'gecko1_8'], '966F994CE2CE4455642031217F91A91F');
      unflattenKeylistIntoAnswers(['TRACE', 'ie6'], '9DDF22CC3FFF2FB17701662DF3519C54');
      unflattenKeylistIntoAnswers(['OFF', 'ie8'], 'A4DF75A8087FCE04BBBFD038620FFEBE');
      unflattenKeylistIntoAnswers(['WARN', 'ie6'], 'A8A3EE023F78D8E2A718DBB0A03858AA');
      unflattenKeylistIntoAnswers(['FATAL', 'ie6'], 'A8E1ADE8C6C4C11C9EC75915B46E4309');
      unflattenKeylistIntoAnswers(['WARN', 'ie8'], 'AED35E328DCDDAF36E4814ECB789F91A');
      unflattenKeylistIntoAnswers(['OFF', 'opera'], 'AFE63FBB5863F97CD14AB89AB5FCC6FD');
      unflattenKeylistIntoAnswers(['INFO', 'ie8'], 'B1CEF91AA1CB8A1E031DCDD940D68E5C');
      unflattenKeylistIntoAnswers(['FATAL', 'gecko'], 'BBC57DAD6BF219ED7652F58B0F0E7157');
      unflattenKeylistIntoAnswers(['INFO', 'gecko1_8'], 'BED582FC95385B21EB84DC5CEFBE2855');
      unflattenKeylistIntoAnswers(['TRACE', 'safari'], 'BFCAA19BF7CB796F096294EDAA511BB5');
      unflattenKeylistIntoAnswers(['TRACE', 'gecko1_8'], 'C5276CF2551C957B06BED12F8EAD9E62');
      unflattenKeylistIntoAnswers(['OFF', 'safari'], 'D8A98B2015C0B550A0D50298BDB37C45');
      unflattenKeylistIntoAnswers(['FATAL', 'ie8'], 'E11C20C8B44CBEEF5DF417FF342DCAE8');
      unflattenKeylistIntoAnswers(['ERROR', 'safari'], 'E37052BED10CC0EE28041D8D44BCD57B');
      unflattenKeylistIntoAnswers(['WARN', 'opera'], 'E73E7B24B4513DB6CDB1D9694654CC4E');
      unflattenKeylistIntoAnswers(['FATAL', 'gecko1_8'], 'F89EE851A820C020FA7C536499C4DEEE');
      unflattenKeylistIntoAnswers(['OFF', 'gecko'], 'F8B034A77ED6AF620654BC29B2C174D7');
      strongName = answers[computePropValue('log_level')][computePropValue('user.agent')];
      initialHtml = strongName + '.cache.html';
    }
     catch (e) {
      return;
    }
  }
  var onBodyDoneTimerId;
  function onBodyDone(){
    if (!bodyDone) {
      bodyDone = true;
      maybeStartModule();
      if ($doc_0.removeEventListener) {
        $doc_0.removeEventListener('DOMContentLoaded', onBodyDone, false);
      }
      if (onBodyDoneTimerId) {
        clearInterval(onBodyDoneTimerId);
      }
    }
  }

  if ($doc_0.addEventListener) {
    $doc_0.addEventListener('DOMContentLoaded', function(){
      maybeInjectFrame();
      onBodyDone();
    }
    , false);
  }
  var onBodyDoneTimerId = setInterval(function(){
    if (/loaded|complete/.test($doc_0.readyState)) {
      maybeInjectFrame();
      onBodyDone();
    }
  }
  , 50);
  $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'end'});
  $stats && $stats({moduleName:'demo', subSystem:'startup', evtGroup:'loadExternalRefs', millis:(new Date).getTime(), type:'begin'});
  $doc_0.write('<script defer="defer">demo.onInjectionDone(\'demo\')<\/script>');
}

demo();
