diff --git a/src/visualizers/widgets/TrainKeras/TrainDashboard.svelte b/src/visualizers/widgets/TrainKeras/TrainDashboard.svelte
index 3828659f0..4534d55c6 100644
--- a/src/visualizers/widgets/TrainKeras/TrainDashboard.svelte
+++ b/src/visualizers/widgets/TrainKeras/TrainDashboard.svelte
@@ -20,6 +20,7 @@
   let eventElement;
 
   function decorateSchemas(schemas) {
+    let index = 1;
     schemas.losses.concat(schemas.optimizers).forEach(fn => {
       fn.arguments = fn.arguments
         .filter(arg => arg.name !== 'name')
@@ -31,10 +32,13 @@
             arg.type = typeof(arg.default);
           }
           arg.value = arg.default;
-          if (arg.type === 'boolean') {
-              console.warn('Unsupported argument:', arg);
-          }
+          arg.id = `arg${index++}`;
           return arg;
+        })
+        .sort((arg1, arg2) => {
+          const [num1, num2] = [arg1, arg2]
+            .map(arg => arg.type === 'boolean' ? 1 : 0)
+          return num1 - num2;
         });
     });
   }
@@ -252,18 +256,21 @@
           {#each loss.arguments as arg}
             <div class="form-group">
               {#if arg.type === 'string'}
-                <label for="{arg.name}">{arg.name}</label>
-                <input id="{arg.name}" bind:value={arg.value} type="text"/>
+                <label for="{arg.id}">{arg.name}</label>
+                <input id="{arg.id}" bind:value={arg.value} type="text"/>
+              {:else if arg.type === 'boolean'}
+                <input id="{arg.id}" bind:checked={arg.value} type="checkbox"/>
+                <label for="{arg.id}">{arg.name}</label>
               {:else if arg.type === 'enum'}
-                <label for="{arg.name}">{arg.name}</label>
-                <select id="{arg.name}" bind:value={arg.value}>
+                <label for="{arg.id}">{arg.name}</label>
+                <select id="{arg.id}" bind:value={arg.value}>
                   {#each arg.options as option}
                     <option value={option}>{option}</option>
                   {/each}
                 </select>
               {:else}
-                <label for="{arg.name}">{arg.name}</label>
-                <input id="{arg.name}" bind:value={arg.value} type="number"/>
+                <label for="{arg.id}">{arg.name}</label>
+                <input id="{arg.id}" bind:value={arg.value} type="number"/>
               {/if}
             </div>
           {/each}
@@ -281,11 +288,14 @@
           {#each optimizer.arguments as arg}
             <div class="form-group">
               {#if arg.type === 'string'}
-                <label for="{arg.name}">{arg.name}</label>
-                <input id="{arg.name}" bind:value={arg.value} type="text"/>
+                <label for="{arg.id}">{arg.name}</label>
+                <input id="{arg.id}" bind:value={arg.value} type="text"/>
+              {:else if arg.type === 'boolean'}
+                <input id="{arg.id}" bind:checked={arg.value} type="checkbox"/>
+                <label for="{arg.id}">{arg.name}</label>
               {:else}
-                <label for="{arg.name}">{arg.name}</label>
-                <input id="{arg.name}" bind:value={arg.value} type="number"/>
+                <label for="{arg.id}">{arg.name}</label>
+                <input id="{arg.id}" bind:value={arg.value} type="number"/>
               {/if}
             </div>
           {/each}
diff --git a/src/visualizers/widgets/TrainKeras/build/TrainDashboard.css.map b/src/visualizers/widgets/TrainKeras/build/TrainDashboard.css.map
index 0e64b4902..881eeaaa0 100644
--- a/src/visualizers/widgets/TrainKeras/build/TrainDashboard.css.map
+++ b/src/visualizers/widgets/TrainKeras/build/TrainDashboard.css.map
@@ -5,8 +5,8 @@
     "../../../../../TrainDashboard.svelte"
   ],
   "sourcesContent": [
-    "<script>\n  const EMPTY_FN_SCHEMA = {name: '', arguments: []};\n  let startTrainLabel = 'Train';\n  let Plotly = null;\n\tlet batchSize = 32;\n\tlet epochs = 50;\n\tlet validation = 0.1;\n  let optimizer = EMPTY_FN_SCHEMA;\n  let optimizers = [];\n  let loss = EMPTY_FN_SCHEMA;\n  let categorizedLosses = [];\n  let architectures = [];\n  let architecture;\n  let artifacts = [];\n  let dataset;\n  let models = [];\n  let displayedModel;\n  let accuracyPlot;\n  $: plotData = displayedModel && displayedModel.plotData;\n  let eventElement;\n\n  function decorateSchemas(schemas) {\n    schemas.losses.concat(schemas.optimizers).forEach(fn => {\n      fn.arguments = fn.arguments\n        .filter(arg => arg.name !== 'name')\n        .map(arg => {\n          if (arg.name.includes('reduction')) {\n            arg.type = 'enum';\n            arg.options = schemas.reductions;\n          } else {\n            arg.type = typeof(arg.default);\n          }\n          arg.value = arg.default;\n          if (arg.type === 'boolean') {\n              console.warn('Unsupported argument:', arg);\n          }\n          return arg;\n        });\n    });\n  }\n\n  export function initialize(plotly, schemas) {\n    decorateSchemas(schemas);\n    optimizers = schemas.optimizers;\n    optimizer = optimizers[0];\n    const lossesByCategory = {};\n    schemas.losses.forEach(loss => {\n      if (!lossesByCategory[loss.category]) {\n        lossesByCategory[loss.category] = [];\n      }\n      lossesByCategory[loss.category].push(loss);\n    });\n\n    categorizedLosses = Object.entries(lossesByCategory);\n    loss = schemas.losses[0];\n    Plotly = plotly;\n    Plotly.newPlot(accuracyPlot);\n  }\n\n  function onTrainClicked() {\n    const event = new CustomEvent('onTrainClicked');\n    eventElement.dispatchEvent(event);\n  }\n\n  function showLossInfo() {\n    const category = loss.category.toLowerCase().replace(/ /g, '_');\n    const name = `${loss.name.toLowerCase()}-class`;\n    const url = `https://keras.io/api/losses/${category}/#${name}/`;\n    window.open(url, '_blank');\n  }\n\n  function showModelInfo(model) {\n    const event = new CustomEvent('showModelInfo', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function showOptimInfo() {\n    const url = `https://keras.io/api/optimizers/${optimizer.name.toLowerCase()}/`;\n    window.open(url, '_blank');\n  }\n\n  export function addModel(model) {\n    models = models.concat(model);\n    if (!displayedModel) {\n      displayedModel = model;\n    }\n  }\n\n  export function events() {\n      return eventElement;\n  }\n\n  function saveModel(model) {\n    const event = new CustomEvent('saveModel', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function setDisplayedModel(newModel) {\n    displayedModel = newModel;\n\n    if (displayedModel.config) {\n      architecture = displayedModel.config.architecture;\n      dataset = displayedModel.config.dataset;\n      batchSize = displayedModel.config.batchSize;\n      validation = displayedModel.config.validation;\n      optimizer = displayedModel.config.optimizer;\n      epochs = displayedModel.config.epochs;\n      loss = displayedModel.config.loss;\n    }\n    if (Plotly) {\n      Plotly.react(accuracyPlot, displayedModel.plotData);\n    }\n  }\n\n  export function setModelState(modelID, state, info) {\n    const model = models.find(model => model.id === modelID);\n    model.state = state;\n    model.info = info;\n    models = models;\n\n    const isTrainingComplete = !state;\n    if (isTrainingComplete) {\n      startTrainLabel = 'Train';\n    } else if (state.startsWith('Training')){\n      startTrainLabel = 'Restart';\n    }\n  }\n\n  export function setPlotData(modelID, newData) {\n    const model = models.find(model => model.id === modelID);\n    model.plotData = newData;\n    if (model === displayedModel) {\n      setDisplayedModel(model);\n    }\n  }\n\n  export function addArtifact(arch) {\n    artifacts = artifacts.concat(arch);\n    if (!dataset) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function updateArtifact(desc) {\n    artifacts = artifacts.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArtifact(id) {\n    artifacts = artifacts.filter(arch => arch.id !== id);\n    if (dataset && dataset.id === id) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function addArchitecture(arch) {\n    architectures = architectures.concat(arch);\n    if (!architecture) {\n      architecture = architectures[0];\n    }\n  }\n\n  export function updateArchitecture(desc) {\n    architectures = architectures.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArchitecture(id) {\n    architectures = architectures.filter(arch => arch.id !== id);\n    if (architecture && architecture.id === id) {\n      architecture = architectures[0];\n    }\n  }\n\n  function set(info) {\n    loss = info.loss || loss;\n    optimizer = info.optimizer || optimizer;\n    architectures = info.architectures || architectures;\n  }\n\n  export function data() {\n    return {\n      architecture,\n      dataset,\n      batchSize,\n      validation,\n      optimizer,\n      epochs,\n      loss,\n    };\n  }\n</script>\n\n<main bind:this={eventElement}>\n  <div class=\"row\">\n    <div class=\"col-xs-12 col-sm-12 col-md-4 col-lg-3\">\n      <h3>Training Parameters</h3>\n      <div class=\"well\" style=\"padding-top: 5px\">\n        <form>\n          <h5 style=\"text-align: left\">General</h5>\n          <div class=\"form-group\">\n            <label for=\"dataset\">Training Data: </label>\n            <select id=\"dataset\" bind:value={dataset}>\n              {#each artifacts as data}\n                <option value={data}>{data.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"arch\">Architecture: </label>\n            <select id=\"arch\" bind:value={architecture}>\n              {#each architectures as arch}\n                <option value={arch}>{arch.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"batchSize\">Batch Size</label>\n            <input id=\"batchSize\" bind:value={batchSize} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"epochs\">Epochs</label>\n            <input id=\"epochs\" bind:value={epochs} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"validation\">Validation Split</label>\n            <input id=\"validation\" bind:value={validation} type=\"number\"/>\n          </div>\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Loss</h5>\n          <div class=\"form-group\">\n            <label for=\"loss\">Loss Function: </label>\n            <select id=\"loss\" bind:value={loss}>\n              {#each categorizedLosses as cat}\n                <optgroup label={cat[0]}>\n                {#each cat[1] as lf}\n                  <option value={lf}>{lf.name}</option>\n                {/each}\n                </optgroup>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showLossInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each loss.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"text\"/>\n              {:else if arg.type === 'enum'}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <select id=\"{arg.name}\" bind:value={arg.value}>\n                  {#each arg.options as option}\n                    <option value={option}>{option}</option>\n                  {/each}\n                </select>\n              {:else}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Optimization</h5>\n          <div class=\"form-group\">\n            <label for=\"optimizer\">Optimizer: </label>\n            <select id=\"optimizer\" bind:value={optimizer}>\n              {#each optimizers as optim}\n                <option value={optim}>{optim.name}</option>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showOptimInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each optimizer.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"text\"/>\n              {:else}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n        </form>\n        <button on:click|preventDefault|stopPropagation={onTrainClicked} type=\"button\" class=\"btn btn-{startTrainLabel === 'Train' ? 'primary' : 'warning'}\">{startTrainLabel}</button>\n      </div>\n    </div>\n    <div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-6 plot-container\" bind:this={accuracyPlot}></div>\n    <div class=\"col-xs-12 col-sm-12 col-md-2 col-lg-2\">\n      <h4>Trained Models</h4>\n      <div class=\"list-group\">\n          {#if models.length > 0}\n            {#each models as model}\n              <div on:click|preventDefault|stopPropagation={() => setDisplayedModel(model)}\n                class=\"list-group-item {displayedModel === model ? 'active' : ''}\"\n              >\n                <span\n                  contenteditable=true\n                  bind:innerHTML={model.name}\n                  style=\"cursor: text;\"></span>\n                {#if model.state}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => showModelInfo(model)}\n                    class=\"pull-right\" style=\"color: #888; font-style: italic;\"> {model.state[0].toUpperCase() + model.state.substring(1)}</span>\n                {:else}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => saveModel(model)}\n                    class=\"glyphicon glyphicon-floppy-disk pull-right\" aria-hidden=\"true\"\n                  ></span>\n                {/if}\n              </div>\n            {/each}\n          {:else}\n            <div class=\"list-group-item\" style=\"font-style: italic; color: #888\">No Trained Models</div>\n          {/if}\n      <div>\n    </div>\n  </div>\n</main>\n\n<style>\n  main {\n    text-align: center;\n    padding: 1em;\n    max-width: 240px;\n    margin: 0 auto;\n  }\n\n  @media (min-width: 640px) {\n    main {\n      max-width: none;\n    }\n  }\n\n  .row {\n    display: flex;\n    flex-flow: row wrap;\n    justify-content: space-around;\n  }\n\n  .config-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n\n  .output-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n</style>\n"
+    "<script>\n  const EMPTY_FN_SCHEMA = {name: '', arguments: []};\n  let startTrainLabel = 'Train';\n  let Plotly = null;\n\tlet batchSize = 32;\n\tlet epochs = 50;\n\tlet validation = 0.1;\n  let optimizer = EMPTY_FN_SCHEMA;\n  let optimizers = [];\n  let loss = EMPTY_FN_SCHEMA;\n  let categorizedLosses = [];\n  let architectures = [];\n  let architecture;\n  let artifacts = [];\n  let dataset;\n  let models = [];\n  let displayedModel;\n  let accuracyPlot;\n  $: plotData = displayedModel && displayedModel.plotData;\n  let eventElement;\n\n  function decorateSchemas(schemas) {\n    let index = 1;\n    schemas.losses.concat(schemas.optimizers).forEach(fn => {\n      fn.arguments = fn.arguments\n        .filter(arg => arg.name !== 'name')\n        .map(arg => {\n          if (arg.name.includes('reduction')) {\n            arg.type = 'enum';\n            arg.options = schemas.reductions;\n          } else {\n            arg.type = typeof(arg.default);\n          }\n          arg.value = arg.default;\n          arg.id = `arg${index++}`;\n          return arg;\n        })\n        .sort((arg1, arg2) => {\n          const [num1, num2] = [arg1, arg2]\n            .map(arg => arg.type === 'boolean' ? 1 : 0)\n          return num1 - num2;\n        });\n    });\n  }\n\n  export function initialize(plotly, schemas) {\n    decorateSchemas(schemas);\n    optimizers = schemas.optimizers;\n    optimizer = optimizers[0];\n    const lossesByCategory = {};\n    schemas.losses.forEach(loss => {\n      if (!lossesByCategory[loss.category]) {\n        lossesByCategory[loss.category] = [];\n      }\n      lossesByCategory[loss.category].push(loss);\n    });\n\n    categorizedLosses = Object.entries(lossesByCategory);\n    loss = schemas.losses[0];\n    Plotly = plotly;\n    Plotly.newPlot(accuracyPlot);\n  }\n\n  function onTrainClicked() {\n    const event = new CustomEvent('onTrainClicked');\n    eventElement.dispatchEvent(event);\n  }\n\n  function showLossInfo() {\n    const category = loss.category.toLowerCase().replace(/ /g, '_');\n    const name = `${loss.name.toLowerCase()}-class`;\n    const url = `https://keras.io/api/losses/${category}/#${name}/`;\n    window.open(url, '_blank');\n  }\n\n  function showModelInfo(model) {\n    const event = new CustomEvent('showModelInfo', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function showOptimInfo() {\n    const url = `https://keras.io/api/optimizers/${optimizer.name.toLowerCase()}/`;\n    window.open(url, '_blank');\n  }\n\n  export function addModel(model) {\n    models = models.concat(model);\n    if (!displayedModel) {\n      displayedModel = model;\n    }\n  }\n\n  export function events() {\n      return eventElement;\n  }\n\n  function saveModel(model) {\n    const event = new CustomEvent('saveModel', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function setDisplayedModel(newModel) {\n    displayedModel = newModel;\n\n    if (displayedModel.config) {\n      architecture = displayedModel.config.architecture;\n      dataset = displayedModel.config.dataset;\n      batchSize = displayedModel.config.batchSize;\n      validation = displayedModel.config.validation;\n      optimizer = displayedModel.config.optimizer;\n      epochs = displayedModel.config.epochs;\n      loss = displayedModel.config.loss;\n    }\n    if (Plotly) {\n      Plotly.react(accuracyPlot, displayedModel.plotData);\n    }\n  }\n\n  export function setModelState(modelID, state, info) {\n    const model = models.find(model => model.id === modelID);\n    model.state = state;\n    model.info = info;\n    models = models;\n\n    const isTrainingComplete = !state;\n    if (isTrainingComplete) {\n      startTrainLabel = 'Train';\n    } else if (state.startsWith('Training')){\n      startTrainLabel = 'Restart';\n    }\n  }\n\n  export function setPlotData(modelID, newData) {\n    const model = models.find(model => model.id === modelID);\n    model.plotData = newData;\n    if (model === displayedModel) {\n      setDisplayedModel(model);\n    }\n  }\n\n  export function addArtifact(arch) {\n    artifacts = artifacts.concat(arch);\n    if (!dataset) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function updateArtifact(desc) {\n    artifacts = artifacts.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArtifact(id) {\n    artifacts = artifacts.filter(arch => arch.id !== id);\n    if (dataset && dataset.id === id) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function addArchitecture(arch) {\n    architectures = architectures.concat(arch);\n    if (!architecture) {\n      architecture = architectures[0];\n    }\n  }\n\n  export function updateArchitecture(desc) {\n    architectures = architectures.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArchitecture(id) {\n    architectures = architectures.filter(arch => arch.id !== id);\n    if (architecture && architecture.id === id) {\n      architecture = architectures[0];\n    }\n  }\n\n  function set(info) {\n    loss = info.loss || loss;\n    optimizer = info.optimizer || optimizer;\n    architectures = info.architectures || architectures;\n  }\n\n  export function data() {\n    return {\n      architecture,\n      dataset,\n      batchSize,\n      validation,\n      optimizer,\n      epochs,\n      loss,\n    };\n  }\n</script>\n\n<main bind:this={eventElement}>\n  <div class=\"row\">\n    <div class=\"col-xs-12 col-sm-12 col-md-4 col-lg-3\">\n      <h3>Training Parameters</h3>\n      <div class=\"well\" style=\"padding-top: 5px\">\n        <form>\n          <h5 style=\"text-align: left\">General</h5>\n          <div class=\"form-group\">\n            <label for=\"dataset\">Training Data: </label>\n            <select id=\"dataset\" bind:value={dataset}>\n              {#each artifacts as data}\n                <option value={data}>{data.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"arch\">Architecture: </label>\n            <select id=\"arch\" bind:value={architecture}>\n              {#each architectures as arch}\n                <option value={arch}>{arch.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"batchSize\">Batch Size</label>\n            <input id=\"batchSize\" bind:value={batchSize} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"epochs\">Epochs</label>\n            <input id=\"epochs\" bind:value={epochs} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"validation\">Validation Split</label>\n            <input id=\"validation\" bind:value={validation} type=\"number\"/>\n          </div>\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Loss</h5>\n          <div class=\"form-group\">\n            <label for=\"loss\">Loss Function: </label>\n            <select id=\"loss\" bind:value={loss}>\n              {#each categorizedLosses as cat}\n                <optgroup label={cat[0]}>\n                {#each cat[1] as lf}\n                  <option value={lf}>{lf.name}</option>\n                {/each}\n                </optgroup>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showLossInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each loss.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"text\"/>\n              {:else if arg.type === 'boolean'}\n                <input id=\"{arg.id}\" bind:checked={arg.value} type=\"checkbox\"/>\n                <label for=\"{arg.id}\">{arg.name}</label>\n              {:else if arg.type === 'enum'}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <select id=\"{arg.id}\" bind:value={arg.value}>\n                  {#each arg.options as option}\n                    <option value={option}>{option}</option>\n                  {/each}\n                </select>\n              {:else}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Optimization</h5>\n          <div class=\"form-group\">\n            <label for=\"optimizer\">Optimizer: </label>\n            <select id=\"optimizer\" bind:value={optimizer}>\n              {#each optimizers as optim}\n                <option value={optim}>{optim.name}</option>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showOptimInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each optimizer.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"text\"/>\n              {:else if arg.type === 'boolean'}\n                <input id=\"{arg.id}\" bind:checked={arg.value} type=\"checkbox\"/>\n                <label for=\"{arg.id}\">{arg.name}</label>\n              {:else}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n        </form>\n        <button on:click|preventDefault|stopPropagation={onTrainClicked} type=\"button\" class=\"btn btn-{startTrainLabel === 'Train' ? 'primary' : 'warning'}\">{startTrainLabel}</button>\n      </div>\n    </div>\n    <div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-6 plot-container\" bind:this={accuracyPlot}></div>\n    <div class=\"col-xs-12 col-sm-12 col-md-2 col-lg-2\">\n      <h4>Trained Models</h4>\n      <div class=\"list-group\">\n          {#if models.length > 0}\n            {#each models as model}\n              <div on:click|preventDefault|stopPropagation={() => setDisplayedModel(model)}\n                class=\"list-group-item {displayedModel === model ? 'active' : ''}\"\n              >\n                <span\n                  contenteditable=true\n                  bind:innerHTML={model.name}\n                  style=\"cursor: text;\"></span>\n                {#if model.state}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => showModelInfo(model)}\n                    class=\"pull-right\" style=\"color: #888; font-style: italic;\"> {model.state[0].toUpperCase() + model.state.substring(1)}</span>\n                {:else}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => saveModel(model)}\n                    class=\"glyphicon glyphicon-floppy-disk pull-right\" aria-hidden=\"true\"\n                  ></span>\n                {/if}\n              </div>\n            {/each}\n          {:else}\n            <div class=\"list-group-item\" style=\"font-style: italic; color: #888\">No Trained Models</div>\n          {/if}\n      <div>\n    </div>\n  </div>\n</main>\n\n<style>\n  main {\n    text-align: center;\n    padding: 1em;\n    max-width: 240px;\n    margin: 0 auto;\n  }\n\n  @media (min-width: 640px) {\n    main {\n      max-width: none;\n    }\n  }\n\n  .row {\n    display: flex;\n    flex-flow: row wrap;\n    justify-content: space-around;\n  }\n\n  .config-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n\n  .output-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n</style>\n"
   ],
   "names": [],
-  "mappings": "AAyUE,IAAI,eAAC,CAAC,AACJ,UAAU,CAAE,MAAM,CAClB,OAAO,CAAE,GAAG,CACZ,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,CAAC,CAAC,IAAI,AAChB,CAAC,AAED,MAAM,AAAC,YAAY,KAAK,CAAC,AAAC,CAAC,AACzB,IAAI,eAAC,CAAC,AACJ,SAAS,CAAE,IAAI,AACjB,CAAC,AACH,CAAC,AAED,IAAI,eAAC,CAAC,AACJ,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,GAAG,CAAC,IAAI,CACnB,eAAe,CAAE,YAAY,AAC/B,CAAC"
+  "mappings": "AAmVE,IAAI,eAAC,CAAC,AACJ,UAAU,CAAE,MAAM,CAClB,OAAO,CAAE,GAAG,CACZ,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,CAAC,CAAC,IAAI,AAChB,CAAC,AAED,MAAM,AAAC,YAAY,KAAK,CAAC,AAAC,CAAC,AACzB,IAAI,eAAC,CAAC,AACJ,SAAS,CAAE,IAAI,AACjB,CAAC,AACH,CAAC,AAED,IAAI,eAAC,CAAC,AACJ,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,GAAG,CAAC,IAAI,CACnB,eAAe,CAAE,YAAY,AAC/B,CAAC"
 }
\ No newline at end of file
diff --git a/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js b/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js
index 8a92941fb..9abddfbe4 100644
--- a/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js
+++ b/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js
@@ -1,2 +1,2 @@
-define((function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function l(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function r(t,e){t.appendChild(e)}function c(t,e,n){t.insertBefore(e,n||null)}function a(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function s(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function p(t,e,n,l){return t.addEventListener(e,n,l),()=>t.removeEventListener(e,n,l)}function h(t){return function(e){return e.preventDefault(),t.call(this,e)}}function m(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t){return""===t?void 0:+t}function $(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e){t.value=null==e?"":e}function b(t,e,n,l){t.style.setProperty(e,n,l?"important":"")}function y(t,e){for(let n=0;n<t.options.length;n+=1){const l=t.options[n];if(l.__value===e)return void(l.selected=!0)}}function x(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}let C;function w(t){C=t}const k=[],A=[],z=[],E=[],T=Promise.resolve();let M=!1;function L(t){z.push(t)}let S=!1;const D=new Set;function P(){if(!S){S=!0;do{for(let t=0;t<k.length;t+=1){const e=k[t];w(e),O(e.$$)}for(k.length=0;A.length;)A.pop()();for(let t=0;t<z.length;t+=1){const e=z[t];D.has(e)||(D.add(e),e())}z.length=0}while(k.length);for(;E.length;)E.pop()();M=!1,S=!1,D.clear()}}function O(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const N=new Set;function j(t,e){-1===t.$$.dirty[0]&&(k.push(t),M||(M=!0,T.then(P)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function H(i,r,c,u,s,f,d=[-1]){const p=C;w(i);const h=r.props||{},m=i.$$={fragment:null,ctx:null,props:f,update:t,not_equal:s,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:d,skip_bound:!1};let g=!1;if(m.ctx=c?c(i,h,(t,e,...n)=>{const l=n.length?n[0]:e;return m.ctx&&s(m.ctx[t],m.ctx[t]=l)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](l),g&&j(i,t)),e}):[],m.update(),g=!0,l(m.before_update),m.fragment=!!u&&u(m.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);m.fragment&&m.fragment.l(t),t.forEach(a)}else m.fragment&&m.fragment.c();r.intro&&((v=i.$$.fragment)&&v.i&&(N.delete(v),v.i($))),function(t,n,i){const{fragment:r,on_mount:c,on_destroy:a,after_update:u}=t.$$;r&&r.m(n,i),L(()=>{const n=c.map(e).filter(o);a?a.push(...n):l(n),t.$$.on_mount=[]}),u.forEach(L)}(i,r.target,r.anchor),P()}var v,$;w(p)}function U(t,e,n){const l=t.slice();return l[56]=e[n],l[57]=e,l[58]=n,l}function q(t,e,n){const l=t.slice();return l[59]=e[n],l[60]=e,l[61]=n,l}function B(t,e,n){const l=t.slice();return l[62]=e[n],l}function F(t,e,n){const l=t.slice();return l[67]=e[n],l}function G(t,e,n){const l=t.slice();return l[59]=e[n],l[65]=e,l[66]=n,l}function I(t,e,n){const l=t.slice();return l[73]=e[n],l}function R(t,e,n){const l=t.slice();return l[70]=e[n],l}function V(t,e,n){const l=t.slice();return l[76]=e[n],l}function W(t,e,n){const l=t.slice();return l[0]=e[n],l}function J(t){let e,n,l,o=t[0].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[0],e.value=e.__value},m(t,l){c(t,e,l),r(e,n)},p(t,i){2048&i[0]&&o!==(o=t[0].name+"")&&$(n,o),2048&i[0]&&l!==(l=t[0])&&(e.__value=l,e.value=e.__value)},d(t){t&&a(e)}}}function K(t){let e,n,l,o=t[76].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[76],e.value=e.__value},m(t,l){c(t,e,l),r(e,n)},p(t,i){512&i[0]&&o!==(o=t[76].name+"")&&$(n,o),512&i[0]&&l!==(l=t[76])&&(e.__value=l,e.value=e.__value)},d(t){t&&a(e)}}}function Q(t){let e,n,l,o=t[73].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[73],e.value=e.__value},m(t,l){c(t,e,l),r(e,n)},p(t,i){256&i[0]&&o!==(o=t[73].name+"")&&$(n,o),256&i[0]&&l!==(l=t[73])&&(e.__value=l,e.value=e.__value)},d(t){t&&a(e)}}}function X(t){let e,n,l=t[70][1],o=[];for(let e=0;e<l.length;e+=1)o[e]=Q(I(t,l,e));return{c(){e=s("optgroup");for(let t=0;t<o.length;t+=1)o[t].c();g(e,"label",n=t[70][0])},m(t,n){c(t,e,n);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,i){if(256&i[0]){let n;for(l=t[70][1],n=0;n<l.length;n+=1){const r=I(t,l,n);o[n]?o[n].p(r,i):(o[n]=Q(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=l.length}256&i[0]&&n!==(n=t[70][0])&&g(e,"label",n)},d(t){t&&a(e),u(o,t)}}}function Y(t){let e,n,l,o,i,u,h,m,b=t[59].name+"";function y(){t[42].call(i,t[65],t[66])}return{c(){e=s("label"),n=f(b),o=d(),i=s("input"),g(e,"for",l=t[59].name),g(i,"id",u=t[59].name),g(i,"type","number")},m(l,a){c(l,e,a),r(e,n),c(l,o,a),c(l,i,a),_(i,t[59].value),h||(m=p(i,"input",y),h=!0)},p(o,r){t=o,128&r[0]&&b!==(b=t[59].name+"")&&$(n,b),384&r[0]&&l!==(l=t[59].name)&&g(e,"for",l),384&r[0]&&u!==(u=t[59].name)&&g(i,"id",u),384&r[0]&&v(i.value)!==t[59].value&&_(i,t[59].value)},d(t){t&&a(e),t&&a(o),t&&a(i),h=!1,m()}}}function Z(t){let e,n,l,o,i,h,m,v,_=t[59].name+"",b=t[59].options,x=[];for(let e=0;e<b.length;e+=1)x[e]=et(F(t,b,e));function C(){t[41].call(i,t[65],t[66])}return{c(){e=s("label"),n=f(_),o=d(),i=s("select");for(let t=0;t<x.length;t+=1)x[t].c();g(e,"for",l=t[59].name),g(i,"id",h=t[59].name),void 0===t[59].value&&L(C)},m(l,a){c(l,e,a),r(e,n),c(l,o,a),c(l,i,a);for(let t=0;t<x.length;t+=1)x[t].m(i,null);y(i,t[59].value),m||(v=p(i,"change",C),m=!0)},p(o,r){if(t=o,128&r[0]&&_!==(_=t[59].name+"")&&$(n,_),384&r[0]&&l!==(l=t[59].name)&&g(e,"for",l),128&r[0]){let e;for(b=t[59].options,e=0;e<b.length;e+=1){const n=F(t,b,e);x[e]?x[e].p(n,r):(x[e]=et(n),x[e].c(),x[e].m(i,null))}for(;e<x.length;e+=1)x[e].d(1);x.length=b.length}384&r[0]&&h!==(h=t[59].name)&&g(i,"id",h),384&r[0]&&y(i,t[59].value)},d(t){t&&a(e),t&&a(o),t&&a(i),u(x,t),m=!1,v()}}}function tt(t){let e,n,l,o,i,u,h,m,v=t[59].name+"";function b(){t[40].call(i,t[65],t[66])}return{c(){e=s("label"),n=f(v),o=d(),i=s("input"),g(e,"for",l=t[59].name),g(i,"id",u=t[59].name),g(i,"type","text")},m(l,a){c(l,e,a),r(e,n),c(l,o,a),c(l,i,a),_(i,t[59].value),h||(m=p(i,"input",b),h=!0)},p(o,r){t=o,128&r[0]&&v!==(v=t[59].name+"")&&$(n,v),384&r[0]&&l!==(l=t[59].name)&&g(e,"for",l),384&r[0]&&u!==(u=t[59].name)&&g(i,"id",u),384&r[0]&&i.value!==t[59].value&&_(i,t[59].value)},d(t){t&&a(e),t&&a(o),t&&a(i),h=!1,m()}}}function et(t){let e,n,l,o=t[67]+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[67],e.value=e.__value},m(t,l){c(t,e,l),r(e,n)},p(t,i){128&i[0]&&o!==(o=t[67]+"")&&$(n,o),384&i[0]&&l!==(l=t[67])&&(e.__value=l,e.value=e.__value)},d(t){t&&a(e)}}}function nt(t){let e;function n(t,e){return"string"===t[59].type?tt:"enum"===t[59].type?Z:Y}let l=n(t),o=l(t);return{c(){e=s("div"),o.c(),g(e,"class","form-group")},m(t,n){c(t,e,n),o.m(e,null)},p(t,i){l===(l=n(t))&&o?o.p(t,i):(o.d(1),o=l(t),o&&(o.c(),o.m(e,null)))},d(t){t&&a(e),o.d()}}}function lt(t){let e,n,l,o=t[62].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[62],e.value=e.__value},m(t,l){c(t,e,l),r(e,n)},p(t,i){64&i[0]&&o!==(o=t[62].name+"")&&$(n,o),64&i[0]&&l!==(l=t[62])&&(e.__value=l,e.value=e.__value)},d(t){t&&a(e)}}}function ot(t){let e,n,l,o,i,u,h,m,b=t[59].name+"";function y(){t[45].call(i,t[60],t[61])}return{c(){e=s("label"),n=f(b),o=d(),i=s("input"),g(e,"for",l=t[59].name),g(i,"id",u=t[59].name),g(i,"type","number")},m(l,a){c(l,e,a),r(e,n),c(l,o,a),c(l,i,a),_(i,t[59].value),h||(m=p(i,"input",y),h=!0)},p(o,r){t=o,32&r[0]&&b!==(b=t[59].name+"")&&$(n,b),96&r[0]&&l!==(l=t[59].name)&&g(e,"for",l),96&r[0]&&u!==(u=t[59].name)&&g(i,"id",u),96&r[0]&&v(i.value)!==t[59].value&&_(i,t[59].value)},d(t){t&&a(e),t&&a(o),t&&a(i),h=!1,m()}}}function it(t){let e,n,l,o,i,u,h,m,v=t[59].name+"";function b(){t[44].call(i,t[60],t[61])}return{c(){e=s("label"),n=f(v),o=d(),i=s("input"),g(e,"for",l=t[59].name),g(i,"id",u=t[59].name),g(i,"type","text")},m(l,a){c(l,e,a),r(e,n),c(l,o,a),c(l,i,a),_(i,t[59].value),h||(m=p(i,"input",b),h=!0)},p(o,r){t=o,32&r[0]&&v!==(v=t[59].name+"")&&$(n,v),96&r[0]&&l!==(l=t[59].name)&&g(e,"for",l),96&r[0]&&u!==(u=t[59].name)&&g(i,"id",u),96&r[0]&&i.value!==t[59].value&&_(i,t[59].value)},d(t){t&&a(e),t&&a(o),t&&a(i),h=!1,m()}}}function rt(t){let e,n;function l(t,e){return"string"===t[59].type?it:ot}let o=l(t),i=o(t);return{c(){e=s("div"),i.c(),n=d(),g(e,"class","form-group")},m(t,l){c(t,e,l),i.m(e,null),r(e,n)},p(t,r){o===(o=l(t))&&i?i.p(t,r):(i.d(1),i=o(t),i&&(i.c(),i.m(e,n)))},d(t){t&&a(e),i.d()}}}function ct(e){let n;return{c(){n=s("div"),n.textContent="No Trained Models",g(n,"class","list-group-item"),b(n,"font-style","italic"),b(n,"color","#888")},m(t,e){c(t,n,e)},p:t,d(t){t&&a(n)}}}function at(t){let e,n=t[13],l=[];for(let e=0;e<n.length;e+=1)l[e]=ft(U(t,n,e));return{c(){for(let t=0;t<l.length;t+=1)l[t].c();e=f("")},m(t,n){for(let e=0;e<l.length;e+=1)l[e].m(t,n);c(t,e,n)},p(t,o){if(6840320&o[0]){let i;for(n=t[13],i=0;i<n.length;i+=1){const r=U(t,n,i);l[i]?l[i].p(r,o):(l[i]=ft(r),l[i].c(),l[i].m(e.parentNode,e))}for(;i<l.length;i+=1)l[i].d(1);l.length=n.length}},d(t){u(l,t),t&&a(e)}}}function ut(t){let e,n,l;function o(...e){return t[49](t[56],...e)}return{c(){e=s("span"),g(e,"class","glyphicon glyphicon-floppy-disk pull-right"),g(e,"aria-hidden","true")},m(t,i){c(t,e,i),n||(l=p(e,"click",m(h(o))),n=!0)},p(e,n){t=e},d(t){t&&a(e),n=!1,l()}}}function st(t){let e,n,l,o,i=t[56].state[0].toUpperCase()+t[56].state.substring(1)+"";function u(...e){return t[48](t[56],...e)}return{c(){e=s("span"),n=f(i),g(e,"class","pull-right"),b(e,"color","#888"),b(e,"font-style","italic")},m(t,i){c(t,e,i),r(e,n),l||(o=p(e,"click",m(h(u))),l=!0)},p(e,l){t=e,8192&l[0]&&i!==(i=t[56].state[0].toUpperCase()+t[56].state.substring(1)+"")&&$(n,i)},d(t){t&&a(e),l=!1,o()}}}function ft(t){let e,n,o,i,u,f,v;function $(){t[47].call(n,t[57],t[58])}function _(t,e){return t[56].state?st:ut}let y=_(t),x=y(t);function C(...e){return t[50](t[56],...e)}return{c(){e=s("div"),n=s("span"),o=d(),x.c(),i=d(),g(n,"contenteditable","true"),b(n,"cursor","text"),void 0===t[56].name&&L($),g(e,"class",u="list-group-item "+(t[14]===t[56]?"active":""))},m(l,a){c(l,e,a),r(e,n),void 0!==t[56].name&&(n.innerHTML=t[56].name),r(e,o),x.m(e,null),r(e,i),f||(v=[p(n,"input",$),p(e,"click",m(h(C)))],f=!0)},p(l,o){t=l,8192&o[0]&&t[56].name!==n.innerHTML&&(n.innerHTML=t[56].name),y===(y=_(t))&&x?x.p(t,o):(x.d(1),x=y(t),x&&(x.c(),x.m(e,i))),24576&o[0]&&u!==(u="list-group-item "+(t[14]===t[56]?"active":""))&&g(e,"class",u)},d(t){t&&a(e),x.d(),f=!1,l(v)}}}function dt(e){let n,o,i,x,C,w,k,A,z,E,T,M,S,D,P,O,N,j,H,U,F,I,Q,Y,Z,tt,et,ot,it,ut,st,ft,dt,pt,ht,mt,gt,vt,$t,_t,bt,yt,xt,Ct,wt,kt,At,zt,Et,Tt,Mt,Lt,St,Dt,Pt,Ot,Nt,jt,Ht,Ut,qt,Bt,Ft,Gt,It,Rt,Vt,Wt,Jt,Kt,Qt,Xt,Yt=e[11],Zt=[];for(let t=0;t<Yt.length;t+=1)Zt[t]=J(W(e,Yt,t));let te=e[9],ee=[];for(let t=0;t<te.length;t+=1)ee[t]=K(V(e,te,t));let ne=e[8],le=[];for(let t=0;t<ne.length;t+=1)le[t]=X(R(e,ne,t));let oe=e[7].arguments,ie=[];for(let t=0;t<oe.length;t+=1)ie[t]=nt(G(e,oe,t));let re=e[6],ce=[];for(let t=0;t<re.length;t+=1)ce[t]=lt(B(e,re,t));let ae=e[5].arguments,ue=[];for(let t=0;t<ae.length;t+=1)ue[t]=rt(q(e,ae,t));function se(t,e){return t[13].length>0?at:ct}let fe=se(e),de=fe(e);return{c(){n=s("main"),o=s("div"),i=s("div"),x=s("h3"),x.textContent="Training Parameters",C=d(),w=s("div"),k=s("form"),A=s("h5"),A.textContent="General",z=d(),E=s("div"),T=s("label"),T.textContent="Training Data:",M=d(),S=s("select");for(let t=0;t<Zt.length;t+=1)Zt[t].c();D=d(),P=s("div"),O=s("label"),O.textContent="Architecture:",N=d(),j=s("select");for(let t=0;t<ee.length;t+=1)ee[t].c();H=d(),U=s("div"),F=s("label"),F.textContent="Batch Size",I=d(),Q=s("input"),Y=d(),Z=s("div"),tt=s("label"),tt.textContent="Epochs",et=d(),ot=s("input"),it=d(),ut=s("div"),st=s("label"),st.textContent="Validation Split",ft=d(),dt=s("input"),pt=d(),ht=s("hr"),mt=d(),gt=s("h5"),gt.textContent="Loss",vt=d(),$t=s("div"),_t=s("label"),_t.textContent="Loss Function:",bt=d(),yt=s("select");for(let t=0;t<le.length;t+=1)le[t].c();xt=d(),Ct=s("span"),wt=d();for(let t=0;t<ie.length;t+=1)ie[t].c();kt=d(),At=s("hr"),zt=d(),Et=s("h5"),Et.textContent="Optimization",Tt=d(),Mt=s("div"),Lt=s("label"),Lt.textContent="Optimizer:",St=d(),Dt=s("select");for(let t=0;t<ce.length;t+=1)ce[t].c();Pt=d(),Ot=s("span"),Nt=d();for(let t=0;t<ue.length;t+=1)ue[t].c();jt=d(),Ht=s("button"),Ut=f(e[1]),Bt=d(),Ft=s("div"),Gt=d(),It=s("div"),Rt=s("h4"),Rt.textContent="Trained Models",Vt=d(),Wt=s("div"),de.c(),Jt=d(),Kt=s("div"),b(A,"text-align","left"),g(T,"for","dataset"),g(S,"id","dataset"),void 0===e[12]&&L(()=>e[34].call(S)),g(E,"class","form-group"),g(O,"for","arch"),g(j,"id","arch"),void 0===e[10]&&L(()=>e[35].call(j)),g(P,"class","form-group"),g(F,"for","batchSize"),g(Q,"id","batchSize"),g(Q,"type","number"),g(U,"class","form-group"),g(tt,"for","epochs"),g(ot,"id","epochs"),g(ot,"type","number"),g(Z,"class","form-group"),g(st,"for","validation"),g(dt,"id","validation"),g(dt,"type","number"),g(ut,"class","form-group"),b(ht,"border-top","1px solid #aaa"),b(gt,"text-align","left"),g(_t,"for","loss"),g(yt,"id","loss"),void 0===e[7]&&L(()=>e[39].call(yt)),g(Ct,"class","glyphicon glyphicon-info-sign"),g(Ct,"aria-hidden","true"),g($t,"class","form-group"),b(At,"border-top","1px solid #aaa"),b(Et,"text-align","left"),g(Lt,"for","optimizer"),g(Dt,"id","optimizer"),void 0===e[5]&&L(()=>e[43].call(Dt)),g(Ot,"class","glyphicon glyphicon-info-sign"),g(Ot,"aria-hidden","true"),g(Mt,"class","form-group"),g(Ht,"type","button"),g(Ht,"class",qt="btn btn-"+("Train"===e[1]?"primary":"warning")),g(w,"class","well"),b(w,"padding-top","5px"),g(i,"class","col-xs-12 col-sm-12 col-md-4 col-lg-3"),g(Ft,"class","col-xs-12 col-sm-12 col-md-6 col-lg-6 plot-container"),g(Wt,"class","list-group"),g(It,"class","col-xs-12 col-sm-12 col-md-2 col-lg-2"),g(o,"class","row svelte-193h8ui"),g(n,"class","svelte-193h8ui")},m(t,l){c(t,n,l),r(n,o),r(o,i),r(i,x),r(i,C),r(i,w),r(w,k),r(k,A),r(k,z),r(k,E),r(E,T),r(E,M),r(E,S);for(let t=0;t<Zt.length;t+=1)Zt[t].m(S,null);y(S,e[12]),r(k,D),r(k,P),r(P,O),r(P,N),r(P,j);for(let t=0;t<ee.length;t+=1)ee[t].m(j,null);y(j,e[10]),r(k,H),r(k,U),r(U,F),r(U,I),r(U,Q),_(Q,e[2]),r(k,Y),r(k,Z),r(Z,tt),r(Z,et),r(Z,ot),_(ot,e[3]),r(k,it),r(k,ut),r(ut,st),r(ut,ft),r(ut,dt),_(dt,e[4]),r(k,pt),r(k,ht),r(k,mt),r(k,gt),r(k,vt),r(k,$t),r($t,_t),r($t,bt),r($t,yt);for(let t=0;t<le.length;t+=1)le[t].m(yt,null);y(yt,e[7]),r($t,xt),r($t,Ct),r(k,wt);for(let t=0;t<ie.length;t+=1)ie[t].m(k,null);r(k,kt),r(k,At),r(k,zt),r(k,Et),r(k,Tt),r(k,Mt),r(Mt,Lt),r(Mt,St),r(Mt,Dt);for(let t=0;t<ce.length;t+=1)ce[t].m(Dt,null);y(Dt,e[5]),r(Mt,Pt),r(Mt,Ot),r(k,Nt);for(let t=0;t<ue.length;t+=1)ue[t].m(k,null);r(w,jt),r(w,Ht),r(Ht,Ut),r(o,Bt),r(o,Ft),e[46](Ft),r(o,Gt),r(o,It),r(It,Rt),r(It,Vt),r(It,Wt),de.m(Wt,null),r(Wt,Jt),r(Wt,Kt),e[51](n),Qt||(Xt=[p(S,"change",e[34]),p(j,"change",e[35]),p(Q,"input",e[36]),p(ot,"input",e[37]),p(dt,"input",e[38]),p(yt,"change",e[39]),p(Ct,"click",m(h(e[18]))),p(Dt,"change",e[43]),p(Ot,"click",m(h(e[20]))),p(Ht,"click",m(h(e[17])))],Qt=!0)},p(t,e){if(2048&e[0]){let n;for(Yt=t[11],n=0;n<Yt.length;n+=1){const l=W(t,Yt,n);Zt[n]?Zt[n].p(l,e):(Zt[n]=J(l),Zt[n].c(),Zt[n].m(S,null))}for(;n<Zt.length;n+=1)Zt[n].d(1);Zt.length=Yt.length}if(6144&e[0]&&y(S,t[12]),512&e[0]){let n;for(te=t[9],n=0;n<te.length;n+=1){const l=V(t,te,n);ee[n]?ee[n].p(l,e):(ee[n]=K(l),ee[n].c(),ee[n].m(j,null))}for(;n<ee.length;n+=1)ee[n].d(1);ee.length=te.length}if(1536&e[0]&&y(j,t[10]),4&e[0]&&v(Q.value)!==t[2]&&_(Q,t[2]),8&e[0]&&v(ot.value)!==t[3]&&_(ot,t[3]),16&e[0]&&v(dt.value)!==t[4]&&_(dt,t[4]),256&e[0]){let n;for(ne=t[8],n=0;n<ne.length;n+=1){const l=R(t,ne,n);le[n]?le[n].p(l,e):(le[n]=X(l),le[n].c(),le[n].m(yt,null))}for(;n<le.length;n+=1)le[n].d(1);le.length=ne.length}if(384&e[0]&&y(yt,t[7]),128&e[0]){let n;for(oe=t[7].arguments,n=0;n<oe.length;n+=1){const l=G(t,oe,n);ie[n]?ie[n].p(l,e):(ie[n]=nt(l),ie[n].c(),ie[n].m(k,kt))}for(;n<ie.length;n+=1)ie[n].d(1);ie.length=oe.length}if(64&e[0]){let n;for(re=t[6],n=0;n<re.length;n+=1){const l=B(t,re,n);ce[n]?ce[n].p(l,e):(ce[n]=lt(l),ce[n].c(),ce[n].m(Dt,null))}for(;n<ce.length;n+=1)ce[n].d(1);ce.length=re.length}if(96&e[0]&&y(Dt,t[5]),32&e[0]){let n;for(ae=t[5].arguments,n=0;n<ae.length;n+=1){const l=q(t,ae,n);ue[n]?ue[n].p(l,e):(ue[n]=rt(l),ue[n].c(),ue[n].m(k,null))}for(;n<ue.length;n+=1)ue[n].d(1);ue.length=ae.length}2&e[0]&&$(Ut,t[1]),2&e[0]&&qt!==(qt="btn btn-"+("Train"===t[1]?"primary":"warning"))&&g(Ht,"class",qt),fe===(fe=se(t))&&de?de.p(t,e):(de.d(1),de=fe(t),de&&(de.c(),de.m(Wt,Jt)))},i:t,o:t,d(t){t&&a(n),u(Zt,t),u(ee,t),u(le,t),u(ie,t),u(ce,t),u(ue,t),e[46](null),de.d(),e[51](null),Qt=!1,l(Xt)}}}function pt(t,e,n){const l={name:"",arguments:[]};let o,i,r,c,a,u="Train",s=null,f=32,d=50,p=.1,h=l,m=[],g=l,$=[],_=[],b=[],y=[];function C(t){const e=new CustomEvent("showModelInfo",{detail:t});a.dispatchEvent(e)}function w(t){const e=new CustomEvent("saveModel",{detail:t});a.dispatchEvent(e)}function k(t){n(14,r=t),r.config&&(n(10,o=r.config.architecture),n(12,i=r.config.dataset),n(2,f=r.config.batchSize),n(4,p=r.config.validation),n(5,h=r.config.optimizer),n(3,d=r.config.epochs),n(7,g=r.config.loss)),s&&s.react(c,r.plotData)}let z;return t.$$.update=()=>{16384&t.$$.dirty[0]&&(z=r&&r.plotData)},[function(){return{architecture:o,dataset:i,batchSize:f,validation:p,optimizer:h,epochs:d,loss:g}},u,f,d,p,h,m,g,$,_,o,b,i,y,r,c,a,function(){const t=new CustomEvent("onTrainClicked");a.dispatchEvent(t)},function(){const t=`https://keras.io/api/losses/${g.category.toLowerCase().replace(/ /g,"_")}/#${g.name.toLowerCase()+"-class"}/`;window.open(t,"_blank")},C,function(){const t=`https://keras.io/api/optimizers/${h.name.toLowerCase()}/`;window.open(t,"_blank")},w,k,function(t,e){!function(t){t.losses.concat(t.optimizers).forEach(e=>{e.arguments=e.arguments.filter(t=>"name"!==t.name).map(e=>(e.name.includes("reduction")?(e.type="enum",e.options=t.reductions):e.type=typeof e.default,e.value=e.default,"boolean"===e.type&&console.warn("Unsupported argument:",e),e))})}(e),n(6,m=e.optimizers),n(5,h=m[0]);const l={};e.losses.forEach(t=>{l[t.category]||(l[t.category]=[]),l[t.category].push(t)}),n(8,$=Object.entries(l)),n(7,g=e.losses[0]),s=t,s.newPlot(c)},function(t){n(13,y=y.concat(t)),r||n(14,r=t)},function(){return a},function(t,e,l){const o=y.find(e=>e.id===t);o.state=e,o.info=l,n(13,y),!e?n(1,u="Train"):e.startsWith("Training")&&n(1,u="Restart")},function(t,e){const n=y.find(e=>e.id===t);n.plotData=e,n===r&&k(n)},function(t){n(11,b=b.concat(t)),i||n(12,i=b[0])},function(t){n(11,b=b.map(e=>e.id===t.id?t:e))},function(t){n(11,b=b.filter(e=>e.id!==t)),i&&i.id===t&&n(12,i=b[0])},function(t){n(9,_=_.concat(t)),o||n(10,o=_[0])},function(t){n(9,_=_.map(e=>e.id===t.id?t:e))},function(t){n(9,_=_.filter(e=>e.id!==t)),o&&o.id===t&&n(10,o=_[0])},function(){i=x(this),n(12,i),n(11,b)},function(){o=x(this),n(10,o),n(9,_)},function(){f=v(this.value),n(2,f)},function(){d=v(this.value),n(3,d)},function(){p=v(this.value),n(4,p)},function(){g=x(this),n(7,g),n(8,$)},function(t,e){t[e].value=this.value,n(7,g),n(8,$)},function(t,e){t[e].value=x(this),n(7,g),n(8,$)},function(t,e){t[e].value=v(this.value),n(7,g),n(8,$)},function(){h=x(this),n(5,h),n(6,m)},function(t,e){t[e].value=this.value,n(5,h),n(6,m)},function(t,e){t[e].value=v(this.value),n(5,h),n(6,m)},function(t){A[t?"unshift":"push"](()=>{c=t,n(15,c)})},function(t,e){t[e].name=this.innerHTML,n(13,y)},t=>C(t),t=>w(t),t=>k(t),function(t){A[t?"unshift":"push"](()=>{a=t,n(16,a)})}]}return class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),H(this,t,pt,dt,i,{initialize:23,addModel:24,events:25,setModelState:26,setPlotData:27,addArtifact:28,updateArtifact:29,removeArtifact:30,addArchitecture:31,updateArchitecture:32,removeArchitecture:33,data:0},[-1,-1,-1])}get initialize(){return this.$$.ctx[23]}get addModel(){return this.$$.ctx[24]}get events(){return this.$$.ctx[25]}get setModelState(){return this.$$.ctx[26]}get setPlotData(){return this.$$.ctx[27]}get addArtifact(){return this.$$.ctx[28]}get updateArtifact(){return this.$$.ctx[29]}get removeArtifact(){return this.$$.ctx[30]}get addArchitecture(){return this.$$.ctx[31]}get updateArchitecture(){return this.$$.ctx[32]}get removeArchitecture(){return this.$$.ctx[33]}get data(){return this.$$.ctx[0]}}}));
+define((function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function l(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function r(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function a(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function s(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function p(t,e,n,l){return t.addEventListener(e,n,l),()=>t.removeEventListener(e,n,l)}function h(t){return function(e){return e.preventDefault(),t.call(this,e)}}function g(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t){return""===t?null:+t}function $(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e){t.value=null==e?"":e}function b(t,e,n,l){t.style.setProperty(e,n,l?"important":"")}function y(t,e){for(let n=0;n<t.options.length;n+=1){const l=t.options[n];if(l.__value===e)return void(l.selected=!0)}}function x(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}let k;function C(t){k=t}const w=[],A=[],z=[],E=[],T=Promise.resolve();let M=!1;function L(t){z.push(t)}let S=!1;const D=new Set;function P(){if(!S){S=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];C(e),O(e.$$)}for(C(null),w.length=0;A.length;)A.pop()();for(let t=0;t<z.length;t+=1){const e=z[t];D.has(e)||(D.add(e),e())}z.length=0}while(w.length);for(;E.length;)E.pop()();M=!1,S=!1,D.clear()}}function O(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const N=new Set;function j(t,e){-1===t.$$.dirty[0]&&(w.push(t),M||(M=!0,T.then(P)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function H(i,c,r,a,s,f,d=[-1]){const p=k;C(i);const h=c.props||{},g=i.$$={fragment:null,ctx:null,props:f,update:t,not_equal:s,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:d,skip_bound:!1};let m=!1;if(g.ctx=r?r(i,h,(t,e,...n)=>{const l=n.length?n[0]:e;return g.ctx&&s(g.ctx[t],g.ctx[t]=l)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](l),m&&j(i,t)),e}):[],g.update(),m=!0,l(g.before_update),g.fragment=!!a&&a(g.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);g.fragment&&g.fragment.l(t),t.forEach(u)}else g.fragment&&g.fragment.c();c.intro&&((v=i.$$.fragment)&&v.i&&(N.delete(v),v.i($))),function(t,n,i){const{fragment:c,on_mount:r,on_destroy:u,after_update:a}=t.$$;c&&c.m(n,i),L(()=>{const n=r.map(e).filter(o);u?u.push(...n):l(n),t.$$.on_mount=[]}),a.forEach(L)}(i,c.target,c.anchor),P()}var v,$;C(p)}function q(t,e,n){const l=t.slice();return l[58]=e[n],l[59]=e,l[60]=n,l}function B(t,e,n){const l=t.slice();return l[61]=e[n],l[62]=e,l[63]=n,l}function U(t,e,n){const l=t.slice();return l[64]=e[n],l}function F(t,e,n){const l=t.slice();return l[69]=e[n],l}function G(t,e,n){const l=t.slice();return l[61]=e[n],l[67]=e,l[68]=n,l}function I(t,e,n){const l=t.slice();return l[75]=e[n],l}function R(t,e,n){const l=t.slice();return l[72]=e[n],l}function V(t,e,n){const l=t.slice();return l[78]=e[n],l}function W(t,e,n){const l=t.slice();return l[0]=e[n],l}function J(t){let e,n,l,o=t[0].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[0],e.value=e.__value},m(t,l){r(t,e,l),c(e,n)},p(t,i){2048&i[0]&&o!==(o=t[0].name+"")&&$(n,o),2048&i[0]&&l!==(l=t[0])&&(e.__value=l,e.value=e.__value)},d(t){t&&u(e)}}}function K(t){let e,n,l,o=t[78].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[78],e.value=e.__value},m(t,l){r(t,e,l),c(e,n)},p(t,i){512&i[0]&&o!==(o=t[78].name+"")&&$(n,o),512&i[0]&&l!==(l=t[78])&&(e.__value=l,e.value=e.__value)},d(t){t&&u(e)}}}function Q(t){let e,n,l,o=t[75].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[75],e.value=e.__value},m(t,l){r(t,e,l),c(e,n)},p(t,i){256&i[0]&&o!==(o=t[75].name+"")&&$(n,o),256&i[0]&&l!==(l=t[75])&&(e.__value=l,e.value=e.__value)},d(t){t&&u(e)}}}function X(t){let e,n,l=t[72][1],o=[];for(let e=0;e<l.length;e+=1)o[e]=Q(I(t,l,e));return{c(){e=s("optgroup");for(let t=0;t<o.length;t+=1)o[t].c();m(e,"label",n=t[72][0])},m(t,n){r(t,e,n);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,i){if(256&i[0]){let n;for(l=t[72][1],n=0;n<l.length;n+=1){const c=I(t,l,n);o[n]?o[n].p(c,i):(o[n]=Q(c),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=l.length}256&i[0]&&n!==(n=t[72][0])&&m(e,"label",n)},d(t){t&&u(e),a(o,t)}}}function Y(t){let e,n,l,o,i,a,h,g,b=t[61].name+"";function y(){t[43].call(i,t[67],t[68])}return{c(){e=s("label"),n=f(b),o=d(),i=s("input"),m(e,"for",l=t[61].id),m(i,"id",a=t[61].id),m(i,"type","number")},m(l,u){r(l,e,u),c(e,n),r(l,o,u),r(l,i,u),_(i,t[61].value),h||(g=p(i,"input",y),h=!0)},p(o,c){t=o,128&c[0]&&b!==(b=t[61].name+"")&&$(n,b),384&c[0]&&l!==(l=t[61].id)&&m(e,"for",l),384&c[0]&&a!==(a=t[61].id)&&m(i,"id",a),384&c[0]&&v(i.value)!==t[61].value&&_(i,t[61].value)},d(t){t&&u(e),t&&u(o),t&&u(i),h=!1,g()}}}function Z(t){let e,n,l,o,i,h,g,v,_=t[61].name+"",b=t[61].options,x=[];for(let e=0;e<b.length;e+=1)x[e]=nt(F(t,b,e));function k(){t[42].call(i,t[67],t[68])}return{c(){e=s("label"),n=f(_),o=d(),i=s("select");for(let t=0;t<x.length;t+=1)x[t].c();m(e,"for",l=t[61].id),m(i,"id",h=t[61].id),void 0===t[61].value&&L(k)},m(l,u){r(l,e,u),c(e,n),r(l,o,u),r(l,i,u);for(let t=0;t<x.length;t+=1)x[t].m(i,null);y(i,t[61].value),g||(v=p(i,"change",k),g=!0)},p(o,c){if(t=o,128&c[0]&&_!==(_=t[61].name+"")&&$(n,_),384&c[0]&&l!==(l=t[61].id)&&m(e,"for",l),128&c[0]){let e;for(b=t[61].options,e=0;e<b.length;e+=1){const n=F(t,b,e);x[e]?x[e].p(n,c):(x[e]=nt(n),x[e].c(),x[e].m(i,null))}for(;e<x.length;e+=1)x[e].d(1);x.length=b.length}384&c[0]&&h!==(h=t[61].id)&&m(i,"id",h),384&c[0]&&y(i,t[61].value)},d(t){t&&u(e),t&&u(o),t&&u(i),a(x,t),g=!1,v()}}}function tt(t){let e,n,l,o,i,a,h,g,v=t[61].name+"";function _(){t[41].call(e,t[67],t[68])}return{c(){e=s("input"),l=d(),o=s("label"),i=f(v),m(e,"id",n=t[61].id),m(e,"type","checkbox"),m(o,"for",a=t[61].id)},m(n,u){r(n,e,u),e.checked=t[61].value,r(n,l,u),r(n,o,u),c(o,i),h||(g=p(e,"change",_),h=!0)},p(l,c){t=l,384&c[0]&&n!==(n=t[61].id)&&m(e,"id",n),384&c[0]&&(e.checked=t[61].value),128&c[0]&&v!==(v=t[61].name+"")&&$(i,v),384&c[0]&&a!==(a=t[61].id)&&m(o,"for",a)},d(t){t&&u(e),t&&u(l),t&&u(o),h=!1,g()}}}function et(t){let e,n,l,o,i,a,h,g,v=t[61].name+"";function b(){t[40].call(i,t[67],t[68])}return{c(){e=s("label"),n=f(v),o=d(),i=s("input"),m(e,"for",l=t[61].id),m(i,"id",a=t[61].id),m(i,"type","text")},m(l,u){r(l,e,u),c(e,n),r(l,o,u),r(l,i,u),_(i,t[61].value),h||(g=p(i,"input",b),h=!0)},p(o,c){t=o,128&c[0]&&v!==(v=t[61].name+"")&&$(n,v),384&c[0]&&l!==(l=t[61].id)&&m(e,"for",l),384&c[0]&&a!==(a=t[61].id)&&m(i,"id",a),384&c[0]&&i.value!==t[61].value&&_(i,t[61].value)},d(t){t&&u(e),t&&u(o),t&&u(i),h=!1,g()}}}function nt(t){let e,n,l,o=t[69]+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[69],e.value=e.__value},m(t,l){r(t,e,l),c(e,n)},p(t,i){128&i[0]&&o!==(o=t[69]+"")&&$(n,o),384&i[0]&&l!==(l=t[69])&&(e.__value=l,e.value=e.__value)},d(t){t&&u(e)}}}function lt(t){let e;function n(t,e){return"string"===t[61].type?et:"boolean"===t[61].type?tt:"enum"===t[61].type?Z:Y}let l=n(t),o=l(t);return{c(){e=s("div"),o.c(),m(e,"class","form-group")},m(t,n){r(t,e,n),o.m(e,null)},p(t,i){l===(l=n(t))&&o?o.p(t,i):(o.d(1),o=l(t),o&&(o.c(),o.m(e,null)))},d(t){t&&u(e),o.d()}}}function ot(t){let e,n,l,o=t[64].name+"";return{c(){e=s("option"),n=f(o),e.__value=l=t[64],e.value=e.__value},m(t,l){r(t,e,l),c(e,n)},p(t,i){64&i[0]&&o!==(o=t[64].name+"")&&$(n,o),64&i[0]&&l!==(l=t[64])&&(e.__value=l,e.value=e.__value)},d(t){t&&u(e)}}}function it(t){let e,n,l,o,i,a,h,g,b=t[61].name+"";function y(){t[47].call(i,t[62],t[63])}return{c(){e=s("label"),n=f(b),o=d(),i=s("input"),m(e,"for",l=t[61].id),m(i,"id",a=t[61].id),m(i,"type","number")},m(l,u){r(l,e,u),c(e,n),r(l,o,u),r(l,i,u),_(i,t[61].value),h||(g=p(i,"input",y),h=!0)},p(o,c){t=o,32&c[0]&&b!==(b=t[61].name+"")&&$(n,b),96&c[0]&&l!==(l=t[61].id)&&m(e,"for",l),96&c[0]&&a!==(a=t[61].id)&&m(i,"id",a),96&c[0]&&v(i.value)!==t[61].value&&_(i,t[61].value)},d(t){t&&u(e),t&&u(o),t&&u(i),h=!1,g()}}}function ct(t){let e,n,l,o,i,a,h,g,v=t[61].name+"";function _(){t[46].call(e,t[62],t[63])}return{c(){e=s("input"),l=d(),o=s("label"),i=f(v),m(e,"id",n=t[61].id),m(e,"type","checkbox"),m(o,"for",a=t[61].id)},m(n,u){r(n,e,u),e.checked=t[61].value,r(n,l,u),r(n,o,u),c(o,i),h||(g=p(e,"change",_),h=!0)},p(l,c){t=l,96&c[0]&&n!==(n=t[61].id)&&m(e,"id",n),96&c[0]&&(e.checked=t[61].value),32&c[0]&&v!==(v=t[61].name+"")&&$(i,v),96&c[0]&&a!==(a=t[61].id)&&m(o,"for",a)},d(t){t&&u(e),t&&u(l),t&&u(o),h=!1,g()}}}function rt(t){let e,n,l,o,i,a,h,g,v=t[61].name+"";function b(){t[45].call(i,t[62],t[63])}return{c(){e=s("label"),n=f(v),o=d(),i=s("input"),m(e,"for",l=t[61].id),m(i,"id",a=t[61].id),m(i,"type","text")},m(l,u){r(l,e,u),c(e,n),r(l,o,u),r(l,i,u),_(i,t[61].value),h||(g=p(i,"input",b),h=!0)},p(o,c){t=o,32&c[0]&&v!==(v=t[61].name+"")&&$(n,v),96&c[0]&&l!==(l=t[61].id)&&m(e,"for",l),96&c[0]&&a!==(a=t[61].id)&&m(i,"id",a),96&c[0]&&i.value!==t[61].value&&_(i,t[61].value)},d(t){t&&u(e),t&&u(o),t&&u(i),h=!1,g()}}}function ut(t){let e,n;function l(t,e){return"string"===t[61].type?rt:"boolean"===t[61].type?ct:it}let o=l(t),i=o(t);return{c(){e=s("div"),i.c(),n=d(),m(e,"class","form-group")},m(t,l){r(t,e,l),i.m(e,null),c(e,n)},p(t,c){o===(o=l(t))&&i?i.p(t,c):(i.d(1),i=o(t),i&&(i.c(),i.m(e,n)))},d(t){t&&u(e),i.d()}}}function at(e){let n;return{c(){n=s("div"),n.textContent="No Trained Models",m(n,"class","list-group-item"),b(n,"font-style","italic"),b(n,"color","#888")},m(t,e){r(t,n,e)},p:t,d(t){t&&u(n)}}}function st(t){let e,n=t[13],l=[];for(let e=0;e<n.length;e+=1)l[e]=pt(q(t,n,e));return{c(){for(let t=0;t<l.length;t+=1)l[t].c();e=f("")},m(t,n){for(let e=0;e<l.length;e+=1)l[e].m(t,n);r(t,e,n)},p(t,o){if(6840320&o[0]){let i;for(n=t[13],i=0;i<n.length;i+=1){const c=q(t,n,i);l[i]?l[i].p(c,o):(l[i]=pt(c),l[i].c(),l[i].m(e.parentNode,e))}for(;i<l.length;i+=1)l[i].d(1);l.length=n.length}},d(t){a(l,t),t&&u(e)}}}function ft(t){let e,n,l;function o(...e){return t[51](t[58],...e)}return{c(){e=s("span"),m(e,"class","glyphicon glyphicon-floppy-disk pull-right"),m(e,"aria-hidden","true")},m(t,i){r(t,e,i),n||(l=p(e,"click",g(h(o))),n=!0)},p(e,n){t=e},d(t){t&&u(e),n=!1,l()}}}function dt(t){let e,n,l,o,i=t[58].state[0].toUpperCase()+t[58].state.substring(1)+"";function a(...e){return t[50](t[58],...e)}return{c(){e=s("span"),n=f(i),m(e,"class","pull-right"),b(e,"color","#888"),b(e,"font-style","italic")},m(t,i){r(t,e,i),c(e,n),l||(o=p(e,"click",g(h(a))),l=!0)},p(e,l){t=e,8192&l[0]&&i!==(i=t[58].state[0].toUpperCase()+t[58].state.substring(1)+"")&&$(n,i)},d(t){t&&u(e),l=!1,o()}}}function pt(t){let e,n,o,i,a,f,v;function $(){t[49].call(n,t[59],t[60])}function _(t,e){return t[58].state?dt:ft}let y=_(t),x=y(t);function k(...e){return t[52](t[58],...e)}return{c(){e=s("div"),n=s("span"),o=d(),x.c(),i=d(),m(n,"contenteditable","true"),b(n,"cursor","text"),void 0===t[58].name&&L($),m(e,"class",a="list-group-item "+(t[14]===t[58]?"active":""))},m(l,u){r(l,e,u),c(e,n),void 0!==t[58].name&&(n.innerHTML=t[58].name),c(e,o),x.m(e,null),c(e,i),f||(v=[p(n,"input",$),p(e,"click",g(h(k)))],f=!0)},p(l,o){t=l,8192&o[0]&&t[58].name!==n.innerHTML&&(n.innerHTML=t[58].name),y===(y=_(t))&&x?x.p(t,o):(x.d(1),x=y(t),x&&(x.c(),x.m(e,i))),24576&o[0]&&a!==(a="list-group-item "+(t[14]===t[58]?"active":""))&&m(e,"class",a)},d(t){t&&u(e),x.d(),f=!1,l(v)}}}function ht(e){let n,o,i,x,k,C,w,A,z,E,T,M,S,D,P,O,N,j,H,q,F,I,Q,Y,Z,tt,et,nt,it,ct,rt,ft,dt,pt,ht,gt,mt,vt,$t,_t,bt,yt,xt,kt,Ct,wt,At,zt,Et,Tt,Mt,Lt,St,Dt,Pt,Ot,Nt,jt,Ht,qt,Bt,Ut,Ft,Gt,It,Rt,Vt,Wt,Jt,Kt,Qt,Xt,Yt=e[11],Zt=[];for(let t=0;t<Yt.length;t+=1)Zt[t]=J(W(e,Yt,t));let te=e[9],ee=[];for(let t=0;t<te.length;t+=1)ee[t]=K(V(e,te,t));let ne=e[8],le=[];for(let t=0;t<ne.length;t+=1)le[t]=X(R(e,ne,t));let oe=e[7].arguments,ie=[];for(let t=0;t<oe.length;t+=1)ie[t]=lt(G(e,oe,t));let ce=e[6],re=[];for(let t=0;t<ce.length;t+=1)re[t]=ot(U(e,ce,t));let ue=e[5].arguments,ae=[];for(let t=0;t<ue.length;t+=1)ae[t]=ut(B(e,ue,t));function se(t,e){return t[13].length>0?st:at}let fe=se(e),de=fe(e);return{c(){n=s("main"),o=s("div"),i=s("div"),x=s("h3"),x.textContent="Training Parameters",k=d(),C=s("div"),w=s("form"),A=s("h5"),A.textContent="General",z=d(),E=s("div"),T=s("label"),T.textContent="Training Data:",M=d(),S=s("select");for(let t=0;t<Zt.length;t+=1)Zt[t].c();D=d(),P=s("div"),O=s("label"),O.textContent="Architecture:",N=d(),j=s("select");for(let t=0;t<ee.length;t+=1)ee[t].c();H=d(),q=s("div"),F=s("label"),F.textContent="Batch Size",I=d(),Q=s("input"),Y=d(),Z=s("div"),tt=s("label"),tt.textContent="Epochs",et=d(),nt=s("input"),it=d(),ct=s("div"),rt=s("label"),rt.textContent="Validation Split",ft=d(),dt=s("input"),pt=d(),ht=s("hr"),gt=d(),mt=s("h5"),mt.textContent="Loss",vt=d(),$t=s("div"),_t=s("label"),_t.textContent="Loss Function:",bt=d(),yt=s("select");for(let t=0;t<le.length;t+=1)le[t].c();xt=d(),kt=s("span"),Ct=d();for(let t=0;t<ie.length;t+=1)ie[t].c();wt=d(),At=s("hr"),zt=d(),Et=s("h5"),Et.textContent="Optimization",Tt=d(),Mt=s("div"),Lt=s("label"),Lt.textContent="Optimizer:",St=d(),Dt=s("select");for(let t=0;t<re.length;t+=1)re[t].c();Pt=d(),Ot=s("span"),Nt=d();for(let t=0;t<ae.length;t+=1)ae[t].c();jt=d(),Ht=s("button"),qt=f(e[1]),Ut=d(),Ft=s("div"),Gt=d(),It=s("div"),Rt=s("h4"),Rt.textContent="Trained Models",Vt=d(),Wt=s("div"),de.c(),Jt=d(),Kt=s("div"),b(A,"text-align","left"),m(T,"for","dataset"),m(S,"id","dataset"),void 0===e[12]&&L(()=>e[34].call(S)),m(E,"class","form-group"),m(O,"for","arch"),m(j,"id","arch"),void 0===e[10]&&L(()=>e[35].call(j)),m(P,"class","form-group"),m(F,"for","batchSize"),m(Q,"id","batchSize"),m(Q,"type","number"),m(q,"class","form-group"),m(tt,"for","epochs"),m(nt,"id","epochs"),m(nt,"type","number"),m(Z,"class","form-group"),m(rt,"for","validation"),m(dt,"id","validation"),m(dt,"type","number"),m(ct,"class","form-group"),b(ht,"border-top","1px solid #aaa"),b(mt,"text-align","left"),m(_t,"for","loss"),m(yt,"id","loss"),void 0===e[7]&&L(()=>e[39].call(yt)),m(kt,"class","glyphicon glyphicon-info-sign"),m(kt,"aria-hidden","true"),m($t,"class","form-group"),b(At,"border-top","1px solid #aaa"),b(Et,"text-align","left"),m(Lt,"for","optimizer"),m(Dt,"id","optimizer"),void 0===e[5]&&L(()=>e[44].call(Dt)),m(Ot,"class","glyphicon glyphicon-info-sign"),m(Ot,"aria-hidden","true"),m(Mt,"class","form-group"),m(Ht,"type","button"),m(Ht,"class",Bt="btn btn-"+("Train"===e[1]?"primary":"warning")),m(C,"class","well"),b(C,"padding-top","5px"),m(i,"class","col-xs-12 col-sm-12 col-md-4 col-lg-3"),m(Ft,"class","col-xs-12 col-sm-12 col-md-6 col-lg-6 plot-container"),m(Wt,"class","list-group"),m(It,"class","col-xs-12 col-sm-12 col-md-2 col-lg-2"),m(o,"class","row svelte-193h8ui"),m(n,"class","svelte-193h8ui")},m(t,l){r(t,n,l),c(n,o),c(o,i),c(i,x),c(i,k),c(i,C),c(C,w),c(w,A),c(w,z),c(w,E),c(E,T),c(E,M),c(E,S);for(let t=0;t<Zt.length;t+=1)Zt[t].m(S,null);y(S,e[12]),c(w,D),c(w,P),c(P,O),c(P,N),c(P,j);for(let t=0;t<ee.length;t+=1)ee[t].m(j,null);y(j,e[10]),c(w,H),c(w,q),c(q,F),c(q,I),c(q,Q),_(Q,e[2]),c(w,Y),c(w,Z),c(Z,tt),c(Z,et),c(Z,nt),_(nt,e[3]),c(w,it),c(w,ct),c(ct,rt),c(ct,ft),c(ct,dt),_(dt,e[4]),c(w,pt),c(w,ht),c(w,gt),c(w,mt),c(w,vt),c(w,$t),c($t,_t),c($t,bt),c($t,yt);for(let t=0;t<le.length;t+=1)le[t].m(yt,null);y(yt,e[7]),c($t,xt),c($t,kt),c(w,Ct);for(let t=0;t<ie.length;t+=1)ie[t].m(w,null);c(w,wt),c(w,At),c(w,zt),c(w,Et),c(w,Tt),c(w,Mt),c(Mt,Lt),c(Mt,St),c(Mt,Dt);for(let t=0;t<re.length;t+=1)re[t].m(Dt,null);y(Dt,e[5]),c(Mt,Pt),c(Mt,Ot),c(w,Nt);for(let t=0;t<ae.length;t+=1)ae[t].m(w,null);c(C,jt),c(C,Ht),c(Ht,qt),c(o,Ut),c(o,Ft),e[48](Ft),c(o,Gt),c(o,It),c(It,Rt),c(It,Vt),c(It,Wt),de.m(Wt,null),c(Wt,Jt),c(Wt,Kt),e[53](n),Qt||(Xt=[p(S,"change",e[34]),p(j,"change",e[35]),p(Q,"input",e[36]),p(nt,"input",e[37]),p(dt,"input",e[38]),p(yt,"change",e[39]),p(kt,"click",g(h(e[18]))),p(Dt,"change",e[44]),p(Ot,"click",g(h(e[20]))),p(Ht,"click",g(h(e[17])))],Qt=!0)},p(t,e){if(2048&e[0]){let n;for(Yt=t[11],n=0;n<Yt.length;n+=1){const l=W(t,Yt,n);Zt[n]?Zt[n].p(l,e):(Zt[n]=J(l),Zt[n].c(),Zt[n].m(S,null))}for(;n<Zt.length;n+=1)Zt[n].d(1);Zt.length=Yt.length}if(6144&e[0]&&y(S,t[12]),512&e[0]){let n;for(te=t[9],n=0;n<te.length;n+=1){const l=V(t,te,n);ee[n]?ee[n].p(l,e):(ee[n]=K(l),ee[n].c(),ee[n].m(j,null))}for(;n<ee.length;n+=1)ee[n].d(1);ee.length=te.length}if(1536&e[0]&&y(j,t[10]),4&e[0]&&v(Q.value)!==t[2]&&_(Q,t[2]),8&e[0]&&v(nt.value)!==t[3]&&_(nt,t[3]),16&e[0]&&v(dt.value)!==t[4]&&_(dt,t[4]),256&e[0]){let n;for(ne=t[8],n=0;n<ne.length;n+=1){const l=R(t,ne,n);le[n]?le[n].p(l,e):(le[n]=X(l),le[n].c(),le[n].m(yt,null))}for(;n<le.length;n+=1)le[n].d(1);le.length=ne.length}if(384&e[0]&&y(yt,t[7]),128&e[0]){let n;for(oe=t[7].arguments,n=0;n<oe.length;n+=1){const l=G(t,oe,n);ie[n]?ie[n].p(l,e):(ie[n]=lt(l),ie[n].c(),ie[n].m(w,wt))}for(;n<ie.length;n+=1)ie[n].d(1);ie.length=oe.length}if(64&e[0]){let n;for(ce=t[6],n=0;n<ce.length;n+=1){const l=U(t,ce,n);re[n]?re[n].p(l,e):(re[n]=ot(l),re[n].c(),re[n].m(Dt,null))}for(;n<re.length;n+=1)re[n].d(1);re.length=ce.length}if(96&e[0]&&y(Dt,t[5]),32&e[0]){let n;for(ue=t[5].arguments,n=0;n<ue.length;n+=1){const l=B(t,ue,n);ae[n]?ae[n].p(l,e):(ae[n]=ut(l),ae[n].c(),ae[n].m(w,null))}for(;n<ae.length;n+=1)ae[n].d(1);ae.length=ue.length}2&e[0]&&$(qt,t[1]),2&e[0]&&Bt!==(Bt="btn btn-"+("Train"===t[1]?"primary":"warning"))&&m(Ht,"class",Bt),fe===(fe=se(t))&&de?de.p(t,e):(de.d(1),de=fe(t),de&&(de.c(),de.m(Wt,Jt)))},i:t,o:t,d(t){t&&u(n),a(Zt,t),a(ee,t),a(le,t),a(ie,t),a(re,t),a(ae,t),e[48](null),de.d(),e[53](null),Qt=!1,l(Xt)}}}function gt(t,e,n){const l={name:"",arguments:[]};let o,i,c,r,u,a="Train",s=null,f=32,d=50,p=.1,h=l,g=[],m=l,$=[],_=[],b=[],y=[];function k(t){const e=new CustomEvent("showModelInfo",{detail:t});u.dispatchEvent(e)}function C(t){const e=new CustomEvent("saveModel",{detail:t});u.dispatchEvent(e)}function w(t){n(14,c=t),c.config&&(n(10,o=c.config.architecture),n(12,i=c.config.dataset),n(2,f=c.config.batchSize),n(4,p=c.config.validation),n(5,h=c.config.optimizer),n(3,d=c.config.epochs),n(7,m=c.config.loss)),s&&s.react(r,c.plotData)}let z;return t.$$.update=()=>{16384&t.$$.dirty[0]&&(z=c&&c.plotData)},[function(){return{architecture:o,dataset:i,batchSize:f,validation:p,optimizer:h,epochs:d,loss:m}},a,f,d,p,h,g,m,$,_,o,b,i,y,c,r,u,function(){const t=new CustomEvent("onTrainClicked");u.dispatchEvent(t)},function(){const t=`https://keras.io/api/losses/${m.category.toLowerCase().replace(/ /g,"_")}/#${m.name.toLowerCase()+"-class"}/`;window.open(t,"_blank")},k,function(){const t=`https://keras.io/api/optimizers/${h.name.toLowerCase()}/`;window.open(t,"_blank")},C,w,function(t,e){!function(t){let e=1;t.losses.concat(t.optimizers).forEach(n=>{n.arguments=n.arguments.filter(t=>"name"!==t.name).map(n=>(n.name.includes("reduction")?(n.type="enum",n.options=t.reductions):n.type=typeof n.default,n.value=n.default,n.id="arg"+e++,n)).sort((t,e)=>{const[n,l]=[t,e].map(t=>"boolean"===t.type?1:0);return n-l})})}(e),n(6,g=e.optimizers),n(5,h=g[0]);const l={};e.losses.forEach(t=>{l[t.category]||(l[t.category]=[]),l[t.category].push(t)}),n(8,$=Object.entries(l)),n(7,m=e.losses[0]),s=t,s.newPlot(r)},function(t){n(13,y=y.concat(t)),c||n(14,c=t)},function(){return u},function(t,e,l){const o=y.find(e=>e.id===t);o.state=e,o.info=l,n(13,y),!e?n(1,a="Train"):e.startsWith("Training")&&n(1,a="Restart")},function(t,e){const n=y.find(e=>e.id===t);n.plotData=e,n===c&&w(n)},function(t){n(11,b=b.concat(t)),i||n(12,i=b[0])},function(t){n(11,b=b.map(e=>e.id===t.id?t:e))},function(t){n(11,b=b.filter(e=>e.id!==t)),i&&i.id===t&&n(12,i=b[0])},function(t){n(9,_=_.concat(t)),o||n(10,o=_[0])},function(t){n(9,_=_.map(e=>e.id===t.id?t:e))},function(t){n(9,_=_.filter(e=>e.id!==t)),o&&o.id===t&&n(10,o=_[0])},function(){i=x(this),n(12,i),n(11,b)},function(){o=x(this),n(10,o),n(9,_)},function(){f=v(this.value),n(2,f)},function(){d=v(this.value),n(3,d)},function(){p=v(this.value),n(4,p)},function(){m=x(this),n(7,m),n(8,$)},function(t,e){t[e].value=this.value,n(7,m),n(8,$)},function(t,e){t[e].value=this.checked,n(7,m),n(8,$)},function(t,e){t[e].value=x(this),n(7,m),n(8,$)},function(t,e){t[e].value=v(this.value),n(7,m),n(8,$)},function(){h=x(this),n(5,h),n(6,g)},function(t,e){t[e].value=this.value,n(5,h),n(6,g)},function(t,e){t[e].value=this.checked,n(5,h),n(6,g)},function(t,e){t[e].value=v(this.value),n(5,h),n(6,g)},function(t){A[t?"unshift":"push"](()=>{r=t,n(15,r)})},function(t,e){t[e].name=this.innerHTML,n(13,y)},t=>k(t),t=>C(t),t=>w(t),function(t){A[t?"unshift":"push"](()=>{u=t,n(16,u)})}]}return class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),H(this,t,gt,ht,i,{initialize:23,addModel:24,events:25,setModelState:26,setPlotData:27,addArtifact:28,updateArtifact:29,removeArtifact:30,addArchitecture:31,updateArchitecture:32,removeArchitecture:33,data:0},[-1,-1,-1])}get initialize(){return this.$$.ctx[23]}get addModel(){return this.$$.ctx[24]}get events(){return this.$$.ctx[25]}get setModelState(){return this.$$.ctx[26]}get setPlotData(){return this.$$.ctx[27]}get addArtifact(){return this.$$.ctx[28]}get updateArtifact(){return this.$$.ctx[29]}get removeArtifact(){return this.$$.ctx[30]}get addArchitecture(){return this.$$.ctx[31]}get updateArchitecture(){return this.$$.ctx[32]}get removeArchitecture(){return this.$$.ctx[33]}get data(){return this.$$.ctx[0]}}}));
 //# sourceMappingURL=TrainDashboard.js.map
