<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168521] trunk/PerformanceTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168521">168521</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-08 23:01:06 -0700 (Thu, 08 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>DYEBench should use TodoMVC to test FlightJS for consistency
https://bugs.webkit.org/show_bug.cgi?id=132727

Reviewed by Andreas Kling.

Add a test suite for the FlightJS version of TodoMVC, and disable FlightJS-MailClient by default.

I initially intended to include a wider variety of demo apps in DYEBench
but that's not happening any time soon so let us use TodoMVC for all frameworks for now.

We can add more demo apps in v2.

* DoYouEvenBench/Full.html: Increment the version to 0.10.
* DoYouEvenBench/InteractiveRunner.html: Don't check disabled suites by default.
* DoYouEvenBench/resources/tests.js:
* DoYouEvenBench/resources/todomvc/dependency-examples: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js: Added.
* DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchFullhtml">trunk/PerformanceTests/DoYouEvenBench/Full.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchInteractiveRunnerhtml">trunk/PerformanceTests/DoYouEvenBench/InteractiveRunner.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestestsjs">trunk/PerformanceTests/DoYouEvenBench/resources/tests.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/</li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightgitignore">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightjshintrc">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/</li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsappjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsdatastatsjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsdatatodosjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsmainjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsstorejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuimain_selectorjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuinew_itemjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuistatsjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuitodo_listjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuitoggle_alljs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuiwith_filtersjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsutilsjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightapptemplatesstatshtml">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightapptemplatestodohtml">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbowerjson">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/</li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsdepotdepotjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentses5shimes5shamjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentses5shimes5shimjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/</li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibadvicejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibbasejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibcomponentjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibcomposejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibdebugjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibindexjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibloggerjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibregistryjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibutilsjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsjqueryjqueryjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsrequirejsrequirejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsrequirejstexttextjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentstodomvccommonbasecss">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentstodomvccommonbasejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentstodomvccommonbgpng">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightindexhtml">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightkarmaconfjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightpackagejson">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightreadmemd">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestjshintrc">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestfixturefooterhtml">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestfixturenew_todohtml">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestfixturetoggle_allhtml">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestmockdatastorejs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/</li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecdatastats_specjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecdatatodos_specjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js</a></li>
<li>trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/</li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecuinew_item_specjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecuistats_specjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecuitoggle_all_specjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js</a></li>
<li><a href="#trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttesttestmainjs">trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (168520 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2014-05-09 05:32:36 UTC (rev 168520)
+++ trunk/PerformanceTests/ChangeLog        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -1,3 +1,93 @@
</span><ins>+2014-05-08  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        DYEBench should use TodoMVC to test FlightJS for consistency
+        https://bugs.webkit.org/show_bug.cgi?id=132727
+
+        Reviewed by Andreas Kling.
+
+        Add a test suite for the FlightJS version of TodoMVC, and disable FlightJS-MailClient by default.
+
+        I initially intended to include a wider variety of demo apps in DYEBench
+        but that's not happening any time soon so let us use TodoMVC for all frameworks for now.
+
+        We can add more demo apps in v2.
+
+        * DoYouEvenBench/Full.html: Increment the version to 0.10.
+        * DoYouEvenBench/InteractiveRunner.html: Don't check disabled suites by default.
+        * DoYouEvenBench/resources/tests.js:
+        * DoYouEvenBench/resources/todomvc/dependency-examples: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js: Added.
+        * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js: Added.
+
</ins><span class="cx"> 2014-05-07  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Grid Layout] Remove runtime feature
</span></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchFullhtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/DoYouEvenBench/Full.html (168520 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/Full.html        2014-05-09 05:32:36 UTC (rev 168520)
+++ trunk/PerformanceTests/DoYouEvenBench/Full.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;title&gt;DoYouEvenBench v0.9&lt;/title&gt;
</del><ins>+&lt;title&gt;DoYouEvenBench v0.10&lt;/title&gt;
</ins><span class="cx"> &lt;style type=&quot;text/css&quot;&gt;
</span><span class="cx"> caption { margin: 0; padding: 0; font-family: sans-serif; font-size: 1em; font-weight: bold; white-space: nowrap; }
</span><span class="cx"> #progressContainer { padding: 605px 0 10px 0; width: 800px; }
</span></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchInteractiveRunnerhtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/DoYouEvenBench/InteractiveRunner.html (168520 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/InteractiveRunner.html        2014-05-09 05:32:36 UTC (rev 168520)
+++ trunk/PerformanceTests/DoYouEvenBench/InteractiveRunner.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">         var checkbox = document.createElement('input');
</span><span class="cx">         checkbox.id = suite.name;
</span><span class="cx">         checkbox.type = 'checkbox';
</span><del>-        checkbox.checked = true;
</del><ins>+        checkbox.checked = !suite.disabled;
</ins><span class="cx">         checkbox.onchange = (function (suite, checkbox) { return function () { suite.disabled = !checkbox.checked; } })(suite, checkbox);
</span><span class="cx">         checkbox.onchange();
</span><span class="cx">         checkboxes.push(checkbox);
</span></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestestsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/DoYouEvenBench/resources/tests.js (168520 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/tests.js        2014-05-09 05:32:36 UTC (rev 168520)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/tests.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -223,8 +223,44 @@
</span><span class="cx">     ]
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+Suites.push({
+    name: 'FlightJS-TodoMVC',
+    url: 'todomvc/dependency-examples/flight/index.html',
+    prepare: function (runner, contentWindow, contentDocument) {
+        return runner.waitForElement('#appIsReady').then(function () {
+            var newTodo = contentDocument.querySelector('#new-todo');
+            newTodo.focus();
+            return newTodo;
+        });;
+    },
+    tests: [
+        new BenchmarkTestStep('Adding' + numberOfItemsToAdd + 'Items', function (newTodo, contentWindow, contentDocument) {
+            var todomvc = contentWindow.todomvc;
+            for (var i = 0; i &lt; numberOfItemsToAdd; i++) {
+                newTodo.value = 'Something to do ' + i;
+
+                var keydownEvent = document.createEvent('Event');
+                keydownEvent.initEvent('keydown', true, true);
+                keydownEvent.which = 13; // VK_ENTER
+                newTodo.dispatchEvent(keydownEvent);
+            }
+        }),
+        new BenchmarkTestStep('CompletingAllItems', function (newTodo, contentWindow, contentDocument) {
+            var checkboxes = contentDocument.querySelectorAll('.toggle');
+            for (var i = 0; i &lt; checkboxes.length; i++)
+                checkboxes[i].click();
+        }),
+        new BenchmarkTestStep('DeletingAllItems', function (newTodo, contentWindow, contentDocument) {
+            var deleteButtons = contentDocument.querySelectorAll('.destroy');
+            for (var i = 0; i &lt; deleteButtons.length; i++)
+                deleteButtons[i].click();
+        }),
+    ]
+});
+
</ins><span class="cx"> var actionCount = 50;
</span><span class="cx"> Suites.push({
</span><ins>+    disabled: true,
</ins><span class="cx">     name: 'FlightJS-MailClient',
</span><span class="cx">     url: 'flightjs-example-app/index.html',
</span><span class="cx">     prepare: function (runner, contentWindow, contentDocument) {
</span></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightgitignore"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+node_modules/
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightjshintrc"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+{
+        &quot;node&quot;: true,
+        &quot;browser&quot;: true,
+        &quot;esnext&quot;: true,
+        &quot;bitwise&quot;: true,
+        &quot;camelcase&quot;: true,
+        &quot;curly&quot;: true,
+        &quot;eqeqeq&quot;: true,
+        &quot;immed&quot;: true,
+        &quot;indent&quot;: 4,
+        &quot;latedef&quot;: true,
+        &quot;newcap&quot;: true,
+        &quot;noarg&quot;: true,
+        &quot;quotmark&quot;: &quot;single&quot;,
+        &quot;regexp&quot;: true,
+        &quot;undef&quot;: true,
+        &quot;unused&quot;: true,
+        &quot;strict&quot;: true,
+        &quot;trailing&quot;: true,
+        &quot;smarttabs&quot;: true,
+        &quot;white&quot;: true,
+        &quot;validthis&quot;: true
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsappjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    './data/todos',
+    './data/stats',
+    './ui/new_item',
+    './ui/todo_list',
+    './ui/stats',
+    './ui/main_selector',
+    './ui/toggle_all'
+], function (TodosData, StatsData, NewItemUI, TodoListUI, StatsUI, MainSelectorUI, ToggleAllUI) {
+    var initialize = function () {
+        StatsData.attachTo(document);
+        TodosData.attachTo(document);
+        NewItemUI.attachTo('#new-todo');
+        MainSelectorUI.attachTo('#main');
+        StatsUI.attachTo('#footer');
+        ToggleAllUI.attachTo('#toggle-all');
+        TodoListUI.attachTo('#todo-list');
+
+        var dummyNodeToNotifyAppIsReady = document.createElement('div');
+        dummyNodeToNotifyAppIsReady.id = 'appIsReady';
+        document.body.appendChild(dummyNodeToNotifyAppIsReady);
+    };
+
+    return {
+        initialize: initialize
+    };
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsdatastatsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    'flight/lib/component',
+    '../store'
+], function (defineComponent, dataStore) {
+    function stats() {
+        this.defaultAttrs({
+            dataStore: dataStore
+        });
+
+        this.recount = function () {
+            var todos = this.attr.dataStore.all();
+            var all = todos.length;
+            var remaining = todos.reduce(function (memo, each) {
+                return memo += each.completed ? 0 : 1;
+            }, 0);
+
+            this.trigger('dataStatsCounted', {
+                all: all,
+                remaining: remaining,
+                completed: all - remaining,
+                filter: localStorage.getItem('filter') || ''
+            });
+        };
+
+        this.after('initialize', function () {
+            this.on(document, 'dataTodosLoaded', this.recount);
+            this.on(document, 'dataTodoAdded', this.recount);
+            this.on(document, 'dataTodoRemoved', this.recount);
+            this.on(document, 'dataTodoToggled', this.recount);
+            this.on(document, 'dataClearedCompleted', this.recount);
+            this.on(document, 'dataTodoToggledAll', this.recount);
+        });
+    }
+
+    return defineComponent(stats);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsdatatodosjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    'flight/lib/component',
+    '../store'
+], function (defineComponent, dataStore) {
+    function todos() {
+        var filter;
+        this.defaultAttrs({
+            dataStore: dataStore
+        });
+
+        this.add = function (e, data) {
+            var todo = this.attr.dataStore.save({
+                title: data.title,
+                completed: false
+            });
+
+            this.trigger('dataTodoAdded', { todo: todo, filter: filter });
+        };
+
+        this.remove = function (e, data) {
+            var todo = this.attr.dataStore.destroy(data.id);
+
+            this.trigger('dataTodoRemoved', todo);
+        };
+
+        this.load = function () {
+            var todos;
+
+            filter = localStorage.getItem('filter');
+            todos = this.find();
+            this.trigger('dataTodosLoaded', { todos: todos });
+        };
+
+        this.update = function (e, data) {
+            this.attr.dataStore.save(data);
+        };
+
+        this.toggleCompleted = function (e, data) {
+            var eventType;
+            var todo = this.attr.dataStore.get(data.id);
+
+            todo.completed = !todo.completed;
+            this.attr.dataStore.save(todo);
+
+            eventType = filter ? 'dataTodoRemoved' : 'dataTodoToggled';
+
+            this.trigger(eventType, todo);
+        };
+
+        this.toggleAllCompleted = function (e, data) {
+            this.attr.dataStore.updateAll({ completed: data.completed });
+            this.trigger('dataTodoToggledAll', { todos: this.find(filter) });
+        };
+
+        this.filter = function (e, data) {
+            var todos;
+
+            localStorage.setItem('filter', data.filter);
+            filter = data.filter;
+            todos = this.find();
+
+            this.trigger('dataTodosFiltered', { todos: todos });
+        };
+
+        this.find = function () {
+            var todos;
+
+            if (filter) {
+                todos = this.attr.dataStore.find(function (each) {
+                    return (typeof each[filter] !== 'undefined') ? each.completed : !each.completed;
+                });
+            } else {
+                todos = this.attr.dataStore.all();
+            }
+
+            return todos;
+        };
+
+        this.clearCompleted = function () {
+            this.attr.dataStore.destroyAll({ completed: true });
+
+            this.trigger('uiFilterRequested', { filter: filter });
+            this.trigger('dataClearedCompleted');
+        };
+
+        this.after('initialize', function () {
+            this.on(document, 'uiAddRequested', this.add);
+            this.on(document, 'uiUpdateRequested', this.update);
+            this.on(document, 'uiRemoveRequested', this.remove);
+            this.on(document, 'uiLoadRequested', this.load);
+            this.on(document, 'uiToggleRequested', this.toggleCompleted);
+            this.on(document, 'uiToggleAllRequested', this.toggleAllCompleted);
+            this.on(document, 'uiClearRequested', this.clearCompleted);
+            this.on(document, 'uiFilterRequested', this.filter);
+        });
+    }
+
+    return defineComponent(todos);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsmainjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+'use strict';
+
+require.config({
+    baseUrl: './',
+    paths: {
+        jquery: 'bower_components/jquery/jquery',
+        es5shim: 'bower_components/es5-shim/es5-shim',
+        es5sham: 'bower_components/es5-shim/es5-sham',
+        text: 'bower_components/requirejs-text/text',
+        flight: 'bower_components/flight',
+        depot: 'bower_components/depot/depot'
+    },
+    shim: {
+        'app/js/app': {
+            deps: ['jquery', 'es5shim', 'es5sham']
+        }
+    }
+});
+
+require(['app/js/app'], function (App) {
+    App.initialize();
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsstorejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+/*global define */
+
+'use strict';
+
+define([
+    'depot'
+], function (depot) {
+    return depot('todos', { idAttribute: 'id' });
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuimain_selectorjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    'flight/lib/component'
+], function (defineComponent) {
+    function mainSelector() {
+        this.toggle = function (e, data) {
+            var toggle = data.all &gt; 0;
+            this.$node.toggle(toggle);
+        };
+
+        this.after('initialize', function () {
+            this.$node.hide();
+            this.on(document, 'dataStatsCounted', this.toggle);
+        });
+    }
+
+    return defineComponent(mainSelector);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuinew_itemjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    'flight/lib/component'
+], function (defineComponent) {
+    function newItem() {
+        var ENTER_KEY = 13;
+
+        this.createOnEnter = function (e) {
+            if (e.which !== ENTER_KEY ||
+                !this.$node.val().trim()) {
+                return;
+            }
+
+            this.trigger('uiAddRequested', {
+                title: this.$node.val().trim()
+            });
+
+            this.$node.val('');
+        };
+
+        this.after('initialize', function () {
+            this.on('keydown', this.createOnEnter);
+        });
+    }
+
+    return defineComponent(newItem);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuistatsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    'flight/lib/component',
+    './with_filters',
+    'text!app/templates/stats.html',
+    '../utils'
+], function (defineComponent, withFilters, statsTmpl, utils) {
+    function stats() {
+        var template = utils.tmpl(statsTmpl);
+
+        this.defaultAttrs({
+            clearCompletedSelector: '#clear-completed'
+        });
+
+        this.render = function (e, data) {
+            var toggle = data.all &gt; 0;
+
+            this.$node.html(template(data));
+            this.$node.toggle(toggle);
+            this.markSelected(data.filter);
+        };
+
+        this.clearCompleted = function () {
+            this.trigger('uiClearRequested');
+        };
+
+        this.after('initialize', function () {
+            this.$node.hide();
+            this.on(document, 'dataStatsCounted', this.render);
+            this.on('click', { 'clearCompletedSelector': this.clearCompleted });
+        });
+    }
+
+    return defineComponent(stats, withFilters);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuitodo_listjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,108 @@
</span><ins>+/*global define, $ */
+'use strict';
+
+define([
+    'flight/lib/component',
+    'text!app/templates/todo.html',
+    '../utils'
+], function (defineComponent, todoTmpl, utils) {
+    function todoList() {
+        var ENTER_KEY = 13;
+        var template = utils.tmpl(todoTmpl);
+
+        this.defaultAttrs({
+            destroySelector: 'button.destroy',
+            toggleSelector: 'input.toggle',
+            labelSelector: 'label',
+            editSelector: '.edit'
+        });
+
+        this.renderAll = function (e, data) {
+            this.$node.html('');
+            data.todos.forEach(function (each) {
+                this.render(e, { todo: each });
+            }, this);
+        };
+
+        this.render = function (e, data) {
+            if (e.type === 'dataTodoAdded' &amp;&amp; data.filter === 'completed') {
+                return;
+            }
+
+            this.$node.append(template(data.todo));
+        };
+
+        this.edit = function (e, data) {
+            var $todoEl = $(data.el).parents('li');
+
+            $todoEl.addClass('editing');
+            this.select('editSelector').focus();
+        };
+
+        this.requestUpdate = function (e) {
+            var $inputEl = $(e.currentTarget);
+            var $todoEl = $inputEl.parents('li');
+            var value = $inputEl.val().trim();
+            var id = $todoEl.attr('id');
+
+            if (!$todoEl.hasClass('editing')) {
+                return;
+            }
+
+            $todoEl.removeClass('editing');
+
+            if (value) {
+                $todoEl.find('label').html(value);
+                this.trigger('uiUpdateRequested',  { id: id, title: value });
+            } else {
+                this.trigger('uiRemoveRequested', { id: id });
+            }
+        };
+
+        this.requestUpdateOnEnter = function (e, data) {
+            if (e.which === ENTER_KEY) {
+                this.requestUpdate(e, data);
+            }
+        };
+
+        this.requestRemove = function (e, data) {
+            var id = $(data.el).attr('id').split('_')[1];
+            this.trigger('uiRemoveRequested', { id: id });
+        };
+
+        this.remove = function (e, data) {
+            var $todoEl = this.$node.find('#' + data.id);
+            $todoEl.remove();
+        };
+
+        this.toggle = function (e, data) {
+            var $todoEl = $(data.el).parents('li');
+
+            $todoEl.toggleClass('completed');
+            this.trigger('uiToggleRequested', { id: $todoEl.attr('id') });
+        };
+
+        this.after('initialize', function () {
+            this.on(document, 'dataTodoAdded', this.render);
+            this.on(document, 'dataTodosLoaded', this.renderAll);
+            this.on(document, 'dataTodosFiltered', this.renderAll);
+            this.on(document, 'dataTodoToggledAll', this.renderAll);
+            this.on(document, 'dataTodoRemoved', this.remove);
+
+            this.on('click', { 'destroySelector': this.requestRemove });
+            this.on('click', { 'toggleSelector': this.toggle });
+            this.on('dblclick', { 'labelSelector': this.edit });
+
+            this.$node.on('blur', '.edit', this.requestUpdate.bind(this));
+            this.$node.on('keydown', '.edit', this.requestUpdateOnEnter.bind(this));
+
+            // these don't work
+            // this.on(this.attr.editSelector, 'blur', this.requestUpdate);
+            // this.on('blur', { 'editSelector': this.requestUpdate });
+
+            this.trigger('uiLoadRequested');
+        });
+    }
+
+    return defineComponent(todoList);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuitoggle_alljs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+/*global define */
+'use strict';
+
+define([
+    'flight/lib/component'
+], function (defineComponent) {
+    function toggleAll() {
+        this.toggleAllComplete = function () {
+            this.trigger('uiToggleAllRequested', {
+                completed: this.$node.is(':checked')
+            });
+        };
+
+        this.toggleCheckbox = function (e, data) {
+            this.node.checked = !data.remaining;
+        };
+
+        this.after('initialize', function () {
+            this.on('click', this.toggleAllComplete);
+            this.on(document, 'dataStatsCounted', this.toggleCheckbox);
+        });
+    }
+
+    return defineComponent(toggleAll);
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsuiwith_filtersjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+/*global define, $ */
+'use strict';
+
+define(function () {
+    return function withFilters() {
+        this.defaultAttrs({
+            filterSelector: '#filters a'
+        });
+
+        this.chooseFilter = function (e, data) {
+            var filter = data.el.hash.slice(2);
+
+            this.select('filterSelector').removeClass('selected');
+            $(data.el).addClass('selected');
+            this.trigger('uiFilterRequested', { filter: filter });
+        };
+
+        this.markSelected = function (filter) {
+            this.$node.find('[href=&quot;#/' + filter + '&quot;]').addClass('selected');
+        };
+
+        this.after('initialize', function () {
+            this.on('click', { filterSelector: this.chooseFilter });
+        });
+    };
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightappjsutilsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,134 @@
</span><ins>+/*global define */
+'use strict';
+
+// tmpl function scooped from underscore.
+// http://documentcloud.github.com/underscore/#template
+define(function () {
+    var _ = {};
+
+    // List of HTML entities for escaping.
+    var entityMap = {
+        escape: {
+            '&amp;': '&amp;amp;',
+            '&lt;': '&amp;lt;',
+            '&gt;': '&amp;gt;',
+            '&quot;': '&amp;quot;',
+            /*jshint quotmark:false */
+            &quot;'&quot;: '&amp;#x27;',
+            '/': '&amp;#x2F;'
+        }
+    };
+
+    var escapeKeys = '&amp;&lt;&gt;&quot;\'/';
+    var unescapeKeys = '&amp;amp;|&amp;lt;|&amp;gt;|&amp;quot;|&amp;#x27;|&amp;#x2F;';
+
+    // Regexes containing the keys and values listed immediately above.
+    var entityRegexes = {
+        escape:   new RegExp('[' + escapeKeys + ']', 'g'),
+        unescape: new RegExp('(' + unescapeKeys + ')', 'g')
+    };
+
+    // Functions for escaping and unescaping strings to/from HTML interpolation.
+    ['escape', 'unescape'].forEach(function (method) {
+        _[method] = function (string) {
+            if (string === null || string === undefined) {
+                return '';
+            }
+
+            return ('' + string).replace(entityRegexes[method], function (match) {
+                return entityMap[method][match];
+            });
+        };
+    });
+
+    var settings = {
+        evaluate: /&lt;%([\s\S]+?)%&gt;/g,
+        interpolate: /&lt;%=([\s\S]+?)%&gt;/g,
+        escape: /&lt;%-([\s\S]+?)%&gt;/g
+    };
+
+    var noMatch = /(.)^/;
+    var escapes = {
+        /*jshint quotmark:false */
+        &quot;'&quot;: &quot;'&quot;,
+        '\\': '\\',
+        '\r': 'r',
+        '\n': 'n',
+        '\t': 't',
+        '\u2028': 'u2028',
+        '\u2029': 'u2029'
+    };
+
+    var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+    // JavaScript micro-templating, similar to John Resig's implementation.
+    // Underscore templating handles arbitrary delimiters, preserves whitespace,
+    // and correctly escapes quotes within interpolated code.
+    var template = function (text, data) {
+        var render;
+
+        // Combine delimiters into one regular expression via alternation.
+        var matcher = new RegExp([
+            (settings.escape || noMatch).source,
+            (settings.interpolate || noMatch).source,
+            (settings.evaluate || noMatch).source
+        ].join('|') + '|$', 'g');
+
+        // Compile the template source, escaping string literals appropriately.
+        var index = 0;
+        var source = &quot;__p+='&quot;;
+        text.replace(matcher, function (match, escape, interpolate, evaluate, offset) {
+            source += text.slice(index, offset)
+            .replace(escaper, function (match) {
+                return '\\' + escapes[match];
+            });
+
+            if (escape) {
+                source += &quot;'+\n((__t=(&quot; + escape + &quot;))==null?'':_.escape(__t))+\n'&quot;;
+            }
+            if (interpolate) {
+                source += &quot;'+\n((__t=(&quot; + interpolate + &quot;))==null?'':__t)+\n'&quot;;
+            }
+            if (evaluate) {
+                source += &quot;';\n&quot; + evaluate + &quot;\n__p+='&quot;;
+            }
+            index = offset + match.length;
+            return match;
+        });
+        source += &quot;';\n&quot;;
+
+        // If a variable is not specified, place data values in local scope.
+        if (!settings.variable) {
+            source = 'with(obj||{}){\n' + source + '}\n';
+        }
+
+        source = &quot;var __t,__p='',__j=Array.prototype.join,&quot; +
+            &quot;print=function(){__p+=__j.call(arguments,'');};\n&quot; +
+            source + &quot;return __p;\n&quot;;
+
+        try {
+            /*jshint evil:true */
+            render = new Function(settings.variable || 'obj', '_', source);
+        } catch (err) {
+            err.source = source;
+            throw err;
+        }
+
+        if (data) {
+            return render(data, _);
+        }
+
+        var template = function (data) {
+            return render.call(this, data, _);
+        };
+
+        // Provide the compiled function source as a convenience for precompilation.
+        template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+        return template;
+    };
+
+    return {
+        tmpl: template
+    };
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightapptemplatesstatshtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;span id=&quot;todo-count&quot;&gt;
+    &lt;strong&gt;&lt;%= remaining %&gt;&lt;/strong&gt; &lt;%= remaining == 1 ? 'item' : 'items' %&gt; left
+&lt;/span&gt;
+&lt;ul id=&quot;filters&quot;&gt;
+    &lt;li&gt;
+        &lt;a href=&quot;#/&quot;&gt;All&lt;/a&gt;
+    &lt;/li&gt;
+    &lt;li&gt;
+        &lt;a href=&quot;#/active&quot;&gt;Active&lt;/a&gt;
+    &lt;/li&gt;
+    &lt;li&gt;
+        &lt;a href=&quot;#/completed&quot;&gt;Completed&lt;/a&gt;
+    &lt;/li&gt;
+&lt;/ul&gt;
+&lt;% if (completed) { %&gt;
+&lt;button id=&quot;clear-completed&quot;&gt;Clear completed (&lt;%= completed %&gt;)&lt;/button&gt;
+&lt;% } %&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightapptemplatestodohtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;li id=&quot;&lt;%= id %&gt;&quot; class=&quot;&lt;%= completed ? 'completed' : '' %&gt;&quot;&gt;
+    &lt;div class=&quot;view&quot;&gt;
+        &lt;input class=&quot;toggle&quot; type=&quot;checkbox&quot; &lt;%= completed ? 'checked' : '' %&gt;&gt;
+        &lt;label&gt;&lt;%- title %&gt;&lt;/label&gt;
+        &lt;button id=&quot;destroy_&lt;%= id %&gt;&quot; class=&quot;destroy&quot;&gt;&lt;/button&gt;
+    &lt;/div&gt;
+    &lt;input class=&quot;edit&quot; value=&quot;&lt;%- title %&gt;&quot;&gt;
+&lt;/li&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbowerjson"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+{
+  &quot;name&quot;: &quot;flight-todomvc&quot;,
+  &quot;version&quot;: &quot;0.0.0&quot;,
+  &quot;dependencies&quot;: {
+    &quot;depot&quot;: &quot;~0.1.4&quot;,
+    &quot;flight&quot;: &quot;~1.1.0&quot;,
+    &quot;jquery&quot;: &quot;1.8.3&quot;,
+    &quot;requirejs&quot;: &quot;~2.1.5&quot;,
+    &quot;todomvc-common&quot;: &quot;~0.1.4&quot;,
+    &quot;requirejs-text&quot;: &quot;~2.0.10&quot;
+  },
+  &quot;devDependencies&quot;: {
+    &quot;jasmine-flight&quot;: &quot;~2.1.0&quot;,
+    &quot;jasmine-jquery&quot;: &quot;~1.5.8&quot;
+  }
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsdepotdepotjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,251 @@
</span><ins>+// depot.js v0.1.6
+
+// (c) 2013 Michal Kuklis
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+
+(function (name, root, factory) {
+  if (typeof exports == 'object') {
+    module.exports = factory();
+  } else if (typeof define == 'function' &amp;&amp; define.amd) {
+    define(factory);
+  } else {
+    root[name] = factory();
+  }
+}(&quot;depot&quot;, this, function () {
+
+  &quot;use strict&quot;;
+
+  // depot api
+
+  var api = {
+
+    save: function (record) {
+      var id;
+
+      if (!record[this.idAttribute]) {
+        record[this.idAttribute] = guid();
+      }
+
+      id = record[this.idAttribute] + '';
+
+      if (this.ids.indexOf(id) &lt; 0) {
+        this.ids.push(id);
+        this.storageAdaptor.setItem(this.name, this.ids.join(&quot;,&quot;));
+      }
+
+      this.storageAdaptor.setItem(getKey(this.name, id), JSON.stringify(record));
+
+      return record;
+    },
+
+    update: function (id, data) {
+      if (typeof data == 'undefined') {
+        data = id;
+        id = data[this.idAttribute];
+      }
+
+      var record = this.get(id);
+
+      if (record) {
+        record = extend(record, data);
+        this.save(record);
+      }
+
+      return record;
+    },
+
+    updateAll: function (data) {
+      var records = this.all();
+
+      records.forEach(function (record) {
+        record = extend(record, data);
+        this.save(record);
+      }, this);
+
+      return records;
+    },
+
+    find: function (criteria) {
+      var key, match, record;
+      var name = this.name;
+      var self = this;
+
+      if (!criteria) return this.all();
+
+      return this.ids.reduce(function (memo, id) {
+        record = jsonData(self.storageAdaptor.getItem(getKey(name, id)));
+        match = findMatch(criteria, record);
+
+        if (match) {
+          memo.push(record);
+        }
+
+        return memo;
+      }, []);
+    },
+
+    get: function (id) {
+      return jsonData(this.storageAdaptor.getItem(getKey(this.name, id)));
+    },
+
+    all: function () {
+      var record, self = this, name = this.name;
+
+      return this.ids.reduce(function (memo, id) {
+        record = self.storageAdaptor.getItem(getKey(name, id));
+
+        if (record) {
+          memo.push(jsonData(record));
+        }
+
+        return memo;
+      }, []);
+    },
+
+    destroy: function (record) {
+      var index;
+      var id = (record[this.idAttribute]) ? record[this.idAttribute] : record;
+      var key = getKey(this.name, id);
+
+      record = jsonData(this.storageAdaptor.getItem(key));
+      this.storageAdaptor.removeItem(key);
+
+      index = this.ids.indexOf(id);
+      if (index != -1) this.ids.splice(index, 1);
+      this.storageAdaptor.setItem(this.name, this.ids.join(&quot;,&quot;));
+
+      return record;
+    },
+
+    destroyAll: function (criteria) {
+      var attr, id, match, record, key;
+
+      for (var i = this.ids.length - 1; i &gt;= 0; i--) {
+        id = this.ids[i];
+        key = getKey(this.name, id);
+
+        if (criteria) {
+
+          record = jsonData(this.storageAdaptor.getItem(key));
+          match = findMatch(criteria, record);
+
+          if (match) {
+            this.storageAdaptor.removeItem(key);
+            this.ids.splice(i, 1);
+          }
+
+        }
+        else {
+          this.storageAdaptor.removeItem(key);
+        }
+      }
+
+      if (criteria) {
+        this.storageAdaptor.setItem(this.name, this.ids.join(&quot;,&quot;));
+      }
+      else {
+        this.storageAdaptor.removeItem(this.name);
+        this.ids = [];
+      }
+    },
+
+    size: function () {
+      return this.ids.length;
+    }
+  };
+
+  // helpers
+
+  function jsonData(data) {
+    return data &amp;&amp; JSON.parse(data);
+  }
+
+  function getKey(name, id) {
+    return name + &quot;-&quot; + id;
+  }
+
+  function findMatch(criteria, record) {
+    var match, attr;
+
+    if (typeof criteria == 'function') {
+      match = criteria(record);
+    }
+    else {
+      match = true;
+      for (attr in criteria) {
+        match &amp;= (criteria[attr] === record[attr]);
+      }
+    }
+
+    return match;
+  }
+
+  function s4() {
+    return Math.floor((1 + Math.random()) * 0x10000)
+      .toString(16).substring(1);
+  }
+
+  function guid() {
+    return s4() + s4() + '-' + s4() + '-' + s4() +
+      '-' +s4() + '-' + s4() + s4() + s4();
+  }
+
+  function extend(dest, source) {
+    for (var key in source) {
+      if (source.hasOwnProperty(key)) {
+        dest[key] = source[key];
+      }
+    }
+
+    return dest;
+  }
+
+  function depot(name, options) {
+    var store, ids;
+
+    var data = {};
+    var localStorage = {
+        getItem: function (key) { return data[key]; },
+        setItem: function (key, value) {
+            if (!data[key])
+                this.length++;
+            data[key] = value;
+        },
+        removeItem: function (key) {
+            delete data[key];
+            this.length--;
+        },
+        key: function (index) {
+            var i = 0;
+            for (var key in data) {
+                if (i == index)
+                    return key;
+                i++;
+            }
+            return null;
+        },
+        length: 0,
+    };
+
+    options = extend({
+      idAttribute: '_id',
+      storageAdaptor: localStorage
+    }, options);
+
+    if (!options.storageAdaptor) throw new Error(&quot;No storage adaptor was found&quot;);
+
+    store = options.storageAdaptor.getItem(name);
+    ids = (store &amp;&amp; store.split(&quot;,&quot;)) || [];
+
+    return Object.create(api, {
+      name: { value: name },
+      store: { value: store },
+      ids: { value: ids, writable: true },
+      idAttribute: { value: options.idAttribute },
+      storageAdaptor: { value: options.storageAdaptor }
+    });
+  }
+
+  return depot;
+}));
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentses5shimes5shamjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,326 @@
</span><ins>+// Copyright 2009-2012 by contributors, MIT License
+// vim: ts=4 sts=4 sw=4 expandtab
+
+// Module systems magic dance
+(function (definition) {
+    // RequireJS
+    if (typeof define == &quot;function&quot;) {
+        define(definition);
+    // YUI3
+    } else if (typeof YUI == &quot;function&quot;) {
+        YUI.add(&quot;es5-sham&quot;, definition);
+    // CommonJS and &lt;script&gt;
+    } else {
+        definition();
+    }
+})(function () {
+
+// ES5 15.2.3.2
+// http://es5.github.com/#x15.2.3.2
+if (!Object.getPrototypeOf) {
+    // https://github.com/kriskowal/es5-shim/issues#issue/2
+    // http://ejohn.org/blog/objectgetprototypeof/
+    // recommended by fschaefer on github
+    Object.getPrototypeOf = function getPrototypeOf(object) {
+        return object.__proto__ || (
+            object.constructor
+                ? object.constructor.prototype
+                : prototypeOfObject
+        );
+    };
+}
+
+// ES5 15.2.3.3
+// http://es5.github.com/#x15.2.3.3
+if (!Object.getOwnPropertyDescriptor) {
+    var ERR_NON_OBJECT = &quot;Object.getOwnPropertyDescriptor called on a non-object: &quot;;
+
+    Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+        if ((typeof object != &quot;object&quot; &amp;&amp; typeof object != &quot;function&quot;) || object === null) {
+            throw new TypeError(ERR_NON_OBJECT + object);
+        }
+        // If object does not owns property return undefined immediately.
+        if (!owns(object, property)) {
+            return;
+        }
+
+        // If object has a property then it's for sure both `enumerable` and
+        // `configurable`.
+        var descriptor =  { enumerable: true, configurable: true };
+
+        // If JS engine supports accessor properties then property may be a
+        // getter or setter.
+        if (supportsAccessors) {
+            // Unfortunately `__lookupGetter__` will return a getter even
+            // if object has own non getter property along with a same named
+            // inherited getter. To avoid misbehavior we temporary remove
+            // `__proto__` so that `__lookupGetter__` will return getter only
+            // if it's owned by an object.
+            var prototype = object.__proto__;
+            object.__proto__ = prototypeOfObject;
+
+            var getter = lookupGetter(object, property);
+            var setter = lookupSetter(object, property);
+
+            // Once we have getter and setter we can put values back.
+            object.__proto__ = prototype;
+
+            if (getter || setter) {
+                if (getter) {
+                    descriptor.get = getter;
+                }
+                if (setter) {
+                    descriptor.set = setter;
+                }
+                // If it was accessor property we're done and return here
+                // in order to avoid adding `value` to the descriptor.
+                return descriptor;
+            }
+        }
+
+        // If we got this far we know that object has an own property that is
+        // not an accessor so we set it as a value and return descriptor.
+        descriptor.value = object[property];
+        return descriptor;
+    };
+}
+
+// ES5 15.2.3.4
+// http://es5.github.com/#x15.2.3.4
+if (!Object.getOwnPropertyNames) {
+    Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+        return Object.keys(object);
+    };
+}
+
+// ES5 15.2.3.5
+// http://es5.github.com/#x15.2.3.5
+if (!Object.create) {
+    Object.create = function create(prototype, properties) {
+        var object;
+        if (prototype === null) {
+            object = { &quot;__proto__&quot;: null };
+        } else {
+            if (typeof prototype != &quot;object&quot;) {
+                throw new TypeError(&quot;typeof prototype[&quot;+(typeof prototype)+&quot;] != 'object'&quot;);
+            }
+            var Type = function () {};
+            Type.prototype = prototype;
+            object = new Type();
+            // IE has no built-in implementation of `Object.getPrototypeOf`
+            // neither `__proto__`, but this manually setting `__proto__` will
+            // guarantee that `Object.getPrototypeOf` will work as expected with
+            // objects created using `Object.create`
+            object.__proto__ = prototype;
+        }
+        if (properties !== void 0) {
+            Object.defineProperties(object, properties);
+        }
+        return object;
+    };
+}
+
+// ES5 15.2.3.6
+// http://es5.github.com/#x15.2.3.6
+
+// Patch for WebKit and IE8 standard mode
+// Designed by hax &lt;hax.github.com&gt;
+// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
+// IE8 Reference:
+//     http://msdn.microsoft.com/en-us/library/dd282900.aspx
+//     http://msdn.microsoft.com/en-us/library/dd229916.aspx
+// WebKit Bugs:
+//     https://bugs.webkit.org/show_bug.cgi?id=36423
+
+function doesDefinePropertyWork(object) {
+    try {
+        Object.defineProperty(object, &quot;sentinel&quot;, {});
+        return &quot;sentinel&quot; in object;
+    } catch (exception) {
+        // returns falsy
+    }
+}
+
+// check whether defineProperty works if it's given. Otherwise,
+// shim partially.
+if (Object.defineProperty) {
+    var definePropertyWorksOnObject = doesDefinePropertyWork({});
+    var definePropertyWorksOnDom = typeof document == &quot;undefined&quot; ||
+        doesDefinePropertyWork(document.createElement(&quot;div&quot;));
+    if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+        var definePropertyFallback = Object.defineProperty;
+    }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+    var ERR_NON_OBJECT_DESCRIPTOR = &quot;Property description must be an object: &quot;;
+    var ERR_NON_OBJECT_TARGET = &quot;Object.defineProperty called on non-object: &quot;
+    var ERR_ACCESSORS_NOT_SUPPORTED = &quot;getters &amp; setters can not be defined &quot; +
+                                      &quot;on this javascript engine&quot;;
+
+    Object.defineProperty = function defineProperty(object, property, descriptor) {
+        if ((typeof object != &quot;object&quot; &amp;&amp; typeof object != &quot;function&quot;) || object === null) {
+            throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+        }
+        if ((typeof descriptor != &quot;object&quot; &amp;&amp; typeof descriptor != &quot;function&quot;) || descriptor === null) {
+            throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+        }
+        // make a valiant attempt to use the real defineProperty
+        // for I8's DOM elements.
+        if (definePropertyFallback) {
+            try {
+                return definePropertyFallback.call(Object, object, property, descriptor);
+            } catch (exception) {
+                // try the shim if the real one doesn't work
+            }
+        }
+
+        // If it's a data property.
+        if (owns(descriptor, &quot;value&quot;)) {
+            // fail silently if &quot;writable&quot;, &quot;enumerable&quot;, or &quot;configurable&quot;
+            // are requested but not supported
+            /*
+            // alternate approach:
+            if ( // can't implement these features; allow false but not true
+                !(owns(descriptor, &quot;writable&quot;) ? descriptor.writable : true) ||
+                !(owns(descriptor, &quot;enumerable&quot;) ? descriptor.enumerable : true) ||
+                !(owns(descriptor, &quot;configurable&quot;) ? descriptor.configurable : true)
+            )
+                throw new RangeError(
+                    &quot;This implementation of Object.defineProperty does not &quot; +
+                    &quot;support configurable, enumerable, or writable.&quot;
+                );
+            */
+
+            if (supportsAccessors &amp;&amp; (lookupGetter(object, property) ||
+                                      lookupSetter(object, property)))
+            {
+                // As accessors are supported only on engines implementing
+                // `__proto__` we can safely override `__proto__` while defining
+                // a property to make sure that we don't hit an inherited
+                // accessor.
+                var prototype = object.__proto__;
+                object.__proto__ = prototypeOfObject;
+                // Deleting a property anyway since getter / setter may be
+                // defined on object itself.
+                delete object[property];
+                object[property] = descriptor.value;
+                // Setting original `__proto__` back now.
+                object.__proto__ = prototype;
+            } else {
+                object[property] = descriptor.value;
+            }
+        } else {
+            if (!supportsAccessors) {
+                throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+            }
+            // If we got that far then getters and setters can be defined !!
+            if (owns(descriptor, &quot;get&quot;)) {
+                defineGetter(object, property, descriptor.get);
+            }
+            if (owns(descriptor, &quot;set&quot;)) {
+                defineSetter(object, property, descriptor.set);
+            }
+        }
+        return object;
+    };
+}
+
+// ES5 15.2.3.7
+// http://es5.github.com/#x15.2.3.7
+if (!Object.defineProperties) {
+    Object.defineProperties = function defineProperties(object, properties) {
+        for (var property in properties) {
+            if (owns(properties, property) &amp;&amp; property != &quot;__proto__&quot;) {
+                Object.defineProperty(object, property, properties[property]);
+            }
+        }
+        return object;
+    };
+}
+
+// ES5 15.2.3.8
+// http://es5.github.com/#x15.2.3.8
+if (!Object.seal) {
+    Object.seal = function seal(object) {
+        // this is misleading and breaks feature-detection, but
+        // allows &quot;securable&quot; code to &quot;gracefully&quot; degrade to working
+        // but insecure code.
+        return object;
+    };
+}
+
+// ES5 15.2.3.9
+// http://es5.github.com/#x15.2.3.9
+if (!Object.freeze) {
+    Object.freeze = function freeze(object) {
+        // this is misleading and breaks feature-detection, but
+        // allows &quot;securable&quot; code to &quot;gracefully&quot; degrade to working
+        // but insecure code.
+        return object;
+    };
+}
+
+// detect a Rhino bug and patch it
+try {
+    Object.freeze(function () {});
+} catch (exception) {
+    Object.freeze = (function freeze(freezeObject) {
+        return function freeze(object) {
+            if (typeof object == &quot;function&quot;) {
+                return object;
+            } else {
+                return freezeObject(object);
+            }
+        };
+    })(Object.freeze);
+}
+
+// ES5 15.2.3.10
+// http://es5.github.com/#x15.2.3.10
+if (!Object.preventExtensions) {
+    Object.preventExtensions = function preventExtensions(object) {
+        // this is misleading and breaks feature-detection, but
+        // allows &quot;securable&quot; code to &quot;gracefully&quot; degrade to working
+        // but insecure code.
+        return object;
+    };
+}
+
+// ES5 15.2.3.11
+// http://es5.github.com/#x15.2.3.11
+if (!Object.isSealed) {
+    Object.isSealed = function isSealed(object) {
+        return false;
+    };
+}
+
+// ES5 15.2.3.12
+// http://es5.github.com/#x15.2.3.12
+if (!Object.isFrozen) {
+    Object.isFrozen = function isFrozen(object) {
+        return false;
+    };
+}
+
+// ES5 15.2.3.13
+// http://es5.github.com/#x15.2.3.13
+if (!Object.isExtensible) {
+    Object.isExtensible = function isExtensible(object) {
+        // 1. If Type(O) is not Object throw a TypeError exception.
+        if (Object(object) !== object) {
+            throw new TypeError(); // TODO message
+        }
+        // 2. Return the Boolean value of the [[Extensible]] internal property of O.
+        var name = '';
+        while (owns(object, name)) {
+            name += '?';
+        }
+        object[name] = true;
+        var returnValue = owns(object, name);
+        delete object[name];
+        return returnValue;
+    };
+}
+
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentses5shimes5shimjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,778 @@
</span><ins>+// Copyright 2009-2012 by contributors, MIT License
+// vim: ts=4 sts=4 sw=4 expandtab
+
+// Module systems magic dance
+(function (definition) {
+    // RequireJS
+    if (typeof define == &quot;function&quot;) {
+        define(definition);
+    // YUI3
+    } else if (typeof YUI == &quot;function&quot;) {
+        YUI.add(&quot;es5&quot;, definition);
+    // CommonJS and &lt;script&gt;
+    } else {
+        definition();
+    }
+})(function () {
+
+/**
+ * Brings an environment as close to ECMAScript 5 compliance
+ * as is possible with the facilities of erstwhile engines.
+ *
+ * Annotated ES5: http://es5.github.com/ (specific links below)
+ * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
+ * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/
+ */
+
+//
+// Function
+// ========
+//
+
+// ES-5 15.3.4.5
+// http://es5.github.com/#x15.3.4.5
+
+if (!Function.prototype.bind) {
+    Function.prototype.bind = function bind(that) { // .length is 1
+        // 1. Let Target be the this value.
+        var target = this;
+        // 2. If IsCallable(Target) is false, throw a TypeError exception.
+        if (typeof target != &quot;function&quot;) {
+            throw new TypeError(&quot;Function.prototype.bind called on incompatible &quot; + target);
+        }
+        // 3. Let A be a new (possibly empty) internal list of all of the
+        //   argument values provided after thisArg (arg1, arg2 etc), in order.
+        // XXX slicedArgs will stand in for &quot;A&quot; if used
+        var args = slice.call(arguments, 1); // for normal call
+        // 4. Let F be a new native ECMAScript object.
+        // 11. Set the [[Prototype]] internal property of F to the standard
+        //   built-in Function prototype object as specified in 15.3.3.1.
+        // 12. Set the [[Call]] internal property of F as described in
+        //   15.3.4.5.1.
+        // 13. Set the [[Construct]] internal property of F as described in
+        //   15.3.4.5.2.
+        // 14. Set the [[HasInstance]] internal property of F as described in
+        //   15.3.4.5.3.
+        var bound = function () {
+
+            if (this instanceof bound) {
+                // 15.3.4.5.2 [[Construct]]
+                // When the [[Construct]] internal method of a function object,
+                // F that was created using the bind function is called with a
+                // list of arguments ExtraArgs, the following steps are taken:
+                // 1. Let target be the value of F's [[TargetFunction]]
+                //   internal property.
+                // 2. If target has no [[Construct]] internal method, a
+                //   TypeError exception is thrown.
+                // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
+                //   property.
+                // 4. Let args be a new list containing the same values as the
+                //   list boundArgs in the same order followed by the same
+                //   values as the list ExtraArgs in the same order.
+                // 5. Return the result of calling the [[Construct]] internal
+                //   method of target providing args as the arguments.
+
+                var F = function(){};
+                F.prototype = target.prototype;
+                var self = new F;
+
+                var result = target.apply(
+                    self,
+                    args.concat(slice.call(arguments))
+                );
+                if (Object(result) === result) {
+                    return result;
+                }
+                return self;
+
+            } else {
+                // 15.3.4.5.1 [[Call]]
+                // When the [[Call]] internal method of a function object, F,
+                // which was created using the bind function is called with a
+                // this value and a list of arguments ExtraArgs, the following
+                // steps are taken:
+                // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
+                //   property.
+                // 2. Let boundThis be the value of F's [[BoundThis]] internal
+                //   property.
+                // 3. Let target be the value of F's [[TargetFunction]] internal
+                //   property.
+                // 4. Let args be a new list containing the same values as the
+                //   list boundArgs in the same order followed by the same
+                //   values as the list ExtraArgs in the same order.
+                // 5. Return the result of calling the [[Call]] internal method
+                //   of target providing boundThis as the this value and
+                //   providing args as the arguments.
+
+                // equiv: target.call(this, ...boundArgs, ...args)
+                return target.apply(
+                    that,
+                    args.concat(slice.call(arguments))
+                );
+
+            }
+
+        };
+        // XXX bound.length is never writable, so don't even try
+        //
+        // 15. If the [[Class]] internal property of Target is &quot;Function&quot;, then
+        //     a. Let L be the length property of Target minus the length of A.
+        //     b. Set the length own property of F to either 0 or L, whichever is
+        //       larger.
+        // 16. Else set the length own property of F to 0.
+        // 17. Set the attributes of the length own property of F to the values
+        //   specified in 15.3.5.1.
+
+        // TODO
+        // 18. Set the [[Extensible]] internal property of F to true.
+
+        // TODO
+        // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
+        // 20. Call the [[DefineOwnProperty]] internal method of F with
+        //   arguments &quot;caller&quot;, PropertyDescriptor {[[Get]]: thrower, [[Set]]:
+        //   thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
+        //   false.
+        // 21. Call the [[DefineOwnProperty]] internal method of F with
+        //   arguments &quot;arguments&quot;, PropertyDescriptor {[[Get]]: thrower,
+        //   [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
+        //   and false.
+
+        // TODO
+        // NOTE Function objects created using Function.prototype.bind do not
+        // have a prototype property or the [[Code]], [[FormalParameters]], and
+        // [[Scope]] internal properties.
+        // XXX can't delete prototype in pure-js.
+
+        // 22. Return F.
+        return bound;
+    };
+}
+
+// Shortcut to an often accessed properties, in order to avoid multiple
+// dereference that costs universally.
+// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
+// us it in defining shortcuts.
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+// Having a toString local variable name breaks in Opera so use _toString.
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+
+// If JS engine supports accessors creating shortcuts.
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, &quot;__defineGetter__&quot;))) {
+    defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+    defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+    lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+    lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+
+//
+// Array
+// =====
+//
+
+// ES5 15.4.3.2
+// http://es5.github.com/#x15.4.3.2
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
+if (!Array.isArray) {
+    Array.isArray = function isArray(obj) {
+        return _toString(obj) == &quot;[object Array]&quot;;
+    };
+}
+
+// The IsCallable() check in the Array functions
+// has been replaced with a strict check on the
+// internal class of the object to trap cases where
+// the provided function was actually a regular
+// expression literal, which in V8 and
+// JavaScriptCore is a typeof &quot;function&quot;.  Only in
+// V8 are regular expression literals permitted as
+// reduce parameters, so it is desirable in the
+// general case for the shim to match the more
+// strict and common behavior of rejecting regular
+// expressions.
+
+// ES5 15.4.4.18
+// http://es5.github.com/#x15.4.4.18
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
+if (!Array.prototype.forEach) {
+    Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+        var self = toObject(this),
+            thisp = arguments[1],
+            i = -1,
+            length = self.length &gt;&gt;&gt; 0;
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(); // TODO message
+        }
+
+        while (++i &lt; length) {
+            if (i in self) {
+                // Invoke the callback function with call, passing arguments:
+                // context, property value, property key, thisArg object context
+                fun.call(thisp, self[i], i, self);
+            }
+        }
+    };
+}
+
+// ES5 15.4.4.19
+// http://es5.github.com/#x15.4.4.19
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
+if (!Array.prototype.map) {
+    Array.prototype.map = function map(fun /*, thisp*/) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0,
+            result = Array(length),
+            thisp = arguments[1];
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(fun + &quot; is not a function&quot;);
+        }
+
+        for (var i = 0; i &lt; length; i++) {
+            if (i in self)
+                result[i] = fun.call(thisp, self[i], i, self);
+        }
+        return result;
+    };
+}
+
+// ES5 15.4.4.20
+// http://es5.github.com/#x15.4.4.20
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
+if (!Array.prototype.filter) {
+    Array.prototype.filter = function filter(fun /*, thisp */) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0,
+            result = [],
+            value,
+            thisp = arguments[1];
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(fun + &quot; is not a function&quot;);
+        }
+
+        for (var i = 0; i &lt; length; i++) {
+            if (i in self) {
+                value = self[i];
+                if (fun.call(thisp, value, i, self)) {
+                    result.push(value);
+                }
+            }
+        }
+        return result;
+    };
+}
+
+// ES5 15.4.4.16
+// http://es5.github.com/#x15.4.4.16
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
+if (!Array.prototype.every) {
+    Array.prototype.every = function every(fun /*, thisp */) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0,
+            thisp = arguments[1];
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(fun + &quot; is not a function&quot;);
+        }
+
+        for (var i = 0; i &lt; length; i++) {
+            if (i in self &amp;&amp; !fun.call(thisp, self[i], i, self)) {
+                return false;
+            }
+        }
+        return true;
+    };
+}
+
+// ES5 15.4.4.17
+// http://es5.github.com/#x15.4.4.17
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
+if (!Array.prototype.some) {
+    Array.prototype.some = function some(fun /*, thisp */) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0,
+            thisp = arguments[1];
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(fun + &quot; is not a function&quot;);
+        }
+
+        for (var i = 0; i &lt; length; i++) {
+            if (i in self &amp;&amp; fun.call(thisp, self[i], i, self)) {
+                return true;
+            }
+        }
+        return false;
+    };
+}
+
+// ES5 15.4.4.21
+// http://es5.github.com/#x15.4.4.21
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
+if (!Array.prototype.reduce) {
+    Array.prototype.reduce = function reduce(fun /*, initial*/) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0;
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(fun + &quot; is not a function&quot;);
+        }
+
+        // no value to return if no initial value and an empty array
+        if (!length &amp;&amp; arguments.length == 1) {
+            throw new TypeError('reduce of empty array with no initial value');
+        }
+
+        var i = 0;
+        var result;
+        if (arguments.length &gt;= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i++];
+                    break;
+                }
+
+                // if array contains no values, no initial value to return
+                if (++i &gt;= length) {
+                    throw new TypeError('reduce of empty array with no initial value');
+                }
+            } while (true);
+        }
+
+        for (; i &lt; length; i++) {
+            if (i in self) {
+                result = fun.call(void 0, result, self[i], i, self);
+            }
+        }
+
+        return result;
+    };
+}
+
+// ES5 15.4.4.22
+// http://es5.github.com/#x15.4.4.22
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
+if (!Array.prototype.reduceRight) {
+    Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0;
+
+        // If no callback function or if callback is not a callable function
+        if (_toString(fun) != &quot;[object Function]&quot;) {
+            throw new TypeError(fun + &quot; is not a function&quot;);
+        }
+
+        // no value to return if no initial value, empty array
+        if (!length &amp;&amp; arguments.length == 1) {
+            throw new TypeError('reduceRight of empty array with no initial value');
+        }
+
+        var result, i = length - 1;
+        if (arguments.length &gt;= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i--];
+                    break;
+                }
+
+                // if array contains no values, no initial value to return
+                if (--i &lt; 0) {
+                    throw new TypeError('reduceRight of empty array with no initial value');
+                }
+            } while (true);
+        }
+
+        do {
+            if (i in this) {
+                result = fun.call(void 0, result, self[i], i, self);
+            }
+        } while (i--);
+
+        return result;
+    };
+}
+
+// ES5 15.4.4.14
+// http://es5.github.com/#x15.4.4.14
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
+if (!Array.prototype.indexOf) {
+    Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0;
+
+        if (!length) {
+            return -1;
+        }
+
+        var i = 0;
+        if (arguments.length &gt; 1) {
+            i = toInteger(arguments[1]);
+        }
+
+        // handle negative indices
+        i = i &gt;= 0 ? i : Math.max(0, length + i);
+        for (; i &lt; length; i++) {
+            if (i in self &amp;&amp; self[i] === sought) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+
+// ES5 15.4.4.15
+// http://es5.github.com/#x15.4.4.15
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
+if (!Array.prototype.lastIndexOf) {
+    Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+        var self = toObject(this),
+            length = self.length &gt;&gt;&gt; 0;
+
+        if (!length) {
+            return -1;
+        }
+        var i = length - 1;
+        if (arguments.length &gt; 1) {
+            i = Math.min(i, toInteger(arguments[1]));
+        }
+        // handle negative indices
+        i = i &gt;= 0 ? i : length - Math.abs(i);
+        for (; i &gt;= 0; i--) {
+            if (i in self &amp;&amp; sought === self[i]) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+
+//
+// Object
+// ======
+//
+
+// ES5 15.2.3.14
+// http://es5.github.com/#x15.2.3.14
+if (!Object.keys) {
+    // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
+    var hasDontEnumBug = true,
+        dontEnums = [
+            &quot;toString&quot;,
+            &quot;toLocaleString&quot;,
+            &quot;valueOf&quot;,
+            &quot;hasOwnProperty&quot;,
+            &quot;isPrototypeOf&quot;,
+            &quot;propertyIsEnumerable&quot;,
+            &quot;constructor&quot;
+        ],
+        dontEnumsLength = dontEnums.length;
+
+    for (var key in {&quot;toString&quot;: null}) {
+        hasDontEnumBug = false;
+    }
+
+    Object.keys = function keys(object) {
+
+        if ((typeof object != &quot;object&quot; &amp;&amp; typeof object != &quot;function&quot;) || object === null) {
+            throw new TypeError(&quot;Object.keys called on a non-object&quot;);
+        }
+
+        var keys = [];
+        for (var name in object) {
+            if (owns(object, name)) {
+                keys.push(name);
+            }
+        }
+
+        if (hasDontEnumBug) {
+            for (var i = 0, ii = dontEnumsLength; i &lt; ii; i++) {
+                var dontEnum = dontEnums[i];
+                if (owns(object, dontEnum)) {
+                    keys.push(dontEnum);
+                }
+            }
+        }
+        return keys;
+    };
+
+}
+
+//
+// Date
+// ====
+//
+
+// ES5 15.9.5.43
+// http://es5.github.com/#x15.9.5.43
+// This function returns a String value represent the instance in time
+// represented by this Date object. The format of the String is the Date Time
+// string format defined in 15.9.1.15. All fields are present in the String.
+// The time zone is always UTC, denoted by the suffix Z. If the time value of
+// this object is not a finite Number a RangeError exception is thrown.
+if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
+    Date.prototype.toISOString = function toISOString() {
+        var result, length, value, year;
+        if (!isFinite(this)) {
+            throw new RangeError(&quot;Date.prototype.toISOString called on non-finite value.&quot;);
+        }
+
+        // the date time string format is specified in 15.9.1.15.
+        result = [this.getUTCMonth() + 1, this.getUTCDate(),
+            this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
+        year = this.getUTCFullYear();
+        year = (year &lt; 0 ? '-' : (year &gt; 9999 ? '+' : '')) + ('00000' + Math.abs(year)).slice(0 &lt;= year &amp;&amp; year &lt;= 9999 ? -4 : -6);
+
+        length = result.length;
+        while (length--) {
+            value = result[length];
+            // pad months, days, hours, minutes, and seconds to have two digits.
+            if (value &lt; 10) {
+                result[length] = &quot;0&quot; + value;
+            }
+        }
+        // pad milliseconds to have three digits.
+        return year + &quot;-&quot; + result.slice(0, 2).join(&quot;-&quot;) + &quot;T&quot; + result.slice(2).join(&quot;:&quot;) + &quot;.&quot; +
+            (&quot;000&quot; + this.getUTCMilliseconds()).slice(-3) + &quot;Z&quot;;
+    }
+}
+
+// ES5 15.9.4.4
+// http://es5.github.com/#x15.9.4.4
+if (!Date.now) {
+    Date.now = function now() {
+        return new Date().getTime();
+    };
+}
+
+// ES5 15.9.5.44
+// http://es5.github.com/#x15.9.5.44
+// This function provides a String representation of a Date object for use by
+// JSON.stringify (15.12.3).
+if (!Date.prototype.toJSON) {
+    Date.prototype.toJSON = function toJSON(key) {
+        // When the toJSON method is called with argument key, the following
+        // steps are taken:
+
+        // 1.  Let O be the result of calling ToObject, giving it the this
+        // value as its argument.
+        // 2. Let tv be ToPrimitive(O, hint Number).
+        // 3. If tv is a Number and is not finite, return null.
+        // XXX
+        // 4. Let toISO be the result of calling the [[Get]] internal method of
+        // O with argument &quot;toISOString&quot;.
+        // 5. If IsCallable(toISO) is false, throw a TypeError exception.
+        if (typeof this.toISOString != &quot;function&quot;) {
+            throw new TypeError('toISOString property is not callable');
+        }
+        // 6. Return the result of calling the [[Call]] internal method of
+        //  toISO with O as the this value and an empty argument list.
+        return this.toISOString();
+
+        // NOTE 1 The argument is ignored.
+
+        // NOTE 2 The toJSON function is intentionally generic; it does not
+        // require that its this value be a Date object. Therefore, it can be
+        // transferred to other kinds of objects for use as a method. However,
+        // it does require that any such object have a toISOString method. An
+        // object is free to use the argument key to filter its
+        // stringification.
+    };
+}
+
+// ES5 15.9.4.2
+// http://es5.github.com/#x15.9.4.2
+// based on work shared by Daniel Friesen (dantman)
+// http://gist.github.com/303249
+if (!Date.parse || Date.parse(&quot;+275760-09-13T00:00:00.000Z&quot;) !== 8.64e15) {
+    // XXX global assignment won't work in embeddings that use
+    // an alternate object for the context.
+    Date = (function(NativeDate) {
+
+        // Date.length === 7
+        var Date = function Date(Y, M, D, h, m, s, ms) {
+            var length = arguments.length;
+            if (this instanceof NativeDate) {
+                var date = length == 1 &amp;&amp; String(Y) === Y ? // isString(Y)
+                    // We explicitly pass it through parse:
+                    new NativeDate(Date.parse(Y)) :
+                    // We have to manually make calls depending on argument
+                    // length here
+                    length &gt;= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
+                    length &gt;= 6 ? new NativeDate(Y, M, D, h, m, s) :
+                    length &gt;= 5 ? new NativeDate(Y, M, D, h, m) :
+                    length &gt;= 4 ? new NativeDate(Y, M, D, h) :
+                    length &gt;= 3 ? new NativeDate(Y, M, D) :
+                    length &gt;= 2 ? new NativeDate(Y, M) :
+                    length &gt;= 1 ? new NativeDate(Y) :
+                                  new NativeDate();
+                // Prevent mixups with unfixed Date object
+                date.constructor = Date;
+                return date;
+            }
+            return NativeDate.apply(this, arguments);
+        };
+
+        // 15.9.1.15 Date Time String Format.
+        var isoDateExpression = new RegExp(&quot;^&quot; +
+            &quot;(\\d{4}|[\+\-]\\d{6})&quot; + // four-digit year capture or sign + 6-digit extended year
+            &quot;(?:-(\\d{2})&quot; + // optional month capture
+            &quot;(?:-(\\d{2})&quot; + // optional day capture
+            &quot;(?:&quot; + // capture hours:minutes:seconds.milliseconds
+                &quot;T(\\d{2})&quot; + // hours capture
+                &quot;:(\\d{2})&quot; + // minutes capture
+                &quot;(?:&quot; + // optional :seconds.milliseconds
+                    &quot;:(\\d{2})&quot; + // seconds capture
+                    &quot;(?:\\.(\\d{3}))?&quot; + // milliseconds capture
+                &quot;)?&quot; +
+            &quot;(?:&quot; + // capture UTC offset component
+                &quot;Z|&quot; + // UTC capture
+                &quot;(?:&quot; + // offset specifier +/-hours:minutes
+                    &quot;([-+])&quot; + // sign capture
+                    &quot;(\\d{2})&quot; + // hours offset capture
+                    &quot;:(\\d{2})&quot; + // minutes offset capture
+                &quot;)&quot; +
+            &quot;)?)?)?)?&quot; +
+        &quot;$&quot;);
+
+        // Copy any custom methods a 3rd party library may have added
+        for (var key in NativeDate) {
+            Date[key] = NativeDate[key];
+        }
+
+        // Copy &quot;native&quot; methods explicitly; they may be non-enumerable
+        Date.now = NativeDate.now;
+        Date.UTC = NativeDate.UTC;
+        Date.prototype = NativeDate.prototype;
+        Date.prototype.constructor = Date;
+
+        // Upgrade Date.parse to handle simplified ISO 8601 strings
+        Date.parse = function parse(string) {
+            var match = isoDateExpression.exec(string);
+            if (match) {
+                match.shift(); // kill match[0], the full match
+                // parse months, days, hours, minutes, seconds, and milliseconds
+                for (var i = 1; i &lt; 7; i++) {
+                    // provide default values if necessary
+                    match[i] = +(match[i] || (i &lt; 3 ? 1 : 0));
+                    // match[1] is the month. Months are 0-11 in JavaScript
+                    // `Date` objects, but 1-12 in ISO notation, so we
+                    // decrement.
+                    if (i == 1) {
+                        match[i]--;
+                    }
+                }
+
+                // parse the UTC offset component
+                var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
+
+                // compute the explicit time zone offset if specified
+                var offset = 0;
+                if (sign) {
+                    // detect invalid offsets and return early
+                    if (hourOffset &gt; 23 || minuteOffset &gt; 59) {
+                        return NaN;
+                    }
+
+                    // express the provided time zone offset in minutes. The offset is
+                    // negative for time zones west of UTC; positive otherwise.
+                    offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == &quot;+&quot; ? -1 : 1);
+                }
+
+                // Date.UTC for years between 0 and 99 converts year to 1900 + year
+                // The Gregorian calendar has a 400-year cycle, so
+                // to Date.UTC(year + 400, .... ) - 12622780800000 == Date.UTC(year, ...),
+                // where 12622780800000 - number of milliseconds in Gregorian calendar 400 years
+                var year = +match[0];
+                if (0 &lt;= year &amp;&amp; year &lt;= 99) {
+                    match[0] = year + 400;
+                    return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
+                }
+
+                // compute a new UTC date value, accounting for the optional offset
+                return NativeDate.UTC.apply(this, match) + offset;
+            }
+            return NativeDate.parse.apply(this, arguments);
+        };
+
+        return Date;
+    })(Date);
+}
+
+//
+// String
+// ======
+//
+
+// ES5 15.5.4.20
+// http://es5.github.com/#x15.5.4.20
+var ws = &quot;\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003&quot; +
+    &quot;\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028&quot; +
+    &quot;\u2029\uFEFF&quot;;
+if (!String.prototype.trim || ws.trim()) {
+    // http://blog.stevenlevithan.com/archives/faster-trim-javascript
+    // http://perfectionkills.com/whitespace-deviations/
+    ws = &quot;[&quot; + ws + &quot;]&quot;;
+    var trimBeginRegexp = new RegExp(&quot;^&quot; + ws + ws + &quot;*&quot;),
+        trimEndRegexp = new RegExp(ws + ws + &quot;*$&quot;);
+    String.prototype.trim = function trim() {
+        if (this === undefined || this === null) {
+            throw new TypeError(&quot;can't convert &quot;+this+&quot; to object&quot;);
+        }
+        return String(this).replace(trimBeginRegexp, &quot;&quot;).replace(trimEndRegexp, &quot;&quot;);
+    };
+}
+
+//
+// Util
+// ======
+//
+
+// ES5 9.4
+// http://es5.github.com/#x9.4
+// http://jsperf.com/to-integer
+var toInteger = function (n) {
+    n = +n;
+    if (n !== n) { // isNaN
+        n = 0;
+    } else if (n !== 0 &amp;&amp; n !== (1/0) &amp;&amp; n !== -(1/0)) {
+        n = (n &gt; 0 || -1) * Math.floor(Math.abs(n));
+    }
+    return n;
+};
+
+var prepareString = &quot;a&quot;[0] != &quot;a&quot;;
+    // ES5 9.9
+    // http://es5.github.com/#x9.9
+var toObject = function (o) {
+    if (o == null) { // this matches both null and undefined
+        throw new TypeError(&quot;can't convert &quot;+o+&quot; to object&quot;);
+    }
+    // If the implementation doesn't support by-index access of
+    // string characters (ex. IE &lt; 9), split the string
+    if (prepareString &amp;&amp; typeof o == &quot;string&quot; &amp;&amp; o) {
+        return o.split(&quot;&quot;);
+    }
+    return Object(o);
+};
+
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibadvicejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [
+    './compose'
+  ],
+
+  function(compose) {
+    'use strict';
+
+    var advice = {
+
+      around: function(base, wrapped) {
+        return function composedAround() {
+          // unpacking arguments by hand benchmarked faster
+          var i = 0, l = arguments.length, args = new Array(l + 1);
+          args[0] = base.bind(this);
+          for (; i &lt; l; i++) args[i + 1] = arguments[i];
+
+          return wrapped.apply(this, args);
+        };
+      },
+
+      before: function(base, before) {
+        var beforeFn = (typeof before == 'function') ? before : before.obj[before.fnName];
+        return function composedBefore() {
+          beforeFn.apply(this, arguments);
+          return base.apply(this, arguments);
+        };
+      },
+
+      after: function(base, after) {
+        var afterFn = (typeof after == 'function') ? after : after.obj[after.fnName];
+        return function composedAfter() {
+          var res = (base.unbound || base).apply(this, arguments);
+          afterFn.apply(this, arguments);
+          return res;
+        };
+      },
+
+      // a mixin that allows other mixins to augment existing functions by adding additional
+      // code before, after or around.
+      withAdvice: function() {
+        ['before', 'after', 'around'].forEach(function(m) {
+          this[m] = function(method, fn) {
+
+            compose.unlockProperty(this, method, function() {
+              if (typeof this[method] == 'function') {
+                this[method] = advice[m](this[method], fn);
+              } else {
+                this[method] = fn;
+              }
+
+              return this[method];
+            });
+
+          };
+        }, this);
+      }
+    };
+
+    return advice;
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibbasejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,219 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [
+    './utils',
+    './registry',
+    './debug'
+  ],
+
+  function(utils, registry, debug) {
+    'use strict';
+
+    // common mixin allocates basic functionality - used by all component prototypes
+    // callback context is bound to component
+    var componentId = 0;
+
+    function teardownInstance(instanceInfo){
+      instanceInfo.events.slice().forEach(function(event) {
+        var args = [event.type];
+
+        event.element &amp;&amp; args.unshift(event.element);
+        (typeof event.callback == 'function') &amp;&amp; args.push(event.callback);
+
+        this.off.apply(this, args);
+      }, instanceInfo.instance);
+    }
+
+    function checkSerializable(type, data) {
+      try {
+        window.postMessage(data, '*');
+      } catch(e) {
+        console.log('unserializable data for event',type,':',data);
+        throw new Error(
+          ['The event', type, 'on component', this.toString(), 'was triggered with non-serializable data'].join(' ')
+        );
+      }
+    }
+
+    function withBase() {
+
+      // delegate trigger, bind and unbind to an element
+      // if $element not supplied, use component's node
+      // other arguments are passed on
+      // event can be either a string specifying the type
+      // of the event, or a hash specifying both the type
+      // and a default function to be called.
+      this.trigger = function() {
+        var $element, type, data, event, defaultFn;
+        var lastIndex = arguments.length - 1, lastArg = arguments[lastIndex];
+
+        if (typeof lastArg != 'string' &amp;&amp; !(lastArg &amp;&amp; lastArg.defaultBehavior)) {
+          lastIndex--;
+          data = lastArg;
+        }
+
+        if (lastIndex == 1) {
+          $element = $(arguments[0]);
+          event = arguments[1];
+        } else {
+          $element = this.$node;
+          event = arguments[0];
+        }
+
+        if (event.defaultBehavior) {
+          defaultFn = event.defaultBehavior;
+          event = $.Event(event.type);
+        }
+
+        type = event.type || event;
+
+        if (debug.enabled &amp;&amp; window.postMessage) {
+          checkSerializable.call(this, type, data);
+        }
+
+        if (typeof this.attr.eventData === 'object') {
+          data = $.extend(true, {}, this.attr.eventData, data);
+        }
+
+        $element.trigger((event || type), data);
+
+        if (defaultFn &amp;&amp; !event.isDefaultPrevented()) {
+          (this[defaultFn] || defaultFn).call(this);
+        }
+
+        return $element;
+      };
+
+      this.on = function() {
+        var $element, type, callback, originalCb;
+        var lastIndex = arguments.length - 1, origin = arguments[lastIndex];
+
+        if (typeof origin == 'object') {
+          //delegate callback
+          originalCb = utils.delegate(
+            this.resolveDelegateRules(origin)
+          );
+        } else {
+          originalCb = origin;
+        }
+
+        if (lastIndex == 2) {
+          $element = $(arguments[0]);
+          type = arguments[1];
+        } else {
+          $element = this.$node;
+          type = arguments[0];
+        }
+
+        if (typeof originalCb != 'function' &amp;&amp; typeof originalCb != 'object') {
+          throw new Error('Unable to bind to &quot;' + type + '&quot; because the given callback is not a function or an object');
+        }
+
+        callback = originalCb.bind(this);
+        callback.target = originalCb;
+
+        // if the original callback is already branded by jQuery's guid, copy it to the context-bound version
+        if (originalCb.guid) {
+          callback.guid = originalCb.guid;
+        }
+
+        $element.on(type, callback);
+
+        // get jquery's guid from our bound fn, so unbinding will work
+        originalCb.guid = callback.guid;
+
+        return callback;
+      };
+
+      this.off = function() {
+        var $element, type, callback;
+        var lastIndex = arguments.length - 1;
+
+        if (typeof arguments[lastIndex] == 'function') {
+          callback = arguments[lastIndex];
+          lastIndex -= 1;
+        }
+
+        if (lastIndex == 1) {
+          $element = $(arguments[0]);
+          type = arguments[1];
+        } else {
+          $element = this.$node;
+          type = arguments[0];
+        }
+
+        return $element.off(type, callback);
+      };
+
+      this.resolveDelegateRules = function(ruleInfo) {
+        var rules = {};
+
+        Object.keys(ruleInfo).forEach(function(r) {
+          if (!(r in this.attr)) {
+            throw new Error('Component &quot;' + this.toString() + '&quot; wants to listen on &quot;' + r + '&quot; but no such attribute was defined.');
+          }
+          rules[this.attr[r]] = ruleInfo[r];
+        }, this);
+
+        return rules;
+      };
+
+      this.defaultAttrs = function(defaults) {
+        utils.push(this.defaults, defaults, true) || (this.defaults = defaults);
+      };
+
+      this.select = function(attributeKey) {
+        return this.$node.find(this.attr[attributeKey]);
+      };
+
+      this.initialize = function(node, attrs) {
+        attrs || (attrs = {});
+        //only assign identity if there isn't one (initialize can be called multiple times)
+        this.identity || (this.identity = componentId++);
+
+        if (!node) {
+          throw new Error('Component needs a node');
+        }
+
+        if (node.jquery) {
+          this.node = node[0];
+          this.$node = node;
+        } else {
+          this.node = node;
+          this.$node = $(node);
+        }
+
+        // merge defaults with supplied options
+        // put options in attr.__proto__ to avoid merge overhead
+        var attr = Object.create(attrs);
+        for (var key in this.defaults) {
+          if (!attrs.hasOwnProperty(key)) {
+            attr[key] = this.defaults[key];
+          }
+        }
+
+        this.attr = attr;
+
+        Object.keys(this.defaults || {}).forEach(function(key) {
+          if (this.defaults[key] === null &amp;&amp; this.attr[key] === null) {
+            throw new Error('Required attribute &quot;' + key + '&quot; not specified in attachTo for component &quot;' + this.toString() + '&quot;.');
+          }
+        }, this);
+
+        return this;
+      };
+
+      this.teardown = function() {
+        teardownInstance(registry.findInstanceInfo(this));
+      };
+    }
+
+    return withBase;
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibcomponentjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [
+    './advice',
+    './utils',
+    './compose',
+    './base',
+    './registry',
+    './logger',
+    './debug'
+  ],
+
+  function(advice, utils, compose, withBase, registry, withLogging, debug) {
+    'use strict';
+
+    var functionNameRegEx = /function (.*?)\s?\(/;
+
+    // teardown for all instances of this constructor
+    function teardownAll() {
+      var componentInfo = registry.findComponentInfo(this);
+
+      componentInfo &amp;&amp; Object.keys(componentInfo.instances).forEach(function(k) {
+        var info = componentInfo.instances[k];
+        info.instance.teardown();
+      });
+    }
+
+    function checkSerializable(type, data) {
+      try {
+        window.postMessage(data, '*');
+      } catch(e) {
+        console.log('unserializable data for event',type,':',data);
+        throw new Error(
+          ['The event', type, 'on component', this.toString(), 'was triggered with non-serializable data'].join(' ')
+        );
+      }
+    }
+
+    function attachTo(selector/*, options args */) {
+      // unpacking arguments by hand benchmarked faster
+      var l = arguments.length;
+      var args = new Array(l - 1);
+      for (var i = 1; i &lt; l; i++) args[i - 1] = arguments[i];
+
+      if (!selector) {
+        throw new Error('Component needs to be attachTo\'d a jQuery object, native node or selector string');
+      }
+
+      var options = utils.merge.apply(utils, args);
+      var componentInfo = registry.findComponentInfo(this);
+
+      $(selector).each(function(i, node) {
+        if (componentInfo &amp;&amp; componentInfo.isAttachedTo(node)) {
+          // already attached
+          return;
+        }
+
+        (new this).initialize(node, options);
+      }.bind(this));
+    }
+
+    // define the constructor for a custom component type
+    // takes an unlimited number of mixin functions as arguments
+    // typical api call with 3 mixins: define(timeline, withTweetCapability, withScrollCapability);
+    function define(/*mixins*/) {
+      // unpacking arguments by hand benchmarked faster
+      var l = arguments.length;
+      // add three for common mixins
+      var mixins = new Array(l + 3);
+      for (var i = 0; i &lt; l; i++) mixins[i] = arguments[i];
+
+      var Component = function() {};
+
+      Component.toString = Component.prototype.toString = function() {
+        var prettyPrintMixins = mixins.map(function(mixin) {
+          if (mixin.name == null) {
+            // function name property not supported by this browser, use regex
+            var m = mixin.toString().match(functionNameRegEx);
+            return (m &amp;&amp; m[1]) ? m[1] : '';
+          } else {
+            return (mixin.name != 'withBase') ? mixin.name : '';
+          }
+        }).filter(Boolean).join(', ');
+        return prettyPrintMixins;
+      };
+
+      if (debug.enabled) {
+        Component.describe = Component.prototype.describe = Component.toString();
+      }
+
+      // 'options' is optional hash to be merged with 'defaults' in the component definition
+      Component.attachTo = attachTo;
+      Component.teardownAll = teardownAll;
+
+      // prepend common mixins to supplied list, then mixin all flavors
+      if (debug.enabled) {
+        mixins.unshift(withLogging);
+      }
+      mixins.unshift(withBase, advice.withAdvice, registry.withRegistration);
+      compose.mixin(Component.prototype, mixins);
+
+      return Component;
+    }
+
+    define.teardownAll = function() {
+      registry.components.slice().forEach(function(c) {
+        c.component.teardownAll();
+      });
+      registry.reset();
+    };
+
+    return define;
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibcomposejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [
+    './utils',
+    './debug'
+  ],
+
+  function(utils, debug) {
+    'use strict';
+
+    //enumerables are shims - getOwnPropertyDescriptor shim doesn't work
+    var canWriteProtect = debug.enabled &amp;&amp; !utils.isEnumerable(Object, 'getOwnPropertyDescriptor');
+    //whitelist of unlockable property names
+    var dontLock = ['mixedIn'];
+
+    if (canWriteProtect) {
+      //IE8 getOwnPropertyDescriptor is built-in but throws exeption on non DOM objects
+      try {
+        Object.getOwnPropertyDescriptor(Object, 'keys');
+      } catch(e) {
+        canWriteProtect = false;
+      }
+    }
+
+    function setPropertyWritability(obj, isWritable) {
+      if (!canWriteProtect) {
+        return;
+      }
+
+      var props = Object.create(null);
+
+      Object.keys(obj).forEach(
+        function (key) {
+          if (dontLock.indexOf(key) &lt; 0) {
+            var desc = Object.getOwnPropertyDescriptor(obj, key);
+            desc.writable = isWritable;
+            props[key] = desc;
+          }
+        }
+      );
+
+      Object.defineProperties(obj, props);
+    }
+
+    function unlockProperty(obj, prop, op) {
+      var writable;
+
+      if (!canWriteProtect || !obj.hasOwnProperty(prop)) {
+        op.call(obj);
+        return;
+      }
+
+      writable = Object.getOwnPropertyDescriptor(obj, prop).writable;
+      Object.defineProperty(obj, prop, { writable: true });
+      op.call(obj);
+      Object.defineProperty(obj, prop, { writable: writable });
+    }
+
+    function mixin(base, mixins) {
+      base.mixedIn = base.hasOwnProperty('mixedIn') ? base.mixedIn : [];
+
+      mixins.forEach(function(mixin) {
+        if (base.mixedIn.indexOf(mixin) == -1) {
+          setPropertyWritability(base, false);
+          mixin.call(base);
+          base.mixedIn.push(mixin);
+        }
+      });
+
+      setPropertyWritability(base, true);
+    }
+
+    return {
+      mixin: mixin,
+      unlockProperty: unlockProperty
+    };
+
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibdebugjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,157 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [],
+
+  function() {
+    'use strict';
+
+    //******************************************************************************************
+    // Search object model
+    //******************************************************************************************
+
+    function traverse(util, searchTerm, options) {
+      options = options || {};
+      var obj = options.obj || window;
+      var path = options.path || ((obj==window) ? 'window' : '');
+      var props = Object.keys(obj);
+      props.forEach(function(prop) {
+        if ((tests[util] || util)(searchTerm, obj, prop)){
+          console.log([path, '.', prop].join(''), '-&gt;', ['(', typeof obj[prop], ')'].join(''), obj[prop]);
+        }
+        if (Object.prototype.toString.call(obj[prop]) == '[object Object]' &amp;&amp; (obj[prop] != obj) &amp;&amp; path.split('.').indexOf(prop) == -1) {
+          traverse(util, searchTerm, {obj: obj[prop], path: [path,prop].join('.')});
+        }
+      });
+    }
+
+    function search(util, expected, searchTerm, options) {
+      if (!expected || typeof searchTerm == expected) {
+        traverse(util, searchTerm, options);
+      } else {
+        console.error([searchTerm, 'must be', expected].join(' '));
+      }
+    }
+
+    var tests = {
+      'name': function(searchTerm, obj, prop) {return searchTerm == prop;},
+      'nameContains': function(searchTerm, obj, prop) {return prop.indexOf(searchTerm) &gt; -1;},
+      'type': function(searchTerm, obj, prop) {return obj[prop] instanceof searchTerm;},
+      'value': function(searchTerm, obj, prop) {return obj[prop] === searchTerm;},
+      'valueCoerced': function(searchTerm, obj, prop) {return obj[prop] == searchTerm;}
+    };
+
+    function byName(searchTerm, options) {search('name', 'string', searchTerm, options);}
+    function byNameContains(searchTerm, options) {search('nameContains', 'string', searchTerm, options);}
+    function byType(searchTerm, options) {search('type', 'function', searchTerm, options);}
+    function byValue(searchTerm, options) {search('value', null, searchTerm, options);}
+    function byValueCoerced(searchTerm, options) {search('valueCoerced', null, searchTerm, options);}
+    function custom(fn, options) {traverse(fn, null, options);}
+
+    //******************************************************************************************
+    // Event logging
+    //******************************************************************************************
+
+    var ALL = 'all'; //no filter
+
+    //no logging by default
+    var defaultEventNamesFilter = [];
+    var defaultActionsFilter = [];
+
+    var logFilter = retrieveLogFilter();
+
+    function filterEventLogsByAction(/*actions*/) {
+      var actions = [].slice.call(arguments);
+
+      logFilter.eventNames.length || (logFilter.eventNames = ALL);
+      logFilter.actions = actions.length ? actions : ALL;
+      saveLogFilter();
+    }
+
+    function filterEventLogsByName(/*eventNames*/) {
+      var eventNames = [].slice.call(arguments);
+
+      logFilter.actions.length || (logFilter.actions = ALL);
+      logFilter.eventNames = eventNames.length ? eventNames : ALL;
+      saveLogFilter();
+    }
+
+    function hideAllEventLogs() {
+      logFilter.actions = [];
+      logFilter.eventNames = [];
+      saveLogFilter();
+    }
+
+    function showAllEventLogs() {
+      logFilter.actions = ALL;
+      logFilter.eventNames = ALL;
+      saveLogFilter();
+    }
+
+    function saveLogFilter() {
+      if (window.localStorage) {
+        localStorage.setItem('logFilter_eventNames', logFilter.eventNames);
+        localStorage.setItem('logFilter_actions', logFilter.actions);
+      }
+    }
+
+    function retrieveLogFilter() {
+      var result = {
+        eventNames: (window.localStorage &amp;&amp; localStorage.getItem('logFilter_eventNames')) || defaultEventNamesFilter,
+        actions: (window.localStorage &amp;&amp; localStorage.getItem('logFilter_actions')) || defaultActionsFilter
+      };
+
+      // reconstitute arrays
+      Object.keys(result).forEach(function(k) {
+        var thisProp = result[k];
+        if (typeof thisProp == 'string' &amp;&amp; thisProp !== ALL) {
+          result[k] = thisProp.split(',');
+        }
+      });
+      return result;
+    }
+
+    return {
+
+      enable: function(enable) {
+        this.enabled = !!enable;
+
+        if (enable &amp;&amp; window.console) {
+          console.info('Booting in DEBUG mode');
+          console.info('You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()');
+        }
+
+        window.DEBUG = this;
+      },
+
+      find: {
+        byName: byName,
+        byNameContains: byNameContains,
+        byType: byType,
+        byValue: byValue,
+        byValueCoerced: byValueCoerced,
+        custom: custom
+      },
+
+      events: {
+        logFilter: logFilter,
+
+        // Accepts any number of action args
+        // e.g. DEBUG.events.logByAction(&quot;on&quot;, &quot;off&quot;)
+        logByAction: filterEventLogsByAction,
+
+        // Accepts any number of event name args (inc. regex or wildcards)
+        // e.g. DEBUG.events.logByName(/ui.*/, &quot;*Thread*&quot;);
+        logByName: filterEventLogsByName,
+
+        logAll: showAllEventLogs,
+        logNone: hideAllEventLogs
+      }
+    };
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibindexjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [
+    './advice',
+    './component',
+    './compose',
+    './logger',
+    './registry',
+    './utils'
+  ],
+
+  function(advice, component, compose, logger, registry, utils) {
+    'use strict';
+
+    return {
+      advice: advice,
+      component: component,
+      compose: compose,
+      logger: logger,
+      registry: registry,
+      utils: utils
+    };
+
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibloggerjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [
+    './utils'
+  ],
+
+  function(utils) {
+    'use strict';
+
+    var actionSymbols = {
+      on: '&lt;-',
+      trigger: '-&gt;',
+      off: 'x '
+    };
+
+    function elemToString(elem) {
+      var tagStr = elem.tagName ? elem.tagName.toLowerCase() : elem.toString();
+      var classStr = elem.className ? '.' + (elem.className) : '';
+      var result = tagStr + classStr;
+      return elem.tagName ? ['\'', '\''].join(result) : result;
+    }
+
+    function log(action, component, eventArgs) {
+      var name, elem, fn, logFilter, toRegExp, actionLoggable, nameLoggable;
+
+      if (typeof eventArgs[eventArgs.length-1] == 'function') {
+        fn = eventArgs.pop();
+        fn = fn.unbound || fn; // use unbound version if any (better info)
+      }
+
+      if (typeof eventArgs[eventArgs.length - 1] == 'object') {
+        eventArgs.pop(); // trigger data arg - not logged right now
+      }
+
+      if (eventArgs.length == 2) {
+        elem = eventArgs[0];
+        name = eventArgs[1];
+      } else {
+        elem = component.$node[0];
+        name = eventArgs[0];
+      }
+
+      if (window.DEBUG &amp;&amp; window.DEBUG.enabled) {
+        logFilter = DEBUG.events.logFilter;
+
+        // no regex for you, actions...
+        actionLoggable = logFilter.actions == 'all' || (logFilter.actions.indexOf(action) &gt; -1);
+        // event name filter allow wildcards or regex...
+        toRegExp = function(expr) {
+          return expr.test ? expr : new RegExp('^' + expr.replace(/\*/g, '.*') + '$');
+        };
+        nameLoggable =
+          logFilter.eventNames == 'all' ||
+          logFilter.eventNames.some(function(e) {return toRegExp(e).test(name);});
+
+        if (actionLoggable &amp;&amp; nameLoggable) {
+          console.info(
+            actionSymbols[action],
+            action,
+            '[' + name + ']',
+            elemToString(elem),
+            component.constructor.describe.split(' ').slice(0,3).join(' ') // two mixins only
+          );
+        }
+      }
+    }
+
+    function withLogging() {
+      this.before('trigger', function() {
+        log('trigger', this, utils.toArray(arguments));
+      });
+      this.before('on', function() {
+        log('on', this, utils.toArray(arguments));
+      });
+      this.before('off', function() {
+        log('off', this, utils.toArray(arguments));
+      });
+    }
+
+    return withLogging;
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibregistryjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,222 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [],
+
+  function() {
+    'use strict';
+
+    function parseEventArgs(instance, args) {
+      var element, type, callback;
+      var end = args.length;
+
+      if (typeof args[end - 1] === 'function') {
+        end -= 1;
+        callback = args[end];
+      }
+
+      if (typeof args[end - 1] === 'object') {
+        end -= 1;
+      }
+
+      if (end == 2) {
+        element = args[0];
+        type = args[1];
+      } else {
+        element = instance.node;
+        type = args[0];
+      }
+
+      return {
+        element: element,
+        type: type,
+        callback: callback
+      };
+    }
+
+    function matchEvent(a, b) {
+      return (
+        (a.element == b.element) &amp;&amp;
+        (a.type == b.type) &amp;&amp;
+        (b.callback == null || (a.callback == b.callback))
+      );
+    }
+
+    function Registry() {
+
+      var registry = this;
+
+      (this.reset = function() {
+        this.components = [];
+        this.allInstances = {};
+        this.events = [];
+      }).call(this);
+
+      function ComponentInfo(component) {
+        this.component = component;
+        this.attachedTo = [];
+        this.instances = {};
+
+        this.addInstance = function(instance) {
+          var instanceInfo = new InstanceInfo(instance);
+          this.instances[instance.identity] = instanceInfo;
+          this.attachedTo.push(instance.node);
+
+          return instanceInfo;
+        };
+
+        this.removeInstance = function(instance) {
+          delete this.instances[instance.identity];
+          var indexOfNode = this.attachedTo.indexOf(instance.node);
+          (indexOfNode &gt; -1) &amp;&amp; this.attachedTo.splice(indexOfNode, 1);
+
+          if (!Object.keys(this.instances).length) {
+            //if I hold no more instances remove me from registry
+            registry.removeComponentInfo(this);
+          }
+        };
+
+        this.isAttachedTo = function(node) {
+          return this.attachedTo.indexOf(node) &gt; -1;
+        };
+      }
+
+      function InstanceInfo(instance) {
+        this.instance = instance;
+        this.events = [];
+
+        this.addBind = function(event) {
+          this.events.push(event);
+          registry.events.push(event);
+        };
+
+        this.removeBind = function(event) {
+          for (var i = 0, e; e = this.events[i]; i++) {
+            if (matchEvent(e, event)) {
+              this.events.splice(i, 1);
+            }
+          }
+        };
+      }
+
+      this.addInstance = function(instance) {
+        var component = this.findComponentInfo(instance);
+
+        if (!component) {
+          component = new ComponentInfo(instance.constructor);
+          this.components.push(component);
+        }
+
+        var inst = component.addInstance(instance);
+
+        this.allInstances[instance.identity] = inst;
+
+        return component;
+      };
+
+      this.removeInstance = function(instance) {
+        var index, instInfo = this.findInstanceInfo(instance);
+
+        //remove from component info
+        var componentInfo = this.findComponentInfo(instance);
+        componentInfo &amp;&amp; componentInfo.removeInstance(instance);
+
+        //remove from registry
+        delete this.allInstances[instance.identity];
+      };
+
+      this.removeComponentInfo = function(componentInfo) {
+        var index = this.components.indexOf(componentInfo);
+        (index &gt; -1) &amp;&amp; this.components.splice(index, 1);
+      };
+
+      this.findComponentInfo = function(which) {
+        var component = which.attachTo ? which : which.constructor;
+
+        for (var i = 0, c; c = this.components[i]; i++) {
+          if (c.component === component) {
+            return c;
+          }
+        }
+
+        return null;
+      };
+
+      this.findInstanceInfo = function(instance) {
+        return this.allInstances[instance.identity] || null;
+      };
+
+      this.findInstanceInfoByNode = function(node) {
+        var result = [];
+        Object.keys(this.allInstances).forEach(function(k) {
+          var thisInstanceInfo = this.allInstances[k];
+          if (thisInstanceInfo.instance.node === node) {
+            result.push(thisInstanceInfo);
+          }
+        }, this);
+        return result;
+      };
+
+      this.on = function(componentOn) {
+        var instance = registry.findInstanceInfo(this), boundCallback;
+
+        // unpacking arguments by hand benchmarked faster
+        var l = arguments.length, i = 1;
+        var otherArgs = new Array(l - 1);
+        for (; i &lt; l; i++) otherArgs[i - 1] = arguments[i];
+
+        if (instance) {
+          boundCallback = componentOn.apply(null, otherArgs);
+          if (boundCallback) {
+            otherArgs[otherArgs.length-1] = boundCallback;
+          }
+          var event = parseEventArgs(this, otherArgs);
+          instance.addBind(event);
+        }
+      };
+
+      this.off = function(/*el, type, callback*/) {
+        var event = parseEventArgs(this, arguments),
+            instance = registry.findInstanceInfo(this);
+
+        if (instance) {
+          instance.removeBind(event);
+        }
+
+        //remove from global event registry
+        for (var i = 0, e; e = registry.events[i]; i++) {
+          if (matchEvent(e, event)) {
+            registry.events.splice(i, 1);
+          }
+        }
+      };
+
+      // debug tools may want to add advice to trigger
+      registry.trigger = function() {};
+
+      this.teardown = function() {
+        registry.removeInstance(this);
+      };
+
+      this.withRegistration = function() {
+        this.after('initialize', function() {
+          registry.addInstance(this);
+        });
+
+        this.around('on', registry.on);
+        this.after('off', registry.off);
+        //debug tools may want to add advice to trigger
+        window.DEBUG &amp;&amp; DEBUG.enabled &amp;&amp; this.after('trigger', registry.trigger);
+        this.after('teardown', {obj: registry, fnName: 'teardown'});
+      };
+
+    }
+
+    return new Registry;
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsflightlibutilsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,235 @@
</span><ins>+// ==========================================
+// Copyright 2013 Twitter, Inc
+// Licensed under The MIT License
+// http://opensource.org/licenses/MIT
+// ==========================================
+
+define(
+
+  [],
+
+  function() {
+    'use strict';
+
+    var arry = [];
+    var DEFAULT_INTERVAL = 100;
+
+    var utils = {
+
+      isDomObj: function(obj) {
+        return !!(obj.nodeType || (obj === window));
+      },
+
+      toArray: function(obj, from) {
+        return arry.slice.call(obj, from);
+      },
+
+      // returns new object representing multiple objects merged together
+      // optional final argument is boolean which specifies if merge is recursive
+      // original objects are unmodified
+      //
+      // usage:
+      //   var base = {a:2, b:6};
+      //   var extra = {b:3, c:4};
+      //   merge(base, extra); //{a:2, b:3, c:4}
+      //   base; //{a:2, b:6}
+      //
+      //   var base = {a:2, b:6};
+      //   var extra = {b:3, c:4};
+      //   var extraExtra = {a:4, d:9};
+      //   merge(base, extra, extraExtra); //{a:4, b:3, c:4. d: 9}
+      //   base; //{a:2, b:6}
+      //
+      //   var base = {a:2, b:{bb:4, cc:5}};
+      //   var extra = {a:4, b:{cc:7, dd:1}};
+      //   merge(base, extra, true); //{a:4, b:{bb:4, cc:7, dd:1}}
+      //   base; //{a:2, b:6}
+
+      merge: function(/*obj1, obj2,....deepCopy*/) {
+        // unpacking arguments by hand benchmarked faster
+        var l = arguments.length,
+            i = 0,
+            args = new Array(l + 1);
+        for (; i &lt; l; i++) args[i + 1] = arguments[i];
+
+        if (l === 0) {
+          return {};
+        }
+
+        //start with empty object so a copy is created
+        args[0] = {};
+
+        if (args[args.length - 1] === true) {
+          //jquery extend requires deep copy as first arg
+          args.pop();
+          args.unshift(true);
+        }
+
+        return $.extend.apply(undefined, args);
+      },
+
+      // updates base in place by copying properties of extra to it
+      // optionally clobber protected
+      // usage:
+      //   var base = {a:2, b:6};
+      //   var extra = {c:4};
+      //   push(base, extra); //{a:2, b:6, c:4}
+      //   base; //{a:2, b:6, c:4}
+      //
+      //   var base = {a:2, b:6};
+      //   var extra = {b: 4 c:4};
+      //   push(base, extra, true); //Error (&quot;utils.push attempted to overwrite 'b' while running in protected mode&quot;)
+      //   base; //{a:2, b:6}
+      //
+      // objects with the same key will merge recursively when protect is false
+      // eg:
+      // var base = {a:16, b:{bb:4, cc:10}};
+      // var extra = {b:{cc:25, dd:19}, c:5};
+      // push(base, extra); //{a:16, {bb:4, cc:25, dd:19}, c:5}
+      //
+      push: function(base, extra, protect) {
+        if (base) {
+          Object.keys(extra || {}).forEach(function(key) {
+            if (base[key] &amp;&amp; protect) {
+              throw new Error('utils.push attempted to overwrite &quot;' + key + '&quot; while running in protected mode');
+            }
+
+            if (typeof base[key] == 'object' &amp;&amp; typeof extra[key] == 'object') {
+              // recurse
+              this.push(base[key], extra[key]);
+            } else {
+              // no protect, so extra wins
+              base[key] = extra[key];
+            }
+          }, this);
+        }
+
+        return base;
+      },
+
+      isEnumerable: function(obj, property) {
+        return Object.keys(obj).indexOf(property) &gt; -1;
+      },
+
+      // build a function from other function(s)
+      // utils.compose(a,b,c) -&gt; a(b(c()));
+      // implementation lifted from underscore.js (c) 2009-2012 Jeremy Ashkenas
+      compose: function() {
+        var funcs = arguments;
+
+        return function() {
+          var args = arguments;
+
+          for (var i = funcs.length-1; i &gt;= 0; i--) {
+            args = [funcs[i].apply(this, args)];
+          }
+
+          return args[0];
+        };
+      },
+
+      // Can only unique arrays of homogeneous primitives, e.g. an array of only strings, an array of only booleans, or an array of only numerics
+      uniqueArray: function(array) {
+        var u = {}, a = [];
+
+        for (var i = 0, l = array.length; i &lt; l; ++i) {
+          if (u.hasOwnProperty(array[i])) {
+            continue;
+          }
+
+          a.push(array[i]);
+          u[array[i]] = 1;
+        }
+
+        return a;
+      },
+
+      debounce: function(func, wait, immediate) {
+        if (typeof wait != 'number') {
+          wait = DEFAULT_INTERVAL;
+        }
+
+        var timeout, result;
+
+        return function() {
+          var context = this, args = arguments;
+          var later = function() {
+            timeout = null;
+            if (!immediate) {
+              result = func.apply(context, args);
+            }
+          };
+          var callNow = immediate &amp;&amp; !timeout;
+
+          clearTimeout(timeout);
+          timeout = setTimeout(later, wait);
+
+          if (callNow) {
+            result = func.apply(context, args);
+          }
+
+          return result;
+        };
+      },
+
+      throttle: function(func, wait) {
+        if (typeof wait != 'number') {
+          wait = DEFAULT_INTERVAL;
+        }
+
+        var context, args, timeout, throttling, more, result;
+        var whenDone = this.debounce(function(){
+          more = throttling = false;
+        }, wait);
+
+        return function() {
+          context = this; args = arguments;
+          var later = function() {
+            timeout = null;
+            if (more) {
+              result = func.apply(context, args);
+            }
+            whenDone();
+          };
+
+          if (!timeout) {
+            timeout = setTimeout(later, wait);
+          }
+
+          if (throttling) {
+            more = true;
+          } else {
+            throttling = true;
+            result = func.apply(context, args);
+          }
+
+          whenDone();
+          return result;
+        };
+      },
+
+      countThen: function(num, base) {
+        return function() {
+          if (!--num) { return base.apply(this, arguments); }
+        };
+      },
+
+      delegate: function(rules) {
+        return function(e, data) {
+          var target = $(e.target), parent;
+
+          Object.keys(rules).forEach(function(selector) {
+            if ((parent = target.closest(selector)).length) {
+              data = data || {};
+              data.el = parent[0];
+              return rules[selector].apply(this, [e, data]);
+            }
+          }, this);
+        };
+      }
+
+    };
+
+    return utils;
+  }
+);
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsjqueryjqueryjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,9472 @@
</span><ins>+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function( window, undefined ) {
+var
+        // A central reference to the root jQuery(document)
+        rootjQuery,
+
+        // The deferred used on DOM ready
+        readyList,
+
+        // Use the correct document accordingly with window argument (sandbox)
+        document = window.document,
+        location = window.location,
+        navigator = window.navigator,
+
+        // Map over jQuery in case of overwrite
+        _jQuery = window.jQuery,
+
+        // Map over the $ in case of overwrite
+        _$ = window.$,
+
+        // Save a reference to some core methods
+        core_push = Array.prototype.push,
+        core_slice = Array.prototype.slice,
+        core_indexOf = Array.prototype.indexOf,
+        core_toString = Object.prototype.toString,
+        core_hasOwn = Object.prototype.hasOwnProperty,
+        core_trim = String.prototype.trim,
+
+        // Define a local copy of jQuery
+        jQuery = function( selector, context ) {
+                // The jQuery object is actually just the init constructor 'enhanced'
+                return new jQuery.fn.init( selector, context, rootjQuery );
+        },
+
+        // Used for matching numbers
+        core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+        // Used for detecting and trimming whitespace
+        core_rnotwhite = /\S/,
+        core_rspace = /\s+/,
+
+        // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+        rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+        // A simple way to check for HTML strings
+        // Prioritize #id over &lt;tag&gt; to avoid XSS via location.hash (#9521)
+        rquickExpr = /^(?:[^#&lt;]*(&lt;[\w\W]+&gt;)[^&gt;]*$|#([\w\-]*)$)/,
+
+        // Match a standalone tag
+        rsingleTag = /^&lt;(\w+)\s*\/?&gt;(?:&lt;\/\1&gt;|)$/,
+
+        // JSON RegExp
+        rvalidchars = /^[\],:{}\s]*$/,
+        rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+        rvalidescape = /\\(?:[&quot;\\\/bfnrt]|u[\da-fA-F]{4})/g,
+        rvalidtokens = /&quot;[^&quot;\\\r\n]*&quot;|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+        // Matches dashed string for camelizing
+        rmsPrefix = /^-ms-/,
+        rdashAlpha = /-([\da-z])/gi,
+
+        // Used by jQuery.camelCase as callback to replace()
+        fcamelCase = function( all, letter ) {
+                return ( letter + &quot;&quot; ).toUpperCase();
+        },
+
+        // The ready event handler and self cleanup method
+        DOMContentLoaded = function() {
+                if ( document.addEventListener ) {
+                        document.removeEventListener( &quot;DOMContentLoaded&quot;, DOMContentLoaded, false );
+                        jQuery.ready();
+                } else if ( document.readyState === &quot;complete&quot; ) {
+                        // we're here because readyState === &quot;complete&quot; in oldIE
+                        // which is good enough for us to call the dom ready!
+                        document.detachEvent( &quot;onreadystatechange&quot;, DOMContentLoaded );
+                        jQuery.ready();
+                }
+        },
+
+        // [[Class]] -&gt; type pairs
+        class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+        constructor: jQuery,
+        init: function( selector, context, rootjQuery ) {
+                var match, elem, ret, doc;
+
+                // Handle $(&quot;&quot;), $(null), $(undefined), $(false)
+                if ( !selector ) {
+                        return this;
+                }
+
+                // Handle $(DOMElement)
+                if ( selector.nodeType ) {
+                        this.context = this[0] = selector;
+                        this.length = 1;
+                        return this;
+                }
+
+                // Handle HTML strings
+                if ( typeof selector === &quot;string&quot; ) {
+                        if ( selector.charAt(0) === &quot;&lt;&quot; &amp;&amp; selector.charAt( selector.length - 1 ) === &quot;&gt;&quot; &amp;&amp; selector.length &gt;= 3 ) {
+                                // Assume that strings that start and end with &lt;&gt; are HTML and skip the regex check
+                                match = [ null, selector, null ];
+
+                        } else {
+                                match = rquickExpr.exec( selector );
+                        }
+
+                        // Match html or make sure no context is specified for #id
+                        if ( match &amp;&amp; (match[1] || !context) ) {
+
+                                // HANDLE: $(html) -&gt; $(array)
+                                if ( match[1] ) {
+                                        context = context instanceof jQuery ? context[0] : context;
+                                        doc = ( context &amp;&amp; context.nodeType ? context.ownerDocument || context : document );
+
+                                        // scripts is true for back-compat
+                                        selector = jQuery.parseHTML( match[1], doc, true );
+                                        if ( rsingleTag.test( match[1] ) &amp;&amp; jQuery.isPlainObject( context ) ) {
+                                                this.attr.call( selector, context, true );
+                                        }
+
+                                        return jQuery.merge( this, selector );
+
+                                // HANDLE: $(#id)
+                                } else {
+                                        elem = document.getElementById( match[2] );
+
+                                        // Check parentNode to catch when Blackberry 4.6 returns
+                                        // nodes that are no longer in the document #6963
+                                        if ( elem &amp;&amp; elem.parentNode ) {
+                                                // Handle the case where IE and Opera return items
+                                                // by name instead of ID
+                                                if ( elem.id !== match[2] ) {
+                                                        return rootjQuery.find( selector );
+                                                }
+
+                                                // Otherwise, we inject the element directly into the jQuery object
+                                                this.length = 1;
+                                                this[0] = elem;
+                                        }
+
+                                        this.context = document;
+                                        this.selector = selector;
+                                        return this;
+                                }
+
+                        // HANDLE: $(expr, $(...))
+                        } else if ( !context || context.jquery ) {
+                                return ( context || rootjQuery ).find( selector );
+
+                        // HANDLE: $(expr, context)
+                        // (which is just equivalent to: $(context).find(expr)
+                        } else {
+                                return this.constructor( context ).find( selector );
+                        }
+
+                // HANDLE: $(function)
+                // Shortcut for document ready
+                } else if ( jQuery.isFunction( selector ) ) {
+                        return rootjQuery.ready( selector );
+                }
+
+                if ( selector.selector !== undefined ) {
+                        this.selector = selector.selector;
+                        this.context = selector.context;
+                }
+
+                return jQuery.makeArray( selector, this );
+        },
+
+        // Start with an empty selector
+        selector: &quot;&quot;,
+
+        // The current version of jQuery being used
+        jquery: &quot;1.8.3&quot;,
+
+        // The default length of a jQuery object is 0
+        length: 0,
+
+        // The number of elements contained in the matched element set
+        size: function() {
+                return this.length;
+        },
+
+        toArray: function() {
+                return core_slice.call( this );
+        },
+
+        // Get the Nth element in the matched element set OR
+        // Get the whole matched element set as a clean array
+        get: function( num ) {
+                return num == null ?
+
+                        // Return a 'clean' array
+                        this.toArray() :
+
+                        // Return just the object
+                        ( num &lt; 0 ? this[ this.length + num ] : this[ num ] );
+        },
+
+        // Take an array of elements and push it onto the stack
+        // (returning the new matched element set)
+        pushStack: function( elems, name, selector ) {
+
+                // Build a new jQuery matched element set
+                var ret = jQuery.merge( this.constructor(), elems );
+
+                // Add the old object onto the stack (as a reference)
+                ret.prevObject = this;
+
+                ret.context = this.context;
+
+                if ( name === &quot;find&quot; ) {
+                        ret.selector = this.selector + ( this.selector ? &quot; &quot; : &quot;&quot; ) + selector;
+                } else if ( name ) {
+                        ret.selector = this.selector + &quot;.&quot; + name + &quot;(&quot; + selector + &quot;)&quot;;
+                }
+
+                // Return the newly-formed element set
+                return ret;
+        },
+
+        // Execute a callback for every element in the matched set.
+        // (You can seed the arguments with an array of args, but this is
+        // only used internally.)
+        each: function( callback, args ) {
+                return jQuery.each( this, callback, args );
+        },
+
+        ready: function( fn ) {
+                // Add the callback
+                jQuery.ready.promise().done( fn );
+
+                return this;
+        },
+
+        eq: function( i ) {
+                i = +i;
+                return i === -1 ?
+                        this.slice( i ) :
+                        this.slice( i, i + 1 );
+        },
+
+        first: function() {
+                return this.eq( 0 );
+        },
+
+        last: function() {
+                return this.eq( -1 );
+        },
+
+        slice: function() {
+                return this.pushStack( core_slice.apply( this, arguments ),
+                        &quot;slice&quot;, core_slice.call(arguments).join(&quot;,&quot;) );
+        },
+
+        map: function( callback ) {
+                return this.pushStack( jQuery.map(this, function( elem, i ) {
+                        return callback.call( elem, i, elem );
+                }));
+        },
+
+        end: function() {
+                return this.prevObject || this.constructor(null);
+        },
+
+        // For internal use only.
+        // Behaves like an Array's method, not like a jQuery method.
+        push: core_push,
+        sort: [].sort,
+        splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+        var options, name, src, copy, copyIsArray, clone,
+                target = arguments[0] || {},
+                i = 1,
+                length = arguments.length,
+                deep = false;
+
+        // Handle a deep copy situation
+        if ( typeof target === &quot;boolean&quot; ) {
+                deep = target;
+                target = arguments[1] || {};
+                // skip the boolean and the target
+                i = 2;
+        }
+
+        // Handle case when target is a string or something (possible in deep copy)
+        if ( typeof target !== &quot;object&quot; &amp;&amp; !jQuery.isFunction(target) ) {
+                target = {};
+        }
+
+        // extend jQuery itself if only one argument is passed
+        if ( length === i ) {
+                target = this;
+                --i;
+        }
+
+        for ( ; i &lt; length; i++ ) {
+                // Only deal with non-null/undefined values
+                if ( (options = arguments[ i ]) != null ) {
+                        // Extend the base object
+                        for ( name in options ) {
+                                src = target[ name ];
+                                copy = options[ name ];
+
+                                // Prevent never-ending loop
+                                if ( target === copy ) {
+                                        continue;
+                                }
+
+                                // Recurse if we're merging plain objects or arrays
+                                if ( deep &amp;&amp; copy &amp;&amp; ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+                                        if ( copyIsArray ) {
+                                                copyIsArray = false;
+                                                clone = src &amp;&amp; jQuery.isArray(src) ? src : [];
+
+                                        } else {
+                                                clone = src &amp;&amp; jQuery.isPlainObject(src) ? src : {};
+                                        }
+
+                                        // Never move original objects, clone them
+                                        target[ name ] = jQuery.extend( deep, clone, copy );
+
+                                // Don't bring in undefined values
+                                } else if ( copy !== undefined ) {
+                                        target[ name ] = copy;
+                                }
+                        }
+                }
+        }
+
+        // Return the modified object
+        return target;
+};
+
+jQuery.extend({
+        noConflict: function( deep ) {
+                if ( window.$ === jQuery ) {
+                        window.$ = _$;
+                }
+
+                if ( deep &amp;&amp; window.jQuery === jQuery ) {
+                        window.jQuery = _jQuery;
+                }
+
+                return jQuery;
+        },
+
+        // Is the DOM ready to be used? Set to true once it occurs.
+        isReady: false,
+
+        // A counter to track how many items to wait for before
+        // the ready event fires. See #6781
+        readyWait: 1,
+
+        // Hold (or release) the ready event
+        holdReady: function( hold ) {
+                if ( hold ) {
+                        jQuery.readyWait++;
+                } else {
+                        jQuery.ready( true );
+                }
+        },
+
+        // Handle when the DOM is ready
+        ready: function( wait ) {
+
+                // Abort if there are pending holds or we're already ready
+                if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+                        return;
+                }
+
+                // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+                if ( !document.body ) {
+                        return setTimeout( jQuery.ready, 1 );
+                }
+
+                // Remember that the DOM is ready
+                jQuery.isReady = true;
+
+                // If a normal DOM Ready event fired, decrement, and wait if need be
+                if ( wait !== true &amp;&amp; --jQuery.readyWait &gt; 0 ) {
+                        return;
+                }
+
+                // If there are functions bound, to execute
+                readyList.resolveWith( document, [ jQuery ] );
+
+                // Trigger any bound ready events
+                if ( jQuery.fn.trigger ) {
+                        jQuery( document ).trigger(&quot;ready&quot;).off(&quot;ready&quot;);
+                }
+        },
+
+        // See test/unit/core.js for details concerning isFunction.
+        // Since version 1.3, DOM methods and functions like alert
+        // aren't supported. They return false on IE (#2968).
+        isFunction: function( obj ) {
+                return jQuery.type(obj) === &quot;function&quot;;
+        },
+
+        isArray: Array.isArray || function( obj ) {
+                return jQuery.type(obj) === &quot;array&quot;;
+        },
+
+        isWindow: function( obj ) {
+                return obj != null &amp;&amp; obj == obj.window;
+        },
+
+        isNumeric: function( obj ) {
+                return !isNaN( parseFloat(obj) ) &amp;&amp; isFinite( obj );
+        },
+
+        type: function( obj ) {
+                return obj == null ?
+                        String( obj ) :
+                        class2type[ core_toString.call(obj) ] || &quot;object&quot;;
+        },
+
+        isPlainObject: function( obj ) {
+                // Must be an Object.
+                // Because of IE, we also have to check the presence of the constructor property.
+                // Make sure that DOM nodes and window objects don't pass through, as well
+                if ( !obj || jQuery.type(obj) !== &quot;object&quot; || obj.nodeType || jQuery.isWindow( obj ) ) {
+                        return false;
+                }
+
+                try {
+                        // Not own constructor property must be Object
+                        if ( obj.constructor &amp;&amp;
+                                !core_hasOwn.call(obj, &quot;constructor&quot;) &amp;&amp;
+                                !core_hasOwn.call(obj.constructor.prototype, &quot;isPrototypeOf&quot;) ) {
+                                return false;
+                        }
+                } catch ( e ) {
+                        // IE8,9 Will throw exceptions on certain host objects #9897
+                        return false;
+                }
+
+                // Own properties are enumerated firstly, so to speed up,
+                // if last one is own, then all properties are own.
+
+                var key;
+                for ( key in obj ) {}
+
+                return key === undefined || core_hasOwn.call( obj, key );
+        },
+
+        isEmptyObject: function( obj ) {
+                var name;
+                for ( name in obj ) {
+                        return false;
+                }
+                return true;
+        },
+
+        error: function( msg ) {
+                throw new Error( msg );
+        },
+
+        // data: string of html
+        // context (optional): If specified, the fragment will be created in this context, defaults to document
+        // scripts (optional): If true, will include scripts passed in the html string
+        parseHTML: function( data, context, scripts ) {
+                var parsed;
+                if ( !data || typeof data !== &quot;string&quot; ) {
+                        return null;
+                }
+                if ( typeof context === &quot;boolean&quot; ) {
+                        scripts = context;
+                        context = 0;
+                }
+                context = context || document;
+
+                // Single tag
+                if ( (parsed = rsingleTag.exec( data )) ) {
+                        return [ context.createElement( parsed[1] ) ];
+                }
+
+                parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
+                return jQuery.merge( [],
+                        (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
+        },
+
+        parseJSON: function( data ) {
+                if ( !data || typeof data !== &quot;string&quot;) {
+                        return null;
+                }
+
+                // Make sure leading/trailing whitespace is removed (IE can't handle it)
+                data = jQuery.trim( data );
+
+                // Attempt to parse using the native JSON parser first
+                if ( window.JSON &amp;&amp; window.JSON.parse ) {
+                        return window.JSON.parse( data );
+                }
+
+                // Make sure the incoming data is actual JSON
+                // Logic borrowed from http://json.org/json2.js
+                if ( rvalidchars.test( data.replace( rvalidescape, &quot;@&quot; )
+                        .replace( rvalidtokens, &quot;]&quot; )
+                        .replace( rvalidbraces, &quot;&quot;)) ) {
+
+                        return ( new Function( &quot;return &quot; + data ) )();
+
+                }
+                jQuery.error( &quot;Invalid JSON: &quot; + data );
+        },
+
+        // Cross-browser xml parsing
+        parseXML: function( data ) {
+                var xml, tmp;
+                if ( !data || typeof data !== &quot;string&quot; ) {
+                        return null;
+                }
+                try {
+                        if ( window.DOMParser ) { // Standard
+                                tmp = new DOMParser();
+                                xml = tmp.parseFromString( data , &quot;text/xml&quot; );
+                        } else { // IE
+                                xml = new ActiveXObject( &quot;Microsoft.XMLDOM&quot; );
+                                xml.async = &quot;false&quot;;
+                                xml.loadXML( data );
+                        }
+                } catch( e ) {
+                        xml = undefined;
+                }
+                if ( !xml || !xml.documentElement || xml.getElementsByTagName( &quot;parsererror&quot; ).length ) {
+                        jQuery.error( &quot;Invalid XML: &quot; + data );
+                }
+                return xml;
+        },
+
+        noop: function() {},
+
+        // Evaluates a script in a global context
+        // Workarounds based on findings by Jim Driscoll
+        // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+        globalEval: function( data ) {
+                if ( data &amp;&amp; core_rnotwhite.test( data ) ) {
+                        // We use execScript on Internet Explorer
+                        // We use an anonymous function so that context is window
+                        // rather than jQuery in Firefox
+                        ( window.execScript || function( data ) {
+                                window[ &quot;eval&quot; ].call( window, data );
+                        } )( data );
+                }
+        },
+
+        // Convert dashed to camelCase; used by the css and data modules
+        // Microsoft forgot to hump their vendor prefix (#9572)
+        camelCase: function( string ) {
+                return string.replace( rmsPrefix, &quot;ms-&quot; ).replace( rdashAlpha, fcamelCase );
+        },
+
+        nodeName: function( elem, name ) {
+                return elem.nodeName &amp;&amp; elem.nodeName.toLowerCase() === name.toLowerCase();
+        },
+
+        // args is for internal usage only
+        each: function( obj, callback, args ) {
+                var name,
+                        i = 0,
+                        length = obj.length,
+                        isObj = length === undefined || jQuery.isFunction( obj );
+
+                if ( args ) {
+                        if ( isObj ) {
+                                for ( name in obj ) {
+                                        if ( callback.apply( obj[ name ], args ) === false ) {
+                                                break;
+                                        }
+                                }
+                        } else {
+                                for ( ; i &lt; length; ) {
+                                        if ( callback.apply( obj[ i++ ], args ) === false ) {
+                                                break;
+                                        }
+                                }
+                        }
+
+                // A special, fast, case for the most common use of each
+                } else {
+                        if ( isObj ) {
+                                for ( name in obj ) {
+                                        if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
+                                                break;
+                                        }
+                                }
+                        } else {
+                                for ( ; i &lt; length; ) {
+                                        if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
+                                                break;
+                                        }
+                                }
+                        }
+                }
+
+                return obj;
+        },
+
+        // Use native String.trim function wherever possible
+        trim: core_trim &amp;&amp; !core_trim.call(&quot;\uFEFF\xA0&quot;) ?
+                function( text ) {
+                        return text == null ?
+                                &quot;&quot; :
+                                core_trim.call( text );
+                } :
+
+                // Otherwise use our own trimming functionality
+                function( text ) {
+                        return text == null ?
+                                &quot;&quot; :
+                                ( text + &quot;&quot; ).replace( rtrim, &quot;&quot; );
+                },
+
+        // results is for internal usage only
+        makeArray: function( arr, results ) {
+                var type,
+                        ret = results || [];
+
+                if ( arr != null ) {
+                        // The window, strings (and functions) also have 'length'
+                        // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                        type = jQuery.type( arr );
+
+                        if ( arr.length == null || type === &quot;string&quot; || type === &quot;function&quot; || type === &quot;regexp&quot; || jQuery.isWindow( arr ) ) {
+                                core_push.call( ret, arr );
+                        } else {
+                                jQuery.merge( ret, arr );
+                        }
+                }
+
+                return ret;
+        },
+
+        inArray: function( elem, arr, i ) {
+                var len;
+
+                if ( arr ) {
+                        if ( core_indexOf ) {
+                                return core_indexOf.call( arr, elem, i );
+                        }
+
+                        len = arr.length;
+                        i = i ? i &lt; 0 ? Math.max( 0, len + i ) : i : 0;
+
+                        for ( ; i &lt; len; i++ ) {
+                                // Skip accessing in sparse arrays
+                                if ( i in arr &amp;&amp; arr[ i ] === elem ) {
+                                        return i;
+                                }
+                        }
+                }
+
+                return -1;
+        },
+
+        merge: function( first, second ) {
+                var l = second.length,
+                        i = first.length,
+                        j = 0;
+
+                if ( typeof l === &quot;number&quot; ) {
+                        for ( ; j &lt; l; j++ ) {
+                                first[ i++ ] = second[ j ];
+                        }
+
+                } else {
+                        while ( second[j] !== undefined ) {
+                                first[ i++ ] = second[ j++ ];
+                        }
+                }
+
+                first.length = i;
+
+                return first;
+        },
+
+        grep: function( elems, callback, inv ) {
+                var retVal,
+                        ret = [],
+                        i = 0,
+                        length = elems.length;
+                inv = !!inv;
+
+                // Go through the array, only saving the items
+                // that pass the validator function
+                for ( ; i &lt; length; i++ ) {
+                        retVal = !!callback( elems[ i ], i );
+                        if ( inv !== retVal ) {
+                                ret.push( elems[ i ] );
+                        }
+                }
+
+                return ret;
+        },
+
+        // arg is for internal usage only
+        map: function( elems, callback, arg ) {
+                var value, key,
+                        ret = [],
+                        i = 0,
+                        length = elems.length,
+                        // jquery objects are treated as arrays
+                        isArray = elems instanceof jQuery || length !== undefined &amp;&amp; typeof length === &quot;number&quot; &amp;&amp; ( ( length &gt; 0 &amp;&amp; elems[ 0 ] &amp;&amp; elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+                // Go through the array, translating each of the items to their
+                if ( isArray ) {
+                        for ( ; i &lt; length; i++ ) {
+                                value = callback( elems[ i ], i, arg );
+
+                                if ( value != null ) {
+                                        ret[ ret.length ] = value;
+                                }
+                        }
+
+                // Go through every key on the object,
+                } else {
+                        for ( key in elems ) {
+                                value = callback( elems[ key ], key, arg );
+
+                                if ( value != null ) {
+                                        ret[ ret.length ] = value;
+                                }
+                        }
+                }
+
+                // Flatten any nested arrays
+                return ret.concat.apply( [], ret );
+        },
+
+        // A global GUID counter for objects
+        guid: 1,
+
+        // Bind a function to a context, optionally partially applying any
+        // arguments.
+        proxy: function( fn, context ) {
+                var tmp, args, proxy;
+
+                if ( typeof context === &quot;string&quot; ) {
+                        tmp = fn[ context ];
+                        context = fn;
+                        fn = tmp;
+                }
+
+                // Quick check to determine if target is callable, in the spec
+                // this throws a TypeError, but we will just return undefined.
+                if ( !jQuery.isFunction( fn ) ) {
+                        return undefined;
+                }
+
+                // Simulated bind
+                args = core_slice.call( arguments, 2 );
+                proxy = function() {
+                        return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
+                };
+
+                // Set the guid of unique handler to the same of original handler, so it can be removed
+                proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+                return proxy;
+        },
+
+        // Multifunctional method to get and set values of a collection
+        // The value/s can optionally be executed if it's a function
+        access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+                var exec,
+                        bulk = key == null,
+                        i = 0,
+                        length = elems.length;
+
+                // Sets many values
+                if ( key &amp;&amp; typeof key === &quot;object&quot; ) {
+                        for ( i in key ) {
+                                jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+                        }
+                        chainable = 1;
+
+                // Sets one value
+                } else if ( value !== undefined ) {
+                        // Optionally, function values get executed if exec is true
+                        exec = pass === undefined &amp;&amp; jQuery.isFunction( value );
+
+                        if ( bulk ) {
+                                // Bulk operations only iterate when executing function values
+                                if ( exec ) {
+                                        exec = fn;
+                                        fn = function( elem, key, value ) {
+                                                return exec.call( jQuery( elem ), value );
+                                        };
+
+                                // Otherwise they run against the entire set
+                                } else {
+                                        fn.call( elems, value );
+                                        fn = null;
+                                }
+                        }
+
+                        if ( fn ) {
+                                for (; i &lt; length; i++ ) {
+                                        fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+                                }
+                        }
+
+                        chainable = 1;
+                }
+
+                return chainable ?
+                        elems :
+
+                        // Gets
+                        bulk ?
+                                fn.call( elems ) :
+                                length ? fn( elems[0], key ) : emptyGet;
+        },
+
+        now: function() {
+                return ( new Date() ).getTime();
+        }
+});
+
+jQuery.ready.promise = function( obj ) {
+        if ( !readyList ) {
+
+                readyList = jQuery.Deferred();
+
+                // Catch cases where $(document).ready() is called after the browser event has already occurred.
+                // we once tried to use readyState &quot;interactive&quot; here, but it caused issues like the one
+                // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+                if ( document.readyState === &quot;complete&quot; ) {
+                        // Handle it asynchronously to allow scripts the opportunity to delay ready
+                        setTimeout( jQuery.ready, 1 );
+
+                // Standards-based browsers support DOMContentLoaded
+                } else if ( document.addEventListener ) {
+                        // Use the handy event callback
+                        document.addEventListener( &quot;DOMContentLoaded&quot;, DOMContentLoaded, false );
+
+                        // A fallback to window.onload, that will always work
+                        window.addEventListener( &quot;load&quot;, jQuery.ready, false );
+
+                // If IE event model is used
+                } else {
+                        // Ensure firing before onload, maybe late but safe also for iframes
+                        document.attachEvent( &quot;onreadystatechange&quot;, DOMContentLoaded );
+
+                        // A fallback to window.onload, that will always work
+                        window.attachEvent( &quot;onload&quot;, jQuery.ready );
+
+                        // If IE and not a frame
+                        // continually check to see if the document is ready
+                        var top = false;
+
+                        try {
+                                top = window.frameElement == null &amp;&amp; document.documentElement;
+                        } catch(e) {}
+
+                        if ( top &amp;&amp; top.doScroll ) {
+                                (function doScrollCheck() {
+                                        if ( !jQuery.isReady ) {
+
+                                                try {
+                                                        // Use the trick by Diego Perini
+                                                        // http://javascript.nwbox.com/IEContentLoaded/
+                                                        top.doScroll(&quot;left&quot;);
+                                                } catch(e) {
+                                                        return setTimeout( doScrollCheck, 50 );
+                                                }
+
+                                                // and execute any waiting functions
+                                                jQuery.ready();
+                                        }
+                                })();
+                        }
+                }
+        }
+        return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each(&quot;Boolean Number String Function Array Date RegExp Object&quot;.split(&quot; &quot;), function(i, name) {
+        class2type[ &quot;[object &quot; + name + &quot;]&quot; ] = name.toLowerCase();
+});
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+        var object = optionsCache[ options ] = {};
+        jQuery.each( options.split( core_rspace ), function( _, flag ) {
+                object[ flag ] = true;
+        });
+        return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *      options: an optional list of space-separated options that will change how
+ *                      the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * &quot;fired&quot; multiple times.
+ *
+ * Possible options:
+ *
+ *      once:                   will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *      memory:                 will keep track of previous values and will call any callback added
+ *                                      after the list has been fired right away with the latest &quot;memorized&quot;
+ *                                      values (like a Deferred)
+ *
+ *      unique:                 will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *      stopOnFalse:    interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+        // Convert options from String-formatted to Object-formatted if needed
+        // (we check in cache first)
+        options = typeof options === &quot;string&quot; ?
+                ( optionsCache[ options ] || createOptions( options ) ) :
+                jQuery.extend( {}, options );
+
+        var // Last fire value (for non-forgettable lists)
+                memory,
+                // Flag to know if list was already fired
+                fired,
+                // Flag to know if list is currently firing
+                firing,
+                // First callback to fire (used internally by add and fireWith)
+                firingStart,
+                // End of the loop when firing
+                firingLength,
+                // Index of currently firing callback (modified by remove if needed)
+                firingIndex,
+                // Actual callback list
+                list = [],
+                // Stack of fire calls for repeatable lists
+                stack = !options.once &amp;&amp; [],
+                // Fire callbacks
+                fire = function( data ) {
+                        memory = options.memory &amp;&amp; data;
+                        fired = true;
+                        firingIndex = firingStart || 0;
+                        firingStart = 0;
+                        firingLength = list.length;
+                        firing = true;
+                        for ( ; list &amp;&amp; firingIndex &lt; firingLength; firingIndex++ ) {
+                                if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false &amp;&amp; options.stopOnFalse ) {
+                                        memory = false; // To prevent further calls using add
+                                        break;
+                                }
+                        }
+                        firing = false;
+                        if ( list ) {
+                                if ( stack ) {
+                                        if ( stack.length ) {
+                                                fire( stack.shift() );
+                                        }
+                                } else if ( memory ) {
+                                        list = [];
+                                } else {
+                                        self.disable();
+                                }
+                        }
+                },
+                // Actual Callbacks object
+                self = {
+                        // Add a callback or a collection of callbacks to the list
+                        add: function() {
+                                if ( list ) {
+                                        // First, we save the current length
+                                        var start = list.length;
+                                        (function add( args ) {
+                                                jQuery.each( args, function( _, arg ) {
+                                                        var type = jQuery.type( arg );
+                                                        if ( type === &quot;function&quot; ) {
+                                                                if ( !options.unique || !self.has( arg ) ) {
+                                                                        list.push( arg );
+                                                                }
+                                                        } else if ( arg &amp;&amp; arg.length &amp;&amp; type !== &quot;string&quot; ) {
+                                                                // Inspect recursively
+                                                                add( arg );
+                                                        }
+                                                });
+                                        })( arguments );
+                                        // Do we need to add the callbacks to the
+                                        // current firing batch?
+                                        if ( firing ) {
+                                                firingLength = list.length;
+                                        // With memory, if we're not firing then
+                                        // we should call right away
+                                        } else if ( memory ) {
+                                                firingStart = start;
+                                                fire( memory );
+                                        }
+                                }
+                                return this;
+                        },
+                        // Remove a callback from the list
+                        remove: function() {
+                                if ( list ) {
+                                        jQuery.each( arguments, function( _, arg ) {
+                                                var index;
+                                                while( ( index = jQuery.inArray( arg, list, index ) ) &gt; -1 ) {
+                                                        list.splice( index, 1 );
+                                                        // Handle firing indexes
+                                                        if ( firing ) {
+                                                                if ( index &lt;= firingLength ) {
+                                                                        firingLength--;
+                                                                }
+                                                                if ( index &lt;= firingIndex ) {
+                                                                        firingIndex--;
+                                                                }
+                                                        }
+                                                }
+                                        });
+                                }
+                                return this;
+                        },
+                        // Control if a given callback is in the list
+                        has: function( fn ) {
+                                return jQuery.inArray( fn, list ) &gt; -1;
+                        },
+                        // Remove all callbacks from the list
+                        empty: function() {
+                                list = [];
+                                return this;
+                        },
+                        // Have the list do nothing anymore
+                        disable: function() {
+                                list = stack = memory = undefined;
+                                return this;
+                        },
+                        // Is it disabled?
+                        disabled: function() {
+                                return !list;
+                        },
+                        // Lock the list in its current state
+                        lock: function() {
+                                stack = undefined;
+                                if ( !memory ) {
+                                        self.disable();
+                                }
+                                return this;
+                        },
+                        // Is it locked?
+                        locked: function() {
+                                return !stack;
+                        },
+                        // Call all callbacks with the given context and arguments
+                        fireWith: function( context, args ) {
+                                args = args || [];
+                                args = [ context, args.slice ? args.slice() : args ];
+                                if ( list &amp;&amp; ( !fired || stack ) ) {
+                                        if ( firing ) {
+                                                stack.push( args );
+                                        } else {
+                                                fire( args );
+                                        }
+                                }
+                                return this;
+                        },
+                        // Call all the callbacks with the given arguments
+                        fire: function() {
+                                self.fireWith( this, arguments );
+                                return this;
+                        },
+                        // To know if the callbacks have already been called at least once
+                        fired: function() {
+                                return !!fired;
+                        }
+                };
+
+        return self;
+};
+jQuery.extend({
+
+        Deferred: function( func ) {
+                var tuples = [
+                                // action, add listener, listener list, final state
+                                [ &quot;resolve&quot;, &quot;done&quot;, jQuery.Callbacks(&quot;once memory&quot;), &quot;resolved&quot; ],
+                                [ &quot;reject&quot;, &quot;fail&quot;, jQuery.Callbacks(&quot;once memory&quot;), &quot;rejected&quot; ],
+                                [ &quot;notify&quot;, &quot;progress&quot;, jQuery.Callbacks(&quot;memory&quot;) ]
+                        ],
+                        state = &quot;pending&quot;,
+                        promise = {
+                                state: function() {
+                                        return state;
+                                },
+                                always: function() {
+                                        deferred.done( arguments ).fail( arguments );
+                                        return this;
+                                },
+                                then: function( /* fnDone, fnFail, fnProgress */ ) {
+                                        var fns = arguments;
+                                        return jQuery.Deferred(function( newDefer ) {
+                                                jQuery.each( tuples, function( i, tuple ) {
+                                                        var action = tuple[ 0 ],
+                                                                fn = fns[ i ];
+                                                        // deferred[ done | fail | progress ] for forwarding actions to newDefer
+                                                        deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
+                                                                function() {
+                                                                        var returned = fn.apply( this, arguments );
+                                                                        if ( returned &amp;&amp; jQuery.isFunction( returned.promise ) ) {
+                                                                                returned.promise()
+                                                                                        .done( newDefer.resolve )
+                                                                                        .fail( newDefer.reject )
+                                                                                        .progress( newDefer.notify );
+                                                                        } else {
+                                                                                newDefer[ action + &quot;With&quot; ]( this === deferred ? newDefer : this, [ returned ] );
+                                                                        }
+                                                                } :
+                                                                newDefer[ action ]
+                                                        );
+                                                });
+                                                fns = null;
+                                        }).promise();
+                                },
+                                // Get a promise for this deferred
+                                // If obj is provided, the promise aspect is added to the object
+                                promise: function( obj ) {
+                                        return obj != null ? jQuery.extend( obj, promise ) : promise;
+                                }
+                        },
+                        deferred = {};
+
+                // Keep pipe for back-compat
+                promise.pipe = promise.then;
+
+                // Add list-specific methods
+                jQuery.each( tuples, function( i, tuple ) {
+                        var list = tuple[ 2 ],
+                                stateString = tuple[ 3 ];
+
+                        // promise[ done | fail | progress ] = list.add
+                        promise[ tuple[1] ] = list.add;
+
+                        // Handle state
+                        if ( stateString ) {
+                                list.add(function() {
+                                        // state = [ resolved | rejected ]
+                                        state = stateString;
+
+                                // [ reject_list | resolve_list ].disable; progress_list.lock
+                                }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+                        }
+
+                        // deferred[ resolve | reject | notify ] = list.fire
+                        deferred[ tuple[0] ] = list.fire;
+                        deferred[ tuple[0] + &quot;With&quot; ] = list.fireWith;
+                });
+
+                // Make the deferred a promise
+                promise.promise( deferred );
+
+                // Call given func if any
+                if ( func ) {
+                        func.call( deferred, deferred );
+                }
+
+                // All done!
+                return deferred;
+        },
+
+        // Deferred helper
+        when: function( subordinate /* , ..., subordinateN */ ) {
+                var i = 0,
+                        resolveValues = core_slice.call( arguments ),
+                        length = resolveValues.length,
+
+                        // the count of uncompleted subordinates
+                        remaining = length !== 1 || ( subordinate &amp;&amp; jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+                        // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+                        deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+                        // Update function for both resolve and progress values
+                        updateFunc = function( i, contexts, values ) {
+                                return function( value ) {
+                                        contexts[ i ] = this;
+                                        values[ i ] = arguments.length &gt; 1 ? core_slice.call( arguments ) : value;
+                                        if( values === progressValues ) {
+                                                deferred.notifyWith( contexts, values );
+                                        } else if ( !( --remaining ) ) {
+                                                deferred.resolveWith( contexts, values );
+                                        }
+                                };
+                        },
+
+                        progressValues, progressContexts, resolveContexts;
+
+                // add listeners to Deferred subordinates; treat others as resolved
+                if ( length &gt; 1 ) {
+                        progressValues = new Array( length );
+                        progressContexts = new Array( length );
+                        resolveContexts = new Array( length );
+                        for ( ; i &lt; length; i++ ) {
+                                if ( resolveValues[ i ] &amp;&amp; jQuery.isFunction( resolveValues[ i ].promise ) ) {
+                                        resolveValues[ i ].promise()
+                                                .done( updateFunc( i, resolveContexts, resolveValues ) )
+                                                .fail( deferred.reject )
+                                                .progress( updateFunc( i, progressContexts, progressValues ) );
+                                } else {
+                                        --remaining;
+                                }
+                        }
+                }
+
+                // if we're not waiting on anything, resolve the master
+                if ( !remaining ) {
+                        deferred.resolveWith( resolveContexts, resolveValues );
+                }
+
+                return deferred.promise();
+        }
+});
+jQuery.support = (function() {
+
+        var support,
+                all,
+                a,
+                select,
+                opt,
+                input,
+                fragment,
+                eventName,
+                i,
+                isSupported,
+                clickFn,
+                div = document.createElement(&quot;div&quot;);
+
+        // Setup
+        div.setAttribute( &quot;className&quot;, &quot;t&quot; );
+        div.innerHTML = &quot;  &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href='/a'&gt;a&lt;/a&gt;&lt;input type='checkbox'/&gt;&quot;;
+
+        // Support tests won't run in some limited or non-browser environments
+        all = div.getElementsByTagName(&quot;*&quot;);
+        a = div.getElementsByTagName(&quot;a&quot;)[ 0 ];
+        if ( !all || !a || !all.length ) {
+                return {};
+        }
+
+        // First batch of tests
+        select = document.createElement(&quot;select&quot;);
+        opt = select.appendChild( document.createElement(&quot;option&quot;) );
+        input = div.getElementsByTagName(&quot;input&quot;)[ 0 ];
+
+        a.style.cssText = &quot;top:1px;float:left;opacity:.5&quot;;
+        support = {
+                // IE strips leading whitespace when .innerHTML is used
+                leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+                // Make sure that tbody elements aren't automatically inserted
+                // IE will insert them into empty tables
+                tbody: !div.getElementsByTagName(&quot;tbody&quot;).length,
+
+                // Make sure that link elements get serialized correctly by innerHTML
+                // This requires a wrapper element in IE
+                htmlSerialize: !!div.getElementsByTagName(&quot;link&quot;).length,
+
+                // Get the style information from getAttribute
+                // (IE uses .cssText instead)
+                style: /top/.test( a.getAttribute(&quot;style&quot;) ),
+
+                // Make sure that URLs aren't manipulated
+                // (IE normalizes it by default)
+                hrefNormalized: ( a.getAttribute(&quot;href&quot;) === &quot;/a&quot; ),
+
+                // Make sure that element opacity exists
+                // (IE uses filter instead)
+                // Use a regex to work around a WebKit issue. See #5145
+                opacity: /^0.5/.test( a.style.opacity ),
+
+                // Verify style float existence
+                // (IE uses styleFloat instead of cssFloat)
+                cssFloat: !!a.style.cssFloat,
+
+                // Make sure that if no value is specified for a checkbox
+                // that it defaults to &quot;on&quot;.
+                // (WebKit defaults to &quot;&quot; instead)
+                checkOn: ( input.value === &quot;on&quot; ),
+
+                // Make sure that a selected-by-default option has a working selected property.
+                // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+                optSelected: opt.selected,
+
+                // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+                getSetAttribute: div.className !== &quot;t&quot;,
+
+                // Tests for enctype support on a form (#6743)
+                enctype: !!document.createElement(&quot;form&quot;).enctype,
+
+                // Makes sure cloning an html5 element does not cause problems
+                // Where outerHTML is undefined, this still works
+                html5Clone: document.createElement(&quot;nav&quot;).cloneNode( true ).outerHTML !== &quot;&lt;:nav&gt;&lt;/:nav&gt;&quot;,
+
+                // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+                boxModel: ( document.compatMode === &quot;CSS1Compat&quot; ),
+
+                // Will be defined later
+                submitBubbles: true,
+                changeBubbles: true,
+                focusinBubbles: false,
+                deleteExpando: true,
+                noCloneEvent: true,
+                inlineBlockNeedsLayout: false,
+                shrinkWrapBlocks: false,
+                reliableMarginRight: true,
+                boxSizingReliable: true,
+                pixelPosition: false
+        };
+
+        // Make sure checked status is properly cloned
+        input.checked = true;
+        support.noCloneChecked = input.cloneNode( true ).checked;
+
+        // Make sure that the options inside disabled selects aren't marked as disabled
+        // (WebKit marks them as disabled)
+        select.disabled = true;
+        support.optDisabled = !opt.disabled;
+
+        // Test to see if it's possible to delete an expando from an element
+        // Fails in Internet Explorer
+        try {
+                delete div.test;
+        } catch( e ) {
+                support.deleteExpando = false;
+        }
+
+        if ( !div.addEventListener &amp;&amp; div.attachEvent &amp;&amp; div.fireEvent ) {
+                div.attachEvent( &quot;onclick&quot;, clickFn = function() {
+                        // Cloning a node shouldn't copy over any
+                        // bound event handlers (IE does this)
+                        support.noCloneEvent = false;
+                });
+                div.cloneNode( true ).fireEvent(&quot;onclick&quot;);
+                div.detachEvent( &quot;onclick&quot;, clickFn );
+        }
+
+        // Check if a radio maintains its value
+        // after being appended to the DOM
+        input = document.createElement(&quot;input&quot;);
+        input.value = &quot;t&quot;;
+        input.setAttribute( &quot;type&quot;, &quot;radio&quot; );
+        support.radioValue = input.value === &quot;t&quot;;
+
+        input.setAttribute( &quot;checked&quot;, &quot;checked&quot; );
+
+        // #11217 - WebKit loses check when the name is after the checked attribute
+        input.setAttribute( &quot;name&quot;, &quot;t&quot; );
+
+        div.appendChild( input );
+        fragment = document.createDocumentFragment();
+        fragment.appendChild( div.lastChild );
+
+        // WebKit doesn't clone checked state correctly in fragments
+        support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+        // Check if a disconnected checkbox will retain its checked
+        // value of true after appended to the DOM (IE6/7)
+        support.appendChecked = input.checked;
+
+        fragment.removeChild( input );
+        fragment.appendChild( div );
+
+        // Technique from Juriy Zaytsev
+        // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+        // We only care about the case where non-standard event systems
+        // are used, namely in IE. Short-circuiting here helps us to
+        // avoid an eval call (in setAttribute) which can cause CSP
+        // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+        if ( div.attachEvent ) {
+                for ( i in {
+                        submit: true,
+                        change: true,
+                        focusin: true
+                }) {
+                        eventName = &quot;on&quot; + i;
+                        isSupported = ( eventName in div );
+                        if ( !isSupported ) {
+                                div.setAttribute( eventName, &quot;return;&quot; );
+                                isSupported = ( typeof div[ eventName ] === &quot;function&quot; );
+                        }
+                        support[ i + &quot;Bubbles&quot; ] = isSupported;
+                }
+        }
+
+        // Run tests that need a body at doc ready
+        jQuery(function() {
+                var container, div, tds, marginDiv,
+                        divReset = &quot;padding:0;margin:0;border:0;display:block;overflow:hidden;&quot;,
+                        body = document.getElementsByTagName(&quot;body&quot;)[0];
+
+                if ( !body ) {
+                        // Return for frameset docs that don't have a body
+                        return;
+                }
+
+                container = document.createElement(&quot;div&quot;);
+                container.style.cssText = &quot;visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px&quot;;
+                body.insertBefore( container, body.firstChild );
+
+                // Construct the test element
+                div = document.createElement(&quot;div&quot;);
+                container.appendChild( div );
+
+                // Check if table cells still have offsetWidth/Height when they are set
+                // to display:none and there are still other visible table cells in a
+                // table row; if so, offsetWidth/Height are not reliable for use when
+                // determining if an element has been hidden directly using
+                // display:none (it is still safe to use offsets if a parent element is
+                // hidden; don safety goggles and see bug #4512 for more information).
+                // (only IE 8 fails this test)
+                div.innerHTML = &quot;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;t&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
+                tds = div.getElementsByTagName(&quot;td&quot;);
+                tds[ 0 ].style.cssText = &quot;padding:0;margin:0;border:0;display:none&quot;;
+                isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+                tds[ 0 ].style.display = &quot;&quot;;
+                tds[ 1 ].style.display = &quot;none&quot;;
+
+                // Check if empty table cells still have offsetWidth/Height
+                // (IE &lt;= 8 fail this test)
+                support.reliableHiddenOffsets = isSupported &amp;&amp; ( tds[ 0 ].offsetHeight === 0 );
+
+                // Check box-sizing and margin behavior
+                div.innerHTML = &quot;&quot;;
+                div.style.cssText = &quot;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;&quot;;
+                support.boxSizing = ( div.offsetWidth === 4 );
+                support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+                // NOTE: To any future maintainer, we've window.getComputedStyle
+                // because jsdom on node.js will break without it.
+                if ( window.getComputedStyle ) {
+                        support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== &quot;1%&quot;;
+                        support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: &quot;4px&quot; } ).width === &quot;4px&quot;;
+
+                        // Check if div with explicit width and no margin-right incorrectly
+                        // gets computed margin-right based on width of container. For more
+                        // info see bug #3333
+                        // Fails in WebKit before Feb 2011 nightlies
+                        // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                        marginDiv = document.createElement(&quot;div&quot;);
+                        marginDiv.style.cssText = div.style.cssText = divReset;
+                        marginDiv.style.marginRight = marginDiv.style.width = &quot;0&quot;;
+                        div.style.width = &quot;1px&quot;;
+                        div.appendChild( marginDiv );
+                        support.reliableMarginRight =
+                                !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+                }
+
+                if ( typeof div.style.zoom !== &quot;undefined&quot; ) {
+                        // Check if natively block-level elements act like inline-block
+                        // elements when setting their display to 'inline' and giving
+                        // them layout
+                        // (IE &lt; 8 does this)
+                        div.innerHTML = &quot;&quot;;
+                        div.style.cssText = divReset + &quot;width:1px;padding:1px;display:inline;zoom:1&quot;;
+                        support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+                        // Check if elements with layout shrink-wrap their children
+                        // (IE 6 does this)
+                        div.style.display = &quot;block&quot;;
+                        div.style.overflow = &quot;visible&quot;;
+                        div.innerHTML = &quot;&lt;div&gt;&lt;/div&gt;&quot;;
+                        div.firstChild.style.width = &quot;5px&quot;;
+                        support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+                        container.style.zoom = 1;
+                }
+
+                // Null elements to avoid leaks in IE
+                body.removeChild( container );
+                container = div = tds = marginDiv = null;
+        });
+
+        // Null elements to avoid leaks in IE
+        fragment.removeChild( div );
+        all = a = select = opt = input = fragment = div = null;
+
+        return support;
+})();
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+        rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+        cache: {},
+
+        deletedIds: [],
+
+        // Remove at next major release (1.9/2.0)
+        uuid: 0,
+
+        // Unique for each copy of jQuery on the page
+        // Non-digits removed to match rinlinejQuery
+        expando: &quot;jQuery&quot; + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, &quot;&quot; ),
+
+        // The following elements throw uncatchable exceptions if you
+        // attempt to add expando properties to them.
+        noData: {
+                &quot;embed&quot;: true,
+                // Ban all objects except for Flash (which handle expandos)
+                &quot;object&quot;: &quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;,
+                &quot;applet&quot;: true
+        },
+
+        hasData: function( elem ) {
+                elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+                return !!elem &amp;&amp; !isEmptyDataObject( elem );
+        },
+
+        data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+                if ( !jQuery.acceptData( elem ) ) {
+                        return;
+                }
+
+                var thisCache, ret,
+                        internalKey = jQuery.expando,
+                        getByName = typeof name === &quot;string&quot;,
+
+                        // We have to handle DOM nodes and JS objects differently because IE6-7
+                        // can't GC object references properly across the DOM-JS boundary
+                        isNode = elem.nodeType,
+
+                        // Only DOM nodes need the global jQuery cache; JS object data is
+                        // attached directly to the object so GC can occur automatically
+                        cache = isNode ? jQuery.cache : elem,
+
+                        // Only defining an ID for JS objects if its cache already exists allows
+                        // the code to shortcut on the same path as a DOM node with no cache
+                        id = isNode ? elem[ internalKey ] : elem[ internalKey ] &amp;&amp; internalKey;
+
+                // Avoid doing any more work than we need to when trying to get data on an
+                // object that has no data at all
+                if ( (!id || !cache[id] || (!pvt &amp;&amp; !cache[id].data)) &amp;&amp; getByName &amp;&amp; data === undefined ) {
+                        return;
+                }
+
+                if ( !id ) {
+                        // Only DOM nodes need a new unique ID for each element since their data
+                        // ends up in the global cache
+                        if ( isNode ) {
+                                elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+                        } else {
+                                id = internalKey;
+                        }
+                }
+
+                if ( !cache[ id ] ) {
+                        cache[ id ] = {};
+
+                        // Avoids exposing jQuery metadata on plain JS objects when the object
+                        // is serialized using JSON.stringify
+                        if ( !isNode ) {
+                                cache[ id ].toJSON = jQuery.noop;
+                        }
+                }
+
+                // An object can be passed to jQuery.data instead of a key/value pair; this gets
+                // shallow copied over onto the existing cache
+                if ( typeof name === &quot;object&quot; || typeof name === &quot;function&quot; ) {
+                        if ( pvt ) {
+                                cache[ id ] = jQuery.extend( cache[ id ], name );
+                        } else {
+                                cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+                        }
+                }
+
+                thisCache = cache[ id ];
+
+                // jQuery data() is stored in a separate object inside the object's internal data
+                // cache in order to avoid key collisions between internal data and user-defined
+                // data.
+                if ( !pvt ) {
+                        if ( !thisCache.data ) {
+                                thisCache.data = {};
+                        }
+
+                        thisCache = thisCache.data;
+                }
+
+                if ( data !== undefined ) {
+                        thisCache[ jQuery.camelCase( name ) ] = data;
+                }
+
+                // Check for both converted-to-camel and non-converted data property names
+                // If a data property was specified
+                if ( getByName ) {
+
+                        // First Try to find as-is property data
+                        ret = thisCache[ name ];
+
+                        // Test for null|undefined property data
+                        if ( ret == null ) {
+
+                                // Try to find the camelCased property
+                                ret = thisCache[ jQuery.camelCase( name ) ];
+                        }
+                } else {
+                        ret = thisCache;
+                }
+
+                return ret;
+        },
+
+        removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+                if ( !jQuery.acceptData( elem ) ) {
+                        return;
+                }
+
+                var thisCache, i, l,
+
+                        isNode = elem.nodeType,
+
+                        // See jQuery.data for more information
+                        cache = isNode ? jQuery.cache : elem,
+                        id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+                // If there is already no cache entry for this object, there is no
+                // purpose in continuing
+                if ( !cache[ id ] ) {
+                        return;
+                }
+
+                if ( name ) {
+
+                        thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+                        if ( thisCache ) {
+
+                                // Support array or space separated string names for data keys
+                                if ( !jQuery.isArray( name ) ) {
+
+                                        // try the string as a key before any manipulation
+                                        if ( name in thisCache ) {
+                                                name = [ name ];
+                                        } else {
+
+                                                // split the camel cased version by spaces unless a key with the spaces exists
+                                                name = jQuery.camelCase( name );
+                                                if ( name in thisCache ) {
+                                                        name = [ name ];
+                                                } else {
+                                                        name = name.split(&quot; &quot;);
+                                                }
+                                        }
+                                }
+
+                                for ( i = 0, l = name.length; i &lt; l; i++ ) {
+                                        delete thisCache[ name[i] ];
+                                }
+
+                                // If there is no data left in the cache, we want to continue
+                                // and let the cache object itself get destroyed
+                                if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+                                        return;
+                                }
+                        }
+                }
+
+                // See jQuery.data for more information
+                if ( !pvt ) {
+                        delete cache[ id ].data;
+
+                        // Don't destroy the parent cache unless the internal data object
+                        // had been the only thing left in it
+                        if ( !isEmptyDataObject( cache[ id ] ) ) {
+                                return;
+                        }
+                }
+
+                // Destroy the cache
+                if ( isNode ) {
+                        jQuery.cleanData( [ elem ], true );
+
+                // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+                } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+                        delete cache[ id ];
+
+                // When all else fails, null
+                } else {
+                        cache[ id ] = null;
+                }
+        },
+
+        // For internal use only.
+        _data: function( elem, name, data ) {
+                return jQuery.data( elem, name, data, true );
+        },
+
+        // A method for determining if a DOM node can handle the data expando
+        acceptData: function( elem ) {
+                var noData = elem.nodeName &amp;&amp; jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+                // nodes accept data unless otherwise specified; rejection can be conditional
+                return !noData || noData !== true &amp;&amp; elem.getAttribute(&quot;classid&quot;) === noData;
+        }
+});
+
+jQuery.fn.extend({
+        data: function( key, value ) {
+                var parts, part, attr, name, l,
+                        elem = this[0],
+                        i = 0,
+                        data = null;
+
+                // Gets all values
+                if ( key === undefined ) {
+                        if ( this.length ) {
+                                data = jQuery.data( elem );
+
+                                if ( elem.nodeType === 1 &amp;&amp; !jQuery._data( elem, &quot;parsedAttrs&quot; ) ) {
+                                        attr = elem.attributes;
+                                        for ( l = attr.length; i &lt; l; i++ ) {
+                                                name = attr[i].name;
+
+                                                if ( !name.indexOf( &quot;data-&quot; ) ) {
+                                                        name = jQuery.camelCase( name.substring(5) );
+
+                                                        dataAttr( elem, name, data[ name ] );
+                                                }
+                                        }
+                                        jQuery._data( elem, &quot;parsedAttrs&quot;, true );
+                                }
+                        }
+
+                        return data;
+                }
+
+                // Sets multiple values
+                if ( typeof key === &quot;object&quot; ) {
+                        return this.each(function() {
+                                jQuery.data( this, key );
+                        });
+                }
+
+                parts = key.split( &quot;.&quot;, 2 );
+                parts[1] = parts[1] ? &quot;.&quot; + parts[1] : &quot;&quot;;
+                part = parts[1] + &quot;!&quot;;
+
+                return jQuery.access( this, function( value ) {
+
+                        if ( value === undefined ) {
+                                data = this.triggerHandler( &quot;getData&quot; + part, [ parts[0] ] );
+
+                                // Try to fetch any internally stored data first
+                                if ( data === undefined &amp;&amp; elem ) {
+                                        data = jQuery.data( elem, key );
+                                        data = dataAttr( elem, key, data );
+                                }
+
+                                return data === undefined &amp;&amp; parts[1] ?
+                                        this.data( parts[0] ) :
+                                        data;
+                        }
+
+                        parts[1] = value;
+                        this.each(function() {
+                                var self = jQuery( this );
+
+                                self.triggerHandler( &quot;setData&quot; + part, parts );
+                                jQuery.data( this, key, value );
+                                self.triggerHandler( &quot;changeData&quot; + part, parts );
+                        });
+                }, null, value, arguments.length &gt; 1, null, false );
+        },
+
+        removeData: function( key ) {
+                return this.each(function() {
+                        jQuery.removeData( this, key );
+                });
+        }
+});
+
+function dataAttr( elem, key, data ) {
+        // If nothing was found internally, try to fetch any
+        // data from the HTML5 data-* attribute
+        if ( data === undefined &amp;&amp; elem.nodeType === 1 ) {
+
+                var name = &quot;data-&quot; + key.replace( rmultiDash, &quot;-$1&quot; ).toLowerCase();
+
+                data = elem.getAttribute( name );
+
+                if ( typeof data === &quot;string&quot; ) {
+                        try {
+                                data = data === &quot;true&quot; ? true :
+                                data === &quot;false&quot; ? false :
+                                data === &quot;null&quot; ? null :
+                                // Only convert to a number if it doesn't change the string
+                                +data + &quot;&quot; === data ? +data :
+                                rbrace.test( data ) ? jQuery.parseJSON( data ) :
+                                        data;
+                        } catch( e ) {}
+
+                        // Make sure we set the data so it isn't changed later
+                        jQuery.data( elem, key, data );
+
+                } else {
+                        data = undefined;
+                }
+        }
+
+        return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+        var name;
+        for ( name in obj ) {
+
+                // if the public data object is empty, the private is still empty
+                if ( name === &quot;data&quot; &amp;&amp; jQuery.isEmptyObject( obj[name] ) ) {
+                        continue;
+                }
+                if ( name !== &quot;toJSON&quot; ) {
+                        return false;
+                }
+        }
+
+        return true;
+}
+jQuery.extend({
+        queue: function( elem, type, data ) {
+                var queue;
+
+                if ( elem ) {
+                        type = ( type || &quot;fx&quot; ) + &quot;queue&quot;;
+                        queue = jQuery._data( elem, type );
+
+                        // Speed up dequeue by getting out quickly if this is just a lookup
+                        if ( data ) {
+                                if ( !queue || jQuery.isArray(data) ) {
+                                        queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+                                } else {
+                                        queue.push( data );
+                                }
+                        }
+                        return queue || [];
+                }
+        },
+
+        dequeue: function( elem, type ) {
+                type = type || &quot;fx&quot;;
+
+                var queue = jQuery.queue( elem, type ),
+                        startLength = queue.length,
+                        fn = queue.shift(),
+                        hooks = jQuery._queueHooks( elem, type ),
+                        next = function() {
+                                jQuery.dequeue( elem, type );
+                        };
+
+                // If the fx queue is dequeued, always remove the progress sentinel
+                if ( fn === &quot;inprogress&quot; ) {
+                        fn = queue.shift();
+                        startLength--;
+                }
+
+                if ( fn ) {
+
+                        // Add a progress sentinel to prevent the fx queue from being
+                        // automatically dequeued
+                        if ( type === &quot;fx&quot; ) {
+                                queue.unshift( &quot;inprogress&quot; );
+                        }
+
+                        // clear up the last queue stop function
+                        delete hooks.stop;
+                        fn.call( elem, next, hooks );
+                }
+
+                if ( !startLength &amp;&amp; hooks ) {
+                        hooks.empty.fire();
+                }
+        },
+
+        // not intended for public consumption - generates a queueHooks object, or returns the current one
+        _queueHooks: function( elem, type ) {
+                var key = type + &quot;queueHooks&quot;;
+                return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+                        empty: jQuery.Callbacks(&quot;once memory&quot;).add(function() {
+                                jQuery.removeData( elem, type + &quot;queue&quot;, true );
+                                jQuery.removeData( elem, key, true );
+                        })
+                });
+        }
+});
+
+jQuery.fn.extend({
+        queue: function( type, data ) {
+                var setter = 2;
+
+                if ( typeof type !== &quot;string&quot; ) {
+                        data = type;
+                        type = &quot;fx&quot;;
+                        setter--;
+                }
+
+                if ( arguments.length &lt; setter ) {
+                        return jQuery.queue( this[0], type );
+                }
+
+                return data === undefined ?
+                        this :
+                        this.each(function() {
+                                var queue = jQuery.queue( this, type, data );
+
+                                // ensure a hooks for this queue
+                                jQuery._queueHooks( this, type );
+
+                                if ( type === &quot;fx&quot; &amp;&amp; queue[0] !== &quot;inprogress&quot; ) {
+                                        jQuery.dequeue( this, type );
+                                }
+                        });
+        },
+        dequeue: function( type ) {
+                return this.each(function() {
+                        jQuery.dequeue( this, type );
+                });
+        },
+        // Based off of the plugin by Clint Helfers, with permission.
+        // http://blindsignals.com/index.php/2009/07/jquery-delay/
+        delay: function( time, type ) {
+                time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+                type = type || &quot;fx&quot;;
+
+                return this.queue( type, function( next, hooks ) {
+                        var timeout = setTimeout( next, time );
+                        hooks.stop = function() {
+                                clearTimeout( timeout );
+                        };
+                });
+        },
+        clearQueue: function( type ) {
+                return this.queue( type || &quot;fx&quot;, [] );
+        },
+        // Get a promise resolved when queues of a certain type
+        // are emptied (fx is the type by default)
+        promise: function( type, obj ) {
+                var tmp,
+                        count = 1,
+                        defer = jQuery.Deferred(),
+                        elements = this,
+                        i = this.length,
+                        resolve = function() {
+                                if ( !( --count ) ) {
+                                        defer.resolveWith( elements, [ elements ] );
+                                }
+                        };
+
+                if ( typeof type !== &quot;string&quot; ) {
+                        obj = type;
+                        type = undefined;
+                }
+                type = type || &quot;fx&quot;;
+
+                while( i-- ) {
+                        tmp = jQuery._data( elements[ i ], type + &quot;queueHooks&quot; );
+                        if ( tmp &amp;&amp; tmp.empty ) {
+                                count++;
+                                tmp.empty.add( resolve );
+                        }
+                }
+                resolve();
+                return defer.promise( obj );
+        }
+});
+var nodeHook, boolHook, fixSpecified,
+        rclass = /[\t\r\n]/g,
+        rreturn = /\r/g,
+        rtype = /^(?:button|input)$/i,
+        rfocusable = /^(?:button|input|object|select|textarea)$/i,
+        rclickable = /^a(?:rea|)$/i,
+        rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+        getSetAttribute = jQuery.support.getSetAttribute;
+
+jQuery.fn.extend({
+        attr: function( name, value ) {
+                return jQuery.access( this, jQuery.attr, name, value, arguments.length &gt; 1 );
+        },
+
+        removeAttr: function( name ) {
+                return this.each(function() {
+                        jQuery.removeAttr( this, name );
+                });
+        },
+
+        prop: function( name, value ) {
+                return jQuery.access( this, jQuery.prop, name, value, arguments.length &gt; 1 );
+        },
+
+        removeProp: function( name ) {
+                name = jQuery.propFix[ name ] || name;
+                return this.each(function() {
+                        // try/catch handles cases where IE balks (such as removing a property on window)
+                        try {
+                                this[ name ] = undefined;
+                                delete this[ name ];
+                        } catch( e ) {}
+                });
+        },
+
+        addClass: function( value ) {
+                var classNames, i, l, elem,
+                        setClass, c, cl;
+
+                if ( jQuery.isFunction( value ) ) {
+                        return this.each(function( j ) {
+                                jQuery( this ).addClass( value.call(this, j, this.className) );
+                        });
+                }
+
+                if ( value &amp;&amp; typeof value === &quot;string&quot; ) {
+                        classNames = value.split( core_rspace );
+
+                        for ( i = 0, l = this.length; i &lt; l; i++ ) {
+                                elem = this[ i ];
+
+                                if ( elem.nodeType === 1 ) {
+                                        if ( !elem.className &amp;&amp; classNames.length === 1 ) {
+                                                elem.className = value;
+
+                                        } else {
+                                                setClass = &quot; &quot; + elem.className + &quot; &quot;;
+
+                                                for ( c = 0, cl = classNames.length; c &lt; cl; c++ ) {
+                                                        if ( setClass.indexOf( &quot; &quot; + classNames[ c ] + &quot; &quot; ) &lt; 0 ) {
+                                                                setClass += classNames[ c ] + &quot; &quot;;
+                                                        }
+                                                }
+                                                elem.className = jQuery.trim( setClass );
+                                        }
+                                }
+                        }
+                }
+
+                return this;
+        },
+
+        removeClass: function( value ) {
+                var removes, className, elem, c, cl, i, l;
+
+                if ( jQuery.isFunction( value ) ) {
+                        return this.each(function( j ) {
+                                jQuery( this ).removeClass( value.call(this, j, this.className) );
+                        });
+                }
+                if ( (value &amp;&amp; typeof value === &quot;string&quot;) || value === undefined ) {
+                        removes = ( value || &quot;&quot; ).split( core_rspace );
+
+                        for ( i = 0, l = this.length; i &lt; l; i++ ) {
+                                elem = this[ i ];
+                                if ( elem.nodeType === 1 &amp;&amp; elem.className ) {
+
+                                        className = (&quot; &quot; + elem.className + &quot; &quot;).replace( rclass, &quot; &quot; );
+
+                                        // loop over each item in the removal list
+                                        for ( c = 0, cl = removes.length; c &lt; cl; c++ ) {
+                                                // Remove until there is nothing to remove,
+                                                while ( className.indexOf(&quot; &quot; + removes[ c ] + &quot; &quot;) &gt;= 0 ) {
+                                                        className = className.replace( &quot; &quot; + removes[ c ] + &quot; &quot; , &quot; &quot; );
+                                                }
+                                        }
+                                        elem.className = value ? jQuery.trim( className ) : &quot;&quot;;
+                                }
+                        }
+                }
+
+                return this;
+        },
+
+        toggleClass: function( value, stateVal ) {
+                var type = typeof value,
+                        isBool = typeof stateVal === &quot;boolean&quot;;
+
+                if ( jQuery.isFunction( value ) ) {
+                        return this.each(function( i ) {
+                                jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+                        });
+                }
+
+                return this.each(function() {
+                        if ( type === &quot;string&quot; ) {
+                                // toggle individual class names
+                                var className,
+                                        i = 0,
+                                        self = jQuery( this ),
+                                        state = stateVal,
+                                        classNames = value.split( core_rspace );
+
+                                while ( (className = classNames[ i++ ]) ) {
+                                        // check each className given, space separated list
+                                        state = isBool ? state : !self.hasClass( className );
+                                        self[ state ? &quot;addClass&quot; : &quot;removeClass&quot; ]( className );
+                                }
+
+                        } else if ( type === &quot;undefined&quot; || type === &quot;boolean&quot; ) {
+                                if ( this.className ) {
+                                        // store className if set
+                                        jQuery._data( this, &quot;__className__&quot;, this.className );
+                                }
+
+                                // toggle whole className
+                                this.className = this.className || value === false ? &quot;&quot; : jQuery._data( this, &quot;__className__&quot; ) || &quot;&quot;;
+                        }
+                });
+        },
+
+        hasClass: function( selector ) {
+                var className = &quot; &quot; + selector + &quot; &quot;,
+                        i = 0,
+                        l = this.length;
+                for ( ; i &lt; l; i++ ) {
+                        if ( this[i].nodeType === 1 &amp;&amp; (&quot; &quot; + this[i].className + &quot; &quot;).replace(rclass, &quot; &quot;).indexOf( className ) &gt;= 0 ) {
+                                return true;
+                        }
+                }
+
+                return false;
+        },
+
+        val: function( value ) {
+                var hooks, ret, isFunction,
+                        elem = this[0];
+
+                if ( !arguments.length ) {
+                        if ( elem ) {
+                                hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+                                if ( hooks &amp;&amp; &quot;get&quot; in hooks &amp;&amp; (ret = hooks.get( elem, &quot;value&quot; )) !== undefined ) {
+                                        return ret;
+                                }
+
+                                ret = elem.value;
+
+                                return typeof ret === &quot;string&quot; ?
+                                        // handle most common string cases
+                                        ret.replace(rreturn, &quot;&quot;) :
+                                        // handle cases where value is null/undef or number
+                                        ret == null ? &quot;&quot; : ret;
+                        }
+
+                        return;
+                }
+
+                isFunction = jQuery.isFunction( value );
+
+                return this.each(function( i ) {
+                        var val,
+                                self = jQuery(this);
+
+                        if ( this.nodeType !== 1 ) {
+                                return;
+                        }
+
+                        if ( isFunction ) {
+                                val = value.call( this, i, self.val() );
+                        } else {
+                                val = value;
+                        }
+
+                        // Treat null/undefined as &quot;&quot;; convert numbers to string
+                        if ( val == null ) {
+                                val = &quot;&quot;;
+                        } else if ( typeof val === &quot;number&quot; ) {
+                                val += &quot;&quot;;
+                        } else if ( jQuery.isArray( val ) ) {
+                                val = jQuery.map(val, function ( value ) {
+                                        return value == null ? &quot;&quot; : value + &quot;&quot;;
+                                });
+                        }
+
+                        hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+                        // If set returns undefined, fall back to normal setting
+                        if ( !hooks || !(&quot;set&quot; in hooks) || hooks.set( this, val, &quot;value&quot; ) === undefined ) {
+                                this.value = val;
+                        }
+                });
+        }
+});
+
+jQuery.extend({
+        valHooks: {
+                option: {
+                        get: function( elem ) {
+                                // attributes.value is undefined in Blackberry 4.7 but
+                                // uses .value. See #6932
+                                var val = elem.attributes.value;
+                                return !val || val.specified ? elem.value : elem.text;
+                        }
+                },
+                select: {
+                        get: function( elem ) {
+                                var value, option,
+                                        options = elem.options,
+                                        index = elem.selectedIndex,
+                                        one = elem.type === &quot;select-one&quot; || index &lt; 0,
+                                        values = one ? null : [],
+                                        max = one ? index + 1 : options.length,
+                                        i = index &lt; 0 ?
+                                                max :
+                                                one ? index : 0;
+
+                                // Loop through all the selected options
+                                for ( ; i &lt; max; i++ ) {
+                                        option = options[ i ];
+
+                                        // oldIE doesn't update selected after form reset (#2551)
+                                        if ( ( option.selected || i === index ) &amp;&amp;
+                                                        // Don't return options that are disabled or in a disabled optgroup
+                                                        ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(&quot;disabled&quot;) === null ) &amp;&amp;
+                                                        ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, &quot;optgroup&quot; ) ) ) {
+
+                                                // Get the specific value for the option
+                                                value = jQuery( option ).val();
+
+                                                // We don't need an array for one selects
+                                                if ( one ) {
+                                                        return value;
+                                                }
+
+                                                // Multi-Selects return an array
+                                                values.push( value );
+                                        }
+                                }
+
+                                return values;
+                        },
+
+                        set: function( elem, value ) {
+                                var values = jQuery.makeArray( value );
+
+                                jQuery(elem).find(&quot;option&quot;).each(function() {
+                                        this.selected = jQuery.inArray( jQuery(this).val(), values ) &gt;= 0;
+                                });
+
+                                if ( !values.length ) {
+                                        elem.selectedIndex = -1;
+                                }
+                                return values;
+                        }
+                }
+        },
+
+        // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+        attrFn: {},
+
+        attr: function( elem, name, value, pass ) {
+                var ret, hooks, notxml,
+                        nType = elem.nodeType;
+
+                // don't get/set attributes on text, comment and attribute nodes
+                if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                        return;
+                }
+
+                if ( pass &amp;&amp; jQuery.isFunction( jQuery.fn[ name ] ) ) {
+                        return jQuery( elem )[ name ]( value );
+                }
+
+                // Fallback to prop when attributes are not supported
+                if ( typeof elem.getAttribute === &quot;undefined&quot; ) {
+                        return jQuery.prop( elem, name, value );
+                }
+
+                notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+                // All attributes are lowercase
+                // Grab necessary hook if one is defined
+                if ( notxml ) {
+                        name = name.toLowerCase();
+                        hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+                }
+
+                if ( value !== undefined ) {
+
+                        if ( value === null ) {
+                                jQuery.removeAttr( elem, name );
+                                return;
+
+                        } else if ( hooks &amp;&amp; &quot;set&quot; in hooks &amp;&amp; notxml &amp;&amp; (ret = hooks.set( elem, value, name )) !== undefined ) {
+                                return ret;
+
+                        } else {
+                                elem.setAttribute( name, value + &quot;&quot; );
+                                return value;
+                        }
+
+                } else if ( hooks &amp;&amp; &quot;get&quot; in hooks &amp;&amp; notxml &amp;&amp; (ret = hooks.get( elem, name )) !== null ) {
+                        return ret;
+
+                } else {
+
+                        ret = elem.getAttribute( name );
+
+                        // Non-existent attributes return null, we normalize to undefined
+                        return ret === null ?
+                                undefined :
+                                ret;
+                }
+        },
+
+        removeAttr: function( elem, value ) {
+                var propName, attrNames, name, isBool,
+                        i = 0;
+
+                if ( value &amp;&amp; elem.nodeType === 1 ) {
+
+                        attrNames = value.split( core_rspace );
+
+                        for ( ; i &lt; attrNames.length; i++ ) {
+                                name = attrNames[ i ];
+
+                                if ( name ) {
+                                        propName = jQuery.propFix[ name ] || name;
+                                        isBool = rboolean.test( name );
+
+                                        // See #9699 for explanation of this approach (setting first, then removal)
+                                        // Do not do this for boolean attributes (see #10870)
+                                        if ( !isBool ) {
+                                                jQuery.attr( elem, name, &quot;&quot; );
+                                        }
+                                        elem.removeAttribute( getSetAttribute ? name : propName );
+
+                                        // Set corresponding property to false for boolean attributes
+                                        if ( isBool &amp;&amp; propName in elem ) {
+                                                elem[ propName ] = false;
+                                        }
+                                }
+                        }
+                }
+        },
+
+        attrHooks: {
+                type: {
+                        set: function( elem, value ) {
+                                // We can't allow the type property to be changed (since it causes problems in IE)
+                                if ( rtype.test( elem.nodeName ) &amp;&amp; elem.parentNode ) {
+                                        jQuery.error( &quot;type property can't be changed&quot; );
+                                } else if ( !jQuery.support.radioValue &amp;&amp; value === &quot;radio&quot; &amp;&amp; jQuery.nodeName(elem, &quot;input&quot;) ) {
+                                        // Setting the type on a radio button after the value resets the value in IE6-9
+                                        // Reset value to it's default in case type is set after value
+                                        // This is for element creation
+                                        var val = elem.value;
+                                        elem.setAttribute( &quot;type&quot;, value );
+                                        if ( val ) {
+                                                elem.value = val;
+                                        }
+                                        return value;
+                                }
+                        }
+                },
+                // Use the value property for back compat
+                // Use the nodeHook for button elements in IE6/7 (#1954)
+                value: {
+                        get: function( elem, name ) {
+                                if ( nodeHook &amp;&amp; jQuery.nodeName( elem, &quot;button&quot; ) ) {
+                                        return nodeHook.get( elem, name );
+                                }
+                                return name in elem ?
+                                        elem.value :
+                                        null;
+                        },
+                        set: function( elem, value, name ) {
+                                if ( nodeHook &amp;&amp; jQuery.nodeName( elem, &quot;button&quot; ) ) {
+                                        return nodeHook.set( elem, value, name );
+                                }
+                                // Does not return so that setAttribute is also used
+                                elem.value = value;
+                        }
+                }
+        },
+
+        propFix: {
+                tabindex: &quot;tabIndex&quot;,
+                readonly: &quot;readOnly&quot;,
+                &quot;for&quot;: &quot;htmlFor&quot;,
+                &quot;class&quot;: &quot;className&quot;,
+                maxlength: &quot;maxLength&quot;,
+                cellspacing: &quot;cellSpacing&quot;,
+                cellpadding: &quot;cellPadding&quot;,
+                rowspan: &quot;rowSpan&quot;,
+                colspan: &quot;colSpan&quot;,
+                usemap: &quot;useMap&quot;,
+                frameborder: &quot;frameBorder&quot;,
+                contenteditable: &quot;contentEditable&quot;
+        },
+
+        prop: function( elem, name, value ) {
+                var ret, hooks, notxml,
+                        nType = elem.nodeType;
+
+                // don't get/set properties on text, comment and attribute nodes
+                if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                        return;
+                }
+
+                notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+                if ( notxml ) {
+                        // Fix name and attach hooks
+                        name = jQuery.propFix[ name ] || name;
+                        hooks = jQuery.propHooks[ name ];
+                }
+
+                if ( value !== undefined ) {
+                        if ( hooks &amp;&amp; &quot;set&quot; in hooks &amp;&amp; (ret = hooks.set( elem, value, name )) !== undefined ) {
+                                return ret;
+
+                        } else {
+                                return ( elem[ name ] = value );
+                        }
+
+                } else {
+                        if ( hooks &amp;&amp; &quot;get&quot; in hooks &amp;&amp; (ret = hooks.get( elem, name )) !== null ) {
+                                return ret;
+
+                        } else {
+                                return elem[ name ];
+                        }
+                }
+        },
+
+        propHooks: {
+                tabIndex: {
+                        get: function( elem ) {
+                                // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+                                // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                                var attributeNode = elem.getAttributeNode(&quot;tabindex&quot;);
+
+                                return attributeNode &amp;&amp; attributeNode.specified ?
+                                        parseInt( attributeNode.value, 10 ) :
+                                        rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) &amp;&amp; elem.href ?
+                                                0 :
+                                                undefined;
+                        }
+                }
+        }
+});
+
+// Hook for boolean attributes
+boolHook = {
+        get: function( elem, name ) {
+                // Align boolean attributes with corresponding properties
+                // Fall back to attribute presence where some booleans are not supported
+                var attrNode,
+                        property = jQuery.prop( elem, name );
+                return property === true || typeof property !== &quot;boolean&quot; &amp;&amp; ( attrNode = elem.getAttributeNode(name) ) &amp;&amp; attrNode.nodeValue !== false ?
+                        name.toLowerCase() :
+                        undefined;
+        },
+        set: function( elem, value, name ) {
+                var propName;
+                if ( value === false ) {
+                        // Remove boolean attributes when set to false
+                        jQuery.removeAttr( elem, name );
+                } else {
+                        // value is true since we know at this point it's type boolean and not false
+                        // Set boolean attributes to the same name and set the DOM property
+                        propName = jQuery.propFix[ name ] || name;
+                        if ( propName in elem ) {
+                                // Only set the IDL specifically if it already exists on the element
+                                elem[ propName ] = true;
+                        }
+
+                        elem.setAttribute( name, name.toLowerCase() );
+                }
+                return name;
+        }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+        fixSpecified = {
+                name: true,
+                id: true,
+                coords: true
+        };
+
+        // Use this for any attribute in IE6/7
+        // This fixes almost every IE6/7 issue
+        nodeHook = jQuery.valHooks.button = {
+                get: function( elem, name ) {
+                        var ret;
+                        ret = elem.getAttributeNode( name );
+                        return ret &amp;&amp; ( fixSpecified[ name ] ? ret.value !== &quot;&quot; : ret.specified ) ?
+                                ret.value :
+                                undefined;
+                },
+                set: function( elem, value, name ) {
+                        // Set the existing or create a new attribute node
+                        var ret = elem.getAttributeNode( name );
+                        if ( !ret ) {
+                                ret = document.createAttribute( name );
+                                elem.setAttributeNode( ret );
+                        }
+                        return ( ret.value = value + &quot;&quot; );
+                }
+        };
+
+        // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+        // This is for removals
+        jQuery.each([ &quot;width&quot;, &quot;height&quot; ], function( i, name ) {
+                jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                        set: function( elem, value ) {
+                                if ( value === &quot;&quot; ) {
+                                        elem.setAttribute( name, &quot;auto&quot; );
+                                        return value;
+                                }
+                        }
+                });
+        });
+
+        // Set contenteditable to false on removals(#10429)
+        // Setting to empty string throws an error as an invalid value
+        jQuery.attrHooks.contenteditable = {
+                get: nodeHook.get,
+                set: function( elem, value, name ) {
+                        if ( value === &quot;&quot; ) {
+                                value = &quot;false&quot;;
+                        }
+                        nodeHook.set( elem, value, name );
+                }
+        };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+        jQuery.each([ &quot;href&quot;, &quot;src&quot;, &quot;width&quot;, &quot;height&quot; ], function( i, name ) {
+                jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                        get: function( elem ) {
+                                var ret = elem.getAttribute( name, 2 );
+                                return ret === null ? undefined : ret;
+                        }
+                });
+        });
+}
+
+if ( !jQuery.support.style ) {
+        jQuery.attrHooks.style = {
+                get: function( elem ) {
+                        // Return undefined in the case of empty string
+                        // Normalize to lowercase since IE uppercases css property names
+                        return elem.style.cssText.toLowerCase() || undefined;
+                },
+                set: function( elem, value ) {
+                        return ( elem.style.cssText = value + &quot;&quot; );
+                }
+        };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+        jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+                get: function( elem ) {
+                        var parent = elem.parentNode;
+
+                        if ( parent ) {
+                                parent.selectedIndex;
+
+                                // Make sure that it also works with optgroups, see #5701
+                                if ( parent.parentNode ) {
+                                        parent.parentNode.selectedIndex;
+                                }
+                        }
+                        return null;
+                }
+        });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+        jQuery.propFix.enctype = &quot;encoding&quot;;
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+        jQuery.each([ &quot;radio&quot;, &quot;checkbox&quot; ], function() {
+                jQuery.valHooks[ this ] = {
+                        get: function( elem ) {
+                                // Handle the case where in Webkit &quot;&quot; is returned instead of &quot;on&quot; if a value isn't specified
+                                return elem.getAttribute(&quot;value&quot;) === null ? &quot;on&quot; : elem.value;
+                        }
+                };
+        });
+}
+jQuery.each([ &quot;radio&quot;, &quot;checkbox&quot; ], function() {
+        jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+                set: function( elem, value ) {
+                        if ( jQuery.isArray( value ) ) {
+                                return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) &gt;= 0 );
+                        }
+                }
+        });
+});
+var rformElems = /^(?:textarea|input|select)$/i,
+        rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
+        rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
+        rkeyEvent = /^key/,
+        rmouseEvent = /^(?:mouse|contextmenu)|click/,
+        rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+        hoverHack = function( events ) {
+                return jQuery.event.special.hover ? events : events.replace( rhoverHack, &quot;mouseenter$1 mouseleave$1&quot; );
+        };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+        add: function( elem, types, handler, data, selector ) {
+
+                var elemData, eventHandle, events,
+                        t, tns, type, namespaces, handleObj,
+                        handleObjIn, handlers, special;
+
+                // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+                if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+                        return;
+                }
+
+                // Caller can pass in an object of custom data in lieu of the handler
+                if ( handler.handler ) {
+                        handleObjIn = handler;
+                        handler = handleObjIn.handler;
+                        selector = handleObjIn.selector;
+                }
+
+                // Make sure that the handler has a unique ID, used to find/remove it later
+                if ( !handler.guid ) {
+                        handler.guid = jQuery.guid++;
+                }
+
+                // Init the element's event structure and main handler, if this is the first
+                events = elemData.events;
+                if ( !events ) {
+                        elemData.events = events = {};
+                }
+                eventHandle = elemData.handle;
+                if ( !eventHandle ) {
+                        elemData.handle = eventHandle = function( e ) {
+                                // Discard the second event of a jQuery.event.trigger() and
+                                // when an event is called after a page has unloaded
+                                return typeof jQuery !== &quot;undefined&quot; &amp;&amp; (!e || jQuery.event.triggered !== e.type) ?
+                                        jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+                                        undefined;
+                        };
+                        // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+                        eventHandle.elem = elem;
+                }
+
+                // Handle multiple events separated by a space
+                // jQuery(...).bind(&quot;mouseover mouseout&quot;, fn);
+                types = jQuery.trim( hoverHack(types) ).split( &quot; &quot; );
+                for ( t = 0; t &lt; types.length; t++ ) {
+
+                        tns = rtypenamespace.exec( types[t] ) || [];
+                        type = tns[1];
+                        namespaces = ( tns[2] || &quot;&quot; ).split( &quot;.&quot; ).sort();
+
+                        // If event changes its type, use the special event handlers for the changed type
+                        special = jQuery.event.special[ type ] || {};
+
+                        // If selector defined, determine special event api type, otherwise given type
+                        type = ( selector ? special.delegateType : special.bindType ) || type;
+
+                        // Update special based on newly reset type
+                        special = jQuery.event.special[ type ] || {};
+
+                        // handleObj is passed to all event handlers
+                        handleObj = jQuery.extend({
+                                type: type,
+                                origType: tns[1],
+                                data: data,
+                                handler: handler,
+                                guid: handler.guid,
+                                selector: selector,
+                                needsContext: selector &amp;&amp; jQuery.expr.match.needsContext.test( selector ),
+                                namespace: namespaces.join(&quot;.&quot;)
+                        }, handleObjIn );
+
+                        // Init the event handler queue if we're the first
+                        handlers = events[ type ];
+                        if ( !handlers ) {
+                                handlers = events[ type ] = [];
+                                handlers.delegateCount = 0;
+
+                                // Only use addEventListener/attachEvent if the special events handler returns false
+                                if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+                                        // Bind the global event handler to the element
+                                        if ( elem.addEventListener ) {
+                                                elem.addEventListener( type, eventHandle, false );
+
+                                        } else if ( elem.attachEvent ) {
+                                                elem.attachEvent( &quot;on&quot; + type, eventHandle );
+                                        }
+                                }
+                        }
+
+                        if ( special.add ) {
+                                special.add.call( elem, handleObj );
+
+                                if ( !handleObj.handler.guid ) {
+                                        handleObj.handler.guid = handler.guid;
+                                }
+                        }
+
+                        // Add to the element's handler list, delegates in front
+                        if ( selector ) {
+                                handlers.splice( handlers.delegateCount++, 0, handleObj );
+                        } else {
+                                handlers.push( handleObj );
+                        }
+
+                        // Keep track of which events have ever been used, for event optimization
+                        jQuery.event.global[ type ] = true;
+                }
+
+                // Nullify elem to prevent memory leaks in IE
+                elem = null;
+        },
+
+        global: {},
+
+        // Detach an event or set of events from an element
+        remove: function( elem, types, handler, selector, mappedTypes ) {
+
+                var t, tns, type, origType, namespaces, origCount,
+                        j, events, special, eventType, handleObj,
+                        elemData = jQuery.hasData( elem ) &amp;&amp; jQuery._data( elem );
+
+                if ( !elemData || !(events = elemData.events) ) {
+                        return;
+                }
+
+                // Once for each type.namespace in types; type may be omitted
+                types = jQuery.trim( hoverHack( types || &quot;&quot; ) ).split(&quot; &quot;);
+                for ( t = 0; t &lt; types.length; t++ ) {
+                        tns = rtypenamespace.exec( types[t] ) || [];
+                        type = origType = tns[1];
+                        namespaces = tns[2];
+
+                        // Unbind all events (on this namespace, if provided) for the element
+                        if ( !type ) {
+                                for ( type in events ) {
+                                        jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+                                }
+                                continue;
+                        }
+
+                        special = jQuery.event.special[ type ] || {};
+                        type = ( selector? special.delegateType : special.bindType ) || type;
+                        eventType = events[ type ] || [];
+                        origCount = eventType.length;
+                        namespaces = namespaces ? new RegExp(&quot;(^|\\.)&quot; + namespaces.split(&quot;.&quot;).sort().join(&quot;\\.(?:.*\\.|)&quot;) + &quot;(\\.|$)&quot;) : null;
+
+                        // Remove matching events
+                        for ( j = 0; j &lt; eventType.length; j++ ) {
+                                handleObj = eventType[ j ];
+
+                                if ( ( mappedTypes || origType === handleObj.origType ) &amp;&amp;
+                                         ( !handler || handler.guid === handleObj.guid ) &amp;&amp;
+                                         ( !namespaces || namespaces.test( handleObj.namespace ) ) &amp;&amp;
+                                         ( !selector || selector === handleObj.selector || selector === &quot;**&quot; &amp;&amp; handleObj.selector ) ) {
+                                        eventType.splice( j--, 1 );
+
+                                        if ( handleObj.selector ) {
+                                                eventType.delegateCount--;
+                                        }
+                                        if ( special.remove ) {
+                                                special.remove.call( elem, handleObj );
+                                        }
+                                }
+                        }
+
+                        // Remove generic event handler if we removed something and no more handlers exist
+                        // (avoids potential for endless recursion during removal of special event handlers)
+                        if ( eventType.length === 0 &amp;&amp; origCount !== eventType.length ) {
+                                if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+                                        jQuery.removeEvent( elem, type, elemData.handle );
+                                }
+
+                                delete events[ type ];
+                        }
+                }
+
+                // Remove the expando if it's no longer used
+                if ( jQuery.isEmptyObject( events ) ) {
+                        delete elemData.handle;
+
+                        // removeData also checks for emptiness and clears the expando if empty
+                        // so use it instead of delete
+                        jQuery.removeData( elem, &quot;events&quot;, true );
+                }
+        },
+
+        // Events that are safe to short-circuit if no handlers are attached.
+        // Native DOM events should not be added, they may have inline handlers.
+        customEvent: {
+                &quot;getData&quot;: true,
+                &quot;setData&quot;: true,
+                &quot;changeData&quot;: true
+        },
+
+        trigger: function( event, data, elem, onlyHandlers ) {
+                // Don't do events on text and comment nodes
+                if ( elem &amp;&amp; (elem.nodeType === 3 || elem.nodeType === 8) ) {
+                        return;
+                }
+
+                // Event object or event type
+                var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
+                        type = event.type || event,
+                        namespaces = [];
+
+                // focus/blur morphs to focusin/out; ensure we're not firing them right now
+                if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+                        return;
+                }
+
+                if ( type.indexOf( &quot;!&quot; ) &gt;= 0 ) {
+                        // Exclusive events trigger only for the exact event (no namespaces)
+                        type = type.slice(0, -1);
+                        exclusive = true;
+                }
+
+                if ( type.indexOf( &quot;.&quot; ) &gt;= 0 ) {
+                        // Namespaced trigger; create a regexp to match event type in handle()
+                        namespaces = type.split(&quot;.&quot;);
+                        type = namespaces.shift();
+                        namespaces.sort();
+                }
+
+                if ( (!elem || jQuery.event.customEvent[ type ]) &amp;&amp; !jQuery.event.global[ type ] ) {
+                        // No jQuery handlers for this event type, and it can't have inline handlers
+                        return;
+                }
+
+                // Caller can pass in an Event, Object, or just an event type string
+                event = typeof event === &quot;object&quot; ?
+                        // jQuery.Event object
+                        event[ jQuery.expando ] ? event :
+                        // Object literal
+                        new jQuery.Event( type, event ) :
+                        // Just the event type (string)
+                        new jQuery.Event( type );
+
+                event.type = type;
+                event.isTrigger = true;
+                event.exclusive = exclusive;
+                event.namespace = namespaces.join( &quot;.&quot; );
+                event.namespace_re = event.namespace? new RegExp(&quot;(^|\\.)&quot; + namespaces.join(&quot;\\.(?:.*\\.|)&quot;) + &quot;(\\.|$)&quot;) : null;
+                ontype = type.indexOf( &quot;:&quot; ) &lt; 0 ? &quot;on&quot; + type : &quot;&quot;;
+
+                // Handle a global trigger
+                if ( !elem ) {
+
+                        // TODO: Stop taunting the data cache; remove global events and always attach to document
+                        cache = jQuery.cache;
+                        for ( i in cache ) {
+                                if ( cache[ i ].events &amp;&amp; cache[ i ].events[ type ] ) {
+                                        jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+                                }
+                        }
+                        return;
+                }
+
+                // Clean up the event in case it is being reused
+                event.result = undefined;
+                if ( !event.target ) {
+                        event.target = elem;
+                }
+
+                // Clone any incoming data and prepend the event, creating the handler arg list
+                data = data != null ? jQuery.makeArray( data ) : [];
+                data.unshift( event );
+
+                // Allow special events to draw outside the lines
+                special = jQuery.event.special[ type ] || {};
+                if ( special.trigger &amp;&amp; special.trigger.apply( elem, data ) === false ) {
+                        return;
+                }
+
+                // Determine event propagation path in advance, per W3C events spec (#9951)
+                // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+                eventPath = [[ elem, special.bindType || type ]];
+                if ( !onlyHandlers &amp;&amp; !special.noBubble &amp;&amp; !jQuery.isWindow( elem ) ) {
+
+                        bubbleType = special.delegateType || type;
+                        cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+                        for ( old = elem; cur; cur = cur.parentNode ) {
+                                eventPath.push([ cur, bubbleType ]);
+                                old = cur;
+                        }
+
+                        // Only add window if we got to document (e.g., not plain obj or detached DOM)
+                        if ( old === (elem.ownerDocument || document) ) {
+                                eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+                        }
+                }
+
+                // Fire handlers on the event path
+                for ( i = 0; i &lt; eventPath.length &amp;&amp; !event.isPropagationStopped(); i++ ) {
+
+                        cur = eventPath[i][0];
+                        event.type = eventPath[i][1];
+
+                        handle = ( jQuery._data( cur, &quot;events&quot; ) || {} )[ event.type ] &amp;&amp; jQuery._data( cur, &quot;handle&quot; );
+                        if ( handle ) {
+                                handle.apply( cur, data );
+                        }
+                        // Note that this is a bare JS function and not a jQuery handler
+                        handle = ontype &amp;&amp; cur[ ontype ];
+                        if ( handle &amp;&amp; jQuery.acceptData( cur ) &amp;&amp; handle.apply &amp;&amp; handle.apply( cur, data ) === false ) {
+                                event.preventDefault();
+                        }
+                }
+                event.type = type;
+
+                // If nobody prevented the default action, do it now
+                if ( !onlyHandlers &amp;&amp; !event.isDefaultPrevented() ) {
+
+                        if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &amp;&amp;
+                                !(type === &quot;click&quot; &amp;&amp; jQuery.nodeName( elem, &quot;a&quot; )) &amp;&amp; jQuery.acceptData( elem ) ) {
+
+                                // Call a native DOM method on the target with the same name name as the event.
+                                // Can't use an .isFunction() check here because IE6/7 fails that test.
+                                // Don't do default actions on window, that's where global variables be (#6170)
+                                // IE&lt;9 dies on focus/blur to hidden element (#1486)
+                                if ( ontype &amp;&amp; elem[ type ] &amp;&amp; ((type !== &quot;focus&quot; &amp;&amp; type !== &quot;blur&quot;) || event.target.offsetWidth !== 0) &amp;&amp; !jQuery.isWindow( elem ) ) {
+
+                                        // Don't re-trigger an onFOO event when we call its FOO() method
+                                        old = elem[ ontype ];
+
+                                        if ( old ) {
+                                                elem[ ontype ] = null;
+                                        }
+
+                                        // Prevent re-triggering of the same event, since we already bubbled it above
+                                        jQuery.event.triggered = type;
+                                        elem[ type ]();
+                                        jQuery.event.triggered = undefined;
+
+                                        if ( old ) {
+                                                elem[ ontype ] = old;
+                                        }
+                                }
+                        }
+                }
+
+                return event.result;
+        },
+
+        dispatch: function( event ) {
+
+                // Make a writable jQuery.Event from the native event object
+                event = jQuery.event.fix( event || window.event );
+
+                var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
+                        handlers = ( (jQuery._data( this, &quot;events&quot; ) || {} )[ event.type ] || []),
+                        delegateCount = handlers.delegateCount,
+                        args = core_slice.call( arguments ),
+                        run_all = !event.exclusive &amp;&amp; !event.namespace,
+                        special = jQuery.event.special[ event.type ] || {},
+                        handlerQueue = [];
+
+                // Use the fix-ed jQuery.Event rather than the (read-only) native event
+                args[0] = event;
+                event.delegateTarget = this;
+
+                // Call the preDispatch hook for the mapped type, and let it bail if desired
+                if ( special.preDispatch &amp;&amp; special.preDispatch.call( this, event ) === false ) {
+                        return;
+                }
+
+                // Determine handlers that should run if there are delegated events
+                // Avoid non-left-click bubbling in Firefox (#3861)
+                if ( delegateCount &amp;&amp; !(event.button &amp;&amp; event.type === &quot;click&quot;) ) {
+
+                        for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+                                // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
+                                if ( cur.disabled !== true || event.type !== &quot;click&quot; ) {
+                                        selMatch = {};
+                                        matches = [];
+                                        for ( i = 0; i &lt; delegateCount; i++ ) {
+                                                handleObj = handlers[ i ];
+                                                sel = handleObj.selector;
+
+                                                if ( selMatch[ sel ] === undefined ) {
+                                                        selMatch[ sel ] = handleObj.needsContext ?
+                                                                jQuery( sel, this ).index( cur ) &gt;= 0 :
+                                                                jQuery.find( sel, this, null, [ cur ] ).length;
+                                                }
+                                                if ( selMatch[ sel ] ) {
+                                                        matches.push( handleObj );
+                                                }
+                                        }
+                                        if ( matches.length ) {
+                                                handlerQueue.push({ elem: cur, matches: matches });
+                                        }
+                                }
+                        }
+                }
+
+                // Add the remaining (directly-bound) handlers
+                if ( handlers.length &gt; delegateCount ) {
+                        handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+                }
+
+                // Run delegates first; they may want to stop propagation beneath us
+                for ( i = 0; i &lt; handlerQueue.length &amp;&amp; !event.isPropagationStopped(); i++ ) {
+                        matched = handlerQueue[ i ];
+                        event.currentTarget = matched.elem;
+
+                        for ( j = 0; j &lt; matched.matches.length &amp;&amp; !event.isImmediatePropagationStopped(); j++ ) {
+                                handleObj = matched.matches[ j ];
+
+                                // Triggered event must either 1) be non-exclusive and have no namespace, or
+                                // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+                                if ( run_all || (!event.namespace &amp;&amp; !handleObj.namespace) || event.namespace_re &amp;&amp; event.namespace_re.test( handleObj.namespace ) ) {
+
+                                        event.data = handleObj.data;
+                                        event.handleObj = handleObj;
+
+                                        ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+                                                        .apply( matched.elem, args );
+
+                                        if ( ret !== undefined ) {
+                                                event.result = ret;
+                                                if ( ret === false ) {
+                                                        event.preventDefault();
+                                                        event.stopPropagation();
+                                                }
+                                        }
+                                }
+                        }
+                }
+
+                // Call the postDispatch hook for the mapped type
+                if ( special.postDispatch ) {
+                        special.postDispatch.call( this, event );
+                }
+
+                return event.result;
+        },
+
+        // Includes some event props shared by KeyEvent and MouseEvent
+        // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+        props: &quot;attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which&quot;.split(&quot; &quot;),
+
+        fixHooks: {},
+
+        keyHooks: {
+                props: &quot;char charCode key keyCode&quot;.split(&quot; &quot;),
+                filter: function( event, original ) {
+
+                        // Add which for key events
+                        if ( event.which == null ) {
+                                event.which = original.charCode != null ? original.charCode : original.keyCode;
+                        }
+
+                        return event;
+                }
+        },
+
+        mouseHooks: {
+                props: &quot;button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement&quot;.split(&quot; &quot;),
+                filter: function( event, original ) {
+                        var eventDoc, doc, body,
+                                button = original.button,
+                                fromElement = original.fromElement;
+
+                        // Calculate pageX/Y if missing and clientX/Y available
+                        if ( event.pageX == null &amp;&amp; original.clientX != null ) {
+                                eventDoc = event.target.ownerDocument || document;
+                                doc = eventDoc.documentElement;
+                                body = eventDoc.body;
+
+                                event.pageX = original.clientX + ( doc &amp;&amp; doc.scrollLeft || body &amp;&amp; body.scrollLeft || 0 ) - ( doc &amp;&amp; doc.clientLeft || body &amp;&amp; body.clientLeft || 0 );
+                                event.pageY = original.clientY + ( doc &amp;&amp; doc.scrollTop  || body &amp;&amp; body.scrollTop  || 0 ) - ( doc &amp;&amp; doc.clientTop  || body &amp;&amp; body.clientTop  || 0 );
+                        }
+
+                        // Add relatedTarget, if necessary
+                        if ( !event.relatedTarget &amp;&amp; fromElement ) {
+                                event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+                        }
+
+                        // Add which for click: 1 === left; 2 === middle; 3 === right
+                        // Note: button is not normalized, so don't use it
+                        if ( !event.which &amp;&amp; button !== undefined ) {
+                                event.which = ( button &amp; 1 ? 1 : ( button &amp; 2 ? 3 : ( button &amp; 4 ? 2 : 0 ) ) );
+                        }
+
+                        return event;
+                }
+        },
+
+        fix: function( event ) {
+                if ( event[ jQuery.expando ] ) {
+                        return event;
+                }
+
+                // Create a writable copy of the event object and normalize some properties
+                var i, prop,
+                        originalEvent = event,
+                        fixHook = jQuery.event.fixHooks[ event.type ] || {},
+                        copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+                event = jQuery.Event( originalEvent );
+
+                for ( i = copy.length; i; ) {
+                        prop = copy[ --i ];
+                        event[ prop ] = originalEvent[ prop ];
+                }
+
+                // Fix target property, if necessary (#1925, IE 6/7/8 &amp; Safari2)
+                if ( !event.target ) {
+                        event.target = originalEvent.srcElement || document;
+                }
+
+                // Target should not be a text node (#504, Safari)
+                if ( event.target.nodeType === 3 ) {
+                        event.target = event.target.parentNode;
+                }
+
+                // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
+                event.metaKey = !!event.metaKey;
+
+                return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+        },
+
+        special: {
+                load: {
+                        // Prevent triggered image.load events from bubbling to window.load
+                        noBubble: true
+                },
+
+                focus: {
+                        delegateType: &quot;focusin&quot;
+                },
+                blur: {
+                        delegateType: &quot;focusout&quot;
+                },
+
+                beforeunload: {
+                        setup: function( data, namespaces, eventHandle ) {
+                                // We only want to do this special case on windows
+                                if ( jQuery.isWindow( this ) ) {
+                                        this.onbeforeunload = eventHandle;
+                                }
+                        },
+
+                        teardown: function( namespaces, eventHandle ) {
+                                if ( this.onbeforeunload === eventHandle ) {
+                                        this.onbeforeunload = null;
+                                }
+                        }
+                }
+        },
+
+        simulate: function( type, elem, event, bubble ) {
+                // Piggyback on a donor event to simulate a different one.
+                // Fake originalEvent to avoid donor's stopPropagation, but if the
+                // simulated event prevents default then we do the same on the donor.
+                var e = jQuery.extend(
+                        new jQuery.Event(),
+                        event,
+                        { type: type,
+                                isSimulated: true,
+                                originalEvent: {}
+                        }
+                );
+                if ( bubble ) {
+                        jQuery.event.trigger( e, null, elem );
+                } else {
+                        jQuery.event.dispatch.call( elem, e );
+                }
+                if ( e.isDefaultPrevented() ) {
+                        event.preventDefault();
+                }
+        }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+        function( elem, type, handle ) {
+                if ( elem.removeEventListener ) {
+                        elem.removeEventListener( type, handle, false );
+                }
+        } :
+        function( elem, type, handle ) {
+                var name = &quot;on&quot; + type;
+
+                if ( elem.detachEvent ) {
+
+                        // #8545, #7054, preventing memory leaks for custom events in IE6-8
+                        // detachEvent needed property on element, by name of that event, to properly expose it to GC
+                        if ( typeof elem[ name ] === &quot;undefined&quot; ) {
+                                elem[ name ] = null;
+                        }
+
+                        elem.detachEvent( name, handle );
+                }
+        };
+
+jQuery.Event = function( src, props ) {
+        // Allow instantiation without the 'new' keyword
+        if ( !(this instanceof jQuery.Event) ) {
+                return new jQuery.Event( src, props );
+        }
+
+        // Event object
+        if ( src &amp;&amp; src.type ) {
+                this.originalEvent = src;
+                this.type = src.type;
+
+                // Events bubbling up the document may have been marked as prevented
+                // by a handler lower down the tree; reflect the correct value.
+                this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+                        src.getPreventDefault &amp;&amp; src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+        // Event type
+        } else {
+                this.type = src;
+        }
+
+        // Put explicitly provided properties onto the event object
+        if ( props ) {
+                jQuery.extend( this, props );
+        }
+
+        // Create a timestamp if incoming event doesn't have one
+        this.timeStamp = src &amp;&amp; src.timeStamp || jQuery.now();
+
+        // Mark it as fixed
+        this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+        return false;
+}
+function returnTrue() {
+        return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+        preventDefault: function() {
+                this.isDefaultPrevented = returnTrue;
+
+                var e = this.originalEvent;
+                if ( !e ) {
+                        return;
+                }
+
+                // if preventDefault exists run it on the original event
+                if ( e.preventDefault ) {
+                        e.preventDefault();
+
+                // otherwise set the returnValue property of the original event to false (IE)
+                } else {
+                        e.returnValue = false;
+                }
+        },
+        stopPropagation: function() {
+                this.isPropagationStopped = returnTrue;
+
+                var e = this.originalEvent;
+                if ( !e ) {
+                        return;
+                }
+                // if stopPropagation exists run it on the original event
+                if ( e.stopPropagation ) {
+                        e.stopPropagation();
+                }
+                // otherwise set the cancelBubble property of the original event to true (IE)
+                e.cancelBubble = true;
+        },
+        stopImmediatePropagation: function() {
+                this.isImmediatePropagationStopped = returnTrue;
+                this.stopPropagation();
+        },
+        isDefaultPrevented: returnFalse,
+        isPropagationStopped: returnFalse,
+        isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+        mouseenter: &quot;mouseover&quot;,
+        mouseleave: &quot;mouseout&quot;
+}, function( orig, fix ) {
+        jQuery.event.special[ orig ] = {
+                delegateType: fix,
+                bindType: fix,
+
+                handle: function( event ) {
+                        var ret,
+                                target = this,
+                                related = event.relatedTarget,
+                                handleObj = event.handleObj,
+                                selector = handleObj.selector;
+
+                        // For mousenter/leave call the handler if related is outside the target.
+                        // NB: No relatedTarget if the mouse left/entered the browser window
+                        if ( !related || (related !== target &amp;&amp; !jQuery.contains( target, related )) ) {
+                                event.type = handleObj.origType;
+                                ret = handleObj.handler.apply( this, arguments );
+                                event.type = fix;
+                        }
+                        return ret;
+                }
+        };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+        jQuery.event.special.submit = {
+                setup: function() {
+                        // Only need this for delegated form submit events
+                        if ( jQuery.nodeName( this, &quot;form&quot; ) ) {
+                                return false;
+                        }
+
+                        // Lazy-add a submit handler when a descendant form may potentially be submitted
+                        jQuery.event.add( this, &quot;click._submit keypress._submit&quot;, function( e ) {
+                                // Node name check avoids a VML-related crash in IE (#9807)
+                                var elem = e.target,
+                                        form = jQuery.nodeName( elem, &quot;input&quot; ) || jQuery.nodeName( elem, &quot;button&quot; ) ? elem.form : undefined;
+                                if ( form &amp;&amp; !jQuery._data( form, &quot;_submit_attached&quot; ) ) {
+                                        jQuery.event.add( form, &quot;submit._submit&quot;, function( event ) {
+                                                event._submit_bubble = true;
+                                        });
+                                        jQuery._data( form, &quot;_submit_attached&quot;, true );
+                                }
+                        });
+                        // return undefined since we don't need an event listener
+                },
+
+                postDispatch: function( event ) {
+                        // If form was submitted by the user, bubble the event up the tree
+                        if ( event._submit_bubble ) {
+                                delete event._submit_bubble;
+                                if ( this.parentNode &amp;&amp; !event.isTrigger ) {
+                                        jQuery.event.simulate( &quot;submit&quot;, this.parentNode, event, true );
+                                }
+                        }
+                },
+
+                teardown: function() {
+                        // Only need this for delegated form submit events
+                        if ( jQuery.nodeName( this, &quot;form&quot; ) ) {
+                                return false;
+                        }
+
+                        // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+                        jQuery.event.remove( this, &quot;._submit&quot; );
+                }
+        };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+        jQuery.event.special.change = {
+
+                setup: function() {
+
+                        if ( rformElems.test( this.nodeName ) ) {
+                                // IE doesn't fire change on a check/radio until blur; trigger it on click
+                                // after a propertychange. Eat the blur-change in special.change.handle.
+                                // This still fires onchange a second time for check/radio after blur.
+                                if ( this.type === &quot;checkbox&quot; || this.type === &quot;radio&quot; ) {
+                                        jQuery.event.add( this, &quot;propertychange._change&quot;, function( event ) {
+                                                if ( event.originalEvent.propertyName === &quot;checked&quot; ) {
+                                                        this._just_changed = true;
+                                                }
+                                        });
+                                        jQuery.event.add( this, &quot;click._change&quot;, function( event ) {
+                                                if ( this._just_changed &amp;&amp; !event.isTrigger ) {
+                                                        this._just_changed = false;
+                                                }
+                                                // Allow triggered, simulated change events (#11500)
+                                                jQuery.event.simulate( &quot;change&quot;, this, event, true );
+                                        });
+                                }
+                                return false;
+                        }
+                        // Delegated event; lazy-add a change handler on descendant inputs
+                        jQuery.event.add( this, &quot;beforeactivate._change&quot;, function( e ) {
+                                var elem = e.target;
+
+                                if ( rformElems.test( elem.nodeName ) &amp;&amp; !jQuery._data( elem, &quot;_change_attached&quot; ) ) {
+                                        jQuery.event.add( elem, &quot;change._change&quot;, function( event ) {
+                                                if ( this.parentNode &amp;&amp; !event.isSimulated &amp;&amp; !event.isTrigger ) {
+                                                        jQuery.event.simulate( &quot;change&quot;, this.parentNode, event, true );
+                                                }
+                                        });
+                                        jQuery._data( elem, &quot;_change_attached&quot;, true );
+                                }
+                        });
+                },
+
+                handle: function( event ) {
+                        var elem = event.target;
+
+                        // Swallow native change events from checkbox/radio, we already triggered them above
+                        if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== &quot;radio&quot; &amp;&amp; elem.type !== &quot;checkbox&quot;) ) {
+                                return event.handleObj.handler.apply( this, arguments );
+                        }
+                },
+
+                teardown: function() {
+                        jQuery.event.remove( this, &quot;._change&quot; );
+
+                        return !rformElems.test( this.nodeName );
+                }
+        };
+}
+
+// Create &quot;bubbling&quot; focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+        jQuery.each({ focus: &quot;focusin&quot;, blur: &quot;focusout&quot; }, function( orig, fix ) {
+
+                // Attach a single capturing handler while someone wants focusin/focusout
+                var attaches = 0,
+                        handler = function( event ) {
+                                jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+                        };
+
+                jQuery.event.special[ fix ] = {
+                        setup: function() {
+                                if ( attaches++ === 0 ) {
+                                        document.addEventListener( orig, handler, true );
+                                }
+                        },
+                        teardown: function() {
+                                if ( --attaches === 0 ) {
+                                        document.removeEventListener( orig, handler, true );
+                                }
+                        }
+                };
+        });
+}
+
+jQuery.fn.extend({
+
+        on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+                var origFn, type;
+
+                // Types can be a map of types/handlers
+                if ( typeof types === &quot;object&quot; ) {
+                        // ( types-Object, selector, data )
+                        if ( typeof selector !== &quot;string&quot; ) { // &amp;&amp; selector != null
+                                // ( types-Object, data )
+                                data = data || selector;
+                                selector = undefined;
+                        }
+                        for ( type in types ) {
+                                this.on( type, selector, data, types[ type ], one );
+                        }
+                        return this;
+                }
+
+                if ( data == null &amp;&amp; fn == null ) {
+                        // ( types, fn )
+                        fn = selector;
+                        data = selector = undefined;
+                } else if ( fn == null ) {
+                        if ( typeof selector === &quot;string&quot; ) {
+                                // ( types, selector, fn )
+                                fn = data;
+                                data = undefined;
+                        } else {
+                                // ( types, data, fn )
+                                fn = data;
+                                data = selector;
+                                selector = undefined;
+                        }
+                }
+                if ( fn === false ) {
+                        fn = returnFalse;
+                } else if ( !fn ) {
+                        return this;
+                }
+
+                if ( one === 1 ) {
+                        origFn = fn;
+                        fn = function( event ) {
+                                // Can use an empty set, since event contains the info
+                                jQuery().off( event );
+                                return origFn.apply( this, arguments );
+                        };
+                        // Use same guid so caller can remove using origFn
+                        fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+                }
+                return this.each( function() {
+                        jQuery.event.add( this, types, fn, data, selector );
+                });
+        },
+        one: function( types, selector, data, fn ) {
+                return this.on( types, selector, data, fn, 1 );
+        },
+        off: function( types, selector, fn ) {
+                var handleObj, type;
+                if ( types &amp;&amp; types.preventDefault &amp;&amp; types.handleObj ) {
+                        // ( event )  dispatched jQuery.Event
+                        handleObj = types.handleObj;
+                        jQuery( types.delegateTarget ).off(
+                                handleObj.namespace ? handleObj.origType + &quot;.&quot; + handleObj.namespace : handleObj.origType,
+                                handleObj.selector,
+                                handleObj.handler
+                        );
+                        return this;
+                }
+                if ( typeof types === &quot;object&quot; ) {
+                        // ( types-object [, selector] )
+                        for ( type in types ) {
+                                this.off( type, selector, types[ type ] );
+                        }
+                        return this;
+                }
+                if ( selector === false || typeof selector === &quot;function&quot; ) {
+                        // ( types [, fn] )
+                        fn = selector;
+                        selector = undefined;
+                }
+                if ( fn === false ) {
+                        fn = returnFalse;
+                }
+                return this.each(function() {
+                        jQuery.event.remove( this, types, fn, selector );
+                });
+        },
+
+        bind: function( types, data, fn ) {
+                return this.on( types, null, data, fn );
+        },
+        unbind: function( types, fn ) {
+                return this.off( types, null, fn );
+        },
+
+        live: function( types, data, fn ) {
+                jQuery( this.context ).on( types, this.selector, data, fn );
+                return this;
+        },
+        die: function( types, fn ) {
+                jQuery( this.context ).off( types, this.selector || &quot;**&quot;, fn );
+                return this;
+        },
+
+        delegate: function( selector, types, data, fn ) {
+                return this.on( types, selector, data, fn );
+        },
+        undelegate: function( selector, types, fn ) {
+                // ( namespace ) or ( selector, types [, fn] )
+                return arguments.length === 1 ? this.off( selector, &quot;**&quot; ) : this.off( types, selector || &quot;**&quot;, fn );
+        },
+
+        trigger: function( type, data ) {
+                return this.each(function() {
+                        jQuery.event.trigger( type, data, this );
+                });
+        },
+        triggerHandler: function( type, data ) {
+                if ( this[0] ) {
+                        return jQuery.event.trigger( type, data, this[0], true );
+                }
+        },
+
+        toggle: function( fn ) {
+                // Save reference to arguments for access in closure
+                var args = arguments,
+                        guid = fn.guid || jQuery.guid++,
+                        i = 0,
+                        toggler = function( event ) {
+                                // Figure out which function to execute
+                                var lastToggle = ( jQuery._data( this, &quot;lastToggle&quot; + fn.guid ) || 0 ) % i;
+                                jQuery._data( this, &quot;lastToggle&quot; + fn.guid, lastToggle + 1 );
+
+                                // Make sure that clicks stop
+                                event.preventDefault();
+
+                                // and execute the function
+                                return args[ lastToggle ].apply( this, arguments ) || false;
+                        };
+
+                // link all the functions, so any of them can unbind this click handler
+                toggler.guid = guid;
+                while ( i &lt; args.length ) {
+                        args[ i++ ].guid = guid;
+                }
+
+                return this.click( toggler );
+        },
+
+        hover: function( fnOver, fnOut ) {
+                return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+        }
+});
+
+jQuery.each( (&quot;blur focus focusin focusout load resize scroll unload click dblclick &quot; +
+        &quot;mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave &quot; +
+        &quot;change select submit keydown keypress keyup error contextmenu&quot;).split(&quot; &quot;), function( i, name ) {
+
+        // Handle event binding
+        jQuery.fn[ name ] = function( data, fn ) {
+                if ( fn == null ) {
+                        fn = data;
+                        data = null;
+                }
+
+                return arguments.length &gt; 0 ?
+                        this.on( name, null, data, fn ) :
+                        this.trigger( name );
+        };
+
+        if ( rkeyEvent.test( name ) ) {
+                jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+        }
+
+        if ( rmouseEvent.test( name ) ) {
+                jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+        }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var cachedruns,
+        assertGetIdNotName,
+        Expr,
+        getText,
+        isXML,
+        contains,
+        compile,
+        sortOrder,
+        hasDuplicate,
+        outermostContext,
+
+        baseHasDuplicate = true,
+        strundefined = &quot;undefined&quot;,
+
+        expando = ( &quot;sizcache&quot; + Math.random() ).replace( &quot;.&quot;, &quot;&quot; ),
+
+        Token = String,
+        document = window.document,
+        docElem = document.documentElement,
+        dirruns = 0,
+        done = 0,
+        pop = [].pop,
+        push = [].push,
+        slice = [].slice,
+        // Use a stripped-down indexOf if a native one is unavailable
+        indexOf = [].indexOf || function( elem ) {
+                var i = 0,
+                        len = this.length;
+                for ( ; i &lt; len; i++ ) {
+                        if ( this[i] === elem ) {
+                                return i;
+                        }
+                }
+                return -1;
+        },
+
+        // Augment a function for special use by Sizzle
+        markFunction = function( fn, value ) {
+                fn[ expando ] = value == null || value;
+                return fn;
+        },
+
+        createCache = function() {
+                var cache = {},
+                        keys = [];
+
+                return markFunction(function( key, value ) {
+                        // Only keep the most recent entries
+                        if ( keys.push( key ) &gt; Expr.cacheLength ) {
+                                delete cache[ keys.shift() ];
+                        }
+
+                        // Retrieve with (key + &quot; &quot;) to avoid collision with native Object.prototype properties (see Issue #157)
+                        return (cache[ key + &quot; &quot; ] = value);
+                }, cache );
+        },
+
+        classCache = createCache(),
+        tokenCache = createCache(),
+        compilerCache = createCache(),
+
+        // Regex
+
+        // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+        whitespace = &quot;[\\x20\\t\\r\\n\\f]&quot;,
+        // http://www.w3.org/TR/css3-syntax/#characters
+        characterEncoding = &quot;(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+&quot;,
+
+        // Loosely modeled on CSS identifier characters
+        // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
+        // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+        identifier = characterEncoding.replace( &quot;w&quot;, &quot;w#&quot; ),
+
+        // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+        operators = &quot;([*^$|!~]?=)&quot;,
+        attributes = &quot;\\[&quot; + whitespace + &quot;*(&quot; + characterEncoding + &quot;)&quot; + whitespace +
+                &quot;*(?:&quot; + operators + whitespace + &quot;*(?:(['\&quot;])((?:\\\\.|[^\\\\])*?)\\3|(&quot; + identifier + &quot;)|)|)&quot; + whitespace + &quot;*\\]&quot;,
+
+        // Prefer arguments not in parens/brackets,
+        //   then attribute selectors and non-pseudos (denoted by :),
+        //   then anything else
+        // These preferences are here to reduce the number of selectors
+        //   needing tokenize in the PSEUDO preFilter
+        pseudos = &quot;:(&quot; + characterEncoding + &quot;)(?:\\((?:(['\&quot;])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:&quot; + attributes + &quot;)|[^:]|\\\\.)*|.*))\\)|)&quot;,
+
+        // For matchExpr.POS and matchExpr.needsContext
+        pos = &quot;:(even|odd|eq|gt|lt|nth|first|last)(?:\\(&quot; + whitespace +
+                &quot;*((?:-\\d)?\\d*)&quot; + whitespace + &quot;*\\)|)(?=[^-]|$)&quot;,
+
+        // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+        rtrim = new RegExp( &quot;^&quot; + whitespace + &quot;+|((?:^|[^\\\\])(?:\\\\.)*)&quot; + whitespace + &quot;+$&quot;, &quot;g&quot; ),
+
+        rcomma = new RegExp( &quot;^&quot; + whitespace + &quot;*,&quot; + whitespace + &quot;*&quot; ),
+        rcombinators = new RegExp( &quot;^&quot; + whitespace + &quot;*([\\x20\\t\\r\\n\\f&gt;+~])&quot; + whitespace + &quot;*&quot; ),
+        rpseudo = new RegExp( pseudos ),
+
+        // Easily-parseable/retrievable ID or TAG or CLASS selectors
+        rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
+
+        rnot = /^:not/,
+        rsibling = /[\x20\t\r\n\f]*[+~]/,
+        rendsWithNot = /:not\($/,
+
+        rheader = /h\d/i,
+        rinputs = /input|select|textarea|button/i,
+
+        rbackslash = /\\(?!\\)/g,
+
+        matchExpr = {
+                &quot;ID&quot;: new RegExp( &quot;^#(&quot; + characterEncoding + &quot;)&quot; ),
+                &quot;CLASS&quot;: new RegExp( &quot;^\\.(&quot; + characterEncoding + &quot;)&quot; ),
+                &quot;NAME&quot;: new RegExp( &quot;^\\[name=['\&quot;]?(&quot; + characterEncoding + &quot;)['\&quot;]?\\]&quot; ),
+                &quot;TAG&quot;: new RegExp( &quot;^(&quot; + characterEncoding.replace( &quot;w&quot;, &quot;w*&quot; ) + &quot;)&quot; ),
+                &quot;ATTR&quot;: new RegExp( &quot;^&quot; + attributes ),
+                &quot;PSEUDO&quot;: new RegExp( &quot;^&quot; + pseudos ),
+                &quot;POS&quot;: new RegExp( pos, &quot;i&quot; ),
+                &quot;CHILD&quot;: new RegExp( &quot;^:(only|nth|first|last)-child(?:\\(&quot; + whitespace +
+                        &quot;*(even|odd|(([+-]|)(\\d*)n|)&quot; + whitespace + &quot;*(?:([+-]|)&quot; + whitespace +
+                        &quot;*(\\d+)|))&quot; + whitespace + &quot;*\\)|)&quot;, &quot;i&quot; ),
+                // For use in libraries implementing .is()
+                &quot;needsContext&quot;: new RegExp( &quot;^&quot; + whitespace + &quot;*[&gt;+~]|&quot; + pos, &quot;i&quot; )
+        },
+
+        // Support
+
+        // Used for testing something on an element
+        assert = function( fn ) {
+                var div = document.createElement(&quot;div&quot;);
+
+                try {
+                        return fn( div );
+                } catch (e) {
+                        return false;
+                } finally {
+                        // release memory in IE
+                        div = null;
+                }
+        },
+
+        // Check if getElementsByTagName(&quot;*&quot;) returns only elements
+        assertTagNameNoComments = assert(function( div ) {
+                div.appendChild( document.createComment(&quot;&quot;) );
+                return !div.getElementsByTagName(&quot;*&quot;).length;
+        }),
+
+        // Check if getAttribute returns normalized href attributes
+        assertHrefNotNormalized = assert(function( div ) {
+                div.innerHTML = &quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;
+                return div.firstChild &amp;&amp; typeof div.firstChild.getAttribute !== strundefined &amp;&amp;
+                        div.firstChild.getAttribute(&quot;href&quot;) === &quot;#&quot;;
+        }),
+
+        // Check if attributes should be retrieved by attribute nodes
+        assertAttributes = assert(function( div ) {
+                div.innerHTML = &quot;&lt;select&gt;&lt;/select&gt;&quot;;
+                var type = typeof div.lastChild.getAttribute(&quot;multiple&quot;);
+                // IE8 returns a string for some attributes even when not present
+                return type !== &quot;boolean&quot; &amp;&amp; type !== &quot;string&quot;;
+        }),
+
+        // Check if getElementsByClassName can be trusted
+        assertUsableClassName = assert(function( div ) {
+                // Opera can't find a second classname (in 9.6)
+                div.innerHTML = &quot;&lt;div class='hidden e'&gt;&lt;/div&gt;&lt;div class='hidden'&gt;&lt;/div&gt;&quot;;
+                if ( !div.getElementsByClassName || !div.getElementsByClassName(&quot;e&quot;).length ) {
+                        return false;
+                }
+
+                // Safari 3.2 caches class attributes and doesn't catch changes
+                div.lastChild.className = &quot;e&quot;;
+                return div.getElementsByClassName(&quot;e&quot;).length === 2;
+        }),
+
+        // Check if getElementById returns elements by name
+        // Check if getElementsByName privileges form controls or returns elements by ID
+        assertUsableName = assert(function( div ) {
+                // Inject content
+                div.id = expando + 0;
+                div.innerHTML = &quot;&lt;a name='&quot; + expando + &quot;'&gt;&lt;/a&gt;&lt;div name='&quot; + expando + &quot;'&gt;&lt;/div&gt;&quot;;
+                docElem.insertBefore( div, docElem.firstChild );
+
+                // Test
+                var pass = document.getElementsByName &amp;&amp;
+                        // buggy browsers will return fewer than the correct 2
+                        document.getElementsByName( expando ).length === 2 +
+                        // buggy browsers will return more than the correct 0
+                        document.getElementsByName( expando + 0 ).length;
+                assertGetIdNotName = !document.getElementById( expando );
+
+                // Cleanup
+                docElem.removeChild( div );
+
+                return pass;
+        });
+
+// If slice is not available, provide a backup
+try {
+        slice.call( docElem.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+        slice = function( i ) {
+                var elem,
+                        results = [];
+                for ( ; (elem = this[i]); i++ ) {
+                        results.push( elem );
+                }
+                return results;
+        };
+}
+
+function Sizzle( selector, context, results, seed ) {
+        results = results || [];
+        context = context || document;
+        var match, elem, xml, m,
+                nodeType = context.nodeType;
+
+        if ( !selector || typeof selector !== &quot;string&quot; ) {
+                return results;
+        }
+
+        if ( nodeType !== 1 &amp;&amp; nodeType !== 9 ) {
+                return [];
+        }
+
+        xml = isXML( context );
+
+        if ( !xml &amp;&amp; !seed ) {
+                if ( (match = rquickExpr.exec( selector )) ) {
+                        // Speed-up: Sizzle(&quot;#ID&quot;)
+                        if ( (m = match[1]) ) {
+                                if ( nodeType === 9 ) {
+                                        elem = context.getElementById( m );
+                                        // Check parentNode to catch when Blackberry 4.6 returns
+                                        // nodes that are no longer in the document #6963
+                                        if ( elem &amp;&amp; elem.parentNode ) {
+                                                // Handle the case where IE, Opera, and Webkit return items
+                                                // by name instead of ID
+                                                if ( elem.id === m ) {
+                                                        results.push( elem );
+                                                        return results;
+                                                }
+                                        } else {
+                                                return results;
+                                        }
+                                } else {
+                                        // Context is not a document
+                                        if ( context.ownerDocument &amp;&amp; (elem = context.ownerDocument.getElementById( m )) &amp;&amp;
+                                                contains( context, elem ) &amp;&amp; elem.id === m ) {
+                                                results.push( elem );
+                                                return results;
+                                        }
+                                }
+
+                        // Speed-up: Sizzle(&quot;TAG&quot;)
+                        } else if ( match[2] ) {
+                                push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+                                return results;
+
+                        // Speed-up: Sizzle(&quot;.CLASS&quot;)
+                        } else if ( (m = match[3]) &amp;&amp; assertUsableClassName &amp;&amp; context.getElementsByClassName ) {
+                                push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+                                return results;
+                        }
+                }
+        }
+
+        // All others
+        return select( selector.replace( rtrim, &quot;$1&quot; ), context, results, seed, xml );
+}
+
+Sizzle.matches = function( expr, elements ) {
+        return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+        return Sizzle( expr, null, null, [ elem ] ).length &gt; 0;
+};
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+        return function( elem ) {
+                var name = elem.nodeName.toLowerCase();
+                return name === &quot;input&quot; &amp;&amp; elem.type === type;
+        };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+        return function( elem ) {
+                var name = elem.nodeName.toLowerCase();
+                return (name === &quot;input&quot; || name === &quot;button&quot;) &amp;&amp; elem.type === type;
+        };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+        return markFunction(function( argument ) {
+                argument = +argument;
+                return markFunction(function( seed, matches ) {
+                        var j,
+                                matchIndexes = fn( [], seed.length, argument ),
+                                i = matchIndexes.length;
+
+                        // Match elements found at the specified indexes
+                        while ( i-- ) {
+                                if ( seed[ (j = matchIndexes[i]) ] ) {
+                                        seed[j] = !(matches[j] = seed[j]);
+                                }
+                        }
+                });
+        });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+        var node,
+                ret = &quot;&quot;,
+                i = 0,
+                nodeType = elem.nodeType;
+
+        if ( nodeType ) {
+                if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+                        // Use textContent for elements
+                        // innerText usage removed for consistency of new lines (see #11153)
+                        if ( typeof elem.textContent === &quot;string&quot; ) {
+                                return elem.textContent;
+                        } else {
+                                // Traverse its children
+                                for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+                                        ret += getText( elem );
+                                }
+                        }
+                } else if ( nodeType === 3 || nodeType === 4 ) {
+                        return elem.nodeValue;
+                }
+                // Do not include comment or processing instruction nodes
+        } else {
+
+                // If no nodeType, this is expected to be an array
+                for ( ; (node = elem[i]); i++ ) {
+                        // Do not traverse comment nodes
+                        ret += getText( node );
+                }
+        }
+        return ret;
+};
+
+isXML = Sizzle.isXML = function( elem ) {
+        // documentElement is verified for cases where it doesn't yet exist
+        // (such as loading iframes in IE - #4833)
+        var documentElement = elem &amp;&amp; (elem.ownerDocument || elem).documentElement;
+        return documentElement ? documentElement.nodeName !== &quot;HTML&quot; : false;
+};
+
+// Element contains another
+contains = Sizzle.contains = docElem.contains ?
+        function( a, b ) {
+                var adown = a.nodeType === 9 ? a.documentElement : a,
+                        bup = b &amp;&amp; b.parentNode;
+                return a === bup || !!( bup &amp;&amp; bup.nodeType === 1 &amp;&amp; adown.contains &amp;&amp; adown.contains(bup) );
+        } :
+        docElem.compareDocumentPosition ?
+        function( a, b ) {
+                return b &amp;&amp; !!( a.compareDocumentPosition( b ) &amp; 16 );
+        } :
+        function( a, b ) {
+                while ( (b = b.parentNode) ) {
+                        if ( b === a ) {
+                                return true;
+                        }
+                }
+                return false;
+        };
+
+Sizzle.attr = function( elem, name ) {
+        var val,
+                xml = isXML( elem );
+
+        if ( !xml ) {
+                name = name.toLowerCase();
+        }
+        if ( (val = Expr.attrHandle[ name ]) ) {
+                return val( elem );
+        }
+        if ( xml || assertAttributes ) {
+                return elem.getAttribute( name );
+        }
+        val = elem.getAttributeNode( name );
+        return val ?
+                typeof elem[ name ] === &quot;boolean&quot; ?
+                        elem[ name ] ? name : null :
+                        val.specified ? val.value : null :
+                null;
+};
+
+Expr = Sizzle.selectors = {
+
+        // Can be adjusted by the user
+        cacheLength: 50,
+
+        createPseudo: markFunction,
+
+        match: matchExpr,
+
+        // IE6/7 return a modified href
+        attrHandle: assertHrefNotNormalized ?
+                {} :
+                {
+                        &quot;href&quot;: function( elem ) {
+                                return elem.getAttribute( &quot;href&quot;, 2 );
+                        },
+                        &quot;type&quot;: function( elem ) {
+                                return elem.getAttribute(&quot;type&quot;);
+                        }
+                },
+
+        find: {
+                &quot;ID&quot;: assertGetIdNotName ?
+                        function( id, context, xml ) {
+                                if ( typeof context.getElementById !== strundefined &amp;&amp; !xml ) {
+                                        var m = context.getElementById( id );
+                                        // Check parentNode to catch when Blackberry 4.6 returns
+                                        // nodes that are no longer in the document #6963
+                                        return m &amp;&amp; m.parentNode ? [m] : [];
+                                }
+                        } :
+                        function( id, context, xml ) {
+                                if ( typeof context.getElementById !== strundefined &amp;&amp; !xml ) {
+                                        var m = context.getElementById( id );
+
+                                        return m ?
+                                                m.id === id || typeof m.getAttributeNode !== strundefined &amp;&amp; m.getAttributeNode(&quot;id&quot;).value === id ?
+                                                        [m] :
+                                                        undefined :
+                                                [];
+                                }
+                        },
+
+                &quot;TAG&quot;: assertTagNameNoComments ?
+                        function( tag, context ) {
+                                if ( typeof context.getElementsByTagName !== strundefined ) {
+                                        return context.getElementsByTagName( tag );
+                                }
+                        } :
+                        function( tag, context ) {
+                                var results = context.getElementsByTagName( tag );
+
+                                // Filter out possible comments
+                                if ( tag === &quot;*&quot; ) {
+                                        var elem,
+                                                tmp = [],
+                                                i = 0;
+
+                                        for ( ; (elem = results[i]); i++ ) {
+                                                if ( elem.nodeType === 1 ) {
+                                                        tmp.push( elem );
+                                                }
+                                        }
+
+                                        return tmp;
+                                }
+                                return results;
+                        },
+
+                &quot;NAME&quot;: assertUsableName &amp;&amp; function( tag, context ) {
+                        if ( typeof context.getElementsByName !== strundefined ) {
+                                return context.getElementsByName( name );
+                        }
+                },
+
+                &quot;CLASS&quot;: assertUsableClassName &amp;&amp; function( className, context, xml ) {
+                        if ( typeof context.getElementsByClassName !== strundefined &amp;&amp; !xml ) {
+                                return context.getElementsByClassName( className );
+                        }
+                }
+        },
+
+        relative: {
+                &quot;&gt;&quot;: { dir: &quot;parentNode&quot;, first: true },
+                &quot; &quot;: { dir: &quot;parentNode&quot; },
+                &quot;+&quot;: { dir: &quot;previousSibling&quot;, first: true },
+                &quot;~&quot;: { dir: &quot;previousSibling&quot; }
+        },
+
+        preFilter: {
+                &quot;ATTR&quot;: function( match ) {
+                        match[1] = match[1].replace( rbackslash, &quot;&quot; );
+
+                        // Move the given value to match[3] whether quoted or unquoted
+                        match[3] = ( match[4] || match[5] || &quot;&quot; ).replace( rbackslash, &quot;&quot; );
+
+                        if ( match[2] === &quot;~=&quot; ) {
+                                match[3] = &quot; &quot; + match[3] + &quot; &quot;;
+                        }
+
+                        return match.slice( 0, 4 );
+                },
+
+                &quot;CHILD&quot;: function( match ) {
+                        /* matches from matchExpr[&quot;CHILD&quot;]
+                                1 type (only|nth|...)
+                                2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+                                3 xn-component of xn+y argument ([+-]?\d*n|)
+                                4 sign of xn-component
+                                5 x of xn-component
+                                6 sign of y-component
+                                7 y of y-component
+                        */
+                        match[1] = match[1].toLowerCase();
+
+                        if ( match[1] === &quot;nth&quot; ) {
+                                // nth-child requires argument
+                                if ( !match[2] ) {
+                                        Sizzle.error( match[0] );
+                                }
+
+                                // numeric x and y parameters for Expr.filter.CHILD
+                                // remember that false/true cast respectively to 0/1
+                                match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === &quot;even&quot; || match[2] === &quot;odd&quot; ) );
+                                match[4] = +( ( match[6] + match[7] ) || match[2] === &quot;odd&quot; );
+
+                        // other types prohibit arguments
+                        } else if ( match[2] ) {
+                                Sizzle.error( match[0] );
+                        }
+
+                        return match;
+                },
+
+                &quot;PSEUDO&quot;: function( match ) {
+                        var unquoted, excess;
+                        if ( matchExpr[&quot;CHILD&quot;].test( match[0] ) ) {
+                                return null;
+                        }
+
+                        if ( match[3] ) {
+                                match[2] = match[3];
+                        } else if ( (unquoted = match[4]) ) {
+                                // Only check arguments that contain a pseudo
+                                if ( rpseudo.test(unquoted) &amp;&amp;
+                                        // Get excess from tokenize (recursively)
+                                        (excess = tokenize( unquoted, true )) &amp;&amp;
+                                        // advance to the next closing parenthesis
+                                        (excess = unquoted.indexOf( &quot;)&quot;, unquoted.length - excess ) - unquoted.length) ) {
+
+                                        // excess is a negative index
+                                        unquoted = unquoted.slice( 0, excess );
+                                        match[0] = match[0].slice( 0, excess );
+                                }
+                                match[2] = unquoted;
+                        }
+
+                        // Return only captures needed by the pseudo filter method (type and argument)
+                        return match.slice( 0, 3 );
+                }
+        },
+
+        filter: {
+                &quot;ID&quot;: assertGetIdNotName ?
+                        function( id ) {
+                                id = id.replace( rbackslash, &quot;&quot; );
+                                return function( elem ) {
+                                        return elem.getAttribute(&quot;id&quot;) === id;
+                                };
+                        } :
+                        function( id ) {
+                                id = id.replace( rbackslash, &quot;&quot; );
+                                return function( elem ) {
+                                        var node = typeof elem.getAttributeNode !== strundefined &amp;&amp; elem.getAttributeNode(&quot;id&quot;);
+                                        return node &amp;&amp; node.value === id;
+                                };
+                        },
+
+                &quot;TAG&quot;: function( nodeName ) {
+                        if ( nodeName === &quot;*&quot; ) {
+                                return function() { return true; };
+                        }
+                        nodeName = nodeName.replace( rbackslash, &quot;&quot; ).toLowerCase();
+
+                        return function( elem ) {
+                                return elem.nodeName &amp;&amp; elem.nodeName.toLowerCase() === nodeName;
+                        };
+                },
+
+                &quot;CLASS&quot;: function( className ) {
+                        var pattern = classCache[ expando ][ className + &quot; &quot; ];
+
+                        return pattern ||
+                                (pattern = new RegExp( &quot;(^|&quot; + whitespace + &quot;)&quot; + className + &quot;(&quot; + whitespace + &quot;|$)&quot; )) &amp;&amp;
+                                classCache( className, function( elem ) {
+                                        return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined &amp;&amp; elem.getAttribute(&quot;class&quot;)) || &quot;&quot; );
+                                });
+                },
+
+                &quot;ATTR&quot;: function( name, operator, check ) {
+                        return function( elem, context ) {
+                                var result = Sizzle.attr( elem, name );
+
+                                if ( result == null ) {
+                                        return operator === &quot;!=&quot;;
+                                }
+                                if ( !operator ) {
+                                        return true;
+                                }
+
+                                result += &quot;&quot;;
+
+                                return operator === &quot;=&quot; ? result === check :
+                                        operator === &quot;!=&quot; ? result !== check :
+                                        operator === &quot;^=&quot; ? check &amp;&amp; result.indexOf( check ) === 0 :
+                                        operator === &quot;*=&quot; ? check &amp;&amp; result.indexOf( check ) &gt; -1 :
+                                        operator === &quot;$=&quot; ? check &amp;&amp; result.substr( result.length - check.length ) === check :
+                                        operator === &quot;~=&quot; ? ( &quot; &quot; + result + &quot; &quot; ).indexOf( check ) &gt; -1 :
+                                        operator === &quot;|=&quot; ? result === check || result.substr( 0, check.length + 1 ) === check + &quot;-&quot; :
+                                        false;
+                        };
+                },
+
+                &quot;CHILD&quot;: function( type, argument, first, last ) {
+
+                        if ( type === &quot;nth&quot; ) {
+                                return function( elem ) {
+                                        var node, diff,
+                                                parent = elem.parentNode;
+
+                                        if ( first === 1 &amp;&amp; last === 0 ) {
+                                                return true;
+                                        }
+
+                                        if ( parent ) {
+                                                diff = 0;
+                                                for ( node = parent.firstChild; node; node = node.nextSibling ) {
+                                                        if ( node.nodeType === 1 ) {
+                                                                diff++;
+                                                                if ( elem === node ) {
+                                                                        break;
+                                                                }
+                                                        }
+                                                }
+                                        }
+
+                                        // Incorporate the offset (or cast to NaN), then check against cycle size
+                                        diff -= last;
+                                        return diff === first || ( diff % first === 0 &amp;&amp; diff / first &gt;= 0 );
+                                };
+                        }
+
+                        return function( elem ) {
+                                var node = elem;
+
+                                switch ( type ) {
+                                        case &quot;only&quot;:
+                                        case &quot;first&quot;:
+                                                while ( (node = node.previousSibling) ) {
+                                                        if ( node.nodeType === 1 ) {
+                                                                return false;
+                                                        }
+                                                }
+
+                                                if ( type === &quot;first&quot; ) {
+                                                        return true;
+                                                }
+
+                                                node = elem;
+
+                                                /* falls through */
+                                        case &quot;last&quot;:
+                                                while ( (node = node.nextSibling) ) {
+                                                        if ( node.nodeType === 1 ) {
+                                                                return false;
+                                                        }
+                                                }
+
+                                                return true;
+                                }
+                        };
+                },
+
+                &quot;PSEUDO&quot;: function( pseudo, argument ) {
+                        // pseudo-class names are case-insensitive
+                        // http://www.w3.org/TR/selectors/#pseudo-classes
+                        // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+                        // Remember that setFilters inherits from pseudos
+                        var args,
+                                fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+                                        Sizzle.error( &quot;unsupported pseudo: &quot; + pseudo );
+
+                        // The user may use createPseudo to indicate that
+                        // arguments are needed to create the filter function
+                        // just as Sizzle does
+                        if ( fn[ expando ] ) {
+                                return fn( argument );
+                        }
+
+                        // But maintain support for old signatures
+                        if ( fn.length &gt; 1 ) {
+                                args = [ pseudo, pseudo, &quot;&quot;, argument ];
+                                return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+                                        markFunction(function( seed, matches ) {
+                                                var idx,
+                                                        matched = fn( seed, argument ),
+                                                        i = matched.length;
+                                                while ( i-- ) {
+                                                        idx = indexOf.call( seed, matched[i] );
+                                                        seed[ idx ] = !( matches[ idx ] = matched[i] );
+                                                }
+                                        }) :
+                                        function( elem ) {
+                                                return fn( elem, 0, args );
+                                        };
+                        }
+
+                        return fn;
+                }
+        },
+
+        pseudos: {
+                &quot;not&quot;: markFunction(function( selector ) {
+                        // Trim the selector passed to compile
+                        // to avoid treating leading and trailing
+                        // spaces as combinators
+                        var input = [],
+                                results = [],
+                                matcher = compile( selector.replace( rtrim, &quot;$1&quot; ) );
+
+                        return matcher[ expando ] ?
+                                markFunction(function( seed, matches, context, xml ) {
+                                        var elem,
+                                                unmatched = matcher( seed, null, xml, [] ),
+                                                i = seed.length;
+
+                                        // Match elements unmatched by `matcher`
+                                        while ( i-- ) {
+                                                if ( (elem = unmatched[i]) ) {
+                                                        seed[i] = !(matches[i] = elem);
+                                                }
+                                        }
+                                }) :
+                                function( elem, context, xml ) {
+                                        input[0] = elem;
+                                        matcher( input, null, xml, results );
+                                        return !results.pop();
+                                };
+                }),
+
+                &quot;has&quot;: markFunction(function( selector ) {
+                        return function( elem ) {
+                                return Sizzle( selector, elem ).length &gt; 0;
+                        };
+                }),
+
+                &quot;contains&quot;: markFunction(function( text ) {
+                        return function( elem ) {
+                                return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) &gt; -1;
+                        };
+                }),
+
+                &quot;enabled&quot;: function( elem ) {
+                        return elem.disabled === false;
+                },
+
+                &quot;disabled&quot;: function( elem ) {
+                        return elem.disabled === true;
+                },
+
+                &quot;checked&quot;: function( elem ) {
+                        // In CSS3, :checked should return both checked and selected elements
+                        // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                        var nodeName = elem.nodeName.toLowerCase();
+                        return (nodeName === &quot;input&quot; &amp;&amp; !!elem.checked) || (nodeName === &quot;option&quot; &amp;&amp; !!elem.selected);
+                },
+
+                &quot;selected&quot;: function( elem ) {
+                        // Accessing this property makes selected-by-default
+                        // options in Safari work properly
+                        if ( elem.parentNode ) {
+                                elem.parentNode.selectedIndex;
+                        }
+
+                        return elem.selected === true;
+                },
+
+                &quot;parent&quot;: function( elem ) {
+                        return !Expr.pseudos[&quot;empty&quot;]( elem );
+                },
+
+                &quot;empty&quot;: function( elem ) {
+                        // http://www.w3.org/TR/selectors/#empty-pseudo
+                        // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+                        //   not comment, processing instructions, or others
+                        // Thanks to Diego Perini for the nodeName shortcut
+                        //   Greater than &quot;@&quot; means alpha characters (specifically not starting with &quot;#&quot; or &quot;?&quot;)
+                        var nodeType;
+                        elem = elem.firstChild;
+                        while ( elem ) {
+                                if ( elem.nodeName &gt; &quot;@&quot; || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
+                                        return false;
+                                }
+                                elem = elem.nextSibling;
+                        }
+                        return true;
+                },
+
+                &quot;header&quot;: function( elem ) {
+                        return rheader.test( elem.nodeName );
+                },
+
+                &quot;text&quot;: function( elem ) {
+                        var type, attr;
+                        // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+                        // use getAttribute instead to test this case
+                        return elem.nodeName.toLowerCase() === &quot;input&quot; &amp;&amp;
+                                (type = elem.type) === &quot;text&quot; &amp;&amp;
+                                ( (attr = elem.getAttribute(&quot;type&quot;)) == null || attr.toLowerCase() === type );
+                },
+
+                // Input types
+                &quot;radio&quot;: createInputPseudo(&quot;radio&quot;),
+                &quot;checkbox&quot;: createInputPseudo(&quot;checkbox&quot;),
+                &quot;file&quot;: createInputPseudo(&quot;file&quot;),
+                &quot;password&quot;: createInputPseudo(&quot;password&quot;),
+                &quot;image&quot;: createInputPseudo(&quot;image&quot;),
+
+                &quot;submit&quot;: createButtonPseudo(&quot;submit&quot;),
+                &quot;reset&quot;: createButtonPseudo(&quot;reset&quot;),
+
+                &quot;button&quot;: function( elem ) {
+                        var name = elem.nodeName.toLowerCase();
+                        return name === &quot;input&quot; &amp;&amp; elem.type === &quot;button&quot; || name === &quot;button&quot;;
+                },
+
+                &quot;input&quot;: function( elem ) {
+                        return rinputs.test( elem.nodeName );
+                },
+
+                &quot;focus&quot;: function( elem ) {
+                        var doc = elem.ownerDocument;
+                        return elem === doc.activeElement &amp;&amp; (!doc.hasFocus || doc.hasFocus()) &amp;&amp; !!(elem.type || elem.href || ~elem.tabIndex);
+                },
+
+                &quot;active&quot;: function( elem ) {
+                        return elem === elem.ownerDocument.activeElement;
+                },
+
+                // Positional types
+                &quot;first&quot;: createPositionalPseudo(function() {
+                        return [ 0 ];
+                }),
+
+                &quot;last&quot;: createPositionalPseudo(function( matchIndexes, length ) {
+                        return [ length - 1 ];
+                }),
+
+                &quot;eq&quot;: createPositionalPseudo(function( matchIndexes, length, argument ) {
+                        return [ argument &lt; 0 ? argument + length : argument ];
+                }),
+
+                &quot;even&quot;: createPositionalPseudo(function( matchIndexes, length ) {
+                        for ( var i = 0; i &lt; length; i += 2 ) {
+                                matchIndexes.push( i );
+                        }
+                        return matchIndexes;
+                }),
+
+                &quot;odd&quot;: createPositionalPseudo(function( matchIndexes, length ) {
+                        for ( var i = 1; i &lt; length; i += 2 ) {
+                                matchIndexes.push( i );
+                        }
+                        return matchIndexes;
+                }),
+
+                &quot;lt&quot;: createPositionalPseudo(function( matchIndexes, length, argument ) {
+                        for ( var i = argument &lt; 0 ? argument + length : argument; --i &gt;= 0; ) {
+                                matchIndexes.push( i );
+                        }
+                        return matchIndexes;
+                }),
+
+                &quot;gt&quot;: createPositionalPseudo(function( matchIndexes, length, argument ) {
+                        for ( var i = argument &lt; 0 ? argument + length : argument; ++i &lt; length; ) {
+                                matchIndexes.push( i );
+                        }
+                        return matchIndexes;
+                })
+        }
+};
+
+function siblingCheck( a, b, ret ) {
+        if ( a === b ) {
+                return ret;
+        }
+
+        var cur = a.nextSibling;
+
+        while ( cur ) {
+                if ( cur === b ) {
+                        return -1;
+                }
+
+                cur = cur.nextSibling;
+        }
+
+        return 1;
+}
+
+sortOrder = docElem.compareDocumentPosition ?
+        function( a, b ) {
+                if ( a === b ) {
+                        hasDuplicate = true;
+                        return 0;
+                }
+
+                return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
+                        a.compareDocumentPosition :
+                        a.compareDocumentPosition(b) &amp; 4
+                ) ? -1 : 1;
+        } :
+        function( a, b ) {
+                // The nodes are identical, we can exit early
+                if ( a === b ) {
+                        hasDuplicate = true;
+                        return 0;
+
+                // Fallback to using sourceIndex (in IE) if it's available on both nodes
+                } else if ( a.sourceIndex &amp;&amp; b.sourceIndex ) {
+                        return a.sourceIndex - b.sourceIndex;
+                }
+
+                var al, bl,
+                        ap = [],
+                        bp = [],
+                        aup = a.parentNode,
+                        bup = b.parentNode,
+                        cur = aup;
+
+                // If the nodes are siblings (or identical) we can do a quick check
+                if ( aup === bup ) {
+                        return siblingCheck( a, b );
+
+                // If no parents were found then the nodes are disconnected
+                } else if ( !aup ) {
+                        return -1;
+
+                } else if ( !bup ) {
+                        return 1;
+                }
+
+                // Otherwise they're somewhere else in the tree so we need
+                // to build up a full list of the parentNodes for comparison
+                while ( cur ) {
+                        ap.unshift( cur );
+                        cur = cur.parentNode;
+                }
+
+                cur = bup;
+
+                while ( cur ) {
+                        bp.unshift( cur );
+                        cur = cur.parentNode;
+                }
+
+                al = ap.length;
+                bl = bp.length;
+
+                // Start walking down the tree looking for a discrepancy
+                for ( var i = 0; i &lt; al &amp;&amp; i &lt; bl; i++ ) {
+                        if ( ap[i] !== bp[i] ) {
+                                return siblingCheck( ap[i], bp[i] );
+                        }
+                }
+
+                // We ended someplace up the tree so do a sibling check
+                return i === al ?
+                        siblingCheck( a, bp[i], -1 ) :
+                        siblingCheck( ap[i], b, 1 );
+        };
+
+// Always assume the presence of duplicates if sort doesn't
+// pass them to our comparison function (as in Google Chrome).
+[0, 0].sort( sortOrder );
+baseHasDuplicate = !hasDuplicate;
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+        var elem,
+                duplicates = [],
+                i = 1,
+                j = 0;
+
+        hasDuplicate = baseHasDuplicate;
+        results.sort( sortOrder );
+
+        if ( hasDuplicate ) {
+                for ( ; (elem = results[i]); i++ ) {
+                        if ( elem === results[ i - 1 ] ) {
+                                j = duplicates.push( i );
+                        }
+                }
+                while ( j-- ) {
+                        results.splice( duplicates[ j ], 1 );
+                }
+        }
+
+        return results;
+};
+
+Sizzle.error = function( msg ) {
+        throw new Error( &quot;Syntax error, unrecognized expression: &quot; + msg );
+};
+
+function tokenize( selector, parseOnly ) {
+        var matched, match, tokens, type,
+                soFar, groups, preFilters,
+                cached = tokenCache[ expando ][ selector + &quot; &quot; ];
+
+        if ( cached ) {
+                return parseOnly ? 0 : cached.slice( 0 );
+        }
+
+        soFar = selector;
+        groups = [];
+        preFilters = Expr.preFilter;
+
+        while ( soFar ) {
+
+                // Comma and first run
+                if ( !matched || (match = rcomma.exec( soFar )) ) {
+                        if ( match ) {
+                                // Don't consume trailing commas as valid
+                                soFar = soFar.slice( match[0].length ) || soFar;
+                        }
+                        groups.push( tokens = [] );
+                }
+
+                matched = false;
+
+                // Combinators
+                if ( (match = rcombinators.exec( soFar )) ) {
+                        tokens.push( matched = new Token( match.shift() ) );
+                        soFar = soFar.slice( matched.length );
+
+                        // Cast descendant combinators to space
+                        matched.type = match[0].replace( rtrim, &quot; &quot; );
+                }
+
+                // Filters
+                for ( type in Expr.filter ) {
+                        if ( (match = matchExpr[ type ].exec( soFar )) &amp;&amp; (!preFilters[ type ] ||
+                                (match = preFilters[ type ]( match ))) ) {
+
+                                tokens.push( matched = new Token( match.shift() ) );
+                                soFar = soFar.slice( matched.length );
+                                matched.type = type;
+                                matched.matches = match;
+                        }
+                }
+
+                if ( !matched ) {
+                        break;
+                }
+        }
+
+        // Return the length of the invalid excess
+        // if we're just parsing
+        // Otherwise, throw an error or return tokens
+        return parseOnly ?
+                soFar.length :
+                soFar ?
+                        Sizzle.error( selector ) :
+                        // Cache the tokens
+                        tokenCache( selector, groups ).slice( 0 );
+}
+
+function addCombinator( matcher, combinator, base ) {
+        var dir = combinator.dir,
+                checkNonElements = base &amp;&amp; combinator.dir === &quot;parentNode&quot;,
+                doneName = done++;
+
+        return combinator.first ?
+                // Check against closest ancestor/preceding element
+                function( elem, context, xml ) {
+                        while ( (elem = elem[ dir ]) ) {
+                                if ( checkNonElements || elem.nodeType === 1  ) {
+                                        return matcher( elem, context, xml );
+                                }
+                        }
+                } :
+
+                // Check against all ancestor/preceding elements
+                function( elem, context, xml ) {
+                        // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+                        if ( !xml ) {
+                                var cache,
+                                        dirkey = dirruns + &quot; &quot; + doneName + &quot; &quot;,
+                                        cachedkey = dirkey + cachedruns;
+                                while ( (elem = elem[ dir ]) ) {
+                                        if ( checkNonElements || elem.nodeType === 1 ) {
+                                                if ( (cache = elem[ expando ]) === cachedkey ) {
+                                                        return elem.sizset;
+                                                } else if ( typeof cache === &quot;string&quot; &amp;&amp; cache.indexOf(dirkey) === 0 ) {
+                                                        if ( elem.sizset ) {
+                                                                return elem;
+                                                        }
+                                                } else {
+                                                        elem[ expando ] = cachedkey;
+                                                        if ( matcher( elem, context, xml ) ) {
+                                                                elem.sizset = true;
+                                                                return elem;
+                                                        }
+                                                        elem.sizset = false;
+                                                }
+                                        }
+                                }
+                        } else {
+                                while ( (elem = elem[ dir ]) ) {
+                                        if ( checkNonElements || elem.nodeType === 1 ) {
+                                                if ( matcher( elem, context, xml ) ) {
+                                                        return elem;
+                                                }
+                                        }
+                                }
+                        }
+                };
+}
+
+function elementMatcher( matchers ) {
+        return matchers.length &gt; 1 ?
+                function( elem, context, xml ) {
+                        var i = matchers.length;
+                        while ( i-- ) {
+                                if ( !matchers[i]( elem, context, xml ) ) {
+                                        return false;
+                                }
+                        }
+                        return true;
+                } :
+                matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+        var elem,
+                newUnmatched = [],
+                i = 0,
+                len = unmatched.length,
+                mapped = map != null;
+
+        for ( ; i &lt; len; i++ ) {
+                if ( (elem = unmatched[i]) ) {
+                        if ( !filter || filter( elem, context, xml ) ) {
+                                newUnmatched.push( elem );
+                                if ( mapped ) {
+                                        map.push( i );
+                                }
+                        }
+                }
+        }
+
+        return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+        if ( postFilter &amp;&amp; !postFilter[ expando ] ) {
+                postFilter = setMatcher( postFilter );
+        }
+        if ( postFinder &amp;&amp; !postFinder[ expando ] ) {
+                postFinder = setMatcher( postFinder, postSelector );
+        }
+        return markFunction(function( seed, results, context, xml ) {
+                var temp, i, elem,
+                        preMap = [],
+                        postMap = [],
+                        preexisting = results.length,
+
+                        // Get initial elements from seed or context
+                        elems = seed || multipleContexts( selector || &quot;*&quot;, context.nodeType ? [ context ] : context, [] ),
+
+                        // Prefilter to get matcher input, preserving a map for seed-results synchronization
+                        matcherIn = preFilter &amp;&amp; ( seed || !selector ) ?
+                                condense( elems, preMap, preFilter, context, xml ) :
+                                elems,
+
+                        matcherOut = matcher ?
+                                // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+                                postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+                                        // ...intermediate processing is necessary
+                                        [] :
+
+                                        // ...otherwise use results directly
+                                        results :
+                                matcherIn;
+
+                // Find primary matches
+                if ( matcher ) {
+                        matcher( matcherIn, matcherOut, context, xml );
+                }
+
+                // Apply postFilter
+                if ( postFilter ) {
+                        temp = condense( matcherOut, postMap );
+                        postFilter( temp, [], context, xml );
+
+                        // Un-match failing elements by moving them back to matcherIn
+                        i = temp.length;
+                        while ( i-- ) {
+                                if ( (elem = temp[i]) ) {
+                                        matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+                                }
+                        }
+                }
+
+                if ( seed ) {
+                        if ( postFinder || preFilter ) {
+                                if ( postFinder ) {
+                                        // Get the final matcherOut by condensing this intermediate into postFinder contexts
+                                        temp = [];
+                                        i = matcherOut.length;
+                                        while ( i-- ) {
+                                                if ( (elem = matcherOut[i]) ) {
+                                                        // Restore matcherIn since elem is not yet a final match
+                                                        temp.push( (matcherIn[i] = elem) );
+                                                }
+                                        }
+                                        postFinder( null, (matcherOut = []), temp, xml );
+                                }
+
+                                // Move matched elements from seed to results to keep them synchronized
+                                i = matcherOut.length;
+                                while ( i-- ) {
+                                        if ( (elem = matcherOut[i]) &amp;&amp;
+                                                (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) &gt; -1 ) {
+
+                                                seed[temp] = !(results[temp] = elem);
+                                        }
+                                }
+                        }
+
+                // Add elements to results, through postFinder if defined
+                } else {
+                        matcherOut = condense(
+                                matcherOut === results ?
+                                        matcherOut.splice( preexisting, matcherOut.length ) :
+                                        matcherOut
+                        );
+                        if ( postFinder ) {
+                                postFinder( null, results, matcherOut, xml );
+                        } else {
+                                push.apply( results, matcherOut );
+                        }
+                }
+        });
+}
+
+function matcherFromTokens( tokens ) {
+        var checkContext, matcher, j,
+                len = tokens.length,
+                leadingRelative = Expr.relative[ tokens[0].type ],
+                implicitRelative = leadingRelative || Expr.relative[&quot; &quot;],
+                i = leadingRelative ? 1 : 0,
+
+                // The foundational matcher ensures that elements are reachable from top-level context(s)
+                matchContext = addCombinator( function( elem ) {
+                        return elem === checkContext;
+                }, implicitRelative, true ),
+                matchAnyContext = addCombinator( function( elem ) {
+                        return indexOf.call( checkContext, elem ) &gt; -1;
+                }, implicitRelative, true ),
+                matchers = [ function( elem, context, xml ) {
+                        return ( !leadingRelative &amp;&amp; ( xml || context !== outermostContext ) ) || (
+                                (checkContext = context).nodeType ?
+                                        matchContext( elem, context, xml ) :
+                                        matchAnyContext( elem, context, xml ) );
+                } ];
+
+        for ( ; i &lt; len; i++ ) {
+                if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+                        matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
+                } else {
+                        matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+                        // Return special upon seeing a positional matcher
+                        if ( matcher[ expando ] ) {
+                                // Find the next relative operator (if any) for proper handling
+                                j = ++i;
+                                for ( ; j &lt; len; j++ ) {
+                                        if ( Expr.relative[ tokens[j].type ] ) {
+                                                break;
+                                        }
+                                }
+                                return setMatcher(
+                                        i &gt; 1 &amp;&amp; elementMatcher( matchers ),
+                                        i &gt; 1 &amp;&amp; tokens.slice( 0, i - 1 ).join(&quot;&quot;).replace( rtrim, &quot;$1&quot; ),
+                                        matcher,
+                                        i &lt; j &amp;&amp; matcherFromTokens( tokens.slice( i, j ) ),
+                                        j &lt; len &amp;&amp; matcherFromTokens( (tokens = tokens.slice( j )) ),
+                                        j &lt; len &amp;&amp; tokens.join(&quot;&quot;)
+                                );
+                        }
+                        matchers.push( matcher );
+                }
+        }
+
+        return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+        var bySet = setMatchers.length &gt; 0,
+                byElement = elementMatchers.length &gt; 0,
+                superMatcher = function( seed, context, xml, results, expandContext ) {
+                        var elem, j, matcher,
+                                setMatched = [],
+                                matchedCount = 0,
+                                i = &quot;0&quot;,
+                                unmatched = seed &amp;&amp; [],
+                                outermost = expandContext != null,
+                                contextBackup = outermostContext,
+                                // We must always have either seed elements or context
+                                elems = seed || byElement &amp;&amp; Expr.find[&quot;TAG&quot;]( &quot;*&quot;, expandContext &amp;&amp; context.parentNode || context ),
+                                // Nested matchers should use non-integer dirruns
+                                dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
+
+                        if ( outermost ) {
+                                outermostContext = context !== document &amp;&amp; context;
+                                cachedruns = superMatcher.el;
+                        }
+
+                        // Add elements passing elementMatchers directly to results
+                        for ( ; (elem = elems[i]) != null; i++ ) {
+                                if ( byElement &amp;&amp; elem ) {
+                                        for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
+                                                if ( matcher( elem, context, xml ) ) {
+                                                        results.push( elem );
+                                                        break;
+                                                }
+                                        }
+                                        if ( outermost ) {
+                                                dirruns = dirrunsUnique;
+                                                cachedruns = ++superMatcher.el;
+                                        }
+                                }
+
+                                // Track unmatched elements for set filters
+                                if ( bySet ) {
+                                        // They will have gone through all possible matchers
+                                        if ( (elem = !matcher &amp;&amp; elem) ) {
+                                                matchedCount--;
+                                        }
+
+                                        // Lengthen the array for every element, matched or not
+                                        if ( seed ) {
+                                                unmatched.push( elem );
+                                        }
+                                }
+                        }
+
+                        // Apply set filters to unmatched elements
+                        matchedCount += i;
+                        if ( bySet &amp;&amp; i !== matchedCount ) {
+                                for ( j = 0; (matcher = setMatchers[j]); j++ ) {
+                                        matcher( unmatched, setMatched, context, xml );
+                                }
+
+                                if ( seed ) {
+                                        // Reintegrate element matches to eliminate the need for sorting
+                                        if ( matchedCount &gt; 0 ) {
+                                                while ( i-- ) {
+                                                        if ( !(unmatched[i] || setMatched[i]) ) {
+                                                                setMatched[i] = pop.call( results );
+                                                        }
+                                                }
+                                        }
+
+                                        // Discard index placeholder values to get only actual matches
+                                        setMatched = condense( setMatched );
+                                }
+
+                                // Add matches to results
+                                push.apply( results, setMatched );
+
+                                // Seedless set matches succeeding multiple successful matchers stipulate sorting
+                                if ( outermost &amp;&amp; !seed &amp;&amp; setMatched.length &gt; 0 &amp;&amp;
+                                        ( matchedCount + setMatchers.length ) &gt; 1 ) {
+
+                                        Sizzle.uniqueSort( results );
+                                }
+                        }
+
+                        // Override manipulation of globals by nested matchers
+                        if ( outermost ) {
+                                dirruns = dirrunsUnique;
+                                outermostContext = contextBackup;
+                        }
+
+                        return unmatched;
+                };
+
+        superMatcher.el = 0;
+        return bySet ?
+                markFunction( superMatcher ) :
+                superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+        var i,
+                setMatchers = [],
+                elementMatchers = [],
+                cached = compilerCache[ expando ][ selector + &quot; &quot; ];
+
+        if ( !cached ) {
+                // Generate a function of recursive functions that can be used to check each element
+                if ( !group ) {
+                        group = tokenize( selector );
+                }
+                i = group.length;
+                while ( i-- ) {
+                        cached = matcherFromTokens( group[i] );
+                        if ( cached[ expando ] ) {
+                                setMatchers.push( cached );
+                        } else {
+                                elementMatchers.push( cached );
+                        }
+                }
+
+                // Cache the compiled function
+                cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+        }
+        return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+        var i = 0,
+                len = contexts.length;
+        for ( ; i &lt; len; i++ ) {
+                Sizzle( selector, contexts[i], results );
+        }
+        return results;
+}
+
+function select( selector, context, results, seed, xml ) {
+        var i, tokens, token, type, find,
+                match = tokenize( selector ),
+                j = match.length;
+
+        if ( !seed ) {
+                // Try to minimize operations if there is only one group
+                if ( match.length === 1 ) {
+
+                        // Take a shortcut and set the context if the root selector is an ID
+                        tokens = match[0] = match[0].slice( 0 );
+                        if ( tokens.length &gt; 2 &amp;&amp; (token = tokens[0]).type === &quot;ID&quot; &amp;&amp;
+                                        context.nodeType === 9 &amp;&amp; !xml &amp;&amp;
+                                        Expr.relative[ tokens[1].type ] ) {
+
+                                context = Expr.find[&quot;ID&quot;]( token.matches[0].replace( rbackslash, &quot;&quot; ), context, xml )[0];
+                                if ( !context ) {
+                                        return results;
+                                }
+
+                                selector = selector.slice( tokens.shift().length );
+                        }
+
+                        // Fetch a seed set for right-to-left matching
+                        for ( i = matchExpr[&quot;POS&quot;].test( selector ) ? -1 : tokens.length - 1; i &gt;= 0; i-- ) {
+                                token = tokens[i];
+
+                                // Abort if we hit a combinator
+                                if ( Expr.relative[ (type = token.type) ] ) {
+                                        break;
+                                }
+                                if ( (find = Expr.find[ type ]) ) {
+                                        // Search, expanding context for leading sibling combinators
+                                        if ( (seed = find(
+                                                token.matches[0].replace( rbackslash, &quot;&quot; ),
+                                                rsibling.test( tokens[0].type ) &amp;&amp; context.parentNode || context,
+                                                xml
+                                        )) ) {
+
+                                                // If seed is empty or no tokens remain, we can return early
+                                                tokens.splice( i, 1 );
+                                                selector = seed.length &amp;&amp; tokens.join(&quot;&quot;);
+                                                if ( !selector ) {
+                                                        push.apply( results, slice.call( seed, 0 ) );
+                                                        return results;
+                                                }
+
+                                                break;
+                                        }
+                                }
+                        }
+                }
+        }
+
+        // Compile and execute a filtering function
+        // Provide `match` to avoid retokenization if we modified the selector above
+        compile( selector, match )(
+                seed,
+                context,
+                xml,
+                results,
+                rsibling.test( selector )
+        );
+        return results;
+}
+
+if ( document.querySelectorAll ) {
+        (function() {
+                var disconnectedMatch,
+                        oldSelect = select,
+                        rescape = /'|\\/g,
+                        rattributeQuotes = /\=[\x20\t\r\n\f]*([^'&quot;\]]*)[\x20\t\r\n\f]*\]/g,
+
+                        // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
+                        // A support test would require too much code (would include document ready)
+                        rbuggyQSA = [ &quot;:focus&quot; ],
+
+                        // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+                        // A support test would require too much code (would include document ready)
+                        // just skip matchesSelector for :active
+                        rbuggyMatches = [ &quot;:active&quot; ],
+                        matches = docElem.matchesSelector ||
+                                docElem.mozMatchesSelector ||
+                                docElem.webkitMatchesSelector ||
+                                docElem.oMatchesSelector ||
+                                docElem.msMatchesSelector;
+
+                // Build QSA regex
+                // Regex strategy adopted from Diego Perini
+                assert(function( div ) {
+                        // Select is set to empty string on purpose
+                        // This is to test IE's treatment of not explictly
+                        // setting a boolean content attribute,
+                        // since its presence should be enough
+                        // http://bugs.jquery.com/ticket/12359
+                        div.innerHTML = &quot;&lt;select&gt;&lt;option selected=''&gt;&lt;/option&gt;&lt;/select&gt;&quot;;
+
+                        // IE8 - Some boolean attributes are not treated correctly
+                        if ( !div.querySelectorAll(&quot;[selected]&quot;).length ) {
+                                rbuggyQSA.push( &quot;\\[&quot; + whitespace + &quot;*(?:checked|disabled|ismap|multiple|readonly|selected|value)&quot; );
+                        }
+
+                        // Webkit/Opera - :checked should return selected option elements
+                        // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                        // IE8 throws error here (do not put tests after this one)
+                        if ( !div.querySelectorAll(&quot;:checked&quot;).length ) {
+                                rbuggyQSA.push(&quot;:checked&quot;);
+                        }
+                });
+
+                assert(function( div ) {
+
+                        // Opera 10-12/IE9 - ^= $= *= and empty values
+                        // Should not select anything
+                        div.innerHTML = &quot;&lt;p test=''&gt;&lt;/p&gt;&quot;;
+                        if ( div.querySelectorAll(&quot;[test^='']&quot;).length ) {
+                                rbuggyQSA.push( &quot;[*^$]=&quot; + whitespace + &quot;*(?:\&quot;\&quot;|'')&quot; );
+                        }
+
+                        // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+                        // IE8 throws error here (do not put tests after this one)
+                        div.innerHTML = &quot;&lt;input type='hidden'/&gt;&quot;;
+                        if ( !div.querySelectorAll(&quot;:enabled&quot;).length ) {
+                                rbuggyQSA.push(&quot;:enabled&quot;, &quot;:disabled&quot;);
+                        }
+                });
+
+                // rbuggyQSA always contains :focus, so no need for a length check
+                rbuggyQSA = /* rbuggyQSA.length &amp;&amp; */ new RegExp( rbuggyQSA.join(&quot;|&quot;) );
+
+                select = function( selector, context, results, seed, xml ) {
+                        // Only use querySelectorAll when not filtering,
+                        // when this is not xml,
+                        // and when no QSA bugs apply
+                        if ( !seed &amp;&amp; !xml &amp;&amp; !rbuggyQSA.test( selector ) ) {
+                                var groups, i,
+                                        old = true,
+                                        nid = expando,
+                                        newContext = context,
+                                        newSelector = context.nodeType === 9 &amp;&amp; selector;
+
+                                // qSA works strangely on Element-rooted queries
+                                // We can work around this by specifying an extra ID on the root
+                                // and working up from there (Thanks to Andrew Dupont for the technique)
+                                // IE 8 doesn't work on object elements
+                                if ( context.nodeType === 1 &amp;&amp; context.nodeName.toLowerCase() !== &quot;object&quot; ) {
+                                        groups = tokenize( selector );
+
+                                        if ( (old = context.getAttribute(&quot;id&quot;)) ) {
+                                                nid = old.replace( rescape, &quot;\\$&amp;&quot; );
+                                        } else {
+                                                context.setAttribute( &quot;id&quot;, nid );
+                                        }
+                                        nid = &quot;[id='&quot; + nid + &quot;'] &quot;;
+
+                                        i = groups.length;
+                                        while ( i-- ) {
+                                                groups[i] = nid + groups[i].join(&quot;&quot;);
+                                        }
+                                        newContext = rsibling.test( selector ) &amp;&amp; context.parentNode || context;
+                                        newSelector = groups.join(&quot;,&quot;);
+                                }
+
+                                if ( newSelector ) {
+                                        try {
+                                                push.apply( results, slice.call( newContext.querySelectorAll(
+                                                        newSelector
+                                                ), 0 ) );
+                                                return results;
+                                        } catch(qsaError) {
+                                        } finally {
+                                                if ( !old ) {
+                                                        context.removeAttribute(&quot;id&quot;);
+                                                }
+                                        }
+                                }
+                        }
+
+                        return oldSelect( selector, context, results, seed, xml );
+                };
+
+                if ( matches ) {
+                        assert(function( div ) {
+                                // Check to see if it's possible to do matchesSelector
+                                // on a disconnected node (IE 9)
+                                disconnectedMatch = matches.call( div, &quot;div&quot; );
+
+                                // This should fail with an exception
+                                // Gecko does not error, returns false instead
+                                try {
+                                        matches.call( div, &quot;[test!='']:sizzle&quot; );
+                                        rbuggyMatches.push( &quot;!=&quot;, pseudos );
+                                } catch ( e ) {}
+                        });
+
+                        // rbuggyMatches always contains :active and :focus, so no need for a length check
+                        rbuggyMatches = /* rbuggyMatches.length &amp;&amp; */ new RegExp( rbuggyMatches.join(&quot;|&quot;) );
+
+                        Sizzle.matchesSelector = function( elem, expr ) {
+                                // Make sure that attribute selectors are quoted
+                                expr = expr.replace( rattributeQuotes, &quot;='$1']&quot; );
+
+                                // rbuggyMatches always contains :active, so no need for an existence check
+                                if ( !isXML( elem ) &amp;&amp; !rbuggyMatches.test( expr ) &amp;&amp; !rbuggyQSA.test( expr ) ) {
+                                        try {
+                                                var ret = matches.call( elem, expr );
+
+                                                // IE 9's matchesSelector returns false on disconnected nodes
+                                                if ( ret || disconnectedMatch ||
+                                                                // As well, disconnected nodes are said to be in a document
+                                                                // fragment in IE 9
+                                                                elem.document &amp;&amp; elem.document.nodeType !== 11 ) {
+                                                        return ret;
+                                                }
+                                        } catch(e) {}
+                                }
+
+                                return Sizzle( expr, null, null, [ elem ] ).length &gt; 0;
+                        };
+                }
+        })();
+}
+
+// Deprecated
+Expr.pseudos[&quot;nth&quot;] = Expr.pseudos[&quot;eq&quot;];
+
+// Back-compat
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[&quot;:&quot;] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+        rparentsprev = /^(?:parents|prev(?:Until|All))/,
+        isSimple = /^.[^:#\[\.,]*$/,
+        rneedsContext = jQuery.expr.match.needsContext,
+        // methods guaranteed to produce a unique set when starting from a unique set
+        guaranteedUnique = {
+                children: true,
+                contents: true,
+                next: true,
+                prev: true
+        };
+
+jQuery.fn.extend({
+        find: function( selector ) {
+                var i, l, length, n, r, ret,
+                        self = this;
+
+                if ( typeof selector !== &quot;string&quot; ) {
+                        return jQuery( selector ).filter(function() {
+                                for ( i = 0, l = self.length; i &lt; l; i++ ) {
+                                        if ( jQuery.contains( self[ i ], this ) ) {
+                                                return true;
+                                        }
+                                }
+                        });
+                }
+
+                ret = this.pushStack( &quot;&quot;, &quot;find&quot;, selector );
+
+                for ( i = 0, l = this.length; i &lt; l; i++ ) {
+                        length = ret.length;
+                        jQuery.find( selector, this[i], ret );
+
+                        if ( i &gt; 0 ) {
+                                // Make sure that the results are unique
+                                for ( n = length; n &lt; ret.length; n++ ) {
+                                        for ( r = 0; r &lt; length; r++ ) {
+                                                if ( ret[r] === ret[n] ) {
+                                                        ret.splice(n--, 1);
+                                                        break;
+                                                }
+                                        }
+                                }
+                        }
+                }
+
+                return ret;
+        },
+
+        has: function( target ) {
+                var i,
+                        targets = jQuery( target, this ),
+                        len = targets.length;
+
+                return this.filter(function() {
+                        for ( i = 0; i &lt; len; i++ ) {
+                                if ( jQuery.contains( this, targets[i] ) ) {
+                                        return true;
+                                }
+                        }
+                });
+        },
+
+        not: function( selector ) {
+                return this.pushStack( winnow(this, selector, false), &quot;not&quot;, selector);
+        },
+
+        filter: function( selector ) {
+                return this.pushStack( winnow(this, selector, true), &quot;filter&quot;, selector );
+        },
+
+        is: function( selector ) {
+                return !!selector &amp;&amp; (
+                        typeof selector === &quot;string&quot; ?
+                                // If this is a positional/relative selector, check membership in the returned set
+                                // so $(&quot;p:first&quot;).is(&quot;p:last&quot;) won't return true for a doc with two &quot;p&quot;.
+                                rneedsContext.test( selector ) ?
+                                        jQuery( selector, this.context ).index( this[0] ) &gt;= 0 :
+                                        jQuery.filter( selector, this ).length &gt; 0 :
+                                this.filter( selector ).length &gt; 0 );
+        },
+
+        closest: function( selectors, context ) {
+                var cur,
+                        i = 0,
+                        l = this.length,
+                        ret = [],
+                        pos = rneedsContext.test( selectors ) || typeof selectors !== &quot;string&quot; ?
+                                jQuery( selectors, context || this.context ) :
+                                0;
+
+                for ( ; i &lt; l; i++ ) {
+                        cur = this[i];
+
+                        while ( cur &amp;&amp; cur.ownerDocument &amp;&amp; cur !== context &amp;&amp; cur.nodeType !== 11 ) {
+                                if ( pos ? pos.index(cur) &gt; -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+                                        ret.push( cur );
+                                        break;
+                                }
+                                cur = cur.parentNode;
+                        }
+                }
+
+                ret = ret.length &gt; 1 ? jQuery.unique( ret ) : ret;
+
+                return this.pushStack( ret, &quot;closest&quot;, selectors );
+        },
+
+        // Determine the position of an element within
+        // the matched set of elements
+        index: function( elem ) {
+
+                // No argument, return index in parent
+                if ( !elem ) {
+                        return ( this[0] &amp;&amp; this[0].parentNode ) ? this.prevAll().length : -1;
+                }
+
+                // index in selector
+                if ( typeof elem === &quot;string&quot; ) {
+                        return jQuery.inArray( this[0], jQuery( elem ) );
+                }
+
+                // Locate the position of the desired element
+                return jQuery.inArray(
+                        // If it receives a jQuery object, the first element is used
+                        elem.jquery ? elem[0] : elem, this );
+        },
+
+        add: function( selector, context ) {
+                var set = typeof selector === &quot;string&quot; ?
+                                jQuery( selector, context ) :
+                                jQuery.makeArray( selector &amp;&amp; selector.nodeType ? [ selector ] : selector ),
+                        all = jQuery.merge( this.get(), set );
+
+                return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+                        all :
+                        jQuery.unique( all ) );
+        },
+
+        addBack: function( selector ) {
+                return this.add( selector == null ?
+                        this.prevObject : this.prevObject.filter(selector)
+                );
+        }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+        return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+function sibling( cur, dir ) {
+        do {
+                cur = cur[ dir ];
+        } while ( cur &amp;&amp; cur.nodeType !== 1 );
+
+        return cur;
+}
+
+jQuery.each({
+        parent: function( elem ) {
+                var parent = elem.parentNode;
+                return parent &amp;&amp; parent.nodeType !== 11 ? parent : null;
+        },
+        parents: function( elem ) {
+                return jQuery.dir( elem, &quot;parentNode&quot; );
+        },
+        parentsUntil: function( elem, i, until ) {
+                return jQuery.dir( elem, &quot;parentNode&quot;, until );
+        },
+        next: function( elem ) {
+                return sibling( elem, &quot;nextSibling&quot; );
+        },
+        prev: function( elem ) {
+                return sibling( elem, &quot;previousSibling&quot; );
+        },
+        nextAll: function( elem ) {
+                return jQuery.dir( elem, &quot;nextSibling&quot; );
+        },
+        prevAll: function( elem ) {
+                return jQuery.dir( elem, &quot;previousSibling&quot; );
+        },
+        nextUntil: function( elem, i, until ) {
+                return jQuery.dir( elem, &quot;nextSibling&quot;, until );
+        },
+        prevUntil: function( elem, i, until ) {
+                return jQuery.dir( elem, &quot;previousSibling&quot;, until );
+        },
+        siblings: function( elem ) {
+                return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+        },
+        children: function( elem ) {
+                return jQuery.sibling( elem.firstChild );
+        },
+        contents: function( elem ) {
+                return jQuery.nodeName( elem, &quot;iframe&quot; ) ?
+                        elem.contentDocument || elem.contentWindow.document :
+                        jQuery.merge( [], elem.childNodes );
+        }
+}, function( name, fn ) {
+        jQuery.fn[ name ] = function( until, selector ) {
+                var ret = jQuery.map( this, fn, until );
+
+                if ( !runtil.test( name ) ) {
+                        selector = until;
+                }
+
+                if ( selector &amp;&amp; typeof selector === &quot;string&quot; ) {
+                        ret = jQuery.filter( selector, ret );
+                }
+
+                ret = this.length &gt; 1 &amp;&amp; !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+                if ( this.length &gt; 1 &amp;&amp; rparentsprev.test( name ) ) {
+                        ret = ret.reverse();
+                }
+
+                return this.pushStack( ret, name, core_slice.call( arguments ).join(&quot;,&quot;) );
+        };
+});
+
+jQuery.extend({
+        filter: function( expr, elems, not ) {
+                if ( not ) {
+                        expr = &quot;:not(&quot; + expr + &quot;)&quot;;
+                }
+
+                return elems.length === 1 ?
+                        jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+                        jQuery.find.matches(expr, elems);
+        },
+
+        dir: function( elem, dir, until ) {
+                var matched = [],
+                        cur = elem[ dir ];
+
+                while ( cur &amp;&amp; cur.nodeType !== 9 &amp;&amp; (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+                        if ( cur.nodeType === 1 ) {
+                                matched.push( cur );
+                        }
+                        cur = cur[dir];
+                }
+                return matched;
+        },
+
+        sibling: function( n, elem ) {
+                var r = [];
+
+                for ( ; n; n = n.nextSibling ) {
+                        if ( n.nodeType === 1 &amp;&amp; n !== elem ) {
+                                r.push( n );
+                        }
+                }
+
+                return r;
+        }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+        // Can't pass null or undefined to indexOf in Firefox 4
+        // Set to 0 to skip string check
+        qualifier = qualifier || 0;
+
+        if ( jQuery.isFunction( qualifier ) ) {
+                return jQuery.grep(elements, function( elem, i ) {
+                        var retVal = !!qualifier.call( elem, i, elem );
+                        return retVal === keep;
+                });
+
+        } else if ( qualifier.nodeType ) {
+                return jQuery.grep(elements, function( elem, i ) {
+                        return ( elem === qualifier ) === keep;
+                });
+
+        } else if ( typeof qualifier === &quot;string&quot; ) {
+                var filtered = jQuery.grep(elements, function( elem ) {
+                        return elem.nodeType === 1;
+                });
+
+                if ( isSimple.test( qualifier ) ) {
+                        return jQuery.filter(qualifier, filtered, !keep);
+                } else {
+                        qualifier = jQuery.filter( qualifier, filtered );
+                }
+        }
+
+        return jQuery.grep(elements, function( elem, i ) {
+                return ( jQuery.inArray( elem, qualifier ) &gt;= 0 ) === keep;
+        });
+}
+function createSafeFragment( document ) {
+        var list = nodeNames.split( &quot;|&quot; ),
+        safeFrag = document.createDocumentFragment();
+
+        if ( safeFrag.createElement ) {
+                while ( list.length ) {
+                        safeFrag.createElement(
+                                list.pop()
+                        );
+                }
+        }
+        return safeFrag;
+}
+
+var nodeNames = &quot;abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|&quot; +
+                &quot;header|hgroup|mark|meter|nav|output|progress|section|summary|time|video&quot;,
+        rinlinejQuery = / jQuery\d+=&quot;(?:null|\d+)&quot;/g,
+        rleadingWhitespace = /^\s+/,
+        rxhtmlTag = /&lt;(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^&gt;]*)\/&gt;/gi,
+        rtagName = /&lt;([\w:]+)/,
+        rtbody = /&lt;tbody/i,
+        rhtml = /&lt;|&amp;#?\w+;/,
+        rnoInnerhtml = /&lt;(?:script|style|link)/i,
+        rnocache = /&lt;(?:script|object|embed|option|style)/i,
+        rnoshimcache = new RegExp(&quot;&lt;(?:&quot; + nodeNames + &quot;)[\\s/&gt;]&quot;, &quot;i&quot;),
+        rcheckableType = /^(?:checkbox|radio)$/,
+        // checked=&quot;checked&quot; or checked
+        rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+        rscriptType = /\/(java|ecma)script/i,
+        rcleanScript = /^\s*&lt;!(?:\[CDATA\[|\-\-)|[\]\-]{2}&gt;\s*$/g,
+        wrapMap = {
+                option: [ 1, &quot;&lt;select multiple='multiple'&gt;&quot;, &quot;&lt;/select&gt;&quot; ],
+                legend: [ 1, &quot;&lt;fieldset&gt;&quot;, &quot;&lt;/fieldset&gt;&quot; ],
+                thead: [ 1, &quot;&lt;table&gt;&quot;, &quot;&lt;/table&gt;&quot; ],
+                tr: [ 2, &quot;&lt;table&gt;&lt;tbody&gt;&quot;, &quot;&lt;/tbody&gt;&lt;/table&gt;&quot; ],
+                td: [ 3, &quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;, &quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot; ],
+                col: [ 2, &quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;, &quot;&lt;/colgroup&gt;&lt;/table&gt;&quot; ],
+                area: [ 1, &quot;&lt;map&gt;&quot;, &quot;&lt;/map&gt;&quot; ],
+                _default: [ 0, &quot;&quot;, &quot;&quot; ]
+        },
+        safeFragment = createSafeFragment( document ),
+        fragmentDiv = safeFragment.appendChild( document.createElement(&quot;div&quot;) );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+// unless wrapped in a div with non-breaking characters in front of it.
+if ( !jQuery.support.htmlSerialize ) {
+        wrapMap._default = [ 1, &quot;X&lt;div&gt;&quot;, &quot;&lt;/div&gt;&quot; ];
+}
+
+jQuery.fn.extend({
+        text: function( value ) {
+                return jQuery.access( this, function( value ) {
+                        return value === undefined ?
+                                jQuery.text( this ) :
+                                this.empty().append( ( this[0] &amp;&amp; this[0].ownerDocument || document ).createTextNode( value ) );
+                }, null, value, arguments.length );
+        },
+
+        wrapAll: function( html ) {
+                if ( jQuery.isFunction( html ) ) {
+                        return this.each(function(i) {
+                                jQuery(this).wrapAll( html.call(this, i) );
+                        });
+                }
+
+                if ( this[0] ) {
+                        // The elements to wrap the target around
+                        var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+                        if ( this[0].parentNode ) {
+                                wrap.insertBefore( this[0] );
+                        }
+
+                        wrap.map(function() {
+                                var elem = this;
+
+                                while ( elem.firstChild &amp;&amp; elem.firstChild.nodeType === 1 ) {
+                                        elem = elem.firstChild;
+                                }
+
+                                return elem;
+                        }).append( this );
+                }
+
+                return this;
+        },
+
+        wrapInner: function( html ) {
+                if ( jQuery.isFunction( html ) ) {
+                        return this.each(function(i) {
+                                jQuery(this).wrapInner( html.call(this, i) );
+                        });
+                }
+
+                return this.each(function() {
+                        var self = jQuery( this ),
+                                contents = self.contents();
+
+                        if ( contents.length ) {
+                                contents.wrapAll( html );
+
+                        } else {
+                                self.append( html );
+                        }
+                });
+        },
+
+        wrap: function( html ) {
+                var isFunction = jQuery.isFunction( html );
+
+                return this.each(function(i) {
+                        jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+                });
+        },
+
+        unwrap: function() {
+                return this.parent().each(function() {
+                        if ( !jQuery.nodeName( this, &quot;body&quot; ) ) {
+                                jQuery( this ).replaceWith( this.childNodes );
+                        }
+                }).end();
+        },
+
+        append: function() {
+                return this.domManip(arguments, true, function( elem ) {
+                        if ( this.nodeType === 1 || this.nodeType === 11 ) {
+                                this.appendChild( elem );
+                        }
+                });
+        },
+
+        prepend: function() {
+                return this.domManip(arguments, true, function( elem ) {
+                        if ( this.nodeType === 1 || this.nodeType === 11 ) {
+                                this.insertBefore( elem, this.firstChild );
+                        }
+                });
+        },
+
+        before: function() {
+                if ( !isDisconnected( this[0] ) ) {
+                        return this.domManip(arguments, false, function( elem ) {
+                                this.parentNode.insertBefore( elem, this );
+                        });
+                }
+
+                if ( arguments.length ) {
+                        var set = jQuery.clean( arguments );
+                        return this.pushStack( jQuery.merge( set, this ), &quot;before&quot;, this.selector );
+                }
+        },
+
+        after: function() {
+                if ( !isDisconnected( this[0] ) ) {
+                        return this.domManip(arguments, false, function( elem ) {
+                                this.parentNode.insertBefore( elem, this.nextSibling );
+                        });
+                }
+
+                if ( arguments.length ) {
+                        var set = jQuery.clean( arguments );
+                        return this.pushStack( jQuery.merge( this, set ), &quot;after&quot;, this.selector );
+                }
+        },
+
+        // keepData is for internal use only--do not document
+        remove: function( selector, keepData ) {
+                var elem,
+                        i = 0;
+
+                for ( ; (elem = this[i]) != null; i++ ) {
+                        if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+                                if ( !keepData &amp;&amp; elem.nodeType === 1 ) {
+                                        jQuery.cleanData( elem.getElementsByTagName(&quot;*&quot;) );
+                                        jQuery.cleanData( [ elem ] );
+                                }
+
+                                if ( elem.parentNode ) {
+                                        elem.parentNode.removeChild( elem );
+                                }
+                        }
+                }
+
+                return this;
+        },
+
+        empty: function() {
+                var elem,
+                        i = 0;
+
+                for ( ; (elem = this[i]) != null; i++ ) {
+                        // Remove element nodes and prevent memory leaks
+                        if ( elem.nodeType === 1 ) {
+                                jQuery.cleanData( elem.getElementsByTagName(&quot;*&quot;) );
+                        }
+
+                        // Remove any remaining nodes
+                        while ( elem.firstChild ) {
+                                elem.removeChild( elem.firstChild );
+                        }
+                }
+
+                return this;
+        },
+
+        clone: function( dataAndEvents, deepDataAndEvents ) {
+                dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+                deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+                return this.map( function () {
+                        return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+                });
+        },
+
+        html: function( value ) {
+                return jQuery.access( this, function( value ) {
+                        var elem = this[0] || {},
+                                i = 0,
+                                l = this.length;
+
+                        if ( value === undefined ) {
+                                return elem.nodeType === 1 ?
+                                        elem.innerHTML.replace( rinlinejQuery, &quot;&quot; ) :
+                                        undefined;
+                        }
+
+                        // See if we can take a shortcut and just use innerHTML
+                        if ( typeof value === &quot;string&quot; &amp;&amp; !rnoInnerhtml.test( value ) &amp;&amp;
+                                ( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &amp;&amp;
+                                ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &amp;&amp;
+                                !wrapMap[ ( rtagName.exec( value ) || [&quot;&quot;, &quot;&quot;] )[1].toLowerCase() ] ) {
+
+                                value = value.replace( rxhtmlTag, &quot;&lt;$1&gt;&lt;/$2&gt;&quot; );
+
+                                try {
+                                        for (; i &lt; l; i++ ) {
+                                                // Remove element nodes and prevent memory leaks
+                                                elem = this[i] || {};
+                                                if ( elem.nodeType === 1 ) {
+                                                        jQuery.cleanData( elem.getElementsByTagName( &quot;*&quot; ) );
+                                                        elem.innerHTML = value;
+                                                }
+                                        }
+
+                                        elem = 0;
+
+                                // If using innerHTML throws an exception, use the fallback method
+                                } catch(e) {}
+                        }
+
+                        if ( elem ) {
+                                this.empty().append( value );
+                        }
+                }, null, value, arguments.length );
+        },
+
+        replaceWith: function( value ) {
+                if ( !isDisconnected( this[0] ) ) {
+                        // Make sure that the elements are removed from the DOM before they are inserted
+                        // this can help fix replacing a parent with child elements
+                        if ( jQuery.isFunction( value ) ) {
+                                return this.each(function(i) {
+                                        var self = jQuery(this), old = self.html();
+                                        self.replaceWith( value.call( this, i, old ) );
+                                });
+                        }
+
+                        if ( typeof value !== &quot;string&quot; ) {
+                                value = jQuery( value ).detach();
+                        }
+
+                        return this.each(function() {
+                                var next = this.nextSibling,
+                                        parent = this.parentNode;
+
+                                jQuery( this ).remove();
+
+                                if ( next ) {
+                                        jQuery(next).before( value );
+                                } else {
+                                        jQuery(parent).append( value );
+                                }
+                        });
+                }
+
+                return this.length ?
+                        this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), &quot;replaceWith&quot;, value ) :
+                        this;
+        },
+
+        detach: function( selector ) {
+                return this.remove( selector, true );
+        },
+
+        domManip: function( args, table, callback ) {
+
+                // Flatten any nested arrays
+                args = [].concat.apply( [], args );
+
+                var results, first, fragment, iNoClone,
+                        i = 0,
+                        value = args[0],
+                        scripts = [],
+                        l = this.length;
+
+                // We can't cloneNode fragments that contain checked, in WebKit
+                if ( !jQuery.support.checkClone &amp;&amp; l &gt; 1 &amp;&amp; typeof value === &quot;string&quot; &amp;&amp; rchecked.test( value ) ) {
+                        return this.each(function() {
+                                jQuery(this).domManip( args, table, callback );
+                        });
+                }
+
+                if ( jQuery.isFunction(value) ) {
+                        return this.each(function(i) {
+                                var self = jQuery(this);
+                                args[0] = value.call( this, i, table ? self.html() : undefined );
+                                self.domManip( args, table, callback );
+                        });
+                }
+
+                if ( this[0] ) {
+                        results = jQuery.buildFragment( args, this, scripts );
+                        fragment = results.fragment;
+                        first = fragment.firstChild;
+
+                        if ( fragment.childNodes.length === 1 ) {
+                                fragment = first;
+                        }
+
+                        if ( first ) {
+                                table = table &amp;&amp; jQuery.nodeName( first, &quot;tr&quot; );
+
+                                // Use the original fragment for the last item instead of the first because it can end up
+                                // being emptied incorrectly in certain situations (#8070).
+                                // Fragments from the fragment cache must always be cloned and never used in place.
+                                for ( iNoClone = results.cacheable || l - 1; i &lt; l; i++ ) {
+                                        callback.call(
+                                                table &amp;&amp; jQuery.nodeName( this[i], &quot;table&quot; ) ?
+                                                        findOrAppend( this[i], &quot;tbody&quot; ) :
+                                                        this[i],
+                                                i === iNoClone ?
+                                                        fragment :
+                                                        jQuery.clone( fragment, true, true )
+                                        );
+                                }
+                        }
+
+                        // Fix #11809: Avoid leaking memory
+                        fragment = first = null;
+
+                        if ( scripts.length ) {
+                                jQuery.each( scripts, function( i, elem ) {
+                                        if ( elem.src ) {
+                                                if ( jQuery.ajax ) {
+                                                        jQuery.ajax({
+                                                                url: elem.src,
+                                                                type: &quot;GET&quot;,
+                                                                dataType: &quot;script&quot;,
+                                                                async: false,
+                                                                global: false,
+                                                                &quot;throws&quot;: true
+                                                        });
+                                                } else {
+                                                        jQuery.error(&quot;no ajax&quot;);
+                                                }
+                                        } else {
+                                                jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || &quot;&quot; ).replace( rcleanScript, &quot;&quot; ) );
+                                        }
+
+                                        if ( elem.parentNode ) {
+                                                elem.parentNode.removeChild( elem );
+                                        }
+                                });
+                        }
+                }
+
+                return this;
+        }
+});
+
+function findOrAppend( elem, tag ) {
+        return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+function cloneCopyEvent( src, dest ) {
+
+        if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+                return;
+        }
+
+        var type, i, l,
+                oldData = jQuery._data( src ),
+                curData = jQuery._data( dest, oldData ),
+                events = oldData.events;
+
+        if ( events ) {
+                delete curData.handle;
+                curData.events = {};
+
+                for ( type in events ) {
+                        for ( i = 0, l = events[ type ].length; i &lt; l; i++ ) {
+                                jQuery.event.add( dest, type, events[ type ][ i ] );
+                        }
+                }
+        }
+
+        // make the cloned public data object a copy from the original
+        if ( curData.data ) {
+                curData.data = jQuery.extend( {}, curData.data );
+        }
+}
+
+function cloneFixAttributes( src, dest ) {
+        var nodeName;
+
+        // We do not need to do anything for non-Elements
+        if ( dest.nodeType !== 1 ) {
+                return;
+        }
+
+        // clearAttributes removes the attributes, which we don't want,
+        // but also removes the attachEvent events, which we *do* want
+        if ( dest.clearAttributes ) {
+                dest.clearAttributes();
+        }
+
+        // mergeAttributes, in contrast, only merges back on the
+        // original attributes, not the events
+        if ( dest.mergeAttributes ) {
+                dest.mergeAttributes( src );
+        }
+
+        nodeName = dest.nodeName.toLowerCase();
+
+        if ( nodeName === &quot;object&quot; ) {
+                // IE6-10 improperly clones children of object elements using classid.
+                // IE10 throws NoModificationAllowedError if parent is null, #12132.
+                if ( dest.parentNode ) {
+                        dest.outerHTML = src.outerHTML;
+                }
+
+                // This path appears unavoidable for IE9. When cloning an object
+                // element in IE9, the outerHTML strategy above is not sufficient.
+                // If the src has innerHTML and the destination does not,
+                // copy the src.innerHTML into the dest.innerHTML. #10324
+                if ( jQuery.support.html5Clone &amp;&amp; (src.innerHTML &amp;&amp; !jQuery.trim(dest.innerHTML)) ) {
+                        dest.innerHTML = src.innerHTML;
+                }
+
+        } else if ( nodeName === &quot;input&quot; &amp;&amp; rcheckableType.test( src.type ) ) {
+                // IE6-8 fails to persist the checked state of a cloned checkbox
+                // or radio button. Worse, IE6-7 fail to give the cloned element
+                // a checked appearance if the defaultChecked value isn't also set
+
+                dest.defaultChecked = dest.checked = src.checked;
+
+                // IE6-7 get confused and end up setting the value of a cloned
+                // checkbox/radio button to an empty string instead of &quot;on&quot;
+                if ( dest.value !== src.value ) {
+                        dest.value = src.value;
+                }
+
+        // IE6-8 fails to return the selected option to the default selected
+        // state when cloning options
+        } else if ( nodeName === &quot;option&quot; ) {
+                dest.selected = src.defaultSelected;
+
+        // IE6-8 fails to set the defaultValue to the correct value when
+        // cloning other types of input fields
+        } else if ( nodeName === &quot;input&quot; || nodeName === &quot;textarea&quot; ) {
+                dest.defaultValue = src.defaultValue;
+
+        // IE blanks contents when cloning scripts
+        } else if ( nodeName === &quot;script&quot; &amp;&amp; dest.text !== src.text ) {
+                dest.text = src.text;
+        }
+
+        // Event data gets referenced instead of copied if the expando
+        // gets copied too
+        dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, context, scripts ) {
+        var fragment, cacheable, cachehit,
+                first = args[ 0 ];
+
+        // Set context from what may come in as undefined or a jQuery collection or a node
+        // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &amp;
+        // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
+        context = context || document;
+        context = !context.nodeType &amp;&amp; context[0] || context;
+        context = context.ownerDocument || context;
+
+        // Only cache &quot;small&quot; (1/2 KB) HTML strings that are associated with the main document
+        // Cloning options loses the selected state, so don't cache them
+        // IE 6 doesn't like it when you put &lt;object&gt; or &lt;embed&gt; elements in a fragment
+        // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+        // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+        if ( args.length === 1 &amp;&amp; typeof first === &quot;string&quot; &amp;&amp; first.length &lt; 512 &amp;&amp; context === document &amp;&amp;
+                first.charAt(0) === &quot;&lt;&quot; &amp;&amp; !rnocache.test( first ) &amp;&amp;
+                (jQuery.support.checkClone || !rchecked.test( first )) &amp;&amp;
+                (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+                // Mark cacheable and look for a hit
+                cacheable = true;
+                fragment = jQuery.fragments[ first ];
+                cachehit = fragment !== undefined;
+        }
+
+        if ( !fragment ) {
+                fragment = context.createDocumentFragment();
+                jQuery.clean( args, context, fragment, scripts );
+
+                // Update the cache, but only store false
+                // unless this is a second parsing of the same content
+                if ( cacheable ) {
+                        jQuery.fragments[ first ] = cachehit &amp;&amp; fragment;
+                }
+        }
+
+        return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+        appendTo: &quot;append&quot;,
+        prependTo: &quot;prepend&quot;,
+        insertBefore: &quot;before&quot;,
+        insertAfter: &quot;after&quot;,
+        replaceAll: &quot;replaceWith&quot;
+}, function( name, original ) {
+        jQuery.fn[ name ] = function( selector ) {
+                var elems,
+                        i = 0,
+                        ret = [],
+                        insert = jQuery( selector ),
+                        l = insert.length,
+                        parent = this.length === 1 &amp;&amp; this[0].parentNode;
+
+                if ( (parent == null || parent &amp;&amp; parent.nodeType === 11 &amp;&amp; parent.childNodes.length === 1) &amp;&amp; l === 1 ) {
+                        insert[ original ]( this[0] );
+                        return this;
+                } else {
+                        for ( ; i &lt; l; i++ ) {
+                                elems = ( i &gt; 0 ? this.clone(true) : this ).get();
+                                jQuery( insert[i] )[ original ]( elems );
+                                ret = ret.concat( elems );
+                        }
+
+                        return this.pushStack( ret, name, insert.selector );
+                }
+        };
+});
+
+function getAll( elem ) {
+        if ( typeof elem.getElementsByTagName !== &quot;undefined&quot; ) {
+                return elem.getElementsByTagName( &quot;*&quot; );
+
+        } else if ( typeof elem.querySelectorAll !== &quot;undefined&quot; ) {
+                return elem.querySelectorAll( &quot;*&quot; );
+
+        } else {
+                return [];
+        }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+        if ( rcheckableType.test( elem.type ) ) {
+                elem.defaultChecked = elem.checked;
+        }
+}
+
+jQuery.extend({
+        clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+                var srcElements,
+                        destElements,
+                        i,
+                        clone;
+
+                if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( &quot;&lt;&quot; + elem.nodeName + &quot;&gt;&quot; ) ) {
+                        clone = elem.cloneNode( true );
+
+                // IE&lt;=8 does not properly clone detached, unknown element nodes
+                } else {
+                        fragmentDiv.innerHTML = elem.outerHTML;
+                        fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+                }
+
+                if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &amp;&amp;
+                                (elem.nodeType === 1 || elem.nodeType === 11) &amp;&amp; !jQuery.isXMLDoc(elem) ) {
+                        // IE copies events bound via attachEvent when using cloneNode.
+                        // Calling detachEvent on the clone will also remove the events
+                        // from the original. In order to get around this, we use some
+                        // proprietary methods to clear the events. Thanks to MooTools
+                        // guys for this hotness.
+
+                        cloneFixAttributes( elem, clone );
+
+                        // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+                        srcElements = getAll( elem );
+                        destElements = getAll( clone );
+
+                        // Weird iteration because IE will replace the length property
+                        // with an element if you are cloning the body and one of the
+                        // elements on the page has a name or id of &quot;length&quot;
+                        for ( i = 0; srcElements[i]; ++i ) {
+                                // Ensure that the destination node is not null; Fixes #9587
+                                if ( destElements[i] ) {
+                                        cloneFixAttributes( srcElements[i], destElements[i] );
+                                }
+                        }
+                }
+
+                // Copy the events from the original to the clone
+                if ( dataAndEvents ) {
+                        cloneCopyEvent( elem, clone );
+
+                        if ( deepDataAndEvents ) {
+                                srcElements = getAll( elem );
+                                destElements = getAll( clone );
+
+                                for ( i = 0; srcElements[i]; ++i ) {
+                                        cloneCopyEvent( srcElements[i], destElements[i] );
+                                }
+                        }
+                }
+
+                srcElements = destElements = null;
+
+                // Return the cloned set
+                return clone;
+        },
+
+        clean: function( elems, context, fragment, scripts ) {
+                var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
+                        safe = context === document &amp;&amp; safeFragment,
+                        ret = [];
+
+                // Ensure that context is a document
+                if ( !context || typeof context.createDocumentFragment === &quot;undefined&quot; ) {
+                        context = document;
+                }
+
+                // Use the already-created safe fragment if context permits
+                for ( i = 0; (elem = elems[i]) != null; i++ ) {
+                        if ( typeof elem === &quot;number&quot; ) {
+                                elem += &quot;&quot;;
+                        }
+
+                        if ( !elem ) {
+                                continue;
+                        }
+
+                        // Convert html string into DOM nodes
+                        if ( typeof elem === &quot;string&quot; ) {
+                                if ( !rhtml.test( elem ) ) {
+                                        elem = context.createTextNode( elem );
+                                } else {
+                                        // Ensure a safe container in which to render the html
+                                        safe = safe || createSafeFragment( context );
+                                        div = context.createElement(&quot;div&quot;);
+                                        safe.appendChild( div );
+
+                                        // Fix &quot;XHTML&quot;-style tags in all browsers
+                                        elem = elem.replace(rxhtmlTag, &quot;&lt;$1&gt;&lt;/$2&gt;&quot;);
+
+                                        // Go to html and back, then peel off extra wrappers
+                                        tag = ( rtagName.exec( elem ) || [&quot;&quot;, &quot;&quot;] )[1].toLowerCase();
+                                        wrap = wrapMap[ tag ] || wrapMap._default;
+                                        depth = wrap[0];
+                                        div.innerHTML = wrap[1] + elem + wrap[2];
+
+                                        // Move to the right depth
+                                        while ( depth-- ) {
+                                                div = div.lastChild;
+                                        }
+
+                                        // Remove IE's autoinserted &lt;tbody&gt; from table fragments
+                                        if ( !jQuery.support.tbody ) {
+
+                                                // String was a &lt;table&gt;, *may* have spurious &lt;tbody&gt;
+                                                hasBody = rtbody.test(elem);
+                                                        tbody = tag === &quot;table&quot; &amp;&amp; !hasBody ?
+                                                                div.firstChild &amp;&amp; div.firstChild.childNodes :
+
+                                                                // String was a bare &lt;thead&gt; or &lt;tfoot&gt;
+                                                                wrap[1] === &quot;&lt;table&gt;&quot; &amp;&amp; !hasBody ?
+                                                                        div.childNodes :
+                                                                        [];
+
+                                                for ( j = tbody.length - 1; j &gt;= 0 ; --j ) {
+                                                        if ( jQuery.nodeName( tbody[ j ], &quot;tbody&quot; ) &amp;&amp; !tbody[ j ].childNodes.length ) {
+                                                                tbody[ j ].parentNode.removeChild( tbody[ j ] );
+                                                        }
+                                                }
+                                        }
+
+                                        // IE completely kills leading whitespace when innerHTML is used
+                                        if ( !jQuery.support.leadingWhitespace &amp;&amp; rleadingWhitespace.test( elem ) ) {
+                                                div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+                                        }
+
+                                        elem = div.childNodes;
+
+                                        // Take out of fragment container (we need a fresh div each time)
+                                        div.parentNode.removeChild( div );
+                                }
+                        }
+
+                        if ( elem.nodeType ) {
+                                ret.push( elem );
+                        } else {
+                                jQuery.merge( ret, elem );
+                        }
+                }
+
+                // Fix #11356: Clear elements from safeFragment
+                if ( div ) {
+                        elem = div = safe = null;
+                }
+
+                // Reset defaultChecked for any radios and checkboxes
+                // about to be appended to the DOM in IE 6/7 (#8060)
+                if ( !jQuery.support.appendChecked ) {
+                        for ( i = 0; (elem = ret[i]) != null; i++ ) {
+                                if ( jQuery.nodeName( elem, &quot;input&quot; ) ) {
+                                        fixDefaultChecked( elem );
+                                } else if ( typeof elem.getElementsByTagName !== &quot;undefined&quot; ) {
+                                        jQuery.grep( elem.getElementsByTagName(&quot;input&quot;), fixDefaultChecked );
+                                }
+                        }
+                }
+
+                // Append elements to a provided document fragment
+                if ( fragment ) {
+                        // Special handling of each script element
+                        handleScript = function( elem ) {
+                                // Check if we consider it executable
+                                if ( !elem.type || rscriptType.test( elem.type ) ) {
+                                        // Detach the script and store it in the scripts array (if provided) or the fragment
+                                        // Return truthy to indicate that it has been handled
+                                        return scripts ?
+                                                scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+                                                fragment.appendChild( elem );
+                                }
+                        };
+
+                        for ( i = 0; (elem = ret[i]) != null; i++ ) {
+                                // Check if we're done after handling an executable script
+                                if ( !( jQuery.nodeName( elem, &quot;script&quot; ) &amp;&amp; handleScript( elem ) ) ) {
+                                        // Append to fragment and handle embedded scripts
+                                        fragment.appendChild( elem );
+                                        if ( typeof elem.getElementsByTagName !== &quot;undefined&quot; ) {
+                                                // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+                                                jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName(&quot;script&quot;) ), handleScript );
+
+                                                // Splice the scripts into ret after their former ancestor and advance our index beyond them
+                                                ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+                                                i += jsTags.length;
+                                        }
+                                }
+                        }
+                }
+
+                return ret;
+        },
+
+        cleanData: function( elems, /* internal */ acceptData ) {
+                var data, id, elem, type,
+                        i = 0,
+                        internalKey = jQuery.expando,
+                        cache = jQuery.cache,
+                        deleteExpando = jQuery.support.deleteExpando,
+                        special = jQuery.event.special;
+
+                for ( ; (elem = elems[i]) != null; i++ ) {
+
+                        if ( acceptData || jQuery.acceptData( elem ) ) {
+
+                                id = elem[ internalKey ];
+                                data = id &amp;&amp; cache[ id ];
+
+                                if ( data ) {
+                                        if ( data.events ) {
+                                                for ( type in data.events ) {
+                                                        if ( special[ type ] ) {
+                                                                jQuery.event.remove( elem, type );
+
+                                                        // This is a shortcut to avoid jQuery.event.remove's overhead
+                                                        } else {
+                                                                jQuery.removeEvent( elem, type, data.handle );
+                                                        }
+                                                }
+                                        }
+
+                                        // Remove cache only if it was not already removed by jQuery.event.remove
+                                        if ( cache[ id ] ) {
+
+                                                delete cache[ id ];
+
+                                                // IE does not allow us to delete expando properties from nodes,
+                                                // nor does it have a removeAttribute function on Document nodes;
+                                                // we must handle all of these cases
+                                                if ( deleteExpando ) {
+                                                        delete elem[ internalKey ];
+
+                                                } else if ( elem.removeAttribute ) {
+                                                        elem.removeAttribute( internalKey );
+
+                                                } else {
+                                                        elem[ internalKey ] = null;
+                                                }
+
+                                                jQuery.deletedIds.push( id );
+                                        }
+                                }
+                        }
+                }
+        }
+});
+// Limit scope pollution from any deprecated API
+(function() {
+
+var matched, browser;
+
+// Use of jQuery.browser is frowned upon.
+// More details: http://api.jquery.com/jQuery.browser
+// jQuery.uaMatch maintained for back-compat
+jQuery.uaMatch = function( ua ) {
+        ua = ua.toLowerCase();
+
+        var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+                /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+                /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
+                /(msie) ([\w.]+)/.exec( ua ) ||
+                ua.indexOf(&quot;compatible&quot;) &lt; 0 &amp;&amp; /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
+                [];
+
+        return {
+                browser: match[ 1 ] || &quot;&quot;,
+                version: match[ 2 ] || &quot;0&quot;
+        };
+};
+
+matched = jQuery.uaMatch( navigator.userAgent );
+browser = {};
+
+if ( matched.browser ) {
+        browser[ matched.browser ] = true;
+        browser.version = matched.version;
+}
+
+// Chrome is Webkit, but Webkit is also Safari.
+if ( browser.chrome ) {
+        browser.webkit = true;
+} else if ( browser.webkit ) {
+        browser.safari = true;
+}
+
+jQuery.browser = browser;
+
+jQuery.sub = function() {
+        function jQuerySub( selector, context ) {
+                return new jQuerySub.fn.init( selector, context );
+        }
+        jQuery.extend( true, jQuerySub, this );
+        jQuerySub.superclass = this;
+        jQuerySub.fn = jQuerySub.prototype = this();
+        jQuerySub.fn.constructor = jQuerySub;
+        jQuerySub.sub = this.sub;
+        jQuerySub.fn.init = function init( selector, context ) {
+                if ( context &amp;&amp; context instanceof jQuery &amp;&amp; !(context instanceof jQuerySub) ) {
+                        context = jQuerySub( context );
+                }
+
+                return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+        };
+        jQuerySub.fn.init.prototype = jQuerySub.fn;
+        var rootjQuerySub = jQuerySub(document);
+        return jQuerySub;
+};
+
+})();
+var curCSS, iframe, iframeDoc,
+        ralpha = /alpha\([^)]*\)/i,
+        ropacity = /opacity=([^)]*)/,
+        rposition = /^(top|right|bottom|left)$/,
+        // swappable if display is none or starts with table except &quot;table&quot;, &quot;table-cell&quot;, or &quot;table-caption&quot;
+        // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+        rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+        rmargin = /^margin/,
+        rnumsplit = new RegExp( &quot;^(&quot; + core_pnum + &quot;)(.*)$&quot;, &quot;i&quot; ),
+        rnumnonpx = new RegExp( &quot;^(&quot; + core_pnum + &quot;)(?!px)[a-z%]+$&quot;, &quot;i&quot; ),
+        rrelNum = new RegExp( &quot;^([-+])=(&quot; + core_pnum + &quot;)&quot;, &quot;i&quot; ),
+        elemdisplay = { BODY: &quot;block&quot; },
+
+        cssShow = { position: &quot;absolute&quot;, visibility: &quot;hidden&quot;, display: &quot;block&quot; },
+        cssNormalTransform = {
+                letterSpacing: 0,
+                fontWeight: 400
+        },
+
+        cssExpand = [ &quot;Top&quot;, &quot;Right&quot;, &quot;Bottom&quot;, &quot;Left&quot; ],
+        cssPrefixes = [ &quot;Webkit&quot;, &quot;O&quot;, &quot;Moz&quot;, &quot;ms&quot; ],
+
+        eventsToggle = jQuery.fn.toggle;
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+        // shortcut for names that are not vendor prefixed
+        if ( name in style ) {
+                return name;
+        }
+
+        // check for vendor prefixed names
+        var capName = name.charAt(0).toUpperCase() + name.slice(1),
+                origName = name,
+                i = cssPrefixes.length;
+
+        while ( i-- ) {
+                name = cssPrefixes[ i ] + capName;
+                if ( name in style ) {
+                        return name;
+                }
+        }
+
+        return origName;
+}
+
+function isHidden( elem, el ) {
+        elem = el || elem;
+        return jQuery.css( elem, &quot;display&quot; ) === &quot;none&quot; || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+        var elem, display,
+                values = [],
+                index = 0,
+                length = elements.length;
+
+        for ( ; index &lt; length; index++ ) {
+                elem = elements[ index ];
+                if ( !elem.style ) {
+                        continue;
+                }
+                values[ index ] = jQuery._data( elem, &quot;olddisplay&quot; );
+                if ( show ) {
+                        // Reset the inline display of this element to learn if it is
+                        // being hidden by cascaded rules or not
+                        if ( !values[ index ] &amp;&amp; elem.style.display === &quot;none&quot; ) {
+                                elem.style.display = &quot;&quot;;
+                        }
+
+                        // Set elements which have been overridden with display: none
+                        // in a stylesheet to whatever the default browser style is
+                        // for such an element
+                        if ( elem.style.display === &quot;&quot; &amp;&amp; isHidden( elem ) ) {
+                                values[ index ] = jQuery._data( elem, &quot;olddisplay&quot;, css_defaultDisplay(elem.nodeName) );
+                        }
+                } else {
+                        display = curCSS( elem, &quot;display&quot; );
+
+                        if ( !values[ index ] &amp;&amp; display !== &quot;none&quot; ) {
+                                jQuery._data( elem, &quot;olddisplay&quot;, display );
+                        }
+                }
+        }
+
+        // Set the display of most of the elements in a second loop
+        // to avoid the constant reflow
+        for ( index = 0; index &lt; length; index++ ) {
+                elem = elements[ index ];
+                if ( !elem.style ) {
+                        continue;
+                }
+                if ( !show || elem.style.display === &quot;none&quot; || elem.style.display === &quot;&quot; ) {
+                        elem.style.display = show ? values[ index ] || &quot;&quot; : &quot;none&quot;;
+                }
+        }
+
+        return elements;
+}
+
+jQuery.fn.extend({
+        css: function( name, value ) {
+                return jQuery.access( this, function( elem, name, value ) {
+                        return value !== undefined ?
+                                jQuery.style( elem, name, value ) :
+                                jQuery.css( elem, name );
+                }, name, value, arguments.length &gt; 1 );
+        },
+        show: function() {
+                return showHide( this, true );
+        },
+        hide: function() {
+                return showHide( this );
+        },
+        toggle: function( state, fn2 ) {
+                var bool = typeof state === &quot;boolean&quot;;
+
+                if ( jQuery.isFunction( state ) &amp;&amp; jQuery.isFunction( fn2 ) ) {
+                        return eventsToggle.apply( this, arguments );
+                }
+
+                return this.each(function() {
+                        if ( bool ? state : isHidden( this ) ) {
+                                jQuery( this ).show();
+                        } else {
+                                jQuery( this ).hide();
+                        }
+                });
+        }
+});
+
+jQuery.extend({
+        // Add in style property hooks for overriding the default
+        // behavior of getting and setting a style property
+        cssHooks: {
+                opacity: {
+                        get: function( elem, computed ) {
+                                if ( computed ) {
+                                        // We should always get a number back from opacity
+                                        var ret = curCSS( elem, &quot;opacity&quot; );
+                                        return ret === &quot;&quot; ? &quot;1&quot; : ret;
+
+                                }
+                        }
+                }
+        },
+
+        // Exclude the following css properties to add px
+        cssNumber: {
+                &quot;fillOpacity&quot;: true,
+                &quot;fontWeight&quot;: true,
+                &quot;lineHeight&quot;: true,
+                &quot;opacity&quot;: true,
+                &quot;orphans&quot;: true,
+                &quot;widows&quot;: true,
+                &quot;zIndex&quot;: true,
+                &quot;zoom&quot;: true
+        },
+
+        // Add in properties whose names you wish to fix before
+        // setting or getting the value
+        cssProps: {
+                // normalize float css property
+                &quot;float&quot;: jQuery.support.cssFloat ? &quot;cssFloat&quot; : &quot;styleFloat&quot;
+        },
+
+        // Get and set the style property on a DOM Node
+        style: function( elem, name, value, extra ) {
+                // Don't set styles on text and comment nodes
+                if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+                        return;
+                }
+
+                // Make sure that we're working with the right name
+                var ret, type, hooks,
+                        origName = jQuery.camelCase( name ),
+                        style = elem.style;
+
+                name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+                // gets hook for the prefixed version
+                // followed by the unprefixed version
+                hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+                // Check if we're setting a value
+                if ( value !== undefined ) {
+                        type = typeof value;
+
+                        // convert relative number strings (+= or -=) to relative numbers. #7345
+                        if ( type === &quot;string&quot; &amp;&amp; (ret = rrelNum.exec( value )) ) {
+                                value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+                                // Fixes bug #9237
+                                type = &quot;number&quot;;
+                        }
+
+                        // Make sure that NaN and null values aren't set. See: #7116
+                        if ( value == null || type === &quot;number&quot; &amp;&amp; isNaN( value ) ) {
+                                return;
+                        }
+
+                        // If a number was passed in, add 'px' to the (except for certain CSS properties)
+                        if ( type === &quot;number&quot; &amp;&amp; !jQuery.cssNumber[ origName ] ) {
+                                value += &quot;px&quot;;
+                        }
+
+                        // If a hook was provided, use that value, otherwise just set the specified value
+                        if ( !hooks || !(&quot;set&quot; in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+                                // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+                                // Fixes bug #5509
+                                try {
+                                        style[ name ] = value;
+                                } catch(e) {}
+                        }
+
+                } else {
+                        // If a hook was provided get the non-computed value from there
+                        if ( hooks &amp;&amp; &quot;get&quot; in hooks &amp;&amp; (ret = hooks.get( elem, false, extra )) !== undefined ) {
+                                return ret;
+                        }
+
+                        // Otherwise just get the value from the style object
+                        return style[ name ];
+                }
+        },
+
+        css: function( elem, name, numeric, extra ) {
+                var val, num, hooks,
+                        origName = jQuery.camelCase( name );
+
+                // Make sure that we're working with the right name
+                name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+                // gets hook for the prefixed version
+                // followed by the unprefixed version
+                hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+                // If a hook was provided get the computed value from there
+                if ( hooks &amp;&amp; &quot;get&quot; in hooks ) {
+                        val = hooks.get( elem, true, extra );
+                }
+
+                // Otherwise, if a way to get the computed value exists, use that
+                if ( val === undefined ) {
+                        val = curCSS( elem, name );
+                }
+
+                //convert &quot;normal&quot; to computed value
+                if ( val === &quot;normal&quot; &amp;&amp; name in cssNormalTransform ) {
+                        val = cssNormalTransform[ name ];
+                }
+
+                // Return, converting to number if forced or a qualifier was provided and val looks numeric
+                if ( numeric || extra !== undefined ) {
+                        num = parseFloat( val );
+                        return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
+                }
+                return val;
+        },
+
+        // A method for quickly swapping in/out CSS properties to get correct calculations
+        swap: function( elem, options, callback ) {
+                var ret, name,
+                        old = {};
+
+                // Remember the old values, and insert the new ones
+                for ( name in options ) {
+                        old[ name ] = elem.style[ name ];
+                        elem.style[ name ] = options[ name ];
+                }
+
+                ret = callback.call( elem );
+
+                // Revert the old values
+                for ( name in options ) {
+                        elem.style[ name ] = old[ name ];
+                }
+
+                return ret;
+        }
+});
+
+// NOTE: To any future maintainer, we've window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+        curCSS = function( elem, name ) {
+                var ret, width, minWidth, maxWidth,
+                        computed = window.getComputedStyle( elem, null ),
+                        style = elem.style;
+
+                if ( computed ) {
+
+                        // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+                        ret = computed.getPropertyValue( name ) || computed[ name ];
+
+                        if ( ret === &quot;&quot; &amp;&amp; !jQuery.contains( elem.ownerDocument, elem ) ) {
+                                ret = jQuery.style( elem, name );
+                        }
+
+                        // A tribute to the &quot;awesome hack by Dean Edwards&quot;
+                        // Chrome &lt; 17 and Safari 5.0 uses &quot;computed value&quot; instead of &quot;used value&quot; for margin-right
+                        // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+                        // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+                        if ( rnumnonpx.test( ret ) &amp;&amp; rmargin.test( name ) ) {
+                                width = style.width;
+                                minWidth = style.minWidth;
+                                maxWidth = style.maxWidth;
+
+                                style.minWidth = style.maxWidth = style.width = ret;
+                                ret = computed.width;
+
+                                style.width = width;
+                                style.minWidth = minWidth;
+                                style.maxWidth = maxWidth;
+                        }
+                }
+
+                return ret;
+        };
+} else if ( document.documentElement.currentStyle ) {
+        curCSS = function( elem, name ) {
+                var left, rsLeft,
+                        ret = elem.currentStyle &amp;&amp; elem.currentStyle[ name ],
+                        style = elem.style;
+
+                // Avoid setting ret to empty string here
+                // so we don't default to auto
+                if ( ret == null &amp;&amp; style &amp;&amp; style[ name ] ) {
+                        ret = style[ name ];
+                }
+
+                // From the awesome hack by Dean Edwards
+                // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+                // If we're not dealing with a regular pixel number
+                // but a number that has a weird ending, we need to convert it to pixels
+                // but not position css attributes, as those are proportional to the parent element instead
+                // and we can't measure the parent instead because it might trigger a &quot;stacking dolls&quot; problem
+                if ( rnumnonpx.test( ret ) &amp;&amp; !rposition.test( name ) ) {
+
+                        // Remember the original values
+                        left = style.left;
+                        rsLeft = elem.runtimeStyle &amp;&amp; elem.runtimeStyle.left;
+
+                        // Put in the new values to get a computed value out
+                        if ( rsLeft ) {
+                                elem.runtimeStyle.left = elem.currentStyle.left;
+                        }
+                        style.left = name === &quot;fontSize&quot; ? &quot;1em&quot; : ret;
+                        ret = style.pixelLeft + &quot;px&quot;;
+
+                        // Revert the changed values
+                        style.left = left;
+                        if ( rsLeft ) {
+                                elem.runtimeStyle.left = rsLeft;
+                        }
+                }
+
+                return ret === &quot;&quot; ? &quot;auto&quot; : ret;
+        };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+        var matches = rnumsplit.exec( value );
+        return matches ?
+                        Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || &quot;px&quot; ) :
+                        value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
+        var i = extra === ( isBorderBox ? &quot;border&quot; : &quot;content&quot; ) ?
+                // If we already have the right measurement, avoid augmentation
+                4 :
+                // Otherwise initialize for horizontal or vertical properties
+                name === &quot;width&quot; ? 1 : 0,
+
+                val = 0;
+
+        for ( ; i &lt; 4; i += 2 ) {
+                // both box models exclude margin, so add it if we want it
+                if ( extra === &quot;margin&quot; ) {
+                        // we use jQuery.css instead of curCSS here
+                        // because of the reliableMarginRight CSS hook!
+                        val += jQuery.css( elem, extra + cssExpand[ i ], true );
+                }
+
+                // From this point on we use curCSS for maximum performance (relevant in animations)
+                if ( isBorderBox ) {
+                        // border-box includes padding, so remove it if we want content
+                        if ( extra === &quot;content&quot; ) {
+                                val -= parseFloat( curCSS( elem, &quot;padding&quot; + cssExpand[ i ] ) ) || 0;
+                        }
+
+                        // at this point, extra isn't border nor margin, so remove border
+                        if ( extra !== &quot;margin&quot; ) {
+                                val -= parseFloat( curCSS( elem, &quot;border&quot; + cssExpand[ i ] + &quot;Width&quot; ) ) || 0;
+                        }
+                } else {
+                        // at this point, extra isn't content, so add padding
+                        val += parseFloat( curCSS( elem, &quot;padding&quot; + cssExpand[ i ] ) ) || 0;
+
+                        // at this point, extra isn't content nor padding, so add border
+                        if ( extra !== &quot;padding&quot; ) {
+                                val += parseFloat( curCSS( elem, &quot;border&quot; + cssExpand[ i ] + &quot;Width&quot; ) ) || 0;
+                        }
+                }
+        }
+
+        return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+        // Start with offset property, which is equivalent to the border-box value
+        var val = name === &quot;width&quot; ? elem.offsetWidth : elem.offsetHeight,
+                valueIsBorderBox = true,
+                isBorderBox = jQuery.support.boxSizing &amp;&amp; jQuery.css( elem, &quot;boxSizing&quot; ) === &quot;border-box&quot;;
+
+        // some non-html elements return undefined for offsetWidth, so check for null/undefined
+        // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+        // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+        if ( val &lt;= 0 || val == null ) {
+                // Fall back to computed then uncomputed css if necessary
+                val = curCSS( elem, name );
+                if ( val &lt; 0 || val == null ) {
+                        val = elem.style[ name ];
+                }
+
+                // Computed unit is not pixels. Stop here and return.
+                if ( rnumnonpx.test(val) ) {
+                        return val;
+                }
+
+                // we need the check for style in case a browser which returns unreliable values
+                // for getComputedStyle silently falls back to the reliable elem.style
+                valueIsBorderBox = isBorderBox &amp;&amp; ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+                // Normalize &quot;&quot;, auto, and prepare for extra
+                val = parseFloat( val ) || 0;
+        }
+
+        // use the active box-sizing model to add/subtract irrelevant styles
+        return ( val +
+                augmentWidthOrHeight(
+                        elem,
+                        name,
+                        extra || ( isBorderBox ? &quot;border&quot; : &quot;content&quot; ),
+                        valueIsBorderBox
+                )
+        ) + &quot;px&quot;;
+}
+
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+        if ( elemdisplay[ nodeName ] ) {
+                return elemdisplay[ nodeName ];
+        }
+
+        var elem = jQuery( &quot;&lt;&quot; + nodeName + &quot;&gt;&quot; ).appendTo( document.body ),
+                display = elem.css(&quot;display&quot;);
+        elem.remove();
+
+        // If the simple way fails,
+        // get element's real default display by attaching it to a temp iframe
+        if ( display === &quot;none&quot; || display === &quot;&quot; ) {
+                // Use the already-created iframe if possible
+                iframe = document.body.appendChild(
+                        iframe || jQuery.extend( document.createElement(&quot;iframe&quot;), {
+                                frameBorder: 0,
+                                width: 0,
+                                height: 0
+                        })
+                );
+
+                // Create a cacheable copy of the iframe document on first call.
+                // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+                // document to it; WebKit &amp; Firefox won't allow reusing the iframe document.
+                if ( !iframeDoc || !iframe.createElement ) {
+                        iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+                        iframeDoc.write(&quot;&lt;!doctype html&gt;&lt;html&gt;&lt;body&gt;&quot;);
+                        iframeDoc.close();
+                }
+
+                elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
+
+                display = curCSS( elem, &quot;display&quot; );
+                document.body.removeChild( iframe );
+        }
+
+        // Store the correct default display
+        elemdisplay[ nodeName ] = display;
+
+        return display;
+}
+
+jQuery.each([ &quot;height&quot;, &quot;width&quot; ], function( i, name ) {
+        jQuery.cssHooks[ name ] = {
+                get: function( elem, computed, extra ) {
+                        if ( computed ) {
+                                // certain elements can have dimension info if we invisibly show them
+                                // however, it must have a current display style that would benefit from this
+                                if ( elem.offsetWidth === 0 &amp;&amp; rdisplayswap.test( curCSS( elem, &quot;display&quot; ) ) ) {
+                                        return jQuery.swap( elem, cssShow, function() {
+                                                return getWidthOrHeight( elem, name, extra );
+                                        });
+                                } else {
+                                        return getWidthOrHeight( elem, name, extra );
+                                }
+                        }
+                },
+
+                set: function( elem, value, extra ) {
+                        return setPositiveNumber( elem, value, extra ?
+                                augmentWidthOrHeight(
+                                        elem,
+                                        name,
+                                        extra,
+                                        jQuery.support.boxSizing &amp;&amp; jQuery.css( elem, &quot;boxSizing&quot; ) === &quot;border-box&quot;
+                                ) : 0
+                        );
+                }
+        };
+});
+
+if ( !jQuery.support.opacity ) {
+        jQuery.cssHooks.opacity = {
+                get: function( elem, computed ) {
+                        // IE uses filters for opacity
+                        return ropacity.test( (computed &amp;&amp; elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || &quot;&quot; ) ?
+                                ( 0.01 * parseFloat( RegExp.$1 ) ) + &quot;&quot; :
+                                computed ? &quot;1&quot; : &quot;&quot;;
+                },
+
+                set: function( elem, value ) {
+                        var style = elem.style,
+                                currentStyle = elem.currentStyle,
+                                opacity = jQuery.isNumeric( value ) ? &quot;alpha(opacity=&quot; + value * 100 + &quot;)&quot; : &quot;&quot;,
+                                filter = currentStyle &amp;&amp; currentStyle.filter || style.filter || &quot;&quot;;
+
+                        // IE has trouble with opacity if it does not have layout
+                        // Force it by setting the zoom level
+                        style.zoom = 1;
+
+                        // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+                        if ( value &gt;= 1 &amp;&amp; jQuery.trim( filter.replace( ralpha, &quot;&quot; ) ) === &quot;&quot; &amp;&amp;
+                                style.removeAttribute ) {
+
+                                // Setting style.filter to null, &quot;&quot; &amp; &quot; &quot; still leave &quot;filter:&quot; in the cssText
+                                // if &quot;filter:&quot; is present at all, clearType is disabled, we want to avoid this
+                                // style.removeAttribute is IE Only, but so apparently is this code path...
+                                style.removeAttribute( &quot;filter&quot; );
+
+                                // if there there is no filter style applied in a css rule, we are done
+                                if ( currentStyle &amp;&amp; !currentStyle.filter ) {
+                                        return;
+                                }
+                        }
+
+                        // otherwise, set new filter values
+                        style.filter = ralpha.test( filter ) ?
+                                filter.replace( ralpha, opacity ) :
+                                filter + &quot; &quot; + opacity;
+                }
+        };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+        if ( !jQuery.support.reliableMarginRight ) {
+                jQuery.cssHooks.marginRight = {
+                        get: function( elem, computed ) {
+                                // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                                // Work around by temporarily setting element display to inline-block
+                                return jQuery.swap( elem, { &quot;display&quot;: &quot;inline-block&quot; }, function() {
+                                        if ( computed ) {
+                                                return curCSS( elem, &quot;marginRight&quot; );
+                                        }
+                                });
+                        }
+                };
+        }
+
+        // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+        // getComputedStyle returns percent when specified for top/left/bottom/right
+        // rather than make the css module depend on the offset module, we just check for it here
+        if ( !jQuery.support.pixelPosition &amp;&amp; jQuery.fn.position ) {
+                jQuery.each( [ &quot;top&quot;, &quot;left&quot; ], function( i, prop ) {
+                        jQuery.cssHooks[ prop ] = {
+                                get: function( elem, computed ) {
+                                        if ( computed ) {
+                                                var ret = curCSS( elem, prop );
+                                                // if curCSS returns percentage, fallback to offset
+                                                return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + &quot;px&quot; : ret;
+                                        }
+                                }
+                        };
+                });
+        }
+
+});
+
+if ( jQuery.expr &amp;&amp; jQuery.expr.filters ) {
+        jQuery.expr.filters.hidden = function( elem ) {
+                return ( elem.offsetWidth === 0 &amp;&amp; elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets &amp;&amp; ((elem.style &amp;&amp; elem.style.display) || curCSS( elem, &quot;display&quot; )) === &quot;none&quot;);
+        };
+
+        jQuery.expr.filters.visible = function( elem ) {
+                return !jQuery.expr.filters.hidden( elem );
+        };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+        margin: &quot;&quot;,
+        padding: &quot;&quot;,
+        border: &quot;Width&quot;
+}, function( prefix, suffix ) {
+        jQuery.cssHooks[ prefix + suffix ] = {
+                expand: function( value ) {
+                        var i,
+
+                                // assumes a single number if not a string
+                                parts = typeof value === &quot;string&quot; ? value.split(&quot; &quot;) : [ value ],
+                                expanded = {};
+
+                        for ( i = 0; i &lt; 4; i++ ) {
+                                expanded[ prefix + cssExpand[ i ] + suffix ] =
+                                        parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+                        }
+
+                        return expanded;
+                }
+        };
+
+        if ( !rmargin.test( prefix ) ) {
+                jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+        }
+});
+var r20 = /%20/g,
+        rbracket = /\[\]$/,
+        rCRLF = /\r?\n/g,
+        rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+        rselectTextarea = /^(?:select|textarea)/i;
+
+jQuery.fn.extend({
+        serialize: function() {
+                return jQuery.param( this.serializeArray() );
+        },
+        serializeArray: function() {
+                return this.map(function(){
+                        return this.elements ? jQuery.makeArray( this.elements ) : this;
+                })
+                .filter(function(){
+                        return this.name &amp;&amp; !this.disabled &amp;&amp;
+                                ( this.checked || rselectTextarea.test( this.nodeName ) ||
+                                        rinput.test( this.type ) );
+                })
+                .map(function( i, elem ){
+                        var val = jQuery( this ).val();
+
+                        return val == null ?
+                                null :
+                                jQuery.isArray( val ) ?
+                                        jQuery.map( val, function( val, i ){
+                                                return { name: elem.name, value: val.replace( rCRLF, &quot;\r\n&quot; ) };
+                                        }) :
+                                        { name: elem.name, value: val.replace( rCRLF, &quot;\r\n&quot; ) };
+                }).get();
+        }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+        var prefix,
+                s = [],
+                add = function( key, value ) {
+                        // If value is a function, invoke it and return its value
+                        value = jQuery.isFunction( value ) ? value() : ( value == null ? &quot;&quot; : value );
+                        s[ s.length ] = encodeURIComponent( key ) + &quot;=&quot; + encodeURIComponent( value );
+                };
+
+        // Set traditional to true for jQuery &lt;= 1.3.2 behavior.
+        if ( traditional === undefined ) {
+                traditional = jQuery.ajaxSettings &amp;&amp; jQuery.ajaxSettings.traditional;
+        }
+
+        // If an array was passed in, assume that it is an array of form elements.
+        if ( jQuery.isArray( a ) || ( a.jquery &amp;&amp; !jQuery.isPlainObject( a ) ) ) {
+                // Serialize the form elements
+                jQuery.each( a, function() {
+                        add( this.name, this.value );
+                });
+
+        } else {
+                // If traditional, encode the &quot;old&quot; way (the way 1.3.2 or older
+                // did it), otherwise encode params recursively.
+                for ( prefix in a ) {
+                        buildParams( prefix, a[ prefix ], traditional, add );
+                }
+        }
+
+        // Return the resulting serialization
+        return s.join( &quot;&amp;&quot; ).replace( r20, &quot;+&quot; );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+        var name;
+
+        if ( jQuery.isArray( obj ) ) {
+                // Serialize array item.
+                jQuery.each( obj, function( i, v ) {
+                        if ( traditional || rbracket.test( prefix ) ) {
+                                // Treat each array item as a scalar.
+                                add( prefix, v );
+
+                        } else {
+                                // If array item is non-scalar (array or object), encode its
+                                // numeric index to resolve deserialization ambiguity issues.
+                                // Note that rack (as of 1.0.0) can't currently deserialize
+                                // nested arrays properly, and attempting to do so may cause
+                                // a server error. Possible fixes are to modify rack's
+                                // deserialization algorithm or to provide an option or flag
+                                // to force array serialization to be shallow.
+                                buildParams( prefix + &quot;[&quot; + ( typeof v === &quot;object&quot; ? i : &quot;&quot; ) + &quot;]&quot;, v, traditional, add );
+                        }
+                });
+
+        } else if ( !traditional &amp;&amp; jQuery.type( obj ) === &quot;object&quot; ) {
+                // Serialize object item.
+                for ( name in obj ) {
+                        buildParams( prefix + &quot;[&quot; + name + &quot;]&quot;, obj[ name ], traditional, add );
+                }
+
+        } else {
+                // Serialize scalar item.
+                add( prefix, obj );
+        }
+}
+var
+        // Document location
+        ajaxLocParts,
+        ajaxLocation,
+
+        rhash = /#.*$/,
+        rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+        // #7653, #8125, #8152: local protocol detection
+        rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+        rnoContent = /^(?:GET|HEAD)$/,
+        rprotocol = /^\/\//,
+        rquery = /\?/,
+        rscript = /&lt;script\b[^&lt;]*(?:(?!&lt;\/script&gt;)&lt;[^&lt;]*)*&lt;\/script&gt;/gi,
+        rts = /([?&amp;])_=[^&amp;]*/,
+        rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+        // Keep a copy of the old load method
+        _load = jQuery.fn.load,
+
+        /* Prefilters
+         * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+         * 2) These are called:
+         *    - BEFORE asking for a transport
+         *    - AFTER param serialization (s.data is a string if s.processData is true)
+         * 3) key is the dataType
+         * 4) the catchall symbol &quot;*&quot; can be used
+         * 5) execution will start with transport dataType and THEN continue down to &quot;*&quot; if needed
+         */
+        prefilters = {},
+
+        /* Transports bindings
+         * 1) key is the dataType
+         * 2) the catchall symbol &quot;*&quot; can be used
+         * 3) selection will start with transport dataType and THEN go to &quot;*&quot; if needed
+         */
+        transports = {},
+
+        // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+        allTypes = [&quot;*/&quot;] + [&quot;*&quot;];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+        ajaxLocation = location.href;
+} catch( e ) {
+        // Use the href attribute of an A element
+        // since IE will modify it given document.location
+        ajaxLocation = document.createElement( &quot;a&quot; );
+        ajaxLocation.href = &quot;&quot;;
+        ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base &quot;constructor&quot; for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+        // dataTypeExpression is optional and defaults to &quot;*&quot;
+        return function( dataTypeExpression, func ) {
+
+                if ( typeof dataTypeExpression !== &quot;string&quot; ) {
+                        func = dataTypeExpression;
+                        dataTypeExpression = &quot;*&quot;;
+                }
+
+                var dataType, list, placeBefore,
+                        dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ),
+                        i = 0,
+                        length = dataTypes.length;
+
+                if ( jQuery.isFunction( func ) ) {
+                        // For each dataType in the dataTypeExpression
+                        for ( ; i &lt; length; i++ ) {
+                                dataType = dataTypes[ i ];
+                                // We control if we're asked to add before
+                                // any existing element
+                                placeBefore = /^\+/.test( dataType );
+                                if ( placeBefore ) {
+                                        dataType = dataType.substr( 1 ) || &quot;*&quot;;
+                                }
+                                list = structure[ dataType ] = structure[ dataType ] || [];
+                                // then we add to the structure accordingly
+                                list[ placeBefore ? &quot;unshift&quot; : &quot;push&quot; ]( func );
+                        }
+                }
+        };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+                dataType /* internal */, inspected /* internal */ ) {
+
+        dataType = dataType || options.dataTypes[ 0 ];
+        inspected = inspected || {};
+
+        inspected[ dataType ] = true;
+
+        var selection,
+                list = structure[ dataType ],
+                i = 0,
+                length = list ? list.length : 0,
+                executeOnly = ( structure === prefilters );
+
+        for ( ; i &lt; length &amp;&amp; ( executeOnly || !selection ); i++ ) {
+                selection = list[ i ]( options, originalOptions, jqXHR );
+                // If we got redirected to another dataType
+                // we try there if executing only and not done already
+                if ( typeof selection === &quot;string&quot; ) {
+                        if ( !executeOnly || inspected[ selection ] ) {
+                                selection = undefined;
+                        } else {
+                                options.dataTypes.unshift( selection );
+                                selection = inspectPrefiltersOrTransports(
+                                                structure, options, originalOptions, jqXHR, selection, inspected );
+                        }
+                }
+        }
+        // If we're only executing or nothing was selected
+        // we try the catchall dataType if not done already
+        if ( ( executeOnly || !selection ) &amp;&amp; !inspected[ &quot;*&quot; ] ) {
+                selection = inspectPrefiltersOrTransports(
+                                structure, options, originalOptions, jqXHR, &quot;*&quot;, inspected );
+        }
+        // unnecessary when only executing (prefilters)
+        // but it'll be ignored by the caller in that case
+        return selection;
+}
+
+// A special extend for ajax options
+// that takes &quot;flat&quot; options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+        var key, deep,
+                flatOptions = jQuery.ajaxSettings.flatOptions || {};
+        for ( key in src ) {
+                if ( src[ key ] !== undefined ) {
+                        ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+                }
+        }
+        if ( deep ) {
+                jQuery.extend( true, target, deep );
+        }
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+        if ( typeof url !== &quot;string&quot; &amp;&amp; _load ) {
+                return _load.apply( this, arguments );
+        }
+
+        // Don't do a request if no elements are being requested
+        if ( !this.length ) {
+                return this;
+        }
+
+        var selector, type, response,
+                self = this,
+                off = url.indexOf(&quot; &quot;);
+
+        if ( off &gt;= 0 ) {
+                selector = url.slice( off, url.length );
+                url = url.slice( 0, off );
+        }
+
+        // If it's a function
+        if ( jQuery.isFunction( params ) ) {
+
+                // We assume that it's the callback
+                callback = params;
+                params = undefined;
+
+        // Otherwise, build a param string
+        } else if ( params &amp;&amp; typeof params === &quot;object&quot; ) {
+                type = &quot;POST&quot;;
+        }
+
+        // Request the remote document
+        jQuery.ajax({
+                url: url,
+
+                // if &quot;type&quot; variable is undefined, then &quot;GET&quot; method will be used
+                type: type,
+                dataType: &quot;html&quot;,
+                data: params,
+                complete: function( jqXHR, status ) {
+                        if ( callback ) {
+                                self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+                        }
+                }
+        }).done(function( responseText ) {
+
+                // Save response for use in complete callback
+                response = arguments;
+
+                // See if a selector was specified
+                self.html( selector ?
+
+                        // Create a dummy div to hold the results
+                        jQuery(&quot;&lt;div&gt;&quot;)
+
+                                // inject the contents of the document in, removing the scripts
+                                // to avoid any 'Permission Denied' errors in IE
+                                .append( responseText.replace( rscript, &quot;&quot; ) )
+
+                                // Locate the specified elements
+                                .find( selector ) :
+
+                        // If not, just inject the full result
+                        responseText );
+
+        });
+
+        return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( &quot;ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend&quot;.split( &quot; &quot; ), function( i, o ){
+        jQuery.fn[ o ] = function( f ){
+                return this.on( o, f );
+        };
+});
+
+jQuery.each( [ &quot;get&quot;, &quot;post&quot; ], function( i, method ) {
+        jQuery[ method ] = function( url, data, callback, type ) {
+                // shift arguments if data argument was omitted
+                if ( jQuery.isFunction( data ) ) {
+                        type = type || callback;
+                        callback = data;
+                        data = undefined;
+                }
+
+                return jQuery.ajax({
+                        type: method,
+                        url: url,
+                        data: data,
+                        success: callback,
+                        dataType: type
+                });
+        };
+});
+
+jQuery.extend({
+
+        getScript: function( url, callback ) {
+                return jQuery.get( url, undefined, callback, &quot;script&quot; );
+        },
+
+        getJSON: function( url, data, callback ) {
+                return jQuery.get( url, data, callback, &quot;json&quot; );
+        },
+
+        // Creates a full fledged settings object into target
+        // with both ajaxSettings and settings fields.
+        // If target is omitted, writes into ajaxSettings.
+        ajaxSetup: function( target, settings ) {
+                if ( settings ) {
+                        // Building a settings object
+                        ajaxExtend( target, jQuery.ajaxSettings );
+                } else {
+                        // Extending ajaxSettings
+                        settings = target;
+                        target = jQuery.ajaxSettings;
+                }
+                ajaxExtend( target, settings );
+                return target;
+        },
+
+        ajaxSettings: {
+                url: ajaxLocation,
+                isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+                global: true,
+                type: &quot;GET&quot;,
+                contentType: &quot;application/x-www-form-urlencoded; charset=UTF-8&quot;,
+                processData: true,
+                async: true,
+                /*
+                timeout: 0,
+                data: null,
+                dataType: null,
+                username: null,
+                password: null,
+                cache: null,
+                throws: false,
+                traditional: false,
+                headers: {},
+                */
+
+                accepts: {
+                        xml: &quot;application/xml, text/xml&quot;,
+                        html: &quot;text/html&quot;,
+                        text: &quot;text/plain&quot;,
+                        json: &quot;application/json, text/javascript&quot;,
+                        &quot;*&quot;: allTypes
+                },
+
+                contents: {
+                        xml: /xml/,
+                        html: /html/,
+                        json: /json/
+                },
+
+                responseFields: {
+                        xml: &quot;responseXML&quot;,
+                        text: &quot;responseText&quot;
+                },
+
+                // List of data converters
+                // 1) key format is &quot;source_type destination_type&quot; (a single space in-between)
+                // 2) the catchall symbol &quot;*&quot; can be used for source_type
+                converters: {
+
+                        // Convert anything to text
+                        &quot;* text&quot;: window.String,
+
+                        // Text to html (true = no transformation)
+                        &quot;text html&quot;: true,
+
+                        // Evaluate text as a json expression
+                        &quot;text json&quot;: jQuery.parseJSON,
+
+                        // Parse text as xml
+                        &quot;text xml&quot;: jQuery.parseXML
+                },
+
+                // For options that shouldn't be deep extended:
+                // you can add your own custom options here if
+                // and when you create one that shouldn't be
+                // deep extended (see ajaxExtend)
+                flatOptions: {
+                        context: true,
+                        url: true
+                }
+        },
+
+        ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+        ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+        // Main method
+        ajax: function( url, options ) {
+
+                // If url is an object, simulate pre-1.5 signature
+                if ( typeof url === &quot;object&quot; ) {
+                        options = url;
+                        url = undefined;
+                }
+
+                // Force options to be an object
+                options = options || {};
+
+                var // ifModified key
+                        ifModifiedKey,
+                        // Response headers
+                        responseHeadersString,
+                        responseHeaders,
+                        // transport
+                        transport,
+                        // timeout handle
+                        timeoutTimer,
+                        // Cross-domain detection vars
+                        parts,
+                        // To know if global events are to be dispatched
+                        fireGlobals,
+                        // Loop variable
+                        i,
+                        // Create the final options object
+                        s = jQuery.ajaxSetup( {}, options ),
+                        // Callbacks context
+                        callbackContext = s.context || s,
+                        // Context for global events
+                        // It's the callbackContext if one was provided in the options
+                        // and if it's a DOM node or a jQuery collection
+                        globalEventContext = callbackContext !== s &amp;&amp;
+                                ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+                                                jQuery( callbackContext ) : jQuery.event,
+                        // Deferreds
+                        deferred = jQuery.Deferred(),
+                        completeDeferred = jQuery.Callbacks( &quot;once memory&quot; ),
+                        // Status-dependent callbacks
+                        statusCode = s.statusCode || {},
+                        // Headers (they are sent all at once)
+                        requestHeaders = {},
+                        requestHeadersNames = {},
+                        // The jqXHR state
+                        state = 0,
+                        // Default abort message
+                        strAbort = &quot;canceled&quot;,
+                        // Fake xhr
+                        jqXHR = {
+
+                                readyState: 0,
+
+                                // Caches the header
+                                setRequestHeader: function( name, value ) {
+                                        if ( !state ) {
+                                                var lname = name.toLowerCase();
+                                                name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+                                                requestHeaders[ name ] = value;
+                                        }
+                                        return this;
+                                },
+
+                                // Raw string
+                                getAllResponseHeaders: function() {
+                                        return state === 2 ? responseHeadersString : null;
+                                },
+
+                                // Builds headers hashtable if needed
+                                getResponseHeader: function( key ) {
+                                        var match;
+                                        if ( state === 2 ) {
+                                                if ( !responseHeaders ) {
+                                                        responseHeaders = {};
+                                                        while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+                                                                responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+                                                        }
+                                                }
+                                                match = responseHeaders[ key.toLowerCase() ];
+                                        }
+                                        return match === undefined ? null : match;
+                                },
+
+                                // Overrides response content-type header
+                                overrideMimeType: function( type ) {
+                                        if ( !state ) {
+                                                s.mimeType = type;
+                                        }
+                                        return this;
+                                },
+
+                                // Cancel the request
+                                abort: function( statusText ) {
+                                        statusText = statusText || strAbort;
+                                        if ( transport ) {
+                                                transport.abort( statusText );
+                                        }
+                                        done( 0, statusText );
+                                        return this;
+                                }
+                        };
+
+                // Callback for when everything is done
+                // It is defined here because jslint complains if it is declared
+                // at the end of the function (which would be more logical and readable)
+                function done( status, nativeStatusText, responses, headers ) {
+                        var isSuccess, success, error, response, modified,
+                                statusText = nativeStatusText;
+
+                        // Called once
+                        if ( state === 2 ) {
+                                return;
+                        }
+
+                        // State is &quot;done&quot; now
+                        state = 2;
+
+                        // Clear timeout if it exists
+                        if ( timeoutTimer ) {
+                                clearTimeout( timeoutTimer );
+                        }
+
+                        // Dereference transport for early garbage collection
+                        // (no matter how long the jqXHR object will be used)
+                        transport = undefined;
+
+                        // Cache response headers
+                        responseHeadersString = headers || &quot;&quot;;
+
+                        // Set readyState
+                        jqXHR.readyState = status &gt; 0 ? 4 : 0;
+
+                        // Get response data
+                        if ( responses ) {
+                                response = ajaxHandleResponses( s, jqXHR, responses );
+                        }
+
+                        // If successful, handle type chaining
+                        if ( status &gt;= 200 &amp;&amp; status &lt; 300 || status === 304 ) {
+
+                                // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                                if ( s.ifModified ) {
+
+                                        modified = jqXHR.getResponseHeader(&quot;Last-Modified&quot;);
+                                        if ( modified ) {
+                                                jQuery.lastModified[ ifModifiedKey ] = modified;
+                                        }
+                                        modified = jqXHR.getResponseHeader(&quot;Etag&quot;);
+                                        if ( modified ) {
+                                                jQuery.etag[ ifModifiedKey ] = modified;
+                                        }
+                                }
+
+                                // If not modified
+                                if ( status === 304 ) {
+
+                                        statusText = &quot;notmodified&quot;;
+                                        isSuccess = true;
+
+                                // If we have data
+                                } else {
+
+                                        isSuccess = ajaxConvert( s, response );
+                                        statusText = isSuccess.state;
+                                        success = isSuccess.data;
+                                        error = isSuccess.error;
+                                        isSuccess = !error;
+                                }
+                        } else {
+                                // We extract error from statusText
+                                // then normalize statusText and status for non-aborts
+                                error = statusText;
+                                if ( !statusText || status ) {
+                                        statusText = &quot;error&quot;;
+                                        if ( status &lt; 0 ) {
+                                                status = 0;
+                                        }
+                                }
+                        }
+
+                        // Set data for the fake xhr object
+                        jqXHR.status = status;
+                        jqXHR.statusText = ( nativeStatusText || statusText ) + &quot;&quot;;
+
+                        // Success/Error
+                        if ( isSuccess ) {
+                                deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+                        } else {
+                                deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+                        }
+
+                        // Status-dependent callbacks
+                        jqXHR.statusCode( statusCode );
+                        statusCode = undefined;
+
+                        if ( fireGlobals ) {
+                                globalEventContext.trigger( &quot;ajax&quot; + ( isSuccess ? &quot;Success&quot; : &quot;Error&quot; ),
+                                                [ jqXHR, s, isSuccess ? success : error ] );
+                        }
+
+                        // Complete
+                        completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+                        if ( fireGlobals ) {
+                                globalEventContext.trigger( &quot;ajaxComplete&quot;, [ jqXHR, s ] );
+                                // Handle the global AJAX counter
+                                if ( !( --jQuery.active ) ) {
+                                        jQuery.event.trigger( &quot;ajaxStop&quot; );
+                                }
+                        }
+                }
+
+                // Attach deferreds
+                deferred.promise( jqXHR );
+                jqXHR.success = jqXHR.done;
+                jqXHR.error = jqXHR.fail;
+                jqXHR.complete = completeDeferred.add;
+
+                // Status-dependent callbacks
+                jqXHR.statusCode = function( map ) {
+                        if ( map ) {
+                                var tmp;
+                                if ( state &lt; 2 ) {
+                                        for ( tmp in map ) {
+                                                statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+                                        }
+                                } else {
+                                        tmp = map[ jqXHR.status ];
+                                        jqXHR.always( tmp );
+                                }
+                        }
+                        return this;
+                };
+
+                // Remove hash character (#7531: and string promotion)
+                // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+                // We also use the url parameter if available
+                s.url = ( ( url || s.url ) + &quot;&quot; ).replace( rhash, &quot;&quot; ).replace( rprotocol, ajaxLocParts[ 1 ] + &quot;//&quot; );
+
+                // Extract dataTypes list
+                s.dataTypes = jQuery.trim( s.dataType || &quot;*&quot; ).toLowerCase().split( core_rspace );
+
+                // A cross-domain request is in order when we have a protocol:host:port mismatch
+                if ( s.crossDomain == null ) {
+                        parts = rurl.exec( s.url.toLowerCase() );
+                        s.crossDomain = !!( parts &amp;&amp;
+                                ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+                                        ( parts[ 3 ] || ( parts[ 1 ] === &quot;http:&quot; ? 80 : 443 ) ) !=
+                                                ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === &quot;http:&quot; ? 80 : 443 ) ) )
+                        );
+                }
+
+                // Convert data if not already a string
+                if ( s.data &amp;&amp; s.processData &amp;&amp; typeof s.data !== &quot;string&quot; ) {
+                        s.data = jQuery.param( s.data, s.traditional );
+                }
+
+                // Apply prefilters
+                inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+                // If request was aborted inside a prefilter, stop there
+                if ( state === 2 ) {
+                        return jqXHR;
+                }
+
+                // We can fire global events as of now if asked to
+                fireGlobals = s.global;
+
+                // Uppercase the type
+                s.type = s.type.toUpperCase();
+
+                // Determine if request has content
+                s.hasContent = !rnoContent.test( s.type );
+
+                // Watch for a new set of requests
+                if ( fireGlobals &amp;&amp; jQuery.active++ === 0 ) {
+                        jQuery.event.trigger( &quot;ajaxStart&quot; );
+                }
+
+                // More options handling for requests with no content
+                if ( !s.hasContent ) {
+
+                        // If data is available, append data to url
+                        if ( s.data ) {
+                                s.url += ( rquery.test( s.url ) ? &quot;&amp;&quot; : &quot;?&quot; ) + s.data;
+                                // #9682: remove data so that it's not used in an eventual retry
+                                delete s.data;
+                        }
+
+                        // Get ifModifiedKey before adding the anti-cache parameter
+                        ifModifiedKey = s.url;
+
+                        // Add anti-cache in url if needed
+                        if ( s.cache === false ) {
+
+                                var ts = jQuery.now(),
+                                        // try replacing _= if it is there
+                                        ret = s.url.replace( rts, &quot;$1_=&quot; + ts );
+
+                                // if nothing was replaced, add timestamp to the end
+                                s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? &quot;&amp;&quot; : &quot;?&quot; ) + &quot;_=&quot; + ts : &quot;&quot; );
+                        }
+                }
+
+                // Set the correct header, if data is being sent
+                if ( s.data &amp;&amp; s.hasContent &amp;&amp; s.contentType !== false || options.contentType ) {
+                        jqXHR.setRequestHeader( &quot;Content-Type&quot;, s.contentType );
+                }
+
+                // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                if ( s.ifModified ) {
+                        ifModifiedKey = ifModifiedKey || s.url;
+                        if ( jQuery.lastModified[ ifModifiedKey ] ) {
+                                jqXHR.setRequestHeader( &quot;If-Modified-Since&quot;, jQuery.lastModified[ ifModifiedKey ] );
+                        }
+                        if ( jQuery.etag[ ifModifiedKey ] ) {
+                                jqXHR.setRequestHeader( &quot;If-None-Match&quot;, jQuery.etag[ ifModifiedKey ] );
+                        }
+                }
+
+                // Set the Accepts header for the server, depending on the dataType
+                jqXHR.setRequestHeader(
+                        &quot;Accept&quot;,
+                        s.dataTypes[ 0 ] &amp;&amp; s.accepts[ s.dataTypes[0] ] ?
+                                s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== &quot;*&quot; ? &quot;, &quot; + allTypes + &quot;; q=0.01&quot; : &quot;&quot; ) :
+                                s.accepts[ &quot;*&quot; ]
+                );
+
+                // Check for headers option
+                for ( i in s.headers ) {
+                        jqXHR.setRequestHeader( i, s.headers[ i ] );
+                }
+
+                // Allow custom headers/mimetypes and early abort
+                if ( s.beforeSend &amp;&amp; ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+                                // Abort if not done already and return
+                                return jqXHR.abort();
+
+                }
+
+                // aborting is no longer a cancellation
+                strAbort = &quot;abort&quot;;
+
+                // Install callbacks on deferreds
+                for ( i in { success: 1, error: 1, complete: 1 } ) {
+                        jqXHR[ i ]( s[ i ] );
+                }
+
+                // Get transport
+                transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+                // If no transport, we auto-abort
+                if ( !transport ) {
+                        done( -1, &quot;No Transport&quot; );
+                } else {
+                        jqXHR.readyState = 1;
+                        // Send global event
+                        if ( fireGlobals ) {
+                                globalEventContext.trigger( &quot;ajaxSend&quot;, [ jqXHR, s ] );
+                        }
+                        // Timeout
+                        if ( s.async &amp;&amp; s.timeout &gt; 0 ) {
+                                timeoutTimer = setTimeout( function(){
+                                        jqXHR.abort( &quot;timeout&quot; );
+                                }, s.timeout );
+                        }
+
+                        try {
+                                state = 1;
+                                transport.send( requestHeaders, done );
+                        } catch (e) {
+                                // Propagate exception as error if not done
+                                if ( state &lt; 2 ) {
+                                        done( -1, e );
+                                // Simply rethrow otherwise
+                                } else {
+                                        throw e;
+                                }
+                        }
+                }
+
+                return jqXHR;
+        },
+
+        // Counter for holding the number of active queries
+        active: 0,
+
+        // Last-Modified header cache for next request
+        lastModified: {},
+        etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+        var ct, type, finalDataType, firstDataType,
+                contents = s.contents,
+                dataTypes = s.dataTypes,
+                responseFields = s.responseFields;
+
+        // Fill responseXXX fields
+        for ( type in responseFields ) {
+                if ( type in responses ) {
+                        jqXHR[ responseFields[type] ] = responses[ type ];
+                }
+        }
+
+        // Remove auto dataType and get content-type in the process
+        while( dataTypes[ 0 ] === &quot;*&quot; ) {
+                dataTypes.shift();
+                if ( ct === undefined ) {
+                        ct = s.mimeType || jqXHR.getResponseHeader( &quot;content-type&quot; );
+                }
+        }
+
+        // Check if we're dealing with a known content-type
+        if ( ct ) {
+                for ( type in contents ) {
+                        if ( contents[ type ] &amp;&amp; contents[ type ].test( ct ) ) {
+                                dataTypes.unshift( type );
+                                break;
+                        }
+                }
+        }
+
+        // Check to see if we have a response for the expected dataType
+        if ( dataTypes[ 0 ] in responses ) {
+                finalDataType = dataTypes[ 0 ];
+        } else {
+                // Try convertible dataTypes
+                for ( type in responses ) {
+                        if ( !dataTypes[ 0 ] || s.converters[ type + &quot; &quot; + dataTypes[0] ] ) {
+                                finalDataType = type;
+                                break;
+                        }
+                        if ( !firstDataType ) {
+                                firstDataType = type;
+                        }
+                }
+                // Or just use first one
+                finalDataType = finalDataType || firstDataType;
+        }
+
+        // If we found a dataType
+        // We add the dataType to the list if needed
+        // and return the corresponding response
+        if ( finalDataType ) {
+                if ( finalDataType !== dataTypes[ 0 ] ) {
+                        dataTypes.unshift( finalDataType );
+                }
+                return responses[ finalDataType ];
+        }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+        var conv, conv2, current, tmp,
+                // Work with a copy of dataTypes in case we need to modify it for conversion
+                dataTypes = s.dataTypes.slice(),
+                prev = dataTypes[ 0 ],
+                converters = {},
+                i = 0;
+
+        // Apply the dataFilter if provided
+        if ( s.dataFilter ) {
+                response = s.dataFilter( response, s.dataType );
+        }
+
+        // Create converters map with lowercased keys
+        if ( dataTypes[ 1 ] ) {
+                for ( conv in s.converters ) {
+                        converters[ conv.toLowerCase() ] = s.converters[ conv ];
+                }
+        }
+
+        // Convert to each sequential dataType, tolerating list modification
+        for ( ; (current = dataTypes[++i]); ) {
+
+                // There's only work to do if current dataType is non-auto
+                if ( current !== &quot;*&quot; ) {
+
+                        // Convert response if prev dataType is non-auto and differs from current
+                        if ( prev !== &quot;*&quot; &amp;&amp; prev !== current ) {
+
+                                // Seek a direct converter
+                                conv = converters[ prev + &quot; &quot; + current ] || converters[ &quot;* &quot; + current ];
+
+                                // If none found, seek a pair
+                                if ( !conv ) {
+                                        for ( conv2 in converters ) {
+
+                                                // If conv2 outputs current
+                                                tmp = conv2.split(&quot; &quot;);
+                                                if ( tmp[ 1 ] === current ) {
+
+                                                        // If prev can be converted to accepted input
+                                                        conv = converters[ prev + &quot; &quot; + tmp[ 0 ] ] ||
+                                                                converters[ &quot;* &quot; + tmp[ 0 ] ];
+                                                        if ( conv ) {
+                                                                // Condense equivalence converters
+                                                                if ( conv === true ) {
+                                                                        conv = converters[ conv2 ];
+
+                                                                // Otherwise, insert the intermediate dataType
+                                                                } else if ( converters[ conv2 ] !== true ) {
+                                                                        current = tmp[ 0 ];
+                                                                        dataTypes.splice( i--, 0, current );
+                                                                }
+
+                                                                break;
+                                                        }
+                                                }
+                                        }
+                                }
+
+                                // Apply converter (if not an equivalence)
+                                if ( conv !== true ) {
+
+                                        // Unless errors are allowed to bubble, catch and return them
+                                        if ( conv &amp;&amp; s[&quot;throws&quot;] ) {
+                                                response = conv( response );
+                                        } else {
+                                                try {
+                                                        response = conv( response );
+                                                } catch ( e ) {
+                                                        return { state: &quot;parsererror&quot;, error: conv ? e : &quot;No conversion from &quot; + prev + &quot; to &quot; + current };
+                                                }
+                                        }
+                                }
+                        }
+
+                        // Update prev for next iteration
+                        prev = current;
+                }
+        }
+
+        return { state: &quot;success&quot;, data: response };
+}
+var oldCallbacks = [],
+        rquestion = /\?/,
+        rjsonp = /(=)\?(?=&amp;|$)|\?\?/,
+        nonce = jQuery.now();
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+        jsonp: &quot;callback&quot;,
+        jsonpCallback: function() {
+                var callback = oldCallbacks.pop() || ( jQuery.expando + &quot;_&quot; + ( nonce++ ) );
+                this[ callback ] = true;
+                return callback;
+        }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( &quot;json jsonp&quot;, function( s, originalSettings, jqXHR ) {
+
+        var callbackName, overwritten, responseContainer,
+                data = s.data,
+                url = s.url,
+                hasCallback = s.jsonp !== false,
+                replaceInUrl = hasCallback &amp;&amp; rjsonp.test( url ),
+                replaceInData = hasCallback &amp;&amp; !replaceInUrl &amp;&amp; typeof data === &quot;string&quot; &amp;&amp;
+                        !( s.contentType || &quot;&quot; ).indexOf(&quot;application/x-www-form-urlencoded&quot;) &amp;&amp;
+                        rjsonp.test( data );
+
+        // Handle iff the expected data type is &quot;jsonp&quot; or we have a parameter to set
+        if ( s.dataTypes[ 0 ] === &quot;jsonp&quot; || replaceInUrl || replaceInData ) {
+
+                // Get callback name, remembering preexisting value associated with it
+                callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+                        s.jsonpCallback() :
+                        s.jsonpCallback;
+                overwritten = window[ callbackName ];
+
+                // Insert callback into url or form data
+                if ( replaceInUrl ) {
+                        s.url = url.replace( rjsonp, &quot;$1&quot; + callbackName );
+                } else if ( replaceInData ) {
+                        s.data = data.replace( rjsonp, &quot;$1&quot; + callbackName );
+                } else if ( hasCallback ) {
+                        s.url += ( rquestion.test( url ) ? &quot;&amp;&quot; : &quot;?&quot; ) + s.jsonp + &quot;=&quot; + callbackName;
+                }
+
+                // Use data converter to retrieve json after script execution
+                s.converters[&quot;script json&quot;] = function() {
+                        if ( !responseContainer ) {
+                                jQuery.error( callbackName + &quot; was not called&quot; );
+                        }
+                        return responseContainer[ 0 ];
+                };
+
+                // force json dataType
+                s.dataTypes[ 0 ] = &quot;json&quot;;
+
+                // Install callback
+                window[ callbackName ] = function() {
+                        responseContainer = arguments;
+                };
+
+                // Clean-up function (fires after converters)
+                jqXHR.always(function() {
+                        // Restore preexisting value
+                        window[ callbackName ] = overwritten;
+
+                        // Save back as free
+                        if ( s[ callbackName ] ) {
+                                // make sure that re-using the options doesn't screw things around
+                                s.jsonpCallback = originalSettings.jsonpCallback;
+
+                                // save the callback name for future use
+                                oldCallbacks.push( callbackName );
+                        }
+
+                        // Call if it was a function and we have a response
+                        if ( responseContainer &amp;&amp; jQuery.isFunction( overwritten ) ) {
+                                overwritten( responseContainer[ 0 ] );
+                        }
+
+                        responseContainer = overwritten = undefined;
+                });
+
+                // Delegate to script
+                return &quot;script&quot;;
+        }
+});
+// Install script dataType
+jQuery.ajaxSetup({
+        accepts: {
+                script: &quot;text/javascript, application/javascript, application/ecmascript, application/x-ecmascript&quot;
+        },
+        contents: {
+                script: /javascript|ecmascript/
+        },
+        converters: {
+                &quot;text script&quot;: function( text ) {
+                        jQuery.globalEval( text );
+                        return text;
+                }
+        }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( &quot;script&quot;, function( s ) {
+        if ( s.cache === undefined ) {
+                s.cache = false;
+        }
+        if ( s.crossDomain ) {
+                s.type = &quot;GET&quot;;
+                s.global = false;
+        }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( &quot;script&quot;, function(s) {
+
+        // This transport only deals with cross domain requests
+        if ( s.crossDomain ) {
+
+                var script,
+                        head = document.head || document.getElementsByTagName( &quot;head&quot; )[0] || document.documentElement;
+
+                return {
+
+                        send: function( _, callback ) {
+
+                                script = document.createElement( &quot;script&quot; );
+
+                                script.async = &quot;async&quot;;
+
+                                if ( s.scriptCharset ) {
+                                        script.charset = s.scriptCharset;
+                                }
+
+                                script.src = s.url;
+
+                                // Attach handlers for all browsers
+                                script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+                                        if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+                                                // Handle memory leak in IE
+                                                script.onload = script.onreadystatechange = null;
+
+                                                // Remove the script
+                                                if ( head &amp;&amp; script.parentNode ) {
+                                                        head.removeChild( script );
+                                                }
+
+                                                // Dereference the script
+                                                script = undefined;
+
+                                                // Callback if not abort
+                                                if ( !isAbort ) {
+                                                        callback( 200, &quot;success&quot; );
+                                                }
+                                        }
+                                };
+                                // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+                                // This arises when a base node is used (#2709 and #4378).
+                                head.insertBefore( script, head.firstChild );
+                        },
+
+                        abort: function() {
+                                if ( script ) {
+                                        script.onload( 0, 1 );
+                                }
+                        }
+                };
+        }
+});
+var xhrCallbacks,
+        // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+        xhrOnUnloadAbort = window.ActiveXObject ? function() {
+                // Abort all pending requests
+                for ( var key in xhrCallbacks ) {
+                        xhrCallbacks[ key ]( 0, 1 );
+                }
+        } : false,
+        xhrId = 0;
+
+// Functions to create xhrs
+function createStandardXHR() {
+        try {
+                return new window.XMLHttpRequest();
+        } catch( e ) {}
+}
+
+function createActiveXHR() {
+        try {
+                return new window.ActiveXObject( &quot;Microsoft.XMLHTTP&quot; );
+        } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+        /* Microsoft failed to properly
+         * implement the XMLHttpRequest in IE7 (can't request local files),
+         * so we use the ActiveXObject when it is available
+         * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+         * we need a fallback.
+         */
+        function() {
+                return !this.isLocal &amp;&amp; createStandardXHR() || createActiveXHR();
+        } :
+        // For all other browsers, use the standard XMLHttpRequest object
+        createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+        jQuery.extend( jQuery.support, {
+                ajax: !!xhr,
+                cors: !!xhr &amp;&amp; ( &quot;withCredentials&quot; in xhr )
+        });
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+        jQuery.ajaxTransport(function( s ) {
+                // Cross domain only allowed if supported through XMLHttpRequest
+                if ( !s.crossDomain || jQuery.support.cors ) {
+
+                        var callback;
+
+                        return {
+                                send: function( headers, complete ) {
+
+                                        // Get a new xhr
+                                        var handle, i,
+                                                xhr = s.xhr();
+
+                                        // Open the socket
+                                        // Passing null username, generates a login popup on Opera (#2865)
+                                        if ( s.username ) {
+                                                xhr.open( s.type, s.url, s.async, s.username, s.password );
+                                        } else {
+                                                xhr.open( s.type, s.url, s.async );
+                                        }
+
+                                        // Apply custom fields if provided
+                                        if ( s.xhrFields ) {
+                                                for ( i in s.xhrFields ) {
+                                                        xhr[ i ] = s.xhrFields[ i ];
+                                                }
+                                        }
+
+                                        // Override mime type if needed
+                                        if ( s.mimeType &amp;&amp; xhr.overrideMimeType ) {
+                                                xhr.overrideMimeType( s.mimeType );
+                                        }
+
+                                        // X-Requested-With header
+                                        // For cross-domain requests, seeing as conditions for a preflight are
+                                        // akin to a jigsaw puzzle, we simply never set it to be sure.
+                                        // (it can always be set on a per-request basis or even using ajaxSetup)
+                                        // For same-domain requests, won't change header if already provided.
+                                        if ( !s.crossDomain &amp;&amp; !headers[&quot;X-Requested-With&quot;] ) {
+                                                headers[ &quot;X-Requested-With&quot; ] = &quot;XMLHttpRequest&quot;;
+                                        }
+
+                                        // Need an extra try/catch for cross domain requests in Firefox 3
+                                        try {
+                                                for ( i in headers ) {
+                                                        xhr.setRequestHeader( i, headers[ i ] );
+                                                }
+                                        } catch( _ ) {}
+
+                                        // Do send the request
+                                        // This may raise an exception which is actually
+                                        // handled in jQuery.ajax (so no try/catch here)
+                                        xhr.send( ( s.hasContent &amp;&amp; s.data ) || null );
+
+                                        // Listener
+                                        callback = function( _, isAbort ) {
+
+                                                var status,
+                                                        statusText,
+                                                        responseHeaders,
+                                                        responses,
+                                                        xml;
+
+                                                // Firefox throws exceptions when accessing properties
+                                                // of an xhr when a network error occurred
+                                                // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+                                                try {
+
+                                                        // Was never called and is aborted or complete
+                                                        if ( callback &amp;&amp; ( isAbort || xhr.readyState === 4 ) ) {
+
+                                                                // Only called once
+                                                                callback = undefined;
+
+                                                                // Do not keep as active anymore
+                                                                if ( handle ) {
+                                                                        xhr.onreadystatechange = jQuery.noop;
+                                                                        if ( xhrOnUnloadAbort ) {
+                                                                                delete xhrCallbacks[ handle ];
+                                                                        }
+                                                                }
+
+                                                                // If it's an abort
+                                                                if ( isAbort ) {
+                                                                        // Abort it manually if needed
+                                                                        if ( xhr.readyState !== 4 ) {
+                                                                                xhr.abort();
+                                                                        }
+                                                                } else {
+                                                                        status = xhr.status;
+                                                                        responseHeaders = xhr.getAllResponseHeaders();
+                                                                        responses = {};
+                                                                        xml = xhr.responseXML;
+
+                                                                        // Construct response list
+                                                                        if ( xml &amp;&amp; xml.documentElement /* #4958 */ ) {
+                                                                                responses.xml = xml;
+                                                                        }
+
+                                                                        // When requesting binary data, IE6-9 will throw an exception
+                                                                        // on any attempt to access responseText (#11426)
+                                                                        try {
+                                                                                responses.text = xhr.responseText;
+                                                                        } catch( e ) {
+                                                                        }
+
+                                                                        // Firefox throws an exception when accessing
+                                                                        // statusText for faulty cross-domain requests
+                                                                        try {
+                                                                                statusText = xhr.statusText;
+                                                                        } catch( e ) {
+                                                                                // We normalize with Webkit giving an empty statusText
+                                                                                statusText = &quot;&quot;;
+                                                                        }
+
+                                                                        // Filter status for non standard behaviors
+
+                                                                        // If the request is local and we have data: assume a success
+                                                                        // (success with no data won't get notified, that's the best we
+                                                                        // can do given current implementations)
+                                                                        if ( !status &amp;&amp; s.isLocal &amp;&amp; !s.crossDomain ) {
+                                                                                status = responses.text ? 200 : 404;
+                                                                        // IE - #1450: sometimes returns 1223 when it should be 204
+                                                                        } else if ( status === 1223 ) {
+                                                                                status = 204;
+                                                                        }
+                                                                }
+                                                        }
+                                                } catch( firefoxAccessException ) {
+                                                        if ( !isAbort ) {
+                                                                complete( -1, firefoxAccessException );
+                                                        }
+                                                }
+
+                                                // Call complete if needed
+                                                if ( responses ) {
+                                                        complete( status, statusText, responses, responseHeaders );
+                                                }
+                                        };
+
+                                        if ( !s.async ) {
+                                                // if we're in sync mode we fire the callback
+                                                callback();
+                                        } else if ( xhr.readyState === 4 ) {
+                                                // (IE6 &amp; IE7) if it's in cache and has been
+                                                // retrieved directly we need to fire the callback
+                                                setTimeout( callback, 0 );
+                                        } else {
+                                                handle = ++xhrId;
+                                                if ( xhrOnUnloadAbort ) {
+                                                        // Create the active xhrs callbacks list if needed
+                                                        // and attach the unload handler
+                                                        if ( !xhrCallbacks ) {
+                                                                xhrCallbacks = {};
+                                                                jQuery( window ).unload( xhrOnUnloadAbort );
+                                                        }
+                                                        // Add to list of active xhrs callbacks
+                                                        xhrCallbacks[ handle ] = callback;
+                                                }
+                                                xhr.onreadystatechange = callback;
+                                        }
+                                },
+
+                                abort: function() {
+                                        if ( callback ) {
+                                                callback(0,1);
+                                        }
+                                }
+                        };
+                }
+        });
+}
+var fxNow, timerId,
+        rfxtypes = /^(?:toggle|show|hide)$/,
+        rfxnum = new RegExp( &quot;^(?:([-+])=|)(&quot; + core_pnum + &quot;)([a-z%]*)$&quot;, &quot;i&quot; ),
+        rrun = /queueHooks$/,
+        animationPrefilters = [ defaultPrefilter ],
+        tweeners = {
+                &quot;*&quot;: [function( prop, value ) {
+                        var end, unit,
+                                tween = this.createTween( prop, value ),
+                                parts = rfxnum.exec( value ),
+                                target = tween.cur(),
+                                start = +target || 0,
+                                scale = 1,
+                                maxIterations = 20;
+
+                        if ( parts ) {
+                                end = +parts[2];
+                                unit = parts[3] || ( jQuery.cssNumber[ prop ] ? &quot;&quot; : &quot;px&quot; );
+
+                                // We need to compute starting value
+                                if ( unit !== &quot;px&quot; &amp;&amp; start ) {
+                                        // Iteratively approximate from a nonzero starting point
+                                        // Prefer the current property, because this process will be trivial if it uses the same units
+                                        // Fallback to end or a simple constant
+                                        start = jQuery.css( tween.elem, prop, true ) || end || 1;
+
+                                        do {
+                                                // If previous iteration zeroed out, double until we get *something*
+                                                // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+                                                scale = scale || &quot;.5&quot;;
+
+                                                // Adjust and apply
+                                                start = start / scale;
+                                                jQuery.style( tween.elem, prop, start + unit );
+
+                                        // Update scale, tolerating zero or NaN from tween.cur()
+                                        // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+                                        } while ( scale !== (scale = tween.cur() / target) &amp;&amp; scale !== 1 &amp;&amp; --maxIterations );
+                                }
+
+                                tween.unit = unit;
+                                tween.start = start;
+                                // If a +=/-= token was provided, we're doing a relative animation
+                                tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
+                        }
+                        return tween;
+                }]
+        };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+        setTimeout(function() {
+                fxNow = undefined;
+        }, 0 );
+        return ( fxNow = jQuery.now() );
+}
+
+function createTweens( animation, props ) {
+        jQuery.each( props, function( prop, value ) {
+                var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ &quot;*&quot; ] ),
+                        index = 0,
+                        length = collection.length;
+                for ( ; index &lt; length; index++ ) {
+                        if ( collection[ index ].call( animation, prop, value ) ) {
+
+                                // we're done with this property
+                                return;
+                        }
+                }
+        });
+}
+
+function Animation( elem, properties, options ) {
+        var result,
+                index = 0,
+                tweenerIndex = 0,
+                length = animationPrefilters.length,
+                deferred = jQuery.Deferred().always( function() {
+                        // don't match elem in the :animated selector
+                        delete tick.elem;
+                }),
+                tick = function() {
+                        var currentTime = fxNow || createFxNow(),
+                                remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+                                // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+                                temp = remaining / animation.duration || 0,
+                                percent = 1 - temp,
+                                index = 0,
+                                length = animation.tweens.length;
+
+                        for ( ; index &lt; length ; index++ ) {
+                                animation.tweens[ index ].run( percent );
+                        }
+
+                        deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+                        if ( percent &lt; 1 &amp;&amp; length ) {
+                                return remaining;
+                        } else {
+                                deferred.resolveWith( elem, [ animation ] );
+                                return false;
+                        }
+                },
+                animation = deferred.promise({
+                        elem: elem,
+                        props: jQuery.extend( {}, properties ),
+                        opts: jQuery.extend( true, { specialEasing: {} }, options ),
+                        originalProperties: properties,
+                        originalOptions: options,
+                        startTime: fxNow || createFxNow(),
+                        duration: options.duration,
+                        tweens: [],
+                        createTween: function( prop, end, easing ) {
+                                var tween = jQuery.Tween( elem, animation.opts, prop, end,
+                                                animation.opts.specialEasing[ prop ] || animation.opts.easing );
+                                animation.tweens.push( tween );
+                                return tween;
+                        },
+                        stop: function( gotoEnd ) {
+                                var index = 0,
+                                        // if we are going to the end, we want to run all the tweens
+                                        // otherwise we skip this part
+                                        length = gotoEnd ? animation.tweens.length : 0;
+
+                                for ( ; index &lt; length ; index++ ) {
+                                        animation.tweens[ index ].run( 1 );
+                                }
+
+                                // resolve when we played the last frame
+                                // otherwise, reject
+                                if ( gotoEnd ) {
+                                        deferred.resolveWith( elem, [ animation, gotoEnd ] );
+                                } else {
+                                        deferred.rejectWith( elem, [ animation, gotoEnd ] );
+                                }
+                                return this;
+                        }
+                }),
+                props = animation.props;
+
+        propFilter( props, animation.opts.specialEasing );
+
+        for ( ; index &lt; length ; index++ ) {
+                result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+                if ( result ) {
+                        return result;
+                }
+        }
+
+        createTweens( animation, props );
+
+        if ( jQuery.isFunction( animation.opts.start ) ) {
+                animation.opts.start.call( elem, animation );
+        }
+
+        jQuery.fx.timer(
+                jQuery.extend( tick, {
+                        anim: animation,
+                        queue: animation.opts.queue,
+                        elem: elem
+                })
+        );
+
+        // attach callbacks from options
+        return animation.progress( animation.opts.progress )
+                .done( animation.opts.done, animation.opts.complete )
+                .fail( animation.opts.fail )
+                .always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+        var index, name, easing, value, hooks;
+
+        // camelCase, specialEasing and expand cssHook pass
+        for ( index in props ) {
+                name = jQuery.camelCase( index );
+                easing = specialEasing[ name ];
+                value = props[ index ];
+                if ( jQuery.isArray( value ) ) {
+                        easing = value[ 1 ];
+                        value = props[ index ] = value[ 0 ];
+                }
+
+                if ( index !== name ) {
+                        props[ name ] = value;
+                        delete props[ index ];
+                }
+
+                hooks = jQuery.cssHooks[ name ];
+                if ( hooks &amp;&amp; &quot;expand&quot; in hooks ) {
+                        value = hooks.expand( value );
+                        delete props[ name ];
+
+                        // not quite $.extend, this wont overwrite keys already present.
+                        // also - reusing 'index' from above because we have the correct &quot;name&quot;
+                        for ( index in value ) {
+                                if ( !( index in props ) ) {
+                                        props[ index ] = value[ index ];
+                                        specialEasing[ index ] = easing;
+                                }
+                        }
+                } else {
+                        specialEasing[ name ] = easing;
+                }
+        }
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+        tweener: function( props, callback ) {
+                if ( jQuery.isFunction( props ) ) {
+                        callback = props;
+                        props = [ &quot;*&quot; ];
+                } else {
+                        props = props.split(&quot; &quot;);
+                }
+
+                var prop,
+                        index = 0,
+                        length = props.length;
+
+                for ( ; index &lt; length ; index++ ) {
+                        prop = props[ index ];
+                        tweeners[ prop ] = tweeners[ prop ] || [];
+                        tweeners[ prop ].unshift( callback );
+                }
+        },
+
+        prefilter: function( callback, prepend ) {
+                if ( prepend ) {
+                        animationPrefilters.unshift( callback );
+                } else {
+                        animationPrefilters.push( callback );
+                }
+        }
+});
+
+function defaultPrefilter( elem, props, opts ) {
+        var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
+                anim = this,
+                style = elem.style,
+                orig = {},
+                handled = [],
+                hidden = elem.nodeType &amp;&amp; isHidden( elem );
+
+        // handle queue: false promises
+        if ( !opts.queue ) {
+                hooks = jQuery._queueHooks( elem, &quot;fx&quot; );
+                if ( hooks.unqueued == null ) {
+                        hooks.unqueued = 0;
+                        oldfire = hooks.empty.fire;
+                        hooks.empty.fire = function() {
+                                if ( !hooks.unqueued ) {
+                                        oldfire();
+                                }
+                        };
+                }
+                hooks.unqueued++;
+
+                anim.always(function() {
+                        // doing this makes sure that the complete handler will be called
+                        // before this completes
+                        anim.always(function() {
+                                hooks.unqueued--;
+                                if ( !jQuery.queue( elem, &quot;fx&quot; ).length ) {
+                                        hooks.empty.fire();
+                                }
+                        });
+                });
+        }
+
+        // height/width overflow pass
+        if ( elem.nodeType === 1 &amp;&amp; ( &quot;height&quot; in props || &quot;width&quot; in props ) ) {
+                // Make sure that nothing sneaks out
+                // Record all 3 overflow attributes because IE does not
+                // change the overflow attribute when overflowX and
+                // overflowY are set to the same value
+                opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+                // Set display property to inline-block for height/width
+                // animations on inline elements that are having width/height animated
+                if ( jQuery.css( elem, &quot;display&quot; ) === &quot;inline&quot; &amp;&amp;
+                                jQuery.css( elem, &quot;float&quot; ) === &quot;none&quot; ) {
+
+                        // inline-level elements accept inline-block;
+                        // block-level elements need to be inline with layout
+                        if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === &quot;inline&quot; ) {
+                                style.display = &quot;inline-block&quot;;
+
+                        } else {
+                                style.zoom = 1;
+                        }
+                }
+        }
+
+        if ( opts.overflow ) {
+                style.overflow = &quot;hidden&quot;;
+                if ( !jQuery.support.shrinkWrapBlocks ) {
+                        anim.done(function() {
+                                style.overflow = opts.overflow[ 0 ];
+                                style.overflowX = opts.overflow[ 1 ];
+                                style.overflowY = opts.overflow[ 2 ];
+                        });
+                }
+        }
+
+
+        // show/hide pass
+        for ( index in props ) {
+                value = props[ index ];
+                if ( rfxtypes.exec( value ) ) {
+                        delete props[ index ];
+                        toggle = toggle || value === &quot;toggle&quot;;
+                        if ( value === ( hidden ? &quot;hide&quot; : &quot;show&quot; ) ) {
+                                continue;
+                        }
+                        handled.push( index );
+                }
+        }
+
+        length = handled.length;
+        if ( length ) {
+                dataShow = jQuery._data( elem, &quot;fxshow&quot; ) || jQuery._data( elem, &quot;fxshow&quot;, {} );
+                if ( &quot;hidden&quot; in dataShow ) {
+                        hidden = dataShow.hidden;
+                }
+
+                // store state if its toggle - enables .stop().toggle() to &quot;reverse&quot;
+                if ( toggle ) {
+                        dataShow.hidden = !hidden;
+                }
+                if ( hidden ) {
+                        jQuery( elem ).show();
+                } else {
+                        anim.done(function() {
+                                jQuery( elem ).hide();
+                        });
+                }
+                anim.done(function() {
+                        var prop;
+                        jQuery.removeData( elem, &quot;fxshow&quot;, true );
+                        for ( prop in orig ) {
+                                jQuery.style( elem, prop, orig[ prop ] );
+                        }
+                });
+                for ( index = 0 ; index &lt; length ; index++ ) {
+                        prop = handled[ index ];
+                        tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
+                        orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
+
+                        if ( !( prop in dataShow ) ) {
+                                dataShow[ prop ] = tween.start;
+                                if ( hidden ) {
+                                        tween.end = tween.start;
+                                        tween.start = prop === &quot;width&quot; || prop === &quot;height&quot; ? 1 : 0;
+                                }
+                        }
+                }
+        }
+}
+
+function Tween( elem, options, prop, end, easing ) {
+        return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+        constructor: Tween,
+        init: function( elem, options, prop, end, easing, unit ) {
+                this.elem = elem;
+                this.prop = prop;
+                this.easing = easing || &quot;swing&quot;;
+                this.options = options;
+                this.start = this.now = this.cur();
+                this.end = end;
+                this.unit = unit || ( jQuery.cssNumber[ prop ] ? &quot;&quot; : &quot;px&quot; );
+        },
+        cur: function() {
+                var hooks = Tween.propHooks[ this.prop ];
+
+                return hooks &amp;&amp; hooks.get ?
+                        hooks.get( this ) :
+                        Tween.propHooks._default.get( this );
+        },
+        run: function( percent ) {
+                var eased,
+                        hooks = Tween.propHooks[ this.prop ];
+
+                if ( this.options.duration ) {
+                        this.pos = eased = jQuery.easing[ this.easing ](
+                                percent, this.options.duration * percent, 0, 1, this.options.duration
+                        );
+                } else {
+                        this.pos = eased = percent;
+                }
+                this.now = ( this.end - this.start ) * eased + this.start;
+
+                if ( this.options.step ) {
+                        this.options.step.call( this.elem, this.now, this );
+                }
+
+                if ( hooks &amp;&amp; hooks.set ) {
+                        hooks.set( this );
+                } else {
+                        Tween.propHooks._default.set( this );
+                }
+                return this;
+        }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+        _default: {
+                get: function( tween ) {
+                        var result;
+
+                        if ( tween.elem[ tween.prop ] != null &amp;&amp;
+                                (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+                                return tween.elem[ tween.prop ];
+                        }
+
+                        // passing any value as a 4th parameter to .css will automatically
+                        // attempt a parseFloat and fallback to a string if the parse fails
+                        // so, simple values such as &quot;10px&quot; are parsed to Float.
+                        // complex values such as &quot;rotate(1rad)&quot; are returned as is.
+                        result = jQuery.css( tween.elem, tween.prop, false, &quot;&quot; );
+                        // Empty strings, null, undefined and &quot;auto&quot; are converted to 0.
+                        return !result || result === &quot;auto&quot; ? 0 : result;
+                },
+                set: function( tween ) {
+                        // use step hook for back compat - use cssHook if its there - use .style if its
+                        // available and use plain properties where available
+                        if ( jQuery.fx.step[ tween.prop ] ) {
+                                jQuery.fx.step[ tween.prop ]( tween );
+                        } else if ( tween.elem.style &amp;&amp; ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+                                jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+                        } else {
+                                tween.elem[ tween.prop ] = tween.now;
+                        }
+                }
+        }
+};
+
+// Remove in 2.0 - this supports IE8's panic based approach
+// to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+        set: function( tween ) {
+                if ( tween.elem.nodeType &amp;&amp; tween.elem.parentNode ) {
+                        tween.elem[ tween.prop ] = tween.now;
+                }
+        }
+};
+
+jQuery.each([ &quot;toggle&quot;, &quot;show&quot;, &quot;hide&quot; ], function( i, name ) {
+        var cssFn = jQuery.fn[ name ];
+        jQuery.fn[ name ] = function( speed, easing, callback ) {
+                return speed == null || typeof speed === &quot;boolean&quot; ||
+                        // special check for .toggle( handler, handler, ... )
+                        ( !i &amp;&amp; jQuery.isFunction( speed ) &amp;&amp; jQuery.isFunction( easing ) ) ?
+                        cssFn.apply( this, arguments ) :
+                        this.animate( genFx( name, true ), speed, easing, callback );
+        };
+});
+
+jQuery.fn.extend({
+        fadeTo: function( speed, to, easing, callback ) {
+
+                // show any hidden elements after setting opacity to 0
+                return this.filter( isHidden ).css( &quot;opacity&quot;, 0 ).show()
+
+                        // animate to the value specified
+                        .end().animate({ opacity: to }, speed, easing, callback );
+        },
+        animate: function( prop, speed, easing, callback ) {
+                var empty = jQuery.isEmptyObject( prop ),
+                        optall = jQuery.speed( speed, easing, callback ),
+                        doAnimation = function() {
+                                // Operate on a copy of prop so per-property easing won't be lost
+                                var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+                                // Empty animations resolve immediately
+                                if ( empty ) {
+                                        anim.stop( true );
+                                }
+                        };
+
+                return empty || optall.queue === false ?
+                        this.each( doAnimation ) :
+                        this.queue( optall.queue, doAnimation );
+        },
+        stop: function( type, clearQueue, gotoEnd ) {
+                var stopQueue = function( hooks ) {
+                        var stop = hooks.stop;
+                        delete hooks.stop;
+                        stop( gotoEnd );
+                };
+
+                if ( typeof type !== &quot;string&quot; ) {
+                        gotoEnd = clearQueue;
+                        clearQueue = type;
+                        type = undefined;
+                }
+                if ( clearQueue &amp;&amp; type !== false ) {
+                        this.queue( type || &quot;fx&quot;, [] );
+                }
+
+                return this.each(function() {
+                        var dequeue = true,
+                                index = type != null &amp;&amp; type + &quot;queueHooks&quot;,
+                                timers = jQuery.timers,
+                                data = jQuery._data( this );
+
+                        if ( index ) {
+                                if ( data[ index ] &amp;&amp; data[ index ].stop ) {
+                                        stopQueue( data[ index ] );
+                                }
+                        } else {
+                                for ( index in data ) {
+                                        if ( data[ index ] &amp;&amp; data[ index ].stop &amp;&amp; rrun.test( index ) ) {
+                                                stopQueue( data[ index ] );
+                                        }
+                                }
+                        }
+
+                        for ( index = timers.length; index--; ) {
+                                if ( timers[ index ].elem === this &amp;&amp; (type == null || timers[ index ].queue === type) ) {
+                                        timers[ index ].anim.stop( gotoEnd );
+                                        dequeue = false;
+                                        timers.splice( index, 1 );
+                                }
+                        }
+
+                        // start the next in the queue if the last step wasn't forced
+                        // timers currently will call their complete callbacks, which will dequeue
+                        // but only if they were gotoEnd
+                        if ( dequeue || !gotoEnd ) {
+                                jQuery.dequeue( this, type );
+                        }
+                });
+        }
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+        var which,
+                attrs = { height: type },
+                i = 0;
+
+        // if we include width, step value is 1 to do all cssExpand values,
+        // if we don't include width, step value is 2 to skip over Left and Right
+        includeWidth = includeWidth? 1 : 0;
+        for( ; i &lt; 4 ; i += 2 - includeWidth ) {
+                which = cssExpand[ i ];
+                attrs[ &quot;margin&quot; + which ] = attrs[ &quot;padding&quot; + which ] = type;
+        }
+
+        if ( includeWidth ) {
+                attrs.opacity = attrs.width = type;
+        }
+
+        return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+        slideDown: genFx(&quot;show&quot;),
+        slideUp: genFx(&quot;hide&quot;),
+        slideToggle: genFx(&quot;toggle&quot;),
+        fadeIn: { opacity: &quot;show&quot; },
+        fadeOut: { opacity: &quot;hide&quot; },
+        fadeToggle: { opacity: &quot;toggle&quot; }
+}, function( name, props ) {
+        jQuery.fn[ name ] = function( speed, easing, callback ) {
+                return this.animate( props, speed, easing, callback );
+        };
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+        var opt = speed &amp;&amp; typeof speed === &quot;object&quot; ? jQuery.extend( {}, speed ) : {
+                complete: fn || !fn &amp;&amp; easing ||
+                        jQuery.isFunction( speed ) &amp;&amp; speed,
+                duration: speed,
+                easing: fn &amp;&amp; easing || easing &amp;&amp; !jQuery.isFunction( easing ) &amp;&amp; easing
+        };
+
+        opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === &quot;number&quot; ? opt.duration :
+                opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+        // normalize opt.queue - true/undefined/null -&gt; &quot;fx&quot;
+        if ( opt.queue == null || opt.queue === true ) {
+                opt.queue = &quot;fx&quot;;
+        }
+
+        // Queueing
+        opt.old = opt.complete;
+
+        opt.complete = function() {
+                if ( jQuery.isFunction( opt.old ) ) {
+                        opt.old.call( this );
+                }
+
+                if ( opt.queue ) {
+                        jQuery.dequeue( this, opt.queue );
+                }
+        };
+
+        return opt;
+};
+
+jQuery.easing = {
+        linear: function( p ) {
+                return p;
+        },
+        swing: function( p ) {
+                return 0.5 - Math.cos( p*Math.PI ) / 2;
+        }
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+        var timer,
+                timers = jQuery.timers,
+                i = 0;
+
+        fxNow = jQuery.now();
+
+        for ( ; i &lt; timers.length; i++ ) {
+                timer = timers[ i ];
+                // Checks the timer has not already been removed
+                if ( !timer() &amp;&amp; timers[ i ] === timer ) {
+                        timers.splice( i--, 1 );
+                }
+        }
+
+        if ( !timers.length ) {
+                jQuery.fx.stop();
+        }
+        fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+        if ( timer() &amp;&amp; jQuery.timers.push( timer ) &amp;&amp; !timerId ) {
+                timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+        }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.stop = function() {
+        clearInterval( timerId );
+        timerId = null;
+};
+
+jQuery.fx.speeds = {
+        slow: 600,
+        fast: 200,
+        // Default speed
+        _default: 400
+};
+
+// Back Compat &lt;1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr &amp;&amp; jQuery.expr.filters ) {
+        jQuery.expr.filters.animated = function( elem ) {
+                return jQuery.grep(jQuery.timers, function( fn ) {
+                        return elem === fn.elem;
+                }).length;
+        };
+}
+var rroot = /^(?:body|html)$/i;
+
+jQuery.fn.offset = function( options ) {
+        if ( arguments.length ) {
+                return options === undefined ?
+                        this :
+                        this.each(function( i ) {
+                                jQuery.offset.setOffset( this, options, i );
+                        });
+        }
+
+        var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft,
+                box = { top: 0, left: 0 },
+                elem = this[ 0 ],
+                doc = elem &amp;&amp; elem.ownerDocument;
+
+        if ( !doc ) {
+                return;
+        }
+
+        if ( (body = doc.body) === elem ) {
+                return jQuery.offset.bodyOffset( elem );
+        }
+
+        docElem = doc.documentElement;
+
+        // Make sure it's not a disconnected DOM node
+        if ( !jQuery.contains( docElem, elem ) ) {
+                return box;
+        }
+
+        // If we don't have gBCR, just use 0,0 rather than error
+        // BlackBerry 5, iOS 3 (original iPhone)
+        if ( typeof elem.getBoundingClientRect !== &quot;undefined&quot; ) {
+                box = elem.getBoundingClientRect();
+        }
+        win = getWindow( doc );
+        clientTop  = docElem.clientTop  || body.clientTop  || 0;
+        clientLeft = docElem.clientLeft || body.clientLeft || 0;
+        scrollTop  = win.pageYOffset || docElem.scrollTop;
+        scrollLeft = win.pageXOffset || docElem.scrollLeft;
+        return {
+                top: box.top  + scrollTop  - clientTop,
+                left: box.left + scrollLeft - clientLeft
+        };
+};
+
+jQuery.offset = {
+
+        bodyOffset: function( body ) {
+                var top = body.offsetTop,
+                        left = body.offsetLeft;
+
+                if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
+                        top  += parseFloat( jQuery.css(body, &quot;marginTop&quot;) ) || 0;
+                        left += parseFloat( jQuery.css(body, &quot;marginLeft&quot;) ) || 0;
+                }
+
+                return { top: top, left: left };
+        },
+
+        setOffset: function( elem, options, i ) {
+                var position = jQuery.css( elem, &quot;position&quot; );
+
+                // set position first, in-case top/left are set even on static elem
+                if ( position === &quot;static&quot; ) {
+                        elem.style.position = &quot;relative&quot;;
+                }
+
+                var curElem = jQuery( elem ),
+                        curOffset = curElem.offset(),
+                        curCSSTop = jQuery.css( elem, &quot;top&quot; ),
+                        curCSSLeft = jQuery.css( elem, &quot;left&quot; ),
+                        calculatePosition = ( position === &quot;absolute&quot; || position === &quot;fixed&quot; ) &amp;&amp; jQuery.inArray(&quot;auto&quot;, [curCSSTop, curCSSLeft]) &gt; -1,
+                        props = {}, curPosition = {}, curTop, curLeft;
+
+                // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+                if ( calculatePosition ) {
+                        curPosition = curElem.position();
+                        curTop = curPosition.top;
+                        curLeft = curPosition.left;
+                } else {
+                        curTop = parseFloat( curCSSTop ) || 0;
+                        curLeft = parseFloat( curCSSLeft ) || 0;
+                }
+
+                if ( jQuery.isFunction( options ) ) {
+                        options = options.call( elem, i, curOffset );
+                }
+
+                if ( options.top != null ) {
+                        props.top = ( options.top - curOffset.top ) + curTop;
+                }
+                if ( options.left != null ) {
+                        props.left = ( options.left - curOffset.left ) + curLeft;
+                }
+
+                if ( &quot;using&quot; in options ) {
+                        options.using.call( elem, props );
+                } else {
+                        curElem.css( props );
+                }
+        }
+};
+
+
+jQuery.fn.extend({
+
+        position: function() {
+                if ( !this[0] ) {
+                        return;
+                }
+
+                var elem = this[0],
+
+                // Get *real* offsetParent
+                offsetParent = this.offsetParent(),
+
+                // Get correct offsets
+                offset       = this.offset(),
+                parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+                // Subtract element margins
+                // note: when an element has margin: auto the offsetLeft and marginLeft
+                // are the same in Safari causing offset.left to incorrectly be 0
+                offset.top  -= parseFloat( jQuery.css(elem, &quot;marginTop&quot;) ) || 0;
+                offset.left -= parseFloat( jQuery.css(elem, &quot;marginLeft&quot;) ) || 0;
+
+                // Add offsetParent borders
+                parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], &quot;borderTopWidth&quot;) ) || 0;
+                parentOffset.left += parseFloat( jQuery.css(offsetParent[0], &quot;borderLeftWidth&quot;) ) || 0;
+
+                // Subtract the two offsets
+                return {
+                        top:  offset.top  - parentOffset.top,
+                        left: offset.left - parentOffset.left
+                };
+        },
+
+        offsetParent: function() {
+                return this.map(function() {
+                        var offsetParent = this.offsetParent || document.body;
+                        while ( offsetParent &amp;&amp; (!rroot.test(offsetParent.nodeName) &amp;&amp; jQuery.css(offsetParent, &quot;position&quot;) === &quot;static&quot;) ) {
+                                offsetParent = offsetParent.offsetParent;
+                        }
+                        return offsetParent || document.body;
+                });
+        }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: &quot;pageXOffset&quot;, scrollTop: &quot;pageYOffset&quot;}, function( method, prop ) {
+        var top = /Y/.test( prop );
+
+        jQuery.fn[ method ] = function( val ) {
+                return jQuery.access( this, function( elem, method, val ) {
+                        var win = getWindow( elem );
+
+                        if ( val === undefined ) {
+                                return win ? (prop in win) ? win[ prop ] :
+                                        win.document.documentElement[ method ] :
+                                        elem[ method ];
+                        }
+
+                        if ( win ) {
+                                win.scrollTo(
+                                        !top ? val : jQuery( win ).scrollLeft(),
+                                         top ? val : jQuery( win ).scrollTop()
+                                );
+
+                        } else {
+                                elem[ method ] = val;
+                        }
+                }, method, val, arguments.length, null );
+        };
+});
+
+function getWindow( elem ) {
+        return jQuery.isWindow( elem ) ?
+                elem :
+                elem.nodeType === 9 ?
+                        elem.defaultView || elem.parentWindow :
+                        false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: &quot;height&quot;, Width: &quot;width&quot; }, function( name, type ) {
+        jQuery.each( { padding: &quot;inner&quot; + name, content: type, &quot;&quot;: &quot;outer&quot; + name }, function( defaultExtra, funcName ) {
+                // margin is only for outerHeight, outerWidth
+                jQuery.fn[ funcName ] = function( margin, value ) {
+                        var chainable = arguments.length &amp;&amp; ( defaultExtra || typeof margin !== &quot;boolean&quot; ),
+                                extra = defaultExtra || ( margin === true || value === true ? &quot;margin&quot; : &quot;border&quot; );
+
+                        return jQuery.access( this, function( elem, type, value ) {
+                                var doc;
+
+                                if ( jQuery.isWindow( elem ) ) {
+                                        // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+                                        // isn't a whole lot we can do. See pull request at this URL for discussion:
+                                        // https://github.com/jquery/jquery/pull/764
+                                        return elem.document.documentElement[ &quot;client&quot; + name ];
+                                }
+
+                                // Get document width or height
+                                if ( elem.nodeType === 9 ) {
+                                        doc = elem.documentElement;
+
+                                        // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+                                        // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+                                        return Math.max(
+                                                elem.body[ &quot;scroll&quot; + name ], doc[ &quot;scroll&quot; + name ],
+                                                elem.body[ &quot;offset&quot; + name ], doc[ &quot;offset&quot; + name ],
+                                                doc[ &quot;client&quot; + name ]
+                                        );
+                                }
+
+                                return value === undefined ?
+                                        // Get width or height on the element, requesting but not forcing parseFloat
+                                        jQuery.css( elem, type, value, extra ) :
+
+                                        // Set width or height on the element
+                                        jQuery.style( elem, type, value, extra );
+                        }, type, chainable ? margin : undefined, chainable, null );
+                };
+        });
+});
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === &quot;function&quot; &amp;&amp; define.amd &amp;&amp; define.amd.jQuery ) {
+        define( &quot;jquery&quot;, [], function () { return jQuery; } );
+}
+
+})( window );
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsrequirejsrequirejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,2054 @@
</span><ins>+/** vim: et:ts=4:sw=4:sts=4
+ * @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/requirejs for details
+ */
+//Not using strict: uneven strict support in browsers, #392, and causes
+//problems with requirejs.exec()/transpiler plugins that may not be strict.
+/*jslint regexp: true, nomen: true, sloppy: true */
+/*global window, navigator, document, importScripts, setTimeout, opera */
+
+var requirejs, require, define;
+(function (global) {
+    var req, s, head, baseElement, dataMain, src,
+        interactiveScript, currentlyAddingScript, mainScript, subPath,
+        version = '2.1.9',
+        commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
+        cjsRequireRegExp = /[^.]\s*require\s*\(\s*[&quot;']([^'&quot;\s]+)[&quot;']\s*\)/g,
+        jsSuffixRegExp = /\.js$/,
+        currDirRegExp = /^\.\//,
+        op = Object.prototype,
+        ostring = op.toString,
+        hasOwn = op.hasOwnProperty,
+        ap = Array.prototype,
+        apsp = ap.splice,
+        isBrowser = !!(typeof window !== 'undefined' &amp;&amp; typeof navigator !== 'undefined' &amp;&amp; window.document),
+        isWebWorker = !isBrowser &amp;&amp; typeof importScripts !== 'undefined',
+        //PS3 indicates loaded and complete, but need to wait for complete
+        //specifically. Sequence is 'loading', 'loaded', execution,
+        // then 'complete'. The UA check is unfortunate, but not sure how
+        //to feature test w/o causing perf issues.
+        readyRegExp = isBrowser &amp;&amp; navigator.platform === 'PLAYSTATION 3' ?
+                      /^complete$/ : /^(complete|loaded)$/,
+        defContextName = '_',
+        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
+        isOpera = typeof opera !== 'undefined' &amp;&amp; opera.toString() === '[object Opera]',
+        contexts = {},
+        cfg = {},
+        globalDefQueue = [],
+        useInteractive = false;
+
+    function isFunction(it) {
+        return ostring.call(it) === '[object Function]';
+    }
+
+    function isArray(it) {
+        return ostring.call(it) === '[object Array]';
+    }
+
+    /**
+     * Helper function for iterating over an array. If the func returns
+     * a true value, it will break out of the loop.
+     */
+    function each(ary, func) {
+        if (ary) {
+            var i;
+            for (i = 0; i &lt; ary.length; i += 1) {
+                if (ary[i] &amp;&amp; func(ary[i], i, ary)) {
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * Helper function for iterating over an array backwards. If the func
+     * returns a true value, it will break out of the loop.
+     */
+    function eachReverse(ary, func) {
+        if (ary) {
+            var i;
+            for (i = ary.length - 1; i &gt; -1; i -= 1) {
+                if (ary[i] &amp;&amp; func(ary[i], i, ary)) {
+                    break;
+                }
+            }
+        }
+    }
+
+    function hasProp(obj, prop) {
+        return hasOwn.call(obj, prop);
+    }
+
+    function getOwn(obj, prop) {
+        return hasProp(obj, prop) &amp;&amp; obj[prop];
+    }
+
+    /**
+     * Cycles over properties in an object and calls a function for each
+     * property value. If the function returns a truthy value, then the
+     * iteration is stopped.
+     */
+    function eachProp(obj, func) {
+        var prop;
+        for (prop in obj) {
+            if (hasProp(obj, prop)) {
+                if (func(obj[prop], prop)) {
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * Simple function to mix in properties from source into target,
+     * but only if target does not already have a property of the same name.
+     */
+    function mixin(target, source, force, deepStringMixin) {
+        if (source) {
+            eachProp(source, function (value, prop) {
+                if (force || !hasProp(target, prop)) {
+                    if (deepStringMixin &amp;&amp; typeof value !== 'string') {
+                        if (!target[prop]) {
+                            target[prop] = {};
+                        }
+                        mixin(target[prop], value, force, deepStringMixin);
+                    } else {
+                        target[prop] = value;
+                    }
+                }
+            });
+        }
+        return target;
+    }
+
+    //Similar to Function.prototype.bind, but the 'this' object is specified
+    //first, since it is easier to read/figure out what 'this' will be.
+    function bind(obj, fn) {
+        return function () {
+            return fn.apply(obj, arguments);
+        };
+    }
+
+    function scripts() {
+        return document.getElementsByTagName('script');
+    }
+
+    function defaultOnError(err) {
+        throw err;
+    }
+
+    //Allow getting a global that expressed in
+    //dot notation, like 'a.b.c'.
+    function getGlobal(value) {
+        if (!value) {
+            return value;
+        }
+        var g = global;
+        each(value.split('.'), function (part) {
+            g = g[part];
+        });
+        return g;
+    }
+
+    /**
+     * Constructs an error with a pointer to an URL with more information.
+     * @param {String} id the error ID that maps to an ID on a web page.
+     * @param {String} message human readable error.
+     * @param {Error} [err] the original error, if there is one.
+     *
+     * @returns {Error}
+     */
+    function makeError(id, msg, err, requireModules) {
+        var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
+        e.requireType = id;
+        e.requireModules = requireModules;
+        if (err) {
+            e.originalError = err;
+        }
+        return e;
+    }
+
+    if (typeof define !== 'undefined') {
+        //If a define is already in play via another AMD loader,
+        //do not overwrite.
+        return;
+    }
+
+    if (typeof requirejs !== 'undefined') {
+        if (isFunction(requirejs)) {
+            //Do not overwrite and existing requirejs instance.
+            return;
+        }
+        cfg = requirejs;
+        requirejs = undefined;
+    }
+
+    //Allow for a require config object
+    if (typeof require !== 'undefined' &amp;&amp; !isFunction(require)) {
+        //assume it is a config object.
+        cfg = require;
+        require = undefined;
+    }
+
+    function newContext(contextName) {
+        var inCheckLoaded, Module, context, handlers,
+            checkLoadedTimeoutId,
+            config = {
+                //Defaults. Do not set a default for map
+                //config to speed up normalize(), which
+                //will run faster if there is no default.
+                waitSeconds: 7,
+                baseUrl: './',
+                paths: {},
+                pkgs: {},
+                shim: {},
+                config: {}
+            },
+            registry = {},
+            //registry of just enabled modules, to speed
+            //cycle breaking code when lots of modules
+            //are registered, but not activated.
+            enabledRegistry = {},
+            undefEvents = {},
+            defQueue = [],
+            defined = {},
+            urlFetched = {},
+            requireCounter = 1,
+            unnormalizedCounter = 1;
+
+        /**
+         * Trims the . and .. from an array of path segments.
+         * It will keep a leading path segment if a .. will become
+         * the first path segment, to help with module name lookups,
+         * which act like paths, but can be remapped. But the end result,
+         * all paths that use this function should look normalized.
+         * NOTE: this method MODIFIES the input array.
+         * @param {Array} ary the array of path segments.
+         */
+        function trimDots(ary) {
+            var i, part;
+            for (i = 0; ary[i]; i += 1) {
+                part = ary[i];
+                if (part === '.') {
+                    ary.splice(i, 1);
+                    i -= 1;
+                } else if (part === '..') {
+                    if (i === 1 &amp;&amp; (ary[2] === '..' || ary[0] === '..')) {
+                        //End of the line. Keep at least one non-dot
+                        //path segment at the front so it can be mapped
+                        //correctly to disk. Otherwise, there is likely
+                        //no path mapping for a path starting with '..'.
+                        //This can still fail, but catches the most reasonable
+                        //uses of ..
+                        break;
+                    } else if (i &gt; 0) {
+                        ary.splice(i - 1, 2);
+                        i -= 2;
+                    }
+                }
+            }
+        }
+
+        /**
+         * Given a relative module name, like ./something, normalize it to
+         * a real name that can be mapped to a path.
+         * @param {String} name the relative name
+         * @param {String} baseName a real name that the name arg is relative
+         * to.
+         * @param {Boolean} applyMap apply the map config to the value. Should
+         * only be done if this normalization is for a dependency ID.
+         * @returns {String} normalized name
+         */
+        function normalize(name, baseName, applyMap) {
+            var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
+                foundMap, foundI, foundStarMap, starI,
+                baseParts = baseName &amp;&amp; baseName.split('/'),
+                normalizedBaseParts = baseParts,
+                map = config.map,
+                starMap = map &amp;&amp; map['*'];
+
+            //Adjust any relative paths.
+            if (name &amp;&amp; name.charAt(0) === '.') {
+                //If have a base name, try to normalize against it,
+                //otherwise, assume it is a top-level require that will
+                //be relative to baseUrl in the end.
+                if (baseName) {
+                    if (getOwn(config.pkgs, baseName)) {
+                        //If the baseName is a package name, then just treat it as one
+                        //name to concat the name with.
+                        normalizedBaseParts = baseParts = [baseName];
+                    } else {
+                        //Convert baseName to array, and lop off the last part,
+                        //so that . matches that 'directory' and not name of the baseName's
+                        //module. For instance, baseName of 'one/two/three', maps to
+                        //'one/two/three.js', but we want the directory, 'one/two' for
+                        //this normalization.
+                        normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+                    }
+
+                    name = normalizedBaseParts.concat(name.split('/'));
+                    trimDots(name);
+
+                    //Some use of packages may use a . path to reference the
+                    //'main' module name, so normalize for that.
+                    pkgConfig = getOwn(config.pkgs, (pkgName = name[0]));
+                    name = name.join('/');
+                    if (pkgConfig &amp;&amp; name === pkgName + '/' + pkgConfig.main) {
+                        name = pkgName;
+                    }
+                } else if (name.indexOf('./') === 0) {
+                    // No baseName, so this is ID is resolved relative
+                    // to baseUrl, pull off the leading dot.
+                    name = name.substring(2);
+                }
+            }
+
+            //Apply map config if available.
+            if (applyMap &amp;&amp; map &amp;&amp; (baseParts || starMap)) {
+                nameParts = name.split('/');
+
+                for (i = nameParts.length; i &gt; 0; i -= 1) {
+                    nameSegment = nameParts.slice(0, i).join('/');
+
+                    if (baseParts) {
+                        //Find the longest baseName segment match in the config.
+                        //So, do joins on the biggest to smallest lengths of baseParts.
+                        for (j = baseParts.length; j &gt; 0; j -= 1) {
+                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));
+
+                            //baseName segment has config, find if it has one for
+                            //this name.
+                            if (mapValue) {
+                                mapValue = getOwn(mapValue, nameSegment);
+                                if (mapValue) {
+                                    //Match, update name to the new value.
+                                    foundMap = mapValue;
+                                    foundI = i;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+
+                    if (foundMap) {
+                        break;
+                    }
+
+                    //Check for a star map match, but just hold on to it,
+                    //if there is a shorter segment match later in a matching
+                    //config, then favor over this star map.
+                    if (!foundStarMap &amp;&amp; starMap &amp;&amp; getOwn(starMap, nameSegment)) {
+                        foundStarMap = getOwn(starMap, nameSegment);
+                        starI = i;
+                    }
+                }
+
+                if (!foundMap &amp;&amp; foundStarMap) {
+                    foundMap = foundStarMap;
+                    foundI = starI;
+                }
+
+                if (foundMap) {
+                    nameParts.splice(0, foundI, foundMap);
+                    name = nameParts.join('/');
+                }
+            }
+
+            return name;
+        }
+
+        function removeScript(name) {
+            if (isBrowser) {
+                each(scripts(), function (scriptNode) {
+                    if (scriptNode.getAttribute('data-requiremodule') === name &amp;&amp;
+                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {
+                        scriptNode.parentNode.removeChild(scriptNode);
+                        return true;
+                    }
+                });
+            }
+        }
+
+        function hasPathFallback(id) {
+            var pathConfig = getOwn(config.paths, id);
+            if (pathConfig &amp;&amp; isArray(pathConfig) &amp;&amp; pathConfig.length &gt; 1) {
+                //Pop off the first array value, since it failed, and
+                //retry
+                pathConfig.shift();
+                context.require.undef(id);
+                context.require([id]);
+                return true;
+            }
+        }
+
+        //Turns a plugin!resource to [plugin, resource]
+        //with the plugin being undefined if the name
+        //did not have a plugin prefix.
+        function splitPrefix(name) {
+            var prefix,
+                index = name ? name.indexOf('!') : -1;
+            if (index &gt; -1) {
+                prefix = name.substring(0, index);
+                name = name.substring(index + 1, name.length);
+            }
+            return [prefix, name];
+        }
+
+        /**
+         * Creates a module mapping that includes plugin prefix, module
+         * name, and path. If parentModuleMap is provided it will
+         * also normalize the name via require.normalize()
+         *
+         * @param {String} name the module name
+         * @param {String} [parentModuleMap] parent module map
+         * for the module name, used to resolve relative names.
+         * @param {Boolean} isNormalized: is the ID already normalized.
+         * This is true if this call is done for a define() module ID.
+         * @param {Boolean} applyMap: apply the map config to the ID.
+         * Should only be true if this map is for a dependency.
+         *
+         * @returns {Object}
+         */
+        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
+            var url, pluginModule, suffix, nameParts,
+                prefix = null,
+                parentName = parentModuleMap ? parentModuleMap.name : null,
+                originalName = name,
+                isDefine = true,
+                normalizedName = '';
+
+            //If no name, then it means it is a require call, generate an
+            //internal name.
+            if (!name) {
+                isDefine = false;
+                name = '_@r' + (requireCounter += 1);
+            }
+
+            nameParts = splitPrefix(name);
+            prefix = nameParts[0];
+            name = nameParts[1];
+
+            if (prefix) {
+                prefix = normalize(prefix, parentName, applyMap);
+                pluginModule = getOwn(defined, prefix);
+            }
+
+            //Account for relative paths if there is a base name.
+            if (name) {
+                if (prefix) {
+                    if (pluginModule &amp;&amp; pluginModule.normalize) {
+                        //Plugin is loaded, use its normalize method.
+                        normalizedName = pluginModule.normalize(name, function (name) {
+                            return normalize(name, parentName, applyMap);
+                        });
+                    } else {
+                        normalizedName = normalize(name, parentName, applyMap);
+                    }
+                } else {
+                    //A regular module.
+                    normalizedName = normalize(name, parentName, applyMap);
+
+                    //Normalized name may be a plugin ID due to map config
+                    //application in normalize. The map config values must
+                    //already be normalized, so do not need to redo that part.
+                    nameParts = splitPrefix(normalizedName);
+                    prefix = nameParts[0];
+                    normalizedName = nameParts[1];
+                    isNormalized = true;
+
+                    url = context.nameToUrl(normalizedName);
+                }
+            }
+
+            //If the id is a plugin id that cannot be determined if it needs
+            //normalization, stamp it with a unique ID so two matching relative
+            //ids that may conflict can be separate.
+            suffix = prefix &amp;&amp; !pluginModule &amp;&amp; !isNormalized ?
+                     '_unnormalized' + (unnormalizedCounter += 1) :
+                     '';
+
+            return {
+                prefix: prefix,
+                name: normalizedName,
+                parentMap: parentModuleMap,
+                unnormalized: !!suffix,
+                url: url,
+                originalName: originalName,
+                isDefine: isDefine,
+                id: (prefix ?
+                        prefix + '!' + normalizedName :
+                        normalizedName) + suffix
+            };
+        }
+
+        function getModule(depMap) {
+            var id = depMap.id,
+                mod = getOwn(registry, id);
+
+            if (!mod) {
+                mod = registry[id] = new context.Module(depMap);
+            }
+
+            return mod;
+        }
+
+        function on(depMap, name, fn) {
+            var id = depMap.id,
+                mod = getOwn(registry, id);
+
+            if (hasProp(defined, id) &amp;&amp;
+                    (!mod || mod.defineEmitComplete)) {
+                if (name === 'defined') {
+                    fn(defined[id]);
+                }
+            } else {
+                mod = getModule(depMap);
+                if (mod.error &amp;&amp; name === 'error') {
+                    fn(mod.error);
+                } else {
+                    mod.on(name, fn);
+                }
+            }
+        }
+
+        function onError(err, errback) {
+            var ids = err.requireModules,
+                notified = false;
+
+            if (errback) {
+                errback(err);
+            } else {
+                each(ids, function (id) {
+                    var mod = getOwn(registry, id);
+                    if (mod) {
+                        //Set error on module, so it skips timeout checks.
+                        mod.error = err;
+                        if (mod.events.error) {
+                            notified = true;
+                            mod.emit('error', err);
+                        }
+                    }
+                });
+
+                if (!notified) {
+                    req.onError(err);
+                }
+            }
+        }
+
+        /**
+         * Internal method to transfer globalQueue items to this context's
+         * defQueue.
+         */
+        function takeGlobalQueue() {
+            //Push all the globalDefQueue items into the context's defQueue
+            if (globalDefQueue.length) {
+                //Array splice in the values since the context code has a
+                //local var ref to defQueue, so cannot just reassign the one
+                //on context.
+                apsp.apply(defQueue,
+                           [defQueue.length - 1, 0].concat(globalDefQueue));
+                globalDefQueue = [];
+            }
+        }
+
+        handlers = {
+            'require': function (mod) {
+                if (mod.require) {
+                    return mod.require;
+                } else {
+                    return (mod.require = context.makeRequire(mod.map));
+                }
+            },
+            'exports': function (mod) {
+                mod.usingExports = true;
+                if (mod.map.isDefine) {
+                    if (mod.exports) {
+                        return mod.exports;
+                    } else {
+                        return (mod.exports = defined[mod.map.id] = {});
+                    }
+                }
+            },
+            'module': function (mod) {
+                if (mod.module) {
+                    return mod.module;
+                } else {
+                    return (mod.module = {
+                        id: mod.map.id,
+                        uri: mod.map.url,
+                        config: function () {
+                            var c,
+                                pkg = getOwn(config.pkgs, mod.map.id);
+                            // For packages, only support config targeted
+                            // at the main module.
+                            c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) :
+                                      getOwn(config.config, mod.map.id);
+                            return  c || {};
+                        },
+                        exports: defined[mod.map.id]
+                    });
+                }
+            }
+        };
+
+        function cleanRegistry(id) {
+            //Clean up machinery used for waiting modules.
+            delete registry[id];
+            delete enabledRegistry[id];
+        }
+
+        function breakCycle(mod, traced, processed) {
+            var id = mod.map.id;
+
+            if (mod.error) {
+                mod.emit('error', mod.error);
+            } else {
+                traced[id] = true;
+                each(mod.depMaps, function (depMap, i) {
+                    var depId = depMap.id,
+                        dep = getOwn(registry, depId);
+
+                    //Only force things that have not completed
+                    //being defined, so still in the registry,
+                    //and only if it has not been matched up
+                    //in the module already.
+                    if (dep &amp;&amp; !mod.depMatched[i] &amp;&amp; !processed[depId]) {
+                        if (getOwn(traced, depId)) {
+                            mod.defineDep(i, defined[depId]);
+                            mod.check(); //pass false?
+                        } else {
+                            breakCycle(dep, traced, processed);
+                        }
+                    }
+                });
+                processed[id] = true;
+            }
+        }
+
+        function checkLoaded() {
+            var map, modId, err, usingPathFallback,
+                waitInterval = config.waitSeconds * 1000,
+                //It is possible to disable the wait interval by using waitSeconds of 0.
+                expired = waitInterval &amp;&amp; (context.startTime + waitInterval) &lt; new Date().getTime(),
+                noLoads = [],
+                reqCalls = [],
+                stillLoading = false,
+                needCycleCheck = true;
+
+            //Do not bother if this call was a result of a cycle break.
+            if (inCheckLoaded) {
+                return;
+            }
+
+            inCheckLoaded = true;
+
+            //Figure out the state of all the modules.
+            eachProp(enabledRegistry, function (mod) {
+                map = mod.map;
+                modId = map.id;
+
+                //Skip things that are not enabled or in error state.
+                if (!mod.enabled) {
+                    return;
+                }
+
+                if (!map.isDefine) {
+                    reqCalls.push(mod);
+                }
+
+                if (!mod.error) {
+                    //If the module should be executed, and it has not
+                    //been inited and time is up, remember it.
+                    if (!mod.inited &amp;&amp; expired) {
+                        if (hasPathFallback(modId)) {
+                            usingPathFallback = true;
+                            stillLoading = true;
+                        } else {
+                            noLoads.push(modId);
+                            removeScript(modId);
+                        }
+                    } else if (!mod.inited &amp;&amp; mod.fetched &amp;&amp; map.isDefine) {
+                        stillLoading = true;
+                        if (!map.prefix) {
+                            //No reason to keep looking for unfinished
+                            //loading. If the only stillLoading is a
+                            //plugin resource though, keep going,
+                            //because it may be that a plugin resource
+                            //is waiting on a non-plugin cycle.
+                            return (needCycleCheck = false);
+                        }
+                    }
+                }
+            });
+
+            if (expired &amp;&amp; noLoads.length) {
+                //If wait time expired, throw error of unloaded modules.
+                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
+                err.contextName = context.contextName;
+                return onError(err);
+            }
+
+            //Not expired, check for a cycle.
+            if (needCycleCheck) {
+                each(reqCalls, function (mod) {
+                    breakCycle(mod, {}, {});
+                });
+            }
+
+            //If still waiting on loads, and the waiting load is something
+            //other than a plugin resource, or there are still outstanding
+            //scripts, then just try back later.
+            if ((!expired || usingPathFallback) &amp;&amp; stillLoading) {
+                //Something is still waiting to load. Wait for it, but only
+                //if a timeout is not already in effect.
+                if ((isBrowser || isWebWorker) &amp;&amp; !checkLoadedTimeoutId) {
+                    checkLoadedTimeoutId = setTimeout(function () {
+                        checkLoadedTimeoutId = 0;
+                        checkLoaded();
+                    }, 50);
+                }
+            }
+
+            inCheckLoaded = false;
+        }
+
+        Module = function (map) {
+            this.events = getOwn(undefEvents, map.id) || {};
+            this.map = map;
+            this.shim = getOwn(config.shim, map.id);
+            this.depExports = [];
+            this.depMaps = [];
+            this.depMatched = [];
+            this.pluginMaps = {};
+            this.depCount = 0;
+
+            /* this.exports this.factory
+               this.depMaps = [],
+               this.enabled, this.fetched
+            */
+        };
+
+        Module.prototype = {
+            init: function (depMaps, factory, errback, options) {
+                options = options || {};
+
+                //Do not do more inits if already done. Can happen if there
+                //are multiple define calls for the same module. That is not
+                //a normal, common case, but it is also not unexpected.
+                if (this.inited) {
+                    return;
+                }
+
+                this.factory = factory;
+
+                if (errback) {
+                    //Register for errors on this module.
+                    this.on('error', errback);
+                } else if (this.events.error) {
+                    //If no errback already, but there are error listeners
+                    //on this module, set up an errback to pass to the deps.
+                    errback = bind(this, function (err) {
+                        this.emit('error', err);
+                    });
+                }
+
+                //Do a copy of the dependency array, so that
+                //source inputs are not modified. For example
+                //&quot;shim&quot; deps are passed in here directly, and
+                //doing a direct modification of the depMaps array
+                //would affect that config.
+                this.depMaps = depMaps &amp;&amp; depMaps.slice(0);
+
+                this.errback = errback;
+
+                //Indicate this module has be initialized
+                this.inited = true;
+
+                this.ignore = options.ignore;
+
+                //Could have option to init this module in enabled mode,
+                //or could have been previously marked as enabled. However,
+                //the dependencies are not known until init is called. So
+                //if enabled previously, now trigger dependencies as enabled.
+                if (options.enabled || this.enabled) {
+                    //Enable this module and dependencies.
+                    //Will call this.check()
+                    this.enable();
+                } else {
+                    this.check();
+                }
+            },
+
+            defineDep: function (i, depExports) {
+                //Because of cycles, defined callback for a given
+                //export can be called more than once.
+                if (!this.depMatched[i]) {
+                    this.depMatched[i] = true;
+                    this.depCount -= 1;
+                    this.depExports[i] = depExports;
+                }
+            },
+
+            fetch: function () {
+                if (this.fetched) {
+                    return;
+                }
+                this.fetched = true;
+
+                context.startTime = (new Date()).getTime();
+
+                var map = this.map;
+
+                //If the manager is for a plugin managed resource,
+                //ask the plugin to load it now.
+                if (this.shim) {
+                    context.makeRequire(this.map, {
+                        enableBuildCallback: true
+                    })(this.shim.deps || [], bind(this, function () {
+                        return map.prefix ? this.callPlugin() : this.load();
+                    }));
+                } else {
+                    //Regular dependency.
+                    return map.prefix ? this.callPlugin() : this.load();
+                }
+            },
+
+            load: function () {
+                var url = this.map.url;
+
+                //Regular dependency.
+                if (!urlFetched[url]) {
+                    urlFetched[url] = true;
+                    context.load(this.map.id, url);
+                }
+            },
+
+            /**
+             * Checks if the module is ready to define itself, and if so,
+             * define it.
+             */
+            check: function () {
+                if (!this.enabled || this.enabling) {
+                    return;
+                }
+
+                var err, cjsModule,
+                    id = this.map.id,
+                    depExports = this.depExports,
+                    exports = this.exports,
+                    factory = this.factory;
+
+                if (!this.inited) {
+                    this.fetch();
+                } else if (this.error) {
+                    this.emit('error', this.error);
+                } else if (!this.defining) {
+                    //The factory could trigger another require call
+                    //that would result in checking this module to
+                    //define itself again. If already in the process
+                    //of doing that, skip this work.
+                    this.defining = true;
+
+                    if (this.depCount &lt; 1 &amp;&amp; !this.defined) {
+                        if (isFunction(factory)) {
+                            //If there is an error listener, favor passing
+                            //to that instead of throwing an error. However,
+                            //only do it for define()'d  modules. require
+                            //errbacks should not be called for failures in
+                            //their callbacks (#699). However if a global
+                            //onError is set, use that.
+                            if ((this.events.error &amp;&amp; this.map.isDefine) ||
+                                req.onError !== defaultOnError) {
+                                try {
+                                    exports = context.execCb(id, factory, depExports, exports);
+                                } catch (e) {
+                                    err = e;
+                                }
+                            } else {
+                                exports = context.execCb(id, factory, depExports, exports);
+                            }
+
+                            if (this.map.isDefine) {
+                                //If setting exports via 'module' is in play,
+                                //favor that over return value and exports. After that,
+                                //favor a non-undefined return value over exports use.
+                                cjsModule = this.module;
+                                if (cjsModule &amp;&amp;
+                                        cjsModule.exports !== undefined &amp;&amp;
+                                        //Make sure it is not already the exports value
+                                        cjsModule.exports !== this.exports) {
+                                    exports = cjsModule.exports;
+                                } else if (exports === undefined &amp;&amp; this.usingExports) {
+                                    //exports already set the defined value.
+                                    exports = this.exports;
+                                }
+                            }
+
+                            if (err) {
+                                err.requireMap = this.map;
+                                err.requireModules = this.map.isDefine ? [this.map.id] : null;
+                                err.requireType = this.map.isDefine ? 'define' : 'require';
+                                return onError((this.error = err));
+                            }
+
+                        } else {
+                            //Just a literal value
+                            exports = factory;
+                        }
+
+                        this.exports = exports;
+
+                        if (this.map.isDefine &amp;&amp; !this.ignore) {
+                            defined[id] = exports;
+
+                            if (req.onResourceLoad) {
+                                req.onResourceLoad(context, this.map, this.depMaps);
+                            }
+                        }
+
+                        //Clean up
+                        cleanRegistry(id);
+
+                        this.defined = true;
+                    }
+
+                    //Finished the define stage. Allow calling check again
+                    //to allow define notifications below in the case of a
+                    //cycle.
+                    this.defining = false;
+
+                    if (this.defined &amp;&amp; !this.defineEmitted) {
+                        this.defineEmitted = true;
+                        this.emit('defined', this.exports);
+                        this.defineEmitComplete = true;
+                    }
+
+                }
+            },
+
+            callPlugin: function () {
+                var map = this.map,
+                    id = map.id,
+                    //Map already normalized the prefix.
+                    pluginMap = makeModuleMap(map.prefix);
+
+                //Mark this as a dependency for this plugin, so it
+                //can be traced for cycles.
+                this.depMaps.push(pluginMap);
+
+                on(pluginMap, 'defined', bind(this, function (plugin) {
+                    var load, normalizedMap, normalizedMod,
+                        name = this.map.name,
+                        parentName = this.map.parentMap ? this.map.parentMap.name : null,
+                        localRequire = context.makeRequire(map.parentMap, {
+                            enableBuildCallback: true
+                        });
+
+                    //If current map is not normalized, wait for that
+                    //normalized name to load instead of continuing.
+                    if (this.map.unnormalized) {
+                        //Normalize the ID if the plugin allows it.
+                        if (plugin.normalize) {
+                            name = plugin.normalize(name, function (name) {
+                                return normalize(name, parentName, true);
+                            }) || '';
+                        }
+
+                        //prefix and name should already be normalized, no need
+                        //for applying map config again either.
+                        normalizedMap = makeModuleMap(map.prefix + '!' + name,
+                                                      this.map.parentMap);
+                        on(normalizedMap,
+                            'defined', bind(this, function (value) {
+                                this.init([], function () { return value; }, null, {
+                                    enabled: true,
+                                    ignore: true
+                                });
+                            }));
+
+                        normalizedMod = getOwn(registry, normalizedMap.id);
+                        if (normalizedMod) {
+                            //Mark this as a dependency for this plugin, so it
+                            //can be traced for cycles.
+                            this.depMaps.push(normalizedMap);
+
+                            if (this.events.error) {
+                                normalizedMod.on('error', bind(this, function (err) {
+                                    this.emit('error', err);
+                                }));
+                            }
+                            normalizedMod.enable();
+                        }
+
+                        return;
+                    }
+
+                    load = bind(this, function (value) {
+                        this.init([], function () { return value; }, null, {
+                            enabled: true
+                        });
+                    });
+
+                    load.error = bind(this, function (err) {
+                        this.inited = true;
+                        this.error = err;
+                        err.requireModules = [id];
+
+                        //Remove temp unnormalized modules for this module,
+                        //since they will never be resolved otherwise now.
+                        eachProp(registry, function (mod) {
+                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
+                                cleanRegistry(mod.map.id);
+                            }
+                        });
+
+                        onError(err);
+                    });
+
+                    //Allow plugins to load other code without having to know the
+                    //context or how to 'complete' the load.
+                    load.fromText = bind(this, function (text, textAlt) {
+                        /*jslint evil: true */
+                        var moduleName = map.name,
+                            moduleMap = makeModuleMap(moduleName),
+                            hasInteractive = useInteractive;
+
+                        //As of 2.1.0, support just passing the text, to reinforce
+                        //fromText only being called once per resource. Still
+                        //support old style of passing moduleName but discard
+                        //that moduleName in favor of the internal ref.
+                        if (textAlt) {
+                            text = textAlt;
+                        }
+
+                        //Turn off interactive script matching for IE for any define
+                        //calls in the text, then turn it back on at the end.
+                        if (hasInteractive) {
+                            useInteractive = false;
+                        }
+
+                        //Prime the system by creating a module instance for
+                        //it.
+                        getModule(moduleMap);
+
+                        //Transfer any config to this other module.
+                        if (hasProp(config.config, id)) {
+                            config.config[moduleName] = config.config[id];
+                        }
+
+                        try {
+                            req.exec(text);
+                        } catch (e) {
+                            return onError(makeError('fromtexteval',
+                                             'fromText eval for ' + id +
+                                            ' failed: ' + e,
+                                             e,
+                                             [id]));
+                        }
+
+                        if (hasInteractive) {
+                            useInteractive = true;
+                        }
+
+                        //Mark this as a dependency for the plugin
+                        //resource
+                        this.depMaps.push(moduleMap);
+
+                        //Support anonymous modules.
+                        context.completeLoad(moduleName);
+
+                        //Bind the value of that module to the value for this
+                        //resource ID.
+                        localRequire([moduleName], load);
+                    });
+
+                    //Use parentName here since the plugin's name is not reliable,
+                    //could be some weird string with no path that actually wants to
+                    //reference the parentName's path.
+                    plugin.load(map.name, localRequire, load, config);
+                }));
+
+                context.enable(pluginMap, this);
+                this.pluginMaps[pluginMap.id] = pluginMap;
+            },
+
+            enable: function () {
+                enabledRegistry[this.map.id] = this;
+                this.enabled = true;
+
+                //Set flag mentioning that the module is enabling,
+                //so that immediate calls to the defined callbacks
+                //for dependencies do not trigger inadvertent load
+                //with the depCount still being zero.
+                this.enabling = true;
+
+                //Enable each dependency
+                each(this.depMaps, bind(this, function (depMap, i) {
+                    var id, mod, handler;
+
+                    if (typeof depMap === 'string') {
+                        //Dependency needs to be converted to a depMap
+                        //and wired up to this module.
+                        depMap = makeModuleMap(depMap,
+                                               (this.map.isDefine ? this.map : this.map.parentMap),
+                                               false,
+                                               !this.skipMap);
+                        this.depMaps[i] = depMap;
+
+                        handler = getOwn(handlers, depMap.id);
+
+                        if (handler) {
+                            this.depExports[i] = handler(this);
+                            return;
+                        }
+
+                        this.depCount += 1;
+
+                        on(depMap, 'defined', bind(this, function (depExports) {
+                            this.defineDep(i, depExports);
+                            this.check();
+                        }));
+
+                        if (this.errback) {
+                            on(depMap, 'error', bind(this, this.errback));
+                        }
+                    }
+
+                    id = depMap.id;
+                    mod = registry[id];
+
+                    //Skip special modules like 'require', 'exports', 'module'
+                    //Also, don't call enable if it is already enabled,
+                    //important in circular dependency cases.
+                    if (!hasProp(handlers, id) &amp;&amp; mod &amp;&amp; !mod.enabled) {
+                        context.enable(depMap, this);
+                    }
+                }));
+
+                //Enable each plugin that is used in
+                //a dependency
+                eachProp(this.pluginMaps, bind(this, function (pluginMap) {
+                    var mod = getOwn(registry, pluginMap.id);
+                    if (mod &amp;&amp; !mod.enabled) {
+                        context.enable(pluginMap, this);
+                    }
+                }));
+
+                this.enabling = false;
+
+                this.check();
+            },
+
+            on: function (name, cb) {
+                var cbs = this.events[name];
+                if (!cbs) {
+                    cbs = this.events[name] = [];
+                }
+                cbs.push(cb);
+            },
+
+            emit: function (name, evt) {
+                each(this.events[name], function (cb) {
+                    cb(evt);
+                });
+                if (name === 'error') {
+                    //Now that the error handler was triggered, remove
+                    //the listeners, since this broken Module instance
+                    //can stay around for a while in the registry.
+                    delete this.events[name];
+                }
+            }
+        };
+
+        function callGetModule(args) {
+            //Skip modules already defined.
+            if (!hasProp(defined, args[0])) {
+                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
+            }
+        }
+
+        function removeListener(node, func, name, ieName) {
+            //Favor detachEvent because of IE9
+            //issue, see attachEvent/addEventListener comment elsewhere
+            //in this file.
+            if (node.detachEvent &amp;&amp; !isOpera) {
+                //Probably IE. If not it will throw an error, which will be
+                //useful to know.
+                if (ieName) {
+                    node.detachEvent(ieName, func);
+                }
+            } else {
+                node.removeEventListener(name, func, false);
+            }
+        }
+
+        /**
+         * Given an event from a script node, get the requirejs info from it,
+         * and then removes the event listeners on the node.
+         * @param {Event} evt
+         * @returns {Object}
+         */
+        function getScriptData(evt) {
+            //Using currentTarget instead of target for Firefox 2.0's sake. Not
+            //all old browsers will be supported, but this one was easy enough
+            //to support and still makes sense.
+            var node = evt.currentTarget || evt.srcElement;
+
+            //Remove the listeners once here.
+            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
+            removeListener(node, context.onScriptError, 'error');
+
+            return {
+                node: node,
+                id: node &amp;&amp; node.getAttribute('data-requiremodule')
+            };
+        }
+
+        function intakeDefines() {
+            var args;
+
+            //Any defined modules in the global queue, intake them now.
+            takeGlobalQueue();
+
+            //Make sure any remaining defQueue items get properly processed.
+            while (defQueue.length) {
+                args = defQueue.shift();
+                if (args[0] === null) {
+                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
+                } else {
+                    //args are id, deps, factory. Should be normalized by the
+                    //define() function.
+                    callGetModule(args);
+                }
+            }
+        }
+
+        context = {
+            config: config,
+            contextName: contextName,
+            registry: registry,
+            defined: defined,
+            urlFetched: urlFetched,
+            defQueue: defQueue,
+            Module: Module,
+            makeModuleMap: makeModuleMap,
+            nextTick: req.nextTick,
+            onError: onError,
+
+            /**
+             * Set a configuration for the context.
+             * @param {Object} cfg config object to integrate.
+             */
+            configure: function (cfg) {
+                //Make sure the baseUrl ends in a slash.
+                if (cfg.baseUrl) {
+                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
+                        cfg.baseUrl += '/';
+                    }
+                }
+
+                //Save off the paths and packages since they require special processing,
+                //they are additive.
+                var pkgs = config.pkgs,
+                    shim = config.shim,
+                    objs = {
+                        paths: true,
+                        config: true,
+                        map: true
+                    };
+
+                eachProp(cfg, function (value, prop) {
+                    if (objs[prop]) {
+                        if (prop === 'map') {
+                            if (!config.map) {
+                                config.map = {};
+                            }
+                            mixin(config[prop], value, true, true);
+                        } else {
+                            mixin(config[prop], value, true);
+                        }
+                    } else {
+                        config[prop] = value;
+                    }
+                });
+
+                //Merge shim
+                if (cfg.shim) {
+                    eachProp(cfg.shim, function (value, id) {
+                        //Normalize the structure
+                        if (isArray(value)) {
+                            value = {
+                                deps: value
+                            };
+                        }
+                        if ((value.exports || value.init) &amp;&amp; !value.exportsFn) {
+                            value.exportsFn = context.makeShimExports(value);
+                        }
+                        shim[id] = value;
+                    });
+                    config.shim = shim;
+                }
+
+                //Adjust packages if necessary.
+                if (cfg.packages) {
+                    each(cfg.packages, function (pkgObj) {
+                        var location;
+
+                        pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
+                        location = pkgObj.location;
+
+                        //Create a brand new object on pkgs, since currentPackages can
+                        //be passed in again, and config.pkgs is the internal transformed
+                        //state for all package configs.
+                        pkgs[pkgObj.name] = {
+                            name: pkgObj.name,
+                            location: location || pkgObj.name,
+                            //Remove leading dot in main, so main paths are normalized,
+                            //and remove any trailing .js, since different package
+                            //envs have different conventions: some use a module name,
+                            //some use a file name.
+                            main: (pkgObj.main || 'main')
+                                  .replace(currDirRegExp, '')
+                                  .replace(jsSuffixRegExp, '')
+                        };
+                    });
+
+                    //Done with modifications, assing packages back to context config
+                    config.pkgs = pkgs;
+                }
+
+                //If there are any &quot;waiting to execute&quot; modules in the registry,
+                //update the maps for them, since their info, like URLs to load,
+                //may have changed.
+                eachProp(registry, function (mod, id) {
+                    //If module already has init called, since it is too
+                    //late to modify them, and ignore unnormalized ones
+                    //since they are transient.
+                    if (!mod.inited &amp;&amp; !mod.map.unnormalized) {
+                        mod.map = makeModuleMap(id);
+                    }
+                });
+
+                //If a deps array or a config callback is specified, then call
+                //require with those args. This is useful when require is defined as a
+                //config object before require.js is loaded.
+                if (cfg.deps || cfg.callback) {
+                    context.require(cfg.deps || [], cfg.callback);
+                }
+            },
+
+            makeShimExports: function (value) {
+                function fn() {
+                    var ret;
+                    if (value.init) {
+                        ret = value.init.apply(global, arguments);
+                    }
+                    return ret || (value.exports &amp;&amp; getGlobal(value.exports));
+                }
+                return fn;
+            },
+
+            makeRequire: function (relMap, options) {
+                options = options || {};
+
+                function localRequire(deps, callback, errback) {
+                    var id, map, requireMod;
+
+                    if (options.enableBuildCallback &amp;&amp; callback &amp;&amp; isFunction(callback)) {
+                        callback.__requireJsBuild = true;
+                    }
+
+                    if (typeof deps === 'string') {
+                        if (isFunction(callback)) {
+                            //Invalid call
+                            return onError(makeError('requireargs', 'Invalid require call'), errback);
+                        }
+
+                        //If require|exports|module are requested, get the
+                        //value for them from the special handlers. Caveat:
+                        //this only works while module is being defined.
+                        if (relMap &amp;&amp; hasProp(handlers, deps)) {
+                            return handlers[deps](registry[relMap.id]);
+                        }
+
+                        //Synchronous access to one module. If require.get is
+                        //available (as in the Node adapter), prefer that.
+                        if (req.get) {
+                            return req.get(context, deps, relMap, localRequire);
+                        }
+
+                        //Normalize module name, if it contains . or ..
+                        map = makeModuleMap(deps, relMap, false, true);
+                        id = map.id;
+
+                        if (!hasProp(defined, id)) {
+                            return onError(makeError('notloaded', 'Module name &quot;' +
+                                        id +
+                                        '&quot; has not been loaded yet for context: ' +
+                                        contextName +
+                                        (relMap ? '' : '. Use require([])')));
+                        }
+                        return defined[id];
+                    }
+
+                    //Grab defines waiting in the global queue.
+                    intakeDefines();
+
+                    //Mark all the dependencies as needing to be loaded.
+                    context.nextTick(function () {
+                        //Some defines could have been added since the
+                        //require call, collect them.
+                        intakeDefines();
+
+                        requireMod = getModule(makeModuleMap(null, relMap));
+
+                        //Store if map config should be applied to this require
+                        //call for dependencies.
+                        requireMod.skipMap = options.skipMap;
+
+                        requireMod.init(deps, callback, errback, {
+                            enabled: true
+                        });
+
+                        checkLoaded();
+                    });
+
+                    return localRequire;
+                }
+
+                mixin(localRequire, {
+                    isBrowser: isBrowser,
+
+                    /**
+                     * Converts a module name + .extension into an URL path.
+                     * *Requires* the use of a module name. It does not support using
+                     * plain URLs like nameToUrl.
+                     */
+                    toUrl: function (moduleNamePlusExt) {
+                        var ext,
+                            index = moduleNamePlusExt.lastIndexOf('.'),
+                            segment = moduleNamePlusExt.split('/')[0],
+                            isRelative = segment === '.' || segment === '..';
+
+                        //Have a file extension alias, and it is not the
+                        //dots from a relative path.
+                        if (index !== -1 &amp;&amp; (!isRelative || index &gt; 1)) {
+                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
+                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
+                        }
+
+                        return context.nameToUrl(normalize(moduleNamePlusExt,
+                                                relMap &amp;&amp; relMap.id, true), ext,  true);
+                    },
+
+                    defined: function (id) {
+                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
+                    },
+
+                    specified: function (id) {
+                        id = makeModuleMap(id, relMap, false, true).id;
+                        return hasProp(defined, id) || hasProp(registry, id);
+                    }
+                });
+
+                //Only allow undef on top level require calls
+                if (!relMap) {
+                    localRequire.undef = function (id) {
+                        //Bind any waiting define() calls to this context,
+                        //fix for #408
+                        takeGlobalQueue();
+
+                        var map = makeModuleMap(id, relMap, true),
+                            mod = getOwn(registry, id);
+
+                        removeScript(id);
+
+                        delete defined[id];
+                        delete urlFetched[map.url];
+                        delete undefEvents[id];
+
+                        if (mod) {
+                            //Hold on to listeners in case the
+                            //module will be attempted to be reloaded
+                            //using a different config.
+                            if (mod.events.defined) {
+                                undefEvents[id] = mod.events;
+                            }
+
+                            cleanRegistry(id);
+                        }
+                    };
+                }
+
+                return localRequire;
+            },
+
+            /**
+             * Called to enable a module if it is still in the registry
+             * awaiting enablement. A second arg, parent, the parent module,
+             * is passed in for context, when this method is overriden by
+             * the optimizer. Not shown here to keep code compact.
+             */
+            enable: function (depMap) {
+                var mod = getOwn(registry, depMap.id);
+                if (mod) {
+                    getModule(depMap).enable();
+                }
+            },
+
+            /**
+             * Internal method used by environment adapters to complete a load event.
+             * A load event could be a script load or just a load pass from a synchronous
+             * load call.
+             * @param {String} moduleName the name of the module to potentially complete.
+             */
+            completeLoad: function (moduleName) {
+                var found, args, mod,
+                    shim = getOwn(config.shim, moduleName) || {},
+                    shExports = shim.exports;
+
+                takeGlobalQueue();
+
+                while (defQueue.length) {
+                    args = defQueue.shift();
+                    if (args[0] === null) {
+                        args[0] = moduleName;
+                        //If already found an anonymous module and bound it
+                        //to this name, then this is some other anon module
+                        //waiting for its completeLoad to fire.
+                        if (found) {
+                            break;
+                        }
+                        found = true;
+                    } else if (args[0] === moduleName) {
+                        //Found matching define call for this script!
+                        found = true;
+                    }
+
+                    callGetModule(args);
+                }
+
+                //Do this after the cycle of callGetModule in case the result
+                //of those calls/init calls changes the registry.
+                mod = getOwn(registry, moduleName);
+
+                if (!found &amp;&amp; !hasProp(defined, moduleName) &amp;&amp; mod &amp;&amp; !mod.inited) {
+                    if (config.enforceDefine &amp;&amp; (!shExports || !getGlobal(shExports))) {
+                        if (hasPathFallback(moduleName)) {
+                            return;
+                        } else {
+                            return onError(makeError('nodefine',
+                                             'No define call for ' + moduleName,
+                                             null,
+                                             [moduleName]));
+                        }
+                    } else {
+                        //A script that does not call define(), so just simulate
+                        //the call for it.
+                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
+                    }
+                }
+
+                checkLoaded();
+            },
+
+            /**
+             * Converts a module name to a file path. Supports cases where
+             * moduleName may actually be just an URL.
+             * Note that it **does not** call normalize on the moduleName,
+             * it is assumed to have already been normalized. This is an
+             * internal API, not a public one. Use toUrl for the public API.
+             */
+            nameToUrl: function (moduleName, ext, skipExt) {
+                var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
+                    parentPath;
+
+                //If a colon is in the URL, it indicates a protocol is used and it is just
+                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
+                //or ends with .js, then assume the user meant to use an url and not a module id.
+                //The slash is important for protocol-less URLs as well as full paths.
+                if (req.jsExtRegExp.test(moduleName)) {
+                    //Just a plain path, not module name lookup, so just return it.
+                    //Add extension if it is included. This is a bit wonky, only non-.js things pass
+                    //an extension, this method probably needs to be reworked.
+                    url = moduleName + (ext || '');
+                } else {
+                    //A module that needs to be converted to a path.
+                    paths = config.paths;
+                    pkgs = config.pkgs;
+
+                    syms = moduleName.split('/');
+                    //For each module name segment, see if there is a path
+                    //registered for it. Start with most specific name
+                    //and work up from it.
+                    for (i = syms.length; i &gt; 0; i -= 1) {
+                        parentModule = syms.slice(0, i).join('/');
+                        pkg = getOwn(pkgs, parentModule);
+                        parentPath = getOwn(paths, parentModule);
+                        if (parentPath) {
+                            //If an array, it means there are a few choices,
+                            //Choose the one that is desired
+                            if (isArray(parentPath)) {
+                                parentPath = parentPath[0];
+                            }
+                            syms.splice(0, i, parentPath);
+                            break;
+                        } else if (pkg) {
+                            //If module name is just the package name, then looking
+                            //for the main module.
+                            if (moduleName === pkg.name) {
+                                pkgPath = pkg.location + '/' + pkg.main;
+                            } else {
+                                pkgPath = pkg.location;
+                            }
+                            syms.splice(0, i, pkgPath);
+                            break;
+                        }
+                    }
+
+                    //Join the path parts together, then figure out if baseUrl is needed.
+                    url = syms.join('/');
+                    url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
+                    url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
+                }
+
+                return config.urlArgs ? url +
+                                        ((url.indexOf('?') === -1 ? '?' : '&amp;') +
+                                         config.urlArgs) : url;
+            },
+
+            //Delegates to req.load. Broken out as a separate function to
+            //allow overriding in the optimizer.
+            load: function (id, url) {
+                req.load(context, id, url);
+            },
+
+            /**
+             * Executes a module callback function. Broken out as a separate function
+             * solely to allow the build system to sequence the files in the built
+             * layer in the right sequence.
+             *
+             * @private
+             */
+            execCb: function (name, callback, args, exports) {
+                return callback.apply(exports, args);
+            },
+
+            /**
+             * callback for script loads, used to check status of loading.
+             *
+             * @param {Event} evt the event from the browser for the script
+             * that was loaded.
+             */
+            onScriptLoad: function (evt) {
+                //Using currentTarget instead of target for Firefox 2.0's sake. Not
+                //all old browsers will be supported, but this one was easy enough
+                //to support and still makes sense.
+                if (evt.type === 'load' ||
+                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
+                    //Reset interactive script so a script node is not held onto for
+                    //to long.
+                    interactiveScript = null;
+
+                    //Pull out the name of the module and the context.
+                    var data = getScriptData(evt);
+                    context.completeLoad(data.id);
+                }
+            },
+
+            /**
+             * Callback for script errors.
+             */
+            onScriptError: function (evt) {
+                var data = getScriptData(evt);
+                if (!hasPathFallback(data.id)) {
+                    return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
+                }
+            }
+        };
+
+        context.require = context.makeRequire();
+        return context;
+    }
+
+    /**
+     * Main entry point.
+     *
+     * If the only argument to require is a string, then the module that
+     * is represented by that string is fetched for the appropriate context.
+     *
+     * If the first argument is an array, then it will be treated as an array
+     * of dependency string names to fetch. An optional function callback can
+     * be specified to execute when all of those dependencies are available.
+     *
+     * Make a local req variable to help Caja compliance (it assumes things
+     * on a require that are not standardized), and to give a short
+     * name for minification/local scope use.
+     */
+    req = requirejs = function (deps, callback, errback, optional) {
+
+        //Find the right context, use default
+        var context, config,
+            contextName = defContextName;
+
+        // Determine if have config object in the call.
+        if (!isArray(deps) &amp;&amp; typeof deps !== 'string') {
+            // deps is a config object
+            config = deps;
+            if (isArray(callback)) {
+                // Adjust args if there are dependencies
+                deps = callback;
+                callback = errback;
+                errback = optional;
+            } else {
+                deps = [];
+            }
+        }
+
+        if (config &amp;&amp; config.context) {
+            contextName = config.context;
+        }
+
+        context = getOwn(contexts, contextName);
+        if (!context) {
+            context = contexts[contextName] = req.s.newContext(contextName);
+        }
+
+        if (config) {
+            context.configure(config);
+        }
+
+        return context.require(deps, callback, errback);
+    };
+
+    /**
+     * Support require.config() to make it easier to cooperate with other
+     * AMD loaders on globally agreed names.
+     */
+    req.config = function (config) {
+        return req(config);
+    };
+
+    /**
+     * Execute something after the current tick
+     * of the event loop. Override for other envs
+     * that have a better solution than setTimeout.
+     * @param  {Function} fn function to execute later.
+     */
+    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
+        setTimeout(fn, 4);
+    } : function (fn) { fn(); };
+
+    /**
+     * Export require as a global, but only if it does not already exist.
+     */
+    if (!require) {
+        require = req;
+    }
+
+    req.version = version;
+
+    //Used to filter out dependencies that are already paths.
+    req.jsExtRegExp = /^\/|:|\?|\.js$/;
+    req.isBrowser = isBrowser;
+    s = req.s = {
+        contexts: contexts,
+        newContext: newContext
+    };
+
+    //Create default context.
+    req({});
+
+    //Exports some context-sensitive methods on global require.
+    each([
+        'toUrl',
+        'undef',
+        'defined',
+        'specified'
+    ], function (prop) {
+        //Reference from contexts instead of early binding to default context,
+        //so that during builds, the latest instance of the default context
+        //with its config gets used.
+        req[prop] = function () {
+            var ctx = contexts[defContextName];
+            return ctx.require[prop].apply(ctx, arguments);
+        };
+    });
+
+    if (isBrowser) {
+        head = s.head = document.getElementsByTagName('head')[0];
+        //If BASE tag is in play, using appendChild is a problem for IE6.
+        //When that browser dies, this can be removed. Details in this jQuery bug:
+        //http://dev.jquery.com/ticket/2709
+        baseElement = document.getElementsByTagName('base')[0];
+        if (baseElement) {
+            head = s.head = baseElement.parentNode;
+        }
+    }
+
+    /**
+     * Any errors that require explicitly generates will be passed to this
+     * function. Intercept/override it if you want custom error handling.
+     * @param {Error} err the error object.
+     */
+    req.onError = defaultOnError;
+
+    /**
+     * Creates the node for the load command. Only used in browser envs.
+     */
+    req.createNode = function (config, moduleName, url) {
+        var node = config.xhtml ?
+                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
+                document.createElement('script');
+        node.type = config.scriptType || 'text/javascript';
+        node.charset = 'utf-8';
+        node.async = true;
+        return node;
+    };
+
+    /**
+     * Does the request to load a module for the browser case.
+     * Make this a separate function to allow other environments
+     * to override it.
+     *
+     * @param {Object} context the require context to find state.
+     * @param {String} moduleName the name of the module.
+     * @param {Object} url the URL to the module.
+     */
+    req.load = function (context, moduleName, url) {
+        var config = (context &amp;&amp; context.config) || {},
+            node;
+        if (isBrowser) {
+            //In the browser so use a script tag
+            node = req.createNode(config, moduleName, url);
+
+            node.setAttribute('data-requirecontext', context.contextName);
+            node.setAttribute('data-requiremodule', moduleName);
+
+            //Set up load listener. Test attachEvent first because IE9 has
+            //a subtle issue in its addEventListener and script onload firings
+            //that do not match the behavior of all other browsers with
+            //addEventListener support, which fire the onload event for a
+            //script right after the script execution. See:
+            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
+            //UNFORTUNATELY Opera implements attachEvent but does not follow the script
+            //script execution mode.
+            if (node.attachEvent &amp;&amp;
+                    //Check if node.attachEvent is artificially added by custom script or
+                    //natively supported by browser
+                    //read https://github.com/jrburke/requirejs/issues/187
+                    //if we can NOT find [native code] then it must NOT natively supported.
+                    //in IE8, node.attachEvent does not have toString()
+                    //Note the test for &quot;[native code&quot; with no closing brace, see:
+                    //https://github.com/jrburke/requirejs/issues/273
+                    !(node.attachEvent.toString &amp;&amp; node.attachEvent.toString().indexOf('[native code') &lt; 0) &amp;&amp;
+                    !isOpera) {
+                //Probably IE. IE (at least 6-8) do not fire
+                //script onload right after executing the script, so
+                //we cannot tie the anonymous define call to a name.
+                //However, IE reports the script as being in 'interactive'
+                //readyState at the time of the define call.
+                useInteractive = true;
+
+                node.attachEvent('onreadystatechange', context.onScriptLoad);
+                //It would be great to add an error handler here to catch
+                //404s in IE9+. However, onreadystatechange will fire before
+                //the error handler, so that does not help. If addEventListener
+                //is used, then IE will fire error before load, but we cannot
+                //use that pathway given the connect.microsoft.com issue
+                //mentioned above about not doing the 'script execute,
+                //then fire the script load event listener before execute
+                //next script' that other browsers do.
+                //Best hope: IE10 fixes the issues,
+                //and then destroys all installs of IE 6-9.
+                //node.attachEvent('onerror', context.onScriptError);
+            } else {
+                node.addEventListener('load', context.onScriptLoad, false);
+                node.addEventListener('error', context.onScriptError, false);
+            }
+            node.src = url;
+
+            //For some cache cases in IE 6-8, the script executes before the end
+            //of the appendChild execution, so to tie an anonymous define
+            //call to the module name (which is stored on the node), hold on
+            //to a reference to this node, but clear after the DOM insertion.
+            currentlyAddingScript = node;
+            if (baseElement) {
+                head.insertBefore(node, baseElement);
+            } else {
+                head.appendChild(node);
+            }
+            currentlyAddingScript = null;
+
+            return node;
+        } else if (isWebWorker) {
+            try {
+                //In a web worker, use importScripts. This is not a very
+                //efficient use of importScripts, importScripts will block until
+                //its script is downloaded and evaluated. However, if web workers
+                //are in play, the expectation that a build has been done so that
+                //only one script needs to be loaded anyway. This may need to be
+                //reevaluated if other use cases become common.
+                importScripts(url);
+
+                //Account for anonymous modules
+                context.completeLoad(moduleName);
+            } catch (e) {
+                context.onError(makeError('importscripts',
+                                'importScripts failed for ' +
+                                    moduleName + ' at ' + url,
+                                e,
+                                [moduleName]));
+            }
+        }
+    };
+
+    function getInteractiveScript() {
+        if (interactiveScript &amp;&amp; interactiveScript.readyState === 'interactive') {
+            return interactiveScript;
+        }
+
+        eachReverse(scripts(), function (script) {
+            if (script.readyState === 'interactive') {
+                return (interactiveScript = script);
+            }
+        });
+        return interactiveScript;
+    }
+
+    //Look for a data-main script attribute, which could also adjust the baseUrl.
+    if (isBrowser &amp;&amp; !cfg.skipDataMain) {
+        //Figure out baseUrl. Get it from the script tag with require.js in it.
+        eachReverse(scripts(), function (script) {
+            //Set the 'head' where we can append children by
+            //using the script's parent.
+            if (!head) {
+                head = script.parentNode;
+            }
+
+            //Look for a data-main attribute to set main script for the page
+            //to load. If it is there, the path to data main becomes the
+            //baseUrl, if it is not already set.
+            dataMain = script.getAttribute('data-main');
+            if (dataMain) {
+                //Preserve dataMain in case it is a path (i.e. contains '?')
+                mainScript = dataMain;
+
+                //Set final baseUrl if there is not already an explicit one.
+                if (!cfg.baseUrl) {
+                    //Pull off the directory of data-main for use as the
+                    //baseUrl.
+                    src = mainScript.split('/');
+                    mainScript = src.pop();
+                    subPath = src.length ? src.join('/')  + '/' : './';
+
+                    cfg.baseUrl = subPath;
+                }
+
+                //Strip off any trailing .js since mainScript is now
+                //like a module name.
+                mainScript = mainScript.replace(jsSuffixRegExp, '');
+
+                 //If mainScript is still a path, fall back to dataMain
+                if (req.jsExtRegExp.test(mainScript)) {
+                    mainScript = dataMain;
+                }
+
+                //Put the data-main script in the files to load.
+                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
+
+                return true;
+            }
+        });
+    }
+
+    /**
+     * The function that handles definitions of modules. Differs from
+     * require() in that a string for the module should be the first argument,
+     * and the function to execute after dependencies are loaded should
+     * return a value to define the module corresponding to the first argument's
+     * name.
+     */
+    define = function (name, deps, callback) {
+        var node, context;
+
+        //Allow for anonymous modules
+        if (typeof name !== 'string') {
+            //Adjust args appropriately
+            callback = deps;
+            deps = name;
+            name = null;
+        }
+
+        //This module may not have dependencies
+        if (!isArray(deps)) {
+            callback = deps;
+            deps = null;
+        }
+
+        //If no name, and callback is a function, then figure out if it a
+        //CommonJS thing with dependencies.
+        if (!deps &amp;&amp; isFunction(callback)) {
+            deps = [];
+            //Remove comments from the callback string,
+            //look for require calls, and pull them into the dependencies,
+            //but only if there are function args.
+            if (callback.length) {
+                callback
+                    .toString()
+                    .replace(commentRegExp, '')
+                    .replace(cjsRequireRegExp, function (match, dep) {
+                        deps.push(dep);
+                    });
+
+                //May be a CommonJS thing even without require calls, but still
+                //could use exports, and module. Avoid doing exports and module
+                //work though if it just needs require.
+                //REQUIRES the function to expect the CommonJS variables in the
+                //order listed below.
+                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
+            }
+        }
+
+        //If in IE 6-8 and hit an anonymous define() call, do the interactive
+        //work.
+        if (useInteractive) {
+            node = currentlyAddingScript || getInteractiveScript();
+            if (node) {
+                if (!name) {
+                    name = node.getAttribute('data-requiremodule');
+                }
+                context = contexts[node.getAttribute('data-requirecontext')];
+            }
+        }
+
+        //Always save off evaluating the def call until the script onload handler.
+        //This allows multiple modules to be in a file without prematurely
+        //tracing dependencies, and allows for anonymous module support,
+        //where the module name is not known until the script onload event
+        //occurs. If no context, use the global queue, and get it processed
+        //in the onscript load callback.
+        (context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
+    };
+
+    define.amd = {
+        jQuery: true
+    };
+
+
+    /**
+     * Executes the text. Normally just uses eval, but can be modified
+     * to use a better, environment-specific call. Only used for transpiling
+     * loader plugins, not for plain JS modules.
+     * @param {String} text the text to execute/evaluate.
+     */
+    req.exec = function (text) {
+        /*jslint evil: true */
+        return eval(text);
+    };
+
+    //Set up with config info.
+    req(cfg);
+}(this));
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentsrequirejstexttextjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,386 @@
</span><ins>+/**
+ * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/requirejs/text for details
+ */
+/*jslint regexp: true */
+/*global require, XMLHttpRequest, ActiveXObject,
+  define, window, process, Packages,
+  java, location, Components, FileUtils */
+
+define(['module'], function (module) {
+    'use strict';
+
+    var text, fs, Cc, Ci, xpcIsWindows,
+        progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
+        xmlRegExp = /^\s*&lt;\?xml(\s)+version=[\'\&quot;](\d)*.(\d)*[\'\&quot;](\s)*\?&gt;/im,
+        bodyRegExp = /&lt;body[^&gt;]*&gt;\s*([\s\S]+)\s*&lt;\/body&gt;/im,
+        hasLocation = typeof location !== 'undefined' &amp;&amp; location.href,
+        defaultProtocol = hasLocation &amp;&amp; location.protocol &amp;&amp; location.protocol.replace(/\:/, ''),
+        defaultHostName = hasLocation &amp;&amp; location.hostname,
+        defaultPort = hasLocation &amp;&amp; (location.port || undefined),
+        buildMap = {},
+        masterConfig = (module.config &amp;&amp; module.config()) || {};
+
+    text = {
+        version: '2.0.10',
+
+        strip: function (content) {
+            //Strips &lt;?xml ...?&gt; declarations so that external SVG and XML
+            //documents can be added to a document without worry. Also, if the string
+            //is an HTML document, only the part inside the body tag is returned.
+            if (content) {
+                content = content.replace(xmlRegExp, &quot;&quot;);
+                var matches = content.match(bodyRegExp);
+                if (matches) {
+                    content = matches[1];
+                }
+            } else {
+                content = &quot;&quot;;
+            }
+            return content;
+        },
+
+        jsEscape: function (content) {
+            return content.replace(/(['\\])/g, '\\$1')
+                .replace(/[\f]/g, &quot;\\f&quot;)
+                .replace(/[\b]/g, &quot;\\b&quot;)
+                .replace(/[\n]/g, &quot;\\n&quot;)
+                .replace(/[\t]/g, &quot;\\t&quot;)
+                .replace(/[\r]/g, &quot;\\r&quot;)
+                .replace(/[\u2028]/g, &quot;\\u2028&quot;)
+                .replace(/[\u2029]/g, &quot;\\u2029&quot;);
+        },
+
+        createXhr: masterConfig.createXhr || function () {
+            //Would love to dump the ActiveX crap in here. Need IE 6 to die first.
+            var xhr, i, progId;
+            if (typeof XMLHttpRequest !== &quot;undefined&quot;) {
+                return new XMLHttpRequest();
+            } else if (typeof ActiveXObject !== &quot;undefined&quot;) {
+                for (i = 0; i &lt; 3; i += 1) {
+                    progId = progIds[i];
+                    try {
+                        xhr = new ActiveXObject(progId);
+                    } catch (e) {}
+
+                    if (xhr) {
+                        progIds = [progId];  // so faster next time
+                        break;
+                    }
+                }
+            }
+
+            return xhr;
+        },
+
+        /**
+         * Parses a resource name into its component parts. Resource names
+         * look like: module/name.ext!strip, where the !strip part is
+         * optional.
+         * @param {String} name the resource name
+         * @returns {Object} with properties &quot;moduleName&quot;, &quot;ext&quot; and &quot;strip&quot;
+         * where strip is a boolean.
+         */
+        parseName: function (name) {
+            var modName, ext, temp,
+                strip = false,
+                index = name.indexOf(&quot;.&quot;),
+                isRelative = name.indexOf('./') === 0 ||
+                             name.indexOf('../') === 0;
+
+            if (index !== -1 &amp;&amp; (!isRelative || index &gt; 1)) {
+                modName = name.substring(0, index);
+                ext = name.substring(index + 1, name.length);
+            } else {
+                modName = name;
+            }
+
+            temp = ext || modName;
+            index = temp.indexOf(&quot;!&quot;);
+            if (index !== -1) {
+                //Pull off the strip arg.
+                strip = temp.substring(index + 1) === &quot;strip&quot;;
+                temp = temp.substring(0, index);
+                if (ext) {
+                    ext = temp;
+                } else {
+                    modName = temp;
+                }
+            }
+
+            return {
+                moduleName: modName,
+                ext: ext,
+                strip: strip
+            };
+        },
+
+        xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
+
+        /**
+         * Is an URL on another domain. Only works for browser use, returns
+         * false in non-browser environments. Only used to know if an
+         * optimized .js version of a text resource should be loaded
+         * instead.
+         * @param {String} url
+         * @returns Boolean
+         */
+        useXhr: function (url, protocol, hostname, port) {
+            var uProtocol, uHostName, uPort,
+                match = text.xdRegExp.exec(url);
+            if (!match) {
+                return true;
+            }
+            uProtocol = match[2];
+            uHostName = match[3];
+
+            uHostName = uHostName.split(':');
+            uPort = uHostName[1];
+            uHostName = uHostName[0];
+
+            return (!uProtocol || uProtocol === protocol) &amp;&amp;
+                   (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &amp;&amp;
+                   ((!uPort &amp;&amp; !uHostName) || uPort === port);
+        },
+
+        finishLoad: function (name, strip, content, onLoad) {
+            content = strip ? text.strip(content) : content;
+            if (masterConfig.isBuild) {
+                buildMap[name] = content;
+            }
+            onLoad(content);
+        },
+
+        load: function (name, req, onLoad, config) {
+            //Name has format: some.module.filext!strip
+            //The strip part is optional.
+            //if strip is present, then that means only get the string contents
+            //inside a body tag in an HTML string. For XML/SVG content it means
+            //removing the &lt;?xml ...?&gt; declarations so the content can be inserted
+            //into the current doc without problems.
+
+            // Do not bother with the work if a build and text will
+            // not be inlined.
+            if (config.isBuild &amp;&amp; !config.inlineText) {
+                onLoad();
+                return;
+            }
+
+            masterConfig.isBuild = config.isBuild;
+
+            var parsed = text.parseName(name),
+                nonStripName = parsed.moduleName +
+                    (parsed.ext ? '.' + parsed.ext : ''),
+                url = req.toUrl(nonStripName),
+                useXhr = (masterConfig.useXhr) ||
+                         text.useXhr;
+
+            // Do not load if it is an empty: url
+            if (url.indexOf('empty:') === 0) {
+                onLoad();
+                return;
+            }
+
+            //Load the text. Use XHR if possible and in a browser.
+            if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
+                text.get(url, function (content) {
+                    text.finishLoad(name, parsed.strip, content, onLoad);
+                }, function (err) {
+                    if (onLoad.error) {
+                        onLoad.error(err);
+                    }
+                });
+            } else {
+                //Need to fetch the resource across domains. Assume
+                //the resource has been optimized into a JS module. Fetch
+                //by the module name + extension, but do not include the
+                //!strip part to avoid file system issues.
+                req([nonStripName], function (content) {
+                    text.finishLoad(parsed.moduleName + '.' + parsed.ext,
+                                    parsed.strip, content, onLoad);
+                });
+            }
+        },
+
+        write: function (pluginName, moduleName, write, config) {
+            if (buildMap.hasOwnProperty(moduleName)) {
+                var content = text.jsEscape(buildMap[moduleName]);
+                write.asModule(pluginName + &quot;!&quot; + moduleName,
+                               &quot;define(function () { return '&quot; +
+                                   content +
+                               &quot;';});\n&quot;);
+            }
+        },
+
+        writeFile: function (pluginName, moduleName, req, write, config) {
+            var parsed = text.parseName(moduleName),
+                extPart = parsed.ext ? '.' + parsed.ext : '',
+                nonStripName = parsed.moduleName + extPart,
+                //Use a '.js' file name so that it indicates it is a
+                //script that can be loaded across domains.
+                fileName = req.toUrl(parsed.moduleName + extPart) + '.js';
+
+            //Leverage own load() method to load plugin value, but only
+            //write out values that do not have the strip argument,
+            //to avoid any potential issues with ! in file names.
+            text.load(nonStripName, req, function (value) {
+                //Use own write() method to construct full module value.
+                //But need to create shell that translates writeFile's
+                //write() to the right interface.
+                var textWrite = function (contents) {
+                    return write(fileName, contents);
+                };
+                textWrite.asModule = function (moduleName, contents) {
+                    return write.asModule(moduleName, fileName, contents);
+                };
+
+                text.write(pluginName, nonStripName, textWrite, config);
+            }, config);
+        }
+    };
+
+    if (masterConfig.env === 'node' || (!masterConfig.env &amp;&amp;
+            typeof process !== &quot;undefined&quot; &amp;&amp;
+            process.versions &amp;&amp;
+            !!process.versions.node &amp;&amp;
+            !process.versions['node-webkit'])) {
+        //Using special require.nodeRequire, something added by r.js.
+        fs = require.nodeRequire('fs');
+
+        text.get = function (url, callback, errback) {
+            try {
+                var file = fs.readFileSync(url, 'utf8');
+                //Remove BOM (Byte Mark Order) from utf8 files if it is there.
+                if (file.indexOf('\uFEFF') === 0) {
+                    file = file.substring(1);
+                }
+                callback(file);
+            } catch (e) {
+                errback(e);
+            }
+        };
+    } else if (masterConfig.env === 'xhr' || (!masterConfig.env &amp;&amp;
+            text.createXhr())) {
+        text.get = function (url, callback, errback, headers) {
+            var xhr = text.createXhr(), header;
+            xhr.open('GET', url, true);
+
+            //Allow plugins direct access to xhr headers
+            if (headers) {
+                for (header in headers) {
+                    if (headers.hasOwnProperty(header)) {
+                        xhr.setRequestHeader(header.toLowerCase(), headers[header]);
+                    }
+                }
+            }
+
+            //Allow overrides specified in config
+            if (masterConfig.onXhr) {
+                masterConfig.onXhr(xhr, url);
+            }
+
+            xhr.onreadystatechange = function (evt) {
+                var status, err;
+                //Do not explicitly handle errors, those should be
+                //visible via console output in the browser.
+                if (xhr.readyState === 4) {
+                    status = xhr.status;
+                    if (status &gt; 399 &amp;&amp; status &lt; 600) {
+                        //An http 4xx or 5xx error. Signal an error.
+                        err = new Error(url + ' HTTP status: ' + status);
+                        err.xhr = xhr;
+                        errback(err);
+                    } else {
+                        callback(xhr.responseText);
+                    }
+
+                    if (masterConfig.onXhrComplete) {
+                        masterConfig.onXhrComplete(xhr, url);
+                    }
+                }
+            };
+            xhr.send(null);
+        };
+    } else if (masterConfig.env === 'rhino' || (!masterConfig.env &amp;&amp;
+            typeof Packages !== 'undefined' &amp;&amp; typeof java !== 'undefined')) {
+        //Why Java, why is this so awkward?
+        text.get = function (url, callback) {
+            var stringBuffer, line,
+                encoding = &quot;utf-8&quot;,
+                file = new java.io.File(url),
+                lineSeparator = java.lang.System.getProperty(&quot;line.separator&quot;),
+                input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
+                content = '';
+            try {
+                stringBuffer = new java.lang.StringBuffer();
+                line = input.readLine();
+
+                // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
+                // http://www.unicode.org/faq/utf_bom.html
+
+                // Note that when we use utf-8, the BOM should appear as &quot;EF BB BF&quot;, but it doesn't due to this bug in the JDK:
+                // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
+                if (line &amp;&amp; line.length() &amp;&amp; line.charAt(0) === 0xfeff) {
+                    // Eat the BOM, since we've already found the encoding on this file,
+                    // and we plan to concatenating this buffer with others; the BOM should
+                    // only appear at the top of a file.
+                    line = line.substring(1);
+                }
+
+                if (line !== null) {
+                    stringBuffer.append(line);
+                }
+
+                while ((line = input.readLine()) !== null) {
+                    stringBuffer.append(lineSeparator);
+                    stringBuffer.append(line);
+                }
+                //Make sure we return a JavaScript string and not a Java string.
+                content = String(stringBuffer.toString()); //String
+            } finally {
+                input.close();
+            }
+            callback(content);
+        };
+    } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &amp;&amp;
+            typeof Components !== 'undefined' &amp;&amp; Components.classes &amp;&amp;
+            Components.interfaces)) {
+        //Avert your gaze!
+        Cc = Components.classes,
+        Ci = Components.interfaces;
+        Components.utils['import']('resource://gre/modules/FileUtils.jsm');
+        xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);
+
+        text.get = function (url, callback) {
+            var inStream, convertStream, fileObj,
+                readData = {};
+
+            if (xpcIsWindows) {
+                url = url.replace(/\//g, '\\');
+            }
+
+            fileObj = new FileUtils.File(url);
+
+            //XPCOM, you so crazy
+            try {
+                inStream = Cc['@mozilla.org/network/file-input-stream;1']
+                           .createInstance(Ci.nsIFileInputStream);
+                inStream.init(fileObj, 1, 0, false);
+
+                convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
+                                .createInstance(Ci.nsIConverterInputStream);
+                convertStream.init(inStream, &quot;utf-8&quot;, inStream.available(),
+                Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
+
+                convertStream.readString(inStream.available(), readData);
+                convertStream.close();
+                inStream.close();
+                callback(readData.value);
+            } catch (e) {
+                throw new Error((fileObj &amp;&amp; fileObj.path || '') + ': ' + e);
+            }
+        };
+    }
+    return text;
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentstodomvccommonbasecss"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,556 @@
</span><ins>+html,
+body {
+    margin: 0;
+    padding: 0;
+}
+
+button {
+    margin: 0;
+    padding: 0;
+    border: 0;
+    background: none;
+    font-size: 100%;
+    vertical-align: baseline;
+    font-family: inherit;
+    color: inherit;
+    -webkit-appearance: none;
+    -ms-appearance: none;
+    -o-appearance: none;
+    appearance: none;
+}
+
+body {
+    font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
+    line-height: 1.4em;
+    background: #eaeaea url('bg.png');
+    color: #4d4d4d;
+    width: 550px;
+    margin: 0 auto;
+    -webkit-font-smoothing: antialiased;
+    -moz-font-smoothing: antialiased;
+    -ms-font-smoothing: antialiased;
+    -o-font-smoothing: antialiased;
+    font-smoothing: antialiased;
+}
+
+button,
+input[type=&quot;checkbox&quot;] {
+  outline: none;
+}
+
+#todoapp {
+    background: #fff;
+    background: rgba(255, 255, 255, 0.9);
+    margin: 130px 0 40px 0;
+    border: 1px solid #ccc;
+    position: relative;
+    border-top-left-radius: 2px;
+    border-top-right-radius: 2px;
+    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2),
+                0 25px 50px 0 rgba(0, 0, 0, 0.15);
+}
+
+#todoapp:before {
+    content: '';
+    border-left: 1px solid #f5d6d6;
+    border-right: 1px solid #f5d6d6;
+    width: 2px;
+    position: absolute;
+    top: 0;
+    left: 40px;
+    height: 100%;
+}
+
+#todoapp input::-webkit-input-placeholder {
+    font-style: italic;
+}
+
+#todoapp input::-moz-placeholder {
+    font-style: italic;
+    color: #a9a9a9;
+}
+
+#todoapp h1 {
+    position: absolute;
+    top: -120px;
+    width: 100%;
+    font-size: 70px;
+    font-weight: bold;
+    text-align: center;
+    color: #b3b3b3;
+    color: rgba(255, 255, 255, 0.3);
+    text-shadow: -1px -1px rgba(0, 0, 0, 0.2);
+    -webkit-text-rendering: optimizeLegibility;
+    -moz-text-rendering: optimizeLegibility;
+    -ms-text-rendering: optimizeLegibility;
+    -o-text-rendering: optimizeLegibility;
+    text-rendering: optimizeLegibility;
+}
+
+#header {
+    padding-top: 15px;
+    border-radius: inherit;
+}
+
+#header:before {
+    content: '';
+    position: absolute;
+    top: 0;
+    right: 0;
+    left: 0;
+    height: 15px;
+    z-index: 2;
+    border-bottom: 1px solid #6c615c;
+    background: #8d7d77;
+    background: -webkit-gradient(linear, left top, left bottom, from(rgba(132, 110, 100, 0.8)),to(rgba(101, 84, 76, 0.8)));
+    background: -webkit-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8));
+    background: linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8));
+    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#9d8b83', EndColorStr='#847670');
+    border-top-left-radius: 1px;
+    border-top-right-radius: 1px;
+}
+
+#new-todo,
+.edit {
+    position: relative;
+    margin: 0;
+    width: 100%;
+    font-size: 24px;
+    font-family: inherit;
+    line-height: 1.4em;
+    border: 0;
+    outline: none;
+    color: inherit;
+    padding: 6px;
+    border: 1px solid #999;
+    box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
+    -moz-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    box-sizing: border-box;
+    -webkit-font-smoothing: antialiased;
+    -moz-font-smoothing: antialiased;
+    -ms-font-smoothing: antialiased;
+    -o-font-smoothing: antialiased;
+    font-smoothing: antialiased;
+}
+
+#new-todo {
+    padding: 16px 16px 16px 60px;
+    border: none;
+    background: rgba(0, 0, 0, 0.02);
+    z-index: 2;
+    box-shadow: none;
+}
+
+#main {
+    position: relative;
+    z-index: 2;
+    border-top: 1px dotted #adadad;
+}
+
+label[for='toggle-all'] {
+    display: none;
+}
+
+#toggle-all {
+    position: absolute;
+    top: -42px;
+    left: -4px;
+    width: 40px;
+    text-align: center;
+    /* Mobile Safari */
+    border: none;
+}
+
+#toggle-all:before {
+    content: '»';
+    font-size: 28px;
+    color: #d9d9d9;
+    padding: 0 25px 7px;
+}
+
+#toggle-all:checked:before {
+    color: #737373;
+}
+
+#todo-list {
+    margin: 0;
+    padding: 0;
+    list-style: none;
+}
+
+#todo-list li {
+    position: relative;
+    font-size: 24px;
+    border-bottom: 1px dotted #ccc;
+}
+
+#todo-list li:last-child {
+    border-bottom: none;
+}
+
+#todo-list li.editing {
+    border-bottom: none;
+    padding: 0;
+}
+
+#todo-list li.editing .edit {
+    display: block;
+    width: 506px;
+    padding: 13px 17px 12px 17px;
+    margin: 0 0 0 43px;
+}
+
+#todo-list li.editing .view {
+    display: none;
+}
+
+#todo-list li .toggle {
+    text-align: center;
+    width: 40px;
+    /* auto, since non-WebKit browsers doesn't support input styling */
+    height: auto;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    margin: auto 0;
+    /* Mobile Safari */
+    border: none;
+    -webkit-appearance: none;
+    -ms-appearance: none;
+    -o-appearance: none;
+    appearance: none;
+}
+
+#todo-list li .toggle:after {
+    content: '✔';
+    /* 40 + a couple of pixels visual adjustment */
+    line-height: 43px;
+    font-size: 20px;
+    color: #d9d9d9;
+    text-shadow: 0 -1px 0 #bfbfbf;
+}
+
+#todo-list li .toggle:checked:after {
+    color: #85ada7;
+    text-shadow: 0 1px 0 #669991;
+    bottom: 1px;
+    position: relative;
+}
+
+#todo-list li label {
+    white-space: pre;
+    word-break: break-word;
+    padding: 15px 60px 15px 15px;
+    margin-left: 45px;
+    display: block;
+    line-height: 1.2;
+    -webkit-transition: color 0.4s;
+    transition: color 0.4s;
+}
+
+#todo-list li.completed label {
+    color: #a9a9a9;
+    text-decoration: line-through;
+}
+
+#todo-list li .destroy {
+    display: none;
+    position: absolute;
+    top: 0;
+    right: 10px;
+    bottom: 0;
+    width: 40px;
+    height: 40px;
+    margin: auto 0;
+    font-size: 22px;
+    color: #a88a8a;
+    -webkit-transition: all 0.2s;
+    transition: all 0.2s;
+}
+
+#todo-list li .destroy:hover {
+    text-shadow: 0 0 1px #000,
+                 0 0 10px rgba(199, 107, 107, 0.8);
+    -webkit-transform: scale(1.3);
+    -ms-transform: scale(1.3);
+    transform: scale(1.3);
+}
+
+#todo-list li .destroy:after {
+    content: '✖';
+}
+
+#todo-list li:hover .destroy {
+    display: block;
+}
+
+#todo-list li .edit {
+    display: none;
+}
+
+#todo-list li.editing:last-child {
+    margin-bottom: -1px;
+}
+
+#footer {
+    color: #777;
+    padding: 0 15px;
+    position: absolute;
+    right: 0;
+    bottom: -31px;
+    left: 0;
+    height: 20px;
+    z-index: 1;
+    text-align: center;
+}
+
+#footer:before {
+    content: '';
+    position: absolute;
+    right: 0;
+    bottom: 31px;
+    left: 0;
+    height: 50px;
+    z-index: -1;
+    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3),
+                0 6px 0 -3px rgba(255, 255, 255, 0.8),
+                0 7px 1px -3px rgba(0, 0, 0, 0.3),
+                0 43px 0 -6px rgba(255, 255, 255, 0.8),
+                0 44px 2px -6px rgba(0, 0, 0, 0.2);
+}
+
+#todo-count {
+    float: left;
+    text-align: left;
+}
+
+#filters {
+    margin: 0;
+    padding: 0;
+    list-style: none;
+    position: absolute;
+    right: 0;
+    left: 0;
+}
+
+#filters li {
+    display: inline;
+}
+
+#filters li a {
+    color: #83756f;
+    margin: 2px;
+    text-decoration: none;
+}
+
+#filters li a.selected {
+    font-weight: bold;
+}
+
+#clear-completed {
+    float: right;
+    position: relative;
+    line-height: 20px;
+    text-decoration: none;
+    background: rgba(0, 0, 0, 0.1);
+    font-size: 11px;
+    padding: 0 10px;
+    border-radius: 3px;
+    box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.2);
+}
+
+#clear-completed:hover {
+    background: rgba(0, 0, 0, 0.15);
+    box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.3);
+}
+
+#info {
+    margin: 65px auto 0;
+    color: #a6a6a6;
+    font-size: 12px;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
+    text-align: center;
+}
+
+#info a {
+    color: inherit;
+}
+
+/*
+    Hack to remove background from Mobile Safari.
+    Can't use it globally since it destroys checkboxes in Firefox and Opera
+*/
+
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+    #toggle-all,
+    #todo-list li .toggle {
+        background: none;
+    }
+
+    #todo-list li .toggle {
+        height: 40px;
+    }
+
+    #toggle-all {
+        top: -56px;
+        left: -15px;
+        width: 65px;
+        height: 41px;
+        -webkit-transform: rotate(90deg);
+        -ms-transform: rotate(90deg);
+        transform: rotate(90deg);
+        -webkit-appearance: none;
+        appearance: none;
+    }
+}
+
+.hidden {
+    display: none;
+}
+
+hr {
+    margin: 20px 0;
+    border: 0;
+    border-top: 1px dashed #C5C5C5;
+    border-bottom: 1px dashed #F7F7F7;
+}
+
+.learn a {
+    font-weight: normal;
+    text-decoration: none;
+    color: #b83f45;
+}
+
+.learn a:hover {
+    text-decoration: underline;
+    color: #787e7e;
+}
+
+.learn h3,
+.learn h4,
+.learn h5 {
+    margin: 10px 0;
+    font-weight: 500;
+    line-height: 1.2;
+    color: #000;
+}
+
+.learn h3 {
+    font-size: 24px;
+}
+
+.learn h4 {
+    font-size: 18px;
+}
+
+.learn h5 {
+    margin-bottom: 0;
+    font-size: 14px;
+}
+
+.learn ul {
+    padding: 0;
+    margin: 0 0 30px 25px;
+}
+
+.learn li {
+    line-height: 20px;
+}
+
+.learn p {
+    font-size: 15px;
+    font-weight: 300;
+    line-height: 1.3;
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+.quote {
+    border: none;
+    margin: 20px 0 60px 0;
+}
+
+.quote p {
+    font-style: italic;
+}
+
+.quote p:before {
+    content: '“';
+    font-size: 50px;
+    opacity: .15;
+    position: absolute;
+    top: -20px;
+    left: 3px;
+}
+
+.quote p:after {
+    content: '”';
+    font-size: 50px;
+    opacity: .15;
+    position: absolute;
+    bottom: -42px;
+    right: 3px;
+}
+
+.quote footer {
+    position: absolute;
+    bottom: -40px;
+    right: 0;
+}
+
+.quote footer img {
+    border-radius: 3px;
+}
+
+.quote footer a {
+    margin-left: 5px;
+    vertical-align: middle;
+}
+
+.speech-bubble {
+    position: relative;
+    padding: 10px;
+    background: rgba(0, 0, 0, .04);
+    border-radius: 5px;
+}
+
+.speech-bubble:after {
+    content: '';
+    position: absolute;
+    top: 100%;
+    right: 30px;
+    border: 13px solid transparent;
+    border-top-color: rgba(0, 0, 0, .04);
+}
+
+.learn-bar &gt; .learn {
+    position: absolute;
+    width: 272px;
+    top: 8px;
+    left: -300px;
+    padding: 10px;
+    border-radius: 5px;
+    background-color: rgba(255, 255, 255, .6);
+    -webkit-transition-property: left;
+    transition-property: left;
+    -webkit-transition-duration: 500ms;
+    transition-duration: 500ms;
+}
+
+@media (min-width: 899px) {
+    .learn-bar {
+        width: auto;
+        margin: 0 0 0 300px;
+    }
+
+    .learn-bar &gt; .learn {
+        left: 8px;
+    }
+
+    .learn-bar #todoapp {
+        width: 550px;
+        margin: 130px auto 40px auto;
+    }
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentstodomvccommonbasejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,209 @@
</span><ins>+(function () {
+    'use strict';
+
+    // Underscore's Template Module
+    // Courtesy of underscorejs.org
+    var _ = (function (_) {
+        _.defaults = function (object) {
+            if (!object) {
+                return object;
+            }
+            for (var argsIndex = 1, argsLength = arguments.length; argsIndex &lt; argsLength; argsIndex++) {
+                var iterable = arguments[argsIndex];
+                if (iterable) {
+                    for (var key in iterable) {
+                        if (object[key] == null) {
+                            object[key] = iterable[key];
+                        }
+                    }
+                }
+            }
+            return object;
+        }
+
+        // By default, Underscore uses ERB-style template delimiters, change the
+        // following template settings to use alternative delimiters.
+        _.templateSettings = {
+            evaluate    : /&lt;%([\s\S]+?)%&gt;/g,
+            interpolate : /&lt;%=([\s\S]+?)%&gt;/g,
+            escape      : /&lt;%-([\s\S]+?)%&gt;/g
+        };
+
+        // When customizing `templateSettings`, if you don't want to define an
+        // interpolation, evaluation or escaping regex, we need one that is
+        // guaranteed not to match.
+        var noMatch = /(.)^/;
+
+        // Certain characters need to be escaped so that they can be put into a
+        // string literal.
+        var escapes = {
+            &quot;'&quot;:      &quot;'&quot;,
+            '\\':     '\\',
+            '\r':     'r',
+            '\n':     'n',
+            '\t':     't',
+            '\u2028': 'u2028',
+            '\u2029': 'u2029'
+        };
+
+        var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+        // JavaScript micro-templating, similar to John Resig's implementation.
+        // Underscore templating handles arbitrary delimiters, preserves whitespace,
+        // and correctly escapes quotes within interpolated code.
+        _.template = function(text, data, settings) {
+            var render;
+            settings = _.defaults({}, settings, _.templateSettings);
+
+            // Combine delimiters into one regular expression via alternation.
+            var matcher = new RegExp([
+                (settings.escape || noMatch).source,
+                (settings.interpolate || noMatch).source,
+                (settings.evaluate || noMatch).source
+            ].join('|') + '|$', 'g');
+
+            // Compile the template source, escaping string literals appropriately.
+            var index = 0;
+            var source = &quot;__p+='&quot;;
+            text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+                source += text.slice(index, offset)
+                    .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+                if (escape) {
+                    source += &quot;'+\n((__t=(&quot; + escape + &quot;))==null?'':_.escape(__t))+\n'&quot;;
+                }
+                if (interpolate) {
+                    source += &quot;'+\n((__t=(&quot; + interpolate + &quot;))==null?'':__t)+\n'&quot;;
+                }
+                if (evaluate) {
+                    source += &quot;';\n&quot; + evaluate + &quot;\n__p+='&quot;;
+                }
+                index = offset + match.length;
+                return match;
+            });
+            source += &quot;';\n&quot;;
+
+            // If a variable is not specified, place data values in local scope.
+            if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+            source = &quot;var __t,__p='',__j=Array.prototype.join,&quot; +
+                &quot;print=function(){__p+=__j.call(arguments,'');};\n&quot; +
+                source + &quot;return __p;\n&quot;;
+
+            try {
+                render = new Function(settings.variable || 'obj', '_', source);
+            } catch (e) {
+                e.source = source;
+                throw e;
+            }
+
+            if (data) return render(data, _);
+            var template = function(data) {
+                return render.call(this, data, _);
+            };
+
+            // Provide the compiled function source as a convenience for precompilation.
+            template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+            return template;
+        };
+
+        return _;
+    })({});
+
+    if (location.hostname === 'todomvc.com') {
+        window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
+    }
+
+    function redirect() {
+        if (location.hostname === 'tastejs.github.io') {
+            location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
+        }
+    }
+
+    function findRoot() {
+        var base;
+
+        [/labs/, /\w*-examples/].forEach(function (href) {
+            var match = location.href.match(href);
+
+            if (!base &amp;&amp; match) {
+                base = location.href.indexOf(match);
+            }
+        });
+
+        return location.href.substr(0, base);
+    }
+
+    function getFile(file, callback) {
+        if (!location.host) {
+            return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.');
+        }
+
+        var xhr = new XMLHttpRequest();
+
+        xhr.open('GET', findRoot() + file, true);
+        xhr.send();
+
+        xhr.onload = function () {
+            if (xhr.status === 200 &amp;&amp; callback) {
+                callback(xhr.responseText);
+            }
+        };
+    }
+
+    function Learn(learnJSON, config) {
+        if (!(this instanceof Learn)) {
+            return new Learn(learnJSON, config);
+        }
+
+        var template, framework;
+
+        if (typeof learnJSON !== 'object') {
+            try {
+                learnJSON = JSON.parse(learnJSON);
+            } catch (e) {
+                return;
+            }
+        }
+
+        if (config) {
+            template = config.template;
+            framework = config.framework;
+        }
+
+        if (!template &amp;&amp; learnJSON.templates) {
+            template = learnJSON.templates.todomvc;
+        }
+
+        if (!framework &amp;&amp; document.querySelector('[data-framework]')) {
+            framework = document.querySelector('[data-framework]').getAttribute('data-framework');
+        }
+
+
+        if (template &amp;&amp; learnJSON[framework]) {
+            this.frameworkJSON = learnJSON[framework];
+            this.template = template;
+
+            this.append();
+        }
+    }
+
+    Learn.prototype.append = function () {
+        var aside = document.createElement('aside');
+        aside.innerHTML = _.template(this.template, this.frameworkJSON);
+        aside.className = 'learn';
+
+        // Localize demo links
+        var demoLinks = aside.querySelectorAll('.demo-link');
+        Array.prototype.forEach.call(demoLinks, function (demoLink) {
+            demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
+        });
+
+        document.body.className = (document.body.className + ' learn-bar').trim();
+        document.body.insertAdjacentHTML('afterBegin', aside.outerHTML);
+    };
+
+    redirect();
+    getFile('learn.json', Learn);
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightbower_componentstodomvccommonbgpng"></a>
<div class="binary"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightindexhtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html lang=&quot;en&quot; data-framework=&quot;flight&quot;&gt;
+    &lt;head&gt;
+        &lt;meta charset=&quot;utf-8&quot;&gt;
+        &lt;title&gt;Flight • Todo&lt;/title&gt;
+        &lt;link rel=&quot;stylesheet&quot; href=&quot;bower_components/todomvc-common/base.css&quot;&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;section id=&quot;todoapp&quot;&gt;
+            &lt;header id=&quot;header&quot;&gt;
+                &lt;h1&gt;todos&lt;/h1&gt;
+                &lt;input id=&quot;new-todo&quot; placeholder=&quot;What needs to be done?&quot; autofocus&gt;
+            &lt;/header&gt;
+            &lt;section id=&quot;main&quot;&gt;
+                &lt;input id=&quot;toggle-all&quot; type=&quot;checkbox&quot;&gt;
+                &lt;label for=&quot;toggle-all&quot;&gt;Mark all as complete&lt;/label&gt;
+                &lt;ul id=&quot;todo-list&quot;&gt;&lt;/ul&gt;
+            &lt;/section&gt;
+            &lt;footer id=&quot;footer&quot;&gt;&lt;/footer&gt;
+        &lt;/section&gt;
+        &lt;footer id=&quot;info&quot;&gt;
+            &lt;p&gt;Double-click to edit a todo&lt;/p&gt;
+            &lt;p&gt;Created by &lt;a href=&quot;http://github.com/mkuklis&quot;&gt;Michal Kuklis&lt;/a&gt;&lt;/p&gt;
+            &lt;p&gt;Part of &lt;a href=&quot;http://todomvc.com&quot;&gt;TodoMVC&lt;/a&gt;&lt;/p&gt;
+        &lt;/footer&gt;
+        &lt;script src=&quot;bower_components/todomvc-common/base.js&quot;&gt;&lt;/script&gt;
+        &lt;script data-main=&quot;app/js/main&quot; src=&quot;bower_components/requirejs/require.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightkarmaconfjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+// Karma configuration file
+//
+// For all available config options and default values, see:
+// https://github.com/karma-runner/karma/blob/stable/lib/config.js#L54
+
+module.exports = function (config) {
+    'use strict';
+
+    config.set({
+        // base path, that will be used to resolve files and exclude
+        basePath: '',
+
+        frameworks: ['jasmine'],
+
+        // list of files / patterns to load in the browser
+        files: [
+            // loaded without require
+            'bower_components/es5-shim/es5-shim.js',
+            'bower_components/es5-shim/es5-sham.js',
+            'bower_components/jquery/jquery.js',
+            'bower_components/jasmine-flight/lib/jasmine-flight.js',
+            'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
+
+            // hack to load RequireJS after the shim libs
+            'node_modules/karma-requirejs/lib/require.js',
+            'node_modules/karma-requirejs/lib/adapter.js',
+
+            // loaded with require
+            { pattern: 'bower_components/flight/**/*.js', included: false },
+            { pattern: 'bower_components/depot/**/*.js', included: false },
+            { pattern: 'bower_components/requirejs-text/text.js', included: false },
+            { pattern: 'app/**/*.js', included: false },
+            { pattern: 'app/**/*.html', included: false },
+            { pattern: 'test/spec/**/*_spec.js', included: false },
+            { pattern: 'test/fixture/*.html', included: false },
+
+            // Entry point for karma.
+            'test/test-main.js',
+
+            { pattern: 'test/mock/*.js', included: true }
+        ],
+
+        // list of files to exclude
+        exclude: [],
+
+        // use dots reporter, as travis terminal does not support escaping sequences
+        // possible values: 'dots', 'progress'
+        // CLI --reporters progress
+        reporters: ['dots'],
+
+        // enable / disable watching file and executing tests whenever any file changes
+        // CLI --auto-watch --no-auto-watch
+        autoWatch: true,
+
+        // Start these browsers, currently available:
+        // - Chrome
+        // - ChromeCanary
+        // - Firefox
+        // - Opera
+        // - Safari (only Mac)
+        // - PhantomJS
+        // - IE (only Windows)
+        // CLI --browsers Chrome, Firefox, Safari
+        browsers: ['Chrome', 'Firefox'],
+
+        // If browser does not capture in given timeout [ms], kill it
+        // CLI --capture-timeout 5000
+        captureTimeout: 20000,
+
+        // Auto run tests on start (when browsers are captured) and exit
+        // CLI --single-run --no-single-run
+        singleRun: false,
+
+        plugins: [
+            'karma-jasmine',
+            'karma-requirejs',
+            'karma-chrome-launcher',
+            'karma-firefox-launcher',
+            'karma-ie-launcher',
+            'karma-phantomjs-launcher',
+            'karma-safari-launcher'
+        ]
+    });
+};
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightpackagejson"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+{
+  &quot;name&quot;: &quot;flight-todomvc&quot;,
+  &quot;version&quot;: &quot;0.0.0&quot;,
+  &quot;devDependencies&quot;: {
+    &quot;karma&quot;: &quot;~0.10.1&quot;,
+    &quot;karma-jasmine&quot;: &quot;~0.1.0&quot;,
+    &quot;karma-requirejs&quot;: &quot;~0.1.0&quot;,
+    &quot;karma-chrome-launcher&quot;: &quot;~0.1.0&quot;,
+    &quot;karma-ie-launcher&quot;: &quot;~0.1.1&quot;,
+    &quot;karma-firefox-launcher&quot;: &quot;~0.1.0&quot;,
+    &quot;karma-phantomjs-launcher&quot;: &quot;~0.1.0&quot;,
+    &quot;karma-safari-launcher&quot;: &quot;~0.1.1&quot;
+  },
+  &quot;scripts&quot;: {
+    &quot;test&quot;: &quot;karma start --browsers Firefox --single-run&quot;
+  }
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflightreadmemd"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+# Flight TodoMVC Example
+
+&gt; Flight is a lightweight, component-based JavaScript framework that maps behavior to DOM nodes.
+
+&gt; _[Flight - flightjs.github.io](http://flightjs.github.io)_
+
+
+## Learning Flight
+
+The [Flight website](http://flightjs.github.io) is a great resource for getting started.
+
+Here are some links you may find helpful:
+
+* [GitHub](https://github.com/flightjs/flight)
+* [Demo Application](http://twitter.github.io/flight/demo)
+* [Installation](https://github.com/flightjs/flight/blob/master/README.md#installation)
+* [Flight on Twitter](http://twitter.com/flight)
+
+_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._
+
+
+## Running the Tests
+
+To run the tests, you need to install additional helpers via bower and npm and
+run `npm test` afterwards:
+
+```bash
+bower install &amp; npm install
+npm test
+```
+
+You can also run `karma start` after the dependencies are installed to
+automatically watch for changes and re-run the test suite.
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestjshintrc"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+{
+        &quot;node&quot;: true,
+        &quot;browser&quot;: true,
+        &quot;esnext&quot;: true,
+        &quot;bitwise&quot;: true,
+        &quot;camelcase&quot;: true,
+        &quot;curly&quot;: true,
+        &quot;eqeqeq&quot;: true,
+        &quot;immed&quot;: true,
+        &quot;indent&quot;: 4,
+        &quot;latedef&quot;: true,
+        &quot;newcap&quot;: true,
+        &quot;noarg&quot;: true,
+        &quot;quotmark&quot;: &quot;single&quot;,
+        &quot;regexp&quot;: true,
+        &quot;undef&quot;: true,
+        &quot;unused&quot;: true,
+        &quot;strict&quot;: true,
+        &quot;trailing&quot;: true,
+        &quot;smarttabs&quot;: true,
+        &quot;white&quot;: true,
+        &quot;jquery&quot;: true,
+        &quot;globals&quot;: {
+                &quot;requirejs&quot;: false,
+                &quot;describe&quot;: false,
+                &quot;describeComponent&quot;: false,
+                &quot;setupComponent&quot;: false,
+                &quot;it&quot;: false,
+                &quot;expect&quot;: false,
+                &quot;beforeEach&quot;: false,
+                &quot;afterEach&quot;: false,
+                &quot;spyOnEvent&quot;: false,
+                &quot;mocks&quot;: false,
+                &quot;readFixtures&quot;: false,
+                &quot;spyOn&quot;: false
+        }
+}
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestfixturefooterhtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+&lt;footer id=&quot;footer&quot;&gt;&lt;/footer&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestfixturenew_todohtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+&lt;input id=&quot;new-todo&quot; placeholder=&quot;What needs to be done?&quot; autofocus&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestfixturetoggle_allhtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+&lt;input id=&quot;toggle-all&quot; type=&quot;checkbox&quot;&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestmockdatastorejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+(function () {
+    'use strict';
+
+    function FakeDataStore(data) {
+        this.data = data || [
+            {title: 'buy some unicorns', completed: false, id: '108e8c51-bb3f-608d-15e2-611cfc7e5838'},
+            {title: 'get a baguette mustache', completed: false, id: '6cdd0a1f-b6f8-21e1-f35b-aa18af99ad91'},
+            {title: 'shave yaks', completed: true, id: 'abe678dd-3087-198c-eefa-180248cb3d8b'}
+        ];
+    }
+
+    FakeDataStore.prototype.all = function all() {
+        return this.data;
+    };
+
+    FakeDataStore.prototype.save = function save(data) {
+        this.data.push(data);
+    };
+
+    FakeDataStore.prototype.destroyAll = function destroyAll() {
+        // Stub
+    };
+
+    window.mocks.DataStore = FakeDataStore;
+}());
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecdatastats_specjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+describeComponent('app/js/data/stats', function () {
+    'use strict';
+
+    describe('recount without datastore', function () {
+        beforeEach(function () {
+            setupComponent({
+                dataStore: new mocks.DataStore([])
+            });
+        });
+
+        afterEach(function () {
+            localStorage.clear();
+        });
+
+        it('should trigger a dataStatsCounted event', function () {
+            spyOnEvent(document, 'dataStatsCounted');
+            this.component.recount();
+            expect('dataStatsCounted').toHaveBeenTriggeredOn(document);
+        });
+
+        it('should trigger dataStatsCounted when todos are loaded', function () {
+            spyOnEvent(document, 'dataStatsCounted');
+            $(document).trigger('dataTodosLoaded');
+            expect('dataStatsCounted').toHaveBeenTriggeredOn(document);
+        });
+
+        it('should provide empty stats', function () {
+            spyOnEvent(document, 'dataStatsCounted');
+            this.component.recount();
+            expect('dataStatsCounted').toHaveBeenTriggeredOnAndWith(document, {
+                all: 0,
+                remaining: 0,
+                completed: 0,
+                filter: ''
+            });
+        });
+    });
+
+    describe('recount with datastore', function () {
+        beforeEach(function () {
+            setupComponent({
+                dataStore: new mocks.DataStore()
+            });
+        });
+
+        it('should provide full stats', function () {
+            spyOnEvent(document, 'dataStatsCounted');
+            this.component.recount();
+            expect('dataStatsCounted').toHaveBeenTriggeredOnAndWith(document, {
+                all: 3,
+                remaining: 2,
+                completed: 1,
+                filter: ''
+            });
+        });
+    });
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecdatatodos_specjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+describeComponent('app/js/data/todos', function () {
+    'use strict';
+
+    describe('without datastore', function () {
+        beforeEach(function () {
+            this.dataStore = new mocks.DataStore([]);
+            setupComponent({
+                dataStore: this.dataStore
+            });
+        });
+
+        it('should add a new entry', function () {
+            var title = 'buy some unicorns';
+
+            spyOnEvent(document, 'dataTodoAdded');
+            this.component.trigger('uiAddRequested', {
+                title: title
+            });
+
+            expect('dataTodoAdded').toHaveBeenTriggeredOn(document);
+            expect(this.dataStore.data.length).toBe(1);
+            expect(this.dataStore.all()[0].title).toBe(title);
+        });
+    });
+
+    describe('with datastore', function () {
+        beforeEach(function () {
+            this.dataStore = new mocks.DataStore();
+            setupComponent({
+                dataStore: this.dataStore
+            });
+        });
+
+        it('removes completed', function () {
+            spyOn(this.dataStore, 'destroyAll');
+            this.component.trigger('uiClearRequested');
+            expect(this.dataStore.destroyAll).toHaveBeenCalledWith({ completed: true });
+        });
+    });
+});
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecuinew_item_specjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+describeComponent('app/js/ui/new_item', function () {
+    'use strict';
+
+    var ENTER_KEY = 13;
+
+    beforeEach(function () {
+        setupComponent(readFixtures('new_todo.html'));
+    });
+
+    it('triggers uiAddRequested on enter', function () {
+        var event = $.Event('keydown');
+        event.which = ENTER_KEY;
+
+        spyOnEvent(document, 'uiAddRequested');
+        this.component.$node.val('shave moar yaks');
+
+        this.component.trigger(event);
+
+        expect('uiAddRequested').toHaveBeenTriggeredOnAndWith(document, {
+            title: 'shave moar yaks'
+        });
+    });
+
+    it('trims values', function () {
+        var event = $.Event('keydown');
+        event.which = ENTER_KEY;
+
+        spyOnEvent(document, 'uiAddRequested');
+        this.component.$node.val('  trim inputs ');
+
+        this.component.trigger(event);
+
+        expect('uiAddRequested').toHaveBeenTriggeredOnAndWith(document, {
+            title: 'trim inputs'
+        });
+    });
+
+    it('ignore empty values', function () {
+        var event = $.Event('keydown');
+        event.which = ENTER_KEY;
+
+        spyOnEvent(document, 'uiAddRequested');
+
+        this.component.trigger(event);
+
+        expect('uiAddRequested').not.toHaveBeenTriggeredOn(document);
+    });
+});
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecuistats_specjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+describeComponent('app/js/ui/stats', function () {
+    'use strict';
+
+    beforeEach(function () {
+        setupComponent(readFixtures('footer.html'));
+    });
+
+    it('renders when stats change', function () {
+        var data = {
+            all: 3,
+            remaining: 2,
+            completed: 1,
+            filter: ''
+        };
+        expect(this.component.$node).toBeEmpty();
+        $(document).trigger('dataStatsCounted', data);
+        expect(this.component.$node).not.toBeEmpty();
+        expect(this.component.$node).toBeVisible();
+    });
+
+    it('is hidden when data is empty', function () {
+        var data = {
+            all: 0,
+            remaining: 0,
+            completed: 0,
+            filter: ''
+        };
+        $(document).trigger('dataStatsCounted', data);
+        expect(this.component.$node).toBeHidden();
+    });
+
+    it('hides clear-completed with no completed items', function () {
+        var data = {
+            all: 2,
+            remaining: 2,
+            completed: 0,
+            filter: ''
+        };
+        this.component.render(null, data);
+        expect(this.component.select('clearCompletedSelector').length).toBe(0);
+    });
+
+    it('shows clear-completed with completed items', function () {
+        var data = {
+            all: 2,
+            remaining: 1,
+            completed: 1,
+            filter: ''
+        };
+        this.component.render(null, data);
+        expect(this.component.select('clearCompletedSelector').length).toBe(1);
+    });
+
+    it('triggers uiClearRequested on click', function () {
+        var data = {
+            all: 2,
+            remaining: 1,
+            completed: 1,
+            filter: ''
+        };
+        spyOnEvent(document, 'uiClearRequested');
+        this.component.render(null, data);
+        this.component.trigger(this.component.attr.clearCompletedSelector, 'click');
+        expect('uiClearRequested').toHaveBeenTriggeredOn(this.component);
+    });
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttestspecuitoggle_all_specjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+describeComponent('app/js/ui/toggle_all', function () {
+    'use strict';
+
+    beforeEach(function () {
+        setupComponent(readFixtures('toggle_all.html'));
+    });
+
+    it('check the checkbox w/o remaining', function () {
+        var data = {
+            all: 2,
+            remaining: 0,
+            completed: 2,
+            filter: ''
+        };
+        $(document).trigger('dataStatsCounted', data);
+        expect(this.component.$node).toBeChecked();
+    });
+
+    it('uncheck the checkbox w/ remaining', function () {
+        var data = {
+            all: 2,
+            remaining: 1,
+            completed: 1,
+            filter: ''
+        };
+        $(document).trigger('dataStatsCounted', data);
+        expect(this.component.$node).not.toBeChecked();
+    });
+});
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsDoYouEvenBenchresourcestodomvcdependencyexamplesflighttesttestmainjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js (0 => 168521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js                                (rev 0)
+++ trunk/PerformanceTests/DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js        2014-05-09 06:01:06 UTC (rev 168521)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+/*jshint camelcase:false*/
+/*global jasmine*/
+'use strict';
+
+var tests = Object.keys(window.__karma__.files).filter(function (file) {
+    return (/_spec\.js$/.test(file));
+});
+
+window.mocks = {};
+
+requirejs.config({
+    // Karma serves files from '/base'
+    baseUrl: '/base',
+
+    paths: {
+        flight: 'bower_components/flight',
+        depot: 'bower_components/depot/depot',
+        text: 'bower_components/requirejs-text/text'
+    },
+
+    // ask Require.js to load these files (all our tests)
+    deps: tests,
+
+    // start test run, once Require.js is done
+    callback: window.__karma__.start
+});
+
+jasmine.getFixtures().fixturesPath = '/base/test/fixture';
</ins></span></pre>
</div>
</div>

</body>
</html>