aboutsummaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/html5shiv/test
diff options
context:
space:
mode:
Diffstat (limited to 'npm_assets/node_modules/html5shiv/test')
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/body-crash.jpgbin0 -> 429 bytes
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/iframed-tests.html103
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/inline-mixed-media.css11
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/inline-print-media.css8
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/no-print.css8
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/paramtracer.swfbin0 -> 5841 bytes
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/print-styles.css8
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/print.css3
-rw-r--r--npm_assets/node_modules/html5shiv/test/data/screen.css9
-rw-r--r--npm_assets/node_modules/html5shiv/test/highcharts/area-basic.html85
-rw-r--r--npm_assets/node_modules/html5shiv/test/highcharts/highcharts.js176
-rw-r--r--npm_assets/node_modules/html5shiv/test/html5shiv.html71
-rw-r--r--npm_assets/node_modules/html5shiv/test/iframe.1-1.html14
-rw-r--r--npm_assets/node_modules/html5shiv/test/iframe.1-2.html13
-rw-r--r--npm_assets/node_modules/html5shiv/test/iframe.1.html27
-rw-r--r--npm_assets/node_modules/html5shiv/test/index.html45
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/dashboard.xml11
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/iframe.html8
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/test.js3
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testinit.js121
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testrunner.js27
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testsuite.css128
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/versioncheck.js8
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/index.html249
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/core.js1249
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/manipulation.js1701
-rw-r--r--npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/traversing.js642
-rw-r--r--npm_assets/node_modules/html5shiv/test/mixed-test.html99
-rw-r--r--npm_assets/node_modules/html5shiv/test/object-test.html78
-rw-r--r--npm_assets/node_modules/html5shiv/test/perf.1.html41
-rw-r--r--npm_assets/node_modules/html5shiv/test/perf.2.html28
-rw-r--r--npm_assets/node_modules/html5shiv/test/qunit/qunit.css226
-rw-r--r--npm_assets/node_modules/html5shiv/test/qunit/qunit.js1597
-rw-r--r--npm_assets/node_modules/html5shiv/test/style.all.css11
-rw-r--r--npm_assets/node_modules/html5shiv/test/style.css2
-rw-r--r--npm_assets/node_modules/html5shiv/test/style.print.css5
-rw-r--r--npm_assets/node_modules/html5shiv/test/unit/tests.js281
37 files changed, 7096 insertions, 0 deletions
diff --git a/npm_assets/node_modules/html5shiv/test/data/body-crash.jpg b/npm_assets/node_modules/html5shiv/test/data/body-crash.jpg
new file mode 100644
index 0000000..8727016
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/body-crash.jpg
Binary files differ
diff --git a/npm_assets/node_modules/html5shiv/test/data/iframed-tests.html b/npm_assets/node_modules/html5shiv/test/data/iframed-tests.html
new file mode 100644
index 0000000..f4e22fe
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/iframed-tests.html
@@ -0,0 +1,103 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>iframe tests</title>
+
+
+ <style>
+ body {
+ background: url(body-crash.jpg) no-repeat -999px -999px;
+ }
+ article {
+ border: 2px solid #8C8;
+ }
+ </style>
+ <script>
+ (function(){
+ window.querys = {};
+ var name;
+ var search= location.search.replace('?', '');
+ if(search){
+ search = search.split('&');
+ for(var i = 0; i < search.length; i++){
+ name = search[i].split('=');
+ querys[name[0]] = true;
+ }
+ }
+ })();
+ </script>
+ <script>
+ if(querys.disableMethodsBefore){
+ if(!window.html5){
+ window.html5 = {};
+ }
+ window.html5.shivMethods = false;
+ }
+ if(querys.disableCSS){
+ if(!window.html5){
+ window.html5 = {};
+ }
+ window.html5.shivCSS = false;
+ }
+ if(querys.addUnknownBefore){
+ if(!window.html5){
+ window.html5 = {};
+ }
+ window.html5.elements = 'abcxyz abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output picture progress section summary time video';
+ }
+
+
+ if(!querys.noEmbed){
+ document.write('<script src="..\/..\/src\/html5shiv-printshiv.js"><\/script>');
+ }
+ </script>
+ <script>
+
+ if(querys.disableMethodsAfter){
+ window.html5.shivMethods = false;
+ }
+
+ if(querys.addUnknownAfter){
+ window.html5.elements = 'abcxyz abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output picture progress section summary time video';
+ html5.shivDocument(document);
+ }
+ </script>
+
+ </head>
+ <body>
+ <div id="qunit-fixture">
+ <abcxyz>
+ <div class="inside"></div>
+ </abcxyz>
+ <article>
+ <div class="inside"></div>
+ </article>
+ <aside>
+ <div class="inside"></div>
+ </aside>
+ <figcaption>
+ <div class="inside"></div>
+ </figcaption>
+ <figure>
+ <div class="inside"></div>
+ </figure>
+ <footer>
+ <div class="inside"></div>
+ </footer>
+ <header>
+ <div class="inside"></div>
+ </header>
+ <hgroup>
+ <div class="inside"></div>
+ </hgroup>
+ <nav>
+ <div class="inside"></div>
+ </nav>
+ <section>
+ <div class="inside"></div>
+ </section>
+
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/data/inline-mixed-media.css b/npm_assets/node_modules/html5shiv/test/data/inline-mixed-media.css
new file mode 100644
index 0000000..0a4de90
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/inline-mixed-media.css
@@ -0,0 +1,11 @@
+@media screen, handheld {
+ article.inline-mixed-media {
+ border: 5px solid #000;
+ }
+}
+
+@media print {
+ article.inline-mixed-media {
+ border: 5px dotted #000;
+ }
+} \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/data/inline-print-media.css b/npm_assets/node_modules/html5shiv/test/data/inline-print-media.css
new file mode 100644
index 0000000..87b10f1
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/inline-print-media.css
@@ -0,0 +1,8 @@
+.inline-print-media form {
+ border: 5px solid #000;
+}
+@media print {
+ .inline-print-media form {
+ border: 5px dotted #000;
+ }
+}
diff --git a/npm_assets/node_modules/html5shiv/test/data/no-print.css b/npm_assets/node_modules/html5shiv/test/data/no-print.css
new file mode 100644
index 0000000..2e3dc9e
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/no-print.css
@@ -0,0 +1,8 @@
+article:before {
+ content: "isfnotorprint";
+ isfnotorprint: true;
+}
+article {
+ content: "isfnotorprint";
+ isfnotorprint: true;
+} \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/data/paramtracer.swf b/npm_assets/node_modules/html5shiv/test/data/paramtracer.swf
new file mode 100644
index 0000000..5d55d47
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/paramtracer.swf
Binary files differ
diff --git a/npm_assets/node_modules/html5shiv/test/data/print-styles.css b/npm_assets/node_modules/html5shiv/test/data/print-styles.css
new file mode 100644
index 0000000..b8f2251
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/print-styles.css
@@ -0,0 +1,8 @@
+.print-styles article {
+ border: 5px dotted #000;
+}
+@media print {
+ article.print-styles-print {
+ border: 5px dotted #000;
+ }
+}
diff --git a/npm_assets/node_modules/html5shiv/test/data/print.css b/npm_assets/node_modules/html5shiv/test/data/print.css
new file mode 100644
index 0000000..28c988a
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/print.css
@@ -0,0 +1,3 @@
+article.print {
+ border: 5px dotted #000;
+} \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/data/screen.css b/npm_assets/node_modules/html5shiv/test/data/screen.css
new file mode 100644
index 0000000..f69e58b
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/data/screen.css
@@ -0,0 +1,9 @@
+article.print {
+ border: 5px solid #000;
+}
+.print-styles article {
+ border: 5px solid #000;
+}
+article.print-styles-print {
+ border: 5px solid #000;
+} \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/highcharts/area-basic.html b/npm_assets/node_modules/html5shiv/test/highcharts/area-basic.html
new file mode 100644
index 0000000..008e788
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/highcharts/area-basic.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Highcharts Example</title>
+ <script src="../../src/html5shiv-printshiv.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
+ <script src="highcharts.js"></script>
+ </head>
+ <body>
+ <div id="container" style="width:800px;height:400px;margin:0 auto"></div>
+ <script>
+ new Highcharts.Chart({
+ 'chart': {
+ 'renderTo': 'container',
+ 'defaultSeriesType': 'area'
+ },
+ 'title': {
+ 'text': 'US and USSR nuclear stockpiles'
+ },
+ 'subtitle': {
+ 'text': 'Source: <a href="http://thebulletin.metapress.com/content/c4120650912x74k7/fulltext.pdf">'+
+ 'thebulletin.metapress.com</a>'
+ },
+ 'xAxis': {
+ 'labels': {
+ 'formatter': function() {
+ return this.value;
+ }
+ }
+ },
+ 'yAxis': {
+ 'title': {
+ 'text': 'Nuclear weapon states'
+ },
+ 'labels': {
+ 'formatter': function() {
+ return this.value / 1000 +'k';
+ }
+ }
+ },
+ 'tooltip': {
+ 'formatter': function() {
+ return this.series.name +' produced <b>'+
+ Highcharts.numberFormat(this.y, 0) +'</b><br/>warheads in '+ this.x;
+ }
+ },
+ 'plotOptions': {
+ 'area': {
+ 'pointStart': 1940,
+ 'marker': {
+ 'enabled': false,
+ 'symbol': 'circle',
+ 'radius': 2,
+ 'states': {
+ 'hover': {
+ 'enabled': true
+ }
+ }
+ }
+ }
+ },
+ 'series': [{
+ 'name': 'USA',
+ 'data': [null, null, null, null, null, 6 , 11, 32, 110, 235, 369, 640,
+ 1005, 1436, 2063, 3057, 4618, 6444, 9822, 15468, 20434, 24126,
+ 27387, 29459, 31056, 31982, 32040, 31233, 29224, 27342, 26662,
+ 26956, 27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605,
+ 24304, 23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586,
+ 22380, 21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950,
+ 10871, 10824, 10577, 10527, 10475, 10421, 10358, 10295, 10104 ]
+ }, {
+ 'name': 'USSR/Russia',
+ 'data': [null, null, null, null, null, null, null , null, null, null,
+ 5, 25, 50, 120, 150, 200, 426, 660, 869, 1060, 1605, 2471, 3322,
+ 4238, 5221, 6129, 7089, 8339, 9399, 10538, 11643, 13092, 14478,
+ 15915, 17385, 19055, 21205, 23044, 25393, 27935, 30062, 32049,
+ 33952, 35804, 37431, 39197, 45000, 43000, 41000, 39000, 37000,
+ 35000, 33000, 31000, 29000, 27000, 25000, 24000, 23000, 22000,
+ 21000, 20000, 19000, 18000, 18000, 17000, 16000]
+ }]
+ });
+ </script>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/highcharts/highcharts.js b/npm_assets/node_modules/html5shiv/test/highcharts/highcharts.js
new file mode 100644
index 0000000..0900cd9
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/highcharts/highcharts.js
@@ -0,0 +1,176 @@
+/*
+ Highcharts JS v2.1.9 (2011-11-11)
+
+ (c) 2009-2011 Torstein H?nsi
+
+ License: www.highcharts.com/license
+*/
+(function(){function sa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Sb(a){return typeof a==="string"}function Nb(a){return typeof a==="object"}function lc(a){return typeof a==="number"}function mc(a){return Fa.log(a)/Fa.LN10}function nc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function K(a){return a!==Wa&&a!==null}function Ga(a,b,c){var d,e;if(Sb(b))if(K(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(K(b)&&
+Nb(b))for(d in b)a.setAttribute(d,b[d]);return e}function zc(a){return Object.prototype.toString.call(a)==="[object Array]"?a:[a]}function A(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!=="undefined"&&c!==null)return c}}function Ja(a,b){if(Pc)if(b&&b.opacity!==Wa)b.filter="alpha(opacity="+b.opacity*100+")";sa(a.style,b)}function hb(a,b,c,d,e){a=ua.createElement(a);b&&sa(a,b);e&&Ja(a,{padding:0,border:jb,margin:0});c&&Ja(a,c);d&&d.appendChild(a);return a}function yb(a,b){var c=
+function(){};c.prototype=new a;sa(c.prototype,b);return c}function Ed(a,b,c,d){var e=Xa.lang;a=a;var f=isNaN(b=bb(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=String(ja(a=bb(+a||0).toFixed(f)));var g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+bb(a-c).toFixed(f).slice(2):"")}function Fd(a){var b={left:a.offsetLeft,top:a.offsetTop};for(a=a.offsetParent;a;){b.left+=a.offsetLeft;b.top+=a.offsetTop;
+if(a!==ua.body&&a!==ua.documentElement){b.left-=a.scrollLeft;b.top-=a.scrollTop}a=a.offsetParent}return b}function Gd(){this.symbol=this.color=0}function fe(a,b,c,d,e,f,g){var h=g.x;g=g.y;var i=h-a+c-25,j=g-b+d+10,m;if(i<7)i=c+h+15;if(i+a>c+e){i-=i+a-(c+e);j-=b;m=true}if(j<5){j=5;if(m&&g>=j&&g<=j+b)j=g+b-5}else if(j+b>d+f)j=d+f-b-5;return{x:i,y:j}}function Hd(a,b){var c=a.length,d;for(d=0;d<c;d++)a[d].ss_i=d;a.sort(function(e,f){var g=b(e,f);return g===0?e.ss_i-f.ss_i:g});for(d=0;d<c;d++)delete a[d].ss_i}
+function Ac(a){for(var b in a){a[b]&&a[b].destroy&&a[b].destroy();delete a[b]}}function oc(a,b){Bc=A(a,b.animation)}function Id(){var a=Xa.global.useUTC;Qc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,A(d,1),A(e,0),A(f,0),A(g,0))).getTime()};id=a?"getUTCMinutes":"getMinutes";jd=a?"getUTCHours":"getHours";kd=a?"getUTCDay":"getDay";Cc=a?"getUTCDate":"getDate";Rc=a?"getUTCMonth":"getMonth";Sc=a?"getUTCFullYear":"getFullYear";Jd=a?"setUTCMinutes":"setMinutes";Kd=a?"setUTCHours":"setHours";ld=
+a?"setUTCDate":"setDate";Ld=a?"setUTCMonth":"setMonth";Md=a?"setUTCFullYear":"setFullYear"}function pc(a){Tc||(Tc=hb(Tb));a&&Tc.appendChild(a);Tc.innerHTML=""}function Uc(){}function Nd(a,b){function c(p){function q(k,n){this.pos=k;this.minor=n;this.isNew=true;n||this.addLabel()}function w(k){if(k){this.options=k;this.id=k.id}return this}function x(k,n,t,r){this.isNegative=n;this.options=k;this.x=t;this.stack=r;this.alignOptions={align:k.align||(va?n?"left":"right":"center"),verticalAlign:k.verticalAlign||
+(va?"middle":n?"bottom":"top"),y:A(k.y,va?4:n?14:-6),x:A(k.x,va?n?-6:6:0)};this.textAlign=k.textAlign||(va?n?"right":"left":"center")}function V(){var k=[],n=[],t;pa=wa=null;zb=[];u(Ha,function(r){t=false;u(["xAxis","yAxis"],function(F){if(r.isCartesian&&(F==="xAxis"&&xa||F==="yAxis"&&!xa)&&(r.options[F]===o.index||r.options[F]===Wa&&o.index===0)){r[F]=I;zb.push(r);t=true}});if(!r.visible&&z.ignoreHiddenSeries)t=false;if(t){var J,E,Q,fa,ka,$;if(!xa){J=r.options.stacking;Vc=J==="percent";if(J){ka=
+r.options.stack;fa=r.type+A(ka,"");$="-"+fa;r.stackKey=fa;E=k[fa]||[];k[fa]=E;Q=n[$]||[];n[$]=Q}if(Vc){pa=0;wa=99}}if(r.isCartesian){u(r.data,function(F){var O=F.x,S=F.y,aa=S<0,Eb=aa?Q:E,kb=aa?$:fa;if(pa===null)pa=wa=F[qa];if(xa)if(O>wa)wa=O;else{if(O<pa)pa=O}else if(K(S)){if(J)Eb[O]=K(Eb[O])?Eb[O]+S:S;S=Eb?Eb[O]:S;F=A(F.low,S);if(!Vc)if(S>wa)wa=S;else if(F<pa)pa=F;if(J){s[kb]||(s[kb]={});s[kb][O]||(s[kb][O]=new x(o.stackLabels,aa,O,ka));s[kb][O].setTotal(S)}}});if(/(area|column|bar)/.test(r.type)&&
+!xa)if(pa>=0){pa=0;Od=true}else if(wa<0){wa=0;Pd=true}}}})}function N(k,n){var t,r;Fb=n?1:Fa.pow(10,lb(Fa.log(k)/Fa.LN10));t=k/Fb;if(!n){n=[1,2,2.5,5,10];if(o.allowDecimals===false||ca)if(Fb===1)n=[1,2,5,10];else if(Fb<=0.1)n=[1/Fb]}for(r=0;r<n.length;r++){k=n[r];if(t<=(n[r]+(n[r+1]||n[r]))/2)break}k*=Fb;return k}function ta(k){var n;n=k;Fb=A(Fb,Fa.pow(10,lb(Fa.log(Ta)/Fa.LN10)));if(Fb<1){n=W(1/Fb)*10;n=W(k*n)/n}return n}function da(){var k,n,t,r,J=o.tickInterval,E=o.tickPixelInterval;k=o.maxZoom||
+(xa&&!K(o.min)&&!K(o.max)?tb(l.smallestInterval*5,wa-pa):null);ya=R?Da:Aa;if(Ub){t=l[xa?"xAxis":"yAxis"][o.linkedTo];r=t.getExtremes();ia=A(r.min,r.dataMin);ra=A(r.max,r.dataMax)}else{ia=A(Vb,o.min,pa);ra=A(Gb,o.max,wa)}if(ca){ia=mc(ia);ra=mc(ra)}if(ra-ia<k){r=(k-ra+ia)/2;ia=Ia(ia-r,A(o.min,ia-r),pa);ra=tb(ia+k,A(o.max,ia+k),wa)}if(!Ya&&!Vc&&!Ub&&K(ia)&&K(ra)){k=ra-ia||1;if(!K(o.min)&&!K(Vb)&&Qd&&(pa<0||!Od))ia-=k*Qd;if(!K(o.max)&&!K(Gb)&&Rd&&(wa>0||!Pd))ra+=k*Rd}Ta=ia===ra?1:Ub&&!J&&E===t.options.tickPixelInterval?
+t.tickInterval:A(J,Ya?1:(ra-ia)*E/ya);if(!D&&!K(o.tickInterval))Ta=N(Ta);I.tickInterval=Ta;Wc=o.minorTickInterval==="auto"&&Ta?Ta/5:o.minorTickInterval;if(D){Ba=[];J=Xa.global.useUTC;var Q=1E3/ub,fa=6E4/ub,ka=36E5/ub;E=864E5/ub;k=6048E5/ub;r=2592E6/ub;var $=31556952E3/ub,F=[["second",Q,[1,2,5,10,15,30]],["minute",fa,[1,2,5,10,15,30]],["hour",ka,[1,2,3,4,6,8,12]],["day",E,[1,2]],["week",k,[1,2]],["month",r,[1,2,3,4,6]],["year",$,null]],O=F[6],S=O[1],aa=O[2];for(t=0;t<F.length;t++){O=F[t];S=O[1];aa=
+O[2];if(F[t+1])if(Ta<=(S*aa[aa.length-1]+F[t+1][1])/2)break}if(S===$&&Ta<5*S)aa=[1,2,5];F=N(Ta/S,aa);aa=new Date(ia*ub);aa.setMilliseconds(0);if(S>=Q)aa.setSeconds(S>=fa?0:F*lb(aa.getSeconds()/F));if(S>=fa)aa[Jd](S>=ka?0:F*lb(aa[id]()/F));if(S>=ka)aa[Kd](S>=E?0:F*lb(aa[jd]()/F));if(S>=E)aa[ld](S>=r?1:F*lb(aa[Cc]()/F));if(S>=r){aa[Ld](S>=$?0:F*lb(aa[Rc]()/F));n=aa[Sc]()}if(S>=$){n-=n%F;aa[Md](n)}S===k&&aa[ld](aa[Cc]()-aa[kd]()+o.startOfWeek);t=1;n=aa[Sc]();Q=aa.getTime()/ub;fa=aa[Rc]();for(ka=aa[Cc]();Q<
+ra&&t<Da;){Ba.push(Q);if(S===$)Q=Qc(n+t*F,0)/ub;else if(S===r)Q=Qc(n,fa+t*F)/ub;else if(!J&&(S===E||S===k))Q=Qc(n,fa,ka+t*F*(S===E?1:7));else Q+=S*F;t++}Ba.push(Q);Xc=o.dateTimeLabelFormats[O[0]]}else{t=ta(lb(ia/Ta)*Ta);n=ta(md(ra/Ta)*Ta);Ba=[];for(t=ta(t);t<=n;){Ba.push(t);t=ta(t+Ta)}}if(!Ub){if(Ya||xa&&l.hasColumn){n=(Ya?1:Ta)*0.5;if(Ya||!K(A(o.min,Vb)))ia-=n;if(Ya||!K(A(o.max,Gb)))ra+=n}n=Ba[0];t=Ba[Ba.length-1];if(o.startOnTick)ia=n;else ia>n&&Ba.shift();if(o.endOnTick)ra=t;else ra<t&&Ba.pop();
+Ob||(Ob={x:0,y:0});if(!D&&Ba.length>Ob[qa])Ob[qa]=Ba.length}}function Ma(){var k,n;Dc=ia;Sd=ra;V();da();Hb=fb;fb=ya/(ra-ia||1);if(!xa)for(k in s)for(n in s[k])s[k][n].cum=s[k][n].total;if(!I.isDirty)I.isDirty=ia!==Dc||ra!==Sd}function za(k){k=(new w(k)).render();Pb.push(k);return k}function eb(){var k=o.title,n=o.stackLabels,t=o.alternateGridColor,r=o.lineWidth,J,E,Q=(J=l.hasRendered)&&K(Dc)&&!isNaN(Dc);E=zb.length&&K(ia)&&K(ra);ya=R?Da:Aa;fb=ya/(ra-ia||1);cc=R?X:vb;if(E||Ub){if(Wc&&!Ya)for(E=ia+
+(Ba[0]-ia)%Wc;E<=ra;E+=Wc){Wb[E]||(Wb[E]=new q(E,true));Q&&Wb[E].isNew&&Wb[E].render(null,true);Wb[E].isActive=true;Wb[E].render()}u(Ba,function($,F){if(!Ub||$>=ia&&$<=ra){Q&&mb[$].isNew&&mb[$].render(F,true);mb[$].isActive=true;mb[$].render(F)}});t&&u(Ba,function($,F){if(F%2===0&&$<ra){dc[$]||(dc[$]=new w);dc[$].options={from:$,to:Ba[F+1]!==Wa?Ba[F+1]:ra,color:t};dc[$].render();dc[$].isActive=true}});J||u((o.plotLines||[]).concat(o.plotBands||[]),function($){Pb.push((new w($)).render())})}u([mb,
+Wb,dc],function($){for(var F in $)if($[F].isActive)$[F].isActive=false;else{$[F].destroy();delete $[F]}});if(r){J=X+(Oa?Da:0)+la;E=cb-vb-(Oa?Aa:0)+la;J=ga.crispLine([Za,R?X:J,R?E:ea,Ka,R?$a-Ib:J,R?E:cb-vb],r);if(La)La.animate({d:J});else La=ga.path(J).attr({stroke:o.lineColor,"stroke-width":r,zIndex:7}).add()}if(ba){J=R?X:ea;r=ja(k.style.fontSize||12);J={low:J+(R?0:ya),middle:J+ya/2,high:J+(R?ya:0)}[k.align];r=(R?ea+Aa:X)+(R?1:-1)*(Oa?-1:1)*nd+(L===2?r:0);ba[ba.isNew?"attr":"animate"]({x:R?J:r+(Oa?
+Da:0)+la+(k.x||0),y:R?r-(Oa?Aa:0)+la:J+(k.y||0)});ba.isNew=false}if(n&&n.enabled){var fa,ka;n=I.stackTotalGroup;if(!n)I.stackTotalGroup=n=ga.g("stack-labels").attr({visibility:Ab,zIndex:6}).translate(X,ea).add();for(fa in s){k=s[fa];for(ka in k)k[ka].render(n)}}I.isDirty=false}function ab(k){for(var n=Pb.length;n--;)Pb[n].id===k&&Pb[n].destroy()}var xa=p.isX,Oa=p.opposite,R=va?!xa:xa,L=R?Oa?0:2:Oa?1:3,s={},o=Ca(xa?Yc:od,[ge,he,Td,ie][L],p),I=this,ba,B=o.type,D=B==="datetime",ca=B==="logarithmic",
+la=o.offset||0,qa=xa?"x":"y",ya,fb,Hb,cc=R?X:vb,G,ha,na,Ra,La,pa,wa,zb,Vb,Gb,ra=null,ia=null,Dc,Sd,Qd=o.minPadding,Rd=o.maxPadding,Ub=K(o.linkedTo),Od,Pd,Vc;B=o.events;var pd,Pb=[],Ta,Wc,Fb,Ba,mb={},Wb={},dc={},qc,rc,nd,Xc,Ya=o.categories,je=o.labels.formatter||function(){var k=this.value;return Xc?Zc(Xc,k):Ta%1E6===0?k/1E6+"M":Ta%1E3===0?k/1E3+"k":!Ya&&k>=1E3?Ed(k,0):k},$c=R&&o.labels.staggerLines,ec=o.reversed,fc=Ya&&o.tickmarkPlacement==="between"?0.5:0;q.prototype={addLabel:function(){var k=this.pos,
+n=o.labels,t=!(k===ia&&!A(o.showFirstLabel,1)||k===ra&&!A(o.showLastLabel,0)),r=Ya&&R&&Ya.length&&!n.step&&!n.staggerLines&&!n.rotation&&Da/Ya.length||!R&&Da/2,J=Ya&&K(Ya[k])?Ya[k]:k,E=this.label;k=je.call({isFirst:k===Ba[0],isLast:k===Ba[Ba.length-1],dateTimeLabelFormat:Xc,value:ca?Fa.pow(10,J):J});r=r&&{width:Ia(1,W(r-2*(n.padding||10)))+Ua};r=sa(r,n.style);if(E===Wa)this.label=K(k)&&t&&n.enabled?ga.text(k,0,0,n.useHTML).attr({align:n.align,rotation:n.rotation}).css(r).add(na):null;else E&&E.attr({text:k}).css(r)},
+getLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[R?"height":"width"]:0},render:function(k,n){var t=!this.minor,r=this.label,J=this.pos,E=o.labels,Q=this.gridLine,fa=t?o.gridLineWidth:o.minorGridLineWidth,ka=t?o.gridLineColor:o.minorGridLineColor,$=t?o.gridLineDashStyle:o.minorGridLineDashStyle,F=this.mark,O=t?o.tickLength:o.minorTickLength,S=t?o.tickWidth:o.minorTickWidth||0,aa=t?o.tickColor:o.minorTickColor,Eb=t?o.tickPosition:o.minorTickPosition,kb=E.step,nb=n&&ad||
+cb,Qb;Qb=R?G(J+fc,null,null,n)+cc:X+la+(Oa?(n&&qd||$a)-Ib-X:0);nb=R?nb-vb+la-(Oa?Aa:0):nb-G(J+fc,null,null,n)-cc;if(fa){J=ha(J+fc,fa,n);if(Q===Wa){Q={stroke:ka,"stroke-width":fa};if($)Q.dashstyle=$;if(t)Q.zIndex=1;this.gridLine=Q=fa?ga.path(J).attr(Q).add(Ra):null}!n&&Q&&J&&Q.animate({d:J})}if(S){if(Eb==="inside")O=-O;if(Oa)O=-O;t=ga.crispLine([Za,Qb,nb,Ka,Qb+(R?0:-O),nb+(R?O:0)],S);if(F)F.animate({d:t});else this.mark=ga.path(t).attr({stroke:aa,"stroke-width":S}).add(na)}if(r&&!isNaN(Qb)){Qb=Qb+
+E.x-(fc&&R?fc*fb*(ec?-1:1):0);nb=nb+E.y-(fc&&!R?fc*fb*(ec?1:-1):0);K(E.y)||(nb+=ja(r.styles.lineHeight)*0.9-r.getBBox().height/2);if($c)nb+=k/(kb||1)%$c*16;if(kb)r[k%kb?"hide":"show"]();r[this.isNew?"attr":"animate"]({x:Qb,y:nb})}this.isNew=false},destroy:function(){Ac(this)}};w.prototype={render:function(){var k=this,n=k.options,t=n.label,r=k.label,J=n.width,E=n.to,Q=n.from,fa=n.value,ka,$=n.dashStyle,F=k.svgElem,O=[],S,aa,Eb=n.color;aa=n.zIndex;var kb=n.events;if(ca){Q=mc(Q);E=mc(E);fa=mc(fa)}if(J){O=
+ha(fa,J);n={stroke:Eb,"stroke-width":J};if($)n.dashstyle=$}else if(K(Q)&&K(E)){Q=Ia(Q,ia);E=tb(E,ra);ka=ha(E);if((O=ha(Q))&&ka)O.push(ka[4],ka[5],ka[1],ka[2]);else O=null;n={fill:Eb}}else return;if(K(aa))n.zIndex=aa;if(F)if(O)F.animate({d:O},null,F.onGetPath);else{F.hide();F.onGetPath=function(){F.show()}}else if(O&&O.length){k.svgElem=F=ga.path(O).attr(n).add();if(kb){$=function(nb){F.on(nb,function(Qb){kb[nb].apply(k,[Qb])})};for(S in kb)$(S)}}if(t&&K(t.text)&&O&&O.length&&Da>0&&Aa>0){t=Ca({align:R&&
+ka&&"center",x:R?!ka&&4:10,verticalAlign:!R&&ka&&"middle",y:R?ka?16:10:ka?6:-4,rotation:R&&!ka&&90},t);if(!r)k.label=r=ga.text(t.text,0,0).attr({align:t.textAlign||t.align,rotation:t.rotation,zIndex:aa}).css(t.style).add();ka=[O[1],O[4],A(O[6],O[1])];O=[O[2],O[5],A(O[7],O[2])];S=tb.apply(Fa,ka);aa=tb.apply(Fa,O);r.align(t,false,{x:S,y:aa,width:Ia.apply(Fa,ka)-S,height:Ia.apply(Fa,O)-aa});r.show()}else r&&r.hide();return k},destroy:function(){Ac(this);nc(Pb,this)}};x.prototype={destroy:function(){Ac(this)},
+setTotal:function(k){this.cum=this.total=k},render:function(k){var n=this.options.formatter.call(this);if(this.label)this.label.attr({text:n,visibility:ob});else this.label=l.renderer.text(n,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:ob}).add(k)},setOffset:function(k,n){var t=this.isNegative,r=I.translate(this.total),J=I.translate(0);J=bb(r-J);var E=l.xAxis[0].translate(this.x)+k,Q=l.plotHeight;t={x:va?t?r:r-J:E,y:va?Q-E-n:t?Q-r-J:Q-r,width:va?
+J:n,height:va?n:J};this.label&&this.label.align(this.alignOptions,null,t).attr({visibility:Ab})}};G=function(k,n,t,r,J){var E=1,Q=0,fa=r?Hb:fb;r=r?Dc:ia;fa||(fa=fb);if(t){E*=-1;Q=ya}if(ec){E*=-1;Q-=E*ya}if(n){if(ec)k=ya-k;k=k/fa+r;if(ca&&J)k=Fa.pow(10,k)}else{if(ca&&J)k=mc(k);k=E*(k-r)*fa+Q}return k};ha=function(k,n,t){var r,J,E;k=G(k,null,null,t);var Q=t&&ad||cb,fa=t&&qd||$a,ka;t=J=W(k+cc);r=E=W(Q-k-cc);if(isNaN(k))ka=true;else if(R){r=ea;E=Q-vb;if(t<X||t>X+Da)ka=true}else{t=X;J=fa-Ib;if(r<ea||r>
+ea+Aa)ka=true}return ka?null:ga.crispLine([Za,t,r,Ka,J,E],n||0)};if(va&&xa&&ec===Wa)ec=true;sa(I,{addPlotBand:za,addPlotLine:za,adjustTickAmount:function(){if(Ob&&!D&&!Ya&&!Ub){var k=qc,n=Ba.length;qc=Ob[qa];if(n<qc){for(;Ba.length<qc;)Ba.push(ta(Ba[Ba.length-1]+Ta));fb*=(n-1)/(qc-1);ra=Ba[Ba.length-1]}if(K(k)&&qc!==k)I.isDirty=true}},categories:Ya,getExtremes:function(){return{min:ia,max:ra,dataMin:pa,dataMax:wa,userMin:Vb,userMax:Gb}},getPlotLinePath:ha,getThreshold:function(k){if(ia>k)k=ia;else if(ra<
+k)k=ra;return G(k,0,1)},isXAxis:xa,options:o,plotLinesAndBands:Pb,getOffset:function(){var k=zb.length&&K(ia)&&K(ra),n=0,t=0,r=o.title,J=o.labels,E=[-1,1,1,-1][L],Q;if(!na){na=ga.g("axis").attr({zIndex:7}).add();Ra=ga.g("grid").attr({zIndex:1}).add()}rc=0;if(k||Ub){u(Ba,function(fa){if(mb[fa])mb[fa].addLabel();else mb[fa]=new q(fa);if(L===0||L===2||{1:"left",3:"right"}[L]===J.align)rc=Ia(mb[fa].getLabelSize(),rc)});if($c)rc+=($c-1)*16}else for(Q in mb){mb[Q].destroy();delete mb[Q]}if(r&&r.text){if(!ba){ba=
+I.axisTitle=ga.text(r.text,0,0,r.useHTML).attr({zIndex:7,rotation:r.rotation||0,align:r.textAlign||{low:"left",middle:"center",high:"right"}[r.align]}).css(r.style).add();ba.isNew=true}n=ba.getBBox()[R?"height":"width"];t=A(r.margin,R?5:10)}la=E*(o.offset||Xb[L]);nd=rc+(L!==2&&rc&&E*o.labels[R?"y":"x"])+t;Xb[L]=Ia(Xb[L],nd+n+E*la)},render:eb,setCategories:function(k,n){I.categories=p.categories=Ya=k;u(zb,function(t){t.translate();t.setTooltipPoints(true)});I.isDirty=true;A(n,true)&&l.redraw()},setExtremes:function(k,
+n,t,r){t=A(t,true);Pa(I,"setExtremes",{min:k,max:n},function(){Vb=k;Gb=n;t&&l.redraw(r)})},setScale:Ma,setTickPositions:da,translate:G,redraw:function(){Yb.resetTracker&&Yb.resetTracker();eb();u(Pb,function(k){k.render()});u(zb,function(k){k.isDirty=true})},removePlotBand:ab,removePlotLine:ab,reversed:ec,stacks:s,destroy:function(){var k;pb(I);for(k in s){Ac(s[k]);s[k]=null}if(I.stackTotalGroup)I.stackTotalGroup=I.stackTotalGroup.destroy();u([mb,Wb,dc,Pb],function(n){Ac(n)});u([La,na,Ra,ba],function(n){n&&
+n.destroy()});La=na=Ra=ba=null}});for(pd in B)Qa(I,pd,B[pd]);Ma()}function d(){var p={};return{add:function(q,w,x,V){if(!p[q]){w=ga.text(w,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-Ib-20,y:ea+30}).on("click",V).attr({align:"right",zIndex:20}).add();p[q]=w}},remove:function(q){pc(p[q].element);p[q]=null}}}function e(p){function q(){var B=this.points||zc(this),D=B[0].series.xAxis,ca=this.x;D=D&&D.options.type==="datetime";var la=Sb(ca)||D,qa;qa=la?['<span style="font-size: 10px">'+(D?Zc("%A, %b %e, %Y",
+ca):ca)+"</span>"]:[];u(B,function(ya){qa.push(ya.point.tooltipFormatter(la))});return qa.join("<br/>")}function w(B,D){L=xa?B:(2*L+B)/3;s=xa?D:(s+D)/2;o.translate(L,s);rd=bb(B-L)>1||bb(D-s)>1?function(){w(B,D)}:null}function x(){if(!xa){var B=l.hoverPoints;o.hide();u(da,function(D){D&&D.hide()});B&&u(B,function(D){D.setState()});l.hoverPoints=null;xa=true}}var V,N=p.borderWidth,ta=p.crosshairs,da=[],Ma=p.style,za=p.shared,eb=ja(Ma.padding),ab=N+eb,xa=true,Oa,R,L=0,s=0;Ma.padding=0;var o=ga.g("tooltip").attr({zIndex:8}).add(),
+I=ga.rect(ab,ab,0,0,p.borderRadius,N).attr({fill:p.backgroundColor,"stroke-width":N}).add(o).shadow(p.shadow),ba=ga.text("",eb+ab,ja(Ma.fontSize)+eb+ab,p.useHTML).attr({zIndex:1}).css(Ma).add(o);o.hide();return{shared:za,refresh:function(B){var D,ca,la,qa=0,ya={},fb=[];la=B.tooltipPos;D=p.formatter||q;ya=l.hoverPoints;if(za){ya&&u(ya,function(Hb){Hb.setState()});l.hoverPoints=B;u(B,function(Hb){Hb.setState(Bb);qa+=Hb.plotY;fb.push(Hb.getLabelConfig())});ca=B[0].plotX;qa=W(qa)/B.length;ya={x:B[0].category};
+ya.points=fb;B=B[0]}else ya=B.getLabelConfig();ya=D.call(ya);V=B.series;ca=za?ca:B.plotX;qa=za?qa:B.plotY;D=W(la?la[0]:va?Da-qa:ca);ca=W(la?la[1]:va?Aa-ca:qa);la=za||!B.series.isCartesian||gc(D,ca);if(ya===false||!la)x();else{if(xa){o.show();xa=false}ba.attr({text:ya});la=ba.getBBox();Oa=la.width+2*eb;R=la.height+2*eb;I.attr({width:Oa,height:R,stroke:p.borderColor||B.color||V.color||"#606060"});D=fe(Oa,R,X,ea,Da,Aa,{x:D,y:ca});w(W(D.x-ab),W(D.y-ab))}if(ta){ta=zc(ta);for(D=ta.length;D--;){ca=B.series[D?
+"yAxis":"xAxis"];if(ta[D]&&ca){ca=ca.getPlotLinePath(B[D?"y":"x"],1);if(da[D])da[D].attr({d:ca,visibility:Ab});else{la={"stroke-width":ta[D].width||1,stroke:ta[D].color||"#C0C0C0",zIndex:2};if(ta[D].dashStyle)la.dashstyle=ta[D].dashStyle;da[D]=ga.path(ca).attr(la).add()}}}}},hide:x,destroy:function(){u(da,function(B){B&&B.destroy()});u([I,ba,o],function(B){B&&B.destroy()});I=ba=o=null}}}function f(p){function q(L){var s,o=Ud&&ua.width/ua.body.scrollWidth-1,I,ba,B;L=L||db.event;if(!L.target)L.target=
+L.srcElement;s=L.touches?L.touches.item(0):L;if(L.type!=="mousemove"||db.opera||o){Jb=Fd(oa);I=Jb.left;ba=Jb.top}if(Pc){B=L.x;s=L.y}else if(s.layerX===Wa){B=s.pageX-I;s=s.pageY-ba}else{B=L.layerX;s=L.layerY}if(o){B+=W((o+1)*I-I);s+=W((o+1)*ba-ba)}return sa(L,{chartX:B,chartY:s})}function w(L){var s={xAxis:[],yAxis:[]};u(Va,function(o){var I=o.translate,ba=o.isXAxis;s[ba?"xAxis":"yAxis"].push({axis:o,value:I((va?!ba:ba)?L.chartX-X:Aa-L.chartY+ea,true)})});return s}function x(){var L=l.hoverSeries,
+s=l.hoverPoint;s&&s.onMouseOut();L&&L.onMouseOut();hc&&hc.hide();sd=null}function V(){if(za){var L={xAxis:[],yAxis:[]},s=za.getBBox(),o=s.x-X,I=s.y-ea;if(Ma){u(Va,function(ba){var B=ba.translate,D=ba.isXAxis,ca=va?!D:D,la=B(ca?o:Aa-I-s.height,true,0,0,1);B=B(ca?o+s.width:Aa-I,true,0,0,1);L[D?"xAxis":"yAxis"].push({axis:ba,min:tb(la,B),max:Ia(la,B)})});Pa(l,"selection",L,td)}za=za.destroy()}l.mouseIsDown=ud=Ma=false;pb(ua,Kb?"touchend":"mouseup",V)}function N(L){var s=K(L.pageX)?L.pageX:L.page.x;L=
+K(L.pageX)?L.pageY:L.page.y;Jb&&!gc(s-Jb.left-X,L-Jb.top-ea)&&x()}var ta,da,Ma,za,eb=z.zoomType,ab=/x/.test(eb),xa=/y/.test(eb),Oa=ab&&!va||xa&&va,R=xa&&!va||ab&&va;bd=function(){if(Ec){Ec.translate(X,ea);va&&Ec.attr({width:l.plotWidth,height:l.plotHeight}).invert()}else l.trackerGroup=Ec=ga.g("tracker").attr({zIndex:9}).add()};bd();if(p.enabled)l.tooltip=hc=e(p);(function(){oa.onmousedown=function(s){s=q(s);!Kb&&s.preventDefault&&s.preventDefault();l.mouseIsDown=ud=true;ta=s.chartX;da=s.chartY;Qa(ua,
+Kb?"touchend":"mouseup",V)};var L=function(s){if(!(s&&s.touches&&s.touches.length>1)){s=q(s);if(!Kb)s.returnValue=false;var o=s.chartX,I=s.chartY,ba=!gc(o-X,I-ea);Jb||(Jb=Fd(oa));if(Kb&&s.type==="touchstart")if(Ga(s.target,"isTracker"))l.runTrackerClick||s.preventDefault();else!ke&&!ba&&s.preventDefault();if(ba){if(o<X)o=X;else if(o>X+Da)o=X+Da;if(I<ea)I=ea;else if(I>ea+Aa)I=ea+Aa}if(ud&&s.type!=="touchstart"){Ma=Math.sqrt(Math.pow(ta-o,2)+Math.pow(da-I,2));if(Ma>10){if(sc&&(ab||xa)&&gc(ta-X,da-ea))za||
+(za=ga.rect(X,ea,Oa?1:Da,R?1:Aa,0).attr({fill:z.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add());if(za&&Oa){o=o-ta;za.attr({width:bb(o),x:(o>0?0:o)+ta})}if(za&&R){I=I-da;za.attr({height:bb(I),y:(I>0?0:I)+da})}}}else if(!ba){var B;I=l.hoverPoint;o=l.hoverSeries;var D,ca,la=$a,qa=va?s.chartY:s.chartX-X;if(hc&&p.shared){B=[];D=Ha.length;for(ca=0;ca<D;ca++)if(Ha[ca].visible&&Ha[ca].tooltipPoints.length){s=Ha[ca].tooltipPoints[qa];s._dist=bb(qa-s.plotX);la=tb(la,s._dist);B.push(s)}for(D=
+B.length;D--;)B[D]._dist>la&&B.splice(D,1);if(B.length&&B[0].plotX!==sd){hc.refresh(B);sd=B[0].plotX}}if(o&&o.tracker)(s=o.tooltipPoints[qa])&&s!==I&&s.onMouseOver()}return ba||!sc}};oa.onmousemove=L;Qa(oa,"mouseleave",x);Qa(ua,"mousemove",N);oa.ontouchstart=function(s){if(ab||xa)oa.onmousedown(s);L(s)};oa.ontouchmove=L;oa.ontouchend=function(){Ma&&x()};oa.onclick=function(s){var o=l.hoverPoint;s=q(s);s.cancelBubble=true;if(!Ma)if(o&&Ga(s.target,"isTracker")){var I=o.plotX,ba=o.plotY;sa(o,{pageX:Jb.left+
+X+(va?Da-ba:I),pageY:Jb.top+ea+(va?Aa-I:ba)});Pa(o.series,"click",sa(s,{point:o}));o.firePointEvent("click",s)}else{sa(s,w(s));gc(s.chartX-X,s.chartY-ea)&&Pa(l,"click",s)}Ma=false}})();Vd=setInterval(function(){rd&&rd()},32);sa(this,{zoomX:ab,zoomY:xa,resetTracker:x,destroy:function(){if(l.trackerGroup)l.trackerGroup=Ec=l.trackerGroup.destroy();pb(ua,"mousemove",N);oa.onclick=oa.onmousedown=oa.onmousemove=oa.ontouchstart=oa.ontouchend=oa.ontouchmove=null}})}function g(p){var q=p.type||z.type||z.defaultSeriesType,
+w=wb[q],x=l.hasRendered;if(x)if(va&&q==="column")w=wb.bar;else if(!va&&q==="bar")w=wb.column;q=new w;q.init(l,p);if(!x&&q.inverted)va=true;if(q.isCartesian)sc=q.isCartesian;Ha.push(q);return q}function h(){z.alignTicks!==false&&u(Va,function(p){p.adjustTickAmount()});Ob=null}function i(p){var q=l.isDirtyLegend,w,x=l.isDirtyBox,V=Ha.length,N=V,ta=l.clipRect;for(oc(p,l);N--;){p=Ha[N];if(p.isDirty&&p.options.stacking){w=true;break}}if(w)for(N=V;N--;){p=Ha[N];if(p.options.stacking)p.isDirty=true}u(Ha,
+function(da){if(da.isDirty){da.cleanData();da.getSegments();if(da.options.legendType==="point")q=true}});if(q&&Fc.renderLegend){Fc.renderLegend();l.isDirtyLegend=false}if(sc){if(!cd){Ob=null;u(Va,function(da){da.setScale()})}h();Gc();u(Va,function(da){if(da.isDirty||x){da.redraw();x=true}})}if(x){vd();bd();if(ta){Hc(ta);ta.animate({width:l.plotSizeX,height:l.plotSizeY})}}u(Ha,function(da){if(da.isDirty&&da.visible&&(!da.isCartesian||da.xAxis))da.redraw()});Yb&&Yb.resetTracker&&Yb.resetTracker();Pa(l,
+"redraw")}function j(){var p=a.xAxis||{},q=a.yAxis||{},w;p=zc(p);u(p,function(x,V){x.index=V;x.isX=true});q=zc(q);u(q,function(x,V){x.index=V});Va=p.concat(q);l.xAxis=[];l.yAxis=[];Va=tc(Va,function(x){w=new c(x);l[w.isXAxis?"xAxis":"yAxis"].push(w);return w});h()}function m(p,q){uc=Ca(a.title,p);Ic=Ca(a.subtitle,q);u([["title",p,uc],["subtitle",q,Ic]],function(w){var x=w[0],V=l[x],N=w[1];w=w[2];if(V&&N)V=V.destroy();if(w&&w.text&&!V)l[x]=ga.text(w.text,0,0,w.useHTML).attr({align:w.align,"class":"highcharts-"+
+x,zIndex:1}).css(w.style).add().align(w,false,Rb)})}function v(){qb=z.renderTo;Wd=vc+wd++;if(Sb(qb))qb=ua.getElementById(qb);qb.innerHTML="";if(!qb.offsetWidth){Zb=qb.cloneNode(0);Ja(Zb,{position:ic,top:"-9999px",display:""});ua.body.appendChild(Zb)}dd=(Zb||qb).offsetWidth;Jc=(Zb||qb).offsetHeight;l.chartWidth=$a=z.width||dd||600;l.chartHeight=cb=z.height||(Jc>19?Jc:400);l.container=oa=hb(Tb,{className:"highcharts-container"+(z.className?" "+z.className:""),id:Wd},sa({position:Xd,overflow:ob,width:$a+
+Ua,height:cb+Ua,textAlign:"left"},z.style),Zb||qb);l.renderer=ga=z.forExport?new ed(oa,$a,cb,true):new fd(oa,$a,cb);var p,q;if(Yd&&oa.getBoundingClientRect){p=function(){Ja(oa,{left:0,top:0});q=oa.getBoundingClientRect();Ja(oa,{left:-(q.left-ja(q.left))+Ua,top:-(q.top-ja(q.top))+Ua})};p();Qa(db,"resize",p);Qa(l,"destroy",function(){pb(db,"resize",p)})}}function P(){function p(){var w=z.width||qb.offsetWidth,x=z.height||qb.offsetHeight;if(w&&x){if(w!==dd||x!==Jc){clearTimeout(q);q=setTimeout(function(){xd(w,
+x,false)},100)}dd=w;Jc=x}}var q;Qa(db,"resize",p);Qa(l,"destroy",function(){pb(db,"resize",p)})}function T(){Pa(l,"endResize",null,function(){cd-=1})}function Y(){var p=a.labels,q=a.credits,w;m();Fc=l.legend=new le;Gc();u(Va,function(x){x.setTickPositions(true)});h();Gc();vd();sc&&u(Va,function(x){x.render()});if(!l.seriesGroup)l.seriesGroup=ga.g("series-group").attr({zIndex:3}).add();u(Ha,function(x){x.translate();x.setTooltipPoints();x.render()});p.items&&u(p.items,function(){var x=sa(p.style,this.style),
+V=ja(x.left)+X,N=ja(x.top)+ea+12;delete x.left;delete x.top;ga.text(this.html,V,N).attr({zIndex:2}).css(x).add()});if(!l.toolbar)l.toolbar=d();if(q.enabled&&!l.credits){w=q.href;l.credits=ga.text(q.text,0,0).on("click",function(){if(w)location.href=w}).attr({align:q.position.align,zIndex:8}).css(q.style).add().align(q.position)}bd();l.hasRendered=true;if(Zb){qb.appendChild(oa);pc(Zb)}}function H(){var p,q=oa&&oa.parentNode;if(l!==null){Pa(l,"destroy");pb(db,"unload",H);pb(l);for(p=Va.length;p--;)Va[p]=
+Va[p].destroy();for(p=Ha.length;p--;)Ha[p]=Ha[p].destroy();u(["title","subtitle","seriesGroup","clipRect","credits","tracker"],function(w){var x=l[w];if(x)l[w]=x.destroy()});u([wc,xc,Kc,Fc,hc,ga,Yb],function(w){w&&w.destroy&&w.destroy()});wc=xc=Kc=Fc=hc=ga=Yb=null;if(oa){oa.innerHTML="";pb(oa);q&&pc(oa);oa=null}clearInterval(Vd);for(p in l)delete l[p];l=null}}function U(){if(!Lc&&db==db.top&&ua.readyState!=="complete")ua.attachEvent("onreadystatechange",function(){ua.detachEvent("onreadystatechange",
+U);ua.readyState==="complete"&&U()});else{v();yd();zd();u(a.series||[],function(p){g(p)});l.inverted=va=A(va,a.chart.inverted);j();l.render=Y;l.tracker=Yb=new f(a.tooltip);Y();Pa(l,"load");b&&b.apply(l,[l]);u(l.callbacks,function(p){p.apply(l,[l])})}}Yc=Ca(Yc,Xa.xAxis);od=Ca(od,Xa.yAxis);Xa.xAxis=Xa.yAxis=null;a=Ca(Xa,a);var z=a.chart,M=z.margin;M=Nb(M)?M:[M,M,M,M];var y=A(z.marginTop,M[0]),C=A(z.marginRight,M[1]),Z=A(z.marginBottom,M[2]),Sa=A(z.marginLeft,M[3]),Na=z.spacingTop,Ea=z.spacingRight,
+gb=z.spacingBottom,Lb=z.spacingLeft,Rb,uc,Ic,ea,Ib,vb,X,Xb,qb,Zb,oa,Wd,dd,Jc,$a,cb,qd,ad,wc,Kc,Ad,xc,l=this,ke=(M=z.events)&&!!M.click,Bd,gc,hc,ud,jc,Zd,Cd,Aa,Da,Yb,Ec,bd,Fc,$b,ac,Jb,sc=z.showAxes,cd=0,Va=[],Ob,Ha=[],va,ga,rd,Vd,sd,vd,Gc,yd,zd,xd,td,$d,le=function(){function p(G,ha){var na=G.legendItem,Ra=G.legendLine,La=G.legendSymbol,pa=Oa.color,wa=ha?N.itemStyle.color:pa,zb=ha?G.color:pa;pa=ha?G.pointAttr[ib]:{stroke:pa,fill:pa};na&&na.css({fill:wa});Ra&&Ra.attr({stroke:zb});La&&La.attr(pa)}function q(G,
+ha,na){var Ra=G.legendItem,La=G.legendLine,pa=G.legendSymbol;G=G.checkbox;Ra&&Ra.attr({x:ha,y:na});La&&La.translate(ha,na-4);pa&&pa.attr({x:ha+pa.xOff,y:na+pa.yOff});if(G){G.x=ha;G.y=na}}function w(){u(za,function(G){var ha=G.checkbox,na=qa.alignAttr;ha&&Ja(ha,{left:na.translateX+G.legendItemWidth+ha.x-40+Ua,top:na.translateY+ha.y-11+Ua})})}function x(G){var ha,na,Ra,La,pa=G.legendItem;La=G.series||G;var wa=La.options,zb=wa&&wa.borderWidth||0;if(!pa){La=/^(bar|pie|area|column)$/.test(La.type);G.legendItem=
+pa=ga.text(N.labelFormatter.call(G),0,0).css(G.visible?ab:Oa).on("mouseover",function(){G.setState(Bb);pa.css(xa)}).on("mouseout",function(){pa.css(G.visible?ab:Oa);G.setState()}).on("click",function(){var Gb=function(){G.setVisible()};G.firePointEvent?G.firePointEvent("legendItemClick",null,Gb):Pa(G,"legendItemClick",null,Gb)}).attr({zIndex:2}).add(qa);if(!La&&wa&&wa.lineWidth){var Vb={"stroke-width":wa.lineWidth,zIndex:2};if(wa.dashStyle)Vb.dashstyle=wa.dashStyle;G.legendLine=ga.path([Za,-da-Ma,
+0,Ka,-Ma,0]).attr(Vb).add(qa)}if(La)ha=ga.rect(na=-da-Ma,Ra=-11,da,12,2).attr({zIndex:3}).add(qa);else if(wa&&wa.marker&&wa.marker.enabled)ha=ga.symbol(G.symbol,na=-da/2-Ma,Ra=-4,wa.marker.radius).attr({zIndex:3}).add(qa);if(ha){ha.xOff=na+zb%2/2;ha.yOff=Ra+zb%2/2}G.legendSymbol=ha;p(G,G.visible);if(wa&&wa.showCheckbox){G.checkbox=hb("input",{type:"checkbox",checked:G.selected,defaultChecked:G.selected},N.itemCheckboxStyle,oa);Qa(G.checkbox,"click",function(Gb){Pa(G,"checkboxClick",{checked:Gb.target.checked},
+function(){G.select()})})}}ha=pa.getBBox();na=G.legendItemWidth=N.itemWidth||da+Ma+ha.width+R;B=ha.height;if(ta&&o-s+na>(fb||$a-2*R-s)){o=s;I+=B}ba=I;q(G,o,I);if(ta)o+=na;else I+=B;ya=fb||Ia(ta?o-s:na,ya)}function V(){o=s;I=L;ba=ya=0;qa||(qa=ga.g("legend").attr({zIndex:7}).add());za=[];u(Hb,function(Ra){var La=Ra.options;if(La.showInLegend)za=za.concat(La.legendType==="point"?Ra.data:Ra)});Hd(za,function(Ra,La){return(Ra.options.legendIndex||0)-(La.options.legendIndex||0)});cc&&za.reverse();u(za,
+x);$b=fb||ya;ac=ba-L+B;if(ca||la){$b+=2*R;ac+=2*R;if(D){if($b>0&&ac>0){D[D.isNew?"attr":"animate"](D.crisp(null,null,null,$b,ac));D.isNew=false}}else{D=ga.rect(0,0,$b,ac,N.borderRadius,ca||0).attr({stroke:N.borderColor,"stroke-width":ca||0,fill:la||jb}).add(qa).shadow(N.shadow);D.isNew=true}D[za.length?"show":"hide"]()}for(var G=["left","right","top","bottom"],ha,na=4;na--;){ha=G[na];if(eb[ha]&&eb[ha]!=="auto"){N[na<2?"align":"verticalAlign"]=ha;N[na<2?"x":"y"]=ja(eb[ha])*(na%2?-1:1)}}za.length&&
+qa.align(sa(N,{width:$b,height:ac}),true,Rb);cd||w()}var N=l.options.legend;if(N.enabled){var ta=N.layout==="horizontal",da=N.symbolWidth,Ma=N.symbolPadding,za,eb=N.style,ab=N.itemStyle,xa=N.itemHoverStyle,Oa=N.itemHiddenStyle,R=ja(eb.padding),L=18,s=4+R+da+Ma,o,I,ba,B=0,D,ca=N.borderWidth,la=N.backgroundColor,qa,ya,fb=N.width,Hb=l.series,cc=N.reversed;V();Qa(l,"endResize",w);return{colorizeItem:p,destroyItem:function(G){var ha=G.checkbox;u(["legendItem","legendLine","legendSymbol"],function(na){G[na]&&
+G[na].destroy()});ha&&pc(G.checkbox)},renderLegend:V,destroy:function(){if(D)D=D.destroy();if(qa)qa=qa.destroy()}}}};gc=function(p,q){return p>=0&&p<=Da&&q>=0&&q<=Aa};$d=function(){Pa(l,"selection",{resetSelection:true},td);l.toolbar.remove("zoom")};td=function(p){var q=Xa.lang,w=l.pointCount<100;l.toolbar.add("zoom",q.resetZoom,q.resetZoomTitle,$d);!p||p.resetSelection?u(Va,function(x){x.setExtremes(null,null,false,w)}):u(p.xAxis.concat(p.yAxis),function(x){var V=x.axis;if(l.tracker[V.isXAxis?"zoomX":
+"zoomY"])V.setExtremes(x.min,x.max,false,w)});i()};Gc=function(){var p=a.legend,q=A(p.margin,10),w=p.x,x=p.y,V=p.align,N=p.verticalAlign,ta;yd();if((l.title||l.subtitle)&&!K(y))if(ta=Ia(l.title&&!uc.floating&&!uc.verticalAlign&&uc.y||0,l.subtitle&&!Ic.floating&&!Ic.verticalAlign&&Ic.y||0))ea=Ia(ea,ta+A(uc.margin,15)+Na);if(p.enabled&&!p.floating)if(V==="right")K(C)||(Ib=Ia(Ib,$b-w+q+Ea));else if(V==="left")K(Sa)||(X=Ia(X,$b+w+q+Lb));else if(N==="top")K(y)||(ea=Ia(ea,ac+x+q+Na));else if(N==="bottom")K(Z)||
+(vb=Ia(vb,ac-x+q+gb));sc&&u(Va,function(da){da.getOffset()});K(Sa)||(X+=Xb[3]);K(y)||(ea+=Xb[0]);K(Z)||(vb+=Xb[2]);K(C)||(Ib+=Xb[1]);zd()};xd=function(p,q,w){var x=l.title,V=l.subtitle;cd+=1;oc(w,l);ad=cb;qd=$a;l.chartWidth=$a=W(p);l.chartHeight=cb=W(q);Ja(oa,{width:$a+Ua,height:cb+Ua});ga.setSize($a,cb,w);Da=$a-X-Ib;Aa=cb-ea-vb;Ob=null;u(Va,function(N){N.isDirty=true;N.setScale()});u(Ha,function(N){N.isDirty=true});l.isDirtyLegend=true;l.isDirtyBox=true;Gc();x&&x.align(null,null,Rb);V&&V.align(null,
+null,Rb);i(w);ad=null;Pa(l,"resize");Bc===false?T():setTimeout(T,Bc&&Bc.duration||500)};zd=function(){l.plotLeft=X=W(X);l.plotTop=ea=W(ea);l.plotWidth=Da=W($a-X-Ib);l.plotHeight=Aa=W(cb-ea-vb);l.plotSizeX=va?Aa:Da;l.plotSizeY=va?Da:Aa;Rb={x:Lb,y:Na,width:$a-Lb-Ea,height:cb-Na-gb}};yd=function(){ea=A(y,Na);Ib=A(C,Ea);vb=A(Z,gb);X=A(Sa,Lb);Xb=[0,0,0,0]};vd=function(){var p=z.borderWidth||0,q=z.backgroundColor,w=z.plotBackgroundColor,x=z.plotBackgroundImage,V,N={x:X,y:ea,width:Da,height:Aa};V=p+(z.shadow?
+8:0);if(p||q)if(wc)wc.animate(wc.crisp(null,null,null,$a-V,cb-V));else wc=ga.rect(V/2,V/2,$a-V,cb-V,z.borderRadius,p).attr({stroke:z.borderColor,"stroke-width":p,fill:q||jb}).add().shadow(z.shadow);if(w)if(Kc)Kc.animate(N);else Kc=ga.rect(X,ea,Da,Aa,0).attr({fill:w}).add().shadow(z.plotShadow);if(x)if(Ad)Ad.animate(N);else Ad=ga.image(x,X,ea,Da,Aa).add();if(z.plotBorderWidth)if(xc)xc.animate(xc.crisp(null,X,ea,Da,Aa));else xc=ga.rect(X,ea,Da,Aa,0,z.plotBorderWidth).attr({stroke:z.plotBorderColor,
+"stroke-width":z.plotBorderWidth,zIndex:4}).add();l.isDirtyBox=false};Qa(db,"unload",H);z.reflow!==false&&Qa(l,"load",P);if(M)for(Bd in M)Qa(l,Bd,M[Bd]);l.options=a;l.series=Ha;l.addSeries=function(p,q,w){var x;if(p){oc(w,l);q=A(q,true);Pa(l,"addSeries",{options:p},function(){x=g(p);x.isDirty=true;l.isDirtyLegend=true;q&&l.redraw()})}return x};l.animation=A(z.animation,true);l.destroy=H;l.get=function(p){var q,w,x;for(q=0;q<Va.length;q++)if(Va[q].options.id===p)return Va[q];for(q=0;q<Ha.length;q++)if(Ha[q].options.id===
+p)return Ha[q];for(q=0;q<Ha.length;q++){x=Ha[q].data;for(w=0;w<x.length;w++)if(x[w].id===p)return x[w]}return null};l.getSelectedPoints=function(){var p=[];u(Ha,function(q){p=p.concat(Dd(q.data,function(w){return w.selected}))});return p};l.getSelectedSeries=function(){return Dd(Ha,function(p){return p.selected})};l.hideLoading=function(){gd(jc,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Ja(jc,{display:jb})}});Cd=false};l.isInsidePlot=gc;l.redraw=i;l.setSize=xd;l.setTitle=m;l.showLoading=
+function(p){var q=a.loading;if(!jc){jc=hb(Tb,{className:"highcharts-loading"},sa(q.style,{left:X+Ua,top:ea+Ua,width:Da+Ua,height:Aa+Ua,zIndex:10,display:jb}),oa);Zd=hb("span",null,q.labelStyle,jc)}Zd.innerHTML=p||a.lang.loading;if(!Cd){Ja(jc,{opacity:0,display:""});gd(jc,{opacity:q.style.opacity},{duration:q.showDuration});Cd=true}};l.pointCount=0;l.counters=new Gd;U()}var ua=document,db=window,Fa=Math,W=Fa.round,lb=Fa.floor,md=Fa.ceil,Ia=Fa.max,tb=Fa.min,bb=Fa.abs,rb=Fa.cos,Cb=Fa.sin,kc=Fa.PI,ae=
+kc*2/360,yc=navigator.userAgent,Pc=/msie/i.test(yc)&&!db.opera,Mc=ua.documentMode===8,Ud=/AppleWebKit/.test(yc),Yd=/Firefox/.test(yc),Lc=!!ua.createElementNS&&!!ua.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,me=Yd&&parseInt(yc.split("Firefox/")[1],10)<4,fd,Kb=ua.documentElement.ontouchstart!==undefined,be={},wd=0,ub=1,Tc,Xa,Zc,Bc,Nc,Wa,Tb="div",ic="absolute",Xd="relative",ob="hidden",vc="highcharts-",Ab="visible",Ua="px",jb="none",Za="M",Ka="L",ce="rgba(192,192,192,"+(Lc?1.0E-6:
+0.0020)+")",ib="",Bb="hover",Qc,id,jd,kd,Cc,Rc,Sc,Jd,Kd,ld,Ld,Md,ma=db.HighchartsAdapter,Db=ma||{},u=Db.each,Dd=Db.grep,tc=Db.map,Ca=Db.merge,Qa=Db.addEvent,pb=Db.removeEvent,Pa=Db.fireEvent,gd=Db.animate,Hc=Db.stop,wb={};Zc=function(a,b,c){function d(P){return P.toString().replace(/^([0-9])$/,"0$1")}if(!K(b)||isNaN(b))return"Invalid date";a=A(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*ub);var e,f=b[jd](),g=b[kd](),h=b[Cc](),i=b[Rc](),j=b[Sc](),m=Xa.lang,v=m.weekdays;b={a:v[g].substr(0,3),A:v[g],d:d(h),
+e:h,b:m.shortMonths[i],B:m.months[i],m:d(i+1),y:j.toString().substr(2,2),Y:j,H:d(f),I:d(f%12||12),l:f%12||12,M:d(b[id]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Gd.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};Nc={init:function(a,b,c){b=b||"";var d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,
+i,j=function(m){for(g=m.length;g--;)m[g]===Za&&m.splice(g+1,0,m[g+1],m[g+2],m[g+1],m[g+2])};if(e){j(b);j(c)}if(a.isArea){h=b.splice(b.length-6,6);i=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(h){b=b.concat(h);c=c.concat(i)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;){d=parseFloat(a[f]);
+e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};ma&&ma.init&&ma.init(Nc);if(!ma&&db.jQuery){var Mb=jQuery;u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};Dd=Mb.grep;tc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};Ca=function(){var a=arguments;return Mb.extend(true,null,a[0],a[1],a[2],a[3])};Qa=function(a,b,c){Mb(a).bind(b,c)};pb=function(a,b,c){var d=ua.removeEventListener?"removeEventListener":"detachEvent";
+if(ua[d]&&!a[d])a[d]=function(){};Mb(a).unbind(b,c)};Pa=function(a,b,c,d){var e=Mb.Event(b),f="detached"+b;sa(e,c);if(a[b]){a[f]=a[b];a[b]=null}Mb(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};gd=function(a,b,c){var d=Mb(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};Hc=function(a){Mb(a).stop()};Mb.extend(Mb.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var de=jQuery.fx,ee=de.step;u(["cur","_default","width","height"],function(a,b){var c=b?
+ee:de.prototype,d=c[a],e;if(d)c[a]=function(f){f=b?f:this;e=f.elem;return e.attr?e.attr(f.prop,f.now):d.apply(this,arguments)}});ee.d=function(a){var b=a.elem;if(!a.started){var c=Nc.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr("d",Nc.step(a.start,a.end,a.pos,b.toD))}}ma={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Xa={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle",
+"diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",
+borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,
+animation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:Ca(ma,{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:ic,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},
+borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},itemCheckboxStyle:{position:ic,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Xd,top:"1em"},showDuration:100,style:{position:ic,backgroundColor:"white",opacity:0.5,textAlign:"center"}},
+tooltip:{enabled:true,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Kb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",cursor:"pointer"}},credits:{enabled:true,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Yc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",
+hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:ma,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",
+fontWeight:"bold"}},type:"linear"},od=Ca(Yc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:false,formatter:function(){return this.total},style:ma.style}}),ie={labels:{align:"right",x:-8,y:null},title:{rotation:270}},he={labels:{align:"left",x:8,y:null},title:{rotation:90}},Td={labels:{align:"center",x:0,y:14},title:{rotation:0}},
+ge=Ca(Td,{labels:{y:-5}}),xb=Xa.plotOptions;ma=xb.line;xb.spline=Ca(ma);xb.scatter=Ca(ma,{lineWidth:0,states:{hover:{lineWidth:0}}});xb.area=Ca(ma,{});xb.areaspline=Ca(xb.area);xb.column=Ca(ma,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}},dataLabels:{y:null,verticalAlign:null}});xb.bar=Ca(xb.column,{dataLabels:{align:"left",x:5,
+y:0}});xb.pie=Ca(ma,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Id();var bc=function(a){var b=[],c;(function(d){if(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(d))b=[ja(c[1]),ja(c[2]),ja(c[3]),parseFloat(c[4],
+10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[ja(c[1],16),ja(c[2],16),ja(c[3],16),1]})(a);return{get:function(d){return b&&!isNaN(b[0])?d==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":d==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(d){if(lc(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=ja(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Uc.prototype={init:function(a,b){this.element=ua.createElementNS("http://www.w3.org/2000/svg",
+b);this.renderer=a},animate:function(a,b,c){if(b=A(b,Bc,true)){b=Ca(b);if(c)b.complete=c;gd(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,i=this.renderer,j,m=this.shadows,v=this.htmlNode,P,T=this;if(Sb(a)&&K(b)){c=a;a={};a[c]=b}if(Sb(a)){c=a;if(h==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";T=Ga(g,c)||this[c]||0;if(c!=="d"&&c!=="visibility")T=parseFloat(T)}else for(c in a){j=false;d=a[c];if(c==="d"){if(d&&d.join)d=
+d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];Ga(f,"x")===Ga(g,"x")&&Ga(f,"x",d)}if(this.rotation)Ga(g,"transform","rotate("+this.rotation+" "+d+" "+ja(a.y||Ga(g,"y"))+")")}else if(c==="fill")d=i.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign"){this[c]=d;this.updateTransform();j=true}else if(c===
+"stroke")d=i.color(d,g,c);else if(c==="dashstyle"){c="stroke-dasharray";d=d&&d.toLowerCase();if(d==="solid")d=jb;else if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=ja(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=ja(d);else if(c===
+"align"){c="text-anchor";d={left:"start",center:"middle",right:"end"}[d]}else if(c==="title"){e=ua.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(ua.createTextNode(d));g.appendChild(e)}if(c==="strokeWidth")c="stroke-width";if(Ud&&c==="stroke-width"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!P){this.symbolAttr(a);P=true}j=true}if(m&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=m.length;e--;)Ga(m[e],c,d);if((c==="width"||c==="height")&&h===
+"rect"&&d<0)d=0;if(c==="text"){this.textStr=d;this.added&&i.buildText(this)}else j||Ga(g,c,d);if(v&&(c==="x"||c==="y"||c==="translateX"||c==="translateY"||c==="visibility")){e=v.length?v:[this];f=e.length;var Y;for(Y=0;Y<f;Y++){v=e[Y];j=v.getBBox();v=v.htmlNode;Ja(v,sa(this.styles,{left:j.x+(this.translateX||0)+Ua,top:j.y+(this.translateY||0)+Ua}));c==="visibility"&&Ja(v,{visibility:d})}}}return T},symbolAttr:function(a){var b=this;u(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=
+A(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](W(b.x*2)/2,W(b.y*2)/2,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},i;a=a||this.strokeWidth||0;i=a%2/2;h.x=lb(b||this.x||0)+i;h.y=lb(c||this.y||0)+i;h.width=lb((d||this.width||0)-2*i);h.height=lb((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];
+return g},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName==="text";var c,d="",e=function(f,g){return"-"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=sa(this.styles,a);if(Pc&&!Lc){b&&delete a.width;Ja(this.element,a)}else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Kb&&a==="click"){a="touchstart";c=function(d){d.preventDefault();b()}}this.element["on"+a]=c;return this},
+translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr("width");b+=this.attr("height")}if(a||b)e.push("translate("+a+","+b+")");if(c)e.push("rotate(90) scale(-1,1)");else d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&Ga(this.element,"transform",e.join(" "))},toFront:function(){var a=
+this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=this.alignOptions;b=this.alignByTranslate}c=A(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=W(f);if(/^(bottom|middle)$/.test(e))g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||
+1);h[b?"translateY":"y"]=W(g);this[this.placed?"animate":"attr"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*ae;try{a=sa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=bb(c*Cb(e))+bb(b*rb(e));a.height=bb(c*rb(e))+bb(b*Cb(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ob})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=
+d.childNodes,f=this.element,g=Ga(f,"zIndex");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(a&&this.htmlNode){if(!a.htmlNode)a.htmlNode=[];a.htmlNode.push(this)}if(g){c.handleZ=true;g=ja(g)}if(c.handleZ)for(c=0;c<e.length;c++){a=e[c];b=Ga(a,"zIndex");if(a!==f&&(ja(b)>g||!K(g)&&K(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||
+{},c=a.shadows,d,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;Hc(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(e=0;e<a.stops.length;e++)a.stops[e]=a.stops[e].destroy();a.stops=null}a.safeRemoveChild(b);c&&u(c,function(f){a.safeRemoveChild(f)});nc(a.renderer.alignedObjects,a);for(d in a)delete a[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?
+"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ga(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var ed=function(){this.init.apply(this,arguments)};ed.prototype={Element:Uc,init:function(a,b,c,d){var e=location,f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);
+this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Pc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.gradients=[];this.setSize(b,c,false)},destroy:function(){var a,b=this.gradients,c=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();if(b){for(a=0;a<b.length;a++)this.gradients[a]=b[a].destroy();this.gradients=null}if(c)this.defs=c.destroy();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;
+b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=A(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Ga(b,"x"),h=a.styles,i=h&&a.useHTML&&!this.forExport,j=a.htmlNode,m=h&&ja(h.width),v=h&&h.lineHeight,P,T=d.length;T--;)b.removeChild(d[T]);m&&!a.added&&
+this.box.appendChild(b);u(c,function(Y,H){var U,z=0,M;Y=Y.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");U=Y.split("|||");u(U,function(y){if(y!==""||U.length===1){var C={},Z=ua.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(y)&&Ga(Z,"style",y.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(y)){Ga(Z,"onclick",'location.href="'+y.match(f)[1]+'"');Ja(Z,{cursor:"pointer"})}y=(y.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");Z.appendChild(ua.createTextNode(y));
+if(z)C.dx=3;else C.x=g;if(!z){if(H){!Lc&&a.renderer.forExport&&Ja(Z,{display:"block"});M=db.getComputedStyle&&ja(db.getComputedStyle(P,null).getPropertyValue("line-height"));if(!M||isNaN(M))M=v||P.offsetHeight||18;Ga(Z,"dy",M)}P=Z}Ga(Z,C);b.appendChild(Z);z++;if(m){y=y.replace(/-/g,"- ").split(" ");for(var Sa,Na=[];y.length||Na.length;){Sa=b.getBBox().width;C=Sa>m;if(!C||y.length===1){y=Na;Na=[];if(y.length){Z=ua.createElementNS("http://www.w3.org/2000/svg","tspan");Ga(Z,{dy:v||16,x:g});b.appendChild(Z);
+if(Sa>m)m=Sa}}else{Z.removeChild(Z.firstChild);Na.unshift(y.pop())}y.length&&Z.appendChild(ua.createTextNode(y.join(" ").replace(/- /g,"-")))}}}})});if(i){if(!j)j=a.htmlNode=hb("span",null,sa(h,{position:ic,top:0,left:0}),this.box.parentNode);j.innerHTML=a.textStr;for(T=d.length;T--;)d[T].style.visibility=ob}},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=W(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=W(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:jb})},circle:function(a,
+b,c){a=Nb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ia(c,0),Ia(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;
+this.height=b;for(this.boxWrapper[A(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return K(a)?b.attr({"class":vc+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:jb};arguments.length>1&&sa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e){var f,
+g=this.symbols[a];g=g&&g(W(b),W(c),d,e);var h=/^url\((.*?)\)$/,i;if(g){f=this.path(g);sa(f,{symbolName:a,x:b,y:c,r:d});e&&sa(f,e)}else if(h.test(a)){var j=function(m,v){m.attr({width:v[0],height:v[1]}).translate(-W(v[0]/2),-W(v[1]/2))};i=a.match(h)[1];a=be[i];f=this.image(i).attr({x:b,y:c});if(a)j(f,a);else{f.attr({width:0,height:0});hb("img",{onload:function(){j(f,be[i]=[this.width,this.height])},src:i})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[Za,a-c,
+b-c,Ka,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[Za,a,b-1.33*c,Ka,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[Za,a,b+1.33*c,Ka,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,b,c){return[Za,a,b-c,Ka,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=rb(e),i=Cb(e),j=rb(f);f=Cb(f);d=d.end-e<kc?0:1;return[Za,a+c*h,b+c*i,"A",c,c,0,d,1,a+c*j,b+c*f,Ka,a+g*j,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*i,"Z"]}},clipRect:function(a,b,
+c,d){var e=vc+wd++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=vc+wd++;var g,h,i;g=f.createElement("linearGradient").attr({id:c,gradientUnits:"userSpaceOnUse",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);f.gradients.push(g);g.stops=[];u(a.stops,function(j){if(e.test(j[1])){d=bc(j[1]);h=d.get("rgb");i=d.get("a")}else{h=j[1];i=1}j=
+f.createElement("stop").attr({offset:j[0],"stop-color":h,"stop-opacity":i}).add(g);g.stops.push(j)});return"url("+this.url+"#"+c+")"}else if(e.test(a)){d=bc(a);Ga(b,c+"-opacity",d.get("a"));return d.get("rgb")}else{b.removeAttribute(c+"-opacity");return a}},text:function(a,b,c,d){var e=Xa.chart.style;b=W(A(b,0));c=W(A(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});a.x=b;a.y=c;a.useHTML=d;return a}};fd=ed;if(!Lc){Db=yb(Uc,{init:function(a,
+b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",ic,";"];if(b==="shape"||b===Tb)d.push("left:0;top:0;width:10px;height:10px;");if(Mc)d.push("visibility: ",b===Tb?ob:Ab);c.push(' style="',d.join(""),'"/>');if(b){c=b===Tb||b==="span"||b==="img"?c.join(""):a.prepVML(c);this.element=hb(c)}this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);Mc&&d.gVis===ob&&Ja(c,{visibility:ob});d.appendChild(c);this.added=true;this.alignOnAdd&&
+this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,j=this.symbolName,m,v,P=this.shadows,T=this;if(Sb(a)&&K(b)){c=a;a={};a[c]=b}if(Sb(a)){c=a;T=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];m=false;if(j&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!v){this.symbolAttr(a);v=true}m=true}else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(m=[];e--;)m[e]=lc(d[e])?W(d[e]*10)-
+5:d[e]==="Z"?"x":d[e];d=m.join(" ")||"x";f.path=d;if(P)for(e=P.length;e--;)P[e].path=d;m=true}else if(c==="zIndex"||c==="visibility"){if(Mc&&c==="visibility"&&h==="DIV"){f.gVis=d;m=f.childNodes;for(e=m.length;e--;)Ja(m[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;m=true}else if(/^(width|height)$/.test(c)){this[c]=d;if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;m=true}else if(/^(x|y)$/.test(c)){this[c]=d;if(f.tagName==="SPAN")this.updateTransform();else g[{x:"left",y:"top"}[c]]=
+d}else if(c==="class")f.className=d;else if(c==="stroke"){d=i.color(d,f,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(lc(d))d+=Ua}else if(c==="dashstyle"){(f.getElementsByTagName("stroke")[0]||hb(i.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid";this.dashstyle=d;m=true}else if(c==="fill")if(h==="SPAN")g.color=d;else{f.filled=d!==jb?true:false;d=i.color(d,f,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||
+c==="align"){if(c==="align")c="textAlign";this[c]=d;this.updateTransform();m=true}else if(c==="text"){this.bBox=null;f.innerHTML=d;m=true}if(P&&c==="visibility")for(e=P.length;e--;)P[e].style[c]=d;if(!m)if(Mc)f[c]=d;else Ga(f,c,d)}return T},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){nc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=sa(this.styles,
+a);Ja(this.element,a);return this},safeRemoveChild:function(a){a.parentNode&&pc(a)},destroy:function(){this.destroyClip&&this.destroyClip();return Uc.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position=ic;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},on:function(a,b){this.element["on"+
+a]=function(){var c=db.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(z){a.renderer.invertChild(z,b)});if(b.tagName==="SPAN"){var j,m;c=a.rotation;var v;j=0;d=1;var P=0,T;v=ja(a.textWidth);var Y=a.xCorr||0,H=a.yCorr||0,U=[c,g,b.innerHTML,
+a.textWidth].join(",");if(U!==a.cTT){if(K(c)){j=c*ae;d=rb(j);P=Cb(j);Ja(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-P,", M21=",P,", M22=",d,", sizingMethod='auto expand')"].join(""):jb})}j=b.offsetWidth;m=b.offsetHeight;if(j>v){Ja(b,{width:v+Ua,display:"block",whiteSpace:"normal"});j=v}v=W((ja(b.style.fontSize)||12)*1.2);Y=d<0&&-j;H=P<0&&-m;T=d*P<0;Y+=P*v*(T?1-h:h);H-=d*v*(c?T?h:1-h:1);if(i){Y-=j*h*(d<0?-1:1);if(c)H-=m*h*(P<0?-1:1);Ja(b,{textAlign:g})}a.xCorr=Y;a.yCorr=
+H}Ja(b,{left:e+Y,top:f+H});a.cTT=U}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,i,j=e.path;if(j&&typeof j.value!=="string")j="x";if(a){for(d=1;d<=3;d++){i=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',j,'" coordsize="100,100" style="',e.style.cssText,'" />'];g=hb(f.prepVML(i),null,{left:ja(h.left)+1,top:ja(h.top)+1});i=['<stroke color="black" opacity="',0.05*d,'"/>'];hb(f.prepVML(i),null,null,g);b?b.element.appendChild(g):
+e.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});ma=function(){this.init.apply(this,arguments)};ma.prototype=Ca(ed.prototype,{Element:Db,isIE8:yc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Tb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!ua.namespaces.hcv){ua.namespaces.add("hcv","urn:schemas-microsoft-com:vml");ua.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},
+clipRect:function(a,b,c,d){var e=this.createElement();return sa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,i=h+this.width,j=g+this.height;g={clip:"rect("+W(f?h:g)+"px,"+W(f?j:i)+"px,"+W(f?i:j)+"px,"+W(f?g:h)+"px)"};!f&&Mc&&sa(g,{width:i+Ua,height:j+Ua});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i,j,m,v;u(a.stops,
+function(P,T){if(e.test(P[1])){d=bc(P[1]);f=d.get("rgb");g=d.get("a")}else{f=P[1];g=1}if(T){m=f;v=g}else{i=f;j=g}});a=90-Fa.atan((h[3]-h[1])/(h[2]-h[0]))*180/kc;a=["<",c,' colors="0% ',i,",100% ",m,'" angle="',a,'" opacity="',v,'" o:opacity2="',j,'" type="gradient" focus="100%" />'];hb(this.prepVML(a),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){d=bc(a);a=["<",c,' opacity="',d.get("a"),'"/>'];hb(this.prepVML(a),null,null,b);return d.get("rgb")}else{b=b.getElementsByTagName(c);if(b.length)b[0].opacity=
+1;return a}},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","<hcv:");return a},text:function(a,b,c){var d=Xa.chart.style;return this.createElement("span").attr({text:a,x:W(b),y:W(c)}).css({whiteSpace:"nowrap",fontFamily:d.fontFamily,
+fontSize:d.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a,y:b,r:c})},g:function(a){var b;if(a)b={className:vc+a,"class":vc+a};return this.createElement(Tb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;
+a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,Ia(c,0),Ia(d,0)))},invertChild:function(a,b){var c=b.style;Ja(a,{flip:"x",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=rb(e),h=Cb(e),i=rb(f),j=Cb(f);d=d.innerR;var m=0.07/c,v=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*kc-f+e<m)i=-m;else if(f-e<v)i=rb(e+v);return["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*i,b+c*j,"at",a-d,b-d,a+d,b+d,a+d*i,b+d*j,a+d*g,b+d*h,"x","e"]},circle:function(a,
+b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){if(!K(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;c=tb(c,e,d);return[Za,a+c,b,Ka,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,Ka,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,Ka,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,Ka,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}});fd=ma}Nd.prototype.callbacks=[];var Oc=function(){};Oc.prototype={init:function(a,b){var c=a.chart.counters,d;this.series=a;this.applyOptions(b);this.pointAttr=
+{};if(a.options.colorByPoint){d=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||d[c.color++];c.wrapColor(d.length)}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(lc(a)||a===null)this.y=a;else if(Nb(a)&&!lc(a.length)){sa(this,a);this.options=a}else if(Sb(a[0])){this.name=a[0];this.y=a[1]}else if(lc(a[0])){this.x=a[0];this.y=a[1]}if(this.x===Wa)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,
+c=b.chart.hoverPoints,d;b.chart.pointCount--;if(c){a.setState();nc(c,a)}a===b.chart.hoverPoint&&a.onMouseOut();pb(a);u(["graphic","tracker","group","dataLabel","connector","shadowGroup"],function(e){a[e]&&a[e].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(d in a)a[d]=null},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=this,d=c.series.chart;a=A(a,
+!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=a;c.setState(a&&"select");b||u(d.getSelectedPoints(),function(e){if(e.selected&&e!==c){e.selected=false;e.setState(ib);e.firePointEvent("unselect")}})})},onMouseOver:function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent("mouseOver");b&&!b.shared&&b.refresh(this);this.setState(Bb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();
+this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b>"].join("")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=A(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(Nb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=
+this,d=c.series,e=d.chart,f=d.data;oc(b,e);a=A(a,true);c.firePointEvent("remove",null,function(){nc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=Ca(this.series.options.point,
+this.options).events,b;this.events=a;for(b in a)Qa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,i=this.pointAttr;a=a||ib;if(!(a===this.state||this.selected&&a!=="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(i[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0,
+0,i[a].r).attr(i[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var sb=function(){};sb.prototype={isCartesian:true,type:"line",pointClass:Oc,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);sa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:ib,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;
+for(c in d)Qa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=A(b,a.pointStart,0);this.pointInterval=A(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;Hd(b,function(h,i){return h.x-i.x});if(this.options.connectNulls)for(g=
+b.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Wa||f<d)){d=f;c=g}}if(e===Wa||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;u(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return Ca(b[this.type],b.series,a)},getColor:function(){var a=
+this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);oc(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=A(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs();
+this.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(K(e))f.counters.color=e;for(a=tc(zc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;A(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=A(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=
+d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,i=g.y,j=g.low,m=d.stacks[(i<0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&m&&m[h]){j=m[h];h=j.total;j.cum=j=j.cum-i;i=j+i;if(b==="percent"){j=h?j*100/h:0;i=h?i*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(K(j))g.yBottom=d.translate(j,0,1,0,1);if(i!==null)g.plotY=
+d.translate(i,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Wa?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=W((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(i){d=d.concat(i)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(i,j){f=d[j-1]?d[j-1]._high+1:0;for(g=i._high=d[j+1]?lb((i.plotX+(d[j+1]?d[j+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=i});this.tooltipPoints=h},
+onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Kb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,
+d=this.options.animation;if(d&&!Nb(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,i;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;i=g.graphic;if(e!==Wa&&!isNaN(e)){a=g.pointAttr[g.selected?"select":ib];h=a.r;if(i)i.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(A(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}},
+convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=A(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,i=[],j,m=a.pointAttrToOptions,v;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||bc(d.color||f).brighten(d.brightness).get();i[ib]=a.convertAttribs(b,
+g);u([Bb,"select"],function(P){i[P]=a.convertAttribs(c[P],i[ib])});a.pointAttr=i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(v in m)if(K(b[m[v]]))e=true;if(e){j=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=bc(e.color||g.options.color).brighten(e.brightness||d.brightness).get();j[ib]=a.convertAttribs(b,i[ib]);j[Bb]=a.convertAttribs(c[Bb],i[Bb],j[ib]);j.select=a.convertAttribs(c.select,i.select,
+j[ib])}else j=i;g.pointAttr=j}},destroy:function(){var a=this,b=a.chart,c=a.clipRect,d=/\/5[0-9\.]+ (Safari|Mobile)\//.test(yc),e,f;Pa(a,"destroy");pb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(g){g.destroy()});if(c&&c!==b.clipRect)a.clipRect=c.destroy();u(["area","graph","dataLabelsGroup","group","tracker"],function(g){if(a[g]){e=d&&g==="group"?"hide":"destroy";a[g][e]()}});if(b.hoverSeries===a)b.hoverSeries=null;nc(b.series,a);for(f in a)delete a[f]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a,
+b,c=this.data,d=this.options,e=d.dataLabels,f,g=this.dataLabelsGroup,h=this.chart,i=h.renderer,j=h.inverted,m=this.type,v;v=d.stacking;var P=m==="column"||m==="bar",T=e.verticalAlign===null,Y=e.y===null;if(P)if(v){if(T)e=Ca(e,{verticalAlign:"middle"});if(Y)e=Ca(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(T)e=Ca(e,{verticalAlign:"top"});if(g)g.translate(h.plotLeft,h.plotTop);else g=this.dataLabelsGroup=i.g("data-labels").attr({visibility:this.visible?Ab:ob,zIndex:6}).translate(h.plotLeft,
+h.plotTop).add();v=e.color;if(v==="auto")v=null;e.style.color=A(v,this.color,"black");u(c,function(H){var U=H.barX,z=U&&U+H.barW/2||H.plotX||-999,M=A(H.plotY,-999),y=H.dataLabel,C=e.align,Z=Y?H.y>=0?-6:12:e.y;f=e.formatter.call(H.getLabelConfig());a=(j?h.plotWidth-M:z)+e.x;b=(j?h.plotHeight-z:M)+Z;if(m==="column")a+={left:-1,right:1}[C]*H.barW/2||0;if(j&&H.y<0){C="right";a-=10}if(y){if(j&&!e.y)b=b+ja(y.styles.lineHeight)*0.9-y.getBBox().height/2;y.attr({text:f}).animate({x:a,y:b})}else if(K(f)){y=
+H.dataLabel=i.text(f,a,b).attr({align:C,rotation:e.rotation,zIndex:1}).css(e.style).add(g);j&&!e.y&&y.attr({y:b+ja(y.styles.lineHeight)*0.9-y.getBBox().height/2})}if(P&&d.stacking&&y){z=H.barY;M=H.barW;H=H.barH;y.align(e,null,{x:j?h.plotWidth-z-H:U,y:j?h.plotHeight-U-M:z,width:j?H:M,height:j?M:H})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,j=b.dashStyle,m,v=a.chart.renderer,P=a.yAxis.getThreshold(b.threshold||0),T=/^area/.test(a.type),
+Y=[],H=[];u(a.segments,function(U){m=[];u(U,function(C,Z){if(a.getPointSpline)m.push.apply(m,a.getPointSpline(U,C,Z));else{m.push(Z?Ka:Za);Z&&b.step&&m.push(C.plotX,U[Z-1].plotY);m.push(C.plotX,C.plotY)}});if(U.length>1)d=d.concat(m);else Y.push(U[0]);if(T){var z=[],M,y=m.length;for(M=0;M<y;M++)z.push(m[M]);y===3&&z.push(Ka,m[1],m[2]);if(b.stacking&&a.type!=="areaspline")for(M=U.length-1;M>=0;M--)z.push(U[M].plotX,U[M].yBottom);else z.push(Ka,U[U.length-1].plotX,P,Ka,U[0].plotX,P);H=H.concat(z)}});
+a.graphPath=d;a.singlePoints=Y;if(T){e=A(b.fillColor,bc(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:H});else a.area=a.chart.renderer.path(H).attr({fill:e}).add(g)}if(c){Hc(c);c.animate({d:d})}else if(i){c={stroke:h,"stroke-width":i};if(j)c.dashstyle=j;a.graph=v.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,i=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&
+b.clipRect?b.clipRect:i.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=i.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Qa(b,"resize",d);Qa(a,"destroy",function(){pb(b,"resize",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ob,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==
+false&&a.drawTracker();g&&a.animate();setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||
+ib;if(this.state!==a){this.state=a;if(!(d[a]&&d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.data,j=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Wa?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=i.length;e--;){f=i[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=
+true;this.options.stacking&&u(c.series,function(m){if(m.options.stacking&&m.visible)m.isDirty=true});if(j)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Wa?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;
+h=h&&{cursor:h};var i=a.singlePoints,j;if(d)for(j=d+1;j--;){c[j]===Za&&c.splice(j+1,0,c[j+1]-f,c[j+2],Ka);if(j&&c[j]===Za||j===d)c.splice(j,0,Ka,c[j-2]+f,c[j-1])}for(j=0;j<i.length;j++){d=i[j];c.push(Za,d.plotX-f,d.plotY,Ka,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:ce,fill:jb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Ab:ob,zIndex:b.zIndex||1}).on(Kb?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",
+function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};ma=yb(sb);wb.line=ma;ma=yb(sb,{type:"area"});wb.area=ma;ma=yb(sb,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,j,m;if(c&&c<a.length-1){a=f.plotY;j=g.plotX;g=g.plotY;var v;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;j=(1.5*d+j)/2.5;m=(1.5*e+g)/2.5;v=(m-i)*(j-d)/(j-h)+e-m;i+=v;m+=v;if(i>a&&i>e){i=Ia(a,e);m=2*e-i}else if(i<a&&i<e){i=tb(a,e);m=2*e-i}if(m>g&&m>e){m=Ia(g,e);i=2*e-m}else if(m<
+g&&m<e){m=tb(g,e);i=2*e-m}b.rightContX=j;b.rightContY=m}if(c){b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e];f.rightContX=f.rightContY=null}else b=[Za,d,e];return b}});wb.spline=ma;ma=yb(ma,{type:"areaspline"});wb.areaspline=ma;var hd=yb(sb,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){sb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&u(b.series,function(c){if(c.type===
+a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis.reversed,h=a.xAxis.categories,i={},j,m;sb.prototype.translate.apply(a);u(b.series,function(C){if(C.type===a.type&&C.visible){if(C.options.stacking){j=C.stackKey;if(i[j]===Wa)i[j]=f++;m=i[j]}else m=f++;C.columnIndex=m}});var v=a.data,P=a.closestPoints;h=bb(v[1]?v[P].plotX-v[P-1].plotX:b.plotSizeX/(h&&h.length||1));P=h*c.groupPadding;var T=(h-2*P)/f,Y=c.pointWidth,H=K(Y)?(T-Y)/2:
+T*c.pointPadding,U=Ia(A(Y,T-2*H),1),z=H+(P+((g?f-a.columnIndex:a.columnIndex)||0)*T-h/2)*(g?-1:1),M=a.yAxis.getThreshold(c.threshold||0),y=A(c.minPointLength,5);u(v,function(C){var Z=C.plotY,Sa=C.yBottom||M,Na=C.plotX+z,Ea=md(tb(Z,Sa)),gb=md(Ia(Z,Sa)-Ea),Lb=a.yAxis.stacks[(C.y<0?"-":"")+a.stackKey],Rb;d&&a.visible&&Lb&&Lb[C.x]&&Lb[C.x].setOffset(z,U);if(bb(gb)<y){if(y){gb=y;Ea=bb(Ea-M)>y?Sa-y:M-(Z<=M?y:0)}Rb=Ea-3}sa(C,{barX:Na,barY:Ea,barW:U,barH:gb});C.shapeType="rect";Z=sa(b.renderer.Element.prototype.crisp.apply({},
+[e,Na,Ea,U,gb]),{r:c.borderRadius});if(e%2){Z.y-=1;Z.height+=1}C.shapeArgs=Z;C.trackerArgs=K(Rb)&&Ca(C.shapeArgs,{height:Ia(6,gb+3),y:Rb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Wa&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Hc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":ib]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=
+this,b=a.chart,c=b.renderer,d,e,f=+new Date,g=a.options,h=g.cursor,i=h&&{cursor:h},j;u(a.data,function(m){e=m.tracker;d=m.trackerArgs||m.shapeArgs;delete d.strokeWidth;if(m.y!==null)if(e)e.attr(d);else m.tracker=c[m.shapeType](d).attr({isTracker:f,fill:ce,visibility:a.visible?Ab:ob,zIndex:g.zIndex||1}).on(Kb?"touchstart":"mouseover",function(v){j=v.relatedTarget||v.fromElement;b.hoverSeries!==a&&Ga(j,"isTracker")!==f&&a.onMouseOver();m.onMouseOver()}).on("mouseout",function(v){if(!g.stickyTracking){j=
+v.relatedTarget||v.toElement;Ga(j,"isTracker")!==f&&a.onMouseOut()}}).css(i).add(m.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});sb.prototype.remove.apply(a,arguments)}});wb.column=hd;ma=yb(hd,
+{type:"bar",init:function(a){a.inverted=this.inverted=true;hd.prototype.init.apply(this,arguments)}});wb.bar=ma;ma=yb(sb,{type:"scatter",translate:function(){var a=this;sb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",
+function(){a.options.stickyTracking||a.onMouseOut()}).css(c)})},cleanData:function(){}});wb.scatter=ma;ma=yb(Oc,{init:function(){Oc.prototype.init.apply(this,arguments);var a=this,b;sa(a,{visible:a.visible!==false,name:A(a.name,"Slice")});b=function(){a.slice()};Qa(a,"select",b);Qa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Wa?!this.visible:a)?"show":"hide";this.group[g]();c&&
+c[g]();d&&d[g]();e&&e[g]();f&&f[g]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;oc(c,d);A(b,true);a=this.sliced=K(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});ma=yb(sb,{type:"pie",isCartesian:false,pointClass:ma,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=
+this.chart.counters.color},animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-kc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f=c.center.concat([c.size,c.innerSize||0]),g=this.chart,h=g.plotWidth,i=g.plotHeight,j,m,v,P=this.data,T=2*kc,Y,H=tb(h,i),U,z,M,y=c.dataLabels.distance;f=tc(f,function(C,Z){return(U=
+/%$/.test(C))?[h,i,H,H][Z]*ja(C)/100:C});this.getX=function(C,Z){v=Fa.asin((C-f[1])/(f[2]/2+y));return f[0]+(Z?-1:1)*rb(v)*(f[2]/2+y)};this.center=f;u(P,function(C){a+=C.y});u(P,function(C){Y=a?C.y/a:0;j=W(b*T*1E3)/1E3;b+=Y;m=W(b*T*1E3)/1E3;C.shapeType="arc";C.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:j,end:m};v=(m+j)/2;C.slicedTranslation=tc([rb(v)*d+g.plotLeft,Cb(v)*d+g.plotTop],W);z=rb(v)*f[2]/2;M=Cb(v)*f[2]/2;C.tooltipPos=[f[0]+z*0.7,f[1]+M*0.7];C.labelPos=[f[0]+z+rb(v)*y,f[1]+M+Cb(v)*
+y,f[0]+z+rb(v)*e,f[1]+M+Cb(v)*e,f[0]+z,f[1]+M,y<0?"center":v<T/4?"left":"right",v];C.percentage=Y*100;C.total=a});this.setTooltipPoints()},render:function(){this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;u(this.data,function(i){d=i.graphic;h=i.shapeArgs;e=i.group;g=i.shadowGroup;if(f&&!g)g=
+i.shadowGroup=b.g("shadow").attr({zIndex:4}).add();if(!e)e=i.group=b.g("point").attr({zIndex:5}).add();c=i.sliced?i.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);if(d)d.animate(h);else i.graphic=b.arc(h).attr(sa(i.pointAttr[ib],{"stroke-linejoin":"round"})).add(i.group).shadow(f,g);i.visible===false&&i.setVisible(false)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=A(d.connectorPadding,10),f=A(d.connectorWidth,1),
+g,h,i=A(d.softConnector,true),j=d.distance,m=this.center,v=m[2]/2;m=m[1];var P=j>0,T=[[],[]],Y,H,U,z,M=2,y;if(d.enabled){sb.prototype.drawDataLabels.apply(this);u(a,function(gb){if(gb.dataLabel)T[gb.labelPos[7]<kc/2?0:1].push(gb)});T[1].reverse();z=function(gb,Lb){return Lb.y-gb.y};for(a=T[0][0]&&T[0][0].dataLabel&&ja(T[0][0].dataLabel.styles.lineHeight);M--;){var C=[],Z=[],Sa=T[M],Na=Sa.length,Ea;for(y=m-v-j;y<=m+v+j;y+=a)C.push(y);U=C.length;if(Na>U){h=[].concat(Sa);h.sort(z);for(y=Na;y--;)h[y].rank=
+y;for(y=Na;y--;)Sa[y].rank>=U&&Sa.splice(y,1);Na=Sa.length}for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;b=9999;for(H=0;H<U;H++){g=bb(C[H]-h[1]);if(g<b){b=g;Ea=H}}if(Ea<y&&C[y]!==null)Ea=y;else{if(U<Na-y+Ea&&C[y]!==null)Ea=U-Na+y;for(;C[Ea]===null;)Ea++}Z.push({i:Ea,y:C[Ea]});C[Ea]=null}Z.sort(z);for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;g=b.dataLabel;H=Z.pop();Y=h[1];U=b.visible===false?ob:Ab;Ea=H.i;H=H.y;if(Y>H&&C[Ea+1]!==null||Y<H&&C[Ea-1]!==null)H=Y;Y=this.getX(Ea===0||Ea===C.length-1?Y:H,M);g.attr({visibility:U,
+align:h[6]})[g.moved?"animate":"attr"]({x:Y+d.x+({left:e,right:-e}[h[6]]||0),y:H+d.y});g.moved=true;if(P&&f){g=b.connector;h=i?[Za,Y+(h[6]==="left"?5:-5),H,"C",Y,H,2*h[2]-h[4],2*h[3]-h[5],h[2],h[3],Ka,h[4],h[5]]:[Za,Y+(h[6]==="left"?5:-5),H,Ka,h[2],h[3],Ka,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",U)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||b.color||"#606060",visibility:U,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:hd.prototype.drawTracker,
+getSymbol:function(){}});wb.pie=ma;db.Highcharts={Chart:Nd,dateFormat:Zc,pathAnim:Nc,getOptions:function(){return Xa},hasRtlBug:me,numberFormat:Ed,Point:Oc,Color:bc,Renderer:fd,seriesTypes:wb,setOptions:function(a){Xa=Ca(Xa,a);Id();return Xa},Series:sb,addEvent:Qa,removeEvent:pb,createElement:hb,discardElement:pc,css:Ja,each:u,extend:sa,map:tc,merge:Ca,pick:A,extendClass:yb,product:"Highcharts",version:"2.1.9"}})();
diff --git a/npm_assets/node_modules/html5shiv/test/html5shiv.html b/npm_assets/node_modules/html5shiv/test/html5shiv.html
new file mode 100644
index 0000000..28e20c0
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/html5shiv.html
@@ -0,0 +1,71 @@
+<!doctype html>
+<html lang="en" dir="ltr" id="html">
+ <head>
+ <meta charset="utf-8">
+ <title>html5shiv Test Suite</title>
+ <style>
+ body {
+ background: url(data/body-crash.jpg) no-repeat -999px -999px;
+ }
+ article {
+ border: 2px solid #8C8;
+ }
+ </style>
+ <link rel="stylesheet" media="screen" href="qunit/qunit.css">
+ <script src="../src/html5shiv-printshiv.js"></script>
+
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
+
+ <script src="qunit/qunit.js"></script>
+
+ <script src="unit/tests.js"></script>
+ </head>
+ <body id="body">
+ <h1 id="qunit-header">html5shiv Test Suite</h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+
+ <iframe class="test-frame" src="data/iframed-tests.html?disableMethodsBefore"></iframe>
+ <iframe class="test-frame" src="data/iframed-tests.html?disableMethodsAfter"></iframe>
+ <iframe class="test-frame" src="data/iframed-tests.html?addUnknownBefore"></iframe>
+ <iframe class="test-frame" src="data/iframed-tests.html?addUnknownAfter"></iframe>
+ <iframe class="test-frame" src="data/iframed-tests.html?disableCSS"></iframe>
+ <iframe class="test-frame" src="data/iframed-tests.html?noEmbed"></iframe>
+
+
+ <div id="qunit-fixture">
+ <abcxyz>
+ <div class="inside"></div>
+ </abcxyz>
+ <article>
+ <div class="inside"></div>
+ </article>
+ <aside>
+ <div class="inside"></div>
+ </aside>
+ <figcaption>
+ <div class="inside"></div>
+ </figcaption>
+ <figure>
+ <div class="inside"></div>
+ </figure>
+ <footer>
+ <div class="inside"></div>
+ </footer>
+ <header>
+ <div class="inside"></div>
+ </header>
+ <hgroup>
+ <div class="inside"></div>
+ </hgroup>
+ <nav>
+ <div class="inside"></div>
+ </nav>
+ <section>
+ <div class="inside"></div>
+ </section>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/iframe.1-1.html b/npm_assets/node_modules/html5shiv/test/iframe.1-1.html
new file mode 100644
index 0000000..b5affa6
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/iframe.1-1.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Test 1</title>
+ <link rel="stylesheet" href="style.css">
+ <script src="../src/html5shiv-printshiv.js"></script>
+ </head>
+ <body>
+ <section>
+ <p><a href="iframe.1-2.html">Change to Test Page 2</a></p>
+ </section>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/iframe.1-2.html b/npm_assets/node_modules/html5shiv/test/iframe.1-2.html
new file mode 100644
index 0000000..56ac8b3
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/iframe.1-2.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Test 2</title>
+ <link rel="stylesheet" href="style.css">
+ <script src="../src/html5shiv-printshiv.js"></script>
+ <body>
+ <section>
+ <p><a href="iframe.1-1.html">Change to Test Page 1</a> <span contenteditable>...</span></p>
+ </section>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/iframe.1.html b/npm_assets/node_modules/html5shiv/test/iframe.1.html
new file mode 100644
index 0000000..74c99e1
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/iframe.1.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>HTML5Shiv</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+ body {
+ color: #fff;
+ background: url(data/body-crash.jpg);
+ }
+ </style>
+ <script src="../src/html5shiv-printshiv.js"></script>
+ <script src="//use.typekit.com/fbz1vwc.js"></script>
+ <script>
+ Typekit.load();
+ </script>
+ </head>
+ <body>
+ <section>1</section>
+ <section>2</section>
+ <section style="border-color: red;">3</section>
+ <section>
+ <iframe src="iframe.1-1.html" style="width:100%;height:100%;" frameborder="0"></iframe>
+ </section>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/index.html b/npm_assets/node_modules/html5shiv/test/index.html
new file mode 100644
index 0000000..05f8fc7
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/index.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>IE&lt;9 HTML5 Shiv Tests</title>
+ <link rel="stylesheet" href="style.css">
+ <script src="../src/html5shiv-printshiv.js"></script>
+ </head>
+ <body>
+ <h1>
+ HTML5 Shiv Tests
+ </h1>
+ <h2>manual Print tests</h2>
+ <ul>
+ <li>
+ <a href="html5shiv.html">html5shiv testsuite</a>: <span class="pass">PASS</span>
+ </li>
+
+ </ul>
+ <h2>manual Print tests</h2>
+ <ul>
+ <li>
+ <a href="iframe.1.html">iframe.1.html</a>: <span class="pass">PASS</span>
+ </li>
+ <li>
+ <a href="mixed-test.html">mixed-test.html</a>: <span class="pass">PASS</span>
+ </li>
+
+ </ul>
+ <h2>additional tests</h2>
+ <ul>
+
+ <li>
+ <a href="object-test.html">object-test.html</a>: <span class="pass">PASS</span>
+ </li>
+
+ <li>
+ <a href="highcharts/area-basic.html">area-basic.html</a>: <span class="pass">PASS</span>
+ </li>
+ <li>
+ <a href="jquery-1.7.1/index.html">simplified jQuery test suite</a>:
+ </li>
+ </ul>
+ <body>
+</html>
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/dashboard.xml b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/dashboard.xml
new file mode 100644
index 0000000..5a6f561
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/dashboard.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dashboard>
+ <locations class="foo">
+ <location for="bar" checked="different">
+ <infowindowtab>
+ <tab title="Location"><![CDATA[blabla]]></tab>
+ <tab title="Users"><![CDATA[blublu]]></tab>
+ </infowindowtab>
+ </location>
+ </locations>
+</dashboard>
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/iframe.html b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/iframe.html
new file mode 100644
index 0000000..3ff26e1
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/iframe.html
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <title>iframe</title>
+ </head>
+ <body>
+ <div><span>span text</span></div>
+ </body>
+</html>
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/test.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/test.js
new file mode 100644
index 0000000..69f492d
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/test.js
@@ -0,0 +1,3 @@
+var foobar = "bar";
+jQuery('#ap').html('bar');
+ok( true, "test.js executed");
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testinit.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testinit.js
new file mode 100644
index 0000000..aeda243
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testinit.js
@@ -0,0 +1,121 @@
+var jQuery = this.jQuery || "jQuery", // For testing .noConflict()
+ $ = this.$ || "$",
+ originaljQuery = jQuery,
+ original$ = $,
+ amdDefined;
+
+/**
+ * Set up a mock AMD define function for testing AMD registration.
+ */
+function define(name, dependencies, callback) {
+ amdDefined = callback();
+}
+
+define.amd = {
+ jQuery: true
+};
+
+/**
+ * Returns an array of elements with the given IDs, eg.
+ * @example q("main", "foo", "bar")
+ * @result [<div id="main">, <span id="foo">, <input id="bar">]
+ */
+function q() {
+ var r = [];
+
+ for ( var i = 0; i < arguments.length; i++ ) {
+ r.push( document.getElementById( arguments[i] ) );
+ }
+
+ return r;
+}
+
+/**
+ * Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
+ * @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
+ */
+function t(a,b,c) {
+ var f = jQuery(b).get(), s = "";
+
+ for ( var i = 0; i < f.length; i++ ) {
+ s += (s && ",") + '"' + f[i].id + '"';
+ }
+
+ deepEqual(f, q.apply(q,c), a + " (" + b + ")");
+}
+
+var fireNative;
+if ( document.createEvent ) {
+ fireNative = function( node, type ) {
+ var event = document.createEvent('HTMLEvents');
+ event.initEvent( type, true, true );
+ node.dispatchEvent( event );
+ };
+} else {
+ fireNative = function( node, type ) {
+ var event = document.createEventObject();
+ node.fireEvent( 'on' + type, event );
+ };
+}
+
+/**
+ * Add random number to url to stop IE from caching
+ *
+ * @example url("data/test.html")
+ * @result "data/test.html?10538358428943"
+ *
+ * @example url("data/test.php?foo=bar")
+ * @result "data/test.php?foo=bar&10538358345554"
+ */
+function url(value) {
+ return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random()*100000);
+}
+
+(function () {
+ // Store the old counts so that we only assert on tests that have actually leaked,
+ // instead of asserting every time a test has leaked sometime in the past
+ var oldCacheLength = 0,
+ oldFragmentsLength = 0,
+ oldTimersLength = 0,
+ oldActive = 0;
+
+ /**
+ * Ensures that tests have cleaned up properly after themselves. Should be passed as the
+ * teardown function on all modules' lifecycle object.
+ */
+ this.moduleTeardown = function () {
+ var i, fragmentsLength = 0, cacheLength = 0;
+
+ // Allow QUnit.reset to clean up any attached elements before checking for leaks
+ QUnit.reset();
+
+ for ( i in jQuery.cache ) {
+ ++cacheLength;
+ }
+
+ jQuery.fragments = {};
+
+ for ( i in jQuery.fragments ) {
+ ++fragmentsLength;
+ }
+
+ // Because QUnit doesn't have a mechanism for retrieving the number of expected assertions for a test,
+ // if we unconditionally assert any of these, the test will fail with too many assertions :|
+ if ( cacheLength !== oldCacheLength ) {
+ equal( cacheLength, oldCacheLength, "No unit tests leak memory in jQuery.cache" );
+ oldCacheLength = cacheLength;
+ }
+ if ( fragmentsLength !== oldFragmentsLength ) {
+ equal( fragmentsLength, oldFragmentsLength, "No unit tests leak memory in jQuery.fragments" );
+ oldFragmentsLength = fragmentsLength;
+ }
+ if ( jQuery.timers.length !== oldTimersLength ) {
+ equal( jQuery.timers.length, oldTimersLength, "No timers are still running" );
+ oldTimersLength = jQuery.timers.length;
+ }
+ if ( jQuery.active !== oldActive ) {
+ equal( jQuery.active, 0, "No AJAX requests are still active" );
+ oldActive = jQuery.active;
+ }
+ }
+}()); \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testrunner.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testrunner.js
new file mode 100644
index 0000000..bdfbcac
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testrunner.js
@@ -0,0 +1,27 @@
+jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
+
+// jQuery-specific QUnit.reset
+(function() {
+ var reset = QUnit.reset,
+ ajaxSettings = jQuery.ajaxSettings;
+
+ QUnit.reset = function() {
+ reset.apply(this, arguments);
+ jQuery.event.global = {};
+ jQuery.ajaxSettings = jQuery.extend({}, ajaxSettings);
+ };
+})();
+
+// load testswarm agent
+(function() {
+ var url = window.location.search;
+ url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
+ if ( !url || url.indexOf("http") !== 0 ) {
+ return;
+ }
+
+ // (Temporarily) Disable Ajax tests to reduce network strain
+ // isLocal = QUnit.isLocal = true;
+
+ document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
+})();
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testsuite.css b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testsuite.css
new file mode 100644
index 0000000..d3e4b4e
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/testsuite.css
@@ -0,0 +1,128 @@
+/* for testing opacity set in styles in IE */
+ol#empty { opacity: 0; filter:Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff'); }
+
+div#fx-tests h4 {
+ background: red;
+}
+
+div#fx-tests h4.pass {
+ background: green;
+}
+
+div#fx-tests div.box {
+ background: red;
+ overflow: hidden;
+ border: 2px solid #000;
+}
+
+div#fx-tests div.overflow {
+ overflow: visible;
+}
+
+div.inline {
+ display: inline;
+}
+
+div.autoheight {
+ height: auto;
+}
+
+div.autowidth {
+ width: auto;
+}
+
+div.autoopacity {
+ opacity: auto;
+}
+
+div.largewidth {
+ width: 100px;
+}
+
+div.largeheight {
+ height: 100px;
+}
+
+div.largeopacity {
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
+}
+
+div.medwidth {
+ width: 50px;
+}
+
+div.medheight {
+ height: 50px;
+}
+
+div.medopacity {
+ opacity: 0.5;
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
+}
+
+div.nowidth {
+ width: 0px;
+}
+
+div.noheight {
+ height: 0px;
+}
+
+div.noopacity {
+ opacity: 0;
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
+}
+
+div.hidden {
+ display: none;
+}
+
+div#fx-tests div.widewidth {
+ background-repeat: repeat-x;
+}
+
+div#fx-tests div.wideheight {
+ background-repeat: repeat-y;
+}
+
+div#fx-tests div.widewidth.wideheight {
+ background-repeat: repeat;
+}
+
+div#fx-tests div.noback {
+ background-image: none;
+}
+
+div.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }
+div.chain div { position: absolute; top: 0px; left: 0px; }
+
+div.chain.test { background: red; }
+div.chain.test div { background: green; }
+
+div.chain.out { background: green; }
+div.chain.out div { background: red; display: none; }
+
+/* tests to ensure jQuery can determine the native display mode of elements
+ that have been set as display: none in stylesheets */
+div#show-tests * { display: none; }
+
+#nothiddendiv { font-size: 16px; }
+#nothiddendivchild.em { font-size: 2em; }
+#nothiddendivchild.prct { font-size: 150%; }
+
+/* For testing type on vml in IE #7071 */
+v\:oval { behavior:url(#default#VML); display:inline-block; }
+
+/* 8099 changes to default styles are read correctly */
+tt { display: none; }
+sup { display: none; }
+dfn { display: none; }
+
+/* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */
+body, div { background: url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; }
+
+/* #6652 REMOVE FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */
+#t6652 div { filter: alpha(opacity=50); }
+
+/* #10501 */
+section { background:#f0f; display:block; } \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/versioncheck.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/versioncheck.js
new file mode 100644
index 0000000..f4b7790
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/data/versioncheck.js
@@ -0,0 +1,8 @@
+// Run minified source from dist (do make first)
+// Should be loaded before QUnit but after src
+(function() {
+ if ( /jquery\=min/.test( window.location.search ) ) {
+ jQuery.noConflict( true );
+ document.write(unescape("%3Cscript%20src%3D%27../dist/jquery.min.js%27%3E%3C/script%3E"));
+ }
+})(); \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/index.html b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/index.html
new file mode 100644
index 0000000..1810d3b
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/index.html
@@ -0,0 +1,249 @@
+<!doctype html>
+<html lang="en" dir="ltr" id="html">
+ <head>
+ <meta charset="utf-8">
+ <title>jQuery Test Suite</title>
+ <link rel="stylesheet" media="screen" href="../qunit/qunit.css">
+ <link rel="stylesheet" media="screen" href="data/testsuite.css">
+ <script src="data/testinit.js"></script>
+ <script src="../../src/html5shiv-printshiv.js"></script>
+ <script src="//code.jquery.com/jquery-1.7.1.min.js"></script>
+ <script src="data/versioncheck.js"></script>
+ <script src="../qunit/qunit.js"></script>
+ <script src="data/testrunner.js"></script>
+ <script src="unit/core.js"></script>
+ <script src="unit/traversing.js"></script>
+ <script src="unit/manipulation.js"></script>
+ </head>
+ <body id="body">
+ <h1 id="qunit-header"><a href="/jquery/test/index.html">jQuery Test Suite</a>
+ <a href="?jquery=min">(minified)</a>
+ </h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+
+ <!-- Test HTML -->
+ <div id="nothiddendiv" style="height:1px;background:white;" class="nothiddendiv">
+ <div id="nothiddendivchild"></div>
+ </div>
+
+ <!-- this iframe is outside the #qunit-fixture so it won't reload constantly wasting time, but it means the tests must be "safe" and clean up after themselves -->
+ <iframe id="loadediframe" name="loadediframe" style="display:none;" src="data/iframe.html"></iframe>
+ <dl id="dl" style="position:absolute;top:-32767px;left:-32767px;width:1px">
+ <div id="qunit-fixture">
+ <p id="firstp">See <a id="simon1" href="http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector" rel="bookmark">this blog entry</a> for more information.</p>
+ <p id="ap">
+ Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>,
+ <a id="groups" href="http://groups.google.com/" class="GROUPS">Google Groups (Link)</a>.
+ This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>:
+ <a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a>
+ </p>
+ <div id="foo">
+ <p id="sndp">Everything inside the red border is inside a div with <code>id="foo"</code>.</p>
+ <p lang="en" id="en">This is a normal link: <a id="yahoo" href="http://www.yahoo.com/" class="blogTest">Yahoo</a></p>
+ <p id="sap">This link has <code><a href="#2" id="anchor2">class="blog"</a></code>: <a href="http://simon.incutio.com/" class="blog link" id="simon">Simon Willison's Weblog</a></p>
+ </div>
+ <span id="name+value"></span>
+ <p id="first">Try them out:</p>
+ <ul id="firstUL"></ul>
+ <ol id="empty"></ol>
+ <form id="form" action="formaction">
+ <label for="action" id="label-for">Action:</label>
+ <input type="text" name="action" value="Test" id="text1" maxlength="30">
+ <input type="text" name="text2" value="Test" id="text2" disabled="disabled">
+ <input type="radio" name="radio1" id="radio1" value="on">
+
+ <input type="radio" name="radio2" id="radio2" checked="checked">
+ <input type="checkbox" name="check" id="check1" checked="checked">
+ <input type="checkbox" id="check2" value="on">
+
+ <input type="hidden" name="hidden" id="hidden1">
+ <input type="text" style="display:none;" name="foo[bar]" id="hidden2">
+
+ <input type="text" id="name" name="name" value="name">
+ <input type="search" id="search" name="search" value="search">
+
+ <button id="button" name="button" type="button">Button</button>
+ <textarea id="area1" maxlength="30">foobar</textarea>
+
+ <select name="select1" id="select1">
+ <option id="option1a" class="emptyopt" value="">Nothing</option>
+ <option id="option1b" value="1">1</option>
+ <option id="option1c" value="2">2</option>
+ <option id="option1d" value="3">3</option>
+ </select>
+ <select name="select2" id="select2">
+ <option id="option2a" class="emptyopt" value="">Nothing</option>
+ <option id="option2b" value="1">1</option>
+ <option id="option2c" value="2">2</option>
+ <option id="option2d" selected="selected" value="3">3</option>
+ </select>
+ <select name="select3" id="select3" multiple="multiple">
+ <option id="option3a" class="emptyopt" value="">Nothing</option>
+ <option id="option3b" selected="selected" value="1">1</option>
+ <option id="option3c" selected="selected" value="2">2</option>
+ <option id="option3d" value="3">3</option>
+ <option id="option3e">no value</option>
+ </select>
+ <select name="select4" id="select4" multiple="multiple">
+ <optgroup disabled="disabled">
+ <option id="option4a" class="emptyopt" value="">Nothing</option>
+ <option id="option4b" disabled="disabled" selected="selected" value="1">1</option>
+ <option id="option4c" selected="selected" value="2">2</option>
+ </optgroup>
+ <option selected="selected" disabled="disabled" id="option4d" value="3">3</option>
+ <option id="option4e">no value</option>
+ </select>
+ <select name="select5" id="select5">
+ <option id="option5a" value="3">1</option>
+ <option id="option5b" value="2">2</option>
+ <option id="option5c" value="1" data-attr="">3</option>
+ </select>
+
+ <object id="object1" codebase="stupid">
+ <param name="p1" value="x1">
+ <param name="p2" value="x2">
+ </object>
+
+ <span id="台北Táiběi"></span>
+ <span id="台北" lang="中文"></span>
+ <span id="utf8class1" class="台北Táiběi 台北"></span>
+ <span id="utf8class2" class="台北"></span>
+ <span id="foo:bar" class="foo:bar"></span>
+ <span id="test.foo[5]bar" class="test.foo[5]bar"></span>
+ <foo_bar id="foobar">test element</foo_bar>
+ </form>
+ <b id="floatTest">Float test.</b>
+ <iframe id="iframe" name="iframe"></iframe>
+ <form id="lengthtest">
+ <input type="text" id="length" name="test">
+ <input type="text" id="idTest" name="id">
+ </form>
+ <table id="table"></table>
+
+ <form id="name-tests">
+ <!-- Inputs with a grouped name attribute. -->
+ <input name="types[]" id="types_all" type="checkbox" value="all">
+ <input name="types[]" id="types_anime" type="checkbox" value="anime">
+ <input name="types[]" id="types_movie" type="checkbox" value="movie">
+ </form>
+
+ <form id="testForm" action="#" method="get">
+ <textarea name="T3" rows="2" cols="15">?
+Z</textarea>
+ <input type="hidden" name="H1" value="x">
+ <input type="hidden" name="H2">
+ <input name="PWD" type="password" value="">
+ <input name="T1" type="text">
+ <input name="T2" type="text" value="YES" readonly="readonly">
+ <input type="checkbox" name="C1" value="1">
+ <input type="checkbox" name="C2">
+ <input type="radio" name="R1" value="1">
+ <input type="radio" name="R1" value="2">
+ <input type="text" name="My Name" value="me">
+ <input type="reset" name="reset" value="NO">
+ <select name="S1">
+ <option value="abc">ABC</option>
+ <option value="abc">ABC</option>
+ <option value="abc">ABC</option>
+ </select>
+ <select name="S2" multiple="multiple" size="3">
+ <option value="abc">ABC</option>
+ <option value="abc">ABC</option>
+ <option value="abc">ABC</option>
+ </select>
+ <select name="S3">
+ <option selected="selected">YES</option>
+ </select>
+ <select name="S4">
+ <option value="" selected="selected">NO</option>
+ </select>
+ <input type="submit" name="sub1" value="NO">
+ <input type="submit" name="sub2" value="NO">
+ <input type="image" name="sub3" value="NO">
+ <button name="sub4" type="submit" value="NO">NO</button>
+ <input name="D1" type="text" value="NO" disabled="disabled">
+ <input type="checkbox" checked="checked" disabled="disabled" name="D2" value="NO">
+ <input type="radio" name="D3" value="NO" checked="checked" disabled="disabled">
+ <select name="D4" disabled="disabled">
+ <option selected="selected" value="NO">NO</option>
+ </select>
+ <input id="list-test" type="text">
+ <datalist id="datalist">
+ <option value="option"></option>
+ </datalist>
+ </form>
+ <div id="moretests">
+ <form>
+ <div id="checkedtest" style="display:none;">
+ <input type="radio" name="checkedtestradios" checked="checked">
+ <input type="radio" name="checkedtestradios" value="on">
+ <input type="checkbox" name="checkedtestcheckboxes" checked="checked">
+ <input type="checkbox" name="checkedtestcheckboxes">
+ </div>
+ </form>
+ <div id="nonnodes"><span>hi</span> there <!-- mon ami --></div>
+ <div id="t2037">
+ <div><div class="hidden">hidden</div></div>
+ </div>
+ <div id="t6652">
+ <div></div>
+ </div>
+ <div id="no-clone-exception"><object><embed></embed></object></div>
+ </div>
+
+ <div id="tabindex-tests">
+ <ol id="listWithTabIndex" tabindex="5">
+ <li id="foodWithNegativeTabIndex" tabindex="-1">Rice</li>
+ <li id="foodNoTabIndex">Beans</li>
+ <li>Blinis</li>
+ <li>Tofu</li>
+ </ol>
+ <div id="divWithNoTabIndex">I'm hungry. I should...</div>
+ <span>...</span><a href="#" id="linkWithNoTabIndex">Eat lots of food</a><span>...</span> |
+ <span>...</span><a href="#" id="linkWithTabIndex" tabindex="2">Eat a little food</a><span>...</span> |
+ <span>...</span><a href="#" id="linkWithNegativeTabIndex" tabindex="-1">Eat no food</a><span>...</span>
+ <span>...</span><a id="linkWithNoHrefWithNoTabIndex">Eat a burger</a><span>...</span>
+ <span>...</span><a id="linkWithNoHrefWithTabIndex" tabindex="1">Eat some funyuns</a><span>...</span>
+ <span>...</span><a id="linkWithNoHrefWithNegativeTabIndex" tabindex="-1">Eat some funyuns</a><span>...</span>
+ </div>
+
+ <div id="liveHandlerOrder">
+ <span id="liveSpan1"><a href="#" id="liveLink1"></a></span>
+ <span id="liveSpan2"><a href="#" id="liveLink2"></a></span>
+ </div>
+
+ <div id="siblingTest">
+ <em id="siblingfirst">1</em>
+ <em id="siblingnext">2</em>
+ </div>
+ </div>
+ </dl>
+ <div id="fx-test-group" style="position:absolute;width:1px;height:1px;overflow:hidden;">
+ <div id="fx-queue" name="test">
+ <div id="fadein" class='chain test' name='div'>fadeIn<div>fadeIn</div></div>
+ <div id="fadeout" class='chain test out'>fadeOut<div>fadeOut</div></div>
+
+ <div id="show" class='chain test'>show<div>show</div></div>
+ <div id="hide" class='chain test out'>hide<div>hide</div></div>
+
+ <div id="togglein" class='chain test'>togglein<div>togglein</div></div>
+ <div id="toggleout" class='chain test out'>toggleout<div>toggleout</div></div>
+
+ <div id="slideup" class='chain test'>slideUp<div>slideUp</div></div>
+ <div id="slidedown" class='chain test out'>slideDown<div>slideDown</div></div>
+
+ <div id="slidetogglein" class='chain test'>slideToggleIn<div>slideToggleIn</div></div>
+ <div id="slidetoggleout" class='chain test out'>slideToggleOut<div>slideToggleOut</div></div>
+
+ <div id="fadetogglein" class='chain test'>fadeToggleIn<div>fadeToggleIn</div></div>
+ <div id="fadetoggleout" class='chain test out'>fadeToggleOut<div>fadeToggleOut</div></div>
+
+ <div id="fadeto" class='chain test'>fadeTo<div>fadeTo</div></div>
+ </div>
+ <div id="fx-tests"></div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/core.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/core.js
new file mode 100644
index 0000000..6d8dfaa
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/core.js
@@ -0,0 +1,1249 @@
+module("core", { teardown: moduleTeardown });
+
+test("Basic requirements", function() {
+ expect(7);
+ ok( Array.prototype.push, "Array.push()" );
+ ok( Function.prototype.apply, "Function.apply()" );
+ ok( document.getElementById, "getElementById" );
+ ok( document.getElementsByTagName, "getElementsByTagName" );
+ ok( RegExp, "RegExp" );
+ ok( jQuery, "jQuery" );
+ ok( $, "$" );
+});
+
+test("jQuery()", function() {
+ expect(29);
+
+ // Basic constructor's behavior
+
+ equal( jQuery().length, 0, "jQuery() === jQuery([])" );
+ equal( jQuery(undefined).length, 0, "jQuery(undefined) === jQuery([])" );
+ equal( jQuery(null).length, 0, "jQuery(null) === jQuery([])" );
+ equal( jQuery("").length, 0, "jQuery('') === jQuery([])" );
+ equal( jQuery("#").length, 0, "jQuery('#') === jQuery([])" );
+
+ var obj = jQuery("div");
+ equal( jQuery(obj).selector, "div", "jQuery(jQueryObj) == jQueryObj" );
+
+ // can actually yield more than one, when iframes are included, the window is an array as well
+ equal( jQuery(window).length, 1, "Correct number of elements generated for jQuery(window)" );
+
+
+ var main = jQuery("#qunit-fixture");
+ deepEqual( jQuery("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );
+
+/*
+ // disabled since this test was doing nothing. i tried to fix it but i'm not sure
+ // what the expected behavior should even be. FF returns "\n" for the text node
+ // make sure this is handled
+ var crlfContainer = jQuery('<p>\r\n</p>');
+ var x = crlfContainer.contents().get(0).nodeValue;
+ equal( x, what???, "Check for \\r and \\n in jQuery()" );
+*/
+
+ /* // Disabled until we add this functionality in
+ var pass = true;
+ try {
+ jQuery("<div>Testing</div>").appendTo(document.getElementById("iframe").contentDocument.body);
+ } catch(e){
+ pass = false;
+ }
+ ok( pass, "jQuery('&lt;tag&gt;') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );*/
+
+ var code = jQuery("<code/>");
+ equal( code.length, 1, "Correct number of elements generated for code" );
+ equal( code.parent().length, 0, "Make sure that the generated HTML has no parent." );
+ var img = jQuery("<img/>");
+ equal( img.length, 1, "Correct number of elements generated for img" );
+ equal( img.parent().length, 0, "Make sure that the generated HTML has no parent." );
+ var div = jQuery("<div/><hr/><code/><b/>");
+ equal( div.length, 4, "Correct number of elements generated for div hr code b" );
+ equal( div.parent().length, 0, "Make sure that the generated HTML has no parent." );
+
+ equal( jQuery([1,2,3]).get(1), 2, "Test passing an array to the factory" );
+
+ equal( jQuery(document.body).get(0), jQuery("body").get(0), "Test passing an html node to the factory" );
+
+ var exec = false;
+
+ var elem = jQuery("<div/>", {
+ width: 10,
+ css: { paddingLeft:1, paddingRight:1 },
+ click: function(){ ok(exec, "Click executed."); },
+ text: "test",
+ "class": "test2",
+ id: "test3"
+ });
+
+ equal( elem[0].style.width, "10px", "jQuery() quick setter width");
+ equal( elem[0].style.paddingLeft, "1px", "jQuery quick setter css");
+ equal( elem[0].style.paddingRight, "1px", "jQuery quick setter css");
+ equal( elem[0].childNodes.length, 1, "jQuery quick setter text");
+ equal( elem[0].firstChild.nodeValue, "test", "jQuery quick setter text");
+ equal( elem[0].className, "test2", "jQuery() quick setter class");
+ equal( elem[0].id, "test3", "jQuery() quick setter id");
+
+ exec = true;
+ elem.click();
+
+ // manually clean up detached elements
+ elem.remove();
+
+ for ( var i = 0; i < 3; ++i ) {
+ elem = jQuery("<input type='text' value='TEST' />");
+ }
+ equal( elem[0].defaultValue, "TEST", "Ensure cached nodes are cloned properly (Bug #6655)" );
+
+ // manually clean up detached elements
+ elem.remove();
+
+ equal( jQuery(" <div/> ").length, 1, "Make sure whitespace is trimmed." );
+ equal( jQuery(" a<div/>b ").length, 1, "Make sure whitespace and other characters are trimmed." );
+
+ var long = "";
+ for ( var i = 0; i < 128; i++ ) {
+ long += "12345678";
+ }
+
+ equal( jQuery(" <div>" + long + "</div> ").length, 1, "Make sure whitespace is trimmed on long strings." );
+ equal( jQuery(" a<div>" + long + "</div>b ").length, 1, "Make sure whitespace and other characters are trimmed on long strings." );
+});
+
+test("selector state", function() {
+ expect(31);
+
+ var test;
+
+ test = jQuery(undefined);
+ equal( test.selector, "", "Empty jQuery Selector" );
+ equal( test.context, undefined, "Empty jQuery Context" );
+
+ test = jQuery(document);
+ equal( test.selector, "", "Document Selector" );
+ equal( test.context, document, "Document Context" );
+
+ test = jQuery(document.body);
+ equal( test.selector, "", "Body Selector" );
+ equal( test.context, document.body, "Body Context" );
+
+ test = jQuery("#qunit-fixture");
+ equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" );
+ equal( test.context, document, "#qunit-fixture Context" );
+
+ test = jQuery("#notfoundnono");
+ equal( test.selector, "#notfoundnono", "#notfoundnono Selector" );
+ equal( test.context, document, "#notfoundnono Context" );
+
+ test = jQuery("#qunit-fixture", document);
+ equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" );
+ equal( test.context, document, "#qunit-fixture Context" );
+
+ test = jQuery("#qunit-fixture", document.body);
+ equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" );
+ equal( test.context, document.body, "#qunit-fixture Context" );
+
+ // Test cloning
+ test = jQuery(test);
+ equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" );
+ equal( test.context, document.body, "#qunit-fixture Context" );
+
+ test = jQuery(document.body).find("#qunit-fixture");
+ equal( test.selector, "#qunit-fixture", "#qunit-fixture find Selector" );
+ equal( test.context, document.body, "#qunit-fixture find Context" );
+
+ test = jQuery("#qunit-fixture").filter("div");
+ equal( test.selector, "#qunit-fixture.filter(div)", "#qunit-fixture filter Selector" );
+ equal( test.context, document, "#qunit-fixture filter Context" );
+
+ test = jQuery("#qunit-fixture").not("div");
+ equal( test.selector, "#qunit-fixture.not(div)", "#qunit-fixture not Selector" );
+ equal( test.context, document, "#qunit-fixture not Context" );
+
+ test = jQuery("#qunit-fixture").filter("div").not("div");
+ equal( test.selector, "#qunit-fixture.filter(div).not(div)", "#qunit-fixture filter, not Selector" );
+ equal( test.context, document, "#qunit-fixture filter, not Context" );
+
+ test = jQuery("#qunit-fixture").filter("div").not("div").end();
+ equal( test.selector, "#qunit-fixture.filter(div)", "#qunit-fixture filter, not, end Selector" );
+ equal( test.context, document, "#qunit-fixture filter, not, end Context" );
+
+ test = jQuery("#qunit-fixture").parent("body");
+ equal( test.selector, "#qunit-fixture.parent(body)", "#qunit-fixture parent Selector" );
+ equal( test.context, document, "#qunit-fixture parent Context" );
+
+ test = jQuery("#qunit-fixture").eq(0);
+ equal( test.selector, "#qunit-fixture.slice(0,1)", "#qunit-fixture eq Selector" );
+ equal( test.context, document, "#qunit-fixture eq Context" );
+
+ var d = "<div />";
+ equal(
+ jQuery(d).appendTo(jQuery(d)).selector,
+ jQuery(d).appendTo(d).selector,
+ "manipulation methods make same selector for jQuery objects"
+ );
+});
+
+test( "globalEval", function() {
+
+ expect( 3 );
+
+ jQuery.globalEval( "var globalEvalTest = true;" );
+ ok( window.globalEvalTest, "Test variable declarations are global" );
+
+ window.globalEvalTest = false;
+
+ jQuery.globalEval( "globalEvalTest = true;" );
+ ok( window.globalEvalTest, "Test variable assignments are global" );
+
+ window.globalEvalTest = false;
+
+ jQuery.globalEval( "this.globalEvalTest = true;" );
+ ok( window.globalEvalTest, "Test context (this) is the window object" );
+
+ window.globalEvalTest = undefined;
+});
+
+
+
+test("noConflict", function() {
+ expect(7);
+
+ var $$ = jQuery;
+
+ equal( jQuery, jQuery.noConflict(), "noConflict returned the jQuery object" );
+ equal( jQuery, $$, "Make sure jQuery wasn't touched." );
+ equal( $, original$, "Make sure $ was reverted." );
+
+ jQuery = $ = $$;
+
+ equal( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" );
+ equal( jQuery, originaljQuery, "Make sure jQuery was reverted." );
+ equal( $, original$, "Make sure $ was reverted." );
+ ok( $$("#qunit-fixture").html("test"), "Make sure that jQuery still works." );
+
+ jQuery = $$;
+});
+
+test("trim", function() {
+ expect(9);
+
+ var nbsp = String.fromCharCode(160);
+
+ equal( jQuery.trim("hello "), "hello", "trailing space" );
+ equal( jQuery.trim(" hello"), "hello", "leading space" );
+ equal( jQuery.trim(" hello "), "hello", "space on both sides" );
+ equal( jQuery.trim(" " + nbsp + "hello " + nbsp + " "), "hello", "&nbsp;" );
+
+ equal( jQuery.trim(), "", "Nothing in." );
+ equal( jQuery.trim( undefined ), "", "Undefined" );
+ equal( jQuery.trim( null ), "", "Null" );
+ equal( jQuery.trim( 5 ), "5", "Number" );
+ equal( jQuery.trim( false ), "false", "Boolean" );
+});
+
+test("type", function() {
+ expect(23);
+
+ equal( jQuery.type(null), "null", "null" );
+ equal( jQuery.type(undefined), "undefined", "undefined" );
+ equal( jQuery.type(true), "boolean", "Boolean" );
+ equal( jQuery.type(false), "boolean", "Boolean" );
+ equal( jQuery.type(Boolean(true)), "boolean", "Boolean" );
+ equal( jQuery.type(0), "number", "Number" );
+ equal( jQuery.type(1), "number", "Number" );
+ equal( jQuery.type(Number(1)), "number", "Number" );
+ equal( jQuery.type(""), "string", "String" );
+ equal( jQuery.type("a"), "string", "String" );
+ equal( jQuery.type(String("a")), "string", "String" );
+ equal( jQuery.type({}), "object", "Object" );
+ equal( jQuery.type(/foo/), "regexp", "RegExp" );
+ equal( jQuery.type(new RegExp("asdf")), "regexp", "RegExp" );
+ equal( jQuery.type([1]), "array", "Array" );
+ equal( jQuery.type(new Date()), "date", "Date" );
+ equal( jQuery.type(new Function("return;")), "function", "Function" );
+ equal( jQuery.type(function(){}), "function", "Function" );
+ equal( jQuery.type(window), "object", "Window" );
+ equal( jQuery.type(document), "object", "Document" );
+ equal( jQuery.type(document.body), "object", "Element" );
+ equal( jQuery.type(document.createTextNode("foo")), "object", "TextNode" );
+ equal( jQuery.type(document.getElementsByTagName("*")), "object", "NodeList" );
+});
+
+test("isPlainObject", function() {
+ expect(15);
+
+ stop();
+
+ // The use case that we want to match
+ ok(jQuery.isPlainObject({}), "{}");
+
+ // Not objects shouldn't be matched
+ ok(!jQuery.isPlainObject(""), "string");
+ ok(!jQuery.isPlainObject(0) && !jQuery.isPlainObject(1), "number");
+ ok(!jQuery.isPlainObject(true) && !jQuery.isPlainObject(false), "boolean");
+ ok(!jQuery.isPlainObject(null), "null");
+ ok(!jQuery.isPlainObject(undefined), "undefined");
+
+ // Arrays shouldn't be matched
+ ok(!jQuery.isPlainObject([]), "array");
+
+ // Instantiated objects shouldn't be matched
+ ok(!jQuery.isPlainObject(new Date), "new Date");
+
+ var fn = function(){};
+
+ // Functions shouldn't be matched
+ ok(!jQuery.isPlainObject(fn), "fn");
+
+ // Again, instantiated objects shouldn't be matched
+ ok(!jQuery.isPlainObject(new fn), "new fn (no methods)");
+
+ // Makes the function a little more realistic
+ // (and harder to detect, incidentally)
+ fn.prototype = {someMethod: function(){}};
+
+ // Again, instantiated objects shouldn't be matched
+ ok(!jQuery.isPlainObject(new fn), "new fn");
+
+ // DOM Element
+ ok(!jQuery.isPlainObject(document.createElement("div")), "DOM Element");
+
+ // Window
+ ok(!jQuery.isPlainObject(window), "window");
+
+ try {
+ jQuery.isPlainObject( window.location );
+ ok( true, "Does not throw exceptions on host objects");
+ } catch ( e ) {
+ ok( false, "Does not throw exceptions on host objects -- FAIL");
+ }
+
+ try {
+ var iframe = document.createElement("iframe");
+ document.body.appendChild(iframe);
+
+ window.iframeDone = function(otherObject){
+ // Objects from other windows should be matched
+ ok(jQuery.isPlainObject(new otherObject), "new otherObject");
+ document.body.removeChild( iframe );
+ start();
+ };
+
+ var doc = iframe.contentDocument || iframe.contentWindow.document;
+ doc.open();
+ doc.write("<body onload='window.parent.iframeDone(Object);'>");
+ doc.close();
+ } catch(e) {
+ document.body.removeChild( iframe );
+
+ ok(true, "new otherObject - iframes not supported");
+ start();
+ }
+});
+
+test("isFunction", function() {
+ expect(19);
+
+ // Make sure that false values return false
+ ok( !jQuery.isFunction(), "No Value" );
+ ok( !jQuery.isFunction( null ), "null Value" );
+ ok( !jQuery.isFunction( undefined ), "undefined Value" );
+ ok( !jQuery.isFunction( "" ), "Empty String Value" );
+ ok( !jQuery.isFunction( 0 ), "0 Value" );
+
+ // Check built-ins
+ // Safari uses "(Internal Function)"
+ ok( jQuery.isFunction(String), "String Function("+String+")" );
+ ok( jQuery.isFunction(Array), "Array Function("+Array+")" );
+ ok( jQuery.isFunction(Object), "Object Function("+Object+")" );
+ ok( jQuery.isFunction(Function), "Function Function("+Function+")" );
+
+ // When stringified, this could be misinterpreted
+ var mystr = "function";
+ ok( !jQuery.isFunction(mystr), "Function String" );
+
+ // When stringified, this could be misinterpreted
+ var myarr = [ "function" ];
+ ok( !jQuery.isFunction(myarr), "Function Array" );
+
+ // When stringified, this could be misinterpreted
+ var myfunction = { "function": "test" };
+ ok( !jQuery.isFunction(myfunction), "Function Object" );
+
+ // Make sure normal functions still work
+ var fn = function(){};
+ ok( jQuery.isFunction(fn), "Normal Function" );
+
+ var obj = document.createElement("object");
+
+ // Firefox says this is a function
+ ok( !jQuery.isFunction(obj), "Object Element" );
+
+ // IE says this is an object
+ // Since 1.3, this isn't supported (#2968)
+ //ok( jQuery.isFunction(obj.getAttribute), "getAttribute Function" );
+
+ var nodes = document.body.childNodes;
+
+ // Safari says this is a function
+ ok( !jQuery.isFunction(nodes), "childNodes Property" );
+
+ var first = document.body.firstChild;
+
+ // Normal elements are reported ok everywhere
+ ok( !jQuery.isFunction(first), "A normal DOM Element" );
+
+ var input = document.createElement("input");
+ input.type = "text";
+ document.body.appendChild( input );
+
+ // IE says this is an object
+ // Since 1.3, this isn't supported (#2968)
+ //ok( jQuery.isFunction(input.focus), "A default function property" );
+
+ document.body.removeChild( input );
+
+ var a = document.createElement("a");
+ a.href = "some-function";
+ document.body.appendChild( a );
+
+ // This serializes with the word 'function' in it
+ ok( !jQuery.isFunction(a), "Anchor Element" );
+
+ document.body.removeChild( a );
+
+ // Recursive function calls have lengths and array-like properties
+ function callme(callback){
+ function fn(response){
+ callback(response);
+ }
+
+ ok( jQuery.isFunction(fn), "Recursive Function Call" );
+
+ fn({ some: "data" });
+ };
+
+ callme(function(){
+ callme(function(){});
+ });
+});
+
+test( "isNumeric", function() {
+ expect( 37 );
+
+ var t = jQuery.isNumeric,
+ Traditionalists = function(n) {
+ this.value = n;
+ this.toString = function(){
+ return String(this.value);
+ };
+ },
+ answer = new Traditionalists( "42" ),
+ rong = new Traditionalists( "Devo" );
+
+ ok( t("-10"), "Negative integer string");
+ ok( t("0"), "Zero string");
+ ok( t("5"), "Positive integer string");
+ ok( t(-16), "Negative integer number");
+ ok( t(0), "Zero integer number");
+ ok( t(32), "Positive integer number");
+ ok( t("040"), "Octal integer literal string");
+ ok( t(0144), "Octal integer literal");
+ ok( t("0xFF"), "Hexadecimal integer literal string");
+ ok( t(0xFFF), "Hexadecimal integer literal");
+ ok( t("-1.6"), "Negative floating point string");
+ ok( t("4.536"), "Positive floating point string");
+ ok( t(-2.6), "Negative floating point number");
+ ok( t(3.1415), "Positive floating point number");
+ ok( t(8e5), "Exponential notation");
+ ok( t("123e-2"), "Exponential notation string");
+ ok( t(answer), "Custom .toString returning number");
+ equal( t(""), false, "Empty string");
+ equal( t(" "), false, "Whitespace characters string");
+ equal( t("\t\t"), false, "Tab characters string");
+ equal( t("abcdefghijklm1234567890"), false, "Alphanumeric character string");
+ equal( t("xabcdefx"), false, "Non-numeric character string");
+ equal( t(true), false, "Boolean true literal");
+ equal( t(false), false, "Boolean false literal");
+ equal( t("bcfed5.2"), false, "Number with preceding non-numeric characters");
+ equal( t("7.2acdgs"), false, "Number with trailling non-numeric characters");
+ equal( t(undefined), false, "Undefined value");
+ equal( t(null), false, "Null value");
+ equal( t(NaN), false, "NaN value");
+ equal( t(Infinity), false, "Infinity primitive");
+ equal( t(Number.POSITIVE_INFINITY), false, "Positive Infinity");
+ equal( t(Number.NEGATIVE_INFINITY), false, "Negative Infinity");
+ equal( t(rong), false, "Custom .toString returning non-number");
+ equal( t({}), false, "Empty object");
+ equal( t(function(){} ), false, "Instance of a function");
+ equal( t( new Date ), false, "Instance of a Date");
+ equal( t(function(){} ), false, "Instance of a function");
+});
+
+test("isXMLDoc - HTML", function() {
+ expect(4);
+
+ ok( !jQuery.isXMLDoc( document ), "HTML document" );
+ ok( !jQuery.isXMLDoc( document.documentElement ), "HTML documentElement" );
+ ok( !jQuery.isXMLDoc( document.body ), "HTML Body Element" );
+
+ var iframe = document.createElement("iframe");
+ document.body.appendChild( iframe );
+
+ try {
+ var body = jQuery(iframe).contents()[0];
+
+ try {
+ ok( !jQuery.isXMLDoc( body ), "Iframe body element" );
+ } catch(e) {
+ ok( false, "Iframe body element exception" );
+ }
+
+ } catch(e) {
+ ok( true, "Iframe body element - iframe not working correctly" );
+ }
+
+ document.body.removeChild( iframe );
+});
+
+test("XSS via location.hash", function() {
+ expect(1);
+
+ stop();
+ jQuery._check9521 = function(x){
+ ok( x, "script called from #id-like selector with inline handler" );
+ jQuery("#check9521").remove();
+ delete jQuery._check9521;
+ start();
+ };
+ try {
+ // This throws an error because it's processed like an id
+ jQuery( '#<img id="check9521" src="no-such-.gif" onerror="jQuery._check9521(false)">' ).appendTo("#qunit-fixture");
+ } catch (err) {
+ jQuery._check9521(true);
+ };
+});
+
+if ( !isLocal ) {
+test("isXMLDoc - XML", function() {
+ expect(3);
+ stop();
+ jQuery.get("data/dashboard.xml", function(xml) {
+ ok( jQuery.isXMLDoc( xml ), "XML document" );
+ ok( jQuery.isXMLDoc( xml.documentElement ), "XML documentElement" );
+ ok( jQuery.isXMLDoc( jQuery("tab", xml)[0] ), "XML Tab Element" );
+ start();
+ });
+});
+}
+
+test("isWindow", function() {
+ expect( 12 );
+
+ ok( jQuery.isWindow(window), "window" );
+ ok( !jQuery.isWindow(), "empty" );
+ ok( !jQuery.isWindow(null), "null" );
+ ok( !jQuery.isWindow(undefined), "undefined" );
+ ok( !jQuery.isWindow(document), "document" );
+ ok( !jQuery.isWindow(document.documentElement), "documentElement" );
+ ok( !jQuery.isWindow(""), "string" );
+ ok( !jQuery.isWindow(1), "number" );
+ ok( !jQuery.isWindow(true), "boolean" );
+ ok( !jQuery.isWindow({}), "object" );
+ // HMMM
+ // ok( !jQuery.isWindow({ setInterval: function(){} }), "fake window" );
+ ok( !jQuery.isWindow(/window/), "regexp" );
+ ok( !jQuery.isWindow(function(){}), "function" );
+});
+
+test("jQuery('html')", function() {
+ expect(18);
+
+ QUnit.reset();
+ jQuery.foo = false;
+ var s = jQuery("<script>jQuery.foo='test';</script>")[0];
+ ok( s, "Creating a script" );
+ ok( !jQuery.foo, "Make sure the script wasn't executed prematurely" );
+ jQuery("body").append("<script>jQuery.foo='test';</script>");
+ ok( jQuery.foo, "Executing a scripts contents in the right context" );
+
+ // Test multi-line HTML
+ var div = jQuery("<div>\r\nsome text\n<p>some p</p>\nmore text\r\n</div>")[0];
+ equal( div.nodeName.toUpperCase(), "DIV", "Make sure we're getting a div." );
+ equal( div.firstChild.nodeType, 3, "Text node." );
+ equal( div.lastChild.nodeType, 3, "Text node." );
+ equal( div.childNodes[1].nodeType, 1, "Paragraph." );
+ equal( div.childNodes[1].firstChild.nodeType, 3, "Paragraph text." );
+
+ QUnit.reset();
+ ok( jQuery("<link rel='stylesheet'/>")[0], "Creating a link" );
+
+ ok( !jQuery("<script/>")[0].parentNode, "Create a script" );
+
+ ok( jQuery("<input/>").attr("type", "hidden"), "Create an input and set the type." );
+
+ var j = jQuery("<span>hi</span> there <!-- mon ami -->");
+ ok( j.length >= 2, "Check node,textnode,comment creation (some browsers delete comments)" );
+
+ ok( !jQuery("<option>test</option>")[0].selected, "Make sure that options are auto-selected #2050" );
+
+ ok( jQuery("<div></div>")[0], "Create a div with closing tag." );
+ ok( jQuery("<table></table>")[0], "Create a table with closing tag." );
+
+ // Test very large html string #7990
+ var i;
+ var li = "<li>very large html string</li>";
+ var html = ["<ul>"];
+ for ( i = 0; i < 50000; i += 1 ) {
+ html.push(li);
+ }
+ html.push("</ul>");
+ html = jQuery(html.join(""))[0];
+ equal( html.nodeName.toUpperCase(), "UL");
+ equal( html.firstChild.nodeName.toUpperCase(), "LI");
+ equal( html.childNodes.length, 50000 );
+});
+
+test("jQuery('html', context)", function() {
+ expect(1);
+
+ var $div = jQuery("<div/>")[0];
+ var $span = jQuery("<span/>", $div);
+ equal($span.length, 1, "Verify a span created with a div context works, #1763");
+});
+
+if ( !isLocal ) {
+test("jQuery(selector, xml).text(str) - Loaded via XML document", function() {
+ expect(2);
+ stop();
+ jQuery.get("data/dashboard.xml", function(xml) {
+ // tests for #1419 where IE was a problem
+ var tab = jQuery("tab", xml).eq(0);
+ equal( tab.text(), "blabla", "Verify initial text correct" );
+ tab.text("newtext");
+ equal( tab.text(), "newtext", "Verify new text correct" );
+ start();
+ });
+});
+}
+
+test("end()", function() {
+ expect(3);
+ equal( "Yahoo", jQuery("#yahoo").parent().end().text(), "Check for end" );
+ ok( jQuery("#yahoo").end(), "Check for end with nothing to end" );
+
+ var x = jQuery("#yahoo");
+ x.parent();
+ equal( "Yahoo", jQuery("#yahoo").text(), "Check for non-destructive behaviour" );
+});
+
+test("length", function() {
+ expect(1);
+ equal( jQuery("#qunit-fixture p").length, 6, "Get Number of Elements Found" );
+});
+
+test("size()", function() {
+ expect(1);
+ equal( jQuery("#qunit-fixture p").size(), 6, "Get Number of Elements Found" );
+});
+
+test("get()", function() {
+ expect(1);
+ deepEqual( jQuery("#qunit-fixture p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" );
+});
+
+test("toArray()", function() {
+ expect(1);
+ deepEqual( jQuery("#qunit-fixture p").toArray(),
+ q("firstp","ap","sndp","en","sap","first"),
+ "Convert jQuery object to an Array" )
+})
+
+test("inArray()", function() {
+ expect(19);
+
+ var selections = {
+ p: q("firstp", "sap", "ap", "first"),
+ em: q("siblingnext", "siblingfirst"),
+ div: q("qunit-testrunner-toolbar", "nothiddendiv", "nothiddendivchild", "foo"),
+ a: q("mark", "groups", "google", "simon1"),
+ empty: []
+ },
+ tests = {
+ p: { elem: jQuery("#ap")[0], index: 2 },
+ em: { elem: jQuery("#siblingfirst")[0], index: 1 },
+ div: { elem: jQuery("#nothiddendiv")[0], index: 1 },
+ a: { elem: jQuery("#simon1")[0], index: 3 }
+ },
+ falseTests = {
+ p: jQuery("#liveSpan1")[0],
+ em: jQuery("#nothiddendiv")[0],
+ empty: ""
+ };
+
+ jQuery.each( tests, function( key, obj ) {
+ equal( jQuery.inArray( obj.elem, selections[ key ] ), obj.index, "elem is in the array of selections of its tag" );
+ // Third argument (fromIndex)
+ equal( !!~jQuery.inArray( obj.elem, selections[ key ], 5 ), false, "elem is NOT in the array of selections given a starting index greater than its position" );
+ equal( !!~jQuery.inArray( obj.elem, selections[ key ], 1 ), true, "elem is in the array of selections given a starting index less than or equal to its position" );
+ equal( !!~jQuery.inArray( obj.elem, selections[ key ], -3 ), true, "elem is in the array of selections given a negative index" );
+ });
+
+ jQuery.each( falseTests, function( key, elem ) {
+ equal( !!~jQuery.inArray( elem, selections[ key ] ), false, "elem is NOT in the array of selections" );
+ });
+
+});
+
+test("get(Number)", function() {
+ expect(2);
+ equal( jQuery("#qunit-fixture p").get(0), document.getElementById("firstp"), "Get A Single Element" );
+ strictEqual( jQuery("#firstp").get(1), undefined, "Try get with index larger elements count" );
+});
+
+test("get(-Number)",function() {
+ expect(2);
+ equal( jQuery("p").get(-1), document.getElementById("first"), "Get a single element with negative index" );
+ strictEqual( jQuery("#firstp").get(-2), undefined, "Try get with index negative index larger then elements count" );
+})
+
+test("each(Function)", function() {
+ expect(1);
+ var div = jQuery("div");
+ div.each(function(){this.foo = "zoo";});
+ var pass = true;
+ for ( var i = 0; i < div.size(); i++ ) {
+ if ( div.get(i).foo != "zoo" ) pass = false;
+ }
+ ok( pass, "Execute a function, Relative" );
+});
+
+test("slice()", function() {
+ expect(7);
+
+ var $links = jQuery("#ap a");
+
+ deepEqual( $links.slice(1,2).get(), q("groups"), "slice(1,2)" );
+ deepEqual( $links.slice(1).get(), q("groups", "anchor1", "mark"), "slice(1)" );
+ deepEqual( $links.slice(0,3).get(), q("google", "groups", "anchor1"), "slice(0,3)" );
+ deepEqual( $links.slice(-1).get(), q("mark"), "slice(-1)" );
+
+ deepEqual( $links.eq(1).get(), q("groups"), "eq(1)" );
+ deepEqual( $links.eq("2").get(), q("anchor1"), "eq('2')" );
+ deepEqual( $links.eq(-1).get(), q("mark"), "eq(-1)" );
+});
+
+test("first()/last()", function() {
+ expect(4);
+
+ var $links = jQuery("#ap a"), $none = jQuery("asdf");
+
+ deepEqual( $links.first().get(), q("google"), "first()" );
+ deepEqual( $links.last().get(), q("mark"), "last()" );
+
+ deepEqual( $none.first().get(), [], "first() none" );
+ deepEqual( $none.last().get(), [], "last() none" );
+});
+
+test("map()", function() {
+ expect(8);
+
+ deepEqual(
+ jQuery("#ap").map(function(){
+ return jQuery(this).find("a").get();
+ }).get(),
+ q("google", "groups", "anchor1", "mark"),
+ "Array Map"
+ );
+
+ deepEqual(
+ jQuery("#ap > a").map(function(){
+ return this.parentNode;
+ }).get(),
+ q("ap","ap","ap"),
+ "Single Map"
+ );
+
+ //for #2616
+ var keys = jQuery.map( {a:1,b:2}, function( v, k ){
+ return k;
+ });
+ equal( keys.join(""), "ab", "Map the keys from a hash to an array" );
+
+ var values = jQuery.map( {a:1,b:2}, function( v, k ){
+ return v;
+ });
+ equal( values.join(""), "12", "Map the values from a hash to an array" );
+
+ // object with length prop
+ var values = jQuery.map( {a:1,b:2, length:3}, function( v, k ){
+ return v;
+ });
+ equal( values.join(""), "123", "Map the values from a hash with a length property to an array" );
+
+ var scripts = document.getElementsByTagName("script");
+ var mapped = jQuery.map( scripts, function( v, k ){
+ return v;
+ });
+ equal( mapped.length, scripts.length, "Map an array(-like) to a hash" );
+
+ var nonsense = document.getElementsByTagName("asdf");
+ var mapped = jQuery.map( nonsense, function( v, k ){
+ return v;
+ });
+ equal( mapped.length, nonsense.length, "Map an empty array(-like) to a hash" );
+
+ var flat = jQuery.map( Array(4), function( v, k ){
+ return k % 2 ? k : [k,k,k];//try mixing array and regular returns
+ });
+ equal( flat.join(""), "00012223", "try the new flatten technique(#2616)" );
+});
+
+test("jQuery.merge()", function() {
+ expect(8);
+
+ var parse = jQuery.merge;
+
+ deepEqual( parse([],[]), [], "Empty arrays" );
+
+ deepEqual( parse([1],[2]), [1,2], "Basic" );
+ deepEqual( parse([1,2],[3,4]), [1,2,3,4], "Basic" );
+
+ deepEqual( parse([1,2],[]), [1,2], "Second empty" );
+ deepEqual( parse([],[1,2]), [1,2], "First empty" );
+
+ // Fixed at [5998], #3641
+ deepEqual( parse([-2,-1], [0,1,2]), [-2,-1,0,1,2], "Second array including a zero (falsy)");
+
+ // After fixing #5527
+ deepEqual( parse([], [null, undefined]), [null, undefined], "Second array including null and undefined values");
+ deepEqual( parse({length:0}, [1,2]), {length:2, 0:1, 1:2}, "First array like");
+});
+
+test("jQuery.extend(Object, Object)", function() {
+ expect(28);
+
+ var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },
+ options = { xnumber2: 1, xstring2: "x", xxx: "newstring" },
+ optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" },
+ merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "x", xxx: "newstring" },
+ deep1 = { foo: { bar: true } },
+ deep1copy = { foo: { bar: true } },
+ deep2 = { foo: { baz: true }, foo2: document },
+ deep2copy = { foo: { baz: true }, foo2: document },
+ deepmerged = { foo: { bar: true, baz: true }, foo2: document },
+ arr = [1, 2, 3],
+ nestedarray = { arr: arr };
+
+ jQuery.extend(settings, options);
+ deepEqual( settings, merged, "Check if extended: settings must be extended" );
+ deepEqual( options, optionsCopy, "Check if not modified: options must not be modified" );
+
+ jQuery.extend(settings, null, options);
+ deepEqual( settings, merged, "Check if extended: settings must be extended" );
+ deepEqual( options, optionsCopy, "Check if not modified: options must not be modified" );
+
+ jQuery.extend(true, deep1, deep2);
+ deepEqual( deep1.foo, deepmerged.foo, "Check if foo: settings must be extended" );
+ deepEqual( deep2.foo, deep2copy.foo, "Check if not deep2: options must not be modified" );
+ equal( deep1.foo2, document, "Make sure that a deep clone was not attempted on the document" );
+
+ ok( jQuery.extend(true, {}, nestedarray).arr !== arr, "Deep extend of object must clone child array" );
+
+ // #5991
+ ok( jQuery.isArray( jQuery.extend(true, { arr: {} }, nestedarray).arr ), "Cloned array heve to be an Array" );
+ ok( jQuery.isPlainObject( jQuery.extend(true, { arr: arr }, { arr: {} }).arr ), "Cloned object heve to be an plain object" );
+
+ var empty = {};
+ var optionsWithLength = { foo: { length: -1 } };
+ jQuery.extend(true, empty, optionsWithLength);
+ deepEqual( empty.foo, optionsWithLength.foo, "The length property must copy correctly" );
+
+ empty = {};
+ var optionsWithDate = { foo: { date: new Date } };
+ jQuery.extend(true, empty, optionsWithDate);
+ deepEqual( empty.foo, optionsWithDate.foo, "Dates copy correctly" );
+
+ var myKlass = function() {};
+ var customObject = new myKlass();
+ var optionsWithCustomObject = { foo: { date: customObject } };
+ empty = {};
+ jQuery.extend(true, empty, optionsWithCustomObject);
+ ok( empty.foo && empty.foo.date === customObject, "Custom objects copy correctly (no methods)" );
+
+ // Makes the class a little more realistic
+ myKlass.prototype = { someMethod: function(){} };
+ empty = {};
+ jQuery.extend(true, empty, optionsWithCustomObject);
+ ok( empty.foo && empty.foo.date === customObject, "Custom objects copy correctly" );
+
+ var ret = jQuery.extend(true, { foo: 4 }, { foo: new Number(5) } );
+ ok( ret.foo == 5, "Wrapped numbers copy correctly" );
+
+ var nullUndef;
+ nullUndef = jQuery.extend({}, options, { xnumber2: null });
+ ok( nullUndef.xnumber2 === null, "Check to make sure null values are copied");
+
+ nullUndef = jQuery.extend({}, options, { xnumber2: undefined });
+ ok( nullUndef.xnumber2 === options.xnumber2, "Check to make sure undefined values are not copied");
+
+ nullUndef = jQuery.extend({}, options, { xnumber0: null });
+ ok( nullUndef.xnumber0 === null, "Check to make sure null values are inserted");
+
+ var target = {};
+ var recursive = { foo:target, bar:5 };
+ jQuery.extend(true, target, recursive);
+ deepEqual( target, { bar:5 }, "Check to make sure a recursive obj doesn't go never-ending loop by not copying it over" );
+
+ var ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); // 1907
+ equal( ret.foo.length, 1, "Check to make sure a value with coersion 'false' copies over when necessary to fix #1907" );
+
+ var ret = jQuery.extend(true, { foo: "1,2,3" }, { foo: [1, 2, 3] } );
+ ok( typeof ret.foo != "string", "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" );
+
+ var ret = jQuery.extend(true, { foo:"bar" }, { foo:null } );
+ ok( typeof ret.foo !== "undefined", "Make sure a null value doesn't crash with deep extend, for #1908" );
+
+ var obj = { foo:null };
+ jQuery.extend(true, obj, { foo:"notnull" } );
+ equal( obj.foo, "notnull", "Make sure a null value can be overwritten" );
+
+ function func() {}
+ jQuery.extend(func, { key: "value" } );
+ equal( func.key, "value", "Verify a function can be extended" );
+
+ var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },
+ defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },
+ options1 = { xnumber2: 1, xstring2: "x" },
+ options1Copy = { xnumber2: 1, xstring2: "x" },
+ options2 = { xstring2: "xx", xxx: "newstringx" },
+ options2Copy = { xstring2: "xx", xxx: "newstringx" },
+ merged2 = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "xx", xxx: "newstringx" };
+
+ var settings = jQuery.extend({}, defaults, options1, options2);
+ deepEqual( settings, merged2, "Check if extended: settings must be extended" );
+ deepEqual( defaults, defaultsCopy, "Check if not modified: options1 must not be modified" );
+ deepEqual( options1, options1Copy, "Check if not modified: options1 must not be modified" );
+ deepEqual( options2, options2Copy, "Check if not modified: options2 must not be modified" );
+});
+
+test("jQuery.each(Object,Function)", function() {
+ expect(14);
+ jQuery.each( [0,1,2], function(i, n){
+ equal( i, n, "Check array iteration" );
+ });
+
+ jQuery.each( [5,6,7], function(i, n){
+ equal( i, n - 5, "Check array iteration" );
+ });
+
+ jQuery.each( { name: "name", lang: "lang" }, function(i, n){
+ equal( i, n, "Check object iteration" );
+ });
+
+ var total = 0;
+ jQuery.each([1,2,3], function(i,v){ total += v; });
+ equal( total, 6, "Looping over an array" );
+ total = 0;
+ jQuery.each([1,2,3], function(i,v){ total += v; if ( i == 1 ) return false; });
+ equal( total, 3, "Looping over an array, with break" );
+ total = 0;
+ jQuery.each({"a":1,"b":2,"c":3}, function(i,v){ total += v; });
+ equal( total, 6, "Looping over an object" );
+ total = 0;
+ jQuery.each({"a":3,"b":3,"c":3}, function(i,v){ total += v; return false; });
+ equal( total, 3, "Looping over an object, with break" );
+
+ var f = function(){};
+ f.foo = "bar";
+ jQuery.each(f, function(i){
+ f[i] = "baz";
+ });
+ equal( "baz", f.foo, "Loop over a function" );
+
+ var stylesheet_count = 0;
+ jQuery.each(document.styleSheets, function(i){
+ stylesheet_count++;
+ });
+ //html5shiv may add 1-2 stylesheets
+ ok(stylesheet_count > 1 && stylesheet_count < 5, "should not throw an error in IE while looping over document.styleSheets and return proper amount");
+
+});
+
+test("jQuery.makeArray", function(){
+ expect(17);
+
+ equal( jQuery.makeArray(jQuery("html>*"))[0].nodeName.toUpperCase(), "HEAD", "Pass makeArray a jQuery object" );
+
+ equal( jQuery.makeArray(document.getElementsByName("PWD")).slice(0,1)[0].name, "PWD", "Pass makeArray a nodelist" );
+
+ equal( (function(){ return jQuery.makeArray(arguments); })(1,2).join(""), "12", "Pass makeArray an arguments array" );
+
+ equal( jQuery.makeArray([1,2,3]).join(""), "123", "Pass makeArray a real array" );
+
+ equal( jQuery.makeArray().length, 0, "Pass nothing to makeArray and expect an empty array" );
+
+ equal( jQuery.makeArray( 0 )[0], 0 , "Pass makeArray a number" );
+
+ equal( jQuery.makeArray( "foo" )[0], "foo", "Pass makeArray a string" );
+
+ equal( jQuery.makeArray( true )[0].constructor, Boolean, "Pass makeArray a boolean" );
+
+ equal( jQuery.makeArray( document.createElement("div") )[0].nodeName.toUpperCase(), "DIV", "Pass makeArray a single node" );
+
+ equal( jQuery.makeArray( {length:2, 0:"a", 1:"b"} ).join(""), "ab", "Pass makeArray an array like map (with length)" );
+
+ ok( !!jQuery.makeArray( document.documentElement.childNodes ).slice(0,1)[0].nodeName, "Pass makeArray a childNodes array" );
+
+ // function, is tricky as it has length
+ equal( jQuery.makeArray( function(){ return 1;} )[0](), 1, "Pass makeArray a function" );
+
+ //window, also has length
+ equal( jQuery.makeArray(window)[0], window, "Pass makeArray the window" );
+
+ equal( jQuery.makeArray(/a/)[0].constructor, RegExp, "Pass makeArray a regex" );
+
+ ok( jQuery.makeArray(document.getElementById("form")).length >= 13, "Pass makeArray a form (treat as elements)" );
+
+ // For #5610
+ deepEqual( jQuery.makeArray({length: "0"}), [], "Make sure object is coerced properly.");
+ deepEqual( jQuery.makeArray({length: "5"}), [], "Make sure object is coerced properly.");
+});
+
+test("jQuery.inArray", function(){
+ expect(3);
+
+ equal( jQuery.inArray( 0, false ), -1 , "Search in 'false' as array returns -1 and doesn't throw exception" );
+
+ equal( jQuery.inArray( 0, null ), -1 , "Search in 'null' as array returns -1 and doesn't throw exception" );
+
+ equal( jQuery.inArray( 0, undefined ), -1 , "Search in 'undefined' as array returns -1 and doesn't throw exception" );
+});
+
+test("jQuery.isEmptyObject", function(){
+ expect(2);
+
+ equal(true, jQuery.isEmptyObject({}), "isEmptyObject on empty object literal" );
+ equal(false, jQuery.isEmptyObject({a:1}), "isEmptyObject on non-empty object literal" );
+
+ // What about this ?
+ // equal(true, jQuery.isEmptyObject(null), "isEmptyObject on null" );
+});
+
+test("jQuery.proxy", function(){
+ expect(7);
+
+ var test = function(){ equal( this, thisObject, "Make sure that scope is set properly." ); };
+ var thisObject = { foo: "bar", method: test };
+
+ // Make sure normal works
+ test.call( thisObject );
+
+ // Basic scoping
+ jQuery.proxy( test, thisObject )();
+
+ // Another take on it
+ jQuery.proxy( thisObject, "method" )();
+
+ // Make sure it doesn't freak out
+ equal( jQuery.proxy( null, thisObject ), undefined, "Make sure no function was returned." );
+
+ // Partial application
+ var test2 = function( a ){ equal( a, "pre-applied", "Ensure arguments can be pre-applied." ); };
+ jQuery.proxy( test2, null, "pre-applied" )();
+
+ // Partial application w/ normal arguments
+ var test3 = function( a, b ){ equal( b, "normal", "Ensure arguments can be pre-applied and passed as usual." ); };
+ jQuery.proxy( test3, null, "pre-applied" )( "normal" );
+
+ // Test old syntax
+ var test4 = { meth: function( a ){ equal( a, "boom", "Ensure old syntax works." ); } };
+ jQuery.proxy( test4, "meth" )( "boom" );
+});
+
+test("jQuery.parseJSON", function(){
+ expect(8);
+
+ equal( jQuery.parseJSON(), null, "Nothing in, null out." );
+ equal( jQuery.parseJSON( null ), null, "Nothing in, null out." );
+ equal( jQuery.parseJSON( "" ), null, "Nothing in, null out." );
+
+ deepEqual( jQuery.parseJSON("{}"), {}, "Plain object parsing." );
+ deepEqual( jQuery.parseJSON("{\"test\":1}"), {"test":1}, "Plain object parsing." );
+
+ deepEqual( jQuery.parseJSON("\n{\"test\":1}"), {"test":1}, "Make sure leading whitespaces are handled." );
+
+ try {
+ jQuery.parseJSON("{a:1}");
+ ok( false, "Test malformed JSON string." );
+ } catch( e ) {
+ ok( true, "Test malformed JSON string." );
+ }
+
+ try {
+ jQuery.parseJSON("{'a':1}");
+ ok( false, "Test malformed JSON string." );
+ } catch( e ) {
+ ok( true, "Test malformed JSON string." );
+ }
+});
+
+test("jQuery.parseXML", 4, function(){
+ var xml, tmp;
+ try {
+ xml = jQuery.parseXML( "<p>A <b>well-formed</b> xml string</p>" );
+ tmp = xml.getElementsByTagName( "p" )[ 0 ];
+ ok( !!tmp, "<p> present in document" );
+ tmp = tmp.getElementsByTagName( "b" )[ 0 ];
+ ok( !!tmp, "<b> present in document" );
+ strictEqual( tmp.childNodes[ 0 ].nodeValue, "well-formed", "<b> text is as expected" );
+ } catch (e) {
+ strictEqual( e, undefined, "unexpected error" );
+ }
+ try {
+ xml = jQuery.parseXML( "<p>Not a <<b>well-formed</b> xml string</p>" );
+ ok( false, "invalid xml not detected" );
+ } catch( e ) {
+ strictEqual( e.message, "Invalid XML: <p>Not a <<b>well-formed</b> xml string</p>", "invalid xml detected" );
+ }
+});
+
+test("jQuery.sub() - Static Methods", function(){
+ expect(18);
+ var Subclass = jQuery.sub();
+ Subclass.extend({
+ topLevelMethod: function() {return this.debug;},
+ debug: false,
+ config: {
+ locale: "en_US"
+ },
+ setup: function(config) {
+ this.extend(true, this.config, config);
+ }
+ });
+ Subclass.fn.extend({subClassMethod: function() { return this;}});
+
+ //Test Simple Subclass
+ ok(Subclass.topLevelMethod() === false, "Subclass.topLevelMethod thought debug was true");
+ ok(Subclass.config.locale == "en_US", Subclass.config.locale + " is wrong!");
+ deepEqual(Subclass.config.test, undefined, "Subclass.config.test is set incorrectly");
+ equal(jQuery.ajax, Subclass.ajax, "The subclass failed to get all top level methods");
+
+ //Create a SubSubclass
+ var SubSubclass = Subclass.sub();
+
+ //Make Sure the SubSubclass inherited properly
+ ok(SubSubclass.topLevelMethod() === false, "SubSubclass.topLevelMethod thought debug was true");
+ ok(SubSubclass.config.locale == "en_US", SubSubclass.config.locale + " is wrong!");
+ deepEqual(SubSubclass.config.test, undefined, "SubSubclass.config.test is set incorrectly");
+ equal(jQuery.ajax, SubSubclass.ajax, "The subsubclass failed to get all top level methods");
+
+ //Modify The Subclass and test the Modifications
+ SubSubclass.fn.extend({subSubClassMethod: function() { return this;}});
+ SubSubclass.setup({locale: "es_MX", test: "worked"});
+ SubSubclass.debug = true;
+ SubSubclass.ajax = function() {return false;};
+ ok(SubSubclass.topLevelMethod(), "SubSubclass.topLevelMethod thought debug was false");
+ deepEqual(SubSubclass(document).subClassMethod, Subclass.fn.subClassMethod, "Methods Differ!");
+ ok(SubSubclass.config.locale == "es_MX", SubSubclass.config.locale + " is wrong!");
+ ok(SubSubclass.config.test == "worked", "SubSubclass.config.test is set incorrectly");
+ notEqual(jQuery.ajax, SubSubclass.ajax, "The subsubclass failed to get all top level methods");
+
+ //This shows that the modifications to the SubSubClass did not bubble back up to it's superclass
+ ok(Subclass.topLevelMethod() === false, "Subclass.topLevelMethod thought debug was true");
+ ok(Subclass.config.locale == "en_US", Subclass.config.locale + " is wrong!");
+ deepEqual(Subclass.config.test, undefined, "Subclass.config.test is set incorrectly");
+ deepEqual(Subclass(document).subSubClassMethod, undefined, "subSubClassMethod set incorrectly");
+ equal(jQuery.ajax, Subclass.ajax, "The subclass failed to get all top level methods");
+});
+
+test("jQuery.sub() - .fn Methods", function(){
+ expect(378);
+
+ var Subclass = jQuery.sub(),
+ SubclassSubclass = Subclass.sub(),
+ jQueryDocument = jQuery(document),
+ selectors, contexts, methods, method, arg, description;
+
+ jQueryDocument.toString = function(){ return "jQueryDocument"; };
+
+ Subclass.fn.subclassMethod = function(){};
+ SubclassSubclass.fn.subclassSubclassMethod = function(){};
+
+ selectors = [
+ "body",
+ "html, body",
+ "<div></div>"
+ ];
+
+ methods = [ // all methods that return a new jQuery instance
+ ["eq", 1],
+ ["add", document],
+ ["end"],
+ ["has"],
+ ["closest", "div"],
+ ["filter", document],
+ ["find", "div"]
+ ];
+
+ contexts = [undefined, document, jQueryDocument];
+
+ jQuery.each(selectors, function(i, selector){
+
+ jQuery.each(methods, function(){
+ method = this[0];
+ arg = this[1];
+
+ jQuery.each(contexts, function(i, context){
+
+ description = "(\""+selector+"\", "+context+")."+method+"("+(arg||"")+")";
+
+ deepEqual(
+ jQuery(selector, context)[method](arg).subclassMethod, undefined,
+ "jQuery"+description+" doesn't have Subclass methods"
+ );
+ deepEqual(
+ jQuery(selector, context)[method](arg).subclassSubclassMethod, undefined,
+ "jQuery"+description+" doesn't have SubclassSubclass methods"
+ );
+ deepEqual(
+ Subclass(selector, context)[method](arg).subclassMethod, Subclass.fn.subclassMethod,
+ "Subclass"+description+" has Subclass methods"
+ );
+ deepEqual(
+ Subclass(selector, context)[method](arg).subclassSubclassMethod, undefined,
+ "Subclass"+description+" doesn't have SubclassSubclass methods"
+ );
+ deepEqual(
+ SubclassSubclass(selector, context)[method](arg).subclassMethod, Subclass.fn.subclassMethod,
+ "SubclassSubclass"+description+" has Subclass methods"
+ );
+ deepEqual(
+ SubclassSubclass(selector, context)[method](arg).subclassSubclassMethod, SubclassSubclass.fn.subclassSubclassMethod,
+ "SubclassSubclass"+description+" has SubclassSubclass methods"
+ );
+
+ });
+ });
+ });
+
+});
+
+test("jQuery.camelCase()", function() {
+
+ var tests = {
+ "foo-bar": "fooBar",
+ "foo-bar-baz": "fooBarBaz",
+ "girl-u-want": "girlUWant",
+ "the-4th-dimension": "the4thDimension",
+ "-o-tannenbaum": "OTannenbaum",
+ "-moz-illa": "MozIlla",
+ "-ms-take": "msTake"
+ };
+
+ expect(7);
+
+ jQuery.each( tests, function( key, val ) {
+ equal( jQuery.camelCase( key ), val, "Converts: " + key + " => " + val );
+ });
+});
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/manipulation.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/manipulation.js
new file mode 100644
index 0000000..6b4a9e0
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/manipulation.js
@@ -0,0 +1,1701 @@
+module("manipulation", { teardown: moduleTeardown });
+
+// Ensure that an extended Array prototype doesn't break jQuery
+Array.prototype.arrayProtoFn = function(arg) { throw("arrayProtoFn should not be called"); };
+
+var bareObj = function(value) { return value; };
+var functionReturningObj = function(value) { return (function() { return value; }); };
+
+test("text()", function() {
+ expect(3);
+ var expected = "This link has class=\"blog\": Simon Willison's Weblog";
+ equal( jQuery("#sap").text(), expected, "Check for merged text of more then one element." );
+
+ // Check serialization of text values
+ equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retreived from .text()." );
+ notEqual( jQuery(document).text(), "", "Retrieving text for the document retrieves all text (#10724).");
+});
+
+var testText = function(valueObj) {
+ expect(4);
+ var val = valueObj("<div><b>Hello</b> cruel world!</div>");
+ equal( jQuery("#foo").text(val)[0].innerHTML.replace(/>/g, "&gt;"), "&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; cruel world!&lt;/div&gt;", "Check escaped text" );
+
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ j.text(valueObj("hi!"));
+ equal( jQuery(j[0]).text(), "hi!", "Check node,textnode,comment with text()" );
+ equal( j[1].nodeValue, " there ", "Check node,textnode,comment with text()" );
+
+ // Blackberry 4.6 doesn't maintain comments in the DOM
+ equal( jQuery("#nonnodes")[0].childNodes.length < 3 ? 8 : j[2].nodeType, 8, "Check node,textnode,comment with text()" );
+};
+
+test("text(String)", function() {
+ testText(bareObj);
+});
+
+test("text(Function)", function() {
+ testText(functionReturningObj);
+});
+
+test("text(Function) with incoming value", function() {
+ expect(2);
+
+ var old = "This link has class=\"blog\": Simon Willison's Weblog";
+
+ jQuery("#sap").text(function(i, val) {
+ equal( val, old, "Make sure the incoming value is correct." );
+ return "foobar";
+ });
+
+ equal( jQuery("#sap").text(), "foobar", "Check for merged text of more then one element." );
+
+ QUnit.reset();
+});
+
+var testWrap = function(val) {
+ expect(19);
+ var defaultText = "Try them out:";
+ var result = jQuery("#first").wrap(val( "<div class='red'><span></span></div>" )).text();
+ equal( defaultText, result, "Check for wrapping of on-the-fly html" );
+ ok( jQuery("#first").parent().parent().is(".red"), "Check if wrapper has class 'red'" );
+
+ QUnit.reset();
+ result = jQuery("#first").wrap(val( document.getElementById("empty") )).parent();
+ ok( result.is("ol"), "Check for element wrapping" );
+ equal( result.text(), defaultText, "Check for element wrapping" );
+
+ QUnit.reset();
+ jQuery("#check1").click(function() {
+ var checkbox = this;
+ ok( checkbox.checked, "Checkbox's state is erased after wrap() action, see #769" );
+ jQuery(checkbox).wrap(val( "<div id='c1' style='display:none;'></div>" ));
+ ok( checkbox.checked, "Checkbox's state is erased after wrap() action, see #769" );
+ }).click();
+
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ j.wrap(val( "<i></i>" ));
+
+ // Blackberry 4.6 doesn't maintain comments in the DOM
+ equal( jQuery("#nonnodes > i").length, jQuery("#nonnodes")[0].childNodes.length, "Check node,textnode,comment wraps ok" );
+ equal( jQuery("#nonnodes > i").text(), j.text(), "Check node,textnode,comment wraps doesn't hurt text" );
+
+ // Try wrapping a disconnected node
+ var cacheLength = 0;
+ for (var i in jQuery.cache) {
+ cacheLength++;
+ }
+
+ j = jQuery("<label/>").wrap(val( "<li/>" ));
+ equal( j[0].nodeName.toUpperCase(), "LABEL", "Element is a label" );
+ equal( j[0].parentNode.nodeName.toUpperCase(), "LI", "Element has been wrapped" );
+
+ for (i in jQuery.cache) {
+ cacheLength--;
+ }
+ equal(cacheLength, 0, "No memory leak in jQuery.cache (bug #7165)");
+
+ // Wrap an element containing a text node
+ j = jQuery("<span/>").wrap("<div>test</div>");
+ equal( j[0].previousSibling.nodeType, 3, "Make sure the previous node is a text element" );
+ equal( j[0].parentNode.nodeName.toUpperCase(), "DIV", "And that we're in the div element." );
+
+ // Try to wrap an element with multiple elements (should fail)
+ j = jQuery("<div><span></span></div>").children().wrap("<p></p><div></div>");
+ equal( j[0].parentNode.parentNode.childNodes.length, 1, "There should only be one element wrapping." );
+ equal( j.length, 1, "There should only be one element (no cloning)." );
+ equal( j[0].parentNode.nodeName.toUpperCase(), "P", "The span should be in the paragraph." );
+
+ // Wrap an element with a jQuery set
+ j = jQuery("<span/>").wrap(jQuery("<div></div>"));
+ equal( j[0].parentNode.nodeName.toLowerCase(), "div", "Wrapping works." );
+
+ // Wrap an element with a jQuery set and event
+ result = jQuery("<div></div>").click(function(){
+ ok(true, "Event triggered.");
+
+ // Remove handlers on detached elements
+ result.unbind();
+ jQuery(this).unbind();
+ });
+
+ j = jQuery("<span/>").wrap(result);
+ equal( j[0].parentNode.nodeName.toLowerCase(), "div", "Wrapping works." );
+
+ j.parent().trigger("click");
+
+ // clean up attached elements
+ QUnit.reset();
+}
+
+test("wrap(String|Element)", function() {
+ testWrap(bareObj);
+});
+
+test("wrap(Function)", function() {
+ testWrap(functionReturningObj);
+});
+
+test("wrap(Function) with index (#10177)", function() {
+ var expectedIndex = 0,
+ targets = jQuery("#qunit-fixture p");
+
+ expect(targets.length);
+ targets.wrap(function(i) {
+ equal( i, expectedIndex, "Check if the provided index (" + i + ") is as expected (" + expectedIndex + ")" );
+ expectedIndex++;
+
+ return "<div id='wrap_index_'" + i + "'></div>";
+ });
+});
+
+test("wrap(String) consecutive elements (#10177)", function() {
+ var targets = jQuery("#qunit-fixture p");
+
+ expect(targets.length * 2);
+ targets.wrap("<div class='wrapper'></div>");
+
+ targets.each(function() {
+ var $this = jQuery(this);
+
+ ok( $this.parent().is('.wrapper'), "Check each elements parent is correct (.wrapper)" );
+ equal( $this.siblings().length, 0, "Each element should be wrapped individually" );
+ });
+});
+
+var testWrapAll = function(val) {
+ expect(8);
+ var prev = jQuery("#firstp")[0].previousSibling;
+ var p = jQuery("#firstp,#first")[0].parentNode;
+
+ var result = jQuery("#firstp,#first").wrapAll(val( "<div class='red'><div class='tmp'></div></div>" ));
+ equal( result.parent().length, 1, "Check for wrapping of on-the-fly html" );
+ ok( jQuery("#first").parent().parent().is(".red"), "Check if wrapper has class 'red'" );
+ ok( jQuery("#firstp").parent().parent().is(".red"), "Check if wrapper has class 'red'" );
+ equal( jQuery("#first").parent().parent()[0].previousSibling, prev, "Correct Previous Sibling" );
+ equal( jQuery("#first").parent().parent()[0].parentNode, p, "Correct Parent" );
+
+ QUnit.reset();
+ var prev = jQuery("#firstp")[0].previousSibling;
+ var p = jQuery("#first")[0].parentNode;
+ var result = jQuery("#firstp,#first").wrapAll(val( document.getElementById("empty") ));
+ equal( jQuery("#first").parent()[0], jQuery("#firstp").parent()[0], "Same Parent" );
+ equal( jQuery("#first").parent()[0].previousSibling, prev, "Correct Previous Sibling" );
+ equal( jQuery("#first").parent()[0].parentNode, p, "Correct Parent" );
+}
+
+test("wrapAll(String|Element)", function() {
+ testWrapAll(bareObj);
+});
+
+var testWrapInner = function(val) {
+ expect(11);
+ var num = jQuery("#first").children().length;
+ var result = jQuery("#first").wrapInner(val("<div class='red'><div id='tmp'></div></div>"));
+ equal( jQuery("#first").children().length, 1, "Only one child" );
+ ok( jQuery("#first").children().is(".red"), "Verify Right Element" );
+ equal( jQuery("#first").children().children().children().length, num, "Verify Elements Intact" );
+
+ QUnit.reset();
+ var num = jQuery("#first").html("foo<div>test</div><div>test2</div>").children().length;
+ var result = jQuery("#first").wrapInner(val("<div class='red'><div id='tmp'></div></div>"));
+ equal( jQuery("#first").children().length, 1, "Only one child" );
+ ok( jQuery("#first").children().is(".red"), "Verify Right Element" );
+ equal( jQuery("#first").children().children().children().length, num, "Verify Elements Intact" );
+
+ QUnit.reset();
+ var num = jQuery("#first").children().length;
+ var result = jQuery("#first").wrapInner(val(document.getElementById("empty")));
+ equal( jQuery("#first").children().length, 1, "Only one child" );
+ ok( jQuery("#first").children().is("#empty"), "Verify Right Element" );
+ equal( jQuery("#first").children().children().length, num, "Verify Elements Intact" );
+
+ var div = jQuery("<div/>");
+ div.wrapInner(val("<span></span>"));
+ equal(div.children().length, 1, "The contents were wrapped.");
+ equal(div.children()[0].nodeName.toLowerCase(), "span", "A span was inserted.");
+}
+
+test("wrapInner(String|Element)", function() {
+ testWrapInner(bareObj);
+});
+
+test("wrapInner(Function)", function() {
+ testWrapInner(functionReturningObj)
+});
+
+test("unwrap()", function() {
+ expect(9);
+
+ jQuery("body").append(" <div id='unwrap' style='display: none;'> <div id='unwrap1'> <span class='unwrap'>a</span> <span class='unwrap'>b</span> </div> <div id='unwrap2'> <span class='unwrap'>c</span> <span class='unwrap'>d</span> </div> <div id='unwrap3'> <b><span class='unwrap unwrap3'>e</span></b> <b><span class='unwrap unwrap3'>f</span></b> </div> </div>");
+
+ var abcd = jQuery("#unwrap1 > span, #unwrap2 > span").get(),
+ abcdef = jQuery("#unwrap span").get();
+
+ equal( jQuery("#unwrap1 span").add("#unwrap2 span:first").unwrap().length, 3, "make #unwrap1 and #unwrap2 go away" );
+ deepEqual( jQuery("#unwrap > span").get(), abcd, "all four spans should still exist" );
+
+ deepEqual( jQuery("#unwrap3 span").unwrap().get(), jQuery("#unwrap3 > span").get(), "make all b in #unwrap3 go away" );
+
+ deepEqual( jQuery("#unwrap3 span").unwrap().get(), jQuery("#unwrap > span.unwrap3").get(), "make #unwrap3 go away" );
+
+ deepEqual( jQuery("#unwrap").children().get(), abcdef, "#unwrap only contains 6 child spans" );
+
+ deepEqual( jQuery("#unwrap > span").unwrap().get(), jQuery("body > span.unwrap").get(), "make the 6 spans become children of body" );
+
+ deepEqual( jQuery("body > span.unwrap").unwrap().get(), jQuery("body > span.unwrap").get(), "can't unwrap children of body" );
+ deepEqual( jQuery("body > span.unwrap").unwrap().get(), abcdef, "can't unwrap children of body" );
+
+ deepEqual( jQuery("body > span.unwrap").get(), abcdef, "body contains 6 .unwrap child spans" );
+
+ jQuery("body > span.unwrap").remove();
+});
+
+var testAppend = function(valueObj) {
+ expect(41);
+ var defaultText = "Try them out:"
+ var result = jQuery("#first").append(valueObj("<b>buga</b>"));
+ equal( result.text(), defaultText + "buga", "Check if text appending works" );
+ equal( jQuery("#select3").append(valueObj("<option value='appendTest'>Append Test</option>")).find("option:last-child").attr("value"), "appendTest", "Appending html options to select element");
+
+ QUnit.reset();
+ var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
+ jQuery("#sap").append(valueObj(document.getElementById("first")));
+ equal( jQuery("#sap").text(), expected, "Check for appending of element" );
+
+ QUnit.reset();
+ expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";
+ jQuery("#sap").append(valueObj([document.getElementById("first"), document.getElementById("yahoo")]));
+ equal( jQuery("#sap").text(), expected, "Check for appending of array of elements" );
+
+ QUnit.reset();
+ expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:";
+ jQuery("#sap").append(valueObj(jQuery("#yahoo, #first")));
+ equal( jQuery("#sap").text(), expected, "Check for appending of jQuery object" );
+
+ QUnit.reset();
+ jQuery("#sap").append(valueObj( 5 ));
+ ok( jQuery("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );
+
+ QUnit.reset();
+ jQuery("#sap").append(valueObj( " text with spaces " ));
+ ok( jQuery("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" );
+
+ QUnit.reset();
+ ok( jQuery("#sap").append(valueObj( [] )), "Check for appending an empty array." );
+ ok( jQuery("#sap").append(valueObj( "" )), "Check for appending an empty string." );
+ ok( jQuery("#sap").append(valueObj( document.getElementsByTagName("foo") )), "Check for appending an empty nodelist." );
+
+ QUnit.reset();
+ jQuery("form").append(valueObj("<input name='radiotest' type='radio' checked='checked' />"));
+ jQuery("form input[name=radiotest]").each(function(){
+ ok( jQuery(this).is(":checked"), "Append checked radio");
+ }).remove();
+
+ QUnit.reset();
+ jQuery("form").append(valueObj("<input name='radiotest' type='radio' checked = 'checked' />"));
+ jQuery("form input[name=radiotest]").each(function(){
+ ok( jQuery(this).is(":checked"), "Append alternately formated checked radio");
+ }).remove();
+
+ QUnit.reset();
+ jQuery("form").append(valueObj("<input name='radiotest' type='radio' checked />"));
+ jQuery("form input[name=radiotest]").each(function(){
+ ok( jQuery(this).is(":checked"), "Append HTML5-formated checked radio");
+ }).remove();
+
+ QUnit.reset();
+ jQuery("#sap").append(valueObj( document.getElementById("form") ));
+ equal( jQuery("#sap>form").size(), 1, "Check for appending a form" ); // Bug #910
+
+ QUnit.reset();
+ var pass = true;
+ try {
+ var body = jQuery("#iframe")[0].contentWindow.document.body;
+
+ pass = false;
+ jQuery( body ).append(valueObj( "<div>test</div>" ));
+ pass = true;
+ } catch(e) {}
+
+ ok( pass, "Test for appending a DOM node to the contents of an IFrame" );
+
+ QUnit.reset();
+ jQuery("<fieldset/>").appendTo("#form").append(valueObj( "<legend id='legend'>test</legend>" ));
+ t( "Append legend", "#legend", ["legend"] );
+
+ QUnit.reset();
+ jQuery("#select1").append(valueObj( "<OPTION>Test</OPTION>" ));
+ equal( jQuery("#select1 option:last").text(), "Test", "Appending &lt;OPTION&gt; (all caps)" );
+
+ jQuery("#table").append(valueObj( "<colgroup></colgroup>" ));
+ ok( jQuery("#table colgroup").length, "Append colgroup" );
+
+ jQuery("#table colgroup").append(valueObj( "<col/>" ));
+ ok( jQuery("#table colgroup col").length, "Append col" );
+
+ QUnit.reset();
+ jQuery("#table").append(valueObj( "<caption></caption>" ));
+ ok( jQuery("#table caption").length, "Append caption" );
+
+ QUnit.reset();
+ jQuery("form:last")
+ .append(valueObj( "<select id='appendSelect1'></select>" ))
+ .append(valueObj( "<select id='appendSelect2'><option>Test</option></select>" ));
+
+ t( "Append Select", "#appendSelect1, #appendSelect2", ["appendSelect1", "appendSelect2"] );
+
+ equal( "Two nodes", jQuery("<div />").append("Two", " nodes").text(), "Appending two text nodes (#4011)" );
+
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ var d = jQuery("<div/>").appendTo("#nonnodes").append(j);
+ equal( jQuery("#nonnodes").length, 1, "Check node,textnode,comment append moved leaving just the div" );
+ ok( d.contents().length >= 2, "Check node,textnode,comment append works" );
+ d.contents().appendTo("#nonnodes");
+ d.remove();
+ ok( jQuery("#nonnodes").contents().length >= 2, "Check node,textnode,comment append cleanup worked" );
+
+ QUnit.reset();
+ var $input = jQuery("<input />").attr({ "type": "checkbox", "checked": true }).appendTo('#testForm');
+ equal( $input[0].checked, true, "A checked checkbox that is appended stays checked" );
+
+ QUnit.reset();
+ var $radios = jQuery("input:radio[name='R1']"),
+ $radioNot = jQuery("<input type='radio' name='R1' checked='checked'/>").insertAfter( $radios ),
+ $radio = $radios.eq(1).click();
+ $radioNot[0].checked = false;
+ $radios.parent().wrap("<div></div>");
+ equal( $radio[0].checked, true, "Reappending radios uphold which radio is checked" );
+ equal( $radioNot[0].checked, false, "Reappending radios uphold not being checked" );
+ QUnit.reset();
+
+ var prev = jQuery("#sap").children().length;
+
+ jQuery("#sap").append(
+ "<span></span>",
+ "<span></span>",
+ "<span></span>"
+ );
+
+ equal( jQuery("#sap").children().length, prev + 3, "Make sure that multiple arguments works." );
+ QUnit.reset();
+}
+
+test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ testAppend(bareObj);
+});
+
+test("append(Function)", function() {
+ testAppend(functionReturningObj);
+});
+
+test("append(Function) with incoming value", function() {
+ expect(12);
+
+ var defaultText = "Try them out:", old = jQuery("#first").html();
+
+ var result = jQuery("#first").append(function(i, val){
+ equal( val, old, "Make sure the incoming value is correct." );
+ return "<b>buga</b>";
+ });
+ equal( result.text(), defaultText + "buga", "Check if text appending works" );
+
+ var select = jQuery("#select3");
+ old = select.html();
+
+ equal( select.append(function(i, val){
+ equal( val, old, "Make sure the incoming value is correct." );
+ return "<option value='appendTest'>Append Test</option>";
+ }).find("option:last-child").attr("value"), "appendTest", "Appending html options to select element");
+
+ QUnit.reset();
+ var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").append(function(i, val){
+ equal( val, old, "Make sure the incoming value is correct." );
+ return document.getElementById("first");
+ });
+ equal( jQuery("#sap").text(), expected, "Check for appending of element" );
+
+ QUnit.reset();
+ expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").append(function(i, val){
+ equal( val, old, "Make sure the incoming value is correct." );
+ return [document.getElementById("first"), document.getElementById("yahoo")];
+ });
+ equal( jQuery("#sap").text(), expected, "Check for appending of array of elements" );
+
+ QUnit.reset();
+ expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:";
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").append(function(i, val){
+ equal( val, old, "Make sure the incoming value is correct." );
+ return jQuery("#yahoo, #first");
+ });
+ equal( jQuery("#sap").text(), expected, "Check for appending of jQuery object" );
+
+ QUnit.reset();
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").append(function(i, val){
+ equal( val, old, "Make sure the incoming value is correct." );
+ return 5;
+ });
+ ok( jQuery("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );
+
+ QUnit.reset();
+});
+
+test("append the same fragment with events (Bug #6997, 5566)", function () {
+ var doExtra = !jQuery.support.noCloneEvent && document.fireEvent;
+ expect(2 + (doExtra ? 1 : 0));
+ stop();
+
+ var element;
+
+ // This patch modified the way that cloning occurs in IE; we need to make sure that
+ // native event handlers on the original object don't get disturbed when they are
+ // modified on the clone
+ if ( doExtra ) {
+ element = jQuery("div:first").click(function () {
+ ok(true, "Event exists on original after being unbound on clone");
+ jQuery(this).unbind("click");
+ });
+ var clone = element.clone(true).unbind("click");
+ clone[0].fireEvent("onclick");
+ element[0].fireEvent("onclick");
+
+ // manually clean up detached elements
+ clone.remove();
+ }
+
+ element = jQuery("<a class='test6997'></a>").click(function () {
+ ok(true, "Append second element events work");
+ });
+
+ jQuery("#listWithTabIndex li").append(element)
+ .find("a.test6997").eq(1).click();
+
+ element = jQuery("<li class='test6997'></li>").click(function () {
+ ok(true, "Before second element events work");
+ start();
+ });
+
+ jQuery("#listWithTabIndex li").before(element);
+ jQuery("#listWithTabIndex li.test6997").eq(1).click();
+});
+
+test("append HTML5 sectioning elements (Bug #6485)", function () {
+ expect(2);
+
+ jQuery("#qunit-fixture").append("<article style='font-size:10px'><section><aside>HTML5 elements</aside></section></article>");
+
+ var article = jQuery("article"),
+ aside = jQuery("aside");
+
+ equal( article.css("fontSize"), "10px", "HTML5 elements are styleable");
+ equal( aside.length, 1, "HTML5 elements do not collapse their children")
+});
+
+test("HTML5 Elements inherit styles from style rules (Bug #10501)", function () {
+ expect(1);
+
+ jQuery("#qunit-fixture").append("<article id='article'></article>");
+ jQuery("#article").append("<section>This section should have a pink background.</section>");
+
+ // In IE, the missing background color will claim its value is "transparent"
+ notEqual( jQuery("section").css("background-color"), "transparent", "HTML5 elements inherit styles");
+});
+
+test("html5 clone() cannot use the fragment cache in IE (#6485)", function () {
+ expect(1);
+
+ jQuery("<article><section><aside>HTML5 elements</aside></section></article>").appendTo("#qunit-fixture");
+
+ var clone = jQuery("article").clone();
+
+ jQuery("#qunit-fixture").append( clone );
+
+ equal( jQuery("aside").length, 2, "clone()ing HTML5 elems does not collapse them" );
+});
+
+test("html(String) with HTML5 (Bug #6485)", function() {
+ expect(2);
+
+ jQuery("#qunit-fixture").html("<article><section><aside>HTML5 elements</aside></section></article>");
+ equal( jQuery("#qunit-fixture").children().children().length, 1, "Make sure HTML5 article elements can hold children. innerHTML shortcut path" );
+ equal( jQuery("#qunit-fixture").children().children().children().length, 1, "Make sure nested HTML5 elements can hold children." );
+});
+
+test("append(xml)", function() {
+ expect( 1 );
+
+ function createXMLDoc() {
+ // Initialize DOM based upon latest installed MSXML or Netscape
+ var elem,
+ aActiveX =
+ [ "MSXML6.DomDocument",
+ "MSXML3.DomDocument",
+ "MSXML2.DomDocument",
+ "MSXML.DomDocument",
+ "Microsoft.XmlDom" ];
+
+ if ( document.implementation && "createDocument" in document.implementation ) {
+ return document.implementation.createDocument( "", "", null );
+ } else {
+ // IE
+ for ( var n = 0, len = aActiveX.length; n < len; n++ ) {
+ try {
+ elem = new ActiveXObject( aActiveX[ n ] );
+ return elem;
+ } catch(_){};
+ }
+ }
+ }
+
+ var xmlDoc = createXMLDoc(),
+ xml1 = xmlDoc.createElement("head"),
+ xml2 = xmlDoc.createElement("test");
+
+ ok( jQuery( xml1 ).append( xml2 ), "Append an xml element to another without raising an exception." );
+
+});
+
+test("appendTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ expect(17);
+
+ var defaultText = "Try them out:"
+ jQuery("<b>buga</b>").appendTo("#first");
+ equal( jQuery("#first").text(), defaultText + "buga", "Check if text appending works" );
+ equal( jQuery("<option value='appendTest'>Append Test</option>").appendTo("#select3").parent().find("option:last-child").attr("value"), "appendTest", "Appending html options to select element");
+
+ QUnit.reset();
+ var l = jQuery("#first").children().length + 2;
+ jQuery("<strong>test</strong>");
+ jQuery("<strong>test</strong>");
+ jQuery([ jQuery("<strong>test</strong>")[0], jQuery("<strong>test</strong>")[0] ])
+ .appendTo("#first");
+ equal( jQuery("#first").children().length, l, "Make sure the elements were inserted." );
+ equal( jQuery("#first").children().last()[0].nodeName.toLowerCase(), "strong", "Verify the last element." );
+
+ QUnit.reset();
+ var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
+ jQuery(document.getElementById("first")).appendTo("#sap");
+ equal( jQuery("#sap").text(), expected, "Check for appending of element" );
+
+ QUnit.reset();
+ expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";
+ jQuery([document.getElementById("first"), document.getElementById("yahoo")]).appendTo("#sap");
+ equal( jQuery("#sap").text(), expected, "Check for appending of array of elements" );
+
+ QUnit.reset();
+ ok( jQuery(document.createElement("script")).appendTo("body").length, "Make sure a disconnected script can be appended." );
+
+ QUnit.reset();
+ expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:";
+ jQuery("#yahoo, #first").appendTo("#sap");
+ equal( jQuery("#sap").text(), expected, "Check for appending of jQuery object" );
+
+ QUnit.reset();
+ jQuery("#select1").appendTo("#foo");
+ t( "Append select", "#foo select", ["select1"] );
+
+ QUnit.reset();
+ var div = jQuery("<div/>").click(function(){
+ ok(true, "Running a cloned click.");
+ });
+ div.appendTo("#qunit-fixture, #moretests");
+
+ jQuery("#qunit-fixture div:last").click();
+ jQuery("#moretests div:last").click();
+
+ QUnit.reset();
+ div = jQuery("<div/>").appendTo("#qunit-fixture, #moretests");
+
+ equal( div.length, 2, "appendTo returns the inserted elements" );
+
+ div.addClass("test");
+
+ ok( jQuery("#qunit-fixture div:last").hasClass("test"), "appendTo element was modified after the insertion" );
+ ok( jQuery("#moretests div:last").hasClass("test"), "appendTo element was modified after the insertion" );
+
+ QUnit.reset();
+
+ div = jQuery("<div/>");
+ jQuery("<span>a</span><b>b</b>").filter("span").appendTo( div );
+
+ equal( div.children().length, 1, "Make sure the right number of children were inserted." );
+
+ div = jQuery("#moretests div");
+
+ var num = jQuery("#qunit-fixture div").length;
+ div.remove().appendTo("#qunit-fixture");
+
+ equal( jQuery("#qunit-fixture div").length, num, "Make sure all the removed divs were inserted." );
+
+ QUnit.reset();
+
+ stop();
+ jQuery.getScript('data/test.js', function() {
+ jQuery('script[src*="data\\/test\\.js"]').remove();
+ start();
+ });
+});
+
+var testPrepend = function(val) {
+ expect(5);
+ var defaultText = "Try them out:"
+ var result = jQuery("#first").prepend(val( "<b>buga</b>" ));
+ equal( result.text(), "buga" + defaultText, "Check if text prepending works" );
+ equal( jQuery("#select3").prepend(val( "<option value='prependTest'>Prepend Test</option>" )).find("option:first-child").attr("value"), "prependTest", "Prepending html options to select element");
+
+ QUnit.reset();
+ var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";
+ jQuery("#sap").prepend(val( document.getElementById("first") ));
+ equal( jQuery("#sap").text(), expected, "Check for prepending of element" );
+
+ QUnit.reset();
+ expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";
+ jQuery("#sap").prepend(val( [document.getElementById("first"), document.getElementById("yahoo")] ));
+ equal( jQuery("#sap").text(), expected, "Check for prepending of array of elements" );
+
+ QUnit.reset();
+ expected = "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog";
+ jQuery("#sap").prepend(val( jQuery("#yahoo, #first") ));
+ equal( jQuery("#sap").text(), expected, "Check for prepending of jQuery object" );
+};
+
+test("prepend(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ testPrepend(bareObj);
+});
+
+test("prepend(Function)", function() {
+ testPrepend(functionReturningObj);
+});
+
+test("prepend(Function) with incoming value", function() {
+ expect(10);
+
+ var defaultText = "Try them out:", old = jQuery("#first").html();
+ var result = jQuery("#first").prepend(function(i, val) {
+ equal( val, old, "Make sure the incoming value is correct." );
+ return "<b>buga</b>";
+ });
+ equal( result.text(), "buga" + defaultText, "Check if text prepending works" );
+
+ old = jQuery("#select3").html();
+
+ equal( jQuery("#select3").prepend(function(i, val) {
+ equal( val, old, "Make sure the incoming value is correct." );
+ return "<option value='prependTest'>Prepend Test</option>";
+ }).find("option:first-child").attr("value"), "prependTest", "Prepending html options to select element");
+
+ QUnit.reset();
+ var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").prepend(function(i, val) {
+ equal( val, old, "Make sure the incoming value is correct." );
+ return document.getElementById("first");
+ });
+
+ equal( jQuery("#sap").text(), expected, "Check for prepending of element" );
+
+ QUnit.reset();
+ expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").prepend(function(i, val) {
+ equal( val, old, "Make sure the incoming value is correct." );
+ return [document.getElementById("first"), document.getElementById("yahoo")];
+ });
+
+ equal( jQuery("#sap").text(), expected, "Check for prepending of array of elements" );
+
+ QUnit.reset();
+ expected = "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog";
+ old = jQuery("#sap").html();
+
+ jQuery("#sap").prepend(function(i, val) {
+ equal( val, old, "Make sure the incoming value is correct." );
+ return jQuery("#yahoo, #first");
+ });
+
+ equal( jQuery("#sap").text(), expected, "Check for prepending of jQuery object" );
+});
+
+test("prependTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ expect(6);
+ var defaultText = "Try them out:"
+ jQuery("<b>buga</b>").prependTo("#first");
+ equal( jQuery("#first").text(), "buga" + defaultText, "Check if text prepending works" );
+ equal( jQuery("<option value='prependTest'>Prepend Test</option>").prependTo("#select3").parent().find("option:first-child").attr("value"), "prependTest", "Prepending html options to select element");
+
+ QUnit.reset();
+ var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";
+ jQuery(document.getElementById("first")).prependTo("#sap");
+ equal( jQuery("#sap").text(), expected, "Check for prepending of element" );
+
+ QUnit.reset();
+ expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";
+ jQuery([document.getElementById("first"), document.getElementById("yahoo")]).prependTo("#sap");
+ equal( jQuery("#sap").text(), expected, "Check for prepending of array of elements" );
+
+ QUnit.reset();
+ expected = "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog";
+ jQuery("#yahoo, #first").prependTo("#sap");
+ equal( jQuery("#sap").text(), expected, "Check for prepending of jQuery object" );
+
+ QUnit.reset();
+ jQuery("<select id='prependSelect1'></select>").prependTo("form:last");
+ jQuery("<select id='prependSelect2'><option>Test</option></select>").prependTo("form:last");
+
+ t( "Prepend Select", "#prependSelect2, #prependSelect1", ["prependSelect2", "prependSelect1"] );
+});
+
+var testBefore = function(val) {
+ expect(6);
+ var expected = "This is a normal link: bugaYahoo";
+ jQuery("#yahoo").before(val( "<b>buga</b>" ));
+ equal( jQuery("#en").text(), expected, "Insert String before" );
+
+ QUnit.reset();
+ expected = "This is a normal link: Try them out:Yahoo";
+ jQuery("#yahoo").before(val( document.getElementById("first") ));
+ equal( jQuery("#en").text(), expected, "Insert element before" );
+
+ QUnit.reset();
+ expected = "This is a normal link: Try them out:diveintomarkYahoo";
+ jQuery("#yahoo").before(val( [document.getElementById("first"), document.getElementById("mark")] ));
+ equal( jQuery("#en").text(), expected, "Insert array of elements before" );
+
+ QUnit.reset();
+ expected = "This is a normal link: diveintomarkTry them out:Yahoo";
+ jQuery("#yahoo").before(val( jQuery("#mark, #first") ));
+ equal( jQuery("#en").text(), expected, "Insert jQuery before" );
+
+ var set = jQuery("<div/>").before("<span>test</span>");
+ equal( set[0].nodeName.toLowerCase(), "span", "Insert the element before the disconnected node." );
+ equal( set.length, 2, "Insert the element before the disconnected node." );
+};
+
+test("before(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ testBefore(bareObj);
+});
+
+test("before(Function)", function() {
+ testBefore(functionReturningObj);
+});
+
+test("before and after w/ empty object (#10812)", function() {
+ expect(2);
+
+ var res = jQuery( "#notInTheDocument" ).before( "(" ).after( ")" );
+ equal( res.length, 2, "didn't choke on empty object" );
+ equal( res.wrapAll("<div/>").parent().text(), "()", "correctly appended text" );
+});
+
+test("insertBefore(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ expect(4);
+ var expected = "This is a normal link: bugaYahoo";
+ jQuery("<b>buga</b>").insertBefore("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert String before" );
+
+ QUnit.reset();
+ expected = "This is a normal link: Try them out:Yahoo";
+ jQuery(document.getElementById("first")).insertBefore("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert element before" );
+
+ QUnit.reset();
+ expected = "This is a normal link: Try them out:diveintomarkYahoo";
+ jQuery([document.getElementById("first"), document.getElementById("mark")]).insertBefore("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert array of elements before" );
+
+ QUnit.reset();
+ expected = "This is a normal link: diveintomarkTry them out:Yahoo";
+ jQuery("#mark, #first").insertBefore("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert jQuery before" );
+});
+
+var testAfter = function(val) {
+ expect(6);
+ var expected = "This is a normal link: Yahoobuga";
+ jQuery("#yahoo").after(val( "<b>buga</b>" ));
+ equal( jQuery("#en").text(), expected, "Insert String after" );
+
+ QUnit.reset();
+ expected = "This is a normal link: YahooTry them out:";
+ jQuery("#yahoo").after(val( document.getElementById("first") ));
+ equal( jQuery("#en").text(), expected, "Insert element after" );
+
+ QUnit.reset();
+ expected = "This is a normal link: YahooTry them out:diveintomark";
+ jQuery("#yahoo").after(val( [document.getElementById("first"), document.getElementById("mark")] ));
+ equal( jQuery("#en").text(), expected, "Insert array of elements after" );
+
+ QUnit.reset();
+ expected = "This is a normal link: YahoodiveintomarkTry them out:";
+ jQuery("#yahoo").after(val( jQuery("#mark, #first") ));
+ equal( jQuery("#en").text(), expected, "Insert jQuery after" );
+
+ var set = jQuery("<div/>").after("<span>test</span>");
+ equal( set[1].nodeName.toLowerCase(), "span", "Insert the element after the disconnected node." );
+ equal( set.length, 2, "Insert the element after the disconnected node." );
+};
+
+test("after(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ testAfter(bareObj);
+});
+
+test("after(Function)", function() {
+ testAfter(functionReturningObj);
+});
+
+test("insertAfter(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ expect(4);
+ var expected = "This is a normal link: Yahoobuga";
+ jQuery("<b>buga</b>").insertAfter("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert String after" );
+
+ QUnit.reset();
+ expected = "This is a normal link: YahooTry them out:";
+ jQuery(document.getElementById("first")).insertAfter("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert element after" );
+
+ QUnit.reset();
+ expected = "This is a normal link: YahooTry them out:diveintomark";
+ jQuery([document.getElementById("first"), document.getElementById("mark")]).insertAfter("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert array of elements after" );
+
+ QUnit.reset();
+ expected = "This is a normal link: YahoodiveintomarkTry them out:";
+ jQuery("#mark, #first").insertAfter("#yahoo");
+ equal( jQuery("#en").text(), expected, "Insert jQuery after" );
+});
+
+var testReplaceWith = function(val) {
+ expect(21);
+ jQuery("#yahoo").replaceWith(val( "<b id='replace'>buga</b>" ));
+ ok( jQuery("#replace")[0], "Replace element with string" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after string" );
+
+ QUnit.reset();
+ jQuery("#yahoo").replaceWith(val( document.getElementById("first") ));
+ ok( jQuery("#first")[0], "Replace element with element" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after element" );
+
+ QUnit.reset();
+ jQuery("#qunit-fixture").append("<div id='bar'><div id='baz'</div></div>");
+ jQuery("#baz").replaceWith("Baz");
+ equal( jQuery("#bar").text(),"Baz", "Replace element with text" );
+ ok( !jQuery("#baz")[0], "Verify that original element is gone, after element" );
+
+ QUnit.reset();
+ jQuery("#yahoo").replaceWith(val( [document.getElementById("first"), document.getElementById("mark")] ));
+ ok( jQuery("#first")[0], "Replace element with array of elements" );
+ ok( jQuery("#mark")[0], "Replace element with array of elements" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after array of elements" );
+
+ QUnit.reset();
+ jQuery("#yahoo").replaceWith(val( jQuery("#mark, #first") ));
+ ok( jQuery("#first")[0], "Replace element with set of elements" );
+ ok( jQuery("#mark")[0], "Replace element with set of elements" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after set of elements" );
+
+ QUnit.reset();
+ var tmp = jQuery("<div/>").appendTo("body").click(function(){ ok(true, "Newly bound click run." ); });
+ var y = jQuery("<div/>").appendTo("body").click(function(){ ok(true, "Previously bound click run." ); });
+ var child = y.append("<b>test</b>").find("b").click(function(){ ok(true, "Child bound click run." ); return false; });
+
+ y.replaceWith( tmp );
+
+ tmp.click();
+ y.click(); // Shouldn't be run
+ child.click(); // Shouldn't be run
+
+ tmp.remove();
+ y.remove();
+ child.remove();
+
+ QUnit.reset();
+
+ y = jQuery("<div/>").appendTo("body").click(function(){ ok(true, "Previously bound click run." ); });
+ var child2 = y.append("<u>test</u>").find("u").click(function(){ ok(true, "Child 2 bound click run." ); return false; });
+
+ y.replaceWith( child2 );
+
+ child2.click();
+
+ y.remove();
+ child2.remove();
+
+ QUnit.reset();
+
+ var set = jQuery("<div/>").replaceWith(val("<span>test</span>"));
+ equal( set[0].nodeName.toLowerCase(), "span", "Replace the disconnected node." );
+ equal( set.length, 1, "Replace the disconnected node." );
+
+ var non_existant = jQuery("#does-not-exist").replaceWith( val("<b>should not throw an error</b>") );
+ equal( non_existant.length, 0, "Length of non existant element." );
+
+ var $div = jQuery("<div class='replacewith'></div>").appendTo("body");
+ // TODO: Work on jQuery(...) inline script execution
+ //$div.replaceWith("<div class='replacewith'></div><script>" +
+ //"equal(jQuery('.replacewith').length, 1, 'Check number of elements in page.');" +
+ //"</script>");
+ equal(jQuery(".replacewith").length, 1, "Check number of elements in page.");
+ jQuery(".replacewith").remove();
+
+ QUnit.reset();
+
+ jQuery("#qunit-fixture").append("<div id='replaceWith'></div>");
+ equal( jQuery("#qunit-fixture").find("div[id=replaceWith]").length, 1, "Make sure only one div exists." );
+
+ jQuery("#replaceWith").replaceWith( val("<div id='replaceWith'></div>") );
+ equal( jQuery("#qunit-fixture").find("div[id=replaceWith]").length, 1, "Make sure only one div exists." );
+
+ jQuery("#replaceWith").replaceWith( val("<div id='replaceWith'></div>") );
+ equal( jQuery("#qunit-fixture").find("div[id=replaceWith]").length, 1, "Make sure only one div exists." );
+}
+
+test("replaceWith(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ testReplaceWith(bareObj);
+});
+
+test("replaceWith(Function)", function() {
+ testReplaceWith(functionReturningObj);
+
+ expect(22);
+
+ var y = jQuery("#yahoo")[0];
+
+ jQuery(y).replaceWith(function(){
+ equal( this, y, "Make sure the context is coming in correctly." );
+ });
+
+ QUnit.reset();
+});
+
+test("replaceWith(string) for more than one element", function(){
+ expect(3);
+
+ equal(jQuery("#foo p").length, 3, "ensuring that test data has not changed");
+
+ jQuery("#foo p").replaceWith("<span>bar</span>");
+ equal(jQuery("#foo span").length, 3, "verify that all the three original element have been replaced");
+ equal(jQuery("#foo p").length, 0, "verify that all the three original element have been replaced");
+});
+
+test("replaceAll(String|Element|Array&lt;Element&gt;|jQuery)", function() {
+ expect(10);
+ jQuery("<b id='replace'>buga</b>").replaceAll("#yahoo");
+ ok( jQuery("#replace")[0], "Replace element with string" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after string" );
+
+ QUnit.reset();
+ jQuery(document.getElementById("first")).replaceAll("#yahoo");
+ ok( jQuery("#first")[0], "Replace element with element" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after element" );
+
+ QUnit.reset();
+ jQuery([document.getElementById("first"), document.getElementById("mark")]).replaceAll("#yahoo");
+ ok( jQuery("#first")[0], "Replace element with array of elements" );
+ ok( jQuery("#mark")[0], "Replace element with array of elements" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after array of elements" );
+
+ QUnit.reset();
+ jQuery("#mark, #first").replaceAll("#yahoo");
+ ok( jQuery("#first")[0], "Replace element with set of elements" );
+ ok( jQuery("#mark")[0], "Replace element with set of elements" );
+ ok( !jQuery("#yahoo")[0], "Verify that original element is gone, after set of elements" );
+});
+
+test("jQuery.clone() (#8017)", function() {
+
+ expect(2);
+
+ ok( jQuery.clone && jQuery.isFunction( jQuery.clone ) , "jQuery.clone() utility exists and is a function.");
+
+ var main = jQuery("#qunit-fixture")[0],
+ clone = jQuery.clone( main );
+
+ equal( main.childNodes.length, clone.childNodes.length, "Simple child length to ensure a large dom tree copies correctly" );
+});
+
+test("clone() (#8070)", function () {
+ expect(2);
+
+ jQuery("<select class='test8070'></select><select class='test8070'></select>").appendTo("#qunit-fixture");
+ var selects = jQuery(".test8070");
+ selects.append("<OPTION>1</OPTION><OPTION>2</OPTION>");
+
+ equal( selects[0].childNodes.length, 2, "First select got two nodes" );
+ equal( selects[1].childNodes.length, 2, "Second select got two nodes" );
+
+ selects.remove();
+});
+
+test("clone()", function() {
+ expect(39);
+ equal( "This is a normal link: Yahoo", jQuery("#en").text(), "Assert text for #en" );
+ var clone = jQuery("#yahoo").clone();
+ equal( "Try them out:Yahoo", jQuery("#first").append(clone).text(), "Check for clone" );
+ equal( "This is a normal link: Yahoo", jQuery("#en").text(), "Reassert text for #en" );
+
+ var cloneTags = [
+ "<table/>", "<tr/>", "<td/>", "<div/>",
+ "<button/>", "<ul/>", "<ol/>", "<li/>",
+ "<input type='checkbox' />", "<select/>", "<option/>", "<textarea/>",
+ "<tbody/>", "<thead/>", "<tfoot/>", "<iframe/>"
+ ];
+ for (var i = 0; i < cloneTags.length; i++) {
+ var j = jQuery(cloneTags[i]);
+ equal( j[0].tagName, j.clone()[0].tagName, "Clone a " + cloneTags[i]);
+ }
+
+ // using contents will get comments regular, text, and comment nodes
+ var cl = jQuery("#nonnodes").contents().clone();
+ ok( cl.length >= 2, "Check node,textnode,comment clone works (some browsers delete comments on clone)" );
+
+ var div = jQuery("<div><ul><li>test</li></ul></div>").click(function(){
+ ok( true, "Bound event still exists." );
+ });
+
+ clone = div.clone(true);
+
+ // manually clean up detached elements
+ div.remove();
+
+ div = clone.clone(true);
+
+ // manually clean up detached elements
+ clone.remove();
+
+ equal( div.length, 1, "One element cloned" );
+ equal( div[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" );
+ div.trigger("click");
+
+ // manually clean up detached elements
+ div.remove();
+
+ div = jQuery("<div/>").append([ document.createElement("table"), document.createElement("table") ]);
+ div.find("table").click(function(){
+ ok( true, "Bound event still exists." );
+ });
+
+ clone = div.clone(true);
+ equal( clone.length, 1, "One element cloned" );
+ equal( clone[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" );
+ clone.find("table:last").trigger("click");
+
+ // manually clean up detached elements
+ div.remove();
+ clone.remove();
+
+ var divEvt = jQuery("<div><ul><li>test</li></ul></div>").click(function(){
+ ok( false, "Bound event still exists after .clone()." );
+ }),
+ cloneEvt = divEvt.clone();
+
+ // Make sure that doing .clone() doesn't clone events
+ cloneEvt.trigger("click");
+
+ cloneEvt.remove();
+ divEvt.remove();
+
+ // Test both html() and clone() for <embed and <object types
+ div = jQuery("<div/>").html('<embed height="355" width="425" src="http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en"></embed>');
+
+ clone = div.clone(true);
+ equal( clone.length, 1, "One element cloned" );
+ equal( clone.html(), div.html(), "Element contents cloned" );
+ equal( clone[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" );
+
+ // this is technically an invalid object, but because of the special
+ // classid instantiation it is the only kind that IE has trouble with,
+ // so let's test with it too.
+ div = jQuery("<div/>").html("<object height='355' width='425' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'> <param name='movie' value='http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en'> <param name='wmode' value='transparent'> </object>");
+
+ clone = div.clone(true);
+ equal( clone.length, 1, "One element cloned" );
+ // equal( clone.html(), div.html(), "Element contents cloned" );
+ equal( clone[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" );
+
+ // and here's a valid one.
+ div = jQuery("<div/>").html("<object height='355' width='425' type='application/x-shockwave-flash' data='http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en'> <param name='movie' value='http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en'> <param name='wmode' value='transparent'> </object>");
+
+ clone = div.clone(true);
+ equal( clone.length, 1, "One element cloned" );
+ equal( clone.html(), div.html(), "Element contents cloned" );
+ equal( clone[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" );
+
+ div = jQuery("<div/>").data({ a: true });
+ clone = div.clone(true);
+ equal( clone.data("a"), true, "Data cloned." );
+ clone.data("a", false);
+ equal( clone.data("a"), false, "Ensure cloned element data object was correctly modified" );
+ equal( div.data("a"), true, "Ensure cloned element data object is copied, not referenced" );
+
+ // manually clean up detached elements
+ div.remove();
+ clone.remove();
+
+ var form = document.createElement("form");
+ form.action = "/test/";
+ var div = document.createElement("div");
+ div.appendChild( document.createTextNode("test") );
+ form.appendChild( div );
+
+ equal( jQuery(form).clone().children().length, 1, "Make sure we just get the form back." );
+
+ equal( jQuery("body").clone().children()[0].id, "qunit-header", "Make sure cloning body works" );
+});
+
+test("clone(form element) (Bug #3879, #6655)", function() {
+ expect(5);
+ var element = jQuery("<select><option>Foo</option><option selected>Bar</option></select>");
+
+ equal( element.clone().find("option:selected").val(), element.find("option:selected").val(), "Selected option cloned correctly" );
+
+ element = jQuery("<input type='checkbox' value='foo'>").attr("checked", "checked");
+ clone = element.clone();
+
+ equal( clone.is(":checked"), element.is(":checked"), "Checked input cloned correctly" );
+ equal( clone[0].defaultValue, "foo", "Checked input defaultValue cloned correctly" );
+
+ // defaultChecked also gets set now due to setAttribute in attr, is this check still valid?
+ // equal( clone[0].defaultChecked, !jQuery.support.noCloneChecked, "Checked input defaultChecked cloned correctly" );
+
+ element = jQuery("<input type='text' value='foo'>");
+ clone = element.clone();
+ equal( clone[0].defaultValue, "foo", "Text input defaultValue cloned correctly" );
+
+ element = jQuery("<textarea>foo</textarea>");
+ clone = element.clone();
+ equal( clone[0].defaultValue, "foo", "Textarea defaultValue cloned correctly" );
+});
+
+test("clone(multiple selected options) (Bug #8129)", function() {
+ expect(1);
+ var element = jQuery("<select><option>Foo</option><option selected>Bar</option><option selected>Baz</option></select>");
+
+ equal( element.clone().find("option:selected").length, element.find("option:selected").length, "Multiple selected options cloned correctly" );
+
+});
+
+if (!isLocal) {
+test("clone() on XML nodes", function() {
+ expect(2);
+ stop();
+ jQuery.get("data/dashboard.xml", function (xml) {
+ var root = jQuery(xml.documentElement).clone();
+ var origTab = jQuery("tab", xml).eq(0);
+ var cloneTab = jQuery("tab", root).eq(0);
+ origTab.text("origval");
+ cloneTab.text("cloneval");
+ equal(origTab.text(), "origval", "Check original XML node was correctly set");
+ equal(cloneTab.text(), "cloneval", "Check cloned XML node was correctly set");
+ start();
+ });
+});
+}
+
+var testHtml = function(valueObj) {
+ expect(34);
+
+ jQuery.scriptorder = 0;
+
+ var div = jQuery("#qunit-fixture > div");
+ div.html(valueObj("<b>test</b>"));
+ var pass = true;
+ for ( var i = 0; i < div.size(); i++ ) {
+ if ( div.get(i).childNodes.length != 1 ) pass = false;
+ }
+ ok( pass, "Set HTML" );
+
+ div = jQuery("<div/>").html( valueObj("<div id='parent_1'><div id='child_1'/></div><div id='parent_2'/>") );
+
+ equal( div.children().length, 2, "Make sure two child nodes exist." );
+ equal( div.children().children().length, 1, "Make sure that a grandchild exists." );
+
+ var space = jQuery("<div/>").html(valueObj("&#160;"))[0].innerHTML;
+ ok( /^\xA0$|^&nbsp;$/.test( space ), "Make sure entities are passed through correctly." );
+ equal( jQuery("<div/>").html(valueObj("&amp;"))[0].innerHTML, "&amp;", "Make sure entities are passed through correctly." );
+
+ jQuery("#qunit-fixture").html(valueObj("<style>.foobar{color:green;}</style>"));
+
+ equal( jQuery("#qunit-fixture").children().length, 1, "Make sure there is a child element." );
+ equal( jQuery("#qunit-fixture").children()[0].nodeName.toUpperCase(), "STYLE", "And that a style element was inserted." );
+
+ QUnit.reset();
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ j.html(valueObj("<b>bold</b>"));
+
+ // this is needed, or the expando added by jQuery unique will yield a different html
+ j.find("b").removeData();
+ equal( j.html().replace(/ xmlns="[^"]+"/g, "").toLowerCase(), "<b>bold</b>", "Check node,textnode,comment with html()" );
+
+ jQuery("#qunit-fixture").html(valueObj("<select/>"));
+ jQuery("#qunit-fixture select").html(valueObj("<option>O1</option><option selected='selected'>O2</option><option>O3</option>"));
+ equal( jQuery("#qunit-fixture select").val(), "O2", "Selected option correct" );
+
+ var $div = jQuery("<div />");
+ equal( $div.html(valueObj( 5 )).html(), "5", "Setting a number as html" );
+ equal( $div.html(valueObj( 0 )).html(), "0", "Setting a zero as html" );
+
+ var $div2 = jQuery("<div/>"), insert = "&lt;div&gt;hello1&lt;/div&gt;";
+ equal( $div2.html(insert).html().replace(/>/g, "&gt;"), insert, "Verify escaped insertion." );
+ equal( $div2.html("x" + insert).html().replace(/>/g, "&gt;"), "x" + insert, "Verify escaped insertion." );
+ equal( $div2.html(" " + insert).html().replace(/>/g, "&gt;"), " " + insert, "Verify escaped insertion." );
+
+ var map = jQuery("<map/>").html(valueObj("<area id='map01' shape='rect' coords='50,50,150,150' href='http://www.jquery.com/' alt='jQuery'>"));
+
+ equal( map[0].childNodes.length, 1, "The area was inserted." );
+ equal( map[0].firstChild.nodeName.toLowerCase(), "area", "The area was inserted." );
+
+ QUnit.reset();
+
+ jQuery("#qunit-fixture").html(valueObj("<script type='something/else'>ok( false, 'Non-script evaluated.' );</script><script type='text/javascript'>ok( true, 'text/javascript is evaluated.' );</script><script>ok( true, 'No type is evaluated.' );</script><div><script type='text/javascript'>ok( true, 'Inner text/javascript is evaluated.' );</script><script>ok( true, 'Inner No type is evaluated.' );</script><script type='something/else'>ok( false, 'Non-script evaluated.' );</script></div>"));
+
+ var child = jQuery("#qunit-fixture").find("script");
+
+ equal( child.length, 2, "Make sure that two non-JavaScript script tags are left." );
+ equal( child[0].type, "something/else", "Verify type of script tag." );
+ equal( child[1].type, "something/else", "Verify type of script tag." );
+
+ jQuery("#qunit-fixture").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
+ jQuery("#qunit-fixture").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
+ jQuery("#qunit-fixture").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
+
+ jQuery("#qunit-fixture").html(valueObj("<script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (1)' );</script>"));
+
+ jQuery("#qunit-fixture").html(valueObj("foo <form><script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (2)' );</script></form>"));
+
+ jQuery("#qunit-fixture").html(valueObj("<script>equal(jQuery.scriptorder++, 0, 'Script is executed in order');equal(jQuery('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equal(jQuery.scriptorder++, 1, 'Script (nested) is executed in order');equal(jQuery('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equal(jQuery.scriptorder++, 2, 'Script (unnested) is executed in order');equal(jQuery('#scriptorder').length, 1,'Execute after html')<\/script>"));
+}
+
+test("html(String)", function() {
+ testHtml(bareObj);
+});
+
+test("html(Function)", function() {
+ testHtml(functionReturningObj);
+
+ expect(36);
+
+ QUnit.reset();
+
+ jQuery("#qunit-fixture").html(function(){
+ return jQuery(this).text();
+ });
+
+ ok( !/</.test( jQuery("#qunit-fixture").html() ), "Replace html with text." );
+ ok( jQuery("#qunit-fixture").html().length > 0, "Make sure text exists." );
+});
+
+test("html(Function) with incoming value", function() {
+ expect(20);
+
+ var div = jQuery("#qunit-fixture > div"), old = div.map(function(){ return jQuery(this).html() });
+
+ div.html(function(i, val) {
+ equal( val, old[i], "Make sure the incoming value is correct." );
+ return "<b>test</b>";
+ });
+
+ var pass = true;
+ div.each(function(){
+ if ( this.childNodes.length !== 1 ) {
+ pass = false;
+ }
+ })
+ ok( pass, "Set HTML" );
+
+ QUnit.reset();
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ old = j.map(function(){ return jQuery(this).html(); });
+
+ j.html(function(i, val) {
+ equal( val, old[i], "Make sure the incoming value is correct." );
+ return "<b>bold</b>";
+ });
+
+ // Handle the case where no comment is in the document
+ if ( j.length === 2 ) {
+ equal( null, null, "Make sure the incoming value is correct." );
+ }
+
+ j.find("b").removeData();
+ equal( j.html().replace(/ xmlns="[^"]+"/g, "").toLowerCase(), "<b>bold</b>", "Check node,textnode,comment with html()" );
+
+ var $div = jQuery("<div />");
+
+ equal( $div.html(function(i, val) {
+ equal( val, "", "Make sure the incoming value is correct." );
+ return 5;
+ }).html(), "5", "Setting a number as html" );
+
+ equal( $div.html(function(i, val) {
+ equal( val, "5", "Make sure the incoming value is correct." );
+ return 0;
+ }).html(), "0", "Setting a zero as html" );
+
+ var $div2 = jQuery("<div/>"), insert = "&lt;div&gt;hello1&lt;/div&gt;";
+ equal( $div2.html(function(i, val) {
+ equal( val, "", "Make sure the incoming value is correct." );
+ return insert;
+ }).html().replace(/>/g, "&gt;"), insert, "Verify escaped insertion." );
+
+ equal( $div2.html(function(i, val) {
+ equal( val.replace(/>/g, "&gt;"), insert, "Make sure the incoming value is correct." );
+ return "x" + insert;
+ }).html().replace(/>/g, "&gt;"), "x" + insert, "Verify escaped insertion." );
+
+ equal( $div2.html(function(i, val) {
+ equal( val.replace(/>/g, "&gt;"), "x" + insert, "Make sure the incoming value is correct." );
+ return " " + insert;
+ }).html().replace(/>/g, "&gt;"), " " + insert, "Verify escaped insertion." );
+});
+
+var testRemove = function(method) {
+ expect(9);
+
+ var first = jQuery("#ap").children(":first");
+ first.data("foo", "bar");
+
+ jQuery("#ap").children()[method]();
+ ok( jQuery("#ap").text().length > 10, "Check text is not removed" );
+ equal( jQuery("#ap").children().length, 0, "Check remove" );
+
+ equal( first.data("foo"), method == "remove" ? null : "bar" );
+
+ QUnit.reset();
+ jQuery("#ap").children()[method]("a");
+ ok( jQuery("#ap").text().length > 10, "Check text is not removed" );
+ equal( jQuery("#ap").children().length, 1, "Check filtered remove" );
+
+ jQuery("#ap").children()[method]("a, code");
+ equal( jQuery("#ap").children().length, 0, "Check multi-filtered remove" );
+
+ // using contents will get comments regular, text, and comment nodes
+ // Handle the case where no comment is in the document
+ ok( jQuery("#nonnodes").contents().length >= 2, "Check node,textnode,comment remove works" );
+ jQuery("#nonnodes").contents()[method]();
+ equal( jQuery("#nonnodes").contents().length, 0, "Check node,textnode,comment remove works" );
+
+ // manually clean up detached elements
+ if (method === "detach") {
+ first.remove();
+ }
+
+ QUnit.reset();
+
+ var count = 0;
+ var first = jQuery("#ap").children(":first");
+ var cleanUp = first.click(function() { count++ })[method]().appendTo("#qunit-fixture").click();
+
+ equal( method == "remove" ? 0 : 1, count );
+
+ // manually clean up detached elements
+ cleanUp.remove();
+};
+
+test("remove()", function() {
+ testRemove("remove");
+});
+
+test("detach()", function() {
+ testRemove("detach");
+});
+
+test("empty()", function() {
+ expect(3);
+ equal( jQuery("#ap").children().empty().text().length, 0, "Check text is removed" );
+ equal( jQuery("#ap").children().length, 4, "Check elements are not removed" );
+
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ j.empty();
+ equal( j.html(), "", "Check node,textnode,comment empty works" );
+});
+
+test("jQuery.cleanData", function() {
+ expect(14);
+
+ var type, pos, div, child;
+
+ type = "remove";
+
+ // Should trigger 4 remove event
+ div = getDiv().remove();
+
+ // Should both do nothing
+ pos = "Outer";
+ div.trigger("click");
+
+ pos = "Inner";
+ div.children().trigger("click");
+
+ type = "empty";
+ div = getDiv();
+ child = div.children();
+
+ // Should trigger 2 remove event
+ div.empty();
+
+ // Should trigger 1
+ pos = "Outer";
+ div.trigger("click");
+
+ // Should do nothing
+ pos = "Inner";
+ child.trigger("click");
+
+ // Should trigger 2
+ div.remove();
+
+ type = "html";
+
+ div = getDiv();
+ child = div.children();
+
+ // Should trigger 2 remove event
+ div.html("<div></div>");
+
+ // Should trigger 1
+ pos = "Outer";
+ div.trigger("click");
+
+ // Should do nothing
+ pos = "Inner";
+ child.trigger("click");
+
+ // Should trigger 2
+ div.remove();
+
+ function getDiv() {
+ var div = jQuery("<div class='outer'><div class='inner'></div></div>").click(function(){
+ ok( true, type + " " + pos + " Click event fired." );
+ }).focus(function(){
+ ok( true, type + " " + pos + " Focus event fired." );
+ }).find("div").click(function(){
+ ok( false, type + " " + pos + " Click event fired." );
+ }).focus(function(){
+ ok( false, type + " " + pos + " Focus event fired." );
+ }).end().appendTo("body");
+
+ div[0].detachEvent = div[0].removeEventListener = function(t){
+ ok( true, type + " Outer " + t + " event unbound" );
+ };
+
+ div[0].firstChild.detachEvent = div[0].firstChild.removeEventListener = function(t){
+ ok( true, type + " Inner " + t + " event unbound" );
+ };
+
+ return div;
+ }
+});
+
+test("jQuery.buildFragment - no plain-text caching (Bug #6779)", function() {
+ expect(1);
+
+ // DOM manipulation fails if added text matches an Object method
+ var $f = jQuery( "<div />" ).appendTo( "#qunit-fixture" ),
+ bad = [ "start-", "toString", "hasOwnProperty", "append", "here&there!", "-end" ];
+
+ for ( var i=0; i < bad.length; i++ ) {
+ try {
+ $f.append( bad[i] );
+ }
+ catch(e) {}
+ }
+ equal($f.text(), bad.join(""), "Cached strings that match Object properties");
+ $f.remove();
+});
+
+test( "jQuery.html - execute scripts escaped with html comment or CDATA (#9221)", function() {
+ expect( 3 );
+ jQuery( [
+ '<script type="text/javascript">',
+ '<!--',
+ 'ok( true, "<!-- handled" );',
+ '//-->',
+ '</script>'
+ ].join ( "\n" ) ).appendTo( "#qunit-fixture" );
+ jQuery( [
+ '<script type="text/javascript">',
+ '<![CDATA[',
+ 'ok( true, "<![CDATA[ handled" );',
+ '//]]>',
+ '</script>'
+ ].join ( "\n" ) ).appendTo( "#qunit-fixture" );
+ jQuery( [
+ '<script type="text/javascript">',
+ '<!--//--><![CDATA[//><!--',
+ 'ok( true, "<!--//--><![CDATA[//><!-- (Drupal case) handled" );',
+ '//--><!]]>',
+ '</script>'
+ ].join ( "\n" ) ).appendTo( "#qunit-fixture" );
+});
+
+test("jQuery.buildFragment - plain objects are not a document #8950", function() {
+ expect(1);
+
+ try {
+ jQuery('<input type="hidden">', {});
+ ok( true, "Does not allow attribute object to be treated like a doc object");
+ } catch (e) {}
+
+});
+
+test("jQuery.clone - no exceptions for object elements #9587", function() {
+ expect(1);
+
+ try {
+ jQuery("#no-clone-exception").clone();
+ ok( true, "cloned with no exceptions" );
+ } catch( e ) {
+ ok( false, e.message );
+ }
+});
+
+test("jQuery(<tag>) & wrap[Inner/All]() handle unknown elems (#10667)", function() {
+ expect(2);
+
+ var $wraptarget = jQuery( "<div id='wrap-target'>Target</div>" ).appendTo( "#qunit-fixture" ),
+ $section = jQuery( "<section>" ).appendTo( "#qunit-fixture" );
+
+ $wraptarget.wrapAll("<aside style='background-color:green'></aside>");
+
+ notEqual( $wraptarget.parent("aside").css("background-color"), "transparent", "HTML5 elements created with wrapAll inherit styles" );
+ notEqual( $section.css("background-color"), "transparent", "HTML5 elements create with jQuery( string ) inherit styles" );
+});
+
+test("Cloned, detached HTML5 elems (#10667,10670)", function() {
+ expect(7);
+
+ var $section = jQuery( "<section>" ).appendTo( "#qunit-fixture" ),
+ $clone;
+
+ // First clone
+ $clone = $section.clone();
+
+ // Infer that the test is being run in IE<=8
+ if ( $clone[0].outerHTML && !jQuery.support.opacity ) {
+ // This branch tests cloning nodes by reading the outerHTML, used only in IE<=8
+ equal( $clone[0].outerHTML, "<section></section>", "detached clone outerHTML matches '<section></section>'" );
+ } else {
+ // This branch tests a known behaviour in modern browsers that should never fail.
+ // Included for expected test count symmetry (expecting 1)
+ equal( $clone[0].nodeName, "SECTION", "detached clone nodeName matches 'SECTION' in modern browsers" );
+ }
+
+ // Bind an event
+ $section.bind( "click", function( event ) {
+ ok( true, "clone fired event" );
+ });
+
+ // Second clone (will have an event bound)
+ $clone = $section.clone( true );
+
+ // Trigger an event from the first clone
+ $clone.trigger( "click" );
+ $clone.unbind( "click" );
+
+ // Add a child node with text to the original
+ $section.append( "<p>Hello</p>" );
+
+ // Third clone (will have child node and text)
+ $clone = $section.clone( true );
+
+ equal( $clone.find("p").text(), "Hello", "Assert text in child of clone" );
+
+ // Trigger an event from the third clone
+ $clone.trigger( "click" );
+ $clone.unbind( "click" );
+
+ // Add attributes to copy
+ $section.attr({
+ "class": "foo bar baz",
+ "title": "This is a title"
+ });
+
+ // Fourth clone (will have newly added attributes)
+ $clone = $section.clone( true );
+
+ equal( $clone.attr("class"), $section.attr("class"), "clone and element have same class attribute" );
+ equal( $clone.attr("title"), $section.attr("title"), "clone and element have same title attribute" );
+
+ // Remove the original
+ $section.remove();
+
+ // Clone the clone
+ $section = $clone.clone( true );
+
+ // Remove the clone
+ $clone.remove();
+
+ // Trigger an event from the clone of the clone
+ $section.trigger( "click" );
+
+ // Unbind any remaining events
+ $section.unbind( "click" );
+ $clone.unbind( "click" );
+});
+
+test("jQuery.fragments cache expectations", function() {
+
+ expect( 10 );
+
+ jQuery.fragments = {};
+
+ function fragmentCacheSize() {
+ var n = 0, c;
+
+ for ( c in jQuery.fragments ) {
+ n++;
+ }
+ return n;
+ }
+
+ jQuery("<li></li>");
+ jQuery("<li>?</li>");
+ jQuery("<li>whip</li>");
+ jQuery("<li>it</li>");
+ jQuery("<li>good</li>");
+ jQuery("<div></div>");
+ jQuery("<div><div><span></span></div></div>");
+ jQuery("<tr><td></td></tr>");
+ jQuery("<tr><td></tr>");
+ jQuery("<li>aaa</li>");
+ jQuery("<ul><li>?</li></ul>");
+ jQuery("<div><p>arf</p>nnn</div>");
+ jQuery("<div><p>dog</p>?</div>");
+ jQuery("<span><span>");
+
+ equal( fragmentCacheSize(), 12, "12 entries exist in jQuery.fragments, 1" );
+
+ jQuery.each( [
+ "<tr><td></td></tr>",
+ "<ul><li>?</li></ul>",
+ "<div><p>dog</p>?</div>",
+ "<span><span>"
+ ], function( i, frag ) {
+
+ jQuery( frag );
+
+ equal( jQuery.fragments[ frag ].nodeType, 11, "Second call with " + frag + " creates a cached DocumentFragment, has nodeType 11" );
+ ok( jQuery.fragments[ frag ].childNodes.length, "Second call with " + frag + " creates a cached DocumentFragment, has childNodes with length" );
+ });
+
+ equal( fragmentCacheSize(), 12, "12 entries exist in jQuery.fragments, 2" );
+});
diff --git a/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/traversing.js b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/traversing.js
new file mode 100644
index 0000000..bcd3a97
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/jquery-1.7.1/unit/traversing.js
@@ -0,0 +1,642 @@
+module("traversing", { teardown: moduleTeardown });
+
+test("find(String)", function() {
+ expect(5);
+ equal( "Yahoo", jQuery("#foo").find(".blogTest").text(), "Check for find" );
+
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ equal( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" );
+
+ deepEqual( jQuery("#qunit-fixture").find("> div").get(), q("foo", "moretests", "tabindex-tests", "liveHandlerOrder", "siblingTest"), "find child elements" );
+ deepEqual( jQuery("#qunit-fixture").find("> #foo, > #moretests").get(), q("foo", "moretests"), "find child elements" );
+ deepEqual( jQuery("#qunit-fixture").find("> #foo > p").get(), q("sndp", "en", "sap"), "find child elements" );
+});
+
+test("find(node|jQuery object)", function() {
+ expect( 11 );
+
+ var $foo = jQuery("#foo"),
+ $blog = jQuery(".blogTest"),
+ $first = jQuery("#first"),
+ $two = $blog.add( $first ),
+ $fooTwo = $foo.add( $blog );
+
+ equal( $foo.find( $blog ).text(), "Yahoo", "Find with blog jQuery object" );
+ equal( $foo.find( $blog[0] ).text(), "Yahoo", "Find with blog node" );
+ equal( $foo.find( $first ).length, 0, "#first is not in #foo" );
+ equal( $foo.find( $first[0]).length, 0, "#first not in #foo (node)" );
+ ok( $foo.find( $two ).is(".blogTest"), "Find returns only nodes within #foo" );
+ ok( $fooTwo.find( $blog ).is(".blogTest"), "Blog is part of the collection, but also within foo" );
+ ok( $fooTwo.find( $blog[0] ).is(".blogTest"), "Blog is part of the collection, but also within foo(node)" );
+
+ equal( $two.find( $foo ).length, 0, "Foo is not in two elements" );
+ equal( $two.find( $foo[0] ).length, 0, "Foo is not in two elements(node)" );
+ equal( $two.find( $first ).length, 0, "first is in the collection and not within two" );
+ equal( $two.find( $first ).length, 0, "first is in the collection and not within two(node)" );
+
+});
+
+test("is(String|undefined)", function() {
+ expect(29);
+ ok( jQuery("#form").is("form"), "Check for element: A form must be a form" );
+ ok( !jQuery("#form").is("div"), "Check for element: A form is not a div" );
+ ok( jQuery("#mark").is(".blog"), "Check for class: Expected class 'blog'" );
+ ok( !jQuery("#mark").is(".link"), "Check for class: Did not expect class 'link'" );
+ ok( jQuery("#simon").is(".blog.link"), "Check for multiple classes: Expected classes 'blog' and 'link'" );
+ ok( !jQuery("#simon").is(".blogTest"), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" );
+ ok( jQuery("#en").is("[lang=\"en\"]"), "Check for attribute: Expected attribute lang to be 'en'" );
+ ok( !jQuery("#en").is("[lang=\"de\"]"), "Check for attribute: Expected attribute lang to be 'en', not 'de'" );
+ ok( jQuery("#text1").is("[type=\"text\"]"), "Check for attribute: Expected attribute type to be 'text'" );
+ ok( !jQuery("#text1").is("[type=\"radio\"]"), "Check for attribute: Expected attribute type to be 'text', not 'radio'" );
+ ok( jQuery("#text2").is(":disabled"), "Check for pseudoclass: Expected to be disabled" );
+ ok( !jQuery("#text1").is(":disabled"), "Check for pseudoclass: Expected not disabled" );
+ ok( jQuery("#radio2").is(":checked"), "Check for pseudoclass: Expected to be checked" );
+ ok( !jQuery("#radio1").is(":checked"), "Check for pseudoclass: Expected not checked" );
+ ok( jQuery("#foo").is(":has(p)"), "Check for child: Expected a child 'p' element" );
+ ok( !jQuery("#foo").is(":has(ul)"), "Check for child: Did not expect 'ul' element" );
+ ok( jQuery("#foo").is(":has(p):has(a):has(code)"), "Check for childs: Expected 'p', 'a' and 'code' child elements" );
+ ok( !jQuery("#foo").is(":has(p):has(a):has(code):has(ol)"), "Check for childs: Expected 'p', 'a' and 'code' child elements, but no 'ol'" );
+
+ ok( !jQuery("#foo").is(0), "Expected false for an invalid expression - 0" );
+ ok( !jQuery("#foo").is(null), "Expected false for an invalid expression - null" );
+ ok( !jQuery("#foo").is(""), "Expected false for an invalid expression - \"\"" );
+ ok( !jQuery("#foo").is(undefined), "Expected false for an invalid expression - undefined" );
+ ok( !jQuery("#foo").is({ plain: "object" }), "Check passing invalid object" );
+
+ // test is() with comma-seperated expressions
+ ok( jQuery("#en").is("[lang=\"en\"],[lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
+ ok( jQuery("#en").is("[lang=\"de\"],[lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
+ ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
+ ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
+
+ ok( !jQuery(window).is('a'), "Checking is on a window does not throw an exception(#10178)" );
+ ok( !jQuery(document).is('a'), "Checking is on a document does not throw an exception(#10178)" );
+});
+
+test("is(jQuery)", function() {
+ expect(21);
+ ok( jQuery("#form").is( jQuery("form") ), "Check for element: A form is a form" );
+ ok( !jQuery("#form").is( jQuery("div") ), "Check for element: A form is not a div" );
+ ok( jQuery("#mark").is( jQuery(".blog") ), "Check for class: Expected class 'blog'" );
+ ok( !jQuery("#mark").is( jQuery(".link") ), "Check for class: Did not expect class 'link'" );
+ ok( jQuery("#simon").is( jQuery(".blog.link") ), "Check for multiple classes: Expected classes 'blog' and 'link'" );
+ ok( !jQuery("#simon").is( jQuery(".blogTest") ), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" );
+ ok( jQuery("#en").is( jQuery("[lang=\"en\"]") ), "Check for attribute: Expected attribute lang to be 'en'" );
+ ok( !jQuery("#en").is( jQuery("[lang=\"de\"]") ), "Check for attribute: Expected attribute lang to be 'en', not 'de'" );
+ ok( jQuery("#text1").is( jQuery("[type=\"text\"]") ), "Check for attribute: Expected attribute type to be 'text'" );
+ ok( !jQuery("#text1").is( jQuery("[type=\"radio\"]") ), "Check for attribute: Expected attribute type to be 'text', not 'radio'" );
+ ok( !jQuery("#text1").is( jQuery("input:disabled") ), "Check for pseudoclass: Expected not disabled" );
+ ok( jQuery("#radio2").is( jQuery("input:checked") ), "Check for pseudoclass: Expected to be checked" );
+ ok( !jQuery("#radio1").is( jQuery("input:checked") ), "Check for pseudoclass: Expected not checked" );
+ ok( jQuery("#foo").is( jQuery("div:has(p)") ), "Check for child: Expected a child 'p' element" );
+ ok( !jQuery("#foo").is( jQuery("div:has(ul)") ), "Check for child: Did not expect 'ul' element" );
+
+ // Some raw elements
+ ok( jQuery("#form").is( jQuery("form")[0] ), "Check for element: A form is a form" );
+ ok( !jQuery("#form").is( jQuery("div")[0] ), "Check for element: A form is not a div" );
+ ok( jQuery("#mark").is( jQuery(".blog")[0] ), "Check for class: Expected class 'blog'" );
+ ok( !jQuery("#mark").is( jQuery(".link")[0] ), "Check for class: Did not expect class 'link'" );
+ ok( jQuery("#simon").is( jQuery(".blog.link")[0] ), "Check for multiple classes: Expected classes 'blog' and 'link'" );
+ ok( !jQuery("#simon").is( jQuery(".blogTest")[0] ), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" );
+});
+
+test("is() with positional selectors", function() {
+ expect(23);
+
+ var html = jQuery(
+ '<p id="posp"><a class="firsta" href="#"><em>first</em></a><a class="seconda" href="#"><b>test</b></a><em></em></p>'
+ ).appendTo( "body" ),
+ isit = function(sel, match, expect) {
+ equal( jQuery( sel ).is( match ), expect, "jQuery( " + sel + " ).is( " + match + " )" );
+ };
+
+ isit( "#posp", "#posp:first", true );
+ isit( "#posp", "#posp:eq(2)", false );
+ isit( "#posp", "#posp a:first", false );
+
+ isit( "#posp .firsta", "#posp a:first", true );
+ isit( "#posp .firsta", "#posp a:last", false );
+ isit( "#posp .firsta", "#posp a:even", true );
+ isit( "#posp .firsta", "#posp a:odd", false );
+ isit( "#posp .firsta", "#posp a:eq(0)", true );
+ isit( "#posp .firsta", "#posp a:eq(9)", false );
+ isit( "#posp .firsta", "#posp em:eq(0)", false );
+ isit( "#posp .firsta", "#posp em:first", false );
+ isit( "#posp .firsta", "#posp:first", false );
+
+ isit( "#posp .seconda", "#posp a:first", false );
+ isit( "#posp .seconda", "#posp a:last", true );
+ isit( "#posp .seconda", "#posp a:gt(0)", true );
+ isit( "#posp .seconda", "#posp a:lt(5)", true );
+ isit( "#posp .seconda", "#posp a:lt(1)", false );
+
+ isit( "#posp em", "#posp a:eq(0) em", true );
+ isit( "#posp em", "#posp a:lt(1) em", true );
+ isit( "#posp em", "#posp a:gt(1) em", false );
+ isit( "#posp em", "#posp a:first em", true );
+ isit( "#posp em", "#posp a em:last", true );
+ isit( "#posp em", "#posp a em:eq(2)", false );
+
+ html.remove();
+});
+
+test("index()", function() {
+ expect( 2 );
+
+ equal( jQuery("#text2").index(), 2, "Returns the index of a child amongst its siblings" );
+
+ equal( jQuery("<div/>").index(), -1, "Node without parent returns -1" );
+});
+
+test("index(Object|String|undefined)", function() {
+ expect(16);
+
+ var elements = jQuery([window, document]),
+ inputElements = jQuery("#radio1,#radio2,#check1,#check2");
+
+ // Passing a node
+ equal( elements.index(window), 0, "Check for index of elements" );
+ equal( elements.index(document), 1, "Check for index of elements" );
+ equal( inputElements.index(document.getElementById("radio1")), 0, "Check for index of elements" );
+ equal( inputElements.index(document.getElementById("radio2")), 1, "Check for index of elements" );
+ equal( inputElements.index(document.getElementById("check1")), 2, "Check for index of elements" );
+ equal( inputElements.index(document.getElementById("check2")), 3, "Check for index of elements" );
+ equal( inputElements.index(window), -1, "Check for not found index" );
+ equal( inputElements.index(document), -1, "Check for not found index" );
+
+ // Passing a jQuery object
+ // enabled since [5500]
+ equal( elements.index( elements ), 0, "Pass in a jQuery object" );
+ equal( elements.index( elements.eq(1) ), 1, "Pass in a jQuery object" );
+ equal( jQuery("#form :radio").index( jQuery("#radio2") ), 1, "Pass in a jQuery object" );
+
+ // Passing a selector or nothing
+ // enabled since [6330]
+ equal( jQuery("#text2").index(), 2, "Check for index amongst siblings" );
+ equal( jQuery("#form").children().eq(4).index(), 4, "Check for index amongst siblings" );
+ equal( jQuery("#radio2").index("#form :radio") , 1, "Check for index within a selector" );
+ equal( jQuery("#form :radio").index( jQuery("#radio2") ), 1, "Check for index within a selector" );
+ equal( jQuery("#radio2").index("#form :text") , -1, "Check for index not found within a selector" );
+});
+
+test("filter(Selector|undefined)", function() {
+ expect(9);
+ deepEqual( jQuery("#form input").filter(":checked").get(), q("radio2", "check1"), "filter(String)" );
+ deepEqual( jQuery("p").filter("#ap, #sndp").get(), q("ap", "sndp"), "filter('String, String')" );
+ deepEqual( jQuery("p").filter("#ap,#sndp").get(), q("ap", "sndp"), "filter('String,String')" );
+
+ deepEqual( jQuery("p").filter(null).get(), [], "filter(null) should return an empty jQuery object");
+ deepEqual( jQuery("p").filter(undefined).get(), [], "filter(undefined) should return an empty jQuery object");
+ deepEqual( jQuery("p").filter(0).get(), [], "filter(0) should return an empty jQuery object");
+ deepEqual( jQuery("p").filter("").get(), [], "filter('') should return an empty jQuery object");
+
+ // using contents will get comments regular, text, and comment nodes
+ var j = jQuery("#nonnodes").contents();
+ equal( j.filter("span").length, 1, "Check node,textnode,comment to filter the one span" );
+ equal( j.filter("[name]").length, 0, "Check node,textnode,comment to filter the one span" );
+});
+
+test("filter(Function)", function() {
+ expect(2);
+
+ deepEqual( jQuery("#qunit-fixture p").filter(function() { return !jQuery("a", this).length }).get(), q("sndp", "first"), "filter(Function)" );
+
+ deepEqual( jQuery("#qunit-fixture p").filter(function(i, elem) { return !jQuery("a", elem).length }).get(), q("sndp", "first"), "filter(Function) using arg" );
+});
+
+test("filter(Element)", function() {
+ expect(1);
+
+ var element = document.getElementById("text1");
+ deepEqual( jQuery("#form input").filter(element).get(), q("text1"), "filter(Element)" );
+});
+
+test("filter(Array)", function() {
+ expect(1);
+
+ var elements = [ document.getElementById("text1") ];
+ deepEqual( jQuery("#form input").filter(elements).get(), q("text1"), "filter(Element)" );
+});
+
+test("filter(jQuery)", function() {
+ expect(1);
+
+ var elements = jQuery("#text1");
+ deepEqual( jQuery("#form input").filter(elements).get(), q("text1"), "filter(Element)" );
+});
+
+
+test("filter() with positional selectors", function() {
+ expect(19);
+
+ var html = jQuery('' +
+ '<p id="posp">' +
+ '<a class="firsta" href="#">' +
+ '<em>first</em>' +
+ '</a>' +
+ '<a class="seconda" href="#">' +
+ '<b>test</b>' +
+ '</a>' +
+ '<em></em>' +
+ '</p>').appendTo( "body" ),
+ filterit = function(sel, filter, length) {
+ equal( jQuery( sel ).filter( filter ).length, length, "jQuery( " + sel + " ).filter( " + filter + " )" );
+ };
+
+ filterit( "#posp", "#posp:first", 1);
+ filterit( "#posp", "#posp:eq(2)", 0 );
+ filterit( "#posp", "#posp a:first", 0 );
+
+ // Keep in mind this is within the selection and
+ // not in relation to other elements (.is() is a different story)
+ filterit( "#posp .firsta", "#posp a:first", 1 );
+ filterit( "#posp .firsta", "#posp a:last", 1 );
+ filterit( "#posp .firsta", "#posp a:last-child", 0 );
+ filterit( "#posp .firsta", "#posp a:even", 1 );
+ filterit( "#posp .firsta", "#posp a:odd", 0 );
+ filterit( "#posp .firsta", "#posp a:eq(0)", 1 );
+ filterit( "#posp .firsta", "#posp a:eq(9)", 0 );
+ filterit( "#posp .firsta", "#posp em:eq(0)", 0 );
+ filterit( "#posp .firsta", "#posp em:first", 0 );
+ filterit( "#posp .firsta", "#posp:first", 0 );
+
+ filterit( "#posp .seconda", "#posp a:first", 1 );
+ filterit( "#posp .seconda", "#posp em:first", 0 );
+ filterit( "#posp .seconda", "#posp a:last", 1 );
+ filterit( "#posp .seconda", "#posp a:gt(0)", 0 );
+ filterit( "#posp .seconda", "#posp a:lt(5)", 1 );
+ filterit( "#posp .seconda", "#posp a:lt(1)", 1 );
+ html.remove();
+});
+
+test("closest()", function() {
+ expect(13);
+ deepEqual( jQuery("body").closest("body").get(), q("body"), "closest(body)" );
+ deepEqual( jQuery("body").closest("html").get(), q("html"), "closest(html)" );
+ deepEqual( jQuery("body").closest("div").get(), [], "closest(div)" );
+ deepEqual( jQuery("#qunit-fixture").closest("span,#html").get(), q("html"), "closest(span,#html)" );
+
+ deepEqual( jQuery("div:eq(1)").closest("div:first").get(), [], "closest(div:first)" );
+ deepEqual( jQuery("div").closest("body:first div:last").get(), q("fx-tests"), "closest(body:first div:last)" );
+
+ // Test .closest() limited by the context
+ var jq = jQuery("#nothiddendivchild");
+ deepEqual( jq.closest("html", document.body).get(), [], "Context limited." );
+ deepEqual( jq.closest("body", document.body).get(), [], "Context limited." );
+ deepEqual( jq.closest("#nothiddendiv", document.body).get(), q("nothiddendiv"), "Context not reached." );
+
+ //Test that .closest() returns unique'd set
+ equal( jQuery("#qunit-fixture p").closest("#qunit-fixture").length, 1, "Closest should return a unique set" );
+
+ // Test on disconnected node
+ equal( jQuery("<div><p></p></div>").find("p").closest("table").length, 0, "Make sure disconnected closest work." );
+
+ // Bug #7369
+ equal( jQuery("<div foo='bar'></div>").closest("[foo]").length, 1, "Disconnected nodes with attribute selector" );
+ equal( jQuery("<div>text</div>").closest("[lang]").length, 0, "Disconnected nodes with text and non-existent attribute selector" );
+});
+
+test("closest(Array)", function() {
+ expect(7);
+ deepEqual( jQuery("body").closest(["body"]), [{selector:"body", elem:document.body, level:1}], "closest([body])" );
+ deepEqual( jQuery("body").closest(["html"]), [{selector:"html", elem:document.documentElement, level:2}], "closest([html])" );
+ deepEqual( jQuery("body").closest(["div"]), [], "closest([div])" );
+ deepEqual( jQuery("#yahoo").closest(["div"]), [{"selector":"div", "elem": document.getElementById("foo"), "level": 3}, { "selector": "div", "elem": document.getElementById("qunit-fixture"), "level": 4 }], "closest([div])" );
+ deepEqual( jQuery("#qunit-fixture").closest(["span,#html"]), [{selector:"span,#html", elem:document.documentElement, level:4}], "closest([span,#html])" );
+
+ deepEqual( jQuery("body").closest(["body","html"]), [{selector:"body", elem:document.body, level:1}, {selector:"html", elem:document.documentElement, level:2}], "closest([body, html])" );
+ deepEqual( jQuery("body").closest(["span","html"]), [{selector:"html", elem:document.documentElement, level:2}], "closest([body, html])" );
+});
+
+test("closest(jQuery)", function() {
+ expect(8);
+ var $child = jQuery("#nothiddendivchild"),
+ $parent = jQuery("#nothiddendiv"),
+ $main = jQuery("#qunit-fixture"),
+ $body = jQuery("body");
+ ok( $child.closest( $parent ).is("#nothiddendiv"), "closest( jQuery('#nothiddendiv') )" );
+ ok( $child.closest( $parent[0] ).is("#nothiddendiv"), "closest( jQuery('#nothiddendiv') ) :: node" );
+ ok( $child.closest( $child ).is("#nothiddendivchild"), "child is included" );
+ ok( $child.closest( $child[0] ).is("#nothiddendivchild"), "child is included :: node" );
+ equal( $child.closest( document.createElement("div") ).length, 0, "created element is not related" );
+ equal( $child.closest( $main ).length, 0, "Main not a parent of child" );
+ equal( $child.closest( $main[0] ).length, 0, "Main not a parent of child :: node" );
+ ok( $child.closest( $body.add($parent) ).is("#nothiddendiv"), "Closest ancestor retrieved." );
+});
+
+test("not(Selector|undefined)", function() {
+ expect(11);
+ equal( jQuery("#qunit-fixture > p#ap > a").not("#google").length, 2, "not('selector')" );
+ deepEqual( jQuery("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" );
+ deepEqual( jQuery("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" );
+ deepEqual( jQuery("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d", "option3e", "option4e","option5b"), "not('complex selector')");
+
+ deepEqual( jQuery("#ap *").not("code").get(), q("google", "groups", "anchor1", "mark"), "not('tag selector')" );
+ deepEqual( jQuery("#ap *").not("code, #mark").get(), q("google", "groups", "anchor1"), "not('tag, ID selector')" );
+ deepEqual( jQuery("#ap *").not("#mark, code").get(), q("google", "groups", "anchor1"), "not('ID, tag selector')");
+
+ var all = jQuery("p").get();
+ deepEqual( jQuery("p").not(null).get(), all, "not(null) should have no effect");
+ deepEqual( jQuery("p").not(undefined).get(), all, "not(undefined) should have no effect");
+ deepEqual( jQuery("p").not(0).get(), all, "not(0) should have no effect");
+ deepEqual( jQuery("p").not("").get(), all, "not('') should have no effect");
+});
+
+test("not(Element)", function() {
+ expect(1);
+
+ var selects = jQuery("#form select");
+ deepEqual( selects.not( selects[1] ).get(), q("select1", "select3", "select4", "select5"), "filter out DOM element");
+});
+
+test("not(Function)", function() {
+ deepEqual( jQuery("#qunit-fixture p").not(function() { return jQuery("a", this).length }).get(), q("sndp", "first"), "not(Function)" );
+});
+
+test("not(Array)", function() {
+ expect(2);
+
+ equal( jQuery("#qunit-fixture > p#ap > a").not(document.getElementById("google")).length, 2, "not(DOMElement)" );
+ equal( jQuery("p").not(document.getElementsByTagName("p")).length, 0, "not(Array-like DOM collection)" );
+});
+
+test("not(jQuery)", function() {
+ expect(1);
+
+ deepEqual( jQuery("p").not(jQuery("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" );
+});
+
+test("has(Element)", function() {
+ expect(2);
+
+ var obj = jQuery("#qunit-fixture").has(jQuery("#sndp")[0]);
+ deepEqual( obj.get(), q("qunit-fixture"), "Keeps elements that have the element as a descendant" );
+
+ var multipleParent = jQuery("#qunit-fixture, #header").has(jQuery("#sndp")[0]);
+ deepEqual( obj.get(), q("qunit-fixture"), "Does not include elements that do not have the element as a descendant" );
+});
+
+test("has(Selector)", function() {
+ expect(3);
+
+ var obj = jQuery("#qunit-fixture").has("#sndp");
+ deepEqual( obj.get(), q("qunit-fixture"), "Keeps elements that have any element matching the selector as a descendant" );
+
+ var multipleParent = jQuery("#qunit-fixture, #header").has("#sndp");
+ deepEqual( obj.get(), q("qunit-fixture"), "Does not include elements that do not have the element as a descendant" );
+
+ var multipleHas = jQuery("#qunit-fixture").has("#sndp, #first");
+ deepEqual( multipleHas.get(), q("qunit-fixture"), "Only adds elements once" );
+});
+
+test("has(Arrayish)", function() {
+ expect(3);
+
+ var simple = jQuery("#qunit-fixture").has(jQuery("#sndp"));
+ deepEqual( simple.get(), q("qunit-fixture"), "Keeps elements that have any element in the jQuery list as a descendant" );
+
+ var multipleParent = jQuery("#qunit-fixture, #header").has(jQuery("#sndp"));
+ deepEqual( multipleParent.get(), q("qunit-fixture"), "Does not include elements that do not have an element in the jQuery list as a descendant" );
+
+ var multipleHas = jQuery("#qunit-fixture").has(jQuery("#sndp, #first"));
+ deepEqual( simple.get(), q("qunit-fixture"), "Only adds elements once" );
+});
+
+test("andSelf()", function() {
+ expect(4);
+ deepEqual( jQuery("#en").siblings().andSelf().get(), q("sndp", "en", "sap"), "Check for siblings and self" );
+ deepEqual( jQuery("#foo").children().andSelf().get(), q("foo", "sndp", "en", "sap"), "Check for children and self" );
+ deepEqual( jQuery("#sndp, #en").parent().andSelf().get(), q("foo","sndp","en"), "Check for parent and self" );
+ deepEqual( jQuery("#groups").parents("p, div").andSelf().get(), q("qunit-fixture", "ap", "groups"), "Check for parents and self" );
+});
+
+test("siblings([String])", function() {
+ expect(6);
+ deepEqual( jQuery("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" );
+ deepEqual( jQuery("#sndp").siblings(":has(code)").get(), q("sap"), "Check for filtered siblings (has code child element)" );
+ deepEqual( jQuery("#sndp").siblings(":has(a)").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );
+ deepEqual( jQuery("#foo").siblings("form, b").get(), q("form", "floatTest", "lengthtest", "name-tests", "testForm"), "Check for multiple filters" );
+ var set = q("sndp", "en", "sap");
+ deepEqual( jQuery("#en, #sndp").siblings().get(), set, "Check for unique results from siblings" );
+ deepEqual( jQuery("#option5a").siblings("option[data-attr]").get(), q("option5c"), "Has attribute selector in siblings (#9261)" );
+});
+
+test("children([String])", function() {
+ expect(3);
+ deepEqual( jQuery("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" );
+ deepEqual( jQuery("#foo").children(":has(code)").get(), q("sndp", "sap"), "Check for filtered children" );
+ deepEqual( jQuery("#foo").children("#en, #sap").get(), q("en", "sap"), "Check for multiple filters" );
+});
+
+test("parent([String])", function() {
+ expect(5);
+ equal( jQuery("#groups").parent()[0].id, "ap", "Simple parent check" );
+ equal( jQuery("#groups").parent("p")[0].id, "ap", "Filtered parent check" );
+ equal( jQuery("#groups").parent("div").length, 0, "Filtered parent check, no match" );
+ equal( jQuery("#groups").parent("div, p")[0].id, "ap", "Check for multiple filters" );
+ deepEqual( jQuery("#en, #sndp").parent().get(), q("foo"), "Check for unique results from parent" );
+});
+
+test("parents([String])", function() {
+ expect(5);
+ equal( jQuery("#groups").parents()[0].id, "ap", "Simple parents check" );
+ equal( jQuery("#groups").parents("p")[0].id, "ap", "Filtered parents check" );
+ equal( jQuery("#groups").parents("div")[0].id, "qunit-fixture", "Filtered parents check2" );
+ deepEqual( jQuery("#groups").parents("p, div").get(), q("ap", "qunit-fixture"), "Check for multiple filters" );
+ deepEqual( jQuery("#en, #sndp").parents().get(), q("foo", "qunit-fixture", "dl", "body", "html"), "Check for unique results from parents" );
+});
+
+test("parentsUntil([String])", function() {
+ expect(9);
+
+ var parents = jQuery("#groups").parents();
+
+ deepEqual( jQuery("#groups").parentsUntil().get(), parents.get(), "parentsUntil with no selector (nextAll)" );
+ deepEqual( jQuery("#groups").parentsUntil(".foo").get(), parents.get(), "parentsUntil with invalid selector (nextAll)" );
+ deepEqual( jQuery("#groups").parentsUntil("#html").get(), parents.not(":last").get(), "Simple parentsUntil check" );
+ equal( jQuery("#groups").parentsUntil("#ap").length, 0, "Simple parentsUntil check" );
+ deepEqual( jQuery("#groups").parentsUntil("#html, #body").get(), parents.slice( 0, 3 ).get(), "Less simple parentsUntil check" );
+ deepEqual( jQuery("#groups").parentsUntil("#html", "div").get(), jQuery("#qunit-fixture").get(), "Filtered parentsUntil check" );
+ deepEqual( jQuery("#groups").parentsUntil("#html", "p,div,dl").get(), parents.slice( 0, 3 ).get(), "Multiple-filtered parentsUntil check" );
+ equal( jQuery("#groups").parentsUntil("#html", "span").length, 0, "Filtered parentsUntil check, no match" );
+ deepEqual( jQuery("#groups, #ap").parentsUntil("#html", "p,div,dl").get(), parents.slice( 0, 3 ).get(), "Multi-source, multiple-filtered parentsUntil check" );
+});
+
+test("next([String])", function() {
+ expect(4);
+ equal( jQuery("#ap").next()[0].id, "foo", "Simple next check" );
+ equal( jQuery("#ap").next("div")[0].id, "foo", "Filtered next check" );
+ equal( jQuery("#ap").next("p").length, 0, "Filtered next check, no match" );
+ equal( jQuery("#ap").next("div, p")[0].id, "foo", "Multiple filters" );
+});
+
+test("prev([String])", function() {
+ expect(4);
+ equal( jQuery("#foo").prev()[0].id, "ap", "Simple prev check" );
+ equal( jQuery("#foo").prev("p")[0].id, "ap", "Filtered prev check" );
+ equal( jQuery("#foo").prev("div").length, 0, "Filtered prev check, no match" );
+ equal( jQuery("#foo").prev("p, div")[0].id, "ap", "Multiple filters" );
+});
+
+test("nextAll([String])", function() {
+ expect(4);
+
+ var elems = jQuery("#form").children();
+
+ deepEqual( jQuery("#label-for").nextAll().get(), elems.not(":first").get(), "Simple nextAll check" );
+ deepEqual( jQuery("#label-for").nextAll("input").get(), elems.not(":first").filter("input").get(), "Filtered nextAll check" );
+ deepEqual( jQuery("#label-for").nextAll("input,select").get(), elems.not(":first").filter("input,select").get(), "Multiple-filtered nextAll check" );
+ deepEqual( jQuery("#label-for, #hidden1").nextAll("input,select").get(), elems.not(":first").filter("input,select").get(), "Multi-source, multiple-filtered nextAll check" );
+});
+
+test("prevAll([String])", function() {
+ expect(4);
+
+ var elems = jQuery( jQuery("#form").children().slice(0, 12).get().reverse() );
+
+ deepEqual( jQuery("#area1").prevAll().get(), elems.get(), "Simple prevAll check" );
+ deepEqual( jQuery("#area1").prevAll("input").get(), elems.filter("input").get(), "Filtered prevAll check" );
+ deepEqual( jQuery("#area1").prevAll("input,select").get(), elems.filter("input,select").get(), "Multiple-filtered prevAll check" );
+ deepEqual( jQuery("#area1, #hidden1").prevAll("input,select").get(), elems.filter("input,select").get(), "Multi-source, multiple-filtered prevAll check" );
+});
+
+test("nextUntil([String])", function() {
+ expect(11);
+
+ var elems = jQuery("#form").children().slice( 2, 12 );
+
+ deepEqual( jQuery("#text1").nextUntil().get(), jQuery("#text1").nextAll().get(), "nextUntil with no selector (nextAll)" );
+ deepEqual( jQuery("#text1").nextUntil(".foo").get(), jQuery("#text1").nextAll().get(), "nextUntil with invalid selector (nextAll)" );
+ deepEqual( jQuery("#text1").nextUntil("#area1").get(), elems.get(), "Simple nextUntil check" );
+ equal( jQuery("#text1").nextUntil("#text2").length, 0, "Simple nextUntil check" );
+ deepEqual( jQuery("#text1").nextUntil("#area1, #radio1").get(), jQuery("#text1").next().get(), "Less simple nextUntil check" );
+ deepEqual( jQuery("#text1").nextUntil("#area1", "input").get(), elems.not("button").get(), "Filtered nextUntil check" );
+ deepEqual( jQuery("#text1").nextUntil("#area1", "button").get(), elems.not("input").get(), "Filtered nextUntil check" );
+ deepEqual( jQuery("#text1").nextUntil("#area1", "button,input").get(), elems.get(), "Multiple-filtered nextUntil check" );
+ equal( jQuery("#text1").nextUntil("#area1", "div").length, 0, "Filtered nextUntil check, no match" );
+ deepEqual( jQuery("#text1, #hidden1").nextUntil("#area1", "button,input").get(), elems.get(), "Multi-source, multiple-filtered nextUntil check" );
+
+ deepEqual( jQuery("#text1").nextUntil("[class=foo]").get(), jQuery("#text1").nextAll().get(), "Non-element nodes must be skipped, since they have no attributes" );
+});
+
+test("prevUntil([String])", function() {
+ expect(10);
+
+ var elems = jQuery("#area1").prevAll();
+
+ deepEqual( jQuery("#area1").prevUntil().get(), elems.get(), "prevUntil with no selector (prevAll)" );
+ deepEqual( jQuery("#area1").prevUntil(".foo").get(), elems.get(), "prevUntil with invalid selector (prevAll)" );
+ deepEqual( jQuery("#area1").prevUntil("label").get(), elems.not(":last").get(), "Simple prevUntil check" );
+ equal( jQuery("#area1").prevUntil("#button").length, 0, "Simple prevUntil check" );
+ deepEqual( jQuery("#area1").prevUntil("label, #search").get(), jQuery("#area1").prev().get(), "Less simple prevUntil check" );
+ deepEqual( jQuery("#area1").prevUntil("label", "input").get(), elems.not(":last").not("button").get(), "Filtered prevUntil check" );
+ deepEqual( jQuery("#area1").prevUntil("label", "button").get(), elems.not(":last").not("input").get(), "Filtered prevUntil check" );
+ deepEqual( jQuery("#area1").prevUntil("label", "button,input").get(), elems.not(":last").get(), "Multiple-filtered prevUntil check" );
+ equal( jQuery("#area1").prevUntil("label", "div").length, 0, "Filtered prevUntil check, no match" );
+ deepEqual( jQuery("#area1, #hidden1").prevUntil("label", "button,input").get(), elems.not(":last").get(), "Multi-source, multiple-filtered prevUntil check" );
+});
+
+test("contents()", function() {
+ expect(12);
+ equal( jQuery("#ap").contents().length, 9, "Check element contents" );
+ ok( jQuery("#iframe").contents()[0], "Check existance of IFrame document" );
+ var ibody = jQuery("#loadediframe").contents()[0].body;
+ ok( ibody, "Check existance of IFrame body" );
+
+ equal( jQuery("span", ibody).text(), "span text", "Find span in IFrame and check its text" );
+
+ jQuery(ibody).append("<div>init text</div>");
+ equal( jQuery("div", ibody).length, 2, "Check the original div and the new div are in IFrame" );
+
+ equal( jQuery("div:last", ibody).text(), "init text", "Add text to div in IFrame" );
+
+ jQuery("div:last", ibody).text("div text");
+ equal( jQuery("div:last", ibody).text(), "div text", "Add text to div in IFrame" );
+
+ jQuery("div:last", ibody).remove();
+ equal( jQuery("div", ibody).length, 1, "Delete the div and check only one div left in IFrame" );
+
+ equal( jQuery("div", ibody).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" );
+
+ jQuery("<table/>", ibody).append("<tr><td>cell</td></tr>").appendTo(ibody);
+ jQuery("table", ibody).remove();
+ equal( jQuery("div", ibody).length, 1, "Check for JS error on add and delete of a table in IFrame" );
+
+ // using contents will get comments regular, text, and comment nodes
+ var c = jQuery("#nonnodes").contents().contents();
+ equal( c.length, 1, "Check node,textnode,comment contents is just one" );
+ equal( c[0].nodeValue, "hi", "Check node,textnode,comment contents is just the one from span" );
+});
+
+test("add(String|Element|Array|undefined)", function() {
+ expect(16);
+ deepEqual( jQuery("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );
+ deepEqual( jQuery("#sndp").add( jQuery("#en")[0] ).add( jQuery("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" );
+
+ // We no longer support .add(form.elements), unfortunately.
+ // There is no way, in browsers, to reliably determine the difference
+ // between form.elements and form - and doing .add(form) and having it
+ // add the form elements is way to unexpected, so this gets the boot.
+ // ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" );
+
+ // For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE
+ // use jQuery([]).add(form.elements) instead.
+ //equal( jQuery([]).add(jQuery("#form")[0].elements).length, jQuery(jQuery("#form")[0].elements).length, "Array in constructor must equals array in add()" );
+
+ var divs = jQuery("<div/>").add("#sndp");
+ ok( !divs[0].parentNode, "Make sure the first element is still the disconnected node." );
+
+ divs = jQuery("<div>test</div>").add("#sndp");
+ equal( divs[0].parentNode.nodeType, 11, "Make sure the first element is still the disconnected node." );
+
+ divs = jQuery("#sndp").add("<div/>");
+ ok( !divs[1].parentNode, "Make sure the first element is still the disconnected node." );
+
+ var tmp = jQuery("<div/>");
+
+ var x = jQuery([]).add(jQuery("<p id='x1'>xxx</p>").appendTo(tmp)).add(jQuery("<p id='x2'>xxx</p>").appendTo(tmp));
+ equal( x[0].id, "x1", "Check on-the-fly element1" );
+ equal( x[1].id, "x2", "Check on-the-fly element2" );
+
+ var x = jQuery([]).add(jQuery("<p id='x1'>xxx</p>").appendTo(tmp)[0]).add(jQuery("<p id='x2'>xxx</p>").appendTo(tmp)[0]);
+ equal( x[0].id, "x1", "Check on-the-fly element1" );
+ equal( x[1].id, "x2", "Check on-the-fly element2" );
+
+ var x = jQuery([]).add(jQuery("<p id='x1'>xxx</p>")).add(jQuery("<p id='x2'>xxx</p>"));
+ equal( x[0].id, "x1", "Check on-the-fly element1" );
+ equal( x[1].id, "x2", "Check on-the-fly element2" );
+
+ var x = jQuery([]).add("<p id='x1'>xxx</p>").add("<p id='x2'>xxx</p>");
+ equal( x[0].id, "x1", "Check on-the-fly element1" );
+ equal( x[1].id, "x2", "Check on-the-fly element2" );
+
+ var notDefined;
+ equal( jQuery([]).add(notDefined).length, 0, "Check that undefined adds nothing" );
+
+ equal( jQuery([]).add( document.getElementById("form") ).length, 1, "Add a form" );
+ equal( jQuery([]).add( document.getElementById("select1") ).length, 1, "Add a select" );
+});
+
+test("add(String, Context)", function() {
+ expect(6);
+
+ deepEqual( jQuery( "#firstp" ).add( "#ap" ).get(), q( "firstp", "ap" ), "Add selector to selector " );
+ deepEqual( jQuery( document.getElementById("firstp") ).add( "#ap" ).get(), q( "firstp", "ap" ), "Add gEBId to selector" );
+ deepEqual( jQuery( document.getElementById("firstp") ).add( document.getElementById("ap") ).get(), q( "firstp", "ap" ), "Add gEBId to gEBId" );
+
+ var ctx = document.getElementById("firstp");
+ deepEqual( jQuery( "#firstp" ).add( "#ap", ctx ).get(), q( "firstp" ), "Add selector to selector " );
+ deepEqual( jQuery( document.getElementById("firstp") ).add( "#ap", ctx ).get(), q( "firstp" ), "Add gEBId to selector, not in context" );
+ deepEqual( jQuery( document.getElementById("firstp") ).add( "#ap", document.getElementsByTagName("body")[0] ).get(), q( "firstp", "ap" ), "Add gEBId to selector, in context" );
+});
+
+test("eq('-1') #10616", function() {
+ expect(3);
+ var $divs = jQuery( "div" );
+
+ equal( $divs.eq( -1 ).length, 1, "The number -1 returns a selection that has length 1" );
+ equal( $divs.eq( "-1" ).length, 1, "The string '-1' returns a selection that has length 1" );
+ deepEqual( $divs.eq( "-1" ), $divs.eq( -1 ), "String and number -1 match" );
+});
+
diff --git a/npm_assets/node_modules/html5shiv/test/mixed-test.html b/npm_assets/node_modules/html5shiv/test/mixed-test.html
new file mode 100644
index 0000000..8346ae1
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/mixed-test.html
@@ -0,0 +1,99 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>IEPP Test Suite</title>
+ <link rel="stylesheet" href="data/inline-mixed-media.css">
+ <link rel="stylesheet" href="data/inline-print-media.css">
+ <link rel="stylesheet" href="data/print.css" media="print">
+ <link rel="stylesheet" href="data/screen.css" media="screen, projection">
+ <link rel="stylesheet" href="data/print-styles.css" media="print">
+ <style>
+ body {
+ background: url(data/body-crash.jpg) no-repeat;
+ }
+ </style>
+ <style>
+ form {
+ margin: 0;
+ }
+ article#inline-print {
+ border: 5px solid #000;
+ }
+ section div article {
+ border: 5px solid #000;
+ }
+ section[data-article="article"] {
+ border: 5px solid #000;
+ }
+ </style>
+ <style media="print">
+ article#inline-print {
+ border: 5px dotted #000;
+ }
+ section div article {
+ border: 5px dotted #000;
+ }
+ section[data-article="article"] {
+ border: 5px dotted #000;
+ }
+ p+article {
+ text-decoration: underline;
+ }
+ </style>
+ <script src="../src/html5shiv-printshiv.js"></script>
+
+ <script src="//use.typekit.com/fbz1vwc.js"></script>
+ <script>
+ Typekit.load();
+ </script>
+ </head>
+ <body id="print-body-id" class="print-body-class">
+ <h1>
+ Print Me in IE!
+ </h1>
+ <p>You should see dotted broders in print.</p>
+ <article class="inline-mixed-media">
+ <p>
+ 1. This text should be underlined in IE7+.
+ </p>
+ </article>
+ <article class="inline-print-media">
+ <form action="/test/ test">
+ <div class="inside-of-form">2. inside print</div>
+ </form>
+ </article>
+ <article class="print">
+ <p>
+ 3. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam non
+ </p>
+ </article>
+ <div class="print-styles">
+ <article>
+ <p>
+ 4. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam non
+ </p>
+ </article>
+ </div>
+ <article class="print-styles-print">
+ <p>
+ 5. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam non
+ </p>
+ </article>
+ <section>
+ <div data-article="article">
+ <article>
+ <p>
+ 6. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam non
+ </p>
+
+ <section data-article="article">
+ <p>
+ 7. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam non
+ </p>
+ </section>
+ </article>
+ </div>
+ </section>
+ </body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/object-test.html b/npm_assets/node_modules/html5shiv/test/object-test.html
new file mode 100644
index 0000000..11c8970
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/object-test.html
@@ -0,0 +1,78 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>HTML5 Shiv</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+ .box {
+ position: relative;
+ zoom: 1;
+ }
+ .swf-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 200px;
+ height: 100px;
+ border: 1px solid #000;
+ }
+ </style>
+ <script src="../src/html5shiv.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
+ <script>
+ swfobject.registerObject('static-id', '6.0.0');
+ swfobject.embedSWF('data/paramtracer.swf', 'dynamic-id', '480', '420', '6.0.0', null, { 'aFlashVar': 'aFlashVarValue' }, { 'wmode': 'transparent' });
+ </script>
+ </head>
+ <body>
+ <section>This sentence has 3px solid border <mark>with these words highlighted</mark>.</section>
+ <h1>static swfobject</h1>
+ <div class="box">
+ <object id="static-id" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="420">
+ <param name="movie" value="data/paramtracer.swf">
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="data/paramtracer.swf" width="480" height="420">
+ <!--<![endif]-->
+ <param name="flashvars" value="aFlashVar=aFlashVarValue">
+ <param name="wmode" value="transparent">
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ <div class="swf-overlay"></div>
+ </div>
+
+ <h1>dynamic swfobject</h1>
+ <div class="box">
+ <div id="dynamic-id">
+ </div>
+ <div class="swf-overlay"></div>
+ </div>
+
+ <h1>innerHTML object</h1>
+ <div class="box" id="checkinner">
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="420">
+ <param name="movie" value="data/paramtracer.swf">
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="data/paramtracer.swf" width="480" height="420">
+ <!--<![endif]-->
+ <param name="flashvars" value="aFlashVar=aFlashVarValue">
+ <param name="wmode" value="transparent">
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ <div class="swf-overlay"></div>
+ </div>
+ <script>
+ (function(){
+ var box = document.getElementById('checkinner');
+ var box2 = document.createElement('div');
+ box2.innerHTML = box.innerHTML;
+ box.innerHTML = '';
+ box.appendChild(box2);
+ })();
+ </script>
+ <body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/perf.1.html b/npm_assets/node_modules/html5shiv/test/perf.1.html
new file mode 100644
index 0000000..62890ef
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/perf.1.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>HTML5 Shiv</title>
+ <link rel="stylesheet" href="style.css">
+ <script src="../src/html5shiv-printshiv.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
+ </head>
+ <body>
+ <div id="time"></div>
+ <section>This sentence is in a green box <mark>with these words highlighted</mark>.</section>
+ <script>
+ function addDom(){
+ var div, frag, fragDiv, divFrag, divFragDiv;
+ div = document.createElement('div');
+ div.innerHTML = '<section>This native javascript sentence is in a green box <mark>with these words highlighted</mark>?</section>';
+
+ frag = document.createDocumentFragment();
+ frag.appendChild(div);
+ div.innerHTML += '<section>This native javascript sentence is also in a green box <mark>with these words highlighted</mark>?</section>';
+ document.body.appendChild(frag);
+
+ frag = document.createDocumentFragment();
+ fragDiv = frag.appendChild(document.createElement('div'));
+ fragDiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>with these words highlighted</mark>?</section>';
+ document.body.appendChild(fragDiv);
+
+ jQuery(document.body).append('<section>This jQuery 1.6.4 sentence is in a green box <mark>with these words highlighted</mark>?</section><section>This jQuery 1.6.4 sentence is in a green box <mark>with these words highlighted</mark>?</section>');
+ }
+
+ var time = document.getElementById('time');
+ var cur = new Date().getTime();
+
+ for(var i = 0; i < 1000; i++){
+ addDom();
+ }
+ time.innerHTML = new Date().getTime() - cur;
+ </script>
+ <body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/perf.2.html b/npm_assets/node_modules/html5shiv/test/perf.2.html
new file mode 100644
index 0000000..2886320
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/perf.2.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>HTML5 Shiv</title>
+ <link rel="stylesheet" href="style.css">
+ <script src="../src/html5shiv-printshiv.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
+ </head>
+ <body>
+ <div id="time"></div>
+ <section>This sentence is in a green box <mark>with these words highlighted</mark>.</section>
+ <script>
+ function addDom(){
+ document.createElement('div');
+ document.createDocumentFragment();
+ }
+
+ var time = document.getElementById('time');
+ var cur = new Date().getTime();
+
+ for(var i = 0; i < 10000; i++){
+ addDom();
+ }
+ time.innerHTML = new Date().getTime() - cur;
+ </script>
+ <body>
+</html> \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/qunit/qunit.css b/npm_assets/node_modules/html5shiv/test/qunit/qunit.css
new file mode 100644
index 0000000..bcecc4c
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/qunit/qunit.css
@@ -0,0 +1,226 @@
+/**
+ * QUnit v1.2.0 - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * or GPL (GPL-LICENSE.txt) licenses.
+ */
+
+/** Font Family and Sizes */
+
+#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Header */
+
+#qunit-header {
+ padding: 0.5em 0 0.5em 1em;
+
+ color: #8699a4;
+ background-color: #0d3349;
+
+ font-size: 1.5em;
+ line-height: 1em;
+ font-weight: normal;
+
+ border-radius: 15px 15px 0 0;
+ -moz-border-radius: 15px 15px 0 0;
+ -webkit-border-top-right-radius: 15px;
+ -webkit-border-top-left-radius: 15px;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: #c2ccd1;
+}
+
+#qunit-header a:hover,
+#qunit-header a:focus {
+ color: #fff;
+}
+
+#qunit-banner {
+ height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+ padding: 0.5em 0 0.5em 2em;
+ color: #5E740B;
+ background-color: #eee;
+}
+
+#qunit-userAgent {
+ padding: 0.5em 0 0.5em 2.5em;
+ background-color: #2b81af;
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+}
+
+#qunit-tests li {
+ padding: 0.4em 0.5em 0.4em 2.5em;
+ border-bottom: 1px solid #fff;
+ list-style-position: inside;
+}
+
+#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
+ display: none;
+}
+
+#qunit-tests li strong {
+ cursor: pointer;
+}
+
+#qunit-tests li a {
+ padding: 0.5em;
+ color: #c2ccd1;
+ text-decoration: none;
+}
+#qunit-tests li a:hover,
+#qunit-tests li a:focus {
+ color: #000;
+}
+
+#qunit-tests ol {
+ margin-top: 0.5em;
+ padding: 0.5em;
+
+ background-color: #fff;
+
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+
+ box-shadow: inset 0px 2px 13px #999;
+ -moz-box-shadow: inset 0px 2px 13px #999;
+ -webkit-box-shadow: inset 0px 2px 13px #999;
+}
+
+#qunit-tests table {
+ border-collapse: collapse;
+ margin-top: .2em;
+}
+
+#qunit-tests th {
+ text-align: right;
+ vertical-align: top;
+ padding: 0 .5em 0 0;
+}
+
+#qunit-tests td {
+ vertical-align: top;
+}
+
+#qunit-tests pre {
+ margin: 0;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+#qunit-tests del {
+ background-color: #e0f2be;
+ color: #374e0c;
+ text-decoration: none;
+}
+
+#qunit-tests ins {
+ background-color: #ffcaca;
+ color: #500;
+ text-decoration: none;
+}
+
+/*** Test Counts */
+
+#qunit-tests b.counts { color: black; }
+#qunit-tests b.passed { color: #5E740B; }
+#qunit-tests b.failed { color: #710909; }
+
+#qunit-tests li li {
+ margin: 0.5em;
+ padding: 0.4em 0.5em 0.4em 0.5em;
+ background-color: #fff;
+ border-bottom: none;
+ list-style-position: inside;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #5E740B;
+ background-color: #fff;
+ border-left: 26px solid #C6E746;
+}
+
+#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests .pass .test-name { color: #366097; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+#qunit-banner.qunit-pass { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+ color: #710909;
+ background-color: #fff;
+ border-left: 26px solid #EE5757;
+ white-space: pre;
+}
+
+#qunit-tests > li:last-child {
+ border-radius: 0 0 15px 15px;
+ -moz-border-radius: 0 0 15px 15px;
+ -webkit-border-bottom-right-radius: 15px;
+ -webkit-border-bottom-left-radius: 15px;
+}
+
+#qunit-tests .fail { color: #000000; background-color: #EE5757; }
+#qunit-tests .fail .test-name,
+#qunit-tests .fail .module-name { color: #000000; }
+
+#qunit-tests .fail .test-actual { color: #EE5757; }
+#qunit-tests .fail .test-expected { color: green; }
+
+#qunit-banner.qunit-fail { background-color: #EE5757; }
+
+
+/** Result */
+
+#qunit-testresult {
+ padding: 0.5em 0.5em 0.5em 2.5em;
+
+ color: #2b81af;
+ background-color: #D2E0E6;
+
+ border-bottom: 1px solid white;
+}
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+}
diff --git a/npm_assets/node_modules/html5shiv/test/qunit/qunit.js b/npm_assets/node_modules/html5shiv/test/qunit/qunit.js
new file mode 100644
index 0000000..6d2a8a7
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/qunit/qunit.js
@@ -0,0 +1,1597 @@
+/**
+ * QUnit v1.2.0 - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * or GPL (GPL-LICENSE.txt) licenses.
+ */
+
+(function(window) {
+
+var defined = {
+ setTimeout: typeof window.setTimeout !== "undefined",
+ sessionStorage: (function() {
+ try {
+ return !!sessionStorage.getItem;
+ } catch(e) {
+ return false;
+ }
+ })()
+};
+
+var testId = 0,
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty;
+
+var Test = function(name, testName, expected, testEnvironmentArg, async, callback) {
+ this.name = name;
+ this.testName = testName;
+ this.expected = expected;
+ this.testEnvironmentArg = testEnvironmentArg;
+ this.async = async;
+ this.callback = callback;
+ this.assertions = [];
+};
+Test.prototype = {
+ init: function() {
+ var tests = id("qunit-tests");
+ if (tests) {
+ var b = document.createElement("strong");
+ b.innerHTML = "Running " + this.name;
+ var li = document.createElement("li");
+ li.appendChild( b );
+ li.className = "running";
+ li.id = this.id = "test-output" + testId++;
+ tests.appendChild( li );
+ }
+ },
+ setup: function() {
+ if (this.module != config.previousModule) {
+ if ( config.previousModule ) {
+ runLoggingCallbacks('moduleDone', QUnit, {
+ name: config.previousModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ } );
+ }
+ config.previousModule = this.module;
+ config.moduleStats = { all: 0, bad: 0 };
+ runLoggingCallbacks( 'moduleStart', QUnit, {
+ name: this.module
+ } );
+ }
+
+ config.current = this;
+ this.testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, this.moduleTestEnvironment);
+ if (this.testEnvironmentArg) {
+ extend(this.testEnvironment, this.testEnvironmentArg);
+ }
+
+ runLoggingCallbacks( 'testStart', QUnit, {
+ name: this.testName,
+ module: this.module
+ });
+
+ // allow utility functions to access the current test environment
+ // TODO why??
+ QUnit.current_testEnvironment = this.testEnvironment;
+
+ try {
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+
+ this.testEnvironment.setup.call(this.testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Setup failed on " + this.testName + ": " + e.message );
+ }
+ },
+ run: function() {
+ config.current = this;
+ if ( this.async ) {
+ QUnit.stop();
+ }
+
+ if ( config.notrycatch ) {
+ this.callback.call(this.testEnvironment);
+ return;
+ }
+ try {
+ this.callback.call(this.testEnvironment);
+ } catch(e) {
+ fail("Test " + this.testName + " died, exception and test follows", e, this.callback);
+ QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ QUnit.start();
+ }
+ }
+ },
+ teardown: function() {
+ config.current = this;
+ try {
+ this.testEnvironment.teardown.call(this.testEnvironment);
+ checkPollution();
+ } catch(e) {
+ QUnit.ok( false, "Teardown failed on " + this.testName + ": " + e.message );
+ }
+ },
+ finish: function() {
+ config.current = this;
+ if ( this.expected != null && this.expected != this.assertions.length ) {
+ QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
+ }
+
+ var good = 0, bad = 0,
+ tests = id("qunit-tests");
+
+ config.stats.all += this.assertions.length;
+ config.moduleStats.all += this.assertions.length;
+
+ if ( tests ) {
+ var ol = document.createElement("ol");
+
+ for ( var i = 0; i < this.assertions.length; i++ ) {
+ var assertion = this.assertions[i];
+
+ var li = document.createElement("li");
+ li.className = assertion.result ? "pass" : "fail";
+ li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed");
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ // store result when possible
+ if ( QUnit.config.reorder && defined.sessionStorage ) {
+ if (bad) {
+ sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad);
+ } else {
+ sessionStorage.removeItem("qunit-" + this.module + "-" + this.testName);
+ }
+ }
+
+ if (bad == 0) {
+ ol.style.display = "none";
+ }
+
+ var b = document.createElement("strong");
+ b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
+
+ var a = document.createElement("a");
+ a.innerHTML = "Rerun";
+ a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling.nextSibling,
+ display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function(e) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
+ }
+ });
+
+ var li = id(this.id);
+ li.className = bad ? "fail" : "pass";
+ li.removeChild( li.firstChild );
+ li.appendChild( b );
+ li.appendChild( a );
+ li.appendChild( ol );
+
+ } else {
+ for ( var i = 0; i < this.assertions.length; i++ ) {
+ if ( !this.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ try {
+ QUnit.reset();
+ } catch(e) {
+ fail("reset() failed, following Test " + this.testName + ", exception and reset fn follows", e, QUnit.reset);
+ }
+
+ runLoggingCallbacks( 'testDone', QUnit, {
+ name: this.testName,
+ module: this.module,
+ failed: bad,
+ passed: this.assertions.length - bad,
+ total: this.assertions.length
+ } );
+ },
+
+ queue: function() {
+ var test = this;
+ synchronize(function() {
+ test.init();
+ });
+ function run() {
+ // each of these can by async
+ synchronize(function() {
+ test.setup();
+ });
+ synchronize(function() {
+ test.run();
+ });
+ synchronize(function() {
+ test.teardown();
+ });
+ synchronize(function() {
+ test.finish();
+ });
+ }
+ // defer when previous test run passed, if storage is available
+ var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName);
+ if (bad) {
+ run();
+ } else {
+ synchronize(run, true);
+ };
+ }
+
+};
+
+var QUnit = {
+
+ // call on start of module test to prepend name to all tests
+ module: function(name, testEnvironment) {
+ config.currentModule = name;
+ config.currentModuleTestEnviroment = testEnvironment;
+ },
+
+ asyncTest: function(testName, expected, callback) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ QUnit.test(testName, expected, callback, true);
+ },
+
+ test: function(testName, expected, callback, async) {
+ var name = '<span class="test-name">' + testName + '</span>', testEnvironmentArg;
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+ // is 2nd argument a testEnvironment?
+ if ( expected && typeof expected === 'object') {
+ testEnvironmentArg = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = '<span class="module-name">' + config.currentModule + "</span>: " + name;
+ }
+
+ if ( !validTest(config.currentModule + ": " + testName) ) {
+ return;
+ }
+
+ var test = new Test(name, testName, expected, testEnvironmentArg, async, callback);
+ test.module = config.currentModule;
+ test.moduleTestEnvironment = config.currentModuleTestEnviroment;
+ test.queue();
+ },
+
+ /**
+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ */
+ expect: function(asserts) {
+ config.current.expected = asserts;
+ },
+
+ /**
+ * Asserts true.
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function(a, msg) {
+ a = !!a;
+ var details = {
+ result: a,
+ message: msg
+ };
+ msg = escapeInnerText(msg);
+ runLoggingCallbacks( 'log', QUnit, details );
+ config.current.assertions.push({
+ result: a,
+ message: msg
+ });
+ },
+
+ /**
+ * Checks that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ *
+ * Prefered to ok( actual == expected, message )
+ *
+ * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
+ *
+ * @param Object actual
+ * @param Object expected
+ * @param String message (optional)
+ */
+ equal: function(actual, expected, message) {
+ QUnit.push(expected == actual, actual, expected, message);
+ },
+
+ notEqual: function(actual, expected, message) {
+ QUnit.push(expected != actual, actual, expected, message);
+ },
+
+ deepEqual: function(actual, expected, message) {
+ QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
+ },
+
+ notDeepEqual: function(actual, expected, message) {
+ QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message);
+ },
+
+ strictEqual: function(actual, expected, message) {
+ QUnit.push(expected === actual, actual, expected, message);
+ },
+
+ notStrictEqual: function(actual, expected, message) {
+ QUnit.push(expected !== actual, actual, expected, message);
+ },
+
+ raises: function(block, expected, message) {
+ var actual, ok = false;
+
+ if (typeof expected === 'string') {
+ message = expected;
+ expected = null;
+ }
+
+ try {
+ block();
+ } catch (e) {
+ actual = e;
+ }
+
+ if (actual) {
+ // we don't want to validate thrown error
+ if (!expected) {
+ ok = true;
+ // expected is a regexp
+ } else if (QUnit.objectType(expected) === "regexp") {
+ ok = expected.test(actual);
+ // expected is a constructor
+ } else if (actual instanceof expected) {
+ ok = true;
+ // expected is a validation function which returns true is validation passed
+ } else if (expected.call({}, actual) === true) {
+ ok = true;
+ }
+ }
+
+ QUnit.ok(ok, message);
+ },
+
+ start: function(count) {
+ config.semaphore -= count || 1;
+ if (config.semaphore > 0) {
+ // don't start until equal number of stop-calls
+ return;
+ }
+ if (config.semaphore < 0) {
+ // ignore if start is called more often then stop
+ config.semaphore = 0;
+ }
+ // A slight delay, to avoid any current callbacks
+ if ( defined.setTimeout ) {
+ window.setTimeout(function() {
+ if (config.semaphore > 0) {
+ return;
+ }
+ if ( config.timeout ) {
+ clearTimeout(config.timeout);
+ }
+
+ config.blocking = false;
+ process(true);
+ }, 13);
+ } else {
+ config.blocking = false;
+ process(true);
+ }
+ },
+
+ stop: function(count) {
+ config.semaphore += count || 1;
+ config.blocking = true;
+
+ if ( config.testTimeout && defined.setTimeout ) {
+ clearTimeout(config.timeout);
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ config.semaphore = 1;
+ QUnit.start();
+ }, config.testTimeout);
+ }
+ }
+};
+
+//We want access to the constructor's prototype
+(function() {
+ function F(){};
+ F.prototype = QUnit;
+ QUnit = new F();
+ //Make F QUnit's constructor so that we can add to the prototype later
+ QUnit.constructor = F;
+})();
+
+// Backwards compatibility, deprecated
+QUnit.equals = QUnit.equal;
+QUnit.same = QUnit.deepEqual;
+
+// Maintain internal state
+var config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true,
+
+ // when enabled, show only failing tests
+ // gets persisted through sessionStorage and can be changed in UI via checkbox
+ hidepassed: false,
+
+ // by default, run previously failed tests first
+ // very useful in combination with "Hide passed tests" checked
+ reorder: true,
+
+ // by default, modify document.title when suite is done
+ altertitle: true,
+
+ urlConfig: ['noglobals', 'notrycatch'],
+
+ //logging callback queues
+ begin: [],
+ done: [],
+ log: [],
+ testStart: [],
+ testDone: [],
+ moduleStart: [],
+ moduleDone: []
+};
+
+// Load paramaters
+(function() {
+ var location = window.location || { search: "", protocol: "file:" },
+ params = location.search.slice( 1 ).split( "&" ),
+ length = params.length,
+ urlParams = {},
+ current;
+
+ if ( params[ 0 ] ) {
+ for ( var i = 0; i < length; i++ ) {
+ current = params[ i ].split( "=" );
+ current[ 0 ] = decodeURIComponent( current[ 0 ] );
+ // allow just a key to turn on a flag, e.g., test.html?noglobals
+ current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
+ urlParams[ current[ 0 ] ] = current[ 1 ];
+ }
+ }
+
+ QUnit.urlParams = urlParams;
+ config.filter = urlParams.filter;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = !!(location.protocol === 'file:');
+})();
+
+// Expose the API as global variables, unless an 'exports'
+// object exists, in that case we assume we're in CommonJS
+if ( typeof exports === "undefined" || typeof require === "undefined" ) {
+ extend(window, QUnit);
+ window.QUnit = QUnit;
+} else {
+ extend(exports, QUnit);
+ exports.QUnit = QUnit;
+}
+
+// define these after exposing globals to keep them in these QUnit namespace only
+extend(QUnit, {
+ config: config,
+
+ // Initialize the configuration options
+ init: function() {
+ extend(config, {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date,
+ updateRate: 1000,
+ blocking: false,
+ autostart: true,
+ autorun: false,
+ filter: "",
+ queue: [],
+ semaphore: 0
+ });
+
+ var tests = id( "qunit-tests" ),
+ banner = id( "qunit-banner" ),
+ result = id( "qunit-testresult" );
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+
+ if ( tests ) {
+ result = document.createElement( "p" );
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests );
+ result.innerHTML = 'Running...<br/>&nbsp;';
+ }
+ },
+
+ /**
+ * Resets the test setup. Useful for tests that modify the DOM.
+ *
+ * If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
+ */
+ reset: function() {
+ if ( window.jQuery ) {
+ jQuery( "#qunit-fixture" ).html( config.fixture );
+ } else {
+ var main = id( 'qunit-fixture' );
+ if ( main ) {
+ main.innerHTML = config.fixture;
+ }
+ }
+ },
+
+ /**
+ * Trigger an event on an element.
+ *
+ * @example triggerEvent( document.body, "click" );
+ *
+ * @param DOMElement elem
+ * @param String type
+ */
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent("MouseEvents");
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elem.dispatchEvent( event );
+
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent("on"+type);
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return QUnit.objectType( obj ) == type;
+ },
+
+ objectType: function( obj ) {
+ if (typeof obj === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ }
+ if (obj === null) {
+ return "null";
+ }
+
+ var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || '';
+
+ switch (type) {
+ case 'Number':
+ if (isNaN(obj)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+ case 'String':
+ case 'Boolean':
+ case 'Array':
+ case 'Date':
+ case 'RegExp':
+ case 'Function':
+ return type.toLowerCase();
+ }
+ if (typeof obj === "object") {
+ return "object";
+ }
+ return undefined;
+ },
+
+ push: function(result, actual, expected, message) {
+ var details = {
+ result: result,
+ message: message,
+ actual: actual,
+ expected: expected
+ };
+
+ message = escapeInnerText(message) || (result ? "okay" : "failed");
+ message = '<span class="test-message">' + message + "</span>";
+ expected = escapeInnerText(QUnit.jsDump.parse(expected));
+ actual = escapeInnerText(QUnit.jsDump.parse(actual));
+ var output = message + '<table><tr class="test-expected"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>';
+ if (actual != expected) {
+ output += '<tr class="test-actual"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>';
+ output += '<tr class="test-diff"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>';
+ }
+ if (!result) {
+ var source = sourceFromStacktrace();
+ if (source) {
+ details.source = source;
+ output += '<tr class="test-source"><th>Source: </th><td><pre>' + escapeInnerText(source) + '</pre></td></tr>';
+ }
+ }
+ output += "</table>";
+
+ runLoggingCallbacks( 'log', QUnit, details );
+
+ config.current.assertions.push({
+ result: !!result,
+ message: output
+ });
+ },
+
+ url: function( params ) {
+ params = extend( extend( {}, QUnit.urlParams ), params );
+ var querystring = "?",
+ key;
+ for ( key in params ) {
+ if ( !hasOwn.call( params, key ) ) {
+ continue;
+ }
+ querystring += encodeURIComponent( key ) + "=" +
+ encodeURIComponent( params[ key ] ) + "&";
+ }
+ return window.location.pathname + querystring.slice( 0, -1 );
+ },
+
+ extend: extend,
+ id: id,
+ addEvent: addEvent
+});
+
+//QUnit.constructor is set to the empty F() above so that we can add to it's prototype later
+//Doing this allows us to tell if the following methods have been overwritten on the actual
+//QUnit object, which is a deprecated way of using the callbacks.
+extend(QUnit.constructor.prototype, {
+ // Logging callbacks; all receive a single argument with the listed properties
+ // run test/logs.html for any related changes
+ begin: registerLoggingCallback('begin'),
+ // done: { failed, passed, total, runtime }
+ done: registerLoggingCallback('done'),
+ // log: { result, actual, expected, message }
+ log: registerLoggingCallback('log'),
+ // testStart: { name }
+ testStart: registerLoggingCallback('testStart'),
+ // testDone: { name, failed, passed, total }
+ testDone: registerLoggingCallback('testDone'),
+ // moduleStart: { name }
+ moduleStart: registerLoggingCallback('moduleStart'),
+ // moduleDone: { name, failed, passed, total }
+ moduleDone: registerLoggingCallback('moduleDone')
+});
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+QUnit.load = function() {
+ runLoggingCallbacks( 'begin', QUnit, {} );
+
+ // Initialize the config, saving the execution queue
+ var oldconfig = extend({}, config);
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ var urlConfigHtml = '', len = config.urlConfig.length;
+ for ( var i = 0, val; i < len, val = config.urlConfig[i]; i++ ) {
+ config[val] = QUnit.urlParams[val];
+ urlConfigHtml += '<label><input name="' + val + '" type="checkbox"' + ( config[val] ? ' checked="checked"' : '' ) + '>' + val + '</label>';
+ }
+
+ var userAgent = id("qunit-userAgent");
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+ var banner = id("qunit-header");
+ if ( banner ) {
+ banner.innerHTML = '<a href="' + QUnit.url({ filter: undefined }) + '"> ' + banner.innerHTML + '</a> ' + urlConfigHtml;
+ addEvent( banner, "change", function( event ) {
+ var params = {};
+ params[ event.target.name ] = event.target.checked ? true : undefined;
+ window.location = QUnit.url( params );
+ });
+ }
+
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ var filter = document.createElement("input");
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+ addEvent( filter, "click", function() {
+ var ol = document.getElementById("qunit-tests");
+ if ( filter.checked ) {
+ ol.className = ol.className + " hidepass";
+ } else {
+ var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
+ ol.className = tmp.replace(/ hidepass /, " ");
+ }
+ if ( defined.sessionStorage ) {
+ if (filter.checked) {
+ sessionStorage.setItem("qunit-filter-passed-tests", "true");
+ } else {
+ sessionStorage.removeItem("qunit-filter-passed-tests");
+ }
+ }
+ });
+ if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) {
+ filter.checked = true;
+ var ol = document.getElementById("qunit-tests");
+ ol.className = ol.className + " hidepass";
+ }
+ toolbar.appendChild( filter );
+
+ var label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-pass");
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+ }
+
+ var main = id('qunit-fixture');
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if (config.autostart) {
+ QUnit.start();
+ }
+};
+
+addEvent(window, "load", QUnit.load);
+
+// addEvent(window, "error") gives us a useless event object
+window.onerror = function( message, file, line ) {
+ if ( QUnit.config.current ) {
+ ok( false, message + ", " + file + ":" + line );
+ } else {
+ test( "global failure", function() {
+ ok( false, message + ", " + file + ":" + line );
+ });
+ }
+};
+
+function done() {
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ runLoggingCallbacks( 'moduleDone', QUnit, {
+ name: config.currentModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ } );
+ }
+
+ var banner = id("qunit-banner"),
+ tests = id("qunit-tests"),
+ runtime = +new Date - config.started,
+ passed = config.stats.all - config.stats.bad,
+ html = [
+ 'Tests completed in ',
+ runtime,
+ ' milliseconds.<br/>',
+ '<span class="passed">',
+ passed,
+ '</span> tests of <span class="total">',
+ config.stats.all,
+ '</span> passed, <span class="failed">',
+ config.stats.bad,
+ '</span> failed.'
+ ].join('');
+
+ if ( banner ) {
+ banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
+ }
+
+ if ( tests ) {
+ id( "qunit-testresult" ).innerHTML = html;
+ }
+
+ if ( config.altertitle && typeof document !== "undefined" && document.title ) {
+ // show ✖ for good, ✔ for bad suite result in title
+ // use escape sequences in case file gets loaded with non-utf-8-charset
+ document.title = [
+ (config.stats.bad ? "\u2716" : "\u2714"),
+ document.title.replace(/^[\u2714\u2716] /i, "")
+ ].join(" ");
+ }
+
+ runLoggingCallbacks( 'done', QUnit, {
+ failed: config.stats.bad,
+ passed: passed,
+ total: config.stats.all,
+ runtime: runtime
+ } );
+}
+
+function validTest( name ) {
+ var filter = config.filter,
+ run = false;
+
+ if ( !filter ) {
+ return true;
+ }
+
+ var not = filter.charAt( 0 ) === "!";
+ if ( not ) {
+ filter = filter.slice( 1 );
+ }
+
+ if ( name.indexOf( filter ) !== -1 ) {
+ return !not;
+ }
+
+ if ( not ) {
+ run = true;
+ }
+
+ return run;
+}
+
+// so far supports only Firefox, Chrome and Opera (buggy)
+// could be extended in the future to use something like https://github.com/csnover/TraceKit
+function sourceFromStacktrace() {
+ try {
+ throw new Error();
+ } catch ( e ) {
+ if (e.stacktrace) {
+ // Opera
+ return e.stacktrace.split("\n")[6];
+ } else if (e.stack) {
+ // Firefox, Chrome
+ return e.stack.split("\n")[4];
+ } else if (e.sourceURL) {
+ // Safari, PhantomJS
+ // TODO sourceURL points at the 'throw new Error' line above, useless
+ //return e.sourceURL + ":" + e.line;
+ }
+ }
+}
+
+function escapeInnerText(s) {
+ if (!s) {
+ return "";
+ }
+ s = s + "";
+ return s.replace(/[\&<>]/g, function(s) {
+ switch(s) {
+ case "&": return "&amp;";
+ case "<": return "&lt;";
+ case ">": return "&gt;";
+ default: return s;
+ }
+ });
+}
+
+function synchronize( callback, last ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process(last);
+ }
+}
+
+function process( last ) {
+ var start = new Date().getTime();
+ config.depth = config.depth ? config.depth + 1 : 1;
+
+ while ( config.queue.length && !config.blocking ) {
+ if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
+ config.queue.shift()();
+ } else {
+ window.setTimeout( function(){
+ process( last );
+ }, 13 );
+ break;
+ }
+ }
+ config.depth--;
+ if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
+ done();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ if ( !hasOwn.call( window, key ) ) {
+ continue;
+ }
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var old = config.pollution;
+ saveGlobal();
+
+ var newGlobals = diff( config.pollution, old );
+ if ( newGlobals.length > 0 ) {
+ ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
+ }
+
+ var deletedGlobals = diff( old, config.pollution );
+ if ( deletedGlobals.length > 0 ) {
+ ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var result = a.slice();
+ for ( var i = 0; i < result.length; i++ ) {
+ for ( var j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice(i, 1);
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function fail(message, exception, callback) {
+ if ( typeof console !== "undefined" && console.error && console.warn ) {
+ console.error(message);
+ console.error(exception);
+ console.warn(callback.toString());
+
+ } else if ( window.opera && opera.postError ) {
+ opera.postError(message, exception, callback.toString);
+ }
+}
+
+function extend(a, b) {
+ for ( var prop in b ) {
+ if ( b[prop] === undefined ) {
+ delete a[prop];
+
+ // Avoid "Member not found" error in IE8 caused by setting window.constructor
+ } else if ( prop !== "constructor" || a !== window ) {
+ a[prop] = b[prop];
+ }
+ }
+
+ return a;
+}
+
+function addEvent(elem, type, fn) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id(name) {
+ return !!(typeof document !== "undefined" && document && document.getElementById) &&
+ document.getElementById( name );
+}
+
+function registerLoggingCallback(key){
+ return function(callback){
+ config[key].push( callback );
+ };
+}
+
+// Supports deprecated method of completely overwriting logging callbacks
+function runLoggingCallbacks(key, scope, args) {
+ //debugger;
+ var callbacks;
+ if ( QUnit.hasOwnProperty(key) ) {
+ QUnit[key].call(scope, args);
+ } else {
+ callbacks = config[key];
+ for( var i = 0; i < callbacks.length; i++ ) {
+ callbacks[i].call( scope, args );
+ }
+ }
+}
+
+// Test for equality any JavaScript type.
+// Author: Philippe Rathé <prathe@gmail.com>
+QUnit.equiv = function () {
+
+ var innerEquiv; // the real equiv function
+ var callers = []; // stack to decide between skip/abort functions
+ var parents = []; // stack to avoiding loops from circular referencing
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks(o, callbacks, args) {
+ var prop = QUnit.objectType(o);
+ if (prop) {
+ if (QUnit.objectType(callbacks[prop]) === "function") {
+ return callbacks[prop].apply(callbacks, args);
+ } else {
+ return callbacks[prop]; // or undefined
+ }
+ }
+ }
+
+ var getProto = Object.getPrototypeOf || function (obj) {
+ return obj.__proto__;
+ };
+
+ var callbacks = function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality(b, a) {
+ if (b instanceof a.constructor || a instanceof b.constructor) {
+ // to catch short annotaion VS 'new' annotation of a
+ // declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string" : useStrictEquality,
+ "boolean" : useStrictEquality,
+ "number" : useStrictEquality,
+ "null" : useStrictEquality,
+ "undefined" : useStrictEquality,
+
+ "nan" : function(b) {
+ return isNaN(b);
+ },
+
+ "date" : function(b, a) {
+ return QUnit.objectType(b) === "date"
+ && a.valueOf() === b.valueOf();
+ },
+
+ "regexp" : function(b, a) {
+ return QUnit.objectType(b) === "regexp"
+ && a.source === b.source && // the regex itself
+ a.global === b.global && // and its modifers
+ // (gmi) ...
+ a.ignoreCase === b.ignoreCase
+ && a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function" : function() {
+ var caller = callers[callers.length - 1];
+ return caller !== Object && typeof caller !== "undefined";
+ },
+
+ "array" : function(b, a) {
+ var i, j, loop;
+ var len;
+
+ // b could be an object literal here
+ if (!(QUnit.objectType(b) === "array")) {
+ return false;
+ }
+
+ len = a.length;
+ if (len !== b.length) { // safe and faster
+ return false;
+ }
+
+ // track reference to avoid circular references
+ parents.push(a);
+ for (i = 0; i < len; i++) {
+ loop = false;
+ for (j = 0; j < parents.length; j++) {
+ if (parents[j] === a[i]) {
+ loop = true;// dont rewalk array
+ }
+ }
+ if (!loop && !innerEquiv(a[i], b[i])) {
+ parents.pop();
+ return false;
+ }
+ }
+ parents.pop();
+ return true;
+ },
+
+ "object" : function(b, a) {
+ var i, j, loop;
+ var eq = true; // unless we can proove it
+ var aProperties = [], bProperties = []; // collection of
+ // strings
+
+ // comparing constructors is more strict than using
+ // instanceof
+ if (a.constructor !== b.constructor) {
+ // Allow objects with no prototype to be equivalent to
+ // objects with Object as their constructor.
+ if (!((getProto(a) === null && getProto(b) === Object.prototype) ||
+ (getProto(b) === null && getProto(a) === Object.prototype)))
+ {
+ return false;
+ }
+ }
+
+ // stack constructor before traversing properties
+ callers.push(a.constructor);
+ // track reference to avoid circular references
+ parents.push(a);
+
+ for (i in a) { // be strict: don't ensures hasOwnProperty
+ // and go deep
+ loop = false;
+ for (j = 0; j < parents.length; j++) {
+ if (parents[j] === a[i])
+ loop = true; // don't go down the same path
+ // twice
+ }
+ aProperties.push(i); // collect a's properties
+
+ if (!loop && !innerEquiv(a[i], b[i])) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+ parents.pop();
+
+ for (i in b) {
+ bProperties.push(i); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq
+ && innerEquiv(aProperties.sort(), bProperties
+ .sort());
+ }
+ };
+ }();
+
+ innerEquiv = function() { // can take multiple arguments
+ var args = Array.prototype.slice.apply(arguments);
+ if (args.length < 2) {
+ return true; // end transition
+ }
+
+ return (function(a, b) {
+ if (a === b) {
+ return true; // catch the most you can
+ } else if (a === null || b === null || typeof a === "undefined"
+ || typeof b === "undefined"
+ || QUnit.objectType(a) !== QUnit.objectType(b)) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [ b, a ]);
+ }
+
+ // apply transition with (1..n) arguments
+ })(args[0], args[1])
+ && arguments.callee.apply(this, args.splice(1,
+ args.length - 1));
+ };
+
+ return innerEquiv;
+
+}();
+
+/**
+ * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
+ * http://flesler.blogspot.com Licensed under BSD
+ * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
+ *
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace(/"/g, '\\"') + '"';
+ };
+ function literal( o ) {
+ return o + '';
+ };
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join )
+ arr = arr.join( ',' + s + inner );
+ if ( !arr )
+ return pre + post;
+ return [ pre, inner + arr, base + post ].join(s);
+ };
+ function array( arr, stack ) {
+ var i = arr.length, ret = Array(i);
+ this.up();
+ while ( i-- )
+ ret[i] = this.parse( arr[i] , undefined , stack);
+ this.down();
+ return join( '[', ret, ']' );
+ };
+
+ var reName = /^function (\w+)/;
+
+ var jsDump = {
+ parse:function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance
+ stack = stack || [ ];
+ var parser = this.parsers[ type || this.typeOf(obj) ];
+ type = typeof parser;
+ var inStack = inArray(obj, stack);
+ if (inStack != -1) {
+ return 'recursion('+(inStack - stack.length)+')';
+ }
+ //else
+ if (type == 'function') {
+ stack.push(obj);
+ var res = parser.call( this, obj, stack );
+ stack.pop();
+ return res;
+ }
+ // else
+ return (type == 'string') ? parser : this.parsers.error;
+ },
+ typeOf:function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if (typeof obj === "undefined") {
+ type = "undefined";
+ } else if (QUnit.is("RegExp", obj)) {
+ type = "regexp";
+ } else if (QUnit.is("Date", obj)) {
+ type = "date";
+ } else if (QUnit.is("Function", obj)) {
+ type = "function";
+ } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") {
+ type = "window";
+ } else if (obj.nodeType === 9) {
+ type = "document";
+ } else if (obj.nodeType) {
+ type = "node";
+ } else if (
+ // native arrays
+ toString.call( obj ) === "[object Array]" ||
+ // NodeList objects
+ ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
+ ) {
+ type = "array";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator:function() {
+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? '&nbsp;' : ' ';
+ },
+ indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline )
+ return '';
+ var chr = this.indentChar;
+ if ( this.HTML )
+ chr = chr.replace(/\t/g,' ').replace(/ /g,'&nbsp;');
+ return Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up:function( a ) {
+ this._depth_ += a || 1;
+ },
+ down:function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser:function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote:quote,
+ literal:literal,
+ join:join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers:{
+ window: '[Window]',
+ document: '[Document]',
+ error:'[ERROR]', //when no parser is found, shouldn't happen
+ unknown: '[Unknown]',
+ 'null':'null',
+ 'undefined':'undefined',
+ 'function':function( fn ) {
+ var ret = 'function',
+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
+ if ( name )
+ ret += ' ' + name;
+ ret += '(';
+
+ ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join('');
+ return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' );
+ },
+ array: array,
+ nodelist: array,
+ arguments: array,
+ object:function( map, stack ) {
+ var ret = [ ];
+ QUnit.jsDump.up();
+ for ( var key in map ) {
+ var val = map[key];
+ ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(val, undefined, stack));
+ }
+ QUnit.jsDump.down();
+ return join( '{', ret, '}' );
+ },
+ node:function( node ) {
+ var open = QUnit.jsDump.HTML ? '&lt;' : '<',
+ close = QUnit.jsDump.HTML ? '&gt;' : '>';
+
+ var tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( var a in QUnit.jsDump.DOMAttrs ) {
+ var val = node[QUnit.jsDump.DOMAttrs[a]];
+ if ( val )
+ ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' );
+ }
+ return ret + close + open + '/' + tag + close;
+ },
+ functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
+ var l = fn.length;
+ if ( !l ) return '';
+
+ var args = Array(l);
+ while ( l-- )
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ return ' ' + args.join(', ') + ' ';
+ },
+ key:quote, //object calls it internally, the key part of an item in a map
+ functionCode:'[code]', //function calls it internally, it's the content of the function
+ attribute:quote, //node calls it internally, it's an html attribute value
+ string:quote,
+ date:quote,
+ regexp:literal, //regex
+ number:literal,
+ 'boolean':literal
+ },
+ DOMAttrs:{//attributes to dump from nodes, name=>realName
+ id:'id',
+ name:'name',
+ 'class':'className'
+ },
+ HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar:' ',//indentation unit
+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+})();
+
+// from Sizzle.js
+function getText( elems ) {
+ var ret = "", elem;
+
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+};
+
+//from jquery.js
+function inArray( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+/*
+ * Javascript Diff Algorithm
+ * By John Resig (http://ejohn.org/)
+ * Modified by Chu Alan "sprite"
+ *
+ * Released under the MIT license.
+ *
+ * More Info:
+ * http://ejohn.org/projects/javascript-diff-algorithm/
+ *
+ * Usage: QUnit.diff(expected, actual)
+ *
+ * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
+ */
+QUnit.diff = (function() {
+ function diff(o, n) {
+ var ns = {};
+ var os = {};
+
+ for (var i = 0; i < n.length; i++) {
+ if (ns[n[i]] == null)
+ ns[n[i]] = {
+ rows: [],
+ o: null
+ };
+ ns[n[i]].rows.push(i);
+ }
+
+ for (var i = 0; i < o.length; i++) {
+ if (os[o[i]] == null)
+ os[o[i]] = {
+ rows: [],
+ n: null
+ };
+ os[o[i]].rows.push(i);
+ }
+
+ for (var i in ns) {
+ if ( !hasOwn.call( ns, i ) ) {
+ continue;
+ }
+ if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) {
+ n[ns[i].rows[0]] = {
+ text: n[ns[i].rows[0]],
+ row: os[i].rows[0]
+ };
+ o[os[i].rows[0]] = {
+ text: o[os[i].rows[0]],
+ row: ns[i].rows[0]
+ };
+ }
+ }
+
+ for (var i = 0; i < n.length - 1; i++) {
+ if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&
+ n[i + 1] == o[n[i].row + 1]) {
+ n[i + 1] = {
+ text: n[i + 1],
+ row: n[i].row + 1
+ };
+ o[n[i].row + 1] = {
+ text: o[n[i].row + 1],
+ row: i + 1
+ };
+ }
+ }
+
+ for (var i = n.length - 1; i > 0; i--) {
+ if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
+ n[i - 1] == o[n[i].row - 1]) {
+ n[i - 1] = {
+ text: n[i - 1],
+ row: n[i].row - 1
+ };
+ o[n[i].row - 1] = {
+ text: o[n[i].row - 1],
+ row: i - 1
+ };
+ }
+ }
+
+ return {
+ o: o,
+ n: n
+ };
+ }
+
+ return function(o, n) {
+ o = o.replace(/\s+$/, '');
+ n = n.replace(/\s+$/, '');
+ var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/));
+
+ var str = "";
+
+ var oSpace = o.match(/\s+/g);
+ if (oSpace == null) {
+ oSpace = [" "];
+ }
+ else {
+ oSpace.push(" ");
+ }
+ var nSpace = n.match(/\s+/g);
+ if (nSpace == null) {
+ nSpace = [" "];
+ }
+ else {
+ nSpace.push(" ");
+ }
+
+ if (out.n.length == 0) {
+ for (var i = 0; i < out.o.length; i++) {
+ str += '<del>' + out.o[i] + oSpace[i] + "</del>";
+ }
+ }
+ else {
+ if (out.n[0].text == null) {
+ for (n = 0; n < out.o.length && out.o[n].text == null; n++) {
+ str += '<del>' + out.o[n] + oSpace[n] + "</del>";
+ }
+ }
+
+ for (var i = 0; i < out.n.length; i++) {
+ if (out.n[i].text == null) {
+ str += '<ins>' + out.n[i] + nSpace[i] + "</ins>";
+ }
+ else {
+ var pre = "";
+
+ for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) {
+ pre += '<del>' + out.o[n] + oSpace[n] + "</del>";
+ }
+ str += " " + out.n[i].text + nSpace[i] + pre;
+ }
+ }
+ }
+
+ return str;
+ };
+})();
+
+})(this);
diff --git a/npm_assets/node_modules/html5shiv/test/style.all.css b/npm_assets/node_modules/html5shiv/test/style.all.css
new file mode 100644
index 0000000..208c6ee
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/style.all.css
@@ -0,0 +1,11 @@
+html { font: 75% sans-serif; overflow-y: scroll; }
+body { margin: 0; }
+pre { margin: 0; padding: 1em 0; }
+section { border: 0.5em solid #8C8; margin: 1em; padding: 1em; }
+h1 { margin: 1em 2em; }
+ul { font: bold 1.5em sans-serif; margin: 1em; padding: 0 0 0 1.5em; }
+li { margin: 1em; }
+a { color: #66C; text-decoration: none; }
+
+.pass { color: #090; }
+.fail { color: #F00; } \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/style.css b/npm_assets/node_modules/html5shiv/test/style.css
new file mode 100644
index 0000000..e4f5049
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/style.css
@@ -0,0 +1,2 @@
+@import url(style.all.css);
+@import url(style.print.css); \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/style.print.css b/npm_assets/node_modules/html5shiv/test/style.print.css
new file mode 100644
index 0000000..afd77b1
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/style.print.css
@@ -0,0 +1,5 @@
+@media print {
+ section {
+ border-style: dotted;
+ }
+} \ No newline at end of file
diff --git a/npm_assets/node_modules/html5shiv/test/unit/tests.js b/npm_assets/node_modules/html5shiv/test/unit/tests.js
new file mode 100644
index 0000000..52e8c9c
--- /dev/null
+++ b/npm_assets/node_modules/html5shiv/test/unit/tests.js
@@ -0,0 +1,281 @@
+(function(){
+
+module("html5shiv tests");
+var blockElements = "article,aside,figcaption,figure,footer,header,hgroup,nav,section".split(',');
+
+var testEnv = [
+ {
+ doc: document,
+ initialShivMethods: html5.shivMethods,
+ html5: html5,
+ name: 'default'
+ }
+];
+
+
+var shivTests = function(fn, env){
+ if(!env){
+ env = testEnv[0];
+ }
+ env.html5.shivMethods = true;
+ fn();
+ env.html5.shivMethods = env.initialShivMethods;
+};
+
+var envTest = function(name, fn, frames){
+ if(!frames){
+ frames = ['default'];
+ }
+ asyncTest(name, function(){
+ $.each(testEnv, function(i, env){
+ if($.inArray(env.name, frames) != -1){
+ fn(env);
+ }
+ });
+ if(testEnv.length > 1){
+ start();
+ } else {
+ initIframes();
+ }
+ });
+
+};
+
+QUnit.reset = function() {
+ $.each(testEnv, function(i, env){
+ $('#qunit-fixture', env.doc).html(env.fixture);
+ });
+};
+
+
+var initIframes = function(){
+ if(testEnv.length > 1){return;}
+ testEnv[0].fixture = $('#qunit-fixture').html();
+
+ $('iframe.test-frame').each(function(){
+ var win = this.contentWindow;
+ if($('#qunit-fixture', win.document).length){
+ testEnv.push({
+ doc: win.document,
+ html5: win.html5,
+ initialShivMethods: (win.html5 || {}).shivMethods,
+ fixture: $('#qunit-fixture', win.document).html(),
+ name: this.src.split('?')[1]
+ });
+ }
+ });
+ if(testEnv.length > 1){
+ start();
+ } else {
+ setTimeout(initIframes, 30);
+ }
+};
+
+
+$(initIframes);
+
+
+envTest("display block tests", function(env){
+ $.each(blockElements, function(i, elem){
+ equals($(elem, env.doc).css('display'), 'block', elem +" has display: block");
+ });
+
+}, ['default', 'disableMethodsBefore']);
+
+envTest("test html5.createElement/html5.createDocumentFragment", function(env){
+ var doc5 = html5;
+ if(env.html5){
+ doc5 = env.html5;
+ env.html5.shivMethods = false;
+ }
+ html5.shivMethods = false;
+
+ var fragDiv = doc5.createElement('div', env.doc);
+ var frag = doc5.createDocumentFragment(env.doc);
+ var markText = "with these words highlighted";
+ var div = $( doc5.createElement('div', env.doc) ).html('<section><article><mark>s</mark></article>?</section>').appendTo(env.doc.getElementById('qunit-fixture'));
+
+ fragDiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>'+markText+'</mark>?</section>';
+
+ frag.appendChild(fragDiv);
+ fragDiv.innerHTML += '<article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article>';
+
+ env.doc.getElementById('qunit-fixture').appendChild(frag);
+
+ equals($('section article > mark', div).length, 1, "found mark in section > article");
+ equals($('section > mark', fragDiv).html(), markText, "innerHTML getter equals innerHTML setter");
+ equals($('article', fragDiv).css('borderTopWidth'), '2px', "article has a 2px border");
+
+ if(env.html5){
+ env.html5.shivMethods = env.initialShivMethods;
+ }
+ html5.shivMethods = true;
+}, ['disableMethodsBefore', 'disableMethodsAfter']);
+
+
+if(!html5.supportsUnknownElements){
+
+ envTest("config shivMethods test", function(env){
+ var div = $('<div/>', env.doc).html('<section><article><mark></mark></article>?</section>').appendTo(env.doc.getElementById('qunit-fixture'));
+ equals($('section article > mark', div).length, (env.html5.shivMethods) ? 1 : 0, "found/no found mark in section > article");
+ }, ['default', 'disableMethodsBefore', 'disableMethodsAfter']);
+
+ envTest("config shivCSS test", function(env){
+ $.each(blockElements, function(i, elem){
+ equals($(elem, env.doc).css('display'), 'inline', elem +" has display: inline if unshived");
+ });
+ env.html5.shivCSS = true;
+ env.html5.shivDocument();
+ $.each(blockElements, function(i, elem){
+ equals($(elem, env.doc).css('display'), 'block', elem +" has display: block. after reshiving");
+ });
+ }, ['disableCSS']);
+}
+
+envTest("config add elements test", function(env){
+ var value = $.trim($('abcxyz', env.doc).html());
+ ok((html5.supportsUnknownElements || env.html5.elements.indexOf('abcxyz') !== -1) ? value : !value, "unknownelement has one/none div inside: "+ value);
+}, ['default', 'disableMethodsBefore', 'addUnknownBefore', 'addUnknownAfter']);
+
+envTest("parsing tests", function(env){
+ $.each(blockElements, function(i, elem){
+ equals($(elem +' div.inside', env.doc).length, 1, elem +" has a div inside");
+ });
+}, ['default', 'disableMethodsBefore']);
+
+envTest("style test", function(env){
+ var article = $('article', env.doc);
+ equals(article.css('borderTopWidth'), '2px', "article has a 2px border");
+}, ['default', 'disableMethodsBefore']);
+
+if (!html5.supportsUnknownElements) {
+ envTest("shiv different document", function(env){
+ var markText = "with these words highlighted3";
+ var markup = '<section><article>This jQuery 1.6.4 sentence is in a green box <mark>' + markText + '</mark></article>?</section>';
+
+ var div = $('<div/>', env.doc).html(markup).appendTo(env.doc.getElementById('qunit-fixture'));
+ equals($('section article > mark', div).length, 0, "document is not shived");
+
+ html5.shivDocument(env.doc);
+
+ div = $('<div/>', env.doc).html(markup).appendTo(env.doc.getElementById('qunit-fixture'));
+ equals($('section article > mark', div).length, 1, "document is shived");
+ equals($('article', div).css('borderTopWidth'), '2px', "article has a 2px border");
+
+ }, ['noEmbed']);
+}
+
+envTest("createElement/innerHTML test", function(env){
+ shivTests(
+ function(){
+ var div = env.doc.createElement('div');
+ var text = "This native javascript sentence is in a green box <mark>with these words highlighted</mark>?";
+ div.innerHTML = '<section id="section">'+ text +'</section>';
+ env.doc.getElementById('qunit-fixture').appendChild(div);
+ equals($('#section', env.doc).html(), text, "innerHTML getter equals innerHTML setter");
+ equals($('#section mark', env.doc).length, 1, "section has a mark element inside");
+ },
+ env
+ );
+}, ['default', 'disableMethodsBefore']);
+
+envTest("createElement/createDocumentFragment/innerHTML test", function(env){
+ shivTests(
+ function(){
+ var div = env.doc.createElement('div');
+ var frag = env.doc.createDocumentFragment();
+ var markText = "with these words highlighted";
+ div.innerHTML = '<section>This native javascript sentence is in a green box <mark>'+markText+'</mark>?</section>';
+ frag.appendChild(div);
+ div.innerHTML += '<article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article>';
+ env.doc.getElementById('qunit-fixture').appendChild(frag);
+ equals($('section > mark', div).html(), markText, "innerHTML getter equals innerHTML setter");
+ equals($('article', div).css('borderTopWidth'), '2px', "article has a 2px border");
+ },
+ env
+ );
+}, ['default', 'disableMethodsBefore']);
+
+
+envTest("createDocumentFragment/cloneNode/innerHTML test", function(env){
+ shivTests(
+ function(){
+ var frag = env.doc.createDocumentFragment();
+ var fragDiv = env.doc.createElement('div');
+
+ var markText = "with these words highlighted2";
+ var fragDivClone;
+ frag.appendChild(fragDiv);
+
+ fragDiv.innerHTML = '<div><article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article></div>';
+
+ fragDivClone = fragDiv.cloneNode(true);
+
+ env.doc.getElementById('qunit-fixture').appendChild(fragDivClone);
+ equals($('mark', env.doc).html(), markText, "innerHTML getter equals innerHTML setter");
+ },
+ env
+ );
+}, ['default', 'addUnknownAfter']);
+
+test("form test", function() {
+ shivTests(
+ function(){
+ var form = document.createElement('form');
+ var select = document.createElement('select');
+ var input = document.createElement('input');
+ var button = document.createElement('button');
+ var option = document.createElement('option');
+ var markText = "with these words highlighted2";
+
+ form.setAttribute('action', 'some/path');
+ form.setAttribute('name', 'formName');
+ form.target = '_blank';
+ select.name = 'selectName';
+ option.value = '1.value';
+ button.setAttribute('type', 'submit');
+ input.type = 'submit';
+
+ form.innerHTML = '<article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article>';
+
+
+ form.appendChild(select);
+ form.appendChild(button);
+ form.appendChild(input);
+
+
+
+ if(select.add){
+ try {
+ select.add(option);
+ } catch(er){
+ select.appendChild(option);
+ }
+ } else {
+ select.appendChild(option);
+ }
+ document.getElementById('qunit-fixture').appendChild(form);
+
+ equals($('select option', form).val(), '1.value', "select has one option with value");
+ equals($('article > mark', form).html(), markText, "innerHTML getter equals innerHTML setter");
+ equals($('article', form).css('borderTopWidth'), '2px', "article has a 2px border");
+ }
+ );
+});
+
+envTest("jQuery test", function(env){
+ shivTests(
+ function(){
+ var markText = "with these words highlighted3";
+ var div = $('<div/>', env.doc).html('<section><article>This jQuery 1.6.4 sentence is in a green box <mark>'+markText+'</mark></article>?</section>').appendTo(env.doc.getElementById('qunit-fixture'));
+ equals($('article > mark', div).html(), markText, "innerHTML getter equals innerHTML setter");
+ equals($('article', div).css('borderTopWidth'), '2px', "article has a 2px border");
+ },
+ env
+ );
+});
+
+
+
+
+})();