diff --git a/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js.map b/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js.map
index 95502e13d..ba7f49704 100644
--- a/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js.map
+++ b/src/visualizers/widgets/TrainKeras/build/TrainDashboard.js.map
@@ -1 +1 @@
-{"version":3,"file":"TrainDashboard.js","sources":["../../../../../node_modules/svelte/internal/index.mjs","../TrainDashboard.svelte"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n    // @ts-ignore\n    for (const k in src)\n        tar[k] = src[k];\n    return tar;\n}\nfunction is_promise(value) {\n    return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n    element.__svelte_meta = {\n        loc: { file, line, column, char }\n    };\n}\nfunction run(fn) {\n    return fn();\n}\nfunction blank_object() {\n    return Object.create(null);\n}\nfunction run_all(fns) {\n    fns.forEach(run);\n}\nfunction is_function(thing) {\n    return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n    return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n    return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n    return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n    if (store != null && typeof store.subscribe !== 'function') {\n        throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n    }\n}\nfunction subscribe(store, ...callbacks) {\n    if (store == null) {\n        return noop;\n    }\n    const unsub = store.subscribe(...callbacks);\n    return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n    let value;\n    subscribe(store, _ => value = _)();\n    return value;\n}\nfunction component_subscribe(component, store, callback) {\n    component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n    if (definition) {\n        const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n        return definition[0](slot_ctx);\n    }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n    return definition[1] && fn\n        ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n        : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n    if (definition[2] && fn) {\n        const lets = definition[2](fn(dirty));\n        if ($$scope.dirty === undefined) {\n            return lets;\n        }\n        if (typeof lets === 'object') {\n            const merged = [];\n            const len = Math.max($$scope.dirty.length, lets.length);\n            for (let i = 0; i < len; i += 1) {\n                merged[i] = $$scope.dirty[i] | lets[i];\n            }\n            return merged;\n        }\n        return $$scope.dirty | lets;\n    }\n    return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n    const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n    if (slot_changes) {\n        const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n        slot.p(slot_context, slot_changes);\n    }\n}\nfunction exclude_internal_props(props) {\n    const result = {};\n    for (const k in props)\n        if (k[0] !== '$')\n            result[k] = props[k];\n    return result;\n}\nfunction compute_rest_props(props, keys) {\n    const rest = {};\n    keys = new Set(keys);\n    for (const k in props)\n        if (!keys.has(k) && k[0] !== '$')\n            rest[k] = props[k];\n    return rest;\n}\nfunction once(fn) {\n    let ran = false;\n    return function (...args) {\n        if (ran)\n            return;\n        ran = true;\n        fn.call(this, ...args);\n    };\n}\nfunction null_to_empty(value) {\n    return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n    store.set(value);\n    return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n    return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n    ? () => window.performance.now()\n    : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n    now = fn;\n}\nfunction set_raf(fn) {\n    raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n    tasks.forEach(task => {\n        if (!task.c(now)) {\n            tasks.delete(task);\n            task.f();\n        }\n    });\n    if (tasks.size !== 0)\n        raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n    tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n    let task;\n    if (tasks.size === 0)\n        raf(run_tasks);\n    return {\n        promise: new Promise(fulfill => {\n            tasks.add(task = { c: callback, f: fulfill });\n        }),\n        abort() {\n            tasks.delete(task);\n        }\n    };\n}\n\nfunction append(target, node) {\n    target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n    target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n    node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n    for (let i = 0; i < iterations.length; i += 1) {\n        if (iterations[i])\n            iterations[i].d(detaching);\n    }\n}\nfunction element(name) {\n    return document.createElement(name);\n}\nfunction element_is(name, is) {\n    return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n    const target = {};\n    for (const k in obj) {\n        if (has_prop(obj, k)\n            // @ts-ignore\n            && exclude.indexOf(k) === -1) {\n            // @ts-ignore\n            target[k] = obj[k];\n        }\n    }\n    return target;\n}\nfunction svg_element(name) {\n    return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n    return document.createTextNode(data);\n}\nfunction space() {\n    return text(' ');\n}\nfunction empty() {\n    return text('');\n}\nfunction listen(node, event, handler, options) {\n    node.addEventListener(event, handler, options);\n    return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n    return function (event) {\n        event.preventDefault();\n        // @ts-ignore\n        return fn.call(this, event);\n    };\n}\nfunction stop_propagation(fn) {\n    return function (event) {\n        event.stopPropagation();\n        // @ts-ignore\n        return fn.call(this, event);\n    };\n}\nfunction self(fn) {\n    return function (event) {\n        // @ts-ignore\n        if (event.target === this)\n            fn.call(this, event);\n    };\n}\nfunction attr(node, attribute, value) {\n    if (value == null)\n        node.removeAttribute(attribute);\n    else if (node.getAttribute(attribute) !== value)\n        node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n    // @ts-ignore\n    const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n    for (const key in attributes) {\n        if (attributes[key] == null) {\n            node.removeAttribute(key);\n        }\n        else if (key === 'style') {\n            node.style.cssText = attributes[key];\n        }\n        else if (key === '__value') {\n            node.value = node[key] = attributes[key];\n        }\n        else if (descriptors[key] && descriptors[key].set) {\n            node[key] = attributes[key];\n        }\n        else {\n            attr(node, key, attributes[key]);\n        }\n    }\n}\nfunction set_svg_attributes(node, attributes) {\n    for (const key in attributes) {\n        attr(node, key, attributes[key]);\n    }\n}\nfunction set_custom_element_data(node, prop, value) {\n    if (prop in node) {\n        node[prop] = value;\n    }\n    else {\n        attr(node, prop, value);\n    }\n}\nfunction xlink_attr(node, attribute, value) {\n    node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n    const value = new Set();\n    for (let i = 0; i < group.length; i += 1) {\n        if (group[i].checked)\n            value.add(group[i].__value);\n    }\n    if (!checked) {\n        value.delete(__value);\n    }\n    return Array.from(value);\n}\nfunction to_number(value) {\n    return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n    const array = [];\n    for (let i = 0; i < ranges.length; i += 1) {\n        array.push({ start: ranges.start(i), end: ranges.end(i) });\n    }\n    return array;\n}\nfunction children(element) {\n    return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n    for (let i = 0; i < nodes.length; i += 1) {\n        const node = nodes[i];\n        if (node.nodeName === name) {\n            let j = 0;\n            const remove = [];\n            while (j < node.attributes.length) {\n                const attribute = node.attributes[j++];\n                if (!attributes[attribute.name]) {\n                    remove.push(attribute.name);\n                }\n            }\n            for (let k = 0; k < remove.length; k++) {\n                node.removeAttribute(remove[k]);\n            }\n            return nodes.splice(i, 1)[0];\n        }\n    }\n    return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n    for (let i = 0; i < nodes.length; i += 1) {\n        const node = nodes[i];\n        if (node.nodeType === 3) {\n            node.data = '' + data;\n            return nodes.splice(i, 1)[0];\n        }\n    }\n    return text(data);\n}\nfunction claim_space(nodes) {\n    return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n    data = '' + data;\n    if (text.wholeText !== data)\n        text.data = data;\n}\nfunction set_input_value(input, value) {\n    input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n    try {\n        input.type = type;\n    }\n    catch (e) {\n        // do nothing\n    }\n}\nfunction set_style(node, key, value, important) {\n    node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n    for (let i = 0; i < select.options.length; i += 1) {\n        const option = select.options[i];\n        if (option.__value === value) {\n            option.selected = true;\n            return;\n        }\n    }\n}\nfunction select_options(select, value) {\n    for (let i = 0; i < select.options.length; i += 1) {\n        const option = select.options[i];\n        option.selected = ~value.indexOf(option.__value);\n    }\n}\nfunction select_value(select) {\n    const selected_option = select.querySelector(':checked') || select.options[0];\n    return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n    return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n    if (crossorigin === undefined) {\n        crossorigin = false;\n        try {\n            if (typeof window !== 'undefined' && window.parent) {\n                void window.parent.document;\n            }\n        }\n        catch (error) {\n            crossorigin = true;\n        }\n    }\n    return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n    const computed_style = getComputedStyle(node);\n    const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n    if (computed_style.position === 'static') {\n        node.style.position = 'relative';\n    }\n    const iframe = element('iframe');\n    iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n        `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n    iframe.setAttribute('aria-hidden', 'true');\n    iframe.tabIndex = -1;\n    const crossorigin = is_crossorigin();\n    let unsubscribe;\n    if (crossorigin) {\n        iframe.src = `data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>`;\n        unsubscribe = listen(window, 'message', (event) => {\n            if (event.source === iframe.contentWindow)\n                fn();\n        });\n    }\n    else {\n        iframe.src = 'about:blank';\n        iframe.onload = () => {\n            unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n        };\n    }\n    append(node, iframe);\n    return () => {\n        if (crossorigin) {\n            unsubscribe();\n        }\n        else if (unsubscribe && iframe.contentWindow) {\n            unsubscribe();\n        }\n        detach(iframe);\n    };\n}\nfunction toggle_class(element, name, toggle) {\n    element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n    const e = document.createEvent('CustomEvent');\n    e.initCustomEvent(type, false, false, detail);\n    return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n    return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n    constructor(anchor = null) {\n        this.a = anchor;\n        this.e = this.n = null;\n    }\n    m(html, target, anchor = null) {\n        if (!this.e) {\n            this.e = element(target.nodeName);\n            this.t = target;\n            this.h(html);\n        }\n        this.i(anchor);\n    }\n    h(html) {\n        this.e.innerHTML = html;\n        this.n = Array.from(this.e.childNodes);\n    }\n    i(anchor) {\n        for (let i = 0; i < this.n.length; i += 1) {\n            insert(this.t, this.n[i], anchor);\n        }\n    }\n    p(html) {\n        this.d();\n        this.h(html);\n        this.i(this.a);\n    }\n    d() {\n        this.n.forEach(detach);\n    }\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n    let hash = 5381;\n    let i = str.length;\n    while (i--)\n        hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n    return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n    const step = 16.666 / duration;\n    let keyframes = '{\\n';\n    for (let p = 0; p <= 1; p += step) {\n        const t = a + (b - a) * ease(p);\n        keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n    }\n    const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n    const name = `__svelte_${hash(rule)}_${uid}`;\n    const doc = node.ownerDocument;\n    active_docs.add(doc);\n    const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n    const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n    if (!current_rules[name]) {\n        current_rules[name] = true;\n        stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n    }\n    const animation = node.style.animation || '';\n    node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n    active += 1;\n    return name;\n}\nfunction delete_rule(node, name) {\n    const previous = (node.style.animation || '').split(', ');\n    const next = previous.filter(name\n        ? anim => anim.indexOf(name) < 0 // remove specific animation\n        : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n    );\n    const deleted = previous.length - next.length;\n    if (deleted) {\n        node.style.animation = next.join(', ');\n        active -= deleted;\n        if (!active)\n            clear_rules();\n    }\n}\nfunction clear_rules() {\n    raf(() => {\n        if (active)\n            return;\n        active_docs.forEach(doc => {\n            const stylesheet = doc.__svelte_stylesheet;\n            let i = stylesheet.cssRules.length;\n            while (i--)\n                stylesheet.deleteRule(i);\n            doc.__svelte_rules = {};\n        });\n        active_docs.clear();\n    });\n}\n\nfunction create_animation(node, from, fn, params) {\n    if (!from)\n        return noop;\n    const to = node.getBoundingClientRect();\n    if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n        return noop;\n    const { delay = 0, duration = 300, easing = identity, \n    // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n    start: start_time = now() + delay, \n    // @ts-ignore todo:\n    end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n    let running = true;\n    let started = false;\n    let name;\n    function start() {\n        if (css) {\n            name = create_rule(node, 0, 1, duration, delay, easing, css);\n        }\n        if (!delay) {\n            started = true;\n        }\n    }\n    function stop() {\n        if (css)\n            delete_rule(node, name);\n        running = false;\n    }\n    loop(now => {\n        if (!started && now >= start_time) {\n            started = true;\n        }\n        if (started && now >= end) {\n            tick(1, 0);\n            stop();\n        }\n        if (!running) {\n            return false;\n        }\n        if (started) {\n            const p = now - start_time;\n            const t = 0 + 1 * easing(p / duration);\n            tick(t, 1 - t);\n        }\n        return true;\n    });\n    start();\n    tick(0, 1);\n    return stop;\n}\nfunction fix_position(node) {\n    const style = getComputedStyle(node);\n    if (style.position !== 'absolute' && style.position !== 'fixed') {\n        const { width, height } = style;\n        const a = node.getBoundingClientRect();\n        node.style.position = 'absolute';\n        node.style.width = width;\n        node.style.height = height;\n        add_transform(node, a);\n    }\n}\nfunction add_transform(node, a) {\n    const b = node.getBoundingClientRect();\n    if (a.left !== b.left || a.top !== b.top) {\n        const style = getComputedStyle(node);\n        const transform = style.transform === 'none' ? '' : style.transform;\n        node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n    }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n    current_component = component;\n}\nfunction get_current_component() {\n    if (!current_component)\n        throw new Error(`Function called outside component initialization`);\n    return current_component;\n}\nfunction beforeUpdate(fn) {\n    get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n    get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n    get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n    get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n    const component = get_current_component();\n    return (type, detail) => {\n        const callbacks = component.$$.callbacks[type];\n        if (callbacks) {\n            // TODO are there situations where events could be dispatched\n            // in a server (non-DOM) environment?\n            const event = custom_event(type, detail);\n            callbacks.slice().forEach(fn => {\n                fn.call(component, event);\n            });\n        }\n    };\n}\nfunction setContext(key, context) {\n    get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n    return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n    const callbacks = component.$$.callbacks[event.type];\n    if (callbacks) {\n        callbacks.slice().forEach(fn => fn(event));\n    }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n    if (!update_scheduled) {\n        update_scheduled = true;\n        resolved_promise.then(flush);\n    }\n}\nfunction tick() {\n    schedule_update();\n    return resolved_promise;\n}\nfunction add_render_callback(fn) {\n    render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n    flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n    if (flushing)\n        return;\n    flushing = true;\n    do {\n        // first, call beforeUpdate functions\n        // and update components\n        for (let i = 0; i < dirty_components.length; i += 1) {\n            const component = dirty_components[i];\n            set_current_component(component);\n            update(component.$$);\n        }\n        dirty_components.length = 0;\n        while (binding_callbacks.length)\n            binding_callbacks.pop()();\n        // then, once components are updated, call\n        // afterUpdate functions. This may cause\n        // subsequent updates...\n        for (let i = 0; i < render_callbacks.length; i += 1) {\n            const callback = render_callbacks[i];\n            if (!seen_callbacks.has(callback)) {\n                // ...so guard against infinite loops\n                seen_callbacks.add(callback);\n                callback();\n            }\n        }\n        render_callbacks.length = 0;\n    } while (dirty_components.length);\n    while (flush_callbacks.length) {\n        flush_callbacks.pop()();\n    }\n    update_scheduled = false;\n    flushing = false;\n    seen_callbacks.clear();\n}\nfunction update($$) {\n    if ($$.fragment !== null) {\n        $$.update();\n        run_all($$.before_update);\n        const dirty = $$.dirty;\n        $$.dirty = [-1];\n        $$.fragment && $$.fragment.p($$.ctx, dirty);\n        $$.after_update.forEach(add_render_callback);\n    }\n}\n\nlet promise;\nfunction wait() {\n    if (!promise) {\n        promise = Promise.resolve();\n        promise.then(() => {\n            promise = null;\n        });\n    }\n    return promise;\n}\nfunction dispatch(node, direction, kind) {\n    node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n    outros = {\n        r: 0,\n        c: [],\n        p: outros // parent group\n    };\n}\nfunction check_outros() {\n    if (!outros.r) {\n        run_all(outros.c);\n    }\n    outros = outros.p;\n}\nfunction transition_in(block, local) {\n    if (block && block.i) {\n        outroing.delete(block);\n        block.i(local);\n    }\n}\nfunction transition_out(block, local, detach, callback) {\n    if (block && block.o) {\n        if (outroing.has(block))\n            return;\n        outroing.add(block);\n        outros.c.push(() => {\n            outroing.delete(block);\n            if (callback) {\n                if (detach)\n                    block.d(1);\n                callback();\n            }\n        });\n        block.o(local);\n    }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n    let config = fn(node, params);\n    let running = false;\n    let animation_name;\n    let task;\n    let uid = 0;\n    function cleanup() {\n        if (animation_name)\n            delete_rule(node, animation_name);\n    }\n    function go() {\n        const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n        if (css)\n            animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n        tick(0, 1);\n        const start_time = now() + delay;\n        const end_time = start_time + duration;\n        if (task)\n            task.abort();\n        running = true;\n        add_render_callback(() => dispatch(node, true, 'start'));\n        task = loop(now => {\n            if (running) {\n                if (now >= end_time) {\n                    tick(1, 0);\n                    dispatch(node, true, 'end');\n                    cleanup();\n                    return running = false;\n                }\n                if (now >= start_time) {\n                    const t = easing((now - start_time) / duration);\n                    tick(t, 1 - t);\n                }\n            }\n            return running;\n        });\n    }\n    let started = false;\n    return {\n        start() {\n            if (started)\n                return;\n            delete_rule(node);\n            if (is_function(config)) {\n                config = config();\n                wait().then(go);\n            }\n            else {\n                go();\n            }\n        },\n        invalidate() {\n            started = false;\n        },\n        end() {\n            if (running) {\n                cleanup();\n                running = false;\n            }\n        }\n    };\n}\nfunction create_out_transition(node, fn, params) {\n    let config = fn(node, params);\n    let running = true;\n    let animation_name;\n    const group = outros;\n    group.r += 1;\n    function go() {\n        const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n        if (css)\n            animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n        const start_time = now() + delay;\n        const end_time = start_time + duration;\n        add_render_callback(() => dispatch(node, false, 'start'));\n        loop(now => {\n            if (running) {\n                if (now >= end_time) {\n                    tick(0, 1);\n                    dispatch(node, false, 'end');\n                    if (!--group.r) {\n                        // this will result in `end()` being called,\n                        // so we don't need to clean up here\n                        run_all(group.c);\n                    }\n                    return false;\n                }\n                if (now >= start_time) {\n                    const t = easing((now - start_time) / duration);\n                    tick(1 - t, t);\n                }\n            }\n            return running;\n        });\n    }\n    if (is_function(config)) {\n        wait().then(() => {\n            // @ts-ignore\n            config = config();\n            go();\n        });\n    }\n    else {\n        go();\n    }\n    return {\n        end(reset) {\n            if (reset && config.tick) {\n                config.tick(1, 0);\n            }\n            if (running) {\n                if (animation_name)\n                    delete_rule(node, animation_name);\n                running = false;\n            }\n        }\n    };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n    let config = fn(node, params);\n    let t = intro ? 0 : 1;\n    let running_program = null;\n    let pending_program = null;\n    let animation_name = null;\n    function clear_animation() {\n        if (animation_name)\n            delete_rule(node, animation_name);\n    }\n    function init(program, duration) {\n        const d = program.b - t;\n        duration *= Math.abs(d);\n        return {\n            a: t,\n            b: program.b,\n            d,\n            duration,\n            start: program.start,\n            end: program.start + duration,\n            group: program.group\n        };\n    }\n    function go(b) {\n        const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n        const program = {\n            start: now() + delay,\n            b\n        };\n        if (!b) {\n            // @ts-ignore todo: improve typings\n            program.group = outros;\n            outros.r += 1;\n        }\n        if (running_program) {\n            pending_program = program;\n        }\n        else {\n            // if this is an intro, and there's a delay, we need to do\n            // an initial tick and/or apply CSS animation immediately\n            if (css) {\n                clear_animation();\n                animation_name = create_rule(node, t, b, duration, delay, easing, css);\n            }\n            if (b)\n                tick(0, 1);\n            running_program = init(program, duration);\n            add_render_callback(() => dispatch(node, b, 'start'));\n            loop(now => {\n                if (pending_program && now > pending_program.start) {\n                    running_program = init(pending_program, duration);\n                    pending_program = null;\n                    dispatch(node, running_program.b, 'start');\n                    if (css) {\n                        clear_animation();\n                        animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n                    }\n                }\n                if (running_program) {\n                    if (now >= running_program.end) {\n                        tick(t = running_program.b, 1 - t);\n                        dispatch(node, running_program.b, 'end');\n                        if (!pending_program) {\n                            // we're done\n                            if (running_program.b) {\n                                // intro — we can tidy up immediately\n                                clear_animation();\n                            }\n                            else {\n                                // outro — needs to be coordinated\n                                if (!--running_program.group.r)\n                                    run_all(running_program.group.c);\n                            }\n                        }\n                        running_program = null;\n                    }\n                    else if (now >= running_program.start) {\n                        const p = now - running_program.start;\n                        t = running_program.a + running_program.d * easing(p / running_program.duration);\n                        tick(t, 1 - t);\n                    }\n                }\n                return !!(running_program || pending_program);\n            });\n        }\n    }\n    return {\n        run(b) {\n            if (is_function(config)) {\n                wait().then(() => {\n                    // @ts-ignore\n                    config = config();\n                    go(b);\n                });\n            }\n            else {\n                go(b);\n            }\n        },\n        end() {\n            clear_animation();\n            running_program = pending_program = null;\n        }\n    };\n}\n\nfunction handle_promise(promise, info) {\n    const token = info.token = {};\n    function update(type, index, key, value) {\n        if (info.token !== token)\n            return;\n        info.resolved = value;\n        let child_ctx = info.ctx;\n        if (key !== undefined) {\n            child_ctx = child_ctx.slice();\n            child_ctx[key] = value;\n        }\n        const block = type && (info.current = type)(child_ctx);\n        let needs_flush = false;\n        if (info.block) {\n            if (info.blocks) {\n                info.blocks.forEach((block, i) => {\n                    if (i !== index && block) {\n                        group_outros();\n                        transition_out(block, 1, 1, () => {\n                            info.blocks[i] = null;\n                        });\n                        check_outros();\n                    }\n                });\n            }\n            else {\n                info.block.d(1);\n            }\n            block.c();\n            transition_in(block, 1);\n            block.m(info.mount(), info.anchor);\n            needs_flush = true;\n        }\n        info.block = block;\n        if (info.blocks)\n            info.blocks[index] = block;\n        if (needs_flush) {\n            flush();\n        }\n    }\n    if (is_promise(promise)) {\n        const current_component = get_current_component();\n        promise.then(value => {\n            set_current_component(current_component);\n            update(info.then, 1, info.value, value);\n            set_current_component(null);\n        }, error => {\n            set_current_component(current_component);\n            update(info.catch, 2, info.error, error);\n            set_current_component(null);\n        });\n        // if we previously had a then/catch block, destroy it\n        if (info.current !== info.pending) {\n            update(info.pending, 0);\n            return true;\n        }\n    }\n    else {\n        if (info.current !== info.then) {\n            update(info.then, 1, info.value, promise);\n            return true;\n        }\n        info.resolved = promise;\n    }\n}\n\nconst globals = (typeof window !== 'undefined'\n    ? window\n    : typeof globalThis !== 'undefined'\n        ? globalThis\n        : global);\n\nfunction destroy_block(block, lookup) {\n    block.d(1);\n    lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n    transition_out(block, 1, 1, () => {\n        lookup.delete(block.key);\n    });\n}\nfunction fix_and_destroy_block(block, lookup) {\n    block.f();\n    destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n    block.f();\n    outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n    let o = old_blocks.length;\n    let n = list.length;\n    let i = o;\n    const old_indexes = {};\n    while (i--)\n        old_indexes[old_blocks[i].key] = i;\n    const new_blocks = [];\n    const new_lookup = new Map();\n    const deltas = new Map();\n    i = n;\n    while (i--) {\n        const child_ctx = get_context(ctx, list, i);\n        const key = get_key(child_ctx);\n        let block = lookup.get(key);\n        if (!block) {\n            block = create_each_block(key, child_ctx);\n            block.c();\n        }\n        else if (dynamic) {\n            block.p(child_ctx, dirty);\n        }\n        new_lookup.set(key, new_blocks[i] = block);\n        if (key in old_indexes)\n            deltas.set(key, Math.abs(i - old_indexes[key]));\n    }\n    const will_move = new Set();\n    const did_move = new Set();\n    function insert(block) {\n        transition_in(block, 1);\n        block.m(node, next);\n        lookup.set(block.key, block);\n        next = block.first;\n        n--;\n    }\n    while (o && n) {\n        const new_block = new_blocks[n - 1];\n        const old_block = old_blocks[o - 1];\n        const new_key = new_block.key;\n        const old_key = old_block.key;\n        if (new_block === old_block) {\n            // do nothing\n            next = new_block.first;\n            o--;\n            n--;\n        }\n        else if (!new_lookup.has(old_key)) {\n            // remove old block\n            destroy(old_block, lookup);\n            o--;\n        }\n        else if (!lookup.has(new_key) || will_move.has(new_key)) {\n            insert(new_block);\n        }\n        else if (did_move.has(old_key)) {\n            o--;\n        }\n        else if (deltas.get(new_key) > deltas.get(old_key)) {\n            did_move.add(new_key);\n            insert(new_block);\n        }\n        else {\n            will_move.add(old_key);\n            o--;\n        }\n    }\n    while (o--) {\n        const old_block = old_blocks[o];\n        if (!new_lookup.has(old_block.key))\n            destroy(old_block, lookup);\n    }\n    while (n)\n        insert(new_blocks[n - 1]);\n    return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n    const keys = new Set();\n    for (let i = 0; i < list.length; i++) {\n        const key = get_key(get_context(ctx, list, i));\n        if (keys.has(key)) {\n            throw new Error(`Cannot have duplicate keys in a keyed each`);\n        }\n        keys.add(key);\n    }\n}\n\nfunction get_spread_update(levels, updates) {\n    const update = {};\n    const to_null_out = {};\n    const accounted_for = { $$scope: 1 };\n    let i = levels.length;\n    while (i--) {\n        const o = levels[i];\n        const n = updates[i];\n        if (n) {\n            for (const key in o) {\n                if (!(key in n))\n                    to_null_out[key] = 1;\n            }\n            for (const key in n) {\n                if (!accounted_for[key]) {\n                    update[key] = n[key];\n                    accounted_for[key] = 1;\n                }\n            }\n            levels[i] = n;\n        }\n        else {\n            for (const key in o) {\n                accounted_for[key] = 1;\n            }\n        }\n    }\n    for (const key in to_null_out) {\n        if (!(key in update))\n            update[key] = undefined;\n    }\n    return update;\n}\nfunction get_spread_object(spread_props) {\n    return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n    'allowfullscreen',\n    'allowpaymentrequest',\n    'async',\n    'autofocus',\n    'autoplay',\n    'checked',\n    'controls',\n    'default',\n    'defer',\n    'disabled',\n    'formnovalidate',\n    'hidden',\n    'ismap',\n    'loop',\n    'multiple',\n    'muted',\n    'nomodule',\n    'novalidate',\n    'open',\n    'playsinline',\n    'readonly',\n    'required',\n    'reversed',\n    'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n    const attributes = Object.assign({}, ...args);\n    if (classes_to_add) {\n        if (attributes.class == null) {\n            attributes.class = classes_to_add;\n        }\n        else {\n            attributes.class += ' ' + classes_to_add;\n        }\n    }\n    let str = '';\n    Object.keys(attributes).forEach(name => {\n        if (invalid_attribute_name_character.test(name))\n            return;\n        const value = attributes[name];\n        if (value === true)\n            str += \" \" + name;\n        else if (boolean_attributes.has(name.toLowerCase())) {\n            if (value)\n                str += \" \" + name;\n        }\n        else if (value != null) {\n            str += ` ${name}=\"${String(value).replace(/\"/g, '&#34;').replace(/'/g, '&#39;')}\"`;\n        }\n    });\n    return str;\n}\nconst escaped = {\n    '\"': '&quot;',\n    \"'\": '&#39;',\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;'\n};\nfunction escape(html) {\n    return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n    let str = '';\n    for (let i = 0; i < items.length; i += 1) {\n        str += fn(items[i], i);\n    }\n    return str;\n}\nconst missing_component = {\n    $$render: () => ''\n};\nfunction validate_component(component, name) {\n    if (!component || !component.$$render) {\n        if (name === 'svelte:component')\n            name += ' this={...}';\n        throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n    }\n    return component;\n}\nfunction debug(file, line, column, values) {\n    console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n    console.log(values); // eslint-disable-line no-console\n    return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n    function $$render(result, props, bindings, slots) {\n        const parent_component = current_component;\n        const $$ = {\n            on_destroy,\n            context: new Map(parent_component ? parent_component.$$.context : []),\n            // these will be immediately discarded\n            on_mount: [],\n            before_update: [],\n            after_update: [],\n            callbacks: blank_object()\n        };\n        set_current_component({ $$ });\n        const html = fn(result, props, bindings, slots);\n        set_current_component(parent_component);\n        return html;\n    }\n    return {\n        render: (props = {}, options = {}) => {\n            on_destroy = [];\n            const result = { title: '', head: '', css: new Set() };\n            const html = $$render(result, props, {}, options);\n            run_all(on_destroy);\n            return {\n                html,\n                css: {\n                    code: Array.from(result.css).map(css => css.code).join('\\n'),\n                    map: null // TODO\n                },\n                head: result.title + result.head\n            };\n        },\n        $$render\n    };\n}\nfunction add_attribute(name, value, boolean) {\n    if (value == null || (boolean && !value))\n        return '';\n    return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n    return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n    const index = component.$$.props[name];\n    if (index !== undefined) {\n        component.$$.bound[index] = callback;\n        callback(component.$$.ctx[index]);\n    }\n}\nfunction create_component(block) {\n    block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n    block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n    const { fragment, on_mount, on_destroy, after_update } = component.$$;\n    fragment && fragment.m(target, anchor);\n    // onMount happens before the initial afterUpdate\n    add_render_callback(() => {\n        const new_on_destroy = on_mount.map(run).filter(is_function);\n        if (on_destroy) {\n            on_destroy.push(...new_on_destroy);\n        }\n        else {\n            // Edge case - component was destroyed immediately,\n            // most likely as a result of a binding initialising\n            run_all(new_on_destroy);\n        }\n        component.$$.on_mount = [];\n    });\n    after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n    const $$ = component.$$;\n    if ($$.fragment !== null) {\n        run_all($$.on_destroy);\n        $$.fragment && $$.fragment.d(detaching);\n        // TODO null out other refs, including component.$$ (but need to\n        // preserve final state?)\n        $$.on_destroy = $$.fragment = null;\n        $$.ctx = [];\n    }\n}\nfunction make_dirty(component, i) {\n    if (component.$$.dirty[0] === -1) {\n        dirty_components.push(component);\n        schedule_update();\n        component.$$.dirty.fill(0);\n    }\n    component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n    const parent_component = current_component;\n    set_current_component(component);\n    const prop_values = options.props || {};\n    const $$ = component.$$ = {\n        fragment: null,\n        ctx: null,\n        // state\n        props,\n        update: noop,\n        not_equal,\n        bound: blank_object(),\n        // lifecycle\n        on_mount: [],\n        on_destroy: [],\n        before_update: [],\n        after_update: [],\n        context: new Map(parent_component ? parent_component.$$.context : []),\n        // everything else\n        callbacks: blank_object(),\n        dirty,\n        skip_bound: false\n    };\n    let ready = false;\n    $$.ctx = instance\n        ? instance(component, prop_values, (i, ret, ...rest) => {\n            const value = rest.length ? rest[0] : ret;\n            if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n                if (!$$.skip_bound && $$.bound[i])\n                    $$.bound[i](value);\n                if (ready)\n                    make_dirty(component, i);\n            }\n            return ret;\n        })\n        : [];\n    $$.update();\n    ready = true;\n    run_all($$.before_update);\n    // `false` as a special case of no DOM component\n    $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n    if (options.target) {\n        if (options.hydrate) {\n            const nodes = children(options.target);\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            $$.fragment && $$.fragment.l(nodes);\n            nodes.forEach(detach);\n        }\n        else {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            $$.fragment && $$.fragment.c();\n        }\n        if (options.intro)\n            transition_in(component.$$.fragment);\n        mount_component(component, options.target, options.anchor);\n        flush();\n    }\n    set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n    SvelteElement = class extends HTMLElement {\n        constructor() {\n            super();\n            this.attachShadow({ mode: 'open' });\n        }\n        connectedCallback() {\n            // @ts-ignore todo: improve typings\n            for (const key in this.$$.slotted) {\n                // @ts-ignore todo: improve typings\n                this.appendChild(this.$$.slotted[key]);\n            }\n        }\n        attributeChangedCallback(attr, _oldValue, newValue) {\n            this[attr] = newValue;\n        }\n        $destroy() {\n            destroy_component(this, 1);\n            this.$destroy = noop;\n        }\n        $on(type, callback) {\n            // TODO should this delegate to addEventListener?\n            const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n            callbacks.push(callback);\n            return () => {\n                const index = callbacks.indexOf(callback);\n                if (index !== -1)\n                    callbacks.splice(index, 1);\n            };\n        }\n        $set($$props) {\n            if (this.$$set && !is_empty($$props)) {\n                this.$$.skip_bound = true;\n                this.$$set($$props);\n                this.$$.skip_bound = false;\n            }\n        }\n    };\n}\nclass SvelteComponent {\n    $destroy() {\n        destroy_component(this, 1);\n        this.$destroy = noop;\n    }\n    $on(type, callback) {\n        const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n        callbacks.push(callback);\n        return () => {\n            const index = callbacks.indexOf(callback);\n            if (index !== -1)\n                callbacks.splice(index, 1);\n        };\n    }\n    $set($$props) {\n        if (this.$$set && !is_empty($$props)) {\n            this.$$.skip_bound = true;\n            this.$$set($$props);\n            this.$$.skip_bound = false;\n        }\n    }\n}\n\nfunction dispatch_dev(type, detail) {\n    document.dispatchEvent(custom_event(type, Object.assign({ version: '3.24.1' }, detail)));\n}\nfunction append_dev(target, node) {\n    dispatch_dev(\"SvelteDOMInsert\", { target, node });\n    append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n    dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n    insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n    dispatch_dev(\"SvelteDOMRemove\", { node });\n    detach(node);\n}\nfunction detach_between_dev(before, after) {\n    while (before.nextSibling && before.nextSibling !== after) {\n        detach_dev(before.nextSibling);\n    }\n}\nfunction detach_before_dev(after) {\n    while (after.previousSibling) {\n        detach_dev(after.previousSibling);\n    }\n}\nfunction detach_after_dev(before) {\n    while (before.nextSibling) {\n        detach_dev(before.nextSibling);\n    }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n    const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n    if (has_prevent_default)\n        modifiers.push('preventDefault');\n    if (has_stop_propagation)\n        modifiers.push('stopPropagation');\n    dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n    const dispose = listen(node, event, handler, options);\n    return () => {\n        dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n        dispose();\n    };\n}\nfunction attr_dev(node, attribute, value) {\n    attr(node, attribute, value);\n    if (value == null)\n        dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n    else\n        dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n    node[property] = value;\n    dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n    node.dataset[property] = value;\n    dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n    data = '' + data;\n    if (text.wholeText === data)\n        return;\n    dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n    text.data = data;\n}\nfunction validate_each_argument(arg) {\n    if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n        let msg = '{#each} only iterates over array-like objects.';\n        if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n            msg += ' You can use a spread to convert this iterable into an array.';\n        }\n        throw new Error(msg);\n    }\n}\nfunction validate_slots(name, slot, keys) {\n    for (const slot_key of Object.keys(slot)) {\n        if (!~keys.indexOf(slot_key)) {\n            console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n        }\n    }\n}\nclass SvelteComponentDev extends SvelteComponent {\n    constructor(options) {\n        if (!options || (!options.target && !options.$$inline)) {\n            throw new Error(`'target' is a required option`);\n        }\n        super();\n    }\n    $destroy() {\n        super.$destroy();\n        this.$destroy = () => {\n            console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n        };\n    }\n    $capture_state() { }\n    $inject_state() { }\n}\nfunction loop_guard(timeout) {\n    const start = Date.now();\n    return () => {\n        if (Date.now() - start > timeout) {\n            throw new Error(`Infinite loop detected`);\n        }\n    };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","<script>\n  const EMPTY_FN_SCHEMA = {name: '', arguments: []};\n  let startTrainLabel = 'Train';\n  let Plotly = null;\n\tlet batchSize = 32;\n\tlet epochs = 50;\n\tlet validation = 0.1;\n  let optimizer = EMPTY_FN_SCHEMA;\n  let optimizers = [];\n  let loss = EMPTY_FN_SCHEMA;\n  let categorizedLosses = [];\n  let architectures = [];\n  let architecture;\n  let artifacts = [];\n  let dataset;\n  let models = [];\n  let displayedModel;\n  let accuracyPlot;\n  $: plotData = displayedModel && displayedModel.plotData;\n  let eventElement;\n\n  function decorateSchemas(schemas) {\n    schemas.losses.concat(schemas.optimizers).forEach(fn => {\n      fn.arguments = fn.arguments\n        .filter(arg => arg.name !== 'name')\n        .map(arg => {\n          if (arg.name.includes('reduction')) {\n            arg.type = 'enum';\n            arg.options = schemas.reductions;\n          } else {\n            arg.type = typeof(arg.default);\n          }\n          arg.value = arg.default;\n          if (arg.type === 'boolean') {\n              console.warn('Unsupported argument:', arg);\n          }\n          return arg;\n        });\n    });\n  }\n\n  export function initialize(plotly, schemas) {\n    decorateSchemas(schemas);\n    optimizers = schemas.optimizers;\n    optimizer = optimizers[0];\n    const lossesByCategory = {};\n    schemas.losses.forEach(loss => {\n      if (!lossesByCategory[loss.category]) {\n        lossesByCategory[loss.category] = [];\n      }\n      lossesByCategory[loss.category].push(loss);\n    });\n\n    categorizedLosses = Object.entries(lossesByCategory);\n    loss = schemas.losses[0];\n    Plotly = plotly;\n    Plotly.newPlot(accuracyPlot);\n  }\n\n  function onTrainClicked() {\n    const event = new CustomEvent('onTrainClicked');\n    eventElement.dispatchEvent(event);\n  }\n\n  function showLossInfo() {\n    const category = loss.category.toLowerCase().replace(/ /g, '_');\n    const name = `${loss.name.toLowerCase()}-class`;\n    const url = `https://keras.io/api/losses/${category}/#${name}/`;\n    window.open(url, '_blank');\n  }\n\n  function showModelInfo(model) {\n    const event = new CustomEvent('showModelInfo', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function showOptimInfo() {\n    const url = `https://keras.io/api/optimizers/${optimizer.name.toLowerCase()}/`;\n    window.open(url, '_blank');\n  }\n\n  export function addModel(model) {\n    models = models.concat(model);\n    if (!displayedModel) {\n      displayedModel = model;\n    }\n  }\n\n  export function events() {\n      return eventElement;\n  }\n\n  function saveModel(model) {\n    const event = new CustomEvent('saveModel', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function setDisplayedModel(newModel) {\n    displayedModel = newModel;\n\n    if (displayedModel.config) {\n      architecture = displayedModel.config.architecture;\n      dataset = displayedModel.config.dataset;\n      batchSize = displayedModel.config.batchSize;\n      validation = displayedModel.config.validation;\n      optimizer = displayedModel.config.optimizer;\n      epochs = displayedModel.config.epochs;\n      loss = displayedModel.config.loss;\n    }\n    if (Plotly) {\n      Plotly.react(accuracyPlot, displayedModel.plotData);\n    }\n  }\n\n  export function setModelState(modelID, state, info) {\n    const model = models.find(model => model.id === modelID);\n    model.state = state;\n    model.info = info;\n    models = models;\n\n    const isTrainingComplete = !state;\n    if (isTrainingComplete) {\n      startTrainLabel = 'Train';\n    } else if (state.startsWith('Training')){\n      startTrainLabel = 'Restart';\n    }\n  }\n\n  export function setPlotData(modelID, newData) {\n    const model = models.find(model => model.id === modelID);\n    model.plotData = newData;\n    if (model === displayedModel) {\n      setDisplayedModel(model);\n    }\n  }\n\n  export function addArtifact(arch) {\n    artifacts = artifacts.concat(arch);\n    if (!dataset) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function updateArtifact(desc) {\n    artifacts = artifacts.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArtifact(id) {\n    artifacts = artifacts.filter(arch => arch.id !== id);\n    if (dataset && dataset.id === id) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function addArchitecture(arch) {\n    architectures = architectures.concat(arch);\n    if (!architecture) {\n      architecture = architectures[0];\n    }\n  }\n\n  export function updateArchitecture(desc) {\n    architectures = architectures.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArchitecture(id) {\n    architectures = architectures.filter(arch => arch.id !== id);\n    if (architecture && architecture.id === id) {\n      architecture = architectures[0];\n    }\n  }\n\n  function set(info) {\n    loss = info.loss || loss;\n    optimizer = info.optimizer || optimizer;\n    architectures = info.architectures || architectures;\n  }\n\n  export function data() {\n    return {\n      architecture,\n      dataset,\n      batchSize,\n      validation,\n      optimizer,\n      epochs,\n      loss,\n    };\n  }\n</script>\n\n<main bind:this={eventElement}>\n  <div class=\"row\">\n    <div class=\"col-xs-12 col-sm-12 col-md-4 col-lg-3\">\n      <h3>Training Parameters</h3>\n      <div class=\"well\" style=\"padding-top: 5px\">\n        <form>\n          <h5 style=\"text-align: left\">General</h5>\n          <div class=\"form-group\">\n            <label for=\"dataset\">Training Data: </label>\n            <select id=\"dataset\" bind:value={dataset}>\n              {#each artifacts as data}\n                <option value={data}>{data.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"arch\">Architecture: </label>\n            <select id=\"arch\" bind:value={architecture}>\n              {#each architectures as arch}\n                <option value={arch}>{arch.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"batchSize\">Batch Size</label>\n            <input id=\"batchSize\" bind:value={batchSize} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"epochs\">Epochs</label>\n            <input id=\"epochs\" bind:value={epochs} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"validation\">Validation Split</label>\n            <input id=\"validation\" bind:value={validation} type=\"number\"/>\n          </div>\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Loss</h5>\n          <div class=\"form-group\">\n            <label for=\"loss\">Loss Function: </label>\n            <select id=\"loss\" bind:value={loss}>\n              {#each categorizedLosses as cat}\n                <optgroup label={cat[0]}>\n                {#each cat[1] as lf}\n                  <option value={lf}>{lf.name}</option>\n                {/each}\n                </optgroup>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showLossInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each loss.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"text\"/>\n              {:else if arg.type === 'enum'}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <select id=\"{arg.name}\" bind:value={arg.value}>\n                  {#each arg.options as option}\n                    <option value={option}>{option}</option>\n                  {/each}\n                </select>\n              {:else}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Optimization</h5>\n          <div class=\"form-group\">\n            <label for=\"optimizer\">Optimizer: </label>\n            <select id=\"optimizer\" bind:value={optimizer}>\n              {#each optimizers as optim}\n                <option value={optim}>{optim.name}</option>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showOptimInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each optimizer.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"text\"/>\n              {:else}\n                <label for=\"{arg.name}\">{arg.name}</label>\n                <input id=\"{arg.name}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n        </form>\n        <button on:click|preventDefault|stopPropagation={onTrainClicked} type=\"button\" class=\"btn btn-{startTrainLabel === 'Train' ? 'primary' : 'warning'}\">{startTrainLabel}</button>\n      </div>\n    </div>\n    <div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-6 plot-container\" bind:this={accuracyPlot}></div>\n    <div class=\"col-xs-12 col-sm-12 col-md-2 col-lg-2\">\n      <h4>Trained Models</h4>\n      <div class=\"list-group\">\n          {#if models.length > 0}\n            {#each models as model}\n              <div on:click|preventDefault|stopPropagation={() => setDisplayedModel(model)}\n                class=\"list-group-item {displayedModel === model ? 'active' : ''}\"\n              >\n                <span\n                  contenteditable=true\n                  bind:innerHTML={model.name}\n                  style=\"cursor: text;\"></span>\n                {#if model.state}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => showModelInfo(model)}\n                    class=\"pull-right\" style=\"color: #888; font-style: italic;\"> {model.state[0].toUpperCase() + model.state.substring(1)}</span>\n                {:else}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => saveModel(model)}\n                    class=\"glyphicon glyphicon-floppy-disk pull-right\" aria-hidden=\"true\"\n                  ></span>\n                {/if}\n              </div>\n            {/each}\n          {:else}\n            <div class=\"list-group-item\" style=\"font-style: italic; color: #888\">No Trained Models</div>\n          {/if}\n      <div>\n    </div>\n  </div>\n</main>\n\n<style>\n  main {\n    text-align: center;\n    padding: 1em;\n    max-width: 240px;\n    margin: 0 auto;\n  }\n\n  @media (min-width: 640px) {\n    main {\n      max-width: none;\n    }\n  }\n\n  .row {\n    display: flex;\n    flex-flow: row wrap;\n    justify-content: space-around;\n  }\n\n  .config-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n\n  .output-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n</style>\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","stop_propagation","stopPropagation","attr","attribute","value","removeAttribute","getAttribute","setAttribute","to_number","undefined","set_data","wholeText","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","select_value","selected_option","querySelector","current_component","set_current_component","component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","push","flushing","seen_callbacks","Set","flush","update","$$","pop","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","parent_component","prop_values","bound","on_mount","on_destroy","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","c","intro","block","delete","local","m","new_on_destroy","map","filter","mount_component","type","state","toUpperCase","substring","arguments","EMPTY_FN_SCHEMA","architecture","dataset","displayedModel","accuracyPlot","eventElement","startTrainLabel","Plotly","batchSize","epochs","validation","optimizer","optimizers","loss","categorizedLosses","architectures","artifacts","models","showModelInfo","model","CustomEvent","detail","dispatchEvent","saveModel","setDisplayedModel","newModel","config","react","plotData","url","category","toLowerCase","replace","window","open","plotly","schemas","losses","concat","arg","includes","reductions","default","console","warn","decorateSchemas","lossesByCategory","entries","newPlot","modelID","info","find","id","startsWith","newData","arch","desc","[object Object]","destroy_component","$destroy","index","indexOf","splice","$$props","obj","$$set","keys"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAoJhF,SAASE,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,GAEvB,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,EAAMG,GAAU,MAExC,SAASE,EAAOL,GACZA,EAAKM,WAAWC,YAAYP,GAEhC,SAASQ,EAAaC,EAAYC,GAC9B,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWG,OAAQD,GAAK,EACpCF,EAAWE,IACXF,EAAWE,GAAGE,EAAEH,GAG5B,SAASI,EAAQC,GACb,OAAOC,SAASC,cAAcF,GAoBlC,SAASG,EAAKC,GACV,OAAOH,SAASI,eAAeD,GAEnC,SAASE,IACL,OAAOH,EAAK,KAKhB,SAASI,EAAOtB,EAAMuB,EAAOC,EAASC,GAElC,OADAzB,EAAK0B,iBAAiBH,EAAOC,EAASC,GAC/B,IAAMzB,EAAK2B,oBAAoBJ,EAAOC,EAASC,GAE1D,SAASG,EAAgB1C,GACrB,OAAO,SAAUqC,GAGb,OAFAA,EAAMM,iBAEC3C,EAAG4C,KAAKC,KAAMR,IAG7B,SAASS,EAAiB9C,GACtB,OAAO,SAAUqC,GAGb,OAFAA,EAAMU,kBAEC/C,EAAG4C,KAAKC,KAAMR,IAU7B,SAASW,EAAKlC,EAAMmC,EAAWC,GACd,MAATA,EACApC,EAAKqC,gBAAgB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AAamD,KAAOA,QACtCnD,EAAec,EAAc,gBAgCUb,sCAQHD,qCAQIO,mCAIHC,mCAIIC,mCAMLG,4CAea7G,mDAGCA,gDAODA,8CAQR2G,4CAWQ3G,mDAGAA,0EAQ0BoG,kCAWzCzH,gCAI2BuI,EAAcC,MAIdI,EAAUJ,MAbXK,EAAkBL,0CApGnEd,qCD4xCjB,MACIoD,YAvHJ,SAA2BhI,EAAWnD,GAClC,MAAMmE,EAAKhB,EAAUgB,GACD,OAAhBA,EAAGM,WACH7F,EAAQuF,EAAGyB,YACXzB,EAAGM,UAAYN,EAAGM,SAAStE,EAAEH,GAG7BmE,EAAGyB,WAAazB,EAAGM,SAAW,KAC9BN,EAAGU,IAAM,IAgHTuG,CAAkB/J,KAAM,GACxBA,KAAKgK,SAAW/M,EAEpB6M,IAAI9D,EAAMhD,GACN,MAAM0B,EAAa1E,KAAK8C,GAAG4B,UAAUsB,KAAUhG,KAAK8C,GAAG4B,UAAUsB,GAAQ,IAEzE,OADAtB,EAAUlC,KAAKQ,GACR,KACH,MAAMiH,EAAQvF,EAAUwF,QAAQlH,IACjB,IAAXiH,GACAvF,EAAUyF,OAAOF,EAAO,IAGpCH,KAAKM,GAj9CT,IAAkBC,EAk9CNrK,KAAKsK,QAl9CCD,EAk9CkBD,EAj9CG,IAA5B/M,OAAOkN,KAAKF,GAAKxL,UAk9ChBmB,KAAK8C,GAAG6B,YAAa,EACrB3E,KAAKsK,MAAMF,GACXpK,KAAK8C,GAAG6B,YAAa"}
\ No newline at end of file
+{"version":3,"file":"TrainDashboard.js","sources":["../../../../../node_modules/svelte/internal/index.mjs","../TrainDashboard.svelte"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n    // @ts-ignore\n    for (const k in src)\n        tar[k] = src[k];\n    return tar;\n}\nfunction is_promise(value) {\n    return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n    element.__svelte_meta = {\n        loc: { file, line, column, char }\n    };\n}\nfunction run(fn) {\n    return fn();\n}\nfunction blank_object() {\n    return Object.create(null);\n}\nfunction run_all(fns) {\n    fns.forEach(run);\n}\nfunction is_function(thing) {\n    return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n    return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n    return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n    return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n    if (store != null && typeof store.subscribe !== 'function') {\n        throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n    }\n}\nfunction subscribe(store, ...callbacks) {\n    if (store == null) {\n        return noop;\n    }\n    const unsub = store.subscribe(...callbacks);\n    return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n    let value;\n    subscribe(store, _ => value = _)();\n    return value;\n}\nfunction component_subscribe(component, store, callback) {\n    component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n    if (definition) {\n        const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n        return definition[0](slot_ctx);\n    }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n    return definition[1] && fn\n        ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n        : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n    if (definition[2] && fn) {\n        const lets = definition[2](fn(dirty));\n        if ($$scope.dirty === undefined) {\n            return lets;\n        }\n        if (typeof lets === 'object') {\n            const merged = [];\n            const len = Math.max($$scope.dirty.length, lets.length);\n            for (let i = 0; i < len; i += 1) {\n                merged[i] = $$scope.dirty[i] | lets[i];\n            }\n            return merged;\n        }\n        return $$scope.dirty | lets;\n    }\n    return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n    const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n    if (slot_changes) {\n        const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n        slot.p(slot_context, slot_changes);\n    }\n}\nfunction exclude_internal_props(props) {\n    const result = {};\n    for (const k in props)\n        if (k[0] !== '$')\n            result[k] = props[k];\n    return result;\n}\nfunction compute_rest_props(props, keys) {\n    const rest = {};\n    keys = new Set(keys);\n    for (const k in props)\n        if (!keys.has(k) && k[0] !== '$')\n            rest[k] = props[k];\n    return rest;\n}\nfunction compute_slots(slots) {\n    const result = {};\n    for (const key in slots) {\n        result[key] = true;\n    }\n    return result;\n}\nfunction once(fn) {\n    let ran = false;\n    return function (...args) {\n        if (ran)\n            return;\n        ran = true;\n        fn.call(this, ...args);\n    };\n}\nfunction null_to_empty(value) {\n    return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n    store.set(value);\n    return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n    return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n    ? () => window.performance.now()\n    : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n    now = fn;\n}\nfunction set_raf(fn) {\n    raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n    tasks.forEach(task => {\n        if (!task.c(now)) {\n            tasks.delete(task);\n            task.f();\n        }\n    });\n    if (tasks.size !== 0)\n        raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n    tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n    let task;\n    if (tasks.size === 0)\n        raf(run_tasks);\n    return {\n        promise: new Promise(fulfill => {\n            tasks.add(task = { c: callback, f: fulfill });\n        }),\n        abort() {\n            tasks.delete(task);\n        }\n    };\n}\n\nfunction append(target, node) {\n    target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n    target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n    node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n    for (let i = 0; i < iterations.length; i += 1) {\n        if (iterations[i])\n            iterations[i].d(detaching);\n    }\n}\nfunction element(name) {\n    return document.createElement(name);\n}\nfunction element_is(name, is) {\n    return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n    const target = {};\n    for (const k in obj) {\n        if (has_prop(obj, k)\n            // @ts-ignore\n            && exclude.indexOf(k) === -1) {\n            // @ts-ignore\n            target[k] = obj[k];\n        }\n    }\n    return target;\n}\nfunction svg_element(name) {\n    return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n    return document.createTextNode(data);\n}\nfunction space() {\n    return text(' ');\n}\nfunction empty() {\n    return text('');\n}\nfunction listen(node, event, handler, options) {\n    node.addEventListener(event, handler, options);\n    return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n    return function (event) {\n        event.preventDefault();\n        // @ts-ignore\n        return fn.call(this, event);\n    };\n}\nfunction stop_propagation(fn) {\n    return function (event) {\n        event.stopPropagation();\n        // @ts-ignore\n        return fn.call(this, event);\n    };\n}\nfunction self(fn) {\n    return function (event) {\n        // @ts-ignore\n        if (event.target === this)\n            fn.call(this, event);\n    };\n}\nfunction attr(node, attribute, value) {\n    if (value == null)\n        node.removeAttribute(attribute);\n    else if (node.getAttribute(attribute) !== value)\n        node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n    // @ts-ignore\n    const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n    for (const key in attributes) {\n        if (attributes[key] == null) {\n            node.removeAttribute(key);\n        }\n        else if (key === 'style') {\n            node.style.cssText = attributes[key];\n        }\n        else if (key === '__value') {\n            node.value = node[key] = attributes[key];\n        }\n        else if (descriptors[key] && descriptors[key].set) {\n            node[key] = attributes[key];\n        }\n        else {\n            attr(node, key, attributes[key]);\n        }\n    }\n}\nfunction set_svg_attributes(node, attributes) {\n    for (const key in attributes) {\n        attr(node, key, attributes[key]);\n    }\n}\nfunction set_custom_element_data(node, prop, value) {\n    if (prop in node) {\n        node[prop] = value;\n    }\n    else {\n        attr(node, prop, value);\n    }\n}\nfunction xlink_attr(node, attribute, value) {\n    node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n    const value = new Set();\n    for (let i = 0; i < group.length; i += 1) {\n        if (group[i].checked)\n            value.add(group[i].__value);\n    }\n    if (!checked) {\n        value.delete(__value);\n    }\n    return Array.from(value);\n}\nfunction to_number(value) {\n    return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n    const array = [];\n    for (let i = 0; i < ranges.length; i += 1) {\n        array.push({ start: ranges.start(i), end: ranges.end(i) });\n    }\n    return array;\n}\nfunction children(element) {\n    return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n    for (let i = 0; i < nodes.length; i += 1) {\n        const node = nodes[i];\n        if (node.nodeName === name) {\n            let j = 0;\n            const remove = [];\n            while (j < node.attributes.length) {\n                const attribute = node.attributes[j++];\n                if (!attributes[attribute.name]) {\n                    remove.push(attribute.name);\n                }\n            }\n            for (let k = 0; k < remove.length; k++) {\n                node.removeAttribute(remove[k]);\n            }\n            return nodes.splice(i, 1)[0];\n        }\n    }\n    return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n    for (let i = 0; i < nodes.length; i += 1) {\n        const node = nodes[i];\n        if (node.nodeType === 3) {\n            node.data = '' + data;\n            return nodes.splice(i, 1)[0];\n        }\n    }\n    return text(data);\n}\nfunction claim_space(nodes) {\n    return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n    data = '' + data;\n    if (text.wholeText !== data)\n        text.data = data;\n}\nfunction set_input_value(input, value) {\n    input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n    try {\n        input.type = type;\n    }\n    catch (e) {\n        // do nothing\n    }\n}\nfunction set_style(node, key, value, important) {\n    node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n    for (let i = 0; i < select.options.length; i += 1) {\n        const option = select.options[i];\n        if (option.__value === value) {\n            option.selected = true;\n            return;\n        }\n    }\n}\nfunction select_options(select, value) {\n    for (let i = 0; i < select.options.length; i += 1) {\n        const option = select.options[i];\n        option.selected = ~value.indexOf(option.__value);\n    }\n}\nfunction select_value(select) {\n    const selected_option = select.querySelector(':checked') || select.options[0];\n    return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n    return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n    if (crossorigin === undefined) {\n        crossorigin = false;\n        try {\n            if (typeof window !== 'undefined' && window.parent) {\n                void window.parent.document;\n            }\n        }\n        catch (error) {\n            crossorigin = true;\n        }\n    }\n    return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n    const computed_style = getComputedStyle(node);\n    const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n    if (computed_style.position === 'static') {\n        node.style.position = 'relative';\n    }\n    const iframe = element('iframe');\n    iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n        `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n    iframe.setAttribute('aria-hidden', 'true');\n    iframe.tabIndex = -1;\n    const crossorigin = is_crossorigin();\n    let unsubscribe;\n    if (crossorigin) {\n        iframe.src = `data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>`;\n        unsubscribe = listen(window, 'message', (event) => {\n            if (event.source === iframe.contentWindow)\n                fn();\n        });\n    }\n    else {\n        iframe.src = 'about:blank';\n        iframe.onload = () => {\n            unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n        };\n    }\n    append(node, iframe);\n    return () => {\n        if (crossorigin) {\n            unsubscribe();\n        }\n        else if (unsubscribe && iframe.contentWindow) {\n            unsubscribe();\n        }\n        detach(iframe);\n    };\n}\nfunction toggle_class(element, name, toggle) {\n    element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n    const e = document.createEvent('CustomEvent');\n    e.initCustomEvent(type, false, false, detail);\n    return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n    return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n    constructor(anchor = null) {\n        this.a = anchor;\n        this.e = this.n = null;\n    }\n    m(html, target, anchor = null) {\n        if (!this.e) {\n            this.e = element(target.nodeName);\n            this.t = target;\n            this.h(html);\n        }\n        this.i(anchor);\n    }\n    h(html) {\n        this.e.innerHTML = html;\n        this.n = Array.from(this.e.childNodes);\n    }\n    i(anchor) {\n        for (let i = 0; i < this.n.length; i += 1) {\n            insert(this.t, this.n[i], anchor);\n        }\n    }\n    p(html) {\n        this.d();\n        this.h(html);\n        this.i(this.a);\n    }\n    d() {\n        this.n.forEach(detach);\n    }\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n    let hash = 5381;\n    let i = str.length;\n    while (i--)\n        hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n    return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n    const step = 16.666 / duration;\n    let keyframes = '{\\n';\n    for (let p = 0; p <= 1; p += step) {\n        const t = a + (b - a) * ease(p);\n        keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n    }\n    const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n    const name = `__svelte_${hash(rule)}_${uid}`;\n    const doc = node.ownerDocument;\n    active_docs.add(doc);\n    const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n    const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n    if (!current_rules[name]) {\n        current_rules[name] = true;\n        stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n    }\n    const animation = node.style.animation || '';\n    node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n    active += 1;\n    return name;\n}\nfunction delete_rule(node, name) {\n    const previous = (node.style.animation || '').split(', ');\n    const next = previous.filter(name\n        ? anim => anim.indexOf(name) < 0 // remove specific animation\n        : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n    );\n    const deleted = previous.length - next.length;\n    if (deleted) {\n        node.style.animation = next.join(', ');\n        active -= deleted;\n        if (!active)\n            clear_rules();\n    }\n}\nfunction clear_rules() {\n    raf(() => {\n        if (active)\n            return;\n        active_docs.forEach(doc => {\n            const stylesheet = doc.__svelte_stylesheet;\n            let i = stylesheet.cssRules.length;\n            while (i--)\n                stylesheet.deleteRule(i);\n            doc.__svelte_rules = {};\n        });\n        active_docs.clear();\n    });\n}\n\nfunction create_animation(node, from, fn, params) {\n    if (!from)\n        return noop;\n    const to = node.getBoundingClientRect();\n    if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n        return noop;\n    const { delay = 0, duration = 300, easing = identity, \n    // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n    start: start_time = now() + delay, \n    // @ts-ignore todo:\n    end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n    let running = true;\n    let started = false;\n    let name;\n    function start() {\n        if (css) {\n            name = create_rule(node, 0, 1, duration, delay, easing, css);\n        }\n        if (!delay) {\n            started = true;\n        }\n    }\n    function stop() {\n        if (css)\n            delete_rule(node, name);\n        running = false;\n    }\n    loop(now => {\n        if (!started && now >= start_time) {\n            started = true;\n        }\n        if (started && now >= end) {\n            tick(1, 0);\n            stop();\n        }\n        if (!running) {\n            return false;\n        }\n        if (started) {\n            const p = now - start_time;\n            const t = 0 + 1 * easing(p / duration);\n            tick(t, 1 - t);\n        }\n        return true;\n    });\n    start();\n    tick(0, 1);\n    return stop;\n}\nfunction fix_position(node) {\n    const style = getComputedStyle(node);\n    if (style.position !== 'absolute' && style.position !== 'fixed') {\n        const { width, height } = style;\n        const a = node.getBoundingClientRect();\n        node.style.position = 'absolute';\n        node.style.width = width;\n        node.style.height = height;\n        add_transform(node, a);\n    }\n}\nfunction add_transform(node, a) {\n    const b = node.getBoundingClientRect();\n    if (a.left !== b.left || a.top !== b.top) {\n        const style = getComputedStyle(node);\n        const transform = style.transform === 'none' ? '' : style.transform;\n        node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n    }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n    current_component = component;\n}\nfunction get_current_component() {\n    if (!current_component)\n        throw new Error(`Function called outside component initialization`);\n    return current_component;\n}\nfunction beforeUpdate(fn) {\n    get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n    get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n    get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n    get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n    const component = get_current_component();\n    return (type, detail) => {\n        const callbacks = component.$$.callbacks[type];\n        if (callbacks) {\n            // TODO are there situations where events could be dispatched\n            // in a server (non-DOM) environment?\n            const event = custom_event(type, detail);\n            callbacks.slice().forEach(fn => {\n                fn.call(component, event);\n            });\n        }\n    };\n}\nfunction setContext(key, context) {\n    get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n    return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n    const callbacks = component.$$.callbacks[event.type];\n    if (callbacks) {\n        callbacks.slice().forEach(fn => fn(event));\n    }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n    if (!update_scheduled) {\n        update_scheduled = true;\n        resolved_promise.then(flush);\n    }\n}\nfunction tick() {\n    schedule_update();\n    return resolved_promise;\n}\nfunction add_render_callback(fn) {\n    render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n    flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n    if (flushing)\n        return;\n    flushing = true;\n    do {\n        // first, call beforeUpdate functions\n        // and update components\n        for (let i = 0; i < dirty_components.length; i += 1) {\n            const component = dirty_components[i];\n            set_current_component(component);\n            update(component.$$);\n        }\n        set_current_component(null);\n        dirty_components.length = 0;\n        while (binding_callbacks.length)\n            binding_callbacks.pop()();\n        // then, once components are updated, call\n        // afterUpdate functions. This may cause\n        // subsequent updates...\n        for (let i = 0; i < render_callbacks.length; i += 1) {\n            const callback = render_callbacks[i];\n            if (!seen_callbacks.has(callback)) {\n                // ...so guard against infinite loops\n                seen_callbacks.add(callback);\n                callback();\n            }\n        }\n        render_callbacks.length = 0;\n    } while (dirty_components.length);\n    while (flush_callbacks.length) {\n        flush_callbacks.pop()();\n    }\n    update_scheduled = false;\n    flushing = false;\n    seen_callbacks.clear();\n}\nfunction update($$) {\n    if ($$.fragment !== null) {\n        $$.update();\n        run_all($$.before_update);\n        const dirty = $$.dirty;\n        $$.dirty = [-1];\n        $$.fragment && $$.fragment.p($$.ctx, dirty);\n        $$.after_update.forEach(add_render_callback);\n    }\n}\n\nlet promise;\nfunction wait() {\n    if (!promise) {\n        promise = Promise.resolve();\n        promise.then(() => {\n            promise = null;\n        });\n    }\n    return promise;\n}\nfunction dispatch(node, direction, kind) {\n    node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n    outros = {\n        r: 0,\n        c: [],\n        p: outros // parent group\n    };\n}\nfunction check_outros() {\n    if (!outros.r) {\n        run_all(outros.c);\n    }\n    outros = outros.p;\n}\nfunction transition_in(block, local) {\n    if (block && block.i) {\n        outroing.delete(block);\n        block.i(local);\n    }\n}\nfunction transition_out(block, local, detach, callback) {\n    if (block && block.o) {\n        if (outroing.has(block))\n            return;\n        outroing.add(block);\n        outros.c.push(() => {\n            outroing.delete(block);\n            if (callback) {\n                if (detach)\n                    block.d(1);\n                callback();\n            }\n        });\n        block.o(local);\n    }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n    let config = fn(node, params);\n    let running = false;\n    let animation_name;\n    let task;\n    let uid = 0;\n    function cleanup() {\n        if (animation_name)\n            delete_rule(node, animation_name);\n    }\n    function go() {\n        const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n        if (css)\n            animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n        tick(0, 1);\n        const start_time = now() + delay;\n        const end_time = start_time + duration;\n        if (task)\n            task.abort();\n        running = true;\n        add_render_callback(() => dispatch(node, true, 'start'));\n        task = loop(now => {\n            if (running) {\n                if (now >= end_time) {\n                    tick(1, 0);\n                    dispatch(node, true, 'end');\n                    cleanup();\n                    return running = false;\n                }\n                if (now >= start_time) {\n                    const t = easing((now - start_time) / duration);\n                    tick(t, 1 - t);\n                }\n            }\n            return running;\n        });\n    }\n    let started = false;\n    return {\n        start() {\n            if (started)\n                return;\n            delete_rule(node);\n            if (is_function(config)) {\n                config = config();\n                wait().then(go);\n            }\n            else {\n                go();\n            }\n        },\n        invalidate() {\n            started = false;\n        },\n        end() {\n            if (running) {\n                cleanup();\n                running = false;\n            }\n        }\n    };\n}\nfunction create_out_transition(node, fn, params) {\n    let config = fn(node, params);\n    let running = true;\n    let animation_name;\n    const group = outros;\n    group.r += 1;\n    function go() {\n        const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n        if (css)\n            animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n        const start_time = now() + delay;\n        const end_time = start_time + duration;\n        add_render_callback(() => dispatch(node, false, 'start'));\n        loop(now => {\n            if (running) {\n                if (now >= end_time) {\n                    tick(0, 1);\n                    dispatch(node, false, 'end');\n                    if (!--group.r) {\n                        // this will result in `end()` being called,\n                        // so we don't need to clean up here\n                        run_all(group.c);\n                    }\n                    return false;\n                }\n                if (now >= start_time) {\n                    const t = easing((now - start_time) / duration);\n                    tick(1 - t, t);\n                }\n            }\n            return running;\n        });\n    }\n    if (is_function(config)) {\n        wait().then(() => {\n            // @ts-ignore\n            config = config();\n            go();\n        });\n    }\n    else {\n        go();\n    }\n    return {\n        end(reset) {\n            if (reset && config.tick) {\n                config.tick(1, 0);\n            }\n            if (running) {\n                if (animation_name)\n                    delete_rule(node, animation_name);\n                running = false;\n            }\n        }\n    };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n    let config = fn(node, params);\n    let t = intro ? 0 : 1;\n    let running_program = null;\n    let pending_program = null;\n    let animation_name = null;\n    function clear_animation() {\n        if (animation_name)\n            delete_rule(node, animation_name);\n    }\n    function init(program, duration) {\n        const d = program.b - t;\n        duration *= Math.abs(d);\n        return {\n            a: t,\n            b: program.b,\n            d,\n            duration,\n            start: program.start,\n            end: program.start + duration,\n            group: program.group\n        };\n    }\n    function go(b) {\n        const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n        const program = {\n            start: now() + delay,\n            b\n        };\n        if (!b) {\n            // @ts-ignore todo: improve typings\n            program.group = outros;\n            outros.r += 1;\n        }\n        if (running_program || pending_program) {\n            pending_program = program;\n        }\n        else {\n            // if this is an intro, and there's a delay, we need to do\n            // an initial tick and/or apply CSS animation immediately\n            if (css) {\n                clear_animation();\n                animation_name = create_rule(node, t, b, duration, delay, easing, css);\n            }\n            if (b)\n                tick(0, 1);\n            running_program = init(program, duration);\n            add_render_callback(() => dispatch(node, b, 'start'));\n            loop(now => {\n                if (pending_program && now > pending_program.start) {\n                    running_program = init(pending_program, duration);\n                    pending_program = null;\n                    dispatch(node, running_program.b, 'start');\n                    if (css) {\n                        clear_animation();\n                        animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n                    }\n                }\n                if (running_program) {\n                    if (now >= running_program.end) {\n                        tick(t = running_program.b, 1 - t);\n                        dispatch(node, running_program.b, 'end');\n                        if (!pending_program) {\n                            // we're done\n                            if (running_program.b) {\n                                // intro — we can tidy up immediately\n                                clear_animation();\n                            }\n                            else {\n                                // outro — needs to be coordinated\n                                if (!--running_program.group.r)\n                                    run_all(running_program.group.c);\n                            }\n                        }\n                        running_program = null;\n                    }\n                    else if (now >= running_program.start) {\n                        const p = now - running_program.start;\n                        t = running_program.a + running_program.d * easing(p / running_program.duration);\n                        tick(t, 1 - t);\n                    }\n                }\n                return !!(running_program || pending_program);\n            });\n        }\n    }\n    return {\n        run(b) {\n            if (is_function(config)) {\n                wait().then(() => {\n                    // @ts-ignore\n                    config = config();\n                    go(b);\n                });\n            }\n            else {\n                go(b);\n            }\n        },\n        end() {\n            clear_animation();\n            running_program = pending_program = null;\n        }\n    };\n}\n\nfunction handle_promise(promise, info) {\n    const token = info.token = {};\n    function update(type, index, key, value) {\n        if (info.token !== token)\n            return;\n        info.resolved = value;\n        let child_ctx = info.ctx;\n        if (key !== undefined) {\n            child_ctx = child_ctx.slice();\n            child_ctx[key] = value;\n        }\n        const block = type && (info.current = type)(child_ctx);\n        let needs_flush = false;\n        if (info.block) {\n            if (info.blocks) {\n                info.blocks.forEach((block, i) => {\n                    if (i !== index && block) {\n                        group_outros();\n                        transition_out(block, 1, 1, () => {\n                            info.blocks[i] = null;\n                        });\n                        check_outros();\n                    }\n                });\n            }\n            else {\n                info.block.d(1);\n            }\n            block.c();\n            transition_in(block, 1);\n            block.m(info.mount(), info.anchor);\n            needs_flush = true;\n        }\n        info.block = block;\n        if (info.blocks)\n            info.blocks[index] = block;\n        if (needs_flush) {\n            flush();\n        }\n    }\n    if (is_promise(promise)) {\n        const current_component = get_current_component();\n        promise.then(value => {\n            set_current_component(current_component);\n            update(info.then, 1, info.value, value);\n            set_current_component(null);\n        }, error => {\n            set_current_component(current_component);\n            update(info.catch, 2, info.error, error);\n            set_current_component(null);\n            if (!info.hasCatch) {\n                throw error;\n            }\n        });\n        // if we previously had a then/catch block, destroy it\n        if (info.current !== info.pending) {\n            update(info.pending, 0);\n            return true;\n        }\n    }\n    else {\n        if (info.current !== info.then) {\n            update(info.then, 1, info.value, promise);\n            return true;\n        }\n        info.resolved = promise;\n    }\n}\n\nconst globals = (typeof window !== 'undefined'\n    ? window\n    : typeof globalThis !== 'undefined'\n        ? globalThis\n        : global);\n\nfunction destroy_block(block, lookup) {\n    block.d(1);\n    lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n    transition_out(block, 1, 1, () => {\n        lookup.delete(block.key);\n    });\n}\nfunction fix_and_destroy_block(block, lookup) {\n    block.f();\n    destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n    block.f();\n    outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n    let o = old_blocks.length;\n    let n = list.length;\n    let i = o;\n    const old_indexes = {};\n    while (i--)\n        old_indexes[old_blocks[i].key] = i;\n    const new_blocks = [];\n    const new_lookup = new Map();\n    const deltas = new Map();\n    i = n;\n    while (i--) {\n        const child_ctx = get_context(ctx, list, i);\n        const key = get_key(child_ctx);\n        let block = lookup.get(key);\n        if (!block) {\n            block = create_each_block(key, child_ctx);\n            block.c();\n        }\n        else if (dynamic) {\n            block.p(child_ctx, dirty);\n        }\n        new_lookup.set(key, new_blocks[i] = block);\n        if (key in old_indexes)\n            deltas.set(key, Math.abs(i - old_indexes[key]));\n    }\n    const will_move = new Set();\n    const did_move = new Set();\n    function insert(block) {\n        transition_in(block, 1);\n        block.m(node, next);\n        lookup.set(block.key, block);\n        next = block.first;\n        n--;\n    }\n    while (o && n) {\n        const new_block = new_blocks[n - 1];\n        const old_block = old_blocks[o - 1];\n        const new_key = new_block.key;\n        const old_key = old_block.key;\n        if (new_block === old_block) {\n            // do nothing\n            next = new_block.first;\n            o--;\n            n--;\n        }\n        else if (!new_lookup.has(old_key)) {\n            // remove old block\n            destroy(old_block, lookup);\n            o--;\n        }\n        else if (!lookup.has(new_key) || will_move.has(new_key)) {\n            insert(new_block);\n        }\n        else if (did_move.has(old_key)) {\n            o--;\n        }\n        else if (deltas.get(new_key) > deltas.get(old_key)) {\n            did_move.add(new_key);\n            insert(new_block);\n        }\n        else {\n            will_move.add(old_key);\n            o--;\n        }\n    }\n    while (o--) {\n        const old_block = old_blocks[o];\n        if (!new_lookup.has(old_block.key))\n            destroy(old_block, lookup);\n    }\n    while (n)\n        insert(new_blocks[n - 1]);\n    return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n    const keys = new Set();\n    for (let i = 0; i < list.length; i++) {\n        const key = get_key(get_context(ctx, list, i));\n        if (keys.has(key)) {\n            throw new Error(`Cannot have duplicate keys in a keyed each`);\n        }\n        keys.add(key);\n    }\n}\n\nfunction get_spread_update(levels, updates) {\n    const update = {};\n    const to_null_out = {};\n    const accounted_for = { $$scope: 1 };\n    let i = levels.length;\n    while (i--) {\n        const o = levels[i];\n        const n = updates[i];\n        if (n) {\n            for (const key in o) {\n                if (!(key in n))\n                    to_null_out[key] = 1;\n            }\n            for (const key in n) {\n                if (!accounted_for[key]) {\n                    update[key] = n[key];\n                    accounted_for[key] = 1;\n                }\n            }\n            levels[i] = n;\n        }\n        else {\n            for (const key in o) {\n                accounted_for[key] = 1;\n            }\n        }\n    }\n    for (const key in to_null_out) {\n        if (!(key in update))\n            update[key] = undefined;\n    }\n    return update;\n}\nfunction get_spread_object(spread_props) {\n    return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n    'allowfullscreen',\n    'allowpaymentrequest',\n    'async',\n    'autofocus',\n    'autoplay',\n    'checked',\n    'controls',\n    'default',\n    'defer',\n    'disabled',\n    'formnovalidate',\n    'hidden',\n    'ismap',\n    'loop',\n    'multiple',\n    'muted',\n    'nomodule',\n    'novalidate',\n    'open',\n    'playsinline',\n    'readonly',\n    'required',\n    'reversed',\n    'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n    const attributes = Object.assign({}, ...args);\n    if (classes_to_add) {\n        if (attributes.class == null) {\n            attributes.class = classes_to_add;\n        }\n        else {\n            attributes.class += ' ' + classes_to_add;\n        }\n    }\n    let str = '';\n    Object.keys(attributes).forEach(name => {\n        if (invalid_attribute_name_character.test(name))\n            return;\n        const value = attributes[name];\n        if (value === true)\n            str += \" \" + name;\n        else if (boolean_attributes.has(name.toLowerCase())) {\n            if (value)\n                str += \" \" + name;\n        }\n        else if (value != null) {\n            str += ` ${name}=\"${String(value).replace(/\"/g, '&#34;').replace(/'/g, '&#39;')}\"`;\n        }\n    });\n    return str;\n}\nconst escaped = {\n    '\"': '&quot;',\n    \"'\": '&#39;',\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;'\n};\nfunction escape(html) {\n    return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n    let str = '';\n    for (let i = 0; i < items.length; i += 1) {\n        str += fn(items[i], i);\n    }\n    return str;\n}\nconst missing_component = {\n    $$render: () => ''\n};\nfunction validate_component(component, name) {\n    if (!component || !component.$$render) {\n        if (name === 'svelte:component')\n            name += ' this={...}';\n        throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n    }\n    return component;\n}\nfunction debug(file, line, column, values) {\n    console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n    console.log(values); // eslint-disable-line no-console\n    return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n    function $$render(result, props, bindings, slots) {\n        const parent_component = current_component;\n        const $$ = {\n            on_destroy,\n            context: new Map(parent_component ? parent_component.$$.context : []),\n            // these will be immediately discarded\n            on_mount: [],\n            before_update: [],\n            after_update: [],\n            callbacks: blank_object()\n        };\n        set_current_component({ $$ });\n        const html = fn(result, props, bindings, slots);\n        set_current_component(parent_component);\n        return html;\n    }\n    return {\n        render: (props = {}, options = {}) => {\n            on_destroy = [];\n            const result = { title: '', head: '', css: new Set() };\n            const html = $$render(result, props, {}, options);\n            run_all(on_destroy);\n            return {\n                html,\n                css: {\n                    code: Array.from(result.css).map(css => css.code).join('\\n'),\n                    map: null // TODO\n                },\n                head: result.title + result.head\n            };\n        },\n        $$render\n    };\n}\nfunction add_attribute(name, value, boolean) {\n    if (value == null || (boolean && !value))\n        return '';\n    return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n    return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n    const index = component.$$.props[name];\n    if (index !== undefined) {\n        component.$$.bound[index] = callback;\n        callback(component.$$.ctx[index]);\n    }\n}\nfunction create_component(block) {\n    block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n    block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n    const { fragment, on_mount, on_destroy, after_update } = component.$$;\n    fragment && fragment.m(target, anchor);\n    // onMount happens before the initial afterUpdate\n    add_render_callback(() => {\n        const new_on_destroy = on_mount.map(run).filter(is_function);\n        if (on_destroy) {\n            on_destroy.push(...new_on_destroy);\n        }\n        else {\n            // Edge case - component was destroyed immediately,\n            // most likely as a result of a binding initialising\n            run_all(new_on_destroy);\n        }\n        component.$$.on_mount = [];\n    });\n    after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n    const $$ = component.$$;\n    if ($$.fragment !== null) {\n        run_all($$.on_destroy);\n        $$.fragment && $$.fragment.d(detaching);\n        // TODO null out other refs, including component.$$ (but need to\n        // preserve final state?)\n        $$.on_destroy = $$.fragment = null;\n        $$.ctx = [];\n    }\n}\nfunction make_dirty(component, i) {\n    if (component.$$.dirty[0] === -1) {\n        dirty_components.push(component);\n        schedule_update();\n        component.$$.dirty.fill(0);\n    }\n    component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n    const parent_component = current_component;\n    set_current_component(component);\n    const prop_values = options.props || {};\n    const $$ = component.$$ = {\n        fragment: null,\n        ctx: null,\n        // state\n        props,\n        update: noop,\n        not_equal,\n        bound: blank_object(),\n        // lifecycle\n        on_mount: [],\n        on_destroy: [],\n        before_update: [],\n        after_update: [],\n        context: new Map(parent_component ? parent_component.$$.context : []),\n        // everything else\n        callbacks: blank_object(),\n        dirty,\n        skip_bound: false\n    };\n    let ready = false;\n    $$.ctx = instance\n        ? instance(component, prop_values, (i, ret, ...rest) => {\n            const value = rest.length ? rest[0] : ret;\n            if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n                if (!$$.skip_bound && $$.bound[i])\n                    $$.bound[i](value);\n                if (ready)\n                    make_dirty(component, i);\n            }\n            return ret;\n        })\n        : [];\n    $$.update();\n    ready = true;\n    run_all($$.before_update);\n    // `false` as a special case of no DOM component\n    $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n    if (options.target) {\n        if (options.hydrate) {\n            const nodes = children(options.target);\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            $$.fragment && $$.fragment.l(nodes);\n            nodes.forEach(detach);\n        }\n        else {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            $$.fragment && $$.fragment.c();\n        }\n        if (options.intro)\n            transition_in(component.$$.fragment);\n        mount_component(component, options.target, options.anchor);\n        flush();\n    }\n    set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n    SvelteElement = class extends HTMLElement {\n        constructor() {\n            super();\n            this.attachShadow({ mode: 'open' });\n        }\n        connectedCallback() {\n            // @ts-ignore todo: improve typings\n            for (const key in this.$$.slotted) {\n                // @ts-ignore todo: improve typings\n                this.appendChild(this.$$.slotted[key]);\n            }\n        }\n        attributeChangedCallback(attr, _oldValue, newValue) {\n            this[attr] = newValue;\n        }\n        $destroy() {\n            destroy_component(this, 1);\n            this.$destroy = noop;\n        }\n        $on(type, callback) {\n            // TODO should this delegate to addEventListener?\n            const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n            callbacks.push(callback);\n            return () => {\n                const index = callbacks.indexOf(callback);\n                if (index !== -1)\n                    callbacks.splice(index, 1);\n            };\n        }\n        $set($$props) {\n            if (this.$$set && !is_empty($$props)) {\n                this.$$.skip_bound = true;\n                this.$$set($$props);\n                this.$$.skip_bound = false;\n            }\n        }\n    };\n}\nclass SvelteComponent {\n    $destroy() {\n        destroy_component(this, 1);\n        this.$destroy = noop;\n    }\n    $on(type, callback) {\n        const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n        callbacks.push(callback);\n        return () => {\n            const index = callbacks.indexOf(callback);\n            if (index !== -1)\n                callbacks.splice(index, 1);\n        };\n    }\n    $set($$props) {\n        if (this.$$set && !is_empty($$props)) {\n            this.$$.skip_bound = true;\n            this.$$set($$props);\n            this.$$.skip_bound = false;\n        }\n    }\n}\n\nfunction dispatch_dev(type, detail) {\n    document.dispatchEvent(custom_event(type, Object.assign({ version: '3.29.0' }, detail)));\n}\nfunction append_dev(target, node) {\n    dispatch_dev(\"SvelteDOMInsert\", { target, node });\n    append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n    dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n    insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n    dispatch_dev(\"SvelteDOMRemove\", { node });\n    detach(node);\n}\nfunction detach_between_dev(before, after) {\n    while (before.nextSibling && before.nextSibling !== after) {\n        detach_dev(before.nextSibling);\n    }\n}\nfunction detach_before_dev(after) {\n    while (after.previousSibling) {\n        detach_dev(after.previousSibling);\n    }\n}\nfunction detach_after_dev(before) {\n    while (before.nextSibling) {\n        detach_dev(before.nextSibling);\n    }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n    const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n    if (has_prevent_default)\n        modifiers.push('preventDefault');\n    if (has_stop_propagation)\n        modifiers.push('stopPropagation');\n    dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n    const dispose = listen(node, event, handler, options);\n    return () => {\n        dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n        dispose();\n    };\n}\nfunction attr_dev(node, attribute, value) {\n    attr(node, attribute, value);\n    if (value == null)\n        dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n    else\n        dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n    node[property] = value;\n    dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n    node.dataset[property] = value;\n    dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n    data = '' + data;\n    if (text.wholeText === data)\n        return;\n    dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n    text.data = data;\n}\nfunction validate_each_argument(arg) {\n    if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n        let msg = '{#each} only iterates over array-like objects.';\n        if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n            msg += ' You can use a spread to convert this iterable into an array.';\n        }\n        throw new Error(msg);\n    }\n}\nfunction validate_slots(name, slot, keys) {\n    for (const slot_key of Object.keys(slot)) {\n        if (!~keys.indexOf(slot_key)) {\n            console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n        }\n    }\n}\nclass SvelteComponentDev extends SvelteComponent {\n    constructor(options) {\n        if (!options || (!options.target && !options.$$inline)) {\n            throw new Error(`'target' is a required option`);\n        }\n        super();\n    }\n    $destroy() {\n        super.$destroy();\n        this.$destroy = () => {\n            console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n        };\n    }\n    $capture_state() { }\n    $inject_state() { }\n}\nfunction loop_guard(timeout) {\n    const start = Date.now();\n    return () => {\n        if (Date.now() - start > timeout) {\n            throw new Error(`Infinite loop detected`);\n        }\n    };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","<script>\n  const EMPTY_FN_SCHEMA = {name: '', arguments: []};\n  let startTrainLabel = 'Train';\n  let Plotly = null;\n\tlet batchSize = 32;\n\tlet epochs = 50;\n\tlet validation = 0.1;\n  let optimizer = EMPTY_FN_SCHEMA;\n  let optimizers = [];\n  let loss = EMPTY_FN_SCHEMA;\n  let categorizedLosses = [];\n  let architectures = [];\n  let architecture;\n  let artifacts = [];\n  let dataset;\n  let models = [];\n  let displayedModel;\n  let accuracyPlot;\n  $: plotData = displayedModel && displayedModel.plotData;\n  let eventElement;\n\n  function decorateSchemas(schemas) {\n    let index = 1;\n    schemas.losses.concat(schemas.optimizers).forEach(fn => {\n      fn.arguments = fn.arguments\n        .filter(arg => arg.name !== 'name')\n        .map(arg => {\n          if (arg.name.includes('reduction')) {\n            arg.type = 'enum';\n            arg.options = schemas.reductions;\n          } else {\n            arg.type = typeof(arg.default);\n          }\n          arg.value = arg.default;\n          arg.id = `arg${index++}`;\n          return arg;\n        })\n        .sort((arg1, arg2) => {\n          const [num1, num2] = [arg1, arg2]\n            .map(arg => arg.type === 'boolean' ? 1 : 0)\n          return num1 - num2;\n        });\n    });\n  }\n\n  export function initialize(plotly, schemas) {\n    decorateSchemas(schemas);\n    optimizers = schemas.optimizers;\n    optimizer = optimizers[0];\n    const lossesByCategory = {};\n    schemas.losses.forEach(loss => {\n      if (!lossesByCategory[loss.category]) {\n        lossesByCategory[loss.category] = [];\n      }\n      lossesByCategory[loss.category].push(loss);\n    });\n\n    categorizedLosses = Object.entries(lossesByCategory);\n    loss = schemas.losses[0];\n    Plotly = plotly;\n    Plotly.newPlot(accuracyPlot);\n  }\n\n  function onTrainClicked() {\n    const event = new CustomEvent('onTrainClicked');\n    eventElement.dispatchEvent(event);\n  }\n\n  function showLossInfo() {\n    const category = loss.category.toLowerCase().replace(/ /g, '_');\n    const name = `${loss.name.toLowerCase()}-class`;\n    const url = `https://keras.io/api/losses/${category}/#${name}/`;\n    window.open(url, '_blank');\n  }\n\n  function showModelInfo(model) {\n    const event = new CustomEvent('showModelInfo', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function showOptimInfo() {\n    const url = `https://keras.io/api/optimizers/${optimizer.name.toLowerCase()}/`;\n    window.open(url, '_blank');\n  }\n\n  export function addModel(model) {\n    models = models.concat(model);\n    if (!displayedModel) {\n      displayedModel = model;\n    }\n  }\n\n  export function events() {\n      return eventElement;\n  }\n\n  function saveModel(model) {\n    const event = new CustomEvent('saveModel', {detail: model});\n    eventElement.dispatchEvent(event);\n  }\n\n  function setDisplayedModel(newModel) {\n    displayedModel = newModel;\n\n    if (displayedModel.config) {\n      architecture = displayedModel.config.architecture;\n      dataset = displayedModel.config.dataset;\n      batchSize = displayedModel.config.batchSize;\n      validation = displayedModel.config.validation;\n      optimizer = displayedModel.config.optimizer;\n      epochs = displayedModel.config.epochs;\n      loss = displayedModel.config.loss;\n    }\n    if (Plotly) {\n      Plotly.react(accuracyPlot, displayedModel.plotData);\n    }\n  }\n\n  export function setModelState(modelID, state, info) {\n    const model = models.find(model => model.id === modelID);\n    model.state = state;\n    model.info = info;\n    models = models;\n\n    const isTrainingComplete = !state;\n    if (isTrainingComplete) {\n      startTrainLabel = 'Train';\n    } else if (state.startsWith('Training')){\n      startTrainLabel = 'Restart';\n    }\n  }\n\n  export function setPlotData(modelID, newData) {\n    const model = models.find(model => model.id === modelID);\n    model.plotData = newData;\n    if (model === displayedModel) {\n      setDisplayedModel(model);\n    }\n  }\n\n  export function addArtifact(arch) {\n    artifacts = artifacts.concat(arch);\n    if (!dataset) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function updateArtifact(desc) {\n    artifacts = artifacts.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArtifact(id) {\n    artifacts = artifacts.filter(arch => arch.id !== id);\n    if (dataset && dataset.id === id) {\n      dataset = artifacts[0];\n    }\n  }\n\n  export function addArchitecture(arch) {\n    architectures = architectures.concat(arch);\n    if (!architecture) {\n      architecture = architectures[0];\n    }\n  }\n\n  export function updateArchitecture(desc) {\n    architectures = architectures.map(arch => {\n      if (arch.id === desc.id) {\n        return desc;\n      }\n      return arch;\n    });\n  }\n\n  export function removeArchitecture(id) {\n    architectures = architectures.filter(arch => arch.id !== id);\n    if (architecture && architecture.id === id) {\n      architecture = architectures[0];\n    }\n  }\n\n  function set(info) {\n    loss = info.loss || loss;\n    optimizer = info.optimizer || optimizer;\n    architectures = info.architectures || architectures;\n  }\n\n  export function data() {\n    return {\n      architecture,\n      dataset,\n      batchSize,\n      validation,\n      optimizer,\n      epochs,\n      loss,\n    };\n  }\n</script>\n\n<main bind:this={eventElement}>\n  <div class=\"row\">\n    <div class=\"col-xs-12 col-sm-12 col-md-4 col-lg-3\">\n      <h3>Training Parameters</h3>\n      <div class=\"well\" style=\"padding-top: 5px\">\n        <form>\n          <h5 style=\"text-align: left\">General</h5>\n          <div class=\"form-group\">\n            <label for=\"dataset\">Training Data: </label>\n            <select id=\"dataset\" bind:value={dataset}>\n              {#each artifacts as data}\n                <option value={data}>{data.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"arch\">Architecture: </label>\n            <select id=\"arch\" bind:value={architecture}>\n              {#each architectures as arch}\n                <option value={arch}>{arch.name}</option>\n              {/each}\n            </select>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"batchSize\">Batch Size</label>\n            <input id=\"batchSize\" bind:value={batchSize} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"epochs\">Epochs</label>\n            <input id=\"epochs\" bind:value={epochs} type=\"number\"/>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"validation\">Validation Split</label>\n            <input id=\"validation\" bind:value={validation} type=\"number\"/>\n          </div>\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Loss</h5>\n          <div class=\"form-group\">\n            <label for=\"loss\">Loss Function: </label>\n            <select id=\"loss\" bind:value={loss}>\n              {#each categorizedLosses as cat}\n                <optgroup label={cat[0]}>\n                {#each cat[1] as lf}\n                  <option value={lf}>{lf.name}</option>\n                {/each}\n                </optgroup>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showLossInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each loss.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"text\"/>\n              {:else if arg.type === 'boolean'}\n                <input id=\"{arg.id}\" bind:checked={arg.value} type=\"checkbox\"/>\n                <label for=\"{arg.id}\">{arg.name}</label>\n              {:else if arg.type === 'enum'}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <select id=\"{arg.id}\" bind:value={arg.value}>\n                  {#each arg.options as option}\n                    <option value={option}>{option}</option>\n                  {/each}\n                </select>\n              {:else}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n          <hr style=\"border-top: 1px solid #aaa\">\n          <h5 style=\"text-align: left\">Optimization</h5>\n          <div class=\"form-group\">\n            <label for=\"optimizer\">Optimizer: </label>\n            <select id=\"optimizer\" bind:value={optimizer}>\n              {#each optimizers as optim}\n                <option value={optim}>{optim.name}</option>\n              {/each}\n            </select>\n            <span on:click|stopPropagation|preventDefault={showOptimInfo} class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n          </div>\n          {#each optimizer.arguments as arg}\n            <div class=\"form-group\">\n              {#if arg.type === 'string'}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"text\"/>\n              {:else if arg.type === 'boolean'}\n                <input id=\"{arg.id}\" bind:checked={arg.value} type=\"checkbox\"/>\n                <label for=\"{arg.id}\">{arg.name}</label>\n              {:else}\n                <label for=\"{arg.id}\">{arg.name}</label>\n                <input id=\"{arg.id}\" bind:value={arg.value} type=\"number\"/>\n              {/if}\n            </div>\n          {/each}\n        </form>\n        <button on:click|preventDefault|stopPropagation={onTrainClicked} type=\"button\" class=\"btn btn-{startTrainLabel === 'Train' ? 'primary' : 'warning'}\">{startTrainLabel}</button>\n      </div>\n    </div>\n    <div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-6 plot-container\" bind:this={accuracyPlot}></div>\n    <div class=\"col-xs-12 col-sm-12 col-md-2 col-lg-2\">\n      <h4>Trained Models</h4>\n      <div class=\"list-group\">\n          {#if models.length > 0}\n            {#each models as model}\n              <div on:click|preventDefault|stopPropagation={() => setDisplayedModel(model)}\n                class=\"list-group-item {displayedModel === model ? 'active' : ''}\"\n              >\n                <span\n                  contenteditable=true\n                  bind:innerHTML={model.name}\n                  style=\"cursor: text;\"></span>\n                {#if model.state}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => showModelInfo(model)}\n                    class=\"pull-right\" style=\"color: #888; font-style: italic;\"> {model.state[0].toUpperCase() + model.state.substring(1)}</span>\n                {:else}\n                  <span\n                    on:click|preventDefault|stopPropagation={() => saveModel(model)}\n                    class=\"glyphicon glyphicon-floppy-disk pull-right\" aria-hidden=\"true\"\n                  ></span>\n                {/if}\n              </div>\n            {/each}\n          {:else}\n            <div class=\"list-group-item\" style=\"font-style: italic; color: #888\">No Trained Models</div>\n          {/if}\n      <div>\n    </div>\n  </div>\n</main>\n\n<style>\n  main {\n    text-align: center;\n    padding: 1em;\n    max-width: 240px;\n    margin: 0 auto;\n  }\n\n  @media (min-width: 640px) {\n    main {\n      max-width: none;\n    }\n  }\n\n  .row {\n    display: flex;\n    flex-flow: row wrap;\n    justify-content: space-around;\n  }\n\n  .config-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n\n  .output-panel {\n    flex-grow: 1;\n    padding: 10px;\n  }\n</style>\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","stop_propagation","stopPropagation","attr","attribute","value","removeAttribute","getAttribute","setAttribute","to_number","set_data","wholeText","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","select_value","selected_option","querySelector","current_component","set_current_component","component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","push","flushing","seen_callbacks","Set","flush","update","$$","pop","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","parent_component","prop_values","bound","on_mount","on_destroy","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","c","intro","block","delete","local","m","new_on_destroy","map","filter","mount_component","id","type","state","toUpperCase","substring","arguments","EMPTY_FN_SCHEMA","architecture","dataset","displayedModel","accuracyPlot","eventElement","startTrainLabel","Plotly","batchSize","epochs","validation","optimizer","optimizers","loss","categorizedLosses","architectures","artifacts","models","showModelInfo","model","CustomEvent","detail","dispatchEvent","saveModel","setDisplayedModel","newModel","config","react","plotData","url","category","toLowerCase","replace","window","open","plotly","schemas","index","losses","concat","arg","includes","reductions","default","sort","arg1","arg2","num1","num2","decorateSchemas","lossesByCategory","entries","newPlot","modelID","info","find","startsWith","newData","arch","desc","[object Object]","destroy_component","$destroy","indexOf","splice","$$props","obj","$$set","keys"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EA2JhF,SAASE,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,GAEvB,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,EAAMG,GAAU,MAExC,SAASE,EAAOL,GACZA,EAAKM,WAAWC,YAAYP,GAEhC,SAASQ,EAAaC,EAAYC,GAC9B,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWG,OAAQD,GAAK,EACpCF,EAAWE,IACXF,EAAWE,GAAGE,EAAEH,GAG5B,SAASI,EAAQC,GACb,OAAOC,SAASC,cAAcF,GAoBlC,SAASG,EAAKC,GACV,OAAOH,SAASI,eAAeD,GAEnC,SAASE,IACL,OAAOH,EAAK,KAKhB,SAASI,EAAOtB,EAAMuB,EAAOC,EAASC,GAElC,OADAzB,EAAK0B,iBAAiBH,EAAOC,EAASC,GAC/B,IAAMzB,EAAK2B,oBAAoBJ,EAAOC,EAASC,GAE1D,SAASG,EAAgB1C,GACrB,OAAO,SAAUqC,GAGb,OAFAA,EAAMM,iBAEC3C,EAAG4C,KAAKC,KAAMR,IAG7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