]> source.dussan.org Git - vaadin-core.git/commitdiff
Release version 0.2-snapshot.
authorManolo Carrasco <manolo@apache.org>
Thu, 22 Jan 2015 07:28:24 +0000 (23:28 -0800)
committerSauli Tähkäpää <sauli@vaadin.com>
Thu, 21 May 2015 11:42:07 +0000 (14:42 +0300)
24 files changed:
LICENSE.md [new file with mode: 0644]
README.md [new file with mode: 0644]
bower.json [new file with mode: 0644]
vaadin-grid/demo.html [new file with mode: 0644]
vaadin-grid/demodata.js [new file with mode: 0644]
vaadin-grid/sort-asc.svg [new file with mode: 0644]
vaadin-grid/sort-desc.svg [new file with mode: 0644]
vaadin-grid/test/common.js [new file with mode: 0644]
vaadin-grid/test/grid-binding-data.html [new file with mode: 0644]
vaadin-grid/test/grid-editing-columns.html [new file with mode: 0644]
vaadin-grid/test/grid-editor-handler.html [new file with mode: 0644]
vaadin-grid/test/grid-properties.html [new file with mode: 0644]
vaadin-grid/test/grid-redrawer.html [new file with mode: 0644]
vaadin-grid/test/grid-rendering-light-dom.html [new file with mode: 0644]
vaadin-grid/test/grid-scrolling-rows.html [new file with mode: 0644]
vaadin-grid/test/grid-selecting-rows.html [new file with mode: 0644]
vaadin-grid/test/grid-sorting-rows.html [new file with mode: 0644]
vaadin-grid/test/grid-static-sections.html [new file with mode: 0644]
vaadin-grid/test/index.html [new file with mode: 0644]
vaadin-grid/tick.svg [new file with mode: 0644]
vaadin-grid/vaadin-grid-doc.html [new file with mode: 0644]
vaadin-grid/vaadin-grid-import.html [new file with mode: 0644]
vaadin-grid/vaadin-grid.html [new file with mode: 0644]
vaadin-grid/vaadin-grid.html.orig [new file with mode: 0644]

diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644 (file)
index 0000000..3342e94
--- /dev/null
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2014-2015 Vaadin Ltd.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..d7dabce
--- /dev/null
+++ b/README.md
@@ -0,0 +1,72 @@
+# Vaadin Components
+
+A set of high-quality Web Components built using Polymer.
+
+Learn more about [Vaadin Components.](https://vaadin.com/labs-components/)
+
+For contributions and issues, see the project's [Github Repository.](https://github.com/vaadin/components/)
+
+## Installation
+- Bower
+```shell
+$ bower install vaadin-components#0.3.0
+```
+```html
+<!-- Import web component polyfills and the component you want into your HTML -->
+<head>
+  ...
+  <script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
+  <link href="bower_components/vaadin-components/vaadin-grid/vaadin-grid.html" rel="import">
+  ...
+</head>
+```
+- CDN
+```html
+<!-- Import web component polyfills and the component you want into your HTML -->
+<head>
+  ...
+  <script src="https://cdn.vaadin.com/vaadin-components/0.3.0/webcomponentsjs/webcomponents-lite.js"></script>
+  <link href="https://cdn.vaadin.com/vaadin-components/0.3.0/vaadin-grid/vaadin-grid.html" rel="import">
+  ...
+</head>
+```
+- Downloading the zip archive
+    - Head over to https://vaadin.com/download#components
+    - Download the version you wish to use
+    - Extract the zip under your project folder
+```html
+<!-- Import web component polyfills and the component you want into your HTML -->
+<head>
+  ...
+  <script src="deps/vaadin-components/webcomponentsjs/webcomponents-lite.js"></script>
+  <link href="deps/vaadin-components/vaadin-grid.html" rel="import">
+  ...
+</head>
+```
+## Usage
+```html
+<!-- After adding the required imports, just add a <v-grid> into your HTML -->
+<v-grid>
+  <table>
+   <colgroup>
+     <col header-text="Name">
+     <col header-text="Value">
+     <col header-text="Progress">
+   </colgroup>
+   <tbody>
+     <tr>
+       <td>Grid</td>
+       <td>10000</td>
+       <td>0.8</td>
+     </tr>
+     <tr>
+       <td>Vaadin X</td>
+       <td>999999</td>
+       <td>0.8</td>
+     </tr>
+   </tbody>
+  </table>
+</v-grid>
+```
+
+For more detailed examples on usage, see the [components-examples](https://tomivirkki.github.io/components-examples)
diff --git a/bower.json b/bower.json
new file mode 100644 (file)
index 0000000..4b01696
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "name": "vaadin-components",
+  "version": "0.2-snapshot",
+  "authors": [
+    "Vaadin Ltd"
+  ],
+  "description": "Vaadin Grid web component",
+  "license": "Apache License 2.0",
+  "keywords": [
+    "web-components"
+  ],
+  "ignore": [
+    "**/.*",
+    "**/node_modules",
+    "**/bower_components",
+    "**/test",
+    "**/tests"
+  ],
+  "dependencies": {
+    "polymer": "Polymer/polymer#v0.9.0"
+  }
+}
\ No newline at end of file
diff --git a/vaadin-grid/demo.html b/vaadin-grid/demo.html
new file mode 100644 (file)
index 0000000..daa637e
--- /dev/null
@@ -0,0 +1,661 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1" />
+<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+
+<link href="vaadin-grid.html" rel="import">
+<script src="demodata.js"></script>
+<style>
+td.red, th.red, .red th, .red td, td.foot1, .foot1 td {
+  background: mistyrose !important;
+}
+td.blue, th.blue, .blue th, .blue td, td.foot2, .foot2 td {
+  background: aliceblue !important;
+}
+.foot1, .foot2 {
+  font-weight: bold !important;
+  text-align: center;
+}
+</style>
+</head>
+<body>
+  <script>
+    function waitUntilGridReady(id, cb) {
+      if (window.vaadin && vaadin._v_grid_ready) {
+        cb(document.getElementById(id));
+      } else {
+        document.addEventListener("v-grid-ready", function(){
+          cb(document.getElementById(id));
+        });
+      }
+    }
+    </script>
+
+<ol>
+  <li>
+  <h3>Simplest possible with inline data</h3>
+  <v-grid rows=1>
+  <table>
+    <col header-text="Name">
+    <col header-text="Value">
+    <col header-text="Progress">
+    <tbody>
+      <tr>
+        <td>Grid</td>
+        <td>10000</td>
+        <td>0.8</td>
+      </tr>
+      <tr>
+        <td>Vaadin X</td>
+        <td>999999</td>
+        <td>0.8</td>
+      </tr>
+    </tbody>
+  </table>
+  </v-grid>
+  </li>
+
+  <li>
+  <h3>Simplest possible with explicitly formatted inline data (i.e. children in cells)</h3>
+  <v-grid id="childrenInCells">
+  <table>
+    <col header-text="Name">
+    <col header-text="Value">
+    <col header-text="Progress">
+    <tbody>
+      <tr>
+        <td>Grid</td>
+        <td>10 000€</td>
+        <td><progress value="0.8" /></td>
+      </tr>
+      <tr>
+        <td>Vaadin X</td>
+        <td>999 999€</td>
+        <td><progress value="0.01" /></td>
+      </tr>
+    </tbody>
+  </table>
+  </v-grid>
+
+  </li>
+
+  <li>
+  <h3>Simplest possible with data source (all data available, no formatting)</h3>
+  <v-grid id='myGrid'>
+  <table>
+    <col header-text="Name">
+    <col header-text="Value">
+    <col header-text="Progress">
+  </table>
+  </v-grid>
+
+  <script>
+      // We need to wait until the WC has been initialized
+      // It could take a long if we are compiling SDM
+      waitUntilGridReady("myGrid", function(grid) {
+        var data = [ [ "Grid", 10000, 0.8 ], [ "Vaadin X", 999999, 0.01 ],
+                 [ "designer", 999999, 0.01 ] ];
+
+        grid.data.source = function(req) {
+          var array = data.slice(req.index, req.index + req.count);
+          req.success(array, data.length);
+        };
+      });
+    </script>
+  </li>
+
+  <li>
+  <h3>Simplest possible with lazy data source (no formatting)</h3>
+  <v-grid id='myBigGrid'>
+  <table>
+    <col header-text="Name">
+    <col header-text="Value">
+    <col header-text="Progress">
+  </table>
+  </v-grid>
+
+  <script>
+      waitUntilGridReady("myBigGrid", function(grid) {
+
+        grid.data.source = function(req) {
+          setTimeout(function() {
+            req.success(myBigData.slice(req.index, req.index + req.count), myBigData.length);
+          }, req.index ? 800 : 0);
+        };
+      });
+      // Note: myBigData is defined at the end of the page
+    </script>
+  </li>
+
+  <li>
+  <h3>Simplest possible with data source and formatting</h3>
+
+  <v-grid id="myFormatGrid">
+  <table>
+    <col header-text="Name">
+    <col header-text="Value">
+    <col header-text="Progress">
+  </table>
+  </v-grid>
+  <script>
+      waitUntilGridReady("myFormatGrid", function(grid) {
+        var data = [ [ "Grid", 10000, 0.8 ], [ "Vaadin X", 999999, 0.01 ], ];
+
+        grid.data.source = function(req) {
+          req.success(data.slice(req.index, req.index + req.count), data.length);
+        };
+
+        var valueRenderer = function(cell) {
+          cell.element.innerHTML = '$' + cell.data;
+        };
+
+        var progressRenderer = function(cell) {
+          var child = document.createElement("progress");
+          child.setAttribute('value', cell.data);
+          cell.element.appendChild(child);
+        };
+        grid.columns[1].renderer = valueRenderer;
+        grid.columns[2].renderer = progressRenderer;
+      });
+  </script>
+  </li>
+
+  <li>
+  <h3>Mapping data from a JS object into columns</h3>
+
+  <v-grid id="myMapGrid">
+  <table>
+    <col header-text="Name">
+    <col header-text="Value">
+    <col header-text="Progress">
+  </table>
+  </v-grid>
+    <button id="updateButton">update</button>
+    <button id="addButton">add</button>
+    <button id="removeButton">remove</button>
+  <script>
+    var data = [{ name: "Grid", value: 10000, progress: 0.8 },
+      { name: "Vaadin X", value: 999999, progress: 0.01 }];
+
+      waitUntilGridReady("myMapGrid", function(grid) {
+        grid.data.source = function(req) {
+          req.success(data.slice(req.index, req.index + req.count), data.length);
+        };
+
+        grid.columns[0].valueGenerator = function(rowObject, columnIndex) {
+          return "> " + rowObject.name;
+        };
+
+        grid.columns[1].name = "value";
+        grid.columns[2].name = "progress";
+      });
+
+      document.querySelector('#updateButton').addEventListener('click', function(e) {
+        var grid = document.querySelector('#myMapGrid');
+
+        var updatedItem = {name: "Button X", value: Math.round(Math.random() * 1000), progress: Math.random()};
+        data[0] = updatedItem;
+        grid.data.clearCache();
+      });
+
+      document.querySelector('#addButton').addEventListener('click', function(e) {
+        var grid = document.querySelector('#myMapGrid');
+
+        data.splice(0, 0, {name: "Button " + data.length, value: 111, progress: 0.01});
+        grid.data.clearCache(data.length);
+      });
+
+      document.querySelector('#removeButton').addEventListener('click', function(e) {
+        var grid = document.querySelector('#myMapGrid');
+
+        data.splice(0, 1);
+        grid.data.clearCache(data.length);
+      });
+  </script>
+  </li>
+
+  <li>
+  <h3>Mapping data from a array into single column</h3>
+  <v-grid id="with-single-column">
+
+    <table>
+      <col header-text="Name">
+    </table>
+  </v-grid>
+  <script>
+    waitUntilGridReady("with-single-column", function(grid) {
+      var data = [
+        "Grid",
+        "Vaadin X"
+      ];
+
+      grid.data.source = function(req) {
+        req.success(data.slice(req.index, req.index + req.count), data.length);
+      };
+    });
+  </script>
+  </li>
+
+  <li>
+  <h3>Complex headers</h3>
+  <v-grid>
+  <table>
+    <col>
+    <col>
+    <col>
+    <thead>
+      <tr class="blue">
+        <th><button>I'm a button</button></th>
+        <th colspan="2">Status</th>
+      </tr>
+      <tr default class="red">
+        <th>Name</th>
+        <th class="blue">Value</th>
+        <th>Progress</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr>
+        <td>Grid</td>
+        <td>10000</td>
+        <td>0.8</td>
+      </tr>
+      <tr>
+        <td>Vaadin X</td>
+        <td>999999</td>
+        <td>0.8</td>
+      </tr>
+    </tbody>
+    <tfoot>
+      <tr class="foot1">
+        <th colspan=3>This is a footer line in a cell</th>
+      </tr>
+      <tr class="foot2">
+        <th colspan=3><span>Some widgets in a footer</span> <input type=text/> <button>Click</button></th>
+      </tr>
+    </tfoot>
+  </table>
+  </v-grid>
+  </li>
+
+  <li>
+    <h3>Selection</h3>
+
+    <v-grid id="myMultiSelGrid" selection-mode="multi">
+      <table>
+        <col header-text="Name">
+        <col header-text="Value">
+        <col header-text="Progress">
+      </table>
+    </v-grid>
+    <div id="smbuttons">
+      <input type="radio" name="selectionmode" value="single">single</input>
+      <input type="radio" name="selectionmode" value="multi" checked="checked">multi</input>
+      <input type="radio" name="selectionmode" value="all">all</input>
+      <input type="radio" name="selectionmode" value="disabled">disabled</input>
+    </div>
+    <div id="sizelabel"></div>
+    <div id="deselectedlabel" style="overflow: hidden; text-overflow: ellipsis;"></div>
+    <div id="selectedlabel" style="overflow: hidden; text-overflow: ellipsis;"></div>
+    <script>
+      waitUntilGridReady("myMultiSelGrid", function(grid) {
+        grid.data.source = myBigData;
+
+        var updateFields = function(event) {
+          document.getElementById("sizelabel").innerText = "selection.size: " + grid.selection.size;
+
+          var selectedLabel = document.getElementById("selectedlabel");
+          if (grid.selection.mode === "all"){
+            selectedLabel.style.color = "#f00";
+            selectedLabel.innerText = "selection.selected() PREFER deselected() WITH SELECTION MODE \"all\"): " + grid.selection.selected();
+          } else {
+            selectedLabel.style.color = "#000";
+            selectedLabel.innerText = "selection.selected(): " + grid.selection.selected();
+          }
+          document.getElementById("deselectedlabel").innerText = "selection.deselected(): " + grid.selection.deselected();
+
+          document.querySelector("input[name='selectionmode'][checked='checked']").removeAttribute("checked");
+          document.querySelector("input[name='selectionmode'][value='"+ grid.selection.mode +"']").setAttribute("checked", "checked");
+        };
+
+        var modeListener = function(e) {
+          grid.selection.mode = e.target.value;
+          updateFields();
+        };
+        var radios = document.querySelectorAll("input[name='selectionmode']");
+        for (var i = 0; i< radios.length; i++) {
+          radios[i].addEventListener("click", modeListener);
+        }
+
+        grid.addEventListener("select", updateFields);
+      });
+    </script>
+  </li>
+
+  <li>
+  <h3>Simplest possible polymer dom-repeat from array of objects</h3>
+    <dom-module id="my-grid-with-template">
+      <template>
+        <v-grid selectionMode='multi'>
+          <table>
+            <col header-text="Name">
+            <col header-text="Value">
+            <col header-text="Progress">
+            <tbody>
+            <template is="dom-repeat" items="{{mydata}}">
+              <tr>
+                <td>{{item.name}}</td>
+                <td>{{item.value}}</td>
+                <td>{{item.progress}}</td>
+              </tr>
+            </template>
+            </tbody>
+          </table>
+        </v-grid>
+      </template>
+    </dom-module>
+    <script>
+      Polymer({
+        is: 'my-grid-with-template',
+        ready: function() {
+          this.mydata = [
+            {"name": "Grid", "value": "10000", "progress": 0.8},
+            {"name": "Vaadin X", "value": "999999", "progress": 0.8}
+          ];
+        }
+      }) ;
+    </script>
+    <my-grid-with-template></my-grid-with-template>
+  </li>
+
+  <li>
+    <h3>Simplest possible polymer dom-repeat from simple array</h3>
+    <dom-module id="my-grid-with-template2">
+      <template>
+        <v-grid selectionMode='multi'>
+          <table>
+            <col header-text="Name">
+            <tbody>
+            <template is="dom-repeat" items="{{mydata}}">
+              <tr>
+                <td>{{item}}</td>
+              </tr>
+            </template>
+            </tbody>
+          </table>
+        </v-grid>
+      </template>
+    </dom-module>
+    <script>
+      Polymer({
+        is: 'my-grid-with-template2',
+        ready: function() {
+          this.mydata = [
+            "Grid",
+            "Vaadin X"
+          ];
+        }
+      }) ;
+    </script>
+    <my-grid-with-template2></my-grid-with-template2>
+  </li>
+
+  <li>
+  <h3>Simplest possible polymer dom-repeat from array of objects and selection multiple</h3>
+    <dom-module id="my-grid-with-template-multi">
+      <template>
+        <v-grid selectionMode='multi'>
+          <table>
+            <col header-text="Name">
+            <col header-text="Value">
+            <col header-text="Progress">
+            <tbody>
+            <template is="dom-repeat" items="{{mydata}}">
+              <tr>
+                <td>{{item.name}}</td>
+                <td>{{item.value}}</td>
+                <td>{{item.progress}}</td>
+              </tr>
+            </template>
+            </tbody>
+          </table>
+        </v-grid>
+      </template>
+    </dom-module>
+    <script>
+      Polymer({
+        is: 'my-grid-with-template-multi',
+        ready: function() {
+          this.mydata = [
+            {"name": "Grid", "value": "10000", "progress": 0.8},
+            {"name": "Vaadin X", "value": "999999", "progress": 0.8}
+          ];
+        }
+      }) ;
+    </script>
+    <my-grid-with-template-multi></my-grid-with-template-multi>
+  </li>
+
+  <li>
+  <h3>Sort example</h3>
+    <v-grid id='mySortGrid'>
+      <table>
+        <col header-text="Name" sortable>
+        <col header-text="Value" sortable>
+        <col header-text="Progress" sortable>
+      </table>
+    </v-grid>
+    <button id="mySortButton">Sort by column 1</button>
+    Sort: <span id="mySortLabel"></span>
+
+    <script>
+        waitUntilGridReady("mySortGrid", function(grid) {
+          var data = [ [ "Gridddd", 10000, 0.8 ], [ "Vaadin X", 999999, 0.01 ],
+                       [ "designer", 43256, 0.01 ], [ "TK", 1967, 0.05 ] ];
+
+          var button = document.getElementById("mySortButton");
+          var label = document.getElementById("mySortLabel");
+
+          var dir = 'desc';
+          button.addEventListener("click", function(event) {
+            dir = dir == 'desc' ? "asc" : "desc";
+            grid.data.sortOrder = [{
+              column: 1,
+              direction: dir
+            }];
+          });
+
+          grid.addEventListener("sort", function() {
+            var idx = grid.data.sortOrder[0].column;
+            var asc = grid.data.sortOrder[0].direction == 'asc';
+            data.sort(function(a, b){
+              return a[idx] < b[idx] && asc ? -1 : 1;
+            });
+            label.textContent = JSON.stringify(grid.sortOrder);
+          })
+          grid.data.source = function(req) {
+            req.success(data.slice(req.index, req.index + req.count), data.length);
+          };
+        });
+    </script>
+  </li>
+
+  <li>
+    <h3>Row editor</h3>
+    <v-grid id='editableGrid' style='width: 200px'>
+      <table>
+        <col header-text="Name">
+        <col header-text="Value">
+        <tbody>
+          <tr>
+            <td>Grid</td>
+            <td>10000</td>
+          </tr>
+          <tr>
+            <td>VaadinX</td>
+            <td>1000</td>
+          </tr>
+        </tbody>
+      </table>
+    </v-grid>
+
+    <script>
+      waitUntilGridReady("editableGrid", function(grid) {
+        grid.columns[0].name = "name";
+        grid.columns[1].name = "value";
+        grid.editor.enabled = true;
+        grid.editor.saveButtonText = "Ok";
+        grid.editor.cancelButtonText = "Nope";
+        grid.editor.handler = {
+          getCellEditor: function(columnObject) {
+            return document.createElement("input");
+          },
+          bind: function(req) {
+            for (var i = 0; i < req.grid.columns.length; i++) {
+              var col = req.grid.columns[i];
+              var el = req.getCellEditor(col);
+              el.value = req.dataItem[i];
+            }
+            req.success();
+          },
+          save: function(req) {
+            for (var i = 0; i < req.grid.columns.length; i++) {
+              var col = req.grid.columns[i];
+              var el = req.getCellEditor(col);
+              var cell = grid.lightDom.querySelectorAll("tbody tr")[req.rowIndex].querySelectorAll("td")[i];
+              cell.innerHTML = el.value;
+            }
+            req.success();
+          }
+        };
+      });
+    </script>
+  </li>
+
+  <li>
+  <h3>DOM API</h3>
+  <v-grid
+    selection-mode='disabled'
+    selected-rows='0,2,3'
+    rows=3
+    frozen-columns= '-1'
+    style='width: 100%'
+    editable
+    >
+  <table >
+    <colgroup>
+      <col sortable sort-direction="desc" header-text="Name">
+      <col sortable sort-direction="asc" header-text="Value">
+      <col width=40 header-text="Progress">
+      <col min-width=200 header-text="foo">
+      <col header-text="bar">
+      <col flex=100 header-text="foo">
+      <col flex=0 header-text="bar">
+    </colgroup>
+    <tbody>
+      <tr>
+        <td>Grid</td>
+        <td>10000</td>
+        <td>0.8</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+      </tr>
+      <tr>
+        <td>Vaadin X</td>
+        <td>999999</td>
+        <td>0.8</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+      </tr>
+      <tr>
+        <td>Designer</td>
+        <td>10000</td>
+        <td>0.5</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+      </tr>
+      <tr>
+        <td>Spreadsheet</td>
+        <td>10000</td>
+        <td>0.5</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+      </tr>
+      <tr>
+        <td>TK</td>
+        <td>10000</td>
+        <td>0.5</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+        <td>lorem ipsum</td>
+        <td>dolor sit amet</td>
+      </tr>
+    </tbody>
+  </table>
+  </v-grid>
+  </li>
+
+  <li>
+    <h3>Header and Footer</h3>
+    <v-grid id='staticsections'>
+      <table>
+        <col header-text="Name">
+        <col header-text="Value">
+        <tbody>
+          <tr>
+            <td>Grid</td>
+            <td>10000</td>
+          </tr>
+          <tr>
+            <td>VaadinX</td>
+            <td>1000</td>
+          </tr>
+        </tbody>
+      </table>
+    </v-grid>
+    <br/>
+    <button id="headervisibility">Toggle header visibility</button>
+    <button id="footervisibility">Toggle footer visibility</button>
+    <script>
+      waitUntilGridReady("staticsections", function(grid) {
+        // Remove the header row
+        grid.header.removeRow(0);
+
+        // Add a header row
+        var colspanToggle = document.createElement("button");
+        colspanToggle.innerHTML = "Toggle colspan";
+        colspanToggle.addEventListener("click", function(){
+          var cell = grid.header.getCell(0, 0);
+          cell.colspan = cell.colspan == 1 ? 2 : 1;
+        });
+        grid.header.addRow(0, [colspanToggle, "Value"]);
+
+        // Add a footer row
+        grid.footer.addRow(0, ["sum", 11000]);
+
+        // Toggle header / footer visibility
+        document.getElementById("headervisibility").addEventListener("click", function(){
+          grid.header.hidden = !grid.header.hidden;
+        });
+        document.getElementById("footervisibility").addEventListener("click", function(){
+          grid.footer.hidden = !grid.footer.hidden;
+        });
+
+      });
+    </script>
+  </li>
+
+</ol>
+</body>
+</html>
diff --git a/vaadin-grid/demodata.js b/vaadin-grid/demodata.js
new file mode 100644 (file)
index 0000000..b284aa0
--- /dev/null
@@ -0,0 +1,2021 @@
+  myBigData =
+    [
+     [
+       "Patrik",
+       "Paul",
+       "Invent",
+       "results"
+     ],
+     [
+       "John",
+       "Signell",
+       "Export",
+       "results"
+     ],
+     [
+       "Patrik",
+       "Åstrand",
+       "Deliver",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Fix",
+       "results"
+     ],
+     [
+       "Leif",
+       "Paul",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Produce",
+       "Vaadin"
+     ],
+     [
+       "Teemu",
+       "Ahlroos",
+       "Feed",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Åstrand",
+       "Launch",
+       "teleportation"
+     ],
+     [
+       "Leif",
+       "Lehtinen",
+       "Launch",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Polish",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Design",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Dahlström",
+       "Fix",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Lindström",
+       "Implement",
+       "Grid"
+     ],
+     [
+       "John",
+       "Ahlroos",
+       "Deliver",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Leif",
+       "Lehtinen",
+       "Implement",
+       "world peace"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Deliver",
+       "soup"
+     ],
+     [
+       "Johannes",
+       "Åstrand",
+       "Disable",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Implement",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Deliver",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Design",
+       "results"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Export",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Paul",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Patrik",
+       "Lindström",
+       "Implement",
+       "world peace"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Polish",
+       "the weather"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Design",
+       "Vaadin"
+     ],
+     [
+       "Johannes",
+       "Suo-Anttila",
+       "Fix",
+       "results"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Invent",
+       "results"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Polish",
+       "results"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Launch",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Åstrand",
+       "Design",
+       "Grid"
+     ],
+     [
+       "Patrik",
+       "Åstrand",
+       "Design",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Ahlroos",
+       "Invent",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Implement",
+       "Vaadin"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Produce",
+       "the weather"
+     ],
+     [
+       "Patrik",
+       "Åstrand",
+       "Fix",
+       "world peace"
+     ],
+     [
+       "Teemu",
+       "Lindström",
+       "Deliver",
+       "the dog"
+     ],
+     [
+       "Teemu",
+       "Signell",
+       "Design",
+       "teleportation"
+     ],
+     [
+       "Joonas",
+       "Lehtinen",
+       "Feed",
+       "the weather"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Feed",
+       "Vaadin"
+     ],
+     [
+       "John",
+       "Lehtinen",
+       "Design",
+       "the dog"
+     ],
+     [
+       "Artur",
+       "Åstrand",
+       "Activate",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Paul",
+       "Design",
+       "Vaadin"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Deliver",
+       "world peace"
+     ],
+     [
+       "Teemu",
+       "Signell",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Johannes",
+       "Åstrand",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Disable",
+       "the weather"
+     ],
+     [
+       "Henrik",
+       "Lehtinen",
+       "Disable",
+       "Grid"
+     ],
+     [
+       "Teemu",
+       "Åstrand",
+       "Implement",
+       "Grid"
+     ],
+     [
+       "Teemu",
+       "Åstrand",
+       "Implement",
+       "results"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Invent",
+       "the weather"
+     ],
+     [
+       "Joonas",
+       "Signell",
+       "Implement",
+       "teleportation"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Produce",
+       "teleportation"
+     ],
+     [
+       "Johannes",
+       "Suo-Anttila",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Leif",
+       "Lehtinen",
+       "Design",
+       "results"
+     ],
+     [
+       "John",
+       "Lindström",
+       "Invent",
+       "Grid"
+     ],
+     [
+       "Teemu",
+       "Dahlström",
+       "Polish",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Export",
+       "teleportation"
+     ],
+     [
+       "Johannes",
+       "Signell",
+       "Activate",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Signell",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Launch",
+       "world peace"
+     ],
+     [
+       "Artur",
+       "Paul",
+       "Feed",
+       "results"
+     ],
+     [
+       "John",
+       "Åstrand",
+       "Fix",
+       "the dog"
+     ],
+     [
+       "Teemu",
+       "Dahlström",
+       "Polish",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Feed",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Export",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Dahlström",
+       "Polish",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Import",
+       "Vaadin"
+     ],
+     [
+       "Joonas",
+       "Åstrand",
+       "Deliver",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Åstrand",
+       "Launch",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Disable",
+       "results"
+     ],
+     [
+       "Patrik",
+       "Signell",
+       "Deliver",
+       "Grid"
+     ],
+     [
+       "Johannes",
+       "Suo-Anttila",
+       "Deliver",
+       "the weather"
+     ],
+     [
+       "Teemu",
+       "Paul",
+       "Feed",
+       "results"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Produce",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Implement",
+       "teleportation"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Implement",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Lindström",
+       "Fix",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Launch",
+       "teleportation"
+     ],
+     [
+       "John",
+       "Suo-Anttila",
+       "Launch",
+       "Grid"
+     ],
+     [
+       "Johannes",
+       "Åstrand",
+       "Feed",
+       "results"
+     ],
+     [
+       "Teemu",
+       "Lindström",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Activate",
+       "results"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Export",
+       "soup"
+     ],
+     [
+       "Patrik",
+       "Lehtinen",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Fix",
+       "the weather"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Export",
+       "world peace"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Establish",
+       "the dog"
+     ],
+     [
+       "Teemu",
+       "Ahlroos",
+       "Launch",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Åstrand",
+       "Disable",
+       "soup"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Polish",
+       "soup"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Fix",
+       "teleportation"
+     ],
+     [
+       "Teemu",
+       "Suo-Anttila",
+       "Polish",
+       "the dog"
+     ],
+     [
+       "John",
+       "Suo-Anttila",
+       "Import",
+       "the dog"
+     ],
+     [
+       "Johannes",
+       "Åstrand",
+       "Disable",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Activate",
+       "the weather"
+     ],
+     [
+       "John",
+       "Dahlström",
+       "Disable",
+       "world peace"
+     ],
+     [
+       "Joonas",
+       "Ahlroos",
+       "Deliver",
+       "soup"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Implement",
+       "Vaadin"
+     ],
+     [
+       "Henrik",
+       "Ahlroos",
+       "Export",
+       "the weather"
+     ],
+     [
+       "Teemu",
+       "Suo-Anttila",
+       "Polish",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Åstrand",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Signell",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Invent",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Design",
+       "teleportation"
+     ],
+     [
+       "Teemu",
+       "Ahlroos",
+       "Invent",
+       "results"
+     ],
+     [
+       "Patrik",
+       "Lehtinen",
+       "Activate",
+       "results"
+     ],
+     [
+       "Teemu",
+       "Lindström",
+       "Produce",
+       "results"
+     ],
+     [
+       "Leif",
+       "Åstrand",
+       "Import",
+       "the weather"
+     ],
+     [
+       "Joonas",
+       "Ahlroos",
+       "Launch",
+       "world peace"
+     ],
+     [
+       "Leif",
+       "Signell",
+       "Import",
+       "the weather"
+     ],
+     [
+       "Joonas",
+       "Ahlroos",
+       "Disable",
+       "the weather"
+     ],
+     [
+       "Leif",
+       "Signell",
+       "Invent",
+       "results"
+     ],
+     [
+       "John",
+       "Paul",
+       "Polish",
+       "soup"
+     ],
+     [
+       "Leif",
+       "Åstrand",
+       "Feed",
+       "results"
+     ],
+     [
+       "Leif",
+       "Åstrand",
+       "Implement",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Fix",
+       "the dog"
+     ],
+     [
+       "John",
+       "Ahlroos",
+       "Establish",
+       "Vaadin"
+     ],
+     [
+       "Teemu",
+       "Suo-Anttila",
+       "Produce",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Disable",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Lehtinen",
+       "Produce",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Suo-Anttila",
+       "Design",
+       "world peace"
+     ],
+     [
+       "Johannes",
+       "Åstrand",
+       "Polish",
+       "world peace"
+     ],
+     [
+       "Teemu",
+       "Lindström",
+       "Activate",
+       "teleportation"
+     ],
+     [
+       "John",
+       "Ahlroos",
+       "Deliver",
+       "results"
+     ],
+     [
+       "Henrik",
+       "Ahlroos",
+       "Design",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Fix",
+       "the weather"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Establish",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Import",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Export",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Paul",
+       "Design",
+       "world peace"
+     ],
+     [
+       "Johannes",
+       "Suo-Anttila",
+       "Deliver",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Lindström",
+       "Implement",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Åstrand",
+       "Import",
+       "world peace"
+     ],
+     [
+       "Leif",
+       "Lindström",
+       "Design",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Implement",
+       "Grid"
+     ],
+     [
+       "John",
+       "Dahlström",
+       "Activate",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Polish",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Produce",
+       "the weather"
+     ],
+     [
+       "Patrik",
+       "Åstrand",
+       "Launch",
+       "the weather"
+     ],
+     [
+       "Leif",
+       "Paul",
+       "Invent",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Leif",
+       "Signell",
+       "Implement",
+       "teleportation"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Establish",
+       "results"
+     ],
+     [
+       "John",
+       "Suo-Anttila",
+       "Disable",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Fix",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Invent",
+       "Grid"
+     ],
+     [
+       "Johannes",
+       "Paul",
+       "Design",
+       "world peace"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Establish",
+       "the dog"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Establish",
+       "Vaadin"
+     ],
+     [
+       "Joonas",
+       "Signell",
+       "Export",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Invent",
+       "Grid"
+     ],
+     [
+       "Patrik",
+       "Paul",
+       "Disable",
+       "world peace"
+     ],
+     [
+       "John",
+       "Signell",
+       "Launch",
+       "results"
+     ],
+     [
+       "Henrik",
+       "Lehtinen",
+       "Produce",
+       "the weather"
+     ],
+     [
+       "Patrik",
+       "Suo-Anttila",
+       "Disable",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Launch",
+       "Vaadin"
+     ],
+     [
+       "John",
+       "Lehtinen",
+       "Feed",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Launch",
+       "world peace"
+     ],
+     [
+       "Leif",
+       "Lehtinen",
+       "Fix",
+       "teleportation"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Export",
+       "Grid"
+     ],
+     [
+       "Johannes",
+       "Signell",
+       "Polish",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Ahlroos",
+       "Export",
+       "Grid"
+     ],
+     [
+       "Teemu",
+       "Paul",
+       "Fix",
+       "the weather"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Feed",
+       "the weather"
+     ],
+     [
+       "John",
+       "Paul",
+       "Polish",
+       "results"
+     ],
+     [
+       "Patrik",
+       "Lehtinen",
+       "Launch",
+       "teleportation"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Design",
+       "results"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Polish",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Design",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Export",
+       "teleportation"
+     ],
+     [
+       "Patrik",
+       "Lehtinen",
+       "Polish",
+       "Vaadin"
+     ],
+     [
+       "Johannes",
+       "Signell",
+       "Activate",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Signell",
+       "Deliver",
+       "the weather"
+     ],
+     [
+       "John",
+       "Signell",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "Artur",
+       "Paul",
+       "Polish",
+       "the weather"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Implement",
+       "results"
+     ],
+     [
+       "Leif",
+       "Lehtinen",
+       "Implement",
+       "world peace"
+     ],
+     [
+       "Joonas",
+       "Lehtinen",
+       "Establish",
+       "teleportation"
+     ],
+     [
+       "Henrik",
+       "Dahlström",
+       "Polish",
+       "results"
+     ],
+     [
+       "Teemu",
+       "Signell",
+       "Disable",
+       "world peace"
+     ],
+     [
+       "Artur",
+       "Åstrand",
+       "Invent",
+       "Vaadin"
+     ],
+     [
+       "Leif",
+       "Lindström",
+       "Import",
+       "the dog"
+     ],
+     [
+       "Johannes",
+       "Ahlroos",
+       "Establish",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Export",
+       "Vaadin"
+     ],
+     [
+       "Joonas",
+       "Lehtinen",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Johannes",
+       "Paul",
+       "Launch",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Feed",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Paul",
+       "Implement",
+       "world peace"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Export",
+       "soup"
+     ],
+     [
+       "Johannes",
+       "Signell",
+       "Launch",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Suo-Anttila",
+       "Polish",
+       "the dog"
+     ],
+     [
+       "Leif",
+       "Paul",
+       "Establish",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Paul",
+       "Implement",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Signell",
+       "Polish",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Åstrand",
+       "Polish",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Activate",
+       "teleportation"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Launch",
+       "soup"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Lindström",
+       "Deliver",
+       "soup"
+     ],
+     [
+       "Henrik",
+       "Lehtinen",
+       "Disable",
+       "soup"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Produce",
+       "results"
+     ],
+     [
+       "John",
+       "Åstrand",
+       "Implement",
+       "the dog"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Activate",
+       "soup"
+     ],
+     [
+       "John",
+       "Ahlroos",
+       "Design",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Deliver",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Import",
+       "the dog"
+     ],
+     [
+       "John",
+       "Dahlström",
+       "Export",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Import",
+       "results"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Invent",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Åstrand",
+       "Invent",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Polish",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Feed",
+       "the weather"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Activate",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Produce",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Dahlström",
+       "Deliver",
+       "Grid"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Activate",
+       "Grid"
+     ],
+     [
+       "Teemu",
+       "Åstrand",
+       "Launch",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Disable",
+       "Grid"
+     ],
+     [
+       "John",
+       "Åstrand",
+       "Design",
+       "the weather"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Produce",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Suo-Anttila",
+       "Polish",
+       "the weather"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Export",
+       "the weather"
+     ],
+     [
+       "Patrik",
+       "Signell",
+       "Produce",
+       "world peace"
+     ],
+     [
+       "John",
+       "Lehtinen",
+       "Fix",
+       "the dog"
+     ],
+     [
+       "Johannes",
+       "Lehtinen",
+       "Disable",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Export",
+       "Vaadin"
+     ],
+     [
+       "Henrik",
+       "Ahlroos",
+       "Fix",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Feed",
+       "the weather"
+     ],
+     [
+       "Johannes",
+       "Dahlström",
+       "Establish",
+       "Vaadin"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Import",
+       "results"
+     ],
+     [
+       "Patrik",
+       "Åstrand",
+       "Disable",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Suo-Anttila",
+       "Export",
+       "the dog"
+     ],
+     [
+       "Teemu",
+       "Åstrand",
+       "Deliver",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Signell",
+       "Import",
+       "Grid"
+     ],
+     [
+       "Leif",
+       "Lindström",
+       "Design",
+       "soup"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Polish",
+       "soup"
+     ],
+     [
+       "Johannes",
+       "Signell",
+       "Implement",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Activate",
+       "world peace"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Feed",
+       "results"
+     ],
+     [
+       "Artur",
+       "Paul",
+       "Invent",
+       "results"
+     ],
+     [
+       "Teemu",
+       "Paul",
+       "Fix",
+       "world peace"
+     ],
+     [
+       "John",
+       "Åstrand",
+       "Implement",
+       "results"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Implement",
+       "the weather"
+     ],
+     [
+       "Henrik",
+       "Lehtinen",
+       "Fix",
+       "world peace"
+     ],
+     [
+       "Teemu",
+       "Ahlroos",
+       "Feed",
+       "soup"
+     ],
+     [
+       "Henrik",
+       "Ahlroos",
+       "Establish",
+       "Grid"
+     ],
+     [
+       "Patrik",
+       "Lehtinen",
+       "Implement",
+       "Grid"
+     ],
+     [
+       "Joonas",
+       "Åstrand",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "John",
+       "Lindström",
+       "Feed",
+       "results"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Invent",
+       "Grid"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Export",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Signell",
+       "Import",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Paul",
+       "Polish",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Activate",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Paul",
+       "Activate",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Ahlroos",
+       "Polish",
+       "the dog"
+     ],
+     [
+       "John",
+       "Lehtinen",
+       "Polish",
+       "results"
+     ],
+     [
+       "Leif",
+       "Lindström",
+       "Disable",
+       "world peace"
+     ],
+     [
+       "John",
+       "Signell",
+       "Activate",
+       "Vaadin"
+     ],
+     [
+       "Johannes",
+       "Suo-Anttila",
+       "Implement",
+       "the weather"
+     ],
+     [
+       "Johannes",
+       "Lehtinen",
+       "Implement",
+       "teleportation"
+     ],
+     [
+       "John",
+       "Signell",
+       "Establish",
+       "teleportation"
+     ],
+     [
+       "Leif",
+       "Åstrand",
+       "Produce",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Produce",
+       "teleportation"
+     ],
+     [
+       "Teemu",
+       "Ahlroos",
+       "Import",
+       "teleportation"
+     ],
+     [
+       "Henrik",
+       "Lindström",
+       "Produce",
+       "Vaadin"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Design",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Suo-Anttila",
+       "Establish",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Åstrand",
+       "Import",
+       "teleportation"
+     ],
+     [
+       "John",
+       "Signell",
+       "Export",
+       "teleportation"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Feed",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Dahlström",
+       "Feed",
+       "world peace"
+     ],
+     [
+       "Johannes",
+       "Lehtinen",
+       "Produce",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Polish",
+       "the weather"
+     ],
+     [
+       "Leif",
+       "Signell",
+       "Import",
+       "teleportation"
+     ],
+     [
+       "Henrik",
+       "Paul",
+       "Activate",
+       "world peace"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Design",
+       "world peace"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Activate",
+       "results"
+     ],
+     [
+       "Patrik",
+       "Signell",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Activate",
+       "world peace"
+     ],
+     [
+       "Patrik",
+       "Dahlström",
+       "Polish",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Patrik",
+       "Signell",
+       "Deliver",
+       "Vaadin"
+     ],
+     [
+       "Teemu",
+       "Åstrand",
+       "Launch",
+       "the weather"
+     ],
+     [
+       "Patrik",
+       "Lindström",
+       "Polish",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Invent",
+       "the dog"
+     ],
+     [
+       "Patrik",
+       "Ahlroos",
+       "Export",
+       "teleportation"
+     ],
+     [
+       "Teemu",
+       "Signell",
+       "Export",
+       "Grid"
+     ],
+     [
+       "Johannes",
+       "Ahlroos",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Paul",
+       "Launch",
+       "world peace"
+     ],
+     [
+       "Joonas",
+       "Lindström",
+       "Launch",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Export",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Dahlström",
+       "Implement",
+       "teleportation"
+     ],
+     [
+       "Artur",
+       "Ahlroos",
+       "Implement",
+       "the weather"
+     ],
+     [
+       "Joonas",
+       "Suo-Anttila",
+       "Import",
+       "world peace"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Launch",
+       "Vaadin"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Export",
+       "Vaadin"
+     ],
+     [
+       "Leif",
+       "Lindström",
+       "Establish",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Dahlström",
+       "Activate",
+       "teleportation"
+     ],
+     [
+       "Johannes",
+       "Lehtinen",
+       "Deliver",
+       "Grid"
+     ],
+     [
+       "Henrik",
+       "Signell",
+       "Fix",
+       "Vaadin"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Polish",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Fix",
+       "world peace"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Establish",
+       "results"
+     ],
+     [
+       "Joonas",
+       "Signell",
+       "Feed",
+       "the weather"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Disable",
+       "Vaadin"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Launch",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Invent",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Paul",
+       "Deliver",
+       "Vaadin"
+     ],
+     [
+       "John",
+       "Lindström",
+       "Invent",
+       "world peace"
+     ],
+     [
+       "Leif",
+       "Åstrand",
+       "Deliver",
+       "results"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Fix",
+       "the dog"
+     ],
+     [
+       "Henrik",
+       "Suo-Anttila",
+       "Activate",
+       "the dog"
+     ],
+     [
+       "Leif",
+       "Paul",
+       "Deliver",
+       "results"
+     ],
+     [
+       "Leif",
+       "Ahlroos",
+       "Disable",
+       "the weather"
+     ],
+     [
+       "Artur",
+       "Suo-Anttila",
+       "Produce",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Signell",
+       "Disable",
+       "Vaadin"
+     ],
+     [
+       "Joonas",
+       "Lehtinen",
+       "Launch",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Lehtinen",
+       "Deliver",
+       "the weather"
+     ],
+     [
+       "Henrik",
+       "Åstrand",
+       "Export",
+       "Grid"
+     ],
+     [
+       "Artur",
+       "Lindström",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Artur",
+       "Dahlström",
+       "Implement",
+       "the weather"
+     ],
+     [
+       "Joonas",
+       "Dahlström",
+       "Fix",
+       "the weather"
+     ],
+     [
+       "Joonas",
+       "Dahlström",
+       "Activate",
+       "soup"
+     ],
+     [
+       "Johannes",
+       "Dahlström",
+       "Fix",
+       "the weather"
+     ],
+     [
+       "Artur",
+       "Åstrand",
+       "Implement",
+       "soup"
+     ],
+     [
+       "Joonas",
+       "Ahlroos",
+       "Feed",
+       "the dog"
+     ],
+     [
+       "John",
+       "Dahlström",
+       "Invent",
+       "soup"
+     ],
+     [
+       "Patrik",
+       "Suo-Anttila",
+       "Design",
+       "results"
+     ],
+     [
+       "Johannes",
+       "Lindström",
+       "Design",
+       "soup"
+     ],
+     [
+       "Teemu",
+       "Paul",
+       "Fix",
+       "the weather"
+     ],
+     [
+       "John",
+       "Paul",
+       "Produce",
+       "Vaadin"
+     ],
+     [
+       "Leif",
+       "Suo-Anttila",
+       "Feed",
+       "Grid"
+     ],
+     [
+       "Johannes",
+       "Åstrand",
+       "Disable",
+       "Vaadin"
+     ],
+     [
+       "Patrik",
+       "Lehtinen",
+       "Fix",
+       "Vaadin"
+     ]
+  ];
+
+  myBigDataSize = myBigData.length;
diff --git a/vaadin-grid/sort-asc.svg b/vaadin-grid/sort-asc.svg
new file mode 100644 (file)
index 0000000..ce1e7d9
--- /dev/null
@@ -0,0 +1 @@
+<svg width="11px" height="5px" viewBox="0 0 11 5" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M5.5,0 L0,4.88888889 L11,4.88888889 L5.5,0 L5.5,0 Z" fill="#FFFFFF"></path></svg>
diff --git a/vaadin-grid/sort-desc.svg b/vaadin-grid/sort-desc.svg
new file mode 100644 (file)
index 0000000..ab1b941
--- /dev/null
@@ -0,0 +1 @@
+<svg width="11px" height="5px" viewBox="0 0 11 5" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M5.5,4.88888889 L0,0 L11,0 L5.5,4.88888889 L5.5,4.88888889 Z" fill="#FFFFFF"></path></svg>
diff --git a/vaadin-grid/test/common.js b/vaadin-grid/test/common.js
new file mode 100644 (file)
index 0000000..4815d96
--- /dev/null
@@ -0,0 +1,86 @@
+var grid, wrapper;
+
+describe.feature = function(description, suite) {
+  describe(description, function() {
+    before(function(done) {
+      initializeGrid();
+
+      waitUntil(function() {
+        return grid.then;
+      }, done, done);
+    });
+
+    after(function() {
+      return grid; //make sure everything is finished before moving on.
+    });
+
+    suite();
+  });
+};
+
+function gridContainsText(_grid, text) {
+  return Polymer.dom(_grid.root).querySelector(".v-grid-tablewrapper").parentElement.innerHTML.indexOf(text) > -1;
+}
+
+function waitUntil(check, exec, onTimeout) {
+  var id = setInterval(function() {
+    if (check()) {
+      clearInterval(id);
+      clearTimeout(timeoutId);
+      exec();
+    }
+  }, 100);
+
+  var timeoutId = setTimeout(function() {
+    clearInterval(id);
+    assert.fail();
+    onTimeout();
+  }, 5000);
+}
+
+
+function initializeGrid() {
+  wrapper = document.getElementById("gridwrapper");
+  wrapper.innerHTML = "<v-grid>" +
+  "                     <table>" +
+  "                       <col header-text='Name'>" +
+  "                       <col header-text='Value'>" +
+  "                       <tbody>" +
+  "                         <tr>" +
+  "                           <td>Grid</td>" +
+  "                           <td>10000</td>" +
+  "                         </tr>" +
+  "                         <tr>" +
+  "                           <td>VaadinX</td>" +
+  "                           <td>1000</td>" +
+  "                         </tr>" +
+  "                       </tbody>" +
+  "                     <tfoot>" +
+  "                       <tr>" +
+  "                         <td>Name</td>" +
+  "                         <td>Value</td>" +
+  "                       </tr>" +
+  "                     </tfoot>"+
+  "                     </table>" +
+  "                     </v-grid>";
+  grid = wrapper.querySelector("v-grid");
+
+  return grid;
+};
+
+var local = function() {
+  return Polymer.dom(grid.root);
+};
+var light = function() {
+  return Polymer.dom(grid);
+};
+
+var qLocal = function(selector) {
+  return local().querySelector(selector);
+};
+var qaLocal = function(selector) {
+  return local().querySelectorAll(selector);
+};
+var qLight = function(selector) {
+  return light().querySelector(selector);
+};
diff --git a/vaadin-grid/test/grid-binding-data.html b/vaadin-grid/test/grid-binding-data.html
new file mode 100644 (file)
index 0000000..2d82b26
--- /dev/null
@@ -0,0 +1,185 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('binding data', function() {
+
+    afterEach(function() {
+      return grid.then(function() {
+
+        grid.selection.mode = 'single';
+        grid.columns = [{name: 'Name', headerHtml: 'Name'}, {name: 'Value', headerHtml: 'Value'}];
+        grid.data.source = [['Grid', '10000'], ['VaadinX', '1000']];
+
+        return grid;
+      });
+    });
+
+    it('data: object type', function(done) {
+      grid.columns[0].name = "firstname";
+      grid.columns[1].name = "lastname";
+      grid.columns.push({
+        name: 'salary',
+        headerHtml: "Salary"
+      });
+
+      var mydata = [{
+        firstname: "John",
+        lastname: "Doe",
+        salary: 1234.56
+      }, {
+        firstname: "Jane",
+        lastname: "Doe",
+        salary: 2345.67
+      }, ];
+
+      grid.data.source = function(request) {
+        request.success(mydata.slice(request.index, request.index +
+        request.count), mydata.length);
+      };
+
+
+      waitUntil(function() {
+        return gridContainsText(grid, "2345.67");
+      }, function() {
+        var cells = qaLocal(".v-grid-body .v-grid-cell");
+        assert.equal(cells[0].innerHTML, "John");
+        assert.equal(cells[2].innerHTML, "1234.56");
+        assert.equal(cells[3].innerHTML, "Jane");
+        assert.equal(cells[4].innerHTML, "Doe");
+        done();
+      }, done);
+
+    });
+
+    it('data: array type', function(done) {
+      grid.columns.push({
+        headerHtml: "Salary"
+      });
+
+      mydata = [
+        ["John", "Doe", 1234.56],
+        ["Jane", "Doe", 2345.67],
+      ];
+
+      grid.data.source = mydata;
+
+      waitUntil(function() {
+        return gridContainsText(grid, "2345.67");
+      }, function() {
+        var cells = qaLocal(".v-grid-body .v-grid-cell");
+        assert.equal(cells[0].innerHTML, "John");
+        assert.equal(cells[2].innerHTML, "1234.56");
+        assert.equal(cells[3].innerHTML, "Jane");
+        assert.equal(cells[4].innerHTML, "Doe");
+        done();
+      }, done);
+
+    });
+
+    it('data: boolean type', function(done) {
+      grid.columns.splice(0, 1);
+      grid.selection.mode = "multi";
+
+      waitUntil(function() {
+        return qLocal("input[type='checkbox']");
+      }, function() {
+        var mydata = [
+          false,
+          true,
+        ];
+
+        grid.data.source = function(request) {
+          request.success(mydata.slice(request.index, request.index +
+          request.count), mydata.length);
+        };
+
+        waitUntil(function() {
+          return gridContainsText(grid, "false");
+        }, function() {
+          var cells = qaLocal(".v-grid-body .v-grid-cell");
+          assert.equal(cells[3].innerHTML, "true");
+          done();
+        }, done);
+      }, done);
+
+    });
+
+    it('data: string type', function(done) {
+      grid.columns.splice(0, 1);
+      grid.selection.mode = "multi";
+
+      waitUntil(function() {
+        return qLocal("input[type='checkbox']");
+      }, function() {
+        var mydata = [
+          "Lorem",
+          "Ipsum",
+        ];
+
+        grid.data.source = function(request) {
+          request.success(mydata.slice(request.index, request.index +
+          request.count), mydata.length);
+        };
+
+        waitUntil(function() {
+          return gridContainsText(grid, "Lorem");
+        }, function() {
+          var cells = qaLocal(".v-grid-body .v-grid-cell");
+          assert.equal(cells[3].innerHTML, "Ipsum");
+          done();
+        }, done);
+      }, done);
+
+    });
+
+    it('data: non-object types', function(done) {
+      var first = grid.columns[0];
+      grid.columns.splice(0, 1);
+      grid.columns.push(first);
+      grid.columns.splice(1, 1);
+      grid._grid.setRows(5);
+
+
+      var mydata = [
+        1, 2, null, undefined, 1, "cellsready"
+      ];
+
+      grid.data.source = function(request) {
+        request.success(mydata.slice(request.index, request.index +
+        request.count), mydata.length);
+      };
+
+      waitUntil(function() {
+        return gridContainsText(grid, "cellsready");
+      }, function() {
+        var cells = qaLocal(".v-grid-body .v-grid-cell");
+        assert.equal(cells[0].innerHTML, "1");
+        assert.equal(cells[1].innerHTML, "2");
+        assert.equal(cells[2].innerHTML, "");
+        assert.equal(cells[3].innerHTML, "");
+        assert.equal(cells[4].innerHTML, "1");
+        done();
+      }, done);
+
+    });
+  });
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-editing-columns.html b/vaadin-grid/test/grid-editing-columns.html
new file mode 100644 (file)
index 0000000..105aa3e
--- /dev/null
@@ -0,0 +1,412 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('editing columns', function() {
+
+    function getFirstCell() {
+      return qLocal('.v-grid-body .v-grid-cell');
+    }
+
+    beforeEach(function() {
+      return grid.then(function() {
+
+        grid.selection.mode = 'single';
+        grid.frozenColumns = 0;
+        grid.columns = [{name: 'Name', headerContent: 'Name'}, {name: 'Value', headerContent: 'Value'}];
+        grid.data.source = [['Grid', '10000'], ['VaadinX', '1000']];
+
+        return grid;
+      });
+    });
+
+    it('add new column', function() {
+      grid.addColumn({
+        name: "foo",
+        headerContent: "<b>Foo</b>",
+        sortable: true,
+        minWidth: 100,
+        maxWidth: 200,
+        width: 150,
+        flex: 1,
+      });
+
+      var c = grid.columns[grid.columns.length - 1];
+      assert.equal(c.name, "foo");
+      assert.equal(c.headerContent, "<b>Foo</b>");
+      assert.equal(c.sortable, true);
+      assert.notOk(c.editable);
+      assert.equal(c.minWidth, 100);
+      assert.equal(c.maxWidth, 200);
+      assert.equal(c.width, 150);
+      assert.equal(c.flex, 1);
+    });
+
+    it('add new column before', function(done) {
+
+      expect(grid.addColumn.bind(grid, {
+        name: "foo"
+      }, -1)).to.throw("Column not found.");
+
+      expect(grid.addColumn.bind(grid, {
+        name: "foo"
+      }, 100)).to.throw("Column not found.");
+
+      grid.addColumn({
+        name: "foo",
+        headerContent: "foo"
+      }, 0);
+      grid.addColumn({
+        name: "bar",
+        headerContent: "testHtml"
+      }, "foo");
+
+      waitUntil(function() {
+        return gridContainsText(grid, "testHtml");
+      }, function() {
+        var headers = qaLocal(".v-grid-header .v-grid-row th");
+        assert.equal(headers[0].innerHTML, "testHtml");
+        assert.equal(headers[1].innerHTML, "foo");
+
+        expect(grid.addColumn.bind(grid, {
+          name: "baz"
+        }, "foobar")).to.throw("Column not found.");
+        done();
+      }, done);
+
+    });
+
+    it('edit new column', function(done) {
+      var c = {
+        name: "foo",
+        headerContent: "testHtml"
+      };
+      grid.addColumn(c);
+
+      waitUntil(function() {
+        return gridContainsText(grid, "testHtml");
+      }, function() {
+
+        var headers = qaLocal(".v-grid-header .v-grid-row th");
+        assert.equal(headers[grid.columns.length - 1].innerHTML, "testHtml");
+
+        c.headerContent = "testHtml2";
+
+        waitUntil(function() {
+          return gridContainsText(grid, "testHtml2");
+        }, function() {
+          assert.equal(headers[grid.columns.length - 1].innerHTML, "testHtml2");
+          done();
+        }, done);
+
+      }, done);
+
+    });
+
+    it('edit existing column', function(done) {
+      grid.columns[0].headerContent = "testHtml";
+      waitUntil(function() {
+        return gridContainsText(grid, "testHtml");
+      }, function() {
+        var headers = qaLocal(".v-grid-header .v-grid-row th");
+        assert.equal(headers[0].innerHTML, "testHtml");
+        done();
+      });
+    });
+
+    it('generated value', function(done) {
+      grid.addColumn({
+        valueGenerator: function(dataItem) {
+          return "foo " + dataItem[0];
+        }
+      });
+
+      waitUntil(function() {
+        return gridContainsText(grid, "foo Grid");
+      }, done, done);
+    });
+
+    it('setting valueGenerator shouldnt fire select', function() {
+      var selectListener = sinon.spy();
+      grid.addEventListener('select', selectListener);
+
+      grid.selection.mode = "multi";
+      grid.columns[0].valueGenerator = function() { return 1; };
+      expect(selectListener.notCalled).to.be.true;
+    });
+
+    it('should not update the generated value', function(done) {
+      grid.columns[0].valueGenerator = function(dataItem) {
+        return Math.random();
+      };
+
+      grid.then(function() {
+        var generatedValue = getFirstCell().innerText;
+        grid.selection.select(0);
+        expect(generatedValue).to.eql(getFirstCell().innerText);
+        done();
+      });
+
+    });
+
+    it('renderer property', function(done) {
+      grid.columns[0].renderer = function(cell) {
+        cell.element.innerHTML = "<b>" + cell.data + "</b>";
+      };
+
+      waitUntil(function() {
+        return gridContainsText(grid, "<b>Grid</b>");
+      }, done, done);
+    });
+
+    it('renderer: cell values on change', function(done) {
+      var mydata = [
+        ["John", "TestFoo"],
+        ["Jane", "TestBar"],
+      ];
+
+      grid.data.source = mydata;
+
+      grid.columns[1].renderer = function(cell) {
+        cell.element.innerHTML = cell.data;
+        cell.element.cell = cell;
+      };
+
+      waitUntil(function() {
+        return gridContainsText(grid, "TestFoo");
+      }, function() {
+        var cell = grid.querySelectorAll(".v-grid-body .v-grid-cell")[3].cell;
+        assert.equal(cell.row.index, 1);
+        assert.equal(cell.index, 1);
+
+        mydata.splice(0, 1);
+        mydata[0].splice(0, 1);
+        grid.data.clearCache();
+
+        grid.columns.splice(0, 1);
+        waitUntil(function() {
+          return !gridContainsText(grid, "TestFoo");
+        }, function() {
+          assert.equal(cell.row.index, 0);
+          assert.equal(cell.index, 0);
+          done();
+        }, done);
+      }, done);
+
+    });
+
+    it('initial property values', function() {
+      assert.equal(grid.columns[0].headerContent, "Name");
+    });
+
+    describe('modifying columns array directly', function() {
+      it('should replace header content', function() {
+        expect(grid.querySelector('th').textContent).to.equal('Name');
+
+        grid.columns[0].headerContent = 'Foo';
+
+        return grid.then(function() {
+          expect(grid.querySelector('th').textContent).to.equal('Foo');
+        });
+      });
+
+      // fails because of replacing columns doesn't render row contents,
+      // see https://trello.com/c/8e27Tv3q/58-v-grid-bugs
+      it.skip('should render row contents', function() {
+        expect(grid.querySelectorAll('td').textContent).to.equal('Grid');
+
+        grid.columns = [{headerContent: 'Foo'}];
+
+        return grid.then(function() {
+          expect(grid.querySelectorAll('td').textContent).to.equal('Grid');
+        });
+      });
+    });
+
+    it('modify columns array', function(done) {
+      var col = grid.columns[0];
+      grid.columns.splice(1, 1);
+
+      waitUntil(function() {
+        return !gridContainsText(grid, "Progress");
+      }, function() {
+        grid.columns.push({
+          headerContent: "testHtml"
+        });
+        waitUntil(function() {
+          return gridContainsText(grid, "testHtml");
+        }, done, done);
+      }, done);
+    });
+
+    it('remove column', function(done) {
+      grid.addColumn({
+        name: "test",
+        headerContent: "test"
+      });
+      grid.removeColumn(0);
+
+      waitUntil(function() {
+        return !gridContainsText(grid, "Name") && gridContainsText(grid, "test");
+      }, function() {
+        grid.removeColumn("test");
+        waitUntil(function() {
+          return !gridContainsText(grid, "test");
+        }, done, done);
+      }, done);
+    });
+
+    it('add new column to an empty grid', function(done) {
+      grid.columns = [];
+
+      grid.columns.push({
+        name: "foo",
+        headerContent: "fooheader"
+      });
+
+      grid.then(function() {
+        expect(gridContainsText(grid, 'fooheader')).to.be.true;
+        done();
+      });
+    });
+
+    it('frozen column', function(done) {
+      grid.frozenColumns = 1;
+
+      waitUntil(function() {
+        return gridContainsText(grid, "v-grid-cell frozen");
+      }, function() {
+        var headers = qaLocal(".v-grid-header .v-grid-row th");
+        assert.isTrue(headers[0].classList.contains("frozen"));
+        done();
+      }, done);
+
+    });
+
+    it('frozen column declarative', function() {
+      grid.setAttribute("frozen-columns", "1");
+
+      return grid.then(function() {
+        expect(function(){grid.selection.mode = "multi";}).not.to.throw();
+      });
+    });
+
+    it('frozen column: unfreeze selection column', function() {
+      grid.selection.mode = "multi";
+      assert.ok(qLocal(".frozen"));
+
+      grid.frozenColumns = -1;
+      assert.notOk(qLocal(".frozen"));
+    });
+
+    it('should add a column to an empty grid with an index', function() {
+      grid.columns = [];
+      return grid.then(function() {
+        grid.addColumn({headerContent: "foo"}, 0);
+        return grid;
+      }).then(function() {
+        expect(qaLocal(".v-grid-header .v-grid-cell")).to.have.length(1);
+        return grid;
+      });
+    });
+
+    it('should reference header cell after adding a new column', function() {
+      grid.addColumn({name: "foo"});
+      grid.header.getCell(0, "foo").content = "foo";
+      expect(grid.columns[2].headerContent).to.eql("foo");
+    });
+
+    it('should support nested column names', function() {
+      grid.addColumn({
+        name: "foo.bar.baz",
+      });
+      grid.data.source = [{
+        foo: {
+          bar: {
+            baz: "testing"
+          }
+        }
+      }];
+      return grid.then(function() {
+        expect(gridContainsText(grid, "testing")).to.be.true;
+      });
+    });
+
+    it('should not return values from name path', function() {
+      grid.addColumn({
+        name: "foo.bar.baz",
+      });
+      grid.data.source = [{
+        foo: {
+          bar: "testing"
+        }
+      }];
+      return grid.then(function() {
+        expect(gridContainsText(grid, "testing")).to.be.false;
+      });
+    });
+
+    it('should allow undefined nested values', function() {
+      grid.addColumn({
+        name: "foo.bar.baz",
+      });
+      grid.data.source = [{
+        foo: {
+          bar: undefined
+        }
+      }];
+      return grid.then(function() {
+        expect(qaLocal(".v-grid-body .v-grid-cell")[2].innerHTML).to.be.empty;
+      });
+    });
+
+    it('should have the right default value if flex attribute exists', function() {
+      qLight("table col").setAttribute("flex", "");
+      return grid.then(function() {
+        expect(grid.columns[0].flex).to.eql(1);
+        expect(grid.columns[1].flex).to.eql(-1);
+      });
+    });
+
+    it('should size columns with width property', function() {
+      grid.columns[0].width = 100;
+      return grid.then(function(){
+        expect(qLocal(".v-grid-cell").offsetWidth).to.eql(100);
+      });
+    });
+
+    it('should size columns with minWidth property', function() {
+      grid.columns[0].width = 100;
+      grid.columns[0].minWidth = 150;
+      return grid.then(function(){
+        expect(qLocal(".v-grid-cell").offsetWidth).to.eql(150);
+      });
+    });
+
+    it('should size columns with maxWidth property', function() {
+      grid.columns[0].maxWidth = 100;
+      return grid.then(function(){
+        expect(qLocal(".v-grid-cell").offsetWidth).to.eql(100);
+      });
+    });
+
+  });
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-editor-handler.html b/vaadin-grid/test/grid-editor-handler.html
new file mode 100644 (file)
index 0000000..20c6e66
--- /dev/null
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('using editor handler', function() {
+    var editorHandler;
+
+    beforeEach(function() {
+      grid.columns = [{name: 'Name'}, {name: 'Value'}];
+      grid.editor.cancel();
+
+      editorHandler = {
+        getCellEditor: function(columnObject) {
+          var input = document.createElement("input");
+          return input;
+        },
+        bind: function(req) {
+          for (var i = 0; i < req.grid.columns.length; i++) {
+            var col = req.grid.columns[i];
+            if (!col.readOnly) {
+              var el = req.getCellEditor(col);
+              el.value = req.dataItem[i];
+            }
+          }
+          req.success();
+        },
+        save: function(req) {
+          var failingColumns = [];
+          for (var i = 0; i < req.grid.columns.length; i++) {
+            var col = req.grid.columns[i];
+            var el = req.getCellEditor(col);
+            if (el.value == "fail") {
+              failingColumns.push(col);
+            }
+          }
+          if (failingColumns.length > 0) {
+            req.failure("Save failed", failingColumns);
+          } else {
+            req.success();
+          }
+        }
+      };
+
+      grid.editor.handler = editorHandler;
+
+      return grid;
+    });
+
+    it('editor: enabled', function() {
+      grid.columns[0].name = "name";
+      grid.columns[1].name = "value";
+      grid.editor.handler = editorHandler;
+      expect(grid.editor.editRow.bind(grid.editor, 0)).to.throw("editor is not enabled");
+      grid.editor.enabled = true;
+      grid.editor.editRow(0);
+
+      assert.isTrue(gridContainsText(grid, "v-grid-editor"));
+    });
+
+    it('editor: saveButtonText and cancelButtonText', function() {
+      grid.columns[0].name = "name";
+      grid.columns[1].name = "value";
+      grid.editor.handler = editorHandler;
+      grid.editor.enabled = true;
+      grid.editor.editRow(0);
+      grid.editor.saveButtonText = "saveButtonTextFoo";
+      grid.editor.cancelButtonText = "cancelButtonTextFoo";
+
+      assert.isTrue(gridContainsText(grid, "saveButtonTextFoo"));
+      assert.isTrue(gridContainsText(grid, "cancelButtonTextFoo"));
+    });
+
+    it('editor: editrow', function() {
+      grid.columns[0].name = "name";
+      grid.columns[1].name = "value";
+      grid.editor.handler = editorHandler;
+      grid.editor.enabled = true;
+
+      grid.editor.editRow(0);
+      assert.equal(qLocal(".v-grid-editor input").value, "Grid");
+      grid.editor.cancel();
+      assert.isFalse(gridContainsText(grid, "v-grid-editor"));
+      grid.editor.editRow(1);
+      assert.equal(qLocal(".v-grid-editor input").value, "VaadinX");
+      grid.editor.save();
+      assert.isFalse(gridContainsText(grid, "v-grid-editor"));
+
+      expect(grid.editor.editRow.bind(grid.editor, 10)).to.throw("Row index");
+    });
+
+    it('editor: failure', function() {
+      grid.columns[0].name = "name";
+      grid.columns[1].name = "value";
+      grid.editor.handler = editorHandler;
+      grid.editor.enabled = true;
+
+      grid.editor.editRow(0);
+      var fields = qaLocal(".v-grid-editor input");
+      fields[0].value = "fail";
+      grid.editor.save();
+
+      assert.isTrue(gridContainsText(grid, "Save failed"));
+      var cells = qaLocal(".v-grid-editor-cells > div");
+      assert.isTrue(cells[0].classList.contains("error"));
+      assert.isFalse(cells[1].classList.contains("error"));
+
+    });
+
+    it('editor: return null cell editor', function() {
+      grid.columns[0].name = "name";
+      grid.columns[1].name = "value";
+      grid.editor.handler = {
+        getCellEditor: function(columnObject) {
+          return columnObject === grid.columns[0] ? null : undefined;
+        },
+        bind: function(req) {
+          req.success();
+        }
+      };
+      grid.editor.enabled = true;
+
+      grid.editor.editRow(0);
+      var cells = qaLocal(".v-grid-editor .v-grid-editor-cells > div");
+      assert.lengthOf(cells, 2);
+
+      var editors = qaLocal(".v-grid-editor .v-grid-editor-cells > div *");
+      assert.lengthOf(editors, 0);
+    });
+
+    it('editor: element instance after save', function() {
+      grid.editor.enabled = true;
+      grid.editor.handler = editorHandler;
+
+      var editor1, editor2;
+      editorHandler.save = function(req) {
+        if (!editor1) {
+          editor1 = req.getCellEditor(grid.columns[0]);
+          req.failure();
+        } else {
+          editor2 = req.getCellEditor(grid.columns[0]);
+          req.success();
+        }
+      };
+      grid.editor.editRow(0);
+
+      //Save fails
+      grid.editor.save();
+      //Save succeeds
+      grid.editor.save();
+
+      assert.equal(editor1, editor2);
+    });
+
+    // fails because of replacing columns doesn't render row contents,
+    // see https://trello.com/c/8e27Tv3q/58-v-grid-bugs
+    it.skip('editor: default editor', function() {
+      grid.editor.enabled = true;
+      grid.editor.editRow(0);
+
+      return grid.then(function() {
+        assert.equal("Grid", grid.querySelector('tbody tr td').textContent);
+        assert.equal("Grid", grid.querySelector('input').value);
+
+        grid.querySelector('input').value = "Foo";
+        grid.editor.save();
+      });
+
+    });
+
+    it('editor: getCellEditor and read-only columns', function() {
+      grid.columns[0].readOnly = true;
+
+      sinon.spy(editorHandler, "getCellEditor");
+
+      grid.editor.handler = editorHandler;
+      grid.editor.enabled = true;
+      grid.editor.editRow(0);
+
+      assert.isTrue(editorHandler.getCellEditor.calledOnce);
+
+      editorHandler.getCellEditor.restore();
+    });
+  });
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-properties.html b/vaadin-grid/test/grid-properties.html
new file mode 100644 (file)
index 0000000..46743a4
--- /dev/null
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('using properties', function() {
+
+    it('rowClassGenerator', function() {
+      var gridEquals = true;
+      var elementEquals = true;
+      assert.notOk(grid.rowClassGenerator);
+      var rowClassGenerator = function(row) {
+        gridEquals = gridEquals && row.grid == grid;
+        elementEquals = elementEquals && row.element == qaLocal(".v-grid-body .v-grid-row")[row.index];
+        return row.index + "_" + row.data[0];
+      };
+
+      grid.rowClassGenerator = rowClassGenerator;
+
+      assert.isTrue(elementEquals && gridEquals);
+      assert.isTrue(qLocal(".v-grid-body .v-grid-row").classList.contains("0_Grid"));
+      assert.equal(grid.rowClassGenerator, rowClassGenerator);
+    });
+
+    it('cellClassGenerator', function() {
+      var elementEquals = true;
+
+      grid.columns[0].name = "name";
+      grid.columns[1].name = "value";
+      assert.notOk(grid.cellClassGenerator);
+      var cellClassGenerator = function(cell) {
+        var columnIndex = cell.columnName == "name" ? 0 : 1;
+        var cellElement = qaLocal(".v-grid-body .v-grid-row")[cell.row.index].querySelectorAll(".v-grid-cell")[columnIndex];
+        elementEquals = elementEquals && cell.element == cellElement;
+        return cell.columnName;
+      };
+
+      grid.cellClassGenerator = cellClassGenerator;
+
+      assert.isTrue(elementEquals);
+      assert.isTrue(qLocal(".v-grid-body .v-grid-row .v-grid-cell").classList.contains("name"));
+      assert.equal(grid.cellClassGenerator, cellClassGenerator);
+    });
+
+    it('should be enabled by default', function() {
+      expect(grid.disabled).to.be.false;
+    });
+
+    it('should disable', function() {
+      grid.disabled = true;
+      expect(grid.disabled).to.be.true;
+    });
+
+    it('should reflect disabled to attribute', function() {
+      grid.disabled = true;
+      expect(grid.hasAttribute("disabled")).to.be.true;
+      grid.disabled = false;
+      expect(grid.hasAttribute("disabled")).to.be.false;
+    });
+
+    it('should apply disabled attribute', function() {
+      grid.setAttribute("disabled", true);
+      expect(grid.disabled).to.be.true;
+      grid.removeAttribute("disabled");
+      expect(grid.disabled).to.be.false;
+    });
+  });
+
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-redrawer.html b/vaadin-grid/test/grid-redrawer.html
new file mode 100644 (file)
index 0000000..81c5f49
--- /dev/null
@@ -0,0 +1,201 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('redrawer', function() {
+    function width(e) {
+      return pxval(e, 'width');
+    }
+
+    function height(e) {
+      return pxval(e, 'height');
+    }
+
+    function pxval(e, prop) {
+      return parseInt(e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(prop).replace('px', ''));
+    }
+
+    describe('redraw', function() {
+      function assertHeightByRows(rows) {
+        var headersHeight = headers * thHeight;
+        var footersHeight = footers * tfHeight;
+
+        h1 = headersHeight + footersHeight + rows * tdHeight;
+        // IE and FF add an aditional pixel to each row
+        h2 = h1 + rows + headers + footers;
+
+        expect([h1, h2]).to.include(height(inner));
+      }
+
+      function assertSameDimensions() {
+        expect(width(grid)).to.equal(width(inner));
+        expect(height(grid)).to.equal(height(inner));
+      }
+
+      var inner,
+          tbody,
+          headers,
+          footers,
+          tfHeight,
+          thHeight,
+          tdHeight
+
+      beforeEach(function() {
+        inner = qaLocal("div.v-grid")[1];
+        tbody = qLight('table tbody');
+
+        headers = qaLocal('thead tr').length;
+        footers = qaLocal('tfoot tr').length;
+
+        tfHeight = height(qLocal('tfoot tr td'));
+        thHeight = height(qLocal('thead tr th'));
+        tdHeight = height(qLocal('tbody tr td'));
+
+        grid.style.height = "";
+        grid.style.width = "";
+        grid.removeAttribute('rows');
+
+        // need to return thenable object for FF sake.
+        return grid;
+      });
+
+      // currently disabled because the grid.then call jams the test on IE.
+      it.skip('should draw correct dimensions and row heights by default', function() {
+        return grid.then(function() {
+          assertSameDimensions();
+          assertHeightByRows(2);
+        });
+      });
+
+      it('should redraw correctly after modifying body', function() {
+        tbody.innerHTML += tbody.innerHTML;
+
+        return grid.then(function() {
+          assertSameDimensions();
+          assertHeightByRows(4);
+        });
+      });
+
+      describe('using limited row visibility', function() {
+        before(function() {
+          // Increase the number of rows
+          tbody.innerHTML += tbody.innerHTML; //4
+          tbody.innerHTML += tbody.innerHTML; //8
+          tbody.innerHTML += tbody.innerHTML; //16
+
+          return grid;
+        });
+
+        it('should redraw only visible rows', function() {
+          return grid.then(function() {
+            assertSameDimensions();
+
+            // grid has a limit of 10 data rows by default
+            assertHeightByRows(10);
+          });
+        });
+
+        it('should redraw visible rows after limit is decreased', function() {
+          grid.rows = 3;
+
+          return grid.then(function() {
+            assertSameDimensions();
+
+            assertHeightByRows(3);
+          });
+        });
+
+        it('should redraw visible rows limit is removed', function() {
+          grid.rows = 0;
+
+          return grid.then(function() {
+            assertSameDimensions();
+
+            assertHeightByRows(10); // default
+          });
+        });
+      });
+
+      it('should redraw with fixed dimensions', function() {
+        grid.style.width = '300px';
+        grid.style.height = '100px';
+
+        return grid.then(function() {
+          return grid.then(function() {
+            assertSameDimensions();
+          });
+        });
+      });
+
+      describe('grid with a fixed height (issue #8)', function() {
+        it('should keep the correct height after sorting', function() {
+          grid.columns[0].sortable = true;
+          grid.style.height = "500px";
+
+          var firstNonFrozenHeaderCell = qLocal.bind(this, ".v-grid-header .v-grid-cell:not(.frozen)");
+          firstNonFrozenHeaderCell().click();
+
+          return grid.then(function() {
+            expect(qaLocal('.v-grid')[3].style.height).to.equal('100%');
+          });
+        });
+      });
+
+      describe('using scaled dimensions', function() {
+        beforeEach(function() {
+          grid.style.position = 'absolute';
+          grid.style.width = '100%';
+          grid.style.height = '100%';
+
+          return grid;
+        });
+
+        it('should redraw with scaled dimensions', function() {
+            assertSameDimensions();
+        });
+
+        it('should match dimensions with the surrounding div', function() {
+          expect(height(grid)).to.equal(document.body.clientHeight);
+
+          // For some reason in IE sometimes there is a slight difference of 1 pixels
+          expect(Math.abs(document.body.clientWidth - width(grid))).to.be.at.most(1);
+        })
+
+        it('should allow different dimensions for v-grid and inner div', function() {
+          // We can have different height for v-grid and the inner grid.
+          // Also we can define more than 10 rows.
+          tbody.innerHTML += tbody.innerHTML; //4
+          tbody.innerHTML += tbody.innerHTML; //8
+          tbody.innerHTML += tbody.innerHTML; //16
+
+          grid.rows = 12;
+          grid.style.width = '50%';
+
+          return grid.then(function() {
+            expect(height(grid)).to.not.equal(height(inner));
+            assert.equal(width(grid), width(inner));
+            assertHeightByRows(12);
+          });
+        });
+      });
+    });
+  });
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-rendering-light-dom.html b/vaadin-grid/test/grid-rendering-light-dom.html
new file mode 100644 (file)
index 0000000..0251cd7
--- /dev/null
@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('rendering light DOM', function() {
+    it('light dom table header gets rendered in the grid', function() {
+      var row = qLocal(".v-grid-header .v-grid-row");
+      var cells = row.childNodes;
+
+      assert.isTrue(cells[0].innerHTML == 'Name');
+      assert.isTrue(cells[1].innerHTML == 'Value');
+    });
+
+    it('light dom table body gets rendered in the grid', function() {
+      var row = qLocal(".v-grid-body .v-grid-row");
+      var cells = row.childNodes;
+
+      assert.isTrue(cells[0].innerHTML == 'Grid');
+      assert.isTrue(cells[1].innerHTML == '10000');
+    });
+
+    function removeGrid() {
+      if (grid) {
+        grid.style.visibility = "hidden";
+        document.body.appendChild(grid);
+        grid = null;
+      }
+    }
+
+    // makes grid.then in afterEach to never finish...
+    it.skip('DOM: headers & footers', function(done) {
+//      removeGrid();
+      wrapper.innerHTML = "<v-grid><table>" +
+      "<thead hidden><tr class='red'><td colspan='2'></td></tr><tr class='pink'><th></th><th></th></tr></thead>" +
+      "<tfoot><tr class='foot1'><td colspan='2'></td></tr><tr class='foot2'><td></td><td></td></tr></tfoot>" +
+      "</table></v-grid>";
+      grid = wrapper.querySelector("v-grid");
+
+      waitUntil(function() {
+        return qLocal(".v-grid-body");
+      }, function() {
+        assert.equal(0, qaLocal("thead tr").length);
+        assert.equal(1, qaLocal("tfoot tr.foot1").length);
+        assert.equal(1, qaLocal("tfoot tr.foot2").length);
+        assert.equal(1, qaLocal("tfoot td[colspan='2']").length);
+
+        qLight("thead").setAttribute('hidden', false)
+        waitUntil(function() {
+          return qaLocal("thead tr").length > 0;
+        }, function() {
+          assert.equal(1, qaLocal("thead tr.red").length);
+          assert.equal(1, qaLocal("thead tr.pink").length);
+          assert.equal(1, qaLocal("thead th[colspan='2']").length);
+          done();
+        }, done);
+
+      }, done);
+    });
+
+    it('DOM: mutation', function(done) {
+      waitUntil(function() {
+        return qLocal(".v-grid-body");
+      }, function() {
+        var nrows = qaLocal("tbody tr").length;
+        var nheads = qaLocal("thead tr").length;
+        qLight("thead").innerHTML += qLight("table thead").innerHTML;
+        qLight("tbody").innerHTML += qLight("table tbody").innerHTML;
+        assert.equal("Name", qLocal("th").textContent);
+        qLight("th").textContent = "foo";
+        waitUntil(function() {
+          return qLocal("tbody tr") && qaLocal("tbody tr").length == nrows * 2;
+        }, function() {
+          assert.equal(qaLocal("tbody tr").length, nrows * 2);
+          assert.equal(qaLocal("thead tr").length, nheads * 2);
+          assert.equal("foo", qLocal("th").textContent);
+          done();
+        }, done);
+      }, done);
+    });
+
+    it('should have a sort-order', function(done) {
+      var ths = light().querySelectorAll("th");
+      ths[0].setAttribute("sort-direction", "asc");
+      ths[1].setAttribute("sort-direction", "desc");
+
+      grid.then(function(){
+        var sortOrder = grid.sortOrder;
+        expect(grid.sortOrder[0]).to.eql({column: 0, direction: "asc"});
+        expect(grid.sortOrder[1]).to.eql({column: 1, direction: "desc"});
+      }).then(done);
+    });
+
+    it('should apply header-text from a th element', function(done) {
+      light().querySelector("th").setAttribute("header-text", "foo");
+
+      grid.then(function(){
+        expect(grid.columns[0].headerHtml).to.eql("foo");
+      }).then(done);
+    });
+
+    it('should apply header-text from a col element', function(done) {
+      var col = document.createElement("col");
+      col.setAttribute("header-text", "foo");
+      light().querySelector("table").prependChild(col);
+
+      grid.then(function(){
+        expect(grid.columns[0].headerHtml).to.eql("foo");
+      }).then(done);
+    });
+
+  });
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-scrolling-rows.html b/vaadin-grid/test/grid-scrolling-rows.html
new file mode 100644 (file)
index 0000000..a0ff781
--- /dev/null
@@ -0,0 +1,114 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+<div id="gridwrapper"></div>
+
+<script>
+  describe.feature('scrolling rows', function() {
+
+    var infiniteDataSource = function(req) {
+      var data = [];
+      for (var i = req.index; i < req.index + req.count; i++) {
+        data.push(["foo " + i, "bar " + i]);
+      }
+      req.success(data, this.size);
+    };
+
+    function firstColumnContents() {
+      var cells = qaLocal('td');
+
+      return _.chain(cells)
+          .filter(function(n) {
+            return _.indexOf(cells, n) % 2 == 0;
+          })
+          .map(function(n) {
+            return n.textContent;
+          })
+          .reduce(function(result, n) {
+            return result + ', ' + n;
+        }).value();
+    }
+
+    before(function() {
+      infiniteDataSource.size = 100;
+      grid.data.source = infiniteDataSource;
+      grid.rows = 5;
+
+      return grid;
+    });
+
+    beforeEach(function() {
+      //reset position to an arbitrary row.
+      return grid.scrollToRow(24).then(function () {
+        // calling scrollToRow - scrollToRow - then seems to quite often
+        // run the callback in 'then' before the latter scrolling has finished.
+        // This is most likely caused by multiple timers being fired inside the Grid,
+        // and there's some gap between them - which makes grid.isWorkPending() to return
+        // 'false' too soon.
+        // Adding one 'then' in between the scrolling calls
+        // doesn't seem to remedy the situation. So let's add more.
+        return grid;
+      });
+    });
+
+    it('should throw an error when scrolling to an invalid row', function() {
+      expect(grid.scrollToRow.bind(grid, -1)).to.throw("Row index");
+      expect(grid.scrollToRow.bind(grid, 100)).to.throw("Row index");
+    });
+
+    it('should scroll using scrollToRow', function() {
+      return grid.scrollToRow(50)
+          .then(function() {
+            expect(firstColumnContents()).to.contain('foo 50');
+          });
+    });
+
+    describe('scrolling with destination', function() {
+      it('should scroll to start', function() {
+        return grid.scrollToRow(50, 'start')
+            .then(function() {
+              expect(firstColumnContents()).to.contain('foo 50');
+              expect(firstColumnContents()).to.contain('foo 54');
+            });
+      });
+
+      it('should scroll to end', function() {
+        return grid.scrollToRow(50, 'end')
+            .then(function() {
+              expect(firstColumnContents()).to.contain('foo 46');
+              expect(firstColumnContents()).to.contain('foo 50');
+            });
+      });
+    });
+
+    it('should scroll to end', function() {
+      return grid.scrollToEnd()
+          .then(function() {
+            expect(firstColumnContents()).to.contain('foo 99');
+          });
+    });
+
+    it('should scroll to start', function() {
+      return grid.scrollToStart()
+          .then(function() {
+          expect(firstColumnContents()).to.contain('foo 0');
+        });
+    });
+  });
+</script>
+
+</body>
+</html>
diff --git a/vaadin-grid/test/grid-selecting-rows.html b/vaadin-grid/test/grid-selecting-rows.html
new file mode 100644 (file)
index 0000000..0ac2eee
--- /dev/null
@@ -0,0 +1,645 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+  <div id="gridwrapper"></div>
+
+  <script>
+    describe.feature('selecting rows', function() {
+      var selectListener;
+
+      before(function() {
+        selectListener = sinon.spy();
+        grid.addEventListener('select', selectListener);
+      });
+
+      function getSelectionModeAttr() {
+        return grid.getAttribute('selection-mode');
+      };
+
+      function setSelectionModeAttr(mode) {
+        grid.setAttribute('selection-mode', mode);
+
+        return grid;
+      };
+
+      afterEach(function() {
+        selectListener.reset();
+
+        return grid.then(function() {
+          // force selection clear
+          grid.selection.mode = 'disabled';
+          grid.selection.mode = 'single';
+
+          return grid;
+        });
+      });
+
+      describe('using attributes', function() {
+        describe('selection-mode', function() {
+          it('should set selectionMode to disabled', function() {
+            return setSelectionModeAttr('disabled').then(function() {
+              expect(grid.selection.mode).to.equal('disabled');
+            });
+          });
+
+          it('should set selectionMode to single', function() {
+            return setSelectionModeAttr('single').then(function() {
+              expect(grid.selection.mode).to.equal('single');
+            });
+          });
+
+          it('should set selectionMode to multi', function() {
+            return setSelectionModeAttr('multi').then(function() {
+              expect(grid.selection.mode).to.equal('multi');
+            });
+          });
+
+          it('should should remove selectionMode property', function() {
+            setSelectionModeAttr('disabled');
+            grid.removeAttribute('selection-mode');
+
+            return grid.then(function() {
+              // 'single' is the default
+              expect(grid.selection.mode).to.equal('single');
+            });
+          });
+
+          // TODO: throws an error, but for some reason expect doesn't catch it.
+          it.skip('should fail setting the value to foobar', function() {
+            expect(function() {
+              setSelectionModeAttr('foobar');
+            }).to.throw(Object);
+          });
+        });
+      });
+
+      describe('using properties', function() {
+        describe('selection.mode', function() {
+          var checkBoxQuery = "input[type='checkbox']";
+
+          it('should be single by default', function() {
+            expect(grid.selection.mode).to.equal('single');
+          });
+
+          it('should be use default value when removing the value', function() {
+            grid.selection.mode = 'disabled';
+
+            grid.selection.mode = undefined;
+
+            expect(grid.selection.mode).to.equal('single');
+          });
+
+          it('should set selection-mode to disabled', function() {
+            grid.selection.mode = 'disabled';
+
+            return grid.then(function() {
+              expect(getSelectionModeAttr()).to.equal('disabled');
+              expect(qLocal(checkBoxQuery)).to.be.undefined;
+            });
+          });
+
+          it('should set selection-mode to single', function() {
+            grid.selection.mode = 'single';
+
+            return grid.then(function() {
+              expect(getSelectionModeAttr()).to.equal('single');
+              expect(qLocal(checkBoxQuery)).to.be.undefined;
+            });
+          });
+
+          it('should set selection-mode to multi', function() {
+            grid.selection.mode = 'multi';
+
+            return grid.then(function() {
+              expect(getSelectionModeAttr()).to.equal('multi');
+              expect(qLocal(checkBoxQuery)).to.not.be.undefined;
+            });
+          });
+
+          it('should fail setting the value to foobar', function() {
+            expect(function() {
+              grid.selection.mode = 'foobar';
+            }).to.throw(Object);
+          });
+        });
+
+        describe('selected', function() {
+          describe('with mode: single', function() {
+            beforeEach(function() {
+              grid.selection.mode = 'single';
+            });
+
+            it('should clear the selection when changing mode to disabled', function() {
+              grid.selection.select(0);
+
+              grid.selection.mode = 'disabled';
+
+              expect(grid.selection.selected()).to.be.empty;
+            });
+
+            it('should clear selection when changing mode to multi', function() {
+              grid.selection.select(0);
+
+              grid.selection.mode = 'multi';
+
+              expect(grid.selection.selected()).to.be.empty;
+            });
+          });
+
+          describe('with selectionMode: multi', function() {
+            beforeEach(function() {
+              grid.selection.mode = 'multi';
+            });
+
+            it('should fire a \'select\' event', function() {
+              grid.selection.select(0);
+
+              expect(selectListener.calledOnce).to.be.true;
+            });
+
+            it('should clear the selection when changing mode to disabled', function() {
+              grid.selection.select(0);
+
+              grid.selection.mode = 'disabled';
+
+              expect(grid.selection.selected()).to.be.empty;
+            });
+
+            it('should clear selection when changing mode to single', function() {
+              grid.selection.select(0);
+
+              grid.selection.mode = 'single';
+
+              expect(grid.selection.selected()).to.be.empty;
+            });
+
+            it('should remove multiple selections when changing mode to single', function() {
+              grid.selection.select(0);
+              grid.selection.select(1);
+
+              grid.selection.mode = 'single';
+
+              expect(grid.selection.selected()).to.be.empty;
+            });
+          });
+
+          describe('with selectionMode: disabled', function() {
+            beforeEach(function() {
+              grid.selection.mode = 'disabled';
+            });
+
+            it('should not select any rows', function() {
+              grid.selection.select(0);
+
+              expect(grid.selection.selected()).to.be.empty;
+            });
+          });
+        });
+      });
+
+      describe('by clicking', function() {
+        function getFirstCell() {
+          return qLocal('.v-grid-body .v-grid-cell');
+        }
+
+        function clickFirstCell() {
+          getFirstCell().click();
+
+          return grid;
+        }
+
+        before(function() {
+          // extra 'wait' added for IE11.
+          return grid;
+        });
+
+        it('should fire a \'select\' event', function()  {
+          return clickFirstCell().then(function() {
+            expect(selectListener.calledOnce).to.be.true;
+            expect(selectListener.args[0][0]).to.have.property('type', 'select');
+          });
+        });
+
+        describe('with selection-mode: single', function() {
+          beforeEach(function() {
+            return setSelectionModeAttr('single');
+          });
+
+          it('should select a row', function() {
+            return clickFirstCell().then(function() {
+              expect(grid.selection.selected()).to.eql([0]);
+            });
+          });
+        });
+
+        describe('with selection-mode: multi', function() {
+          beforeEach(function() {
+            return setSelectionModeAttr('multi');
+          });
+
+          it('should only focus a clicked cell', function() {
+            return clickFirstCell().then(function() {
+              expect(grid.selection.selected()).to.be.empty;
+              expect(getFirstCell().getAttribute('class')).to.contain('focus');
+            });
+          });
+
+          // TODO: apparently clicking checkboxes isn't going to happen using JS...
+          it.skip('should select multiple rows', function() {
+            var inputs = qaLocal('input');
+            inputs[0].checked = true;
+            inputs[1].click();
+
+            expect(getSelectedRowsAttr()).to.equal('0,1');
+          });
+        });
+
+        describe('with selection-mode: disabled', function() {
+          beforeEach(function() {
+            return setSelectionModeAttr('disabled');
+          });
+
+          it('should not select a row', function() {
+            return clickFirstCell().then(function() {
+              expect(grid.selection.selected()).to.be.empty;
+            });
+          });
+        });
+      });
+
+      describe('by using API', function() {
+        it('should fire a \'select\' event', function() {
+          grid.selection.select(0);
+
+          expect(selectListener.calledOnce).to.be.true;
+        });
+
+        it('should not select invalid row', function() {
+          grid.selection.select('foo');
+
+          expect(grid.selection.selected()).to.be.empty;
+        });
+
+        it('should add \'row-selected\' class to the selected row', function() {
+          return grid.selection.select(1).then(function() {
+            expect(qaLocal('.v-grid-body .v-grid-row-selected')).to.have.length(1);
+          });
+        });
+
+        describe('with selectionMode: single', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'single';
+          });
+
+          it('should select a row', function() {
+            grid.selection.select(1);
+
+            expect(grid.selection.selected()).to.eql([1]);
+          });
+
+          it('should select another row', function() {
+            grid.selection.select(1);
+            grid.selection.select(0);
+
+            expect(grid.selection.selected()).to.eql([0]);
+          });
+        });
+
+        describe('with selectionMode: multi', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'multi';
+          })
+
+          it('should select multiple rows', function() {
+            grid.selection.select(0);
+            grid.selection.select(1);
+
+            expect(grid.selection.selected()).to.eql([0,1]);
+          });
+        });
+
+        describe('with selectionMode: disabled', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'disabled';
+          });
+
+          it('should not select a row', function() {
+            grid.selection.select(0);
+
+            expect(grid.selection.selected()).to.be.empty;
+          });
+        });
+      });
+
+      describe('deselecting rows using API', function() {
+        it('should fire \'select\' event', function() {
+          grid.selection.select(0);
+
+          grid.selection.deselect(0);
+
+          expect(selectListener.calledTwice).to.be.true;
+        });
+
+        describe('with selectionMode: single', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'single';
+          });
+
+          it('should deselect a row', function() {
+            grid.selection.select(0);
+
+            grid.selection.deselect(0);
+
+            expect(grid.selectedRows).to.be.empty;
+          });
+
+          it('should not deselect other rows', function() {
+            grid.selection.select(0);
+
+            grid.selection.deselect(1);
+
+            expect(grid.selection.selected()).to.eql([0]);
+          });
+        });
+
+        describe('with selectionMode: multi', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'multi';
+          });
+
+          it('should deselect a single row', function() {
+            grid.selection.select(0);
+            grid.selection.select(1);
+
+            grid.selection.deselect(0);
+
+            expect(grid.selection.selected()).to.eql([1]);
+          });
+        });
+      });
+
+      describe('selected indexes', function() {
+
+        describe('in mode: single', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'single';
+            grid.selection.select(0);
+          });
+
+          it('should have a right size', function() {
+            expect(grid.selection.size).to.eql(1);
+          });
+
+          it('should have right deselections', function() {
+            expect(grid.selection.deselected()).to.be.empty;
+          });
+
+          it('should have right selections', function() {
+            expect(grid.selection.selected()).to.eql([0]);
+          });
+
+          it('should iterate right selections', function() {
+            var spy = sinon.spy();
+            grid.selection.selected(spy);
+            expect(spy.calledOnce).to.be.true;
+          });
+
+          it('should return right mapped value', function() {
+            var mapper = function(index){
+              return "foo " + index;
+            };
+            expect(grid.selection.selected(mapper)).to.eql(["foo 0"]);
+          });
+
+          it('should return nothing with iterator', function() {
+            var iterator = function(i){
+              // Itearate
+            };
+            expect(grid.selection.selected(iterator)).to.be.empty;
+          });
+
+          it('clear should work right', function() {
+            grid.selection.clear();
+            expect(grid.selection.selected()).to.be.empty;
+          });
+
+          it('selectAll should work right', function() {
+            grid.selection.selectAll();
+            expect(grid.selection.selected()).to.be.empty;
+          });
+        });
+
+        describe('in mode: multi', function() {
+          beforeEach(function() {
+            grid.data.source =  function(req) {
+              var data = [];
+              for (var i = req.index; i < req.index + req.count; i++) {
+                data.push(["foo " + i, "bar " + i]);
+              }
+              req.success(data, 100);
+            };
+            grid.selection.mode = 'multi';
+            grid.selection.select(0);
+            grid.selection.select(1);
+            grid.selection.select(80);
+            grid.selection.select(81);
+          });
+
+          it('should have a right size', function() {
+            expect(grid.selection.size).to.eql(4);
+          });
+
+          it('should have right deselections', function() {
+            expect(grid.selection.deselected()).to.be.empty;
+          });
+
+          it('should have right selections', function() {
+            expect(grid.selection.selected()).to.eql([0,1,80,81]);
+          });
+
+          it('should iterate right selections', function() {
+            var spy = sinon.spy();
+            grid.selection.selected(spy);
+            expect(spy.callCount).to.eql(4);
+          });
+
+          it('should return right mapped value', function() {
+            var mapper = function(index){
+              return "foo " + index;
+            };
+            expect(grid.selection.selected(mapper)).to.eql(["foo 0", "foo 1", "foo 80", "foo 81"]);
+          });
+
+          it('should return nothing with iterator', function() {
+            var iterator = function(i){
+              // Itearate
+            };
+            expect(grid.selection.selected(iterator)).to.be.empty;
+          });
+
+          it('should return tail', function() {
+            expect(grid.selection.selected(undefined, 3)).to.eql([81]);
+          });
+
+          it('should return head', function() {
+            expect(grid.selection.selected(undefined, undefined, 1)).to.eql([0, 1]);
+          });
+
+          it('should return range', function() {
+            expect(grid.selection.selected(undefined, 1, 2)).to.eql([1, 80]);
+          });
+
+          it('clear should work right', function() {
+            grid.selection.clear();
+            expect(grid.selection.selected()).to.be.empty;
+          });
+
+          it('selectAll should work right', function() {
+            grid.selection.selectAll();
+            expect(grid.selection.mode).to.eql("all");
+          });
+
+        });
+
+        describe('in mode: all', function() {
+          beforeEach(function() {
+            grid.data.source =  function(req) {
+              var data = [];
+              for (var i = req.index; i < req.index + req.count; i++) {
+                data.push(["foo " + i, "bar " + i]);
+              }
+              req.success(data, 100);
+            };
+            grid.selection.mode = 'all';
+            grid.selection.deselect(0);
+            grid.selection.deselect(1);
+            grid.selection.deselect(80);
+            grid.selection.deselect(81);
+          });
+
+          it('should have a right size', function() {
+            expect(grid.selection.size).to.eql(96);
+          });
+
+          it('should have right deselections', function() {
+            expect(grid.selection.deselected()).to.eql([0,1,80,81]);
+          });
+
+          it('should have right selections', function() {
+            expect(grid.selection.selected()).to.have.length(96);
+          });
+
+          it('should iterate right selections', function() {
+            var spy = sinon.spy();
+            grid.selection.selected(spy);
+            expect(spy.callCount).to.eql(96);
+          });
+
+          it('should return right mapped value', function() {
+            var mapper = function(index){
+              return "foo " + index;
+            };
+            expect(grid.selection.selected(mapper)).to.contain("foo 2");
+            expect(grid.selection.deselected(mapper)).to.eql(["foo 0", "foo 1", "foo 80", "foo 81"]);
+          });
+
+          it('should return nothing with iterator', function() {
+            var iterator = function(i){
+              // Itearate
+            };
+            expect(grid.selection.selected(iterator)).to.be.empty;
+            expect(grid.selection.deselected(iterator)).to.be.empty;
+          });
+
+          it('should return tail', function() {
+            expect(grid.selection.selected(undefined, 50)).to.have.length(46);
+            expect(grid.selection.deselected(undefined, 3)).to.eql([81]);
+          });
+
+          it('should return head', function() {
+            expect(grid.selection.selected(undefined, undefined, 30)).to.have.length(31);
+            expect(grid.selection.deselected(undefined, undefined, 1)).to.eql([0, 1]);
+          });
+
+          it('should not contain deselected values', function() {
+            expect(grid.selection.selected()).not.to.contain(0);
+            expect(grid.selection.selected()).not.to.contain(80);
+          });
+
+          it('should return range', function() {
+            expect(grid.selection.selected(undefined, 1, 2)).to.eql([3, 4]);
+            expect(grid.selection.deselected(undefined, 1, 2)).to.eql([1, 80]);
+          });
+
+          it('clear should work right', function() {
+            grid.selection.clear();
+            expect(grid.selection.mode).to.eql("multi");
+          });
+
+          it('selectAll should work right', function() {
+            grid.selection.selectAll();
+            expect(grid.selection.deselected()).to.be.empty;
+          });
+
+        });
+
+        describe('in mode: disabled', function() {
+          beforeEach(function() {
+            grid.selection.mode = 'disabled';
+            grid.selection.select(0);
+          });
+
+          it('should have a right size', function() {
+            expect(grid.selection.size).to.eql(0);
+          });
+
+          it('should have right deselections', function() {
+            expect(grid.selection.deselected()).to.eql([]);
+          });
+
+          it('should have right selections', function() {
+            expect(grid.selection.selected()).to.eql([]);
+          });
+
+          it('should iterate right selections', function() {
+            var spy = sinon.spy();
+            grid.selection.selected(spy);
+            expect(spy.callCount).to.eql(0);
+          });
+
+          it('should return right mapped value', function() {
+            var mapper = function(index){
+              return "foo " + index;
+            };
+            expect(grid.selection.selected(mapper)).to.eql([]);
+            expect(grid.selection.deselected(mapper)).to.eql([]);
+          });
+
+          it('selectAll should work right', function() {
+            grid.selection.selectAll();
+            expect(grid.selection.selected()).to.eql([]);
+          });
+
+        });
+
+      });
+
+
+    });
+  </script>
+</body>
+
+</html>
diff --git a/vaadin-grid/test/grid-sorting-rows.html b/vaadin-grid/test/grid-sorting-rows.html
new file mode 100644 (file)
index 0000000..59acbbf
--- /dev/null
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+
+<body>
+
+  <div id="gridwrapper"></div>
+
+  <script>
+    describe.feature('sorting rows', function() {
+
+      describe('using api', function() {
+
+        function assignInvalidSortOrder() {
+          grid.data.sortOrder = [{
+            column: 0,
+            direction: "ascending" // Should be asc or desc
+          }];
+        }
+
+        beforeEach(function() {
+          grid.columns[0].sortable = true;
+          grid.columns[1].sortable = true;
+        });
+
+        it('should set sortOrder property', function() {
+          grid.data.sortOrder = [{
+            column: 0,
+            direction: "desc"
+          }];
+
+          expect(qLocal(".v-grid-header th").classList.contains("sort-desc")).to.be.true;
+        });
+
+        it('should clear sort order', function() {
+          grid.data.sortOrder = [{
+            column: 0,
+            direction: "desc"
+          }];
+          grid.data.sortOrder = [];
+          expect(grid.data.sortOrder).to.be.empty;
+        });
+
+        it('should preserve existing sort order on invalid value', function() {
+          grid.data.sortOrder = [{
+            column: 0,
+            direction: "desc"
+          }];
+          expect(assignInvalidSortOrder).to.throw("Invalid sort direction");
+          expect(qLocal(".v-grid-header th").classList.contains("sort-desc")).to.be.true;
+        });
+
+        it('should be able to sort with multiple columns', function() {
+          grid.data.sortOrder = [{
+            column: 0,
+            direction: "desc"
+          }, {
+            column: 1
+          }];
+          assert.lengthOf(grid.data.sortOrder, 2);
+          expect(qaLocal(".v-grid-header th")[0].classList.contains("sort-desc")).to.be.true;
+          expect(qaLocal(".v-grid-header th")[1].classList.contains("sort-asc")).to.be.true;
+        });
+
+        it('should reset selection', function() {
+          grid.selectedRows = [0];
+
+          grid.data.sortOrder = [{
+            column: 0,
+            direction: "desc"
+          }];
+
+          expect(grid.selection.selected()).to.be.empty;
+        });
+
+        it('should ignore selection column from index', function() {
+          var firstNonFrozenHeaderCell = qLocal.bind(this, ".v-grid-header .v-grid-cell:not(.frozen)");
+
+          firstNonFrozenHeaderCell().click();
+          expect(grid.data.sortOrder[0].column).to.eql(0);
+
+          grid.selection.mode = "multi";
+          firstNonFrozenHeaderCell().click();
+          expect(grid.data.sortOrder[0].column).to.eql(0);
+        });
+
+
+      });
+    });
+  </script>
diff --git a/vaadin-grid/test/grid-static-sections.html b/vaadin-grid/test/grid-static-sections.html
new file mode 100644 (file)
index 0000000..757e8d2
--- /dev/null
@@ -0,0 +1,222 @@
+<!DOCTYPE html>
+<html>
+<head lang="en">
+  <meta charset="UTF-8">
+  <title></title>
+  <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+
+  <script src="common.js"></script>
+
+  <link rel="import" href="../vaadin-grid.html">
+</head>
+<body>
+  <div id="gridwrapper"></div>
+
+  <script>
+    describe.feature('static sections', function() {
+      function removeHeaders() {
+        for(var i = grid.header.rowCount;i>0;i--) {
+          grid.header.removeRow();
+        }
+      }
+
+      function removeFooters() {
+        for(var i = grid.footer.rowCount;i>0;i--) {
+          grid.footer.removeRow();
+        }
+      }
+
+      beforeEach(function() {
+        removeHeaders();
+        removeFooters();
+
+        grid.header.addRow(0, ['Name', 'Value']);
+        grid.footer.addRow(0, ['Name', 'Value']);
+
+        grid.header.hidden = false;
+        grid.footer.hidden = false;
+
+        return grid;
+      });
+
+      describe('header.defaultRow', function() {
+        it('should be 0 by default', function() {
+          expect(grid.header.defaultRow).to.equal(0);
+        });
+
+        it('should fail when set to a nonexisting row', function() {
+          expect(function() {
+            grid.header.defaultRow = 1;
+          }).to.throw('Row with index 1 does not exist');
+        });
+
+        it('should set the defaultRow', function() {
+          grid.header.addRow();
+
+          // sorting indicator moves to the default row, so we'll
+          // use that to assert that default row has changed.
+          grid.columns[0].sortable = true;
+          grid.data.sortOrder = [{column: 0, direction: 'asc'}];
+
+          grid.header.defaultRow = 1;
+
+          var cells = qaLocal('.v-grid-header .v-grid-cell');
+          expect(cells[2].classList.toString()).to.contain('sort-asc');
+        });
+
+        it('should have content in sync with column.headerContent', function() {
+          var column = grid.columns[0];
+          var headerCell = grid.header.getCell(grid.header.defaultRow, 0);
+
+          column.headerContent = "foo";
+          expect(headerCell.content).to.eql("foo");
+
+          headerCell.content = "bar";
+          expect(column.headerContent).to.eql("bar");
+        });
+
+      });
+
+    ['header', 'footer'].forEach(function(section) {
+        describe(section, function() {
+          it('should be readonly', function() {
+            var originalValue = grid[section];
+
+            grid[section] = undefined;
+
+            expect(grid[section]).to.equal(originalValue);
+          });
+
+          describe('getCell', function() {
+            it('should return correct cell using indeces', function() {
+              var cell = grid[section].getCell(0,0);
+
+              expect(cell.content).to.equal('Name');
+            });
+
+            it('should return correct cell using identifier', function() {
+              grid.columns[0].name = 'foo';
+
+              var cell = grid[section].getCell(0, 'foo');
+
+              expect(cell.content).to.equal('Name');
+            });
+
+            it('should return correct cell from appended row', function() {
+              grid[section].addRow(1, [section + 'foo']);
+
+              var cell = grid[section].getCell(1, 0);
+
+              expect(cell.content).to.equal(section + 'foo');
+            });
+          });
+
+          describe('cell', function() {
+            describe('content', function() {
+              it('should set content', function() {
+                var cell = grid[section].getCell(0,0);
+                cell.content = 'foo';
+
+                expect(grid[section].getCell(0,0).content).to.equal('foo');
+              });
+
+              it('should set html content', function() {
+                var cell = grid[section].getCell(0, 0);
+
+                var input = document.createElement('input');
+                cell.content = input;
+
+                expect(qLocal('.v-grid-' + section + ' .v-grid-cell > input')).to.not.be.undefined;
+              });
+            });
+
+            describe('hidden', function() {
+              it('should clear innerHTML', function() {
+                grid[section].hidden = true;
+
+                expect(qLocal('.v-grid-' + section).innerHTML).to.be.empty;
+              });
+            });
+
+            describe('colspan', function() {
+              it('should hide spanned cells', function() {
+                var cell = grid[section].getCell(0, 0);
+
+                cell.colspan = 2;
+
+                return grid.then(function() {
+                  expect(qaLocal(".v-grid-" + section + " .v-grid-cell")[1].style.display).to.equal('none');
+                });
+              });
+            });
+          });
+
+          describe('addRow', function() {
+            it('should append new row', function() {
+              grid[section].addRow();
+
+              grid[section].getCell(1,0).content = 'foo';
+              grid[section].getCell(1,1).content = 'bar';
+
+              var cells = qaLocal('.v-grid-' + section + ' .v-grid-cell');
+              expect(cells[0].innerHTML).to.equal('Name');
+              expect(cells[1].innerHTML).to.equal('Value');
+              expect(cells[2].innerHTML).to.equal('foo');
+              expect(cells[3].innerHTML).to.equal('bar');
+            });
+
+            it('should insert new row to correct index', function() {
+              grid[section].addRow(0);
+
+              grid[section].getCell(0,0).content = 'foo';
+              grid[section].getCell(0,1).content = 'bar';
+
+              var cells = qaLocal('.v-grid-' + section + ' .v-grid-cell');
+              expect(cells[0].innerHTML).to.equal('foo');
+              expect(cells[1].innerHTML).to.equal('bar');
+              expect(cells[2].innerHTML).to.equal('Name');
+              expect(cells[3].innerHTML).to.equal('Value');
+            });
+
+            it('should insert content to a new row', function() {
+              grid[section].addRow(0, ['foo', 'bar']);
+
+              var cells = qaLocal(".v-grid-" + section + " .v-grid-cell");
+              expect(cells[0].innerHTML).to.equal('foo');
+              expect(cells[1].innerHTML).to.equal('bar');
+            });
+          });
+
+          describe('removeRow', function() {
+            it('should remove first row', function() {
+              grid[section].removeRow();
+
+              expect(qaLocal('.v-grid-' + section + ' .v-grid-cell')).to.be.empty;
+            });
+
+            it('should remove a specific row', function() {
+              grid[section].addRow(0, ['foo', 'bar']);
+
+              grid[section].removeRow(1);
+
+              expect(qaLocal('.v-grid-' + section + ' .v-grid-cell')).to.have.length(2);
+            });
+          });
+
+          describe('setRowClassName', function() {
+            it('should set the classname of a specific row', function() {
+              grid[section].addRow();
+
+              grid[section].setRowClassName(1, 'second');
+
+              var rows = qaLocal(".v-grid-" + section + " .v-grid-row");
+              expect(rows[1].classList.toString()).to.contain('second');
+            });
+          });
+        });
+      });
+    });
+  </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/vaadin-grid/test/index.html b/vaadin-grid/test/index.html
new file mode 100644 (file)
index 0000000..e9bd2fc
--- /dev/null
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <script src="../../webcomponentsjs/webcomponents.min.js"></script>
+  <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+<script>
+WCT.loadSuites([
+  'grid-binding-data.html',
+  'grid-editing-columns.html',
+  'grid-editor-handler.html',
+  'grid-properties.html',
+  'grid-redrawer.html',
+//  'grid-rendering-light-dom.html',
+  'grid-scrolling-rows.html',
+  'grid-selecting-rows.html',
+  'grid-static-sections.html',
+  'grid-sorting-rows.html'
+]);
+</script>
+</body>
+</html>
diff --git a/vaadin-grid/tick.svg b/vaadin-grid/tick.svg
new file mode 100644 (file)
index 0000000..c659bc0
--- /dev/null
@@ -0,0 +1,3 @@
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+<path d="M2.30128328,8.66325539 L5.96894952,12.2453987 C6.3607616,12.6280744 6.98750215,12.6243779 7.37477302,12.237107 L13.9047732,5.70710678 C14.2952975,5.31658249 14.2952975,4.68341751 13.9047732,4.29289322 C13.5142489,3.90236893 12.881084,3.90236893 12.4905597,4.29289322 L5.96055946,10.8228934 L7.36638296,10.8146018 L3.69871672,7.2324585 C3.30361307,6.84656791 2.67049214,6.85403657 2.28460155,7.24914022 C1.89871096,7.64424388 1.90617962,8.2773648 2.30128328,8.66325539 L2.30128328,8.66325539 Z" fill="#ffffff"></path>
+</svg>
diff --git a/vaadin-grid/vaadin-grid-doc.html b/vaadin-grid/vaadin-grid-doc.html
new file mode 100644 (file)
index 0000000..838bcd7
--- /dev/null
@@ -0,0 +1,631 @@
+<!-- Documentation of v-grid -->
+<link rel='import' href='vaadin-grid.html'>
+
+<!--
+Represents a column definition of the grid.
+-->
+<dom-module id="Column"></dom-module>
+<script>
+  Polymer({
+    is: 'Column',
+    properties: {
+      /**
+       * Must be a valid JS variable name so that the same name can be used in 
+       * the data source object fields.
+       */
+      name:  String,
+      /**
+       * Sets the content of this column in the default header row object
+       */
+      headerContent:  String,
+      /**
+       * Indicates whether the data in this column can be sorted by the end user
+       *
+       * @property sortable
+       * @type boolean
+       * @default false
+       */
+      sortable: false,
+      /**
+       * Indicates whether the data in this column can be edited using the row editor
+       *
+       * @property readOnly
+       * @type boolean
+       * @default false
+       */
+      readOnly: false,
+      /**
+       * Pixel values are supported only.
+       *
+       * @property minWidth
+       * @type number
+       * @default 10
+       */
+      minWidth: Number,
+      /**
+       * Pixel values are supported only.
+       */
+      maxWidth: Number,
+      /**
+       * Pixel values are supported only.
+       */
+      width: Number,
+      /**
+       * Defines the flex ratio of this column (expand ratio in Vaadin-speak). Expects an integer.
+       *
+       * @property flex
+       * @type number
+       * @default -1
+       */
+      flex: Number,
+      /**
+       * It is a function which should return the value of the column cell 
+       * (passed on to the renderer function if defined).
+       *  
+       *  Example:
+       *  ```
+       *  column.valueGenerator = function(row) {
+       *      return "> " + row.name;
+       *  };
+       *  ```
+       *
+       * Params:
+       *  - {Row} row – Reference to the Row object
+       *
+       * @property valueGenerator
+       * @type {function}
+       */
+      valueGenerator: Object,
+      /**
+       * It is a function which defines the custom renderer for this columns data items.
+       *
+       *  Example:
+       *  ```
+       *  column.renderer = function(cell) {
+       *      cell.element.innerHTML = '$' + cell.data;
+       *  };
+       *  ```
+       *
+       * Params:
+       *  - {Cell} cell – Reference to the Cell object
+       *
+       * @property renderer
+       * @type {function}
+       */
+      renderer: Object
+    }
+  });
+</script>
+
+<!--
+The object used to manipulate data in the grid.
+-->
+<dom-module id="Data"></dom-module>
+<script>
+  Polymer({
+    is: 'Data',
+    properties: {
+      /**
+       * The data source object for the grid.
+       * 
+       * If an array is used, it is wrapped with a function internally. 
+       * Reading the property value will still return the array.       *
+       *
+       *  Example:
+       *  ```
+       *  data.source = [
+       *      ["horse", 150, "domestic"],
+       *      ["wolf", 100, "wild"]
+       *  };
+       *  ```
+       * or
+       *  ```
+       *  var myArray = [...];
+       *  data.source = function(req) {
+       *      var from = req.index;
+       *      var to = req.index + req.count;
+       *      var array = myArray.slice(from, to);
+       *
+       *      req.success(array, data.length);
+       *  };
+       *  ```
+       *
+       * Params:
+       *  - {DataRequest} req – Reference to the DataRequest object
+       *
+       * @property source
+       * @type {Array|function}
+       */
+      source: Object,
+      /**
+       * The sort order.
+       * 
+       * @property source
+       * @type {Array<SortOrder>}
+       */
+      sortOrder: Array
+    }
+  });
+</script>
+
+<!--
+This is the object used when the grid request more data from datasources.
+-->
+<dom-module id="DataRequest"></dom-module>
+<script>
+  Polymer({
+    is: 'DataRequest',
+    properties: {
+      /**
+       * First data item index to fetch
+       */
+      index:  Number,
+
+      /**
+       * Number of data items to fetch
+       */
+      count:  Number
+    },
+    /**
+     * Callback function to pass along the data items to the grid and the total size of the data source.
+     *
+     *  Example:
+     *  ```
+     *  var myArray = [...];
+     *
+     *  var from = req.index;
+     *  var to = req.index + req.count;
+     *  var array = myArray.slice(from, to);
+     *
+     *  req.success(array, data.length);
+     *  ```
+     *
+     * @method success
+     * @param {Array<*>} items The subset of the data items
+     * @param {number} totalSize – The total quantity of the data items
+     */
+    success: function(items, totalSize) {},
+    /**
+     * Callback function to inform the grid that something failed when getting the data.
+     *
+     *  Example:
+     *  ```
+     *  req.failure();
+     *  ```
+     *
+     * @method failure
+     */
+    failure: function() {}
+  });
+</script>
+
+<!--
+Configuration object for the embedded editor.
+-->
+<dom-module id="Editor"></dom-module>
+<script>
+  Polymer({
+    is: 'Editor',
+    properties: {
+      /**
+       * Whether grid is editable or not
+       *
+       * @property enabled
+       * @type boolean
+       */
+      enabled: Boolean,
+      /**
+       * The save button caption
+       *
+       * @property saveButtonText
+       * @type String
+       * @default "Save"
+       */
+      saveButtonText: String,
+      /**
+       * The cancel button caption
+       *
+       * @property saveButtonText
+       * @type String
+       * @default "Cancel"
+       */
+      cancelButtonText: String,
+      /**
+       * The editor handler object the user should specify if the save and cancel 
+       * actions should be handled somehow (e.g. send the saved data back to the 
+       * server or just update a local array)
+       *
+       * @property handler
+       * @type {EditorHandler}
+       */
+      handler: Object
+    },
+    /**
+     * Activates the row editor for the given row index.
+     *
+     *  Example:
+     *  ```
+     *  editor.editRow(4);
+     *  ```
+     *
+     * Params:
+     *  - {number} rowIndex – The row index which should be edited
+     *
+     * @property editRow
+     * @type {function}
+     */
+    editRow: Object,
+    /**
+     * Invokes the editor.handler.save function, if a handler is defined
+     *
+     * @property save
+     * @type {function}
+     */
+    save: Object,
+    /**
+     * Invokes the editor.handler.cancel function, if a handler is defined
+     *
+     * @property cancel
+     * @type {function}
+     */
+    cancel: Object
+  });
+</script>
+
+<!--
+The Object with all methods necessary for handling editor actions.
+-->
+<dom-module id="EditorHandler"></dom-module>
+<script>
+  Polymer({
+    is: 'EditorHandler',
+    properties: {
+      /**
+       * Handles the setting of data into the custom editor elements.
+       * The default implementation expects that the editor element
+       * (returned by getCellEditor) has a ‘value’ property which it sets.
+       *
+       * Params:
+       *  - {EditorRequest} req – The editor handler request
+       *
+       * @property bind
+       * @type {function}
+       */
+      bind: Object,
+      /**
+       *
+       * Params:
+       *  - {EditorRequest} req – The editor handler request
+       *
+       * @property cancel
+       * @type {function}
+       */
+      cancel: Object,
+      /**
+       *
+       * Params:
+       *  - {EditorRequest} req – The editor handler request
+       *
+       * @property save
+       * @type {function}
+       */
+      save: Object,
+      /**
+       * Returns HTML elements which are used for the editors in the row editor. 
+       * This function is only called for the columns which have the editable 
+       * property set to true. The default implementation returns &lt;input> elements 
+       * for all editable columns.
+       *
+       * Params:
+       *  - {Column} column – The column object for which to provide an editor
+       *
+       * @property getCellEditor
+       * @type {function}
+       */
+      getCellEditor: Object
+    }
+  });
+</script>
+
+<!--
+The object passed to the EditorHandler when a edition action is performed.
+-->
+<dom-module id="EditorRequest"></dom-module>
+<script>
+  Polymer({
+    is: 'EditorRequest',
+    properties: {
+      /**
+       * The row index
+       */
+      rowIndex:  Number,
+      /**
+       * The item from the data source array which is edited
+       * 
+       * @property dataItem
+       * @type {*}
+       */
+      dataItem: Object,
+      /**
+       * Reference to the &lt;table is=v-grid> element
+       *
+       * @property grid
+       * @type {HTMLElement}
+       */
+      grid:  Object
+    },
+    /**
+     * The user should call this method to indicate that the request was handled successfully.
+     *
+     * @method success
+     * @param {number} rowIndex The index of the row modified rowObject: 
+     * the modified row as it could be used in the datasource.dataUpdated
+     */
+    success: function(rowIndex) {},
+    /**
+     * The user should call this method to indicate that the request was not handled successfully, 
+     * and pass the error message and any erroneous columns as parameters.
+     *
+     * @method failure
+     * @param {String} errorMsg The error message which should be shown in the row editor footer
+     * @param {Array<Column>} errorColumns The editors which have errors
+     */
+    failure: function(errorMsg, errorColumns) {},
+    /**
+     * This function should return the editor element for the referenced column 
+     * (same element which was created by the editor.handler.getCellEditor).
+     *
+     * @method getCellEditor
+     * @param {Column} column The column object for which to provide an editor
+     */
+    getCellEditor: function(column) {}
+  });
+</script>
+
+<!--
+Object for manipulating footer rows.
+-->
+<dom-module id="Footer"></dom-module>
+<script>
+  Polymer({
+    is: 'Footer',
+    properties: {
+      /**
+       * The number of columns which this cell should span/group
+       *
+       * @property colspan
+       * @type number
+       */
+      colspan: Number,
+      /**
+       * If set to true, visually hides all footers in the Grid
+       *
+       * @property hidden
+       * @type boolean
+       */
+      hidden: Boolean
+    },
+    /**
+     * Adds a new footer row.
+     *
+     * @method addRow
+     * @param {number} index The position where to insert the new footer row. If undefined, it is insert as the last row.
+     */
+    addRow: function(index) {},
+    /**
+     * Removes a specific footer row.
+     *
+     * @method removeRow
+     * @param {number} index The row index to remove.
+     */
+    removeRow: function(index) {},
+    /**
+     * Returns an object reference to a particular footer cell.
+     *
+     * @method getCell
+     * @param {number} rowIndex The row index.
+     * @param {number|string} column The column.
+     * @return {StaticCell} An object reference to a particular footer cell
+     */
+    getCell: function(rowIndex, column) {}
+  });
+</script>
+
+<!--
+Object for manipulating header rows
+-->
+<dom-module id="Header"></dom-module>
+<script>
+  Polymer({
+    is: 'Header',
+    properties: {
+      /**
+       * The number of columns which this cell should span/group
+       *
+       * @property colspan
+       * @type number
+       */
+      colspan: Number,
+      /**
+       * If set to true, visually hides all headers in the Grid
+       *
+       * @property hidden
+       * @type boolean
+       */
+      hidden: Boolean,
+      /**
+       * Sets the index of the default header row in the headers array
+       *
+       * @property defaultRow
+       * @type number
+       */
+      defaultRow: Number
+    },
+    /**
+     * Adds a new header row.
+     *
+     * @method addRow
+     * @param {number} index The position where to insert the new header row. If undefined, it is insert as the last row.
+     */
+    addRow: function(index) {},
+    /**
+     * Removes a specific header row.
+     *
+     * @method removeRow
+     * @param {number} index The row index to remove.
+     */
+    removeRow: function(index) {},
+    /**
+     * Returns an object reference to a particular header cell.
+     *
+     * @method getCell
+     * @param {number} rowIndex The row index.
+     * @param {number|string} column The column.
+     * @return {StaticCell} An object reference to a particular header cell
+     */
+    getCell: function(rowIndex, column) {}
+  });
+</script>
+
+<!--
+Represents a grid header/footer row configuration.
+-->
+<dom-module id="StaticCell"></dom-module>
+<script>
+  Polymer({
+    is: 'Row',
+    properties: {
+      /**
+       * The row index
+       */
+      index:  Number,
+      /**
+       * The row data object from the data source
+       *
+       * @property data
+       * @type {*}
+       */
+      data:  Object,
+      /**
+       * Reference to the &lt;table is=v-grid> element
+       *
+       * @property grid
+       * @type {HTMLElement}
+       */
+      grid:  Object,
+      /**
+       * Reference to the TR element
+       *
+       * @property element
+       * @type {HTMLElement}
+       */
+      element:  Object
+    }
+  });
+</script>
+
+<!--
+The Object used for configuring the selection model of the grid.
+-->
+<dom-module id="Selection"></dom-module>
+<script>
+  Polymer({
+    is: 'Selection',
+    properties: {
+      /**
+       * The mode
+       *
+       * @property mode
+       * @type {"single"|"multi"|"all"|"disabled"}
+       */
+      mode: String,
+      /**
+       * The size
+       */
+      size: Number
+    },
+    /**
+     * Selects certain row
+     *
+     * @method select
+     * @param {number} index – The row index
+     */
+    select: function(index) {},
+    /**
+     * Deselects certain row
+     *
+     * @method deselect
+     * @param {number} index – The row index
+     */
+    deselect: function(index) {},
+    /**
+     * Clears selection
+     *
+     * @method clear
+     */
+    clear: function() {},
+    /**
+     * Selects all rows
+     *
+     * @method selectAll
+     */
+    selectAll: function() {},
+    /**
+     * Gets selected row indexes
+     *
+     * @method selected
+     * @return {Array<Number>} The selected row indexes
+     */
+    selected: function() {},
+    /**
+     * Gets deselected row indexes
+     *
+     * @method deselected
+     * @return {Array<Number>} The deselected row indexes
+     */
+    deselected: function() {}
+  });
+</script>
+
+<!--
+Represents the sort configuration of a column.
+-->
+<dom-module id="SortOrder"></dom-module>
+<script>
+  Polymer({
+    is: 'SortOrder',
+    properties: {
+      /**
+       * The sort direction
+       * 
+       * @property direction
+       * @type {"asc"|"desc"}
+       */
+      direction:  String,
+      /**
+       * The index of column
+       */
+      column:  Number
+    }
+  });
+</script>
+
+<!--
+Represents a grid header/footer cell configuration.
+-->
+<dom-module id="StaticCell"></dom-module>
+<script>
+  Polymer({
+    is: 'StaticCell',
+    properties: {
+      /**
+       * The class name
+       */
+      className:  String,
+      /**
+       * The number of columns which this cell should span/group
+       */
+      colspan:  Number
+    }
+  });
+</script>
diff --git a/vaadin-grid/vaadin-grid-import.html b/vaadin-grid/vaadin-grid-import.html
new file mode 100644 (file)
index 0000000..a308ae3
--- /dev/null
@@ -0,0 +1,627 @@
+<!DOCTYPE  html>
+<html>
+<head>
+<script>
+$wnd = window; $doc = document;
+function VaadinGrid(){var N='bootstrap',O='begin',P='gwt.codesvr.VaadinGrid=',Q='gwt.codesvr=',R='VaadinGrid',S='startup',T='DUMMY',U=0,V=1,W='iframe',X='javascript:""',Y='position:absolute; width:0; height:0; border:none; left: -1000px;',Z=' top: -1000px;',$='CSS1Compat',_='<!doctype html>',ab='',bb='<html><head><\/head><body><\/body><\/html>',cb='_',db='$1',eb='script',fb='javascript',gb='meta',hb='name',ib='VaadinGrid::',jb='::',kb='gwt:property',lb='content',mb='=',nb='gwt:onPropertyErrorFn',ob='Bad handler "',pb='" for "gwt:onPropertyErrorFn"',qb='gwt:onLoadErrorFn',rb='" for "gwt:onLoadErrorFn"',sb='#',tb='?',ub='/',vb='img',wb='clear.cache.gif',xb='baseUrl',yb='VaadinGrid.nocache.js',zb='base',Ab='//',Bb='modernie',Cb='MSIE',Db='Trident',Eb='yes',Fb='none',Gb='observeCapability',Hb='observe',Ib='native',Jb='js',Kb='selectorCapability',Lb='function',Mb='user.agent',Nb='webkit',Ob='safari',Pb='msie',Qb=10,Rb=11,Sb='ie10',Tb=9,Ub='ie9',Vb=8,Wb='ie8',Xb='gecko',Yb='gecko1_8',Zb=2,$b=3,_b=4,ac='selectingPermutation',bc='VaadinGrid.devmode.js',cc='85E3EBF93A36DE4CC0D848F399F3DF49',dc=':1',ec=':10',fc=':11',gc=':2',hc=':3',ic=':4',jc=':5',kc=':6',lc=':7',mc=':8',nc=':9',oc=':',pc='.cache.js',qc='loadExternalRefs',rc='end',sc='http:',tc='file:',uc='_gwt_dummy_',vc='__gwtDevModeHook:VaadinGrid',wc='Ignoring non-whitelisted Dev Mode URL: ',xc=':moduleBase',yc='head';var n=window;var o=document;q(N,O);function p(){var a=n.location.search;return a.indexOf(P)!=-1||a.indexOf(Q)!=-1}
+function q(a,b){if(n.__gwtStatsEvent){n.__gwtStatsEvent({moduleName:R,sessionId:n.__gwtStatsSessionId,subSystem:S,evtGroup:a,millis:(new Date).getTime(),type:b})}}
+VaadinGrid.__sendStats=q;VaadinGrid.__moduleName=R;VaadinGrid.__errFn=null;VaadinGrid.__moduleBase=T;VaadinGrid.__softPermutationId=U;VaadinGrid.__computePropValue=null;VaadinGrid.__getPropMap=null;VaadinGrid.__installRunAsyncCode=function(){};VaadinGrid.__gwtStartLoadingFragment=function(){return null};VaadinGrid.__gwt_isKnownPropertyValue=function(){return false};VaadinGrid.__gwt_getMetaProperty=function(){return null};var r=null;var s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[R]={moduleName:R};VaadinGrid.__moduleStartupDone=function(e){var f=s[R].bindings;s[R].bindings=function(){var a=f?f():{};var b=e[VaadinGrid.__softPermutationId];for(var c=U;c<b.length;c++){var d=b[c];a[d[U]]=d[V]}return a}};var t;function u(){v();return t}
+function v(){if(t){return}var a=o.createElement(W);a.src=X;a.id=R;a.style.cssText=Y+Z;a.tabIndex=-1;o.body.appendChild(a);t=a.contentDocument;if(!t){t=a.contentWindow.document}t.open();var b=document.compatMode==$?_:ab;t.write(b+bb);t.close()}
+function w(a){this[cb+a.replace(/.*([\dA-F]{32}).cache.js/,db)](window,document)}
+VaadinGrid.__startLoadingFragment=function(a){return C(a)};VaadinGrid.__installRunAsyncCode=function(a){var b=u();var c=b.body;var d=b.createElement(eb);d.language=fb;d.text=a;c.appendChild(d);c.removeChild(d)};function A(){var c={};var d;var e;var f=o.getElementsByTagName(gb);for(var g=U,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(hb),k;if(j){j=j.replace(ib,ab);if(j.indexOf(jb)>=U){continue}if(j==kb){k=i.getAttribute(lb);if(k){var l,m=k.indexOf(mb);if(m>=U){j=k.substring(U,m);l=k.substring(m+V)}else{j=k;l=ab}c[j]=l}}else if(j==nb){k=i.getAttribute(lb);if(k){try{d=eval(k)}catch(a){alert(ob+k+pb)}}}else if(j==qb){k=i.getAttribute(lb);if(k){try{e=eval(k)}catch(a){alert(ob+k+rb)}}}}}__gwt_getMetaProperty=function(a){var b=c[a];return b==null?null:b};r=d;VaadinGrid.__errFn=e}
+function B(){function e(a){var b=a.lastIndexOf(sb);if(b==-1){b=a.length}var c=a.indexOf(tb);if(c==-1){c=a.length}var d=a.lastIndexOf(ub,Math.min(c,b));return d>=U?a.substring(U,d+V):ab}
+function f(a){if(a.match(/^\w+:\/\//)){}else{var b=o.createElement(vb);b.src=a+wb;a=e(b.src)}return a}
+function g(){var a=__gwt_getMetaProperty(xb);if(a!=null){return a}return ab}
+function h(){var a=o.getElementsByTagName(eb);for(var b=U;b<a.length;++b){if(a[b].src.indexOf(yb)!=-1){return e(a[b].src)}}return ab}
+function i(){var a=o.getElementsByTagName(zb);if(a.length>U){return a[a.length-V].href}return ab}
+function j(){var a=o.location;return a.href==a.protocol+Ab+a.host+a.pathname+a.search+a.hash}
+var k=g();if(k==ab){k=h()}if(k==ab){k=i()}if(k==ab&&j()){k=e(o.location.href)}k=f(k);return k}
+function C(a){if(a.match(/^\//)){return a}if(a.match(/^[a-zA-Z]+:\/\//)){return a}return VaadinGrid.__moduleBase+a}
+function D(){var f=[];var g=U;function h(a,b){var c=f;for(var d=U,e=a.length-V;d<e;++d){c=c[a[d]]||(c[a[d]]=[])}c[a[e]]=b}
+var i=[];var j=[];function k(a){var b=j[a](),c=i[a];if(b in c){return b}var d=[];for(var e in c){d[c[e]]=e}if(r){r(a,d,b)}throw null}
+j[Bb]=function(){{var a=n.navigator.userAgent;if(a.indexOf(Cb)==-1&&a.indexOf(Db)!=-1){return Eb}return Fb}};i[Bb]={none:U,yes:V};j[Gb]=function(){return Hb in Object?Ib:Jb};i[Gb]={js:U,'native':V};j[Kb]=function(){return !/_force_no_native/.test(document.location.search)&&typeof document.querySelectorAll==Lb?Ib:Jb};i[Kb]={js:U,'native':V};j[Mb]=function(){var a=navigator.userAgent.toLowerCase();var b=o.documentMode;if(function(){return a.indexOf(Nb)!=-1}())return Ob;if(function(){return a.indexOf(Pb)!=-1&&(b>=Qb&&b<Rb)}())return Sb;if(function(){return a.indexOf(Pb)!=-1&&(b>=Tb&&b<Rb)}())return Ub;if(function(){return a.indexOf(Pb)!=-1&&(b>=Vb&&b<Rb)}())return Wb;if(function(){return a.indexOf(Xb)!=-1||b>=Rb}())return Yb;return ab};i[Mb]={gecko1_8:U,ie10:V,ie8:Zb,ie9:$b,safari:_b};__gwt_isKnownPropertyValue=function(a,b){return b in i[a]};VaadinGrid.__getPropMap=function(){var a={};for(var b in i){if(i.hasOwnProperty(b)){a[b]=k(b)}}return a};VaadinGrid.__computePropValue=k;n.__gwt_activeModules[R].bindings=VaadinGrid.__getPropMap;q(N,ac);if(p()){return C(bc)}var l;try{h([Fb,Jb,Jb,Yb],cc);h([Fb,Jb,Ib,Yb],cc+dc);h([Fb,Jb,Ib,Ob],cc+ec);h([Fb,Ib,Ib,Ob],cc+fc);h([Fb,Ib,Jb,Yb],cc+gc);h([Fb,Ib,Ib,Yb],cc+hc);h([Eb,Jb,Jb,Yb],cc+ic);h([Eb,Jb,Ib,Yb],cc+jc);h([Eb,Ib,Jb,Yb],cc+kc);h([Eb,Ib,Ib,Yb],cc+lc);h([Fb,Jb,Jb,Sb],cc+mc);h([Fb,Jb,Ib,Sb],cc+nc);l=f[k(Bb)][k(Gb)][k(Kb)][k(Mb)];var m=l.indexOf(oc);if(m!=-1){g=parseInt(l.substring(m+V),Qb);l=l.substring(U,m)}}catch(a){}VaadinGrid.__softPermutationId=g;return C(l+pc)}
+function F(){if(!n.__gwt_stylesLoaded){n.__gwt_stylesLoaded={}}q(qc,O);q(qc,rc)}
+A();VaadinGrid.__moduleBase=B();s[R].moduleBase=VaadinGrid.__moduleBase;var G=D();if(n){var H=!!(n.location.protocol==sc||n.location.protocol==tc);n.__gwt_activeModules[R].canRedirect=H;function I(){var b=uc;try{n.sessionStorage.setItem(b,b);n.sessionStorage.removeItem(b);return true}catch(a){return false}}
+if(H&&I()){var J=vc;var K=n.sessionStorage[J];if(!/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?\/.*$/.test(K)){if(K&&(window.console&&console.log)){console.log(wc+K)}K=ab}if(K&&!n[J]){n[J]=true;n[J+xc]=B();var L=o.createElement(eb);L.src=K;var M=o.getElementsByTagName(yc)[U];M.insertBefore(L,M.firstElementChild||M.children[U]);return false}}}F();q(N,rc);w(G);return true}
+VaadinGrid.succeeded=VaadinGrid();
+function _85E3EBF93A36DE4CC0D848F399F3DF49($wnd, $doc){
+var $wnd = $wnd || window.parent;var __gwtModuleFunction = $wnd.VaadinGrid;var $sendStats = __gwtModuleFunction.__sendStats;$sendStats('moduleStartup', 'moduleEvalStart');var $gwt_version = "2.8.0VC-SNAPSHOT";var $strongName = '85E3EBF93A36DE4CC0D848F399F3DF49';var $gwt = {};var $doc = $wnd.document;var $moduleName, $moduleBase;function __gwtStartLoadingFragment(frag) {var fragFile = 'deferredjs/' + $strongName + '/' + frag + '.cache.js';return __gwtModuleFunction.__startLoadingFragment(fragFile);}function __gwtInstallCode(code) {return __gwtModuleFunction.__installRunAsyncCode(code);}function __gwt_isKnownPropertyValue(propName, propValue) {return __gwtModuleFunction.__gwt_isKnownPropertyValue(propName, propValue);}function __gwt_getMetaProperty(name) {return __gwtModuleFunction.__gwt_getMetaProperty(name);}var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent && $wnd.__gwtStatsEvent(a);} : null;var $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;var aa="[object Array]",ba="object",ca="string",h={3:1},da=65536,ea="alert",fa="alertdialog",ga="application",ha="button",ia="checkbox",ja="columnheader",ka="complementary",la="contentinfo",ma="definition",na="menuitemcheckbox",oa="menuitemradio",qa="navigation",ra="option",sa="presentation",ta="progressbar",ua="radiogroup",va="spinbutton",wa={3:1,14:1},xa={3:1,15:1,10:1,14:1},ya="null",za="fromIndex: ",Aa="position",Ba="absolute",Da="undefined",Ea="CSS1Compat",l="display",t="height",Fa={13:1,23:1,
+3:1,5:1,4:1},Ga={23:1,47:1,3:1,5:1,4:1},Ha={31:1,3:1,5:1,4:1},Ia={23:1,76:1,3:1,5:1,4:1},Ja="click",Ka="keydown",La={72:1,3:1,15:1,10:1,14:1},Ma=4194303,Na=1048575,Oa=524288,Pa=4194304,Qa=17592186044416,Ra=-9223372036854775E3,Sa="Browser: webkit\x3d",Ta=" mozilla\x3d",Ua=" opera\x3d",Va=" msie\x3d",Wa={6:1},Xa="___event_datas",u="width",Ya={19:1},Za="changes",$a={78:1,70:1},ab="error",bb="[^\\d\\.\\-]+.*$",v="px",cb="paddingRight",db="paddingBottom",eb="clientWidth",fb="clientHeight",gb="offsetHeight",
+hb="visible",ib="visibility",jb="hidden",kb="function",lb="html",mb="none",nb={149:1},ob="Syntax error, unrecognized expression: ",rb="number",sb="true",tb="__gwt_ObjectId",ub="once memory",vb="webkit",wb="pending",xb="update",yb="delete",zb="splice",Ab="dblclick",Bb="keypress",Cb="keyup",Db="mousedown",Eb="scroll",Fb="DOMMouseScroll",Gb="mousewheel",Hb=131072,Ib="touchstart",Jb=1048576,Kb="touchmove",Lb=2097152,Mb="touchend",Nb="touchcancel",Ob=8388608,Pb=16777216,Qb=33554432,Rb=67108864,Sb="Null widget handle. If you are creating a composite, ensure that initWidget() has been called.",
+Tb="Style names cannot be empty",Ub={29:1,26:1,20:1,28:1,25:1,21:1,18:1},Vb={29:1,26:1,20:1,28:1,40:1,25:1,21:1,18:1},Wb="left",Xb="disabled",Yb={29:1,26:1,20:1,28:1,109:1,25:1,21:1,18:1},$b={29:1,26:1,20:1,199:1,28:1,40:1,25:1,21:1,18:1},ac="Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (",bc="does not match the runtime user.agent value (",cc="Expect more errors.",dc="safari",ec="msie",fc="gecko",gc="colSpan",hc="transform",ic="webkitTransform",jc="HORIZONTAL",
+kc="vEscalatorLogicalRow",lc="Selection model is already attached to a grid. Remove the selection model first from the grid and then add it.",mc={59:1,110:1},nc="The given column index ",oc="400.0px",pc=" does not exist.",qc="Number of rows must be 1 or greater (was ",rc="-row",sc="frozen",tc="No such visual index: ",uc=" was not found in the position bookkeeping",vc="-footer",wc="bottom",xc="-spacer",yc="-spacer-deco",zc="vLogicalRow",Ac="Unsupported selection model",Bc="Column not found.",Cc="Row index (",
+Dc="customStyle",Ec={29:1,26:1,20:1,28:1,40:1,109:1,25:1,21:1,18:1},Fc=1.7976931348623157E308,Gc={55:1,3:1,5:1,4:1},Hc="closed",Ic="call",Jc="Invalid ",Kc="push",Lc="v-grid style-scope",Mc="element",Nc="data",Oc="tbody tr:not([template])",Pc={42:1,3:1,5:1,4:1},Qc="trident/",Rc="(\\.[0-9]+).+",Sc={61:1,3:1,5:1,4:1},Tc='For input string: "',Uc={60:1},Vc={45:1},Wc={44:1},Xc={64:1,41:1},Yc={64:1,65:1,41:1},Zc={3:1,44:1,111:1},$c={3:1,60:1},ad={3:1,45:1},bd="__proto__",cd={3:1,5:1,4:1,53:1},_,dd,ed={},
+fd=-1;function gd(){switch(fd){case 8:case 9:return new hd;case 10:case 11:return new id}return new jd}function kd(){switch(fd){case 8:case 9:return new ld;case 10:case 11:return new md}return new nd}function od(){switch(fd){case 8:case 9:return new pd;case 10:case 11:return new qd}return new rd}function sd(){switch(fd){case 8:case 9:return new td;case 10:case 11:return new ud}return new vd}function wd(){switch(fd){case 8:return new xd;case 9:return new yd}return new Ad}
+function Bd(){switch(fd){case 10:case 11:return new Cd;case 8:case 9:return new Dd}return new Ed}function Fd(){switch(fd){case 10:case 11:return new Gd;case 8:case 9:return new Hd}return new Id}function Jd(){}function Kd(a,b,c){return Ld(a)||a.tM===Jd?c:b}function Md(a,b){var c=$wnd;if(""===a)return c;var d=a.split(".");d[0]in c||!c.execScript||c.execScript("var "+d[0]);for(var e;d.length&&(e=d.shift());)c[e]?c=c[e]:c=c[e]=b||{};return c}
+function Nd(a){function b(){}b.prototype=a||{};return new b}function w(){}function x(a,b,c){var d=ed[a],e=d instanceof Array?d[0]:null;d&&!e?_=d:(_=ed[a]=b?Nd(ed[b]):{},_.cM=c,_.constructor=_,!b&&(_.tM=Jd));for(d=3;d<arguments.length;++d)arguments[d].prototype=_;e&&(_.cZ=e)}function Od(a){return Pd(Qd(a))+"@"+(Rd(a)>>>0).toString(16)}function Sd(){}function Td(a,b){return Ld(a)?a===b:Ud(a)?a.eQ(b):(Vd(a),a===b)}function Qd(a){return Ld(a)?Wd:Ud(a)?a.cZ:Vd(a)?a.cZ:Xd}
+function Rd(a){return Ld(a)?Yd(a):Ud(a)?a.hC():(Vd(a),Zd(a))}function $d(a){return Ld(a)?a:Ud(a)?a.tS():Vd(a)?Od(a):ae(a)}x(1,null,{},Sd);_.eQ=be;_.gC=function(){return this.cZ};_.hC=ce;_.tS=function(){return Od(this)};_.toString=function(){return this.tS()};de={3:1,646:1,5:1,2:1};!Array.isArray&&(Array.isArray=function(a){return Object.prototype.toString.call(a)===aa});function ae(a){return a.toString?a.toString():"[JavaScriptObject]"}function Ud(a){return!Array.isArray(a)&&a.tM===Jd}
+function y(a,b){return null!=a&&(Ld(a)&&!!de[b]||a.cM&&!!a.cM[b])}function ee(a){return null!=a&&!Ld(a)&&a.tM!==Jd}function Vd(a){return Array.isArray(a)&&a.tM===Jd}function Ld(a){return typeof a===ca}function fe(a){return null==a?null:a}function A(a){return Math.max(Math.min(a,2147483647),-2147483648)|0}var de;
+function ge(a){if(null==a.k)if(a.ue()){var b=a.c;b.ve()?a.k="["+b.j:b.ue()?a.k="["+b.se():a.k="[L"+b.se()+";";a.b=b.re()+"[]";a.i=b.te()+"[]"}else{var b=a.f,c=a.d,c=c.split("/");a.k=he(".",[b,he("$",c)]);a.b=he(".",[b,he(".",c)]);a.i=c[c.length-1]}}function Pd(a){ge(a);return a.k}function ie(a){ge(a);return a.i}function je(){this.g=ke++;this.a=this.j=this.b=this.d=this.f=this.i=this.k=null}function le(a){var b;b=new je;b.k="Class$"+(a?"S"+a:""+b.g);b.b=b.k;b.i=b.k;return b}
+function B(a){var b;b=le(a);me(a,b);return b}function C(a,b){var c;c=le(a);me(a,c);c.e=b?8:0;return c}function ne(){var a;a=le(null);a.e=2;return a}function D(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.qe(b))}function he(a,b){for(var c=0;!b[c]||""==b[c];)c++;for(var d=b[c++];c<b.length;c++)b[c]&&""!=b[c]&&(d+=a+b[c]);return d}function me(a,b){if(a){b.j=a;var c=b.ve()?null:ed[b.j];c?c.cZ=b:ed[a]=[b]}}x(151,1,{},je);_.qe=function(a){var b;b=new je;b.e=4;1<a?b.c=D(this,a-1):b.c=this;return b};
+_.re=function(){ge(this);return this.b};_.se=function(){return Pd(this)};_.te=function(){return ie(this)};_.ue=function(){return 0!=(this.e&4)};_.ve=function(){return 0!=(this.e&1)};_.tS=function(){return(0!=(this.e&2)?"interface ":0!=(this.e&1)?"":"class ")+(ge(this),this.k)};_.e=0;_.g=0;var ke=1;function E(){E=w}function oe(a,b){return a===b}function pe(a,b){return null==b?!1:a==b?!0:a.length==b.length&&a.toLowerCase()==b.toLowerCase()}function qe(a,b){return a.indexOf(b)}
+function re(a,b){return RegExp("^("+b+")$").test(a)}function se(a,b,c){c=te(c);return a.replace(RegExp(b,"g"),c)}function ue(a,b,c){c=te(c);return a.replace(RegExp(b),c)}
+function ve(a,b,c){var d=RegExp(b,"g");b=[];for(var e=0,f=a,g=null;;){var m=d.exec(f);if(null==m||""==f||e==c-1&&0<c){b[e]=f;break}else b[e]=f.substring(0,m.index),f=f.substring(m.index+m[0].length,f.length),d.lastIndex=0,g==f&&(b[e]=f.substring(0,1),f=f.substring(1)),g=f,e++}if(0==c&&0<a.length){for(a=b.length;0<a&&""==b[a-1];)--a;a<b.length&&b.splice(a,b.length-a)}a=b.length;E();a=we(Wd,h,2,a,4);for(c=0;c<b.length;++c)a[c]=b[c];return a}function xe(a,b){return oe(ye(a,0,b.length),b)}
+function ze(a,b){return ye(a,b,a.length-b)}function Ae(a){var b,c,d;c=a.length;for(d=0;d<c&&32>=a.charCodeAt(d);)++d;for(b=c;b>d&&32>=a.charCodeAt(b-1);)--b;return 0<d||b<c?ye(a,d,b-d):a}function ye(a,b,c){E();return a.substr(b,c)}function te(a){E();var b;for(b=0;0<=(b=a.indexOf("\\",b));)36==a.charCodeAt(b+1)?a=ye(a,0,b)+"$"+ze(a,++b):a=ye(a,0,b)+ze(a,++b);return a}function Be(a,b){E();return a==b?0:a<b?-1:1}
+function Ce(a){E();var b;return a>=da?(b=55296+(a-da>>10&1023)&65535,a=56320+(a-da&1023)&65535,String.fromCharCode(b)+String.fromCharCode(a)):String.fromCharCode(a&65535)}x(204,1,{},function(){});_.me=function(a,b){return Be(a.toLowerCase(),b.toLowerCase())};_.eQ=be;var F=B(1),Xd=B(0);B(151);var Wd=B(2);B(204);x(624,1,{});var De;B(624);x(123,1,{123:1});B(123);function Ee(){return!!$wnd.requestAnimationFrame&&!!$wnd.cancelAnimationFrame}function Fe(){}
+function Ge(a,b){var c=He(function(){var b=Ie();a.bb(b)});return{id:$wnd.requestAnimationFrame(c,b)}}x(48,624,{},Fe);_.ab=function(a,b){var c;c=Ge(a,b);return new Je(c)};B(48);function Je(a){this.a=a}x(596,123,{123:1},Je);_.cb=function(){$wnd.cancelAnimationFrame(this.a.id)};B(596);function Ke(){this.a=new G;this.b=new Le(this)}x(49,624,{},Ke);_.ab=function(a){a=new Me(this,a);Ne(this.a,a);1==this.a.b.length&&Oe(this.b,16);return a};B(49);
+function Pe(a){a.p&&(++a.n,a.o?$wnd.clearInterval(a.p.a):$wnd.clearTimeout(a.p.a),a.p=null)}function Oe(a,b){if(0>b)throw new H("must be non-negative");a.p&&Pe(a);a.o=!1;var c;c=Qe(a,a.n);c=$wnd.setTimeout(c,b);a.p=I(c)}function Qe(a,b){return He(function(){a.db(b)})}x(50,1,{});_.db=function(a){a==this.n&&(this.o||(this.p=null),this.eb())};_.n=0;_.o=!1;_.p=null;B(50);function Le(a){this.a=a}x(597,50,{},Le);
+_.eb=function(){var a=this.a,b,c,d,e,f;b=we(Re,h,148,a.a.b.length,0);b=Se(a.a,b);c=new Te;e=0;for(f=b.length;e<f;++e)d=b[e],Ue(a.a,d),d.a.bb(c.a);0<a.a.b.length&&Oe(a.b,J(5,16-(Ie()-c.a)))};B(597);function Me(a,b){this.b=a;this.a=b}x(148,123,{123:1,148:1},Me);_.cb=function(){var a=this.b;Ue(a.a,this);0==a.a.b.length&&Pe(a.b)};var Re=B(148);x(7,1,{});B(7);function Ve(){this.a=ea}x(511,7,{},Ve);B(511);function We(){this.a=fa}x(510,7,{},We);B(510);function Xe(){this.a=ga}x(512,7,{},Xe);B(512);
+function Ye(){this.a="article"}x(513,7,{},Ye);B(513);function Ze(){this.a="banner"}x(514,7,{},Ze);B(514);function $e(){this.a=ha}x(515,7,{},$e);B(515);function af(){this.a=ia}x(516,7,{},af);B(516);function bf(){this.a=ja}x(517,7,{},bf);B(517);function cf(){this.a="combobox"}x(518,7,{},cf);B(518);function df(){this.a=ka}x(519,7,{},df);B(519);function ef(){this.a=la}x(520,7,{},ef);B(520);function ff(){this.a=ma}x(521,7,{},ff);B(521);function gf(){this.a="dialog"}x(522,7,{},gf);B(522);
+function hf(){this.a="directory"}x(523,7,{},hf);B(523);function jf(){this.a="document"}x(524,7,{},jf);B(524);function kf(){this.a="form"}x(525,7,{},kf);B(525);function lf(){this.a="grid"}x(527,7,{},lf);B(527);function mf(){this.a="gridcell"}x(526,7,{},mf);B(526);function nf(){this.a="group"}x(528,7,{},nf);B(528);function of(){this.a="heading"}x(529,7,{},of);B(529);function pf(){this.a="img"}x(530,7,{},pf);B(530);function qf(){this.a="link"}x(531,7,{},qf);B(531);function rf(){this.a="list"}
+x(534,7,{},rf);B(534);function sf(){this.a="listbox"}x(532,7,{},sf);B(532);function tf(){this.a="listitem"}x(533,7,{},tf);B(533);function uf(){this.a="log"}x(535,7,{},uf);B(535);function vf(){this.a="main"}x(536,7,{},vf);B(536);function wf(){this.a="marquee"}x(537,7,{},wf);B(537);function xf(){this.a="math"}x(538,7,{},xf);B(538);function yf(){this.a="menu"}x(543,7,{},yf);B(543);function zf(){this.a="menubar"}x(539,7,{},zf);B(539);function Af(){this.a="menuitem"}x(542,7,{},Af);B(542);
+function Bf(){this.a=na}x(540,7,{},Bf);B(540);function Cf(){this.a=oa}x(541,7,{},Cf);B(541);function Df(){this.a=qa}x(544,7,{},Df);B(544);function Ef(){this.a="note"}x(545,7,{},Ef);B(545);function Ff(){this.a=ra}x(546,7,{},Ff);B(546);function Gf(){this.a=sa}x(547,7,{},Gf);B(547);function Hf(){this.a=ta}x(548,7,{},Hf);B(548);function If(){this.a="radio"}x(550,7,{},If);B(550);function Jf(){this.a=ua}x(549,7,{},Jf);B(549);function Kf(){this.a="region"}x(551,7,{},Kf);B(551);
+function Lf(){Lf=w;Mf=new We;Nf=new Ve;Of=new Xe;Pf=new Ye;Qf=new Ze;Rf=new $e;Sf=new af;Tf=new bf;Uf=new cf;Vf=new df;Wf=new ef;Xf=new ff;Yf=new gf;Zf=new hf;$f=new jf;ag=new kf;bg=new mf;cg=new lf;dg=new nf;eg=new of;fg=new pf;gg=new qf;hg=new sf;ig=new tf;jg=new rf;kg=new uf;lg=new vf;mg=new wf;ng=new xf;og=new zf;pg=new Bf;qg=new Cf;rg=new Af;sg=new yf;tg=new Df;ug=new Ef;vg=new Ff;wg=new Gf;xg=new Hf;yg=new Jf;zg=new If;Ag=new Kf;Bg=new Cg;Dg=new Eg;Fg=new Gg;Hg=new Ig;Jg=new Kg;Lg=new Mg;Ng=
+new Og;Pg=new Qg;Rg=new Sg;Tg=new Ug;Vg=new Wg;Xg=new Yg;Zg=new $g;ah=new bh;ch=new dh;eh=new fh;gh=new hh;ih=new jh;kh=new lh;K=new mh;M(K,"region",Ag);M(K,ea,Nf);M(K,"dialog",Yf);M(K,fa,Mf);M(K,ga,Of);M(K,"document",$f);M(K,"article",Pf);M(K,"banner",Qf);M(K,ha,Rf);M(K,ia,Sf);M(K,"gridcell",bg);M(K,ja,Tf);M(K,"group",dg);M(K,"combobox",Uf);M(K,ka,Vf);M(K,la,Wf);M(K,ma,Xf);M(K,"list",jg);M(K,"directory",Zf);M(K,"form",ag);M(K,"grid",cg);M(K,"heading",eg);M(K,"img",fg);M(K,"link",gg);M(K,"listbox",
+hg);M(K,"listitem",ig);M(K,"log",kg);M(K,"main",lg);M(K,"marquee",mg);M(K,"math",ng);M(K,"menu",sg);M(K,"menubar",og);M(K,"menuitem",rg);M(K,na,pg);M(K,ra,vg);M(K,"radio",zg);M(K,oa,qg);M(K,qa,tg);M(K,"note",ug);M(K,sa,wg);M(K,ta,xg);M(K,ua,yg);M(K,"row",Fg);M(K,"rowgroup",Bg);M(K,"rowheader",Dg);M(K,"search",Jg);M(K,"separator",Lg);M(K,"scrollbar",Hg);M(K,"slider",Ng);M(K,va,Pg);M(K,"status",Rg);M(K,"tab",Xg);M(K,"tablist",Tg);M(K,"tabpanel",Vg);M(K,"textbox",Zg);M(K,"timer",ah);M(K,"toolbar",ch);
+M(K,"tooltip",eh);M(K,"tree",kh);M(K,"treegrid",gh);M(K,"treeitem",ih)}var Nf,Mf,Of,Pf,Qf,Rf,Sf,Tf,Uf,Vf,Wf,Xf,Yf,Zf,$f,ag,cg,bg,dg,eg,fg,gg,jg,hg,ig,kg,lg,mg,ng,sg,og,rg,pg,qg,tg,ug,vg,wg,xg,zg,yg,Ag,K,Fg,Bg,Dg,Hg,Jg,Lg,Ng,Pg,Rg,Xg,Tg,Vg,Zg,ah,ch,eh,kh,gh,ih;function Gg(){this.a="row"}x(554,7,{},Gg);B(554);function Cg(){this.a="rowgroup"}x(552,7,{},Cg);B(552);function Eg(){this.a="rowheader"}x(553,7,{},Eg);B(553);function Ig(){this.a="scrollbar"}x(555,7,{},Ig);B(555);
+function Kg(){this.a="search"}x(556,7,{},Kg);B(556);function Mg(){this.a="separator"}x(557,7,{},Mg);B(557);function Og(){this.a="slider"}x(558,7,{},Og);B(558);function Qg(){this.a=va}x(559,7,{},Qg);B(559);function Sg(){this.a="status"}x(560,7,{},Sg);B(560);function Yg(){this.a="tab"}x(563,7,{},Yg);B(563);function Ug(){this.a="tablist"}x(561,7,{},Ug);B(561);function Wg(){this.a="tabpanel"}x(562,7,{},Wg);B(562);function $g(){this.a="textbox"}x(564,7,{},$g);B(564);function bh(){this.a="timer"}
+x(565,7,{},bh);B(565);function dh(){this.a="toolbar"}x(566,7,{},dh);B(566);function fh(){this.a="tooltip"}x(567,7,{},fh);B(567);function lh(){this.a="tree"}x(570,7,{},lh);B(570);function hh(){this.a="treegrid"}x(568,7,{},hh);B(568);function jh(){this.a="treeitem"}x(569,7,{},jh);B(569);function Te(){this.a=Ie()}x(171,1,{},Te);_.a=0;B(171);function nh(a){a.i=null;oh()}x(14,1,wa);_.fb=ph;_.tS=function(){var a,b;a=Pd(this.cZ);b=this.fb();return null!=b?a+": "+b:a};_.g=!1;var qh=B(14);
+x(15,14,{3:1,15:1,14:1});B(15);function rh(a){this.f=a;nh(this)}x(10,15,xa,rh);B(10);function sh(){sh=w;th=new Sd}function uh(a){sh();this.f=this.e=null;this.g=!1;this.a="";this.b=a;this.a=""}x(73,10,{73:1,3:1,15:1,10:1,14:1},uh);_.fb=function(){var a;null==this.c&&(a=fe(this.b)===fe(th)?null:this.b,this.d=null==a?ya:ee(a)?null==a?null:a.name:Ld(a)?"String":Pd(Qd(a)),this.a=this.a+": "+(ee(a)?null==a?null:a.message:a+""),this.c="("+this.d+") "+this.a);return this.c};
+_.gb=function(){return fe(this.b)===fe(th)?null:this.b};var th;B(73);function Ie(){return Date.now?Date.now():(new Date).getTime()}x(602,1,{});B(602);function vh(){vh=w;wh=$wnd}var wh;function Zd(a){return a.$H||(a.$H=++xh)}function yh(a){$wnd.setTimeout(function(){throw a;},0)}function zh(){0!=Ah&&(Ah=0);Bh=-1}var Ah=0,xh=0,Ch=0,Bh=-1;function Dh(){Dh=w;Eh=new Fh}function Gh(a){a.j||(a.j=!0,!a.f&&(a.f=new Hh(a)),Ih(a.f,1),!a.i&&(a.i=new Jh(a)),Ih(a.i,50))}function Kh(a,b){a.d=Lh(a.d,[b,!1])}
+function Mh(a){return a.hb()}function Lh(a,b){!a&&(a=[]);a[a.length]=b;return a}function Nh(a,b){var c,d,e;d=0;for(e=a.length;d<e;d++){c=a[d];try{c[1]?c[0].hb()&&(b=Lh(b,c)):c[0].ib()}catch(f){if(f=Oh(f),y(f,14))c=f,yh(y(c,73)?c.gb():c);else throw Ph(f);}}return b}function Ih(a,b){function c(){He(Mh)(a)&&$wnd.setTimeout(c,b)}Dh();$wnd.setTimeout(c,b)}function Qh(a){Dh();var b=$wnd.setInterval(function(){!He(Mh)(a)&&$wnd.clearInterval(b)},30)}x(419,602,{});_.e=!1;_.j=!1;var Eh;B(419);
+function Hh(a){this.a=a}x(420,1,{},Hh);_.hb=function(){this.a.e=!0;var a=this.a,b;a.b&&(b=a.b,a.b=null,!a.g&&(a.g=[]),Nh(b,a.g));if(a.g){b=a.g;var c,d,e,f,g,m;g=b.length;if(0==g)b=null;else{c=!1;for(d=new Te;16>Ie()-d.a;){e=!1;for(f=0;f<g;f++)if(m=b[f])e=!0,m[0].hb()||(b[f]=null,c=!0);if(!e)break}if(c){c=[];for(f=0;f<g;f++)b[f]&&(c[c.length]=b[f]);b=0==c.length?null:c}}a.g=b}this.a.e=!1;a=this.a;return this.a.j=!!a.b||!!a.g};B(420);function Jh(a){this.a=a}x(421,1,{},Jh);
+_.hb=function(){this.a.e&&Ih(this.a.f,1);return this.a.j};B(421);function oh(){oh=w}function Rh(a,b){if(!a)throw new Sh((E(),""+b));}function Th(a,b){if(!a)throw new H((E(),""+b));}function N(a){if(!a)throw new Uh;}function Vh(a,b){if(0>a||a>=b)throw new Wh("Index: "+a+", Size: "+b);}function Xh(a){if(null==a)throw new Yh;}function Zh(a,b){if(null==a)throw new $h((E(),""+b));}function ai(a,b){if(0>a||a>b)throw new Wh("Index: "+a+", Size: "+b);}function bi(a){if(!a)throw new ci;}
+function di(a,b){var c,d,e,f;a=(E(),""+a);c=new ei;for(d=f=0;d<b.length;){e=a.indexOf("%s",f);if(-1==e)break;fi(c,ye(a,f,e-f));fi(c,b[d++]);f=e+2}fi(c,ye(a,f,a.length-f));if(d<b.length){c.a+=" [";for(fi(c,b[d++]);d<b.length;)c.a+=", ",fi(c,b[d++]);c.a+="]"}return c.a}function gi(a){return hi((O(),a))}function ii(a,b){return(O(),P).xb(a,b)}function ji(a){for(;a.lastChild;)a.removeChild(a.lastChild)}function ki(a){var b;(b=hi((O(),a)))&&b.removeChild(a)}
+function li(a,b){var c;b=mi(b);c=a.className||"";-1==ni(c,b)&&(0<c.length?oi(a,c+" "+b):oi(a,b))}function pi(a){return(O(),P).tb(a)+((a.offsetHeight||0)|0)}function qi(a){return(O(),P).sb(a)}function ri(a){return(O(),P).tb(a)}function si(a){return ti((O(),a))}function ui(a){return(O(),a).innerHTML}function vi(a,b){return null==a[b]?null:String(a[b])}function wi(a){return(O(),P).vb(a)}function xi(a){return(O(),P).wb(a)}
+function yi(a,b){var c,d,e,f;b=mi(b);f=a.className||"";d=ni(f,b);-1!=d&&(c=Ae(ye(f,0,d)),d=Ae(ze(f,d+b.length)),0==c.length?e=d:0==d.length?e=c:e=c+" "+d,oi(a,e))}function oi(a,b){a.className=b||""}function zi(a,b){(O(),P).yb(a,b)}function ni(a,b){var c,d,e;for(c=a.indexOf(b);-1!=c;){if(0==c||32==a.charCodeAt(c-1))if(d=c+b.length,e=a.length,d==e||d<e&&32==a.charCodeAt(d))break;c=a.indexOf(b,c+1)}return c}function Ai(a){var b;try{b=!!a&&!!a.nodeType}catch(c){b=!1}return b?!!a&&1==a.nodeType:!1}
+function mi(a){return a=Ae(a)}function O(){O=w;P=Fd()}function ti(a){for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function Bi(a){for(a=a.nextSibling;a&&1!=a.nodeType;)a=a.nextSibling;return a}function hi(a){(a=a.parentNode)&&1==a.nodeType||(a=null);return a}function Ci(a){for(a=a.previousSibling;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Di(a){O();return a|0}x(635,1,{});_.jb=function(a,b){var c=a.createElement("BUTTON");c.type=b;return c};
+_.lb=function(a,b){var c;c=a.createElement("script");c.text=b;return c};_.nb=function(a){return a.button|0};_.ob=function(a){return a.currentTarget};_.sb=function(a){for(var b=0,c=a;c.offsetParent;)b-=c.scrollLeft,c=c.parentNode;for(;a;)b+=a.offsetLeft,a=a.offsetParent;return Di(b)};_.tb=function(a){for(var b=0,c=a;c.offsetParent;)b-=c.scrollTop,c=c.parentNode;for(;a;)b+=a.offsetTop,a=a.offsetParent;return Di(b)};
+_.ub=function(a){var b="";for(a=a.firstChild;a;)1==a.nodeType?b+=this.ub(a):a.nodeValue&&(b+=a.nodeValue),a=a.nextSibling;return b};_.vb=function(a){return Di(a.scrollLeft||0)};_.wb=function(a){return a.tabIndex};_.yb=function(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);null!=b&&a.appendChild(a.ownerDocument.createTextNode(b))};_.zb=function(a,b){a.scrollLeft=b};_.Ab=function(a){return a.outerHTML};var P;B(635);x(639,635,{});
+_.kb=function(a,b){var c=a.createEvent("HTMLEvents");c.initEvent(b,!0,!0);return c};_.mb=function(a,b){a.dispatchEvent(b)};_.nb=function(a){a=a.button;return 1==a?4:2==a?2:1};_.pb=function(a){return a.relatedTarget};_.qb=function(a){return a.target};_.rb=function(a){a.preventDefault()};_.ub=function(a){return a.textContent};_.xb=function(a,b){return a.contains(b)};_.yb=function(a,b){a.textContent=b||""};B(639);
+function Ei(a){return"rtl"==a.ownerDocument.defaultView.getComputedStyle(a,"").direction}x(640,639,{});_.jb=function(a,b){var c=a.createElement("BUTTON");c.setAttribute("type",b);return c};_.lb=function(a,b){var c;c=a.createElement("script");P.yb(c,b);return c};_.ob=function(a){return a.currentTarget||$wnd};
+_.sb=function(a){var b;if(b=a.getBoundingClientRect&&a.getBoundingClientRect())a=b.left+wi(a.ownerDocument.body);else if(null==a.offsetLeft)a=0;else{b=0;var c=a.ownerDocument,d=a.parentNode;if(d)for(;d.offsetParent;)b-=d.scrollLeft,"rtl"==c.defaultView.getComputedStyle(d,"").getPropertyValue("direction")&&(b+=d.scrollWidth-d.clientWidth),d=d.parentNode;for(;a;){b+=a.offsetLeft;if("fixed"==c.defaultView.getComputedStyle(a,"")[Aa]){b+=c.body.scrollLeft;break}(d=a.offsetParent)&&$wnd.devicePixelRatio&&
+(b+=parseInt(c.defaultView.getComputedStyle(d,"").getPropertyValue("border-left-width")));if(d&&"BODY"==d.tagName&&a.style.position==Ba)break;a=d}a=b}return Di(a)};
+_.tb=function(a){var b;if(b=a.getBoundingClientRect&&a.getBoundingClientRect())a=b.top+((a.ownerDocument.body.scrollTop||0)|0);else if(null==a.offsetTop)a=0;else{b=0;var c=a.ownerDocument,d=a.parentNode;if(d)for(;d.offsetParent;)b-=d.scrollTop,d=d.parentNode;for(;a;){b+=a.offsetTop;if("fixed"==c.defaultView.getComputedStyle(a,"")[Aa]){b+=c.body.scrollTop;break}(d=a.offsetParent)&&$wnd.devicePixelRatio&&(b+=parseInt(c.defaultView.getComputedStyle(d,"").getPropertyValue("border-top-width")));if(d&&
+"BODY"==d.tagName&&a.style.position==Ba)break;a=d}a=b}return Di(a)};_.vb=function(a){return!pe("body",(O(),a).tagName)&&Ei(a)?Di(a.scrollLeft||0)-(((a.scrollWidth||0)|0)-(a.clientWidth|0)):Di(a.scrollLeft||0)};_.wb=function(a){return typeof a.tabIndex!=Da?a.tabIndex:-1};_.zb=function(a,b){!pe("body",(O(),a).tagName)&&Ei(a)&&(b+=((a.scrollWidth||0)|0)-(a.clientWidth|0));a.scrollLeft=b};B(640);function Hd(){O()}x(472,640,{},Hd);
+_.sb=function(a){var b;try{b=a.getBoundingClientRect().left}catch(c){b=0}b+=$wnd.pageXOffset;Ei(a)&&(a=a.offsetParent,b+=a?a.offsetWidth-a.clientWidth:0);return Di(b)};_.tb=function(a){var b;try{b=a.getBoundingClientRect().top}catch(c){b=0}return Di(b+$wnd.pageYOffset)};_.vb=function(a){var b;b=Di(a.scrollLeft||0);Ei(a)&&(b=-b);return b};_.wb=function(a){return 65535>a.tabIndex?a.tabIndex:-(a.tabIndex%65535)-1};
+_.xb=function(a,b){var c;a:if(c=b,1!=a.nodeType&&9!=a.nodeType)c=a==c;else{if(1!=c.nodeType&&(c=c.parentNode,!c)){c=!1;break a}c=9==a.nodeType?a===c||a.body&&a.body.contains(c):a===c||a.contains(c)}return c};_.zb=function(a,b){Ei(a)&&(b=-b);a.scrollLeft=b};B(472);function Id(){O()}
+function Fi(){var a;a=(a=/rv:([0-9]+)\.([0-9]+)(\.([0-9]+))?.*?/.exec(navigator.userAgent.toLowerCase()))&&3<=a.length?1E6*parseInt(a[1])+1E3*parseInt(a[2])+parseInt(5<=a.length&&!isNaN(a[4])?a[4]:0):-1;return-1!=a&&1009E3<=a}x(471,639,{},Id);_.pb=function(a){return(a=a.relatedTarget)?a:null};
+_.sb=function(a){var b=Gi(a.ownerDocument);Element.prototype.getBoundingClientRect?a=a.getBoundingClientRect().left+b.scrollLeft|0:(b=a.ownerDocument,a=b.getBoxObjectFor(a).screenX-b.getBoxObjectFor(b.documentElement).screenX);return a};_.tb=function(a){var b=Gi(a.ownerDocument);Element.prototype.getBoundingClientRect?a=a.getBoundingClientRect().top+b.scrollTop|0:(b=a.ownerDocument,a=b.getBoxObjectFor(a).screenY-b.getBoxObjectFor(b.documentElement).screenY);return a};
+_.vb=function(a){return Fi()||"rtl"!=a.ownerDocument.defaultView.getComputedStyle(a,null).direction?Di(a.scrollLeft||0):Di(a.scrollLeft||0)-(((a.scrollWidth||0)|0)-(a.clientWidth|0))};_.xb=function(a,b){return a===b||!!(a.compareDocumentPosition(b)&16)};_.zb=function(a,b){!Fi()&&"rtl"==a.ownerDocument.defaultView.getComputedStyle(a,null).direction&&(b+=((a.scrollWidth||0)|0)-(a.clientWidth|0));a.scrollLeft=b};
+_.Ab=function(a){var b=a.ownerDocument;a=a.cloneNode(!0);b=b.createElement("DIV");b.appendChild(a);outer=b.innerHTML;a.innerHTML="";return outer};B(471);function Gd(){O()}x(470,640,{},Gd);_.qb=function(a){(a=a.target)&&3==a.nodeType&&(a=a.parentNode);return a};B(470);function Hi(){var a=$doc,b;return b=(O(),a).createElement("INPUT"),b.type=ia,b.value="on",b}function Ii(){var a=$doc;return(O(),a).createElement("div")}function Ji(a){var b=$doc;return(O(),b).createElement(a)}
+function Ki(){var a=$doc;return(O(),a).createElement("label")}function Li(){var a=$doc;return(O(),a).createElement("tbody")}function Mi(){var a=$doc;return(O(),a).createElement("thead")}function Ni(){var a=$doc;return(O(),a).createElement("tr")}function Oi(){var a=$doc;return(O(),a).createElement("table")}function Pi(){var a=$doc;!a.gwt_uid&&(a.gwt_uid=1);return"gwt-uid-"+a.gwt_uid++}function Gi(a){return a.compatMode===Ea?a.documentElement:a.body}function Qi(a){return(O(),P).qb(a)}
+function Ri(a){return(O(),a).keyCode|0}function Si(a){return(O(),a).touches}function Ti(a){(O(),P).rb(a)}function Ui(a){return(O(),a)[l]}function Vi(a,b){return(O(),a)[b]}function Wi(a){return null!=a.f?a.f:""+a.g}function R(a,b){this.f=a;this.g=b}function Xi(a){var b,c,d,e;b={};d=0;for(e=a.length;d<e;++d)c=a[d],b[":"+(null!=c.f?c.f:""+c.g)]=c;return b}function Yi(a,b){var c;Xh(b);c=a[":"+b];var d=S(D(F,1),h,1,3,[b]);if(!c)throw new H(di("Enum constant undefined: %s",d));return c}x(4,1,{3:1,5:1,4:1});
+_.Bb=function(a){return this.g-a.g};_.eQ=be;_.hC=ce;_.tS=function(){return Wi(this)};_.g=0;B(4);function Zi(){Zi=w;$i=new aj;bj=new cj;dj=new ej;fj=new gj;hj=new ij;jj=new kj;lj=new mj;nj=new oj;pj=new qj;rj=new sj;tj=new uj;vj=new wj;xj=new yj;zj=new Aj;Bj=new Fj;Gj=new Hj;Ij=new Jj}x(13,4,Fa);var bj,Ij,dj,fj,hj,jj,$i,lj,nj,pj,zj,Bj,rj,vj,tj,Gj,xj,Kj=C(13,function(){Zi();return S(D(Kj,1),h,13,0,[$i,bj,dj,fj,hj,jj,lj,nj,pj,rj,tj,vj,xj,zj,Bj,Gj,Ij])});function aj(){R.call(this,"NONE",0)}
+x(433,13,Fa,aj);C(433,null);function sj(){R.call(this,"TABLE_COLUMN_GROUP",9)}x(442,13,Fa,sj);C(442,null);function uj(){R.call(this,"TABLE_HEADER_GROUP",10)}x(443,13,Fa,uj);C(443,null);function wj(){R.call(this,"TABLE_FOOTER_GROUP",11)}x(444,13,Fa,wj);C(444,null);function yj(){R.call(this,"TABLE_ROW_GROUP",12)}x(445,13,Fa,yj);C(445,null);function Aj(){R.call(this,"TABLE_CELL",13)}x(446,13,Fa,Aj);C(446,null);function Fj(){R.call(this,"TABLE_COLUMN",14)}x(447,13,Fa,Fj);C(447,null);
+function Hj(){R.call(this,"TABLE_ROW",15)}x(448,13,Fa,Hj);C(448,null);function Jj(){R.call(this,"INITIAL",16)}x(449,13,Fa,Jj);C(449,null);function cj(){R.call(this,"BLOCK",1)}x(434,13,Fa,cj);C(434,null);function ej(){R.call(this,"INLINE",2)}x(435,13,Fa,ej);C(435,null);function gj(){R.call(this,"INLINE_BLOCK",3)}x(436,13,Fa,gj);C(436,null);function ij(){R.call(this,"INLINE_TABLE",4)}x(437,13,Fa,ij);C(437,null);function kj(){R.call(this,"LIST_ITEM",5)}x(438,13,Fa,kj);C(438,null);
+function mj(){R.call(this,"RUN_IN",6)}x(439,13,Fa,mj);C(439,null);function oj(){R.call(this,"TABLE",7)}x(440,13,Fa,oj);C(440,null);function qj(){R.call(this,"TABLE_CAPTION",8)}x(441,13,Fa,qj);C(441,null);function Lj(){Lj=w;Mj=new Nj;Oj=new Pj;Qj=new Rj;Sj=new Tj}x(47,4,Ga);var Sj,Oj,Qj,Mj,Uj=C(47,function(){Lj();return S(D(Uj,1),h,47,0,[Mj,Oj,Qj,Sj])});function Nj(){R.call(this,"VISIBLE",0)}x(450,47,Ga,Nj);C(450,null);function Pj(){R.call(this,"HIDDEN",1)}x(451,47,Ga,Pj);C(451,null);
+function Rj(){R.call(this,"SCROLL",2)}x(452,47,Ga,Rj);C(452,null);function Tj(){R.call(this,"AUTO",3)}x(453,47,Ga,Tj);C(453,null);function T(){T=w;Vj=new Wj;Xj=new Yj;Zj=new ak;bk=new ck;dk=new ek;fk=new gk;hk=new ik;jk=new kk;lk=new mk}x(31,4,Ha);var jk,Zj,bk,hk,lk,fk,Xj,dk,Vj,nk=C(31,function(){T();return S(D(nk,1),h,31,0,[Vj,Xj,Zj,bk,dk,fk,hk,jk,lk])});function Wj(){R.call(this,"PX",0)}x(424,31,Ha,Wj);C(424,null);function Yj(){R.call(this,"PCT",1)}x(425,31,Ha,Yj);C(425,null);
+function ak(){R.call(this,"EM",2)}x(426,31,Ha,ak);C(426,null);function ck(){R.call(this,"EX",3)}x(427,31,Ha,ck);C(427,null);function ek(){R.call(this,"PT",4)}x(428,31,Ha,ek);C(428,null);function gk(){R.call(this,"PC",5)}x(429,31,Ha,gk);C(429,null);function ik(){R.call(this,"IN",6)}x(430,31,Ha,ik);C(430,null);function kk(){R.call(this,"CM",7)}x(431,31,Ha,kk);C(431,null);function mk(){R.call(this,"MM",8)}x(432,31,Ha,mk);C(432,null);function ok(){ok=w;pk=new qk;rk=new sk}x(76,4,Ia);
+var rk,pk,tk=C(76,function(){ok();return S(D(tk,1),h,76,0,[pk,rk])});function qk(){R.call(this,"VISIBLE",0)}x(454,76,Ia,qk);C(454,null);function sk(){R.call(this,"HIDDEN",1)}x(455,76,Ia,sk);C(455,null);x(618,1,{});_.tS=function(){return"An event type"};B(618);x(619,618,{});_.Eb=uk;_.Fb=function(){this.f=!1;this.g=null};_.f=!1;B(619);x(620,619,{});_.Db=function(){return this.Gb()};var vk;B(620);function wk(){wk=w;xk=new yk("blur",new zk)}function zk(){}x(592,620,{},zk);_.Cb=Ak;_.Gb=function(){return xk};
+var xk;B(592);x(622,620,{});B(622);x(623,622,{});B(623);function Bk(){Bk=w;Ck=new yk(Ja,new Dk)}function Dk(){}x(509,623,{},Dk);_.Cb=function(a){a.Hb(this)};_.Gb=function(){return Ck};var Ck;B(509);x(273,1,{});_.hC=Ek;_.tS=function(){return"Event type"};var Fk=_.c=0;B(273);function Gk(){this.c=++Fk}x(37,273,{},Gk);B(37);function yk(a,b){var c;this.c=++Fk;this.a=b;!vk&&(vk=new Hk);c=vk.a[a];c||(c=new G,vk.a[a]=c);c.Le(this);this.b=a}x(82,37,{},yk);B(82);x(621,620,{});B(621);x(642,621,{});B(642);
+function Ik(){Ik=w;Jk=new yk(Ka,new Kk)}function Kk(){}x(504,642,{},Kk);_.Cb=function(a){27==Ri(this.d)&&Lk(a.a)};_.Gb=function(){return Jk};var Jk;B(504);function Hk(){this.a={}}x(479,1,{},Hk);B(479);function Mk(){}function Nk(){var a=(!Ok&&(Ok=new Pk),Ok),b;Qk&&(b=new Mk,Rk(a,b))}x(593,619,{},Mk);_.Cb=function(){Sk();try{Tk(Uk,Vk)}finally{Uk.a.He(),Wk(Xk)}};_.Db=function(){return Qk};var Qk;B(593);function Yk(a){this.a=a}x(422,619,{},Yk);
+_.Cb=function(a){this.a.a?(Zk(a.a.c,new $k(a.b)),a.a.b=!0):(a.b.Ed(),a.a.b=!1)};_.Db=function(){return al};var al;B(422);function bl(a,b,c){a=a.a;if(!b)throw new $h("Cannot add a handler with a null type");if(0<a.b){var d=new cl(a,b,c);!a.a&&(a.a=new G);Ne(a.a,d)}else dl(a,b,null,c);return new el(new fl(a,b,c))}
+function Rk(a,b){var c;!b.f||b.Fb();c=b.Eb();b.g=a.b;try{var d=a.a,e,f,g,m,n;if(!b)throw new $h("Cannot fire null event");try{++d.b;var p=b.Db();m=gl(d,p,null);e=null;for(n=d.c?m.Pe(m.Oc()):m.Oe();d.c?n.Ue():n.Dc();){g=d.c?n.Ve():n.Ec();try{b.Cb(g)}catch(q){if(q=Oh(q),y(q,14))f=q,!e&&(e=new hl),il(e,f);else throw Ph(q);}}if(e)throw new jl(e);}finally{if(--d.b,0==d.b){var r,s;if(d.a)try{for(s=new kl(d.a);s.b<s.d.Oc();)r=(N(s.b<s.d.Oc()),s.d.Me(s.c=s.b++)),r.ib()}finally{d.a=null}}}}catch(z){z=Oh(z);
+if(y(z,72))throw c=z,new ll(c.a);throw Ph(z);}finally{null==c?(b.f=!0,b.g=null):b.g=c}}function ml(a){nl.call(this,a,!1)}function nl(a,b){this.a=new ol(b);this.b=a}x(51,1,{26:1},ml,nl);B(51);x(632,1,{});B(632);function dl(a,b,c,d){var e;e=U(a.d,b);e||(e=new mh,pl(a.d,b,e));a=e.Ee(c);a||(a=new G,e.Fe(c,a));a.Le(d)}function ql(a,b,c,d){var e,f;e=gl(a,b,c);e.Re(d)&&e.xe()&&(f=U(a.d,b),f.Ge(c),f.xe()&&rl(a.d,b))}function gl(a,b,c){a=U(a.d,b);return a?(c=a.Ee(c))?c:(V(),V(),sl):(V(),V(),sl)}
+x(378,632,{});_.b=0;_.c=!1;B(378);function ol(a){this.d=new mh;this.c=a}x(379,378,{},ol);B(379);function el(a){this.a=a}x(480,1,{},el);B(480);
+function jl(a){var b,c;var d,e;c=a.Oc();if(0==c)c=null;else{c=new tl(1==c?"Exception caught: ":c+" exceptions caught: ");b=!0;for(e=a.xc();e.Dc();)d=e.Ec(),b?b=!1:c.a+="; ",fi(c,d.fb());c=c.a}this.e=b=a.xe()?null:a.xc().Ec();this.f=c;nh(this);this.a=a;c=0;for(a=a.xc();a.Dc();)b=a.Ec(),0!=c++&&(Zh(b,"Cannot suppress a null exception."),Th(b!=this,"Exception can not suppress itself."),this.g||(null==this.j?this.j=S(ul(qh),h,14,0,[b]):this.j[this.j.length]=b))}x(72,10,La,jl);B(72);
+function ll(a){jl.call(this,a)}x(164,72,La,ll);B(164);function vl(a,b){var c;c=a.slice(0,b);S(Qd(a),a.cM,a.__elementTypeId$,a.__elementTypeCategory$,c);return c}function wl(a,b){var c;c=xl(0,b);S(Qd(a),a.cM,a.__elementTypeId$,a.__elementTypeCategory$,c);return c}function ul(a){return D(a,1)}function we(a,b,c,d,e){d=xl(e,d);S(D(a,1),b,c,e,d);return d}function S(a,b,c,d,e){e.cZ=a;e.cM=b;e.tM=Jd;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e}
+function xl(a,b){var c=Array(b),d;switch(a){case 6:d={l:0,m:0,h:0};break;case 7:d=0;break;case 8:d=!1;break;default:return c}for(var e=0;e<b;++e)c[e]=d;return c}function yl(a,b,c,d,e,f){a===c&&(a=a.slice(b,b+e),b=0);var g=b;for(b+=e;g<b;){var m=Math.min(g+1E4,b);e=m-g;Array.prototype.splice.apply(c,[d,f?e:0].concat(a.slice(g,m)));g=m;d+=e}}function Ph(a){return y(a,73)&&fe(a.b)!==fe((sh(),th))?fe(a.b)===fe(th)?null:a.b:a}
+function Oh(a){var b;if(y(a,14))return a;b=a&&a.__gwt$exception;if(!b&&(b=new uh(a),oh(),a&&typeof a==ba))try{a.__gwt$exception=b}catch(c){}return b}function zl(a){return Al(a.l,a.m,a.h)}function Al(a,b,c){return{l:a,m:b,h:c}}
+function Bl(a,b){var c,d,e,f,g,m,n,p;if(0==b.l&&0==b.m&&0==b.h)throw new Cl;if(0==a.l&&0==a.m&&0==a.h)return Dl=Al(0,0,0),Al(0,0,0);if(b.h==Oa&&0==b.m&&0==b.l)return p=a,p.h==Oa&&0==p.m&&0==p.l?(Dl=Al(0,0,0),p=zl((El(),Fl))):(Dl=Al(p.l,p.m,p.h),p=Al(0,0,0)),p;p=!1;0!=b.h>>19&&(b=Gl(b),p=!0);m=b.l;0!=(m&m-1)?n=-1:(g=b.m,0!=(g&g-1)?n=-1:(f=b.h,n=0!=(f&f-1)||0==f&&0==g&&0==m?-1:0==f&&0==g&&0!=m?Hl(m):0==f&&0!=g&&0==m?Hl(g)+22:0!=f&&0==g&&0==m?Hl(f)+44:-1));f=g=m=!1;if(a.h==Oa&&0==a.m&&0==a.l)if(m=g=
+!0,-1==n)a=zl((El(),Il)),f=!0,p=!p;else return f=Jl(a,n),p&&Kl(f),Dl=Al(0,0,0),f;else 0!=a.h>>19&&(m=!0,a=Gl(a),f=!0,p=!p);if(-1!=n){f=a;g=n;n=Jl(f,g);p&&Kl(n);var q;22>=g?(p=f.l&(1<<g)-1,q=f=0):44>=g?(p=f.l,q=f.m&(1<<g-22)-1,f=0):(p=f.l,q=f.m,f=f.h&(1<<g-44)-1);f=Al(p,q,f);m?Dl=Gl(f):Dl=Al(f.l,f.m,f.h);return n}if(!Ll(a,b))return m?Dl=Gl(a):Dl=Al(a.l,a.m,a.h),Al(0,0,0);f=f?a:Al(a.l,a.m,a.h);var r;q=Ml(b)-Ml(f);d=q&63;22>d?(c=b.l<<d,n=b.m<<d|b.l>>22-d,e=b.h<<d|b.m>>22-d):44>d?(c=0,n=b.l<<d-22,e=b.m<<
+d-22|b.l>>44-d):(n=c=0,e=b.l<<d-44);c&=Ma;d=n&Ma;e&=Na;for(n=Al(0,0,0);0<=q;){r=f;var s=void 0,z=void 0,L=void 0,L=r.h-e;0>L?r=!1:(s=r.l-c,z=r.m-d+(s>>22),L+=z>>22,0>L?r=!1:(r.l=s&Ma,r.m=z&Ma,r.h=L&Na,r=!0));if(r&&(22>q?n.l|=1<<q:44>q?n.m|=1<<q-22:n.h|=1<<q-44,0==f.l&&0==f.m&&0==f.h))break;r=d;d=e;e=d>>>1;d=r>>>1|(d&1)<<21;c=c>>>1|(r&1)<<21;--q}p&&Kl(n);m?(Dl=Gl(f),g&&(p=Dl,f=(El(),Fl),m=p.l-f.l,g=p.m-f.m+(m>>22),Dl={l:m&Ma,m:g&Ma,h:p.h-f.h+(g>>22)&Na})):Dl=Al(f.l,f.m,f.h);return n}
+function Kl(a){var b,c,d;b=~a.l+1&Ma;c=~a.m+(0==b?1:0)&Ma;d=~a.h+(0==b&&0==c?1:0)&Na;a.l=b;a.m=c;a.h=d}function Ml(a){var b;b=Nl(a.h);return 32==b?(b=Nl(a.m),32==b?Nl(a.l)+32:b+20-10):b-12}var Dl;function Ol(a,b){return a.l==b.l&&a.m==b.m&&a.h==b.h}function Pl(a){var b,c,d;if(isNaN(a))return El(),Ql;if(a<Ra)return El(),Rl;if(9223372036854775E3<=a)return El(),Il;d=!1;0>a&&(d=!0,a=-a);c=0;a>=Qa&&(c=A(a/Qa),a-=c*Qa);b=0;a>=Pa&&(b=A(a/Pa),a-=b*Pa);a=A(a);b=Al(a,b,c);d&&Kl(b);return b}
+function Sl(a){var b;return-129<a&&128>a?(b=a+128,null==Tl&&(Tl=we(Ul,h,653,256,0)),a=Tl[b]=Al(a&Ma,a>>22&Ma,0>a?Na:0)):Al(a&Ma,a>>22&Ma,0>a?Na:0)}function Vl(a,b){var c,d;c=a.h>>19;d=b.h>>19;return 0==c?0!=d||a.h>b.h||a.h==b.h&&a.m>b.m||a.h==b.h&&a.m==b.m&&a.l>b.l:!(0==d||a.h<b.h||a.h==b.h&&a.m<b.m||a.h==b.h&&a.m==b.m&&a.l<=b.l)}
+function Ll(a,b){var c,d;c=a.h>>19;d=b.h>>19;return 0==c?0!=d||a.h>b.h||a.h==b.h&&a.m>b.m||a.h==b.h&&a.m==b.m&&a.l>=b.l:!(0==d||a.h<b.h||a.h==b.h&&a.m<b.m||a.h==b.h&&a.m==b.m&&a.l<b.l)}function Gl(a){var b,c;b=~a.l+1&Ma;c=~a.m+(0==b?1:0)&Ma;return Al(b,c,~a.h+(0==b&&0==c?1:0)&Na)}
+function Jl(a,b){var c,d,e;b&=63;c=a.h;(d=0!=(c&Oa))&&(c|=-1048576);22>b?(e=c>>b,d=a.m>>b|c<<22-b,c=a.l>>b|a.m<<22-b):44>b?(e=d?Na:0,d=c>>b-22,c=a.m>>b-22|c<<44-b):(e=d?Na:0,d=d?Ma:0,c>>=b-44);return{l:c&Ma,m:d&Ma,h:e&Na}}function Wl(a){Ol(a,(El(),Rl))?a=Ra:Ll(a,Ql)?a=a.l+a.m*Pa+a.h*Qa:(a=Gl(a),a=-(a.l+a.m*Pa+a.h*Qa));return a}
+function Xl(a){var b,c,d;if(0==a.l&&0==a.m&&0==a.h)return"0";if(a.h==Oa&&0==a.m&&0==a.l)return"-9223372036854775808";if(0!=a.h>>19)return"-"+Xl(Gl(a));for(c="";0!=a.l||0!=a.m||0!=a.h;){b=Sl(1E9);a=Bl(a,b);b=""+(Dl.l|Dl.m<<22);if(0!=a.l||0!=a.m||0!=a.h)for(d=9-b.length;0<d;d--)b="0"+b;c=b+c}return c}var Tl;function El(){El=w;Il=Al(Ma,Ma,524287);Rl=Al(0,0,Oa);Fl=Sl(1);Sl(2);Ql=Sl(0)}var Il,Rl,Fl,Ql;function Yl(){Yl=w}x(202,1,{},function(){});B(202);
+function Zl(){this.a=this.Ib();this.b=this.Jb();this.c=this.Kb();this.d=this.Lb();this.e=this.Mb();this.f=this.Nb();this.Ob();this.g=this.Ob()}x(131,1,{});_.a=!1;_.b=!1;_.c=!1;_.d=!1;_.e=!1;_.f=!1;_.g=!1;B(131);function Ed(){Zl.call(this)}x(383,131,{},Ed);_.Ib=$l;_.Jb=$l;_.Kb=$l;_.Lb=am;_.Mb=$l;_.Nb=$l;_.Ob=$l;_.tS=bm;B(383);function Dd(){Zl.call(this)}x(385,131,{},Dd);_.Ib=$l;_.Jb=$l;_.Kb=$l;_.Lb=$l;_.Mb=am;_.Nb=$l;_.Ob=$l;_.tS=bm;B(385);function Cd(){Zl.call(this)}x(384,131,{},Cd);_.Ib=$l;
+_.Jb=$l;_.Kb=$l;_.Lb=$l;_.Mb=$l;_.Nb=$l;_.Ob=am;_.tS=bm;B(384);function cm(a,b){a.f=b;a.Pb();return dm(),dm(),em}function fm(a,b){var c;c=a.f;c=null!=c?0!=(Qd(c).e&4)?c:S(ul(F),h,1,3,[c]):we(F,h,1,0,3);c=c.length>b?c[b]:null;return null!=c?c:null}function gm(a,b){a.f=b;return a}function hm(){this.f=we(F,h,1,0,3)}x(6,1,Wa);_.Pb=function(){throw new rh("You have to override the adequate method to handle this action, or you have to override 'public void f()' to avoid this error");};
+_.Qb=function(a){(a=(this.g=this.g=a)?im(a):null)?(this.j=!0,this.g=(W(),a._),this.j?(this.j=!1,this.Pb()):this.Qb(a._)):this.Pb()};_.Rb=function(a){return cm(this,a)};_.Sb=function(a){return this.Rb(a)};_.Tb=function(a){gm(this,a)};_.g=null;_.i=null;_.j=!1;var jm=B(6),km;function lm(){lm=w;mm=$doc.body;nm=Bd();om=new pm;qm=$doc;rm();sm=(tm(),um);vm=/<([\w:-]+)/;wm();xm=(vh(),wh)}function ym(a){a.c=we(Xd,h,0,0,2);a.d=[]}
+function X(a){var b;lm();var c,d;if(null!=a){if(Ld(a))return zm(a,qm);if(y(a,19))return a;if(y(a,6))return new Am(a.g);if(y(a,70))return new Am(a.Vb());if(y(a,25)){a=new Bm(S(D(F,1),h,1,3,[a]));b=Cm(null);for(c=new kl(a);c.b<c.d.Oc();)a=(N(c.b<c.d.Oc()),c.d.Me(c.c=c.b++)),ee(a)?Dm(b,a):y(a,25)&&Dm(b,Em(a.mc()));return new Fm(b)}if(ee(a)){if(Gm(a))return b=new Hm(a),cm(b,b.f),new Fm(Cm(null));if(!Im(a,ea)&&!Jm(a)&&Km(a)){b=a;a=Cm(null);for(c=0;c<b.length;c++)(d=null!=b[c]?Object(b[c]):null)&&Dm(a,
+d);return new Fm(a)}if(b=Object.prototype.toString.call(a),"[object HTMLCollection]"==b||"[object NodeList]"==b||typeof a==ba&&a.length&&a[0]&&a[0].tagName?!0:!1)return new Lm(a);Im(a,"currentTarget")&&(a=(O(),P).ob(a));return new Am(a)}b=Mm(S(D(F,1),h,1,3,["Error: GQuery.$(Object o) could not wrap the type : ",Pd(Qd(a)),a]));$wnd.console.log.apply($wnd.console,b)}return new Fm(Cm(null))}
+function zm(a,b){var c;c=null;if(null==a||0==(c=Ae(a)).length)c=new Fm(Cm(null));else if(oe(ye(c,0,1),"\x3c")){c=b&&Jm(b)?9==b.nodeType?b:b.ownerDocument:null;var d,e,f,g;if(d=vm.exec(a)){d=d[1];Nm||(e=new Om(1,"\x3ctable\x3e","\x3c/table\x3e"),f=new Om(1,'\x3cselect multiple\x3d"multiple"\x3e',"\x3c/select\x3e"),g=new Om(3,"\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"),Nm={},Pm(Nm,ra,f),Pm(Nm,"optgroup",f),f=new Om(1,"\x3cfieldset\x3e","\x3c/fieldset\x3e"),Pm(Nm,
+"legend",f),Pm(Nm,"thead",e),Pm(Nm,"tbody",e),Pm(Nm,"tfoot",e),Pm(Nm,"colgroup",e),Pm(Nm,"caption",e),e=new Om(2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"),Pm(Nm,"tr",e),Pm(Nm,"td",g),Pm(Nm,"th",g),g=new Om(2,"\x3ctable\x3e\x3ctbody\x3e\x3c/tbody\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"),Pm(Nm,"col",g),g=new Om(1,"\x3cmap\x3e","\x3c/map\x3e"),Pm(Nm,"area",g));d=d.toLowerCase();d=Qm(Nm,d);!d&&(d=(Rm(),Sm));c=(O(),c).createElement("div");g=d.b+Ae(a)+d.a;c.innerHTML=g||
+"";for(d=d.c;0!=d--;)c=c.lastChild;c=X(c.childNodes);var m;g=c.c;e=0;for(f=g.length;e<f;++e)d=g[e],(m=im(d))?Tm(m):ki(d)}else c=X(c.createTextNode(a))}else c=new Um,d=Vm((!Wm&&(Wm=new Xm),Wm),a,b?b:qm),c.b=a,c.a=b?b:qm,c=Ym(c,d);return c}function Zm(a,b){var c;if(b==$m)return a;if(an&&(c=bn(an,Zd(b))))return c.bc(a);throw new rh((ge(b),"No plugin registered for class "+b.k));}
+function cn(a){var b,c,d,e;e=Cm(null);a=a.c;c=0;for(d=a.length;c<d;++c){b=a[c];b=ti((O(),b));for(var f=e;b;)b&&dn(f,S(ul(Xd),h,0,2,[b])),b=Bi((O(),b))}return new Fm(en(e))}function fn(a,b){return gn(cn(a),b)}
+function gn(a,b){var c,d;d="";for(c=0;c<b.length;c++)d+=0<c?", "+b[c]:b[c];c=d;d=(!Wm&&(Wm=new Xm),Wm);var e=a.d,f=d.a,g,m,n,p,q,r,s,z;z=Cm(null);if(c.length){n=null;s=new hl;m=new hl;p=0;for(q=e.length;p<q;p++)g=e[p],g==(lm(),xm)||g==qm||null==g.nodeName||pe(lb,g.nodeName)||(il(m,g),f?(r=hi((O(),g)))?s.a.Be(r)||il(s,r):(n||(n=Ii(),il(s,n)),r=n,r.appendChild(g)):0==s.a.Oc()&&il(s,qm));for(e=hn(new jn(s.a));e.a.Dc();)for(g=kn(e),q=Vm(d,c,g),f=0,p=q.length;f<p;f++)g=q[f],null!=m.a.Ge(g)&&dn(z,S(D(Xd,
+1),h,0,2,[g]));n&&(n.innerHTML="")}return ln(a,z,c)}function mn(a,b){var c,d,e,f,g,m,n,p,q,r,s;c=Cm(null);r=0;for(s=b.length;r<s;++r)for(q=b[r],m=a.c,n=0,p=m.length;n<p;++n)for(d=m[n],e=zm(q,d).c,f=0,g=e.length;f<g;++f)d=e[f],dn(c,S(D(Xd,1),h,0,2,[d]));return ln(a,en(c),b[0])}function nn(a,b){var c;c=a.c.length;return 0<=b&&b<c?a.c[b]:0>b&&0<=c+b?a.c[c+b]:null}function ln(a,b,c){b=new Fm(b);b.b=c;b.a=a.a;return b}
+function on(a,b,c){var d;pn||(qn={},pn={});b=b==xm||null==b.nodeName?qn:b;d=Zd(b);if(null!=c){if(pn[I(d)]){delete Qm(pn,I(d))[c];a:{c=Qm(pn,I(d));for(k in c)if(c.hasOwnProperty(k)){c=!1;break a}c=!0}c&&on(a,b,null)}}else a=I(d),delete pn[a]}function Ym(a,b){var c,d;if(b){c=a.d;var e,f,g;e=rn(c);f=0;for(g=e.length;f<g;++f)d=e[f],delete c[d];d=b.length;a.c=we(Xd,h,0,d,2);for(c=0;c<d;c++)a.c[c]=b[c],dn(a.d,S(D(Xd,1),h,0,2,[b[c]]))}return a}
+function sn(a,b,c){var d,e;e=Cm(null);d=a.c.length;for((-1==c||c>d)&&(c=d);b<c;b++)Dm(e,nn(a,b));return new Fm(e)}
+function tn(a){var b,c,d,e,f;f="";b=a.c;c=0;for(d=b.length;c<d;++c)if(a=b[c],xm!=a){try{e=a&&"HTML"!==(a&&Jm(a)?9==a.nodeType?a:a.ownerDocument:null).documentElement.nodeName?(new XMLSerializer).serializeToString(a):(O(),P).Ab(a)}catch(g){if(g=Oh(g),y(g,15))e=g,e="\x3c "+(a?a.nodeName:ya)+"(gquery, error getting the element string representation: "+e.fb()+")/\x3e";else throw Ph(g);}f+=""+e}return f}
+function un(a,b){var c=S(D(F,1),h,1,3,[]),d=Zm(a,sm),e=S(ul(jm),h,6,0,[]),f,g,m,n,p,q;q=new G;f=ve(b,"[\\s,]+",0);m=0;for(g=f.length;m<g;++m)n=f[m],p=ve(n,"\\.",2),n=p[0],p=1<p.length?p[1]:null,Ne(q,new vn(p,n));for(m=new kl(q);m.b<m.d.Oc();)g=(N(m.b<m.d.Oc()),m.d.Me(m.c=m.b++)),f=(lm(),qm),q=g.a,(f=(O(),P).kb(f,q))&&Pm(f,"namespace",g.b),"submit"===g.a?(g=new wn(e),xn(d,f,c,S(ul(jm),h,6,0,[g]))):xn(d,f,c,e)}function Um(){ym(this)}function Am(a){Lm.call(this,Cm(a))}
+function Lm(a){ym(this);Ym(this,a)}function yn(a){lm();ym(this);this.c=a.c;this.d=a.d;this.b=a.b;this.a=a.a}function Fm(a){Lm.call(this,a)}function zn(a,b,c){lm();pn||(qn={},pn={});if((a=a==xm||null==a.nodeName?qn:a)&&null!=b){a=Zd(a);if(null==c)return pn[I(a)]?An(Qm(pn,I(a)),b,null):null;pn[I(a)]||Pm(pn,I(a),{});Pm(Qm(pn,I(a)),b,c)}return c}
+function im(a){lm();var b;try{b=(W(),Bn(a));if(!b)return null;if(y(b,18))return b;if(y(b,138)&&Cn(b.a)&&y(Cn(b.a),18))return Cn(b.a)}catch(c){if(c=Oh(c),y(c,15)){a=c;for(var d;a;a=a.e){if(null==a.i){b=a;oh();d=we(Dn,h,807,0,0);a:for(var e=void 0,f=void 0,f=En(d.length,5),e=0;e<f;e++)if(null.pf()){d=(d.length>=e+1&&d.splice(0,e+1),d);break a}b.i=d}d=a.i;b=0;for(d=d.length;b<d;++b);}}else throw Ph(c);}return null}function Fn(a,b){lm();!an&&(an={});Gn(an,a,b);return a}x(19,1,Ya,Um,Am,Lm,Fm);
+_.Ub=function(a,b){var c=Zm(this,(Hn(),In));return Jn(c,a,b)};_.tS=function(){return tn(this)};var sm,mm,nm,om,pn=null,qm,Wm,an,Kn,vm,xm,qn=null,Nm,$m=B(19);function Rm(){Rm=w;Sm=new Om(0,"","")}function Om(a,b,c){Rm();this.c=a;this.a=c;this.b=b}x(54,1,{},Om);_.c=0;var Sm;B(54);x(614,1,{});_.Wb=Ln;B(614);var Mn=ne();function Nn(a,b,c){var d;for(d=0;d<b.length;d++){var e=b,f=d,g;g=Qm(a,I(d));var m=c;g=(!km&&(km=new On),Pn(Qn(m),g));e[f]=g}return b}
+function Pn(a,b){if(null!=b&&Ld(b)){var c=Pn,d;try{try{d=JSON.parse(b)}catch(e){throw new H("Error parsing JSON: "+e+"\n"+b);}}catch(f){if(f=Oh(f),y(f,15))d={};else throw Ph(f);}return c(a,d)}null!=b&&(a.a=b);return a}x(69,1,$a);_.Vb=Rn;_.tS=function(){return $wnd.JSON.stringify(this.a)};B(69);function Sn(){this.a={}}x(576,69,$a,Sn);B(576);
+function Qn(a){if(a==Mn)return new Sn;if(a==Tn)return new Un;if(a==Vn)return new Wn;if(a==Xn)return new Yn;if(a==Zn)return new $n;if(a==ao)return new bo;if(a==co)return new eo;fo((lm(),om),"GQ.create: not registered class :"+a);return null}function On(){}x(105,1,{},On);B(105);function fo(a,b){a.a.Xb(Mm(S(D(F,1),h,1,3,[b])))}function Mm(a){var b,c,d,e;e=[];c=0;for(d=a.length;c<d;++c)b=a[c],dn(e,S(D(F,1),h,1,3,[b]));return e}function pm(){this.a=(lm(),nm).b?new go:nm.c?new ho:new io}x(386,1,{},pm);
+B(386);function io(){}x(387,1,{},io);_.Xb=function(a){$wnd.console.error.apply($wnd.console,a)};_.Yb=function(a){$wnd.console.info.apply($wnd.console,a)};B(387);function ho(){this.Zb()}x(176,387,{},ho);_.Xb=function(a){this.a&&$wnd.console.error.apply($wnd.console,a)};_.Yb=function(a){this.a&&$wnd.console.info.apply($wnd.console,a)};
+_.Zb=function(){try{["log","info","warn",ab,"dir","clear","profile","profileEnd"].forEach(function(a){$wnd.console[a]=this.call($wnd.console[a],$wnd.console)},Function.prototype.bind),this.a=!0}catch(a){}};_.a=!1;B(176);function go(){this.Zb()}x(388,176,{},go);_.Zb=function(){try{Function.prototype.call.call($wnd.console.log,$wnd.console,Array.prototype.slice.call(arguments)),this.a=!0}catch(a){}};B(388);
+function jo(){jo=w;ko=/^(fillOpacity|fontWeight|lineHeight|opacity|orphans|widows|zIndex|zoom)$/i;lo=/^(client|offset|)(width|height)$/i}
+function mo(a,b,c){var d;if(Im(b,ea)){if(u===c)return a=no(a,b),(a.compatMode===Ea?a.documentElement:a.body).clientWidth|0;if(t===c)return a=no(a,b),(a.compatMode===Ea?a.documentElement:a.body).clientHeight|0;b=(lm(),mm)}if(!(lo.test(c)||null==vi(b,c)||b.style&&null!=Vi(b.style,c)))return parseFloat(b[c])||0;d=oo(a,b,c,!0);if(pe("thick",d))return 5;if(pe("medium",d))return 3;if(pe("thin",d))return 1;re(d,"^[\\d\\.]+.*$")||(d=oo(a,b,c,!1));d=se(Ae(d),bb,"");return d.length?po(d):0}
+function oo(a,b,c,d){var e;if(!b)return"";c=qo(c);e=Vi(b.style,c);if(d){d=null;if(pe(lb,b.nodeName)?0:!ii((b&&Jm(b)?9==b.nodeType?b:b.ownerDocument:null).body,b)){var f=X(b),g,m,n,p;d=Cm(null);f=f.c;m=0;for(n=f.length;m<n;++m)for(g=f[m],p=0,g=g.parentNode;g&&g!=qm;)dn(d,S(ul(Xd),h,0,2,[g])),g=g.parentNode,++p;d=new Fm(en(d));d=X(nn(d,d.c.length-1));d=nn(d,0);!d&&(d=b);$doc.body.appendChild(d)}if(lo.test(c)){var f=c,q;bn((ro(),so),Yd(hb)).Wb(b,0)?a=to(a,b,f):(e=oo(a,b,l,!1),q=oo(a,b,Aa,!1),c=oo(a,
+b,ib,!1),uo(b,l,"block"),uo(b,Aa,Ba),uo(b,ib,jb),a=to(a,b,f),uo(b,l,e),uo(b,Aa,q),uo(b,ib,c));e=a+v}else if(pe("opacity",c))E(),b=b.style,b=(O(),b).opacity,e=""+(b?vo(b):1);else{a=c.replace(/([A-Z])/g,"-$1").toLowerCase();try{e=(q=$doc.defaultView.getComputedStyle(b,null))&&q.getPropertyValue?q.getPropertyValue(a):null}catch(r){e=null}}d&&ki(d)}return null==e?"":e}
+function wo(a,b){0==(b.clientHeight|0)&&0==(b.clientWidth|0)&&oe("inline",oo(a,b,l,!0))&&(uo(b,l,"inline-block"),uo(b,u,"auto"),uo(b,t,"auto"))}function qo(a){return pe("float",a)?"cssFloat":pe("for",a)?"htmlFor":xo(a)}function no(a,b){var c=b.contentDocument||b.document||b.contentWindow.document;!c.body&&a.$b(c);return c}
+function to(a,b,c){var d;d=0;u===c?d=(wo(a,b),A((b.clientWidth|0)-vo(oo(a,b,"paddingLeft",!0))-vo(oo(a,b,cb,!0)))):t===c?d=(wo(a,b),A((b.clientHeight|0)-vo(oo(a,b,"paddingTop",!0))-vo(oo(a,b,db,!0)))):eb===c?d=b.clientWidth|0:fb===c?d=b.clientHeight|0:"offsetWidth"===c?d=(b.offsetWidth||0)|0:gb===c&&(d=(b.offsetHeight||0)|0);return d}function vo(a){return(a=se(Ae(a),bb,""))?po(a):0}
+function uo(a,b,c){a&&null!=b&&(b=qo(b),re(b,"^[A-Z]+$")&&(b=b.toLowerCase()),b=xo(b),null==c||0==Ae(c).length?a.style[b]="":(re(c,"-?[\\d\\.]+")&&!ko.test(b)&&(c+=v),a.style[b]=c))}function yo(){jo()}x(482,1,{},yo);_.$b=function(a){a.open();a.write("\x3chead/\x3e\x3cbody/\x3e");a.close()};var ko,lo,zo=B(482);
+function ro(){ro=w;Ao=0>$doc.location.href.indexOf("_force_no_native")&&typeof $doc.querySelectorAll==kb;so={};Gn(so,hb,new Bo);Gn(so,jb,new Co);Gn(so,"selected",new Do);Gn(so,"input",new Eo);Gn(so,"header",new Fo)}
+function Vm(a,b,c){var d,e,f,g,m,n,p;if(a.d.test(b))for(;g=a.d.exec(b);)b=g[1]+":"+g[3],g[3]===g[2]||(b+=":"+g[2]),b+=g[4];if(a.b.test(b)){g=Cm(null);b=ve(Ae(b),"\\s*,\\s*",0);n=0;for(p=b.length;n<p;++n){m=b[n];if(d=a.b.exec(m))if(m=d[1].length?d[1]:"*",f=d[2],d=bn(so,Yd(f.toLowerCase()))){e=Vm(a,m,c);var q=void 0,r=f=m=void 0,s=void 0,s=Cm(null);m=0;r=e.length;for(f=0;m<r;m++)if(q=e[m],d.Wb(q,m)){var z=f++;Pm(s,I(z),q)}e=s}else a.d.test(f)?e=Vm(a,m,c):e=Vm(a,m+"[type\x3d"+f+"]",c);else e=Vm(a,m,
+c);z=g;d=e;var L=void 0;f=q=s=m=r=r=void 0;f=z?z:Cm(null);m={};for(r=0;z&&r<z.length;r++)L=z[r],Pm(m,I(Zd(L)),I(1));r=0;q=d.length;for(s=f.length;r<q;r++)L=d[r],m[I(Zd(L))]||(z=d[r],L=s++,Pm(f,I(L),z))}return g}return a.c._b(b,c)}
+function Xm(){ro();this.b=RegExp("(.*):((visible|hidden|selected|input|header)|((button|checkbox|file|hidden|image|password|radio|reset|submit|text)\\s*(,|$)))(.*)","i");this.d=/(.*):([\w]+):(disabled|checked|enabled|empty|focus)\s*([:,].*|$)/i;this.c=wd();Pd(this.c.cZ);Go=new yo;ge(zo)}function Ho(a,b){ro();return b.querySelectorAll(a)}x(102,1,{},Xm);_._b=function(a,b){return Vm(this,a,b)};_.a=!0;var so,Ao=!1,Go;B(102);function Bo(){}x(490,614,{},Bo);
+_.Wb=function(a){return 0<((a.offsetWidth||0)|0)+((a.offsetHeight||0)|0)&&!pe(mb,oo((ro(),Go),a,l,!0))};B(490);function Co(){}x(491,614,{},Co);_.Wb=function(a,b){return!bn((ro(),so),Yd(hb)).Wb(a,b)};B(491);function Do(){}x(492,614,{},Do);_.Wb=function(a){return!!a.selected};B(492);function Eo(){}x(493,614,{},Eo);_.Wb=function(a){return re(a.nodeName.toLowerCase(),"input|select|textarea|button")};B(493);function Fo(){}x(494,614,{},Fo);_.Wb=function(a){return re(a.nodeName.toLowerCase(),"h\\d")};B(494);
+x(644,1,{});B(644);
+function Io(){Io=w;Jo=new Ko;Lo=new Mo;No=new Oo;Po=new Qo;Ro=S(D(F,1),h,1,3,["(['\\[])([^'\\]]*)([\\s\\.#])([^'\\]]*)(['\\]])",Jo,"\\[([^@\\]~\\$\\*\\^\\|\\!]+)(\x3d[^\\]]+)?\\]","[@$1$2]","\\s*,\\s*","|.//","\\s*(\\+|~|\x3e)\\s*","$1","([\\w\\-\\*])~([\\w\\-\\*])","$1/following-sibling::$2","([\\w\\-\\*])\\+([\\w\\-\\*])","$1/following-sibling::*[1]/self::$2","([\\w\\-\\*])\x3e([\\w\\-\\*])","$1/$2","\\[([^\x3d]+)\x3d([^'|\"][^\\]]*)\\]","[$1\x3d'$2']","(^|[^\\w\\-\\*])(#|\\.)([\\w\\-]+)","$1*$2$3",
+"([\\\x3e\\+\\|\\~\\,\\s])([a-zA-Z\\*]+)","$1//$2","\\s+//","//","([\\w\\-\\*]+):first-child","*[1]/self::$1","([\\w\\-\\*]+):last-child","$1[not(following-sibling::*)]","([\\w\\-\\*]+):only-child","*[last()\x3d1]/self::$1","([\\w\\-\\*]+):empty","$1[not(*) and not(normalize-space())]",":odd",":nth-child(even)",":even",":nth-child(odd)","(.+):not\\(([^\\)]*)\\)",No,"([a-zA-Z0-9\\_\\-\\*]*|\\]):nth-child\\(([^\\)]*)\\)",Po,":contains\\(([^\\)]*)\\)","[contains(string(.),'$1')]","\\[([\\w\\-]+)\\|\x3d([^\\]]+)\\]",
+"[@$1\x3d$2 or starts-with(@$1,concat($2,'-'))]","\\[([\\w\\-]+)\\*\x3d([^\\]]+)\\]","[contains(@$1,$2)]","\\[([\\w\\-]+)~\x3d([^\\]]+)\\]","[contains(concat(' ',normalize-space(@$1),' '),concat(' ',$2,' '))]","\\[([\\w\\-]+)\\^\x3d([^\\]]+)\\]","[starts-with(@$1,$2)]","\\[([\\w\\-]+)\\$\x3d([^\\]]+)\\]",Lo,"\\[([\\w\\-]+)\\!\x3d([^\\]]+)\\]","[not(@$1) or @$1!\x3d$2]","#([\\w\\-]+)","[@id\x3d'$1']","\\.([\\w\\-]+)","[contains(concat(' ',normalize-space(@class),' '),' $1 ')]","\\]\\[([^\\]]+)"," and ($1)",
+":(enabled)","[not(@disabled)]",":(checked)","[@$1\x3d'$1']",":(disabled)","[@$1]",":(first)","[1]",":(last)","[last()]","(^|\\|[\\./]*)(\\[)","$1*$2","%S%"," ","%P%",".","%H%","#","'+","'"])}function So(a){var b;b=a;for(a=0;a<Ro.length;){var c=$d(Ro[a++]),d=Ro[a++],e=void 0,f=void 0,g=e=void 0,m=void 0,m=RegExp(c);if(y(d,149))for(;m.test(b);){e=m.exec(b);f=new G;for(g=0;e&&g<e.length;g++)Ne(f,e[g]);e=d.ac(f);b=ue(b,c,e)}else b=se(b,c,$d(d))}return".//"+b}function To(){Io();Uo=this}x(198,644,{},To);
+_._b=function(a,b){var c,d;!Vo&&(Vo={});d=Qm(Vo,a);null==d&&(d=oe(ye(a,0,2),"./")||oe(ye(a,0,1),"/")?a:So(a),Pm(Vo,a,d));c=Cm(null);try{ro();for(var e,f=b&&(b.ownerDocument||b),g=(f?f:$doc).evaluate(d,b,null,0,null);e=g.iterateNext();)c.push(e);return en(c)}catch(m){m=Oh(m);if(y(m,15))return c;throw Ph(m);}};var Vo,Uo,Lo,No,Po,Jo,Ro;B(198);function Ko(){}x(586,1,nb,Ko);
+_.ac=function(a){return Vh(1,a.b.length),a.b[1]+(Vh(2,a.b.length),a.b[2])+(xe((Vh(3,a.b.length),a.b[3])," ")?"%S%":xe((Vh(3,a.b.length),a.b[3]),"#")?"%H%":"%P%")+(Vh(4,a.b.length),a.b[4])+(Vh(5,a.b.length),a.b[5])};B(586);function Mo(){}x(587,1,nb,Mo);_.ac=function(a){Vh(1,a.b.length);var b="[substring(@"+a.b[1]+",string-length(@"+(Vh(1,a.b.length),a.b[1])+")-",c=se((Vh(2,a.b.length),a.b[2]),"'","");return b+(c.length-1)+")\x3d"+(Vh(2,a.b.length),a.b[2])+"]"};B(587);function Oo(){}x(588,1,nb,Oo);
+_.ac=function(a){return Vh(1,a.b.length),a.b[1]+"[not("+se(So((Io(),!Uo&&(Uo=new To),Vh(2,a.b.length),a.b[2])),"^[^\\[]+\\[([^\\]]*)\\].*$","$1)]")};B(588);function Qo(){}x(589,1,nb,Qo);
+_.ac=function(a){var b,c,d,e;d=(Vh(1,a.b.length),a.b[1]);e=(Vh(2,a.b.length),a.b[2]);c=(b="]"===d)?d:"*";a=b||null==d||0==d.length;if("n"===e)return d;if("even"===e)return c+"[position() mod 2\x3d0 and position()\x3e\x3d0]"+(a?"":"/self::"+d);if("odd"===e)return(b?c:a?"":d)+"[(count(preceding-sibling::*) + 1) mod 2\x3d1]";if(-1==e.indexOf("n"))return c+"[position() \x3d "+e+"]"+(a?"":"/self::"+d);e=ve(se(e,"^([0-9]*)n.*?([0-9]*)?$","$1+$2"),"\\+",0);b=e[0];e=1<e.length?e[1]:"0";return c+"[(position()-"+
+e+") mod "+b+"\x3d0 and position()\x3e\x3d"+e+"]"+(a?"":"/self::"+d)};B(589);x(590,1,{},function(){});B(590);function xd(){if(!Wo){a:{switch(fd){case 8:case 9:Wo=new Xo;break a}Wo=new To}Pd(Wo.cZ)}}x(571,644,{},xd);
+_._b=function(a,b){var c,d;-1!=a.indexOf("!\x3d")&&(!Yo&&(Yo={}),d=Qm(Yo,a),null==d&&(d=se(a,"(\\[\\w+)!(\x3d[^\\]]+\\])",":not($1$2)"),Pm(Yo,a,d)),a=d);if((ro(),!Ao)||re(a,Zo))return Wo._b(a,b);try{return Ho(a,b)}catch(e){e=Oh(e);if(y(e,15))return c=e,d=(lm(),om),c="ERROR SelectorEngineNative "+c.fb()+" "+a+", falling back to "+se(Pd(Wo.cZ),".*\\.",""),d.a.Yb(Mm(S(ul(F),h,1,3,[c]))),Wo._b(a,b);throw Ph(e);}};var Zo="(^[\\./]/.*)|(.*(:contains|:first([^-]|$)|:last([^-]|$)|:even|:odd)).*",Yo,Wo;B(571);
+function Ad(){}x(572,644,{},Ad);_._b=function(a,b){var c;try{return Ho(a,b)}catch(d){d=Oh(d);if(y(d,15))return c=d,fo((lm(),om),"GwtQuery: Selector '"+a+"' is unsupported in this SelectorEngineNativeMin engine. Do not use this syntax or configure your module to use a JS fallback. "+c.fb()),null;throw Ph(d);}};B(572);function yd(){}x(573,644,{},yd);
+_._b=function(a,b){var c;try{return Ho(a,b)}catch(d){d=Oh(d);if(y(d,15))return c=d,fo((lm(),om),"GwtQuery: Selector '"+a+"' is unsupported in this SelectorEngineNativeMinIE8 engine, check that you are in 'standards mode' or configure your module to use JS fallback. "+c.fb()),null;throw Ph(d);}};B(573);function Xo(){$o()}
+function $o(){(function(){function a(a,b){for(var c=[],d="",f,g=b.nodeType?[b]:b;f=r.match.PSEUDO.exec(a);)d+=f[0],a=a.replace(r.match.PSEUDO,"");a=r.relative[a]?a+"*":a;f=0;for(var m=g.length;f<m;f++)e(a,g[f],c);return e.filter(d,c)}function b(a,b){if(!a.sourceIndex||!b.sourceIndex)return a==b&&(q=!0),a.sourceIndex?-1:1;var c=a.sourceIndex-b.sourceIndex;0===c&&(q=!0);return c}function c(a,b){a=Array.prototype.slice.call(a,0);return b?(b.push.apply(b,a),b):a}function d(a,b){return"\\"+(b-0+1)}function e(b,
+d,f,g){f=f||[];var n=d=d||document;if(1!==d.nodeType&&9!==d.nodeType)return[];if(!b||typeof b!==ca)return f;var q=[],pa,zd,z,L,Tx=!0,Dj=e.isXML(d),Ux=b,Zb;do if(m.exec(""),pa=m.exec(Ux))if(Ux=pa[3],q.push(pa[1]),pa[2]){L=pa[3];break}while(pa);if(1<q.length&&s.exec(b))if(2===q.length&&r.relative[q[0]])zd=a(q[0]+q[1],d);else for(zd=r.relative[q[0]]?[d]:e(q.shift(),d);q.length;)b=q.shift(),r.relative[b]&&(b+=q.shift()),zd=a(b,zd);else if(!g&&1<q.length&&9===d.nodeType&&!Dj&&r.match.ID.test(q[0])&&!r.match.ID.test(q[q.length-
+1])&&(pa=e.find(q.shift(),d,Dj),d=pa.expr?e.filter(pa.expr,pa.set)[0]:pa.set[0]),d)for(pa=g?{expr:q.pop(),set:c(g)}:e.find(q.pop(),1!==q.length||"~"!==q[0]&&"+"!==q[0]||!d.parentNode?d:d.parentNode,Dj),zd=pa.expr?e.filter(pa.expr,pa.set):pa.set,0<q.length?z=c(zd):Tx=!1;q.length;)pa=Zb=q.pop(),r.relative[Zb]?pa=q.pop():Zb="-",null==pa&&(pa=d),r.relative[Zb](z,pa,Dj);else z=[];!z&&(z=zd);!z&&e.error(Zb||b);if(p.call(z)===aa)if(Tx)if(d&&1===d.nodeType)for(b=0;null!=z[b];b++)z[b]&&(!0===z[b]||1===z[b].nodeType&&
+e.contains(d,z[b]))&&f.push(zd[b]);else for(b=0;null!=z[b];b++)z[b]&&1===z[b].nodeType&&f.push(zd[b]);else f.push.apply(f,z);else c(z,f);L&&(e(L,n,f,g),e.uniqueSort(f));return f}function f(a,b,c,d,e,f){e=0;for(var g=d.length;e<g;e++){var m=d[e];if(m){for(var m=m[a],n=!1;m;){if(m.sizcache===c){n=d[m.sizset];break}1!==m.nodeType||f||(m.sizcache=c,m.sizset=e);if(m.nodeName.toLowerCase()===b){n=m;break}m=m[a]}d[e]=n}}}function g(a,b,c,d,f,g){f=0;for(var m=d.length;f<m;f++){var n=d[f];if(n){for(var n=
+n[a],p=!1;n;){if(n.sizcache===c){p=d[n.sizset];break}if(1===n.nodeType)if(g||(n.sizcache=c,n.sizset=f),typeof b!==ca){if(n===b){p=!0;break}}else if(0<e.filter(b,[n]).length){p=n;break}n=n[a]}d[f]=p}}}var m=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,n=0,p=Object.prototype.toString,q=!1;e.uniqueSort=function(a){if(b&&(q=!1,a.sort(b),q))for(var c=1;c<a.length;c++)a[c]===a[c-1]&&a.splice(c--,1);return a};e.matches=
+function(a,b){return e(a,null,null,b)};e.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=r.order.length;e<f;e++){var g=r.order[e],m;if(m=r.leftMatch[g].exec(a)){var n=m[1];m.splice(1,1);if("\\"!==n.substr(n.length-1)&&(m[1]=(m[1]||"").replace(/\\/g,""),d=r.find[g](m,b,c),null!=d)){a=a.replace(r.match[g],"");break}}}!d&&(d=b.getElementsByTagName("*"));return{set:d,expr:a}};e.filter=function(a,b,c,d){for(var f=a,g=[],m=b,n,p,q=b&&b[0]&&e.isXML(b[0]);a&&b.length;){for(var s in r.filter)if(null!=
+(n=r.leftMatch[s].exec(a))&&n[2]){var z=r.filter[s],L,Zb;Zb=n[1];p=!1;n.splice(1,1);if("\\"!==Zb.substr(Zb.length-1)){m===g&&(g=[]);if(r.preFilter[s])if(n=r.preFilter[s](n,m,c,g,d,q),!n)p=L=!0;else if(!0===n)continue;if(n)for(var Ej=0;null!=(Zb=m[Ej]);Ej++)if(Zb){L=z(Zb,n,Ej,m);var Vx=d^!!L;c&&null!=L?Vx?p=!0:m[Ej]=!1:Vx&&(g.push(Zb),p=!0)}if(void 0!==L){!c&&(m=g);a=a.replace(r.match[s],"");if(!p)return[];break}}}if(a===f)if(null==p)e.error(a);else break;f=a}return m};e.error=function(a){throw ob+
+a;};var r=e.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},
+leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href",2)}},relative:{"+":function(a,b){var c=typeof b===ca,d=c&&!/\W/.test(b),c=c&&!d;d&&(b=b.toLowerCase());for(var d=0,f=a.length,g;d<f;d++)if(g=a[d]){for(;(g=g.previousSibling)&&1!==g.nodeType;);a[d]=c||g&&g.nodeName.toLowerCase()===b?g||!1:g===b}c&&e.filter(b,a,!0)},"\x3e":function(a,b){var c=typeof b===ca,d,f=0,g=a.length;if(c&&!/\W/.test(b))for(b=b.toLowerCase();f<g;f++){if(d=a[f])c=
+d.parentNode,a[f]=c.nodeName.toLowerCase()===b?c:!1}else{for(;f<g;f++)(d=a[f])&&(a[f]=c?d.parentNode:d.parentNode===b);c&&e.filter(b,a,!0)}},"-":function(a,b,c){var d=n++,e=g,m;typeof b!==ca||/\W/.test(b)||(m=b=b.toLowerCase(),e=f);e("parentNode",b,d,a,m,c)},"~":function(a,b,c){var d=n++,e=g,m;typeof b!==ca||/\W/.test(b)||(m=b=b.toLowerCase(),e=f);e("previousSibling",b,d,a,m,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!==Da&&!c)return(b=b.getElementById(a[1]))?b.id===a[1]||typeof b.getAttributeNode!==
+Da&&b.getAttributeNode("id").nodeValue===a[1]?[b]:void 0:[]},NAME:function(a,b){if(typeof b.getElementsByName!==Da){for(var c=[],d=b.getElementsByName(a[1]),e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return 0===c.length?null:c}},TAG:function(a,b){var c=b.getElementsByTagName(a[1]);if("*"===a[1]){for(var d=[],e=0;c[e];e++)1===c[e].nodeType&&d.push(c[e]);c=d}return c}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(/\\/g,"")+" ";if(f)return a;f=0;for(var g;null!=
+(g=b[f]);f++)g&&(e^(g.className&&0<=(" "+g.className+" ").replace(/[\t\n]/g," ").indexOf(a))?!c&&d.push(g):c&&(b[f]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a){return a[1].toLowerCase()},CHILD:function(a){if("nth"===a[1]){var b=/(-?)(\d*)n((?:\+|-)?\d*)/.exec("even"===a[2]&&"2n"||"odd"===a[2]&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}a[0]=n++;return a},ATTR:function(a,b,c,d,e,f){b=a[1].replace(/\\/g,"");!f&&r.attrMap[b]&&(a[1]=
+r.attrMap[b]);"~\x3d"===a[2]&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,b,c,d,f){if("not"===a[1])if(1<(m.exec(a[3])||"").length||/^\w/.test(a[3]))a[3]=e(a[3],null,null,b);else return a=e.filter(a[3],b,c,1^f),!c&&d.push.apply(d,a),!1;else if(r.match.POS.test(a[0])||r.match.CHILD.test(a[0]))return!0;return a},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return!1===a.disabled&&a.type!==jb},disabled:function(a){return!0===a.disabled},checked:function(a){return!0===a.checked},
+selected:function(a){return!0===a.selected},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!e(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return ia===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===
+a.type},reset:function(a){return"reset"===a.type},button:function(a){return ha===a.type||a.nodeName.toLowerCase()===ha},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return 0===b},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return 0===b%2},odd:function(a,b){return 1===b%2},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===
+b}},filter:{PSEUDO:function(a,b,c,d){var f=b[1],g=r.filters[f];if(g)return g(a,c,b,d);if("contains"===f)return 0<=(a.textContent||a.innerText||e.getText([a])||"").indexOf(b[3]);if("not"===f){b=b[3];c=0;for(d=b.length;c<d;c++)if(b[c]===a)return!1;return!0}e.error(ob+f)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case "only":case "first":for(;d=d.previousSibling;)if(1===d.nodeType)return!1;if("first"===c)return!0;d=a;case "last":for(;d=d.nextSibling;)if(1===d.nodeType)return!1;return!0;case "nth":var c=
+b[2],e=b[3];if(1===c&&0===e)return!0;var f=b[0],g=a.parentNode;if(g&&(g.sizcache!==f||!a.nodeIndex)){for(var m=0,d=g.firstChild;d;d=d.nextSibling)1===d.nodeType&&(d.nodeIndex=++m);g.sizcache=f}d=a.nodeIndex-e;return 0===c?0===d:0===d%c&&0<=d/c}},ID:function(a,b){var c=typeof a.getAttributeNode!==Da&&a.getAttributeNode("id");return 1===a.nodeType&&c&&c.nodeValue===b},TAG:function(a,b){return"*"===b&&1===a.nodeType||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return-1<(" "+(a.className||a.getAttribute("class"))+
+" ").indexOf(b)},ATTR:function(a,b){var c=b[1],c=r.attrHandle[c]?r.attrHandle[c](a):null!=a[c]?a[c]:a.getAttribute(c),d=c+"",e=b[2],f=b[4];return null==c?"!\x3d"===e:"\x3d"===e?d===f:"*\x3d"===e?0<=d.indexOf(f):"~\x3d"===e?0<=(" "+d+" ").indexOf(f):f?"!\x3d"===e?d!==f:"^\x3d"===e?0===d.indexOf(f):"$\x3d"===e?d.substr(d.length-f.length)===f:"|\x3d"===e?d===f||d.substr(0,f.length+1)===f+"-":!1:d&&!1!==c},POS:function(a,b,c,d){var e=r.setFilters[b[2]];if(e)return e(a,c,b,d)}}},s=r.match.POS,z;for(z in r.match)r.match[z]=
+RegExp(r.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source),r.leftMatch[z]=RegExp(/(^(?:.|\r|\n)*?)/.source+r.match[z].source.replace(/\\(\d+)/g,d));try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(L){c=function(a,b){var c=b||[],d=0;if(p.call(a)===aa)Array.prototype.push.apply(c,a);else if(typeof a.length===rb)for(var e=a.length;d<e;d++)c.push(a[d]);else for(;a[d];d++)c.push(a[d]);return c}}e.getText=function(a){for(var b="",c,d=0;a[d];d++)c=a[d],3===c.nodeType||4===c.nodeType?
+b+=c.nodeValue:8!==c.nodeType&&(b+=e.getText(c.childNodes));return b};e.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)};e.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};window.IES=e;$wnd.IES=e})()}x(585,644,{},Xo);_._b=function(a,b){return $wnd.IES(a,b,[],null)};B(585);function Qm(a,b){return ap([a&&a[b]])}
+function An(a,b,c){b=Qm(a,b);if(null!=b&&c)if(y(b,12))if(a=b,c==bp)b=new cp(a.a);else if(c==dp)b=I(A(a.a));else if(c==ep){c=Pl(a.a);if(a=Vl(c,{l:4194175,m:Ma,h:Na}))a=!Ll(c,{l:128,m:0,h:0});a?(a=(c.l|c.m<<22)+128,b=(fp(),gp)[a],!b&&(b=gp[a]=new hp(c))):b=new hp(c)}else c==ip?(c=A(a.a)<<16>>16,-129<c&&128>c?(a=c+128,b=(jp(),kp)[a],!b&&(b=kp[a]=new lp(c))):b=new lp(c)):c==mp&&(c=A(a.a)<<24>>24,a=c+128,b=(np(),op)[a],!b&&(b=op[a]=new pp(c)));else c!=qp||y(b,56)?c==Wd&&!Ld(b)&&(b=(E(),""+b)):b=(dm(),
+pe(sb,(E(),""+b))?em:rp);return b}function sp(a){var b=(E(),Za);a=a[b];return Object.prototype.toString.call(a)==aa?a:null}function rn(a){var b,c=[];for(b in a)a.hasOwnProperty(b)&&b!=tb&&"$H"!=b&&c.push(String(b));b=we(Wd,h,2,c.length,4);for(a=0;a<c.length;a++)b[a]=c[a];return b}function tp(a){if(typeof a.length==rb)return a.length;var b,c=0;for(b in a)b!=tb&&c++;return c}function Pm(a,b,c){y(c,56)?a[b]=c.a:(y(c,46)&&(c=c.pe()),a[b]=c)}
+function ap(a){if(typeof a==ba&&1==a.length){a=a[0];var b=typeof a;if("boolean"==b)return dm(),a?em:rp;if(b==rb)return new Y(a)}return a||null}function bn(a,b){return Qm(a,I(b))}function Gn(a,b,c){Pm(a,I(Rd(b)),c)}function Dm(a,b){dn(a,S(D(Xd,1),h,0,2,[b]))}function Cm(a){return a?[a]:[]}function dn(a,b){var c,d,e;d=0;for(e=b.length;d<e;++d)if(c=b[d],y(c,46)){var f=I(tp(a));c=c.pe();a[f]=c}else y(c,56)?(f=I(tp(a)),a[f]=c.a):Pm(a,I(tp(a)),c);return a}
+function xo(a){return a.replace(/\-(\w)/g,function(a,c){return c.toUpperCase()})}function Im(a,b){var c=b.split("."),d;for(d in c){if(!(a&&c[d]in a))return!1;a=a[c[d]]}return!0}function Km(a){return Object.prototype.toString.call(a)==aa||typeof a.length==rb}function Jm(a){return!!a&&"nodeType"in a&&"nodeName"in a}function Gm(a){return"[object Function]"==Object.prototype.toString.call(a)}
+function up(a,b,c){var d;a:{c=dn([],c);var e=a||$wnd;b=b.split(".");for(d in b)if(a=e,e=e[b[d]],!e){d=null;break a}d=Gm(e)&&ap([e.apply(a,c)])}return d}function vp(a,b){return a?Qm(a,b):null}function wp(a){return function(b){var c=new G;for(i in arguments)b=ap([arguments[i]]),c.Le(b);c=c.ye();a.Tb(c);return a.Sb(c)}}function Hm(a){hm.call(this);this.a=null;Gm(a)&&(this.a=a)}x(86,6,Wa,Hm);_.eQ=function(a){return fe(this.a)===fe(a)};_.ib=xp;_.Pb=xp;_.hC=function(){return Zd(this.a)};B(86);
+function en(a){var b,c,d,e,f;f=[];b={};for(d=0;d<a.length;d++)c=a[d],e=Zd(c),b[I(e)]||(e=I(e),b[e]=1,f[f.length]=c);return f}function Hn(){Hn=w;lm();In=Fn(yp,new zp);ge(yp);Ap=(ge(yp),yp.k+".Queue-");Bp=Ap+"fx"}function Jn(a,b,c){var d=Bp,e,f,g,m;f=a.c;g=0;for(m=f.length;g<m;++g)e=f[g],Cp(a,e,d,new Dp(a,e,d,b,c));return a}function Cp(a,b,c,d){var e;return b?(e=(lm(),zn(b,c,null)),d&&(!e&&(e=zn(b,c,new Ep)),Fp(e,d,e.c.b,e.c),1==e.b&&Gp(a,b,c,e)),e):null}
+function Gp(a,b,c,d){var e,f;(d=0==d.b?null:(N(0!=d.b),d.a.a.c))?d.Qb(b):(Hp((e=c+".Empty",f=(lm(),zn(b,e,null)),!f&&(f=zn(b,e,new Ip(ub))),f),S(D(F,1),h,1,3,[])),on(a,b,c),on(a,b,c+".Empty"))}function Jp(a){Hn();yn.call(this,a)}x(132,19,Ya,Jp);_.Ub=function(a,b){return Jn(this,a,b)};var Bp,Ap,In,yp=B(132);function rm(){rm=w;Hn();Fn(Kp,new Lp)}function Mp(a){rm();Jp.call(this,a)}x(389,132,Ya,Mp);var Kp=B(389);function Lp(){}x(390,1,{},Lp);_.bc=function(a){return new Mp(a)};B(390);
+function tm(){tm=w;lm();um=Fn(Np,new Op)}function Pp(a,b,c){var d;if(b&&!pe(lb,(O(),b).tagName)&&!c.cancelBubble){var e=(Qp(),d=b.__gqueryevent,d?d:new Rp(b));Sp(e,c,(O(),c).type);Pp(a,hi((O(),b)),c)}}function Tp(a,b,c){var d,e,f;e=0;for(f=c.length;e<f;++e)d=c[e],d.i=b,d.g=b?(O(),P).ob(b):null,d.Qb(a)}
+function xn(a,b,c,d){var e,f,g,m;f=a.c;g=0;for(m=f.length;g<m;++g)if(e=f[g],Im(e,ea)||Jm(e)&&3!=e.nodeType&&8!=e.nodeType){for(var n=X(e),p=c,q=void 0,r=void 0,s=void 0,z=void 0,r=n.c,s=0,z=r.length;s<z;++s)q=r[s],zn(q,Xa,p);((lm(),nm).a||nm.b)&&-1==Up((O(),b).type)?Pp(a,e,b):(O(),P).mb(e,b);b.defaultPrevented||!1===b.returnValue||b.getPreventDefault&&b.getPreventDefault()||Tp(e,b,d);e=X(e);r=q=p=n=void 0;p=e.c;q=0;for(r=p.length;q<r;++q)n=p[q],on(e,n,Xa)}}function Vp(a){tm();yn.call(this,a)}
+x(152,19,Ya,Vp);var um,Np=B(152);function Op(){}x(213,1,{},Op);_.bc=function(a){return new Vp(a)};B(213);function wn(a){this.a=a;hm.call(this)}x(214,6,Wa,wn);_.Qb=function(a){a&&pe("form",(O(),a).tagName)&&a.submit();Tp(a,this.i,this.a)};B(214);function zp(){}x(393,1,{},zp);_.bc=function(a){return new Jp(a)};B(393);function Dp(a,b,c,d,e){this.e=a;hm.call(this);this.b=b;this.a=d;this.c=e;this.d=c}x(391,6,Wa,Dp);_.Pb=function(){Oe(new Wp(this),this.a)};_.a=0;B(391);function Wp(a){this.a=a}
+x(392,50,{},Wp);_.eb=function(){var a,b,c,d;b=this.a.c;c=0;for(d=b.length;c<d;++c)a=b[c],a.Qb(this.a.b);a=this.a.e;b=this.a.b;c=this.a.d;d=this.a;var e;(e=Cp(a,b,c,null))&&fe(d)===fe(0==e.b?null:(N(0!=e.b),e.a.a.c))&&(d=Cp(a,b,c,null))&&(0==d.b||(N(0!=d.b),Xp(d,d.a.a)),Gp(a,b,c,d))};B(392);function wm(){wm=w;Hn();Fn(Yp,new Zp)}function $p(a){wm();Jp.call(this,a)}x(394,132,Ya,$p);var Yp=B(394);function Zp(){}x(395,1,{},Zp);_.bc=function(a){return new $p(a)};B(395);var Tn=ne();
+function Un(){this.a={}}x(577,69,$a,Un);B(577);function aq(a,b){var c,d,e;d=0;for(e=b.length;d<e;++d)if(c=b[d],a.a||!a.f||!c||a.d&&-1!=bq(a.f,c)||Ne(a.f,c),a.b&&a.e){var f;f=a.e;f=vl(f.b,f.b.length);cq(c,f)}}function dq(a){a.f=null;a.a=!0}function Hp(a,b){var c,d;if(!a.a&&(a.a=a.c,a.b&&(a.e=new eq(new Bm(b))),a.f))for(d=new kl(a.f);d.b<d.d.Oc()&&(c=(N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++)),cq(c,b)||!a.g););}
+function cq(a,b){var c;null!=b&&1==b.length&&null!=b[0]&&0!=(Qd(b[0]).e&4)&&(b=b[0]);return y(a,6)?(c=a.Rb(b),!y(c,56)||c.a):!0}function Ip(a){this.f=new G;this.c=-1!=a.indexOf("once");this.b=-1!=a.indexOf("memory");this.d=-1!=a.indexOf("unique");this.g=-1!=a.indexOf("stopOnFalse")}x(101,1,{},Ip);_.a=!1;_.b=!1;_.c=!1;_.d=!1;_.e=null;_.g=!1;B(101);
+function fq(){this.a=new Ip("memory");this.c=new Ip(ub);this.d=new Ip(ub);aq(this.d,S(D(jm,1),h,6,0,[new gq(this)]));aq(this.c,S(D(jm,1),h,6,0,[new hq(this)]))}x(153,1,{},fq);_.tS=function(){var a="Deferred this\x3d"+Zd(this)+" promise\x3d"+(!this.b&&(this.b=new iq(this)),Zd(this.b))+" state\x3d"+this.b.a.e+" restatus\x3d",b;b=this.d;b="stack\x3d"+(b.f?I(b.f.b.length):ya)+" "+b.a;return a+b};_.b=null;_.e=wb;B(153);function gq(a){this.a=a;hm.call(this)}x(219,6,Wa,gq);
+_.Pb=function(){this.a.e="resolved";dq(this.a.d);var a=this.a.a;a.b||dq(a);a.f=null};B(219);function hq(a){this.a=a;hm.call(this)}x(220,6,Wa,hq);_.Pb=function(){this.a.e="rejected";dq(this.a.c);var a=this.a.a;a.b||dq(a);a.f=null};B(220);function iq(a){new jq(this);new kq(this);this.a=a}x(79,1,{79:1},iq);_.tS=function(){return"Promise this\x3d"+Zd(this)+" "+this.a};B(79);function jq(a){this.a=a;hm.call(this)}x(217,6,Wa,jq);_.Pb=function(){var a=this.a.a;a.e==wb&&Hp(a.d,this.f)};B(217);
+function kq(a){this.a=a;hm.call(this)}x(218,6,Wa,kq);_.Pb=function(){var a=this.a.a;a.e==wb&&Hp(a.c,this.f)};B(218);function lq(a,b,c){if(0==b){var d=a.b;d.e==wb&&Hp(d.d,c)}1==b&&(d=a.b,d.e==wb&&Hp(d.c,c));2==b&&(a=a.b,a.e==wb&&Hp(a.a,c))}function mq(a,b,c){hm.call(this);this.a=!1;this.d=c;this.c=b.length>this.d?b[this.d]:null;this.b=a;this.a=!1}x(115,6,Wa,mq);
+_.Pb=function(){var a,b;b=this.f;if(this.c)if(a=gm(this.c,b).Rb(b),y(a,79))2==this.d?(b=S(D(jm,1),h,6,0,[new nq(this)]),aq(a.a.a,b)):(b=S(D(jm,1),h,6,0,[new oq(this,a)]),aq(a.a.d,b),aq(a.a.c,b));else{var c=(dm(),em);a=y(a,56)&&a.a==c.a?b:(null!=a&&Qd(a),a);lq(this,this.d,S(D(F,1),h,1,3,[a]))}else lq(this,this.d,b)};_.a=!1;_.d=0;B(115);function nq(a){this.a=a;hm.call(this)}x(215,6,Wa,nq);_.Pb=function(){lq(this.a,2,this.f)};B(215);function oq(a,b){this.a=a;this.b=b;hm.call(this)}x(216,6,Wa,oq);
+_.Pb=function(){lq(this.a,(0==this.a.d||1==this.a.d&&this.a.a)&&"resolved"===this.b.a.e?0:1,this.f)};B(216);function Qp(){Qp=w;pq=new mh;M(pq,qq,new rq);M(pq,sq,new rq)}function Sp(a,b){var c,d;W();c=X(a.a);0==c.c.length||zn(nn(c,0),Xa,null);c=0;for(d=tp(a.b);c<d;c++)bn(a.b,c),b&&Qm(b,"namespace")}function Rp(a){this.b=[];this.a=a;a.__gwtlistener=(W(),Bn(a));a.__gqueryevent=this;a.__gwtlistener==this&&(a.__gwtlistener=null)}function Cn(a){Qp();return a.__gwtlistener}x(138,1,{138:1,20:1},Rp);
+_.cc=function(a){var b;if(!(a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault())){b=Ie();var c;if(c=oe(this.d,(O(),a).type)&&10>b-this.c)c=this.a,c=(O(),c).tagName,c=pe("body",c);c||(this.c=b,this.d=a.type,Cn(this.a)&&Cn(this.a)!=this&&Cn(this.a).cc(a),Sp(this,a))}};_.c=0;_.d="";var qq="mouseenter",sq="mouseleave",pq;B(138);function vn(a,b){this.b=a;this.a=b}x(461,1,{},vn);B(461);x(460,1,{});B(460);function rq(){new tq;new uq}x(186,460,{},rq);B(186);
+function uq(){hm.call(this)}x(462,6,Wa,uq);B(462);function tq(){hm.call(this)}x(463,6,Wa,tq);B(463);var vq=!1,wq=!1;
+function xq(){$wnd.observelite=!0;(function(a){var b=a.Object;a=a.Array;b.observe||function(a,b,e){function f(a,b,c,d){b.handlers.forEach(function(b){var e=b.observed.get(a).acceptList;(typeof d!==ca||-1===Q(e,d))&&-1<Q(e,c.type)&&b.changeRecords.push(c)})}function g(a,b,c,d){var e=s.get(c);!e&&s.set(c,e={observed:pb(),changeRecords:[]});e.observed.set(a,{acceptList:d.slice(),data:b});b.handlers.set(c,e)}function m(a,b){2>arguments.length&&(b=r.get(a));return b&&b.notifier||{notify:function(b){var c=
+r.get(a);if(c){var d={object:a},e;for(e in b)e!==ba&&(d[e]=b[e]);f(a,c,d)}},performChange:function(b,c,d){if(typeof b!==ca)throw new TypeError("Invalid non-string changeType");if(typeof c!==kb)throw new TypeError("Cannot perform non-function");var e=r.get(a),g;c=c.call(d);e&&q(e,a,b);if(e&&c&&typeof c===ba){b={object:a,type:b};for(g in c)g!==ba&&"type"!==g&&(b[g]=c[g]);f(a,e,b)}}}}function n(a,b){a.changeRecords.length&&(b(a.changeRecords),a.changeRecords=[])}function p(){r.size&&(r.forEach(q),s.forEach(n),
+Ca(p))}function q(a,b,c){if(a.handlers.size){var d,e,g,m=a.values,n=0,p,q,r,s;d=a.properties.slice();e=d.length;for(g=qb(b);n<g.length;)if(q=g[n++],p=Q(d,q),r=b[q],-1===p)f(b,a,{name:q,type:"add",object:b},c),a.properties.push(q),m.push(r);else if(s=m[p],d[p]=null,e--,s===r?0===s&&1/s!==1/r:s===s||r===r)f(b,a,{name:q,type:xb,object:b,oldValue:s},c),a.values[p]=r;for(n=d.length;e&&n--;)null!==d[n]&&(f(b,a,{name:d[n],type:yb,object:b,oldValue:m[n]},c),a.properties.splice(n,1),a.values.splice(n,1),e--)}}
+var r,s,z=["add",xb,yb,"reconfigure","setPrototype","preventExtensions"],L=b.isArray||function(a){return function(b){return a.call(b)===aa}}(a.prototype.toString),Q=b.prototype.indexOf?b.indexOf||function(a,c,e){return b.prototype.indexOf.call(a,c,e)}:function(a,b,c){for(c=c||0;c<a.length;c++)if(a[c]===b)return c;return-1},pb=typeof e.Map!==Da&&Map.prototype.forEach?function(){return new Map}:function(){var a=[],b=[];return{size:0,has:function(b){return-1<Q(a,b)},get:function(c){return b[Q(a,c)]},
+set:function(c,d){var e=Q(a,c);-1===e?(a.push(c),b.push(d),this.size++):b[e]=d},"delete":function(c){c=Q(a,c);-1<c&&(a.splice(c,1),b.splice(c,1),this.size--)},forEach:function(c,d){for(var e=0;e<a.length;e++)c.call(d,b[e],a[e],this)}}},qb=a.getOwnPropertyNames?a.getOwnPropertyNames:function(b){var d=[],e,f;if("hasOwnProperty"in b)for(e in b)b.hasOwnProperty(e)&&d.push(e);else for(e in f=a.hasOwnProperty,b)f.call(b,e)&&d.push(e);L(b)&&d.push("length");return d},Ca=e.requestAnimationFrame||e.webkitRequestAnimationFrame||
+function(){var a=+new Date;return function(b){return setTimeout(function(){b(+new Date-a)},17)}}();r=pb();s=pb();a.observe=function(b,d,e){if(!b||typeof b!==ba&&typeof b!==kb)throw new TypeError("Object.observe cannot observe non-object");if(typeof d!==kb)throw new TypeError("Object.observe cannot deliver to non-function");if(a.isFrozen&&a.isFrozen(d))throw new TypeError("Object.observe cannot deliver to a frozen function object");if(typeof e===Da)e=z;else if(!e||typeof e!==ba)throw new TypeError("Third argument to Object.observe must be an array of strings.");
+var f=r.get(b);if(f)g(b,f,d,e);else{var n,f=qb(b),q=[],s=0;for(n={handlers:pb(),properties:f,values:q,notifier:m(b,n)};s<f.length;)q[s]=b[f[s++]];r.set(b,n);g(b,n,d,e);1===r.size&&Ca(p)}return b};a.unobserve=function(a,b){if(null===a||typeof a!==ba&&typeof a!==kb)throw new TypeError("Object.unobserve cannot unobserve non-object");if(typeof b!==kb)throw new TypeError("Object.unobserve cannot deliver to non-function");var c=s.get(b),d;c&&(d=c.observed.get(a))&&(c.observed.forEach(function(a,b){q(a.data,
+b)}),Ca(function(){n(c,b)}),1===c.observed.size&&c.observed.has(a)?s[yb](b):c.observed[yb](a),1===d.data.handlers.size?r[yb](a):d.data.handlers[yb](b));return a};a.getNotifier=function(b){if(null===b||typeof b!==ba&&typeof b!==kb)throw new TypeError("Object.getNotifier cannot getNotifier non-object");return a.isFrozen&&a.isFrozen(b)?null:m(b)};a.deliverChangeRecords=function(a){if(typeof a!==kb)throw new TypeError("Object.deliverChangeRecords cannot deliver to non-function");var b=s.get(a);b&&(b.observed.forEach(function(a,
+b){q(a.data,b)}),n(b,a))}}(b,a,this);a.unobserve=b.unobserve;a.observe=b.observe}).apply($wnd,[$wnd,$doc,$wnd.console])}function yq(){yq=w;tm();zq=new mh;Aq=new mh;Bq=Fn(Cq,new Dq)}function Eq(a){yq();Vp.call(this,a)}
+function Fq(a,b){function c(b){var c,f,g=Vn,m={};Pm(m,(E(),Za),b);b=(!km&&(km=new On),Qn(g));Pn(b,m);y(a,6)?a.Rb(S(ul(F),h,1,3,[Gq(b)])):y(a,114)?(c=(Gq(b),a),c.a.setColumns(c.a.b)):y(a,126)&&(m=(c=sp(b.a),f=c?c.length:0,Nn(c,we(Zn,h,648,f,0),Zn),a),Hq(m),m.j.refresh())}return b?new $wnd.MutationObserver(c):c}
+function Iq(a,b,c){var d,e,f;f=U(Aq,a);f||(f=new G,pl(Aq,a,f));f.we(b)||(f.Le(b),e=Jm(a),d=U(zq,b),d||(d=Fq(b,e),pl(zq,b,d)),pl(zq,b,d),e?d.observe(a,c):up(vp((lm(),xm),Km(a)?"Array":"Object"),"observe",S(D(F,1),h,1,3,[a,d,c])),f.Le(b))}
+function Jq(a,b){yq();var c,d;if(c=U(Aq,a))if(null==b)for(d=c.xc();d.Dc();)c=d.Ec(),Jq(a,c);else if(c.Re(b)&&(c=U(zq,b))){Jm(a)?c.disconnect():up(vp(xm,Km(a)?"Array":"Object"),"unobserve",S(D(F,1),h,1,3,[a,c]));for(c=Kq(new Lq(Aq));c.a.Dc();)if(Mq(c).we(b))return;rl(zq,b)}}x(211,152,Ya,Eq);var Bq,zq,Aq,Cq=B(211);function Dq(){}x(212,1,{},Dq);_.bc=function(a){return new Eq(a)};B(212);var Vn=ne(),Xn=ne(),Zn=ne(),ao=ne(),co=ne();function Yn(){this.a={}}x(579,69,{78:1,70:1,647:1},Yn);B(579);
+function Gq(a){a=sp(a.a);return new Bm(Nn(a,we(Xn,h,647,a?a.length:0,0),Xn))}function Wn(){this.a={}}x(578,69,$a,Wn);B(578);function $n(){this.a={}}x(580,69,{78:1,70:1,648:1},$n);B(580);function bo(){this.a={}}x(581,69,$a,bo);B(581);function eo(){this.a={}}x(582,69,$a,eo);B(582);
+function Nq(a,b){if(a&&!a.$)if(b)if(y(b,199))b.Cc(a);else if(y(b,40))try{b.wc(a)}catch(c){if(c=Oh(c),y(c,24))a.uc(b);else throw Ph(c);}else a.uc(b);else{a:{var d,e,f;e=gi((W(),a._));for(d=$doc.body;e&&d!=e;){if(Bn(e)){b:{f=0;for(var g=void 0,m=void 0,n=void 0,p=void 0,g=void 0,m=X(e).c,n=0,p=m.length;n<p;++n)if(g=m[n],g=im(g)){if(0==f){f=g;break b}--f}f=null}if(f){b=f;break a}}e=hi((O(),e))}b=null}b?Nq(a,b):(Sk(),il(Uk,a),a.qc())}}function Oq(a){if(null==a)throw new $h("uri is null");this.a=a}
+x(108,1,{108:1},Oq);_.eQ=function(a){return y(a,108)?this.a===a.a:!1};_.hC=function(){return Yd(this.a)};B(108);function Pq(){Pq=w}function Qq(a,b){this.a=a;this.b=b}x(141,1,{141:1},Qq);_.eQ=function(a){return y(a,141)?this.a==a.a&&this.b==a.b:!1};_.hC=function(){return A(this.a)^A(this.b)};_.tS=function(){return"Point("+this.a+","+this.b+")"};_.a=0;_.b=0;B(141);function W(){W=w;Rq=sd()}function Sq(a){W();return Ji(a)}function Tq(a,b,c){W();b==Uq&&8192==Vq((O(),a).type)&&(Uq=null);c.cc(a)}
+function Wq(a){W();var b;var c=Xq,d,e,f;Yq&&c&&Zq(c.a.d,Yq)?(b=$q.a,d=$q.b,e=$q.c,f=$q.d,ar($q),$q.d=a,Rk(c,$q),c=!($q.a&&!$q.b),$q.a=b,$q.b=d,$q.c=e,$q.d=f,b=c):b=!0;!b&&a&&((O(),a).stopPropagation(),P.rb(a));return b}function br(a){W();return a.__gwt_resolve?a.__gwt_resolve():a}function cr(a,b){W();Rq.ic(a,b)}var Rq,Uq;function dr(a){return W(),Vq((O(),a).type)}function er(a){W();fr(Rq);!Yq&&(Yq=new Gk);Xq||(Xq=new nl(null,!0),$q=new gr);return bl(Xq,Yq,a)}function Up(a){return Vq((W(),a))}var Xq;
+function ar(a){a.f=!1;a.g=null;a.a=!1;a.b=!1;a.c=!0;a.d=null}function gr(){}x(280,619,{},gr);_.Cb=function(a){a.dc(this);$q.c=!1};_.Db=function(){return Yq};_.Fb=function(){ar(this)};_.a=!1;_.b=!1;_.c=!1;var Yq,$q;B(280);function hr(){hr=w;ir=od()}function jr(){hr();kr&&Nk()}function lr(){hr();var a;kr&&(a=new mr,Ok&&Rk(Ok,a));return null}var kr=!1,Ok,ir;function nr(){nr=w;or=new Gk}function mr(){nr()}x(377,619,{},mr);_.Cb=pr;_.Db=function(){return or};var or;B(377);
+function Pk(){nl.call(this,null,!1)}x(175,51,{26:1},Pk);B(175);
+function Vq(a){switch(a){case "blur":return 4096;case "change":return 1024;case Ja:return 1;case Ab:return 2;case "focus":return 2048;case Ka:return 128;case Bb:return 256;case Cb:return 512;case "load":return 32768;case "losecapture":return 8192;case Db:return 4;case "mousemove":return 64;case "mouseout":return 32;case "mouseover":return 16;case "mouseup":return 8;case Eb:return 16384;case ab:return da;case Fb:case Gb:return Hb;case "contextmenu":return 262144;case "paste":return Oa;case Ib:return Jb;
+case Kb:return Lb;case Mb:return Pa;case Nb:return Ob;case "gesturestart":return Pb;case "gesturechange":return Qb;case "gestureend":return Rb;default:return-1}}function fr(a){qr||(a.ec(),qr=!0)}function Bn(a){a=a.__listener;return!ee(a)&&y(a,20)?a:null}x(636,1,{});var qr=!1;B(636);
+function rr(){rr=w;sr={_default_:tr,dragenter:ur,dragover:ur};vr={click:wr,dblclick:wr,mousedown:wr,mouseup:wr,mousemove:wr,mouseover:wr,mouseout:wr,mousewheel:wr,keydown:xr,keyup:xr,keypress:xr,touchstart:wr,touchend:wr,touchmove:wr,touchcancel:wr,gesturestart:wr,gestureend:wr,gesturechange:wr}}function yr(){zr=He(tr);Ar=He(Br);var a=sr;Cr(a,function(b,d){a[b]=He(d)});var b=vr;Cr(b,function(a,d){b[a]=He(d)});Cr(b,function(a,b){$wnd.addEventListener(a,b,!0)})}
+function Dr(a,b){var c=sr;a.addEventListener(b,c[b]||c._default_,!1)}
+function Er(a,b){var c=(a.__eventBits||0)^b;a.__eventBits=b;c&&(c&1&&(a.onclick=b&1?zr:null),c&2&&(a.ondblclick=b&2?zr:null),c&4&&(a.onmousedown=b&4?zr:null),c&8&&(a.onmouseup=b&8?zr:null),c&16&&(a.onmouseover=b&16?zr:null),c&32&&(a.onmouseout=b&32?zr:null),c&64&&(a.onmousemove=b&64?zr:null),c&128&&(a.onkeydown=b&128?zr:null),c&256&&(a.onkeypress=b&256?zr:null),c&512&&(a.onkeyup=b&512?zr:null),c&1024&&(a.onchange=b&1024?zr:null),c&2048&&(a.onfocus=b&2048?zr:null),c&4096&&(a.onblur=b&4096?zr:null),
+c&8192&&(a.onlosecapture=b&8192?zr:null),c&16384&&(a.onscroll=b&16384?zr:null),c&32768&&(a.onload=b&32768?Ar:null),c&da&&(a.onerror=b&da?zr:null),c&Hb&&(a.onmousewheel=b&Hb?zr:null),c&262144&&(a.oncontextmenu=b&262144?zr:null),c&Oa&&(a.onpaste=b&Oa?zr:null),c&Jb&&(a.ontouchstart=b&Jb?zr:null),c&Lb&&(a.ontouchmove=b&Lb?zr:null),c&Pa&&(a.ontouchend=b&Pa?zr:null),c&Ob&&(a.ontouchcancel=b&Ob?zr:null),c&Pb&&(a.ongesturestart=b&Pb?zr:null),c&Qb&&(a.ongesturechange=b&Qb?zr:null),c&Rb&&(a.ongestureend=b&
+Rb?zr:null))}function xr(a){Wq(a)}function wr(a){rr();if(Wq(a)&&Fr){var b;b=Fr;W();var c;(c=Bn(b))?(Tq(a,b,c),b=!0):b=!1;b&&(O(),a).stopPropagation()}}function ur(a){(O(),P).rb(a);tr(a)}function tr(a){var b;for(b=(O(),P).ob(a);b&&!Bn(b);)b=b.parentNode;b&&Tq(a,1!=b.nodeType?null:b,Bn(b))}function Br(a){(O(),P).ob(a).__gwtLastUnhandledEvent=a.type;tr(a)}x(637,636,{});_.ec=function(){yr()};_.fc=function(a){fr(this);Fr==a&&(Fr=null)};_.gc=function(a){fr(this);Fr=a};
+_.hc=function(a,b){fr(this);this.jc(a,b)};_.jc=function(a,b){Dr(a,b)};_.ic=function(a,b){fr(this);Er(a,b)};var sr,Fr,vr,zr,Ar;B(637);x(638,637,{});B(638);function td(){rr()}x(457,638,{},td);_.jc=function(a,b){Dr(a,b);"dragover"===b&&Dr(a,"dragenter")};B(457);function Gr(){Gr=w;rr();vr[Fb]=wr}
+function Hr(){$wnd.addEventListener("mouseout",He(function(a){var b=(rr(),Fr);if(b&&!a.relatedTarget&&lb==a.target.tagName.toLowerCase()){var c=$doc.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,$wnd,0,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,null);b.dispatchEvent(c)}}),!0)}function vd(){Gr()}x(458,637,{},vd);_.ec=function(){yr();Hr()};_.ic=function(a,b){fr(this);Er(a,b);b&Hb&&a.addEventListener(Fb,(rr(),zr),!1)};B(458);
+function ud(){rr()}x(459,638,{},ud);B(459);function Cr(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])}function qd(){}x(598,1,{},qd);_.kc=function(){var a=$wnd.onbeforeunload,b=$wnd.onunload;$wnd.onbeforeunload=function(b){var d;try{d=He(lr)()}finally{b=a&&a(b)}if(null!=d)return d;if(null!=b)return b};$wnd.onunload=He(function(a){try{hr(),kr&&Nk()}finally{b&&b(a),$wnd.onresize=null,$wnd.onscroll=null,$wnd.onbeforeunload=null,$wnd.onunload=null}})};B(598);function pd(){}x(599,598,{},pd);
+_.kc=function(){var a;a=$doc;a=(O(),P).lb(a,'function __gwt_initWindowCloseHandler(beforeunload, unload) {\n  var wnd \x3d window\n  , oldOnBeforeUnload \x3d wnd.onbeforeunload\n  , oldOnUnload \x3d wnd.onunload;\n  \n  wnd.onbeforeunload \x3d function(evt) {\n    var ret, oldRet;\n    try {\n      ret \x3d beforeunload();\n    } finally {\n      oldRet \x3d oldOnBeforeUnload \x26\x26 oldOnBeforeUnload(evt);\n    }\n    // Avoid returning null as IE6 will coerce it into a string.\n    // Ensure that "" gets returned properly.\n    if (ret !\x3d null) {\n      return ret;\n    }\n    if (oldRet !\x3d null) {\n      return oldRet;\n    }\n    // returns undefined.\n  };\n  \n  wnd.onunload \x3d function(evt) {\n    try {\n      unload();\n    } finally {\n      oldOnUnload \x26\x26 oldOnUnload(evt);\n      wnd.onresize \x3d null;\n      wnd.onscroll \x3d null;\n      wnd.onbeforeunload \x3d null;\n      wnd.onunload \x3d null;\n    }\n  };\n  \n  // Remove the reference once we\'ve initialize the handler\n  wnd.__gwt_initWindowCloseHandler \x3d undefined;\n}\n');
+$doc.body.appendChild(a);$wnd.__gwt_initWindowCloseHandler(He(lr),He(jr));$doc.body.removeChild(a)};B(599);function rd(){}x(600,598,{},rd);B(600);function Ir(){Ir=w}function Em(a){return W(),a._}function Jr(a,b){(W(),a._).style[t]=b}function Kr(a){Ir();var b;a=a.className||"";b=qe(a,Ce(32));return 0<=b?ye(a,0,b):a}function Lr(a,b,c){Ir();if(!a)throw new rh(Sb);b=Ae(b);if(0==b.length)throw new H(Tb);c?li(a,b):yi(a,b)}
+function Mr(a,b){Ir();if(!a)throw new rh(Sb);b=Ae(b);if(0==b.length)throw new H(Tb);var c=b,d=(a.className||"").split(/\s+/);if(d){var e=d[0],f=e.length;d[0]=c;for(var g=1,m=d.length;g<m;g++){var n=d[g];n.length>f&&"-"==n.charAt(f)&&0==n.indexOf(e)&&(d[g]=c+n.substring(f))}a.className=d.join(" ")}}x(21,1,{28:1,21:1});_.lc=Nr;_.tS=function(){var a;this._?(a=(W(),this._),a=(O(),P).Ab(a)):a="(null handle)";return a};B(21);
+function Or(a,b,c){var d;d=Up(c.b);if(-1==d){d=c.b;var e=(W(),a._);W();Rq.hc(e,d)}else a.vc(d);bl(a.Z?a.Z:a.Z=new ml(a),c,b)}function Pr(a,b,c){return bl(a.Z?a.Z:a.Z=new ml(a),c,b)}function Zk(a,b){a.Z&&Rk(a.Z,b)}function Qr(a){var b;if(a.pc())throw new Z("Should only call onAttach when the widget is detached from the browser's document");a.X=!0;W();a._.__listener=a;b=a.Y;a.Y=-1;0<b&&a.vc(b);a.nc();a.sc()}
+function Rr(a,b){var c;switch(W(),Vq((O(),b).type)){case 16:case 32:if((c=P.pb(b))&&ii(a._,c))return}c=a._;var d,e,f,g;if(vk&&(d=(O(),b).type,d=vk.a[d]))for(g=d.xc();g.Dc();)f=g.Ec(),d=f.a.d,e=f.a.e,f.a.d=b,f.a.e=c,Zk(a,f.a),f.a.d=d,f.a.e=e}function Tm(a){if(!a.$){if(Sk(),Uk.a.Be(a)){Sk();try{a.rc()}finally{Uk.a.Ge(a)}}}else if(y(a.$,40))a.$.yc(a);else if(a.$)throw new Z("This widget's parent does not implement HasWidgets");}
+function Sr(a,b){var c;c=a.$;if(b){if(c)throw new Z("Cannot set a new parent without first clearing the old parent");a.$=b;b.pc()&&a.qc()}else try{c&&c.pc()&&a.rc()}finally{a.$=null}}x(18,21,Ub);_.mc=function(){return this};_.nc=Tr;_.oc=Tr;_.pc=function(){return this.X};_.qc=function(){Qr(this)};_.cc=function(a){Rr(this,a)};_.rc=Ur;_.sc=Tr;_.tc=Tr;_.uc=function(a){Sr(this,a)};_.vc=function(a){-1==this.Y?cr((W(),this._),a|(this._.__eventBits||0)):this.Y|=a};_.X=!1;_.Y=0;var Vr=B(18);x(615,18,Vb);
+_.wc=function(){throw new Wr("This panel does not support no-arg add()");};_.nc=function(){Tk(this,(Xr(),Yr))};_.oc=function(){Tk(this,(Xr(),Zr))};B(615);function $r(a,b,c){Tm(b);var d=a.b,e=d.c,f,g;if(0>e||e>d.c)throw new as;if(d.c==d.a.length){g=we(Vr,h,18,2*d.a.length,0);for(f=0;f<d.a.length;++f)g[f]=d.a[f];d.a=g}++d.c;for(f=d.c-1;f>e;--f)d.a[f]=d.a[f-1];d.a[e]=b;W();d=br(b._);c.appendChild(d);Sr(b,a)}
+function bs(a,b){var c;if(b.$!=a)return!1;try{Sr(b,null)}finally{c=(W(),b._);hi((O(),c)).removeChild(c);c=a.b;var d;a:{for(d=0;d<c.c;++d)if(c.a[d]==b)break a;d=-1}if(-1==d)throw new Uh;if(0>d||d>=c.c)throw new as;for(--c.c;d<c.c;++d)c.a[d]=c.a[d+1];c.a[c.c]=null}return!0}x(162,615,Vb);_.xc=function(){return new cs(this.b)};_.yc=function(a){return bs(this,a)};B(162);x(401,162,Vb);_.wc=function(a){$r(this,a,(W(),this._))};
+_.yc=function(a){var b;if(b=bs(this,a))a=(W(),a._),a.style[Wb]="",a.style.top="",a.style[Aa]="";return b};B(401);function Xr(){Xr=w;Yr=new ds;Zr=new es}function fs(a){jl.call(this,a)}function Tk(a,b){Xr();var c,d,e;c=null;for(e=a.xc();e.Dc();){d=e.Ec();try{b.zc(d)}catch(f){if(f=Oh(f),y(f,14))d=f,!c&&(c=new hl),il(c,d);else throw Ph(f);}}if(c)throw new fs(c);}x(276,164,La,fs);var Yr,Zr;B(276);function ds(){}x(277,1,{},ds);_.zc=function(a){a.qc()};B(277);function es(){}x(278,1,{},es);_.zc=function(a){a.rc()};
+B(278);function gs(){gs=w;Ir();hs()}function is(a,b){(W(),a._)[Xb]=!b}x(320,18,Ub);_.Ac=function(){return xi((W(),this._))};_.qc=function(){Qr(this);-1==this.Ac()&&this.Bc(0)};_.Bc=function(a){(W(),this._).tabIndex=a};B(320);function js(a){a=(W(),a._);return(O(),P).ub(a)}function ks(a,b){zi((W(),a._),b)}x(166,320,Ub);B(166);function ls(){gs();var a;a=$doc;a=(O(),P).jb(a,ha);this._=(W(),a);oi((W(),this._),"gwt-Button")}x(137,166,Ub,ls);B(137);
+function ms(a){return a.X?(dm(),a.a.checked?em:rp):(dm(),a.a.defaultChecked?em:rp)}function ns(a,b){!b&&(b=(dm(),rp));dm();a.a.checked=b.a;a.a.defaultChecked=b.a}function os(){gs();var a=(W(),Hi());W();var b=$doc,b=(O(),b).createElement("span");this._=(W(),b);this.a=a;this.b=Ki();this._.appendChild(this.a);this._.appendChild(this.b);a=Pi();this.a.id=a;this.b.htmlFor=a;new ps(this.b);this.a&&(this.a.tabIndex=0);oi(this._,"gwt-CheckBox")}x(94,166,{29:1,26:1,20:1,94:1,28:1,25:1,21:1,18:1},os);_.Ac=function(){return xi(this.a)};
+_.sc=function(){W();this.a.__listener=this};_.tc=function(){W();this.a.__listener=null;ns(this,this.X?(dm(),this.a.checked?em:rp):(dm(),this.a.defaultChecked?em:rp))};_.Bc=function(a){this.a&&(this.a.tabIndex=a)};_.vc=function(a){-1==this.Y?cr(this.a,a|(W(),this.a.__eventBits||0)):-1==this.Y?cr((W(),this._),a|(this._.__eventBits||0)):this.Y|=a};_.c=!1;B(94);function qs(a){this.a=a}x(321,1,{},qs);_.Hb=function(){var a=this.a,b=ms(this.a);al&&(b=new Yk(b),a.Z&&Rk(a.Z,b))};B(321);
+function rs(a,b){var c;if(a.W)throw new Z("Composite.initWidget() may only be called once.");if(!b)throw new $h("widget cannot be null");Tm(b);c=(W(),b._);a._=c;ss();var d;W();try{d=!!c&&!!c.__gwt_resolve}catch(e){d=!1}d&&(ss(),c.__gwt_resolve=ts(a));a.W=b;Sr(b,a)}function us(a){if(!a.W)throw new Z("initWidget() is not called yet");-1!=a.Y&&(a.W.vc(a.Y),a.Y=-1);a.W.qc();W();a._.__listener=a;a.nc()}x(616,18,Yb);_.pc=function(){return this.W?this.W.pc():!1};_.qc=function(){us(this)};
+_.cc=function(a){Rr(this,a);this.W.cc(a)};_.rc=function(){try{this.oc()}finally{this.W.rc()}};_.lc=function(){return this._=(W(),this.W.lc())};B(616);function ps(a){a=vi(a,"dir");pe("rtl",a)||pe("ltr",a)}x(575,1,{},ps);B(575);function vs(){this.b=new ws(this);this._=(W(),Ji("div"))}x(121,162,Vb,vs);_.wc=function(a){$r(this,a,(W(),this._))};B(121);function xs(a,b){if(a.a!=b)return!1;try{Sr(b,null)}finally{(W(),a._).removeChild(b._),a.a=null}return!0}
+function ys(a,b){if(b!=a.a&&(b&&Tm(b),a.a&&xs(a,a.a),a.a=b)){W();var c=br(Em(a.a));a._.appendChild(c);Sr(b,a)}}x(155,615,$b);_.wc=function(a){if(this.a)throw new Z("SimplePanel can only contain one child widget");ys(this,a)};_.xc=function(){return new zs(this)};_.yc=function(a){return xs(this,a)};_.Cc=function(a){ys(this,a)};B(155);function As(){As=w;Ir();Bs=(hs(),hs(),Cs)}var Bs;
+function Ds(a,b){var c;a:for(c=(W(),O(),a),c=new kl(c.b);c.b<c.d.Oc();)if(N(c.b<c.d.Oc()),c.d.Me(c.c=c.b++),(W(),null.qf).pf())break a;switch(Vq(b.type)){case 1:(As(),Bs).Hc(a._);break;case 2048:Es(a);break;case 128:switch(c=b.keyCode|0,c){case 37:Es(a);b.stopPropagation();P.rb(b);break;case 39:Es(a);b.stopPropagation();P.rb(b);break;case 38:Es(a);b.stopPropagation();P.rb(b);break;case 40:Es(a);b.stopPropagation();P.rb(b);break;case 27:b.stopPropagation();P.rb(b);break;case 13:Es(a)||(b.stopPropagation(),
+P.rb(b))}}Rr(a,b)}function Es(a){for(a=new kl(a.b);a.b<a.d.Oc()&&(N(a.b<a.d.Oc()),a.d.Me(a.c=a.b++),!null.qf););return!0}x(163,18,Ub);_.cc=function(a){Ds(this,a)};_.rc=Ur;B(163);function Fs(){}x(279,1,{},Fs);B(279);function Gs(){Gs=w;Pq();new Oq("data:image/gif;base64,R0lGODlhBQAJAIAAAAAAAAAAACH5BAEAAAEALAAAAAAFAAkAAAIMRB5gp9v2YlJsJRQKADs\x3d")}function ss(){ss=w;Hs()}function ts(a){return function(){this.__gwt_resolve=Is;return a.lc()}}
+function Is(){throw"A PotentialElement cannot be resolved twice.";}function Hs(){function a(){}a.prototype={className:"",clientHeight:0,clientWidth:0,dir:"",getAttribute:function(a){return this[a]},href:"",id:"",lang:"",nodeType:1,removeAttribute:function(a){this[a]=void 0},setAttribute:function(a,c){this[a]=c},src:"",style:{},title:""};$wnd.GwtPotentialElementShim=a}x(617,616,Yb);B(617);function Sk(){Sk=w;Ir();Vk=new Js;Xk=new mh;Uk=new hl}function Ks(){Sk();return $doc.body}x(402,401,Vb);
+var Vk,Xk,Uk;B(402);function Js(){}x(404,1,{},Js);_.zc=function(a){a.pc()&&a.rc()};B(404);function Ls(){}x(405,1,{},Ls);B(405);function Ms(){var a=Ks();Ir();this.b=new ws(this);this._=(W(),a);Qr(this)}x(403,402,Vb,Ms);B(403);function zs(a){this.c=a;this.a=!!this.c.a}x(226,1,{},zs);_.Dc=Rn;_.Ec=function(){if(!this.a||!this.c.a)throw new Uh;this.a=!1;return this.b=this.c.a};_.Fc=function(){this.b&&xs(this.c,this.b)};_.a=!1;_.b=null;B(226);x(227,1,{},function(){});B(227);
+function ws(a){this.b=a;this.a=we(Vr,h,18,4,0)}x(481,1,{},ws);_.xc=function(){return new cs(this)};_.c=0;B(481);function cs(a){this.c=a}x(189,1,{},cs);_.Dc=function(){return this.b<this.c.c};_.Ec=function(){if(this.b>=this.c.c)throw new Uh;this.a=this.c.a[this.b];++this.b;return this.a};_.Fc=function(){if(!this.a)throw new ci;this.c.b.yc(this.a);--this.b;this.a=null};_.b=0;B(189);
+function Ns(){var a,b;Ns=w;Pq();new Oq((b="__gwtDevModeHook:"+$moduleName+":moduleBase",a=$wnd||self,a[b]||$moduleBase)+"clear.cache.gif")}function Os(){Os=w;Ns()}function hs(){hs=w;Cs=kd();y(Cs,107)&&new ld}function ld(){hs()}x(197,1,{},ld);_.Gc=function(){var a;a=Ii();a.tabIndex=0;return a};_.Hc=function(a){a.focus()};var Cs;B(197);function Ps(){return function(){var a=this.parentNode;a.onfocus&&$wnd.setTimeout(function(){a.focus()},0)}}function nd(){hs()}x(107,197,{107:1},nd);
+_.Gc=function(){var a=Qs?Qs:Qs=Ps(),b=$doc.createElement("div");b.tabIndex=0;var c=$doc.createElement("input");c.type="text";c.tabIndex=-1;c.setAttribute("role",sa);var d=c.style;d.opacity=0;d.height="1px";d.width="1px";d.zIndex=-1;d.overflow=jb;d.position=Ba;c.addEventListener("focus",a,!1);b.appendChild(c);return b};var Qs;B(107);function md(){hs()}x(591,107,{107:1},md);_.Hc=function(a){$wnd.setTimeout(function(){a.focus()},0)};B(591);x(595,1,{},function(){});B(595);
+function Rs(){Rs=w;navigator.userAgent.indexOf("Macintosh")}x(601,595,{},function(){Rs()});B(601);function Ss(){var a,b;b=gd();a=b.Ic();b=b.Jc();if(a!==b)throw new Ts(a,b);}x(112,14,wa);B(112);x(33,112,wa);B(33);function Ts(a,b){var c=(E(),""+(ac+a+") "+bc+b+").\n"+cc));this.e=y(ac+a+") "+bc+b+").\n"+cc,14)?ac+a+") "+bc+b+").\n"+cc:null;this.f=c;nh(this)}x(201,33,wa,Ts);B(201);function jd(){}x(500,1,{},jd);_.Ic=function(){return"gecko1_8"};
+_.Jc=function(){var a=navigator.userAgent.toLowerCase(),b=$doc.documentMode;return-1!=a.indexOf(vb)?dc:-1!=a.indexOf(ec)&&10<=b&&11>b?"ie10":-1!=a.indexOf(ec)&&9<=b&&11>b?"ie9":-1!=a.indexOf(ec)&&8<=b&&11>b?"ie8":-1!=a.indexOf(fc)||11<=b?"gecko1_8":"unknown"};B(500);function hd(){}x(498,1,{},hd);_.Ic=function(){return"ie10"};
+_.Jc=function(){var a=navigator.userAgent.toLowerCase(),b=$doc.documentMode;return-1!=a.indexOf(vb)?dc:-1!=a.indexOf(ec)&&10<=b&&11>b?"ie10":-1!=a.indexOf(ec)&&9<=b&&11>b?"ie9":-1!=a.indexOf(ec)&&8<=b&&11>b?"ie8":-1!=a.indexOf(fc)||11<=b?"gecko1_8":"unknown"};B(498);function id(){}x(499,1,{},id);_.Ic=function(){return dc};
+_.Jc=function(){var a=navigator.userAgent.toLowerCase(),b=$doc.documentMode;return-1!=a.indexOf(vb)?dc:-1!=a.indexOf(ec)&&10<=b&&11>b?"ie10":-1!=a.indexOf(ec)&&9<=b&&11>b?"ie9":-1!=a.indexOf(ec)&&8<=b&&11>b?"ie8":-1!=a.indexOf(fc)||11<=b?"gecko1_8":"unknown"};B(499);function Us(a){var b=a.a,c=a.d,d=a.c;a=a.b;0<b.b?(c=new Vs(b,c,d,a),!b.a&&(b.a=new G),Ne(b.a,c)):ql(b,c,d,a)}function fl(a,b,c){this.a=a;this.d=b;this.c=null;this.b=c}x(380,1,{},fl);B(380);
+function cl(a,b,c){this.a=a;this.d=b;this.c=null;this.b=c}x(381,1,{},cl);_.ib=function(){dl(this.a,this.d,this.c,this.b)};B(381);function Vs(a,b,c,d){this.a=a;this.d=b;this.c=c;this.b=d}x(382,1,{},Vs);_.ib=function(){ql(this.a,this.d,this.c,this.b)};B(382);
+function Ws(){Ws=w;var a;a=(!Xs&&(Xs=new Ys),Xs);var b,c,d,e;null==Zs&&(b=e=d=c="",a.a.d?(c="ff",d="ff"+a.a.a,e=d+a.a.b,b=fc):a.a.c?(c="sa",d="ch",b=vb):a.a.n?(c="sa",d="sa"+a.a.a,e=d+a.a.b,b=vb):a.a.f?(c="ie",d="ie"+a.a.a,e=d+a.a.b,b="trident"):a.a.j&&(c="op",d="op"+a.a.a,e=d+a.a.b,b="presto"),Zs="v-"+c,""===d||(Zs=Zs+" v-"+d),""===e||(Zs=Zs+" v-"+e),""===b||(Zs=Zs+" v-"+b),b=5==a.a.q?"v-android":4==a.a.q?"v-ios v-ios"+a.a.r:1==a.a.q?"v-win":3==a.a.q?"v-lin":2==a.a.q?"v-mac":null,null!=b&&(Zs=Zs+
+" "+b),a.b&&(Zs+=" v-touch"));a=Zs;Sk();Sk();b=U(Xk,null);b||(0==Xk.e&&(b=new Ls,hr(),kr||(ir.kc(),kr=!0),c=Qk?Qk:Qk=new Gk,bl((!Ok&&(Ok=new Pk),Ok),c,b)),b=new Ms,pl(Xk,null,b),il(Uk,b));Lr((W(),b._),a,!0)}function $s(a){return a.a.f&&8==a.a.a}function at(){var a=(!Xs&&(Xs=new Ys),Xs);return a.a.f&&9==a.a.a}
+function Ys(){Ws();var a;this.a=new bt(ct());if(this.a.f&&(a=(a=$wnd.document.documentMode)?a:-1,-1!=a)){var b=this.a;b.a=a;b.b=0}if(this.a.c)this.b="ontouchstart"in window;else if(this.a.f)this.b=!!navigator.msMaxTouchPoints;else{if(a=!this.a.k)try{document.createEvent("TouchEvent"),a=!0}catch(c){a=!1}this.b=a}}function ct(){Ws();return $wnd.navigator.userAgent}x(58,1,{},Ys);_.b=!1;var Zs=null,Xs;B(58);function dt(a,b){++a.a;a.b=Lh(a.b,[b,!1]);Gh(a);a.b=Lh(a.b,[new et(a),!1]);Gh(a)}
+function Fh(){this.a=0}x(468,419,{},Fh);_.a=0;B(468);function et(a){this.a=a}x(469,1,{},et);_.ib=function(){--this.a.a};B(469);function ft(){ft=w;W();Ii()}function gt(a){ft();return a.getBoundingClientRect()}function ht(){ft();var a;0>it&&(a=(W(),Ii()),a.style[u]="50px",a.style[t]="50px",a.style.overflow=Eb,a.style[Aa]=Ba,a.style.marginLeft="-5000px",Ks().appendChild(a),it=((a.offsetWidth||0)|0)-(parseInt(a[eb])|0),Ks().removeChild(a));return it}
+function jt(a){ft();null!=a.getBoundingClientRect?(a=a.getBoundingClientRect(),a=a.bottom-a.top):a=a.offsetHeight;return a}function kt(a){ft();return a.getBoundingClientRect?(a=a.getBoundingClientRect(),a.right-a.left):a.offsetWidth}function lt(a){ft();-1!=(O(),a).type.indexOf("touch")?(a=a.changedTouches[0],a=Di((O(),a).clientX||0)):a=Di(a.clientX||0);return a}function mt(a){ft();-1!=(O(),a).type.indexOf("touch")?(a=a.changedTouches[0],a=Di((O(),a).clientY||0)):a=Di(a.clientY||0);return a}
+function nt(a,b){ft();return 0.49>=(0>=a-b?0-(a-b):a-b)}var it=-1;function ot(a){var b;b=pt(a.g,qt(a));rt(a,b[0]);a.g=b[1];rt(a,b[2])}function rt(a,b){var c,d;for(c=b.b;c<b.a;c++)d=rl(a.o,I(c)),rl(a.p,a.Kc(d))}function st(a){a.i||(a.i=!0,dt((Dh(),Eh),a.j))}function tt(a){var b;b=a.Oc();-1==b&&(b=ut(a.s));return $(0,b)}
+function vt(a,b){var c;c=Kd(a,a.getRowKey,a.Kc).bind(a)(b);if(null==c)throw new $h("key may not be null (row: "+b+")");if(Zq(a.r,c))return U(a.r,c);if(Zq(a.p,c))return new wt(a,b,c);throw new Z("The cache of this DataSource does not currently contain the row "+b);}function qt(a){var b;b=tt(a);var c=a.s;a=(c.a-c.b)*a.f.a;return xt(new yt(c.b-a,c.a+a),b)}function zt(a,b){return U(a.o,I(b))}function At(a,b){b.b>=b.a||(a.k=new Bt(a,b),a.Lc(b.b,b.a-b.b,a.k))}
+function Ct(a,b){var c;c=Kd(a,a.getRowKey,a.Kc).bind(a)(b);return Zq(a.p,c)?U(a.p,c).a:-1}function Dt(a,b){var c,d;d=b.a;c=U(a.q,d);c||(c=I(0),pl(a.r,d,b));pl(a.q,d,I(c.a+1))}
+function Et(a,b){a.t=b;rt(a,a.g);a.g=$(0,0);if(a.n){var c=a.n,d,e;d=c.a.u.a;e=d.k;if(b>e){Ft(d,e,b-e);d=c.a.c;e=$(e,b-e);var f,g;f=d.c==d.j.u.a;g=e.b<=d.g;f&&g&&(d.g+=e.a-e.b,d.g=En(d.g,d.j.u.a.k-1),d.c.bd(d.g))}else if(b<e)a:if(Gt(d,b,e-b),d=c.a.c,e=$(b,e-b),d.c==d.j.u.a){if(Ht(e,d.g))d.c._c()>e.a?d.g=e.b:0<e.b?d.g=e.b-1:0<d.j.u.j.k?(d.g=En(d.f,d.j.u.j.k-1),d.c=d.j.u.j):0<d.j.u.f.k&&(d.g=En(d.e,d.j.u.f.k-1),d.c=d.j.u.f);else{if(e.b>d.g)break a;d.g-=e.a-e.b}d.c.bd(d.g)}0<b?(c.a.p=!0,d=It(c.a.u),c=
+c.b,c.s=$(d.b,d.a-d.b),st(c)):(c.a.o=$(0,0),Zk(c.a,new Jt(c.a.o)))}}function Kt(a,b){(a.n=b)&&!Lt(a.g)&&(Mt(b.a.u.a,a.g.b,ut(a.g)),Nt(b,a.g.b,ut(a.g)))}function Ot(a,b,c){var d,e,f;e=$(b,c.Oc());a.k&&(Ie(),a.k=null);d=qt(a);e=pt(e,d)[1];if(e.b<e.a){for(d=e.b;d<e.a;d++)f=c.Me(d-b),pl(a.o,I(d),f),pl(a.p,a.Kc(f),I(d));a.n&&Mt(a.n.a.u.a,e.b,e.a-e.b);Lt(a.g)?a.g=e:(ot(a),Lt(a.g)?a.g=e:a.g=Pt(a.g,e));a.n&&Nt(a.n,a.g.b,ut(a.g));for(c=c.xc();c.Dc();)b=c.Ec(),d=a.Kc(b),(d=U(a.r,d))&&(d.b=b)}st(a)}
+function Qt(a,b){var c,d;d=b.a;if(c=U(a.q,d)){var e=I(1);y(e,83)&&e.a==c.a?(rl(a.r,d),rl(a.q,d)):pl(a.q,d,I(c.a-1))}else throw new Z("Row "+Rt(b)+" with key "+d+" was not pinned to begin with");}x(308,1,{});_.Mc=function(a){Et(this,a)};_.Nc=function(a,b){Ot(this,a,b)};_.Oc=function(){return this.t};_.i=!1;_.t=-1;B(308);function St(a){this.a=a}x(310,1,{},St);
+_.ib=function(){this.a.i=!1;var a=this.a,b;if(!a.k){b=tt(a);var c=a.s,d;d=(c.a-c.b)*a.f.b;b=xt(new yt(c.b-d,c.a+d),b);!Tt(b,a.g)||Lt(a.g)?(Wk(a.o),Wk(a.p),a.g=new yt(0,0),At(a,qt(a))):(ot(a),Ut(b,a.g)?a.n&&Nt(a.n,a.g.b,ut(a.g)):(b=pt(qt(a),a.g),At(a,b[0]),At(a,b[2])))}};B(310);function Vt(a,b,c){a.c.t!=c&&a.c.Mc(c);a.c.Nc(a.b.b,b)}function Bt(a,b){this.c=a;this.b=b;this.a=Ie()}x(309,1,{},Bt);_.a=0;B(309);x(625,1,{});_.eQ=function(a){return Wt(this,a)};_.hC=function(){return Rd(this.a)};B(625);
+function Wt(a,b){return y(b,125)?Td(a.a,b.a):!1}function Rt(a){if(Zq(a.c.r,a.a))return a.b;throw new Z("The row handle for key "+a.a+" was not pinned");}function wt(a,b,c){this.c=a;this.b=b;this.a=c}x(125,625,{125:1},wt);B(125);x(629,1,{});B(629);function Xt(){this.b=3;this.a=4}x(170,629,{},Xt);_.a=0;_.b=0;B(170);function Yt(a,b){var c,d,e;c=a.a.c;for(e=0;e<c.childNodes.length;e++)if((d=c.childNodes[e])&&1==d.nodeType)if(b)d.style[ib]="";else{var f=(ok(),jb);d.style[ib]=f}}x(57,1,{57:1});
+_.Pc=function(){return V(),V(),sl};_.Rc=Ln;B(57);function Zt(a,b){var c=a.a;!c.d&&(c.d=er(new $t(c)));au(c.o.b);bu(a.a);cu(a);b.a=!0;Ti(b.d)}function du(a){a.d&&(Us(a.d.a),a.d=null)}function cu(a){a.e=!1;a.c&&(Us(a.c.a),a.c=null);var b=Ks();W();Uq&&b==Uq&&(Uq=null);Rq.fc(b);a.a&&(bu(a.a),a.a=null)}function eu(){this.b=new fu(this)}x(281,1,{},eu);_.e=!1;B(281);function fu(a){this.a=a}x(282,1,{},fu);
+_.dc=function(a){var b;if(this.a.e)switch(b=dr(a.d),b){case 128:b=Ri(a.d);27==b&&Zt(this.a,a);break;case 64:case Lb:gu(this.a.a,a);Ti(a.d);break;case Ob:Zt(this.a,a);break;case Pa:Ti(a.d);case 8:gu(this.a.a,a);b=this.a.a;var c,d,e,f;f=b.o.v.d;d=hu(iu(b.o.C,b.o.v.f.c),b.o.v.c).a;b.i!=f&&b.i!=f+d&&(e=ju(new eq(b.o.n)),c=new G,f<b.i?(ku(c,new lu(e.a.Te(0,f))),ku(c,mu(e,f+d,b.i)),ku(c,new lu(e.a.Te(f,f+d))),ku(c,mu(e,b.i,e.b.Oc()))):(ku(c,mu(e,0,b.i)),ku(c,new lu(e.a.Te(f,f+d))),ku(c,mu(e,b.i,f)),ku(c,
+mu(e,f+d,e.b.Oc()))),Ue(c,b.o.R),d=nu(b.o.c),b.g=ou(ju(new eq(b.o.n)),pu(b.o,d.a)),c=Se(c,we(qu,h,71,c.b.length,0)),ru(b.o,c),f=nu(b.o.c),e=f.a,c=f.c,d=b.o.v.d,f=su(b.o.u,f.b),b.g==d?(d=b.i>d?b.i-1:b.i,d=ou(tu(b.o),uu(b.o,d)),vu(b.o.c,c,d,f)):b.i<=b.g&&d>b.g?vu(b.o.c,c,e+1,f):b.i>b.g&&d<b.g&&vu(b.o.c,c,e-1,f));cu(this.a);a.a=!0}else cu(this.a)};B(282);function wu(a,b,c){this.c=a;this.e=b;this.d=c;this.a=(ft(),lt(this.e));this.b=mt(this.e)}x(283,1,{},wu);
+_.dc=function(a){var b,c;b=dr(a.d);(c=-1!=b)||(c=a.d,c=-1==(O(),c).type.toLowerCase().indexOf("pointer"));if(c)switch(b){case 16:case 32:break;case 128:case 256:case 512:case 4096:case 2048:break;case 64:case Lb:b=(ft(),lt(a.d));c=mt(a.d);if(3<xu(this.a-b)||3<xu(this.b-c)){du(this.c);b=this.c;c=this.d;var d;d=this.e;b:{var e,f,g,m,n,p,q,r,s,z,L,Q,pb,qb,Ca;s=c.j;s.b=null;s.c=0;r=c.o.v.d;q=iu(c.o.C,c.o.v.f.c);s=r+hu(q,c.o.v.c).a;n=c.o.S.xd()?J(0,c.o.A)+1:J(0,c.o.A);p=new yt(r,s);s=-1;Q=c.o.n.b.length+
+1;Ca=new hl;f=new G;ku(f,c.o.C.d);ku(f,c.o.w.d);for(qb=new kl(f);qb.b<qb.d.Oc();)if(pb=(N(qb.b<qb.d.Oc()),qb.d.Me(qb.c=qb.b++)),0!=pb.b.e)for(L=pb==q,f=n;f<c.o.n.b.length;f++)if(e=hu(pb,uu(c.o,f)),m=e.a,!(1>=m))if(e=f+m,g=new yt(f,e),(z=p.b<g.a&&g.b<p.a)&&!L){if(!Ut(g,p)){if(!Ut(p,g))break b;f<=r&&f>s&&(s=f);e<Q&&(Q=e)}f=e-1}else for(;1<m;)++f,--m,il(Ca,I(f));if(s!=Q-1){q=yu(c);for(r=n;r<c.o.n.b.length;r++)n=uu(c.o,r),p=I(r),!Ca.a.Be(p)&&(-1!=s?r>=s&&r<=Q&&zu(c.j,new Y(q),I(r)):zu(c.j,new Y(q),I(r))),
+q+=Au(n.g.u.c,ou(tu(n.g),n));-1==s&&zu(c.j,new Y(q),I(c.o.n.b.length))}}if(0==c.j.c)d=!1;else{c.k||(c.n=(W(),Mi()),c.f=Ii(),c.n.appendChild(c.f),c.k=Oi(),c.k.appendChild(c.n),oi(c.k,"header-drag-table"));oi(c.n,c.o.u.j.j.className||"");oi(c.f,Kr(Em(c.o))+"-drop-marker");for(s=Q=0;s<c.o.v.f.c;s++)Q+=(si(Bu(c.o.u.j,s)).offsetHeight||0)|0;c.n.style.top=Q+(T(),v);(W(),c.o._).appendChild(c.k);c.e=(W(),c.o.v.a.cloneNode(!0));c.e.style[u]="";s=c.f.style;Q=t;Ca=c.e.style;Ca=(O(),Ca)[t];s[Q]=Ca;c.n.appendChild(c.e);
+li(c.o.v.a,"dragged");li(c.e,"dragged-column-header");c.o.b.i=60;s=c.o.b;Q=(Cu(),Du);Ca=c.b;s.j=Q;s.b=Ca;Eu(s);s.g=er(new Fu(s));Q=s.j==(Cu(),Gu)?Hu(Em(s.e))+((Iu(s).offsetHeight||0)|0):Ju(Ku(s));s.j==(Cu(),Gu)?Ca=Hu(Lu(s))-1:(Ca=Ku(s),Ca=Ju(Ca)+((Ca.offsetWidth||0)|0)-1);Q+=Mu(s);n=(W(),s.e._);for(q=0;n;)q-=s.j==(Cu(),Gu)?(n.scrollTop||0)|0:(O(),P).vb(n),n=hi((O(),n));n=q;s.n=n+Q+s.i;s.c=n+Ca-s.i;s.d=s.i;50>s.c-s.n&&(Q=50-(s.c-s.n),s.n-=Q/2,s.c=A(s.c+Q/2),s.d=A(s.d-Q/2));s.f=er(s.k);s.a=new Nu(s,
+A(Ou(s.n)),s.c,s.d);s=s.a;s.i=!0;s.i&&10<=s.d&&(s.e=(!De&&(De=Ee()?new Fe:new Ke),De).ab(s,Em(s.p.e)));(O(),P).rb(d);d.stopPropagation();d=!0}d&&(b.e=!0,d=Ks(),W(),Uq=d,Rq.gc(d),b.a=c,b.c=er(b.b),gu(c,a))}break;default:du(this.c)}};_.a=0;_.b=0;B(283);function Pu(a,b,c){this.c=a;this.a=b;this.b=c}x(136,1,{},Pu);_.a=0;_.c=0;B(136);function Qu(){Qu=w;Ru=new Su}var Ru;function Su(){}x(275,1,{},Su);_.Tc=Tu;_.Uc=Tu;_.Vc=Tu;_.Wc=Tu;_.Xc=Tu;B(275);
+function Uu(a,b){var c;a.b=b;b.b&&(c=a.d.c.cells[a.a],c[gc]=1,0<=a.d.b[a.a]&&(c.style[u]=a.d.b[a.a]+(T(),v)),c.style[l]="",a.c=c)}function Vu(a,b){this.d=a;this.a=b}x(81,1,{81:1},Vu);_.a=0;_.b=null;_.c=null;var Wu=B(81);function Xu(a){return new Yu(a,0,a.a.b.length)}function Zu(a,b,c,d){a.c=b;a.d=c;a.b=d}function $u(a,b){var c;for(c=b;c<a.a.b.length;c++)av(a.a,c,new Vu(a,c))}function bv(){this.a=new G}x(508,1,{},bv);_.b=null;_.d=0;B(508);function Yu(a,b,c){this.a=a;this.c=b;this.b=c}x(146,1,{},Yu);
+_.xc=function(){return new cv(new dv(this.a.a,this.c,this.c+this.b),!0)};_.b=0;_.c=0;B(146);function ev(a,b,c){this.a=a;this.c=b;this.b=c}x(196,1,{},ev);_.xc=function(){return new cv(new dv(this.a.a,this.c,this.c+this.b),!1)};_.b=0;_.c=0;B(196);function fv(a){var b;for(b=0;b<a.d;b++)gv(a.a,a.c);a.d=0;b=hv(a.a,a.c++);Uu(b,a);return b}
+function iv(a,b){var c,d,e;e=new dv(a.a,En(a.c,a.a.b.length),En(a.c+b,a.a.b.length));for(d=new kl(e);d.b<d.d.Oc();)c=(N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++)),Uu(c,a);return e}function cv(a,b){this.a=new eq(a);this.b=b}x(91,1,{},cv);_.Dc=function(){return this.c+this.d<this.a.b.length};_.Ec=function(){return fv(this)};_.Fc=function(){throw new Wr("Cannot remove cells via iterator");};_.b=!1;_.c=0;_.d=0;B(91);function jv(){}x(103,1,{103:1},jv);_.Yc=function(a){a.style[Wb]="";a.style.top=""};
+_.Zc=function(a,b,c){a.style[Wb]=b+(T(),v);a.style.top=c+v};B(103);function kv(){}x(501,1,{},kv);_.Yc=lv;_.Zc=function(a,b,c){a.style[hc]="translate3d("+b+"px, "+c+"px, 0)"};B(501);function mv(){}x(502,1,{},mv);_.Yc=lv;_.Zc=function(a,b,c){a.style[hc]="translate("+b+"px,"+c+"px)"};B(502);function nv(){}x(503,1,{},nv);_.Yc=function(a){a.style[ic]=""};_.Zc=function(a,b,c){a.style[ic]="translate3d("+b+"px,"+c+"px,0)"};B(503);function ov(){ov=w;pv=new Gk}function qv(a,b){ov();this.a=a;this.b=b}
+x(188,619,{},qv);_.Cb=function(a){var b;a.a.q&&0!=(b=a.a.q,Kd(b,b.size,b.Oc).bind(b)())&&(a.a.p=!0,a=a.a.q,a.s=$(this.a,this.b),st(a))};_.Db=function(){return pv};_.a=0;_.b=0;var pv;B(188);function rv(a,b){return bl((!a.a&&(a.a=new ml(a)),a.a),(sv(),tv),b)}function uv(a){var b;b=a.j;a.j=vv(a.ed())<vv(a.gd());b!=a.j&&(b=new wv,Rk((!a.a&&(a.a=new ml(a)),a.a),b))}function xv(a){return a.c?0:vv(a.hd())}function yv(a){return!!a.o||!!a.f}
+function zv(a){var b,c;c=vv(a.gd());b=vv(a.ed());a.e=0>c-b?0:c-b;Av(a,a.k)}function Bv(a,b){var c;c=b>vv(a.gd());vv(a.ed())<vv(a.gd())&&c&&0!=a.k?(a.f=rv(a,new Cv(a,b)),Av(a,0)):Dv(a,b)}function Dv(a,b){a.jd(J(0,0<b?Ev(b):Ou(b)));zv(a);var c=vv(a.ed())<vv(a.gd());a.g.style[l]=c?"":(Zi(),mb);a.dd(c);uv(a);a.f&&(Us(a.f.a),a.f=null)}function Av(a,b){var c;a.d||(c=a.k,a.k=J(0,En(a.e,0<b?Ev(b):Ou(b))),nt(c,a.k)||(a.c&&Fv(a.b),a.kd(a.k|0)))}
+function Gv(a,b){var c;c=b<=vv(a.ed());vv(a.ed())<vv(a.gd())&&c&&0!=a.k?(a.o=rv(a,new Hv(a,b)),Av(a,0)):Iv(a,b)}function Iv(a,b){a.ld(0>b?0:b);zv(a);var c=vv(a.ed())<vv(a.gd());a.g.style[l]=c?"":(Zi(),mb);a.dd(c);uv(a);a.o&&(Us(a.o.a),a.o=null)}function Jv(a,b){a.c=0==b;a.c?(cr(a.g,16384),W(),a.g.__listener=new Kv(a),a.g.style[ib]=(ok(),jb)):(cr(a.g,0),W(),a.g.__listener=null,a.g.style[ib]="");a.md(1>b?1:b)}function Lv(a){return vv(a.ed())<vv(a.gd())}
+function Mv(a){var b;b=a.fd();a.d?a.k!=b&&a.kd(a.k|0):(a.k=b,a=a.i,a.b||(dt((Dh(),Eh),a.a),a.b=!0))}function Nv(){this.g=(W(),Ii());this.n=Ii();this.b=new Ov(this);this.i=new Pv(this);this.g.appendChild(this.n);this.g.style[l]=(Zi(),mb);this.g.tabIndex=-1}function vv(a){return a.length?po(ye(a,0,a.length-2)):0}x(174,1,{});_.cd=uk;_.nd=function(){Mv(this)};_.c=!1;_.d=!1;_.e=0;_.j=!1;_.k=0;B(174);function Cv(a,b){this.a=a;this.b=b}x(374,1,{},Cv);_.od=function(){Dv(this.a,this.b)};_.b=0;B(374);
+function Hv(a,b){this.a=a;this.b=b}x(375,1,{},Hv);_.od=function(){Iv(this.a,this.b)};_.b=0;B(375);function Kv(a){this.a=a}x(376,1,{20:1},Kv);_.cc=function(){Fv(this.a.b)};B(376);function Qv(){Qv=w;Rv=new Sv("VERTICAL",0);Tv=new Sv(jc,1)}function Sv(a,b){R.call(this,a,b)}x(99,4,{99:1,3:1,5:1,4:1},Sv);var Tv,Rv,Uv=C(99,function(){Qv();return S(D(Uv,1),h,99,0,[Rv,Tv])});function Vv(){Nv.call(this)}x(370,174,{},Vv);_.dd=function(a){this.g.style.overflowX=a?(Lj(),Eb):""};
+_.ed=function(){return Vi(this.g.style,u)};_.fd=function(){return wi(this.g)};_.gd=Wv;_.hd=Xv;_.jd=function(a){this.g.style[u]=a+(T(),v)};_.kd=function(a){var b=this.g;(O(),P).zb(b,a)};_.ld=function(a){this.n.style[u]=a+(T(),v)};_.md=function(a){this.g.style[db]=a+(T(),v);this.g.style[t]="0.0px";this.n.style[t]=a+v};B(370);function Pv(a){this.c=a;this.a=new Yv(this)}x(366,1,{},Pv);_.b=!1;B(366);function Yv(a){this.a=a}x(371,1,{},Yv);
+_.ib=function(){Mv(this.a.c);var a=this.a.c;!a.a&&(a.a=new ml(a));Rk(a.a,new Zv);this.a.b=!1};B(371);function Fv(a){a.a.md(13);a.a.g.style[ib]=(ok(),hb);Oe(a.b,1E3)}function Ov(a){this.a=a;this.b=new $v(this)}x(367,1,{},Ov);B(367);function $v(a){this.a=a}x(372,50,{},$v);_.eb=function(){this.a.a.md(1);this.a.a.g.style[ib]=(ok(),jb)};B(372);function aw(){Nv.call(this)}x(369,174,{},aw);_.dd=function(a){this.g.style.overflowY=a?(Lj(),Eb):""};_.ed=function(){return Vi(this.g.style,t)};
+_.fd=function(){return(this.g.scrollTop||0)|0};_.gd=Xv;_.hd=Wv;_.jd=function(a){this.g.style[t]=a+(T(),v)};_.kd=function(a){this.g.scrollTop=a};_.ld=function(a){this.n.style[t]=a+(T(),v)};_.md=function(a){this.g.style[cb]=a+(T(),v);this.g.style[u]="0.0px";this.n.style[u]=a+v};B(369);function bw(){bw=w;cw=new dw}function wv(){bw()}x(368,619,{},wv);_.Cb=function(a){ew(a.a)};_.Db=function(){return cw};var cw;B(368);function dw(){this.c=++Fk}x(373,37,{},dw);_.tS=function(){return"VisibilityChangeEvent"};
+B(373);function fw(){fw=w;gw=new hw}var gw;function hw(){}x(274,1,{},hw);_.pd=Ak;_.qd=Ak;B(274);function Ju(a){var b;for(b=0;a;)b+=(a.offsetLeft||0)|0,a=a.offsetParent;return b}function Hu(a){var b;for(b=0;a;)b+=(a.offsetTop||0)|0,a=a.offsetParent;return b}function Mu(a){var b,c;c=0<=a.e.A&&a.e.S.xd()?(si(si(Iu(a))).offsetWidth||0)|0:0;for(b=0;b<a.e.A;b++)c+=iw(uu(a.e,b));return c}function jw(a){return(a=Em(a.e).childNodes[2])?ti((O(),a)):null}function Ku(a){return(a=jw(a))?a.tBodies[0]:null}
+function Lu(a){return(a=jw(a))?a.tFoot:null}function Iu(a){return(a=jw(a))?a.tHead:null}function Eu(a){a.g&&(Us(a.g.a),a.g=null)}function au(a){a.f&&(Us(a.f.a),a.f=null);if(a.a){var b=a.a;b.i=!1;b.e&&(b.e.cb(),b.e=null);a.a=null}Eu(a)}function kw(a){this.k=new lw(this);this.e=a}x(284,1,{},kw);_.c=-1;_.d=0;_.i=100;_.n=-1;B(284);function lw(a){this.a=a}x(287,1,{},lw);
+_.dc=function(a){var b,c;if(this.a.a)switch(b=a.d,dr(a.d)){case 64:case Lb:a=(ft(),mt(b));c=lt(b);b=this.a.a;var d;b.p.j==(Cu(),Gu)?d=a:d=c;a=d;var e;-1==b.o?(b.o=En(b.c,a),b.a=J(b.b,a)):(c=b.o,b.o<b.c&&(b.o=J(b.o,En(b.c,a))),e=b.a,b.a>b.b&&(b.a=En(b.a,J(b.b,a))),c=c==b.o,e=e==b.a,a=a!=b.n,b.j=c&&e&&a);mw(b,d);b.n=d;break;case 8:case Pa:case Ob:au(this.a)}else au(this.a)};B(287);function mw(a,b){var c;b<a.o?(c=b-a.o,c=J(-1,c/a.d)):b>a.a?(c=b-a.a,c=En(1,c/a.d)):c=0;a.k=500*c}
+function Nu(a,b,c,d){this.p=a;this.c=b;this.b=c;this.d=d}x(286,1,{},Nu);
+_.bb=function(a){var b,c;b=a-this.g;this.g=a;this.j&&(a=A(Math.ceil(0.001*b)),this.o<this.c?(this.o+=a,this.o=En(this.o,this.c),mw(this,this.n)):this.a>this.b&&(this.a-=a,this.a=J(this.a,this.b),mw(this,this.n)));this.f+=b/1E3*this.k;b=A(this.f);this.f-=b;if(0!=b&&(this.p.j==(Cu(),Gu)?(c=this.p.e.u.F.k,a=this.p,a=vv(Vi(a.e.u.F.n.style,t))-((Lu(a).offsetHeight||0)|0)-((Iu(a).offsetHeight||0)|0)):(c=this.p.e.u.r.k,a=this.p,a=vv(Vi(a.e.u.r.n.style,u))-(((gi(jw(a)).offsetWidth||0)|0)-Mu(a))),0<b&&c<a||
+0>b&&0<c)){c+=b;this.p.j==Gu?Av(this.p.e.u.F,c):Av(this.p.e.u.r,c);var d=this.p.b;d.a.a=b;gu(d.a,null);0>=c?(b=this.p.b,b.a.a=0,nw(b.a,b.a.c)):c>=a&&(b=this.p.b,b.a.a=0,nw(b.a,b.a.c))}this.i&&10<=this.d&&(this.e=(!De&&(De=Ee()?new Fe:new Ke),De).ab(this,Em(this.p.e)))};_.a=-1;_.b=0;_.c=0;_.d=0;_.f=0;_.g=0;_.i=!1;_.j=!1;_.k=0;_.n=0;_.o=-1;B(286);function Cu(){Cu=w;Gu=new ow("VERTICAL",0);Du=new ow(jc,1)}function ow(a,b){R.call(this,a,b)}x(92,4,{92:1,3:1,5:1,4:1},ow);
+var Du,Gu,pw=C(92,function(){Cu();return S(D(pw,1),h,92,0,[Gu,Du])});function Fu(a){this.a=a}x(285,1,{},Fu);_.dc=function(a){switch(dr(a.d)){case Jb:1==Si(a.d).length&&au(this.a);break;case Lb:a.a=!0;break;case Pa:case Ob:au(this.a)}};B(285);function qw(a,b,c,d){a.e=b;a.d=c;a.c=d}function rw(a){this.f=a}x(127,1,{},rw);_.rd=function(){return this.f.a.cells[this.e]};_.d=0;_.e=0;B(127);function sw(){sw=w;tw=new Gk}function Jt(a){sw();this.a=a}x(140,619,{},Jt);_.Cb=function(a){a.sd(this)};_.Db=function(){return tw};
+var tw;B(140);var uw=ne();function vw(a){this.f=new ww;this.b=a}x(456,127,{},vw);_.rd=Rn;B(456);function xw(a){this.f=a}x(478,127,{},xw);_.rd=function(){return this.a.c};B(478);function ww(){}x(167,1,{},ww);_.c=0;B(167);function yw(){yw=w;zw=new Gk}function Aw(){yw()}x(411,619,{},Aw);_.Cb=pr;_.Db=function(){return zw};var zw;B(411);x(159,623,{});_.Cb=function(a){var b,c;b=Qi(this.d);Ai(b)&&!Bw(this.b,b)&&(b=su(this.b.u,b))&&(c=(Cw(),Dw),b==this.b.u.j?c=Ew:b==this.b.u.a&&(c=Fw),this.ud(a,c))};
+_.Gb=Rn;B(159);function Gw(a,b){this.a=new yk(this.vd(),this);this.b=a;this.c=b}x(476,159,{},Gw);_.ud=function(a,b){var c;b==(Cw(),Fw)&&a&&(c=this.c.f.b,a.a.c.S.yd(c)?a.a.b&&Hw(a.a.c,c):Iw(a.a.c,c))};_.vd=function(){return Ja};B(476);function Jw(a,b){this.a=new yk(this.vd(),this);this.b=a;this.c=b}x(477,159,{},Jw);_.ud=Kw;_.vd=function(){return Ab};B(477);function Lw(a,b){this.a=new yk(this.vd(),this);this.b=a;this.c=b}x(119,621,{});
+_.Cb=function(a){var b,c;b=Qi(this.d);Ai(b)&&!Bw(this.b,b)&&(c=(Cw(),Dw),b=this.b.c.c,b==this.b.u.j?c=Ew:b==this.b.u.a&&(c=Fw),this.wd(a,c))};_.Gb=Rn;B(119);function Mw(a,b){Lw.call(this,a,b)}x(473,119,{},Mw);_.wd=function(a,b){if(b==(Cw(),Fw)&&a){var c;32!=Ri(this.d)||a.b.c||(Ti(this.d),a.b.c=!0,c=this.c.f.c,a.a&&(Us(a.a.a),a.a=null),a.a=Nw(a.b.b,new Ow(a,c)),Pw(a.b.b,c,(Qw(),Rw)))}};_.vd=function(){return Ka};B(473);function Sw(a,b){Lw.call(this,a,b)}x(475,119,{},Sw);_.wd=Kw;_.vd=function(){return Bb};
+B(475);function Tw(a,b){Lw.call(this,a,b)}x(474,119,{},Tw);_.wd=function(a,b){(b==(Cw(),Fw)&&y(a,133)||b==Ew&&y(a,122))&&a.td(this)};_.vd=function(){return Cb};B(474);function sv(){sv=w;tv=new Gk}function Zv(){sv()}x(139,619,{},Zv);_.Cb=function(a){a.od(this)};_.Db=function(){return tv};var tv;B(139);function Uw(){Uw=w;Vw=new Gk}function $k(a){Uw();this.a=a}x(93,619,{},$k);
+_.Cb=function(a){var b;a.updating||(a.updating=!0,this.a!=a.getSelectionModel()?(Ww(a.e,this.a),un(X(a.c),"selectionmodechange")):(b=ms(Xw(a)).a,a.setSelectionMode(b?Wi((Yw(),Zw)):Wi((Yw(),$w)))),ax(a),a.getSelectionModel().zd(),a.updating=!1,ax(a),a.updating||un(X(a.c),"select"))};_.Db=function(){return Vw};var Vw;B(93);x(626,1,{});B(626);function bx(a){this.c=a;this.a=Pr(a,new cx(this),a.i.a)}x(399,1,{},bx);_.b=!0;B(399);function cx(a){this.a=a}x(400,1,{},cx);B(400);
+function dx(a,b){var c;if(!b)return-1;c=ex(a);for(c=ti((O(),c));c;){if(P.xb(c,b))return c=ti(c),c=ti(c),parseInt(c[kc])|0;c=Bi(c)}return-1}function fx(a){return(a=Em(a.c).childNodes[2])?ti((O(),a)):null}function ex(a){return(a=fx(a))?a.tBodies[0]:null}function gx(a){return(a=fx(a))?a.tFoot:null}function hx(a){return(a=fx(a))?a.tHead:null}function ix(a,b,c){b=zt(a.c.q,b);c?Iw(a.c,b):Hw(a.c,b)}function jx(a){this.b=new kx(this);this.c=a}x(192,57,{57:1},jx);
+_.Pc=function(){var a;a=new hl;il(a,Db);il(a,Ib);return a};_.Qc=function(a){var b;b=(W(),Hi());ji(a.a.c);a.a.c.appendChild(b)};
+_.Rc=function(a,b){var c;if(oe(Ib,(O(),b).type)||Db===b.type&&1==P.nb(b)){du(this);this.d=er(new lx(this));c=dx(this,P.qb(b));var d=this.b,e;e=d.f.c.S;y(e,110)&&e.Hd();var f,g;e=d.f;g=Hu(Em(e.c))+((hx(e).offsetHeight||0)|0);e=Hu(gx(d.f))-1;var m;f=(W(),d.f.c._);for(m=0;f;)m-=(f.scrollTop||0)|0,f=hi((O(),f));f=m;d.g=f+g+100;d.b=f+e-100;d.c=100;50>d.b-d.g&&(e=50-(d.b-d.g),d.g-=e/2|0,d.b+=e/2|0,d.c-=e/2|0);d.d=er(d.e);e=d.f;g=d.g;f=d.b;m=d.c;var n;n=d.f;var p=zt(n.c.q,c);n=n.c.S.yd(p);d.a=new mx(e,g,
+f,m,!n);d=d.a;d.p=!0;d.t.Bd(c,d.s);d.j=c;d.p&&10<=d.f&&(d.g=(!De&&(De=Ee()?new Fe:new Ke),De).ab(d,Em(d.t.c)));P.rb(b);b.stopPropagation();return!0}throw new Z("received unexpected event: "+b.type);};_.Sc=function(a,b){var c;c=si(a.a.c);c.checked=b.a;c.disabled=0!=this.c.s.w;c[kc]=a.f.c};_.Bd=function(a,b){ix(this,a,b)};B(192);function nx(a){var b;a.d&&(Us(a.d.a),a.d=null);a.a&&(b=a.a,b.p=!1,b.g&&(b.g.cb(),b.g=null),a.a=null);b=a.f.c.S;y(b,110)&&b.Gd();du(a.f)}
+function kx(a){this.f=a;this.e=new ox(this)}x(487,1,{},kx);_.b=-1;_.c=0;_.g=-1;B(487);function ox(a){this.a=a}x(488,1,{},ox);_.dc=function(a){var b;if(this.a.a)switch(b=a.d,dr(a.d)){case 64:case Lb:a=(ft(),mt(b));b=lt(b);var c=this.a.a,d,e,f;-1==c.u?(c.u=En(c.e,a),c.c=J(c.d,a)):(e=c.u,c.u<c.e&&(c.u=J(c.u,En(c.e,a))),d=c.c,c.c>c.d&&(c.c=En(c.c,J(c.d,a))),e=e==c.u,d=d==c.c,f=a!=c.k,c.q=e&&d&&f);px(c,a);c.k=a;-1==c.i&&(c.i=b);break;case 8:case Pa:case Ob:nx(this.a)}else nx(this.a)};B(488);
+function px(a,b){var c;b<a.u?(c=b-a.u,c=J(-1,c/a.f)):b>a.c?(c=b-a.c,c=En(1,c/a.f)):c=0;a.r=500*c}function mx(a,b,c,d,e){this.t=a;this.e=b;this.d=c;this.f=d;this.s=e;this.b=Hu(Em(a.c))+((hx(a).offsetHeight||0)|0);this.a=Hu(gx(a))-1}x(486,1,{},mx);
+_.bb=function(a){var b;b=a-this.o;this.o=a;this.q&&(a=A(Math.ceil(0.001*b)),this.u<this.e?(this.u+=a,this.u=En(this.u,this.e),px(this,this.k)):this.c>this.d&&(this.c-=a,this.c=J(this.c,this.d),px(this,this.k)));this.n+=b/1E3*this.r;b=A(this.n);this.n-=b;0!=b&&Av(this.t.c.u.F,this.t.c.u.F.k+b);b=this.t;a=this.i;var c=J(this.b,En(this.a,this.k));ft();var d=$wnd.document.elementFromPoint(a,c),d=$wnd.document.elementFromPoint(a,c);null!=d&&3==d.nodeType&&(d=d.parentNode);a=dx(b,d);for(b=a>this.j?1:-1;-1!=
+a&&this.j!=a;)this.j+=b,this.t.Bd(this.j,this.s);this.p&&10<=this.f&&(this.g=(!De&&(De=Ee()?new Fe:new Ke),De).ab(this,Em(this.t.c)))};_.a=0;_.b=0;_.c=-1;_.d=0;_.e=0;_.f=0;_.i=-1;_.j=-1;_.k=0;_.n=0;_.o=0;_.p=!1;_.q=!1;_.r=0;_.s=!1;_.u=-1;B(486);function lx(a){this.a=a}x(485,1,{},lx);
+_.dc=function(a){var b;switch(dr(a.d)){case Jb:1==Si(a.d).length&&nx(this.a.b);break;case Lb:a.a=!0;break;case Pa:case Ob:b=Qi(a.d);var c;if(b)if((c=ex(this.a))&&(O(),P).xb(c,b)){for(;hi((O(),b))&&gi(hi(b))!=c;)b=hi(b);c=ti(hi(b))==b}else c=!1;else c=!1;c&&(du(this.a),a.a=!0)}};B(485);function qx(){qx=w;rx=new Gk}function sx(a,b,c){qx();this.a=a;null!=b?V():(V(),V());null!=c?V():(V(),V())}function tx(a,b,c){qx();this.a=a;b?new eq(b):(V(),V());c?new eq(c):(V(),V())}x(32,619,{},sx,tx);_.Cb=function(a){a.Cd(this)};
+_.Db=function(){return rx};_.Eb=Rn;var rx;B(32);function ux(a){var b,c;c=new vx(a.a.Oc());for(b=hn(new jn(a.a));b.a.Dc();)a=kn(b),Ne(c,Rt(a));return c}function wx(a,b){if(a.i&&b)throw new Z(lc);a.i=b;if(a.i)a.o=new xx(b),a.j=new jx(b);else{var c=a.o;Us(c.d.a);Us(c.e.a);a.o=null;a.j=null}}x(483,626,mc);_.Gd=function(){var a,b,c,d;if(this.f){this.f=!1;a=ux(this.n);this.n.a.He();d=ux(this.g);for(c=hn(new jn(this.g.a));c.a.Dc();)b=kn(c),Qt(b.c,b);this.g.a.He();Zk(this.i,new tx(this.i,a,d))}};
+_.Dd=function(a){var b=new Bm(a),c,d;a=new yx;for(d=new kl(b);d.b<d.d.Oc();)c=(N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++)),b=vt(this.i.q,c),this.Kd(b)&&il(a,c);0<a.a.Oc()&&Zk(this.i,new tx(this.i,null,a))};_.Ed=function(){var a,b;if(0<this.k.a.Oc()){b=new zx(this.k);a=this.i;var c,d,e;e=new yx;for(d=hn(new jn(this.k.a));d.a.Dc();)c=kn(d),il(e,Rt(c));c=(V(),new Ax(e));a=new tx(a,null,c);this.k.a.He();this.f&&(this.n.a.He(),this.g.a.He(),Bx(this.g,b));Zk(this.i,a);return!0}return!1};
+_.Kd=function(a){return null!=this.k.a.Ge(a)?(this.f?(this.n.a.Ge(a),il(this.g,a)):Qt(a.c,a),!0):!1};_.xd=Cx;_.yd=function(a){a=vt(this.i.q,a);return this.k.a.Be(a)};_.zd=function(){this.Ed()};_.Fd=function(a){var b=new Bm(a),c,d;a=new yx;for(d=new kl(b);d.b<d.d.Oc();)c=(N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++)),b=vt(this.i.q,c),this.Ld(b)&&il(a,c);0<a.a.Oc()&&Zk(this.i,new tx(this.i,a,null))};_.Ld=function(a){return il(this.k,a)?(Dt(a.c,a),this.f&&(this.g.a.Ge(a),il(this.n,a)),!0):!1};
+_.Ad=function(a){wx(this,a)};_.Hd=function(){this.f=!0};_.f=!1;B(483);x(641,626,{});_.xd=Dx;_.yd=Ex;_.zd=Tr;_.Ad=Ak;B(641);function Fx(a,b){if(b&&Wt(b,a.g)){var c=a.g;Qt(c.c,c);a.g=null}}function Gx(a,b){if(a.f&&b)throw new Z(lc);a.f=b;if(a.f)a.i=new xx(b),a.d=new bx(b),a.i&&(a.i.a=a.e),a.d&&(a.d.b=a.e);else{var c=a.i;Us(c.d.a);Us(c.e.a);Us(a.d.a.a);a.i=null;a.d=null}}function Hx(){}x(168,626,{200:1},Hx);
+_.Id=function(a){if(null==a)throw new H("Row cannot be null");return this.yd(a)?(Fx(this,this.g),Zk(this.f,new sx(this.f,null,a)),!0):!1};_.xd=Dx;_.yd=function(a){return!!this.g&&Wt(this.g,vt(this.f.q,a))};_.zd=function(){this.g&&this.Id(this.g?Rt(this.g):null)};_.Jd=function(a){var b;if(null==a)throw new H("Row cannot be null");b=this.g?Rt(this.g):null;var c;(c=vt(this.f.q,a))&&!Wt(c,this.g)?(Fx(this,this.g),c=this.g=c,Dt(c.c,c),c=!0):c=!1;return c?(Zk(this.f,new sx(this.f,a,b)),!0):!1};
+_.Ad=function(a){Gx(this,a)};_.e=!0;B(168);function xx(a){this.b=a;this.d=Pr(a,new Ix(this),a.F.a);this.e=Pr(a,new Jx(this),a.G.a)}x(177,1,{},xx);_.a=!0;_.c=!1;B(177);function Jx(a){this.a=a}x(133,1,{133:1},Jx);_.td=function(a){32==Ri(a.d)&&(this.a.c=!1)};B(133);function Ix(a){this.b=a}x(397,1,{},Ix);_.a=null;B(397);function Ow(a,b){this.a=a;this.b=b}x(398,1,{},Ow);
+_.sd=function(a){if(Ht(a.a,this.b)){a=this.a;var b=this.a.b.b,c;c=zt(b.q,this.b);b.S.yd(c)?a.b.a&&Hw(b,c):Iw(b,c);Us(this.a.a.a);this.a.a=null}};_.b=0;B(398);function Kx(){Kx=w;Lx=new Gk}function Mx(a,b){Kx();this.a=a;this.b=b}x(165,619,{},Mx);_.Cb=function(a){a.sort(this)};_.Db=function(){return Lx};_.Eb=Rn;var Lx;B(165);function Nx(a){Ox.call(this,a,(Px(),Qx))}
+function Ox(a,b){if(!a)throw new H("Grid column reference can not be null!");if(!b)throw new H("Direction value can not be null!");this.a=a;this.b=b}x(75,1,{},Nx,Ox);B(75);function Rx(){Rx=w;Ir();Wx=1/Math.sqrt(3);Xx=Math.tan(0.6981317007977318)}function ew(a){var b,c,d,e;a.p==(Yx(),Zx)&&(d=J(0,a.j.b),c=J(0,a.f.b),b=a.a.f*a.o,e=Lv(a.r)?xv(a.r):0,$x(a,d+b+e+c+v))}function su(a,b){return a.j.j!=b&&ii(a.j.j,b)?a.j:a.a.j!=b&&ii(a.a.j,b)?a.a:a.f.j!=b&&ii(a.f.j,b)?a.f:null}
+function ay(a){var b,c;0==a.a.e.b?Zk(a,new qv(0,0)):(c=by(a.a,cy(a.a.e)),b=by(a.a,dy(a.a.e))+1,Zk(a,new qv(c,b-c)))}function It(a){return 0==a.a.e.b?$(0,0):$(a.a.d,a.a.e.b)}function ey(a){return(0<a.j.k||0<a.a.k||0<a.f.k)&&0<a.c.a.b.length}function fy(a){return a.i.hasChildNodes()||a.b.hasChildNodes()||a.e.hasChildNodes()}
+function gy(a){if(a.X){a.G=J(0,kt((W(),a._)));a.q=J(0,jt(a._));hy(a.j);hy(a.f);iy(a.v);jy(a.a);var b=a.a.b,c;a=kt(b.f.D)-b.b;for(c=Kq(new Lq(b.a));c.a.Dc();)b=Mq(c),b.e.style[u]=a+(T(),v)}}function ky(a,b){null!=b&&b.length?a.n=b:a.n=oc;a.p==(Yx(),ly)&&$x(a,b)}function $x(a,b){var c;c=a.a.e.b;null!=b&&b.length?(W(),a._).style[t]=b:(W(),a._).style[t]=oc;gy(a);c!=a.a.e.b&&ay(a)}function my(a,b,c){switch(b.g){case 1:a.r.d=c;break;case 0:a.F.d=c;break;default:throw new Wr("Unexpected value: "+b);}}
+function ny(a,b){Mr((W(),a._),b);var c=a.F;oi(c.g,b+"-scroller");li(c.g,b+"-scroller-vertical");c=a.r;oi(c.g,b+"-scroller");li(c.g,b+"-scroller-horizontal");Mr(a.D,b+"-tablewrapper");Mr(a.k,b+"-header-deco");Mr(a.g,b+"-footer-deco");Mr(a.s,b+"-horizontal-scrollbar-deco");Mr(a.w,b+"-spacer-deco-container");c=a.j;oy(c,b);Mr(c.j,b+"-header");c=a.a;oy(c,b);Mr(c.j,b+"-body");var d;for(d=Kq(new Lq(c.b.a));d.a.Dc();)c=Mq(d),Mr(c.e,b+xc),Mr(c.a,b+yc);c=a.f;oy(c,b);Mr(c.j,b+vc)}
+function py(){Rx();var a,b;this.d=new bv;this.i=(W(),Mi());this.b=Li();b=$doc;this.e=(O(),b).createElement("tfoot");this.F=new aw;this.r=new Vv;this.j=new qy(this,this.i);this.a=new ry(this,this.b);this.f=new sy(this,this.e);this.v=new ty(this);this.c=new uy(this);this.s=Ii();this.k=Ii();this.g=Ii();this.w=Ii();this.p=(Yx(),ly);this.A=new vy(this);this.u=new wy(this);-1!=$wnd.navigator.userAgent.indexOf("Firefox")?this.t=new jv:(b=$doc.body.style,void 0!==b[hc]?void 0!==b.transformStyle?this.t=new kv:
+this.t=new mv:void 0!==b[ic]?this.t=new nv:this.t=new jv);ge(xy);ie(this.t.cZ);this._=b=Ii();var c,d;a=new yy(this);c=ht();(Ws(),!Xs&&(Xs=new Ys),Ws(),Xs).a.f&&(at()?c+=2:c+=1);b.appendChild(this.F.g);rv(this.F,a);Jv(this.F,c);$s((!Xs&&(Xs=new Ys),Xs))&&(d=this.F.g.style,d.right=xv(this.F)-1+(T(),v));b.appendChild(this.r.g);rv(this.r,a);Jv(this.r,c);a=this.r;c=new zy(this);bl((!a.a&&(a.a=new ml(a)),a.a),(bw(),cw),c);0==ht()&&(this.F.g.style.zIndex="90",this.r.g.style.zIndex="90");this.D=Ii();b.appendChild(this.D);
+a=Oi();this.D.appendChild(a);a.appendChild(this.i);a.appendChild(this.b);a.appendChild(this.e);a=this.k.style;a[u]=xv(this.F)+(T(),v);c=(Zi(),mb);a[l]=c;b.appendChild(this.k);a=this.g.style;a[u]=xv(this.F)+v;a[l]=mb;b.appendChild(this.g);a=this.s.style;a[l]=mb;a[t]=xv(this.r)+v;b.appendChild(this.s);ny(this,"v-escalator");this.w.setAttribute("aria-hidden",sb);this.n=oc;this.p==ly&&$x(this,null);this._.style[u]="500.0px";gy(this)}
+function Ay(a,b,c,d,e,f){Rx();var g;g=e-d;switch(a.g){case 0:return a=b-f,a<d?a:c+f>e?c+f-g:d;case 3:return c+f-g;case 2:return b+(c-b)/2-g/2;case 1:return b-f;default:throw new H("Internal: ScrollDestination has been modified, but Escalator.getScrollPos has not been updated to match new values.");}}function By(a,b,c){Rx();var d,e,f;f=we(Cy,h,645,2,7);0!=a&&0!=b?(d=0>=a?0-a:a,e=0>=b?0-b:b,f[0]=d/e<c?0:a,f[1]=e/d<c?0:b):(f[0]=a,f[1]=b);return f}
+function Dy(a,b){if(!a)throw new H("Destination cannot be null");if(a==(Qw(),Ey)&&0!=b)throw new H("You cannot have a padding with a MIDDLE destination");}x(344,18,Ub,py);
+_.sc=function(){var a,b,c;Fy(this.j);Fy(this.a);Fy(this.f);Gy(this.j,0,this.j.k);Gy(this.f,0,this.f.k);dt((Dh(),Eh),new Hy(this));c=!1;for(b=new kl(this.c.a);b.b<b.d.Oc();)a=(N(b.b<b.d.Oc()),b.d.Me(b.c=b.b++)),a.c?(a.c=!1,Iy(a,a.b),a=!0):a=!1,a&&(c=!0);c&&(Jy(this.j),Jy(this.a),Jy(this.f));b=this.F;b.kd(b.k|0);b=this.r;b.kd(b.k|0);Ky(this.v,this.F.g);Ky(this.v,this.r.g);b=this.v;c=(W(),this._);c.addEventListener?c.addEventListener("onmousewheel"in c?Gb:"wheel",b.d):c.attachEvent("onmousewheel",b.d);
+b=this.v;c=this._;c.addEventListener&&(c.addEventListener(Ib,b.j),c.addEventListener(Kb,b.i),c.addEventListener(Mb,b.f),c.addEventListener(Nb,b.f))};
+_.tc=function(){var a,b,c,d;Ly(this.v,this.F.g);Ly(this.v,this.r.g);a=this.v;c=(W(),this._);c.addEventListener?c.removeEventListener(void 0===c.onwheel?Gb:"wheel",a.d):c.detachEvent("onmousewheel",a.d);a=this.v;c=this._;c.removeEventListener&&(c.removeEventListener(Ib,a.j),c.removeEventListener(Kb,a.i),c.removeEventListener(Mb,a.f),c.removeEventListener(Nb,a.f));My(this.j,0,this.j.k);My(this.f,0,this.f.k);c=Ny(this.a);for(a=0;a<c;a++)b=c-a-1,d=this.b.rows[b],Oy(this.a,d,b),b=this.u,rl(b.b,d),rl(b.a,
+d);Py(this.a.e);a=this.a;Yl();a.d=0};_.n="";_.o=10;_.q=0;_.B=0;_.C=0;var Wx=_.G=0,Xx=0,xy=B(344);x(362,1,{},function(a){this.a=a});_.ib=Qy;B(362);function yy(a){this.a=a}x(363,1,{},yy);_.od=function(){Ry(this.a.v);Zk(this.a,new Zv)};B(363);function zy(a){this.a=a}x(364,1,{},zy);B(364);function Hy(a){this.a=a}x(365,1,{},Hy);_.ib=Qy;B(365);
+function Sy(a,b,c){if(1>c)throw new H(qc+c+")");if(0>b||b+c>a.k)throw new Wh("The given row range ("+b+".."+(b+c)+") was outside of the current number of rows ("+a.k+")");}function Fy(a){dt((Dh(),Eh),new Ty(a))}function Uy(a){var b,c;a.n.X?(c=(W(),Ni()),oi(c,a.i+rc),b=Sq(a.Md()),oi(b,a.i+"-cell"),(O(),P).yb(b,"Ij"),c.appendChild(b),a.j.appendChild(c),b=jt(b),a.f=1>b?1:b,a.j.removeChild(c),a.j.hasChildNodes()&&(a.Rd(),ew(a.n))):a.g=!0}
+function Vy(a,b){var c;c=Sq(a.Md());c.style[t]=a.f+(T(),v);0<=b&&(c.style[u]=b+v);li(c,a.i+"-cell");return c}function Wy(a,b){var c,d,e,f;if(!b)throw new H("Element cannot be null");if(a.j==b||hi((O(),b))==a.j||!ii(a.j,b))return null;for(c=b;gi(hi((O(),c)))!=a.j;)c=hi(c);d=-1;for(e=c;e;e=Ci(e))++d;e=-1;for(f=hi(c);f;f=Ci(f))++e;return new Pu(e,d,c)}
+function Xy(a,b){var c,d,e,f,g,m,n,p;e=-1;m=a.j.rows;for(f=0;f<m.length;f++)g=m[f],!(d=g.cells[b])||(n=1<d.colSpan,p=oe((Zi(),mb),Ui(d.style)),n||p)||(c=d.cloneNode(!0),c.style[t]="",c.style[u]="",g.insertBefore(c,d),d=kt(c),(Ws(),!Xs&&(Xs=new Ys),Ws(),Xs).a.f&&(d+=0.01),e=d>e?d:e,ki(c));return e}function Yy(a,b){return Zy(a.n.u,b)}function $y(a,b,c){c?(c=c?c.nextSibling:null)?a.insertBefore(b,c):a.appendChild(b):a.insertBefore(b,a.firstChild);return b}
+function Ft(a,b,c){var d,e;if(0>b||b>a.k)throw new Wh("The given index ("+b+") was outside of the current number of rows (0.."+a.k+")");if(1>c)throw new H(qc+c+")");a.k+=c;if(a.n.X&&(a.Pd(b,c),a.k==c)){c=new mh;for(d=0;d<a.n.c.a.b.length;d++)e=new Y(az(a.n.c,d)),b=I(d),bz(c.d,b,e);cz(a.n.c,c)}}
+function dz(a,b,c,d){var e,f;for(e=0;e<a.Nd();e++){f=a.Od(e);var g=a,m=b,n=c,p=void 0,q=void 0,r=q=void 0,s=void 0,z=r=void 0;Zu(g.n.d,f,e,ez(g.n.c));s=new ev(g.n.d,m,n);for(q=new cv(new dv(s.a.a,s.c,s.c+s.b),!1);q.c+q.d<q.a.b.length;)p=fv(q),r=Au(g.n.c,p.a),r=Vy(g,r),p.c=r;g.o.Vc(g.n.d,s);0!=m?z=f.childNodes[m-1]:z=null;for(q=new cv(new dv(s.a.a,s.c,s.c+s.b),!1);q.c+q.d<q.a.b.length;)p=fv(q),z=$y(f,p.c,z);g.o.Tc(g.n.d,s);g.o.Xc(g.n.d,s)}fz(a);if(d)for(d=b;d<b+c;d++)gz(a,d,!0)}
+function Gy(a,b,c){var d,e,f,g,m,n;d=new G;if(1>c)return d;0!=a.j.childNodes.length&&0!=b?g=a.j.childNodes[b-1]:g=null;for(m=b;m<b+c;m++){n=(W(),Ni());d.b[d.b.length]=n;li(n,a.i+rc);for(f=0;f<a.n.c.a.b.length;f++)e=Au(a.n.c,f),e=Vy(a,e),n.appendChild(e),f<a.n.c.b&&(li(e,sc),a.n.t.Zc(e,a.n.v.b,0));f=a;Zu(f.n.d,n,m,ez(f.n.c));f.o.Vc(f.n.d,Xu(f.n.d));g=$y(f.j,n,g);f.o.Tc(f.n.d,Xu(f.n.d));f.o.Xc(f.n.d,Xu(f.n.d))}fz(a);a.Sd();return d}
+function hz(a,b,c){var d,e,f;for(f=0;f<a.Nd();f++){e=a.Od(f);Zu(a.n.d,e,f,ez(a.n.c));d=new Yu(a.n.d,b,c);a.o.Wc(a.n.d,d);for(d=0;d<c;d++)ki(e.cells[b]);e=new ev(a.n.d,b,c);a.o.Uc(a.n.d,e)}}function Oy(a,b,c){Zu(a.n.d,b,c,ez(a.n.c));a.o.Wc(a.n.d,Xu(a.n.d));ki(b);a.o.Uc(a.n.d,Xu(a.n.d))}
+function Jy(a){var b,c,d,e,f,g;for(d=si(a.j);d;){b=ti((O(),d));for(c=0;b;)e=(f=parseInt(b[gc])|0,g=$(c,f),g.a>a.n.c.a.b.length&&(g=new yt(c,a.n.c.a.b.length)),iz(a.n.c,g)),b.style[u]=e+(T(),v),b=Bi(b),++c;d=Bi(d)}fz(a)}function jz(a,b){var c;for(c=ti((O(),a));c;)c.style[t]=b+(T(),v),c=Bi(c)}function fz(a){var b;b=kz(a.n.c);if(!(0>b))for(a=si(a.j);a;)a.style[u]=b+(T(),v),a=Bi((O(),a))}function lz(a,b,c,d){Zu(a.n.d,b,c,ez(a.n.c));a.o.Xc(a.n.d,new Yu(a.n.d,d.b,d.a-d.b))}
+function Mt(a,b,c){c=$(b,c);b=$(0,a.n.c.a.b.length);a.Td(c,b)}function Gt(a,b,c){Sy(a,b,c);a.k-=c;a.n.X&&fy(a.n)&&a.Qd(b,c)}function gz(a,b,c){var d,e,f;e=a.j.rows;for(f=0;f<e.length;f++)d=e[f],a.Ud(d)&&(d=d.cells[b],c?li(d,sc):(yi(d,sc),a.n.t.Yc(d)));c&&mz(a,b,a.n.v.b)}function nz(a,b){a.o=b;ey(a.n)&&0<a.k&&Mt(a,0,a.k)}function oy(a,b){var c,d;c=a.i;if(null==c?null!=b:c!==b)for(a.i=b,d=a.j.rows[0];d;){Mr(d,b+rc);for(c=d.cells[0];c;)Mr(c,b+"-cell"),c=Bi((O(),c));d=Bi((O(),d))}}
+function mz(a,b,c){var d,e,f;e=a.j.rows;for(f=0;f<e.length;f++)d=e[f],a.Ud(d)&&(d=d.cells[b],a.n.t.Zc(d,c,0))}function oz(a,b){this.n=a;this.o=(Qu(),Ru);this.j=b}x(172,1,{});_.$c=function(a){return Wy(this,a)};_._c=pz;_.ad=function(a){return this.Od(a)};_.bd=function(a){Mt(this,a,1)};_.f=20;_.g=!0;_.i=null;_.k=0;B(172);function Ty(a){this.a=a}x(359,1,{},Ty);_.ib=function(){this.a.g&&this.a.n.X&&(Uy(this.a),this.a.g=!1)};B(359);
+function Bu(a,b){if(0<=b&&b<a.j.childNodes.length)return a.j.rows[b];throw new Wh(tc+b);}function My(a,b,c){var d,e;for(d=b;d<b+c;d++)e=a.j.rows[b],Oy(a,e,b);hy(a)}function hy(a){var b;b=a.f*a.k;b!=a.b&&(a.b=b,a.Vd(),Bv(a.c.F,a.c.q-J(0,a.c.j.b)-J(0,a.c.f.b)),jy(a.c.a),qz(a.c.a.b))}x(173,172,{});_.Nd=function(){return this.j.childNodes.length};_.Od=function(a){return Bu(this,a)};_.Pd=function(a,b){Gy(this,a,b)};_.Qd=function(a,b){My(this,a,b)};
+_.Rd=function(){var a;if(0!=this.j.childNodes.length){for(a=this.j.rows[0];a;)jz(a,this.f),a=Bi((O(),a));hy(this)}};_.Sd=function(){hy(this)};_.Td=function(a,b){var c,d;Sy(this,a.b,a.a-a.b);if(this.c.X&&ey(this.c))for(c=a.b;c<a.a;c++)d=Bu(this,c),lz(this,d,c,b)};_.Ud=function(){return!0};_.b=0;B(173);function rz(a,b){var c,d;if(b.b>=b.a)return b;if(0==a.e.b)return $(0,0);d=sz(a);c=by(a,cy(a.e));d=pt(b,$(c,d))[1];return 0==-c?d:new yt(d.b+-c,d.a+-c)}
+function tz(a,b,c){var d,e,f;d=sz(a)-(a.j.childNodes.length-(V(),(new uz(new Lq(a.b.a))).b.Oc()));c=c<d?c:d;if(0<c){c=Gy(a,b,c);vz(a.e,b,c);f=b*a.f+wz(new Lq(xz(a.b.a,I(b))));for(d=b;d<a.e.b;d++)d-b<c.b.length?e=(Vh(d-b,c.b.length),c.b[d-b]):e=yz(a.e,d),zz(a.n.u,e,0,f),f+=a.f,f+=Az(a.b,d);return c}return sl}function Ny(a){return a.j.childNodes.length-(V(),(new uz(new Lq(a.b.a))).b.Oc())}function Bz(a){a=((a.c.D.offsetHeight||0)|0)-J(0,a.c.f.b)-J(0,a.c.j.b);return 0>a?0:a}
+function Cz(a,b){var c;c=Dz(a.b,0,(Ez(),Fz),b);return A((b-c)/a.f)}function by(a,b){var c;c=Gz(a.e,b);return a.d+c}function sz(a){a=A(Ou(Bz(a)/a.f))+1;return 0>a?0:a}function Hz(a,b){var c;if(0>b||b>=a.k)throw new Wh("No such logical index: "+b);c=b-by(a,cy(a.e));if(0<=c&&c<a.e.b)return Iz(a,c);throw new Z("Row with logical index "+b+" is currently not available in the DOM");}function Jz(a,b,c){var d;d=c-b;a=Dz(a.b,b,(Ez(),Fz),c);return d-a}
+function Kz(a,b){return wz(new Lq(xz(a.b.a,I(b))))+b*a.f}function Iz(a,b){if(0<=b&&b<a.e.b)return yz(a.e,b);throw new Wh(tc+b);}
+function Lz(a,b,c,d){var e,f,g,m;if(!(b.b>=b.a)){b.b<c?e=c-(b.a-b.b):e=c;if(b.b!=e){g=new vx(b.a-b.b);for(f=0;f<b.a-b.b;f++)c=Mz(a.e,b.b),g.b[g.b.length]=c;vz(a.e,e,g)}g=Nz(a.e,e);for(f=d;f<d+(b.a-b.b);f++)c=(N(g.b!=g.d.c),g.c=g.b,g.b=g.b.a,++g.a,g.c.c),lz(a,c,f,$(0,a.n.c.a.b.length));m=Kz(a,d);g=Nz(a.e,e);for(f=0;f<b.a-b.b;f++)c=(N(g.b!=g.d.c),g.c=g.b,g.b=g.b.a,++g.a,g.c.c),zz(a.n.u,c,0,m),m+=a.f,m+=Az(a.b,d+f)}}
+function Oz(a,b){var c,d,e,f,g;if(0!=b){d=a.c.C+b;Av(a.c.F,d);c=a.f;e=b-b%c;c=A(b/c);ft();if(0.49<(0>=e?0-e:e)){a:{var m=a.b;f=a.c.C;g=(Ez(),Fz);var n,p,q;p=new eq(new Lq(m.a));for(m=0;m<p.b.length;m++){n=(Vh(m,p.b.length),p.b[m]);q=Zy(n.i.f.u,n.e);n=q+n.d;if(q>f){f=new dv(p,m,p.b.length);break a}if(n>f){f=g==(Ez(),Pz)?new dv(p,m+1,p.b.length):new dv(p,m,p.b.length);break a}}f=(V(),V(),Qz)}for(g=f.xc();g.Dc();)f=g.Ec(),Rz(f,Sz(f.i.f.u,f.e),Zy(f.i.f.u,f.e)+e),Tz(f,f.f+c);for(f=Nz(a.e,0);f.b!=f.d.c;)c=
+(N(f.b!=f.d.c),f.c=f.b,f.b=f.b.a,++f.a,f.c.c),g=Zy(a.n.u,c)+e,zz(a.n.u,c,0,g)}Uz(a,a.c.B,d)}}function Uz(a,b,c){a.c.B=b;a.c.C=c;a.c.t.Zc(a.c.b,-a.c.B,-a.c.C);a.c.t.Zc(a.c.w,0,-a.c.C)}
+function Vz(a){var b,c,d,e,f;b=null;ft();if((d=$wnd.document.activeElement?$wnd.document.activeElement:null)&&ii(a.j,d))for(;d&&d!=a.j;)d&&pe("tr",(O(),d).tagName)&&(b=d),d=hi((O(),d));c=new eq(a.e);f=new Wz(a.c.a.b.a);for(d=-1;d<a.e.b;d++)if(e=rl(f,I(a.d+d)))Xz(c,d+1,e.e),e.e.style[l]="",e.a.style[l]="";for(e=Kq(new Lq(f));e.a.Dc();)d=Mq(e),d.e.style[l]=(Zi(),mb),d.a.style[l]=mb;d=!b;for(c=new Yz(c,c.b.length);0<c.b;)if(f=(N(0<c.b),c.a.Me(c.c=--c.b)),f==b)d=!0;else if(d)e=a.j,e.insertBefore(f,e.firstChild);
+else{e=a.j;var g=void 0;(g=b?b.nextSibling:null)?e.insertBefore(f,g):e.appendChild(f)}}
+function jy(a){var b,c,d,e;if(a.c.X){e=sz(a);e=En(e,a.c.a.k);e-=a.e.b;if(0<e)d=a.e.b,0==a.e.b?c=0:c=by(a,dy(a.e))+1,(b=c<a.k-e)?(b=tz(a,d,e),Lz(a,$(d,b.Oc()),d,c)):(c=a.c.F.k,Av(a.c.F,0),Ry(a.c.v),tz(a,d,e),Av(a.c.F,c),Ry(a.c.v));else if(0>e){d=Nz(a.e,a.e.b);for(c=0;c<-e;c++)b=(N(d.b.b!=d.d.a),d.c=d.b=d.b.b,--d.a,d.c.c),ki(b),Zz(d);0!=a.e.b&&(d=Yy(a,cy(a.e)),c=a.c.C-a.f,d<c&&(c=by(a,dy(a.e))+1,Lz(a,new yt(0,1),a.e.b,c)))}0!=e&&ay(a.c)}}
+function ry(a,b){this.c=a;oz.call(this,a,b);this.e=new Ep;this.d=0;this.a=new $z(this);this.b=new aA(this.c)}x(350,172,{},ry);_.$c=function(a){var b;a=Wy(this,a);if(!a)return null;b=gi(a.b);return new Pu(by(this,b),a.a,a.b)};_.Md=bA;_.Nd=function(){return Ny(this)};_.ad=function(a){return Hz(this,a)};_.Od=function(a){return Iz(this,a)};
+_.Pd=function(a,b){var c,d,e,f,g;if(0!=b)if(cA(this.b,a,b),c=tz(this,a,b),iy(this.c.v),d=a*this.f<this.c.F.k,e=a*this.f>this.c.F.k+Bz(this),d)d=b*this.f,Oz(this,d),d=this.d+b,Yl(),this.d=d;else if(!e){d=a+c.Oc();e=by(this,cy(this.e));c=b-c.Oc();if(0<c)for(f=rz(this,$(d,c)),c=this.j.childNodes.length-(V(),(new uz(new Lq(this.b.a))).b.Oc()),f=c-(f.a-f.b),g=d-e,Lz(this,new yt(f,c),g,d),e=(d+(c-f))*this.f,c=Nz(this.e,g+(c-f));c.b!=c.d.c;)e+=Az(this.b,d++),f=(N(c.b!=c.d.c),c.c=c.b,c.b=c.b.a,++c.a,c.c.c),
+zz(this.n.u,f,0,e),e+=this.f;ay(this.c);Vz(this)}};
+_.Qd=function(a,b){var c,d,e,f,g,m,n,p,q;if(0!=b){g=It(this.c);n=$(a,b);c=this.b;e=I(n.b);p=I(n.a);e=new dA(c.a,(eA(),fA),e,!0,p);if(gA(e)){for(d=Kq(new Lq(e));d.a.Dc();)p=Mq(d),c.e.pd(p),hA(p,0),ki(p.e),ki(p.a);for(e=(new iA(e,e)).b.Ye();jA(e.a);)e.b=kA(e.a),lA(e);0==c.a.c&&(Us(c.d.a),c.d=null)}cA(c,n.b,-(n.a-n.b));g=pt(n,g);n=g[0];g=g[1];c=rz(this,g);e=c.b<c.a&&0==c.b;if(n.b<n.a||e)p=(n.a-n.b)*this.f,d=this.f,d=this.c.F.k-p<d,!(c.b>=c.a)||d&&e?d&&Oz(this,-this.c.F.k):Oz(this,-p);if(c.b<c.a){e=Ny(this.c.a);
+p=this.k;if(p<e){d=e-p;for(f=0;f<d;f++)p=Mz(this.e,c.b),Oy(this,p,a),q=this.n.u,rl(q.b,p),rl(q.a,p);e-=d;Uz(this.c.a,this.c.B,0);c=g.b;for(g=Kz(this,c);c<e;c++)p=yz(this.e,c),zz(this.n.u,p,0,g),g+=this.f,g+=Az(this.b,c);g=b-d;for(f=0>e-g?0:e-g;f<e;f++)p=yz(this.e,f),lz(this,p,f,$(0,this.n.c.a.b.length))}else if(d=this.k*this.f,q=this.c.C+Bz(this),q<=d)for(e=this.e.b,p=by(this,dy(this.e))-(c.a-c.b-1),Lz(this,c,e,p),d=Nz(this.e,c.b),q=Kz(this,g.b),p=c.b;p<e-(c.a-c.b);p++)f=(N(d.b!=d.d.c),d.c=d.b,d.b=
+d.b.a,++d.a,d.c.c),zz(this.n.u,f,0,q),q+=this.f,q+=Az(this.b,p+g.b);else if(0>=c.b&&0<c.a&&b>=this.e.b)g=this.c.r.k,c=d-this.e.b*this.f,Uz(this,g,c),c=$(0,this.e.b),g=this.k-(c.a-c.b),Lz(this,c,0,g);else if(d+b*this.f-q<this.f){e=by(this,cy(this.e))-(c.a-c.b);Lz(this,c,0,e);c=c.a;p=Nz(this.e,c);d=Kz(this,g.b);for(e=0;p.b!=p.d.c;)q=(N(p.b!=p.d.c),p.c=p.b,p.b=p.b.a,++p.a,p.c.c),zz(this.n.u,q,0,d),d+=this.f,d+=Az(this.b,c+e++);g=this.d+-(g.a-g.b);Yl();this.d=g}else{m=Yy(this,yz(this.e,c.b));for(f=0;f<
+c.a-c.b;f++){p=Mz(this.e,c.b);var r=this.e;Fp(r,p,r.c.b,r.c)}for(f=c.b;f<e;f++)p=yz(this.e,f),r=A(m),zz(this.n.u,p,0,r),m+=this.f,m+=Az(this.b,f+g.b);g=d-Bz(this);Av(this.c.F,g);Ry(this.c.v);Lz(this,new yt(e-1,e-1+1),0,by(this,cy(this.e))-1);g=this.d+-1;Yl();this.d=g;g=A(Ou((q-d)/this.f));c=e-(c.a-c.b-g);e=new yt(c,e);g=by(this,cy(this.e))+c;Lz(this,e,c,g)}ay(this.c);Vz(this)}n=this.d+-(n.a-n.b);Yl();this.d=n;iy(this.c.v)}};
+_.Rd=function(){var a,b,c;if(0!=this.e.b){for(a=0;a<this.e.b;a++)c=yz(this.e,a),jz(c,this.f),b=this.d+a,zz(this.n.u,c,0,b*this.f);a=this.c.F.k/vv(Vi(this.c.F.n.style,t));iy(this.c.v);Av(this.c.F,A(this.f*this.k*a));Uz(this,this.c.r.k,this.c.F.k);Ry(this.c.v);jy(this);a=A(Yy(this,cy(this.e))/this.f);Yl();this.d=a}};_.Sd=Tr;_.Td=function(a,b){var c,d,e;e=rz(this,a);if(e.b<e.a)for(c=by(this,cy(this.e)),d=e.b;d<e.a;d++)lz(this,yz(this.e,d),c+d,b)};_.Ud=function(a){return mA(this.e,a,!1)};_.d=0;B(350);
+function nA(a){a.f=!0;oA(a);a.a=(!De&&(De=Ee()?new Fe:new Ke),De).ab(a.b,null)}function oA(a){a.a&&(a.a.cb(),a.a=null);a.d=Ie();a.c=0}function $z(a){this.e=a;this.b=new pA(this)}x(351,1,{},$z);_.c=0;_.d=0;_.f=!1;B(351);function pA(a){this.a=a}x(360,1,{},pA);_.bb=function(){++this.a.c;var a=this.a,b,c,d;b=3<=a.c;c=50<=Ie()-a.d;d=!a.e.c.v.a;if(b=b&&c&&d)oA(a),Vz(a.e);b?this.a.f=!1:this.a.a=(!De&&(De=Ee()?new Fe:new Ke),De).ab(this,null)};B(360);function kz(a){return iz(a,new yt(0,a.a.b.length))}
+function qA(a,b){if(!Ht($(0,a.a.b.length),b))throw new H("The given column index ("+b+") does not exist");}function ez(a){var b;if(null==a.d||a.d.length!=a.a.b.length)for(a.d=we(Cy,h,645,a.a.b.length,7),b=0;b<a.a.b.length;b++)a.d[b]=rA(hv(a.a,b));return a.d}function iz(a,b){var c,d,e;e=0;for(d=b.b;d<b.a;d++)c=rA(hv(a.a,d)),e+=c;return e}function az(a,b){qA(a,b);return hv(a.a,b).b}function Au(a,b){return rA(hv(a.a,b))}
+function sA(a,b,c){var d,e,f,g;d=a.c.A;tA(d,0.1);d.a=!1;if(0>b||b>a.a.b.length)throw new Wh("The given index("+b+") was outside of the current number of columns (0.."+a.a.b.length+")");if(1>c)throw new H("Number of columns must be 1 or greater (was "+c);d=a.c.d;for(f=0;f<c;f++)e=b+f,Xz(d.a,e,new Vu(d,e));$u(d,b+c);for(d=0;d<c;d++)Xz(a.a,b,new uA(a));(d=b<a.b)&&(a.b+=c);f=vv(Vi(a.c.r.g.style,u))<vv(Vi(a.c.r.n.style,u));iy(a.c.v);e=vv(Vi(a.c.r.g.style,u))<vv(Vi(a.c.r.n.style,u));!f&&e&&jy(a.c.a);dz(a.c.j,
+b,c,d);dz(a.c.a,b,c,d);dz(a.c.f,b,c,d);if(0<a.c.j.k||0<a.c.a.k||0<a.c.f.k){e=new mh;g=new Y(100);for(f=b;f<b+c;f++)d=I(f),bz(e.d,d,g);cz(a.c.c,e)}d=iz(a.c.c,$(0,b));a.c.v.b>d&&(b=iz(a.c.c,$(b,c)),Av(a.c.r,a.c.v.b+b))}
+function vA(a,b,c){if(1>c)throw new H("Number of columns can't be less than 1 (was "+c+")");if(0>b||b+c>a.a.b.length)throw new Wh("The given column range ("+b+".."+(b+c)+") was outside of the current number of columns ("+a.a.b.length+")");var d,e,f;vv(Vi(a.c.r.g.style,u))>=vv(Vi(a.c.r.n.style,u))||(d=iz(a,new yt(0,b)),f=iz(a,$(b,c)),e=a.c.r.k,e<=d||Av(a.c.r,d>e-f?d:e-f));hz(a.c.j,b,c);hz(a.c.a,b,c);hz(a.c.f,b,c);d=a.c.d;e=new dv(d.a,b,b+c);wA(e,e.b);$u(d,b);d=new dv(a.a,b,b+c);wA(d,d.b);b<a.b&&(b+
+c<a.b?a.b-=c:a.b=b);iy(a.c.v);jy(a.c.a);0<a.c.c.a.b.length&&(b=a.c.j,0<b.k&&fz(b),b=a.c.a,0<b.k&&fz(b),a=a.c.f,0<a.k&&fz(a))}
+function cz(a,b){var c,d,e;if(!b.xe()){for(d=b.De().xc();d.Dc();){c=d.Ec();e=c.We().a;c=c.ke().a;if(e==a.a.b.length-1){var f=a.c.A;tA(f,0.1);f.a=!1}qA(a,e);Iy(hv(a.a,e),c)}a.d=null;Jy(a.c.j);Jy(a.c.a);Jy(a.c.f);d=a.c.A;if(e=!d.a)a:{var g,m;if(0<d.b.j.k)c=d.b.j;else if(0<d.b.a.k)c=d.b.a;else if(0<d.b.f.k)c=d.b.f;else{e=!1;break a}e=0;if(m=c.j.rows[0]){f=m.cells;for(g=0;g<f.length;g++)c=f[g],oe(Ui(c.style),(Zi(),mb))||(e+=gt(c).width);c=gt(m).width;e=e>=c}else e=!1}e&&(tA(d,-0.1),xA(d.b.j),xA(d.b.a),
+xA(d.b.f),d.a=!0);gy(a.c)}}function uy(a){this.c=a;this.a=new G}x(352,1,{},uy);_.b=0;_.d=null;B(352);function rA(a){return a.c?-1:a.a}function Iy(a,b){a.b=b;if(0>b)if(a.d.c.X){var c=a.d,d=bq(a.d.a,a),e,f;f=Xy(c.c.j,d);e=Xy(c.c.a,d);c=Xy(c.c.f,d);a.a=f>(e>c?e:c)?f:e>c?e:c}else a.c=!0;else a.a=b}function uA(a){this.d=a}x(353,1,{},uA);_.a=100;_.b=-1;_.c=!1;B(353);function Sz(a,b){var c;c=U(a.a,b);if(!c)throw new H("Element "+b+uc);return c.a}
+function Zy(a,b){var c;c=U(a.b,b);if(!c)throw new H("Element "+b+uc);return c.a}function zz(a,b,c,d){a.c.t.Zc(b,c,d);pl(a.b,b,new Y(d));pl(a.a,b,new Y(c))}function wy(a){this.c=a;this.b=new mh;this.a=new mh}x(357,1,{},wy);B(357);
+function yA(a,b,c,d){this.f=a;this.g=-7<(7>b/d?b/d:7)?7>b/d?b/d:7:-7;this.i=-7<(7>c/d?c/d:7)?7>c/d?c/d:7:-7;this.b=a.r.k;this.c=a.F.k;a=By(this.g,this.i,(Rx(),Wx));this.g=a[0];this.i=a[1];0.005<this.g*this.g+this.i*this.i?(this.d=1500,this.j=this.g/this.d,this.k=this.i/this.d):this.d=0}x(346,1,{},yA);
+_.bb=function(){var a,b,c,d,e;0>=this.d||this.a?this.f.v.a=null:(e=Ie(),0==this.e?this.e=e:(a=this.f.r.k,b=this.f.F.k,d=e-this.e,c=a-this.g*d,Av(this.f.r,c),this.g-=this.j*d,c=b-this.i*d,Av(this.f.F,c),this.i-=this.k*d,this.b==this.f.r.k&&this.c==this.f.F.k&&(this.a=!0),this.e=e,this.d=A(this.d-d),this.b=a,this.c=b),(!De&&(De=Ee()?new Fe:new Ke),De).ab(this,null))};_.a=!1;_.b=0;_.c=0;_.d=0;_.e=0;_.g=0;_.i=0;_.j=0;_.k=0;B(346);function sy(a,b){this.c=this.a=a;oz.call(this,a,b);this.b=0}
+x(349,173,{},sy);_.Md=bA;_.Vd=function(){var a;a=A(Ev(this.a.q-J(0,this.a.j.b)-J(0,this.a.f.b)));kz(this.a.c)>this.a.G&&(a=A(a-xv(this.a.r)));this.a.g.style[t]=J(0,this.a.f.b)+(T(),v);Bv(this.a.F,a)};B(349);function qy(a,b){this.c=this.a=a;oz.call(this,a,b);this.b=0}x(348,173,{},qy);_.Md=function(){return"th"};_.Vd=function(){var a;a=J(0,this.b);this.a.b.style.marginTop=a+(T(),v);this.a.w.style.marginTop=a+v;this.a.F.g.style.top=a+v;this.a.k.style[t]=a+v};B(348);
+function zA(a,b,c,d){if(!isNaN(b)){var e=a.r;0!=b&&Av(e,e.k+b)}isNaN(c)||(e=a.F,0!=c&&Av(e,e.k+c));c=0!=c&&Lv(a.F);a=0!=b&&Lv(a.r);(c||a)&&(O(),P).rb(d)}function AA(a){return He(function(b){a.Wd(b)})}function BA(a){return He(function(b){a.Xd(b)})}function CA(a){return He(function(b){a.Yd(b)})}function DA(a){this.q=new EA(this);this.d=a}x(345,1,{},DA);
+_.Wd=function(a){var b,c;this.s=Si(a).length;if(0==this.s){a=this.k-this.j;(b=0>this.f||0>this.i)?(b=this.p.targetTouches[0].pageX,c=this.p.targetTouches[0].pageY):(c=this.i,b=this.f);b-=this.e;c-=this.g;var d=this.d.v;d.a=new yA(d.c,b,c,a);(!De&&(De=Ee()?new Fe:new Ke),De).ab(d.a,null);nA(this.d.a.a)}};_.Xd=function(a){this.p=a;this.a&&this.a.cb();this.a=(!De&&(De=Ee()?new Fe:new Ke),De).ab(this.q,this.d.b);Ti(a)};
+_.Yd=function(a){this.s=Si(a).length;if(1==this.s){var b=this.d.v;b.a&&(b.a.a=!0);this.n=a.targetTouches[0].pageX;this.o=a.targetTouches[0].pageY;this.e=this.n;this.f=-1;this.g=this.o;this.i=-1;this.j=Wl(Pl(Ie()));this.k=0;this.r=!0}};_.b=0;_.c=0;_.e=-1;_.f=-1;_.g=-1;_.i=-1;_.j=0;_.k=0;_.n=0;_.o=0;_.r=!0;_.s=0;B(345);function EA(a){this.a=a}x(358,1,{},EA);
+_.bb=function(){var a,b,c;1==this.a.s&&(a=this.a.p.targetTouches[0].pageX,b=this.a.p.targetTouches[0].pageY,100<Wl(Pl(Ie()))-this.a.k&&(this.a.k=Wl(Pl(Ie())),this.a.i=b,this.a.f=a),this.a.b=a-this.a.n,this.a.c=b-this.a.o,this.a.n=a,this.a.o=b,this.a.r&&(a=this.a.b,b=this.a.c,c=By(this.a.b,this.a.c,(Rx(),Xx)),this.a.b=c[0],this.a.c=c[1],0!=a&&this.a.b==a&&0!=b&&this.a.c==b&&(this.a.r=!1)),zA(this.a.d,-this.a.b,-this.a.c,this.a.p))};B(358);x(343,1,{});B(343);
+function Ky(a,b){b.addEventListener?b.addEventListener(Eb,a.e):b.attachEvent("onscroll",a.e)}function FA(a){return He(function(b){var c=b.deltaX?b.deltaX:-0.5*b.wheelDeltaX,d=b.deltaY?b.deltaY:-0.5*b.wheelDeltaY;isNaN(d)&&(d=-0.5*b.wheelDelta);zA(a,c,d,b)})}function GA(a){var b=a.F,c=b.cd(),d=a.r,e=d.cd();return He(function(a){a=a.target||a.srcElement;a===c?b.nd():a===e?d.nd():$wnd.console.error("unexpected scroll target: "+a)})}
+function Ly(a,b){b.addEventListener?b.removeEventListener(Eb,a.e):b.detachEvent("onscroll",a.e)}
+function Ry(a){var b,c,d;d=a.c.F.k;c=a.c.r.k;if(a.b!=c){for(b=0;b<a.c.c.b;b++)mz(a.c.j,b,c),mz(a.c.a,b,c),mz(a.c.f,b,c);a.c.t.Zc(a.c.i,-c,0);y(a.c.t,103)?a.c.e.style[Wb]=-c+(T(),v):a.c.t.Zc(a.c.e,-c,0);a.b=c}Uz(a.c.a,c,d);b=a.c.a;var e,f,g,m;0!=b.e.b&&(d=!1,(c=HA(b.b.a,I(b.d-1)))?(g=Zy(c.i.f.u,c.e),f=c.d+b.f):(g=Yy(b,cy(b.e)),f=b.f),c=b.c.C,m=g-c,0<m?(d=Jz(b,c,g),d=A(Ou(d/b.f)),g=En(d,b.e.b),d=b.e.b,g=d-g,e=Cz(b,c),Lz(b,new yt(g,d),0,e),Yl(),b.d=e,d=!0):0>=m+f&&(d=Jz(b,g,c),d=A(d/b.f),g=En(d,b.e.b),
+g<b.e.b?e=by(b,dy(b.e))+1:e=Cz(b,c),f=b.e.b,c=!1,e+g>b.k&&(--g,c=!0),g=J(0,En(g,b.k-e)),Lz(b,new yt(0,g),f,e),c&&(e=new yt(0,1),c=b.k-b.e.b,Lz(b,e,0,c)),c=b.d+d,e=b.k-b.e.b,Yl(),b.d=c<e?c:e,d=!0),d&&(ay(b.c),0==b.c.v.g.s&&nA(b.a)));qz(a.c.a.b)}
+function iy(a){var b,c,d,e,f,g;b=a.c.a;f=b.f*b.k+wz(new Lq(a.c.a.b.a));d=kz(a.c.c);g=a.c.q;b=a.c.G;e=f>g+0.49-J(0,a.c.j.b)-J(0,a.c.f.b);c=d>b+0.49;e!=c&&(!e&&c?e=f>g+0.49-J(0,a.c.j.b)-J(0,a.c.f.b)-xv(a.c.r):c=d>b+0.49-xv(a.c.F));e&&(b-=xv(a.c.F),b=0>b?0:b);c&&(g-=xv(a.c.r),g=0>g?0:g);a.c.D.style[t]=g+(T(),v);a.c.D.style[u]=b+v;c=J(0,a.c.f.b);e=J(0,a.c.j.b);Bv(a.c.F,0>g-c-e?0:g-c-e);Gv(a.c.F,f);f=a.c.r.k;g=iz(a.c.c,new yt(a.c.c.b,a.c.c.a.b.length));d-=g;Bv(a.c.r,b-d);Gv(a.c.r,g);a.c.r.g.style[Wb]=
+d+v;Av(a.c.r,f);Lv(a.c.r)?a.c.s.style[l]="":a.c.s.style[l]=(Zi(),mb);d=a.c.k.style;b=a.c.g.style;Lv(a.c.F)?(d[l]="",b[l]="",Lv(a.c.r)?(a=xv(a.c.r),b[wc]=a+v):b[wc]=""):(a=(Zi(),mb),d[l]=a,b[l]=mb)}function ty(a){this.c=a;this.e=GA(a);this.d=FA(a);this.g=new DA(a);this.j=CA(this.g);this.i=BA(this.g);this.f=AA(this.g)}x(347,343,{},ty);_.b=0;B(347);function wz(a){var b,c;b=0;for(c=Kq(a);c.a.Dc();)a=Mq(c),b+=a.d;return b}function Az(a,b){var c;return(c=HA(a.a,I(b)))?c.d:0}
+function Dz(a,b,c,d){var e=Fz,f,g,m,n,p,q,r,s,z,L;q=0;for(a=Kq(new Lq(a.a));a.a.Dc();)if(f=Mq(a),r=Zy(f.i.f.u,f.e),p=f.d,f=r+p,s=r<b,L=b<=r&&r<=d,z=d<r,g=f<b,n=b<=f&&f<=d,m=d<f,!g)if(z)break;else if(s&&n)switch(c.g){case 1:q+=f-b;break;case 0:q+=p}else if(s&&m)switch(c.g){case 2:return 0;case 0:return p;case 1:return d-b;default:throw new H("Unexpected inclusion state :"+c);}else if(L&&n)q+=p;else if(L&&m){switch(e.g){case 1:q+=d-r;break;case 0:q+=p}break}return q}
+function cA(a,b,c){var d;d=c*a.f.a.f;b=I(b);a=new dA(a.a,(eA(),IA),b,!0,null);for(b=new kl(new eq(new Lq(a)));b.b<b.d.Oc();)a=(N(b.b<b.d.Oc()),b.d.Me(b.c=b.b++)),Rz(a,Sz(a.i.f.u,a.e),Zy(a.i.f.u,a.e)+d),Tz(a,a.f+c)}
+function qz(a){var b,c,d,e;e=It(a.f);b=I(e.b-1);e=I(e.a+1);b=new dA(a.a,(eA(),fA),b,!0,e);d=new Lq(b);if(0!=d.a.Oc())for(e=ri(a.f.D)+J(0,a.f.j.b),b=pi(a.f.D)-J(0,a.f.f.b),d=Kq(d);d.a.Dc();){c=Mq(d);var f=e,g=b,m=a.b,n=void 0,p=n=n=void 0,p=void 0,p=ri(c.a),n=pi(c.a);p<f||n>g?(p=0>f-p?0:f-p,n=c.b-(0>n-g?0:n-g),n=fi(fi(fi(fi(fi(fi(new tl("rect("),p),"px,"),m),"px,"),n),"px,0)").a,c.a.style.clip=n):c.a.style.clip="auto"}}function aA(a){this.f=a;this.a=new JA;this.e=(fw(),gw);this.c=new KA(this)}
+x(355,1,{},aA);_.b=0;B(355);function KA(a){this.b=a}x(361,1,{},KA);_.od=function(){var a,b;if(!nt(this.b.f.r.k,this.a))for(this.a=this.b.f.r.k,b=Kq(new Lq(this.b.a));b.a.Dc();)a=Mq(b),Rz(a,this.a,Zy(a.i.f.u,a.e))};_.a=0;B(361);function LA(a){var b,c;c=A(Ou(Zy(a.i.f.u,a.e)));b=A(Ev(a.d));b=$(c,b);c=a.i.f;a=A(Ev(c.F.k));c=A(Bz(c.a));a=$(a,c);return Tt(a,b)}
+function hA(a,b){var c,d,e,f,g,m;c=b-J(0,a.d);f=a.d;a.d=b;if(0>a.c){ft();g=si(Hz(a.i.f.a,It(a.i.f).b));m=S(ul(Wd),h,2,4,["borderBottomWidth"]);ft();if(typeof $wnd.getComputedStyle===kb){d=$wnd.getComputedStyle(g);for(i=g=0;i<m.length;i++)g+=parseFloat(d[m[i]]);m=g}else{d=g.offsetParent;g=g.cloneNode(!1);g.style.boxSizing="content-box";d.appendChild(g);g.style.height="10px";var n=g.offsetHeight;for(i=0;i<m.length;i++)g.style[m[i]]="0";m=g.offsetHeight;d.removeChild(g);m=n-m}a.c=m}a.e.style[t]=b+a.c+
+(T(),v);m=I(a.f);m=new dA(a.i.a,(eA(),IA),m,!1,null);for(d=Kq(new Lq(m));d.a.Dc();)m=Mq(d),Rz(m,Sz(m.i.f.u,m.e),Zy(m.i.f.u,m.e)+c);(m=0<c)&&Gv(a.i.f.F,vv(Vi(a.i.f.F.n.style,t))+c);d=m&&-1==a.f&&0==a.i.f.a.d;if(a.f<a.i.f.a.d&&!d){for(g=Nz(a.i.f.a.e,0);g.b!=g.d.c;)d=(N(g.b!=g.d.c),g.c=g.b,g.b=g.b.a,++g.a,g.c.c),n=Yy(a.i.f.a,d)+c,zz(a.i.f.a.n.u,d,0,n);g=Zy(a.i.f.u,a.e);d=a.i.f.F.k;(f=g<d&&d<g+f)&&!m?e=c>g-d?c:g-d:e=c;Uz(a.i.f.a,a.i.f.B,a.i.f.C+e);f=a.i.f.F;0!=e&&Av(f,f.k+e)}else for(e=a.i.f.a,f=a.f,
+n=It(e.c),d=f<n.b,g=f>=n.a-1,d?f=ju(e.e):g?f=(V(),V(),sl):(f=new dv(e.e,f-n.b+1,n.a-n.b),f=(V(),new lu(f))),d=f.xc();d.Dc();)f=d.Ec(),g=Zy(e.n.u,f)+c,zz(e.n.u,f,0,g);m||Gv(a.i.f.F,vv(Vi(a.i.f.F.n.style,t))+c);c=a.a.style;a.b=b+a.i.f.a.f;c[t]=a.b+v}function Rz(a,b,c){zz(a.i.f.u,a.e,b,c);zz(a.i.f.u,a.a,0,c-a.i.f.a.f)}function Tz(a,b){MA(a.i.a,I(a.f));a.f=b;a.e[zc]=b;zu(a.i.a,I(a.f),a)}
+function NA(a,b){this.i=a;this.f=b;this.e=(W(),Ni());var c=$doc;this.g=(O(),c).createElement("td");this.e.appendChild(this.g);this.e[zc]=b;this.a=Ii()}x(356,1,{},NA);_.b=0;_.c=-1;_.d=-1;_.f=0;B(356);function Ez(){Ez=w;OA=new PA("COMPLETE",0);Fz=new PA("PARTIAL",1);Pz=new PA("NONE",2)}function PA(a,b){R.call(this,a,b)}x(89,4,{89:1,3:1,5:1,4:1},PA);var OA,Pz,Fz,QA=C(89,function(){Ez();return S(D(QA,1),h,89,0,[OA,Fz,Pz])});
+function tA(a,b){var c;c=a.b.c.a.b.length-1;0>c||(hv(a.b.c.a,c).a+=b,null!=a.b.c.d&&(a.b.c.d[c]+=b))}function xA(a){var b,c,d,e,f;if(0!=a.k)for(f=a.j.rows,a=0;a<f.length;a++){c=f[a].cells;e=null;for(d=c.length-1;0<=d;d--)if(b=c[d],!oe(Ui(b.style),(Zi(),mb))){e=b;break}b=gt(e).width;b-=0.1;e.style[u]=b+(T(),v)}}function vy(a){this.b=a}x(354,1,{},vy);_.a=!1;B(354);
+function RA(a,b,c){Xz(a.n,c,b);SA(a.C,b);SA(a.w,b);TA(b,a);sA(a.u.c,c,1);b.g&&UA(b.g.a);c=new hl;var d=b.d;b=new hl;y(d,57)&&(d=d.Pc())&&Bx(b,d);Bx(c,b);VA(a,c)}function Nw(a,b){Kh((Dh(),Eh),new WA(a,b));return Pr(a,b,(sw(),tw))}function Hw(a,b){if(y(a.S,200))a.S.Id(b);else if(y(a.S,59))a.S.Dd(S(D(F,1),h,1,3,[b]));else throw new Z(Ac);}function uu(a,b){if(0>b||b>=a.n.b.length)throw new Z(Bc);return hv(a.n,b)}
+function XA(a){var b,c,d;c=It(a.u).b;d=pi(a.u.j.j);for(b=Hz(a.u.a,c);(O(),P).tb(b)+((b.offsetHeight||0)|0)<d;)b=Hz(a.u.a,++c);return c}function YA(a){var b,c,d;d=It(a.u).a;b=ri(a.u.f.j);do c=Hz(a.u.a,--d);while((O(),P).tb(c)>b);return d}function pu(a,b){var c;c=tu(a);if(0>b||b>=c.b.Oc())throw new Z(Bc);return c.a.Me(b)}function tu(a){var b,c;c=new G;for(b=new kl(a.n);b.b<b.d.Oc();)a=(N(b.b<b.d.Oc()),b.d.Me(b.c=b.b++)),c.b[c.b.length]=a;return V(),new ZA(c)}
+function $A(a,b,c){if(c!=a.u.j||!iu(a.C,a.v.f.c).a||!a.v.c.n)return!1;oe(Db,(O(),b).type)&&b.shiftKey&&P.rb(b);if(Ib===b.type){if(1<b.touches.length)return!1;P.rb(b);c=b.changedTouches[0];a.J=new Qq(Di(c.clientX||0),Di(c.clientY||0));a=a.V;a.a=a.c.v.c;a.b=!0;Oe(a.d,500);return!0}if(Kb===b.type){if(1<b.touches.length)return!1;P.rb(b);c=b.changedTouches[0];b=aB(Di(c.clientX||0)-a.J.a);c=aB(Di(c.clientY||0)-a.J.b);(3<b||3<c)&&Pe(a.V.d);return!0}if(Mb===b.type){if(1<b.touches.length)return!1;a.V.d.p&&
+(Pe(a.V.d),bB(a.V,a.v.c,!1));return!0}if(Nb===b.type){if(1<b.touches.length)return!1;Pe(a.V.d);return!0}Ja===b.type&&bB(a.V,a.v.c,!!b.shiftKey);return!1}function Bw(a,b){var c;a:{c=b;ft();var d;if(c){for(d=null;!d&&c;)d=(W(),Bn(c)),!d&&(c=hi((O(),c)));if(y(d,18))for(c=d;c;)break a}c=null}if(c==a)return!1;for(;c&&c!=a;)c=c.$;return!!c}function cB(a){Mt(a.u.a,0,a.u.a.k)}function dB(a){eB(a.u.f,a.w)}function fB(a){eB(a.u.j,a.C)}
+function eB(a,b){var c,d;c=(b.e?b.d.b.length:0)-a.k;0<c?(Ft(a,0,c),gy(a.c),ew(a.c)):0>c&&(d=a.c.F.k,Gt(a,0,-c),gy(a.c),ew(a.c),Av(a.c.F,d));0<a.k&&Mt(a,0,a.k)}function gB(a,b){var c;c=bq(a.n,b);vA(a.u.c,ou(tu(a),b),1);hB(a);iB(a.C,b);iB(a.w,b);TA(b,null);gv(a.n,c)}function Pw(a,b,c){jB(a,b,c,(Qw(),0))}
+function jB(a,b,c,d){var e;e=a.u.a.k-1;if(0>b)throw new H(Cc+b+") is below zero!");if(b>e)throw new H(Cc+b+") is above maximum ("+e+")!");a=a.u;var f;Dy(c,d);if(-1!=b&&(0>b||b>=a.a.k))throw new Wh("The given row index "+b+pc);-1!=b?(f=A(Ev(Kz(a.a,b))),e=A(Ou(a.a.f)),e=$(f,e)):e=$(0,0);f=HA(a.a.b.a,I(b));if(-1==b&&!f)throw new H("Cannot scroll to row index -1, as there is no spacer open at that index.");f&&(b=A(Ev(Zy(f.i.f.u,f.e))),f=A(Ou(f.d)),b=$(b,f),e=Pt(e,b));b=e.b;e=e.a;f=a.F.k;c=Ay(c,b,e,f,
+f+Bz(a.a),d);Av(a.F,c)}function Iw(a,b){if(y(a.S,200))a.S.Jd(b);else if(y(a.S,59))a.S.Fd(S(D(F,1),h,1,3,[b]));else throw new Z(Ac);}
+function ru(a,b){var c,d,e,f,g,m;e=a.Zd().c;vA(e,0,e.a.b.length);m=new G;a.R&&Ne(m,a.R);d=g=0;for(f=b.length;d<f;++d)if(c=b[d],-1!=bq(a.n,c))m.b[m.b.length]=c,++g;else throw new H("Given column at index "+g+" does not exist in Grid");if(a.n.b.length!=m.b.length){c=a.n;Xh(m);for(c=new kl(c);c.b<c.d.Oc();)d=(N(c.b<c.d.Oc()),c.d.Me(c.c=c.b++)),-1!=bq(m,d)&&kB(c);ku(m,a.n)}a.n=m;m=tu(a);sA(e,0,m.b.Oc());hB(a);for(e=new kl(a.n);e.b<e.d.Oc();)c=(N(e.b<e.d.Oc()),e.d.Me(e.c=e.b++)),c.g&&UA(c.g.a);for(m=new kl(a.C.d);m.b<
+m.d.Oc();)e=(N(m.b<m.d.Oc()),m.d.Me(m.c=m.b++)),lB(e);for(m=new kl(a.w.d);m.b<m.d.Oc();)e=(N(m.b<m.d.Oc()),m.d.Me(m.c=m.b++)),lB(e);e=a.j;if(!e.a)for(e=new mB(ju(new eq(e.b.n)).b.xc());e.b.Dc();)e.b.Ec();Zk(a,new Aw)}function nB(a,b){var c;a.S.zd();a.q&&Kt(a.q,null);a.q=b;Kt(b,new oB(a,b));c=a.u.a.k;0!=c&&Gt(a.u.a,0,c);pB(a)}function pB(a){var b,c;c=(b=a.q,Kd(b,b.size,b.Oc).bind(b)());-1==c&&a.W&&a.W.pc()&&(c=sz(a.Zd().a));0<c&&Ft(a.u.a,0,c)}
+function Ww(a,b){if(!b)throw new H("Selection model can't be null");a.S&&a.S.Ad(null);a.S=b;b.Ad(a);var c=a.S.xd(),d;if(a.Q!=c){a.Q&&(a.Q&&(d=a.Q,d.d&&du(d)),d=a.R,a.R=null,gB(a,d),qB(a.c,-1));if(a.Q=c){qB(a.c,1);a.R=new rB(a,c);RA(a,a.R,0);c=a.R;sB(c);tB(c,-1);if(c.a)throw new Wr("can't set the selection column editable");uB(c,!1);c.a=!0}else a.R=null,Mt(a.u.a,0,a.u.a.k);hB(a)}}
+function vB(a,b){var c;Mr((W(),a._),b);ny(a.u,b);c=a.s;if(null!=c.A){yi(c.i,c.A);yi(c.e,c.A+"-cells");yi(c.p,c.A+vc);yi(c.q,c.A+"-message");yi(c.c,c.A+"-buttons");var d=c.s,e=c.A+"-save";Lr((W(),d._),e,!1);d=c.d;e=c.A+"-cancel";Lr((W(),d._),e,!1)}c.A=b+"-editor";oi(c.i,c.A);oi(c.e,c.A+"-cells");oi(c.p,c.A+vc);oi(c.q,c.A+"-message");oi(c.c,c.A+"-buttons");d=c.s;e=c.A+"-save";oi((W(),d._),e);d=c.d;c=c.A+"-cancel";oi((W(),d._),c);c=a.T;d=b+"-sidebar";Mr((W(),c._),d);var e=c.a,f=d+"-content";Mr((W(),
+e._),f);e=c.d;d+="-button";Mr((W(),e._),d);c.a.$==c.f?(Lr(c._,"open",!0),Lr(c._,Hc,!1)):(Lr(c._,"open",!1),Lr(c._,Hc,!0));c=a.T;Lr((W(),c._),"v-contextmenu",!0);c=Kr(a._)+rc;a.L=c+"-has-data";a.N=c+"-selected";a.O=c+"-stripe";a.d=Kr(a._)+"-cell-focused";a.K=Kr(a._)+"-row-focused";a.W&&a.W.pc()&&(eB(a.u.j,a.C),Mt(a.u.a,0,a.u.a.k),eB(a.u.f,a.w))}
+function VA(a,b){var c,d,e,f;c=0;for(f=b.xc();f.Dc();)e=f.Ec(),d=Vq((W(),e)),0>d?(d=a._,W(),Rq.hc(d,e)):c|=d;0<c&&(-1==a.Y?cr((W(),a._),c|(a._.__eventBits||0)):a.Y|=c)}function hB(a){var b,c;c=a.A;for(b=0;b<a.A;b++)uu(a,b);-1==c?c=0:a.R&&++c;a=a.u.c;var d=c,e;if(0>d||d>a.a.b.length)throw new H("count must be between 0 and the current number of columns ("+a.a.b.length+")");e=a.b;if(d!=e){a.b=d;if(fy(a.c))for((c=d>e)?b=e:(b=d,d=e);b<d;b++)gz(a.c.j,b,c),gz(a.c.a,b,c),gz(a.c.f,b,c);iy(a.c.v)}}
+function wB(a,b){Ir();var c;c=vi(a,Dc);if(null==c?null!=b:c!==b)null!=c&&yi(a,c),null!=b&&li(a,b),a[Dc]=b}function xB(a,b){Ir();a.uc(b)}x(228,617,Ec);_.wc=function(){throw new Wr("Cannot add widgets to Grid with this method");};_.nc=function(){this.T.$==this&&this.T.qc()};_.oc=function(){this.T.$==this&&this.T.rc()};_.Zd=yB;_.xc=function(){throw new Wr("Cannot iterate through widgets in Grid this way");};_.qc=function(){us(this);0==this.Zd().a.k&&this.q&&pB(this)};
+_.cc=function(a){var b,c,d,e;if(this.t){e=(O(),P).qb(a);if(c=Ai(e)){a:{for(c=e;c&&c!=(W(),this._);){if(d=!!c&&1==c.nodeType)if(d=c.className||"",-1!=qe(d,Kr((W(),this._))+xc)){c=!0;break a}c=c.parentNode}c=!1}c=!c}if(c){c=su(this.u,e);d=a.type;if(c)b=c.$c(e),d===Db?this.e=b:!b&&d===Ja&&(b=this.e);else if(d===Ka||d===Cb||d===Bb)b=nu(this.c),c=this.c.c;else return;d=this.v;var f,g,m;g=b.c;m=b.a;f=tu(d.b).a.Me(m);var n=d.f,p=zt(d.b.q,g);n.c=g;n.b=p;n.a=null;g=ou(ju(new eq(d.b.n)),f);qw(d,m,g,f);d.a=
+b.b;a:if(d=c,0!=this.s.w)W(),128==Vq((O(),a).type)&&27==(a.keyCode|0)&&zB(this.s),d=!0;else{if(d==this.u.a&&this.s.j&&(d=!1,W(),2==Vq((O(),a).type)?d=!0:128==Vq(a.type)&&13==(a.keyCode|0)?d=!0:Vq(a.type)==Pa&&(b=Ie(),d=b-this.H,this.H=b,d=500>d),d)){AB(this.s,this.c.g);d=!0;break a}d=!1}if(!d){Rr(this,a);this.W.cc(a);(e=Bw(this,e))||(!this.k||c!=this.u.j||this.v.d<this.u.c.b?e=!1:(W(),4==Vq((O(),a).type)&&1==P.nb(a)||Vq(a.type)==Jb?(e=this.r,e.d=er(new wu(e,a,this.D)),P.rb(a),a.stopPropagation(),
+e=!0):e=!1));if(!e&&!(e=$A(this,a,c))){a:{if(c==this.u.a&&(e=this.v.c,O(),y(e.d,57)&&(e=e.d,e.Pc().we(a.type)&&e.Rc(this.v,a)))){e=!0;break a}e=!1}if(!e)a:if(oe((O(),a).type,Ka)){d=-1;c=this.u.a;switch(a.keyCode|0){case 36:0<c.k&&(d=0);break;case 35:0<c.k&&(d=c.k-1);break;case 33:e=It(this.u);e.b<e.a&&(c=XA(this),d=c-(e.a-e.b),0>d&&(d=0));break;case 34:e=It(this.u);e.b<e.a&&(d=YA(this),d+=e.a-e.b,d>=c.k&&(d=c.k-1));break;default:e=!1;break a}jB(this,d,(Qw(),Rw),0);e=!0}else e=!1}if(!e&&(e=new Bm(S(D(Wd,
+1),h,2,4,[Ka,Ja])),-1!=Gz(e,a.type)))a:if(e=this.c,c=this.v,oe((O(),a).type,Ja))vu(e,c.f.c,c.e,su(e.j.u,c.a)),Em(e.j).focus();else if(a.type===Ka){b=e.g;d=e.c;c=e.a.b;switch(a.keyCode|0){case 40:++b;break;case 38:--b;break;case 39:if(e.a.a>=tu(e.j).b.Oc())break a;c=e.a.a;break;case 37:if(0==c)break a;--c;break;case 9:a.shiftKey?d=BB(e,e.c):d=CB(e,e.c);if(d==e.c)break a;break;default:break a}d!=e.c?d==e.j.u.a?b=e.d:d==e.j.u.j?b=e.f:b=e.e:0>b?(d=BB(e,d),d==e.c?b=0:d==e.j.u.a?b=YA(e.j):b=d._c()-1):b>=
+e.c._c()&&(d=CB(e,d),d==e.c?b=e.c._c()-1:d==e.j.u.a?b=XA(e.j):b=0);0!=d._c()&&(P.rb(a),a.stopPropagation(),vu(e,b,c,d))}}}}};_.$d=function(){dB(this)};_._d=function(){fB(this)};_.yc=Ex;_.k=!1;_.p=!1;_.t=!0;_.A=0;_.H=0;_.Q=null;var DB=B(228);function yu(a){var b,c;c=a.o.S.xd()?(si(si(a.o.u.j.j)).offsetWidth||0)|0:0;for(b=0;b<a.o.A;b++)c+=iw(uu(a.o,b));return c}function bu(a){ki(a.k);ki(a.e);yi(a.o.v.a,"dragged")}
+function gu(a,b){b&&(a.c=(ft(),lt(b.d)),a.a=0);var c,d,e,f;d=a.c-qi(a.k);c=yu(a);d<c&&(d=A(c));c=EB(FB(a.j));e=a.j;if(e.b){for(f=e.b;e=f.a[1];)f=e;e=f}else e=null;e=EB(e);f=a.o.u.r.k;d+f<c.a?d=c.a-f+a.a:d+f>e.a&&(d=e.a-f+a.a);d=J(0,En(d,a.k.clientWidth|0));d-=(a.e.clientWidth|0)/2|0;a.e.style[Wb]=d+(T(),v);nw(a,a.c)}
+function nw(a,b){var c,d,e,f,g;g=a.o.u.r.k;e=b-qi(a.o.u.j.j);d=(d=GB(a.j,new Y(e),!0))?new HB(d):null;a:{c=new Y(e);var m,n;m=null;for(n=a.j.b;n;){f=IB(c,n.d);if(0==f){c=n;break a}0>=f?n=n.a[0]:(m=n,n=n.a[1])}c=m}c=c?new HB(c):null;f=d?d.d.a-e:Fc;e=c?e-c.d.a:Fc;g=0-g;f>e?(a.i=c.e.a,g+=c.d.a):(a.i=d.e.a,g+=d.d.a);g+=a.a;d=yu(a);(g<d||g>((a.o.u.j.j.offsetWidth||0)|0)||0>g)&&(g=-1E7);a.f.style[Wb]=g+(T(),v)}function JB(a){this.o=a;this.b=new KB(this);this.j=new JA}x(264,1,{},JB);_.a=0;_.c=0;_.g=0;
+_.i=0;B(264);function KB(a){this.a=a}x(265,1,{},KB);B(265);function $t(a){this.a=a}x(266,1,{},$t);_.dc=function(a){1==dr(a.d)&&(a.a=!0,Ti(a.d),Us(this.a.d.a),this.a.d=null)};B(266);function LB(a){this.a=a}x(267,1,{},LB);_.od=function(){Zk(this.a,new Zv)};B(267);function MB(a){this.a=a}x(268,1,{},MB);B(268);function NB(a){this.a=a}x(269,1,{},NB);_.Cd=function(){cB(this.a)};B(269);function OB(a){this.a=a}x(122,1,{122:1},OB);
+_.td=function(a){if(13==Ri(a.d)){var b=this.a.V,c=a.c.c;a=a.d;a=!!(O(),a).shiftKey;bB(b,c,a)}};B(122);function PB(a){this.a=a}x(270,1,{},PB);_.sd=function(){this.a.p=!1};B(270);function Nt(a,b,c){a.a.o=$(b,c);Zk(a.a,new Jt(a.a.o))}function oB(a,b){this.a=a;this.b=b}x(271,1,{},oB);B(271);function WA(a,b){this.a=a;this.b=b}x(272,1,{},WA);_.ib=function(){this.a.p||this.b.sd(new Jt(this.a.o))};B(272);function QB(a){a=a.ae();return 0<a?a:0>a?1:0}function RB(a){a=a.be();return 0<=a?a:Fc}
+function SB(a){a=a.ce();return 0<=a?a:4.9E-324}function UA(a){a.b||(a.b=!0,Kh((Dh(),Eh),a.a))}function TB(a){this.d=a;this.a=new UB(this)}x(238,1,{},TB);_.b=!1;_.c=0;B(238);function UB(a){this.a=a}x(254,1,{},UB);
+_.ib=function(){if(this.a.b)if(this.a.d.C.b||this.a.d.w.a)10>this.a.c?(Kh((Dh(),Eh),this),++this.a.c):(this.a.c=0,dt((Dh(),Eh),this));else if(this.a.d.p)dt((Dh(),Eh),this);else{var a=this.a;a.b=!1;a.c=0;var b,c,d;d=kt(a.d.u.D);for(c=new mB(tu(a.d).b.xc());c.b.Dc();)b=c.b.Ec(),0<=b.o?d-=b.o:0<=b.ce()&&(d-=b.ce());if(0>d){var e,f;d=new VB;b=tu(a.d);for(c=0;c<b.b.Oc();c++)WB(d,I(c),new Y(b.a.Me(c).o));cz(a.d.u.c,d);d=new VB;for(f=0;f<b.b.Oc();f++)if(c=b.a.Me(f),e=0>c.o)e=Au(c.g.u.c,ou(tu(c.g),c)),e<
+SB(c)?WB(d,I(f),new Y(c.ce())):e>RB(c)&&WB(d,I(f),new Y(c.be()));cz(a.d.u.c,d)}else{var g,m,n,p,q,r,s,z;q=!0;m=e=0;c=new hl;p=new G;b=new mh;d=tu(a.d);for(n=new mB(d.b.xc());n.b.Dc();)f=n.b.Ec(),g=f.o,s=0<=g,g=J(g,f.ce()),q=q&&(-1==f.ae()||f==a.d.R),s?(pl(b,I(d.a.Ne(f)),new Y(g)),m+=g):(p.b[p.b.length]=f,pl(b,I(d.a.Ne(f)),new Y(-1)));cz(a.d.u.c,b);for(p=new kl(p);p.b<p.d.Oc();){f=(N(p.b<p.d.Oc()),p.d.Me(p.c=p.b++));n=q?1:f.ae();g=Au(f.g.u.c,ou(tu(f.g),f));s=RB(f);if(s=g<s&&0<n&&f!=a.d.R)e+=n,il(c,
+f);m+=g;pl(b,I(d.a.Ne(f)),new Y(g))}p=kt(a.d.u.D)-m;if(!(0>=p||0>=e)){do for(g=!1,z=p/e,r=hn(new jn(c.a));r.a.Dc();)f=kn(r),n=QB(f),q=d.a.Ne(f),m=U(b,I(q)).a,s=RB(f),f=m+z*n,s<=f&&(r.a.Fc(),e-=n,g=!0,p-=s-m,pl(b,I(q),new Y(s)));while(g);if(!(0>=e&&0==c.a.Oc())){s=0;$s((Ws(),!Xs&&(Xs=new Ys),Ws(),Xs))||at()||-1!=ct().indexOf("PhantomJS")?(g=A(p/e),s=A(p-g*e)):g=p/e;for(p=hn(new jn(c.a));p.a.Dc();)f=kn(p),n=QB(f),q=d.a.Ne(f),m=U(b,I(q)).a,f=m+g*n,0<s&&(f+=1,--s),pl(b,I(q),new Y(f)),e-=n;do{n=!1;s=0;
+for(e=new mB(d.b.xc());e.b.Dc();)f=e.b.Ec(),g=SB(f),q=d.a.Ne(f),m=U(b,I(q)).a,(p=0>f.o)&&m<g&&(pl(b,I(q),new Y(g)),s+=g-m,n=!0,c.a.Ge(f));e=0;for(q=hn(new jn(c.a));q.a.Dc();)f=kn(q),e+=QB(f);s/=e;for(e=hn(new jn(c.a));e.a.Dc();)f=kn(e),q=s*QB(f),f=d.a.Ne(f),pl(b,I(f),new Y(U(b,I(f)).a-q))}while(n)}cz(a.d.u.c,b)}}}};B(254);function XB(a){this.a=a}x(243,1,{},XB);_.Tc=function(a,b){var c,d;for(d=b.xc();d.Dc();)c=d.Ec(),pu(this.a,c.a)};
+_.Uc=function(a,b){var c,d,e,f;d=this.a.M;c=a.c;d.c=a.d;d.b=null;d.a=c;for(d=b.xc();d.Dc();)if(c=d.Ec(),f=pu(this.a,c.a).d,y(f,57))try{e=pu(this.a,c.a);var g=this.a.I,m=ou(ju(new eq(this.a.n)),e);f=e;g.a=c;qw(g,c.a,m,f)}catch(n){if(n=Oh(n),y(n,10))Ir(),ge(DB);else throw Ph(n);}};
+_.Vc=function(a,b){var c,d,e,f;d=a.d;f=this.a.M;c=zt(this.a.q,d);var g=a.c;f.c=d;f.b=c;f.a=g;for(d=b.xc();d.Dc();)if(c=d.Ec(),f=pu(this.a,c.a).d,y(f,57))try{e=pu(this.a,c.a);var m=this.a.I,n=ou(ju(new eq(this.a.n)),e),g=e;m.a=c;qw(m,c.a,n,g);f.Qc(this.a.I)}catch(p){if(p=Oh(p),y(p,10))Ir(),ge(DB);else throw Ph(p);}};_.Wc=function(a,b){var c,d;for(d=new cv(new dv(b.a.a,b.c,b.c+b.b),!0);d.c+d.d<d.a.b.length;)c=fv(d),pu(this.a,c.a)};
+_.Xc=function(a,b){var c,d,e,f,g,m,n,p,q,r,s;d=a.d;c=a.c;q=zt(this.a.q,d);n=null!=q;r=this.a.L;r=mi(r);r=-1!=ni(c.className||"",r);r!=n&&Lr(c,this.a.L,n);Lr(c,this.a.O,0!=a.d%2);var z=this.a.M;z.c=d;z.b=q;z.a=c;if(n)if(Lr(c,this.a.N,this.a.S.yd(q)),this.a.P)try{p=this.a.P;var L=p.b;g=this.a.M;var Q=p.a.c,pb;pb=YB(ZB);$B(pb,"index",null,new aC(g));$B(pb,Nc,null,new bC(g));$B(pb,Mc,null,new cC(g));pb.grid=Q;f=dC(L,pb);wB(c,f)}catch(qb){if(qb=Oh(qb),y(qb,10))Ir(),ge(DB);else throw Ph(qb);}else wB(c,
+null);else r&&(Lr(c,this.a.N,!1),wB(c,null));c=this.a.c;if(c.g==a.d&&c.c==c.j.u.a)a.c!=c.i&&(c.i&&Lr(c.i,c.j.K,!1),c.i=a.c,Lr(c.i,c.j.K,!0));else if(c.i==a.c||c.c!=c.j.u.a&&c.i)Lr(c.i,c.j.K,!1),c.i=null;for(d=b.xc();d.Dc();){c=d.Ec();f=pu(this.a,c.a);g=ou(ju(new eq(this.a.n)),f);eC(this.a.c,c,this.a.u.a);if(n&&this.a.g)try{qw(this.a.f,c.a,g,f);var Ca=this.a.g;m=dC(Ca.b,fC(this.a.f,Ca.a.c));wB(c.c,m)}catch(Cj){if(Cj=Oh(Cj),y(Cj,10))Ir(),ge(DB);else throw Ph(Cj);}else(n||r)&&wB(c.c,null);p=f.d;try{var Sx=
+this.a.I,L=c,Q=f;Sx.a=L;qw(Sx,L.a,g,Q);y(p,57)?(e=p,n?(r||Yt(this.a.I,!0),s=f.de(q),e.Sc(this.a.I,s)):Yt(this.a.I,!1)):n?(s=f.de(q),p.Sc(this.a.I,s)):ji(c.c)}catch(pa){if(pa=Oh(pa),y(pa,10))Ir(),ge(DB);else throw Ph(pa);}}};B(243);function nu(a){return new Pu(a.g,a.a.b,a.b)}function CB(a,b){if(b==a.j.u.j)b=a.j.u.a;else if(b==a.j.u.a)b=a.j.u.f;else return b;return 0==b._c()?CB(a,b):b}function BB(a,b){if(b==a.j.u.f)b=a.j.u.a;else if(b==a.j.u.a)b=a.j.u.j;else return b;return 0==b._c()?BB(a,b):b}
+function qB(a,b){var c;c=a.a;c=0==b?c:new yt(c.b+b,c.a+b);a.a=c}
+function vu(a,b,c,d){var e,f,g,m;if(b!=a.g||!Ht(a.a,c)||d!=a.c){m=a.g;a.g=b;b=a.a;if(d==a.j.u.a)jB(a.j,a.g,(Qw(),Rw),0),a.a=$(c,1);else{g=0;e=si(d.ad(a.g));do{f=parseInt(e[gc])|0;f=$(g,f);if(f.b<=c&&c<f.a){a.a=f;break}e=Bi((O(),e));++g}while(e)}e=ou(ju(new eq(a.j.n)),pu(a.j,c));if(e>=a.j.u.c.b){g=a.j.u;e=(Qw(),Rw);Dy(e,10);if(0>c||c>=g.c.a.b.length)throw new Wh(nc+c+pc);if(c<g.c.b)throw new H(nc+c+" is frozen.");g=g.v;var n,p;n=iz(g.c.c,$(0,g.c.c.b));f=iz(g.c.c,$(0,c))-n;c=f+Au(g.c.c,c);p=g.c.r.k;
+n=p+kt(Em(g.c))-n;Lv(g.c.F)&&(n-=ht());c=Ay(e,f,c,p,n,10);Av(g.c.r,c)}a.c==d?gC(b,a.a)&&m!=a.g?a.c.bd(m):(fB(a.j),dB(a.j)):(c=a.c,a.c=d,c==a.j.u.a?a.d=m:c==a.j.u.j?a.f=m:a.e=m,gC(b,a.a)?c.bd(m):(fB(a.j),dB(a.j),c==a.j.u.a&&c.bd(m)))}a.c.bd(a.g)}function eC(a,b,c){var d,e;d=b.d.d;e=Tt($(b.a,parseInt(b.c[gc])|0),a.a);c==a.c&&(d==a.g&&e?a.b!=b.c&&(a.b&&Lr(a.b,a.j.d,!1),a.b=b.c,Lr(a.b,a.j.d,!0)):a.b==b.c&&(Lr(a.b,a.j.d,!1),a.b=null))}
+function hC(a){this.j=a;this.c=this.j.u.a;this.a=$(0,1);VA(a,new Bm(S(D(Wd,1),h,2,4,[Ka,Ja])))}x(235,1,{},hC);_.b=null;_.d=0;_.e=0;_.f=0;_.g=0;_.i=null;B(235);function iw(a){return Au(a.g.u.c,ou(tu(a.g),a))}function uB(a,b){if(b!=a.e&&0!=a.g.s.w)throw new Z("Cannot change column editable status while the editor is active");a.e=b}
+function TA(a,b){var c;if(a.g&&b)throw new Z("Column already is attached to a grid. Remove the column first from the grid and then add it. (in: "+iC(a)+")");a.g&&UA(a.g.a);a.g=b;a.g&&(UA(a.g.a),c=a.g.C.a)&&(c=hu(c,a),c.b=a.i,c.e=(jC(),kC),c.c.ie())}function lC(a,b){if(!b)throw new H("Renderer cannot be null.");b!=a.d&&(a.d=b,a.g&&cB(a.g))}function mC(a,b){nt(a.o,b)||(a.o=b,a.g&&UA(a.g.a));return a}
+function iC(a){var b,c;b="";a.i.length?b+='header:"'+a.i+'" ':b+="header:empty ";a.g?(c=ou(ju(new eq(a.g.n)),a),-1!=c?b+="attached:#"+c+" ":b+="attached:unindexed "):b+="detached ";b+="sortable:"+a.n+" ";return ie(a.cZ)+"["+Ae(b)+"]"}x(71,1,{71:1});_.ae=ph;_.be=Cx;_.ce=pz;_.ee=function(a){return mC(this,a)};_.tS=function(){return iC(this)};_.e=!0;_.f=-1;_.i="";_.j=-1;_.k=10;_.n=!1;_.o=-1;var qu=B(71);function nC(a){this.a=a}x(242,1,{},nC);
+_.Sc=function(a,b){var c;this.b||Ld(b)||(Ir(),ge(DB),iC(this.a),this.b=!0);null==b?c="":c=$d(b);zi(a.a.c,c)};_.b=!1;B(242);function oC(a){this.b=a;new mh}x(241,1,{},oC);_.a=!1;B(241);
+function zB(a){if(!a.j)throw new Z("Cannot cancel edit: editor is not enabled");if(0==a.w)throw new Z("Cannot cancel edit: editor is not in edit mode");var b,c;for(c=Kq(new Lq(a.g));c.a.Dc();)b=Mq(c),xB(b,null);Wk(a.g);b=a.s;xB(b,null);ki((W(),b._));b=a.d;xB(b,null);ki((W(),b._));ji(a.i);ji(a.e);ki(a.i);Us(a.v.a);pC(a);my(a.k.Zd(),(Qv(),Rv),!1);b=a.n;c=new qC(a.k,a.r,null);b.a.e.cancel?dC(b.a.e.cancel,rC(b.a,c,!0)):(sC(c,null,null),c.a&&c.a.ge(c));Wk(b.a.b);a.w=0;tC(a,!0)}
+function pC(a){var b;for(b=si(a.i);b;)yi(b,ab),b=Bi((O(),b));a.f.a.He()}function AB(a,b){if(!a.j)throw new Z("Cannot edit row: editor is not enabled");if(0!=a.w)throw new Z("Cannot edit row: editor already in edit mode");a.r=b;a.w=1;Ht(It(a.k.Zd()),b)?uC(a):Pw(a.k,b,(Qw(),Ey))}
+function vC(a){if(!a.j)throw new Z("Cannot save: editor is not enabled");if(3!=a.w)throw new Z("Cannot save: editor is not in edit mode");a.w=4;is(a.s,!1);is(a.d,!1);Oe(a.u,5E3);var b=a.n,c=new qC(a.k,a.r,a.t);b.a.e.save?(dC(b.a.e.save,rC(b.a,c,!0)),b.a.d.refresh()):(sC(c,"'grid.editor.handler.save' is undefined. Please refer to the documentation for more information.",null),c.a&&c.a.fe(c));tC(a,!0)}
+function uC(a){var b;if(1==a.w){a.w=2;Oe(a.b,5E3);b=new qC(a.k,a.r,a.a);var c=a.n,d,e,f;if(c.a.e.bind)dC(c.a.e.bind,rC(c.a,b,!1));else{for(e=new mB(ju(new eq(c.a.c.n)).b.xc());e.b.Dc();)if(d=e.b.Ec(),d.e){f=(E(),""+d.de(zt(b.c.q,b.d)));d=X(wC(c.a,d.c));for(var g=void 0,m=void 0,n=void 0,p=void 0,m=d.c,n=0,p=m.length;n<p;++n)g=m[n],g.value=f}sC(b,null,null);b.a&&b.a.ge(b)}$doc.selection&&$doc.selection.empty?document.selection.empty():$wnd.getSelection&&$wnd.getSelection().removeAllRanges();my(a.k.Zd(),
+(Qv(),Rv),!0);tC(a,!1)}}function xC(a){a.e.style[Wb]=-a.k.u.r.k+(T(),v)}function tC(a,b){var c;if(y(a.k.S,59))if(cB(a.k),c=yC(hu(a.k.C.a,a.k.R)),c.a.disabled=!b,b){var d=Kr((W(),c._))+"-"+Xb;Lr((W(),c._),d,!1)}else d=Kr((W(),c._))+"-"+Xb,Lr((W(),c._),d,!0)}
+function zC(){this.i=(W(),Ii());this.e=Ii();this.p=Ii();this.q=Ii();this.c=Ii();this.o=Ii();this.g=new mh;this.u=new AC;this.t=new BC(this);this.b=new CC;this.a=new DC(this);this.f=new hl;this.s=new ls;ks(this.s,"Save");Or(this.s,new EC(this),(Bk(),Bk(),Ck));this.d=new ls;ks(this.d,"Cancel");Or(this.d,new FC(this),Ck)}x(234,1,{},zC);_.j=!1;_.r=-1;_.w=0;_.A=null;B(234);function AC(){}x(244,50,{},AC);_.eb=GC;B(244);function HC(a){a.a.w=3;var b=a.a;is(b.s,!0);is(b.d,!0);Pe(a.a.u)}
+function BC(a){this.a=a}x(245,1,{},BC);_.fe=function(){4==this.a.w&&(HC(this),Ir(),ge(DB))};_.ge=function(){4==this.a.w&&(HC(this),zB(this.a))};B(245);function CC(){}x(246,50,{},CC);_.eb=GC;B(246);function DC(a){this.a=a}x(247,1,{},DC);_.fe=function(){2==this.a.w&&(this.a.w=0,Pe(this.a.b),Ir(),ge(DB),my(this.a.k.Zd(),(Qv(),Rv),!1),tC(this.a,!0))};
+_.ge=function(a){if(2==this.a.w){this.a.w=3;Pe(this.a.b);var b=this.a;a=Hz(this.a.k.Zd().a,a.d);var c,d,e,f,g,m,n,p,q,r;f=Em(b.k);b.v=Pr(b.k,new IC(b),(sv(),tv));f.appendChild(b.i);b.i.appendChild(b.e);b.i.appendChild(b.p);for(m=0;m<a.cells.length;m++){c=a.cells[m];var s=e=void 0,z=void 0;e=(W(),Ii());z=kt(c);s=jt(c);d=(c.offsetTop||0)|0;var L=void 0,L=e.style;L[Wb]=((c.offsetLeft||0)|0)+(T(),v);L.top=d+v;L[u]=z+v;L[t]=s+v;c=e;b.e.appendChild(c);d=pu(b.k,m);d.e&&(e=wC(b.n.a,d.c))&&(pl(b.g,d,e),d=
+(W(),e._),c.appendChild(d),xB(e,b.k))}ii(b.p,b.q)||(b.p.appendChild(b.q),b.p.appendChild(b.c));m=b.s;c=(W(),m._);b.c.appendChild(c);xB(m,b.k);m=b.d;c=(W(),m._);b.c.appendChild(c);xB(m,b.k);xC(b);c=b.k.Zd().a;m=Zy(c.n.u,a);c=ri(c.j);f=(O(),P).tb(f);f=m+c-f;(g=b.k.u.f.j,n=gt(g).top,p=gt(a).bottom,q=(b.p.offsetHeight||0)|0,r=p+q,r<n)?(b.i.style.top=f+(T(),v),b.i.style[wc]=""):(b.i.appendChild(b.e),g=(Em(b.k).offsetHeight||0)|0,b.i.style[wc]=g-f-((a.offsetHeight||0)|0)+(T(),v),b.i.style.top="");b.i.style[u]=
+kt(b.k.u.D)+(T(),v)}};B(247);function EC(a){this.a=a}x(248,1,{},EC);_.Hb=function(){vC(this.a)};B(248);function FC(a){this.a=a}x(249,1,{},FC);_.Hb=function(){zB(this.a)};B(249);function JC(a){this.a=a}x(250,1,{},JC);_.sd=function(a){Ht(a.a,this.a.r)&&uC(this.a)};B(250);function IC(a){this.a=a}x(251,1,{},IC);_.od=function(){xC(this.a)};B(251);
+function sC(a,b,c){var d;if(a.b)throw new Z("An EditorRequest must be completed exactly once");a.b=!0;d=a.c.s;null==b?ki(d.o):(zi(d.o,b),gi(d.o)||d.q.appendChild(d.o));pC(a.c.s);if(c)for(b=new kl(c);b.b<b.d.Oc();){d=(N(b.b<b.d.Oc()),b.d.Me(b.c=b.b++));c=a.c.s;var e=void 0;if(3!=c.w&&4!=c.w)throw new Z("Cannot set cell error status: editor is neither active nor saving.");c.f.a.Be(d)||(e=gi(Em(U(c.g,d))),li(e,ab),il(c.f,d))}}function qC(a,b,c){this.c=a;this.d=b;this.a=c}x(118,1,{},qC);_.b=!1;_.d=0;
+B(118);function SA(a,b){var c,d;for(d=new kl(a.d);d.b<d.d.Oc();)c=(N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++)),KC(c,b)}function LC(a,b){var c,d;d=a.he();d.d=a;for(c=0;c<a.c.n.b.length;++c)KC(d,uu(a.c,c));Xz(a.d,b,d);a.ie();return d}function iu(a,b){try{return hv(a.d,b)}catch(c){c=Oh(c);if(y(c,27))throw new H("Row with index "+b+" does not exist");throw Ph(c);}}function iB(a,b){var c,d;for(d=new kl(a.d);d.b<d.d.Oc();)c=(N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++)),rl(c.c,b)}
+function MC(a,b){gv(a.d,b);a.a=!0;Kh((Dh(),Eh),new NC(a))}x(156,1,{});_.e=!0;B(156);function OC(){this.d=new G;this.a=!1}x(231,156,{},OC);_.he=function(){return new PC};_.ie=function(){this.a=!0;Kh((Dh(),Eh),new NC(this))};_.a=!1;B(231);function NC(a){this.a=a}x(161,1,{},NC);_.ib=function(){this.a.a&&(this.a.a=!1,dB(this.a.c))};B(161);function QC(a){if(a.e!=(jC(),RC))throw new Z("Cannot fetch HTML from a cell with type "+a.e);return a.b}
+function SC(a){if(a.e!=(jC(),kC))throw new Z("Cannot fetch Text from a cell with type "+a.e);return a.b}function yC(a){if(a.e!=(jC(),TC))throw new Z("Cannot fetch Widget from a cell with type "+a.e);return a.b}function UC(a,b){if(1>b)throw new H("Colspan cannot be less than 1");a.a=b;a.c.ie()}x(157,1,{});_.a=1;_.b=null;_.d=null;B(157);function VC(){this.e=(jC(),kC)}x(232,157,{},VC);B(232);function KC(a,b){var c;c=a.je();c.c=a.d;pl(a.c,b,c)}
+function lB(a){var b,c,d,e;for(c=Kq(new Lq(a.c));c.a.Dc();)b=Mq(c),UC(b,1);for(e=hn(new jn(a.b));e.a.Dc();)if(d=kn(e),WC(a,d)){b=0;for(c=d.xc();c.Dc();)c.Ec(),++b;UC(U(a.b,d),1>b?1:b)}else UC(U(a.b,d),1)}function WC(a,b){var c,d,e;c=new eq(ju(new eq(a.d.c.n)));if(!XC(c,b))return!1;for(d=0;d<c.b.length;++d)if(b.we((Vh(d,c.b.length),c.b[d]))){for(e=1;e<b.Oc();++e)if(!b.we((Vh(d+e,c.b.length),c.b[d+e])))return!1;return!0}return!1}
+function hu(a,b){var c;a:{var d;for(d=hn(new jn(a.b));d.a.Dc();)if(c=kn(d),c.we(b))break a;c=null}return c?U(a.b,c):U(a.c,b)}x(158,1,{});_.e=null;B(158);function PC(){this.c=new mh;this.b=new mh}x(233,158,{},PC);_.je=function(){return new VC};B(233);function YC(a){this.b=a;this.a=new mh}x(239,1,{},YC);_.pd=function(a){var b;b=a.g;if(a=rl(this.a,ti((O(),b))))xB(a,null),ji(b)};
+_.qd=function(a){var b;b=a.g;1==a.f%2?li(hi((O(),b)),"stripe"):yi(hi((O(),b)),"stripe");b=a.f;ji(a.g);a=this.b.u.a.b;if(-1>b||b>=a.f.a.k)throw new H("invalid row index: "+b+", while the body only has "+a.f.a.k+" rows.");var c=I(b);a.a.Ze(c)?hA(HA(a.a,I(b)),50):(!a.d&&(a.d=Pr(a.f,a.c,(sv(),tv))),c=new NA(a,b),zu(a.a,I(b),c),zz(a.f.u,c.e,a.f.r.k,Kz(a.f.a,b)+a.f.a.f),b=c.e,b.style[u]=kz(a.f.c)+(T(),v),a.f.a.j.appendChild(b),c.e.style[u]=kt(c.i.f.D)+v,hA(c,50),c.g.colSpan=c.i.f.c.a.b.length,b=Kr(Em(c.i.f)),
+Mr(c.e,b+xc),Mr(c.a,b+yc),zz(a.f.u,c.a,0,Zy(c.i.f.u,c.e)-c.i.f.a.f),a.f.w.appendChild(c.a),gi(a.f.w)||(Em(a.f).appendChild(a.f.w),a.b=kt(c.a)),a.e.qd(c),LA(c)?(c.e.style[l]="",c.a.style[l]=""):(c.e.style[l]=(Zi(),mb),c.a.style[l]=mb),Vz(a.f.a))};B(239);function ZC(a,b){var c;c=iu(a,b);gv(a.d,b);a.b=!0;Kh((Dh(),Eh),new $C(a));c==a.a&&aD(a,null)}
+function aD(a,b){if(b!=a.a){if(b&&-1==bq(a.d,b))throw new H("Cannot set a default row that does not exist in the container");a.a&&(a.a.a=!1);b&&(b.a=!0);a.a=b;a.b=!0;Kh((Dh(),Eh),new $C(a))}}function bD(){this.d=new G;this.b=!1}x(230,156,{},bD);_.he=function(){return new cD};_.ie=function(){this.b=!0;Kh((Dh(),Eh),new $C(this))};_.b=!1;B(230);function $C(a){this.a=a}x(120,1,{},$C);_.ib=function(){this.a.b&&(this.a.b=!1,fB(this.a.c))};B(120);function dD(){this.e=(jC(),kC)}x(117,157,{117:1},dD);B(117);
+function cD(){this.c=new mh;this.b=new mh;this.a=!1}x(116,158,{116:1},cD);_.je=function(){return new dD};_.a=!1;B(116);function Cw(){Cw=w;Ew=new eD("HEADER",0);Fw=new eD("BODY",1);Dw=new eD("FOOTER",2)}function eD(a,b){R.call(this,a,b)}x(80,4,{80:1,3:1,5:1,4:1},eD);var Fw,Dw,Ew,fD=C(80,function(){Cw();return S(D(fD,1),h,80,0,[Ew,Fw,Dw])});
+function sB(a){var b,c,d;y(a.c.S,59)&&a.c.C.a&&(d=hu(a.c.C.a,a),d.e==(jC(),TC)&&y(yC(d),94)||(c=a.c.S,b=new os,c=new gD(a,c),b.c||(Or(b,new qs(b),(Bk(),Bk(),Ck)),b.c=!0),Pr(b,c,(!al&&(al=new Gk),al)),ns(b,(dm(),a.b?em:rp)),d.b=b,d.e=(jC(),TC),d.c.ie()))}function tB(a,b){if(b!=a.o&&a.a)throw new Wr("The selection column cannot be modified after init");mC(a,b);return a}function rB(a,b){this.c=a;lC(this,b);this.b=this.a=!1}x(236,71,{71:1},rB);_.ae=hD;_.be=iD;_.ce=iD;
+_.de=function(a){return dm(),this.c.S.yd(a)?em:rp};_.ee=function(a){return tB(this,a)};_.a=!1;_.b=!1;B(236);function gD(a,b){this.a=a;this.b=b}x(252,1,{},gD);B(252);function jD(){jD=w;kD=new lD;mD=new nD;oD=new pD}x(55,4,Gc);var mD,oD,kD,qD=C(55,function(){jD();return S(D(qD,1),h,55,0,[kD,mD,oD])});function lD(){R.call(this,"SINGLE",0)}x(261,55,Gc,lD);C(261,null);function nD(){R.call(this,"MULTI",1)}x(262,55,Gc,nD);C(262,null);function pD(){R.call(this,"NONE",2)}x(263,55,Gc,pD);C(263,null);
+function Lk(a){a.a.$==a.f&&(Lr((W(),a._),"opened",!1),Lr(a._,Hc,!0),Tm(a.a),rD(a))}
+function rD(a){try{var b=jt(si(Bu(a.b.u.j,0))),c=(W(),a._);ft();var d,e,f,g,m;(Ws(),!Xs&&(Xs=new Ys),Ws(),Xs).a.f?(m=Vi(c.style,u),e=Vi(c.style,t),g=(c.offsetWidth||0)|0,f=(c.offsetHeight||0)|0,1>f&&(f=1),1>g&&(g=10),c.style[u]=g+(T(),v),c.style[t]=f+v,d=((c.offsetHeight||0)|0)-(parseInt(c[fb])|0),c.style[t]=e,c.style[u]=m):d=((c.offsetHeight||0)|0)-(parseInt(c[fb])|0);Jr(a.d,b-(d/2|0)+v)}catch(n){if(n=Oh(n),y(n,52))ge(DB),Jr(a.d,a.b.u.j.f+v);else if(y(n,27))ge(DB),Jr(a.d,a.b.u.j.f+v);else throw Ph(n);
+}}function sD(a){this.e=new tD(this);this.b=a;this.f=new vs;rs(this,this.f);this.d=new ls;Or(this.d,this.e,(Bk(),Bk(),Ck));a=this.f;$r(a,this.d,(W(),a._));this.a=new uD(this);this.c=new vD;a=new wD(this);Or(this.d,a,(Ik(),Ik(),Jk));Or(this.c,a,Jk)}x(240,616,Yb,sD);_.qc=function(){us(this);dt((Dh(),Eh),new xD(this))};B(240);function tD(a){this.a=a}x(255,1,{},tD);
+_.Hb=function(){var a=this.a;if(a.a.$==a.f)Lk(this.a);else{a=this.a;if(a.a.$!=a.f&&a.$){Lr((W(),a._),"opened",!0);Lr(a._,Hc,!1);var b=a.f;$r(b,a.a,(W(),b._))}Jr(a.d,"")}};B(255);function uD(a){this.a=a;vs.call(this)}x(256,121,Vb,uD);_.yc=function(a){if(a=bs(this,a)){var b=this.a,c,d;c=0<b.a.b.c;(d=!!b.$)&&!c?(xB(b,null),ki((W(),b._))):!d&&c&&(Lk(b),c=Em(b.b),d=(W(),b._),c.appendChild(d),xB(b,b.b),rD(b))}return a};B(256);
+function vD(){new G;this.b=new G;var a=(Gs(),Os(),!0),b,c;c=(W(),Oi());this.a=Li();b=br(this.a);c.appendChild(b);a||(b=Ni(),b=br(b),this.a.appendChild(b));b=(As(),Bs).Gc();c=br(c);b.appendChild(c);this._=b;Lf();this._.setAttribute("role",og.a);-1==this.Y?cr(this._,2225|(this._.__eventBits||0)):this.Y|=2225;oi(this._,"gwt-MenuBar");a=a?Kr(this._)+"-vertical":Kr(this._)+"-horizontal";Lr((W(),this._),a,!0);this._.style.outline="0px";this._.setAttribute("hideFocus",sb);Or(this,new Fs,(wk(),wk(),xk))}
+x(257,163,Ub,vD);_.cc=function(a){W();128==Vq((O(),a).type)&&13==(a.keyCode|0)?(Ds(this,a),dt((Dh(),Eh),new yD(this))):Ds(this,a)};B(257);function yD(a){this.a=a}x(258,1,{},yD);_.ib=function(){var a=this.a;(As(),Bs).Hc((W(),a._))};B(258);function wD(a){this.a=a}x(259,1,{},wD);B(259);function xD(a){this.a=a}x(260,1,{},xD);_.ib=function(){rD(this.a)};B(260);
+function zD(a,b,c){var d,e,f;e=iu(a.b,b.d);b=tu(a.c);for(c=c.xc();c.Dc();)if(d=c.Ec(),f=hu(e,b.a.Me(d.a)),(jC(),TC)==f.e&&(f=yC(f),d=d.c,!f.pc())){var g=(W(),f._);d.appendChild(g);xB(f,a.c)}}function AD(a,b,c){var d;if(a.b.d.b.length>b.d)for(b=iu(a.b,b.d),a=tu(a.c),c=c.xc();c.Dc();)d=c.Ec(),d=hu(b,a.a.Me(d.a)),(jC(),TC)==d.e&&yC(d).pc()&&(d=yC(d),xB(d,null),ki((W(),d._)))}function BD(a,b,c){this.c=a;this.b=b;this.a=c}x(160,1,{},BD);_.Tc=function(a,b){zD(this,a,b)};_.Uc=Tu;
+_.Vc=function(a,b){var c,d;for(d=b.xc();d.Dc();)c=d.Ec(),this.c.R&&iu(this.b,a.d)==this.c.C.a&&uu(this.c,c.a)==this.c.R&&sB(this.c.R)};_.Wc=function(a,b){AD(this,a,b)};
+_.Xc=function(a,b){var c,d,e,f,g,m,n;m=iu(this.b,a.d);e=tu(this.c);wB(a.c,m.e);for(d=b.xc();d.Dc();){c=d.Ec();g=hu(m,e.a.Me(c.a));n=!0;if(y(m,116)){f=m;var p=c,q=void 0,r=q=void 0,q=r=void 0,q=p.c;q.removeAttribute("sort-order");yi(q,"sort-desc");yi(q,"sort-asc");q=pu(this.c,p.a);a:{for(var r=q,s=void 0,z=void 0,z=new mB(ju(this.c.U).b.xc());z.b.Dc();)if(s=z.b.Ec(),s.a==r){r=s;break a}r=null}f.a&&q.n&&r&&(q=p.c,(Px(),Qx)==r.b?li(q,"sort-asc"):li(q,"sort-desc"),r=ou(ju(this.c.U),r),-1<r&&1<ju(this.c.U).b.Oc()&&
+(f=(E(),""+(r+1)),q.setAttribute("sort-order",f)));this.c.R&&iu(this.b,a.d)==this.c.C.a&&uu(this.c,c.a)==this.c.R&&(n=!1)}f=c;p=g.a;q=void 0;if(1>p)throw new H("Number of cells should be more than 0");q=parseInt(f.c[gc])|0;if(1!=p||1!=q){f.c[gc]=p;for(var r=f,L=z=s=void 0,Q=void 0,s=iv(r.b,p-1).b,L=r.d.b[r.a],z=Q=0;z<s;z++)Q+=r.d.b[r.a+z+1];r.c.style[u]=L+Q+(T(),v);r=p;z=s=void 0;s=iv(f.b,(q>r?q:r)-1);if(q<r)for(z=0;z<s.b;z++)(Vh(q+z-1,s.b),s.c.Me(s.a+(q+z-1))).c.style[l]=(Zi(),mb);else if(q>r)for(z=
+0;z<s.b;z++)(Vh(r+z-1,s.b),s.c.Me(s.a+(r+z-1))).c.style[l]="";f.b.d=p-1}f=c.c;if(n)switch(g.e.g){case 0:zi(f,SC(g));break;case 1:n=QC(g);f.innerHTML=n||"";break;case 2:AD(this,a,new Bm(S(D(Wu,1),h,81,0,[c]))),f.innerHTML="",zD(this,a,new Bm(S(D(Wu,1),h,81,0,[c])))}wB(f,g.d);eC(this.c.c,c,this.a)}};B(160);
+function bB(a,b,c){var d;if(-1==bq(a.c.n,b))throw new H("Given column is not a column in this grid. "+iC(b));if(b.n){a:{var e;for(e=new mB(ju(a.c.U).b.xc());e.b.Dc();)if(d=e.b.Ec(),d.a==b)break a;d=null}c?d?(b=bq(a.c.U,d),av(a.c.U,b,new Ox(d.a,d.b.oe()))):Ne(a.c.U,new Nx(b)):(c=a.c.U.b.length,a.c.U.b=we(F,h,1,0,3),d&&1==c?Ne(a.c.U,new Ox(d.a,d.b.oe())):Ne(a.c.U,new Nx(b)));a=a.c;eB(a.u.j,a.C);Zk(a,new Mx(a,ju(a.U)))}}function CD(a){this.c=a;this.d=new DD(this)}x(237,1,{},CD);_.b=!1;B(237);
+function DD(a){this.a=a}x(253,50,{},DD);_.eb=function(){bB(this.a,this.a.a,this.a.b)};B(253);function ED(a){var b=new G;b.b=a;return b}function YB(a){return a==Xd||a==Xd?[]:{}}function FD(a,b,c,d){var e=a[b];Object.defineProperty(a,b,{get:function(){if(d){var a=d();return!isNaN(parseFloat(a))&&isFinite(a)?+a:a}return e},set:function(a){c&&c(a);e=a}});void 0!==e&&(a[b]=e)}function $B(a,b,c,d){c=c?wp(new GD(c)):null;d=d?wp(new HD(d)):null;FD(a,b,c,d)}
+function dC(a,b){return up(a,Ic,S(D(F,1),h,1,3,[a,b]))}function ID(a){return void 0===a||null===a}function GD(a){this.a=a;hm.call(this)}x(294,6,Wa,GD);_.Pb=function(){this.a.le(fm(this,0))};B(294);function HD(a){this.a=a;hm.call(this)}x(295,6,Wa,HD);_.Rb=function(){return this.a.ke()};B(295);function JD(a,b){var c;c=up(a,"indexOf",S(D(F,1),h,1,3,[b])).a;return A(c)}function KD(a,b){up(a,zb,S(D(F,1),h,1,3,[I(JD(a,b)),I(1)]))}
+function LD(){LD=w;MD=new ND("Direction",0,"sort direction",(Px(),S(D(OD,1),h,61,0,[Qx,PD])),"asc",S(D(Wd,1),h,2,4,["asc","desc"]));QD=new ND("Selection",1,"selection mode",(Yw(),S(D(RD,1),h,42,0,[SD,$w,Zw,TD])),"single",S(D(Wd,1),h,2,4,[]))}function UD(a,b){var c,d;for(d=a.d.xc();d.Dc();)if(c=d.Ec(),xe((null!=b.f?b.f:""+b.g).toLowerCase(),c.toLowerCase()))return c;return a.a}
+function VD(a,b){var c,d,e,f;b=null!=b&&b.length?b.toLowerCase():a.a;if(!a.d.we(b))throw new rh(Jc+a.c+", valid options are: "+a.d);if(null!=a.b)for(d=a.b,e=0,f=d.length;e<f;++e)if(c=d[e],oe(UD(a,c),b))return c;return null}function ND(a,b,c,d,e,f){R.call(this,a,b);this.c=c;this.b=d;this.a=e;if(0==f.length){e=new G;b=0;for(c=d.length;b<c;++b)a=d[b],Ne(e,(null!=a.f?a.f:""+a.g).toLowerCase());this.d=e}else this.d=new Bm(f)}x(97,4,{97:1,3:1,5:1,4:1},ND);
+var MD,QD,WD=C(97,function(){LD();return S(D(WD,1),h,97,0,[MD,QD])});function XD(){var a=this.dfd=(lm(),new fq);!a.b&&(a.b=new iq(a));this.a=a.b;this["catch"]=this.fail}function YD(a){this.a=a;this["catch"]=this.fail}x(150,1,{},XD,YD);_.always=function(a){var b=this.a;a=S(D(jm,1),h,6,0,[new Hm(a)]);aq(b.a.d,a);aq(b.a.c,a);return this};_.done=function(a){a=S(D(jm,1),h,6,0,[new Hm(a)]);aq(this.a.a.d,a);return this};_.fail=function(a){a=S(D(jm,1),h,6,0,[new Hm(a)]);aq(this.a.a.c,a);return this};
+_.state=function(){return this.a.a.e};_.then=function(a){var b;b=this.a;var c=S(D(jm,1),h,6,0,[new ZD(a)]);a=new fq;var d=S(ul(jm),h,6,0,[new mq(a,c,0)]);aq(b.a.d,d);d=S(ul(jm),h,6,0,[new mq(a,c,1)]);aq(b.a.c,d);c=S(ul(jm),h,6,0,[new mq(a,c,2)]);aq(b.a.a,c);b=(!a.b&&(a.b=new iq(a)),a.b);return new YD(b)};B(150);function ZD(a){this.a=a;hm.call(this)}x(203,6,Wa,ZD);_.Rb=function(){return dC(this.a,fm(this,0))};B(203);
+function $D(){$D=w;aE=new bE("String",0,"string value","(.+)",Wd,"","");cE=new bE("Pixel",1,"pixel value","([\\d\\.]+)(px)?$",dE,null,null);eE=new bE("Integer",2,"int value","([+-]?\\d+)",dp,I(0),I(0));fE=new bE("Double",3,"double value","([+-]?[\\d\\.]+)",dE,new Y(0),new Y(0));gE=new bE("Boolean",4,"boolean value","(|true|false)",qp,(dm(),dm(),em),rp)}function hE(a,b,c,d,e){var f;if(f=b)f=(O(),b).hasAttribute(c);b=f?(O(),b).getAttribute(c)||"":null;return iE(a,b,d,e)}
+function jE(a,b,c){return hE(a,nn(b,0),c,a.a,a.b)}function kE(a,b,c,d){b=ID(b)?null:(E(),""+b);return iE(a,b,c,d)}function iE(a,b,c,d){var e;if(null==b||ID(b))return d;if(!Ae(b).length)return c;c=a.d.exec(b);if(!c||null==(e=c[1]))throw new rh(Jc+a.c+"("+b+"), valid format is "+ae(a.d));try{return a.e==Wd?e:a.e==dp?I(lE(e)):a.e==dE?new mE(e):a.e==qp?(dm(),pe(sb,e)?em:rp):e}catch(f){f=Oh(f);if(y(f,15))throw new rh(Jc+a.c+", valid format is "+ae(a.d));throw Ph(f);}}
+function bE(a,b,c,d,e,f,g){R.call(this,a,b);this.c=c;this.d=RegExp("^"+d+"$","i");this.e=e;this.a=f;this.b=g}x(62,4,{62:1,3:1,5:1,4:1},bE);var gE,fE,eE,cE,aE,nE=C(62,function(){$D();return S(D(nE,1),h,62,0,[aE,cE,eE,fE,gE])});function oE(a,b){var c,d;d=(E(),""+b);if(re(d,"[+-]?\\d+")){if(c=($D(),eE),d=iE(c,d,c.a,c.b).a,0<=d&&d<=a.b.length)return d}else for(c=0;c<a.b.length;c++)if(oe(d,vp(a.b,I(c)).name))return c;throw new H(Bc);}
+function pE(a){var b;b=ju(new eq(a.e.n));y(a.getSelectionModel(),59)&&(b=b.Te(1,b.Oc()));return b}function Xw(a){var b;b=null;y(a.getSelectionModel(),59)&&(b=yC(hu(a.e.C.a,uu(a.e,0))));return b}function qE(a,b){return(new Promise(function(b){a.onReady(b)})).then(b)}
+function ax(a){var b,c;if(c=Xw(a)){b=a.getSelectionModel().getMode()==(Yw(),Zw);ns(c,(dm(),b?em:rp));var d=cn(X(c)),e=S(ul(Wd),h,2,4,["v-grid","style-scope"]),f,g,m,n,p,q;n=d.c;p=0;for(q=n.length;p<q;++p)if((m=n[p])&&1==m.nodeType)for(f=0,g=e.length;f<g;++f)d=e[f],li(m,d);a=0!=(b?a.getSelectionModel().deselected(null,null,null):a.getSelectionModel().selected(null,null,null)).length;b=mn(X(c),S(D(Wd,1),h,2,4,["input"]));c=a?em:rp;b=b.c;e=0;for(d=b.length;e<d;++e)(a=b[e])&&Pm(a,"indeterminate",c)}}
+function rE(){this.e=new sE;this.defaultHeightByRows=A(this.e.u.o);Ww(this.e,new tE);Pr(this.e,this,(qx(),qx(),rx));Pr(this.e,this,(Kx(),Kx(),Lx));Pr(this.e,this,(Uw(),Uw(),Vw));this.setColumns(YB(Xd));this.g=new uE(this);this.d=new vE(this);this.j=new wE(this);vB(this.e,"v-grid style-scope v-grid")}x(613,1,{20:1},rE);_.addColumn=function(a,b){var c;c=this.b.length;null!=b&&(c=oE(this,b));up(this.b,zb,S(ul(F),h,1,3,[I(c),I(0),a]));this.setColumns(this.b);return a};
+_.attached=function(a,b,c){this.c||(this.c=a,b&&(new xE(b,this),b=new yE(b,this),nB(this.e,b)),b=Em(this.e),c.appendChild(b),Nq(this.e,null),this.d.setContainer(a));this.g.a=X(a);zE(this.g,!0);this.updating=!1};_.getCellClassGenerator=Rn;_.getColumns=AE;_.getDataSource=function(){return this.e.q};_.getEditor=BE;_.getFrozenColumns=function(){return this.e.A};_.getGrid=CE;_.getGridElement=function(){return W(),this.e._};_.getHeightMode=function(){return Wi(this.e.u.p)};_.getRowClassGenerator=function(){return this.i};
+_.getRows=function(){return this.g.b};_.getScrollTop=function(){return this.e.u.F.k};_.getSelectionMode=function(){return Wi(this.getSelectionModel().getMode()).toLowerCase()};_.getSelectionModel=function(){return this.e.S};_.getSortOrder=ph;_.getStaticSection=Cx;_.isDisabled=function(){return!this.e.t};_.isWorkPending=function(){var a;if(!(a=!this.e.q||!!this.e.q.k||!!this.g.p)){a=this.e;var b=a.u;a=b.a.a.f||yv(b.F)||yv(b.r)||a.p||a.a.b}return a};_.cc=function(){this.refresh()};
+_.onBrowserEvent=_.cc;_.onReady=function(a){a=new Hm(a);Qh((Dh(),new DE(this,a)))};_.Cd=function(){ax(this);this.updating||un(X(this.c),"select")};_.redraw=function(){zE(this.g,!1)};_.refresh=function(){var a,b;this.updating=!0;b=this.getSelectionModel();a=b.selected(null,null,null);this.getDataSource()&&this.getDataSource().refresh();zE(this.g,!0);0<a.length&&X(this.c).Ub(5,S(D(jm,1),h,6,0,[new EE(a,b)]));this.updating=!1};_.removeColumn=function(a){KD(this.b,vp(this.b,I(oE(this,a))))};
+_.scrollToEnd=function(){var a=this.e;Pw(a,a.u.a.k-1,(Qw(),FE))};_.scrollToRow=function(a,b){if(null!=b){var c=this.e,d;d=b.toUpperCase();Qw();d=Yi((GE(),HE),d);Pw(c,a,d)}else jB(this.e,a,(Qw(),Rw),0)};_.scrollToStart=function(){Pw(this.e,0,(Qw(),IE))};_.setCellClassGenerator=function(a){var b=this.e;b.g=ID(a)?null:new JE(this,a);Mt(b.u.a,0,b.u.a.k);this.a=a};_.setColumnWidth=function(a,b){uu(this.e,a).ee(b)};
+_.setColumns=function(a){var b,c,d;b=new G;for(d=pE(this).xc();d.Dc();)c=d.Ec(),Ne(b,c.c);for(c=ED(a).xc();c.Dc();)if(d=c.Ec(),-1==bq(b,d)){d=new KE(d,this);var e=this.getGrid(),f=e,g=d,e=e.n.b.length;if(g==f.R)throw new H("The selection column many not be added manually");if(f.R&&0==e)throw new Z("A column cannot be inserted before the selection column");RA(f,g,e);$B(d.c,"headerContent",new LE(d),new ME(d));NE(d,"flex",new OE(d));NE(d,"sortable",new PE(d));NE(d,"readOnly",new QE(d));NE(d,"renderer",
+new RE(d));NE(d,"minWidth",new SE(d));NE(d,"maxWidth",new TE(d));NE(d,u,new UE(d));NE(d,"valueGenerator",new VE(d))}for(b=pE(this).xc();b.Dc();)if(d=b.Ec(),-1==JD(a,d.c)){c=this.e;if(d&&d==c.R)throw new H("The selection column may not be removed manually.");gB(c,d)}b=pE(this).ze(we(WE,h,113,0,0));c=b.length;d=new XE(a);!d&&(d=(YE(),YE(),ZE));g=c-0;f=S(D(F,1),h,1,3,[I(0),I(c)]);if(!(0<=g))throw new H(di("%s \x3e %s",f));var f=wl(b,g),m=En(b.length-0,g),e=g=0,n,p,q,r,s;Zh(b,"src");Zh(f,"dest");r=Qd(b);
+p=Qd(f);Rh(0!=(r.e&4),"srcType is not an array");Rh(0!=(p.e&4),"destType is not an array");q=r.c;n=p.c;Rh(0!=(q.e&1)?q==n:0==(n.e&1),"Array types don't match");s=b.length;n=f.length;if(0>g||0>e||0>m||g+m>s||e+m>n)throw new as;if(0!=(q.e&1)&&0==(q.e&4)||r==p)0<m&&yl(b,g,f,e,m,!0);else if(fe(b)===fe(f)&&g<e)for(g+=m,m=e+m;m-- >e;)f[m]=b[--g];else for(m=e+m;e<m;)f[e++]=b[g++];$E(f,b,0,c,-0,d);0<b.length&&ru(this.e,b);if(this.b!=a){yq();Jq(this.b,null);a=this.b=a;b=new aF(this);yq();c=(!km&&(km=new On),
+Qn(co));c.a.add=!0;c.a[yb]=!0;c.a[xb]=!0;c.a[zb]=!0;c=c.a;d=[];g=rn(c);e=0;for(m=g.length;e<m;++e)f=g[e],p=(E(),""+f),q=void 0,(q=An(c,p,qp))&&q.a&&(d[d.length]=f);wq||(vq||(vq=Im((lm(),xm),"Object.observe"))||xq(),wq=!0);Iq(a,b,d)}};_.setDataSource=function(a){if(Gm(a))new bF(a,this);else throw new rh("Unknown data source type: "+a+". Arrays and Functions are supported only.");};
+_.setDisabled=function(a){var b=this.e;a=!a;var c;if(a!=b.t){b.t=a;(W(),b._).tabIndex=a?0:-1;if(c=0!=b.s.w){var d=b.s;is(d.s,a);is(d.d,a)}my(b.u,(Qv(),Rv),!a||c);my(b.u,Tv,!a)}};_.setFrozenColumns=function(a){var b=this.e;a=kE(($D(),eE),I(a),I(0),I(0)).a;if(-1>a||a>b.n.b.length)throw new H("count must be between -1 and the current number of columns ("+b.n.b.length+")");b.A=a;hB(b)};_.setHeight=function(a){ky(this.e.u,a)};
+_.setHeightMode=function(a){var b=(Yx(),Yi((cF(),dF),a));a=this.e.u;if(b!=a.p)switch(a.p=b,a.p.g){case 0:ky(a,a.n);break;case 1:b=a.o;if(0>=b)throw new H("The number of rows must be a positive number.");if(!isFinite(b)&&!isNaN(b))throw new H("The number of rows must be finite.");if(isNaN(b))throw new H("The number must not be NaN.");a.o=b;ew(a);break;default:throw new Z("Unimplemented feature - unknown HeightMode: "+a.p);}};
+_.setRowClassGenerator=function(a){var b=this.e;b.P=ID(a)?null:new eF(this,a);Mt(b.u.a,0,b.u.a.k);this.i=a};_.setRows=function(a){var b=this.g;b.i&&a==b.b||(b.i=0<a,b.b=a,zE(b,!0))};_.setSelectionMode=function(a){pe(this.getSelectionMode(),a)||(this.updating=!0,a=VD((LD(),QD),a),Ww(this.e,a.ne()),un(X(this.c),"selectionmodechange"),this.getSelectionModel().zd(),ax(this),this.redraw(),this.updating=!1)};
+_.setSortOrder=function(a){var b,c,d,e,f,g;g=new G;c=pE(this);for(f=ED(a).xc();f.Dc();)e=f.Ec(),b=c.Me(e.column),d=VD((LD(),MD),e.direction),e.direction=UD(MD,d),Ne(g,new Ox(b,d));b=this.e;g!=b.U&&(b.U.b=we(F,h,1,0,3),ku(b.U,g));eB(b.u.j,b.C);Zk(b,new Mx(b,ju(b.U)));this.f=a};
+_.sort=function(a){var b,c,d;this.getSelectionModel().zd();!this.f&&(this.f=[]);this.f.length=0;b=pE(this);for(c=new mB(a.b.b.xc());c.b.Dc();)a=c.b.Ec(),d=YB(fF),d.column=b.Ne(a.a),d.direction=UD((LD(),MD),a.b),up(this.f,Kc,S(D(F,1),h,1,3,[d]));un(X(this.c),"sort");(b=this.getDataSource())&&b.clearCache(null)};_.then=function(a){var b;return(lm(),nm).e||nm.d&&-1!=$wnd.navigator.userAgent.toLowerCase().indexOf("trident")?(b=new XD,a=new gF(a,b),Qh((Dh(),new DE(this,a))),b):qE(this,a)};
+_.defaultHeightByRows=0;_.updating=!0;B(613);function EE(a,b){this.a=a;this.b=b;hm.call(this)}x(205,6,Wa,EE);_.Pb=function(){var a,b;for(a=0;a<this.a.length;a++)b=kE(($D(),eE),vp(this.a,I(a)),I(-1),I(-1)).a,this.b.select(b,!0)};B(205);function aF(a){this.a=a}x(114,1,{114:1},aF);B(114);function DE(a,b){this.a=a;this.b=b}x(209,1,{},DE);_.hb=function(){return this.a.isWorkPending()?!0:(this.b.Pb(),!1)};B(209);function gF(a,b){this.a=a;this.b=b;hm.call(this)}x(210,6,Wa,gF);
+_.Pb=function(){var a,b;try{b=dC(this.a,null);a=this.b.dfd;var c=S(D(F,1),h,1,3,[b]);a.e==wb&&Hp(a.d,c)}catch(d){if(d=Oh(d),y(d,73))a=d,b=this.b.dfd,a=S(D(F,1),h,1,3,[a.gb()]),b.e==wb&&Hp(b.c,a);else throw Ph(d);}};B(210);function XE(a){this.a=a}x(206,1,{},XE);_.me=function(a,b){var c=this.a;return JD(c,a.c)>JD(c,b.c)?1:-1};_.eQ=be;B(206);function eF(a,b){this.a=a;this.b=b}x(207,1,h,eF);B(207);function JE(a,b){this.a=a;this.b=b}x(208,1,{},JE);B(208);
+function rC(a,b,c){var d,e;e=YB(hF);e.rowIndex=b.d;d=zt(b.c.q,b.d);y(d,100)&&(d=d.a);e.dataItem=d;e.grid=a.a;e.success=wp(new iF(a,b,c));e.failure=wp(new jF(a,b));e.getCellEditor=wp(new kF(a));return e}function wC(a,b){var c,d;d=U(a.b,b);if(!d){if(a.e.getCellEditor)c=dC(a.e.getCellEditor,b);else{c=$doc;var e;c=(e=(O(),c).createElement("INPUT"),e.type="text",e);li(c,Lc)}c&&(d=new lF(c),pl(a.b,b,d))}return d}
+function vE(a){this.b=new mh;this.d=a;this.c=a.getGrid();this.e={};a=new mF(this);var b=this.c.s;if(0!=b.w)throw new Z("Cannot set EditorHandler: editor is currently in edit mode");b.n=a}x(154,1,{},vE);_.cancel=function(){0!=this.c.s.w&&zB(this.c.s)};_.editRow=function(a){0!=this.c.s.w&&this.cancel();AB(this.c.s,a)};_.getCancelButtonText=function(){return js(this.c.s.d)};_.getHandler=CE;_.getSaveButtonText=function(){return js(this.c.s.s)};_.isEnabled=function(){return this.c.s.j};_.save=function(){vC(this.c.s)};
+_.setCancelButtonText=function(a){var b=this.c.s;if(null==a)throw new H("Cancel caption cannot be null");ks(b.d,a)};_.setContainer=function(a){this.a=a};_.setEnabled=function(a){var b=this.c.s;if(!a&&0!=b.w)throw new Z("Cannot disable: editor is in edit mode");if(a&&!b.n)throw new Z("Cannot enable: EditorHandler not set");b.j=a};_.setHandler=function(a){this.e=a};_.setSaveButtonText=function(a){var b=this.c.s;if(null==a)throw new H("Save caption cannot be null");ks(b.s,a)};B(154);
+function iF(a,b,c){this.a=a;this.c=b;this.b=c;hm.call(this)}x(221,6,Wa,iF);_.Pb=function(){var a=this.c;sC(a,null,null);a.a&&a.a.ge(a);this.b&&Wk(this.a.b)};_.b=!1;B(221);function jF(a,b){this.a=a;this.b=b;hm.call(this)}x(222,6,Wa,jF);_.Pb=function(){var a,b,c,d;d=fm(this,1);c=new G;for(b=pE(this.a.d).xc();b.Dc();)a=b.Ec(),d&&-1!=JD(d,a.c)&&(c.b[c.b.length]=a);a=this.b;b=fm(this,0);sC(a,b,c);a.a&&a.a.fe(a)};B(222);function kF(a){this.a=a;hm.call(this)}x(223,6,Wa,kF);
+_.Rb=function(){return Em(wC(this.a,fm(this,0)))};B(223);function mF(a){this.a=a}x(224,1,{},mF);B(224);function lF(a){Ir();this._=(W(),a)}x(225,155,$b,lF);_.qc=function(){Qr(this);li(gi((W(),this._)),Lc)};B(225);
+function sE(){var a;Ir();this.v=new vw(this);this.F=new Mw(this,this.v);this.G=new Tw(this,this.v);new Sw(this,this.v);this.i=new Gw(this,this.v);new Jw(this,this.v);this.u=new py;this.C=new bD;this.w=new OC;this.T=new sD(this);this.n=new G;this.o=$(0,0);this.U=new G;this.V=new CD(this);this.s=new zC;this.a=new TB(this);this.B=new YC(this);new hl;this.j=new oC(this);this.r=new eu;this.b=new kw(this);this.D=new JB(this);this.M=new ww;this.f=new rw(this.M);this.I=new xw(this.M);rs(this,this.u);(W(),
+this._).tabIndex=0;this.c=new hC(this);vB(this,"v-grid");nz(this.u.j,new BD(this,this.C,this.u.j));nz(this.u.a,new XB(this));nz(this.u.f,new BD(this,this.w,this.u.f));this.C.c=this;a=this.C;a=LC(a,a.d.b.length);aD(this.C,a);this.w.c=this;a=this.s;a.k=this;Nw(this,new JC(a));a=(jD(),this);Ww(a,new Hx);a=this.u.a.b;var b=this.B,c,d;for(d=Kq(new Lq(a.a));d.a.Dc();)c=Mq(d),a.e.pd(c);a.e=b;for(c=Kq(new Lq(a.a));c.a.Dc();)b=Mq(c),a.e.qd(b),LA(b)?(b.e.style[l]="",b.a.style[l]=""):(b.e.style[l]=(Zi(),mb),
+b.a.style[l]=mb);Pr(this.u,new LB(this),(sv(),tv));Pr(this.u,new MB(this),(ov(),pv));Pr(this,new NB(this),(qx(),qx(),rx));VA(this,new Bm(S(D(Wd,1),h,2,4,[Ib,Kb,Mb,Nb,Ja])));VA(this,new Bm(S(D(Wd,1),h,2,4,[Ka,Cb,Bb,Ab,Db])));Pr(this,new OB(this),this.G.a);Nw(this,new PB(this))}x(229,228,Ec,sE);_.Zd=yB;B(229);
+function fC(a,b){var c,d;d=YB(nF);c=a.c;$B(d,Mc,null,new oF(a));$B(d,"index",null,new pF(a));$B(d,"columnName",null,new qF(c));$B(d,Nc,null,new rF(c,a));c=YB(ZB);$B(c,"index",null,new sF(a));$B(c,Nc,null,new tF(a));$B(c,Mc,null,new uF(a));c.grid=b;d.row=c;return d}var nF=ne();function oF(a){this.a=a}x(322,1,{},oF);_.ke=function(){return this.a.rd()};B(322);function pF(a){this.a=a}x(323,1,{},pF);_.ke=function(){return I(this.a.d)};B(323);function qF(a){this.a=a}x(324,1,{},qF);_.ke=function(){return this.a.c.name};
+B(324);function rF(a,b){this.b=a;this.a=b}x(325,1,{},rF);_.ke=function(){return vF(this.b,this.a.f.b)};B(325);function sF(a){this.a=a}x(326,1,{},sF);_.ke=function(){return I(this.a.f.c)};B(326);function tF(a){this.a=a}x(327,1,{},tF);_.ke=function(){return this.a.f.b};B(327);function uF(a){this.a=a}x(328,1,{},uF);_.ke=function(){return gi(this.a.rd())};B(328);var wF=ne(),xF=ne(),hF=ne(),ZB=ne();function aC(a){this.a=a}x(329,1,{},aC);_.ke=function(){return I(this.a.c)};B(329);
+function bC(a){this.a=a}x(330,1,{},bC);_.ke=function(){return this.a.b};B(330);function cC(a){this.a=a}x(331,1,{},cC);_.ke=function(){return this.a.a};B(331);var fF=ne(),yF=ne();function zF(a){this.a=a}x(100,1,{100:1},zF);B(100);function AF(a,b){Et(a,b);a.d.getSelectionModel().dataSizeUpdated(b)}
+function BF(a,b,c){var d,e,f,g;g=It(a.d.getGrid().u);f=new yt(b,b+c.Oc());for(e=pE(a.d).xc();e.Dc();){d=e.Ec();var m=g,n=f,p=void 0,q=void 0;if(d.c.valueGenerator)for(q=hn(new jn((new CF(new jn(d.a))).a));q.a.Dc();)p=kn(q),!Ht(n,p.a)&&Ht(m,p.a)||rl(d.a,p)}Ot(a,b,c)}function DF(a,b){var c,d;b!=a.e&&(d=0==a.e,c=b<a.c||a.e<a.c,a.e=b,d?(c=a.d.updating,a.d.updating=!0,nB(a.d.getGrid(),a),a.d.updating=c):c&&zE(a.d.g,!0))}
+function EF(a){this.s=new yt(0,0);this.g=new yt(0,0);this.o=new mh;this.p=new mh;this.f=new Xt;this.j=new St(this);this.q=new mh;this.r=new mh;V();this.e=0;this.d=a;this.c=a.defaultHeightByRows}x(124,308,{},EF);_.clearCache=function(a){AF(this,kE(($D(),eE),a,I(this.e),I(this.e)).a);this.d.getSelectionModel().zd()};_.Kc=function(a){return a};_.getRowKey=_.Kc;_.refresh=function(){AF(this,Kd(this,this.size,this.Oc).bind(this)());this.d.getSelectionModel().zd()};_.Mc=function(a){AF(this,a)};
+_.Nc=function(a,b){BF(this,a,b)};_.Oc=CE;_.size=_.Oc;_.c=0;_.e=0;B(124);function yE(a,b){EF.call(this,b);this.a=a;DF(this,((!this.b||0==this.b.c.length)&&(this.b=mn(X(this.a),S(D(Wd,1),h,2,4,[Oc]))),this.b).c.length)}x(335,124,{},yE);_.refresh=function(){this.b=null;DF(this,((!this.b||0==this.b.c.length)&&(this.b=mn(X(this.a),S(D(Wd,1),h,2,4,[Oc]))),this.b).c.length);ed[124].refresh.call(this)};
+_.Lc=function(a,b){var c,d,e,f,g,m,n,p,q;g=new G;m=sn(sn(((!this.b||0==this.b.c.length)&&(this.b=mn(X(this.a),S(D(Wd,1),h,2,4,[Oc]))),this.b),a-1+1,-1),0,b).c;n=0;for(p=m.length;n<p;++n){d=m[n];q=[];d=mn(X(d),S(D(Wd,1),h,2,4,["td"])).c;e=0;for(f=d.length;e<f;++e){c=d[e];var r=q;c=X(c);c=0==c.c.length?"":ui(nn(c,0));r[r.length]=c}g.b[g.b.length]=q}BF(this,a,g)};B(335);
+function FF(a,b,c,d){var e;e=YB(xF);e.index=b;e.count=c;e.sortOrder=a.d.getSortOrder();e.success=wp(new GF(a,d));d&&(e.failure=wp(new HF(a,d)));dC(a.a,e)}function bF(a,b){EF.call(this,b);this.a=a;FF(this,0,0,null)}x(336,124,{},bF);_.Lc=function(a,b,c){FF(this,a,b,c)};B(336);function GF(a,b){this.a=a;this.b=b;hm.call(this)}x(337,6,Wa,GF);
+_.Pb=function(){var a,b,c,d;c=ED(fm(this,0));d=fm(this,1);for(b=0;b<c.Oc();b++){var e=c.Me(b);Object(e)!==e&&c.Se(b,new zF(c.Me(b)))}d&&DF(this.a,A(d.a));this.b&&Vt(this.b,c,(a=this.a,Kd(a,a.size,a.Oc).bind(a)()))};B(337);function HF(a,b){this.a=a;this.b=b;hm.call(this)}x(338,6,Wa,HF);_.Pb=function(){var a;Vt(this.b,(V(),V(),sl),(a=this.a,Kd(a,a.size,a.Oc).bind(a)()))};B(338);function Yw(){Yw=w;SD=new IF;$w=new JF;Zw=new KF;TD=new LF}x(42,4,Pc);
+var Zw,TD,$w,SD,RD=C(42,function(){Yw();return S(D(RD,1),h,42,0,[SD,$w,Zw,TD])});function IF(){R.call(this,"SINGLE",0)}x(311,42,Pc,IF);_.ne=function(){return new tE};C(311,null);function JF(){R.call(this,"MULTI",1)}x(312,42,Pc,JF);_.ne=function(){return new MF};C(312,null);function KF(){R.call(this,"ALL",2)}x(313,42,Pc,KF);_.ne=function(){return new NF};C(313,null);function LF(){R.call(this,"DISABLED",3)}x(314,42,Pc,LF);_.ne=function(){return new OF};C(314,null);
+function PF(){this.n=new yx;this.g=new yx;this.j=this.i=null;this.k=new yx;this.c=!0}x(190,483,mc);_.Gd=QF;_.xd=CE;_.Ad=function(a){wx(this,a);this.d=a;this.e=new RF(this,a)};_.Hd=QF;_.c=!1;B(190);function NF(){PF.call(this);this.b=YB(Xd);this.a=!1}x(193,190,mc,NF);_.clear=function(){Zk(this.d,new $k(new MF))};_.dataSizeUpdated=SF;_.deselect=TF;_.Ed=function(){Zk(this.d,new $k(this));return!0};_.Kd=UF;_.deselected=VF;_.getMode=function(){return Yw(),Zw};
+_.yd=function(a){return-1==JD(this.b,new Y(Ct(this.d.q,a)))};_.zd=WF;_.select=XF;_.selectAll=WF;_.Ld=YF;_.selected=function(a,b,c){var d,e,f,g,m;g=YB(Xd);a=ZF(a);d=this.size();b=kE(($D(),eE),b,I(0),I(0)).a;b=(0<b?b:0)<d-1?0<b?b:0:d-1;e=this.size()-1;c=kE(eE,c,I(e),I(e)).a;c=((0<c?c:0)<d-1?0<c?c:0:d-1)-b+1;for(d=m=e=0;d<c;)-1==JD(this.b,new Y(e))&&m++>=b&&(++d,f=up(a,Ic,S(D(F,1),h,1,3,[a,I(e)])),null!=f&&up(g,Kc,S(D(F,1),h,1,3,[f]))),++e;return g};
+_.size=function(){var a;return(a=this.d.q,Kd(a,a.size,a.Oc).bind(a)())-this.b.length};_.a=!1;B(193);function OF(){}x(489,641,{},OF);_.clear=Tr;_.dataSizeUpdated=Ak;_.deselect=Ln;_.deselected=$F;_.getMode=function(){return Yw(),TD};_.select=Ln;_.selectAll=Tr;_.selected=$F;_.size=hD;B(489);function MF(){PF.call(this);this.b=YB(Xd);this.a=!1}x(191,190,mc,MF);_.clear=WF;_.dataSizeUpdated=SF;_.deselect=XF;_.Kd=UF;_.deselected=$F;_.getMode=function(){return Yw(),$w};
+_.yd=function(a){return-1!=JD(this.b,new Y(Ct(this.d.q,a)))};_.zd=WF;_.select=TF;_.selectAll=function(){Zk(this.d,new $k(new NF))};_.Ld=YF;_.selected=VF;_.size=aG;_.a=!1;B(191);function RF(a,b){this.a=a;jx.call(this,b)}x(484,192,{57:1},RF);_.Qc=function(a){var b,c;b=Hi();c=Ki();var d=(W(),Pi());b.id=d;c.htmlFor=b.id;ji(a.a.c);a.a.c.appendChild(b);a.a.c.appendChild(c);li(b,Lc);li(c,Lc)};_.Bd=function(a,b){this.a.c&&(ix(this,a,b),this.a.c=!1)};B(484);function tE(){this.c=-1;this.a=!1}
+x(169,168,{200:1},tE);_.clear=function(){this.deselect(this.c,!1)};_.dataSizeUpdated=function(a){this.a=!0;this.c>=a&&(this.c=-1)};_.deselect=function(a,b){return this.c==a?(this.c=-1,(b=kE(($D(),gE),(dm(),b?em:rp),rp,rp).a)||Zk(this.b,new tx(this.b,null,null)),!0):!1};_.Id=function(a){return this.deselect(Ct(this.b.q,a),!1)};_.deselected=$F;_.getMode=function(){return Yw(),SD};_.yd=function(a){return this.c==Ct(this.b.q,a)};_.zd=function(){this.c=-1;Zk(this.b,new tx(this.b,null,null))};
+_.select=function(a,b){var c;return 0<=a&&(!this.a||a<(c=this.b.q,Kd(c,c.size,c.Oc).bind(c)()))?(this.c=a,(b=kE(($D(),gE),(dm(),b?em:rp),rp,rp).a)||Zk(this.b,new tx(this.b,null,null)),!0):!1};_.Jd=function(a){return this.select(Ct(this.b.q,a),!1)};_.selectAll=function(){this.clear()};_.selected=function(a){var b;b=YB(Xd);a=ZF(a);-1!=this.c&&(a=up(a,Ic,S(D(F,1),h,1,3,[a,I(this.c)])),null!=a&&up(b,Kc,S(D(F,1),h,1,3,[a])));return b};_.Ad=function(a){this.b=a;Gx(this,a)};
+_.size=function(){return-1==this.c?0:1};_.a=!1;_.c=0;B(169);function bG(a,b){var c;Dt(b.c,b);c=Rt(b);c=Ct(a.q,c);Qt(b.c,b);return c}function ZF(a){var b;b=a;!a&&(b=wp(new cG));return b}function cG(){hm.call(this)}x(396,6,Wa,cG);_.Rb=function(){return this.f[0]};B(396);function NE(a,b,c){$B(a.c,b,new dG(a,c),null)}function eG(a){var b;b=a.b.getStaticSection();return fG(b,b.getDefaultHeader(),a)}
+function gG(a,b,c){var d;d=null;c.xe()?d=b:typeof b===ba&&null!==b&&(d=gG(a,vp(b,c.Me(0)),c.Te(1,c.Oc())));return d}function vF(a,b){var c,d;y(b,100)&&(b=b.a);d=null;a.c.valueGenerator?(c=Ct(a.b.getDataSource(),b),Zq(a.a,I(c))?d=U(a.a,I(c)):(d=dC(a.c.valueGenerator,b),pl(a.a,I(c),d))):Object(b)!==b?0==JD(a.b.getColumns(),a.c)&&(d=b):Km(b)?(c=JD(a.b.getColumns(),a.c),d=null!=b[c]?Object(b[c]):null):d=gG(a,b,new Bm(ve(a.c.name,"\\.",0)));return d}
+function KE(a,b){lC(this,new nC(this));this.a=new mh;this.c=a;this.b=b}x(113,71,{71:1,113:1},KE);_.de=function(a){return vF(this,a)};var WE=B(113);function LE(a){this.a=a}x(296,1,{},LE);_.le=function(a){var b=this.a;eG(b).content=a;b.b.redraw()};B(296);function ME(a){this.a=a}x(297,1,{},ME);_.ke=function(){return eG(this.a).content};B(297);function dG(a,b){this.a=a;this.b=b}x(307,1,{},dG);_.le=function(a){var b=this.a;this.b.le(a);b.b.redraw()};B(307);function hG(a,b){this.a=a;this.b=b}
+x(301,1,{},hG);_.Sc=function(a){var b=this.b;a=fC(a,this.a.b.c);up(b,Ic,S(ul(F),h,1,3,[b,a]))};B(301);function OE(a){this.a=a}x(298,1,{},OE);_.le=function(a){var b=this.a;a=A(a.a);b.f!=a&&(b.f=a,b.g&&UA(b.g.a))};B(298);function PE(a){this.a=a}x(299,1,{},PE);_.le=function(a){var b=this.a;a=a.a;b.n!=a&&(b.n=a,b.g&&fB(b.g))};B(299);function QE(a){this.a=a}x(300,1,{},QE);_.le=function(a){uB(this.a,!a.a)};B(300);function RE(a){this.a=a}x(302,1,{},RE);_.le=function(a){var b=this.a;lC(b,new hG(b,a))};B(302);
+function SE(a){this.a=a}x(303,1,{},SE);_.le=function(a){var b=this.a;a=ID(a)?10:a.a;var c;c=b.j;if(0<=a&&a>c&&0<=c)throw new H("New minimum width ("+a+") was greater than maximum width ("+c+")");b.k!=a&&(b.k=a,b.g&&UA(b.g.a))};B(303);function TE(a){this.a=a}x(304,1,{},TE);_.le=function(a){var b=this.a;a=ID(a)?-1:a.a;var c;c=b.k;if(0<=a&&a<c&&0<=c)throw new H("New maximum width ("+a+") was less than minimum width ("+c+")");b.j!=a&&(b.j=a,b.g&&UA(b.g.a))};B(304);function UE(a){this.a=a}x(305,1,{},UE);
+_.le=function(a){mC(this.a,ID(a)?-1:a.a)};B(305);function VE(a){this.a=a}x(306,1,{},VE);_.le=function(){var a=this.a,b;b=a.b.updating;a.b.updating=!0;a.b.getDataSource().refresh();a.b.updating=b};B(306);
+function iG(a,b){var c,d,e,f,g,m,n,p,q,r,s;n=b?a.i.C.d.b.length:a.i.w.d.b.length;r=b?a.p:a.o;c=b?a.c:a.b;if(n!=r){for(e=r;e<n;e++)b?ZC(a.i.C,e):MC(a.i.w,e);for(e=n;e<r;e++)b?LC(a.i.C,e):LC(a.i.w,e)}for(p=0;p<r;p++)for(s=b?iu(a.i.C,p):iu(a.i.w,p),n=pE(a.j),f=X(nn(c,p)),e=fn(f,S(D(Wd,1),h,2,4,["th, td"])),m=jE(($D(),aE),f,"class"),!m.length||(s.e=m,s.d.ie()),f=q=0;q<e.c.length&&q<a.n;q++){d=X(nn(e,q));g=hu(s,n.Me(f));g=jG(a.j.getStaticSection(),g);g.content=0==d.c.length?"":ui(nn(d,0));m=jE(aE,d,"class");
+!m.length||(g.className=m);m=I(1);var z=I(1);d=hE(eE,nn(d,0),"colspan",m,z).a;Oe(new kG(g,d),0);f+=d}b&&a.j.getStaticSection().setDefaultHeader(a.g);Oe(new lG(a,b),0)}
+function Hq(a){var b;a.f=mn(a.d,S(D(Wd,1),h,2,4,["thead"]));a.e=mn(a.d,S(D(Wd,1),h,2,4,["tfoot"]));a.a=mn(a.d,S(D(Wd,1),h,2,4,["colgroup"]));b=tn(a.f)+tn(a.a)+tn(a.e);if(b!==a.k){a.k=b;a.c=mn(a.f,S(D(Wd,1),h,2,4,["tr"]));a.b=mn(a.e,S(D(Wd,1),h,2,4,["tr"]));a.p=a.c.c.length;a.o=a.b.c.length;var c,d;for(d=c=0;c<a.p;c++)b=fn(X(nn(a.c,c)),S(ul(Wd),h,2,4,["th, td"])),d=J(d,b.c.length),b.c.length!=d&&0==gn(b,S(ul(Wd),h,2,4,["[sortable]"])).c.length||(a.g=c);if(0!=a.a.c.length){b=fn(a.a,S(ul(Wd),h,2,4,["col"]));
+var e,f,g,m,n;g=a.j.getColumns();g.length=0;a.n=b.c.length;n=YB(Xd);for(d=0;d<a.n;d++){e=X(nn(b,d));c=YB(wF);up(g,Kc,S(D(F,1),h,1,3,[c]));c.sortable=jE(($D(),gE),e,"sortable").a;c.readOnly=jE(gE,e,"read-only").a;f=c;m=I(1);var p=I(-1);m=hE(eE,nn(e,0),"flex",m,p);f.flex=m.a;(f=jE(cE,e,u))&&(c.width=f.a);(f=jE(cE,e,"min-width"))&&(c.minWidth=f.a);(f=jE(cE,e,"max-width"))&&(c.maxWidth=f.a);c.name=jE(aE,e,"name");f=jE(aE,e,"sort-direction");f.length&&(m=YB(fF),m.direction=f,m.column=d,up(n,Kc,S(D(F,1),
+h,1,3,[m])));c.renderer=wp(new mG);f=0==e.c.length?"":ui(nn(e,0));m=0==e.c.length?"":ui(nn(e,0));e=hE(aE,nn(e,0),"header-text",f,m);null!=e&&e.length&&(c.headerContent=e)}a.j.setColumns(g);0==n.length||a.j.then(wp(new nG(a,n)))}0<a.n&&(0<a.p&&iG(a,!0),0<a.o&&iG(a,!1));zE(a.j.g,!0)}}
+function xE(a,b){this.j=b;this.i=b.getGrid();this.d=X(a);Hq(this);var c=Zm(this.d,(yq(),Bq)),d=(!km&&(km=new On),Qn(ao));d.a.attributes=!0;d.a.childList=!0;d.a.subtree=!0;var d=d.a,e,f,g;if(Im((lm(),xm),"MutationObserver"))for(e=c.c,f=0,g=e.length;f<g;++f)c=e[f],Iq(c,this,d);else d=Mm(S(D(F,1),h,1,3,["ERROR: this browser does not support MutationObserver: "+$wnd.navigator.userAgent])),$wnd.console.log.apply($wnd.console,d)}x(126,1,{126:1},xE);_.g=0;_.k=null;_.n=0;_.o=0;_.p=0;B(126);
+function mG(){hm.call(this)}x(315,6,Wa,mG);_.Pb=function(){var a,b;b=(a=fm(this,0))?Qm(a,Mc):null;a=a?Qm(a,Nc):null;a=null!=a?(E(),""+a):"";b.innerHTML=a||""};B(315);function nG(a,b){this.a=a;this.b=b;hm.call(this)}x(316,6,Wa,nG);_.Pb=function(){this.a.j.setSortOrder(this.b)};B(316);function kG(a,b){this.b=a;this.a=b}x(317,50,{},kG);_.eb=function(){this.b.colspan=this.a};_.a=0;B(317);function lG(a,b){this.a=a;this.b=b}x(318,50,{},lG);
+_.eb=function(){if(this.b){var a=!jE(($D(),gE),this.a.f,jb).a,b=this.a.i.C;b.e=a;b.ie()}else 0!=this.a.b.c.length&&(a=!jE(($D(),gE),this.a.e,jb).a,b=this.a.i.w,b.e=a,b.ie())};_.b=!1;B(318);function jG(a,b){var c;Zq(a.a,b)||(c=YB(yF),c.colspan=b.a,b.e==(jC(),TC)?c.content=Em(yC(b)):b.e==kC?c.content=SC(b):b.e==RC&&(c.content=QC(b)),$B(c,"colspan",new oG(a,new pG(b),b),null),$B(c,"className",new oG(a,new qG(b),b),null),$B(c,"content",new oG(a,new rG(b),b),null),pl(a.a,b,c));return U(a.a,b)}
+function fG(a,b,c){b=hu(iu(a.b.C,b),c);return jG(a,b)}function sG(a,b){return null!=a?lE((E(),""+a)):b}function tG(a,b,c){var d,e,f;e=pE(a.c);for(f=0;f<e.Oc();f++)d=e.Me(f),f<c.length&&(d=hu(b,d),jG(a,d).content=vp(c,I(f)))}function wE(a){this.a=new mh;this.c=a;this.b=a.getGrid()}x(288,1,{},wE);_.addFooter=function(a,b){var c;c=sG(a,this.b.w.d.b.length);c=LC(this.b.w,c);b&&tG(this,c,b);this.b.$d();this.c.redraw()};
+_.addHeader=function(a,b){var c;c=sG(a,this.b.C.d.b.length);c=LC(this.b.C,c);b&&tG(this,c,b);this.b._d();this.c.redraw()};_.getDefaultHeader=function(){var a,b;for(b=a=0;b<this.b.C.d.b.length;b++)if(iu(this.b.C,b).a){a=b;break}return a};_.getFooterCell=function(a,b){var c;c=pE(this.c).Me(oE(this.c,b));c=hu(iu(this.b.w,a),c);return jG(this,c)};_.getFooterRowCount=function(){return this.b.w.d.b.length};_.getHeaderCell=function(a,b){var c;c=pE(this.c).Me(oE(this.c,b));return fG(this,a,c)};
+_.getHeaderRowCount=function(){return this.b.C.d.b.length};_.isFooterHidden=function(){return!this.b.w.e};_.isHeaderHidden=function(){return!this.b.C.e};_.removeFooter=function(a){MC(this.b.w,a);this.b.$d();this.c.redraw()};_.removeHeader=function(a){ZC(this.b.C,a);this.b._d();this.c.redraw()};_.setDefaultHeader=function(a){a=iu(this.b.C,a);aD(this.b.C,a);this.b._d();this.c.redraw()};_.setFooterHidden=function(a){var b=this.b.w;b.e=!a;b.ie();this.b.$d();zE(this.c.g,!0)};
+_.setFooterRowClassName=function(a,b){var c=iu(this.b.w,a);c.e=b;c.d.ie();this.b.$d();this.c.redraw()};_.setHeaderHidden=function(a){var b=this.b.C;b.e=!a;b.ie();this.b._d();zE(this.c.g,!0)};_.setHeaderRowClassName=function(a,b){var c=iu(this.b.C,a);c.e=b;c.d.ie();this.b._d();this.c.redraw()};B(288);function uG(a){Ir();this._=(W(),a)}x(291,155,$b,uG);B(291);function pG(a){this.a=a}x(289,1,{},pG);_.le=function(a){UC(this.a,A(a.a))};B(289);function qG(a){this.a=a}x(290,1,{},qG);
+_.le=function(a){var b=this.a;b.d=a;b.c.ie()};B(290);function rG(a){this.a=a}x(292,1,{},rG);_.le=function(a){var b=this.a;null==a?(b.b=null,b.e=(jC(),RC),b.c.ie()):Object(a)!==a||y(a,46)?(a=(E(),""+a),b.b=a,b.e=(jC(),RC),b.c.ie()):Jm(a)&&(a=new uG(a),b.b=a,b.e=(jC(),TC),b.c.ie())};B(292);function oG(a,b,c){this.a=a;this.b=b;this.c=c}x(293,1,{},oG);_.le=function(a){var b=this.a,c=this.c;this.b.le(a);b.c.redraw();a=b.b;y(c,117)?a._d():a.$d()};B(293);
+function vG(a){if(0==a.c.length)a=0;else{if(0==a.c.length)a=null;else{a=nn(a,0);var b=dE;a=a?An(a,gb,b):null}a=a.a}return a}function zE(a,b){var c;if(c=a.a){var d,e,f,g;g=Cm(null);c=a.a.c;e=0;for(f=c.length;e<f;++e)d=c[e],(d=hi((O(),d)))&&dn(g,S(ul(Xd),h,0,2,[d]));new Fm(en(g));c=!0}c&&((a.c=b)&&(a.f=0),Oe(a,b?1:30))}
+function wG(a,b){var c;0<b&&(b=lE((E(),""+b)),b+=a.d.C.e?a.d.C.d.b.length:0,b+=a.d.w.e?a.d.w.d.b.length:0,a.c||b!=a.j)&&(a.j=b,c=A(vG(mn(X(a.d),S(D(Wd,1),h,2,4,["tr td"])))),a.f=c*b,ky(a.d.u,a.f+v))}function uE(a){this.c=this.g=this.i=!1;this.e=a;this.d=a.getGrid()}x(319,50,{},uE);
+_.eb=function(){var a;0==this.b&&(this.b=this.e.defaultHeightByRows,0==this.j&&(this.j=this.b));a=this.a;a=A(0==a.c.length?0:mo((!Kn&&(Kn=(!Wm&&(Wm=new Xm),ro(),Go)),Kn),nn(a,0),u));if(this.c||a!=this.k){var b=this.d.u;(W(),b._).style[u]="100%";gy(b);UA(this.d.a);this.k=a}if(this.i)wG(this,this.b);else if(a=this.a,a=A(0==a.c.length?0:mo((!Kn&&(Kn=(!Wm&&(Wm=new Xm),ro(),Go)),Kn),nn(a,0),t)),1<xu(a-this.f))for((this.g=1>=aB(a-vG(X(this.d))))?0==this.f&&(a=this.d.q,a=En(a?Kd(a,a.size,a.Oc).bind(a)():
+0,this.b),wG(this,a)):(ky(this.d.u,"100%"),this.f=a),a=this.d.u,Uy(a.j),Uy(a.a),Uy(a.f),b=0;b<a.c.a.b.length;b++){var c=az(a.c,b),d=a.c,e=I(b),c=new Y(c);V();var f=void 0,f=new xG(1);bz(f.d,e,c);cz(d,new yG(f))}this.c=!1};_.b=0;_.c=!1;_.f=0;_.g=!1;_.i=!1;_.j=0;_.k=0;B(319);
+function zG(a,b){a.r=-1;a.s=-1;if(1<=b.length)try{a.r=lE(b[0])}catch(c){if(c=Oh(c),!y(c,15))throw Ph(c);}if(2<=b.length){try{a.s=lE(b[1])}catch(d){if(d=Oh(d),!y(d,15))throw Ph(d);}if(-1==a.s&&-1!=b[1].indexOf("-"))try{a.s=lE(ye(b[1],0,qe(b[1],Ce(45))))}catch(e){if(e=Oh(e),!y(e,15))throw Ph(e);}}}
+function AG(a,b){var c,d;c=qe(b,Ce(46));0>c&&(c=b.length);a.a=lE(BG(b,0,c));d=Ce(46);d=b.indexOf(d,c+1);0>d&&(d=b.length);try{a.b=lE(se(BG(b,c+1,d),"[^0-9].*",""))}catch(e){if(e=Oh(e),!y(e,66))throw Ph(e);}}function BG(a,b,c){0>b&&(b=0);(0>c||c>a.length)&&(c=a.length);return ye(a,b,c-b)}
+function bt(a){var b,c,d,e,f;a=a.toLowerCase();this.e=-1!=a.indexOf(fc)&&-1==a.indexOf(vb)&&-1==a.indexOf(Qc);a.indexOf(" presto/");this.o=-1!=a.indexOf(Qc);this.p=!this.o&&-1!=a.indexOf("applewebkit");this.c=-1!=a.indexOf(" chrome/");this.j=-1!=a.indexOf("opera");this.f=(this.f=-1!=a.indexOf(ec)&&!this.j&&-1==a.indexOf("webtv"))||this.o;this.n=!this.c&&!this.f&&-1!=a.indexOf(dc);this.d=-1!=a.indexOf(" firefox/");this.k=-1!=a.indexOf("phantomjs/");a.indexOf("chromeframe");try{this.e?(d=a.indexOf("rv:"),
+0<=d&&(e=ye(a,d+3,a.length-(d+3)),e=ue(e,Rc,"$1"),po(e))):this.p?(e=ze(a,a.indexOf("webkit/")+7),e=ue(e,"([0-9]+)[^0-9].+","$1"),po(e)):this.f&&(f=a.indexOf(Qc),0<=f&&(e=ye(a,f+8,a.length-(f+8)),e=ue(e,"([0-9]+\\.[0-9]+).*","$1"),po(e)))}catch(g){if(g=Oh(g),!y(g,15))throw Ph(g);}try{this.f?-1==a.indexOf(ec)?(d=a.indexOf("rv:"),0<=d&&(e=ye(a,d+3,a.length-(d+3)),e=ue(e,Rc,"$1"),AG(this,e))):(c=ze(a,a.indexOf("msie ")+5),c=BG(c,0,c.indexOf(";")),AG(this,c)):this.d?(b=a.indexOf(" firefox/")+9,AG(this,
+BG(a,b,b+5))):this.c?(b=a.indexOf(" chrome/")+8,AG(this,BG(a,b,b+5))):this.n?(b=a.indexOf(" version/")+9,AG(this,BG(a,b,b+5))):this.j&&(b=a.indexOf(" version/"),-1!=b?b+=9:b=a.indexOf("opera/")+6,AG(this,BG(a,b,b+5)))}catch(m){if(m=Oh(m),!y(m,15))throw Ph(m);}if(-1!=a.indexOf("windows "))this.q=1,a.indexOf("windows phone");else if(-1!=a.indexOf("android"))this.q=5,-1!=a.indexOf("android")&&(a=BG(a,a.indexOf("android ")+8,a.length),a=BG(a,0,a.indexOf(";")),a=ve(a,"\\.",0),zG(this,a));else if(-1!=a.indexOf("linux"))this.q=
+3;else if(-1!=a.indexOf("macintosh")||-1!=a.indexOf("mac osx")||-1!=a.indexOf("mac os x"))this.g=-1!=a.indexOf("ipad"),this.i=-1!=a.indexOf("iphone"),this.g||-1!=a.indexOf("ipod")||this.i?(this.q=4,-1!=a.indexOf("os ")&&-1!=a.indexOf(" like mac")&&(a=BG(a,a.indexOf("os ")+3,a.indexOf(" like mac")),a=ve(a,"_",0),zG(this,a))):this.q=2}x(574,1,h,bt);_.a=-1;_.b=-1;_.c=!1;_.d=!1;_.e=!1;_.f=!1;_.g=!1;_.i=!1;_.j=!1;_.k=!1;_.n=!1;_.o=!1;_.p=!1;_.q=0;_.r=-1;_.s=-1;B(574);
+function Px(){Px=w;Qx=new CG;PD=new DG}x(61,4,Sc);var Qx,PD,OD=C(61,function(){Px();return S(D(OD,1),h,61,0,[Qx,PD])});function CG(){R.call(this,"ASCENDING",0)}x(333,61,Sc,CG);_.oe=function(){return PD};C(333,null);function DG(){R.call(this,"DESCENDING",1)}x(334,61,Sc,DG);_.oe=function(){return Qx};C(334,null);function jC(){jC=w;kC=new EG("TEXT",0);RC=new EG("HTML",1);TC=new EG("WIDGET",2)}function EG(a,b){R.call(this,a,b)}x(87,4,{87:1,3:1,5:1,4:1},EG);
+var RC,kC,TC,FG=C(87,function(){jC();return S(D(FG,1),h,87,0,[kC,RC,TC])});function Yx(){Yx=w;ly=new GG("CSS",0);Zx=new GG("ROW",1)}function GG(a,b){R.call(this,a,b)}x(88,4,{88:1,3:1,5:1,4:1},GG);var ly,Zx,HG=C(88,function(){Yx();return S(D(HG,1),h,88,0,[ly,Zx])});function cF(){cF=w;dF=Xi((Yx(),S(D(HG,1),h,88,0,[ly,Zx])))}var dF;function Pt(a,b){if(a.b>b.a||b.b>a.a)throw new H("There is a gap between "+a+" and "+b);return new yt(En(a.b,b.b),J(a.a,b.a))}function Ht(a,b){return a.b<=b&&b<a.a}
+function gC(a,b){return a===b?!0:null==b||IG!=Qd(b)||a.a!=b.a||a.b!=b.b?!1:!0}function Tt(a,b){return a.b<b.a&&b.b<a.a}function Lt(a){return a.b>=a.a}function Ut(a,b){return a.b>=a.a&&b.b>=b.a?!0:b.b<=a.b&&a.a<=b.a}function ut(a){return a.a-a.b}function pt(a,b){var c,d,e;e=JG(a,b.b);d=e[0];c=JG(e[1],b.a);e=c[0];c=c[1];return S(D(IG,1),h,16,0,[d,e,c])}function xt(a,b){var c,d,e;e=Ht(b,a.b);d=Ht(b,a.a);c=a.b<b.b&&a.a>=b.a;return e?d?a:new yt(a.b,b.a):d?new yt(b.b,a.a):c?b:$(a.b,0)}
+function JG(a,b){return b<a.b?S(D(IG,1),h,16,0,[$(a.b,0),a]):b>=a.a?S(D(IG,1),h,16,0,[a,$(a.a,0)]):S(D(IG,1),h,16,0,[new yt(a.b,b),new yt(b,a.a)])}function yt(a,b){if(a>b)throw new H("start must not be greater than end");this.b=a;this.a=b}function $(a,b){if(0>b)throw new H("length must not be negative");return new yt(a,a+b)}x(16,1,{16:1,3:1},yt);_.eQ=function(a){return gC(this,a)};_.hC=function(){var a;a=31+this.a;return a=31*a+this.b};
+_.tS=function(){return ge(IG),IG.i+" ["+this.b+".."+this.a+"["+(this.b>=this.a?" (empty)":"")};_.a=0;_.b=0;var IG=B(16);function Qw(){Qw=w;Rw=new KG("ANY",0);IE=new KG("START",1);Ey=new KG("MIDDLE",2);FE=new KG("END",3)}function KG(a,b){R.call(this,a,b)}x(63,4,{63:1,3:1,5:1,4:1},KG);var Rw,FE,Ey,IE,LG=C(63,function(){Qw();return S(D(LG,1),h,63,0,[Rw,IE,Ey,FE])});function GE(){GE=w;HE=Xi((Qw(),S(D(LG,1),h,63,0,[Rw,IE,Ey,FE])))}var HE;x(129,1,{});_.tS=Rn;B(129);
+function Cl(){rh.call(this,"divide by zero")}x(423,10,xa,Cl);B(423);function Sh(a){rh.call(this,a)}x(185,10,xa,Sh);B(185);function dm(){dm=w;rp=new MG(!1);em=new MG(!0)}function MG(a){this.a=a}function NG(a){return E(),""+a}x(56,1,{3:1,56:1,5:1},MG);_.Bb=function(a){var b=this.a;a=a.a;dm();return b==a?0:b?1:-1};_.eQ=function(a){return y(a,56)&&a.a==this.a};_.hC=function(){return this.a?1231:1237};_.tS=function(){return NG(this.a)};_.a=!1;var rp,em,qp=B(56);
+function po(a){var b;if(b=OG,!b&&(b=OG=/^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/),!b.test(a))throw new PG(Tc+a+'"');return parseFloat(a)}
+function lE(a){var b,c;if(null==a)throw new PG(ya);c=a.length;for(b=0<c&&(45==a.charCodeAt(0)||43==a.charCodeAt(0))?1:0;b<c;b++){var d=a.charCodeAt(b);if(-1==(48<=d&&58>d?d-48:97<=d&&97>d?d-97+10:65<=d&&65>d?d-65+10:-1))throw new PG(Tc+a+'"');}c=parseInt(a,10);b=-2147483648>c;if(isNaN(c))throw new PG(Tc+a+'"');if(b||2147483647<c)throw new PG(Tc+a+'"');return c}x(46,1,{3:1,46:1});var OG;B(46);function pp(a){this.a=a}x(95,46,{3:1,95:1,5:1,46:1},pp);_.Bb=QG;_.pe=Rn;
+_.eQ=function(a){return y(a,95)&&a.a==this.a};_.hC=Rn;_.tS=function(){return NG(this.a)};_.a=0;var mp=B(95);function np(){np=w;op=we(mp,h,95,256,0)}var op;function Y(a){this.a=a}function mE(a){this.a=po(a)}x(12,46,{3:1,5:1,12:1,46:1},Y,mE);_.Bb=RG;_.pe=Rn;_.eQ=function(a){return y(a,12)&&a.a==this.a};_.hC=SG;_.tS=function(){return NG(this.a)};_.a=0;var dE=B(12);function cp(a){this.a=a}x(128,46,{3:1,5:1,128:1,46:1},cp);_.Bb=RG;_.pe=Rn;_.eQ=function(a){return y(a,128)&&a.a==this.a};_.hC=SG;_.tS=function(){return NG(this.a)};
+_.a=0;var bp=B(128);function H(a){rh.call(this,a)}x(8,10,xa,H);B(8);function ci(){nh(this)}function Z(a){rh.call(this,a)}x(11,10,xa,ci,Z);B(11);function as(){nh(this)}function Wh(a){rh.call(this,a)}x(27,10,{3:1,15:1,27:1,10:1,14:1},as,Wh);B(27);function TG(a){this.a=a}function Nl(a){var b,c;if(0>a)return 0;if(0==a)return 32;b=-(a>>16)>>16&16;c=16-b;a>>=b;b=a-256>>16&8;c+=b;a<<=b;b=a-4096>>16&4;c+=b;a<<=b;b=a-16384>>16&2;c+=b;a=a<<b>>14;b=a&~(a>>1);return c+2-b}
+function Hl(a){var b,c;if(0==a)return 32;c=0;for(b=1;0==(b&a);b<<=1)++c;return c}function I(a){var b,c;return-129<a&&128>a?(b=a+128,c=(UG(),VG)[b],!c&&(c=VG[b]=new TG(a)),c):new TG(a)}x(83,46,{3:1,5:1,83:1,46:1},TG);_.Bb=function(a){var b=this.a;a=a.a;return b<a?-1:b>a?1:0};_.pe=Rn;_.eQ=function(a){return y(a,83)&&a.a==this.a};_.hC=Rn;_.tS=function(){return NG(this.a)};_.a=0;var dp=B(83);function UG(){UG=w;VG=we(dp,h,83,256,0)}var VG;function hp(a){this.a=a}x(84,46,{3:1,5:1,84:1,46:1},hp);
+_.Bb=function(a){var b=this.a;a=a.a;return Ll(b,a)?Vl(b,a)?1:0:-1};_.pe=function(){return Wl(this.a)};_.eQ=function(a){return y(a,84)&&Ol(a.a,this.a)};_.hC=function(){var a=this.a;return a.l|a.m<<22};_.tS=function(){var a=this.a;return E(),""+Xl(a)};_.a={l:0,m:0,h:0};var ep=B(84);function fp(){fp=w;gp=we(ep,h,84,256,0)}var gp;function aB(a){return 0>=a?0-a:a}function xu(a){return 0>a?-a:a}function Ou(a){return Math.ceil(a)}function Ev(a){return Math.floor(a)}function J(a,b){return a>b?a:b}
+function En(a,b){return a<b?a:b}function Yh(){nh(this)}function $h(a){rh.call(this,a)}x(52,10,{3:1,15:1,52:1,10:1,14:1},Yh,$h);B(52);function PG(a){rh.call(this,a)}x(66,8,{3:1,15:1,66:1,10:1,14:1},PG);B(66);function lp(a){this.a=a}x(85,46,{3:1,5:1,46:1,85:1},lp);_.Bb=QG;_.pe=Rn;_.eQ=function(a){return y(a,85)&&a.a==this.a};_.hC=Rn;_.tS=function(){return NG(this.a)};_.a=0;var ip=B(85);function jp(){jp=w;kp=we(ip,h,85,256,0)}var kp;function WG(){WG=w;XG={};YG={}}
+function Yd(a){WG();var b=":"+a,c=YG[b];if(null!=c)return c;c=XG[b];if(null==c){var d,e,f;d=0;e=a.length;f=e-4;for(c=0;c<f;)d=a.charCodeAt(c+3)+31*(a.charCodeAt(c+2)+31*(a.charCodeAt(c+1)+31*(a.charCodeAt(c)+31*d))),d|=0,c+=4;for(;c<e;)d*=31,f=c++,f=a.charCodeAt(f),d+=f;c=d|0}256==ZG&&(XG=YG,YG={},ZG=0);++ZG;return YG[b]=c}var XG,ZG=0,YG;function fi(a,b){a.a+=b;return a}function ei(){this.a=""}function tl(a){this.a=a}x(74,129,{646:1},ei,tl);_.tS=Rn;B(74);function $G(){nh(this)}
+function Wr(a){rh.call(this,a)}x(24,10,{3:1,15:1,10:1,14:1,24:1},$G,Wr);B(24);function Bx(a,b){var c,d,e;Xh(b);c=!1;for(e=b.xc();e.Dc();)d=e.Ec(),c|=il(a,d)}function mA(a,b,c){var d;for(d=a.xc();d.Dc();)if(a=d.Ec(),fe(b)===fe(a)||null!=b&&Td(b,a))return c&&d.Fc(),!0;return!1}function XC(a,b){var c,d;Xh(b);for(d=b.xc();d.Dc();)if(c=d.Ec(),!a.we(c))return!1;return!0}
+function aH(a){var b,c,d,e;e=new tl("[");b=!1;for(d=a.xc();d.Dc();)c=d.Ec(),b?e.a+=", ":b=!0,fi(e,c===a?"(this Collection)":(E(),""+c));e.a+="]";return e.a}x(627,1,{});_.we=bH;_.eQ=be;_.hC=ce;_.xe=cH;_.ye=dH;_.ze=eH;_.tS=function(){return aH(this)};B(627);function fH(a,b){var c,d,e;c=b.We();e=b.ke();d=a.Ee(c);return!(fe(e)===fe(d)||null!=e&&Td(e,d))||null==d&&!a.Be(c)?!1:!0}
+function gH(a,b){var c,d;if(b===a)return!0;if(!y(b,60)||a.Oc()!=b.Oc())return!1;for(d=b.De().xc();d.Dc();)if(c=d.Ec(),!a.Ae(c))return!1;return!0}function hH(a,b,c){var d,e;for(d=a.De().xc();d.Dc();)if(a=d.Ec(),e=a.We(),fe(b)===fe(e)||null!=b&&Td(b,e))return c&&(a=new iH(a.We(),a.ke()),d.Fc()),a;return null}function jH(a){var b,c,d,e;e=new tl("{");b=!1;for(d=a.De().xc();d.Dc();)c=d.Ec(),b?e.a+=", ":b=!0,fi(e,kH(a,c.We())),e.a+="\x3d",fi(e,kH(a,c.ke()));e.a+="}";return e.a}
+function kH(a,b){return b===a?"(this Map)":(E(),""+b)}function lH(a){return a?a.ke():null}x(630,1,Uc);_.Ae=function(a){return fH(this,a)};_.Be=function(a){return!!hH(this,a,!1)};_.Ce=function(a){var b,c;for(c=this.De().xc();c.Dc();)if(b=c.Ec(),b=b.ke(),fe(a)===fe(b)||null!=a&&Td(a,b))return!0;return!1};_.eQ=function(a){return gH(this,a)};_.Ee=function(a){return lH(hH(this,a,!1))};_.hC=function(){return mH(this.De())};_.xe=cH;_.Fe=function(){throw new Wr("Put not supported on this map");};
+_.Ge=function(a){return lH(hH(this,a,!0))};_.Oc=function(){return this.De().Oc()};_.tS=function(){return jH(this)};B(630);function Zq(a,b){return Ld(b)?null==b?!!nH(a.d,null):void 0!==a.f.gf(b):!!nH(a.d,b)}function U(a,b){return Ld(b)?oH(a,b):lH(nH(a.d,b))}function oH(a,b){return null==b?lH(nH(a.d,null)):a.f.gf(b)}function pl(a,b,c){return Ld(b)?M(a,b,c):bz(a.d,b,c)}function M(a,b,c){return null==b?bz(a.d,null,c):a.f.kf(b,c)}function rl(a,b){return Ld(b)?null==b?pH(a.d,null):a.f.lf(b):pH(a.d,b)}
+function Wk(a){qH();a.d=rH.cf();a.d.b=a;a.f=rH.df();a.f.b=a;a.e=0;sH(a)}x(98,630,Uc);_.He=function(){Wk(this)};_.Be=function(a){return Zq(this,a)};_.Ce=function(a){return this.f.Ce(a)||this.d.Ce(a)};_.De=function(){return new tH(this)};_.Ee=function(a){return U(this,a)};_.Fe=function(a,b){return pl(this,a,b)};_.Ge=function(a){return rl(this,a)};_.Oc=CE;_.e=0;B(98);x(631,627,Vc);_.we=bH;_.eQ=function(a){return a===this?!0:y(a,45)&&a.Oc()==this.Oc()?XC(this,a):!1};_.hC=function(){return mH(this)};
+_.xe=cH;_.ye=dH;_.ze=eH;B(631);function tH(a){this.a=a}x(130,631,Vc,tH);_.we=function(a){return y(a,41)?fH(this.a,a):!1};_.xc=function(){return new uH(this.a)};_.Oc=vH;B(130);function wH(a){if(a.a.Dc())return!0;if(a.a!=a.c)return!1;a.a=a.d.d._e();return a.a.Dc()}function uH(a){this.d=a;this.a=this.c=this.d.f._e();this._gwt_modCount=a._gwt_modCount}x(339,1,{},uH);_.Dc=function(){return wH(this)};_.Ec=function(){return xH(this.d,this),N(wH(this)),this.b=this.a,this.a.Ec()};
+_.Fc=function(){bi(!!this.b);xH(this.d,this);this.b.Fc();this.b=null;this._gwt_modCount=this.d._gwt_modCount};B(339);function Gz(a,b){var c,d;c=0;for(d=a.Oc();c<d;++c)if(yH(b,a.Me(c)))return c;return-1}function wA(a,b){var c,d;d=new Yz(a,0);for(c=0;c<b;++c)N(d.b<d.d.Oc()),d.d.Me(d.c=d.b++),kB(d)}x(628,627,Wc);_.Ke=function(){throw new Wr("Add not supported on this list");};_.Le=function(a){this.Ke(this.Oc(),a);return!0};_.we=bH;
+_.eQ=function(a){var b,c,d;if(a===this)return!0;if(!y(a,44)||this.Oc()!=a.Oc())return!1;d=a.xc();for(b=this.xc();b.Dc();)if(a=b.Ec(),c=d.Ec(),!(fe(a)===fe(c)||null!=a&&Td(a,c)))return!1;return!0};_.hC=function(){V();var a,b,c;c=1;for(b=this.xc();b.Dc();)a=b.Ec(),c=31*c+(null!=a?Rd(a):0),c|=0;return c};_.Ne=function(a){return Gz(this,a)};_.xe=cH;_.xc=function(){return new kl(this)};_.Oe=function(){return this.Pe(0)};_.Pe=function(a){return new Yz(this,a)};
+_.Qe=function(){throw new Wr("Remove not supported on this list");};_.Re=function(a){return mA(this,a,!0)};_.Se=function(){throw new Wr("Set not supported on this list");};_.Te=function(a,b){return new dv(this,a,b)};_.ye=dH;_.ze=eH;B(628);function kB(a){bi(-1!=a.c);a.d.Qe(a.c);a.b=a.c;a.c=-1}function kl(a){this.d=a}x(22,1,{},kl);_.Dc=function(){return this.b<this.d.Oc()};_.Ec=function(){return N(this.Dc()),this.d.Me(this.c=this.b++)};_.Fc=zH;_.b=0;_.c=-1;B(22);function jA(a){return a.b<a.d.Oc()}
+function kA(a){return N(a.b<a.d.Oc()),a.d.Me(a.c=a.b++)}function Yz(a,b){this.d=this.a=a;ai(b,a.Oc());this.b=b}x(96,22,{},Yz);_.Dc=function(){return jA(this)};_.Ue=function(){return 0<this.b};_.Ec=function(){return kA(this)};_.Ve=function(){return N(0<this.b),this.a.Me(this.c=--this.b)};_.Fc=zH;B(96);function dv(a,b,c){var d=a.Oc();if(0>b)throw new Wh(za+b+" \x3c 0");if(c>d)throw new Wh("toIndex: "+c+" \x3e size "+d);if(b>c)throw new H(za+b+" \x3e toIndex: "+c);this.c=a;this.a=b;this.b=c-b}
+x(38,628,Wc,dv);_.Ke=function(a,b){ai(a,this.b);this.c.Ke(this.a+a,b);++this.b};_.Me=function(a){return Vh(a,this.b),this.c.Me(this.a+a)};_.Qe=function(a){Vh(a,this.b);a=this.c.Qe(this.a+a);--this.b;return a};_.Se=function(a,b){Vh(a,this.b);return this.c.Se(this.a+a,b)};_.Oc=AE;_.a=0;_.b=0;B(38);function hn(a){a=a.a.De().xc();return new AH(a)}function jn(a){this.a=a}x(35,631,Vc,jn);_.we=function(a){return this.a.Be(a)};_.xc=function(){return hn(this)};_.Oc=vH;B(35);
+function kn(a){return a.a.Ec().We()}function AH(a){this.a=a}x(341,1,{},AH);_.Dc=BH;_.Ec=function(){return kn(this)};_.Fc=CH;B(341);function Kq(a){a=a.a.De().xc();return new DH(a)}function Lq(a){this.a=a}x(30,627,{},Lq);_.we=function(a){return this.a.Ce(a)};_.xc=function(){return Kq(this)};_.Oc=vH;B(30);function Mq(a){return a.a.Ec().ke()}function DH(a){this.a=a}x(342,1,{},DH);_.Dc=BH;_.Ec=function(){return Mq(this)};_.Fc=CH;B(342);function EH(a,b){var c;c=a.e;a.e=b;return c}x(64,1,Xc);
+_.eQ=function(a){return y(a,41)?yH(this.d,a.We())&&yH(this.e,a.ke()):!1};_.We=BE;_.ke=CE;_.hC=function(){return FH(this.d)^FH(this.e)};_.Xe=function(a){return EH(this,a)};_.tS=function(){return this.d+"\x3d"+this.e};B(64);function iH(a,b){this.d=a;this.e=b}x(65,64,Yc,iH);B(65);function HB(a){var b=a.e;this.d=a.d;this.e=b}x(340,64,Xc,HB);_.Xe=GH;B(340);x(633,1,{41:1});_.eQ=function(a){return y(a,41)?yH(this.b,a.We())&&yH(this.a.gf(this.b),a.ke()):!1};_.hC=function(){return FH(this.b)^FH(this.a.gf(this.b))};
+_.tS=function(){return this.b+"\x3d"+this.a.gf(this.b)};B(633);function HH(a,b){var c;c=b.We();c=a.Ze(c);return!!c&&yH(c.e,b.ke())}function HA(a,b){return lH(a.Ze(b))}function EB(a){if(!a)throw new Uh;return a.d}x(643,630,Uc);_.Ae=function(a){return HH(this,a)};_.Be=function(a){return!!this.Ze(a)};_.De=function(){return new IH(this)};_.Ee=function(a){return HA(this,a)};B(643);function IH(a){this.b=a}x(143,631,Vc,IH);_.we=function(a){return y(a,41)&&HH(this.b,a)};_.xc=function(){return this.b.Ye()};
+_.Oc=JH;B(143);function vz(a,b,c){Xh(c);a=Nz(a,b);for(b=new kl(c);b.b<b.d.Oc();)c=(N(b.b<b.d.Oc()),b.d.Me(b.c=b.b++)),KH(a,c)}function yz(a,b){var c;c=Nz(a,b);try{return N(c.b!=c.d.c),c.c=c.b,c.b=c.b.a,++c.a,c.c.c}catch(d){d=Oh(d);if(y(d,43))throw new Wh("Can't get element "+b);throw Ph(d);}}function Mz(a,b){var c,d;c=Nz(a,b);try{return d=(N(c.b!=c.d.c),c.c=c.b,c.b=c.b.a,++c.a,c.c.c),Zz(c),d}catch(e){e=Oh(e);if(y(e,43))throw new Wh("Can't remove element "+b);throw Ph(e);}}x(634,628,Wc);
+_.Ke=function(a,b){var c;c=Nz(this,a);KH(c,b)};_.Me=function(a){return yz(this,a)};_.xc=function(){return Nz(this,0)};_.Qe=function(a){return Mz(this,a)};_.Se=function(a,b){var c,d;c=Nz(this,a);try{return d=(N(c.b!=c.d.c),c.c=c.b,c.b=c.b.a,++c.a,c.c.c),bi(!!c.c),c.c.c=b,d}catch(e){e=Oh(e);if(y(e,43))throw new Wh("Can't set element "+a);throw Ph(e);}};B(634);function LH(a){a.b=we(F,h,1,0,3)}function Xz(a,b,c){ai(b,a.b.length);a.b.splice(b,0,c)}function Ne(a,b){a.b[a.b.length]=b;return!0}
+function ku(a,b){var c;c=b.ye();0!=c.length&&yl(c,0,a.b,a.b.length,c.length,!1)}function hv(a,b){Vh(b,a.b.length);return a.b[b]}function bq(a,b){for(var c=0;c<a.b.length;++c)if(yH(b,a.b[c]))return c;return-1}function gv(a,b){var c;c=(Vh(b,a.b.length),a.b[b]);a.b.splice(b,1);return c}function Ue(a,b){var c;c=bq(a,b);if(-1==c)return!1;a.Qe(c);return!0}function av(a,b,c){var d;d=(Vh(b,a.b.length),a.b[b]);a.b[b]=c;return d}
+function Se(a,b){var c,d;d=a.b.length;b.length<d&&(b=wl(b,d));for(c=0;c<d;++c)b[c]=a.b[c];b.length>d&&(b[d]=null);return b}function G(){LH(this)}function vx(a){LH(this);Th(0<=a,"Initial capacity must not be negative")}function eq(a){LH(this);a=a.ye();yl(a,0,this.b,0,a.length,!1)}x(9,628,Zc,G,vx,eq);_.Ke=function(a,b){Xz(this,a,b)};_.Le=function(a){return Ne(this,a)};_.we=function(a){return-1!=bq(this,a)};_.Me=function(a){return hv(this,a)};_.Ne=function(a){return bq(this,a)};
+_.xe=function(){return 0==this.b.length};_.Qe=function(a){return gv(this,a)};_.Re=function(a){return Ue(this,a)};_.Se=function(a,b){return av(this,a,b)};_.Oc=aG;_.ye=function(){return vl(this.b,this.b.length)};_.ze=function(a){return Se(this,a)};B(9);
+function $E(a,b,c,d,e,f){var g,m,n;if(7>d-c)for(a=c,g=a+1;g<d;++g)for(n=g;n>a&&0<f.me(b[n-1],b[n]);--n)c=b[n],b[n]=b[n-1],b[n-1]=c;else if(m=c+e,g=d+e,n=m+(g-m>>1),$E(b,a,m,n,-e,f),$E(b,a,n,g,-e,f),0>=f.me(a[n-1],a[n]))for(;c<d;)b[c++]=a[m++];else for(e=m,m=n;c<d;)m>=g||e<n&&0>=f.me(a[e],a[m])?b[c++]=a[e++]:b[c++]=a[m++]}function Bm(a){this.a=a}x(36,628,Zc,Bm);_.we=function(a){return-1!=Gz(this,a)};_.Me=function(a){return Vh(a,this.a.length),this.a[a]};
+_.Se=function(a,b){var c;c=(Vh(a,this.a.length),this.a[a]);this.a[a]=b;return c};_.Oc=function(){return this.a.length};_.ye=function(){var a=this.a;return vl(a,a.length)};_.ze=function(a){var b,c;c=this.a.length;a.length<c&&(a=wl(a,c));for(b=0;b<c;++b)a[b]=this.a[b];a.length>c&&(a[c]=null);return a};B(36);function V(){V=w;sl=new MH;Qz=new NH}function mH(a){V();var b,c;c=0;for(b=a.xc();b.Dc();)a=b.Ec(),c+=null!=a?Rd(a):0,c|=0;return c}function ju(a){V();return y(a,111)?new ZA(a):new lu(a)}var sl,Qz;
+function MH(){}x(412,628,Zc,MH);_.we=Ex;_.Me=function(a){Vh(a,0);return null};_.xc=OH;_.Oe=OH;_.Oc=hD;B(412);function PH(){PH=w;QH=new RH}function RH(){}x(413,1,{},RH);_.Dc=$l;_.Ue=$l;_.Ec=SH;_.Ve=SH;_.Fc=function(){throw new ci;};var QH;B(413);x(415,630,$c,function(){});_.Be=Ex;_.Ce=Ex;_.De=function(){return V(),Qz};_.Ee=function(){return null};_.Oc=hD;B(415);function NH(){}x(414,631,ad,NH);_.we=Ex;_.xc=OH;_.Oc=hD;B(414);x(180,628,{3:1,44:1},function(a){this.a=a});
+_.we=function(a){return yH(this.a,a)};_.Me=function(a){Vh(a,1);return this.a};_.Oc=function(){return 1};B(180);function uz(a){this.b=a}x(90,1,{},uz);_.we=TH;_.eQ=be;_.hC=ce;_.xe=UH;_.xc=VH;_.Oc=JH;_.ye=WH;_.ze=XH;_.tS=function(){return this.b.tS()};B(90);function mB(a){this.b=a}x(39,1,{},mB);_.Dc=YH;_.Ec=ZH;_.Fc=$H;B(39);function ou(a,b){return a.a.Ne(b)}function mu(a,b,c){return new lu(a.a.Te(b,c))}function lu(a){this.a=this.b=a}x(67,90,Wc,lu);_.Le=function(){throw new $G;};_.we=TH;_.eQ=aI;
+_.Me=function(a){return this.a.Me(a)};_.hC=bI;_.Ne=function(a){return ou(this,a)};_.xe=function(){return this.a.xe()};_.xc=VH;_.Oe=function(){return new cI(this.a.Pe(0))};_.Pe=function(a){return new cI(this.a.Pe(a))};_.Re=function(){throw new $G;};_.Se=dI;_.Oc=JH;_.Te=function(a,b){return mu(this,a,b)};_.ye=WH;_.ze=XH;B(67);function cI(a){this.a=this.b=a}x(184,39,{},cI);_.Dc=YH;_.Ue=function(){return this.a.Ue()};_.Ec=ZH;_.Ve=function(){return this.a.Ve()};_.Fc=$H;B(184);function yG(a){this.b=a}
+x(416,1,Uc,yG);_.De=function(){!this.a&&(this.a=new eI(new tH(this.b)));return this.a};_.eQ=function(a){return gH(this.b,a)};_.Ee=function(a){return oH(this.b,a)};_.hC=function(){return mH(new tH(this.b))};_.xe=function(){return 0==this.b.e};_.Fe=dI;_.Ge=GH;_.Oc=function(){return this.b.e};_.tS=function(){return jH(this.b)};B(416);function Ax(a){this.b=a}x(181,90,Vc,Ax);_.we=TH;_.eQ=function(a){return this.b.eQ(a)};_.hC=function(){return this.b.hC()};_.xe=UH;_.xc=VH;_.Oc=JH;_.ye=WH;_.ze=XH;B(181);
+function fI(a,b){var c;for(c=0;c<b;++c)a[c]=new gI(a[c])}function eI(a){this.b=a}x(417,181,Vc,eI);_.we=TH;_.xc=function(){var a;a=this.b.xc();return new hI(a)};_.ye=function(){var a;a=this.b.ye();fI(a,a.length);return a};_.ze=function(a){a=this.b.ze(a);fI(a,this.b.Oc());return a};B(417);function hI(a){this.a=a}x(418,1,{},hI);_.Dc=BH;_.Ec=function(){return new gI(this.a.Ec())};_.Fc=Nr;B(418);function gI(a){this.a=a}x(182,1,{41:1},gI);_.eQ=aI;_.We=function(){return this.a.We()};_.ke=function(){return this.a.ke()};
+_.hC=bI;_.Xe=GH;_.tS=function(){return this.a.tS()};B(182);function ZA(a){lu.call(this,a)}x(183,67,Wc,ZA);B(183);function YE(){YE=w;ZE=new iI}var ZE;function IB(a,b){Xh(a);Xh(b);return E(),Ld(a)?Be(a,b):a.Bb(b)}function iI(){}x(467,1,{},iI);_.me=function(a,b){return IB(a,b)};_.eQ=be;B(467);function xH(a,b){if(b._gwt_modCount!=a._gwt_modCount)throw new jI;}function sH(a){a._gwt_modCount=(a._gwt_modCount|0)+1}function jI(){nh(this)}x(594,10,xa,jI);B(594);function mh(){Wk(this)}
+function xG(a){Th(0<=a,"Negative initial capacity");Th(!0,"Non-positive load factor");Wk(this)}function Wz(a){Wk(this);var b;Xh(a);for(b=(new kI(a)).b.Ye();jA(b.a);)a=b.b=kA(b.a),this.Fe(a.We(),a.ke())}x(17,98,$c,mh,xG,Wz);_.Ie=function(a,b){return fe(a)===fe(b)||null!=a&&Td(a,b)};_.Je=function(a){return Rd(a)|0};B(17);function il(a,b){return null==a.a.Fe(b,a)}function hl(){this.a=new mh}function CF(a){this.a=new xG(a.a.Oc());Bx(this,a)}x(34,631,ad,hl,CF);_.we=function(a){return this.a.Be(a)};
+_.xe=function(){return 0==this.a.Oc()};_.xc=function(){return hn(new jn(this.a))};_.Oc=vH;_.tS=function(){return aH(new jn(this.a))};B(34);function nH(a,b){var c,d,e,f;c=null==b?"0":(E(),""+a.b.Je(b));d=a.a[c]||[];e=0;for(f=d.length;e<f;++e)if(c=d[e],a.b.Ie(b,c.We()))return c;return null}function bz(a,b,c){var d,e,f,g;d=null==b?"0":(E(),""+a.b.Je(b));e=a.a;d=e[d]||(e[d]=[]);f=0;for(g=d.length;f<g;++f)if(e=d[f],a.b.Ie(b,e.We()))return e.Xe(c);d[d.length]=new iH(b,c);a=a.b;++a.e;sH(a);return null}
+function pH(a,b){var c,d,e,f;e=null==b?"0":(E(),""+a.b.Je(b));c=a.a[e]||[];for(f=0;f<c.length;f++)if(d=c[f],a.b.Ie(b,d.We()))return 1==c.length?delete a.a[e]:c.splice(f,1),c=a.b,--c.e,sH(c),d.ke();return null}function lI(){this.a=this.$e()}x(187,1,{},lI);_.Ce=function(a){var b,c,d,e,f,g,m;f=Object.getOwnPropertyNames(this.a);g=0;for(m=f.length;g<m;++g)for(b=f[g],c=this.a[b],d=0,e=c.length;d<e;++d)if(b=c[d],this.b.Ie(a,b.ke()))return!0;return!1};_.$e=function(){return Object.create(null)};_._e=function(){return new mI(this)};
+B(187);function nI(a){if(a.c<a.a.length)return!0;if(a.b<a.d.length-1){var b=a.d[++a.b];a.a=a.g.a[b];a.c=0;return!0}return!1}function mI(a){this.g=a;this.d=Object.getOwnPropertyNames(this.g.a);this.a=we(oI,h,41,0,0)}x(466,1,{},mI);_.Dc=function(){return nI(this)};_.Ec=function(){return N(nI(this)),this.e=this.a,this.f=this.a[this.c++],this.f};_.Fc=function(){bi(!!this.f);pH(this.g,this.f.We());fe(this.a)===fe(this.e)&&1!=this.a.length&&--this.c;this.f=null};_.b=-1;_.c=0;_.e=null;_.f=null;B(466);
+function pI(){lI.call(this)}x(464,187,{},pI);_.Ce=function(a){var b=this.a,c;for(c in b)if(c==parseInt(c,10))for(var d=b[c],e=0,f=d.length;e<f;++e){var g=d[e].ke();if(this.af(a,g))return!0}return!1};_.$e=function(){return{}};_._e=function(){var a=this.bf(),b=this.a,c;for(c in b)if(c==parseInt(c,10))for(var d=b[c],e=0,f=d.length;e<f;++e)a.Le(d[e]);return a.xc()};_.af=qI;_.bf=function(){return new rI(this)};B(464);function rI(a){this.a=a;LH(this)}x(465,9,Zc,rI);
+_.Qe=function(a){var b;return b=gv(this,a),pH(this.a,b.We()),b};B(465);function sI(){}x(495,1,{},sI);_.cf=function(){return new lI};_.df=function(){return new tI};B(495);function qH(){qH=w;var a,b;if(b=Object.create&&Object.getOwnPropertyNames)b=Object.create(null),void 0!==b[bd]||0!=Object.getOwnPropertyNames(b).length?b=!1:(b[bd]=42,b=42!==b[bd]?!1:!0);rH=b?(a=Object.create(null),a[bd]=42,0==Object.getOwnPropertyNames(a).length)?new uI:new sI:new vI}var rH;function uI(){}x(497,495,{},uI);_.df=function(){return new wI};
+B(497);function vI(){}x(496,495,{},vI);_.cf=function(){return new pI};_.df=function(){return new xI};B(496);function yI(a,b){var c=a.a,d;for(d in c)if(a.ff(b,c[d]))return!0;return!1}function zI(a,b,c){var d;d=a.a[b];if(void 0===d){var e=a.b;++e.e;sH(e)}a.a[b]=void 0===c?null:c;return d}function AI(a,b){var c;c=a.a[b];if(void 0!==c){delete a.a[b];var d=a.b;--d.e;sH(d)}return c}function tI(){this.a=this.ef()}x(134,1,{},tI);_.Ce=function(a){return yI(this,a)};_.ef=function(){return Object.create(null)};
+_._e=function(){var a;a=this.hf();return new BI(this,a)};_.ff=qI;_.gf=function(a){return this.a[a]};_.hf=function(){return Object.getOwnPropertyNames(this.a)};_.jf=function(a){return new CI(this,a)};_.kf=function(a,b){return zI(this,a,b)};_.lf=function(a){return AI(this,a)};B(134);function BI(a,b){this.c=a;this.d=b}x(409,1,{},BI);_.Dc=function(){return this.a<this.d.length};_.Ec=function(){return N(this.a<this.d.length),new CI(this.c,this.d[this.b=this.a++])};
+_.Fc=function(){bi(-1!=this.b);this.c.lf(this.d[this.b]);this.b=-1};_.a=0;_.b=-1;B(409);function CI(a,b){this.a=a;this.b=b}x(178,633,{41:1},CI);_.We=AE;_.ke=function(){return this.a.gf(this.b)};_.Xe=function(a){return this.a.kf(this.b,a)};B(178);function xI(){tI.call(this)}x(406,134,{},xI);_.Ce=function(a){var b=this.a,c;for(c in b)if(58==c.charCodeAt(0)&&this.ff(a,b[c]))return!0;return!1};_.ef=function(){return{}};
+_._e=function(){var a=this.mf(),b;for(b in this.a)if(58==b.charCodeAt(0)){var c=this.jf(b.substring(1));a.Le(c)}return a.xc()};_.gf=function(a){return this.a[":"+a]};_.mf=function(){return new DI(this)};_.kf=function(a,b){return zI(this,":"+a,b)};_.lf=function(a){return AI(this,":"+a)};B(406);function DI(a){this.a=a;LH(this)}x(408,9,Zc,DI);_.Qe=function(a){var b;return b=gv(this,a),AI(this.a,":"+b.We()),b};B(408);function wI(){tI.call(this)}x(407,134,{},wI);
+_.Ce=function(a){var b;b=this.a[bd];return void 0!==b&&this.b.Ie(a,b)?!0:yI(this,a)};_.hf=function(){var a;a=Object.getOwnPropertyNames(this.a);void 0!==this.a[bd]&&(a[a.length]=bd);return a};B(407);function WB(a,b,c){var d;if(d=U(a.c,b))return b=EH(d,c),a.a&&(EI(d),FI(d)),b;d=new GI(a,b,c);pl(a.c,b,d);FI(d);return null}function VB(){Wk(this);this.b=new HI(this);this.c=new mh;this.b.b=this.b;this.b.a=this.b}x(106,17,$c,VB);_.He=function(){Wk(this.c);this.b.b=this.b;this.b.a=this.b};
+_.Be=function(a){return Zq(this.c,a)};_.Ce=function(a){var b;for(b=this.b.a;b!=this.b;){if(yH(b.e,a))return!0;b=b.a}return!1};_.De=function(){return new II(this)};_.Ee=function(a){return(a=U(this.c,a))?(this.a&&(EI(a),FI(a)),a.e):null};_.Fe=function(a,b){return WB(this,a,b)};_.Ge=function(a){(a=rl(this.c,a))?(EI(a),a=a.e):a=null;return a};_.Oc=function(){return this.c.e};_.a=!1;B(106);function FI(a){var b;b=a.c.b.b;a.b=b;a.a=a.c.b;b.a=a.c.b.b=a}function EI(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null}
+function HI(a){GI.call(this,a,null,null)}function GI(a,b,c){this.c=a;this.d=b;this.e=c}x(147,65,Yc,HI,GI);B(147);function II(a){this.a=a}x(583,631,Vc,II);_.we=function(a){return y(a,41)?fH(this.a,a):!1};_.xc=function(){return new JI(this)};_.Oc=function(){return this.a.c.e};B(583);function JI(a){this.c=a;this.b=a.a.b.a;this._gwt_modCount=a.a.c._gwt_modCount}x(584,1,{},JI);_.Dc=function(){return this.b!=this.c.a.b};
+_.Ec=function(){return xH(this.c.a.c,this),N(this.b!=this.c.a.b),this.a=this.b,this.b=this.b.a,this.a};_.Fc=function(){bi(!!this.a);xH(this.c.a.c,this);EI(this.a);rl(this.c.a.c,this.a.d);this._gwt_modCount=this.c.a.c._gwt_modCount;this.a=null};B(584);function yx(){this.a=new VB}function zx(a){this.a=new VB;Bx(this,a)}x(68,34,ad,yx,zx);B(68);function Fp(a,b,c,d){var e;e=new KI;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b}function cy(a){N(0!=a.b);return a.a.a.c}function dy(a){N(0!=a.b);return a.c.b.c}
+function Nz(a,b){var c,d;ai(b,a.b);if(b>=a.b>>1)for(d=a.c,c=a.b;c>b;--c)d=d.b;else for(d=a.a.a,c=0;c<b;++c)d=d.a;return new LI(a,b,d)}function Xp(a,b){b.a.b=b.b;b.b.a=b.a;b.a=b.b=null;b.c=null;--a.b}function Py(a){a.a.a=a.c;a.c.b=a.a;a.a.b=a.c.a=null;a.b=0}function Ep(){this.a=new KI;this.c=new KI;Py(this)}x(179,634,{3:1,44:1},Ep);_.Le=function(a){return Fp(this,a,this.c.b,this.c),!0};_.Pe=function(a){return Nz(this,a)};_.Oc=AE;_.b=0;B(179);function KH(a,b){Fp(a.d,b,a.b.b,a.b);++a.a;a.c=null}
+function Zz(a){var b;bi(!!a.c);b=a.c.a;Xp(a.d,a.c);a.b==a.c?a.b=b:--a.a;a.c=null}function LI(a,b,c){this.d=a;this.b=c;this.a=b}x(410,1,{},LI);_.Dc=function(){return this.b!=this.d.c};_.Ue=function(){return this.b.b!=this.d.a};_.Ec=function(){return N(this.b!=this.d.c),this.c=this.b,this.b=this.b.a,++this.a,this.c.c};_.Ve=function(){return N(this.b.b!=this.d.a),this.c=this.b=this.b.b,--this.a,this.c.c};_.Fc=function(){Zz(this)};_.a=0;_.c=null;B(410);function KI(){}x(135,1,{},KI);B(135);var oI=ne();
+function Uh(){nh(this)}x(43,10,{3:1,15:1,10:1,14:1,43:1},Uh);B(43);function yH(a,b){return fe(a)===fe(b)||null!=a&&Td(a,b)}function FH(a){return null!=a?Rd(a):0}function MI(a,b){var c,d;for(d=a.b;d;){c=IB(b,d.d);if(0==c)return d;c=0>c?0:1;d=d.a[c]}return null}function FB(a){var b;if(!a.b)return null;for(b=a.b;a=b.a[0];)b=a;return b}function GB(a,b,c){var d,e;d=null;for(e=a.b;e;){a=IB(b,e.d);if(c&&0==a)return e;0<=a?e=e.a[1]:(d=e,e=e.a[0])}return d}
+function xz(a,b){return new dA(a,(eA(),NI),null,!1,b)}function OI(a,b,c,d,e,f,g,m){var n;d&&((n=d.a[0])&&OI(a,b,c,n,e,f,g,m),PI(c,d.d,e,f,g,m)&&b.Le(d),(d=d.a[1])&&OI(a,b,c,d,e,f,g,m))}function PI(a,b,c,d,e,f){var g,m;return a.nf()&&(g=IB(b,c),0>g||!d&&0==g)||a.of()&&(m=IB(b,e),0<m||!f&&0==m)?!1:!0}
+function QI(a,b,c,d){var e;if(b){e=IB(c.d,b.d);if(0==e)return d.d=EH(b,c.e),d.b=!0,b;e=0>e?0:1;b.a[e]=QI(a,b.a[e],c,d);RI(b.a[e])&&(RI(b.a[1-e])?(b.b=!0,b.a[0].b=!1,b.a[1].b=!1):RI(b.a[e].a[e])?b=SI(b,1-e):RI(b.a[e].a[1-e])&&(b=TI(b,1-e)))}else return c;return b}function RI(a){return!!a&&a.b}function zu(a,b,c){b=new UI(b,c);c=new VI;a.b=QI(a,a.b,b,c);c.b||++a.c;a.b.b=!1;return c.d}function MA(a,b){var c;c=new VI;WI(a,b,c);return c.d}
+function WI(a,b,c){var d,e,f,g,m,n,p,q,r;if(a.b){q=f=null;m=new UI(null,null);e=1;m.a[1]=a.b;for(p=m;p.a[e];)(n=e,g=q,q=p,p=p.a[e],d=IB(b,p.d),e=0>d?0:1,0!=d||c.c&&!yH(p.e,c.d)||(f=p),p&&p.b||RI(p.a[e]))||(RI(p.a[1-e])?q=q.a[n]=SI(p,e):!RI(p.a[1-e])&&(r=q.a[1-n])&&(RI(r.a[1-n])||RI(r.a[n])?(d=g.a[1]==q?1:0,RI(r.a[n])?g.a[d]=TI(q,n):RI(r.a[1-n])&&(g.a[d]=SI(q,n)),p.b=g.a[d].b=!0,g.a[d].a[0].b=!1,g.a[d].a[1].b=!1):(q.b=!1,r.b=!0,p.b=!0)));if(f){c.b=!0;c.d=f.e;if(p!=f){b=new UI(p.d,p.e);c=f;g=m;for(e=
+null==g.d||0<IB(c.d,g.d)?1:0;g.a[e]!=c;)g=g.a[e],e=0<IB(c.d,g.d)?1:0;g.a[e]=b;b.b=c.b;b.a[0]=c.a[0];b.a[1]=c.a[1];c.a[0]=null;c.a[1]=null;q==f&&(q=b)}q.a[q.a[1]==p?1:0]=p.a[p.a[0]?0:1];--a.c}a.b=m.a[1];a.b&&(a.b.b=!1)}}function TI(a,b){var c;c=1-b;a.a[c]=SI(a.a[c],c);return SI(a,b)}function SI(a,b){var c,d;c=1-b;d=a.a[c];a.a[c]=d.a[b];d.a[b]=a;a.b=!0;d.b=!1;return d}function JA(){var a=null;this.b=null;!a&&(a=(YE(),YE(),ZE));this.a=a}x(142,643,$c,JA);_.Ye=function(){return new XI(this)};_.De=function(){return new kI(this)};
+_.Ze=function(a){return MI(this,a)};_.Fe=function(a,b){return zu(this,a,b)};_.Ge=function(a){return MA(this,a)};_.Oc=Ek;_.c=0;B(142);function lA(a){kB(a.a);var b=a.c,c=a.b,d;d=new VI;d.c=!0;d.d=c.ke();WI(b,c.We(),d);a.b=null}function XI(a){YI.call(this,a,(eA(),ZI),null,!1,null,!1)}function YI(a,b,c,d,e,f){var g;this.c=a;g=new G;OI(a,g,b,a.b,c,d,e,f);this.a=new Yz(g,0)}x(104,1,{},XI,YI);_.Dc=function(){return jA(this.a)};_.Ec=function(){return this.b=kA(this.a)};_.Fc=function(){lA(this)};B(104);
+function kI(a){this.b=a}x(194,143,Vc,kI);B(194);function UI(a,b){this.d=a;this.e=b;this.a=we($I,h,77,2,0);this.b=!0}x(77,65,{64:1,65:1,41:1,77:1},UI);_.b=!1;var $I=B(77);function VI(){}x(144,1,{},VI);_.tS=function(){return"State: mv\x3d"+this.c+" value\x3d"+this.d+" done\x3d"+this.a+" found\x3d"+this.b};_.a=!1;_.b=!1;_.c=!1;B(144);function gA(a){var b;a.f.nf()?a.a?b=GB(a.c,a.b,!0):b=GB(a.c,a.b,!1):b=FB(a.c);return b&&PI(a.f,b.d,a.b,a.a,a.e,a.d)?b:null}
+function dA(a,b,c,d,e){this.c=a;switch(b.g){case 2:if(0>IB(e,c))throw new H("subMap: "+e+" less than "+c);break;case 1:IB(e,e);break;case 3:IB(c,c)}this.f=b;this.b=c;this.a=d;this.e=e;this.d=!1}x(145,643,Uc,dA);_.Ye=function(){return new YI(this.c,this.f,this.b,this.a,this.e,this.d)};_.De=function(){return new iA(this,this)};_.Ze=function(a){return(a=MI(this.c,a))&&PI(this.f,a.d,this.b,this.a,this.e,this.d)?a:null};_.xe=function(){return!gA(this)};
+_.Fe=function(a,b){if(!PI(this.f,a,this.b,this.a,this.e,this.d))throw new H(a+" outside the range "+this.b+" to "+this.e);return zu(this.c,a,b)};_.Ge=function(a){return PI(this.f,a,this.b,this.a,this.e,this.d)?MA(this.c,a):null};_.Oc=function(){var a,b;a=0;for(b=new YI(this.c,this.f,this.b,this.a,this.e,this.d);jA(b.a);b.b=kA(b.a))++a;return a};_.a=!1;_.d=!1;B(145);function iA(a,b){this.a=a;this.b=b}x(195,143,Vc,iA);_.xe=function(){return!gA(this.a)};B(195);
+function eA(){eA=w;ZI=new aJ("All",0);NI=new bJ;fA=new cJ;IA=new dJ}function aJ(a,b){R.call(this,a,b)}x(53,4,cd,aJ);_.nf=$l;_.of=$l;var ZI,NI,fA,IA,eJ=C(53,function(){eA();return S(D(eJ,1),h,53,0,[ZI,NI,fA,IA])});function bJ(){R.call(this,"Head",1)}x(505,53,cd,bJ);_.of=am;C(505,null);function cJ(){R.call(this,"Range",2)}x(506,53,cd,cJ);_.nf=am;_.of=am;C(506,null);function dJ(){R.call(this,"Tail",3)}x(507,53,cd,dJ);_.nf=am;C(507,null);B(604);B(606);var Ul=B(null);B(609);var Cy,fJ;fJ=le("D");fJ.j="D";
+fJ.e=1;Cy=fJ;var Dn=B(null);_=Md("vaadin.GridComponent",rE);_=Md("vaadin.GridDataSource",EF);_=Md("vaadin.GridStaticSection",wE);
+function He(a){return function(){var b;a:{var c=arguments,d;0!=Ah&&(d=Ie(),2E3<d-Ch&&(Ch=d,Bh=$wnd.setTimeout(zh,10)));if(0==Ah++){d=(Dh(),Eh);var e,f;if(d.c){f=null;do e=d.c,d.c=null,f=Nh(e,f);while(d.c);d.c=f}d=!0}else d=!1;try{b=a.apply(this,c);break a}finally{if(c=d)if(d=(Dh(),Eh),d.d){f=null;do e=d.d,d.d=null,f=Nh(e,f);while(d.d);d.d=f}--Ah;c&&-1!=Bh&&($wnd.clearTimeout(Bh),Bh=-1)}b=void 0}return b}}
+var gwtOnLoad=gwtOnLoad=function(a,b,c,d){function e(){for(var a=0;a<f.length;a++)f[a]()}null==dd&&(dd=[]);var f=dd;$moduleName=b;$moduleBase=c;fd=d;if(a)try{He(e)()}catch(g){a(b,g)}else He(e)()};(function(){null==dd&&(dd=[]);for(var a=dd,b=0;b<arguments.length;b++)a.push(arguments[b])})(function(){$wnd.setTimeout(He(Ss));var a,b,c;b=$doc.compatMode;a=S(ul(Wd),h,2,4,[Ea]);for(c=0;c<a.length&&a[c]!==b;c++);Yl();un(X((lm(),qm)),"v-grid-loaded")});
+var gJ=[[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","ie10"]],[["locale","default"],["user.agent","ie10"]],[["locale",
+"default"],["user.agent",dc]],[["locale","default"],["user.agent",dc]]];typeof window===ba&&typeof window.$gwt===ba&&(window.$gwt.permProps=gJ);function be(a){return this===a}function ce(){return Zd(this)}function $l(){return!1}function am(){return!0}function bm(){return Sa+this.g+Ta+this.d+Ua+this.f+Va+this.e+" ie6\x3d"+this.a+" ie8\x3d"+this.b+" ie9\x3d"+this.c}function xp(){if(this.a){var a=D(F,1),b=h,c;c=fm(this,0);c=ap([this.a(c)]);gm(this,S(a,b,1,3,[c]))}}function Tr(){}
+function Ur(){if(!this.pc())throw new Z("Should only call onDetach when the widget is attached to the browser's document");try{this.tc()}finally{try{this.oc()}finally{W(),this._.__listener=null,this.X=!1}}}function Rn(){return this.a}function Ln(){return!1}function Tu(){}function lv(a){a.style[hc]=""}function uk(){return this.g}function Xv(){return Vi(this.n.style,t)}function Wv(){return Vi(this.n.style,u)}function Ak(){}function pr(){null.pf()}function Kw(){Cw()}function Dx(){return null}
+function Qy(){gy(this.a)}function bA(){return"td"}function Ex(){return!1}function ph(){return this.f}function Cx(){return this.j}function pz(){return this.k}function GC(){Ir();ge(DB);ge(uw)}function iD(){return-1}function CE(){return this.e}function yB(){return this.u}function QF(){this.c=!0}function WF(){this.b.length=0;Zk(this.d,new tx(this.d,null,null))}function $F(){return YB(Xd)}function hD(){return 0}
+function SF(a){var b,c;this.a=!0;b=!1;for(c=0;c<this.b.length;c++)vp(this.b,I(c)).a>=a&&(KD(this.b,vp(this.b,I(c--))),b=!0);b&&Zk(this.d,new tx(this.d,null,null))}function XF(a,b){return-1!=JD(this.b,new Y(a))?(KD(this.b,new Y(a)),(b=kE(($D(),gE),(dm(),b?em:rp),rp,rp).a)||Zk(this.d,new tx(this.d,null,null)),!0):!1}function UF(a){return this.deselect(bG(this.d,a),!0)}
+function TF(a,b){var c;return 0<=a&&(!this.a||a<(c=this.d.q,Kd(c,c.size,c.Oc).bind(c)()))&&-1==JD(this.b,new Y(a))?(up(this.b,Kc,S(D(F,1),h,1,3,[new Y(a)])),(b=kE(($D(),gE),(dm(),b?em:rp),rp,rp).a)||Zk(this.d,new tx(this.d,null,null)),!0):!1}function YF(a){return this.select(bG(this.d,a),!0)}
+function VF(a,b,c){var d,e;e=YB(Xd);a=ZF(a);b=kE(($D(),eE),b,I(0),I(0)).a;b=En(b,this.b.length-1);d=this.b.length-1;c=kE(eE,c,I(d),I(d)).a;for(c=En(c,this.b.length-1);b<=c;b++)d=up(a,Ic,S(D(F,1),h,1,3,[a,vp(this.b,I(b))])),null!=d&&up(e,Kc,S(D(F,1),h,1,3,[d]));return e}function RG(a){var b=this.a;a=a.a;return b<a?-1:b>a?1:b==a?0:isNaN(b)?isNaN(a)?0:1:-1}function SG(){return A(this.a)}function QG(a){return this.a-a.a}function cH(){return 0==this.Oc()}function bH(a){return mA(this,a,!1)}
+function dH(){return this.ze(we(F,h,1,this.Oc(),3))}function eH(a){var b,c,d;d=this.Oc();a.length<d&&(a=wl(a,d));c=this.xc();for(b=0;b<d;++b)a[b]=c.Ec();a.length>d&&(a[d]=null);return a}function zH(){kB(this)}function AE(){return this.b}function vH(){return this.a.Oc()}function BH(){return this.a.Dc()}function CH(){this.a.Fc()}function BE(){return this.d}function aG(){return this.b.length}function OH(){return V(),PH(),QH}function SH(){throw new Uh;}function JH(){return this.b.Oc()}
+function TH(a){return this.b.we(a)}function VH(){return new mB(this.b.xc())}function WH(){return this.b.ye()}function XH(a){return this.b.ze(a)}function YH(){return this.b.Dc()}function ZH(){return this.b.Ec()}function $H(){throw new $G;}function dI(){throw new $G;}function GH(){throw new $G;}function UH(){return this.b.xe()}function Nr(){throw new $G;}function aI(a){return this.a.eQ(a)}function bI(){return this.a.hC()}function qI(a,b){return this.b.Ie(a,b)}function Ek(){return this.c};window.gwtOnLoad=gwtOnLoad;
+$sendStats('moduleStartup', 'moduleEvalEnd');gwtOnLoad(__gwtModuleFunction.__errFn, __gwtModuleFunction.__moduleName, __gwtModuleFunction.__moduleBase, __gwtModuleFunction.__softPermutationId,__gwtModuleFunction.__computePropValue);$sendStats('moduleStartup', 'end');$gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps);
+//# sourceURL=VaadinGrid-0.js
+
+}
+</script>
+</head>
+<body>
+</body>
+</html>
diff --git a/vaadin-grid/vaadin-grid.html b/vaadin-grid/vaadin-grid.html
new file mode 100644 (file)
index 0000000..5a545bf
--- /dev/null
@@ -0,0 +1,983 @@
+<!--
+@element v-grid
+-->
+
+<link rel='import' href='vaadin-grid-import.html'>
+<link rel='import' href='../../polymer/polymer.html'>
+
+<style>
+  v-grid > table {
+    display: none;
+  }
+</style>
+
+<!--
+Vaadin v-grid is a grid component fully configurable and customizable, plenty of features and with the mind set on performance.
+-->
+<dom-module id="v-grid">
+<style>
+  /* Functional properties */
+
+  :host {
+    white-space: nowrap;
+    -webkit-tap-highlight-color: transparent;
+    -webkit-touch-callout: none;
+    transition: opacity 200ms;
+    cursor: default;
+  }
+
+  :host(.loading) {
+    opacity: 0;
+    height: 0;
+    transition: none;
+  }
+
+  :host,
+  .v-grid-tablewrapper > table,
+  .v-grid-body,
+  .v-grid-header,
+  .v-grid-footer,
+  .v-grid-row {
+    display: block;
+    box-sizing: border-box;
+  }
+
+  .v-grid-cell {
+    display: -webkit-inline-flex;
+    display: inline-flex;
+    -webkit-align-items: center;
+    align-items: center;
+    box-sizing: border-box;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    background: #fff;
+  }
+
+  :host > div {
+    position: relative;
+    outline: none;
+  }
+
+  .v-grid-scroller {
+    position: absolute;
+    z-index: 1;
+    outline: none;
+    box-sizing: border-box;
+  }
+
+  .v-grid-scroller-horizontal {
+    left: 0;
+    right: 0;
+    bottom: 0;
+    overflow-y: hidden;
+    -ms-overflow-y: hidden;
+  }
+
+  .v-grid-scroller-vertical {
+    right: 0;
+    top: 0;
+    bottom: 0;
+    overflow-x: hidden;
+    -ms-overflow-x: hidden;
+  }
+
+  .v-grid-tablewrapper {
+    position: absolute;
+    overflow: hidden;
+    box-sizing: border-box;
+    z-index: 5;
+    outline: none;
+  }
+
+  .v-grid-header-deco,
+  .v-grid-footer-deco,
+  .v-grid-horizontal-scrollbar-deco {
+    position: absolute;
+    right: 0;
+    box-sizing: border-box;
+  }
+
+  .v-grid-header,
+  .v-grid-body,
+  .v-grid-footer {
+    position: absolute;
+    left: 0;
+    z-index: 10;
+  }
+
+  .v-grid-header,
+  .v-grid-header-deco {
+    top: 0;
+  }
+
+  .v-grid-footer,
+  .v-grid-footer-deco {
+    bottom: 0;
+  }
+
+  .v-grid-horizontal-scrollbar-deco {
+    left: 0;
+    bottom: 0;
+  }
+
+  .v-grid-body {
+    z-index: 0;
+    top: 0;
+  }
+
+  .v-grid-body .v-grid-row {
+    position: absolute;
+    top: 0;
+    left: 0;
+  }
+
+  :host(:not([selection-mode])) .v-grid-body,
+  :host([selection-mode="single"]) .v-grid-body {
+    cursor: pointer;
+  }
+
+  .v-grid-editor {
+    position: absolute;
+    z-index: 20;
+    overflow: hidden;
+    left: 0;
+    right: 0;
+    margin-top: -1px;
+  }
+
+  .v-grid-editor-cells {
+    position: relative;
+  }
+
+  .v-grid-editor-cells > div {
+    display: inline-block;
+  }
+
+  .v-grid-editor-footer {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+    box-sizing: border-box;
+  }
+
+  .v-grid-editor-message {
+    -webkit-flex: 1;
+    flex: 1;
+  }
+
+  /* Theming properties */
+
+  :host {
+    font: 400 100%/1.1 Roboto, sans-serif;
+    color: rgba(0, 0, 0, 0.83);
+  }
+
+  .v-grid-cell {
+    padding: 0 16px;
+    height: 32px;
+  }
+
+  .v-grid-header,
+  .v-grid-header-deco {
+    box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, 0.20);
+  }
+
+  .v-grid-header th {
+    background: #03A9F4;
+    color: #fff;
+    text-transform: uppercase;
+    font-weight: 600;
+    font-size: 0.8125em;
+    height: 32px;
+    border-right: 1px solid rgba(255, 255, 255, 0.3);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+  }
+
+  .v-grid-header-deco {
+    background: #03A9F4;
+    border-left: 1px solid rgba(255, 255, 255, 0.3);
+    z-index: 1;
+  }
+
+  .v-grid-header [class*="sort-"] {
+    position: relative;
+    padding-right: 32px;
+  }
+
+  .v-grid-header [class*="sort-"]:after {
+    position: absolute;
+    font-family: sans-serif;
+    content: url(sort-asc.svg) " " attr(sort-order);
+    right: 12px;
+    font-size: 12px;
+    width: 11px;
+    height: 5px;
+  }
+
+  .v-grid-header .sort-desc:after {
+    content: url(sort-desc.svg) " " attr(sort-order);
+  }
+
+  .v-grid-header [class*="sort-"][sort-order]:after {
+    right: 20px;
+  }
+
+  .v-grid-footer td,
+  .v-grid-footer-deco,
+  .v-grid-horizontal-scrollbar-deco {
+    background: #E6E6E6;
+    font-size: 0.8125em;
+    font-weight: 500;
+    color: rgba(0, 0, 0, 0.56);
+  }
+
+  .v-grid-footer td {
+    border-right: 1px solid rgba(255, 255, 255, 0.5);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+  }
+
+  .v-grid-footer-deco {
+    border-left: 1px solid rgba(255, 255, 255, 0.5);
+  }
+
+  .v-grid-horizontal-scrollbar-deco {
+    border-top: 1px solid rgba(255, 255, 255, 0.5);
+  }
+
+  .v-grid-header th:last-child,
+  .v-grid-footer td:last-child {
+    border-right: 0;
+  }
+
+  .v-grid-header tr:last-child th,
+  .v-grid-footer tr:last-child td {
+    border-bottom: 0;
+  }
+
+  /* TODO We need some other way of defining the frozen column divider than
+   using the cell, since this will affect all frozen columns, when we only
+    want to apply it to the last frozen column .*/
+  /* Double selector to increase specificity. Otherwise Polymer increases the
+   specificity of the ".v-grid-header th" more than this, and we can't
+   override the border */
+  .v-grid-cell.frozen.frozen {
+    position: relative;
+    z-index: 1;
+    border-right: 0;
+    box-shadow: 1px 0 0 0 rgba(0,0,0,0.04),
+                2px 0 0 0 rgba(0,0,0,0.04),
+                3px 0 0 0 rgba(0,0,0,0.04),
+                4px 0 0 0 rgba(0,0,0,0.04);
+  }
+
+  .v-grid-row-selected > td {
+    background-color: #f2f2f2;
+  }
+
+  .v-grid-editor {
+    background: #fff;
+    box-shadow: 0 0 0 1px rgba(0,0,0,0.15),
+                0 8px 17px 0 rgba(0,0,0,0.2),
+                0 6px 20px 0 rgba(0,0,0,0.188235);
+    margin-top: -5px;
+  }
+
+  .v-grid-editor[style*="bottom"] {
+    margin-top: 0;
+    margin-bottom: -5px;
+  }
+
+  .v-grid-editor input[type="text"],
+  .v-grid-editor input:not([type]) {
+    box-sizing: border-box;
+    width: 100%;
+    height: 100%;
+    padding: 0 0 1px;
+    font: inherit;
+    color: inherit;
+    border: 0;
+    border-bottom: 1px solid rgba(0,0,0,0.2);
+    background: transparent;
+    outline: none;
+    transition: all 200ms;
+  }
+
+  .v-grid-editor input[type="text"]:focus {
+    border-bottom: 2px solid #03A9F4;
+    padding-bottom: 0;
+  }
+
+  .v-grid-editor-cells > div {
+    box-sizing: border-box;
+    margin: 5px 0;
+    padding: 5px 16px;
+    height: 42px;
+  }
+
+  .v-grid-editor-buttons button {
+    height: 32px;
+    padding: 0 11px;
+    margin: 5px;
+    font: inherit;
+    font-size: 14px;
+    color: #03A9F4;
+    text-transform: uppercase;
+    background: transparent;
+    border: 0;
+    border-radius: 3px;
+    outline: none;
+    cursor: pointer;
+    transition: all 200ms;
+  }
+
+  .v-grid-editor-buttons button:focus {
+    box-shadow: 0 2px 6px 0 rgba(0,0,0,0.5);
+  }
+
+  .v-grid-editor-buttons button:active:focus {
+    box-shadow: none;
+  }
+
+  input[type="checkbox"] {
+    position: absolute;
+    opacity: 0;
+  }
+
+  input[type="checkbox"] + label {
+    position: relative;
+    left: 0;
+    box-sizing: border-box;
+    display: block;
+    width: 16px;
+    height: 16px;
+    border: 2px solid rgba(0,0,0,0.3);
+    border-radius: 2px;
+    cursor: pointer;
+    transition: background-color 120ms, border-color 120ms;
+  }
+
+  input[type="checkbox"]:focus {
+    outline: none;
+  }
+
+  input[type="checkbox"]:focus + label {
+    border-color: rgba(0,0,0,0.6);
+  }
+
+  input[type="checkbox"] + label:after {
+    content: url("tick.svg");
+    position: absolute;
+    top: -2px;
+    left: -2px;
+    display: block;
+    width: 16px;
+    height: 16px;
+    transition: all 200ms;
+    -webkit-transform: scale(0);
+    transform: scale(0);
+    -webkit-transform-origin: 40% 80%;
+    transform-origin: 40% 80%;
+  }
+
+  input[type="checkbox"]:checked + label {
+    background-color: #03A9F4;
+    border-color: transparent;
+  }
+
+  input[type="checkbox"]:checked + label:after {
+    -webkit-transform: scale(1);
+    transform: scale(1);
+  }
+
+  input[type="checkbox"]:indeterminate + label:after {
+    content: "–";
+    font-size: 14px;
+    text-align: center;
+    -webkit-transform: none;
+    transform: none;
+  }
+
+  /* Activation "splash" */
+  input[type="checkbox"] + label:before {
+    content: "";
+    position: absolute;
+    top: -14px;
+    left: -14px;
+    width: 40px;
+    height: 40px;
+    border-radius: 50%;
+    background: #666;
+    opacity: 0;
+    -webkit-transform: scale(0.8);
+    transform: scale(0.8);
+    transition: all 180ms cubic-bezier(0.75,.0,0.25,1);
+  }
+
+  input[type="checkbox"] + label:active:before {
+    transform: scale(1.1);
+    opacity: 0.15;
+    transition-duration: 80ms;
+    transition-property: all;
+  }
+
+  input[type="checkbox"]:checked + label:before {
+    background: #03A9F4;
+  }
+
+  /* Small adjustments for the checkbox in the header */
+
+  .v-grid-header input[type="checkbox"] + label {
+    border-color: rgba(255,255,255,0.5);
+  }
+
+  .v-grid-header input[type="checkbox"] + label:before {
+    background: #fff;
+  }
+
+  .v-grid-header input[type="checkbox"] + label:after {
+    transition: none;
+  }
+
+  /* Focus styles */
+
+  .v-grid-row-focused:after {
+    content: "";
+    position: absolute;
+    z-index: 1;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    border: 1px solid rgba(0,0,0,0.2);
+    pointer-events: none;
+    opacity: 0;
+    transition: opacity 300ms;
+  }
+
+  :focus .v-grid-row-focused:after {
+    opacity: 1;
+  }
+
+  #measure {
+    width: 100% !important;
+    height: 100% !important;
+    z-index: -1 !important;
+    pointer-events: none !important;
+    position: relative !important;
+    float: left !important;
+    margin-left: -100% !important;
+    opacity: 0 !important;
+  }
+
+  #measureobject {
+    position: absolute !important;
+    width: 100% !important;
+    height: 100% !important;
+  }
+</style>
+  <template>
+    <div id="measure" class="v-grid">
+      <object id="measureobject" class="v-grid" type="text/html"></object>
+    </div>
+    <content></content>
+  </template>
+</dom-module>
+
+<script>
+  function loadComponent() {
+    VGrid = Polymer({
+      is: "v-grid",
+
+      _grid: undefined,
+
+      properties: {
+        /**
+         * The row editor specific fields
+         *
+         * @property editor
+         * @type {Editor}
+         */
+        editor: {
+          type: Object,
+          readOnly: true,
+          value: function() {
+            var _this = this;
+            return {
+              get enabled() {
+                return _this._grid.getEditor().isEnabled();
+              },
+              set enabled(enabled) {
+                _this._grid.getEditor().setEnabled(enabled);
+                if (_this.editable !== enabled) {
+                  _this.editable = enabled;
+                }
+              },
+              get handler() {
+                return _this._grid.getEditor().getHandler();
+              },
+              set handler(handler) {
+                _this._grid.getEditor().setHandler(handler);
+              },
+              get saveButtonText() {
+                return _this._grid.getEditor().getSaveButtonText();
+              },
+              set saveButtonText(saveButtonText) {
+                _this._grid.getEditor().setSaveButtonText(saveButtonText);
+              },
+              get cancelButtonText() {
+                return _this._grid.getEditor().getSaveButtonText();
+              },
+              set cancelButtonText(cancelButtonText) {
+                _this._grid.getEditor().setCancelButtonText(cancelButtonText);
+              },
+              editRow: function(row) {
+                _this._grid.getEditor().editRow(row);
+              },
+              save: function() {
+                _this._grid.getEditor().save();
+              },
+              cancel: function() {
+                _this._grid.getEditor().cancel();
+              }
+            };
+          },
+        },
+        /**
+         * The data source object for the grid.
+         *
+         * @property data
+         * @type {Data}
+         */
+        data: {
+          type: Object,
+          readOnly: true,
+          value: function() {
+            var _this = this;
+            return {
+
+              get source() {
+                return this._source;
+              },
+              set source(source) {
+                var sourceFunction = source;
+                if (Array.isArray(source)) {
+                  sourceFunction = function(req) {
+                    var array = source.slice(req.index, req.index + req.count);
+                    req.success(array, source.length);
+                  };
+                }
+                _this._grid.setDataSource(sourceFunction);
+
+                this._source = source;
+              },
+              get sortOrder() {
+                return _this._grid.getSortOrder();
+              },
+              set sortOrder(sortOrder) {
+                _this._grid.setSortOrder(sortOrder);
+              },
+
+              clearCache: function(estimatedNewSize) {
+                _this._grid.getDataSource().clearCache(estimatedNewSize);
+              },
+
+            };
+          }
+        },
+
+        /**
+         * Object for manipulating header rows
+         *
+         * @property header
+         * @type {Header}
+         */
+        header: {
+          type: Object,
+          readOnly: true,
+          value: function() {
+            var _this = this;
+            return {
+              getCell: function(rowIndex, columnId) {
+                return _this._grid.getStaticSection().getHeaderCell(rowIndex, columnId);
+              },
+              addRow: function(rowIndex, cellContent) {
+                _this._grid.getStaticSection().addHeader(rowIndex, cellContent);
+              },
+              removeRow: function(rowIndex) {
+                _this._grid.getStaticSection().removeHeader(rowIndex);
+              },
+              setRowClassName: function(rowIndex, className) {
+                _this._grid.getStaticSection().setHeaderRowClassName(rowIndex, className);
+              },
+              get defaultRow() {
+                return _this._grid.getStaticSection().getDefaultHeader();
+              },
+              set defaultRow(rowIndex) {
+                _this._grid.getStaticSection().setDefaultHeader(rowIndex);
+              },
+              get hidden() {
+                return _this._grid.getStaticSection().isHeaderHidden();
+              },
+              set hidden(hidden) {
+                _this._grid.getStaticSection().setHeaderHidden(hidden);
+              },
+              get rowCount() {
+                return _this._grid.getStaticSection().getHeaderRowCount();
+              }
+            };
+          }
+        },
+
+        /**
+         * Object for manipulating footer rows
+         *
+         * @property footer
+         * @type {Footer}
+         */
+        footer: {
+          type: Object,
+          readOnly: true,
+          value: function() {
+            var _this = this;
+            return {
+              getCell: function(rowIndex, columnId) {
+                return _this._grid.getStaticSection().getFooterCell(rowIndex, columnId);
+              },
+              addRow: function(rowIndex, cellContent) {
+                _this._grid.getStaticSection().addFooter(rowIndex, cellContent);
+              },
+              removeRow: function(rowIndex) {
+                _this._grid.getStaticSection().removeFooter(rowIndex);
+              },
+              setRowClassName: function(rowIndex, className) {
+                _this._grid.getStaticSection().setFooterRowClassName(rowIndex, className);
+              },
+              get hidden() {
+                return _this._grid.getStaticSection().isFooterHidden();
+              },
+              set hidden(hidden) {
+                _this._grid.getStaticSection().setFooterHidden(hidden);
+              },
+              get rowCount() {
+                return _this._grid.getStaticSection().getFooterRowCount();
+              }
+            };
+          }
+        },
+
+        /**
+         * Selection model
+         *
+         * @property selection
+         * @type {Selection}
+         */
+        selection: {
+          type: Object,
+          readOnly: true,
+          value: function() {
+            var _this = this;
+            return {
+              select: function(index) {
+                _this._grid.getSelectionModel().select(index);
+
+                return _this;
+              },
+              deselect: function(index) {
+                _this._grid.getSelectionModel().deselect(index);
+
+                return _this;
+              },
+              clear: function() {
+                _this._grid.getSelectionModel().clear();
+
+                return _this;
+              },
+              selectAll: function() {
+                _this._grid.getSelectionModel().selectAll();
+
+                return _this;
+              },
+              selected: function(mapper, from, to) {
+                return _this._grid.getSelectionModel().selected(mapper, from, to);
+              },
+              deselected: function(mapper, from, to) {
+                return _this._grid.getSelectionModel().deselected(mapper, from, to);
+              },
+              get size() {
+                return _this._grid.getSelectionModel().size();
+              },
+              get mode() {
+                return _this._grid.getSelectionMode();
+              },
+              set mode(mode) {
+                _this._grid.setSelectionMode(mode);
+                _this.serializeValueToAttribute(_this.selection.mode, "selection-mode");
+              }
+            };
+          }
+        },
+      },
+
+      attributeChanged: function(name, type, value) {
+        switch (name) {
+          case 'disabled':
+            this.disabled = typeof value == "string";
+            break;
+          case 'editable':
+            this.editable = typeof value == "string";
+            break;
+          case 'style':
+            this._grid.redraw();
+            break;
+          case 'selection-mode':
+            this.selection.mode = value;
+            break;
+          default:
+            this[Polymer.CaseMap.dashToCamelCase(name)] = value;
+        }
+      },
+
+      listeners: {
+        /**
+         * @event sort
+         */
+        /**
+         * @event select
+         */
+        /**
+         * @event selectionmodechange
+         */
+        'selectionmodechange': 'onSelectionModeChange'
+      },
+
+      onSelectionModeChange: function() {
+        this.serializeValueToAttribute(this.selection.mode, "selection-mode");
+      },
+
+      created: function() {
+        this._grid = new vaadin.GridComponent();
+      },
+
+      ready: function() {
+        var _this = this;
+        setTimeout(function() {
+          for (var i = 0; i < _this.attributes.length; i++) {
+            _this.attributeChanged(_this.attributes[i].nodeName, null, _this.attributes[i].nodeValue);
+          }
+        }, 1);
+
+      },
+
+      _bindResizeListener: function() {
+        var _this = this;
+        this.$.measureobject.addEventListener("load", function() {
+          this.contentDocument.defaultView.addEventListener('resize', function(e) {
+            _this._grid.redraw();
+          });
+
+          _this.then(function() {
+            // ...because one then just isn't enough.
+            _this.then(function() {
+              _this._grid.redraw();
+            });
+          });
+        });
+        this.$.measureobject.data = "about:blank";
+      },
+
+      attached: function() {
+        var _this = this;
+        this._grid.attached(this, Polymer.dom(this).querySelector("table"), Polymer.dom(this.root));
+        this._bindResizeListener();
+
+        // hide until fully loaded
+        this.toggleClass('loading', true);
+        this.then(function() {
+          _this.toggleClass('loading', false);
+        });
+      },
+
+      /**
+       * Scrolls to a certain row, using user-specified scroll destination.
+       * Since its asynchronous nature, this method returns a 'thenable'
+       * so as you can use the 'then()' method to be notified when the data
+       * request finished and the scroll is actually moved.
+       *
+       * @method scrollToRow
+       * @param {number} index - zero-based index of the row to scroll to.
+       * @param {string} scrollDestination - desired destination placement of scrolled-to-row.
+       */
+      scrollToRow: function(index, scrollDestination) {
+        this._grid.scrollToRow(index, scrollDestination);
+        return this;
+      },
+
+      /**
+       * Scrolls to the beginning of the very first row.
+       * Since its asynchronous nature, this method returns a 'thenable'
+       * so as you can use the 'then()' method to be notified when the data
+       * request finished and the scroll is actually moved.
+       *
+       * @method scrollToStart
+       */
+      scrollToStart: function() {
+        this._grid.scrollToStart();
+        return this;
+      },
+
+      /**
+       * Scrolls to the end of the very last row.
+       * Since its asynchronous nature, this method returns a 'thenable'
+       * so as you can use the 'then()' method to be notified when the data
+       * request finished and the scroll is actually moved.
+       *
+       * @method scrollToEnd
+       */
+      scrollToEnd: function() {
+        this._grid.scrollToEnd();
+        return this;
+      },
+
+      /**
+       * Adds new column
+       *
+       * @method addColumn
+       * @param {Column} column
+       * @param {string} beforeColumn
+       */
+      addColumn: function(column, beforeColumn) {
+        this._grid.addColumn(column, beforeColumn);
+      },
+
+      /**
+       * Removes column with certain id
+       *
+       * @method removeColumn
+       * @param {string} id
+       */
+      removeColumn: function(id) {
+        this._grid.removeColumn(id);
+      },
+
+      /**
+       * Sets the style generator that is used for generating styles for rows.
+       *
+       * @attribute rowClassGenerator
+       * @type object
+       */
+      get rowClassGenerator() {
+        return this._grid.getRowClassGenerator();
+      },
+      set rowClassGenerator(rowClassGenerator) {
+        this._grid.setRowClassGenerator(rowClassGenerator);
+      },
+      /**
+       * Sets the style generator that is used for generating styles for cells.
+       *
+       * @attribute cellClassGenerator
+       * @type object
+       */
+      get cellClassGenerator() {
+        return this._grid.getCellClassGenerator();
+      },
+      set cellClassGenerator(cellClassGenerator) {
+        this._grid.setCellClassGenerator(cellClassGenerator);
+      },
+      /**
+       * Disables the grid functionality.
+       *
+       * @attribute disabled
+       * @type boolean
+       */
+      get disabled() {
+        return this._grid.isDisabled();
+      },
+      set disabled(disabled) {
+        this._grid.setDisabled(disabled);
+        this.reflectPropertyToAttribute("disabled");
+      },
+      /**
+       * Enables the row editor feature (double click/tap or or Enter key in a content row activates the editing mode)
+       *
+       * @attribute editable
+       * @type boolean
+       */
+      get editable() {
+        return this.editor.enabled;
+      },
+      set editable(editable) {
+        this.editor.enabled = editable;
+        this.reflectPropertyToAttribute("editable");
+      },
+      /**
+       * Sets the number of frozen columns in this grid. Setting the count to 0
+       * means that no data columns will be frozen, but the built-in selection
+       * checkbox column will still be frozen if it's in use. Setting the count to
+       * -1 will also disable the selection column.
+       *
+       * @attribute frozen-columns
+       * @type Number
+       */
+      get frozenColumns() {
+        return this._grid.getFrozenColumns();
+      },
+      set frozenColumns(frozenColumns) {
+        this._grid.setFrozenColumns(frozenColumns);
+        this.reflectPropertyToAttribute("frozenColumns");
+      },
+      /**
+       * Declares the number of visible rows in the grid. Implicitly sets the height
+       * in the inline style, overriding any previous height. Setting style.height
+       * in this case should be ignored if possible.
+       *
+       * @attribute rows
+       * @type Number
+       */
+      get rows() {
+        return this._grid.getRows();
+      },
+      set rows(rows) {
+        this._grid.setRows(rows);
+        this.reflectPropertyToAttribute("rows");
+      },
+      /**
+       * The columns array
+       *
+       * @property columns
+       * @type {Array<Column>}
+       */
+      get columns() {
+        return this._grid.getColumns();
+      },
+      set columns(cols) {
+        this._grid.setColumns(cols);
+      },
+      /**
+       * Executes a callback when the grid has finished any pending work.
+       *
+       * @method them
+       * @param {Function} callback
+       * @return a chainable promise
+       */
+      then: function(cb) {
+        return this._grid.then(cb);
+      }
+    }); // End Polymer prototype
+
+    // Give some time to gwt async processes to run (we need this in FF)
+    setTimeout(function() {
+      vaadin._v_grid_ready = true;
+      document.dispatchEvent(new CustomEvent('v-grid-ready'));
+    }, 5);
+
+  } // End loadComponent function
+
+  if (window.vaadin && window.vaadin.GridComponent) {
+    loadComponent();
+  } else {
+    document.addEventListener("v-grid-loaded", function() {
+      loadComponent();
+    });
+  }
+</script>
diff --git a/vaadin-grid/vaadin-grid.html.orig b/vaadin-grid/vaadin-grid.html.orig
new file mode 100644 (file)
index 0000000..3e15627
--- /dev/null
@@ -0,0 +1,993 @@
+<!--
+@element v-grid
+-->
+
+<link rel='import' href='vaadin-grid-import.html'>
+<link rel='import' href='../../bower_components/polymer/polymer.html'>
+
+<style>
+  v-grid > table {
+    display: none;
+  }
+</style>
+
+<dom-module id="v-grid">
+<style>
+  /* Functional properties */
+
+  :host {
+    white-space: nowrap;
+    -webkit-tap-highlight-color: transparent;
+    -webkit-touch-callout: none;
+    transition: opacity 200ms;
+    cursor: default;
+  }
+
+  :host(.loading) {
+    opacity: 0;
+    height: 0;
+    transition: none;
+  }
+
+  :host,
+  .v-grid-tablewrapper > table,
+  .v-grid-body,
+  .v-grid-header,
+  .v-grid-footer,
+  .v-grid-row {
+    display: block;
+    box-sizing: border-box;
+  }
+
+  .v-grid-cell {
+    display: -webkit-inline-flex;
+    display: inline-flex;
+    -webkit-align-items: center;
+    align-items: center;
+    box-sizing: border-box;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    background: #fff;
+  }
+
+  :host > div {
+    position: relative;
+    outline: none;
+  }
+
+  .v-grid-scroller {
+    position: absolute;
+    z-index: 1;
+    outline: none;
+    box-sizing: border-box;
+  }
+
+  .v-grid-scroller-horizontal {
+    left: 0;
+    right: 0;
+    bottom: 0;
+    overflow-y: hidden;
+    -ms-overflow-y: hidden;
+  }
+
+  .v-grid-scroller-vertical {
+    right: 0;
+    top: 0;
+    bottom: 0;
+    overflow-x: hidden;
+    -ms-overflow-x: hidden;
+  }
+
+  .v-grid-tablewrapper {
+    position: absolute;
+    overflow: hidden;
+    box-sizing: border-box;
+    z-index: 5;
+    outline: none;
+  }
+
+  .v-grid-header-deco,
+  .v-grid-footer-deco,
+  .v-grid-horizontal-scrollbar-deco {
+    position: absolute;
+    right: 0;
+    box-sizing: border-box;
+  }
+
+  .v-grid-header,
+  .v-grid-body,
+  .v-grid-footer {
+    position: absolute;
+    left: 0;
+    z-index: 10;
+  }
+
+  .v-grid-header,
+  .v-grid-header-deco {
+    top: 0;
+  }
+
+  .v-grid-footer,
+  .v-grid-footer-deco {
+    bottom: 0;
+  }
+
+  .v-grid-horizontal-scrollbar-deco {
+    left: 0;
+    bottom: 0;
+  }
+
+  .v-grid-body {
+    z-index: 0;
+    top: 0;
+  }
+
+  .v-grid-body .v-grid-row {
+    position: absolute;
+    top: 0;
+    left: 0;
+  }
+
+  :host(:not([selection-mode])) .v-grid-body,
+  :host([selection-mode="single"]) .v-grid-body {
+    cursor: pointer;
+  }
+
+  .v-grid-editor {
+    position: absolute;
+    z-index: 20;
+    overflow: hidden;
+    left: 0;
+    right: 0;
+    margin-top: -1px;
+  }
+
+  .v-grid-editor-cells {
+    position: relative;
+  }
+
+  .v-grid-editor-cells > div {
+    display: inline-block;
+  }
+
+  .v-grid-editor-footer {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+    box-sizing: border-box;
+  }
+
+  .v-grid-editor-message {
+    -webkit-flex: 1;
+    flex: 1;
+  }
+
+  /* Theming properties */
+
+  :host {
+    font: 400 100%/1.1 Roboto, sans-serif;
+    color: rgba(0, 0, 0, 0.83);
+  }
+
+  .v-grid-cell {
+    padding: 0 16px;
+    height: 32px;
+  }
+
+  .v-grid-header,
+  .v-grid-header-deco {
+    box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, 0.20);
+  }
+
+  .v-grid-header th {
+    background: #03A9F4;
+    color: #fff;
+    text-transform: uppercase;
+    font-weight: 600;
+    font-size: 0.8125em;
+    height: 32px;
+    border-right: 1px solid rgba(255, 255, 255, 0.3);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+  }
+
+  .v-grid-header-deco {
+    background: #03A9F4;
+    border-left: 1px solid rgba(255, 255, 255, 0.3);
+    z-index: 1;
+  }
+
+  .v-grid-header [class*="sort-"] {
+    position: relative;
+    padding-right: 32px;
+  }
+
+  .v-grid-header [class*="sort-"]:after {
+    position: absolute;
+    font-family: sans-serif;
+    content: url(sort-asc.svg) " " attr(sort-order);
+    right: 12px;
+    font-size: 12px;
+    width: 11px;
+    height: 5px;
+  }
+
+  .v-grid-header .sort-desc:after {
+    content: url(sort-desc.svg) " " attr(sort-order);
+  }
+
+  .v-grid-header [class*="sort-"][sort-order]:after {
+    right: 20px;
+  }
+
+  .v-grid-footer td,
+  .v-grid-footer-deco,
+  .v-grid-horizontal-scrollbar-deco {
+    background: #E6E6E6;
+    font-size: 0.8125em;
+    font-weight: 500;
+    color: rgba(0, 0, 0, 0.56);
+  }
+
+  .v-grid-footer td {
+    border-right: 1px solid rgba(255, 255, 255, 0.5);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+  }
+
+  .v-grid-footer-deco {
+    border-left: 1px solid rgba(255, 255, 255, 0.5);
+  }
+
+  .v-grid-horizontal-scrollbar-deco {
+    border-top: 1px solid rgba(255, 255, 255, 0.5);
+  }
+
+  .v-grid-header th:last-child,
+  .v-grid-footer td:last-child {
+    border-right: 0;
+  }
+
+  .v-grid-header tr:last-child th,
+  .v-grid-footer tr:last-child td {
+    border-bottom: 0;
+  }
+
+  /* TODO We need some other way of defining the frozen column divider than
+   using the cell, since this will affect all frozen columns, when we only
+    want to apply it to the last frozen column .*/
+  /* Double selector to increase specificity. Otherwise Polymer increases the
+   specificity of the ".v-grid-header th" more than this, and we can't
+   override the border */
+  .v-grid-cell.frozen.frozen {
+    position: relative;
+    z-index: 1;
+    border-right: 0;
+    box-shadow: 1px 0 0 0 rgba(0,0,0,0.04),
+                2px 0 0 0 rgba(0,0,0,0.04),
+                3px 0 0 0 rgba(0,0,0,0.04),
+                4px 0 0 0 rgba(0,0,0,0.04);
+  }
+
+  .v-grid-row-selected > td {
+    background-color: #f2f2f2;
+  }
+
+  .v-grid-editor {
+    background: #fff;
+    box-shadow: 0 0 0 1px rgba(0,0,0,0.15),
+                0 8px 17px 0 rgba(0,0,0,0.2),
+                0 6px 20px 0 rgba(0,0,0,0.188235);
+    margin-top: -5px;
+  }
+
+  .v-grid-editor[style*="bottom"] {
+    margin-top: 0;
+    margin-bottom: -5px;
+  }
+
+  .v-grid-editor input[type="text"],
+  .v-grid-editor input:not([type]) {
+    box-sizing: border-box;
+    width: 100%;
+    height: 100%;
+    padding: 0 0 1px;
+    font: inherit;
+    color: inherit;
+    border: 0;
+    border-bottom: 1px solid rgba(0,0,0,0.2);
+    background: transparent;
+    outline: none;
+    transition: all 200ms;
+  }
+
+  .v-grid-editor input[type="text"]:focus {
+    border-bottom: 2px solid #03A9F4;
+    padding-bottom: 0;
+  }
+
+  .v-grid-editor-cells > div {
+    box-sizing: border-box;
+    margin: 5px 0;
+    padding: 5px 16px;
+    height: 42px;
+  }
+
+  .v-grid-editor-buttons button {
+    height: 32px;
+    padding: 0 11px;
+    margin: 5px;
+    font: inherit;
+    font-size: 14px;
+    color: #03A9F4;
+    text-transform: uppercase;
+    background: transparent;
+    border: 0;
+    border-radius: 3px;
+    outline: none;
+    cursor: pointer;
+    transition: all 200ms;
+  }
+
+  .v-grid-editor-buttons button:focus {
+    box-shadow: 0 2px 6px 0 rgba(0,0,0,0.5);
+  }
+
+  .v-grid-editor-buttons button:active:focus {
+    box-shadow: none;
+  }
+
+  input[type="checkbox"] {
+    position: absolute;
+    opacity: 0;
+  }
+
+  input[type="checkbox"] + label {
+    position: relative;
+    left: 0;
+    box-sizing: border-box;
+    display: block;
+    width: 16px;
+    height: 16px;
+    border: 2px solid rgba(0,0,0,0.3);
+    border-radius: 2px;
+    cursor: pointer;
+    transition: background-color 120ms, border-color 120ms;
+  }
+
+  input[type="checkbox"]:focus {
+    outline: none;
+  }
+
+  input[type="checkbox"]:focus + label {
+    border-color: rgba(0,0,0,0.6);
+  }
+
+  input[type="checkbox"] + label:after {
+    content: url("tick.svg");
+    position: absolute;
+    top: -2px;
+    left: -2px;
+    display: block;
+    width: 16px;
+    height: 16px;
+    transition: all 200ms;
+    -webkit-transform: scale(0);
+    transform: scale(0);
+    -webkit-transform-origin: 40% 80%;
+    transform-origin: 40% 80%;
+  }
+
+  input[type="checkbox"]:checked + label {
+    background-color: #03A9F4;
+    border-color: transparent;
+  }
+
+  input[type="checkbox"]:checked + label:after {
+    -webkit-transform: scale(1);
+    transform: scale(1);
+  }
+
+  input[type="checkbox"]:indeterminate + label:after {
+    content: "–";
+    font-size: 14px;
+    text-align: center;
+    -webkit-transform: none;
+    transform: none;
+  }
+
+  /* Activation "splash" */
+  input[type="checkbox"] + label:before {
+    content: "";
+    position: absolute;
+    top: -14px;
+    left: -14px;
+    width: 40px;
+    height: 40px;
+    border-radius: 50%;
+    background: #666;
+    opacity: 0;
+    -webkit-transform: scale(0.8);
+    transform: scale(0.8);
+    transition: all 180ms cubic-bezier(0.75,.0,0.25,1);
+  }
+
+  input[type="checkbox"] + label:active:before {
+    transform: scale(1.1);
+    opacity: 0.15;
+    transition-duration: 80ms;
+    transition-property: all;
+  }
+
+  input[type="checkbox"]:checked + label:before {
+    background: #03A9F4;
+  }
+
+  /* Small adjustments for the checkbox in the header */
+
+  .v-grid-header input[type="checkbox"] + label {
+    border-color: rgba(255,255,255,0.5);
+  }
+
+  .v-grid-header input[type="checkbox"] + label:before {
+    background: #fff;
+  }
+
+  .v-grid-header input[type="checkbox"] + label:after {
+    transition: none;
+  }
+
+  /* Focus styles */
+
+  .v-grid-row-focused:before {
+    content: "";
+    position: absolute;
+    z-index: 1;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    border: 1px solid rgba(0,0,0,0.2);
+    pointer-events: none;
+    opacity: 0;
+    transition: opacity 300ms;
+  }
+
+  :focus .v-grid-row-focused:before {
+    opacity: 1;
+  }
+
+  #measure {
+    width: 100% !important;
+    height: 100% !important;
+    z-index: -1 !important;
+    pointer-events: none !important;
+    position: relative !important;
+    float: left !important;
+    margin-left: -100% !important;
+    opacity: 0 !important;
+  }
+
+  #measureobject {
+    position: absolute !important;
+    width: 100% !important;
+    height: 100% !important;
+  }
+</style>
+  <template>
+    <div id="measure" class="v-grid">
+      <object id="measureobject" class="v-grid" type="text/html"></object>
+    </div>
+    <content></content>
+  </template>
+</dom-module>
+
+<script>
+  function loadComponent() {
+    VGrid = Polymer({
+      is: "v-grid",
+
+      _grid: undefined,
+
+      properties: {
+        /**
+         * The row editor specific fields
+         *
+         * @property editor
+         * @type Object
+         */
+        editor: {
+          type: Object,
+          value: function() {
+            var _this = this;
+            return {
+              get enabled() {
+                return _this._grid.getEditor().isEnabled();
+              },
+              set enabled(enabled) {
+                _this._grid.getEditor().setEnabled(enabled);
+                if (_this.editable !== enabled) {
+                  _this.editable = enabled;
+                }
+              },
+              get handler() {
+                return _this._grid.getEditor().getHandler();
+              },
+              set handler(handler) {
+                _this._grid.getEditor().setHandler(handler);
+              },
+              get saveButtonText() {
+                return _this._grid.getEditor().getSaveButtonText();
+              },
+              set saveButtonText(saveButtonText) {
+                _this._grid.getEditor().setSaveButtonText(saveButtonText);
+              },
+              get cancelButtonText() {
+                return _this._grid.getEditor().getSaveButtonText();
+              },
+              set cancelButtonText(cancelButtonText) {
+                _this._grid.getEditor().setCancelButtonText(cancelButtonText);
+              },
+              editRow: function(row) {
+                _this._grid.getEditor().editRow(row);
+              },
+              save: function() {
+                _this._grid.getEditor().save();
+              },
+              cancel: function() {
+                _this._grid.getEditor().cancel();
+              }
+            };
+          },
+        },
+        /**
+         * The data source object for the grid.
+         *
+         * @property data
+         * @type Object
+         */
+        data: {
+          type: Object,
+          value: function() {
+            var _this = this;
+            return {
+
+              get source() {
+                return this._source;
+              },
+              set source(source) {
+                var sourceFunction = source;
+                if (Array.isArray(source)) {
+                  sourceFunction = function(req) {
+                    var array = source.slice(req.index, req.index + req.count);
+                    req.success(array, source.length);
+                  };
+                }
+                _this._grid.setDataSource(sourceFunction);
+
+                this._source = source;
+              },
+              /**
+               * Sets the sort order to use. Setting this causes the Grid to re-sort
+               * itself. If set to null, the sort order is cleared.
+               *
+               * @attribute sortOrder
+               * @type array
+               */
+              get sortOrder() {
+                return _this._grid.getSortOrder();
+              },
+              set sortOrder(sortOrder) {
+                _this._grid.setSortOrder(sortOrder);
+              },
+
+              clearCache: function(estimatedNewSize) {
+                _this._grid.getDataSource().clearCache(estimatedNewSize);
+              },
+
+            };
+          }
+        },
+
+        /**
+         * Object for manipulating header rows
+         *
+         * @property header
+         * @type Object
+         */
+        header: {
+          type: Object,
+          value: function() {
+            var _this = this;
+            return {
+              getCell: function(rowIndex, columnId) {
+                return _this._grid.getStaticSection().getHeaderCell(rowIndex, columnId);
+              },
+              addRow: function(rowIndex, cellContent) {
+                _this._grid.getStaticSection().addHeader(rowIndex, cellContent);
+              },
+              removeRow: function(rowIndex) {
+                _this._grid.getStaticSection().removeHeader(rowIndex);
+              },
+              setRowClassName: function(rowIndex, className) {
+                _this._grid.getStaticSection().setHeaderRowClassName(rowIndex, className);
+              },
+              /**
+               * Sets the default row of the header. The default row is a special header
+               * row providing a user interface for sorting columns.
+               *
+               * @attribute rowIndex
+               * @type number
+               */
+              get defaultRow() {
+                return _this._grid.getStaticSection().getDefaultHeader();
+              },
+              set defaultRow(rowIndex) {
+                _this._grid.getStaticSection().setDefaultHeader(rowIndex);
+              },
+              get hidden() {
+                return _this._grid.getStaticSection().isHeaderHidden();
+              },
+              set hidden(hidden) {
+                _this._grid.getStaticSection().setHeaderHidden(hidden);
+              },
+              get rowCount() {
+                return _this._grid.getStaticSection().getHeaderRowCount();
+              }
+            };
+          }
+        },
+
+        /**
+         * Object for manipulating footer rows
+         *
+         * @property footer
+         * @type Object
+         */
+        footer: {
+          type: Object,
+          value: function() {
+            var _this = this;
+            return {
+              getCell: function(rowIndex, columnId) {
+                return _this._grid.getStaticSection().getFooterCell(rowIndex, columnId);
+              },
+              addRow: function(rowIndex, cellContent) {
+                _this._grid.getStaticSection().addFooter(rowIndex, cellContent);
+              },
+              removeRow: function(rowIndex) {
+                _this._grid.getStaticSection().removeFooter(rowIndex);
+              },
+              setRowClassName: function(rowIndex, className) {
+                _this._grid.getStaticSection().setFooterRowClassName(rowIndex, className);
+              },
+              get hidden() {
+                return _this._grid.getStaticSection().isFooterHidden();
+              },
+              set hidden(hidden) {
+                _this._grid.getStaticSection().setFooterHidden(hidden);
+              },
+              get rowCount() {
+                return _this._grid.getStaticSection().getFooterRowCount();
+              }
+            };
+          }
+        },
+
+        selection: {
+          type: Object,
+          value: function() {
+            var _this = this;
+            return {
+              select: function(index) {
+                _this._grid.getSelectionModel().select(index);
+
+                return _this;
+              },
+              deselect: function(index) {
+                _this._grid.getSelectionModel().deselect(index);
+
+                return _this;
+              },
+              clear: function() {
+                _this._grid.getSelectionModel().clear();
+
+                return _this;
+              },
+              selectAll: function() {
+                _this._grid.getSelectionModel().selectAll();
+
+                return _this;
+              },
+              selected: function(mapper, from, to) {
+                return _this._grid.getSelectionModel().selected(mapper, from, to);
+              },
+              deselected: function(mapper, from, to) {
+                return _this._grid.getSelectionModel().deselected(mapper, from, to);
+              },
+              get size() {
+                return _this._grid.getSelectionModel().size();
+              },
+              get mode() {
+                return _this._grid.getSelectionMode();
+              },
+              set mode(mode) {
+                _this._grid.setSelectionMode(mode);
+                _this.serializeValueToAttribute(_this.selection.mode, "selection-mode");
+              }
+            };
+          }
+        },
+      },
+
+      attributeChanged: function(name, type, value) {
+        switch (name) {
+          case 'disabled':
+            this.disabled = typeof value == "string";
+            break;
+          case 'editable':
+            this.editable = typeof value == "string";
+            break;
+          case 'style':
+            this._grid.redraw();
+            break;
+          case 'selection-mode':
+            this.selection.mode = value;
+            break;
+          default:
+            this[Polymer.CaseMap.dashToCamelCase(name)] = value;
+        }
+      },
+
+      listeners: {
+        /**
+         * @event sort
+         */
+        /**
+         * @event select
+         */
+        'select': 'onSelect'
+      },
+
+      onSelect: function() {
+        this.serializeValueToAttribute(this.selection.mode, "selection-mode");
+      },
+
+      created: function() {
+        this._grid = new vaadin.GridComponent();
+      },
+
+      ready: function() {
+        var _this = this;
+
+        // Set read-only properties
+        ["data", "editor", "header", "footer"].forEach(function(prop) {
+          Object.defineProperty(_this, prop, {
+            writable: false
+          });
+        });
+        setTimeout(function() {
+          for (var i = 0; i < _this.attributes.length; i++) {
+            _this.attributeChanged(_this.attributes[i].nodeName, null, _this.attributes[i].nodeValue);
+          }
+        }, 1);
+
+<<<<<<< Updated upstream
+        this._bindResizeListener();
+=======
+        this.columns = _this._grid.getColumns();
+
+>>>>>>> Stashed changes
+      },
+
+      _bindResizeListener: function() {
+        var _this = this;
+        this.$.measureobject.addEventListener("load", function() {
+          this.contentDocument.defaultView.addEventListener('resize', function(e) {
+            _this._grid.redraw();
+          });
+
+          _this.then(function() {
+            // ...because one then just isn't enough.
+            _this.then(function() {
+              _this._grid.redraw();
+            });
+          });
+        });
+        this.$.measureobject.data = "about:blank";
+      },
+
+      attached: function() {
+        var _this = this;
+        _this._grid.attached(this, Polymer.dom(this).querySelector("table"), Polymer.dom(this.root));
+        this._bindResizeListener();
+
+        // hide until fully loaded
+        _this.toggleClass('loading', true);
+        _this.then(function() {
+          _this.toggleClass('loading', false);
+        });
+      },
+
+      /**
+       * Scrolls to a certain row, using user-specified scroll destination.
+       * Since its asynchronous nature, this method returns a 'thenable'
+       * so as you can use the 'then()' method to be notified when the data
+       * request finished and the scroll is actually moved.
+       *
+       * @method scrollToRow
+       * @param {number} index - zero-based index of the row to scroll to.
+       * @param {string} scrollDestination - desired destination placement of scrolled-to-row.
+       */
+      scrollToRow: function(index, scrollDestination) {
+        this._grid.scrollToRow(index, scrollDestination);
+        return this;
+      },
+
+      /**
+       * Scrolls to the beginning of the very first row.
+       * Since its asynchronous nature, this method returns a 'thenable'
+       * so as you can use the 'then()' method to be notified when the data
+       * request finished and the scroll is actually moved.
+       *
+       * @method scrollToStart
+       */
+      scrollToStart: function() {
+        this._grid.scrollToStart();
+        return this;
+      },
+
+      /**
+       * Scrolls to the end of the very last row.
+       * Since its asynchronous nature, this method returns a 'thenable'
+       * so as you can use the 'then()' method to be notified when the data
+       * request finished and the scroll is actually moved.
+       *
+       * @method scrollToEnd
+       */
+      scrollToEnd: function() {
+        this._grid.scrollToEnd();
+        return this;
+      },
+
+      /**
+       * Adds new column
+       *
+       * @method addColumn
+       * @param {Object} column
+       * @param {string} beforeColumn
+       */
+      addColumn: function(column, beforeColumn) {
+        this._grid.addColumn(column, beforeColumn);
+      },
+
+      /**
+       * Removes column with certain id
+       *
+       * @method removeColumn
+       * @param {string} id
+       */
+      removeColumn: function(id) {
+        this._grid.removeColumn(id);
+      },
+
+      /**
+       * Sets the style generator that is used for generating styles for rows.
+       *
+       * @attribute rowClassGenerator
+       * @type object
+       */
+      get rowClassGenerator() {
+        return this._grid.getRowClassGenerator();
+      },
+      set rowClassGenerator(rowClassGenerator) {
+        this._grid.setRowClassGenerator(rowClassGenerator);
+      },
+      /**
+       * Sets the style generator that is used for generating styles for cells.
+       *
+       * @attribute cellClassGenerator
+       * @type object
+       */
+      get cellClassGenerator() {
+        return this._grid.getCellClassGenerator();
+      },
+      set cellClassGenerator(cellClassGenerator) {
+        this._grid.setCellClassGenerator(cellClassGenerator);
+      },
+      /**
+       * Disables the grid functionality.
+       *
+       * @attribute disabled
+       * @type boolean
+       */
+      get disabled() {
+        return this._grid.isDisabled();
+      },
+      set disabled(disabled) {
+        this._grid.setDisabled(disabled);
+        this.reflectPropertyToAttribute("disabled");
+      },
+      /**
+       * Enables the row editor feature (double click/tap or or Enter key in a content row activates the editing mode)
+       *
+       * @attribute editable
+       * @type boolean
+       */
+      get editable() {
+        return this.editor.enabled;
+      },
+      set editable(editable) {
+        this.editor.enabled = editable;
+        this.reflectPropertyToAttribute("editable");
+      },
+      /**
+       * Sets the number of frozen columns in this grid. Setting the count to 0
+       * means that no data columns will be frozen, but the built-in selection
+       * checkbox column will still be frozen if it's in use. Setting the count to
+       * -1 will also disable the selection column.
+       *
+       * @attribute frozen-columns
+       * @type Number
+       */
+      get frozenColumns() {
+        return this._grid.getFrozenColumns();
+      },
+      set frozenColumns(frozenColumns) {
+        this._grid.setFrozenColumns(frozenColumns);
+        this.reflectPropertyToAttribute("frozenColumns");
+      },
+      /**
+       * Declares the number of visible rows in the grid. Implicitly sets the height
+       * in the inline style, overriding any previous height. Setting style.height
+       * in this case should be ignored if possible.
+       *
+       * @attribute rows
+       * @type Number
+       */
+      get rows() {
+        return this._grid.getRows();
+      },
+      set rows(rows) {
+        this._grid.setRows(rows);
+        this.reflectPropertyToAttribute("rows");
+      },
+      /**
+       * The columns array
+       *
+       * @property columns
+       * @type array
+       */
+      get columns() {
+        return this._grid.getColumns();
+      },
+      set columns(cols) {
+        this._grid.setColumns(cols);
+      },
+      /**
+       * Executes a callback when the grid has finished any pending work.
+       *
+       * @method them
+       * @param {Function} callback
+       * @return a chainable promise
+       */
+      then: function(cb) {
+        return this._grid.then(cb);
+      }
+    }); // End Polymer prototype
+
+    // Give some time to gwt async processes to run (we need this in FF)
+    setTimeout(function() {
+      vaadin._v_grid_ready = true;
+      document.dispatchEvent(new CustomEvent('v-grid-ready'));
+    }, 5);
+
+  } // End loadComponent function
+
+  if (window.vaadin && window.vaadin.GridComponent) {
+    loadComponent();
+  } else {
+    document.addEventListener("v-grid-loaded", function() {
+      loadComponent();
+    });
+  }
+</script>